diff --git a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx
index b4a9129b068ef0600eb1406e9c7d5805aa081240..6853a2e5f963b71c95d03aea0fa6f020156fad70 100755
--- a/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx
+++ b/AtlasGeometryCommon/BeamPipeGeoModel/src/BeamPipeDetectorTool.cxx
@@ -72,7 +72,7 @@ StatusCode BeamPipeDetectorTool::create( StoreGateSvc* detStore )
     // Check we have the beampipe and print its version
     // Print the  version tag:
     std::string beampipeVersionTag;
-    beampipeVersionTag = raccess->getChildTag("BeamPipe", atlasVersion,versionNode, false);
+    beampipeVersionTag = raccess->getChildTag("BeamPipe", atlasVersion,versionNode);
     log << MSG::DEBUG << "Beampipe Version: " << beampipeVersionTag << endmsg;
 
 
diff --git a/AtlasGeometryCommon/SubDetectorEnvelopes/cmt/requirements b/AtlasGeometryCommon/SubDetectorEnvelopes/cmt/requirements
deleted file mode 100644
index c3a25edea120fa2cbacebb940f551cd4b9c5a520..0000000000000000000000000000000000000000
--- a/AtlasGeometryCommon/SubDetectorEnvelopes/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-package SubDetectorEnvelopes
-author <Elmar.Ritsch@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-
-#################################################################
-# public use statements
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*        External
-use AtlasDetDescr               AtlasDetDescr-*         DetectorDescription
-
-#################################################################
-# private use statements
-private
-use AthenaBaseComps             AthenaBaseComps-*       Control
-use RDBAccessSvc                RDBAccessSvc-*          Database/AthenaPOOL
-use GeoModelInterfaces          GeoModelInterfaces-*    DetectorDescription/GeoModel
-use AtlasCLHEP                  AtlasCLHEP-*            External
-
-public
-library SubDetectorEnvelopes *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-# use the following lines to compile this package with debug symbols
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/AtlasGeometryCommon/SubDetectorEnvelopes/src/DetDescrDBEnvelopeSvc.cxx b/AtlasGeometryCommon/SubDetectorEnvelopes/src/DetDescrDBEnvelopeSvc.cxx
index 41b7f1509a91226a9fed22d2fe0b3a8527ec400e..2acf8666c85b2cb58369af77eb52480fe763f36e 100644
--- a/AtlasGeometryCommon/SubDetectorEnvelopes/src/DetDescrDBEnvelopeSvc.cxx
+++ b/AtlasGeometryCommon/SubDetectorEnvelopes/src/DetDescrDBEnvelopeSvc.cxx
@@ -102,12 +102,6 @@ StatusCode DetDescrDBEnvelopeSvc::initialize()
     if ( !enableFallback()) return StatusCode::FAILURE;
   }
 
-  // connect to DDDB
-  if ( !m_doFallback && m_dbAccess->connect()==false) {
-    ATH_MSG_ERROR("Unable not connect to ATLASDD Database");
-    if ( !enableFallback()) return StatusCode::FAILURE;
-  }
-
   // retrieve the GeoModelSvc
   if ( !m_doFallback && svcLocator->service("GeoModelSvc", m_geoModel).isFailure()) {
     ATH_MSG_ERROR("Could not locate GeoModelSvc");
@@ -135,8 +129,6 @@ StatusCode DetDescrDBEnvelopeSvc::initialize()
       }
     }
 
-    // disconnect the DB access svc
-    m_dbAccess->disconnect();
   }
 
   // (#) or use the fallback solution right away
diff --git a/AtlasTest/ControlTest/share/StoreGateGen.ref b/AtlasTest/ControlTest/share/StoreGateGen.ref
index 4407838318ca639baf5dbd1aacad2fd282b5d6c7..bfcb2be5bdcceecc54f2d88e101019d47946b7a6 100644
--- a/AtlasTest/ControlTest/share/StoreGateGen.ref
+++ b/AtlasTest/ControlTest/share/StoreGateGen.ref
@@ -1,20 +1,21 @@
-Thu Mar 23 12:58:21 CET 2017
-Preloading tcmalloc_minimal.so
+Thu Jul 27 15:42:13 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-dbg] [private/private] -- built on [2017-03-23 09:24]
+Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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 "AthExStoreGateExample/StoreGateExample_Gen_jobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5244 configurables from 43 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 460 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
-                                          running on lxplus023.cern.ch on Thu Mar 23 12:58:37 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Thu Jul 27 15:42:17 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -22,14 +23,12 @@ 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 2251 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2454 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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
-AthMasterSeq         INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq
-ClassIDSvc           INFO  getRegistryEntries: read 822 CLIDRegistry entries for module ALL
-AthAlgSeq            INFO Member list: WriteData, ReadData
+ClassIDSvc           INFO  getRegistryEntries: read 1166 CLIDRegistry entries for module ALL
 WriteData            INFO in initialize()
 StoreGateSvc        DEBUG Property update for OutputLevel : new value = 1
 StoreGateSvc        DEBUG Service base class initialized successfully
@@ -42,75 +41,82 @@ StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service EventPers
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
 ReadData             INFO in initialize()
 ReadData             INFO Data Object producer: WriteData
-HistogramPersis...WARNING Histograms saving not required.
+HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr       INFO Application Manager Started successfully
-ClassIDSvc           INFO  getRegistryEntries: read 359 CLIDRegistry entries for module ALL
-StoreGateSvc_Impl   DEBUG Recorded object @0x13d11480 with key  of type EventInfo(CLID 2101)
- in DataObject @0x13d41310
+ClassIDSvc           INFO  getRegistryEntries: read 374 CLIDRegistry entries for module ALL
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a6a1670 with key  of type EventInfo(CLID 2101)
+ in DataObject @0x56517a71ea80
+ object modifiable when retrieved
+StoreGateSvc_Impl   DEBUG Recorded object @s: 0  e: 0 with key EventContext of type EventContext(CLID 55596997)
+ in DataObject @0x56517a6e00f0
  object modifiable when retrieved
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 0 events processed so far  <<<===
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 WriteData            INFO in execute()
-StoreGateSvc_Impl   DEBUG Recorded object @0x10dc8320 with key  of type MyDataObj(CLID 8000)
- in DataObject @0x13d40910
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a6c5f60 with key  of type MyDataObj(CLID 8000)
+ in DataObject @0x56517a6e3780
  object not modifiable when retrieved
-WriteData         WARNING we expect  an error message here
-StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key  and clid 8000
- Pre-existing valid DataProxy @0x13d1ba40 found in Store for key  with clid 8000
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x10dc8c90
- recorded with key  of type MyDataObj (CLID 8000) in DataObject @0x13d409b0
-WriteData         WARNING end of error message
-StoreGateSvc_Impl   DEBUG Recorded object @0x10dc9010 with key WriteData of type MyDataObj(CLID 8000)
- in DataObject @0x13d40820
+WriteData         WARNING we expect  an error message here
+StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key  and clid 8000
+ Pre-existing valid DataProxy @0x56517a729f60 found in Store for key  with clid 8000
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x56517a608c90
+ recorded with key  of type MyDataObj (CLID 8000) in DataObject @0x56517a72a090
+WriteData         WARNING end of error message
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a713390 with key WriteData of type MyDataObj(CLID 8000)
+ in DataObject @0x56517a72a0e0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1304f0e0 with key  of type DataVector<MyContObj>(CLID 9967)
- in DataObject @0x13d1bb20
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a6f8a30 with key  of type DataVector<MyContObj>(CLID 9967)
+ in DataObject @0x56517a621290
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1358a4c0 with key  of type std::vector<float>(CLID 202242136)
- in DataObject @0x13d40af0
+StoreGateSvc_Impl   DEBUG Recorded object @0x5651783e4b10 with key  of type std::vector<float>(CLID 202242136)
+ in DataObject @0x5651783e4a70
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x13d03a40 with key  of type std::map<std::string,float>(CLID 193758082)
- in DataObject @0x13d407d0
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a708420 with key  of type std::map<std::string,float>(CLID 193758082)
+ in DataObject @0x56517a700ac0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x10dc8410 with key dobj2 of type MyDataObj(CLID 8000)
- in DataObject @0x13d40690
+StoreGateSvc_Impl   DEBUG Recorded object @0x5651783e4b70 with key dobj2 of type MyDataObj(CLID 8000)
+ in DataObject @0x56517a700e00
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1358aa20 with key WriteData of type std::list< ElementLink< std::vector<float> > >(CLID 9984)
- in DataObject @0x13d405f0
+StoreGateSvc_Impl   DEBUG Recorded object @0x5651783e4b90 with key WriteData of type std::list< ElementLink< std::vector<float> > >(CLID 9984)
+ in DataObject @0x56517902f3f0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1358a640 with key  of type std::vector< ElementLink<MapStringFloat> >(CLID 9983)
- in DataObject @0x13d404b0
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a700a50 with key  of type std::vector< ElementLink<MapStringFloat> >(CLID 9983)
+ in DataObject @0x56517902f640
  object not modifiable when retrieved
 WriteData            INFO  registered all data objects
 WriteData            INFO  StoreGate structure before returning from execute 
 <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
 SGImplSvc(StoreGateSvc_Impl)::dump():
 Found 2 proxies for ClassID 1434 (BaseClass): 
- flags: (  valid,   locked,  reset) --- data: 0x13d40910 --- key: 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d40820 --- key: WriteData
+ flags: (  valid,   locked,  reset) --- data: 0x56517a6e3780 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a72a0e0 --- key: WriteData
 Found 1 proxy for ClassID 2101 (EventInfo): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d41310 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a71ea80 --- key: 
 Found 3 proxies for ClassID 8000 (MyDataObj): 
- flags: (  valid,   locked,  reset) --- data: 0x13d40910 --- key: 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d40820 --- key: WriteData
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d40690 --- key: dobj2
+ flags: (  valid,   locked,  reset) --- data: 0x56517a6e3780 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a72a0e0 --- key: WriteData
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a700e00 --- key: dobj2
 Found 1 proxy for ClassID 9967 (DataVector<MyContObj>): 
- flags: (  valid,   locked,  reset) --- data: 0x13d1bb20 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x56517a621290 --- key: 
 Found 1 proxy for ClassID 9983 (std::vector< ElementLink<MapStringFloat> >): 
- flags: (  valid,   locked,  reset) --- data: 0x13d404b0 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x56517902f640 --- key: 
 Found 1 proxy for ClassID 9984 (std::list< ElementLink< std::vector<float> > >): 
- flags: (  valid,   locked,  reset) --- data: 0x13d405f0 --- key: WriteData
+ flags: (  valid,   locked,  reset) --- data: 0x56517902f3f0 --- key: WriteData
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a6e00f0 --- key: EventContext
 Found 1 proxy for ClassID 193758082 (std::map<std::string,float>): 
- flags: (  valid,   locked,  reset) --- data: 0x13d407d0 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x56517a700ac0 --- key: 
 Found 1 proxy for ClassID 202242136 (std::vector<float>): 
- flags: (  valid,   locked,  reset) --- data: 0x13d40af0 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x5651783e4a70 --- key: 
 <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
 
 ReadData             INFO in execute()
 ReadData             INFO Get the MyDataObj recorded by WriteData
 StoreGateSvc_Impl   DEBUG Retrieved non-const handle to object WriteData  of type MyDataObj(CLID 8000)
-ReadData          WARNING FIXME loop of ConstIterator bombs
+ReadData          WARNING FIXME loop of ConstIterator bombs
 StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
  of type DataVector<MyContObj>(CLID 9967)
 ReadData             INFO Retrieved DataVector of MyContObj using a const pointer
@@ -130,91 +136,101 @@ ReadData             INFO ListVecLinks::linked element 3
 StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
  of type std::vector< ElementLink<MapStringFloat> >(CLID 9983)
 ReadData             INFO Retrieved vector of links
-ReadData             INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x13cef9bc
-ReadData             INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x13cef9fc
+ReadData             INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x56517a71d43c
+ReadData             INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x56517a71d47c
 ReadData             INFO  retrieve as BaseClass, print its address: 
-ReadData             INFO 0x10dc8320
-ReadData             INFO 0x10dc9010
+ReadData             INFO 0x56517a6c5f60
+ReadData             INFO 0x56517a713390
 StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
  of type EventInfo(CLID 2101)
 ReadData             INFO  EventInfo :  event: 1 run: 1
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1ba40, recorded with key=, CLID=8000, containing data object @0x13d40910  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bab0, recorded with key=WriteData, CLID=8000, containing data object @0x13d40820  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1b810, recorded with key=, CLID=2101, containing data object @0x13d41310  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1ba40, recorded with key=, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bab0, recorded with key=WriteData, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bce0, recorded with key=dobj2, CLID=8000, containing data object @0x13d40690  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bb90, recorded with key=, CLID=9967, containing data object @0x13d1bb20  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bdc0, recorded with key=, CLID=9983, containing data object @0x13d404b0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bd50, recorded with key=WriteData, CLID=9984, containing data object @0x13d405f0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bc70, recorded with key=, CLID=193758082, containing data object @0x13d407d0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bc00, recorded with key=, CLID=202242136, containing data object @0x13d40af0  ... -> DONE
-StoreGateSvc_Impl   DEBUG Recorded object @0x13d10300 with key  of type EventInfo(CLID 2101)
- in DataObject @0x13d40af0
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a729f60, recorded with key=, CLID=8000, containing data object @0x56517a6e3780  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a6f8870, recorded with key=WriteData, CLID=8000, containing data object @0x56517a72a0e0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a716d90, recorded with key=, CLID=2101, containing data object @0x56517a71ea80  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a729f60, recorded with key=, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a6f8870, recorded with key=WriteData, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a6ef3a0, recorded with key=dobj2, CLID=8000, containing data object @0x56517a700e00  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x5651783e4880, recorded with key=, CLID=9967, containing data object @0x56517a621290  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a71d660, recorded with key=, CLID=9983, containing data object @0x56517902f640  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a71d210, recorded with key=WriteData, CLID=9984, containing data object @0x56517902f3f0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a609c10, recorded with key=EventContext, CLID=55596997, containing data object @0x56517a6e00f0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a700cb0, recorded with key=, CLID=193758082, containing data object @0x56517a700ac0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a708200, recorded with key=, CLID=202242136, containing data object @0x5651783e4a70  ... -> DONE
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a6a1670 with key  of type EventInfo(CLID 2101)
+ in DataObject @0x5651783e4a70
+ object modifiable when retrieved
+StoreGateSvc_Impl   DEBUG Recorded object @s: 0  e: 1 with key EventContext of type EventContext(CLID 55596997)
+ in DataObject @0x56517a700a70
  object modifiable when retrieved
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 1 events processed so far  <<<===
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 WriteData            INFO in execute()
-StoreGateSvc_Impl   DEBUG Recorded object @0x10dc8400 with key  of type MyDataObj(CLID 8000)
- in DataObject @0x13d401e0
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a716520 with key  of type MyDataObj(CLID 8000)
+ in DataObject @0x56517a708460
  object not modifiable when retrieved
-WriteData         WARNING we expect  an error message here
-StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key  and clid 8000
- Pre-existing valid DataProxy @0x13d1ba40 found in Store for key  with clid 8000
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x10dc8410
- recorded with key  of type MyDataObj (CLID 8000) in DataObject @0x13d40870
-WriteData         WARNING end of error message
-StoreGateSvc_Impl   DEBUG Recorded object @0x10dc9010 with key WriteData of type MyDataObj(CLID 8000)
- in DataObject @0x13d40960
+WriteData         WARNING we expect  an error message here
+StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key  and clid 8000
+ Pre-existing valid DataProxy @0x56517a729f60 found in Store for key  with clid 8000
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x56517a7146c0
+ recorded with key  of type MyDataObj (CLID 8000) in DataObject @0x56517a6e00f0
+WriteData         WARNING end of error message
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a72a180 with key WriteData of type MyDataObj(CLID 8000)
+ in DataObject @0x56517a60db40
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1304f0e0 with key  of type DataVector<MyContObj>(CLID 9967)
- in DataObject @0x13d1bb20
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a6f8a30 with key  of type DataVector<MyContObj>(CLID 9967)
+ in DataObject @0x56517a7539f0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x13917f20 with key  of type std::vector<float>(CLID 202242136)
- in DataObject @0x13d404b0
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a6eae90 with key  of type std::vector<float>(CLID 202242136)
+ in DataObject @0x56517902f3f0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x13d03680 with key  of type std::map<std::string,float>(CLID 193758082)
- in DataObject @0x13d41310
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a6f6bc0 with key  of type std::map<std::string,float>(CLID 193758082)
+ in DataObject @0x56517a72a0e0
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x10dc8c90 with key dobj2 of type MyDataObj(CLID 8000)
- in DataObject @0x13d40820
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a704820 with key dobj2 of type MyDataObj(CLID 8000)
+ in DataObject @0x56517a6e3780
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1358aba0 with key WriteData of type std::list< ElementLink< std::vector<float> > >(CLID 9984)
- in DataObject @0x13d40910
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a608c90 with key WriteData of type std::list< ElementLink< std::vector<float> > >(CLID 9984)
+ in DataObject @0x56517a72a090
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1391c180 with key  of type std::vector< ElementLink<MapStringFloat> >(CLID 9983)
- in DataObject @0x13d409b0
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a722e30 with key  of type std::vector< ElementLink<MapStringFloat> >(CLID 9983)
+ in DataObject @0x56517a6c6e90
  object not modifiable when retrieved
 WriteData            INFO  registered all data objects
 WriteData            INFO  StoreGate structure before returning from execute 
 <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
 SGImplSvc(StoreGateSvc_Impl)::dump():
 Found 2 proxies for ClassID 1434 (BaseClass): 
- flags: (  valid,   locked,  reset) --- data: 0x13d401e0 --- key: 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d40960 --- key: WriteData
+ flags: (  valid,   locked,  reset) --- data: 0x56517a708460 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a60db40 --- key: WriteData
 Found 1 proxy for ClassID 2101 (EventInfo): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d40af0 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x5651783e4a70 --- key: 
 Found 3 proxies for ClassID 8000 (MyDataObj): 
- flags: (  valid,   locked,  reset) --- data: 0x13d401e0 --- key: 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d40960 --- key: WriteData
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d40820 --- key: dobj2
+ flags: (  valid,   locked,  reset) --- data: 0x56517a708460 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a60db40 --- key: WriteData
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a6e3780 --- key: dobj2
 Found 1 proxy for ClassID 9967 (DataVector<MyContObj>): 
- flags: (  valid,   locked,  reset) --- data: 0x13d1bb20 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x56517a7539f0 --- key: 
 Found 1 proxy for ClassID 9983 (std::vector< ElementLink<MapStringFloat> >): 
- flags: (  valid,   locked,  reset) --- data: 0x13d409b0 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x56517a6c6e90 --- key: 
 Found 1 proxy for ClassID 9984 (std::list< ElementLink< std::vector<float> > >): 
- flags: (  valid,   locked,  reset) --- data: 0x13d40910 --- key: WriteData
+ flags: (  valid,   locked,  reset) --- data: 0x56517a72a090 --- key: WriteData
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a700a70 --- key: EventContext
 Found 1 proxy for ClassID 193758082 (std::map<std::string,float>): 
- flags: (  valid,   locked,  reset) --- data: 0x13d41310 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x56517a72a0e0 --- key: 
 Found 1 proxy for ClassID 202242136 (std::vector<float>): 
- flags: (  valid,   locked,  reset) --- data: 0x13d404b0 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x56517902f3f0 --- key: 
 <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
 
 ReadData             INFO in execute()
 ReadData             INFO Get the MyDataObj recorded by WriteData
 StoreGateSvc_Impl   DEBUG Retrieved non-const handle to object WriteData  of type MyDataObj(CLID 8000)
-ReadData          WARNING FIXME loop of ConstIterator bombs
+ReadData          WARNING FIXME loop of ConstIterator bombs
 StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
  of type DataVector<MyContObj>(CLID 9967)
 ReadData             INFO Retrieved DataVector of MyContObj using a const pointer
@@ -234,91 +250,101 @@ ReadData             INFO ListVecLinks::linked element 3
 StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
  of type std::vector< ElementLink<MapStringFloat> >(CLID 9983)
 ReadData             INFO Retrieved vector of links
-ReadData             INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x13d16c3c
-ReadData             INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x13d16c7c
+ReadData             INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x56517a6c6ddc
+ReadData             INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x56517a6c6e1c
 ReadData             INFO  retrieve as BaseClass, print its address: 
-ReadData             INFO 0x10dc8400
-ReadData             INFO 0x10dc9010
+ReadData             INFO 0x56517a716520
+ReadData             INFO 0x56517a72a180
 StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
  of type EventInfo(CLID 2101)
 ReadData             INFO  EventInfo :  event: 2 run: 1
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 2 events processed so far  <<<===
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1ba40, recorded with key=, CLID=8000, containing data object @0x13d401e0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bab0, recorded with key=WriteData, CLID=8000, containing data object @0x13d40960  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1b810, recorded with key=, CLID=2101, containing data object @0x13d40af0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1ba40, recorded with key=, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bab0, recorded with key=WriteData, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bce0, recorded with key=dobj2, CLID=8000, containing data object @0x13d40820  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bb90, recorded with key=, CLID=9967, containing data object @0x13d1bb20  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bdc0, recorded with key=, CLID=9983, containing data object @0x13d409b0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bd50, recorded with key=WriteData, CLID=9984, containing data object @0x13d40910  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bc70, recorded with key=, CLID=193758082, containing data object @0x13d41310  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bc00, recorded with key=, CLID=202242136, containing data object @0x13d404b0  ... -> DONE
-StoreGateSvc_Impl   DEBUG Recorded object @0x13d11480 with key  of type EventInfo(CLID 2101)
- in DataObject @0x13d404b0
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a729f60, recorded with key=, CLID=8000, containing data object @0x56517a708460  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a6f8870, recorded with key=WriteData, CLID=8000, containing data object @0x56517a60db40  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a716d90, recorded with key=, CLID=2101, containing data object @0x5651783e4a70  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a729f60, recorded with key=, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a6f8870, recorded with key=WriteData, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a6ef3a0, recorded with key=dobj2, CLID=8000, containing data object @0x56517a6e3780  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x5651783e4880, recorded with key=, CLID=9967, containing data object @0x56517a7539f0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a71d660, recorded with key=, CLID=9983, containing data object @0x56517a6c6e90  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a71d210, recorded with key=WriteData, CLID=9984, containing data object @0x56517a72a090  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a609c10, recorded with key=EventContext, CLID=55596997, containing data object @0x56517a700a70  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a700cb0, recorded with key=, CLID=193758082, containing data object @0x56517a72a0e0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a708200, recorded with key=, CLID=202242136, containing data object @0x56517902f3f0  ... -> DONE
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a6a1670 with key  of type EventInfo(CLID 2101)
+ in DataObject @0x56517902f3f0
+ object modifiable when retrieved
+StoreGateSvc_Impl   DEBUG Recorded object @s: 0  e: 2 with key EventContext of type EventContext(CLID 55596997)
+ in DataObject @0x56517a71ea80
  object modifiable when retrieved
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #3, run #1 2 events processed so far  <<<===
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 WriteData            INFO in execute()
-StoreGateSvc_Impl   DEBUG Recorded object @0x10dc8320 with key  of type MyDataObj(CLID 8000)
- in DataObject @0x13d405a0
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a70a9e0 with key  of type MyDataObj(CLID 8000)
+ in DataObject @0x56517902f640
  object not modifiable when retrieved
-WriteData         WARNING we expect  an error message here
-StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key  and clid 8000
- Pre-existing valid DataProxy @0x13d1ba40 found in Store for key  with clid 8000
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x10dc8c90
- recorded with key  of type MyDataObj (CLID 8000) in DataObject @0x13d40690
-WriteData         WARNING end of error message
-StoreGateSvc_Impl   DEBUG Recorded object @0x10dc9010 with key WriteData of type MyDataObj(CLID 8000)
- in DataObject @0x13d40be0
+WriteData         WARNING we expect  an error message here
+StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key  and clid 8000
+ Pre-existing valid DataProxy @0x56517a729f60 found in Store for key  with clid 8000
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x56517a709d30
+ recorded with key  of type MyDataObj (CLID 8000) in DataObject @0x56517a700a70
+WriteData         WARNING end of error message
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517902f440 with key WriteData of type MyDataObj(CLID 8000)
+ in DataObject @0x56517a700ac0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1304f0e0 with key  of type DataVector<MyContObj>(CLID 9967)
- in DataObject @0x13d1bb20
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a6f8a30 with key  of type DataVector<MyContObj>(CLID 9967)
+ in DataObject @0x56517a621290
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1391c440 with key  of type std::vector<float>(CLID 202242136)
- in DataObject @0x13d409b0
+StoreGateSvc_Impl   DEBUG Recorded object @0x5651783e4b10 with key  of type std::vector<float>(CLID 202242136)
+ in DataObject @0x56517a72a090
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x13d03ce0 with key  of type std::map<std::string,float>(CLID 193758082)
- in DataObject @0x13d40af0
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a708420 with key  of type std::map<std::string,float>(CLID 193758082)
+ in DataObject @0x5651783e4a70
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x10dc8410 with key dobj2 of type MyDataObj(CLID 8000)
- in DataObject @0x13d40960
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a704840 with key dobj2 of type MyDataObj(CLID 8000)
+ in DataObject @0x56517a60db40
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1358a020 with key WriteData of type std::list< ElementLink< std::vector<float> > >(CLID 9984)
- in DataObject @0x13d401e0
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a6c6e30 with key WriteData of type std::list< ElementLink< std::vector<float> > >(CLID 9984)
+ in DataObject @0x56517a708460
  object not modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1358a2c0 with key  of type std::vector< ElementLink<MapStringFloat> >(CLID 9983)
- in DataObject @0x13d40870
+StoreGateSvc_Impl   DEBUG Recorded object @0x56517a7539d0 with key  of type std::vector< ElementLink<MapStringFloat> >(CLID 9983)
+ in DataObject @0x56517a6e00f0
  object not modifiable when retrieved
 WriteData            INFO  registered all data objects
 WriteData            INFO  StoreGate structure before returning from execute 
 <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
 SGImplSvc(StoreGateSvc_Impl)::dump():
 Found 2 proxies for ClassID 1434 (BaseClass): 
- flags: (  valid,   locked,  reset) --- data: 0x13d405a0 --- key: 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d40be0 --- key: WriteData
+ flags: (  valid,   locked,  reset) --- data: 0x56517902f640 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a700ac0 --- key: WriteData
 Found 1 proxy for ClassID 2101 (EventInfo): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d404b0 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517902f3f0 --- key: 
 Found 3 proxies for ClassID 8000 (MyDataObj): 
- flags: (  valid,   locked,  reset) --- data: 0x13d405a0 --- key: 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d40be0 --- key: WriteData
- flags: (  valid, UNLOCKED,  reset) --- data: 0x13d40960 --- key: dobj2
+ flags: (  valid,   locked,  reset) --- data: 0x56517902f640 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a700ac0 --- key: WriteData
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a60db40 --- key: dobj2
 Found 1 proxy for ClassID 9967 (DataVector<MyContObj>): 
- flags: (  valid,   locked,  reset) --- data: 0x13d1bb20 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x56517a621290 --- key: 
 Found 1 proxy for ClassID 9983 (std::vector< ElementLink<MapStringFloat> >): 
- flags: (  valid,   locked,  reset) --- data: 0x13d40870 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x56517a6e00f0 --- key: 
 Found 1 proxy for ClassID 9984 (std::list< ElementLink< std::vector<float> > >): 
- flags: (  valid,   locked,  reset) --- data: 0x13d401e0 --- key: WriteData
+ flags: (  valid,   locked,  reset) --- data: 0x56517a708460 --- key: WriteData
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x56517a71ea80 --- key: EventContext
 Found 1 proxy for ClassID 193758082 (std::map<std::string,float>): 
- flags: (  valid,   locked,  reset) --- data: 0x13d40af0 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x5651783e4a70 --- key: 
 Found 1 proxy for ClassID 202242136 (std::vector<float>): 
- flags: (  valid,   locked,  reset) --- data: 0x13d409b0 --- key: 
+ flags: (  valid,   locked,  reset) --- data: 0x56517a72a090 --- key: 
 <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
 
 ReadData             INFO in execute()
 ReadData             INFO Get the MyDataObj recorded by WriteData
 StoreGateSvc_Impl   DEBUG Retrieved non-const handle to object WriteData  of type MyDataObj(CLID 8000)
-ReadData          WARNING FIXME loop of ConstIterator bombs
+ReadData          WARNING FIXME loop of ConstIterator bombs
 StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
  of type DataVector<MyContObj>(CLID 9967)
 ReadData             INFO Retrieved DataVector of MyContObj using a const pointer
@@ -338,56 +364,58 @@ ReadData             INFO ListVecLinks::linked element 3
 StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
  of type std::vector< ElementLink<MapStringFloat> >(CLID 9983)
 ReadData             INFO Retrieved vector of links
-ReadData             INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x13cef9bc
-ReadData             INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x13cef9fc
+ReadData             INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x56517a6c6ddc
+ReadData             INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x56517a6c6e1c
 ReadData             INFO  retrieve as BaseClass, print its address: 
-ReadData             INFO 0x10dc8320
-ReadData             INFO 0x10dc9010
+ReadData             INFO 0x56517a70a9e0
+ReadData             INFO 0x56517902f440
 StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
  of type EventInfo(CLID 2101)
 ReadData             INFO  EventInfo :  event: 3 run: 1
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 3 events processed so far  <<<===
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1ba40, recorded with key=, CLID=8000, containing data object @0x13d405a0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bab0, recorded with key=WriteData, CLID=8000, containing data object @0x13d40be0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1b810, recorded with key=, CLID=2101, containing data object @0x13d404b0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1ba40, recorded with key=, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bab0, recorded with key=WriteData, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bce0, recorded with key=dobj2, CLID=8000, containing data object @0x13d40960  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bb90, recorded with key=, CLID=9967, containing data object @0x13d1bb20  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bdc0, recorded with key=, CLID=9983, containing data object @0x13d40870  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bd50, recorded with key=WriteData, CLID=9984, containing data object @0x13d401e0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bc70, recorded with key=, CLID=193758082, containing data object @0x13d40af0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x13d1bc00, recorded with key=, CLID=202242136, containing data object @0x13d409b0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a729f60, recorded with key=, CLID=8000, containing data object @0x56517902f640  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a6f8870, recorded with key=WriteData, CLID=8000, containing data object @0x56517a700ac0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a716d90, recorded with key=, CLID=2101, containing data object @0x56517902f3f0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a729f60, recorded with key=, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a6f8870, recorded with key=WriteData, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a6ef3a0, recorded with key=dobj2, CLID=8000, containing data object @0x56517a60db40  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x5651783e4880, recorded with key=, CLID=9967, containing data object @0x56517a621290  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a71d660, recorded with key=, CLID=9983, containing data object @0x56517a6e00f0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a71d210, recorded with key=WriteData, CLID=9984, containing data object @0x56517a708460  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a609c10, recorded with key=EventContext, CLID=55596997, containing data object @0x56517a71ea80  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a700cb0, recorded with key=, CLID=193758082, containing data object @0x5651783e4a70  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x56517a708200, recorded with key=, CLID=202242136, containing data object @0x56517a72a090  ... -> DONE
 StoreGateSvc      VERBOSE Stop StoreGateSvc
 StoreGateSvc      VERBOSE stop: setting service priority to 101 so that event stores get finalized and cleared before other stores
 ApplicationMgr       INFO Application Manager Stopped successfully
+IncidentProcAlg1     INFO Finalize
 WriteData            INFO in finalize()
 ReadData             INFO in finalize()
-AthAlgSeq            INFO Finalizing AthAlgSeq...
-AthOutSeq            INFO Finalizing AthOutSeq...
-AthRegSeq            INFO Finalizing AthRegSeq...
-AthMasterSeq         INFO Finalizing AthMasterSeq...
+IncidentProcAlg2     INFO Finalize
 StoreGateSvc      VERBOSE Finalizing StoreGateSvc - package version StoreGate-00-00-00
 StoreGateSvc_Impl VERBOSE Finalizing StoreGateSvc_Impl - package version StoreGate-00-00-00
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1ba40, recorded with key=, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1bab0, recorded with key=WriteData, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1b810, recorded with key=, CLID=2101, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1ba40, recorded with key=, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1bab0, recorded with key=WriteData, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1bce0, recorded with key=dobj2, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1bb90, recorded with key=, CLID=9967, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1bdc0, recorded with key=, CLID=9983, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1bd50, recorded with key=WriteData, CLID=9984, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1bc70, recorded with key=, CLID=193758082, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x13d1bc00, recorded with key=, CLID=202242136, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a729f60, recorded with key=, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a6f8870, recorded with key=WriteData, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a716d90, recorded with key=, CLID=2101, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a729f60, recorded with key=, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a6f8870, recorded with key=WriteData, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a6ef3a0, recorded with key=dobj2, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x5651783e4880, recorded with key=, CLID=9967, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a71d660, recorded with key=, CLID=9983, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a71d210, recorded with key=WriteData, CLID=9984, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a609c10, recorded with key=EventContext, CLID=55596997, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a700cb0, recorded with key=, CLID=193758082, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x56517a708200, recorded with key=, CLID=202242136, containing data object @0  ... -> DONE
 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=  470 [ms]                                             #=  1
+ChronoStatSvc        INFO Time User   : Tot=  270 [ms]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/AtlasTest/ControlTest/share/StoreGateReentrant.ref b/AtlasTest/ControlTest/share/StoreGateReentrant.ref
index 45b371388cb63667bdd84a9d7f808e00f319cef0..8b2d7ebf9390cab01e926f6d7046751ab3913ce8 100644
--- a/AtlasTest/ControlTest/share/StoreGateReentrant.ref
+++ b/AtlasTest/ControlTest/share/StoreGateReentrant.ref
@@ -1,20 +1,21 @@
-Mon Mar 20 10:19:28 CET 2017
-Preloading tcmalloc_minimal.so
+Thu Jul 27 15:51:23 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-opt] [private/private] -- built on [2017-03-20 09:21]
+Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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 "AthExStoreGateExample/StoreGateExample_Reentrant_jobOptions.py"
-Py:ConfigurableDb    INFO Read module info for 5250 configurables from 40 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 460 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
-                                          running on lxplus090.cern.ch on Mon Mar 20 10:19:42 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Thu Jul 27 15:51:26 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -22,14 +23,12 @@ 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 2251 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2454 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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
-AthMasterSeq         INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq
-ClassIDSvc           INFO  getRegistryEntries: read 768 CLIDRegistry entries for module ALL
-AthAlgSeq            INFO Member list: WriteDataReentrant, ReadDataReentrant
+ClassIDSvc           INFO  getRegistryEntries: read 1166 CLIDRegistry entries for module ALL
 WriteDataReentrant   INFO in initialize()
 StoreGateSvc        DEBUG Property update for OutputLevel : new value = 1
 StoreGateSvc        DEBUG Service base class initialized successfully
@@ -40,49 +39,59 @@ 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
-ClassIDSvc           INFO  getRegistryEntries: read 359 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 374 CLIDRegistry entries for module ALL
 ReadDataReentrant    INFO in initialize()
-HistogramPersis...WARNING Histograms saving not required.
+HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr       INFO Application Manager Started successfully
+StoreGateSvc_Impl   DEBUG Recorded object @0x55e8ba24dde0 with key  of type EventInfo(CLID 2101)
+ in DataObject @0x55e8ba2447d0
+ object modifiable when retrieved
+StoreGateSvc_Impl   DEBUG Recorded object @s: 0  e: 0 with key EventContext of type EventContext(CLID 55596997)
+ in DataObject @0x55e8ba24a6b0
+ object modifiable when retrieved
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #1 0 events processed so far  <<<===
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 WriteDataReentrant   INFO in execute()
-WriteDataReentrantWARNING we expect  an error message here
-StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key dobj and clid 8000
- Pre-existing valid DataProxy @0x153ac310 found in Store for key dobj with clid 8000
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x12446920
- recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x15395860
+WriteDataReentrantWARNING we expect  an error message here
+StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key dobj and clid 8000
+ Pre-existing valid DataProxy @0x55e8ba26b330 found in Store for key dobj with clid 8000
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x55e8ba254170
+ recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x55e8ba22b740
 VarHandle(Store...  ERROR FILE:LINE (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
-WriteDataReentrantWARNING end of error message
+WriteDataReentrantWARNING end of error message
 WriteDataReentrant   INFO  registered all data objects
 WriteDataReentrant   INFO  StoreGate structure before returning from execute 
 <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
 SGImplSvc(StoreGateSvc_Impl)::dump():
 Found 2 proxies for ClassID 1434 (BaseClass): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153956d0 --- key: WriteDataReentrant
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153957c0 --- key: dobj
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8b9fc0210 --- key: WriteDataReentrant
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba2295f0 --- key: dobj
 Found 1 proxy for ClassID 2101 (EventInfo): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153961c0 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba2447d0 --- key: 
 Found 6 proxies for ClassID 8000 (MyDataObj): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153956d0 --- key: WriteDataReentrant
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153957c0 --- key: dobj
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15394d70 --- key: dobj2
- flags: (  valid,   locked,  reset) --- data: 0x15395810 --- key: x1
- flags: (  valid,   locked,  reset) --- data: 0x15395680 --- key: x2
- flags: (  valid,   locked,  reset) --- data: 0x15395540 --- key: x3
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8b9fc0210 --- key: WriteDataReentrant
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba2295f0 --- key: dobj
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba26bb90 --- key: dobj2
+ flags: (  valid,   locked,  reset) --- data: 0x55e8b9fc0be0 --- key: x1
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba23b050 --- key: x2
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba250920 --- key: x3
 Found 1 proxy for ClassID 9967 (DataVector<MyContObj>): 
- flags: (  valid,   locked,  reset) --- data: 0x153ac5b0 --- key: cobj
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba22b8d0 --- key: cobj
 Found 1 proxy for ClassID 9983 (std::vector< ElementLink<MapStringFloat> >): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153960d0 --- key: linkvec
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba2449a0 --- key: linkvec
 Found 1 proxy for ClassID 9984 (std::list< ElementLink< std::vector<float> > >): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15396170 --- key: WriteDataReentrant
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba25b540 --- key: WriteDataReentrant
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba24a6b0 --- key: EventContext
 Found 1 proxy for ClassID 193758082 (std::map<std::string,float>): 
- flags: (  valid,   locked,  reset) --- data: 0x153952c0 --- key: mkey
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba26b6f0 --- key: mkey
 Found 1 proxy for ClassID 202242136 (std::vector<float>): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395360 --- key: vFloat
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba25d090 --- key: vFloat
 Found 1 proxy for ClassID 289238765 (TestDataObject): 
- flags: (  valid,   locked,  reset) --- data: 0x153959a0 --- key: testobj
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba2453d0 --- key: testobj
 <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
 
 ReadDataReentrant    INFO in execute()
@@ -93,62 +102,75 @@ ReadDataReentrant    INFO pVec [1] = 2
 ReadDataReentrant    INFO pVec [2] = 3
 ReadDataReentrant    INFO ListVecLinks::linked element 1
 ReadDataReentrant    INFO ListVecLinks::linked element 3
-ReadDataReentrant    INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x153770bc
-ReadDataReentrant    INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x153770fc
+ReadDataReentrant    INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x55e8ba244dcc
+ReadDataReentrant    INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x55e8ba244e0c
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac380, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x153956d0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac310, recorded with key=dobj, CLID=8000, containing data object @0x153957c0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac0e0, recorded with key=, CLID=2101, containing data object @0x153961c0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac380, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac310, recorded with key=dobj, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac770, recorded with key=dobj2, CLID=8000, containing data object @0x15394d70  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac460, recorded with key=x1, CLID=8000, containing data object @0x15395810  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac4d0, recorded with key=x2, CLID=8000, containing data object @0x15395680  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac540, recorded with key=x3, CLID=8000, containing data object @0x15395540  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac620, recorded with key=cobj, CLID=9967, containing data object @0x153ac5b0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac850, recorded with key=linkvec, CLID=9983, containing data object @0x153960d0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac7e0, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x15396170  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac700, recorded with key=mkey, CLID=193758082, containing data object @0x153952c0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac690, recorded with key=vFloat, CLID=202242136, containing data object @0x15395360  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac3f0, recorded with key=testobj, CLID=289238765, containing data object @0x153959a0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2452a0, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x55e8b9fc0210  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba26b330, recorded with key=dobj, CLID=8000, containing data object @0x55e8ba2295f0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba268df0, recorded with key=, CLID=2101, containing data object @0x55e8ba2447d0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2452a0, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba26b330, recorded with key=dobj, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba25b320, recorded with key=dobj2, CLID=8000, containing data object @0x55e8ba26bb90  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8b9fc0d70, recorded with key=x1, CLID=8000, containing data object @0x55e8b9fc0be0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba23b270, recorded with key=x2, CLID=8000, containing data object @0x55e8ba23b050  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba250ab0, recorded with key=x3, CLID=8000, containing data object @0x55e8ba250920  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2505d0, recorded with key=cobj, CLID=9967, containing data object @0x55e8ba22b8d0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba244b30, recorded with key=linkvec, CLID=9983, containing data object @0x55e8ba2449a0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba25b740, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x55e8ba25b540  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2340e0, recorded with key=EventContext, CLID=55596997, containing data object @0x55e8ba24a6b0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba26b880, recorded with key=mkey, CLID=193758082, containing data object @0x55e8ba26b6f0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba25d220, recorded with key=vFloat, CLID=202242136, containing data object @0x55e8ba25d090  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba245470, recorded with key=testobj, CLID=289238765, containing data object @0x55e8ba2453d0  ... -> DONE
+StoreGateSvc_Impl   DEBUG Recorded object @0x55e8ba257870 with key  of type EventInfo(CLID 2101)
+ in DataObject @0x55e8ba2453d0
+ object modifiable when retrieved
+StoreGateSvc_Impl   DEBUG Recorded object @s: 0  e: 1 with key EventContext of type EventContext(CLID 55596997)
+ in DataObject @0x55e8ba26b6f0
+ object modifiable when retrieved
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #2, run #1 1 events processed so far  <<<===
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 WriteDataReentrant   INFO in execute()
-WriteDataReentrantWARNING we expect  an error message here
-StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key dobj and clid 8000
- Pre-existing valid DataProxy @0x153ac310 found in Store for key dobj with clid 8000
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x12446360
- recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x153952c0
+WriteDataReentrantWARNING we expect  an error message here
+StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key dobj and clid 8000
+ Pre-existing valid DataProxy @0x55e8ba26b330 found in Store for key dobj with clid 8000
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x55e8ba25b520
+ recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x55e8ba26baf0
 VarHandle(Store...  ERROR FILE:LINE (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
-WriteDataReentrantWARNING end of error message
+WriteDataReentrantWARNING end of error message
 WriteDataReentrant   INFO  registered all data objects
 WriteDataReentrant   INFO  StoreGate structure before returning from execute 
 <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
 SGImplSvc(StoreGateSvc_Impl)::dump():
 Found 2 proxies for ClassID 1434 (BaseClass): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395090 --- key: WriteDataReentrant
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395f40 --- key: dobj
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba24a6b0 --- key: WriteDataReentrant
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba26bb40 --- key: dobj
 Found 1 proxy for ClassID 2101 (EventInfo): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153959a0 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba2453d0 --- key: 
 Found 6 proxies for ClassID 8000 (MyDataObj): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395090 --- key: WriteDataReentrant
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395f40 --- key: dobj
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153957c0 --- key: dobj2
- flags: (  valid,   locked,  reset) --- data: 0x15396170 --- key: x1
- flags: (  valid,   locked,  reset) --- data: 0x153960d0 --- key: x2
- flags: (  valid,   locked,  reset) --- data: 0x15395220 --- key: x3
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba24a6b0 --- key: WriteDataReentrant
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba26bb40 --- key: dobj
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba2295f0 --- key: dobj2
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba25b540 --- key: x1
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba2449a0 --- key: x2
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba250920 --- key: x3
 Found 1 proxy for ClassID 9967 (DataVector<MyContObj>): 
- flags: (  valid,   locked,  reset) --- data: 0x153ac5b0 --- key: cobj
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba25c930 --- key: cobj
 Found 1 proxy for ClassID 9983 (std::vector< ElementLink<MapStringFloat> >): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395860 --- key: linkvec
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba22b740 --- key: linkvec
 Found 1 proxy for ClassID 9984 (std::list< ElementLink< std::vector<float> > >): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153956d0 --- key: WriteDataReentrant
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8b9fc0210 --- key: WriteDataReentrant
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba26b6f0 --- key: EventContext
 Found 1 proxy for ClassID 193758082 (std::map<std::string,float>): 
- flags: (  valid,   locked,  reset) --- data: 0x15395810 --- key: mkey
+ flags: (  valid,   locked,  reset) --- data: 0x55e8b9fc0be0 --- key: mkey
 Found 1 proxy for ClassID 202242136 (std::vector<float>): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395680 --- key: vFloat
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba23b050 --- key: vFloat
 Found 1 proxy for ClassID 289238765 (TestDataObject): 
- flags: (  valid,   locked,  reset) --- data: 0x153950e0 --- key: testobj
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba254b40 --- key: testobj
 <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
 
 ReadDataReentrant    INFO in execute()
@@ -159,62 +181,75 @@ ReadDataReentrant    INFO pVec [1] = 2
 ReadDataReentrant    INFO pVec [2] = 3
 ReadDataReentrant    INFO ListVecLinks::linked element 1
 ReadDataReentrant    INFO ListVecLinks::linked element 3
-ReadDataReentrant    INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x15377ebc
-ReadDataReentrant    INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x15377efc
+ReadDataReentrant    INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x55e8ba2408bc
+ReadDataReentrant    INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x55e8ba2408fc
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #1 2 events processed so far  <<<===
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac380, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x15395090  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac310, recorded with key=dobj, CLID=8000, containing data object @0x15395f40  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac0e0, recorded with key=, CLID=2101, containing data object @0x153959a0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac380, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac310, recorded with key=dobj, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac770, recorded with key=dobj2, CLID=8000, containing data object @0x153957c0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac460, recorded with key=x1, CLID=8000, containing data object @0x15396170  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac4d0, recorded with key=x2, CLID=8000, containing data object @0x153960d0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac540, recorded with key=x3, CLID=8000, containing data object @0x15395220  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac620, recorded with key=cobj, CLID=9967, containing data object @0x153ac5b0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac850, recorded with key=linkvec, CLID=9983, containing data object @0x15395860  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac7e0, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x153956d0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac700, recorded with key=mkey, CLID=193758082, containing data object @0x15395810  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac690, recorded with key=vFloat, CLID=202242136, containing data object @0x15395680  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac3f0, recorded with key=testobj, CLID=289238765, containing data object @0x153950e0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2452a0, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x55e8ba24a6b0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba26b330, recorded with key=dobj, CLID=8000, containing data object @0x55e8ba26bb40  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba268df0, recorded with key=, CLID=2101, containing data object @0x55e8ba2453d0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2452a0, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba26b330, recorded with key=dobj, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba25b320, recorded with key=dobj2, CLID=8000, containing data object @0x55e8ba2295f0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8b9fc0d70, recorded with key=x1, CLID=8000, containing data object @0x55e8ba25b540  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba23b270, recorded with key=x2, CLID=8000, containing data object @0x55e8ba2449a0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba250ab0, recorded with key=x3, CLID=8000, containing data object @0x55e8ba250920  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2505d0, recorded with key=cobj, CLID=9967, containing data object @0x55e8ba25c930  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba244b30, recorded with key=linkvec, CLID=9983, containing data object @0x55e8ba22b740  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba25b740, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x55e8b9fc0210  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2340e0, recorded with key=EventContext, CLID=55596997, containing data object @0x55e8ba26b6f0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba26b880, recorded with key=mkey, CLID=193758082, containing data object @0x55e8b9fc0be0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba25d220, recorded with key=vFloat, CLID=202242136, containing data object @0x55e8ba23b050  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba245470, recorded with key=testobj, CLID=289238765, containing data object @0x55e8ba254b40  ... -> DONE
+StoreGateSvc_Impl   DEBUG Recorded object @0x55e8ba257870 with key  of type EventInfo(CLID 2101)
+ in DataObject @0x55e8ba254b40
+ object modifiable when retrieved
+StoreGateSvc_Impl   DEBUG Recorded object @s: 0  e: 2 with key EventContext of type EventContext(CLID 55596997)
+ in DataObject @0x55e8b9fc0be0
+ object modifiable when retrieved
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #3, run #1 2 events processed so far  <<<===
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 WriteDataReentrant   INFO in execute()
-WriteDataReentrantWARNING we expect  an error message here
-StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key dobj and clid 8000
- Pre-existing valid DataProxy @0x153ac310 found in Store for key dobj with clid 8000
-StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x12446140
- recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x15395810
+WriteDataReentrantWARNING we expect  an error message here
+StoreGateSvc_Impl WARNING  setupProxy:: error setting up proxy for key dobj and clid 8000
+ Pre-existing valid DataProxy @0x55e8ba26b330 found in Store for key dobj with clid 8000
+StoreGateSvc_Impl WARNING record_impl: Problem setting up the proxy for object @0x55e8ba240c60
+ recorded with key dobj of type MyDataObj (CLID 8000) in DataObject @0x55e8ba26bb90
 VarHandle(Store...  ERROR FILE:LINE (StatusCode SG::VarHandleBase::record_impl(std::unique_ptr<DataObject>, void*, bool, bool)): code 0: recordObject failed
-WriteDataReentrantWARNING end of error message
+WriteDataReentrantWARNING end of error message
 WriteDataReentrant   INFO  registered all data objects
 WriteDataReentrant   INFO  StoreGate structure before returning from execute 
 <<<<<<<<<<<<<<<<< Data Store Dump >>>>>>>>>>>>>>> 
 SGImplSvc(StoreGateSvc_Impl)::dump():
 Found 2 proxies for ClassID 1434 (BaseClass): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153961c0 --- key: WriteDataReentrant
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395450 --- key: dobj
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba26b6f0 --- key: WriteDataReentrant
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba2447d0 --- key: dobj
 Found 1 proxy for ClassID 2101 (EventInfo): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153950e0 --- key: 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba254b40 --- key: 
 Found 6 proxies for ClassID 8000 (MyDataObj): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153961c0 --- key: WriteDataReentrant
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395450 --- key: dobj
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395f40 --- key: dobj2
- flags: (  valid,   locked,  reset) --- data: 0x153956d0 --- key: x1
- flags: (  valid,   locked,  reset) --- data: 0x15395860 --- key: x2
- flags: (  valid,   locked,  reset) --- data: 0x15395540 --- key: x3
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba26b6f0 --- key: WriteDataReentrant
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba2447d0 --- key: dobj
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba26bb40 --- key: dobj2
+ flags: (  valid,   locked,  reset) --- data: 0x55e8b9fc0210 --- key: x1
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba22b740 --- key: x2
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba250920 --- key: x3
 Found 1 proxy for ClassID 9967 (DataVector<MyContObj>): 
- flags: (  valid,   locked,  reset) --- data: 0x153ac5b0 --- key: cobj
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba22bca0 --- key: cobj
 Found 1 proxy for ClassID 9983 (std::vector< ElementLink<MapStringFloat> >): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153952c0 --- key: linkvec
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba20b670 --- key: linkvec
 Found 1 proxy for ClassID 9984 (std::list< ElementLink< std::vector<float> > >): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x15395090 --- key: WriteDataReentrant
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba24a6b0 --- key: WriteDataReentrant
+Found 1 proxy for ClassID 55596997 (EventContext): 
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8b9fc0be0 --- key: EventContext
 Found 1 proxy for ClassID 193758082 (std::map<std::string,float>): 
- flags: (  valid,   locked,  reset) --- data: 0x15396170 --- key: mkey
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba25b540 --- key: mkey
 Found 1 proxy for ClassID 202242136 (std::vector<float>): 
- flags: (  valid, UNLOCKED,  reset) --- data: 0x153960d0 --- key: vFloat
+ flags: (  valid, UNLOCKED,  reset) --- data: 0x55e8ba2449a0 --- key: vFloat
 Found 1 proxy for ClassID 289238765 (TestDataObject): 
- flags: (  valid,   locked,  reset) --- data: 0x15394d70 --- key: testobj
+ flags: (  valid,   locked,  reset) --- data: 0x55e8ba25d090 --- key: testobj
 <<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> 
 
 ReadDataReentrant    INFO in execute()
@@ -225,58 +260,60 @@ ReadDataReentrant    INFO pVec [1] = 2
 ReadDataReentrant    INFO pVec [2] = 3
 ReadDataReentrant    INFO ListVecLinks::linked element 1
 ReadDataReentrant    INFO ListVecLinks::linked element 3
-ReadDataReentrant    INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x153770bc
-ReadDataReentrant    INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x153770fc
+ReadDataReentrant    INFO VectorMapLinks::linked element: key uno - value 1 - stored as 0x55e8ba20b81c
+ReadDataReentrant    INFO VectorMapLinks::linked element: key due - value 2 - stored as 0x55e8ba20b85c
+StoreGateSvc_Impl   DEBUG retrieve(default): Retrieved const handle to default object 
+ of type EventInfo(CLID 2101)
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #1 3 events processed so far  <<<===
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=0
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac380, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x153961c0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac310, recorded with key=dobj, CLID=8000, containing data object @0x15395450  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac0e0, recorded with key=, CLID=2101, containing data object @0x153950e0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac380, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac310, recorded with key=dobj, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac770, recorded with key=dobj2, CLID=8000, containing data object @0x15395f40  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac460, recorded with key=x1, CLID=8000, containing data object @0x153956d0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac4d0, recorded with key=x2, CLID=8000, containing data object @0x15395860  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac540, recorded with key=x3, CLID=8000, containing data object @0x15395540  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac620, recorded with key=cobj, CLID=9967, containing data object @0x153ac5b0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac850, recorded with key=linkvec, CLID=9983, containing data object @0x153952c0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac7e0, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x15395090  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac700, recorded with key=mkey, CLID=193758082, containing data object @0x15396170  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac690, recorded with key=vFloat, CLID=202242136, containing data object @0x153960d0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x153ac3f0, recorded with key=testobj, CLID=289238765, containing data object @0x15394d70  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2452a0, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0x55e8ba26b6f0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba26b330, recorded with key=dobj, CLID=8000, containing data object @0x55e8ba2447d0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba268df0, recorded with key=, CLID=2101, containing data object @0x55e8ba254b40  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2452a0, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba26b330, recorded with key=dobj, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba25b320, recorded with key=dobj2, CLID=8000, containing data object @0x55e8ba26bb40  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8b9fc0d70, recorded with key=x1, CLID=8000, containing data object @0x55e8b9fc0210  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba23b270, recorded with key=x2, CLID=8000, containing data object @0x55e8ba22b740  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba250ab0, recorded with key=x3, CLID=8000, containing data object @0x55e8ba250920  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2505d0, recorded with key=cobj, CLID=9967, containing data object @0x55e8ba22bca0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba244b30, recorded with key=linkvec, CLID=9983, containing data object @0x55e8ba20b670  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba25b740, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0x55e8ba24a6b0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba2340e0, recorded with key=EventContext, CLID=55596997, containing data object @0x55e8b9fc0be0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba26b880, recorded with key=mkey, CLID=193758082, containing data object @0x55e8ba25b540  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba25d220, recorded with key=vFloat, CLID=202242136, containing data object @0x55e8ba2449a0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() requesting release of DataProxy @0x55e8ba245470, recorded with key=testobj, CLID=289238765, containing data object @0x55e8ba25d090  ... -> DONE
 StoreGateSvc      VERBOSE Stop StoreGateSvc
 StoreGateSvc      VERBOSE stop: setting service priority to 101 so that event stores get finalized and cleared before other stores
 ApplicationMgr       INFO Application Manager Stopped successfully
+IncidentProcAlg1     INFO Finalize
 WriteDataReentrant   INFO in finalize()
 ReadDataReentrant    INFO in finalize()
-AthAlgSeq            INFO Finalizing AthAlgSeq...
-AthOutSeq            INFO Finalizing AthOutSeq...
-AthRegSeq            INFO Finalizing AthRegSeq...
-AthMasterSeq         INFO Finalizing AthMasterSeq...
+IncidentProcAlg2     INFO Finalize
 StoreGateSvc      VERBOSE Finalizing StoreGateSvc - package version StoreGate-00-00-00
 StoreGateSvc_Impl VERBOSE Finalizing StoreGateSvc_Impl - package version StoreGate-00-00-00
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac380, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac310, recorded with key=dobj, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac0e0, recorded with key=, CLID=2101, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac380, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac310, recorded with key=dobj, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac770, recorded with key=dobj2, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac460, recorded with key=x1, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac4d0, recorded with key=x2, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac540, recorded with key=x3, CLID=8000, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac620, recorded with key=cobj, CLID=9967, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac850, recorded with key=linkvec, CLID=9983, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac7e0, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac700, recorded with key=mkey, CLID=193758082, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac690, recorded with key=vFloat, CLID=202242136, containing data object @0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x153ac3f0, recorded with key=testobj, CLID=289238765, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba2452a0, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba26b330, recorded with key=dobj, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba268df0, recorded with key=, CLID=2101, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba2452a0, recorded with key=WriteDataReentrant, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba26b330, recorded with key=dobj, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba25b320, recorded with key=dobj2, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8b9fc0d70, recorded with key=x1, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba23b270, recorded with key=x2, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba250ab0, recorded with key=x3, CLID=8000, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba2505d0, recorded with key=cobj, CLID=9967, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba244b30, recorded with key=linkvec, CLID=9983, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba25b740, recorded with key=WriteDataReentrant, CLID=9984, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba2340e0, recorded with key=EventContext, CLID=55596997, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba26b880, recorded with key=mkey, CLID=193758082, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba25d220, recorded with key=vFloat, CLID=202242136, containing data object @0  ... -> DONE
+StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0x55e8ba245470, recorded with key=testobj, CLID=289238765, containing data object @0  ... -> DONE
 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=  110 [ms]                                             #=  1
+ChronoStatSvc        INFO Time User   : Tot=  230 [ms]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/AtlasTest/ControlTest/test/DataProxy_test.cxx b/AtlasTest/ControlTest/test/DataProxy_test.cxx
index 36009fe24720761aaf9238896dddb9050c0c2696..03cc4af1a48682881860fee082d43e833a0340ea 100644
--- a/AtlasTest/ControlTest/test/DataProxy_test.cxx
+++ b/AtlasTest/ControlTest/test/DataProxy_test.cxx
@@ -21,7 +21,6 @@
 #include <cassert>
 
 const bool CREATEIF(true);
-const bool SHOULD_NEVER_GET_HERE(true);
 
 struct Bla{
   Bla(): i(0) {}
@@ -54,7 +53,6 @@ int main() {
 
   DataProxy emptyProxy;
   assert( !emptyProxy.isValid() );
-  assert( emptyProxy.transientAddress() );
 
   //cerr << "Now we expect to see a warning message:" << endl
   //     << "----Warning Message Starts--->>" << endl; 
@@ -66,7 +64,7 @@ int main() {
   assert( emptyProxy.name().empty() );
   assert( emptyProxy.identifier().empty() );
   assert( 0 == emptyProxy.clID() );
-  assert( 0 == emptyProxy.transientAddress()->transientID().size() );
+  assert( 0 == emptyProxy.transientID().size() );
   assert( emptyProxy.isResetOnly() );
   assert( !emptyProxy.isConst() );
   try {
@@ -74,7 +72,6 @@ int main() {
 	 << "----Warning Message Starts--->>" << endl; 
     const Bla& bRef(DataProxy_cast<Bla>(emptyProxy));
     bRef.doNothing(); //remove warning
-    assert(SHOULD_NEVER_GET_HERE);
   } catch (...) {
     cerr << "<<---Warning Message Ends-------" << endl;
   }
@@ -90,7 +87,7 @@ int main() {
   assert( transientProxy.name() == "bla" );
   assert( transientProxy.identifier() == "bla" );
   assert( ClassID_traits<Bla>::ID() == transientProxy.clID() );
-  assert( transientProxy.transientAddress()->transientID().size() == 1);
+  assert( transientProxy.transientID().size() == 1);
   assert( transientProxy.isResetOnly() );
   assert( !transientProxy.isConst() );
   assert( (DataProxy_cast<Bla>(transientProxy)).i == 77 );
@@ -119,7 +116,7 @@ int main() {
   assert( addressProxy.name() == "foo" );
   assert( addressProxy.identifier() == "foo" );
   assert( ClassID_traits<Foo>::ID() == addressProxy.clID() );
-  assert( addressProxy.transientAddress()->transientID().size() == 1);
+  assert( addressProxy.transientID().size() == 1);
   assert( addressProxy.isResetOnly() );
   assert( !addressProxy.isConst() );
   const Foo& fRef(DataProxy_cast<Foo>(addressProxy));
@@ -147,7 +144,7 @@ int main() {
   assert( identifiedProxy.name() == "bla" );
   assert( identifiedProxy.identifier() == "bla" );
   assert( ClassID_traits<Bla>::ID() == identifiedProxy.clID() );
-  assert( identifiedProxy.transientAddress()->transientID().size() == 1);
+  assert( identifiedProxy.transientID().size() == 1);
   assert( identifiedProxy.isResetOnly() );
   assert( !identifiedProxy.isConst() );
   try {
@@ -155,7 +152,6 @@ int main() {
 	 << "----Warning Message Starts--->>" << endl; 
     const Bla& bRef(DataProxy_cast<Bla>(identifiedProxy));
     bRef.doNothing(); //remove warning
-    assert(SHOULD_NEVER_GET_HERE);
   } catch (...) {
     cerr << "<<---Warning Message Ends-------" << endl;
   }
diff --git a/AtlasTest/ControlTest/test/ProxyProviderSvc_test.cxx b/AtlasTest/ControlTest/test/ProxyProviderSvc_test.cxx
index aafecca759c72b97ba2816b2f5d1628f3a3a8995..53a4417b53ce53ae79a39d429c9a5715bebc5762 100644
--- a/AtlasTest/ControlTest/test/ProxyProviderSvc_test.cxx
+++ b/AtlasTest/ControlTest/test/ProxyProviderSvc_test.cxx
@@ -83,7 +83,8 @@ public:
   }
 
   ///get a specific address, plus all others  the provider wants to load in SG maps
-  StatusCode updateAddress(StoreID::type /*sID*/, TransientAddress* tad) override
+  StatusCode updateAddress(StoreID::type /*sID*/, TransientAddress* tad,
+                           const EventContext& /*ctx*/) override
   { 
     StatusCode sc;
     if ((tad->clID() != m_ID) || (tad->name() != m_key)) {
@@ -174,8 +175,7 @@ void testHLTAutoKeyReset(StoreGateSvc& rSG, IProxyProviderSvc& rPPS) {
   cout << "*** ProxyProviderSvc_test HLTAutoKeyReset BEGINS ***" <<endl;
   assert(rSG.clearStore(true).isSuccess());
   std::list<DataProxy*> pl;
-  assert(rSG.store()->proxyList(pl).isSuccess());
-  assert(0 == pl.size());
+  assert(rSG.proxies().empty());
   rPPS.addProvider(new TestProvider<Foo>("HLTAutoKey_1"));
   rPPS.addProvider(new TestProvider<Foo>("HLTAutoKey_2"));
   rPPS.addProvider(new TestProvider<Foo>("HLTAutoKey_3"));
@@ -185,17 +185,14 @@ void testHLTAutoKeyReset(StoreGateSvc& rSG, IProxyProviderSvc& rPPS) {
   assert(rSG.contains<Foo>("HLTAutoKey_3"));
   assert(rSG.contains<Foo>("NOT_HLTAutoKey_3"));
   pl.clear();
-  assert(rSG.store()->proxyList(pl).isSuccess());
-  assert(4 == pl.size());
+  assert(rSG.proxies().size() == 4);
   assert(rSG.clearStore().isSuccess());
   pl.clear();
-  assert(rSG.store()->proxyList(pl).isSuccess());
-  assert(1 == pl.size());
+  assert(rSG.proxies().size() == 1);
   assert(rSG.contains<Foo>("HLTAutoKey_1"));
   assert(rSG.contains<Foo>("NOT_HLTAutoKey_3"));
   pl.clear();
-  assert(rSG.store()->proxyList(pl).isSuccess());
-  assert(2 == pl.size());
+  assert(rSG.proxies().size() == 2);
   
   cout << "*** ProxyProviderSvc_test HLTAutoKeyReset OK ***\n\n" <<endl;
 }
diff --git a/AtlasTest/DatabaseTest/AthenaDBTestRec/doc/packagedoc.h b/AtlasTest/DatabaseTest/AthenaDBTestRec/doc/packagedoc.h
index 1e8c794561bfadfc1c09165f0461b38b224705ba..deacd87fc986d386878dae0a24c586213b643dd6 100644
--- a/AtlasTest/DatabaseTest/AthenaDBTestRec/doc/packagedoc.h
+++ b/AtlasTest/DatabaseTest/AthenaDBTestRec/doc/packagedoc.h
@@ -277,13 +277,10 @@ The DetStoreDump_jobOptions.py file:
 @include DetStoreDump_jobOptions.py
 
 
-@section AthenaDBTestRec_requirements requirements
 
 The package requirements file:
 
 
-@section AthenaDBTestRec_uses Packages used
 
 
 */
-
diff --git a/AtlasTest/DatabaseTest/AthenaPoolDataModelTest/doc/packagedoc.h b/AtlasTest/DatabaseTest/AthenaPoolDataModelTest/doc/packagedoc.h
index afca61b198f5c42af5d17854538fe1ddbbec6b8c..ae077ab7924cf8e93466ade24f5a42c2245025d8 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolDataModelTest/doc/packagedoc.h
+++ b/AtlasTest/DatabaseTest/AthenaPoolDataModelTest/doc/packagedoc.h
@@ -7,10 +7,6 @@
  *
 @section AthenaPoolDataModelTest_@section purpose Purpose: Test ESD / AOD readability
  *
-@section AthenaPoolDataModelTest_@section requirements requirements
- * 
- * 
-@section AthenaPoolDataModelTest_@section Links Links to used packages
  * 
  * 
  */
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt
index 2b985399a036641ebecd310a1b6f4566294626fe..59853cd6e8e1f04e6727b973c179c107fe8138b7 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/CMakeLists.txt
@@ -59,7 +59,6 @@ function (athenapoolmultitest_run_test testName jo postScript)
                   @ONLY )
   atlas_add_test( ${testName}
                   SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/athenapoolmultitest_${testName}.sh
-                  ENVIRONMENT PATH=${CMAKE_CURRENT_SOURCE_DIR}/test:$ENV{PATH}
                   POST_EXEC_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/test/${postScript}.sh ${testName} "
                   PROPERTIES TIMEOUT 600
                    )
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/doc/packagedoc.h b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/doc/packagedoc.h
index 66fdba3351a1ff25403aafbf78930d7d13122e51..2faeb32564501d97f1991dabb4c082c072a876f7 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/doc/packagedoc.h
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/doc/packagedoc.h
@@ -50,10 +50,5 @@
  * </ul>
  * <br>
  *
-@section AthenaPoolMultiTest_@section requirements requirements
- *
- *
-@section AthenaPoolMultiTest_@section Links Links to used packages
- *
  *
  */
diff --git a/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt b/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt
index d192028dc3b5b9b58aee91199db5d1550655a0fa..03cf9f3c2578cd93c83a44d32edf60369b20ad7b 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt
+++ b/AtlasTest/DatabaseTest/AthenaPoolTest/CMakeLists.txt
@@ -74,7 +74,7 @@ function (athenapooltest_run_test testName jo pattern)
                   @ONLY )
   atlas_add_test( ${testName}
                   SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/athenapooltest_${testName}.sh
-                  ENVIRONMENT "ATLAS_REFERENCE_TAG=AthenaPoolTest/AthenaPoolTest-01-00-00"
+                  ENVIRONMENT "ATLAS_REFERENCE_TAG=AthenaPoolTest/AthenaPoolTest-01-00-01"
                   POST_EXEC_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/test/post_check_with_select.sh ${testName} ${pattern}"
                   PROPERTIES TIMEOUT 900
                    )
diff --git a/AtlasTest/DatabaseTest/AthenaPoolTest/doc/packagedoc.h b/AtlasTest/DatabaseTest/AthenaPoolTest/doc/packagedoc.h
index f2bdd99433f1c4fd2048856142de634f2bc65185..37a649043e48379c3c902106d04d4e4cbf5e4314 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolTest/doc/packagedoc.h
+++ b/AtlasTest/DatabaseTest/AthenaPoolTest/doc/packagedoc.h
@@ -144,10 +144,8 @@ The following tests are currently being run:
     .
   .
 
-@section AthenaPoolTest_requirements requirements
 
 
-@section AthenaPoolTest_uses Packages used
 
 
 
diff --git a/AtlasTest/DatabaseTest/AthenaPoolTestAthenaPool/doc/packagedoc.h b/AtlasTest/DatabaseTest/AthenaPoolTestAthenaPool/doc/packagedoc.h
index 40e709cb28989e020c3498e0ea1c6399a7e77832..9fad8f5379c4ac9d81f7f4cb49f5948d5c511b04 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolTestAthenaPool/doc/packagedoc.h
+++ b/AtlasTest/DatabaseTest/AthenaPoolTestAthenaPool/doc/packagedoc.h
@@ -11,10 +11,5 @@
  * This package generates the pool converters for the classes 
  * defined in AthenaPoolTestData using the poolcnv pattern.
  * 
-@section AthenaPoolTestAthenaPool_@section requirements requirements
- * 
- * 
-@section AthenaPoolTestAthenaPool_@section Links Links to used packages
- * 
  * 
 */
diff --git a/AtlasTest/DatabaseTest/AthenaPoolTestData/doc/packagedoc.h b/AtlasTest/DatabaseTest/AthenaPoolTestData/doc/packagedoc.h
index c541bb64ffb153c27987b33415e8711f7648ad54..d24a33d7787c9389e7b79e73656a48d0e3830a34 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolTestData/doc/packagedoc.h
+++ b/AtlasTest/DatabaseTest/AthenaPoolTestData/doc/packagedoc.h
@@ -11,10 +11,4 @@
  * for the stored data. Dictionaries are then built using the lcgdict 
  * pattern.
  * 
-@section AthenaPoolTestData_@section requirements requirements
- * 
- * 
-@section AthenaPoolTestData_@section Links Links to used packages
- * 
- * 
  */
diff --git a/AtlasTest/DatabaseTest/CoraCoolTest/doc/packagedoc.h b/AtlasTest/DatabaseTest/CoraCoolTest/doc/packagedoc.h
index f58306f3ba8666324ad5ddf32f6477539bc3a290..19fba5e000797d2a463ac198128107699935dc9f 100644
--- a/AtlasTest/DatabaseTest/CoraCoolTest/doc/packagedoc.h
+++ b/AtlasTest/DatabaseTest/CoraCoolTest/doc/packagedoc.h
@@ -51,10 +51,8 @@ types (signed and unsigned ints and long longs, floats and doubles), plus
 optionally a Coral BLOB. Created objects include information on the channel and IOV they were created for, so data read back from the database can be
 checked for consistency.
 
-@section CoraCoolTest_requirements requirements
 
 
-@section CoraCoolTest_uses Packages used
 
 
 */
diff --git a/AtlasTest/DatabaseTest/TagCollectionTest/doc/packagedoc.h b/AtlasTest/DatabaseTest/TagCollectionTest/doc/packagedoc.h
index 38af908074e0faee3220e062a01c864fcec8aa23..28d9f157944f8876a603a49acf422d3999d46ac9 100644
--- a/AtlasTest/DatabaseTest/TagCollectionTest/doc/packagedoc.h
+++ b/AtlasTest/DatabaseTest/TagCollectionTest/doc/packagedoc.h
@@ -207,15 +207,4 @@ http://atlassw1.phy.bnl.gov/lxr/source/atlas/AtlasTest/TestTools/scripts/nightli
 
 @section TagCollectionTest_ExtraPages Extra Pages
 
- - @ref UsedPackagesTagCollectionTest
- - @ref RequirementsTagCollectionTest
 */
-
-/**
-@page UsedPackagesTagCollectionTest Used Packages
-*/
-
-/**
-@page RequirementsTagCollectionTest Requirements 
-*/
-
diff --git a/AtlasTest/TestTools/ATLAS_CHECK_THREAD_SAFETY b/AtlasTest/TestTools/TestTools/ATLAS_CHECK_THREAD_SAFETY
similarity index 100%
rename from AtlasTest/TestTools/ATLAS_CHECK_THREAD_SAFETY
rename to AtlasTest/TestTools/TestTools/ATLAS_CHECK_THREAD_SAFETY
diff --git a/AtlasTest/TestTools/share/post.sh b/AtlasTest/TestTools/share/post.sh
index ef5605b5a531503f800d2e9e3818e63e5847d33b..fdca1d593e84a61e9a9a11faa9a118eec5f4ebd3 100755
--- a/AtlasTest/TestTools/share/post.sh
+++ b/AtlasTest/TestTools/share/post.sh
@@ -90,7 +90,7 @@ PP="$PP"'|DirSearchPath::existsDir: WARNING not a directory'
 PP="$PP"'|Service factory for type [^ ]+ already declared'
 PP="$PP"'|Converter for class:[^ ]+ already exists'
 # Number of configurables read can vary from build to build.
-PP="$PP"'|INFO Read module info for'
+PP="$PP"'|INFO Read module info for|confDb modules in'
 # ignore ApplicationMgr header.
 PP="$PP"'|^ApplicationMgr *SUCCESS *$'
 PP="$PP"'|^=+$'
@@ -145,6 +145,7 @@ PP="$PP"'|INFO ... COOL  exception caught: The database does not exist|Create a
 PP="$PP"'|^SetGeometryVersion.py obtained'
 PP="$PP"'|^ConditionStore +INFO Start ConditionStore'
 PP="$PP"'|^ConditionStore +INFO Stop ConditionStore'
+PP="$PP"'|INFO Found XML file:|INFO copying from'
 
 # Differences between Gaudi versions.
 PP="$PP"'|DEBUG input handles:|DEBUG output handles:|DEBUG Data Deps for|DEBUG Property update for OutputLevel :|-ExtraInputs |-ExtraOutputs |-Cardinality |-IsClonable |-NeededResources |-Timeline |Service base class initialized successfully'
@@ -161,8 +162,7 @@ PP="$PP"'|bits/regex.h:11'
 # More StoreGate changes.
 PP="$PP"'|DEBUG trying to create store'
 
-# Differences in MT build.
-PP="$PP"'|^IncidentProcAlg.* INFO|^Ath.*Seq +INFO'
+PP="$PP"'|^IncidentProcAlg.* INFO|^Ath.*Seq +INFO|Loop Finished .seconds'
 PP="$PP"'|INFO massageEventInfo:'
 PP="$PP"'|Loop Finished'
 PP="$PP"'|Terminating thread-pool resources|Joining Scheduler thread'
diff --git a/CI/check_domain_map.py b/CI/check_domain_map.py
new file mode 100755
index 0000000000000000000000000000000000000000..c71831ef639b124b013b8cb5d95d0afd5517f7df
--- /dev/null
+++ b/CI/check_domain_map.py
@@ -0,0 +1,48 @@
+import argparse, logging, re, subprocess
+#from gitlab.exceptions import GitlabGetError
+from gitlab_mr_helpers import map_filename_to_package
+from domain_map import DOMAIN_MAP
+
+def main():
+    parser = argparse.ArgumentParser(description="GitLab merge request handler",formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+    parser.add_argument("-p","--path_to_repo",dest="repo_path",default="/home/jchapman/cleanup/athena",help="path to local clone of repository")
+    parser.add_argument("-d","--domains_to_print",default=DOMAIN_MAP.keys(),help="Domains to print out")
+    parser.add_argument("-v","--verbose",default="INFO",choices=["DEBUG","INFO","WARNING","ERROR","CRITICAL"],help="verbosity level")
+
+    # get command line arguments
+    args = parser.parse_args()
+
+    # configure log output
+    logging.basicConfig(format='%(asctime)s %(levelname)-10s %(message)s',
+                        datefmt='%H:%M:%S',
+                        level=logging.getLevelName(args.verbose))
+
+    logging.debug("parsed arguments:\n" + repr(args))
+    #TODO Should check that args.repo_path is a valid directory first for security
+    result = subprocess.Popen("find %s -type d" % args.repo_path, shell=True, stdout=subprocess.PIPE).stdout.read()
+    dirlist = result.split('\n')
+    affected_packages = filter(None,sorted(set([map_filename_to_package(f) for f in dirlist])))
+    affected_packages = [package.replace(args.repo_path, "") for package in affected_packages]
+
+    #here we want to list which packages match each domain.
+    packages_per_domain = dict()
+    for domain,pattern_list in DOMAIN_MAP.items():
+        domain_packages=[]
+        for pkg in affected_packages:
+            for pattern in pattern_list:
+                if re.search(pattern,pkg,re.I):
+                    domain_packages+=[pkg]
+                    break
+        packages_per_domain[domain] = domain_packages
+
+    for domain in args.domains_to_print:
+        logging.info("--------------------------------")
+        logging.info("Domain: " + domain)
+        logging.info("--------------------------------")
+        for pkg in packages_per_domain[domain]:
+            logging.info(pkg)
+            pass
+        pass
+
+if __name__ == "__main__":
+    main()
diff --git a/CI/config.yaml b/CI/config.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..8d1bb7e7ada129834e1454d240dd5c024bdbdcfc
--- /dev/null
+++ b/CI/config.yaml
@@ -0,0 +1,4 @@
+sweep-targets:
+  'master':
+    'NONE':
+      - 'master'
diff --git a/CI/sweep_MR.py b/CI/sweep_MR.py
index 11513c99981f92813e952066ab89dde1aebaf10b..e8a55312c31820e76fa8edae54b2938639420bed 100755
--- a/CI/sweep_MR.py
+++ b/CI/sweep_MR.py
@@ -118,13 +118,32 @@ def cherry_pick_mr(merge_commit,source_branch,target_branch_rules,project,dry_ru
 
     # handle sweep labels
     labels = set(mr_handle.labels)
+
     if "sweep:done" in labels:
-        logging.info("merge commit '%s' was already swept -> skipping",merge_commit)
+        logging.info("merge commit '%s' was already swept -> skipping ......\n",merge_commit)
         return
     if "sweep:ignore" in labels:
-        logging.info("merge commit '%s' is marked as ignore -> skipping",merge_commit)
+        logging.info("merge commit '%s' is marked as ignore -> skipping .......\n",merge_commit)
         return
 
+    target_branches = set()
+    
+    logging.debug("Looking through MR labels .... \n")
+
+    for l in labels:
+        logging.debug("label: %s",l)
+        if re.match('^sweptFrom:',l):
+            logging.info("merge commit '%s' contains %s label -> skipping to prevent sweeping it twice .......\n",merge_commit,l)
+            return
+        if re.match('^alsoTargeting:',l):
+            _s_ = l.split(':')
+            if len(_s_) == 2: # convert from unicode to have the same ascii string type as in target_branch_rules below
+                    _ss_ = [ _s_[1].encode('ascii','replace') ] 
+                    logging.info("merge commit '%s' also targets the following branches: %s -> add to target list",merge_commit,_ss_)
+                    target_branches.update(_ss_)
+            else:
+                logging.warning("merge commit '%s' has empty 'alsoTargeting:' label -> ignore")
+
     labels.add("sweep:done")
     mr_handle.labels = list(labels)
     # update labels only if this is for real
@@ -136,22 +155,21 @@ def cherry_pick_mr(merge_commit,source_branch,target_branch_rules,project,dry_ru
     logging.debug("MR %d affects the following packages: %r",MR_IID,affected_packages)
 
     # determine set of target branches from rules and affected packages
-    target_branches = set()
     for rule,branches in target_branch_rules.items():
         # get pattern expression for affected packages
         pkg_pattern = re.compile(rule)
         # only add target branches if ALL affected packages match the given pattern
         matches = [pkg_pattern.match(pkg_name) for pkg_name in affected_packages]
         if all(matches):
-            logging.debug("add branches for rule '%s'",rule)
+            logging.debug("add branches for rule '%s': %s",rule,branches)
             target_branches.update(branches)
         else:
-            logging.debug("skip branches for rule '%s'",rule)
+            logging.debug("skip branches for rule '%s': %s",rule,branches)
 
     logging.info("MR %d [%s] is swept to %d branches: %r",MR_IID,merge_commit,len(target_branches),list(target_branches))
 
-    # if this is a test run, we can stop here
     if dry_run:
+        logging.debug("\n\n----- This is a test run, stop with this MR here ----\n\n ")
         return
 
     # get initial MR commit title and description
@@ -317,6 +335,7 @@ def main():
 
     # do the actual cherry-picking
     for mr in MR_list:
+        logging.debug("\n\n ===== Next MR: %s ====== \n\n",mr)
         cherry_pick_mr(mr,args.branch,target_branch_rules,project,args.dry_run)
 
     # change back to initial directory
diff --git a/CI/watch_list.py b/CI/watch_list.py
index 734427dfd2b3305ee3bc491e7263f5e438780820..2fc0d3a0b9afaac37fb9a7c990da5ede3940f539 100644
--- a/CI/watch_list.py
+++ b/CI/watch_list.py
@@ -6,7 +6,7 @@ WATCH_LIST = {}
 WATCH_LIST['^CI$']       = set(['cgumpert'])
 WATCH_LIST['Simulation'] = set(['ritsch','jchapman','vpascuzz'])
 WATCH_LIST['Digitization'] = set(['jchapman'])
-WATCH_LIST['Overlay'] = set(['jchapman','ahaas','tkharlam'])
+WATCH_LIST['Overlay'] = set(['jchapman','ahaas','tkharlam','tadej'])
 WATCH_LIST['TrkiPatFitter'] = set(['pop'])
 WATCH_LIST['MooPerformance'] = set(['pop'])
 WATCH_LIST['JetCalibTools'] = set(['jbossios'])
@@ -15,6 +15,8 @@ WATCH_LIST['BTagging'] = set(['cpollard', 'guirriec'])
 WATCH_LIST['^Database/A'] = set(['mnowak'])
 WATCH_LIST['^Database/TPTools'] = set(['mnowak'])
 WATCH_LIST['^Database/PersistentDataModel'] = set(['mnowak'])
+WATCH_LIST['^Control/'] = set(['ssnyder'])
+WATCH_LIST['^Database/'] = set(['ssnyder'])
 WATCH_LIST['MuonSpectrometer'] = set(['jomeyer','wleight'])
 WATCH_LIST['MuonIdentification'] = set(['jomeyer','wleight'])
 WATCH_LIST['AGDD'] = set(['jomeyer'])
@@ -22,7 +24,7 @@ WATCH_LIST['(eflow)|(PFlow)|(PFO)'] = set(['mhodgkin'])
 WATCH_LIST['InDetBeamSpot'] = set(['csuster'])
 WATCH_LIST['MuonEfficiencyCorrections'] = set(['nkoehler','jojungge'])
 WATCH_LIST['MuonTPTools'] = set(['nkoehler','jojungge'])
-WATCH_LIST['MuonPerformanceAlgs'] = set(['nkoehler','jojungge'])
+WATCH_LIST['MuonPerformanceAlgs'] = set(['nkoehler','jojungge','gabarone'])
 WATCH_LIST['MuonPerformanceHistUtils'] = set(['nkoehler','jojungge'])
 WATCH_LIST['IsolationSelection'] = set(['maklein','jojungge','jpoveda','dzhang'])
 WATCH_LIST['Trigger/TrigCost'] = set(['cmcnicol'])
@@ -33,3 +35,8 @@ WATCH_LIST['.*RoiDescriptor'] = set(['sutt'])
 WATCH_LIST['.*RegionSelector'] = set(['sutt'])
 WATCH_LIST['RegSelLUT'] = set(['sutt'])
 WATCH_LIST['(PixelMonitoring)|(PixelConditionsServices)|(PixelRawData)'] = set(['kzoch','ibragimo'])
+WATCH_LIST['Trigger/TrigFTK'] = set(['karolos', 'benhoob', 'mswiatlo', 'jahreda'])
+WATCH_LIST['PhysicsAnalysis/SUSYPhys'] = set(['zmarshal','szambito'])
+WATCH_LIST['MuonMomentumCorrections'] =set(['gabarone'])
+WATCH_LIST['DerivationFrameworkDataPrep'] = set(['zmarshal'])
+WATCH_LIST['DerivationFrameworkSUSY'] = set(['zmarshal','martindl','whopkins'])
diff --git a/Calorimeter/CaloClusterCorrection/test/interpolate_test.cxx b/Calorimeter/CaloClusterCorrection/test/interpolate_test.cxx
index 3b30e2787c31434d0c28ffdefa72838362b8b7d3..b8f4338df693f1c2613cf2992ca79e9cd5972479 100755
--- a/Calorimeter/CaloClusterCorrection/test/interpolate_test.cxx
+++ b/Calorimeter/CaloClusterCorrection/test/interpolate_test.cxx
@@ -15,6 +15,7 @@
 
 #include "CaloClusterCorrection/interpolate.h"
 #include "CaloConditions/Array.h"
+#include "boost/io/ios_state.hpp"
 #include <vector>
 #include <cassert>
 #include <iostream>
@@ -139,6 +140,7 @@ void testit (float y2,
   float y1 = interpolate (table, x, degree, ycol, regions);
   //assert (!is_different (y1, y2));
   if (is_different (y1, y2)) {
+    boost::io::ios_base_all_saver iosaver (std::cout);  // Avoid coverity warning.
     std::cout << std::setprecision (8);
     std::cout << "diff " << x << " " << y1 << " " << y2 << "\n";
     std::abort();
diff --git a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloCellVolumes.cxx b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloCellVolumes.cxx
index 2c590f234b429189a8f45107f850f5b93785d32a..bf72afb45c06d5f8a02a8483f162d8bcd5a4a6af 100755
--- a/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloCellVolumes.cxx
+++ b/Calorimeter/CaloCnv/CaloDetMgrDetDescrCnv/src/CaloCellVolumes.cxx
@@ -55,7 +55,6 @@ CaloCellVolumes::CaloCellVolumes(ISvcLocator* svcLocator):
     throw std::runtime_error("CaloCellVolumes error: cannot access RDBAccessSvc");
 
   DecodeVersionKey detectorKey = DecodeVersionKey(geoModelSvc,"LAr");
-  rdbAccessSvc->connect();
 
   IRDBRecordset_ptr cellVolRec = rdbAccessSvc->getRecordsetPtr("LArCellVolumes",detectorKey.tag(),detectorKey.node());
   if(cellVolRec->size()==0)
@@ -63,7 +62,6 @@ CaloCellVolumes::CaloCellVolumes(ISvcLocator* svcLocator):
     cellVolRec = rdbAccessSvc->getRecordsetPtr("LArCellVolumes","LArCellVolumes-00");
     if(cellVolRec->size()==0)
     {
-      rdbAccessSvc->disconnect();
       throw std::runtime_error("CaloCellVolumes error: 0 size of LArCellVolumes recordset");
     }
   }
@@ -89,8 +87,6 @@ CaloCellVolumes::CaloCellVolumes(ISvcLocator* svcLocator):
   else if(LArTag.find("G3")!=std::string::npos)
     m_geometryLayout = "G3";
 
-  rdbAccessSvc->disconnect();
-
   // Initialize m_cellVolumes vector
   for(unsigned int ind = 0; ind < cellVolRec->size(); ind++)
   {
diff --git a/Calorimeter/CaloCnv/CaloJiveXML/share/CaloJiveXML_DataTypes_M5Commissioning.py b/Calorimeter/CaloCnv/CaloJiveXML/share/CaloJiveXML_DataTypes_M5Commissioning.py
deleted file mode 100644
index 61c3137ba08593c4e30459ee186b8e7ab0ed9a72..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloCnv/CaloJiveXML/share/CaloJiveXML_DataTypes_M5Commissioning.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# jOs esp for M5 Commissioning: Some collections swapped,
-# LAr bad channel mask on by default
-#
-
-## Include the base options if the user didn't already do that
-if not "theEventData2XML" in dir():
-    include ("JiveXML/JiveXML_jobOptionBase.py")
-
-theEventData2XML.DataTypes += ["JiveXML::CaloRetriever/CaloRetriever"]
-theEventData2XML.DataTypes += ["JiveXML::CaloClusterRetriever/CaloClusterRetriever"]
-
-## example how to switch on writting-out of HLT collections
-## and select favourite and other collections 
-from CaloJiveXML.CaloJiveXMLConf import JiveXML__CaloClusterRetriever
-theCaloClusterRetriever = JiveXML__CaloClusterRetriever (name = "CaloClusterRetriever")
-### Note: if 'Other Collection' list is given, this flag is ignored
-# theCaloClusterRetriever.DoWriteHLT = True
-### default in M5 is:
-theCaloClusterRetriever.FavouriteClusterCollection="CaloTopoCluster"
-## example how to set other collection. when commented out: all other, non-HLT
-#### Off in M5: all other collections written out. Edit if needed. 
-# theCaloClusterRetriever.OtherClusterCollections=["LArClusterEMSofte","CombinedCluster","LArClusterEM37","MuonClusterCollection"]
-
-## Enable retrieval of real pulse shape digits, mainly for cosmic test runs
-
-from CaloJiveXML.CaloJiveXMLConf import JiveXML__CaloRetriever
-theCaloRetriever = JiveXML__CaloRetriever (name = "CaloRetriever")
-
-## Note: all following flags are 'False' by default
-#theCaloRetriever.DoLArDigit = True
-#theCaloRetriever.DoTileDigit = True
-#theCaloRetriever.DoLArRealPulse = True
-#theCaloRetriever.DoTileRealPulse = True
-#theCaloRetriever.DoHECDigit = True
-#theCaloRetriever.DoFCalDigit = True
-#theCaloRetriever.DoCaloCellDetails = True
-theCaloRetriever.CellConditionCut = True // Check cell conditions
-
-#
-# LAr bad channel map by Adam Gibson for M5, 1 Nov 07
-#
-theCaloRetriever.DoMaskLArChannelsM5 = True
-theCaloRetriever.LArChannelsToIgnoreM5 = [838950912,843100160,841048064,847634432,847872000,848130048,851472384,856719360,855990272,855994368,856006656,856985600,859877376,856018944,856772608,859852800,866443264,864612352,864632832,864919552,868265984,869040128,869068800,864567296,864604160,757203048,757212194,757147692,757072502,757073014,757073526,757074038,757074550,757075062,757075574,757076086,757076598,757077110,757077622,757078134,757078646,757079158,757079670,757080182,757080694,757081206,757081718,757082230,757082742,757083254,757083766,757084278,757084790,757085302,757085814,757086326,757086838,757087350,757087862,757088374,757088886,757089398,757089910,757090422,757090934,757091446,757091958,757092470,757092982,757093494,757094006,757094518,757095030,757095542,757096054,757096566,757097078,757097590,757098102,757098614,757099126,757099638,757100150,757100662,757101174,757101686,757102198,757102710,757103222,757103734,757104246,757072500,757073012,757073524,757074036,757074548,757075060,757075572,757076084,757076596,757077108,757077620,757078132,757078644,757079156,757079668,757080180,757080692,757081204,757081716,757082228,757082740,757083252,757083764,757084276,757084788,757085300,757085812,757086324,757086836,757087348,757087860,757088372,757088884,757089396,757089908,757090420,757090932,757091444,757091956,757092468,757092980,757093492,757094004,757094516,757095028,757095540,757096052,757096564,757097076,757097588,757098100,757098612,757099124,757099636,757100148,757100660,757101172,757101684,757102196,757102708,757103220,757103732,757104244,765602326,757104196,757090372,757100104,765525098,765492770,765492770,757077566,757113890,757136964,757169692,757219414,757231722,757263904,765657172,765657684,765619234,765492842,765492330,765523050,765524074,765525098,765525538,765557866,765558378,765619234,765657172,765657684,765689450,757103172,757104196,757104212,757104220,757131338,757133892,757134916,757135940,757136980,757143626,757167644,757168668,757169692,757167172,757169732,757197372,757202500,757219414,757228100,757231722,757263904,757268086,757077568,765492258,765601814,765602838,765722968,765723484,765723996,765591146,759196594,767584924,759193506,759193504,759186968,759185378,759181296,759181300,759180274,759180278,759179248,759179252,759178226,759178230,759177326,759172234,759172238,759171212,759171208,759170186,759170190,759169160,759169164,767586144,767586146,767586156,759185250,767820120,759197408,759197480,759169926,759170950,759178630,759187826,767568026,767576942,759171662,759171664,759191806,759197436,759197538,759176090,761279266,761274178,761274176,761274274,761274272,761274322,761274320,761272920,761267538,761267542,761267546,761267550,761266512,761266516,761266520,761266524,761266566,761266568,761267078,761267080,761267592,761268102,761268104,771751952,771752464,771752976,771753488,771752962,774406224,774406226,774406228,774406230,774406736,774406738,774406740,774406742,774407248,774407250,774407252,774407254,774407760,774407762,774407764,774407766,774408272,774408274,774408276,774408278,774408784,774408786,774408788,774408790,774409296,774409298,774409300,774409302,774409808,774409810,774409812,774409814,774410320,774410322,774410324,774410326,774410832,774410834,774410836,774410838,774411344,774411346,774411348,774411350,774411856,774411858,774411860,774411862,774412368,774412370,774412372,774412374,774412880,774412882,774412884,774412886,774413392,774413394,774413396,774413398,774413904,774413906,774413908,774413910,774414416,774414418,774414420,774414422,774414928,774414930,774414932,774414934,774415440,774415442,774415444,774415446,774415952,774415954,774415956,774415958,774416464,774416466,774416468,774416470,774416976,774416978,774416980,774416982,774417488,774417490,774417492,774417494,774418000,774418002,774418004,774418006,774418512,774418514,774418516,774418518,774419024,774419026,774419028,774419030,774419536,774419538,774419540,774419542,774420048,774420050,774420052,774420054,774420560,774420562,774420564,774420566,774421072,774421074,774421076,774421078,774421584,774421586,774421588,774421590,774422096,774422098,774422100,774422102,774420574,774914116,774914628,774915140,774915652,774916164,774916676,774917188,774917700,774911064,774649416,774382128,774648372,774656056,774381616,774404136,774924842,774386700,774420062,774421086,773849088,773849090,773849092,773849094,773849096,773849098,773849100,773849102,773849104,773849106,773849108,773849110,773849112,773849114,773849116,773849118,773849120,773849122,773849124,773849126,773849128,773849130,773849132,773849134,773849136,773849138,773849140,773849142,773849144,773849146,773849148,773849150,774111232,774111234,774111236,774111238,774111240,774111242,774111244,774111246,774111248,774111250,774111252,774111254,774111256,774111258,774111260,774111262,774111264,774111266,774111268,774111270,774111272,774111274,774111276,774111278,774111280,774111282,774111284,774111286,774111288,774111290,774111292,774111294,774111744,774111746,774111748,774111750,774111752,774111754,774111756,774111758,774111760,774111762,774111764,774111766,774111768,774111770,774111772,774111774,774111776,774111778,774111780,774111782,774111784,774111786,774111788,774111790,774111792,774111794,774111796,774111798,774111800,774111802,774111804,774111806,774112256,774112258,774112260,774112262,774112264,774112266,774112268,774112270,774112272,774112274,774112276,774112278,774112280,774112282,774112284,774112286,774112288,774112290,774112292,774112294,774112296,774112298,774112300,774112302,774112304,774112306,774112308,774112310,774112312,774112314,774112316,774112318,776210168,776210170,776210172,776210174,776227584,776227586,776227588,776227590,776227592,776227594,776227596,776227598,776227600,776227602,776227604,776227606,776227608,776227610,776227612,776227614,776227616,776227618,776227620,776227622,776228096,776228098,776228100,776228102,776228104,776228106,776228108,776228110,776228112,776228114,776228116,776228118,776228120,776228122,776228124,776228126,776228128,776228130,776228132,776228134,775946240,775946242,775946244,775946246,775946248,775946250,775946252,775946254,775946256,775946258,775946260,775946262,775946264,775946266,775946268,775946270,775946272,775946274,775946276,775946278,775946280,775946282,775946284,775946286,775946288,775946290,775946292,775946294,775946296,775946298,775946300,775946302,776208384,776208386,776208388,776208390,776208392,776208394,776208396,776208398,776208400,776208402,776208404,776208406,776208408,776208410,776208412,776208414,776208416,776208418,776208420,776208422,776208424,776208426,776208428,776208430,776208432,776208434,776208436,776208438,776208440,776208442,776208444,776208446,776208896,776208898,776208900,776208902,776208904,776208906,776208908,776208910,776208912,776208914,776208916,776208918,776208920,776208922,776208924,776208926,776208928,776208930,776208932,776208934,776208936,776208938,776208940,776208942,776208944,776208946,776208948,776208950,776208952,776208954,776208956,776208958,776229434,776229436,776229438,776229944,776229946,776229948,776229950,776222832,776227698,776228196,775946478,776208622,776209134,776214596,776224574,776228158,776229960,776230042,776223382,776223890,776222576,776208454,776209030,776209222,776209230,776228792,776228794,776228796,776228798,776229304,776229306,776229308,776229310,778050430,778052352,778052354,778052356,778052358,778052360,778052362,778052364,778052366,778052368,778052370,778052372,778052374,778052376,778052378,778052380,778052382,778052384,778052386,778052388,778052390,778052392,778052394,778052396,778052398,778052718,778052752,778052754,778052756,778052758,778053264,778053266,778053268,778053270,778049280,778049282,778049284,778049286,778049288,778049290,778049292,778049294,778049296,778049298,778049300,778049302,778049304,778049306,778049308,778049310,778049312,778049314,778049316,778049318,778049320,778049322,778049324,778049326,778049328,778049330,778049332,778049334,778049336,778049338,778049340,778049342,778052400,778052402,778052404,778052406,778052408,778052410,778052412,778052414,782237730,782240768,782240770,782240772,782240774,782240776,782240778,782240800,782240802,782239264,782239266,784335904,784335906,784335908,784335910,784337920,784337924,784337926,784337952,784337954]
-
-ToolSvc += theCaloClusterRetriever
-ToolSvc += theCaloRetriever
-
diff --git a/Calorimeter/CaloCnv/CaloTPCnv/test/CaloClusterContainerCnv_test.cxx b/Calorimeter/CaloCnv/CaloTPCnv/test/CaloClusterContainerCnv_test.cxx
index f1f4533498352ddaf999cfeac6334b41f7270203..bd66ed7f7cdfe8749e65d37992b1bbec82a566f2 100644
--- a/Calorimeter/CaloCnv/CaloTPCnv/test/CaloClusterContainerCnv_test.cxx
+++ b/Calorimeter/CaloCnv/CaloTPCnv/test/CaloClusterContainerCnv_test.cxx
@@ -66,23 +66,6 @@ struct randi_fn
 };
 
 
-class CaloClusterContainerCnvTestMakeCluster
-  : public CaloCluster
-{
-public:
-  static void setStores (CaloCluster& c);
-};
-
-
-void CaloClusterContainerCnvTestMakeCluster::setStores (CaloCluster& c)
-{
-  c.setLinkStore (new CaloCellLink);
-}
-
-
-typedef CaloClusterContainerCnvTestMakeCluster MakeCluster;
-
-
 std::vector<CaloSampling::CaloSample> getSamplingList()
 {
   std::vector<CaloSampling::CaloSample> v;
@@ -94,7 +77,7 @@ std::vector<CaloSampling::CaloSample> getSamplingList()
 }
 
 
-CaloCluster* make_cluster()
+CaloCluster* make_cluster (int iclus)
 {
   float eta0 = randf (4, -4);
   float phi0 = randf (3, -3);
@@ -109,7 +92,6 @@ CaloCluster* make_cluster()
   }
   
   CaloCluster* c = new CaloCluster (eta0, phi0, mask);
-  MakeCluster::setStores (*c);
   
   std::vector<CaloSampling::CaloSample> vsamp = getSamplingList();
   for (int i = 0; i < nvars; i++) {
@@ -159,6 +141,9 @@ CaloCluster* make_cluster()
   c->setRecoStatus (CaloRecoStatus
                     ((CaloRecoStatus::StatusIndicator)randi (100000)));
 
+  ElementLink<CaloCellLinkContainer> el ("celllinkkey", iclus);
+  c->resetCellLink (el);
+
   return c;
 }
 
@@ -169,7 +154,7 @@ std::unique_ptr<const CaloClusterContainer> make_clusters()
   ccc->setROIAuthor ("theauthor");
   ccc->setTowerSeg (CaloTowerSeg (20, 10, -4, 4, -3, 3));
   for (int i=0; i < 5; i++)
-    ccc->push_back (make_cluster());
+    ccc->push_back (make_cluster(i));
   return std::unique_ptr<const CaloClusterContainer>(ccc.release());
 }
 
@@ -325,42 +310,6 @@ void compare (const CaloClusterContainer& clust1,
 }
 
 
-class MungeCellLinks
-{
-public:
-  MungeCellLinks (const CaloClusterContainer& cont);
-  ~MungeCellLinks();
-
-private:
-  const CaloClusterContainer* m_cont;
-  std::vector<const CaloCellLink*> m_saved;
-};
-
-
-MungeCellLinks::MungeCellLinks (const CaloClusterContainer& cont)
-  : m_cont (&cont)
-{
-  for (size_t i = 0; i < cont.size(); i++) {
-    CaloCluster& cl = *const_cast<CaloCluster*> (cont[i]);
-    m_saved.push_back (*cl.cellLink().cptr());
-    ElementLink<CaloCellLinkContainer> el ("celllinkkey", i);
-    cl.resetCellLink (el);
-  }
-}
-
-
-MungeCellLinks::~MungeCellLinks()
-{
-  assert (m_cont->size() == m_saved.size());
-  for (size_t i = 0; i < m_cont->size(); i++) {
-    CaloCluster& cl = *const_cast<CaloCluster*> ((*m_cont)[i]);
-    ElementLink<CaloCellLinkContainer> el;
-    el.setElement (m_saved[i]);
-    cl.resetCellLink (el);
-  }
-}
-
-
 template <class PERS, class TPCONV>
 void testit (const CaloClusterContainer& clust, int version)
 {
@@ -368,10 +317,7 @@ void testit (const CaloClusterContainer& clust, int version)
 
   TPCONV cnv;
   PERS pers;
-  {
-    MungeCellLinks munge (clust);
-    cnv.transToPers (&clust, &pers, log);
-  }
+  cnv.transToPers (&clust, &pers, log);
 
   CaloClusterContainer clust2;
   cnv.persToTrans (&pers, &clust2, log);
diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx
index 4162f69d443b9843e3fa45dac293cbc229f769e1..f34ea9cb0877638d0952171102faa7bbb3d25266 100644
--- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx
+++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellEnergyCorr2Ntuple.cxx
@@ -140,6 +140,8 @@ StatusCode CaloCellEnergyCorr2Ntuple::stop()
 
   }        // loop over cells
 
+  delete flt;
+
   return StatusCode::SUCCESS;
  }
 
diff --git a/Calorimeter/CaloConditions/share/LArTTCellMap_ATLAS_jobOptions.py b/Calorimeter/CaloConditions/share/LArTTCellMap_ATLAS_jobOptions.py
index c0bea566d845d211391d989395769a9c8ac9c15b..ef337cde023a0a84aa379ced08dbeebe2b3e6904 100755
--- a/Calorimeter/CaloConditions/share/LArTTCellMap_ATLAS_jobOptions.py
+++ b/Calorimeter/CaloConditions/share/LArTTCellMap_ATLAS_jobOptions.py
@@ -6,11 +6,6 @@ include.block ( "CaloConditions/LArTTCellMap_ATLAS_jobOptions.py" )
 #
 #==================================================================
 
-from PoolSvc.PoolSvcConf import PoolSvc
-ServiceMgr += PoolSvc()
-if not "prfile:poolcond/PoolCat_oflcond.xml" in ServiceMgr.PoolSvc.ReadCatalog :
-    ServiceMgr.PoolSvc.ReadCatalog+= [ "prfile:poolcond/PoolCat_oflcond.xml" ]
-
 from AthenaCommon.Logging import logging
 logger = logging.getLogger( 'LArTTCellMap_ATLAS_jobOptions.py' )
 
diff --git a/Calorimeter/CaloConditions/src/CaloLocalHadCoeff.cxx b/Calorimeter/CaloConditions/src/CaloLocalHadCoeff.cxx
index 1911d2091c80561101851337ecbdee4d03016d10..c3ec2eecc3fef7addbc6774c5a094b6d23b616b1 100644
--- a/Calorimeter/CaloConditions/src/CaloLocalHadCoeff.cxx
+++ b/Calorimeter/CaloConditions/src/CaloLocalHadCoeff.cxx
@@ -13,6 +13,7 @@
 #include <iomanip>
 #include <math.h>
 #include <iostream>
+#include <algorithm>
 
 
 
diff --git a/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessing.h b/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessing.h
index e92fc4688fc4a7c527f787131cca869c956e23c8..fb23d77594afdc54e57f2b603de0a2ba33830454 100644
--- a/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessing.h
+++ b/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessing.h
@@ -30,18 +30,17 @@ class G4Step;
 class G4VSensitiveDetector;
 
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 
 namespace G4UA {
   
   namespace CaloG4 {
-  
 
     class CalibrationDefaultProcessing:
-    public AthMessaging, public IBeginEventAction,  public ISteppingAction
+      public AthMessaging, public G4UserEventAction, public G4UserSteppingAction
     {
       
     public:
@@ -53,9 +52,9 @@ namespace G4UA {
       
       CalibrationDefaultProcessing(const Config& config);
       /// the BoE actions
-      virtual void beginOfEvent(const G4Event*) override;
+      virtual void BeginOfEventAction(const G4Event*) override;
       /// the stepping action
-      virtual void processStep(const G4Step*) override;
+      virtual void UserSteppingAction(const G4Step*) override;
 
       /// Make the default sensitive detector available to other routines.
       G4VSensitiveDetector* GetDefaultSD() { return m_defaultSD; }
@@ -71,6 +70,4 @@ namespace G4UA {
     
 } // namespace G4UA
 
-
-
 #endif // CaloG4_CalibrationDefaultProcessing_h
diff --git a/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessingTool.h b/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessingTool.h
index 755aa1588f71dda95ecd9c88c9148a0c90ce4139..588fe3ac16df7cf38414811ef95533cd7ec550bf 100644
--- a/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessingTool.h
+++ b/Calorimeter/CaloG4Sim/CaloG4Sim/CalibrationDefaultProcessingTool.h
@@ -2,37 +2,37 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef CALOG4SIM_G4UA_CALOG4_CALIBRATIONDEFAULTPROCESSINGTOOL_H 
-#define CALOG4SIM_G4UA_CALOG4_CALIBRATIONDEFAULTPROCESSINGTOOL_H 
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#ifndef CALOG4SIM_G4UA_CALOG4_CALIBRATIONDEFAULTPROCESSINGTOOL_H
+#define CALOG4SIM_G4UA_CALOG4_CALIBRATIONDEFAULTPROCESSINGTOOL_H
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "CaloG4Sim/CalibrationDefaultProcessing.h"
 
-namespace G4UA{ 
-  
+namespace G4UA{
+
   namespace CaloG4 {
-    
+
     /// @class CalibrationDefaultProcessingTool
     /// @brief Tool which manages  CalibrationDefaultProcessing
     ///
     /// @author Andrea Di Simone
     ///
 
-    class CalibrationDefaultProcessingTool: 
-    public ActionToolBase<CalibrationDefaultProcessing>,
-      public IBeginEventActionTool,  public ISteppingActionTool
+    class CalibrationDefaultProcessingTool:
+      public ActionToolBase<CalibrationDefaultProcessing>,
+      public IG4EventActionTool, public IG4SteppingActionTool
     {
-      
+
     public:
       /// Standard constructor
       CalibrationDefaultProcessingTool(const std::string& type, const std::string& name,const IInterface* parent);
       /// Retrieve the BoE action
-      virtual IBeginEventAction* getBeginEventAction() override final 
-      { return static_cast<IBeginEventAction*>( getAction() ); }
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
       /// Retrieve the stepping action
-      virtual ISteppingAction* getSteppingAction() override final 
-      { return static_cast<ISteppingAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
       /// Gaudi interface management
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
     protected:
@@ -42,8 +42,8 @@ namespace G4UA{
       /// python configuration
       CalibrationDefaultProcessing::Config m_config;
     }; // class CalibrationDefaultProcessingTool
-    
+
   }// namespace CaloG4
-  
-} // namespace G4UA 
+
+} // namespace G4UA
 #endif
diff --git a/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc b/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc
index 95103ac653f790eedeee87ab7e104f10cf4a83c7..4b3498a5ceae469f561fe2b3c0a4625420c4c344 100644
--- a/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc
+++ b/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessing.cc
@@ -41,7 +41,7 @@ namespace G4UA {
     CalibrationDefaultProcessing::CalibrationDefaultProcessing(const Config& config):AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ),"CalibrationDefaultProcessing"),m_config(config), m_defaultSD(0){;
     }
 
-    void CalibrationDefaultProcessing::beginOfEvent(const G4Event*){
+    void CalibrationDefaultProcessing::BeginOfEventAction(const G4Event*){
 
       // retrieve the SD from G4SDManager
       // done here instead of in initialize to leave more flexibility to the rest of the G4 init
@@ -53,7 +53,7 @@ namespace G4UA {
       if(!m_defaultSD) ATH_MSG_ERROR("No valid SD name specified. The job will continue, but you should check your configuration");
     }
 
-    void CalibrationDefaultProcessing::processStep(const G4Step* a_step){
+    void CalibrationDefaultProcessing::UserSteppingAction(const G4Step* a_step){
 
 
       // Do we have a sensitive detector?
diff --git a/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessingTool.cxx b/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessingTool.cxx
index 3618f7be53b2c1f02051bc9a90513dc4126ee7ef..b45f48a2849f2db028ec427fb1277d75d4f21009 100644
--- a/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessingTool.cxx
+++ b/Calorimeter/CaloG4Sim/src/CalibrationDefaultProcessingTool.cxx
@@ -23,13 +23,13 @@ namespace G4UA{
     
     StatusCode CalibrationDefaultProcessingTool::queryInterface(const InterfaceID& riid, void** ppvIf){
       
-      if(riid == IBeginEventActionTool::interfaceID()) {
-	*ppvIf = (IBeginEventActionTool*) this;
+      if(riid == IG4EventActionTool::interfaceID()) {
+	*ppvIf = (IG4EventActionTool*) this;
 	addRef();
 	return StatusCode::SUCCESS;
       }
-      if(riid == ISteppingActionTool::interfaceID()) {
-	*ppvIf = (ISteppingActionTool*) this;
+      if(riid == IG4SteppingActionTool::interfaceID()) {
+	*ppvIf = (IG4SteppingActionTool*) this;
 	addRef();
 	return StatusCode::SUCCESS;
       }
diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloDM_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloDM_ID.h
index 956ee3856e7e0f96b5b2ed1a6dc222dc59991bde..4f81dbd3c6868efd6a3a786321f14db27084f2e7 100755
--- a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloDM_ID.h
+++ b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloDM_ID.h
@@ -293,16 +293,16 @@ private:
   int  get_expanded_id  (const Identifier& id, ExpandedIdentifier& exp_id, const IdContext* context) const;
 
 
-  void lar_region_id_checks  ( int pos_neg_z, int dmat, int sampling, int region ) const throw(CaloID_Exception);
+  void lar_region_id_checks  ( int pos_neg_z, int dmat, int sampling, int region ) const;
 
-  void tile_region_id_checks  ( int pos_neg_z, int dmat, int sampling, int region ) const throw(CaloID_Exception);
+  void tile_region_id_checks  ( int pos_neg_z, int dmat, int sampling, int region ) const;
 
   void lar_zone_id_checks   	(int pos_neg_z, int dat, int sampling, int region,
-				 int eta,       int phi ) const throw(CaloID_Exception);
+				 int eta,       int phi ) const;
   void tile_zone_id_checks   	(int pos_neg_z, int dat, int sampling, int region,
-				 int eta,       int phi ) const throw(CaloID_Exception);
+				 int eta,       int phi ) const;
   void  zone_id_checks   	(const Identifier& regionId,
-    				 int eta,       int phi )  const throw(CaloID_Exception);
+    				 int eta,       int phi )  const;
 
 
 
diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloLVL1_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloLVL1_ID.h
index d107b9f3f4aa8fae8559555c6ebae3fa817ac085..a8eb1e3633ff7bc17cdc6c76db4548796d9c2100 100755
--- a/Calorimeter/CaloIdentifier/CaloIdentifier/CaloLVL1_ID.h
+++ b/Calorimeter/CaloIdentifier/CaloIdentifier/CaloLVL1_ID.h
@@ -316,15 +316,15 @@ private:
 
 
   void  tower_id_checks   	(int pos_neg_z, int sampling, int region,
-				 int eta,       int phi ) const throw(CaloID_Exception);
+				 int eta,       int phi ) const;
   void  tower_id_checks   	(const Identifier regionId,
-    				 int eta,       int phi )  const throw(CaloID_Exception);
-  void region_id_checks  ( int pos_neg_z, int sampling, int region ) const throw(CaloID_Exception);
+    				 int eta,       int phi )  const;
+  void region_id_checks  ( int pos_neg_z, int sampling, int region ) const;
 
   void layer_id_checks   ( int pos_neg_z, int sampling, int region,
- 		          int eta,       int phi,      int layer ) const throw(CaloID_Exception);
+ 		          int eta,       int phi,      int layer ) const;
   void layer_id_checks   ( const Identifier towerId,
- 		          int layer ) const throw(CaloID_Exception);
+ 		          int layer ) const;
 
 
   int         initLevelsFromDict(void) ;
diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/JGTowerBase_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/JGTowerBase_ID.h
index 11dafba231dd724ecaf533f883f359d76e00519d..12df3a5d80897d15123d5409ee3b1c5eede87db4 100644
--- a/Calorimeter/CaloIdentifier/CaloIdentifier/JGTowerBase_ID.h
+++ b/Calorimeter/CaloIdentifier/CaloIdentifier/JGTowerBase_ID.h
@@ -287,10 +287,10 @@ private:
 	/** create expanded Identifier from Identifier (return == 0 for OK) */
 	int  get_expanded_id  (const Identifier& id, ExpandedIdentifier& exp_id, const IdContext* context) const;
 	void  tower_id_checks   	(int pos_neg, int sampling, int region,
-		 int eta,       int phi ) const throw(CaloID_Exception);
+		 int eta,       int phi ) const;
 	void  tower_id_checks   	(const Identifier regionId,
-		 int eta,       int phi )  const throw(CaloID_Exception);
-	void region_id_checks  ( int pos_neg, int sampling, int region ) const throw(CaloID_Exception);
+		 int eta,       int phi )  const;
+	void region_id_checks  ( int pos_neg, int sampling, int region ) const;
 
 	int         initLevelsFromDict(const std::string& t_pre) ;
 
diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.h
index 5d6678486ca5e5c3334c726ef79e70ab550ed21a..45574bcc888d726e54bf0fe792b823d3e7f5fd34 100644
--- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.h
+++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArEM_Base_ID.h
@@ -345,11 +345,11 @@ private:
   enum {NOT_VALID_HASH = 256000};
 
   // Check methods
-  void  region_id_checks   	(int barrel_ec, int sampling, int region ) const throw(LArID_Exception);
+  void  region_id_checks   	(int barrel_ec, int sampling, int region ) const;
   void  channel_id_checks   	(int barrel_ec, int sampling, int region,
-				 int eta,       int phi ) const throw(LArID_Exception);
+				 int eta,       int phi ) const;
   void  channel_id_checks   	(const Identifier regionId,
-				 int eta,       int phi ) const throw(LArID_Exception);
+				 int eta,       int phi ) const;
 
   /** create expanded Identifier from Identifier (return == 0 for OK) */
   virtual int  get_expanded_id  (const Identifier& id, ExpandedIdentifier& exp_id, const IdContext* context) const;
diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.h
index ae12ce2a79ae7ce8c359b48a54a715592a439e0a..8a5fc4dd415b3eeba8ae74870f5458e140c24723 100755
--- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.h
+++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArFCAL_Base_ID.h
@@ -159,11 +159,11 @@ private:
 
   // Check methods
 
-  void  module_id_checks      ( int pos_neg, int module ) const throw(LArID_Exception);
+  void  module_id_checks      ( int pos_neg, int module ) const;
   void  channel_id_checks     ( int pos_neg,  int module,
-				int eta,      int phi ) const throw(LArID_Exception);
+				int eta,      int phi ) const;
   void  channel_id_checks     ( const Identifier moduleId,
-				int eta, int phi) const throw(LArID_Exception);
+				int eta, int phi) const;
 			     
   /** create expanded Identifier from Identifier (return == 0 for OK) */
   virtual int  get_expanded_id  (const Identifier& id, ExpandedIdentifier& exp_id, const IdContext* context) const;
diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.h
index d5f8326c36bee9491d1c666b70952e78a6cfd316..37ee2db5acf0e9874f5f6b013f5f63fcac9af424 100755
--- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.h
+++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArHEC_Base_ID.h
@@ -65,7 +65,7 @@ public:
   /** build a cell identifier for a channel  <br>
       eta counting includes regions     */
   Identifier  channel_id  ( int pos_neg, int sampling,
-			    int eta,     int phi ) const throw(LArID_Exception) ;
+			    int eta,     int phi ) const;
 
   /** For a specific sector , eta, phi_sector 
    * <pre>
@@ -78,7 +78,7 @@ public:
    * </pre>
    */
   Identifier  channel_id  ( int pos_neg, int sampling, int sector, int region, 
-			    int eta,     int phi_sector ) const throw(LArID_Exception);
+			    int eta,     int phi_sector ) const;
 
   /** allows to know in which region is a channel/cell
       -- valid for both kinds of channels */
@@ -203,11 +203,11 @@ private:
 
   // Check methods
 
-  void  region_id_checks   	(int pos_neg, int sampling, int region ) const throw(LArID_Exception);
+  void  region_id_checks   	(int pos_neg, int sampling, int region ) const;
   void  channel_id_checks   	(int pos_neg, int sampling, int region,
-				 int eta,       int phi ) const throw(LArID_Exception);
+				 int eta,       int phi ) const;
   void  channel_id_checks   	(const Identifier regionId,
-				 int eta,       int phi ) const throw(LArID_Exception);
+				 int eta,       int phi ) const;
 
   /** create expanded Identifier from Identifier (return == 0 for OK) */
   virtual int  get_expanded_id  (const Identifier& id, ExpandedIdentifier& exp_id, const IdContext* context) const;
diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/LArMiniFCAL_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/LArMiniFCAL_ID.h
index 9432360c2bb283067e08433acb1da842b5380d20..bfd6a6b6515517c0bf6b3294da2feb1638a337b2 100644
--- a/Calorimeter/CaloIdentifier/CaloIdentifier/LArMiniFCAL_ID.h
+++ b/Calorimeter/CaloIdentifier/CaloIdentifier/LArMiniFCAL_ID.h
@@ -204,11 +204,11 @@ private:
 
   // Check methods
 
-  void  module_id_checks      ( int pos_neg, int module ) const throw(LArID_Exception);
+  void  module_id_checks      ( int pos_neg, int module ) const;
   void  channel_id_checks     ( int pos_neg,  int module,
-                                int depth,  int eta,      int phi ) const throw(LArID_Exception);
+                                int depth,  int eta,      int phi ) const;
   void  channel_id_checks     ( const Identifier moduleId,
-                                int depth, int eta, int phi) const throw(LArID_Exception);
+                                int depth, int eta, int phi) const;
                              
   /** create expanded Identifier from Identifier (return == 0 for OK) */
   virtual int  get_expanded_id  (const Identifier& id, ExpandedIdentifier& exp_id, const IdContext* context) const;
diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/TTOnlineID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/TTOnlineID.h
index 6342fee3c7b9617b9f7061ce9a937d21438d1893..487c80581bd51ef30edc78da77d889c9e4452b35 100755
--- a/Calorimeter/CaloIdentifier/CaloIdentifier/TTOnlineID.h
+++ b/Calorimeter/CaloIdentifier/CaloIdentifier/TTOnlineID.h
@@ -128,14 +128,14 @@ private:
   IdentifierHash channel_hash_binary_search(HWIdentifier channelId) const;
 
   // Check methods
-  void  channel_Id_checks(int crate, int module, int submodule, int channel ) const throw(CaloID_Exception);
-  void  channel_Id_checks(const HWIdentifier crateId, int module, int submodule, int channel ) const throw(CaloID_Exception);
-  void  channel_Id_checks(const HWIdentifier moduleId, int submodule, int channel ) const throw(CaloID_Exception);
-  void  channel_Id_checks(const HWIdentifier submoduleId, int channel ) const throw(CaloID_Exception);
-
-  void  submodule_Id_checks(int crate, int module, int submodule ) const throw(CaloID_Exception);
-  void  module_Id_checks(int crate, int module ) const throw(CaloID_Exception);
-  void  crate_Id_checks( int crate ) const throw(CaloID_Exception);
+  void  channel_Id_checks(int crate, int module, int submodule, int channel ) const;
+  void  channel_Id_checks(const HWIdentifier crateId, int module, int submodule, int channel ) const;
+  void  channel_Id_checks(const HWIdentifier moduleId, int submodule, int channel ) const;
+  void  channel_Id_checks(const HWIdentifier submoduleId, int channel ) const;
+
+  void  submodule_Id_checks(int crate, int module, int submodule ) const;
+  void  module_Id_checks(int crate, int module ) const;
+  void  crate_Id_checks( int crate ) const;
 
   /** create expanded HWIdentifier from HWIdentifier (return == 0 for OK) */
   int  get_expanded_id (const HWIdentifier& id, ExpandedIdentifier& exp_id,
diff --git a/Calorimeter/CaloIdentifier/CaloIdentifier/Tile_Base_ID.h b/Calorimeter/CaloIdentifier/CaloIdentifier/Tile_Base_ID.h
index 8305944a5c6104b953d8748bfaf842620d14def4..14666ffb77cd1d1dce732fe5ec30d08fa2f05d56 100755
--- a/Calorimeter/CaloIdentifier/CaloIdentifier/Tile_Base_ID.h
+++ b/Calorimeter/CaloIdentifier/CaloIdentifier/Tile_Base_ID.h
@@ -70,42 +70,42 @@ public:
     Identifier          tile_gap                ()     const;
 
     /** build identifier for any Tilecal section */
-    Identifier          tile_det                ( int section)                  const throw(TileID_Exception);
+    Identifier          tile_det                ( int section)                  const;
 
     /** build single region, module, tower, cell, pmt, adc identifiers */
-    Identifier          region_id               ( int index)                    const throw(TileID_Exception);
-    Identifier          region_id               ( int section, int side)        const throw(TileID_Exception);
+    Identifier          region_id               ( int index)                    const;
+    Identifier          region_id               ( int section, int side)        const;
     Identifier          region_id               ( const Identifier& any_id)     const;
 
     Identifier          module_id               ( int section, int side,
-                                                  int module)                   const throw(TileID_Exception);
+                                                  int module)                   const;
     Identifier          module_id               ( const Identifier& any_id)     const;
     Identifier          tower_id                ( int section,  int side,
-                                                  int module,   int tower)      const throw(TileID_Exception);
+                                                  int module,   int tower)      const;
     Identifier          tower_id               ( const Identifier& any_id)     const;
     Identifier          cell_id                 ( const Identifier & any_id )   const;
     Identifier          cell_id                 ( int section,  int side,
                                                   int module,   int tower,
-                                                  int sample )                  const throw(TileID_Exception);
+                                                  int sample )                  const;
     Identifier          pmt_id                  ( const Identifier & any_id )   const;
     Identifier          pmt_id                  ( const Identifier & cell_id,
-                                                  int pmt )                     const throw(TileID_Exception);
+                                                  int pmt )                     const;
     Identifier          pmt_id                  ( int section,  int side,
                                                   int module,   int tower,
-                                                  int sample,   int pmt )       const throw(TileID_Exception);
+                                                  int sample,   int pmt )       const;
     Identifier          adc_id                  ( const Identifier & cell_id,
-                                                  int pmt, int adc )            const throw(TileID_Exception);
+                                                  int pmt, int adc )            const;
     Identifier          adc_id                  ( const Identifier & pmt_id,
-                                                  int adc )                     const throw(TileID_Exception);
+                                                  int adc )                     const;
     Identifier          adc_id                  ( int section,  int side,
                                                   int module,   int tower,
                                                   int sample,   int pmt,
-                                                  int adc )                     const throw(TileID_Exception);
+                                                  int adc ) const;
 
     /** fast conversion from hash to ID for cells */
-    Identifier          cell_id                 (const IdentifierHash& hash_id) const throw(TileID_Exception);
+    Identifier          cell_id                 (const IdentifierHash& hash_id) const;
     /** fast conversion from ID to hash for cells */
-    IdentifierHash      cell_hash               (const Identifier& cell_id) const throw(TileID_Exception);
+    IdentifierHash      cell_hash               (const Identifier& cell_id) const;
 
     /** Test of an Identifier to see if it belongs to a particular part of the calorimeter */
 //    bool	is_tile                         (const Identifier& id) const;
diff --git a/Calorimeter/CaloIdentifier/src/CaloDM_ID.cxx b/Calorimeter/CaloIdentifier/src/CaloDM_ID.cxx
index 9db05bbca6a7981469aa527cd441d4b746e0b722..f6368960c9d9618fbf93ff155347c2e880e68849 100755
--- a/Calorimeter/CaloIdentifier/src/CaloDM_ID.cxx
+++ b/Calorimeter/CaloIdentifier/src/CaloDM_ID.cxx
@@ -51,7 +51,8 @@ int CaloDM_ID::eta_min(const Identifier& id) const
     const MultiRange * zoneRange = 0 ;
     if ( is_lar(id) ) {
       zoneRange = &(m_full_lar_zone_range) ;
-    } else if ( is_tile(id) ) {
+    } else {
+      assert ( is_tile(id) );
       zoneRange = &(m_full_tile_zone_range) ;
     }
     for (unsigned int i = 0; i < (*zoneRange).size(); ++i) {
@@ -83,7 +84,8 @@ int CaloDM_ID::eta_max(const Identifier& id) const
     const MultiRange * zoneRange = 0 ;
     if ( is_lar(id) ) {
       zoneRange = &(m_full_lar_zone_range) ;
-    } else if ( is_tile(id) ) {
+    } else {
+      assert ( is_tile(id) );
       zoneRange = &(m_full_tile_zone_range) ;
     }
     for (unsigned int i = 0; i < (*zoneRange).size(); ++i) {
@@ -110,7 +112,8 @@ int CaloDM_ID::phi_min(const Identifier& id) const
     const MultiRange * zoneRange = 0 ;
     if ( is_lar(id) ) {
       zoneRange = &(m_full_lar_zone_range) ;
-    } else if ( is_tile(id) ) {
+    } else {
+      assert ( is_tile(id) );
       zoneRange = &(m_full_tile_zone_range) ;
     }
     for (unsigned int i = 0; i < (*zoneRange).size(); ++i) {
@@ -142,7 +145,8 @@ int CaloDM_ID::phi_max(const Identifier& id) const
     const MultiRange * zoneRange = 0 ;
     if ( is_lar(id) ) {
       zoneRange = &(m_full_lar_zone_range) ;
-    } else if ( is_tile(id) ) {
+    } else {
+      assert ( is_tile(id) );
       zoneRange = &(m_full_tile_zone_range) ;
     }
     for (unsigned int i = 0; i < (*zoneRange).size(); ++i) {
@@ -533,7 +537,7 @@ CaloDM_ID::zone_context              (void) const
 }
 
 
-void CaloDM_ID::lar_region_id_checks (int pos_neg_z, int dmat, int sampling, int region)const  throw(CaloID_Exception)
+void CaloDM_ID::lar_region_id_checks (int pos_neg_z, int dmat, int sampling, int region)const
 {
   // Fill expanded id
   ExpandedIdentifier id(calo_exp());
@@ -554,7 +558,7 @@ void CaloDM_ID::lar_region_id_checks (int pos_neg_z, int dmat, int sampling, int
   }
 }
 
-void CaloDM_ID::tile_region_id_checks (int pos_neg_z, int dmat, int sampling, int region)const  throw(CaloID_Exception)
+void CaloDM_ID::tile_region_id_checks (int pos_neg_z, int dmat, int sampling, int region)const
 {
   // Fill expanded id
   ExpandedIdentifier id(calo_exp());
@@ -578,7 +582,7 @@ void CaloDM_ID::tile_region_id_checks (int pos_neg_z, int dmat, int sampling, in
 
 
  void CaloDM_ID::lar_zone_id_checks   ( int pos_neg_z, int dmat, int sampling, int region,
-					int eta,       int phi ) const throw(CaloID_Exception)
+					int eta,       int phi ) const
 {  
   // Fill expanded id
   ExpandedIdentifier id(calo_exp());
@@ -600,7 +604,7 @@ void CaloDM_ID::tile_region_id_checks (int pos_neg_z, int dmat, int sampling, in
 }
 
  void CaloDM_ID::tile_zone_id_checks   ( int pos_neg_z, int dmat, int sampling, int region,
-					 int eta,       int phi ) const throw(CaloID_Exception)
+					 int eta,       int phi ) const
 {  
   // Fill expanded id
   ExpandedIdentifier id(calo_exp());
@@ -623,7 +627,7 @@ void CaloDM_ID::tile_region_id_checks (int pos_neg_z, int dmat, int sampling, in
 
 
 void CaloDM_ID::zone_id_checks   ( const Identifier& regionId,
-				   int eta,  int phi ) const throw(CaloID_Exception) 
+				   int eta,  int phi ) const
 {
   // Fill expanded id
     ExpandedIdentifier id; 
diff --git a/Calorimeter/CaloIdentifier/src/CaloLVL1_ID.cxx b/Calorimeter/CaloIdentifier/src/CaloLVL1_ID.cxx
index ebab0358748cff0028a1849fff3bf5c5216f31ac..d9fffa1ea34e4593abe287b214ce374efe37ea9b 100755
--- a/Calorimeter/CaloIdentifier/src/CaloLVL1_ID.cxx
+++ b/Calorimeter/CaloIdentifier/src/CaloLVL1_ID.cxx
@@ -603,7 +603,7 @@ CaloLVL1_ID::get_next_in_eta(const IdentifierHash& id, IdentifierHash& next) con
 }
 
 void CaloLVL1_ID::tower_id_checks   ( int pos_neg_z, int sampling, int region,
-				      int eta,       int phi ) const throw(CaloID_Exception)
+				      int eta,       int phi ) const
 {  
   // Fill expanded id
   ExpandedIdentifier id(calo_exp());
@@ -626,7 +626,7 @@ void CaloLVL1_ID::tower_id_checks   ( int pos_neg_z, int sampling, int region,
 
 
 void CaloLVL1_ID::tower_id_checks   ( const Identifier regionId,
-				      int eta,  int phi ) const throw(CaloID_Exception) 
+				      int eta,  int phi ) const 
 {
   // Fill expanded id
     ExpandedIdentifier id; 
@@ -658,7 +658,6 @@ void CaloLVL1_ID::tower_id_checks   ( const Identifier regionId,
 }
 
 void CaloLVL1_ID::region_id_checks (int pos_neg_z, int sampling, int region)const 
-  throw(CaloID_Exception)
 {
     // Fill expanded id
     ExpandedIdentifier id(calo_exp());
@@ -680,7 +679,7 @@ void CaloLVL1_ID::region_id_checks (int pos_neg_z, int sampling, int region)cons
 }
 
 void CaloLVL1_ID::layer_id_checks   ( int pos_neg_z, int sampling, int region,
-				      int eta,       int phi,      int layer ) const throw(CaloID_Exception)
+				      int eta,       int phi,      int layer ) const
 {  
     // Fill expanded id
     ExpandedIdentifier id(calo_exp());
@@ -702,7 +701,7 @@ void CaloLVL1_ID::layer_id_checks   ( int pos_neg_z, int sampling, int region,
 }
 
 void CaloLVL1_ID::layer_id_checks   ( const Identifier towerId,
-				      int layer ) const throw(CaloID_Exception) 
+				      int layer ) const
 {
     // Fill expanded id
     ExpandedIdentifier id; 
diff --git a/Calorimeter/CaloIdentifier/src/JGTowerBase_ID.cxx b/Calorimeter/CaloIdentifier/src/JGTowerBase_ID.cxx
index 616fdbd335c0a86ed0649e63fedf9ec12db6c0bd..f77b954832a3b3a98eb768f46093da9bb6da7766 100644
--- a/Calorimeter/CaloIdentifier/src/JGTowerBase_ID.cxx
+++ b/Calorimeter/CaloIdentifier/src/JGTowerBase_ID.cxx
@@ -576,7 +576,7 @@ int  JGTowerBase_ID::get_expanded_id  (const Identifier& id, ExpandedIdentifier&
   return (0);
 }
 void JGTowerBase_ID::tower_id_checks   ( int pos_neg, int sampling, int region,
-					 int eta,       int phi ) const throw(CaloID_Exception)
+					 int eta,       int phi ) const
 {  
   // Fill expanded id
   ExpandedIdentifier id(calo_exp());
@@ -599,7 +599,7 @@ void JGTowerBase_ID::tower_id_checks   ( int pos_neg, int sampling, int region,
 }
 
 void JGTowerBase_ID::tower_id_checks   ( const Identifier regionId,
-					 int eta,  int phi ) const throw(CaloID_Exception) 
+					 int eta,  int phi ) const
 {
   // Fill expanded id
   ExpandedIdentifier id; 
@@ -631,7 +631,6 @@ void JGTowerBase_ID::tower_id_checks   ( const Identifier regionId,
 }
 
 void JGTowerBase_ID::region_id_checks (int pos_neg, int sampling, int region)const 
-  throw(CaloID_Exception)
 {
   // Fill expanded id
   ExpandedIdentifier id(calo_exp());
diff --git a/Calorimeter/CaloIdentifier/src/LArEM_Base_ID.cxx b/Calorimeter/CaloIdentifier/src/LArEM_Base_ID.cxx
index 39bcfca297fb0b8aceeb957de234328bbbb74478..804726edcd265572a78f76f78fb009d31ea613fb 100644
--- a/Calorimeter/CaloIdentifier/src/LArEM_Base_ID.cxx
+++ b/Calorimeter/CaloIdentifier/src/LArEM_Base_ID.cxx
@@ -142,7 +142,7 @@ int LArEM_Base_ID::phi_max(const Identifier regId) const
   return (-999);  // default
 }
 
-void LArEM_Base_ID::region_id_checks   ( int barrel_ec, int sampling, int region ) const throw(LArID_Exception)
+void LArEM_Base_ID::region_id_checks   ( int barrel_ec, int sampling, int region ) const
 {
   // Check that id is within allowed range
 
@@ -167,7 +167,7 @@ void LArEM_Base_ID::region_id_checks   ( int barrel_ec, int sampling, int region
 
 
 void LArEM_Base_ID::channel_id_checks   ( int barrel_ec, int sampling, int region,
-				     int eta,       int phi ) const throw(LArID_Exception)
+				     int eta,       int phi ) const
 {  
     // Check that id is within allowed range
 
@@ -191,7 +191,7 @@ void LArEM_Base_ID::channel_id_checks   ( int barrel_ec, int sampling, int regio
 }
 
 void LArEM_Base_ID::channel_id_checks   ( const Identifier regionId,
-                                          int eta,       int phi ) const throw(LArID_Exception) 
+                                          int eta,       int phi ) const
 {
   // Check that id is within allowed range
 
diff --git a/Calorimeter/CaloIdentifier/src/LArFCAL_Base_ID.cxx b/Calorimeter/CaloIdentifier/src/LArFCAL_Base_ID.cxx
index 66d0957b782a0943fb3c3a8f4e13e1f9b8664681..cf56a88b4a6e5b8f8dc4f769c6f6ab37e6605c14 100755
--- a/Calorimeter/CaloIdentifier/src/LArFCAL_Base_ID.cxx
+++ b/Calorimeter/CaloIdentifier/src/LArFCAL_Base_ID.cxx
@@ -246,7 +246,7 @@ int  LArFCAL_Base_ID::initialize_base_from_dictionary (const IdDictMgr& dict_mgr
     
 }
 
-void LArFCAL_Base_ID::module_id_checks ( int pos_neg, int module ) const throw(LArID_Exception)
+void LArFCAL_Base_ID::module_id_checks ( int pos_neg, int module ) const
 {
 	
   // Check that id is within allowed range
@@ -268,7 +268,7 @@ void LArFCAL_Base_ID::module_id_checks ( int pos_neg, int module ) const throw(L
   }
 }
 
-void LArFCAL_Base_ID::channel_id_checks ( int pos_neg, int module, int eta, int phi) const throw(LArID_Exception)
+void LArFCAL_Base_ID::channel_id_checks ( int pos_neg, int module, int eta, int phi) const
 {
 	
   // Check that id is within allowed range
@@ -292,7 +292,7 @@ void LArFCAL_Base_ID::channel_id_checks ( int pos_neg, int module, int eta, int
 }
 
 void   LArFCAL_Base_ID::channel_id_checks   (const Identifier moduleId,
-				        int eta, int phi) const throw(LArID_Exception)
+				        int eta, int phi) const
 {
   // Check that id is within allowed range
   // Fill expanded id
diff --git a/Calorimeter/CaloIdentifier/src/LArHEC_Base_ID.cxx b/Calorimeter/CaloIdentifier/src/LArHEC_Base_ID.cxx
index 117ba93454aa1da276ab113fafbb55afee2ea301..939d6412c781e586d96be1a67ee20f5f27e0c615 100755
--- a/Calorimeter/CaloIdentifier/src/LArHEC_Base_ID.cxx
+++ b/Calorimeter/CaloIdentifier/src/LArHEC_Base_ID.cxx
@@ -52,7 +52,7 @@ LArHEC_Base_ID::~LArHEC_Base_ID(void)
 }
 
 Identifier LArHEC_Base_ID::channel_id  ( int pos_neg, int sampling, 
-                                         int eta,     int phi ) const throw(LArID_Exception)
+                                         int eta,     int phi ) const
 {
     // must calculate region number and shift eta 
     int region=999;
@@ -64,7 +64,7 @@ Identifier LArHEC_Base_ID::channel_id  ( int pos_neg, int sampling,
 
 
 Identifier LArHEC_Base_ID::channel_id  ( int pos_neg, int sampling, int sector, int region, 
-				    int eta,     int phi_sector ) const throw(LArID_Exception)
+				    int eta,     int phi_sector ) const
 {
     int phi = ( region == 0 ? sector*2 + phi_sector : sector ); 
     return (channel_id (pos_neg, sampling, region, eta, phi ));
@@ -389,7 +389,7 @@ int  LArHEC_Base_ID::initialize_base_from_dictionary (const IdDictMgr& dict_mgr,
 
 
 
-void LArHEC_Base_ID::region_id_checks   ( int pos_neg, int sampling, int region ) const throw(LArID_Exception)
+void LArHEC_Base_ID::region_id_checks   ( int pos_neg, int sampling, int region ) const
 {
 	
   // Check that id is within allowed range
@@ -414,7 +414,7 @@ void LArHEC_Base_ID::region_id_checks   ( int pos_neg, int sampling, int region
 }
 
 void LArHEC_Base_ID::channel_id_checks   ( int pos_neg, int sampling, int region,
-                                           int eta,     int phi ) const throw(LArID_Exception)
+                                           int eta,     int phi ) const
 {  
 	
   // Check that id is within allowed range
@@ -438,7 +438,7 @@ void LArHEC_Base_ID::channel_id_checks   ( int pos_neg, int sampling, int region
 }
 
 void LArHEC_Base_ID::channel_id_checks   ( const Identifier regionId,
-                                           int eta,       int phi ) const throw(LArID_Exception) 
+                                           int eta,       int phi ) const
 {
 	
   // Check that id is within allowed range
diff --git a/Calorimeter/CaloIdentifier/src/LArMiniFCAL_ID.cxx b/Calorimeter/CaloIdentifier/src/LArMiniFCAL_ID.cxx
index 57809e56c7b9c48224ec5baddc2feebf4582b838..b4259d309b659089e609950cf3f15bb129842460 100644
--- a/Calorimeter/CaloIdentifier/src/LArMiniFCAL_ID.cxx
+++ b/Calorimeter/CaloIdentifier/src/LArMiniFCAL_ID.cxx
@@ -348,7 +348,7 @@ int  LArMiniFCAL_ID::initialize_from_dictionary (const IdDictMgr& dict_mgr)
 
 }
 
-void LArMiniFCAL_ID::module_id_checks ( int pos_neg, int module ) const throw(LArID_Exception)
+void LArMiniFCAL_ID::module_id_checks ( int pos_neg, int module ) const
 {
 	
   // Check that id is within allowed range
@@ -371,7 +371,7 @@ void LArMiniFCAL_ID::module_id_checks ( int pos_neg, int module ) const throw(LA
   }
 }
 
-void LArMiniFCAL_ID::channel_id_checks ( int pos_neg, int module, int depth, int eta, int phi) const throw(LArID_Exception)
+void LArMiniFCAL_ID::channel_id_checks ( int pos_neg, int module, int depth, int eta, int phi) const
 {
 	
   // Check that id is within allowed range
@@ -396,7 +396,7 @@ void LArMiniFCAL_ID::channel_id_checks ( int pos_neg, int module, int depth, int
 }
 
 void   LArMiniFCAL_ID::channel_id_checks   (const Identifier moduleId, int depth,
-				        int eta, int phi) const throw(LArID_Exception)
+				        int eta, int phi) const
 {
   // Check that id is within allowed range
   // Fill expanded id
diff --git a/Calorimeter/CaloIdentifier/src/TTOnlineID.cxx b/Calorimeter/CaloIdentifier/src/TTOnlineID.cxx
index 4e58833f2d429d1d14366746829ac4fce644b8e3..c33db6038f15324386f3dfc970f0cf17e2d85f9c 100755
--- a/Calorimeter/CaloIdentifier/src/TTOnlineID.cxx
+++ b/Calorimeter/CaloIdentifier/src/TTOnlineID.cxx
@@ -229,7 +229,7 @@ int TTOnlineID::get_expanded_id  (const HWIdentifier& id, ExpandedIdentifier& ex
 
 
 //=====================================================================================
-void TTOnlineID::channel_Id_checks   ( int crate, int module, int submodule, int channel  ) const throw(CaloID_Exception)
+void TTOnlineID::channel_Id_checks   ( int crate, int module, int submodule, int channel  ) const
 //=====================================================================================
 {
   // Fill expanded id
@@ -250,7 +250,7 @@ void TTOnlineID::channel_Id_checks   ( int crate, int module, int submodule, int
 }
 
 /* ================================================================*/
-void TTOnlineID::channel_Id_checks   ( const HWIdentifier submoduleId, int channel ) const throw(CaloID_Exception)
+void TTOnlineID::channel_Id_checks   ( const HWIdentifier submoduleId, int channel ) const
 /* ================================================================*/
 {
   // Check that id is within allowed range
@@ -272,7 +272,7 @@ void TTOnlineID::channel_Id_checks   ( const HWIdentifier submoduleId, int chann
 }
 
 /* ================================================================*/
-void TTOnlineID::channel_Id_checks   ( const HWIdentifier moduleId, int submodule, int channel ) const throw(CaloID_Exception)
+void TTOnlineID::channel_Id_checks   ( const HWIdentifier moduleId, int submodule, int channel ) const
 /* ================================================================*/
 {
   // Check that id is within allowed range
@@ -294,7 +294,7 @@ void TTOnlineID::channel_Id_checks   ( const HWIdentifier moduleId, int submodul
 }
 
 /* ================================================================*/
-void TTOnlineID::channel_Id_checks   ( const HWIdentifier crateId, int module, int submodule, int channel ) const throw(CaloID_Exception)
+void TTOnlineID::channel_Id_checks   ( const HWIdentifier crateId, int module, int submodule, int channel ) const
 /* ================================================================*/
 {
   // Check that id is within allowed range
@@ -316,7 +316,7 @@ void TTOnlineID::channel_Id_checks   ( const HWIdentifier crateId, int module, i
 }
 
 /* ================================================================*/
-void TTOnlineID::submodule_Id_checks( int crate, int module, int submodule ) const throw(CaloID_Exception)
+void TTOnlineID::submodule_Id_checks( int crate, int module, int submodule ) const
 /* ================================================================*/
 {
   // Check that id is within allowed range
@@ -338,7 +338,7 @@ void TTOnlineID::submodule_Id_checks( int crate, int module, int submodule ) con
 }
 
 /* ================================================================*/
-void TTOnlineID::module_Id_checks( int crate, int module ) const throw(CaloID_Exception)
+void TTOnlineID::module_Id_checks( int crate, int module ) const
 /* ================================================================*/
 {
   // Check that id is within allowed range
@@ -359,7 +359,7 @@ void TTOnlineID::module_Id_checks( int crate, int module ) const throw(CaloID_Ex
 }
 
 /* ================================================================*/
-void TTOnlineID::crate_Id_checks( int crate ) const throw(CaloID_Exception)
+void TTOnlineID::crate_Id_checks( int crate ) const
 /* ================================================================*/
 {
   // Check that id is within allowed range
diff --git a/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx b/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx
index de79177b42acd8690caa4c5cdc4a9fdfd4658448..ae9cf305eddc928cb63021c231fd22f0b630d6f8 100755
--- a/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx
+++ b/Calorimeter/CaloIdentifier/src/Tile_Base_ID.cxx
@@ -371,7 +371,7 @@ Tile_Base_ID::tile_gap        ()      const
 
 // For any Tilecal section
 Identifier
-Tile_Base_ID::tile_det        ( int section )        const throw(TileID_Exception)
+Tile_Base_ID::tile_det        ( int section )        const
 {
     if(m_do_checks) {
 	// Check that id is within allowed range
@@ -403,7 +403,7 @@ Tile_Base_ID::tile_det        ( int section )        const throw(TileID_Exceptio
 
 // single region, module, tower, cell, pmt, adc identifiers
 Identifier
-Tile_Base_ID::region_id       ( int index )           const throw(TileID_Exception)
+Tile_Base_ID::region_id       ( int index )           const
 {
     Identifier result;
     IdentifierHash hash_id = index;
@@ -415,7 +415,7 @@ Tile_Base_ID::region_id       ( int index )           const throw(TileID_Excepti
 }
 
 Identifier
-Tile_Base_ID::region_id       ( int section, int side )      const throw(TileID_Exception)
+Tile_Base_ID::region_id       ( int section, int side )      const
 {
     if(m_do_checks) {
 	
@@ -469,7 +469,6 @@ Tile_Base_ID::region_id       ( const Identifier& any_id )   const
 Identifier
 Tile_Base_ID::module_id       ( int section, int side, 
                                 int module ) const
-  throw(TileID_Exception)
 {
     if(m_do_checks) {
 	
@@ -525,7 +524,6 @@ Tile_Base_ID::module_id       ( const Identifier& any_id )   const
 Identifier
 Tile_Base_ID::tower_id        ( int section, int side,
                                 int module,   int tower )     const
-  throw(TileID_Exception)
 {
     if(m_do_checks) {
 	
@@ -595,7 +593,6 @@ Identifier
 Tile_Base_ID::cell_id         ( int section, int side,
                                 int module,   int tower, 
                                 int sample )                  const
-  throw(TileID_Exception)
 {
     if(m_do_checks) {
 	
@@ -653,7 +650,6 @@ Tile_Base_ID::pmt_id          ( const Identifier & any_id )   const
 Identifier
 Tile_Base_ID::pmt_id          ( const Identifier & cell_id, 
                                 int pmt )                     const
-  throw(TileID_Exception)
 {
     Identifier result;
 
@@ -709,7 +705,6 @@ Identifier
 Tile_Base_ID::pmt_id          ( int section, int side,
                                 int module,   int tower,
                                 int sample,   int pmt )       const
-  throw(TileID_Exception)
 {
     if(m_do_checks) {
 	
@@ -756,7 +751,6 @@ Tile_Base_ID::pmt_id          ( int section, int side,
 Identifier
 Tile_Base_ID::adc_id          ( const Identifier & cell_id,
                                 int pmt, int adc )            const
-  throw(TileID_Exception)
 {
     Identifier result;
 
@@ -812,7 +806,6 @@ Tile_Base_ID::adc_id          ( const Identifier & cell_id,
 Identifier
 Tile_Base_ID::adc_id          ( const Identifier & pmt_id,
                                 int adc )                     const
-  throw(TileID_Exception)
 {
     Identifier result;
 
@@ -868,7 +861,6 @@ Identifier
 Tile_Base_ID::adc_id          ( int section, int side,
                                 int module, int tower, int sample, 
                                 int pmt, int adc )            const
-  throw(TileID_Exception)
 {
     if(m_do_checks) {
 	
@@ -1023,7 +1015,6 @@ bool Tile_Base_ID::adc_id     ( const Identifier& cell_id,
 }
 
 Identifier  Tile_Base_ID::cell_id     (const IdentifierHash& hash_id) const
-  throw(TileID_Exception)
 {
   if (hash_id < channels().hash_max()) {
     return channel_id (hash_id);
@@ -1034,7 +1025,6 @@ Identifier  Tile_Base_ID::cell_id     (const IdentifierHash& hash_id) const
 }
 
 IdentifierHash  Tile_Base_ID::cell_hash  (const Identifier& id) const
-  throw(TileID_Exception)
 {
   IdentifierHash ret = 0;
   if (channels().get_hash (id, ret) == 0)
diff --git a/Calorimeter/CaloIdentifier/test/CaloIDHelper_test.cxx b/Calorimeter/CaloIdentifier/test/CaloIDHelper_test.cxx
index 20844dd98f744126fb186e50b4cb8e3b7bb8698a..3550623d900688947ac4fd607febda86c18aaf12 100644
--- a/Calorimeter/CaloIdentifier/test/CaloIDHelper_test.cxx
+++ b/Calorimeter/CaloIdentifier/test/CaloIDHelper_test.cxx
@@ -156,10 +156,10 @@ void test_helper()
   assert (helper.msgSvc() == 0);
 
 
-  IdDictParser* parser = new IdDictParser;
-  parser->register_external_entity ("LArCalorimeter",
-                                    "IdDictLArCalorimeter_DC3-05-Comm-01.xml");
-  IdDictMgr& idd = parser->parse ("IdDictParser/ATLAS_IDS.xml");
+  IdDictParser parser;
+  parser.register_external_entity ("LArCalorimeter",
+                                   "IdDictLArCalorimeter_DC3-05-Comm-01.xml");
+  IdDictMgr& idd = parser.parse ("IdDictParser/ATLAS_IDS.xml");
 
   assert (helper.initialize_base_from_dictionary(idd, "LArCalorimeterx") == 1);
   assert (helper.initialize_base_from_dictionary(idd, "LArCalorimeter") == 0);
diff --git a/Calorimeter/CaloInterface/CaloInterface/CaloInterfaceDict.h b/Calorimeter/CaloInterface/CaloInterface/CaloInterfaceDict.h
index ee954b1db4ab2dc91b89da4ce814cc5c58a921d4..172f75c50b68df26b7694ba4be7a98962025ff90 100644
--- a/Calorimeter/CaloInterface/CaloInterface/CaloInterfaceDict.h
+++ b/Calorimeter/CaloInterface/CaloInterface/CaloInterfaceDict.h
@@ -13,7 +13,6 @@
 #include "CaloInterface/ICaloCellNormalizedQualityTool.h"
 #include "CaloInterface/ICaloNoiseTool.h"
 #include "CaloInterface/ICalorimeterNoiseTool.h"
-#include "CaloInterface/ICaloParticleIDTool.h"
 #include "CaloInterface/ICaloAffectedTool.h"
 #include "CaloInterface/ICaloLumiBCIDTool.h"
 
diff --git a/Calorimeter/CaloInterface/CaloInterface/ICaloParticleIDTool.h b/Calorimeter/CaloInterface/CaloInterface/ICaloParticleIDTool.h
deleted file mode 100644
index fdb511675dfd022fd8491380b12247be38259e8a..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloInterface/CaloInterface/ICaloParticleIDTool.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/************************************************************************
-                    ICaloParticleIDTool.h - Copyright ATLAS Collaboration
-
-author: Doug Schouten <dschoute at sfu dot ca>
-
-**************************************************************************/
-
-#ifndef ICALOPARTICLEIDTOOL_H
-#define ICALOPARTICLEIDTOOL_H
-
-#include "GaudiKernel/IAlgTool.h"
-#include "Identifier/Identifier.h"
-
-#include <map>
-#include <vector>
-#include <string>
-
-namespace HepMC 
-{ 
-  class GenParticle; 
-}
-class CaloCalibrationHitContainer;
-class INavigable;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Interface to access calibration hit information, including 
-// particle provenance, for (composite) calorimeter objects.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-
-static const InterfaceID IID_ICaloParticleIDTool("ICaloParticleIDTool", 1, 0);
-
-class ICaloParticleIDTool : virtual public IAlgTool
-{
-public:
-  static const InterfaceID& interfaceID( ) { return IID_ICaloParticleIDTool; }
-  
-  enum EnergyType
-    {
-      VISIBLE,
-      VISIBLE_EM,
-      VISIBLE_HAD,
-      INVISIBLE,
-      TOTAL
-    };
-  
-  inline static bool idAccept( void* caller = 0x0, const Identifier& id = Identifier() ) { 
-     if (caller == NULL || !id.is_valid()) return true;
-     return true; 
-  }
-  
-  // * -------------------------------------------------------------------------------- * //
-  
-  //
-  // accessors for particle ID information
-  //
-  
-  
-  /*
-    Return the sum of the energy of all hits left by a particle inside a calorimeter object.
-    
-    @param obj the calorimeter object for which to tabulate calibration hits
-    @param part the particle whose hits are to be included in the sum
-    @param etype the type of energy deposition to count 
-  */
-  virtual double energyFromParticle( const INavigable* obj,
-				     const HepMC::GenParticle* part,
-				     EnergyType etype = VISIBLE ) const = 0;
-
-  
-  /*
-    Return the energy deposited in the calorimeter by a particle, applying a callback
-    filter to identify cells of interest.
-    
-    @param part the particle for which to find hits in the (filtered) collection of cells
-    @param etype the type of energy deposition to count
-    @param caller a pointer to the client, passed to the filter function 
-    @param accept a boolean function that filters out cells to consider (return true iff accept cell)
-           example: return true if cell |E| / noise > 4 to only count hits in seeds for 4/2/0 topoclusters
-  */
-  virtual double energyInCalorimeter( const HepMC::GenParticle* part,
-				      EnergyType etype,
-				      void* caller = 0x0,
-				      bool (*accept)( void*, const Identifier& ) = &(ICaloParticleIDTool::idAccept) ) const = 0;
-  
-  
-  /*
-    Return the energy deposited in dead material by a particle.
-    
-    @param part the particle for which to find hits in the dead material
-    @param etype the type of energy deposition to count
-    @param caller a pointer to the calling object, passed to filter function
-    @param accept a boolean function that filters out DM to consider (return true iff accept DM ID)
-  */
-  virtual double energyInDeadMaterial( const HepMC::GenParticle*,
-				       EnergyType etype,
-				       void* caller = 0x0, 
-				       bool (*accept)( void*, const Identifier& ) = &(ICaloParticleIDTool::idAccept) ) const = 0;
-  
-  
-  /*
-    Load energy map for all particles contributing hits to a calorimeter object.
-    
-    @param obj the calorimeter object to inspect
-    @param emap the map of {particle : E} to build for the provided calorimeter object
-    @param etype the type of energy deposition to count
-  */
-  virtual void loadParticleMap( const INavigable* obj, 
-				std::map<const HepMC::GenParticle*,double>& emap,
-				EnergyType etype = VISIBLE,
-				void* caller = 0x0,
-				bool (*accept)(void*, const Identifier&) = &(ICaloParticleIDTool::idAccept) ) const = 0;
-  
-  // 
-  // accessors for calibration hit information
-  //
-  
-  
-  /* 
-     Return the energy of a given type from all hits in a calorimeter object.
-     
-     @param obj the calorimeter object to analyze
-     @param etype the type of energy deposition to count
-  */
-  virtual double energyInObject( const INavigable* obj, 
-				 EnergyType etype = INVISIBLE ) const = 0;
-  
-  
-  //
-  // accessors to get hits directly for particles / calorimeter objects
-  //
-  
-  
-  /*
-    Retrieve all hits associated with a particle.
-    
-    @param part the particle for which to find all associated calibration hits
-    @param hits the collection of calibration hits to build (allocated if NULL)
-  */
-  virtual void retrieveHits( const HepMC::GenParticle* part,
-			     CaloCalibrationHitContainer* hits /* = NULL */ ) const = 0;
-  
-  
-  /*
-    Retrieve all hits associated with a calorimeter object.
-    
-    @param obj the calorimeter object for which to find all associated calibration hits
-    @param hits the collection of calibration hits to build (allocated if NULL)   
-  */
-  virtual void retrieveHits( const INavigable* obj,
-			     CaloCalibrationHitContainer* hits /* = NULL */ ) const = 0;
-    
-  
-  //
-  // helpers that clients may find useful
-  //
-  
-  /*
-    Return pointer to the HepMC::GenParticle object with the specified barcode
-  */
-  virtual const HepMC::GenParticle* getParticle( unsigned int ) const = 0;
-  
-};
-
-#endif // ICALOPARTICLEIDTOOL_H
diff --git a/Calorimeter/CaloInterface/CaloInterface/selection.xml b/Calorimeter/CaloInterface/CaloInterface/selection.xml
index 462fa7345690ea2974a634fb950811771db36acf..826139f57ca21b48ef88f2e4d3e9e542950f6756 100644
--- a/Calorimeter/CaloInterface/CaloInterface/selection.xml
+++ b/Calorimeter/CaloInterface/CaloInterface/selection.xml
@@ -6,7 +6,6 @@
 <class name="ICalorimeterNoiseTool" />
 <class name="ICaloMBAverageTool" />
 <class name="ICaloCellNormalizedQualityTool" />
-<class name="ICaloParticleIDTool" />
 <class name="ICaloAffectedTool" />
 <class name="ICaloLumiBCIDTool" />
 </lcgdict>
diff --git a/Calorimeter/CaloInterface/doc/packagedoc.h b/Calorimeter/CaloInterface/doc/packagedoc.h
index c090c5d099184a8e59bd2a2bc235b619d8754b22..40295fdf1f99636b6f63eb5814110a6174896a6e 100644
--- a/Calorimeter/CaloInterface/doc/packagedoc.h
+++ b/Calorimeter/CaloInterface/doc/packagedoc.h
@@ -29,8 +29,6 @@ reconstruction
   - IClusterCellWeightTool.h     : interface for tools weighting cells in cluster objects
   - IClusterClassificationTool.h  : interface for tools classifying cluster objects
   - IHadronicCalibrationTool.h    : extends ICellWeightTool for more refined hadronic calibration information
-  - ICaloParticleIDTool.h : interface for calo object -> primary particle navigation, for tools which can be used
-        on simulated samples where the detailed calibration hits per primary G4 particle is available
   - ICaloAffectedTool.h  : interface for tool providing affected region info for a given 4 momentum object
   - ICaloCellNormalizedQualityTool.h  : interface for tool computing a normalized pulse shape quality from the raw quality
   - ICaloLumiBCIDTool.h : interface for tool computing BCID dependent pileup offset corrections
diff --git a/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCClassificationFile.h b/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCClassificationFile.h
index c94ec668c4c39fbd1698560a12d822fd30408790..8da3ea9c3027593a14a4f30b5559666847d36c45 100644
--- a/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCClassificationFile.h
+++ b/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCClassificationFile.h
@@ -20,13 +20,12 @@ class CaloReadLCClassificationFile : public AthAlgorithm
   StatusCode initialize(); 
   StatusCode execute();
   StatusCode finalize();
-  StatusCode initDataFromFile(std::string theLCClassificationFileName);
+  StatusCode initDataFromFile(std::string theLCClassificationFileName,
+                              CaloLocalHadCoeff& data);
 
  private:
   std::string m_key;
   std::string m_LCClassificationFileName;
-
-  CaloLocalHadCoeff * m_data;
 };
 
 #endif
diff --git a/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCJetEnergyScaleFile.h b/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCJetEnergyScaleFile.h
index cff2903962c99bcebd6a2c63c93acf41548c1734..ec148f4e55befc1f84bae925fdd0f387e449d01f 100644
--- a/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCJetEnergyScaleFile.h
+++ b/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCJetEnergyScaleFile.h
@@ -21,14 +21,12 @@ class CaloReadLCJetEnergyScaleFile : public AthAlgorithm
   StatusCode initialize(); 
   StatusCode execute();
   StatusCode finalize();
-  StatusCode initDataFromFile(std::vector<std::string> &theLCJetEnergyScaleFileNames, std::vector<std::string> &theLCJetEnergyScaleJetCollectionNames);
+  StatusCode initDataFromFile(std::vector<std::string> &theLCJetEnergyScaleFileNames, std::vector<std::string> &theLCJetEnergyScaleJetCollectionNames, CaloLocalHadCoeff& data);
 
  private:
   std::string m_key;
   std::vector<std::string> m_LCJetEnergyScaleFileNames;
   std::vector<std::string> m_LCJetEnergyScaleJetCollectionNames;
-
-  CaloLocalHadCoeff * m_data;
 };
 
 #endif
diff --git a/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCOutOfClusterFile.h b/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCOutOfClusterFile.h
index 6a232e40c6963ad6486ff5a1ed1ac5e3975d6b34..f5b27c633ac6ebce63953b4f05dba1ca22b097f4 100644
--- a/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCOutOfClusterFile.h
+++ b/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCOutOfClusterFile.h
@@ -20,13 +20,12 @@ class CaloReadLCOutOfClusterFile : public AthAlgorithm
   StatusCode initialize(); 
   StatusCode execute();
   StatusCode finalize();
-  StatusCode initDataFromFile(std::string theLCOutOfClusterFileName);
+  StatusCode initDataFromFile(std::string theLCOutOfClusterFileName,
+                              CaloLocalHadCoeff& data);
 
  private:
   std::string m_key;
   std::string m_LCOutOfClusterFileName;
-
-  CaloLocalHadCoeff * m_data;
 };
 
 #endif
diff --git a/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCWeightsFile.h b/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCWeightsFile.h
index 02897edd182c3913f3e8f5f51f6a7ac07a246bde..2f75396a422563c1257fd67706ef138ee312a968 100644
--- a/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCWeightsFile.h
+++ b/Calorimeter/CaloLocalHadCalib/CaloLocalHadCalib/CaloReadLCWeightsFile.h
@@ -20,13 +20,12 @@ class CaloReadLCWeightsFile : public AthAlgorithm
   StatusCode initialize(); 
   StatusCode execute();
   StatusCode finalize();
-  StatusCode initDataFromFile(std::string theLCWeightFileName);
+  StatusCode initDataFromFile(std::string theLCWeightFileName,
+                              CaloLocalHadCoeff& data);
 
  private:
   std::string m_key;
   std::string m_LCWeightFileName;
-
-  CaloLocalHadCoeff * m_data;
 };
 
 #endif
diff --git a/Calorimeter/CaloLocalHadCalib/src/CaloHadDMCoeffFit.cxx b/Calorimeter/CaloLocalHadCalib/src/CaloHadDMCoeffFit.cxx
index c34ec0e640c4847e2d8d3118befebd56c31ccf9d..ff74e6253ea70811471ca7873b890d9a8ade6b20 100644
--- a/Calorimeter/CaloLocalHadCalib/src/CaloHadDMCoeffFit.cxx
+++ b/Calorimeter/CaloLocalHadCalib/src/CaloHadDMCoeffFit.cxx
@@ -256,7 +256,7 @@ CaloLocalHadCoeff * CaloHadDMCoeffFit::process(CaloHadDMCoeffData *myData, CaloL
         const CaloLocalHadCoeff::LocalHadDimension *dimLambda = area->getDimension(CaloLocalHadCoeffHelper::DIM_LAMBDA);
         sprintf(hname,"m_hp2_DmWeight_%d",i_size);
         hp2 = new TProfile2D(hname, hname, dimEner->getNbins(), dimEner->getXmin(), dimEner->getXmax(), dimLambda->getNbins(), dimLambda->getXmin(), dimLambda->getXmax(), 0.0, m_weightMax);
-      }else{
+      }else if (refbin >= 0) {
         hp2 = m_hp2_DmWeight[refbin];
       }
       m_hp2_DmWeight[i_size] = hp2;
@@ -900,10 +900,12 @@ void CaloHadDMCoeffFit::make_report(std::string &sreport)
             gPad->SetRightMargin(0.2);
             hp2[1]->Draw("colz");
             pad2->cd(2);
-            m_hp2_DmWeight[ibin_min]->SetStats(0);
-            m_hp2_DmWeight[ibin_min]->SetMinimum(0.0);
-            m_hp2_DmWeight[ibin_min]->SetMaximum(1.0);
-            m_hp2_DmWeight[ibin_min]->Draw("colz");
+            if (ibin_min >= 0) {
+              m_hp2_DmWeight[ibin_min]->SetStats(0);
+              m_hp2_DmWeight[ibin_min]->SetMinimum(0.0);
+              m_hp2_DmWeight[ibin_min]->SetMaximum(1.0);
+              m_hp2_DmWeight[ibin_min]->Draw("colz");
+            }
             // drawing bin number for histograms
             for(int i_ener=0; i_ener<dimEner->getNbins(); i_ener++) {
               v_indx[CaloLocalHadCoeffHelper::DIM_ENER] = i_ener;
diff --git a/Calorimeter/CaloLocalHadCalib/src/CaloLocalHadCoeffHelper.cxx b/Calorimeter/CaloLocalHadCalib/src/CaloLocalHadCoeffHelper.cxx
index 44f013769234dbe4477faaf8df0b151176e1fb19..d48d08cc4f0a75c53a63b76be79b902b27f9539b 100644
--- a/Calorimeter/CaloLocalHadCalib/src/CaloLocalHadCoeffHelper.cxx
+++ b/Calorimeter/CaloLocalHadCalib/src/CaloLocalHadCoeffHelper.cxx
@@ -241,7 +241,7 @@ CaloLocalHadCoeff::LocalHadDimension *CaloLocalHadCoeffHelper::parse_dim(std::st
   float dim_xmax(0), dim_xmin(0);
 
   if( !(ist >> dim_title >> dim_nbins >> dim_xmin >> dim_xmax >> stype) ||
-      dim_nbins < 0 ||
+      dim_nbins <= 0 ||
       dim_nbins > 1000)
   {
     std::cout << "CaloHadDMCoeffHelper::parse_dim() -> Error! Could not parse line '" << sLine << "' at p1." << std::endl;
diff --git a/Calorimeter/CaloLocalHadCalib/src/CaloReadLCClassificationFile.cxx b/Calorimeter/CaloLocalHadCalib/src/CaloReadLCClassificationFile.cxx
index f21ed79ae41ddca2f3a6d91bfe48b2705ae75c5f..57506bfbe0db8bbd773e9a111343ce33ed5a8a34 100644
--- a/Calorimeter/CaloLocalHadCalib/src/CaloReadLCClassificationFile.cxx
+++ b/Calorimeter/CaloLocalHadCalib/src/CaloReadLCClassificationFile.cxx
@@ -4,7 +4,6 @@
 
 #include "CaloLocalHadCalib/CaloReadLCClassificationFile.h"
 #include "CaloConditions/CaloLocalHadDefs.h"
-#include "GaudiKernel/MsgStream.h"
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "StoreGate/StoreGateSvc.h"
 
@@ -21,21 +20,19 @@ CaloReadLCClassificationFile::CaloReadLCClassificationFile(const std::string & n
   AthAlgorithm(name,pSvcLocator) {
   declareProperty("LCClassificationFileName",m_LCClassificationFileName);
   declareProperty("ClassificationKey",m_key="EMFrac");
-
-  m_data = new CaloLocalHadCoeff();
 }
 
 
 CaloReadLCClassificationFile::~CaloReadLCClassificationFile() {}
 
 
-StatusCode CaloReadLCClassificationFile::initDataFromFile(std::string theLCClassificationFileName)
+StatusCode
+CaloReadLCClassificationFile::initDataFromFile(std::string theLCClassificationFileName,
+                                               CaloLocalHadCoeff& data)
 {
-  MsgStream log(msgSvc(), name());
-  
   // Find the full path to filename:
   std::string file = PathResolver::find_file (theLCClassificationFileName, "DATAPATH");
-  log << MSG::INFO << "Reading file  " << file << endmsg;
+  ATH_MSG_INFO ("Reading file  " << file);
   TFile* theLCClassificationFile = new TFile(file.c_str());
   if ( !theLCClassificationFile ) {
     return StatusCode::FAILURE;
@@ -81,7 +78,7 @@ StatusCode CaloReadLCClassificationFile::initDataFromFile(std::string theLCClass
     for (idim=0;idim<keys.size();idim++) {
       size_t found = sTitle.find(keys[idim]);
       if ( found == std::string::npos ) {
-	log << MSG::ERROR << "Could not find key " << keys[idim] << " in current histogram." << endmsg;
+	ATH_MSG_ERROR ("Could not find key " << keys[idim] << " in current histogram.");
 	allValid = false;
       }
       else {
@@ -89,7 +86,7 @@ StatusCode CaloReadLCClassificationFile::initDataFromFile(std::string theLCClass
 	std::istringstream tstr(sTitle.substr(found+keys[idim].length()));
 	tstr >> ibin[idim] >> c >> c >> rmin[idim] >> c >> rmax[idim] >> c >> nbin[idim];
 	if ( ibin[idim] < 0 || ibin[idim] >= nbin[idim] ) {
-	  log << MSG::ERROR << "Found invalid bin number " << ibin[idim] << " not in valid range [0," << nbin[idim] << " in current histogram." << endmsg;
+	  ATH_MSG_ERROR ("Found invalid bin number " << ibin[idim] << " not in valid range [0," << nbin[idim] << " in current histogram.");
 	  allValid = false;
 	}
       }
@@ -108,8 +105,8 @@ StatusCode CaloReadLCClassificationFile::initDataFromFile(std::string theLCClass
 	  CaloLocalHadCoeff::LocalHadDimension theDim(names[idim].c_str(),types[idim],nbin[idim],rmin[idim],rmax[idim]);
 	  theArea.addDimension(theDim);
 	}
-	log << MSG::INFO << "adding Area with nDim = " << theArea.getNdim() << endmsg;
-	m_data->addArea(theArea);
+	ATH_MSG_INFO ("adding Area with nDim = " << theArea.getNdim());
+	data.addArea(theArea);
       }
       // now fill all data for current histogram
       TAxis * xax = prof->GetXaxis();
@@ -125,11 +122,13 @@ StatusCode CaloReadLCClassificationFile::initDataFromFile(std::string theLCClass
 	  theData[CaloLocalHadDefs::BIN_ENTRIES] = prof->GetBinEntries(iBin);
 	  theData[CaloLocalHadDefs::BIN_ERROR]   = prof->GetBinError(iBin);
 		  
-	  log << MSG::INFO << "Now set data for bins: ";
+	  msg() << MSG::INFO << "Now set data for bins: ";
 	  for(unsigned int ii=0;ii<ibin.size();ii++)
-	    log << ibin[ii] << " ";
-	  log << endmsg;
-	  m_data->setCoeff(m_data->getBin(0,ibin),theData);
+	    msg() << ibin[ii] << " ";
+	  msg() << endmsg;
+          int dbin = data.getBin(0,ibin);
+          if (dbin >= 0)
+            data.setCoeff(dbin,theData);
 	}
       }
     }
@@ -140,30 +139,10 @@ StatusCode CaloReadLCClassificationFile::initDataFromFile(std::string theLCClass
 }
 
 StatusCode CaloReadLCClassificationFile::initialize() {
-  MsgStream log(msgSvc(), name());
-  log << MSG::INFO << " Building CaloLocalHadCoeff object " << endmsg;
-  StatusCode sc;
-  StoreGateSvc* detStore;
-  sc=service("DetectorStore",detStore);
-  if (sc.isFailure()) {
-     log << MSG::ERROR << "Unable to get the DetectorStore" << endmsg;
-     return sc;
-  }
-  sc=initDataFromFile(m_LCClassificationFileName);
-  if (sc.isFailure()) {
-     log << MSG::ERROR << "Unable to read input Data File" << endmsg;
-     return sc;
-  }
-  sc=detStore->record(m_data,m_key);
-  if (sc.isFailure()) {
-    log << MSG::ERROR << "Unable to record CaloLocalHadCoeff" << endmsg;
-    return sc;
-  }
-  sc=detStore->setConst(m_data);
-  if (sc.isFailure()) {
-    log << MSG::ERROR << "Unable to lock CaloLocalHadCoeff" << endmsg;
-    return sc;
-  }
+  ATH_MSG_INFO (" Building CaloLocalHadCoeff object ");
+  auto data = std::make_unique<CaloLocalHadCoeff>();
+  ATH_CHECK( initDataFromFile(m_LCClassificationFileName, *data) );
+  ATH_CHECK( detStore()->record(std::move(data), m_key, false) );
   return StatusCode::SUCCESS;
 }
 
diff --git a/Calorimeter/CaloLocalHadCalib/src/CaloReadLCJetEnergyScaleFile.cxx b/Calorimeter/CaloLocalHadCalib/src/CaloReadLCJetEnergyScaleFile.cxx
index c57558926ee73a4a36717c0e10eafcdbbd7c77e2..6c2a4405892c14afa991570b0ac33fa936dacbe8 100644
--- a/Calorimeter/CaloLocalHadCalib/src/CaloReadLCJetEnergyScaleFile.cxx
+++ b/Calorimeter/CaloLocalHadCalib/src/CaloReadLCJetEnergyScaleFile.cxx
@@ -4,7 +4,6 @@
 
 #include "CaloLocalHadCalib/CaloReadLCJetEnergyScaleFile.h"
 #include "CaloConditions/CaloLocalHadDefs.h"
-#include "GaudiKernel/MsgStream.h"
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "StoreGate/StoreGateSvc.h"
 
@@ -22,22 +21,19 @@ CaloReadLCJetEnergyScaleFile::CaloReadLCJetEnergyScaleFile(const std::string & n
   declareProperty("LCJetEnergyScaleFileNames",m_LCJetEnergyScaleFileNames);
   declareProperty("LCJetEnergyScaleJetCollectionNames",m_LCJetEnergyScaleJetCollectionNames);
   declareProperty("CorrectionKey",m_key="JESCorrection");
-
-  m_data = new CaloLocalHadCoeff();
 }
 
 
 CaloReadLCJetEnergyScaleFile::~CaloReadLCJetEnergyScaleFile() {}
 
 
-StatusCode CaloReadLCJetEnergyScaleFile::initDataFromFile(std::vector<std::string> &theLCJetEnergyScaleFileNames, std::vector<std::string> &theLCJetEnergyScaleJetCollectionNames)
+StatusCode CaloReadLCJetEnergyScaleFile::initDataFromFile(std::vector<std::string> &theLCJetEnergyScaleFileNames, std::vector<std::string> &theLCJetEnergyScaleJetCollectionNames,
+                                                          CaloLocalHadCoeff& data)
 {
-  MsgStream log(msgSvc(), name());
-
   for (unsigned int iFile=0;iFile<theLCJetEnergyScaleFileNames.size();iFile++) {
     // Find the full path to filename:
     std::string file = PathResolver::find_file (theLCJetEnergyScaleFileNames[iFile], "DATAPATH");
-    log << MSG::INFO << "Reading file  " << file << endmsg;
+    ATH_MSG_INFO( "Reading file  " << file  );
     TFile* theLCJetEnergyScaleFile = new TFile(file.c_str());
     if ( !theLCJetEnergyScaleFile ) {
       return StatusCode::FAILURE;
@@ -81,7 +77,7 @@ StatusCode CaloReadLCJetEnergyScaleFile::initDataFromFile(std::vector<std::strin
       for (idim=0;idim<keys.size();idim++) {
 	size_t found = sTitle.find(keys[idim]);
 	if ( found == std::string::npos ) {
-	  log << MSG::ERROR << "Could not find key " << keys[idim] << " in current histogram." << endmsg;
+	  ATH_MSG_ERROR( "Could not find key " << keys[idim] << " in current histogram."  );
 	  allValid = false;
 	}
 	else {
@@ -94,7 +90,7 @@ StatusCode CaloReadLCJetEnergyScaleFile::initDataFromFile(std::vector<std::strin
 	  rmax[idim] = 5.; // |eta| max
 	  
 	  if ( ibin[idim] < 0 || ibin[idim] >= nbin[idim] ) {
-	    log << MSG::ERROR << "Found invalid bin number " << ibin[idim] << " not in valid range [0," << nbin[idim] << " in current histogram." << endmsg;
+	    ATH_MSG_ERROR( "Found invalid bin number " << ibin[idim] << " not in valid range [0," << nbin[idim] << " in current histogram."  );
 	    allValid = false;
 	  }
 	}
@@ -124,8 +120,8 @@ StatusCode CaloReadLCJetEnergyScaleFile::initDataFromFile(std::vector<std::strin
 	    CaloLocalHadCoeff::LocalHadDimension theDim(names[idim].c_str(),types[idim],nbin[idim],rmin[idim],rmax[idim]);
 	    theArea.addDimension(theDim);
 	  }
-	  log << MSG::INFO << "adding Area with nDim = " << theArea.getNdim() << endmsg;
-	  m_data->addArea(theArea);
+	  ATH_MSG_INFO( "adding Area with nDim = " << theArea.getNdim()  );
+	  data.addArea(theArea);
 	}
 	// now fill all data for current histogram
 	TAxis * xax = prof->GetXaxis();
@@ -141,11 +137,13 @@ StatusCode CaloReadLCJetEnergyScaleFile::initDataFromFile(std::vector<std::strin
 	    theData[CaloLocalHadDefs::BIN_ENTRIES] = prof->GetBinEntries(iBin);
 	    theData[CaloLocalHadDefs::BIN_ERROR]   = prof->GetBinError(iBin);
 	    
-	    log << MSG::INFO << "Now set data for bins: ";
+	    msg() << MSG::INFO << "Now set data for bins: ";
 	    for(unsigned int ii=0;ii<ibin.size();ii++)
-	      log << ibin[ii] << " ";
-	    log << endmsg;
-	    m_data->setCoeff(m_data->getBin(iFile,ibin),theData);
+	      msg() << ibin[ii] << " ";
+	    msg() << endmsg;
+            int dbin = data.getBin(iFile,ibin);
+            if (dbin >= 0)
+              data.setCoeff(dbin,theData);
 	  }
 	}
       }
@@ -156,31 +154,10 @@ StatusCode CaloReadLCJetEnergyScaleFile::initDataFromFile(std::vector<std::strin
 }
 
 StatusCode CaloReadLCJetEnergyScaleFile::initialize() {
-  MsgStream log(msgSvc(), name());
-  log << MSG::INFO << " Building CaloLocalHadCoeff object " << endmsg;
-  StatusCode sc;
-  StoreGateSvc* detStore;
-  sc=service("DetectorStore",detStore);
-  if (sc.isFailure()) {
-     log << MSG::ERROR << "Unable to get the DetectorStore" << endmsg;
-     return sc;
-   }
-  sc=initDataFromFile(m_LCJetEnergyScaleFileNames, m_LCJetEnergyScaleJetCollectionNames);
-  if (sc.isFailure()) {
-     log << MSG::ERROR << "Unable to init data from file" << endmsg;
-     return sc;
-   }
-
-  sc=detStore->record(m_data,m_key);
-  if (sc.isFailure()) {
-    log << MSG::ERROR << "Unable to record CaloLocalHadCoeff" << endmsg;
-    return sc;
-  }
-  sc=detStore->setConst(m_data);
-  if (sc.isFailure()) {
-    log << MSG::ERROR << "Unable to lock CaloLocalHadCoeff" << endmsg;
-    return sc;
-  }
+  ATH_MSG_INFO( " Building CaloLocalHadCoeff object "  );
+  auto data = std::make_unique<CaloLocalHadCoeff>();
+  ATH_CHECK( initDataFromFile(m_LCJetEnergyScaleFileNames, m_LCJetEnergyScaleJetCollectionNames, *data) );
+  ATH_CHECK( detStore()->record(std::move(data), m_key, false) );
   return StatusCode::SUCCESS;
 }
 
diff --git a/Calorimeter/CaloLocalHadCalib/src/CaloReadLCOutOfClusterFile.cxx b/Calorimeter/CaloLocalHadCalib/src/CaloReadLCOutOfClusterFile.cxx
index d4bbe3e5234f0f79681bbff0aa230f5ff3e985dc..a31c9e8a6517ce66fc62403e714c64e18b62173c 100644
--- a/Calorimeter/CaloLocalHadCalib/src/CaloReadLCOutOfClusterFile.cxx
+++ b/Calorimeter/CaloLocalHadCalib/src/CaloReadLCOutOfClusterFile.cxx
@@ -4,7 +4,6 @@
 
 #include "CaloLocalHadCalib/CaloReadLCOutOfClusterFile.h"
 #include "CaloConditions/CaloLocalHadDefs.h"
-#include "GaudiKernel/MsgStream.h"
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "StoreGate/StoreGateSvc.h"
 
@@ -21,21 +20,18 @@ CaloReadLCOutOfClusterFile::CaloReadLCOutOfClusterFile(const std::string & name,
   AthAlgorithm(name,pSvcLocator) {
   declareProperty("LCOutOfClusterFileName",m_LCOutOfClusterFileName);
   declareProperty("CorrectionKey",m_key="OOC");
-
-  m_data = new CaloLocalHadCoeff();
 }
 
 
 CaloReadLCOutOfClusterFile::~CaloReadLCOutOfClusterFile() {}
 
 
-StatusCode CaloReadLCOutOfClusterFile::initDataFromFile(std::string theLCOutOfClusterFileName)
+StatusCode CaloReadLCOutOfClusterFile::initDataFromFile(std::string theLCOutOfClusterFileName,
+                                                        CaloLocalHadCoeff& data)
 {
-  MsgStream log(msgSvc(), name());
-  
   // Find the full path to filename:
   std::string file = PathResolver::find_file (theLCOutOfClusterFileName, "DATAPATH");
-  log << MSG::INFO << "Reading file  " << file << endmsg;
+  ATH_MSG_INFO( "Reading file  " << file  );
   TFile* theLCOutOfClusterFile = new TFile(file.c_str());
   if ( !theLCOutOfClusterFile ) {
     return StatusCode::FAILURE;
@@ -78,7 +74,7 @@ StatusCode CaloReadLCOutOfClusterFile::initDataFromFile(std::string theLCOutOfCl
     for (idim=0;idim<keys.size();idim++) {
       size_t found = sTitle.find(keys[idim]);
       if ( found == std::string::npos ) {
-	log << MSG::ERROR << "Could not find key " << keys[idim] << " in current histogram." << endmsg;
+	ATH_MSG_ERROR( "Could not find key " << keys[idim] << " in current histogram."  );
 	allValid = false;
       }
       else {
@@ -86,7 +82,7 @@ StatusCode CaloReadLCOutOfClusterFile::initDataFromFile(std::string theLCOutOfCl
 	std::istringstream tstr(sTitle.substr(found+keys[idim].length()));
 	tstr >> ibin[idim] >> c >> c >> rmin[idim] >> c >> rmax[idim] >> c >> nbin[idim];
 	if ( ibin[idim] < 0 || ibin[idim] >= nbin[idim] ) {
-	  log << MSG::ERROR << "Found invalid bin number " << ibin[idim] << " not in valid range [0," << nbin[idim] << " in current histogram." << endmsg;
+	  ATH_MSG_ERROR( "Found invalid bin number " << ibin[idim] << " not in valid range [0," << nbin[idim] << " in current histogram."  );
 	  allValid = false;
 	}
       }
@@ -103,11 +99,11 @@ StatusCode CaloReadLCOutOfClusterFile::initDataFromFile(std::string theLCOutOfCl
       if ( theArea.getNdim() == 0 ) {
 	for (idim = 0;idim<names.size();idim++) {
 	  CaloLocalHadCoeff::LocalHadDimension theDim(names[idim].c_str(),types[idim],nbin[idim],rmin[idim],rmax[idim]);
-          log << MSG::INFO << "adding dimension " << names[idim].c_str() << " " << types[idim]<< " " << nbin[idim]<< " " << rmin[idim]<< " " << rmax[idim] << endmsg;
+          ATH_MSG_INFO( "adding dimension " << names[idim].c_str() << " " << types[idim]<< " " << nbin[idim]<< " " << rmin[idim]<< " " << rmax[idim]  );
 	  theArea.addDimension(theDim);
 	}
-	log << MSG::INFO << "adding Area with nDim = " << theArea.getNdim() << endmsg;
-	m_data->addArea(theArea);
+	ATH_MSG_INFO( "adding Area with nDim = " << theArea.getNdim()  );
+	data.addArea(theArea);
       }
       // now fill all data for current histogram
       TAxis * xax = prof->GetXaxis();
@@ -123,11 +119,13 @@ StatusCode CaloReadLCOutOfClusterFile::initDataFromFile(std::string theLCOutOfCl
 	  theData[CaloLocalHadDefs::BIN_ENTRIES] = prof->GetBinEntries(iBin);
 	  theData[CaloLocalHadDefs::BIN_ERROR]   = prof->GetBinError(iBin);
 		  
-	  log << MSG::INFO << "Now set data for bins: ";
+	  msg() << MSG::INFO << "Now set data for bins: ";
 	  for(unsigned int ii=0;ii<ibin.size();ii++)
-	    log << ibin[ii] << " ";
-	  log << endmsg;
-	  m_data->setCoeff(m_data->getBin(0,ibin),theData);
+	    msg() << ibin[ii] << " ";
+	  msg() << endmsg;
+          int dbin = data.getBin(0,ibin);
+          if (dbin >= 0)
+            data.setCoeff(dbin,theData);
 	}
       }
     }
@@ -138,30 +136,10 @@ StatusCode CaloReadLCOutOfClusterFile::initDataFromFile(std::string theLCOutOfCl
 }
 
 StatusCode CaloReadLCOutOfClusterFile::initialize() {
-  MsgStream log(msgSvc(), name());
-  log << MSG::INFO << " Building CaloLocalHadCoeff object " << endmsg;
-  StatusCode sc;
-  StoreGateSvc* detStore;
-  sc=service("DetectorStore",detStore);
-  if (sc.isFailure()) {
-     log << MSG::ERROR << "Unable to get the DetectorStore" << endmsg;
-     return sc;
-  }
-  sc=initDataFromFile(m_LCOutOfClusterFileName);
-  if (sc.isFailure()) {
-     log << MSG::ERROR << "Unable to read input Data File" << endmsg;
-     return sc;
-  }
-  sc=detStore->record(m_data,m_key);
-  if (sc.isFailure()) {
-    log << MSG::ERROR << "Unable to record CaloLocalHadCoeff" << endmsg;
-    return sc;
-  }
-  sc=detStore->setConst(m_data);
-  if (sc.isFailure()) {
-    log << MSG::ERROR << "Unable to lock CaloLocalHadCoeff" << endmsg;
-    return sc;
-  }
+  ATH_MSG_INFO( " Building CaloLocalHadCoeff object "  );
+  auto data = std::make_unique<CaloLocalHadCoeff>();
+  ATH_CHECK( initDataFromFile(m_LCOutOfClusterFileName, *data) );
+  ATH_CHECK( detStore()->record(std::move(data), m_key, false) );
   return StatusCode::SUCCESS;
 }
 
diff --git a/Calorimeter/CaloLocalHadCalib/src/CaloReadLCWeightsFile.cxx b/Calorimeter/CaloLocalHadCalib/src/CaloReadLCWeightsFile.cxx
index 1a9cbe9245c44e913df7f25f29c5af79e2535d74..f22317e913ebb73214b4f8767332a0340b7f6c43 100644
--- a/Calorimeter/CaloLocalHadCalib/src/CaloReadLCWeightsFile.cxx
+++ b/Calorimeter/CaloLocalHadCalib/src/CaloReadLCWeightsFile.cxx
@@ -5,7 +5,6 @@
 #include "CaloLocalHadCalib/CaloReadLCWeightsFile.h"
 #include "CaloConditions/CaloLocalHadDefs.h"
 #include "CaloUtils/CaloSamplingHelper.h"
-#include "GaudiKernel/MsgStream.h"
 #include "CaloIdentifier/CaloCell_ID.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "PathResolver/PathResolver.h"
@@ -21,20 +20,17 @@ CaloReadLCWeightsFile::CaloReadLCWeightsFile(const std::string & name,
   AthAlgorithm(name,pSvcLocator) {
   declareProperty("LCWeightFileName",m_LCWeightFileName);
   declareProperty("CorrectionKey",m_key="HadWeights");
-
-  m_data = new CaloLocalHadCoeff();
 }
 
 
 CaloReadLCWeightsFile::~CaloReadLCWeightsFile() {}
 
-StatusCode CaloReadLCWeightsFile::initDataFromFile(std::string theLCWeightFileName)
+StatusCode CaloReadLCWeightsFile::initDataFromFile(std::string theLCWeightFileName,
+                                                   CaloLocalHadCoeff& data)
 {
-  MsgStream log(msgSvc(), name());
-  
   // Find the full path to filename:
   std::string file = PathResolver::find_file (theLCWeightFileName, "DATAPATH");
-  log << MSG::INFO << "Reading file  " << file << endmsg;
+  ATH_MSG_INFO( "Reading file  " << file  );
 
   std::vector<int> isampmap(CaloSampling::Unknown,-1);
   unsigned int nAreas(0);
@@ -59,14 +55,14 @@ StatusCode CaloReadLCWeightsFile::initDataFromFile(std::string theLCWeightFileNa
       std::string key("_isamp_");
       size_t found = sTitle.find(key);
       if ( found == std::string::npos ) {
-	log << MSG::ERROR << "Could not find key " << key << " in current histogram." << endmsg;
+	ATH_MSG_ERROR( "Could not find key " << key << " in current histogram."  );
       }
       else {
 	std::istringstream tstr(sTitle.substr(found+key.length()));
 	int isamp(-1);
 	tstr >> isamp;
 	if ( isamp <= 0 || isamp >= CaloSampling::Unknown ) {
-	  log << MSG::ERROR << "Found invalid sampling " << isamp << " in current histogram." << endmsg;
+	  ATH_MSG_ERROR( "Found invalid sampling " << isamp << " in current histogram."  );
 	}
 	else {
 	  // now the other dimensions
@@ -100,7 +96,7 @@ StatusCode CaloReadLCWeightsFile::initDataFromFile(std::string theLCWeightFileNa
 	  for (idim=0;idim<keys.size();idim++) {
 	    found = sTitle.find(keys[idim]);
 	    if ( found == std::string::npos ) {
-	      log << MSG::ERROR << "Could not find key " << keys[idim] << " in current histogram." << endmsg;
+	      ATH_MSG_ERROR( "Could not find key " << keys[idim] << " in current histogram."  );
 	      allValid = false;
 	    }
 	    else {
@@ -108,7 +104,7 @@ StatusCode CaloReadLCWeightsFile::initDataFromFile(std::string theLCWeightFileNa
 	      std::istringstream tstr(sTitle.substr(found+keys[idim].length()));
 	      tstr >> ibin[idim] >> c >> c >> rmin[idim] >> c >> rmax[idim] >> c >> nbin[idim];
 	      if ( ibin[idim] < 0 || ibin[idim] >= nbin[idim] ) {
-		log << MSG::ERROR << "Found invalid bin number " << ibin[idim] << " not in valid range [0," << nbin[idim] << " in current histogram." << endmsg;
+		ATH_MSG_ERROR( "Found invalid bin number " << ibin[idim] << " not in valid range [0," << nbin[idim] << " in current histogram."  );
 		allValid = false;
 	      }
 	    }
@@ -145,12 +141,12 @@ StatusCode CaloReadLCWeightsFile::initDataFromFile(std::string theLCWeightFileNa
 		  theData[CaloLocalHadDefs::BIN_ENTRIES] = prof->GetBinEntries(iBin);
 		  theData[CaloLocalHadDefs::BIN_ERROR]   = prof->GetBinError(iBin);
 		  
-		  log << MSG::INFO << "Now set data for isamp=" << isamp
+		  msg() << MSG::INFO << "Now set data for isamp=" << isamp
 		      << " and bins: ";
 		  for(unsigned int ii=0;ii<ibin.size();ii++)
-		    log << ibin[ii] << " ";
-		  log << endmsg;
-		  m_data->setCoeff(m_data->getBin(isampmap[isamp],ibin),theData);
+		    msg() << ibin[ii] << " ";
+		  msg() << endmsg;
+		  data.setCoeff(data.getBin(isampmap[isamp],ibin),theData);
 		}
 	      }
 	    }
@@ -163,8 +159,8 @@ StatusCode CaloReadLCWeightsFile::initDataFromFile(std::string theLCWeightFileNa
       // create the data object from all areas
       for(unsigned int jsamp=0;jsamp<theAreas.size();jsamp++) {
 	if ( theAreas[jsamp].getNdim() > 0 ) { 
-	  log << MSG::INFO << "adding Area for jsamp=" << jsamp << " with nDim = " << theAreas[jsamp].getNdim() << endmsg;
-	  m_data->addArea(theAreas[jsamp]);
+	  ATH_MSG_INFO( "adding Area for jsamp=" << jsamp << " with nDim = " << theAreas[jsamp].getNdim()  );
+	  data.addArea(theAreas[jsamp]);
 	}
       }
     }
@@ -175,30 +171,10 @@ StatusCode CaloReadLCWeightsFile::initDataFromFile(std::string theLCWeightFileNa
 }
                             
 StatusCode CaloReadLCWeightsFile::initialize() {
-  MsgStream log(msgSvc(), name());
-  log << MSG::INFO << " Building CaloLocalHadCoeff object " << endmsg;
-  StatusCode sc;
-  StoreGateSvc* detStore;
-  sc=service("DetectorStore",detStore);
-  if (sc.isFailure()) {
-     log << MSG::ERROR << "Unable to get the DetectorStore" << endmsg;
-     return sc;
-  }
-  sc=initDataFromFile(m_LCWeightFileName);
-  if (sc.isFailure()) {
-     log << MSG::ERROR << "Unable to read input Data File" << endmsg;
-     return sc;
-  }
-  sc=detStore->record(m_data,m_key);
-  if (sc.isFailure()) {
-    log << MSG::ERROR << "Unable to record CaloLocalHadCoeff" << endmsg;
-    return sc;
-  }
-  sc=detStore->setConst(m_data);
-  if (sc.isFailure()) {
-    log << MSG::ERROR << "Unable to lock CaloLocalHadCoeff" << endmsg;
-    return sc;
-  }
+  ATH_MSG_INFO( " Building CaloLocalHadCoeff object "  );
+  auto data = std::make_unique<CaloLocalHadCoeff>();
+  ATH_CHECK( initDataFromFile(m_LCWeightFileName, *data) );
+  ATH_CHECK( detStore()->record(std::move(data), m_key, false) );
   return StatusCode::SUCCESS;
 }
 
diff --git a/Calorimeter/CaloLocalHadCalib/src/GetLCDeadMaterial.cxx b/Calorimeter/CaloLocalHadCalib/src/GetLCDeadMaterial.cxx
index 7cf3b13e25fa26c71a507ef0165fc0947ef99055..d26159326970b523249b23a459640f0f977b0e5d 100644
--- a/Calorimeter/CaloLocalHadCalib/src/GetLCDeadMaterial.cxx
+++ b/Calorimeter/CaloLocalHadCalib/src/GetLCDeadMaterial.cxx
@@ -121,7 +121,7 @@ StatusCode GetLCDeadMaterial::initialize()
   ******************************************** */
   CaloLocalHadCoeffHelper dmHelper;
   std::string fileName = PathResolver::find_file (m_HadDMCoeffInputFile, "DATAPATH");
-  CaloLocalHadCoeff * initHadDMCoeff = dmHelper.InitDataFromFile(fileName.c_str());
+  std::unique_ptr<CaloLocalHadCoeff> initHadDMCoeff (dmHelper.InitDataFromFile(fileName.c_str()));
   if( !initHadDMCoeff ) {
     ATH_MSG_FATAL( " Error while initializing default dead material coefficients " );
     return StatusCode::FAILURE;
@@ -152,15 +152,15 @@ StatusCode GetLCDeadMaterial::initialize()
   }
   dmData->SetMaxEventsPerFile(m_MaxEventsPerFile);
 
-  CaloLocalHadCoeff *newHadDMCoeffFit = 0;
-  CaloLocalHadCoeff *newHadDMCoeffMinim = 0;
+  std::unique_ptr<CaloLocalHadCoeff> newHadDMCoeffFit;
+  std::unique_ptr<CaloLocalHadCoeff> newHadDMCoeffMinim;
 
   // TProfile approach (presamplers, material between EMB&TILE, EMEC&HEC)
   // and lookup approach (leakages, unclassified DM energy)
   if(m_doFit) {
     CaloHadDMCoeffFit *dmFit = new CaloHadDMCoeffFit();
     dmFit->SetNormalizationType(m_NormalizationTypeForFit);
-    newHadDMCoeffFit = dmFit->process(dmData.get(), initHadDMCoeff, m_isSingleParticle, m_isTestbeam);
+    newHadDMCoeffFit = std::unique_ptr<CaloLocalHadCoeff>(dmFit->process(dmData.get(), initHadDMCoeff.get(), m_isSingleParticle, m_isTestbeam));
     if( !newHadDMCoeffFit ) {
       ATH_MSG_FATAL( "Failed in CaloHadDMCoeffFit::process()"  );
       delete dmFit;
@@ -176,9 +176,9 @@ StatusCode GetLCDeadMaterial::initialize()
     dmMinim->SetNormalizationType(m_NormalizationTypeForMinim);
     if(newHadDMCoeffFit) {
       // to use previous coefficients as initial values
-      newHadDMCoeffMinim = dmMinim->process(dmData.get(), newHadDMCoeffFit, m_isSingleParticle, m_isTestbeam);
+      newHadDMCoeffMinim = std::unique_ptr<CaloLocalHadCoeff>(dmMinim->process(dmData.get(), newHadDMCoeffFit.get(), m_isSingleParticle, m_isTestbeam));
     }else{
-      newHadDMCoeffMinim = dmMinim->process(dmData.get(), initHadDMCoeff, m_isSingleParticle, m_isTestbeam);
+      newHadDMCoeffMinim = std::unique_ptr<CaloLocalHadCoeff>(dmMinim->process(dmData.get(), initHadDMCoeff.get(), m_isSingleParticle, m_isTestbeam));
     }
     if( !newHadDMCoeffMinim ) {
       ATH_MSG_FATAL( "Failed in CaloHadDMCoeffMinim::process()"  );
@@ -219,9 +219,6 @@ StatusCode GetLCDeadMaterial::initialize()
   }
 
   // end of the game
-  if(newHadDMCoeffFit) delete newHadDMCoeffFit;
-  if(newHadDMCoeffMinim) delete newHadDMCoeffMinim;
-  delete initHadDMCoeff;
   delete pChain;
 
   if(result && !m_doPool) delete result;
diff --git a/Calorimeter/CaloParticleID/CMakeLists.txt b/Calorimeter/CaloParticleID/CMakeLists.txt
deleted file mode 100644
index 101b7f97f2dad96a170887fb317954b09eade69c..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloParticleID/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-################################################################################
-# Package: CaloParticleID
-################################################################################
-
-# Declare the package name:
-atlas_subdir( CaloParticleID )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloEvent
-                          Calorimeter/CaloInterface
-                          Calorimeter/CaloSimEvent
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PhysicsAnalysis/TruthParticleID/McParticleEvent
-                          PRIVATE
-                          Calorimeter/CaloDetDescr
-                          Control/Navigation
-                          Generators/GenAnalysisTools/TruthHelper )
-
-# Component(s) in the package:
-atlas_add_component( CaloParticleID
-                     src/*.cxx
-                     src/components/*.cxx
-                     LINK_LIBRARIES CaloEvent CaloSimEvent AthenaBaseComps GaudiKernel McParticleEvent CaloDetDescrLib Navigation TruthHelper )
-
-# Install files from the package:
-atlas_install_headers( CaloParticleID )
-
diff --git a/Calorimeter/CaloParticleID/CaloParticleID/CaloParticleIDTool.h b/Calorimeter/CaloParticleID/CaloParticleID/CaloParticleIDTool.h
deleted file mode 100644
index 398d849960952beb9a09e9553f40cf1d6f540895..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloParticleID/CaloParticleID/CaloParticleIDTool.h
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/************************************************************************
-                     CaloParticleIDTool.h - Copyright ATLAS Collaboration
-
-author: Doug Schouten <dschoute at sfu dot ca>
-author: Gennady Pospelov <pospelov at mppmu dot mpg dot de>
-
-**************************************************************************/
-
-#ifndef CALOPARTICLEIDTOOL_H
-#define CALOPARTICLEIDTOOL_H
-
-#include "GaudiKernel/AlgTool.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/MsgStream.h"
-#include "GaudiKernel/IIncidentSvc.h"
-#include "GaudiKernel/Incident.h"
-
-#include "AthenaBaseComps/AthAlgTool.h"
-
-#include "CaloSimEvent/CaloCalibrationHit.h"
-#include "CaloSimEvent/CaloCalibrationHitContainer.h"
-#include "CaloEvent/CaloCell.h"
-
-#include "McParticleEvent/TruthParticle.h"
-#include "McParticleEvent/TruthParticleContainer.h"
-
-#include "CaloInterface/ICaloParticleIDTool.h"
-
-#include <limits>
-#include <map>
-#include <string>
-#include <vector>
-
-class CaloDetDescrManager;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Class to access calibration hit information, including 
-// particle provenance, for (composite) calorimeter objects.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-class CaloParticleIDTool : virtual public ICaloParticleIDTool, 
-			   virtual public IIncidentListener,
-			   public AthAlgTool
-{
-public:
-  CaloParticleIDTool(const std::string&,
-		     const std::string&,
-		     const IInterface*);
-  
-  virtual ~CaloParticleIDTool() {}
-  
-  
-  virtual StatusCode initialize();
-  virtual StatusCode finalize();
-  
-  //
-  // ICaloParticleIDTool API - see https://twiki.cern.ch/twiki/bin/viewauth/Atlas/CaloParticleID
-  //
-  
-  // return the weighted sum of the energy of all hits left by a particle inside a calorimeter object
-  virtual double energyFromParticle( const INavigable* calObject, 
-				     const HepMC::GenParticle* particle, 
-				     EnergyType t = VISIBLE ) const ;
-  
-
-  // return the energy deposited in the calorimeter by a particle, applying a filter to identify cells of interest.
-  virtual double energyInCalorimeter( const HepMC::GenParticle* particle, 
-				      EnergyType t = VISIBLE,
-				      void* caller = 0x0, 
-				      bool (*accept)(void*, const Identifier&) = &(ICaloParticleIDTool::idAccept)) const ;
-
-  
-  // return the energy-weighted pseudorapidity in the calorimeter by a particle, applying a filter to identify cells of interest.
-  virtual double etaInCalorimeter( const HepMC::GenParticle* particle,
-				   EnergyType t = VISIBLE,
-				   void* caller = 0x0, 
-				   bool (*accept)(void*, const Identifier&) = &(ICaloParticleIDTool::idAccept) ) const ;
-
-
-  // return the energy deposited in dead material by a particle
-  virtual double energyInDeadMaterial( const HepMC::GenParticle* particle, 
-				       EnergyType t = TOTAL,
-				       void* caller = 0x0, 
-				       bool (*accept)(void*, const Identifier&) = &(ICaloParticleIDTool::idAccept)) const ;
-  
-  
-  // load energy map of all particles contributing hits to a calorimeter object.
-  virtual void loadParticleMap( const INavigable* caloObject, 
-				std::map<const HepMC::GenParticle*,double>& m, 
-				EnergyType t = VISIBLE,
-				void* caller = 0x0, 
-				bool (*accept)(void*, const Identifier&) = &(ICaloParticleIDTool::idAccept) ) const ;
-  
-  // return the energy of a given type from all hits in a calorimeter object
-  virtual double energyInObject( const INavigable* calObject, 
-				 EnergyType t = VISIBLE ) const ;
-  
-  
-  // retrieve all hits associated with a particle
-  virtual void retrieveHits( const HepMC::GenParticle* particle, 
-			     CaloCalibrationHitContainer* hits ) const ;
-  
-  
-  // retrieve all hits associated with a calorimeter object
-  virtual void retrieveHits( const INavigable* calObject, 
-			     CaloCalibrationHitContainer* hits ) const ;  
-
-
-  // retrieve all hits associated with a calorimeter cell
-  virtual void retrieveHits( const Identifier ID, 
-			     const std::vector<const CaloCalibrationHit*>*& hits) const ;
-
-  
-  // return pointer to the HepMC::GenParticle object with the specified barcode
-  virtual const HepMC::GenParticle* getParticle( unsigned int barcode ) const ;
-
-
-  // register a call-back to transform hit quantities upon retrieval from SG
-  virtual void registerHitTransformation( void*, CaloCalibrationHit* (*transform)( void*, const CaloCalibrationHit* ) ) ;
-
-
-  //
-  // IIncidentListener API
-  //
-
-  // handle a begin event incident 
-  void handle( const Incident& );
-
-  // reload the calibration hit information for an event
-  virtual StatusCode setupEvent( );
-
-protected:
-  
-  //
-  // Useful class definitions to manage internal data
-  //
-  
-  // ++ --------------------------------------------------- ++
-
-  class CalibrationHitInfo {
-  public:
-    typedef std::vector<const CaloCalibrationHit*> hitcollection_t;
-    typedef std::vector<double> weightcollection_t;
-    
-    mutable double energy_invisible;
-    mutable double energy_em;
-    mutable double energy_nonem;
-    mutable double energy_total;
-    
-    CalibrationHitInfo( )
-    {
-      energy_invisible = 0.;
-      energy_em        = 0.;
-      energy_nonem     = 0.;
-      energy_total     = 0.;
-    }
-
-    CalibrationHitInfo( const CalibrationHitInfo& other )
-    {
-      energy_invisible = 0.;
-      energy_em        = 0.;
-      energy_nonem     = 0.;
-      energy_total     = 0.;
-      for( unsigned int i = 0; i < other.hits().size(); ++i )
-	add( other.hits()[i], other.weights()[i] );
-    }
-    
-    CalibrationHitInfo& operator= ( const CalibrationHitInfo& other )
-    {
-      if (this != &other) {
-        energy_invisible = 0.;
-        energy_em        = 0.;
-        energy_nonem     = 0.;
-        energy_total     = 0.;
-        m_hits.clear();
-        for( unsigned int i = 0; i < other.hits().size(); ++i )
-          add( other.hits()[i] );
-      }
-      return *this;
-    }
-
-
-    ~CalibrationHitInfo( ) {}
-
-    void add( const CaloCalibrationHit* hit, double w = 1.0 ) const 
-    { 
-      m_hits.push_back( hit ); 
-      m_weights.push_back( w );
-
-      energy_invisible += w * (hit->energyInvisible() + hit->energyEscaped());
-      energy_em        += w * hit->energyEM();
-      energy_nonem     += w * hit->energyNonEM();
-      energy_total     += w * hit->energyTotal();
-    }
-    
-    const std::vector<const CaloCalibrationHit*>& hits() const { return m_hits; }
-    const std::vector<double>& weights() const { return m_weights; }
-
-    hitcollection_t::const_iterator begin( ) const { return m_hits.begin(); }
-    hitcollection_t::const_iterator end( )   const { return m_hits.end();   }
-
-    double weight( unsigned int i ) const { return ( i < m_weights.size() ? m_weights[i] : 0. ); }
-  protected:
-    mutable hitcollection_t      m_hits;    //! list of calibration hits in the cell
-    mutable weightcollection_t   m_weights; //! weights for each hit
-  };
-
-  // ++ --------------------------------------------------- ++
-  
-  class ParticleInfo : public CalibrationHitInfo {    
-  public:    
-    mutable double energy_measurable;
-    
-    ParticleInfo( unsigned int bc ) : CalibrationHitInfo( )
-    {
-      energy_measurable = 0;
-      m_barcode = bc;
-    }
-
-    ParticleInfo( const CaloCalibrationHit* hit, unsigned int bc ) : CalibrationHitInfo( )
-    {
-      energy_measurable = 0;
-      m_barcode = bc;
-      add( hit );
-    }
-
-    bool operator==(const ParticleInfo& cmp) const { return cmp.barcode() == m_barcode; }
-    bool operator< (const ParticleInfo& cmp) const { return cmp.barcode() <  m_barcode; }
-    
-    inline unsigned int barcode( ) const { return m_barcode; }
-        
-    class CmpFunctorLess
-    {
-    public:
-      bool operator()(const ParticleInfo& l, const ParticleInfo& r) const
-      {
-	return (l < r) ;
-      }
-    };
-
-  private:
-    ParticleInfo() { }
-    
-    unsigned int m_barcode;
-  };
-  
-  // ++ --------------------------------------------------- ++
-  
-  class CellInfo : public CalibrationHitInfo {
-  public:        
-    CellInfo( Identifier id, 
-	      double eta = std::numeric_limits<double>::max(), 
-	      double phi = std::numeric_limits<double>::max() ) : CalibrationHitInfo( )
-    { 
-      m_cellid = id;
-      m_eta = eta;
-      m_phi = phi;
-    }
-    
-    CellInfo( const CaloCalibrationHit* hit, 
-	      double eta = std::numeric_limits<double>::max(), 
-	      double phi = std::numeric_limits<double>::max() ) : CalibrationHitInfo( )
-    {
-      m_cellid = hit->cellID();
-      m_eta = eta;
-      m_phi = phi;
-
-      add( hit );
-    }
-    
-    ~CellInfo() { }
-    
-    bool operator==(const CellInfo& info) const { return (m_cellid == info.ID()); }
-    bool operator< (const CellInfo& info) const { return (m_cellid  < info.ID()); }
-     
-    const Identifier& ID() const { return m_cellid; }
-    double eta() const { return m_eta; }
-    double phi() const { return m_phi; }
-        
-    class CmpFunctorLess {
-    public:
-      bool operator()(CellInfo const& p, CellInfo const& q) const
-      {
-	return ( p < q );
-      }
-    };
-    
-  private:
-    CellInfo() { }
-    
-    double m_eta;                                           //! eta of the calorimeter cell
-    double m_phi;                                           //! phi of the cell
-    Identifier m_cellid;                                    //! identifier object
-  };
-
-  // ++ --------------------------------------------------- ++
-
-  typedef ParticleInfo                                          particleinfo_t;
-  typedef CellInfo                                              cellinfo_t;
-  typedef std::set<CellInfo, CellInfo::CmpFunctorLess>          cellinfolist_t;
-  typedef std::set<ParticleInfo, ParticleInfo::CmpFunctorLess>  particleinfolist_t;
-  typedef INavigable                                            base_t;
-  typedef CaloCalibrationHit                                    calibhit_t;
-  typedef std::vector<const CaloCalibrationHit*>                hitcollection_t;
-  
-private:
-  /* @brief flag to indicate whether calibration hit info is up to date */
-  bool m_isConfigValid;
-  
-  const CaloDetDescrManager* m_caloDetDescrMgr;
-  const AtlasDetectorID*     m_detectorIDHelper;
-  
-  /* @brief tool configuration */
-  std::vector<std::string> m_calibrationCaloHitContainerNames; //! names of calibration hit containers
-  std::vector<std::string> m_calibrationDMHitContainerNames;   //! names of calib hits for dead material
-  std::string m_truthParticleCollectionName;                   //! name of the truth particles collection
-  bool m_useCellWeights;                                       //! flag to use cell weights in calculating sums
-  std::vector<int> m_maskRegions;                              //! regions to ignore when tabulating hits
-
-  /* @brief event data to maintain */
-  const TruthParticleContainer* m_truthParticles;              //! truth particle collection
-  cellinfolist_t                m_calorimeterCellInfo;         //! information for each cell that has hits in the calorimeter
-  particleinfolist_t            m_calorimeterParticleInfo;     //! ditto for all particles that hit the calorimeter
-  particleinfolist_t            m_deadMaterialParticleInfo;    //! and for particles that leave hits in dead material
-  
-  static unsigned int s_numWarningsIssued;
-  
-  typedef CaloCalibrationHit* (*transform)( void*, const CaloCalibrationHit* );
-  std::vector< std::pair<void*,
-			 transform> >  m_hitCallbacks;         //! list of transformations to perform on loaded hits
-
-  CaloCalibrationHitContainer m_allHits;                       //! store an internal copy of all loaded calibration hits
-private:
-
-  // find maximum measurable energy for an MC particle
-  double getMeasurableEnergy( unsigned int barcode ) const;
-
-  // check calibration state of composite calorimeter object
-  void doSignalStateCheck( const INavigable* ) const;
-
-  // retrieve energy of a given type from a cell/particle info object
-  template <typename T>
-  double getEnergy( const T&, EnergyType ) const;
-
-  // add hit to particle/calorimeter information list
-  void addHit( particleinfolist_t&, const calibhit_t* );
-  void addHit( cellinfolist_t&, const calibhit_t* );
-
-  // energy from filtered hit collection
-  double energyFiltered( const particleinfolist_t& info,
-			 const HepMC::GenParticle* particle,
-			 EnergyType t, 
-			 void* caller,
-			 bool (*accept)( void*, const Identifier& ) ) const;
-
-  CaloCalibrationHit* getCopy( const CaloCalibrationHit* );
-};
-
-/** ============================================================================ */
-template <typename T>
-inline double CaloParticleIDTool::getEnergy( const T& info, EnergyType t ) const 
-{
-  switch( t ) {
-    case VISIBLE:
-      return info.energy_em + info.energy_nonem;
-      break;
-      
-    case VISIBLE_EM:
-      return info.energy_em;
-      break;
-      
-    case VISIBLE_HAD:
-      return info.energy_nonem;
-      break;
-      
-    case INVISIBLE:
-      return info.energy_invisible; 
-      break;
-      
-    case TOTAL:
-      return info.energy_total;
-      break;
-  }
-  return info.energy_total;
-}
-
-/** ============================================================================ */
-inline const HepMC::GenParticle* CaloParticleIDTool::getParticle( unsigned int barcode ) const
-{
-  const TruthParticle* p = m_truthParticles->truthParticle( barcode );
-  return p != NULL ? p->genParticle() : NULL;
-}
-
-#ifdef CALOPARTICLEIDTOOL_CXX
-unsigned int CaloParticleIDTool::s_numWarningsIssued = 0;
-#endif // CALOPARTICLEIDTOOL_CXX
-
-#endif // CALOPARTICLEIDTOOL_H
-
diff --git a/Calorimeter/CaloParticleID/cmt/requirements b/Calorimeter/CaloParticleID/cmt/requirements
deleted file mode 100644
index 03efb78df88a86a4f655bf1a35fc7102b0d05f6c..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloParticleID/cmt/requirements
+++ /dev/null
@@ -1,40 +0,0 @@
-# author: Doug Schouten <dschoute@sfu.ca>
-
-package CaloParticleID
-
-use AtlasPolicy AtlasPolicy-* 
-use GaudiInterface GaudiInterface-* External
-use AthenaBaseComps AthenaBaseComps-* Control
-
-
-use McParticleEvent McParticleEvent-* PhysicsAnalysis/TruthParticleID
-
-use CaloInterface CaloInterface-* Calorimeter
-use CaloEvent CaloEvent-* Calorimeter
-use CaloSimEvent CaloSimEvent-* Calorimeter
-
-private
-use Navigation Navigation-* Control
-use TruthHelper TruthHelper-* Generators/GenAnalysisTools
-use CaloDetDescr CaloDetDescr-* Calorimeter
-end_private
-
-library CaloParticleID *.cxx -s=components *.cxx
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-#################################################
-#!DEBUG
-##private
-##macro cppdebugflags '$(cppdebugflags_s)'
-##macro_remove componentshr_linkopts "-Wl,-s"
-
-#!REFLEX
-#! no dictionary ... for now
-##macro_append use_cppflags -ftemplate-depth-99
-##use AtlasReflex  AtlasReflex-00-* External -no_auto_imports
-##apply_pattern lcgdict dict=CaloParticleID selectionfile=selection.xml \
-##              headerfiles="../CaloParticleID/CaloParticleIDDict.h"
-##
-##end_private
diff --git a/Calorimeter/CaloParticleID/src/CaloParticleIDTool.cxx b/Calorimeter/CaloParticleID/src/CaloParticleIDTool.cxx
deleted file mode 100644
index db3182bcd3b2e3656f4f8289dd282912d3842358..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloParticleID/src/CaloParticleIDTool.cxx
+++ /dev/null
@@ -1,1009 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/************************************************************************
-                   CaloParticleIDTool.cxx - Copyright ATLAS Collaboration
-
-author: Doug Schouten <dschoute at sfu dot ca>
-author: Gennady Pospelov <pospelov at mppmu dot mpg dot de>
-
-**************************************************************************/
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// Class to access calibration hit information, including 
-// particle provenance, for (composite) calorimeter objects.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#define CALOPARTICLEIDTOOL_CXX
-
-#include "CaloParticleID/CaloParticleIDTool.h"
-
-#include "Navigation/Navigable.h"
-
-#include "CaloEvent/CaloCell.h"
-#include "CaloEvent/CaloCellContainer.h"
-#include "CaloEvent/CaloCluster.h"
-#include "CaloEvent/CaloClusterContainer.h"
-#include "CaloSimEvent/CaloCalibrationHit.h"
-#include "CaloSimEvent/CaloCalibrationHitContainer.h"
-
-#include "CaloDetDescr/CaloDetDescrManager.h"
-
-#include "TruthHelper/IsGenStable.h"
-#include "TruthHelper/IsGenInteracting.h"
-
-#include <iostream>
-#include <iomanip>
-#include <algorithm>
-#include <functional>
-#include <iterator>
-#include <cmath>
-#include <exception>
-#include <limits>
-
-using std::string;
-using std::vector;
-
-namespace {
-  
-  template <typename TYPE>
-  struct cmp_less{
-    bool operator()( const TYPE* l, const TYPE* r ) {
-      if( l->cellID() != r->cellID() )
-	return l->cellID() < r->cellID(); 
-      else
-	return l->particleID() < r->particleID();       
-    }
-  };
-  
-  template <typename TYPE>
-  void set_intersection( std::vector<const TYPE*>& l,
-			 std::vector<const TYPE*>& r,
-			 std::vector<const TYPE*>& d )
-  {
-    std::sort( l.begin(), l.end(), cmp_less<TYPE>() );
-    std::sort( r.begin(), r.end(), cmp_less<TYPE>() );
-    std::set_intersection( l.begin(), l.end(), 
-			   r.begin(), r.end(), 
-			   std::back_inserter( d ) );
-  }
-  
-  typedef std::vector<const CaloCalibrationHit*> hit_vector;
-}
-
-//
-// Options:
-//
-// UseCellWeights: 
-//   if the flag is set to false, this means that kinematic 
-//   sharing of cells in composite calorimeter objects will not 
-//   be properly handled in calculations. However, this may be 
-//   approximately correct (or at least, the only option)
-//   in the case where hadronic weights have been applied.
-//
-// MaskRegions :
-//   a list of calorimeter samplings in which calibration
-//   hits will not be loaded, i.e., these regions will be ignored in
-//   all calculations
-//
-
-/** ============================================================================ */
-CaloParticleIDTool::CaloParticleIDTool(const std::string& t,
-				       const std::string& n,
-				       const IInterface* i)
-  : AthAlgTool(t, n, i),
-    m_isConfigValid(false),
-    m_caloDetDescrMgr(nullptr),
-    m_detectorIDHelper(nullptr),
-    m_truthParticles(nullptr)
-{
-  declareInterface<ICaloParticleIDTool>( this );
-  
-  declareProperty( "CalorimeterHits"    , m_calibrationCaloHitContainerNames, "" );
-  
-  declareProperty( "DeadMaterialHits"   , m_calibrationDMHitContainerNames  , "" );
-  
-  declareProperty( "TruthParticles"     , m_truthParticleCollectionName     , "" );
-  
-  declareProperty( "UseCellWeights"     , m_useCellWeights = true           , "" );
-  
-  declareProperty( "MaskRegions"        , m_maskRegions                     , "" );
-}
-
-/** ============================================================================ */
-StatusCode CaloParticleIDTool::initialize( ) 
-{
-  ATH_CHECK( detStore()->retrieve( m_detectorIDHelper ) );
-  m_caloDetDescrMgr = CaloDetDescrManager::instance(); 
-  
-  // register this tool with the IncidentSvc for setupEvent()
-  ServiceHandle<IIncidentSvc> incidentSvc("IncidentSvc", name());
-  ATH_CHECK( incidentSvc.retrieve() );
-  incidentSvc->addListener( this, IncidentType::BeginEvent );    
-  
-  m_isConfigValid = false;
-  
-  return StatusCode::SUCCESS;
-}
-
-/** ============================================================================ */
-StatusCode CaloParticleIDTool::finalize( ) 
-{
-  return StatusCode::SUCCESS;
-}
-
-/** ============================================================================ */
-StatusCode CaloParticleIDTool::setupEvent( )
-{
-  ATH_CHECK(  evtStore()->retrieve( m_truthParticles, m_truthParticleCollectionName ) );
-  
-  //
-  // load information for particles that have hits in the calorimeter,
-  // and for cells which contain calibration hits
-  //
-  
-  m_calorimeterCellInfo.clear();
-  m_calorimeterParticleInfo.clear();
-  m_deadMaterialParticleInfo.clear();
-  
-  m_allHits.clear();
-  
-  const DataHandle<CaloCalibrationHitContainer> handle;
-  
-  std::vector<const CaloCalibrationHitContainer*> hitContainers;
-  
-  std::vector<std::string>::iterator names_itr = m_calibrationCaloHitContainerNames.begin();
-  std::vector<std::string>::iterator names_itr_end = m_calibrationCaloHitContainerNames.end();
-  for ( ; names_itr != names_itr_end; ++names_itr )
-  {
-    ATH_CHECK( evtStore()->retrieve( handle, (*names_itr) ) );
-    hitContainers.push_back( handle );
-  }
-  
-  std::vector<const CaloCalibrationHitContainer*>::const_iterator hitcoll_itr = hitContainers.begin();
-  std::vector<const CaloCalibrationHitContainer*>::const_iterator hitcoll_itr_end = hitContainers.end();
-  
-  CaloCalibrationHitContainer::const_iterator hit_itr;
-  CaloCalibrationHitContainer::const_iterator hit_itr_end;
-  
-  for( ; hitcoll_itr != hitcoll_itr_end; ++hitcoll_itr ) // begin loop over hit containers
-  {
-    hit_itr     = (*hitcoll_itr)->begin();
-    hit_itr_end = (*hitcoll_itr)->end();
-    for( ; hit_itr != hit_itr_end; ++hit_itr ) // begin loop over calibration hits
-    { 
-      if( (*hit_itr)->particleID() == 0 )
-      {
-	ATH_MSG_WARNING( "Calibration hit has no particle ID!" );
-	continue;
-      }
-      const CaloDetDescrElement* dde = m_caloDetDescrMgr->get_element( (*hit_itr)->cellID() );
-      if( std::find( m_maskRegions.begin(), m_maskRegions.end(), (unsigned int)dde->getSampling() ) != m_maskRegions.end() )
-      {
-	ATH_MSG_DEBUG( "Skipping hit because it is in masked region: " 
-		       << dde->getSampling() );
-	continue;
-      }
-      
-      CaloCalibrationHit* hit = getCopy( (*hit_itr) );
-      m_allHits.push_back( hit );
-      
-      addHit( m_calorimeterCellInfo, hit );    
-      addHit( m_calorimeterParticleInfo, hit );      
-    } // end loop over calibration hits
-    
-    ATH_MSG_DEBUG( "Done loading hits in [" << (*hitcoll_itr)->Name() << "]"  );
-    ATH_MSG_DEBUG( "Loaded information for [" << m_calorimeterParticleInfo.size() 
-		   << "] particles and [" << m_calorimeterCellInfo.size() << "] cells" );
-  } // end loop over calibration hit collections
-  
-  //
-  // load calibration hit information for particles that deposit energy in 
-  // dead material regions
-  //
-  
-  hitContainers.clear();
-  
-  names_itr = m_calibrationDMHitContainerNames.begin();
-  names_itr_end = m_calibrationDMHitContainerNames.end();
-  for( ; names_itr != names_itr_end; ++names_itr )
-  {
-    ATH_CHECK( evtStore()->retrieve( handle, (*names_itr) ) );
-    hitContainers.push_back( handle );
-  }
-  hitcoll_itr = hitContainers.begin();
-  hitcoll_itr_end = hitContainers.end();
-  for( ; hitcoll_itr != hitcoll_itr_end; ++hitcoll_itr ) 
-  {
-    hit_itr     = (*hitcoll_itr)->begin();
-    hit_itr_end = (*hitcoll_itr)->end();
-    for( ; hit_itr != hit_itr_end; ++hit_itr ) 
-    { 
-      if( !(m_detectorIDHelper->is_lar_dm((*hit_itr)->cellID()) || 
-	    m_detectorIDHelper->is_tile_dm((*hit_itr)->cellID())) ) 
-	continue;
-      
-      CaloCalibrationHit* hit = getCopy( (*hit_itr) );
-      m_allHits.push_back( hit );
-      
-      addHit( m_deadMaterialParticleInfo, hit );      
-    } // end loop over calibration hits
-    
-    ATH_MSG_DEBUG( "Done loading hits in [" << (*hitcoll_itr)->Name() << "]" );
-    ATH_MSG_DEBUG( "Loaded information for [" << m_deadMaterialParticleInfo.size() 
-		   << "] particles with hits in dead material." );
-    
-  } // end loop over dead material hit collections
-  return StatusCode::SUCCESS;
-}
-
-/** ============================================================================ */
-void CaloParticleIDTool::handle( const Incident& inc )
-{
-  if ( inc.type() == IncidentType::BeginEvent ) 
-  {
-    m_isConfigValid = false;
-    ATH_MSG_DEBUG ( "[" << IncidentType::BeginEvent << "] event registered, "
-		    << "reloading hit information" );
-    if( setupEvent().isSuccess() ) 
-      m_isConfigValid = true;
-  }
-  if( !m_isConfigValid )
-    ATH_MSG_WARNING( "Could not update calibration hit information" );
-}
-
-/** ============================================================================ */
-double CaloParticleIDTool::energyFromParticle( const INavigable* calObject, 
-					       const HepMC::GenParticle* particle, 
-					       EnergyType t /* = VISIBLE */ ) const 
-{ 
-  //
-  // return the sum of the energy of all hits left by a particle inside a composite
-  // calorimeter object
-  //
-  // if a calorimeter cell is shared (constituent weight < 1) then the sum is a
-  // weighted sum over all cells, i.e., if h = sum of hits in a cell with weight w,
-  // the total sum contains terms like (w * h)
-  //
-  // note that if the constituent weights are altered by a calibration, this
-  // approach breaks down, so a warning is issued
-  //
-  
-  const CaloCell* cell = dynamic_cast<const CaloCell*>( calObject );
-  bool isCompositeObject = (cell == 0x0);
-  
-  double e( 0. );
-  
-  if( !m_isConfigValid )
-  {
-    ATH_MSG_WARNING( "in energyFromParticle(), not configured yet");
-    return 0.;
-  }
-  
-  if( !particle || !calObject )
-  {
-    // @fixme throwing an exception seems a bit heavy-handed here ... or is it?
-    
-    ATH_MSG_WARNING( "in energyFromParticle(), received 0x0");
-    return 0.;
-  }
-  
-  // @todo consider muons as interacting?
-  TruthHelper::IsGenInteracting isInt;
-  if( !isInt( particle ) )
-    return 0.; // don't waste time on non-interacting particles
-  
-  if( isCompositeObject )
-  {
-    doSignalStateCheck( calObject );
-  }
-  
-  // 
-  // retrieve (i) all hits left by particle in the calorimeter
-  //
-  
-  hitcollection_t part_hits;
-  particleinfolist_t::const_iterator part_bookmark = m_calorimeterParticleInfo.find( particle->barcode() );
-  if( part_bookmark == m_calorimeterParticleInfo.end() )
-    return 0.;
-  else
-    std::copy( part_bookmark->hits().begin(), 
-	       part_bookmark->hits().end(), 
-	       std::back_inserter( part_hits ) );
-  
-  //
-  // retrieve (ii) hits in constituent cells of calorimeter object 
-  //
-  
-  hitcollection_t object_hits;
-  
-  NavigationToken<CaloCell,double> cellToken;
-  calObject->fillToken(cellToken,double(1.)); 
-  if( !isCompositeObject )
-  {
-    if( !cellToken.trySetObject( cell, 1.0 ) )
-    {
-      ATH_MSG_WARNING( "couldn't make token from cell" );
-    }
-  }
-  if( cellToken.size() == 0 )
-  {
-    ATH_MSG_WARNING( "calorimeter object has 0 cells in token" );
-  }
-  std::map<Identifier,double> cellWeights;
-  
-  NavigationToken<CaloCell,double>::const_iterator cell_token_itr = cellToken.begin();
-  NavigationToken<CaloCell,double>::const_iterator cell_token_itr_end = cellToken.end();
-  for(; cell_token_itr != cell_token_itr_end; cell_token_itr++ ) 
-  {
-    cellinfolist_t::const_iterator cell_bookmark = m_calorimeterCellInfo.find( (*cell_token_itr)->ID() );
-    if( cell_bookmark != m_calorimeterCellInfo.end() )
-    {
-      std::copy( cell_bookmark->hits().begin(), 
-		 cell_bookmark->hits().end(), 
-		 std::back_inserter( object_hits ) );
-      if( m_useCellWeights )
-	cellWeights.insert( std::pair<Identifier,double>( (*cell_token_itr)->ID(), 
-							  cellToken.getParameter( cell_token_itr ) ) );
-    }
-  }
-  
-  if( object_hits.size() == 0 )
-    return 0.;
-  
-  //
-  // the result is sum( w * E ) over set_intersection( (i), (ii) )
-  //
-  
-  hitcollection_t common_hits;
-  
-  set_intersection<calibhit_t>( object_hits, part_hits, common_hits );
-  
-  hitcollection_t::const_iterator hit_itr = common_hits.begin();
-  hitcollection_t::const_iterator hit_itr_end = common_hits.end();
-  for( ; hit_itr != hit_itr_end; ++hit_itr )
-  {
-    if( m_useCellWeights && cellWeights.find( (*hit_itr)->cellID() ) == cellWeights.end() )
-    {
-      ATH_MSG_ERROR( "Constituent weight for cell [" << (*hit_itr)->cellID() << "] not found" );
-      throw std::exception();
-    }
-    
-    double w = m_useCellWeights ? cellWeights[ (*hit_itr)->cellID() ] : 1.0;
-    
-    switch( t ) {
-      case VISIBLE:
-	e += w * ( (*hit_itr)->energyEM() + (*hit_itr)->energyNonEM() );
-	break;
-	
-      case VISIBLE_EM:
-	e += w * ( (*hit_itr)->energyEM() );
-	break;
-	
-      case VISIBLE_HAD:
-	e += w * ( (*hit_itr)->energyNonEM() );
-	break;
-	
-      case INVISIBLE:
-	e += w * ( (*hit_itr)->energyInvisible() + (*hit_itr)->energyEscaped() );
-	break;
-	
-      case TOTAL:
-	e += w * ( (*hit_itr)->energyTotal() );
-	break;
-    }
-  }
-  
-  return e;
-}
-
-/** ============================================================================ */
-double CaloParticleIDTool::energyInCalorimeter( const HepMC::GenParticle* particle,
-						EnergyType t, /* = VISIBLE */ 
-						void* caller,
-						bool (*accept)( void*, const Identifier& ) ) const
-{
-  return energyFiltered( m_calorimeterParticleInfo, particle, t, caller, accept ); 
-}
-
-/** ============================================================================ */
-double CaloParticleIDTool::etaInCalorimeter( const HepMC::GenParticle* particle,
-					     EnergyType t, /* = VISIBLE */ 
-					     void* caller,
-					     bool (*accept)( void*, const Identifier& ) ) const
-{
-  if( !m_isConfigValid )
-    return std::numeric_limits<double>::max();
-  
-  if( particle == NULL )
-  {
-    ATH_MSG_WARNING( "in retrieveHits(), received 0x0");
-    return std::numeric_limits<double>::max();
-  }
-  
-  particleinfolist_t::const_iterator part_bookmark = m_calorimeterParticleInfo.find( particle->barcode() );
-  if( part_bookmark != m_calorimeterParticleInfo.end() )
-  {
-    hitcollection_t::const_iterator hit_itr = part_bookmark->hits().begin();
-    hitcollection_t::const_iterator hit_itr_end = part_bookmark->hits().end();
-    
-    double etatot( 0 );
-    double etot( 0 );
-    for(; hit_itr != hit_itr_end; ++hit_itr)
-    {
-      Identifier id = (*hit_itr)->cellID();
-      const CaloDetDescrElement* dde = m_caloDetDescrMgr->get_element( id );
-      double eta = dde->eta();
-      double edep( 0 );
-      
-      if(caller) {
-        if(! (*accept)( caller, id ) ) {
-	  continue;
-	}
-      }
-      
-      switch( t ) {
-	case VISIBLE:
-	  edep = (*hit_itr)->energyEM() + (*hit_itr)->energyNonEM();
-	  break;
-	  
-	case VISIBLE_EM:
-	  edep = (*hit_itr)->energyEM();
-	  break;
-	  
-	case VISIBLE_HAD:
-	  edep = (*hit_itr)->energyNonEM();
-	  break;
-	  
-	case INVISIBLE:
-	  edep = (*hit_itr)->energyInvisible() + (*hit_itr)->energyEscaped();
-	  break;
-	  
-	case TOTAL:
-	  edep = (*hit_itr)->energyTotal();
-	  break;
-      }
-      
-      etatot += edep * eta;
-      etot   += edep;
-    }
-    if( etot > 0. )
-    {
-      return etatot / etot;
-    }  
-  }
-  return std::numeric_limits<double>::max();
-}
-
-/** ============================================================================ */
-double CaloParticleIDTool::energyInDeadMaterial( const HepMC::GenParticle* particle, 
-						 EnergyType t, /* = TOTAL */
-						 void* caller,
-						 bool (*accept)( void*, const Identifier& ) ) const 
-{
-  return energyFiltered( m_deadMaterialParticleInfo, particle, t, caller, accept );
-}
-
-/** ============================================================================ */
-double CaloParticleIDTool::energyFiltered( const particleinfolist_t& info,
-					   const HepMC::GenParticle* particle,
-					   EnergyType t, 
-					   void* caller,
-					   bool (*accept)( void*, const Identifier& ) ) const
-{
-  if( !m_isConfigValid )
-  {
-    ATH_MSG_WARNING( "in energyFiltered(), not configured yet");
-    return 0.;
-  }
-  
-  if( particle == NULL )
-  {
-    ATH_MSG_WARNING( "in energyFiltered(), received 0x0");
-    return 0.;
-  }
-  
-  particleinfolist_t::const_iterator part_bookmark = 
-    info.find( particle->barcode() );
-  
-  if( part_bookmark == info.end() )
-  {
-    ATH_MSG_DEBUG( "particle with barcode [" << particle->barcode() << "] not in hit map" );
-    return 0.;
-  }
-  
-  if( caller )
-  {
-    particleinfo_t buffer( part_bookmark->barcode() );
-    hitcollection_t::const_iterator hit_itr     = part_bookmark->hits().begin();
-    hitcollection_t::const_iterator hit_itr_end = part_bookmark->hits().end();
-    for( ; hit_itr != hit_itr_end; ++hit_itr )
-    {
-      Identifier id = (*hit_itr)->cellID();
-      if( caller )
-      {
-	if( !((*accept)( caller, id )) )
-	{
-	  continue;
-	}
-      }
-      buffer.add( (*hit_itr) );
-    }
-    return getEnergy( buffer, t );
-  }
-  else
-  {
-    return getEnergy( (*part_bookmark), t );
-  }
-}
-
-/** ============================================================================ */
-void CaloParticleIDTool::loadParticleMap( const INavigable* calObject, 
-					  std::map<const HepMC::GenParticle*,double>& pmap, 
-					  EnergyType t /* = VISIBLE */,
-					  void* caller /* = 0x0 */, 
-				          bool (*accept)(void*, const Identifier&) /* = &(ICaloParticleIDTool::idAccept) */  ) const
-{
-  if( !m_isConfigValid )
-  {
-    ATH_MSG_WARNING( "in loadParticleMap(), not configured yet");
-    return;
-  }
-  
-  if( !calObject )
-  {
-    // @fixme throwing an exception seems a bit heavy-handed here ... or is it?
-    
-    ATH_MSG_WARNING( "in loadParticleMap(), received 0x0");
-    return;
-  }
-  
-  const CaloCell* cell = dynamic_cast<const CaloCell*>( calObject );
-  bool isCompositeObject = (cell == 0x0);
-  
-  if( isCompositeObject )
-  {
-    doSignalStateCheck( calObject );
-  }
-  
-  //
-  // retrieve hits in constituent cells of calorimeter object 
-  //
-  
-  std::map<Identifier,double> cellWeights;
-  std::map<int, double> buffer;
-  
-  NavigationToken<CaloCell,double> cellToken;
-  calObject->fillToken(cellToken,double(1.));  
-  
-  if( !isCompositeObject )
-  {
-    if( !cellToken.trySetObject( cell, 1.0 ) )
-    {
-      ATH_MSG_WARNING( "couldn't make token from cell" );
-    }
-  }
-  
-  if( cellToken.size() == 0 )
-  {
-    ATH_MSG_WARNING( "calorimeter object has 0 cells in token" );
-  }
-  
-  NavigationToken<CaloCell,double>::const_iterator cell_token_itr     = cellToken.begin();
-  NavigationToken<CaloCell,double>::const_iterator cell_token_itr_end = cellToken.end();
-  for(; cell_token_itr != cell_token_itr_end; cell_token_itr++ ) 
-  {
-    if(! (*accept)( caller, (*cell_token_itr)->ID() ) ) continue;
-    
-    double weight = m_useCellWeights ? cellToken.getParameter( cell_token_itr ) : 1.0;
-    
-    cellinfolist_t::const_iterator cell_bookmark =
-      m_calorimeterCellInfo.find( (*cell_token_itr)->ID() );
-    if( cell_bookmark == m_calorimeterCellInfo.end() )
-      continue;
-    
-    hitcollection_t::const_iterator hit_itr     = cell_bookmark->hits().begin();
-    hitcollection_t::const_iterator hit_itr_end = cell_bookmark->hits().end();
-    for( ; hit_itr != hit_itr_end; ++hit_itr )
-    {    
-      double e( 0. );
-      switch( t ) {
-	case VISIBLE:
-	  e = (*hit_itr)->energyEM() + (*hit_itr)->energyNonEM();
-	  break;
-	case VISIBLE_EM:
-	  e = (*hit_itr)->energyEM();
-	  break;
-	case VISIBLE_HAD:
-	  e = (*hit_itr)->energyNonEM();
-	  break;
-	case INVISIBLE:
-	  e = (*hit_itr)->energyInvisible() + (*hit_itr)->energyEscaped();
-	  break;
-	case TOTAL:
-	  e = (*hit_itr)->energyTotal();
-	  break;
-      }
-      std::map<int,double>::iterator bookmark = buffer.find( (*hit_itr)->particleID() );
-      if( bookmark == buffer.end() )
-	buffer.insert( std::map<int,double>::value_type( (*hit_itr)->particleID(), weight * e ) );
-      else
-	bookmark->second += weight * e;
-    }
-  }
-  
-  std::map<int,double>::const_iterator buff_itr = buffer.begin();
-  std::map<int,double>::const_iterator buff_itr_end = buffer.end();
-  for( ; buff_itr != buff_itr_end; ++buff_itr )
-  {
-    const HepMC::GenParticle* part = getParticle( buff_itr->first );
-    if( pmap.find( part ) == pmap.end() )
-    {
-      pmap.insert( std::pair<const HepMC::GenParticle*,double>( part, buff_itr->second ) );
-    }
-    else
-    {
-      pmap[ part ] += buff_itr->second;
-    }
-  }
-}
-
-/** ============================================================================ */
-double CaloParticleIDTool::energyInObject( const INavigable* calObject, 
-					   EnergyType t /* = VISIBLE */ ) const
-{
-  //
-  // return the sum of the energy of all hits left inside a composite calorimeter object
-  //
-  // if a calorimeter cell is shared (constituent weight < 1) then the sum is a
-  // weighted sum over all cells, i.e., if h = sum of hits in a cell with weight w,
-  // the total sum contains a term (w * h)
-  //
-  // note that if the constituent weights are altered by a calibration, this
-  // approach breaks down, so a warning is issued
-  //
-  
-  if( !m_isConfigValid )
-  {
-    ATH_MSG_WARNING( "in energyInObject(), not configured yet");
-    return 0;
-  }
-  
-  double e( 0. );
-  
-  if( !calObject )
-  {
-    // @fixme throwing an exception seems a bit heavy-handed here ... or is it?
-    
-    ATH_MSG_WARNING( "CaloParticleIDTool::energyInObject() received 0x0");
-    return 0.;
-  }
-  
-  const CaloCell* cell = dynamic_cast<const CaloCell*>( calObject );
-  bool isCompositeObject = (cell == 0x0);
-  
-  if( isCompositeObject )
-  {
-    doSignalStateCheck( calObject );
-  }
-  
-  NavigationToken<CaloCell,double> cellToken;
-  calObject->fillToken(cellToken,(double)1.);
-  if( !isCompositeObject )
-  {
-    if( !cellToken.trySetObject( cell, 1.0 ) )
-    {
-      ATH_MSG_WARNING( "couldn't make token from cell" );
-    }
-  }
-  
-  if( cellToken.size() == 0 )
-  {
-    ATH_MSG_WARNING( "calorimeter object has 0 cells in token" );
-  }
-  NavigationToken<CaloCell,double>::const_iterator cell_token_itr = cellToken.begin();
-  NavigationToken<CaloCell,double>::const_iterator cell_token_itr_end = cellToken.end();
-  for(; cell_token_itr != cell_token_itr_end; ++cell_token_itr ) 
-  {
-    cellinfolist_t::const_iterator cell_bookmark = m_calorimeterCellInfo.find( (*cell_token_itr)->ID() );
-    if( cell_bookmark != m_calorimeterCellInfo.end() )
-    {
-      double w = m_useCellWeights ? cellToken.getParameter( cell_token_itr ) : 1.0;
-      e += w * getEnergy( (*cell_bookmark), t );
-    }
-  }
-  
-  return e;  
-}
-
-/** ============================================================================ */
-void CaloParticleIDTool::retrieveHits( const HepMC::GenParticle* particle, 
-				       CaloCalibrationHitContainer* hits ) const 
-{
-  if( !m_isConfigValid )
-  {
-    ATH_MSG_WARNING( "in retrieveHits(), not configured yet");
-    return;
-  }
-  
-  if( particle == NULL )
-  {
-    ATH_MSG_WARNING( "in retrieveHits(), received 0x0");
-    return;
-  }
-  
-  if( hits == 0 )
-    hits = new CaloCalibrationHitContainer( );
-  
-  particleinfolist_t::const_iterator part_bookmark = 
-    m_calorimeterParticleInfo.find( particle->barcode() );
-  if( part_bookmark != m_calorimeterParticleInfo.end() )
-  {
-    hitcollection_t::const_iterator hit_itr = part_bookmark->hits().begin();
-    hitcollection_t::const_iterator hit_itr_end = part_bookmark->hits().end();
-    for(; hit_itr != hit_itr_end; ++hit_itr)
-    {
-      CaloCalibrationHit* tmp_hit = new CaloCalibrationHit( (*hit_itr)->cellID(),
-							    (*hit_itr)->energyEM(),
-							    (*hit_itr)->energyNonEM(),
-							    (*hit_itr)->energyInvisible(),
-							    (*hit_itr)->energyEscaped(),
-							    (*hit_itr)->particleID() );
-      hits->push_back( tmp_hit );
-    }
-  }
-  
-}
-
-/** ============================================================================ */
-void CaloParticleIDTool::retrieveHits( const INavigable* calObject, 
-				       CaloCalibrationHitContainer* hits ) const 
-{
-  //
-  // retrieve all the hits left in a composite calorimeter object,
-  // expecting post-processing to handle kinematic weights 
-  //
-  
-  if( !m_isConfigValid )
-  {
-    ATH_MSG_WARNING( "in retrieveHits(), not configured yet");
-    return;
-  }
-  
-  if( calObject == NULL )
-  {
-    ATH_MSG_WARNING( "in retrieveHits(), received 0x0");
-    return;
-  }
-  
-  const CaloCell* cell = dynamic_cast<const CaloCell*>( calObject );
-  bool isCompositeObject = (cell == 0x0);
-  
-  if( hits == 0 )
-    hits = new CaloCalibrationHitContainer( );
-  
-  if( isCompositeObject )
-  {
-    doSignalStateCheck( calObject );
-  }  
-  
-  NavigationToken<CaloCell,double> cellToken;
-  calObject->fillToken(cellToken,double(1.));
-  if( !cellToken.trySetObject( cell, 1.0 ) )
-  {
-    ATH_MSG_WARNING( "couldn't make token from cell" );
-  }
-  if( cellToken.size() == 0 )
-  {
-    ATH_MSG_WARNING( "calorimeter object has 0 cells in token" );
-  }
-  NavigationToken<CaloCell,double>::const_iterator cell_token_itr = cellToken.begin();
-  NavigationToken<CaloCell,double>::const_iterator cell_token_itr_end = cellToken.end();
-  for(; cell_token_itr != cell_token_itr_end; cell_token_itr++ ) 
-  {    
-    cellinfolist_t::const_iterator cell_bookmark = 
-      m_calorimeterCellInfo.find( (*cell_token_itr)->ID() );
-    if( cell_bookmark != m_calorimeterCellInfo.end() )
-    {
-      hitcollection_t::const_iterator hit_itr = cell_bookmark->hits().begin();
-      hitcollection_t::const_iterator hit_itr_end = cell_bookmark->hits().end();
-      for(; hit_itr != hit_itr_end; ++hit_itr)
-      {
-	CaloCalibrationHit* tmp_hit = new CaloCalibrationHit( (*hit_itr)->cellID(),
-							      (*hit_itr)->energyEM(),
-							      (*hit_itr)->energyNonEM(),
-							      (*hit_itr)->energyInvisible(),
-							      (*hit_itr)->energyEscaped(),
-							      (*hit_itr)->particleID() );
-	hits->push_back( tmp_hit );
-      }
-    }
-    
-  }
-}
-
-/** ============================================================================ */
-void CaloParticleIDTool::retrieveHits( const Identifier ID, 
-				       const std::vector<const CaloCalibrationHit*>*& hits) const 
-{
-  //
-  // retrieve all the hits in cell ID, expecting post-processing to handle kinematic weights 
-  //
-  
-  cellinfolist_t::const_iterator cell_bookmark = m_calorimeterCellInfo.find( ID );
-  if( cell_bookmark != m_calorimeterCellInfo.end() )
-  {
-    hits = &(cell_bookmark->hits());
-  }
-  
-}
-
-/** ============================================================================ */
-double CaloParticleIDTool::getMeasurableEnergy( unsigned int barcode ) const
-{ 
-  const double electronMass = 0.510998901;
-  const double protonMass   =   938.27203;
-  const double neutronMass  =   939.56536;
-
-  if( !m_isConfigValid )
-  {
-    ATH_MSG_WARNING( "in getMeasurableEnergy(), not configured yet");
-    return -1;
-  }
-  
-  const TruthParticle* particle( 0 );
-  particle = m_truthParticles->truthParticle( barcode );
-  
-  if( 0 == particle )
-    return -1.;
-  
-  double totalEnergy   = particle->e();
-  double kineticEnergy = particle->e();
-  long PDGEncoding     = particle->pdgId();
-  
-  double correctionForMass = 0.;
-  if ( PDGEncoding == 11 )
-  { // particleName == "e-"
-    correctionForMass = - electronMass;
-  }
-  else if ( PDGEncoding == -11 )
-  { // particleName == "e+"
-    correctionForMass = + electronMass;
-  }
-  else if ( PDGEncoding == 2212 )
-  { // particleName == "proton"
-    correctionForMass = - protonMass;
-  }
-  else if ( PDGEncoding == 2112 )
-  { // particleName == "neutron"
-    correctionForMass = - neutronMass;
-  }
-  else if ( PDGEncoding > 1000010000 )
-  { //for nuclei
-    return kineticEnergy;
-  }
-  //   else if (particleName == "lambda" || particleName == "sigma+" ||
-  //            particleName == "sigma0" || particleName == "xi-" ||
-  //            particleName == "xi0" || particleName == "omega-"){
-  else if (PDGEncoding == 3122 || PDGEncoding == 3222 ||
-	   PDGEncoding == 3212 || PDGEncoding == 3312 ||
-	   PDGEncoding == 3322 || PDGEncoding == 3334)
-  {
-    correctionForMass = - protonMass;
-  }
-  else if ( PDGEncoding == 3112 )
-  {  // particleName == "sigma-"
-    correctionForMass = - neutronMass;
-  }
-  else if ( PDGEncoding == -2112 )
-  { //particleName == "anti_neutron"
-    correctionForMass = + neutronMass;
-  }
-  //            else if (particleName == "anti_proton" || particleName == "anti_lambda" ||
-  //                     particleName == "anti_sigma0" || particleName == "anti_sigma+" ||
-  //                     particleName == "anti_xi0" || particleName == "anti_xi-" ||
-  //                     particleName == "anti_omega-"){
-  else if ( PDGEncoding == -2212 || PDGEncoding == -3122 ||
-	    PDGEncoding == -3212 || PDGEncoding == -3222 ||
-	    PDGEncoding == -3322 || PDGEncoding == -3312 ||
-	    PDGEncoding == -3334 )
-  {
-    correctionForMass = + protonMass;
-  }
-  else if ( PDGEncoding == -3112 )
-  { // particleName == "anti_sigma-"
-    correctionForMass = + neutronMass;
-  }
-  
-  double measurableEnergy = totalEnergy + correctionForMass;
-  
-  if( measurableEnergy < -0.1e-6 )
-  {
-    ATH_MSG_WARNING( "Calibration Hit: NEGATIVE measurableEnergy="
-		     << measurableEnergy << " < -0.1e-6 MeV for " << PDGEncoding );
-    measurableEnergy = 0.;
-  }
-  return measurableEnergy;
-}
-
-/** ============================================================================ */
-void CaloParticleIDTool::doSignalStateCheck( const INavigable* calObject ) const
-{
-  if( !m_useCellWeights ) return;
-  
-  const CaloCluster* dummy_ptr = dynamic_cast<const CaloCluster*>( calObject );
-  if( dummy_ptr != NULL )
-  {
-    if( ( dummy_ptr->signalState() != P4SignalState::UNCALIBRATED &&
-	  dummy_ptr->signalState() != P4SignalState::UNKNOWN ) && s_numWarningsIssued < 10 )
-    {
-      ATH_MSG_WARNING( "Particle ID information for clusters with signal state '" 
-		       << dummy_ptr->signalState() << "' is not well defined" );
-      ++s_numWarningsIssued;
-    }
-  }
-}
-
-/** ============================================================================ */
-void CaloParticleIDTool::addHit( particleinfolist_t& infolist, const calibhit_t* hit )
-{
-  particleinfolist_t::const_iterator particleinfo_bookmark =
-    infolist.find( particleinfo_t( hit->particleID() ) );
-  if( particleinfo_bookmark == infolist.end() )
-  {
-    particleinfo_t buffer( hit, hit->particleID() );
-    buffer.energy_measurable = 0.; // this->getMeasurableEnergy( hit->particleID() );
-    infolist.insert( buffer );
-  }
-  else 
-  {
-    particleinfo_bookmark->add( hit );
-  }
-}
-
-/** ============================================================================ */
-void CaloParticleIDTool::addHit( cellinfolist_t& infolist, const calibhit_t* hit )
-{
-  cellinfolist_t::const_iterator cellinfo_bookmark = 
-    infolist.find( cellinfo_t( hit->cellID() ) );
-  if( cellinfo_bookmark == infolist.end() ) 
-  {
-    const CaloDetDescrElement* dde = m_caloDetDescrMgr->get_element( hit->cellID() );
-    double eta = dde->eta();
-    double phi = dde->phi();
-    infolist.insert( cellinfo_t( hit, eta, phi ) );
-  }
-  else
-  {
-    cellinfo_bookmark->add( hit );	
-  }   
-}
-
-/** ============================================================================ */
-void CaloParticleIDTool::registerHitTransformation( void* caller, transform callback ) 
-{
-  typedef CaloCalibrationHit* (*transform)( void*, const CaloCalibrationHit* );
-  m_hitCallbacks.push_back( std::pair<void*,transform>( caller, callback ) );
-}
-
-/** ============================================================================ */
-CaloCalibrationHit* CaloParticleIDTool::getCopy( const CaloCalibrationHit* hit ) 
-{
-  CaloCalibrationHit* buffer = new CaloCalibrationHit( hit->cellID(),
-						       hit->energyEM(),
-						       hit->energyNonEM(),
-						       hit->energyInvisible(),
-						       hit->energyEscaped(), 
-						       hit->particleID() );
-  unsigned int numTransforms = m_hitCallbacks.size();
-  for( unsigned int ic = 0; ic < numTransforms; ++ic )
-  {
-    CaloCalibrationHit* orig = buffer;
-    buffer = m_hitCallbacks[ic].second( m_hitCallbacks[ic].first, orig );
-    delete orig;
-  }
-  return buffer;
-}
diff --git a/Calorimeter/CaloParticleID/src/components/CaloParticleID_entries.cxx b/Calorimeter/CaloParticleID/src/components/CaloParticleID_entries.cxx
deleted file mode 100644
index e776be65dd9acbd7ff92af4087bf93a36038284b..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloParticleID/src/components/CaloParticleID_entries.cxx
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "GaudiKernel/DeclareFactoryEntries.h"
-
-#include "CaloParticleID/CaloParticleIDTool.h"
-
-DECLARE_TOOL_FACTORY( CaloParticleIDTool )
-
-DECLARE_FACTORY_ENTRIES( CaloParticleID ) {
-  DECLARE_TOOL( CaloParticleIDTool )
-}
diff --git a/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py b/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..bb3be1730ffed3a66ebbb619a803fd710cc7d3d1
--- /dev/null
+++ b/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py
@@ -0,0 +1,98 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+
+from AthenaCommon.SystemOfUnits import MeV
+
+def CaloTopoClusterCfg(inputFlags=None):
+    result=ComponentAccumulator()
+    
+    
+    #from CaloUtils.CaloUtilsConf import CaloLCClassificationTool, CaloLCWeightTool, CaloLCOutOfClusterTool, CaloLCDeadMaterialTool
+
+    #from CaloClusterCorrection.CaloClusterCorrectionConf import CaloClusterLocalCalib
+    #from CaloClusterCorrection.CaloClusterCorrectionConf import CaloClusterCellWeightCalib
+
+
+    from CaloRec.CaloRecConf import CaloTopoClusterMaker, CaloTopoClusterSplitter, CaloClusterMomentsMaker, CaloClusterMaker, CaloClusterSnapshot #, CaloClusterLockVars, CaloClusterPrinter
+
+    
+
+    #from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
+    #theCaloNoiseTool = CaloNoiseToolDefault()
+
+    # maker tools
+    TopoMaker = CaloTopoClusterMaker("TopoMaker")
+        
+    TopoMaker.CellsName = "AllCalo"
+    TopoMaker.CalorimeterNames=["LAREM",
+                                "LARHEC",
+                                "LARFCAL",
+                                "TILE"]
+    # cells from the following samplings will be able to form
+    # seeds. By default no sampling is excluded
+    TopoMaker.SeedSamplingNames = ["PreSamplerB", "EMB1", "EMB2", "EMB3",
+                                   "PreSamplerE", "EME1", "EME2", "EME3",
+                                   "HEC0", "HEC1","HEC2", "HEC3",
+                                   "TileBar0", "TileBar1", "TileBar2",
+                                   "TileExt0", "TileExt1", "TileExt2",
+                                   "TileGap1", "TileGap2", "TileGap3",
+                                   "FCAL0", "FCAL1", "FCAL2"] 
+    #TopoMaker.CaloNoiseTool=theCaloNoiseTool
+    TopoMaker.UseCaloNoiseTool=True
+    TopoMaker.UsePileUpNoise=True
+    TopoMaker.NeighborOption = "super3D"
+    TopoMaker.RestrictHECIWandFCalNeighbors  = False
+    TopoMaker.RestrictPSNeighbors  = True
+    TopoMaker.CellThresholdOnEorAbsEinSigma     =    0.0
+    TopoMaker.NeighborThresholdOnEorAbsEinSigma =    2.0
+    TopoMaker.SeedThresholdOnEorAbsEinSigma     =    4.0
+    
+    # note E or AbsE 
+    #
+    # the following property must be set to TRUE in order to make double
+    # sided cuts on the seed and the cluster level 
+    #
+    TopoMaker.SeedCutsInAbsE                 = True
+    TopoMaker.ClusterEtorAbsEtCut            = 0.0*MeV
+    # use 2-gaussian or single gaussian noise for TileCal
+    TopoMaker.TwoGaussianNoise = inputFlags.CaloTopoClusterFlags.doTwoGaussianNoise()
+        
+    TopoSplitter = CaloTopoClusterSplitter("TopoSplitter")
+    # cells from the following samplings will be able to form local
+    # maxima. The excluded samplings are PreSamplerB, EMB1,
+    # PreSamplerE, EME1, all Tile samplings, all HEC samplings and the
+    # two rear FCal samplings.
+    #
+    TopoSplitter.SamplingNames = ["EMB2", "EMB3",
+                                  "EME2", "EME3",
+                                  "FCAL0"]
+    # cells from the following samplings will also be able to form
+    # local maxima but only if they are not overlapping in eta and phi
+    # with local maxima in previous samplings from the primary list.
+    #
+    TopoSplitter.SecondarySamplingNames = ["EMB1","EME1",
+                                           "TileBar0","TileBar1","TileBar2",
+                                           "TileExt0","TileExt1","TileExt2",
+                                           "HEC0","HEC1","HEC2","HEC3",
+                                           "FCAL1","FCAL2"]
+    TopoSplitter.ShareBorderCells = True
+    TopoSplitter.RestrictHECIWandFCalNeighbors  = False
+    TopoSplitter.WeightingOfNegClusters = inputFlags.CaloTopoClusterFlags.doTreatEnergyCutAsAbsolute()
+    #
+    # the following options are not set, since these are the default
+    # values
+    #
+    # NeighborOption                = "super3D",
+    # NumberOfCellsCut              = 4,
+    # EnergyCut                     = 500*MeV,
+        
+
+    CaloTopoCluster=CaloClusterMaker("CaloTopoCluster")
+    CaloTopoCluster.ClustersOutputName="CaloCalTopoClusters"    # cluster maker
+
+    CaloTopoCluster.ClusterMakerTools = [TopoMaker, TopoSplitter]
+            
+    result.addEventAlgo(CaloTopoCluster)
+    return result
+
diff --git a/Calorimeter/CaloRec/share/CaloCellMaker_jobOptions.py b/Calorimeter/CaloRec/share/CaloCellMaker_jobOptions.py
deleted file mode 100644
index 364d547c5d6937c3ad3535d122eb524b2c9c893f..0000000000000000000000000000000000000000
--- a/Calorimeter/CaloRec/share/CaloCellMaker_jobOptions.py
+++ /dev/null
@@ -1,149 +0,0 @@
-#jobOption to make cells in any configuration
-# only from G4 raw channel for time being
-# one of the following variables need be set
-# makeCellFromDigit
-# makeCellFromRawChannel
-# DetFlags can be used in addition to redigitise one or more calorimeter
-# DetFlags.digitize.Tile_setOn()
-# in that case fast digitisation can be requested:
-
-
-#check input variable consistency and deduce which steps are necessary
-if ( not CaloCellMakerFlags.makeCellFromDigit and not CaloCellMakerFlags.makeCellFromRawChannel and not DetFlags.digitize.Calo_allOn()  ):
-    raise RunTimeError, 'only one of these variables must be set:DetFlags.Digitize.calo_allOn() or makeCellFromDigit or makeCellFromRawChannel '
-
-if CaloCellMakerFlags.makeCellFromRawChannel and CaloCellMakerFlags.makeCellFromDigit :
-    raise RunTimeError, 'only one of these variables must be set: makeCellFromDigit or makeCellFromRawChannel'
-
-doLArHitToDigit=False
-doLArDigitToRawChannel=False
-doLArRawChannelToCell=False
-
-doTileHitToDigit=False
-doTileDigitToRawChannel=False
-doTileRawChannelToCell=False
-
-    
-if DetFlags.digitize.LAr_on():
-    if not CaloCellMakerFlags.doLArHitToCellDirect:
-        doLArHitToDigit=True
-        doLArDigitToRawChannel=True
-        doLArRawChannelToCell=True
-
-if DetFlags.digitize.Tile_on():
-    if not CaloCellMakerFlags.doTileHitToRawChannelDirect:
-        doTileHitToDigit=True
-        doTileDigitToRawChannel=True
-    doTileRawChannelToCell=True
-
-        
-if CaloCellMakerFlags.makeCellFromRawChannel :
-    if DetFlags.makeRIO.LAr_on() and not CaloCellMakerFlags.doLArHitToCellDirect:
-        doLArRawChannelToCell=True
-    if DetFlags.makeRIO.Tile_on() and not CaloCellMakerFlags.doTileHitToRawChannelDirect:
-        doTileRawChannelToCell=True
-
-if CaloCellMakerFlags.makeCellFromDigit:
-    if DetFlags.makeRIO.LAr_on() and not CaloCellMakerFlags.doLArHitToCellDirect:
-        doLArDigitToRawChannel=True
-        doLArRawChannelToCell=True
-    if DetFlags.makeRIO.Tile_on() and  not CaloCellMakerFlags.doTileHitToRawChannelDirect:
-        doTileDigitToRawChannel=True
-        doTileRawChannelToCell=True
-
-
-# SUBCALO enum LAREM LARHEC LARFCAL TILE NSUBCALO NOT_VALID
-from CaloIdentifier import SUBCALO
-
-#make the lar cells
-
-# LArHit to LArDigit
-if doLArHitToDigit:
-    if not DetFlags.digitize.LAr_allOn():
-        raise RunTimeError, 'full LAR partial digitisation not implemented'
-    print "now doing digitization"
-    include( "LArDigitization/LArDigitization_G4_jobOptions.py" )
-
-
-#LArDigit to LArRawChannel
-if doLArDigitToRawChannel:
-    include( "LArROD/LArROD_jobOptions.py" )
-
-# build Tile Raw Channel
-doTileHitToRawChannelDirect=CaloCellMakerFlags.doTileHitToRawChannelDirect
-if (doTileHitToDigit) or (doTileHitToRawChannelDirect) or (doTileDigitToRawChannel):
-    include( "TileSimAlgs/TileDigitization_jobOptions.py" )
-
-
-
-#
-theApp.Dlls += [ 
-"CaloRec"
-]
-theApp.TopAlg += [
-"CaloCellMaker" 
-]
-#--------------------------------------------------------------
-# Algorithms Private Options
-#--------------------------------------------------------------
-CaloCellMaker = Algorithm( "CaloCellMaker" )
-CaloCellMaker.CaloCellsOutputName = "AllCalo"
-if CaloCellMakerFlags.doCompactCellInAddition:
-    CaloCellMaker.CaloCompactCellsOutputName = "CompactAllCalo"
-
-# compactified/decompactified CaloCellContainer replace the normal one
-if CaloCellMakerFlags.doCompactCellInstead:
-    CaloCellMaker.CaloCellsOutputName = "OriginalAllCalo"
-    CaloCellMaker.CaloCompactCellsOutputName = "AllCalo"
-
-#make the calo cells (LArEM, HEC and FCal)
-# configured by doLArHitToCellDirect
-if DetFlags.makeRIO.LAr_on():
-    include ("LArCellRec/LArCellMakerTool_jobOptions.py")
-
-ToolSvc = Service( "ToolSvc" )
-
-
-from AthenaCommon.GlobalFlags  import globalflags
-
-if (globalflags.DataSource()=='geant3' or globalflags.DataSource()=='data' )  and DetFlags.makeRIO.LAr_on():
-    # apply correction to LAr Cells
-    # only lar cell so far in CaloCellContainer. More efficient than checking on calo type.
-    CaloCellMaker.CaloCellMakerToolNames += ["CaloCellContainerCorrectorTool/LArCellCorrectorTool"]
-
-    # apply LArG3EScale correction only for geant3 data
-    if globalflags.DataSource.() == 'geant3':
-        ToolSvc.LArCellCorrectorTool.CaloNums = [ SUBCALO.NSUBCALO ] 
-        ToolSvc.LArCellCorrectorTool.CellCorrectionToolNames= [ "LArG3Escale" ] 
-
-    # apply HV correction only to real data
-    if globalflags.DataSource() == 'data':
-        ToolSvc.LArCellCorrectorTool.CaloNums = [ SUBCALO.NSUBCALO ] 
-        ToolSvc.LArCellCorrectorTool.CellCorrectionToolNames= [ "LArCellHVCorrection" ] 
-
-
-
-# make the tile cells
-include( "TileRecUtils/TileCellBuilder_jobOptions.py" )
-
-
-
-
-
-# now the CaloCellContainer is completely filled with LAr and Tile cells
-
-#finalize container
-CaloCellMaker.CaloCellMakerToolNames += ["CaloCellContainerFinalizerTool"]
-
-#make lots of checks (should not be necessary eventually)
-#to print the check add:
-#ToolSvc.CaloCellContainerCheckerTool.OutputLevel=DEBUG
-CaloCellMaker.CaloCellMakerToolNames += ["CaloCellContainerCheckerTool"] 
-
-
-# if necessary finalize and check the compactified/decompactified tool
-if CaloCellMakerFlags.doCompactCellInAddition or CaloCellMakerFlags.doCompactCellInstead:
-    theApp.DLLs+= ["CaloTools"]
-    CaloCellMaker.CaloCompactCellMakerToolNames += ["CaloCellContainerFinalizerTool"]
-    CaloCellMaker.CaloCompactCellMakerToolNames += ["CaloCellContainerCheckerTool"] 
-
diff --git a/Calorimeter/CaloRec/src/CaloCellContainerFromClusterTool.cxx b/Calorimeter/CaloRec/src/CaloCellContainerFromClusterTool.cxx
index cb80996443c68a53ed8ea17b6cd4a039f2597673..76cec8df4b96888d04d40135fe5c675fd82f6516 100644
--- a/Calorimeter/CaloRec/src/CaloCellContainerFromClusterTool.cxx
+++ b/Calorimeter/CaloRec/src/CaloCellContainerFromClusterTool.cxx
@@ -147,10 +147,7 @@ StatusCode CaloCellContainerFromClusterTool::process(CaloConstCellContainer* the
   // if add additional cells, retrieve full cell container "AllCalo"
   const CaloCellContainer* cellContainer = NULL;
   if (m_addSamplingCells) {
-    if (evtStore()->retrieve(cellContainer, m_cellName).isFailure()
-        || !cellContainer) {
-      ATH_MSG_WARNING( "Can't find CaloCellContainer with key " << m_cellName );
-    }
+    ATH_CHECK( evtStore()->retrieve(cellContainer, m_cellName) );
   }
 
   //On first event check if all containers exist. Remove missing ones
diff --git a/Calorimeter/CaloRec/src/CaloClusterBuilderSW.cxx b/Calorimeter/CaloRec/src/CaloClusterBuilderSW.cxx
index a8ef931fc790df2ec0c044213bbe86862c662bc4..1baf539085d6d374fca18b6ecd06ef17f6dc5f96 100644
--- a/Calorimeter/CaloRec/src/CaloClusterBuilderSW.cxx
+++ b/Calorimeter/CaloRec/src/CaloClusterBuilderSW.cxx
@@ -300,7 +300,7 @@ CaloClusterBuilderSW::execute(const EventContext& ctx,
 
     ATH_MSG_DEBUG("final  et0 eta0 phi0  " << et0 << " " << eta0 <<" "<<phi0);
 
-    xAOD::CaloCluster* cluster_ptr=CaloClusterStoreHelper::makeCluster(cellCont.cptr(),eta0,phi0,xAOD::CaloCluster::SW_35ele);
+    std::unique_ptr<xAOD::CaloCluster> cluster_ptr (CaloClusterStoreHelper::makeCluster(cellCont.cptr(),eta0,phi0,xAOD::CaloCluster::SW_35ele));
 
     SlidingWindowFinder::data_iterator ifirst = swin.cell_begin();
     SlidingWindowFinder::data_iterator ilast  = swin.cell_end();
@@ -314,14 +314,14 @@ CaloClusterBuilderSW::execute(const EventContext& ctx,
       cluster_ptr->addCell(theIndex,1.);
     } 
     // ** Calculate Kine **
-    CaloClusterKineHelper::calculateKine(cluster_ptr,false,true); //No weight at this point! 
+    CaloClusterKineHelper::calculateKine(cluster_ptr.get(),false,true); //No weight at this point! 
     ClusterWithCenter cwc;
-    cwc.cluster=cluster_ptr;
+    cwc.cluster=std::move(cluster_ptr);
     cwc.eta=ieta;
     cwc.phi=iphi;  
     // Note: cluster::et will be zero if we're not filling cells here.
-    cwc.et = m_FillClusterCells ? cluster_ptr->p4().Et() : et0;
-    list_cwc.push_back(cwc); 
+    cwc.et = m_FillClusterCells ? cwc.cluster->p4().Et() : et0;
+    list_cwc.emplace_back(std::move (cwc)); 
   }/////while
   
 
@@ -339,8 +339,6 @@ CaloClusterBuilderSW::execute(const EventContext& ctx,
          break; 
        } else 
        if(elim==2){ // eliminate it2; 
-	 delete (*it2).cluster ; 
-	 // std::cout <<" dup CaloCluster deleted" <<std::endl;
          it2=list_cwc.erase(it2); 
        } else 
        { 
@@ -350,8 +348,6 @@ CaloClusterBuilderSW::execute(const EventContext& ctx,
     }
 
     if(elim==1){ // this one has been eliminated
-	delete it1->cluster ; 
-	 // std::cout <<" dup CaloCluster deleted" <<std::endl;
 	it1=list_cwc.erase(it1); 
     } else 
     {
@@ -365,8 +361,8 @@ CaloClusterBuilderSW::execute(const EventContext& ctx,
 
    
   // add to cluster container.
-  for (const ClusterWithCenter& cwc : list_cwc) {
-    clusColl->push_back(cwc.cluster);
+  for (ClusterWithCenter& cwc : list_cwc) {
+    clusColl->push_back(std::move (cwc.cluster));
   } 
 
   return StatusCode::SUCCESS;
diff --git a/Calorimeter/CaloRec/src/CaloClusterBuilderSW.h b/Calorimeter/CaloRec/src/CaloClusterBuilderSW.h
index 85b8eed95db46f309bdb681760534cc88e0c1330..d968e42c420517611ab250fbc080a3370b70327f 100644
--- a/Calorimeter/CaloRec/src/CaloClusterBuilderSW.h
+++ b/Calorimeter/CaloRec/src/CaloClusterBuilderSW.h
@@ -68,7 +68,7 @@ class CaloClusterBuilderSW : public AthAlgTool, virtual public CaloClusterCollec
   //virtual xAOD::CaloCluster* makeCluster(double eta, double phi); 
 
   struct ClusterWithCenter{ 
-    xAOD::CaloCluster* cluster; 
+    std::unique_ptr<xAOD::CaloCluster> cluster; 
     int eta; 
     int phi;
     float et;
diff --git a/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx b/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx
index 98a6041e3241d7a0cd634b06c9e405a286563a6f..90c75c094068a68baf76b8bc3019c8b8b42531b4 100644
--- a/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx
+++ b/Calorimeter/CaloRec/src/CaloClusterCorrDBWriter.cxx
@@ -120,14 +120,14 @@ StatusCode CaloClusterCorrDBWriter::finalize()
 			      << " to DetStore.\n  Tools: " << toolnames;
   }
   else {
-    CaloRec::ToolConstants* tc = new CaloRec::ToolConstants;
+    auto tc = std::make_unique<CaloRec::ToolConstants>();
     std::string toolnames;
     for (size_t i = 0; i < m_correctionTools.size(); i++) {
       CHECK( m_correctionTools[i]->mergeConstants (*tc) );
       toolnames += m_correctionTools[i]->name() + " ";
     }
 
-    CHECK( detStore()->record (tc, m_key) );
+    CHECK( detStore()->record (std::move(tc), m_key) );
     REPORT_MESSAGE(MSG::INFO) << "Recorded constants for key " << m_key
 			      << " to DetStore.\n  Tools: " << toolnames;
   }//end else m_inline
diff --git a/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx b/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx
index 9938067a1ed98ec7b01556b39010547d5ff44bfb..308adb80aed54ff3541eee8bbc4128c35d644ec7 100644
--- a/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx
+++ b/Calorimeter/CaloRec/test/CaloCellFastCopyTool_test.cxx
@@ -67,6 +67,9 @@ class CaloHelper
 {
 public:
 
+  CaloHelper (const CaloHelper&) = delete;
+  CaloHelper& operator= (const CaloHelper&) = delete;
+
   static CaloHelper* GetInstance(void)
   {
     if (!s_instance) {
diff --git a/Calorimeter/CaloTools/test/CaloCompactCellTool_test.cxx b/Calorimeter/CaloTools/test/CaloCompactCellTool_test.cxx
index b34820d50e03582ef63c909493e6fc78b2f38eb3..f3059756284cd0b9b186f8b936732fc877c6e181 100644
--- a/Calorimeter/CaloTools/test/CaloCompactCellTool_test.cxx
+++ b/Calorimeter/CaloTools/test/CaloCompactCellTool_test.cxx
@@ -122,7 +122,7 @@ CaloCell_ID* make_helper ()
 }
 
 
-CaloCell_SuperCell_ID* make_sc_helper ()
+CaloCell_SuperCell_ID* make_sc_helper (IdDictParser* parser)
 {
   Tile_SuperCell_ID*    tile_id = new Tile_SuperCell_ID;
   LArEM_SuperCell_ID*   em_id   = new LArEM_SuperCell_ID;
@@ -130,7 +130,6 @@ CaloCell_SuperCell_ID* make_sc_helper ()
   LArFCAL_SuperCell_ID* fcal_id = new LArFCAL_SuperCell_ID;
   LArMiniFCAL_ID*       minifcal_id = new LArMiniFCAL_ID;
 
-  IdDictParser* parser = new IdDictParser;
   parser->register_external_entity ("LArCalorimeter",
                                     "IdDictLArCalorimeter.xml");
   IdDictMgr& idd = parser->parse ("IdDictParser/ATLAS_IDS.xml");
@@ -1089,7 +1088,7 @@ void test_errs (const std::vector<CaloCell*>& cells,
 //============================================================================
 
 
-std::vector<CaloCell*> init (ICaloCompactCellTool* & tool)
+std::vector<CaloCell*> init (IdDictParser* parser, ICaloCompactCellTool* & tool)
 {
   ISvcLocator* svcloc;
   if (!Athena_test::initGaudi("CaloCompactCellTool_test.txt", svcloc)) {
@@ -1099,7 +1098,7 @@ std::vector<CaloCell*> init (ICaloCompactCellTool* & tool)
   g_svcloc = svcloc;
 
   CaloCell_ID* helper = make_helper ();
-  CaloCell_SuperCell_ID* schelper = make_sc_helper ();
+  CaloCell_SuperCell_ID* schelper = make_sc_helper (parser);
   CaloIdManager* idmgr = make_idmgr (helper, schelper);
   CaloDetDescrManager* mgr = new CaloDetDescrManager;
   mgr->set_helper (helper);
@@ -1133,10 +1132,10 @@ std::vector<CaloCell*> init (ICaloCompactCellTool* & tool)
 }
 
 
-void runtests ()
+void runtests (IdDictParser* parser)
 {
   ICaloCompactCellTool* tool = 0;
-  std::vector<CaloCell*> cells = init (tool);
+  std::vector<CaloCell*> cells = init (parser, tool);
   if (!tool) std::abort();
 
   seed = 10;
@@ -1228,10 +1227,10 @@ float tv_diff (const timeval& tv1, const timeval& tv2)
 }
 
 
-void timetests (int nrep)
+void timetests (IdDictParser* parser, int nrep)
 {
   ICaloCompactCellTool* tool = 0;
-  std::vector<CaloCell*> cells = init (tool);
+  std::vector<CaloCell*> cells = init (parser, tool);
   if (!tool) std::abort();
 
   CaloCellContainer* cont = fill_cells (10000, cells, true, true);
@@ -1262,13 +1261,14 @@ void timetests (int nrep)
 int main (int argc, char** argv)
 {
   errorcheck::ReportMessage::hideErrorLocus (true);
+  auto parser = std::make_unique<IdDictParser>();
 
   if (argc >= 3 && strcmp (argv[1], "-t") == 0) {
-    timetests (atoi (argv[2]));
+    timetests (parser.get(), atoi (argv[2]));
     return 0;
   }
 
-  runtests ();
+  runtests (parser.get());
 
   return 0;
 }
diff --git a/Calorimeter/CaloUtils/CMakeLists.txt b/Calorimeter/CaloUtils/CMakeLists.txt
index b64565f2f8c806fe9a497b0da8a3b8f215362d51..894da796b2497fe46668dc8e8b711300399958a4 100644
--- a/Calorimeter/CaloUtils/CMakeLists.txt
+++ b/Calorimeter/CaloUtils/CMakeLists.txt
@@ -88,7 +88,8 @@ atlas_add_test( CaloTowerStore_test
 
 atlas_add_test( CaloTowerBuilderTool_test
    SCRIPT test/CaloTowerBuilderTool_test.sh
-   EXTRA_PATTERNS "[0-9] [A-Z]+ 20[123][0-9]|Reading file|^CORAL/Services/ConnectionService (Info|Warning)|^RelationalDatabase Info|^Data source lookup|^DetDescrCnvSvc +INFO|^CORAL/RelationalPlugins/frontier Info|^PluginManager Info|^RalSessionMgr Warning|^DBReplicaSvc +INFO|IOVDbSvc +INFO|^Py:Athena +INFO|^EventInfoMgtInit: Got release|^TEnvRec::ChangeValue|^PoolSvc +INFO|^PoolSvc +WARNING Unable to locate catalog|being retired|including file|Deaccess DbDatabase|^IoComponentMgr +INFO|File version|Global positioning|^Domain|duplicate entry|already loaded|RootDbase: all good|frontier.c|^Py:ConfigurableDb +(WARNING|INFO)|ApplicationMgr +INFO|INFO [sS]top|^CaloIdMgrDetDes.*INFO|^TTOnlineIDDetDe.*INFO|^CaloIDHelper_ID.*INFO|^AtlasDetectorID +INFO|^AthenaEventLoopMgrWARNING|^CaloDM_IDDetDes.*INFO|^CaloLVL1_IDDetD.*INFO|^LArFCAL_ID +INFO|^LArMiniFCAL_IDD.*INFO|^LArHEC_ID +INFO|^LArMiniFCAL_ID +INFO|TileTBIdDetDesc.*INFO|^TileIDDetDescrCnv +INFO|CaloCell_IDDetD.*INFO|TileID +INFO|^LArFCAL_IDDetDe.*INFO|^TileTBIDDetDesc.*INFO|^LArEM_ID +INFO|^LArHEC_IDDetDes.*INFO|^LArEM_IDDetDesc.*INFO|^EndcapDMConstru.*INFO|^GeoModelSvc +INFO|USHAPE|U-shape|XMLFileCatalog Info|No IOVSvcTool associated|^RalSessionMgr Info|RDBMS technology|INFO Found unknown streamer checksum|^GUID: Class pool::DbString has GUID|^AthenaRootStrea.* INFO|INFO TileDddbManager"
+   EXTRA_PATTERNS "[0-9] [A-Z]+ 20[123][0-9]|Reading file|^CORAL/Services/ConnectionService (Info|Warning)|^RelationalDatabase Info|^Data source lookup|^DetDescrCnvSvc +INFO|^CORAL/RelationalPlugins/frontier Info|^PluginManager Info|^RalSessionMgr Warning|^DBReplicaSvc +INFO|IOVDbSvc +INFO|^Py:Athena +INFO|^EventInfoMgtInit: Got release|^TEnvRec::ChangeValue|^PoolSvc +INFO|^PoolSvc +WARNING Unable to locate catalog|being retired|including file|Deaccess DbDatabase|^IoComponentMgr +INFO|File version|Global positioning|^Domain|duplicate entry|already loaded|RootDbase: all good|frontier.c|^Py:ConfigurableDb +(WARNING|INFO)|ApplicationMgr +INFO|INFO [sS]top|^CaloIdMgrDetDes.*INFO|^TTOnlineIDDetDe.*INFO|^CaloIDHelper_ID.*INFO|^AtlasDetectorID +INFO|^AthenaEventLoopMgrWARNING|^CaloDM_IDDetDes.*INFO|^CaloLVL1_IDDetD.*INFO|^LArFCAL_ID +INFO|^LArMiniFCAL_IDD.*INFO|^LArHEC_ID +INFO|^LArMiniFCAL_ID +INFO|TileTBIdDetDesc.*INFO|^TileIDDetDescrCnv +INFO|CaloCell_IDDetD.*INFO|TileID +INFO|^LArFCAL_IDDetDe.*INFO|^TileTBIDDetDesc.*INFO|^LArEM_ID +INFO|^LArHEC_IDDetDes.*INFO|^LArEM_IDDetDesc.*INFO|^EndcapDMConstru.*INFO|^GeoModelSvc +INFO|USHAPE|U-shape|XMLFileCatalog Info|No IOVSvcTool associated|^RalSessionMgr Info|RDBMS technology|INFO Found unknown streamer checksum|^GUID: Class pool::DbString has GUID|^AthenaRootStrea.* INFO|INFO TileDddbManager|oracle Info"
+   ENVIRONMENT "ATLAS_REFERENCE_TAG=CaloUtils/CaloUtils-01-00-01"
    PROPERTIES TIMEOUT 500 )
 
 # Install files from the package:
diff --git a/Calorimeter/CaloUtils/doc/packagedoc.h b/Calorimeter/CaloUtils/doc/packagedoc.h
index c210ffb3516c20fce355e19f56c6f2f0c91b0888..32890996a657df271b3d1b32e000ffae496d8966 100644
--- a/Calorimeter/CaloUtils/doc/packagedoc.h
+++ b/Calorimeter/CaloUtils/doc/packagedoc.h
@@ -15,7 +15,6 @@ Lelas, Kyle Cranmer
 
 This is the package for calorimeter utilities.
 
-@section CaloUtils_CaloUtilsReq Requirements
 
 
 
diff --git a/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref b/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref
index cad5db8dd0df625fc3020b9b02e22c74b8f5df36..bfa5c0d40b666f09a2062ac26093e64530b426b2 100644
--- a/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref
+++ b/Calorimeter/CaloUtils/share/CaloTowerStore_test.ref
@@ -1,30 +1,29 @@
-Fri Mar 17 17:20:46 CET 2017
+Mon Sep  4 19:53:44 CEST 2017
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc49-opt] [private/private] -- built on [2017-03-17 17:16]
+Py:Athena            INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-dbg] [atlas-work3/ed8ca9194f] -- built on [2017-09-04T1641]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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 "CaloUtils/CaloTowerStore_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 5282 configurables from 7 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5393 configurables from 60 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 EventInfoMgtInit: Got release version  Athena-22.0.0
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
-Data source lookup using /cvmfs/atlas-nightlies.cern.ch/repo/sw/multithreading/2017-03-16T2130/Athena/22.0.0/InstallArea/x86_64-slc6-gcc49-opt/XML/AtlasAuthentication/dblookup.xml file
 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 "TileIdCnv/TileIdCnv_jobOptions.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
-ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+[?1034hApplicationMgr       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 17:21:02 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
+                                          running on lxplus013.cern.ch on Mon Sep  4 19:54:05 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -32,24 +31,26 @@ 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 2517 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2620 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 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/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus013.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 via PathResolver, check your DATAPATH variable
+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] 
 PoolSvc              INFO Re-initializing PoolSvc
 IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
@@ -71,15 +72,15 @@ RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP
 CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0
 CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
 CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
-CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/build1/tsulaia/athena-devel/build/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )' - do NOT retry
 CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected
-CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/build1/tsulaia/athena-devel/build/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )
 CORAL/RelationalPlugins/frontier Info The current compresion level is 5
 CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected
 CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode
 RalSessionMgr Info Start a read-only transaction active for the duration of the database connection
 RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_LAR/OFLP200'
-RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.7.0 will be opened using CURRENT client release number 3.1.6
+RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.7.0 will be opened using CURRENT client release number 3.1.8
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvcTool           INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_CALO/OFLP200
@@ -87,13 +88,13 @@ RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_CALO/OFLP200'
 RalSessionMgr Info Connect to the database server
 CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
 CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
-CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/build1/tsulaia/athena-devel/build/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )' - do NOT retry
 CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected
-CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/build1/tsulaia/athena-devel/build/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )
 CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode
 RalSessionMgr Info Start a read-only transaction active for the duration of the database connection
 RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_CALO/OFLP200'
-RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.4 will be opened using CURRENT client release number 3.1.6
+RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.4 will be opened using CURRENT client release number 3.1.8
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection
 RalSessionMgr Info Disconnect from the database server
@@ -154,16 +155,19 @@ DetDescrCnvSvc       INFO  filling address for CaloCell_ID with CLID 123500438 a
 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          INFO Retrieved DetectorTools = PrivateToolHandleArray(['LArDetectorToolNV/LArDetectorToolNV','TileDetectorTool/TileDetectorTool'])
 CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
 CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
-CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/build1/tsulaia/athena-devel/build/Calorimeter/CaloUtils/unitTestRun/geomDB is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/geomDB is not writable" )' - do NOT retry
 CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected
-CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/build1/tsulaia/athena-devel/build/Calorimeter/CaloUtils/unitTestRun/geomDB is not writable" )
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/geomDB is not writable" )
 CORAL/RelationalPlugins/frontier Info The current compresion level is 5
 CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected
 CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode
-ClassIDSvc           INFO  getRegistryEntries: read 4833 CLIDRegistry entries for module ALL
+GeoModelSvc::RD...WARNING  Getting PixTBMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting PixTBMaterials with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMaterials with default tag
+ClassIDSvc           INFO  getRegistryEntries: read 5152 CLIDRegistry entries for module ALL
 GeoModelSvc.LAr...   INFO Keys for LAr are ATLAS-R2-2015-03-01-00  ATLAS
 GeoModelSvc.LAr...   INFO Building LAr version LAr-Revised-17-01 while ATLAS version is ATLAS-R2-2015-03-01-00
 GeoModelSvc.LAr...   INFO LAr Geometry Options:
@@ -201,13 +205,13 @@ IdDictDetDescrCnv    INFO Dictionary MuonSpectrometer     version R.02
 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
-ClassIDSvc           INFO  getRegistryEntries: read 111 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 115 CLIDRegistry entries for module ALL
 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= 21900Kb 	 Time = 0.67S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 27892Kb 	 Time = 1.7S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 GeoModelSvc.Til...   INFO TileDddbManager: m_tag = ATLAS-R2-2015-03-01-00
 GeoModelSvc.Til...   INFO TileDddbManager: n_tiglob = 5
@@ -218,7 +222,7 @@ GeoModelSvc.Til...   INFO TileDddbManager: n_tilb = 21
 GeoModelSvc.Til...   INFO TileDddbManager: n_tileSwitches = 1
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/multithreading/2017-03-16T2130/Athena/22.0.0/InstallArea/x86_64-slc6-gcc49-opt/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/TileNeighbour_reduced.txt
 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
@@ -226,9 +230,9 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/multithreading/2017-03-16T2130/Athena/22.0.0/InstallArea/x86_64-slc6-gcc49-opt/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/multithreading/2017-03-16T2130/Athena/22.0.0/InstallArea/x86_64-slc6-gcc49-opt/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/multithreading/2017-03-16T2130/Athena/22.0.0/InstallArea/x86_64-slc6-gcc49-opt/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-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.
@@ -265,33 +269,33 @@ GeoModelSvc.Til...   INFO  Global positioning of positive ext.barrel with rotati
 GeoModelSvc.Til...   INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) CLHEP::cm
 GeoModelSvc.Til...   INFO  TileDetDescrManager: entering create_elements() 
 ClassIDSvc           INFO  getRegistryEntries: read 6 CLIDRegistry entries for module ALL
-GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3496Kb 	 Time = 0.19S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3876Kb 	 Time = 1.77S
 CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7
 CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected
-ClassIDSvc           INFO  getRegistryEntries: read 63 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
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr       INFO Application Manager Started successfully
-ClassIDSvc           INFO  getRegistryEntries: read 2110 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2199 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  start of run 1    <<<===
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
-ClassIDSvc           INFO  getRegistryEntries: read 107 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_LAR/OFLP200'
 RalSessionMgr Info Connect to the database server
 CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
 CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
-CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/build1/tsulaia/athena-devel/build/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )' - do NOT retry
 CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected
-CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/build1/tsulaia/athena-devel/build/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/sqlite200 is not writable" )
 CORAL/RelationalPlugins/frontier Info The current compresion level is 5
 CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected
 CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode
 RalSessionMgr Info Start a read-only transaction active for the duration of the database connection
 RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_LAR/OFLP200'
-RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.7.0 will be opened using CURRENT client release number 3.1.6
+RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.7.0 will be opened using CURRENT client release number 3.1.8
 IOVDbSvc             INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARAlign-mc11-00 for folder /LAR/Align
 IOVDbSvc             INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix2 for folder /LAR/Identifier/LArTTCellMapAtlas
@@ -310,7 +314,7 @@ RootDatabase.open Info /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_
 ClassIDSvc           INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 60 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 61 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -327,25 +331,35 @@ 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/multithreading/2017-03-16T2130/Athena/22.0.0/InstallArea/x86_64-slc6-gcc49-opt/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/multithreading/2017-03-16T2130/Athena/22.0.0/InstallArea/x86_64-slc6-gcc49-opt/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/multithreading/2017-03-16T2130/Athena/22.0.0/InstallArea/x86_64-slc6-gcc49-opt/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-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/multithreading/2017-03-16T2130/Athena/22.0.0/InstallArea/x86_64-slc6-gcc49-opt/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
 CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
 CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
-CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/build1/tsulaia/athena-devel/build/Calorimeter/CaloUtils/unitTestRun/geomDB is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/geomDB is not writable" )' - do NOT retry
 CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#10 will be disconnected
-CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/build1/tsulaia/athena-devel/build/Calorimeter/CaloUtils/unitTestRun/geomDB is not writable" )
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/geomDB is not writable" )
 CORAL/RelationalPlugins/frontier Info The current compresion level is 5
 CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected
 CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode
 CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11
 CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected
+CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
+CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
+CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/geomDB is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#12 will be disconnected
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/Calorimeter/CaloUtils/unitTestRun/geomDB is not writable" )
+CORAL/RelationalPlugins/frontier Info The current compresion level is 5
+CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#13 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#7(C#13.s#1) started on connectionID=C#13 to service "ATLF/()" for user "" in read-only mode
+CORAL/Services/ConnectionService Info User session with sessionID=S#7(C#13.s#1) will be ended on connectionID=C#13
+CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#13 will be disconnected
 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
@@ -357,29 +371,30 @@ Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 06C9EAE8-6F
 /cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root Info Database being retired...
 Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
 Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
 IncidentProcAlg2     INFO Finalize
 IdDictDetDescrCnv    INFO in finalize
-IOVDbSvc             INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     1.25 ))s
+IOVDbSvc             INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     3.60 ))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/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.61 ))s
-IOVDbSvc             INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 ((     0.87 ))s
+IOVDbSvc             INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.55 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 ((     0.22 ))s
 IOVDbSvc          WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved
-IOVDbSvc             INFO Total payload read from COOL: 538 bytes in ((      2.73 ))s
+IOVDbSvc             INFO Total payload read from COOL: 538 bytes in ((      4.38 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: ((     2.73 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: ((     4.38 ))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= 0.79  [s] Ave/Min/Max=0.395(+-0.385)/ 0.01/ 0.78  [s] #=  2
-cObj_ALL             INFO Time User   : Tot= 0.86  [s] Ave/Min/Max= 0.43(+- 0.37)/ 0.06/  0.8  [s] #=  2
-ChronoStatSvc        INFO Time User   : Tot= 3.49  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot= 0.91  [s] Ave/Min/Max=0.455(+-0.425)/ 0.03/ 0.88  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 1.05  [s] Ave/Min/Max=0.525(+-0.405)/ 0.12/ 0.93  [s] #=  2
+ChronoStatSvc        INFO Time User   : Tot= 21.5  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx b/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx
index b8d869613ab81f4fdf9594b81579e10d2117190c..8223613cd9522572d937f06107d0314868dc890d 100644
--- a/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx
+++ b/Calorimeter/CaloUtils/test/CaloLayerCalculator_test.cxx
@@ -243,9 +243,9 @@ void test1 (const CaloCellContainer* cells)
              5*deta, 5*dphi, CaloSampling::EMB2);
   clust1_check (calc);
 
-  xAOD::CaloCluster* clust = CaloClusterStoreHelper::makeCluster (cells);
+  std::unique_ptr<xAOD::CaloCluster> clust (CaloClusterStoreHelper::makeCluster (cells));
   calc.fill (cells->begin(), cells->end(), clust1_eta0, clust1_phi0,
-             5*deta, 5*dphi, CaloSampling::EMB2, clust);
+             5*deta, 5*dphi, CaloSampling::EMB2, clust.get());
   clust1_check (calc);
   assert (clust->size() == 3);
   calc.fill (clust->begin(), clust->end(), clust1_eta0, clust1_phi0,
diff --git a/Control/AthAllocators/ATLAS_CHECK_THREAD_SAFETY b/Control/AthAllocators/AthAllocators/ATLAS_CHECK_THREAD_SAFETY
similarity index 100%
rename from Control/AthAllocators/ATLAS_CHECK_THREAD_SAFETY
rename to Control/AthAllocators/AthAllocators/ATLAS_CHECK_THREAD_SAFETY
diff --git a/Control/AthAllocators/cmt/requirements b/Control/AthAllocators/cmt/requirements
deleted file mode 100644
index 6bacde53aad038a3d268f9a9df64618c8aca22ab..0000000000000000000000000000000000000000
--- a/Control/AthAllocators/cmt/requirements
+++ /dev/null
@@ -1,50 +0,0 @@
-package AthAllocators
-
-author scott snyder   <snyder@bnl.gov>
-
-use AtlasPolicy    AtlasPolicy-*
-use GaudiInterface GaudiInterface-* External 
-use AtlasBoost     AtlasBoost-*     External
-
-
-private
-use CxxUtils       CxxUtils-*       Control
-end_private
-
-  
-apply_pattern installed_library
-library AthAllocators *.cxx
-
-
-private 
-use TestTools      TestTools-*         AtlasTest 
-
-apply_pattern UnitTest_run unit_test=exceptions
-apply_pattern UnitTest_run unit_test=ArenaAllocatorBase
-apply_pattern UnitTest_run unit_test=ArenaBlockAllocatorBase
-apply_pattern UnitTest_run unit_test=ArenaBlock
-apply_pattern UnitTest_run unit_test=ArenaPoolAllocator
-apply_pattern UnitTest_run unit_test=ArenaHeapAllocator
-apply_pattern UnitTest_run unit_test=ArenaHandleBase
-apply_pattern UnitTest_run unit_test=ArenaHandleBaseAllocT
-apply_pattern UnitTest_run unit_test=ArenaHandleBaseT
-apply_pattern UnitTest_run unit_test=ArenaHeader
-apply_pattern UnitTest_run unit_test=ArenaCachingHandle
-apply_pattern UnitTest_run unit_test=ArenaHandle
-apply_pattern UnitTest_run unit_test=ArenaAllocatorCreator
-apply_pattern UnitTest_run unit_test=ArenaAllocatorRegistry
-apply_pattern UnitTest_run unit_test=Arena
-apply_pattern UnitTest_run unit_test=ArenaBase
-apply_pattern UnitTest_run unit_test=ArenaPoolSTLAllocator
-apply_pattern UnitTest_run unit_test=ArenaHeapSTLAllocator
-apply_pattern UnitTest_run unit_test=ArenaSharedHeapSTLAllocator
-apply_pattern UnitTest_run unit_test=DataPool \
-  extrapatterns="^IncidentSvc +DEBUG Adding|^HistogramPersis.* (INFO|DEBUG)|^JobOptionsSvc +INFO"
-
-macro_append DOXYGEN_INPUT " ../doc" 
-
-
-private
-use AtlasReflex      AtlasReflex-*         External
-apply_pattern lcgdict dict=AthAllocators selectionfile=selection.xml headerfiles="../AthAllocators/AthAllocatorsDict.h"
-
diff --git a/Control/AthAnalysisBaseComps/cmt/requirements b/Control/AthAnalysisBaseComps/cmt/requirements
deleted file mode 100644
index e66dd4e7bc9ebf86073426e7ecab3f52dea0f653..0000000000000000000000000000000000000000
--- a/Control/AthAnalysisBaseComps/cmt/requirements
+++ /dev/null
@@ -1,36 +0,0 @@
-## automatically generated CMT requirements file
-package AthAnalysisBaseComps
-author  will
-
-## for athena policies: this has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## for gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-use StoreGate           StoreGate-*             Control
-
-use AthenaBaseComps AthenaBaseComps-* Control
-
-use IOVDbDataModel IOVDbDataModel-* Database
-
-use AtlasROOT AtlasROOT-* External
-
-use AthContainers AthContainers-* Control
-
-## put here your package dependencies...
-
-branches python src src/components 
-
-
-#library AthAnalysisBaseComps *.cxx 
-#apply_pattern installed_library
-apply_pattern dual_use_library files="*.cxx"
-
-apply_pattern declare_joboptions files="*.py"
-
-
-private
-use AtlasReflex  AtlasReflex-*  External -no_auto_imports
-apply_pattern lcgdict dict=AthAnalysisBaseComps selectionfile=selection.xml headerfiles="../AthAnalysisBaseComps/AthAnalysisBaseCompsDict.h"
-end_private
-
diff --git a/Control/AthContainers/AthContainers/AuxStoreInternal.h b/Control/AthContainers/AthContainers/AuxStoreInternal.h
index 5116fc8b9830ef5d86a312171de257e2807db5f1..29fda72a23bfc7c0fcb477e3c45634b73ed3589e 100644
--- a/Control/AthContainers/AthContainers/AuxStoreInternal.h
+++ b/Control/AthContainers/AthContainers/AuxStoreInternal.h
@@ -304,6 +304,17 @@ public:
   virtual bool setOption (auxid_t id, const AuxDataOption& option) override;
 
 
+  /**
+   * @brief Lock a decoration.
+   * @param auxid Identifier of the decoration to lock.
+   *
+   * A decoration is locked by changing from a decoration to an ordinary
+   * variable.  If the container itself is locked, then modifications
+   * to be variable are not permitted after this call.
+   */
+  virtual void lockDecoration (SG::auxid_t auxid) override;
+
+
 protected:
   /**
    * @brief Return a pointer to the data to be stored for one aux data item.
diff --git a/Control/AthContainers/AthContainers/tools/DVLDataBucket.h b/Control/AthContainers/AthContainers/tools/DVLDataBucket.h
index beb65a2da94b339db4d108bb6469f247797cd4fe..d8e76b253c5fbcad64ea44094c3889ecbb9748f1 100644
--- a/Control/AthContainers/AthContainers/tools/DVLDataBucket.h
+++ b/Control/AthContainers/AthContainers/tools/DVLDataBucket.h
@@ -98,7 +98,7 @@ public:
    * @param isConst True if the object being converted is regarded as const.
    */
   virtual void* cast (CLID clid, IRegisterTransient* irt = 0,
-                      bool isConst = true) const override;
+                      bool isConst = true) override;
     
 
   /**
@@ -111,7 +111,7 @@ public:
    */
   virtual void* cast (const std::type_info& tinfo,
                       IRegisterTransient* irt = 0,
-                      bool isConst = true) const override;
+                      bool isConst = true) override;
 
 
   /**
diff --git a/Control/AthContainers/AthContainers/tools/DVLDataBucket.icc b/Control/AthContainers/AthContainers/tools/DVLDataBucket.icc
index 9ef71e31131c7bf4c6d413b45dd1ab2d3913f2c0..b30d9347dc9290eb65688732d0cef630e58cc190 100644
--- a/Control/AthContainers/AthContainers/tools/DVLDataBucket.icc
+++ b/Control/AthContainers/AthContainers/tools/DVLDataBucket.icc
@@ -141,7 +141,7 @@ DVLDataBucket<T>::~DVLDataBucket()
 template <typename T> 
 void*
 DVLDataBucket<T>::cast (CLID clid, IRegisterTransient* irt /*= 0*/,
-                        bool /*isConst = true*/) const
+                        bool /*isConst = true*/)
 {
   const T* ptr = *((DataBucket<T>*)this);
 
@@ -193,7 +193,7 @@ template <typename T>
 void*
 DVLDataBucket<T>::cast (const std::type_info& tinfo,
                         IRegisterTransient* irt /*= 0*/,
-                        bool /*isConst = true*/) const
+                        bool /*isConst = true*/)
 {
   const T* ptr = *((DataBucket<T>*)this);
 
diff --git a/Control/AthContainers/AthContainers/tools/threading.h b/Control/AthContainers/AthContainers/tools/threading.h
index 974c71d00abeaf27d9843f12c13a8b8c41e12de5..e409ab599527a5fea3f8015dba3ed242d731b37f 100644
--- a/Control/AthContainers/AthContainers/tools/threading.h
+++ b/Control/AthContainers/AthContainers/tools/threading.h
@@ -81,6 +81,8 @@ class thread_specific_ptr
 public:
   thread_specific_ptr() : m_ptr(0) {}
   ~thread_specific_ptr() { delete m_ptr; }
+  thread_specific_ptr (const thread_specific_ptr&) = delete;
+  thread_specific_ptr& operator= (const thread_specific_ptr&) = delete;
   T* get() const { return m_ptr; }
   T* operator->() const { return m_ptr; }
   T& operator*() const { return *m_ptr; }
diff --git a/Control/AthContainers/Root/AuxStoreInternal.cxx b/Control/AthContainers/Root/AuxStoreInternal.cxx
index 1f6a78dbae745330d803357f521f315e69b1edf9..c29bf7d442b5fb454c1154b1d245b41c769db34a 100644
--- a/Control/AthContainers/Root/AuxStoreInternal.cxx
+++ b/Control/AthContainers/Root/AuxStoreInternal.cxx
@@ -654,4 +654,21 @@ void* AuxStoreInternal::getDataInternal (auxid_t auxid,
 }
 
 
+/**
+ * @brief Lock a decoration.
+ * @param auxid Identifier of the decoration to lock.
+ *
+ * A decoration is locked by changing from a decoration to an ordinary
+ * variable.  If the container itself is locked, then modifications
+ * to be variable are not permitted after this call.
+ */
+void AuxStoreInternal::lockDecoration (SG::auxid_t auxid)
+{
+  guard_t guard (m_mutex);
+  if (auxid < m_isDecoration.size()) {
+    m_isDecoration[auxid] = false;
+  }
+}
+
+
 } // namespace SG
diff --git a/Control/AthContainers/Root/normalizedTypeinfoName.cxx b/Control/AthContainers/Root/normalizedTypeinfoName.cxx
index ddd77a90e1b43c35ec028219df03ac633ca8ab9c..8e755f99fe8ea052b779f793f88c0113dde6a669 100644
--- a/Control/AthContainers/Root/normalizedTypeinfoName.cxx
+++ b/Control/AthContainers/Root/normalizedTypeinfoName.cxx
@@ -84,6 +84,12 @@ void initRules (CxxUtils::ClassName::Rules& rules)
   // Handle gcc's C++11 ABI.
   rules.add ("std::__cxx11", "std");
 
+  // This works around a bug in Gaudi's typeinfoName, which substitutes
+  // 'std::basic_string<...> ?' with `std::string' --- but including the
+  // optional trailing space in the pattern to replace means that we can
+  // end up with `std::stringconst'.
+  rules.add ("std::stringconst", "const std::string");
+
   // Needed for macos?
   rules.add ("std::__1", "std");
 }
diff --git a/Control/AthContainers/cmt/Makefile.RootCore b/Control/AthContainers/cmt/Makefile.RootCore
deleted file mode 100644
index e8cb703ebb8558cd7b092ac05874f3a43eb0a053..0000000000000000000000000000000000000000
--- a/Control/AthContainers/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,24 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = AthContainers
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = AthContainersInterfaces AthLinks TestTools CxxUtils
-PACKAGE_TRYDEP   = Asg_gccxml
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Control/AthContainers/cmt/requirements b/Control/AthContainers/cmt/requirements
deleted file mode 100644
index 2a080a3df1a778af17d55283a516358849de55c1..0000000000000000000000000000000000000000
--- a/Control/AthContainers/cmt/requirements
+++ /dev/null
@@ -1,77 +0,0 @@
-package AthContainers
-# $Id: requirements 777300 2016-10-08 21:20:26Z ssnyder $
-
-author Paolo Calafiura   <Paolo.Calafiura@cern.ch>
-author Hong Ma           <hma@bnl.gov>
-author Srini Rajagopalan <srinir@bnl.gov>
-author scott snyder      <snyder@bnl.gov>
-
-use AtlasPolicy    AtlasPolicy-*
-use AthenaKernel   AthenaKernel-*   Control
-use SGTools        SGTools-*        Control
-use CxxUtils       CxxUtils-*       Control
-use AthContainersInterfaces AthContainersInterfaces-* Control
-use AthLinks       AthLinks-*       Control
-use AtlasBoost     AtlasBoost-*     External
-use GaudiInterface GaudiInterface-* External 
-
-private
-use AtlasROOT      AtlasROOT-*         External
-end_private
-
-apply_pattern installed_library
-library AthContainers *.cxx ../Root/*.cxx
-
-private 
-
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=removeDuplicates
-apply_pattern UnitTest_run unit_test=DataVector
-apply_pattern UnitTest_run unit_test=DataVector_a
-apply_pattern UnitTest_run unit_test=DataVector_b
-apply_pattern UnitTest_run unit_test=DataVector_c
-apply_pattern UnitTest_run unit_test=DataVector_d
-apply_pattern UnitTest_run unit_test=DataVector_e
-apply_pattern UnitTest_run unit_test=DataVector_f
-apply_pattern UnitTest_run unit_test=DataList
-apply_pattern UnitTest_run unit_test=DVLInfo
-apply_pattern UnitTest_run unit_test=DVLDataBucket
-apply_pattern UnitTest_run unit_test=DVLCast
-apply_pattern UnitTest_run unit_test=IsMostDerivedFlag
-apply_pattern UnitTest_run unit_test=ElementProxy
-apply_pattern UnitTest_run unit_test=DVLIterator
-apply_pattern UnitTest_run unit_test=DVL_iter_swap
-apply_pattern UnitTest_run unit_test=foreach
-
-apply_pattern UnitTest_run unit_test=AuxTypeVector
-apply_pattern UnitTest_run unit_test=AuxTypeVectorFactory
-apply_pattern UnitTest_run unit_test=AuxTypeRegistry extrapatterns='will use std::'
-apply_pattern UnitTest_run unit_test=AuxVectorData extrapatterns='will use std::'
-apply_pattern UnitTest_run unit_test=AuxVectorBase extrapatterns='will use std::'
-apply_pattern UnitTest_run unit_test=AuxStoreInternal
-apply_pattern UnitTest_run unit_test=AuxStoreStandalone
-apply_pattern UnitTest_run unit_test=AuxElement
-apply_pattern UnitTest_run unit_test=AuxElementComplete
-apply_pattern UnitTest_run unit_test=error
-apply_pattern UnitTest_run unit_test=threading
-apply_pattern UnitTest_run unit_test=threading_nothreads
-apply_pattern UnitTest_run unit_test=exceptions
-apply_pattern UnitTest_run unit_test=normalizedTypeinfoName
-apply_pattern UnitTest_run unit_test=getThinnedFlags
-apply_pattern UnitTest_run unit_test=copyAuxStoreThinned
-apply_pattern UnitTest_run unit_test=copyThinned
-apply_pattern UnitTest_run unit_test=PackedParameters
-apply_pattern UnitTest_run unit_test=PackedConverter
-apply_pattern UnitTest_run unit_test=PackedContainer
-apply_pattern UnitTest_run unit_test=debug
-apply_pattern UnitTest_run unit_test=dataVectorAsELV
-apply_pattern UnitTest_run unit_test=ViewVector
-apply_pattern UnitTest_run unit_test=ViewVectorBase
-
-macro_append DOXYGEN_INPUT " ../doc" 
-
-private
-use AtlasReflex      AtlasReflex-*         External
-apply_pattern lcgdict dict=AthContainers selectionfile=selection.xml \
-                      headerfiles="../AthContainers/AthContainersDict.h" \
-                      extralibfiles=../Root/dict/*.cxx
diff --git a/Control/AthContainers/test/AuxElement_test.cxx b/Control/AthContainers/test/AuxElement_test.cxx
index 0e294a9cbe3b7591e00e58537a6e694d55d90040..49b626ca352f3a6a9751b54641a99cf71d3f74cd 100644
--- a/Control/AthContainers/test/AuxElement_test.cxx
+++ b/Control/AthContainers/test/AuxElement_test.cxx
@@ -81,6 +81,7 @@ public:
   virtual void lock() { std::abort(); }
   virtual void clearDecorations() { std::abort(); }
   virtual size_t size() const { std::abort(); }
+  virtual void lockDecoration (SG::auxid_t) { std::abort(); }
 
   void add (SG::auxid_t auxid, std::unique_ptr<std::vector<float> > vec);
 
diff --git a/Control/AthContainers/test/AuxStoreInternal_test.cxx b/Control/AthContainers/test/AuxStoreInternal_test.cxx
index d29604f330343c68b770af1185feb01bcfc5f804..86d747299c1922f80fff529087de26990680148e 100644
--- a/Control/AthContainers/test/AuxStoreInternal_test.cxx
+++ b/Control/AthContainers/test/AuxStoreInternal_test.cxx
@@ -214,9 +214,7 @@ void test2()
 
   s.lock();
 
-  SG::auxid_set_t idset;
-  idset.insert (ityp1);
-  idset.insert (ityp2);
+  SG::auxid_set_t idset {ityp1, ityp2};
   assert (s.getAuxIDs() == idset);
 
   assert (i1 == s.getData(ityp1));
@@ -245,6 +243,13 @@ void test2()
   assert (s.getData(ityp1) == i1);
   assert (s.getData(ityp2) == i2);
 
+  i3 = reinterpret_cast<int*> (s.getDecoration(ityp3, 10, 20));
+  assert (i3 != 0);
+  assert (i3 == s.getDecoration (ityp3, 10, 20));
+  s.lockDecoration (ityp3);
+  EXPECT_EXCEPTION (SG::ExcStoreLocked, s.getDecoration (ityp3, 10, 20));
+  assert (i3 == s.getData (ityp3));
+
   EXPECT_EXCEPTION (SG::ExcStoreLocked, s.resize(100));
   EXPECT_EXCEPTION (SG::ExcStoreLocked, s.reserve(100));
   EXPECT_EXCEPTION (SG::ExcStoreLocked, s.shift(1, 2));
diff --git a/Control/AthContainers/test/AuxVectorData_test.cxx b/Control/AthContainers/test/AuxVectorData_test.cxx
index 289a896979360eda6cc0a8b0e6e50091547d6f6d..2414a7312987dfc340d38355274c9b1f7dbe025e 100644
--- a/Control/AthContainers/test/AuxVectorData_test.cxx
+++ b/Control/AthContainers/test/AuxVectorData_test.cxx
@@ -375,6 +375,7 @@ public:
   virtual void* getDecoration (SG::auxid_t, size_t, size_t) { std::abort(); }
   virtual const SG::auxid_set_t& getAuxIDs() const { std::abort(); }
   virtual void lock() { std::abort(); }
+  virtual void lockDecoration (SG::auxid_t) { std::abort(); }
   virtual void clearDecorations() { std::abort(); }
   virtual size_t size() const { std::abort(); }
   virtual void* getData (SG::auxid_t, size_t, size_t) { std::abort(); }
diff --git a/Control/AthContainers/test/DataVector_test.cxx b/Control/AthContainers/test/DataVector_test.cxx
index 20ebcdc51fcf4b592ef96349f8e7ae2d75b113e9..a9b91253f0421fa3fc6222e535e174fe850a999d 100644
--- a/Control/AthContainers/test/DataVector_test.cxx
+++ b/Control/AthContainers/test/DataVector_test.cxx
@@ -761,6 +761,7 @@ public:
   virtual void* getDecoration (SG::auxid_t, size_t, size_t) { return 0; }
   virtual const SG::auxid_set_t& getAuxIDs() const { return m_auxids; }
   virtual void lock() { }
+  virtual void lockDecoration (SG::auxid_t) { }
   virtual void clearDecorations() { }
   virtual size_t size() const { return 0; }
   virtual void* getData (SG::auxid_t, size_t, size_t) { return 0; }
diff --git a/Control/AthContainers/test/normalizedTypeinfoName_test.cxx b/Control/AthContainers/test/normalizedTypeinfoName_test.cxx
index d862c563ed18a344125fc53bea60387077f306e3..c004b742b153bca8a493ee3fc6900eee1f70e40c 100644
--- a/Control/AthContainers/test/normalizedTypeinfoName_test.cxx
+++ b/Control/AthContainers/test/normalizedTypeinfoName_test.cxx
@@ -35,6 +35,9 @@ void test1()
 
   const std::type_info& ti4 = typeid (std::vector<std::string>);
   assert (SG::normalizedTypeinfoName (ti4) == "std::vector<std::string>");
+
+  const std::type_info& ti5 = typeid (std::map<std::string, int>);
+  assert (SG::normalizedTypeinfoName (ti5) == "std::map<std::string,int>");
 }
 
 
diff --git a/Control/AthContainersInterfaces/AthContainersInterfaces/IConstAuxStore.h b/Control/AthContainersInterfaces/AthContainersInterfaces/IConstAuxStore.h
index 98a8322db5199c3f8a6844359cb6bc3ded129a55..e90337069c419b7ffe528e42cf2cb4f10b5028d7 100644
--- a/Control/AthContainersInterfaces/AthContainersInterfaces/IConstAuxStore.h
+++ b/Control/AthContainersInterfaces/AthContainersInterfaces/IConstAuxStore.h
@@ -139,6 +139,17 @@ public:
    * May return 0 for a store with no aux data.
    */
   virtual size_t size() const = 0;
+
+
+  /**
+   * @brief Lock a decoration.
+   * @param auxid Identifier of the decoration to lock.
+   *
+   * A decoration is locked by changing from a decoration to an ordinary
+   * variable.  If the container itself is locked, then modifications
+   * to be variable are not permitted after this call.
+   */
+  virtual void lockDecoration (SG::auxid_t auxid) = 0;
 };
 
 
diff --git a/Control/AthContainersInterfaces/cmt/Makefile.RootCore b/Control/AthContainersInterfaces/cmt/Makefile.RootCore
deleted file mode 100644
index a6c3c93832efc6352bb38ff718744337826da2de..0000000000000000000000000000000000000000
--- a/Control/AthContainersInterfaces/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,24 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = AthContainersInterfaces
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = -DXAOD_STANDALONE
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = 
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 0
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 1
-PACKAGE_REFLEX   = 0
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Control/AthContainersInterfaces/cmt/requirements b/Control/AthContainersInterfaces/cmt/requirements
deleted file mode 100644
index 238be60306ef9e3fafd667fb31283077fba2cc84..0000000000000000000000000000000000000000
--- a/Control/AthContainersInterfaces/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package AthContainersInterfaces
-
-author scott snyder      <snyder@bnl.gov>
-
-use AtlasPolicy    AtlasPolicy-*
-
-# Only if XAOD_STANDALONE not defined.
-use SGTools        SGTools-*        Control
-
-# Only with c++03.
-use AtlasBoost     AtlasBoost-*     External
-
-
-private 
-use TestTools      TestTools-*         AtlasTest 
-
-apply_pattern UnitTest_run unit_test=AuxStore_traits
-apply_pattern UnitTest_run unit_test=AuxDataOption
diff --git a/Control/AthContainersRoot/cmt/requirements b/Control/AthContainersRoot/cmt/requirements
deleted file mode 100644
index f12fd3db6ddc103c626aadf67715a2f1dcb03e40..0000000000000000000000000000000000000000
--- a/Control/AthContainersRoot/cmt/requirements
+++ /dev/null
@@ -1,32 +0,0 @@
-package AthContainersRoot
-
-author Scott Snyder <snyder@fnal.gov>
-
-use AtlasPolicy      AtlasPolicy-*    
-use AtlasROOT        AtlasROOT-*        External
-use GaudiInterface   GaudiInterface-*   External
-use RootUtils        RootUtils-*        Control
-use AthContainersInterfaces AthContainersInterfaces-* Control
-use AthContainers    AthContainers-*    Control
-
-private
-use CxxUtils         CxxUtils-*         Control
-
-public
-apply_pattern installed_library
-library AthContainersRoot  *.cxx
-
-macro_append DOXYGEN_INPUT " ../doc" 
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=RootAuxVectorFactory
-apply_pattern UnitTest_run unit_test=getDynamicAuxID
-apply_pattern UnitTest_run unit_test=AuxStoreRoot
-
-
-private
-use AtlasReflex      AtlasReflex-*         External
-apply_pattern lcgdict dict=AthContainersRootTest selectionfile=selection.xml \
-                      headerfiles="../AthContainersRoot/AthContainersRootTestDict.h"
-
diff --git a/Control/AthLinks/cmt/requirements b/Control/AthLinks/cmt/requirements
deleted file mode 100644
index c27cc96a85dc46c8cc2bc15a1381d924d891289b..0000000000000000000000000000000000000000
--- a/Control/AthLinks/cmt/requirements
+++ /dev/null
@@ -1,48 +0,0 @@
-package AthLinks
-
-author Paolo Calafiura   <Paolo.Calafiura@cern.ch>
-author Hong Ma           <hma@bnl.gov>
-author Srini Rajagopalan <srinir@bnl.gov>
-author scott snyder      <snyder@bnl.gov>
-
-use AtlasPolicy    AtlasPolicy-*
-use AthenaKernel   AthenaKernel-*   Control
-use SGTools        SGTools-*        Control
-use CxxUtils       CxxUtils-*       Control
-use AtlasBoost     AtlasBoost-*     External
-use GaudiInterface GaudiInterface-* External
-use AtlasReflex    AtlasReflex-*    External
-
-  
-apply_pattern installed_library
-library AthLinks *.cxx
-
-
-private 
-
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=exceptions
-apply_pattern UnitTest_run unit_test=DataProxyHolder
-apply_pattern UnitTest_run unit_test=IndexHolder
-apply_pattern UnitTest_run unit_test=IdentContIndex
-apply_pattern UnitTest_run unit_test=ForwardIndexingPolicy
-apply_pattern UnitTest_run unit_test=SetIndexingPolicy
-apply_pattern UnitTest_run unit_test=MapIndexingPolicy
-apply_pattern UnitTest_run unit_test=IdentContIndexingPolicy
-apply_pattern UnitTest_run unit_test=IsSTLSequence
-apply_pattern UnitTest_run unit_test=DataLinkBase
-apply_pattern UnitTest_run unit_test=DataLink
-apply_pattern UnitTest_run unit_test=ElementLinkBase
-apply_pattern UnitTest_run unit_test=GenericElementLinkBase
-apply_pattern UnitTest_run unit_test=ElementLink
-apply_pattern UnitTest_run unit_test=ElementLinkFwd
-apply_pattern UnitTest_run unit_test=DataPtr
-apply_pattern UnitTest_run unit_test=AssociationMap \
-  extrapatterns="ClassIDSvc Initialized successfully|^HistogramPersis.* INFO"
-
-macro_append DOXYGEN_INPUT " ../doc" 
-
-
-private
-use AtlasROOT        AtlasROOT-*           External
-apply_pattern lcgdict dict=AthLinks selectionfile=selection.xml headerfiles="../AthLinks/AthLinksDict.h"
diff --git a/Control/AthLinks/src/DataProxyHolder.cxx b/Control/AthLinks/src/DataProxyHolder.cxx
index a2a6ebea7d71436cebd4ee8ddecf4fa3aca616a7..79ee1f2c031061082e11b08ee260205adbed1cd0 100644
--- a/Control/AthLinks/src/DataProxyHolder.cxx
+++ b/Control/AthLinks/src/DataProxyHolder.cxx
@@ -76,19 +76,18 @@ DataProxyHolder::toStorableObject (const_pointer_t obj,
     else {
       // Found a proxy.  Fetch the SG key and check that the type of the object
       // is consistent with the link type.
-      SG::TransientAddress* tad = m_proxy->transientAddress();
-      key = tad->sgkey();
-      if (link_clid != tad->clID() && !tad->transientID (link_clid)) {
-        if (tad->clID() != CLID_NULL)
-          throw SG::ExcCLIDMismatch (tad->clID(), link_clid);
+      key = m_proxy->sgkey();
+      if (link_clid != m_proxy->clID() && !m_proxy->transientID (link_clid)) {
+        if (m_proxy->clID() != CLID_NULL)
+          throw SG::ExcCLIDMismatch (m_proxy->clID(), link_clid);
 
         // Transient clid was null.
         // This can happen when reading a view vector with xAODRootAccess
         // in an athena build, where the TAD may not get a CLID set.
         // Check based on key.
-        sgkey_t link_sgkey = sg->stringToKey (tad->name(), link_clid);
-        if (link_sgkey != tad->sgkey())
-          throw SG::ExcCLIDMismatch (tad->clID(), link_clid);
+        sgkey_t link_sgkey = sg->stringToKey (m_proxy->name(), link_clid);
+        if (link_sgkey != m_proxy->sgkey())
+          throw SG::ExcCLIDMismatch (m_proxy->clID(), link_clid);
       }
     }
   }
@@ -130,15 +129,15 @@ DataProxyHolder::toIdentifiedObject (const ID_type& dataID,
   m_proxy = sg->proxy (link_clid, dataID);
   if (m_proxy == 0) {
     // Didn't find a proxy; make a dummy.
-    SG::TransientAddress* tad = new SG::TransientAddress (link_clid, dataID);
+    auto tad = std::make_unique<SG::TransientAddress> (link_clid, dataID);
     tad->setSGKey (sg->stringToKey (dataID, link_clid));
-    m_proxy = new SG::DataProxy (tad, static_cast<IConverter*>(nullptr));
+    m_proxy = new SG::DataProxy (std::move(tad), static_cast<IConverter*>(nullptr));
     if (sg->addToStore (link_clid, m_proxy).isFailure())
       std::abort();
   }
 
   // Return the proxy's sgkey.
-  return m_proxy->transientAddress()->sgkey();
+  return m_proxy->sgkey();
 }
 
 
@@ -192,19 +191,19 @@ DataProxyHolder::toIdentifiedObject (sgkey_t sgkey,
   
   if (m_proxy == 0) {
     // Still didn't find it --- make a dummy.
-    SG::TransientAddress* tad;
+    std::unique_ptr<SG::TransientAddress> tad;
     if (key)
-      tad = new SG::TransientAddress (clid, *key);
+      tad = std::make_unique<SG::TransientAddress> (clid, *key);
     else
-      tad = new SG::TransientAddress();
+      tad = std::make_unique<SG::TransientAddress>();
     tad->setSGKey (sgkey);
-    m_proxy = new SG::DataProxy (tad, static_cast<IConverter*>(nullptr));
+    m_proxy = new SG::DataProxy (std::move(tad), static_cast<IConverter*>(nullptr));
     if (sg->addToStore (clid, m_proxy).isFailure())
       std::abort();
   }
   else if (link_clid != CLID_NULL &&
            m_proxy->clID() != CLID_NULL &&
-           !m_proxy->transientAddress()->transientID(link_clid))
+           !m_proxy->transientID(link_clid))
   {
     // Found a proxy, but types don't match.
     throw SG::ExcCLIDMismatch (m_proxy->clID(), link_clid);
@@ -260,7 +259,7 @@ void* DataProxyHolder::storableBase (castfn_t* castfn, CLID clid) const
   // between clid and the object type: it may have been stored
   // using a hard cast.  Check to see if this object has actually
   // been registered under the requested clid.
-  if (m_proxy->transientAddress()->transientID (clid)) {
+  if (m_proxy->transientID (clid)) {
     DataBucketBase* db =
       dynamic_cast<DataBucketBase*> (m_proxy->accessData());
 
@@ -373,7 +372,7 @@ void DataProxyHolder::toPersistentNoRemap (sgkey_t& sgkey)
 {
   if (!sgkey && m_proxy) {
     m_proxy = proxy(); // May throw.
-    sgkey = m_proxy->transientAddress()->sgkey();
+    sgkey = m_proxy->sgkey();
   }
 }
 
diff --git a/Control/AthToolSupport/AsgExampleTools/cmt/Makefile.RootCore b/Control/AthToolSupport/AsgExampleTools/cmt/Makefile.RootCore
deleted file mode 100644
index b980d19c14ebbc0ed6b9aa2b3a0121989662ba4a..0000000000000000000000000000000000000000
--- a/Control/AthToolSupport/AsgExampleTools/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,27 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = AsgExampleTools
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS =
-PACKAGE_OBJFLAGS = -DASGTOOL_STANDALONE -DASGTOOL_NOTEVENT
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = AsgTools
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 1
-
-#PACKAGE_SRCFILES = $(wildcard ../src/*.cxx) $(wildcard ../src/standalone/*.cxx)
-PACKAGE_PRGDIR = ../utils
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Control/AthToolSupport/AsgExampleTools/cmt/requirements b/Control/AthToolSupport/AsgExampleTools/cmt/requirements
deleted file mode 100644
index d70e7ad89c978ace23a4ed86f89ef6bd8aa84a90..0000000000000000000000000000000000000000
--- a/Control/AthToolSupport/AsgExampleTools/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package AsgExampleTools
-
-author David Adams
-
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AsgTools                   AsgTools-*                      Control/AthToolSupport
-private
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  GaudiInterface             GaudiInterface-*                External
-end_private
-
-apply_pattern dual_use_library files="*.cxx ../Root/AsgHelloTool.cxx ../Root/UnitTestTool1.cxx ../Root/UnitTestTool2.cxx ../Root/UnitTestTool3.cxx ../Root/UnitTestTool1A.cxx"
-
-private
-# make the unit tests work
-use TestTools      TestTools-*         AtlasTest
-use AtlasGoogleTest AtlasGoogleTest-* External
-apply_pattern UnitTest_run unit_test=gt_ToolHandle
-apply_pattern UnitTest_run unit_test=gt_AnaToolHandle
-macro_append all_dependencies " check "
-macro_append gt_ToolHandle_test_dependencies " AsgExampleTools AsgExampleToolsMergeComponentsList "
-macro_append gt_AnaToolHandle_test_dependencies " AsgExampleTools AsgExampleToolsMergeComponentsList "
-
-# keep the debugging symbols
-macro SEPARATEDEBUG ""
diff --git a/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc b/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc
index b7f1a2a5070a2349075ba69eb3ab559b1d771262..5a0606fb034d56323a81af9439e9982fe7150e41 100644
--- a/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc
+++ b/Control/AthToolSupport/AsgTools/AsgTools/AnaToolHandle.icc
@@ -823,7 +823,7 @@ namespace asg
       break;
     case detail::AnaToolHandleMode::CREATE_SHARED:
       ANA_CHECK (detail::AnaToolShareList::singleton().makeShare (m_name, m_config, sharedTool));
-      // no break
+      // FALLTHROUGH
     case detail::AnaToolHandleMode::RETRIEVE_SHARED:
       assert (sharedTool != nullptr);
       ANA_CHECK (detail::toolHandleCast (th, sharedTool->th()));
diff --git a/Control/AthToolSupport/AsgTools/CMakeLists.txt b/Control/AthToolSupport/AsgTools/CMakeLists.txt
index d84a467e7543b78bbdafee32327beaefc6c24975..a05f1a73629cf4f27044fee45f0d06db74200b1a 100644
--- a/Control/AthToolSupport/AsgTools/CMakeLists.txt
+++ b/Control/AthToolSupport/AsgTools/CMakeLists.txt
@@ -63,7 +63,7 @@ atlas_add_test( gt_UnitTest_test
    SOURCES test/gt_UnitTest_test.cxx
    INCLUDE_DIRS ${GTEST_INCLUDE_DIRS}
    LINK_LIBRARIES ${GTEST_LIBRARIES} AsgTools
-   EXTRA_PATTERNS "\([0-9]+ ms\)|\([0-9]+ ms total\)" )
+   EXTRA_PATTERNS "\([0-9]+ ms\)|\([0-9]+ ms total\)|functionFailure" )
 
 atlas_add_test( ut_asgtools_statuscode
    SOURCES test/ut_asgtools_statuscode.cxx
diff --git a/Control/AthToolSupport/AsgTools/cmt/Makefile.RootCore b/Control/AthToolSupport/AsgTools/cmt/Makefile.RootCore
deleted file mode 100644
index e512781349b7c04ace1404de29c6c5aff1dd8b7f..0000000000000000000000000000000000000000
--- a/Control/AthToolSupport/AsgTools/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,24 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = AsgTools
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = -DASGTOOL_STANDALONE
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = Asg_GoogleTest
-PACKAGE_TRYDEP   = xAODRootAccessInterfaces xAODRootAccess
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Control/AthToolSupport/AsgTools/cmt/requirements b/Control/AthToolSupport/AsgTools/cmt/requirements
deleted file mode 100644
index f1f249dd5a01f2c2df90a6e2c746ddc259596ff3..0000000000000000000000000000000000000000
--- a/Control/AthToolSupport/AsgTools/cmt/requirements
+++ /dev/null
@@ -1,48 +0,0 @@
-package AsgTools
-# $Id: requirements 790389 2016-12-18 13:39:12Z krumnack $
-
-author David Adams
-
-public
-
-use AtlasPolicy      AtlasPolicy-*
-
-use  xAODRootAccess             xAODRootAccess-*                Control
-
-use GaudiInterface   GaudiInterface-*   External
-#use  AtlasGoogleTest                 AtlasGoogleTest-*                    External
-
-use AthenaBaseComps  AthenaBaseComps-*  Control
-use SGTools          SGTools-*          Control
-
-use IOVDbDataModel IOVDbDataModel-* Database
-
-# Build a library:
-library AsgTools  ../Root/MsgLevel.cxx ../Root/AsgTool.cxx \
-                  ../Root/AsgMetadataTool.cxx ../Root/AsgMessaging.cxx \
-                  ../Root/ToolStore.cxx ../Root/AnaToolHandle.cxx ../Root/MessageCheck.cxx ../Root/UnitTest.cxx *.cxx
-apply_pattern installed_library
-
-private
-
-# Generate a dictionary:
-use AtlasReflex      AtlasReflex-*      External -no_auto_imports
-apply_pattern lcgdict dict=AsgTools selectionfile=selection.xml \
-              headerfiles="../AsgTools/AsgToolsDict.h"
-
-
-use AtlasBoost AtlasBoost-* External
-use AtlasGoogleTest AtlasGoogleTest-* External
-
-use TestTools      TestTools-*         AtlasTest
-
-apply_pattern UnitTest_run unit_test=gt_asgtools_toolhandle \
-                           extrapatterns="\([0-9]+ ms\)|\([0-9]+ ms total\)"
-apply_pattern UnitTest_run unit_test=gt_UnitTest \
-                           extrapatterns="\([0-9]+ ms\)|\([0-9]+ ms total\)"
-macro_append all_dependencies " check "
-
-macro_append gt_asgtools_toolhandle_test_dependencies " AsgTools "
-macro_append gt_UnitTest_test_dependencies " AsgTools "
-
-end_private
\ No newline at end of file
diff --git a/Control/AthViews/AthViews/IViewsMergerTool.h b/Control/AthViews/AthViews/IViewsMergerTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..b7dd222f3eb850b7dc89cd8caa7b1b128ec44307
--- /dev/null
+++ b/Control/AthViews/AthViews/IViewsMergerTool.h
@@ -0,0 +1,24 @@
+#ifndef AthViews_IViewsMergerTool_h
+#define AthViews_IViewsMergerTool_h
+
+#include <vector>
+#include "GaudiKernel/IAlgTool.h"
+#include "GaudiKernel/EventContext.h"
+#include "AthViews/View.h"
+
+static const InterfaceID IID_IViewsMergerTool( "IViewsMergerTool", 1, 0 ); 
+
+class IViewsMergerTool : public virtual IAlgTool {
+public:
+  static const InterfaceID& interfaceID() { return IID_IViewsMergerTool; }
+  
+  /**
+   * @brief processes views to create merged collection collection of the content
+   * 
+   **/
+  virtual StatusCode merge( const EventContext& context, const std::vector<SG::View*>& ) const = 0;
+  
+  virtual ~IViewsMergerTool() {}
+};
+
+#endif
diff --git a/Control/AthViews/AthViews/SimpleView.h b/Control/AthViews/AthViews/SimpleView.h
index 466c9cf90ecfa50bf0e627210f6e9805a39bf7e1..c689a45dbd44ca05350172d8b7130b72577c6812 100644
--- a/Control/AthViews/AthViews/SimpleView.h
+++ b/Control/AthViews/AthViews/SimpleView.h
@@ -43,6 +43,13 @@ class SimpleView : public IProxyDict
 		/*virtual SG::DataProxy* proxy(const CLID& id) const
 		{ return 0; };*/
 
+                /**
+                 * @brief links to the previously used views
+		 * though this additional parent views additional data abject become availbe
+		 **/
+                 void linkParent( const IProxyDict* parent );
+
+
 		/// get proxy for a given data object address in memory,
 		/// but performs a deep search among all possible 'symlinked' containers
 		// TEMPORARY: This method is going away.
@@ -174,6 +181,7 @@ class SimpleView : public IProxyDict
 		//Connection to the whole event store
 		ServiceHandle< StoreGateSvc > m_store;
 		std::string m_name;
+                std::vector<const IProxyDict*> m_parents;
 
 };
 
diff --git a/Control/AthViews/AthViews/View.h b/Control/AthViews/AthViews/View.h
index 67114dbcffe8e0514f46c472868bad380ea550e7..b2eaa9af4ed516f8cf65fb54d562a3584a020612 100644
--- a/Control/AthViews/AthViews/View.h
+++ b/Control/AthViews/AthViews/View.h
@@ -8,7 +8,7 @@
 #define ATHVIEWS_VIEW_H
 
 #include "AthenaKernel/IProxyDict.h"
-
+#include "AthViews/SimpleView.h"
 // DECLARATIONS
 namespace SG {
   class DataProxy;
@@ -25,7 +25,7 @@ public:
   View (const View&) = delete;
   View& operator= (const View&) = delete;
   
-  void impl ( IProxyDict* impl ) { m_implementation = impl; }
+  void impl ( SimpleView* impl ) { m_implementation = impl; }
   IProxyDict* impl (void ) { return m_implementation; }
   const IProxyDict* impl (void ) const { return m_implementation; }
 
@@ -34,6 +34,10 @@ public:
     return m_implementation->proxy(id); 
   }*/
 
+  void linkParent( const IProxyDict* parent) {
+    m_implementation->linkParent( parent );
+  }
+
   
   virtual SG::DataProxy* deep_proxy(const void* const pTransient) const { 
     return m_implementation->proxy (pTransient); 
@@ -105,7 +109,7 @@ public:
   virtual void registerKey( IStringPool::sgkey_t key, const std::string& str, CLID clid ){ m_implementation->registerKey( key, str, clid ); }
 
 private:
-  IProxyDict *m_implementation;
+  SimpleView *m_implementation;
 };
 } // EOF SG namespace
 
diff --git a/Control/AthViews/AthViews/ViewHelper.h b/Control/AthViews/AthViews/ViewHelper.h
index 329d000be93b49fc103cd85e0a47bff05d03414c..0bf748094a07e158593cb7ad21a53868a899dbdc 100644
--- a/Control/AthViews/AthViews/ViewHelper.h
+++ b/Control/AthViews/AthViews/ViewHelper.h
@@ -115,7 +115,9 @@ namespace ViewHelper
 		{
 			//Make a context with the view attached
 			EventContext * viewContext = new EventContext( InputContext );
-                        viewContext->setExtension( Atlas::ExtendedEventContext( inputView) );
+                        unsigned int conditionsRun = InputContext.template getExtension<Atlas::ExtendedEventContext>()->conditionsRun();
+                        viewContext->setExtension( Atlas::ExtendedEventContext( inputView,
+                                                                                conditionsRun ) );
 
 			//Make the task
 			tbb::task * viewTask = new( tbb::task::allocate_root() )GraphExecutionTask( AlgorithmNames, viewContext, AlgPool );
diff --git a/Control/AthViews/CMakeLists.txt b/Control/AthViews/CMakeLists.txt
index b357bc89f1261f247ac13e3b0c10f711e562187a..c628e4f38c7bdd14bd2dafcd32ee18560c1e4670 100644
--- a/Control/AthViews/CMakeLists.txt
+++ b/Control/AthViews/CMakeLists.txt
@@ -14,9 +14,11 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaKernel
                           Control/SGTools
                           Control/StoreGate
+                          Trigger/TrigEvent/TrigSteeringEvent
                           GaudiKernel
                           PRIVATE
-                          Control/CxxUtils )
+                          Control/CxxUtils
+			  AtlasTest/TestTools )
 
 # Component(s) in the package:
 atlas_add_library( AthViews
@@ -30,7 +32,13 @@ atlas_add_component( AthViewsDFlow
                      src_dflow/*.cxx
                      src_dflow/components/*.cxx
                      INCLUDE_DIRS ${TBB_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TBB_LIBRARIES} AthenaBaseComps AthenaKernel SGTools StoreGateLib GaudiKernel CxxUtils AthViews )
+                     LINK_LIBRARIES ${TBB_LIBRARIES} AthenaBaseComps AthenaKernel SGTools StoreGateLib GaudiKernel CxxUtils AthViews TrigSteeringEvent )
+
+
+atlas_add_test( ViewLinking_test 
+		INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS}
+		SOURCES test/ViewLinking_test.cxx 
+		LINK_LIBRARIES ${Boost_LIBRARIES}  ${TBB_LIBRARIES} AthViews )
 
 # Install files from the package:
 atlas_install_headers( AthViews )
diff --git a/Control/AthViews/cmt/requirements b/Control/AthViews/cmt/requirements
deleted file mode 100644
index 5b2cb0b1dbdb0e5e45661cd6ae8d2102385767a6..0000000000000000000000000000000000000000
--- a/Control/AthViews/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package AthViews
-author  bwynne
-
-## for athena policies: this has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## for gaudi tools, services and objects
-use AthenaKernel AthenaKernel-* Control
-use GaudiInterface GaudiInterface-* External
-use StoreGate StoreGate-* Control
-use SGTools SGTools-* Control
-use AthenaBaseComps    AthenaBaseComps-*        Control
-
-private
-use CxxUtils           CxxUtils-*               Control
-use EventInfo          EventInfo-*              Event
-end_private
-
-
-#This makes libAthViewsLib.so (in addition to libAthViews.so, which gets made anyway)
-#Seems to be necessary for linking to StoreGate
-apply_pattern dual_use_library files=*.cxx
-
-## put here your package dependencies...
-
-branches src src/components doc python share
-
-private
-## default is to make component library
-library AthViews *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-end_private
-
-# an example exercizing data-flow
-library AthViewsDFlow \
--s=${AthViews_root}/src_dflow/ *.cxx \
--s=${AthViews_root}/src_dflow/components *.cxx
-apply_pattern named_component_library library=AthViewsDFlow
diff --git a/Control/AthViews/src/SimpleView.cxx b/Control/AthViews/src/SimpleView.cxx
index 6362c1161f36288102b25f732478cb7d14e2e79e..62e7a649328c2ec041076347fb09b85f7c6e347c 100644
--- a/Control/AthViews/src/SimpleView.cxx
+++ b/Control/AthViews/src/SimpleView.cxx
@@ -3,6 +3,7 @@
 */
 
 #include <iostream>
+#include <stdexcept>
 #include "AthViews/SimpleView.h"
 
 using namespace std;
@@ -23,6 +24,10 @@ SimpleView::~SimpleView()
 {
 }
 
+void SimpleView::linkParent( const IProxyDict* parent ) {
+  m_parents.push_back( parent );
+}
+
 
 /**
  * @brief Get proxy given a hashed key+clid.
@@ -33,7 +38,7 @@ SimpleView::~SimpleView()
  */
 SG::DataProxy * SimpleView::proxy_exact( SG::sgkey_t sgkey ) const
 {
-	cout << "BEN SimpleView::proxy_exact" << endl;
+	cout << "Not implemented: SimpleView::proxy_exact" << endl;
 	//TODO - view rename
 	return m_store->proxy_exact( sgkey );
 }
@@ -55,7 +60,17 @@ SG::DataProxy * SimpleView::proxy_exact( SG::sgkey_t sgkey ) const
 SG::DataProxy * SimpleView::proxy( const CLID& id, const std::string& key ) const
 {
 	const std::string viewKey = m_name + "_" + key;
-	return m_store->proxy( id, viewKey );
+	auto local =  m_store->proxy( id, viewKey );
+	
+	for ( auto parent: m_parents ) {
+	  auto dp = parent->proxy( id, key );
+	  if ( dp and not local ) {
+	    return dp;
+	  } else if ( dp and local ) {
+	    throw std::runtime_error("Duplicate object CLID:"+ std::to_string(id) + " key: " + key + " found in views: " + name()+ " and parent " + parent->name() );
+	  } // else search further
+	}
+	return local; // can be the nullptr still
 }
 
 
@@ -67,7 +82,7 @@ SG::DataProxy * SimpleView::proxy( const CLID& id, const std::string& key ) cons
  */
 SG::DataProxy * SimpleView::proxy( const void* const pTransient ) const
 {
-	cout << "BEN SimpleView::proxy" << endl;
+	cout << "Not implemented: SimpleView::proxy" << endl;
 	//TODO - view rename
 	return m_store->proxy( pTransient );
 }
@@ -94,9 +109,7 @@ std::vector< const SG::DataProxy* > SimpleView::proxies() const
  */
 StatusCode SimpleView::addToStore( CLID id, SG::DataProxy * proxy )
 {
-	//TODO - view rename
 	const std::string viewKey = m_name + "_" + proxy->name();
-	m_store->addedNewTransObject( id, viewKey );
 	return m_store->addToStore( id, proxy );
 }
 
@@ -113,9 +126,8 @@ StatusCode SimpleView::addToStore( CLID id, SG::DataProxy * proxy )
  */
 bool SimpleView::tryELRemap( sgkey_t sgkey_in, size_t index_in, sgkey_t & sgkey_out, size_t & index_out )
 {
-	cout << "BEN SimpleView::tryELRemap" << endl;
-	//TODO - view rename
-	return m_store->tryELRemap( sgkey_in, index_in, sgkey_out, index_out );
+	cout << "Not implemented: SimpleView::tryELRemap" << endl;
+	return m_store->tryELRemap( sgkey_in, index_in, sgkey_out, index_out ); //TODO
 }
 
 /**
@@ -129,13 +141,9 @@ bool SimpleView::tryELRemap( sgkey_t sgkey_in, size_t index_in, sgkey_t & sgkey_
  *
  * Returns the proxy for the recorded object; nullptr on failure.
  */
-/// TEMPORARY: This method is being added.  It eventually should be pure.
-//SG::DataProxy * SimpleView::recordObject( std::unique_ptr< DataObject > obj, const std::string& key, bool allowMods )
 SG::DataProxy * SimpleView::recordObject( SG::DataObjectSharedPtr<DataObject> obj, const std::string& key, bool allowMods, bool returnExisting )
 {
 	const std::string viewKey = m_name + "_" + key;
-	m_store->addedNewTransObject( obj->clID(), key ); //TODO remove this hack
-	//return m_store->recordObject( std::move( obj ), viewKey, allowMods );
 	return m_store->recordObject( obj, viewKey, allowMods, returnExisting );
 }
 
@@ -144,7 +152,6 @@ SG::DataProxy * SimpleView::recordObject( SG::DataObjectSharedPtr<DataObject> ob
  * @param id The CLID of the object.
  * @param key The key of the object.
  */
-/// TEMPORARY: This method is being added.  It eventually should be pure.
 StatusCode SimpleView::updatedObject( CLID id, const std::string& key )
 {
 	const std::string viewKey = m_name + "_" + key;
@@ -173,18 +180,18 @@ void SimpleView::unboundHandle( IResetable * handle )
 
 unsigned long SimpleView::addRef()
 {
-	cout << "BEN SimpleView::addRef" << endl;
-	return 0; //FIX
+	cout << "Not implemented: SimpleView::addRef" << endl;
+	return 0; //TODO
 }
 unsigned long SimpleView::release()
 {
-	cout << "BEN SimpleView::release" << endl;
-	return 0; //FIX
+	cout << "Not implemented: SimpleView::release" << endl;
+	return 0; //TODO
 }
 StatusCode SimpleView::queryInterface( const InterfaceID &/*ti*/, void** /*pp*/ )
 {
-	cout << "BEN SimpleView::queryInterface" << endl;
-	return StatusCode::FAILURE; //FIX
+	cout << "Not implemented: SimpleView::queryInterface" << endl;
+	return StatusCode::FAILURE; //TODO
 }
 const std::string& SimpleView::name() const
 {
@@ -199,13 +206,13 @@ IStringPool::sgkey_t SimpleView::stringToKey( const std::string& str, CLID clid
 }
 const std::string* SimpleView::keyToString( IStringPool::sgkey_t key ) const
 {
-	cout << "BEN SimpleView::keyToString" << endl;
+	cout << "Not implemented: SimpleView::keyToString" << endl;
 	//TODO - view rename maybe?
 	return m_store->keyToString( key );
 }
 const std::string* SimpleView::keyToString( IStringPool::sgkey_t key, CLID& clid ) const
 {
-	cout << "BEN SimpleView::keyToString" << endl;
+	cout << "Not implemented: SimpleView::keyToString" << endl;
 	//TODO - view rename maybe?
 	return m_store->keyToString( key, clid ); 
 }
diff --git a/Control/AthViews/src_dflow/RoiCollectionToViews.cxx b/Control/AthViews/src_dflow/RoiCollectionToViews.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..e31380bed43aef0b22f0050741d030425cc903a9
--- /dev/null
+++ b/Control/AthViews/src_dflow/RoiCollectionToViews.cxx
@@ -0,0 +1,144 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "RoiCollectionToViews.h"
+#include "AthViews/ViewHelper.h"
+
+// STL includes
+
+// FrameWork includes
+#include "GaudiKernel/Property.h"
+#include "CxxUtils/make_unique.h"
+#include "AthContainers/ConstDataVector.h"
+
+namespace AthViews {
+
+///////////////////////////////////////////////////////////////////
+// Public methods: 
+///////////////////////////////////////////////////////////////////
+
+// Constructors
+////////////////
+RoiCollectionToViews::RoiCollectionToViews( const std::string& name,
+                      ISvcLocator* pSvcLocator ) : 
+  ::AthAlgorithm( name, pSvcLocator ),
+  m_trigRoIs( "input_rois" ),
+  m_w_views( "all_views" ),
+  m_viewRoIs( "output_rois" ),
+  m_algorithmNameSequence( std::vector< std::string >() ),
+  m_algPoolName( "" ),
+  m_viewBaseName( "" )
+{
+  //
+  // Property declaration
+  // 
+
+  declareProperty( "InputRoICollection", m_trigRoIs, "Collection of RoIs to split into views" );
+  
+  declareProperty( "OutputRoICollection", m_viewRoIs, "RoI collection to use inside views" );
+  
+  declareProperty( "AllViews", m_w_views, "All views" );
+
+  declareProperty( "ViewBaseName", m_viewBaseName, "Name to use for all views - number will be appended" );
+
+  declareProperty( "AlgorithmNameSequence", m_algorithmNameSequence, "Names of algorithms to run in the views" );
+
+  declareProperty( "AlgPoolName", m_algPoolName, "Name for the algorithm pool service to use with the views" );
+}
+
+// Destructor
+///////////////
+RoiCollectionToViews::~RoiCollectionToViews()
+{
+}
+
+// Athena Algorithm's Hooks
+////////////////////////////
+StatusCode RoiCollectionToViews::initialize()
+{
+  ATH_MSG_INFO ("Initializing " << name() << "...");
+
+  CHECK( m_trigRoIs.initialize() );
+  CHECK( m_viewRoIs.initialize() );
+  CHECK( m_w_views.initialize() );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode RoiCollectionToViews::finalize()
+{
+  ATH_MSG_INFO ("Finalizing " << name() << "...");
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode RoiCollectionToViews::execute()
+{  
+  ATH_MSG_DEBUG ("Executing " << name() << "...");
+
+#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT 
+  const EventContext& ctx = getContext();
+#else
+  const EventContext& ctx = *getContext();
+#endif
+
+  //Load the collection of RoI descriptors
+  SG::ReadHandle< TrigRoiDescriptorCollection > inputRoIs( m_trigRoIs, ctx );
+  ATH_CHECK( inputRoIs.isValid() );
+ 
+  //Skip if there's nothing to do
+  if ( inputRoIs->empty() ) return StatusCode::SUCCESS;
+
+  std::vector< ConstDataVector<TrigRoiDescriptorCollection> > outputRoICollectionVector;
+  for ( auto roi: *inputRoIs )
+  {
+    ATH_MSG_DEBUG( "RoI Eta: " << roi->eta() << " Phi: " << roi->phi() << " RoIWord: " << roi->roiWord() );
+    
+    ConstDataVector<TrigRoiDescriptorCollection> oneRoIColl (SG::VIEW_ELEMENTS);
+    oneRoIColl.push_back( roi );
+    outputRoICollectionVector.push_back( std::move(oneRoIColl) );
+  }
+
+  //Create the views and populate them
+  std::vector< SG::View* > viewVector;
+  SG::WriteHandle< ConstDataVector<TrigRoiDescriptorCollection> > outputRoIs( m_viewRoIs, ctx );
+  CHECK( ViewHelper::MakeAndPopulate( m_viewBaseName, //Base name for all views to use
+          viewVector,                                 //Vector to store views
+          outputRoIs,                                 //A writehandle to use to access the views (the handle itself, not the contents)
+          outputRoICollectionVector ) );              //Data to initialise each view - one view will be made per entry
+
+  //Run the algorithms in views
+  CHECK( ViewHelper::RunViews( viewVector,              //View vector
+          m_algorithmNameSequence,                        //Algorithms to run in each view
+          ctx,                                            //Context to attach the views to
+          serviceLocator()->service( m_algPoolName ) ) ); //Service to retrieve algorithms by name
+
+  //Store the collection of views
+  SG::WriteHandle< std::vector< SG::View* > > outputViewHandle( m_w_views, ctx );
+  outputViewHandle.record( CxxUtils::make_unique< std::vector< SG::View* > >( viewVector ) );
+
+  return StatusCode::SUCCESS;
+}
+
+///////////////////////////////////////////////////////////////////
+// Const methods: 
+///////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////
+// Non-const methods: 
+///////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////
+// Protected methods: 
+///////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////
+// Const methods: 
+///////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////
+// Non-const methods: 
+///////////////////////////////////////////////////////////////////
+
+} //> end namespace AthViews
diff --git a/Control/AthViews/src_dflow/RoiCollectionToViews.h b/Control/AthViews/src_dflow/RoiCollectionToViews.h
new file mode 100644
index 0000000000000000000000000000000000000000..9f5cca18db5bb0c7f52a3fc7a309da5b2373bbd4
--- /dev/null
+++ b/Control/AthViews/src_dflow/RoiCollectionToViews.h
@@ -0,0 +1,80 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef ATHVIEWS_ATHVIEWS_ROICOLLECTIONTOVIEWS_H
+#define ATHVIEWS_ATHVIEWS_ROICOLLECTIONTOVIEWS_H
+
+// STL includes
+#include <string>
+#include <vector>
+
+// FrameWork includes
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthViews/View.h"
+#include "StoreGate/WriteHandleKey.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
+#include "AthContainers/ConstDataVector.h"
+
+namespace AthViews {
+
+class RoiCollectionToViews
+  : public ::AthAlgorithm
+{ 
+
+  /////////////////////////////////////////////////////////////////// 
+  // Public methods: 
+  /////////////////////////////////////////////////////////////////// 
+ public: 
+
+  // Copy constructor: 
+
+  /// Constructor with parameters: 
+  RoiCollectionToViews( const std::string& name, ISvcLocator* pSvcLocator );
+
+  /// Destructor: 
+  virtual ~RoiCollectionToViews(); 
+
+  // Athena algorithm's Hooks
+  virtual StatusCode  initialize();
+  virtual StatusCode  execute();
+  virtual StatusCode  finalize();
+
+  /////////////////////////////////////////////////////////////////// 
+  // Const methods: 
+  ///////////////////////////////////////////////////////////////////
+
+  /////////////////////////////////////////////////////////////////// 
+  // Non-const methods: 
+  /////////////////////////////////////////////////////////////////// 
+
+  /////////////////////////////////////////////////////////////////// 
+  // Private data: 
+  /////////////////////////////////////////////////////////////////// 
+ private: 
+
+  /// Default constructor: 
+  RoiCollectionToViews();
+
+  /// Containers
+  
+  // vars
+  SG::ReadHandleKey< TrigRoiDescriptorCollection > m_trigRoIs;
+  SG::WriteHandleKey< std::vector< SG::View* > > m_w_views;
+  SG::WriteHandleKey< ConstDataVector<TrigRoiDescriptorCollection> > m_viewRoIs;
+  std::vector< std::string > m_algorithmNameSequence;
+  std::string m_algPoolName;
+  std::string m_viewBaseName;
+}; 
+
+// I/O operators
+//////////////////////
+
+/////////////////////////////////////////////////////////////////// 
+// Inline methods: 
+/////////////////////////////////////////////////////////////////// 
+
+} //> end namespace AthViews
+
+#endif //> !ATHVIEWS_ATHVIEWS_ROICOLLECTIONTOVIEWS_H
diff --git a/Control/AthViews/src_dflow/ViewTestAlg.cxx b/Control/AthViews/src_dflow/ViewTestAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..38342ff7e8d92891a7f71e0adce47cb84cdce718
--- /dev/null
+++ b/Control/AthViews/src_dflow/ViewTestAlg.cxx
@@ -0,0 +1,93 @@
+///////////////////////// -*- C++ -*- /////////////////////////////
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ViewTestAlg.cxx 
+// Implementation file for class ViewTestAlg
+// Author: B. Wynne <bwynne@cern.ch>
+/////////////////////////////////////////////////////////////////// 
+
+#include "ViewTestAlg.h"
+
+// STL includes
+
+// FrameWork includes
+#include "AthenaKernel/ExtendedEventContext.h"
+
+namespace AthViews {
+
+/////////////////////////////////////////////////////////////////// 
+// Public methods: 
+/////////////////////////////////////////////////////////////////// 
+
+// Constructors
+////////////////
+ViewTestAlg::ViewTestAlg( const std::string& name, 
+                      ISvcLocator* pSvcLocator ) : 
+  ::AthAlgorithm( name, pSvcLocator )
+{
+  //
+  // Property declaration
+  // 
+  //declareProperty( "Property", m_nProperty );
+}
+
+// Destructor
+///////////////
+ViewTestAlg::~ViewTestAlg()
+{}
+
+// Athena Algorithm's Hooks
+////////////////////////////
+StatusCode ViewTestAlg::initialize()
+{
+  ATH_MSG_INFO ("Initializing " << name() << "...");
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode ViewTestAlg::finalize()
+{
+  ATH_MSG_INFO ("Finalizing " << name() << "...");
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode ViewTestAlg::execute()
+{  
+  ATH_MSG_DEBUG ("Executing " << name() << "...");
+
+#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT 
+  const EventContext& ctx = getContext();
+#else
+  const EventContext& ctx = *getContext();
+#endif
+
+  ATH_MSG_INFO( name() << " running with store " << ctx.getExtension<Atlas::ExtendedEventContext>()->proxy()->name() );
+
+  return StatusCode::SUCCESS;
+}
+
+/////////////////////////////////////////////////////////////////// 
+// Const methods: 
+///////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////// 
+// Non-const methods: 
+/////////////////////////////////////////////////////////////////// 
+
+/////////////////////////////////////////////////////////////////// 
+// Protected methods: 
+/////////////////////////////////////////////////////////////////// 
+
+/////////////////////////////////////////////////////////////////// 
+// Const methods: 
+///////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////// 
+// Non-const methods: 
+/////////////////////////////////////////////////////////////////// 
+
+} //> end namespace AthViews
diff --git a/Control/AthViews/src_dflow/ViewTestAlg.h b/Control/AthViews/src_dflow/ViewTestAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..161d245ad49b02a37624976cc54eb201d7d82177
--- /dev/null
+++ b/Control/AthViews/src_dflow/ViewTestAlg.h
@@ -0,0 +1,76 @@
+///////////////////////// -*- C++ -*- /////////////////////////////
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ViewTestAlg.h 
+// Header file for class ViewTestAlg
+// Author: B. Wynne <bwynne@cern.ch>
+/////////////////////////////////////////////////////////////////// 
+#ifndef ATHVIEWS_VIEWTESTALG_H
+#define ATHVIEWS_VIEWTESTALG_H 1
+
+// STL includes
+#include <string>
+
+// FrameWork includes
+#include "AthenaBaseComps/AthAlgorithm.h"
+
+namespace AthViews {
+
+class ViewTestAlg
+  : public ::AthAlgorithm
+{ 
+
+  /////////////////////////////////////////////////////////////////// 
+  // Public methods: 
+  /////////////////////////////////////////////////////////////////// 
+ public: 
+
+  // Copy constructor: 
+
+  /// Constructor with parameters: 
+  ViewTestAlg( const std::string& name, ISvcLocator* pSvcLocator );
+
+  /// Destructor: 
+  virtual ~ViewTestAlg(); 
+
+  // Assignment operator: 
+  //ViewTestAlg &operator=(const ViewTestAlg &alg); 
+
+  // Athena algorithm's Hooks
+  virtual StatusCode  initialize();
+  virtual StatusCode  execute();
+  virtual StatusCode  finalize();
+
+  /////////////////////////////////////////////////////////////////// 
+  // Const methods: 
+  ///////////////////////////////////////////////////////////////////
+
+  /////////////////////////////////////////////////////////////////// 
+  // Non-const methods: 
+  /////////////////////////////////////////////////////////////////// 
+
+  /////////////////////////////////////////////////////////////////// 
+  // Private data: 
+  /////////////////////////////////////////////////////////////////// 
+ private: 
+
+  /// Default constructor: 
+  ViewTestAlg();
+
+  /// Containers
+  
+  // vars
+}; 
+
+// I/O operators
+//////////////////////
+
+/////////////////////////////////////////////////////////////////// 
+// Inline methods: 
+/////////////////////////////////////////////////////////////////// 
+
+} //> end namespace AthViews
+#endif //> !ATHVIEWS_VIEWTESTALG_H
diff --git a/Control/AthViews/src_dflow/components/AthViewsDFlow_entries.cxx b/Control/AthViews/src_dflow/components/AthViewsDFlow_entries.cxx
index 2f184d0e6e591a589c65be8e3a5ddb008f65ab77..a03fc731b69348f64dcaff6805beaf01b81a82b3 100755
--- a/Control/AthViews/src_dflow/components/AthViewsDFlow_entries.cxx
+++ b/Control/AthViews/src_dflow/components/AthViewsDFlow_entries.cxx
@@ -1,23 +1,29 @@
 #include "../DFlowAlg1.h"
 #include "../DFlowAlg2.h"
 #include "../DFlowAlg3.h"
+#include "../ViewTestAlg.h"
 #include "../ViewMergeAlg.h"
 #include "../ViewSubgraphAlg.h"
+#include "../RoiCollectionToViews.h"
 
 #include "GaudiKernel/DeclareFactoryEntries.h"
 
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( AthViews, DFlowAlg1 )
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( AthViews, DFlowAlg2 )
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( AthViews, DFlowAlg3 )
+DECLARE_NAMESPACE_ALGORITHM_FACTORY( AthViews, ViewTestAlg )
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( AthViews, ViewMergeAlg )
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( AthViews, ViewSubgraphAlg )
+DECLARE_NAMESPACE_ALGORITHM_FACTORY( AthViews, RoiCollectionToViews )
 
 DECLARE_FACTORY_ENTRIES( AthViewsDFlow )
 {
     DECLARE_NAMESPACE_ALGORITHM( AthViews, DFlowAlg1 )
     DECLARE_NAMESPACE_ALGORITHM( AthViews, DFlowAlg2 )
     DECLARE_NAMESPACE_ALGORITHM( AthViews, DFlowAlg3 )
+    DECLARE_NAMESPACE_ALGORITHM( AthViews, ViewTestAlg )
     DECLARE_NAMESPACE_ALGORITHM( AthViews, ViewMergeAlg )
     DECLARE_NAMESPACE_ALGORITHM( AthViews, ViewSubgraphAlg )
+    DECLARE_NAMESPACE_ALGORITHM( AthViews, RoiCollectionToViews )
 }
 
diff --git a/Control/AthViews/test/ViewLinking_test.cxx b/Control/AthViews/test/ViewLinking_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..007821a6752c648c1ca7b3075c5b122d1821deea
--- /dev/null
+++ b/Control/AthViews/test/ViewLinking_test.cxx
@@ -0,0 +1,147 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "GaudiKernel/ClassID.h"
+#include "GaudiKernel/MsgStream.h"
+#include "StoreGate/StoreGate.h"
+#include "StoreGate/StoreGateSvc.h"
+#include "AthenaKernel/getMessageSvc.h"
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
+
+#include "TestTools/initGaudi.h"
+#include "TestTools/expect.h"
+#include "TestTools/expect_exception.h"
+#include "AthViews/View.h"
+
+struct TestClass {
+  int value = 0;
+};
+
+CLASS_DEF( TestClass , 16530831 , 1 )
+using namespace SG;
+void testDataInView( StoreGateSvc* /*sg*/ , MsgStream& log ) {
+  auto parentView = new View( "ParentView" );
+
+  auto t1 = std::make_unique<TestClass>();
+  t1->value = 1;
+  //  auto status1 = parentView->recordObject( t1, "test1" );
+    
+  {
+    SG::WriteHandle<TestClass> wh( "test1" );
+    wh.setProxyDict( parentView );
+    auto status = wh.record( std::move( t1 ) );
+    VALUE( status.isSuccess() ) EXPECTED( true ); 
+  }
+
+  auto childView = new View( "ChildView" );  
+
+    
+  auto t2 = std::make_unique<TestClass>();
+  t2->value = 2;
+  {
+    SG::WriteHandle<TestClass> wh( "test2" );
+    wh.setProxyDict( childView );
+    auto status = wh.record( std::move( t2 ) );
+    VALUE( status.isSuccess() ) EXPECTED( true ); 
+  }
+  //  auto status2 = childView->recordObject( t2, "test1" );
+  // all prepared, will start testing if querries respond correctly
+  {
+    // rtivial test, we ask for a wrong object
+    SG::ReadHandle<TestClass> rh( "test" );
+    rh.setProxyDict( childView );    
+    VALUE( rh.isValid() ) EXPECTED( false );
+  }
+
+
+
+  {
+    SG::ReadHandle<TestClass> rh( "test2" );
+    rh.setProxyDict( childView );
+    VALUE( rh.isValid() ) EXPECTED( true );
+    VALUE( rh->value ) EXPECTED( 2 );
+  }
+
+  {
+    SG::ReadHandle<TestClass> rh( "test1" );
+    rh.setProxyDict( childView );
+    VALUE( rh.isValid() ) EXPECTED( false );
+  }
+  log << MSG::INFO << "Views that are not linked behave correctly " << endmsg;
+  // link them and see if data object is accessible
+  childView->linkParent( parentView );
+
+  {
+    SG::ReadHandle<TestClass> rh( "test2" );
+    rh.setProxyDict( childView );
+    VALUE( rh.isValid() ) EXPECTED( true );
+    VALUE( rh->value ) EXPECTED( 2 );
+  }
+  {
+    SG::ReadHandle<TestClass> rh( "test1" );
+    rh.setProxyDict( childView );
+    VALUE( rh.isValid() ) EXPECTED( true );
+    VALUE( rh->value ) EXPECTED( 1 );
+  }
+  log << MSG::INFO << "Views that are linked behave correctly " << endmsg;
+
+  // hide object from parent by adding one in the Child 
+  auto t3 = std::make_unique<TestClass>();
+  t3->value = 3;
+
+  {
+    SG::WriteHandle<TestClass> wh( "test1" );
+    wh.setProxyDict( childView );
+    auto status = wh.record( std::move( t3 ) );
+    VALUE( status.isSuccess() ) EXPECTED( true ); 
+  }
+
+
+  {
+    SG::ReadHandle<TestClass> rh( "test1" );
+    rh.setProxyDict( childView );
+    EXPECT_EXCEPTION( std::runtime_error,  rh.isValid() );  
+  }
+  log << MSG::INFO << "Hiding works as expected " << endmsg;
+
+
+}
+
+
+
+int main() {
+  using namespace std;
+
+  MsgStream log(Athena::getMessageSvc(), "ViewLinking_test");
+
+  //  MsgStream* msglog = &log;
+
+
+  ISvcLocator* pSvcLoc;
+  //if (!Athena_test::initGaudi("test.txt",  pSvcLoc)) {
+  if (!Athena_test::initGaudi("",  pSvcLoc)) {
+    log << MSG::ERROR << "Can not intit Gaudi" << endmsg;
+    return -1;
+  }
+  assert(pSvcLoc);
+
+
+  StoreGateSvc* pStore(0);
+
+
+  if( pSvcLoc->service("StoreGateSvc", pStore, true).isSuccess() ) {
+    log << MSG::INFO << "SG pointer: " << pStore << endmsg;
+  } else {
+    log << MSG::ERROR << "SG not available" << endmsg;
+    return -1;
+  }
+
+
+
+  testDataInView( pStore, log );
+  log << MSG::INFO << "linking function w/o overlap works" << endmsg;
+    
+  return 0;
+}
diff --git a/Control/AthenaAuditors/cmt/requirements b/Control/AthenaAuditors/cmt/requirements
deleted file mode 100644
index 6f4e6473f763fdbb1433029f8588b00de4801b70..0000000000000000000000000000000000000000
--- a/Control/AthenaAuditors/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package AthenaAuditors
-
-author Rolf Seuster
-author Sami Kama
-
-use AtlasPolicy      AtlasPolicy-*
-
-private
-use GaudiInterface                 GaudiInterface-*  	            External
-use AtlasGdb                       AtlasGdb-*                       External
-use AtlasBoost			   AtlasBoost-*			    External
-use AtlasLibUnwind		   AtlasLibUnwind-*		    External
-use AtlasGPerfTools		   AtlasGPerfTools-*		    External
-
-private
-use CoWTools			   CoWTools-*			    Control
-use AtlasROOT			   AtlasROOT-*			    External
-# Add cmake compatibility (doesn't do anything on CMT side of things)
-apply_pattern cmake_add_libraries target=AthenaAuditors libraries=z
-
-library AthenaAuditors *.cxx -s=components *.cxx
-apply_pattern component_library
-
-use AthenaBaseComps  AthenaBaseComps-*	  Control
-
diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h
index e98d28aab73f58f3273cb3e918a02e8ce52f42a1..8d5e5bdb81c4b93633f512673be835134101fb85 100644
--- a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h
+++ b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h
@@ -20,10 +20,12 @@
 #include "GaudiKernel/StatusCode.h"
 namespace SG {
   class VarHandleKey;
+  class VarHandleKeyArray;
 }
 namespace Gaudi {
   namespace Parsers {
     StatusCode parse(SG::VarHandleKey& v, const std::string& s);
+    StatusCode parse(SG::VarHandleKeyArray& v, const std::string& s);
   }
 }
 
@@ -98,7 +100,10 @@ public:
 
   template <class T>
   Property& declareProperty(Gaudi::Property<T> &t) {
-    return AthAlgTool::declareGaudiProperty(t, std::is_base_of<SG::VarHandleKey, T>());
+    return AthAlgTool::declareGaudiProperty(t, 
+                                            std::is_base_of<SG::VarHandleKey, T>(),
+                                            std::is_base_of<SG::VarHandleKeyArray, T>()
+                                            );
   }
 
 private:
@@ -107,30 +112,44 @@ private:
    *
    */
   template <class T>
-  Property& declareGaudiProperty(Gaudi::Property<T> &hndl, std::true_type) {
-    try {
-      SG::VarHandleKey &vhk = dynamic_cast<SG::VarHandleKey&>( hndl.value() );
+  Property& declareGaudiProperty(Gaudi::Property<T> &hndl, 
+                                 std::true_type, std::false_type) {
 
-      this->declare(vhk);
-      vhk.setOwner(this);
+    return *AthAlgTool::declareProperty(hndl.name(), hndl.value(), hndl.documentation());
+  }
 
-    } catch (...) {
-      ATH_MSG_ERROR("AthAlgorith::declareGaudiProperty: " << hndl 
-                    << " could not dcast to SG::VarHandleKey. "
-                    << "This should not happen!");
-      throw std::runtime_error("AthAlgorith::declareGaudiProperty: not a VarHandleKey (this should not happen)!");
-    }
+  /**
+   * @brief specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
+   *
+   */
+  template <class T>
+  Property& declareGaudiProperty(Gaudi::Property<T> &hndl, 
+                                 std::false_type, std::true_type) {
+
+    return *AthAlgTool::declareProperty(hndl.name(), hndl.value(), hndl.documentation());
 
-    return AlgTool::declareProperty(hndl);
+  }
+
+  /**
+   * @brief Error: can't be both a VarHandleKey and VarHandleKeyArray
+   *
+   */
+  template <class T>
+  Property& declareGaudiProperty(Gaudi::Property<T> &t, std::true_type, std::true_type) {
+      ATH_MSG_ERROR("AthAlgTool::declareGaudiProperty: " << t 
+                    << " cannot be both a VarHandleKey and VarHandleKeyArray. "
+                    << "This should not happen!");
+      throw std::runtime_error("AthAlgTool::declareGaudiProperty: cannot be both a VarHandleKey and VarHandleKeyArray (this should not happen)!");
+    return AlgTool::declareProperty(t);
   }
 
   /**
    * @brief specialization for handling everything that's not a
-   * Gaudi::Property<SG::VarHandleKey>
+   * Gaudi::Property<SG::VarHandleKey> or <SG::VarHandleKeyArray>
    *
    */
   template <class T>
-  Property& declareGaudiProperty(Gaudi::Property<T> &t, std::false_type) {
+  Property& declareGaudiProperty(Gaudi::Property<T> &t, std::false_type, std::false_type) {
     return AlgTool::declareProperty(t);
   }
 
@@ -301,6 +320,8 @@ public:
 protected: 
   /// callback for output level property 
   void msg_update_handler(Property& outputLevel);
+  /// callback to add storeName to ExtraInputs/Outputs data deps
+  void extraDeps_update_handler(Property&);
 
   /////////////////////////////////////////////////////////////////// 
   // Private data: 
diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h
index 1016164748960e6c57418f8a9f62aab100f86cee..f8aa3a158d9c5492faba61a00020098903cca5bf 100644
--- a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h
+++ b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h
@@ -20,10 +20,12 @@
 #include "GaudiKernel/StatusCode.h"
 namespace SG {
   class VarHandleKey;
+  class VarHandleKeyArray;
 }
 namespace Gaudi {
   namespace Parsers {
     StatusCode parse(SG::VarHandleKey& v, const std::string& s);
+    StatusCode parse(SG::VarHandleKeyArray& v, const std::string& s);
   }
 }
 
@@ -129,7 +131,10 @@ public:
 
   template <class T>
   Property& declareProperty(Gaudi::Property<T> &t) {
-    return AthAlgorithm::declareGaudiProperty(t, std::is_base_of<SG::VarHandleKey, T>());
+    return AthAlgorithm::declareGaudiProperty(t, 
+                                              std::is_base_of<SG::VarHandleKey, T>(),
+                                              std::is_base_of<SG::VarHandleKeyArray, T>()
+                                              );
   }
 
 private:
@@ -138,33 +143,53 @@ private:
    *
    */
   template <class T>
-  Property& declareGaudiProperty(Gaudi::Property<T> &hndl, std::true_type) {
-    try {
-      SG::VarHandleKey &vhk = dynamic_cast<SG::VarHandleKey&>( hndl.value() );
+  Property& declareGaudiProperty(Gaudi::Property<T> &hndl, 
+                                 std::true_type, std::false_type) {
 
-      this->declare(vhk);
-      vhk.setOwner(this);
+    return *AthAlgorithm::declareProperty(hndl.name(), hndl.value(), 
+                                          hndl.documentation());
 
-    } catch (...) {
-      ATH_MSG_ERROR("AthAlgorith::declareGaudiProperty: " << hndl 
-                    << " could not dcast to SG::VarHandleKey. "
-                    << "This should not happen!");
-      throw std::runtime_error("AthAlgorith::declareGaudiProperty: not a VarHandleKey (this should not happen)!");
-    }
+  }
+
+  /**
+   * @brief specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
+   *
+   */
+  template <class T>
+  Property& declareGaudiProperty(Gaudi::Property<T> &hndl, 
+                                 std::false_type, std::true_type) {
+
+    return *AthAlgorithm::declareProperty(hndl.name(), hndl.value(), 
+                                          hndl.documentation());
+
+  }
 
-    return Algorithm::declareProperty(hndl);
+  /**
+   * @brief Error: can't be both a VarHandleKey and VarHandleKeyArray
+   *
+   */
+  template <class T>
+  Property& declareGaudiProperty(Gaudi::Property<T> &t, std::true_type, std::true_type) {
+      ATH_MSG_ERROR("AthAlgorith::declareGaudiProperty: " << t 
+                    << " cannot be both a VarHandleKey and VarHandleKeyArray. "
+                    << "This should not happen!");
+      throw std::runtime_error("AthAlgorith::declareGaudiProperty: cannot be both a VarHandleKey and VarHandleKeyArray (this should not happen)!");
+    return Algorithm::declareProperty(t);
   }
 
+
+
   /**
    * @brief specialization for handling everything that's not a
-   * Gaudi::Property<SG::VarHandleKey>
+   * Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>
    *
    */
   template <class T>
-  Property& declareGaudiProperty(Gaudi::Property<T> &t, std::false_type) {
+  Property& declareGaudiProperty(Gaudi::Property<T> &t, std::false_type, std::false_type) {
     return Algorithm::declareProperty(t);
   }
 
+
   /////////////////////////////////////////////////////////////////
   //
   //// For automatic registration of Handle data products
@@ -355,6 +380,8 @@ public:
 
   /// callback for output level property 
   void msg_update_handler(Property& outputLevel);
+  /// callback to add storeName to ExtraInputs/Outputs data deps
+  void extraDeps_update_handler(Property&);
 
   /////////////////////////////////////////////////////////////////// 
   // Private data: 
diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h
index 8f6ca065b41112c418f69aec05970d40489f7189..ad6d548ec0a578d3d4abdcb12145cfd8c0be2132 100644
--- a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h
+++ b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h
@@ -4,7 +4,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// AthAlgorithm.h 
+// AthReentrantAlgorithm.h 
 // Header file for class AthReentrantAlgorithm
 // Author: Charles Leggett
 /////////////////////////////////////////////////////////////////// 
@@ -16,6 +16,23 @@
 #include <string>
 #include <type_traits>
 
+// Need to do this very early so parser for VarHandleKey picked up
+#include <string>
+#include "GaudiKernel/StatusCode.h"
+namespace SG {
+  class VarHandleKey;
+  class VarHandleKeyArray;
+}
+namespace Gaudi {
+  namespace Parsers {
+    StatusCode parse(SG::VarHandleKey& v, const std::string& s);
+    StatusCode parse(SG::VarHandleKeyArray& v, const std::string& s);
+  }
+}
+
+
+
+
 // Framework includes
 #ifndef REENTRANT_GAUDI
  #define ReEntAlgorithm Algorithm
@@ -162,6 +179,71 @@ private:
   // to keep track of VarHandleKeyArrays for data dep registration
   mutable std::vector<SG::VarHandleKeyArray*> m_vhka;
 
+public:
+  /////////////////////////////////////////////////////////////////
+  //
+  //// Enable use of Gaudi::Property<Foo> m_foo {this,"NAME",init,"doc"};
+  //   style properties in AthReentrantAlgorithms
+  //
+
+  template <class T>
+  Property& declareProperty(Gaudi::Property<T> &t) {
+    return AthReentrantAlgorithm::declareGaudiProperty(t, 
+                                              std::is_base_of<SG::VarHandleKey, T>(),
+                                              std::is_base_of<SG::VarHandleKeyArray, T>()
+                                              );
+  }
+
+private:
+  /**
+   * @brief specialization for handling Gaudi::Property<SG::VarHandleKey>
+   *
+   */
+  template <class T>
+  Property& declareGaudiProperty(Gaudi::Property<T> &hndl, 
+                                 std::true_type, std::false_type) {
+
+    return *AthReentrantAlgorithm::declareProperty(hndl.name(), hndl.value(), hndl.documentation());
+
+  }
+
+  /**
+   * @brief specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
+   *
+   */
+  template <class T>
+  Property& declareGaudiProperty(Gaudi::Property<T> &hndl, 
+                                 std::false_type, std::true_type) {
+
+    return *AthReentrantAlgorithm::declareProperty(hndl.name(), hndl.value(), hndl.documentation());
+
+  }
+
+  /**
+   * @brief Error: can't be both a VarHandleKey and VarHandleKeyArray
+   *
+   */
+  template <class T>
+  Property& declareGaudiProperty(Gaudi::Property<T> &t, std::true_type, std::true_type) {
+      ATH_MSG_ERROR("AthReentrantAlgorith::declareGaudiProperty: " << t 
+                    << " cannot be both a VarHandleKey and VarHandleKeyArray. "
+                    << "This should not happen!");
+      throw std::runtime_error("AthReentrantAlgorith::declareGaudiProperty: cannot be both a VarHandleKey and VarHandleKeyArray (this should not happen)!");
+    return Algorithm::declareProperty(t);
+  }
+
+
+
+  /**
+   * @brief specialization for handling everything that's not a
+   * Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>
+   *
+   */
+  template <class T>
+  Property& declareGaudiProperty(Gaudi::Property<T> &t, std::false_type, std::false_type) {
+    return Algorithm::declareProperty(t);
+  }
+
   /////////////////////////////////////////////////////////////////
   //
   //// For automatic registration of Handle data products
@@ -343,6 +425,8 @@ public:
 
   /// callback for output level property 
   void msg_update_handler(Property& outputLevel);
+  /// callback to add storeName to ExtraInputs/Outputs data deps
+  void extraDeps_update_handler(Property&);
 
   /////////////////////////////////////////////////////////////////// 
   // Private data: 
diff --git a/Control/AthenaBaseComps/cmt/requirements b/Control/AthenaBaseComps/cmt/requirements
deleted file mode 100644
index 64d662989f5e98a56e118b514939a828331053fc..0000000000000000000000000000000000000000
--- a/Control/AthenaBaseComps/cmt/requirements
+++ /dev/null
@@ -1,33 +0,0 @@
-package AthenaBaseComps
-
-author  Sebastien Binet <binet@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## For Gaudi tools, services and objects
-use GaudiInterface  GaudiInterface-*  External
-
-use AtlasROOT       AtlasROOT-*       External
-
-use AthenaKernel    AthenaKernel-*    Control
-use StoreGate       StoreGate-*       Control
-use SGTools         SGTools-*         Control
-use CxxUtils        CxxUtils-*        Control
-
-# Add cmake compatibility (doesn't do anything on CMT side of things)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS Hist Tree)"
-
-branches AthenaBaseComps src
-
-library AthenaBaseComps *.cxx
-
-apply_pattern installed_library
-# apply_pattern declare_joboptions files="*.py"
-# apply_pattern declare_python_modules files="*.py"
-
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=propertyHandling
-apply_pattern UnitTest_run unit_test=AthReentrantAlgorithm
diff --git a/Control/AthenaBaseComps/share/AthAlgorithm_test.ref b/Control/AthenaBaseComps/share/AthAlgorithm_test.ref
index bbed0ec43f1b97ab39992405aa66dd6a65c7a9e2..027f382375a91342754f25c359cabd3d3a7ccb9b 100644
--- a/Control/AthenaBaseComps/share/AthAlgorithm_test.ref
+++ b/Control/AthenaBaseComps/share/AthAlgorithm_test.ref
@@ -1,7 +1,7 @@
 
 
 Initializing Gaudi ApplicationMgr using job opts ../share/propertyHandling_test.txt
-JobOptionsSvc        INFO # =======> /home/leggett/bld2/work/gprop2/src/Control/AthenaBaseComps/share/../share/propertyHandling_test.txt
+JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/propertyHandling_test.txt
 JobOptionsSvc        INFO # (1,1): alg.rkey = "FooSvc+aaa"
 JobOptionsSvc        INFO # (2,1): alg.wkey = "BarSvc+bbb"
 JobOptionsSvc        INFO # (3,1): alg.ukey = "ccc"
@@ -46,8 +46,8 @@ JobOptionsSvc        INFO # (50,1): arrtool2.wkeyarr = ["aaa"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/propertyHandling_test.txt
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
-                                          running on zeus on Tue Jul  4 11:56:27 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Aug  9 13:39:17 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
@@ -56,12 +56,8 @@ HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
 test1
-ClassIDSvc           INFO  getRegistryEntries: read 751 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 401 CLIDRegistry entries for module ALL
-obj 293847296 BarSvc+eee
-obj 293847295 BarSvc+eee
-obj 293847296 StoreGateSvc+zzz.rrr
-obj 293847295 StoreGateSvc+zzz.rrr
+ClassIDSvc           INFO  getRegistryEntries: read 782 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 435 CLIDRegistry entries for module ALL
 test2
 arralg2             ERROR Explicit circular data dependency detected for id ('AthenaBaseCompsTest::MyObj','StoreGateSvc+aaa')
-arralg2             FATAL /home/leggett/bld2/work/gprop2/src/Control/AthenaBaseComps/src/AthAlgorithm.cxx:130 (StatusCode AthAlgorithm::sysInitialize()): code 0: Algorithm::sysInitialize()
+arralg2             FATAL ../src/AthAlgorithm.cxx:153 (StatusCode AthAlgorithm::sysInitialize()): code 0: Algorithm::sysInitialize()
diff --git a/Control/AthenaBaseComps/share/AthReentrantAlgorithm_test.ref b/Control/AthenaBaseComps/share/AthReentrantAlgorithm_test.ref
index b7af08a845c2fa1ffbc71129cd414dd028827ede..2625025abad47fcb4510a13256ad87b670fecd78 100644
--- a/Control/AthenaBaseComps/share/AthReentrantAlgorithm_test.ref
+++ b/Control/AthenaBaseComps/share/AthReentrantAlgorithm_test.ref
@@ -1,7 +1,7 @@
 
 
 Initializing Gaudi ApplicationMgr using job opts ../share/propertyHandling_test.txt
-JobOptionsSvc        INFO # =======> /home/leggett/bld2/work/gprop2/src/Control/AthenaBaseComps/share/../share/propertyHandling_test.txt
+JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/propertyHandling_test.txt
 JobOptionsSvc        INFO # (1,1): alg.rkey = "FooSvc+aaa"
 JobOptionsSvc        INFO # (2,1): alg.wkey = "BarSvc+bbb"
 JobOptionsSvc        INFO # (3,1): alg.ukey = "ccc"
@@ -46,8 +46,8 @@ JobOptionsSvc        INFO # (50,1): arrtool2.wkeyarr = ["aaa"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/propertyHandling_test.txt
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
-                                          running on zeus on Tue Jul  4 15:49:24 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Aug  9 13:40:30 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
@@ -56,10 +56,6 @@ HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
 test1
-ClassIDSvc           INFO  getRegistryEntries: read 751 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 401 CLIDRegistry entries for module ALL
-obj 293847296 BarSvc+eee
-obj 293847295 BarSvc+eee
-obj 293847296 StoreGateSvc+zzz.rrr
-obj 293847295 StoreGateSvc+zzz.rrr
+ClassIDSvc           INFO  getRegistryEntries: read 782 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 435 CLIDRegistry entries for module ALL
 test2
diff --git a/Control/AthenaBaseComps/src/AthAlgTool.cxx b/Control/AthenaBaseComps/src/AthAlgTool.cxx
index f518009eac3b088ea3d99962fcd26e3bc91d89cd..2c328fc35f60974d171da50eb380d9d543059083 100644
--- a/Control/AthenaBaseComps/src/AthAlgTool.cxx
+++ b/Control/AthenaBaseComps/src/AthAlgTool.cxx
@@ -36,16 +36,16 @@ AthAlgTool::AthAlgTool( const std::string& type,
   //
   // Property declaration
   // 
-  //declareProperty( "Property", m_nProperty );
 
   auto props = getProperties();
   for( Property* prop : props ) {
-    if( prop->name() != "OutputLevel" ) {
-      continue;
+    if( prop->name() == "OutputLevel" ) {
+      prop->declareUpdateHandler
+        (&AthAlgTool::msg_update_handler, this);
+    } else if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") {
+      prop->declareUpdateHandler
+        (&AthAlgTool::extraDeps_update_handler, this);
     }
-    prop->declareUpdateHandler
-      (&AthAlgTool::msg_update_handler, this);
-    break;
   }
 
   declareProperty( "EvtStore",
@@ -178,3 +178,27 @@ AthAlgTool::msg_update_handler( Property& outputLevel )
       msg().setLevel( msgLevel() );
    }
 }
+
+/**
+ * @brief Add StoreName to extra input/output deps as needed
+ *
+ * use the logic of the VarHandleKey to parse the DataObjID keys
+ * supplied via the ExtraInputs and ExtraOuputs Properties to add
+ * the StoreName if it's not explicitly given
+ */
+void 
+AthAlgTool::extraDeps_update_handler( Property& ExtraDeps ) 
+{
+  DataObjIDColl newColl;
+  Gaudi::Property<DataObjIDColl> *prop = dynamic_cast<Gaudi::Property<DataObjIDColl>*> (&ExtraDeps);
+  if ( prop ) {
+    for (auto id : prop->value()) {
+      SG::VarHandleKey vhk(id.clid(), id.key(), Gaudi::DataHandle::Reader);
+      id.updateKey( vhk.objKey() );
+      newColl.emplace( id );
+    }
+    if (newColl.size() != 0) prop->setValue( newColl );
+  } else {
+    ATH_MSG_ERROR("unable to dcast ExtraInput/Output Property");
+  }
+}
diff --git a/Control/AthenaBaseComps/src/AthAlgorithm.cxx b/Control/AthenaBaseComps/src/AthAlgorithm.cxx
index bf788c642b6ea3f231dbb716612f3e371cd65229..24fcc75fcadc273ebe5915d9d249515efb6aebfe 100644
--- a/Control/AthenaBaseComps/src/AthAlgorithm.cxx
+++ b/Control/AthenaBaseComps/src/AthAlgorithm.cxx
@@ -38,16 +38,16 @@ AthAlgorithm::AthAlgorithm( const std::string& name,
   //
   // Property declaration
   // 
-  //declareProperty( "Property", m_nProperty );
 
   auto props = getProperties();
   for( Property* prop : props ) {
-    if( prop->name() != "OutputLevel" ) {
-      continue;
+    if( prop->name() == "OutputLevel" ) {
+      prop->declareUpdateHandler
+        (&AthAlgorithm::msg_update_handler, this);
+    } else if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") {
+      prop->declareUpdateHandler
+        (&AthAlgorithm::extraDeps_update_handler, this);
     }
-    prop->declareUpdateHandler
-      (&AthAlgorithm::msg_update_handler, this);
-    break;
   }
 
   declareProperty( "EvtStore",
@@ -117,6 +117,29 @@ AthAlgorithm::msg_update_handler( Property& outputLevel )
    }
 }
 
+/**
+ * @brief Add StoreName to extra input/output deps as needed
+ *
+ * use the logic of the VarHandleKey to parse the DataObjID keys
+ * supplied via the ExtraInputs and ExtraOuputs Properties to add
+ * the StoreName if it's not explicitly given
+ */
+void 
+AthAlgorithm::extraDeps_update_handler( Property& ExtraDeps ) 
+{  
+  DataObjIDColl newColl;
+  Gaudi::Property<DataObjIDColl> *prop = dynamic_cast<Gaudi::Property<DataObjIDColl>*> (&ExtraDeps);
+  if ( prop ) {
+    for (auto id : prop->value()) {
+      SG::VarHandleKey vhk(id.clid(), id.key(), Gaudi::DataHandle::Reader);
+      id.updateKey( vhk.objKey() );
+      newColl.emplace( id );
+    }
+    if (newColl.size() != 0) prop->setValue( newColl );
+  } else {
+    ATH_MSG_ERROR("unable to dcast ExtraInput/Output Property");
+  }
+}
 
 /**
  * @brief Perform system initialization for an algorithm.
diff --git a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx
index 3a1eecef4c11031e5f71f041fbeae276b13419df..25672a819d2a2e6807ecf33c160cd61f587b1325 100644
--- a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx
+++ b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx
@@ -42,12 +42,13 @@ AthReentrantAlgorithm::AthReentrantAlgorithm( const std::string& name,
 
   auto props = getProperties();
   for( Property* prop : props ) {
-    if( prop->name() != "OutputLevel" ) {
-      continue;
+    if( prop->name() == "OutputLevel" ) {
+      prop->declareUpdateHandler
+        (&AthReentrantAlgorithm::msg_update_handler, this);
+    } else if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") {
+      prop->declareUpdateHandler
+        (&AthReentrantAlgorithm::extraDeps_update_handler, this);
     }
-    prop->declareUpdateHandler
-      (&AthReentrantAlgorithm::msg_update_handler, this);
-    break;
   }
 
   declareProperty( "EvtStore",
@@ -117,6 +118,29 @@ AthReentrantAlgorithm::msg_update_handler( Property& outputLevel )
    }
 }
 
+/**
+ * @brief Add StoreName to extra input/output deps as needed
+ *
+ * use the logic of the VarHandleKey to parse the DataObjID keys
+ * supplied via the ExtraInputs and ExtraOuputs Properties to add
+ * the StoreName if it's not explicitly given
+ */
+void 
+AthReentrantAlgorithm::extraDeps_update_handler( Property& ExtraDeps ) 
+{  
+  DataObjIDColl newColl;
+  Gaudi::Property<DataObjIDColl> *prop = dynamic_cast<Gaudi::Property<DataObjIDColl>*> (&ExtraDeps);
+  if ( prop ) {
+    for (auto id : prop->value()) {
+      SG::VarHandleKey vhk(id.clid(), id.key(), Gaudi::DataHandle::Reader);
+      id.updateKey( vhk.objKey() );
+      newColl.emplace( id );
+    }
+    if (newColl.size() != 0) prop->setValue( newColl );
+  } else {
+    ATH_MSG_ERROR("unable to dcast ExtraInput/Output Property");
+  }
+}
 
 #ifndef REENTRANT_GAUDI
 /**
diff --git a/Control/AthenaBaseComps/test/AthAlgorithm_test.cxx b/Control/AthenaBaseComps/test/AthAlgorithm_test.cxx
index 334053de2b56e752f5c7a9961c92774490c58bc0..02a6a0d3adf7af5a601e113e97dfe42d14e5a169 100644
--- a/Control/AthenaBaseComps/test/AthAlgorithm_test.cxx
+++ b/Control/AthenaBaseComps/test/AthAlgorithm_test.cxx
@@ -164,10 +164,10 @@ void test1 (ISvcLocator* svcLoc)
   assert (alg.execute().isSuccess());
 
   DataObjIDColl exp = {
-    { ClassID_traits<AthenaBaseCompsTest::MyObj>::ID(), "eee" },
-    { ClassID_traits<AthenaBaseCompsTest::MyObj>::ID(), "zzz.rrr" },
-    { ClassID_traits<AthenaBaseCompsTest::MyBase>::ID(), "zzz.rrr" },
-    { ClassID_traits<AthenaBaseCompsTest::MyBase>::ID(), "eee" },
+    { ClassID_traits<AthenaBaseCompsTest::MyObj>::ID(), "BarSvc+eee" },
+    { ClassID_traits<AthenaBaseCompsTest::MyObj>::ID(), "StoreGateSvc+zzz.rrr" },
+    { ClassID_traits<AthenaBaseCompsTest::MyBase>::ID(), "StoreGateSvc+zzz.rrr" },
+    { ClassID_traits<AthenaBaseCompsTest::MyBase>::ID(), "BarSvc+eee" },
   };
   if (exp != alg.outputDataObjs()) {
     for (const DataObjID& o : alg.outputDataObjs()) {
diff --git a/Control/AthenaBaseComps/test/AthReentrantAlgorithm_test.cxx b/Control/AthenaBaseComps/test/AthReentrantAlgorithm_test.cxx
index 158ab69e48fa6675183cb0e8f6f02ce81213a808..d126936415f1ff7f0e59d183e33d17c952f9ed76 100644
--- a/Control/AthenaBaseComps/test/AthReentrantAlgorithm_test.cxx
+++ b/Control/AthenaBaseComps/test/AthReentrantAlgorithm_test.cxx
@@ -175,10 +175,10 @@ void test1 (ISvcLocator* svcLoc)
   assert (pdict == xdict);
 
   DataObjIDColl exp = {
-    { ClassID_traits<AthenaBaseCompsTest::MyObj>::ID(), "eee" },
-    { ClassID_traits<AthenaBaseCompsTest::MyBase>::ID(), "eee" },
-    { ClassID_traits<AthenaBaseCompsTest::MyObj>::ID(), "zzz.rrr" },
-    { ClassID_traits<AthenaBaseCompsTest::MyBase>::ID(), "zzz.rrr" },
+    { ClassID_traits<AthenaBaseCompsTest::MyObj>::ID(), "BarSvc+eee" },
+    { ClassID_traits<AthenaBaseCompsTest::MyBase>::ID(), "BarSvc+eee" },
+    { ClassID_traits<AthenaBaseCompsTest::MyObj>::ID(), "StoreGateSvc+zzz.rrr" },
+    { ClassID_traits<AthenaBaseCompsTest::MyBase>::ID(), "StoreGateSvc+zzz.rrr" },
   };
   if (exp != alg.outputDataObjs()) {
     for (const DataObjID& o : alg.outputDataObjs()) {
@@ -267,7 +267,8 @@ void test2 (ISvcLocator* svcLoc)
 int main()
 {
   ISvcLocator* svcLoc = nullptr;
-  Athena_test::initGaudi ("propertyHandling_test.txt", svcLoc);
+  if (!Athena_test::initGaudi ("propertyHandling_test.txt", svcLoc))
+    return 1;
 
   test1 (svcLoc);
   test2 (svcLoc);
diff --git a/Control/AthenaBaseComps/test/propertyHandling_test.cxx b/Control/AthenaBaseComps/test/propertyHandling_test.cxx
index a556989566afa305f06ee6a7d4d5a61353b2e339..c4a121e0ab9d35c10fe9664f8716a07c2f87eef9 100644
--- a/Control/AthenaBaseComps/test/propertyHandling_test.cxx
+++ b/Control/AthenaBaseComps/test/propertyHandling_test.cxx
@@ -233,7 +233,7 @@ void test1 (ISvcLocator* svcLoc)
   assert (alg.ukey.clid() == 293847295);
   assert (alg.ukey.key() == "ccc");
   assert (alg.ukey.storeHandle().name() == "StoreGateSvc");
-  assert (alg.ukey.mode() == Gaudi::DataHandle::Updater);
+  assert (alg.ukey.mode() == Gaudi::DataHandle::Reader);
 
   assert (alg.rdkey.clid() == 293847295);
   assert (alg.rdkey.key() == "ggg.qqq");
@@ -270,7 +270,7 @@ void test1 (ISvcLocator* svcLoc)
   assert (alg.uhandle.clid() == 293847295);
   assert (alg.uhandle.key() == "fff");
   assert (alg.uhandle.storeHandle().name() == "StoreGateSvc");
-  assert (alg.uhandle.mode() == Gaudi::DataHandle::Updater);
+  assert (alg.uhandle.mode() == Gaudi::DataHandle::Reader);
 
   assert (alg.gp_rkey.value().clid() == 293847295);
   assert (alg.gp_rkey.value().key() == "AAA_gp");
@@ -288,7 +288,7 @@ void test1 (ISvcLocator* svcLoc)
   }
 
   std::vector<std::string> outputKeys { 
-    "BarSvc+bbb", "StoreGateSvc+ccc", "BarSvc+eee", "StoreGateSvc+fff",
+    "BarSvc+bbb", "BarSvc+eee",
       "StoreGateSvc+hhh.rrr", "ConditionStore+jjj" };
   assert (alg.outputs.size() == outputKeys.size());
   for (size_t i = 0; i < alg.outputs.size(); i++) {
@@ -330,7 +330,7 @@ void test2 (ISvcLocator* svcLoc)
   assert (tool.ukey.clid() == 293847295);
   assert (tool.ukey.key() == "tcc");
   assert (tool.ukey.storeHandle().name() == "StoreGateSvc");
-  assert (tool.ukey.mode() == Gaudi::DataHandle::Updater);
+  assert (tool.ukey.mode() == Gaudi::DataHandle::Reader);
 
   assert (tool.rdkey.clid() == 293847295);
   assert (tool.rdkey.key() == "tgg.qqq");
@@ -367,7 +367,7 @@ void test2 (ISvcLocator* svcLoc)
   assert (tool.uhandle.clid() == 293847295);
   assert (tool.uhandle.key() == "tff");
   assert (tool.uhandle.storeHandle().name() == "StoreGateSvc");
-  assert (tool.uhandle.mode() == Gaudi::DataHandle::Updater);
+  assert (tool.uhandle.mode() == Gaudi::DataHandle::Reader);
 
   std::vector<std::string> inputKeys { 
     "FooSvc+taa", "StoreGateSvc+tcc", "FooSvc+tdd", "StoreGateSvc+tff",
@@ -380,7 +380,7 @@ void test2 (ISvcLocator* svcLoc)
   }
 
   std::vector<std::string> outputKeys { 
-    "BarSvc+tbb", "StoreGateSvc+tcc", "BarSvc+tee", "StoreGateSvc+tff",
+    "BarSvc+tbb", "BarSvc+tee",
     "StoreGateSvc+thh.rrr", "ConditionStore+tjj" };
   assert (tool.outputs.size() == outputKeys.size());
   for (size_t i = 0; i < tool.outputs.size(); i++) {
@@ -403,7 +403,8 @@ void test2 (ISvcLocator* svcLoc)
 int main()
 {
   ISvcLocator* svcLoc = nullptr;
-  Athena_test::initGaudi ("propertyHandling_test.txt", svcLoc);
+  if (!Athena_test::initGaudi ("propertyHandling_test.txt", svcLoc))
+    return 1;
 
   test1 (svcLoc);
   test2 (svcLoc);
diff --git a/Control/AthenaCommon/CMakeLists.txt b/Control/AthenaCommon/CMakeLists.txt
index 62285fa6fcb678184e2edfe3254713f3917fd549..b8ec7d68f58a0c1fe71764d4707c2b44e2a2e4aa 100644
--- a/Control/AthenaCommon/CMakeLists.txt
+++ b/Control/AthenaCommon/CMakeLists.txt
@@ -12,7 +12,7 @@ atlas_depends_on_subdirs( PRIVATE
 # Install files from the package:
 atlas_install_headers( AthenaCommon )
 atlas_install_python_modules( python/*.py python/Utils )
-atlas_install_joboptions( share/Bootstrap.py share/Preparation.py share/Execution.py share/Atlas.UnixStandardJob.py share/Atlas_Gen.UnixStandardJob.py share/MemTraceInclude.py share/JobOptTraceInclude.py share/runbatch.py )
+atlas_install_joboptions( share/Bootstrap.py share/Preparation.py share/Execution.py share/Atlas.UnixStandardJob.py share/Atlas_Gen.UnixStandardJob.py share/MemTraceInclude.py share/runbatch.py )
 atlas_install_scripts( share/athena.py share/athena.C share/athena-app.py share/chappy.py share/find_cfg_dups.py test/*.py share/test_cfg_pickling.py )
 
 # Aliases:
diff --git a/Control/AthenaCommon/python/AthOptionsParser.py b/Control/AthenaCommon/python/AthOptionsParser.py
index f1f3fc1d51f4060eb2f1200015e01ec23f83e196..ddd8a529b1a312a97cae6daa05a40b9f0bb4434e 100644
--- a/Control/AthenaCommon/python/AthOptionsParser.py
+++ b/Control/AthenaCommon/python/AthOptionsParser.py
@@ -35,6 +35,9 @@ _userlongopts = [
     "pycintex_minvmem=", "cppyy_minvmem",
     "minimal",                     # private, undocumented
     "threads=",
+    "evtMax=",    #will set theApp.EvtMax just before theApp.run() in runbatch.py
+    "skipEvents=",#will set svcMgr.EventSelector.SkipEvents just before theApp.run() in runbatch.py 
+    "filesInput=" #will set the AthenaCommonFlags.FilesInput job option and lock it
     ]
 
 _allowed_values = {
@@ -50,6 +53,10 @@ _allowed_values = {
 
 _error_msg = """\
 Accepted command line options:
+     --evtMax=<numEvents>             ...  Max number of events to process (only used in batch mode)
+     --skipEvents=<numEvents>         ...  Number of events to skip (only used in batch mode)
+     --filesInput=<files>             ...  Set the FilesInput job property 
+                                            (comma-separated list, which can include wild characters)
  -b, --batch                          ...  batch mode [DEFAULT]
  -i, --interactive                    ...  interactive mode
      --no-display                           prompt, but no graphics display
@@ -150,8 +157,8 @@ def parse(chk_tcmalloc=True):
     opts.cppyy_minvmem = None    # artificial vmem bump around cppyy's import
     opts.minimal = False         # private, undocumented
     opts.user_opts = []          # left-over opts after '-'
-
-
+    opts.evtMax = None           # evtMax on command line (or None if unspecified)
+    opts.skipEvents = None # skipEvents on command line (or None if unspecified)
 
     ldpreload = os.getenv('LD_PRELOAD') or ''
 
@@ -394,6 +401,34 @@ def parse(chk_tcmalloc=True):
         elif opt in ("--debugWorker",):
             opts.debug_worker = True
 
+        elif opt in("--filesInput",):
+            #set the jps.AthenaCommonFlags.FilesInput property
+            from AthenaCommonFlags import jobproperties as jps
+            from glob import glob
+            #split string by , character
+            #and for each use glob to expand path
+            files = []
+            for fe in arg.split(","):
+                files += glob(fe)
+            jps.AthenaCommonFlags.FilesInput.set_Value_and_Lock(files)
+
+        elif opt in("--evtMax",):
+            from AthenaCommonFlags import jobproperties as jps
+            try: arg = int(arg)
+            except Exception,err:
+                print "ERROR: --evtMax option - ",err
+                _help_and_exit()
+            opts.evtMax = arg
+            jps.AthenaCommonFlags.EvtMax.set_Value_and_Lock(arg)
+        elif opt in("--skipEvents",):
+            from AthenaCommonFlags import jobproperties as jps
+            try: arg = int(arg)
+            except Exception,err:
+                print "ERROR: --skipEvents option - ",err
+                _help_and_exit()
+            opts.skipEvents = arg
+            jps.AthenaCommonFlags.SkipEvents.set_Value_and_Lock(arg)
+
     # Unconditionally set this environment (see JIRA ATEAM-241)
     # This behavior can be controlled by a flag, if needed
     os.environ['LIBC_FATAL_STDERR_']='1'
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/CFElements.py b/Control/AthenaCommon/python/CFElements.py
similarity index 100%
rename from Trigger/TrigValidation/TrigUpgradeTest/python/CFElements.py
rename to Control/AthenaCommon/python/CFElements.py
diff --git a/Control/AthenaCommon/python/JobProperties.py b/Control/AthenaCommon/python/JobProperties.py
index ddda7f7aadb8151b0fbff566c40cfa436e95c97b..751de3c14f57fbfa9f6f83c6ac8fc4ddfd83c27a 100755
--- a/Control/AthenaCommon/python/JobProperties.py
+++ b/Control/AthenaCommon/python/JobProperties.py
@@ -582,8 +582,8 @@ class JobPropertyContainer (object):
                 setattr(self,new_container.__name__,
                         new_container(self._context_name))
             else:
-               self._log.warning('The container %s is already in',
-                                  new_container.__name__)
+               self._log.warning('The container %s is already in %s',
+                                  new_container.__name__,self.__name__)
         else:
            self._log.error('You are not adding a JobPropertyContainer ')
 
@@ -597,8 +597,8 @@ class JobPropertyContainer (object):
             if not(new_flag.__name__ in self.__dict__.keys()):
                 setattr(self,new_flag.__name__,new_flag(self._context_name))
             else:
-                self._log.warning('The flag %s is already in',
-                                   new_flag.__name__) 
+                self._log.warning('The flag %s is already in %s',
+                                   new_flag.__name__, self.__name__) 
         else:
            self._log.error('You are not adding a JobProperty ')
 
diff --git a/Control/AthenaCommon/share/JobOptTraceInclude.py b/Control/AthenaCommon/share/JobOptTraceInclude.py
deleted file mode 100755
index 979005cf8768007d9078fcf0f254060ac18a9e26..0000000000000000000000000000000000000000
--- a/Control/AthenaCommon/share/JobOptTraceInclude.py
+++ /dev/null
@@ -1,1104 +0,0 @@
-# File: AthenaCommon/JobOptTraceInclude.py
-# Author: Massimo Marino (Massimo.Marino@lbl.gov)
-# Modified: Wim Lavrijsen (WLavrijsen@lbl.gov) [Mar,20,2005]
-
-__version__ = "$Revision: 1.46 $"
-__author__  = "Massimo Marino"
-#
-#
-import traceback
-import sys
-
-def exception():
-   try:
-      type, value, tb = sys.exc_info()
-      info = traceback.extract_tb(tb)
-      filename, lineno, function, text = info[-1] # last line only
-      print "%s:%d: %s: %s (in %s)" %\
-            (filename, lineno, type.__name__, str(value), function)
-   finally:
-      type = value = tb = None # clean up
-
-            
-### property change to traceback association -------------------------------
-class Change( object ):
-   """Property value change and its traceback.Internal use only."""
-
-   def __init__( self, traceback, property, attribute, value ):
-      self.traceback = traceback
-      self.property = property
-      self.attribute = attribute
-      self.value = value
-
-
-### doctor the given class for change collection ----------------------------
-def _instrument( Class ):
-   """Internal function."""
-
-   original__setattr__ = Class.__setattr__
-
-   def getProperty( self, name ):
-      ip = self.getInterface()
-      if ip:
-         return ip.getProperty( name )
-    # raise "Property %s not found on %s" % (name, self.name())
-
-   def __setattr__( self, attrname, value ):
-      original__setattr__( self, attrname, value )
-
-      history = self.__dict__.setdefault( 'history', {} )
-      changes = history.setdefault( attrname, [] )
-      changes.append( Change( traceback.extract_stack(), self, attrname, value ) )
-
-      if len(changes) > 1:
-         changed = self.name()+"."+attrname
-         JOT._multiChanged.setdefault(changed, len(changes))
-         JOT._multiChanged[changed]=(len(changes))
-
-      JOT._changesTrace.append(Change(traceback.extract_stack(), self, attrname, value))
-
-   Class.__setattr__ = __setattr__
-
-
-### tracer implementation ---------------------------------------------------
-class JobOptTraceInclude( Include ):
-   """Tracing of changes to properties and jobOptions inclusion tree reports.
-   
-      This Python tool builds a history tree for property changes in Athena.
-      The current state of the tree can be queried at any point in time.
-
- Usage:
-      Apply it as the first script to the normal run, then pick up the
-      results either at the end of your script or interactively as in
-      the following example:
-
- $ athena.py -i AthenaCommon/JobOptTraceInclude.py AthExHelloWorld/HelloWorldOptions.py
-
- Alternative Use:
-      You can add the reporting in another options file and run this lasts
-      after your normal configuration, as in:
-
- $ cat report.py
-   JOT.propReport( HelloWorld, tb=True )
- $ athena.py AthenaCommon/JobOptTraceInclude.py AthExHelloWorld/HelloWorldOptions.py report.py
-"""
-
-   def _helpOnJOT(self):
-      """On Python prompt (>>>) issue help(JobOptTraceInclude) to access help on
-      this module through Python help system. The tool is nicknamed JOT.
-      
-      This Python tool builds a history tree for property changes in Athena.
-      The current state of the tree can be queried at any point in time.
-      
-      Usage: apply it as the first script to the normal run, then pick up the
-      results either at the end of your script, via a GUI or interactively as in
-      the following examples:
-      
-      $ athena.py -i AthenaCommon/JobOptTraceInclude.py AthExHelloWorld/HelloWorldOptions.py
-      
-      athena> JOT.propReport( HelloWorld )
-      ------------------------------------------------------------
-      [..]/InstallArea/jobOptions/AthExHelloWorld/HelloWorldOptions.py at line 43
-      HelloWorld.MyBool = 1
-      ------------------------------------------------------------
-      [..]/InstallArea/jobOptions/AthExHelloWorld/HelloWorldOptions.py at line 42
-      HelloWorld.MyInt = 42
-      
-      athena> JOT.propReport( HelloWorld, tb = True )  # request traceback as well
-      
-      athena> JOT.propReport( HelloWorld, 'MyStringVec' )
-      [..]/InstallArea/jobOptions/AthExHelloWorld/HelloWorldOptions.py at line 45
-      HelloWorld.MyStringVec = [ "Welcome", "to", "Athena", "Framework", "Tutorial" ]
-
-      athena> JOT.propReport( HelloWorld, 'MyStringVec', tb = True )
-      
-      
-      Alternatively, you can add the reporting in another options file and run
-      this after your normal configuration, like so:
-      
-      $ cat report.py
-      JOT.propReport( HelloWorld, tb=True )
-      $ athena.py AthenaCommon/JobOptTraceInclude.py AthExHelloWorld/HelloWorldOptions.py report.py
-      
-      ------------------------------------------------------------
-      [..]/InstallArea/jobOptions/AthExHelloWorld/HelloWorldOptions.py at line 43
-      HelloWorld.MyBool = 1
-      [...]
-      
-      You can trace down the includes (blocked ones will not appear, but
-      those that employ an internal block guard will) for a specific joboption file:
-      
-      $ athena.py -i AthenaCommon/JobOptTraceInclude.py myTopOptions.py
-      
-      athena> JOT.joTrace( 'LArCondCnv/LArCondCnv_Config_jobOptions.py' )
-      ------------------------------------------------------------
-      [..]/InstallArea/share/bin/athena.py at line 303
-      include( script )
-      
-      ../run/myTopOptions.py at line 39
-      include ("RecExCommon/RecExCommon_topOptions.py")
-      
-      [..]/InstallArea/jobOptions/LArCondCnv/LArCondCnv_DetDescr_jobOptions.py at line 4
-      include( "LArCondCnv/LArCondCnv_Config_jobOptions.py" )
-      ------------------------------------------------------------
-      
-      [..]/InstallArea/jobOptions/LArCondCnv/LArCondCnv_G4_jobOptions.py at line 4
-      include( "LArCondCnv/LArCondCnv_Config_jobOptions.py" )
-      
-      By default include trace follows a FIFO policy.
-      If you want to have the immediate *includer* jobOption spat out first (LIFO)
-      just say so, as in:
-      
-      $ athena> JOT.joTrace('RecExCommon/CBNT_config.py', LIFO=True)
-      ------------------------------------------------------------
-      ./RecExCommon_topOptions.py at line 401
-      include( "RecExCommon/CBNT_config.py" )
-      ------------------------------------------------------------
-      ./myTopOptions.py at line 40
-      include ("RecExCommon_topOptions.py")
-      ------------------------------------------------------------
-      /afs/cern.ch/atlas/software/dist/10.0.0/InstallArea/share/bin/athena.py at line 303
-      include( script )
-      
-      
-      You may get the include cascade from a specific jobOption down to specified
-      depth level. For example:
-      
-      athena> JOT.joTree('iPatRecExample/iPatRec_jobOptions.py')
-      |
-      --- iPatRecAlgs/iPatRec_jobOptions.py
-      --- iPatRecAlgs/iPatTrackTruthAssociator_jobOptions.py
-      --- iPatRecAlgs/iPatStatistics_jobOptions.py
-      
-      or:
-      
-      athena> JOT.joTree('iPatRecExample/iPatRec_jobOptions.py',1)
-      |
-      --- iPatRecAlgs/iPatRec_jobOptions.py
-      |
-      --- iPatRecAlgs/TrajectorySvc_jobOptions.py
-      --- iPatTrackFinder/TrackFinder_jobOptions.py
-      --- iPatGeometry/AlignmentTolerances_jobOptions.py
-      --- TRT_Rec/TRT_Rec_jobOptions.py
-      --- iPatRecAlgs/iPatTrackTruthAssociator_jobOptions.py
-      |
-      --- iPatTruthTrajectory/TruthSelector_jobOptions.py
-      --- iPatRecAlgs/iPatStatistics_jobOptions.py
-      |
-      --- iPatTruthTrajectory/TruthSelector_jobOptions.py
-      
-      You get a report of jobOptions files that have been included multiple
-      times (counts those with internal block guards as well). For example:
-      
-      athena> JOT.joWarns()
-      The following jobOptions have been processed more than once:
-      ------------------------------------------------------------
-      LArCondCnv/LArCondCnv_Config_jobOptions.py included 2 times
-      CaloIdCnv/CaloIdCnv_joboptions.py included 4 times
-      LArClusterRec/LArCluster_G4_corrections.py included 2 times
-      TileConditions/TileConditions_jobOptions.py included 2 times
-      iPatTruthTrajectory/TruthSelector_jobOptions.py included 2 times
-      TileIdCnv/TileIdCnv_jobOptions.py included 2 times
-      InDetTrackSummaryHelperTool/InDetTrackSummaryHelperTool_jobOptions.py included 2 times
-      LArClusterRec/LArCluster_corrections_class.py included 2 times
-      ------------------------------------------------------------
-      Check them with calls to joTrace and joTree to trace down the above multiple inclusions.
-      
-      athena> JOT.propWarns()
-      
-      propWarns is the corresponding method for Properties as joWarns()
-      is for jobOptions. It reports properties that have been changed more than
-      once during the configuration process.
-      
-      athena> JOT.joDumps()
-      joDumps creates a flat job option file. This is done with a two-fold purpose:
-      as a debug aid and as a reproducibility feature.
-      The flat job option file should allow you to freeze various configurations
-      pertaining to specific purposes.
-      
-      athena> JOT.gui() starts the GUI.
-"""
-
-
-   def __init__( self, org ):
-      """Initialize the dictionaries used for traceback."""
-      Include.__init__( self, org._show )
-      for name, value in org.__dict__.items():
-         if type(value) == str:
-            value = '"%s"' % value
-         exec 'self.%s = %s' % (name,value)
-         
-      self._filetrace = {}
-      self._includeTree = {}
-      self._multiInclude = {}
-      self._multiChanged = {}
-      self._athenaGlobals = {}
-      self._dclSvcAlg = {}
-      self._changesTrace = []
-      self._msg = ""
-      self._msgpieces = []
-      self.jomenu    = None # hacks to detect gui has started
-      self.joframe   = None
-      self.propframe = None  
-      
-   def __call__( self, filename, *args, **kw ):
-      """Include filename in the current scope by executing it globally."""
-      Include.__call__( self, filename, *args, **kw )
-
-    # TODO: don't use base class private member.Get a method to provide this info.
-      if not filename in self._once:
-         incltrace = self._filetrace.setdefault( filename, [] )
-         incltrace.append( traceback.extract_stack() )
-
-    # Counts multiple inclusions of this jobOption
-         if len(incltrace)>1:   
-            self._multiInclude.setdefault(filename,len(incltrace))
-            self._multiInclude[filename]=len(incltrace)
-
-      # Internal method
-      def buildTree(filename):
-         tb = traceback.extract_stack()
-         # Last first
-         tb.reverse()
-         # Determine caller of filename joboption and store it as
-         # Package/jobOption names combo
-         for t in tb:
-            if t[3] and t[3].startswith('include'):
-               jopath = t[0].split('/')
-               
-               # hackish detection of user local joboption
-               if jopath[0] is ".": jopath.remove(".")
-               
-               jocaller = '/'.join(jopath[len(jopath)-2:len(jopath)])
-               tree = self._includeTree.setdefault(jocaller,[])
-               tree.append(filename)
-               # not interested in the rest of full backtrace to build the tree 
-               break
-            
-      buildTree(filename)
-
-   def _printMsg(self, recursive=False):
-      tmpmsg = "".join(self._msgpieces)
-      if recursive:
-         # cumulate messages
-         self._msg += tmpmsg
-      else:
-         # single message
-         self._msg = tmpmsg
-
-      # shell scrolls hence we may print each tmpmsg in sequence
-      if self.jomenu and self.jomenu.cliON():
-         print tmpmsg
-      elif self.jomenu and not self.jomenu.guiAct():
-         print tmpmsg
-      elif not self.jomenu:
-         print tmpmsg
-      # this operation msg result can then be cleared
-      self._msgpieces = []
-
-   def _printDict(self, key, sort=False):
-      try:
-         dict = theApp.properties()[key]
-      except KeyError, e:
-         #exception()
-         self._msgpieces = ["Application Manager not available: " + str(e)]
-         self._printMsg()
-         return
-      if sort: dict.sort()
-      self._msgpieces = ["\n" + item for item in dict]
-      self._printMsg()
-
-   def extServices(self,sort=False):
-      """Lists the external services known to Application Manager."""
-      self._printDict('ExtSvc',sort)
-      
-   def topAlgs(self,sort=False):
-      """Lists the top algorithms known to Application Manager."""
-      self._printDict('TopAlg',sort)
-
-   def Dlls(self,sort=False):
-      """Lists the Dlls known to Application Manager."""
-      self._printDict('Dlls',sort)
-      
-
-   def joTree( self, filename, depth=0, _level=0):
-      """Reports the include tree from a given jobOption, with optional
-         depth of inclusion.
-      
-      Usage example:
-      
-      $ JOT.joTree('iPatRecExample/iPatRec_jobOptions.py',#)
-
-      Default depth is 0 to only report those includes the examined
-      jobOption is directly responsible for.
-      """
-      try:
-         root = self._includeTree[filename]
-         self._msgpieces.append("   "*_level+"|\n")
-      except KeyError:
-         # exception()
-         # Check all known jobOptions (with/out tree) for a typo on filename
-         if _level == 0: # but not while recursively constructing the tree
-            # ... and they do not appear in the gui
-            self._msgpieces = ["%s is not a known jobOption. A typo?" % filename]
-            for inclusions in self._includeTree.values():
-               if filename in inclusions:
-                  self._msgpieces = ["No include tree was generated for: %s" % filename]
-                  break
-            self._printMsg()
-            return
-         
-      # Visually print the tree ( a la 'tree' in Unix )
-      for jo in root:
-         self._msgpieces.append("   "*_level+("--- %s") % jo + "\n")
-         if depth>0 and self._includeTree.has_key(jo):
-            _level=_level+1
-            self.joTree(jo,depth-_level,_level)
-            _level=_level-1
-      if _level == 0:
-         # end of recursion and print     
-         self._printMsg()
-
-   def joTrace( self, filename, LIFO = False ):
-      """Reports the include cascade into the given jobOption file.
-
-      Usage example:
-
-      $ JOT.joTrace('RecExCommon/CBNT_config.py')
-
-      By default the trace direction is top-bottom (direct *includer* last).
-      To reverse trace direction (direct *includer* first) use:
-
-      $ JOT.joTrace('RecExCommon/CBNT_config.py', True)
-      """
-      try:
-         incltraces = self._filetrace[ filename ][0]
-      except KeyError:
-      	 # exception()
-         # Check whether we face a typo on filename
-         self._msgpieces = ["%s is not a known jobOption. A typo?" % filename]
-         for traces in self._filetrace.values():
-            if filename in traces:
-               self._msgpieces = ["No traceback available for %s" % filename]
-               break
-         self._printMsg()
-         return
-
-      # Show include trace by having the immediate *includer* spat out first
-      inclusions = incltraces[:] #reverse below happens IN PLACE!
-      if LIFO:
-         inclusions.reverse() 
-
-      for trace in inclusions:
-         # To do: formatting should become a method
-         if trace[3] and trace[3].startswith( 'include' ):
-            self._msgpieces.append("-"*60+"\n")
-            self._msgpieces.append("   %s at line %d\n    %s\n" % (trace[0],trace[1],trace[3]))
-      self._printMsg()
-      
-   def joWarns(self):
-      """Reports jobOption files included more than once during configuration process.
-
-      The reported jobOptions though might contain internal logic to
-      prevent multiple executions.
-
-      Usage example:
-
-      $ JOT.joWarns()
-      """
-      loop = "\n"
-      for jo,times in self._multiInclude.iteritems():
-         loop += "%s included %d times\n" % (jo, times)
-      if len(loop) >1:
-         self._msgpieces = ["The following jobOptions have been processed more than once:\n",
-                            "-"*60,
-                            loop,
-                            "-"*60,
-                            "\nCheck them with calls to joTrace and joTree to trace down the above multiple inclusions."]
-      else:
-         self._msgpieces = ["No jobOptions have been processed more than once."]
-         
-      self._printMsg()
-
-   def joDumps(self):
-      """Dumps the collected configuration changes into a flat jobOption file named myFlatOptions.py.
-      
-      Usage example:
-
-      $ JOT.joDumps()
-      """
-      # Output to file. Will evolve.
-      filename = "myFlatOptions.py"
-      try:
-         # Open file stream
-         file = open(filename, "w")
-      except IOError:
-         #exception()
-         self._msgpieces = ["There was an error writing to %s" % filename]
-         self._printMsg()
-         sys.exit()
-      
-      for change in JOT._changesTrace:
-         newline = ""
-         joLine = change.traceback[-2][3]
-         if type(change.property.name) is str:
-            propName = change.property.owner.name()+"."+change.property.name
-         else:
-            propName = change.property.name()
-            
-         if propName == "ApplicationMgr": propName = "theApp"
-         try:
-            value = change.property.properties()[change.attribute]
-         except:
-            #exception()
-            value = change.value
-         if joLine:
-            # There is indeed a recorded property change.
-            # Do not report setattr changes though
-            if "setattr" not in joLine:
-               # Tried different more simple solutions.
-               # Unfortunately they do not cover all possible cases
-               if type(change.value) != str:
-                  # the property value should be changed thusly
-                  newline = "%s.%s = %s\n" % (propName,
-                                              change.attribute,
-                                              value)
-               else:
-                  newline = '%s.%s = "%s"\n' % (propName,
-                                                change.attribute,
-                                                change.value)
-                                                
-            # Sequences can be tricky as developers play with them.
-            # Preserve "+=" if possible, otherwise keep above general case.
-            if joLine.find("+=")>0:
-               # and sequence is complete
-               if joLine.rfind(']')+1 == len(joLine) :
-                  newline = joLine + "\n"
-                  # cover local variable computations
-                  if newline.find("%")>0:
-                     newline = "%s.%s = %s\n" % (propName,
-                                                 change.attribute,
-                                                 value)
-                  
-            # Some property names are bogus: contain "::".
-            # Make no sense, hence get the actual line:
-            if propName.find("::")>0:
-               newline = joLine + "\n"
-               
-         # Very rare but happens: missing line but property
-         # has a tracedbacked change anyway
-         else:
-            if type(change.value) != str:
-               newline = "%s.%s = %s\n" % (propName,
-                                           change.attribute,
-                                           value)
-            else:
-               newline = '%s.%s = "%s"\n' % (propName,
-                                             change.attribute,
-                                             change.value)
-                  
-         # Define locally named properties as Algs/Svcs.
-         # Only first time and for main Properties only (not "prop.prop" Svcs/Algs)
-         if propName.find(".")>0:
-            propName = propName[:propName.find(".")]
-         if propName.find("::")>0:
-            propName = propName[propName.find("::")+2:]
-         # and there are non-pythonic names as well????? ::
-         if not self._dclSvcAlg.has_key(propName):
-            if type(change.property) is iAlgorithm:
-               dcl_as = ' = Algorithm("%s")\n' % propName
-               doDefine(dcl_as)
-            elif type(change.property) is iService:
-               dcl_as = ' = Service("%s")\n' % propName
-               doDefine(dcl_as)
-
-            def doDefine(as):   
-               propdef = self._dclSvcAlg.setdefault(propName,as)
-               declaration = propName + propdef
-               # Output local property definition
-               self._msgpieces.append(declaration)
-               file.write(declaration)
-         # actual lines - debug only
-         #actline = "#DEBUG %s at line %d\n" % (change.traceback[-2][0] , change.traceback[-2][1])
-         #file.write(actline)
-
-         # Output configuration change
-         self._msgpieces.append(newline)
-         file.write(newline)
-      
-   
-      self._printMsg()
-      file.close()
-
-   def propWarns(self):
-      """Reports properties that got changed more than once during configuration process.
-
-      The report list that might be just properly growing.
-
-      Usage example:
-
-      $ JOT.propWarns()
-      """
-      listprops = []
-      for prop, changes in self._multiChanged.iteritems():
-         listprops += ["%s property has been updated %d times\n" % (prop,changes)]
-
-      self._msgpieces = ["No property have been processed more than once."]
-      if len(listprops) >1:
-         strlist = "\n"
-         listprops.sort()
-         for prop in listprops: strlist += prop
-         self._msgpieces = ["The following properties have been changed more than once:\n",
-                            "-"*60,
-                            strlist,
-                            "-"*60,
-                            "\nCheck them with calls to propReport to trace the above multiple changes."]
-         
-      self._printMsg()
-              
-   def propReport( self, obj, attribute=None, tb=False , recursive=False):
-      """Reports history of the changes for the given property object and
-      of one of its specific attribute, if specified.
-      
-      If tb == True, a full traceback is provided.
-
-      Usage example:
-
-      $ JOT.propReport(CaloCellMaker)
-      $ JOT.propReport(CaloCellMaker, tb=True)
-      $ JOT.propReport(CaloCellMaker,'CaloCellsOutputName')
-      $ JOT.propReport(CaloCellMaker,'CaloCellsOutputName', tb=True)
-
-      Wildcard (*) is supported on the property objects (as string)
-      and attributes, as in:
-
-      $ JOT.propReport(CaloCellMaker,'CaloCell*')
-      $ JOT.propReport('CaloSW*','Clus*')   
-"""
-      def format( changes ):
-         for change in changes:
-            formatsingle(change)
-
-      def formatsingle(change):
-         line = None
-         if type(change.property.name) is str:
-            propName = change.property.name
-         else:
-            propName = change.property.name()
-         # get the traceback line modifying the property value
-         tb = change.traceback[:]
-         tb.reverse()
-         for tbline in tb:
-            for el in tbline:
-               if propName+"." in str(el):
-                  line = tbline
-                  break
-         if line:
-            self._msgpieces.append("  %s at line %d\n    %s\n" % (line[0],line[1],line[3] or ("%s.%s" % (obj.name(),change.attribute))))
-                                   
-            # In case of multi line list the value is not available from the extracted line
-            if not line[3] or ( line[3].find( '[' ) > 0 and line[3].find( ']' ) < 0 ):
-               self._msgpieces.append("    Actual value is: %s\n" % change.value)
-               self._msgpieces.append("-"*60+"\n")
-         else:
-            if (change.value) is str:
-               self._msgpieces.append(' changed by user\n %s.%s = "%s"\n' % (obj.name(), change.attribute, change.value))
-            else:
-               self._msgpieces.append(" changed by user\n %s.%s = %s\n" % (obj.name(), change.attribute, change.value))
-               
-      def backtraceit( changes ):
-         for change in changes:
-            for t in change.traceback:
-               if t[3] and t[3].startswith( 'include' ):
-                  self._msgpieces.append("  %s at line %d\n    %s\n" % (t[0],t[1],t[3]))
-            formatsingle ( change )
-
-      def reportChanges(attribute):
-         try:
-            changes = history[attribute]
-         except KeyError:
-            #exception
-            self._msgpieces = ["%s not known or never modified after creation." % attribute]
-            self._printMsg()
-            return
-         if tb:
-            backtraceit( changes )
-         else:
-            format ( changes )
-         
-      def printreport( history, attribute, recursive=False):
-         if attribute:
-            if attribute.endswith("*"): # Wildcard attribute name with ending "*"
-               wildcard = attribute[:-1]
-               for attrkey in history.iterkeys():
-                  if attrkey.startswith(wildcard):
-                     reportChanges(attrkey)
-            else:
-               reportChanges(attribute)
-               
-         else: # for all changed attributes
-            for attrkey in history.iterkeys():
-               reportChanges(attrkey)
-
-         self._printMsg(recursive)
-
-      def getHistory(obj):      
-         try:
-            history = obj.__dict__[ 'history' ]
-            return history
-         except AttributeError: pass
-         except KeyError:
-         #exception()
-            self._msgpieces = ["Unknown or unmodified since its construction."]
-            self._msgpieces.extend(obj.properties())
-            self._printMsg()
-            return
-
-      if type(obj) == str:
-         if obj.endswith("*"): # Wildcard on Property object
-            wildcard = obj[:-1]
-            for globj in globals().iterkeys():
-               if globj.startswith(wildcard):
-                  obj = globals()[globj]
-                  if isinstance(obj, iProperty) or \
-                         isinstance(obj, _PropertyProxy):
-                     self._msgpieces.append("*** Report on %s ***\n" % globj)
-                     self._msgpieces.append("+"*60+"\n")
-                     history = getHistory(obj)
-                     if history: printreport( history, attribute )
-            return
-         
-         else:
-            if globals().has_key(obj):
-               obj = globals()[obj]
-            elif globals().has_key(obj[:obj.find(".")]) and globals()[obj[:obj.find(".")]].__dict__.has_key(obj[obj.find(".")+1:]):
-               obj = globals()[obj[:obj.find(".")]].__dict__[obj[obj.find(".")+1:]]
-            
-            # Throw up
-            else:
-               if obj in theApp.properties()['TopAlg']:
-                  self._msgpieces = ["TopAlg %s not changed from creation." % obj]
-               elif obj in theApp.properties()['ExtSvc']:
-                  self._msgpieces = ["Service %s not changed from creation." % obj]
-               else:
-                  self._msgpieces = ["The string value %s is not an Algorithm nor a Service." % obj]
-
-               self._printMsg()
-               return
-
-      history = getHistory(obj)
-      if history:
-         printreport( history, attribute , recursive)
-
-         if not attribute:
-            # If asking for complete report take into account that
-            # obj may contain other Svcs and Algs.
-            # Report them recursively.
-            for subobj in obj.__dict__.values():
-               if type(subobj) is iService or type(subobj) is iAlgorithm:
-                  self.propReport(subobj, recursive=True)
-
-   def gui(self):
-
-      def _importCode(code, name, add_to_sys_modules=0):
-         """Internal. code can be any object containing code -- string, file object,
-         or compiled code object. Returns a new module object initialized by
-         dynamically importing the given code and optionally adding it to
-         sys.modules under the given name.
-         """
-         import imp
-         module = imp.new_module(name)
-         
-         if add_to_sys_modules:
-            sys.modules[name] = module
-            
-         exec code in module.__dict__
-         return module
-
-      self._athenaGlobals = globals()
-      JOTGUI = _importCode(self.GUI, "JOTGUI",1)
-      JOTGUI.buildMain()
-      
-      return
-
-
-### setup monitoring and activate tracer ------------------------------------
-_instrument( iProperty )
-_instrument( _PropertyProxy )
-include = JobOptTraceInclude( include )
-JOT = include
-log.info( "************* JobOption Tracing ACTIVATED ****************" )
-
-
-##########################  GUI stuff #######################################
-JOT.GUI = """
-import pydoc
-from __main__ import JOT, JobOptTraceInclude
-from Tkinter import *
-from SimpleDialog import SimpleDialog
-
-class StatusBar(Frame):
-
-    def __init__(self, master):
-        Frame.__init__(self, master)
-        self.label = Label(self, bd=1, relief=SUNKEN, anchor=W)
-        self.label.pack(fill=X)
-
-    def set(self, format, *args):
-        self.label.config(text=format % args)
-        self.label.update_idletasks()
-
-    def clear(self):
-        self.label.config(text="")
-        self.label.update_idletasks()
-
-class Command:
-    def __init__(self, callback, *args, **kwargs):
-        self.callback = callback
-        self.args = args
-        self.kwargs = kwargs
-
-    def __call__(self):
-        return apply(self.callback, self.args, self.kwargs)
-
-def createIntCB(master,label):
-   master.cbVar = IntVar()
-   master.fulltrace = Checkbutton(master, text=label,
-                                variable=master.cbVar,
-                                anchor=NE)   
-   master.fulltrace.grid(row = 2)
-   return master.fulltrace
-
-def createListbox(master):   
-   lbrow=3
-   joYscroll  =  Scrollbar (master, orient=VERTICAL )
-   joXscroll  =  Scrollbar (master, orient=HORIZONTAL )
-   
-   master.jolistbox = Listbox (master,selectmode="SINGLE",width=40,height=20,
-                             xscrollcommand=joXscroll.set,
-                             yscrollcommand=joYscroll.set)
-   master.jolistbox.grid ( row=lbrow, column=0, sticky=N+S+E+W )
-   joXscroll.config(command=master.jolistbox.xview)
-   joYscroll.config(command=master.jolistbox.yview)
-   
-   joYscroll.grid ( row=lbrow, column=1, sticky=N+S )        
-   joXscroll.grid ( row=lbrow+1, column=0, sticky=E+W )
-
-   return master.jolistbox
-
-
-def buildMain():
-   jotMain = Tk()
-   jotMain.resizable(0,0)
-
-   # Main Frames
-   JOT.propframe = propFrame(jotMain)
-   JOT.joframe = joFrame(jotMain)
-   JOT.jomenu = menuFrame(jotMain)
-
-   # Statusbar
-   JOT.status = StatusBar(jotMain)
-   JOT.status.grid(column=0, columnspan=6, sticky="W")
- 
-   # Author
-   me = StringVar()
-   me.set("Massimo Marino - LBNL")
-   lbl = Label(jotMain, textvariable=me,
-               fg="blue", font="Helvetica", justify="right")
-   lbl.grid(column=2,columnspan=2,sticky="NE")
-   
-   # Show it
-   jotMain.title("JOT")
-
-
-class propFrame(Frame):
-    def __init__(self, master=None):
-        "Property Frame"
-        Frame.__init__(self, master, class_="propFrame",takefocus=1, relief="ridge")
-        self.grid(row=1,column=2, columnspan=2, sticky=N+W+E)
-
-        self.traceCheck = createIntCB(self,"Full Trace")
-        self.proplistbox = createListbox(self)
-
-        # Collect all processed Properties alphabetically sorted
-        # hackish solution at the moment
-        gobjdir = JOT._athenaGlobals
-        gobjKeys = gobjdir.keys()
-        gobjKeys.sort()
-        for key in gobjKeys:
-           gobj = gobjdir[key]
-           if str(type(gobj)).find("gaudimodule")>0:
-              self.proplistbox.insert(END,key)
-              for subobj in gobj.__dict__.values():
-                 if str(type(subobj)).find("gaudimodule")>0:
-                    self.proplistbox.insert(END,subobj.name())
-
-        # Entry for user selection
-        self._slctdprop = StringVar()
-        self.propSelection = Entry(self,bg="white",textvariable=self._slctdprop,width=40)
-        self.propSelection.grid(row=6)
-
-        # Button to trigger selection
-        self.findProp = Button(self,text="Find",command=self.show)
-        self.findProp.grid(row=6,column=2,sticky=W)
-
-    def show(self):
-        self.proplistbox.selection_clear(0,END)
-        propName = self._slctdprop.get()
-        knownProps = list(self.proplistbox.get(0,END))
-        if propName in knownProps:
-           # property is fully identified
-           idx = knownProps.index(propName)
-           self.proplistbox.see(idx)
-           self.proplistbox.selection_set(idx)
-        else:
-           for prop in knownProps:
-              if prop.startswith(propName):
-                 idx = knownProps.index(prop)
-                 self.proplistbox.see(idx)
-                 break
-              
-class joFrame(Frame):
-    def __init__(self, master=None):
-        "jobOptions Frame"
-        Frame.__init__(self, master, class_="joFrame",takefocus=1,relief="ridge")
-        self.grid(row=1, column=0, columnspan=2, sticky=N+W+E)
-
-        self.lifoCheck = createIntCB(self,"Reverse Trace")
-        # Listbox of jobOptions 
-        self.jolistbox = createListbox(self)
-
-        # Collect all processed jobOption files
-        joptWithTree = JOT._includeTree.keys()
-        joptWithTree.sort()
-        for jopt in joptWithTree:
-           self.jolistbox.insert(END, jopt)
-
-        # Separate those without an include tree
-        joptNoTree = []
-        self.jolistbox.insert(END,"-"*60)
-        for subTree in JOT._includeTree.values():
-           for elem in subTree:
-              if elem not in joptWithTree: joptNoTree.append(elem)
-
-        joptNoTree.sort()
-        for jopt in joptNoTree:
-           self.jolistbox.insert(END, jopt)
-
-
-        # scale for tree depth
-        self.depthScale = Scale(self, from_=0, to=50, label="Tree depth",
-                                orient=HORIZONTAL, resolution=1, length=200)
-        self.depthScale.grid()
-        
-class menuFrame(Frame):
-    def __init__(self, master=None):
-        "Costructor for the JobOptTraceInclude GUI"
-        self.master = master
-        self._cli = IntVar()
-        self._guiAction = False
-        Frame.__init__(self, self.master, class_="menuFrame",relief="raised",bd=2)
-        self.grid(row=0, columnspan=5, sticky=N+W+E) 
-        self.tk_menuBar(self.JOT_menu(),self.theApp_menu(),self.jo_menu(), self.prop_menu(),self.help_menu(), self.CLI(), self.quitmb())
-
-    def cliON(self):
-       return self._cli.get()
-
-    def guiAct(self):
-       return self._guiAction
-
-    def JOT_menu(self):
-        jotmb = Menubutton(self,text="JOT")
-        jotmb.grid(row=0,column=0)
-        jotmb.menu = Menu (jotmb, tearoff=0)
-        jotmb["menu"] = jotmb.menu
-        #jotmb.menu.add_separator()
-        jotmb.menu.add_command(label="About...",    command=Command(self.aboutJOT))
-        jotmb.menu.add_command(label="Help",        command=Command(self.helpMsg,JOT._helpOnJOT))
-        return jotmb
-       
-    def theApp_menu(self):
-        # ApplicationMgr menu
-        appmb = Menubutton(self,text="View")
-        appmb.grid(row=0,column=1)
-        appmb.menu = Menu (appmb, tearoff=0)
-        appmb["menu"] = appmb.menu
-
-        appmb.menu.add_command(label="topAlgs",     command=Command(self.methNoArgs,JOT.topAlgs))
-        appmb.menu.add_command(label="Dlls",        command=Command(self.methNoArgs,JOT.Dlls))
-        appmb.menu.add_command(label="extServices", command=Command(self.methNoArgs,JOT.extServices))
-        return appmb
-
-    def jo_menu(self):
-       # jobOptions methods menu
-       jomb = Menubutton(self,text="jobOptions")
-       jomb.grid(row=0,column=2)
-       jomb.menu = Menu (jomb, tearoff=0)
-       jomb["menu"] = jomb.menu
-              
-       # jobOptions commands
-       jomb.menu.add_command(label="joDumps",
-                             command=Command(self.methNoArgs, JOT.joDumps))
-       jomb.menu.add_command(label="joTrace",
-                             command=Command(self.traceMethod, JOT.joTrace))
-       jomb.menu.add_command(label="joTree",
-                             command=Command(self.treeMethod, JOT.joTree))
-       jomb.menu.add_command(label="joWarns",
-                             command=Command(self.methNoArgs, JOT.joWarns))
-
-       return jomb
-
-    def prop_menu(self):
-       # properties methods menu
-       propmb = Menubutton(self,text="Properties")
-       propmb.grid(row=0,column=3)
-       propmb.menu = Menu (propmb, tearoff=0)
-       propmb["menu"] = propmb.menu
-       
-       propmb.menu.add_command(label="propReport",
-                               command=Command(self.reportMethod, JOT.propReport))
-       propmb.menu.add_command(label="propWarns",
-                               command=Command(self.methNoArgs, JOT.propWarns))
-
-       return propmb
-    
-    def help_menu(self):
-       # help menu
-       hlpmb = Menubutton(self,text="Help")
-       hlpmb.grid(row=0,column=4)
-       hlpmb.menu = Menu (hlpmb, tearoff=0)
-       hlpmb["menu"] = hlpmb.menu
-
-       hlpmb.menu.add_command(label="topAlgs",     command=Command(self.helpMsg,JOT.topAlgs))
-       hlpmb.menu.add_command(label="Dlls",        command=Command(self.helpMsg,JOT.Dlls))
-       hlpmb.menu.add_command(label="extServices", command=Command(self.helpMsg,JOT.extServices))
-       hlpmb.menu.add_separator()
-       hlpmb.menu.add_command(label="propReport",  command=Command(self.helpMsg,JOT.propReport))
-       hlpmb.menu.add_command(label="propWarns",   command=Command(self.helpMsg,JOT.propWarns))
-       hlpmb.menu.add_separator()
-       hlpmb.menu.add_command(label="joDumps",     command=Command(self.helpMsg,JOT.joDumps))
-       hlpmb.menu.add_command(label="joTree",      command=Command(self.helpMsg,JOT.joTree))
-       hlpmb.menu.add_command(label="joTrace",     command=Command(self.helpMsg,JOT.joTrace))
-       hlpmb.menu.add_command(label="joWarns",     command=Command(self.helpMsg,JOT.joWarns))
-       hlpmb.menu.add_separator()
-       hlpmb.menu.add_command(label="CLI",         command=Command(self.helpMsg,self.CLI))
-       hlpmb.menu.add_command(label="Quit",         command=Command(self.helpMsg,self.Quit))
-       return hlpmb
-
-
-    def aboutJOT(self):
-       SimpleDialog(self.master,
-                    text="JOT - A Job Option Tracer for Athena. CLI and GUI tool for Athena framework. Builds an history tree of Property changes and jobOptions inclusion. Select JOT->Help for more details. Massimo_Marino@lbl.gov",
-                    buttons=["Okie"],
-                    default=0, title="JobOptTraceInclude").go()
-
-    def popMsg(self, msg):
-       self._guiAction = True
-       popWin = Toplevel()
-       txtScroll = Scrollbar(popWin, orient=VERTICAL)
-       textWdg = Text(popWin,yscrollcommand=txtScroll.set)
-       txtScroll.config(command=textWdg.yview)
-       txtScroll.pack(side=RIGHT,fill=Y)
-       textWdg.config(wrap="word")
-       textWdg.insert(END,msg)
-       textWdg.config(state=DISABLED)
-       textWdg.pack(side=LEFT,fill=BOTH,expand=YES) 
-       self._guiAction = False
-       return popWin
-
-    def helpMsg(self,item):
-       self._guiAction = True
-       helpText = pydoc.getdoc(item)
-       helpWindow = self.popMsg(helpText)
-       helpWindow.title("Help on %s" % item.__name__)
-       self._guiAction = False
-       
-    def applyMeth(self,method,args,dict):
-       self._guiAction = True
-       apply(method,args,dict)
-       msgWindow = self.popMsg(JOT._msg)
-       if len(dict): args = args+(True,)
-       msgWindow.title("JOT.%s%s" % (method.__name__ , args))
-       self._guiAction = False
-       
-    def methNoArgs(self,method):
-       self._guiAction = True
-       apply(method)
-       msgWindow = self.popMsg(JOT._msg)
-       msgWindow.title("JOT.%s()" % method.__name__)
-       self._guiAction = False
-       
-    def treeMethod(self,method,args=(),dict={}):
-       # collect current selections
-       selectIdx = JOT.joframe.jolistbox.curselection()
-       treeDepth = JOT.joframe.depthScale.get()
-       try:
-          args = (JOT.joframe.jolistbox.get(selectIdx), treeDepth)
-          self._guiAction = True
-       except TclError, e:
-          #exception()
-          self.popMsg("No jobOption selected! " + str(e))
-          return
-
-       self.applyMeth(method,args,dict)
-       self._guiAction = False
-       
-    def traceMethod(self,method,args=(),dict={}):
-       # collect current selection
-       selectIdx = JOT.joframe.jolistbox.curselection()
-       LIFO = JOT.joframe.cbVar.get()
-       try:
-          args = (JOT.joframe.jolistbox.get(selectIdx), LIFO)
-          self._guiAction = True
-       except TclError, e:
-          #exception()
-          self.popMsg("No jobOption selected! " + str(e))
-          return
-
-       self.applyMeth(method,args,dict)
-       self._guiAction = False
-       
-    def reportMethod(self,method,args=(),dict={}):
-       # collect current selection
-       selectIdx = JOT.propframe.proplistbox.curselection()
-       if (JOT.propframe.cbVar.get()):
-          dict = {"tb":True}
-       try:   
-          args = (JOT.propframe.proplistbox.get(selectIdx),)
-          self._guiAction = True
-       except TclError, e:
-          #exception()
-          self.popMsg("No Property selected! " + str(e))
-          return
-          
-       self.applyMeth(method,args,dict)
-       self._guiAction = False       
-
-    def Quit(self):
-       "Do'h!"
-
-    def CLI(self):
-       "Output on the interactive shell as well if selected"
-       cliButton = Checkbutton (self, text="CLI", relief="flat",
-                                variable=self._cli, command=self.stateCLI)
-       cliButton.grid(row=0, column=5)
-       return cliButton
-
-    def quitmb(self):
-       # quit
-       quitButton = Button (self, text="Quit", activeforeground="red",
-                            relief="flat",command=self.tata)
-       quitButton.grid(row=0, column=6)
-       return quitButton
-
-    def stateCLI(self):
-       if self._cli.get():
-          args = "CLI active"
-       else:
-          args = ""
-       JOT.status.set("%s",args)
-
-    def tata(self):
-       self._cli.set(1)
-       self.master.destroy()
-"""
diff --git a/Control/AthenaCommon/share/runbatch.py b/Control/AthenaCommon/share/runbatch.py
index 2e699c5d7ff468e93139b899c8f04c010f81d56e..d5019aa1c62b5fbe06148f57e07515381b7fe187 100755
--- a/Control/AthenaCommon/share/runbatch.py
+++ b/Control/AthenaCommon/share/runbatch.py
@@ -8,6 +8,13 @@
 #   athena.py <myJobOptions.py> runbatch.py
 
 try:
+   #first check if command-line evtMax or skipEvents options were provided
+   if opts.evtMax != None:
+      theApp.EvtMax = jps.AthenaCommonFlags.EvtMax()
+   if opts.skipEvents != None:
+      if hasattr(svcMgr,"EventSelector"):
+         svcMgr.EventSelector.SkipEvents = jps.AthenaCommonFlags.SkipEvents()
+
    theApp.run()     # runs until theApp.EvtMax events reached
    from AthenaCommon.Debugging import hookDebugger,DbgStage
    if DbgStage.value == "fini":
diff --git a/Control/AthenaConfiguration/CMakeLists.txt b/Control/AthenaConfiguration/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..466b35cfdeedac12009ee16579986739b67992cf
--- /dev/null
+++ b/Control/AthenaConfiguration/CMakeLists.txt
@@ -0,0 +1,13 @@
+################################################################################
+# Package: AthenaConfiguration
+################################################################################
+
+# Declare the package name:
+atlas_subdir( AthenaConfiguration )
+
+# External dependencies:
+
+
+# Install files from the package:
+atlas_install_python_modules( python/*.py )
+atlas_install_runtime(python/*.pkl )
\ No newline at end of file
diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py
new file mode 100644
index 0000000000000000000000000000000000000000..9311f3c83031d58718ca0531f3da5f7f3baaf183
--- /dev/null
+++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py
@@ -0,0 +1,236 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+
+from AthenaCommon.Logging import logging
+from AthenaCommon.Configurable import ConfigurableService,ConfigurableAlgorithm
+import GaudiKernel.GaudiHandles as GaudiHandles
+import ast
+from collections import defaultdict
+
+class ComponentAccumulator(object): 
+    
+    def __init__(self):
+        self._msg=logging.getLogger('ComponentAccumulator')
+        self._eventAlgs={}     #Unordered list of event processing algorithms per sequence + their private tools 
+        self._conditionsAlgs=[]                #Unordered list of conditions algorithms + their private tools 
+        self._services=[]                      #List of service, not yet sure if the order matters here in the MT age
+        self._conditionsInput=set()            #List of database folder (as string), eventually passed to IOVDbSvc
+        self._eventInputs=set()                #List of items (as strings) to be read from the input (required at least for BS-reading).
+        self._outputPerStream={}               #Dictionary of {streamName,set(items)}, all as strings
+        pass
+
+
+    def addEventAlgo(self,algo,sequence="AthAlgSeq"):
+        if not isinstance(algo, ConfigurableAlgorithm):
+            self._msg.error("Attempt to add wrong type as event algorithm")
+            #raise exception ..
+            pass
+
+        if sequence not in self._eventAlgs.keys():
+            self._msg.info("Adding EventAlg sequence %s to the job" % sequence)
+            self._eventAlgs[sequence]=[]
+            pass
+        self._eventAlgs[sequence].append(algo)
+        pass
+
+
+    def getEventAlgo(self,name,sequence="TopSequence"):
+        #Fixme, deduplicate here? 
+        hits=[a for a in self._eventAlgs if a.getName()==name]
+        return hits
+
+    def addCondAlgo(self,algo):
+        if not isinstance(algo, ConfigurableAlgorithm):
+            self._msg.error("Attempt to add wrong type as conditions algorithm")
+            #raise exception ..
+            pass
+        self._conditionsAlgs.append(algo)
+        pass
+
+    def getCondAlgo(self,name):
+        #Fixme, deduplicate here? 
+        hits=[a for a in self._conditionsAlgs if a.getName()==name]
+        return hits
+
+    def addService(self,newSvc):
+        if not isinstance(newSvc,ConfigurableService):
+            self._msg.error("Attempt to add wrong type as service")
+            #raise exception ..
+            pass
+        #self._services.append(svc)
+
+        #Check for duplicates:
+        for svc in self._services:
+            if svc.getType()==newSvc.getType():
+                #Found service of the same type
+                if svc.getJobOptName()==newSvc.getJobOptName():
+                    #Found service of the same type and name:
+                    if (svc==newsvc):
+                        #the new service is an identical copy of an existing one. Ignore it.
+                        return
+                    else:
+                        #Now it gets tricky: Same name but different configuration
+                        #Loop over properties:
+                        for prop in svc.getProperties():
+                            if not prop.startswith('_'):
+                                oldprop=getattr(svc,prop)
+                                newprop=getattr(newsvc,prop)
+                                if (oldprop!=newprop):
+                                    #found property mismatch
+                                    if isinstance(oldprop,list): #if properties are concatinable, do that!
+                                        oldprop+=newprop
+                                        setattr(svc,oldprop)
+                                    else:
+                                        self._msg.error("service '%s' defined mutiple times with mismatching configuraton" % svcs[i].getJobOptName())
+                                        return None
+                                    pass 
+                                #end if prop-mismatch
+                            #end if startswith("_")
+                        #end loop over properties
+                    #end else
+                return # We found a service of the same type and name and could reconcile the two instances
+                #end if same name
+            #end if same type
+        
+
+        #No duplication, simply append 
+        self._services.append(newSvc)
+        pass
+
+    def getService(self,name):
+        hits=[a for a in self._services if a.getName()==name]
+        return hits
+
+    def addConditionsInput(self,condObj):
+        #That's a string, should do some sanity checks on formatting
+        self._conditionsInput.add(condObj);
+        pass
+
+    def addEventInput(self,condObj):
+        #That's a string, should do some sanity checks on formatting
+        self._eventInput.add(condObj);
+        pass
+
+
+
+    def addOutputToStream(self,streamName,outputs):
+        
+        if hasattr(outputs,'__iter__'):
+            toAdd=list(outputs)
+        else:
+            toAdd=[outputs,]
+
+        if streamName in self._outputsPerStream:
+            self._outputsPerStream[streamName].update(set(outputs))
+        else:
+            self._outputsPerStream[streamName]=set(outputs)
+            
+        pass
+
+
+    def merge(self,other):
+        if not isinstance(other,ComponentAccumulator):
+            self._msg.error("Attempt merge wrong type")
+            #raise exception
+            pass
+        
+        self._eventAlgs+=other._eventAlgs
+        self._conditionsAlgs+=other._conditionsAlgs
+        #self._services+=other._services
+        self._conditionsInput|=other._conditionsInput
+
+        for svc in other._services:
+            self.addService(svc) #Profit from deduplicaton here
+
+
+        for k in other._outputPerStream.keys():
+            if k in self._outputPerStream:
+                self._outputPerStream[k].update(other._outputPerStream[k])
+            else: #New stream type
+                self._outputPerStream[k]=other._outputPerStream[k]
+                
+                
+
+    def __iadd__(self,other):
+        self.merge(other)
+        return self
+
+ 
+    def appendConfigurable(self,confElem):
+        name=confElem.getJobOptName() #FIXME: Don't overwrite duplicates! 
+        for k, v in confElem.getValuedProperties().items():
+            if isinstance(v,GaudiHandles.GaudiHandle):
+                self._jocat[name][k]=v.getJobOptName()
+                self.appendConfigurable(v)
+            elif isinstance(v,GaudiHandles.GaudiHandleArray):
+                #self._jocat[name][k]=[]#[ v1.getJobOptName() for v1 in v ]
+                children=[]
+                for v1 in v:
+                    children.append(v1.getFullName())
+                    #print "Appending ",v1.getJobOptName(),"to", name, k
+                    self.appendConfigurable(v1)
+                self._jocat[name][k]=str(children)
+            else:
+                self._jocat[name][k]=str(v)
+            
+        
+        return
+        
+
+    def store(self,outfile):
+        from AthenaCommon.Utils.unixtools import find_datafile
+        from collections import defaultdict
+        import pickle
+        #first load basics from the bootstrap-pickle
+        bsfilename=find_datafile("bootstrap.pkl")
+        bsfile=open(bsfilename)
+        self._jocat=pickle.load(bsfile)
+        self._jocfg=pickle.load(bsfile)
+        self._pycomps=pickle.load(bsfile)
+        bsfile.close()
+
+
+        #EventAlgorithms
+        for (seqName,algoList) in self._eventAlgs.iteritems():        
+            evtalgseq=[]
+            for alg in algoList:
+                self.appendConfigurable(alg)
+                evtalgseq.append(alg.getFullName())
+
+            self._jocat[seqName]["Members"]=str(evtalgseq)
+
+
+        #Conditions Algorithms:
+        condalgseq=[]
+        for alg in self._conditionsAlgs:
+            self.appendConfigurable(alg)
+            condalgseq.append(alg.getFullName())
+        self._jocat["AthCondSeq"]["Members"]=str(condalgseq)
+
+
+        svcList=ast.literal_eval(self._jocfg["ApplicationMgr"]["ExtSvc"])
+        for svc in self._services:
+            svcname=svc.getJobOptName()
+            svcList.append(svc.getFullName())
+            #for k, v in svc.getValuedProperties().items():
+            #    self._jocat[svcname][k]=str(v)
+            self.appendConfigurable(svc)
+        self._jocfg["ApplicationMgr"]["ExtSvc"]=str(svcList)
+        pickle.dump( self._jocat, outfile ) 
+        pickle.dump( self._jocfg, outfile ) 
+        pickle.dump( self._pycomps, outfile )     
+
+
+    def run(self,nEvents):
+        from AthenaCommon.AppMgr import theApp
+        #theApp.setup()
+        
+        print theApp
+        topSeq=theApp.TopAlg
+
+        
+        for alg in self._eventAlgs:
+            theApp.TopAlg+=alg
+
+        theApp.run()
+            
diff --git a/Control/AthenaConfiguration/python/__init__.py b/Control/AthenaConfiguration/python/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..0be210962036dc110c2fd7f7cc6ac89283a48424
--- /dev/null
+++ b/Control/AthenaConfiguration/python/__init__.py
@@ -0,0 +1 @@
+__all__=[ 'ComponentAccumulator', ]
diff --git a/Control/AthenaConfiguration/python/bootstrap.pkl b/Control/AthenaConfiguration/python/bootstrap.pkl
new file mode 100644
index 0000000000000000000000000000000000000000..d3e1d39ff61aef8f82f92da685d4786b12a86d74
--- /dev/null
+++ b/Control/AthenaConfiguration/python/bootstrap.pkl
@@ -0,0 +1,1107 @@
+ccollections
+defaultdict
+p1
+(c__builtin__
+dict
+p2
+tRp3
+S'StoreGateSvc'
+p4
+(dp5
+S'IncidentSvc'
+p6
+S'IncidentSvc'
+p7
+sS'ProxyProviderSvc'
+p8
+S'ProxyProviderSvc'
+p9
+ssS'AthBeginSeq'
+p10
+(dp11
+S'ExtraOutputs'
+p12
+S'[]'
+p13
+sS'EvtStore'
+p14
+S'StoreGateSvc'
+p15
+sS'UserStore'
+p16
+S'UserDataSvc/UserDataSvc'
+p17
+sS'ExtraInputs'
+p18
+S'[]'
+p19
+sS'Sequential'
+p20
+S'True'
+p21
+sS'Members'
+p22
+S"['AthIncFirerAlg/BeginIncFiringAlg', 'IncidentProcAlg/IncidentProcAlg1']"
+p23
+sS'NeededResources'
+p24
+S'[]'
+p25
+sS'DetStore'
+p26
+S'StoreGateSvc/DetectorStore'
+p27
+ssS'CoreDumpSvc'
+p28
+(dp29
+S'Signals'
+p30
+S'[11, 7, 4, 8]'
+p31
+sS'FatalHandler'
+p32
+S'-1'
+p33
+ssS'AuditorSvc'
+p34
+(dp35
+S'Auditors'
+p36
+S"['AlgContextAuditor/AlgContextAuditor']"
+p37
+ssS'ClassIDSvc'
+p38
+(dp39
+S'CLIDDBFiles'
+p40
+S"['clid.db', 'Gaudi_clid.db']"
+p41
+ssS'AthOutSeq'
+p42
+(dp43
+S'ExtraOutputs'
+p44
+S'[]'
+p45
+sS'EvtStore'
+p46
+S'StoreGateSvc'
+p47
+sS'UserStore'
+p48
+S'UserDataSvc/UserDataSvc'
+p49
+sS'ExtraInputs'
+p50
+S'[]'
+p51
+sS'Members'
+p52
+S'[]'
+p53
+sS'NeededResources'
+p54
+S'[]'
+p55
+sS'DetStore'
+p56
+S'StoreGateSvc/DetectorStore'
+p57
+ssS'BeginIncFiringAlg'
+p58
+(dp59
+S'ExtraOutputs'
+p60
+S'[]'
+p61
+sS'EvtStore'
+p62
+S'StoreGateSvc'
+p63
+sS'ExtraInputs'
+p64
+S'[]'
+p65
+sS'UserStore'
+p66
+S'UserDataSvc/UserDataSvc'
+p67
+sS'FireSerial'
+p68
+S'False'
+p69
+sS'Incidents'
+p70
+S"['BeginEvent']"
+p71
+sS'NeededResources'
+p72
+S'[]'
+p73
+sS'DetStore'
+p74
+S'StoreGateSvc/DetectorStore'
+p75
+ssS'AthCondSeq'
+p76
+(dp77
+S'ExtraOutputs'
+p78
+S'[]'
+p79
+sS'EvtStore'
+p80
+S'StoreGateSvc'
+p81
+sS'UserStore'
+p82
+S'UserDataSvc/UserDataSvc'
+p83
+sS'ExtraInputs'
+p84
+S'[]'
+p85
+sS'Members'
+p86
+S'[]'
+p87
+sS'NeededResources'
+p88
+S'[]'
+p89
+sS'DetStore'
+p90
+S'StoreGateSvc/DetectorStore'
+p91
+ssS'AthMasterSeq'
+p92
+(dp93
+S'ExtraOutputs'
+p94
+S'[]'
+p95
+sS'EvtStore'
+p96
+S'StoreGateSvc'
+p97
+sS'UserStore'
+p98
+S'UserDataSvc/UserDataSvc'
+p99
+sS'ExtraInputs'
+p100
+S'[]'
+p101
+sS'Sequential'
+p102
+S'True'
+p103
+sS'Members'
+p104
+S"['AthSequencer/AthAlgEvtSeq', 'AthSequencer/AthOutSeq', 'AthSequencer/AthRegSeq']"
+p105
+sS'NeededResources'
+p106
+S'[]'
+p107
+sS'DetStore'
+p108
+S'StoreGateSvc/DetectorStore'
+p109
+ssS'AthAlgEvtSeq'
+p110
+(dp111
+S'ExtraOutputs'
+p112
+S'[]'
+p113
+sS'EvtStore'
+p114
+S'StoreGateSvc'
+p115
+sS'UserStore'
+p116
+S'UserDataSvc/UserDataSvc'
+p117
+sS'ExtraInputs'
+p118
+S'[]'
+p119
+sS'Sequential'
+p120
+S'True'
+p121
+sS'StopOverride'
+p122
+S'True'
+p123
+sS'Members'
+p124
+S"['AthSequencer/AthBeginSeq', 'AthSequencer/AthAllAlgSeq', 'AthSequencer/AthEndSeq']"
+p125
+sS'NeededResources'
+p126
+S'[]'
+p127
+sS'DetStore'
+p128
+S'StoreGateSvc/DetectorStore'
+p129
+ssS'AthEndSeq'
+p130
+(dp131
+S'ExtraOutputs'
+p132
+S'[]'
+p133
+sS'EvtStore'
+p134
+S'StoreGateSvc'
+p135
+sS'UserStore'
+p136
+S'UserDataSvc/UserDataSvc'
+p137
+sS'ExtraInputs'
+p138
+S'[]'
+p139
+sS'Sequential'
+p140
+S'True'
+p141
+sS'Members'
+p142
+S"['AthIncFirerAlg/EndIncFiringAlg', 'IncidentProcAlg/IncidentProcAlg2']"
+p143
+sS'NeededResources'
+p144
+S'[]'
+p145
+sS'DetStore'
+p146
+S'StoreGateSvc/DetectorStore'
+p147
+ssS'AthRegSeq'
+p148
+(dp149
+S'ExtraOutputs'
+p150
+S'[]'
+p151
+sS'EvtStore'
+p152
+S'StoreGateSvc'
+p153
+sS'UserStore'
+p154
+S'UserDataSvc/UserDataSvc'
+p155
+sS'ExtraInputs'
+p156
+S'[]'
+p157
+sS'Members'
+p158
+S'[]'
+p159
+sS'NeededResources'
+p160
+S'[]'
+p161
+sS'DetStore'
+p162
+S'StoreGateSvc/DetectorStore'
+p163
+ssS'EndIncFiringAlg'
+p164
+(dp165
+S'ExtraOutputs'
+p166
+S'[]'
+p167
+sS'EvtStore'
+p168
+S'StoreGateSvc'
+p169
+sS'ExtraInputs'
+p170
+S'[]'
+p171
+sS'UserStore'
+p172
+S'UserDataSvc/UserDataSvc'
+p173
+sS'FireSerial'
+p174
+S'False'
+p175
+sS'Incidents'
+p176
+S"['EndEvent']"
+p177
+sS'NeededResources'
+p178
+S'[]'
+p179
+sS'DetStore'
+p180
+S'StoreGateSvc/DetectorStore'
+p181
+ssS'Streams'
+p182
+(dp183
+S'ExtraOutputs'
+p184
+S'[]'
+p185
+sS'EvtStore'
+p186
+S'StoreGateSvc'
+p187
+sS'UserStore'
+p188
+S'UserDataSvc/UserDataSvc'
+p189
+sS'ExtraInputs'
+p190
+S'[]'
+p191
+sS'Members'
+p192
+S'[]'
+p193
+sS'NeededResources'
+p194
+S'[]'
+p195
+sS'DetStore'
+p196
+S'StoreGateSvc/DetectorStore'
+p197
+ssS'NTupleSvc'
+p198
+(dp199
+S'InhibitPathes'
+p200
+S'[]'
+p201
+sS'Input'
+p202
+S'[]'
+p203
+sS'Output'
+p204
+S'[]'
+p205
+ssS'EventPersistencySvc'
+p206
+(dp207
+S'CnvServices'
+p208
+S'[]'
+p209
+ssS'AthAlgSeq'
+p210
+(dp211
+S'ExtraOutputs'
+p212
+S'[]'
+p213
+sS'EvtStore'
+p214
+S'StoreGateSvc'
+p215
+sS'UserStore'
+p216
+S'UserDataSvc/UserDataSvc'
+p217
+sS'ExtraInputs'
+p218
+S'[]'
+p219
+sS'StopOverride'
+p220
+S'True'
+p221
+sS'Members'
+p222
+S'[]'
+p223
+sS'NeededResources'
+p224
+S'[]'
+p225
+sS'DetStore'
+p226
+S'StoreGateSvc/DetectorStore'
+p227
+ssS'AthAllAlgSeq'
+p228
+(dp229
+S'ExtraOutputs'
+p230
+S'[]'
+p231
+sS'EvtStore'
+p232
+S'StoreGateSvc'
+p233
+sS'UserStore'
+p234
+S'UserDataSvc/UserDataSvc'
+p235
+sS'ExtraInputs'
+p236
+S'[]'
+p237
+sS'Members'
+p238
+S"['AthSequencer/AthCondSeq', 'AthSequencer/AthAlgSeq']"
+p239
+sS'NeededResources'
+p240
+S'[]'
+p241
+sS'DetStore'
+p242
+S'StoreGateSvc/DetectorStore'
+p243
+ssS'AthenaSealSvc'
+p244
+(dp245
+S'DictNames'
+p246
+S'[]'
+p247
+sS'IgnoreDicts'
+p248
+S"['libSealCLHEPDict']"
+p249
+sS'IgnoreNames'
+p250
+S"['Gaudi', 'GaudiPython::Interface', 'GaudiPython::Helper', 'FactoryTable', 'IInterface', 'IFactory', 'IAlgFactory', 'ISvcFactory', 'IToolFactory', 'InterfaceID', 'StatusCode', 'IAppMgrUI', 'IProperty', 'Property', 'std::vector<Property*>', 'std::vector<const Property*>', 'std::list<IAlgorithm*>', 'std::list<IService*>', 'std::list<const IFactory*>', 'std::vector<IRegistry*>', 'SimpleProperty', 'SimplePropertyRef', 'IService', 'IAlgorithm', 'ISvcManager', 'IAlgManager', 'IJobOptionsSvc', 'ISvcLocator', 'IEventProcessor', 'IDataProviderSvc', 'IDataManagerSvc', 'IRegistry', 'ContainedObject', 'std::vector<const ContainedObject*>', 'DataObject', 'IHistogramSvc', 'AIDA::I', 'Algorithm', 'Service', 'GaudiPython::PyAlgorithm', 'GaudiPython::PyAlgorithmWrap', 'IParticlePropertySvc', 'ParticleProperty', 'StoreGateSvc', 'IStoragePolicy', 'CharDbArray', 'DoubleDbArray', 'FloatDbArray', 'IntDbArray', 'LongDbArray', 'ShortDbArray', 'AthenaEventLoopMgr', 'MinimalEventLoopMgr', 'PyAthenaEventLoopMgr', 'NTuple::Directory', 'NTuple::File ', 'NTuple::Tuple', 'INTuple', 'NTuple::Tuple', 'greater<int>', 'allocator<', 'string']"
+p251
+ssS'IncidentProcAlg2'
+p252
+(dp253
+S'ExtraOutputs'
+p254
+S'[]'
+p255
+sS'NeededResources'
+p256
+S'[]'
+p257
+sS'ExtraInputs'
+p258
+S'[]'
+p259
+ssS'DetectorStore'
+p260
+(dp261
+S'IncidentSvc'
+p262
+S'IncidentSvc'
+p263
+sS'ProxyProviderSvc'
+p264
+S'ProxyProviderSvc'
+p265
+ssS'IncidentProcAlg1'
+p266
+(dp267
+S'ExtraOutputs'
+p268
+S'[]'
+p269
+sS'NeededResources'
+p270
+S'[]'
+p271
+sS'ExtraInputs'
+p272
+S'[]'
+p273
+ssS'HistogramDataSvc'
+p274
+(dp275
+S'Input'
+p276
+S'[]'
+p277
+sS'InhibitPathes'
+p278
+S'[]'
+p279
+ssS'HistoryStore'
+p280
+(dp281
+S'IncidentSvc'
+p282
+S'IncidentSvc'
+p283
+sS'ProxyProviderSvc'
+p284
+S'ProxyProviderSvc'
+p285
+ss.ccollections
+defaultdict
+p1
+(c__builtin__
+dict
+p2
+tRp3
+S'CoreDumpSvc'
+p4
+(dp5
+S'AuditInitialize'
+p6
+S'False'
+p7
+sS'OutputLevel'
+p8
+S'0'
+sS'AuditServices'
+p9
+g7
+sS'AuditStart'
+p10
+g7
+sS'CallOldHandler'
+p11
+S'True'
+p12
+sS'Signals'
+p13
+S'[11, 7, 4, 8]'
+p14
+sS'AuditFinalize'
+p15
+g7
+sS'AuditStop'
+p16
+g7
+sS'AuditReinitialize'
+p17
+g7
+sS'TimeOut'
+p18
+S'1.8e+12'
+p19
+sS'FatalHandler'
+p20
+S'0'
+sS'AuditRestart'
+p21
+g7
+sS'CoreDumpStream'
+p22
+S'stdout'
+p23
+ssS'MessageSvc'
+p24
+(dp25
+S'verboseColorCode'
+p26
+S'[]'
+p27
+sS'defaultLimit'
+p28
+S'500'
+p29
+sS'enableSuppression'
+p30
+g12
+sS'errorColorCode'
+p31
+S'[]'
+p32
+sS'alwaysLimit'
+p33
+S'0'
+sS'showStats'
+p34
+g7
+sS'AuditReinitialize'
+p35
+g7
+sS'setFatal'
+p36
+S'[]'
+p37
+sS'infoLimit'
+p38
+S'500'
+p39
+sS'errorLimit'
+p40
+S'500'
+p41
+sS'AuditRestart'
+p42
+g7
+sS'Format'
+p43
+S'% F%18W%S%7W%R%T %0W%M'
+p44
+sS'AuditServices'
+p45
+g7
+sS'alwaysColorCode'
+p46
+S'[]'
+p47
+sS'AuditFinalize'
+p48
+g7
+sS'setError'
+p49
+S'[]'
+p50
+sS'setInfo'
+p51
+S'[]'
+p52
+sS'setAlways'
+p53
+S'[]'
+p54
+sS'debugColorCode'
+p55
+S'[]'
+p56
+sS'AuditInitialize'
+p57
+g7
+sS'warningLimit'
+p58
+S'500'
+p59
+sS'useColors'
+p60
+g7
+sS'OutputLevel'
+p61
+S'3'
+sS'countInactive'
+p62
+g7
+sS'AuditStop'
+p63
+g7
+sS'setDebug'
+p64
+S'[]'
+p65
+sS'timeFormat'
+p66
+S'%Y-%m-%d %H:%M:%S,%f'
+p67
+sS'fatalLimit'
+p68
+S'500'
+p69
+sS'fatalColorCode'
+p70
+S'[]'
+p71
+sS'loggedStreams'
+p72
+S'{}'
+p73
+sS'tracedInactiveSources'
+p74
+S'[]'
+p75
+sS'setVerbose'
+p76
+S'[]'
+p77
+sS'statLevel'
+p78
+S'0'
+sS'verboseLimit'
+p79
+S'500'
+p80
+sS'debugLimit'
+p81
+S'500'
+p82
+sS'AuditStart'
+p83
+g7
+sS'infoColorCode'
+p84
+S'[]'
+p85
+sS'setWarning'
+p86
+S'[]'
+p87
+sS'warningColorCode'
+p88
+S'[]'
+p89
+ssS'AthenaSealSvc'
+p90
+(dp91
+S'UseChronoStag'
+p92
+g12
+sS'AuditInitialize'
+p93
+g7
+sS'AuditServices'
+p94
+g7
+sS'OutputLevel'
+p95
+S'0'
+sS'AuditStart'
+p96
+g7
+sS'IgnoreNames'
+p97
+S"['Gaudi', 'GaudiPython::Interface', 'GaudiPython::Helper', 'FactoryTable', 'IInterface', 'IFactory', 'IAlgFactory', 'ISvcFactory', 'IToolFactory', 'InterfaceID', 'StatusCode', 'IAppMgrUI', 'IProperty', 'Property', 'std::vector<Property*>', 'std::vector<const Property*>', 'std::list<IAlgorithm*>', 'std::list<IService*>', 'std::list<const IFactory*>', 'std::vector<IRegistry*>', 'SimpleProperty', 'SimplePropertyRef', 'IService', 'IAlgorithm', 'ISvcManager', 'IAlgManager', 'IJobOptionsSvc', 'ISvcLocator', 'IEventProcessor', 'IDataProviderSvc', 'IDataManagerSvc', 'IRegistry', 'ContainedObject', 'std::vector<const ContainedObject*>', 'DataObject', 'IHistogramSvc', 'AIDA::I', 'Algorithm', 'Service', 'GaudiPython::PyAlgorithm', 'GaudiPython::PyAlgorithmWrap', 'IParticlePropertySvc', 'ParticleProperty', 'StoreGateSvc', 'IStoragePolicy', 'CharDbArray', 'DoubleDbArray', 'FloatDbArray', 'IntDbArray', 'LongDbArray', 'ShortDbArray', 'AthenaEventLoopMgr', 'MinimalEventLoopMgr', 'PyAthenaEventLoopMgr', 'NTuple::Directory', 'NTuple::File ', 'NTuple::Tuple', 'INTuple', 'NTuple::Tuple', 'greater<int>', 'allocator<', 'string']"
+p98
+sS'AuditFinalize'
+p99
+g7
+sS'AuditStop'
+p100
+g7
+sS'AuditReinitialize'
+p101
+g7
+sS'CheckDictAtInit'
+p102
+g7
+sS'DictNames'
+p103
+S'[]'
+p104
+sS'AuditRestart'
+p105
+g7
+sS'CheckDictionary'
+p106
+g12
+sS'LoadAllDicts'
+p107
+g7
+sS'IgnoreDicts'
+p108
+S"['libSealCLHEPDict']"
+p109
+ssS'IncidentSvc'
+p110
+(dp111
+S'AuditInitialize'
+p112
+g7
+sS'OutputLevel'
+p113
+S'0'
+sS'AuditServices'
+p114
+g7
+sS'AuditStart'
+p115
+g7
+sS'AuditFinalize'
+p116
+g7
+sS'AuditStop'
+p117
+g7
+sS'AuditReinitialize'
+p118
+g7
+sS'AuditRestart'
+p119
+g7
+ssS'JobOptionsSvc'
+p120
+(dp121
+S'AuditStop'
+p122
+g7
+sS'SEARCHPATH'
+p123
+S'.:/home/wlampl/jobConfig2017/build/x86_64-slc6-gcc62-opt/jobOptions:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-04-09T2225/GAUDI/22.0.0/InstallArea/x86_64-slc6-gcc62-opt/jobOptions:/home/wlampl/jobConfig2017:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-04-09T2225/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-opt/jobOptions:/cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-04-09T2225/AthenaExternals/22.0.0/InstallArea/x86_64-slc6-gcc62-opt/jobOptions'
+p124
+sS'AuditInitialize'
+p125
+g7
+sS'AuditServices'
+p126
+g7
+sS'OutputLevel'
+p127
+S'0'
+sS'AuditStart'
+p128
+g7
+sS'DUMPFILE'
+p129
+S''
+sS'AuditFinalize'
+p130
+g7
+sS'PYTHONPARAMS'
+p131
+S''
+sS'AuditReinitialize'
+p132
+g7
+sS'PATH'
+p133
+S'../options/job.opts'
+p134
+sS'PYTHONACTION'
+p135
+S''
+sS'TYPE'
+p136
+S'NONE'
+p137
+sS'AuditRestart'
+p138
+g7
+ssS'ToolSvc'
+p139
+(dp140
+S'AuditInitialize'
+p141
+g7
+sS'OutputLevel'
+p142
+S'0'
+sS'AuditServices'
+p143
+g7
+sS'AuditStart'
+p144
+g7
+sS'AuditFinalize'
+p145
+g7
+sS'AuditStop'
+p146
+g7
+sS'AuditReinitialize'
+p147
+g7
+sS'AuditRestart'
+p148
+g7
+ssS'ApplicationMgr'
+p149
+(dp150
+S'Runable'
+p151
+S'AppMgrRunable'
+p152
+sS'ReturnCode'
+p153
+S'0'
+sS'TopAlg'
+p154
+S"['AthSequencer/AthMasterSeq']"
+p155
+sS'EventLoop'
+p156
+S'AthenaEventLoopMgr'
+p157
+sS'ExtSvcCreates'
+p158
+g7
+sS'NoOfThreads'
+p159
+S'0'
+sS'Environment'
+p160
+S'{}'
+p161
+sS'JobOptionsPath'
+p162
+S''
+sS'SvcMapping'
+p163
+S"['EvtDataSvc/EventDataSvc', 'DetDataSvc/DetectorDataSvc', 'HistogramSvc/HistogramDataSvc', 'HbookCnv::PersSvc/HbookHistSvc', 'RootHistCnv::PersSvc/RootHistSvc', 'EvtPersistencySvc/EventPersistencySvc', 'DetPersistencySvc/DetectorPersistencySvc', 'HistogramPersistencySvc/HistogramPersistencySvc']"
+p164
+sS'MultiThreadExtSvc'
+p165
+S'[]'
+p166
+sS'HistogramPersistency'
+p167
+S'NONE'
+p168
+sS'AuditServices'
+p169
+g7
+sS'OutStream'
+p170
+S'[]'
+p171
+sS'ActivateHistory'
+p172
+g7
+sS'StalledEventMonitoring'
+p173
+g7
+sS'InitializationLoopCheck'
+p174
+g7
+sS'JobOptionsSvcType'
+p175
+S'JobOptionsSvc'
+p176
+sS'JobOptionsPreAction'
+p177
+S''
+sS'StatusCodeCheck'
+p178
+g12
+sS'AuditTools'
+p179
+g7
+sS'AlgTypeAliases'
+p180
+S'{}'
+p181
+sS'EvtSel'
+p182
+S''
+sS'PluginDebugLevel'
+p183
+S'0'
+sS'OutputLevel'
+p184
+S'3'
+sS'AppVersion'
+p185
+S''
+sS'EvtMax'
+p186
+S'-1'
+p187
+sS'SvcOptMapping'
+p188
+S'[]'
+p189
+sS'CreateSvc'
+p190
+S"['ToolSvc/ToolSvc', 'AthDictLoaderSvc/AthDictLoaderSvc', 'AthenaSealSvc/AthenaSealSvc', 'CoreDumpSvc/CoreDumpSvc']"
+p191
+sS'PropertiesPrint'
+p192
+g7
+sS'JobOptionsType'
+p193
+S'NONE'
+p194
+sS'OutStreamType'
+p195
+S'AthenaOutputStream'
+p196
+sS'StopOnSignal'
+p197
+g7
+sS'ExtSvc'
+p198
+S"['ToolSvc/ToolSvc', 'AuditorSvc/AuditorSvc', 'MessageSvc/MessageSvc', 'IncidentSvc/IncidentSvc', 'EvtPersistencySvc/EventPersistencySvc', 'HistogramSvc/HistogramDataSvc', 'NTupleSvc/NTupleSvc', 'RndmGenSvc/RndmGenSvc', 'ChronoStatSvc/ChronoStatSvc', 'StatusCodeSvc/StatusCodeSvc', 'StoreGateSvc/StoreGateSvc', 'StoreGateSvc/DetectorStore', 'StoreGateSvc/HistoryStore', 'ClassIDSvc/ClassIDSvc', 'AthDictLoaderSvc/AthDictLoaderSvc', 'AthenaSealSvc/AthenaSealSvc', 'CoreDumpSvc/CoreDumpSvc', 'JobOptionsSvc/JobOptionsSvc']"
+p199
+sS'AppName'
+p200
+S'ApplicationMgr'
+p201
+sS'AuditAlgorithms'
+p202
+g7
+sS'Dlls'
+p203
+S"['AthenaServices']"
+p204
+sS'MessageSvcType'
+p205
+S'MessageSvc'
+p206
+sS'JobOptionsPostAction'
+p207
+S''
+ssS'StatusCodeSvc'
+p208
+(dp209
+S'AuditRestart'
+p210
+g7
+sS'AuditInitialize'
+p211
+g7
+sS'OutputLevel'
+p212
+S'3'
+sS'AuditServices'
+p213
+g7
+sS'AuditStart'
+p214
+g7
+sS'AbortOnError'
+p215
+g12
+sS'Filter'
+p216
+S"['Reflex::NewDelFunctionsT<StatusCode>::delete_T(void*)', 'ROOT::Reflex::NewDelFunctionsT<StatusCode>::delete_T(void*)']"
+p217
+sS'AuditFinalize'
+p218
+g7
+sS'AuditStop'
+p219
+g7
+sS'AuditReinitialize'
+p220
+g7
+sS'SuppressCheck'
+p221
+g7
+sS'IgnoreDicts'
+p222
+g12
+ssS'AthDictLoaderSvc'
+p223
+(dp224
+S'AuditInitialize'
+p225
+g7
+sS'OutputLevel'
+p226
+S'0'
+sS'AuditServices'
+p227
+g7
+sS'AuditStart'
+p228
+g7
+sS'DoRecursiveLoad'
+p229
+g12
+sS'AuditFinalize'
+p230
+g7
+sS'AuditStop'
+p231
+g7
+sS'AuditReinitialize'
+p232
+g7
+sS'AuditRestart'
+p233
+g7
+ss.(lp1
+.
\ No newline at end of file
diff --git a/Control/AthenaExamples/AthExBeginRun/cmt/requirements b/Control/AthenaExamples/AthExBeginRun/cmt/requirements
deleted file mode 100755
index 17529d5ffd21b4697bc37bf2e33a46bc4a3f8724..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/AthExBeginRun/cmt/requirements
+++ /dev/null
@@ -1,19 +0,0 @@
-package AthExBeginRun
-
-author Frank Winklmeier
-
-use AtlasPolicy         AtlasPolicy-* 
-
-private
-
-use GaudiInterface       GaudiInterface-*       External
-use AthenaKernel         AthenaKernel-*         Control
-use StoreGate            StoreGate-*            Control
-use AthenaBaseComps	 AthenaBaseComps-*      Control
-use IOVDbTestConditions  IOVDbTestConditions-*  AtlasTest/DatabaseTest
-use RegistrationServices RegistrationServices-* Database
-
-library AthExBeginRun *.cxx -s=components *.cxx
-apply_pattern component_library
-apply_pattern declare_joboptions files="../share/*.py"
-
diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/cmt/requirements b/Control/AthenaExamples/AthExFortranAlgorithm/cmt/requirements
deleted file mode 100755
index 10777d9817f8bb19700b15b82d83f4e1c707b59f..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/AthExFortranAlgorithm/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package AthExFortranAlgorithm
-author Paolo Calafiura <Paolo.Calafiura@cern.ch>
-
-use AtlasPolicy        AtlasPolicy-*
-use AtlasFortranPolicy AtlasFortranPolicy-* 
-use AthenaBaseComps    AthenaBaseComps-*	Control	    
-
-private
-use GaudiInterface     GaudiInterface-*		External
-end_private
-
-library AthExFortranAlgorithm *.cxx *.F components/*.cxx
-
-apply_pattern component_library
-
-apply_pattern declare_runtime files=FortranAlgorithmInput.data
-apply_pattern declare_scripts files=preFortAlgEx.sh
-apply_pattern declare_joboptions files="FortranAlgorithmOptions.txt FortranAlgorithmOptions.py"
diff --git a/Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld/IHelloTool.h b/Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld/IHelloTool.h
index 1ca87a4533d7c57293d78a788061cf3deb231a0e..2c29e8cb55c726421a7af7e350686bae7d9cdbdf 100755
--- a/Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld/IHelloTool.h
+++ b/Control/AthenaExamples/AthExHelloWorld/AthExHelloWorld/IHelloTool.h
@@ -9,10 +9,9 @@
 
 class IHelloTool : virtual public IAlgTool {
 public:
-   virtual StatusCode saySomething() = 0;
-   static const InterfaceID& interfaceID() {
-     static const InterfaceID _IHelloToolID( "IHelloTool", 1, 0 );
-     return _IHelloToolID;
-   }
+  virtual StatusCode saySomething() = 0;
+
+  DeclareInterfaceID( IHelloTool, 1, 0);
+
 };
 #endif // !ATHEXHELLOWORLD_IHELLOTOOL_H
diff --git a/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt b/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt
index 34a5d2a22200acf65ec1eb767d2d23d051588bbe..b396823e88cc244fa933ffed0e4560ccbde104d5 100644
--- a/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt
+++ b/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt
@@ -10,6 +10,7 @@ atlas_depends_on_subdirs( PUBLIC
                           GaudiKernel
                           PRIVATE
                           Control/AthenaBaseComps
+			  Control/AthenaConfiguration
                           TestPolicy )
 
 # Component(s) in the package:
@@ -21,5 +22,6 @@ atlas_add_component( AthExHelloWorld
 # Install files from the package:
 atlas_install_headers( AthExHelloWorld )
 atlas_install_joboptions( share/*.py )
+atlas_install_python_modules( share/HelloWorldConfig.py )
 atlas_install_runtime( test/AthExHelloWorld_TestConfiguration.xml )
 
diff --git a/Control/AthenaExamples/AthExHelloWorld/cmt/requirements b/Control/AthenaExamples/AthExHelloWorld/cmt/requirements
deleted file mode 100755
index 71e52942d8eac1a7f502ef1f8a7da71c0f3416ff..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/AthExHelloWorld/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package AthExHelloWorld
-
-author Paolo Calafiura <Paolo.Calafiura@cern.ch>
-
-use AtlasPolicy     AtlasPolicy-* 
-use GaudiInterface  GaudiInterface-*	External 
-
-private
-use AthenaBaseComps AthenaBaseComps-*	Control
-end_private
-
-library AthExHelloWorld *.cxx -s=components *.cxx
-apply_pattern component_library
-#details about the component_library and dual_library patterns
-# at http://www.cern.ch/Atlas/GROUPS/SOFTWARE/OO/architecture/General/Documentation/PackageStructure.txt
-
-apply_pattern declare_joboptions files="*.py"
-
-apply_pattern declare_python_modules files="*.py"
-
-macro AthExHelloWorld_TestConfiguration "../test/AthExHelloWorld_TestConfiguration.xml"
-apply_pattern declare_runtime extras="../test/AthExHelloWorld_TestConfiguration.xml"
-
-# for unit tests and automatic ATN xml validation
-private
-use TestPolicy TestPolicy-*
-apply_pattern validate_xml
-end_private
diff --git a/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldConfig.py b/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..3aba1222c3054a535ed13e42df847aba638cbf6c
--- /dev/null
+++ b/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldConfig.py
@@ -0,0 +1,54 @@
+
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+
+def HelloWorldCfg(ConfigFlags=None):
+    result=ComponentAccumulator()
+    
+    from AthExHelloWorld.AthExHelloWorldConf import HelloAlg
+    HelloWorld=HelloAlg("HelloWorld")
+    
+    HelloWorld.OutputLevel = 0
+
+    # Set an int property
+    HelloWorld.MyInt = 42
+
+    # Set a boolean property (False, True, 0, 1)
+    HelloWorld.MyBool = True
+
+    # Set a double property
+    HelloWorld.MyDouble = 3.14159
+
+    # Set a vector of strings property ...
+    HelloWorld.MyStringVec = [ "Welcome", "to", "Athena", "Framework", "Tutorial" ]
+
+    # ... and add one more:
+    HelloWorld.MyStringVec += [ "!" ]
+
+    # Set a map of strings to strings property ...
+    HelloWorld.MyDict = { 'Bonjour'      : 'Guten Tag',
+                          'Good Morning' : 'Bonjour' , 'one' : 'uno' }
+
+    # ... and add one more:
+    HelloWorld.MyDict[ "Goeiedag" ] = "Ni Hao"
+
+    # Set a table (a vector of pairs of doubles) ...
+    HelloWorld.MyTable = [ ( 1 , 1 ) , ( 2 , 4 ) , ( 3 , 9 ) ]
+
+    # ... and one more:
+    HelloWorld.MyTable += [ ( 4, 16 ) ]
+
+    # Set a matrix (a vector of vectors) ...
+    HelloWorld.MyMatrix = [ [ 1, 2, 3 ],
+                            [ 4, 5, 6 ] ]
+
+    # ... and some more:
+    HelloWorld.MyMatrix += [ [ 7, 8, 9 ] ]
+
+    from AthExHelloWorld.AthExHelloWorldConf import HelloTool
+    HelloWorld.MyPrivateHelloTool = HelloTool( "HelloTool" )
+    HelloWorld.MyPrivateHelloTool.MyMessage = "A Private Message!"
+
+
+    result.addEventAlgo(HelloWorld)
+    return result
diff --git a/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldOptions.py b/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldOptions.py
index f3fc1148da501b6e2dff547fbd8e2653d0c457ed..b6ed194014d6390e3809923bf972a9f3c2c8197a 100755
--- a/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldOptions.py
+++ b/Control/AthenaExamples/AthExHelloWorld/share/HelloWorldOptions.py
@@ -67,7 +67,10 @@ HelloWorld.MyStringVec += [ "!" ]
 
 # Set a map of strings to strings property ...
 HelloWorld.MyDict = { 'Bonjour'      : 'Guten Tag',
-                      'Good Morning' : 'Bonjour' , 'one' : 'uno' }
+                      'Good Morning' : 'Bonjour' , 
+                      'one' : 'ein',
+                      'two' : 'dos',
+                      'three' : 'trois' }
 
 # ... and add one more:
 HelloWorld.MyDict[ "Goeiedag" ] = "Ni Hao"
diff --git a/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.cxx b/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.cxx
index bc8f9768a23674911886f2455aec2eb245778e2c..5d17c67667dfdee8792578e13c58be4e932ab37c 100755
--- a/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.cxx
+++ b/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.cxx
@@ -17,26 +17,11 @@ std::ostream& operator<<( std::ostream& s, std::pair<double, double > p )
 }
 
 HelloAlg::HelloAlg(const std::string& name, ISvcLocator* pSvcLocator) :
-  AthAlgorithm(name, pSvcLocator), m_myInt(0), m_myBool(0), m_myDouble(0),
-  m_myPrivateHelloTool("HelloTool",this), m_myPublicHelloTool("HelloTool"),
-  m_myDict(),
-  m_myTable(),
-  m_myMatrix()
+  AthAlgorithm(name, pSvcLocator), 
+  m_myTable()
 {
   
   // Part 2: Declare the properties
-  declareProperty("MyInt", m_myInt);
-  declareProperty("MyBool", m_myBool);
-  declareProperty("MyDouble", m_myDouble);
-
-  declareProperty("MyStringVec",m_myStringVec, "an entire vector of strings!");
-
-  declareProperty("MyPrivateHelloTool", m_myPrivateHelloTool, "private IHelloTool");
-  declareProperty("MyPublicHelloTool", m_myPublicHelloTool, "public, shared IHelloTool");
-
-  declareProperty("MyDict",
-		  m_myDict,
-		  "A little dictionary" );
   // some default values;
   m_myDict["Bonjour"]      = "Guten Tag";
   m_myDict["Good Morning"] = "Bonjour";
@@ -48,8 +33,6 @@ HelloAlg::HelloAlg(const std::string& name, ISvcLocator* pSvcLocator) :
   m_myTable.push_back( std::make_pair( 2., 2.*2. ) );
   m_myTable.push_back( std::make_pair( 3., 3.*3. ) );
 
-  declareProperty("MyMatrix", m_myMatrix, "A matrix of doubles" );
-
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
@@ -61,9 +44,9 @@ StatusCode HelloAlg::initialize() {
 
   // Part 2: Print out the property values
   ATH_MSG_INFO
-    (   "  MyInt =    " << m_myInt << endmsg
-     << "  MyBool =   " << (int)m_myBool << endmsg
-     << "  MyDouble = " << m_myDouble);
+    (   "  MyInt =    "    << (int) m_myInt << endmsg
+        << "  MyBool =   " << (int) m_myBool << endmsg
+        << "  MyDouble = " << (double) m_myDouble);
 
   for (unsigned int i=0; i<m_myStringVec.size(); i++) {
     ATH_MSG_INFO ("  MyStringVec[" << i << "] = " << m_myStringVec[i]);
diff --git a/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.h b/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.h
index de845b47812ecdcb97a04b08a8970378fd10b2c9..7ddb21e38baa3f1214fe9a8f711ab8d75970b165 100755
--- a/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.h
+++ b/Control/AthenaExamples/AthExHelloWorld/src/HelloAlg.h
@@ -9,6 +9,7 @@
 
 #include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/Property.h"
 
 #include <string>
 #include <vector>
@@ -30,20 +31,31 @@ public:
   StatusCode endRun();
   
 private:
-  int    m_myInt;
-  bool   m_myBool;
-  double m_myDouble;
-  std::vector< std::string > m_myStringVec;
+  // Properties
+  Gaudi::Property<int>    m_myInt    {this, "MyInt", 0, "An Integer"};
+  Gaudi::Property<bool>   m_myBool   {this, "MyBool", false, "A Bool"};
+  Gaudi::Property<double> m_myDouble {this, "MyDouble", 0., "A Double"};
 
-  ToolHandle< IHelloTool > m_myPrivateHelloTool;
-  ToolHandle< IHelloTool > m_myPublicHelloTool;
+  Gaudi::Property< std::vector<std::string> > m_myStringVec {this, "MyStringVec", {}, "an entire vector of strings"};
 
   typedef std::map<std::string, std::string> Dict_t;
-  Dict_t m_myDict;
+  Gaudi::Property<Dict_t> m_myDict {this, "MyDict", {}, "A little dictionary"};
+
+  typedef std::vector<std::vector<double> > Matrix_t;
+  Gaudi::Property<Matrix_t> m_myMatrix {this, "MyMatrix", {}, "A matrix of doubles"};
+
+  // legacy style Property
   typedef std::vector<std::pair<double, double> > Table_t;
   Table_t m_myTable;
-  typedef std::vector<std::vector<double> > Matrix_t;
-  Matrix_t m_myMatrix;
+
+
+  // ToolHandles as Properties
+  ToolHandle< IHelloTool > m_myPrivateHelloTool {this, "MyPrivateHelloTool", 
+      "HelloTool", "private IHelloTool"};
+
+  PublicToolHandle< IHelloTool > m_myPublicHelloTool {this, "MyPublicHelloTool",
+      "HelloTool", "public, shared IHelloTool"};
+  
 };
 
 #endif // ATHEXHELLOWORLD_HELLOALG_H
diff --git a/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.cxx b/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.cxx
index 0e639c0096cebbf0360cca70a62a3ddcd5886b3c..796d7565fa2cc0990af20305243db7fb641d5b4f 100755
--- a/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.cxx
+++ b/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.cxx
@@ -8,29 +8,15 @@
 
 HelloTool::HelloTool( const std::string& type, const std::string& name,
 		      const IInterface* parent ) 
-  : AthAlgTool( type, name, parent ), m_myMessage("Default message set in HelloTool.cxx")
+  : base_class( type, name, parent )
 {
-  declareProperty( "MyMessage", m_myMessage, "something to say" );
-}
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
-StatusCode HelloTool::queryInterface( const InterfaceID& riid, void** ppvIf )
-{
-   if ( riid == IHelloTool::interfaceID() )  {
-      *ppvIf = (IHelloTool*)this;
-      addRef();
-      return StatusCode::SUCCESS;
-   }
-
-   return AthAlgTool::queryInterface( riid, ppvIf );
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 
 StatusCode HelloTool::saySomething()
 {
-  ATH_MSG_INFO ("my message to the world: " << m_myMessage);
+  ATH_MSG_INFO ("my message to the world: " << (std::string)m_myMessage);
 
    return StatusCode::SUCCESS;
 }
diff --git a/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.h b/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.h
index 14c2191620afb9c6df62cd60085068e7190e4969..59bec62db4d9cf40043a8fa70b3b942e22939393 100755
--- a/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.h
+++ b/Control/AthenaExamples/AthExHelloWorld/src/HelloTool.h
@@ -10,18 +10,16 @@
 
 #include <string>
 
-class HelloTool : virtual public IHelloTool, virtual public AthAlgTool {
+class HelloTool : public extends<AthAlgTool, IHelloTool> {
 public:
    HelloTool( const std::string&, const std::string&, const IInterface* );
 
-// to allow access to the IHelloTool interface
-   StatusCode queryInterface( const InterfaceID& riid, void** ppvIf );
-
 // the magic method this tool provides
    virtual StatusCode saySomething();
 
 private:
-   std::string m_myMessage;
+  Gaudi::Property<std::string> m_myMessage {this, "MyMessage", 
+      "Default message set in HelloTool.h", "something to say"};
 };
 
 #endif
diff --git a/Control/AthenaExamples/AthExHelloWorld/src/components/AthExHelloWorld_entries.cxx b/Control/AthenaExamples/AthExHelloWorld/src/components/AthExHelloWorld_entries.cxx
index 69b515ac8c509b3ffee96247f71cbe38a7f5bcb9..d237ee9c83de95410977bf50dc691d1d37d3e8df 100755
--- a/Control/AthenaExamples/AthExHelloWorld/src/components/AthExHelloWorld_entries.cxx
+++ b/Control/AthenaExamples/AthExHelloWorld/src/components/AthExHelloWorld_entries.cxx
@@ -1,12 +1,5 @@
 #include "../HelloAlg.h"
 #include "../HelloTool.h"
 
-#include "GaudiKernel/DeclareFactoryEntries.h"
-
 DECLARE_ALGORITHM_FACTORY( HelloAlg )
 DECLARE_TOOL_FACTORY( HelloTool )
-
-DECLARE_FACTORY_ENTRIES(AthExHelloWorld) {
-    DECLARE_ALGORITHM( HelloAlg )
-    DECLARE_TOOL( HelloTool )
-}
diff --git a/Control/AthenaExamples/AthExHistNtup/cmt/requirements b/Control/AthenaExamples/AthExHistNtup/cmt/requirements
deleted file mode 100755
index b03f36a96cad0d88fc0f6a15547a23800c407e11..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/AthExHistNtup/cmt/requirements
+++ /dev/null
@@ -1,15 +0,0 @@
-package AthExHistNtup
-author Paolo Calafiura <Paolo.Calafiura@cern.ch>
-
-use AtlasPolicy        AtlasPolicy-*
-use AtlasROOT 	       AtlasROOT-* 		External
-
-private
-use AthenaBaseComps    AthenaBaseComps-*	Control
-use GaudiInterface     GaudiInterface-* 	External
-use xAODEventInfo      xAODEventInfo-* 		Event/xAOD
-end_private
-
-library AthExHistNtup *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_joboptions files="HistNtupOptions.txt HistNtupOptions.py"
diff --git a/Control/AthenaExamples/AthExHive/share/AthExHiveOpts.py b/Control/AthenaExamples/AthExHive/share/AthExHiveOpts.py
index d7583798824e66d34fff0b8ee4b9fc2b366a4d74..bae7dd4737b6992bc91ac02791ecb5a5e7222638 100644
--- a/Control/AthenaExamples/AthExHive/share/AthExHiveOpts.py
+++ b/Control/AthenaExamples/AthExHive/share/AthExHiveOpts.py
@@ -63,14 +63,15 @@ topSequence+=SGInputLoader(OutputLevel=INFO, ShowEventDump=False)
 from AthExHive.AthExHiveConf import *
 topSequence+=HiveAlgA(OutputLevel=DEBUG,Time=20)
 topSequence+=HiveAlgB(OutputLevel=DEBUG,Time=10)
-topSequence+=HiveAlgC(OutputLevel=DEBUG,Time=190)
+topSequence+=HiveAlgC(OutputLevel=DEBUG,Time=190, Key_W1="C1")
 topSequence+=HiveAlgD(OutputLevel=DEBUG,Time=10)
-topSequence+=HiveAlgE(OutputLevel=DEBUG,Time=30)
+topSequence+=HiveAlgE(OutputLevel=DEBUG,Time=30, Key_R1="C1")
 topSequence+=HiveAlgG(OutputLevel=DEBUG,Time=10)
 topSequence+=HiveAlgF(OutputLevel=DEBUG,Time=30)
 
 topSequence+=HiveAlgV(OutputLevel=DEBUG,Time=30)
-topSequence.HiveAlgV.Key_RV = [ "a1", "a2", "d1", "e1", "c1" ]
+topSequence.HiveAlgV.Key_RV = [ "a1", "a2", "d1", "e1", "C1" ]
+topSequence.HiveAlgV.Key_WV = [ "V1", "V2", "V3" ]
 
 #--------------------------------------------------------------
 # Event related parameters
diff --git a/Control/AthenaExamples/AthExHive/src/AlgA.cxx b/Control/AthenaExamples/AthExHive/src/AlgA.cxx
index 2d502ee6f05b1eacbe18ead00ac99ee9a75a8718..50e8a53575639024cc4095d742bc2f3503536234 100644
--- a/Control/AthenaExamples/AthExHive/src/AlgA.cxx
+++ b/Control/AthenaExamples/AthExHive/src/AlgA.cxx
@@ -17,18 +17,8 @@
 
 AlgA::AlgA( const std::string& name, 
 		    ISvcLocator* pSvcLocator ) : 
-  ::AthAlgorithm( name, pSvcLocator ),
-  m_wrh1("a1"),
-  m_wrh2("a2"),
-  m_evt("McEventInfo")
+  ::AthAlgorithm( name, pSvcLocator ), m_i(1)
 {
-  
-  declareProperty("Key_W1",m_wrh1);
-  declareProperty("Key_W2",m_wrh2);  
-  declareProperty("EvtInfo", m_evt);
-  
-  m_i = 1;
-
 }
 
 //---------------------------------------------------------------------------
diff --git a/Control/AthenaExamples/AthExHive/src/AlgA.h b/Control/AthenaExamples/AthExHive/src/AlgA.h
index bfad42b1f6d639e6da8b7ed11705e35cc3ed1084..360f41542c11b22400db06ccb78ec33a15d44849 100644
--- a/Control/AthenaExamples/AthExHive/src/AlgA.h
+++ b/Control/AthenaExamples/AthExHive/src/AlgA.h
@@ -29,9 +29,10 @@ public:
   
 private:
 
-  SG::WriteHandleKey<HiveDataObj> m_wrh1;
-  SG::WriteHandleKey<HiveDataObj> m_wrh2;
-  SG::ReadHandleKey<EventInfo> m_evt;
+  SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "a1", "write key 1"};
+  SG::WriteHandleKey<HiveDataObj> m_wrh2 {this, "Key_W2", "a2", "write key 2"};
+  SG::ReadHandleKey<EventInfo>    m_evt  {this, "EvtInfo", "McEventInfo", 
+      "EventInfo name"};
 
   std::atomic<int> m_i {1};
   
diff --git a/Control/AthenaExamples/AthExHive/src/AlgB.cxx b/Control/AthenaExamples/AthExHive/src/AlgB.cxx
index 8049a018a116f1adac3f07cacf55fb7cf47557bc..1da272aef06579818cdd7d51109d9494bf2d1d34 100644
--- a/Control/AthenaExamples/AthExHive/src/AlgB.cxx
+++ b/Control/AthenaExamples/AthExHive/src/AlgB.cxx
@@ -12,14 +12,8 @@
 
 AlgB::AlgB( const std::string& name, 
             ISvcLocator* pSvcLocator ) : 
-  ::AthAlgorithm( name, pSvcLocator ),
-  m_rdh1("a1"),
-  m_wrh1("a3")
+  ::AthAlgorithm( name, pSvcLocator )
 {
-  
-  declareProperty("Key_R1",m_rdh1);
-  declareProperty("Key_W1",m_wrh1);
-
 }
 
 AlgB::~AlgB() {}
diff --git a/Control/AthenaExamples/AthExHive/src/AlgB.h b/Control/AthenaExamples/AthExHive/src/AlgB.h
index aa5bd6839c054a02f42a00c8163f310083e2ea86..2b26ba4f2c673b2395dbef94a58f8a75f6bdbc8a 100644
--- a/Control/AthenaExamples/AthExHive/src/AlgB.h
+++ b/Control/AthenaExamples/AthExHive/src/AlgB.h
@@ -27,8 +27,8 @@ public:
   
 private:
   
-  SG::ReadHandleKey<HiveDataObj>  m_rdh1;
-  SG::WriteHandleKey<HiveDataObj> m_wrh1;
+  SG::ReadHandleKey<HiveDataObj>  m_rdh1 {this, "Key_R1", "a1", "read key 1"};
+  SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "a3", "write key 1"};
   
 };
 #endif
diff --git a/Control/AthenaExamples/AthExHive/src/AlgC.cxx b/Control/AthenaExamples/AthExHive/src/AlgC.cxx
index 239d679cacf26646e3db91169ca8eee88abee5d9..5b2023ef49ec0906bab2199c6c4fa95b1fd2fd32 100644
--- a/Control/AthenaExamples/AthExHive/src/AlgC.cxx
+++ b/Control/AthenaExamples/AthExHive/src/AlgC.cxx
@@ -16,13 +16,14 @@
 
 AlgC::AlgC( const std::string& name, 
             ISvcLocator* pSvcLocator ) : 
-  ::AthAlgorithm( name, pSvcLocator ),
-  m_rdh1("a2"),
-  m_rch("X1")
+  ::AthAlgorithm( name, pSvcLocator )
+// ,
+//   m_rdh1("a2"),
+//   m_rch("X1")
 {
   
-  declareProperty("Key_R1",m_rdh1);
-  declareProperty("Key_CH", m_rch);
+  // declareProperty("Key_R1",m_rdh1);
+  // declareProperty("Key_CH", m_rch);
 
 }
 
diff --git a/Control/AthenaExamples/AthExHive/src/AlgC.h b/Control/AthenaExamples/AthExHive/src/AlgC.h
index 85ed51bca4a812b30efe6ecf29e62236d8cb8230..2417ec5c42f2cf9ec2ec9dc7eed1434c406eefcc 100644
--- a/Control/AthenaExamples/AthExHive/src/AlgC.h
+++ b/Control/AthenaExamples/AthExHive/src/AlgC.h
@@ -29,9 +29,9 @@ public:
   
 private:
   
-  SG::ReadHandleKey<HiveDataObj> m_rdh1;
+  SG::ReadHandleKey<HiveDataObj> m_rdh1 {this, "Key_R1", "a2", "read key 1"};
   
-  SG::ReadCondHandleKey<CondDataObj> m_rch;
+  SG::ReadCondHandleKey<CondDataObj> m_rch {this, "Key_CH", "X1", "cond read key"};
 
 };
 #endif
diff --git a/Control/AthenaExamples/AthExHive/src/AlgD.cxx b/Control/AthenaExamples/AthExHive/src/AlgD.cxx
index 6c6e8743bda7e1a40849f4844c99dc4915aa4b00..ece456bde65d691f762b4b3fa3053b70017353f1 100644
--- a/Control/AthenaExamples/AthExHive/src/AlgD.cxx
+++ b/Control/AthenaExamples/AthExHive/src/AlgD.cxx
@@ -16,16 +16,8 @@
 
 AlgD::AlgD( const std::string& name, 
             ISvcLocator* pSvcLocator ) : 
-  ::AthAlgorithm( name, pSvcLocator ),
-  m_rdh1("a1"),
-  m_rch1("X1"),
-  m_rch2("X2")
+  ::AthAlgorithm( name, pSvcLocator )
 {
-  
-  declareProperty("Key_R1",m_rdh1);
-  declareProperty("Key_CH1",m_rch1);
-  declareProperty("Key_CH2",m_rch2);
-
 }
 
 //---------------------------------------------------------------------------
diff --git a/Control/AthenaExamples/AthExHive/src/AlgD.h b/Control/AthenaExamples/AthExHive/src/AlgD.h
index 8792123132d65846ca89558bba030e1439dde9ec..a0cd1d03d203ba0182111a189c90808d5f158664 100644
--- a/Control/AthenaExamples/AthExHive/src/AlgD.h
+++ b/Control/AthenaExamples/AthExHive/src/AlgD.h
@@ -29,10 +29,10 @@ public:
   
 private:
   
-  SG::ReadHandleKey<HiveDataObj> m_rdh1;
+  SG::ReadHandleKey<HiveDataObj> m_rdh1 {this, "Key_R1", "a1", "read key 1"};
   
-  SG::ReadCondHandleKey<CondDataObj> m_rch1;
-  SG::ReadCondHandleKey<CondDataObj> m_rch2;
+  SG::ReadCondHandleKey<CondDataObj> m_rch1 {this, "Key_CH1", "X1", "cond read key1"};
+  SG::ReadCondHandleKey<CondDataObj> m_rch2 {this, "Key_CH2", "X2", "cond read key2"};
 
 };
 #endif
diff --git a/Control/AthenaExamples/AthExHive/src/CondAlgX.cxx b/Control/AthenaExamples/AthExHive/src/CondAlgX.cxx
index d0353b248e03115ef5ff21e07e1f1b9634999206..ecfe2ea94d60262f3023e7b58e778ecd22202255 100644
--- a/Control/AthenaExamples/AthExHive/src/CondAlgX.cxx
+++ b/Control/AthenaExamples/AthExHive/src/CondAlgX.cxx
@@ -22,16 +22,9 @@
 CondAlgX::CondAlgX( const std::string& name, 
             ISvcLocator* pSvcLocator ) : 
   ::AthAlgorithm( name, pSvcLocator ),
-  m_evt("McEventInfo"),
-  m_wchk("X2","X2"),
   m_cs("CondSvc",name),
   m_cds("ASCIICondDbSvc",name)
 {
-  
-  declareProperty("EvtInfo", m_evt);
-  declareProperty("Key_CH", m_wchk);
-  declareProperty("Key_DB", m_dbKey);
-
 }
 
 CondAlgX::~CondAlgX() {}
@@ -39,6 +32,8 @@ CondAlgX::~CondAlgX() {}
 StatusCode CondAlgX::initialize() {
   ATH_MSG_DEBUG("initialize " << name());
 
+  ATH_CHECK( m_evt.initialize() );
+
   if (m_cs.retrieve().isFailure()) {
     ATH_MSG_ERROR("unable to retrieve CondSvc");
   }
@@ -71,20 +66,21 @@ StatusCode CondAlgX::finalize() {
 StatusCode CondAlgX::execute() {
   ATH_MSG_DEBUG("execute " << name());
 
-  if (!m_evt.isValid()) {
+  SG::ReadHandle<EventInfo> evt( m_evt );
+  if (!evt.isValid()) {
     ATH_MSG_ERROR ("Could not retrieve EventInfo");
     return StatusCode::FAILURE;
   }
 
-  ATH_MSG_DEBUG("   EventInfo:  r: " << m_evt->event_ID()->run_number()
-                << " e: " << m_evt->event_ID()->event_number() );
+  ATH_MSG_DEBUG("   EventInfo:  r: " << evt->event_ID()->run_number()
+                << " e: " << evt->event_ID()->event_number() );
 
 
   SG::WriteCondHandle<CondDataObj> wch(m_wchk);
 
   EventIDBase now(getContext().eventID());
 
-  if (m_evt->event_ID()->event_number() == 10) {
+  if (evt->event_ID()->event_number() == 10) {
       std::this_thread::sleep_for(std::chrono::milliseconds( 500 ));
   }
 
diff --git a/Control/AthenaExamples/AthExHive/src/CondAlgX.h b/Control/AthenaExamples/AthExHive/src/CondAlgX.h
index a9d716572e9aac9b4e6eae75f1a15b9d79dd6c76..828956fa5896094aea4b90127b1971b1af7af3be 100644
--- a/Control/AthenaExamples/AthExHive/src/CondAlgX.h
+++ b/Control/AthenaExamples/AthExHive/src/CondAlgX.h
@@ -32,14 +32,15 @@ public:
   
 private:
   
-  SG::ReadHandle<EventInfo> m_evt;
+  SG::ReadHandleKey<EventInfo> m_evt {this,"EvtInfo", "McEventInfo", "EventInfo name"};
 
-  SG::WriteCondHandleKey<CondDataObj> m_wchk;
+  SG::WriteCondHandleKey<CondDataObj> m_wchk {this, "Key_CH", "X2", "cond handle key"};
+
+  Gaudi::Property<std::string> m_dbKey {this, "Key_DB", "X2", "explicit dbKey for cond handle"};
 
   ServiceHandle<ICondSvc> m_cs;
   ServiceHandle<IASCIICondDbSvc> m_cds;
 
-  std::string m_dbKey;
 
 };
 
diff --git a/Control/AthenaExamples/AthExHive/src/CondAlgY.cxx b/Control/AthenaExamples/AthExHive/src/CondAlgY.cxx
index f4ce295159eac8990ba33d1d1eea4d6e64dc8a5c..49b0456cab7adfe1fe07bae164a801a91f58ed6e 100644
--- a/Control/AthenaExamples/AthExHive/src/CondAlgY.cxx
+++ b/Control/AthenaExamples/AthExHive/src/CondAlgY.cxx
@@ -18,18 +18,9 @@
 CondAlgY::CondAlgY( const std::string& name, 
             ISvcLocator* pSvcLocator ) : 
   ::AthAlgorithm( name, pSvcLocator ),
-  m_wch1("Y1","Y1"),  m_wch2("Y2","Y2"),
-  m_dbk1("Y1"),  m_dbk2("Y2"),
   m_cs("CondSvc",name),
   m_cds("ASCIICondDbSvc",name)
 {
-  
-  declareProperty("Key_CH1", m_wch1);
-  declareProperty("Key_CH2", m_wch2);
-
-  declareProperty("Key_DB1", m_dbk1);
-  declareProperty("Key_DB2", m_dbk2);
-
 }
 
 CondAlgY::~CondAlgY() {}
diff --git a/Control/AthenaExamples/AthExHive/src/CondAlgY.h b/Control/AthenaExamples/AthExHive/src/CondAlgY.h
index 16d7f80f5c7768adf08e5e93589c6cc8db79d88b..23d744fdc8e9780927d35f83b2d1a5830e35b4ca 100644
--- a/Control/AthenaExamples/AthExHive/src/CondAlgY.h
+++ b/Control/AthenaExamples/AthExHive/src/CondAlgY.h
@@ -32,8 +32,11 @@ public:
   
 private:
   
-  SG::WriteCondHandleKey<CondDataObjY> m_wch1, m_wch2;
-  std::string m_dbk1, m_dbk2;
+  SG::WriteCondHandleKey<CondDataObjY> m_wch1 {this, "Key_CH1", "Y1", "cond handle key 1"};
+  SG::WriteCondHandleKey<CondDataObjY> m_wch2 {this, "Key_CH2", "Y2", "cond handle key 2"};
+
+  Gaudi::Property<std::string> m_dbk1 {this, "Key_DB1", "Y1", "explicit dbKey for cond handle 1"};
+  Gaudi::Property<std::string> m_dbk2 {this, "Key_DB2", "Y2", "explicit dbKey for cond handle 2"};
 
   ServiceHandle<ICondSvc> m_cs;
   ServiceHandle<IASCIICondDbSvc> m_cds;
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgA.cxx b/Control/AthenaExamples/AthExHive/src/HiveAlgA.cxx
index 9abae8471666b512924be03a9e511d76ce9d20ba..9cb14cfa9e5eeea76919d21e7093025470378304 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgA.cxx
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgA.cxx
@@ -14,18 +14,8 @@
 
 HiveAlgA::HiveAlgA( const std::string& name, 
 		    ISvcLocator* pSvcLocator ) : 
-  ::HiveAlgBase( name, pSvcLocator ),
-  m_evt("McEventInfo"),
-  m_wrh1("a1"),
-  m_wrh2("a2")
+  ::HiveAlgBase( name, pSvcLocator ), m_i(1)
 {
-  
-  declareProperty("Key_W1",m_wrh1);
-  declareProperty("Key_W2",m_wrh2);  
-  declareProperty("EvtInfo", m_evt);
-  
-  m_i = 1;
-
 }
 
 HiveAlgA::~HiveAlgA() {}
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgA.h b/Control/AthenaExamples/AthExHive/src/HiveAlgA.h
index 5460cc27fa7c854d1652bab1a3606b86bf5fda79..808f113b0d418a0e1f861faea072ebeb57b04dd6 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgA.h
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgA.h
@@ -31,10 +31,10 @@ public:
   
 private:
 
-  SG::ReadHandleKey<EventInfo> m_evt;
+  SG::ReadHandleKey<EventInfo> m_evt {this,"EvtInfo", "McEventInfo", "EventInfo name"};
 
-  SG::WriteHandleKey<HiveDataObj> m_wrh1;
-  SG::WriteHandleKey<HiveDataObj> m_wrh2;
+  SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "a1", "WHK 1"};
+  SG::WriteHandleKey<HiveDataObj> m_wrh2 {this, "Key_W2", "a2", "WHK 2"};
 
   std::atomic<int> m_i;
   
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgB.cxx b/Control/AthenaExamples/AthExHive/src/HiveAlgB.cxx
index 71fdc1f02401d18e8a534188a64ed82a3d1c97bd..9be9772db432ed85160559c7641f805bc44af95e 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgB.cxx
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgB.cxx
@@ -10,12 +10,8 @@
 HiveAlgB::HiveAlgB( const std::string& name, 
                       ISvcLocator* pSvcLocator ) : 
   HiveAlgBase( name, pSvcLocator ),
-  m_wrh1("b1"),
   m_di(0)
 {
-
-  declareProperty("Key_W1",m_wrh1);
-
 }
 
 HiveAlgB::~HiveAlgB() {}
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgB.h b/Control/AthenaExamples/AthExHive/src/HiveAlgB.h
index 83f5840bb2803e88170e860f5c50c36718eb5dc9..e831fb935f6bd9e8fdda36b259c5a85208ab6c36 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgB.h
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgB.h
@@ -33,7 +33,7 @@ private:
   
   void dump();
 
-  SG::WriteHandleKey<HiveDataObj> m_wrh1;
+  SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "b1", "WHK 1"};
 
   Gaudi::Hive::ContextSpecificData<int> m_di;
 
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgC.cxx b/Control/AthenaExamples/AthExHive/src/HiveAlgC.cxx
index 967ee6ba388977899afabef59c461b443cf7274d..1dbb23628fe5c27dec930a26bc3084a170965628 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgC.cxx
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgC.cxx
@@ -19,9 +19,9 @@ HiveAlgC::~HiveAlgC() {}
 StatusCode HiveAlgC::initialize() {
   ATH_MSG_DEBUG("initialize " << name());
 
-  ATH_CHECK( m_rdh1.value().initialize() );
-  ATH_CHECK( m_wrh1.value().initialize() );
-  ATH_CHECK( m_wrh2.value().initialize() );
+  ATH_CHECK( m_rdh1.initialize() );
+  ATH_CHECK( m_wrh1.initialize() );
+  ATH_CHECK( m_wrh2.initialize() );
 
   return HiveAlgBase::initialize();
 }
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgC.h b/Control/AthenaExamples/AthExHive/src/HiveAlgC.h
index 2b843dec6470cb20c1209a79926e74c32d57ad9b..849ba4cc62107ea96ee96929eac28f23aa45f5f0 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgC.h
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgC.h
@@ -30,9 +30,9 @@ public:
   
 private:
   
-  Gaudi::Property< SG::ReadHandleKey<HiveDataObj> > m_rdh1 {this, "Key_R1", "a1", "read handle key 1"};
-  Gaudi::Property< SG::WriteHandleKey<HiveDataObj> > m_wrh1{ this, "Key_W1", "c1", "write handle key 1"};
-  Gaudi::Property< SG::WriteHandleKey<HiveDataObj> > m_wrh2{ this, "Key_W2", "c2", "write handle key 2"};
+  SG::ReadHandleKey<HiveDataObj>  m_rdh1 {this, "Key_R1", "a1", "read handle key 1"};
+  SG::WriteHandleKey<HiveDataObj> m_wrh1{ this, "Key_W1", "c1", "write handle key 1"};
+  SG::WriteHandleKey<HiveDataObj> m_wrh2{ this, "Key_W2", "c2", "write handle key 2"};
   
 };
 #endif
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgD.cxx b/Control/AthenaExamples/AthExHive/src/HiveAlgD.cxx
index 6322514f0e1e1d9940426a15a20c5a78b4d85989..89e663b1ae65827714d4c4b20f61fe4cb39e9b16 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgD.cxx
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgD.cxx
@@ -9,14 +9,8 @@
 
 HiveAlgD::HiveAlgD( const std::string& name, 
                       ISvcLocator* pSvcLocator ) : 
-  ::HiveAlgBase( name, pSvcLocator ),
-  m_rdh1("a2"),
-  m_wrh1("d1")
+  ::HiveAlgBase( name, pSvcLocator )
 {
-  
-  declareProperty("Key_R1",m_rdh1);
-  declareProperty("Key_W1",m_wrh1);
-
 }
 
 HiveAlgD::~HiveAlgD() {}
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgD.h b/Control/AthenaExamples/AthExHive/src/HiveAlgD.h
index ce7dc72ad95c5ff82b55d67c23f9da286b194f88..07022f431d35a3a280540ef505ab849d4bf1ee58 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgD.h
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgD.h
@@ -29,10 +29,8 @@ public:
   
 private:
   
-  SG::ReadHandleKey<HiveDataObj> m_rdh1;
-  SG::WriteHandleKey<HiveDataObj> m_wrh1;
+  SG::ReadHandleKey<HiveDataObj>  m_rdh1 {this, "Key_R1", "a2", "Read key 1"};
+  SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "d1", "Write key 1"};
 
-   
-  
 };
 #endif
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgE.cxx b/Control/AthenaExamples/AthExHive/src/HiveAlgE.cxx
index d36bf928667ba6ba28fc6c68e207d2f336d35edf..93b9c95408cec0162e9c7778b3552e7787bac944 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgE.cxx
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgE.cxx
@@ -9,16 +9,8 @@
 
 HiveAlgE::HiveAlgE( const std::string& name, 
                       ISvcLocator* pSvcLocator ) : 
-  ::HiveAlgBase( name, pSvcLocator ),
-  m_rdh1("c1"),
-  m_rdh2("b1"),
-  m_wrh1("e1")
+  ::HiveAlgBase( name, pSvcLocator )
 {
-
-  declareProperty("Key_R1",m_rdh1);
-  declareProperty("Key_R2",m_rdh2);
-  declareProperty("Key_W1",m_wrh1);
-
 }
 
 HiveAlgE::~HiveAlgE() {}
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgE.h b/Control/AthenaExamples/AthExHive/src/HiveAlgE.h
index 11ebb2422632dae55f587d24c25131136bd8736c..fb8c53ecc77c1963171add194dcb1bec0df34141 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgE.h
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgE.h
@@ -30,11 +30,9 @@ public:
   
 private:
   
-  SG::ReadHandleKey<HiveDataObj> m_rdh1;
-  SG::ReadHandleKey<HiveDataObj> m_rdh2;
-  SG::WriteHandleKey<HiveDataObj> m_wrh1;
-
-   
+  SG::ReadHandleKey<HiveDataObj>  m_rdh1 {this, "Key_R1", "c1", "Read key 1"};
+  SG::ReadHandleKey<HiveDataObj>  m_rdh2 {this, "Key_R2", "b1", "Read key 2"};
+  SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "e1", "Write key 1"};
   
 };
 #endif
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgF.cxx b/Control/AthenaExamples/AthExHive/src/HiveAlgF.cxx
index 063a6835808a1aa8e080b79b3de9757fb94c629f..53220a0f029600c854a93fe0c80aae403295cce7 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgF.cxx
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgF.cxx
@@ -9,16 +9,8 @@
 
 HiveAlgF::HiveAlgF( const std::string& name, 
                       ISvcLocator* pSvcLocator ) : 
-  ::HiveAlgBase( name, pSvcLocator ),
-  m_rdh1("c2"),
-  m_rdh2("e1"),
-  m_rdh3("d1")
+  ::HiveAlgBase( name, pSvcLocator )
 {
-  
-  declareProperty("Key_R1",m_rdh1);
-  declareProperty("Key_R2",m_rdh2);
-  declareProperty("Key_R3",m_rdh3);
-
 }
 
 HiveAlgF::~HiveAlgF() {}
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgF.h b/Control/AthenaExamples/AthExHive/src/HiveAlgF.h
index c53554415dbae58bc9e51504ebdc7a78d419aa72..cc1d79ec83c0ff80ac9939fee3a3ad42847741d5 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgF.h
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgF.h
@@ -29,11 +29,9 @@ public:
   
 private:
   
-  SG::ReadHandleKey<HiveDataObj> m_rdh1;
-  SG::ReadHandleKey<HiveDataObj> m_rdh2;
-  SG::ReadHandleKey<HiveDataObj> m_rdh3;
-
-   
+  SG::ReadHandleKey<HiveDataObj> m_rdh1{this, "Key_R1", "c2", "Read key 1"};
+  SG::ReadHandleKey<HiveDataObj> m_rdh2{this, "Key_R2", "e1", "Read key 2"};
+  SG::ReadHandleKey<HiveDataObj> m_rdh3{this, "Key_R3", "d1", "Read key 3"};
   
 };
 #endif
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgG.cxx b/Control/AthenaExamples/AthExHive/src/HiveAlgG.cxx
index 4c308768a1ef7e08a68558d9826ef7082b20ab23..05b5d8a0202503b91a51a9d76e2e720edbd8f201 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgG.cxx
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgG.cxx
@@ -9,14 +9,8 @@
 
 HiveAlgG::HiveAlgG( const std::string& name, 
                       ISvcLocator* pSvcLocator ) : 
-  ::HiveAlgBase( name, pSvcLocator ),
-  m_rdh1("d1"),
-  m_wrh1("g1")
+  ::HiveAlgBase( name, pSvcLocator )
 {
-  
-  declareProperty("Key_R1",m_rdh1);
-  declareProperty("Key_W1",m_wrh1);
-
 }
 
 HiveAlgG::~HiveAlgG() {}
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgG.h b/Control/AthenaExamples/AthExHive/src/HiveAlgG.h
index 3c57a1c0674dba1cda9719c01307289ab5629e94..db496b7f5789dcdc8473dc288cdcd6e2e1587d97 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgG.h
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgG.h
@@ -30,8 +30,8 @@ public:
   
 private:
   
-  SG::ReadHandleKey<HiveDataObj> m_rdh1;
-  SG::WriteHandleKey<HiveDataObj> m_wrh1;
+  SG::ReadHandleKey<HiveDataObj>  m_rdh1 {this, "Key_R1", "d1", "Read key 1"};
+  SG::WriteHandleKey<HiveDataObj> m_wrh1 {this, "Key_W1", "g1", "Write key 1"};
 
    
   
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgV.cxx b/Control/AthenaExamples/AthExHive/src/HiveAlgV.cxx
index 90a34baadd5c5ce5bde0728c2b265613ea5fd93d..72cf1280c7e96e6282f038719f456b1bbacbc80c 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgV.cxx
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgV.cxx
@@ -13,8 +13,6 @@ HiveAlgV::HiveAlgV( const std::string& name,
   ::HiveAlgBase( name, pSvcLocator )
 {
   
-  declareProperty("Key_RV",m_rhv);
-  declareProperty("Key_WV",m_whv);
   declareProperty("WriteBeforeRead",m_writeFirst=true);
 
 }
@@ -27,8 +25,8 @@ StatusCode HiveAlgV::initialize() {
   ATH_CHECK( m_rhv.initialize() );
   ATH_CHECK( m_whv.initialize() );
 
-  ATH_MSG_INFO("ReadHandleKeyArray of size " << m_rhv.size());
-  ATH_MSG_INFO("WriteHandleKeyArray of size " << m_whv.size());
+  ATH_MSG_INFO(m_rhv.keys() << " : " << m_rhv.size());
+  ATH_MSG_INFO(m_whv.keys() << " : " << m_whv.size());
 
   return HiveAlgBase::initialize ();
 }
diff --git a/Control/AthenaExamples/AthExHive/src/HiveAlgV.h b/Control/AthenaExamples/AthExHive/src/HiveAlgV.h
index e8f7990b90494d6aea610ea7b024f59b71b4aa1f..48e6fee4a4bae2fa289aef0a9cfc54a3f1ba7460 100644
--- a/Control/AthenaExamples/AthExHive/src/HiveAlgV.h
+++ b/Control/AthenaExamples/AthExHive/src/HiveAlgV.h
@@ -32,8 +32,11 @@ private:
   
   bool m_writeFirst { true };
 
-  SG::ReadHandleKeyArray<HiveDataObj> m_rhv;
-  SG::WriteHandleKeyArray<HiveDataObj> m_whv;
+  SG::ReadHandleKeyArray<HiveDataObj> m_rhv {
+    this, "Key_RV", {"a1","a2","d1","e1","c1"},
+    "Array of ReadHandleKey<HiveDataObj>" };
+  SG::WriteHandleKeyArray<HiveDataObj> m_whv {
+    this, "Key_WV", {}, "Array of WriteHandleKey<HiveDataObj>" };
 
   StatusCode read() const;
   void write();
diff --git a/Control/AthenaExamples/AthExJobOptions/cmt/requirements b/Control/AthenaExamples/AthExJobOptions/cmt/requirements
deleted file mode 100755
index ab5281cab8248c19f06ca824cbbc702c40f86d39..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/AthExJobOptions/cmt/requirements
+++ /dev/null
@@ -1,38 +0,0 @@
-package AthExJobOptions
-author Wim Lavrijsen <WLavrijsen@lbl.gov>
-
-use AtlasPolicy          AtlasPolicy-* 
-use GaudiInterface       GaudiInterface-*    External
-
-use AthenaKernel         AthenaKernel-*      Control
-use AthenaBaseComps	 AthenaBaseComps-*   Control
-use CLIDSvc              CLIDSvc-*           Control
-
-library AthExJobOptions *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions \
-   files="*.py"
-
-apply_pattern declare_python_modules \
-   files="*.py"
-
-private
-use EventInfo            EventInfo-*         Event
-use StoreGate            StoreGate-*         Control
-apply_pattern install_runtime
-
-use TestTools      TestTools-*        AtlasTest -no_auto_imports 
-apply_pattern athenarun_test name="BasicJobOptions" \
-	      pre_script="../cmt/setup.sh"	\	      
-	      options="AthExJobOptions/AthExJobOptions_BasicJobOptions.py" \
-	      post_script="${TESTTOOLSROOT}/share/post.sh BasicJobOptions"
-apply_pattern athenarun_test name="CustomToolJobOptions" \
-	      pre_script="../cmt/setup.sh"	\	      
-	      options="AthExJobOptions/AthExJobOptions_CustomToolJobOptions.py" \
-	      post_script="${TESTTOOLSROOT}/share/post.sh CustomToolJobOptions"
-apply_pattern athenarun_test name="CustomTopAlgorithmJobOptions" \
-	      pre_script="../cmt/setup.sh"	\	      
-	      options="AthExJobOptions/AthExJobOptions_CustomTopAlgorithmJobOptions.py" \
-	      post_script="${TESTTOOLSROOT}/share/post.sh CustomTopAlgorithmJobOptions"
-
diff --git a/Control/AthenaExamples/AthExJobOptions/doc/packagedoc.h b/Control/AthenaExamples/AthExJobOptions/doc/packagedoc.h
index 1e2d298ad0f41fcfcdffa0666d00fe8dcff4d55f..6e52a82101e081ad63b26712aebbda9ef3937331 100644
--- a/Control/AthenaExamples/AthExJobOptions/doc/packagedoc.h
+++ b/Control/AthenaExamples/AthExJobOptions/doc/packagedoc.h
@@ -45,16 +45,6 @@ As well as the following helpers:
 
   - SomeData : a custom data class, instances of which can be put in, and read from, @c StoreGate
 
-@ref used_AthExJobOptions
 
-@ref requirements_AthExJobOptions
 
 */
-
-/**
-@page used_AthExJobOptions Used Packages
-*/
-
-/**
-@page requirements_AthExJobOptions Requirements
-*/
diff --git a/Control/AthenaExamples/AthExMonitored/CMakeLists.txt b/Control/AthenaExamples/AthExMonitored/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..f3077795e924f2f7064ea33bf6e78b01d44bd894
--- /dev/null
+++ b/Control/AthenaExamples/AthExMonitored/CMakeLists.txt
@@ -0,0 +1,25 @@
+################################################################################
+# Package: AthExMonitored
+################################################################################
+
+# Declare the package name:
+atlas_subdir( AthExMonitored )
+
+# Declare the package's dependencies:
+atlas_depends_on_subdirs( PUBLIC
+                          GaudiKernel
+                          PRIVATE
+                          Control/AthenaBaseComps
+                          Control/AthenaMonitoring
+                          TestPolicy )
+
+# Component(s) in the package:
+atlas_add_component( AthExMonitored
+                     src/*.cxx
+                     src/components/*.cxx
+                     LINK_LIBRARIES GaudiKernel AthenaBaseComps AthenaMonitoringLib)
+
+# Install files from the package:
+atlas_install_headers( AthExMonitored )
+atlas_install_joboptions( share/*.py )
+
diff --git a/Control/AthenaExamples/AthExMonitored/share/MonitoredOptions.py b/Control/AthenaExamples/AthExMonitored/share/MonitoredOptions.py
new file mode 100644
index 0000000000000000000000000000000000000000..e55b216521c531b1df51945eb8f72f7aaa63b402
--- /dev/null
+++ b/Control/AthenaExamples/AthExMonitored/share/MonitoredOptions.py
@@ -0,0 +1,31 @@
+from AthenaCommon.AppMgr import theApp
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+from AthenaCommon.AlgSequence import AlgSequence
+
+job = AlgSequence()
+
+from AthExMonitored.AthExMonitoredConf import MonitoredAlg
+job += MonitoredAlg('MonAlg')
+
+from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
+
+monTool = GenericMonitoringTool('MonTool')
+
+#monTool.HistPath = 'MyGroup/MySubDir'  # default is the parent name of MonTool
+monTool.Histograms = [defineHistogram( 'nTracks', path='EXPERT', type='TH1F', title='Counts',
+                                       xbins=10, xmin=0, xmax=10 ),
+                      defineHistogram( 'eta', path='EXPERT', type='TH1F', title='#eta;;Entries',
+                                       xbins=30, xmin=-3, xmax=3 ),
+                      defineHistogram( 'AbsPhi', path='EXPERT', type='TH1F', title='|#phi|;;Entries',
+                                       xbins=10, xmin=0, xmax=3.15 ),
+                      defineHistogram( 'eta,AbsPhi', path='EXPERT', type='TH2F', title='#eta vs #phi',
+                                       xbins=15, xmin=-3, xmax=3, ybins=15, ymin=0, ymax=3.15 ),
+                      defineHistogram( 'TIME_execute', path='EXPERT', type='TH1F', title='Time for execute',
+                                       xbins=100, xmin=0, xmax=100 ) ]
+
+job.MonAlg.MonTool = monTool
+
+from GaudiSvc.GaudiSvcConf import THistSvc
+svcMgr += THistSvc(Output = ["EXPERT DATAFILE='expert-monitoring.root', OPT='RECREATE'"])
+
+theApp.EvtMax = 10
diff --git a/Control/AthenaExamples/AthExMonitored/src/MonitoredAlg.cxx b/Control/AthenaExamples/AthExMonitored/src/MonitoredAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..5cfebe8faeddda5d463f458fa1021ad872877b3b
--- /dev/null
+++ b/Control/AthenaExamples/AthExMonitored/src/MonitoredAlg.cxx
@@ -0,0 +1,66 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "MonitoredAlg.h"
+
+#include <vector>
+#include <cmath>
+
+MonitoredAlg::MonitoredAlg(const std::string& name, ISvcLocator* pSvcLocator) :
+  AthAlgorithm(name, pSvcLocator)
+{
+}
+
+StatusCode MonitoredAlg::initialize()
+{
+  // Only try to retrieve the tool if one has been set
+  if (!m_monTool.empty()) CHECK(m_monTool.retrieve());
+
+  return StatusCode::SUCCESS;
+}
+
+/// Example class for monitoring
+class Track {
+public:
+  Track(double eta, double phi, double pt) : m_eta(eta), m_phi(phi), m_pt(pt) {}
+  double eta() const { return m_eta; }
+  double phi() const { return m_phi; }
+  double pt() const { return m_pt; }
+private:
+  double m_eta{0}, m_phi{0}, m_pt{0};
+};
+
+
+StatusCode MonitoredAlg::execute() 
+{
+  using namespace Monitored;   
+  std::vector<Track> tracks;
+
+  // In case you want to measure the execution time
+  auto timer = MonitoredTimer::declare("TIME_execute");
+
+  auto count = MonitoredScalar::declare<int>("nTracks", 0);  // explicit type
+
+  // Access via member
+  auto eta = MonitoredCollection::declare("eta", tracks, &Track::eta);
+
+  // Access via function/lambda
+  auto absphi = MonitoredCollection::declare("AbsPhi", tracks, []( const Track& t ) { return abs(t.phi()); });  
+
+  auto mon = MonitoredScope::declare(m_monTool, count, eta, absphi, timer);
+
+  count = 1 + (rand() % 10);   // random number of tracks
+
+  // Creating some random tracks
+  for (int i=0; i<count; ++i) {
+    tracks.push_back(Track(-3.0 + 6.0*rand()/static_cast<float>(RAND_MAX),
+                           -M_PI + 2*M_PI*rand()/static_cast<float>(RAND_MAX),
+                           100.0*rand()/static_cast<float>(RAND_MAX)));                     
+  }
+  
+  return StatusCode::SUCCESS;
+}
+
+
+
diff --git a/Control/AthenaExamples/AthExMonitored/src/MonitoredAlg.h b/Control/AthenaExamples/AthExMonitored/src/MonitoredAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..0760c17d7e414a0dc274f77df49f168c37b554cc
--- /dev/null
+++ b/Control/AthenaExamples/AthExMonitored/src/MonitoredAlg.h
@@ -0,0 +1,26 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef ATHEXMONITORED_MONITOREDALG_H
+#define ATHEXMONITORED_MONITOREDALG_H 1
+
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/Property.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaMonitoring/GenericMonitoringTool.h"
+
+#include <string>
+
+class MonitoredAlg : public AthAlgorithm {
+public:
+  MonitoredAlg( const std::string& name, ISvcLocator* pSvcLocator );
+  StatusCode initialize();
+  StatusCode execute();
+
+private:
+  ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
+};
+
+
+#endif
diff --git a/Control/AthenaExamples/AthExMonitored/src/components/AthExMonitored_entries.cxx b/Control/AthenaExamples/AthExMonitored/src/components/AthExMonitored_entries.cxx
new file mode 100755
index 0000000000000000000000000000000000000000..924cd264fa54666feaa285cd10b8cf61d6ba0e91
--- /dev/null
+++ b/Control/AthenaExamples/AthExMonitored/src/components/AthExMonitored_entries.cxx
@@ -0,0 +1,9 @@
+#include "../MonitoredAlg.h"
+
+#include "GaudiKernel/DeclareFactoryEntries.h"
+
+DECLARE_ALGORITHM_FACTORY( MonitoredAlg )
+
+DECLARE_FACTORY_ENTRIES(AthExMonitored) {
+    DECLARE_ALGORITHM( Monitored )
+}
diff --git a/Calorimeter/CaloParticleID/src/components/CaloParticleID_load.cxx b/Control/AthenaExamples/AthExMonitored/src/components/AthExMonitored_load.cxx
old mode 100644
new mode 100755
similarity index 53%
rename from Calorimeter/CaloParticleID/src/components/CaloParticleID_load.cxx
rename to Control/AthenaExamples/AthExMonitored/src/components/AthExMonitored_load.cxx
index aee19ff2acb379ad52fa28b02f904f3ce5798d19..6cceb513a32be473c2f8fe3734376157bc79b1e9
--- a/Calorimeter/CaloParticleID/src/components/CaloParticleID_load.cxx
+++ b/Control/AthenaExamples/AthExMonitored/src/components/AthExMonitored_load.cxx
@@ -1,2 +1,4 @@
 #include "GaudiKernel/LoadFactoryEntries.h"
-LOAD_FACTORY_ENTRIES( CaloParticleID )
+
+LOAD_FACTORY_ENTRIES(AthExMonitored)
+
diff --git a/Control/AthenaExamples/AthExRunExamples/cmt/requirements b/Control/AthenaExamples/AthExRunExamples/cmt/requirements
deleted file mode 100755
index ce6e38dc86be2ac25f318819c227308879039b01..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/AthExRunExamples/cmt/requirements
+++ /dev/null
@@ -1,38 +0,0 @@
-package AthExRunExamples
-
-author David Quarrie      <David.Quarrie@cern.ch>
-
-# This package sets up the runtime environment for the AthenaExample
-# packages
-
-include_path none
-
-#---------------------------------------------------------------------
-# This line is necessary to ensure that the Atlas policies and patterns
-# are enforced and available.
-use AtlasPolicy AtlasPolicy-*
-
-#---------------------------------------------------------------------
-# Setup the runtime environment for AthenaExample packages
-use AthExFortranAlgorithm AthExFortranAlgorithm-* Control/AthenaExamples -no_auto_imports
-use AthExHelloWorld       AthExHelloWorld-*       Control/AthenaExamples -no_auto_imports
-use AthExHistNtup         AthExHistNtup-*         Control/AthenaExamples -no_auto_imports
-use AthExStoreGateExample AthExStoreGateExample-* Control/AthenaExamples -no_auto_imports
-use ToyConversion         ToyConversion-*         Control/AthenaExamples -no_auto_imports
-
-#needed to setup env variables used by DetDescrCnvSvc
-####DRQ: Obsoleted 14-Apr-2005
-####use InDetMgrDetDescrCnv   InDetMgrDetDescrCnv-*   InnerDetector/InDetDetDescrCnv -no_auto_imports
-####use LArDetMgrDetDescrCnv  LArDetMgrDetDescrCnv-*  LArCalorimeter/LArCnv          -no_auto_imports
-####use MuonDetMgrDetDescrCnv MuonDetMgrDetDescrCnv-* MuonSpectrometer/MuonCnv       -no_auto_imports
-####use TileDetMgrDetDescrCnv TileDetMgrDetDescrCnv-* TileCalorimeter/TileSvc        -no_auto_imports
-
-#---------------------------------------------------------------------
-# Setup the runtime environment for minimal Athena-based applications
-use MinimalRunTime MinimalRunTime-* Control -no_auto_imports
-
-#---------------------------------------------------------------------
-# Setup the runtime configuration files for AthenaExamples
-apply_pattern install_runtime method=-symlink
-
-
diff --git a/Control/AthenaExamples/AthExRunHelloWorld/cmt/requirements b/Control/AthenaExamples/AthExRunHelloWorld/cmt/requirements
deleted file mode 100755
index 4689bac363f4c2bc6fa9d7497a87a4f27fc8a35c..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/AthExRunHelloWorld/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package AthExRunHelloWorld
-
-author Christian Arnault  <arnault@lal.in2p3.fr>
-author David Quarrie      <David.Quarrie@cern.ch>
-
-# This package sets up the runtime environment for the AthExHelloWorld
-# package
-
-include_path none
-
-#---------------------------------------------------------------------
-# This line is necessary to ensure that the Atlas policies and patterns
-# are enforced and available.
-use AtlasPolicy AtlasPolicy-*
-
-#---------------------------------------------------------------------
-# Setup the runtime environment for AthenaExample packages
-use AthExHelloWorld AthExHelloWorld-* Control/AthenaExamples -no_auto_imports
-
-#---------------------------------------------------------------------
-# Setup the runtime environment for minimal Athena-based applications
-use MinimalRunTime MinimalRunTime-* Control -no_auto_imports
-
-#---------------------------------------------------------------------
-# Setup the runtime configuration files for AthenaExamples
-apply_pattern install_runtime method=-symlink
-
-
diff --git a/Control/AthenaExamples/AthExStoreGateExample/cmt/requirements b/Control/AthenaExamples/AthExStoreGateExample/cmt/requirements
deleted file mode 100755
index 587bb8035c308f82ea250b3d9b442a3abb374875..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/AthExStoreGateExample/cmt/requirements
+++ /dev/null
@@ -1,86 +0,0 @@
-package AthExStoreGateExample
-
-author Paolo Calafiura <Paolo.Calafiura@cern.ch>
-author David Quarrie   <David.Quarrie@cern.ch>
-
-
-use AtlasPolicy        AtlasPolicy-*
-use AthenaKernel       AthenaKernel-*   	Control
-use SGTools            SGTools-*           	Control
-
-private
-use TestTools          TestTools-*              AtlasTest
-use AthLinks           AthLinks-*               Control
-use AthContainers      AthContainers-*          Control
-use CxxUtils           CxxUtils-*               Control
-use AthenaBaseComps    AthenaBaseComps-*	Control
-use EventInfo          EventInfo-*      	Event
-use GaudiInterface     GaudiInterface-*		External
-use PileUpTools        PileUpTools-*       	Control
-use StoreGate          StoreGate-*      	Control
-end_private
-
-library AthExStoreGateExample *.cxx -s=components *.cxx
-
-apply_pattern component_library
-#may also use the simpler "apply_pattern dual_use_library files=*.cxx" instead
-#of the two lines above but as there are no client packages using directly
-#AthStoreGateExample classes, "component_library" is more appropriate
-#details at http://www.cern.ch/Atlas/GROUPS/SOFTWARE/OO/architecture/General/Documentation/PackageStructure.txt
-
-apply_pattern declare_joboptions files="\
-  StoreGateExample_Gen_jobOptions.txt \
-  StoreGateExample_Gen_jobOptions.py \
-  StoreGateExample_Del_jobOptions.py \
-  StoreGateExample_Reentrant_jobOptions.py \
-  dflow_jobo.py \
-  StoreGateHiveExample.py \
-"
-
-library SGTutorialLib \
- ../Tutorial/LinkObj.cxx \
- ../Tutorial/SGRead.cxx \
- ../Tutorial/SGWrite.cxx
- 
-library SGTutorial ../Tutorial/SGTutorial_entries.cxx ../Tutorial/SGTutorial_load.cxx
-
-# commented out for 7.4.0
-# macro_append AthExStoreGateExample_libraries " SGTutorial SGTutorialLib " 
-
-apply_pattern static_use use=IdDictDetDescrCnv     container=DetectorDescription
-apply_pattern static_use use=InDetMgrDetDescrCnv   container=InnerDetector/InDetDetDescrCnv
-apply_pattern static_use use=LArDetMgrDetDescrCnv  container=LArCalorimeter/LArCnv
-apply_pattern static_use use=MuonDetMgrDetDescrCnv container=MuonSpectrometer/MuonCnv
-apply_pattern static_use use=TileDetMgrDetDescrCnv container=TileCalorimeter/TileSvc
-apply_pattern static_use use=ZebraTDRCnv           container=Event
-
-apply_pattern static_athena_app 
-
-#add support for make -jN
-macro_append SGTutorial_dependencies "SGTutorialLib"
-macro_append SGTutorialLib_dependencies " install_includes"
-
-# an example exercizing data-flow
-library AthExDFlow \
- -s=${AthExStoreGateExample_root}/src_dflow/ *.cxx \
- -s=${AthExStoreGateExample_root}/src_dflow/components *.cxx
-apply_pattern named_component_library library=AthExDFlow
-
-#
-# dictionary creation for bindings
-#
-
-private
-
-use AtlasReflex AtlasReflex-* External
-
-apply_pattern lcgdict dict=AthExStoreGateExample \
-   headerfiles="../AthExStoreGateExample/AthExStoreGateExampleDict.h" \
-   selectionfile=selection.xml
-
-macro_append SGTutorialLib_shlibflags "$(libraryshr_linkopts) $(cmt_installarea_linkopts) $(SGTutorial_use_linkopts)"
-macro SGTutorialLib_linkopts "-L$(bin) -lSGTutorialLib"
-macro SGTutorial_shlibflags "$(componentshr_linkopts) -L$(bin) -lSGTutorialLib $(SGTutoriallinkopts) $(use_linkopts)"
-
-apply_pattern optdebug_library name=SGTutorial
-apply_pattern optdebug_library name=SGTutorialLib
diff --git a/Control/AthenaExamples/AthExThinning/cmt/requirements b/Control/AthenaExamples/AthExThinning/cmt/requirements
deleted file mode 100644
index 8ba646b6fdd13667bab47714973e1fc9a17825cb..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/AthExThinning/cmt/requirements
+++ /dev/null
@@ -1,118 +0,0 @@
-package AthExThinning
-author  Sebastien Binet <binet@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## For Gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-
-## Put here your package dependencies...
-use AthenaKernel	AthenaKernel-*		Control
-# helping CMT to get the runtime right (so tests are run in a sane env.)
-use AthenaServices      AthenaServices-*   	Control -no_auto_imports
-use SGTools		SGTools-*		Control 
-use AthenaBaseComps	AthenaBaseComps-* 	Control
-use AthContainers	AthContainers-*		Control
-use AthLinks		AthLinks-*		Control
-use AthenaPython	AthenaPython-*		Control -no_auto_imports
-
-##
-
-## persistency uses
-use DataModelAthenaPool         DataModelAthenaPool-*        Control
-
-use AthenaPoolUtilities         AthenaPoolUtilities-*        Database/AthenaPOOL
-##
-
-private
-use AtlasCLHEP		AtlasCLHEP-*		External
-use StoreGate		StoreGate-*		Control
-use AthenaPoolCnvSvc    AthenaPoolCnvSvc-*      Database/AthenaPOOL
-end_private
-
-branches AthExThinning src src_lib src_lib/components doc python share test
-
-## install some runtime files
-apply_pattern declare_joboptions \
-  files="*.py -s=$(AthExThinning_root)/test *.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_runtime extras="-s=$(AthExThinning_root)/test *.ref"
-
-library AthExThinningEvent -s=${AthExThinning_root}/src_lib \
- AthExIParticle.cxx \
- AthExIParticles.cxx \
- AthExParticle.cxx \
- AthExParticles.cxx \
- AthExElephantino.cxx \
- AthExDecay.cxx \
- AthExFatObject.cxx \
- AthExFatObjectSlimmer.cxx \
- AthExElephantino_p1.cxx \
- AthExDecay_p1.cxx \
- AthExParticles_p1.cxx \
- AthExFatObject_p1.cxx
-
-library AthExThinningAlgs -s=${AthExThinning_root}/src_lib \
- CreateData.cxx \
- WriteThinnedData.cxx \
- ReadThinnedData.cxx \
- SlimmerAlg.cxx \
- -s=${AthExThinning_root}/src_lib/components *.cxx
-
-## install AthExThinningEvent
-apply_pattern named_installed_library library="AthExThinningEvent"
-
-## install AthExThinningAlgs
-apply_pattern named_component_library library="AthExThinningAlgs"
-macro_append AthExThinningAlgs_shlibflags "$(AthExThinning_linkopts) -lAthExThinningEvent "
-
-## forcing dependencies
-macro_append AthExThinningAlgs_dependencies " AthExThinningEvent "
-macro_append AthExThinningPoolCnvGen_dependencies " AthExThinningEvent "
-# I don't think that the following is needed. RDS 11/2008:
-#macro_append AthExThinningPoolCnvGen_dependencies " AthExThinningEventDict "
-
-####################################################
-############ Persistency gory details ##############
-####################################################
-
-private
-use AtlasReflex      AtlasReflex-*      External -no_auto_imports
-
-macro elemLinks_ThinningEvent ""
-macro_append elemLinks_ThinningEvent " AthExParticles"
-macro_append elemLinks_ThinningEvent " AthExIParticles"
-
-apply_pattern lcgdict dict=AthExThinningEvent \
-        selectionfile=selection.xml \
-        elementLinks=$(elemLinks_ThinningEvent) \
-	headerfiles=" ../AthExThinning/AthExThinningEventDict.h"
-macro_append AthExThinningEventDict_shlibflags " $(AthExThinning_linkopts) -lAthExThinningEvent "
-end_private
-
-#
-# List of containers for which we want to generate an AthenaPool converter
-#
-macro TEvtAthenaPool_poolcnv ""
-macro_append TEvtAthenaPool_poolcnv "-s=${AthExThinning_root}/AthExThinning "
-macro_append TEvtAthenaPool_poolcnv "AthExParticles.h "
-macro_append TEvtAthenaPool_poolcnv "AthExIParticles.h "
-macro_append TEvtAthenaPool_poolcnv "AthExDecay.h "
-macro_append TEvtAthenaPool_poolcnv "AthExElephantino.h "
-macro_append TEvtAthenaPool_poolcnv "AthExFatObject.h "
-
-apply_pattern poolcnv files=${TEvtAthenaPool_poolcnv}
-macro_append AthExThinningPoolCnv_shlibflags "$(AthExThinning_linkopts) -lAthExThinningEvent "
-
-#
-# Needed for client code to be able to store ElementLinks toward elements of
-# these containers
-#
-#macro TEvtAthenaPool_poolio ""
-#macro_append TEvtAthenaPool_poolio "-s=${AthExThinning_root}/AthExThinning "
-#macro_append TEvtAthenaPool_poolio "AthExParticles.h "
-
-# I don't think that the following is needed. RDS 11/2008:
-# macro_append AthExThinningPoolCnv_shlibflags " $(AthExThinning_dict_linkopts)"
-
diff --git a/Control/AthenaExamples/AthExThinning/doc/packagedoc.h b/Control/AthenaExamples/AthExThinning/doc/packagedoc.h
index 5013b742f3181f5535133af93b32897711f5aaef..981e9638ea0af2ad1acc3571127282149755372a 100644
--- a/Control/AthenaExamples/AthExThinning/doc/packagedoc.h
+++ b/Control/AthenaExamples/AthExThinning/doc/packagedoc.h
@@ -42,16 +42,6 @@ The other classes are the usual boiler plate needed to implement the transient/p
 
 Note however that <b>only T/P separated</b> classes can make use of the thinning process as it relies on the T/P separation of the @c ElementLink to correct the persistent index (to the element in the persistent container) with the according offset, reflecting the removal of elements. (See @c IThinningSvc and @c ThinningSvc documentation in, respectively, packages AthenaKernel and AthenaServices.)
 
-@ref used_AthExThinning
 
-@ref requirements_AthExThinning
 
 */
-
-/**
-@page used_AthExThinning Used Packages
-*/
-
-/**
-@page requirements_AthExThinning Requirements
-*/
diff --git a/Control/AthenaExamples/MultiInputExample/cmt/requirements b/Control/AthenaExamples/MultiInputExample/cmt/requirements
deleted file mode 100644
index 8b3f5b70c1d8dcdfcb7aa11885736edaea68df3c..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/MultiInputExample/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-#################################################
-package MultiInputExample
-
-author ATLAS Workbook
-
-use AtlasPolicy AtlasPolicy-*
-use GaudiInterface  GaudiInterface-*  External
-use AthenaBaseComps AthenaBaseComps-* Control
-
-private
-use StoreGate           StoreGate-*      Control
-use PileUpTools	 	PileUpTools-*	 Control
-use EventInfo           EventInfo-*      Event
-use AthenaPoolExampleData AthenaPoolExampleData-* Database/AthenaPOOL/AthenaPoolExample
-end_private
-
-
-library MultiInputExample *.cxx -s=components *.cxx
-
-apply_pattern component_library
-
-#apply_pattern declare_joboptions files="MultiInputExample.py"
-apply_pattern declare_joboptions files="MultiInputInit.py"
-#################################################
-
-
diff --git a/Control/AthenaExamples/TBBExamples/cmt/requirements b/Control/AthenaExamples/TBBExamples/cmt/requirements
deleted file mode 100644
index 677bdce23de570bfb61d7abace9a9811ec9d09e0..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/TBBExamples/cmt/requirements
+++ /dev/null
@@ -1,51 +0,0 @@
-package TBBExamples
-
-author Paolo Calafiura <Paolo.Calafiura@cern.ch>
-
-use AtlasPolicy     AtlasPolicy-* 
-use GaudiInterface  GaudiInterface-*	External 
-
-private
-use AtlasBoost      AtlasBoost-*     External
-use AtlasTBB        AtlasTBB-*     External
-use AthenaBaseComps AthenaBaseComps-*	Control
-use AthenaKernel    AthenaKernel-*    Control
-use DataModel       DataModel-*    Control
-macro_append cppflags " -std=c++0x "
-end_private
-
-
-library TBBExamples *.cxx -s=components *.cxx
-apply_pattern component_library
-#details about the component_library and dual_library patterns
-# at http://www.cern.ch/Atlas/GROUPS/SOFTWARE/OO/architecture/General/Documentation/PackageStructure.txt
-
-apply_pattern declare_joboptions files="*.py"
-
-apply_pattern declare_python_modules files="*.py"
-
-macro TBBExamples_TestConfiguration "../test/TBBExamples_TestConfiguration.xml"
-apply_pattern declare_runtime extras="../test/TBBExamples_TestConfiguration.xml"
-
-# for unit tests and automatic ATN xml validation
-private
-use TestPolicy TestPolicy-*
-use TestTools TestTools-* AtlasTest -no_auto_imports
-
-apply_pattern validate_xml
-
-
-apply_pattern athenarun_test name="HelloParFor" \
-      pre_script="../cmt/setup.sh"      \             
-      options="TBBExamples/HelloParForOptions.py" \
-      post_script="${TESTTOOLSROOT}/share/post.sh HelloParFor $(q)^Py:ConfigurableDb +(WARNING|INFO|ERROR)|Py:Athena +INFO including file |Warning in .TEnvRec::ChangeValue.: duplicate entry|ToolSvc.finalize.. +INFO|^WriteData +INFO in initialize$$| [A-Z]+ 2[0-9][0-9][0-9]$$$(SGGoptignore)|^Py:Athena +INFO|[Rr]oo[Ff]it|NIKHEF|DeprecationWarning: object.__new__|^  newobj =|^\*+$$|drop-and-reload|^ *$$|we will keep the configuration around|object not modifiable when retrieved|Retrieved const handle to default|type EventInfo$(q)"
- 
-apply_pattern athenarun_test name="HelloPipeAlg" \
-      pre_script="../cmt/setup.sh"      \             
-      options="TBBExamples/HelloPipeOptions.py" \
-      post_script="${TESTTOOLSROOT}/share/post.sh HelloPipeAlg $(q)^Py:ConfigurableDb +(WARNING|INFO|ERROR)|Py:Athena +INFO including file |Warning in .TEnvRec::ChangeValue.: duplicate entry|ToolSvc.finalize.. +INFO|^WriteData +INFO in initialize$$| [A-Z]+ 2[0-9][0-9][0-9]$$$(SGGoptignore)|^Py:Athena +INFO|[Rr]oo[Ff]it|NIKHEF|DeprecationWarning: object.__new__|^  newobj =|^\*+$$|drop-and-reload|^ *$$|we will keep the configuration around|object not modifiable when retrieved|Retrieved const handle to default|type EventInfo$(q)"
- 
-
-
-
-end_private
diff --git a/Control/AthenaExamples/TBBExamples/doc/packagedoc.h b/Control/AthenaExamples/TBBExamples/doc/packagedoc.h
index 6f20d6813a21b4af91a066398c3c0414c80eba59..17ad0bbf9ae82d9f7766c7bb63dccd17a14adc3c 100644
--- a/Control/AthenaExamples/TBBExamples/doc/packagedoc.h
+++ b/Control/AthenaExamples/TBBExamples/doc/packagedoc.h
@@ -15,7 +15,6 @@ an athena Algorithm.
 
 
 
-@section TBBExamples_reqs CMT requirements file
 
 @section TBBExamples_Refs More Documentation
 
diff --git a/Control/CxxUtils/ATLAS_CHECK_THREAD_SAFETY b/Control/AthenaExamples/ToyConversion/ToyConversion/ATLAS_CHECK_THREAD_SAFETY
similarity index 100%
rename from Control/CxxUtils/ATLAS_CHECK_THREAD_SAFETY
rename to Control/AthenaExamples/ToyConversion/ToyConversion/ATLAS_CHECK_THREAD_SAFETY
diff --git a/Control/AthenaExamples/ToyConversion/cmt/requirements b/Control/AthenaExamples/ToyConversion/cmt/requirements
deleted file mode 100755
index 5967e4f035f892009b657c3b643f815ea7cfaf98..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/ToyConversion/cmt/requirements
+++ /dev/null
@@ -1,16 +0,0 @@
-package ToyConversion
-author Paolo Calafiura   <Paolo.Calafiura@cern.ch>
-
-use AtlasPolicy    AtlasPolicy-*
-use GaudiInterface GaudiInterface-* External
-
-#need CLASS_DEF.h and ClassID_traits.h
-use CLIDSvc        CLIDSvc-*           Control
-#need StorableConversions.h
-use SGTools        SGTools-*           Control
-apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_joboptions files="\
-	ToyConversionOpts.txt \
-	ToyConversionOpts.py"
-
diff --git a/Control/AthenaExamples/ToyConversion/src/ToyConversionSvc.cxx b/Control/AthenaExamples/ToyConversion/src/ToyConversionSvc.cxx
index db67197c6a7eac395351c55b9af510f29fd7f976..f9f56774855a562b5a99c779145795ade8cf91e5 100755
--- a/Control/AthenaExamples/ToyConversion/src/ToyConversionSvc.cxx
+++ b/Control/AthenaExamples/ToyConversion/src/ToyConversionSvc.cxx
@@ -5,8 +5,7 @@
 #include "ToyConversion/ToyConversionSvc.h"
 long int
 ToyConversionSvc::storageType() {
-  static long type(0xFF);
-  return type;
+  return 0xff;
 }
 
 long int ToyConversionSvc::repSvcType() const {
diff --git a/Control/AthenaExamples/UserDataExamples/cmt/requirements b/Control/AthenaExamples/UserDataExamples/cmt/requirements
deleted file mode 100644
index 69ba40c4a3227b62871b3fc05b40b7cc0b13564f..0000000000000000000000000000000000000000
--- a/Control/AthenaExamples/UserDataExamples/cmt/requirements
+++ /dev/null
@@ -1,45 +0,0 @@
-package UserDataExamples
-
-author Yushu Yao <yyao@lbl.gov>
-
-use AtlasPolicy		AtlasPolicy-* 
-use AtlasReflex  	AtlasReflex-*  		External -no_auto_imports
-
-
-private
-use GaudiInterface      GaudiInterface-*        External 
-use AthenaKernel 	AthenaKernel-* 		Control
-use AthenaBaseComps	AthenaBaseComps-*	Control
-use CaloEvent           CaloEvent-*	        Calorimeter
-use AthContainers       AthContainers-*         Control
-end_private
-
-library UserDataExamples *.cxx -s=components *.cxx 
-apply_pattern component_library
-
-apply_pattern declare_joboptions \
-   files="*.py"
-
-#private
-#apply_pattern install_runtime
-
-#use TestTools      TestTools-*        AtlasTest -no_auto_imports 
-
-#apply_pattern athenarun_test name="TUserDataMakeData" \
-#              pre_script="../cmt/setup.sh"      \             
-#              options="UserDataExamples/UserDataExamples_Writer.py" \
-#              post_script="${TESTTOOLSROOT}/share/post.sh TUserDataMakeData \"^[^UCR]\|^.[^sre]\""
-
-#apply_pattern athenarun_test name="TUserDataReadData" \
-#              pre_script="../cmt/setup.sh"      \             
-#              options="UserDataExamples/UserDataExamples_Reader.py" \
-#              post_script="${TESTTOOLSROOT}/share/post.sh TUserDataReadData \"^[^UCR]\|^.[^sre]\""
-
-
-
-macro UserDataExample_TestConfiguration "../test/UserDataExample.xml"
-
-private
-use TestPolicy TestPolicy-*
-apply_pattern validate_xml
-public
\ No newline at end of file
diff --git a/Control/AthenaIPCTools/cmt/requirements b/Control/AthenaIPCTools/cmt/requirements
deleted file mode 100644
index 0e9f43c581db58d90c571081f4abcdab59b727ab..0000000000000000000000000000000000000000
--- a/Control/AthenaIPCTools/cmt/requirements
+++ /dev/null
@@ -1,3 +0,0 @@
-package AthenaIPCTools
-
-use AtlasPolicy      AtlasPolicy-*
\ No newline at end of file
diff --git a/Control/AthenaInterprocess/cmt/requirements b/Control/AthenaInterprocess/cmt/requirements
deleted file mode 100644
index 4118e7f1e2ee48ff59c0e90afe66cb006eea1dc3..0000000000000000000000000000000000000000
--- a/Control/AthenaInterprocess/cmt/requirements
+++ /dev/null
@@ -1,13 +0,0 @@
-package AthenaInterprocess
-
-use AtlasPolicy    AtlasPolicy-*
-use CLIDSvc        CLIDSvc-*            Control
-use GaudiInterface GaudiInterface-*     External
-use AtlasBoost     AtlasBoost-*         External
-use uuid           v*                   LCG_Interfaces
-
-library AthenaInterprocess *.cxx
-apply_pattern installed_library
-
-private
-macro_append AthenaInterprocess_shlibflags " -lrt -lpthread"
diff --git a/Control/AthenaInterprocess/src/ProcessGroup.cxx b/Control/AthenaInterprocess/src/ProcessGroup.cxx
index ae48705f8fac33a16833415409449fdd7893f653..b4b2a4c985cf42b97034723c474f4bc8286fa221 100644
--- a/Control/AthenaInterprocess/src/ProcessGroup.cxx
+++ b/Control/AthenaInterprocess/src/ProcessGroup.cxx
@@ -112,7 +112,7 @@ int ProcessGroup::wait(int options)
       return 0;
 
   // Schedule an exit if we are to wait forever
-  if((!options & WNOHANG) && map_async(0,0))
+  if(!(options & WNOHANG) && map_async(0,0))
     return -1;
 
    int result = 0;
diff --git a/Control/AthenaKernel/AthenaKernel/AlgorithmTimer.h b/Control/AthenaKernel/AthenaKernel/AlgorithmTimer.h
index 5942f0bcd1d1745892dfb9728640b7b903b78e0d..820a0ea909543f90df995034aaa6e433150d27a8 100644
--- a/Control/AthenaKernel/AthenaKernel/AlgorithmTimer.h
+++ b/Control/AthenaKernel/AthenaKernel/AlgorithmTimer.h
@@ -45,7 +45,6 @@ namespace Athena {
   
   namespace AlgorithmTimerHandler
   {
-    void onAlarmSignal(int sig, siginfo_t *info, void* extra);
     void onAlarmThread(sigval_t sv);
   }
 
@@ -90,7 +89,6 @@ namespace Athena {
    */  
   class AlgorithmTimer
   {
-    friend void AlgorithmTimerHandler::onAlarmSignal(int sig, siginfo_t *info, void* extra);
     friend void AlgorithmTimerHandler::onAlarmThread(sigval_t sv);
   
   public:
@@ -102,7 +100,7 @@ namespace Athena {
       {
         DEFAULT          = 0x0,    ///< default
         USEREALTIME      = 0x1,    ///< use real time instead of system time
-        DELIVERYBYTHREAD = 0x2     ///< deliver timeout by thread instead of signal
+        DELIVERYBYTHREAD = 0x2     ///< deprecated; delivery is always by thread.
       };
   
     typedef boost::function<void()> callbackFct_t;
@@ -167,15 +165,8 @@ namespace Athena {
     timer_t          m_timerid;         ///< timer ID
     callbackFct_t    m_onAlarm;         ///< user callback 
   
-    bool installSignalHandler();        ///< Install signal handler
-    bool uninstallSignalHandler();      ///< Uninstall signal handler
   
   private:
-    enum {SIGNO = SIGUSR1};                     ///< Use this signal number
-    static struct sigaction s_oldSigHandler;    ///< Old signal handler for SIGNO
-    static std::list<AlgorithmTimer*> s_registry;    ///< List of all AlgorithmTimer instances
-    static bool s_handlerInstalled;             ///< Signal handler installed?
-  
     // Dummies
     AlgorithmTimer();                                 ///< no default constructor
     AlgorithmTimer(const AlgorithmTimer&);            ///< no copying allowed
diff --git a/Control/AthenaKernel/AthenaKernel/AthenaKernelDict.h b/Control/AthenaKernel/AthenaKernel/AthenaKernelDict.h
index 931abac33f3704245ef7a2eb766ee2d2914a5c61..9755339bde2fe20471c535d495694146edea25a8 100644
--- a/Control/AthenaKernel/AthenaKernel/AthenaKernelDict.h
+++ b/Control/AthenaKernel/AthenaKernel/AthenaKernelDict.h
@@ -18,6 +18,7 @@
 #include "AthenaKernel/ILockable.h"
 #include "AthenaKernel/errorcheck.h"
 #include "AthenaKernel/ICutFlowSvc.h"
+#include "AthenaKernel/BaseInfo.h"
 
 #include "AthenaKernel/DsoDb.h"
 #include "AthenaKernel/AthDsoUtils.h"
diff --git a/Control/AthenaKernel/AthenaKernel/BaseInfo.h b/Control/AthenaKernel/AthenaKernel/BaseInfo.h
new file mode 100755
index 0000000000000000000000000000000000000000..2d7bb8270758caaf1d07a893b296c63e52b01594
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/BaseInfo.h
@@ -0,0 +1,925 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: BaseInfo.h,v 1.11 2008-12-15 16:22:45 ssnyder Exp $
+
+/**
+ * @file  AthenaKernel/BaseInfo.h
+ * @author scott snyder
+ * @date Nov 2005
+ * @brief Provide an interface for finding inheritance information
+ *        at run time.
+ *
+ * The @a SG::BaseInfo<T> class provides an interface for finding
+ * inheritance information about class @a T.  In the absence of compiler
+ * support for reflection, the inheritance information must be
+ * explicitly declared.  This is done with the @a SG_BASE macro
+ * and friends.  To declare that class @a D derives from class @a B, use
+ *
+ *@code
+ *   struct B {};
+ *   struct D : public B {};
+ *   SG_BASE (D, B);
+ @endcode
+ *
+ * You can also use multiple inheritance with the @a SG_BASES2
+ * and @a SG_BASES3 macros:
+ *
+ *@code
+ *   struct B1 {};
+ *   struct B2 {};
+ *   struct B3 {};
+ *   struct D : public B1, public B2, public B3 {};
+ *   SG_BASES3 (D, B1, B2, B3);
+ @endcode
+ *
+ * Supporting more than three base classes requires (straightforward)
+ * changes to the code here.
+ *
+ * If any of the derivations are virtual, the corresponding
+ * base class should be within a @a SG_VIRTUAL macro:
+ *    
+ *@code
+ *   struct B1 {};
+ *   struct B2 {};
+ *   struct D : public B1, virtual public B2 {};
+ *   SG_BASES2 (D, B1, SG_VIRTUAL (B2));
+ @endcode
+ *
+ * Note that these macros will only work with non-templated types,
+ * or with specific instantiations of templated types.  If you want
+ * a templated @a SG_BASE, you'll need to declare the specialization
+ * yourself.  You should specialize @a SG::Bases<T>, defining types
+ * @a Base1, @a Base2, and @a Base3 (which should be @a SG::NoBase
+ * if not used).  Example:
+ *
+ *@code
+ *   template <class T> struct B {};
+ *   template <class T> struct D : public B<T> {};
+ *   namespace SG {
+ *     template <class T>
+ *     struct Bases<D<T> > {
+ *       typedef B<T> Base1;
+ *       typedef NoBase Base2;
+ *       typedef NoBase Base3;
+ *     };
+ *   }
+ @endcode
+ *
+ * Once these declarations are in place, what can you do with it?
+ * The interface is provided by the @a SG::BaseInfo<T> class.
+ * (This is a wrapper around a singleton, so it's not expensive
+ * to create instances of this class.)  You can specify the base
+ * classes either by the Gaudi class ID or by the C++ @c std::type_info.
+ * Of course, you'll only be able to get information by class ID
+ * if the classes actually have IDs defined.
+ *
+ * Here are the available methods of @a SG::BaseInfo<T>:
+ *
+ *@code
+ *   static bool is_base (CLID clid)
+ *   static bool is_base (const std::type_info& tinfo)
+ @endcode
+ *     Test to see if the type given by @a clid or @a tinfo
+ *     is a base of @a T.  Note that @a T counts as its own base.
+ *
+ *@code
+ *   static bool is_virtual (CLID clid)
+ *   static bool is_virtual (const std::type_info& tinfo)
+ @endcode
+ *     Test to see if the type given by @a clid or @a tinfo
+ *     is a virtual base of @a T.  This should always be @a false
+ *     for @a T itself.
+ *
+ *@code
+ *   static void* cast (T* p, CLID clid)
+ *   static void* cast (T* p, const std::type_info& tinfo)
+ @endcode
+ *     Cast a pointer from @a T* to a pointer to the type given
+ *     by @a clid or @a tinfo, which must be a base if @a T
+ *     known to @a BaseInfo.  The result is returned as a @a void*.
+ *     If the conversion cannot be done (because the target is not
+ *     known to be a base of @a T), then 0 is returned.
+ *
+ *@code
+ *   static T* castTo (void* p, CLID clid)
+ *   static T* castTo (void* p, const std::type_info& tinfo)
+ @endcode
+ *     Similar, except converts from a pointer to the type given by
+ *     @a clid or @a tinfo (which must be a base of @a T) to @a T*.
+ *     This involves a @a dynamic_cast.  Returns 0 if the cast fails.
+ *
+ *@code
+ *   static std::vector<CLID> get_bases ()
+ @endcode
+ *     Return all the known bases of @a T (that have class IDs).
+ *     @a T itself will be included in this list.
+ *
+ *@code
+ *   static std::vector<const std::type_info*> get_ti_bases ()
+ @endcode
+ *     Return all the known bases of @a T.
+ *     @a T itself will be included in this list.
+ *
+ * It is also possible to get a non-templated version of @c SG::BaseInfo<T>.
+ * This is called @c SG::BaseInfoBase.  These objects can be found using
+ * @c SG::BaseInfoBase::find, by either class ID or @c std::type_info
+ * (in order for this to work, the corresponding @c SG::BaseInfo<T> class
+ * must have been used somewhere in the program).  The interface
+ * of @c SG::BaseInfoBase is the same as @c SG::BaseInfo<T>, except
+ * that @c void* replaces @c T* in the @c cast methods.
+ *
+ * Initialization issues: We don't want to build the @c SG::BaseInfo<T>
+ * objects at static initialization time.  But we do need to remember
+ * which ones are available.  Thus, @c BaseInfoBase maintains a list
+ * of CLIDs and @c std::type_info's for which we may not have done
+ * initialization, along with a function to call to do the initialization.
+ * The initialization list is filled during static initialization.
+ * When we look for an instance, if we don't find one, we look in the
+ * initialization list; if there's a match there, we run the initialization
+ * and remove it from the list.
+ *
+ * Copy conversions: The conversion machinery above provides access to the
+ * standard C++ base<>derived conversions.  However, sometimes you'd like
+ * to allow additional conversions as well, for example between a
+ * vector<ElementLink<T> > and DataVector<T>.  For those cases,
+ * you can register a conversion function with the _source_ type
+ * that can initialize an instance of the _destination_ type
+ * from the _source_ type.  Then, when you try to retrieve the object
+ * from StoreGate with the _destination_ type, your conversion function
+ * will be called.
+ *
+ * Your conversion function should be the method @a convert of
+ * a class deriving from the @a SG::CopyConversion template;
+ * for example,
+ *
+ *@code
+ *   class MyCopyConversion
+ *     : public SG::CopyConversion<std::vector<ElementLink<MyType> >,
+ *                                 DataVector<MyType> >
+ *   {
+ *   public:
+ *     virtual void convert (const std::vector<ElementLink<MyType> >& src,
+ *                           DataVector<MyType>& dst) const
+ *     {
+ *       size_t sz = src.size();
+ *       if (dst.size() != sz) {
+ *         dst.clear (SG::VIEW_ELEMENTS);
+ *         dst.reserve (sz);
+ *         for (size_t i = 0; i < sz; i++) {
+ *           const MyType* p = *(src[i]).cptr(); 
+ *           dst.push_back (const_cast<MyType*> (p));
+ *         }
+ *       }
+ *     }
+ *   };
+ @endcode
+ *
+ * You then declare this using the macro
+ *
+ @code
+ *  SG_ADD_COPY_CONVERSION (std::vector<ElementLink<MyType> >,
+ *                          MyCopyConversion);
+ @endcode
+ *
+ * Copy conversions are enabled only for objects that have been marked as const.
+ */
+
+#ifndef ATHENAKERNEL_BASEINFO_H
+#define ATHENAKERNEL_BASEINFO_H
+
+#include "CxxUtils/checker_macros.h"
+#include "GaudiKernel/ClassID.h"
+#include <vector>
+#include <typeinfo>
+#include <type_traits>
+
+
+//===========================================================================
+// Macros used to declare base class information.
+//
+
+/**
+ * @brief Used to mark virtual derivation.
+ *        When using the @a SG_BASE macros below, use this in the case
+ *        of virtual derivation.  Example:
+ *
+ *@code
+ *   struct B1 {};
+ *   struct B2 {};
+ *   struct D : public B1, virtual public B2 {};
+ *   SG_BASES2 (D, B1, SG_VIRTUAL (B2));
+ @endcode
+ */
+#define SG_VIRTUAL(T) Virtual<T>
+
+
+/**
+ * @brief Declare that class @a D derives from class @a B.  Example:
+ *
+ *@code
+ *   struct B {};
+ *   struct D : public B {};
+ *   SG_BASE (D, B);
+ @endcode
+ */
+#define SG_BASE(D, B) SG_BASES1(D, B)
+
+
+/**
+ * @brief Declare that class @a D derives from class @a B.
+ *        This is the same as @a SG_BASE.  Example:
+ *
+ *@code
+ *   struct B {};
+ *   struct D : public B {};
+ *   SG_BASES1 (D, B);
+ @endcode
+ */
+#define SG_BASES1(D, B)          \
+  namespace SG        {          \
+    template<> struct Bases<D >{ \
+      typedef B Base1;           \
+      typedef NoBase Base2;      \
+      typedef NoBase Base3;      \
+    };                           \
+    template struct RegisterBaseInit<D >; \
+    template struct BaseInit<D >; \
+} struct sg_dummy // to swallow semicolon
+
+
+/**
+ * @brief Declare that class @a D derives from classes @a B1 and @a B2.
+ *        Example:
+ *
+ *@code
+ *   struct B1 {};
+ *   struct B2 {};
+ *   struct D : public B1, public B2 {};
+ *   SG_BASES2 (D, B1, B2);
+ @endcode
+ */
+#define SG_BASES2(D, B1, B2)     \
+  namespace SG        {          \
+    template<> struct Bases<D >{ \
+      typedef B1 Base1;          \
+      typedef B2 Base2;          \
+      typedef NoBase Base3;      \
+    };                           \
+    template struct RegisterBaseInit<D >; \
+    template struct BaseInit<D >; \
+} struct sg_dummy // to swallow semicolon
+
+
+/**
+ * @brief Declare that class @a D derives from classes @a B1, @a B2, and @a B3.
+ *        Example:
+ *
+ *@code
+ *   struct B1 {};
+ *   struct B2 {};
+ *   struct B3 {};
+ *   struct D : public B1, public B2, public B3 {};
+ *   SG_BASES3 (D, B1, B2, B3);
+ @endcode
+ */
+#define SG_BASES3(D, B1, B2, B3) \
+  namespace SG        {          \
+    template<> struct Bases<D >{ \
+      typedef B1 Base1;          \
+      typedef B2 Base2;          \
+      typedef B3 Base3;          \
+    };                           \
+    template struct RegisterBaseInit<D >; \
+    template struct BaseInit<D >; \
+} struct sg_dummy // to swallow semicolon
+
+
+
+/**
+ * @brief Add a new base class @c B to class @c D.
+ *
+ * Sometimes, the SG_BASE macro for a class isn't present in its header.
+ *
+ * One can try to put the appropriate SG_BASE macro somewhere else,
+ * but this doesn't always work: if the @c BaseInfoBase for @c D has
+ * already been created by the time the @c SG_BASE initialization
+ * runs, then that @c SG_BASE macro won't do anything.
+ *
+ * @c SG_ADD_BASE, however, will add a new base to an existing @c BaseInfoBase.
+ *
+ *@code
+ *   struct B {};
+ *   struct D : public B {};
+ *   SG_ADD_BASE (D, B);
+ @endcode
+ */
+#define SG_ADD_BASE(D, B) \
+  namespace SG        {          \
+    template struct AddBaseInit<D, B >;            \
+} struct sg_dummy // to swallow semicolon
+
+
+/**
+ * @brief Declare a copy conversion from class @c T using converter @c C.
+ *
+ * See the comments in the header for a detailed description.
+ */
+#define SG_ADD_COPY_CONVERSION(D, C) \
+  namespace SG        {          \
+    template struct AddCopyConversionInit<D, C >;            \
+} struct sg_dummy // to swallow semicolon
+
+
+
+namespace SG {
+
+
+/**
+ * @brief Helper metafunction to get base class types.
+ *
+ * For a class @c T,
+ *@code
+ *   SG::BaseType<SG::Bases<T>::Base1>::type
+ @endcode
+ * gives the type of @c T's first base.  Also,
+ *@code
+ *   SG::BaseType<SG::Bases<T>::Base1>::is_virtual
+ @endcode
+ * tells whether the derivation is virtual
+ * (either @c true_type or @c false_type).
+ *
+ * Note that @c SG::Bases\<T>::Base1 is not the actual type
+ * of @c T's first base if virtual derivation was used.
+ */
+template <class T>
+struct BaseType;
+
+
+// Forward declaration.
+template <class T>
+class BaseInfoImpl;
+
+
+struct BaseInfoBaseImpl;
+
+
+//===========================================================================
+// Copy conversion declarations.
+//
+
+
+/**
+ * @brief Base class for copy conversions.
+ */
+class CopyConversionBase
+{
+public:
+  /// Destructor.
+  virtual ~CopyConversionBase() {}
+
+  /// Create an instance of the destination class.
+  virtual void* create() const = 0;
+
+  /// Destroy an instance of the destination class.
+  virtual void destroy (void* p) const = 0;
+
+  /// Convert the contents of an instance of the source class SRC
+  /// to an instance of the destination class DST.
+  virtual void convertUntyped (const void* src, void* dst) const = 0;
+};
+
+
+/**
+ * @brief Base class for copy conversions, templated on source
+ *        and destination classes.
+ */
+template <class SRC, class DST>
+class CopyConversion
+  : public CopyConversionBase
+{
+public:
+  /// The destination class.
+  typedef DST target_type;
+
+  /// Create an instance of the destination class.
+  virtual void* create() const { return new DST; }
+
+  /// Destroy an instance of the destination class.
+  virtual void destroy (void* p) const { delete reinterpret_cast<DST*>(p); }
+
+  /// Convert the contents of an instance of the source class SRC
+  /// to an instance of the destination class DST.
+  virtual void convertUntyped (const void* src, void* dst) const
+  {
+    convert (*reinterpret_cast<const SRC*>(src),
+             *reinterpret_cast<DST*>(dst));
+  }
+
+  /// Convert the contents of an instance of the source class SRC
+  /// to an instance of the destination class DST.
+  /// (Type-safe version.)
+  virtual void convert (const SRC& src, DST& dst) const = 0;
+};
+
+
+//===========================================================================
+// Base class declaration.
+// This factors out the part of the implementation that doesn't
+// depend on the template parameter @a T.
+//
+
+
+template <class D, class B>
+struct RegisterAddBaseInit;
+template <class D, class B>
+struct RegisterAddCopyConversionInit;
+
+
+/**
+ * @brief The non-template portion of the @a BaseInfo implementation.
+ */
+class BaseInfoBase
+{
+public:
+  template <class D, class B>
+  friend struct RegisterAddBaseInit;
+  template <class D, class B>
+  friend struct RegisterAddCopyConversionInit;
+
+
+  /**
+   * @brief Return the CLID for this class.
+   */
+  CLID clid() const;
+
+
+  /**
+   * @brief Return the @c std::type_info for this class.
+   */
+  const std::type_info& typeinfo() const;
+  
+
+  /**
+   * @brief Cast to a base pointer.
+   * @param p The pointer to cast (a @a T* cast to a @a void*).
+   * @param clid ID of the class to which to cast.
+   * @return The pointer cast to the requested type, returned
+   *         as a @a void*.  @a clid must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   */
+  void* cast (void* p, CLID clid) const;
+
+  /**
+   * @brief Cast to a base pointer.
+   * @param p The pointer to cast (a @a T* cast to a @a void*).
+   * @param clid @a type_info of the class to which to cast.
+   * @return The pointer cast to the requested type, returned
+   *         as a @a void*.  @a tinfo must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   */
+  void* cast (void* p, const std::type_info& tinfo) const;
+
+
+  /**
+   * @brief Cast to a derived pointer.
+   * @param p The pointer to cast (a @a B* cast to a @a void*).
+   * @param clid ID of the class @a B from which to cast.
+   * @return The pointer cast to the requested type, returned
+   *         as a @a void*.  @a clid must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   *         0 will also be returned if the @a dynamic_cast fails.
+   */
+  void* castTo (void* p, CLID clid) const;
+
+  /**
+   * @brief Cast to a derived pointer.
+   * @param p The pointer to cast (a @a B* cast to a @a void*).
+   * @param clid @a type_info of the class @a B from which to cast.
+   * @return The pointer cast to the requested type, returned
+   *         as a @a void*.  @a tinfo must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   *         0 will also be returned if the @a dynamic_cast fails.
+   */
+  void* castTo (void* p, const std::type_info& tinfo) const;
+
+
+  /// Type of a pointer conversion function.
+  typedef void* castfn_t (void* p);
+
+
+  // gcc 4.3 complains about the code genreflex generates for these.
+  // They're not useful from python anyway, so just suppress them.
+#ifndef __REFLEX__
+  /**
+   * @brief Return a function for casting to a base pointer.
+   * @param clid ID of the class to which to cast.
+   * @return A function to convert a pointer to a @c T to a pointer
+   *         to the type identified by @a clid.
+   *         @a clid must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   */
+  castfn_t* castfn (CLID clid) const;
+
+
+  /**
+   * @brief Return a function for casting to a base pointer.
+   * @param clid @a type_info of the class to which to cast.
+   * @return A function to convert a pointer to a @c T to a pointer
+   *         to the type identified by @a tinfo.
+   *         @a tinfo must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   */
+  castfn_t* castfn (const std::type_info& tinfo) const;
+
+  /**
+   * @brief Return a function for casting to a derived pointer.
+   * @param clid ID of the class @a B from which to cast.
+   * @return A function to convert a pointer to a @a B to a pointer
+   *         to a @a T.  @a B must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   *         0 will also be returned if the @a dynamic_cast fails.
+   */
+  castfn_t* castfnTo (CLID clid) const;
+
+
+  /**
+   * @brief Return a function for casting to a derived pointer.
+   * @param clid @a type_info of the class @a B from which to cast.
+   * @return A function to convert a pointer to a @a B to a pointer
+   *         to a @a T.  @a B must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   *         0 will also be returned if the @a dynamic_cast fails.
+   */
+  castfn_t* castfnTo (const std::type_info& tinfo) const;
+#endif
+
+
+  /**
+   * @brief Return the class IDs of all known bases of @a T (that
+   *        have class IDs).  The list will include @a T itself.
+   */
+  std::vector<CLID> get_bases () const;
+
+  /**
+   * @brief Return the @c type_info's of all known bases of @a T.
+   *        The list will include @a T itself.
+   */
+  std::vector<const std::type_info*> get_ti_bases () const;
+
+  /**
+   * @brief Return true if @a clid is the ID of a class that
+   *        is known to be a base of @a T.  @a T is considered
+   *        to be its own base for this purpose.
+   * @param clid The ID of the class to test.
+   */
+  bool is_base (CLID clid) const;
+
+  /**
+   * @brief Return true if @a tinfo is the @a type_info of a class that
+   *        is known to be a base of @a T.  @a T is considered
+   *        to be its own base for this purpose.
+   * @param clid The ID of the class to test.
+   */
+  bool is_base (const std::type_info& tinfo) const;
+
+
+  /**
+   * @brief Return true if @a clid is the ID of a class that
+   *        is known to be a virtual base of @a T.  (This will always
+   *        be false for @a T itself.)
+   * @param clid The ID of the class to test.
+   */
+  bool is_virtual (CLID clid) const;
+
+  /**
+   * @brief Return true if @a tinfo is the @a std::type_info of a class that
+   *        is known to be a virtual base of @a T.  (This will always
+   *        be false for @a T itself.)
+   * @param tinfo The @a std::type_info of the class to test.
+   */
+  bool is_virtual (const std::type_info& tinfo) const;
+
+
+  /**
+   * @brief Search for a copy conversion to @c tinfo.
+   * @param tinfo The class to which we want to convert.
+   *
+   * Returns the conversion instance or 0.
+   */
+  const CopyConversionBase* copy_conversion (const std::type_info& tinfo) const;
+
+
+  /**
+   * @brief Search for a copy conversion to @c clid.
+   * @param clid The class to which we want to convert.
+   *
+   * Returns the conversion instance or 0.
+   */
+  const CopyConversionBase* copy_conversion (CLID clid) const;
+
+
+  /**
+   * @brief Add a new copy conversion.
+   * @param tinfo The @c std::type_info of the target class.
+   * @param cnv A @c CopyConversionBase instance describing the conversion.
+   *
+   * The @c BaseInfoBase takes ownership of the @c cnv object.
+   */
+  void add_copy_conversion (const std::type_info& tinfo,
+                            const CopyConversionBase* cnv);
+
+
+  /**
+   * @brief Return known copy conversions.
+   *
+   * Returns the CLIDs of all target classes that have been registered
+   * with this one for copy conversion.
+   */
+  std::vector<CLID> get_copy_conversions() const;
+
+
+#ifndef __REFLEX__
+  /**
+   * @brief Add information about one base class.
+   * @param tinfo The @a std::type_info of the base.
+   * @param converter Converter function.  This should be able to
+   *                  convert a @a T* to a pointer to this base.
+   * @param converterTo Converter function.  This should be able to
+   *                    convert a pointer to this base to a @a T*.
+   * @param is_virtual True if the derivation from this base to @a T
+   *                   is via virtual derivation.
+   */
+  void add_info (const std::type_info& tinfo,
+                 castfn_t* converter,
+                 castfn_t* converterTo,
+                 bool is_virtual);
+#endif
+
+
+  /**
+   * @brief Find the @c BaseInfoBase instance for @c clid.
+   * @param clid The class ID of the class for which we want information.
+   *
+   * Returns 0 if no @c BaseInfoBase instance is available.
+   */
+  static const BaseInfoBase* find (CLID clid);
+
+
+  /**
+   * @brief Find the @c BaseInfoBase instance for @c tinfo.
+   * @param tinfo The @c std::type_info of the class
+   *              for which we want information.
+   *
+   * Returns 0 if no @c BaseInfoBase instance is available.
+   */
+  static const BaseInfoBase* find (const std::type_info& tinfo);
+
+
+  /// Type for an initialization function.
+  typedef const BaseInfoBase& init_func_t();
+
+
+#ifndef __REFLEX__
+  /**
+   * @brief Register an initialization function.
+   * @param tinfo The @c std::type_info for the class being registered.
+   * @param init_func Function to initialize @c BaseInfo for the class.
+   */
+  static void addInit (const std::type_info* tinfo,
+                       init_func_t* init_func);
+#endif
+
+
+  /**
+   * @brief Run initializations for this class, if needed.
+   */
+  void maybeInit();
+
+
+protected:
+  /**
+   * @brief Constructor.
+   * @param tinfo The @c std::type_info for this class.
+   */
+  BaseInfoBase (const std::type_info& tinfo);
+
+
+  /**
+   * @brief Destructor.
+   */
+  ~BaseInfoBase();
+
+
+private:
+  /**
+   * @brief Helper for @c find.
+   * @param tinfo The @c std::type_info of the class
+   *              for which we want information.
+   *
+   * Returns 0 if no @c BaseInfoBase instance is available.
+   */
+  static BaseInfoBase* find1 (const std::type_info& tinfo);
+
+
+  /**
+   * @brief Find the @c BaseInfoBase instance for @c tinfo.
+   * @param tinfo The @c std::type_info of the class
+   *              for which we want information.
+   *
+   * Returns 0 if no @c BaseInfoBase instance is available.
+   */
+  static BaseInfoBase* find_nc (const std::type_info& tinfo);
+
+
+  /// Pointer to internal state.
+  BaseInfoBaseImpl* m_impl;
+
+  BaseInfoBase (const BaseInfoBase&);
+  BaseInfoBase& operator= (const BaseInfoBase&);
+};
+
+
+//===========================================================================
+// The templated @c BaseInfo class.
+//
+
+/**
+ * @brief Provide an interface for finding inheritance information
+ *        at run time.  See the file comments for full details.
+ */
+template <class T>
+class BaseInfo
+{
+public:
+  template <class D, class B>
+  friend struct RegisterAddCopyConversionInit;
+  template <class D, class B>
+  friend struct RegisterAddBaseInit;
+
+
+  /**
+   * @brief Cast to a base pointer.
+   * @param p The pointer to cast.
+   * @param clid ID of the class to which to cast.
+   * @return The pointer cast to the requested type, returned
+   *         as a @a void*.  @a clid must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   */
+  static void* cast (T* p, CLID clid);
+
+  /**
+   * @brief Cast to a base pointer.
+   * @param p The pointer to cast.
+   * @param clid @a type_info of the class to which to cast.
+   * @return The pointer cast to the requested type, returned
+   *         as a @a void*.  @a tinfo must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   */
+  static void* cast (T* p, const std::type_info& tinfo);
+
+
+  /**
+   * @brief Cast to a derived pointer.
+   * @param p The pointer to cast.
+   * @param clid ID of the class @a B from which to cast.
+   * @return The pointer cast to a @a T*.
+   *         @a B must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   *         0 will also be returned if the @a dynamic_cast fails.
+   */
+  static T* castTo (void* p, CLID clid);
+
+  /**
+   * @brief Cast to a derived pointer.
+   * @param p The pointer to cast.
+   * @param clid @a type_info of the class @a B from which to cast.
+   * @return The pointer cast to a @a T*.
+   *         @a B must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   *         0 will also be returned if the @a dynamic_cast fails.
+   */
+  static T* castTo (void* p, const std::type_info& tinfo);
+
+
+  /**
+   * @brief Return a function for casting to a base pointer.
+   * @param clid ID of the class to which to cast.
+   * @return A function to convert a pointer to a @c T to a pointer
+   *         to the type identified by @a clid.
+   *         @a clid must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   */
+  static BaseInfoBase::castfn_t* castfn (CLID clid);
+
+
+  /**
+   * @brief Return a function for casting to a base pointer.
+   * @param clid @a type_info of the class to which to cast.
+   * @return A function to convert a pointer to a @c T to a pointer
+   *         to the type identified by @a tinfo.
+   *         @a tinfo must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   */
+  static BaseInfoBase::castfn_t* castfn (const std::type_info& tinfo);
+
+
+  /**
+   * @brief Return a function for casting to a derived pointer.
+   * @param clid ID of the class @a B from which to cast.
+   * @return A function to convert a pointer to a @c T to a pointer
+   *         to a @a T.  @a clid must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   *         0 will also be returned if the @a dynamic_cast fails.
+   */
+  static BaseInfoBase::castfn_t* castfnTo (CLID clid);
+
+
+  /**
+   * @brief Return a function for casting to a derived pointer.
+   * @param clid @a type_info of the class @a B from which to cast.
+   * @return A function to convert a pointer to a @c B to a pointer
+   *         to a @a T.  @a tinfo must be known to be a base
+   *         of @a T; otherwise, 0 will be returned.
+   *         0 will also be returned if the @a dynamic_cast fails.
+   */
+  static BaseInfoBase::castfn_t* castfnTo (const std::type_info& tinfo);
+
+
+  /**
+   * @brief Return the class IDs of all known bases of @a T (that
+   *        have class IDs).  The list will include @a T itself.
+   */
+  static std::vector<CLID> get_bases ();
+
+
+  /**
+   * @brief Return the @c type_info's of all known bases of @a T.
+   *        The list will include @a T itself.
+   */
+  static std::vector<const std::type_info*> get_ti_bases ();
+
+
+  /**
+   * @brief Return true if @a clid is the ID of a class that
+   *        is known to be a base of @a T.  @a T is considered
+   *        to be its own base for this purpose.
+   * @param clid The ID of the class to test.
+   */
+  static bool is_base (CLID clid);
+
+  /**
+   * @brief Return true if @a tinfo is the @a std::type_info of a class that
+   *        is known to be a base of @a T.  @a T is considered
+   *        to be its own base for this purpose.
+   * @param tinfo The @a std::type_info of the class to test.
+   */
+  static bool is_base (const std::type_info& tinfo);
+
+
+  /**
+   * @brief Return true if @a clid is the ID of a class that
+   *        is known to be a virtual base of @a T.  (This will always
+   *        be false for @a T itself.)
+   * @param clid The ID of the class to test.
+   */
+  static bool is_virtual (CLID clid);
+
+  /**
+   * @brief Return true if @a tinfo is the @a std::type_info of a class that
+   *        is known to be a virtual base of @a T.  (This will always
+   *        be false for @a T itself.)
+   * @param tinfo The @a std::type_info of the class to test.
+   */
+  static bool is_virtual (const std::type_info& tinfo);
+
+
+  /**
+   * @brief Return the non-templated @c BaseInfoBase object for this type.
+   */
+  static const BaseInfoBase& baseinfo ();
+
+
+  static void maybeInit ();
+
+
+private:
+  /// Return a reference to the (singleton) implementation object
+  /// for this class.
+  static BaseInfoImpl<T>& instance();
+
+  static BaseInfoImpl<T> s_instance ATLAS_THREAD_SAFE;
+};
+
+
+} // namespace SG
+
+
+#include "AthenaKernel/BaseInfo.icc"
+
+
+#endif // not ATHENAKERNEL_BASEINFO_H
+
diff --git a/Control/SGTools/SGTools/BaseInfo.icc b/Control/AthenaKernel/AthenaKernel/BaseInfo.icc
similarity index 92%
rename from Control/SGTools/SGTools/BaseInfo.icc
rename to Control/AthenaKernel/AthenaKernel/BaseInfo.icc
index c60567ae1cb8444f399235a2ab7a425143e9f59c..9e8bdfad6c121cbae84c355d438d26890cd855e0 100755
--- a/Control/SGTools/SGTools/BaseInfo.icc
+++ b/Control/AthenaKernel/AthenaKernel/BaseInfo.icc
@@ -4,7 +4,7 @@
 
 // $Id: BaseInfo.icc,v 1.9 2008-12-15 15:12:39 ssnyder Exp $
 /**
- * @file  SGTools/BaseInfo.icc
+ * @file  AthenaKernel/BaseInfo.icc
  * @author scott snyder
  * @date Nov 2005
  * @brief Provide an interface for finding inheritance information
@@ -109,7 +109,12 @@ public:
   void add_base (bool is_virtual)
   {
     // Make sure the bib for the base class exists.
-    BaseInfo<B>::maybeInit();
+    if (!std::is_same<T, B>::value) {
+      // Don't call it if the types are the same.
+      // Otherwise, we can get recursive calls to instance(), triggering
+      // a deadlock.
+      BaseInfo<B>::maybeInit();
+    }
 
     // Add the information for this base.
     this->add_info (typeid(B),
@@ -471,9 +476,7 @@ const BaseInfoBase& BaseInfo<T>::baseinfo()
 template <class T>
 void BaseInfo<T>::maybeInit()
 {
-  BaseInfoImpl<T>* inst = s_instance.instance;
-  if (inst)
-    inst->maybeInit();
+  instance();
 }
 
 
@@ -482,29 +485,14 @@ void BaseInfo<T>::maybeInit()
  *        for this class.
  */
 template <class T>
-const BaseInfoImpl<T>& BaseInfo<T>::instance()
+BaseInfoImpl<T>& BaseInfo<T>::instance()
 {
-  BaseInfoImpl<T>* inst = s_instance.instance;
-  if (inst)
-    inst->maybeInit();
-  return *inst;
+  s_instance.maybeInit();
+  return s_instance;
 }
 
-
-/**
- * @brief Constructor to get the singleton instance set up.
- */
-template <class T>
-BaseInfo<T>::instance_holder::instance_holder()
-{
-  static BaseInfoImpl<T> inst;
-  instance = &inst;
-}
-
-
-/// Declare the static member of @c BaseInfo.
 template <class T>
-typename BaseInfo<T>::instance_holder BaseInfo<T>::s_instance;
+BaseInfoImpl<T> BaseInfo<T>::s_instance;
 
 
 /**
@@ -538,10 +526,10 @@ RegisterBaseInit<T>::RegisterBaseInit()
  * @brief Helper to get @c BaseInfo initialized.
  */
 template <class T> struct BaseInit {
-  static RegisterBaseInit<T> s_regbase;
+  static const RegisterBaseInit<T> s_regbase;
 };
 #ifndef __APPLE__
-template <class T> RegisterBaseInit<T> BaseInit<T>::s_regbase;
+template <class T> const RegisterBaseInit<T> BaseInit<T>::s_regbase;
 #endif
 
 
@@ -576,10 +564,9 @@ const BaseInfoBase& RegisterAddBaseInit<D, B>::doinit()
   bool is_virtual = BaseType<B>::is_virtual::value;
 
   // Look up the BIB.
-  SG::BaseInfoBase* bib =
-    const_cast<SG::BaseInfoBase*> (SG::BaseInfoBase::find (typeid(D)));
+  SG::BaseInfoBase* bib = SG::BaseInfoBase::find_nc (typeid(D));
   if (!bib)
-    bib = const_cast<SG::BaseInfoBase*> (&BaseInfo<D>::baseinfo());
+    bib = &BaseInfo<D>::instance();
   if (bib) {
     // Add the new base to it.
     SG::BaseInfoImpl<D>& impl = *static_cast<SG::BaseInfoImpl<D>*> (bib);
@@ -604,11 +591,11 @@ RegisterAddBaseInit<D, B>::RegisterAddBaseInit()
  * @brief Helper to get @c AddBaseInfo initialized.
  */
 template <class D, class B> struct AddBaseInit {
-  static RegisterAddBaseInit<D, B> s_regbase;
+  static const RegisterAddBaseInit<D, B> s_regbase;
 };
 #ifndef __APPLE__
 template <class D, class B>
-RegisterAddBaseInit<D,B> AddBaseInit<D,B>::s_regbase;
+const RegisterAddBaseInit<D,B> AddBaseInit<D,B>::s_regbase;
 #endif
 
 
@@ -635,10 +622,9 @@ template <class T, class C>
 const BaseInfoBase& RegisterAddCopyConversionInit<T, C>::doinit()
 {
   // Look up the BIB.
-  SG::BaseInfoBase* bib =
-    const_cast<SG::BaseInfoBase*> (SG::BaseInfoBase::find (typeid(T)));
+  SG::BaseInfoBase* bib = SG::BaseInfoBase::find_nc (typeid(T));
   if (!bib)
-    bib = const_cast<SG::BaseInfoBase*> (&BaseInfo<T>::baseinfo());
+    bib = &BaseInfo<T>::instance();
   if (bib) {
     typedef typename C::target_type target_type;
     bib->add_copy_conversion (typeid(target_type),
@@ -663,11 +649,11 @@ RegisterAddCopyConversionInit<T, C>::RegisterAddCopyConversionInit()
  * @brief Helper to get @c AddBaseInfo initialized.
  */
 template <class T, class C> struct AddCopyConversionInit {
-  static RegisterAddCopyConversionInit<T, C> s_regbase;
+  static const RegisterAddCopyConversionInit<T, C> s_regbase;
 };
 #ifndef __APPLE__
 template <class T, class C>
-RegisterAddCopyConversionInit<T,C> AddCopyConversionInit<T,C>::s_regbase;
+const RegisterAddCopyConversionInit<T,C> AddCopyConversionInit<T,C>::s_regbase;
 #endif
 
 
diff --git a/Control/AthenaKernel/AthenaKernel/CLASS_DEF.h b/Control/AthenaKernel/AthenaKernel/CLASS_DEF.h
new file mode 100755
index 0000000000000000000000000000000000000000..fb980138e0654a5f9007522a150ec0a5fb6be598
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/CLASS_DEF.h
@@ -0,0 +1,135 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef ATHENAKERNEL_CLASS_DEF_H
+#define ATHENAKERNEL_CLASS_DEF_H
+/** @file CLASS_DEF.h
+ *  @brief macros to associate a CLID to a type
+ *
+ *  @author Paolo Calafiura <pcalafiura@lbl.gov>
+ *  $Id: CLASS_DEF.h,v 1.3 2009-01-15 19:07:29 binet Exp $
+ */
+
+#include "AthenaKernel/ClassID_traits.h"
+#include "CxxUtils/unused.h"
+#include <boost/preprocessor/stringize.hpp>
+
+#ifdef __CLING__
+# define CLIDREGISTRY_ADDENTRY(CID, NAME)                               \
+  namespace detail {							\
+    const bool UNUSED(clidEntry_ ## CID) =                              \
+      CLIDRegistry::addEntry(CID, typeid(NAME),                         \
+                                  ClassID_traits< NAME >::typeNameString(), \
+				  ClassID_traits< NAME >::packageInfo(), \
+				  ClassName< NAME >::name());		\
+  } 
+# define CLIDREGISTRY_ADDENTRY2(CID, ARG1, ARG2)                        \
+  namespace detail {							\
+    const bool UNUSED(clidEntry_ ## CID) =                              \
+      CLIDRegistry::addEntry                                            \
+      (CID, typeid(ARG1,ARG2),                                          \
+       ClassID_traits< ARG1,ARG2 >::typeNameString(),                   \
+       ClassID_traits< ARG1,ARG2 >::packageInfo(),			\
+       ClassName< ARG1,ARG2 >::name());					\
+  } 
+#else
+# define CLIDREGISTRY_ADDENTRY(CID, NAME)                               \
+  namespace detail {							\
+    const bool UNUSED(clidEntry_ ## CID) =                              \
+      CLIDRegistry::addEntry<CID>(typeid(NAME),                         \
+                                  ClassID_traits< NAME >::typeNameString(), \
+				  ClassID_traits< NAME >::packageInfo(), \
+				  ClassName< NAME >::name());		\
+  } 
+# define CLIDREGISTRY_ADDENTRY2(CID, ARG1, ARG2)                        \
+  namespace detail {							\
+    const bool UNUSED(clidEntry_ ## CID) =                              \
+      CLIDRegistry::addEntry<CID>                                       \
+      (typeid(ARG1,ARG2),                                               \
+       ClassID_traits< ARG1,ARG2 >::typeNameString(),                   \
+       ClassID_traits< ARG1,ARG2 >::packageInfo(),			\
+       ClassName< ARG1,ARG2 >::name());					\
+  } 
+#endif
+
+/** @def CLASS_DEF(NAME, CID , VERSION) 
+ *  @brief associate a clid and a version to a type
+ *  eg 
+ *  @code 
+ *  CLASS_DEF(std::vector<Track*>,8901, 1)
+ *  @endcode 
+ *  @param NAME 	type name
+ *  @param CID 		clid
+ *  @param VERSION 	not yet used
+ */
+#define CLASS_DEF(NAME, CID , VERSION)                                  \
+  template <>                                                           \
+  struct ClassID_traits< NAME > {                                       \
+    typedef std::is_base_of<DataObject, NAME> isDObj_t;                 \
+    static const bool s_isDataObject = isDObj_t::value;                 \
+    typedef std::integral_constant<bool, s_isDataObject> is_DataObject_tag; \
+    typedef std::true_type has_classID_tag;                             \
+    static const CLID& ID() { static const CLID c(CID); return  c; }    \
+    static const char* typeNameString() {                               \
+      return #NAME;                                                     \
+    }									\
+    static const std::string& typeName() {                              \
+      static const std::string name = typeNameString();                 \
+      return name;		 					\
+    }									\
+    static  Athena::PackageInfo packageInfo() {				\
+      static const Athena::PackageInfo pi( BOOST_PP_STRINGIZE(PACKAGE_VERSION_UQ)  ); \
+      return pi;							\
+    }									\
+    static const std::type_info& typeInfo() {				\
+      return typeid (NAME);						\
+    }									\
+    typedef std::true_type has_version_tag;                             \
+    static const int s_version = VERSION;                               \
+    static const bool s_isConst = false;                                \
+  };									\
+  CLIDREGISTRY_ADDENTRY(CID, NAME)
+
+
+/** @def CLASS_DEF2(ARG1, ARG2, CID , VERSION) 
+ *  @brief hack to use instead of CLASS_DEF when type name contains a comma ','
+ *  eg
+ *  @code 
+ *    CLASS_DEF2(map<int,string>,8900, 1)
+ *  @endcode 
+ *  @param ARG1         type name (1st part)
+ *  @param ARG2 	type name (2nd part)
+ *  @param CID 		clid
+ *  @param VERSION 	not yet used
+ */
+#define CLASS_DEF2(ARG1, ARG2, CID , VERSION)	\
+  template <>					\
+  struct ClassID_traits< ARG1,ARG2 > {					\
+    typedef std::is_base_of<DataObject, ARG1, ARG2 > isDObj_t;          \
+    static const bool s_isDataObject = isDObj_t::value;                 \
+    typedef std::integral_constant<bool, s_isDataObject> is_DataObject_tag; \
+    typedef std::true_type has_classID_tag;                             \
+    static const CLID& ID() {						\
+      static const CLID c(CID); return  c;                              \
+    }									\
+    static const char* typeNameString() {				\
+      return #ARG1 "," #ARG2;                                           \
+    }									\
+    static const std::string& typeName() {				\
+      static const std::string name = typeNameString();                 \
+      return name;							\
+    }									\
+    static const std::type_info& typeInfo() {				\
+      return typeid (ARG1,ARG2);					\
+    }									\
+    static  Athena::PackageInfo packageInfo() {				\
+      return Athena::PackageInfo("Package-00-00-00");			\
+    }									\
+    typedef std::true_type has_version_tag;                             \
+    static const int s_version = VERSION;                               \
+    static const bool s_isConst = false;                                \
+  };									\
+  CLIDREGISTRY_ADDENTRY2(CID, ARG1, ARG2)
+
+#endif // not ATHENAKERNEL_CLASS_DEF_H
diff --git a/Control/AthenaKernel/AthenaKernel/CLIDRegistry.h b/Control/AthenaKernel/AthenaKernel/CLIDRegistry.h
new file mode 100755
index 0000000000000000000000000000000000000000..611e614e694fec7080359daf0428b71a46f95a9c
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/CLIDRegistry.h
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+
+#ifndef ATHENAKERNEL_CLIDREGISTRY_H
+# define ATHENAKERNEL_CLIDREGISTRY_H
+/** @file CLIDRegistry.h
+ * @brief  a static registry of CLID->typeName entries. NOT for general use.
+ * Use ClassIDSvc instead.
+ *
+ * @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration
+ *$Id: CLIDRegistry.h,v 1.2 2009-01-15 19:07:29 binet Exp $
+ */
+
+#include "AthenaKernel/tools/AthenaPackageInfo.h"
+#include "GaudiKernel/ClassID.h"
+
+#include <vector>
+#include <string>
+#include <tuple>
+
+namespace CLIDdetail {
+  /// @name allowed class id range
+  //@{	
+  const unsigned long MINCLID = 256;
+  const unsigned long MAXCLID = 2147483647; ///< 2**31 - 1
+  //@}	
+}
+
+class CLIDRegistryImpl;
+
+/** @class CLIDRegistry
+ * @brief  a static registry of CLID->typeName entries. NOT for general use.
+ * Use ClassIDSvc instead.
+ */
+class CLIDRegistry {
+public:
+  typedef std::tuple <unsigned long, 
+                      std::string, 
+                      Athena::PackageInfo,
+		      std::string> tuple_t;
+  typedef std::vector< tuple_t > CLIDVector_t;
+
+  ///to be called by the CLASS_DEFS
+  template <unsigned long CLID>
+  static bool addEntry(const std::type_info& ti,
+                       const char* typeName, 
+		       const Athena::PackageInfo& pkgInfo,
+		       const std::string& typeInfoName); 
+
+  /// registry accessors (used by ClassIDSvc)
+  //@{
+  /// are there new entries since last call? Does not move the entries ptr
+  static bool hasNewEntries();
+  /// returns an iterator range over the entries added since last time
+  /// newEntries was called
+  static CLIDVector_t newEntries();
+  //@}
+
+  /// Translate between CLID and type_info.
+  static const std::type_info* CLIDToTypeinfo (CLID clid);
+  static CLID typeinfoToCLID (const std::type_info& ti);
+
+
+  /// Out-of-line part of addEntry().
+  static bool addEntry (unsigned long clid,
+                        const std::type_info& ti,
+                        const char* typeName, 
+                        const Athena::PackageInfo& pkgInfo,
+                        const std::string& typeInfoName);
+
+private:
+  static CLIDRegistryImpl& impl();
+};
+
+
+template <unsigned long CLID>
+bool CLIDRegistry::addEntry(const std::type_info& ti,
+                            const char* typeName, 
+			    const Athena::PackageInfo& pkgInfo,
+			    const std::string& typeInfoName) {
+  static_assert (CLIDdetail::MINCLID <= CLID && CLID <= CLIDdetail::MAXCLID,
+                 "CLID out of CLIDRegistry range");
+
+  addEntry (CLID, ti, typeName, pkgInfo, typeInfoName);
+  return true;
+}
+
+
+#endif // ATHENAKERNEL_CLIDREGISTRY_H
diff --git a/Control/AthenaKernel/AthenaKernel/ClassID_traits.h b/Control/AthenaKernel/AthenaKernel/ClassID_traits.h
new file mode 100755
index 0000000000000000000000000000000000000000..73944a6e957748fa83e2a7ef95d815c764d0862b
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/ClassID_traits.h
@@ -0,0 +1,98 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef ATHENAKERNEL_CLASSID_TRAITS_H
+#define ATHENAKERNEL_CLASSID_TRAITS_H
+/** @file ClassID_traits.h
+ * @brief  a traits class that associates a CLID to a type T
+ * It also detects whether T inherits from Gaudi DataObject
+ *
+ * @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration
+ * $Id: ClassID_traits.h,v 1.3 2009-01-15 19:07:29 binet Exp $
+ */
+#include <string>
+#include <typeinfo>
+
+#include <boost/static_assert.hpp>
+
+#include "GaudiKernel/ClassID.h"
+#include "GaudiKernel/DataObject.h"
+#include "GaudiKernel/System.h"
+
+#include "AthenaKernel/CLIDRegistry.h"
+#include "AthenaKernel/ClassName.h"
+
+#include "AthenaKernel/tools/AthenaPackageInfo.h"
+#ifndef BOOST_HAS_STATIC_ASSERT
+# include "CxxUtils/unused.h"
+#endif
+#include <type_traits>
+
+
+
+template <bool x> struct ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION;
+template <>       struct ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION<true>{};
+
+///internal use: issues a compilation error when condition B is false
+#ifdef BOOST_HAS_STATIC_ASSERT
+#define MY_STATIC_ASSERT( B ) \
+  static_assert (B, "You should use the CLASS_DEF macro to define CLID and VERSION");
+#else
+#define MY_STATIC_ASSERT( B ) \
+  UNUSED(typedef ::boost::static_assert_test<                           \
+      sizeof(ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION< (bool)( B ) >)>\
+         BOOST_JOIN(boost_static_assert_typedef_, __LINE__))
+#endif
+
+/** @class ClassID_traits
+ * @brief  a traits class that associates a CLID to a type T
+ * It also detects whether T inherits from Gaudi DataObject
+ */
+template <typename T>
+struct ClassID_traits {
+  //default only works for DataObjects
+  typedef std::is_base_of<DataObject, T> isDObj_t; 
+  ///flags whether T inherits from DataObject
+  static const bool s_isDataObject = isDObj_t::value;
+
+  //default traits for class ID assignment
+  typedef std::integral_constant<bool, s_isDataObject> is_DataObject_tag;
+
+  ///the CLID of T
+  static const CLID& ID() { 
+    MY_STATIC_ASSERT(s_isDataObject);
+    return T::classID(); 
+  }
+
+  ///the demangled type name of T
+  static const std::string& typeName() {
+    MY_STATIC_ASSERT(s_isDataObject);
+    static const std::string tname = System::typeinfoName(typeid(T));
+    return tname;
+  }
+
+  ///the type id of T
+  static const std::type_info& typeInfo() {
+    MY_STATIC_ASSERT(s_isDataObject);
+    return typeid(T);
+  }
+
+  ///the package name of this CLASSDEF (and BY CONVENTION of the data obj too!)
+  static  Athena::PackageInfo packageInfo() {
+    MY_STATIC_ASSERT(s_isDataObject);
+    return Athena::PackageInfo("Package-00-00-00");
+  }
+
+  typedef std::false_type has_version_tag;
+  typedef std::false_type has_classID_tag;
+  static const int s_version = 0;
+
+  // Is this is true, these types will automatically be made
+  // const when added to StoreGate.
+  static const bool s_isConst = false;
+};
+
+#undef MY_STATIC_ASSERT
+
+#endif // not ATHENAKERNEL_CLASSID_TRAITS_H
diff --git a/Control/AthenaKernel/AthenaKernel/ClassName.h b/Control/AthenaKernel/AthenaKernel/ClassName.h
new file mode 100644
index 0000000000000000000000000000000000000000..7e87b242b4aae0f2c72343f6fb3bafb40cbc06a0
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/ClassName.h
@@ -0,0 +1,53 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: ClassName.h,v 1.1 2009-01-15 19:07:29 binet Exp $
+/**
+ * @file  AthenaKernel/ClassName.h
+ * @author scott snyder
+ * @date Jul 2005
+ * @brief An interface for getting the name of a class as a string.
+ */
+
+
+#ifndef ATHENAKERNEL_CLASSNAME_H
+#define ATHENAKERNEL_CLASSNAME_H
+
+
+#include <string>
+
+
+/**
+ * @brief An interface for getting the name of a class as a string.
+ *
+ * This template class provides an interface for getting the name
+ * of a class as a string.  By default, it uses @c typeinfoName
+ * from @c GaudiKernel, but it may be specialized to override
+ * the behavior for specific classes.
+ */
+template <class T>
+class ClassName
+{
+public:
+  /**
+   * @brief Return the name of class @c T as a string.
+   */
+  static std::string name()
+#ifdef __GNUC__
+    // Force this function to appear as a symbol in the output file,
+    // even in an optimized build where it's always inlined.
+    // Otherwise, we get complaints from cling that it can't find the symbol
+    // (as of root 6.04).
+    __attribute__ ((used))
+#endif
+    ;
+};
+
+
+#include "AthenaKernel/ClassName.icc"
+
+
+#endif // not ATHENAKERNEL_CLASSNAME_H
diff --git a/Control/SGTools/SGTools/ClassName.icc b/Control/AthenaKernel/AthenaKernel/ClassName.icc
similarity index 98%
rename from Control/SGTools/SGTools/ClassName.icc
rename to Control/AthenaKernel/AthenaKernel/ClassName.icc
index 55e22f24897c17181a457113d36cd1298db54793..a0b0d2be1f28727f0267f63a05265ee26b94cff2 100644
--- a/Control/SGTools/SGTools/ClassName.icc
+++ b/Control/AthenaKernel/AthenaKernel/ClassName.icc
@@ -4,7 +4,7 @@
 
 // $Id: ClassName.icc,v 1.1 2009-01-15 19:07:29 binet Exp $
 /**
- * @file  DataModel/ClassName.icc
+ * @file  AthenaKernel/ClassName.icc
  * @author scott snyder
  * @date Jul 2005
  * @brief An interface for getting the name of a class as a string.
diff --git a/Control/AthenaKernel/AthenaKernel/CondCont.h b/Control/AthenaKernel/AthenaKernel/CondCont.h
index f98eb460dfb7355dacb942d7d44e5b4d3b902a7d..718472ea9c1778328e40b80f53f18d3f6a7d9fbc 100644
--- a/Control/AthenaKernel/AthenaKernel/CondCont.h
+++ b/Control/AthenaKernel/AthenaKernel/CondCont.h
@@ -1,340 +1,437 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file AthenaKernel/CondCont.h
+ * @author Vakho, Charles, Scott
+ * @date 2017
+ * @brief Hold mappings of ranges to condition objects.
+ */
+
+#ifndef ATHENAKERNEL_CONDCONT_H
+#define ATHENAKERNEL_CONDCONT_H
 
-#ifndef IOVSVC_CONDCONT_H
-#define IOVSVC_CONDCONT_H 1
+#include "AthenaKernel/IOVEntryT.h"
+#include "AthenaKernel/ClassID_traits.h"
+#include "AthenaKernel/BaseInfo.h"
+
+#include "GaudiKernel/EventIDBase.h"
+#include "GaudiKernel/EventIDRange.h"
+#include "GaudiKernel/DataObjID.h"
 
 #include <iostream>
 #include <set>
 #include <vector>
 #include <typeinfo>
 #include <mutex>
-#include <typeinfo>
-
-#include "GaudiKernel/EventIDBase.h"
-#include "GaudiKernel/EventIDRange.h"
 
-#include "AthenaKernel/IOVEntryT.h"
-#include "GaudiKernel/DataObject.h"
-#include "GaudiKernel/DataObjID.h"
 
 namespace SG {
   class DataProxy;
-  template<class T>
-  class ReadCondHandle;
-  template<class T>
-  class WriteCondHandle;
 }
 
-class CondContBase {
+
+class CondContBase
+{
 public:
-  CondContBase() {};
-  virtual ~CondContBase(){};
+  /// Payload type held by this class.
+  /// Need to define this here for @c cast() to work properly.
+  typedef void Payload;
 
-  //  virtual void list() const { std::cout << "CCBase" << std::endl; }
-  virtual void list(std::ostringstream&) const = 0;
-  virtual int entries() const { return 0; }
-  virtual bool valid( const EventIDBase& t) const = 0;
+  /// Destructor.
+  virtual ~CondContBase() {};
+
+
+  /**
+   * @brief Return the CLID of the most-derived @c CondCont.
+   */
+  CLID clid() const;
+
+
+  /**
+   * @brief Return CLID/key corresponding to this container.
+   */
   virtual const DataObjID& id() const = 0;
-  virtual bool insert(const EventIDRange& r, DataObject* obj) = 0;
-  virtual bool insert(const EventIDRange& r, void* obj) = 0;
 
-  virtual SG::DataProxy* proxy() const = 0;
-  virtual void setProxy(SG::DataProxy*) = 0;
 
-  virtual bool range(const EventIDBase&, EventIDRange&) const = 0;
-  virtual std::vector<EventIDRange> ranges() const = 0;
+  /**
+   * @brief Return the associated @c DataProxy, if any.
+   */
+  virtual SG::DataProxy* proxy() = 0;
 
-private:
-};
 
-///////////////////////////////////////////////////////////////////////////
+  /**
+   * @brief Set the associated @c DataProxy.
+   * @param proxy The proxy to set.
+   */
+  virtual void setProxy(SG::DataProxy*) = 0;
 
-template <typename T>
-class CondCont: public CondContBase {
-public:
 
-  friend SG::ReadCondHandle<T>;
-  friend SG::WriteCondHandle<T>;
+  /**
+   * @brief Dump the container contents for debugging.
+   * @param ost Stream to which to write the dump.
+   */
+  virtual void list (std::ostream& ost) const = 0;
 
-  CondCont(const DataObjID& id, SG::DataProxy* prx=nullptr):
-    m_id(id), m_proxy(prx) {};
-  ~CondCont();
 
-  bool insert(const EventIDRange& r, DataObject* t);
-  bool insert(const EventIDRange& r, void* t);
-  bool insert(const EventIDRange& r, T* t);
+  /**
+   * @brief Return the number of conditions objects in the container.
+   */
+  virtual int entries() const = 0;
 
-  bool find(const EventIDBase& t, T*&) const;
 
-  virtual void list(std::ostringstream&) const;
-  virtual int entries() const;
+  /**
+   * @brief Return all IOV validity ranges defined in this container.
+   */
+  virtual std::vector<EventIDRange> ranges() const = 0;
 
-  virtual bool valid( const EventIDBase& t ) const;
 
-  virtual const DataObjID& id() const { return m_id; }
+  /** 
+   * @brief Insert a new conditions object.
+   * @param r Range of validity of this object.
+   * @param obj Pointer to the object being inserted.
+   *
+   * @c obj must point to an object of type @c T,
+   * except in the case of inheritance, where the type of @c obj must
+   * correspond to the most-derived @c CondCont type.
+   * The container will take ownership of this object.
+   *
+   * Returns true if the object was successfully inserted; false otherwise
+   * (ownership of the object will be taken in either case).
+   */
+  virtual bool typelessInsert (const EventIDRange& r, void* obj) = 0;
+
+
+  /**
+   * @brief Test to see if a given IOV time is mapped in the container.
+   * @param t IOV time to check.
+   */
+  virtual bool valid( const EventIDBase& t) const = 0;
 
-  virtual SG::DataProxy* proxy() const { return m_proxy; }
-  virtual void setProxy(SG::DataProxy* prx) { m_proxy = prx; }
 
-  virtual bool range(const EventIDBase&, EventIDRange&) const;
-  virtual std::vector<EventIDRange> ranges() const;
+  /**
+   * @brief Return the mapped validity range for an IOV time.
+   * @param t IOV time to check.
+   * @param r[out] The range containing @c t.
+   *
+   * Returns true if @c t is mapped; false otherwise.
+   */
+  virtual bool range (const EventIDBase& t, EventIDRange& r) const = 0;
+
+
+
+protected:
+  /**
+   * @brief Internal constructor.
+   * @param CLID of the most-derived @c CondCont.
+   * @param id CLID+key for this object.
+   * @param proxy @c DataProxy for this object.
+   */
+  CondContBase(CLID clid, const DataObjID& id, SG::DataProxy* proxy);
+
+
+  /**
+   * @brief Do pointer conversion for the payload type.
+   * @param clid CLID for the desired pointer type.
+   * @param ptr Pointer of type @c T*.
+   *
+   * Converts @c ptr from @c T* to a pointer to the type
+   * given by @c clid.  Returns nullptr if the conversion
+   * is not possible.
+   */
+  const void* cast (CLID clid, const void* ptr) const;
+
+
+  /** 
+   * @brief Internal lookup function.
+   * @param clid CLID for the desired pointer type.
+   * @param t IOV time to find.
+   * @param r If non-null, copy validity range of the object here.
+   *
+   * Looks up the conditions object corresponding to the IOV time @c t.
+   * If found, convert the pointer to a pointer to the type identified
+   * by CLID and return it.  Otherwise, return nullptr.
+   */
+  virtual const void* findByCLID (CLID clid,
+                                  const EventIDBase& t,
+                                  EventIDRange* r) const = 0;
 
+  
 private:
+  /// CLID of the most-derived @c CondCont
+  CLID m_clid;
+};
 
-  bool findEntry(const EventIDBase& t, const IOVEntryT<T>*&) const;
-
-  bool isRE(const EventIDBase&) const;
-  bool isTS(const EventIDBase&) const;
 
-  mutable std::mutex m_mut;
+///////////////////////////////////////////////////////////////////////////
 
-  typedef std::set<IOVEntryT<T>, typename IOVEntryT<T>::IOVEntryTStartCritereon > CondContSet;
-  CondContSet m_condSet_clock, m_condSet_RE;
 
-  DataObjID m_id;
+template <class T> class CondCont;
 
-  SG::DataProxy* m_proxy;
 
+/**
+ * @brief Traits class to find the base for @c CondCont.
+ *
+ * @c CondCont<T> normally derives from @c CondContBase.
+ * However, if @c D derives from @c B, then using @c CONDCONT_BASE(D,B)
+ * will cause @c ContCont<D> to derive from @c CondCont<B>.
+ */
+template <typename T>
+class CondContBaseInfo
+{
+public:
+  typedef CondContBase Base;
 };
 
-//
-///////////////////////////////////////////////////////////////////////////
-//
 
+namespace SG {
 template <typename T>
-CondCont<T>::~CondCont<T>() {
-  //  std::cout << "cleaning up - " << typeid( T ).name() << std::endl;
+struct Bases<CondCont<T> >
+{
+  typedef CondContBase Base1;               
+  typedef NoBase Base2;          
+  typedef NoBase Base3;      
+};
+} // namespace SG
+
+
+
+
+/**
+ * @brief Declare that conditions object @c D derives from @c B.
+ *
+ * This allows using @c ReadCondHandle to retrieve a conditions object
+ * of type @c D as @c B.
+ */
+#define CONDCONT_BASE(D, B)       \
+template <>                       \
+class CondContBaseInfo<D>         \
+{                                 \
+public:                           \
+  typedef CondCont<B> Base;       \
+};                                 \
+SG_BASE(CondCont<D>, CondCont<B>); \
+SG_BASE(D, B)
   
-  for (auto itr=m_condSet_clock.begin(); itr != m_condSet_clock.end(); ++itr) {
-    delete itr->objPtr();
-  }
-  m_condSet_clock.clear();
-  for (auto itr=m_condSet_RE.begin(); itr != m_condSet_RE.end(); ++itr) {
-    delete itr->objPtr();
-  }
-  m_condSet_RE.clear();
-}    
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-template <typename T>
-bool CondCont<T>::insert(const EventIDRange& r, void* obj) {
-  T* t = static_cast<T*>(obj);
 
-  return insert(r, t);
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
+/**
+ * @brief Hold mapping of ranges to condition objects.
+ *
+ * This object holds mappings from a set of IOV ranges (represented
+ * as EventIDRange) to conditions objects (which are owned by this object).
+ * It has methods to insert a new mapping and to retrieve objects
+ * by IOV time.
+ *
+ * This object is recorded in the conditions store, so it must have a CLID
+ * (the @c CondCont object, not @c T).
+ *
+ * It is possible for one conditions object to derive from another.
+ * For the case of class @c D deriving from @c B, use the macro
+ *
+ *@code
+ *  CONDCONT_BASE(D, B);
+ @endcode
+ *
+ * before any references to @c CondCont<D>.
+ * (At the moment, you will also need SG_BASE(D, B); but this should be
+ * temporary.)
+ * This is implemented by having @c CondCont<D> derive from @c CondCont<B>.
+ * In that case, the mappings will be stored only in the most-derived class.
+ */
 template <typename T>
-bool CondCont<T>::insert(const EventIDRange& r, DataObject* obj) {
-  T* t = dynamic_cast<T*>( obj );
-
-  if (t == 0) {
-    std::cerr << "CondCont<>T unable to dcast from DataObject to " 
-              << typeid(T).name()
-              << std::endl;
-    return false;
-  }
+class CondCont: public CondContBaseInfo<T>::Base
+{
+public:
+  /// Base class.
+  typedef typename CondContBaseInfo<T>::Base Base;
 
-  return insert(r, t);
-}
+  /// Payload type held by this class.
+  typedef T Payload;
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-template <typename T>
-bool CondCont<T>::insert(const EventIDRange& r, T* t) {
-
-  std::lock_guard<std::mutex> lock(m_mut);
-
-  if (r.start().isRunEvent() && r.stop().isRunEvent()) {
-    m_condSet_RE.emplace( IOVEntryT<T>(t, r) );
-  } else if (r.start().isTimeStamp() && r.stop().isTimeStamp()) {
-    m_condSet_clock.emplace( IOVEntryT<T>(t,r) );
-  } else {
-    std::cerr << "CondCont<T>::insert error: EventIDRange " << r 
-              << " is neither fully RunEvent nor TimeStamp" 
-              << std::endl;
-    return false;
-  }
-
-  return true;
-}
+  /** 
+   * @brief Constructor.
+   * @param id CLID+key for this object.
+   * @param proxy @c DataProxy for this object.
+   */
+  CondCont (const DataObjID& id, SG::DataProxy* proxy = nullptr);
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-template <typename T>
-bool CondCont<T>::valid(const EventIDBase& it) const {
-  typename CondContSet::const_iterator itr;
-  
-  std::lock_guard<std::mutex> lock(m_mut);
-
-  if (it.isRunEvent()) {
-    itr = m_condSet_RE.begin();
-    for (; itr != m_condSet_RE.end(); ++itr) {
-      if ( itr->range().isInRange( it ) ) {
-        return true;
-      }
-    }
-  } 
-  if (it.isTimeStamp()) {
-    itr = m_condSet_clock.begin();
-    for (; itr != m_condSet_clock.end(); ++itr) {
-      if ( itr->range().isInRange( it ) ) {
-        return true;
-      }
-    }
-  }
-        
-  return false;
-}
+  /// Destructor.
+  virtual ~CondCont();
+
+  /// No copying.
+  CondCont (const CondCont&) = delete;
+  CondCont& operator= (const CondCont&) = delete;
+
+
+  /**
+   * @brief Return CLID/key corresponding to this container.
+   */
+  virtual const DataObjID& id() const override;
+
+
+  /**
+   * @brief Return the associated @c DataProxy, if any.
+   */
+  virtual SG::DataProxy* proxy() override;
+
+
+  /**
+   * @brief Set the associated @c DataProxy.
+   * @param proxy The proxy to set.
+   */
+  virtual void setProxy (SG::DataProxy* proxy) override;
+
+
+  /**
+   * @brief Dump the container contents for debugging.
+   * @param ost Stream to which to write the dump.
+   */
+  virtual void list (std::ostream& ost) const override;
+
+
+  /**
+   * @brief Return the number of conditions objects in the container.
+   */
+  virtual int entries() const override;
+
+
+  /**
+   * @brief Return all IOV validity ranges defined in this container.
+   */
+  virtual std::vector<EventIDRange> ranges() const override;
+
+
+  /** 
+   * @brief Insert a new conditions object.
+   * @param r Range of validity of this object.
+   * @param obj Pointer to the object being inserted.
+   *
+   * @c obj must point to an object of type @c T,
+   * except in the case of inheritance, where the type of @c obj must
+   * correspond to the most-derived @c CondCont type.
+   * The container will take ownership of this object.
+   *
+   * Returns true if the object was successfully inserted; false otherwise
+   * (ownership of the object will be taken in either case).
+   */
+  virtual bool typelessInsert (const EventIDRange& r, void* obj) override;
+
+
+  /** 
+   * @brief Insert a new conditions object.
+   * @param r Range of validity of this object.
+   * @param obj Pointer to the object being inserted.
+   *
+   * @c obj must point to an object of type @c T.
+   * This will give an error if this is not called
+   * on the most-derived @c CondCont.
+   *
+   * Returns true if the object was successfully inserted; false otherwise.
+   */
+  bool insert (const EventIDRange& r, std::unique_ptr<T> obj);
+
+
+  /** 
+   * @brief Look up a conditions object for a given time.
+   * @param t IOV time to find.
+   * @param obj[out] Object found.
+   * @param r If non-null, copy validity range of the object here.
+   *
+   * Returns true if the object was found; false otherwide.
+   */
+  bool find (const EventIDBase& t,
+             T const*& obj,
+             EventIDRange* r = nullptr) const;
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-template <typename T>
-bool CondCont<T>::find(const EventIDBase& it, T*& t) const {
-  //  typename std::set<IOVEntryT<T>, IOVEntryTComp<T> >::const_iterator itr;
-  typename CondContSet::const_iterator itr;
+  /**
+   * @brief Test to see if a given IOV time is mapped in the container.
+   * @param t IOV time to check.
+   */
+  virtual bool valid (const EventIDBase& t) const override;
+
+
+  /**
+   * @brief Return the mapped validity range for an IOV time.
+   * @param t IOV time to check.
+   * @param r[out] The range containing @c t.
+   *
+   * Returns true if @c t is mapped; false otherwise.
+   */
+  virtual bool range (const EventIDBase& t, EventIDRange& r) const override;
+
   
-  std::lock_guard<std::mutex> lock(m_mut);
-
-  if (it.isRunEvent()) {
-    itr = m_condSet_RE.begin();
-    for (; itr != m_condSet_RE.end(); ++itr) {
-      if ( itr->range().isInRange( it ) ) {
-        t = itr->objPtr();
-        return true;
-      }
-    }
-  } 
-  if (it.isTimeStamp()) {
-    itr = m_condSet_clock.begin();
-    for (; itr != m_condSet_clock.end(); ++itr) {
-      if ( itr->range().isInRange( it ) ) {
-        t = itr->objPtr();
-        return true;
-      }
-    }
-  }
-
-  return false;
-}
+protected:
+  /**
+   * @brief Internal constructor.
+   * @param CLID of the most-derived @c CondCont.
+   * @param id CLID+key for this object.
+   * @param proxy @c DataProxy for this object.
+   */
+  CondCont (CLID clid, const DataObjID& id, SG::DataProxy* proxy);
+
+
+  /**
+   * @brief Do pointer conversion for the payload type.
+   * @param clid CLID for the desired pointer type.
+   * @param ptr Pointer of type @c T*.
+   *
+   * Converts @c ptr from @c T* to a pointer to the type
+   * given by @c clid.  Returns nullptr if the conversion
+   * is not possible.
+   */
+  const void* cast (CLID clid, const void* ptr) const;
+
+
+  /** 
+   * @brief Internal lookup function.
+   * @param clid CLID for the desired pointer type.
+   * @param t IOV time to find.
+   * @param r If non-null, copy validity range of the object here.
+   *
+   * Looks up the conditions object corresponding to the IOV time @c t.
+   * If found, convert the pointer to a pointer to the type identified
+   * by CLID and return it.  Otherwise, return nullptr.
+   */
+  virtual const void* findByCLID (CLID clid,
+                                  const EventIDBase& t,
+                                  EventIDRange* r) const override;
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-template <typename T>
-bool CondCont<T>::findEntry(const EventIDBase& it, const IOVEntryT<T>*& t) const {
-  typename CondContSet::const_iterator itr;
-  
-  std::lock_guard<std::mutex> lock(m_mut);
-
-  // if EventID is BOTH, we need to look in both sets
-  if (it.isRunEvent()) {
-    itr = m_condSet_RE.begin();
-    for (; itr != m_condSet_RE.end(); ++itr) {
-      if ( itr->range().isInRange( it ) ) {
-        t = &(*itr);
-        return true;
-      }
-    }
-  }
-  if (it.isTimeStamp()) {
-    itr = m_condSet_clock.begin();
-    for (; itr != m_condSet_clock.end(); ++itr) {
-      if ( itr->range().isInRange( it ) ) {
-        t = &(*itr);
-        return true;
-      }
-    }
-  }
-
-  return false;
-}
-    
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+private:
 
-template <typename T>
-void CondCont<T>::list(std::ostringstream& ost) const {
-  std::lock_guard<std::mutex> lock(m_mut);
-
-  ost << "id: " << m_id << "  proxy: " << m_proxy << std::endl;
-
-  ost << "clock: [" << m_condSet_clock.size() << "]" << std::endl;
-  //  std::set<IOVEntryT<T>, IOVEntryT<T>::IOVEntryTStartCritereon >::const_iterator itr = m_condSet_clock.begin();
-  typename CondContSet::const_iterator itr = m_condSet_clock.begin();
-  for (; itr != m_condSet_clock.end(); ++itr) {
-    ost << *itr << std::endl;
-  }
-  ost << "RE: [" << m_condSet_RE.size() << "]" << std::endl;
-  itr = m_condSet_RE.begin();
-  for (; itr != m_condSet_RE.end(); ++itr) {
-    ost << *itr << std::endl;
-  }
-}
+  /// Helper to ensure that the inheritance information for this class
+  /// gets initialized.
+  static void registerBaseInit();
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-template <typename T>
-int CondCont<T>::entries() const {
-  std::lock_guard<std::mutex> lock(m_mut);
-  return m_condSet_RE.size() + m_condSet_clock.size();
-}
+  /// Mutex used to protect the container.
+  typedef std::mutex mutex_t;
+  typedef std::lock_guard<mutex_t> lock_t;
+  mutable mutex_t m_mutex;
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-template <typename T>
-std::vector<EventIDRange> 
-CondCont<T>::ranges() const {
-  std::lock_guard<std::mutex> lock(m_mut);
-
-  std::vector<EventIDRange> r;
-  for (auto ent : m_condSet_RE) {
-    r.push_back( ent.range() );
-  }
-  for (auto ent : m_condSet_clock) {
-    r.push_back( ent.range() );
-  }
-
-  return r;
-}
+  /// Sets of mapped objects, by timestamp and run+LBN.
+  typedef std::set<IOVEntryT<T>,
+                   typename IOVEntryT<T>::IOVEntryTStartCritereon > CondContSet;
+  CondContSet m_condSet_clock, m_condSet_RE;
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+  /// CLID+key for this container.
+  DataObjID m_id;
+
+  /// Associated @c DataProxy.
+  SG::DataProxy* m_proxy;
+};
 
-template <typename T>
-bool
-CondCont<T>::range(const EventIDBase& now, EventIDRange& r) const {
-  std::lock_guard<std::mutex> lock(m_mut);
-
-  typename CondContSet::const_iterator itr;
-  if (now.isRunEvent()) {
-    itr = m_condSet_RE.begin();
-    for (; itr != m_condSet_RE.end(); ++itr) {
-      if ( itr->range().isInRange( now ) ) {
-        r = itr->range();
-        return true;
-      }
-    }
-  } 
-  if (now.isTimeStamp()) {
-    itr = m_condSet_clock.begin();
-    for (; itr != m_condSet_clock.end(); ++itr) {
-      if ( itr->range().isInRange( now ) ) {
-        r = itr->range();
-        return true;
-      }
-    }
-  }
-  
-  return false;
-}
 
+#include "AthenaKernel/CondCont.icc"
 
-// #include "SGTools/CLASS_DEF.h"
-// CLASS_DEF( CondContBase , 34480459 , 1 )
-// #include "SGTools/BaseInfo.h"
-// // SG_BASE( CondCont<Cont>, CondContBase )
 
-#endif
+#endif // not ATHENAKERNEL_CONDCONT_H
 
diff --git a/Control/AthenaKernel/AthenaKernel/CondCont.icc b/Control/AthenaKernel/AthenaKernel/CondCont.icc
new file mode 100644
index 0000000000000000000000000000000000000000..c559b7261ab03d5a0a6492ad3abeacad1da79a2b
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/CondCont.icc
@@ -0,0 +1,429 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file AthenaKernel/CondCont.icc
+ * @author Vakho, Charles, Scott
+ * @date 2017
+ * @brief Hold mappings of ranges to condition objects.
+ */
+
+
+/**
+ * @brief Return the CLID of the most-derived @c CondCont.
+ */
+inline
+CLID CondContBase::clid() const
+{
+  return m_clid;
+}
+
+
+/**
+ * @brief Internal constructor.
+ * @param CLID of the most-derived @c CondCont.
+ * @param id CLID+key for this object.
+ * @param proxy @c DataProxy for this object.
+ */
+inline
+CondContBase::CondContBase (CLID clid,
+                            const DataObjID& /*id*/,
+                            SG::DataProxy* /*proxy*/)
+  : m_clid (clid)
+{
+}
+
+
+/**
+ * @brief Do pointer conversion for the payload type.
+ * @param clid CLID for the desired pointer type.
+ * @param ptr Pointer of type @c T*.
+ *
+ * For the base class, we just return null.
+ */
+inline
+const void* CondContBase::cast (CLID /*clid*/, const void* /*ptr*/) const
+{
+  return nullptr;
+}
+
+
+///////////////////////////////////////////////////////////////////////////
+
+
+/** 
+ * @brief Constructor.
+ * @param id CLID+key for this object.
+ * @param proxy @c DataProxy for this object.
+ */
+template <class T>
+inline
+CondCont<T>::CondCont (const DataObjID& id, SG::DataProxy* proxy /*=nullptr*/)
+  : Base (ClassID_traits<CondCont<T> >::ID(), id, proxy),
+    m_id (id),
+    m_proxy (proxy)
+{
+  CondCont<T>::registerBaseInit();
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Destructor.
+ */
+template <typename T>
+CondCont<T>::~CondCont<T>() {
+  for (const IOVEntryT<T>& ent : m_condSet_clock) {
+    delete ent.objPtr();
+  }
+  for (const IOVEntryT<T>& ent : m_condSet_RE) {
+    delete ent.objPtr();
+  }
+}    
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Return CLID/key corresponding to this container.
+ */
+template <class T>
+inline
+const DataObjID& CondCont<T>::id() const
+{
+  return m_id;
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Return the associated @c DataProxy, if any.
+ */
+template <class T>
+inline
+SG::DataProxy* CondCont<T>::proxy()
+{
+  return m_proxy;
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Set the associated @c DataProxy.
+ * @param proxy The proxy to set.
+ */
+template <class T>
+inline
+void CondCont<T>::setProxy (SG::DataProxy* proxy)
+{
+  m_proxy = proxy;
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Dump the container contents for debugging.
+ * @param ost Stream to which to write the dump.
+ */
+template <typename T>
+void CondCont<T>::list (std::ostream& ost) const
+{
+  lock_t lock (m_mutex);
+
+  ost << "id: " << m_id << "  proxy: " << m_proxy << std::endl;
+
+  ost << "clock: [" << m_condSet_clock.size() << "]" << std::endl;
+  for (const IOVEntryT<T>& ent : m_condSet_clock) {
+    ost << ent << std::endl;
+  }
+  ost << "RE: [" << m_condSet_RE.size() << "]" << std::endl;
+  for (const IOVEntryT<T>& ent : m_condSet_RE) {
+    ost << ent << std::endl;
+  }
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Return the number of conditions objects in the container.
+ */
+template <typename T>
+int CondCont<T>::entries() const
+{
+  lock_t lock(m_mutex);
+  return m_condSet_RE.size() + m_condSet_clock.size();
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Return all IOV validity ranges defined in this container.
+ */
+template <typename T>
+std::vector<EventIDRange> 
+CondCont<T>::ranges() const
+{
+  lock_t lock(m_mutex);
+
+  std::vector<EventIDRange> r;
+  r.reserve (m_condSet_RE.size() + m_condSet_clock.size());
+  for (const IOVEntryT<T>& ent : m_condSet_RE) {
+    r.push_back( ent.range() );
+  }
+  for (const IOVEntryT<T>& ent : m_condSet_clock) {
+    r.push_back( ent.range() );
+  }
+
+  return r;
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/** 
+ * @brief Insert a new conditions object.
+ * @param r Range of validity of this object.
+ * @param obj Pointer to the object being inserted.
+ *
+ * @c obj must point to an object of type @c T,
+ * except in the case of inheritance, where the type of @c obj must
+ * correspond to the most-derived @c CondCont type.
+ * The container will take ownership of this object.
+ *
+ * Returns true if the object was successfully inserted; false otherwise
+ * (ownership of the object will be taken in either case).
+ */
+template <typename T>
+bool CondCont<T>::typelessInsert (const EventIDRange& r, void* obj)
+{
+  return insert (r, std::unique_ptr<T> (static_cast<T*>(obj)));
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/** 
+ * @brief Insert a new conditions object.
+ * @param r Range of validity of this object.
+ * @param obj Pointer to the object being inserted.
+ *
+ * @c obj must point to an object of type @c T.
+ * This will give an error if this is not called
+ * on the most-derived @c CondCont.
+ *
+ * Returns true if the object was successfully inserted; false otherwise.
+ */
+template <typename T>
+bool CondCont<T>::insert (const EventIDRange& r, std::unique_ptr<T> t)
+{
+  if (this->clid() != ClassID_traits<CondCont<T> >::ID()) {
+    std::cerr << "CondCont<T>::insert error: Not most-derived class."
+              << std::endl;
+    return false;
+  }
+
+  lock_t lock (m_mutex);
+
+  auto isRunLumi = [] (const EventIDBase& id)
+    { return id.run_number() != EventIDBase::UNDEFNUM &&
+             id.lumi_block() != EventIDBase::UNDEFNUM; };
+
+  if ((r.start().isRunEvent() && r.stop().isRunEvent()) ||
+      // LBN part of stop() will be UNDEFNUM for an open-ended range.
+      (isRunLumi(r.start()) && r.stop().run_number() != EventIDBase::UNDEFNUM))
+  {
+    m_condSet_RE.emplace( IOVEntryT<T>(t.release(), r) );
+  } else if (r.start().isTimeStamp() && r.stop().isTimeStamp()) {
+    m_condSet_clock.emplace( IOVEntryT<T>(t.release(), r) );
+  } else {
+    std::cerr << "CondCont<T>::insert error: EventIDRange " << r 
+              << " is neither fully RunEvent nor TimeStamp" 
+              << std::endl;
+    return false;
+  }
+
+  return true;
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/** 
+ * @brief Look up a conditions object for a given time.
+ * @param t IOV time to find.
+ * @param obj[out] Object found.
+ * @param r If non-null, copy validity range of the object here.
+ *
+ * Returns true if the object was found; false otherwide.
+ */
+template <typename T>
+bool CondCont<T>::find (const EventIDBase& t,
+                        T const *& obj,
+                        EventIDRange* r) const
+{
+  const void* ptr = findByCLID (ClassID_traits<CondCont<T> >::ID(), t, r);
+  obj = reinterpret_cast<const T*> (ptr);
+  return obj != nullptr;
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Test to see if a given IOV time is mapped in the container.
+ * @param t IOV time to check.
+ */
+template <typename T>
+bool CondCont<T>::valid (const EventIDBase& t) const
+{
+  return findByCLID (this->clid(), t, nullptr) != nullptr;
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Return the mapped validity range for an IOV time.
+ * @param t IOV time to check.
+ * @param r[out] The range containing @c t.
+ *
+ * Returns true if @c t is mapped; false otherwise.
+ */
+template <typename T>
+bool
+CondCont<T>::range(const EventIDBase& t, EventIDRange& r) const
+{
+  return findByCLID (this->clid(), t, &r) != nullptr;
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Internal constructor.
+ * @param CLID of the most-derived @c CondCont.
+ * @param id CLID+key for this object.
+ * @param proxy @c DataProxy for this object.
+ */
+template <typename T>
+inline
+CondCont<T>::CondCont (CLID clid, const DataObjID& id, SG::DataProxy* proxy)
+  : Base (clid, id, proxy),
+    m_id(id),
+    m_proxy(proxy)
+{
+  CondCont<T>::registerBaseInit();
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Do pointer conversion for the payload type.
+ * @param clid CLID for the desired pointer type.
+ * @param ptr Pointer of type @c T*.
+ *
+ * Converts @c ptr from @c T* to a pointer to the type
+ * given by @c clid.  Returns nullptr if the conversion
+ * is not possible.
+ */
+template <typename T>
+const void* CondCont<T>::cast (CLID clid, const void* ptr) const
+{
+  if (clid == ClassID_traits<CondCont<T> >::ID())
+    return ptr;
+  return Base::cast (clid, static_cast<const typename Base::Payload*>
+                             (reinterpret_cast<const T*> (ptr)));
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/** 
+ * @brief Internal lookup function.
+ * @param clid CLID for the desired pointer type.
+ * @param t IOV time to find.
+ * @param r If non-null, copy validity range of the object here.
+ *
+ * Looks up the conditions object corresponding to the IOV time @c t.
+ * If found, convert the pointer to a pointer to the type identified
+ * by CLID and return it.  Otherwise, return nullptr.
+ */
+template <typename T>
+const void* CondCont<T>::findByCLID (CLID clid,
+                                     const EventIDBase& t,
+                                     EventIDRange* r) const
+{
+  const void* ptr = nullptr;
+  {
+    lock_t lock (m_mutex);
+
+    if (t.isRunLumi()) {
+      for (const IOVEntryT<T>& ent : m_condSet_RE) {
+        if ( ent.range().isInRange(t) ) {
+          if (r) {
+            *r = ent.range();
+          }
+          ptr = ent.objPtr();
+          break;
+        }
+      }
+    } 
+
+    if (!ptr && t.isTimeStamp()) {
+      for (const IOVEntryT<T>& ent : m_condSet_clock) {
+        if ( ent.range().isInRange(t) ) {
+          if (r) {
+            *r = ent.range();
+          }
+          ptr = ent.objPtr();
+          break;
+        }
+      }
+    }
+  }
+
+  // Do pointer conversion if needed.
+  if (ptr && clid != ClassID_traits<CondCont<T> >::ID()) {
+    ptr = Base::cast (clid, static_cast<const typename Base::Payload*>
+                              (reinterpret_cast<const T*> (ptr)));
+  }
+
+  return ptr;
+}
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+
+/**
+ * @brief Helper to ensure that the inheritance information for this class
+ *               gets initialized.
+ */
+template <class T>
+void CondCont<T>::registerBaseInit()
+{
+  static const SG::RegisterBaseInit<CondCont> rbi;
+}
diff --git a/Control/AthenaKernel/AthenaKernel/DataObjectSharedPtr.h b/Control/AthenaKernel/AthenaKernel/DataObjectSharedPtr.h
index 1095d51b45ae218f458a939d2493088ea542f6a4..cb0ae7a3834aa658799d26e978d122a10d331d88 100644
--- a/Control/AthenaKernel/AthenaKernel/DataObjectSharedPtr.h
+++ b/Control/AthenaKernel/AthenaKernel/DataObjectSharedPtr.h
@@ -53,6 +53,9 @@ public:
   template <class U>
   DataObjectSharedPtr (const DataObjectSharedPtr<U>& rhs)
     : Base (rhs) {}
+
+  // Avoid coverity warning.
+  DataObjectSharedPtr& operator= (const DataObjectSharedPtr& rhs) = default;
 };
 
 
diff --git a/Control/AthenaKernel/AthenaKernel/EventContextClid.h b/Control/AthenaKernel/AthenaKernel/EventContextClid.h
new file mode 100644
index 0000000000000000000000000000000000000000..eb926a9a1ad86e88ff3438fa9693aee2c659217b
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/EventContextClid.h
@@ -0,0 +1,25 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file AthenaKernel/EventContextClid.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Assign a CLID to EventContext.
+ */
+
+
+#ifndef ATHENAKERNEL_EVENTCONTEXTCLID_H
+#define ATHENAKERNEL_EVENTCONTEXTCLID_H
+
+
+#include "AthenaKernel/CLASS_DEF.h"
+#include "GaudiKernel/EventContext.h"
+
+
+CLASS_DEF(EventContext, 55596997, 0)
+
+
+#endif // not ATHENAKERNEL_EVENTCONTEXTCLID_H
diff --git a/Control/AthenaKernel/AthenaKernel/ExtendedEventContext.h b/Control/AthenaKernel/AthenaKernel/ExtendedEventContext.h
index 50ba86eed0ea8a7241aafae7cc6e6dd032408866..0488b6d653b205352be290db96d8f32a6a3d8180 100644
--- a/Control/AthenaKernel/AthenaKernel/ExtendedEventContext.h
+++ b/Control/AthenaKernel/AthenaKernel/ExtendedEventContext.h
@@ -6,6 +6,7 @@
 #define ATHENAKERNEL_EXTENDEDEVNETCONTEXT_H 1
 
 #include "AthenaKernel/IProxyDict.h"
+#include "GaudiKernel/EventIDBase.h"
 
 namespace Atlas {
 
@@ -13,14 +14,22 @@ namespace Atlas {
   public:
     ExtendedEventContext(){};
 
-    ExtendedEventContext(IProxyDict* p): m_proxy(p){};
+    ExtendedEventContext(IProxyDict* p,
+                         EventIDBase::number_type conditionsRun = EventIDBase::UNDEFNUM)
+      : m_proxy (p), m_conditionsRun (conditionsRun)
+    {}
 
     void setProxy(IProxyDict* proxy) { m_proxy = proxy; }
     IProxyDict* proxy() const { return m_proxy; }
-    
+
+    void setConditionsRun (EventIDBase::number_type conditionsRun)
+    { m_conditionsRun = conditionsRun; }
+    EventIDBase::number_type conditionsRun() const
+    { return m_conditionsRun;  }
+
   private:
     IProxyDict* m_proxy {nullptr};
-
+    EventIDBase::number_type m_conditionsRun {EventIDBase::UNDEFNUM};
   };
 }
 
diff --git a/Control/AthenaKernel/AthenaKernel/IAddressProvider.h b/Control/AthenaKernel/AthenaKernel/IAddressProvider.h
index 626af2ae519571f1b2d49d09a52f7516a77ed7a5..8a82178b4c8717d46dd0a0375020485c20fbdf42 100644
--- a/Control/AthenaKernel/AthenaKernel/IAddressProvider.h
+++ b/Control/AthenaKernel/AthenaKernel/IAddressProvider.h
@@ -19,6 +19,7 @@
 #include "AthenaKernel/StoreID.h"
 
 //<<<<<< FORWARD DECLARATIONS                                           >>>>>>
+class EventContext;
 namespace SG {
   class TransientAddress;
 }
@@ -42,8 +43,12 @@ public:
   }
 
   /// update a transient Address
+  /// The ctx argument will give the current event information.
+  /// If we're not dealing with an event store (conditions, etc), then
+  /// the context will be empty (default-initialized).
   virtual StatusCode updateAddress(StoreID::type storeID,
-				   SG::TransientAddress* pTAd) = 0;
+				   SG::TransientAddress* pTAd,
+                                   const EventContext& ctx) = 0;
 
   virtual ~IAddressProvider() {}
 };
diff --git a/Control/AthenaKernel/AthenaKernel/IIOVDbSvc.h b/Control/AthenaKernel/AthenaKernel/IIOVDbSvc.h
index ff2ab6d647339fd090b518e0e5f3c61dbd8f5987..1ffb765fbc6d7ea94ab13d85e0160df7f75a4ede 100644
--- a/Control/AthenaKernel/AthenaKernel/IIOVDbSvc.h
+++ b/Control/AthenaKernel/AthenaKernel/IIOVDbSvc.h
@@ -18,15 +18,9 @@
  *****************************************************************************/
 
 #include "GaudiKernel/IInterface.h"
-#ifndef _CPP_STRING
 #include <string>
-#endif
-#ifndef KERNEL_STATUSCODES_H
 #include "GaudiKernel/StatusCode.h"
-#endif
-#ifndef GAUDIKERNEL_CLASSID_H
 #include "GaudiKernel/ClassID.h"
-#endif
 
 // Declaration of the interface ID. 
 static const InterfaceID IID_IOVDbSvc("IOVDbSvc", 1 , 0);   
@@ -34,6 +28,7 @@ static const InterfaceID IID_IOVDbSvc("IOVDbSvc", 1 , 0);
 class IOVRange;
 class IOVTime;
 class IOpaqueAddress;
+class EventContext;
 
 /**
  *
@@ -61,7 +56,8 @@ public:
 				      const std::string& tag ) = 0;
 
     /// Set time for begin run
-    virtual StatusCode signalBeginRun(const IOVTime& beginRunTime) = 0;
+    virtual StatusCode signalBeginRun(const IOVTime& beginRunTime,
+                                      const EventContext& ctx) = 0;
 
     /// Signal that callback has been fired
     virtual void       signalEndProxyPreload() = 0;
diff --git a/Control/AthenaKernel/AthenaKernel/IProxyProviderSvc.h b/Control/AthenaKernel/AthenaKernel/IProxyProviderSvc.h
index 86e4d3371d6b0eea3cfe93c958849ac10ef86580..3d3aa093bcda2f7aad0cb0474b906537cb577c7f 100644
--- a/Control/AthenaKernel/AthenaKernel/IProxyProviderSvc.h
+++ b/Control/AthenaKernel/AthenaKernel/IProxyProviderSvc.h
@@ -19,6 +19,7 @@
 #include "GaudiKernel/IService.h"
 #include "GaudiKernel/StatusCode.h"
 #include "GaudiKernel/ClassID.h"
+#include "GaudiKernel/EventContext.h"
 
 class IAddressProvider;
 class IProxyRegistry; //this is the store
@@ -43,10 +44,6 @@ public:
 				       const std::string& key,
 				       IProxyRegistry& dataStore) = 0;
 
-  /// Update a transient Address:
-  virtual StatusCode updateAddress(StoreID::type sID,
-				   SG::TransientAddress* pTAd) = 0; 
-
   ///IAddressProvider manager functionality
   ///add a provider to the set of known ones. PROVIDER IS OWNED BY THE CLIENT
   virtual void addProvider(IAddressProvider* aProvider) = 0;
diff --git a/Control/AthenaKernel/AthenaKernel/IThinningSvc.h b/Control/AthenaKernel/AthenaKernel/IThinningSvc.h
index 5f017bb824425662f23ce4c355bd3c9197c83bac..fdaedf2860e05942277ddb9be7049298b3cb57e8 100644
--- a/Control/AthenaKernel/AthenaKernel/IThinningSvc.h
+++ b/Control/AthenaKernel/AthenaKernel/IThinningSvc.h
@@ -144,7 +144,7 @@ class IThinningSvc : virtual public IService,
    *         thinning service.
    *  @param activeSvc the new active thinning svc instance. 
    *         If null pointer, then returns old/current active thinning svc
-   *  @param override the current activeSvc with the given one, even if
+   *  @param overrideSvc the current activeSvc with the given one, even if
    *         the given one is NULL.
    *  FIXME: this is a horrible hack and bad things will happen in a 
    *         multithreaded mode. It is well possible the active thinning svc
@@ -155,11 +155,12 @@ class IThinningSvc : virtual public IService,
    *         as the converters which need that @c IThinningSvc instance to
    *         recompute the correct indices of thinned containers, are "framework
    *         blind", it would just be moving the problem elsewhere...
-   *  Note: would it be OK to put the holder of the active thinning svc in a
-   *        thread-local storage ?
+   *
+   *         The pointer is now in thread-local storage, which should alleviate
+   *         most of the problem.  Thinning still needs to be rethought for MT.
    */
   static IThinningSvc* instance( IThinningSvc* activeSvc = 0,
-				 bool override = false );
+				 bool overrideSvc = false );
 
   /// @brief A helper method to select elements from a DataVector container.
   /// the elements of the @a filter vector are 'true' for the elements to be
diff --git a/Control/AthenaKernel/AthenaKernel/MetaCont.h b/Control/AthenaKernel/AthenaKernel/MetaCont.h
new file mode 100644
index 0000000000000000000000000000000000000000..a22c5827ccd15c7fbdfd2ebdd11c3bb7af8d9d00
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/MetaCont.h
@@ -0,0 +1,265 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef IOVSVC_METACONT_H
+#define IOVSVC_METACONT_H 1
+
+#include <iostream>
+#include <set>
+#include <vector>
+#include <typeinfo>
+#include <mutex>
+#include <typeinfo>
+
+#include "GaudiKernel/DataObject.h"
+#include "GaudiKernel/DataObjID.h"
+
+//#include "PersistentDataModel/Guid.h"
+
+namespace SG {
+  class DataProxy;
+  template<class T>
+  class ReadMetaHandle;
+  template<class T>
+  class WriteMetaHandle;
+}
+
+class MetaContBase {
+//typedef Guid SourceID;
+public:
+  typedef std::string SourceID;
+  MetaContBase() {};
+  virtual ~MetaContBase(){};
+
+  //  virtual void list() const { std::cout << "CCBase" << std::endl; }
+  virtual void list(std::ostringstream&) const = 0;
+  virtual int entries() const { return 0; }
+  virtual bool valid( const SourceID& t) const = 0;
+  virtual const DataObjID& id() const = 0;
+  virtual bool insert(const SourceID& sid, DataObject* obj) = 0;
+  virtual bool insert(const SourceID& sid, void* obj) = 0;
+
+  virtual SG::DataProxy* proxy() const = 0;
+  virtual void setProxy(SG::DataProxy*) = 0;
+
+  virtual std::vector<SourceID> sources() const = 0;
+
+private:
+};
+
+///////////////////////////////////////////////////////////////////////////
+
+template <typename T>
+class MetaCont: public MetaContBase {
+public:
+
+  friend SG::ReadMetaHandle<T>;
+  friend SG::WriteMetaHandle<T>;
+
+  MetaCont(const DataObjID& id, SG::DataProxy* prx=nullptr):
+    m_id(id), m_proxy(prx) {};
+  ~MetaCont();
+
+  bool insert(const SourceID& r, DataObject* t);
+  bool insert(const SourceID& r, void* t);
+  bool insert(const SourceID& r, T* t);
+
+  bool find(const SourceID& t, T*&) const;
+
+  virtual void list(std::ostringstream&) const;
+  virtual int entries() const;
+
+  virtual bool valid( const SourceID& t ) const;
+
+  virtual const DataObjID& id() const { return m_id; }
+
+  virtual SG::DataProxy* proxy() const { return m_proxy; }
+  virtual void setProxy(SG::DataProxy* prx) { m_proxy = prx; }
+
+  virtual std::vector<SourceID> sources() const;
+
+private:
+
+  //bool findEntry(const EventIDBase& t, const IOVEntryT<T>*&) const;
+
+  mutable std::mutex m_mut;
+
+  //typedef std::set<IOVEntryT<T>, typename IOVEntryT<T>::IOVEntryTStartCritereon > MetaContSet;
+  typedef std::map<SourceID,T*> MetaContSet;
+  MetaContSet m_metaSet;
+
+  DataObjID m_id;
+
+  SG::DataProxy* m_proxy;
+
+};
+
+//
+///////////////////////////////////////////////////////////////////////////
+//
+
+template <typename T>
+MetaCont<T>::~MetaCont<T>() {
+  //  std::cout << "cleaning up - " << typeid( T ).name() << std::endl;
+  
+  for (auto itr=m_metaSet.begin(); itr != m_metaSet.end(); ++itr) {
+    //delete itr->objPtr();
+    delete itr->second;
+  }
+  m_metaSet.clear();
+}    
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+template <typename T>
+bool MetaCont<T>::insert(const SourceID& r, void* obj) {
+  T* t = static_cast<T*>(obj);
+
+  return insert(r, t);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+template <typename T>
+bool MetaCont<T>::insert(const SourceID& r, DataObject* obj) {
+  T* t = dynamic_cast<T*>( obj );
+
+  if (t == 0) {
+    std::cerr << "MetaCont<>T unable to dcast from DataObject to " 
+              << typeid(T).name()
+              << std::endl;
+    return false;
+  }
+
+  return insert(r, t);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+template <typename T>
+bool MetaCont<T>::insert(const SourceID& r, T* t) {
+
+  std::lock_guard<std::mutex> lock(m_mut);
+
+  return m_metaSet.insert(std::make_pair(r,t)).second;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+template <typename T>
+bool MetaCont<T>::valid(const SourceID& it) const {
+  typename MetaContSet::const_iterator itr;
+  
+  std::lock_guard<std::mutex> lock(m_mut);
+
+  return m_metaSet.find(it)!=m_metaSet.end();
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+template <typename T>
+bool MetaCont<T>::find(const SourceID& it, T*& t) const {
+  typename MetaContSet::const_iterator itr;
+  
+  std::lock_guard<std::mutex> lock(m_mut);
+
+  //std::cerr << "MetaCont find SID " << it << std::endl;
+
+  itr = m_metaSet.find(it);
+  if (itr != m_metaSet.end()) {
+    t=itr->second;
+    return true;
+  }
+/*
+  else {
+    t=0;
+    typename MetaContSet::const_iterator it=m_metaSet.begin();
+    for (; it != m_metaSet.end(); ++it) {
+      std::cerr << "Container has SID=" << it->first << std::endl;
+    }
+  }
+*/
+  return false;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+template <typename T>
+bool MetaCont<T>::findEntry(const EventIDBase& it, const IOVEntryT<T>*& t) const {
+  typename MetaContSet::const_iterator itr;
+  
+  std::lock_guard<std::mutex> lock(m_mut);
+
+  // if EventID is BOTH, we need to look in both sets
+  if (it.isRunEvent()) {
+    itr = m_condSet_RE.begin();
+    for (; itr != m_condSet_RE.end(); ++itr) {
+      if ( itr->range().isInRange( it ) ) {
+        t = &(*itr);
+        return true;
+      }
+    }
+  }
+  if (it.isTimeStamp()) {
+    itr = m_condSet_clock.begin();
+    for (; itr != m_condSet_clock.end(); ++itr) {
+      if ( itr->range().isInRange( it ) ) {
+        t = &(*itr);
+        return true;
+      }
+    }
+  }
+
+  return false;
+}
+*/
+    
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+template <typename T>
+void MetaCont<T>::list(std::ostringstream& ost) const {
+  std::lock_guard<std::mutex> lock(m_mut);
+
+  ost << "id: " << m_id << "  proxy: " << m_proxy << std::endl;
+
+  ost << "Meta: [" << m_metaSet.size() << "]" << std::endl;
+  //auto itr = m_metaSet.begin();
+  //for (; itr != m_metaSet.end(); ++itr) {
+  //  ost << *(itr->second) << std::endl;
+  //}
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+template <typename T>
+int MetaCont<T>::entries() const {
+  std::lock_guard<std::mutex> lock(m_mut);
+  return m_metaSet.size();
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+template <typename T>
+std::vector<MetaContBase::SourceID> 
+MetaCont<T>::sources() const {
+  std::lock_guard<std::mutex> lock(m_mut);
+
+  std::vector<MetaContBase::SourceID> r;
+  for (auto ent : m_metaSet) {
+    r.push_back(ent.first);
+  }
+
+  return r;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+#include "SGTools/CLASS_DEF.h"
+CLASS_DEF( MetaContBase , 34480469 , 1 )
+//#include "SGTools/BaseInfo.h"
+//SG_BASE( MetaCont<Cont>, MetaContBase )
+
+#endif
+
diff --git a/Control/AthenaKernel/AthenaKernel/MsgStreamMember.h b/Control/AthenaKernel/AthenaKernel/MsgStreamMember.h
index b651fa4cea5a95054006e3f39b891fb5dbee4502..04d40be6e66d265039e1f8af46cbc3aca2c93364 100644
--- a/Control/AthenaKernel/AthenaKernel/MsgStreamMember.h
+++ b/Control/AthenaKernel/AthenaKernel/MsgStreamMember.h
@@ -68,17 +68,17 @@ namespace Athena {
     ~MsgStreamMember();
 
     /// upon first access sets m_ims as needed
-    MsgStream& get() const;
+    MsgStream& get();
 
   private:
-    mutable IMessageSvcHolder m_ims; //mutable to have op() const
+    IMessageSvcHolder m_ims;
     /// the label to be printed by the stream (usually name())
     std::string m_label;
-    mutable MsgStream* m_stream; //mutable to have op() const
+    MsgStream* m_stream;
   };
 }
 template <typename T>
-MsgStream& operator << (const Athena::MsgStreamMember& stream, const T& rhs) {
+MsgStream& operator << (Athena::MsgStreamMember& stream, const T& rhs) {
   return (stream.get() << rhs);
 }
 
diff --git a/Control/AthenaKernel/AthenaKernel/SlotSpecificObj.h b/Control/AthenaKernel/AthenaKernel/SlotSpecificObj.h
new file mode 100644
index 0000000000000000000000000000000000000000..92b93bb62a1d9bdaf3b39a10a5afb3a5121f0738
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/SlotSpecificObj.h
@@ -0,0 +1,161 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file AthenaKernel/SlotSpecificObj.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Maintain a set of objects, one per slot.
+ */
+
+
+#ifndef ATHENAKERNEL_SLOTSPECIFICOBJ_H
+#define ATHENAKERNEL_SLOTSPECIFICOBJ_H
+
+
+#include "CxxUtils/checker_macros.h"
+#include "GaudiKernel/ThreadLocalContext.h"
+#include "GaudiKernel/EventContext.h"
+#include <vector>
+#include <string>
+
+
+namespace SG {
+
+
+/**
+ * @brief Return the number of event slots.
+ */
+size_t getNSlots();
+
+
+/**
+ * @brief Allow setting the name of the whiteboard service.
+ *
+ * For testing.
+ */
+void setNSlotsHiveMgrName ATLAS_NOT_THREAD_SAFE (const std::string& s);
+
+
+/**
+ * @brief Maintain a set of objects, one per slot.
+ *
+ * The payload @c T must be default-constructable.  One such instance of @c T
+ * will be made for each event slot.
+ *
+ * The usual pointer operators may be used to access the object, as well as @c get().
+ * @c get() also takes an optional event context argument, to allow specifying
+ * the slot explicitly, rather than looking it up in a thread-local global.
+ *
+ * This class does not do anything itself to protect the contents
+ * of the payload objects against simultaneous access from different threads.
+ * Especially if the owner is a service or a reentrant algorithm,
+ * multiple threads may be executing  simultaneously for the same slot.
+ * In such cases, @c T must be safe against simultaneous access from
+ * multiple threads, possibly with an internal lock or using std::atomic.
+ *
+ * This is similiar to @c ContextSpecificPtr from Gaudi, but with some
+ * important differences:
+ *
+ *   - The payload objects are managed and owned by this class.
+ *   - Rather than using an unordered_map with locking, we just use a vector,
+ *     indexed by slot.  We thus don't need any locking.  The price of this
+ *     is that we need to know the number of slots when we're constructed.
+ *   - We allow requesting a given slot explicitly, via an @c EventContext argument.
+ */
+template <class T>
+class SlotSpecificObj
+{
+public:
+  /**
+   * @brief Constructor.
+   *
+   * The number of slots will be found by calling @c getNSlots().
+   */
+  SlotSpecificObj();
+
+  
+  /**
+   * @brief Constructor, with number of slots specified explicitly.
+   * @param nslots The number of event slots.
+   */
+  SlotSpecificObj (size_t nslots);
+
+
+  /**
+   * @brief Return pointer to the object for slot given by @c ctx.
+   * @param ctx Event context giving the desired slot.
+   */
+  T* get (const EventContext& ctx);
+
+
+  /**
+   * @brief Return pointer to the object for the current slot.
+   *
+   * The slot number is found by retrieving the global current context.
+   */
+  T* get();
+
+
+  /**
+   * @brief Return pointer to the object for slot given by @c ctx.
+   * @param ctx Event context giving the desired slot.
+   */
+  const T* get (const EventContext& ctx) const;
+
+
+  /**
+   * @brief Return pointer to the object for the current slot.
+   *
+   * The slot number is found by retrieving the global current context.
+   */
+  const T* get() const;
+
+
+  /**
+   * @brief Dereference the pointer.
+   *
+   * The slot number is found by retrieving the global current context.
+   */
+  T& operator* ();
+
+
+  /**
+   * @brief Dereference the pointer.
+   *
+   * The slot number is found by retrieving the global current context.
+   */
+  const T& operator* () const;
+
+
+  /**
+   * @brief Dereference the pointer.
+   *
+   * The slot number is found by retrieving the global current context.
+   */
+  T* operator-> ();
+
+
+  /**
+   * @brief Dereference the pointer.
+   *
+   * The slot number is found by retrieving the global current context.
+   */
+  const T* operator-> () const;
+
+  
+private:
+  /// Set of per-slot objects.
+  std::vector<T> m_slots;
+};
+
+
+} // namespace SG
+
+
+#include "AthenaKernel/SlotSpecificObj.icc"
+
+
+#endif // not ATHENAKERNEL_SLOTSPECIFICOBJ_H
diff --git a/Control/AthenaKernel/AthenaKernel/SlotSpecificObj.icc b/Control/AthenaKernel/AthenaKernel/SlotSpecificObj.icc
new file mode 100644
index 0000000000000000000000000000000000000000..f6cf257fb2c0f46ec25ff19fff537439c1d3cf58
--- /dev/null
+++ b/Control/AthenaKernel/AthenaKernel/SlotSpecificObj.icc
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file AthenaKernel/SlotSpecificObj.icc
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Maintain a set of objects, one per slot.
+ */
+
+
+#include <cassert>
+
+
+namespace SG {
+
+
+/**
+ * @brief Constructor.
+ *
+ * The number of slots will be found by calling @c getNSlots().
+ */
+template <class T>
+inline
+SlotSpecificObj<T>::SlotSpecificObj()
+  : SlotSpecificObj (getNSlots())
+{
+}
+
+
+/**
+ * @brief Constructor, with number of slots specified explicitly.
+ * @param nslots The number of event slots.
+ */
+template <class T>
+inline
+SlotSpecificObj<T>::SlotSpecificObj (size_t nslots)
+  : m_slots (nslots)
+{
+}
+
+
+/**
+ * @brief Return pointer to the object for slot given by @c ctx.
+ * @param ctx Event context giving the desired slot.
+ */
+template <class T>
+inline
+T* SlotSpecificObj<T>::get (const EventContext& ctx)
+{
+  size_t slot = ctx.slot();
+  assert (slot < m_slots.size());
+  return &m_slots[slot];
+}
+
+
+/**
+ * @brief Return pointer to the object for the current slot.
+ *
+ * The slot number is found by retrieving the global current context.
+ */
+template <class T>
+inline
+T* SlotSpecificObj<T>::get()
+{
+  return get (Gaudi::Hive::currentContext());
+}
+
+
+/**
+ * @brief Return pointer to the object for slot given by @c ctx.
+ * @param ctx Event context giving the desired slot.
+ */
+template <class T>
+inline
+const T* SlotSpecificObj<T>::get (const EventContext& ctx) const
+{
+  size_t slot = ctx.slot();
+  assert (slot < m_slots.size());
+  return &m_slots[slot];
+}
+
+
+/**
+ * @brief Return pointer to the object for the current slot.
+ *
+ * The slot number is found by retrieving the global current context.
+ */
+template <class T>
+inline
+const T* SlotSpecificObj<T>::get() const
+{
+  return get (Gaudi::Hive::currentContext());
+}
+
+
+/**
+ * @brief Dereference the pointer.
+ *
+ * The slot number is found by retrieving the global current context.
+ */
+template <class T>
+inline
+T& SlotSpecificObj<T>::operator* ()
+{
+  return *get();
+}
+
+
+/**
+ * @brief Dereference the pointer.
+ *
+ * The slot number is found by retrieving the global current context.
+ */
+template <class T>
+inline
+const T& SlotSpecificObj<T>::operator* () const
+{
+  return *get();
+}
+
+
+/**
+ * @brief Dereference the pointer.
+ *
+ * The slot number is found by retrieving the global current context.
+ */
+template <class T>
+inline
+T* SlotSpecificObj<T>::operator-> ()
+{
+  return get();
+}
+
+
+/**
+ * @brief Dereference the pointer.
+ *
+ * The slot number is found by retrieving the global current context.
+ */
+template <class T>
+inline
+const T* SlotSpecificObj<T>::operator-> () const
+{
+  return get();
+}
+
+  
+} // namespace SG
diff --git a/Control/AthenaKernel/AthenaKernel/StoreID.h b/Control/AthenaKernel/AthenaKernel/StoreID.h
index 55eb838f710df13a4c2309e1f593d4ed46a46d20..ee2f46394066b94d7dd53d64e6759a5e45917ea6 100644
--- a/Control/AthenaKernel/AthenaKernel/StoreID.h
+++ b/Control/AthenaKernel/AthenaKernel/StoreID.h
@@ -19,6 +19,8 @@ class StoreID
 
  public:
 
+  // DEFINITIONS HERE MUST BE KEPT SYNCHRONIZED WITH AthenaKernel/python/StoreID.py.
+
   typedef enum {
 
     EVENT_STORE = 0,
@@ -27,6 +29,7 @@ class StoreID
     METADATA_STORE,
     SIMPLE_STORE,
     SPARE_STORE,
+    PILEUP_STORE,
     UNKNOWN
   } type;
 
diff --git a/Control/AthenaKernel/AthenaKernel/Timeout.h b/Control/AthenaKernel/AthenaKernel/Timeout.h
index 7b68a97a342fcf8ee2f17413b7484fea02470050..5caa40dc2da103302a4c454c9557f50e30a91146 100644
--- a/Control/AthenaKernel/AthenaKernel/Timeout.h
+++ b/Control/AthenaKernel/AthenaKernel/Timeout.h
@@ -13,6 +13,12 @@
  * $Id: Timeout.h,v 1.2 2008-12-09 16:48:42 fwinkl Exp $
  */
 
+
+#include "AthenaKernel/SlotSpecificObj.h"
+#include "GaudiKernel/ThreadLocalContext.h"
+#include <atomic>
+
+
 namespace Athena {
   
   // Forward declarations
@@ -33,27 +39,31 @@ namespace Athena {
   public:
     /// Get reference to Timeout singleton
     static Timeout& instance();
+    static Timeout& instance(const EventContext& ctx);
 
     /// Check if the timeout was reached
     bool reached() const { return m_state; }
   
+    Timeout() : m_state(false) {}
+
   private:
-    bool m_state;                       ///< Timeout flag
+    std::atomic<bool> m_state;          ///< Timeout flag
     void set()   { m_state = true; }    ///< Set timeout flag
     void reset() { m_state = false; }   ///< Reset timeout flag
   
     // Prevent direct instantiation 
-    Timeout() : m_state(false) {}
     Timeout(Timeout&);
     Timeout& operator=(const Timeout&);
   };
 
-  // Meyers' singleton implementation
-  inline Timeout& Timeout::instance() {
-    static Timeout theInstance;
-    return theInstance;
+  inline Timeout& Timeout::instance (const EventContext& ctx) {
+    static SG::SlotSpecificObj<Timeout> instances ATLAS_THREAD_SAFE;
+    return *instances.get (ctx);
   }
 
+  inline Timeout& Timeout::instance() {
+    return instance (Gaudi::Hive::currentContext());
+  }
 
   
   /**
diff --git a/Control/AthenaKernel/AthenaKernel/getMessageSvc.h b/Control/AthenaKernel/AthenaKernel/getMessageSvc.h
index 7ef7c3c7596d13071f16ae00801f70c8e06ebc36..26ac444c955f245c2876cf29fca43c838fc25c32 100644
--- a/Control/AthenaKernel/AthenaKernel/getMessageSvc.h
+++ b/Control/AthenaKernel/AthenaKernel/getMessageSvc.h
@@ -14,6 +14,7 @@
    */
 #include <cassert>
 #include <string>
+#include <atomic>
 
 class IMessageSvc;
 namespace Athena {
@@ -38,7 +39,7 @@ namespace Athena {
 
   /// Set this to force off the warning messages from getMessageSvc
   /// (in unit tests, for example).
-  extern bool getMessageSvcQuiet;
+  extern std::atomic<bool> getMessageSvcQuiet;
 
   //@{
   /** Wrappers for some of the IMessageSvc methods
@@ -80,13 +81,11 @@ namespace Athena {
     /// releases the IMessageSvc
     ~IMessageSvcHolder();
     /// upon first access sets m_ims as needed
-    IMessageSvc* get() const;
-    /// conversion to IMessageSvc*, same as get
-    operator const IMessageSvc*() const { return this->get(); }
+    IMessageSvc* get();
     /// conversion to IMessageSvc*, same as get
     operator IMessageSvc*() { return this->get(); }
   private:
-    mutable IMessageSvc* m_ims; //mutable to have op() const
+    IMessageSvc* m_ims;
   };
 }
 
diff --git a/Control/AthenaKernel/AthenaKernel/selection.xml b/Control/AthenaKernel/AthenaKernel/selection.xml
index ba01f91974cf209144cdfd1246187130a03d1ecb..e42dbc4df73e664c38b965ecddcec9b3bd7671fd 100644
--- a/Control/AthenaKernel/AthenaKernel/selection.xml
+++ b/Control/AthenaKernel/AthenaKernel/selection.xml
@@ -20,4 +20,6 @@
    <function name="Athena::DsoUtils::inDso" />
    <function name="Athena::PackageInfo" />
 
+   <class name="SG::BaseInfoBase" />
+
 </lcgdict>
diff --git a/Control/AthenaKernel/CMakeLists.txt b/Control/AthenaKernel/CMakeLists.txt
index 444b417225714d0b14c828f07e076442da748abd..50cc46d35b7a34370e422c05b1eaf3afeab998b5 100644
--- a/Control/AthenaKernel/CMakeLists.txt
+++ b/Control/AthenaKernel/CMakeLists.txt
@@ -41,6 +41,9 @@ atlas_add_dictionary( AthenaKernelDict
    AthenaKernel/selection.xml
    LINK_LIBRARIES GaudiKernel AthenaKernel )
 
+atlas_install_python_modules( python/*.py )
+atlas_install_joboptions( share/*.txt )
+
 # Test(s) in the package:
 atlas_add_test( getMessageSvc_test
    SOURCES test/getMessageSvc_test.cxx
@@ -90,3 +93,24 @@ atlas_add_test( RCUObject_test
    SOURCES test/RCUObject_test.cxx
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
    LINK_LIBRARIES ${Boost_LIBRARIES} AthenaKernel )
+
+atlas_add_test( CondCont_test
+   SOURCES test/CondCont_test.cxx
+   LINK_LIBRARIES AthenaKernel )
+
+atlas_add_test( CLIDRegistry_test
+   SOURCES test/CLIDRegistry_test.cxx
+   LINK_LIBRARIES AthenaKernel )
+
+atlas_add_test( ClassName_test
+   SOURCES test/ClassName_test.cxx
+   LINK_LIBRARIES AthenaKernel )
+
+atlas_add_test( BaseInfo_test
+   SOURCES test/BaseInfo_test.cxx
+   LINK_LIBRARIES AthenaKernel )
+
+atlas_add_test( SlotSpecificObj_test
+   SOURCES test/SlotSpecificObj_test.cxx
+   LINK_LIBRARIES AthenaKernel TestTools
+   ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
diff --git a/Control/AthenaKernel/cmt/requirements b/Control/AthenaKernel/cmt/requirements
deleted file mode 100644
index b741604af75ad2baeddfbfed13383512b3ec5dce..0000000000000000000000000000000000000000
--- a/Control/AthenaKernel/cmt/requirements
+++ /dev/null
@@ -1,66 +0,0 @@
-package AthenaKernel
-author Paolo Calafiura <pcalafiura@lbl.gov>
-
-use AtlasPolicy    AtlasPolicy-* 
-use uuid	   v*			LCG_Interfaces
-use GaudiInterface GaudiInterface-*	External
-use DataModelRoot  DataModelRoot-*      Control
-# for SG::unordered_map --> move to STL when available
-use CxxUtils	   CxxUtils-*		Control
-#for type_tools.h
-use AtlasBoost     AtlasBoost-*		External
-
-# Add cmake compatibility (doesn't do anything on CMT side of things)
-apply_pattern cmake_add_command command="find_package(Boost COMPONENTS program_options regex)"
-apply_pattern cmake_add_libraries target=AthenaKernel libraries=rt
-
-#use Scripts to ensure that get_files will be seen by all packages
-use Scripts Scripts-* Tools -no_auto_imports
-
-library AthenaKernel *.cxx
-apply_pattern installed_library
-
-private
-# for TClassEdit
-use AtlasROOT      AtlasROOT-*      External
-end_private
-
-#apply_pattern declare_python_modules files="*.py"
-
-#DirSearchPath uses boost::filesystem
-macro_append Boost_linkopts "$(Boost_linkopts_filesystem) $(Boost_linkopts_system) $(Boost_linkopts_regex) "
-
-private
-use TestTools TestTools-* AtlasTest
-
-# This ignores differences between gaudi 16 & 19.
-macro extrapatterns "^=========+|^ApplicationMgr +SUCCESS|^HistogramPersis.*INFO.*CnvServices|^StatusCodeSvc +INFO initialize|^ *Welcome to ApplicationMgr|^ *running on|^Wall clock time"
-
-apply_pattern UnitTest_run unit_test=getMessageSvc extrapatterns="'$(extrapatterns)'"
-apply_pattern UnitTest_run unit_test=MsgStreamMember extrapatterns="$(extrapatterns) |ref count"
-apply_pattern UnitTest_run unit_test=AthenaPackageInfo
-apply_pattern UnitTest_run unit_test=DirSearchPath
-apply_pattern UnitTest_run unit_test=Chrono
-apply_pattern UnitTest_run unit_test=errorcheck extrapatterns="'$(extrapatterns)'"
-apply_pattern UnitTest_run unit_test=type_tools
-apply_pattern UnitTest_run unit_test=Units
-apply_pattern UnitTest_run unit_test=DataObjectSharedPtr
-apply_pattern UnitTest_run unit_test=IRCUSvc
-apply_pattern UnitTest_run unit_test=RCUObject
-
-macro_append DOXYGEN_INPUT " ../doc ../test ../AthenaKernel/tools " 
-macro_append DOXYGEN_FILE_PATTERNS    " *.icc"
-
-#
-# dictionary creation for UserDataAssociation
-#
-
-use AtlasReflex	   AtlasReflex-*	External
-apply_pattern lcgdict dict=AthenaKernel \
-	selectionfile="selection.xml" \
-        headerfiles="../AthenaKernel/AthenaKernelDict.h"
-
-macro_append libraryshr_linkopts "" \
-   Linux                  " -Wl,-lrt "
-
-end_private
diff --git a/Control/AthenaKernel/doc/packagedoc.h b/Control/AthenaKernel/doc/packagedoc.h
index 37d8eb0ffbdcfacd503ecdfd927277d3787e8706..6f75030513478d4dd4554ab1ee96aeb24bcd8b04 100644
--- a/Control/AthenaKernel/doc/packagedoc.h
+++ b/Control/AthenaKernel/doc/packagedoc.h
@@ -17,7 +17,6 @@ It can be seen as an extension of GaudiKernel.
  - type_tools_test.cxx
 
 
-@section AthenaKernel_reqs CMT requirements file
 
 @section AthenaKernel_Refs More Documentation
 
diff --git a/Control/AthenaKernel/python/StoreID.py b/Control/AthenaKernel/python/StoreID.py
new file mode 100644
index 0000000000000000000000000000000000000000..0efaad844739fde10017f8bfbc0083747700779c
--- /dev/null
+++ b/Control/AthenaKernel/python/StoreID.py
@@ -0,0 +1,17 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+#
+# File: AthenaKernel/python/StoreID.py
+# Created: Jul 2017, sss
+# Purpose: Define symbols for StoreGate StoreIDs.
+#
+# THIS FILE MUST BE KEPT SYNCHRONIZED WITH AthenaKernel/StoreID.h.
+#
+
+EVENT_STORE     = 0
+DETECTOR_STORE  = 1
+CONDITION_STORE = 2
+METADATA_STORE  = 3
+SIMPLE_STORE    = 4
+SPARE_STORE     = 5
+PILEUP_STORE    = 6
+UNKNOWN         = 7
diff --git a/Control/AthenaKernel/python/__init__.py b/Control/AthenaKernel/python/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..aa0bf173f78df24f2b67635e53a33c3e4f81a401
--- /dev/null
+++ b/Control/AthenaKernel/python/__init__.py
@@ -0,0 +1,5 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+#
+# File: AthenaKernel/python/__init__.py
+# Created: Jul 2017, sss
+#
diff --git a/Control/SGTools/share/BaseInfo_test.ref b/Control/AthenaKernel/share/BaseInfo_test.ref
similarity index 100%
rename from Control/SGTools/share/BaseInfo_test.ref
rename to Control/AthenaKernel/share/BaseInfo_test.ref
diff --git a/Control/SGTools/share/CLIDRegistry_test.ref b/Control/AthenaKernel/share/CLIDRegistry_test.ref
similarity index 100%
rename from Control/SGTools/share/CLIDRegistry_test.ref
rename to Control/AthenaKernel/share/CLIDRegistry_test.ref
diff --git a/Control/SGTools/share/ClassName_test.ref b/Control/AthenaKernel/share/ClassName_test.ref
similarity index 100%
rename from Control/SGTools/share/ClassName_test.ref
rename to Control/AthenaKernel/share/ClassName_test.ref
diff --git a/Control/AthenaKernel/share/CondCont_test.ref b/Control/AthenaKernel/share/CondCont_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..cc5a924c7a3e31f7009a1bb25f1b5c0654157317
--- /dev/null
+++ b/Control/AthenaKernel/share/CondCont_test.ref
@@ -0,0 +1,5 @@
+test1
+CondCont<T>::insert error: EventIDRange {[40,4294967295,l:2] - [4294967295,4294967295,543:0]} is neither fully RunEvent nor TimeStamp
+test2
+CondCont<T>::insert error: EventIDRange {[40,4294967295,l:2] - [4294967295,4294967295,543:0]} is neither fully RunEvent nor TimeStamp
+CondCont<T>::insert error: Not most-derived class.
diff --git a/Control/AthenaKernel/share/SlotSpecificObj_test.ref b/Control/AthenaKernel/share/SlotSpecificObj_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..d9d6251a24c145c0c5488d0d8feec194e2e52905
--- /dev/null
+++ b/Control/AthenaKernel/share/SlotSpecificObj_test.ref
@@ -0,0 +1,31 @@
+
+
+Initializing Gaudi ApplicationMgr using job opts ../share/SlotSpecificObj_test.txt
+JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/SlotSpecificObj_test.txt
+JobOptionsSvc        INFO # (1,1): MessageSvc.OutputLevel = 2
+JobOptionsSvc        INFO Job options successfully read in from ../share/SlotSpecificObj_test.txt
+ApplicationMgr      DEBUG Getting my own properties
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Thu Jul  6 15:46:33 2017
+====================================================================================================================================
+ApplicationMgr       INFO Application Manager Configured successfully
+ServiceManager      DEBUG Initializing service AppMgrRunable
+AppMgrRunable       DEBUG Service base class initialized successfully
+ServiceManager      DEBUG Initializing service EventLoopMgr
+EventLoopMgr        DEBUG Service base class initialized successfully
+IncidentSvc         DEBUG Service base class initialized successfully
+IncidentSvc         DEBUG Adding [AbortEvent] listener '<unknown>' with priority 0
+EventDataSvc        DEBUG Service base class initialized successfully
+EventPersistenc...  DEBUG Service base class initialized successfully
+AlgExecStateSvc     DEBUG Service base class initialized successfully
+EventLoopMgr      WARNING Unable to locate service "EventSelector" 
+EventLoopMgr      WARNING No events will be processed from external input.
+HistogramDataSvc    DEBUG Service base class initialized successfully
+HistogramPersis...  DEBUG  'CnvServices':[ 'RootHistSvc' ]
+HistogramPersis...  DEBUG Service base class initialized successfully
+HistogramPersis...WARNING Histograms saving not required.
+ApplicationMgr       INFO Application Manager Initialized successfully
+ApplicationMgr Ready
+test1
diff --git a/Control/AthenaKernel/share/SlotSpecificObj_test.txt b/Control/AthenaKernel/share/SlotSpecificObj_test.txt
new file mode 100644
index 0000000000000000000000000000000000000000..717be9be52c01a48e15ad610e5c0f2a7013c4a6a
--- /dev/null
+++ b/Control/AthenaKernel/share/SlotSpecificObj_test.txt
@@ -0,0 +1 @@
+MessageSvc.OutputLevel = 2;
diff --git a/Control/AthenaKernel/src/AlgorithmTimer.cxx b/Control/AthenaKernel/src/AlgorithmTimer.cxx
index ad1e4da47185bea313546ba011ed9853f016bc99..4aa69f4d82a9871a9ae7b778b3fe64bdec6cbca1 100644
--- a/Control/AthenaKernel/src/AlgorithmTimer.cxx
+++ b/Control/AthenaKernel/src/AlgorithmTimer.cxx
@@ -40,57 +40,10 @@
 
 using namespace Athena;
 
-// Statics
-bool                        AlgorithmTimer::s_handlerInstalled = false;
-struct sigaction            AlgorithmTimer::s_oldSigHandler;
-std::list<AlgorithmTimer*>  AlgorithmTimer::s_registry;
 
 namespace Athena {
   namespace AlgorithmTimerHandler
   {
-    /**
-     * @brief  Signal handler for AlgorithmTimer
-     *
-     * This is the signal handler registered by the first instance of AlgorithmTimer.
-     * On invocation the siginfo_t struct carries a pointer to the actual
-     * instance. The onAlarm function is made a friend of AlgorithmTimer, therefore
-     * it can access all relevant information.
-     */
-    void onAlarmSignal(int sig, siginfo_t *info, void* extra)
-    {
-      /*
-       * Check if the signal is coming from a AlgorithmTimer instance.
-       */
-      AlgorithmTimer* me = static_cast<AlgorithmTimer*>(info->si_value.sival_ptr);
-      std::list<AlgorithmTimer*>::iterator iter = find(AlgorithmTimer::s_registry.begin(),
-                                                       AlgorithmTimer::s_registry.end(),
-                                                       me);
-    
-      /*
-       * If signal from AlgorithmTimer, call user-defined callback
-       */
-      if ( iter != AlgorithmTimer::s_registry.end() )
-        {
-          std::cout.flush();
-          std::cerr.flush();
-          me->m_onAlarm();
-        }
-    
-      /*
-       * Call old signal handler
-       * Need to distinguish between the two types of signal handlers
-       */
-      if (AlgorithmTimer::s_oldSigHandler.sa_flags & SA_SIGINFO)
-        {
-          if (AlgorithmTimer::s_oldSigHandler.sa_sigaction)
-            AlgorithmTimer::s_oldSigHandler.sa_sigaction(sig,info,extra);
-        }
-      else
-        {
-          if (AlgorithmTimer::s_oldSigHandler.sa_handler)
-            AlgorithmTimer::s_oldSigHandler.sa_handler(sig);
-        }
-    }
   
     /**
      * @brief  Function called by signals delivered via threads
@@ -125,30 +78,10 @@ AlgorithmTimer::AlgorithmTimer(unsigned int milliseconds,
   if (m_onAlarm == NULL)
     m_onAlarm = boost::bind(&AlgorithmTimer::abortJob,this);
   
-  if ( conf & DELIVERYBYTHREAD ) {
-    m_sigevent.sigev_notify = SIGEV_THREAD;
-    m_sigevent.sigev_signo  = 0;
-    m_sigevent.sigev_notify_function = AlgorithmTimerHandler::onAlarmThread;
-    m_sigevent.sigev_notify_attributes = NULL;
-  } else {
-    m_sigevent.sigev_notify = SIGEV_SIGNAL;
-    m_sigevent.sigev_signo  = SIGNO;
-    
-    /*
-     * The signal handler uses this list to make sure the signal
-     * indeed came from an AlgorithmTimer and not from somewhere else.
-     */
-    s_registry.push_back(this);
-    
-    /*
-     * Use the same signal handler for all AlgorithmTimer instances.
-     * For performance reasons the signal handler stays active
-     * even after all AlgorithmTimer instances are deleted.
-     */   
-    if ( !s_handlerInstalled )
-      installSignalHandler();
-    
-  }
+  m_sigevent.sigev_notify = SIGEV_THREAD;
+  m_sigevent.sigev_signo  = 0;
+  m_sigevent.sigev_notify_function = AlgorithmTimerHandler::onAlarmThread;
+  m_sigevent.sigev_notify_attributes = NULL;
   
   // Create the timer
   if ( conf & USEREALTIME )
@@ -183,7 +116,6 @@ AlgorithmTimer::~AlgorithmTimer()
 #ifndef __APPLE__
   timer_delete(m_timerid);
 #endif
-  s_registry.remove(this);
 }
 
 void AlgorithmTimer::start(unsigned int milliseconds)
@@ -236,36 +168,6 @@ unsigned int AlgorithmTimer::timeLeft() const
 #endif 
 }
 
-bool AlgorithmTimer::installSignalHandler()
-{
-  if (s_handlerInstalled) return true;
-  
-  // Install new signal handler and backup old one
-  struct sigaction sigact;
-  memset (&sigact, 0, sizeof(sigact)); // quiet coverity
-  sigact.sa_sigaction = AlgorithmTimerHandler::onAlarmSignal;
-  sigemptyset(&sigact.sa_mask);
-  sigact.sa_flags = SA_SIGINFO;
-  int ret = sigaction(SIGNO, &sigact, &s_oldSigHandler);
-  
-  s_handlerInstalled = (ret == 0);
-  return s_handlerInstalled;
-}
-
-/*
- * This is currently not being used, but we'll leave it here
- * for future reference.
- */
-bool AlgorithmTimer::uninstallSignalHandler()
-{
-  if (!s_handlerInstalled) return true;
-  
-  int ret = sigaction(SIGNO, &s_oldSigHandler, 0);
-  
-  s_handlerInstalled = !(ret==0);
-  return (ret==0);
-}
-
 AlgorithmTimer::callbackFct_t AlgorithmTimer::abortJob()
 {
   /*
diff --git a/Control/SGTools/src/BaseInfo.cxx b/Control/AthenaKernel/src/BaseInfo.cxx
similarity index 83%
rename from Control/SGTools/src/BaseInfo.cxx
rename to Control/AthenaKernel/src/BaseInfo.cxx
index 2427077ff2716323c7e769e0ffca9014acf331f8..d284090d8573614682675c32e76e619e19bb70db 100755
--- a/Control/SGTools/src/BaseInfo.cxx
+++ b/Control/AthenaKernel/src/BaseInfo.cxx
@@ -4,7 +4,7 @@
 
 // $Id: BaseInfo.cxx,v 1.9 2008-11-25 21:45:04 ssnyder Exp $
 /**
- * @file  SGTools/BaseInfo.cxx
+ * @file  AthenaKernel/src/BaseInfo.cxx
  * @author scott snyder
  * @date Nov 2005
  * @brief Provide an interface for finding inheritance information
@@ -12,12 +12,13 @@
  *        Out-of-line implementation.
  */
 
-#include "SGTools/BaseInfo.h"
-#include "SGTools/CLIDRegistry.h"
+#include "AthenaKernel/BaseInfo.h"
+#include "AthenaKernel/CLIDRegistry.h"
 #include "GaudiKernel/System.h"
 #include <mutex>
 #include <map>
 #include <unordered_map>
+#include <algorithm>
 #include "string.h"
 
 
@@ -73,19 +74,19 @@ struct BaseInfoBaseImpl {
 
   /// Map of all @c type_info pointers to @c BaseInfoBase instances.
   typedef std::unordered_map<const std::type_info*, BaseInfoBase*> bi_by_ti_map_type;
-  static bi_by_ti_map_type* s_bi_by_ti;
+  static bi_by_ti_map_type* s_bi_by_ti ATLAS_THREAD_SAFE;
 
 
   /// Used to canonicalize @c type_info instances.
   typedef std::unordered_map<std::string, const std::type_info*> ti_by_name_map_type;
-  static ti_by_name_map_type* s_ti_by_name;
+  static ti_by_name_map_type* s_ti_by_name ATLAS_THREAD_SAFE;
 
 
   /// Holds @c BaseInfo classes awaiting initialization.
   /// This is used to defer initialization until everything's loaded.
   typedef std::unordered_multimap<const std::type_info*,
                                   BaseInfoBase::init_func_t*> init_list_t;
-  static init_list_t* s_init_list;
+  static init_list_t* s_init_list ATLAS_THREAD_SAFE;
 
 
   // To make sure that the maps get deleted at program termination.
@@ -95,9 +96,10 @@ struct BaseInfoBaseImpl {
   static Deleter s_deleter;
 
   /// For thread-safety.
-  typedef std::recursive_mutex mutex_t;
+  typedef std::mutex mutex_t;
   typedef std::lock_guard<mutex_t> lock_t;
-  static mutex_t s_mutex;
+  static mutex_t s_mutex ATLAS_THREAD_SAFE;   // For the static variables.
+  mutable mutex_t m_mutex;  // For the class members.
 
 
   /**
@@ -132,6 +134,7 @@ struct BaseInfoBaseImpl {
  */
 CLID BaseInfoBase::clid() const
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   return m_impl->m_clid;
 }
 
@@ -141,6 +144,7 @@ CLID BaseInfoBase::clid() const
  */
 const std::type_info& BaseInfoBase::typeinfo() const
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   return *m_impl->m_typeinfo;
 }
 
@@ -172,9 +176,9 @@ void* BaseInfoBase::cast (void* p, CLID clid) const
  */
 void* BaseInfoBase::cast (void* p, const std::type_info& tinfo) const
 {
-  const BaseInfoBaseImpl::info* i = m_impl->findInfo (tinfo);
-  if (i)
-    return i->m_converter (p);
+  if (BaseInfoBase::castfn_t* converter = castfn (tinfo)) {
+    return converter (p);
+  }
   return nullptr;
 }
 
@@ -208,9 +212,9 @@ void* BaseInfoBase::castTo (void* p, CLID clid) const
  */
 void* BaseInfoBase::castTo (void* p, const std::type_info& tinfo) const
 {
-  const BaseInfoBaseImpl::info* i = m_impl->findInfo (tinfo);
-  if (i)
-    return i->m_converterTo (p);
+  if (BaseInfoBase::castfn_t* converterTo = castfnTo (tinfo)) {
+    return converterTo (p);
+  }
   return nullptr;
 }
 
@@ -243,6 +247,7 @@ BaseInfoBase::castfn_t* BaseInfoBase::castfn (CLID clid) const
 BaseInfoBase::castfn_t*
 BaseInfoBase::castfn (const std::type_info& tinfo) const
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   const BaseInfoBaseImpl::info* i = m_impl->findInfo (tinfo);
   if (i)
     return i->m_converter;
@@ -278,6 +283,7 @@ BaseInfoBase::castfn_t* BaseInfoBase::castfnTo (CLID clid) const
 BaseInfoBase::castfn_t*
 BaseInfoBase::castfnTo (const std::type_info& tinfo) const
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   const BaseInfoBaseImpl::info* i = m_impl->findInfo (tinfo);
   if (i)
     return i->m_converterTo;
@@ -291,6 +297,7 @@ BaseInfoBase::castfnTo (const std::type_info& tinfo) const
  */
 std::vector<CLID> BaseInfoBase::get_bases() const
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   const BaseInfoBaseImpl::ti_map_type& map = m_impl->m_timap;
   std::vector<CLID> v;
   v.reserve (map.size());
@@ -309,6 +316,7 @@ std::vector<CLID> BaseInfoBase::get_bases() const
  */
 std::vector<const std::type_info*> BaseInfoBase::get_ti_bases() const
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   const BaseInfoBaseImpl::ti_map_type& map = m_impl->m_timap;
   std::vector<const std::type_info*> v;
   v.reserve (map.size());
@@ -341,6 +349,7 @@ bool BaseInfoBase::is_base (CLID clid) const
  */
 bool BaseInfoBase::is_base (const std::type_info& tinfo) const
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   const BaseInfoBaseImpl::info* i = m_impl->findInfo (tinfo);
   return i != 0;
 }
@@ -369,6 +378,7 @@ bool BaseInfoBase::is_virtual (CLID clid) const
  */
 bool BaseInfoBase::is_virtual (const std::type_info& tinfo) const
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   const BaseInfoBaseImpl::info* i = m_impl->findInfo (tinfo);
   if (i)
     return i->m_is_virtual;
@@ -385,6 +395,7 @@ bool BaseInfoBase::is_virtual (const std::type_info& tinfo) const
 const CopyConversionBase*
 BaseInfoBase::copy_conversion (const std::type_info& tinfo) const
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   for (const auto& p : m_impl->m_ti_copyconversion_map) {
     if (p.first == &tinfo)
       return p.second;
@@ -420,6 +431,7 @@ void
 BaseInfoBase::add_copy_conversion (const std::type_info& tinfo,
                                    const CopyConversionBase* cnv)
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   m_impl->m_ti_copyconversion_map.emplace_back (&tinfo, cnv);
 }
 
@@ -433,6 +445,7 @@ BaseInfoBase::add_copy_conversion (const std::type_info& tinfo,
 std::vector<CLID>
 BaseInfoBase::get_copy_conversions() const
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   std::vector<CLID> out;
   out.reserve (m_impl->m_ti_copyconversion_map.size());
   for (const auto& i : m_impl->m_ti_copyconversion_map) {
@@ -459,6 +472,7 @@ void BaseInfoBase::add_info (const std::type_info& tinfo,
                              castfn_t* converterTo,
                              bool is_virtual)
 {
+  BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
   {
     const BaseInfoBaseImpl::info* i = m_impl->findInfo (tinfo);
     if (!i) {
@@ -545,7 +559,6 @@ BaseInfoBase::~BaseInfoBase()
  */
 const BaseInfoBase* BaseInfoBase::find (CLID clid)
 {
-  BaseInfoBaseImpl::lock_t lock (BaseInfoBaseImpl::s_mutex);
   const std::type_info* ti = CLIDRegistry::CLIDToTypeinfo (clid);
   if (ti)
     return BaseInfoBase::find (*ti);
@@ -560,34 +573,43 @@ const BaseInfoBase* BaseInfoBase::find (CLID clid)
  *
  * Returns 0 if no @c BaseInfoBase instance is available.
  */
-const BaseInfoBase* BaseInfoBase::find1 (const std::type_info& tinfo)
+BaseInfoBase* BaseInfoBase::find1 (const std::type_info& tinfo)
 {
-  BaseInfoBaseImpl::lock_t lock (BaseInfoBaseImpl::s_mutex);
-  if (!BaseInfoBaseImpl::s_bi_by_ti) return 0;
-  BaseInfoBaseImpl::bi_by_ti_map_type::iterator i = 
-    BaseInfoBaseImpl::s_bi_by_ti->find (&tinfo);
-  if (i != BaseInfoBaseImpl::s_bi_by_ti->end()) {
-    if (!i->second->m_impl->m_needs_init)
-      return i->second;
-    i->second->m_impl->m_needs_init = false;
+  BaseInfoBase* bib = nullptr;
+  {
+    BaseInfoBaseImpl::lock_t lock (BaseInfoBaseImpl::s_mutex);
+    if (!BaseInfoBaseImpl::s_bi_by_ti) return 0;
+    BaseInfoBaseImpl::bi_by_ti_map_type::iterator i = 
+      BaseInfoBaseImpl::s_bi_by_ti->find (&tinfo);
+    if (i != BaseInfoBaseImpl::s_bi_by_ti->end()) {
+      bib = i->second;
+      BaseInfoBaseImpl::lock_t lock (bib->m_impl->m_mutex);
+      if (!bib->m_impl->m_needs_init)
+        return bib;
+      bib->m_impl->m_needs_init = false;
+    }
   }
 
   // Try the initlist.
-  if (BaseInfoBaseImpl::s_init_list) {
-    while (true) {
+  while (true) {
+    BaseInfoBase::init_func_t* init = nullptr;
+    {
+      BaseInfoBaseImpl::lock_t lock (BaseInfoBaseImpl::s_mutex);
+      if (!BaseInfoBaseImpl::s_init_list) break;
+      BaseInfoBaseImpl::bi_by_ti_map_type::iterator i = 
+        BaseInfoBaseImpl::s_bi_by_ti->find (&tinfo);
+      if (i != BaseInfoBaseImpl::s_bi_by_ti->end())
+        bib = i->second;
       BaseInfoBaseImpl::init_list_t::iterator it = 
         BaseInfoBaseImpl::s_init_list->find (&tinfo);
       if (it == BaseInfoBaseImpl::s_init_list->end()) break;
-      BaseInfoBase::init_func_t* init = it->second;
+      init = it->second;
       BaseInfoBaseImpl::s_init_list->erase (it);
-      init();
-      i = BaseInfoBaseImpl::s_bi_by_ti->find (&tinfo);
     }
+    init();
   }
-  if (i != BaseInfoBaseImpl::s_bi_by_ti->end())
-    return i->second;
 
-  return 0;
+  return bib;
 }
 
 
@@ -598,22 +620,33 @@ const BaseInfoBase* BaseInfoBase::find1 (const std::type_info& tinfo)
  *
  * Returns 0 if no @c BaseInfoBase instance is available.
  */
-const BaseInfoBase* BaseInfoBase::find (const std::type_info& tinfo)
+BaseInfoBase* BaseInfoBase::find_nc (const std::type_info& tinfo)
 {
-  const BaseInfoBase* bib = find1 (tinfo);
+  BaseInfoBase* bib = find1 (tinfo);
 
   // If we didn't find it, try looking up by name.
   // This to deal with the issue of sometimes getting duplicate
   // @c std::type_info instances.
-  if (!bib && BaseInfoBaseImpl::s_ti_by_name) {
-    BaseInfoBaseImpl::ti_by_name_map_type::iterator i = 
-      BaseInfoBaseImpl::s_ti_by_name->find (tinfo.name());
-    if (i != BaseInfoBaseImpl::s_ti_by_name->end() && i->second != &tinfo)
-      bib = find1 (*i->second);
+  if (!bib) {
+    const std::type_info* tinfo2 = nullptr;
+    {
+      BaseInfoBaseImpl::lock_t lock (BaseInfoBaseImpl::s_mutex);
+      if (BaseInfoBaseImpl::s_ti_by_name) {
+        BaseInfoBaseImpl::ti_by_name_map_type::iterator i = 
+          BaseInfoBaseImpl::s_ti_by_name->find (tinfo.name());
+        if (i != BaseInfoBaseImpl::s_ti_by_name->end() && i->second != &tinfo) {
+          tinfo2 = i->second;
+        }
+      }
+    }
+    if (tinfo2) {
+      bib = find1 (*tinfo2);
+    }
   }
 
   if (bib) {
     BaseInfoBaseImpl& impl = *bib->m_impl;
+    BaseInfoBaseImpl::lock_t lock (impl.m_mutex);
     if (impl.m_clid == CLID_NULL)
       impl.m_clid = CLIDRegistry::typeinfoToCLID (*impl.m_typeinfo);
   }
@@ -622,6 +655,19 @@ const BaseInfoBase* BaseInfoBase::find (const std::type_info& tinfo)
 }
 
 
+/**
+ * @brief Find the @c BaseInfoBase instance for @c tinfo.
+ * @param tinfo The @c std::type_info of the class
+ *              for which we want information.
+ *
+ * Returns 0 if no @c BaseInfoBase instance is available.
+ */
+const BaseInfoBase* BaseInfoBase::find (const std::type_info& tinfo)
+{
+  return find_nc (tinfo);
+}
+
+
 /**
  * @brief Register an initialization function.
  * @param tinfo The @c std::type_info for the class being registered.
@@ -639,6 +685,7 @@ void BaseInfoBase::addInit (const std::type_info* tinfo,
   if (BaseInfoBaseImpl::s_bi_by_ti) {
     auto i = BaseInfoBaseImpl::s_bi_by_ti->find (tinfo);
     if (i != BaseInfoBaseImpl::s_bi_by_ti->end()) {
+      BaseInfoBaseImpl::lock_t lock (i->second->m_impl->m_mutex);
       BaseInfoBaseImpl& impl = *i->second->m_impl;
       impl.m_needs_init = true;
       if (impl.m_clid == CLID_NULL)
@@ -653,8 +700,21 @@ void BaseInfoBase::addInit (const std::type_info* tinfo,
  */
 void BaseInfoBase::maybeInit()
 {
-  if (m_impl->m_needs_init)
-    find (*m_impl->m_typeinfo);
+  // This may be null during initialization, if we're initializing a
+  // BaseInfo<T>::s_instance instance which references another type
+  // for which the s_instance constructor has not yet been run.
+  if (!m_impl) return;
+
+  bool needs_init = false;
+  const std::type_info* ti = nullptr;
+  {
+    BaseInfoBaseImpl::lock_t lock (m_impl->m_mutex);
+    needs_init = m_impl->m_needs_init;
+    ti = m_impl->m_typeinfo;
+  }
+  
+  if (needs_init)
+    find (*ti);
 }
 
 
@@ -678,6 +738,7 @@ BaseInfoBaseImpl::Deleter::~Deleter()
 // Helper for dumping within the debugger.
 void dumpBaseInfo()
 {
+  BaseInfoBaseImpl::lock_t lock (BaseInfoBaseImpl::s_mutex);
   std::cout << "map:\n";
   if (BaseInfoBaseImpl::s_bi_by_ti) {
     std::vector<const std::type_info*> vv;
diff --git a/Control/AthenaKernel/src/CLIDRegistry.cxx b/Control/AthenaKernel/src/CLIDRegistry.cxx
new file mode 100755
index 0000000000000000000000000000000000000000..867bbf3d9d069369314b60f786ddb9b805839fc2
--- /dev/null
+++ b/Control/AthenaKernel/src/CLIDRegistry.cxx
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+
+#include "AthenaKernel/CLIDRegistry.h"
+#include "CxxUtils/checker_macros.h"
+#include <unordered_map>
+#include <mutex>
+
+
+class CLIDRegistryImpl
+{
+public:
+  bool hasNewEntries() const;
+
+  CLIDRegistry::CLIDVector_t newEntries();
+
+  const std::type_info* CLIDToTypeinfo (CLID clid) const;
+  CLID typeinfoToCLID (const std::type_info& ti) const;
+
+  bool addEntry (unsigned long clid,
+                 const std::type_info& ti,
+                 const char* typeName, 
+                 const Athena::PackageInfo& pkgInfo,
+                 const std::string& typeInfoName);
+
+
+private:
+  typedef std::mutex mutex_t;
+  typedef std::lock_guard<mutex_t> lock_t;
+  mutable mutex_t m_mutex;
+
+  CLIDRegistry::CLIDVector_t m_vec;
+  size_t m_alreadyDone = 0;
+  
+  typedef std::unordered_map<CLID, const std::type_info*> clid_ti_map_t;
+  clid_ti_map_t m_clid_ti_map;
+
+  typedef std::unordered_map<const std::type_info*, CLID> ti_clid_map_t;
+  ti_clid_map_t m_ti_clid_map;
+};
+
+
+bool CLIDRegistryImpl::hasNewEntries() const
+{
+  lock_t lock (m_mutex);
+  return m_alreadyDone < m_vec.size();
+}
+
+
+CLIDRegistry::CLIDVector_t
+CLIDRegistryImpl::newEntries()
+{
+  lock_t lock (m_mutex);
+  size_t pos = m_alreadyDone;
+  m_alreadyDone = m_vec.size();
+  return CLIDRegistry::CLIDVector_t (m_vec.begin()+pos, m_vec.end());
+}
+
+
+/**
+ * @brief Return the @c type_info corresponding to a CLID.
+ * @param clid The CLID to find.
+ *
+ * Returns the corresponding @c type_info or nullptr.
+ */
+const std::type_info* CLIDRegistryImpl::CLIDToTypeinfo (CLID clid) const
+{
+  lock_t lock (m_mutex);
+  auto i = m_clid_ti_map.find (clid);
+  if (i != m_clid_ti_map.end()) {
+    return i->second;
+  }
+  return nullptr;
+}
+
+
+/**
+ * @brief Return the CLID corresponding to a @c type_info.
+ * @param ti The @c type_info to find.
+ *
+ * Returns the corresponding @c CLID or CLID_NULL.
+ */
+CLID CLIDRegistryImpl::typeinfoToCLID (const std::type_info& ti) const
+{
+  lock_t lock (m_mutex);
+  auto i = m_ti_clid_map.find (&ti);
+  if (i != m_ti_clid_map.end()) {
+    return i->second;
+  }
+  return CLID_NULL;
+}
+
+
+bool CLIDRegistryImpl::addEntry (unsigned long clid,
+                                 const std::type_info& ti,
+                                 const char* typeName, 
+                                 const Athena::PackageInfo& pkgInfo,
+                                 const std::string& typeInfoName)
+{
+  lock_t lock (m_mutex);
+  m_vec.emplace_back (clid, std::string(typeName), pkgInfo, typeInfoName);
+  m_clid_ti_map[clid] = &ti;
+  m_ti_clid_map[&ti] = clid;
+  return true;
+}
+
+
+//***************************************************************************
+
+
+bool
+CLIDRegistry::hasNewEntries()
+{
+  return impl().hasNewEntries();
+}
+
+CLIDRegistry::CLIDVector_t
+CLIDRegistry::newEntries()
+{
+  return impl().newEntries();
+}
+
+
+CLIDRegistryImpl& CLIDRegistry::impl()
+{
+  static CLIDRegistryImpl reg ATLAS_THREAD_SAFE;
+  return reg;
+}
+
+
+/**
+ * @brief Return the @c type_info corresponding to a CLID.
+ * @param clid The CLID to find.
+ *
+ * Returns the corresponding @c type_info or nullptr.
+ */
+const std::type_info* CLIDRegistry::CLIDToTypeinfo (CLID clid)
+{
+  return impl().CLIDToTypeinfo (clid);
+}
+
+
+/**
+ * @brief Return the CLID corresponding to a @c type_info.
+ * @param ti The @c type_info to find.
+ *
+ * Returns the corresponding @c CLID or CLID_NULL.
+ */
+CLID CLIDRegistry::typeinfoToCLID (const std::type_info& ti)
+{
+  return impl().typeinfoToCLID (ti);
+}
+
+
+/// Out-of-line part of addEntry().
+bool CLIDRegistry::addEntry (unsigned long clid,
+                             const std::type_info& ti,
+                             const char* typeName, 
+                             const Athena::PackageInfo& pkgInfo,
+                             const std::string& typeInfoName)
+{
+  return impl().addEntry (clid, ti, typeName, pkgInfo, typeInfoName);
+}
+
diff --git a/Control/AthenaKernel/src/IOVTime.cxx b/Control/AthenaKernel/src/IOVTime.cxx
index 5c11d5a4de4d0912a31c60263f26c4f98842c39a..adb3fc0e61fd9da632164e5e7784281e7267967b 100644
--- a/Control/AthenaKernel/src/IOVTime.cxx
+++ b/Control/AthenaKernel/src/IOVTime.cxx
@@ -195,13 +195,16 @@ IOVTime::operator std::string () const {
 
 IOVTime::operator EventIDBase() const {
   if (isBoth()) {
-    return EventIDBase(run(),event(),
-                       timestamp()/1000000000LL,timestamp()%1000000000LL);
+    return EventIDBase(run(),EventIDBase::UNDEFEVT,
+                       timestamp()/1000000000LL,timestamp()%1000000000LL,
+                       event());
   } else if (isTimestamp()) {
     return EventIDBase(EventIDBase::UNDEFNUM,EventIDBase::UNDEFEVT,
                        timestamp()/1000000000LL,timestamp()%1000000000LL);
   } else if (isRunEvent()) {
-    return EventIDBase(run(),event());
+    return EventIDBase(run(),EventIDBase::UNDEFEVT,
+                       EventIDBase::UNDEFNUM,0,
+                       event());
   } else {
     return EventIDBase();
   }
diff --git a/Control/AthenaKernel/src/IThinningSvc.cxx b/Control/AthenaKernel/src/IThinningSvc.cxx
index f03ef4d025cb93ece5cfff48827af85f8d2b4478..f5e7dc2901b411189a1e3459c804a8e9c3846cd3 100644
--- a/Control/AthenaKernel/src/IThinningSvc.cxx
+++ b/Control/AthenaKernel/src/IThinningSvc.cxx
@@ -90,10 +90,10 @@ IThinningSvc::generateRemovedIdx<std::string>()
 }
 
 IThinningSvc* 
-IThinningSvc::instance( IThinningSvc* activeSvc, bool override )
+IThinningSvc::instance( IThinningSvc* activeSvc, bool overrideSvc )
 {
-  static IThinningSvc* svc = 0;
-  if ( override ) {
+  static thread_local IThinningSvc* svc = 0;
+  if ( overrideSvc ) {
     svc = activeSvc;
   }
   return svc;
diff --git a/Control/AthenaKernel/src/MsgStreamMember.cxx b/Control/AthenaKernel/src/MsgStreamMember.cxx
index 0b66939305c87238c75365efd543d713927e385f..b39c613eb8abb50ec3c80afe09a421d5a43d698a 100644
--- a/Control/AthenaKernel/src/MsgStreamMember.cxx
+++ b/Control/AthenaKernel/src/MsgStreamMember.cxx
@@ -32,7 +32,7 @@ MsgStreamMember& MsgStreamMember::operator= (const MsgStreamMember& rhs)
 MsgStreamMember::~MsgStreamMember() { delete m_stream; }
 
 /// upon first access sets m_ims as needed
-MsgStream& MsgStreamMember::get() const {
+MsgStream& MsgStreamMember::get() {
   if (0 == m_stream) m_stream = new MsgStream(m_ims.get(), m_label);
   return *m_stream;
 }
diff --git a/Control/AthenaKernel/src/SlotSpecificObj.cxx b/Control/AthenaKernel/src/SlotSpecificObj.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..76ae67987ebfc59ec71c9d5c1881d237e3ea0db7
--- /dev/null
+++ b/Control/AthenaKernel/src/SlotSpecificObj.cxx
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file AthenaKernel/src/SlotSpecificObj.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Maintain a set of objects, one per slot.
+ */
+
+
+#include "AthenaKernel/SlotSpecificObj.h"
+#include "CxxUtils/checker_macros.h"
+#include "GaudiKernel/IHiveWhiteBoard.h"
+#include "GaudiKernel/ServiceHandle.h"
+
+
+
+namespace {
+  // Name of the service to use to find the number of slots.
+  std::string getNSlots_hiveMgrName ATLAS_THREAD_SAFE = "EventDataSvc";
+} // anonymous namespace
+
+
+
+namespace SG {
+
+
+/**
+ * @brief Allow setting the name of the whiteboard service.
+ *
+ * For testing.
+ */
+void setNSlotsHiveMgrName ATLAS_NOT_THREAD_SAFE (const std::string& s)
+{
+  getNSlots_hiveMgrName = s;
+}
+
+
+/**
+ * @brief Return the number of event slots.
+ *
+ * This accesses the @c IHiveWhiteBoard service to find the number of slots.
+ */
+size_t getNSlots_once()
+{
+  ServiceHandle<IInterface> svc (getNSlots_hiveMgrName, "getNSlots_once");
+  if (!svc.retrieve().isSuccess())
+    return 1;
+  IHiveWhiteBoard* hivesvc = dynamic_cast<IHiveWhiteBoard*> (svc.get());
+  if (!hivesvc) return 1;
+  unsigned int nslots = hivesvc->getNumberOfStores();
+  if (nslots < 1) return 1;
+  return nslots;
+}
+
+
+/**
+ * @brief Return the number of event slots.
+ *
+ * Calls @c getNSlots_once the first time we're called and caches the result.
+ */
+size_t getNSlots()
+{
+  const static size_t nslots = getNSlots_once();
+  return nslots;
+}
+
+
+} // namespace SG
diff --git a/Control/AthenaKernel/src/StoreID.cxx b/Control/AthenaKernel/src/StoreID.cxx
index b753423ec30a375616eb050e48d61a4960911490..2235959a9d4ddd79d23248a0cc93c579b73b3ae2 100644
--- a/Control/AthenaKernel/src/StoreID.cxx
+++ b/Control/AthenaKernel/src/StoreID.cxx
@@ -10,6 +10,7 @@ static const std::vector<std::string> STORENAMES {
     "InputMetaDataStore",
     "MetaDataStore",
     "SpareStore",
+    "PileupStore",
     "UnknownStore"
       };
 
@@ -50,6 +51,11 @@ StoreID::findStoreID(const std::string& storeNamePrefix) {
       return StoreID::SIMPLE_STORE;
       break;
     }
+  case 'P':
+    {
+      return StoreID::PILEUP_STORE;
+      break;
+    }
   case 'S':
     {
       if (storeNamePrefix.at(ist+1)=='p'){
diff --git a/Control/AthenaKernel/src/getMessageSvc.cxx b/Control/AthenaKernel/src/getMessageSvc.cxx
index 75019ef2db0bf26638d7a04a7f4e619fa8e95642..fd45a8b835c472bef82d43ffc5d3b580586b862d 100644
--- a/Control/AthenaKernel/src/getMessageSvc.cxx
+++ b/Control/AthenaKernel/src/getMessageSvc.cxx
@@ -14,7 +14,7 @@ using std::endl;
 
 /// Set this to force off the warning messages from getMessageSvc
 /// (in unit tests, for example).
-bool Athena::getMessageSvcQuiet = false;
+std::atomic<bool> Athena::getMessageSvcQuiet;
 
 IMessageSvc* Athena::getMessageSvc( bool quiet ) { return getMessageSvc( Options::Lazy, quiet ); }
 IMessageSvc* Athena::getMessageSvc( const Options::CreateOptions opt, bool quiet ) {
@@ -74,7 +74,7 @@ IMessageSvcHolder::~IMessageSvcHolder() {
 }
 
 IMessageSvc*
-IMessageSvcHolder::get() const {
+IMessageSvcHolder::get() {
   if (!m_ims) m_ims = getMessageSvc();
   return m_ims;
 }
diff --git a/Control/SGTools/test/BaseInfo_test.cxx b/Control/AthenaKernel/test/BaseInfo_test.cxx
similarity index 98%
rename from Control/SGTools/test/BaseInfo_test.cxx
rename to Control/AthenaKernel/test/BaseInfo_test.cxx
index f799afc8fe52ee3238ef56a3cff75beaaaf6d09e..981e046e1aa92932cb4ffc9bbd5e6fa06c627b2e 100755
--- a/Control/SGTools/test/BaseInfo_test.cxx
+++ b/Control/AthenaKernel/test/BaseInfo_test.cxx
@@ -4,7 +4,7 @@
 
 // $Id$
 /**
- * @file  SGTools/BaseInfo_test.cxx
+ * @file  AthenaKernel/test/BaseInfo_test.cxx
  * @author scott snyder
  * @date A while ago.
  * @brief Regression test for BaseInfo.
@@ -13,8 +13,8 @@
 
 #undef NDEBUG
 
-#include "SGTools/BaseInfo.h"
-#include "SGTools/CLASS_DEF.h"
+#include "AthenaKernel/BaseInfo.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "boost/assign/list_of.hpp"
 #include <iostream>
 #include <algorithm>
diff --git a/Control/SGTools/test/CLIDRegistry_test.cxx b/Control/AthenaKernel/test/CLIDRegistry_test.cxx
similarity index 77%
rename from Control/SGTools/test/CLIDRegistry_test.cxx
rename to Control/AthenaKernel/test/CLIDRegistry_test.cxx
index e0bb249a670f5bf15a7c4736f38cf4dc58e4da29..e2707cdb29412415ec5cf8ff3f20aba7866548b9 100755
--- a/Control/SGTools/test/CLIDRegistry_test.cxx
+++ b/Control/AthenaKernel/test/CLIDRegistry_test.cxx
@@ -13,16 +13,15 @@
 
 #undef NDEBUG
 
-#include "SGTools/CLIDRegistry.h"
+#include "AthenaKernel/CLIDRegistry.h"
 
 #include <algorithm>
 #include <cassert>
 #include <iostream>
 #include <typeinfo>
 
-#include <boost/tuple/tuple.hpp>
-using boost::get;
 #include "AthenaKernel/tools/AthenaPackageInfo.h"
+using std::get;
 
 class Foo {};
 class Bar {};
@@ -31,8 +30,7 @@ class Baz {};
 int main () {
   std::cerr << "*** CLIDRegistry_test starts ***" <<std::endl;
   //reset newEntries before we start counting
-  std::pair<CLIDRegistry::const_iterator, CLIDRegistry::const_iterator>  er =
-    CLIDRegistry::newEntries();
+  CLIDRegistry::CLIDVector_t er = CLIDRegistry::newEntries();
   Athena::PackageInfo info(PACKAGE_VERSION);
 #ifdef COMPILEFAIL
   CLIDRegistry::addEntry<12>(typeid(Foo), "Foo", info, "Foo");
@@ -42,10 +40,10 @@ int main () {
   CLIDRegistry::addEntry<4321>(typeid(Bar), "Bar", info, "Bar");
   assert(CLIDRegistry::hasNewEntries());
   er = CLIDRegistry::newEntries();
-  assert( distance(er.first, er.second) == 2 );
-  assert( get<0>(*(CLIDRegistry::end()-2)) == 1234 );
-  assert( get<1>(*(CLIDRegistry::end()-2)) == "Foo" );
-  assert( get<2>(*(CLIDRegistry::end()-2)).name() == "SGTools" );
+  assert( er.size() == 2 );
+  assert( get<0>(er[0]) == 1234 );
+  assert( get<1>(er[0]) == "Foo" );
+  assert( get<2>(er[0]).name() == "AthenaKernel" );
 
   assert (CLIDRegistry::CLIDToTypeinfo (4321) == &typeid(Bar));
   assert (CLIDRegistry::CLIDToTypeinfo (43213) == 0);
@@ -57,7 +55,7 @@ int main () {
   assert (CLIDRegistry::typeinfoToCLID (typeid(Baz)) == 43213);
 
   er = CLIDRegistry::newEntries();
-  assert( distance(er.first, er.second) == 1 );
+  assert( er.size() == 1 );
   assert( !CLIDRegistry::hasNewEntries());
   std::cerr << "*** CLIDRegistry_test OK ***" <<std::endl;
 
diff --git a/Control/SGTools/test/ClassName_test.cxx b/Control/AthenaKernel/test/ClassName_test.cxx
similarity index 92%
rename from Control/SGTools/test/ClassName_test.cxx
rename to Control/AthenaKernel/test/ClassName_test.cxx
index efd1eebcd8063f62d3cb014547ac73ea105f2d83..33d88f764cb29af9d3568202aab8dba96146a804 100755
--- a/Control/SGTools/test/ClassName_test.cxx
+++ b/Control/AthenaKernel/test/ClassName_test.cxx
@@ -3,7 +3,7 @@
 */
 
 #include <cassert>
-#include "SGTools/ClassName.h"
+#include "AthenaKernel/ClassName.h"
 
 class A {};
 class B {};
diff --git a/Control/AthenaKernel/test/CondCont_test.cxx b/Control/AthenaKernel/test/CondCont_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a3a938bdf2f2ddaa3955c8a33372e8046c01a901
--- /dev/null
+++ b/Control/AthenaKernel/test/CondCont_test.cxx
@@ -0,0 +1,207 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file AthenaKernel/test/CondCont_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Tests for CondCont.
+ */
+
+
+#undef NDEBUG
+#include "AthenaKernel/CondCont.h"
+#include "AthenaKernel/CLASS_DEF.h"
+#include <cassert>
+#include <iostream>
+
+
+namespace SG {
+class DataProxy {};
+}
+
+
+class B
+{
+public:
+  B(int x) : m_x(x) {}
+  int m_x;
+};
+
+
+class Pad
+{
+public:
+  int m_pad = 0;
+};
+
+
+class D
+  : public Pad, public B
+{
+public:
+  D(int x) : B(x*10) {}
+};
+
+
+CONDCONT_BASE(D, B);
+
+
+CLASS_DEF(CondCont<B>, 932847546, 0)
+CLASS_DEF(CondCont<D>, 932847547, 0)
+
+
+EventIDBase runlbn (int run, int lbn)
+{
+  return EventIDBase (run,
+                      EventIDBase::UNDEFNUM,  // event
+                      EventIDBase::UNDEFNUM,  // timestamp
+                      EventIDBase::UNDEFNUM,  // timestamp ns
+                      lbn);
+}
+
+
+EventIDBase timestamp (int t)
+{
+  return EventIDBase (EventIDBase::UNDEFNUM,  // run
+                      EventIDBase::UNDEFNUM,  // event
+                      t);
+}
+
+
+const EventIDRange r1 (runlbn (10, 15), runlbn (10, 20));
+const EventIDRange r2 (runlbn (20, 17), runlbn (EventIDBase::UNDEFNUM/2, EventIDBase::UNDEFNUM));
+const EventIDRange r3 (timestamp (123), timestamp (456));
+
+
+template <class T>
+void fillit (CondCont<T>& cc, std::vector<T*> & ptrs)
+{
+  assert (cc.entries() == 0);
+  assert (cc.ranges().empty());
+  cc.setProxy (nullptr);
+  assert (cc.proxy() == nullptr);
+  std::ostringstream ss1;
+  cc.list (ss1);
+  assert (ss1.str() == "id: ('key')  proxy: 0\n\
+clock: [0]\n\
+RE: [0]\n");
+
+  assert (cc.clid() == ClassID_traits<CondCont<T> >::ID());
+
+  ptrs.push_back (new T(1));
+  ptrs.push_back (new T(2));
+  ptrs.push_back (new T(3));
+
+  assert( cc.typelessInsert (r1, ptrs[0]) );
+  assert( cc.typelessInsert (r2, ptrs[1]) );
+  assert( cc.insert (r3, std::unique_ptr<T> (ptrs[2])) );
+  assert (cc.entries() == 3);
+  std::ostringstream ss2;
+  cc.list (ss2);
+  std::ostringstream exp2;
+  exp2 << "id: ('key')  proxy: 0\n"
+       << "clock: [1]\n"
+       << "{[4294967295,4294967295,123:0] - [4294967295,4294967295,456:0]} " << ptrs[2] << "\n"
+       << "RE: [2]\n"
+       << "{[20,4294967295,l:17] - [2147483647,4294967295]} " << ptrs[1] << "\n"
+       << "{[10,4294967295,l:15] - [10,4294967295,l:20]} " << ptrs[0] << "\n";
+  assert (ss2.str() == exp2.str());
+
+  auto t4 = std::make_unique<T> (4);
+  assert( ! cc.insert (EventIDRange (runlbn (40, 2), timestamp (543)), std::move(t4)) );
+}
+
+
+template <class T>
+void checkit (const CondCont<T>& cc, const std::vector<T*>& ptrs)
+{
+  std::vector<EventIDRange> rvec = cc.ranges();
+  assert (rvec.size() == 3);
+  assert (rvec[0] == r2);
+  assert (rvec[1] == r1);
+  assert (rvec[2] == r3);
+
+  assert (cc.valid (runlbn (10, 17)));
+  assert (cc.valid (runlbn (100, 200)));
+  assert (cc.valid (timestamp (234)));
+  assert (!cc.valid (runlbn (15, 17)));
+  assert (!cc.valid (timestamp (999)));
+
+  const T* t = nullptr;
+  assert (cc.find (runlbn (10, 17), t));
+  assert (t == ptrs[0]);
+
+  t = nullptr;
+  assert (cc.find (runlbn (100, 200), t));
+  assert (t == ptrs[1]);
+
+  EventIDRange r;
+  t = nullptr;
+  assert (cc.find (timestamp (234), t, &r));
+  assert (t == ptrs[2]);
+  assert (r == r3);
+
+  assert (!cc.find (runlbn (15, 17), t));
+  assert (!cc.find (timestamp (999), t));
+
+  assert (cc.range (runlbn (100, 200), r));
+  assert (r == r2);
+  assert (cc.range (timestamp (234), r));
+  assert (r == r3);
+  assert (!cc.range (runlbn (15, 17), r));
+  assert (!cc.range (timestamp (999), r));
+}
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  SG::DataProxy proxy;
+  DataObjID id ("key");
+  CondCont<B> cc (id, &proxy);
+  assert (cc.proxy() == &proxy);
+  assert (cc.id() == id);
+
+  std::vector<B*> bptrs;
+  fillit (cc, bptrs);
+  checkit (cc, bptrs);
+}
+
+
+void test2()
+{
+  std::cout << "test2\n";
+  SG::DataProxy proxy;
+  DataObjID id ("key");
+  CondCont<D> cc (id, &proxy);
+  assert (cc.proxy() == &proxy);
+  assert (cc.id() == id);
+
+  std::vector<D*> dptrs;
+  fillit (cc, dptrs);
+  checkit (cc, dptrs);
+
+  CondCont<B> &bcc = cc;
+  std::vector<B*> bptrs (dptrs.begin(), dptrs.end());
+  checkit (bcc, bptrs);
+
+  auto b4 = std::make_unique<B> (4);
+  assert( ! bcc.insert (EventIDRange (runlbn (40, 2), timestamp (543)), std::move(b4)) );
+}
+
+
+int main()
+{
+  // Verify that B is indeed offset in D, so we get to test a nontrivial conversion.
+  {
+    D d(0);
+    B& bd = d;
+    assert (reinterpret_cast<char*>(&d) != reinterpret_cast<char*>(&bd));
+  }
+
+  test1();
+  test2();
+  return 0;
+}
diff --git a/Control/AthenaKernel/test/SlotSpecificObj_test.cxx b/Control/AthenaKernel/test/SlotSpecificObj_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..2bee4fec44e0b5fb9f6035f475fae86a5e1d4916
--- /dev/null
+++ b/Control/AthenaKernel/test/SlotSpecificObj_test.cxx
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+
+// $Id$
+/**
+ * @file AthenaKernel/test/SlotSpecificObj_test.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Regression tests for SlotSpecificObj.
+ */
+
+#undef NDEBUG
+#include "AthenaKernel/SlotSpecificObj.h"
+#include "AthenaKernel/errorcheck.h"
+#include "CxxUtils/checker_macros.h"
+#include "TestTools/initGaudi.h"
+#include "GaudiKernel/Service.h"
+#include "GaudiKernel/IHiveWhiteBoard.h"
+#include <cassert>
+#include <iostream>
+
+
+const size_t nslots = 4;
+
+
+class TestWhiteBoard
+  : public extends<Service, IHiveWhiteBoard>
+{
+public:
+  TestWhiteBoard (const std::string& name, ISvcLocator* svc)
+    : base_class (name, svc)
+  {}
+  
+  virtual StatusCode selectStore(size_t /*partitionIndex*/) override { std::abort(); }
+  virtual StatusCode clearStore(size_t /*partitionIndex*/) override { std::abort(); }
+  virtual StatusCode setNumberOfStores(size_t /*slots*/) override { std::abort(); }
+  virtual StatusCode getNewDataObjects(DataObjIDColl& /*products*/) override { std::abort(); }
+  virtual bool newDataObjectsPresent() override { std::abort(); }
+  virtual size_t allocateStore( int /*evtnumber*/ ) override { std::abort(); }
+  virtual StatusCode freeStore( size_t /*partitionIndex*/ ) override { std::abort(); }
+  virtual size_t getPartitionNumber(int /*eventnumber*/) const override { std::abort(); }
+
+  virtual size_t getNumberOfStores() const override { return nslots; }
+};
+
+
+DECLARE_SERVICE_FACTORY( TestWhiteBoard )
+
+
+struct Payload
+{
+  size_t x = 0;
+};
+
+
+void test1()
+{
+  std::cout << "test1\n";
+  SG::SlotSpecificObj<Payload> o;
+  const SG::SlotSpecificObj<Payload>& co = o;
+
+  for (size_t i = 0; i < nslots; i++) {
+    EventContext ctx (0, i);
+    o.get(ctx)->x = (i+1)*10;
+  }
+
+  for (size_t i = 0; i < nslots; i++) {
+    EventContext ctx (0, i);
+    assert (o.get(ctx)->x == (i+1)*10);
+    assert (co.get(ctx)->x == (i+1)*10);
+  }
+
+  for (size_t i = 0; i < nslots; i++) {
+    EventContext ctx (0, i);
+    Gaudi::Hive::setCurrentContext (ctx);
+    assert (o.get()->x == (i+1)*10);
+    assert (co.get()->x == (i+1)*10);
+    assert (o->x == (i+1)*10);
+    assert (co->x == (i+1)*10);
+    assert ((*o).x == (i+1)*10);
+    assert ((*co).x == (i+1)*10);
+
+    o->x = (i+2)*20;
+  }
+
+  for (size_t i = 0; i < nslots; i++) {
+    EventContext ctx (0, i);
+    assert (o.get(ctx)->x == (i+2)*20);
+  }
+}
+
+
+int main ATLAS_NOT_THREAD_SAFE ()
+{
+  SG::setNSlotsHiveMgrName ("TestWhiteBoard");
+  errorcheck::ReportMessage::hideErrorLocus();
+  ISvcLocator* svcloc = 0;
+  if (!Athena_test::initGaudi("SlotSpecificObj_test.txt", svcloc)) {
+    std::cerr << "This test can not be run" << std::endl;
+    return 1;
+  }  
+  assert(svcloc);
+
+  test1();
+  return 0;
+}
diff --git a/Control/AthenaMP/python/PyComps.py b/Control/AthenaMP/python/PyComps.py
index c271207f3c10b8224832a06586b1928061ad613b..fe33b9d01c2005b6ac25af6f97e05696abd0af7f 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")
+                    svcMgr.AthenaPoolCnvSvc.OutputStreamingTool = [ AthenaSharedMemoryTool("OutputStreamingTool_0") ]
 
             from AthenaMPTools.AthenaMPToolsConf import SharedEvtQueueProvider
             self.Tools += [ SharedEvtQueueProvider(UseSharedReader=use_shared_reader,
diff --git a/Control/AthenaMP/src/memory-monitor/MemoryMonitor.cxx b/Control/AthenaMP/src/memory-monitor/MemoryMonitor.cxx
index e4fb9ef6a88bbb51104238462eabe7ac220d4537..0dba74fa296d5240b2e01df892cb8b10182f441d 100644
--- a/Control/AthenaMP/src/memory-monitor/MemoryMonitor.cxx
+++ b/Control/AthenaMP/src/memory-monitor/MemoryMonitor.cxx
@@ -7,10 +7,11 @@
 #include "rapidjson/writer.h"
 #include "rapidjson/stringbuffer.h"
 #include "rapidjson/filewritestream.h"
+#include <math.h>
 
 using namespace rapidjson;
 
-int ReadProcs(pid_t mother_pid, unsigned long values[8], bool verbose){
+int ReadProcs(pid_t mother_pid, unsigned long values[4], unsigned long long valuesIO[4], bool verbose){
 
   //Get child process IDs
       std::vector<pid_t> cpids;
@@ -41,46 +42,46 @@ int ReadProcs(pid_t mother_pid, unsigned long values[8], bool verbose){
             cpids.push_back(pt);} } } 
       pclose(pipe);
 
-      long tsize(0);
-      long trss(0);
-      long tpss(0);
-      long tswap(0);
+      unsigned long tsize(0);
+      unsigned long trss(0);
+      unsigned long tpss(0);
+      unsigned long tswap(0);
 
-      long trchar(0);
-      long twchar(0);
-      long trbyte(0);
-      long twbyte(0);
+      unsigned long long trchar(0);
+      unsigned long long twchar(0);
+      unsigned long long trbyte(0);
+      unsigned long long twbyte(0);
 
       std::vector<std::string> openFails;
 
       for(std::vector<pid_t>::const_iterator it=cpids.begin(); it!=cpids.end(); ++it) {
-        snprintf(smaps_buffer,64,"/proc/%ld/smaps",(long)*it);
+        snprintf(smaps_buffer,64,"/proc/%lu/smaps",(unsigned long)*it);
        
         FILE *file = fopen(smaps_buffer,"r");
         if(file==0) {
           openFails.push_back(std::string(smaps_buffer));} 
         else { 
           while(fgets(buffer,256,file)) {
-            if(sscanf(buffer,"Size: %80ld kB",&tsize)==1) values[0]+=tsize;
-            if(sscanf(buffer,"Pss: %80ld kB", &tpss)==1)  values[1]+=tpss;
-            if(sscanf(buffer,"Rss: %80ld kB", &trss)==1)  values[2]+=trss;
-            if(sscanf(buffer,"Swap: %80ld kB",&tswap)==1) values[3]+=tswap; } 
+            if(sscanf(buffer,"Size: %80lu kB",&tsize)==1) values[0]+=tsize;
+            if(sscanf(buffer,"Pss: %80lu kB", &tpss)==1)  values[1]+=tpss;
+            if(sscanf(buffer,"Rss: %80lu kB", &trss)==1)  values[2]+=trss;
+            if(sscanf(buffer,"Swap: %80lu kB",&tswap)==1) values[3]+=tswap; } 
           fclose(file);
 	}
 
 
-        snprintf(io_buffer,64,"/proc/%ld/io",(long)*it);
+        snprintf(io_buffer,64,"/proc/%llu/io",(unsigned long long)*it);
        
         FILE *file2 = fopen(io_buffer,"r");
         if(file2==0) {
           openFails.push_back(std::string(io_buffer));} 
         else { 
           while(fgets(buffer,256,file2)) {
-            if(sscanf(buffer,      "rchar: %80ld kB", &trchar)==1) values[4]+=trchar; 
-            if(sscanf(buffer,      "wchar: %80ld kB", &twchar)==1) values[5]+=twchar; 
-            if(sscanf(buffer, "read_bytes: %80ld kB", &trbyte)==1) values[6]+=trbyte; 
-            if(sscanf(buffer,"write_bytes: %80ld kB", &twbyte)==1) values[7]+=twbyte; } 
-          fclose(file2);
+            if(sscanf(buffer,      "rchar: %80llu", &trchar)==1) valuesIO[0]+=trchar; 
+            if(sscanf(buffer,      "wchar: %80llu", &twchar)==1) valuesIO[1]+=twchar; 
+            if(sscanf(buffer, "read_bytes: %80llu", &trbyte)==1) valuesIO[2]+=trbyte; 
+            if(sscanf(buffer,"write_bytes: %80llu", &twbyte)==1) valuesIO[3]+=twbyte; } 
+          fclose(file);
 	}
 
       } 
@@ -101,12 +102,19 @@ int MemoryMonitor(pid_t mpid, char* filename, char* jsonSummary, unsigned int in
      
      signal(SIGUSR1, SignalCallbackHandler);
 
-     unsigned long    values[8] = {0,0,0,0,0,0,0,0};
-     unsigned long maxValues[8] = {0,0,0,0,0,0,0,0};
-     unsigned long avgValues[8] = {0,0,0,0,0,0,0,0};
-     unsigned long oldValues[8] = {0,0,0,0,0,0,0,0};
+     unsigned long    values[4] = {0,0,0,0};
+     unsigned long maxValues[4] = {0,0,0,0};
+     unsigned long avgValues[4] = {0,0,0,0};
+
+
+     unsigned long long    valuesIO[4] = {0,0,0,0};
+     unsigned long long maxValuesIO[4] = {0,0,0,0};
+     unsigned long long avgValuesIO[4] = {0,0,0,0};
+
+
      int iteration = 0;
      time_t lastIteration = time(0) - interval;
+     time_t startTime;
      time_t currentTime;
 
      // Open iteration output file     
@@ -131,6 +139,7 @@ int MemoryMonitor(pid_t mpid, char* filename, char* jsonSummary, unsigned int in
      Value& v1 = d["Max"];
      Value& v2 = d["Avg"];
 
+     startTime = time(0);
      // Monitoring loop until process exits
      while(kill(mpid, 0) == 0 && sigusr1 == false){
 
@@ -138,7 +147,7 @@ int MemoryMonitor(pid_t mpid, char* filename, char* jsonSummary, unsigned int in
         if (time(0) - lastIteration > interval){         
  
           iteration = iteration + 1;
-          ReadProcs( mpid, values);
+          ReadProcs( mpid, values, valuesIO);
 
           currentTime = time(0);
           file << currentTime << "\t" 
@@ -146,50 +155,47 @@ int MemoryMonitor(pid_t mpid, char* filename, char* jsonSummary, unsigned int in
 	       << values[1]   << "\t" 
 	       << values[2]   << "\t" 
 	       << values[3]   << "\t" 
-	       << (int) (values[4] - oldValues[4])    << "\t" 
-	       << (int) (values[5] - oldValues[5])    << "\t" 
-	       << (int) (values[6] - oldValues[6])    << "\t" 
-	       << (int) (values[7] - oldValues[7])    << std::endl;  
+	       << valuesIO[0]   << "\t" 
+	       << valuesIO[1]   << "\t" 
+	       << valuesIO[2]   << "\t" 
+	       << valuesIO[3]   << std::endl;  
 
           // Compute statistics
           for(int i=0;i<4;i++){
              avgValues[i] = avgValues[i] + values[i];
              if (values[i] > maxValues[i])
                maxValues[i] = values[i];
-	     //	     values[i] = 0;
-             lastIteration = time(0);}
+             lastIteration = time(0);
 
-          for(int i=4;i<8;i++){
+             if (valuesIO[i] > maxValuesIO[i])
+               maxValuesIO[i] = valuesIO[i];
+
+	     avgValuesIO[i] =  (unsigned long long) maxValuesIO[i] / (currentTime-startTime) ;
+
+	  }
 
-	    avgValues[i] =  avgValues[i] + (int) (values[i] - oldValues[i]) / ((float) interval) ;
-             if (values[i] > maxValues[i])
-               maxValues[i] = values[i];
-	     //             values[i] = 0;
-             lastIteration = time(0);}
 
           // Reset buffer
           buffer.Clear();
           writer.Reset(buffer);
 
-	  oldValues[0] = values[0];
-	  oldValues[1] = values[1];
-	  oldValues[2] = values[2];
-	  oldValues[3] = values[3];
-	  oldValues[4] = values[4];
-	  oldValues[5] = values[5];
-	  oldValues[6] = values[6];
-	  oldValues[7] = values[7];
-
-          for(int i=0;i<8;i++) values[i]=0;
+          for(int i=0;i<4;i++) { 
+	    values[i]=0;
+	    valuesIO[i]=0;
+	  }
 
           // Create JSON realtime summary
           for (std::pair<Value::MemberIterator, Value::MemberIterator> i= std::make_pair(v1.MemberBegin(), v2.MemberBegin()); 
 	       i.first != v1.MemberEnd() && i.second != v2.MemberEnd(); 
 	       ++i.first, ++i.second){
 
-	    if (tmp < 8) {
-             i.first->value.SetUint(maxValues[tmp]);
-             i.second->value.SetUint(avgValues[tmp]/iteration);
+	    if (tmp < 4) {
+             i.first->value.SetUint64(maxValues[tmp]);
+             i.second->value.SetUint64(avgValues[tmp]/iteration);
+	    }
+	    else if (tmp < 8) {
+             i.first->value.SetUint64(maxValuesIO[tmp-4]);
+             i.second->value.SetUint64(avgValuesIO[tmp-4]);
 	    }
              tmp += 1;
 
@@ -202,7 +208,7 @@ int MemoryMonitor(pid_t mpid, char* filename, char* jsonSummary, unsigned int in
           file2 << buffer.GetString() << std::endl;
           file2.close();
           wroteFile = true;
-       }
+	}
   
        // Move temporary file to new file
        if (wroteFile) {
diff --git a/Control/AthenaMP/src/memory-monitor/MemoryMonitor.h b/Control/AthenaMP/src/memory-monitor/MemoryMonitor.h
index 2d653f81fa4d4f47af5c076e63d654b2a6bbac04..f1f4e59e9d6191399733aceb054352dc11c876bd 100644
--- a/Control/AthenaMP/src/memory-monitor/MemoryMonitor.h
+++ b/Control/AthenaMP/src/memory-monitor/MemoryMonitor.h
@@ -19,7 +19,7 @@
 #include <thread> 
 #include <sstream>
 
-int ReadProcs(pid_t mother_pid, unsigned long values[8], bool verbose=false);
+int ReadProcs(pid_t mother_pid, unsigned long values[4], unsigned long long valuesIO[4], bool verbose=false);
 int MemoryMonitor(pid_t mpid, char* filename=NULL, char* jsonSummary=NULL, unsigned int interval=600);
 
 
diff --git a/Control/AthenaMP/src/memory-monitor/rapidjson/rapidjson.h b/Control/AthenaMP/src/memory-monitor/rapidjson/rapidjson.h
index 70ef3fe8aff564e59251646c1d6f034a5edc43ef..d92d90f276312a967596e6f9191a78b441b4b85b 100644
--- a/Control/AthenaMP/src/memory-monitor/rapidjson/rapidjson.h
+++ b/Control/AthenaMP/src/memory-monitor/rapidjson/rapidjson.h
@@ -413,8 +413,12 @@ RAPIDJSON_NAMESPACE_END
 
 #ifndef RAPIDJSON_HAS_CXX11_RVALUE_REFS
 #if defined(__clang__)
-#define RAPIDJSON_HAS_CXX11_RVALUE_REFS __has_feature(cxx_rvalue_references) && \
+# if __has_feature(cxx_rvalue_references) && \
     (defined(_LIBCPP_VERSION) || defined(__GLIBCXX__) && __GLIBCXX__ >= 20080306)
+#  define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1
+# else
+#  define RAPIDJSON_HAS_CXX11_RVALUE_REFS 0
+# endif
 #elif (defined(RAPIDJSON_GNUC) && (RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,3,0)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || \
       (defined(_MSC_VER) && _MSC_VER >= 1600)
 
diff --git a/Control/AthenaMPTools/src/AthenaMPToolBase.h b/Control/AthenaMPTools/src/AthenaMPToolBase.h
index edcca5f6661b9f955476aa6a4326196640ae8147..01fde78616e108e7726afe5a53d33654a95a3a26 100644
--- a/Control/AthenaMPTools/src/AthenaMPToolBase.h
+++ b/Control/AthenaMPTools/src/AthenaMPToolBase.h
@@ -57,6 +57,15 @@ class AthenaMPToolBase : public AthAlgTool
   virtual std::unique_ptr<AthenaInterprocess::ScheduledWork> fin_func() = 0;
 
  protected:
+  enum ESRange_Status {
+    ESRANGE_SUCCESS
+    , ESRANGE_NOTFOUND
+    , ESRANGE_SEEKFAILED
+    , ESRANGE_PROCFAILED
+    , ESRANGE_FILENOTMADE
+    , ESRANGE_BADINPFILE
+  };
+
   enum Func_Flag {
     FUNC_BOOTSTRAP
     , FUNC_EXEC
diff --git a/Control/AthenaMPTools/src/EvtRangeProcessor.cxx b/Control/AthenaMPTools/src/EvtRangeProcessor.cxx
index 18e95103086bb9aa3feb448850dec929d32e4fd9..4e45a8f175f94b1f094eaad372aaa4246dc54359 100644
--- a/Control/AthenaMPTools/src/EvtRangeProcessor.cxx
+++ b/Control/AthenaMPTools/src/EvtRangeProcessor.cxx
@@ -48,6 +48,7 @@ EvtRangeProcessor::EvtRangeProcessor(const std::string& type
   , m_rankId(-1)
   , m_nEventsBeforeFork(0)
   , m_chronoStatSvc("ChronoStatSvc", name)
+  , m_incidentSvc("IncidentSvc", name)
   , m_evtSeek(0)
   , m_channel2Scatterer("")
   , m_channel2EvtSel("")
@@ -91,11 +92,8 @@ StatusCode EvtRangeProcessor::initialize()
     return StatusCode::FAILURE;
   }
   
-  sc = m_chronoStatSvc.retrieve();
-  if (!sc.isSuccess()) {
-    ATH_MSG_ERROR("Cannot get ChronoStatSvc.");
-    return StatusCode::FAILURE;
-  }
+  ATH_CHECK(m_chronoStatSvc.retrieve());
+  ATH_CHECK(m_incidentSvc.retrieve());
   
   return StatusCode::SUCCESS;
 }
@@ -400,7 +398,6 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeProcessor::exec_func(
   int nEvt(1);
   int nEventsProcessed(0);
 
-  bool all_ok(true);
   std::queue<std::string> queueTokens;
 
   // Get the yampl connection channels
@@ -411,21 +408,15 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeProcessor::exec_func(
   std::ostringstream pidstr;
   pidstr << getpid();
 
-  // Get the IncidentSvc
-  IIncidentSvc* p_incidentSvc(0);
-  if(!serviceLocator()->service("IncidentSvc", p_incidentSvc).isSuccess()) {
-    ATH_MSG_ERROR("Unable to retrieve IncidentSvc");
-    all_ok = false;
-  }
-
   // Construct a "welcome" message to be sent to the EvtRangeScatterer
   std::string ping = pidstr.str() + std::string(" ready for event processing");
-  void* message2scatterer = malloc(ping.size());
-  memcpy(message2scatterer,ping.data(),ping.size());
-  socket2Scatterer->send(message2scatterer,ping.size());
-  ATH_MSG_INFO("Sent a welcome message to the Scatterer");
 
-  while(all_ok) {
+  while(true) {
+    void* message2scatterer = malloc(ping.size());   
+    memcpy(message2scatterer,ping.data(),ping.size());   
+    socket2Scatterer->send(message2scatterer,ping.size());
+    ATH_MSG_INFO("Sent a welcome message to the Scatterer");
+
     // Get the response - list of tokens - from the scatterer. 
     // The format of the response: | ResponseSize | RangeID, | evtEvtRange[,evtToken] |
     char *responseBuffer(0);
@@ -455,9 +446,7 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeProcessor::exec_func(
     queueTokens.pop();
     ATH_MSG_INFO("Received RangeID=" << rangeID);
     // Fire an incident
-    if(!queueTokens.empty()) {
-      p_incidentSvc->fireIncident(FileIncident(name(),"NextEventRange",rangeID));
-    }
+    m_incidentSvc->fireIncident(FileIncident(name(),"NextEventRange",rangeID));
 
     // Here we need to support two formats of the responseStr
     // Format 1. RangeID,startEvent,endEvent
@@ -469,6 +458,8 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeProcessor::exec_func(
     //
     // The seeking part is identical for Format 1 and 2
 
+    AthenaMPToolBase::ESRange_Status rangeStatus(AthenaMPToolBase::ESRANGE_SUCCESS);
+
     // Determine the format
     std::string filename("");
     if(queueTokens.front().find("PFN:")==0) {
@@ -476,8 +467,11 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeProcessor::exec_func(
       // Update InputCollections property of the Event Selector with the file name from Event Range
       filename = queueTokens.front().substr(4);
       if(setNewInputFile(filename).isFailure()) {
-        all_ok=false;
-        break;
+	ATH_MSG_WARNING("Failed to set input file for the range: " << rangeID);
+	rangeStatus = AthenaMPToolBase::ESRANGE_BADINPFILE;
+	reportError(socket2Scatterer,rangeStatus);
+	m_incidentSvc->fireIncident(FileIncident(name(),"NextEventRange","dummy"));
+	continue;
       }
       queueTokens.pop();
     }
@@ -487,56 +481,59 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeProcessor::exec_func(
     queueTokens.pop();
     int endEvent = std::atoi(queueTokens.front().c_str());
     queueTokens.pop();
-    if(filename.empty()) {
-      ATH_MSG_INFO("Range fields. "
-                   << "First Event:" << startEvent
-                   << ", Last Event:" << endEvent);
-    } 
-    else {
-      ATH_MSG_INFO("Range fields. File Name: " << filename
-                   << ", First Event:" << startEvent
-                   << ", Last Event:" << endEvent);
-    }
+    ATH_MSG_INFO("Range fields. File Name: " << (filename.empty()?"N/A":filename)
+		 << ", First Event:" << startEvent
+		 << ", Last Event:" << endEvent);
 
     // Process the events
     for(int i(startEvent-1); i<endEvent; ++i) {
-      if(m_evtSeek->seek(i).isFailure()) {
-        ATH_MSG_ERROR("Unable to seek to " << i);
-        all_ok=false;
+      StatusCode sc = m_evtSeek->seek(i);
+      if(sc.isRecoverable()) {
+	ATH_MSG_WARNING("Event " << i << " from range: " << rangeID << " not in the input file");
+	rangeStatus = AthenaMPToolBase::ESRANGE_NOTFOUND;
+	break;
+      }
+      else if(sc.isFailure()) {
+        ATH_MSG_WARNING("Failed to seek to " << i << " in range: " << rangeID);
+	rangeStatus = AthenaMPToolBase::ESRANGE_SEEKFAILED;
         break;
       }
       ATH_MSG_INFO("Seek to " << i << " succeeded");
       m_chronoStatSvc->chronoStart("AthenaMP_nextEvent");
-      StatusCode sc = m_evtProcessor->nextEvent(nEvt++);
+      sc = m_evtProcessor->nextEvent(nEvt++);
+      m_chronoStatSvc->chronoStop("AthenaMP_nextEvent");
       if(sc.isFailure()){
-        ATH_MSG_ERROR("Unable to process the event");
-        all_ok=false;
+        ATH_MSG_WARNING("Failed to process the event " << i << " in range:" << rangeID);
+        rangeStatus = AthenaMPToolBase::ESRANGE_PROCFAILED;
+	break;
       }
       else {
         ATH_MSG_DEBUG("Event processed");
         nEventsProcessed++;
       }
-      m_chronoStatSvc->chronoStop("AthenaMP_nextEvent");
-      if(!all_ok) break;
     }
 
+    // Fire dummy NextEventRange incident in order to cut the previous output and report it
+    m_incidentSvc->fireIncident(FileIncident(name(),"NextEventRange","dummy"));
+    if(rangeStatus!=AthenaMPToolBase::ESRANGE_SUCCESS) {
+      reportError(socket2Scatterer,rangeStatus);
+      continue;
+    }
+
+    // Event range successfully processed
     std::string strOutpFile;
-    if(all_ok) {
-      // Get the full path of the event range output file
-      for(boost::filesystem::directory_iterator fdIt(boost::filesystem::current_path()); fdIt!=boost::filesystem::directory_iterator(); fdIt++) {
-	if(fdIt->path().string().find(rangeID)!=std::string::npos) {
-	  if(strOutpFile.empty()) {
-	    strOutpFile = fdIt->path().string();
-	  }
-	  else {
-	    strOutpFile += (std::string(",")+fdIt->path().string());
-	  }	
+    // Get the full path of the event range output file
+    for(boost::filesystem::directory_iterator fdIt(boost::filesystem::current_path()); fdIt!=boost::filesystem::directory_iterator(); fdIt++) {
+      if(fdIt->path().string().find(rangeID)!=std::string::npos) {
+	if(strOutpFile.empty()) {
+	  strOutpFile = fdIt->path().string();
 	}
+	else {
+	  strOutpFile += (std::string(",")+fdIt->path().string());
+	}	
       }
     }
 
-    if(!all_ok) break;
-
     // Stop timing
     System::ProcessTime time_delta = System::getProcessTime() - time_start;
     
@@ -552,29 +549,22 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeProcessor::exec_func(
 			 << ",CPU:" << time_delta.cpuTime<System::Sec>()
 			 << ",WALL:" << time_delta.elapsedTime<System::Sec>();
       std::string outputFileReport = outputReportStream.str();
-
-      // Fire dummy NextEventRange incident in order to cut the previous output and report it
-      p_incidentSvc->fireIncident(FileIncident(name(),"NextEventRange","dummy"));
-
+      
       // Report the output
       message2scatterer = malloc(outputFileReport.size());
       memcpy(message2scatterer,outputFileReport.data(),outputFileReport.size());
       socket2Scatterer->send(message2scatterer,outputFileReport.size());
       ATH_MSG_INFO("Reported the output " << outputFileReport);
     }
-
-    // Request the next available range
-    message2scatterer = malloc(ping.size());
-    memcpy(message2scatterer,ping.data(),ping.size());
-    socket2Scatterer->send(message2scatterer,ping.size());
-    ATH_MSG_DEBUG("Sent a message to the scatterer: " << ping);
+    else {
+      // This is an error: range successfully processed but no outputs were made
+      ATH_MSG_WARNING("Failed to make an output file for range: " << rangeID);
+      reportError(socket2Scatterer,AthenaMPToolBase::ESRANGE_FILENOTMADE);
+    }
   } // Main "event loop"
 
-  if(all_ok) {
-    if(m_evtProcessor->executeRun(0).isFailure()) {
-      ATH_MSG_ERROR("Could not finalize the Run");
-      all_ok=false;
-    }
+  if(m_evtProcessor->executeRun(0).isFailure()) {
+    ATH_MSG_WARNING("Could not finalize the Run");
   }
 
   std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
@@ -582,7 +572,7 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeProcessor::exec_func(
   // Return value: "ERRCODE|Func_Flag|NEvt"
   int outsize = 2*sizeof(int)+sizeof(AthenaMPToolBase::Func_Flag);
   void* outdata = malloc(outsize);
-  *(int*)(outdata) = (all_ok?0:1); // Error code: for now use 0 success, 1 failure
+  *(int*)(outdata) = 0; // Error code: for now use 0 success, 1 failure
   AthenaMPToolBase::Func_Flag func = AthenaMPToolBase::FUNC_EXEC;
   memcpy((char*)outdata+sizeof(int),&func,sizeof(func));
   memcpy((char*)outdata+sizeof(int)+sizeof(func),&nEventsProcessed,sizeof(int));
@@ -604,16 +594,12 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeProcessor::fin_func()
 {
   ATH_MSG_INFO("Fin function in the AthenaMP worker PID=" << getpid());
 
-  bool all_ok(true);
-
   if(m_appMgr->stop().isFailure()) {
-    ATH_MSG_ERROR("Unable to stop AppMgr"); 
-    all_ok=false;
+    ATH_MSG_WARNING("Unable to stop AppMgr"); 
   }
   else { 
     if(m_appMgr->finalize().isFailure()) {
-      ATH_MSG_ERROR("Unable to finalize AppMgr");
-      all_ok=false;
+      ATH_MSG_WARNING("Unable to finalize AppMgr");
     }
   }
 
@@ -622,7 +608,7 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> EvtRangeProcessor::fin_func()
   // Return value: "ERRCODE|Func_Flag|NEvt"  (Here NEvt=-1)
   int outsize = 2*sizeof(int)+sizeof(AthenaMPToolBase::Func_Flag);
   void* outdata = malloc(outsize);
-  *(int*)(outdata) = (all_ok?0:1); // Error code: for now use 0 success, 1 failure
+  *(int*)(outdata) = 0; // Error code: for now use 0 success, 1 failure
   AthenaMPToolBase::Func_Flag func = AthenaMPToolBase::FUNC_FIN;
   memcpy((char*)outdata+sizeof(int),&func,sizeof(func));
   int nEvt = -1;
@@ -753,3 +739,13 @@ StatusCode EvtRangeProcessor::setNewInputFile(const std::string& newFile)
   }
   return StatusCode::SUCCESS;
 }
+
+void EvtRangeProcessor::reportError(yampl::ISocket* socket, AthenaMPToolBase::ESRange_Status status)
+{
+  pid_t pid = getpid();
+  size_t messageSize = sizeof(pid_t)+sizeof(AthenaMPToolBase::ESRange_Status);
+  void* message2scatterer = malloc(messageSize);
+  memcpy(message2scatterer,&pid,sizeof(pid_t));
+  memcpy((pid_t*)message2scatterer+1,&status,sizeof(AthenaMPToolBase::ESRange_Status));
+  socket->send(message2scatterer,messageSize);
+}
diff --git a/Control/AthenaMPTools/src/EvtRangeProcessor.h b/Control/AthenaMPTools/src/EvtRangeProcessor.h
index a4e8e36aedd9f08381166859dab595fafe6edf37..14759ab36ef691b7a84326dcb45abb00a9ecdef1 100644
--- a/Control/AthenaMPTools/src/EvtRangeProcessor.h
+++ b/Control/AthenaMPTools/src/EvtRangeProcessor.h
@@ -16,6 +16,7 @@
 
 class IEventSeek;
 class IChronoStatSvc;
+class IIncidentSvc;
 namespace yampl {
   class ISocketFactory;
   class ISocket;
@@ -57,12 +58,14 @@ class EvtRangeProcessor : public AthenaMPToolBase
   int decodeProcessResult(const AthenaInterprocess::ProcessResult* presult);
   StatusCode startProcess();
   StatusCode setNewInputFile(const std::string& newFile);
+  void reportError(yampl::ISocket* socket,AthenaMPToolBase::ESRange_Status status);
 
   bool m_isPileup;        // Are we doing pile-up digitization?
   int  m_rankId;          // Each worker has its own unique RankID from the range (0,...,m_nprocs-1) 
   int  m_nEventsBeforeFork;
 
   ServiceHandle<IChronoStatSvc>     m_chronoStatSvc;
+  ServiceHandle<IIncidentSvc>       m_incidentSvc;
   IEventSeek*                       m_evtSeek;
 
   StringProperty                    m_channel2Scatterer;
diff --git a/Control/AthenaMPTools/src/EvtRangeScatterer.cxx b/Control/AthenaMPTools/src/EvtRangeScatterer.cxx
index 4c00082895f8d3e23abc64b54571d35d442a74aa..0c3da82ad342ddadc5605c62fe4293011c84b817 100644
--- a/Control/AthenaMPTools/src/EvtRangeScatterer.cxx
+++ b/Control/AthenaMPTools/src/EvtRangeScatterer.cxx
@@ -460,11 +460,41 @@ std::string EvtRangeScatterer::getNewRangeRequest(yampl::ISocket* socket2Process
 					       , yampl::ISocket* socket2Pilot
 					       , int& procReportPending)
 {
-//  ATH_MSG_DEBUG("In getNewRangeRequest ..." );
   void* processor_request(0);
   ssize_t processorRequestSize = socket2Processor->tryRecv(processor_request);
 
   if(processorRequestSize==-1) return std::string("");
+  if(processorRequestSize==sizeof(pid_t)+sizeof(AthenaMPToolBase::ESRange_Status)) {
+    ATH_MSG_INFO("Processor reported event range processing error");
+    pid_t pid = *((pid_t*)processor_request);
+    AthenaMPToolBase::ESRange_Status status = *((AthenaMPToolBase::ESRange_Status*)((pid_t*)processor_request+1));
+    std::string errorStr("ERR_ATHENAMP_PROCESS "+ m_pid2RangeID[pid] + ": ");
+    switch(status) {
+    case AthenaMPToolBase::ESRANGE_NOTFOUND:
+      errorStr+=std::string("Not found in the input file");
+      break;
+    case AthenaMPToolBase::ESRANGE_SEEKFAILED :	
+      errorStr+=std::string("Seek failed");
+      break;
+    case AthenaMPToolBase::ESRANGE_PROCFAILED :
+      errorStr+=std::string("Failed to process event range");
+      break;
+    case AthenaMPToolBase::ESRANGE_FILENOTMADE :
+      errorStr+=std::string("Failed to make output file");
+      break;
+    case AthenaMPToolBase::ESRANGE_BADINPFILE :
+      errorStr+=std::string("Failed to set input file");
+      break;
+    default:
+      break;
+    }
+    void* errorMessage = malloc(errorStr.size());
+    memcpy(errorMessage,errorStr.data(),errorStr.size());
+    socket2Pilot->send(errorMessage,errorStr.size());
+    procReportPending--;
+    ATH_MSG_INFO("Error reported to the pilot. Reports pending: " << procReportPending);
+    return std::string("");
+  }
   std::string strProcessorRequest((const char*)processor_request,processorRequestSize);
   ATH_MSG_INFO("Received request from a processor: " << strProcessorRequest);
   // Decode the request. If it contains output file name then pass it over to the pilot and return empty string
diff --git a/Control/AthenaMPTools/src/SharedWriterTool.cxx b/Control/AthenaMPTools/src/SharedWriterTool.cxx
index 5a64c2fc21b9d69da6188d9d8e258f3c3e1dd931..fb7a8bf3d5a7e4b030e8f9615cbc3d6bb3910e1b 100644
--- a/Control/AthenaMPTools/src/SharedWriterTool.cxx
+++ b/Control/AthenaMPTools/src/SharedWriterTool.cxx
@@ -17,9 +17,11 @@ SharedWriterTool::SharedWriterTool(const std::string& type
 				   , const std::string& name
 				   , const IInterface* parent)
   : AthenaMPToolBase(type,name,parent)
+  , m_rankId(0)
+  , m_writer(0)
   , m_cnvSvc(0)
 {
-  m_subprocDirPrefix = "shared_writer";
+  m_subprocDirPrefix = "shared_writer_";
 }
 
 SharedWriterTool::~SharedWriterTool()
@@ -48,15 +50,10 @@ StatusCode SharedWriterTool::finalize()
   return StatusCode::SUCCESS;
 }
 
-int SharedWriterTool::makePool(int maxevt, int nprocs, const std::string& topdir)
+int SharedWriterTool::makePool(int /*maxevt*/, int nprocs, const std::string& topdir)
 {
   ATH_MSG_DEBUG("In makePool " << getpid());
 
-  if(maxevt < -1) {
-    ATH_MSG_ERROR("Invalid number of events requested: " << maxevt);
-    return -1;
-  }
-
   if(topdir.empty()) {
     ATH_MSG_ERROR("Empty name for the top directory!");
     return -1;
@@ -65,13 +62,39 @@ int SharedWriterTool::makePool(int maxevt, int nprocs, const std::string& topdir
   m_nprocs = (nprocs==-1?sysconf(_SC_NPROCESSORS_ONLN):nprocs);
   m_subprocTopDir = topdir;
 
-  // Create the process group with only one process and map_async bootstrap
-  m_processGroup = new AthenaInterprocess::ProcessGroup(1);
-  ATH_MSG_INFO("Shared Writer process created");
-  if(mapAsyncFlag(AthenaMPToolBase::FUNC_BOOTSTRAP))
+  m_writer = 0;
+  IProperty* propertyServer = dynamic_cast<IProperty*>(m_cnvSvc);
+  if(propertyServer==0) {
+    ATH_MSG_ERROR("Unable to cast conversion service to IProperty");
     return -1;
+  }
+  else {
+    std::string propertyName("OutputStreamingTool");
+    std::vector<std::string> writeClients(m_writer);
+    StringArrayProperty writeClientsProp(propertyName,writeClients);
+    if(propertyServer->getProperty(&writeClientsProp).isFailure()) {
+      ATH_MSG_INFO("Conversion service does not have OutputStreamingTool property");
+    }
+    else {
+      m_writer = writeClientsProp.value().size();
+    }
+  }
 
-  return 1;  
+  // Create rank queue and fill it
+  m_sharedRankQueue = new AthenaInterprocess::SharedQueue("SharedWriterTool_RankQueue_"+m_randStr,m_writer,sizeof(int));
+  for(int i=0; i<m_writer; ++i)
+    if(!m_sharedRankQueue->send_basic<int>(i)) {
+      ATH_MSG_ERROR("Unable to send int to the ranks queue!");
+      return -1;
+    }
+
+  // Create the process group and map_async bootstrap
+  m_processGroup = new AthenaInterprocess::ProcessGroup(m_writer);
+  ATH_MSG_INFO("Created Pool of " << m_writer << " shared writer processes");
+  if(mapAsyncFlag(AthenaMPToolBase::FUNC_BOOTSTRAP))
+    return -1;
+  ATH_MSG_INFO("Shared writer processes bootstraped");
+  return 1;
 }
 
 StatusCode SharedWriterTool::exec()
@@ -80,6 +103,7 @@ StatusCode SharedWriterTool::exec()
 
   if(mapAsyncFlag(AthenaMPToolBase::FUNC_EXEC))
     return StatusCode::FAILURE;
+  ATH_MSG_INFO("Shared writer started write events");
 
   // Set exit flag on writer
   if(m_processGroup->map_async(0,0)){
@@ -92,9 +116,13 @@ StatusCode SharedWriterTool::exec()
 void SharedWriterTool::subProcessLogs(std::vector<std::string>& filenames)
 {
   filenames.clear();
-  boost::filesystem::path writer_rundir(m_subprocTopDir);
-  writer_rundir/= boost::filesystem::path(m_subprocDirPrefix);
-  filenames.push_back(writer_rundir.string()+std::string("/AthenaMP.log"));
+  for(int i=0; i<m_writer; ++i) {
+    std::ostringstream workerIndex;
+    workerIndex << i;
+    boost::filesystem::path writer_rundir(m_subprocTopDir);
+    writer_rundir/= boost::filesystem::path(m_subprocDirPrefix+workerIndex.str());
+    filenames.push_back(writer_rundir.string()+std::string("/AthenaMP.log"));
+  }
 }
 
 AthenaMP::AllWorkerOutputs_ptr SharedWriterTool::generateOutputReport()
@@ -115,9 +143,18 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> SharedWriterTool::bootstrap_f
   // reported in the master proces
   // ...
 
-  // Writer dir: mkdir 
+  // ________________________ Get RankID ________________________
+  //
+  if(!m_sharedRankQueue->receive_basic<int>(m_rankId)) {
+    ATH_MSG_ERROR("Unable to get rank ID!");
+    return outwork;
+  }
+  std::ostringstream workerIndex;
+  workerIndex<<m_rankId;
+
+  // Writer dir: mkdir
   boost::filesystem::path writer_rundir(m_subprocTopDir);
-  writer_rundir /= boost::filesystem::path(m_subprocDirPrefix);
+  writer_rundir /= boost::filesystem::path(m_subprocDirPrefix+workerIndex.str());
 
   if(mkdir(writer_rundir.string().c_str(),S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)==-1) {
     ATH_MSG_ERROR("Unable to make writer run directory: " << writer_rundir.string() << ". " << strerror(errno));
@@ -129,8 +166,8 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> SharedWriterTool::bootstrap_f
     return outwork;
 
   ATH_MSG_INFO("Logs redirected in the AthenaMP Shared Writer PID=" << getpid());
-     
-  // Update Io Registry   
+
+  // Update Io Registry
   if(updateIoReg(writer_rundir.string()))
     return outwork;
 
@@ -149,7 +186,7 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> SharedWriterTool::bootstrap_f
 
   // Use IDataShare to make ConversionSvc a Share Server
   IDataShare* cnvSvc = dynamic_cast<IDataShare*>(m_cnvSvc);
-  if (cnvSvc == 0 || !cnvSvc->makeServer(-m_nprocs - 1).isSuccess()) {
+  if (cnvSvc == 0 || !cnvSvc->makeServer(-m_nprocs - 1 - 1024 * m_rankId).isSuccess()) {
     ATH_MSG_ERROR("Failed to make the conversion service a share server");
     return outwork;
   }
@@ -164,22 +201,8 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> SharedWriterTool::bootstrap_f
   } else {
     ATH_MSG_DEBUG("Successfully reinitialized I/O");
   }
-/*
-  // Start the event selector 
-  IService* evtSelSvc = dynamic_cast<IService*>(m_evtSelector);
-  if(!evtSelSvc) {
-    ATH_MSG_ERROR("Failed to dyncast event selector to IService");
-    return outwork;
-  }
-  if(!evtSelSvc->start().isSuccess()) {
-    ATH_MSG_ERROR("Failed to restart the event selector");
-    return outwork;
-  } else {
-    ATH_MSG_DEBUG("Successfully restarted the event selector");
-  }
-*/
 
-  // Writer dir: chdir 
+  // Writer dir: chdir
   if(chdir(writer_rundir.string().c_str())==-1) {
     ATH_MSG_ERROR("Failed to chdir to " << writer_rundir.string());
     return outwork;
@@ -208,6 +231,17 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> SharedWriterTool::exec_func()
     all_ok=false;
   }
 
+  if(m_appMgr->stop().isFailure()) {
+    ATH_MSG_ERROR("Unable to stop AppMgr");
+    all_ok=false;
+  }
+  else {
+    if(m_appMgr->finalize().isFailure()) {
+      ATH_MSG_ERROR("Unable to finalize AppMgr");
+      all_ok=false;
+    }
+  }
+
   std::unique_ptr<AthenaInterprocess::ScheduledWork> outwork(new AthenaInterprocess::ScheduledWork);
   outwork->data = malloc(sizeof(int));
   *(int*)(outwork->data) = (all_ok?0:1); // Error code: for now use 0 success, 1 failure
@@ -218,7 +252,6 @@ std::unique_ptr<AthenaInterprocess::ScheduledWork> SharedWriterTool::exec_func()
   // reported in the master proces
   // ...
   return outwork;
-
 }
 
 std::unique_ptr<AthenaInterprocess::ScheduledWork> SharedWriterTool::fin_func()
diff --git a/Control/AthenaMPTools/src/SharedWriterTool.h b/Control/AthenaMPTools/src/SharedWriterTool.h
index 449bd4d9929dfaee9193bdc28ea7db0296a9af60..a19058e61200fe064b20dd0e9a6e3cdff67ac760 100644
--- a/Control/AthenaMPTools/src/SharedWriterTool.h
+++ b/Control/AthenaMPTools/src/SharedWriterTool.h
@@ -38,6 +38,10 @@ class SharedWriterTool : public AthenaMPToolBase
   SharedWriterTool(const SharedWriterTool&);
   SharedWriterTool& operator= (const SharedWriterTool&);
 
+  int  m_rankId;          // Each worker has its own unique RankID from the range (0,...,m_nprocs-1)
+  int  m_writer;          // Number of writer stream servers
+
+  AthenaInterprocess::SharedQueue*  m_sharedRankQueue;
   IConversionSvc*             m_cnvSvc;
 
 };
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h b/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h
index 32160adfd4d968f9c64eec2e7e1e75b553ecb940..ccb97ff63fca9762d65cbcf990f084aaa0484e47 100755
--- a/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/AthenaMonManager.h
@@ -91,6 +91,8 @@ class AthenaMonManager : public AthAlgorithm {
       static unsigned int getLBsMedStat();
       static unsigned int getLBsHigStat();
 
+      bool forkedProcess();
+
       virtual StatusCode initialize();
       virtual StatusCode execute();
       virtual StatusCode stop();
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/GenericMonitoringTool.h b/Control/AthenaMonitoring/AthenaMonitoring/GenericMonitoringTool.h
index 4847b74bd75549ee5e3431021e057373a55ef292..5acff25e1c808085de84e91709156b439d113647 100644
--- a/Control/AthenaMonitoring/AthenaMonitoring/GenericMonitoringTool.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/GenericMonitoringTool.h
@@ -24,44 +24,49 @@
 #include "AthenaMonitoring/HistogramFiller.h"
 
 /**
- * @brief Basic monitoring tool for the HLT trigger.
+ * @brief Generic monitoring tool for athena components
  *
- * That tool works as follows. It is supposed to be attached to HLT algorithms (put to the list of AthenaMonTools of the algorithm.) 
- * During initialization it reads JO and also the list of monitoring variables exported by the algorithm (via HLT::IMoniotredAlgo interface).
- * Then for each declared histogram simple helper classes are created which span hisogram defined and the variable to be monitorred. (they are called HistogramFiller1D, HistogramFiller2D, ...).
- * The varaibles which are not mentioned in the configuration, this for which histograms are not defined, are just silently ignored.
- * Other way around is not the case. If there is request to create some histogram for variable not beeing exported by the algorithms the WARNING message is printed.
+ * The tool can be used standalone or attached to an algorithm, tool or service.
+ * The variables to be monitored need to be exposed via the Monitored framework.
+ * The histograms to be created are configured via the `Histograms` list property.
+ * Each list entry has the form:
  *
- * During execution (in fillHists() method) the loop over all histogram filles is executed and internally varaibles are picked up and used to fill histograms.
+ *   "PATH, HTYPE, NAME, TITLE, BINNING, [LABELS], OPTIONS"
  *
- * The JO is an list of histogram definitions of the following form:
- * PATH, HTYPE, NAME, TITLE, BINNING ...., OPTIONS
-
  * Example configuration strings:
- * ["/SHIFT, TH1D, name, title, xbins, xmin, xmax, opt"]
- * ["/EXPERT, TH2D, "name1,name2", title, xbins, xmin, xmax, ybins, ymin, ymax, opt"]
- * In last case the decision to create and fill 2D histograms happens at configuration time.
- * Name specifier can get additional parameter which is an alias. This alias will be used for naming actual histogram.
- * ex. name;alias for TH1* , name1,name2;alias for TH2*
+ * - `"SHIFT, TH1D, name, title, xbins, xmin, xmax, opt"`
+ * - `"EXPERT, TH2D, "name1,name2", title, xbins, xmin, xmax, ybins, ymin, ymax, opt"`
+ *
+ * As an option an alias can be provided for the naming of the actual histogram:
+ *   `"name;alias"` or `"name1,name2;alias"`
+ * For the configuration from python the helper GenericMonitoringTool.defineHistogram should be used.
  *
+ * The following histogram types are supported:
+ * - TH1[F,D,I]
+ * - TH2[F,D,I]
+ * - TProfile[2D]
  *
+ * The following top-level paths are supported:
+ * - EXPERT, SHIFT, DEBUG, RUNSTAT, EXPRESS
  *
- * Following hisogram types are supported: TH1(F|I|D), TH2(F|I|D). 
- * Following paths are supported: EXPERT, SHIFT, DEBUG, RUNSTAT
- * Following options are suppored: kCanRebin, kCummulative
- * -# kCanRebin enables ROOT (http://root.cern.ch) internal functionality of autobinning of the histogram.
- * -# kCumulative does fill of all bins left to the bin into which the value falls, sort of distribuant
- * -# kLBN does make the histogram LBN aware (means many histograms)
- * -# kVec adds the content of the monitored varaible to the bins as if monitored varaible would be another histogram
- * -# kVecUO adds the content of the monitored varaible to the bins as if monitored varaible would be another histogram treating oth and last elements as under/overflows
+ * The following options are suppored:
+ * - `kCanRebin` enables ROOT's internal functionality of autobinning the histogram
+ * - `kCumulative` does fill of all bins left to the bin into which the value falls
+ * - `kLBN` makes the histogram lumiblock aware
+ * - `kVec` adds the content of the monitored variable to the histogram bins
+ * - `kVecUO` same as kVec but treat 0th(last) element as underflow(overflow)
  *
- * @author Tomasz Bold <Tomasz.Bold@cern.ch>
+ * Optionally, a colon-separated list of bin labels ("bin1:bin2:bin3:") can be provided (at least one
+ * colon is required). In case of a 2D histogram the labels are assigned consecutively to the x-axis 
+ * and then y-axis bins.
+ *
+ * @author Tomasz Bold
  * @author Piotr Sarna
  */
 
 class GenericMonitoringTool : public AthAlgTool {
 public:
-	static const InterfaceID& interfaceID();
+  static const InterfaceID& interfaceID();
 
   GenericMonitoringTool(const std::string & type, const std::string & name, const IInterface* parent);
   virtual ~GenericMonitoringTool();
@@ -71,12 +76,22 @@ public:
 private:   
   ServiceHandle<ITHistSvc> m_histSvc;  
   std::vector<Monitored::HistogramFiller*> m_fillers;              //!< list of fillers
-  std::string m_histogramsGroupName;                               //!< property (name of group to which histograms would be generated)
+  std::string m_histoPath;                                         //!< property (base path for histograms)
   std::vector<std::string> m_histograms;                           //!< property (list of histogram definitions)
 };
 
+/*
+ * Helper class to declare an empty monitoring ToolHandle
+ */
+class VoidMonitoringTool : public ToolHandle<GenericMonitoringTool> {
+public:
+  VoidMonitoringTool(const IInterface* parent) :
+    ToolHandle<GenericMonitoringTool>("", parent) {}
+};
+
 #include "AthenaMonitoring/MonitoredScope.h"
 #include "AthenaMonitoring/MonitoredScalar.h"
 #include "AthenaMonitoring/MonitoredCollection.h"
+#include "AthenaMonitoring/MonitoredTimer.h"
 
 #endif /* AthenaMonitoring_GenericMonitoringTool_h */
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredCollection.h b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredCollection.h
index f4479c0cbf44e48922cb0f296c31ea030d5e35f0..f6d95e35d181dd31e984de8165de729412369ab6 100644
--- a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredCollection.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredCollection.h
@@ -6,28 +6,90 @@
 #define AthenaMonitoring_MonitoredCollection_h
 
 #include <functional>
+#include <vector>
+#include <type_traits>
 
 #include "AthenaMonitoring/IMonitoredVariable.h"
-#include "AthenaMonitoring/MonitoredHelpers.h"
 
 namespace Monitored {
+
+    /**
+     * Monitoring of (double-convertable) collections
+     */
     namespace MonitoredCollection {
+  
+        // Forward declares
+        template<class T> class MonitoredValuesCollection;
+        template<class T> class MonitoredObjectsCollection;
+
+        /**
+         * Declare a monitored (double-convertable) collection
+         *
+         * Any iterable container with elements covertable to double can be monitored.
+         *
+         * @param name        Name of monitored quantity
+         * @param collection  Collection to be monitored (e.g. STL container or array)
+         *
+         * \code
+         *   std::vector<float> eta( {0.2, 0.1} );
+         *   auto m = MonitoredCollection::declare("Eta", eta);
+         * \endcode
+         */
         template<class T>
-        class MonitoredValuesCollection;
-        
-        template<class T>
-        MonitoredValuesCollection<T> declare(std::string name, const T& collection);
-        
-        template<class T>
-        class MonitoredObjectsCollection;
+        MonitoredValuesCollection<T> declare(std::string name, const T& collection) {
+          return MonitoredValuesCollection<T>(std::move(name), collection);
+        }
         
+         /**
+         * Declare a monitored collection of objects
+         *
+         * A converter function/accessor needs to be provided to extract the relevant quantity.
+         *
+         * @param name        Name of monitored quantity
+         * @param collection  Collection to be monitored (e.g. STL container or array)
+         * @param converterToDouble  Function taking an element and returning a double
+         *
+         * \code
+         *   std::vector<Track> tracks;
+         *   auto phi = MonitoredCollection::declare( "Phi", tracks, []( const Track& t ) { return t.phi(); } );
+         * \endcode
+         */
         template<class T>
-        MonitoredObjectsCollection<T> declare(std::string name, const T& collection, std::function<double(const typename MonitoredHelpers::get_collection_values_type<T>::value_type&)> converterToDouble);
+        MonitoredObjectsCollection<T> declare(std::string name, const T& collection, 
+                                              std::function<double(const typename MonitoredObjectsCollection<T>::value_type&)> converterToDouble) {
+            return MonitoredObjectsCollection<T>(std::move(name), collection, 
+                                                 std::move(converterToDouble));
+        }
+
+        namespace detail {
+            /// Get element type for containers
+            template <typename T>
+            struct get_value_type {
+                typedef typename T::value_type value_type;
+            };
+            /// Get element type for arrays
+            template <typename T, size_t N>
+            struct get_value_type<T[N]> {
+                typedef T value_type;
+            };
+        }
+  
         
+        /**
+         * Monitoring of collections
+         *
+         * This class is not supposed to be used by the end user.
+         */
         template<class T>
         class MonitoredValuesCollection : public IMonitoredVariable {
         public:
-            static_assert(MonitoredHelpers::are_collection_values_have_double_operator<T>::value, "Collection values must be convertable to double");
+            /// Type of the collection elements
+            using value_type = typename detail::get_value_type<T>::value_type;
+
+            static_assert(std::is_convertible<value_type, double>::value, 
+                          "Collection values must be convertable to double");
+
+            /// @brief .     \if empty doc string required due to doxygen bug 787131 \endif
             friend MonitoredValuesCollection<T> declare<T>(std::string name, const T& collection);
             
             MonitoredValuesCollection(MonitoredValuesCollection&&) = default;
@@ -44,44 +106,50 @@ namespace Monitored {
             MonitoredValuesCollection& operator=(MonitoredValuesCollection const&) = delete;
         };
         
+
+        /**
+         * Monitoring of object collections
+         *
+         * This class is not supposed to be used by the end user.
+         */
         template<class T>
         class MonitoredObjectsCollection : public IMonitoredVariable {
         public:
-            friend MonitoredObjectsCollection<T> declare<T>(std::string name, const T& collection, std::function<double(const typename MonitoredHelpers::get_collection_values_type<T>::value_type&)> converterToDouble);
+            /// Type of the collection elements
+            using value_type = typename detail::get_value_type<T>::value_type;
+
+            /// @brief .     \if empty doc string required due to doxygen bug 787131 \endif
+            // With a non-template friend declaration, clang 4.0.1
+            // fails to match the friend.
+            template <class U>
+            friend MonitoredObjectsCollection<U> declare(std::string name, const U& collection, 
+                                                         std::function<double(const typename MonitoredObjectsCollection<U>::value_type&)> converterToDouble);
             
             MonitoredObjectsCollection(MonitoredObjectsCollection&&) = default;
             
             const std::vector<double> getVectorRepresentation() const override {
-                auto distance = std::distance(std::begin(m_collection), std::end(m_collection));
+                // Could be replaced with std::size in C++17
+                auto N = std::distance(std::begin(m_collection), std::end(m_collection));
                 
+                // Reserve space and fill vector
                 std::vector<double> result;
-                result.reserve(distance);
-                
-                for(auto value : m_collection) {
-                    result.push_back(m_converterToDouble(value));
-                }
+                result.reserve(N);
+                for(auto value : m_collection) result.push_back(m_converterToDouble(value));
                 
                 return result;
             }
         private:
             const T& m_collection;
-            std::function<double(const typename MonitoredHelpers::get_collection_values_type<T>::value_type&)> m_converterToDouble;
+            std::function<double(const value_type&)> m_converterToDouble;
             
-            MonitoredObjectsCollection(std::string name, const T& collection, std::function<double(const typename MonitoredHelpers::get_collection_values_type<T>::value_type&)> converterToDouble)
-            : IMonitoredVariable(std::move(name)), m_collection(collection), m_converterToDouble(std::move(converterToDouble)) { }
+            MonitoredObjectsCollection(std::string name, const T& collection, 
+                                       std::function<double(const value_type&)> converterToDouble)
+            : IMonitoredVariable(std::move(name)), 
+              m_collection(collection), 
+              m_converterToDouble(std::move(converterToDouble)) { }
             MonitoredObjectsCollection(MonitoredObjectsCollection const&) = delete;
             MonitoredObjectsCollection& operator=(MonitoredObjectsCollection const&) = delete;
         };
-        
-        template<class T>
-        MonitoredValuesCollection<T> declare(std::string name, const T& collection) {
-            return MonitoredValuesCollection<T>(std::move(name), collection);
-        }
-        
-        template<class T>
-        MonitoredObjectsCollection<T> declare(std::string name, const T& collection, std::function<double(const typename MonitoredHelpers::get_collection_values_type<T>::value_type&)> converterToDouble) {
-            return MonitoredObjectsCollection<T>(std::move(name), collection, std::move(converterToDouble));
-        }
     }
 }
 
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredHelpers.h b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredHelpers.h
deleted file mode 100644
index 14d0b17a1b95701899a5cbbace3b23e2944a79e1..0000000000000000000000000000000000000000
--- a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredHelpers.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef AthenaMonitoring_MonitoringHelpers_h
-#define AthenaMonitoring_MonitoringHelpers_h
-
-#include <type_traits>
-
-namespace Monitored {
-    namespace MonitoredHelpers {
-        template <typename T>
-        struct get_collection_values_type {
-            typedef typename T::value_type value_type;
-        };
-        
-        template <typename T, size_t N>
-        struct get_collection_values_type<T[N]> {
-            typedef T value_type;
-        };
-        
-        template <typename, typename = void>
-        struct has_double_operator {
-            enum { value = false };
-        };
-        
-        template <typename T>
-        struct has_double_operator<T, decltype(void(double(std::declval<const T&>())))> {
-            enum { value = true };
-        };
-        
-        template <typename T>
-        struct are_collection_values_have_double_operator {
-            enum { value = has_double_operator<typename get_collection_values_type<T>::value_type>::value };
-        };
-    }
-}
-
-#endif /* AthenaMonitoring_MonitoringHelpers_h */
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScalar.h b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScalar.h
index dc147ef4ec651c66227ca90ef7da083f0080aed7..62d1bb03d0fdf6ca9a86cded1267b1ec3d1b0291 100644
--- a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScalar.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScalar.h
@@ -8,9 +8,12 @@
 #include <vector>
 
 #include "AthenaMonitoring/IMonitoredVariable.h"
-#include "AthenaMonitoring/MonitoredHelpers.h"
 
 namespace Monitored {
+
+    /**
+     * Monitoring of scalars
+     */
     namespace MonitoredScalar {
         template<class T>
         class MonitoredScalar;
@@ -18,10 +21,17 @@ namespace Monitored {
         template<class T>
         MonitoredScalar<T> declare(std::string name, const T& defaultValue = {});
         
+        /**
+         * Monitoring of scalars
+         *
+         * This class is not supposed to be used by the end user.
+         */
         template<class T>
         class MonitoredScalar : public IMonitoredVariable {
         public:
-            static_assert(MonitoredHelpers::has_double_operator<T>::value, "Value must be convertable to double");
+            static_assert(std::is_convertible<T,double>::value,"Value must be convertable to double");
+
+            /// @brief .     \if empty doc string required due to doxygen bug 787131 \endif
             friend MonitoredScalar<T> declare<T>(std::string name, const T& defaultValue);
             
             MonitoredScalar(MonitoredScalar&&) = default;
@@ -29,6 +39,13 @@ namespace Monitored {
             T operator=(T value) { m_value = value;  return value; }
 	    
             operator T() const { return m_value; }
+            operator T&() { return m_value; }
+
+            // Needed to work around an apparent bug in clang 4.0.1.
+            // Without these declarations, clang rejects `--SCALAR'
+            // (but ++SCALAR, SCALAR++, and SCALAR-- are all accepted!).
+            T operator--() { return --m_value; }
+            T operator--(int) { return m_value--; }
             
             const std::vector<double> getVectorRepresentation() const override { return { double(m_value) }; }
         private:
@@ -37,9 +54,22 @@ namespace Monitored {
             MonitoredScalar(std::string name, const T& defaultValue = {})
               : IMonitoredVariable(std::move(name)), m_value(defaultValue) { }
             MonitoredScalar(MonitoredScalar const&) = delete;
-	    MonitoredScalar& operator=(MonitoredScalar const& ) = delete;
+            MonitoredScalar& operator=(MonitoredScalar const& ) = delete;
         };
         
+        /**
+         * Declare a monitored scalar
+         *
+         * Monitoring for any double-convertable scalar
+         *
+         * @param name         Name of monitored quantity
+         * @param defaultValue default value assigned to the monitored scalar
+         *
+         * \code
+         *   auto phi = MonitoredScalar::declare("phi", 4.2);       // deduced double
+         *   auto eta = MonitoredScalar::declare<float>("eta", 0);  // explicit float
+         * \endcode
+         */
         template<class T>
         MonitoredScalar<T> declare(std::string name, const T& defaultValue) {
             return MonitoredScalar<T>(std::move(name), defaultValue);
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScope.h b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScope.h
index 7ad482e13da7a4dc2619d6842877bc75075cae64..5e9588bafeb894b243ed8d630458c27b07b6ffaa 100644
--- a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScope.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredScope.h
@@ -16,61 +16,74 @@
 
 namespace Monitored {
   /**
-   * @brief Class used to collect local (scope) quantities and ship them to monitotoring output (histograms)
-   * For examples @see GenericMonFilling_test.cxx
+   * @brief Group local monitoring quantities and retain correlation when filling histograms 
+   *
+   * In order to maintain correlations when filling histograms (e.g. eta and phi of a track) the
+   * monitored quantities need to be grouped within a MonitoredScope. The filling of the histogram
+   * occurs when the MonitoredScope object goes out of scope or when save() is called explicitly.
+   *
+   * \code
+   * {
+   *   auto phi = MonitoredScalar::declare("phi");
+   *   auto eta = MonitoredScalar::declare("eta");
+   *   auto mon = MonitoredScope::declare(m_monTool, phi, eta);   
+   * }
+   * \endcode
    **/
-    class MonitoredScope {
-    public:
+  class MonitoredScope {
+      public:
+
       /**
        * @brief Named constructor 
-       * @arg tool - a handle to a monitoring tool, if invalid nothing is done (cheap)
-       * @arg scopeMonitored - list of varaibles to be shipped to monitoring output
+       * @param tool            a handle to a monitoring tool, if invalid nothing is done
+       * @param scopeMonitored  list of variables to be monitored
        **/
-      
-        template <typename... T>
-        static MonitoredScope declare(ToolHandle<GenericMonitoringTool> tool, T&&... scopeMonitored) {
-            return MonitoredScope(tool, {std::forward<T>(scopeMonitored)...});
-        }
+      template <typename... T>
+      static MonitoredScope declare(ToolHandle<GenericMonitoringTool> tool, T&&... scopeMonitored) {
+          return MonitoredScope(tool, {std::forward<T>(scopeMonitored)...});
+      }
         
-        virtual ~MonitoredScope() {
-            if (m_autoSave) {
-                save();
-            }
+      virtual ~MonitoredScope() {
+          if (m_autoSave) {
+              save();
+          }
 
-            for (auto filler : m_histogramsFillers) {
-                delete filler;
-            }
-        }
+          for (auto filler : m_histogramsFillers) {
+              delete filler;
+          }
+      }
 
-	/**
-	 * @brief explicitely fill the monitoring output
-	 **/
-        virtual void save() {
-            for (auto filler : m_histogramsFillers) {
-                filler->fill();
-            }
-        }
-        /**
-	 * @berief enables/disables filling whne the MonitoredScope leaves the scope
-	 * Tpically one time fill, this should be left intact (true) 
-	 * while in tight loop this should disabled "setAutoSave(false)"
-	 * and explicit call to save used with the same scope object.
-	 **/
-        void setAutoSave(bool isEnabled) {
-            m_autoSave = isEnabled;
-        }
-    protected:
-        ToolHandle<GenericMonitoringTool> m_tool;
-        bool m_autoSave;
-        const std::vector<std::reference_wrapper<IMonitoredVariable>> m_scopeMonitored;
-        const std::vector<HistogramFiller*> m_histogramsFillers;
+      /**
+       * @brief explicitely fill the monitoring output
+       **/
+      virtual void save() {
+          for (auto filler : m_histogramsFillers) {
+              filler->fill();
+          }
+      }
+      /**
+       * @brief enables/disables filling when MonitoredScope leaves the scope
+       *
+       * Tpically one time fill, this should be left enabled (true) 
+       * while in tight loops this should disabled "setAutoSave(false)"
+       * and explicit call save() used with the same scope object.
+       **/
+      void setAutoSave(bool isEnabled) {
+          m_autoSave = isEnabled;
+      }
+      protected:
+      ToolHandle<GenericMonitoringTool> m_tool;
+      bool m_autoSave;
+      const std::vector<std::reference_wrapper<IMonitoredVariable>> m_scopeMonitored;
+      const std::vector<HistogramFiller*> m_histogramsFillers;
         
-        MonitoredScope(ToolHandle<GenericMonitoringTool> tool, std::initializer_list<std::reference_wrapper<IMonitoredVariable>> scopeMonitored)
-          : m_tool(tool), 
-            m_autoSave(true), 
-            m_scopeMonitored(scopeMonitored), 
-            m_histogramsFillers(!m_tool.empty() ? m_tool->getHistogramsFillers(m_scopeMonitored) : std::vector<HistogramFiller*>()) { }
-    };
+      MonitoredScope(ToolHandle<GenericMonitoringTool> tool, 
+                     std::initializer_list<std::reference_wrapper<IMonitoredVariable>> scopeMonitored)
+        : m_tool(tool), 
+          m_autoSave(true), 
+          m_scopeMonitored(scopeMonitored), 
+          m_histogramsFillers(!m_tool.empty() ? m_tool->getHistogramsFillers(m_scopeMonitored) : std::vector<HistogramFiller*>()) { }
+  };
 }
 
 #endif /* AthenaMonitoring_MonitoredScope_h */
diff --git a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredTimer.h b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredTimer.h
index 6e0b02f734a67fb614be40cdb549a69e672dd33b..ec965cc72abd07ed4702e39e7448de9ad67c345a 100644
--- a/Control/AthenaMonitoring/AthenaMonitoring/MonitoredTimer.h
+++ b/Control/AthenaMonitoring/AthenaMonitoring/MonitoredTimer.h
@@ -9,58 +9,62 @@
 #include <chrono>
 
 #include "AthenaMonitoring/IMonitoredVariable.h"
-#include "AthenaMonitoring/MonitoredHelpers.h"
 
 namespace Monitored {
-    namespace MonitoredTimer {
 
-        class MonitoredTimer;       
-        MonitoredTimer declare(std::string name);
+  /**
+   * Monitoring for timers
+   */
+  namespace MonitoredTimer {
+
+    class MonitoredTimer;
+
+    /**
+     * Declare a monitored timer
+     *
+     * The timer name needs to start with "TIME_"
+     *
+     * \code
+     *    auto t1 = MonitoredTimer::declare("TIME_t1");
+     * \endcode
+     **/
+    MonitoredTimer declare(std::string name);
 
 	/**
-	 * @class Timer class suitable for insertions to monitoring histograms
-	 * The time is measured from execution of the start to stop 
-	 * And if they are not used
-	 * from creation to the moment they are harvested to monitoring output (call of conversion to double operator)
-	 **/
-	
-        class MonitoredTimer : public IMonitoredVariable {
-        public:
+	 * Monitored Timer
+     *
+     * The time is measured either between explicit stop/start calls or between the creation
+     * and the time the value is read by the monitoring tool.
+     * The timer name needs to start with the string "TIME_".
+	 **/	
+    class MonitoredTimer : public IMonitoredVariable {
+    public:
 	  
-            friend MonitoredTimer declare(std::string name);
-            
-            MonitoredTimer(MonitoredTimer&&) = default;
+      friend MonitoredTimer declare(std::string name) {
+        return MonitoredTimer(std::move(name));
+      }
+      
+      MonitoredTimer(MonitoredTimer&&) = default;
 
-	    /**
-	     * @brief (re)starts the timer 
-	     **/
-	    void start();
-	    /**
-	     * @brief stops the timer
-	     **/
-	    void stop() const;
+      void start();         //<! (re)starts the timer
+      void stop() const;    //<! stops the timer
 
-	    /**
-	     * @brief returns duration between the start and stop in microseconds
-	     **/	    
-            operator double() const;
+      operator double() const; //!< duration between start and stop in microseconds
             
-            const std::vector<double> getVectorRepresentation() const override { return { double(*this) }; }
-        private:
-	    typedef std::chrono::high_resolution_clock clock_type;
-	    clock_type::time_point m_startTime; 
-	    mutable clock_type::time_point m_stopTime;  
-	    
-            MonitoredTimer(std::string name);
-            MonitoredTimer(MonitoredTimer const&) = delete;
-            MonitoredTimer& operator=(MonitoredTimer const&) = delete;
-        };
-        
+      const std::vector<double> getVectorRepresentation() const override { return { double(*this) }; }
+
+    private:
+      static constexpr const char* TIMER_PREFIX = "TIME_";   //<! prefix required for all timers
 
-        MonitoredTimer declare(std::string name) {
-            return MonitoredTimer(std::move(name));
-        }
-    }
+      typedef std::chrono::high_resolution_clock clock_type;
+      clock_type::time_point m_startTime; 
+      mutable clock_type::time_point m_stopTime;  
+	    
+      MonitoredTimer(std::string name);
+      MonitoredTimer(MonitoredTimer const&) = delete;
+      MonitoredTimer& operator=(MonitoredTimer const&) = delete;
+    };        
+  }
 }
 
 #endif /* AthenaMonitoring_MonitoredTimer_h */
diff --git a/Control/AthenaMonitoring/cmt/requirements b/Control/AthenaMonitoring/cmt/requirements
deleted file mode 100755
index e095466620efe7b07b2ee5a213efaa77c37d4191..0000000000000000000000000000000000000000
--- a/Control/AthenaMonitoring/cmt/requirements
+++ /dev/null
@@ -1,44 +0,0 @@
-package AthenaMonitoring
-
-author Manuel Diaz <Manuel.Diaz@cern.ch>
-author Robert McPherson <Robert.McPherson@cern.ch>
-author Michael Wilson <Michael.G.Wilson@cern.ch>
-author Sebastian Schaetzel <Sebastian.Schaetzel@cern.ch>
-author Peter Onyisi <ponyisi@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-use AthenaBaseComps       AthenaBaseComps-*        Control
-use GaudiInterface        GaudiInterface-*         External
-use AtlasROOT             AtlasROOT-*              External
-use TrigAnalysisInterfaces TrigAnalysisInterfaces-* Trigger/TrigAnalysis
-use LumiBlockComps         LumiBlockComps-*      LumiBlock
-
-private
-apply_tag ROOTGraphicsLibs
-use AthenaKernel          AthenaKernel-*           Control
-use TrigDecisionInterface TrigDecisionInterface-*  Trigger/TrigEvent
-use EventInfo             EventInfo-*              Event
-use AthenaPoolUtilities   AthenaPoolUtilities-*    Database/AthenaPOOL
-use SGAudCore             SGAudCore-*              Control/SGMon
-use AtlasCORAL            AtlasCORAL-*             External
-use LWHists               LWHists-*                Tools
-use AtlasBoost            AtlasBoost-*             External
-# Specify required ROOT components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS MathCore)"
-
-#Get this lib in debug mode:
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-#macro_remove AtlasCxxPolicy_pp_cppflags "-DNDEBUG"
-#For testing that we don't have any alignment problems:
-#macro_append AtlasCxxPolicy_pp_cppflags "-Wpadded"
-#macro_append cppflags "-std=c++0x"
-#macro_append cpplinkflags "-std=c++0x"
-end_private
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern dual_use_library files=*.cxx
-
-macro_append cppflags "" \
diff --git a/Control/AthenaMonitoring/doc/Monitored_page.h b/Control/AthenaMonitoring/doc/Monitored_page.h
new file mode 100644
index 0000000000000000000000000000000000000000..fd1bef8af3424b71d7f6f1b130c07e4b83ae278f
--- /dev/null
+++ b/Control/AthenaMonitoring/doc/Monitored_page.h
@@ -0,0 +1,76 @@
+
+/**
+   @namespace Monitored
+   @brief athenaMT monitoring infrastructure
+   
+   The Monitored namespace collects the infrastructure to create histograms from
+   quantitities within an athena component. While this infrastrcucture has been
+   created specifically for the use in athenaMT it is of course also usable in
+   single-threaded athena. To make use of this infrastructure the following
+   steps are needed:
+   
+   1) Add a GenericMonitoringTool instance to your component
+   \code
+    private:
+      ToolHandle<GenericMonitoringTool> m_monTool{this,"MonTool","","Monitoring tool"};
+   \endcode
+   Note that by default we are using an empty ToolHandle, i.e. there is no
+   monitoring tool attached by default. This should instead be done in the
+   python configuration of the component:
+   \code
+      from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool
+      myalg.MonTool = GenericMonitoringTool('MonTool')
+   \endcode
+
+   2) Retrieve the monitoring tool during `initialize()` **if the ToolHandle is not empty**:
+   \code
+      if (!m_monTool.empty()) CHECK(m_monTool.retrieve());
+   \endcode
+   The additional check is needed because retrieval of an emtpy ToolHandle results in a failure.
+
+   3) Declare the monitored quantities to the monitoring framework.
+   Several classes are available to export different types to the monitoring framwork: 
+     - Monitored::MonitoredScalar
+     - Monitored::MonitoredCollection
+     - Monitored::MonitoredTimer
+
+  The declaration in all cases is done via the `declare` method in the relevant namespace.
+  For example to declare a simple scalar, use:
+   \code
+   Monitored::MonitoredScalar::declare(std::string name, const T& defaultVaule):
+   \endcode
+
+   @copydetails Monitored::MonitoredScalar::declare(std::string name, const T& defaultVaule)
+   
+   All above functions are within the Monitored namespace. Consider adding
+   \code using namespace Monitored;\endcode
+   to your function (but avoid doing this at global scope).
+
+   4)
+   @copydoc Monitored::MonitoredScope
+
+   5) Configure the list of histograms in python
+   \code
+      from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
+      monTool = GenericMonitoringTool('MonTool')
+      monTool.Histograms = [defineHistogram('eta', path='EXPERT', type='TH1F', title='Eta;;Entries',
+                                             xbins=40, xmin=-2, xmax=2),
+                            defineHistogram('phi', path='EXPERT', type='TH1F', title='Phi;;Entries',
+                                             xbins=60, xmin=-3.2, xmax=3.2),
+                            defineHistogram('eta,phi', path='EXPERT', type='TH2F', title='Eta vs Phi',
+                                             xbins=20, xmin=-2, xmax=2, ybins=30, ymin=-3.2, ymax=3.2)]
+
+     topSequence.myAlg.MonTool = monTool
+   \endcode
+
+   \remark Without this python configuration, i.e. the last line, no monitoring tool is instantiated
+   and no monitoring histograms created thus reducing the overhead (both time and memory) to a minimum.
+                                             
+   Additional documentation:
+   - The MonitoredAlg standalone example and its MonitoredOptions.py job
+   options
+   - <a href="https://gitlab.cern.ch/atlas/athena/blob/master/Control/AthenaMonitoring/test/GenericMonFilling_test.cxx">GenericMonFilling_test.cxx</a>
+   unit test for an example of all features.
+ */
+
+
diff --git a/Control/AthenaMonitoring/python/DefineHistogram.py b/Control/AthenaMonitoring/python/DefineHistogram.py
deleted file mode 100644
index 7081bef351d82e567edb6d521ee16028f1067f15..0000000000000000000000000000000000000000
--- a/Control/AthenaMonitoring/python/DefineHistogram.py
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-
-def defineHistogram(varname, type='TH1F', path='EXPERT',
-                    title='Unspecified_title_for_the_histogram_is_truly_annoying,_because_this_default_is_long;unspecified_label;unspecified_label',
-                    xbins=100, xmin=0, xmax=1,
-                    ybins=None, ymin=None, ymax=None, zmin=None, zmax=None, opt='', labels=None):
-    """ Generates the histogram definition string which is digestable by GenericMonitoringTool.
-
-
-    Note that defaults are compleetly unreasonable. The title is made annoying intentionally.
-    For histograms types, paths and all the options have a look at GenericMonitoringTool documentation.
-    """
-    coded = "%s, %s, %s, %s, %d, %f, %f" % (path, type, varname, title, xbins, xmin, xmax)
-    if ybins is not None:
-        coded += ",%d, %f, %f" % (ybins, ymin, ymax)
-        if zmin is not None:
-            coded += ", %f, %f" % (zmin, zmax)
-    if ybins is None and ymin is not None:
-        coded += ", %f, %f" % (ymin, ymax)
-    if labels is not None:
-        labels = labels.strip()   # remove spurious white-spaces
-        if len(labels)>0:
-            if labels[-1]!=':': labels += ':'  # C++ parser expects at least one ":"
-            coded += ",%s " % labels
-    coded += ", %s" % opt
-
-    return coded
diff --git a/Control/AthenaMonitoring/python/GenericMonitoringTool.py b/Control/AthenaMonitoring/python/GenericMonitoringTool.py
new file mode 100644
index 0000000000000000000000000000000000000000..2b2a2658f7124391af73b066e4d68136463d3c70
--- /dev/null
+++ b/Control/AthenaMonitoring/python/GenericMonitoringTool.py
@@ -0,0 +1,48 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
+from AthenaMonitoring.AthenaMonitoringConf import GenericMonitoringTool as _GenericMonitoringTool
+
+class GenericMonitoringTool(_GenericMonitoringTool):
+    """Configurable of a GenericMonitoringTool"""
+
+    def __init__(self, name, **kwargs):
+        super(GenericMonitoringTool, self).__init__(name, **kwargs)
+
+
+## Generate histogram definition string for the `GenericMonitoringTool.Histograms` property
+#
+#  For full details see the GenericMonitoringTool documentation.
+#  @param varname  one (1D) or two (2D) variable names separated by comma
+#  @param type     histogram type
+#  @param path     top-level histrogram directory
+#  @param title    Histogram title and optional axis title (same syntax as in TH constructor)
+#  @param opt      Histrogram options (see GenericMonitoringTool)
+#  @param labels   List of bin labels (for a 2D histogram, sequential list of x- and y-axis labels)
+def defineHistogram(varname, type='TH1F', path='EXPERT',
+                    title=None,
+                    xbins=100, xmin=0, xmax=1,
+                    ybins=None, ymin=None, ymax=None, zmin=None, zmax=None, opt='', labels=None):
+
+    if title is None: title=varname
+    coded = "%s, %s, %s, %s, %d, %f, %f" % (path, type, varname, title, xbins, xmin, xmax)
+    if ybins is not None:
+        coded += ",%d, %f, %f" % (ybins, ymin, ymax)
+        if zmin is not None:
+            coded += ", %f, %f" % (zmin, zmax)
+    if ybins is None and ymin is not None:
+        coded += ", %f, %f" % (ymin, ymax)
+
+    if isinstance(labels, list) and len(labels)>0:
+        coded += ',' + ':'.join(labels) + ':'
+
+    # For backwards compatibility
+    elif labels is not None:
+        labels = labels.strip()   # remove spurious white-spaces
+        if len(labels)>0:
+            if labels[-1]!=':': labels += ':'  # C++ parser expects at least one ":"
+            coded += ",%s " % labels
+    coded += ", %s" % opt
+
+    return coded
diff --git a/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py b/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py
index df9728e0a045c46bc2a78b1a06c0038c7748f1df..05531ce889a89f7813b721f231526d9cac14dc49 100644
--- a/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py
+++ b/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py
@@ -297,6 +297,7 @@ if DQMonFlags.doStreamAwareMon:
       HLTMonFlags.doJet=False
       HLTMonFlags.doCalo=False
       HLTMonFlags.doMuon=False
+      HLTMonFlags.doGeneral=False
       DQMonFlags.doTauMon=False
       DQMonFlags.doPixelMon=False
       DQMonFlags.doMuonRawMon=False
@@ -314,6 +315,7 @@ if DQMonFlags.doStreamAwareMon:
       DQMonFlags.doSCTMon=False
       DQMonFlags.doTRTMon=False
       LArMonFlags.doLArRawChannelMon=False
+      HLTMonFlags.doGeneral=False
    elif (rec.triggerStream()=='Egamma'):
       DQMonFlags.doJetMon=False
       DQMonFlags.doMissingEtMon=False
@@ -322,6 +324,7 @@ if DQMonFlags.doStreamAwareMon:
       HLTMonFlags.doTau=False
       HLTMonFlags.doJet=False
       HLTMonFlags.doMuon=False
+      HLTMonFlags.doGeneral=False
       DQMonFlags.doMuonRawMon=False
       DQMonFlags.doMuonTrackMon=False
       DQMonFlags.doMuonAlignMon=False
@@ -344,6 +347,7 @@ if DQMonFlags.doStreamAwareMon:
       HLTMonFlags.doTau=False
       HLTMonFlags.doJet=False
       HLTMonFlags.doCalo=False
+      HLTMonFlags.doGeneral=False
       DQMonFlags.doTileMon=False
       DQMonFlags.doPixelMon=False
       DQMonFlags.doSCTMon=False
@@ -371,6 +375,7 @@ if DQMonFlags.doStreamAwareMon:
       DQMonFlags.doMuonPhysicsMon=False
       DQMonFlags.doCaloMon=False
       DQMonFlags.doJetTagMon=False
+      HLTMonFlags.doGeneral=False
       #LArMonFlags.doLArFEBMon=False
       #LArMonFlags.doLArDigitMon=False
       #LArMonFlags.doLArNoisyROMon=False
@@ -382,6 +387,7 @@ if DQMonFlags.doStreamAwareMon:
       HLTMonFlags.doJet=False
       HLTMonFlags.doCalo=False
       HLTMonFlags.doMuon=False
+      HLTMonFlags.doGeneral=False
       DQMonFlags.doPixelMon=True
       DQMonFlags.doMuonRawMon=False
       DQMonFlags.doMuonTrackMon=False
@@ -405,6 +411,7 @@ if DQMonFlags.doStreamAwareMon:
    elif (rec.triggerStream()=='L1Calo' or rec.triggerStream()=='L1Topo'):
       HLTMonFlags.doBjet=False
       HLTMonFlags.doMuon=False
+      HLTMonFlags.doGeneral=False
       DQMonFlags.doPixelMon=False
       DQMonFlags.doMuonRawMon=False
       DQMonFlags.doMuonTrackMon=False
@@ -426,6 +433,8 @@ if DQMonFlags.doStreamAwareMon:
       DQMonFlags.doTauMon=False
       # HLT experts need monitoring in various unspecified streams
       #DQMonFlags.doHLTMon=False
+      # except they don't need General
+      HLTMonFlags.doGeneral=False
       DQMonFlags.doMuonTrackMon=False
       DQMonFlags.doMuonAlignMon=False
       DQMonFlags.doMuonCombinedMon=False
diff --git a/Control/AthenaMonitoring/share/GenericMon.txt b/Control/AthenaMonitoring/share/GenericMon.txt
index 61bd7e5892f28562d869ac36db0329a1a305bcf8..d14960f1f76c046bdb89b7c803e915fb98116cbf 100644
--- a/Control/AthenaMonitoring/share/GenericMon.txt
+++ b/Control/AthenaMonitoring/share/GenericMon.txt
@@ -18,12 +18,12 @@ MessageSvc.useColors        = false;
 THistSvc.OutputLevel = 0;
 THistSvc.Output= {"EXPERT DATAFILE='expert-monitoring.root' OPT='RECREATE'" };
 ToolSvc.MonTool.OutputLevel =0;
-ToolSvc.MonTool.HistogramsGroupName="TestGroup";
+ToolSvc.MonTool.HistPath="TestGroup";
 ToolSvc.MonTool.Histograms = { "EXPERT, TH1F, Eta, #eta of Clusters; #eta; number of RoIs, 2, -2.500000, 2.500000, "};
 ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, Phi, #phi of Clusters; #phi; number of RoIs, 2, -3.15, 3.15, " };
 ToolSvc.MonTool.Histograms += { "EXPERT, TH2F, Eta,Phi, #eta vs #phi of Clusters; #eta; #phi; number of RoIs,  2, -2.500000, 2.500000, 2, -3.15, 3.15, " };
-ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, t1, Timing of tool 1, 100, 0., 1000., "};
-ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, t2, Timing of tool 2, 100, 0., 1000., "};
+ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, TIME_t1, Timing of tool 1, 100, 0., 1000., "};
+ToolSvc.MonTool.Histograms += { "EXPERT, TH1F, TIME_t2, Timing of tool 2, 100, 0., 1000., "};
 
 // intentionally a very small number of bins
 // RoICache_test.OutputLevel=3;
diff --git a/Control/AthenaMonitoring/share/GenericMonitoringToolTest_jobOptions.py b/Control/AthenaMonitoring/share/GenericMonitoringToolTest_jobOptions.py
deleted file mode 100755
index 721249e74f0e573a4c475544e7b225a7713cd094..0000000000000000000000000000000000000000
--- a/Control/AthenaMonitoring/share/GenericMonitoringToolTest_jobOptions.py
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-
-## basic job configuration
-import AthenaCommon.AtlasUnixStandardJob
-
-## get a handle on the ServiceManager
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-
-## get a handle on the default top-level algorithm sequence
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-from GaudiSvc.GaudiSvcConf import THistSvc
-svcMgr += THistSvc()
-svcMgr.THistSvc.Output += ["EXPERT DATAFILE='phi.root' OPT='RECREATE'"]
-
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-# Load "user algorithm" top algorithms to be run, and the libraries that house them
-
-
-#Run Fake RoI
-from AthenaCommon.AppMgr import ToolSvc
-from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram
-from AthenaMonitoring.AthenaMonitoringConf import GenericMonitoringTool
-
-genericMonTool = GenericMonitoringTool('monitoringTool')
-genericMonTool.HistogramsGroupName = "TestGroup"
-genericMonTool.Histograms += [defineHistogram('phi',
-                                         type='TH1D',
-                                         title="PHI",
-                                         xbins = 200, xmin=0., xmax=200.)]
-genericMonTool.Histograms += [defineHistogram('scalar',
-                                         type='TH1D',
-                                         title="SomeScalar",
-                                         xbins = 200, xmin=0., xmax=10.)]
-genericMonTool.Histograms += [defineHistogram('phi, eta',
-                                           type='TH2F',
-                                           title="phi vs eta",
-                                           xbins = 1000, xmin=-100., xmax=100.,
-                                           ybins = 1000, ymin=-100., ymax=100.)]
-genericMonTool.Histograms += [defineHistogram('eta, scalar',
-                                           type='TH2D',
-                                           title="eta and scalar",
-                                           xbins = 10, xmin=-1., xmax=1.,
-                                           ybins = 10, ymin=7., ymax=8.)]
-
-                                         
-ToolSvc += genericMonTool
-
-from AthenaMonitoring.AthenaMonitoringConf import GenericMonitoringToolTest
-genericMonitoringToolTestObj = GenericMonitoringToolTest()
-genericMonitoringToolTestObj.GenericMonitoringTool = genericMonTool
-topSequence += genericMonitoringToolTestObj
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-#--------------------------------------------------------------
-svcMgr.MessageSvc.OutputLevel = INFO
-svcMgr.MessageSvc.Format = "% F%42W%S%7W%R%T %0W%M"
-svcMgr.MessageSvc.verboseLimit = 0
-svcMgr.StoreGateSvc.OutputLevel = INFO
-svcMgr.StoreGateSvc.Dump=True
-print svcMgr
-
-theApp.EvtMax = 1
-
-from AthenaCommon.AlgScheduler import AlgScheduler
-AlgScheduler.ShowControlFlow( True )
-AlgScheduler.ShowDataDependencies( True )
-AlgScheduler.setThreadPoolSize( 1 )
-
-
-print "topSequence dump:", topSequence
-#
-# End of job options file
-#
-###############################################################
diff --git a/Control/AthenaMonitoring/src/AthenaMonManager.cxx b/Control/AthenaMonitoring/src/AthenaMonManager.cxx
index b4dcc0abe09df69f49057a3a9b8196afce43181f..a030c385383ef591dbd6f43ca3433832ad910745 100755
--- a/Control/AthenaMonitoring/src/AthenaMonManager.cxx
+++ b/Control/AthenaMonitoring/src/AthenaMonManager.cxx
@@ -58,7 +58,11 @@ public:
         m_lumiBlockProp(0),
         m_nMonGroupCopies(0),
         m_nActiveLWHists(0),
-        m_doResourceMon(false) {}
+	m_forkedProcess(false),
+	m_lastPID(0),
+	m_doResourceMon(false)
+ {}
+  
     ~Imp()
     {
         std::map<IMonitorToolBase*,ToolBench*>::iterator it, itE;
@@ -100,6 +104,10 @@ public:
     unsigned m_nMonGroupCopies;
     long m_nActiveLWHists;
 
+    bool m_forkedProcess;
+    pid_t m_lastPID;
+
+
     //NB: The LW hist leak checker is now also looking for
     //inappropriate usage of MonGroup copy constructors (temporary
     //until we outlaw copy/assignment of MonGroups):
@@ -124,6 +132,7 @@ public:
     }
 
     bool m_doResourceMon;
+
     class ToolBench {
     public:
         ToolBench(IMonitorToolBase * t) :  m_theTool(t) {}
@@ -340,6 +349,12 @@ dataType()
     return Imp::s_dataType;
 }
 
+bool 
+AthenaMonManager::
+forkedProcess() {
+  return m_d->m_forkedProcess;
+}
+
 
 unsigned int
 AthenaMonManager::
@@ -524,6 +539,15 @@ StatusCode
 AthenaMonManager::
 execute()
 {
+    m_d->m_forkedProcess=false;
+    pid_t currPID=getpid();
+    //m_lastPID 0 means the execute method was not called yet. 
+    if (m_d->m_lastPID!=0 && m_d->m_lastPID!=currPID) {
+      m_d->m_forkedProcess=true;
+      ATH_MSG_INFO("Forked event discovered!");
+    }
+    m_d->m_lastPID=currPID;
+
     Imp::LWHistLeakChecker lc(m_d);
     if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "AthenaMonManager::execute():" << endmsg;
 
diff --git a/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx b/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx
index ad561a48010dafbb4811b64c054cd3fd0705008a..4e9821495d57adbfcae30a03a0e77c2d34130773 100644
--- a/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx
+++ b/Control/AthenaMonitoring/src/GenericMonitoringTool.cxx
@@ -22,9 +22,10 @@ const InterfaceID& GenericMonitoringTool::interfaceID() {
 }
 
 GenericMonitoringTool::GenericMonitoringTool(const std::string & type, const std::string & name, const IInterface* parent)
-  : AthAlgTool(type, name, parent), m_histSvc("THistSvc", name) { 
+  : AthAlgTool(type, name, parent), 
+    m_histSvc("THistSvc", name) { 
   declareProperty("Histograms", m_histograms, "Definitions of histograms");
-  declareProperty("HistogramsGroupName", m_histogramsGroupName, "Name of group to which histograms would be generated");
+  declareProperty("HistPath", m_histoPath, "Histogram base path");
   declareInterface<GenericMonitoringTool>(this);
 }
 
@@ -32,33 +33,40 @@ GenericMonitoringTool::~GenericMonitoringTool() { }
 
 StatusCode GenericMonitoringTool::initialize() {
   ATH_CHECK(m_histSvc.retrieve());
-  ATH_CHECK(!m_histogramsGroupName.empty());
+
+  // If no histogram path given use parent or our own name
+  if (m_histoPath.empty()) {
+    auto named = dynamic_cast<const INamedInterface*>(parent());
+    m_histoPath = named ? named->name() : name();
+  }
   
-  HistogramFillerFactory factory(m_histSvc, m_histogramsGroupName);
+  HistogramFillerFactory factory(m_histSvc, m_histoPath);
 
+  m_fillers.reserve(m_histograms.size());
   for (const string& item : m_histograms) {
-    ATH_MSG_DEBUG( "Configuring monitoring from: " << item );
+    ATH_MSG_DEBUG( "Configuring monitoring for: " << item );
     HistogramDef def = HistogramDef::parse(item);
 
     if (def.ok) {
-        ATH_MSG_DEBUG( "Definition parsed correctly" );
         HistogramFiller* filler = factory.create(def);
         
         if (filler != nullptr) {
             m_fillers.push_back(filler);
-	    ATH_MSG_DEBUG( "Intermediate structures created" );
         } else {
-	  ATH_MSG_WARNING( "The histogram filler can not be instantiated for: " << def.name );
-	}
+          ATH_MSG_WARNING( "The histogram filler can not be instantiated for: " << def.name );
+        }
     } else {
       ATH_MSG_ERROR( "Unparsable histogram definition: " << item );
       return StatusCode::FAILURE;
     }
-    ATH_MSG_DEBUG( "Monitoring for varaible " << def.name << " prepared" );
+    ATH_MSG_DEBUG( "Monitoring for variable " << def.name << " prepared" );
   }
 
   if ( m_fillers.empty() ) {
-    ATH_MSG_ERROR("No variables to be monitored, detach this tool, it will save time");
+    std::string hists;
+    for (const auto &h : m_histograms) hists += (h+",");
+    ATH_MSG_ERROR("No monitored variables created based on histogram definition: [" << hists <<
+                  "] Remove this monitoring tool or check its configuration.");
     return StatusCode::FAILURE;
   }
 
diff --git a/Control/AthenaMonitoring/src/HistogramDef.cxx b/Control/AthenaMonitoring/src/HistogramDef.cxx
index 73d1add958ba8b47f94d5fdd5fb5880c431c9663..5c7b977d05bed5675799d97fc87896b55b96f46d 100644
--- a/Control/AthenaMonitoring/src/HistogramDef.cxx
+++ b/Control/AthenaMonitoring/src/HistogramDef.cxx
@@ -229,8 +229,8 @@ const HistogramDef HistogramDef::parse(const std::string& jobOpts) {
     }
   }
 
-  if (itr->find(":") != std::string::npos ) { // it means that last paramater has format str1:str2:str3:str4 which means this are bins labels
-    // breate it 
+  if (itr->find(":") != std::string::npos ) { // it means that last paramater has format str1:str2:str3:str4 which means these are bins labels
+    // split it 
     boost::char_separator<char> colon(":");
     tokenizer_t labels(*itr, colon);
     for ( tokenizer_t::iterator l = labels.begin(); l != labels.end(); ++l ) {
@@ -246,4 +246,4 @@ const HistogramDef HistogramDef::parse(const std::string& jobOpts) {
     
   histPar.ok = true;
   return histPar;
-}
\ No newline at end of file
+}
diff --git a/Control/AthenaMonitoring/src/ManagedMonitorToolBase.cxx b/Control/AthenaMonitoring/src/ManagedMonitorToolBase.cxx
index 7724d03a801987f8bb89f7b9d1948f92b164750d..987e70f52ec0ae96388abb510eed821b5c4e7a14 100755
--- a/Control/AthenaMonitoring/src/ManagedMonitorToolBase.cxx
+++ b/Control/AthenaMonitoring/src/ManagedMonitorToolBase.cxx
@@ -823,7 +823,7 @@ fillHists()
    m_useTrigger = ( (m_triggerChainProp != "" || m_triggerGroupProp != "")  && (!m_trigDecTool.empty()) );
 
    if( m_manager != 0 ) {
-      m_newLumiBlock = ( m_lastLumiBlock != m_manager->lumiBlockNumber() );
+     m_newLumiBlock = ( (m_lastLumiBlock != m_manager->lumiBlockNumber()) || m_manager->forkedProcess());
       m_newRun = ( m_lastRun != m_manager->runNumber() );
       newLumiBlock = m_newLumiBlock;
       newRun = m_newRun;
@@ -938,7 +938,21 @@ fillHists()
       m_d->benchPostBookHistograms();
       sc1.setChecked();
       sc3.setChecked();
-   }
+      
+
+      if (m_manager->forkedProcess()) {
+	ATH_MSG_INFO("Child process: Resetting all LW Histograms");
+	//Here, reset all LWHIstograms
+	//std::map< Interval_t, std::vector< MgmtParams<LWHist> > > m_templateLWHistograms;`
+	for (auto& mapIt : m_templateLWHistograms) {
+	  for (auto& vecIt : mapIt.second) {
+	    // Get handle to the histogram
+	    LWHist* h = vecIt.m_templateHist;
+	    h->Reset();
+	  }
+	}
+      }
+   }//end if new RUN/LB/Block
 
    // check filters
    bool filterresult(true);
diff --git a/Control/AthenaMonitoring/src/MonitoredTimer.cxx b/Control/AthenaMonitoring/src/MonitoredTimer.cxx
index 9bfbd4cf34f9f457320e530c4150c9b4f0a4107e..8b9631af62ee2d8daa8ebc5bc725a90f8179df44 100644
--- a/Control/AthenaMonitoring/src/MonitoredTimer.cxx
+++ b/Control/AthenaMonitoring/src/MonitoredTimer.cxx
@@ -3,12 +3,22 @@
 */
 
 #include <ratio>
+#include <boost/algorithm/string/predicate.hpp>
+
 #include "AthenaMonitoring/MonitoredTimer.h"
+#include <iostream>
 
 namespace Monitored {
   namespace MonitoredTimer{
+
+    constexpr const char* MonitoredTimer::TIMER_PREFIX;
+
     MonitoredTimer::MonitoredTimer(std::string name)
     : IMonitoredVariable(std::move(name)) {
+      // Enforce some naming convention for timers
+      if (!boost::algorithm::starts_with(m_name, TIMER_PREFIX)) {
+        throw std::runtime_error("Name of MonitoredTimer \""+m_name+"\" needs to start with \""+TIMER_PREFIX+"\"");
+      }
       start();
     }
     
diff --git a/Control/AthenaMonitoring/test/GenericMonFilling_test.cxx b/Control/AthenaMonitoring/test/GenericMonFilling_test.cxx
index fee45dff67e8f3933f02b18ea97c6fd98bef972f..254af83db45df40c14f888aea6c4a9a4a14b2df0 100644
--- a/Control/AthenaMonitoring/test/GenericMonFilling_test.cxx
+++ b/Control/AthenaMonitoring/test/GenericMonFilling_test.cxx
@@ -278,10 +278,27 @@ bool assignWorked() {
     return true;
 }
 
+bool operatorsWorked() {
+  auto count = MonitoredScalar::declare<float>( "Count", 0 );
+
+  VALUE( count==count ) EXPECTED (true);
+
+  count += 1;
+  VALUE ( int(count) ) EXPECTED (1);
+  count++;
+  VALUE ( int(count) ) EXPECTED (2);
+  --count;
+  VALUE ( int(count) ) EXPECTED (1);
+  count *= 3;
+  VALUE ( int(count) ) EXPECTED (3);
+
+  return true;
+}
+
 bool timerFillingWorked( ToolHandle<GenericMonitoringTool>& monTool, ITHistSvc* histSvc ) {
 
-  auto t1 = MonitoredTimer::declare( "t1" );
-  auto t2 = MonitoredTimer::declare( "t2" );
+  auto t1 = MonitoredTimer::declare( "TIME_t1" );
+  auto t2 = MonitoredTimer::declare( "TIME_t2" );
   {
     auto monitorIt = MonitoredScope::declare( monTool, t1, t2 ); // this is binding to histograms
   
@@ -291,8 +308,8 @@ bool timerFillingWorked( ToolHandle<GenericMonitoringTool>& monTool, ITHistSvc*
   VALUE( double( t1 ) <= double( t2 ) ) EXPECTED( true );  // timer is monotonic
   VALUE( double( t1 ) < 1e6 ) EXPECTED ( true ); // should be less than 1s unless the stop/start are wrong
   VALUE( double( t2 ) < 1e6 ) EXPECTED ( true ); // should be less than 1s unless the contr and op double are wrong
-  VALUE( getHist( histSvc, "/EXPERT/TestGroup/t1" )->GetEntries() ) EXPECTED( 1 );
-  VALUE( getHist( histSvc, "/EXPERT/TestGroup/t2" )->GetEntries() ) EXPECTED( 1 );
+  VALUE( getHist( histSvc, "/EXPERT/TestGroup/TIME_t1" )->GetEntries() ) EXPECTED( 1 );
+  VALUE( getHist( histSvc, "/EXPERT/TestGroup/TIME_t2" )->GetEntries() ) EXPECTED( 1 );
   
   return true;
   
@@ -346,6 +363,7 @@ int main() {
   assert( fillExplcitelyWorked( validMon, histSvc ) );
   assert( fillFromScalarIndependentScopesWorked( validMon, histSvc ) );
   assert( assignWorked() );
+  assert( operatorsWorked() );
   assert( timerFillingWorked( validMon, histSvc ) );
 
   log << MSG::DEBUG << "All OK"  << endmsg;
diff --git a/Control/AthenaPython/AthenaPython/PyAthenaUtils.h b/Control/AthenaPython/AthenaPython/PyAthenaUtils.h
index 9ff746dca071cf6fd2fe5f34f2eaffc1993fad49..043239c3bce75e22b0a27977cbb9ae2f35b038f6 100644
--- a/Control/AthenaPython/AthenaPython/PyAthenaUtils.h
+++ b/Control/AthenaPython/AthenaPython/PyAthenaUtils.h
@@ -36,7 +36,9 @@ namespace PyAthena {
   std::string str (PyObject* o);
 
   /// call the python method
-  StatusCode callPyMethod( PyObject* self , const char* method );
+  StatusCode callPyMethod( PyObject* self,
+                           const char* method,
+                           PyObject* arg = nullptr );
 
   /// query interface binding
   StatusCode queryInterface( PyObject* self,
diff --git a/Control/AthenaPython/cmt/requirements b/Control/AthenaPython/cmt/requirements
deleted file mode 100644
index a7f673c07ce5fdcb9af41757ea4595f6439e94b1..0000000000000000000000000000000000000000
--- a/Control/AthenaPython/cmt/requirements
+++ /dev/null
@@ -1,80 +0,0 @@
-package AthenaPython
-author  Sebastien Binet <binet@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## For Gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-
-## Put here your package dependencies...
-use AtlasPyROOT		AtlasPyROOT-*		External
-use AtlasROOT		AtlasROOT-*		External -no_auto_imports
-
-use AthenaKernel 	AthenaKernel-*		Control
-use StoreGate		StoreGate-*		Control  -no_auto_imports
-
-use AthenaBaseComps	AthenaBaseComps-*	Control
-##
-
-## private uses
-private
-use SGTools 	   	SGTools-*           	Control
-use AtlasPython 	AtlasPython-*  		External
-use DataModelRoot       DataModelRoot-*         Control
-end_private
-
-branches AthenaPython src src/components python
-
-library AthenaPython *.cxx
-apply_pattern installed_library
-
-macro AthenaPython_PyROOT_linkopts " -L$(ROOT_home)/lib -lPyROOT"
-## dso
-macro_append AthenaPython_shlibflags " $(AthenaPython_PyROOT_linkopts)"
-macro_append AthenaPython_linkopts   " $(AthenaPython_PyROOT_linkopts)"
-
-# you gotta love CMT...
-macro_remove AthenaPython_linkopts   "-lAthenaPythonComps"
-macro_remove AthenaPython_shlibflags "-lAthenaPythonComps"
-macro_remove AthenaPython_extra_shlibflags "-lAthenaPythonComps"
-
-## make the library private so nobody can link against
-private
-
-## component
-library AthenaPythonComps components/*.cxx
-
-macro_append AthenaPython_library_dependencies \
-	     " AthenaPython AthenaPythonComps"
-macro_append AthenaPythonComps_dependencies " AthenaPython"
-apply_pattern named_component_library library=AthenaPythonComps
-
-macro_append AthenaPythonComps_shlibflags " $(use_linkopts)"
-macro_append AthenaPythonComps_shlibflags " $(AthenaPython_PyROOT_linkopts)"
-macro_append AthenaPythonComps_shlibflags " -lAthenaPython"
-
-apply_pattern declare_python_modules files="*.py tests"
-apply_pattern declare_joboptions files="*.py tests/*.py"
-end_private
-
-#
-# dictionary creation (patterns from Gaudi/SEAL) for bindings
-#
-private
-use AtlasReflex		AtlasReflex-*		External
-use AtlasROOT		AtlasROOT-*		External
-
-macro AthPyDictHdrFiles " -s=$(AthenaPython_root)/AthenaPython "
-macro_append AthPyDictHdrFiles " AthenaPythonDict.h"
-
-apply_pattern lcgdict dict=AthenaPython \
-   selectionfile=selection.xml \
-   headerfiles="$(AthPyDictHdrFiles)"
-#macro_append AthenaPythonDict_pp_cppflags " -I$(AthenaPython_root)/src "
-#macro_append use_pp_cppflags " -I$(AthenaPython_root)/src "
-macro_append AthenaPythonDict_shlibflags " -lAthenaPython"
-macro_append AthenaPythonDict_dependencies " AthenaPython"
-macro_remove AthenaPythonDict_linkopts   "-lAthenaPythonComps"
-macro_remove AthenaPythonDict_shlibflags "-lAthenaPythonComps"
-end_private
diff --git a/Control/AthenaPython/python/PyAthenaComps.py b/Control/AthenaPython/python/PyAthenaComps.py
index 0bf3638e7cf74c4cf4270f629a4454d889346722..c0424db16d19dc310e85c8cc3de482965bba43fb 100644
--- a/Control/AthenaPython/python/PyAthenaComps.py
+++ b/Control/AthenaPython/python/PyAthenaComps.py
@@ -77,6 +77,7 @@ class Alg( CfgPyAlgorithm ):
         super(Alg, self).__init__(name, **kw)
         self._pyath_evtstore = None # handle to the evt store
         self._pyath_detstore = None # handle to the det store
+        self._ctx = None
         return
 
     @property
@@ -107,8 +108,14 @@ class Alg( CfgPyAlgorithm ):
     def reinitialize(self):
         return StatusCode.Success
 
-    def sysExecute(self):
-        return self.execute()
+    def sysExecute(self, cppcontext):
+        import cppyy
+        self._ctx = cppyy.bind_object(cppcontext, "EventContext")
+        try:
+            ret = self.execute()
+        finally:
+            self._ctx = None
+        return ret
     
     def execute(self):
         return StatusCode.Success
@@ -148,6 +155,9 @@ class Alg( CfgPyAlgorithm ):
     
     def isExecuted(self):
        return self._cppHandle.isExecuted()
+
+    def getContext(self):
+       return self._ctx
     
     pass # PyAthena.Alg
 
diff --git a/Control/AthenaPython/src/PyAthenaAlg.cxx b/Control/AthenaPython/src/PyAthenaAlg.cxx
index c32e505fa8589abb6f6daa411cb2904c96a00022..b5c8a6e2dcb6addf4f03bafd4c499f619dd44a94 100644
--- a/Control/AthenaPython/src/PyAthenaAlg.cxx
+++ b/Control/AthenaPython/src/PyAthenaAlg.cxx
@@ -93,7 +93,10 @@ StatusCode
 Alg::execute()
 {  
 //   ATH_MSG_DEBUG("Executing " << name() << "...");
-  return PyAthena::callPyMethod( m_self, "sysExecute" );
+  PyObject* pycontext = PyCObject_FromVoidPtr ( const_cast<EventContext*>(&getContext()), nullptr);
+  StatusCode sc = PyAthena::callPyMethod( m_self, "sysExecute", pycontext );
+  Py_DECREF (pycontext);
+  return sc;
 }
 
 void 
diff --git a/Control/AthenaPython/src/PyAthenaUtils.cxx b/Control/AthenaPython/src/PyAthenaUtils.cxx
index b0a9815143512ed8dbad3b1bc9a35e541961b733..58ac3e935dde607e6eb798a0a47bb50b2d3b416d 100644
--- a/Control/AthenaPython/src/PyAthenaUtils.cxx
+++ b/Control/AthenaPython/src/PyAthenaUtils.cxx
@@ -152,7 +152,9 @@ void PyAthena::throw_py_exception (bool display)
 }
 
 StatusCode 
-PyAthena::callPyMethod( PyObject* self, const char* methodName )
+PyAthena::callPyMethod( PyObject* self,
+                        const char* methodName,
+                        PyObject* arg /*= nullptr*/)
 {
   // that's a bit ugly...
   char* method = const_cast<char*>(methodName);
@@ -162,7 +164,11 @@ PyAthena::callPyMethod( PyObject* self, const char* methodName )
   
   // call Python 
   PyGILStateEnsure ensure;
-  PyObject* r = PyObject_CallMethod( self, method, const_cast<char*>("") );
+  PyObject* r;
+  if (arg)
+    r = PyObject_CallMethod( self, method, const_cast<char*>("O"), arg );
+  else
+    r = PyObject_CallMethod( self, method, const_cast<char*>("") );
   
   if ( 0 == r ) { 
     throw_py_exception();
diff --git a/Control/AthenaSealSvc/cmt/requirements b/Control/AthenaSealSvc/cmt/requirements
deleted file mode 100755
index eb98481778e0300b758b712f9a9fefe201f9bb4b..0000000000000000000000000000000000000000
--- a/Control/AthenaSealSvc/cmt/requirements
+++ /dev/null
@@ -1,16 +0,0 @@
-package AthenaSealSvc
-
-author RD Schaffer R.D.Schaffer@cern.ch
-author Christian Arnault arnault@lal.in2p3.fr
-
-use AtlasPolicy         AtlasPolicy-*
-use AthenaServices	AthenaServices-*	Control -no_auto_imports
-
-#library AthenaSealSvc AthenaSealSvc.cxx -s=components *.cxx
-#apply_pattern component_library
-
-macro_append DOXYGEN_INPUT " ../doc"
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Control/AthenaSealSvc/doc/packagedoc.h b/Control/AthenaSealSvc/doc/packagedoc.h
index 4eb2ebfeb0e96abcb1997faa2282697e8f28dd80..3e24b861784699e41c965d3d459f51648a597b63 100644
--- a/Control/AthenaSealSvc/doc/packagedoc.h
+++ b/Control/AthenaSealSvc/doc/packagedoc.h
@@ -29,11 +29,5 @@ found in LD_LIBRARY_PATH - the rootmap files contain a list of classes
 that each dictionary holds and the corresponding name of the DLL
 (dynamically loadable library).
 
-@section AthenaSealSvc_requirements requirements
-
-
-@section AthenaSealSvc_Links Links to used packages
-
-
 
 */
diff --git a/Control/AthenaServices/cmt/requirements b/Control/AthenaServices/cmt/requirements
deleted file mode 100644
index 482d68690ca7af38c328052a73b45ce967ad52c2..0000000000000000000000000000000000000000
--- a/Control/AthenaServices/cmt/requirements
+++ /dev/null
@@ -1,113 +0,0 @@
-package AthenaServices
-
-#################################################
-
-author P. Calafiura   <Paolo.Calafiura@cern.ch>
-author D. Quarrie     <DRQuarrie@lbl.gov>
-author S. Rajagopalan <srinir@bnl.gov>
-author Wim Lavrijsen  <WLavrijsen@lbl.gov>
-author S. Binet       <binet@cern.ch>
-
-use AtlasPolicy      AtlasPolicy-*
-
-private
-use GaudiInterface                 GaudiInterface-*  	            External
-use StoreGate                      StoreGate-*       	            Control
-use Navigation                     Navigation-*                     Control
-use AthContainersInterfaces        AthContainersInterfaces-*        Control
-# use for the tests...
-use RngComps			   RngComps-*			    Control -no_auto_imports
-
-# Add cmake compatibility (doesn't do anything on CMT side of things)
-apply_pattern cmake_add_libraries target=AthenaServices libraries=z
-
-library AthenaServices *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="\
-AthTPCnvSvc_test.py \
-SimplePOSIXTimeKeeperOptions.py \
-SimplePOSIXTimeKeeperSvc_test.py \
-MixingEventSelector_test.py \
-MultiplePassBootstrap.py \
-MultiplePass_test.py \
-MultiplePassWithAlgFilter_test.py \
-OverrideEventNumber.py \
-TestStopRun.py \
-TestSeedRunEvent.py \
-AthDictLoaderSvc_test.py \
-ReadAthenaPoolSeek_jobOptions.py \
-AthenaJobOptionsSvc_jobOptions.py \
-test_tpcnvdb.py \
-"
-apply_pattern declare_python_modules files="*.py"
-
-use AthenaKernel     AthenaKernel-*       Control
-use AthenaBaseComps  AthenaBaseComps-*	  Control
-use AtlasBoost       AtlasBoost-*      	  External
-use AtlasPython      AtlasPython-*        External
-use AtlasCLHEP       AtlasCLHEP-*      	  External
-use yampl            yampl-*              External
-
-use EventInfo        EventInfo-*       	  Event
-use CxxUtils	     CxxUtils-*		  Control
-use SGTools          SGTools-*         	  Control
-use AthContainers    AthContainers-*      Control
-use PersistentDataModel   PersistentDataModel-*      Database
-
-use PerfMonKernel    PerfMonKernel-*      Control/PerformanceMonitoring
-use PerfMonEvent     PerfMonEvent-*       Control/PerformanceMonitoring
-
-apply_pattern install_runtime
-use TestTools       TestTools-*          AtlasTest
-
-apply_pattern UnitTest_run unit_test=AthenaOutputStream \
-extrapatterns="^AthenaRootStrea... +(INFO|DEBUG)|^AthenaSealSvc +DEBUG|^SGAudSvc +(INFO|DEBUG)|of type DataHistory|DEBUG Recorded object|object modifiable when retrieved|^ToolSvc +DEBUG Service base class initialized|^IncidentSvc *DEBUG Adding .* listener|^Py:Athena *INFO using release|DecisionSvc +DEBUG|: duplicate entry|^IoComponentMgr +(INFO|DEBUG)|DBReplicaSvc|^HistogramPersis.*DEBUG|^JobOptionsSvc +INFO|^//GP:=|^ItemListSvc +(INFO|DEBUG)|Info File PoolFileCatalog.xml does not exist|DataModelCompatSvc::initialize|^ProxyProviderSvc +DEBUG|^DataModelCompatSvc +DEBUG|^AthenaOutputStreamVERBOSE|^AthenaOutputStream +DEBUG|Service base class initialized successfully|^TimelineSvc +DEBUG"
-macro_append AthenaOutputStream_testlinkopts " -L../$(CMTCONFIG) -lAthenaServices "
-
-apply_pattern UnitTest_run unit_test=FPEControlSvc \
-  extrapatterns="^JobOptionsSvc +INFO|^//GP:="
-macro_append FPEControlSvc_testlinkopts " -L../$(CMTCONFIG) -lAthenaServices"
-
-apply_pattern UnitTest_run unit_test=AthenaEventLoopMgr \
-  extrapatterns="^JobOptionsSvc +INFO|^//GP:="
-macro_append AthenaEventLoopMgr_testlinkopts " -L../$(CMTCONFIG) -lAthenaServices"
-
-apply_pattern UnitTest_run unit_test=RCUSvc \
-  extrapatterns="^JobOptionsSvc +INFO|^//GP:="
-macro_append AthenaEventLoopMgr_testlinkopts " -L../$(CMTCONFIG) -lAthenaServices"
-
-apply_pattern athenarun_test name="TestStopRun" \
-pre_script="../cmt/setup.sh"	\
-options="AthenaServices/TestStopRun.py" \
-post_script="post.sh TestStopRun $(q)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$(q)"
-
-apply_pattern athenarun_test name="AthTPCnvSvc" \
-pre_script="../cmt/setup.sh"	\
-options="AthenaServices/AthTPCnvSvc_test.py" \
-post_script="post.sh AthTPCnvSvc $(q)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$(q)"
-
-#
-# dictionary creation for python event loop mgr
-#
-# private
-# use AtlasReflex  AtlasReflex-*  External -no_auto_imports
-
-# apply_pattern lcgdict dict=AthenaServices \
-# selectionfile="selection.xml" \
-# options=" -I$(ATHENASERVICESROOT)/src" \
-# headerfiles="../AthenaServices/AthenaServicesDict.h"
-
-# macro_prepend AthenaServicesDict_shlibflags " -lAthenaServices "
-# macro_append lib_AthenaServicesDict_cppflags " -I$(ATHENASERVICESROOT)/src"
-# end_private
-
-macro_append DOXYGEN_INPUT " ../test "
-
-private
-use DataModelRoot                  DataModelRoot-*                  Control
-
-library AthenaServicesTest -s=test *.cxx
-macro AthenaServicesTest_shlibflags "$(componentshr_linkopts) $(AthenaServicesTest_use_linkopts)"
-apply_pattern generate_componentslist library=AthenaServicesTest
-apply_pattern optdebug_library name=AthenaServicesTest
diff --git a/Control/AthenaServices/doc/packagedoc.h b/Control/AthenaServices/doc/packagedoc.h
index 5d1e314176f71808e21a9ef56cdbbe27436bd8b1..59754faa11a4cb86597a3d3257f74b5bc28a22b6 100644
--- a/Control/AthenaServices/doc/packagedoc.h
+++ b/Control/AthenaServices/doc/packagedoc.h
@@ -22,7 +22,6 @@ interface defined in AthenaKernel or in GaudiKernel. Among those you'll find
  - SimplePOSIXTimeKeeperSvc_test.cxx
  - SimplePOSIXTimeKeeperSvc_test.py
 
-@section AthenaServices_reqs CMT requirements file
 
 
 @section AthenaServices_refs More Documentation
diff --git a/Control/AthenaServices/share/AthenaOutputStream_test.ref b/Control/AthenaServices/share/AthenaOutputStream_test.ref
index 910343b80e401d184023842e3dafd359153c99c9..ed520a9f8c68bc424d4a9166a7c886c7e54d49de 100644
--- a/Control/AthenaServices/share/AthenaOutputStream_test.ref
+++ b/Control/AthenaServices/share/AthenaOutputStream_test.ref
@@ -2,7 +2,7 @@
 
 
 Initializing Gaudi ApplicationMgr using job opts ../share/AthenaOutputStream_test.txt
-JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Control/AthenaServices/share/../share/AthenaOutputStream_test.txt
+JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/AthenaOutputStream_test.txt
 JobOptionsSvc        INFO # (5,1): MessageSvc.OutputLevel = 2
 JobOptionsSvc        INFO # (6,1): StoreGateSvc.OutputLevel = 2
 JobOptionsSvc        INFO # (8,1): AthenaOutputStream.OutputLevel = 1
@@ -12,8 +12,8 @@ JobOptionsSvc        INFO Job options successfully read in from ../share/AthenaO
 ApplicationMgr      DEBUG Getting my own properties
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
-                                          running on lxplus015.cern.ch on Sat Apr  8 17:31:22 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Fri Aug 11 15:50:39 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ServiceManager      DEBUG Initializing service AppMgrRunable
@@ -35,9 +35,8 @@ ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
 ClassIDSvc          DEBUG Service base class initialized successfully
 IncidentSvc         DEBUG Adding [ModuleLoaded] listener 'ClassIDSvc' with priority 100
-ClassIDSvc           INFO  getRegistryEntries: read 885 CLIDRegistry entries for module ALL
-ClassIDSvc          DEBUG processCLIDDB: read 1356 entries from CLIDDB file: /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-slc6-gcc62-dbg/x86_64-slc6-gcc62-dbg/share/clid.db
-ClassIDSvc          DEBUG processCLIDDB: read 1356 entries from CLIDDB file: /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-04-07T2225/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/clid.db
+ClassIDSvc           INFO  getRegistryEntries: read 952 CLIDRegistry entries for module ALL
+ClassIDSvc          DEBUG processCLIDDB: read 1342 entries from CLIDDB file: /home/sss/atlas/rootaccess/build/share/clid.db
 StoreGateSvc        DEBUG Property update for OutputLevel : new value = 2
 StoreGateSvc        DEBUG Service base class initialized successfully
 StoreGateSvc        DEBUG trying to create store SGImplSvc/StoreGateSvc_Impl
@@ -46,7 +45,7 @@ StoreGateSvc_Impl   DEBUG Service base class initialized successfully
 IncidentSvc         DEBUG Adding [EndEvent] listener 'StoreGateSvc' with priority 100
 IncidentSvc         DEBUG Adding [BeginEvent] listener 'StoreGateSvc' with priority 100
 ToolSvc             DEBUG Service base class initialized successfully
-ClassIDSvc           INFO  getRegistryEntries: read 1986 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2098 CLIDRegistry entries for module ALL
 AthenaOutputStream  DEBUG Property update for OutputLevel : new value = 1
 AthenaOutputStreamVERBOSE ServiceLocatorHelper::service: found service EventDataSvc
 TimelineSvc         DEBUG Service base class initialized successfully
@@ -89,19 +88,12 @@ IoComponentMgr      DEBUG --> io_hasitem()
 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/master/2017-04-07T2225/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config
-DBReplicaSvc        DEBUG Candidate server ATLF (priority -2700)
-DBReplicaSvc        DEBUG Candidate server ATLAS_COOLPROD (priority -695)
-DBReplicaSvc        DEBUG Candidate server atlas_dd (priority -690)
-DBReplicaSvc        DEBUG Candidate server ATLAS_CONFIG (priority -685)
-DBReplicaSvc        DEBUG Candidate server INT8R (priority -680)
-DBReplicaSvc        DEBUG Candidate server INTR (priority -675)
-DBReplicaSvc        DEBUG Candidate server ATONR_COOL (priority -670)
-DBReplicaSvc        DEBUG Candidate server ATONR_CONF (priority -665)
-DBReplicaSvc        DEBUG Candidate server DEVDB11 (priority -660)
-DBReplicaSvc        DEBUG Candidate server ATLF (priority -2200)
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus015.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc        DEBUG HOSTNAME  has no domain - try hostname --fqdn
+DBReplicaSvc        DEBUG HOSTNAME from fqdn: karma
+DBReplicaSvc         INFO Read replica configuration from /home/sss/atlas/rootaccess/build/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc        DEBUG Candidate server atlas_dd (priority 5)
+DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -137,6 +129,7 @@ IoComponentMgr      DEBUG --> io_register(AthenaOutputStream,W,DidNotNameOutput.
 IoComponentMgr      DEBUG --> io_hasitem()
 AthenaOutputStream   INFO I/O reinitialization...
 IncidentSvc         DEBUG Adding [MetaDataStop] listener 'AthenaOutputStream' with priority 50
+IncidentSvc         DEBUG Adding [UpdateOutputFile] listener 'AthenaOutputStream' with priority 50
 AthenaOutputStream  DEBUG End initialize
 AthenaOutputStreamVERBOSE ServiceLocatorHelper::service: found service AlgExecStateSvc
 AlgExecStateSvc     DEBUG preInit: will add Alg AthenaOutputStream later
@@ -145,24 +138,24 @@ AthenaOutputStream  DEBUG output handles: 0
 AthenaOutputStream  DEBUG Registering all Tools in ToolHandleArray HelperTools
 AthenaOutputStream  DEBUG Adding private ToolHandle tool AthenaOutputStream.AthenaOutputStreamTool (AthenaOutputStreamTool)
 AthenaOutputStream  DEBUG Data Deps for AthenaOutputStream
-ClassIDSvc           INFO  getRegistryEntries: read 824 CLIDRegistry entries for module ALL
-StoreGateSvc_Impl   DEBUG Recorded object @0x3014b60 with key uno of type Foo(CLID 8101)
- in DataObject @0x3014a70
+ClassIDSvc           INFO  getRegistryEntries: read 1025 CLIDRegistry entries for module ALL
+StoreGateSvc_Impl   DEBUG Recorded object @0x26b8970 with key uno of type Foo(CLID 8101)
+ in DataObject @0x26b89b0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x2578000 with key due of type Foo(CLID 8101)
- in DataObject @0x3015190
+StoreGateSvc_Impl   DEBUG Recorded object @0x1b93440 with key due of type Foo(CLID 8101)
+ in DataObject @0x1bc8e50
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x3014fa0 with key uno of type Bar(CLID 8107)
- in DataObject @0x256cf80
+StoreGateSvc_Impl   DEBUG Recorded object @0x1ba2d60 with key uno of type Bar(CLID 8107)
+ in DataObject @0x1b7d340
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x3014f80 with key due of type Bar(CLID 8107)
- in DataObject @0x25789e0
+StoreGateSvc_Impl   DEBUG Recorded object @0x1b7f410 with key due of type Bar(CLID 8107)
+ in DataObject @0x26d0a60
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x3013ef0 with key quattro of type Bar(CLID 8107)
- in DataObject @0x3015cb0
+StoreGateSvc_Impl   DEBUG Recorded object @0x26b8e50 with key quattro of type Bar(CLID 8107)
+ in DataObject @0x26d1010
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x251ebb0 with key cinque of type Bar(CLID 8107)
- in DataObject @0x3016100
+StoreGateSvc_Impl   DEBUG Recorded object @0x1d9ff00 with key cinque of type Bar(CLID 8107)
+ in DataObject @0x26d09a0
  object modifiable when retrieved
 AthenaOutputStr...WARNING add: can not find clid 13 in clid db
 AthenaOutputStream  DEBUG addItemObjects(13,"*") called
@@ -243,4 +236,4 @@ AthenaOutputStream  DEBUG  Added object 8108,"quattro"
 8108 cinque
 8107 quattro
 *** AthenaOutputStream_test OK ***
-CORAL/Services/ConnectionService Info Deleting the ConnectionPool
\ No newline at end of file
+CORAL/Services/ConnectionService Info Deleting the ConnectionPool
diff --git a/Control/AthenaServices/src/AthIncFirerAlg.cxx b/Control/AthenaServices/src/AthIncFirerAlg.cxx
index dc25c67b5e6a963523240ea8a5be591419b093d3..07fcc114f63cb1e893554d39fd0d047d2d9d3f83 100644
--- a/Control/AthenaServices/src/AthIncFirerAlg.cxx
+++ b/Control/AthenaServices/src/AthIncFirerAlg.cxx
@@ -3,6 +3,7 @@
 #include "GaudiKernel/Incident.h"
 #include "EventInfo/EventInfo.h"
 #include "EventInfo/EventIncident.h"
+#include "AthenaKernel/errorcheck.h"
 
 AthIncFirerAlg::AthIncFirerAlg( const std::string& name, ISvcLocator* pSvcLocator ):AthAlgorithm(name,pSvcLocator),m_Serial(false){
   declareProperty("Incidents",m_incLists,"Incidents to fire");
@@ -26,7 +27,7 @@ StatusCode AthIncFirerAlg::execute() {
     ATH_MSG_VERBOSE("Firing incident "<<i);
     if((i=="BeginEvent")||(i=="EndEvent")){
       const EventInfo* event(0);
-      evtStore()->retrieve(event);
+      CHECK( evtStore()->retrieve(event) );
       m_incSvc->fireIncident(std::make_unique<EventIncident>(*event, name(),i));
       if(m_Serial.value())m_incSvc->fireIncident(EventIncident(*event, name(),i));
     }else{
diff --git a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
index a3d2e5d4ccdc8796b9dc2e9971d95b96ef45123e..e46b5e4968c99b3bf83bbb9bece8f31d87bd2ab2 100644
--- a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
+++ b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
@@ -14,6 +14,7 @@
 #include "AthenaKernel/IEventSeek.h"
 #include "AthenaKernel/IAthenaEvtLoopPreSelectTool.h"
 #include "AthenaKernel/ExtendedEventContext.h"
+#include "AthenaKernel/EventContextClid.h"
 
 #include "GaudiKernel/IAlgorithm.h"
 #include "GaudiKernel/SmartIF.h"
@@ -655,6 +656,7 @@ StatusCode AthenaEventLoopMgr::executeEvent(void* /*par*/)
 {
   const EventInfo* pEvent(nullptr);
   std::unique_ptr<EventInfo> pEventPtr;
+  unsigned int conditionsRun = EventIDBase::UNDEFNUM;
   if ( m_evtContext )
   { // Deal with the case when an EventSelector is provided
     // Retrieve the Event object
@@ -670,6 +672,11 @@ StatusCode AthenaEventLoopMgr::executeEvent(void* /*par*/)
         pEventPtr = CxxUtils::make_unique<EventInfo>
           (new EventID(runNumber, eventNumber, eventTime, eventTimeNS, lumiBlock, bunchId), (EventType*)nullptr);
         pEvent = pEventPtr.get();
+
+        if (pAttrList->exists ("ConditionsRun"))
+          conditionsRun = (*pAttrList)["ConditionsRun"].data<unsigned int>();
+        else
+          conditionsRun = runNumber;
         
       } catch (...) {
       }
@@ -711,14 +718,12 @@ StatusCode AthenaEventLoopMgr::executeEvent(void* /*par*/)
   }
   assert(pEvent);
 
-  m_eventContext.setEventID( *((EventIDBase*) pEvent->event_ID()) );
-  m_eventContext.set(m_nev,0);
-
-  m_eventContext.setExtension( Atlas::ExtendedEventContext( eventStore()->hiveProxyDict() ) );
-  Gaudi::Hive::setCurrentContext( m_eventContext );
-
-  m_aess->reset(m_eventContext);
-
+  if (installEventContext (pEvent, conditionsRun).isFailure())
+  {
+    m_msg << MSG::ERROR 
+          << "Error installing event context object" << endmsg;
+    return (StatusCode::FAILURE);
+  }
 
   /// Fire begin-Run incident if new run:
   if (m_firstRun || (m_currentRun != pEvent->event_ID()->run_number()) ) {
@@ -768,7 +773,7 @@ StatusCode AthenaEventLoopMgr::executeEvent(void* /*par*/)
   }
 
   // Reset the timeout singleton
-  resetTimeout(Athena::Timeout::instance());
+  resetTimeout(Athena::Timeout::instance(m_eventContext));
   if(toolsPassed) {
   // Fire BeginEvent "Incident"
   //m_incidentSvc->fireIncident(EventIncident(*pEvent, name(),"BeginEvent"));
@@ -1120,6 +1125,21 @@ void AthenaEventLoopMgr::handle(const Incident& inc)
     return;
   }
 
+  // Need to make sure we have a valid EventContext in place before
+  // doing anything that could fire incidents.
+  unsigned int conditionsRun = pEvent->event_ID()->run_number();
+  {
+    const AthenaAttributeList* pAttrList = eventStore()->tryConstRetrieve<AthenaAttributeList>();
+    if ( pAttrList != nullptr ) {
+      if (pAttrList->exists ("ConditionsRun"))
+        conditionsRun = (*pAttrList)["ConditionsRun"].data<unsigned int>();
+    }
+  }
+  if (installEventContext (pEvent, conditionsRun).isFailure()) {
+    m_msg << MSG::ERROR << "Unable to install EventContext object" << endmsg;
+    return;
+  }
+
   sc = beginRunAlgorithms(*pEvent);
   if (!sc.isSuccess()) {
     m_msg << MSG::ERROR << "beginRunAlgorithms() failed" << endmsg;
@@ -1164,3 +1184,27 @@ StoreGateSvc*
 AthenaEventLoopMgr::eventStore() const {
   return m_eventStore.get();
 }
+
+
+// Fill in our EventContext object and make it current.
+StatusCode AthenaEventLoopMgr::installEventContext (const EventInfo* pEvent,
+                                                    unsigned int conditionsRun)
+{
+  m_eventContext.setEventID( *((EventIDBase*) pEvent->event_ID()) );
+  m_eventContext.set(m_nev,0);
+
+  m_eventContext.setExtension( Atlas::ExtendedEventContext( eventStore()->hiveProxyDict(),
+                                                            conditionsRun) );
+  Gaudi::Hive::setCurrentContext( m_eventContext );
+
+  m_aess->reset(m_eventContext);
+  if (eventStore()->record(std::make_unique<EventContext> (m_eventContext),
+                           "EventContext").isFailure())
+  {
+    m_msg << MSG::ERROR 
+          << "Error recording event context object" << endmsg;
+    return (StatusCode::FAILURE);
+  }
+
+  return StatusCode::SUCCESS;
+}
diff --git a/Control/AthenaServices/src/AthenaEventLoopMgr.h b/Control/AthenaServices/src/AthenaEventLoopMgr.h
index 714d1de85f6977c86853342dcfdbc67a266ed45f..99c169f9225c0f1e005838c423dd5d78037c2d13 100644
--- a/Control/AthenaServices/src/AthenaEventLoopMgr.h
+++ b/Control/AthenaServices/src/AthenaEventLoopMgr.h
@@ -217,6 +217,9 @@ private:
   AthenaEventLoopMgr(const AthenaEventLoopMgr&); ///< no implementation
   AthenaEventLoopMgr& operator= (const AthenaEventLoopMgr&); ///< no implementation
 
+  StatusCode installEventContext (const EventInfo* pEvent,
+                                  unsigned int conditionsRun);
+
   int m_nevt;
   /// @property histogram write/update interval
   IntegerProperty m_writeInterval;
diff --git a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
index dc4f8c5456d8f1bb8845d86fd5cf68b87883b763..032821fe720bdbdbc7f02309f80f23104aafd148 100644
--- a/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
+++ b/Control/AthenaServices/src/AthenaHiveEventLoopMgr.cxx
@@ -10,10 +10,12 @@
 #include <fstream> /* ofstream */
 #include <iomanip>
 
+#include "PersistentDataModel/AthenaAttributeList.h"
 #include "AthenaKernel/ITimeKeeper.h"
 #include "AthenaKernel/IEventSeek.h"
 #include "AthenaKernel/IAthenaEvtLoopPreSelectTool.h"
 #include "AthenaKernel/ExtendedEventContext.h"
+#include "AthenaKernel/EventContextClid.h"
 
 #include "GaudiKernel/IAlgorithm.h"
 #include "GaudiKernel/SmartIF.h"
@@ -31,6 +33,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/Property.h"
 #include "GaudiKernel/EventIDBase.h"
+#include "GaudiKernel/ThreadLocalContext.h"
 
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/ActiveStoreSvc.h"
@@ -663,6 +666,9 @@ StatusCode AthenaHiveEventLoopMgr::executeEvent(void* createdEvts_IntPtr )
   const EventInfo* pEvent = m_pEvent;
   assert(pEvent);
 
+  // Make sure context is set before firing any incidents.
+  Gaudi::Hive::setCurrentContext (*evtContext);
+
   /// Fire begin-Run incident if new run:
   if (m_firstRun || (m_currentRun != pEvent->event_ID()->run_number()) ) {
     // Fire EndRun incident unless this is the first run
@@ -706,6 +712,17 @@ StatusCode AthenaHiveEventLoopMgr::executeEvent(void* createdEvts_IntPtr )
   //       			     pEvent->event_ID()->time_stamp_ns_offset()));
   evtContext->setEventID( *((EventIDBase*) pEvent->event_ID()) );
 
+  unsigned int conditionsRun = pEvent->event_ID()->run_number();
+  const AthenaAttributeList* attr = nullptr;
+  if (eventStore()->contains<AthenaAttributeList> ("Input") &&
+      eventStore()->retrieve(attr, "Input").isSuccess())
+  {
+    if (attr->exists ("ConditionsRun")) {
+      conditionsRun = (*attr)["ConditionsRun"].data<unsigned int>();
+    }
+  }
+  evtContext->template getExtension<Atlas::ExtendedEventContext>()->setConditionsRun (conditionsRun);
+
   m_doEvtHeartbeat = (m_eventPrintoutInterval.value() > 0 && 
 		 0 == (m_nev % m_eventPrintoutInterval.value()));
   if (m_doEvtHeartbeat)  {
@@ -723,7 +740,7 @@ StatusCode AthenaHiveEventLoopMgr::executeEvent(void* createdEvts_IntPtr )
   }
 
   // Reset the timeout singleton
-  resetTimeout(Athena::Timeout::instance());
+  resetTimeout(Athena::Timeout::instance(*evtContext));
   if(toolsPassed) {
     // Fire BeginEvent "Incident"
     //m_incidentSvc->fireIncident(EventIncident(*pEvent, name(),"BeginEvent",*evtContext));
@@ -749,6 +766,9 @@ StatusCode AthenaHiveEventLoopMgr::executeEvent(void* createdEvts_IntPtr )
 
   createdEvts++;
 
+  // invalidate thread local context once outside of event execute loop
+  Gaudi::Hive::setCurrentContext( EventContext() );
+
   return StatusCode::SUCCESS;
 
 }
@@ -1176,6 +1196,15 @@ StatusCode  AthenaHiveEventLoopMgr::createEventContext(EventContext*& evtContext
     debug() << "created EventContext, num: " << evtContext->evt()  << "  in slot: " 
 	    << evtContext->slot() << endmsg;
   }
+
+  if (eventStore()->record(std::make_unique<EventContext> (*evtContext),
+                           "EventContext").isFailure())
+  {
+    m_msg << MSG::ERROR 
+          << "Error recording event context object" << endmsg;
+    return (StatusCode::FAILURE);
+  }
+
   return sc;
 }
 
@@ -1230,8 +1259,8 @@ AthenaHiveEventLoopMgr::drainScheduler(int& finishedEvts){
     }
     
 
-    int n_run(0);
-    int n_evt(0);
+    EventID::number_type n_run(0);
+    EventID::number_type n_evt(0);
 
     const EventInfo* pEvent(0);
     if (m_whiteboard->selectStore(thisFinishedEvtContext->slot()).isSuccess()) {
diff --git a/Control/AthenaServices/src/AthenaOutputStream.cxx b/Control/AthenaServices/src/AthenaOutputStream.cxx
index 36ad4eee353ffc67a889f8ef5b5bfb9009ffe21b..0e6cf7ce2608e82b2001fe6024521743f37f6f1f 100644
--- a/Control/AthenaServices/src/AthenaOutputStream.cxx
+++ b/Control/AthenaServices/src/AthenaOutputStream.cxx
@@ -87,11 +87,11 @@ namespace {
     virtual const std::type_info& tinfo() const override { return m_tinfo; }
     virtual void* cast (CLID /*clid*/,
                         SG::IRegisterTransient* /*irt*/ = nullptr,
-                        bool /*isConst*/ = true) const override
+                        bool /*isConst*/ = true) override
     { std::abort(); }
     virtual void* cast (const std::type_info& tinfo,
                         SG::IRegisterTransient* /*irt*/ = nullptr,
-                        bool /*isConst*/ = true) const override
+                        bool /*isConst*/ = true) override
     { if (tinfo == m_tinfo)
         return m_ptr;
       return nullptr;
@@ -116,11 +116,10 @@ namespace {
   std::unique_ptr<SG::TransientAddress>
   AltDataBucket::makeTransientAddress (CLID clid, const SG::DataProxy& oldProxy)
   {
-    const SG::TransientAddress& oldTad = *oldProxy.transientAddress();
     auto newTad = std::make_unique<SG::TransientAddress>
-      (clid, oldTad.name());
-    newTad->setAlias (oldTad.alias());
-    for (CLID tclid : oldTad.transientID()) {
+      (clid, oldProxy.name());
+    newTad->setAlias (oldProxy.alias());
+    for (CLID tclid : oldProxy.transientID()) {
       // Note: this will include derived CLIDs.
       // Strictly speaking, that's not right; however, filtering them
       // out can break ElementLinks (for example those used by
@@ -163,8 +162,10 @@ AthenaOutputStream::AthenaOutputStream(const string& name, ISvcLocator* pSvcLoca
    declareProperty("MetadataStore",          m_metadataStore);
    declareProperty("ProcessingTag",          m_processTag=name);
    declareProperty("ForceRead",              m_forceRead=false);
-   declareProperty("PersToPers",             m_persToPers=false);
-   declareProperty("ExemptPersToPers",       m_exemptPersToPers);
+   // pers-to-pers option not used, and not currently working.
+   //declareProperty("PersToPers",             m_persToPers=false);
+   //declareProperty("ExemptPersToPers",       m_exemptPersToPers);
+   m_persToPers = false;
    declareProperty("ProvideDef",             m_provideDef=false);
    declareProperty("ExtendProvenanceRecord", m_extendProvenanceRecord=true);
    declareProperty("WriteOnExecute",         m_writeOnExecute=true);
@@ -577,13 +578,13 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
       this->tokenizeAtSep( keyTokens, item_key, wildCard );
       ATH_MSG_VERBOSE("Done calling tokenizeAtStep( " << keyTokens << ", " << item_key << ", " << wildCard << ")" );
       //std::pair<std::string, std::string> key = breakAtSep(item_key, wildCard);
-      SG::TransientAddress* tAddr = nullptr;
       // Now loop over any found proxies
       for (; iter != end; ++iter) {
          SG::DataProxy* itemProxy(iter->second);
          // Does this key match the proxy key name - allow for wildcarding and aliases
-         bool keyMatch = (item_key == "*" || item_key == itemProxy->name()
-                 || itemProxy->alias().find(item_key) != itemProxy->alias().end());
+         bool keyMatch = ( item_key == "*" ||
+                           item_key == itemProxy->name() ||
+                           itemProxy->hasAlias(item_key) );
          if (!keyMatch) {
             ATH_MSG_VERBOSE("Calling matchKey( " << keyTokens << ", " << itemProxy->name() << ")" );
             keyMatch = matchKey(keyTokens, itemProxy);
@@ -728,24 +729,30 @@ void AthenaOutputStream::addItemObjects(const SG::FolderItem& item)
                      ATH_MSG_WARNING("Unable to record item " << tns.str() << " in Svc");
                   }
                }
-            } else if (!m_forceRead && m_persToPers && itemProxy->isValid()) {
+            }
+#if 0            
+            else if (!m_forceRead && m_persToPers && itemProxy->isValid()) {
                tAddr = itemProxy->transientAddress();
             } //if data object there
+#endif
          } else if (keyMatch && xkeyMatch) {
             removed = true;
          }
       } // proxy loop
       if (!added && !removed) {
+#if 0
          if (m_persToPers && tAddr != nullptr) {
             ATH_MSG_DEBUG(" Going to attempt direct persistent copy for "
                     << item.id() << ",\"" << item_key  << "\"");
             DataObject* ics = new DataObject();
             SG::DataProxy* proxy = new SG::DataProxy(ics, tAddr);
             m_objects.push_back(proxy->object());
-         } else if (m_provideDef) {
+         } else
+#endif
+           if (m_provideDef) {
             ATH_MSG_DEBUG(" Going to attempt providing persistent default for "
                     << item.id() << ",\"" << item_key  << "\"");
-            tAddr = new SG::TransientAddress(item.id(), item_key);
+            SG::TransientAddress* tAddr = new SG::TransientAddress(item.id(), item_key);
             DataObject* ics = new DataObject();
             SG::DataProxy* proxy = new SG::DataProxy(ics, tAddr);
             m_objects.push_back(proxy->object());
diff --git a/Control/AthenaServices/src/MetaDataSvc.cxx b/Control/AthenaServices/src/MetaDataSvc.cxx
index 370c90954e751bf8e5921e0ed364ef5d4aad3734..31cd3848745273014274ad29efc8b434f9861ff4 100644
--- a/Control/AthenaServices/src/MetaDataSvc.cxx
+++ b/Control/AthenaServices/src/MetaDataSvc.cxx
@@ -227,7 +227,8 @@ StatusCode MetaDataSvc::loadAddresses(StoreID::type storeID, IAddressProvider::t
    return(StatusCode::SUCCESS);
 }
 //________________________________________________________________________________
-StatusCode MetaDataSvc::updateAddress(StoreID::type, SG::TransientAddress*) {
+StatusCode MetaDataSvc::updateAddress(StoreID::type, SG::TransientAddress*,
+                                      const EventContext&) {
    return(StatusCode::FAILURE);
 }
 //__________________________________________________________________________
diff --git a/Control/AthenaServices/src/MetaDataSvc.h b/Control/AthenaServices/src/MetaDataSvc.h
index e4b93ebda5e748e306555ca06c2f859c0c257d3a..481eb61ac978ae3e291281a6b0c6e4249cf95d36 100644
--- a/Control/AthenaServices/src/MetaDataSvc.h
+++ b/Control/AthenaServices/src/MetaDataSvc.h
@@ -76,7 +76,8 @@ public: // Non-static members
 
    /// Update a transient address.
    /// @param tad [IN] transient address to be updated.
-   StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+   StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad,
+                            const EventContext& ctx);
 
    /// Incident service handle listening for BeginInputFile and EndInputFile.
    void handle(const Incident& incident);
diff --git a/Control/AthenaServices/src/MixingEventSelector.cxx b/Control/AthenaServices/src/MixingEventSelector.cxx
index 727adf1c5fa574e3e469b5db22ba38678558c1e9..7319e8dc45a1cd1f867019e272ed5ce668e55008 100644
--- a/Control/AthenaServices/src/MixingEventSelector.cxx
+++ b/Control/AthenaServices/src/MixingEventSelector.cxx
@@ -272,7 +272,7 @@ StatusCode
 MixingEventSelector::loadAddresses(StoreID::type  storeID,
                                    IAddressProvider::tadList& /*tads*/  )
 {
-  if (storeID != StoreID::EVENT_STORE)
+  if (storeID != StoreID::EVENT_STORE && storeID != StoreID::PILEUP_STORE)
     return StatusCode::SUCCESS;
 
   CLID mclid = ClassID_traits<MergedEventInfo>::ID();
@@ -289,7 +289,8 @@ MixingEventSelector::loadAddresses(StoreID::type  storeID,
 }
 
 StatusCode
-MixingEventSelector::updateAddress(StoreID::type,SG::TransientAddress*) {
+MixingEventSelector::updateAddress(StoreID::type,SG::TransientAddress*,
+                                   const EventContext&) {
   return StatusCode::FAILURE;
 }
 
diff --git a/Control/AthenaServices/src/MixingEventSelector.h b/Control/AthenaServices/src/MixingEventSelector.h
index 4f1839fb828209a008f4680cb7ccf5154eb19dc6..072aad27449ff5acc24ddaf4c1493db94c5170fa 100644
--- a/Control/AthenaServices/src/MixingEventSelector.h
+++ b/Control/AthenaServices/src/MixingEventSelector.h
@@ -102,7 +102,8 @@ public:
   virtual StatusCode loadAddresses(StoreID::type  storeID ,
                                    IAddressProvider::tadList& tads  ) override;
   virtual StatusCode updateAddress(StoreID::type  storeID ,
-				   SG::TransientAddress*  tad) override;
+				   SG::TransientAddress*  tad,
+                                   const EventContext& ctx) override;
   //@}
 
   
diff --git a/Control/CLIDComps/CMakeLists.txt b/Control/CLIDComps/CMakeLists.txt
index 36ef587b0f844aae8f0e08a32825346a748ba2e8..a02f4bbfaba5984b614b04af6b3321d9619a21ab 100644
--- a/Control/CLIDComps/CMakeLists.txt
+++ b/Control/CLIDComps/CMakeLists.txt
@@ -45,3 +45,8 @@ atlas_install_python_modules( python/*.py )
 atlas_install_runtime( share/Gaudi_clid.db )
 atlas_install_scripts( share/clid test/_clid_unittest.py )
 atlas_install_joboptions( share/*.opts )
+
+# Wait with the build of genCLIDDB until the jobOptions are installed:
+if( TARGET genCLIDDB AND TARGET CLIDCompsJobOptInstall )
+   add_dependencies( genCLIDDB CLIDCompsJobOptInstall )
+endif()
diff --git a/Control/CLIDComps/cmt/requirements b/Control/CLIDComps/cmt/requirements
deleted file mode 100644
index 42e2836636d65310258146c9684a0cacd28435e0..0000000000000000000000000000000000000000
--- a/Control/CLIDComps/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package CLIDComps
-
-author Paolo Calafiura   <Paolo.Calafiura@cern.ch>
-
-use AtlasPolicy    AtlasPolicy-*
-
-private
-use AtlasBoost     AtlasBoost-*     External
-use GaudiInterface GaudiInterface-* External
-use AthenaKernel   AthenaKernel-*   Control
-use SGTools        SGTools-*        Control
-end_private
-
-library CLIDComps *.cxx -s=components *.cxx
-apply_pattern component_library_no_genCLIDDB
-
-apply_pattern declare_scripts files="clid ../test/_clid_unittest.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_runtime files="Gaudi_clid.db"
-
-private
-use TestTools       TestTools-*          AtlasTest
-apply_pattern install_runtime
-apply_pattern UnitTest_run unit_test=ClassIDSvc \
-  extrapatterns="WARNING Could not resolve clid DB|^JobOptionsSvc +INFO"
-macro_append DOXYGEN_INPUT " ../test ../share " 
-macro_append DOXYGEN_FILE_PATTERNS    " *.icc clid "
-end_private
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/cmt/fragments/install_pylib b/Control/CLIDComps/src/ATLAS_CHECK_THREAD_SAFETY
similarity index 100%
rename from Trigger/TrigConfiguration/TrigConfDBConnection/cmt/fragments/install_pylib
rename to Control/CLIDComps/src/ATLAS_CHECK_THREAD_SAFETY
diff --git a/Control/CLIDComps/src/ClassIDSvc.cxx b/Control/CLIDComps/src/ClassIDSvc.cxx
index d0d9161da55cd758e761ff627f52f85d79a2eba8..9eef38588e81befcb99085910d85ef1d7206848f 100644
--- a/Control/CLIDComps/src/ClassIDSvc.cxx
+++ b/Control/CLIDComps/src/ClassIDSvc.cxx
@@ -17,8 +17,10 @@
 #include "GaudiKernel/ModuleIncident.h"
 #include "GaudiKernel/System.h"
 #include "GaudiKernel/MsgStream.h"
+#include "GaudiKernel/ServiceHandle.h"
 #include "SGTools/CLIDRegistry.h"
 #include "AthenaKernel/errorcheck.h"
+#include "CxxUtils/checker_macros.h"
 
 #include "ClassIDSvc.h"
 using namespace std;
@@ -40,127 +42,197 @@ namespace {
  
 #define ATH_MSG_VERBOSE(x) ATH_MSG_LVL(MSG::VERBOSE, x)
 #define ATH_MSG_DEBUG(x)   ATH_MSG_LVL(MSG::DEBUG, x)
-#define ATH_MSG_INFO(x)   ATH_MSG_LVL(MSG::INFO, x)
+#define ATH_MSG_INFO(x)    ATH_MSG_LVL(MSG::INFO, x)
+#define ATH_MSG_ERROR(x)   ATH_MSG_LVL(MSG::ERROR, x)
+#define ATH_MSG_FATAL(x)   ATH_MSG_LVL(MSG::FATAL, x)
+
+#define ATH_CONST_MSG_VERBOSE(x)                  \
+  do {                                            \
+    if (msg().level() < MSG::VERBOSE) {           \
+      MsgStream log (msgSvc(), name());           \
+      log << MSG::VERBOSE << x << endmsg;         \
+    }                                             \
+  } while (0)
 
 }
 
 
-/// Standard Constructor
-ClassIDSvc::ClassIDSvc(const std::string& name,ISvcLocator* svc)
-  : Service(name,svc), m_outputFileName("NULL"),
-    m_clidDBPath(System::getEnv("DATAPATH")),
-    m_msg (msgSvc(), name),
-    m_regMutex()
-{
-  // Property Default values
-  m_DBFiles.push_back("clid.db");
-    
-  // Get user's input	
-  declareProperty("CLIDDBFiles",  m_DBFiles, 
-		  "list of db files with (CLID, class_name) entries. Loaded at init in svc maps. Files are looked up in DATAPATH");
-  declareProperty("OutputFileName",  m_outputFileName,
-		  "path to clid.db file in which write at finalize entries in m_clidMap. Default ('NULL') is not to write output clid.db");
+/// get next available CLID 
+/// @throws std::runtime_error if no CLID can be allocated
+CLID 
+ClassIDSvc::nextAvailableID() const {
+  lock_t lock (m_mutex);
+  maybeRescan();
+  CLID valid(CLIDdetail::MINCLID);
+  while (valid <= CLIDdetail::MAXCLID &&
+         m_clidMap.find(valid) != m_clidMap.end())
+  {
+    ++valid;
+  }
 
+  if (valid > CLIDdetail::MAXCLID) {
+    throw runtime_error("ClassIDSvc::nextAvailableID: none in range");
+  }
+
+  return valid;
 }
 
-// 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!!!
 
+bool
+ClassIDSvc::isIDInUse(const CLID& id ) const {
+  lock_t lock (m_mutex);
+  maybeRescan();
+  return m_clidMap.find(id) != m_clidMap.end();
+}
+
+
+bool
+ClassIDSvc::isNameInUse(const string& name ) const {
+  lock_t lock (m_mutex);
+  maybeRescan();
+  return m_nameMap.find(name) != m_nameMap.end();
+}
+
+
+/// get type name associated with clID (if any)
 StatusCode 
-ClassIDSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) 
+ClassIDSvc::getTypeNameOfID(const CLID& id, std::string& typeName) const
 {
-    if ( IClassIDSvc::interfaceID().versionMatch(riid) )    {
-        *ppvInterface = (IClassIDSvc*)this;
-    }
-    else  {
-	// Interface is not directly available: try out a base class
-	return Service::queryInterface(riid, ppvInterface);
-    }
-    addRef();
-    return StatusCode::SUCCESS;
+  lock_t lock (m_mutex);
+  maybeRescan();
+  return getTypeNameOfIDInternal (id, typeName);
 }
 
+
+/// get type name associated with clID (if any)
 StatusCode 
-ClassIDSvc::initialize()
+ClassIDSvc::getTypeInfoNameOfID(const CLID& id, 
+				std::string& typeInfoName) const
 {
-  ATH_MSG_VERBOSE( "Initializing " << name() ) ;
+  lock_t lock (m_mutex);
+  maybeRescan();
+  StatusCode sc(StatusCode::FAILURE);
+  CLIDMap::const_iterator iID = m_clidMap.find(id);
+  if (iID != m_clidMap.end()) {
+    typeInfoName = iID->second.second;
+    ATH_CONST_MSG_VERBOSE( "getTypeInfoNameOfID(" << id <<
+                           ") type-info name is " << typeInfoName );
+    sc = StatusCode::SUCCESS;
+  }
+  else {
+    ATH_CONST_MSG_VERBOSE( "getTypeInfoNameOfID(" << id <<
+                           ") no associated type-info name found " );
+  }
+  return sc;
+}
 
-  CHECK( Service::initialize() );
 
-  // set up the incident service:
-  IIncidentSvc* pIncSvc(0);
-  const bool CREATEIF(true);
-  CHECK( service("IncidentSvc", pIncSvc, CREATEIF) );
-  assert( 0 != pIncSvc );
+/// get id associated with type name (if any)
+StatusCode 
+ClassIDSvc::getIDOfTypeName(const std::string& typeName, CLID& id) const
+{
+  lock_t lock (m_mutex);
+  maybeRescan();
+  return getIDOfTypeNameInternal (typeName, id);
+}
 
-  const int PRIORITY = 100;
-  pIncSvc->addListener(this, ModuleLoadedIncident::TYPE(), PRIORITY);
-  pIncSvc->release();
 
-  return fillDB();
+/// get id associated with type-info name (if any)
+StatusCode 
+ClassIDSvc::getIDOfTypeInfoName(const std::string& typeInfoName,
+				CLID& id) const
+{
+  lock_t lock (m_mutex);
+  maybeRescan();
+  StatusCode sc(StatusCode::FAILURE);
+  NameMap::const_iterator iID = m_tiNameMap.find(typeInfoName);
+  if (iID != m_tiNameMap.end()) {
+    id = iID->second;
+    ATH_CONST_MSG_VERBOSE( "getIDOfTypeInfoName(" << typeInfoName << ") CLID is " << id);
+    sc = StatusCode::SUCCESS;
+  }
+  else {
+    ATH_CONST_MSG_VERBOSE( "getIDOfTypeInfoName(" << typeInfoName << ") no associated CLID found ");
+  }
+  return sc;
 }
 
-bool ClassIDSvc::getRegistryEntries(const std::string& moduleName) {
-
-  std::lock_guard<std::recursive_mutex> lock(m_regMutex);
+/// get PackageInfo associated with clID (if any)
+StatusCode 
+ClassIDSvc::getPackageInfoForID(const CLID& id, Athena::PackageInfo& info) const
+{
+  lock_t lock (m_mutex);
+  maybeRescan();
+  return getPackageInfoForIDInternal (id, info);
+}
 
-  //not only this is fast, but is necessary to prevent recursion
-  if (!CLIDRegistry::hasNewEntries()) return true;
 
-  bool allOK(true);
-  //to speed up processing we only take entries added to CLIDRegistry
-  //since last call (thanks Niels!)
-  std::pair<CLIDRegistry::const_iterator, CLIDRegistry::const_iterator> er =
-    CLIDRegistry::newEntries();
-  CLIDRegistry::const_iterator iEntry=er.first, endEntry=er.second;
-  while (allOK && (iEntry < endEntry)) {
-    const CLID& clid                   = boost::get<0>(*iEntry);
-    const std::string& typeName        = boost::get<1>(*iEntry);
-    const Athena::PackageInfo& pkgInfo = boost::get<2>(*iEntry);
-    const std::string& typeInfoName    = boost::get<3>(*iEntry);
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE(
-		    "reading [" 
-		    << clid << ", "
-		    << typeName << ", "
-		    << pkgInfo << ", "
-		    << typeInfoName << "]");
-#endif
-    allOK &= setTypePackageForID(clid, 
-				 typeName,
-				 pkgInfo, 
-				 typeInfoName).isSuccess();
-    ++iEntry;
-  }
-  
-  if (allOK) {
-    int nE = distance(er.first, er.second);
-    ATH_MSG_INFO( " getRegistryEntries: read " << nE 
-		  << " CLIDRegistry entries for module " << moduleName );
-  } else {
-    msg() << MSG::ERROR 
-	  << " getRegistryEntries: can not read  CLIDRegistry entries for module " 
-	  << moduleName << endmsg;
+/// associate type name with clID
+StatusCode 
+ClassIDSvc::setTypePackageForID(const CLID& id, 
+				const std::string& typeName,
+				const Athena::PackageInfo& info,
+				const std::string& typeInfoName)
+{
+  lock_t lock (m_mutex);
+  if (id < CLIDdetail::MINCLID || id > CLIDdetail::MAXCLID) {
+    ATH_MSG_FATAL( "setTypeNameForID: input id " << id 
+                   << " is out of allowed range " << CLIDdetail::MINCLID 
+                   << " : " << CLIDdetail::MAXCLID );
+    return StatusCode::FAILURE;
   }
-
-  return allOK;
+  return uncheckedSetTypePackageForID(id, typeName, info, typeInfoName);
 }
 
 
-inline
-void ClassIDSvc::maybeRescan() const
+void 
+ClassIDSvc::dump() const
 {
-  const_cast<ClassIDSvc*>(this)->getRegistryEntries ("ALL");
+  lock_t lock (m_mutex);
+  MsgStream log (msgSvc(), name());
+  log << MSG::INFO << "dump: in memory" << endmsg;
+
+  for (CLID clid : sortedIDs()) {
+    const std::string& typeName = m_clidMap.find (clid)->second.first;
+    log << MSG::INFO 
+        << "CLID: "<< clid
+        << " - type name: " << typeName;
+    Athena::PackageInfo info;
+    if (getPackageInfoForIDInternal (clid, info).isSuccess()) {
+      log << MSG::INFO 
+          << "- Package "<< info; 
+    }
+    log << MSG::INFO << '\n';
+  }
+  log << "------------------------------" << endmsg;
 }
 
 
-void ClassIDSvc::handle(const Incident &inc) {
-  const ModuleLoadedIncident& modInc(dynamic_cast<const ModuleLoadedIncident&>(inc));
+StatusCode 
+ClassIDSvc::initialize()
+{
+  ATH_MSG_VERBOSE( "Initializing " << name() ) ;
 
-  getRegistryEntries(modInc.module());
+  CHECK( Service::initialize() );
+
+  // set up the incident service:
+  ServiceHandle<IIncidentSvc> pIncSvc ("IncidentSvc", name());
+  CHECK( pIncSvc.retrieve() );
+
+  const int PRIORITY = 100;
+  pIncSvc->addListener(this, ModuleLoadedIncident::TYPE(), PRIORITY);
+  pIncSvc->release();
+
+  CHECK( fillDB() );
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode
+ClassIDSvc::reinitialize() {
+  ATH_MSG_INFO("RE-initializing " << name() ) ;  
+  CHECK( fillDB() );
+  return StatusCode::SUCCESS;
 }
 
 
@@ -176,19 +248,16 @@ ClassIDSvc::finalize()
     } else {
       //    ostream_iterator< pair<CLID, string> > os(outfile, ':');
       //    copy(m_clidMap.begin(), m_clidMap,end(), os);
-      CLIDMap::const_iterator i(m_clidMap.begin()), iE(m_clidMap.end());
-      while (i != iE) {
-	const CLID clid = i->first;
-	const std::string& typeName = i->second.first;
-	const std::string& tiName   = i->second.second;
+      for (CLID clid : sortedIDs()) {
+	const std::string& typeName = m_clidMap[clid].first;
+	const std::string& tiName   = m_clidMap[clid].second;
 	outfile << clid << "; " << typeName;
-	Athena::PackageInfo existInfo;
-	if (getPackageInfoForID(i->first, existInfo).isSuccess()) {
-	  outfile << "; " << existInfo;
+        Athena::PackageInfo info;
+        if (getPackageInfoForIDInternal (clid, info).isSuccess()) {
+	  outfile << "; " << info;
 	  outfile << "; " << tiName;
 	}
 	outfile	<< endl;
-	++i;
       }
       ATH_MSG_INFO( "finalize: wrote " << m_clidMap.size()  <<
 		    " entries to output CLIDDB file: " << m_outputFileName );
@@ -198,246 +267,169 @@ ClassIDSvc::finalize()
   return Service::finalize();
 }
 
-/// get next available CLID 
-/// @throws std::runtime_error if no CLID can be allocated
-CLID 
-ClassIDSvc::nextAvailableID() const {
-  maybeRescan();
-  CLID valid(CLIDRegistry::MINCLID);
-  while (valid <= CLIDRegistry::MAXCLID && isIDInUse(valid)) ++valid;
-  if (valid > CLIDRegistry::MAXCLID) throw runtime_error("ClassIDSvc::nextAvailableID: none in range");
-  return valid;
-}
 
-bool
-ClassIDSvc::isIDInUse(const CLID& id ) const {
-  maybeRescan();
-  return 0 != m_clidMap.count(id);
+// 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 
+ClassIDSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) 
+{
+    if ( IClassIDSvc::interfaceID().versionMatch(riid) )    {
+        *ppvInterface = (IClassIDSvc*)this;
+    }
+    else  {
+	// Interface is not directly available: try out a base class
+	return Service::queryInterface(riid, ppvInterface);
+    }
+    addRef();
+    return StatusCode::SUCCESS;
 }
 
-bool
-ClassIDSvc::isNameInUse(const string& name ) const {
-  maybeRescan();
-  return 0 != m_nameMap.count(name);
+
+void ClassIDSvc::handle(const Incident &inc)
+{
+  lock_t lock (m_mutex);
+  const ModuleLoadedIncident& modInc(dynamic_cast<const ModuleLoadedIncident&>(inc));
+
+  getRegistryEntries(modInc.module());
 }
 
-/// get type name associated with clID (if any)
-StatusCode 
-ClassIDSvc::getTypeNameOfID(const CLID& id, std::string& typeName) const {
-  maybeRescan();
-  StatusCode sc(StatusCode::FAILURE);
-  CLIDMap::const_iterator iID = m_clidMap.find(id);
-  if (iID != m_clidMap.end()) {
-    typeName = iID->second.first;
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE( "getTypeNameOfID(" << id << ") type name is " << typeName);
-#endif			
-    sc = StatusCode::SUCCESS;
-  } else {
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE( "getTypeNameOfID(" << id << ") no associated type name found ");
-#endif			
-  }
-  return sc;
+
+/// Standard Constructor
+ClassIDSvc::ClassIDSvc(const std::string& name,ISvcLocator* svc)
+  : Service(name,svc),
+    m_outputFileName("NULL"),
+    m_clidDBPath(System::getEnv("DATAPATH")),
+    m_msg (msgSvc(), name)
+{
+  // Property Default values
+  m_DBFiles.push_back("clid.db");
+    
+  // Get user's input	
+  declareProperty("CLIDDBFiles",  m_DBFiles, 
+		  "list of db files with (CLID, class_name) entries. Loaded at init in svc maps. Files are looked up in DATAPATH");
+  declareProperty("OutputFileName",  m_outputFileName,
+		  "path to clid.db file in which write at finalize entries in m_clidMap. Default ('NULL') is not to write output clid.db");
+
 }
 
-/// get type name associated with clID (if any)
-StatusCode 
-ClassIDSvc::getTypeInfoNameOfID(const CLID& id, 
-				std::string& typeInfoName) const {
-  maybeRescan();
-  StatusCode sc(StatusCode::FAILURE);
-  CLIDMap::const_iterator iID = m_clidMap.find(id);
-  if (iID != m_clidMap.end()) {
-    typeInfoName = iID->second.second;
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE( "getTypeInfoNameOfID(" << id << ") type-info name is " << typeInfoName);
-#endif			
-    sc = StatusCode::SUCCESS;
-  } else {
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE( "getTypeInfoNameOfID(" << id << ") no associated type-info name found ");
-#endif			
+
+// Return all registered IDs in sorted order.
+std::vector<CLID> ClassIDSvc::sortedIDs() const
+{
+  std::vector<CLID> ids;
+  ids.reserve (m_clidMap.size());
+  for (const auto& p : m_clidMap) {
+    ids.push_back (p.first);
   }
-  return sc;
+  std::sort (ids.begin(), ids.end());
+  return ids;
 }
 
+
 /// get PackageInfo associated with clID (if any)
 StatusCode 
-ClassIDSvc::getPackageInfoForID(const CLID& id, Athena::PackageInfo& info) const {
-  maybeRescan();
+ClassIDSvc::getPackageInfoForIDInternal(const CLID& id,
+                                        Athena::PackageInfo& info) const
+{
   StatusCode sc(StatusCode::FAILURE);
   PackageMap::const_iterator iID = m_packageMap.find(id);
   if (iID != m_packageMap.end()) {
     info = iID->second;
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE("getPackageInfoForID(" << id << 
-		    ") package name is " << info.name() << 
-		    " package version is " << info.version());
-#endif			
+    ATH_CONST_MSG_VERBOSE("getPackageInfoForID(" << id << 
+                          ") package name is " << info.name() << 
+                          " package version is " << info.version());
     sc = StatusCode::SUCCESS;
-  } else {
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE( "getPackageInfoForID(" << id <<
-		     ") no associated type name found ");
-#endif			
+  }
+  else {
+    ATH_CONST_MSG_VERBOSE( "getPackageInfoForID(" << id <<
+                           ") no associated type name found ");
   }
   return sc;
 }
+
+
 /// get id associated with type name (if any)
 StatusCode 
-ClassIDSvc::getIDOfTypeName(const std::string& typeName, CLID& id) const {
-  maybeRescan();
+ClassIDSvc::getIDOfTypeNameInternal(const std::string& typeName, CLID& id) const
+{
   StatusCode sc(StatusCode::FAILURE);
   NameMap::const_iterator iID = m_nameMap.find(typeName);
   if (iID != m_nameMap.end()) {
     id = iID->second;
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE( "getIDOfTypeName(" << typeName << ") CLID is " << id);
-#endif			
+    ATH_CONST_MSG_VERBOSE( "getIDOfTypeName(" << typeName << ") CLID is " << id);
     sc = StatusCode::SUCCESS;
-  } else {
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE( "getIDOfTypeName(" << typeName << ") no associated CLID found " );
-#endif			
+  }
+  else {
+    ATH_CONST_MSG_VERBOSE( "getIDOfTypeName(" << typeName << ") no associated CLID found " );
   }
   return sc;
 }
 
-/// get id associated with type-info name (if any)
+
+/// get type name associated with clID (if any)
 StatusCode 
-ClassIDSvc::getIDOfTypeInfoName(const std::string& typeInfoName,
-				CLID& id) const {
-  maybeRescan();
+ClassIDSvc::getTypeNameOfIDInternal(const CLID& id, std::string& typeName) const
+{
   StatusCode sc(StatusCode::FAILURE);
-  NameMap::const_iterator iID = m_tiNameMap.find(typeInfoName);
-  if (iID != m_tiNameMap.end()) {
-    id = iID->second;
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE( "getIDOfTypeInfoName(" << typeInfoName << ") CLID is " << id);
-#endif			
+  CLIDMap::const_iterator iID = m_clidMap.find(id);
+  if (iID != m_clidMap.end()) {
+    typeName = iID->second.first;
+    ATH_CONST_MSG_VERBOSE( "getTypeNameOfID(" << id << ") type name is " <<
+                           typeName );
     sc = StatusCode::SUCCESS;
-  } else {
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE( "getIDOfTypeInfoName(" << typeInfoName << ") no associated CLID found ");
-#endif			
+  }
+  else {
+    ATH_CONST_MSG_VERBOSE( "getTypeNameOfID(" << id <<
+                           ") no associated type name found " );
   }
   return sc;
 }
 
-/// associate type name with clID
-StatusCode 
-ClassIDSvc::setTypePackageForID(const CLID& id, 
-				const std::string& typeName,
-				const Athena::PackageInfo& info,
-				const std::string& typeInfoName) {
-  if (id < CLIDRegistry::MINCLID || id > CLIDRegistry::MAXCLID) {
-    msg() << MSG::FATAL << "setTypeNameForID: input id " << id 
-	  << " is out of allowed range " << CLIDRegistry::MINCLID 
-	  << " : " << CLIDRegistry::MAXCLID << endmsg;
-    return StatusCode::FAILURE;
+
+StatusCode
+ClassIDSvc::fillDB() {
+  // Process the various clid dbs according to user's request
+  bool allOK(true);
+  for (const std::string& DBFile : m_DBFiles) {
+    DirSearchPath::path clidDB(DBFile.c_str());
+    const char* clidDBFileName(clidDB.c_str());
+    if (clidDB.is_complete()) {
+      allOK = processCLIDDB(clidDBFileName);
+    } else {
+      std::list<DirSearchPath::path> paths(m_clidDBPath.find_all(clidDBFileName));
+      if (paths.empty()) {
+	msg() << MSG::WARNING 
+	      << "Could not resolve clid DB path " << clidDBFileName 
+	      << " using DATAPATH [" << System::getEnv("DATAPATH") 
+	      << "] ----- SKIPPING" << endmsg;
+      } else {
+	std::list<DirSearchPath::path>::const_iterator p(paths.begin()), pe(paths.end());
+	while (p!=pe) allOK &= processCLIDDB((*p++).c_str());
+      }
+    }
   }
-  return uncheckedSetTypePackageForID(id, typeName, info, typeInfoName);
+  
+  maybeRescan(); //scan registry if we had no CLIDDB to process
+  return allOK ?  
+    StatusCode::SUCCESS :
+    StatusCode::FAILURE;
 }
 
-StatusCode 
-ClassIDSvc::uncheckedSetTypePackageForID(const CLID& id, 
-					 const std::string& typeName,
-					 const Athena::PackageInfo& info,
-					 const std::string& typeInfoName) {
-  StatusCode sc(StatusCode::SUCCESS);
-  //process "raw" typeName
-  string procName(typeName);
-  massage(procName);
-  //first the id->name map
-  string knownName("_____++++");
-  if (getTypeNameOfID(id, knownName).isSuccess() && procName != knownName) {
-    msg() << MSG::FATAL << "uncheckedSetTypePackageForID: " << info <<
-      " can not set type name <" << procName << "> for CLID " <<
-      id << ": Known name for this ID <" << knownName << '>';
-    Athena::PackageInfo existInfo;
-    if (getPackageInfoForID(id, existInfo).isSuccess()) {
-      msg() << MSG::FATAL 
-	    << " It was set by " << existInfo;
-    }
-    msg() << MSG::ERROR << endmsg;
-    sc = StatusCode::FAILURE;
-  } else if (procName == knownName) {
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE("uncheckedSetTypePackageForID: type name <" << procName <<
-		    "> already set for CLID " << id);
-    Athena::PackageInfo existInfo;
-    if (getPackageInfoForID(id, existInfo).isSuccess()) {
-      ATH_MSG_VERBOSE( " It was set by " << existInfo );
-    }
-#endif			
-  } 
-  if (!sc.isSuccess()) return StatusCode::FAILURE;
 
-  //now the name->id map
-  CLID knownID(0);
-  if (getIDOfTypeName(procName, knownID).isSuccess() && id != knownID) {
-    msg() << MSG::ERROR << "uncheckedSetTypePackageForID: " << info << 
-      " can not set CLID <" << id << "> for type name " <<
-      procName << ": Known CLID for this name <" << knownID << '>' ;
-    Athena::PackageInfo existInfo;
-    if (getPackageInfoForID(knownID, existInfo).isSuccess()) {
-      msg() << MSG::ERROR 
-	    << " It was set by " << existInfo; 
-    }
-    msg() << MSG::ERROR << endmsg;
-    sc = StatusCode::FAILURE;
-  } else if (id == knownID) {
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE( "uncheckedSetTypePackageForID: CLID <" << id <<
-		     "> already set for type name " << procName );
-    Athena::PackageInfo existInfo;
-    if (getPackageInfoForID(id, existInfo).isSuccess()) {
-      ATH_MSG_VERBOSE( " It was set by " << existInfo);
-    }
-#endif			
-  } 
-//   //finally the id->package map
-//   Athena::PackageInfo knownInfo;
-//   if (getPackageInfoForID(id, knownInfo).isSuccess() && info != knownInfo) {
-//     msg() << MSG::ERROR 
-// 	<< "uncheckedSetTypePackageForID: can not set package info <" << info
-// 	<< "> for CLID " << id
-// 	<< ": Known info for this CLID <" << knownInfo << '>' << endmsg;
-//     sc = StatusCode::FAILURE;
-//   } else if (info == knownInfo) {
-// #ifndef NDEBUG		
-//     msg() << MSG::VERBOSE
-// 	<< "uncheckedSetTypePackageForID: package info <" << info
-// 	<< "> already set for CLID " << id<< endmsg;
-// #endif			
-//   } else {
-    const std::string procTiName = typeInfoName.empty() 
-      ? procName
-      : typeInfoName;
-    m_clidMap[id] = std::make_pair(procName, procTiName);
-    m_nameMap[procName] = id;
-    // FIXME: should we also check for ti-name<=>clid duplicates ?
-    m_tiNameMap[procTiName] = id;
-    m_packageMap[id] = info;
-#ifndef NDEBUG		
-    ATH_MSG_VERBOSE("uncheckedSetTypePackageForID: set type name <" <<
-		    procName << "> for CLID " << id);
-#endif					
-    //  }
-  return sc;
-}
 bool
-ClassIDSvc::processCLIDDB(const char* fileName) {
+ClassIDSvc::processCLIDDB(const char* fileName)
+{
   maybeRescan();
   bool allOK(true);
   ifstream ifile(fileName);
   if (!ifile) {
     msg() << MSG::WARNING << "processCLIDDB: unable to open " << fileName <<endmsg;
   } else {
-#ifndef NDEBUG
     unsigned int newEntries(0);
-#endif
     string line;
     while (allOK && std::getline(ifile, line)) {
       //not yet if ("#" == line.substr(0,0)) continue; //skip comments
@@ -493,12 +485,10 @@ ClassIDSvc::processCLIDDB(const char* fileName) {
 					   typeName,
 					   info,
 					   typeInfoName).isSuccess()) {
-#ifndef	 NDEBUG
 	    ATH_MSG_VERBOSE( "processCLIDDB(" << fileName << 
 			     ")\n    added entry for CLID <" << id << 
 			     "> type name <" << typeName << '>' );
 	    ++newEntries;
-#endif	
 	  }
 	}
       }
@@ -507,10 +497,8 @@ ClassIDSvc::processCLIDDB(const char* fileName) {
       msg() << MSG::ERROR << "processCLIDDB: processing record " << line 
 	    << " 	from CLIDDB file: " << fileName << endmsg;
     } else {
-#ifndef NDEBUG
       ATH_MSG_DEBUG( "processCLIDDB: read " << newEntries << 
 		     " entries from CLIDDB file: " << fileName);
-#endif	
     }
     ifile.close();
   } //input file open
@@ -518,69 +506,127 @@ ClassIDSvc::processCLIDDB(const char* fileName) {
   return allOK;
 }
 
-void 
-ClassIDSvc::dump() const {
-  ATH_MSG_INFO("dump: in memory");
-  CLIDMap::const_iterator i(m_clidMap.begin()), iE(m_clidMap.end());
-  while (i != iE) {
-    const CLID clid = i->first;
-    const std::string& typeName = i->second.first;
-    msg() << MSG::INFO 
-	  << "CLID: "<< clid
-	  << " - type name: " << typeName;
-    Athena::PackageInfo info;
-    if (getPackageInfoForID(clid, info).isSuccess()) {
-      msg() << MSG::INFO 
-	    << "- Package "<< info; 
+
+bool ClassIDSvc::getRegistryEntries(const std::string& moduleName)
+{
+  //not only this is fast, but is necessary to prevent recursion
+  if (!CLIDRegistry::hasNewEntries()) return true;
+
+  bool allOK(true);
+  size_t nE = 0;
+  //to speed up processing we only take entries added to CLIDRegistry
+  //since last call (thanks Niels!)
+  for (const CLIDRegistry::tuple_t& ent : CLIDRegistry::newEntries()) {
+    const CLID& clid                   = std::get<0>(ent);
+    const std::string& typeName        = std::get<1>(ent);
+    const Athena::PackageInfo& pkgInfo = std::get<2>(ent);
+    const std::string& typeInfoName    = std::get<3>(ent);
+    ATH_MSG_VERBOSE(
+		    "reading [" 
+		    << clid << ", "
+		    << typeName << ", "
+		    << pkgInfo << ", "
+		    << typeInfoName << "]");
+    if (uncheckedSetTypePackageForID (clid,
+                                      typeName,
+                                      pkgInfo, 
+                                      typeInfoName).isSuccess())
+    {
+      ++nE;
+    }
+    else {
+      allOK = false;
     }
-    msg() << MSG::INFO << '\n';
-    ++i;
   }
-  ATH_MSG_INFO("------------------------------");
+  
+  if (allOK) {
+    ATH_MSG_INFO( " getRegistryEntries: read " << nE 
+		  << " CLIDRegistry entries for module " << moduleName );
+  } else {
+    ATH_MSG_ERROR(" getRegistryEntries: can not read  CLIDRegistry entries for module " 
+                  << moduleName);
+  }
+
+  return allOK;
 }
 
-StatusCode
-ClassIDSvc::fillDB() {
-  std::lock_guard<std::recursive_mutex> lock(m_regMutex);
-  // Process the various clid dbs according to user's request
-  vector< string >::const_iterator f(m_DBFiles.begin()), fE(m_DBFiles.end());
-  bool allOK(true);
-  while (f != fE) {
-#if BOOST_FILESYSTEM_VERSION == 3
-    DirSearchPath::path clidDB((*f++).c_str());
-    const char* clidDBFileName(clidDB.c_str());
-#else
-    DirSearchPath::path clidDB(*f++, boost::filesystem::no_check);
-    const char* clidDBFileName(clidDB.native_file_string().c_str());
-#endif
-    if (clidDB.is_complete()) {
-      allOK = processCLIDDB(clidDBFileName);
-    } else {
-      std::list<DirSearchPath::path> paths(m_clidDBPath.find_all(clidDBFileName));
-      if (paths.empty()) {
-	msg() << MSG::WARNING 
-	      << "Could not resolve clid DB path " << clidDBFileName 
-	      << " using DATAPATH [" << System::getEnv("DATAPATH") 
-	      << "] ----- SKIPPING" << endmsg;
-      } else {
-	std::list<DirSearchPath::path>::const_iterator p(paths.begin()), pe(paths.end());
-#if BOOST_FILESYSTEM_VERSION == 3
-	while (p!=pe) allOK &= processCLIDDB((*p++).c_str());
-#else
-	while (p!=pe) allOK &= processCLIDDB((*p++).native_file_string().c_str());
-#endif
+
+StatusCode 
+ClassIDSvc::uncheckedSetTypePackageForID(const CLID& id, 
+					 const std::string& typeName,
+					 const Athena::PackageInfo& info,
+					 const std::string& typeInfoName)
+{
+  StatusCode sc(StatusCode::SUCCESS);
+  //process "raw" typeName
+  string procName(typeName);
+  massage(procName);
+  //first the id->name map
+  string knownName("_____++++");
+  if (getTypeNameOfIDInternal(id, knownName).isSuccess() && procName != knownName) {
+    msg() << MSG::FATAL << "uncheckedSetTypePackageForID: " << info <<
+      " can not set type name <" << procName << "> for CLID " <<
+      id << ": Known name for this ID <" << knownName << '>';
+    Athena::PackageInfo existInfo;
+    if (getPackageInfoForIDInternal(id, existInfo).isSuccess()) {
+      msg() << MSG::FATAL 
+	    << " It was set by " << existInfo;
+    }
+    msg() << MSG::ERROR << endmsg;
+    sc = StatusCode::FAILURE;
+  } else if (procName == knownName) {
+    if (msg().level() <= MSG::VERBOSE) {
+      ATH_MSG_VERBOSE("uncheckedSetTypePackageForID: type name <" << procName <<
+                      "> already set for CLID " << id);
+      Athena::PackageInfo existInfo;
+      if (getPackageInfoForIDInternal(id, existInfo).isSuccess()) {
+        ATH_MSG_VERBOSE( " It was set by " << existInfo );
       }
     }
-  }
-  
-  maybeRescan(); //scan registry if we had no CLIDDB to process
-  return allOK ?  
-    StatusCode::SUCCESS :
-    StatusCode::FAILURE;
+  } 
+  if (!sc.isSuccess()) return StatusCode::FAILURE;
+
+  //now the name->id map
+  CLID knownID(0);
+  if (getIDOfTypeNameInternal(procName, knownID).isSuccess() && id != knownID) {
+    msg() << MSG::ERROR << "uncheckedSetTypePackageForID: " << info << 
+      " can not set CLID <" << id << "> for type name " <<
+      procName << ": Known CLID for this name <" << knownID << '>' ;
+    Athena::PackageInfo existInfo;
+    if (getPackageInfoForIDInternal(knownID, existInfo).isSuccess()) {
+      msg() << MSG::ERROR 
+	    << " It was set by " << existInfo; 
+    }
+    msg() << MSG::ERROR << endmsg;
+    sc = StatusCode::FAILURE;
+  } else if (id == knownID) {
+    if (msg().level() <= MSG::VERBOSE) {
+      ATH_MSG_VERBOSE( "uncheckedSetTypePackageForID: CLID <" << id <<
+                       "> already set for type name " << procName );
+      Athena::PackageInfo existInfo;
+      if (getPackageInfoForIDInternal(id, existInfo).isSuccess()) {
+        ATH_MSG_VERBOSE( " It was set by " << existInfo);
+      }
+    }
+  } 
+  const std::string procTiName = typeInfoName.empty() 
+    ? procName
+    : typeInfoName;
+  m_clidMap[id] = std::make_pair(procName, procTiName);
+  m_nameMap[procName] = id;
+  // FIXME: should we also check for ti-name<=>clid duplicates ?
+  m_tiNameMap[procTiName] = id;
+  m_packageMap[id] = info;
+  ATH_MSG_VERBOSE("uncheckedSetTypePackageForID: set type name <" <<
+                  procName << "> for CLID " << id);
+  return sc;
 }
 
-StatusCode
-ClassIDSvc::reinitialize() {
-  ATH_MSG_INFO("RE-initializing " << name() ) ;  
-  return fillDB();
+
+void ClassIDSvc::maybeRescan() const
+{
+  ClassIDSvc* nc ATLAS_THREAD_SAFE = const_cast<ClassIDSvc*>(this);
+  nc->getRegistryEntries ("ALL");
 }
+
+
diff --git a/Control/CLIDComps/src/ClassIDSvc.h b/Control/CLIDComps/src/ClassIDSvc.h
index bad879e5b8474023ee125a0cf62c55816c86e15e..8146aace1720373481dbf945e690b0ee48651cf8 100644
--- a/Control/CLIDComps/src/ClassIDSvc.h
+++ b/Control/CLIDComps/src/ClassIDSvc.h
@@ -13,7 +13,7 @@
  *$Id: ClassIDSvc.h,v 1.8 2009-01-15 19:08:43 binet Exp $
  */
 
-#include <map>
+#include <unordered_map>
 #include <mutex>
 #include <string>
 #include <vector>
@@ -25,7 +25,6 @@
 #include "GaudiKernel/DirSearchPath.h"
 
 #include "AthenaKernel/IClassIDSvc.h"
-#include "AthenaKernel/MsgStreamMember.h"
 
 #include "SGTools/CLIDRegistry.h"
 
@@ -43,51 +42,68 @@ template <class TYPE> class SvcFactory;
 
 class ClassIDSvc : virtual public IClassIDSvc, 
                    virtual public IIncidentListener, 
-                   public Service {
+                   public Service
+{
 private:
   typedef std::pair<std::string, std::string> TypeName; //typename+typeinfoname
-  typedef std::map<CLID, TypeName> CLIDMap; 
-  typedef std::map<std::string, CLID> NameMap; 
-  typedef std::map<CLID, Athena::PackageInfo> PackageMap; 
+  typedef std::unordered_map<CLID, TypeName> CLIDMap; 
+  typedef std::unordered_map<std::string, CLID> NameMap; 
+  typedef std::unordered_map<CLID, Athena::PackageInfo> PackageMap; 
+
 public:
+  // Locking convention: public methods (except for gaudi state-change methods)
+  // take the lock.  Protected/private methods do not take the lock.
+  // Public methods do not call each other.
+
+  //========================================================================
+  /** @name IClassIDSvc interfaces. */
+
   /// get next available CLID 
   /// @throws std::runtime_error if no CLID can be allocated  virtual CLID nextAvailableID() const;
-  CLID nextAvailableID() const;
+  virtual CLID nextAvailableID() const override;
   /// check if id is used
-  virtual bool isIDInUse(const CLID& id) const;
+  virtual bool isIDInUse(const CLID& id) const override;
   /// check if id is used
-  virtual bool isNameInUse(const std::string& name) const;
+  virtual bool isNameInUse(const std::string& name) const override;
   /// get type name associated with clID (if any)
-  virtual StatusCode getTypeNameOfID(const CLID& id, std::string& typeName) const ;
+  virtual StatusCode getTypeNameOfID(const CLID& id, std::string& typeName) const  override;
   /// get user assigned type-info name associated with clID
-  virtual StatusCode getTypeInfoNameOfID(const CLID& id, std::string& typeInfoName) const ;
-  /// get type name associated with clID (if any)
-  virtual StatusCode getPackageInfoForID(const CLID& id, Athena::PackageInfo& info) const ;
+  virtual StatusCode getTypeInfoNameOfID(const CLID& id, std::string& typeInfoName) const override;
   /// get id associated with type name (if any)
-  virtual StatusCode getIDOfTypeName(const std::string& typeName, CLID& id) const ;
+  virtual StatusCode getIDOfTypeName(const std::string& typeName, CLID& id) const  override;
   /// get id associated with type-info name (if any)
-  virtual StatusCode getIDOfTypeInfoName(const std::string& typeInfoName, CLID& id) const ;
+  virtual StatusCode getIDOfTypeInfoName(const std::string& typeInfoName, CLID& id) const override;
+  /// get type name associated with clID (if any)
+  virtual StatusCode getPackageInfoForID(const CLID& id, Athena::PackageInfo& info) const override;
   /// associate type name, package info and type-info name with clID
   virtual StatusCode setTypePackageForID(const CLID& id, 
 					 const std::string& typeName, 
 					 const Athena::PackageInfo& info,
-					 const std::string& typeInfoName);
+					 const std::string& typeInfoName) override;
+
+  //========================================================================
+  /** @name Debugging methods. */
 
   ///dump to MsgStream contents of in memory DB
   void dump() const;
 
+  
+  //========================================================================
+  /** @name Gaudi methods. */
+
   /// Gaudi Service Implementation
   //@{
-  virtual StatusCode initialize();
-  virtual StatusCode reinitialize();
+  virtual StatusCode initialize() override;
+  virtual StatusCode reinitialize() override;
   ///dump CLIDmap to outputFileName;
-  virtual StatusCode finalize(); 
-  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
+  virtual StatusCode finalize() override; 
+  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override;
   //@}
 
   ///implement IIncidentListener
-  void handle(const Incident &inc);
+  void handle(const Incident &inc) override;
 
+  
 protected:
   friend class SvcFactory<ClassIDSvc>;
 
@@ -98,7 +114,21 @@ protected:
   virtual ~ClassIDSvc() {};
 
 private:
-  MsgStream& msg() const { return m_msg.get(); }
+  MsgStream& msg() { return m_msg; }
+  const MsgStream& msg() const { return m_msg; }
+
+  // Return all registered IDs in sorted order.
+  std::vector<CLID> sortedIDs() const;
+
+  StatusCode
+  getPackageInfoForIDInternal(const CLID& id, Athena::PackageInfo& info) const;
+  /// get id associated with type name (if any)
+  StatusCode getIDOfTypeNameInternal(const std::string& typeName,
+                                     CLID& id) const;
+  /// get type name associated with clID (if any)
+  StatusCode getTypeNameOfIDInternal(const CLID& id,
+                                     std::string& typeName) const;
+
   /// get clids from CLIDDB and from registry entries
   StatusCode fillDB();
   /// load clid/names from a "db" file
@@ -107,7 +137,7 @@ private:
   bool getRegistryEntries(const std::string& moduleName);
 
   /// associate type name with clID w/o checking CLID range
-  virtual StatusCode 
+  StatusCode 
   uncheckedSetTypePackageForID(const CLID& id, 
 			       const std::string& typeName,
 			       const Athena::PackageInfo& info,
@@ -131,14 +161,14 @@ private:
   /// The path is which clid db files are to be searched (DATAPATH)
   DirSearchPath m_clidDBPath;
 
-  /// a local @c MsgStream -like object
-  mutable Athena::MsgStreamMember m_msg;
+  /// a local @c MsgStream object
+  MsgStream m_msg;
 
-  ///protect db failling
-  std::recursive_mutex m_regMutex;
+  // Mutex to protect internal structures.
+  typedef std::mutex mutex_t;
+  typedef std::lock_guard<mutex_t> lock_t;
+  mutable mutex_t m_mutex;
 };
 
-//<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
-//<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
 
 #endif // CLIDCOMPS_CLASSIDSVC_H
diff --git a/Control/CLIDComps/test/ClassIDSvc_test.cxx b/Control/CLIDComps/test/ClassIDSvc_test.cxx
index 31b421c1db05b2da82742762c6b7612c2bbdcc38..582ef5a5e15dc66c79b4065b59d3e7bf71745356 100644
--- a/Control/CLIDComps/test/ClassIDSvc_test.cxx
+++ b/Control/CLIDComps/test/ClassIDSvc_test.cxx
@@ -64,13 +64,13 @@ void basic_test(ISvcLocator* pSvcLoc) {
   assert((pSvcLoc->service("ClassIDSvc", pClassIDSvc, true)).isSuccess());
   assert(pClassIDSvc);
 
-  assert(pClassIDSvc->nextAvailableID() == CLIDRegistry::MINCLID);
+  assert(pClassIDSvc->nextAvailableID() == CLIDdetail::MINCLID);
   Athena::PackageInfo info(PACKAGE_VERSION);
   Athena::PackageInfo info2("APack-00-39-98");
   assert(pClassIDSvc->setTypePackageForID(7890, "Bla", info2).isSuccess());
-  ASSERTERROR(pClassIDSvc->setTypePackageForID(CLIDRegistry::MINCLID/2, "No", 
+  ASSERTERROR(pClassIDSvc->setTypePackageForID(CLIDdetail::MINCLID/2, "No", 
 					       info).isSuccess());
-  ASSERTERROR(pClassIDSvc->setTypePackageForID(CLIDRegistry::MAXCLID*2, "Nah", 
+  ASSERTERROR(pClassIDSvc->setTypePackageForID(CLIDdetail::MAXCLID*2, "Nah", 
 					       info).isSuccess());
   //FIXME is this an issue? Should we do the reverse check type -> id?
   assert(pClassIDSvc->setTypePackageForID(9942, "Bli", info).isSuccess());
diff --git a/Control/CLIDComps/test/_clid_unittest.py b/Control/CLIDComps/test/_clid_unittest.py
index 86f1383a99689db28c205cf5b44f045c40f60357..c17411ce8634ead07619432de435568f3b24b567 100755
--- a/Control/CLIDComps/test/_clid_unittest.py
+++ b/Control/CLIDComps/test/_clid_unittest.py
@@ -1,5 +1,4 @@
-exec python -tx "$0" "$@"
-
+#!/usr/bin/env python
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 ## @file clid_unittest.py
diff --git a/Control/CLIDSvc/cmt/requirements b/Control/CLIDSvc/cmt/requirements
deleted file mode 100755
index 0a1a84c5d665d00f4f34143e5d00bd6c92221ed8..0000000000000000000000000000000000000000
--- a/Control/CLIDSvc/cmt/requirements
+++ /dev/null
@@ -1,16 +0,0 @@
-package CLIDSvc
-
-author Paolo Calafiura   <Paolo.Calafiura@cern.ch>
-author Craig Tull        <cetull@lbl.gov>
-
-use AtlasPolicy    AtlasPolicy-*
-use SGTools	   SGTools-*	       Control
-use AtlasPython    AtlasPython-*       External  -no_auto_imports
-
-private
-use TestTools       TestTools-*          AtlasTest
-apply_pattern install_runtime
-
-
-macro_append DOXYGEN_INPUT " ../doc ../test ../share " 
-macro_append DOXYGEN_FILE_PATTERNS    " *.icc clid "
diff --git a/Control/CLIDSvc/doc/packagedoc.h b/Control/CLIDSvc/doc/packagedoc.h
index 90b307702ca36724f2b1edfedfffacda7187fc7d..8926d47adbe867347a93140633b54a36c0e104e3 100644
--- a/Control/CLIDSvc/doc/packagedoc.h
+++ b/Control/CLIDSvc/doc/packagedoc.h
@@ -34,7 +34,6 @@ a "gmake check" (after "source setup.sh").
  - clid_unittest.py
 
 
-@section CLIDSvc_requirements CMT requirements file
 
 
 @section CLIDSvc_Docs More Documentation
diff --git a/Control/CoWTools/cmt/requirements b/Control/CoWTools/cmt/requirements
deleted file mode 100644
index 83081133080a6f9cef7e089be650a48e82d9260e..0000000000000000000000000000000000000000
--- a/Control/CoWTools/cmt/requirements
+++ /dev/null
@@ -1,10 +0,0 @@
-package CoWTools
-
-author sami.kama@cern.ch
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface	GaudiInterface-*	External
-
-library CoWTools "../src/*.cxx"
-
-apply_pattern installed_library
diff --git a/Control/CxxUtils/CMakeLists.txt b/Control/CxxUtils/CMakeLists.txt
index 500ec4c2a79838e9256adf0703bbf873e42ab2e9..41e53b0fa491d35b875df2f92adeb2281790c760 100644
--- a/Control/CxxUtils/CMakeLists.txt
+++ b/Control/CxxUtils/CMakeLists.txt
@@ -66,6 +66,10 @@ atlas_add_test( stacktrace_test
    SOURCES test/stacktrace_test.cxx
    LINK_LIBRARIES CxxUtils dl )
 
+atlas_add_test( MD5_test
+   SOURCES test/MD5_test.cxx
+   LINK_LIBRARIES CxxUtils )
+
 atlas_add_test( bitscan_test_portable
    SOURCES test/bitscan_test.cxx
    LINK_LIBRARIES CxxUtils )
diff --git a/Trigger/TrigT1/L1Common/cmt/fragments/l1common_files b/Control/CxxUtils/CxxUtils/ATLAS_CHECK_THREAD_SAFETY
similarity index 100%
rename from Trigger/TrigT1/L1Common/cmt/fragments/l1common_files
rename to Control/CxxUtils/CxxUtils/ATLAS_CHECK_THREAD_SAFETY
diff --git a/Control/CxxUtils/CxxUtils/ClassName.h b/Control/CxxUtils/CxxUtils/ClassName.h
index 20d669e5e647646abc21c58355ccc673d420068e..717c8dcf19bf09b85f4aed536a66b8d65a1b96f4 100644
--- a/Control/CxxUtils/CxxUtils/ClassName.h
+++ b/Control/CxxUtils/CxxUtils/ClassName.h
@@ -247,6 +247,12 @@ public:
   void swap (ClassName& other);
 
 
+  /**
+   * @brief Get the const flag for this expression.
+   */
+  bool isConst() const;
+
+
   /**
    * @brief Set the const flag for this expression.
    */
@@ -432,6 +438,7 @@ private:
   /**
    * @brief Match this expression against a pattern.
    * @param pattern The pattern to match.
+   * @param topLevel True if this is the outermost level of matching.
    * @param[out] matches Dictionary of pattern substitutions.
    *
    * Return true if @c pattern matches the current expression.
@@ -439,7 +446,9 @@ private:
    * On a successful return, the map @c matches contains the
    * variable assignments needed for the match.
    */
-  bool match1 (const ClassName& pattern, match_t& matches) const;
+  bool match1 (const ClassName& pattern,
+               bool topLevel,
+               match_t& matches) const;
 
 
   /**
diff --git a/Control/CxxUtils/CxxUtils/MD5.h b/Control/CxxUtils/CxxUtils/MD5.h
index b567312463b6f5636615247998ad63aaa8936bcd..d9fb1acc1c0573313d5557ebcbb76e8fe8e6c3c0 100644
--- a/Control/CxxUtils/CxxUtils/MD5.h
+++ b/Control/CxxUtils/CxxUtils/MD5.h
@@ -1,152 +1,49 @@
+/**
+ * @file CxxUtils/MD5.h
+ * @author scott snyder <snyder@bnl.gov>, from public domain code.
+ * @date Aug 2017
+ * @brief solar's public-domain MD5, wrapped for C++.
+ */
 
-#ifndef CXXUTILS_MD5_H
-#define CXXUTILS_MD5_H 1
-
-// MD5.CC - source code for the C++/object oriented translation and 
-//          modification of MD5.
-
-// Translation and modification (c) 1995 by Mordechai T. Abzug 
-
-// This translation/ modification is provided "as is," without express or 
-// implied warranty of any kind.
-
-// The translator/ modifier does not claim (1) that MD5 will do what you think 
-// it does; (2) that this translation/ modification is accurate; or (3) that 
-// this software is "merchantible."  (Language for this disclaimer partially 
-// copied from the disclaimer below).
-
-/* based on:
 
-   MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
-   MDDRIVER.C - test driver for MD2, MD4 and MD5
-
-
-   Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
-rights reserved.
-
-License to copy and use this software is granted provided that it
-is identified as the "RSA Data Security, Inc. MD5 Message-Digest
-Algorithm" in all material mentioning or referencing this software
-or this function.
-
-License is also granted to make and use derivative works provided
-that such works are identified as "derived from the RSA Data
-Security, Inc. MD5 Message-Digest Algorithm" in all material
-mentioning or referencing the derived work.
-
-RSA Data Security, Inc. makes no representations concerning either
-the merchantability of this software or the suitability of this
-software for any particular purpose. It is provided "as is"
-without express or implied warranty of any kind.
+#ifndef CXXUTILS_MD5_H
+#define CXXUTILS_MD5_H
 
-These notices must be retained in any copies of any part of this
-documentation and/or software.
 
-*/
 #include <string>
-
-// Constants for MD5Transform routine.
-// Although we could use C++ style constants, defines are actually better,
-// since they let us easily evade scope clashes.
-#define S11 7
-#define S12 12
-#define S13 17
-#define S14 22
-#define S21 5
-#define S22 9
-#define S23 14
-#define S24 20
-#define S31 4
-#define S32 11
-#define S33 16
-#define S34 23
-#define S41 6
-#define S42 10
-#define S43 15
-#define S44 21
-
-class MD5 {
-  public:
-    MD5              (const unsigned char* buffer, unsigned long len);
-    MD5              ();  
-    void  update     (const unsigned char *input, unsigned int input_length);
-    // Finalize MD5 check-sum
-    void  finalize   ();
-
-
-    void raw_digest (unsigned char *buff) const;
-
-    std::string       hex_digest () const;
-
-  private:
-    // next, the private data:
-    unsigned int m_state[4];
-    unsigned int m_count[2];     // number of *bits*, mod 2^64
-    unsigned char m_buffer[64];   // input buffer
-    unsigned char m_digest[16];
-    unsigned char m_finalized;
-
-    // last, the private methods, mostly static:
-    void init             ();               // called by all constructors
-    void transform        (const unsigned char *buffer);  // does the real update work.  Note 
-                                            // that length is implied to be 64.
-
-    static void encode    (unsigned char *dest, const unsigned int *src, unsigned int length);
-    static void decode    (unsigned int *dest, const unsigned char *src, unsigned int length);
-
-    // ROTATE_LEFT rotates x left n bits.
-    static inline unsigned int  rotate_left (unsigned int x, unsigned int n)
-    {  return (x << n) | (x >> (32-n));                             }
-    // F, G, H and I are basic MD5 functions.
-    static inline unsigned int  F(unsigned int x, unsigned int y, unsigned int z)
-    {  return (x & y) | (~x & z);                                   }
-    static inline unsigned int  G(unsigned int x, unsigned int y, unsigned int z)
-    {  return (x & z) | (y & ~z);                                   }
-    static inline unsigned int  H(unsigned int x, unsigned int y, unsigned int z)
-    {  return x ^ y ^ z;                                            }
-    static inline unsigned int  I(unsigned int x, unsigned int y, unsigned int z)
-    {  return y ^ (x | ~z);                                         }
-
-    // FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
-    // Rotation is separate from addition to prevent recomputation.
-    static inline void   FF  (unsigned int& a, unsigned int b, unsigned int c, unsigned int d, unsigned int x, unsigned int s, unsigned int ac)
-    {
-     a += F(b, c, d) + x + ac;
-     a = rotate_left(a, s) + b;
-    }
-    static inline void   GG  (unsigned int& a, unsigned int b, unsigned int c, unsigned int d, unsigned int x, unsigned int s, unsigned int ac)
-    {
-     a += G(b, c, d) + x + ac;
-     a = rotate_left(a, s) + b;
-    }
-    static inline void   HH  (unsigned int& a, unsigned int b, unsigned int c, unsigned int d, unsigned int x, unsigned int s, unsigned int ac)
-    {
-     a += H(b, c, d) + x + ac;
-     a = rotate_left(a, s) + b;
-    }
-    static inline void   II  (unsigned int& a, unsigned int b, unsigned int c, unsigned int d, unsigned int x, unsigned int s, unsigned int ac)
-    {
-     a += I(b, c, d) + x + ac;
-     a = rotate_left(a, s) + b;
-    }
+#include <cstdlib>
+#include <cstdint>
+#include <uuid/uuid.h>
+
+
+class MD5
+{
+public:
+  MD5 (const unsigned char* buffer, unsigned long len);
+  MD5 (const char* buffer, size_t len);
+  MD5 (const std::string& buffer);
+  void raw_digest (unsigned char* s) const; // 16-byte buffer
+  void uuid_digest (uuid_t& uuid) const;
+  std::string hex_digest() const;
+
+private:
+  typedef uint32_t MD5_u32plus;
+  struct Context {
+    MD5_u32plus lo, hi;
+    MD5_u32plus a, b, c, d;
+    unsigned char buffer[64];
+    MD5_u32plus block[16];
+  };
+
+  Context m_ctx;
+  unsigned char m_digest[16];
+
+  void init();
+  void update (const void* data, size_t size);
+  void digest (unsigned char* result);
+
+  const void* body (const void* data, size_t size);
 };
 
-struct MD5_digest {
-  unsigned long long val[2];
-  
-  MD5_digest() {};    
-  MD5_digest( const std::string& msg ) {
-    MD5 checkSum( (unsigned char*)(msg.c_str()), msg.length());
-    checkSum.raw_digest( (unsigned char*) &val );
-  }
-  
-  bool operator< (const MD5_digest& rhs) const {
-    if (val[0] == rhs.val[0]) {
-      return (val[1] < rhs.val[1]);
-    } else {
-      return (val[0] < rhs.val[0]);
-    }
-  }
-};
 
-#endif
+#endif // not CXXUTILS_MD5_H
diff --git a/Control/CxxUtils/Root/ClassName.cxx b/Control/CxxUtils/Root/ClassName.cxx
index 674e94c65cc4c3aaf1f7606f51a976365cad6cdd..e13a7e89f78b824b636d228e0595dbddf57e2a44 100644
--- a/Control/CxxUtils/Root/ClassName.cxx
+++ b/Control/CxxUtils/Root/ClassName.cxx
@@ -108,7 +108,11 @@ bool ClassName::Rules::applyTo (ClassName& cn) const
   while (it != m_rules.end() && it->first == cn.name()) {
     ClassName::match_t matches;
     if (cn.match (it->second.first, matches)) {
+      bool const_save = cn.isConst();
       cn = it->second.second.substCopy (matches);
+      if (const_save) {
+        cn.setConst();
+      }
       ret = true;
     }
     ++it;
@@ -204,6 +208,15 @@ void ClassName::swap (ClassName& other)
 }
 
 
+/**
+ * @brief Get the const flag for this expression.
+ */
+bool ClassName::isConst() const
+{
+  return m_const;
+}
+
+
 /**
  * @brief Set the const flag for this expression.
  */
@@ -312,7 +325,7 @@ bool ClassName::operator!= (const ClassName& other) const
 bool ClassName::match (const ClassName& pattern, match_t& matches) const
 {
   matches.clear();
-  return match1 (pattern, matches);
+  return match1 (pattern, true, matches);
 }
 
 
@@ -439,7 +452,7 @@ void ClassName::parse (const std::string& name, std::string::size_type& pos)
       break;
   }
   skipSpaces (name, pos);
-  if (name.substr (pos, pos+5) == "const") {
+  if (name.substr (pos, 5) == "const") {
     m_const = true;
     pos += 5;
   }
@@ -501,6 +514,10 @@ void ClassName::parseNamespace (const std::string& name,
 
   ClassName ns (name, pos);
   ns.swap (*this);
+  if (ns.isConst()) {
+    this->setConst();
+    ns.m_const = false;
+  }
   ClassName* p = this;
   while (p->m_namespace.size() > 0)
     p = &p->m_namespace[0];
@@ -570,6 +587,7 @@ void ClassName::skipSpaces (const std::string& name,
 /**
  * @brief Match this expression against a pattern.
  * @param pattern The pattern to match.
+ * @param topLevel True if this is the outermost level of matching.
  * @param[out] matches Dictionary of pattern substitutions.
  *
  * Return true if @c pattern matches the current expression.
@@ -577,7 +595,9 @@ void ClassName::skipSpaces (const std::string& name,
  * On a successful return, the map @c matches contains the
  * variable assignments needed for the match.
  */
-bool ClassName::match1 (const ClassName& pattern, match_t& matches) const
+bool ClassName::match1 (const ClassName& pattern,
+                        bool topLevel,
+                        match_t& matches) const
 {
   if (pattern.m_name[0] == '$') {
     std::string var = pattern.m_name.substr (1, std::string::npos);
@@ -601,8 +621,17 @@ bool ClassName::match1 (const ClassName& pattern, match_t& matches) const
     return true;
   }
 
-  if (m_const != pattern.m_const)
+  // Require that const qualifiers match.
+  // However, if this is the top level, we allow a pattern with no explicit
+  // const to match something that is const.  Otherwise, we'd need to repeat
+  // all patterns for the const case.
+  if (topLevel) {
+    if (pattern.m_const && !m_const)
+      return false;
+  }
+  else if (m_const != pattern.m_const) {
     return false;
+  }
 
   if (m_name != pattern.m_name)
     return false;
@@ -614,12 +643,12 @@ bool ClassName::match1 (const ClassName& pattern, match_t& matches) const
     return false;
 
   if (m_namespace.size() > 0) {
-    if (!m_namespace[0].match1 (pattern.m_namespace[0], matches))
+    if (!m_namespace[0].match1 (pattern.m_namespace[0], false, matches))
       return false;
   }
 
   for (size_t i = 0; i < m_targs.size(); i++) {
-    if (!m_targs[i].match1 (pattern.m_targs[i], matches))
+    if (!m_targs[i].match1 (pattern.m_targs[i], false, matches))
       return false;
   }
 
diff --git a/Control/CxxUtils/Root/MD5.cxx b/Control/CxxUtils/Root/MD5.cxx
index 35778403e87cd92739bb1faa26e68f63bc42c30c..9761f8fab98ce4f64958c7467e6c9abc680ddc63 100644
--- a/Control/CxxUtils/Root/MD5.cxx
+++ b/Control/CxxUtils/Root/MD5.cxx
@@ -1,226 +1,354 @@
+// $Id$
+/**
+ * @file CxxUtils/Root/MD5.cxx
+ * @author scott snyder <snyder@bnl.gov>, from public domain code.
+ * @date Aug 2017
+ * @brief solar's public-domain MD5, wrapped for C++.
+ */
+
+
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
+ * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
+ * MD5 Message-Digest Algorithm (RFC 1321).
+ *
+ * Homepage:
+ * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
+ *
+ * Author:
+ * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
+ *
+ * This software was written by Alexander Peslyak in 2001.  No copyright is
+ * claimed, and the software is hereby placed in the public domain.
+ * In case this attempt to disclaim copyright and place the software in the
+ * public domain is deemed null and void, then the software is
+ * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
+ * general public under the following terms:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted.
+ *
+ * There's ABSOLUTELY NO WARRANTY, express or implied.
+ *
+ * (This is a heavily cut-down "BSD license".)
+ *
+ * This differs from Colin Plumb's older public domain implementation in that
+ * no exactly 32-bit integer data type is required (any 32-bit or wider
+ * unsigned integer data type will do), there's no compile-time endianness
+ * configuration, and the function prototypes match OpenSSL's.  No code from
+ * Colin Plumb's implementation has been reused; this comment merely compares
+ * the properties of the two independent implementations.
+ *
+ * The primary goals of this implementation are portability and ease of use.
+ * It is meant to be fast, but not as fast as possible.  Some known
+ * optimizations are not included to reduce source code size and avoid
+ * compile-time configuration.
+ */
 
+//#ifndef HAVE_OPENSSL
+
+#include <string.h>
 
 #include "CxxUtils/MD5.h"
 
-#include <cassert>
-#include <string>
-#include <cstdio>
-#include <iostream>
-#include <string.h>
+// C++ wrapper functions.
+
 
-// MD5 simple initialization method
-MD5::MD5()    {
+MD5::MD5 (const unsigned char* buffer, unsigned long len)
+{
   init();
-  memset (m_buffer, 0, sizeof(m_buffer));
-  memset (m_digest, 0, sizeof(m_digest));
+  update (buffer, len);
+  digest (m_digest);
 }
 
-// MD5 simple initialization method
-MD5::MD5(const unsigned char* buffer, unsigned long len)    {
+
+MD5::MD5 (const char* buffer, size_t len)
+{
   init();
-  update(buffer, len);
-  finalize();
+  update (buffer, len);
+  digest (m_digest);
 }
 
-// MD5 block update operation. Continues an MD5 message-digest
-// operation, processing another message block, and updating the
-// context.
-void MD5::update (const unsigned char *input, unsigned int input_length) {
-  unsigned int idx, index, space;
-  if ( m_finalized ) {  // so we can't update!
-    std::cerr << "MD5::update:  Can't update a finalized digest!" << std::endl;
-    return;
-  }
-  // Compute number of bytes mod 64
-  index = (unsigned int)((m_count[0] >> 3) & 0x3F);
-  // Update number of bits
-  if (  (m_count[0] += ((unsigned int) input_length << 3))<((unsigned int) input_length << 3) )
-    m_count[1]++;
-
-  m_count[1] += ((unsigned int)input_length >> 29);
-  space = 64 - index;  // how much space is left in buffer
-  // Transform as many times as possible.
-  if (input_length >= space) { // ie. we have enough to fill the buffer
-    // fill the rest of the buffer and transform
-    memcpy (m_buffer + index, input, space);
-    transform (m_buffer);
-    // now, transform each 64-byte piece of the input, bypassing the buffer
-    for (idx = space; idx + 63 < input_length; idx += 64)
-      transform (input+idx);
-
-    index = 0;  // so we can buffer remaining
-  }
-  else  {
-    idx = 0;    // so we can buffer the whole input
-  }
 
-  // and here we do the buffering:
-  memcpy(m_buffer+index, input+idx, input_length-idx);
+MD5::MD5 (const std::string& s)
+{
+  init();
+  update (s.c_str(), s.size());
+  digest (m_digest);
 }
 
-// MD5 finalization. Ends an MD5 message-digest operation, writing the
-// the message digest and zeroizing the context.
-void MD5::finalize ()     {
-  unsigned char bits[8];
-  unsigned int index, padLen;
-  static const unsigned char PADDING[64]={
-    0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-    };
-  if (m_finalized){
-    std::cerr << "MD5::finalize:  Already finalized this digest!" << std::endl;
-    return;
-  }
-  // Save number of bits
-  encode (bits, m_count, 8);
-  // Pad out to 56 mod 64.
-  index = (unsigned int) ((m_count[0] >> 3) & 0x3f);
-  padLen = (index < 56) ? (56 - index) : (120 - index);
-  update (PADDING, padLen);
-  // Append length (before padding)
-  update (bits, 8);
-  // Store state in digest
-  encode (m_digest, m_state, 16);
-  // Zeroize sensitive information
-  memset (m_buffer, 0, sizeof(*m_buffer));
-  m_finalized=1;
+
+void MD5::raw_digest (unsigned char* s) const
+{
+  memcpy (s, m_digest, 16);
 }
 
-void MD5::raw_digest(unsigned char *s) const {
-  if (m_finalized){
-    memcpy(s, m_digest, 16);
-    return;
-  }
-  std::cerr << "MD5::raw_digest:  Can't get digest if you haven't "<<
-    "finalized the digest!" << std::endl;
+
+void MD5::uuid_digest (uuid_t& uuid) const
+{
+  memcpy (&uuid, m_digest, 16);
 }
 
-std::string MD5::hex_digest() const  {
+
+std::string MD5::hex_digest() const
+{
   char s[33];
-  if (!m_finalized){
-    std::cerr << "MD5::hex_digest:  Can't get digest if you haven't "<<
-      "finalized the digest!" <<std::endl;
-    return "";
+  for (int i = 0; i < 16; i++) {
+    snprintf (s+i*2, 3, "%02x", m_digest[i]);
   }
-  for (int i=0; i<16; i++)
-    sprintf(s+i*2, "%02x", m_digest[i]);
-  s[32]='\0';
+  s[32] = '\0';
   return s;
 }
 
-// PRIVATE METHODS:
-void MD5::init(){
-  m_finalized=0;  // we just started!
-  // Nothing counted, so count=0
-  m_count[0] = 0;
-  m_count[1] = 0;
-  // Load magic initialization constants.
-  m_state[0] = 0x67452301;
-  m_state[1] = 0xefcdab89;
-  m_state[2] = 0x98badcfe;
-  m_state[3] = 0x10325476;
+
+/*
+ * The basic MD5 functions.
+ *
+ * F and G are optimized compared to their RFC 1321 definitions for
+ * architectures that lack an AND-NOT instruction, just like in Colin Plumb's
+ * implementation.
+ */
+#define F(x, y, z)			((z) ^ ((x) & ((y) ^ (z))))
+#define G(x, y, z)			((y) ^ ((z) & ((x) ^ (y))))
+#define H(x, y, z)			(((x) ^ (y)) ^ (z))
+#define H2(x, y, z)			((x) ^ ((y) ^ (z)))
+#define I(x, y, z)			((y) ^ ((x) | ~(z)))
+
+/*
+ * The MD5 transformation for all four rounds.
+ */
+#define STEP(f, a, b, c, d, x, t, s) \
+	(a) += f((b), (c), (d)) + (x) + (t); \
+	(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
+	(a) += (b);
+
+/*
+ * SET reads 4 input bytes in little-endian byte order and stores them in a
+ * properly aligned word in host byte order.
+ *
+ * The check for little-endian architectures that tolerate unaligned memory
+ * accesses is just an optimization.  Nothing will break if it fails to detect
+ * a suitable architecture.
+ *
+ * Unfortunately, this optimization may be a C strict aliasing rules violation
+ * if the caller's data buffer has effective type that cannot be aliased by
+ * MD5_u32plus.  In practice, this problem may occur if these MD5 routines are
+ * inlined into a calling function, or with future and dangerously advanced
+ * link-time optimizations.  For the time being, keeping these MD5 routines in
+ * their own translation unit avoids the problem.
+ */
+#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
+#define SET(n) \
+	(*(MD5_u32plus *)&ptr[(n) * 4])
+#define GET(n) \
+	SET(n)
+#else
+#define SET(n) \
+	(ctx->block[(n)] = \
+	(MD5_u32plus)ptr[(n) * 4] | \
+	((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
+	((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
+	((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
+#define GET(n) \
+	(ctx->block[(n)])
+#endif
+
+/*
+ * This processes one or more 64-byte data blocks, but does NOT update the bit
+ * counters.  There are no alignment requirements.
+ */
+const void* MD5::body (const void *data, size_t size)
+{
+	const unsigned char *ptr;
+	MD5_u32plus a, b, c, d;
+	MD5_u32plus saved_a, saved_b, saved_c, saved_d;
+        Context* ctx = &m_ctx;
+
+	ptr = (const unsigned char *)data;
+
+	a = ctx->a;
+	b = ctx->b;
+	c = ctx->c;
+	d = ctx->d;
+
+	do {
+		saved_a = a;
+		saved_b = b;
+		saved_c = c;
+		saved_d = d;
+
+/* Round 1 */
+		STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
+		STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)
+		STEP(F, c, d, a, b, SET(2), 0x242070db, 17)
+		STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)
+		STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)
+		STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)
+		STEP(F, c, d, a, b, SET(6), 0xa8304613, 17)
+		STEP(F, b, c, d, a, SET(7), 0xfd469501, 22)
+		STEP(F, a, b, c, d, SET(8), 0x698098d8, 7)
+		STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)
+		STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)
+		STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)
+		STEP(F, a, b, c, d, SET(12), 0x6b901122, 7)
+		STEP(F, d, a, b, c, SET(13), 0xfd987193, 12)
+		STEP(F, c, d, a, b, SET(14), 0xa679438e, 17)
+		STEP(F, b, c, d, a, SET(15), 0x49b40821, 22)
+
+/* Round 2 */
+		STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)
+		STEP(G, d, a, b, c, GET(6), 0xc040b340, 9)
+		STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)
+		STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)
+		STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)
+		STEP(G, d, a, b, c, GET(10), 0x02441453, 9)
+		STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)
+		STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)
+		STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)
+		STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)
+		STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)
+		STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)
+		STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)
+		STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)
+		STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)
+		STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)
+
+/* Round 3 */
+		STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)
+		STEP(H2, d, a, b, c, GET(8), 0x8771f681, 11)
+		STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16)
+		STEP(H2, b, c, d, a, GET(14), 0xfde5380c, 23)
+		STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4)
+		STEP(H2, d, a, b, c, GET(4), 0x4bdecfa9, 11)
+		STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16)
+		STEP(H2, b, c, d, a, GET(10), 0xbebfbc70, 23)
+		STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4)
+		STEP(H2, d, a, b, c, GET(0), 0xeaa127fa, 11)
+		STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16)
+		STEP(H2, b, c, d, a, GET(6), 0x04881d05, 23)
+		STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4)
+		STEP(H2, d, a, b, c, GET(12), 0xe6db99e5, 11)
+		STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16)
+		STEP(H2, b, c, d, a, GET(2), 0xc4ac5665, 23)
+
+/* Round 4 */
+		STEP(I, a, b, c, d, GET(0), 0xf4292244, 6)
+		STEP(I, d, a, b, c, GET(7), 0x432aff97, 10)
+		STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15)
+		STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21)
+		STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6)
+		STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10)
+		STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15)
+		STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21)
+		STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6)
+		STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10)
+		STEP(I, c, d, a, b, GET(6), 0xa3014314, 15)
+		STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21)
+		STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6)
+		STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10)
+		STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15)
+		STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21)
+
+		a += saved_a;
+		b += saved_b;
+		c += saved_c;
+		d += saved_d;
+
+		ptr += 64;
+	} while (size -= 64);
+
+	ctx->a = a;
+	ctx->b = b;
+	ctx->c = c;
+	ctx->d = d;
+
+	return ptr;
 }
 
-// MD5 basic transformation. Transforms state based on block.
-void MD5::transform (const unsigned char* block){
-  unsigned int a = m_state[0], b = m_state[1], c = m_state[2], d = m_state[3], x[16];
-  decode (x, block, 64);
-  assert(!m_finalized);  // not just a user error, since the method is private
-  /* Round 1                                     */
-  FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1  */
-  FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2  */
-  FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3  */
-  FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4  */
-  FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5  */
-  FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6  */
-  FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7  */
-  FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8  */
-  FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9  */
-  FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
-  FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
-  FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
-  FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
-  FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
-  FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
-  FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
-  /* Round 2                                     */
-  GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
-  GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
-  GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
-  GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
-  GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
-  GG (d, a, b, c, x[10], S22,  0x2441453); /* 22 */
-  GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
-  GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
-  GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
-  GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
-  GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
-  GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
-  GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
-  GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
-  GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
-  GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
-  /* Round 3                                     */
-  HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
-  HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
-  HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
-  HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
-  HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
-  HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
-  HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
-  HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
-  HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
-  HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
-  HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
-  HH (b, c, d, a, x[ 6], S34,  0x4881d05); /* 44 */
-  HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
-  HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
-  HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
-  HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
-  /* Round 4                                     */
-  II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
-  II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
-  II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
-  II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
-  II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
-  II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
-  II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
-  II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
-  II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
-  II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
-  II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
-  II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
-  II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
-  II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
-  II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
-  II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
-  m_state[0] += a;
-  m_state[1] += b;
-  m_state[2] += c;
-  m_state[3] += d;
-  // Zeroize sensitive information.
-  memset ( (unsigned char *) x, 0, sizeof(x));
+void MD5::init()
+{
+        Context* ctx = &m_ctx;
+	ctx->a = 0x67452301;
+	ctx->b = 0xefcdab89;
+	ctx->c = 0x98badcfe;
+	ctx->d = 0x10325476;
+
+	ctx->lo = 0;
+	ctx->hi = 0;
 }
 
-// Encodes input (unsigned int) into output (unsigned char). Assumes len is
-// a multiple of 4.
-void MD5::encode (unsigned char *output, const unsigned int *input, unsigned int len) {
-  for (unsigned int i = 0, j = 0; j < len; i++, j += 4) {
-    output[j]   = (unsigned char)  (input[i] & 0xff);
-    output[j+1] = (unsigned char) ((input[i] >> 8) & 0xff);
-    output[j+2] = (unsigned char) ((input[i] >> 16) & 0xff);
-    output[j+3] = (unsigned char) ((input[i] >> 24) & 0xff);
-  }
+void MD5::update (const void *data, size_t size)
+{
+	MD5_u32plus saved_lo;
+	unsigned long used, available;
+        Context* ctx = &m_ctx;
+
+	saved_lo = ctx->lo;
+	if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
+		ctx->hi++;
+	ctx->hi += size >> 29;
+
+	used = saved_lo & 0x3f;
+
+	if (used) {
+		available = 64 - used;
+
+		if (size < available) {
+			memcpy(&ctx->buffer[used], data, size);
+			return;
+		}
+
+		memcpy(&ctx->buffer[used], data, available);
+		data = (const unsigned char *)data + available;
+		size -= available;
+		body(ctx->buffer, 64);
+	}
+
+	if (size >= 64) {
+		data = body(data, size & ~(unsigned long)0x3f);
+		size &= 0x3f;
+	}
+
+	memcpy(ctx->buffer, data, size);
 }
 
-// Decodes input (unsigned char) into output (unsigned int). Assumes len is
-// a multiple of 4.
-void MD5::decode (unsigned int *output, const unsigned char *input, unsigned int len){
-  for (unsigned int i = 0, j = 0; j < len; i++, j += 4)
-    output[i] = ((unsigned int)input[j]) | (((unsigned int)input[j+1]) << 8) |
-      (((unsigned int)input[j+2]) << 16) | (((unsigned int)input[j+3]) << 24);
+#define OUT(dst, src) \
+	(dst)[0] = (unsigned char)(src); \
+	(dst)[1] = (unsigned char)((src) >> 8); \
+	(dst)[2] = (unsigned char)((src) >> 16); \
+	(dst)[3] = (unsigned char)((src) >> 24);
+
+void MD5::digest (unsigned char *result)
+{
+	unsigned long used, available;
+        Context* ctx = &m_ctx;
+
+	used = ctx->lo & 0x3f;
+
+	ctx->buffer[used++] = 0x80;
+
+	available = 64 - used;
+
+	if (available < 8) {
+		memset(&ctx->buffer[used], 0, available);
+		body(ctx->buffer, 64);
+		used = 0;
+		available = 64;
+	}
+
+	memset(&ctx->buffer[used], 0, available - 8);
+
+	ctx->lo <<= 3;
+	OUT(&ctx->buffer[56], ctx->lo)
+	OUT(&ctx->buffer[60], ctx->hi)
+
+	body(ctx->buffer, 64);
+
+	OUT(&result[0], ctx->a)
+	OUT(&result[4], ctx->b)
+	OUT(&result[8], ctx->c)
+	OUT(&result[12], ctx->d)
+
+	memset(ctx, 0, sizeof(*ctx));
 }
+
+//#endif
diff --git a/Control/CxxUtils/Root/StrFormat.cxx b/Control/CxxUtils/Root/StrFormat.cxx
index a59f8e3ab2787da9c885cb3c4ac019ea1a596472..4d453272d1aaeff08bcfbd2d8af0ca3bb2821d53 100644
--- a/Control/CxxUtils/Root/StrFormat.cxx
+++ b/Control/CxxUtils/Root/StrFormat.cxx
@@ -34,6 +34,9 @@ namespace {
     {
       free(m_buf);
     }
+
+    CharLiberator (const CharLiberator&) = delete;
+    CharLiberator& operator= (const CharLiberator&) = delete;
   };
 
 }
diff --git a/Control/CxxUtils/cmt/Makefile.RootCore b/Control/CxxUtils/cmt/Makefile.RootCore
deleted file mode 100644
index 022bee9b04a3ed721b75451add379f16b970d79d..0000000000000000000000000000000000000000
--- a/Control/CxxUtils/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,24 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = CxxUtils
-PACKAGE_PRELOAD  = boost_system boost_regex
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = -DXAOD_STANDALONE -DXAOD_ANALYSIS
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = Asg_Boost TestTools
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 0
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Control/CxxUtils/cmt/requirements b/Control/CxxUtils/cmt/requirements
deleted file mode 100644
index e0ab4d6e8a3589900b860809c2b0ece20835f19b..0000000000000000000000000000000000000000
--- a/Control/CxxUtils/cmt/requirements
+++ /dev/null
@@ -1,83 +0,0 @@
-## Automatically generated CMT requirements file
-package CxxUtils
-author  Sebastien Binet <binet@cern.ch>
-author  Scott Snyder    <snyder@fnal.gov>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## Put here your package dependencies...
-use AtlasBoost	 	AtlasBoost-*		External 
-##
-
-# Specify required Boost components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(Boost COMPONENTS program_options regex)"
-
-branches CxxUtils src doc share
-
-# The following is a hack for MacOSX since I can't make it resolve the symbols at runtime in
-# the separate library, even though everything appears to be setup correctly.
-macro CxxUtils_AthDsoCbk "" target-darwin "AthDsoCbk.c"
-library CxxUtils ../Root/*.cxx $(CxxUtils_AthDsoCbk) 
-
-apply_pattern installed_library
-
-private
-
-library exctrace_collector exctrace/exctrace_collector.cxx
-apply_pattern named_installed_library library=exctrace_collector
-macro_remove CxxUtils_linkopts "-lexctrace_collector"
-
-library calg libcalg/*.c
-apply_pattern named_installed_library library=calg
-macro_remove CxxUtils_linkopts "-lcalg"
-
-## for logging dlopen calls
-library AthDSoCallBacks AthDsoCbk.c
-apply_pattern named_installed_library library=AthDSoCallBacks
-macro_append AthDSoCallBacks_dependencies " calg "
-macro_append AthDSoCallBacks_use_linkopts " -lpthread -lcalg "
-macro_remove CxxUtils_linkopts "-lAthDSoCallBacks"
-
-## unit tests
-
-use TestTools	   TestTools-*         AtlasTest
-
-apply_pattern UnitTest_run unit_test=read_athena_statm \
-   extrapatterns="read_athena_statm reports process size"
-
-apply_pattern UnitTest_run unit_test=PageAccessControl
-apply_pattern UnitTest_run unit_test=SEGVHandler \
-   extrapatterns="page fault|FIXME NOT Freeing memory"
-apply_pattern UnitTest_run unit_test=hashtable
-apply_pattern UnitTest_run unit_test=fpcompare
-apply_pattern UnitTest_run unit_test=procmaps
-apply_pattern UnitTest_run unit_test=sincos
-apply_pattern UnitTest_run unit_test=copyif
-apply_pattern UnitTest_run unit_test=ArrayScanner
-apply_pattern UnitTest_run unit_test=Arrayrep
-apply_pattern UnitTest_run unit_test=Array
-apply_pattern UnitTest_run unit_test=PackedArray
-apply_pattern UnitTest_run unit_test=pointer_list
-apply_pattern UnitTest_run unit_test=FloatPacker
-apply_pattern UnitTest_run unit_test=stacktrace
-apply_pattern UnitTest_run unit_test=StrFormat
-apply_pattern UnitTest_run unit_test=copy_bounded
-apply_pattern UnitTest_run unit_test=prefetch
-apply_pattern UnitTest_run unit_test=ClassName
-apply_pattern UnitTest_run unit_test=make_unique
-apply_pattern UnitTest_run unit_test=ones
-apply_pattern UnitTest_run unit_test=BitPackerUnpacker
-
-apply_pattern UnitTest_run unit_test=exctrace1
-apply_pattern UnitTest_run unit_test=exctrace2
-macro_append exctrace2_test_dependencies " exctrace1_test "
-macro_append exctrace2_utest_dependencies " exctrace1_test "
-
-#apply_pattern UnitTest_run unit_test=utf8trim
-#apply_pattern UnitTest_run unit_test=stringformconvert
-
-macro_append CxxUtils_use_linkopts " $(Boost_linkopts_regex) "
-
-end_private
-
diff --git a/Control/CxxUtils/share/MD5_test.ref b/Control/CxxUtils/share/MD5_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..a5bce3fd2565d8f458555a0c6f42d0504a848bd5
--- /dev/null
+++ b/Control/CxxUtils/share/MD5_test.ref
@@ -0,0 +1 @@
+test1
diff --git a/Control/CxxUtils/test/ClassName_test.cxx b/Control/CxxUtils/test/ClassName_test.cxx
index aec3dc1e076c88f08742504939654c4185b5b315..c3ed17cbf13bdbe70165ae0cade5ee1439b8c76f 100644
--- a/Control/CxxUtils/test/ClassName_test.cxx
+++ b/Control/CxxUtils/test/ClassName_test.cxx
@@ -32,6 +32,7 @@ void test1()
     assert (cn.name() == "Foo");
     assert (cn.qualifiedName() == "Foo");
     assert (cn.fullName() == "Foo");
+    assert (cn.isConst() == false);
   }
 
   {
@@ -39,6 +40,7 @@ void test1()
     assert (cn.name() == "Foo");
     assert (cn.qualifiedName() == "Foo");
     assert (cn.fullName() == "const Foo");
+    assert (cn.isConst() == true);
   }
 
   {
@@ -46,6 +48,7 @@ void test1()
     assert (cn.name() == "Foo");
     assert (cn.qualifiedName() == "Foo");
     assert (cn.fullName() == "const Foo");
+    assert (cn.isConst() == true);
   }
 
   {
@@ -53,6 +56,7 @@ void test1()
     assert (cn.name() == "Fee");
     assert (cn.qualifiedName() == "Foo::Bar::Fee");
     assert (cn.fullName() == "Foo::Bar::Fee");
+    assert (cn.isConst() == false);
   }
 
 
@@ -61,6 +65,7 @@ void test1()
     assert (cn.name() == "Foo");
     assert (cn.qualifiedName() == "Foo");
     assert (cn.fullName() == "Foo<Bar>");
+    assert (cn.isConst() == false);
   }
 
   {
@@ -68,6 +73,7 @@ void test1()
     assert (cn.name() == "Foo");
     assert (cn.qualifiedName() == "Foo");
     assert (cn.fullName() == "Foo<Bar,Fee>");
+    assert (cn.isConst() == false);
   }
 
   {
@@ -75,6 +81,7 @@ void test1()
     assert (cn.name() == "Foo");
     assert (cn.qualifiedName() == "Foo");
     assert (cn.fullName() == "Foo<const Bar,Fee>");
+    assert (cn.isConst() == false);
   }
 
   {
@@ -82,6 +89,7 @@ void test1()
     assert (cn.name() == "Foo");
     assert (cn.qualifiedName() == "Foo");
     assert (cn.fullName() == "const Foo<const Bar,Fee>");
+    assert (cn.isConst() == true);
   }
 
   {
@@ -89,6 +97,21 @@ void test1()
     assert (cn.name() == "Foo");
     assert (cn.qualifiedName() == "A::B<C>::Foo");
     assert (cn.fullName() == "A::B<C>::Foo<Bar,D<E> >");
+    assert (cn.isConst() == false);
+  }
+
+  {
+    ClassName cn ("A<S<T> const>");
+    assert (cn.name() == "A");
+    assert (cn.qualifiedName() == "A");
+    assert (cn.fullName() == "A<const S<T> >");
+    assert (cn.isConst() == false);
+  }
+
+  {
+    ClassName cn ("const std::foo");
+    assert (cn.name() == "foo");
+    assert (cn.qualifiedName() == "std::foo");
   }
 
   EXPECT_EXCEPTION (ClassName::ExcBadClassName, ClassName cn ("A>B"));
@@ -141,6 +164,9 @@ void test_match()
   assert (!ClassName ("A::B<int>").match (pat4, matches));
   assert (ClassName ("A::B<const int>").match (pat4, matches));
   assert (matches["T"].fullName() == "int");
+
+  ClassName pat5 ("A<$T>");
+  assert (ClassName ("const A<int>").match (pat5, matches));
 }
 
 
@@ -205,6 +231,9 @@ void test_rules()
 
   assert (rules.apply ("std::vector<Foo, std::allocator<Foo> >") ==
           "std::vector<Bar>");
+
+  assert (rules.apply ("const std::vector<Foo, std::allocator<Foo> >") ==
+          "const std::vector<Bar>");
 }
 
 
diff --git a/Control/CxxUtils/test/MD5_test.cxx b/Control/CxxUtils/test/MD5_test.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..da7675ef32f22ffa3bd7eee9100b5b3faddb8fa9
--- /dev/null
+++ b/Control/CxxUtils/test/MD5_test.cxx
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file CxxUtils/test/MDt5_test.cxx
+ * @author scott snyder
+ * @date Aug 2017
+ * @brief Regression tests for MD5
+ */
+
+
+#undef NDEBUG
+#include "CxxUtils/MD5.h"
+#include <iostream>
+#include <cassert>
+
+
+// Test vectors from
+//  <https://www.nist.gov/itl/ssd/software-quality-group/nsrl-test-data>
+void test1()
+{
+  std::cout << "test1\n";
+
+  {
+    MD5 md5 ((const unsigned char*)"abc", 3);
+    assert (md5.hex_digest() == "900150983cd24fb0d6963f7d28e17f72");
+    unsigned char buf[16];
+    md5.raw_digest (buf);
+    const unsigned char exp[16] = {
+      0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0,
+      0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72,
+    };
+    for (int i = 0; i < 16; i++) {
+      assert (buf[i] == exp[i]);
+    }
+  }
+
+  {
+    MD5 md5 ((const unsigned char*)"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 56);
+    assert (md5.hex_digest() == "8215ef0796a20bcaaae116d3876c664a");
+  }
+
+  {
+    std::string s (1000000, 'a');
+    MD5 md5 ((const unsigned char*)s.c_str(), s.size());
+    assert (md5.hex_digest() == "7707d6ae4e027c70eea2a935c2296f21");
+  }
+}
+
+
+int main()
+{
+  test1();
+  return 0;
+}
diff --git a/Control/DataModel/cmt/requirements b/Control/DataModel/cmt/requirements
deleted file mode 100755
index 8786c6c358a6bb70d7338cfb9141419fd6078db4..0000000000000000000000000000000000000000
--- a/Control/DataModel/cmt/requirements
+++ /dev/null
@@ -1,20 +0,0 @@
-package DataModel
-
-author Paolo Calafiura   <Paolo.Calafiura@cern.ch>
-author Hong Ma           <hma@bnl.gov>
-author Srini Rajagopalan <srinir@bnl.gov>
-
-use AtlasPolicy    AtlasPolicy-*
-use SGTools        SGTools-*        Control
-use AthAllocators  AthAllocators-*  Control
-use AthLinks       AthLinks-*       Control
-use AthContainers  AthContainers-*  Control
-use CxxUtils       CxxUtils-*       Control
-
-# Declare this package as a cmake metalibrary so that the libraries and header files from
-# package it depends on are available to its clients. Transparent to CMT
-apply_pattern cmake_add_command command=metalibrary
-
-private 
-macro_append DOXYGEN_INPUT " ../doc" 
-
diff --git a/Control/DataModelAthenaPool/cmt/requirements b/Control/DataModelAthenaPool/cmt/requirements
deleted file mode 100755
index ce50c6ee55960f698de43667b187da0d1c4ae89a..0000000000000000000000000000000000000000
--- a/Control/DataModelAthenaPool/cmt/requirements
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# $Id: requirements,v 1.15 2009-03-16 10:48:24 mnowak Exp $
-#
-# @file  cmt/requirements
-# @author Marcin Nowak <Marcin.Nowak@cern.ch>
-# @author RD Schaffer <R.D.Schaffer@cern.ch>
-# @date Nov 2005
-# @brief DataModelAthenaPool cmt requirements file.
-#
-
-package DataModelAthenaPool
-author scott snyder <snyder@bnl.gov>
-author Marcin Nowak <Marcin.Nowak@cern.ch>
-author RD Schaffer  <R.D.Schaffer@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-use GaudiInterface        GaudiInterface-*         External
-use AthenaKernel          AthenaKernel-*           Control
-
-use AthContainers         AthContainers-*          Control
-use AthLinks              AthLinks-*               Control
-use Navigation            Navigation-*             Control
-use RootUtils             RootUtils-*              Control
-use AthenaBaseComps       AthenaBaseComps-*        Control
-
-use AthenaPoolCnvSvc 	  AthenaPoolCnvSvc-*       Database/AthenaPOOL
-
-private
-use AtlasCLHEP            AtlasCLHEP-*             External
-use AtlasROOT             AtlasROOT-*              External
-use AtlasReflex           AtlasReflex-*            External
-use CLIDSvc               CLIDSvc-*                Control
-use SGTools               SGTools-*                Control
-use AthenaPoolUtilities   AthenaPoolUtilities-*    Database/AthenaPOOL
-use RootConversions       RootConversions-*        Database/AthenaPOOL
-
-apply_pattern lcgdict dict=DataModelAthenaPoolDict selectionfile=selection.xml \
-	headerfiles="../DataModelAthenaPool/DataModelAthenaPoolDict.h"
-
-
-####apply_pattern component_library
-####library DataModelAthenaPool *.cxx components/*.cxx
-
-# Replace the component_library by a dual_use_library since the lcgdict dictionary 
-# generation only works for linked libraries in the cmake-world
-apply_pattern dual_use_library files="*.cxx"
-
-apply_pattern declare_joboptions files="DataModelAthenaPool_jobOptions.py"
-apply_pattern declare_python_modules files="*.py"
-
-macro converters        "-s=${AthContainers_root}/AthContainers UserDataStore.h"
-apply_pattern poolcnv files=${converters}
-
-macro_append DataModelAthenaPoolPoolCnv_dependencies " DataModelAthenaPool "
-
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=DataLink_p2
-apply_pattern UnitTest_run unit_test=ElementLinkCnv_p1
-apply_pattern UnitTest_run unit_test=ElementLinkCnv_p2
-apply_pattern UnitTest_run unit_test=ElementLinkCnv_p3
-apply_pattern UnitTest_run unit_test=NavigableCnv_p1
-apply_pattern UnitTest_run unit_test=NavigableCnv_p2
-apply_pattern UnitTest_run unit_test=NavigableVectorCnv_p1
-apply_pattern UnitTest_run unit_test=NavigableVectorCnv_p2
-apply_pattern UnitTest_run unit_test=ElementLinkVectorCnv_p1
diff --git a/Control/DataModelRoot/CMakeLists.txt b/Control/DataModelRoot/CMakeLists.txt
index 150fe3e7fcff90d8d386e3d606190a0b67ad4f3d..ea460d21586e0b808acb6916a495007302ba1dc6 100644
--- a/Control/DataModelRoot/CMakeLists.txt
+++ b/Control/DataModelRoot/CMakeLists.txt
@@ -5,6 +5,10 @@
 # Declare the package name:
 atlas_subdir( DataModelRoot )
 
+atlas_depends_on_subdirs (
+  PUBLIC
+  Control/CxxUtils )
+
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/fragments/l1topo_pygen b/Control/DataModelRoot/DataModelRoot/ATLAS_CHECK_THREAD_SAFETY
similarity index 100%
rename from Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/fragments/l1topo_pygen
rename to Control/DataModelRoot/DataModelRoot/ATLAS_CHECK_THREAD_SAFETY
diff --git a/Control/DataModelRoot/DataModelRoot/RootType.h b/Control/DataModelRoot/DataModelRoot/RootType.h
index cac2b38e39d12d8d79340d553dd0348322ac778a..003d41bc303e683aaedf2cd8795eace965379217 100644
--- a/Control/DataModelRoot/DataModelRoot/RootType.h
+++ b/Control/DataModelRoot/DataModelRoot/RootType.h
@@ -14,6 +14,8 @@ class TMethod;
 class TFunction;
 class TMethodArg;
 
+#include "CxxUtils/checker_macros.h"
+
 #define ROOT_6
 
 namespace Reflex {
@@ -90,9 +92,9 @@ public:
    std::string FunctionParameterDefaultAt( size_t nth ) const;
 
    TReturnTypeAdapter   ReturnType() const;
-   TScopeAdapter        DeclaringScope() const;
-   TTypeAdapter         DeclaringType() const;
-   TTypeAdapter         TypeOf() const;
+   TScopeAdapter        DeclaringScope ATLAS_NOT_THREAD_SAFE () const;
+   TTypeAdapter         DeclaringType ATLAS_NOT_THREAD_SAFE () const;
+   TTypeAdapter         TypeOf ATLAS_NOT_THREAD_SAFE () const;
 
 private:
    TDictionary* fMember;
@@ -107,14 +109,14 @@ public:
 public:
    std::string Name() const;
 
-   TScopeAdapter ToType() const;
+   TScopeAdapter ToType ATLAS_NOT_THREAD_SAFE () const;
 
 private:
    TBaseClass* fBase;
 };
 
 
-class TScopeAdapter {
+class ATLAS_NOT_THREAD_SAFE TScopeAdapter {
 public:
    TScopeAdapter();
    TScopeAdapter( TClass* klass );
diff --git a/Control/DataModelRoot/src/RootType.cxx b/Control/DataModelRoot/src/RootType.cxx
index 026b3653421bc88a4dbda94647791ed8fdd36334..58f03590ae1d84eb78daa83e4d3c13a60a08837a 100644
--- a/Control/DataModelRoot/src/RootType.cxx
+++ b/Control/DataModelRoot/src/RootType.cxx
@@ -142,7 +142,7 @@ TMemberAdapter::operator TMethodArg*() const
 }
 
 //____________________________________________________________________________
-TTypeAdapter TMemberAdapter::TypeOf() const
+TTypeAdapter TMemberAdapter::TypeOf ATLAS_NOT_THREAD_SAFE () const
 {
    // get the type of the data member
    TDataMember* dataMember = (TDataMember*)*this;
@@ -330,7 +330,7 @@ TScopeAdapter TMemberAdapter::DeclaringScope() const
    return std::string( "" );
 }
 
-TTypeAdapter TMemberAdapter::DeclaringType() const
+TTypeAdapter TMemberAdapter::DeclaringType ATLAS_NOT_THREAD_SAFE () const
 {
 // no distinction between scope/type
    return DeclaringScope();
@@ -345,7 +345,7 @@ std::string TBaseAdapter::Name() const
 }
 
 //____________________________________________________________________________
-TScopeAdapter TBaseAdapter::ToType() const
+TScopeAdapter TBaseAdapter::ToType ATLAS_NOT_THREAD_SAFE () const
 {
 // wrap the actual class representing this base
    return TScopeAdapter( fBase->GetClassPointer() );
@@ -626,7 +626,7 @@ std::string TScopeAdapter::Name( unsigned int mod ) const
 }
 
 //____________________________________________________________________________
-TScopeAdapter TScopeAdapter::DeclaringScope() const
+TScopeAdapter TScopeAdapter::DeclaringScope  ATLAS_NOT_THREAD_SAFE () const
 {
    std::string name = Name( Reflex::FINAL | Reflex::SCOPED );
    std::string::size_type pos = name.rfind( "::" );
diff --git a/Control/DataModelTest/DataModelRunTests/CMakeLists.txt b/Control/DataModelTest/DataModelRunTests/CMakeLists.txt
index 8f628110e18973e25b436560f0934f864994a03c..0becd554e66dce123e4d7c727e275625d3e336dd 100644
--- a/Control/DataModelTest/DataModelRunTests/CMakeLists.txt
+++ b/Control/DataModelTest/DataModelRunTests/CMakeLists.txt
@@ -34,7 +34,7 @@ function (datamodel_run_test testName)
   atlas_add_test( ${testName}
                   SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/datamodel_${testName}.sh
                   PROPERTIES TIMEOUT 300
-                  ENVIRONMENT "ATLAS_REFERENCE_TAG=DataModelRunTests/DataModelRunTestsReference-01-00-01"
+                  ENVIRONMENT "ATLAS_REFERENCE_TAG=DataModelRunTests/DataModelRunTestsReference-01-00-02"
                   POST_EXEC_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/test/post.sh ${testName}"
                    )
   if( ARG_DEPENDS )
@@ -91,7 +91,15 @@ datamodel_run_test (xAODTestDecorHandle1)
 datamodel_run_test (xAODTestDecorHandle1MT
                     COMMAND "athena.py --thread=1")
 
-datamodel_run_test (xAODTestDecorHandle2)
+datamodel_run_test (xAODTestDecorHandle2
+                    DEPENDS xAODTestWrite)
 datamodel_run_test (xAODTestDecorHandle2MT
                     COMMAND "athena.py --thread=1"
                     DEPENDS xAODTestWrite)
+
+datamodel_run_test (CondWriter)
+datamodel_run_test (CondReader
+                    DEPENDS CondWriter)
+datamodel_run_test (CondReaderMT
+                    COMMAND "athena.py --thread=1"
+                    DEPENDS CondWriter)
diff --git a/Control/DataModelTest/DataModelRunTests/cmt/requirements b/Control/DataModelTest/DataModelRunTests/cmt/requirements
deleted file mode 100755
index e835505c0bec5485c20eb7dc0ba0eb031a0de1fa..0000000000000000000000000000000000000000
--- a/Control/DataModelTest/DataModelRunTests/cmt/requirements
+++ /dev/null
@@ -1,167 +0,0 @@
-#
-# $Id: requirements,v 1.1 2005-12-01 21:42:52 ssnyder Exp $
-#
-# @file  cmt/requirements
-# @author scott snyder
-# @date Nov 2005
-# @brief DataModelRunTests cmt requirements file.
-#
-
-package DataModelRunTests
-
-author scott snyder <snyder@bnl.gov>
-
-use AtlasPolicy	              AtlasPolicy-*
-use MinimalRunTime            MinimalRunTime-*            Control -no_auto_imports
-use TestPolicy                TestPolicy-*
-
-
-apply_pattern declare_joboptions files="-s=../share *.py"
-
-
-apply_pattern athenarun_test \
-   name="DataModelTestWrite" \
-   options="DataModelRunTests/DataModelTestWrite_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh DataModelTestWrite"
-
-apply_pattern athenarun_test \
-   name="DataModelTestRead" \
-   options="DataModelRunTests/DataModelTestRead_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh DataModelTestRead"
-macro_append DataModelTestRead_test_dependencies " DataModelTestWrite_test "
-
-apply_pattern athenarun_test \
-   name="DataModelTestRead2" \
-   options="DataModelRunTests/DataModelTestRead2_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh DataModelTestRead2"
-macro_append DataModelTestRead2_test_dependencies " DataModelTestRead_test "
-
-apply_pattern athenarun_test \
-   name="AuxDataTestWrite" \
-   options="DataModelRunTests/AuxDataTestWrite_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh AuxDataTestWrite"
-macro_append AuxDataTestWrite_test_dependencies " DataModelTestRead2_test "
-
-apply_pattern athenarun_test \
-   name="AuxDataTestRead" \
-   options="DataModelRunTests/AuxDataTestRead_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh AuxDataTestRead"
-macro_append AuxDataTestRead_test_dependencies " AuxDataTestWrite_test "
-
-apply_pattern athenarun_test \
-   name="AuxDataTestRead2" \
-   options="DataModelRunTests/AuxDataTestRead2_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh AuxDataTestRead2"
-macro_append AuxDataTestRead2_test_dependencies " AuxDataTestRead_test "
-
-apply_pattern athenarun_test \
-   name="AuxDataTestRead2b" \
-   options="DataModelRunTests/AuxDataTestRead2b_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh AuxDataTestRead2b"
-macro_append AuxDataTestRead2b_test_dependencies " AuxDataTestRead2_test "
-
-apply_pattern athenarun_test \
-   name="AuxDataTestTypelessRead" \
-   options="DataModelRunTests/AuxDataTestTypelessRead_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh AuxDataTestTypelessRead"
-macro_append AuxDataTestTypelessRead_test_dependencies " AuxDataTestRead2b_test "
-
-apply_pattern athenarun_test \
-   name="AuxDataTestRead3" \
-   options="DataModelRunTests/AuxDataTestRead3_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh AuxDataTestRead3"
-macro_append AuxDataTestRead3_test_dependencies " AuxDataTestTypelessRead_test "
-
-apply_pattern athenarun_test \
-   name="xAODTestWrite" \
-   options="DataModelRunTests/xAODTestWrite_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh xAODTestWrite"
-macro_append xAODTestWrite_test_dependencies " AuxDataTestRead3_test "
-
-apply_pattern athenarun_test \
-   name="xAODTestRead" \
-   options="DataModelRunTests/xAODTestRead_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh xAODTestRead"
-macro_append xAODTestRead_test_dependencies " xAODTestWrite_test "
-
-apply_pattern athenarun_test \
-   name="xAODTestRead2" \
-   options="DataModelRunTests/xAODTestRead2_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh xAODTestRead2"
-macro_append xAODTestRead2_test_dependencies " xAODTestRead_test "
-
-apply_pattern athenarun_test \
-   name="xAODTestRead2b" \
-   options="DataModelRunTests/xAODTestRead2b_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh xAODTestRead2b"
-macro_append xAODTestRead2b_test_dependencies " xAODTestRead2_test "
-
-apply_pattern athenarun_test \
-   name="xAODTestTypelessRead" \
-   options="DataModelRunTests/xAODTestTypelessRead_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh xAODTestTypelessRead"
-macro_append xAODTestTypelessRead_test_dependencies " xAODTestRead2b_test "
-
-apply_pattern athenarun_test \
-   name="xAODTestRead3" \
-   options="DataModelRunTests/xAODTestRead3_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh xAODTestRead3"
-macro_append xAODTestRead3_test_dependencies " xAODTestTypelessRead_test "
-
-apply_pattern athenarun_test \
-   name="xAODTestReadRename" \
-   options="DataModelRunTests/xAODTestReadRename_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh xAODTestReadRename"
-macro_append xAODTestReadRename_test_dependencies " xAODTestRead3_test "
-
-apply_pattern athenarun_test \
-   name="xAODTestReadFilter" \
-   options="DataModelRunTests/xAODTestReadFilter_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh xAODTestReadFilter"
-macro_append xAODTestReadFilter_test_dependencies " xAODTestReadRename_test "
-
-apply_pattern athenarun_test \
-   name="xAODTestReadFilterRead" \
-   options="DataModelRunTests/xAODTestReadFilterRead_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh xAODTestReadFilterRead"
-macro_append xAODTestReadFilter_test_dependencies " xAODTestReadFilter_test "
-
-document athenarun_launcher xAODTestReadARA_t -group=check \
-    athenarun_exe="python" \
-    athenarun_pre="'source ../cmt/setup.sh'" \
-    athenarun_opt="../share/xAODTestReadARA_t.py" \
-    athenarun_out="' >& xAODTestReadARA.log'" \
-    athenarun_post="'../test/post.sh xAODTestReadARA '"
-macro_append xAODTestReadARA_t_dependencies " xAODTestReadFilterRead_test "
-
-apply_pattern athenarun_test \
-   name="ByteStreamTestWrite" \
-   options="DataModelRunTests/ByteStreamTestWrite_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh ByteStreamTestWrite"
-macro_append ByteStreamTestWrite_test_dependencies " xAODTestReadARA_t "
-
-apply_pattern athenarun_test \
-   name="ByteStreamTestRead" \
-   options="DataModelRunTests/ByteStreamTestRead_jo.py" \
-   pre_script="../test/pre_check.sh" \
-   post_script="../test/post.sh ByteStreamTestRead"
-macro_append ByteStreamTestRead_test_dependencies " ByteStreamTestWrite_test "
diff --git a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref
index 09acd891c445daf38dfcb2e5198ff8f6beef409f..b799be4f1ea71486ca920525f381080c85fc7d40 100644
--- a/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/ByteStreamTestRead.ref
@@ -1,20 +1,21 @@
-Fri Mar 17 22:00:06 CET 2017
-Preloading tcmalloc_minimal.so
+Wed Jun 21 15:45:02 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 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 [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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/ByteStreamTestRead_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5282 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 442 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 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 22:00:22 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Jun 21 15:45:27 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -22,12 +23,12 @@ 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 8719 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9499 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 361 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 312 CLIDRegistry entries for module ALL
 ByteStreamAddre...   INFO Initializing ByteStreamAddressProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO Initializing ROBDataProviderSvc - package version ByteStreamCnvSvcBase-00-00-00
 ROBDataProviderSvc   INFO  ---> Filter out empty ROB fragments                               =  'filterEmptyROB':False
@@ -43,19 +44,20 @@ ByteStreamAddre...   INFO    Topo Processor RoI = 0x81, 0x91
 ByteStreamAddre...   INFO -- Will fill Store with id =  0
 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 Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
 PoolSvc              INFO Re-initializing PoolSvc
 ToolSvc.ByteStr...   INFO Initializing ToolSvc.ByteStreamMetadataTool - package version ByteStreamCnvSvc-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 1771 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1819 CLIDRegistry entries for module ALL
 TrigSerializeCn...   INFO initialize()
 HistogramPersis...WARNING Histograms saving not required.
 EventSelector        INFO reinitialization...
@@ -65,7 +67,7 @@ EventSelector        INFO reinitialization...
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 ToolSvc.ByteStr...   INFO handle() FirstInputFile, filename = BSF:test.bs
-ClassIDSvc           INFO  getRegistryEntries: read 102 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 106 CLIDRegistry entries for module ALL
 ByteStreamInputSvc   INFO Picked valid file: test.bs
 ToolSvc.ByteStr...   INFO handle() BeginInputFile, filename = BSF:test.bs
 ApplicationMgr       INFO Application Manager Started successfully
@@ -76,20 +78,298 @@ EventInfoByteSt...   INFO IsTestbeam : 0
 EventInfoByteSt...   INFO IsCalibration : 0
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_tlp1 is available
-TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_tlp1 is available
-TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuonCollection_p1 is available
-TClass::Init:0: RuntimeWarning: no dictionary for class CosmicMuon_p1 is available
-TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p1 is available
-TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegment_p1 is available
-TClass::Init:0: RuntimeWarning: no dictionary for class MdtTrackSegmentCollection_p2 is available
-ToolSvc.TrigTSe...WARNING Could not re-load  class listOfRules
+Warning in <TClass::Init>: no dictionary for class TauRecDetails_p1 is available
+Warning in <TClass::Init>: no dictionary for class ParticleBase_p1 is available
+Warning in <TClass::Init>: no dictionary for class IsoMuonFeatureContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigVertexCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TauDetailsContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigL2BjetContainer_tlp2 is available
+Warning in <TClass::Init>: no dictionary for class CombinedMuonFeatureContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigEFBphysContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigSpacePointCountsCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class JetCollection_tlp2 is available
+Warning in <TClass::Init>: no dictionary for class egDetailContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigT2JetContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauTracksInfoCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class egammaContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigEFBjetContainer_tlp2 is available
+Warning in <TClass::Init>: no dictionary for class Trk::TrackCollection_tlp2 is available
+Warning in <TClass::Init>: no dictionary for class TrigMissingETContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class MuonFeatureContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigInDetTrackCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTrackCountsCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigElectronContainer_tlp2 is available
+Warning in <TClass::Init>: no dictionary for class TrigRoiDescriptorCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class CosmicMuonCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigPhotonContainer_tlp2 is available
+Warning in <TClass::Init>: no dictionary for class TrigEMClusterContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigOperationalInfoCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfoContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigT2MbtsBitsContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TileMuFeatureContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauClusterContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigL2BphysContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class Rec::TrackParticleContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TauJetContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class MdtTrackSegmentCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TileTrackMuFeatureContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::TrackParticleBase_p1 is available
+Warning in <TClass::Init>: no dictionary for class TauJet_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigElectron_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigPhoton_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigEMCluster_p2 is available
+Warning in <TClass::Init>: no dictionary for class Trk::Perigee_p1 is available
+Warning in <TClass::Init>: no dictionary for class TauCommonDetails_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigT2JetContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigT2Jet_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigCaloCluster_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigT2MbtsBitsContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigEMClusterContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauCluster_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigEMCluster_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauClusterContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEF_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfoTrack_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::TrackSummary_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauCluster_p2 is available
+Warning in <TClass::Init>: no dictionary for class IsoMuonFeatureContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class IsoMuonFeature_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTau_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigVertexCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigVertex_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigInDetTrack_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigInDetTrackFitPar_p1 is available
+Warning in <TClass::Init>: no dictionary for class TauDetailsContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TauCommonExtraDetails_p1 is available
+Warning in <TClass::Init>: no dictionary for class Tau1P3PDetails_p1 is available
+Warning in <TClass::Init>: no dictionary for class Tau1P3PExtraDetails_p1 is available
+Warning in <TClass::Init>: no dictionary for class TauRecExtraDetails_p1 is available
+Warning in <TClass::Init>: no dictionary for class tauAnalysisHelperObject_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::RecVertex_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::Vertex_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::FitQuality_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::HepSymMatrix_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigL2BjetContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigL2Bjet_p2 is available
+Warning in <TClass::Init>: no dictionary for class CombinedMuonFeatureContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class CombinedMuonFeature_p1 is available
+Warning in <TClass::Init>: no dictionary for class CombinedMuonFeature_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigEFBphysContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigEFBphys_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigEFBphys_p2 is available
+Warning in <TClass::Init>: no dictionary for class Rec::TrackParticleContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigEFBjetContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigEFBjet_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigSpacePointCountsCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigSpacePointCounts_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigSpacePointCounts_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigHisto2D_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigSpacePointCounts_p3 is available
+Warning in <TClass::Init>: no dictionary for class JetCollection_p4 is available
+Warning in <TClass::Init>: no dictionary for class Jet_p4 is available
+Warning in <TClass::Init>: no dictionary for class JetAssociationBase_p1 is available
+Warning in <TClass::Init>: no dictionary for class egDetailContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class MuonFeatureDetailsContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class MuonFeatureDetailsContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class MuonFeatureDetails_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauTracksInfoCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauTracksInfo_p1 is available
+Warning in <TClass::Init>: no dictionary for class egammaContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class RingerRingsContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class RingerRingsContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class RingerRings_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigRNNOutputContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigRNNOutputContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigRNNOutput_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::TrackCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::Track_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::TrackStateOnSurface_p2 is available
+Warning in <TClass::Init>: no dictionary for class Trk::CompetingRIOsOnTrack_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::RIO_OnTrack_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::PseudoMeasurementOnTrack_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::TrackParameters_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::AtaSurface_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::MeasuredAtaSurface_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::MeasuredPerigee_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::BoundSurface_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::Surface_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::CylinderBounds_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::DiamondBounds_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::DiscBounds_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::RectangleBounds_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::TrapezoidBounds_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::RotatedTrapezoidBounds_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::DetElementSurface_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::MaterialEffectsBase_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::EnergyLoss_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::MaterialEffectsOnTrack_p2 is available
+Warning in <TClass::Init>: no dictionary for class Trk::EstimatedBremOnTrack_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::LocalDirection_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::LocalPosition_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::LocalParameters_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonEventCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonEventCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonEvent_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonROB_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonROBData_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonRoi_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonSeq_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonAlg_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonTE_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigElectronContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class MuonFeatureContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class MuonFeature_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigInDetTrackCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigInDetTrackFitPar_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigInDetTrack_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigTrackCountsCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTrackCounts_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTrackCounts_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigMissingETContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMissingET_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMissingET_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigRoiDescriptorCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigRoiDescriptor_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonConfigCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonConfigCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMonConfig_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigConfChain_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigConfSig_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigConfSeq_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigConfAlg_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigPhotonContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigCaloCluster_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigOperationalInfoCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigOperationalInfo_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfoContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfo_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfo_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfo_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfo_p4 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFTrack_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFTrack_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFTrack_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFTrack_p4 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFTrack_p5 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFCbTrack_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFCbTrack_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFCbTrack_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFCbTrack_p4 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfoTrackContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauClusterDetailsContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauClusterDetailsContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauClusterDetails_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigT2MbtsBits_p1 is available
+Warning in <TClass::Init>: no dictionary for class TileMuFeatureContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TileMuFeature_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigL2BphysContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigL2Bphys_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigL2Bphys_p2 is available
+Warning in <TClass::Init>: no dictionary for class Rec::TrackParticle_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::VxCandidate_p1 is available
+Warning in <TClass::Init>: no dictionary for class CosmicMuonCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class CosmicMuon_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTrtHitCountsCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTrtHitCountsCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTrtHitCounts_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigHisto1D_p1 is available
+Warning in <TClass::Init>: no dictionary for class MdtTrackSegmentCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class MdtTrackSegment_p1 is available
+Warning in <TClass::Init>: no dictionary for class TileTrackMuFeatureContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TileTrackMuFeature_p1 is available
+Warning in <TClass::Init>: no dictionary for class TileTrackMuFeature_p2 is available
+Warning in <TClass::Init>: no dictionary for class MuonFeature_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigT2MbtsBits_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigInDetTrackCollection_tlp2 is available
+Warning in <TClass::Init>: no dictionary for class TrigInDetTrackFitPar_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigInDetTrack_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfoContainer_tlp2 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfoContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfo_p5 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFTrack_p6 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFCbTrack_p6 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFInfoTrackContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class Trk::MuonTrackSummary_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::TrackInfo_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigVertexCountsCollection_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigVertexCountsCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigVertexCounts_p1 is available
+Warning in <TClass::Init>: no dictionary for class IsoMuonFeatureContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class TauDetailsContainer_tlp2 is available
+Warning in <TClass::Init>: no dictionary for class TauCommonDetails_p2 is available
+Warning in <TClass::Init>: no dictionary for class CombinedMuonFeatureContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class JetCollection_tlp5 is available
+Warning in <TClass::Init>: no dictionary for class JetCollection_p5 is available
+Warning in <TClass::Init>: no dictionary for class Jet_p5 is available
+Warning in <TClass::Init>: no dictionary for class JetConverterTypes::momentum is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonClusterFeatureContainer_tlp1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonClusterFeatureContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonClusterFeature_p1 is available
+Warning in <TClass::Init>: no dictionary for class MuonFeatureDetailsContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class MuonFeatureContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigPassBitsCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauClusterDetailsContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauClusterContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class Trk::InDetTrackSummary_p1 is available
+Warning in <TClass::Init>: no dictionary for class TauJetContainer_p4 is available
+Warning in <TClass::Init>: no dictionary for class TrigElectronContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class IsoMuonFeatureContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class JetKeyDescriptorCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFCbTrack_p7 is available
+Warning in <TClass::Init>: no dictionary for class TrigTrtHitCountsCollection_p2 is available
+Warning in <TClass::Init>: no dictionary for class TileMuFeatureContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigT2JetContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigRoiDescriptorCollection_p2 is available
+Warning in <TClass::Init>: no dictionary for class JetCollection_p6 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauTracksInfoCollection_p2 is available
+Warning in <TClass::Init>: no dictionary for class Trk::VxContainer_tlp2 is available
+Warning in <TClass::Init>: no dictionary for class Trk::VxContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::ExtendedVxCandidate_p1 is available
+Warning in <TClass::Init>: no dictionary for class Trk::VxTrackAtVertex_p2 is available
+Warning in <TClass::Init>: no dictionary for class Trk::RecVertex_p2 is available
+Warning in <TClass::Init>: no dictionary for class Trk::Track_p12 is available
+Warning in <TClass::Init>: no dictionary for class Trk::Perigee_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigPhotonContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class TileTrackMuFeatureContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigMissingETContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigCaloClusterContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFIsolationContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class Jet_p6 is available
+Warning in <TClass::Init>: no dictionary for class JetCollection_tlp6 is available
+Warning in <TClass::Init>: no dictionary for class ElectronMuonTopoInfoContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigRNNOutputContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class CombinedMuonFeatureContainer_p4 is available
+Warning in <TClass::Init>: no dictionary for class MdtTrackSegmentCollection_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigPassFlagsCollection_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigL2BjetContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigT2MbtsBitsContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauClusterContainer_p5 is available
+Warning in <TClass::Init>: no dictionary for class RingerRingsContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigSpacePointCountsCollection_p4 is available
+Warning in <TClass::Init>: no dictionary for class TrigMuonEFContainer_p2 is available
+Warning in <TClass::Init>: no dictionary for class TrigEMClusterContainer_p4 is available
+Warning in <TClass::Init>: no dictionary for class JetMomentMapCollection_p6 is available
+Warning in <TClass::Init>: no dictionary for class MuonFeature_p3 is available
+Warning in <TClass::Init>: no dictionary for class TrigTauContainer_p3 is available
+Warning in <TClass::Init>: no dictionary for class TauDetailsContainer_tlp4 is available
+Warning in <TClass::Init>: no dictionary for class PanTauDetails_p1 is available
+Warning in <TClass::Init>: no dictionary for class TauPi0Details_p2 is available
+Warning in <TClass::Init>: no dictionary for class TauPi0Candidate_p1 is available
+Warning in <TClass::Init>: no dictionary for class TauPi0Cluster_p1 is available
+Warning in <TClass::Init>: no dictionary for class TauShot_p1 is available
+Warning in <TClass::Init>: no dictionary for class TrigCompositeContainer_p1 is available
+Warning in <TClass::Init>: no dictionary for class TauJetContainer_p5 is available
+Warning in <TClass::Init>: no dictionary for class TrigEMCluster_p4 is available
 ToolSvc.TrigSer...   INFO Initializing - Package version: TrigSerializeTP-00-00-00
 APR:DbReflex:forGuid Warning  doing GUID scan on ALL types for Class ID=10DE610D-5634-4D42-80D4-80B0A8C16452
-TClass::Init:0: RuntimeWarning: no dictionary for class coral::AttributeList is available
-ClassIDSvc           INFO  getRegistryEntries: read 11142 CLIDRegistry entries for module ALL
+Warning in <TClass::Init>: no dictionary for class coral::AttributeList is available
+ClassIDSvc           INFO  getRegistryEntries: read 2547 CLIDRegistry entries for module ALL
 APR:DbReflex:forGuid Warning  doing GUID scan on ALL types for Class ID=2577D84A-BC0F-4CD2-9539-9F0A4EFC64AA
-ClassIDSvc           INFO  getRegistryEntries: read 63 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 73 CLIDRegistry entries for module ALL
 APR:DbReflex:forGuid Warning  doing GUID scan on ALL types for Class ID=740C4020-F0A3-40B3-88E1-B15A8055DB64
 HLT_DMTest__CVec_cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
@@ -407,83 +687,13 @@ Type of aux store: DMTest::CAuxContainer_v1
   pvFloat: [-0.406 -0.306 -0.206 -0.106 -0.006 0.094 0.194 0.294 0.394 ]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
-HLT_DMTest__CVec_cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+HLT_DMTest__CVec_cvec aux items: aFloat anInt dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dInt1: 2001 dVar1: 2251 dpInt1: 251 cEL: [9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05 anInt2: 1502 dInt1: 2002 dVar1: 2252 dpInt1: 252 cEL: [8]
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
-  dpvFloat: [0.150 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dInt1: 2003 dVar1: 2253 dpInt1: 253 cEL: [7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05 anInt2: 1504 dInt1: 2004 dVar1: 2254 dpInt1: 254 cEL: [6]
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
-  dpvFloat: [0.350 0.351 0.352 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dInt1: 2005 dVar1: 2255 dpInt1: 255 cEL: [5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05 anInt2: 1506 dInt1: 2006 dVar1: 2256 dpInt1: 256 cEL: [4]
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
-  dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dInt1: 2007 dVar1: 2257 dpInt1: 257 cEL: [3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05 anInt2: 1508 dInt1: 2008 dVar1: 2258 dpInt1: 258 cEL: [2]
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
-  dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dInt1: 2009 dVar1: 2259 dpInt1: 259 cEL: [1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05 anInt2: 1510 dInt1: 2010 dVar1: 2260 dpInt1: 260 cEL: [0]
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
-  dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]
-HLT_DMTest__CView_cview: 510 509 508 507 506 505 504 503 502 501
+HLT_DMTest__CView_cview:
 HLT_DMTest__HVec_hvec: 2001.5 2002.5 2003.5 2004.5 2005.5 2006.5 2007.5 2008.5 2009.5 2010.5 2011.5 2012.5 2013.5 2014.5 2015.5 2016.5 2017.5 2018.5 2019.5 2020.5
 HLT_DMTest__HView_hview: 2020.5 2019.5 2018.5 2017.5 2016.5 2015.5 2014.5 2013.5 2012.5 2011.5 2010.5 2009.5 2008.5 2007.5 2006.5 2005.5 2004.5 2003.5 2002.5 2001.5
 HLT_DMTest__CVec_cvec2 aux items: aFloat anInt pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05
-  pvInt: []
-  pvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #0 5 events processed so far  <<<===
 HLT_DMTest__CVec_cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
@@ -1671,6 +1881,7 @@ Type of aux store: DMTest::CAuxContainer_v1
   pvFloat: [-0.390 -0.290 -0.190 -0.090 0.010 0.110 0.210 0.310 0.410 ]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
 ToolSvc.ByteStr...   INFO handle() LastInputFile, filename = stop
+Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
 IncidentProcAlg2     INFO Finalize
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReader.ref b/Control/DataModelTest/DataModelRunTests/share/CondReader.ref
new file mode 100644
index 0000000000000000000000000000000000000000..58aa5896ded3b87e1566bed94f41326e616fc4b4
--- /dev/null
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReader.ref
@@ -0,0 +1,350 @@
+Sat Aug 19 20:02:14 CEST 2017
+Preloading tcmalloc_minimal.so
+Py:Athena            INFO including file "AthenaCommon/Preparation.py"
+Py:Athena            INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-dbg] [atlas-work3/3a9dcda165] -- built on [2017-08-19T1734]
+Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
+Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
+Py:Athena            INFO executing ROOT6Setup
+Py:Athena            INFO including file "AthenaCommon/Execution.py"
+Py:Athena            INFO including file "DataModelRunTests/CondReader_jo.py"
+Py:Athena            INFO including file "AthenaPoolCnvSvc/AthenaPool_jobOptions.py"
+Py:ConfigurableDb    INFO Read module info for 5387 configurables from 56 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+[?1034hEventInfoMgtInit: Got release version  Athena-22.0.0
+Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
+Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
+                                          running on lxplus047.cern.ch on Sat Aug 19 20:02:30 2017
+====================================================================================================================================
+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 3098 CLIDRegistry entries for module ALL
+ChronoStatSvc        INFO  Number of skipped events for MemStat-1
+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 602 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 61 CLIDRegistry entries for module ALL
+CondInputLoader      INFO Initializing CondInputLoader...
+MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
+PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
+PoolSvc              INFO Frontier compression level set to 5
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-08-18T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus047.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] 
+PoolSvc              INFO Re-initializing PoolSvc
+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 Read from meta data only for folder /TagInfo
+IOVDbSvc             INFO Initialised with 2 connections and 3 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 sqlite://;schema=condtest.db;dbname=OFLP200
+CoralApplication Info Create a cool::CoralApplication...
+CoralApplication Info Create a new own CORAL connection service
+CoralApplication Info Create the COOL database service
+RalDatabaseSvc Info Instantiate the RalDatabaseSvc
+CoralApplication Info Create a cool::CoralApplication... DONE
+RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Connect to the database server
+RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP
+CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0
+CORAL/Services/ConnectionService Info Loading default plugin for coral::IMonitoringService: CORAL/Services/MonitoringService
+PluginManager Info PluginManager creating CORAL/Services/MonitoringService component
+PluginManager Info PluginManager needs to load CORAL/Services/MonitoringService component
+PluginManager Info PluginManager loaded MonitoringService library
+PluginManager Info PluginManager loaded CORAL/Services/MonitoringService factory from MonitoringService library
+CORAL/Services/ConnectionService Info The connection pool automatic cleanup thread is currently explicitly disabled
+CORAL/Services/ConnectionService Info Loading default plugin for coral::IRelationalService: CORAL/Services/RelationalService
+PluginManager Info PluginManager creating CORAL/Services/RelationalService component
+PluginManager Info PluginManager needs to load CORAL/Services/RelationalService component
+PluginManager Info PluginManager loaded RelationalService library
+PluginManager Info PluginManager loaded CORAL/Services/RelationalService factory from RelationalService library
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "coral" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "frontier" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "mysql" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "oracle" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "sqlite" with native implementation
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "coral" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "frontier" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "mysql" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "oracle" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "sqlite" is native
+PluginManager Info PluginManager creating CORAL/RelationalPlugins/sqlite component
+PluginManager Info PluginManager needs to load CORAL/RelationalPlugins/sqlite component
+PluginManager Info PluginManager loaded SQLiteAccess library
+PluginManager Info PluginManager loaded CORAL/RelationalPlugins/sqlite factory from SQLiteAccess library
+CORAL/Services/ConnectionService Info New connection to service "condtest.db" with connectionID=C#1 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#1(C#1.s#1) started on connectionID=C#1 to service "condtest.db" for user "" in read-only mode
+RalSessionMgr Info Start a read-only transaction active for the duration of the database connection
+RelationalDatabase Info Instantiate a R/O RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+ClassIDSvc           INFO  getRegistryEntries: read 1233 CLIDRegistry entries for module ALL
+IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
+IOVSvcTool           INFO IOVRanges will be checked at every Event
+IOVDbSvc             INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection
+RalSessionMgr Info Disconnect from the database server
+CORAL/Services/ConnectionService Info User session with sessionID=S#1(C#1.s#1) will be ended on connectionID=C#1
+CORAL/Services/ConnectionService Info Connection to service "condtest.db" with connectionID=C#1 will be disconnected
+RelationalDatabase Info Delete the RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Delete the RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+IOVDbSvc             INFO Added taginfo remove for /DMTest/S2
+IOVDbSvc             INFO Added taginfo remove for /DMTest/TestAttrList
+CondInputLoader      INFO Will create WriteCondHandle dependencies for the following DataObjects:
+    + ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList')
+    + ('DMTest::S2','ConditionStore+/DMTest/S2')
+HistogramPersis...WARNING Histograms saving not required.
+EventSelector        INFO  Enter McEventSelector Initialization 
+AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
+ApplicationMgr       INFO Application Manager Initialized successfully
+ApplicationMgr       INFO Application Manager Started successfully
+EventPersistenc...   INFO Added successfully Conversion service:McCnvSvc
+ClassIDSvc           INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
+EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
+EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
+ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
+IOVDbSvc             INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Connect to the database server
+CORAL/Services/ConnectionService Info New connection to service "condtest.db" with connectionID=C#2 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#2.s#1) started on connectionID=C#2 to service "condtest.db" for user "" in read-only mode
+RalSessionMgr Info Start a read-only transaction active for the duration of the database connection
+RelationalDatabase Info Instantiate a R/O RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+IOVDbSvc             INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection
+RalSessionMgr Info Disconnect from the database server
+CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#2.s#1) will be ended on connectionID=C#2
+CORAL/Services/ConnectionService Info Connection to service "condtest.db" with connectionID=C#2 will be disconnected
+RelationalDatabase Info Delete the RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Delete the RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info                           condtest.pool.root
+RootDatabase.open Info condtest.pool.root File version:60806
+ClassIDSvc           INFO  getRegistryEntries: read 35 CLIDRegistry entries for module ALL
+DMTest::CondRea...   INFO Event 0 LBN 0
+DMTest::CondRea...   INFO   xint xint (int) : 10
+DMTest::CondRea...   INFO   scond 1000
+DMTest::CondRea...   INFO   s2 0
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
+condtest.pool.root Info Database being retired...
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #0 1 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,1,0:0,l:0,b:4294967295]
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,1,0:0,l:0,b:4294967295]
+DMTest::CondRea...   INFO Event 1 LBN 0
+DMTest::CondRea...   INFO   xint xint (int) : 10
+DMTest::CondRea...   INFO   scond 1000
+DMTest::CondRea...   INFO   s2 0
+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  <<<===
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,2,0:0,l:1,b:4294967295]
+DMTest::CondRea...   INFO Event 2 LBN 1
+DMTest::CondRea...   INFO   xint xint (int) : 20
+DMTest::CondRea...   INFO   scond 2000
+DMTest::CondRea...   INFO   s2 0
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #0 3 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #3, run #0 3 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,3,0:0,l:1,b:4294967295]
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,3,0:0,l:1,b:4294967295]
+DMTest::CondRea...   INFO Event 3 LBN 1
+DMTest::CondRea...   INFO   xint xint (int) : 20
+DMTest::CondRea...   INFO   scond 2000
+DMTest::CondRea...   INFO   s2 0
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info                           condtest.pool.root
+RootDatabase.open Info condtest.pool.root File version:60806
+DMTest::CondRea...   INFO Event 4 LBN 2
+DMTest::CondRea...   INFO   xint xint (int) : 30
+DMTest::CondRea...   INFO   scond 3000
+DMTest::CondRea...   INFO   s2 100
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
+condtest.pool.root Info Database being retired...
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #0 5 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,5,0:0,l:2,b:4294967295]
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,5,0:0,l:2,b:4294967295]
+DMTest::CondRea...   INFO Event 5 LBN 2
+DMTest::CondRea...   INFO   xint xint (int) : 30
+DMTest::CondRea...   INFO   scond 3000
+DMTest::CondRea...   INFO   s2 100
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #0 6 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #6, run #0 6 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,6,0:0,l:3,b:4294967295]
+DMTest::CondRea...   INFO Event 6 LBN 3
+DMTest::CondRea...   INFO   xint xint (int) : 40
+DMTest::CondRea...   INFO   scond 4000
+DMTest::CondRea...   INFO   s2 100
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #0 7 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #7, run #0 7 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,7,0:0,l:3,b:4294967295]
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,7,0:0,l:3,b:4294967295]
+DMTest::CondRea...   INFO Event 7 LBN 3
+DMTest::CondRea...   INFO   xint xint (int) : 40
+DMTest::CondRea...   INFO   scond 4000
+DMTest::CondRea...   INFO   s2 100
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #0 8 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #8, run #0 8 events processed so far  <<<===
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info                           condtest.pool.root
+RootDatabase.open Info condtest.pool.root File version:60806
+DMTest::CondRea...   INFO Event 8 LBN 4
+DMTest::CondRea...   INFO   xint xint (int) : 50
+DMTest::CondRea...   INFO   scond 5000
+DMTest::CondRea...   INFO   s2 200
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #0 9 events processed so far  <<<===
+condtest.pool.root Info Database being retired...
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #9, run #0 9 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,9,0:0,l:4,b:4294967295]
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,9,0:0,l:4,b:4294967295]
+DMTest::CondRea...   INFO Event 9 LBN 4
+DMTest::CondRea...   INFO   xint xint (int) : 50
+DMTest::CondRea...   INFO   scond 5000
+DMTest::CondRea...   INFO   s2 200
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #0 10 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #10, run #0 10 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,10,0:0,l:5,b:4294967295]
+DMTest::CondRea...   INFO Event 10 LBN 5
+DMTest::CondRea...   INFO   xint xint (int) : 60
+DMTest::CondRea...   INFO   scond 6000
+DMTest::CondRea...   INFO   s2 200
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #0 11 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #11, run #0 11 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,11,0:0,l:5,b:4294967295]
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,11,0:0,l:5,b:4294967295]
+DMTest::CondRea...   INFO Event 11 LBN 5
+DMTest::CondRea...   INFO   xint xint (int) : 60
+DMTest::CondRea...   INFO   scond 6000
+DMTest::CondRea...   INFO   s2 200
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #0 12 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #12, run #0 12 events processed so far  <<<===
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info                           condtest.pool.root
+RootDatabase.open Info condtest.pool.root File version:60806
+DMTest::CondRea...   INFO Event 12 LBN 6
+DMTest::CondRea...   INFO   xint xint (int) : 70
+DMTest::CondRea...   INFO   scond 7000
+DMTest::CondRea...   INFO   s2 300
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #0 13 events processed so far  <<<===
+condtest.pool.root Info Database being retired...
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #13, run #0 13 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,13,0:0,l:6,b:4294967295]
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,13,0:0,l:6,b:4294967295]
+DMTest::CondRea...   INFO Event 13 LBN 6
+DMTest::CondRea...   INFO   xint xint (int) : 70
+DMTest::CondRea...   INFO   scond 7000
+DMTest::CondRea...   INFO   s2 300
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #0 14 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #14, run #0 14 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,14,0:0,l:7,b:4294967295]
+DMTest::CondRea...   INFO Event 14 LBN 7
+DMTest::CondRea...   INFO   xint xint (int) : 80
+DMTest::CondRea...   INFO   scond 8000
+DMTest::CondRea...   INFO   s2 300
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #0 15 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #15, run #0 15 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,15,0:0,l:7,b:4294967295]
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,15,0:0,l:7,b:4294967295]
+DMTest::CondRea...   INFO Event 15 LBN 7
+DMTest::CondRea...   INFO   xint xint (int) : 80
+DMTest::CondRea...   INFO   scond 8000
+DMTest::CondRea...   INFO   s2 300
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #0 16 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #16, run #0 16 events processed so far  <<<===
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info                           condtest.pool.root
+RootDatabase.open Info condtest.pool.root File version:60806
+DMTest::CondRea...   INFO Event 16 LBN 8
+DMTest::CondRea...   INFO   xint xint (int) : 90
+DMTest::CondRea...   INFO   scond 9000
+DMTest::CondRea...   INFO   s2 400
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #0 17 events processed so far  <<<===
+condtest.pool.root Info Database being retired...
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #17, run #0 17 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,17,0:0,l:8,b:4294967295]
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,17,0:0,l:8,b:4294967295]
+DMTest::CondRea...   INFO Event 17 LBN 8
+DMTest::CondRea...   INFO   xint xint (int) : 90
+DMTest::CondRea...   INFO   scond 9000
+DMTest::CondRea...   INFO   s2 400
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #0 18 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #18, run #0 18 events processed so far  <<<===
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,18,0:0,l:9,b:4294967295]
+DMTest::CondRea...   INFO Event 18 LBN 9
+DMTest::CondRea...   INFO   xint xint (int) : 100
+DMTest::CondRea...   INFO   scond 10000
+DMTest::CondRea...   INFO   s2 400
+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  <<<===
+CondInputLoader      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,19,0:0,l:9,b:4294967295]
+CondInputLoader      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,19,0:0,l:9,b:4294967295]
+DMTest::CondRea...   INFO Event 19 LBN 9
+DMTest::CondRea...   INFO   xint xint (int) : 100
+DMTest::CondRea...   INFO   scond 10000
+DMTest::CondRea...   INFO   s2 400
+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
+CondInputLoader      INFO Finalizing CondInputLoader...
+IncidentProcAlg2     INFO Finalize
+EventSelector        INFO finalize
+IOVDbSvc             INFO Folder /DMTest/S2 (PoolRef) db-read 1/5 objs/chan/bytes 10/1/1860 ((     0.02 ))s
+IOVDbSvc             INFO Folder /DMTest/TestAttrList (AttrList) db-read 1/10 objs/chan/bytes 20/1/80 ((     0.00 ))s
+IOVDbSvc             INFO Total payload read from COOL: 1940 bytes in ((      0.03 ))s
+IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
+IOVDbSvc             INFO Connection sqlite://;schema=condtest.db;dbname=OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.03 ))s
+AthDictLoaderSvc     INFO in finalize...
+ToolSvc              INFO Removing all tools created by ToolSvc
+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"
+CoralApplication Info Delete the COOL CoralApplication...
+CoralApplication Info Delete the COOL database service
+RalDatabaseSvc Info Delete the RalDatabaseSvc...
+RalDatabaseSvc Info Purge the connection pool
+RalDatabaseSvc Info Reset the ICS pointer
+RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE
+CoralApplication Info Delete the CORAL connection service
+CoralApplication Info Delete the COOL CoralApplication... DONE
+CORAL/Services/ConnectionService Info Deleting the ConnectionPool
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref b/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
new file mode 100644
index 0000000000000000000000000000000000000000..48e4e5f3ffd921f7ff5a60b3777909045377c451
--- /dev/null
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReaderMT.ref
@@ -0,0 +1,361 @@
+Tue Aug 29 22:27:11 CEST 2017
+Preloading tcmalloc_minimal.so
+Py:Athena            INFO including file "AthenaCommon/Preparation.py"
+Py:Athena            INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-dbg] [atlas-work3/314164bb34] -- built on [2017-08-29T1851]
+Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
+Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
+Py:Athena            INFO executing ROOT6Setup
+Py:Athena            INFO configuring AthenaHive with [1] concurrent threads
+Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 1 threads
+Py:Athena            INFO including file "AthenaCommon/Execution.py"
+Py:Athena            INFO including file "DataModelRunTests/CondReaderMT_jo.py"
+Py:Athena            INFO including file "DataModelRunTests/CondReader_jo.py"
+Py:Athena            INFO including file "AthenaPoolCnvSvc/AthenaPool_jobOptions.py"
+Py:ConfigurableDb    INFO Read module info for 5388 configurables from 56 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+[?1034hEventInfoMgtInit: Got release version  Athena-22.0.0
+Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
+Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+MessageSvc           INFO Activating in a separate thread
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
+                                          running on lxplus013.cern.ch on Tue Aug 29 22:27:27 2017
+====================================================================================================================================
+ApplicationMgr       INFO Successfully loaded modules : AthenaServices
+ApplicationMgr       INFO Application Manager Configured successfully
+ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+AthDictLoaderSvc                                   INFO in initialize...
+AthDictLoaderSvc                                   INFO acquired Dso-registry
+ClassIDSvc                                         INFO  getRegistryEntries: read 3550 CLIDRegistry entries for module ALL
+ChronoStatSvc                                      INFO  Number of skipped events for MemStat-1
+CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
+CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
+AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
+MetaDataSvc                                        INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
+AthenaPoolCnvSvc                                   INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+PoolSvc                                            INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
+PoolSvc                                            INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
+PoolSvc                                            INFO Frontier compression level set to 5
+DBReplicaSvc                                       INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data
+DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-08-28T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config
+DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus013.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] 
+PoolSvc                                            INFO Re-initializing PoolSvc
+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 Read from meta data only for folder /TagInfo
+IOVDbSvc                                           INFO Initialised with 2 connections and 3 folders
+IOVDbSvc                                           INFO Service IOVDbSvc initialised successfully
+ClassIDSvc                                         INFO  getRegistryEntries: read 1896 CLIDRegistry entries for module ALL
+CondInputLoader                                    INFO Initializing CondInputLoader...
+IOVDbSvc                                           INFO preLoadAddresses: Removing folder /TagInfo. It should only be in the file meta data and was not found.
+IOVDbSvc                                           INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+CoralApplication Info Create a cool::CoralApplication...
+CoralApplication Info Create a new own CORAL connection service
+CoralApplication Info Create the COOL database service
+RalDatabaseSvc Info Instantiate the RalDatabaseSvc
+CoralApplication Info Create a cool::CoralApplication... DONE
+RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Connect to the database server
+RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP
+CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0
+CORAL/Services/ConnectionService Info Loading default plugin for coral::IMonitoringService: CORAL/Services/MonitoringService
+PluginManager Info PluginManager creating CORAL/Services/MonitoringService component
+PluginManager Info PluginManager needs to load CORAL/Services/MonitoringService component
+PluginManager Info PluginManager loaded MonitoringService library
+PluginManager Info PluginManager loaded CORAL/Services/MonitoringService factory from MonitoringService library
+CORAL/Services/ConnectionService Info The connection pool automatic cleanup thread is currently explicitly disabled
+CORAL/Services/ConnectionService Info Loading default plugin for coral::IRelationalService: CORAL/Services/RelationalService
+PluginManager Info PluginManager creating CORAL/Services/RelationalService component
+PluginManager Info PluginManager needs to load CORAL/Services/RelationalService component
+PluginManager Info PluginManager loaded RelationalService library
+PluginManager Info PluginManager loaded CORAL/Services/RelationalService factory from RelationalService library
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "coral" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "frontier" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "mysql" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "oracle" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "sqlite" with native implementation
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "coral" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "frontier" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "mysql" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "oracle" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "sqlite" is native
+PluginManager Info PluginManager creating CORAL/RelationalPlugins/sqlite component
+PluginManager Info PluginManager needs to load CORAL/RelationalPlugins/sqlite component
+PluginManager Info PluginManager loaded SQLiteAccess library
+PluginManager Info PluginManager loaded CORAL/RelationalPlugins/sqlite factory from SQLiteAccess library
+CORAL/Services/ConnectionService Info New connection to service "condtest.db" with connectionID=C#1 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#1(C#1.s#1) started on connectionID=C#1 to service "condtest.db" for user "" in read-only mode
+RalSessionMgr Info Start a read-only transaction active for the duration of the database connection
+RelationalDatabase Info Instantiate a R/O RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+IOVSvc                                             INFO No IOVSvcTool associated with store "StoreGateSvc"
+IOVSvcTool                                         INFO IOVRanges will be checked at every Event
+RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection
+IOVDbSvc                                           INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+RalSessionMgr Info Disconnect from the database server
+CORAL/Services/ConnectionService Info User session with sessionID=S#1(C#1.s#1) will be ended on connectionID=C#1
+CORAL/Services/ConnectionService Info Connection to service "condtest.db" with connectionID=C#1 will be disconnected
+RelationalDatabase Info Delete the RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Delete the RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+IOVDbSvc                                           INFO Added taginfo remove for /DMTest/S2
+IOVDbSvc                                           INFO Added taginfo remove for /DMTest/TestAttrList
+CondInputLoader                                    INFO Will create WriteCondHandle dependencies for the following DataObjects:
+    + ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList')
+    + ('DMTest::S2','ConditionStore+/DMTest/S2')
+ThreadPoolSvc                                      INFO no thread init tools attached
+AvalancheSchedulerSvc                              INFO Activating scheduler in a separate thread
+AvalancheSchedulerSvc                              INFO Waiting for AvalancheSchedulerSvc to activate
+AvalancheSchedulerSvc                              INFO Start checking the actionsQueue
+AvalancheSchedulerSvc                              INFO Found 8 algorithms
+AvalancheSchedulerSvc                              INFO Data Dependencies for Algorithms:
+  BeginIncFiringAlg
+      none
+  IncidentProcAlg1
+      none
+  CondInputLoader
+    o OUTPUT ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList')
+    o OUTPUT ('DMTest::S1','ConditionStore+/DMTest/S2')
+    o OUTPUT ('DMTest::S2','ConditionStore+/DMTest/S2')
+  DMTest::CondAlg1
+    o INPUT  ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList')
+    o OUTPUT ('DMTest::S1','ConditionStore+scond')
+    o OUTPUT ('DMTest::S2','ConditionStore+scond')
+  SGInputLoader
+      none
+  DMTest::CondReaderAlg
+    o INPUT  ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList')
+    o INPUT  ('DMTest::S1','ConditionStore+/DMTest/S2')
+    o INPUT  ('DMTest::S1','ConditionStore+scond')
+    o INPUT  ('EventInfo','StoreGateSvc+McEventInfo')
+  EndIncFiringAlg
+      none
+  IncidentProcAlg2
+      none
+AvalancheSchedulerSvc                              INFO Will attribute the following unmet INPUT dependencies to "SGInputLoader/SGInputLoader" Algorithm
+   o ('EventInfo','StoreGateSvc+McEventInfo')    required by Algorithm: 
+       * DMTest::CondReaderAlg
+AvalancheSchedulerSvc                              INFO Concurrency level information:
+AvalancheSchedulerSvc                              INFO  o Number of events in flight: 1
+AvalancheSchedulerSvc                              INFO  o TBB thread pool size:  'ThreadPoolSize':1
+HistogramPersistencySvc                         WARNING Histograms saving not required.
+EventSelector                                      INFO  Enter McEventSelector Initialization 
+AthenaHiveEventLoopMgr                             INFO Setup EventSelector service EventSelector
+ApplicationMgr                                     INFO Application Manager Initialized successfully
+ApplicationMgr                                     INFO Application Manager Started successfully
+AthenaHiveEventLoopMgr                             INFO Starting loop on events
+ClassIDSvc                                         INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
+EventPersistencySvc                                INFO Added successfully Conversion service:McCnvSvc
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
+EventPersistencySvc                     0   0      INFO Added successfully Conversion service:AthenaPoolCnvSvc
+EventPersistencySvc                     0   0      INFO Added successfully Conversion service:TagInfoMgr
+ClassIDSvc                              0   0      INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
+IOVDbSvc                                0   0      INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Connect to the database server
+CORAL/Services/ConnectionService Info New connection to service "condtest.db" with connectionID=C#2 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#2.s#1) started on connectionID=C#2 to service "condtest.db" for user "" in read-only mode
+RalSessionMgr Info Start a read-only transaction active for the duration of the database connection
+RelationalDatabase Info Instantiate a R/O RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection
+IOVDbSvc                                0   0      INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200RalSessionMgr Info Disconnect from the database server
+CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#2.s#1) will be ended on connectionID=C#2
+
+CORAL/Services/ConnectionService Info Connection to service "condtest.db" with connectionID=C#2 will be disconnected
+RelationalDatabase Info Delete the RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Delete the RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 8C710BE6-EA3D-D54D-886F-4AB27AFF01E7
+Domain[ROOT_All] Info                           condtest.pool.root
+RootDatabase.open Info condtest.pool.root File version:60806
+ClassIDSvc                              0   0      INFO  getRegistryEntries: read 35 CLIDRegistry entries for module ALL
+DMTest::CondReaderAlg                   0   0      INFO Event 0 LBN 0
+DMTest::CondReaderAlg                   0   0      INFO   xint xint (int) : 10
+DMTest::CondReaderAlg                   0   0      INFO   scond 1000
+DMTest::CondReaderAlg                   0   0      INFO   s2 0
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+CondInputLoader                         1   0      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,1,0:0,l:0,b:4294967295]
+CondInputLoader                         1   0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,1,0:0,l:0,b:4294967295]
+DMTest::CondReaderAlg                   1   0      INFO Event 1 LBN 0
+DMTest::CondReaderAlg                   1   0      INFO   xint xint (int) : 10
+DMTest::CondReaderAlg                   1   0      INFO   scond 1000
+DMTest::CondReaderAlg                   1   0      INFO   s2 0
+AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+CondInputLoader                         2   0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,2,0:0,l:1,b:4294967295]
+DMTest::CondReaderAlg                   2   0      INFO Event 2 LBN 1
+DMTest::CondReaderAlg                   2   0      INFO   xint xint (int) : 20
+DMTest::CondReaderAlg                   2   0      INFO   scond 2000
+DMTest::CondReaderAlg                   2   0      INFO   s2 0
+AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+CondInputLoader                         3   0      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,3,0:0,l:1,b:4294967295]
+CondInputLoader                         3   0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,3,0:0,l:1,b:4294967295]
+DMTest::CondReaderAlg                   3   0      INFO Event 3 LBN 1
+DMTest::CondReaderAlg                   3   0      INFO   xint xint (int) : 20
+DMTest::CondReaderAlg                   3   0      INFO   scond 2000
+DMTest::CondReaderAlg                   3   0      INFO   s2 0
+AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+DMTest::CondReaderAlg                   4   0      INFO Event 4 LBN 2
+DMTest::CondReaderAlg                   4   0      INFO   xint xint (int) : 30
+DMTest::CondReaderAlg                   4   0      INFO   scond 3000
+DMTest::CondReaderAlg                   4   0      INFO   s2 100
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+CondInputLoader                         5   0      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,5,0:0,l:2,b:4294967295]
+CondInputLoader                         5   0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,5,0:0,l:2,b:4294967295]
+DMTest::CondReaderAlg                   5   0      INFO Event 5 LBN 2
+DMTest::CondReaderAlg                   5   0      INFO   xint xint (int) : 30
+DMTest::CondReaderAlg                   5   0      INFO   scond 3000
+DMTest::CondReaderAlg                   5   0      INFO   s2 100
+AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+CondInputLoader                         6   0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,6,0:0,l:3,b:4294967295]
+DMTest::CondReaderAlg                   6   0      INFO Event 6 LBN 3
+DMTest::CondReaderAlg                   6   0      INFO   xint xint (int) : 40
+DMTest::CondReaderAlg                   6   0      INFO   scond 4000
+DMTest::CondReaderAlg                   6   0      INFO   s2 100
+AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+CondInputLoader                         7   0      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,7,0:0,l:3,b:4294967295]
+CondInputLoader                         7   0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,7,0:0,l:3,b:4294967295]
+DMTest::CondReaderAlg                   7   0      INFO Event 7 LBN 3
+DMTest::CondReaderAlg                   7   0      INFO   xint xint (int) : 40
+DMTest::CondReaderAlg                   7   0      INFO   scond 4000
+DMTest::CondReaderAlg                   7   0      INFO   s2 100
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+DMTest::CondReaderAlg                   8   0      INFO Event 8 LBN 4
+DMTest::CondReaderAlg                   8   0      INFO   xint xint (int) : 50
+DMTest::CondReaderAlg                   8   0      INFO   scond 5000
+DMTest::CondReaderAlg                   8   0      INFO   s2 200
+AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+CondInputLoader                         9   0      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,9,0:0,l:4,b:4294967295]
+CondInputLoader                         9   0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,9,0:0,l:4,b:4294967295]
+DMTest::CondReaderAlg                   9   0      INFO Event 9 LBN 4
+DMTest::CondReaderAlg                   9   0      INFO   xint xint (int) : 50
+DMTest::CondReaderAlg                   9   0      INFO   scond 5000
+DMTest::CondReaderAlg                   9   0      INFO   s2 200
+AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
+CondInputLoader                         10  0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,10,0:0,l:5,b:4294967295]
+DMTest::CondReaderAlg                   10  0      INFO Event 10 LBN 5
+DMTest::CondReaderAlg                   10  0      INFO   xint xint (int) : 60
+DMTest::CondReaderAlg                   10  0      INFO   scond 6000
+DMTest::CondReaderAlg                   10  0      INFO   s2 200
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+CondInputLoader                         11  0      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,11,0:0,l:5,b:4294967295]
+CondInputLoader                         11  0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,11,0:0,l:5,b:4294967295]
+DMTest::CondReaderAlg                   11  0      INFO Event 11 LBN 5
+DMTest::CondReaderAlg                   11  0      INFO   xint xint (int) : 60
+DMTest::CondReaderAlg                   11  0      INFO   scond 6000
+DMTest::CondReaderAlg                   11  0      INFO   s2 200
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
+DMTest::CondReaderAlg                   12  0      INFO Event 12 LBN 6
+DMTest::CondReaderAlg                   12  0      INFO   xint xint (int) : 70
+DMTest::CondReaderAlg                   12  0      INFO   scond 7000
+DMTest::CondReaderAlg                   12  0      INFO   s2 300
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
+CondInputLoader                         13  0      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,13,0:0,l:6,b:4294967295]
+CondInputLoader                         13  0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,13,0:0,l:6,b:4294967295]
+DMTest::CondReaderAlg                   13  0      INFO Event 13 LBN 6
+DMTest::CondReaderAlg                   13  0      INFO   xint xint (int) : 70
+DMTest::CondReaderAlg                   13  0      INFO   scond 7000
+DMTest::CondReaderAlg                   13  0      INFO   s2 300
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
+CondInputLoader                         14  0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,14,0:0,l:7,b:4294967295]
+DMTest::CondReaderAlg                   14  0      INFO Event 14 LBN 7
+DMTest::CondReaderAlg                   14  0      INFO   xint xint (int) : 80
+DMTest::CondReaderAlg                   14  0      INFO   scond 8000
+DMTest::CondReaderAlg                   14  0      INFO   s2 300
+AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
+CondInputLoader                         15  0      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,15,0:0,l:7,b:4294967295]
+CondInputLoader                         15  0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,15,0:0,l:7,b:4294967295]
+DMTest::CondReaderAlg                   15  0      INFO Event 15 LBN 7
+DMTest::CondReaderAlg                   15  0      INFO   xint xint (int) : 80
+DMTest::CondReaderAlg                   15  0      INFO   scond 8000
+DMTest::CondReaderAlg                   15  0      INFO   s2 300
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
+DMTest::CondReaderAlg                   16  0      INFO Event 16 LBN 8
+DMTest::CondReaderAlg                   16  0      INFO   xint xint (int) : 90
+DMTest::CondReaderAlg                   16  0      INFO   scond 9000
+DMTest::CondReaderAlg                   16  0      INFO   s2 400
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
+CondInputLoader                         17  0      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,17,0:0,l:8,b:4294967295]
+CondInputLoader                         17  0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,17,0:0,l:8,b:4294967295]
+DMTest::CondReaderAlg                   17  0      INFO Event 17 LBN 8
+DMTest::CondReaderAlg                   17  0      INFO   xint xint (int) : 90
+DMTest::CondReaderAlg                   17  0      INFO   scond 9000
+DMTest::CondReaderAlg                   17  0      INFO   s2 400
+AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
+CondInputLoader                         18  0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,18,0:0,l:9,b:4294967295]
+DMTest::CondReaderAlg                   18  0      INFO Event 18 LBN 9
+DMTest::CondReaderAlg                   18  0      INFO   xint xint (int) : 100
+DMTest::CondReaderAlg                   18  0      INFO   scond 10000
+DMTest::CondReaderAlg                   18  0      INFO   s2 400
+AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
+CondInputLoader                         19  0      INFO   CondObj ('AthenaAttributeList','ConditionStore+/DMTest/TestAttrList') is still valid at [0,19,0:0,l:9,b:4294967295]
+CondInputLoader                         19  0      INFO   CondObj ('DMTest::S2','ConditionStore+/DMTest/S2') is still valid at [0,19,0:0,l:9,b:4294967295]
+DMTest::CondReaderAlg                   19  0      INFO Event 19 LBN 9
+DMTest::CondReaderAlg                   19  0      INFO   xint xint (int) : 100
+DMTest::CondReaderAlg                   19  0      INFO   scond 10000
+DMTest::CondReaderAlg                   19  0      INFO   s2 400
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO ---> Loop Finished (seconds): 0.674632
+Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
+condtest.pool.root Info Database being retired...
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 8C710BE6-EA3D-D54D-886F-4AB27AFF01E7
+Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
+ApplicationMgr                          19  0      INFO Application Manager Stopped successfully
+IncidentProcAlg1                        19  0      INFO Finalize
+CondInputLoader                         19  0      INFO Finalizing CondInputLoader...
+SGInputLoader                           19  0      INFO Finalizing SGInputLoader...
+IncidentProcAlg2                        19  0      INFO Finalize
+EventSelector                           19  0      INFO finalize
+AvalancheSchedulerSvc                   19  0      INFO Joining Scheduler thread
+AvalancheSchedulerSvc                   19  0      INFO Terminating thread-pool resources
+TimelineSvc                             19  0      INFO Outputting timeline with 160 entries to file  'TimelineFile':timeline.csv
+EventDataSvc                            19  0      INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
+IOVDbSvc                                19  0      INFO Folder /DMTest/S2 (PoolRef) db-read 1/5 objs/chan/bytes 10/1/1860 ((     0.03 ))s
+IOVDbSvc                                19  0      INFO Folder /DMTest/TestAttrList (AttrList) db-read 1/10 objs/chan/bytes 20/1/80 ((     0.00 ))s
+IOVDbSvc                                19  0      INFO Total payload read from COOL: 1940 bytes in ((      0.03 ))s
+IOVDbSvc                                19  0      INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
+IOVDbSvc                                19  0      INFO Connection sqlite://;schema=condtest.db;dbname=OFLP200 : nConnect: 2 nFolders: 2 ReadTime: ((     0.03 ))s
+AthDictLoaderSvc                        19  0      INFO in finalize...
+ToolSvc                                 19  0      INFO Removing all tools created by ToolSvc
+ChronoStatSvc.finalize()                19  0      INFO  Service finalized successfully 
+ApplicationMgr                          19  0      INFO Application Manager Finalized successfully
+ApplicationMgr                          19  0      INFO Application Manager Terminated successfully
+Py:Athena            INFO leaving with code 0: "successful run"
+CoralApplication Info Delete the COOL CoralApplication...
+CoralApplication Info Delete the COOL database service
+RalDatabaseSvc Info Delete the RalDatabaseSvc...
+RalDatabaseSvc Info Purge the connection pool
+RalDatabaseSvc Info Reset the ICS pointer
+RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE
+CoralApplication Info Delete the CORAL connection service
+CoralApplication Info Delete the COOL CoralApplication... DONE
+CORAL/Services/ConnectionService Info Deleting the ConnectionPool
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReaderMT_jo.py b/Control/DataModelTest/DataModelRunTests/share/CondReaderMT_jo.py
new file mode 100644
index 0000000000000000000000000000000000000000..1386ff677679c3e78322ec1b14f22068a613c2bc
--- /dev/null
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReaderMT_jo.py
@@ -0,0 +1,10 @@
+#
+# $Id$
+#
+# File: DataModelRunTests/share/CondReaderMT_jo.py
+# Author: snyder@bnl.gov
+# Date: Jul 2017
+# Purpose: Test conditions reading in hive.
+#
+
+include ('DataModelRunTests/CondReader_jo.py')
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondReader_jo.py b/Control/DataModelTest/DataModelRunTests/share/CondReader_jo.py
new file mode 100644
index 0000000000000000000000000000000000000000..908820794ee48f74ee32e75fa32dbcf95ad7c1da
--- /dev/null
+++ b/Control/DataModelTest/DataModelRunTests/share/CondReader_jo.py
@@ -0,0 +1,102 @@
+#
+# $Id$
+#
+# File: share/CondReader_jo.py
+# Author: snyder@bnl.gov
+# Date: Jul 2017
+# Purpose: Test conditions handling.
+#
+
+## basic job configuration (for generator)
+import AthenaCommon.AtlasUnixGeneratorJob
+
+## get a handle to the default top-level algorithm sequence
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+## get a handle to the ApplicationManager
+from AthenaCommon.AppMgr import theApp
+
+
+#--------------------------------------------------------------
+# Load POOL support
+#--------------------------------------------------------------
+include( "AthenaPoolCnvSvc/AthenaPool_jobOptions.py" )
+import ROOT
+import cppyy
+cppyy.loadDictionary("libDataModelTestDataCommonDict")
+ROOT.DMTest.B
+ROOT.DMTest.setConverterLibrary ('libDataModelTestDataWriteCnvPoolCnv.so')
+
+
+#--------------------------------------------------------------
+# Conditions setup.
+#--------------------------------------------------------------
+
+from IOVSvc.IOVSvcConf import CondSvc 
+svcMgr += CondSvc()
+
+from AthenaCommon.AlgSequence import AthSequencer 
+condSeq = AthSequencer("AthCondSeq") 
+
+from IOVSvc.IOVSvcConf import CondInputLoader 
+condSeq += CondInputLoader( "CondInputLoader") 
+
+import StoreGate.StoreGateConf as StoreGateConf 
+svcMgr += StoreGateConf.StoreGateSvc("ConditionStore") 
+
+from IOVDbSvc.CondDB import conddb
+conddb.addFolder ('condtest.db', '/DMTest/TestAttrList <tag>tag AttrList_noTag</tag>',
+                  className='AthenaAttributeList')
+conddb.addFolder ('condtest.db', '/DMTest/S2 <tag>tag S2_noTag</tag>',
+                  className='DMTest::S2')
+
+
+#--------------------------------------------------------------
+# Event related parameters
+#--------------------------------------------------------------
+theApp.EvtMax = 20
+
+
+#--------------------------------------------------------------
+# Set up the algorithm.
+#--------------------------------------------------------------
+
+
+from AthenaCommon.ConcurrencyFlags import jobproperties as jp
+nThreads = jp.ConcurrencyFlags.NumThreads()
+if nThreads >= 1:
+  from AthenaCommon.AlgScheduler import AlgScheduler
+  AlgScheduler.ShowDataDependencies (True)
+  AlgScheduler.setDataLoaderAlg ('SGInputLoader')
+
+  from SGComps.SGCompsConf import SGInputLoader
+  topSequence += SGInputLoader( OutputLevel=INFO, ShowEventDump=False )
+
+
+from DataModelTestDataCommon.DataModelTestDataCommonConf import \
+     DMTest__CondReaderAlg, DMTest__CondAlg1
+topSequence += DMTest__CondReaderAlg()
+
+
+from AthenaCommon.AlgSequence import AthSequencer             
+condSequence = AthSequencer("AthCondSeq")             
+condSequence += DMTest__CondAlg1()
+
+
+#--------------------------------------------------------------
+# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
+#--------------------------------------------------------------
+svcMgr.MessageSvc.OutputLevel = 3
+svcMgr.MessageSvc.debugLimit  = 100000
+svcMgr.ClassIDSvc.OutputLevel = 3
+
+# No stats printout
+ChronoStatSvc = Service( "ChronoStatSvc" )
+ChronoStatSvc.ChronoPrintOutTable = FALSE
+ChronoStatSvc.PrintUserTime       = FALSE
+ChronoStatSvc.StatPrintOutTable   = FALSE
+
+# Increment LBN every two events.
+from McEventSelector import McEventSelectorConf
+svcMgr+=McEventSelectorConf.McEventSelector('EventSelector',EventsPerLB=2)
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref b/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref
new file mode 100644
index 0000000000000000000000000000000000000000..cc8a5d0b8e0947a796859ca6b6d541e088b94d5c
--- /dev/null
+++ b/Control/DataModelTest/DataModelRunTests/share/CondWriter.ref
@@ -0,0 +1,199 @@
+Sat Aug 19 19:56:17 CEST 2017
+Preloading tcmalloc_minimal.so
+Py:Athena            INFO including file "AthenaCommon/Preparation.py"
+Py:Athena            INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-dbg] [atlas-work3/3a9dcda165] -- built on [2017-08-19T1734]
+Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
+Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
+Py:Athena            INFO executing ROOT6Setup
+Py:Athena            INFO including file "AthenaCommon/Execution.py"
+Py:Athena            INFO including file "DataModelRunTests/CondWriter_jo.py"
+Py:ConfigurableDb    INFO Read module info for 5387 configurables from 56 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
+[?1034hEventInfoMgtInit: Got release version  Athena-22.0.0
+Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+ApplicationMgr    SUCCESS 
+====================================================================================================================================
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
+                                          running on lxplus047.cern.ch on Sat Aug 19 19:56:37 2017
+====================================================================================================================================
+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 3098 CLIDRegistry entries for module ALL
+ChronoStatSvc        INFO  Number of skipped events for MemStat-1
+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 379 CLIDRegistry entries for module ALL
+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/2017-08-18T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus047.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+PoolSvc              INFO Successfully setup replica sorting algorithm
+PoolSvc              INFO Setting up APR FileCatalog and Streams
+PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
+PoolSvc              INFO Re-initializing PoolSvc
+IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
+IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
+IOVDbSvc             INFO Read from meta data only for folder /TagInfo
+IOVDbSvc             INFO Initialised with 1 connections and 1 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.
+DMTest::CondWri...   INFO Initializing DMTest::CondWriterAlg.CondStream - package version OutputStreamAthenaPool-00-00-00
+HistogramPersis...WARNING Histograms saving not required.
+EventSelector        INFO  Enter McEventSelector Initialization 
+AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
+ApplicationMgr       INFO Application Manager Initialized successfully
+ApplicationMgr       INFO Application Manager Started successfully
+EventPersistenc...   INFO Added successfully Conversion service:McCnvSvc
+ClassIDSvc           INFO  getRegistryEntries: read 2188 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
+EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
+EventPersistenc...   INFO Added successfully Conversion service:TagInfoMgr
+ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
+IOVDbSvc             INFO Opening COOL connection for sqlite://;schema=condtest.db;dbname=OFLP200
+CoralApplication Info Create a cool::CoralApplication...
+CoralApplication Info Create a new own CORAL connection service
+CoralApplication Info Create the COOL database service
+RalDatabaseSvc Info Instantiate the RalDatabaseSvc
+CoralApplication Info Create a cool::CoralApplication... DONE
+RalSessionMgr Info Instantiate a R/W RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Connect to the database server
+RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP
+CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0
+CORAL/Services/ConnectionService Info Loading default plugin for coral::IMonitoringService: CORAL/Services/MonitoringService
+PluginManager Info PluginManager creating CORAL/Services/MonitoringService component
+PluginManager Info PluginManager needs to load CORAL/Services/MonitoringService component
+PluginManager Info PluginManager loaded MonitoringService library
+PluginManager Info PluginManager loaded CORAL/Services/MonitoringService factory from MonitoringService library
+CORAL/Services/ConnectionService Info The connection pool automatic cleanup thread is currently explicitly disabled
+CORAL/Services/ConnectionService Info Loading default plugin for coral::IRelationalService: CORAL/Services/RelationalService
+PluginManager Info PluginManager creating CORAL/Services/RelationalService component
+PluginManager Info PluginManager needs to load CORAL/Services/RelationalService component
+PluginManager Info PluginManager loaded RelationalService library
+PluginManager Info PluginManager loaded CORAL/Services/RelationalService factory from RelationalService library
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "coral" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "frontier" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "mysql" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "oracle" with native implementation
+CORAL/Services/RelationalService Info Found plugin for RDBMS technology "sqlite" with native implementation
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "coral" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "frontier" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "mysql" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "oracle" is native
+CORAL/Services/RelationalService Info Default implementation for RDBMS technology "sqlite" is native
+PluginManager Info PluginManager creating CORAL/RelationalPlugins/sqlite component
+PluginManager Info PluginManager needs to load CORAL/RelationalPlugins/sqlite component
+PluginManager Info PluginManager loaded SQLiteAccess library
+PluginManager Info PluginManager loaded CORAL/RelationalPlugins/sqlite factory from SQLiteAccess library
+CORAL/Services/ConnectionService Info New connection to service "condtest.db" with connectionID=C#1 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#1(C#1.s#1) started on connectionID=C#1 to service "condtest.db" for user "" in update mode
+RelationalDatabase Info Instantiate a R/W RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RelationalDatabase Info Delete the RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Delete the RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Disconnect from the database server
+CORAL/Services/ConnectionService Info User session with sessionID=S#1(C#1.s#1) will be ended on connectionID=C#1
+CORAL/Services/ConnectionService Info Connection to service "condtest.db" with connectionID=C#1 will be disconnected
+IOVDbSvc             INFO *** COOL  exception caught: The database does not exist
+IOVDbSvc             INFO Create a new conditions database: sqlite://;schema=condtest.db;dbname=OFLP200
+RalSessionMgr Info Instantiate a R/W RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Connect to the database server
+CORAL/Services/ConnectionService Info New connection to service "condtest.db" with connectionID=C#2 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#2.s#1) started on connectionID=C#2 to service "condtest.db" for user "" in update mode
+RelationalDatabase Info Instantiate a R/W RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     UPDATE    [ROOT_All] 
+Domain[ROOT_All] Info ->  Access   DbDatabase   CREATE    [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info                           condtest.pool.root
+RootDatabase.open Info condtest.pool.root File version:60806
+StorageSvc Info Building shape according to reflection information using shape ID for:
+StorageSvc Info DMTest::S2 [EC2D9BCD-4B99-41EB-A799-82BAF48887FC]
+StorageSvc Info Building shape according to reflection information using shape ID for:
+StorageSvc Info DataHeaderForm_p5 [3397D8A3-BBE6-463C-9F8E-4B3DFD8831FE]
+StorageSvc Info Building shape according to reflection information using shape ID for:
+StorageSvc Info DataHeader_p5 [D82968A1-CF91-4320-B2DD-E0F739CBC7E6]
+ClassIDSvc           INFO  getRegistryEntries: read 37 CLIDRegistry entries for module ALL
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #0 1 events processed so far  <<<===
+IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
+IOVSvcTool           INFO IOVRanges will be checked at every Event
+ClassIDSvc           INFO  getRegistryEntries: read 268 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  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #3, run #0 3 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #0 5 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #0 6 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #6, run #0 6 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #0 7 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #7, run #0 7 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #0 8 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #8, run #0 8 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #0 9 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #9, run #0 9 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #0 10 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #10, run #0 10 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #0 11 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #11, run #0 11 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #0 12 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #12, run #0 12 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #0 13 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #13, run #0 13 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #0 14 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #14, run #0 14 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #0 15 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #15, run #0 15 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #0 16 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #16, run #0 16 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #0 17 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #17, run #0 17 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #0 18 events processed so far  <<<===
+AthenaEventLoopMgr   INFO   ===>>>  start processing event #18, run #0 18 events processed so far  <<<===
+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] 
+condtest.pool.root Info Database being retired...
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   CREATE    [ROOT_All] D62E9950-7478-7B4D-90AD-35552387901E
+Domain[ROOT_All] Info >   Deaccess DbDomain     UPDATE    [ROOT_All] 
+ApplicationMgr       INFO Application Manager Stopped successfully
+IncidentProcAlg1     INFO Finalize
+IncidentProcAlg2     INFO Finalize
+EventSelector        INFO finalize
+IOVDbSvc             INFO Total payload read from COOL: 0 bytes in ((      0.00 ))s
+IOVDbSvc             INFO Disconnecting from sqlite://;schema=condtest.db;dbname=OFLP200
+RalSessionMgr Info Disconnect from the database server
+CORAL/Services/ConnectionService Info User session with sessionID=S#2(C#2.s#1) will be ended on connectionID=C#2
+CORAL/Services/ConnectionService Info Connection to service "condtest.db" with connectionID=C#2 will be disconnected
+RelationalDatabase Info Delete the RalDatabase for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+RalSessionMgr Info Delete the RalSessionMgr for 'sqlite://;schema=condtest.db;dbname=OFLP200'
+IOVDbSvc             INFO Connection sqlite://;schema=condtest.db;dbname=OFLP200 : nConnect: 1 nFolders: 0 ReadTime: ((     0.00 ))s
+AthDictLoaderSvc     INFO in finalize...
+ToolSvc              INFO Removing all tools created by ToolSvc
+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"
+CoralApplication Info Delete the COOL CoralApplication...
+CoralApplication Info Delete the COOL database service
+RalDatabaseSvc Info Delete the RalDatabaseSvc...
+RalDatabaseSvc Info Purge the connection pool
+RalDatabaseSvc Info Reset the ICS pointer
+RalDatabaseSvc Info Delete the RalDatabaseSvc... DONE
+CoralApplication Info Delete the CORAL connection service
+CoralApplication Info Delete the COOL CoralApplication... DONE
+CORAL/Services/ConnectionService Info Deleting the ConnectionPool
diff --git a/Control/DataModelTest/DataModelRunTests/share/CondWriter_jo.py b/Control/DataModelTest/DataModelRunTests/share/CondWriter_jo.py
new file mode 100644
index 0000000000000000000000000000000000000000..9ab72c28f09547262af6aeedc6e4f010675ffdc4
--- /dev/null
+++ b/Control/DataModelTest/DataModelRunTests/share/CondWriter_jo.py
@@ -0,0 +1,79 @@
+#
+# $Id$
+#
+# File: share/CondWriter_jo.py
+# Author: snyder@bnl.gov
+# Date: Jul 2017
+# Purpose: Write some conditions objects for testing purposes.
+#
+
+## basic job configuration (for generator)
+import AthenaCommon.AtlasUnixGeneratorJob
+
+## get a handle to the default top-level algorithm sequence
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+## get a handle to the ApplicationManager
+from AthenaCommon.AppMgr import theApp
+
+
+#--------------------------------------------------------------
+# Load POOL support
+#--------------------------------------------------------------
+import AthenaPoolCnvSvc.WriteAthenaPool
+
+
+#--------------------------------------------------------------
+# Event related parameters
+#--------------------------------------------------------------
+theApp.EvtMax = 20
+
+#--------------------------------------------------------------
+# Output options
+#--------------------------------------------------------------
+import ROOT
+import cppyy
+cppyy.loadDictionary("libDataModelTestDataCommonDict")
+ROOT.DMTest.B
+ROOT.DMTest.setConverterLibrary ('libDataModelTestDataWriteCnvPoolCnv.so')
+
+
+#--------------------------------------------------------------
+
+
+from OutputStreamAthenaPool.OutputStreamAthenaPoolConf import AthenaPoolOutputStreamTool
+condstream = AthenaPoolOutputStreamTool ('CondStream',
+                                         OutputFile = 'condtest.pool.root',
+                                         PoolContainerPrefix = 'ConditionsContainer')
+
+from DataModelTestDataCommon.DataModelTestDataCommonConf import \
+     DMTest__CondWriterAlg
+topSequence += DMTest__CondWriterAlg (Streamer = condstream)
+
+
+# Configure conditions DB output to local sqlite file.
+try:
+    os.remove('condtest.db')
+except OSError:
+    pass
+try:
+    os.remove('condtest.pool.root')
+except OSError:
+    pass
+import IOVDbSvc.IOVDb
+svcMgr.IOVDbSvc.dbConnection  = "sqlite://;schema=condtest.db;dbname=OFLP200"
+
+
+#--------------------------------------------------------------
+# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
+#--------------------------------------------------------------
+svcMgr.MessageSvc.OutputLevel = 3
+svcMgr.MessageSvc.debugLimit  = 100000
+svcMgr.ClassIDSvc.OutputLevel = 3
+
+# No stats printout
+ChronoStatSvc = Service( "ChronoStatSvc" )
+ChronoStatSvc.ChronoPrintOutTable = FALSE
+ChronoStatSvc.PrintUserTime       = FALSE
+ChronoStatSvc.StatPrintOutTable   = FALSE
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1.ref
index 65f351bd33f2497a99aef48314bde86e1980f1f1..171a2a2c194412924ccd9bef3090e2fe9ceec60b 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1.ref
@@ -1,25 +1,21 @@
-Tue Apr 18 23:47:47 CEST 2017
-Preloading tcmalloc_minimal.so
+Wed Jun 21 16:19:12 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-dbg] [mt-sss/f56767d765] -- built on [2017-04-18T2153]
+Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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/xAODTestDecorHandle1_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5299 configurables from 28 genConfDb files
-Py:ConfigurableDb WARNING Found 1 duplicates among the 28 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -DMTest__xAODTestDecor: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataRead.DataModelTestDataReadConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
+Py:ConfigurableDb    INFO Read module info for 442 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
-                                          running on lxplus064.cern.ch on Tue Apr 18 23:48:11 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Jun 21 16:19:25 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -27,14 +23,14 @@ 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 2307 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2409 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 5965 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 56 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 359 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7129 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 58 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 366 CLIDRegistry entries for module ALL
 HistogramPersis...WARNING Histograms saving not required.
 EventSelector        INFO  Enter McEventSelector Initialization 
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
@@ -43,7 +39,7 @@ 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 104 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 106 CLIDRegistry entries for module ALL
 xAODTestReadDecor    INFO cvec.dInt1: 401 402 403 404 405 406 407 408 409 410
 xAODTestReadDecor    INFO cinfo.dInt1: 3000
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
@@ -60,7 +56,7 @@ xAODTestReadDecor    INFO cvec.dInt1: 1601 1602 1603 1604 1605 1606 1607 1608 16
 xAODTestReadDecor    INFO cinfo.dInt1: 12000
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
-xAODTestReadDecor    INFO cvec.dInt1: 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
+xAODTestReadDecor    INFO cvec.dInt1:
 xAODTestReadDecor    INFO cinfo.dInt1: 15000
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #0 5 events processed so far  <<<===
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref
index 7b0beb84e6f76671b09176c9eab905fb3093b6ad..7d52f6ed01e7ff9c35a8d79e5c9c4c2ffa0068ea 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle1MT.ref
@@ -1,7 +1,7 @@
-Thu Jul  6 15:07:13 CEST 2017
-Preloading tcmalloc_minimal.so
+Tue Aug 29 16:03:31 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.0] [x86_64-slc6-gcc62-opt] [atlas-work3g/22c15a400d] -- built on [2017-07-06T1502]
+Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
@@ -10,28 +10,29 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestDecorHandle1MT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestDecorHandle1_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5355 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 461 configurables from 2 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
+# setting LC_ALL to "C"
+ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
-                                          running on lxplus064.cern.ch on Thu Jul  6 15:07:36 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Tue Aug 29 16:03:37 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                   INFO in initialize...
 AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 2845 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 2902 CLIDRegistry entries for module ALL
 ChronoStatSvc                                      INFO  Number of skipped events for MemStat-1
 CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
 CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                         INFO  getRegistryEntries: read 6680 CLIDRegistry entries for module ALL
-ClassIDSvc                                         INFO  getRegistryEntries: read 59 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 7844 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 61 CLIDRegistry entries for module ALL
 ThreadPoolSvc                                      INFO no thread init tools attached
 AvalancheSchedulerSvc                              INFO Activating scheduler in a separate thread
 AvalancheSchedulerSvc                              INFO Waiting for AvalancheSchedulerSvc to activate
@@ -90,102 +91,102 @@ AthenaHiveEventLoopMgr                             INFO Setup EventSelector serv
 ApplicationMgr                                     INFO Application Manager Initialized successfully
 ApplicationMgr                                     INFO Application Manager Started successfully
 AthenaHiveEventLoopMgr                             INFO Starting loop on events
+ClassIDSvc                                         INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
 EventPersistencySvc                                INFO Added successfully Conversion service:McCnvSvc
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start of run 0    <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
 xAODTestReadDecor                       0   0      INFO cvec.dInt1: 401 402 403 404 405 406 407 408 409 410
 xAODTestReadDecor                       0   0      INFO cinfo.dInt1: 3000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
 xAODTestReadDecor                       1   0      INFO cvec.dInt1: 801 802 803 804 805 806 807 808 809 810
 xAODTestReadDecor                       1   0      INFO cinfo.dInt1: 6000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
 xAODTestReadDecor                       2   0      INFO cvec.dInt1: 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
 xAODTestReadDecor                       2   0      INFO cinfo.dInt1: 9000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
 xAODTestReadDecor                       3   0      INFO cvec.dInt1: 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610
 xAODTestReadDecor                       3   0      INFO cinfo.dInt1: 12000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
-xAODTestReadDecor                       4   0      INFO cvec.dInt1: 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
+AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+xAODTestReadDecor                       4   0      INFO cvec.dInt1:
 xAODTestReadDecor                       4   0      INFO cinfo.dInt1: 15000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
 xAODTestReadDecor                       5   0      INFO cvec.dInt1: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
 xAODTestReadDecor                       5   0      INFO cinfo.dInt1: 18000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
 xAODTestReadDecor                       6   0      INFO cvec.dInt1: 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810
 xAODTestReadDecor                       6   0      INFO cinfo.dInt1: 21000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
 xAODTestReadDecor                       7   0      INFO cvec.dInt1: 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210
 xAODTestReadDecor                       7   0      INFO cinfo.dInt1: 24000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
 xAODTestReadDecor                       8   0      INFO cvec.dInt1: 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610
 xAODTestReadDecor                       8   0      INFO cinfo.dInt1: 27000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
 xAODTestReadDecor                       9   0      INFO cvec.dInt1: 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
 xAODTestReadDecor                       9   0      INFO cinfo.dInt1: 30000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
 xAODTestReadDecor                       10  0      INFO cvec.dInt1: 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410
 xAODTestReadDecor                       10  0      INFO cinfo.dInt1: 33000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
 xAODTestReadDecor                       11  0      INFO cvec.dInt1: 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810
 xAODTestReadDecor                       11  0      INFO cinfo.dInt1: 36000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
 xAODTestReadDecor                       12  0      INFO cvec.dInt1: 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210
 xAODTestReadDecor                       12  0      INFO cinfo.dInt1: 39000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
 xAODTestReadDecor                       13  0      INFO cvec.dInt1: 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610
 xAODTestReadDecor                       13  0      INFO cinfo.dInt1: 42000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
 xAODTestReadDecor                       14  0      INFO cvec.dInt1: 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010
 xAODTestReadDecor                       14  0      INFO cinfo.dInt1: 45000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
 xAODTestReadDecor                       15  0      INFO cvec.dInt1: 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410
 xAODTestReadDecor                       15  0      INFO cinfo.dInt1: 48000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
 xAODTestReadDecor                       16  0      INFO cvec.dInt1: 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810
 xAODTestReadDecor                       16  0      INFO cinfo.dInt1: 51000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
 xAODTestReadDecor                       17  0      INFO cvec.dInt1: 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210
 xAODTestReadDecor                       17  0      INFO cinfo.dInt1: 54000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
 xAODTestReadDecor                       18  0      INFO cvec.dInt1: 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610
 xAODTestReadDecor                       18  0      INFO cinfo.dInt1: 57000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
 xAODTestReadDecor                       19  0      INFO cvec.dInt1: 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010
 xAODTestReadDecor                       19  0      INFO cinfo.dInt1: 60000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 0.316258
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-IncidentProcAlg2                                   INFO Finalize
-EventSelector                                      INFO finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO ---> Loop Finished (seconds): 0.22342
+ApplicationMgr                          19  0      INFO Application Manager Stopped successfully
+IncidentProcAlg1                        19  0      INFO Finalize
+SGInputLoader                           19  0      INFO Finalizing SGInputLoader...
+IncidentProcAlg2                        19  0      INFO Finalize
+EventSelector                           19  0      INFO finalize
+AvalancheSchedulerSvc                   19  0   VERBOSE Joining Scheduler thread
 AvalancheSchedulerSvc                   19  0      INFO Terminating thread-pool resources
-TimelineSvc                                        INFO Outputting timeline with 200 entries to file  'TimelineFile':timeline.csv
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+TimelineSvc                             19  0      INFO Outputting timeline with 200 entries to file  'TimelineFile':timeline.csv
+EventDataSvc                            19  0      INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
+AthDictLoaderSvc                        19  0      INFO in finalize...
+ToolSvc                                 19  0      INFO Removing all tools created by ToolSvc
+ChronoStatSvc.finalize()                19  0      INFO  Service finalized successfully 
+ApplicationMgr                          19  0      INFO Application Manager Finalized successfully
+ApplicationMgr                          19  0      INFO Application Manager Terminated successfully
 Py:Athena            INFO leaving with code 0: "successful run"
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2.ref
index 94cc2291e2e88d42d6eaa88624f9ae69975353cb..8114a0f6dbc7e48c361739dc0d16126c2c545062 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2.ref
@@ -1,25 +1,21 @@
-Tue Apr 18 22:15:12 CEST 2017
-Preloading tcmalloc_minimal.so
+Wed Jun 21 16:27:03 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-dbg] [mt-sss/f56767d765] -- built on [2017-04-18T2153]
+Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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/xAODTestDecorHandle2_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5299 configurables from 28 genConfDb files
-Py:ConfigurableDb WARNING Found 1 duplicates among the 28 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -DMTest__xAODTestDecor: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataRead.DataModelTestDataReadConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
+Py:ConfigurableDb    INFO Read module info for 442 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
-                                          running on lxplus064.cern.ch on Tue Apr 18 22:15:41 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Jun 21 16:27:28 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -27,20 +23,20 @@ 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 8922 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9499 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 362 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 312 CLIDRegistry entries for module ALL
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://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/master/2017-04-16T2225/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus064.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
@@ -51,9 +47,9 @@ EventSelector        INFO reinitialization...
 EventSelector        INFO EventSelection with query 
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 34D69590-F6F3-E14D-8BD0-F8F2BEB9506F
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
+RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
@@ -69,25 +65,25 @@ HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 34D69590-F6F3-E14D-8BD0-F8F2BEB9506F
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 34D69590-F6F3-E14D-8BD0-F8F2BEB9506F
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
+RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 ApplicationMgr       INFO Application Manager Started successfully
-ClassIDSvc           INFO  getRegistryEntries: read 1067 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1063 CLIDRegistry entries for module ALL
 AthenaPoolConve...   INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
 xAODTestReadDecor    INFO cvec.dInt1: 401 402 403 404 405 406 407 408 409 410
 xAODTestReadDecor    INFO cinfo.dInt1: 3000
-ClassIDSvc           INFO  getRegistryEntries: read 50 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #0 1 events processed so far  <<<===
 xAODTestReadDecor    INFO cvec.dInt1: 801 802 803 804 805 806 807 808 809 810
@@ -102,7 +98,7 @@ xAODTestReadDecor    INFO cvec.dInt1: 1601 1602 1603 1604 1605 1606 1607 1608 16
 xAODTestReadDecor    INFO cinfo.dInt1: 12000
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
-xAODTestReadDecor    INFO cvec.dInt1: 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
+xAODTestReadDecor    INFO cvec.dInt1:
 xAODTestReadDecor    INFO cinfo.dInt1: 15000
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #0 5 events processed so far  <<<===
@@ -166,7 +162,7 @@ xAODTestReadDecor    INFO cvec.dInt1: 8001 8002 8003 8004 8005 8006 8007 8008 80
 xAODTestReadDecor    INFO cinfo.dInt1: 60000
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 34D69590-F6F3-E14D-8BD0-F8F2BEB9506F
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
 IncidentProcAlg2     INFO Finalize
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref
index 948b9c235e812c260bad5dbad2022926783e03e3..8fc2dc08efa8917e785c388f2d9d3a1e9399ffa4 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestDecorHandle2MT.ref
@@ -1,7 +1,7 @@
-Thu Jul  6 15:07:15 CEST 2017
-Preloading tcmalloc_minimal.so
+Tue Aug 29 16:02:19 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.0] [x86_64-slc6-gcc62-opt] [atlas-work3g/22c15a400d] -- built on [2017-07-06T1502]
+Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
@@ -10,22 +10,23 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestDecorHandle2MT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestDecorHandle2_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5355 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 461 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-[?1034hPy:Athena            INFO including file "AthenaCommon/runbatch.py"
+Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
-                                          running on lxplus064.cern.ch on Thu Jul  6 15:07:41 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Tue Aug 29 16:02:29 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                   INFO in initialize...
 AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 9844 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 10328 CLIDRegistry entries for module ALL
 ChronoStatSvc                                      INFO  Number of skipped events for MemStat-1
 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) 
@@ -35,9 +36,9 @@ AthenaPoolCnvSvc                                   INFO Initializing AthenaPoolC
 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/2017-07-05T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus064.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                       INFO Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc                                       INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                       INFO Total of 1 servers found for host unknown [atlas_dd ]
 PoolSvc                                            INFO Successfully setup replica sorting algorithm
 PoolSvc                                            INFO Setting up APR FileCatalog and Streams
 PoolSvc                                            INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
@@ -48,21 +49,21 @@ EventSelector                                      INFO reinitialization...
 EventSelector                                      INFO EventSelection with query 
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] AD66940D-70D8-0844-BBEB-B2FA49C6FE32
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 85E762FA-DAE7-6D47-8B78-A523D218DBEB
 Domain[ROOT_All] Info                           xaoddata.root
 RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 EventPersistencySvc                                INFO Added successfully Conversion service:AthenaPoolCnvSvc
-RootCollection Info Opening Collection File xaoddata.root in mode: READ
 EventSelector                                      INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00
 EventSelector                                      INFO reinitialization...
 EventSelector                                      INFO EventSelection with query 
+RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 AthenaPoolAddressProviderSvc                       INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-00-00
-ClassIDSvc                                         INFO  getRegistryEntries: read 1487 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 1402 CLIDRegistry entries for module ALL
 ThreadPoolSvc                                      INFO no thread init tools attached
 AvalancheSchedulerSvc                              INFO Activating scheduler in a separate thread
 AvalancheSchedulerSvc                              INFO Waiting for AvalancheSchedulerSvc to activate
@@ -94,12 +95,12 @@ HistogramPersistencySvc                         WARNING Histograms saving not re
 AthenaHiveEventLoopMgr                             INFO Setup EventSelector service EventSelector
 ApplicationMgr                                     INFO Application Manager Initialized successfully
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] AD66940D-70D8-0844-BBEB-B2FA49C6FE32
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 85E762FA-DAE7-6D47-8B78-A523D218DBEB
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] AD66940D-70D8-0844-BBEB-B2FA49C6FE32
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 85E762FA-DAE7-6D47-8B78-A523D218DBEB
 Domain[ROOT_All] Info                           xaoddata.root
 RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
@@ -107,105 +108,105 @@ ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 ApplicationMgr                                     INFO Application Manager Started successfully
 AthenaHiveEventLoopMgr                             INFO Starting loop on events
 AthenaPoolConverter                                INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start of run 0    <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
+ClassIDSvc                              0   0      INFO  getRegistryEntries: read 16 CLIDRegistry entries for module ALL
 xAODTestReadDecor                       0   0      INFO cvec.dInt1: 401 402 403 404 405 406 407 408 409 410
 xAODTestReadDecor                       0   0      INFO cinfo.dInt1: 3000
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 50 CLIDRegistry entries for module ALL
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+ClassIDSvc                              0   0      INFO  getRegistryEntries: read 54 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
 xAODTestReadDecor                       1   0      INFO cvec.dInt1: 801 802 803 804 805 806 807 808 809 810
 xAODTestReadDecor                       1   0      INFO cinfo.dInt1: 6000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
 xAODTestReadDecor                       2   0      INFO cvec.dInt1: 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
 xAODTestReadDecor                       2   0      INFO cinfo.dInt1: 9000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
 xAODTestReadDecor                       3   0      INFO cvec.dInt1: 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610
 xAODTestReadDecor                       3   0      INFO cinfo.dInt1: 12000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
-xAODTestReadDecor                       4   0      INFO cvec.dInt1: 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
+AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+xAODTestReadDecor                       4   0      INFO cvec.dInt1:
 xAODTestReadDecor                       4   0      INFO cinfo.dInt1: 15000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
 xAODTestReadDecor                       5   0      INFO cvec.dInt1: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
 xAODTestReadDecor                       5   0      INFO cinfo.dInt1: 18000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
 xAODTestReadDecor                       6   0      INFO cvec.dInt1: 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810
 xAODTestReadDecor                       6   0      INFO cinfo.dInt1: 21000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
 xAODTestReadDecor                       7   0      INFO cvec.dInt1: 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210
 xAODTestReadDecor                       7   0      INFO cinfo.dInt1: 24000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
 xAODTestReadDecor                       8   0      INFO cvec.dInt1: 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610
 xAODTestReadDecor                       8   0      INFO cinfo.dInt1: 27000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
 xAODTestReadDecor                       9   0      INFO cvec.dInt1: 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
 xAODTestReadDecor                       9   0      INFO cinfo.dInt1: 30000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
 xAODTestReadDecor                       10  0      INFO cvec.dInt1: 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410
 xAODTestReadDecor                       10  0      INFO cinfo.dInt1: 33000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
 xAODTestReadDecor                       11  0      INFO cvec.dInt1: 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810
 xAODTestReadDecor                       11  0      INFO cinfo.dInt1: 36000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
 xAODTestReadDecor                       12  0      INFO cvec.dInt1: 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210
 xAODTestReadDecor                       12  0      INFO cinfo.dInt1: 39000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
 xAODTestReadDecor                       13  0      INFO cvec.dInt1: 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610
 xAODTestReadDecor                       13  0      INFO cinfo.dInt1: 42000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
 xAODTestReadDecor                       14  0      INFO cvec.dInt1: 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010
 xAODTestReadDecor                       14  0      INFO cinfo.dInt1: 45000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
 xAODTestReadDecor                       15  0      INFO cvec.dInt1: 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410
 xAODTestReadDecor                       15  0      INFO cinfo.dInt1: 48000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
 xAODTestReadDecor                       16  0      INFO cvec.dInt1: 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810
 xAODTestReadDecor                       16  0      INFO cinfo.dInt1: 51000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
 xAODTestReadDecor                       17  0      INFO cvec.dInt1: 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210
 xAODTestReadDecor                       17  0      INFO cinfo.dInt1: 54000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
 xAODTestReadDecor                       18  0      INFO cvec.dInt1: 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610
 xAODTestReadDecor                       18  0      INFO cinfo.dInt1: 57000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
 xAODTestReadDecor                       19  0      INFO cvec.dInt1: 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010
 xAODTestReadDecor                       19  0      INFO cinfo.dInt1: 60000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 0.401921
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO ---> Loop Finished (seconds): 0.12863
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] AD66940D-70D8-0844-BBEB-B2FA49C6FE32
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-IncidentProcAlg2                                   INFO Finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 85E762FA-DAE7-6D47-8B78-A523D218DBEB
+ApplicationMgr                          19  0      INFO Application Manager Stopped successfully
+IncidentProcAlg1                        19  0      INFO Finalize
+SGInputLoader                           19  0      INFO Finalizing SGInputLoader...
+IncidentProcAlg2                        19  0      INFO Finalize
+AvalancheSchedulerSvc                   19  0      INFO Joining Scheduler thread
 AvalancheSchedulerSvc                   19  0      INFO Terminating thread-pool resources
-TimelineSvc                                        INFO Outputting timeline with 120 entries to file  'TimelineFile':timeline.csv
+TimelineSvc                             19  0      INFO Outputting timeline with 120 entries to file  'TimelineFile':timeline.csv
+EventDataSvc                            19  0      INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
 Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+AthDictLoaderSvc                        19  0      INFO in finalize...
+ToolSvc                                 19  0      INFO Removing all tools created by ToolSvc
+ChronoStatSvc.finalize()                19  0      INFO  Service finalized successfully 
+ApplicationMgr                          19  0      INFO Application Manager Finalized successfully
+ApplicationMgr                          19  0      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/DataModelTest/DataModelRunTests/share/xAODTestRead.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref
index 0ed921f39dd3e07b3ebc989abe788319978a5678..326e4cd361a32bcfe6136fde2d79d87ff74858e5 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref
@@ -1,21 +1,22 @@
-Fri Mar 17 21:55:45 CET 2017
-Preloading tcmalloc_minimal.so
+Wed Jun 21 14:56:20 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 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 [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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/xAODTestRead_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5282 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 442 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "EventAthenaPool/EventAthenaPoolItemList_joboptions.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 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:55:59 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Jun 21 14:56:46 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -23,53 +24,33 @@ 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 8875 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9658 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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) 
 xAODMaker::Even...   INFO Initialising - Package version: xAODEventFormatCnv-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 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 Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is file:xAODTestRead_catalog.xml
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
 PoolSvc              INFO Re-initializing PoolSvc
 EventSelector        INFO reinitialization...
 EventSelector        INFO EventSelection with query 
-PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
-xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
-xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 14013D9F-6738-9C4D-B4CA-AEC7229B4BDF
-Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
+RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventSelector        INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00
 EventSelector        INFO reinitialization...
@@ -80,10 +61,10 @@ ImplicitCollection Info Opened the implicit collection with connection string "P
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 AthenaPoolAddre...   INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-00-00
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 1427 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1375 CLIDRegistry entries for module ALL
 DecisionSvc          INFO Inserting stream: Stream1 with no Algs
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 262 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version OutputStreamAthenaPool-00-00-00
 Stream1.Stream1...   INFO streamProperty ProcessingTag = Stream1
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
@@ -101,22 +82,21 @@ HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 14013D9F-6738-9C4D-B4CA-AEC7229B4BDF
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 14013D9F-6738-9C4D-B4CA-AEC7229B4BDF
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
+RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 ApplicationMgr       INFO Application Manager Started successfully
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
 AthenaPoolConve...   INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
 RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=226 typename=f) has different type than the branch vector<int>
@@ -160,11 +140,11 @@ RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAux
   pvInt: [-310 -309 -308 -307 -306 -305 -304 -303 -302 ]
   pvFloat: [-0.409 -0.309 -0.209 -0.109 -0.009 0.091 0.191 0.291 0.391 ]
   dpvFloat: [0.910 0.911 0.912 0.913 0.914 0.915 0.916 0.917 0.918 ]
-ClassIDSvc           INFO  getRegistryEntries: read 44 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
 1
 cinfo aux items: aFloat anInt anInt2 cEL dInt1 
 cinfo  anInt1 1000 aFloat: 0.1 anInt2: 2000 dInt1: 3000 cEL: cvec[1]
-ClassIDSvc           INFO  getRegistryEntries: read 30 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 32 CLIDRegistry entries for module ALL
 ctrig aux items: aFloat anInt anInt2 dInt1 
  anInt1 501 aFloat: 600 anInt2: 701 dInt1: 481
  anInt1 502 aFloat: 600.1 anInt2: 702 dInt1: 482
@@ -191,9 +171,9 @@ hvec: 401.5 402.5 403.5 404.5 405.5 406.5 407.5 408.5 409.5 410.5 411.5 412.5 41
 hview: 420.5 419.5 418.5 417.5 416.5 415.5 414.5 413.5 412.5 411.5 410.5 409.5 408.5 407.5 406.5 405.5 404.5 403.5 402.5 401.5
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     UPDATE    [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   CREATE    [ROOT_All] FD4AACA9-C034-AD4E-8B29-6CFFFA7D5694
+Domain[ROOT_All] Info ->  Access   DbDatabase   CREATE    [ROOT_All] 02448862-7BE9-7748-ACC7-3DD1490F248A
 Domain[ROOT_All] Info                           xaoddata2.root
-RootDatabase.open Info xaoddata2.root File version:60802
+RootDatabase.open Info xaoddata2.root File version:60806
 StorageSvc Info Building shape according to reflection information using shape ID for:
 StorageSvc Info DataVector<DMTest::H_v2> [CD6C3074-425B-4C08-AF1C-43D7E8C84288]
 StorageSvc Info Building shape according to reflection information using shape ID for:
@@ -206,10 +186,10 @@ StorageSvc Info Building shape according to reflection information using shape I
 StorageSvc Info xAOD::ShallowAuxContainer [C63C39D7-9501-49DC-B1B0-6AD98B1AEEFA]
 StorageSvc Info Building shape according to reflection information using shape ID for:
 StorageSvc Info xAOD::AuxContainerBase [C87C71B3-B03F-42FC-AF99-DF497F148397]
-ClassIDSvc           INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
-Domain[ROOT_All] Info ->  Access   DbDatabase   CREATE    [ROOT_All] 93131686-5AD5-7F44-B235-31DD6AA26CEF
+ClassIDSvc           INFO  getRegistryEntries: read 21 CLIDRegistry entries for module ALL
+Domain[ROOT_All] Info ->  Access   DbDatabase   CREATE    [ROOT_All] 35D5BC8D-6CAA-8B4A-B26F-96B981AA6D19
 Domain[ROOT_All] Info                           xaoddata2b.root
-RootDatabase.open Info xaoddata2b.root File version:60802
+RootDatabase.open Info xaoddata2b.root File version:60806
 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  <<<===
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
@@ -427,49 +407,9 @@ AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events pr
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dInt1: 2001 dVar1: 2251 dpInt1: 251 cEL: cvec[9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05 anInt2: 1502 dInt1: 2002 dVar1: 2252 dpInt1: 252 cEL: cvec[8]
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
-  dpvFloat: [0.150 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dInt1: 2003 dVar1: 2253 dpInt1: 253 cEL: cvec[7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05 anInt2: 1504 dInt1: 2004 dVar1: 2254 dpInt1: 254 cEL: cvec[6]
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
-  dpvFloat: [0.350 0.351 0.352 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dInt1: 2005 dVar1: 2255 dpInt1: 255 cEL: cvec[5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05 anInt2: 1506 dInt1: 2006 dVar1: 2256 dpInt1: 256 cEL: cvec[4]
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
-  dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dInt1: 2007 dVar1: 2257 dpInt1: 257 cEL: cvec[3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05 anInt2: 1508 dInt1: 2008 dVar1: 2258 dpInt1: 258 cEL: cvec[2]
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
-  dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dInt1: 2009 dVar1: 2259 dpInt1: 259 cEL: cvec[1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05 anInt2: 1510 dInt1: 2010 dVar1: 2260 dpInt1: 260 cEL: cvec[0]
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
-  dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]
 5
 cinfo aux items: aFloat anInt anInt2 cEL dInt1 
-cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: cvec[5]
+cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: [18446744073709551615]
 ctrig aux items: aFloat anInt anInt2 dInt1 
  anInt1 2501 aFloat: 3000 anInt2: 3501 dInt1: 2401
  anInt1 2502 aFloat: 3000.1 anInt2: 3502 dInt1: 2402
@@ -491,7 +431,7 @@ gvec aux items: anInt
  anInt 3509
  anInt 3510
 cvecWD 1005: 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010
-cview: 510 509 508 507 506 505 504 503 502 501
+cview:
 hvec: 2001.5 2002.5 2003.5 2004.5 2005.5 2006.5 2007.5 2008.5 2009.5 2010.5 2011.5 2012.5 2013.5 2014.5 2015.5 2016.5 2017.5 2018.5 2019.5 2020.5
 hview: 2020.5 2019.5 2018.5 2017.5 2016.5 2015.5 2014.5 2013.5 2012.5 2011.5 2010.5 2009.5 2008.5 2007.5 2006.5 2005.5 2004.5 2003.5 2002.5 2001.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
@@ -1560,15 +1500,15 @@ cview: 2010 2009 2008 2007 2006 2005 2004 2003 2002 2001
 hvec: 8001.5 8002.5 8003.5 8004.5 8005.5 8006.5 8007.5 8008.5 8009.5 8010.5 8011.5 8012.5 8013.5 8014.5 8015.5 8016.5 8017.5 8018.5 8019.5 8020.5
 hview: 8020.5 8019.5 8018.5 8017.5 8016.5 8015.5 8014.5 8013.5 8012.5 8011.5 8010.5 8009.5 8008.5 8007.5 8006.5 8005.5 8004.5 8003.5 8002.5 8001.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 3 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7 CLIDRegistry entries for module ALL
 Stream1              INFO Records written: 21
 Stream2              INFO Records written: 21
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 14013D9F-6738-9C4D-B4CA-AEC7229B4BDF
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 xaoddata2.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   CREATE    [ROOT_All] FD4AACA9-C034-AD4E-8B29-6CFFFA7D5694
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   CREATE    [ROOT_All] 02448862-7BE9-7748-ACC7-3DD1490F248A
 xaoddata2b.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   CREATE    [ROOT_All] 93131686-5AD5-7F44-B235-31DD6AA26CEF
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   CREATE    [ROOT_All] 35D5BC8D-6CAA-8B4A-B26F-96B981AA6D19
 Domain[ROOT_All] Info >   Deaccess DbDomain     UPDATE    [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2.ref
index 094350f5cf0ede24e21dc1352b096b363977bbfe..935a491b68b2f05f2f1b27a6fa4c15067eadbedd 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2.ref
@@ -1,21 +1,22 @@
-Fri Mar 17 21:56:04 CET 2017
-Preloading tcmalloc_minimal.so
+Wed Jun 21 15:13:36 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 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 [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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/xAODTestRead2_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5282 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 442 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "EventAthenaPool/EventAthenaPoolItemList_joboptions.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 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:56:17 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Jun 21 15:14:00 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -23,54 +24,34 @@ 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 8719 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9499 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 361 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 312 CLIDRegistry entries for module ALL
 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 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 Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is file:xAODTestRead2_catalog.xml
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
 PoolSvc              INFO Re-initializing PoolSvc
 EventSelector        INFO reinitialization...
 EventSelector        INFO EventSelection with query 
-PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
 RootCollection Info Opening Collection File xaoddata2.root in mode: READ
 RootCollection Info File xaoddata2.root opened
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 214E5BC9-9F55-F7AF-D6A3-866AAB37B6FE
-Domain[ROOT_All] Info                           xaoddata2.root
-RootDatabase.open Info xaoddata2.root File version:60802
-xaoddata2.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 214E5BC9-9F55-F7AF-D6A3-866AAB37B6FE
-Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 214E5BC9-9F55-F7AF-D6A3-866AAB37B6FE
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 02448862-7BE9-7748-ACC7-3DD1490F248A
 Domain[ROOT_All] Info                           xaoddata2.root
-RootDatabase.open Info xaoddata2.root File version:60802
-xaoddata2.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 214E5BC9-9F55-F7AF-D6A3-866AAB37B6FE
-Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] FD4AACA9-C034-AD4E-8B29-6CFFFA7D5694
-Domain[ROOT_All] Info                           xaoddata2.root
-RootDatabase.open Info xaoddata2.root File version:60802
+RootDatabase.open Info xaoddata2.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata2.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventSelector        INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00
 EventSelector        INFO reinitialization...
@@ -80,10 +61,10 @@ RootCollection Info File xaoddata2.root opened
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata2.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 AthenaPoolAddre...   INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 1066 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1063 CLIDRegistry entries for module ALL
 DecisionSvc          INFO Inserting stream: Stream1 with no Algs
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 262 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 379 CLIDRegistry entries for module ALL
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version OutputStreamAthenaPool-00-00-00
 Stream1.Stream1...   INFO streamProperty ProcessingTag = Stream1
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
@@ -94,22 +75,21 @@ HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 xaoddata2.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] FD4AACA9-C034-AD4E-8B29-6CFFFA7D5694
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 02448862-7BE9-7748-ACC7-3DD1490F248A
 RootCollection Info Opening Collection File xaoddata2.root in mode: READ
 RootCollection Info File xaoddata2.root opened
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] FD4AACA9-C034-AD4E-8B29-6CFFFA7D5694
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 02448862-7BE9-7748-ACC7-3DD1490F248A
 Domain[ROOT_All] Info                           xaoddata2.root
-RootDatabase.open Info xaoddata2.root File version:60802
+RootDatabase.open Info xaoddata2.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata2.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 ApplicationMgr       INFO Application Manager Started successfully
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
 AthenaPoolConve...   INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
  anInt1 101 aFloat: 200 pInt: 501 pFloat: 0.01 anInt2: 301 dInt1: 401 dVar1: 451 dpInt1: 51 dInt100: 201 cEL: cvec[9]
@@ -153,10 +133,10 @@ Type of aux store: xAOD::AuxContainerBase
   pvFloat: [-0.409 -0.309 -0.209 -0.109 -0.009 0.091 0.191 0.291 0.391 ]
   dpvFloat: [0.910 0.911 0.912 0.913 0.914 0.915 0.916 0.917 0.918 ]
 1
-ClassIDSvc           INFO  getRegistryEntries: read 59 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 74 CLIDRegistry entries for module ALL
 cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 
 cinfo  anInt1 1000 aFloat: 0.1 anInt2: 2000 dInt1: 3000 cEL: cvec[1] dInt100: 1500
-ClassIDSvc           INFO  getRegistryEntries: read 30 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 32 CLIDRegistry entries for module ALL
 ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 
  anInt1 501 aFloat: 600 anInt2: 701 dInt1: 481 dInt100: 1201
  anInt1 502 aFloat: 600.1 anInt2: 702 dInt1: 482 dInt100: 1202
@@ -308,9 +288,9 @@ scopy_cvecWD 1001: 201(40100) 202(40200) 203(40300) 204(40400) 205(40500) 206(40
 scopy_hvec: 401.5 402.5 403.5 404.5 405.5 406.5 407.5 408.5 409.5 410.5 411.5 412.5 413.5 414.5 415.5 416.5 417.5 418.5 419.5 420.5
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     UPDATE    [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   CREATE    [ROOT_All] 550E6A2F-DC25-2C4A-8A65-171AA3F07877
+Domain[ROOT_All] Info ->  Access   DbDatabase   CREATE    [ROOT_All] 10D8E91C-2427-2F43-8582-A53B7DD90A3C
 Domain[ROOT_All] Info                           xaoddata2x.root
-RootDatabase.open Info xaoddata2x.root File version:60802
+RootDatabase.open Info xaoddata2x.root File version:60806
 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  <<<===
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
@@ -903,49 +883,9 @@ AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events pr
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dInt1: 2001 dVar1: 2251 dpInt1: 251 dInt100: 601 cEL: cvec[9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05 anInt2: 1502 dInt1: 2002 dVar1: 2252 dpInt1: 252 dInt100: 602 cEL: cvec[8]
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
-  dpvFloat: [0.150 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dInt1: 2003 dVar1: 2253 dpInt1: 253 dInt100: 603 cEL: cvec[7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05 anInt2: 1504 dInt1: 2004 dVar1: 2254 dpInt1: 254 dInt100: 604 cEL: cvec[6]
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
-  dpvFloat: [0.350 0.351 0.352 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dInt1: 2005 dVar1: 2255 dpInt1: 255 dInt100: 605 cEL: cvec[5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05 anInt2: 1506 dInt1: 2006 dVar1: 2256 dpInt1: 256 dInt100: 606 cEL: cvec[4]
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
-  dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dInt1: 2007 dVar1: 2257 dpInt1: 257 dInt100: 607 cEL: cvec[3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05 anInt2: 1508 dInt1: 2008 dVar1: 2258 dpInt1: 258 dInt100: 608 cEL: cvec[2]
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
-  dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dInt1: 2009 dVar1: 2259 dpInt1: 259 dInt100: 609 cEL: cvec[1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05 anInt2: 1510 dInt1: 2010 dVar1: 2260 dpInt1: 260 dInt100: 610 cEL: cvec[0]
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
-  dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]
 5
 cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 
-cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: cvec[5] dInt100: 5500
+cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: [18446744073709551615] dInt100: 5500
 ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 
  anInt1 2501 aFloat: 3000 anInt2: 3501 dInt1: 2401 dInt100: 3201
  anInt1 2502 aFloat: 3000.1 anInt2: 3502 dInt1: 2402 dInt100: 3202
@@ -967,54 +907,14 @@ gvec aux items: anInt
  anInt 3509
  anInt 3510
 cvecWD 1005: 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010
-cview: 510 509 508 507 506 505 504 503 502 501
+cview:
 hvec: 2001.5 2002.5 2003.5 2004.5 2005.5 2006.5 2007.5 2008.5 2009.5 2010.5 2011.5 2012.5 2013.5 2014.5 2015.5 2016.5 2017.5 2018.5 2019.5 2020.5
 hview: 2020.5 2019.5 2018.5 2017.5 2016.5 2015.5 2014.5 2013.5 2012.5 2011.5 2010.5 2009.5 2008.5 2007.5 2006.5 2005.5 2004.5 2003.5 2002.5 2001.5
 copy_cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dInt1: 2001 dVar1: 2251 dpInt1: 251 cEL: cvec[9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05 anInt2: 1502 dInt1: 2002 dVar1: 2252 dpInt1: 252 cEL: cvec[8]
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
-  dpvFloat: [0.150 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dInt1: 2003 dVar1: 2253 dpInt1: 253 cEL: cvec[7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05 anInt2: 1504 dInt1: 2004 dVar1: 2254 dpInt1: 254 cEL: cvec[6]
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
-  dpvFloat: [0.350 0.351 0.352 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dInt1: 2005 dVar1: 2255 dpInt1: 255 cEL: cvec[5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05 anInt2: 1506 dInt1: 2006 dVar1: 2256 dpInt1: 256 cEL: cvec[4]
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
-  dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dInt1: 2007 dVar1: 2257 dpInt1: 257 cEL: cvec[3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05 anInt2: 1508 dInt1: 2008 dVar1: 2258 dpInt1: 258 cEL: cvec[2]
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
-  dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dInt1: 2009 dVar1: 2259 dpInt1: 259 cEL: cvec[1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05 anInt2: 1510 dInt1: 2010 dVar1: 2260 dpInt1: 260 cEL: cvec[0]
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
-  dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]
 5
 cinfo aux items: aFloat anInt anInt2 cEL dInt1 
-cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: cvec[5]
+cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: [18446744073709551615]
 ctrig aux items: aFloat anInt anInt2 dInt1 
  anInt1 2501 aFloat: 3000 anInt2: 3501 dInt1: 2401
  anInt1 2502 aFloat: 3000.1 anInt2: 3502 dInt1: 2402
@@ -1036,54 +936,14 @@ gvec aux items: anInt
  anInt 3509
  anInt 3510
 copy_cvecWD 0: 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010
-copy_cview: 510 509 508 507 506 505 504 503 502 501
+copy_cview:
 copy_hvec: 2020.5 2019.5 2018.5 2017.5 2016.5 2015.5 2014.5 2013.5 2012.5 2011.5 2010.5 2009.5 2008.5 2007.5 2006.5 2005.5 2004.5 2003.5 2002.5 2001.5
 copy_hview: 2001.5 2002.5 2003.5 2004.5 2005.5 2006.5 2007.5 2008.5 2009.5 2010.5 2011.5 2012.5 2013.5 2014.5 2015.5 2016.5 2017.5 2018.5 2019.5 2020.5
 scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dInt1: 2001 dVar1: 2251 dpInt1: 251 dInt100: 601 dInt150: 801 anInt10: 150100 cEL: cvec[9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05 anInt2: 1502 dInt1: 2002 dVar1: 2252 dpInt1: 252 dInt100: 602 dInt150: 802 anInt10: 150200 cEL: cvec[8]
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
-  dpvFloat: [0.150 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dInt1: 2003 dVar1: 2253 dpInt1: 253 dInt100: 603 dInt150: 803 anInt10: 150300 cEL: cvec[7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05 anInt2: 1504 dInt1: 2004 dVar1: 2254 dpInt1: 254 dInt100: 604 dInt150: 804 anInt10: 150400 cEL: cvec[6]
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
-  dpvFloat: [0.350 0.351 0.352 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dInt1: 2005 dVar1: 2255 dpInt1: 255 dInt100: 605 dInt150: 805 anInt10: 150500 cEL: cvec[5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05 anInt2: 1506 dInt1: 2006 dVar1: 2256 dpInt1: 256 dInt100: 606 dInt150: 806 anInt10: 150600 cEL: cvec[4]
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
-  dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dInt1: 2007 dVar1: 2257 dpInt1: 257 dInt100: 607 dInt150: 807 anInt10: 150700 cEL: cvec[3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05 anInt2: 1508 dInt1: 2008 dVar1: 2258 dpInt1: 258 dInt100: 608 dInt150: 808 anInt10: 150800 cEL: cvec[2]
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
-  dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dInt1: 2009 dVar1: 2259 dpInt1: 259 dInt100: 609 dInt150: 809 anInt10: 150900 cEL: cvec[1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05 anInt2: 1510 dInt1: 2010 dVar1: 2260 dpInt1: 260 dInt100: 610 dInt150: 810 anInt10: 151000 cEL: cvec[0]
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
-  dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]
 5
 cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 
-cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: cvec[5] dInt100: 5500 dInt150: 5700 anInt10: 1100000
+cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: [18446744073709551615] dInt100: 5500 dInt150: 5700 anInt10: 1100000
 ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 
  anInt1 2501 aFloat: 3000 anInt2: 3501 dInt1: 2401 dInt100: 3201 dInt150: 3401 anInt10: 850300
  anInt1 2502 aFloat: 3000.1 anInt2: 3502 dInt1: 2402 dInt100: 3202 dInt150: 3402 anInt10: 850600
@@ -4038,9 +3898,9 @@ scopy_hvec: 8001.5 8002.5 8003.5 8004.5 8005.5 8006.5 8007.5 8008.5 8009.5 8010.
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
 Stream1              INFO Records written: 21
 xaoddata2.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] FD4AACA9-C034-AD4E-8B29-6CFFFA7D5694
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 02448862-7BE9-7748-ACC7-3DD1490F248A
 xaoddata2x.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   CREATE    [ROOT_All] 550E6A2F-DC25-2C4A-8A65-171AA3F07877
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   CREATE    [ROOT_All] 10D8E91C-2427-2F43-8582-A53B7DD90A3C
 Domain[ROOT_All] Info >   Deaccess DbDomain     UPDATE    [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2b.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2b.ref
index 63c694442a9244f7c88efd5f32038e10e991145e..bb4226d9191ba2b783d6d25cd12cf5c88adf1025 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2b.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2b.ref
@@ -1,20 +1,20 @@
-Fri Mar 17 21:56:22 CET 2017
+Thu Aug 10 17:37:45 CEST 2017
 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 [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-opt] [atlas-work3/b5d7813d12] -- built on [2017-08-10T1621]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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/xAODTestRead2b_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5282 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5380 configurables from 43 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+[?1034hPy:Athena            INFO including file "AthenaCommon/runbatch.py"
 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:56:38 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
+                                          running on lxplus068.cern.ch on Thu Aug 10 17:38:16 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -22,23 +22,24 @@ 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 8719 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9727 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 361 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 376 CLIDRegistry entries for module ALL
 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 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/2017-08-09T2250/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus068.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is file:xAODTestRead2b_catalog.xml
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
 PoolSvc              INFO Re-initializing PoolSvc
 EventSelector        INFO reinitialization...
 EventSelector        INFO EventSelection with query 
@@ -46,10 +47,9 @@ PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
 RootCollection Info Opening Collection File xaoddata2b.root in mode: READ
 RootCollection Info File xaoddata2b.root opened
 DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
 Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] D31353FB-2D38-DA09-9F36-0002F69DBB5D
 Domain[ROOT_All] Info                           xaoddata2b.root
-RootDatabase.open Info xaoddata2b.root File version:60802
+RootDatabase.open Info xaoddata2b.root File version:60806
 xaoddata2b.root Info Database being retired...
 Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] D31353FB-2D38-DA09-9F36-0002F69DBB5D
 Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -58,18 +58,17 @@ DbSession Info     Open     DbSession
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
 Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] D31353FB-2D38-DA09-9F36-0002F69DBB5D
 Domain[ROOT_All] Info                           xaoddata2b.root
-RootDatabase.open Info xaoddata2b.root File version:60802
+RootDatabase.open Info xaoddata2b.root File version:60806
 xaoddata2b.root Info Database being retired...
 Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] D31353FB-2D38-DA09-9F36-0002F69DBB5D
 Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 93131686-5AD5-7F44-B235-31DD6AA26CEF
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 06E36B68-9910-BB48-B7F6-4304C7E117D7
 Domain[ROOT_All] Info                           xaoddata2b.root
-RootDatabase.open Info xaoddata2b.root File version:60802
+RootDatabase.open Info xaoddata2b.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata2b.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventSelector        INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00
 EventSelector        INFO reinitialization...
@@ -83,79 +82,78 @@ HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 xaoddata2b.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 93131686-5AD5-7F44-B235-31DD6AA26CEF
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 06E36B68-9910-BB48-B7F6-4304C7E117D7
 RootCollection Info Opening Collection File xaoddata2b.root in mode: READ
 RootCollection Info File xaoddata2b.root opened
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 93131686-5AD5-7F44-B235-31DD6AA26CEF
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 06E36B68-9910-BB48-B7F6-4304C7E117D7
 Domain[ROOT_All] Info                           xaoddata2b.root
-RootDatabase.open Info xaoddata2b.root File version:60802
+RootDatabase.open Info xaoddata2b.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata2b.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 ApplicationMgr       INFO Application Manager Started successfully
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
-ClassIDSvc           INFO  getRegistryEntries: read 1066 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1110 CLIDRegistry entries for module ALL
 AthenaPoolConve...   INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
+ClassIDSvc           INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 101 aFloat: 200 pInt: 501 pFloat: 0.01 anInt2: 301 dInt1: 401 dVar1: 451 dpInt1: 51 dInt200: 301 cEL: cvec[9]
+ anInt1 101 aFloat: 200 pInt: 501 pFloat: 0.01 anInt2: 301 dInt1: 401 dVar1: 451 dpInt1: 51 dInt100: 201 dInt200: 301 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 102 aFloat: 200.1 pInt: 502 pFloat: 1.01 anInt2: 302 dInt1: 402 dVar1: 452 dpInt1: 52 dInt200: 302 cEL: cvec[8]
+ anInt1 102 aFloat: 200.1 pInt: 502 pFloat: 1.01 anInt2: 302 dInt1: 402 dVar1: 452 dpInt1: 52 dInt100: 202 dInt200: 302 cEL: cvec[8]
   pvInt: [-390 ]
   pvFloat: [-0.489 ]
   dpvFloat: [0.110 ]
- anInt1 103 aFloat: 200.2 pInt: 503 pFloat: 2.01 anInt2: 303 dInt1: 403 dVar1: 453 dpInt1: 53 dInt200: 303 cEL: cvec[7]
+ anInt1 103 aFloat: 200.2 pInt: 503 pFloat: 2.01 anInt2: 303 dInt1: 403 dVar1: 453 dpInt1: 53 dInt100: 203 dInt200: 303 cEL: cvec[7]
   pvInt: [-380 -379 ]
   pvFloat: [-0.479 -0.379 ]
   dpvFloat: [0.210 0.211 ]
- anInt1 104 aFloat: 200.3 pInt: 504 pFloat: 3.01 anInt2: 304 dInt1: 404 dVar1: 454 dpInt1: 54 dInt200: 304 cEL: cvec[6]
+ anInt1 104 aFloat: 200.3 pInt: 504 pFloat: 3.01 anInt2: 304 dInt1: 404 dVar1: 454 dpInt1: 54 dInt100: 204 dInt200: 304 cEL: cvec[6]
   pvInt: [-370 -369 -368 ]
   pvFloat: [-0.469 -0.369 -0.269 ]
   dpvFloat: [0.310 0.311 0.312 ]
- anInt1 105 aFloat: 200.4 pInt: 505 pFloat: 4.01 anInt2: 305 dInt1: 405 dVar1: 455 dpInt1: 55 dInt200: 305 cEL: cvec[5]
+ anInt1 105 aFloat: 200.4 pInt: 505 pFloat: 4.01 anInt2: 305 dInt1: 405 dVar1: 455 dpInt1: 55 dInt100: 205 dInt200: 305 cEL: cvec[5]
   pvInt: [-360 -359 -358 -357 ]
   pvFloat: [-0.459 -0.359 -0.259 -0.159 ]
   dpvFloat: [0.410 0.411 0.412 0.413 ]
- anInt1 106 aFloat: 200.5 pInt: 506 pFloat: 5.01 anInt2: 306 dInt1: 406 dVar1: 456 dpInt1: 56 dInt200: 306 cEL: cvec[4]
+ anInt1 106 aFloat: 200.5 pInt: 506 pFloat: 5.01 anInt2: 306 dInt1: 406 dVar1: 456 dpInt1: 56 dInt100: 206 dInt200: 306 cEL: cvec[4]
   pvInt: [-350 -349 -348 -347 -346 ]
   pvFloat: [-0.449 -0.349 -0.249 -0.149 -0.049 ]
   dpvFloat: [0.510 0.511 0.512 0.513 0.514 ]
- anInt1 107 aFloat: 200.6 pInt: 507 pFloat: 6.01 anInt2: 307 dInt1: 407 dVar1: 457 dpInt1: 57 dInt200: 307 cEL: cvec[3]
+ anInt1 107 aFloat: 200.6 pInt: 507 pFloat: 6.01 anInt2: 307 dInt1: 407 dVar1: 457 dpInt1: 57 dInt100: 207 dInt200: 307 cEL: cvec[3]
   pvInt: [-340 -339 -338 -337 -336 -335 ]
   pvFloat: [-0.439 -0.339 -0.239 -0.139 -0.039 0.061 ]
   dpvFloat: [0.610 0.611 0.612 0.613 0.614 0.615 ]
- anInt1 108 aFloat: 200.7 pInt: 508 pFloat: 7.01 anInt2: 308 dInt1: 408 dVar1: 458 dpInt1: 58 dInt200: 308 cEL: cvec[2]
+ anInt1 108 aFloat: 200.7 pInt: 508 pFloat: 7.01 anInt2: 308 dInt1: 408 dVar1: 458 dpInt1: 58 dInt100: 208 dInt200: 308 cEL: cvec[2]
   pvInt: [-330 -329 -328 -327 -326 -325 -324 ]
   pvFloat: [-0.429 -0.329 -0.229 -0.129 -0.029 0.071 0.171 ]
   dpvFloat: [0.710 0.711 0.712 0.713 0.714 0.715 0.716 ]
- anInt1 109 aFloat: 200.8 pInt: 509 pFloat: 8.01 anInt2: 309 dInt1: 409 dVar1: 459 dpInt1: 59 dInt200: 309 cEL: cvec[1]
+ anInt1 109 aFloat: 200.8 pInt: 509 pFloat: 8.01 anInt2: 309 dInt1: 409 dVar1: 459 dpInt1: 59 dInt100: 209 dInt200: 309 cEL: cvec[1]
   pvInt: [-320 -319 -318 -317 -316 -315 -314 -313 ]
   pvFloat: [-0.419 -0.319 -0.219 -0.119 -0.019 0.081 0.181 0.281 ]
   dpvFloat: [0.810 0.811 0.812 0.813 0.814 0.815 0.816 0.817 ]
- anInt1 110 aFloat: 200.9 pInt: 510 pFloat: 9.01 anInt2: 310 dInt1: 410 dVar1: 460 dpInt1: 60 dInt200: 310 cEL: cvec[0]
+ anInt1 110 aFloat: 200.9 pInt: 510 pFloat: 9.01 anInt2: 310 dInt1: 410 dVar1: 460 dpInt1: 60 dInt100: 210 dInt200: 310 cEL: cvec[0]
   pvInt: [-310 -309 -308 -307 -306 -305 -304 -303 -302 ]
   pvFloat: [-0.409 -0.309 -0.209 -0.109 -0.009 0.091 0.191 0.291 0.391 ]
   dpvFloat: [0.910 0.911 0.912 0.913 0.914 0.915 0.916 0.917 0.918 ]
 1
-ClassIDSvc           INFO  getRegistryEntries: read 59 CLIDRegistry entries for module ALL
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 1000 aFloat: 0.1 anInt2: 2000 dInt1: 3000 cEL: cvec[1] dInt200: 1600
-ClassIDSvc           INFO  getRegistryEntries: read 30 CLIDRegistry entries for module ALL
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 501 aFloat: 600 anInt2: 701 dInt1: 481 dInt200: 1301
- anInt1 502 aFloat: 600.1 anInt2: 702 dInt1: 482 dInt200: 1302
- anInt1 503 aFloat: 600.2 anInt2: 703 dInt1: 483 dInt200: 1303
- anInt1 504 aFloat: 600.3 anInt2: 704 dInt1: 484 dInt200: 1304
- anInt1 505 aFloat: 600.4 anInt2: 705 dInt1: 485 dInt200: 1305
- anInt1 506 aFloat: 600.5 anInt2: 706 dInt1: 486 dInt200: 1306
- anInt1 507 aFloat: 600.6 anInt2: 707 dInt1: 487 dInt200: 1307
- anInt1 508 aFloat: 600.7 anInt2: 708 dInt1: 488 dInt200: 1308
+ClassIDSvc           INFO  getRegistryEntries: read 68 CLIDRegistry entries for module ALL
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 1000 aFloat: 0.1 anInt2: 2000 dInt1: 3000 cEL: cvec[1] dInt100: 1500 dInt200: 1600
+ClassIDSvc           INFO  getRegistryEntries: read 32 CLIDRegistry entries for module ALL
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 501 aFloat: 600 anInt2: 701 dInt1: 481 dInt100: 1201 dInt200: 1301
+ anInt1 502 aFloat: 600.1 anInt2: 702 dInt1: 482 dInt100: 1202 dInt200: 1302
+ anInt1 503 aFloat: 600.2 anInt2: 703 dInt1: 483 dInt100: 1203 dInt200: 1303
+ anInt1 504 aFloat: 600.3 anInt2: 704 dInt1: 484 dInt100: 1204 dInt200: 1304
+ anInt1 505 aFloat: 600.4 anInt2: 705 dInt1: 485 dInt100: 1205 dInt200: 1305
+ anInt1 506 aFloat: 600.5 anInt2: 706 dInt1: 486 dInt100: 1206 dInt200: 1306
+ anInt1 507 aFloat: 600.6 anInt2: 707 dInt1: 487 dInt100: 1207 dInt200: 1307
+ anInt1 508 aFloat: 600.7 anInt2: 708 dInt1: 488 dInt100: 1208 dInt200: 1308
 gvec aux items: anInt 
  anInt 701
  anInt 702
@@ -171,118 +169,118 @@ cvecWD 1001: 201 202 203 204 205 206 207 208 209 210
 cview: 110 109 108 107 106 105 104 103 102 101
 hvec: 401.5 402.5 403.5 404.5 405.5 406.5 407.5 408.5 409.5 410.5 411.5 412.5 413.5 414.5 415.5 416.5 417.5 418.5 419.5 420.5
 hview: 420.5 419.5 418.5 417.5 416.5 415.5 414.5 413.5 412.5 411.5 410.5 409.5 408.5 407.5 406.5 405.5 404.5 403.5 402.5 401.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 101 aFloat: 200 pInt: 501 pFloat: 0.01 anInt2: 301 dInt1: 401 dVar1: 451 dpInt1: 51 dInt200: 301 dInt250: 701 anInt10: 30100 cEL: cvec[9]
+ anInt1 101 aFloat: 200 pInt: 501 pFloat: 0.01 anInt2: 301 dInt1: 401 dVar1: 451 dpInt1: 51 dInt100: 201 dInt150: 401 dInt200: 301 dInt250: 701 anInt10: 30100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 102 aFloat: 200.1 pInt: 502 pFloat: 1.01 anInt2: 302 dInt1: 402 dVar1: 452 dpInt1: 52 dInt200: 302 dInt250: 702 anInt10: 30200 cEL: cvec[8]
+ anInt1 102 aFloat: 200.1 pInt: 502 pFloat: 1.01 anInt2: 302 dInt1: 402 dVar1: 452 dpInt1: 52 dInt100: 202 dInt150: 402 dInt200: 302 dInt250: 702 anInt10: 30200 cEL: cvec[8]
   pvInt: [-390 ]
   pvFloat: [-0.489 ]
   dpvFloat: [0.110 ]
- anInt1 103 aFloat: 200.2 pInt: 503 pFloat: 2.01 anInt2: 303 dInt1: 403 dVar1: 453 dpInt1: 53 dInt200: 303 dInt250: 703 anInt10: 30300 cEL: cvec[7]
+ anInt1 103 aFloat: 200.2 pInt: 503 pFloat: 2.01 anInt2: 303 dInt1: 403 dVar1: 453 dpInt1: 53 dInt100: 203 dInt150: 403 dInt200: 303 dInt250: 703 anInt10: 30300 cEL: cvec[7]
   pvInt: [-380 -379 ]
   pvFloat: [-0.479 -0.379 ]
   dpvFloat: [0.210 0.211 ]
- anInt1 104 aFloat: 200.3 pInt: 504 pFloat: 3.01 anInt2: 304 dInt1: 404 dVar1: 454 dpInt1: 54 dInt200: 304 dInt250: 704 anInt10: 30400 cEL: cvec[6]
+ anInt1 104 aFloat: 200.3 pInt: 504 pFloat: 3.01 anInt2: 304 dInt1: 404 dVar1: 454 dpInt1: 54 dInt100: 204 dInt150: 404 dInt200: 304 dInt250: 704 anInt10: 30400 cEL: cvec[6]
   pvInt: [-370 -369 -368 ]
   pvFloat: [-0.469 -0.369 -0.269 ]
   dpvFloat: [0.310 0.311 0.312 ]
- anInt1 105 aFloat: 200.4 pInt: 505 pFloat: 4.01 anInt2: 305 dInt1: 405 dVar1: 455 dpInt1: 55 dInt200: 305 dInt250: 705 anInt10: 30500 cEL: cvec[5]
+ anInt1 105 aFloat: 200.4 pInt: 505 pFloat: 4.01 anInt2: 305 dInt1: 405 dVar1: 455 dpInt1: 55 dInt100: 205 dInt150: 405 dInt200: 305 dInt250: 705 anInt10: 30500 cEL: cvec[5]
   pvInt: [-360 -359 -358 -357 ]
   pvFloat: [-0.459 -0.359 -0.259 -0.159 ]
   dpvFloat: [0.410 0.411 0.412 0.413 ]
- anInt1 106 aFloat: 200.5 pInt: 506 pFloat: 5.01 anInt2: 306 dInt1: 406 dVar1: 456 dpInt1: 56 dInt200: 306 dInt250: 706 anInt10: 30600 cEL: cvec[4]
+ anInt1 106 aFloat: 200.5 pInt: 506 pFloat: 5.01 anInt2: 306 dInt1: 406 dVar1: 456 dpInt1: 56 dInt100: 206 dInt150: 406 dInt200: 306 dInt250: 706 anInt10: 30600 cEL: cvec[4]
   pvInt: [-350 -349 -348 -347 -346 ]
   pvFloat: [-0.449 -0.349 -0.249 -0.149 -0.049 ]
   dpvFloat: [0.510 0.511 0.512 0.513 0.514 ]
- anInt1 107 aFloat: 200.6 pInt: 507 pFloat: 6.01 anInt2: 307 dInt1: 407 dVar1: 457 dpInt1: 57 dInt200: 307 dInt250: 707 anInt10: 30700 cEL: cvec[3]
+ anInt1 107 aFloat: 200.6 pInt: 507 pFloat: 6.01 anInt2: 307 dInt1: 407 dVar1: 457 dpInt1: 57 dInt100: 207 dInt150: 407 dInt200: 307 dInt250: 707 anInt10: 30700 cEL: cvec[3]
   pvInt: [-340 -339 -338 -337 -336 -335 ]
   pvFloat: [-0.439 -0.339 -0.239 -0.139 -0.039 0.061 ]
   dpvFloat: [0.610 0.611 0.612 0.613 0.614 0.615 ]
- anInt1 108 aFloat: 200.7 pInt: 508 pFloat: 7.01 anInt2: 308 dInt1: 408 dVar1: 458 dpInt1: 58 dInt200: 308 dInt250: 708 anInt10: 30800 cEL: cvec[2]
+ anInt1 108 aFloat: 200.7 pInt: 508 pFloat: 7.01 anInt2: 308 dInt1: 408 dVar1: 458 dpInt1: 58 dInt100: 208 dInt150: 408 dInt200: 308 dInt250: 708 anInt10: 30800 cEL: cvec[2]
   pvInt: [-330 -329 -328 -327 -326 -325 -324 ]
   pvFloat: [-0.429 -0.329 -0.229 -0.129 -0.029 0.071 0.171 ]
   dpvFloat: [0.710 0.711 0.712 0.713 0.714 0.715 0.716 ]
- anInt1 109 aFloat: 200.8 pInt: 509 pFloat: 8.01 anInt2: 309 dInt1: 409 dVar1: 459 dpInt1: 59 dInt200: 309 dInt250: 709 anInt10: 30900 cEL: cvec[1]
+ anInt1 109 aFloat: 200.8 pInt: 509 pFloat: 8.01 anInt2: 309 dInt1: 409 dVar1: 459 dpInt1: 59 dInt100: 209 dInt150: 409 dInt200: 309 dInt250: 709 anInt10: 30900 cEL: cvec[1]
   pvInt: [-320 -319 -318 -317 -316 -315 -314 -313 ]
   pvFloat: [-0.419 -0.319 -0.219 -0.119 -0.019 0.081 0.181 0.281 ]
   dpvFloat: [0.810 0.811 0.812 0.813 0.814 0.815 0.816 0.817 ]
- anInt1 110 aFloat: 200.9 pInt: 510 pFloat: 9.01 anInt2: 310 dInt1: 410 dVar1: 460 dpInt1: 60 dInt200: 310 dInt250: 710 anInt10: 31000 cEL: cvec[0]
+ anInt1 110 aFloat: 200.9 pInt: 510 pFloat: 9.01 anInt2: 310 dInt1: 410 dVar1: 460 dpInt1: 60 dInt100: 210 dInt150: 410 dInt200: 310 dInt250: 710 anInt10: 31000 cEL: cvec[0]
   pvInt: [-310 -309 -308 -307 -306 -305 -304 -303 -302 ]
   pvFloat: [-0.409 -0.309 -0.209 -0.109 -0.009 0.091 0.191 0.291 0.391 ]
   dpvFloat: [0.910 0.911 0.912 0.913 0.914 0.915 0.916 0.917 0.918 ]
 1
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 1000 aFloat: 0.1 anInt2: 2000 dInt1: 3000 cEL: cvec[1] dInt200: 1600 dInt250: 2000 anInt10: 220000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 501 aFloat: 600 anInt2: 701 dInt1: 481 dInt200: 1301 anInt10: 170300
- anInt1 502 aFloat: 600.1 anInt2: 702 dInt1: 482 dInt200: 1302 anInt10: 170600
- anInt1 503 aFloat: 600.2 anInt2: 703 dInt1: 483 dInt200: 1303 anInt10: 170900
- anInt1 504 aFloat: 600.3 anInt2: 704 dInt1: 484 dInt200: 1304 anInt10: 171200
- anInt1 505 aFloat: 600.4 anInt2: 705 dInt1: 485 dInt200: 1305 anInt10: 171500
- anInt1 506 aFloat: 600.5 anInt2: 706 dInt1: 486 dInt200: 1306 anInt10: 171800
- anInt1 507 aFloat: 600.6 anInt2: 707 dInt1: 487 dInt200: 1307 anInt10: 172100
- anInt1 508 aFloat: 600.7 anInt2: 708 dInt1: 488 dInt200: 1308 anInt10: 172400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 1000 aFloat: 0.1 anInt2: 2000 dInt1: 3000 cEL: cvec[1] dInt100: 1500 dInt150: 1700 dInt200: 1600 dInt250: 2000 anInt10: 220000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 501 aFloat: 600 anInt2: 701 dInt1: 481 dInt100: 1201 dInt150: 1401 dInt200: 1301 anInt10: 170300
+ anInt1 502 aFloat: 600.1 anInt2: 702 dInt1: 482 dInt100: 1202 dInt150: 1402 dInt200: 1302 anInt10: 170600
+ anInt1 503 aFloat: 600.2 anInt2: 703 dInt1: 483 dInt100: 1203 dInt150: 1403 dInt200: 1303 anInt10: 170900
+ anInt1 504 aFloat: 600.3 anInt2: 704 dInt1: 484 dInt100: 1204 dInt150: 1404 dInt200: 1304 anInt10: 171200
+ anInt1 505 aFloat: 600.4 anInt2: 705 dInt1: 485 dInt100: 1205 dInt150: 1405 dInt200: 1305 anInt10: 171500
+ anInt1 506 aFloat: 600.5 anInt2: 706 dInt1: 486 dInt100: 1206 dInt150: 1406 dInt200: 1306 anInt10: 171800
+ anInt1 507 aFloat: 600.6 anInt2: 707 dInt1: 487 dInt100: 1207 dInt150: 1407 dInt200: 1307 anInt10: 172100
+ anInt1 508 aFloat: 600.7 anInt2: 708 dInt1: 488 dInt100: 1208 dInt150: 1408 dInt200: 1308 anInt10: 172400
 scopy_cvecWD 1001: 201(40100) 202(40200) 203(40300) 204(40400) 205(40500) 206(40600) 207(40700) 208(40800) 209(40900) 210(41000)
 scopy_hvec: 401.5 402.5 403.5 404.5 405.5 406.5 407.5 408.5 409.5 410.5 411.5 412.5 413.5 414.5 415.5 416.5 417.5 418.5 419.5 420.5
 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  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 201 aFloat: 400 pInt: 1001 pFloat: 0.02 anInt2: 601 dInt1: 801 dVar1: 901 dpInt1: 101 dInt200: 401 cEL: cvec[9]
+ anInt1 201 aFloat: 400 pInt: 1001 pFloat: 0.02 anInt2: 601 dInt1: 801 dVar1: 901 dpInt1: 101 dInt100: 301 dInt200: 401 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 202 aFloat: 400.1 pInt: 1002 pFloat: 1.02 anInt2: 602 dInt1: 802 dVar1: 902 dpInt1: 102 dInt200: 402 cEL: cvec[8]
+ anInt1 202 aFloat: 400.1 pInt: 1002 pFloat: 1.02 anInt2: 602 dInt1: 802 dVar1: 902 dpInt1: 102 dInt100: 302 dInt200: 402 cEL: cvec[8]
   pvInt: [-290 ]
   pvFloat: [-0.488 ]
   dpvFloat: [0.120 ]
- anInt1 203 aFloat: 400.2 pInt: 1003 pFloat: 2.02 anInt2: 603 dInt1: 803 dVar1: 903 dpInt1: 103 dInt200: 403 cEL: cvec[7]
+ anInt1 203 aFloat: 400.2 pInt: 1003 pFloat: 2.02 anInt2: 603 dInt1: 803 dVar1: 903 dpInt1: 103 dInt100: 303 dInt200: 403 cEL: cvec[7]
   pvInt: [-280 -279 ]
   pvFloat: [-0.478 -0.378 ]
   dpvFloat: [0.220 0.221 ]
- anInt1 204 aFloat: 400.3 pInt: 1004 pFloat: 3.02 anInt2: 604 dInt1: 804 dVar1: 904 dpInt1: 104 dInt200: 404 cEL: cvec[6]
+ anInt1 204 aFloat: 400.3 pInt: 1004 pFloat: 3.02 anInt2: 604 dInt1: 804 dVar1: 904 dpInt1: 104 dInt100: 304 dInt200: 404 cEL: cvec[6]
   pvInt: [-270 -269 -268 ]
   pvFloat: [-0.468 -0.368 -0.268 ]
   dpvFloat: [0.320 0.321 0.322 ]
- anInt1 205 aFloat: 400.4 pInt: 1005 pFloat: 4.02 anInt2: 605 dInt1: 805 dVar1: 905 dpInt1: 105 dInt200: 405 cEL: cvec[5]
+ anInt1 205 aFloat: 400.4 pInt: 1005 pFloat: 4.02 anInt2: 605 dInt1: 805 dVar1: 905 dpInt1: 105 dInt100: 305 dInt200: 405 cEL: cvec[5]
   pvInt: [-260 -259 -258 -257 ]
   pvFloat: [-0.458 -0.358 -0.258 -0.158 ]
   dpvFloat: [0.420 0.421 0.422 0.423 ]
- anInt1 206 aFloat: 400.5 pInt: 1006 pFloat: 5.02 anInt2: 606 dInt1: 806 dVar1: 906 dpInt1: 106 dInt200: 406 cEL: cvec[4]
+ anInt1 206 aFloat: 400.5 pInt: 1006 pFloat: 5.02 anInt2: 606 dInt1: 806 dVar1: 906 dpInt1: 106 dInt100: 306 dInt200: 406 cEL: cvec[4]
   pvInt: [-250 -249 -248 -247 -246 ]
   pvFloat: [-0.448 -0.348 -0.248 -0.148 -0.048 ]
   dpvFloat: [0.520 0.521 0.522 0.523 0.524 ]
- anInt1 207 aFloat: 400.6 pInt: 1007 pFloat: 6.02 anInt2: 607 dInt1: 807 dVar1: 907 dpInt1: 107 dInt200: 407 cEL: cvec[3]
+ anInt1 207 aFloat: 400.6 pInt: 1007 pFloat: 6.02 anInt2: 607 dInt1: 807 dVar1: 907 dpInt1: 107 dInt100: 307 dInt200: 407 cEL: cvec[3]
   pvInt: [-240 -239 -238 -237 -236 -235 ]
   pvFloat: [-0.438 -0.338 -0.238 -0.138 -0.038 0.062 ]
   dpvFloat: [0.620 0.621 0.622 0.623 0.624 0.625 ]
- anInt1 208 aFloat: 400.7 pInt: 1008 pFloat: 7.02 anInt2: 608 dInt1: 808 dVar1: 908 dpInt1: 108 dInt200: 408 cEL: cvec[2]
+ anInt1 208 aFloat: 400.7 pInt: 1008 pFloat: 7.02 anInt2: 608 dInt1: 808 dVar1: 908 dpInt1: 108 dInt100: 308 dInt200: 408 cEL: cvec[2]
   pvInt: [-230 -229 -228 -227 -226 -225 -224 ]
   pvFloat: [-0.428 -0.328 -0.228 -0.128 -0.028 0.072 0.172 ]
   dpvFloat: [0.720 0.721 0.722 0.723 0.724 0.725 0.726 ]
- anInt1 209 aFloat: 400.8 pInt: 1009 pFloat: 8.02 anInt2: 609 dInt1: 809 dVar1: 909 dpInt1: 109 dInt200: 409 cEL: cvec[1]
+ anInt1 209 aFloat: 400.8 pInt: 1009 pFloat: 8.02 anInt2: 609 dInt1: 809 dVar1: 909 dpInt1: 109 dInt100: 309 dInt200: 409 cEL: cvec[1]
   pvInt: [-220 -219 -218 -217 -216 -215 -214 -213 ]
   pvFloat: [-0.418 -0.318 -0.218 -0.118 -0.018 0.082 0.182 0.282 ]
   dpvFloat: [0.820 0.821 0.822 0.823 0.824 0.825 0.826 0.827 ]
- anInt1 210 aFloat: 400.9 pInt: 1010 pFloat: 9.02 anInt2: 610 dInt1: 810 dVar1: 910 dpInt1: 110 dInt200: 410 cEL: cvec[0]
+ anInt1 210 aFloat: 400.9 pInt: 1010 pFloat: 9.02 anInt2: 610 dInt1: 810 dVar1: 910 dpInt1: 110 dInt100: 310 dInt200: 410 cEL: cvec[0]
   pvInt: [-210 -209 -208 -207 -206 -205 -204 -203 -202 ]
   pvFloat: [-0.408 -0.308 -0.208 -0.108 -0.008 0.092 0.192 0.292 0.392 ]
   dpvFloat: [0.920 0.921 0.922 0.923 0.924 0.925 0.926 0.927 0.928 ]
 2
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 2000 aFloat: 0.2 anInt2: 4000 dInt1: 6000 cEL: cvec[2] dInt200: 2600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 1001 aFloat: 1200 anInt2: 1401 dInt1: 961 dInt200: 1801
- anInt1 1002 aFloat: 1200.1 anInt2: 1402 dInt1: 962 dInt200: 1802
- anInt1 1003 aFloat: 1200.2 anInt2: 1403 dInt1: 963 dInt200: 1803
- anInt1 1004 aFloat: 1200.3 anInt2: 1404 dInt1: 964 dInt200: 1804
- anInt1 1005 aFloat: 1200.4 anInt2: 1405 dInt1: 965 dInt200: 1805
- anInt1 1006 aFloat: 1200.5 anInt2: 1406 dInt1: 966 dInt200: 1806
- anInt1 1007 aFloat: 1200.6 anInt2: 1407 dInt1: 967 dInt200: 1807
- anInt1 1008 aFloat: 1200.7 anInt2: 1408 dInt1: 968 dInt200: 1808
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 2000 aFloat: 0.2 anInt2: 4000 dInt1: 6000 cEL: cvec[2] dInt100: 2500 dInt200: 2600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 1001 aFloat: 1200 anInt2: 1401 dInt1: 961 dInt100: 1701 dInt200: 1801
+ anInt1 1002 aFloat: 1200.1 anInt2: 1402 dInt1: 962 dInt100: 1702 dInt200: 1802
+ anInt1 1003 aFloat: 1200.2 anInt2: 1403 dInt1: 963 dInt100: 1703 dInt200: 1803
+ anInt1 1004 aFloat: 1200.3 anInt2: 1404 dInt1: 964 dInt100: 1704 dInt200: 1804
+ anInt1 1005 aFloat: 1200.4 anInt2: 1405 dInt1: 965 dInt100: 1705 dInt200: 1805
+ anInt1 1006 aFloat: 1200.5 anInt2: 1406 dInt1: 966 dInt100: 1706 dInt200: 1806
+ anInt1 1007 aFloat: 1200.6 anInt2: 1407 dInt1: 967 dInt100: 1707 dInt200: 1807
+ anInt1 1008 aFloat: 1200.7 anInt2: 1408 dInt1: 968 dInt100: 1708 dInt200: 1808
 gvec aux items: anInt 
  anInt 1401
  anInt 1402
@@ -298,118 +296,118 @@ cvecWD 1002: 401 402 403 404 405 406 407 408 409 410
 cview: 210 209 208 207 206 205 204 203 202 201
 hvec: 801.5 802.5 803.5 804.5 805.5 806.5 807.5 808.5 809.5 810.5 811.5 812.5 813.5 814.5 815.5 816.5 817.5 818.5 819.5 820.5
 hview: 820.5 819.5 818.5 817.5 816.5 815.5 814.5 813.5 812.5 811.5 810.5 809.5 808.5 807.5 806.5 805.5 804.5 803.5 802.5 801.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 201 aFloat: 400 pInt: 1001 pFloat: 0.02 anInt2: 601 dInt1: 801 dVar1: 901 dpInt1: 101 dInt200: 401 dInt250: 801 anInt10: 60100 cEL: cvec[9]
+ anInt1 201 aFloat: 400 pInt: 1001 pFloat: 0.02 anInt2: 601 dInt1: 801 dVar1: 901 dpInt1: 101 dInt100: 301 dInt150: 501 dInt200: 401 dInt250: 801 anInt10: 60100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 202 aFloat: 400.1 pInt: 1002 pFloat: 1.02 anInt2: 602 dInt1: 802 dVar1: 902 dpInt1: 102 dInt200: 402 dInt250: 802 anInt10: 60200 cEL: cvec[8]
+ anInt1 202 aFloat: 400.1 pInt: 1002 pFloat: 1.02 anInt2: 602 dInt1: 802 dVar1: 902 dpInt1: 102 dInt100: 302 dInt150: 502 dInt200: 402 dInt250: 802 anInt10: 60200 cEL: cvec[8]
   pvInt: [-290 ]
   pvFloat: [-0.488 ]
   dpvFloat: [0.120 ]
- anInt1 203 aFloat: 400.2 pInt: 1003 pFloat: 2.02 anInt2: 603 dInt1: 803 dVar1: 903 dpInt1: 103 dInt200: 403 dInt250: 803 anInt10: 60300 cEL: cvec[7]
+ anInt1 203 aFloat: 400.2 pInt: 1003 pFloat: 2.02 anInt2: 603 dInt1: 803 dVar1: 903 dpInt1: 103 dInt100: 303 dInt150: 503 dInt200: 403 dInt250: 803 anInt10: 60300 cEL: cvec[7]
   pvInt: [-280 -279 ]
   pvFloat: [-0.478 -0.378 ]
   dpvFloat: [0.220 0.221 ]
- anInt1 204 aFloat: 400.3 pInt: 1004 pFloat: 3.02 anInt2: 604 dInt1: 804 dVar1: 904 dpInt1: 104 dInt200: 404 dInt250: 804 anInt10: 60400 cEL: cvec[6]
+ anInt1 204 aFloat: 400.3 pInt: 1004 pFloat: 3.02 anInt2: 604 dInt1: 804 dVar1: 904 dpInt1: 104 dInt100: 304 dInt150: 504 dInt200: 404 dInt250: 804 anInt10: 60400 cEL: cvec[6]
   pvInt: [-270 -269 -268 ]
   pvFloat: [-0.468 -0.368 -0.268 ]
   dpvFloat: [0.320 0.321 0.322 ]
- anInt1 205 aFloat: 400.4 pInt: 1005 pFloat: 4.02 anInt2: 605 dInt1: 805 dVar1: 905 dpInt1: 105 dInt200: 405 dInt250: 805 anInt10: 60500 cEL: cvec[5]
+ anInt1 205 aFloat: 400.4 pInt: 1005 pFloat: 4.02 anInt2: 605 dInt1: 805 dVar1: 905 dpInt1: 105 dInt100: 305 dInt150: 505 dInt200: 405 dInt250: 805 anInt10: 60500 cEL: cvec[5]
   pvInt: [-260 -259 -258 -257 ]
   pvFloat: [-0.458 -0.358 -0.258 -0.158 ]
   dpvFloat: [0.420 0.421 0.422 0.423 ]
- anInt1 206 aFloat: 400.5 pInt: 1006 pFloat: 5.02 anInt2: 606 dInt1: 806 dVar1: 906 dpInt1: 106 dInt200: 406 dInt250: 806 anInt10: 60600 cEL: cvec[4]
+ anInt1 206 aFloat: 400.5 pInt: 1006 pFloat: 5.02 anInt2: 606 dInt1: 806 dVar1: 906 dpInt1: 106 dInt100: 306 dInt150: 506 dInt200: 406 dInt250: 806 anInt10: 60600 cEL: cvec[4]
   pvInt: [-250 -249 -248 -247 -246 ]
   pvFloat: [-0.448 -0.348 -0.248 -0.148 -0.048 ]
   dpvFloat: [0.520 0.521 0.522 0.523 0.524 ]
- anInt1 207 aFloat: 400.6 pInt: 1007 pFloat: 6.02 anInt2: 607 dInt1: 807 dVar1: 907 dpInt1: 107 dInt200: 407 dInt250: 807 anInt10: 60700 cEL: cvec[3]
+ anInt1 207 aFloat: 400.6 pInt: 1007 pFloat: 6.02 anInt2: 607 dInt1: 807 dVar1: 907 dpInt1: 107 dInt100: 307 dInt150: 507 dInt200: 407 dInt250: 807 anInt10: 60700 cEL: cvec[3]
   pvInt: [-240 -239 -238 -237 -236 -235 ]
   pvFloat: [-0.438 -0.338 -0.238 -0.138 -0.038 0.062 ]
   dpvFloat: [0.620 0.621 0.622 0.623 0.624 0.625 ]
- anInt1 208 aFloat: 400.7 pInt: 1008 pFloat: 7.02 anInt2: 608 dInt1: 808 dVar1: 908 dpInt1: 108 dInt200: 408 dInt250: 808 anInt10: 60800 cEL: cvec[2]
+ anInt1 208 aFloat: 400.7 pInt: 1008 pFloat: 7.02 anInt2: 608 dInt1: 808 dVar1: 908 dpInt1: 108 dInt100: 308 dInt150: 508 dInt200: 408 dInt250: 808 anInt10: 60800 cEL: cvec[2]
   pvInt: [-230 -229 -228 -227 -226 -225 -224 ]
   pvFloat: [-0.428 -0.328 -0.228 -0.128 -0.028 0.072 0.172 ]
   dpvFloat: [0.720 0.721 0.722 0.723 0.724 0.725 0.726 ]
- anInt1 209 aFloat: 400.8 pInt: 1009 pFloat: 8.02 anInt2: 609 dInt1: 809 dVar1: 909 dpInt1: 109 dInt200: 409 dInt250: 809 anInt10: 60900 cEL: cvec[1]
+ anInt1 209 aFloat: 400.8 pInt: 1009 pFloat: 8.02 anInt2: 609 dInt1: 809 dVar1: 909 dpInt1: 109 dInt100: 309 dInt150: 509 dInt200: 409 dInt250: 809 anInt10: 60900 cEL: cvec[1]
   pvInt: [-220 -219 -218 -217 -216 -215 -214 -213 ]
   pvFloat: [-0.418 -0.318 -0.218 -0.118 -0.018 0.082 0.182 0.282 ]
   dpvFloat: [0.820 0.821 0.822 0.823 0.824 0.825 0.826 0.827 ]
- anInt1 210 aFloat: 400.9 pInt: 1010 pFloat: 9.02 anInt2: 610 dInt1: 810 dVar1: 910 dpInt1: 110 dInt200: 410 dInt250: 810 anInt10: 61000 cEL: cvec[0]
+ anInt1 210 aFloat: 400.9 pInt: 1010 pFloat: 9.02 anInt2: 610 dInt1: 810 dVar1: 910 dpInt1: 110 dInt100: 310 dInt150: 510 dInt200: 410 dInt250: 810 anInt10: 61000 cEL: cvec[0]
   pvInt: [-210 -209 -208 -207 -206 -205 -204 -203 -202 ]
   pvFloat: [-0.408 -0.308 -0.208 -0.108 -0.008 0.092 0.192 0.292 0.392 ]
   dpvFloat: [0.920 0.921 0.922 0.923 0.924 0.925 0.926 0.927 0.928 ]
 2
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 2000 aFloat: 0.2 anInt2: 4000 dInt1: 6000 cEL: cvec[2] dInt200: 2600 dInt250: 3000 anInt10: 440000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 1001 aFloat: 1200 anInt2: 1401 dInt1: 961 dInt200: 1801 anInt10: 340300
- anInt1 1002 aFloat: 1200.1 anInt2: 1402 dInt1: 962 dInt200: 1802 anInt10: 340600
- anInt1 1003 aFloat: 1200.2 anInt2: 1403 dInt1: 963 dInt200: 1803 anInt10: 340900
- anInt1 1004 aFloat: 1200.3 anInt2: 1404 dInt1: 964 dInt200: 1804 anInt10: 341200
- anInt1 1005 aFloat: 1200.4 anInt2: 1405 dInt1: 965 dInt200: 1805 anInt10: 341500
- anInt1 1006 aFloat: 1200.5 anInt2: 1406 dInt1: 966 dInt200: 1806 anInt10: 341800
- anInt1 1007 aFloat: 1200.6 anInt2: 1407 dInt1: 967 dInt200: 1807 anInt10: 342100
- anInt1 1008 aFloat: 1200.7 anInt2: 1408 dInt1: 968 dInt200: 1808 anInt10: 342400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 2000 aFloat: 0.2 anInt2: 4000 dInt1: 6000 cEL: cvec[2] dInt100: 2500 dInt150: 2700 dInt200: 2600 dInt250: 3000 anInt10: 440000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 1001 aFloat: 1200 anInt2: 1401 dInt1: 961 dInt100: 1701 dInt150: 1901 dInt200: 1801 anInt10: 340300
+ anInt1 1002 aFloat: 1200.1 anInt2: 1402 dInt1: 962 dInt100: 1702 dInt150: 1902 dInt200: 1802 anInt10: 340600
+ anInt1 1003 aFloat: 1200.2 anInt2: 1403 dInt1: 963 dInt100: 1703 dInt150: 1903 dInt200: 1803 anInt10: 340900
+ anInt1 1004 aFloat: 1200.3 anInt2: 1404 dInt1: 964 dInt100: 1704 dInt150: 1904 dInt200: 1804 anInt10: 341200
+ anInt1 1005 aFloat: 1200.4 anInt2: 1405 dInt1: 965 dInt100: 1705 dInt150: 1905 dInt200: 1805 anInt10: 341500
+ anInt1 1006 aFloat: 1200.5 anInt2: 1406 dInt1: 966 dInt100: 1706 dInt150: 1906 dInt200: 1806 anInt10: 341800
+ anInt1 1007 aFloat: 1200.6 anInt2: 1407 dInt1: 967 dInt100: 1707 dInt150: 1907 dInt200: 1807 anInt10: 342100
+ anInt1 1008 aFloat: 1200.7 anInt2: 1408 dInt1: 968 dInt100: 1708 dInt150: 1908 dInt200: 1808 anInt10: 342400
 scopy_cvecWD 1002: 401(80100) 402(80200) 403(80300) 404(80400) 405(80500) 406(80600) 407(80700) 408(80800) 409(80900) 410(81000)
 scopy_hvec: 801.5 802.5 803.5 804.5 805.5 806.5 807.5 808.5 809.5 810.5 811.5 812.5 813.5 814.5 815.5 816.5 817.5 818.5 819.5 820.5
 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  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 301 aFloat: 600 pInt: 1501 pFloat: 0.03 anInt2: 901 dInt1: 1201 dVar1: 1351 dpInt1: 151 dInt200: 501 cEL: cvec[9]
+ anInt1 301 aFloat: 600 pInt: 1501 pFloat: 0.03 anInt2: 901 dInt1: 1201 dVar1: 1351 dpInt1: 151 dInt100: 401 dInt200: 501 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 302 aFloat: 600.1 pInt: 1502 pFloat: 1.03 anInt2: 902 dInt1: 1202 dVar1: 1352 dpInt1: 152 dInt200: 502 cEL: cvec[8]
+ anInt1 302 aFloat: 600.1 pInt: 1502 pFloat: 1.03 anInt2: 902 dInt1: 1202 dVar1: 1352 dpInt1: 152 dInt100: 402 dInt200: 502 cEL: cvec[8]
   pvInt: [-190 ]
   pvFloat: [-0.487 ]
   dpvFloat: [0.130 ]
- anInt1 303 aFloat: 600.2 pInt: 1503 pFloat: 2.03 anInt2: 903 dInt1: 1203 dVar1: 1353 dpInt1: 153 dInt200: 503 cEL: cvec[7]
+ anInt1 303 aFloat: 600.2 pInt: 1503 pFloat: 2.03 anInt2: 903 dInt1: 1203 dVar1: 1353 dpInt1: 153 dInt100: 403 dInt200: 503 cEL: cvec[7]
   pvInt: [-180 -179 ]
   pvFloat: [-0.477 -0.377 ]
   dpvFloat: [0.230 0.231 ]
- anInt1 304 aFloat: 600.3 pInt: 1504 pFloat: 3.03 anInt2: 904 dInt1: 1204 dVar1: 1354 dpInt1: 154 dInt200: 504 cEL: cvec[6]
+ anInt1 304 aFloat: 600.3 pInt: 1504 pFloat: 3.03 anInt2: 904 dInt1: 1204 dVar1: 1354 dpInt1: 154 dInt100: 404 dInt200: 504 cEL: cvec[6]
   pvInt: [-170 -169 -168 ]
   pvFloat: [-0.467 -0.367 -0.267 ]
   dpvFloat: [0.330 0.331 0.332 ]
- anInt1 305 aFloat: 600.4 pInt: 1505 pFloat: 4.03 anInt2: 905 dInt1: 1205 dVar1: 1355 dpInt1: 155 dInt200: 505 cEL: cvec[5]
+ anInt1 305 aFloat: 600.4 pInt: 1505 pFloat: 4.03 anInt2: 905 dInt1: 1205 dVar1: 1355 dpInt1: 155 dInt100: 405 dInt200: 505 cEL: cvec[5]
   pvInt: [-160 -159 -158 -157 ]
   pvFloat: [-0.457 -0.357 -0.257 -0.157 ]
   dpvFloat: [0.430 0.431 0.432 0.433 ]
- anInt1 306 aFloat: 600.5 pInt: 1506 pFloat: 5.03 anInt2: 906 dInt1: 1206 dVar1: 1356 dpInt1: 156 dInt200: 506 cEL: cvec[4]
+ anInt1 306 aFloat: 600.5 pInt: 1506 pFloat: 5.03 anInt2: 906 dInt1: 1206 dVar1: 1356 dpInt1: 156 dInt100: 406 dInt200: 506 cEL: cvec[4]
   pvInt: [-150 -149 -148 -147 -146 ]
   pvFloat: [-0.447 -0.347 -0.247 -0.147 -0.047 ]
   dpvFloat: [0.530 0.531 0.532 0.533 0.534 ]
- anInt1 307 aFloat: 600.6 pInt: 1507 pFloat: 6.03 anInt2: 907 dInt1: 1207 dVar1: 1357 dpInt1: 157 dInt200: 507 cEL: cvec[3]
+ anInt1 307 aFloat: 600.6 pInt: 1507 pFloat: 6.03 anInt2: 907 dInt1: 1207 dVar1: 1357 dpInt1: 157 dInt100: 407 dInt200: 507 cEL: cvec[3]
   pvInt: [-140 -139 -138 -137 -136 -135 ]
   pvFloat: [-0.437 -0.337 -0.237 -0.137 -0.037 0.063 ]
   dpvFloat: [0.630 0.631 0.632 0.633 0.634 0.635 ]
- anInt1 308 aFloat: 600.7 pInt: 1508 pFloat: 7.03 anInt2: 908 dInt1: 1208 dVar1: 1358 dpInt1: 158 dInt200: 508 cEL: cvec[2]
+ anInt1 308 aFloat: 600.7 pInt: 1508 pFloat: 7.03 anInt2: 908 dInt1: 1208 dVar1: 1358 dpInt1: 158 dInt100: 408 dInt200: 508 cEL: cvec[2]
   pvInt: [-130 -129 -128 -127 -126 -125 -124 ]
   pvFloat: [-0.427 -0.327 -0.227 -0.127 -0.027 0.073 0.173 ]
   dpvFloat: [0.730 0.731 0.732 0.733 0.734 0.735 0.736 ]
- anInt1 309 aFloat: 600.8 pInt: 1509 pFloat: 8.03 anInt2: 909 dInt1: 1209 dVar1: 1359 dpInt1: 159 dInt200: 509 cEL: cvec[1]
+ anInt1 309 aFloat: 600.8 pInt: 1509 pFloat: 8.03 anInt2: 909 dInt1: 1209 dVar1: 1359 dpInt1: 159 dInt100: 409 dInt200: 509 cEL: cvec[1]
   pvInt: [-120 -119 -118 -117 -116 -115 -114 -113 ]
   pvFloat: [-0.417 -0.317 -0.217 -0.117 -0.017 0.083 0.183 0.283 ]
   dpvFloat: [0.830 0.831 0.832 0.833 0.834 0.835 0.836 0.837 ]
- anInt1 310 aFloat: 600.9 pInt: 1510 pFloat: 9.03 anInt2: 910 dInt1: 1210 dVar1: 1360 dpInt1: 160 dInt200: 510 cEL: cvec[0]
+ anInt1 310 aFloat: 600.9 pInt: 1510 pFloat: 9.03 anInt2: 910 dInt1: 1210 dVar1: 1360 dpInt1: 160 dInt100: 410 dInt200: 510 cEL: cvec[0]
   pvInt: [-110 -109 -108 -107 -106 -105 -104 -103 -102 ]
   pvFloat: [-0.407 -0.307 -0.207 -0.107 -0.007 0.093 0.193 0.293 0.393 ]
   dpvFloat: [0.930 0.931 0.932 0.933 0.934 0.935 0.936 0.937 0.938 ]
 3
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 3000 aFloat: 0.3 anInt2: 6000 dInt1: 9000 cEL: cvec[3] dInt200: 3600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 1501 aFloat: 1800 anInt2: 2101 dInt1: 1441 dInt200: 2301
- anInt1 1502 aFloat: 1800.1 anInt2: 2102 dInt1: 1442 dInt200: 2302
- anInt1 1503 aFloat: 1800.2 anInt2: 2103 dInt1: 1443 dInt200: 2303
- anInt1 1504 aFloat: 1800.3 anInt2: 2104 dInt1: 1444 dInt200: 2304
- anInt1 1505 aFloat: 1800.4 anInt2: 2105 dInt1: 1445 dInt200: 2305
- anInt1 1506 aFloat: 1800.5 anInt2: 2106 dInt1: 1446 dInt200: 2306
- anInt1 1507 aFloat: 1800.6 anInt2: 2107 dInt1: 1447 dInt200: 2307
- anInt1 1508 aFloat: 1800.7 anInt2: 2108 dInt1: 1448 dInt200: 2308
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 3000 aFloat: 0.3 anInt2: 6000 dInt1: 9000 cEL: cvec[3] dInt100: 3500 dInt200: 3600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 1501 aFloat: 1800 anInt2: 2101 dInt1: 1441 dInt100: 2201 dInt200: 2301
+ anInt1 1502 aFloat: 1800.1 anInt2: 2102 dInt1: 1442 dInt100: 2202 dInt200: 2302
+ anInt1 1503 aFloat: 1800.2 anInt2: 2103 dInt1: 1443 dInt100: 2203 dInt200: 2303
+ anInt1 1504 aFloat: 1800.3 anInt2: 2104 dInt1: 1444 dInt100: 2204 dInt200: 2304
+ anInt1 1505 aFloat: 1800.4 anInt2: 2105 dInt1: 1445 dInt100: 2205 dInt200: 2305
+ anInt1 1506 aFloat: 1800.5 anInt2: 2106 dInt1: 1446 dInt100: 2206 dInt200: 2306
+ anInt1 1507 aFloat: 1800.6 anInt2: 2107 dInt1: 1447 dInt100: 2207 dInt200: 2307
+ anInt1 1508 aFloat: 1800.7 anInt2: 2108 dInt1: 1448 dInt100: 2208 dInt200: 2308
 gvec aux items: anInt 
  anInt 2101
  anInt 2102
@@ -425,118 +423,118 @@ cvecWD 1003: 601 602 603 604 605 606 607 608 609 610
 cview: 310 309 308 307 306 305 304 303 302 301
 hvec: 1201.5 1202.5 1203.5 1204.5 1205.5 1206.5 1207.5 1208.5 1209.5 1210.5 1211.5 1212.5 1213.5 1214.5 1215.5 1216.5 1217.5 1218.5 1219.5 1220.5
 hview: 1220.5 1219.5 1218.5 1217.5 1216.5 1215.5 1214.5 1213.5 1212.5 1211.5 1210.5 1209.5 1208.5 1207.5 1206.5 1205.5 1204.5 1203.5 1202.5 1201.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 301 aFloat: 600 pInt: 1501 pFloat: 0.03 anInt2: 901 dInt1: 1201 dVar1: 1351 dpInt1: 151 dInt200: 501 dInt250: 901 anInt10: 90100 cEL: cvec[9]
+ anInt1 301 aFloat: 600 pInt: 1501 pFloat: 0.03 anInt2: 901 dInt1: 1201 dVar1: 1351 dpInt1: 151 dInt100: 401 dInt150: 601 dInt200: 501 dInt250: 901 anInt10: 90100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 302 aFloat: 600.1 pInt: 1502 pFloat: 1.03 anInt2: 902 dInt1: 1202 dVar1: 1352 dpInt1: 152 dInt200: 502 dInt250: 902 anInt10: 90200 cEL: cvec[8]
+ anInt1 302 aFloat: 600.1 pInt: 1502 pFloat: 1.03 anInt2: 902 dInt1: 1202 dVar1: 1352 dpInt1: 152 dInt100: 402 dInt150: 602 dInt200: 502 dInt250: 902 anInt10: 90200 cEL: cvec[8]
   pvInt: [-190 ]
   pvFloat: [-0.487 ]
   dpvFloat: [0.130 ]
- anInt1 303 aFloat: 600.2 pInt: 1503 pFloat: 2.03 anInt2: 903 dInt1: 1203 dVar1: 1353 dpInt1: 153 dInt200: 503 dInt250: 903 anInt10: 90300 cEL: cvec[7]
+ anInt1 303 aFloat: 600.2 pInt: 1503 pFloat: 2.03 anInt2: 903 dInt1: 1203 dVar1: 1353 dpInt1: 153 dInt100: 403 dInt150: 603 dInt200: 503 dInt250: 903 anInt10: 90300 cEL: cvec[7]
   pvInt: [-180 -179 ]
   pvFloat: [-0.477 -0.377 ]
   dpvFloat: [0.230 0.231 ]
- anInt1 304 aFloat: 600.3 pInt: 1504 pFloat: 3.03 anInt2: 904 dInt1: 1204 dVar1: 1354 dpInt1: 154 dInt200: 504 dInt250: 904 anInt10: 90400 cEL: cvec[6]
+ anInt1 304 aFloat: 600.3 pInt: 1504 pFloat: 3.03 anInt2: 904 dInt1: 1204 dVar1: 1354 dpInt1: 154 dInt100: 404 dInt150: 604 dInt200: 504 dInt250: 904 anInt10: 90400 cEL: cvec[6]
   pvInt: [-170 -169 -168 ]
   pvFloat: [-0.467 -0.367 -0.267 ]
   dpvFloat: [0.330 0.331 0.332 ]
- anInt1 305 aFloat: 600.4 pInt: 1505 pFloat: 4.03 anInt2: 905 dInt1: 1205 dVar1: 1355 dpInt1: 155 dInt200: 505 dInt250: 905 anInt10: 90500 cEL: cvec[5]
+ anInt1 305 aFloat: 600.4 pInt: 1505 pFloat: 4.03 anInt2: 905 dInt1: 1205 dVar1: 1355 dpInt1: 155 dInt100: 405 dInt150: 605 dInt200: 505 dInt250: 905 anInt10: 90500 cEL: cvec[5]
   pvInt: [-160 -159 -158 -157 ]
   pvFloat: [-0.457 -0.357 -0.257 -0.157 ]
   dpvFloat: [0.430 0.431 0.432 0.433 ]
- anInt1 306 aFloat: 600.5 pInt: 1506 pFloat: 5.03 anInt2: 906 dInt1: 1206 dVar1: 1356 dpInt1: 156 dInt200: 506 dInt250: 906 anInt10: 90600 cEL: cvec[4]
+ anInt1 306 aFloat: 600.5 pInt: 1506 pFloat: 5.03 anInt2: 906 dInt1: 1206 dVar1: 1356 dpInt1: 156 dInt100: 406 dInt150: 606 dInt200: 506 dInt250: 906 anInt10: 90600 cEL: cvec[4]
   pvInt: [-150 -149 -148 -147 -146 ]
   pvFloat: [-0.447 -0.347 -0.247 -0.147 -0.047 ]
   dpvFloat: [0.530 0.531 0.532 0.533 0.534 ]
- anInt1 307 aFloat: 600.6 pInt: 1507 pFloat: 6.03 anInt2: 907 dInt1: 1207 dVar1: 1357 dpInt1: 157 dInt200: 507 dInt250: 907 anInt10: 90700 cEL: cvec[3]
+ anInt1 307 aFloat: 600.6 pInt: 1507 pFloat: 6.03 anInt2: 907 dInt1: 1207 dVar1: 1357 dpInt1: 157 dInt100: 407 dInt150: 607 dInt200: 507 dInt250: 907 anInt10: 90700 cEL: cvec[3]
   pvInt: [-140 -139 -138 -137 -136 -135 ]
   pvFloat: [-0.437 -0.337 -0.237 -0.137 -0.037 0.063 ]
   dpvFloat: [0.630 0.631 0.632 0.633 0.634 0.635 ]
- anInt1 308 aFloat: 600.7 pInt: 1508 pFloat: 7.03 anInt2: 908 dInt1: 1208 dVar1: 1358 dpInt1: 158 dInt200: 508 dInt250: 908 anInt10: 90800 cEL: cvec[2]
+ anInt1 308 aFloat: 600.7 pInt: 1508 pFloat: 7.03 anInt2: 908 dInt1: 1208 dVar1: 1358 dpInt1: 158 dInt100: 408 dInt150: 608 dInt200: 508 dInt250: 908 anInt10: 90800 cEL: cvec[2]
   pvInt: [-130 -129 -128 -127 -126 -125 -124 ]
   pvFloat: [-0.427 -0.327 -0.227 -0.127 -0.027 0.073 0.173 ]
   dpvFloat: [0.730 0.731 0.732 0.733 0.734 0.735 0.736 ]
- anInt1 309 aFloat: 600.8 pInt: 1509 pFloat: 8.03 anInt2: 909 dInt1: 1209 dVar1: 1359 dpInt1: 159 dInt200: 509 dInt250: 909 anInt10: 90900 cEL: cvec[1]
+ anInt1 309 aFloat: 600.8 pInt: 1509 pFloat: 8.03 anInt2: 909 dInt1: 1209 dVar1: 1359 dpInt1: 159 dInt100: 409 dInt150: 609 dInt200: 509 dInt250: 909 anInt10: 90900 cEL: cvec[1]
   pvInt: [-120 -119 -118 -117 -116 -115 -114 -113 ]
   pvFloat: [-0.417 -0.317 -0.217 -0.117 -0.017 0.083 0.183 0.283 ]
   dpvFloat: [0.830 0.831 0.832 0.833 0.834 0.835 0.836 0.837 ]
- anInt1 310 aFloat: 600.9 pInt: 1510 pFloat: 9.03 anInt2: 910 dInt1: 1210 dVar1: 1360 dpInt1: 160 dInt200: 510 dInt250: 910 anInt10: 91000 cEL: cvec[0]
+ anInt1 310 aFloat: 600.9 pInt: 1510 pFloat: 9.03 anInt2: 910 dInt1: 1210 dVar1: 1360 dpInt1: 160 dInt100: 410 dInt150: 610 dInt200: 510 dInt250: 910 anInt10: 91000 cEL: cvec[0]
   pvInt: [-110 -109 -108 -107 -106 -105 -104 -103 -102 ]
   pvFloat: [-0.407 -0.307 -0.207 -0.107 -0.007 0.093 0.193 0.293 0.393 ]
   dpvFloat: [0.930 0.931 0.932 0.933 0.934 0.935 0.936 0.937 0.938 ]
 3
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 3000 aFloat: 0.3 anInt2: 6000 dInt1: 9000 cEL: cvec[3] dInt200: 3600 dInt250: 4000 anInt10: 660000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 1501 aFloat: 1800 anInt2: 2101 dInt1: 1441 dInt200: 2301 anInt10: 510300
- anInt1 1502 aFloat: 1800.1 anInt2: 2102 dInt1: 1442 dInt200: 2302 anInt10: 510600
- anInt1 1503 aFloat: 1800.2 anInt2: 2103 dInt1: 1443 dInt200: 2303 anInt10: 510900
- anInt1 1504 aFloat: 1800.3 anInt2: 2104 dInt1: 1444 dInt200: 2304 anInt10: 511200
- anInt1 1505 aFloat: 1800.4 anInt2: 2105 dInt1: 1445 dInt200: 2305 anInt10: 511500
- anInt1 1506 aFloat: 1800.5 anInt2: 2106 dInt1: 1446 dInt200: 2306 anInt10: 511800
- anInt1 1507 aFloat: 1800.6 anInt2: 2107 dInt1: 1447 dInt200: 2307 anInt10: 512100
- anInt1 1508 aFloat: 1800.7 anInt2: 2108 dInt1: 1448 dInt200: 2308 anInt10: 512400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 3000 aFloat: 0.3 anInt2: 6000 dInt1: 9000 cEL: cvec[3] dInt100: 3500 dInt150: 3700 dInt200: 3600 dInt250: 4000 anInt10: 660000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 1501 aFloat: 1800 anInt2: 2101 dInt1: 1441 dInt100: 2201 dInt150: 2401 dInt200: 2301 anInt10: 510300
+ anInt1 1502 aFloat: 1800.1 anInt2: 2102 dInt1: 1442 dInt100: 2202 dInt150: 2402 dInt200: 2302 anInt10: 510600
+ anInt1 1503 aFloat: 1800.2 anInt2: 2103 dInt1: 1443 dInt100: 2203 dInt150: 2403 dInt200: 2303 anInt10: 510900
+ anInt1 1504 aFloat: 1800.3 anInt2: 2104 dInt1: 1444 dInt100: 2204 dInt150: 2404 dInt200: 2304 anInt10: 511200
+ anInt1 1505 aFloat: 1800.4 anInt2: 2105 dInt1: 1445 dInt100: 2205 dInt150: 2405 dInt200: 2305 anInt10: 511500
+ anInt1 1506 aFloat: 1800.5 anInt2: 2106 dInt1: 1446 dInt100: 2206 dInt150: 2406 dInt200: 2306 anInt10: 511800
+ anInt1 1507 aFloat: 1800.6 anInt2: 2107 dInt1: 1447 dInt100: 2207 dInt150: 2407 dInt200: 2307 anInt10: 512100
+ anInt1 1508 aFloat: 1800.7 anInt2: 2108 dInt1: 1448 dInt100: 2208 dInt150: 2408 dInt200: 2308 anInt10: 512400
 scopy_cvecWD 1003: 601(120100) 602(120200) 603(120300) 604(120400) 605(120500) 606(120600) 607(120700) 608(120800) 609(120900) 610(121000)
 scopy_hvec: 1201.5 1202.5 1203.5 1204.5 1205.5 1206.5 1207.5 1208.5 1209.5 1210.5 1211.5 1212.5 1213.5 1214.5 1215.5 1216.5 1217.5 1218.5 1219.5 1220.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #2, run #0 3 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #3, run #0 3 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 401 aFloat: 800 pInt: 2001 pFloat: 0.04 anInt2: 1201 dInt1: 1601 dVar1: 1801 dpInt1: 201 dInt200: 601 cEL: cvec[9]
+ anInt1 401 aFloat: 800 pInt: 2001 pFloat: 0.04 anInt2: 1201 dInt1: 1601 dVar1: 1801 dpInt1: 201 dInt100: 501 dInt200: 601 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 402 aFloat: 800.1 pInt: 2002 pFloat: 1.04 anInt2: 1202 dInt1: 1602 dVar1: 1802 dpInt1: 202 dInt200: 602 cEL: cvec[8]
+ anInt1 402 aFloat: 800.1 pInt: 2002 pFloat: 1.04 anInt2: 1202 dInt1: 1602 dVar1: 1802 dpInt1: 202 dInt100: 502 dInt200: 602 cEL: cvec[8]
   pvInt: [-90 ]
   pvFloat: [-0.486 ]
   dpvFloat: [0.140 ]
- anInt1 403 aFloat: 800.2 pInt: 2003 pFloat: 2.04 anInt2: 1203 dInt1: 1603 dVar1: 1803 dpInt1: 203 dInt200: 603 cEL: cvec[7]
+ anInt1 403 aFloat: 800.2 pInt: 2003 pFloat: 2.04 anInt2: 1203 dInt1: 1603 dVar1: 1803 dpInt1: 203 dInt100: 503 dInt200: 603 cEL: cvec[7]
   pvInt: [-80 -79 ]
   pvFloat: [-0.476 -0.376 ]
   dpvFloat: [0.240 0.241 ]
- anInt1 404 aFloat: 800.3 pInt: 2004 pFloat: 3.04 anInt2: 1204 dInt1: 1604 dVar1: 1804 dpInt1: 204 dInt200: 604 cEL: cvec[6]
+ anInt1 404 aFloat: 800.3 pInt: 2004 pFloat: 3.04 anInt2: 1204 dInt1: 1604 dVar1: 1804 dpInt1: 204 dInt100: 504 dInt200: 604 cEL: cvec[6]
   pvInt: [-70 -69 -68 ]
   pvFloat: [-0.466 -0.366 -0.266 ]
   dpvFloat: [0.340 0.341 0.342 ]
- anInt1 405 aFloat: 800.4 pInt: 2005 pFloat: 4.04 anInt2: 1205 dInt1: 1605 dVar1: 1805 dpInt1: 205 dInt200: 605 cEL: cvec[5]
+ anInt1 405 aFloat: 800.4 pInt: 2005 pFloat: 4.04 anInt2: 1205 dInt1: 1605 dVar1: 1805 dpInt1: 205 dInt100: 505 dInt200: 605 cEL: cvec[5]
   pvInt: [-60 -59 -58 -57 ]
   pvFloat: [-0.456 -0.356 -0.256 -0.156 ]
   dpvFloat: [0.440 0.441 0.442 0.443 ]
- anInt1 406 aFloat: 800.5 pInt: 2006 pFloat: 5.04 anInt2: 1206 dInt1: 1606 dVar1: 1806 dpInt1: 206 dInt200: 606 cEL: cvec[4]
+ anInt1 406 aFloat: 800.5 pInt: 2006 pFloat: 5.04 anInt2: 1206 dInt1: 1606 dVar1: 1806 dpInt1: 206 dInt100: 506 dInt200: 606 cEL: cvec[4]
   pvInt: [-50 -49 -48 -47 -46 ]
   pvFloat: [-0.446 -0.346 -0.246 -0.146 -0.046 ]
   dpvFloat: [0.540 0.541 0.542 0.543 0.544 ]
- anInt1 407 aFloat: 800.6 pInt: 2007 pFloat: 6.04 anInt2: 1207 dInt1: 1607 dVar1: 1807 dpInt1: 207 dInt200: 607 cEL: cvec[3]
+ anInt1 407 aFloat: 800.6 pInt: 2007 pFloat: 6.04 anInt2: 1207 dInt1: 1607 dVar1: 1807 dpInt1: 207 dInt100: 507 dInt200: 607 cEL: cvec[3]
   pvInt: [-40 -39 -38 -37 -36 -35 ]
   pvFloat: [-0.436 -0.336 -0.236 -0.136 -0.036 0.064 ]
   dpvFloat: [0.640 0.641 0.642 0.643 0.644 0.645 ]
- anInt1 408 aFloat: 800.7 pInt: 2008 pFloat: 7.04 anInt2: 1208 dInt1: 1608 dVar1: 1808 dpInt1: 208 dInt200: 608 cEL: cvec[2]
+ anInt1 408 aFloat: 800.7 pInt: 2008 pFloat: 7.04 anInt2: 1208 dInt1: 1608 dVar1: 1808 dpInt1: 208 dInt100: 508 dInt200: 608 cEL: cvec[2]
   pvInt: [-30 -29 -28 -27 -26 -25 -24 ]
   pvFloat: [-0.426 -0.326 -0.226 -0.126 -0.026 0.074 0.174 ]
   dpvFloat: [0.740 0.741 0.742 0.743 0.744 0.745 0.746 ]
- anInt1 409 aFloat: 800.8 pInt: 2009 pFloat: 8.04 anInt2: 1209 dInt1: 1609 dVar1: 1809 dpInt1: 209 dInt200: 609 cEL: cvec[1]
+ anInt1 409 aFloat: 800.8 pInt: 2009 pFloat: 8.04 anInt2: 1209 dInt1: 1609 dVar1: 1809 dpInt1: 209 dInt100: 509 dInt200: 609 cEL: cvec[1]
   pvInt: [-20 -19 -18 -17 -16 -15 -14 -13 ]
   pvFloat: [-0.416 -0.316 -0.216 -0.116 -0.016 0.084 0.184 0.284 ]
   dpvFloat: [0.840 0.841 0.842 0.843 0.844 0.845 0.846 0.847 ]
- anInt1 410 aFloat: 800.9 pInt: 2010 pFloat: 9.04 anInt2: 1210 dInt1: 1610 dVar1: 1810 dpInt1: 210 dInt200: 610 cEL: cvec[0]
+ anInt1 410 aFloat: 800.9 pInt: 2010 pFloat: 9.04 anInt2: 1210 dInt1: 1610 dVar1: 1810 dpInt1: 210 dInt100: 510 dInt200: 610 cEL: cvec[0]
   pvInt: [-10 -9 -8 -7 -6 -5 -4 -3 -2 ]
   pvFloat: [-0.406 -0.306 -0.206 -0.106 -0.006 0.094 0.194 0.294 0.394 ]
   dpvFloat: [0.940 0.941 0.942 0.943 0.944 0.945 0.946 0.947 0.948 ]
 4
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 4000 aFloat: 0.4 anInt2: 8000 dInt1: 12000 cEL: cvec[4] dInt200: 4600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 2001 aFloat: 2400 anInt2: 2801 dInt1: 1921 dInt200: 2801
- anInt1 2002 aFloat: 2400.1 anInt2: 2802 dInt1: 1922 dInt200: 2802
- anInt1 2003 aFloat: 2400.2 anInt2: 2803 dInt1: 1923 dInt200: 2803
- anInt1 2004 aFloat: 2400.3 anInt2: 2804 dInt1: 1924 dInt200: 2804
- anInt1 2005 aFloat: 2400.4 anInt2: 2805 dInt1: 1925 dInt200: 2805
- anInt1 2006 aFloat: 2400.5 anInt2: 2806 dInt1: 1926 dInt200: 2806
- anInt1 2007 aFloat: 2400.6 anInt2: 2807 dInt1: 1927 dInt200: 2807
- anInt1 2008 aFloat: 2400.7 anInt2: 2808 dInt1: 1928 dInt200: 2808
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 4000 aFloat: 0.4 anInt2: 8000 dInt1: 12000 cEL: cvec[4] dInt100: 4500 dInt200: 4600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 2001 aFloat: 2400 anInt2: 2801 dInt1: 1921 dInt100: 2701 dInt200: 2801
+ anInt1 2002 aFloat: 2400.1 anInt2: 2802 dInt1: 1922 dInt100: 2702 dInt200: 2802
+ anInt1 2003 aFloat: 2400.2 anInt2: 2803 dInt1: 1923 dInt100: 2703 dInt200: 2803
+ anInt1 2004 aFloat: 2400.3 anInt2: 2804 dInt1: 1924 dInt100: 2704 dInt200: 2804
+ anInt1 2005 aFloat: 2400.4 anInt2: 2805 dInt1: 1925 dInt100: 2705 dInt200: 2805
+ anInt1 2006 aFloat: 2400.5 anInt2: 2806 dInt1: 1926 dInt100: 2706 dInt200: 2806
+ anInt1 2007 aFloat: 2400.6 anInt2: 2807 dInt1: 1927 dInt100: 2707 dInt200: 2807
+ anInt1 2008 aFloat: 2400.7 anInt2: 2808 dInt1: 1928 dInt100: 2708 dInt200: 2808
 gvec aux items: anInt 
  anInt 2801
  anInt 2802
@@ -552,118 +550,78 @@ cvecWD 1004: 801 802 803 804 805 806 807 808 809 810
 cview: 410 409 408 407 406 405 404 403 402 401
 hvec: 1601.5 1602.5 1603.5 1604.5 1605.5 1606.5 1607.5 1608.5 1609.5 1610.5 1611.5 1612.5 1613.5 1614.5 1615.5 1616.5 1617.5 1618.5 1619.5 1620.5
 hview: 1620.5 1619.5 1618.5 1617.5 1616.5 1615.5 1614.5 1613.5 1612.5 1611.5 1610.5 1609.5 1608.5 1607.5 1606.5 1605.5 1604.5 1603.5 1602.5 1601.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 401 aFloat: 800 pInt: 2001 pFloat: 0.04 anInt2: 1201 dInt1: 1601 dVar1: 1801 dpInt1: 201 dInt200: 601 dInt250: 1001 anInt10: 120100 cEL: cvec[9]
+ anInt1 401 aFloat: 800 pInt: 2001 pFloat: 0.04 anInt2: 1201 dInt1: 1601 dVar1: 1801 dpInt1: 201 dInt100: 501 dInt150: 701 dInt200: 601 dInt250: 1001 anInt10: 120100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 402 aFloat: 800.1 pInt: 2002 pFloat: 1.04 anInt2: 1202 dInt1: 1602 dVar1: 1802 dpInt1: 202 dInt200: 602 dInt250: 1002 anInt10: 120200 cEL: cvec[8]
+ anInt1 402 aFloat: 800.1 pInt: 2002 pFloat: 1.04 anInt2: 1202 dInt1: 1602 dVar1: 1802 dpInt1: 202 dInt100: 502 dInt150: 702 dInt200: 602 dInt250: 1002 anInt10: 120200 cEL: cvec[8]
   pvInt: [-90 ]
   pvFloat: [-0.486 ]
   dpvFloat: [0.140 ]
- anInt1 403 aFloat: 800.2 pInt: 2003 pFloat: 2.04 anInt2: 1203 dInt1: 1603 dVar1: 1803 dpInt1: 203 dInt200: 603 dInt250: 1003 anInt10: 120300 cEL: cvec[7]
+ anInt1 403 aFloat: 800.2 pInt: 2003 pFloat: 2.04 anInt2: 1203 dInt1: 1603 dVar1: 1803 dpInt1: 203 dInt100: 503 dInt150: 703 dInt200: 603 dInt250: 1003 anInt10: 120300 cEL: cvec[7]
   pvInt: [-80 -79 ]
   pvFloat: [-0.476 -0.376 ]
   dpvFloat: [0.240 0.241 ]
- anInt1 404 aFloat: 800.3 pInt: 2004 pFloat: 3.04 anInt2: 1204 dInt1: 1604 dVar1: 1804 dpInt1: 204 dInt200: 604 dInt250: 1004 anInt10: 120400 cEL: cvec[6]
+ anInt1 404 aFloat: 800.3 pInt: 2004 pFloat: 3.04 anInt2: 1204 dInt1: 1604 dVar1: 1804 dpInt1: 204 dInt100: 504 dInt150: 704 dInt200: 604 dInt250: 1004 anInt10: 120400 cEL: cvec[6]
   pvInt: [-70 -69 -68 ]
   pvFloat: [-0.466 -0.366 -0.266 ]
   dpvFloat: [0.340 0.341 0.342 ]
- anInt1 405 aFloat: 800.4 pInt: 2005 pFloat: 4.04 anInt2: 1205 dInt1: 1605 dVar1: 1805 dpInt1: 205 dInt200: 605 dInt250: 1005 anInt10: 120500 cEL: cvec[5]
+ anInt1 405 aFloat: 800.4 pInt: 2005 pFloat: 4.04 anInt2: 1205 dInt1: 1605 dVar1: 1805 dpInt1: 205 dInt100: 505 dInt150: 705 dInt200: 605 dInt250: 1005 anInt10: 120500 cEL: cvec[5]
   pvInt: [-60 -59 -58 -57 ]
   pvFloat: [-0.456 -0.356 -0.256 -0.156 ]
   dpvFloat: [0.440 0.441 0.442 0.443 ]
- anInt1 406 aFloat: 800.5 pInt: 2006 pFloat: 5.04 anInt2: 1206 dInt1: 1606 dVar1: 1806 dpInt1: 206 dInt200: 606 dInt250: 1006 anInt10: 120600 cEL: cvec[4]
+ anInt1 406 aFloat: 800.5 pInt: 2006 pFloat: 5.04 anInt2: 1206 dInt1: 1606 dVar1: 1806 dpInt1: 206 dInt100: 506 dInt150: 706 dInt200: 606 dInt250: 1006 anInt10: 120600 cEL: cvec[4]
   pvInt: [-50 -49 -48 -47 -46 ]
   pvFloat: [-0.446 -0.346 -0.246 -0.146 -0.046 ]
   dpvFloat: [0.540 0.541 0.542 0.543 0.544 ]
- anInt1 407 aFloat: 800.6 pInt: 2007 pFloat: 6.04 anInt2: 1207 dInt1: 1607 dVar1: 1807 dpInt1: 207 dInt200: 607 dInt250: 1007 anInt10: 120700 cEL: cvec[3]
+ anInt1 407 aFloat: 800.6 pInt: 2007 pFloat: 6.04 anInt2: 1207 dInt1: 1607 dVar1: 1807 dpInt1: 207 dInt100: 507 dInt150: 707 dInt200: 607 dInt250: 1007 anInt10: 120700 cEL: cvec[3]
   pvInt: [-40 -39 -38 -37 -36 -35 ]
   pvFloat: [-0.436 -0.336 -0.236 -0.136 -0.036 0.064 ]
   dpvFloat: [0.640 0.641 0.642 0.643 0.644 0.645 ]
- anInt1 408 aFloat: 800.7 pInt: 2008 pFloat: 7.04 anInt2: 1208 dInt1: 1608 dVar1: 1808 dpInt1: 208 dInt200: 608 dInt250: 1008 anInt10: 120800 cEL: cvec[2]
+ anInt1 408 aFloat: 800.7 pInt: 2008 pFloat: 7.04 anInt2: 1208 dInt1: 1608 dVar1: 1808 dpInt1: 208 dInt100: 508 dInt150: 708 dInt200: 608 dInt250: 1008 anInt10: 120800 cEL: cvec[2]
   pvInt: [-30 -29 -28 -27 -26 -25 -24 ]
   pvFloat: [-0.426 -0.326 -0.226 -0.126 -0.026 0.074 0.174 ]
   dpvFloat: [0.740 0.741 0.742 0.743 0.744 0.745 0.746 ]
- anInt1 409 aFloat: 800.8 pInt: 2009 pFloat: 8.04 anInt2: 1209 dInt1: 1609 dVar1: 1809 dpInt1: 209 dInt200: 609 dInt250: 1009 anInt10: 120900 cEL: cvec[1]
+ anInt1 409 aFloat: 800.8 pInt: 2009 pFloat: 8.04 anInt2: 1209 dInt1: 1609 dVar1: 1809 dpInt1: 209 dInt100: 509 dInt150: 709 dInt200: 609 dInt250: 1009 anInt10: 120900 cEL: cvec[1]
   pvInt: [-20 -19 -18 -17 -16 -15 -14 -13 ]
   pvFloat: [-0.416 -0.316 -0.216 -0.116 -0.016 0.084 0.184 0.284 ]
   dpvFloat: [0.840 0.841 0.842 0.843 0.844 0.845 0.846 0.847 ]
- anInt1 410 aFloat: 800.9 pInt: 2010 pFloat: 9.04 anInt2: 1210 dInt1: 1610 dVar1: 1810 dpInt1: 210 dInt200: 610 dInt250: 1010 anInt10: 121000 cEL: cvec[0]
+ anInt1 410 aFloat: 800.9 pInt: 2010 pFloat: 9.04 anInt2: 1210 dInt1: 1610 dVar1: 1810 dpInt1: 210 dInt100: 510 dInt150: 710 dInt200: 610 dInt250: 1010 anInt10: 121000 cEL: cvec[0]
   pvInt: [-10 -9 -8 -7 -6 -5 -4 -3 -2 ]
   pvFloat: [-0.406 -0.306 -0.206 -0.106 -0.006 0.094 0.194 0.294 0.394 ]
   dpvFloat: [0.940 0.941 0.942 0.943 0.944 0.945 0.946 0.947 0.948 ]
 4
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 4000 aFloat: 0.4 anInt2: 8000 dInt1: 12000 cEL: cvec[4] dInt200: 4600 dInt250: 5000 anInt10: 880000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 2001 aFloat: 2400 anInt2: 2801 dInt1: 1921 dInt200: 2801 anInt10: 680300
- anInt1 2002 aFloat: 2400.1 anInt2: 2802 dInt1: 1922 dInt200: 2802 anInt10: 680600
- anInt1 2003 aFloat: 2400.2 anInt2: 2803 dInt1: 1923 dInt200: 2803 anInt10: 680900
- anInt1 2004 aFloat: 2400.3 anInt2: 2804 dInt1: 1924 dInt200: 2804 anInt10: 681200
- anInt1 2005 aFloat: 2400.4 anInt2: 2805 dInt1: 1925 dInt200: 2805 anInt10: 681500
- anInt1 2006 aFloat: 2400.5 anInt2: 2806 dInt1: 1926 dInt200: 2806 anInt10: 681800
- anInt1 2007 aFloat: 2400.6 anInt2: 2807 dInt1: 1927 dInt200: 2807 anInt10: 682100
- anInt1 2008 aFloat: 2400.7 anInt2: 2808 dInt1: 1928 dInt200: 2808 anInt10: 682400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 4000 aFloat: 0.4 anInt2: 8000 dInt1: 12000 cEL: cvec[4] dInt100: 4500 dInt150: 4700 dInt200: 4600 dInt250: 5000 anInt10: 880000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 2001 aFloat: 2400 anInt2: 2801 dInt1: 1921 dInt100: 2701 dInt150: 2901 dInt200: 2801 anInt10: 680300
+ anInt1 2002 aFloat: 2400.1 anInt2: 2802 dInt1: 1922 dInt100: 2702 dInt150: 2902 dInt200: 2802 anInt10: 680600
+ anInt1 2003 aFloat: 2400.2 anInt2: 2803 dInt1: 1923 dInt100: 2703 dInt150: 2903 dInt200: 2803 anInt10: 680900
+ anInt1 2004 aFloat: 2400.3 anInt2: 2804 dInt1: 1924 dInt100: 2704 dInt150: 2904 dInt200: 2804 anInt10: 681200
+ anInt1 2005 aFloat: 2400.4 anInt2: 2805 dInt1: 1925 dInt100: 2705 dInt150: 2905 dInt200: 2805 anInt10: 681500
+ anInt1 2006 aFloat: 2400.5 anInt2: 2806 dInt1: 1926 dInt100: 2706 dInt150: 2906 dInt200: 2806 anInt10: 681800
+ anInt1 2007 aFloat: 2400.6 anInt2: 2807 dInt1: 1927 dInt100: 2707 dInt150: 2907 dInt200: 2807 anInt10: 682100
+ anInt1 2008 aFloat: 2400.7 anInt2: 2808 dInt1: 1928 dInt100: 2708 dInt150: 2908 dInt200: 2808 anInt10: 682400
 scopy_cvecWD 1004: 801(160100) 802(160200) 803(160300) 804(160400) 805(160500) 806(160600) 807(160700) 808(160800) 809(160900) 810(161000)
 scopy_hvec: 1601.5 1602.5 1603.5 1604.5 1605.5 1606.5 1607.5 1608.5 1609.5 1610.5 1611.5 1612.5 1613.5 1614.5 1615.5 1616.5 1617.5 1618.5 1619.5 1620.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dInt1: 2001 dVar1: 2251 dpInt1: 251 dInt200: 701 cEL: cvec[9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05 anInt2: 1502 dInt1: 2002 dVar1: 2252 dpInt1: 252 dInt200: 702 cEL: cvec[8]
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
-  dpvFloat: [0.150 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dInt1: 2003 dVar1: 2253 dpInt1: 253 dInt200: 703 cEL: cvec[7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05 anInt2: 1504 dInt1: 2004 dVar1: 2254 dpInt1: 254 dInt200: 704 cEL: cvec[6]
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
-  dpvFloat: [0.350 0.351 0.352 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dInt1: 2005 dVar1: 2255 dpInt1: 255 dInt200: 705 cEL: cvec[5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05 anInt2: 1506 dInt1: 2006 dVar1: 2256 dpInt1: 256 dInt200: 706 cEL: cvec[4]
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
-  dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dInt1: 2007 dVar1: 2257 dpInt1: 257 dInt200: 707 cEL: cvec[3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05 anInt2: 1508 dInt1: 2008 dVar1: 2258 dpInt1: 258 dInt200: 708 cEL: cvec[2]
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
-  dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dInt1: 2009 dVar1: 2259 dpInt1: 259 dInt200: 709 cEL: cvec[1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05 anInt2: 1510 dInt1: 2010 dVar1: 2260 dpInt1: 260 dInt200: 710 cEL: cvec[0]
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
-  dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]
 5
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: cvec[5] dInt200: 5600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 2501 aFloat: 3000 anInt2: 3501 dInt1: 2401 dInt200: 3301
- anInt1 2502 aFloat: 3000.1 anInt2: 3502 dInt1: 2402 dInt200: 3302
- anInt1 2503 aFloat: 3000.2 anInt2: 3503 dInt1: 2403 dInt200: 3303
- anInt1 2504 aFloat: 3000.3 anInt2: 3504 dInt1: 2404 dInt200: 3304
- anInt1 2505 aFloat: 3000.4 anInt2: 3505 dInt1: 2405 dInt200: 3305
- anInt1 2506 aFloat: 3000.5 anInt2: 3506 dInt1: 2406 dInt200: 3306
- anInt1 2507 aFloat: 3000.6 anInt2: 3507 dInt1: 2407 dInt200: 3307
- anInt1 2508 aFloat: 3000.7 anInt2: 3508 dInt1: 2408 dInt200: 3308
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: [18446744073709551615] dInt100: 5500 dInt200: 5600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 2501 aFloat: 3000 anInt2: 3501 dInt1: 2401 dInt100: 3201 dInt200: 3301
+ anInt1 2502 aFloat: 3000.1 anInt2: 3502 dInt1: 2402 dInt100: 3202 dInt200: 3302
+ anInt1 2503 aFloat: 3000.2 anInt2: 3503 dInt1: 2403 dInt100: 3203 dInt200: 3303
+ anInt1 2504 aFloat: 3000.3 anInt2: 3504 dInt1: 2404 dInt100: 3204 dInt200: 3304
+ anInt1 2505 aFloat: 3000.4 anInt2: 3505 dInt1: 2405 dInt100: 3205 dInt200: 3305
+ anInt1 2506 aFloat: 3000.5 anInt2: 3506 dInt1: 2406 dInt100: 3206 dInt200: 3306
+ anInt1 2507 aFloat: 3000.6 anInt2: 3507 dInt1: 2407 dInt100: 3207 dInt200: 3307
+ anInt1 2508 aFloat: 3000.7 anInt2: 3508 dInt1: 2408 dInt100: 3208 dInt200: 3308
 gvec aux items: anInt 
  anInt 3501
  anInt 3502
@@ -676,121 +634,81 @@ gvec aux items: anInt
  anInt 3509
  anInt 3510
 cvecWD 1005: 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010
-cview: 510 509 508 507 506 505 504 503 502 501
+cview:
 hvec: 2001.5 2002.5 2003.5 2004.5 2005.5 2006.5 2007.5 2008.5 2009.5 2010.5 2011.5 2012.5 2013.5 2014.5 2015.5 2016.5 2017.5 2018.5 2019.5 2020.5
 hview: 2020.5 2019.5 2018.5 2017.5 2016.5 2015.5 2014.5 2013.5 2012.5 2011.5 2010.5 2009.5 2008.5 2007.5 2006.5 2005.5 2004.5 2003.5 2002.5 2001.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dInt1: 2001 dVar1: 2251 dpInt1: 251 dInt200: 701 dInt250: 1101 anInt10: 150100 cEL: cvec[9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05 anInt2: 1502 dInt1: 2002 dVar1: 2252 dpInt1: 252 dInt200: 702 dInt250: 1102 anInt10: 150200 cEL: cvec[8]
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
-  dpvFloat: [0.150 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dInt1: 2003 dVar1: 2253 dpInt1: 253 dInt200: 703 dInt250: 1103 anInt10: 150300 cEL: cvec[7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05 anInt2: 1504 dInt1: 2004 dVar1: 2254 dpInt1: 254 dInt200: 704 dInt250: 1104 anInt10: 150400 cEL: cvec[6]
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
-  dpvFloat: [0.350 0.351 0.352 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dInt1: 2005 dVar1: 2255 dpInt1: 255 dInt200: 705 dInt250: 1105 anInt10: 150500 cEL: cvec[5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05 anInt2: 1506 dInt1: 2006 dVar1: 2256 dpInt1: 256 dInt200: 706 dInt250: 1106 anInt10: 150600 cEL: cvec[4]
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
-  dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dInt1: 2007 dVar1: 2257 dpInt1: 257 dInt200: 707 dInt250: 1107 anInt10: 150700 cEL: cvec[3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05 anInt2: 1508 dInt1: 2008 dVar1: 2258 dpInt1: 258 dInt200: 708 dInt250: 1108 anInt10: 150800 cEL: cvec[2]
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
-  dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dInt1: 2009 dVar1: 2259 dpInt1: 259 dInt200: 709 dInt250: 1109 anInt10: 150900 cEL: cvec[1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05 anInt2: 1510 dInt1: 2010 dVar1: 2260 dpInt1: 260 dInt200: 710 dInt250: 1110 anInt10: 151000 cEL: cvec[0]
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
-  dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]
 5
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: cvec[5] dInt200: 5600 dInt250: 6000 anInt10: 1100000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 2501 aFloat: 3000 anInt2: 3501 dInt1: 2401 dInt200: 3301 anInt10: 850300
- anInt1 2502 aFloat: 3000.1 anInt2: 3502 dInt1: 2402 dInt200: 3302 anInt10: 850600
- anInt1 2503 aFloat: 3000.2 anInt2: 3503 dInt1: 2403 dInt200: 3303 anInt10: 850900
- anInt1 2504 aFloat: 3000.3 anInt2: 3504 dInt1: 2404 dInt200: 3304 anInt10: 851200
- anInt1 2505 aFloat: 3000.4 anInt2: 3505 dInt1: 2405 dInt200: 3305 anInt10: 851500
- anInt1 2506 aFloat: 3000.5 anInt2: 3506 dInt1: 2406 dInt200: 3306 anInt10: 851800
- anInt1 2507 aFloat: 3000.6 anInt2: 3507 dInt1: 2407 dInt200: 3307 anInt10: 852100
- anInt1 2508 aFloat: 3000.7 anInt2: 3508 dInt1: 2408 dInt200: 3308 anInt10: 852400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: [18446744073709551615] dInt100: 5500 dInt150: 5700 dInt200: 5600 dInt250: 6000 anInt10: 1100000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 2501 aFloat: 3000 anInt2: 3501 dInt1: 2401 dInt100: 3201 dInt150: 3401 dInt200: 3301 anInt10: 850300
+ anInt1 2502 aFloat: 3000.1 anInt2: 3502 dInt1: 2402 dInt100: 3202 dInt150: 3402 dInt200: 3302 anInt10: 850600
+ anInt1 2503 aFloat: 3000.2 anInt2: 3503 dInt1: 2403 dInt100: 3203 dInt150: 3403 dInt200: 3303 anInt10: 850900
+ anInt1 2504 aFloat: 3000.3 anInt2: 3504 dInt1: 2404 dInt100: 3204 dInt150: 3404 dInt200: 3304 anInt10: 851200
+ anInt1 2505 aFloat: 3000.4 anInt2: 3505 dInt1: 2405 dInt100: 3205 dInt150: 3405 dInt200: 3305 anInt10: 851500
+ anInt1 2506 aFloat: 3000.5 anInt2: 3506 dInt1: 2406 dInt100: 3206 dInt150: 3406 dInt200: 3306 anInt10: 851800
+ anInt1 2507 aFloat: 3000.6 anInt2: 3507 dInt1: 2407 dInt100: 3207 dInt150: 3407 dInt200: 3307 anInt10: 852100
+ anInt1 2508 aFloat: 3000.7 anInt2: 3508 dInt1: 2408 dInt100: 3208 dInt150: 3408 dInt200: 3308 anInt10: 852400
 scopy_cvecWD 1005: 1001(200100) 1002(200200) 1003(200300) 1004(200400) 1005(200500) 1006(200600) 1007(200700) 1008(200800) 1009(200900) 1010(201000)
 scopy_hvec: 2001.5 2002.5 2003.5 2004.5 2005.5 2006.5 2007.5 2008.5 2009.5 2010.5 2011.5 2012.5 2013.5 2014.5 2015.5 2016.5 2017.5 2018.5 2019.5 2020.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #0 5 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 601 aFloat: 1200 pInt: 3001 pFloat: 0.06 anInt2: 1801 dInt1: 2401 dVar1: 2701 dpInt1: 301 dInt200: 801 cEL: cvec[9]
+ anInt1 601 aFloat: 1200 pInt: 3001 pFloat: 0.06 anInt2: 1801 dInt1: 2401 dVar1: 2701 dpInt1: 301 dInt100: 701 dInt200: 801 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 602 aFloat: 1200.1 pInt: 3002 pFloat: 1.06 anInt2: 1802 dInt1: 2402 dVar1: 2702 dpInt1: 302 dInt200: 802 cEL: cvec[8]
+ anInt1 602 aFloat: 1200.1 pInt: 3002 pFloat: 1.06 anInt2: 1802 dInt1: 2402 dVar1: 2702 dpInt1: 302 dInt100: 702 dInt200: 802 cEL: cvec[8]
   pvInt: [110 ]
   pvFloat: [-0.484 ]
   dpvFloat: [0.160 ]
- anInt1 603 aFloat: 1200.2 pInt: 3003 pFloat: 2.06 anInt2: 1803 dInt1: 2403 dVar1: 2703 dpInt1: 303 dInt200: 803 cEL: cvec[7]
+ anInt1 603 aFloat: 1200.2 pInt: 3003 pFloat: 2.06 anInt2: 1803 dInt1: 2403 dVar1: 2703 dpInt1: 303 dInt100: 703 dInt200: 803 cEL: cvec[7]
   pvInt: [120 121 ]
   pvFloat: [-0.474 -0.374 ]
   dpvFloat: [0.260 0.261 ]
- anInt1 604 aFloat: 1200.3 pInt: 3004 pFloat: 3.06 anInt2: 1804 dInt1: 2404 dVar1: 2704 dpInt1: 304 dInt200: 804 cEL: cvec[6]
+ anInt1 604 aFloat: 1200.3 pInt: 3004 pFloat: 3.06 anInt2: 1804 dInt1: 2404 dVar1: 2704 dpInt1: 304 dInt100: 704 dInt200: 804 cEL: cvec[6]
   pvInt: [130 131 132 ]
   pvFloat: [-0.464 -0.364 -0.264 ]
   dpvFloat: [0.360 0.361 0.362 ]
- anInt1 605 aFloat: 1200.4 pInt: 3005 pFloat: 4.06 anInt2: 1805 dInt1: 2405 dVar1: 2705 dpInt1: 305 dInt200: 805 cEL: cvec[5]
+ anInt1 605 aFloat: 1200.4 pInt: 3005 pFloat: 4.06 anInt2: 1805 dInt1: 2405 dVar1: 2705 dpInt1: 305 dInt100: 705 dInt200: 805 cEL: cvec[5]
   pvInt: [140 141 142 143 ]
   pvFloat: [-0.454 -0.354 -0.254 -0.154 ]
   dpvFloat: [0.460 0.461 0.462 0.463 ]
- anInt1 606 aFloat: 1200.5 pInt: 3006 pFloat: 5.06 anInt2: 1806 dInt1: 2406 dVar1: 2706 dpInt1: 306 dInt200: 806 cEL: cvec[4]
+ anInt1 606 aFloat: 1200.5 pInt: 3006 pFloat: 5.06 anInt2: 1806 dInt1: 2406 dVar1: 2706 dpInt1: 306 dInt100: 706 dInt200: 806 cEL: cvec[4]
   pvInt: [150 151 152 153 154 ]
   pvFloat: [-0.444 -0.344 -0.244 -0.144 -0.044 ]
   dpvFloat: [0.560 0.561 0.562 0.563 0.564 ]
- anInt1 607 aFloat: 1200.6 pInt: 3007 pFloat: 6.06 anInt2: 1807 dInt1: 2407 dVar1: 2707 dpInt1: 307 dInt200: 807 cEL: cvec[3]
+ anInt1 607 aFloat: 1200.6 pInt: 3007 pFloat: 6.06 anInt2: 1807 dInt1: 2407 dVar1: 2707 dpInt1: 307 dInt100: 707 dInt200: 807 cEL: cvec[3]
   pvInt: [160 161 162 163 164 165 ]
   pvFloat: [-0.434 -0.334 -0.234 -0.134 -0.034 0.066 ]
   dpvFloat: [0.660 0.661 0.662 0.663 0.664 0.665 ]
- anInt1 608 aFloat: 1200.7 pInt: 3008 pFloat: 7.06 anInt2: 1808 dInt1: 2408 dVar1: 2708 dpInt1: 308 dInt200: 808 cEL: cvec[2]
+ anInt1 608 aFloat: 1200.7 pInt: 3008 pFloat: 7.06 anInt2: 1808 dInt1: 2408 dVar1: 2708 dpInt1: 308 dInt100: 708 dInt200: 808 cEL: cvec[2]
   pvInt: [170 171 172 173 174 175 176 ]
   pvFloat: [-0.424 -0.324 -0.224 -0.124 -0.024 0.076 0.176 ]
   dpvFloat: [0.760 0.761 0.762 0.763 0.764 0.765 0.766 ]
- anInt1 609 aFloat: 1200.8 pInt: 3009 pFloat: 8.06 anInt2: 1809 dInt1: 2409 dVar1: 2709 dpInt1: 309 dInt200: 809 cEL: cvec[1]
+ anInt1 609 aFloat: 1200.8 pInt: 3009 pFloat: 8.06 anInt2: 1809 dInt1: 2409 dVar1: 2709 dpInt1: 309 dInt100: 709 dInt200: 809 cEL: cvec[1]
   pvInt: [180 181 182 183 184 185 186 187 ]
   pvFloat: [-0.414 -0.314 -0.214 -0.114 -0.014 0.086 0.186 0.286 ]
   dpvFloat: [0.860 0.861 0.862 0.863 0.864 0.865 0.866 0.867 ]
- anInt1 610 aFloat: 1200.9 pInt: 3010 pFloat: 9.06 anInt2: 1810 dInt1: 2410 dVar1: 2710 dpInt1: 310 dInt200: 810 cEL: cvec[0]
+ anInt1 610 aFloat: 1200.9 pInt: 3010 pFloat: 9.06 anInt2: 1810 dInt1: 2410 dVar1: 2710 dpInt1: 310 dInt100: 710 dInt200: 810 cEL: cvec[0]
   pvInt: [190 191 192 193 194 195 196 197 198 ]
   pvFloat: [-0.404 -0.304 -0.204 -0.104 -0.004 0.096 0.196 0.296 0.396 ]
   dpvFloat: [0.960 0.961 0.962 0.963 0.964 0.965 0.966 0.967 0.968 ]
 6
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 6000 aFloat: 0.6 anInt2: 12000 dInt1: 18000 cEL: cvec[6] dInt200: 6600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 3001 aFloat: 3600 anInt2: 4201 dInt1: 2881 dInt200: 3801
- anInt1 3002 aFloat: 3600.1 anInt2: 4202 dInt1: 2882 dInt200: 3802
- anInt1 3003 aFloat: 3600.2 anInt2: 4203 dInt1: 2883 dInt200: 3803
- anInt1 3004 aFloat: 3600.3 anInt2: 4204 dInt1: 2884 dInt200: 3804
- anInt1 3005 aFloat: 3600.4 anInt2: 4205 dInt1: 2885 dInt200: 3805
- anInt1 3006 aFloat: 3600.5 anInt2: 4206 dInt1: 2886 dInt200: 3806
- anInt1 3007 aFloat: 3600.6 anInt2: 4207 dInt1: 2887 dInt200: 3807
- anInt1 3008 aFloat: 3600.7 anInt2: 4208 dInt1: 2888 dInt200: 3808
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 6000 aFloat: 0.6 anInt2: 12000 dInt1: 18000 cEL: cvec[6] dInt100: 6500 dInt200: 6600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 3001 aFloat: 3600 anInt2: 4201 dInt1: 2881 dInt100: 3701 dInt200: 3801
+ anInt1 3002 aFloat: 3600.1 anInt2: 4202 dInt1: 2882 dInt100: 3702 dInt200: 3802
+ anInt1 3003 aFloat: 3600.2 anInt2: 4203 dInt1: 2883 dInt100: 3703 dInt200: 3803
+ anInt1 3004 aFloat: 3600.3 anInt2: 4204 dInt1: 2884 dInt100: 3704 dInt200: 3804
+ anInt1 3005 aFloat: 3600.4 anInt2: 4205 dInt1: 2885 dInt100: 3705 dInt200: 3805
+ anInt1 3006 aFloat: 3600.5 anInt2: 4206 dInt1: 2886 dInt100: 3706 dInt200: 3806
+ anInt1 3007 aFloat: 3600.6 anInt2: 4207 dInt1: 2887 dInt100: 3707 dInt200: 3807
+ anInt1 3008 aFloat: 3600.7 anInt2: 4208 dInt1: 2888 dInt100: 3708 dInt200: 3808
 gvec aux items: anInt 
  anInt 4201
  anInt 4202
@@ -806,118 +724,118 @@ cvecWD 1006: 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210
 cview: 610 609 608 607 606 605 604 603 602 601
 hvec: 2401.5 2402.5 2403.5 2404.5 2405.5 2406.5 2407.5 2408.5 2409.5 2410.5 2411.5 2412.5 2413.5 2414.5 2415.5 2416.5 2417.5 2418.5 2419.5 2420.5
 hview: 2420.5 2419.5 2418.5 2417.5 2416.5 2415.5 2414.5 2413.5 2412.5 2411.5 2410.5 2409.5 2408.5 2407.5 2406.5 2405.5 2404.5 2403.5 2402.5 2401.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 601 aFloat: 1200 pInt: 3001 pFloat: 0.06 anInt2: 1801 dInt1: 2401 dVar1: 2701 dpInt1: 301 dInt200: 801 dInt250: 1201 anInt10: 180100 cEL: cvec[9]
+ anInt1 601 aFloat: 1200 pInt: 3001 pFloat: 0.06 anInt2: 1801 dInt1: 2401 dVar1: 2701 dpInt1: 301 dInt100: 701 dInt150: 901 dInt200: 801 dInt250: 1201 anInt10: 180100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 602 aFloat: 1200.1 pInt: 3002 pFloat: 1.06 anInt2: 1802 dInt1: 2402 dVar1: 2702 dpInt1: 302 dInt200: 802 dInt250: 1202 anInt10: 180200 cEL: cvec[8]
+ anInt1 602 aFloat: 1200.1 pInt: 3002 pFloat: 1.06 anInt2: 1802 dInt1: 2402 dVar1: 2702 dpInt1: 302 dInt100: 702 dInt150: 902 dInt200: 802 dInt250: 1202 anInt10: 180200 cEL: cvec[8]
   pvInt: [110 ]
   pvFloat: [-0.484 ]
   dpvFloat: [0.160 ]
- anInt1 603 aFloat: 1200.2 pInt: 3003 pFloat: 2.06 anInt2: 1803 dInt1: 2403 dVar1: 2703 dpInt1: 303 dInt200: 803 dInt250: 1203 anInt10: 180300 cEL: cvec[7]
+ anInt1 603 aFloat: 1200.2 pInt: 3003 pFloat: 2.06 anInt2: 1803 dInt1: 2403 dVar1: 2703 dpInt1: 303 dInt100: 703 dInt150: 903 dInt200: 803 dInt250: 1203 anInt10: 180300 cEL: cvec[7]
   pvInt: [120 121 ]
   pvFloat: [-0.474 -0.374 ]
   dpvFloat: [0.260 0.261 ]
- anInt1 604 aFloat: 1200.3 pInt: 3004 pFloat: 3.06 anInt2: 1804 dInt1: 2404 dVar1: 2704 dpInt1: 304 dInt200: 804 dInt250: 1204 anInt10: 180400 cEL: cvec[6]
+ anInt1 604 aFloat: 1200.3 pInt: 3004 pFloat: 3.06 anInt2: 1804 dInt1: 2404 dVar1: 2704 dpInt1: 304 dInt100: 704 dInt150: 904 dInt200: 804 dInt250: 1204 anInt10: 180400 cEL: cvec[6]
   pvInt: [130 131 132 ]
   pvFloat: [-0.464 -0.364 -0.264 ]
   dpvFloat: [0.360 0.361 0.362 ]
- anInt1 605 aFloat: 1200.4 pInt: 3005 pFloat: 4.06 anInt2: 1805 dInt1: 2405 dVar1: 2705 dpInt1: 305 dInt200: 805 dInt250: 1205 anInt10: 180500 cEL: cvec[5]
+ anInt1 605 aFloat: 1200.4 pInt: 3005 pFloat: 4.06 anInt2: 1805 dInt1: 2405 dVar1: 2705 dpInt1: 305 dInt100: 705 dInt150: 905 dInt200: 805 dInt250: 1205 anInt10: 180500 cEL: cvec[5]
   pvInt: [140 141 142 143 ]
   pvFloat: [-0.454 -0.354 -0.254 -0.154 ]
   dpvFloat: [0.460 0.461 0.462 0.463 ]
- anInt1 606 aFloat: 1200.5 pInt: 3006 pFloat: 5.06 anInt2: 1806 dInt1: 2406 dVar1: 2706 dpInt1: 306 dInt200: 806 dInt250: 1206 anInt10: 180600 cEL: cvec[4]
+ anInt1 606 aFloat: 1200.5 pInt: 3006 pFloat: 5.06 anInt2: 1806 dInt1: 2406 dVar1: 2706 dpInt1: 306 dInt100: 706 dInt150: 906 dInt200: 806 dInt250: 1206 anInt10: 180600 cEL: cvec[4]
   pvInt: [150 151 152 153 154 ]
   pvFloat: [-0.444 -0.344 -0.244 -0.144 -0.044 ]
   dpvFloat: [0.560 0.561 0.562 0.563 0.564 ]
- anInt1 607 aFloat: 1200.6 pInt: 3007 pFloat: 6.06 anInt2: 1807 dInt1: 2407 dVar1: 2707 dpInt1: 307 dInt200: 807 dInt250: 1207 anInt10: 180700 cEL: cvec[3]
+ anInt1 607 aFloat: 1200.6 pInt: 3007 pFloat: 6.06 anInt2: 1807 dInt1: 2407 dVar1: 2707 dpInt1: 307 dInt100: 707 dInt150: 907 dInt200: 807 dInt250: 1207 anInt10: 180700 cEL: cvec[3]
   pvInt: [160 161 162 163 164 165 ]
   pvFloat: [-0.434 -0.334 -0.234 -0.134 -0.034 0.066 ]
   dpvFloat: [0.660 0.661 0.662 0.663 0.664 0.665 ]
- anInt1 608 aFloat: 1200.7 pInt: 3008 pFloat: 7.06 anInt2: 1808 dInt1: 2408 dVar1: 2708 dpInt1: 308 dInt200: 808 dInt250: 1208 anInt10: 180800 cEL: cvec[2]
+ anInt1 608 aFloat: 1200.7 pInt: 3008 pFloat: 7.06 anInt2: 1808 dInt1: 2408 dVar1: 2708 dpInt1: 308 dInt100: 708 dInt150: 908 dInt200: 808 dInt250: 1208 anInt10: 180800 cEL: cvec[2]
   pvInt: [170 171 172 173 174 175 176 ]
   pvFloat: [-0.424 -0.324 -0.224 -0.124 -0.024 0.076 0.176 ]
   dpvFloat: [0.760 0.761 0.762 0.763 0.764 0.765 0.766 ]
- anInt1 609 aFloat: 1200.8 pInt: 3009 pFloat: 8.06 anInt2: 1809 dInt1: 2409 dVar1: 2709 dpInt1: 309 dInt200: 809 dInt250: 1209 anInt10: 180900 cEL: cvec[1]
+ anInt1 609 aFloat: 1200.8 pInt: 3009 pFloat: 8.06 anInt2: 1809 dInt1: 2409 dVar1: 2709 dpInt1: 309 dInt100: 709 dInt150: 909 dInt200: 809 dInt250: 1209 anInt10: 180900 cEL: cvec[1]
   pvInt: [180 181 182 183 184 185 186 187 ]
   pvFloat: [-0.414 -0.314 -0.214 -0.114 -0.014 0.086 0.186 0.286 ]
   dpvFloat: [0.860 0.861 0.862 0.863 0.864 0.865 0.866 0.867 ]
- anInt1 610 aFloat: 1200.9 pInt: 3010 pFloat: 9.06 anInt2: 1810 dInt1: 2410 dVar1: 2710 dpInt1: 310 dInt200: 810 dInt250: 1210 anInt10: 181000 cEL: cvec[0]
+ anInt1 610 aFloat: 1200.9 pInt: 3010 pFloat: 9.06 anInt2: 1810 dInt1: 2410 dVar1: 2710 dpInt1: 310 dInt100: 710 dInt150: 910 dInt200: 810 dInt250: 1210 anInt10: 181000 cEL: cvec[0]
   pvInt: [190 191 192 193 194 195 196 197 198 ]
   pvFloat: [-0.404 -0.304 -0.204 -0.104 -0.004 0.096 0.196 0.296 0.396 ]
   dpvFloat: [0.960 0.961 0.962 0.963 0.964 0.965 0.966 0.967 0.968 ]
 6
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 6000 aFloat: 0.6 anInt2: 12000 dInt1: 18000 cEL: cvec[6] dInt200: 6600 dInt250: 7000 anInt10: 1320000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 3001 aFloat: 3600 anInt2: 4201 dInt1: 2881 dInt200: 3801 anInt10: 1020300
- anInt1 3002 aFloat: 3600.1 anInt2: 4202 dInt1: 2882 dInt200: 3802 anInt10: 1020600
- anInt1 3003 aFloat: 3600.2 anInt2: 4203 dInt1: 2883 dInt200: 3803 anInt10: 1020900
- anInt1 3004 aFloat: 3600.3 anInt2: 4204 dInt1: 2884 dInt200: 3804 anInt10: 1021200
- anInt1 3005 aFloat: 3600.4 anInt2: 4205 dInt1: 2885 dInt200: 3805 anInt10: 1021500
- anInt1 3006 aFloat: 3600.5 anInt2: 4206 dInt1: 2886 dInt200: 3806 anInt10: 1021800
- anInt1 3007 aFloat: 3600.6 anInt2: 4207 dInt1: 2887 dInt200: 3807 anInt10: 1022100
- anInt1 3008 aFloat: 3600.7 anInt2: 4208 dInt1: 2888 dInt200: 3808 anInt10: 1022400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 6000 aFloat: 0.6 anInt2: 12000 dInt1: 18000 cEL: cvec[6] dInt100: 6500 dInt150: 6700 dInt200: 6600 dInt250: 7000 anInt10: 1320000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 3001 aFloat: 3600 anInt2: 4201 dInt1: 2881 dInt100: 3701 dInt150: 3901 dInt200: 3801 anInt10: 1020300
+ anInt1 3002 aFloat: 3600.1 anInt2: 4202 dInt1: 2882 dInt100: 3702 dInt150: 3902 dInt200: 3802 anInt10: 1020600
+ anInt1 3003 aFloat: 3600.2 anInt2: 4203 dInt1: 2883 dInt100: 3703 dInt150: 3903 dInt200: 3803 anInt10: 1020900
+ anInt1 3004 aFloat: 3600.3 anInt2: 4204 dInt1: 2884 dInt100: 3704 dInt150: 3904 dInt200: 3804 anInt10: 1021200
+ anInt1 3005 aFloat: 3600.4 anInt2: 4205 dInt1: 2885 dInt100: 3705 dInt150: 3905 dInt200: 3805 anInt10: 1021500
+ anInt1 3006 aFloat: 3600.5 anInt2: 4206 dInt1: 2886 dInt100: 3706 dInt150: 3906 dInt200: 3806 anInt10: 1021800
+ anInt1 3007 aFloat: 3600.6 anInt2: 4207 dInt1: 2887 dInt100: 3707 dInt150: 3907 dInt200: 3807 anInt10: 1022100
+ anInt1 3008 aFloat: 3600.7 anInt2: 4208 dInt1: 2888 dInt100: 3708 dInt150: 3908 dInt200: 3808 anInt10: 1022400
 scopy_cvecWD 1006: 1201(240100) 1202(240200) 1203(240300) 1204(240400) 1205(240500) 1206(240600) 1207(240700) 1208(240800) 1209(240900) 1210(241000)
 scopy_hvec: 2401.5 2402.5 2403.5 2404.5 2405.5 2406.5 2407.5 2408.5 2409.5 2410.5 2411.5 2412.5 2413.5 2414.5 2415.5 2416.5 2417.5 2418.5 2419.5 2420.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #5, run #0 6 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #6, run #0 6 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 701 aFloat: 1400 pInt: 3501 pFloat: 0.07 anInt2: 2101 dInt1: 2801 dVar1: 3151 dpInt1: 351 dInt200: 901 cEL: cvec[9]
+ anInt1 701 aFloat: 1400 pInt: 3501 pFloat: 0.07 anInt2: 2101 dInt1: 2801 dVar1: 3151 dpInt1: 351 dInt100: 801 dInt200: 901 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 702 aFloat: 1400.1 pInt: 3502 pFloat: 1.07 anInt2: 2102 dInt1: 2802 dVar1: 3152 dpInt1: 352 dInt200: 902 cEL: cvec[8]
+ anInt1 702 aFloat: 1400.1 pInt: 3502 pFloat: 1.07 anInt2: 2102 dInt1: 2802 dVar1: 3152 dpInt1: 352 dInt100: 802 dInt200: 902 cEL: cvec[8]
   pvInt: [210 ]
   pvFloat: [-0.483 ]
   dpvFloat: [0.170 ]
- anInt1 703 aFloat: 1400.2 pInt: 3503 pFloat: 2.07 anInt2: 2103 dInt1: 2803 dVar1: 3153 dpInt1: 353 dInt200: 903 cEL: cvec[7]
+ anInt1 703 aFloat: 1400.2 pInt: 3503 pFloat: 2.07 anInt2: 2103 dInt1: 2803 dVar1: 3153 dpInt1: 353 dInt100: 803 dInt200: 903 cEL: cvec[7]
   pvInt: [220 221 ]
   pvFloat: [-0.473 -0.373 ]
   dpvFloat: [0.270 0.271 ]
- anInt1 704 aFloat: 1400.3 pInt: 3504 pFloat: 3.07 anInt2: 2104 dInt1: 2804 dVar1: 3154 dpInt1: 354 dInt200: 904 cEL: cvec[6]
+ anInt1 704 aFloat: 1400.3 pInt: 3504 pFloat: 3.07 anInt2: 2104 dInt1: 2804 dVar1: 3154 dpInt1: 354 dInt100: 804 dInt200: 904 cEL: cvec[6]
   pvInt: [230 231 232 ]
   pvFloat: [-0.463 -0.363 -0.263 ]
   dpvFloat: [0.370 0.371 0.372 ]
- anInt1 705 aFloat: 1400.4 pInt: 3505 pFloat: 4.07 anInt2: 2105 dInt1: 2805 dVar1: 3155 dpInt1: 355 dInt200: 905 cEL: cvec[5]
+ anInt1 705 aFloat: 1400.4 pInt: 3505 pFloat: 4.07 anInt2: 2105 dInt1: 2805 dVar1: 3155 dpInt1: 355 dInt100: 805 dInt200: 905 cEL: cvec[5]
   pvInt: [240 241 242 243 ]
   pvFloat: [-0.453 -0.353 -0.253 -0.153 ]
   dpvFloat: [0.470 0.471 0.472 0.473 ]
- anInt1 706 aFloat: 1400.5 pInt: 3506 pFloat: 5.07 anInt2: 2106 dInt1: 2806 dVar1: 3156 dpInt1: 356 dInt200: 906 cEL: cvec[4]
+ anInt1 706 aFloat: 1400.5 pInt: 3506 pFloat: 5.07 anInt2: 2106 dInt1: 2806 dVar1: 3156 dpInt1: 356 dInt100: 806 dInt200: 906 cEL: cvec[4]
   pvInt: [250 251 252 253 254 ]
   pvFloat: [-0.443 -0.343 -0.243 -0.143 -0.043 ]
   dpvFloat: [0.570 0.571 0.572 0.573 0.574 ]
- anInt1 707 aFloat: 1400.6 pInt: 3507 pFloat: 6.07 anInt2: 2107 dInt1: 2807 dVar1: 3157 dpInt1: 357 dInt200: 907 cEL: cvec[3]
+ anInt1 707 aFloat: 1400.6 pInt: 3507 pFloat: 6.07 anInt2: 2107 dInt1: 2807 dVar1: 3157 dpInt1: 357 dInt100: 807 dInt200: 907 cEL: cvec[3]
   pvInt: [260 261 262 263 264 265 ]
   pvFloat: [-0.433 -0.333 -0.233 -0.133 -0.033 0.067 ]
   dpvFloat: [0.670 0.671 0.672 0.673 0.674 0.675 ]
- anInt1 708 aFloat: 1400.7 pInt: 3508 pFloat: 7.07 anInt2: 2108 dInt1: 2808 dVar1: 3158 dpInt1: 358 dInt200: 908 cEL: cvec[2]
+ anInt1 708 aFloat: 1400.7 pInt: 3508 pFloat: 7.07 anInt2: 2108 dInt1: 2808 dVar1: 3158 dpInt1: 358 dInt100: 808 dInt200: 908 cEL: cvec[2]
   pvInt: [270 271 272 273 274 275 276 ]
   pvFloat: [-0.423 -0.323 -0.223 -0.123 -0.023 0.077 0.177 ]
   dpvFloat: [0.770 0.771 0.772 0.773 0.774 0.775 0.776 ]
- anInt1 709 aFloat: 1400.8 pInt: 3509 pFloat: 8.07 anInt2: 2109 dInt1: 2809 dVar1: 3159 dpInt1: 359 dInt200: 909 cEL: cvec[1]
+ anInt1 709 aFloat: 1400.8 pInt: 3509 pFloat: 8.07 anInt2: 2109 dInt1: 2809 dVar1: 3159 dpInt1: 359 dInt100: 809 dInt200: 909 cEL: cvec[1]
   pvInt: [280 281 282 283 284 285 286 287 ]
   pvFloat: [-0.413 -0.313 -0.213 -0.113 -0.013 0.087 0.187 0.287 ]
   dpvFloat: [0.870 0.871 0.872 0.873 0.874 0.875 0.876 0.877 ]
- anInt1 710 aFloat: 1400.9 pInt: 3510 pFloat: 9.07 anInt2: 2110 dInt1: 2810 dVar1: 3160 dpInt1: 360 dInt200: 910 cEL: cvec[0]
+ anInt1 710 aFloat: 1400.9 pInt: 3510 pFloat: 9.07 anInt2: 2110 dInt1: 2810 dVar1: 3160 dpInt1: 360 dInt100: 810 dInt200: 910 cEL: cvec[0]
   pvInt: [290 291 292 293 294 295 296 297 298 ]
   pvFloat: [-0.403 -0.303 -0.203 -0.103 -0.003 0.097 0.197 0.297 0.397 ]
   dpvFloat: [0.970 0.971 0.972 0.973 0.974 0.975 0.976 0.977 0.978 ]
 7
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 7000 aFloat: 0.7 anInt2: 14000 dInt1: 21000 cEL: cvec[7] dInt200: 7600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 3501 aFloat: 4200 anInt2: 4901 dInt1: 3361 dInt200: 4301
- anInt1 3502 aFloat: 4200.1 anInt2: 4902 dInt1: 3362 dInt200: 4302
- anInt1 3503 aFloat: 4200.2 anInt2: 4903 dInt1: 3363 dInt200: 4303
- anInt1 3504 aFloat: 4200.3 anInt2: 4904 dInt1: 3364 dInt200: 4304
- anInt1 3505 aFloat: 4200.4 anInt2: 4905 dInt1: 3365 dInt200: 4305
- anInt1 3506 aFloat: 4200.5 anInt2: 4906 dInt1: 3366 dInt200: 4306
- anInt1 3507 aFloat: 4200.6 anInt2: 4907 dInt1: 3367 dInt200: 4307
- anInt1 3508 aFloat: 4200.7 anInt2: 4908 dInt1: 3368 dInt200: 4308
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 7000 aFloat: 0.7 anInt2: 14000 dInt1: 21000 cEL: cvec[7] dInt100: 7500 dInt200: 7600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 3501 aFloat: 4200 anInt2: 4901 dInt1: 3361 dInt100: 4201 dInt200: 4301
+ anInt1 3502 aFloat: 4200.1 anInt2: 4902 dInt1: 3362 dInt100: 4202 dInt200: 4302
+ anInt1 3503 aFloat: 4200.2 anInt2: 4903 dInt1: 3363 dInt100: 4203 dInt200: 4303
+ anInt1 3504 aFloat: 4200.3 anInt2: 4904 dInt1: 3364 dInt100: 4204 dInt200: 4304
+ anInt1 3505 aFloat: 4200.4 anInt2: 4905 dInt1: 3365 dInt100: 4205 dInt200: 4305
+ anInt1 3506 aFloat: 4200.5 anInt2: 4906 dInt1: 3366 dInt100: 4206 dInt200: 4306
+ anInt1 3507 aFloat: 4200.6 anInt2: 4907 dInt1: 3367 dInt100: 4207 dInt200: 4307
+ anInt1 3508 aFloat: 4200.7 anInt2: 4908 dInt1: 3368 dInt100: 4208 dInt200: 4308
 gvec aux items: anInt 
  anInt 4901
  anInt 4902
@@ -933,118 +851,118 @@ cvecWD 1007: 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410
 cview: 710 709 708 707 706 705 704 703 702 701
 hvec: 2801.5 2802.5 2803.5 2804.5 2805.5 2806.5 2807.5 2808.5 2809.5 2810.5 2811.5 2812.5 2813.5 2814.5 2815.5 2816.5 2817.5 2818.5 2819.5 2820.5
 hview: 2820.5 2819.5 2818.5 2817.5 2816.5 2815.5 2814.5 2813.5 2812.5 2811.5 2810.5 2809.5 2808.5 2807.5 2806.5 2805.5 2804.5 2803.5 2802.5 2801.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 701 aFloat: 1400 pInt: 3501 pFloat: 0.07 anInt2: 2101 dInt1: 2801 dVar1: 3151 dpInt1: 351 dInt200: 901 dInt250: 1301 anInt10: 210100 cEL: cvec[9]
+ anInt1 701 aFloat: 1400 pInt: 3501 pFloat: 0.07 anInt2: 2101 dInt1: 2801 dVar1: 3151 dpInt1: 351 dInt100: 801 dInt150: 1001 dInt200: 901 dInt250: 1301 anInt10: 210100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 702 aFloat: 1400.1 pInt: 3502 pFloat: 1.07 anInt2: 2102 dInt1: 2802 dVar1: 3152 dpInt1: 352 dInt200: 902 dInt250: 1302 anInt10: 210200 cEL: cvec[8]
+ anInt1 702 aFloat: 1400.1 pInt: 3502 pFloat: 1.07 anInt2: 2102 dInt1: 2802 dVar1: 3152 dpInt1: 352 dInt100: 802 dInt150: 1002 dInt200: 902 dInt250: 1302 anInt10: 210200 cEL: cvec[8]
   pvInt: [210 ]
   pvFloat: [-0.483 ]
   dpvFloat: [0.170 ]
- anInt1 703 aFloat: 1400.2 pInt: 3503 pFloat: 2.07 anInt2: 2103 dInt1: 2803 dVar1: 3153 dpInt1: 353 dInt200: 903 dInt250: 1303 anInt10: 210300 cEL: cvec[7]
+ anInt1 703 aFloat: 1400.2 pInt: 3503 pFloat: 2.07 anInt2: 2103 dInt1: 2803 dVar1: 3153 dpInt1: 353 dInt100: 803 dInt150: 1003 dInt200: 903 dInt250: 1303 anInt10: 210300 cEL: cvec[7]
   pvInt: [220 221 ]
   pvFloat: [-0.473 -0.373 ]
   dpvFloat: [0.270 0.271 ]
- anInt1 704 aFloat: 1400.3 pInt: 3504 pFloat: 3.07 anInt2: 2104 dInt1: 2804 dVar1: 3154 dpInt1: 354 dInt200: 904 dInt250: 1304 anInt10: 210400 cEL: cvec[6]
+ anInt1 704 aFloat: 1400.3 pInt: 3504 pFloat: 3.07 anInt2: 2104 dInt1: 2804 dVar1: 3154 dpInt1: 354 dInt100: 804 dInt150: 1004 dInt200: 904 dInt250: 1304 anInt10: 210400 cEL: cvec[6]
   pvInt: [230 231 232 ]
   pvFloat: [-0.463 -0.363 -0.263 ]
   dpvFloat: [0.370 0.371 0.372 ]
- anInt1 705 aFloat: 1400.4 pInt: 3505 pFloat: 4.07 anInt2: 2105 dInt1: 2805 dVar1: 3155 dpInt1: 355 dInt200: 905 dInt250: 1305 anInt10: 210500 cEL: cvec[5]
+ anInt1 705 aFloat: 1400.4 pInt: 3505 pFloat: 4.07 anInt2: 2105 dInt1: 2805 dVar1: 3155 dpInt1: 355 dInt100: 805 dInt150: 1005 dInt200: 905 dInt250: 1305 anInt10: 210500 cEL: cvec[5]
   pvInt: [240 241 242 243 ]
   pvFloat: [-0.453 -0.353 -0.253 -0.153 ]
   dpvFloat: [0.470 0.471 0.472 0.473 ]
- anInt1 706 aFloat: 1400.5 pInt: 3506 pFloat: 5.07 anInt2: 2106 dInt1: 2806 dVar1: 3156 dpInt1: 356 dInt200: 906 dInt250: 1306 anInt10: 210600 cEL: cvec[4]
+ anInt1 706 aFloat: 1400.5 pInt: 3506 pFloat: 5.07 anInt2: 2106 dInt1: 2806 dVar1: 3156 dpInt1: 356 dInt100: 806 dInt150: 1006 dInt200: 906 dInt250: 1306 anInt10: 210600 cEL: cvec[4]
   pvInt: [250 251 252 253 254 ]
   pvFloat: [-0.443 -0.343 -0.243 -0.143 -0.043 ]
   dpvFloat: [0.570 0.571 0.572 0.573 0.574 ]
- anInt1 707 aFloat: 1400.6 pInt: 3507 pFloat: 6.07 anInt2: 2107 dInt1: 2807 dVar1: 3157 dpInt1: 357 dInt200: 907 dInt250: 1307 anInt10: 210700 cEL: cvec[3]
+ anInt1 707 aFloat: 1400.6 pInt: 3507 pFloat: 6.07 anInt2: 2107 dInt1: 2807 dVar1: 3157 dpInt1: 357 dInt100: 807 dInt150: 1007 dInt200: 907 dInt250: 1307 anInt10: 210700 cEL: cvec[3]
   pvInt: [260 261 262 263 264 265 ]
   pvFloat: [-0.433 -0.333 -0.233 -0.133 -0.033 0.067 ]
   dpvFloat: [0.670 0.671 0.672 0.673 0.674 0.675 ]
- anInt1 708 aFloat: 1400.7 pInt: 3508 pFloat: 7.07 anInt2: 2108 dInt1: 2808 dVar1: 3158 dpInt1: 358 dInt200: 908 dInt250: 1308 anInt10: 210800 cEL: cvec[2]
+ anInt1 708 aFloat: 1400.7 pInt: 3508 pFloat: 7.07 anInt2: 2108 dInt1: 2808 dVar1: 3158 dpInt1: 358 dInt100: 808 dInt150: 1008 dInt200: 908 dInt250: 1308 anInt10: 210800 cEL: cvec[2]
   pvInt: [270 271 272 273 274 275 276 ]
   pvFloat: [-0.423 -0.323 -0.223 -0.123 -0.023 0.077 0.177 ]
   dpvFloat: [0.770 0.771 0.772 0.773 0.774 0.775 0.776 ]
- anInt1 709 aFloat: 1400.8 pInt: 3509 pFloat: 8.07 anInt2: 2109 dInt1: 2809 dVar1: 3159 dpInt1: 359 dInt200: 909 dInt250: 1309 anInt10: 210900 cEL: cvec[1]
+ anInt1 709 aFloat: 1400.8 pInt: 3509 pFloat: 8.07 anInt2: 2109 dInt1: 2809 dVar1: 3159 dpInt1: 359 dInt100: 809 dInt150: 1009 dInt200: 909 dInt250: 1309 anInt10: 210900 cEL: cvec[1]
   pvInt: [280 281 282 283 284 285 286 287 ]
   pvFloat: [-0.413 -0.313 -0.213 -0.113 -0.013 0.087 0.187 0.287 ]
   dpvFloat: [0.870 0.871 0.872 0.873 0.874 0.875 0.876 0.877 ]
- anInt1 710 aFloat: 1400.9 pInt: 3510 pFloat: 9.07 anInt2: 2110 dInt1: 2810 dVar1: 3160 dpInt1: 360 dInt200: 910 dInt250: 1310 anInt10: 211000 cEL: cvec[0]
+ anInt1 710 aFloat: 1400.9 pInt: 3510 pFloat: 9.07 anInt2: 2110 dInt1: 2810 dVar1: 3160 dpInt1: 360 dInt100: 810 dInt150: 1010 dInt200: 910 dInt250: 1310 anInt10: 211000 cEL: cvec[0]
   pvInt: [290 291 292 293 294 295 296 297 298 ]
   pvFloat: [-0.403 -0.303 -0.203 -0.103 -0.003 0.097 0.197 0.297 0.397 ]
   dpvFloat: [0.970 0.971 0.972 0.973 0.974 0.975 0.976 0.977 0.978 ]
 7
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 7000 aFloat: 0.7 anInt2: 14000 dInt1: 21000 cEL: cvec[7] dInt200: 7600 dInt250: 8000 anInt10: 1540000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 3501 aFloat: 4200 anInt2: 4901 dInt1: 3361 dInt200: 4301 anInt10: 1190300
- anInt1 3502 aFloat: 4200.1 anInt2: 4902 dInt1: 3362 dInt200: 4302 anInt10: 1190600
- anInt1 3503 aFloat: 4200.2 anInt2: 4903 dInt1: 3363 dInt200: 4303 anInt10: 1190900
- anInt1 3504 aFloat: 4200.3 anInt2: 4904 dInt1: 3364 dInt200: 4304 anInt10: 1191200
- anInt1 3505 aFloat: 4200.4 anInt2: 4905 dInt1: 3365 dInt200: 4305 anInt10: 1191500
- anInt1 3506 aFloat: 4200.5 anInt2: 4906 dInt1: 3366 dInt200: 4306 anInt10: 1191800
- anInt1 3507 aFloat: 4200.6 anInt2: 4907 dInt1: 3367 dInt200: 4307 anInt10: 1192100
- anInt1 3508 aFloat: 4200.7 anInt2: 4908 dInt1: 3368 dInt200: 4308 anInt10: 1192400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 7000 aFloat: 0.7 anInt2: 14000 dInt1: 21000 cEL: cvec[7] dInt100: 7500 dInt150: 7700 dInt200: 7600 dInt250: 8000 anInt10: 1540000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 3501 aFloat: 4200 anInt2: 4901 dInt1: 3361 dInt100: 4201 dInt150: 4401 dInt200: 4301 anInt10: 1190300
+ anInt1 3502 aFloat: 4200.1 anInt2: 4902 dInt1: 3362 dInt100: 4202 dInt150: 4402 dInt200: 4302 anInt10: 1190600
+ anInt1 3503 aFloat: 4200.2 anInt2: 4903 dInt1: 3363 dInt100: 4203 dInt150: 4403 dInt200: 4303 anInt10: 1190900
+ anInt1 3504 aFloat: 4200.3 anInt2: 4904 dInt1: 3364 dInt100: 4204 dInt150: 4404 dInt200: 4304 anInt10: 1191200
+ anInt1 3505 aFloat: 4200.4 anInt2: 4905 dInt1: 3365 dInt100: 4205 dInt150: 4405 dInt200: 4305 anInt10: 1191500
+ anInt1 3506 aFloat: 4200.5 anInt2: 4906 dInt1: 3366 dInt100: 4206 dInt150: 4406 dInt200: 4306 anInt10: 1191800
+ anInt1 3507 aFloat: 4200.6 anInt2: 4907 dInt1: 3367 dInt100: 4207 dInt150: 4407 dInt200: 4307 anInt10: 1192100
+ anInt1 3508 aFloat: 4200.7 anInt2: 4908 dInt1: 3368 dInt100: 4208 dInt150: 4408 dInt200: 4308 anInt10: 1192400
 scopy_cvecWD 1007: 1401(280100) 1402(280200) 1403(280300) 1404(280400) 1405(280500) 1406(280600) 1407(280700) 1408(280800) 1409(280900) 1410(281000)
 scopy_hvec: 2801.5 2802.5 2803.5 2804.5 2805.5 2806.5 2807.5 2808.5 2809.5 2810.5 2811.5 2812.5 2813.5 2814.5 2815.5 2816.5 2817.5 2818.5 2819.5 2820.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #6, run #0 7 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #7, run #0 7 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 801 aFloat: 1600 pInt: 4001 pFloat: 0.08 anInt2: 2401 dInt1: 3201 dVar1: 3601 dpInt1: 401 dInt200: 1001 cEL: cvec[9]
+ anInt1 801 aFloat: 1600 pInt: 4001 pFloat: 0.08 anInt2: 2401 dInt1: 3201 dVar1: 3601 dpInt1: 401 dInt100: 901 dInt200: 1001 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 802 aFloat: 1600.1 pInt: 4002 pFloat: 1.08 anInt2: 2402 dInt1: 3202 dVar1: 3602 dpInt1: 402 dInt200: 1002 cEL: cvec[8]
+ anInt1 802 aFloat: 1600.1 pInt: 4002 pFloat: 1.08 anInt2: 2402 dInt1: 3202 dVar1: 3602 dpInt1: 402 dInt100: 902 dInt200: 1002 cEL: cvec[8]
   pvInt: [310 ]
   pvFloat: [-0.482 ]
   dpvFloat: [0.180 ]
- anInt1 803 aFloat: 1600.2 pInt: 4003 pFloat: 2.08 anInt2: 2403 dInt1: 3203 dVar1: 3603 dpInt1: 403 dInt200: 1003 cEL: cvec[7]
+ anInt1 803 aFloat: 1600.2 pInt: 4003 pFloat: 2.08 anInt2: 2403 dInt1: 3203 dVar1: 3603 dpInt1: 403 dInt100: 903 dInt200: 1003 cEL: cvec[7]
   pvInt: [320 321 ]
   pvFloat: [-0.472 -0.372 ]
   dpvFloat: [0.280 0.281 ]
- anInt1 804 aFloat: 1600.3 pInt: 4004 pFloat: 3.08 anInt2: 2404 dInt1: 3204 dVar1: 3604 dpInt1: 404 dInt200: 1004 cEL: cvec[6]
+ anInt1 804 aFloat: 1600.3 pInt: 4004 pFloat: 3.08 anInt2: 2404 dInt1: 3204 dVar1: 3604 dpInt1: 404 dInt100: 904 dInt200: 1004 cEL: cvec[6]
   pvInt: [330 331 332 ]
   pvFloat: [-0.462 -0.362 -0.262 ]
   dpvFloat: [0.380 0.381 0.382 ]
- anInt1 805 aFloat: 1600.4 pInt: 4005 pFloat: 4.08 anInt2: 2405 dInt1: 3205 dVar1: 3605 dpInt1: 405 dInt200: 1005 cEL: cvec[5]
+ anInt1 805 aFloat: 1600.4 pInt: 4005 pFloat: 4.08 anInt2: 2405 dInt1: 3205 dVar1: 3605 dpInt1: 405 dInt100: 905 dInt200: 1005 cEL: cvec[5]
   pvInt: [340 341 342 343 ]
   pvFloat: [-0.452 -0.352 -0.252 -0.152 ]
   dpvFloat: [0.480 0.481 0.482 0.483 ]
- anInt1 806 aFloat: 1600.5 pInt: 4006 pFloat: 5.08 anInt2: 2406 dInt1: 3206 dVar1: 3606 dpInt1: 406 dInt200: 1006 cEL: cvec[4]
+ anInt1 806 aFloat: 1600.5 pInt: 4006 pFloat: 5.08 anInt2: 2406 dInt1: 3206 dVar1: 3606 dpInt1: 406 dInt100: 906 dInt200: 1006 cEL: cvec[4]
   pvInt: [350 351 352 353 354 ]
   pvFloat: [-0.442 -0.342 -0.242 -0.142 -0.042 ]
   dpvFloat: [0.580 0.581 0.582 0.583 0.584 ]
- anInt1 807 aFloat: 1600.6 pInt: 4007 pFloat: 6.08 anInt2: 2407 dInt1: 3207 dVar1: 3607 dpInt1: 407 dInt200: 1007 cEL: cvec[3]
+ anInt1 807 aFloat: 1600.6 pInt: 4007 pFloat: 6.08 anInt2: 2407 dInt1: 3207 dVar1: 3607 dpInt1: 407 dInt100: 907 dInt200: 1007 cEL: cvec[3]
   pvInt: [360 361 362 363 364 365 ]
   pvFloat: [-0.432 -0.332 -0.232 -0.132 -0.032 0.068 ]
   dpvFloat: [0.680 0.681 0.682 0.683 0.684 0.685 ]
- anInt1 808 aFloat: 1600.7 pInt: 4008 pFloat: 7.08 anInt2: 2408 dInt1: 3208 dVar1: 3608 dpInt1: 408 dInt200: 1008 cEL: cvec[2]
+ anInt1 808 aFloat: 1600.7 pInt: 4008 pFloat: 7.08 anInt2: 2408 dInt1: 3208 dVar1: 3608 dpInt1: 408 dInt100: 908 dInt200: 1008 cEL: cvec[2]
   pvInt: [370 371 372 373 374 375 376 ]
   pvFloat: [-0.422 -0.322 -0.222 -0.122 -0.022 0.078 0.178 ]
   dpvFloat: [0.780 0.781 0.782 0.783 0.784 0.785 0.786 ]
- anInt1 809 aFloat: 1600.8 pInt: 4009 pFloat: 8.08 anInt2: 2409 dInt1: 3209 dVar1: 3609 dpInt1: 409 dInt200: 1009 cEL: cvec[1]
+ anInt1 809 aFloat: 1600.8 pInt: 4009 pFloat: 8.08 anInt2: 2409 dInt1: 3209 dVar1: 3609 dpInt1: 409 dInt100: 909 dInt200: 1009 cEL: cvec[1]
   pvInt: [380 381 382 383 384 385 386 387 ]
   pvFloat: [-0.412 -0.312 -0.212 -0.112 -0.012 0.088 0.188 0.288 ]
   dpvFloat: [0.880 0.881 0.882 0.883 0.884 0.885 0.886 0.887 ]
- anInt1 810 aFloat: 1600.9 pInt: 4010 pFloat: 9.08 anInt2: 2410 dInt1: 3210 dVar1: 3610 dpInt1: 410 dInt200: 1010 cEL: cvec[0]
+ anInt1 810 aFloat: 1600.9 pInt: 4010 pFloat: 9.08 anInt2: 2410 dInt1: 3210 dVar1: 3610 dpInt1: 410 dInt100: 910 dInt200: 1010 cEL: cvec[0]
   pvInt: [390 391 392 393 394 395 396 397 398 ]
   pvFloat: [-0.402 -0.302 -0.202 -0.102 -0.002 0.098 0.198 0.298 0.398 ]
   dpvFloat: [0.980 0.981 0.982 0.983 0.984 0.985 0.986 0.987 0.988 ]
 8
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 8000 aFloat: 0.8 anInt2: 16000 dInt1: 24000 cEL: cvec[8] dInt200: 8600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 4001 aFloat: 4800 anInt2: 5601 dInt1: 3841 dInt200: 4801
- anInt1 4002 aFloat: 4800.1 anInt2: 5602 dInt1: 3842 dInt200: 4802
- anInt1 4003 aFloat: 4800.2 anInt2: 5603 dInt1: 3843 dInt200: 4803
- anInt1 4004 aFloat: 4800.3 anInt2: 5604 dInt1: 3844 dInt200: 4804
- anInt1 4005 aFloat: 4800.4 anInt2: 5605 dInt1: 3845 dInt200: 4805
- anInt1 4006 aFloat: 4800.5 anInt2: 5606 dInt1: 3846 dInt200: 4806
- anInt1 4007 aFloat: 4800.6 anInt2: 5607 dInt1: 3847 dInt200: 4807
- anInt1 4008 aFloat: 4800.7 anInt2: 5608 dInt1: 3848 dInt200: 4808
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 8000 aFloat: 0.8 anInt2: 16000 dInt1: 24000 cEL: cvec[8] dInt100: 8500 dInt200: 8600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 4001 aFloat: 4800 anInt2: 5601 dInt1: 3841 dInt100: 4701 dInt200: 4801
+ anInt1 4002 aFloat: 4800.1 anInt2: 5602 dInt1: 3842 dInt100: 4702 dInt200: 4802
+ anInt1 4003 aFloat: 4800.2 anInt2: 5603 dInt1: 3843 dInt100: 4703 dInt200: 4803
+ anInt1 4004 aFloat: 4800.3 anInt2: 5604 dInt1: 3844 dInt100: 4704 dInt200: 4804
+ anInt1 4005 aFloat: 4800.4 anInt2: 5605 dInt1: 3845 dInt100: 4705 dInt200: 4805
+ anInt1 4006 aFloat: 4800.5 anInt2: 5606 dInt1: 3846 dInt100: 4706 dInt200: 4806
+ anInt1 4007 aFloat: 4800.6 anInt2: 5607 dInt1: 3847 dInt100: 4707 dInt200: 4807
+ anInt1 4008 aFloat: 4800.7 anInt2: 5608 dInt1: 3848 dInt100: 4708 dInt200: 4808
 gvec aux items: anInt 
  anInt 5601
  anInt 5602
@@ -1060,118 +978,118 @@ cvecWD 1008: 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610
 cview: 810 809 808 807 806 805 804 803 802 801
 hvec: 3201.5 3202.5 3203.5 3204.5 3205.5 3206.5 3207.5 3208.5 3209.5 3210.5 3211.5 3212.5 3213.5 3214.5 3215.5 3216.5 3217.5 3218.5 3219.5 3220.5
 hview: 3220.5 3219.5 3218.5 3217.5 3216.5 3215.5 3214.5 3213.5 3212.5 3211.5 3210.5 3209.5 3208.5 3207.5 3206.5 3205.5 3204.5 3203.5 3202.5 3201.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 801 aFloat: 1600 pInt: 4001 pFloat: 0.08 anInt2: 2401 dInt1: 3201 dVar1: 3601 dpInt1: 401 dInt200: 1001 dInt250: 1401 anInt10: 240100 cEL: cvec[9]
+ anInt1 801 aFloat: 1600 pInt: 4001 pFloat: 0.08 anInt2: 2401 dInt1: 3201 dVar1: 3601 dpInt1: 401 dInt100: 901 dInt150: 1101 dInt200: 1001 dInt250: 1401 anInt10: 240100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 802 aFloat: 1600.1 pInt: 4002 pFloat: 1.08 anInt2: 2402 dInt1: 3202 dVar1: 3602 dpInt1: 402 dInt200: 1002 dInt250: 1402 anInt10: 240200 cEL: cvec[8]
+ anInt1 802 aFloat: 1600.1 pInt: 4002 pFloat: 1.08 anInt2: 2402 dInt1: 3202 dVar1: 3602 dpInt1: 402 dInt100: 902 dInt150: 1102 dInt200: 1002 dInt250: 1402 anInt10: 240200 cEL: cvec[8]
   pvInt: [310 ]
   pvFloat: [-0.482 ]
   dpvFloat: [0.180 ]
- anInt1 803 aFloat: 1600.2 pInt: 4003 pFloat: 2.08 anInt2: 2403 dInt1: 3203 dVar1: 3603 dpInt1: 403 dInt200: 1003 dInt250: 1403 anInt10: 240300 cEL: cvec[7]
+ anInt1 803 aFloat: 1600.2 pInt: 4003 pFloat: 2.08 anInt2: 2403 dInt1: 3203 dVar1: 3603 dpInt1: 403 dInt100: 903 dInt150: 1103 dInt200: 1003 dInt250: 1403 anInt10: 240300 cEL: cvec[7]
   pvInt: [320 321 ]
   pvFloat: [-0.472 -0.372 ]
   dpvFloat: [0.280 0.281 ]
- anInt1 804 aFloat: 1600.3 pInt: 4004 pFloat: 3.08 anInt2: 2404 dInt1: 3204 dVar1: 3604 dpInt1: 404 dInt200: 1004 dInt250: 1404 anInt10: 240400 cEL: cvec[6]
+ anInt1 804 aFloat: 1600.3 pInt: 4004 pFloat: 3.08 anInt2: 2404 dInt1: 3204 dVar1: 3604 dpInt1: 404 dInt100: 904 dInt150: 1104 dInt200: 1004 dInt250: 1404 anInt10: 240400 cEL: cvec[6]
   pvInt: [330 331 332 ]
   pvFloat: [-0.462 -0.362 -0.262 ]
   dpvFloat: [0.380 0.381 0.382 ]
- anInt1 805 aFloat: 1600.4 pInt: 4005 pFloat: 4.08 anInt2: 2405 dInt1: 3205 dVar1: 3605 dpInt1: 405 dInt200: 1005 dInt250: 1405 anInt10: 240500 cEL: cvec[5]
+ anInt1 805 aFloat: 1600.4 pInt: 4005 pFloat: 4.08 anInt2: 2405 dInt1: 3205 dVar1: 3605 dpInt1: 405 dInt100: 905 dInt150: 1105 dInt200: 1005 dInt250: 1405 anInt10: 240500 cEL: cvec[5]
   pvInt: [340 341 342 343 ]
   pvFloat: [-0.452 -0.352 -0.252 -0.152 ]
   dpvFloat: [0.480 0.481 0.482 0.483 ]
- anInt1 806 aFloat: 1600.5 pInt: 4006 pFloat: 5.08 anInt2: 2406 dInt1: 3206 dVar1: 3606 dpInt1: 406 dInt200: 1006 dInt250: 1406 anInt10: 240600 cEL: cvec[4]
+ anInt1 806 aFloat: 1600.5 pInt: 4006 pFloat: 5.08 anInt2: 2406 dInt1: 3206 dVar1: 3606 dpInt1: 406 dInt100: 906 dInt150: 1106 dInt200: 1006 dInt250: 1406 anInt10: 240600 cEL: cvec[4]
   pvInt: [350 351 352 353 354 ]
   pvFloat: [-0.442 -0.342 -0.242 -0.142 -0.042 ]
   dpvFloat: [0.580 0.581 0.582 0.583 0.584 ]
- anInt1 807 aFloat: 1600.6 pInt: 4007 pFloat: 6.08 anInt2: 2407 dInt1: 3207 dVar1: 3607 dpInt1: 407 dInt200: 1007 dInt250: 1407 anInt10: 240700 cEL: cvec[3]
+ anInt1 807 aFloat: 1600.6 pInt: 4007 pFloat: 6.08 anInt2: 2407 dInt1: 3207 dVar1: 3607 dpInt1: 407 dInt100: 907 dInt150: 1107 dInt200: 1007 dInt250: 1407 anInt10: 240700 cEL: cvec[3]
   pvInt: [360 361 362 363 364 365 ]
   pvFloat: [-0.432 -0.332 -0.232 -0.132 -0.032 0.068 ]
   dpvFloat: [0.680 0.681 0.682 0.683 0.684 0.685 ]
- anInt1 808 aFloat: 1600.7 pInt: 4008 pFloat: 7.08 anInt2: 2408 dInt1: 3208 dVar1: 3608 dpInt1: 408 dInt200: 1008 dInt250: 1408 anInt10: 240800 cEL: cvec[2]
+ anInt1 808 aFloat: 1600.7 pInt: 4008 pFloat: 7.08 anInt2: 2408 dInt1: 3208 dVar1: 3608 dpInt1: 408 dInt100: 908 dInt150: 1108 dInt200: 1008 dInt250: 1408 anInt10: 240800 cEL: cvec[2]
   pvInt: [370 371 372 373 374 375 376 ]
   pvFloat: [-0.422 -0.322 -0.222 -0.122 -0.022 0.078 0.178 ]
   dpvFloat: [0.780 0.781 0.782 0.783 0.784 0.785 0.786 ]
- anInt1 809 aFloat: 1600.8 pInt: 4009 pFloat: 8.08 anInt2: 2409 dInt1: 3209 dVar1: 3609 dpInt1: 409 dInt200: 1009 dInt250: 1409 anInt10: 240900 cEL: cvec[1]
+ anInt1 809 aFloat: 1600.8 pInt: 4009 pFloat: 8.08 anInt2: 2409 dInt1: 3209 dVar1: 3609 dpInt1: 409 dInt100: 909 dInt150: 1109 dInt200: 1009 dInt250: 1409 anInt10: 240900 cEL: cvec[1]
   pvInt: [380 381 382 383 384 385 386 387 ]
   pvFloat: [-0.412 -0.312 -0.212 -0.112 -0.012 0.088 0.188 0.288 ]
   dpvFloat: [0.880 0.881 0.882 0.883 0.884 0.885 0.886 0.887 ]
- anInt1 810 aFloat: 1600.9 pInt: 4010 pFloat: 9.08 anInt2: 2410 dInt1: 3210 dVar1: 3610 dpInt1: 410 dInt200: 1010 dInt250: 1410 anInt10: 241000 cEL: cvec[0]
+ anInt1 810 aFloat: 1600.9 pInt: 4010 pFloat: 9.08 anInt2: 2410 dInt1: 3210 dVar1: 3610 dpInt1: 410 dInt100: 910 dInt150: 1110 dInt200: 1010 dInt250: 1410 anInt10: 241000 cEL: cvec[0]
   pvInt: [390 391 392 393 394 395 396 397 398 ]
   pvFloat: [-0.402 -0.302 -0.202 -0.102 -0.002 0.098 0.198 0.298 0.398 ]
   dpvFloat: [0.980 0.981 0.982 0.983 0.984 0.985 0.986 0.987 0.988 ]
 8
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 8000 aFloat: 0.8 anInt2: 16000 dInt1: 24000 cEL: cvec[8] dInt200: 8600 dInt250: 9000 anInt10: 1760000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 4001 aFloat: 4800 anInt2: 5601 dInt1: 3841 dInt200: 4801 anInt10: 1360300
- anInt1 4002 aFloat: 4800.1 anInt2: 5602 dInt1: 3842 dInt200: 4802 anInt10: 1360600
- anInt1 4003 aFloat: 4800.2 anInt2: 5603 dInt1: 3843 dInt200: 4803 anInt10: 1360900
- anInt1 4004 aFloat: 4800.3 anInt2: 5604 dInt1: 3844 dInt200: 4804 anInt10: 1361200
- anInt1 4005 aFloat: 4800.4 anInt2: 5605 dInt1: 3845 dInt200: 4805 anInt10: 1361500
- anInt1 4006 aFloat: 4800.5 anInt2: 5606 dInt1: 3846 dInt200: 4806 anInt10: 1361800
- anInt1 4007 aFloat: 4800.6 anInt2: 5607 dInt1: 3847 dInt200: 4807 anInt10: 1362100
- anInt1 4008 aFloat: 4800.7 anInt2: 5608 dInt1: 3848 dInt200: 4808 anInt10: 1362400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 8000 aFloat: 0.8 anInt2: 16000 dInt1: 24000 cEL: cvec[8] dInt100: 8500 dInt150: 8700 dInt200: 8600 dInt250: 9000 anInt10: 1760000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 4001 aFloat: 4800 anInt2: 5601 dInt1: 3841 dInt100: 4701 dInt150: 4901 dInt200: 4801 anInt10: 1360300
+ anInt1 4002 aFloat: 4800.1 anInt2: 5602 dInt1: 3842 dInt100: 4702 dInt150: 4902 dInt200: 4802 anInt10: 1360600
+ anInt1 4003 aFloat: 4800.2 anInt2: 5603 dInt1: 3843 dInt100: 4703 dInt150: 4903 dInt200: 4803 anInt10: 1360900
+ anInt1 4004 aFloat: 4800.3 anInt2: 5604 dInt1: 3844 dInt100: 4704 dInt150: 4904 dInt200: 4804 anInt10: 1361200
+ anInt1 4005 aFloat: 4800.4 anInt2: 5605 dInt1: 3845 dInt100: 4705 dInt150: 4905 dInt200: 4805 anInt10: 1361500
+ anInt1 4006 aFloat: 4800.5 anInt2: 5606 dInt1: 3846 dInt100: 4706 dInt150: 4906 dInt200: 4806 anInt10: 1361800
+ anInt1 4007 aFloat: 4800.6 anInt2: 5607 dInt1: 3847 dInt100: 4707 dInt150: 4907 dInt200: 4807 anInt10: 1362100
+ anInt1 4008 aFloat: 4800.7 anInt2: 5608 dInt1: 3848 dInt100: 4708 dInt150: 4908 dInt200: 4808 anInt10: 1362400
 scopy_cvecWD 1008: 1601(320100) 1602(320200) 1603(320300) 1604(320400) 1605(320500) 1606(320600) 1607(320700) 1608(320800) 1609(320900) 1610(321000)
 scopy_hvec: 3201.5 3202.5 3203.5 3204.5 3205.5 3206.5 3207.5 3208.5 3209.5 3210.5 3211.5 3212.5 3213.5 3214.5 3215.5 3216.5 3217.5 3218.5 3219.5 3220.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #7, run #0 8 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #8, run #0 8 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 901 aFloat: 1800 pInt: 4501 pFloat: 0.09 anInt2: 2701 dInt1: 3601 dVar1: 4051 dpInt1: 451 dInt200: 1101 cEL: cvec[9]
+ anInt1 901 aFloat: 1800 pInt: 4501 pFloat: 0.09 anInt2: 2701 dInt1: 3601 dVar1: 4051 dpInt1: 451 dInt100: 1001 dInt200: 1101 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 902 aFloat: 1800.1 pInt: 4502 pFloat: 1.09 anInt2: 2702 dInt1: 3602 dVar1: 4052 dpInt1: 452 dInt200: 1102 cEL: cvec[8]
+ anInt1 902 aFloat: 1800.1 pInt: 4502 pFloat: 1.09 anInt2: 2702 dInt1: 3602 dVar1: 4052 dpInt1: 452 dInt100: 1002 dInt200: 1102 cEL: cvec[8]
   pvInt: [410 ]
   pvFloat: [-0.481 ]
   dpvFloat: [0.190 ]
- anInt1 903 aFloat: 1800.2 pInt: 4503 pFloat: 2.09 anInt2: 2703 dInt1: 3603 dVar1: 4053 dpInt1: 453 dInt200: 1103 cEL: cvec[7]
+ anInt1 903 aFloat: 1800.2 pInt: 4503 pFloat: 2.09 anInt2: 2703 dInt1: 3603 dVar1: 4053 dpInt1: 453 dInt100: 1003 dInt200: 1103 cEL: cvec[7]
   pvInt: [420 421 ]
   pvFloat: [-0.471 -0.371 ]
   dpvFloat: [0.290 0.291 ]
- anInt1 904 aFloat: 1800.3 pInt: 4504 pFloat: 3.09 anInt2: 2704 dInt1: 3604 dVar1: 4054 dpInt1: 454 dInt200: 1104 cEL: cvec[6]
+ anInt1 904 aFloat: 1800.3 pInt: 4504 pFloat: 3.09 anInt2: 2704 dInt1: 3604 dVar1: 4054 dpInt1: 454 dInt100: 1004 dInt200: 1104 cEL: cvec[6]
   pvInt: [430 431 432 ]
   pvFloat: [-0.461 -0.361 -0.261 ]
   dpvFloat: [0.390 0.391 0.392 ]
- anInt1 905 aFloat: 1800.4 pInt: 4505 pFloat: 4.09 anInt2: 2705 dInt1: 3605 dVar1: 4055 dpInt1: 455 dInt200: 1105 cEL: cvec[5]
+ anInt1 905 aFloat: 1800.4 pInt: 4505 pFloat: 4.09 anInt2: 2705 dInt1: 3605 dVar1: 4055 dpInt1: 455 dInt100: 1005 dInt200: 1105 cEL: cvec[5]
   pvInt: [440 441 442 443 ]
   pvFloat: [-0.451 -0.351 -0.251 -0.151 ]
   dpvFloat: [0.490 0.491 0.492 0.493 ]
- anInt1 906 aFloat: 1800.5 pInt: 4506 pFloat: 5.09 anInt2: 2706 dInt1: 3606 dVar1: 4056 dpInt1: 456 dInt200: 1106 cEL: cvec[4]
+ anInt1 906 aFloat: 1800.5 pInt: 4506 pFloat: 5.09 anInt2: 2706 dInt1: 3606 dVar1: 4056 dpInt1: 456 dInt100: 1006 dInt200: 1106 cEL: cvec[4]
   pvInt: [450 451 452 453 454 ]
   pvFloat: [-0.441 -0.341 -0.241 -0.141 -0.041 ]
   dpvFloat: [0.590 0.591 0.592 0.593 0.594 ]
- anInt1 907 aFloat: 1800.6 pInt: 4507 pFloat: 6.09 anInt2: 2707 dInt1: 3607 dVar1: 4057 dpInt1: 457 dInt200: 1107 cEL: cvec[3]
+ anInt1 907 aFloat: 1800.6 pInt: 4507 pFloat: 6.09 anInt2: 2707 dInt1: 3607 dVar1: 4057 dpInt1: 457 dInt100: 1007 dInt200: 1107 cEL: cvec[3]
   pvInt: [460 461 462 463 464 465 ]
   pvFloat: [-0.431 -0.331 -0.231 -0.131 -0.031 0.069 ]
   dpvFloat: [0.690 0.691 0.692 0.693 0.694 0.695 ]
- anInt1 908 aFloat: 1800.7 pInt: 4508 pFloat: 7.09 anInt2: 2708 dInt1: 3608 dVar1: 4058 dpInt1: 458 dInt200: 1108 cEL: cvec[2]
+ anInt1 908 aFloat: 1800.7 pInt: 4508 pFloat: 7.09 anInt2: 2708 dInt1: 3608 dVar1: 4058 dpInt1: 458 dInt100: 1008 dInt200: 1108 cEL: cvec[2]
   pvInt: [470 471 472 473 474 475 476 ]
   pvFloat: [-0.421 -0.321 -0.221 -0.121 -0.021 0.079 0.179 ]
   dpvFloat: [0.790 0.791 0.792 0.793 0.794 0.795 0.796 ]
- anInt1 909 aFloat: 1800.8 pInt: 4509 pFloat: 8.09 anInt2: 2709 dInt1: 3609 dVar1: 4059 dpInt1: 459 dInt200: 1109 cEL: cvec[1]
+ anInt1 909 aFloat: 1800.8 pInt: 4509 pFloat: 8.09 anInt2: 2709 dInt1: 3609 dVar1: 4059 dpInt1: 459 dInt100: 1009 dInt200: 1109 cEL: cvec[1]
   pvInt: [480 481 482 483 484 485 486 487 ]
   pvFloat: [-0.411 -0.311 -0.211 -0.111 -0.011 0.089 0.189 0.289 ]
   dpvFloat: [0.890 0.891 0.892 0.893 0.894 0.895 0.896 0.897 ]
- anInt1 910 aFloat: 1800.9 pInt: 4510 pFloat: 9.09 anInt2: 2710 dInt1: 3610 dVar1: 4060 dpInt1: 460 dInt200: 1110 cEL: cvec[0]
+ anInt1 910 aFloat: 1800.9 pInt: 4510 pFloat: 9.09 anInt2: 2710 dInt1: 3610 dVar1: 4060 dpInt1: 460 dInt100: 1010 dInt200: 1110 cEL: cvec[0]
   pvInt: [490 491 492 493 494 495 496 497 498 ]
   pvFloat: [-0.401 -0.301 -0.201 -0.101 -0.001 0.099 0.199 0.299 0.399 ]
   dpvFloat: [0.990 0.991 0.992 0.993 0.994 0.995 0.996 0.997 0.998 ]
 9
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 9000 aFloat: 0.9 anInt2: 18000 dInt1: 27000 cEL: cvec[9] dInt200: 9600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 4501 aFloat: 5400 anInt2: 6301 dInt1: 4321 dInt200: 5301
- anInt1 4502 aFloat: 5400.1 anInt2: 6302 dInt1: 4322 dInt200: 5302
- anInt1 4503 aFloat: 5400.2 anInt2: 6303 dInt1: 4323 dInt200: 5303
- anInt1 4504 aFloat: 5400.3 anInt2: 6304 dInt1: 4324 dInt200: 5304
- anInt1 4505 aFloat: 5400.4 anInt2: 6305 dInt1: 4325 dInt200: 5305
- anInt1 4506 aFloat: 5400.5 anInt2: 6306 dInt1: 4326 dInt200: 5306
- anInt1 4507 aFloat: 5400.6 anInt2: 6307 dInt1: 4327 dInt200: 5307
- anInt1 4508 aFloat: 5400.7 anInt2: 6308 dInt1: 4328 dInt200: 5308
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 9000 aFloat: 0.9 anInt2: 18000 dInt1: 27000 cEL: cvec[9] dInt100: 9500 dInt200: 9600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 4501 aFloat: 5400 anInt2: 6301 dInt1: 4321 dInt100: 5201 dInt200: 5301
+ anInt1 4502 aFloat: 5400.1 anInt2: 6302 dInt1: 4322 dInt100: 5202 dInt200: 5302
+ anInt1 4503 aFloat: 5400.2 anInt2: 6303 dInt1: 4323 dInt100: 5203 dInt200: 5303
+ anInt1 4504 aFloat: 5400.3 anInt2: 6304 dInt1: 4324 dInt100: 5204 dInt200: 5304
+ anInt1 4505 aFloat: 5400.4 anInt2: 6305 dInt1: 4325 dInt100: 5205 dInt200: 5305
+ anInt1 4506 aFloat: 5400.5 anInt2: 6306 dInt1: 4326 dInt100: 5206 dInt200: 5306
+ anInt1 4507 aFloat: 5400.6 anInt2: 6307 dInt1: 4327 dInt100: 5207 dInt200: 5307
+ anInt1 4508 aFloat: 5400.7 anInt2: 6308 dInt1: 4328 dInt100: 5208 dInt200: 5308
 gvec aux items: anInt 
  anInt 6301
  anInt 6302
@@ -1187,118 +1105,118 @@ cvecWD 1009: 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810
 cview: 910 909 908 907 906 905 904 903 902 901
 hvec: 3601.5 3602.5 3603.5 3604.5 3605.5 3606.5 3607.5 3608.5 3609.5 3610.5 3611.5 3612.5 3613.5 3614.5 3615.5 3616.5 3617.5 3618.5 3619.5 3620.5
 hview: 3620.5 3619.5 3618.5 3617.5 3616.5 3615.5 3614.5 3613.5 3612.5 3611.5 3610.5 3609.5 3608.5 3607.5 3606.5 3605.5 3604.5 3603.5 3602.5 3601.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 901 aFloat: 1800 pInt: 4501 pFloat: 0.09 anInt2: 2701 dInt1: 3601 dVar1: 4051 dpInt1: 451 dInt200: 1101 dInt250: 1501 anInt10: 270100 cEL: cvec[9]
+ anInt1 901 aFloat: 1800 pInt: 4501 pFloat: 0.09 anInt2: 2701 dInt1: 3601 dVar1: 4051 dpInt1: 451 dInt100: 1001 dInt150: 1201 dInt200: 1101 dInt250: 1501 anInt10: 270100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 902 aFloat: 1800.1 pInt: 4502 pFloat: 1.09 anInt2: 2702 dInt1: 3602 dVar1: 4052 dpInt1: 452 dInt200: 1102 dInt250: 1502 anInt10: 270200 cEL: cvec[8]
+ anInt1 902 aFloat: 1800.1 pInt: 4502 pFloat: 1.09 anInt2: 2702 dInt1: 3602 dVar1: 4052 dpInt1: 452 dInt100: 1002 dInt150: 1202 dInt200: 1102 dInt250: 1502 anInt10: 270200 cEL: cvec[8]
   pvInt: [410 ]
   pvFloat: [-0.481 ]
   dpvFloat: [0.190 ]
- anInt1 903 aFloat: 1800.2 pInt: 4503 pFloat: 2.09 anInt2: 2703 dInt1: 3603 dVar1: 4053 dpInt1: 453 dInt200: 1103 dInt250: 1503 anInt10: 270300 cEL: cvec[7]
+ anInt1 903 aFloat: 1800.2 pInt: 4503 pFloat: 2.09 anInt2: 2703 dInt1: 3603 dVar1: 4053 dpInt1: 453 dInt100: 1003 dInt150: 1203 dInt200: 1103 dInt250: 1503 anInt10: 270300 cEL: cvec[7]
   pvInt: [420 421 ]
   pvFloat: [-0.471 -0.371 ]
   dpvFloat: [0.290 0.291 ]
- anInt1 904 aFloat: 1800.3 pInt: 4504 pFloat: 3.09 anInt2: 2704 dInt1: 3604 dVar1: 4054 dpInt1: 454 dInt200: 1104 dInt250: 1504 anInt10: 270400 cEL: cvec[6]
+ anInt1 904 aFloat: 1800.3 pInt: 4504 pFloat: 3.09 anInt2: 2704 dInt1: 3604 dVar1: 4054 dpInt1: 454 dInt100: 1004 dInt150: 1204 dInt200: 1104 dInt250: 1504 anInt10: 270400 cEL: cvec[6]
   pvInt: [430 431 432 ]
   pvFloat: [-0.461 -0.361 -0.261 ]
   dpvFloat: [0.390 0.391 0.392 ]
- anInt1 905 aFloat: 1800.4 pInt: 4505 pFloat: 4.09 anInt2: 2705 dInt1: 3605 dVar1: 4055 dpInt1: 455 dInt200: 1105 dInt250: 1505 anInt10: 270500 cEL: cvec[5]
+ anInt1 905 aFloat: 1800.4 pInt: 4505 pFloat: 4.09 anInt2: 2705 dInt1: 3605 dVar1: 4055 dpInt1: 455 dInt100: 1005 dInt150: 1205 dInt200: 1105 dInt250: 1505 anInt10: 270500 cEL: cvec[5]
   pvInt: [440 441 442 443 ]
   pvFloat: [-0.451 -0.351 -0.251 -0.151 ]
   dpvFloat: [0.490 0.491 0.492 0.493 ]
- anInt1 906 aFloat: 1800.5 pInt: 4506 pFloat: 5.09 anInt2: 2706 dInt1: 3606 dVar1: 4056 dpInt1: 456 dInt200: 1106 dInt250: 1506 anInt10: 270600 cEL: cvec[4]
+ anInt1 906 aFloat: 1800.5 pInt: 4506 pFloat: 5.09 anInt2: 2706 dInt1: 3606 dVar1: 4056 dpInt1: 456 dInt100: 1006 dInt150: 1206 dInt200: 1106 dInt250: 1506 anInt10: 270600 cEL: cvec[4]
   pvInt: [450 451 452 453 454 ]
   pvFloat: [-0.441 -0.341 -0.241 -0.141 -0.041 ]
   dpvFloat: [0.590 0.591 0.592 0.593 0.594 ]
- anInt1 907 aFloat: 1800.6 pInt: 4507 pFloat: 6.09 anInt2: 2707 dInt1: 3607 dVar1: 4057 dpInt1: 457 dInt200: 1107 dInt250: 1507 anInt10: 270700 cEL: cvec[3]
+ anInt1 907 aFloat: 1800.6 pInt: 4507 pFloat: 6.09 anInt2: 2707 dInt1: 3607 dVar1: 4057 dpInt1: 457 dInt100: 1007 dInt150: 1207 dInt200: 1107 dInt250: 1507 anInt10: 270700 cEL: cvec[3]
   pvInt: [460 461 462 463 464 465 ]
   pvFloat: [-0.431 -0.331 -0.231 -0.131 -0.031 0.069 ]
   dpvFloat: [0.690 0.691 0.692 0.693 0.694 0.695 ]
- anInt1 908 aFloat: 1800.7 pInt: 4508 pFloat: 7.09 anInt2: 2708 dInt1: 3608 dVar1: 4058 dpInt1: 458 dInt200: 1108 dInt250: 1508 anInt10: 270800 cEL: cvec[2]
+ anInt1 908 aFloat: 1800.7 pInt: 4508 pFloat: 7.09 anInt2: 2708 dInt1: 3608 dVar1: 4058 dpInt1: 458 dInt100: 1008 dInt150: 1208 dInt200: 1108 dInt250: 1508 anInt10: 270800 cEL: cvec[2]
   pvInt: [470 471 472 473 474 475 476 ]
   pvFloat: [-0.421 -0.321 -0.221 -0.121 -0.021 0.079 0.179 ]
   dpvFloat: [0.790 0.791 0.792 0.793 0.794 0.795 0.796 ]
- anInt1 909 aFloat: 1800.8 pInt: 4509 pFloat: 8.09 anInt2: 2709 dInt1: 3609 dVar1: 4059 dpInt1: 459 dInt200: 1109 dInt250: 1509 anInt10: 270900 cEL: cvec[1]
+ anInt1 909 aFloat: 1800.8 pInt: 4509 pFloat: 8.09 anInt2: 2709 dInt1: 3609 dVar1: 4059 dpInt1: 459 dInt100: 1009 dInt150: 1209 dInt200: 1109 dInt250: 1509 anInt10: 270900 cEL: cvec[1]
   pvInt: [480 481 482 483 484 485 486 487 ]
   pvFloat: [-0.411 -0.311 -0.211 -0.111 -0.011 0.089 0.189 0.289 ]
   dpvFloat: [0.890 0.891 0.892 0.893 0.894 0.895 0.896 0.897 ]
- anInt1 910 aFloat: 1800.9 pInt: 4510 pFloat: 9.09 anInt2: 2710 dInt1: 3610 dVar1: 4060 dpInt1: 460 dInt200: 1110 dInt250: 1510 anInt10: 271000 cEL: cvec[0]
+ anInt1 910 aFloat: 1800.9 pInt: 4510 pFloat: 9.09 anInt2: 2710 dInt1: 3610 dVar1: 4060 dpInt1: 460 dInt100: 1010 dInt150: 1210 dInt200: 1110 dInt250: 1510 anInt10: 271000 cEL: cvec[0]
   pvInt: [490 491 492 493 494 495 496 497 498 ]
   pvFloat: [-0.401 -0.301 -0.201 -0.101 -0.001 0.099 0.199 0.299 0.399 ]
   dpvFloat: [0.990 0.991 0.992 0.993 0.994 0.995 0.996 0.997 0.998 ]
 9
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 9000 aFloat: 0.9 anInt2: 18000 dInt1: 27000 cEL: cvec[9] dInt200: 9600 dInt250: 10000 anInt10: 1980000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 4501 aFloat: 5400 anInt2: 6301 dInt1: 4321 dInt200: 5301 anInt10: 1530300
- anInt1 4502 aFloat: 5400.1 anInt2: 6302 dInt1: 4322 dInt200: 5302 anInt10: 1530600
- anInt1 4503 aFloat: 5400.2 anInt2: 6303 dInt1: 4323 dInt200: 5303 anInt10: 1530900
- anInt1 4504 aFloat: 5400.3 anInt2: 6304 dInt1: 4324 dInt200: 5304 anInt10: 1531200
- anInt1 4505 aFloat: 5400.4 anInt2: 6305 dInt1: 4325 dInt200: 5305 anInt10: 1531500
- anInt1 4506 aFloat: 5400.5 anInt2: 6306 dInt1: 4326 dInt200: 5306 anInt10: 1531800
- anInt1 4507 aFloat: 5400.6 anInt2: 6307 dInt1: 4327 dInt200: 5307 anInt10: 1532100
- anInt1 4508 aFloat: 5400.7 anInt2: 6308 dInt1: 4328 dInt200: 5308 anInt10: 1532400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 9000 aFloat: 0.9 anInt2: 18000 dInt1: 27000 cEL: cvec[9] dInt100: 9500 dInt150: 9700 dInt200: 9600 dInt250: 10000 anInt10: 1980000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 4501 aFloat: 5400 anInt2: 6301 dInt1: 4321 dInt100: 5201 dInt150: 5401 dInt200: 5301 anInt10: 1530300
+ anInt1 4502 aFloat: 5400.1 anInt2: 6302 dInt1: 4322 dInt100: 5202 dInt150: 5402 dInt200: 5302 anInt10: 1530600
+ anInt1 4503 aFloat: 5400.2 anInt2: 6303 dInt1: 4323 dInt100: 5203 dInt150: 5403 dInt200: 5303 anInt10: 1530900
+ anInt1 4504 aFloat: 5400.3 anInt2: 6304 dInt1: 4324 dInt100: 5204 dInt150: 5404 dInt200: 5304 anInt10: 1531200
+ anInt1 4505 aFloat: 5400.4 anInt2: 6305 dInt1: 4325 dInt100: 5205 dInt150: 5405 dInt200: 5305 anInt10: 1531500
+ anInt1 4506 aFloat: 5400.5 anInt2: 6306 dInt1: 4326 dInt100: 5206 dInt150: 5406 dInt200: 5306 anInt10: 1531800
+ anInt1 4507 aFloat: 5400.6 anInt2: 6307 dInt1: 4327 dInt100: 5207 dInt150: 5407 dInt200: 5307 anInt10: 1532100
+ anInt1 4508 aFloat: 5400.7 anInt2: 6308 dInt1: 4328 dInt100: 5208 dInt150: 5408 dInt200: 5308 anInt10: 1532400
 scopy_cvecWD 1009: 1801(360100) 1802(360200) 1803(360300) 1804(360400) 1805(360500) 1806(360600) 1807(360700) 1808(360800) 1809(360900) 1810(361000)
 scopy_hvec: 3601.5 3602.5 3603.5 3604.5 3605.5 3606.5 3607.5 3608.5 3609.5 3610.5 3611.5 3612.5 3613.5 3614.5 3615.5 3616.5 3617.5 3618.5 3619.5 3620.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #8, run #0 9 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #9, run #0 9 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 1001 aFloat: 2000 pInt: 5001 pFloat: 0.10 anInt2: 3001 dInt1: 4001 dVar1: 4501 dpInt1: 501 dInt200: 1201 cEL: cvec[9]
+ anInt1 1001 aFloat: 2000 pInt: 5001 pFloat: 0.10 anInt2: 3001 dInt1: 4001 dVar1: 4501 dpInt1: 501 dInt100: 1101 dInt200: 1201 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1002 aFloat: 2000.1 pInt: 5002 pFloat: 1.10 anInt2: 3002 dInt1: 4002 dVar1: 4502 dpInt1: 502 dInt200: 1202 cEL: cvec[8]
+ anInt1 1002 aFloat: 2000.1 pInt: 5002 pFloat: 1.10 anInt2: 3002 dInt1: 4002 dVar1: 4502 dpInt1: 502 dInt100: 1102 dInt200: 1202 cEL: cvec[8]
   pvInt: [510 ]
   pvFloat: [-0.480 ]
   dpvFloat: [0.200 ]
- anInt1 1003 aFloat: 2000.2 pInt: 5003 pFloat: 2.10 anInt2: 3003 dInt1: 4003 dVar1: 4503 dpInt1: 503 dInt200: 1203 cEL: cvec[7]
+ anInt1 1003 aFloat: 2000.2 pInt: 5003 pFloat: 2.10 anInt2: 3003 dInt1: 4003 dVar1: 4503 dpInt1: 503 dInt100: 1103 dInt200: 1203 cEL: cvec[7]
   pvInt: [520 521 ]
   pvFloat: [-0.470 -0.370 ]
   dpvFloat: [0.300 0.301 ]
- anInt1 1004 aFloat: 2000.3 pInt: 5004 pFloat: 3.10 anInt2: 3004 dInt1: 4004 dVar1: 4504 dpInt1: 504 dInt200: 1204 cEL: cvec[6]
+ anInt1 1004 aFloat: 2000.3 pInt: 5004 pFloat: 3.10 anInt2: 3004 dInt1: 4004 dVar1: 4504 dpInt1: 504 dInt100: 1104 dInt200: 1204 cEL: cvec[6]
   pvInt: [530 531 532 ]
   pvFloat: [-0.460 -0.360 -0.260 ]
   dpvFloat: [0.400 0.401 0.402 ]
- anInt1 1005 aFloat: 2000.4 pInt: 5005 pFloat: 4.10 anInt2: 3005 dInt1: 4005 dVar1: 4505 dpInt1: 505 dInt200: 1205 cEL: cvec[5]
+ anInt1 1005 aFloat: 2000.4 pInt: 5005 pFloat: 4.10 anInt2: 3005 dInt1: 4005 dVar1: 4505 dpInt1: 505 dInt100: 1105 dInt200: 1205 cEL: cvec[5]
   pvInt: [540 541 542 543 ]
   pvFloat: [-0.450 -0.350 -0.250 -0.150 ]
   dpvFloat: [0.500 0.501 0.502 0.503 ]
- anInt1 1006 aFloat: 2000.5 pInt: 5006 pFloat: 5.10 anInt2: 3006 dInt1: 4006 dVar1: 4506 dpInt1: 506 dInt200: 1206 cEL: cvec[4]
+ anInt1 1006 aFloat: 2000.5 pInt: 5006 pFloat: 5.10 anInt2: 3006 dInt1: 4006 dVar1: 4506 dpInt1: 506 dInt100: 1106 dInt200: 1206 cEL: cvec[4]
   pvInt: [550 551 552 553 554 ]
   pvFloat: [-0.440 -0.340 -0.240 -0.140 -0.040 ]
   dpvFloat: [0.600 0.601 0.602 0.603 0.604 ]
- anInt1 1007 aFloat: 2000.6 pInt: 5007 pFloat: 6.10 anInt2: 3007 dInt1: 4007 dVar1: 4507 dpInt1: 507 dInt200: 1207 cEL: cvec[3]
+ anInt1 1007 aFloat: 2000.6 pInt: 5007 pFloat: 6.10 anInt2: 3007 dInt1: 4007 dVar1: 4507 dpInt1: 507 dInt100: 1107 dInt200: 1207 cEL: cvec[3]
   pvInt: [560 561 562 563 564 565 ]
   pvFloat: [-0.430 -0.330 -0.230 -0.130 -0.030 0.070 ]
   dpvFloat: [0.700 0.701 0.702 0.703 0.704 0.705 ]
- anInt1 1008 aFloat: 2000.7 pInt: 5008 pFloat: 7.10 anInt2: 3008 dInt1: 4008 dVar1: 4508 dpInt1: 508 dInt200: 1208 cEL: cvec[2]
+ anInt1 1008 aFloat: 2000.7 pInt: 5008 pFloat: 7.10 anInt2: 3008 dInt1: 4008 dVar1: 4508 dpInt1: 508 dInt100: 1108 dInt200: 1208 cEL: cvec[2]
   pvInt: [570 571 572 573 574 575 576 ]
   pvFloat: [-0.420 -0.320 -0.220 -0.120 -0.020 0.080 0.180 ]
   dpvFloat: [0.800 0.801 0.802 0.803 0.804 0.805 0.806 ]
- anInt1 1009 aFloat: 2000.8 pInt: 5009 pFloat: 8.10 anInt2: 3009 dInt1: 4009 dVar1: 4509 dpInt1: 509 dInt200: 1209 cEL: cvec[1]
+ anInt1 1009 aFloat: 2000.8 pInt: 5009 pFloat: 8.10 anInt2: 3009 dInt1: 4009 dVar1: 4509 dpInt1: 509 dInt100: 1109 dInt200: 1209 cEL: cvec[1]
   pvInt: [580 581 582 583 584 585 586 587 ]
   pvFloat: [-0.410 -0.310 -0.210 -0.110 -0.010 0.090 0.190 0.290 ]
   dpvFloat: [0.900 0.901 0.902 0.903 0.904 0.905 0.906 0.907 ]
- anInt1 1010 aFloat: 2000.9 pInt: 5010 pFloat: 9.10 anInt2: 3010 dInt1: 4010 dVar1: 4510 dpInt1: 510 dInt200: 1210 cEL: cvec[0]
+ anInt1 1010 aFloat: 2000.9 pInt: 5010 pFloat: 9.10 anInt2: 3010 dInt1: 4010 dVar1: 4510 dpInt1: 510 dInt100: 1110 dInt200: 1210 cEL: cvec[0]
   pvInt: [590 591 592 593 594 595 596 597 598 ]
   pvFloat: [-0.400 -0.300 -0.200 -0.100 0.000 0.100 0.200 0.300 0.400 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 10
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 10000 aFloat: 1 anInt2: 20000 dInt1: 30000 cEL: cvec[0] dInt200: 10600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 5001 aFloat: 6000 anInt2: 7001 dInt1: 4801 dInt200: 5801
- anInt1 5002 aFloat: 6000.1 anInt2: 7002 dInt1: 4802 dInt200: 5802
- anInt1 5003 aFloat: 6000.2 anInt2: 7003 dInt1: 4803 dInt200: 5803
- anInt1 5004 aFloat: 6000.3 anInt2: 7004 dInt1: 4804 dInt200: 5804
- anInt1 5005 aFloat: 6000.4 anInt2: 7005 dInt1: 4805 dInt200: 5805
- anInt1 5006 aFloat: 6000.5 anInt2: 7006 dInt1: 4806 dInt200: 5806
- anInt1 5007 aFloat: 6000.6 anInt2: 7007 dInt1: 4807 dInt200: 5807
- anInt1 5008 aFloat: 6000.7 anInt2: 7008 dInt1: 4808 dInt200: 5808
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 10000 aFloat: 1 anInt2: 20000 dInt1: 30000 cEL: cvec[0] dInt100: 10500 dInt200: 10600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 5001 aFloat: 6000 anInt2: 7001 dInt1: 4801 dInt100: 5701 dInt200: 5801
+ anInt1 5002 aFloat: 6000.1 anInt2: 7002 dInt1: 4802 dInt100: 5702 dInt200: 5802
+ anInt1 5003 aFloat: 6000.2 anInt2: 7003 dInt1: 4803 dInt100: 5703 dInt200: 5803
+ anInt1 5004 aFloat: 6000.3 anInt2: 7004 dInt1: 4804 dInt100: 5704 dInt200: 5804
+ anInt1 5005 aFloat: 6000.4 anInt2: 7005 dInt1: 4805 dInt100: 5705 dInt200: 5805
+ anInt1 5006 aFloat: 6000.5 anInt2: 7006 dInt1: 4806 dInt100: 5706 dInt200: 5806
+ anInt1 5007 aFloat: 6000.6 anInt2: 7007 dInt1: 4807 dInt100: 5707 dInt200: 5807
+ anInt1 5008 aFloat: 6000.7 anInt2: 7008 dInt1: 4808 dInt100: 5708 dInt200: 5808
 gvec aux items: anInt 
  anInt 7001
  anInt 7002
@@ -1314,118 +1232,118 @@ cvecWD 1010: 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
 cview: 1010 1009 1008 1007 1006 1005 1004 1003 1002 1001
 hvec: 4001.5 4002.5 4003.5 4004.5 4005.5 4006.5 4007.5 4008.5 4009.5 4010.5 4011.5 4012.5 4013.5 4014.5 4015.5 4016.5 4017.5 4018.5 4019.5 4020.5
 hview: 4020.5 4019.5 4018.5 4017.5 4016.5 4015.5 4014.5 4013.5 4012.5 4011.5 4010.5 4009.5 4008.5 4007.5 4006.5 4005.5 4004.5 4003.5 4002.5 4001.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 1001 aFloat: 2000 pInt: 5001 pFloat: 0.10 anInt2: 3001 dInt1: 4001 dVar1: 4501 dpInt1: 501 dInt200: 1201 dInt250: 1601 anInt10: 300100 cEL: cvec[9]
+ anInt1 1001 aFloat: 2000 pInt: 5001 pFloat: 0.10 anInt2: 3001 dInt1: 4001 dVar1: 4501 dpInt1: 501 dInt100: 1101 dInt150: 1301 dInt200: 1201 dInt250: 1601 anInt10: 300100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1002 aFloat: 2000.1 pInt: 5002 pFloat: 1.10 anInt2: 3002 dInt1: 4002 dVar1: 4502 dpInt1: 502 dInt200: 1202 dInt250: 1602 anInt10: 300200 cEL: cvec[8]
+ anInt1 1002 aFloat: 2000.1 pInt: 5002 pFloat: 1.10 anInt2: 3002 dInt1: 4002 dVar1: 4502 dpInt1: 502 dInt100: 1102 dInt150: 1302 dInt200: 1202 dInt250: 1602 anInt10: 300200 cEL: cvec[8]
   pvInt: [510 ]
   pvFloat: [-0.480 ]
   dpvFloat: [0.200 ]
- anInt1 1003 aFloat: 2000.2 pInt: 5003 pFloat: 2.10 anInt2: 3003 dInt1: 4003 dVar1: 4503 dpInt1: 503 dInt200: 1203 dInt250: 1603 anInt10: 300300 cEL: cvec[7]
+ anInt1 1003 aFloat: 2000.2 pInt: 5003 pFloat: 2.10 anInt2: 3003 dInt1: 4003 dVar1: 4503 dpInt1: 503 dInt100: 1103 dInt150: 1303 dInt200: 1203 dInt250: 1603 anInt10: 300300 cEL: cvec[7]
   pvInt: [520 521 ]
   pvFloat: [-0.470 -0.370 ]
   dpvFloat: [0.300 0.301 ]
- anInt1 1004 aFloat: 2000.3 pInt: 5004 pFloat: 3.10 anInt2: 3004 dInt1: 4004 dVar1: 4504 dpInt1: 504 dInt200: 1204 dInt250: 1604 anInt10: 300400 cEL: cvec[6]
+ anInt1 1004 aFloat: 2000.3 pInt: 5004 pFloat: 3.10 anInt2: 3004 dInt1: 4004 dVar1: 4504 dpInt1: 504 dInt100: 1104 dInt150: 1304 dInt200: 1204 dInt250: 1604 anInt10: 300400 cEL: cvec[6]
   pvInt: [530 531 532 ]
   pvFloat: [-0.460 -0.360 -0.260 ]
   dpvFloat: [0.400 0.401 0.402 ]
- anInt1 1005 aFloat: 2000.4 pInt: 5005 pFloat: 4.10 anInt2: 3005 dInt1: 4005 dVar1: 4505 dpInt1: 505 dInt200: 1205 dInt250: 1605 anInt10: 300500 cEL: cvec[5]
+ anInt1 1005 aFloat: 2000.4 pInt: 5005 pFloat: 4.10 anInt2: 3005 dInt1: 4005 dVar1: 4505 dpInt1: 505 dInt100: 1105 dInt150: 1305 dInt200: 1205 dInt250: 1605 anInt10: 300500 cEL: cvec[5]
   pvInt: [540 541 542 543 ]
   pvFloat: [-0.450 -0.350 -0.250 -0.150 ]
   dpvFloat: [0.500 0.501 0.502 0.503 ]
- anInt1 1006 aFloat: 2000.5 pInt: 5006 pFloat: 5.10 anInt2: 3006 dInt1: 4006 dVar1: 4506 dpInt1: 506 dInt200: 1206 dInt250: 1606 anInt10: 300600 cEL: cvec[4]
+ anInt1 1006 aFloat: 2000.5 pInt: 5006 pFloat: 5.10 anInt2: 3006 dInt1: 4006 dVar1: 4506 dpInt1: 506 dInt100: 1106 dInt150: 1306 dInt200: 1206 dInt250: 1606 anInt10: 300600 cEL: cvec[4]
   pvInt: [550 551 552 553 554 ]
   pvFloat: [-0.440 -0.340 -0.240 -0.140 -0.040 ]
   dpvFloat: [0.600 0.601 0.602 0.603 0.604 ]
- anInt1 1007 aFloat: 2000.6 pInt: 5007 pFloat: 6.10 anInt2: 3007 dInt1: 4007 dVar1: 4507 dpInt1: 507 dInt200: 1207 dInt250: 1607 anInt10: 300700 cEL: cvec[3]
+ anInt1 1007 aFloat: 2000.6 pInt: 5007 pFloat: 6.10 anInt2: 3007 dInt1: 4007 dVar1: 4507 dpInt1: 507 dInt100: 1107 dInt150: 1307 dInt200: 1207 dInt250: 1607 anInt10: 300700 cEL: cvec[3]
   pvInt: [560 561 562 563 564 565 ]
   pvFloat: [-0.430 -0.330 -0.230 -0.130 -0.030 0.070 ]
   dpvFloat: [0.700 0.701 0.702 0.703 0.704 0.705 ]
- anInt1 1008 aFloat: 2000.7 pInt: 5008 pFloat: 7.10 anInt2: 3008 dInt1: 4008 dVar1: 4508 dpInt1: 508 dInt200: 1208 dInt250: 1608 anInt10: 300800 cEL: cvec[2]
+ anInt1 1008 aFloat: 2000.7 pInt: 5008 pFloat: 7.10 anInt2: 3008 dInt1: 4008 dVar1: 4508 dpInt1: 508 dInt100: 1108 dInt150: 1308 dInt200: 1208 dInt250: 1608 anInt10: 300800 cEL: cvec[2]
   pvInt: [570 571 572 573 574 575 576 ]
   pvFloat: [-0.420 -0.320 -0.220 -0.120 -0.020 0.080 0.180 ]
   dpvFloat: [0.800 0.801 0.802 0.803 0.804 0.805 0.806 ]
- anInt1 1009 aFloat: 2000.8 pInt: 5009 pFloat: 8.10 anInt2: 3009 dInt1: 4009 dVar1: 4509 dpInt1: 509 dInt200: 1209 dInt250: 1609 anInt10: 300900 cEL: cvec[1]
+ anInt1 1009 aFloat: 2000.8 pInt: 5009 pFloat: 8.10 anInt2: 3009 dInt1: 4009 dVar1: 4509 dpInt1: 509 dInt100: 1109 dInt150: 1309 dInt200: 1209 dInt250: 1609 anInt10: 300900 cEL: cvec[1]
   pvInt: [580 581 582 583 584 585 586 587 ]
   pvFloat: [-0.410 -0.310 -0.210 -0.110 -0.010 0.090 0.190 0.290 ]
   dpvFloat: [0.900 0.901 0.902 0.903 0.904 0.905 0.906 0.907 ]
- anInt1 1010 aFloat: 2000.9 pInt: 5010 pFloat: 9.10 anInt2: 3010 dInt1: 4010 dVar1: 4510 dpInt1: 510 dInt200: 1210 dInt250: 1610 anInt10: 301000 cEL: cvec[0]
+ anInt1 1010 aFloat: 2000.9 pInt: 5010 pFloat: 9.10 anInt2: 3010 dInt1: 4010 dVar1: 4510 dpInt1: 510 dInt100: 1110 dInt150: 1310 dInt200: 1210 dInt250: 1610 anInt10: 301000 cEL: cvec[0]
   pvInt: [590 591 592 593 594 595 596 597 598 ]
   pvFloat: [-0.400 -0.300 -0.200 -0.100 0.000 0.100 0.200 0.300 0.400 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 10
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 10000 aFloat: 1 anInt2: 20000 dInt1: 30000 cEL: cvec[0] dInt200: 10600 dInt250: 11000 anInt10: 2200000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 5001 aFloat: 6000 anInt2: 7001 dInt1: 4801 dInt200: 5801 anInt10: 1700300
- anInt1 5002 aFloat: 6000.1 anInt2: 7002 dInt1: 4802 dInt200: 5802 anInt10: 1700600
- anInt1 5003 aFloat: 6000.2 anInt2: 7003 dInt1: 4803 dInt200: 5803 anInt10: 1700900
- anInt1 5004 aFloat: 6000.3 anInt2: 7004 dInt1: 4804 dInt200: 5804 anInt10: 1701200
- anInt1 5005 aFloat: 6000.4 anInt2: 7005 dInt1: 4805 dInt200: 5805 anInt10: 1701500
- anInt1 5006 aFloat: 6000.5 anInt2: 7006 dInt1: 4806 dInt200: 5806 anInt10: 1701800
- anInt1 5007 aFloat: 6000.6 anInt2: 7007 dInt1: 4807 dInt200: 5807 anInt10: 1702100
- anInt1 5008 aFloat: 6000.7 anInt2: 7008 dInt1: 4808 dInt200: 5808 anInt10: 1702400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 10000 aFloat: 1 anInt2: 20000 dInt1: 30000 cEL: cvec[0] dInt100: 10500 dInt150: 10700 dInt200: 10600 dInt250: 11000 anInt10: 2200000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 5001 aFloat: 6000 anInt2: 7001 dInt1: 4801 dInt100: 5701 dInt150: 5901 dInt200: 5801 anInt10: 1700300
+ anInt1 5002 aFloat: 6000.1 anInt2: 7002 dInt1: 4802 dInt100: 5702 dInt150: 5902 dInt200: 5802 anInt10: 1700600
+ anInt1 5003 aFloat: 6000.2 anInt2: 7003 dInt1: 4803 dInt100: 5703 dInt150: 5903 dInt200: 5803 anInt10: 1700900
+ anInt1 5004 aFloat: 6000.3 anInt2: 7004 dInt1: 4804 dInt100: 5704 dInt150: 5904 dInt200: 5804 anInt10: 1701200
+ anInt1 5005 aFloat: 6000.4 anInt2: 7005 dInt1: 4805 dInt100: 5705 dInt150: 5905 dInt200: 5805 anInt10: 1701500
+ anInt1 5006 aFloat: 6000.5 anInt2: 7006 dInt1: 4806 dInt100: 5706 dInt150: 5906 dInt200: 5806 anInt10: 1701800
+ anInt1 5007 aFloat: 6000.6 anInt2: 7007 dInt1: 4807 dInt100: 5707 dInt150: 5907 dInt200: 5807 anInt10: 1702100
+ anInt1 5008 aFloat: 6000.7 anInt2: 7008 dInt1: 4808 dInt100: 5708 dInt150: 5908 dInt200: 5808 anInt10: 1702400
 scopy_cvecWD 1010: 2001(400100) 2002(400200) 2003(400300) 2004(400400) 2005(400500) 2006(400600) 2007(400700) 2008(400800) 2009(400900) 2010(401000)
 scopy_hvec: 4001.5 4002.5 4003.5 4004.5 4005.5 4006.5 4007.5 4008.5 4009.5 4010.5 4011.5 4012.5 4013.5 4014.5 4015.5 4016.5 4017.5 4018.5 4019.5 4020.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #9, run #0 10 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #10, run #0 10 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 1101 aFloat: 2200 pInt: 5501 pFloat: 0.11 anInt2: 3301 dInt1: 4401 dVar1: 4951 dpInt1: 551 dInt200: 1301 cEL: cvec[9]
+ anInt1 1101 aFloat: 2200 pInt: 5501 pFloat: 0.11 anInt2: 3301 dInt1: 4401 dVar1: 4951 dpInt1: 551 dInt100: 1201 dInt200: 1301 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1102 aFloat: 2200.1 pInt: 5502 pFloat: 1.11 anInt2: 3302 dInt1: 4402 dVar1: 4952 dpInt1: 552 dInt200: 1302 cEL: cvec[8]
+ anInt1 1102 aFloat: 2200.1 pInt: 5502 pFloat: 1.11 anInt2: 3302 dInt1: 4402 dVar1: 4952 dpInt1: 552 dInt100: 1202 dInt200: 1302 cEL: cvec[8]
   pvInt: [610 ]
   pvFloat: [-0.479 ]
   dpvFloat: [0.210 ]
- anInt1 1103 aFloat: 2200.2 pInt: 5503 pFloat: 2.11 anInt2: 3303 dInt1: 4403 dVar1: 4953 dpInt1: 553 dInt200: 1303 cEL: cvec[7]
+ anInt1 1103 aFloat: 2200.2 pInt: 5503 pFloat: 2.11 anInt2: 3303 dInt1: 4403 dVar1: 4953 dpInt1: 553 dInt100: 1203 dInt200: 1303 cEL: cvec[7]
   pvInt: [620 621 ]
   pvFloat: [-0.469 -0.369 ]
   dpvFloat: [0.310 0.311 ]
- anInt1 1104 aFloat: 2200.3 pInt: 5504 pFloat: 3.11 anInt2: 3304 dInt1: 4404 dVar1: 4954 dpInt1: 554 dInt200: 1304 cEL: cvec[6]
+ anInt1 1104 aFloat: 2200.3 pInt: 5504 pFloat: 3.11 anInt2: 3304 dInt1: 4404 dVar1: 4954 dpInt1: 554 dInt100: 1204 dInt200: 1304 cEL: cvec[6]
   pvInt: [630 631 632 ]
   pvFloat: [-0.459 -0.359 -0.259 ]
   dpvFloat: [0.410 0.411 0.412 ]
- anInt1 1105 aFloat: 2200.4 pInt: 5505 pFloat: 4.11 anInt2: 3305 dInt1: 4405 dVar1: 4955 dpInt1: 555 dInt200: 1305 cEL: cvec[5]
+ anInt1 1105 aFloat: 2200.4 pInt: 5505 pFloat: 4.11 anInt2: 3305 dInt1: 4405 dVar1: 4955 dpInt1: 555 dInt100: 1205 dInt200: 1305 cEL: cvec[5]
   pvInt: [640 641 642 643 ]
   pvFloat: [-0.449 -0.349 -0.249 -0.149 ]
   dpvFloat: [0.510 0.511 0.512 0.513 ]
- anInt1 1106 aFloat: 2200.5 pInt: 5506 pFloat: 5.11 anInt2: 3306 dInt1: 4406 dVar1: 4956 dpInt1: 556 dInt200: 1306 cEL: cvec[4]
+ anInt1 1106 aFloat: 2200.5 pInt: 5506 pFloat: 5.11 anInt2: 3306 dInt1: 4406 dVar1: 4956 dpInt1: 556 dInt100: 1206 dInt200: 1306 cEL: cvec[4]
   pvInt: [650 651 652 653 654 ]
   pvFloat: [-0.439 -0.339 -0.239 -0.139 -0.039 ]
   dpvFloat: [0.610 0.611 0.612 0.613 0.614 ]
- anInt1 1107 aFloat: 2200.6 pInt: 5507 pFloat: 6.11 anInt2: 3307 dInt1: 4407 dVar1: 4957 dpInt1: 557 dInt200: 1307 cEL: cvec[3]
+ anInt1 1107 aFloat: 2200.6 pInt: 5507 pFloat: 6.11 anInt2: 3307 dInt1: 4407 dVar1: 4957 dpInt1: 557 dInt100: 1207 dInt200: 1307 cEL: cvec[3]
   pvInt: [660 661 662 663 664 665 ]
   pvFloat: [-0.429 -0.329 -0.229 -0.129 -0.029 0.071 ]
   dpvFloat: [0.710 0.711 0.712 0.713 0.714 0.715 ]
- anInt1 1108 aFloat: 2200.7 pInt: 5508 pFloat: 7.11 anInt2: 3308 dInt1: 4408 dVar1: 4958 dpInt1: 558 dInt200: 1308 cEL: cvec[2]
+ anInt1 1108 aFloat: 2200.7 pInt: 5508 pFloat: 7.11 anInt2: 3308 dInt1: 4408 dVar1: 4958 dpInt1: 558 dInt100: 1208 dInt200: 1308 cEL: cvec[2]
   pvInt: [670 671 672 673 674 675 676 ]
   pvFloat: [-0.419 -0.319 -0.219 -0.119 -0.019 0.081 0.181 ]
   dpvFloat: [0.810 0.811 0.812 0.813 0.814 0.815 0.816 ]
- anInt1 1109 aFloat: 2200.8 pInt: 5509 pFloat: 8.11 anInt2: 3309 dInt1: 4409 dVar1: 4959 dpInt1: 559 dInt200: 1309 cEL: cvec[1]
+ anInt1 1109 aFloat: 2200.8 pInt: 5509 pFloat: 8.11 anInt2: 3309 dInt1: 4409 dVar1: 4959 dpInt1: 559 dInt100: 1209 dInt200: 1309 cEL: cvec[1]
   pvInt: [680 681 682 683 684 685 686 687 ]
   pvFloat: [-0.409 -0.309 -0.209 -0.109 -0.009 0.091 0.191 0.291 ]
   dpvFloat: [0.910 0.911 0.912 0.913 0.914 0.915 0.916 0.917 ]
- anInt1 1110 aFloat: 2200.9 pInt: 5510 pFloat: 9.11 anInt2: 3310 dInt1: 4410 dVar1: 4960 dpInt1: 560 dInt200: 1310 cEL: cvec[0]
+ anInt1 1110 aFloat: 2200.9 pInt: 5510 pFloat: 9.11 anInt2: 3310 dInt1: 4410 dVar1: 4960 dpInt1: 560 dInt100: 1210 dInt200: 1310 cEL: cvec[0]
   pvInt: [690 691 692 693 694 695 696 697 698 ]
   pvFloat: [-0.399 -0.299 -0.199 -0.099 0.001 0.101 0.201 0.301 0.401 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 11
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 11000 aFloat: 1.1 anInt2: 22000 dInt1: 33000 cEL: cvec[1] dInt200: 11600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 5501 aFloat: 6600 anInt2: 7701 dInt1: 5281 dInt200: 6301
- anInt1 5502 aFloat: 6600.1 anInt2: 7702 dInt1: 5282 dInt200: 6302
- anInt1 5503 aFloat: 6600.2 anInt2: 7703 dInt1: 5283 dInt200: 6303
- anInt1 5504 aFloat: 6600.3 anInt2: 7704 dInt1: 5284 dInt200: 6304
- anInt1 5505 aFloat: 6600.4 anInt2: 7705 dInt1: 5285 dInt200: 6305
- anInt1 5506 aFloat: 6600.5 anInt2: 7706 dInt1: 5286 dInt200: 6306
- anInt1 5507 aFloat: 6600.6 anInt2: 7707 dInt1: 5287 dInt200: 6307
- anInt1 5508 aFloat: 6600.7 anInt2: 7708 dInt1: 5288 dInt200: 6308
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 11000 aFloat: 1.1 anInt2: 22000 dInt1: 33000 cEL: cvec[1] dInt100: 11500 dInt200: 11600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 5501 aFloat: 6600 anInt2: 7701 dInt1: 5281 dInt100: 6201 dInt200: 6301
+ anInt1 5502 aFloat: 6600.1 anInt2: 7702 dInt1: 5282 dInt100: 6202 dInt200: 6302
+ anInt1 5503 aFloat: 6600.2 anInt2: 7703 dInt1: 5283 dInt100: 6203 dInt200: 6303
+ anInt1 5504 aFloat: 6600.3 anInt2: 7704 dInt1: 5284 dInt100: 6204 dInt200: 6304
+ anInt1 5505 aFloat: 6600.4 anInt2: 7705 dInt1: 5285 dInt100: 6205 dInt200: 6305
+ anInt1 5506 aFloat: 6600.5 anInt2: 7706 dInt1: 5286 dInt100: 6206 dInt200: 6306
+ anInt1 5507 aFloat: 6600.6 anInt2: 7707 dInt1: 5287 dInt100: 6207 dInt200: 6307
+ anInt1 5508 aFloat: 6600.7 anInt2: 7708 dInt1: 5288 dInt100: 6208 dInt200: 6308
 gvec aux items: anInt 
  anInt 7701
  anInt 7702
@@ -1441,118 +1359,118 @@ cvecWD 1011: 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210
 cview: 1110 1109 1108 1107 1106 1105 1104 1103 1102 1101
 hvec: 4401.5 4402.5 4403.5 4404.5 4405.5 4406.5 4407.5 4408.5 4409.5 4410.5 4411.5 4412.5 4413.5 4414.5 4415.5 4416.5 4417.5 4418.5 4419.5 4420.5
 hview: 4420.5 4419.5 4418.5 4417.5 4416.5 4415.5 4414.5 4413.5 4412.5 4411.5 4410.5 4409.5 4408.5 4407.5 4406.5 4405.5 4404.5 4403.5 4402.5 4401.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 1101 aFloat: 2200 pInt: 5501 pFloat: 0.11 anInt2: 3301 dInt1: 4401 dVar1: 4951 dpInt1: 551 dInt200: 1301 dInt250: 1701 anInt10: 330100 cEL: cvec[9]
+ anInt1 1101 aFloat: 2200 pInt: 5501 pFloat: 0.11 anInt2: 3301 dInt1: 4401 dVar1: 4951 dpInt1: 551 dInt100: 1201 dInt150: 1401 dInt200: 1301 dInt250: 1701 anInt10: 330100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1102 aFloat: 2200.1 pInt: 5502 pFloat: 1.11 anInt2: 3302 dInt1: 4402 dVar1: 4952 dpInt1: 552 dInt200: 1302 dInt250: 1702 anInt10: 330200 cEL: cvec[8]
+ anInt1 1102 aFloat: 2200.1 pInt: 5502 pFloat: 1.11 anInt2: 3302 dInt1: 4402 dVar1: 4952 dpInt1: 552 dInt100: 1202 dInt150: 1402 dInt200: 1302 dInt250: 1702 anInt10: 330200 cEL: cvec[8]
   pvInt: [610 ]
   pvFloat: [-0.479 ]
   dpvFloat: [0.210 ]
- anInt1 1103 aFloat: 2200.2 pInt: 5503 pFloat: 2.11 anInt2: 3303 dInt1: 4403 dVar1: 4953 dpInt1: 553 dInt200: 1303 dInt250: 1703 anInt10: 330300 cEL: cvec[7]
+ anInt1 1103 aFloat: 2200.2 pInt: 5503 pFloat: 2.11 anInt2: 3303 dInt1: 4403 dVar1: 4953 dpInt1: 553 dInt100: 1203 dInt150: 1403 dInt200: 1303 dInt250: 1703 anInt10: 330300 cEL: cvec[7]
   pvInt: [620 621 ]
   pvFloat: [-0.469 -0.369 ]
   dpvFloat: [0.310 0.311 ]
- anInt1 1104 aFloat: 2200.3 pInt: 5504 pFloat: 3.11 anInt2: 3304 dInt1: 4404 dVar1: 4954 dpInt1: 554 dInt200: 1304 dInt250: 1704 anInt10: 330400 cEL: cvec[6]
+ anInt1 1104 aFloat: 2200.3 pInt: 5504 pFloat: 3.11 anInt2: 3304 dInt1: 4404 dVar1: 4954 dpInt1: 554 dInt100: 1204 dInt150: 1404 dInt200: 1304 dInt250: 1704 anInt10: 330400 cEL: cvec[6]
   pvInt: [630 631 632 ]
   pvFloat: [-0.459 -0.359 -0.259 ]
   dpvFloat: [0.410 0.411 0.412 ]
- anInt1 1105 aFloat: 2200.4 pInt: 5505 pFloat: 4.11 anInt2: 3305 dInt1: 4405 dVar1: 4955 dpInt1: 555 dInt200: 1305 dInt250: 1705 anInt10: 330500 cEL: cvec[5]
+ anInt1 1105 aFloat: 2200.4 pInt: 5505 pFloat: 4.11 anInt2: 3305 dInt1: 4405 dVar1: 4955 dpInt1: 555 dInt100: 1205 dInt150: 1405 dInt200: 1305 dInt250: 1705 anInt10: 330500 cEL: cvec[5]
   pvInt: [640 641 642 643 ]
   pvFloat: [-0.449 -0.349 -0.249 -0.149 ]
   dpvFloat: [0.510 0.511 0.512 0.513 ]
- anInt1 1106 aFloat: 2200.5 pInt: 5506 pFloat: 5.11 anInt2: 3306 dInt1: 4406 dVar1: 4956 dpInt1: 556 dInt200: 1306 dInt250: 1706 anInt10: 330600 cEL: cvec[4]
+ anInt1 1106 aFloat: 2200.5 pInt: 5506 pFloat: 5.11 anInt2: 3306 dInt1: 4406 dVar1: 4956 dpInt1: 556 dInt100: 1206 dInt150: 1406 dInt200: 1306 dInt250: 1706 anInt10: 330600 cEL: cvec[4]
   pvInt: [650 651 652 653 654 ]
   pvFloat: [-0.439 -0.339 -0.239 -0.139 -0.039 ]
   dpvFloat: [0.610 0.611 0.612 0.613 0.614 ]
- anInt1 1107 aFloat: 2200.6 pInt: 5507 pFloat: 6.11 anInt2: 3307 dInt1: 4407 dVar1: 4957 dpInt1: 557 dInt200: 1307 dInt250: 1707 anInt10: 330700 cEL: cvec[3]
+ anInt1 1107 aFloat: 2200.6 pInt: 5507 pFloat: 6.11 anInt2: 3307 dInt1: 4407 dVar1: 4957 dpInt1: 557 dInt100: 1207 dInt150: 1407 dInt200: 1307 dInt250: 1707 anInt10: 330700 cEL: cvec[3]
   pvInt: [660 661 662 663 664 665 ]
   pvFloat: [-0.429 -0.329 -0.229 -0.129 -0.029 0.071 ]
   dpvFloat: [0.710 0.711 0.712 0.713 0.714 0.715 ]
- anInt1 1108 aFloat: 2200.7 pInt: 5508 pFloat: 7.11 anInt2: 3308 dInt1: 4408 dVar1: 4958 dpInt1: 558 dInt200: 1308 dInt250: 1708 anInt10: 330800 cEL: cvec[2]
+ anInt1 1108 aFloat: 2200.7 pInt: 5508 pFloat: 7.11 anInt2: 3308 dInt1: 4408 dVar1: 4958 dpInt1: 558 dInt100: 1208 dInt150: 1408 dInt200: 1308 dInt250: 1708 anInt10: 330800 cEL: cvec[2]
   pvInt: [670 671 672 673 674 675 676 ]
   pvFloat: [-0.419 -0.319 -0.219 -0.119 -0.019 0.081 0.181 ]
   dpvFloat: [0.810 0.811 0.812 0.813 0.814 0.815 0.816 ]
- anInt1 1109 aFloat: 2200.8 pInt: 5509 pFloat: 8.11 anInt2: 3309 dInt1: 4409 dVar1: 4959 dpInt1: 559 dInt200: 1309 dInt250: 1709 anInt10: 330900 cEL: cvec[1]
+ anInt1 1109 aFloat: 2200.8 pInt: 5509 pFloat: 8.11 anInt2: 3309 dInt1: 4409 dVar1: 4959 dpInt1: 559 dInt100: 1209 dInt150: 1409 dInt200: 1309 dInt250: 1709 anInt10: 330900 cEL: cvec[1]
   pvInt: [680 681 682 683 684 685 686 687 ]
   pvFloat: [-0.409 -0.309 -0.209 -0.109 -0.009 0.091 0.191 0.291 ]
   dpvFloat: [0.910 0.911 0.912 0.913 0.914 0.915 0.916 0.917 ]
- anInt1 1110 aFloat: 2200.9 pInt: 5510 pFloat: 9.11 anInt2: 3310 dInt1: 4410 dVar1: 4960 dpInt1: 560 dInt200: 1310 dInt250: 1710 anInt10: 331000 cEL: cvec[0]
+ anInt1 1110 aFloat: 2200.9 pInt: 5510 pFloat: 9.11 anInt2: 3310 dInt1: 4410 dVar1: 4960 dpInt1: 560 dInt100: 1210 dInt150: 1410 dInt200: 1310 dInt250: 1710 anInt10: 331000 cEL: cvec[0]
   pvInt: [690 691 692 693 694 695 696 697 698 ]
   pvFloat: [-0.399 -0.299 -0.199 -0.099 0.001 0.101 0.201 0.301 0.401 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 11
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 11000 aFloat: 1.1 anInt2: 22000 dInt1: 33000 cEL: cvec[1] dInt200: 11600 dInt250: 12000 anInt10: 2420000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 5501 aFloat: 6600 anInt2: 7701 dInt1: 5281 dInt200: 6301 anInt10: 1870300
- anInt1 5502 aFloat: 6600.1 anInt2: 7702 dInt1: 5282 dInt200: 6302 anInt10: 1870600
- anInt1 5503 aFloat: 6600.2 anInt2: 7703 dInt1: 5283 dInt200: 6303 anInt10: 1870900
- anInt1 5504 aFloat: 6600.3 anInt2: 7704 dInt1: 5284 dInt200: 6304 anInt10: 1871200
- anInt1 5505 aFloat: 6600.4 anInt2: 7705 dInt1: 5285 dInt200: 6305 anInt10: 1871500
- anInt1 5506 aFloat: 6600.5 anInt2: 7706 dInt1: 5286 dInt200: 6306 anInt10: 1871800
- anInt1 5507 aFloat: 6600.6 anInt2: 7707 dInt1: 5287 dInt200: 6307 anInt10: 1872100
- anInt1 5508 aFloat: 6600.7 anInt2: 7708 dInt1: 5288 dInt200: 6308 anInt10: 1872400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 11000 aFloat: 1.1 anInt2: 22000 dInt1: 33000 cEL: cvec[1] dInt100: 11500 dInt150: 11700 dInt200: 11600 dInt250: 12000 anInt10: 2420000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 5501 aFloat: 6600 anInt2: 7701 dInt1: 5281 dInt100: 6201 dInt150: 6401 dInt200: 6301 anInt10: 1870300
+ anInt1 5502 aFloat: 6600.1 anInt2: 7702 dInt1: 5282 dInt100: 6202 dInt150: 6402 dInt200: 6302 anInt10: 1870600
+ anInt1 5503 aFloat: 6600.2 anInt2: 7703 dInt1: 5283 dInt100: 6203 dInt150: 6403 dInt200: 6303 anInt10: 1870900
+ anInt1 5504 aFloat: 6600.3 anInt2: 7704 dInt1: 5284 dInt100: 6204 dInt150: 6404 dInt200: 6304 anInt10: 1871200
+ anInt1 5505 aFloat: 6600.4 anInt2: 7705 dInt1: 5285 dInt100: 6205 dInt150: 6405 dInt200: 6305 anInt10: 1871500
+ anInt1 5506 aFloat: 6600.5 anInt2: 7706 dInt1: 5286 dInt100: 6206 dInt150: 6406 dInt200: 6306 anInt10: 1871800
+ anInt1 5507 aFloat: 6600.6 anInt2: 7707 dInt1: 5287 dInt100: 6207 dInt150: 6407 dInt200: 6307 anInt10: 1872100
+ anInt1 5508 aFloat: 6600.7 anInt2: 7708 dInt1: 5288 dInt100: 6208 dInt150: 6408 dInt200: 6308 anInt10: 1872400
 scopy_cvecWD 1011: 2201(440100) 2202(440200) 2203(440300) 2204(440400) 2205(440500) 2206(440600) 2207(440700) 2208(440800) 2209(440900) 2210(441000)
 scopy_hvec: 4401.5 4402.5 4403.5 4404.5 4405.5 4406.5 4407.5 4408.5 4409.5 4410.5 4411.5 4412.5 4413.5 4414.5 4415.5 4416.5 4417.5 4418.5 4419.5 4420.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #10, run #0 11 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #11, run #0 11 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 1201 aFloat: 2400 pInt: 6001 pFloat: 0.12 anInt2: 3601 dInt1: 4801 dVar1: 5401 dpInt1: 601 dInt200: 1401 cEL: cvec[9]
+ anInt1 1201 aFloat: 2400 pInt: 6001 pFloat: 0.12 anInt2: 3601 dInt1: 4801 dVar1: 5401 dpInt1: 601 dInt100: 1301 dInt200: 1401 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1202 aFloat: 2400.1 pInt: 6002 pFloat: 1.12 anInt2: 3602 dInt1: 4802 dVar1: 5402 dpInt1: 602 dInt200: 1402 cEL: cvec[8]
+ anInt1 1202 aFloat: 2400.1 pInt: 6002 pFloat: 1.12 anInt2: 3602 dInt1: 4802 dVar1: 5402 dpInt1: 602 dInt100: 1302 dInt200: 1402 cEL: cvec[8]
   pvInt: [710 ]
   pvFloat: [-0.478 ]
   dpvFloat: [0.220 ]
- anInt1 1203 aFloat: 2400.2 pInt: 6003 pFloat: 2.12 anInt2: 3603 dInt1: 4803 dVar1: 5403 dpInt1: 603 dInt200: 1403 cEL: cvec[7]
+ anInt1 1203 aFloat: 2400.2 pInt: 6003 pFloat: 2.12 anInt2: 3603 dInt1: 4803 dVar1: 5403 dpInt1: 603 dInt100: 1303 dInt200: 1403 cEL: cvec[7]
   pvInt: [720 721 ]
   pvFloat: [-0.468 -0.368 ]
   dpvFloat: [0.320 0.321 ]
- anInt1 1204 aFloat: 2400.3 pInt: 6004 pFloat: 3.12 anInt2: 3604 dInt1: 4804 dVar1: 5404 dpInt1: 604 dInt200: 1404 cEL: cvec[6]
+ anInt1 1204 aFloat: 2400.3 pInt: 6004 pFloat: 3.12 anInt2: 3604 dInt1: 4804 dVar1: 5404 dpInt1: 604 dInt100: 1304 dInt200: 1404 cEL: cvec[6]
   pvInt: [730 731 732 ]
   pvFloat: [-0.458 -0.358 -0.258 ]
   dpvFloat: [0.420 0.421 0.422 ]
- anInt1 1205 aFloat: 2400.4 pInt: 6005 pFloat: 4.12 anInt2: 3605 dInt1: 4805 dVar1: 5405 dpInt1: 605 dInt200: 1405 cEL: cvec[5]
+ anInt1 1205 aFloat: 2400.4 pInt: 6005 pFloat: 4.12 anInt2: 3605 dInt1: 4805 dVar1: 5405 dpInt1: 605 dInt100: 1305 dInt200: 1405 cEL: cvec[5]
   pvInt: [740 741 742 743 ]
   pvFloat: [-0.448 -0.348 -0.248 -0.148 ]
   dpvFloat: [0.520 0.521 0.522 0.523 ]
- anInt1 1206 aFloat: 2400.5 pInt: 6006 pFloat: 5.12 anInt2: 3606 dInt1: 4806 dVar1: 5406 dpInt1: 606 dInt200: 1406 cEL: cvec[4]
+ anInt1 1206 aFloat: 2400.5 pInt: 6006 pFloat: 5.12 anInt2: 3606 dInt1: 4806 dVar1: 5406 dpInt1: 606 dInt100: 1306 dInt200: 1406 cEL: cvec[4]
   pvInt: [750 751 752 753 754 ]
   pvFloat: [-0.438 -0.338 -0.238 -0.138 -0.038 ]
   dpvFloat: [0.620 0.621 0.622 0.623 0.624 ]
- anInt1 1207 aFloat: 2400.6 pInt: 6007 pFloat: 6.12 anInt2: 3607 dInt1: 4807 dVar1: 5407 dpInt1: 607 dInt200: 1407 cEL: cvec[3]
+ anInt1 1207 aFloat: 2400.6 pInt: 6007 pFloat: 6.12 anInt2: 3607 dInt1: 4807 dVar1: 5407 dpInt1: 607 dInt100: 1307 dInt200: 1407 cEL: cvec[3]
   pvInt: [760 761 762 763 764 765 ]
   pvFloat: [-0.428 -0.328 -0.228 -0.128 -0.028 0.072 ]
   dpvFloat: [0.720 0.721 0.722 0.723 0.724 0.725 ]
- anInt1 1208 aFloat: 2400.7 pInt: 6008 pFloat: 7.12 anInt2: 3608 dInt1: 4808 dVar1: 5408 dpInt1: 608 dInt200: 1408 cEL: cvec[2]
+ anInt1 1208 aFloat: 2400.7 pInt: 6008 pFloat: 7.12 anInt2: 3608 dInt1: 4808 dVar1: 5408 dpInt1: 608 dInt100: 1308 dInt200: 1408 cEL: cvec[2]
   pvInt: [770 771 772 773 774 775 776 ]
   pvFloat: [-0.418 -0.318 -0.218 -0.118 -0.018 0.082 0.182 ]
   dpvFloat: [0.820 0.821 0.822 0.823 0.824 0.825 0.826 ]
- anInt1 1209 aFloat: 2400.8 pInt: 6009 pFloat: 8.12 anInt2: 3609 dInt1: 4809 dVar1: 5409 dpInt1: 609 dInt200: 1409 cEL: cvec[1]
+ anInt1 1209 aFloat: 2400.8 pInt: 6009 pFloat: 8.12 anInt2: 3609 dInt1: 4809 dVar1: 5409 dpInt1: 609 dInt100: 1309 dInt200: 1409 cEL: cvec[1]
   pvInt: [780 781 782 783 784 785 786 787 ]
   pvFloat: [-0.408 -0.308 -0.208 -0.108 -0.008 0.092 0.192 0.292 ]
   dpvFloat: [0.920 0.921 0.922 0.923 0.924 0.925 0.926 0.927 ]
- anInt1 1210 aFloat: 2400.9 pInt: 6010 pFloat: 9.12 anInt2: 3610 dInt1: 4810 dVar1: 5410 dpInt1: 610 dInt200: 1410 cEL: cvec[0]
+ anInt1 1210 aFloat: 2400.9 pInt: 6010 pFloat: 9.12 anInt2: 3610 dInt1: 4810 dVar1: 5410 dpInt1: 610 dInt100: 1310 dInt200: 1410 cEL: cvec[0]
   pvInt: [790 791 792 793 794 795 796 797 798 ]
   pvFloat: [-0.398 -0.298 -0.198 -0.098 0.002 0.102 0.202 0.302 0.402 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 12
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 12000 aFloat: 1.2 anInt2: 24000 dInt1: 36000 cEL: cvec[2] dInt200: 12600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 6001 aFloat: 7200 anInt2: 8401 dInt1: 5761 dInt200: 6801
- anInt1 6002 aFloat: 7200.1 anInt2: 8402 dInt1: 5762 dInt200: 6802
- anInt1 6003 aFloat: 7200.2 anInt2: 8403 dInt1: 5763 dInt200: 6803
- anInt1 6004 aFloat: 7200.3 anInt2: 8404 dInt1: 5764 dInt200: 6804
- anInt1 6005 aFloat: 7200.4 anInt2: 8405 dInt1: 5765 dInt200: 6805
- anInt1 6006 aFloat: 7200.5 anInt2: 8406 dInt1: 5766 dInt200: 6806
- anInt1 6007 aFloat: 7200.6 anInt2: 8407 dInt1: 5767 dInt200: 6807
- anInt1 6008 aFloat: 7200.7 anInt2: 8408 dInt1: 5768 dInt200: 6808
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 12000 aFloat: 1.2 anInt2: 24000 dInt1: 36000 cEL: cvec[2] dInt100: 12500 dInt200: 12600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 6001 aFloat: 7200 anInt2: 8401 dInt1: 5761 dInt100: 6701 dInt200: 6801
+ anInt1 6002 aFloat: 7200.1 anInt2: 8402 dInt1: 5762 dInt100: 6702 dInt200: 6802
+ anInt1 6003 aFloat: 7200.2 anInt2: 8403 dInt1: 5763 dInt100: 6703 dInt200: 6803
+ anInt1 6004 aFloat: 7200.3 anInt2: 8404 dInt1: 5764 dInt100: 6704 dInt200: 6804
+ anInt1 6005 aFloat: 7200.4 anInt2: 8405 dInt1: 5765 dInt100: 6705 dInt200: 6805
+ anInt1 6006 aFloat: 7200.5 anInt2: 8406 dInt1: 5766 dInt100: 6706 dInt200: 6806
+ anInt1 6007 aFloat: 7200.6 anInt2: 8407 dInt1: 5767 dInt100: 6707 dInt200: 6807
+ anInt1 6008 aFloat: 7200.7 anInt2: 8408 dInt1: 5768 dInt100: 6708 dInt200: 6808
 gvec aux items: anInt 
  anInt 8401
  anInt 8402
@@ -1568,118 +1486,118 @@ cvecWD 1012: 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410
 cview: 1210 1209 1208 1207 1206 1205 1204 1203 1202 1201
 hvec: 4801.5 4802.5 4803.5 4804.5 4805.5 4806.5 4807.5 4808.5 4809.5 4810.5 4811.5 4812.5 4813.5 4814.5 4815.5 4816.5 4817.5 4818.5 4819.5 4820.5
 hview: 4820.5 4819.5 4818.5 4817.5 4816.5 4815.5 4814.5 4813.5 4812.5 4811.5 4810.5 4809.5 4808.5 4807.5 4806.5 4805.5 4804.5 4803.5 4802.5 4801.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 1201 aFloat: 2400 pInt: 6001 pFloat: 0.12 anInt2: 3601 dInt1: 4801 dVar1: 5401 dpInt1: 601 dInt200: 1401 dInt250: 1801 anInt10: 360100 cEL: cvec[9]
+ anInt1 1201 aFloat: 2400 pInt: 6001 pFloat: 0.12 anInt2: 3601 dInt1: 4801 dVar1: 5401 dpInt1: 601 dInt100: 1301 dInt150: 1501 dInt200: 1401 dInt250: 1801 anInt10: 360100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1202 aFloat: 2400.1 pInt: 6002 pFloat: 1.12 anInt2: 3602 dInt1: 4802 dVar1: 5402 dpInt1: 602 dInt200: 1402 dInt250: 1802 anInt10: 360200 cEL: cvec[8]
+ anInt1 1202 aFloat: 2400.1 pInt: 6002 pFloat: 1.12 anInt2: 3602 dInt1: 4802 dVar1: 5402 dpInt1: 602 dInt100: 1302 dInt150: 1502 dInt200: 1402 dInt250: 1802 anInt10: 360200 cEL: cvec[8]
   pvInt: [710 ]
   pvFloat: [-0.478 ]
   dpvFloat: [0.220 ]
- anInt1 1203 aFloat: 2400.2 pInt: 6003 pFloat: 2.12 anInt2: 3603 dInt1: 4803 dVar1: 5403 dpInt1: 603 dInt200: 1403 dInt250: 1803 anInt10: 360300 cEL: cvec[7]
+ anInt1 1203 aFloat: 2400.2 pInt: 6003 pFloat: 2.12 anInt2: 3603 dInt1: 4803 dVar1: 5403 dpInt1: 603 dInt100: 1303 dInt150: 1503 dInt200: 1403 dInt250: 1803 anInt10: 360300 cEL: cvec[7]
   pvInt: [720 721 ]
   pvFloat: [-0.468 -0.368 ]
   dpvFloat: [0.320 0.321 ]
- anInt1 1204 aFloat: 2400.3 pInt: 6004 pFloat: 3.12 anInt2: 3604 dInt1: 4804 dVar1: 5404 dpInt1: 604 dInt200: 1404 dInt250: 1804 anInt10: 360400 cEL: cvec[6]
+ anInt1 1204 aFloat: 2400.3 pInt: 6004 pFloat: 3.12 anInt2: 3604 dInt1: 4804 dVar1: 5404 dpInt1: 604 dInt100: 1304 dInt150: 1504 dInt200: 1404 dInt250: 1804 anInt10: 360400 cEL: cvec[6]
   pvInt: [730 731 732 ]
   pvFloat: [-0.458 -0.358 -0.258 ]
   dpvFloat: [0.420 0.421 0.422 ]
- anInt1 1205 aFloat: 2400.4 pInt: 6005 pFloat: 4.12 anInt2: 3605 dInt1: 4805 dVar1: 5405 dpInt1: 605 dInt200: 1405 dInt250: 1805 anInt10: 360500 cEL: cvec[5]
+ anInt1 1205 aFloat: 2400.4 pInt: 6005 pFloat: 4.12 anInt2: 3605 dInt1: 4805 dVar1: 5405 dpInt1: 605 dInt100: 1305 dInt150: 1505 dInt200: 1405 dInt250: 1805 anInt10: 360500 cEL: cvec[5]
   pvInt: [740 741 742 743 ]
   pvFloat: [-0.448 -0.348 -0.248 -0.148 ]
   dpvFloat: [0.520 0.521 0.522 0.523 ]
- anInt1 1206 aFloat: 2400.5 pInt: 6006 pFloat: 5.12 anInt2: 3606 dInt1: 4806 dVar1: 5406 dpInt1: 606 dInt200: 1406 dInt250: 1806 anInt10: 360600 cEL: cvec[4]
+ anInt1 1206 aFloat: 2400.5 pInt: 6006 pFloat: 5.12 anInt2: 3606 dInt1: 4806 dVar1: 5406 dpInt1: 606 dInt100: 1306 dInt150: 1506 dInt200: 1406 dInt250: 1806 anInt10: 360600 cEL: cvec[4]
   pvInt: [750 751 752 753 754 ]
   pvFloat: [-0.438 -0.338 -0.238 -0.138 -0.038 ]
   dpvFloat: [0.620 0.621 0.622 0.623 0.624 ]
- anInt1 1207 aFloat: 2400.6 pInt: 6007 pFloat: 6.12 anInt2: 3607 dInt1: 4807 dVar1: 5407 dpInt1: 607 dInt200: 1407 dInt250: 1807 anInt10: 360700 cEL: cvec[3]
+ anInt1 1207 aFloat: 2400.6 pInt: 6007 pFloat: 6.12 anInt2: 3607 dInt1: 4807 dVar1: 5407 dpInt1: 607 dInt100: 1307 dInt150: 1507 dInt200: 1407 dInt250: 1807 anInt10: 360700 cEL: cvec[3]
   pvInt: [760 761 762 763 764 765 ]
   pvFloat: [-0.428 -0.328 -0.228 -0.128 -0.028 0.072 ]
   dpvFloat: [0.720 0.721 0.722 0.723 0.724 0.725 ]
- anInt1 1208 aFloat: 2400.7 pInt: 6008 pFloat: 7.12 anInt2: 3608 dInt1: 4808 dVar1: 5408 dpInt1: 608 dInt200: 1408 dInt250: 1808 anInt10: 360800 cEL: cvec[2]
+ anInt1 1208 aFloat: 2400.7 pInt: 6008 pFloat: 7.12 anInt2: 3608 dInt1: 4808 dVar1: 5408 dpInt1: 608 dInt100: 1308 dInt150: 1508 dInt200: 1408 dInt250: 1808 anInt10: 360800 cEL: cvec[2]
   pvInt: [770 771 772 773 774 775 776 ]
   pvFloat: [-0.418 -0.318 -0.218 -0.118 -0.018 0.082 0.182 ]
   dpvFloat: [0.820 0.821 0.822 0.823 0.824 0.825 0.826 ]
- anInt1 1209 aFloat: 2400.8 pInt: 6009 pFloat: 8.12 anInt2: 3609 dInt1: 4809 dVar1: 5409 dpInt1: 609 dInt200: 1409 dInt250: 1809 anInt10: 360900 cEL: cvec[1]
+ anInt1 1209 aFloat: 2400.8 pInt: 6009 pFloat: 8.12 anInt2: 3609 dInt1: 4809 dVar1: 5409 dpInt1: 609 dInt100: 1309 dInt150: 1509 dInt200: 1409 dInt250: 1809 anInt10: 360900 cEL: cvec[1]
   pvInt: [780 781 782 783 784 785 786 787 ]
   pvFloat: [-0.408 -0.308 -0.208 -0.108 -0.008 0.092 0.192 0.292 ]
   dpvFloat: [0.920 0.921 0.922 0.923 0.924 0.925 0.926 0.927 ]
- anInt1 1210 aFloat: 2400.9 pInt: 6010 pFloat: 9.12 anInt2: 3610 dInt1: 4810 dVar1: 5410 dpInt1: 610 dInt200: 1410 dInt250: 1810 anInt10: 361000 cEL: cvec[0]
+ anInt1 1210 aFloat: 2400.9 pInt: 6010 pFloat: 9.12 anInt2: 3610 dInt1: 4810 dVar1: 5410 dpInt1: 610 dInt100: 1310 dInt150: 1510 dInt200: 1410 dInt250: 1810 anInt10: 361000 cEL: cvec[0]
   pvInt: [790 791 792 793 794 795 796 797 798 ]
   pvFloat: [-0.398 -0.298 -0.198 -0.098 0.002 0.102 0.202 0.302 0.402 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 12
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 12000 aFloat: 1.2 anInt2: 24000 dInt1: 36000 cEL: cvec[2] dInt200: 12600 dInt250: 13000 anInt10: 2640000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 6001 aFloat: 7200 anInt2: 8401 dInt1: 5761 dInt200: 6801 anInt10: 2040300
- anInt1 6002 aFloat: 7200.1 anInt2: 8402 dInt1: 5762 dInt200: 6802 anInt10: 2040600
- anInt1 6003 aFloat: 7200.2 anInt2: 8403 dInt1: 5763 dInt200: 6803 anInt10: 2040900
- anInt1 6004 aFloat: 7200.3 anInt2: 8404 dInt1: 5764 dInt200: 6804 anInt10: 2041200
- anInt1 6005 aFloat: 7200.4 anInt2: 8405 dInt1: 5765 dInt200: 6805 anInt10: 2041500
- anInt1 6006 aFloat: 7200.5 anInt2: 8406 dInt1: 5766 dInt200: 6806 anInt10: 2041800
- anInt1 6007 aFloat: 7200.6 anInt2: 8407 dInt1: 5767 dInt200: 6807 anInt10: 2042100
- anInt1 6008 aFloat: 7200.7 anInt2: 8408 dInt1: 5768 dInt200: 6808 anInt10: 2042400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 12000 aFloat: 1.2 anInt2: 24000 dInt1: 36000 cEL: cvec[2] dInt100: 12500 dInt150: 12700 dInt200: 12600 dInt250: 13000 anInt10: 2640000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 6001 aFloat: 7200 anInt2: 8401 dInt1: 5761 dInt100: 6701 dInt150: 6901 dInt200: 6801 anInt10: 2040300
+ anInt1 6002 aFloat: 7200.1 anInt2: 8402 dInt1: 5762 dInt100: 6702 dInt150: 6902 dInt200: 6802 anInt10: 2040600
+ anInt1 6003 aFloat: 7200.2 anInt2: 8403 dInt1: 5763 dInt100: 6703 dInt150: 6903 dInt200: 6803 anInt10: 2040900
+ anInt1 6004 aFloat: 7200.3 anInt2: 8404 dInt1: 5764 dInt100: 6704 dInt150: 6904 dInt200: 6804 anInt10: 2041200
+ anInt1 6005 aFloat: 7200.4 anInt2: 8405 dInt1: 5765 dInt100: 6705 dInt150: 6905 dInt200: 6805 anInt10: 2041500
+ anInt1 6006 aFloat: 7200.5 anInt2: 8406 dInt1: 5766 dInt100: 6706 dInt150: 6906 dInt200: 6806 anInt10: 2041800
+ anInt1 6007 aFloat: 7200.6 anInt2: 8407 dInt1: 5767 dInt100: 6707 dInt150: 6907 dInt200: 6807 anInt10: 2042100
+ anInt1 6008 aFloat: 7200.7 anInt2: 8408 dInt1: 5768 dInt100: 6708 dInt150: 6908 dInt200: 6808 anInt10: 2042400
 scopy_cvecWD 1012: 2401(480100) 2402(480200) 2403(480300) 2404(480400) 2405(480500) 2406(480600) 2407(480700) 2408(480800) 2409(480900) 2410(481000)
 scopy_hvec: 4801.5 4802.5 4803.5 4804.5 4805.5 4806.5 4807.5 4808.5 4809.5 4810.5 4811.5 4812.5 4813.5 4814.5 4815.5 4816.5 4817.5 4818.5 4819.5 4820.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #11, run #0 12 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #12, run #0 12 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 1301 aFloat: 2600 pInt: 6501 pFloat: 0.13 anInt2: 3901 dInt1: 5201 dVar1: 5851 dpInt1: 651 dInt200: 1501 cEL: cvec[9]
+ anInt1 1301 aFloat: 2600 pInt: 6501 pFloat: 0.13 anInt2: 3901 dInt1: 5201 dVar1: 5851 dpInt1: 651 dInt100: 1401 dInt200: 1501 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1302 aFloat: 2600.1 pInt: 6502 pFloat: 1.13 anInt2: 3902 dInt1: 5202 dVar1: 5852 dpInt1: 652 dInt200: 1502 cEL: cvec[8]
+ anInt1 1302 aFloat: 2600.1 pInt: 6502 pFloat: 1.13 anInt2: 3902 dInt1: 5202 dVar1: 5852 dpInt1: 652 dInt100: 1402 dInt200: 1502 cEL: cvec[8]
   pvInt: [810 ]
   pvFloat: [-0.477 ]
   dpvFloat: [0.230 ]
- anInt1 1303 aFloat: 2600.2 pInt: 6503 pFloat: 2.13 anInt2: 3903 dInt1: 5203 dVar1: 5853 dpInt1: 653 dInt200: 1503 cEL: cvec[7]
+ anInt1 1303 aFloat: 2600.2 pInt: 6503 pFloat: 2.13 anInt2: 3903 dInt1: 5203 dVar1: 5853 dpInt1: 653 dInt100: 1403 dInt200: 1503 cEL: cvec[7]
   pvInt: [820 821 ]
   pvFloat: [-0.467 -0.367 ]
   dpvFloat: [0.330 0.331 ]
- anInt1 1304 aFloat: 2600.3 pInt: 6504 pFloat: 3.13 anInt2: 3904 dInt1: 5204 dVar1: 5854 dpInt1: 654 dInt200: 1504 cEL: cvec[6]
+ anInt1 1304 aFloat: 2600.3 pInt: 6504 pFloat: 3.13 anInt2: 3904 dInt1: 5204 dVar1: 5854 dpInt1: 654 dInt100: 1404 dInt200: 1504 cEL: cvec[6]
   pvInt: [830 831 832 ]
   pvFloat: [-0.457 -0.357 -0.257 ]
   dpvFloat: [0.430 0.431 0.432 ]
- anInt1 1305 aFloat: 2600.4 pInt: 6505 pFloat: 4.13 anInt2: 3905 dInt1: 5205 dVar1: 5855 dpInt1: 655 dInt200: 1505 cEL: cvec[5]
+ anInt1 1305 aFloat: 2600.4 pInt: 6505 pFloat: 4.13 anInt2: 3905 dInt1: 5205 dVar1: 5855 dpInt1: 655 dInt100: 1405 dInt200: 1505 cEL: cvec[5]
   pvInt: [840 841 842 843 ]
   pvFloat: [-0.447 -0.347 -0.247 -0.147 ]
   dpvFloat: [0.530 0.531 0.532 0.533 ]
- anInt1 1306 aFloat: 2600.5 pInt: 6506 pFloat: 5.13 anInt2: 3906 dInt1: 5206 dVar1: 5856 dpInt1: 656 dInt200: 1506 cEL: cvec[4]
+ anInt1 1306 aFloat: 2600.5 pInt: 6506 pFloat: 5.13 anInt2: 3906 dInt1: 5206 dVar1: 5856 dpInt1: 656 dInt100: 1406 dInt200: 1506 cEL: cvec[4]
   pvInt: [850 851 852 853 854 ]
   pvFloat: [-0.437 -0.337 -0.237 -0.137 -0.037 ]
   dpvFloat: [0.630 0.631 0.632 0.633 0.634 ]
- anInt1 1307 aFloat: 2600.6 pInt: 6507 pFloat: 6.13 anInt2: 3907 dInt1: 5207 dVar1: 5857 dpInt1: 657 dInt200: 1507 cEL: cvec[3]
+ anInt1 1307 aFloat: 2600.6 pInt: 6507 pFloat: 6.13 anInt2: 3907 dInt1: 5207 dVar1: 5857 dpInt1: 657 dInt100: 1407 dInt200: 1507 cEL: cvec[3]
   pvInt: [860 861 862 863 864 865 ]
   pvFloat: [-0.427 -0.327 -0.227 -0.127 -0.027 0.073 ]
   dpvFloat: [0.730 0.731 0.732 0.733 0.734 0.735 ]
- anInt1 1308 aFloat: 2600.7 pInt: 6508 pFloat: 7.13 anInt2: 3908 dInt1: 5208 dVar1: 5858 dpInt1: 658 dInt200: 1508 cEL: cvec[2]
+ anInt1 1308 aFloat: 2600.7 pInt: 6508 pFloat: 7.13 anInt2: 3908 dInt1: 5208 dVar1: 5858 dpInt1: 658 dInt100: 1408 dInt200: 1508 cEL: cvec[2]
   pvInt: [870 871 872 873 874 875 876 ]
   pvFloat: [-0.417 -0.317 -0.217 -0.117 -0.017 0.083 0.183 ]
   dpvFloat: [0.830 0.831 0.832 0.833 0.834 0.835 0.836 ]
- anInt1 1309 aFloat: 2600.8 pInt: 6509 pFloat: 8.13 anInt2: 3909 dInt1: 5209 dVar1: 5859 dpInt1: 659 dInt200: 1509 cEL: cvec[1]
+ anInt1 1309 aFloat: 2600.8 pInt: 6509 pFloat: 8.13 anInt2: 3909 dInt1: 5209 dVar1: 5859 dpInt1: 659 dInt100: 1409 dInt200: 1509 cEL: cvec[1]
   pvInt: [880 881 882 883 884 885 886 887 ]
   pvFloat: [-0.407 -0.307 -0.207 -0.107 -0.007 0.093 0.193 0.293 ]
   dpvFloat: [0.930 0.931 0.932 0.933 0.934 0.935 0.936 0.937 ]
- anInt1 1310 aFloat: 2600.9 pInt: 6510 pFloat: 9.13 anInt2: 3910 dInt1: 5210 dVar1: 5860 dpInt1: 660 dInt200: 1510 cEL: cvec[0]
+ anInt1 1310 aFloat: 2600.9 pInt: 6510 pFloat: 9.13 anInt2: 3910 dInt1: 5210 dVar1: 5860 dpInt1: 660 dInt100: 1410 dInt200: 1510 cEL: cvec[0]
   pvInt: [890 891 892 893 894 895 896 897 898 ]
   pvFloat: [-0.397 -0.297 -0.197 -0.097 0.003 0.103 0.203 0.303 0.403 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 13
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 13000 aFloat: 1.3 anInt2: 26000 dInt1: 39000 cEL: cvec[3] dInt200: 13600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 6501 aFloat: 7800 anInt2: 9101 dInt1: 6241 dInt200: 7301
- anInt1 6502 aFloat: 7800.1 anInt2: 9102 dInt1: 6242 dInt200: 7302
- anInt1 6503 aFloat: 7800.2 anInt2: 9103 dInt1: 6243 dInt200: 7303
- anInt1 6504 aFloat: 7800.3 anInt2: 9104 dInt1: 6244 dInt200: 7304
- anInt1 6505 aFloat: 7800.4 anInt2: 9105 dInt1: 6245 dInt200: 7305
- anInt1 6506 aFloat: 7800.5 anInt2: 9106 dInt1: 6246 dInt200: 7306
- anInt1 6507 aFloat: 7800.6 anInt2: 9107 dInt1: 6247 dInt200: 7307
- anInt1 6508 aFloat: 7800.7 anInt2: 9108 dInt1: 6248 dInt200: 7308
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 13000 aFloat: 1.3 anInt2: 26000 dInt1: 39000 cEL: cvec[3] dInt100: 13500 dInt200: 13600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 6501 aFloat: 7800 anInt2: 9101 dInt1: 6241 dInt100: 7201 dInt200: 7301
+ anInt1 6502 aFloat: 7800.1 anInt2: 9102 dInt1: 6242 dInt100: 7202 dInt200: 7302
+ anInt1 6503 aFloat: 7800.2 anInt2: 9103 dInt1: 6243 dInt100: 7203 dInt200: 7303
+ anInt1 6504 aFloat: 7800.3 anInt2: 9104 dInt1: 6244 dInt100: 7204 dInt200: 7304
+ anInt1 6505 aFloat: 7800.4 anInt2: 9105 dInt1: 6245 dInt100: 7205 dInt200: 7305
+ anInt1 6506 aFloat: 7800.5 anInt2: 9106 dInt1: 6246 dInt100: 7206 dInt200: 7306
+ anInt1 6507 aFloat: 7800.6 anInt2: 9107 dInt1: 6247 dInt100: 7207 dInt200: 7307
+ anInt1 6508 aFloat: 7800.7 anInt2: 9108 dInt1: 6248 dInt100: 7208 dInt200: 7308
 gvec aux items: anInt 
  anInt 9101
  anInt 9102
@@ -1695,118 +1613,118 @@ cvecWD 1013: 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610
 cview: 1310 1309 1308 1307 1306 1305 1304 1303 1302 1301
 hvec: 5201.5 5202.5 5203.5 5204.5 5205.5 5206.5 5207.5 5208.5 5209.5 5210.5 5211.5 5212.5 5213.5 5214.5 5215.5 5216.5 5217.5 5218.5 5219.5 5220.5
 hview: 5220.5 5219.5 5218.5 5217.5 5216.5 5215.5 5214.5 5213.5 5212.5 5211.5 5210.5 5209.5 5208.5 5207.5 5206.5 5205.5 5204.5 5203.5 5202.5 5201.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 1301 aFloat: 2600 pInt: 6501 pFloat: 0.13 anInt2: 3901 dInt1: 5201 dVar1: 5851 dpInt1: 651 dInt200: 1501 dInt250: 1901 anInt10: 390100 cEL: cvec[9]
+ anInt1 1301 aFloat: 2600 pInt: 6501 pFloat: 0.13 anInt2: 3901 dInt1: 5201 dVar1: 5851 dpInt1: 651 dInt100: 1401 dInt150: 1601 dInt200: 1501 dInt250: 1901 anInt10: 390100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1302 aFloat: 2600.1 pInt: 6502 pFloat: 1.13 anInt2: 3902 dInt1: 5202 dVar1: 5852 dpInt1: 652 dInt200: 1502 dInt250: 1902 anInt10: 390200 cEL: cvec[8]
+ anInt1 1302 aFloat: 2600.1 pInt: 6502 pFloat: 1.13 anInt2: 3902 dInt1: 5202 dVar1: 5852 dpInt1: 652 dInt100: 1402 dInt150: 1602 dInt200: 1502 dInt250: 1902 anInt10: 390200 cEL: cvec[8]
   pvInt: [810 ]
   pvFloat: [-0.477 ]
   dpvFloat: [0.230 ]
- anInt1 1303 aFloat: 2600.2 pInt: 6503 pFloat: 2.13 anInt2: 3903 dInt1: 5203 dVar1: 5853 dpInt1: 653 dInt200: 1503 dInt250: 1903 anInt10: 390300 cEL: cvec[7]
+ anInt1 1303 aFloat: 2600.2 pInt: 6503 pFloat: 2.13 anInt2: 3903 dInt1: 5203 dVar1: 5853 dpInt1: 653 dInt100: 1403 dInt150: 1603 dInt200: 1503 dInt250: 1903 anInt10: 390300 cEL: cvec[7]
   pvInt: [820 821 ]
   pvFloat: [-0.467 -0.367 ]
   dpvFloat: [0.330 0.331 ]
- anInt1 1304 aFloat: 2600.3 pInt: 6504 pFloat: 3.13 anInt2: 3904 dInt1: 5204 dVar1: 5854 dpInt1: 654 dInt200: 1504 dInt250: 1904 anInt10: 390400 cEL: cvec[6]
+ anInt1 1304 aFloat: 2600.3 pInt: 6504 pFloat: 3.13 anInt2: 3904 dInt1: 5204 dVar1: 5854 dpInt1: 654 dInt100: 1404 dInt150: 1604 dInt200: 1504 dInt250: 1904 anInt10: 390400 cEL: cvec[6]
   pvInt: [830 831 832 ]
   pvFloat: [-0.457 -0.357 -0.257 ]
   dpvFloat: [0.430 0.431 0.432 ]
- anInt1 1305 aFloat: 2600.4 pInt: 6505 pFloat: 4.13 anInt2: 3905 dInt1: 5205 dVar1: 5855 dpInt1: 655 dInt200: 1505 dInt250: 1905 anInt10: 390500 cEL: cvec[5]
+ anInt1 1305 aFloat: 2600.4 pInt: 6505 pFloat: 4.13 anInt2: 3905 dInt1: 5205 dVar1: 5855 dpInt1: 655 dInt100: 1405 dInt150: 1605 dInt200: 1505 dInt250: 1905 anInt10: 390500 cEL: cvec[5]
   pvInt: [840 841 842 843 ]
   pvFloat: [-0.447 -0.347 -0.247 -0.147 ]
   dpvFloat: [0.530 0.531 0.532 0.533 ]
- anInt1 1306 aFloat: 2600.5 pInt: 6506 pFloat: 5.13 anInt2: 3906 dInt1: 5206 dVar1: 5856 dpInt1: 656 dInt200: 1506 dInt250: 1906 anInt10: 390600 cEL: cvec[4]
+ anInt1 1306 aFloat: 2600.5 pInt: 6506 pFloat: 5.13 anInt2: 3906 dInt1: 5206 dVar1: 5856 dpInt1: 656 dInt100: 1406 dInt150: 1606 dInt200: 1506 dInt250: 1906 anInt10: 390600 cEL: cvec[4]
   pvInt: [850 851 852 853 854 ]
   pvFloat: [-0.437 -0.337 -0.237 -0.137 -0.037 ]
   dpvFloat: [0.630 0.631 0.632 0.633 0.634 ]
- anInt1 1307 aFloat: 2600.6 pInt: 6507 pFloat: 6.13 anInt2: 3907 dInt1: 5207 dVar1: 5857 dpInt1: 657 dInt200: 1507 dInt250: 1907 anInt10: 390700 cEL: cvec[3]
+ anInt1 1307 aFloat: 2600.6 pInt: 6507 pFloat: 6.13 anInt2: 3907 dInt1: 5207 dVar1: 5857 dpInt1: 657 dInt100: 1407 dInt150: 1607 dInt200: 1507 dInt250: 1907 anInt10: 390700 cEL: cvec[3]
   pvInt: [860 861 862 863 864 865 ]
   pvFloat: [-0.427 -0.327 -0.227 -0.127 -0.027 0.073 ]
   dpvFloat: [0.730 0.731 0.732 0.733 0.734 0.735 ]
- anInt1 1308 aFloat: 2600.7 pInt: 6508 pFloat: 7.13 anInt2: 3908 dInt1: 5208 dVar1: 5858 dpInt1: 658 dInt200: 1508 dInt250: 1908 anInt10: 390800 cEL: cvec[2]
+ anInt1 1308 aFloat: 2600.7 pInt: 6508 pFloat: 7.13 anInt2: 3908 dInt1: 5208 dVar1: 5858 dpInt1: 658 dInt100: 1408 dInt150: 1608 dInt200: 1508 dInt250: 1908 anInt10: 390800 cEL: cvec[2]
   pvInt: [870 871 872 873 874 875 876 ]
   pvFloat: [-0.417 -0.317 -0.217 -0.117 -0.017 0.083 0.183 ]
   dpvFloat: [0.830 0.831 0.832 0.833 0.834 0.835 0.836 ]
- anInt1 1309 aFloat: 2600.8 pInt: 6509 pFloat: 8.13 anInt2: 3909 dInt1: 5209 dVar1: 5859 dpInt1: 659 dInt200: 1509 dInt250: 1909 anInt10: 390900 cEL: cvec[1]
+ anInt1 1309 aFloat: 2600.8 pInt: 6509 pFloat: 8.13 anInt2: 3909 dInt1: 5209 dVar1: 5859 dpInt1: 659 dInt100: 1409 dInt150: 1609 dInt200: 1509 dInt250: 1909 anInt10: 390900 cEL: cvec[1]
   pvInt: [880 881 882 883 884 885 886 887 ]
   pvFloat: [-0.407 -0.307 -0.207 -0.107 -0.007 0.093 0.193 0.293 ]
   dpvFloat: [0.930 0.931 0.932 0.933 0.934 0.935 0.936 0.937 ]
- anInt1 1310 aFloat: 2600.9 pInt: 6510 pFloat: 9.13 anInt2: 3910 dInt1: 5210 dVar1: 5860 dpInt1: 660 dInt200: 1510 dInt250: 1910 anInt10: 391000 cEL: cvec[0]
+ anInt1 1310 aFloat: 2600.9 pInt: 6510 pFloat: 9.13 anInt2: 3910 dInt1: 5210 dVar1: 5860 dpInt1: 660 dInt100: 1410 dInt150: 1610 dInt200: 1510 dInt250: 1910 anInt10: 391000 cEL: cvec[0]
   pvInt: [890 891 892 893 894 895 896 897 898 ]
   pvFloat: [-0.397 -0.297 -0.197 -0.097 0.003 0.103 0.203 0.303 0.403 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 13
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 13000 aFloat: 1.3 anInt2: 26000 dInt1: 39000 cEL: cvec[3] dInt200: 13600 dInt250: 14000 anInt10: 2860000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 6501 aFloat: 7800 anInt2: 9101 dInt1: 6241 dInt200: 7301 anInt10: 2210300
- anInt1 6502 aFloat: 7800.1 anInt2: 9102 dInt1: 6242 dInt200: 7302 anInt10: 2210600
- anInt1 6503 aFloat: 7800.2 anInt2: 9103 dInt1: 6243 dInt200: 7303 anInt10: 2210900
- anInt1 6504 aFloat: 7800.3 anInt2: 9104 dInt1: 6244 dInt200: 7304 anInt10: 2211200
- anInt1 6505 aFloat: 7800.4 anInt2: 9105 dInt1: 6245 dInt200: 7305 anInt10: 2211500
- anInt1 6506 aFloat: 7800.5 anInt2: 9106 dInt1: 6246 dInt200: 7306 anInt10: 2211800
- anInt1 6507 aFloat: 7800.6 anInt2: 9107 dInt1: 6247 dInt200: 7307 anInt10: 2212100
- anInt1 6508 aFloat: 7800.7 anInt2: 9108 dInt1: 6248 dInt200: 7308 anInt10: 2212400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 13000 aFloat: 1.3 anInt2: 26000 dInt1: 39000 cEL: cvec[3] dInt100: 13500 dInt150: 13700 dInt200: 13600 dInt250: 14000 anInt10: 2860000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 6501 aFloat: 7800 anInt2: 9101 dInt1: 6241 dInt100: 7201 dInt150: 7401 dInt200: 7301 anInt10: 2210300
+ anInt1 6502 aFloat: 7800.1 anInt2: 9102 dInt1: 6242 dInt100: 7202 dInt150: 7402 dInt200: 7302 anInt10: 2210600
+ anInt1 6503 aFloat: 7800.2 anInt2: 9103 dInt1: 6243 dInt100: 7203 dInt150: 7403 dInt200: 7303 anInt10: 2210900
+ anInt1 6504 aFloat: 7800.3 anInt2: 9104 dInt1: 6244 dInt100: 7204 dInt150: 7404 dInt200: 7304 anInt10: 2211200
+ anInt1 6505 aFloat: 7800.4 anInt2: 9105 dInt1: 6245 dInt100: 7205 dInt150: 7405 dInt200: 7305 anInt10: 2211500
+ anInt1 6506 aFloat: 7800.5 anInt2: 9106 dInt1: 6246 dInt100: 7206 dInt150: 7406 dInt200: 7306 anInt10: 2211800
+ anInt1 6507 aFloat: 7800.6 anInt2: 9107 dInt1: 6247 dInt100: 7207 dInt150: 7407 dInt200: 7307 anInt10: 2212100
+ anInt1 6508 aFloat: 7800.7 anInt2: 9108 dInt1: 6248 dInt100: 7208 dInt150: 7408 dInt200: 7308 anInt10: 2212400
 scopy_cvecWD 1013: 2601(520100) 2602(520200) 2603(520300) 2604(520400) 2605(520500) 2606(520600) 2607(520700) 2608(520800) 2609(520900) 2610(521000)
 scopy_hvec: 5201.5 5202.5 5203.5 5204.5 5205.5 5206.5 5207.5 5208.5 5209.5 5210.5 5211.5 5212.5 5213.5 5214.5 5215.5 5216.5 5217.5 5218.5 5219.5 5220.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #12, run #0 13 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #13, run #0 13 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 1401 aFloat: 2800 pInt: 7001 pFloat: 0.14 anInt2: 4201 dInt1: 5601 dVar1: 6301 dpInt1: 701 dInt200: 1601 cEL: cvec[9]
+ anInt1 1401 aFloat: 2800 pInt: 7001 pFloat: 0.14 anInt2: 4201 dInt1: 5601 dVar1: 6301 dpInt1: 701 dInt100: 1501 dInt200: 1601 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1402 aFloat: 2800.1 pInt: 7002 pFloat: 1.14 anInt2: 4202 dInt1: 5602 dVar1: 6302 dpInt1: 702 dInt200: 1602 cEL: cvec[8]
+ anInt1 1402 aFloat: 2800.1 pInt: 7002 pFloat: 1.14 anInt2: 4202 dInt1: 5602 dVar1: 6302 dpInt1: 702 dInt100: 1502 dInt200: 1602 cEL: cvec[8]
   pvInt: [910 ]
   pvFloat: [-0.476 ]
   dpvFloat: [0.240 ]
- anInt1 1403 aFloat: 2800.2 pInt: 7003 pFloat: 2.14 anInt2: 4203 dInt1: 5603 dVar1: 6303 dpInt1: 703 dInt200: 1603 cEL: cvec[7]
+ anInt1 1403 aFloat: 2800.2 pInt: 7003 pFloat: 2.14 anInt2: 4203 dInt1: 5603 dVar1: 6303 dpInt1: 703 dInt100: 1503 dInt200: 1603 cEL: cvec[7]
   pvInt: [920 921 ]
   pvFloat: [-0.466 -0.366 ]
   dpvFloat: [0.340 0.341 ]
- anInt1 1404 aFloat: 2800.3 pInt: 7004 pFloat: 3.14 anInt2: 4204 dInt1: 5604 dVar1: 6304 dpInt1: 704 dInt200: 1604 cEL: cvec[6]
+ anInt1 1404 aFloat: 2800.3 pInt: 7004 pFloat: 3.14 anInt2: 4204 dInt1: 5604 dVar1: 6304 dpInt1: 704 dInt100: 1504 dInt200: 1604 cEL: cvec[6]
   pvInt: [930 931 932 ]
   pvFloat: [-0.456 -0.356 -0.256 ]
   dpvFloat: [0.440 0.441 0.442 ]
- anInt1 1405 aFloat: 2800.4 pInt: 7005 pFloat: 4.14 anInt2: 4205 dInt1: 5605 dVar1: 6305 dpInt1: 705 dInt200: 1605 cEL: cvec[5]
+ anInt1 1405 aFloat: 2800.4 pInt: 7005 pFloat: 4.14 anInt2: 4205 dInt1: 5605 dVar1: 6305 dpInt1: 705 dInt100: 1505 dInt200: 1605 cEL: cvec[5]
   pvInt: [940 941 942 943 ]
   pvFloat: [-0.446 -0.346 -0.246 -0.146 ]
   dpvFloat: [0.540 0.541 0.542 0.543 ]
- anInt1 1406 aFloat: 2800.5 pInt: 7006 pFloat: 5.14 anInt2: 4206 dInt1: 5606 dVar1: 6306 dpInt1: 706 dInt200: 1606 cEL: cvec[4]
+ anInt1 1406 aFloat: 2800.5 pInt: 7006 pFloat: 5.14 anInt2: 4206 dInt1: 5606 dVar1: 6306 dpInt1: 706 dInt100: 1506 dInt200: 1606 cEL: cvec[4]
   pvInt: [950 951 952 953 954 ]
   pvFloat: [-0.436 -0.336 -0.236 -0.136 -0.036 ]
   dpvFloat: [0.640 0.641 0.642 0.643 0.644 ]
- anInt1 1407 aFloat: 2800.6 pInt: 7007 pFloat: 6.14 anInt2: 4207 dInt1: 5607 dVar1: 6307 dpInt1: 707 dInt200: 1607 cEL: cvec[3]
+ anInt1 1407 aFloat: 2800.6 pInt: 7007 pFloat: 6.14 anInt2: 4207 dInt1: 5607 dVar1: 6307 dpInt1: 707 dInt100: 1507 dInt200: 1607 cEL: cvec[3]
   pvInt: [960 961 962 963 964 965 ]
   pvFloat: [-0.426 -0.326 -0.226 -0.126 -0.026 0.074 ]
   dpvFloat: [0.740 0.741 0.742 0.743 0.744 0.745 ]
- anInt1 1408 aFloat: 2800.7 pInt: 7008 pFloat: 7.14 anInt2: 4208 dInt1: 5608 dVar1: 6308 dpInt1: 708 dInt200: 1608 cEL: cvec[2]
+ anInt1 1408 aFloat: 2800.7 pInt: 7008 pFloat: 7.14 anInt2: 4208 dInt1: 5608 dVar1: 6308 dpInt1: 708 dInt100: 1508 dInt200: 1608 cEL: cvec[2]
   pvInt: [970 971 972 973 974 975 976 ]
   pvFloat: [-0.416 -0.316 -0.216 -0.116 -0.016 0.084 0.184 ]
   dpvFloat: [0.840 0.841 0.842 0.843 0.844 0.845 0.846 ]
- anInt1 1409 aFloat: 2800.8 pInt: 7009 pFloat: 8.14 anInt2: 4209 dInt1: 5609 dVar1: 6309 dpInt1: 709 dInt200: 1609 cEL: cvec[1]
+ anInt1 1409 aFloat: 2800.8 pInt: 7009 pFloat: 8.14 anInt2: 4209 dInt1: 5609 dVar1: 6309 dpInt1: 709 dInt100: 1509 dInt200: 1609 cEL: cvec[1]
   pvInt: [980 981 982 983 984 985 986 987 ]
   pvFloat: [-0.406 -0.306 -0.206 -0.106 -0.006 0.094 0.194 0.294 ]
   dpvFloat: [0.940 0.941 0.942 0.943 0.944 0.945 0.946 0.947 ]
- anInt1 1410 aFloat: 2800.9 pInt: 7010 pFloat: 9.14 anInt2: 4210 dInt1: 5610 dVar1: 6310 dpInt1: 710 dInt200: 1610 cEL: cvec[0]
+ anInt1 1410 aFloat: 2800.9 pInt: 7010 pFloat: 9.14 anInt2: 4210 dInt1: 5610 dVar1: 6310 dpInt1: 710 dInt100: 1510 dInt200: 1610 cEL: cvec[0]
   pvInt: [990 991 992 993 994 995 996 997 998 ]
   pvFloat: [-0.396 -0.296 -0.196 -0.096 0.004 0.104 0.204 0.304 0.404 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 14
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 14000 aFloat: 1.4 anInt2: 28000 dInt1: 42000 cEL: cvec[4] dInt200: 14600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 7001 aFloat: 8400 anInt2: 9801 dInt1: 6721 dInt200: 7801
- anInt1 7002 aFloat: 8400.1 anInt2: 9802 dInt1: 6722 dInt200: 7802
- anInt1 7003 aFloat: 8400.2 anInt2: 9803 dInt1: 6723 dInt200: 7803
- anInt1 7004 aFloat: 8400.3 anInt2: 9804 dInt1: 6724 dInt200: 7804
- anInt1 7005 aFloat: 8400.4 anInt2: 9805 dInt1: 6725 dInt200: 7805
- anInt1 7006 aFloat: 8400.5 anInt2: 9806 dInt1: 6726 dInt200: 7806
- anInt1 7007 aFloat: 8400.6 anInt2: 9807 dInt1: 6727 dInt200: 7807
- anInt1 7008 aFloat: 8400.7 anInt2: 9808 dInt1: 6728 dInt200: 7808
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 14000 aFloat: 1.4 anInt2: 28000 dInt1: 42000 cEL: cvec[4] dInt100: 14500 dInt200: 14600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 7001 aFloat: 8400 anInt2: 9801 dInt1: 6721 dInt100: 7701 dInt200: 7801
+ anInt1 7002 aFloat: 8400.1 anInt2: 9802 dInt1: 6722 dInt100: 7702 dInt200: 7802
+ anInt1 7003 aFloat: 8400.2 anInt2: 9803 dInt1: 6723 dInt100: 7703 dInt200: 7803
+ anInt1 7004 aFloat: 8400.3 anInt2: 9804 dInt1: 6724 dInt100: 7704 dInt200: 7804
+ anInt1 7005 aFloat: 8400.4 anInt2: 9805 dInt1: 6725 dInt100: 7705 dInt200: 7805
+ anInt1 7006 aFloat: 8400.5 anInt2: 9806 dInt1: 6726 dInt100: 7706 dInt200: 7806
+ anInt1 7007 aFloat: 8400.6 anInt2: 9807 dInt1: 6727 dInt100: 7707 dInt200: 7807
+ anInt1 7008 aFloat: 8400.7 anInt2: 9808 dInt1: 6728 dInt100: 7708 dInt200: 7808
 gvec aux items: anInt 
  anInt 9801
  anInt 9802
@@ -1822,118 +1740,118 @@ cvecWD 1014: 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810
 cview: 1410 1409 1408 1407 1406 1405 1404 1403 1402 1401
 hvec: 5601.5 5602.5 5603.5 5604.5 5605.5 5606.5 5607.5 5608.5 5609.5 5610.5 5611.5 5612.5 5613.5 5614.5 5615.5 5616.5 5617.5 5618.5 5619.5 5620.5
 hview: 5620.5 5619.5 5618.5 5617.5 5616.5 5615.5 5614.5 5613.5 5612.5 5611.5 5610.5 5609.5 5608.5 5607.5 5606.5 5605.5 5604.5 5603.5 5602.5 5601.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 1401 aFloat: 2800 pInt: 7001 pFloat: 0.14 anInt2: 4201 dInt1: 5601 dVar1: 6301 dpInt1: 701 dInt200: 1601 dInt250: 2001 anInt10: 420100 cEL: cvec[9]
+ anInt1 1401 aFloat: 2800 pInt: 7001 pFloat: 0.14 anInt2: 4201 dInt1: 5601 dVar1: 6301 dpInt1: 701 dInt100: 1501 dInt150: 1701 dInt200: 1601 dInt250: 2001 anInt10: 420100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1402 aFloat: 2800.1 pInt: 7002 pFloat: 1.14 anInt2: 4202 dInt1: 5602 dVar1: 6302 dpInt1: 702 dInt200: 1602 dInt250: 2002 anInt10: 420200 cEL: cvec[8]
+ anInt1 1402 aFloat: 2800.1 pInt: 7002 pFloat: 1.14 anInt2: 4202 dInt1: 5602 dVar1: 6302 dpInt1: 702 dInt100: 1502 dInt150: 1702 dInt200: 1602 dInt250: 2002 anInt10: 420200 cEL: cvec[8]
   pvInt: [910 ]
   pvFloat: [-0.476 ]
   dpvFloat: [0.240 ]
- anInt1 1403 aFloat: 2800.2 pInt: 7003 pFloat: 2.14 anInt2: 4203 dInt1: 5603 dVar1: 6303 dpInt1: 703 dInt200: 1603 dInt250: 2003 anInt10: 420300 cEL: cvec[7]
+ anInt1 1403 aFloat: 2800.2 pInt: 7003 pFloat: 2.14 anInt2: 4203 dInt1: 5603 dVar1: 6303 dpInt1: 703 dInt100: 1503 dInt150: 1703 dInt200: 1603 dInt250: 2003 anInt10: 420300 cEL: cvec[7]
   pvInt: [920 921 ]
   pvFloat: [-0.466 -0.366 ]
   dpvFloat: [0.340 0.341 ]
- anInt1 1404 aFloat: 2800.3 pInt: 7004 pFloat: 3.14 anInt2: 4204 dInt1: 5604 dVar1: 6304 dpInt1: 704 dInt200: 1604 dInt250: 2004 anInt10: 420400 cEL: cvec[6]
+ anInt1 1404 aFloat: 2800.3 pInt: 7004 pFloat: 3.14 anInt2: 4204 dInt1: 5604 dVar1: 6304 dpInt1: 704 dInt100: 1504 dInt150: 1704 dInt200: 1604 dInt250: 2004 anInt10: 420400 cEL: cvec[6]
   pvInt: [930 931 932 ]
   pvFloat: [-0.456 -0.356 -0.256 ]
   dpvFloat: [0.440 0.441 0.442 ]
- anInt1 1405 aFloat: 2800.4 pInt: 7005 pFloat: 4.14 anInt2: 4205 dInt1: 5605 dVar1: 6305 dpInt1: 705 dInt200: 1605 dInt250: 2005 anInt10: 420500 cEL: cvec[5]
+ anInt1 1405 aFloat: 2800.4 pInt: 7005 pFloat: 4.14 anInt2: 4205 dInt1: 5605 dVar1: 6305 dpInt1: 705 dInt100: 1505 dInt150: 1705 dInt200: 1605 dInt250: 2005 anInt10: 420500 cEL: cvec[5]
   pvInt: [940 941 942 943 ]
   pvFloat: [-0.446 -0.346 -0.246 -0.146 ]
   dpvFloat: [0.540 0.541 0.542 0.543 ]
- anInt1 1406 aFloat: 2800.5 pInt: 7006 pFloat: 5.14 anInt2: 4206 dInt1: 5606 dVar1: 6306 dpInt1: 706 dInt200: 1606 dInt250: 2006 anInt10: 420600 cEL: cvec[4]
+ anInt1 1406 aFloat: 2800.5 pInt: 7006 pFloat: 5.14 anInt2: 4206 dInt1: 5606 dVar1: 6306 dpInt1: 706 dInt100: 1506 dInt150: 1706 dInt200: 1606 dInt250: 2006 anInt10: 420600 cEL: cvec[4]
   pvInt: [950 951 952 953 954 ]
   pvFloat: [-0.436 -0.336 -0.236 -0.136 -0.036 ]
   dpvFloat: [0.640 0.641 0.642 0.643 0.644 ]
- anInt1 1407 aFloat: 2800.6 pInt: 7007 pFloat: 6.14 anInt2: 4207 dInt1: 5607 dVar1: 6307 dpInt1: 707 dInt200: 1607 dInt250: 2007 anInt10: 420700 cEL: cvec[3]
+ anInt1 1407 aFloat: 2800.6 pInt: 7007 pFloat: 6.14 anInt2: 4207 dInt1: 5607 dVar1: 6307 dpInt1: 707 dInt100: 1507 dInt150: 1707 dInt200: 1607 dInt250: 2007 anInt10: 420700 cEL: cvec[3]
   pvInt: [960 961 962 963 964 965 ]
   pvFloat: [-0.426 -0.326 -0.226 -0.126 -0.026 0.074 ]
   dpvFloat: [0.740 0.741 0.742 0.743 0.744 0.745 ]
- anInt1 1408 aFloat: 2800.7 pInt: 7008 pFloat: 7.14 anInt2: 4208 dInt1: 5608 dVar1: 6308 dpInt1: 708 dInt200: 1608 dInt250: 2008 anInt10: 420800 cEL: cvec[2]
+ anInt1 1408 aFloat: 2800.7 pInt: 7008 pFloat: 7.14 anInt2: 4208 dInt1: 5608 dVar1: 6308 dpInt1: 708 dInt100: 1508 dInt150: 1708 dInt200: 1608 dInt250: 2008 anInt10: 420800 cEL: cvec[2]
   pvInt: [970 971 972 973 974 975 976 ]
   pvFloat: [-0.416 -0.316 -0.216 -0.116 -0.016 0.084 0.184 ]
   dpvFloat: [0.840 0.841 0.842 0.843 0.844 0.845 0.846 ]
- anInt1 1409 aFloat: 2800.8 pInt: 7009 pFloat: 8.14 anInt2: 4209 dInt1: 5609 dVar1: 6309 dpInt1: 709 dInt200: 1609 dInt250: 2009 anInt10: 420900 cEL: cvec[1]
+ anInt1 1409 aFloat: 2800.8 pInt: 7009 pFloat: 8.14 anInt2: 4209 dInt1: 5609 dVar1: 6309 dpInt1: 709 dInt100: 1509 dInt150: 1709 dInt200: 1609 dInt250: 2009 anInt10: 420900 cEL: cvec[1]
   pvInt: [980 981 982 983 984 985 986 987 ]
   pvFloat: [-0.406 -0.306 -0.206 -0.106 -0.006 0.094 0.194 0.294 ]
   dpvFloat: [0.940 0.941 0.942 0.943 0.944 0.945 0.946 0.947 ]
- anInt1 1410 aFloat: 2800.9 pInt: 7010 pFloat: 9.14 anInt2: 4210 dInt1: 5610 dVar1: 6310 dpInt1: 710 dInt200: 1610 dInt250: 2010 anInt10: 421000 cEL: cvec[0]
+ anInt1 1410 aFloat: 2800.9 pInt: 7010 pFloat: 9.14 anInt2: 4210 dInt1: 5610 dVar1: 6310 dpInt1: 710 dInt100: 1510 dInt150: 1710 dInt200: 1610 dInt250: 2010 anInt10: 421000 cEL: cvec[0]
   pvInt: [990 991 992 993 994 995 996 997 998 ]
   pvFloat: [-0.396 -0.296 -0.196 -0.096 0.004 0.104 0.204 0.304 0.404 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 14
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 14000 aFloat: 1.4 anInt2: 28000 dInt1: 42000 cEL: cvec[4] dInt200: 14600 dInt250: 15000 anInt10: 3080000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 7001 aFloat: 8400 anInt2: 9801 dInt1: 6721 dInt200: 7801 anInt10: 2380300
- anInt1 7002 aFloat: 8400.1 anInt2: 9802 dInt1: 6722 dInt200: 7802 anInt10: 2380600
- anInt1 7003 aFloat: 8400.2 anInt2: 9803 dInt1: 6723 dInt200: 7803 anInt10: 2380900
- anInt1 7004 aFloat: 8400.3 anInt2: 9804 dInt1: 6724 dInt200: 7804 anInt10: 2381200
- anInt1 7005 aFloat: 8400.4 anInt2: 9805 dInt1: 6725 dInt200: 7805 anInt10: 2381500
- anInt1 7006 aFloat: 8400.5 anInt2: 9806 dInt1: 6726 dInt200: 7806 anInt10: 2381800
- anInt1 7007 aFloat: 8400.6 anInt2: 9807 dInt1: 6727 dInt200: 7807 anInt10: 2382100
- anInt1 7008 aFloat: 8400.7 anInt2: 9808 dInt1: 6728 dInt200: 7808 anInt10: 2382400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 14000 aFloat: 1.4 anInt2: 28000 dInt1: 42000 cEL: cvec[4] dInt100: 14500 dInt150: 14700 dInt200: 14600 dInt250: 15000 anInt10: 3080000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 7001 aFloat: 8400 anInt2: 9801 dInt1: 6721 dInt100: 7701 dInt150: 7901 dInt200: 7801 anInt10: 2380300
+ anInt1 7002 aFloat: 8400.1 anInt2: 9802 dInt1: 6722 dInt100: 7702 dInt150: 7902 dInt200: 7802 anInt10: 2380600
+ anInt1 7003 aFloat: 8400.2 anInt2: 9803 dInt1: 6723 dInt100: 7703 dInt150: 7903 dInt200: 7803 anInt10: 2380900
+ anInt1 7004 aFloat: 8400.3 anInt2: 9804 dInt1: 6724 dInt100: 7704 dInt150: 7904 dInt200: 7804 anInt10: 2381200
+ anInt1 7005 aFloat: 8400.4 anInt2: 9805 dInt1: 6725 dInt100: 7705 dInt150: 7905 dInt200: 7805 anInt10: 2381500
+ anInt1 7006 aFloat: 8400.5 anInt2: 9806 dInt1: 6726 dInt100: 7706 dInt150: 7906 dInt200: 7806 anInt10: 2381800
+ anInt1 7007 aFloat: 8400.6 anInt2: 9807 dInt1: 6727 dInt100: 7707 dInt150: 7907 dInt200: 7807 anInt10: 2382100
+ anInt1 7008 aFloat: 8400.7 anInt2: 9808 dInt1: 6728 dInt100: 7708 dInt150: 7908 dInt200: 7808 anInt10: 2382400
 scopy_cvecWD 1014: 2801(560100) 2802(560200) 2803(560300) 2804(560400) 2805(560500) 2806(560600) 2807(560700) 2808(560800) 2809(560900) 2810(561000)
 scopy_hvec: 5601.5 5602.5 5603.5 5604.5 5605.5 5606.5 5607.5 5608.5 5609.5 5610.5 5611.5 5612.5 5613.5 5614.5 5615.5 5616.5 5617.5 5618.5 5619.5 5620.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #13, run #0 14 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #14, run #0 14 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 1501 aFloat: 3000 pInt: 7501 pFloat: 0.15 anInt2: 4501 dInt1: 6001 dVar1: 6751 dpInt1: 751 dInt200: 1701 cEL: cvec[9]
+ anInt1 1501 aFloat: 3000 pInt: 7501 pFloat: 0.15 anInt2: 4501 dInt1: 6001 dVar1: 6751 dpInt1: 751 dInt100: 1601 dInt200: 1701 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1502 aFloat: 3000.1 pInt: 7502 pFloat: 1.15 anInt2: 4502 dInt1: 6002 dVar1: 6752 dpInt1: 752 dInt200: 1702 cEL: cvec[8]
+ anInt1 1502 aFloat: 3000.1 pInt: 7502 pFloat: 1.15 anInt2: 4502 dInt1: 6002 dVar1: 6752 dpInt1: 752 dInt100: 1602 dInt200: 1702 cEL: cvec[8]
   pvInt: [1010 ]
   pvFloat: [-0.475 ]
   dpvFloat: [0.250 ]
- anInt1 1503 aFloat: 3000.2 pInt: 7503 pFloat: 2.15 anInt2: 4503 dInt1: 6003 dVar1: 6753 dpInt1: 753 dInt200: 1703 cEL: cvec[7]
+ anInt1 1503 aFloat: 3000.2 pInt: 7503 pFloat: 2.15 anInt2: 4503 dInt1: 6003 dVar1: 6753 dpInt1: 753 dInt100: 1603 dInt200: 1703 cEL: cvec[7]
   pvInt: [1020 1021 ]
   pvFloat: [-0.465 -0.365 ]
   dpvFloat: [0.350 0.351 ]
- anInt1 1504 aFloat: 3000.3 pInt: 7504 pFloat: 3.15 anInt2: 4504 dInt1: 6004 dVar1: 6754 dpInt1: 754 dInt200: 1704 cEL: cvec[6]
+ anInt1 1504 aFloat: 3000.3 pInt: 7504 pFloat: 3.15 anInt2: 4504 dInt1: 6004 dVar1: 6754 dpInt1: 754 dInt100: 1604 dInt200: 1704 cEL: cvec[6]
   pvInt: [1030 1031 1032 ]
   pvFloat: [-0.455 -0.355 -0.255 ]
   dpvFloat: [0.450 0.451 0.452 ]
- anInt1 1505 aFloat: 3000.4 pInt: 7505 pFloat: 4.15 anInt2: 4505 dInt1: 6005 dVar1: 6755 dpInt1: 755 dInt200: 1705 cEL: cvec[5]
+ anInt1 1505 aFloat: 3000.4 pInt: 7505 pFloat: 4.15 anInt2: 4505 dInt1: 6005 dVar1: 6755 dpInt1: 755 dInt100: 1605 dInt200: 1705 cEL: cvec[5]
   pvInt: [1040 1041 1042 1043 ]
   pvFloat: [-0.445 -0.345 -0.245 -0.145 ]
   dpvFloat: [0.550 0.551 0.552 0.553 ]
- anInt1 1506 aFloat: 3000.5 pInt: 7506 pFloat: 5.15 anInt2: 4506 dInt1: 6006 dVar1: 6756 dpInt1: 756 dInt200: 1706 cEL: cvec[4]
+ anInt1 1506 aFloat: 3000.5 pInt: 7506 pFloat: 5.15 anInt2: 4506 dInt1: 6006 dVar1: 6756 dpInt1: 756 dInt100: 1606 dInt200: 1706 cEL: cvec[4]
   pvInt: [1050 1051 1052 1053 1054 ]
   pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 ]
   dpvFloat: [0.650 0.651 0.652 0.653 0.654 ]
- anInt1 1507 aFloat: 3000.6 pInt: 7507 pFloat: 6.15 anInt2: 4507 dInt1: 6007 dVar1: 6757 dpInt1: 757 dInt200: 1707 cEL: cvec[3]
+ anInt1 1507 aFloat: 3000.6 pInt: 7507 pFloat: 6.15 anInt2: 4507 dInt1: 6007 dVar1: 6757 dpInt1: 757 dInt100: 1607 dInt200: 1707 cEL: cvec[3]
   pvInt: [1060 1061 1062 1063 1064 1065 ]
   pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 ]
   dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 ]
- anInt1 1508 aFloat: 3000.7 pInt: 7508 pFloat: 7.15 anInt2: 4508 dInt1: 6008 dVar1: 6758 dpInt1: 758 dInt200: 1708 cEL: cvec[2]
+ anInt1 1508 aFloat: 3000.7 pInt: 7508 pFloat: 7.15 anInt2: 4508 dInt1: 6008 dVar1: 6758 dpInt1: 758 dInt100: 1608 dInt200: 1708 cEL: cvec[2]
   pvInt: [1070 1071 1072 1073 1074 1075 1076 ]
   pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 ]
   dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 ]
- anInt1 1509 aFloat: 3000.8 pInt: 7509 pFloat: 8.15 anInt2: 4509 dInt1: 6009 dVar1: 6759 dpInt1: 759 dInt200: 1709 cEL: cvec[1]
+ anInt1 1509 aFloat: 3000.8 pInt: 7509 pFloat: 8.15 anInt2: 4509 dInt1: 6009 dVar1: 6759 dpInt1: 759 dInt100: 1609 dInt200: 1709 cEL: cvec[1]
   pvInt: [1080 1081 1082 1083 1084 1085 1086 1087 ]
   pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 ]
   dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 ]
- anInt1 1510 aFloat: 3000.9 pInt: 7510 pFloat: 9.15 anInt2: 4510 dInt1: 6010 dVar1: 6760 dpInt1: 760 dInt200: 1710 cEL: cvec[0]
+ anInt1 1510 aFloat: 3000.9 pInt: 7510 pFloat: 9.15 anInt2: 4510 dInt1: 6010 dVar1: 6760 dpInt1: 760 dInt100: 1610 dInt200: 1710 cEL: cvec[0]
   pvInt: [1090 1091 1092 1093 1094 1095 1096 1097 1098 ]
   pvFloat: [-0.395 -0.295 -0.195 -0.095 0.005 0.105 0.205 0.305 0.405 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 15
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 15000 aFloat: 1.5 anInt2: 30000 dInt1: 45000 cEL: cvec[5] dInt200: 15600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 7501 aFloat: 9000 anInt2: 10501 dInt1: 7201 dInt200: 8301
- anInt1 7502 aFloat: 9000.1 anInt2: 10502 dInt1: 7202 dInt200: 8302
- anInt1 7503 aFloat: 9000.2 anInt2: 10503 dInt1: 7203 dInt200: 8303
- anInt1 7504 aFloat: 9000.3 anInt2: 10504 dInt1: 7204 dInt200: 8304
- anInt1 7505 aFloat: 9000.4 anInt2: 10505 dInt1: 7205 dInt200: 8305
- anInt1 7506 aFloat: 9000.5 anInt2: 10506 dInt1: 7206 dInt200: 8306
- anInt1 7507 aFloat: 9000.6 anInt2: 10507 dInt1: 7207 dInt200: 8307
- anInt1 7508 aFloat: 9000.7 anInt2: 10508 dInt1: 7208 dInt200: 8308
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 15000 aFloat: 1.5 anInt2: 30000 dInt1: 45000 cEL: cvec[5] dInt100: 15500 dInt200: 15600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 7501 aFloat: 9000 anInt2: 10501 dInt1: 7201 dInt100: 8201 dInt200: 8301
+ anInt1 7502 aFloat: 9000.1 anInt2: 10502 dInt1: 7202 dInt100: 8202 dInt200: 8302
+ anInt1 7503 aFloat: 9000.2 anInt2: 10503 dInt1: 7203 dInt100: 8203 dInt200: 8303
+ anInt1 7504 aFloat: 9000.3 anInt2: 10504 dInt1: 7204 dInt100: 8204 dInt200: 8304
+ anInt1 7505 aFloat: 9000.4 anInt2: 10505 dInt1: 7205 dInt100: 8205 dInt200: 8305
+ anInt1 7506 aFloat: 9000.5 anInt2: 10506 dInt1: 7206 dInt100: 8206 dInt200: 8306
+ anInt1 7507 aFloat: 9000.6 anInt2: 10507 dInt1: 7207 dInt100: 8207 dInt200: 8307
+ anInt1 7508 aFloat: 9000.7 anInt2: 10508 dInt1: 7208 dInt100: 8208 dInt200: 8308
 gvec aux items: anInt 
  anInt 10501
  anInt 10502
@@ -1949,118 +1867,118 @@ cvecWD 1015: 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010
 cview: 1510 1509 1508 1507 1506 1505 1504 1503 1502 1501
 hvec: 6001.5 6002.5 6003.5 6004.5 6005.5 6006.5 6007.5 6008.5 6009.5 6010.5 6011.5 6012.5 6013.5 6014.5 6015.5 6016.5 6017.5 6018.5 6019.5 6020.5
 hview: 6020.5 6019.5 6018.5 6017.5 6016.5 6015.5 6014.5 6013.5 6012.5 6011.5 6010.5 6009.5 6008.5 6007.5 6006.5 6005.5 6004.5 6003.5 6002.5 6001.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 1501 aFloat: 3000 pInt: 7501 pFloat: 0.15 anInt2: 4501 dInt1: 6001 dVar1: 6751 dpInt1: 751 dInt200: 1701 dInt250: 2101 anInt10: 450100 cEL: cvec[9]
+ anInt1 1501 aFloat: 3000 pInt: 7501 pFloat: 0.15 anInt2: 4501 dInt1: 6001 dVar1: 6751 dpInt1: 751 dInt100: 1601 dInt150: 1801 dInt200: 1701 dInt250: 2101 anInt10: 450100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1502 aFloat: 3000.1 pInt: 7502 pFloat: 1.15 anInt2: 4502 dInt1: 6002 dVar1: 6752 dpInt1: 752 dInt200: 1702 dInt250: 2102 anInt10: 450200 cEL: cvec[8]
+ anInt1 1502 aFloat: 3000.1 pInt: 7502 pFloat: 1.15 anInt2: 4502 dInt1: 6002 dVar1: 6752 dpInt1: 752 dInt100: 1602 dInt150: 1802 dInt200: 1702 dInt250: 2102 anInt10: 450200 cEL: cvec[8]
   pvInt: [1010 ]
   pvFloat: [-0.475 ]
   dpvFloat: [0.250 ]
- anInt1 1503 aFloat: 3000.2 pInt: 7503 pFloat: 2.15 anInt2: 4503 dInt1: 6003 dVar1: 6753 dpInt1: 753 dInt200: 1703 dInt250: 2103 anInt10: 450300 cEL: cvec[7]
+ anInt1 1503 aFloat: 3000.2 pInt: 7503 pFloat: 2.15 anInt2: 4503 dInt1: 6003 dVar1: 6753 dpInt1: 753 dInt100: 1603 dInt150: 1803 dInt200: 1703 dInt250: 2103 anInt10: 450300 cEL: cvec[7]
   pvInt: [1020 1021 ]
   pvFloat: [-0.465 -0.365 ]
   dpvFloat: [0.350 0.351 ]
- anInt1 1504 aFloat: 3000.3 pInt: 7504 pFloat: 3.15 anInt2: 4504 dInt1: 6004 dVar1: 6754 dpInt1: 754 dInt200: 1704 dInt250: 2104 anInt10: 450400 cEL: cvec[6]
+ anInt1 1504 aFloat: 3000.3 pInt: 7504 pFloat: 3.15 anInt2: 4504 dInt1: 6004 dVar1: 6754 dpInt1: 754 dInt100: 1604 dInt150: 1804 dInt200: 1704 dInt250: 2104 anInt10: 450400 cEL: cvec[6]
   pvInt: [1030 1031 1032 ]
   pvFloat: [-0.455 -0.355 -0.255 ]
   dpvFloat: [0.450 0.451 0.452 ]
- anInt1 1505 aFloat: 3000.4 pInt: 7505 pFloat: 4.15 anInt2: 4505 dInt1: 6005 dVar1: 6755 dpInt1: 755 dInt200: 1705 dInt250: 2105 anInt10: 450500 cEL: cvec[5]
+ anInt1 1505 aFloat: 3000.4 pInt: 7505 pFloat: 4.15 anInt2: 4505 dInt1: 6005 dVar1: 6755 dpInt1: 755 dInt100: 1605 dInt150: 1805 dInt200: 1705 dInt250: 2105 anInt10: 450500 cEL: cvec[5]
   pvInt: [1040 1041 1042 1043 ]
   pvFloat: [-0.445 -0.345 -0.245 -0.145 ]
   dpvFloat: [0.550 0.551 0.552 0.553 ]
- anInt1 1506 aFloat: 3000.5 pInt: 7506 pFloat: 5.15 anInt2: 4506 dInt1: 6006 dVar1: 6756 dpInt1: 756 dInt200: 1706 dInt250: 2106 anInt10: 450600 cEL: cvec[4]
+ anInt1 1506 aFloat: 3000.5 pInt: 7506 pFloat: 5.15 anInt2: 4506 dInt1: 6006 dVar1: 6756 dpInt1: 756 dInt100: 1606 dInt150: 1806 dInt200: 1706 dInt250: 2106 anInt10: 450600 cEL: cvec[4]
   pvInt: [1050 1051 1052 1053 1054 ]
   pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 ]
   dpvFloat: [0.650 0.651 0.652 0.653 0.654 ]
- anInt1 1507 aFloat: 3000.6 pInt: 7507 pFloat: 6.15 anInt2: 4507 dInt1: 6007 dVar1: 6757 dpInt1: 757 dInt200: 1707 dInt250: 2107 anInt10: 450700 cEL: cvec[3]
+ anInt1 1507 aFloat: 3000.6 pInt: 7507 pFloat: 6.15 anInt2: 4507 dInt1: 6007 dVar1: 6757 dpInt1: 757 dInt100: 1607 dInt150: 1807 dInt200: 1707 dInt250: 2107 anInt10: 450700 cEL: cvec[3]
   pvInt: [1060 1061 1062 1063 1064 1065 ]
   pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 ]
   dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 ]
- anInt1 1508 aFloat: 3000.7 pInt: 7508 pFloat: 7.15 anInt2: 4508 dInt1: 6008 dVar1: 6758 dpInt1: 758 dInt200: 1708 dInt250: 2108 anInt10: 450800 cEL: cvec[2]
+ anInt1 1508 aFloat: 3000.7 pInt: 7508 pFloat: 7.15 anInt2: 4508 dInt1: 6008 dVar1: 6758 dpInt1: 758 dInt100: 1608 dInt150: 1808 dInt200: 1708 dInt250: 2108 anInt10: 450800 cEL: cvec[2]
   pvInt: [1070 1071 1072 1073 1074 1075 1076 ]
   pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 ]
   dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 ]
- anInt1 1509 aFloat: 3000.8 pInt: 7509 pFloat: 8.15 anInt2: 4509 dInt1: 6009 dVar1: 6759 dpInt1: 759 dInt200: 1709 dInt250: 2109 anInt10: 450900 cEL: cvec[1]
+ anInt1 1509 aFloat: 3000.8 pInt: 7509 pFloat: 8.15 anInt2: 4509 dInt1: 6009 dVar1: 6759 dpInt1: 759 dInt100: 1609 dInt150: 1809 dInt200: 1709 dInt250: 2109 anInt10: 450900 cEL: cvec[1]
   pvInt: [1080 1081 1082 1083 1084 1085 1086 1087 ]
   pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 ]
   dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 ]
- anInt1 1510 aFloat: 3000.9 pInt: 7510 pFloat: 9.15 anInt2: 4510 dInt1: 6010 dVar1: 6760 dpInt1: 760 dInt200: 1710 dInt250: 2110 anInt10: 451000 cEL: cvec[0]
+ anInt1 1510 aFloat: 3000.9 pInt: 7510 pFloat: 9.15 anInt2: 4510 dInt1: 6010 dVar1: 6760 dpInt1: 760 dInt100: 1610 dInt150: 1810 dInt200: 1710 dInt250: 2110 anInt10: 451000 cEL: cvec[0]
   pvInt: [1090 1091 1092 1093 1094 1095 1096 1097 1098 ]
   pvFloat: [-0.395 -0.295 -0.195 -0.095 0.005 0.105 0.205 0.305 0.405 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 15
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 15000 aFloat: 1.5 anInt2: 30000 dInt1: 45000 cEL: cvec[5] dInt200: 15600 dInt250: 16000 anInt10: 3300000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 7501 aFloat: 9000 anInt2: 10501 dInt1: 7201 dInt200: 8301 anInt10: 2550300
- anInt1 7502 aFloat: 9000.1 anInt2: 10502 dInt1: 7202 dInt200: 8302 anInt10: 2550600
- anInt1 7503 aFloat: 9000.2 anInt2: 10503 dInt1: 7203 dInt200: 8303 anInt10: 2550900
- anInt1 7504 aFloat: 9000.3 anInt2: 10504 dInt1: 7204 dInt200: 8304 anInt10: 2551200
- anInt1 7505 aFloat: 9000.4 anInt2: 10505 dInt1: 7205 dInt200: 8305 anInt10: 2551500
- anInt1 7506 aFloat: 9000.5 anInt2: 10506 dInt1: 7206 dInt200: 8306 anInt10: 2551800
- anInt1 7507 aFloat: 9000.6 anInt2: 10507 dInt1: 7207 dInt200: 8307 anInt10: 2552100
- anInt1 7508 aFloat: 9000.7 anInt2: 10508 dInt1: 7208 dInt200: 8308 anInt10: 2552400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 15000 aFloat: 1.5 anInt2: 30000 dInt1: 45000 cEL: cvec[5] dInt100: 15500 dInt150: 15700 dInt200: 15600 dInt250: 16000 anInt10: 3300000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 7501 aFloat: 9000 anInt2: 10501 dInt1: 7201 dInt100: 8201 dInt150: 8401 dInt200: 8301 anInt10: 2550300
+ anInt1 7502 aFloat: 9000.1 anInt2: 10502 dInt1: 7202 dInt100: 8202 dInt150: 8402 dInt200: 8302 anInt10: 2550600
+ anInt1 7503 aFloat: 9000.2 anInt2: 10503 dInt1: 7203 dInt100: 8203 dInt150: 8403 dInt200: 8303 anInt10: 2550900
+ anInt1 7504 aFloat: 9000.3 anInt2: 10504 dInt1: 7204 dInt100: 8204 dInt150: 8404 dInt200: 8304 anInt10: 2551200
+ anInt1 7505 aFloat: 9000.4 anInt2: 10505 dInt1: 7205 dInt100: 8205 dInt150: 8405 dInt200: 8305 anInt10: 2551500
+ anInt1 7506 aFloat: 9000.5 anInt2: 10506 dInt1: 7206 dInt100: 8206 dInt150: 8406 dInt200: 8306 anInt10: 2551800
+ anInt1 7507 aFloat: 9000.6 anInt2: 10507 dInt1: 7207 dInt100: 8207 dInt150: 8407 dInt200: 8307 anInt10: 2552100
+ anInt1 7508 aFloat: 9000.7 anInt2: 10508 dInt1: 7208 dInt100: 8208 dInt150: 8408 dInt200: 8308 anInt10: 2552400
 scopy_cvecWD 1015: 3001(600100) 3002(600200) 3003(600300) 3004(600400) 3005(600500) 3006(600600) 3007(600700) 3008(600800) 3009(600900) 3010(601000)
 scopy_hvec: 6001.5 6002.5 6003.5 6004.5 6005.5 6006.5 6007.5 6008.5 6009.5 6010.5 6011.5 6012.5 6013.5 6014.5 6015.5 6016.5 6017.5 6018.5 6019.5 6020.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #14, run #0 15 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #15, run #0 15 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 1601 aFloat: 3200 pInt: 8001 pFloat: 0.16 anInt2: 4801 dInt1: 6401 dVar1: 7201 dpInt1: 801 dInt200: 1801 cEL: cvec[9]
+ anInt1 1601 aFloat: 3200 pInt: 8001 pFloat: 0.16 anInt2: 4801 dInt1: 6401 dVar1: 7201 dpInt1: 801 dInt100: 1701 dInt200: 1801 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1602 aFloat: 3200.1 pInt: 8002 pFloat: 1.16 anInt2: 4802 dInt1: 6402 dVar1: 7202 dpInt1: 802 dInt200: 1802 cEL: cvec[8]
+ anInt1 1602 aFloat: 3200.1 pInt: 8002 pFloat: 1.16 anInt2: 4802 dInt1: 6402 dVar1: 7202 dpInt1: 802 dInt100: 1702 dInt200: 1802 cEL: cvec[8]
   pvInt: [1110 ]
   pvFloat: [-0.474 ]
   dpvFloat: [0.260 ]
- anInt1 1603 aFloat: 3200.2 pInt: 8003 pFloat: 2.16 anInt2: 4803 dInt1: 6403 dVar1: 7203 dpInt1: 803 dInt200: 1803 cEL: cvec[7]
+ anInt1 1603 aFloat: 3200.2 pInt: 8003 pFloat: 2.16 anInt2: 4803 dInt1: 6403 dVar1: 7203 dpInt1: 803 dInt100: 1703 dInt200: 1803 cEL: cvec[7]
   pvInt: [1120 1121 ]
   pvFloat: [-0.464 -0.364 ]
   dpvFloat: [0.360 0.361 ]
- anInt1 1604 aFloat: 3200.3 pInt: 8004 pFloat: 3.16 anInt2: 4804 dInt1: 6404 dVar1: 7204 dpInt1: 804 dInt200: 1804 cEL: cvec[6]
+ anInt1 1604 aFloat: 3200.3 pInt: 8004 pFloat: 3.16 anInt2: 4804 dInt1: 6404 dVar1: 7204 dpInt1: 804 dInt100: 1704 dInt200: 1804 cEL: cvec[6]
   pvInt: [1130 1131 1132 ]
   pvFloat: [-0.454 -0.354 -0.254 ]
   dpvFloat: [0.460 0.461 0.462 ]
- anInt1 1605 aFloat: 3200.4 pInt: 8005 pFloat: 4.16 anInt2: 4805 dInt1: 6405 dVar1: 7205 dpInt1: 805 dInt200: 1805 cEL: cvec[5]
+ anInt1 1605 aFloat: 3200.4 pInt: 8005 pFloat: 4.16 anInt2: 4805 dInt1: 6405 dVar1: 7205 dpInt1: 805 dInt100: 1705 dInt200: 1805 cEL: cvec[5]
   pvInt: [1140 1141 1142 1143 ]
   pvFloat: [-0.444 -0.344 -0.244 -0.144 ]
   dpvFloat: [0.560 0.561 0.562 0.563 ]
- anInt1 1606 aFloat: 3200.5 pInt: 8006 pFloat: 5.16 anInt2: 4806 dInt1: 6406 dVar1: 7206 dpInt1: 806 dInt200: 1806 cEL: cvec[4]
+ anInt1 1606 aFloat: 3200.5 pInt: 8006 pFloat: 5.16 anInt2: 4806 dInt1: 6406 dVar1: 7206 dpInt1: 806 dInt100: 1706 dInt200: 1806 cEL: cvec[4]
   pvInt: [1150 1151 1152 1153 1154 ]
   pvFloat: [-0.434 -0.334 -0.234 -0.134 -0.034 ]
   dpvFloat: [0.660 0.661 0.662 0.663 0.664 ]
- anInt1 1607 aFloat: 3200.6 pInt: 8007 pFloat: 6.16 anInt2: 4807 dInt1: 6407 dVar1: 7207 dpInt1: 807 dInt200: 1807 cEL: cvec[3]
+ anInt1 1607 aFloat: 3200.6 pInt: 8007 pFloat: 6.16 anInt2: 4807 dInt1: 6407 dVar1: 7207 dpInt1: 807 dInt100: 1707 dInt200: 1807 cEL: cvec[3]
   pvInt: [1160 1161 1162 1163 1164 1165 ]
   pvFloat: [-0.424 -0.324 -0.224 -0.124 -0.024 0.076 ]
   dpvFloat: [0.760 0.761 0.762 0.763 0.764 0.765 ]
- anInt1 1608 aFloat: 3200.7 pInt: 8008 pFloat: 7.16 anInt2: 4808 dInt1: 6408 dVar1: 7208 dpInt1: 808 dInt200: 1808 cEL: cvec[2]
+ anInt1 1608 aFloat: 3200.7 pInt: 8008 pFloat: 7.16 anInt2: 4808 dInt1: 6408 dVar1: 7208 dpInt1: 808 dInt100: 1708 dInt200: 1808 cEL: cvec[2]
   pvInt: [1170 1171 1172 1173 1174 1175 1176 ]
   pvFloat: [-0.414 -0.314 -0.214 -0.114 -0.014 0.086 0.186 ]
   dpvFloat: [0.860 0.861 0.862 0.863 0.864 0.865 0.866 ]
- anInt1 1609 aFloat: 3200.8 pInt: 8009 pFloat: 8.16 anInt2: 4809 dInt1: 6409 dVar1: 7209 dpInt1: 809 dInt200: 1809 cEL: cvec[1]
+ anInt1 1609 aFloat: 3200.8 pInt: 8009 pFloat: 8.16 anInt2: 4809 dInt1: 6409 dVar1: 7209 dpInt1: 809 dInt100: 1709 dInt200: 1809 cEL: cvec[1]
   pvInt: [1180 1181 1182 1183 1184 1185 1186 1187 ]
   pvFloat: [-0.404 -0.304 -0.204 -0.104 -0.004 0.096 0.196 0.296 ]
   dpvFloat: [0.960 0.961 0.962 0.963 0.964 0.965 0.966 0.967 ]
- anInt1 1610 aFloat: 3200.9 pInt: 8010 pFloat: 9.16 anInt2: 4810 dInt1: 6410 dVar1: 7210 dpInt1: 810 dInt200: 1810 cEL: cvec[0]
+ anInt1 1610 aFloat: 3200.9 pInt: 8010 pFloat: 9.16 anInt2: 4810 dInt1: 6410 dVar1: 7210 dpInt1: 810 dInt100: 1710 dInt200: 1810 cEL: cvec[0]
   pvInt: [1190 1191 1192 1193 1194 1195 1196 1197 1198 ]
   pvFloat: [-0.394 -0.294 -0.194 -0.094 0.006 0.106 0.206 0.306 0.406 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 16
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 16000 aFloat: 1.6 anInt2: 32000 dInt1: 48000 cEL: cvec[6] dInt200: 16600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 8001 aFloat: 9600 anInt2: 11201 dInt1: 7681 dInt200: 8801
- anInt1 8002 aFloat: 9600.1 anInt2: 11202 dInt1: 7682 dInt200: 8802
- anInt1 8003 aFloat: 9600.2 anInt2: 11203 dInt1: 7683 dInt200: 8803
- anInt1 8004 aFloat: 9600.3 anInt2: 11204 dInt1: 7684 dInt200: 8804
- anInt1 8005 aFloat: 9600.4 anInt2: 11205 dInt1: 7685 dInt200: 8805
- anInt1 8006 aFloat: 9600.5 anInt2: 11206 dInt1: 7686 dInt200: 8806
- anInt1 8007 aFloat: 9600.6 anInt2: 11207 dInt1: 7687 dInt200: 8807
- anInt1 8008 aFloat: 9600.7 anInt2: 11208 dInt1: 7688 dInt200: 8808
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 16000 aFloat: 1.6 anInt2: 32000 dInt1: 48000 cEL: cvec[6] dInt100: 16500 dInt200: 16600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 8001 aFloat: 9600 anInt2: 11201 dInt1: 7681 dInt100: 8701 dInt200: 8801
+ anInt1 8002 aFloat: 9600.1 anInt2: 11202 dInt1: 7682 dInt100: 8702 dInt200: 8802
+ anInt1 8003 aFloat: 9600.2 anInt2: 11203 dInt1: 7683 dInt100: 8703 dInt200: 8803
+ anInt1 8004 aFloat: 9600.3 anInt2: 11204 dInt1: 7684 dInt100: 8704 dInt200: 8804
+ anInt1 8005 aFloat: 9600.4 anInt2: 11205 dInt1: 7685 dInt100: 8705 dInt200: 8805
+ anInt1 8006 aFloat: 9600.5 anInt2: 11206 dInt1: 7686 dInt100: 8706 dInt200: 8806
+ anInt1 8007 aFloat: 9600.6 anInt2: 11207 dInt1: 7687 dInt100: 8707 dInt200: 8807
+ anInt1 8008 aFloat: 9600.7 anInt2: 11208 dInt1: 7688 dInt100: 8708 dInt200: 8808
 gvec aux items: anInt 
  anInt 11201
  anInt 11202
@@ -2076,118 +1994,118 @@ cvecWD 1016: 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210
 cview: 1610 1609 1608 1607 1606 1605 1604 1603 1602 1601
 hvec: 6401.5 6402.5 6403.5 6404.5 6405.5 6406.5 6407.5 6408.5 6409.5 6410.5 6411.5 6412.5 6413.5 6414.5 6415.5 6416.5 6417.5 6418.5 6419.5 6420.5
 hview: 6420.5 6419.5 6418.5 6417.5 6416.5 6415.5 6414.5 6413.5 6412.5 6411.5 6410.5 6409.5 6408.5 6407.5 6406.5 6405.5 6404.5 6403.5 6402.5 6401.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 1601 aFloat: 3200 pInt: 8001 pFloat: 0.16 anInt2: 4801 dInt1: 6401 dVar1: 7201 dpInt1: 801 dInt200: 1801 dInt250: 2201 anInt10: 480100 cEL: cvec[9]
+ anInt1 1601 aFloat: 3200 pInt: 8001 pFloat: 0.16 anInt2: 4801 dInt1: 6401 dVar1: 7201 dpInt1: 801 dInt100: 1701 dInt150: 1901 dInt200: 1801 dInt250: 2201 anInt10: 480100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1602 aFloat: 3200.1 pInt: 8002 pFloat: 1.16 anInt2: 4802 dInt1: 6402 dVar1: 7202 dpInt1: 802 dInt200: 1802 dInt250: 2202 anInt10: 480200 cEL: cvec[8]
+ anInt1 1602 aFloat: 3200.1 pInt: 8002 pFloat: 1.16 anInt2: 4802 dInt1: 6402 dVar1: 7202 dpInt1: 802 dInt100: 1702 dInt150: 1902 dInt200: 1802 dInt250: 2202 anInt10: 480200 cEL: cvec[8]
   pvInt: [1110 ]
   pvFloat: [-0.474 ]
   dpvFloat: [0.260 ]
- anInt1 1603 aFloat: 3200.2 pInt: 8003 pFloat: 2.16 anInt2: 4803 dInt1: 6403 dVar1: 7203 dpInt1: 803 dInt200: 1803 dInt250: 2203 anInt10: 480300 cEL: cvec[7]
+ anInt1 1603 aFloat: 3200.2 pInt: 8003 pFloat: 2.16 anInt2: 4803 dInt1: 6403 dVar1: 7203 dpInt1: 803 dInt100: 1703 dInt150: 1903 dInt200: 1803 dInt250: 2203 anInt10: 480300 cEL: cvec[7]
   pvInt: [1120 1121 ]
   pvFloat: [-0.464 -0.364 ]
   dpvFloat: [0.360 0.361 ]
- anInt1 1604 aFloat: 3200.3 pInt: 8004 pFloat: 3.16 anInt2: 4804 dInt1: 6404 dVar1: 7204 dpInt1: 804 dInt200: 1804 dInt250: 2204 anInt10: 480400 cEL: cvec[6]
+ anInt1 1604 aFloat: 3200.3 pInt: 8004 pFloat: 3.16 anInt2: 4804 dInt1: 6404 dVar1: 7204 dpInt1: 804 dInt100: 1704 dInt150: 1904 dInt200: 1804 dInt250: 2204 anInt10: 480400 cEL: cvec[6]
   pvInt: [1130 1131 1132 ]
   pvFloat: [-0.454 -0.354 -0.254 ]
   dpvFloat: [0.460 0.461 0.462 ]
- anInt1 1605 aFloat: 3200.4 pInt: 8005 pFloat: 4.16 anInt2: 4805 dInt1: 6405 dVar1: 7205 dpInt1: 805 dInt200: 1805 dInt250: 2205 anInt10: 480500 cEL: cvec[5]
+ anInt1 1605 aFloat: 3200.4 pInt: 8005 pFloat: 4.16 anInt2: 4805 dInt1: 6405 dVar1: 7205 dpInt1: 805 dInt100: 1705 dInt150: 1905 dInt200: 1805 dInt250: 2205 anInt10: 480500 cEL: cvec[5]
   pvInt: [1140 1141 1142 1143 ]
   pvFloat: [-0.444 -0.344 -0.244 -0.144 ]
   dpvFloat: [0.560 0.561 0.562 0.563 ]
- anInt1 1606 aFloat: 3200.5 pInt: 8006 pFloat: 5.16 anInt2: 4806 dInt1: 6406 dVar1: 7206 dpInt1: 806 dInt200: 1806 dInt250: 2206 anInt10: 480600 cEL: cvec[4]
+ anInt1 1606 aFloat: 3200.5 pInt: 8006 pFloat: 5.16 anInt2: 4806 dInt1: 6406 dVar1: 7206 dpInt1: 806 dInt100: 1706 dInt150: 1906 dInt200: 1806 dInt250: 2206 anInt10: 480600 cEL: cvec[4]
   pvInt: [1150 1151 1152 1153 1154 ]
   pvFloat: [-0.434 -0.334 -0.234 -0.134 -0.034 ]
   dpvFloat: [0.660 0.661 0.662 0.663 0.664 ]
- anInt1 1607 aFloat: 3200.6 pInt: 8007 pFloat: 6.16 anInt2: 4807 dInt1: 6407 dVar1: 7207 dpInt1: 807 dInt200: 1807 dInt250: 2207 anInt10: 480700 cEL: cvec[3]
+ anInt1 1607 aFloat: 3200.6 pInt: 8007 pFloat: 6.16 anInt2: 4807 dInt1: 6407 dVar1: 7207 dpInt1: 807 dInt100: 1707 dInt150: 1907 dInt200: 1807 dInt250: 2207 anInt10: 480700 cEL: cvec[3]
   pvInt: [1160 1161 1162 1163 1164 1165 ]
   pvFloat: [-0.424 -0.324 -0.224 -0.124 -0.024 0.076 ]
   dpvFloat: [0.760 0.761 0.762 0.763 0.764 0.765 ]
- anInt1 1608 aFloat: 3200.7 pInt: 8008 pFloat: 7.16 anInt2: 4808 dInt1: 6408 dVar1: 7208 dpInt1: 808 dInt200: 1808 dInt250: 2208 anInt10: 480800 cEL: cvec[2]
+ anInt1 1608 aFloat: 3200.7 pInt: 8008 pFloat: 7.16 anInt2: 4808 dInt1: 6408 dVar1: 7208 dpInt1: 808 dInt100: 1708 dInt150: 1908 dInt200: 1808 dInt250: 2208 anInt10: 480800 cEL: cvec[2]
   pvInt: [1170 1171 1172 1173 1174 1175 1176 ]
   pvFloat: [-0.414 -0.314 -0.214 -0.114 -0.014 0.086 0.186 ]
   dpvFloat: [0.860 0.861 0.862 0.863 0.864 0.865 0.866 ]
- anInt1 1609 aFloat: 3200.8 pInt: 8009 pFloat: 8.16 anInt2: 4809 dInt1: 6409 dVar1: 7209 dpInt1: 809 dInt200: 1809 dInt250: 2209 anInt10: 480900 cEL: cvec[1]
+ anInt1 1609 aFloat: 3200.8 pInt: 8009 pFloat: 8.16 anInt2: 4809 dInt1: 6409 dVar1: 7209 dpInt1: 809 dInt100: 1709 dInt150: 1909 dInt200: 1809 dInt250: 2209 anInt10: 480900 cEL: cvec[1]
   pvInt: [1180 1181 1182 1183 1184 1185 1186 1187 ]
   pvFloat: [-0.404 -0.304 -0.204 -0.104 -0.004 0.096 0.196 0.296 ]
   dpvFloat: [0.960 0.961 0.962 0.963 0.964 0.965 0.966 0.967 ]
- anInt1 1610 aFloat: 3200.9 pInt: 8010 pFloat: 9.16 anInt2: 4810 dInt1: 6410 dVar1: 7210 dpInt1: 810 dInt200: 1810 dInt250: 2210 anInt10: 481000 cEL: cvec[0]
+ anInt1 1610 aFloat: 3200.9 pInt: 8010 pFloat: 9.16 anInt2: 4810 dInt1: 6410 dVar1: 7210 dpInt1: 810 dInt100: 1710 dInt150: 1910 dInt200: 1810 dInt250: 2210 anInt10: 481000 cEL: cvec[0]
   pvInt: [1190 1191 1192 1193 1194 1195 1196 1197 1198 ]
   pvFloat: [-0.394 -0.294 -0.194 -0.094 0.006 0.106 0.206 0.306 0.406 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 16
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 16000 aFloat: 1.6 anInt2: 32000 dInt1: 48000 cEL: cvec[6] dInt200: 16600 dInt250: 17000 anInt10: 3520000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 8001 aFloat: 9600 anInt2: 11201 dInt1: 7681 dInt200: 8801 anInt10: 2720300
- anInt1 8002 aFloat: 9600.1 anInt2: 11202 dInt1: 7682 dInt200: 8802 anInt10: 2720600
- anInt1 8003 aFloat: 9600.2 anInt2: 11203 dInt1: 7683 dInt200: 8803 anInt10: 2720900
- anInt1 8004 aFloat: 9600.3 anInt2: 11204 dInt1: 7684 dInt200: 8804 anInt10: 2721200
- anInt1 8005 aFloat: 9600.4 anInt2: 11205 dInt1: 7685 dInt200: 8805 anInt10: 2721500
- anInt1 8006 aFloat: 9600.5 anInt2: 11206 dInt1: 7686 dInt200: 8806 anInt10: 2721800
- anInt1 8007 aFloat: 9600.6 anInt2: 11207 dInt1: 7687 dInt200: 8807 anInt10: 2722100
- anInt1 8008 aFloat: 9600.7 anInt2: 11208 dInt1: 7688 dInt200: 8808 anInt10: 2722400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 16000 aFloat: 1.6 anInt2: 32000 dInt1: 48000 cEL: cvec[6] dInt100: 16500 dInt150: 16700 dInt200: 16600 dInt250: 17000 anInt10: 3520000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 8001 aFloat: 9600 anInt2: 11201 dInt1: 7681 dInt100: 8701 dInt150: 8901 dInt200: 8801 anInt10: 2720300
+ anInt1 8002 aFloat: 9600.1 anInt2: 11202 dInt1: 7682 dInt100: 8702 dInt150: 8902 dInt200: 8802 anInt10: 2720600
+ anInt1 8003 aFloat: 9600.2 anInt2: 11203 dInt1: 7683 dInt100: 8703 dInt150: 8903 dInt200: 8803 anInt10: 2720900
+ anInt1 8004 aFloat: 9600.3 anInt2: 11204 dInt1: 7684 dInt100: 8704 dInt150: 8904 dInt200: 8804 anInt10: 2721200
+ anInt1 8005 aFloat: 9600.4 anInt2: 11205 dInt1: 7685 dInt100: 8705 dInt150: 8905 dInt200: 8805 anInt10: 2721500
+ anInt1 8006 aFloat: 9600.5 anInt2: 11206 dInt1: 7686 dInt100: 8706 dInt150: 8906 dInt200: 8806 anInt10: 2721800
+ anInt1 8007 aFloat: 9600.6 anInt2: 11207 dInt1: 7687 dInt100: 8707 dInt150: 8907 dInt200: 8807 anInt10: 2722100
+ anInt1 8008 aFloat: 9600.7 anInt2: 11208 dInt1: 7688 dInt100: 8708 dInt150: 8908 dInt200: 8808 anInt10: 2722400
 scopy_cvecWD 1016: 3201(640100) 3202(640200) 3203(640300) 3204(640400) 3205(640500) 3206(640600) 3207(640700) 3208(640800) 3209(640900) 3210(641000)
 scopy_hvec: 6401.5 6402.5 6403.5 6404.5 6405.5 6406.5 6407.5 6408.5 6409.5 6410.5 6411.5 6412.5 6413.5 6414.5 6415.5 6416.5 6417.5 6418.5 6419.5 6420.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #15, run #0 16 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #16, run #0 16 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 1701 aFloat: 3400 pInt: 8501 pFloat: 0.17 anInt2: 5101 dInt1: 6801 dVar1: 7651 dpInt1: 851 dInt200: 1901 cEL: cvec[9]
+ anInt1 1701 aFloat: 3400 pInt: 8501 pFloat: 0.17 anInt2: 5101 dInt1: 6801 dVar1: 7651 dpInt1: 851 dInt100: 1801 dInt200: 1901 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1702 aFloat: 3400.1 pInt: 8502 pFloat: 1.17 anInt2: 5102 dInt1: 6802 dVar1: 7652 dpInt1: 852 dInt200: 1902 cEL: cvec[8]
+ anInt1 1702 aFloat: 3400.1 pInt: 8502 pFloat: 1.17 anInt2: 5102 dInt1: 6802 dVar1: 7652 dpInt1: 852 dInt100: 1802 dInt200: 1902 cEL: cvec[8]
   pvInt: [1210 ]
   pvFloat: [-0.473 ]
   dpvFloat: [0.270 ]
- anInt1 1703 aFloat: 3400.2 pInt: 8503 pFloat: 2.17 anInt2: 5103 dInt1: 6803 dVar1: 7653 dpInt1: 853 dInt200: 1903 cEL: cvec[7]
+ anInt1 1703 aFloat: 3400.2 pInt: 8503 pFloat: 2.17 anInt2: 5103 dInt1: 6803 dVar1: 7653 dpInt1: 853 dInt100: 1803 dInt200: 1903 cEL: cvec[7]
   pvInt: [1220 1221 ]
   pvFloat: [-0.463 -0.363 ]
   dpvFloat: [0.370 0.371 ]
- anInt1 1704 aFloat: 3400.3 pInt: 8504 pFloat: 3.17 anInt2: 5104 dInt1: 6804 dVar1: 7654 dpInt1: 854 dInt200: 1904 cEL: cvec[6]
+ anInt1 1704 aFloat: 3400.3 pInt: 8504 pFloat: 3.17 anInt2: 5104 dInt1: 6804 dVar1: 7654 dpInt1: 854 dInt100: 1804 dInt200: 1904 cEL: cvec[6]
   pvInt: [1230 1231 1232 ]
   pvFloat: [-0.453 -0.353 -0.253 ]
   dpvFloat: [0.470 0.471 0.472 ]
- anInt1 1705 aFloat: 3400.4 pInt: 8505 pFloat: 4.17 anInt2: 5105 dInt1: 6805 dVar1: 7655 dpInt1: 855 dInt200: 1905 cEL: cvec[5]
+ anInt1 1705 aFloat: 3400.4 pInt: 8505 pFloat: 4.17 anInt2: 5105 dInt1: 6805 dVar1: 7655 dpInt1: 855 dInt100: 1805 dInt200: 1905 cEL: cvec[5]
   pvInt: [1240 1241 1242 1243 ]
   pvFloat: [-0.443 -0.343 -0.243 -0.143 ]
   dpvFloat: [0.570 0.571 0.572 0.573 ]
- anInt1 1706 aFloat: 3400.5 pInt: 8506 pFloat: 5.17 anInt2: 5106 dInt1: 6806 dVar1: 7656 dpInt1: 856 dInt200: 1906 cEL: cvec[4]
+ anInt1 1706 aFloat: 3400.5 pInt: 8506 pFloat: 5.17 anInt2: 5106 dInt1: 6806 dVar1: 7656 dpInt1: 856 dInt100: 1806 dInt200: 1906 cEL: cvec[4]
   pvInt: [1250 1251 1252 1253 1254 ]
   pvFloat: [-0.433 -0.333 -0.233 -0.133 -0.033 ]
   dpvFloat: [0.670 0.671 0.672 0.673 0.674 ]
- anInt1 1707 aFloat: 3400.6 pInt: 8507 pFloat: 6.17 anInt2: 5107 dInt1: 6807 dVar1: 7657 dpInt1: 857 dInt200: 1907 cEL: cvec[3]
+ anInt1 1707 aFloat: 3400.6 pInt: 8507 pFloat: 6.17 anInt2: 5107 dInt1: 6807 dVar1: 7657 dpInt1: 857 dInt100: 1807 dInt200: 1907 cEL: cvec[3]
   pvInt: [1260 1261 1262 1263 1264 1265 ]
   pvFloat: [-0.423 -0.323 -0.223 -0.123 -0.023 0.077 ]
   dpvFloat: [0.770 0.771 0.772 0.773 0.774 0.775 ]
- anInt1 1708 aFloat: 3400.7 pInt: 8508 pFloat: 7.17 anInt2: 5108 dInt1: 6808 dVar1: 7658 dpInt1: 858 dInt200: 1908 cEL: cvec[2]
+ anInt1 1708 aFloat: 3400.7 pInt: 8508 pFloat: 7.17 anInt2: 5108 dInt1: 6808 dVar1: 7658 dpInt1: 858 dInt100: 1808 dInt200: 1908 cEL: cvec[2]
   pvInt: [1270 1271 1272 1273 1274 1275 1276 ]
   pvFloat: [-0.413 -0.313 -0.213 -0.113 -0.013 0.087 0.187 ]
   dpvFloat: [0.870 0.871 0.872 0.873 0.874 0.875 0.876 ]
- anInt1 1709 aFloat: 3400.8 pInt: 8509 pFloat: 8.17 anInt2: 5109 dInt1: 6809 dVar1: 7659 dpInt1: 859 dInt200: 1909 cEL: cvec[1]
+ anInt1 1709 aFloat: 3400.8 pInt: 8509 pFloat: 8.17 anInt2: 5109 dInt1: 6809 dVar1: 7659 dpInt1: 859 dInt100: 1809 dInt200: 1909 cEL: cvec[1]
   pvInt: [1280 1281 1282 1283 1284 1285 1286 1287 ]
   pvFloat: [-0.403 -0.303 -0.203 -0.103 -0.003 0.097 0.197 0.297 ]
   dpvFloat: [0.970 0.971 0.972 0.973 0.974 0.975 0.976 0.977 ]
- anInt1 1710 aFloat: 3400.9 pInt: 8510 pFloat: 9.17 anInt2: 5110 dInt1: 6810 dVar1: 7660 dpInt1: 860 dInt200: 1910 cEL: cvec[0]
+ anInt1 1710 aFloat: 3400.9 pInt: 8510 pFloat: 9.17 anInt2: 5110 dInt1: 6810 dVar1: 7660 dpInt1: 860 dInt100: 1810 dInt200: 1910 cEL: cvec[0]
   pvInt: [1290 1291 1292 1293 1294 1295 1296 1297 1298 ]
   pvFloat: [-0.393 -0.293 -0.193 -0.093 0.007 0.107 0.207 0.307 0.407 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 17
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 17000 aFloat: 1.7 anInt2: 34000 dInt1: 51000 cEL: cvec[7] dInt200: 17600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 8501 aFloat: 10200 anInt2: 11901 dInt1: 8161 dInt200: 9301
- anInt1 8502 aFloat: 10200.1 anInt2: 11902 dInt1: 8162 dInt200: 9302
- anInt1 8503 aFloat: 10200.2 anInt2: 11903 dInt1: 8163 dInt200: 9303
- anInt1 8504 aFloat: 10200.3 anInt2: 11904 dInt1: 8164 dInt200: 9304
- anInt1 8505 aFloat: 10200.4 anInt2: 11905 dInt1: 8165 dInt200: 9305
- anInt1 8506 aFloat: 10200.5 anInt2: 11906 dInt1: 8166 dInt200: 9306
- anInt1 8507 aFloat: 10200.6 anInt2: 11907 dInt1: 8167 dInt200: 9307
- anInt1 8508 aFloat: 10200.7 anInt2: 11908 dInt1: 8168 dInt200: 9308
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 17000 aFloat: 1.7 anInt2: 34000 dInt1: 51000 cEL: cvec[7] dInt100: 17500 dInt200: 17600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 8501 aFloat: 10200 anInt2: 11901 dInt1: 8161 dInt100: 9201 dInt200: 9301
+ anInt1 8502 aFloat: 10200.1 anInt2: 11902 dInt1: 8162 dInt100: 9202 dInt200: 9302
+ anInt1 8503 aFloat: 10200.2 anInt2: 11903 dInt1: 8163 dInt100: 9203 dInt200: 9303
+ anInt1 8504 aFloat: 10200.3 anInt2: 11904 dInt1: 8164 dInt100: 9204 dInt200: 9304
+ anInt1 8505 aFloat: 10200.4 anInt2: 11905 dInt1: 8165 dInt100: 9205 dInt200: 9305
+ anInt1 8506 aFloat: 10200.5 anInt2: 11906 dInt1: 8166 dInt100: 9206 dInt200: 9306
+ anInt1 8507 aFloat: 10200.6 anInt2: 11907 dInt1: 8167 dInt100: 9207 dInt200: 9307
+ anInt1 8508 aFloat: 10200.7 anInt2: 11908 dInt1: 8168 dInt100: 9208 dInt200: 9308
 gvec aux items: anInt 
  anInt 11901
  anInt 11902
@@ -2203,118 +2121,118 @@ cvecWD 1017: 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410
 cview: 1710 1709 1708 1707 1706 1705 1704 1703 1702 1701
 hvec: 6801.5 6802.5 6803.5 6804.5 6805.5 6806.5 6807.5 6808.5 6809.5 6810.5 6811.5 6812.5 6813.5 6814.5 6815.5 6816.5 6817.5 6818.5 6819.5 6820.5
 hview: 6820.5 6819.5 6818.5 6817.5 6816.5 6815.5 6814.5 6813.5 6812.5 6811.5 6810.5 6809.5 6808.5 6807.5 6806.5 6805.5 6804.5 6803.5 6802.5 6801.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 1701 aFloat: 3400 pInt: 8501 pFloat: 0.17 anInt2: 5101 dInt1: 6801 dVar1: 7651 dpInt1: 851 dInt200: 1901 dInt250: 2301 anInt10: 510100 cEL: cvec[9]
+ anInt1 1701 aFloat: 3400 pInt: 8501 pFloat: 0.17 anInt2: 5101 dInt1: 6801 dVar1: 7651 dpInt1: 851 dInt100: 1801 dInt150: 2001 dInt200: 1901 dInt250: 2301 anInt10: 510100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1702 aFloat: 3400.1 pInt: 8502 pFloat: 1.17 anInt2: 5102 dInt1: 6802 dVar1: 7652 dpInt1: 852 dInt200: 1902 dInt250: 2302 anInt10: 510200 cEL: cvec[8]
+ anInt1 1702 aFloat: 3400.1 pInt: 8502 pFloat: 1.17 anInt2: 5102 dInt1: 6802 dVar1: 7652 dpInt1: 852 dInt100: 1802 dInt150: 2002 dInt200: 1902 dInt250: 2302 anInt10: 510200 cEL: cvec[8]
   pvInt: [1210 ]
   pvFloat: [-0.473 ]
   dpvFloat: [0.270 ]
- anInt1 1703 aFloat: 3400.2 pInt: 8503 pFloat: 2.17 anInt2: 5103 dInt1: 6803 dVar1: 7653 dpInt1: 853 dInt200: 1903 dInt250: 2303 anInt10: 510300 cEL: cvec[7]
+ anInt1 1703 aFloat: 3400.2 pInt: 8503 pFloat: 2.17 anInt2: 5103 dInt1: 6803 dVar1: 7653 dpInt1: 853 dInt100: 1803 dInt150: 2003 dInt200: 1903 dInt250: 2303 anInt10: 510300 cEL: cvec[7]
   pvInt: [1220 1221 ]
   pvFloat: [-0.463 -0.363 ]
   dpvFloat: [0.370 0.371 ]
- anInt1 1704 aFloat: 3400.3 pInt: 8504 pFloat: 3.17 anInt2: 5104 dInt1: 6804 dVar1: 7654 dpInt1: 854 dInt200: 1904 dInt250: 2304 anInt10: 510400 cEL: cvec[6]
+ anInt1 1704 aFloat: 3400.3 pInt: 8504 pFloat: 3.17 anInt2: 5104 dInt1: 6804 dVar1: 7654 dpInt1: 854 dInt100: 1804 dInt150: 2004 dInt200: 1904 dInt250: 2304 anInt10: 510400 cEL: cvec[6]
   pvInt: [1230 1231 1232 ]
   pvFloat: [-0.453 -0.353 -0.253 ]
   dpvFloat: [0.470 0.471 0.472 ]
- anInt1 1705 aFloat: 3400.4 pInt: 8505 pFloat: 4.17 anInt2: 5105 dInt1: 6805 dVar1: 7655 dpInt1: 855 dInt200: 1905 dInt250: 2305 anInt10: 510500 cEL: cvec[5]
+ anInt1 1705 aFloat: 3400.4 pInt: 8505 pFloat: 4.17 anInt2: 5105 dInt1: 6805 dVar1: 7655 dpInt1: 855 dInt100: 1805 dInt150: 2005 dInt200: 1905 dInt250: 2305 anInt10: 510500 cEL: cvec[5]
   pvInt: [1240 1241 1242 1243 ]
   pvFloat: [-0.443 -0.343 -0.243 -0.143 ]
   dpvFloat: [0.570 0.571 0.572 0.573 ]
- anInt1 1706 aFloat: 3400.5 pInt: 8506 pFloat: 5.17 anInt2: 5106 dInt1: 6806 dVar1: 7656 dpInt1: 856 dInt200: 1906 dInt250: 2306 anInt10: 510600 cEL: cvec[4]
+ anInt1 1706 aFloat: 3400.5 pInt: 8506 pFloat: 5.17 anInt2: 5106 dInt1: 6806 dVar1: 7656 dpInt1: 856 dInt100: 1806 dInt150: 2006 dInt200: 1906 dInt250: 2306 anInt10: 510600 cEL: cvec[4]
   pvInt: [1250 1251 1252 1253 1254 ]
   pvFloat: [-0.433 -0.333 -0.233 -0.133 -0.033 ]
   dpvFloat: [0.670 0.671 0.672 0.673 0.674 ]
- anInt1 1707 aFloat: 3400.6 pInt: 8507 pFloat: 6.17 anInt2: 5107 dInt1: 6807 dVar1: 7657 dpInt1: 857 dInt200: 1907 dInt250: 2307 anInt10: 510700 cEL: cvec[3]
+ anInt1 1707 aFloat: 3400.6 pInt: 8507 pFloat: 6.17 anInt2: 5107 dInt1: 6807 dVar1: 7657 dpInt1: 857 dInt100: 1807 dInt150: 2007 dInt200: 1907 dInt250: 2307 anInt10: 510700 cEL: cvec[3]
   pvInt: [1260 1261 1262 1263 1264 1265 ]
   pvFloat: [-0.423 -0.323 -0.223 -0.123 -0.023 0.077 ]
   dpvFloat: [0.770 0.771 0.772 0.773 0.774 0.775 ]
- anInt1 1708 aFloat: 3400.7 pInt: 8508 pFloat: 7.17 anInt2: 5108 dInt1: 6808 dVar1: 7658 dpInt1: 858 dInt200: 1908 dInt250: 2308 anInt10: 510800 cEL: cvec[2]
+ anInt1 1708 aFloat: 3400.7 pInt: 8508 pFloat: 7.17 anInt2: 5108 dInt1: 6808 dVar1: 7658 dpInt1: 858 dInt100: 1808 dInt150: 2008 dInt200: 1908 dInt250: 2308 anInt10: 510800 cEL: cvec[2]
   pvInt: [1270 1271 1272 1273 1274 1275 1276 ]
   pvFloat: [-0.413 -0.313 -0.213 -0.113 -0.013 0.087 0.187 ]
   dpvFloat: [0.870 0.871 0.872 0.873 0.874 0.875 0.876 ]
- anInt1 1709 aFloat: 3400.8 pInt: 8509 pFloat: 8.17 anInt2: 5109 dInt1: 6809 dVar1: 7659 dpInt1: 859 dInt200: 1909 dInt250: 2309 anInt10: 510900 cEL: cvec[1]
+ anInt1 1709 aFloat: 3400.8 pInt: 8509 pFloat: 8.17 anInt2: 5109 dInt1: 6809 dVar1: 7659 dpInt1: 859 dInt100: 1809 dInt150: 2009 dInt200: 1909 dInt250: 2309 anInt10: 510900 cEL: cvec[1]
   pvInt: [1280 1281 1282 1283 1284 1285 1286 1287 ]
   pvFloat: [-0.403 -0.303 -0.203 -0.103 -0.003 0.097 0.197 0.297 ]
   dpvFloat: [0.970 0.971 0.972 0.973 0.974 0.975 0.976 0.977 ]
- anInt1 1710 aFloat: 3400.9 pInt: 8510 pFloat: 9.17 anInt2: 5110 dInt1: 6810 dVar1: 7660 dpInt1: 860 dInt200: 1910 dInt250: 2310 anInt10: 511000 cEL: cvec[0]
+ anInt1 1710 aFloat: 3400.9 pInt: 8510 pFloat: 9.17 anInt2: 5110 dInt1: 6810 dVar1: 7660 dpInt1: 860 dInt100: 1810 dInt150: 2010 dInt200: 1910 dInt250: 2310 anInt10: 511000 cEL: cvec[0]
   pvInt: [1290 1291 1292 1293 1294 1295 1296 1297 1298 ]
   pvFloat: [-0.393 -0.293 -0.193 -0.093 0.007 0.107 0.207 0.307 0.407 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 17
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 17000 aFloat: 1.7 anInt2: 34000 dInt1: 51000 cEL: cvec[7] dInt200: 17600 dInt250: 18000 anInt10: 3740000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 8501 aFloat: 10200 anInt2: 11901 dInt1: 8161 dInt200: 9301 anInt10: 2890300
- anInt1 8502 aFloat: 10200.1 anInt2: 11902 dInt1: 8162 dInt200: 9302 anInt10: 2890600
- anInt1 8503 aFloat: 10200.2 anInt2: 11903 dInt1: 8163 dInt200: 9303 anInt10: 2890900
- anInt1 8504 aFloat: 10200.3 anInt2: 11904 dInt1: 8164 dInt200: 9304 anInt10: 2891200
- anInt1 8505 aFloat: 10200.4 anInt2: 11905 dInt1: 8165 dInt200: 9305 anInt10: 2891500
- anInt1 8506 aFloat: 10200.5 anInt2: 11906 dInt1: 8166 dInt200: 9306 anInt10: 2891800
- anInt1 8507 aFloat: 10200.6 anInt2: 11907 dInt1: 8167 dInt200: 9307 anInt10: 2892100
- anInt1 8508 aFloat: 10200.7 anInt2: 11908 dInt1: 8168 dInt200: 9308 anInt10: 2892400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 17000 aFloat: 1.7 anInt2: 34000 dInt1: 51000 cEL: cvec[7] dInt100: 17500 dInt150: 17700 dInt200: 17600 dInt250: 18000 anInt10: 3740000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 8501 aFloat: 10200 anInt2: 11901 dInt1: 8161 dInt100: 9201 dInt150: 9401 dInt200: 9301 anInt10: 2890300
+ anInt1 8502 aFloat: 10200.1 anInt2: 11902 dInt1: 8162 dInt100: 9202 dInt150: 9402 dInt200: 9302 anInt10: 2890600
+ anInt1 8503 aFloat: 10200.2 anInt2: 11903 dInt1: 8163 dInt100: 9203 dInt150: 9403 dInt200: 9303 anInt10: 2890900
+ anInt1 8504 aFloat: 10200.3 anInt2: 11904 dInt1: 8164 dInt100: 9204 dInt150: 9404 dInt200: 9304 anInt10: 2891200
+ anInt1 8505 aFloat: 10200.4 anInt2: 11905 dInt1: 8165 dInt100: 9205 dInt150: 9405 dInt200: 9305 anInt10: 2891500
+ anInt1 8506 aFloat: 10200.5 anInt2: 11906 dInt1: 8166 dInt100: 9206 dInt150: 9406 dInt200: 9306 anInt10: 2891800
+ anInt1 8507 aFloat: 10200.6 anInt2: 11907 dInt1: 8167 dInt100: 9207 dInt150: 9407 dInt200: 9307 anInt10: 2892100
+ anInt1 8508 aFloat: 10200.7 anInt2: 11908 dInt1: 8168 dInt100: 9208 dInt150: 9408 dInt200: 9308 anInt10: 2892400
 scopy_cvecWD 1017: 3401(680100) 3402(680200) 3403(680300) 3404(680400) 3405(680500) 3406(680600) 3407(680700) 3408(680800) 3409(680900) 3410(681000)
 scopy_hvec: 6801.5 6802.5 6803.5 6804.5 6805.5 6806.5 6807.5 6808.5 6809.5 6810.5 6811.5 6812.5 6813.5 6814.5 6815.5 6816.5 6817.5 6818.5 6819.5 6820.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #16, run #0 17 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #17, run #0 17 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 1801 aFloat: 3600 pInt: 9001 pFloat: 0.18 anInt2: 5401 dInt1: 7201 dVar1: 8101 dpInt1: 901 dInt200: 2001 cEL: cvec[9]
+ anInt1 1801 aFloat: 3600 pInt: 9001 pFloat: 0.18 anInt2: 5401 dInt1: 7201 dVar1: 8101 dpInt1: 901 dInt100: 1901 dInt200: 2001 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1802 aFloat: 3600.1 pInt: 9002 pFloat: 1.18 anInt2: 5402 dInt1: 7202 dVar1: 8102 dpInt1: 902 dInt200: 2002 cEL: cvec[8]
+ anInt1 1802 aFloat: 3600.1 pInt: 9002 pFloat: 1.18 anInt2: 5402 dInt1: 7202 dVar1: 8102 dpInt1: 902 dInt100: 1902 dInt200: 2002 cEL: cvec[8]
   pvInt: [1310 ]
   pvFloat: [-0.472 ]
   dpvFloat: [0.280 ]
- anInt1 1803 aFloat: 3600.2 pInt: 9003 pFloat: 2.18 anInt2: 5403 dInt1: 7203 dVar1: 8103 dpInt1: 903 dInt200: 2003 cEL: cvec[7]
+ anInt1 1803 aFloat: 3600.2 pInt: 9003 pFloat: 2.18 anInt2: 5403 dInt1: 7203 dVar1: 8103 dpInt1: 903 dInt100: 1903 dInt200: 2003 cEL: cvec[7]
   pvInt: [1320 1321 ]
   pvFloat: [-0.462 -0.362 ]
   dpvFloat: [0.380 0.381 ]
- anInt1 1804 aFloat: 3600.3 pInt: 9004 pFloat: 3.18 anInt2: 5404 dInt1: 7204 dVar1: 8104 dpInt1: 904 dInt200: 2004 cEL: cvec[6]
+ anInt1 1804 aFloat: 3600.3 pInt: 9004 pFloat: 3.18 anInt2: 5404 dInt1: 7204 dVar1: 8104 dpInt1: 904 dInt100: 1904 dInt200: 2004 cEL: cvec[6]
   pvInt: [1330 1331 1332 ]
   pvFloat: [-0.452 -0.352 -0.252 ]
   dpvFloat: [0.480 0.481 0.482 ]
- anInt1 1805 aFloat: 3600.4 pInt: 9005 pFloat: 4.18 anInt2: 5405 dInt1: 7205 dVar1: 8105 dpInt1: 905 dInt200: 2005 cEL: cvec[5]
+ anInt1 1805 aFloat: 3600.4 pInt: 9005 pFloat: 4.18 anInt2: 5405 dInt1: 7205 dVar1: 8105 dpInt1: 905 dInt100: 1905 dInt200: 2005 cEL: cvec[5]
   pvInt: [1340 1341 1342 1343 ]
   pvFloat: [-0.442 -0.342 -0.242 -0.142 ]
   dpvFloat: [0.580 0.581 0.582 0.583 ]
- anInt1 1806 aFloat: 3600.5 pInt: 9006 pFloat: 5.18 anInt2: 5406 dInt1: 7206 dVar1: 8106 dpInt1: 906 dInt200: 2006 cEL: cvec[4]
+ anInt1 1806 aFloat: 3600.5 pInt: 9006 pFloat: 5.18 anInt2: 5406 dInt1: 7206 dVar1: 8106 dpInt1: 906 dInt100: 1906 dInt200: 2006 cEL: cvec[4]
   pvInt: [1350 1351 1352 1353 1354 ]
   pvFloat: [-0.432 -0.332 -0.232 -0.132 -0.032 ]
   dpvFloat: [0.680 0.681 0.682 0.683 0.684 ]
- anInt1 1807 aFloat: 3600.6 pInt: 9007 pFloat: 6.18 anInt2: 5407 dInt1: 7207 dVar1: 8107 dpInt1: 907 dInt200: 2007 cEL: cvec[3]
+ anInt1 1807 aFloat: 3600.6 pInt: 9007 pFloat: 6.18 anInt2: 5407 dInt1: 7207 dVar1: 8107 dpInt1: 907 dInt100: 1907 dInt200: 2007 cEL: cvec[3]
   pvInt: [1360 1361 1362 1363 1364 1365 ]
   pvFloat: [-0.422 -0.322 -0.222 -0.122 -0.022 0.078 ]
   dpvFloat: [0.780 0.781 0.782 0.783 0.784 0.785 ]
- anInt1 1808 aFloat: 3600.7 pInt: 9008 pFloat: 7.18 anInt2: 5408 dInt1: 7208 dVar1: 8108 dpInt1: 908 dInt200: 2008 cEL: cvec[2]
+ anInt1 1808 aFloat: 3600.7 pInt: 9008 pFloat: 7.18 anInt2: 5408 dInt1: 7208 dVar1: 8108 dpInt1: 908 dInt100: 1908 dInt200: 2008 cEL: cvec[2]
   pvInt: [1370 1371 1372 1373 1374 1375 1376 ]
   pvFloat: [-0.412 -0.312 -0.212 -0.112 -0.012 0.088 0.188 ]
   dpvFloat: [0.880 0.881 0.882 0.883 0.884 0.885 0.886 ]
- anInt1 1809 aFloat: 3600.8 pInt: 9009 pFloat: 8.18 anInt2: 5409 dInt1: 7209 dVar1: 8109 dpInt1: 909 dInt200: 2009 cEL: cvec[1]
+ anInt1 1809 aFloat: 3600.8 pInt: 9009 pFloat: 8.18 anInt2: 5409 dInt1: 7209 dVar1: 8109 dpInt1: 909 dInt100: 1909 dInt200: 2009 cEL: cvec[1]
   pvInt: [1380 1381 1382 1383 1384 1385 1386 1387 ]
   pvFloat: [-0.402 -0.302 -0.202 -0.102 -0.002 0.098 0.198 0.298 ]
   dpvFloat: [0.980 0.981 0.982 0.983 0.984 0.985 0.986 0.987 ]
- anInt1 1810 aFloat: 3600.9 pInt: 9010 pFloat: 9.18 anInt2: 5410 dInt1: 7210 dVar1: 8110 dpInt1: 910 dInt200: 2010 cEL: cvec[0]
+ anInt1 1810 aFloat: 3600.9 pInt: 9010 pFloat: 9.18 anInt2: 5410 dInt1: 7210 dVar1: 8110 dpInt1: 910 dInt100: 1910 dInt200: 2010 cEL: cvec[0]
   pvInt: [1390 1391 1392 1393 1394 1395 1396 1397 1398 ]
   pvFloat: [-0.392 -0.292 -0.192 -0.092 0.008 0.108 0.208 0.308 0.408 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 18
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 18000 aFloat: 1.8 anInt2: 36000 dInt1: 54000 cEL: cvec[8] dInt200: 18600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 9001 aFloat: 10800 anInt2: 12601 dInt1: 8641 dInt200: 9801
- anInt1 9002 aFloat: 10800.1 anInt2: 12602 dInt1: 8642 dInt200: 9802
- anInt1 9003 aFloat: 10800.2 anInt2: 12603 dInt1: 8643 dInt200: 9803
- anInt1 9004 aFloat: 10800.3 anInt2: 12604 dInt1: 8644 dInt200: 9804
- anInt1 9005 aFloat: 10800.4 anInt2: 12605 dInt1: 8645 dInt200: 9805
- anInt1 9006 aFloat: 10800.5 anInt2: 12606 dInt1: 8646 dInt200: 9806
- anInt1 9007 aFloat: 10800.6 anInt2: 12607 dInt1: 8647 dInt200: 9807
- anInt1 9008 aFloat: 10800.7 anInt2: 12608 dInt1: 8648 dInt200: 9808
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 18000 aFloat: 1.8 anInt2: 36000 dInt1: 54000 cEL: cvec[8] dInt100: 18500 dInt200: 18600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 9001 aFloat: 10800 anInt2: 12601 dInt1: 8641 dInt100: 9701 dInt200: 9801
+ anInt1 9002 aFloat: 10800.1 anInt2: 12602 dInt1: 8642 dInt100: 9702 dInt200: 9802
+ anInt1 9003 aFloat: 10800.2 anInt2: 12603 dInt1: 8643 dInt100: 9703 dInt200: 9803
+ anInt1 9004 aFloat: 10800.3 anInt2: 12604 dInt1: 8644 dInt100: 9704 dInt200: 9804
+ anInt1 9005 aFloat: 10800.4 anInt2: 12605 dInt1: 8645 dInt100: 9705 dInt200: 9805
+ anInt1 9006 aFloat: 10800.5 anInt2: 12606 dInt1: 8646 dInt100: 9706 dInt200: 9806
+ anInt1 9007 aFloat: 10800.6 anInt2: 12607 dInt1: 8647 dInt100: 9707 dInt200: 9807
+ anInt1 9008 aFloat: 10800.7 anInt2: 12608 dInt1: 8648 dInt100: 9708 dInt200: 9808
 gvec aux items: anInt 
  anInt 12601
  anInt 12602
@@ -2330,118 +2248,118 @@ cvecWD 1018: 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610
 cview: 1810 1809 1808 1807 1806 1805 1804 1803 1802 1801
 hvec: 7201.5 7202.5 7203.5 7204.5 7205.5 7206.5 7207.5 7208.5 7209.5 7210.5 7211.5 7212.5 7213.5 7214.5 7215.5 7216.5 7217.5 7218.5 7219.5 7220.5
 hview: 7220.5 7219.5 7218.5 7217.5 7216.5 7215.5 7214.5 7213.5 7212.5 7211.5 7210.5 7209.5 7208.5 7207.5 7206.5 7205.5 7204.5 7203.5 7202.5 7201.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 1801 aFloat: 3600 pInt: 9001 pFloat: 0.18 anInt2: 5401 dInt1: 7201 dVar1: 8101 dpInt1: 901 dInt200: 2001 dInt250: 2401 anInt10: 540100 cEL: cvec[9]
+ anInt1 1801 aFloat: 3600 pInt: 9001 pFloat: 0.18 anInt2: 5401 dInt1: 7201 dVar1: 8101 dpInt1: 901 dInt100: 1901 dInt150: 2101 dInt200: 2001 dInt250: 2401 anInt10: 540100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1802 aFloat: 3600.1 pInt: 9002 pFloat: 1.18 anInt2: 5402 dInt1: 7202 dVar1: 8102 dpInt1: 902 dInt200: 2002 dInt250: 2402 anInt10: 540200 cEL: cvec[8]
+ anInt1 1802 aFloat: 3600.1 pInt: 9002 pFloat: 1.18 anInt2: 5402 dInt1: 7202 dVar1: 8102 dpInt1: 902 dInt100: 1902 dInt150: 2102 dInt200: 2002 dInt250: 2402 anInt10: 540200 cEL: cvec[8]
   pvInt: [1310 ]
   pvFloat: [-0.472 ]
   dpvFloat: [0.280 ]
- anInt1 1803 aFloat: 3600.2 pInt: 9003 pFloat: 2.18 anInt2: 5403 dInt1: 7203 dVar1: 8103 dpInt1: 903 dInt200: 2003 dInt250: 2403 anInt10: 540300 cEL: cvec[7]
+ anInt1 1803 aFloat: 3600.2 pInt: 9003 pFloat: 2.18 anInt2: 5403 dInt1: 7203 dVar1: 8103 dpInt1: 903 dInt100: 1903 dInt150: 2103 dInt200: 2003 dInt250: 2403 anInt10: 540300 cEL: cvec[7]
   pvInt: [1320 1321 ]
   pvFloat: [-0.462 -0.362 ]
   dpvFloat: [0.380 0.381 ]
- anInt1 1804 aFloat: 3600.3 pInt: 9004 pFloat: 3.18 anInt2: 5404 dInt1: 7204 dVar1: 8104 dpInt1: 904 dInt200: 2004 dInt250: 2404 anInt10: 540400 cEL: cvec[6]
+ anInt1 1804 aFloat: 3600.3 pInt: 9004 pFloat: 3.18 anInt2: 5404 dInt1: 7204 dVar1: 8104 dpInt1: 904 dInt100: 1904 dInt150: 2104 dInt200: 2004 dInt250: 2404 anInt10: 540400 cEL: cvec[6]
   pvInt: [1330 1331 1332 ]
   pvFloat: [-0.452 -0.352 -0.252 ]
   dpvFloat: [0.480 0.481 0.482 ]
- anInt1 1805 aFloat: 3600.4 pInt: 9005 pFloat: 4.18 anInt2: 5405 dInt1: 7205 dVar1: 8105 dpInt1: 905 dInt200: 2005 dInt250: 2405 anInt10: 540500 cEL: cvec[5]
+ anInt1 1805 aFloat: 3600.4 pInt: 9005 pFloat: 4.18 anInt2: 5405 dInt1: 7205 dVar1: 8105 dpInt1: 905 dInt100: 1905 dInt150: 2105 dInt200: 2005 dInt250: 2405 anInt10: 540500 cEL: cvec[5]
   pvInt: [1340 1341 1342 1343 ]
   pvFloat: [-0.442 -0.342 -0.242 -0.142 ]
   dpvFloat: [0.580 0.581 0.582 0.583 ]
- anInt1 1806 aFloat: 3600.5 pInt: 9006 pFloat: 5.18 anInt2: 5406 dInt1: 7206 dVar1: 8106 dpInt1: 906 dInt200: 2006 dInt250: 2406 anInt10: 540600 cEL: cvec[4]
+ anInt1 1806 aFloat: 3600.5 pInt: 9006 pFloat: 5.18 anInt2: 5406 dInt1: 7206 dVar1: 8106 dpInt1: 906 dInt100: 1906 dInt150: 2106 dInt200: 2006 dInt250: 2406 anInt10: 540600 cEL: cvec[4]
   pvInt: [1350 1351 1352 1353 1354 ]
   pvFloat: [-0.432 -0.332 -0.232 -0.132 -0.032 ]
   dpvFloat: [0.680 0.681 0.682 0.683 0.684 ]
- anInt1 1807 aFloat: 3600.6 pInt: 9007 pFloat: 6.18 anInt2: 5407 dInt1: 7207 dVar1: 8107 dpInt1: 907 dInt200: 2007 dInt250: 2407 anInt10: 540700 cEL: cvec[3]
+ anInt1 1807 aFloat: 3600.6 pInt: 9007 pFloat: 6.18 anInt2: 5407 dInt1: 7207 dVar1: 8107 dpInt1: 907 dInt100: 1907 dInt150: 2107 dInt200: 2007 dInt250: 2407 anInt10: 540700 cEL: cvec[3]
   pvInt: [1360 1361 1362 1363 1364 1365 ]
   pvFloat: [-0.422 -0.322 -0.222 -0.122 -0.022 0.078 ]
   dpvFloat: [0.780 0.781 0.782 0.783 0.784 0.785 ]
- anInt1 1808 aFloat: 3600.7 pInt: 9008 pFloat: 7.18 anInt2: 5408 dInt1: 7208 dVar1: 8108 dpInt1: 908 dInt200: 2008 dInt250: 2408 anInt10: 540800 cEL: cvec[2]
+ anInt1 1808 aFloat: 3600.7 pInt: 9008 pFloat: 7.18 anInt2: 5408 dInt1: 7208 dVar1: 8108 dpInt1: 908 dInt100: 1908 dInt150: 2108 dInt200: 2008 dInt250: 2408 anInt10: 540800 cEL: cvec[2]
   pvInt: [1370 1371 1372 1373 1374 1375 1376 ]
   pvFloat: [-0.412 -0.312 -0.212 -0.112 -0.012 0.088 0.188 ]
   dpvFloat: [0.880 0.881 0.882 0.883 0.884 0.885 0.886 ]
- anInt1 1809 aFloat: 3600.8 pInt: 9009 pFloat: 8.18 anInt2: 5409 dInt1: 7209 dVar1: 8109 dpInt1: 909 dInt200: 2009 dInt250: 2409 anInt10: 540900 cEL: cvec[1]
+ anInt1 1809 aFloat: 3600.8 pInt: 9009 pFloat: 8.18 anInt2: 5409 dInt1: 7209 dVar1: 8109 dpInt1: 909 dInt100: 1909 dInt150: 2109 dInt200: 2009 dInt250: 2409 anInt10: 540900 cEL: cvec[1]
   pvInt: [1380 1381 1382 1383 1384 1385 1386 1387 ]
   pvFloat: [-0.402 -0.302 -0.202 -0.102 -0.002 0.098 0.198 0.298 ]
   dpvFloat: [0.980 0.981 0.982 0.983 0.984 0.985 0.986 0.987 ]
- anInt1 1810 aFloat: 3600.9 pInt: 9010 pFloat: 9.18 anInt2: 5410 dInt1: 7210 dVar1: 8110 dpInt1: 910 dInt200: 2010 dInt250: 2410 anInt10: 541000 cEL: cvec[0]
+ anInt1 1810 aFloat: 3600.9 pInt: 9010 pFloat: 9.18 anInt2: 5410 dInt1: 7210 dVar1: 8110 dpInt1: 910 dInt100: 1910 dInt150: 2110 dInt200: 2010 dInt250: 2410 anInt10: 541000 cEL: cvec[0]
   pvInt: [1390 1391 1392 1393 1394 1395 1396 1397 1398 ]
   pvFloat: [-0.392 -0.292 -0.192 -0.092 0.008 0.108 0.208 0.308 0.408 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 18
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 18000 aFloat: 1.8 anInt2: 36000 dInt1: 54000 cEL: cvec[8] dInt200: 18600 dInt250: 19000 anInt10: 3960000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 9001 aFloat: 10800 anInt2: 12601 dInt1: 8641 dInt200: 9801 anInt10: 3060300
- anInt1 9002 aFloat: 10800.1 anInt2: 12602 dInt1: 8642 dInt200: 9802 anInt10: 3060600
- anInt1 9003 aFloat: 10800.2 anInt2: 12603 dInt1: 8643 dInt200: 9803 anInt10: 3060900
- anInt1 9004 aFloat: 10800.3 anInt2: 12604 dInt1: 8644 dInt200: 9804 anInt10: 3061200
- anInt1 9005 aFloat: 10800.4 anInt2: 12605 dInt1: 8645 dInt200: 9805 anInt10: 3061500
- anInt1 9006 aFloat: 10800.5 anInt2: 12606 dInt1: 8646 dInt200: 9806 anInt10: 3061800
- anInt1 9007 aFloat: 10800.6 anInt2: 12607 dInt1: 8647 dInt200: 9807 anInt10: 3062100
- anInt1 9008 aFloat: 10800.7 anInt2: 12608 dInt1: 8648 dInt200: 9808 anInt10: 3062400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 18000 aFloat: 1.8 anInt2: 36000 dInt1: 54000 cEL: cvec[8] dInt100: 18500 dInt150: 18700 dInt200: 18600 dInt250: 19000 anInt10: 3960000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 9001 aFloat: 10800 anInt2: 12601 dInt1: 8641 dInt100: 9701 dInt150: 9901 dInt200: 9801 anInt10: 3060300
+ anInt1 9002 aFloat: 10800.1 anInt2: 12602 dInt1: 8642 dInt100: 9702 dInt150: 9902 dInt200: 9802 anInt10: 3060600
+ anInt1 9003 aFloat: 10800.2 anInt2: 12603 dInt1: 8643 dInt100: 9703 dInt150: 9903 dInt200: 9803 anInt10: 3060900
+ anInt1 9004 aFloat: 10800.3 anInt2: 12604 dInt1: 8644 dInt100: 9704 dInt150: 9904 dInt200: 9804 anInt10: 3061200
+ anInt1 9005 aFloat: 10800.4 anInt2: 12605 dInt1: 8645 dInt100: 9705 dInt150: 9905 dInt200: 9805 anInt10: 3061500
+ anInt1 9006 aFloat: 10800.5 anInt2: 12606 dInt1: 8646 dInt100: 9706 dInt150: 9906 dInt200: 9806 anInt10: 3061800
+ anInt1 9007 aFloat: 10800.6 anInt2: 12607 dInt1: 8647 dInt100: 9707 dInt150: 9907 dInt200: 9807 anInt10: 3062100
+ anInt1 9008 aFloat: 10800.7 anInt2: 12608 dInt1: 8648 dInt100: 9708 dInt150: 9908 dInt200: 9808 anInt10: 3062400
 scopy_cvecWD 1018: 3601(720100) 3602(720200) 3603(720300) 3604(720400) 3605(720500) 3606(720600) 3607(720700) 3608(720800) 3609(720900) 3610(721000)
 scopy_hvec: 7201.5 7202.5 7203.5 7204.5 7205.5 7206.5 7207.5 7208.5 7209.5 7210.5 7211.5 7212.5 7213.5 7214.5 7215.5 7216.5 7217.5 7218.5 7219.5 7220.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #17, run #0 18 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #18, run #0 18 events processed so far  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 1901 aFloat: 3800 pInt: 9501 pFloat: 0.19 anInt2: 5701 dInt1: 7601 dVar1: 8551 dpInt1: 951 dInt200: 2101 cEL: cvec[9]
+ anInt1 1901 aFloat: 3800 pInt: 9501 pFloat: 0.19 anInt2: 5701 dInt1: 7601 dVar1: 8551 dpInt1: 951 dInt100: 2001 dInt200: 2101 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1902 aFloat: 3800.1 pInt: 9502 pFloat: 1.19 anInt2: 5702 dInt1: 7602 dVar1: 8552 dpInt1: 952 dInt200: 2102 cEL: cvec[8]
+ anInt1 1902 aFloat: 3800.1 pInt: 9502 pFloat: 1.19 anInt2: 5702 dInt1: 7602 dVar1: 8552 dpInt1: 952 dInt100: 2002 dInt200: 2102 cEL: cvec[8]
   pvInt: [1410 ]
   pvFloat: [-0.471 ]
   dpvFloat: [0.290 ]
- anInt1 1903 aFloat: 3800.2 pInt: 9503 pFloat: 2.19 anInt2: 5703 dInt1: 7603 dVar1: 8553 dpInt1: 953 dInt200: 2103 cEL: cvec[7]
+ anInt1 1903 aFloat: 3800.2 pInt: 9503 pFloat: 2.19 anInt2: 5703 dInt1: 7603 dVar1: 8553 dpInt1: 953 dInt100: 2003 dInt200: 2103 cEL: cvec[7]
   pvInt: [1420 1421 ]
   pvFloat: [-0.461 -0.361 ]
   dpvFloat: [0.390 0.391 ]
- anInt1 1904 aFloat: 3800.3 pInt: 9504 pFloat: 3.19 anInt2: 5704 dInt1: 7604 dVar1: 8554 dpInt1: 954 dInt200: 2104 cEL: cvec[6]
+ anInt1 1904 aFloat: 3800.3 pInt: 9504 pFloat: 3.19 anInt2: 5704 dInt1: 7604 dVar1: 8554 dpInt1: 954 dInt100: 2004 dInt200: 2104 cEL: cvec[6]
   pvInt: [1430 1431 1432 ]
   pvFloat: [-0.451 -0.351 -0.251 ]
   dpvFloat: [0.490 0.491 0.492 ]
- anInt1 1905 aFloat: 3800.4 pInt: 9505 pFloat: 4.19 anInt2: 5705 dInt1: 7605 dVar1: 8555 dpInt1: 955 dInt200: 2105 cEL: cvec[5]
+ anInt1 1905 aFloat: 3800.4 pInt: 9505 pFloat: 4.19 anInt2: 5705 dInt1: 7605 dVar1: 8555 dpInt1: 955 dInt100: 2005 dInt200: 2105 cEL: cvec[5]
   pvInt: [1440 1441 1442 1443 ]
   pvFloat: [-0.441 -0.341 -0.241 -0.141 ]
   dpvFloat: [0.590 0.591 0.592 0.593 ]
- anInt1 1906 aFloat: 3800.5 pInt: 9506 pFloat: 5.19 anInt2: 5706 dInt1: 7606 dVar1: 8556 dpInt1: 956 dInt200: 2106 cEL: cvec[4]
+ anInt1 1906 aFloat: 3800.5 pInt: 9506 pFloat: 5.19 anInt2: 5706 dInt1: 7606 dVar1: 8556 dpInt1: 956 dInt100: 2006 dInt200: 2106 cEL: cvec[4]
   pvInt: [1450 1451 1452 1453 1454 ]
   pvFloat: [-0.431 -0.331 -0.231 -0.131 -0.031 ]
   dpvFloat: [0.690 0.691 0.692 0.693 0.694 ]
- anInt1 1907 aFloat: 3800.6 pInt: 9507 pFloat: 6.19 anInt2: 5707 dInt1: 7607 dVar1: 8557 dpInt1: 957 dInt200: 2107 cEL: cvec[3]
+ anInt1 1907 aFloat: 3800.6 pInt: 9507 pFloat: 6.19 anInt2: 5707 dInt1: 7607 dVar1: 8557 dpInt1: 957 dInt100: 2007 dInt200: 2107 cEL: cvec[3]
   pvInt: [1460 1461 1462 1463 1464 1465 ]
   pvFloat: [-0.421 -0.321 -0.221 -0.121 -0.021 0.079 ]
   dpvFloat: [0.790 0.791 0.792 0.793 0.794 0.795 ]
- anInt1 1908 aFloat: 3800.7 pInt: 9508 pFloat: 7.19 anInt2: 5708 dInt1: 7608 dVar1: 8558 dpInt1: 958 dInt200: 2108 cEL: cvec[2]
+ anInt1 1908 aFloat: 3800.7 pInt: 9508 pFloat: 7.19 anInt2: 5708 dInt1: 7608 dVar1: 8558 dpInt1: 958 dInt100: 2008 dInt200: 2108 cEL: cvec[2]
   pvInt: [1470 1471 1472 1473 1474 1475 1476 ]
   pvFloat: [-0.411 -0.311 -0.211 -0.111 -0.011 0.089 0.189 ]
   dpvFloat: [0.890 0.891 0.892 0.893 0.894 0.895 0.896 ]
- anInt1 1909 aFloat: 3800.8 pInt: 9509 pFloat: 8.19 anInt2: 5709 dInt1: 7609 dVar1: 8559 dpInt1: 959 dInt200: 2109 cEL: cvec[1]
+ anInt1 1909 aFloat: 3800.8 pInt: 9509 pFloat: 8.19 anInt2: 5709 dInt1: 7609 dVar1: 8559 dpInt1: 959 dInt100: 2009 dInt200: 2109 cEL: cvec[1]
   pvInt: [1480 1481 1482 1483 1484 1485 1486 1487 ]
   pvFloat: [-0.401 -0.301 -0.201 -0.101 -0.001 0.099 0.199 0.299 ]
   dpvFloat: [0.990 0.991 0.992 0.993 0.994 0.995 0.996 0.997 ]
- anInt1 1910 aFloat: 3800.9 pInt: 9510 pFloat: 9.19 anInt2: 5710 dInt1: 7610 dVar1: 8560 dpInt1: 960 dInt200: 2110 cEL: cvec[0]
+ anInt1 1910 aFloat: 3800.9 pInt: 9510 pFloat: 9.19 anInt2: 5710 dInt1: 7610 dVar1: 8560 dpInt1: 960 dInt100: 2010 dInt200: 2110 cEL: cvec[0]
   pvInt: [1490 1491 1492 1493 1494 1495 1496 1497 1498 ]
   pvFloat: [-0.391 -0.291 -0.191 -0.091 0.009 0.109 0.209 0.309 0.409 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 19
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 19000 aFloat: 1.9 anInt2: 38000 dInt1: 57000 cEL: cvec[9] dInt200: 19600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 9501 aFloat: 11400 anInt2: 13301 dInt1: 9121 dInt200: 10301
- anInt1 9502 aFloat: 11400.1 anInt2: 13302 dInt1: 9122 dInt200: 10302
- anInt1 9503 aFloat: 11400.2 anInt2: 13303 dInt1: 9123 dInt200: 10303
- anInt1 9504 aFloat: 11400.3 anInt2: 13304 dInt1: 9124 dInt200: 10304
- anInt1 9505 aFloat: 11400.4 anInt2: 13305 dInt1: 9125 dInt200: 10305
- anInt1 9506 aFloat: 11400.5 anInt2: 13306 dInt1: 9126 dInt200: 10306
- anInt1 9507 aFloat: 11400.6 anInt2: 13307 dInt1: 9127 dInt200: 10307
- anInt1 9508 aFloat: 11400.7 anInt2: 13308 dInt1: 9128 dInt200: 10308
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 19000 aFloat: 1.9 anInt2: 38000 dInt1: 57000 cEL: cvec[9] dInt100: 19500 dInt200: 19600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 9501 aFloat: 11400 anInt2: 13301 dInt1: 9121 dInt100: 10201 dInt200: 10301
+ anInt1 9502 aFloat: 11400.1 anInt2: 13302 dInt1: 9122 dInt100: 10202 dInt200: 10302
+ anInt1 9503 aFloat: 11400.2 anInt2: 13303 dInt1: 9123 dInt100: 10203 dInt200: 10303
+ anInt1 9504 aFloat: 11400.3 anInt2: 13304 dInt1: 9124 dInt100: 10204 dInt200: 10304
+ anInt1 9505 aFloat: 11400.4 anInt2: 13305 dInt1: 9125 dInt100: 10205 dInt200: 10305
+ anInt1 9506 aFloat: 11400.5 anInt2: 13306 dInt1: 9126 dInt100: 10206 dInt200: 10306
+ anInt1 9507 aFloat: 11400.6 anInt2: 13307 dInt1: 9127 dInt100: 10207 dInt200: 10307
+ anInt1 9508 aFloat: 11400.7 anInt2: 13308 dInt1: 9128 dInt100: 10208 dInt200: 10308
 gvec aux items: anInt 
  anInt 13301
  anInt 13302
@@ -2457,118 +2375,118 @@ cvecWD 1019: 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810
 cview: 1910 1909 1908 1907 1906 1905 1904 1903 1902 1901
 hvec: 7601.5 7602.5 7603.5 7604.5 7605.5 7606.5 7607.5 7608.5 7609.5 7610.5 7611.5 7612.5 7613.5 7614.5 7615.5 7616.5 7617.5 7618.5 7619.5 7620.5
 hview: 7620.5 7619.5 7618.5 7617.5 7616.5 7615.5 7614.5 7613.5 7612.5 7611.5 7610.5 7609.5 7608.5 7607.5 7606.5 7605.5 7604.5 7603.5 7602.5 7601.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 1901 aFloat: 3800 pInt: 9501 pFloat: 0.19 anInt2: 5701 dInt1: 7601 dVar1: 8551 dpInt1: 951 dInt200: 2101 dInt250: 2501 anInt10: 570100 cEL: cvec[9]
+ anInt1 1901 aFloat: 3800 pInt: 9501 pFloat: 0.19 anInt2: 5701 dInt1: 7601 dVar1: 8551 dpInt1: 951 dInt100: 2001 dInt150: 2201 dInt200: 2101 dInt250: 2501 anInt10: 570100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 1902 aFloat: 3800.1 pInt: 9502 pFloat: 1.19 anInt2: 5702 dInt1: 7602 dVar1: 8552 dpInt1: 952 dInt200: 2102 dInt250: 2502 anInt10: 570200 cEL: cvec[8]
+ anInt1 1902 aFloat: 3800.1 pInt: 9502 pFloat: 1.19 anInt2: 5702 dInt1: 7602 dVar1: 8552 dpInt1: 952 dInt100: 2002 dInt150: 2202 dInt200: 2102 dInt250: 2502 anInt10: 570200 cEL: cvec[8]
   pvInt: [1410 ]
   pvFloat: [-0.471 ]
   dpvFloat: [0.290 ]
- anInt1 1903 aFloat: 3800.2 pInt: 9503 pFloat: 2.19 anInt2: 5703 dInt1: 7603 dVar1: 8553 dpInt1: 953 dInt200: 2103 dInt250: 2503 anInt10: 570300 cEL: cvec[7]
+ anInt1 1903 aFloat: 3800.2 pInt: 9503 pFloat: 2.19 anInt2: 5703 dInt1: 7603 dVar1: 8553 dpInt1: 953 dInt100: 2003 dInt150: 2203 dInt200: 2103 dInt250: 2503 anInt10: 570300 cEL: cvec[7]
   pvInt: [1420 1421 ]
   pvFloat: [-0.461 -0.361 ]
   dpvFloat: [0.390 0.391 ]
- anInt1 1904 aFloat: 3800.3 pInt: 9504 pFloat: 3.19 anInt2: 5704 dInt1: 7604 dVar1: 8554 dpInt1: 954 dInt200: 2104 dInt250: 2504 anInt10: 570400 cEL: cvec[6]
+ anInt1 1904 aFloat: 3800.3 pInt: 9504 pFloat: 3.19 anInt2: 5704 dInt1: 7604 dVar1: 8554 dpInt1: 954 dInt100: 2004 dInt150: 2204 dInt200: 2104 dInt250: 2504 anInt10: 570400 cEL: cvec[6]
   pvInt: [1430 1431 1432 ]
   pvFloat: [-0.451 -0.351 -0.251 ]
   dpvFloat: [0.490 0.491 0.492 ]
- anInt1 1905 aFloat: 3800.4 pInt: 9505 pFloat: 4.19 anInt2: 5705 dInt1: 7605 dVar1: 8555 dpInt1: 955 dInt200: 2105 dInt250: 2505 anInt10: 570500 cEL: cvec[5]
+ anInt1 1905 aFloat: 3800.4 pInt: 9505 pFloat: 4.19 anInt2: 5705 dInt1: 7605 dVar1: 8555 dpInt1: 955 dInt100: 2005 dInt150: 2205 dInt200: 2105 dInt250: 2505 anInt10: 570500 cEL: cvec[5]
   pvInt: [1440 1441 1442 1443 ]
   pvFloat: [-0.441 -0.341 -0.241 -0.141 ]
   dpvFloat: [0.590 0.591 0.592 0.593 ]
- anInt1 1906 aFloat: 3800.5 pInt: 9506 pFloat: 5.19 anInt2: 5706 dInt1: 7606 dVar1: 8556 dpInt1: 956 dInt200: 2106 dInt250: 2506 anInt10: 570600 cEL: cvec[4]
+ anInt1 1906 aFloat: 3800.5 pInt: 9506 pFloat: 5.19 anInt2: 5706 dInt1: 7606 dVar1: 8556 dpInt1: 956 dInt100: 2006 dInt150: 2206 dInt200: 2106 dInt250: 2506 anInt10: 570600 cEL: cvec[4]
   pvInt: [1450 1451 1452 1453 1454 ]
   pvFloat: [-0.431 -0.331 -0.231 -0.131 -0.031 ]
   dpvFloat: [0.690 0.691 0.692 0.693 0.694 ]
- anInt1 1907 aFloat: 3800.6 pInt: 9507 pFloat: 6.19 anInt2: 5707 dInt1: 7607 dVar1: 8557 dpInt1: 957 dInt200: 2107 dInt250: 2507 anInt10: 570700 cEL: cvec[3]
+ anInt1 1907 aFloat: 3800.6 pInt: 9507 pFloat: 6.19 anInt2: 5707 dInt1: 7607 dVar1: 8557 dpInt1: 957 dInt100: 2007 dInt150: 2207 dInt200: 2107 dInt250: 2507 anInt10: 570700 cEL: cvec[3]
   pvInt: [1460 1461 1462 1463 1464 1465 ]
   pvFloat: [-0.421 -0.321 -0.221 -0.121 -0.021 0.079 ]
   dpvFloat: [0.790 0.791 0.792 0.793 0.794 0.795 ]
- anInt1 1908 aFloat: 3800.7 pInt: 9508 pFloat: 7.19 anInt2: 5708 dInt1: 7608 dVar1: 8558 dpInt1: 958 dInt200: 2108 dInt250: 2508 anInt10: 570800 cEL: cvec[2]
+ anInt1 1908 aFloat: 3800.7 pInt: 9508 pFloat: 7.19 anInt2: 5708 dInt1: 7608 dVar1: 8558 dpInt1: 958 dInt100: 2008 dInt150: 2208 dInt200: 2108 dInt250: 2508 anInt10: 570800 cEL: cvec[2]
   pvInt: [1470 1471 1472 1473 1474 1475 1476 ]
   pvFloat: [-0.411 -0.311 -0.211 -0.111 -0.011 0.089 0.189 ]
   dpvFloat: [0.890 0.891 0.892 0.893 0.894 0.895 0.896 ]
- anInt1 1909 aFloat: 3800.8 pInt: 9509 pFloat: 8.19 anInt2: 5709 dInt1: 7609 dVar1: 8559 dpInt1: 959 dInt200: 2109 dInt250: 2509 anInt10: 570900 cEL: cvec[1]
+ anInt1 1909 aFloat: 3800.8 pInt: 9509 pFloat: 8.19 anInt2: 5709 dInt1: 7609 dVar1: 8559 dpInt1: 959 dInt100: 2009 dInt150: 2209 dInt200: 2109 dInt250: 2509 anInt10: 570900 cEL: cvec[1]
   pvInt: [1480 1481 1482 1483 1484 1485 1486 1487 ]
   pvFloat: [-0.401 -0.301 -0.201 -0.101 -0.001 0.099 0.199 0.299 ]
   dpvFloat: [0.990 0.991 0.992 0.993 0.994 0.995 0.996 0.997 ]
- anInt1 1910 aFloat: 3800.9 pInt: 9510 pFloat: 9.19 anInt2: 5710 dInt1: 7610 dVar1: 8560 dpInt1: 960 dInt200: 2110 dInt250: 2510 anInt10: 571000 cEL: cvec[0]
+ anInt1 1910 aFloat: 3800.9 pInt: 9510 pFloat: 9.19 anInt2: 5710 dInt1: 7610 dVar1: 8560 dpInt1: 960 dInt100: 2010 dInt150: 2210 dInt200: 2110 dInt250: 2510 anInt10: 571000 cEL: cvec[0]
   pvInt: [1490 1491 1492 1493 1494 1495 1496 1497 1498 ]
   pvFloat: [-0.391 -0.291 -0.191 -0.091 0.009 0.109 0.209 0.309 0.409 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 19
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 19000 aFloat: 1.9 anInt2: 38000 dInt1: 57000 cEL: cvec[9] dInt200: 19600 dInt250: 20000 anInt10: 4180000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 9501 aFloat: 11400 anInt2: 13301 dInt1: 9121 dInt200: 10301 anInt10: 3230300
- anInt1 9502 aFloat: 11400.1 anInt2: 13302 dInt1: 9122 dInt200: 10302 anInt10: 3230600
- anInt1 9503 aFloat: 11400.2 anInt2: 13303 dInt1: 9123 dInt200: 10303 anInt10: 3230900
- anInt1 9504 aFloat: 11400.3 anInt2: 13304 dInt1: 9124 dInt200: 10304 anInt10: 3231200
- anInt1 9505 aFloat: 11400.4 anInt2: 13305 dInt1: 9125 dInt200: 10305 anInt10: 3231500
- anInt1 9506 aFloat: 11400.5 anInt2: 13306 dInt1: 9126 dInt200: 10306 anInt10: 3231800
- anInt1 9507 aFloat: 11400.6 anInt2: 13307 dInt1: 9127 dInt200: 10307 anInt10: 3232100
- anInt1 9508 aFloat: 11400.7 anInt2: 13308 dInt1: 9128 dInt200: 10308 anInt10: 3232400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 19000 aFloat: 1.9 anInt2: 38000 dInt1: 57000 cEL: cvec[9] dInt100: 19500 dInt150: 19700 dInt200: 19600 dInt250: 20000 anInt10: 4180000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 9501 aFloat: 11400 anInt2: 13301 dInt1: 9121 dInt100: 10201 dInt150: 10401 dInt200: 10301 anInt10: 3230300
+ anInt1 9502 aFloat: 11400.1 anInt2: 13302 dInt1: 9122 dInt100: 10202 dInt150: 10402 dInt200: 10302 anInt10: 3230600
+ anInt1 9503 aFloat: 11400.2 anInt2: 13303 dInt1: 9123 dInt100: 10203 dInt150: 10403 dInt200: 10303 anInt10: 3230900
+ anInt1 9504 aFloat: 11400.3 anInt2: 13304 dInt1: 9124 dInt100: 10204 dInt150: 10404 dInt200: 10304 anInt10: 3231200
+ anInt1 9505 aFloat: 11400.4 anInt2: 13305 dInt1: 9125 dInt100: 10205 dInt150: 10405 dInt200: 10305 anInt10: 3231500
+ anInt1 9506 aFloat: 11400.5 anInt2: 13306 dInt1: 9126 dInt100: 10206 dInt150: 10406 dInt200: 10306 anInt10: 3231800
+ anInt1 9507 aFloat: 11400.6 anInt2: 13307 dInt1: 9127 dInt100: 10207 dInt150: 10407 dInt200: 10307 anInt10: 3232100
+ anInt1 9508 aFloat: 11400.7 anInt2: 13308 dInt1: 9128 dInt100: 10208 dInt150: 10408 dInt200: 10308 anInt10: 3232400
 scopy_cvecWD 1019: 3801(760100) 3802(760200) 3803(760300) 3804(760400) 3805(760500) 3806(760600) 3807(760700) 3808(760800) 3809(760900) 3810(761000)
 scopy_hvec: 7601.5 7602.5 7603.5 7604.5 7605.5 7606.5 7607.5 7608.5 7609.5 7610.5 7611.5 7612.5 7613.5 7614.5 7615.5 7616.5 7617.5 7618.5 7619.5 7620.5
 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  <<<===
-cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+cvec aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 2001 aFloat: 4000 pInt: 10001 pFloat: 0.20 anInt2: 6001 dInt1: 8001 dVar1: 9001 dpInt1: 1001 dInt200: 2201 cEL: cvec[9]
+ anInt1 2001 aFloat: 4000 pInt: 10001 pFloat: 0.20 anInt2: 6001 dInt1: 8001 dVar1: 9001 dpInt1: 1001 dInt100: 2101 dInt200: 2201 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 2002 aFloat: 4000.1 pInt: 10002 pFloat: 1.20 anInt2: 6002 dInt1: 8002 dVar1: 9002 dpInt1: 1002 dInt200: 2202 cEL: cvec[8]
+ anInt1 2002 aFloat: 4000.1 pInt: 10002 pFloat: 1.20 anInt2: 6002 dInt1: 8002 dVar1: 9002 dpInt1: 1002 dInt100: 2102 dInt200: 2202 cEL: cvec[8]
   pvInt: [1510 ]
   pvFloat: [-0.470 ]
   dpvFloat: [0.300 ]
- anInt1 2003 aFloat: 4000.2 pInt: 10003 pFloat: 2.20 anInt2: 6003 dInt1: 8003 dVar1: 9003 dpInt1: 1003 dInt200: 2203 cEL: cvec[7]
+ anInt1 2003 aFloat: 4000.2 pInt: 10003 pFloat: 2.20 anInt2: 6003 dInt1: 8003 dVar1: 9003 dpInt1: 1003 dInt100: 2103 dInt200: 2203 cEL: cvec[7]
   pvInt: [1520 1521 ]
   pvFloat: [-0.460 -0.360 ]
   dpvFloat: [0.400 0.401 ]
- anInt1 2004 aFloat: 4000.3 pInt: 10004 pFloat: 3.20 anInt2: 6004 dInt1: 8004 dVar1: 9004 dpInt1: 1004 dInt200: 2204 cEL: cvec[6]
+ anInt1 2004 aFloat: 4000.3 pInt: 10004 pFloat: 3.20 anInt2: 6004 dInt1: 8004 dVar1: 9004 dpInt1: 1004 dInt100: 2104 dInt200: 2204 cEL: cvec[6]
   pvInt: [1530 1531 1532 ]
   pvFloat: [-0.450 -0.350 -0.250 ]
   dpvFloat: [0.500 0.501 0.502 ]
- anInt1 2005 aFloat: 4000.4 pInt: 10005 pFloat: 4.20 anInt2: 6005 dInt1: 8005 dVar1: 9005 dpInt1: 1005 dInt200: 2205 cEL: cvec[5]
+ anInt1 2005 aFloat: 4000.4 pInt: 10005 pFloat: 4.20 anInt2: 6005 dInt1: 8005 dVar1: 9005 dpInt1: 1005 dInt100: 2105 dInt200: 2205 cEL: cvec[5]
   pvInt: [1540 1541 1542 1543 ]
   pvFloat: [-0.440 -0.340 -0.240 -0.140 ]
   dpvFloat: [0.600 0.601 0.602 0.603 ]
- anInt1 2006 aFloat: 4000.5 pInt: 10006 pFloat: 5.20 anInt2: 6006 dInt1: 8006 dVar1: 9006 dpInt1: 1006 dInt200: 2206 cEL: cvec[4]
+ anInt1 2006 aFloat: 4000.5 pInt: 10006 pFloat: 5.20 anInt2: 6006 dInt1: 8006 dVar1: 9006 dpInt1: 1006 dInt100: 2106 dInt200: 2206 cEL: cvec[4]
   pvInt: [1550 1551 1552 1553 1554 ]
   pvFloat: [-0.430 -0.330 -0.230 -0.130 -0.030 ]
   dpvFloat: [0.700 0.701 0.702 0.703 0.704 ]
- anInt1 2007 aFloat: 4000.6 pInt: 10007 pFloat: 6.20 anInt2: 6007 dInt1: 8007 dVar1: 9007 dpInt1: 1007 dInt200: 2207 cEL: cvec[3]
+ anInt1 2007 aFloat: 4000.6 pInt: 10007 pFloat: 6.20 anInt2: 6007 dInt1: 8007 dVar1: 9007 dpInt1: 1007 dInt100: 2107 dInt200: 2207 cEL: cvec[3]
   pvInt: [1560 1561 1562 1563 1564 1565 ]
   pvFloat: [-0.420 -0.320 -0.220 -0.120 -0.020 0.080 ]
   dpvFloat: [0.800 0.801 0.802 0.803 0.804 0.805 ]
- anInt1 2008 aFloat: 4000.7 pInt: 10008 pFloat: 7.20 anInt2: 6008 dInt1: 8008 dVar1: 9008 dpInt1: 1008 dInt200: 2208 cEL: cvec[2]
+ anInt1 2008 aFloat: 4000.7 pInt: 10008 pFloat: 7.20 anInt2: 6008 dInt1: 8008 dVar1: 9008 dpInt1: 1008 dInt100: 2108 dInt200: 2208 cEL: cvec[2]
   pvInt: [1570 1571 1572 1573 1574 1575 1576 ]
   pvFloat: [-0.410 -0.310 -0.210 -0.110 -0.010 0.090 0.190 ]
   dpvFloat: [0.900 0.901 0.902 0.903 0.904 0.905 0.906 ]
- anInt1 2009 aFloat: 4000.8 pInt: 10009 pFloat: 8.20 anInt2: 6009 dInt1: 8009 dVar1: 9009 dpInt1: 1009 dInt200: 2209 cEL: cvec[1]
+ anInt1 2009 aFloat: 4000.8 pInt: 10009 pFloat: 8.20 anInt2: 6009 dInt1: 8009 dVar1: 9009 dpInt1: 1009 dInt100: 2109 dInt200: 2209 cEL: cvec[1]
   pvInt: [1580 1581 1582 1583 1584 1585 1586 1587 ]
   pvFloat: [-0.400 -0.300 -0.200 -0.100 0.000 0.100 0.200 0.300 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
- anInt1 2010 aFloat: 4000.9 pInt: 10010 pFloat: 9.20 anInt2: 6010 dInt1: 8010 dVar1: 9010 dpInt1: 1010 dInt200: 2210 cEL: cvec[0]
+ anInt1 2010 aFloat: 4000.9 pInt: 10010 pFloat: 9.20 anInt2: 6010 dInt1: 8010 dVar1: 9010 dpInt1: 1010 dInt100: 2110 dInt200: 2210 cEL: cvec[0]
   pvInt: [1590 1591 1592 1593 1594 1595 1596 1597 1598 ]
   pvFloat: [-0.390 -0.290 -0.190 -0.090 0.010 0.110 0.210 0.310 0.410 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 20
-cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt200 
-cinfo  anInt1 20000 aFloat: 2 anInt2: 40000 dInt1: 60000 cEL: cvec[0] dInt200: 20600
-ctrig aux items: aFloat anInt anInt2 dInt1 dInt200 
- anInt1 10001 aFloat: 12000 anInt2: 14001 dInt1: 9601 dInt200: 10801
- anInt1 10002 aFloat: 12000.1 anInt2: 14002 dInt1: 9602 dInt200: 10802
- anInt1 10003 aFloat: 12000.2 anInt2: 14003 dInt1: 9603 dInt200: 10803
- anInt1 10004 aFloat: 12000.3 anInt2: 14004 dInt1: 9604 dInt200: 10804
- anInt1 10005 aFloat: 12000.4 anInt2: 14005 dInt1: 9605 dInt200: 10805
- anInt1 10006 aFloat: 12000.5 anInt2: 14006 dInt1: 9606 dInt200: 10806
- anInt1 10007 aFloat: 12000.6 anInt2: 14007 dInt1: 9607 dInt200: 10807
- anInt1 10008 aFloat: 12000.7 anInt2: 14008 dInt1: 9608 dInt200: 10808
+cinfo aux items: aFloat anInt anInt2 cEL dInt1 dInt100 dInt200 
+cinfo  anInt1 20000 aFloat: 2 anInt2: 40000 dInt1: 60000 cEL: cvec[0] dInt100: 20500 dInt200: 20600
+ctrig aux items: aFloat anInt anInt2 dInt1 dInt100 dInt200 
+ anInt1 10001 aFloat: 12000 anInt2: 14001 dInt1: 9601 dInt100: 10701 dInt200: 10801
+ anInt1 10002 aFloat: 12000.1 anInt2: 14002 dInt1: 9602 dInt100: 10702 dInt200: 10802
+ anInt1 10003 aFloat: 12000.2 anInt2: 14003 dInt1: 9603 dInt100: 10703 dInt200: 10803
+ anInt1 10004 aFloat: 12000.3 anInt2: 14004 dInt1: 9604 dInt100: 10704 dInt200: 10804
+ anInt1 10005 aFloat: 12000.4 anInt2: 14005 dInt1: 9605 dInt100: 10705 dInt200: 10805
+ anInt1 10006 aFloat: 12000.5 anInt2: 14006 dInt1: 9606 dInt100: 10706 dInt200: 10806
+ anInt1 10007 aFloat: 12000.6 anInt2: 14007 dInt1: 9607 dInt100: 10707 dInt200: 10807
+ anInt1 10008 aFloat: 12000.7 anInt2: 14008 dInt1: 9608 dInt100: 10708 dInt200: 10808
 gvec aux items: anInt 
  anInt 14001
  anInt 14002
@@ -2584,65 +2502,65 @@ cvecWD 1020: 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
 cview: 2010 2009 2008 2007 2006 2005 2004 2003 2002 2001
 hvec: 8001.5 8002.5 8003.5 8004.5 8005.5 8006.5 8007.5 8008.5 8009.5 8010.5 8011.5 8012.5 8013.5 8014.5 8015.5 8016.5 8017.5 8018.5 8019.5 8020.5
 hview: 8020.5 8019.5 8018.5 8017.5 8016.5 8015.5 8014.5 8013.5 8012.5 8011.5 8010.5 8009.5 8008.5 8007.5 8006.5 8005.5 8004.5 8003.5 8002.5 8001.5
-scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
+scopy_cvec aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::ShallowAuxContainer
- anInt1 2001 aFloat: 4000 pInt: 10001 pFloat: 0.20 anInt2: 6001 dInt1: 8001 dVar1: 9001 dpInt1: 1001 dInt200: 2201 dInt250: 2601 anInt10: 600100 cEL: cvec[9]
+ anInt1 2001 aFloat: 4000 pInt: 10001 pFloat: 0.20 anInt2: 6001 dInt1: 8001 dVar1: 9001 dpInt1: 1001 dInt100: 2101 dInt150: 2301 dInt200: 2201 dInt250: 2601 anInt10: 600100 cEL: cvec[9]
   pvInt: []
   pvFloat: []
   dpvFloat: []
- anInt1 2002 aFloat: 4000.1 pInt: 10002 pFloat: 1.20 anInt2: 6002 dInt1: 8002 dVar1: 9002 dpInt1: 1002 dInt200: 2202 dInt250: 2602 anInt10: 600200 cEL: cvec[8]
+ anInt1 2002 aFloat: 4000.1 pInt: 10002 pFloat: 1.20 anInt2: 6002 dInt1: 8002 dVar1: 9002 dpInt1: 1002 dInt100: 2102 dInt150: 2302 dInt200: 2202 dInt250: 2602 anInt10: 600200 cEL: cvec[8]
   pvInt: [1510 ]
   pvFloat: [-0.470 ]
   dpvFloat: [0.300 ]
- anInt1 2003 aFloat: 4000.2 pInt: 10003 pFloat: 2.20 anInt2: 6003 dInt1: 8003 dVar1: 9003 dpInt1: 1003 dInt200: 2203 dInt250: 2603 anInt10: 600300 cEL: cvec[7]
+ anInt1 2003 aFloat: 4000.2 pInt: 10003 pFloat: 2.20 anInt2: 6003 dInt1: 8003 dVar1: 9003 dpInt1: 1003 dInt100: 2103 dInt150: 2303 dInt200: 2203 dInt250: 2603 anInt10: 600300 cEL: cvec[7]
   pvInt: [1520 1521 ]
   pvFloat: [-0.460 -0.360 ]
   dpvFloat: [0.400 0.401 ]
- anInt1 2004 aFloat: 4000.3 pInt: 10004 pFloat: 3.20 anInt2: 6004 dInt1: 8004 dVar1: 9004 dpInt1: 1004 dInt200: 2204 dInt250: 2604 anInt10: 600400 cEL: cvec[6]
+ anInt1 2004 aFloat: 4000.3 pInt: 10004 pFloat: 3.20 anInt2: 6004 dInt1: 8004 dVar1: 9004 dpInt1: 1004 dInt100: 2104 dInt150: 2304 dInt200: 2204 dInt250: 2604 anInt10: 600400 cEL: cvec[6]
   pvInt: [1530 1531 1532 ]
   pvFloat: [-0.450 -0.350 -0.250 ]
   dpvFloat: [0.500 0.501 0.502 ]
- anInt1 2005 aFloat: 4000.4 pInt: 10005 pFloat: 4.20 anInt2: 6005 dInt1: 8005 dVar1: 9005 dpInt1: 1005 dInt200: 2205 dInt250: 2605 anInt10: 600500 cEL: cvec[5]
+ anInt1 2005 aFloat: 4000.4 pInt: 10005 pFloat: 4.20 anInt2: 6005 dInt1: 8005 dVar1: 9005 dpInt1: 1005 dInt100: 2105 dInt150: 2305 dInt200: 2205 dInt250: 2605 anInt10: 600500 cEL: cvec[5]
   pvInt: [1540 1541 1542 1543 ]
   pvFloat: [-0.440 -0.340 -0.240 -0.140 ]
   dpvFloat: [0.600 0.601 0.602 0.603 ]
- anInt1 2006 aFloat: 4000.5 pInt: 10006 pFloat: 5.20 anInt2: 6006 dInt1: 8006 dVar1: 9006 dpInt1: 1006 dInt200: 2206 dInt250: 2606 anInt10: 600600 cEL: cvec[4]
+ anInt1 2006 aFloat: 4000.5 pInt: 10006 pFloat: 5.20 anInt2: 6006 dInt1: 8006 dVar1: 9006 dpInt1: 1006 dInt100: 2106 dInt150: 2306 dInt200: 2206 dInt250: 2606 anInt10: 600600 cEL: cvec[4]
   pvInt: [1550 1551 1552 1553 1554 ]
   pvFloat: [-0.430 -0.330 -0.230 -0.130 -0.030 ]
   dpvFloat: [0.700 0.701 0.702 0.703 0.704 ]
- anInt1 2007 aFloat: 4000.6 pInt: 10007 pFloat: 6.20 anInt2: 6007 dInt1: 8007 dVar1: 9007 dpInt1: 1007 dInt200: 2207 dInt250: 2607 anInt10: 600700 cEL: cvec[3]
+ anInt1 2007 aFloat: 4000.6 pInt: 10007 pFloat: 6.20 anInt2: 6007 dInt1: 8007 dVar1: 9007 dpInt1: 1007 dInt100: 2107 dInt150: 2307 dInt200: 2207 dInt250: 2607 anInt10: 600700 cEL: cvec[3]
   pvInt: [1560 1561 1562 1563 1564 1565 ]
   pvFloat: [-0.420 -0.320 -0.220 -0.120 -0.020 0.080 ]
   dpvFloat: [0.800 0.801 0.802 0.803 0.804 0.805 ]
- anInt1 2008 aFloat: 4000.7 pInt: 10008 pFloat: 7.20 anInt2: 6008 dInt1: 8008 dVar1: 9008 dpInt1: 1008 dInt200: 2208 dInt250: 2608 anInt10: 600800 cEL: cvec[2]
+ anInt1 2008 aFloat: 4000.7 pInt: 10008 pFloat: 7.20 anInt2: 6008 dInt1: 8008 dVar1: 9008 dpInt1: 1008 dInt100: 2108 dInt150: 2308 dInt200: 2208 dInt250: 2608 anInt10: 600800 cEL: cvec[2]
   pvInt: [1570 1571 1572 1573 1574 1575 1576 ]
   pvFloat: [-0.410 -0.310 -0.210 -0.110 -0.010 0.090 0.190 ]
   dpvFloat: [0.900 0.901 0.902 0.903 0.904 0.905 0.906 ]
- anInt1 2009 aFloat: 4000.8 pInt: 10009 pFloat: 8.20 anInt2: 6009 dInt1: 8009 dVar1: 9009 dpInt1: 1009 dInt200: 2209 dInt250: 2609 anInt10: 600900 cEL: cvec[1]
+ anInt1 2009 aFloat: 4000.8 pInt: 10009 pFloat: 8.20 anInt2: 6009 dInt1: 8009 dVar1: 9009 dpInt1: 1009 dInt100: 2109 dInt150: 2309 dInt200: 2209 dInt250: 2609 anInt10: 600900 cEL: cvec[1]
   pvInt: [1580 1581 1582 1583 1584 1585 1586 1587 ]
   pvFloat: [-0.400 -0.300 -0.200 -0.100 0.000 0.100 0.200 0.300 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
- anInt1 2010 aFloat: 4000.9 pInt: 10010 pFloat: 9.20 anInt2: 6010 dInt1: 8010 dVar1: 9010 dpInt1: 1010 dInt200: 2210 dInt250: 2610 anInt10: 601000 cEL: cvec[0]
+ anInt1 2010 aFloat: 4000.9 pInt: 10010 pFloat: 9.20 anInt2: 6010 dInt1: 8010 dVar1: 9010 dpInt1: 1010 dInt100: 2110 dInt150: 2310 dInt200: 2210 dInt250: 2610 anInt10: 601000 cEL: cvec[0]
   pvInt: [1590 1591 1592 1593 1594 1595 1596 1597 1598 ]
   pvFloat: [-0.390 -0.290 -0.190 -0.090 0.010 0.110 0.210 0.310 0.410 ]
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 20
-cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt200 dInt250 
-cinfo  anInt1 20000 aFloat: 2 anInt2: 40000 dInt1: 60000 cEL: cvec[0] dInt200: 20600 dInt250: 21000 anInt10: 4400000
-ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt200 dInt250 
- anInt1 10001 aFloat: 12000 anInt2: 14001 dInt1: 9601 dInt200: 10801 anInt10: 3400300
- anInt1 10002 aFloat: 12000.1 anInt2: 14002 dInt1: 9602 dInt200: 10802 anInt10: 3400600
- anInt1 10003 aFloat: 12000.2 anInt2: 14003 dInt1: 9603 dInt200: 10803 anInt10: 3400900
- anInt1 10004 aFloat: 12000.3 anInt2: 14004 dInt1: 9604 dInt200: 10804 anInt10: 3401200
- anInt1 10005 aFloat: 12000.4 anInt2: 14005 dInt1: 9605 dInt200: 10805 anInt10: 3401500
- anInt1 10006 aFloat: 12000.5 anInt2: 14006 dInt1: 9606 dInt200: 10806 anInt10: 3401800
- anInt1 10007 aFloat: 12000.6 anInt2: 14007 dInt1: 9607 dInt200: 10807 anInt10: 3402100
- anInt1 10008 aFloat: 12000.7 anInt2: 14008 dInt1: 9608 dInt200: 10808 anInt10: 3402400
+cinfo aux items: aFloat anInt anInt10 anInt2 cEL dInt1 dInt100 dInt150 dInt200 dInt250 
+cinfo  anInt1 20000 aFloat: 2 anInt2: 40000 dInt1: 60000 cEL: cvec[0] dInt100: 20500 dInt150: 20700 dInt200: 20600 dInt250: 21000 anInt10: 4400000
+ctrig aux items: aFloat anInt anInt10 anInt2 dInt1 dInt100 dInt150 dInt200 dInt250 
+ anInt1 10001 aFloat: 12000 anInt2: 14001 dInt1: 9601 dInt100: 10701 dInt150: 10901 dInt200: 10801 anInt10: 3400300
+ anInt1 10002 aFloat: 12000.1 anInt2: 14002 dInt1: 9602 dInt100: 10702 dInt150: 10902 dInt200: 10802 anInt10: 3400600
+ anInt1 10003 aFloat: 12000.2 anInt2: 14003 dInt1: 9603 dInt100: 10703 dInt150: 10903 dInt200: 10803 anInt10: 3400900
+ anInt1 10004 aFloat: 12000.3 anInt2: 14004 dInt1: 9604 dInt100: 10704 dInt150: 10904 dInt200: 10804 anInt10: 3401200
+ anInt1 10005 aFloat: 12000.4 anInt2: 14005 dInt1: 9605 dInt100: 10705 dInt150: 10905 dInt200: 10805 anInt10: 3401500
+ anInt1 10006 aFloat: 12000.5 anInt2: 14006 dInt1: 9606 dInt100: 10706 dInt150: 10906 dInt200: 10806 anInt10: 3401800
+ anInt1 10007 aFloat: 12000.6 anInt2: 14007 dInt1: 9607 dInt100: 10707 dInt150: 10907 dInt200: 10807 anInt10: 3402100
+ anInt1 10008 aFloat: 12000.7 anInt2: 14008 dInt1: 9608 dInt100: 10708 dInt150: 10908 dInt200: 10808 anInt10: 3402400
 scopy_cvecWD 1020: 4001(800100) 4002(800200) 4003(800300) 4004(800400) 4005(800500) 4006(800600) 4007(800700) 4008(800800) 4009(800900) 4010(801000)
 scopy_hvec: 8001.5 8002.5 8003.5 8004.5 8005.5 8006.5 8007.5 8008.5 8009.5 8010.5 8011.5 8012.5 8013.5 8014.5 8015.5 8016.5 8017.5 8018.5 8019.5 8020.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
 xaoddata2b.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 93131686-5AD5-7F44-B235-31DD6AA26CEF
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 06E36B68-9910-BB48-B7F6-4304C7E117D7
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
 IncidentProcAlg2     INFO Finalize
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3.ref
index d432948ff7b088fa8ac436a08ce50586fe773260..5f0bfa3cd5e2dbd497284d6be2fcd811a2ce9e38 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead3.ref
@@ -1,20 +1,21 @@
-Fri Mar 17 21:57:01 CET 2017
-Preloading tcmalloc_minimal.so
+Wed Jun 21 16:30:38 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 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 [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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/xAODTestRead3_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5282 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 442 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 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:57:14 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Jun 21 16:31:04 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -22,54 +23,34 @@ 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 8719 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9499 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 361 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 312 CLIDRegistry entries for module ALL
 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 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 Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is file:xAODTestRead3_catalog.xml
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
 PoolSvc              INFO Re-initializing PoolSvc
 EventSelector        INFO reinitialization...
 EventSelector        INFO EventSelection with query 
-PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
 RootCollection Info Opening Collection File xaoddata3.root in mode: READ
 RootCollection Info File xaoddata3.root opened
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 9537AB7C-6D7D-ED65-5325-B23A804F19D8
-Domain[ROOT_All] Info                           xaoddata3.root
-RootDatabase.open Info xaoddata3.root File version:60802
-xaoddata3.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 9537AB7C-6D7D-ED65-5325-B23A804F19D8
-Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 9537AB7C-6D7D-ED65-5325-B23A804F19D8
-Domain[ROOT_All] Info                           xaoddata3.root
-RootDatabase.open Info xaoddata3.root File version:60802
-xaoddata3.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 9537AB7C-6D7D-ED65-5325-B23A804F19D8
-Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 6BB654D5-9FB3-734F-BAD3-EED2A78978A3
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 4D6435DB-E4BA-A14B-8797-1FE0A1464B2E
 Domain[ROOT_All] Info                           xaoddata3.root
-RootDatabase.open Info xaoddata3.root File version:60802
+RootDatabase.open Info xaoddata3.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata3.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventSelector        INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00
 EventSelector        INFO reinitialization...
@@ -83,23 +64,22 @@ HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 xaoddata3.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 6BB654D5-9FB3-734F-BAD3-EED2A78978A3
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 4D6435DB-E4BA-A14B-8797-1FE0A1464B2E
 RootCollection Info Opening Collection File xaoddata3.root in mode: READ
 RootCollection Info File xaoddata3.root opened
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 6BB654D5-9FB3-734F-BAD3-EED2A78978A3
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 4D6435DB-E4BA-A14B-8797-1FE0A1464B2E
 Domain[ROOT_All] Info                           xaoddata3.root
-RootDatabase.open Info xaoddata3.root File version:60802
+RootDatabase.open Info xaoddata3.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata3.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 ApplicationMgr       INFO Application Manager Started successfully
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
-ClassIDSvc           INFO  getRegistryEntries: read 1066 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1063 CLIDRegistry entries for module ALL
 AthenaPoolConve...   INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
 RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=226 typename=f) has different type than the branch vector<int>
@@ -144,10 +124,10 @@ RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAux
   pvFloat: [-0.409 -0.309 -0.209 -0.109 -0.009 0.091 0.191 0.291 0.391 ]
   dpvFloat: [0.910 0.911 0.912 0.913 0.914 0.915 0.916 0.917 0.918 ]
 1
-ClassIDSvc           INFO  getRegistryEntries: read 44 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
 cinfo aux items: aFloat anInt anInt2 cEL dInt1 
 cinfo  anInt1 1000 aFloat: 0.1 anInt2: 2000 dInt1: 3000 cEL: cvec[1]
-ClassIDSvc           INFO  getRegistryEntries: read 30 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 32 CLIDRegistry entries for module ALL
 ctrig aux items: aFloat anInt anInt2 dInt1 
  anInt1 501 aFloat: 600 anInt2: 701 dInt1: 481
  anInt1 502 aFloat: 600.1 anInt2: 702 dInt1: 482
@@ -578,49 +558,9 @@ AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events pr
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dInt1: 2001 dVar1: 2251 dpInt1: 251 cEL: cvec[9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05 anInt2: 1502 dInt1: 2002 dVar1: 2252 dpInt1: 252 cEL: cvec[8]
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
-  dpvFloat: [0.150 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dInt1: 2003 dVar1: 2253 dpInt1: 253 cEL: cvec[7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05 anInt2: 1504 dInt1: 2004 dVar1: 2254 dpInt1: 254 cEL: cvec[6]
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
-  dpvFloat: [0.350 0.351 0.352 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dInt1: 2005 dVar1: 2255 dpInt1: 255 cEL: cvec[5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05 anInt2: 1506 dInt1: 2006 dVar1: 2256 dpInt1: 256 cEL: cvec[4]
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
-  dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dInt1: 2007 dVar1: 2257 dpInt1: 257 cEL: cvec[3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05 anInt2: 1508 dInt1: 2008 dVar1: 2258 dpInt1: 258 cEL: cvec[2]
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
-  dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dInt1: 2009 dVar1: 2259 dpInt1: 259 cEL: cvec[1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05 anInt2: 1510 dInt1: 2010 dVar1: 2260 dpInt1: 260 cEL: cvec[0]
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
-  dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]
 5
 cinfo aux items: aFloat anInt anInt2 cEL dInt1 
-cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: cvec[5]
+cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: [18446744073709551615]
 ctrig aux items: aFloat anInt anInt2 dInt1 
  anInt1 2501 aFloat: 3000 anInt2: 3501 dInt1: 2401
  anInt1 2502 aFloat: 3000.1 anInt2: 3502 dInt1: 2402
@@ -631,54 +571,14 @@ ctrig aux items: aFloat anInt anInt2 dInt1
  anInt1 2507 aFloat: 3000.6 anInt2: 3507 dInt1: 2407
  anInt1 2508 aFloat: 3000.7 anInt2: 3508 dInt1: 2408
 cvecWD 1005: 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010
-cview: 510 509 508 507 506 505 504 503 502 501
+cview:
 hvec: 2001.5 2002.5 2003.5 2004.5 2005.5 2006.5 2007.5 2008.5 2009.5 2010.5 2011.5 2012.5 2013.5 2014.5 2015.5 2016.5 2017.5 2018.5 2019.5 2020.5
 hview: 2020.5 2019.5 2018.5 2017.5 2016.5 2015.5 2014.5 2013.5 2012.5 2011.5 2010.5 2009.5 2008.5 2007.5 2006.5 2005.5 2004.5 2003.5 2002.5 2001.5
 copy_cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dInt1: 2001 dVar1: 2251 dpInt1: 251 cEL: cvec[9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05 anInt2: 1502 dInt1: 2002 dVar1: 2252 dpInt1: 252 cEL: cvec[8]
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
-  dpvFloat: [0.150 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dInt1: 2003 dVar1: 2253 dpInt1: 253 cEL: cvec[7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05 anInt2: 1504 dInt1: 2004 dVar1: 2254 dpInt1: 254 cEL: cvec[6]
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
-  dpvFloat: [0.350 0.351 0.352 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dInt1: 2005 dVar1: 2255 dpInt1: 255 cEL: cvec[5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05 anInt2: 1506 dInt1: 2006 dVar1: 2256 dpInt1: 256 cEL: cvec[4]
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
-  dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dInt1: 2007 dVar1: 2257 dpInt1: 257 cEL: cvec[3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05 anInt2: 1508 dInt1: 2008 dVar1: 2258 dpInt1: 258 cEL: cvec[2]
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
-  dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dInt1: 2009 dVar1: 2259 dpInt1: 259 cEL: cvec[1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05 anInt2: 1510 dInt1: 2010 dVar1: 2260 dpInt1: 260 cEL: cvec[0]
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
-  dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]
 5
 cinfo aux items: aFloat anInt anInt2 cEL dInt1 
-cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: cvec[5]
+cinfo  anInt1 5000 aFloat: 0.5 anInt2: 10000 dInt1: 15000 cEL: [18446744073709551615]
 ctrig aux items: aFloat anInt anInt2 dInt1 
  anInt1 2501 aFloat: 3000 anInt2: 3501 dInt1: 2401
  anInt1 2502 aFloat: 3000.1 anInt2: 3502 dInt1: 2402
@@ -689,7 +589,7 @@ ctrig aux items: aFloat anInt anInt2 dInt1
  anInt1 2507 aFloat: 3000.6 anInt2: 3507 dInt1: 2407
  anInt1 2508 aFloat: 3000.7 anInt2: 3508 dInt1: 2408
 copy_cvecWD 1005: 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010
-copy_cview: 510 509 508 507 506 505 504 503 502 501
+copy_cview:
 copy_hvec: 2001.5 2002.5 2003.5 2004.5 2005.5 2006.5 2007.5 2008.5 2009.5 2010.5 2011.5 2012.5 2013.5 2014.5 2015.5 2016.5 2017.5 2018.5 2019.5 2020.5
 copy_hview: 2020.5 2019.5 2018.5 2017.5 2016.5 2015.5 2014.5 2013.5 2012.5 2011.5 2010.5 2009.5 2008.5 2007.5 2006.5 2005.5 2004.5 2003.5 2002.5 2001.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
@@ -2464,7 +2364,7 @@ copy_hvec: 8001.5 8002.5 8003.5 8004.5 8005.5 8006.5 8007.5 8008.5 8009.5 8010.5
 copy_hview: 8020.5 8019.5 8018.5 8017.5 8016.5 8015.5 8014.5 8013.5 8012.5 8011.5 8010.5 8009.5 8008.5 8007.5 8006.5 8005.5 8004.5 8003.5 8002.5 8001.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
 xaoddata3.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 6BB654D5-9FB3-734F-BAD3-EED2A78978A3
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 4D6435DB-E4BA-A14B-8797-1FE0A1464B2E
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
 IncidentProcAlg2     INFO Finalize
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilterRead.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilterRead.ref
index eda7aa2019ed2d34833235884a9a47af7b7abe42..00786a7c76260340d23e9b6d075d2c72efe1ff28 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilterRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilterRead.ref
@@ -1,20 +1,21 @@
-Fri Mar 17 21:57:58 CET 2017
-Preloading tcmalloc_minimal.so
+Wed Jun 21 15:42:27 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 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 [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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/xAODTestReadFilterRead_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5282 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 442 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 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:58:11 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Jun 21 15:42:52 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -22,37 +23,35 @@ 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 8719 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9499 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 361 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 312 CLIDRegistry entries for module ALL
 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 Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 1 servers found for host unknown [atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
 PoolSvc              INFO Re-initializing PoolSvc
 EventSelector        INFO reinitialization...
 EventSelector        INFO EventSelection with query 
 RootCollection Info Opening Collection File xaoddata_filt.root in mode: READ
 RootCollection Info File xaoddata_filt.root opened
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 6792C561-C0C3-4D4D-B525-7AD8359FA6E9
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 773569B6-EE4C-C74F-8AD2-AC2FD68A3176
 Domain[ROOT_All] Info                           xaoddata_filt.root
-RootDatabase.open Info xaoddata_filt.root File version:60802
+RootDatabase.open Info xaoddata_filt.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata_filt.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventSelector        INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00
 EventSelector        INFO reinitialization...
@@ -66,23 +65,22 @@ HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 xaoddata_filt.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 6792C561-C0C3-4D4D-B525-7AD8359FA6E9
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 773569B6-EE4C-C74F-8AD2-AC2FD68A3176
 RootCollection Info Opening Collection File xaoddata_filt.root in mode: READ
 RootCollection Info File xaoddata_filt.root opened
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 6792C561-C0C3-4D4D-B525-7AD8359FA6E9
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 773569B6-EE4C-C74F-8AD2-AC2FD68A3176
 Domain[ROOT_All] Info                           xaoddata_filt.root
-RootDatabase.open Info xaoddata_filt.root File version:60802
+RootDatabase.open Info xaoddata_filt.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata_filt.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 ApplicationMgr       INFO Application Manager Started successfully
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
-ClassIDSvc           INFO  getRegistryEntries: read 1066 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1063 CLIDRegistry entries for module ALL
 AthenaPoolConve...   INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
 RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=226 typename=f) has different type than the branch vector<int>
@@ -106,7 +104,7 @@ RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAux
   pvInt: [-320 -319 -318 -317 -316 -315 -314 -313 ]
   pvFloat: [-0.419 -0.319 -0.219 -0.119 -0.019 0.081 0.181 0.281 ]
   dpvFloat: [0.810 0.811 0.812 0.813 0.814 0.815 0.816 0.817 ]
-ClassIDSvc           INFO  getRegistryEntries: read 59 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 74 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #0 1 events processed so far  <<<===
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
@@ -183,26 +181,6 @@ AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events pr
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: xAOD::AuxContainerBase
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dInt1: 2001 dVar1: 2251 dpInt1: 251 cEL: cvec[9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dInt1: 2003 dVar1: 2253 dpInt1: 253 cEL: cvec[7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dInt1: 2005 dVar1: 2255 dpInt1: 255 cEL: cvec[5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dInt1: 2007 dVar1: 2257 dpInt1: 257 cEL: cvec[3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dInt1: 2009 dVar1: 2259 dpInt1: 259 cEL: cvec[1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #0 5 events processed so far  <<<===
 cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
@@ -565,7 +543,7 @@ Type of aux store: xAOD::AuxContainerBase
   dpvFloat: [1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 ]
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
 xaoddata_filt.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 6792C561-C0C3-4D4D-B525-7AD8359FA6E9
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 773569B6-EE4C-C74F-8AD2-AC2FD68A3176
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
 IncidentProcAlg2     INFO Finalize
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRename.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRename.ref
index ca8dde784c31a9f3858de6fb5934899a6588c8d4..dfab526a6eced61f9e43609027f3d86ce6a880fb 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRename.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadRename.ref
@@ -1,25 +1,21 @@
-Fri Apr 28 05:05:24 CEST 2017
-Preloading tcmalloc_minimal.so
+Wed Jun 21 15:34:31 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.0] [x86_64-slc6-gcc62-dbg] [mt-sss/597cc7edb4] -- built on [2017-04-25T0444]
+Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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/xAODTestReadRename_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5296 configurables from 13 genConfDb files
-Py:ConfigurableDb WARNING Found 1 duplicates among the 13 genConfDb files :
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -<component name>: <module> - [ <duplicates> ]
-Py:ConfigurableDb WARNING --------------------------------------------------
-Py:ConfigurableDb WARNING   -DMTest__xAODTestDecor: DataModelTestDataCommon.DataModelTestDataCommonConf - ['DataModelTestDataRead.DataModelTestDataReadConf']
-Py:ConfigurableDb WARNING Fix your cmt/requirements file !!
+Py:ConfigurableDb    INFO Read module info for 442 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r1)
-                                          running on lxplus068.cern.ch on Fri Apr 28 05:05:46 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Jun 21 15:34:57 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -27,21 +23,20 @@ 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 9155 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9499 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 362 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 57 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 312 CLIDRegistry entries for module ALL
 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/2017-04-23T2225/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus068.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
@@ -52,9 +47,9 @@ EventSelector        INFO reinitialization...
 EventSelector        INFO EventSelection with query 
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 7FA8A637-A9D7-7347-AED4-23793AD15451
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
+RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
@@ -66,26 +61,26 @@ RootCollection Info File xaoddata.root opened
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 AthenaPoolAddre...   INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 1074 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1063 CLIDRegistry entries for module ALL
 HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 7FA8A637-A9D7-7347-AED4-23793AD15451
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 7FA8A637-A9D7-7347-AED4-23793AD15451
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
+RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 ApplicationMgr       INFO Application Manager Started successfully
 AthenaPoolConve...   INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
 cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
 RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=226 typename=f) has different type than the branch vector<int>
@@ -131,7 +126,7 @@ RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAux
   dpvFloat: [0.910 0.911 0.912 0.913 0.914 0.915 0.916 0.917 0.918 ]
 xAODTestReadDecor    INFO cvec_renamed.dInt1_renamed: 401 402 403 404 405 406 407 408 409 410
 xAODTestReadDecor    INFO cinfo.dInt1_renamed: 3000
-ClassIDSvc           INFO  getRegistryEntries: read 50 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #0 1 events processed so far  <<<===
 cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
@@ -274,47 +269,7 @@ AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events pr
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
 cvec_renamed aux items: aFloat anInt anInt2 cEL dInt1_renamed dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 Type of aux store: DMTest::CAuxContainer_v1
- anInt1 501 aFloat: 1000 pInt: 2501 pFloat: 0.05 anInt2: 1501 dVar1: 2251 dpInt1: 251 cEL: cvec_renamed[9]
-  pvInt: []
-  pvFloat: []
-  dpvFloat: []
- anInt1 502 aFloat: 1000.1 pInt: 2502 pFloat: 1.05 anInt2: 1502 dVar1: 2252 dpInt1: 252 cEL: cvec_renamed[8]
-  pvInt: [10 ]
-  pvFloat: [-0.485 ]
-  dpvFloat: [0.150 ]
- anInt1 503 aFloat: 1000.2 pInt: 2503 pFloat: 2.05 anInt2: 1503 dVar1: 2253 dpInt1: 253 cEL: cvec_renamed[7]
-  pvInt: [20 21 ]
-  pvFloat: [-0.475 -0.375 ]
-  dpvFloat: [0.250 0.251 ]
- anInt1 504 aFloat: 1000.3 pInt: 2504 pFloat: 3.05 anInt2: 1504 dVar1: 2254 dpInt1: 254 cEL: cvec_renamed[6]
-  pvInt: [30 31 32 ]
-  pvFloat: [-0.465 -0.365 -0.265 ]
-  dpvFloat: [0.350 0.351 0.352 ]
- anInt1 505 aFloat: 1000.4 pInt: 2505 pFloat: 4.05 anInt2: 1505 dVar1: 2255 dpInt1: 255 cEL: cvec_renamed[5]
-  pvInt: [40 41 42 43 ]
-  pvFloat: [-0.455 -0.355 -0.255 -0.155 ]
-  dpvFloat: [0.450 0.451 0.452 0.453 ]
- anInt1 506 aFloat: 1000.5 pInt: 2506 pFloat: 5.05 anInt2: 1506 dVar1: 2256 dpInt1: 256 cEL: cvec_renamed[4]
-  pvInt: [50 51 52 53 54 ]
-  pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]
-  dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]
- anInt1 507 aFloat: 1000.6 pInt: 2507 pFloat: 6.05 anInt2: 1507 dVar1: 2257 dpInt1: 257 cEL: cvec_renamed[3]
-  pvInt: [60 61 62 63 64 65 ]
-  pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]
-  dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]
- anInt1 508 aFloat: 1000.7 pInt: 2508 pFloat: 7.05 anInt2: 1508 dVar1: 2258 dpInt1: 258 cEL: cvec_renamed[2]
-  pvInt: [70 71 72 73 74 75 76 ]
-  pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]
-  dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]
- anInt1 509 aFloat: 1000.8 pInt: 2509 pFloat: 8.05 anInt2: 1509 dVar1: 2259 dpInt1: 259 cEL: cvec_renamed[1]
-  pvInt: [80 81 82 83 84 85 86 87 ]
-  pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]
-  dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]
- anInt1 510 aFloat: 1000.9 pInt: 2510 pFloat: 9.05 anInt2: 1510 dVar1: 2260 dpInt1: 260 cEL: cvec_renamed[0]
-  pvInt: [90 91 92 93 94 95 96 97 98 ]
-  pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]
-  dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]
-xAODTestReadDecor    INFO cvec_renamed.dInt1_renamed: 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
+xAODTestReadDecor    INFO cvec_renamed.dInt1_renamed:
 xAODTestReadDecor    INFO cinfo.dInt1_renamed: 15000
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #4, run #0 5 events processed so far  <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #5, run #0 5 events processed so far  <<<===
@@ -1008,7 +963,7 @@ xAODTestReadDecor    INFO cvec_renamed.dInt1_renamed: 8001 8002 8003 8004 8005 8
 xAODTestReadDecor    INFO cinfo.dInt1_renamed: 60000
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 7FA8A637-A9D7-7347-AED4-23793AD15451
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
 IncidentProcAlg2     INFO Finalize
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref
index c6836629415bfb78ce310ce36b948291a3bce1a8..107af59ed5cc21ab48f741711fd7859b65008fd9 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks1MT.ref
@@ -1,7 +1,7 @@
-Thu Jul  6 15:06:37 CEST 2017
+Tue Aug 29 22:29:12 CEST 2017
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.0] [x86_64-slc6-gcc62-opt] [atlas-work3g/22c15a400d] -- built on [2017-07-06T1502]
+Py:Athena            INFO using release [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-dbg] [atlas-work3/314164bb34] -- built on [2017-08-29T1851]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
@@ -10,7 +10,7 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestSymlinks1MT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestSymlinks1_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5355 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5388 configurables from 56 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
@@ -18,14 +18,14 @@ MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
-                                          running on lxplus064.cern.ch on Thu Jul  6 15:07:01 2017
+                                          running on lxplus013.cern.ch on Tue Aug 29 22:29:27 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                   INFO in initialize...
 AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 2845 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 2850 CLIDRegistry entries for module ALL
 ChronoStatSvc                                      INFO  Number of skipped events for MemStat-1
 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) 
@@ -36,16 +36,16 @@ PoolSvc                                            INFO io_register[PoolSvc](xml
 PoolSvc                                            INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc                                            INFO Frontier compression level set to 5
 DBReplicaSvc                                       INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128) will be considered for COOL data
-DBReplicaSvc                                       INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-07-05T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus064.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/2017-08-28T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config
+DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus013.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc                                            INFO Successfully setup replica sorting algorithm
 PoolSvc                                            INFO Setting up APR FileCatalog and Streams
 PoolSvc                                            INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
 PoolSvc                                            INFO Re-initializing PoolSvc
-ClassIDSvc                                         INFO  getRegistryEntries: read 7210 CLIDRegistry entries for module ALL
-ClassIDSvc                                         INFO  getRegistryEntries: read 59 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 7485 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 61 CLIDRegistry entries for module ALL
 xAODTestAlg                                     WARNING Implicit circular data dependency detected for id ('SG::AuxElement','StoreGateSvc+cinfo2')
 ThreadPoolSvc                                      INFO no thread init tools attached
 AvalancheSchedulerSvc                              INFO Activating scheduler in a separate thread
@@ -71,6 +71,7 @@ AvalancheSchedulerSvc                              INFO Data Dependencies for Al
   xAODTestWriteSymlinks
     o INPUT  ('EventInfo','StoreGateSvc+McEventInfo')
     o OUTPUT ('DMTest::S1','StoreGateSvc+S2')
+    o OUTPUT ('DMTest::S1','StoreGateSvc+S2alias')
     o OUTPUT ('DMTest::S2','StoreGateSvc+S2')
     o OUTPUT ('DMTest::S2','StoreGateSvc+S2alias')
   xAODTestReadSymlink
@@ -105,104 +106,104 @@ AthenaHiveEventLoopMgr                             INFO Setup EventSelector serv
 ApplicationMgr                                     INFO Application Manager Initialized successfully
 ApplicationMgr                                     INFO Application Manager Started successfully
 AthenaHiveEventLoopMgr                             INFO Starting loop on events
+ClassIDSvc                                         INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
 EventPersistencySvc                                INFO Added successfully Conversion service:McCnvSvc
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start of run 0    <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 108 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
 xAODTestReadSymlink                     0   0      INFO C (as AuxElement): 1000; S 0
 xAODTestAlg.xAODTestReadSymlinkTool     0   0      INFO From tool: C (as AuxElement): 1000; S 0
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
 xAODTestReadSymlink                     1   0      INFO C (as AuxElement): 2000; S 100
 xAODTestAlg.xAODTestReadSymlinkTool     1   0      INFO From tool: C (as AuxElement): 2000; S 100
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
 xAODTestReadSymlink                     2   0      INFO C (as AuxElement): 3000; S 200
 xAODTestAlg.xAODTestReadSymlinkTool     2   0      INFO From tool: C (as AuxElement): 3000; S 200
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
 xAODTestReadSymlink                     3   0      INFO C (as AuxElement): 4000; S 300
 xAODTestAlg.xAODTestReadSymlinkTool     3   0      INFO From tool: C (as AuxElement): 4000; S 300
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
 xAODTestReadSymlink                     4   0      INFO C (as AuxElement): 5000; S 400
 xAODTestAlg.xAODTestReadSymlinkTool     4   0      INFO From tool: C (as AuxElement): 5000; S 400
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
 xAODTestReadSymlink                     5   0      INFO C (as AuxElement): 6000; S 500
 xAODTestAlg.xAODTestReadSymlinkTool     5   0      INFO From tool: C (as AuxElement): 6000; S 500
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
 xAODTestReadSymlink                     6   0      INFO C (as AuxElement): 7000; S 600
 xAODTestAlg.xAODTestReadSymlinkTool     6   0      INFO From tool: C (as AuxElement): 7000; S 600
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
 xAODTestReadSymlink                     7   0      INFO C (as AuxElement): 8000; S 700
 xAODTestAlg.xAODTestReadSymlinkTool     7   0      INFO From tool: C (as AuxElement): 8000; S 700
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
 xAODTestReadSymlink                     8   0      INFO C (as AuxElement): 9000; S 800
 xAODTestAlg.xAODTestReadSymlinkTool     8   0      INFO From tool: C (as AuxElement): 9000; S 800
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
 xAODTestReadSymlink                     9   0      INFO C (as AuxElement): 10000; S 900
 xAODTestAlg.xAODTestReadSymlinkTool     9   0      INFO From tool: C (as AuxElement): 10000; S 900
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
 xAODTestReadSymlink                     10  0      INFO C (as AuxElement): 11000; S 1000
 xAODTestAlg.xAODTestReadSymlinkTool     10  0      INFO From tool: C (as AuxElement): 11000; S 1000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
 xAODTestReadSymlink                     11  0      INFO C (as AuxElement): 12000; S 1100
 xAODTestAlg.xAODTestReadSymlinkTool     11  0      INFO From tool: C (as AuxElement): 12000; S 1100
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
 xAODTestReadSymlink                     12  0      INFO C (as AuxElement): 13000; S 1200
 xAODTestAlg.xAODTestReadSymlinkTool     12  0      INFO From tool: C (as AuxElement): 13000; S 1200
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
 xAODTestReadSymlink                     13  0      INFO C (as AuxElement): 14000; S 1300
 xAODTestAlg.xAODTestReadSymlinkTool     13  0      INFO From tool: C (as AuxElement): 14000; S 1300
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
 xAODTestReadSymlink                     14  0      INFO C (as AuxElement): 15000; S 1400
 xAODTestAlg.xAODTestReadSymlinkTool     14  0      INFO From tool: C (as AuxElement): 15000; S 1400
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
 xAODTestReadSymlink                     15  0      INFO C (as AuxElement): 16000; S 1500
 xAODTestAlg.xAODTestReadSymlinkTool     15  0      INFO From tool: C (as AuxElement): 16000; S 1500
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
 xAODTestReadSymlink                     16  0      INFO C (as AuxElement): 17000; S 1600
 xAODTestAlg.xAODTestReadSymlinkTool     16  0      INFO From tool: C (as AuxElement): 17000; S 1600
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
 xAODTestReadSymlink                     17  0      INFO C (as AuxElement): 18000; S 1700
 xAODTestAlg.xAODTestReadSymlinkTool     17  0      INFO From tool: C (as AuxElement): 18000; S 1700
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
 xAODTestReadSymlink                     18  0      INFO C (as AuxElement): 19000; S 1800
 xAODTestAlg.xAODTestReadSymlinkTool     18  0      INFO From tool: C (as AuxElement): 19000; S 1800
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
 xAODTestReadSymlink                     19  0      INFO C (as AuxElement): 20000; S 1900
 xAODTestAlg.xAODTestReadSymlinkTool     19  0      INFO From tool: C (as AuxElement): 20000; S 1900
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 0.11143
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO ---> Loop Finished (seconds): 0.219071
 Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-IncidentProcAlg2                                   INFO Finalize
-EventSelector                                      INFO finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
+ApplicationMgr                          19  0      INFO Application Manager Stopped successfully
+IncidentProcAlg1                        19  0      INFO Finalize
+SGInputLoader                           19  0      INFO Finalizing SGInputLoader...
+IncidentProcAlg2                        19  0      INFO Finalize
+EventSelector                           19  0      INFO finalize
+AvalancheSchedulerSvc                   19  0      INFO Joining Scheduler thread
 AvalancheSchedulerSvc                   19  0      INFO Terminating thread-pool resources
-TimelineSvc                                        INFO Outputting timeline with 200 entries to file  'TimelineFile':timeline.csv
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+TimelineSvc                             19  0      INFO Outputting timeline with 200 entries to file  'TimelineFile':timeline.csv
+EventDataSvc                            19  0      INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
+AthDictLoaderSvc                        19  0      INFO in finalize...
+ToolSvc                                 19  0      INFO Removing all tools created by ToolSvc
+ChronoStatSvc.finalize()                19  0      INFO  Service finalized successfully 
+ApplicationMgr                          19  0      INFO Application Manager Finalized successfully
+ApplicationMgr                          19  0      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/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref
index 5572ce984d3930e1f998be5f656f1a21ddf6fd10..aa7e507aaab391f22bfcf91a004ec68fafc2e5fd 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestSymlinks2MT.ref
@@ -1,7 +1,7 @@
-Thu Jul  6 15:06:45 CEST 2017
-Preloading tcmalloc_minimal.so
+Tue Aug 29 16:02:51 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.0] [x86_64-slc6-gcc62-opt] [atlas-work3g/22c15a400d] -- built on [2017-07-06T1502]
+Py:Athena            INFO using release [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
@@ -10,22 +10,23 @@ Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestSymlinks2MT_jo.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestSymlinks2_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5355 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 461 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-[?1034hPy:Athena            INFO including file "AthenaCommon/runbatch.py"
+Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 MessageSvc           INFO Activating in a separate thread
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
-                                          running on lxplus064.cern.ch on Thu Jul  6 15:07:13 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Tue Aug 29 16:03:01 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
 ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 AthDictLoaderSvc                                   INFO in initialize...
 AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 9844 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 10328 CLIDRegistry entries for module ALL
 ChronoStatSvc                                      INFO  Number of skipped events for MemStat-1
 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) 
@@ -35,9 +36,9 @@ AthenaPoolCnvSvc                                   INFO Initializing AthenaPoolC
 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/2017-07-05T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-opt/share/dbreplica.config
-DBReplicaSvc                                       INFO Total of 10 servers found for host lxplus064.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc                                       INFO Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc                                       INFO No specific match for domain found - use default fallback
+DBReplicaSvc                                       INFO Total of 1 servers found for host karma [atlas_dd ]
 PoolSvc                                            INFO Successfully setup replica sorting algorithm
 PoolSvc                                            INFO Setting up APR FileCatalog and Streams
 PoolSvc                                            INFO POOL WriteCatalog is xmlcatalog_file:PoolFileCatalog.xml
@@ -48,21 +49,21 @@ EventSelector                                      INFO reinitialization...
 EventSelector                                      INFO EventSelection with query 
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] AD66940D-70D8-0844-BBEB-B2FA49C6FE32
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 85E762FA-DAE7-6D47-8B78-A523D218DBEB
 Domain[ROOT_All] Info                           xaoddata.root
 RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 EventPersistencySvc                                INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventSelector                                      INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00
+EventSelector                                      INFO reinitialization...
+EventSelector                                      INFO EventSelection with query 
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
-EventSelector                                      INFO reinitialization...
-EventSelector                                      INFO EventSelection with query 
 AthenaPoolAddressProviderSvc                       INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-00-00
-ClassIDSvc                                         INFO  getRegistryEntries: read 1487 CLIDRegistry entries for module ALL
+ClassIDSvc                                         INFO  getRegistryEntries: read 1402 CLIDRegistry entries for module ALL
 ThreadPoolSvc                                      INFO no thread init tools attached
 AvalancheSchedulerSvc                              INFO Activating scheduler in a separate thread
 AvalancheSchedulerSvc                              INFO Waiting for AvalancheSchedulerSvc to activate
@@ -100,12 +101,12 @@ HistogramPersistencySvc                         WARNING Histograms saving not re
 AthenaHiveEventLoopMgr                             INFO Setup EventSelector service EventSelector
 ApplicationMgr                                     INFO Application Manager Initialized successfully
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] AD66940D-70D8-0844-BBEB-B2FA49C6FE32
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 85E762FA-DAE7-6D47-8B78-A523D218DBEB
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] AD66940D-70D8-0844-BBEB-B2FA49C6FE32
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 85E762FA-DAE7-6D47-8B78-A523D218DBEB
 Domain[ROOT_All] Info                           xaoddata.root
 RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
@@ -113,85 +114,85 @@ ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 ApplicationMgr                                     INFO Application Manager Started successfully
 AthenaHiveEventLoopMgr                             INFO Starting loop on events
 AthenaPoolConverter                                INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start of run 0    <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start of run 0    <<<===
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  start processing event #0, run #0 on slot 0,  0 events processed so far  <<<===
+ClassIDSvc                              0   0      INFO  getRegistryEntries: read 16 CLIDRegistry entries for module ALL
 xAODTestReadSymlink                     0   0      INFO C (as AuxElement): 1000; S 0
-ClassIDSvc                              0   0      INFO  getRegistryEntries: read 50 CLIDRegistry entries for module ALL
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
+ClassIDSvc                              0   0      INFO  getRegistryEntries: read 54 CLIDRegistry entries for module ALL
+AthenaHiveEventLoopMgr                  0   0      INFO   ===>>>  done processing event #0, run #0 on slot 0,  1 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  start processing event #1, run #0 on slot 0,  1 events processed so far  <<<===
 xAODTestReadSymlink                     1   0      INFO C (as AuxElement): 2000; S 100
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  1   0      INFO   ===>>>  done processing event #1, run #0 on slot 0,  2 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  start processing event #2, run #0 on slot 0,  2 events processed so far  <<<===
 xAODTestReadSymlink                     2   0      INFO C (as AuxElement): 3000; S 200
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  2   0      INFO   ===>>>  done processing event #2, run #0 on slot 0,  3 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  start processing event #3, run #0 on slot 0,  3 events processed so far  <<<===
 xAODTestReadSymlink                     3   0      INFO C (as AuxElement): 4000; S 300
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  3   0      INFO   ===>>>  done processing event #3, run #0 on slot 0,  4 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  start processing event #4, run #0 on slot 0,  4 events processed so far  <<<===
 xAODTestReadSymlink                     4   0      INFO C (as AuxElement): 5000; S 400
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  4   0      INFO   ===>>>  done processing event #4, run #0 on slot 0,  5 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  start processing event #5, run #0 on slot 0,  5 events processed so far  <<<===
 xAODTestReadSymlink                     5   0      INFO C (as AuxElement): 6000; S 500
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  5   0      INFO   ===>>>  done processing event #5, run #0 on slot 0,  6 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  start processing event #6, run #0 on slot 0,  6 events processed so far  <<<===
 xAODTestReadSymlink                     6   0      INFO C (as AuxElement): 7000; S 600
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  6   0      INFO   ===>>>  done processing event #6, run #0 on slot 0,  7 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  start processing event #7, run #0 on slot 0,  7 events processed so far  <<<===
 xAODTestReadSymlink                     7   0      INFO C (as AuxElement): 8000; S 700
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  7   0      INFO   ===>>>  done processing event #7, run #0 on slot 0,  8 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  start processing event #8, run #0 on slot 0,  8 events processed so far  <<<===
 xAODTestReadSymlink                     8   0      INFO C (as AuxElement): 9000; S 800
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  8   0      INFO   ===>>>  done processing event #8, run #0 on slot 0,  9 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  start processing event #9, run #0 on slot 0,  9 events processed so far  <<<===
 xAODTestReadSymlink                     9   0      INFO C (as AuxElement): 10000; S 900
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  9   0      INFO   ===>>>  done processing event #9, run #0 on slot 0,  10 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  start processing event #10, run #0 on slot 0,  10 events processed so far  <<<===
 xAODTestReadSymlink                     10  0      INFO C (as AuxElement): 11000; S 1000
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  10  0      INFO   ===>>>  done processing event #10, run #0 on slot 0,  11 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  start processing event #11, run #0 on slot 0,  11 events processed so far  <<<===
 xAODTestReadSymlink                     11  0      INFO C (as AuxElement): 12000; S 1100
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  11  0      INFO   ===>>>  done processing event #11, run #0 on slot 0,  12 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  start processing event #12, run #0 on slot 0,  12 events processed so far  <<<===
 xAODTestReadSymlink                     12  0      INFO C (as AuxElement): 13000; S 1200
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  12  0      INFO   ===>>>  done processing event #12, run #0 on slot 0,  13 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  start processing event #13, run #0 on slot 0,  13 events processed so far  <<<===
 xAODTestReadSymlink                     13  0      INFO C (as AuxElement): 14000; S 1300
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  13  0      INFO   ===>>>  done processing event #13, run #0 on slot 0,  14 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  start processing event #14, run #0 on slot 0,  14 events processed so far  <<<===
 xAODTestReadSymlink                     14  0      INFO C (as AuxElement): 15000; S 1400
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  14  0      INFO   ===>>>  done processing event #14, run #0 on slot 0,  15 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  start processing event #15, run #0 on slot 0,  15 events processed so far  <<<===
 xAODTestReadSymlink                     15  0      INFO C (as AuxElement): 16000; S 1500
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  15  0      INFO   ===>>>  done processing event #15, run #0 on slot 0,  16 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  start processing event #16, run #0 on slot 0,  16 events processed so far  <<<===
 xAODTestReadSymlink                     16  0      INFO C (as AuxElement): 17000; S 1600
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  16  0      INFO   ===>>>  done processing event #16, run #0 on slot 0,  17 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  start processing event #17, run #0 on slot 0,  17 events processed so far  <<<===
 xAODTestReadSymlink                     17  0      INFO C (as AuxElement): 18000; S 1700
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  17  0      INFO   ===>>>  done processing event #17, run #0 on slot 0,  18 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  start processing event #18, run #0 on slot 0,  18 events processed so far  <<<===
 xAODTestReadSymlink                     18  0      INFO C (as AuxElement): 19000; S 1800
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  18  0      INFO   ===>>>  done processing event #18, run #0 on slot 0,  19 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  start processing event #19, run #0 on slot 0,  19 events processed so far  <<<===
 xAODTestReadSymlink                     19  0      INFO C (as AuxElement): 20000; S 1900
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 0.547055
+AthenaHiveEventLoopMgr                  19  0      INFO   ===>>>  done processing event #19, run #0 on slot 0,  20 events processed so far  <<<===
+AthenaHiveEventLoopMgr                  19  0      INFO ---> Loop Finished (seconds): 0.100868
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] AD66940D-70D8-0844-BBEB-B2FA49C6FE32
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-SGInputLoader                                      INFO Finalizing SGInputLoader...
-IncidentProcAlg2                                   INFO Finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 85E762FA-DAE7-6D47-8B78-A523D218DBEB
+ApplicationMgr                          19  0      INFO Application Manager Stopped successfully
+IncidentProcAlg1                        19  0      INFO Finalize
+SGInputLoader                           19  0      INFO Finalizing SGInputLoader...
+IncidentProcAlg2                        19  0      INFO Finalize
+AvalancheSchedulerSvc                   19  0      INFO Joining Scheduler thread
 AvalancheSchedulerSvc                   19  0      INFO Terminating thread-pool resources
-TimelineSvc                                        INFO Outputting timeline with 120 entries to file  'TimelineFile':timeline.csv
+TimelineSvc                             19  0      INFO Outputting timeline with 120 entries to file  'TimelineFile':timeline.csv
+EventDataSvc                            19  0      INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
 Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
+AthDictLoaderSvc                        19  0      INFO in finalize...
+ToolSvc                                 19  0      INFO Removing all tools created by ToolSvc
+ChronoStatSvc.finalize()                19  0      INFO  Service finalized successfully 
+ApplicationMgr                          19  0      INFO Application Manager Finalized successfully
+ApplicationMgr                          19  0      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/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead.ref
index 732639fa662d39f0b30d313a0fbcff4742d6c4e2..0f86ed7bcfb9bb0e3d23fba4613370c01f477aad 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead.ref
@@ -1,21 +1,22 @@
-Fri Mar 17 21:56:43 CET 2017
-Preloading tcmalloc_minimal.so
+Wed Jun 21 16:12:16 EDT 2017
+WARNING: TCMALLOCDIR not defined, will use libc malloc
 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 [?-21.0.0] [i686-slc5-gcc43-dbg] [?/?] -- built on [?]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 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/xAODTestTypelessRead_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5282 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 442 configurables from 2 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "EventAthenaPool/EventAthenaPoolItemList_joboptions.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
+# setting LC_ALL to "C"
 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:56:56 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Wed Jun 21 16:12:41 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -23,55 +24,35 @@ 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 8719 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 9499 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 718 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 676 CLIDRegistry entries for module ALL
 DecisionSvc          INFO Inserting stream: Stream1 with no Algs
 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 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 Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is file:xAODTestTypelessRead_catalog.xml
+DbSession Info     Open     DbSession    
+Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
 PoolSvc              INFO Re-initializing PoolSvc
 EventSelector        INFO reinitialization...
 EventSelector        INFO EventSelection with query 
-PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
-xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
-xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
-Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
-DbSession Info     Open     DbSession    
-Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 14013D9F-6738-9C4D-B4CA-AEC7229B4BDF
-Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
+RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
 EventSelector        INFO Initializing EventSelector - package version EventSelectorAthenaPool-00-00-00
 EventSelector        INFO reinitialization...
@@ -82,7 +63,7 @@ ImplicitCollection Info Opened the implicit collection with connection string "P
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 AthenaPoolAddre...   INFO Initializing AthenaPoolAddressProviderSvc - package version EventSelectorAthenaPool-00-00-00
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 971 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1078 CLIDRegistry entries for module ALL
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version OutputStreamAthenaPool-00-00-00
 Stream1.Stream1...   INFO streamProperty ProcessingTag = Stream1
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
@@ -93,24 +74,23 @@ HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 14013D9F-6738-9C4D-B4CA-AEC7229B4BDF
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 RootCollection Info Opening Collection File xaoddata.root in mode: READ
 RootCollection Info File xaoddata.root opened
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 14013D9F-6738-9C4D-B4CA-AEC7229B4BDF
+Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 Domain[ROOT_All] Info                           xaoddata.root
-RootDatabase.open Info xaoddata.root File version:60802
+RootDatabase.open Info xaoddata.root File version:60806
 ImplicitCollection Info Opened the implicit collection with connection string "PFN:xaoddata.root"
 ImplicitCollection Info and a name "POOLContainer(DataHeader)"
 ApplicationMgr       INFO Application Manager Started successfully
-PoolSvc              INFO Failed to find container MetaDataHdrDataHeader to get Token.
 AthenaPoolConve...   INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 11 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 15 CLIDRegistry entries for module ALL
 1
-ClassIDSvc           INFO  getRegistryEntries: read 44 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
 cvec types: aFloat/float anInt/int anInt2/int cEL/ElementLink<DataVector<DMTest::C_v1,DataModel_detail::NoBase> > dInt1/int dVar1/int dpInt1/unsigned int dpvFloat/std::vector<float,std::allocator<float> > pFloat/float pInt/unsigned int pvFloat/std::vector<float,std::allocator<float> > pvInt/std::vector<int,std::allocator<int> > 
   aFloat: 200.000; anInt: 101; anInt2: 301; cEL: cvec[9]; dInt1: 401; dVar1: 451; dpInt1: 51; 
     dpvFloat: []; pFloat: 0.010; pInt: 501; 
@@ -154,7 +134,7 @@ cvec types: aFloat/float anInt/int anInt2/int cEL/ElementLink<DataVector<DMTest:
     pvInt: [-310 -309 -308 -307 -306 -305 -304 -303 -302 ]; 
 cinfo types: aFloat/float anInt/int anInt2/int cEL/ElementLink<DataVector<DMTest::C_v1,DataModel_detail::NoBase> > dInt1/int 
 aFloat: 0.100; anInt: 1000; anInt2: 2000; cEL: cvec[1]; dInt1: 3000; 
-ClassIDSvc           INFO  getRegistryEntries: read 30 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 32 CLIDRegistry entries for module ALL
 ctrig types: aFloat/float anInt/int anInt2/int dInt1/int 
   aFloat: 600.000; anInt: 501; anInt2: 701; dInt1: 481; 
   aFloat: 600.100; anInt: 502; anInt2: 702; dInt1: 482; 
@@ -280,9 +260,9 @@ hview
   aFloat: 401.500; 
 DbSession Info     Open     DbSession    
 Domain[ROOT_All] Info >   Access   DbDomain     UPDATE    [ROOT_All] 
-Domain[ROOT_All] Info ->  Access   DbDatabase   CREATE    [ROOT_All] 6BB654D5-9FB3-734F-BAD3-EED2A78978A3
+Domain[ROOT_All] Info ->  Access   DbDatabase   CREATE    [ROOT_All] 4D6435DB-E4BA-A14B-8797-1FE0A1464B2E
 Domain[ROOT_All] Info                           xaoddata3.root
-RootDatabase.open Info xaoddata3.root File version:60802
+RootDatabase.open Info xaoddata3.root File version:60806
 StorageSvc Info Building shape according to reflection information using shape ID for:
 StorageSvc Info DataVector<DMTest::H_v2> [CD6C3074-425B-4C08-AF1C-43D7E8C84288]
 StorageSvc Info Building shape according to reflection information using shape ID for:
@@ -800,48 +780,8 @@ AthenaEventLoopMgr   INFO   ===>>>  done processing event #3, run #0 4 events pr
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #4, run #0 4 events processed so far  <<<===
 5
 cvec types: aFloat/float anInt/int anInt2/int cEL/ElementLink<DataVector<DMTest::C_v1,DataModel_detail::NoBase> > dInt1/int dVar1/int dpInt1/unsigned int dpvFloat/std::vector<float,std::allocator<float> > pFloat/float pInt/unsigned int pvFloat/std::vector<float,std::allocator<float> > pvInt/std::vector<int,std::allocator<int> > 
-  aFloat: 1000.000; anInt: 501; anInt2: 1501; cEL: cvec[9]; dInt1: 2001; dVar1: 2251; dpInt1: 251; 
-    dpvFloat: []; pFloat: 0.050; pInt: 2501; 
-    pvFloat: []; 
-    pvInt: []; 
-  aFloat: 1000.100; anInt: 502; anInt2: 1502; cEL: cvec[8]; dInt1: 2002; dVar1: 2252; dpInt1: 252; 
-    dpvFloat: [0.150 ]; pFloat: 1.050; pInt: 2502; 
-    pvFloat: [-0.485 ]; 
-    pvInt: [10 ]; 
-  aFloat: 1000.200; anInt: 503; anInt2: 1503; cEL: cvec[7]; dInt1: 2003; dVar1: 2253; dpInt1: 253; 
-    dpvFloat: [0.250 0.251 ]; pFloat: 2.050; pInt: 2503; 
-    pvFloat: [-0.475 -0.375 ]; 
-    pvInt: [20 21 ]; 
-  aFloat: 1000.300; anInt: 504; anInt2: 1504; cEL: cvec[6]; dInt1: 2004; dVar1: 2254; dpInt1: 254; 
-    dpvFloat: [0.350 0.351 0.352 ]; pFloat: 3.050; pInt: 2504; 
-    pvFloat: [-0.465 -0.365 -0.265 ]; 
-    pvInt: [30 31 32 ]; 
-  aFloat: 1000.400; anInt: 505; anInt2: 1505; cEL: cvec[5]; dInt1: 2005; dVar1: 2255; dpInt1: 255; 
-    dpvFloat: [0.450 0.451 0.452 0.453 ]; pFloat: 4.050; pInt: 2505; 
-    pvFloat: [-0.455 -0.355 -0.255 -0.155 ]; 
-    pvInt: [40 41 42 43 ]; 
-  aFloat: 1000.500; anInt: 506; anInt2: 1506; cEL: cvec[4]; dInt1: 2006; dVar1: 2256; dpInt1: 256; 
-    dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]; pFloat: 5.050; pInt: 2506; 
-    pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]; 
-    pvInt: [50 51 52 53 54 ]; 
-  aFloat: 1000.600; anInt: 507; anInt2: 1507; cEL: cvec[3]; dInt1: 2007; dVar1: 2257; dpInt1: 257; 
-    dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]; pFloat: 6.050; pInt: 2507; 
-    pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]; 
-    pvInt: [60 61 62 63 64 65 ]; 
-  aFloat: 1000.700; anInt: 508; anInt2: 1508; cEL: cvec[2]; dInt1: 2008; dVar1: 2258; dpInt1: 258; 
-    dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]; pFloat: 7.050; pInt: 2508; 
-    pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]; 
-    pvInt: [70 71 72 73 74 75 76 ]; 
-  aFloat: 1000.800; anInt: 509; anInt2: 1509; cEL: cvec[1]; dInt1: 2009; dVar1: 2259; dpInt1: 259; 
-    dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]; pFloat: 8.050; pInt: 2509; 
-    pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]; 
-    pvInt: [80 81 82 83 84 85 86 87 ]; 
-  aFloat: 1000.900; anInt: 510; anInt2: 1510; cEL: cvec[0]; dInt1: 2010; dVar1: 2260; dpInt1: 260; 
-    dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]; pFloat: 9.050; pInt: 2510; 
-    pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]; 
-    pvInt: [90 91 92 93 94 95 96 97 98 ]; 
 cinfo types: aFloat/float anInt/int anInt2/int cEL/ElementLink<DataVector<DMTest::C_v1,DataModel_detail::NoBase> > dInt1/int 
-aFloat: 0.500; anInt: 5000; anInt2: 10000; cEL: cvec[5]; dInt1: 15000; 
+aFloat: 0.500; anInt: 5000; anInt2: 10000; cEL: [18446744073709551615]; dInt1: 15000; 
 ctrig types: aFloat/float anInt/int anInt2/int dInt1/int 
   aFloat: 3000.000; anInt: 2501; anInt2: 3501; dInt1: 2401; 
   aFloat: 3000.100; anInt: 2502; anInt2: 3502; dInt1: 2402; 
@@ -882,47 +822,6 @@ cvecWD types: aFloat/float anInt/int pFloat/float pInt/unsigned int pvFloat/std:
   aFloat: 0.000; anInt: 1010; pFloat: 0.000; pInt: 0; 
     pvFloat: []; 
     pvInt: []; 
-cview
-  aFloat: 1000.900; anInt: 510; anInt2: 1510; cEL: cvec[0]; dInt1: 2010; dVar1: 2260; dpInt1: 260; 
-    dpvFloat: [0.950 0.951 0.952 0.953 0.954 0.955 0.956 0.957 0.958 ]; pFloat: 9.050; pInt: 2510; 
-    pvFloat: [-0.405 -0.305 -0.205 -0.105 -0.005 0.095 0.195 0.295 0.395 ]; 
-    pvInt: [90 91 92 93 94 95 96 97 98 ]; 
-  aFloat: 1000.800; anInt: 509; anInt2: 1509; cEL: cvec[1]; dInt1: 2009; dVar1: 2259; dpInt1: 259; 
-    dpvFloat: [0.850 0.851 0.852 0.853 0.854 0.855 0.856 0.857 ]; pFloat: 8.050; pInt: 2509; 
-    pvFloat: [-0.415 -0.315 -0.215 -0.115 -0.015 0.085 0.185 0.285 ]; 
-    pvInt: [80 81 82 83 84 85 86 87 ]; 
-  aFloat: 1000.700; anInt: 508; anInt2: 1508; cEL: cvec[2]; dInt1: 2008; dVar1: 2258; dpInt1: 258; 
-    dpvFloat: [0.750 0.751 0.752 0.753 0.754 0.755 0.756 ]; pFloat: 7.050; pInt: 2508; 
-    pvFloat: [-0.425 -0.325 -0.225 -0.125 -0.025 0.075 0.175 ]; 
-    pvInt: [70 71 72 73 74 75 76 ]; 
-  aFloat: 1000.600; anInt: 507; anInt2: 1507; cEL: cvec[3]; dInt1: 2007; dVar1: 2257; dpInt1: 257; 
-    dpvFloat: [0.650 0.651 0.652 0.653 0.654 0.655 ]; pFloat: 6.050; pInt: 2507; 
-    pvFloat: [-0.435 -0.335 -0.235 -0.135 -0.035 0.065 ]; 
-    pvInt: [60 61 62 63 64 65 ]; 
-  aFloat: 1000.500; anInt: 506; anInt2: 1506; cEL: cvec[4]; dInt1: 2006; dVar1: 2256; dpInt1: 256; 
-    dpvFloat: [0.550 0.551 0.552 0.553 0.554 ]; pFloat: 5.050; pInt: 2506; 
-    pvFloat: [-0.445 -0.345 -0.245 -0.145 -0.045 ]; 
-    pvInt: [50 51 52 53 54 ]; 
-  aFloat: 1000.400; anInt: 505; anInt2: 1505; cEL: cvec[5]; dInt1: 2005; dVar1: 2255; dpInt1: 255; 
-    dpvFloat: [0.450 0.451 0.452 0.453 ]; pFloat: 4.050; pInt: 2505; 
-    pvFloat: [-0.455 -0.355 -0.255 -0.155 ]; 
-    pvInt: [40 41 42 43 ]; 
-  aFloat: 1000.300; anInt: 504; anInt2: 1504; cEL: cvec[6]; dInt1: 2004; dVar1: 2254; dpInt1: 254; 
-    dpvFloat: [0.350 0.351 0.352 ]; pFloat: 3.050; pInt: 2504; 
-    pvFloat: [-0.465 -0.365 -0.265 ]; 
-    pvInt: [30 31 32 ]; 
-  aFloat: 1000.200; anInt: 503; anInt2: 1503; cEL: cvec[7]; dInt1: 2003; dVar1: 2253; dpInt1: 253; 
-    dpvFloat: [0.250 0.251 ]; pFloat: 2.050; pInt: 2503; 
-    pvFloat: [-0.475 -0.375 ]; 
-    pvInt: [20 21 ]; 
-  aFloat: 1000.100; anInt: 502; anInt2: 1502; cEL: cvec[8]; dInt1: 2002; dVar1: 2252; dpInt1: 252; 
-    dpvFloat: [0.150 ]; pFloat: 1.050; pInt: 2502; 
-    pvFloat: [-0.485 ]; 
-    pvInt: [10 ]; 
-  aFloat: 1000.000; anInt: 501; anInt2: 1501; cEL: cvec[9]; dInt1: 2001; dVar1: 2251; dpInt1: 251; 
-    dpvFloat: []; pFloat: 0.050; pInt: 2501; 
-    pvFloat: []; 
-    pvInt: []; 
 hvec types: aFloat/float 
   aFloat: 2001.500; 
   aFloat: 2002.500; 
@@ -3503,9 +3402,9 @@ hview
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
 Stream1              INFO Records written: 21
 xaoddata.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 14013D9F-6738-9C4D-B4CA-AEC7229B4BDF
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] F951BFB1-7EE9-0D44-8107-A86EA5382814
 xaoddata3.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   CREATE    [ROOT_All] 6BB654D5-9FB3-734F-BAD3-EED2A78978A3
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   CREATE    [ROOT_All] 4D6435DB-E4BA-A14B-8797-1FE0A1464B2E
 Domain[ROOT_All] Info >   Deaccess DbDomain     UPDATE    [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite_jo.py b/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite_jo.py
index f86dda91035ad6a6783f91b1835a0c54f16e01ee..50c6aba470b535db94daed95d651f2bb39422aaf 100755
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite_jo.py
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite_jo.py
@@ -134,3 +134,7 @@ ChronoStatSvc.StatPrintOutTable   = FALSE
 # to avoid races when running tests in parallel.
 PoolSvc = Service( "PoolSvc" )
 PoolSvc.WriteCatalog = "file:xAODTestWrite_catalog.xml"
+
+# Increment LBN every two events.
+from McEventSelector import McEventSelectorConf
+svcMgr+=McEventSelectorConf.McEventSelector('EventSelector',EventsPerLB=2)
diff --git a/Control/DataModelTest/DataModelRunTests/test/post.sh b/Control/DataModelTest/DataModelRunTests/test/post.sh
index 3ca1cc7e4ca938d5ec195d2b3d488d7705d9af9a..e09fa14bed24ba50f4f6d1966dcb2bda5236dc0b 100755
--- a/Control/DataModelTest/DataModelRunTests/test/post.sh
+++ b/Control/DataModelTest/DataModelRunTests/test/post.sh
@@ -174,6 +174,7 @@ PP="$PP"'|^GUID: Class|^WARNING: Cannot import TrigEDMConfig.TriggerEDM.getARATy
 PP="$PP"'|^GUID: Class|^AthenaRootStr.* INFO|^Warning in .* found in .* is already in'
 PP="$PP"'|no dictionary for class|INFO eformat version|INFO event storage'
 PP="$PP"'|^RootDatabase.open Info'
+PP="$PP"'|Unable to locate catalog'
 
 # StoreGate INFO messages changed to VERBOSE
 PP="$PP"'|^(StoreGateSvc|DetectorStore|MetaDataStore|InputMetaDataStore|TagMetaDataStore) +(INFO|VERBOSE) (Stop|stop|Start)'
@@ -189,8 +190,16 @@ PP="$PP"'|INFO massageEventInfo:'
 PP="$PP"'|Loop Finished'
 
 # Hive ordering.
-PP="$PP"'|Terminating thread-pool resources|Joining Scheduler thread'
+PP="$PP"'|Terminating thread-pool resources|Joining Scheduler thread|Disconnecting from sqlite|Opening COOL connection|Initializing CondInputLoader|preLoadAddresses: Removing|IOVRanges will be checked|User session with|ConnectionService Info|Disconnect from the database|RalSessionMgr Info|Connect to the database'
 
+# Cool timing information.
+PP="$PP"'|db-read|read from COOL|ReadTime:'
+
+# EventInfoMgtInit
+PP="$PP"'|Got release version'
+
+# Messages depending on environment settings.
+PP="$PP"'|COOL_DISABLE_CORALCONNECTION|INFO Cache alignment'
 
 
 test=$1
diff --git a/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt b/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt
index 774aaae820efe0931e70639094f178e16d2498e0..bbd9c1f31a14fb3c3291434d2d695ae4d70c90f0 100644
--- a/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt
+++ b/Control/DataModelTest/DataModelTestDataCommon/CMakeLists.txt
@@ -18,6 +18,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/AthLinks
                           Control/StoreGate
                           Control/AthenaBaseComps
+                          Database/AthenaPOOL/AthenaPoolUtilities
+                          Database/RegistrationServices
                           Trigger/TrigDataAccess/TrigSerializeCnvSvc )
 
 # External dependencies:
@@ -29,7 +31,7 @@ atlas_add_library( DataModelTestDataCommonLib
                    PUBLIC_HEADERS DataModelTestDataCommon
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    LINK_LIBRARIES AthContainers SGTools xAODCore xAODTrigger EventInfo GaudiKernel
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks StoreGateLib AthenaBaseComps )
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks StoreGateLib AthenaBaseComps AthenaPoolUtilities )
 
 atlas_add_component( DataModelTestDataCommon
                      src/components/*.cxx
diff --git a/Control/DataModelTest/DataModelTestDataCommon/DataModelTestDataCommon/S1Cond.h b/Control/DataModelTest/DataModelTestDataCommon/DataModelTestDataCommon/S1Cond.h
new file mode 100644
index 0000000000000000000000000000000000000000..c306e3751b3b63c906dc39831333b6f315daca69
--- /dev/null
+++ b/Control/DataModelTest/DataModelTestDataCommon/DataModelTestDataCommon/S1Cond.h
@@ -0,0 +1,26 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file DataModelTestDataCommon/S1Cond.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Conditions declarations for S1.
+ */
+
+
+#ifndef DATAMODELTESTDATACOMMON_S1COND_H
+#define DATAMODELTESTDATACOMMON_S1COND_H
+
+
+#include "DataModelTestDataCommon/S1.h"
+#include "SGTools/BaseInfo.h"
+#include "AthenaKernel/CondCont.h"
+
+
+CLASS_DEF (CondCont<DMTest::S1>, 243030043, 0)
+
+
+#endif // not DATAMODELTESTDATACOMMON_S1COND_H
diff --git a/Control/DataModelTest/DataModelTestDataCommon/DataModelTestDataCommon/S2.h b/Control/DataModelTest/DataModelTestDataCommon/DataModelTestDataCommon/S2.h
index a6d4771217a292f4fd4977fcc50c7d148d8c5d0e..65761d99a99f1fbfe008f9896049b037cec37f63 100644
--- a/Control/DataModelTest/DataModelTestDataCommon/DataModelTestDataCommon/S2.h
+++ b/Control/DataModelTest/DataModelTestDataCommon/DataModelTestDataCommon/S2.h
@@ -17,6 +17,7 @@
 
 #include "DataModelTestDataCommon/S1.h"
 #include "SGTools/CLASS_DEF.h"
+#include "AthenaKernel/BaseInfo.h"
 
 
 namespace DMTest {
@@ -34,6 +35,7 @@ public:
 
 
 CLASS_DEF (DMTest::S2, 243020042, 0)
+SG_ADD_BASE (DMTest::S2, DMTest::S1);
 
 
 #endif // not DATAMODELTESTDATACOMMON_S2_H
diff --git a/Control/DataModelTest/DataModelTestDataCommon/DataModelTestDataCommon/S2Cond.h b/Control/DataModelTest/DataModelTestDataCommon/DataModelTestDataCommon/S2Cond.h
new file mode 100644
index 0000000000000000000000000000000000000000..d94d27d91b43bd351d3e11ecd9962652b85dda96
--- /dev/null
+++ b/Control/DataModelTest/DataModelTestDataCommon/DataModelTestDataCommon/S2Cond.h
@@ -0,0 +1,29 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file DataModelTestDataCommon/S2Cond.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Conditions declarations for S2.
+ */
+
+
+#ifndef DATAMODELTESTDATACOMMON_S2COND_H
+#define DATAMODELTESTDATACOMMON_S2COND_H
+
+
+#include "DataModelTestDataCommon/S2.h"
+#include "DataModelTestDataCommon/S1Cond.h"
+#include "SGTools/BaseInfo.h"
+#include "AthenaKernel/CondCont.h"
+
+
+CONDCONT_BASE (DMTest::S2, DMTest::S1);
+
+CLASS_DEF (CondCont<DMTest::S2>, 243030042, 0)
+
+
+#endif // not DATAMODELTESTDATACOMMON_S2COND_H
diff --git a/Control/DataModelTest/DataModelTestDataCommon/cmt/requirements b/Control/DataModelTest/DataModelTestDataCommon/cmt/requirements
deleted file mode 100755
index b5ec5dfe1d38aa2346ee52547d60bb8f3c08be08..0000000000000000000000000000000000000000
--- a/Control/DataModelTest/DataModelTestDataCommon/cmt/requirements
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# $Id: requirements,v 1.3 2007-07-24 10:06:39 nir Exp $
-#
-# @file  cmt/requirements
-# @author scott snyder
-# @date Nov 2005
-# @brief DataModelTestDataCommon cmt requirements file.
-#
-
-package DataModelTestDataCommon
-
-author scott snyder <snyder@bnl.gov>
-
-use AtlasPolicy    AtlasPolicy-*
-use GaudiInterface GaudiInterface-*                   External
-use AthContainersInterfaces AthContainersInterfaces-* Control
-use AthContainers  AthContainers-* Control
-use xAODCore       xAODCore-*      Event/xAOD
-use xAODTrigger    xAODTrigger-*   Event/xAOD
-use SGTools        SGTools-*       Control
-
-private
-use AtlasROOT      AtlasROOT-*     External
-use AthLinks       AthLinks-*      Control
-end_private
-
-library DataModelTestDataCommon ../src/*.cxx
-apply_pattern installed_library
-
-private
-use AtlasReflex  AtlasReflex-*  External  -no_auto_imports
-
-apply_tag no_rootmap
-apply_pattern lcgdict dict=DataModelTestDataCommon selectionfile=selection.xml\
-  elementLinks="DMTest::BAuxVec DMTest::CVec_v1" \
-  headerfiles="../DataModelTestDataCommon/DataModelTestDataCommonDict.h" \
-  extralibfiles=../src/dict/*.cxx
-
-
-private
-use TrigSerializeUtils  TrigSerializeUtils-*    Trigger/TrigDataAccess
-
-
-apply_pattern sercnv \
- typesWithNamespace="DMTest::CVec DMTest::CView DMTest::CAuxContainer" \
- files=" -s=${DataModelTestDataCommon_root}/DataModelTestDataCommon \
-             CVec.h CView.h CAuxContainer.h "
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg1.cxx b/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg1.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..60344d3e15f3c08c61cfbd48e16f645863f749e5
--- /dev/null
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg1.cxx
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file DataModelTestDataCommon/src/CondAlg1.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Testing conditions algorithms.
+ */
+
+
+#include "CondAlg1.h"
+
+
+namespace DMTest {
+
+
+/**
+ * @brief Constructor.
+ * @param name The algorithm name.
+ * @param pSvcLocator The service locator.
+ */
+CondAlg1::CondAlg1 (const std::string &name, ISvcLocator *pSvcLocator)
+  : AthReentrantAlgorithm (name, pSvcLocator),
+    m_attrListKey ("/DMTest/TestAttrList"),
+    m_scondKey ("scond", "DMTest")
+{
+  declareProperty ("AttrListKey",  m_attrListKey);
+  declareProperty ("SCondKey",  m_scondKey);
+}
+
+
+/**
+ * @brief Algorithm initialization; called at the beginning of the job.
+ */
+StatusCode CondAlg1::initialize()
+{
+  ATH_CHECK( m_attrListKey.initialize() );
+  ATH_CHECK( m_scondKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+
+/**
+ * @brief Algorithm event processing.
+ */
+StatusCode CondAlg1::execute_r (const EventContext& ctx) const
+{
+  SG::ReadCondHandle<AthenaAttributeList> attrList (m_attrListKey, ctx);
+  int xint = (**attrList)["xint"].data<int>();
+
+  EventIDRange range;
+  ATH_CHECK( attrList.range(range) );
+
+  SG::WriteCondHandle<DMTest::S2> scond (m_scondKey, ctx);
+  auto s2 = std::make_unique<DMTest::S2> (xint*100);
+  ATH_CHECK( scond.record (range, std::move(s2)) );
+
+  return StatusCode::SUCCESS;
+}
+
+
+} // namespace DMTest
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg1.h b/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg1.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a8afa2372448ee07b596ae04a98e402605febec
--- /dev/null
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/CondAlg1.h
@@ -0,0 +1,61 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file DataModelTestDataCommon/src/CondAlg1.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Testing conditions algorithms.
+ */
+
+
+#ifndef DATAMODELTESTDATACOMMON_CONDALG1_H
+#define DATAMODELTESTDATACOMMON_CONDALG1_H
+
+
+#include "DataModelTestDataCommon/S2Cond.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "AthenaPoolUtilities/AthenaAttributeList.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/WriteCondHandleKey.h"
+
+
+namespace DMTest {
+
+
+class CondAlg1
+  : public AthReentrantAlgorithm
+{
+public:
+  /**
+   * @brief Constructor.
+   * @param name The algorithm name.
+   * @param pSvcLocator The service locator.
+   */
+  CondAlg1 (const std::string &name, ISvcLocator *pSvcLocator);
+
+
+  /**
+   * @brief Algorithm initialization; called at the beginning of the job.
+   */
+  virtual StatusCode initialize() override;
+
+
+  /**
+   * @brief Algorithm event processing.
+   */
+  virtual StatusCode execute_r (const EventContext& ctx) const override;
+
+
+private:
+  SG::ReadCondHandleKey<AthenaAttributeList> m_attrListKey;
+  SG::WriteCondHandleKey<DMTest::S2> m_scondKey;
+};
+
+
+} // namespace DMTest
+
+
+#endif // not DATAMODELTESTDATACOMMON_CONDALG1_H
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/CondReaderAlg.cxx b/Control/DataModelTest/DataModelTestDataCommon/src/CondReaderAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..05cb5e0b1bae97bd43eff188ad8643d2800bf18e
--- /dev/null
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/CondReaderAlg.cxx
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file DataModelTestDataCommon/src/CondReaderAlg.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Write some conditions objects for testing purposes.
+ */
+
+
+#include "CondReaderAlg.h"
+#include "EventInfo/EventID.h"
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/ReadCondHandle.h"
+
+
+namespace DMTest {
+
+
+/**
+ * @brief Constructor.
+ * @param name The algorithm name.
+ * @param pSvcLocator The service locator.
+ */
+CondReaderAlg::CondReaderAlg (const std::string &name, ISvcLocator *pSvcLocator)
+  : AthReentrantAlgorithm (name, pSvcLocator),
+    m_attrListKey ("/DMTest/TestAttrList"),
+    m_scondKey ("scond", "DMTest"),
+    m_s2Key ("/DMTest/S2")
+{
+  declareProperty ("EventInfoKey", m_eventInfoKey = "McEventInfo");
+  declareProperty ("AttrListKey",  m_attrListKey);
+  declareProperty ("SCondKey",     m_scondKey);
+  declareProperty ("S2Key",        m_s2Key);
+}
+
+
+/**
+ * @brief Algorithm initialization; called at the beginning of the job.
+ */
+StatusCode CondReaderAlg::initialize()
+{
+  ATH_CHECK( m_eventInfoKey.initialize() );
+  ATH_CHECK( m_attrListKey.initialize() );
+  ATH_CHECK( m_scondKey.initialize() );
+  ATH_CHECK( m_s2Key.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+
+/**
+ * @brief Algorithm event processing.
+ */
+StatusCode CondReaderAlg::execute_r (const EventContext& ctx) const
+{
+  SG::ReadHandle<EventInfo> eventInfo (m_eventInfoKey, ctx);
+
+  ATH_MSG_INFO ("Event " << eventInfo->event_ID()->event_number() <<
+                " LBN " << eventInfo->event_ID()->lumi_block());
+
+  SG::ReadCondHandle<AthenaAttributeList> attrList (m_attrListKey, ctx);
+  ATH_MSG_INFO ("  xint " << (**attrList)["xint"]);
+
+  SG::ReadCondHandle<DMTest::S1> s1 (m_scondKey, ctx);
+  ATH_MSG_INFO ("  scond " << s1->m_x );
+
+  SG::ReadCondHandle<DMTest::S1> s2 (m_s2Key, ctx);
+  ATH_MSG_INFO ("  s2 " << s2->m_x );
+
+  return StatusCode::SUCCESS;
+}
+
+
+} // namespace DMTest
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/CondReaderAlg.h b/Control/DataModelTest/DataModelTestDataCommon/src/CondReaderAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..28d0085b8dd35bb0da879a3a4e820c593d10d87c
--- /dev/null
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/CondReaderAlg.h
@@ -0,0 +1,64 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file DataModelTestDataCommon/src/CondReaderAlg.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Testing conditions handling.
+ */
+
+
+#ifndef DATAMODELTESTDATACOMMON_CONDREADERALG_H
+#define DATAMODELTESTDATACOMMON_CONDREADERALG_H
+
+
+#include "DataModelTestDataCommon/S1Cond.h"
+#include "EventInfo/EventInfo.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "AthenaPoolUtilities/AthenaAttributeList.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
+
+namespace DMTest {
+
+
+class CondReaderAlg
+  : public AthReentrantAlgorithm
+{
+public:
+  /**
+   * @brief Constructor.
+   * @param name The algorithm name.
+   * @param pSvcLocator The service locator.
+   */
+  CondReaderAlg (const std::string &name, ISvcLocator *pSvcLocator);
+
+
+  /**
+   * @brief Algorithm initialization; called at the beginning of the job.
+   */
+  virtual StatusCode initialize() override;
+
+
+  /**
+   * @brief Algorithm event processing.
+   */
+  virtual StatusCode execute_r (const EventContext& ctx) const override;
+
+
+private:
+  SG::ReadHandleKey<EventInfo> m_eventInfoKey;
+  SG::ReadCondHandleKey<AthenaAttributeList> m_attrListKey;
+  SG::ReadCondHandleKey<DMTest::S1> m_scondKey;
+  SG::ReadCondHandleKey<DMTest::S1> m_s2Key;
+};
+
+
+} // namespace DMTest
+
+
+#endif // not DATAMODELTESTDATACOMMON_CONDREADERALG_H
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterAlg.cxx b/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..e877c8cd6ffbd7dafda1ec32731df0b8165615f4
--- /dev/null
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterAlg.cxx
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file DataModelTestDataCommon/src/CondWriterAlg.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Write some conditions objects for testing purposes.
+ */
+
+
+#include "CondWriterAlg.h"
+#include "DataModelTestDataCommon/S2Cond.h"
+#include "EventInfo/EventID.h"
+#include "AthenaPoolUtilities/AthenaAttributeList.h"
+#include "AthenaKernel/IOVTime.h"
+#include "AthenaKernel/IAthenaOutputStreamTool.h"
+
+
+namespace DMTest {
+
+
+/**
+ * @brief Constructor.
+ * @param name The algorithm name.
+ * @param pSvcLocator The service locator.
+ */
+CondWriterAlg::CondWriterAlg (const std::string &name, ISvcLocator *pSvcLocator)
+  : AthAlgorithm (name, pSvcLocator),
+    m_regSvc ("IOVRegistrationSvc", name),
+    m_streamer ("AthenaPoolOutputStreamTool/CondStream", this)
+{
+  declareProperty ("Streamer",     m_streamer);
+  declareProperty ("EventInfoKey", m_eventInfoKey = "McEventInfo");
+  declareProperty ("AttrListKey",  m_attrListKey = "/DMTest/TestAttrList");
+  declareProperty ("S2Key",        m_s2Key       = "/DMTest/S2");
+}
+
+
+/**
+ * @brief Algorithm initialization; called at the beginning of the job.
+ */
+StatusCode CondWriterAlg::initialize()
+{
+  ATH_CHECK( m_regSvc.retrieve() );
+  ATH_CHECK( m_streamer.retrieve() );
+  ATH_CHECK( m_eventInfoKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode CondWriterAlg::writeSCond (unsigned int count)
+{
+  auto s2 = std::make_unique<DMTest::S2> (count * 50);
+  ATH_CHECK( detStore()->overwrite (std::move (s2), m_s2Key) );
+
+  IAthenaOutputStreamTool::TypeKeyPairs typeKeys {{"DMTest::S2", m_s2Key}};
+
+  ATH_CHECK( m_streamer->connectOutput() );
+  ATH_CHECK( m_streamer->streamObjects (typeKeys) );
+  ATH_CHECK( m_streamer->commitOutput() );
+
+  ATH_CHECK( m_regSvc->registerIOV ("DMTest::S2",
+                                    m_s2Key,
+                                    "tag S2_noTag",
+                                    IOVTime::MINRUN, IOVTime::MAXRUN,
+                                    count, count+1) );
+
+  return StatusCode::SUCCESS;
+}
+
+
+/**
+ * @brief Algorithm event processing.
+ */
+StatusCode CondWriterAlg::execute()
+{
+  SG::ReadHandle<EventInfo> eventInfo (m_eventInfoKey);
+  unsigned int count = eventInfo->event_ID()->event_number();
+
+  auto attrList = std::make_unique<AthenaAttributeList>();
+  attrList->extend ("xint", "int");
+  (*attrList)["xint"].setValue(static_cast<int> ((count+1)*10));
+
+  ATH_CHECK( detStore()->overwrite (std::move (attrList), m_attrListKey) );
+
+  ATH_CHECK( m_regSvc->registerIOV ("AthenaAttributeList",
+                                    m_attrListKey,
+                                    "tag AttrList_noTag",
+                                    IOVTime::MINRUN, IOVTime::MAXRUN,
+                                    count, count) );
+
+  if (count%2 == 0) {
+    ATH_CHECK( writeSCond (count) );
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
+} // namespace DMTest
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterAlg.h b/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..ed53cc5cfc67cab408b9e17eef8c113d663477c4
--- /dev/null
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/CondWriterAlg.h
@@ -0,0 +1,70 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
+// $Id$
+/**
+ * @file DataModelTestDataCommon/CondWriterAlg.cxx
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Jul, 2017
+ * @brief Write some conditions objects for testing purposes.
+ */
+
+
+#ifndef DATAMODELTESTDATACOMMON_CONDWRITERALG_H
+#define DATAMODELTESTDATACOMMON_CONDWRITERALG_H
+
+
+#include "EventInfo/EventInfo.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "RegistrationServices/IIOVRegistrationSvc.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ToolHandle.h"
+
+
+class IAthenaOutputStreamTool;
+
+
+namespace DMTest {
+
+
+class CondWriterAlg
+  : public AthAlgorithm
+{
+public:
+  /**
+   * @brief Constructor.
+   * @param name The algorithm name.
+   * @param pSvcLocator The service locator.
+   */
+  CondWriterAlg (const std::string &name, ISvcLocator *pSvcLocator);
+
+
+  /**
+   * @brief Algorithm initialization; called at the beginning of the job.
+   */
+  virtual StatusCode initialize() override;
+
+
+  /**
+   * @brief Algorithm event processing.
+   */
+  virtual StatusCode execute() override;
+
+
+private:
+  StatusCode writeSCond (unsigned int count);
+
+  ServiceHandle<IIOVRegistrationSvc> m_regSvc;
+  ToolHandle<IAthenaOutputStreamTool> m_streamer;
+  SG::ReadHandleKey<EventInfo> m_eventInfoKey;
+  std::string m_attrListKey;
+  std::string m_s2Key;
+};
+
+
+} // namespace DMTest
+
+
+#endif // not DATAMODELTESTDATACOMMON_CONDWRITERALG_H
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/components/DataModelTestDataCommon_entries.cxx b/Control/DataModelTest/DataModelTestDataCommon/src/components/DataModelTestDataCommon_entries.cxx
index 0d5ffa06e04c001b00c3534e27aa3ffa5140e32c..c6fd98ca94cf712bfff04f50ac964d8269eeaf39 100644
--- a/Control/DataModelTest/DataModelTestDataCommon/src/components/DataModelTestDataCommon_entries.cxx
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/components/DataModelTestDataCommon_entries.cxx
@@ -16,11 +16,17 @@
 #include "../xAODTestReadDecor.h"
 #include "../xAODTestDecor.h"
 #include "../xAODTestAlg.h"
+#include "../CondWriterAlg.h"
+#include "../CondReaderAlg.h"
 #include "../xAODTestReadSymlinkTool.h"
+#include "../CondAlg1.h"
 
 DECLARE_NAMESPACE_ALGORITHM_FACTORY(DMTest, xAODTestReadSymlink)
 DECLARE_NAMESPACE_ALGORITHM_FACTORY(DMTest, xAODTestReadDecor)
 DECLARE_NAMESPACE_ALGORITHM_FACTORY(DMTest, xAODTestDecor)
 DECLARE_NAMESPACE_ALGORITHM_FACTORY(DMTest, xAODTestAlg)
+DECLARE_NAMESPACE_ALGORITHM_FACTORY(DMTest, CondWriterAlg)
+DECLARE_NAMESPACE_ALGORITHM_FACTORY(DMTest, CondReaderAlg)
+DECLARE_NAMESPACE_ALGORITHM_FACTORY(DMTest, CondAlg1)
 
 DECLARE_NAMESPACE_TOOL_FACTORY(DMTest, xAODTestReadSymlinkTool)
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/xAODTestDecor.cxx b/Control/DataModelTest/DataModelTestDataCommon/src/xAODTestDecor.cxx
index bc88a0c0b4e95232d53ad795e73ca5f4d8f563a8..723dd56138ca8bbc4489eee00713ff70fa377363 100644
--- a/Control/DataModelTest/DataModelTestDataCommon/src/xAODTestDecor.cxx
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/xAODTestDecor.cxx
@@ -73,11 +73,19 @@ StatusCode xAODTestDecor::execute_r (const EventContext& ctx) const
 
   if (m_doCInfo) {
     SG::WriteDecorHandle<C, int> cinfoDecor (m_cinfoDecorKey, ctx);
+    if (!cinfoDecor.isPresent()) {
+      ATH_MSG_ERROR( "cinfoDecor.isPresent check fails" );
+      return StatusCode::FAILURE;
+    }
     cinfoDecor(0) = cinfoDecor->anInt() + (m_offset ? 400 + m_offset : count * 2000);
   }
 
   if (m_doCVec) {
     SG::WriteDecorHandle<CVec, int> cvecDecor (m_cvecDecorKey, ctx);
+    if (!cvecDecor.isPresent()) {
+      ATH_MSG_ERROR( "cvecDecor.isPresent check fails" );
+      return StatusCode::FAILURE;
+    }
     for (const C* celt : *cvecDecor) {
       cvecDecor(*celt) = celt->anInt() + (m_offset ? m_offset : count*300);
     }
@@ -85,6 +93,10 @@ StatusCode xAODTestDecor::execute_r (const EventContext& ctx) const
 
   if (m_doCTrig) {
     SG::WriteDecorHandle<CVec, int> ctrigDecor (m_ctrigDecorKey, ctx);
+    if (!ctrigDecor.isPresent()) {
+      ATH_MSG_ERROR( "ctrigDecor.isPresent check fails" );
+      return StatusCode::FAILURE;
+    }
     for (const C* celt : *ctrigDecor) {
       ctrigDecor(*celt) = celt->anInt() + (m_offset ? 600 + m_offset : -count*20);
     }
diff --git a/Control/DataModelTest/DataModelTestDataCommon/src/xAODTestReadDecor.cxx b/Control/DataModelTest/DataModelTestDataCommon/src/xAODTestReadDecor.cxx
index 4f385c55057677b155a4b566a047f6fe1f215f6b..ef0389dfbca23b5df639d00f84d6f9170f37253d 100644
--- a/Control/DataModelTest/DataModelTestDataCommon/src/xAODTestReadDecor.cxx
+++ b/Control/DataModelTest/DataModelTestDataCommon/src/xAODTestReadDecor.cxx
@@ -61,6 +61,7 @@ StatusCode xAODTestReadDecor::execute_r (const EventContext& ctx) const
   {
     std::ostringstream ss;
     SG::ReadDecorHandle<CVec, int> cvecDecor (m_cvecDecorKey, ctx);
+    if (!cvecDecor.isPresent()) return StatusCode::FAILURE;
     for (const C* celt : *cvecDecor) {
       ss << " " << cvecDecor(*celt);
     }
@@ -69,9 +70,17 @@ StatusCode xAODTestReadDecor::execute_r (const EventContext& ctx) const
 
   {
     SG::ReadDecorHandle<C, int> cinfoDecor (m_cinfoDecorKey, ctx);
+    if (!cinfoDecor.isPresent()) return StatusCode::FAILURE;
     ATH_MSG_INFO (m_cinfoDecorKey.key() << ": " << cinfoDecor(0));
   }
 
+  {
+    SG::ReadDecorHandleKey<C> testKey (m_cinfoDecorKey);
+    testKey = testKey.key() + "_test";
+    SG::ReadDecorHandle<C, int> cinfoDecorTest (testKey, ctx);
+    if (!cinfoDecorTest.isPresent()) return StatusCode::FAILURE;
+  }
+
   return StatusCode::SUCCESS;
 }
 
diff --git a/Control/DataModelTest/DataModelTestDataRead/cmt/requirements b/Control/DataModelTest/DataModelTestDataRead/cmt/requirements
deleted file mode 100644
index 9b4830e6f823a93f1776127c520e06707b1a2295..0000000000000000000000000000000000000000
--- a/Control/DataModelTest/DataModelTestDataRead/cmt/requirements
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# $Id: requirements,v 1.7 2008-06-12 05:25:52 ssnyder Exp $
-#
-# @file  cmt/requirements
-# @author snyder@bnl.gov
-# @date Nov 2005
-# @brief DataModelTestDataRead cmt requirements file.
-#
-
-package DataModelTestDataRead
-
-author scott snyder <snyder@bnl.gov>
-
-use AtlasPolicy             AtlasPolicy-*
-use AthContainers           AthContainers-*           Control
-use AthLinks                AthLinks-*                Control
-use DataModelAthenaPool     DataModelAthenaPool-*     Control
-use DataModelTestDataCommon DataModelTestDataCommon-* Control/DataModelTest
-use GaudiInterface          GaudiInterface-*          External
-use CLIDSvc                 CLIDSvc-*                 Control
-use SGTools                 SGTools-*                 Control
-use xAODCore                xAODCore-*                Event/xAOD
-
-
-private
-use CxxUtils                CxxUtils-*                Control
-use AthContainersInterfaces AthContainersInterfaces-* Control
-use AthenaKernel            AthenaKernel-*            Control
-use StoreGate               StoreGate-*               Control
-use AthenaBaseComps         AthenaBaseComps-*         Control
-use xAODCore                xAODCore-*                Event/xAOD
-use TrigSteeringEvent       TrigSteeringEvent-*       Trigger/TrigEvent
-use TrigNavigation          TrigNavigation-*          Trigger/TrigEvent
-end_private
-
-# DRQ: Change to a dual-use library because the lcgdict pattern doesn't work with component libraries
-# when building with cmake
-####apply_pattern component_library
-####library DataModelTestDataRead *.cxx components/*.cxx
-apply_pattern dual_use_library files=*.cxx
-
-
-private
-use AtlasReflex  AtlasReflex-*  External  -no_auto_imports
-
-macro elemLinks_DataModelTestDataRead "DataVector<DMTest::B>"
-
-apply_tag no_rootmap
-apply_pattern lcgdict dict=DataModelTestDataRead selectionfile=selection.xml\
-  headerfiles="../DataModelTestDataRead/DataModelTestDataReadDict.h" \
-  elementLinks="$(elemLinks_DataModelTestDataRead)" \
-  extralibfiles=../src/dict/*.cxx
-
-
-
-private
-use TrigSerializeUtils  TrigSerializeUtils-*    Trigger/TrigDataAccess
-
-
-apply_tag no_merge_componentslist
-
-apply_pattern sercnv \
- typesWithNamespace="DMTest::HVec DMTest::HView DMTest::HAuxContainer" \
- files=" -s=${DataModelTestDataRead_root}/DataModelTestDataRead \
-             HVec.h HView.h HAuxContainer.h "
diff --git a/Control/DataModelTest/DataModelTestDataRead/src/xAODTestTypelessRead.cxx b/Control/DataModelTest/DataModelTestDataRead/src/xAODTestTypelessRead.cxx
index b6080d62fdd618e1cbfa833d2510464b114cb867..dfe556e25bc620f97066464b5b46ab90da285c80 100644
--- a/Control/DataModelTest/DataModelTestDataRead/src/xAODTestTypelessRead.cxx
+++ b/Control/DataModelTest/DataModelTestDataRead/src/xAODTestTypelessRead.cxx
@@ -267,13 +267,13 @@ xAODTestTypelessRead::testit_view (const char* key)
   const OBJ* obj = nullptr;
   CHECK( evtStore()->retrieve (obj, key) );
 
-  if (obj->empty())
-    return StatusCode::SUCCESS;
-  std::map<std::string, SG::auxid_t> auxid_map = get_map (obj->front());
-  std::cout << key << "\n";
-  std::ostringstream ost;
-  dumpobj (ost, obj, auxid_map);
-  std::cout << ost.str();
+  if (!obj->empty()) {
+    std::map<std::string, SG::auxid_t> auxid_map = get_map (obj->front());
+    std::cout << key << "\n";
+    std::ostringstream ost;
+    dumpobj (ost, obj, auxid_map);
+    std::cout << ost.str();
+  }
 
   if (!m_writePrefix.empty()) {
     CHECK (evtStore()->record (CxxUtils::make_unique<OBJ>(*obj),
diff --git a/Control/DataModelTest/DataModelTestDataReadCnv/cmt/requirements b/Control/DataModelTest/DataModelTestDataReadCnv/cmt/requirements
deleted file mode 100755
index 57556383c31d365c6e765aa442463a4e9a81db28..0000000000000000000000000000000000000000
--- a/Control/DataModelTest/DataModelTestDataReadCnv/cmt/requirements
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# $Id: requirements,v 1.4 2008-11-12 12:51:25 schaffer Exp $
-#
-# @file  cmt/requirements
-# @author scott snyder
-# @date Nov 2005
-# @brief DataModelTestDataWriteCnv cmt requirements file.
-#
-
-package DataModelTestDataReadCnv
-
-author scott snyder <snyder@bnl.gov>
-
-use AtlasPolicy             AtlasPolicy-*
-use AthenaPoolUtilities     AthenaPoolUtilities-*     Database/AthenaPOOL
-
-private
-use AthenaKernel             AthenaKernel-*             Control
-use DataModelTestDataRead    DataModelTestDataRead-*    Control/DataModelTest
-use DataModelTestDataCommon  DataModelTestDataCommon-*  Control/DataModelTest
-
-apply_tag no_merge_componentslist
-end_private
-
-apply_pattern poolcnv \
- typesWithNamespace="DMTest::BVec DMTest::DVec \
-                     DMTest::DDer DMTest::BDer DMTest::ELVec \
-                     DMTest::BAux DMTest::BAuxVec DMTest::BAuxStandalone \
-                     DMTest::C DMTest::CVec DMTest::CAuxContainer \
-                     DMTest::G DMTest::GVec DMTest::GAuxContainer \
-                     DMTest::CVecWithData \
-                     DMTest::CInfoAuxContainer \
-                     DMTest::CTrigAuxContainer \
-                     DMTest::CView \
-                     DMTest::H DMTest::HVec DMTest::HAuxContainer \
-                     DMTest::HView " \
- files="-s=${DataModelTestDataRead_root}/DataModelTestDataRead \
-             BVec.h BDer.h DVec.h DDer.h ELVec.h \
-             G.h GVec.h GAuxContainer.h \
-             H.h HVec.h HAuxContainer.h HView.h \
-        -s=${DataModelTestDataCommon_root}/DataModelTestDataCommon \
-           BAux.h BAuxVec.h BAuxStandalone.h \
-           C.h CVec.h CAuxContainer.h CView.h \
-           CVecWithData.h \
-           CInfoAuxContainer.h \
-           CTrigAuxContainer.h " 
-
-private
-# poolcnv pattern doesn't support headers in subdirectories.
-# work around.
-macro_append use_pp_cppflags " -I$(DataModelTestDataCommon_root)/DataModelTestDataCommon "
-macro_append use_pp_cppflags " -I$(DataModelTestDataRead_root)/DataModelTestDataRead "
-end_private
diff --git a/Control/DataModelTest/DataModelTestDataWrite/cmt/requirements b/Control/DataModelTest/DataModelTestDataWrite/cmt/requirements
deleted file mode 100644
index b1cab4144d9aca617908302e29bc19e26af4fe8e..0000000000000000000000000000000000000000
--- a/Control/DataModelTest/DataModelTestDataWrite/cmt/requirements
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-# $Id: requirements,v 1.7 2008-06-12 05:24:59 ssnyder Exp $
-#
-# @file  cmt/requirements
-# @author scott snyder
-# @date Nov 2005
-# @brief DataModelTestDataWrite cmt requirements file.
-#
-
-package DataModelTestDataWrite
-
-author scott snyder <snyder@bnl.gov>
-
-use AtlasPolicy             AtlasPolicy-*
-use AthLinks                AthLinks-*                Control
-use AthContainers           AthContainers-*           Control
-use DataModelAthenaPool     DataModelAthenaPool-*     Control
-use DataModelTestDataCommon DataModelTestDataCommon-* Control/DataModelTest
-use GaudiInterface          GaudiInterface-*          External
-use CLIDSvc                 CLIDSvc-*                 Control
-use SGTools                 SGTools-*                 Control
-use xAODCore                xAODCore-*                Event/xAOD
-
-
-private
-use CxxUtils                CxxUtils-*                Control
-use AthenaKernel            AthenaKernel-*            Control
-use AthContainersInterfaces AthContainersInterfaces-* Control
-use StoreGate               StoreGate-*               Control
-use AthenaBaseComps         AthenaBaseComps-*         Control
-#use xAODEventInfo           xAODEventInfo-*           Event/xAOD
-use EventInfo               EventInfo-*               Event
-use TrigSteeringEvent       TrigSteeringEvent-*       Trigger/TrigEvent
-use TrigNavigation          TrigNavigation-*          Trigger/TrigEvent
-end_private
-
-####apply_pattern component_library
-####library DataModelTestDataWrite *.cxx components/*.cxx
-apply_pattern dual_use_library files=*.cxx
-
-private
-use AtlasReflex  AtlasReflex-*  External  -no_auto_imports
-
-macro elemLinks_DataModelTestDataWrite "DataVector<DMTest::B>"
-
-apply_tag no_rootmap
-apply_pattern lcgdict dict=DataModelTestDataWrite selectionfile=selection.xml\
-  headerfiles="../DataModelTestDataWrite/DataModelTestDataWriteDict.h" \
-  elementLinks="$(elemLinks_DataModelTestDataWrite)" \
-  extralibfiles=../src/dict/*.cxx
-
-
-private
-use TrigSerializeUtils  TrigSerializeUtils-*    Trigger/TrigDataAccess
-
-
-apply_tag no_merge_componentslist
-
-apply_pattern sercnv \
- typesWithNamespace="DMTest::HVec DMTest::HView DMTest::HAuxContainer" \
- files=" -s=${DataModelTestDataWrite_root}/DataModelTestDataWrite \
-             HVec.h HView.h HAuxContainer.h "
-
diff --git a/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWrite.h b/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWrite.h
index f1fcc6412e85a26a28ff32b36d2ac4b24038855f..bf5af6cbee38f633d0361eb33727f08445dae998 100644
--- a/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWrite.h
+++ b/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWrite.h
@@ -47,7 +47,7 @@ public:
   /**
    * @brief Algorithm initialization; called at the beginning of the job.
    */
-  virtual StatusCode initialize();
+  virtual StatusCode initialize() override;
 
 
   /**
@@ -59,7 +59,7 @@ public:
   /**
    * @brief Algorithm finalization; called at the end of the job.
    */
-  virtual StatusCode finalize();
+  virtual StatusCode finalize() override;
 
 
 private:
diff --git a/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCInfo.cxx b/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCInfo.cxx
index e335dd6caaf17e72cb944440438dcee9061cc9e9..bf7ccb92026c0276ba4e2af949aca3db5982e1d3 100644
--- a/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCInfo.cxx
+++ b/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCInfo.cxx
@@ -74,7 +74,9 @@ StatusCode xAODTestWriteCInfo::execute_r (const EventContext& ctx) const
   cinfo->setAFloat ((float)count * 0.1);
   anInt2(*cinfo) = count * 2000;
 
-  cEL(*cinfo).toIndexedElement (*cvec, count % cvec->size());
+  if (!cvec->empty()) {
+    cEL(*cinfo).toIndexedElement (*cvec, count % cvec->size());
+  }
 
   SG::WriteHandle<DMTest::C> cinfoH (m_cinfoKey, ctx);
   std::unique_ptr<const DMTest::C> cinfo_c (std::move (cinfo));
diff --git a/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCInfoTool.cxx b/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCInfoTool.cxx
index 4aad22954580dee0ecb9d6b60e00f45ee4b302e3..687f6a9444d9d5cb893cb99d00ae9ead149905c9 100644
--- a/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCInfoTool.cxx
+++ b/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCInfoTool.cxx
@@ -77,7 +77,9 @@ StatusCode xAODTestWriteCInfoTool::doit (const EventContext& ctx) const
   cinfo->setAFloat ((float)count * 0.1);
   anInt2(*cinfo) = count * 2000;
 
-  cEL(*cinfo).toIndexedElement (*cvec, count % cvec->size());
+  if (!cvec->empty()) {
+    cEL(*cinfo).toIndexedElement (*cvec, count % cvec->size());
+  }
 
   SG::WriteHandle<DMTest::C> cinfoH (m_cinfoKey, ctx);
   std::unique_ptr<const DMTest::C> cinfo_c (std::move (cinfo));
diff --git a/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCVec.cxx b/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCVec.cxx
index f7eb4f220de0cf519116f5a9394f7e2fd755c32c..05bd50affc78fa15b6a0434460d451d7055fb9c0 100644
--- a/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCVec.cxx
+++ b/Control/DataModelTest/DataModelTestDataWrite/src/xAODTestWriteCVec.cxx
@@ -90,7 +90,9 @@ StatusCode xAODTestWriteCVec::execute_r (const EventContext& ctx) const
   const static C::Decorator<unsigned int> dpInt1 ("dpInt1");
   const static C::Decorator<std::vector<float> > dpvFloat ("dpvFloat");
 
-  for (int i=0; i < 10; i++) {
+  int nent = 10;
+  if (count == 5) nent = 0;
+  for (int i=0; i < nent; i++) {
     coll->push_back (new DMTest::C);
     C& c = *coll->back();
     c.setAnInt (count * 100 + i+1);
@@ -124,7 +126,7 @@ StatusCode xAODTestWriteCVec::execute_r (const EventContext& ctx) const
   CHECK( cvec.record (std::move(coll), std::move(store)) );
 
   SG::WriteDecorHandle<DMTest::CVec, int> dtest (m_cvecDecorKey, ctx);
-  for (int i=0; i < 10; i++) {
+  for (int i=0; i < nent; i++) {
     dtest (*(*dtest)[i]) = i+123;
   }
 
diff --git a/Control/DataModelTest/DataModelTestDataWriteCnv/cmt/requirements b/Control/DataModelTest/DataModelTestDataWriteCnv/cmt/requirements
deleted file mode 100755
index f2136f45946e59e3055c42200ba418d2f5ba23c2..0000000000000000000000000000000000000000
--- a/Control/DataModelTest/DataModelTestDataWriteCnv/cmt/requirements
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# $Id: requirements,v 1.4 2008-11-12 12:53:48 schaffer Exp $
-#
-# @file  cmt/requirements
-# @author scott snyder
-# @date Nov 2005
-# @brief DataModelTestDataWriteCnv cmt requirements file.
-#
-
-package DataModelTestDataWriteCnv
-
-author scott snyder <snyder@bnl.gov>
-
-use AtlasPolicy             AtlasPolicy-*
-use AthenaPoolUtilities     AthenaPoolUtilities-*     Database/AthenaPOOL
-
-private
-use DataModelTestDataWrite   DataModelTestDataWrite-*   Control/DataModelTest
-use DataModelTestDataCommon  DataModelTestDataCommon-*  Control/DataModelTest
-
-apply_tag no_merge_componentslist
-end_private
-
-apply_pattern poolcnv \
- typesWithNamespace="DMTest::BVec DMTest::DVec \
-                     DMTest::DDer DMTest::BDer DMTest::ELVec \
-                     DMTest::BAux DMTest::BAuxVec DMTest::BAuxStandalone \
-                     DMTest::C DMTest::CVec DMTest::CAuxContainer \
-                     DMTest::G DMTest::GVec DMTest::GAuxContainer \
-                     DMTest::CVecWithData \
-                     DMTest::CInfoAuxContainer \
-                     DMTest::CTrigAuxContainer \
-                     DMTest::CView \
-                     DMTest::H DMTest::HVec DMTest::HAuxContainer \
-                     DMTest::HView " \
- files=" -s=${DataModelTestDataWrite_root}/DataModelTestDataWrite \
-             BVec.h BDer.h DVec.h DDer.h ELVec.h \
-             G.h GVec.h GAuxContainer.h \
-             H.h HVec.h HAuxContainer.h HView.h \
-         -s=${DataModelTestDataCommon_root}/DataModelTestDataCommon \
-           BAux.h BAuxVec.h BAuxStandalone.h \
-           C.h CVec.h CAuxContainer.h CView.h \
-           CVecWithData.h \
-           CInfoAuxContainer.h \
-           CTrigAuxContainer.h "
-
-
-
-
-private
-# poolcnv pattern doesn't support headers in subdirectories.
-# work around.
-macro_append use_pp_cppflags " -I$(DataModelTestDataCommon_root)/DataModelTestDataCommon "
-macro_append use_pp_cppflags " -I$(DataModelTestDataWrite_root)/DataModelTestDataWrite "
-end_private
diff --git a/Control/GaudiSequencer/cmt/requirements b/Control/GaudiSequencer/cmt/requirements
deleted file mode 100755
index 62ee7fe1a50f02cec92bf89210f2f311a1d82398..0000000000000000000000000000000000000000
--- a/Control/GaudiSequencer/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-package GaudiSequencer
-
-author Sebastien Binet     <binet@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-
-private
-use GaudiInterface  GaudiInterface-*	External
-use AthenaKernel    AthenaKernel-*	Control
-use AthenaBaseComps AthenaBaseComps-*	Control
-use CxxUtils        CxxUtils-*          Control
-use AtlasValgrind   AtlasValgrind-*	External
-end_private
-
-branches src share python
-
-library GaudiSequencer *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Control/HeapMon/cmt/fragments/python_extension b/Control/HeapMon/cmt/fragments/python_extension
deleted file mode 100644
index 696fd1b7850af048dd712cc17664e2a52d523a8a..0000000000000000000000000000000000000000
--- a/Control/HeapMon/cmt/fragments/python_extension
+++ /dev/null
@@ -1,46 +0,0 @@
-# File: HeapMon/cmt/fragments/python_extension
-# Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
-
-# Build a python extension module (i.e. shared lib w/o 'lib' prepend) and
-# install it into InstallArea/python/<Package>/. Note that the full build is
-# done here, rather than through CMT processing, as it's sooo much faster.
-
-.PHONY: ${CONSTITUENT} ${CONSTITUENT}clean
-
-#allfiles := $(wildcard ${FILEPATH}*.cxx)
-#objects  := ${allfiles:${FILEPATH}%.cxx=$(bin)%.o}
-#allcfiles := $(wildcard ${FILEPATH}${files})
-allcfiles := $(wildcard ${FILEPATH}*.c)
-cobjects := ${allcfiles:${FILEPATH}%.c=$(bin)%.o}
-# installd := ${CMTINSTALLAREA}/$(tag)/lib/python$(Python_config_version_twodigit)/${package}
-installd := ${CMTINSTALLAREA}/python/${package}/$(tag)
-pyextlib := ${installd}/${CONSTITUENT}.$(shlibsuffix)
-
-${CONSTITUENT} :: $(bin)${CONSTITUENT}.$(shlibsuffix) ${pyextlib}
-
-${objects} : $(bin)%.o : ${FILEPATH}%.cxx
-	$(cpp_echo) $@
-	$(cpp_silent) cd $(bin); $(cppcomp) -o $@ $(use_pp_cppflags) $(${CONSTITUENT}_pp_cppflags) $(app_${CONSTITUENT}_pp_cppflags) $(use_cppflags) $(${CONSTITUENT}_cppflags) $(app_${CONSTITUENT}_cppflags) ${ADDINCLUDE} $<
-
-${cobjects} : $(bin)%.o : ${FILEPATH}%.c
-	$(c_echo) $@
-	$(c_silent) cd $(bin); $(ccomp) -o $@ $(use_pp_cflags) $(${CONSTITUENT}_pp_cflags) $(app_${CONSTITUENT}_pp_cflags) $(use_cflags) $(${CONSTITUENT}_cflags) $(app_${CONSTITUENT}_cflags) ${ADDINCLUDE} $<
-
-# explicitly linked with almost nothing (typically, $(use_linkopts) will be needed)
-$(bin)${CONSTITUENT}.$(shlibsuffix): ${objects} ${cobjects}
-ifeq (${objects},)
-	$(lib_silent) cd $(bin); $(link) $(shlibflags) ${cobjects:$(bin)%.o=%.o} $(${CONSTITUENT}_linkopts) -o ${CONSTITUENT}.$(shlibsuffix)
-else
-	$(lib_silent) cd $(bin); $(cpplink) $(shlibflags) ${objects:$(bin)%.o=%.o} ${cobjects:$(bin)%.o=%.o} $(${CONSTITUENT}_linkopts) -o ${CONSTITUENT}.$(shlibsuffix)
-endif
-
-${installd} :
-	@mkdir -p ${installd}
-
-# hack: gmake on lxplus (1.79.1) does not support order only targets nor realpath
-${pyextlib} : $(bin)${CONSTITUENT}.$(shlibsuffix) ${installd}
-	@cd $(bin); test -f $(pyextlib) || ln -s `pwd`/${CONSTITUENT}.$(shlibsuffix) $(pyextlib)
-
-${CONSTITUENT}clean ::
-	$(cleanup_echo) objects
-	$(cleanup_silent) /bin/rm -f ${objects} $(bin)${CONSTITUENT}.$(shlibsuffix) ${pyextlib}
diff --git a/Control/HeapMon/cmt/fragments/python_extension_header b/Control/HeapMon/cmt/fragments/python_extension_header
deleted file mode 100644
index fce7b79071760841e096a4b2dfb1126fd229a944..0000000000000000000000000000000000000000
--- a/Control/HeapMon/cmt/fragments/python_extension_header
+++ /dev/null
@@ -1,4 +0,0 @@
-# File: HeapMon/cmt/fragments/python_extension_header
-# Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
-
-# this file is left empty on purpose
diff --git a/Control/HeapMon/cmt/requirements b/Control/HeapMon/cmt/requirements
deleted file mode 100644
index 8497a90477f8c15fec6639c41bb9ec7fe69a25b5..0000000000000000000000000000000000000000
--- a/Control/HeapMon/cmt/requirements
+++ /dev/null
@@ -1,55 +0,0 @@
-package HeapMon
-
-author Mous Tatarkhanov <tmmous@berkeley.edu>
-
-use AtlasPolicy      AtlasPolicy-*
-use AtlasPython      AtlasPython-*     External
-use AtlasGPerfTools  AtlasGPerfTools-* External
-#use GaudiInterface 	GaudiInterface-* 	External
-
-private
-use AtlasROOT   		AtlasROOT-*   		External
-end_private
-
-# Add cmake compatibility (doesn't do anything on CMT side of things)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS RIO Tree)"
-
-application MemoryScanner MemoryScanner.cxx
-
-#apply_pattern component_library
-
-# the memory marker relies on gcc (tag gcc is set in ExternalPolicy, which
-# comes in from AtlasPolicy) internals: only build on that platform (there
-# will be a warning on other platforms, but we don't have any others right
-# now, so no worries :) )
-
-# although "gcc" as tag should do, that doesn't work on gcc344 (even as the
-# tag is defined according to "cmt show all_tags"), so use Linux (works, as
-# empirically determined :P )
-macro python_extension_fragment "" \
-   Linux "python_extension -dependencies -header=python_extension_header" \
-   Darwin "python_extension -dependencies -header=python_extension_header"
-make_fragment $(python_extension_fragment)
-       
-# hack: empty document will be ignored; anything else doesn't work with CMT
-document python_extension MemoryMarker files="*.c" MemoryMarker.c
-
-# force order between installing header files and build of .c files
-macro_append MemoryMarker_dependencies " install_includes "
-
-# libraries for retrieving debug info
-macro_append MemoryMarker_linkopts "" \
-  use_bfd                          " -aarchive -L/usr/local/lib -L/usr/lib -lbfd -liberty "
-
-macro_append cflags "" \
-   use_bfd                          " -DHEPHAESTUS_USE_BFD "
-
-# install python module files (actually, the .so is done in the fragment)
-apply_pattern declare_python_modules files="*.py"
-
-
-private
-
-# always use new ABI and force optimization, even in debug mode
-macro_append cppflags " -fuse-cxa-atexit "
-macro_append cflags " -O3 "
diff --git a/Control/Hephaestus/cmt/fragments/python_extension b/Control/Hephaestus/cmt/fragments/python_extension
deleted file mode 100644
index 59674b67f1df043ab3120014d49f272aacf5d4bc..0000000000000000000000000000000000000000
--- a/Control/Hephaestus/cmt/fragments/python_extension
+++ /dev/null
@@ -1,45 +0,0 @@
-# File: Hephaestus/cmt/fragments/python_extension
-# Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
-
-# Build a python extension module (i.e. shared lib w/o 'lib' prepend) and
-# install it into InstallArea/python/<Package>/. Note that the full build is
-# done here, rather than through CMT processing, as it's sooo much faster.
-
-.PHONY: ${CONSTITUENT} ${CONSTITUENT}clean
-
-allfiles := $(wildcard ${FILEPATH}*.cxx)
-objects  := ${allfiles:${FILEPATH}%.cxx=$(bin)%.o}
-allcfiles := $(wildcard ${FILEPATH}${files})
-cobjects := ${allcfiles:${FILEPATH}%.c=$(bin)%.o}
-# installd := ${CMTINSTALLAREA}/$(tag)/lib/python$(Python_config_version_twodigit)/${package}
-installd := ${CMTINSTALLAREA}/python/${package}/$(tag)
-pyextlib := ${installd}/${CONSTITUENT}.$(shlibsuffix)
-
-${CONSTITUENT} :: $(bin)${CONSTITUENT}.$(shlibsuffix) ${pyextlib}
-
-${objects} : $(bin)%.o : ${FILEPATH}%.cxx
-	$(cpp_echo) $@
-	$(cpp_silent) cd $(bin); $(cppcomp) -o $@ $(use_pp_cppflags) $(${CONSTITUENT}_pp_cppflags) $(app_${CONSTITUENT}_pp_cppflags) $(use_cppflags) $(${CONSTITUENT}_cppflags) $(app_${CONSTITUENT}_cppflags) ${ADDINCLUDE} $<
-
-${cobjects} : $(bin)%.o : ${FILEPATH}%.c
-	$(c_echo) $@
-	$(c_silent) cd $(bin); $(ccomp) -o $@ $(use_pp_cflags) $(${CONSTITUENT}_pp_cflags) $(app_${CONSTITUENT}_pp_cflags) $(use_cflags) $(${CONSTITUENT}_cflags) $(app_${CONSTITUENT}_cflags) ${ADDINCLUDE} $<
-
-# explicitly linked with almost nothing (typically, $(use_linkopts) will be needed)
-$(bin)${CONSTITUENT}.$(shlibsuffix): ${objects} ${cobjects}
-ifeq (${objects},)
-	$(lib_silent) cd $(bin); $(link) $(shlibflags) ${cobjects:$(bin)%.o=%.o} $(${CONSTITUENT}_linkopts) -o ${CONSTITUENT}.$(shlibsuffix)
-else
-	$(lib_silent) cd $(bin); $(cpplink) $(shlibflags) ${objects:$(bin)%.o=%.o} ${cobjects:$(bin)%.o=%.o} $(${CONSTITUENT}_linkopts) -o ${CONSTITUENT}.$(shlibsuffix)
-endif
-
-${installd} :
-	@mkdir -p ${installd}
-
-# hack: gmake on lxplus (1.79.1) does not support order only targets nor realpath
-${pyextlib} : $(bin)${CONSTITUENT}.$(shlibsuffix) ${installd}
-	@cd $(bin); test -f $(pyextlib) || ln -s `pwd`/${CONSTITUENT}.$(shlibsuffix) $(pyextlib)
-
-${CONSTITUENT}clean ::
-	$(cleanup_echo) objects
-	$(cleanup_silent) /bin/rm -f ${objects} $(bin)${CONSTITUENT}.$(shlibsuffix) ${pyextlib}
diff --git a/Control/Hephaestus/cmt/fragments/python_extension_header b/Control/Hephaestus/cmt/fragments/python_extension_header
deleted file mode 100644
index 70afbb829d1a095763cce577c307f0274523efdd..0000000000000000000000000000000000000000
--- a/Control/Hephaestus/cmt/fragments/python_extension_header
+++ /dev/null
@@ -1,4 +0,0 @@
-# File: Hephaestus/cmt/fragments/python_extension_header
-# Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
-
-# this file is left empty on purpose
diff --git a/Control/Hephaestus/cmt/requirements b/Control/Hephaestus/cmt/requirements
deleted file mode 100644
index dc64405693f6699989dc81fb05c652864e187216..0000000000000000000000000000000000000000
--- a/Control/Hephaestus/cmt/requirements
+++ /dev/null
@@ -1,60 +0,0 @@
-package Hephaestus
-
-author Wim Lavrijsen <WLavrijsen@lbl.gov>
-
-use AtlasPolicy         AtlasPolicy-*
-use AtlasPython         AtlasPython-*       External
-use AtlasLibUnwind      AtlasLibUnwind-*    External
-private
-use AtlasBoost          AtlasBoost-*        External
-end_private
-
-# the memory tracker relies on gcc (tag gcc is set in ExternalPolicy, which
-# comes in from AtlasPolicy) internals: only build on that platform (there
-# will be a warning on other platforms, but we don't have any others right
-# now, so no worries :) )
-
-# although "gcc" as tag should do, that doesn't work on gcc344 (even as the
-# tag is defined according to "cmt show all_tags"), so use Linux (works, as
-# empirically determined :P )
-macro python_extension_fragment "" \
-   Linux "python_extension -dependencies -header=python_extension_header"
-make_fragment $(python_extension_fragment)
-
-library Hephaestus "hlib/*.c"
-apply_pattern installed_library
-
-
-# hack: empty document will be ignored; anything else doesn't work with CMT
-document python_extension MemoryTracker files="*.c"  MemoryTracker.c
-
-# force order between installing header files and build of .c files
-macro_append MemoryTracker_dependencies " install_includes Hephaestus "
-macro_append MemoryTracker_linkopts " -L$(CMTINSTALLAREA)/$(CMTCONFIG)/lib -lHephaestus "
-
-
-# libraries for retrieving debug info
-macro_append MemoryTracker_linkopts " -lpthread -L$(AtlasLibUnwind_lcgcmt_lib) -lunwind " \
-   use_bfd                          " -aarchive -L/usr/local/lib -L/usr/lib -lbfd -liberty -lpthread "
-
-macro_append cflags "" \
-   use_bfd                          " -DHEPHAESTUS_USE_BFD "
-
-# install python module files (actually, the .so is done in the fragment)
-apply_pattern declare_python_modules files="*.py"
-
-
-private
-
-# always use new ABI and force optimization, even in debug mode
-macro_append cppflags " -fuse-cxa-atexit "
-macro_append cflags " -O3 -Wno-deprecated-declarations -Wno-format-security "
-
-# profiling data post-processor (has to be in its own directory because CMT will
-# otherwise pick up the .o's from the python module (?) )
-application hephprof HephProf/HephProf.cxx
-macro_append hephprof_dependencies " Hephaestus "
-
-
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=stackstash
diff --git a/Control/IOVSvc/IOVSvc/CondSvc.h b/Control/IOVSvc/IOVSvc/CondSvc.h
index 883673c4c53294488eb26ff9d6063e7040930305..bdc1e5ddd8137a637d3e2fdaa77348e593fa94ea 100644
--- a/Control/IOVSvc/IOVSvc/CondSvc.h
+++ b/Control/IOVSvc/IOVSvc/CondSvc.h
@@ -24,6 +24,7 @@ public:
 
   virtual StatusCode initialize();
   virtual StatusCode finalize();
+  virtual StatusCode stop();
 
   // from ICondSvc
 public:
diff --git a/Control/IOVSvc/IOVSvc/IOVEntry.h b/Control/IOVSvc/IOVSvc/IOVEntry.h
index 4b07b938dd4bdf627664eaec13c7cd6eb66339be..7f38f9538332580924449f243b103821231fe437 100755
--- a/Control/IOVSvc/IOVSvc/IOVEntry.h
+++ b/Control/IOVSvc/IOVSvc/IOVEntry.h
@@ -62,6 +62,9 @@ public:
     m_removedStart(false), m_removedStop(false),
     m_startITR(0), m_stopITR(0) {}
 
+  IOVEntry (const IOVEntry&) = delete;
+  IOVEntry& operator= (const IOVEntry&) = delete;
+
   ~IOVEntry() { delete m_range; }
 
   IOVRange* range() const { return m_range; }
diff --git a/Control/IOVSvc/IOVSvc/IOVSvc.h b/Control/IOVSvc/IOVSvc/IOVSvc.h
index 6af3d9e39ea67df64d4da136fbcd74d9fee69977..424140300d6edce875fcd6cff57ad38d3565bb82 100755
--- a/Control/IOVSvc/IOVSvc/IOVSvc.h
+++ b/Control/IOVSvc/IOVSvc/IOVSvc.h
@@ -73,7 +73,6 @@ template <class TYPE> class SvcFactory;
 
 
 class StoreGateSvc;
-class IProxyProviderSvc;
 class IClassIDSvc;
 class IProxyDict;
 class IToolSvc;
@@ -218,7 +217,6 @@ private:
   ServiceHandle<IClassIDSvc> p_CLIDSvc;
   ServiceHandle<StoreGateSvc> p_sgs, p_detStore;
   ServiceHandle<ICondSvc> p_condSvc;
-  ServiceHandle<IProxyProviderSvc> p_pps;
 
   mutable std::mutex m_lock;
 
diff --git a/Control/IOVSvc/IOVSvc/IOVSvcTool.h b/Control/IOVSvc/IOVSvc/IOVSvcTool.h
index 4ce0540f2f2efd072f5f6154bf4202a2e9a21cdc..39476cfaf7993e1a41b91c17a1fdbd4fbdcce5d2 100644
--- a/Control/IOVSvc/IOVSvc/IOVSvcTool.h
+++ b/Control/IOVSvc/IOVSvc/IOVSvcTool.h
@@ -231,7 +231,14 @@ private:
 
   CBTree* m_trigTree;
 
-  std::set< const SG::TransientAddress*, SortTADptr > m_preLoad, m_partPreLoad;
+  std::set< const SG::TransientAddress*, SortTADptr > m_preLoad;
+
+  typedef std::tuple <CLID, std::string> TADkey_t;
+  TADkey_t TADkey (const SG::DataProxy& p)
+  { return TADkey_t (p.clID(), p.name()); }
+  TADkey_t TADkey (const SG::TransientAddress& t)
+  { return TADkey_t (t.clID(), t.name()); }
+  std::set< TADkey_t > m_partPreLoad;
 
   bool m_first;
   BooleanProperty m_preLoadRanges, m_preLoadData, m_partialPreLoadData;
diff --git a/Control/IOVSvc/cmt/requirements b/Control/IOVSvc/cmt/requirements
deleted file mode 100755
index abfb731d5d676af0d93f5139dacfff4b95d895c4..0000000000000000000000000000000000000000
--- a/Control/IOVSvc/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package IOVSvc
-
-author Charles Leggett <Charles.Leggett@cern.ch>
-
-branches src cmt
-
-use AtlasPolicy    AtlasPolicy-*
-use SGTools        SGTools-*           Control
-use AthenaKernel   AthenaKernel-*      Control
-use AthenaBaseComps AthenaBaseComps-*  Control
-use AtlasBoost     AtlasBoost-*        External
-use StoreGate      StoreGate-*      Control
-use GaudiInterface GaudiInterface-*     External
-
-apply_pattern declare_joboptions files="IOVSvc.txt IOVSvc.py"
-
-apply_pattern dual_use_library files="*.cxx"
-
-
-private
-use EventInfo      EventInfo-*      Event
-use TestTools      TestTools-*        AtlasTest 
-apply_pattern UnitTest_run unit_test=IOVSvcTool extrapatterns="^HistogramPersis.* INFO|^IOVSvc +DEBUG|^IOVSvcTool +DEBUG"
-end_private
diff --git a/Control/IOVSvc/src/CondInputLoader.cxx b/Control/IOVSvc/src/CondInputLoader.cxx
index f6c11ee564b46fa8a406a4eb6a067ddb93e02e61..f089c16d7bf4a1e0371537dac210c75d6030a828 100644
--- a/Control/IOVSvc/src/CondInputLoader.cxx
+++ b/Control/IOVSvc/src/CondInputLoader.cxx
@@ -38,10 +38,17 @@ CondInputLoader::CondInputLoader( const std::string& name,
   //
   // Property declaration
   // 
+  auto props = getProperties();
+  for( Property* prop : props ) {
+    if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") {
+      prop->declareUpdateHandler
+        (&CondInputLoader::extraDeps_update_handler, this);
+    }
+  }
+
   declareProperty( "Load", m_load); 
   //->declareUpdateHandler(&CondInputLoader::loader, this);
   declareProperty( "ShowEventDump", m_dump=false);
-  declareProperty( "InputKey", m_inputKey="Input" );
 }
 
 // Destructor
@@ -83,8 +90,6 @@ CondInputLoader::initialize()
     return StatusCode::FAILURE;
   }
 
-  ATH_CHECK( m_inputKey.initialize() );
-
   std::vector<std::string> keys = idb->getKeyList();
   std::string folderName, tg;
   IOVRange range;
@@ -218,6 +223,7 @@ CondInputLoader::execute()
     }
     now.set_run_number(thisEventInfo->runNumber());
     now.set_event_number(thisEventInfo->eventNumber());
+    now.set_lumi_block(thisEventInfo->lumiBlock());
     now.set_time_stamp(thisEventInfo->timeStamp());
     now.set_time_stamp_ns_offset(thisEventInfo->timeStampNSOffset());
   }
@@ -225,30 +231,34 @@ CondInputLoader::execute()
 #ifdef GAUDI_SYSEXECUTE_WITHCONTEXT
     now.set_run_number(getContext().eventID().run_number());
     now.set_event_number(getContext().eventID().event_number());
+    now.set_lumi_block(getContext().eventID().lumi_block());
     now.set_time_stamp(getContext().eventID().time_stamp());
     now.set_time_stamp_ns_offset(getContext().eventID().time_stamp_ns_offset());
 #else
     now.set_run_number(getContext()->eventID().run_number());
     now.set_event_number(getContext()->eventID().event_number());
+    now.set_lumi_block(getContext()->eventID().lumi_block());
     now.set_time_stamp(getContext()->eventID().time_stamp());
     now.set_time_stamp_ns_offset(getContext()->eventID().time_stamp_ns_offset());
 #endif
   }
 
+  EventIDBase now_event = now;
+  now.set_event_number (EventIDBase::UNDEFEVT);
+
   // For a MC event, the run number we need to use to look up the conditions
-  // may be different from that of the event itself.  If we have
-  // a ConditionsRun attribute defined, use that to override
-  // the event number.
-  SG::ReadHandle<AthenaAttributeList> input (m_inputKey, getContext());
-  if (input.isValid()) {
-    if (input->exists ("ConditionsRun"))
-      now.set_run_number ((*input)["ConditionsRun"].data<unsigned int>());
+  // may be different from that of the event itself.  Override the run
+  // number with the conditions run number from the event context,
+  // if it is defined.
+  EventIDBase::number_type conditionsRun =
+    getContext().template getExtension<Atlas::ExtendedEventContext>()->conditionsRun();
+  if (conditionsRun != EventIDBase::UNDEFNUM) {
+    now.set_run_number (conditionsRun);
   }
 
-  IOVTime t(now.run_number(), now.event_number(), now.time_stamp());
+  IOVTime t(now.run_number(), now.lumi_block(), now.time_stamp());
 
   StatusCode sc(StatusCode::SUCCESS);
-  EventIDRange r;
   std::string tag;
   for (auto &vhk: m_vhk) {
     ATH_MSG_DEBUG( "handling id: " << vhk.fullKey() << " key: " << vhk.key() );
@@ -262,7 +272,7 @@ CondInputLoader::execute()
     }
    
     if (ccb->valid(now)) {
-      ATH_MSG_INFO( "  CondObj " << vhk.fullKey() << " is still valid at " << now );
+      ATH_MSG_INFO( "  CondObj " << vhk.fullKey() << " is still valid at " << now_event );
       evtStore()->addedNewTransObject(vhk.fullKey().clid(), vhk.key());
       continue;
     }
@@ -288,3 +298,10 @@ CondInputLoader::execute()
 
 //-----------------------------------------------------------------------------
 
+// need to override the handling of the DataObjIDs that's done by
+// AthAlgorithm, so we don't inject the name of the Default Store
+void 
+CondInputLoader::extraDeps_update_handler( Property& /*ExtraDeps*/ ) 
+{  
+  // do nothing
+}
diff --git a/Control/IOVSvc/src/CondInputLoader.h b/Control/IOVSvc/src/CondInputLoader.h
index f4e8b8f574e77f7710f62a67c1f5fa2ae216bb71..0bc64e7c3165ed9bba842ed78180fa410aac55a8 100644
--- a/Control/IOVSvc/src/CondInputLoader.h
+++ b/Control/IOVSvc/src/CondInputLoader.h
@@ -20,7 +20,6 @@
 
 #include "AthenaKernel/IIOVSvc.h"
 #include "StoreGate/StoreGateSvc.h"
-#include "StoreGate/ReadHandleKey.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "PersistentDataModel/AthenaAttributeList.h"
 
@@ -69,6 +68,10 @@ class CondInputLoader
   /// Default constructor: 
   //  CondInputLoader();
 
+  // need to override the ExtraInputs/Outputs property handler
+  // from AthAlgorithm
+  void extraDeps_update_handler(Property&);
+
   //  void loader(Property&);
 
   /// Containers
@@ -83,7 +86,6 @@ class CondInputLoader
   ServiceHandle<IIOVSvc> m_IOVSvc;
   
   std::map<std::string,std::string> m_keyFolderMap;
-  SG::ReadHandleKey<AthenaAttributeList> m_inputKey;
 }; 
 
 
diff --git a/Control/IOVSvc/src/CondSvc.cxx b/Control/IOVSvc/src/CondSvc.cxx
index 4d601bdba019d6efed9b622e5b3d9ac10a0af973..8d7cfb39a868944dad8881e87d3c548a575538b4 100644
--- a/Control/IOVSvc/src/CondSvc.cxx
+++ b/Control/IOVSvc/src/CondSvc.cxx
@@ -64,17 +64,17 @@ CondSvc::dump(std::ostringstream& ost) const {
   ost << "CondSvc::dump()";
 
   ost << "\ndumping id->alg map\n";
-  for (auto ent : m_idMap) {
+  for (const auto& ent : m_idMap) {
     ost << std::endl << " + " << ent.first << " : ";
-    for (auto a : ent.second) {
+    for (const auto& a : ent.second) {
       ost << " " << a->name();
     }
   }
 
   ost << "\n\ndumping alg->id map\n";
-  for (auto ent : m_algMap) {
+  for (const auto& ent : m_algMap) {
     ost << std::endl << " + " << ent.first->name() << " : ";
-    for (auto a : ent.second) {
+    for (const auto& a : ent.second) {
       ost << " " << a;
     }
   }
@@ -97,8 +97,15 @@ CondSvc::dump(std::ostringstream& ost) const {
 
 StatusCode
 CondSvc::finalize() {
-
   ATH_MSG_DEBUG( "CondSvc::finalize()" );
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode
+CondSvc::stop() {
+
+  ATH_MSG_DEBUG( "CondSvc::stop()" );
 
   if (msgLvl(MSG::DEBUG)) {
     std::ostringstream ost;
diff --git a/Control/IOVSvc/src/IOVSvc.cxx b/Control/IOVSvc/src/IOVSvc.cxx
index fa611940d6a6475d39607df9161e81614219ebed..dc0edabd8266a9f94d1465e957bdd080843c7748 100755
--- a/Control/IOVSvc/src/IOVSvc.cxx
+++ b/Control/IOVSvc/src/IOVSvc.cxx
@@ -42,9 +42,7 @@ IOVSvc::IOVSvc( const std::string& name, ISvcLocator* svc )
     p_CLIDSvc("ClassIDSvc",name),
     p_sgs("StoreGateSvc",name),
     p_detStore("StoreGateSvc/DetectorStore",name),
-    p_condSvc("CondSvc",name),
-    p_pps("ProxyProviderSvc",name)
-
+    p_condSvc("CondSvc",name)
 {
 
   declareProperty("preLoadRanges",m_preLoadRanges=false);
@@ -96,11 +94,6 @@ StatusCode IOVSvc::initialize() {
     status = StatusCode::FAILURE;
   }
 
-  if (!p_pps.isValid()) {
-    ATH_MSG_ERROR("could not get the ProxyProviderSvc");
-    status = StatusCode::FAILURE;
-  }
-
   return status;
 }
 
@@ -853,7 +846,7 @@ IOVSvc::createCondObj(CondContBase* ccb, const DataObjID& id,
     return StatusCode::SUCCESS;
   }
 
-  IOVTime t(now.run_number(), now.event_number(), (long long)now.time_stamp()*1000000000+now.time_stamp_ns_offset());
+  IOVTime t(now.run_number(), now.lumi_block(), (long long)now.time_stamp()*1000000000+now.time_stamp_ns_offset());
   IOVRange range;
   IOpaqueAddress* ioa;
   std::string tag;
@@ -874,20 +867,9 @@ IOVSvc::createCondObj(CondContBase* ccb, const DataObjID& id,
                  << " IOA: " << ioa);
 
   if (ccb->proxy() == nullptr) { 
-    // SG::DataProxy *dp = p_condSvc->getProxy( id );
-
-    SG::DataProxy* dp(0);
-    SG::DataStore* ds = p_detStore->store();
-    dp = p_pps->retrieveProxy(id.clid(), sgKey, *ds);
-    if (dp == 0) {
-      ATH_MSG_ERROR ( "Could not get DataProxy from ProxyProviderSvc for "
-                      << id );
-      return StatusCode::FAILURE;
-    }
-
+    SG::DataProxy* dp = p_detStore->proxy (id.clid(), sgKey);
     ATH_MSG_DEBUG( " found DataProxy " << dp << " for " << id );
     ccb->setProxy(dp);
-    
   }
 
   // this will talk to the IOVDbSvc, get current run/event from EventInfo 
@@ -896,7 +878,7 @@ IOVSvc::createCondObj(CondContBase* ccb, const DataObjID& id,
   DataObject* dobj(0);
   void* v(0);
 
-  if (dp->loader()->createObj(ioa, dobj).isFailure()) {
+  if (dp->store()->createObj(dp->loader(), ioa, dobj).isFailure()) {
     ATH_MSG_ERROR(" could not create a new DataObject ");
     return StatusCode::FAILURE;
   } else {
@@ -911,7 +893,7 @@ IOVSvc::createCondObj(CondContBase* ccb, const DataObjID& id,
   
   EventIDRange r2 = range;
   
-  if (!ccb->insert( r2, v)) {
+  if (!ccb->typelessInsert (r2, v)) {
     ATH_MSG_ERROR("unable to insert Object at " << v << " into CondCont " 
                   << ccb->id() << " for range " << r2 );
     return StatusCode::FAILURE;
diff --git a/Control/IOVSvc/src/IOVSvcTool.cxx b/Control/IOVSvc/src/IOVSvcTool.cxx
index 630c71fc2f996373b2521d3c158f24d35caba4ba..685ec0510dab5f3400cf4c4f07f208761a9e9bef 100644
--- a/Control/IOVSvc/src/IOVSvcTool.cxx
+++ b/Control/IOVSvc/src/IOVSvcTool.cxx
@@ -415,7 +415,9 @@ IOVSvcTool::handle(const Incident &inc) {
         m_log << MSG::DEBUG << "Unable to get the IOVDbSvc" << endmsg;
         return;
       }
-      if (StatusCode::SUCCESS != iovDB->signalBeginRun(m_curTime)) {
+      if (StatusCode::SUCCESS != iovDB->signalBeginRun(m_curTime,
+                                                       inc.context()))
+      {
         m_log << MSG::ERROR << "Unable to signal begin run to IOVDbSvc" << endmsg;
         return;
       }
@@ -540,7 +542,7 @@ IOVSvcTool::handle(const Incident &inc) {
       // Load data if preload requested.
 
       if ( (m_partialPreLoadData && 
-            m_partPreLoad.find(prx->transientAddress()) != m_partPreLoad.end())
+            m_partPreLoad.find(TADkey(*prx)) != m_partPreLoad.end())
            ||
            m_preLoadData ) {       
         if (m_log.level() <= MSG::VERBOSE) {
@@ -631,8 +633,7 @@ IOVSvcTool::handle(const Incident &inc) {
           m_log << MSG::DEBUG << "calling provider()->udpateAddress(TAD) for " 
                 << m_names[prx]    << endmsg;
         }
-        StatusCode sc = prx->transientAddress()->provider()->updateAddress(prx->transientAddress()->storeID(), prx->transientAddress());
-        if (StatusCode::SUCCESS != sc) {
+        if (!prx->updateAddress()) {
           m_log << MSG::ERROR << "handle: Could not update address" << endmsg;
           if (perr != 0) throw (*perr);
           return;
@@ -640,7 +641,7 @@ IOVSvcTool::handle(const Incident &inc) {
       }
       
       if (m_log.level() <= MSG::VERBOSE) {
-        IOpaqueAddress *ioa = prx->transientAddress()->address();
+        IOpaqueAddress *ioa = prx->address();
         // Print out some debug info if this is an IOVAddress (coming 
         // from IOVASCIIDbSvc) 
         IOVAddress *iova  = dynamic_cast<IOVAddress*>(ioa);
@@ -882,7 +883,7 @@ IOVSvcTool::preLoadTAD( const TransientAddress *tad_in ) {
   }
 
   // check to see if it's a duplicate in partPreLoad
-  if (m_partPreLoad.find( tad_in ) != m_partPreLoad.end()) {
+  if (m_partPreLoad.find( TADkey(*tad_in) ) != m_partPreLoad.end()) {
     m_log << MSG::WARNING << "preLoadTAD: TransientAddress (" 
           << tad_in->clID() << "/" << tad_in->name() 
           << ") alread in partPreLoad set. Not inserting" << endmsg;
@@ -910,7 +911,7 @@ IOVSvcTool::preLoadDataTAD( const TransientAddress *tad_in ) {
     return StatusCode::SUCCESS;
   }
 
-  if (m_partPreLoad.find(tad_in) != m_partPreLoad.end()) {
+  if (m_partPreLoad.find(TADkey(*tad_in)) != m_partPreLoad.end()) {
     m_log << MSG::WARNING << "preLoadDataTAD: TransientAddress " 
           << fullProxyName( tad_in )
           << " alread in partPreLoad set. Not inserting" << endmsg;
@@ -919,7 +920,7 @@ IOVSvcTool::preLoadDataTAD( const TransientAddress *tad_in ) {
 
   TransientAddress* tad = new TransientAddress (tad_in->clID(),tad_in->name());
   m_preLoad.insert( tad );
-  m_partPreLoad.insert( tad );
+  m_partPreLoad.insert( TADkey(*tad) );
 
   return StatusCode::SUCCESS;
 }
@@ -1065,7 +1066,7 @@ IOVSvcTool::getRangeFromDB(const CLID& clid, const std::string& key,
   DataProxy* dp = p_cndSvc->proxy(clid,key);
   if (0 != dp) {    
     IIOVDbSvc *idb = 
-      dynamic_cast<IIOVDbSvc*>(dp->transientAddress()->provider());
+      dynamic_cast<IIOVDbSvc*>(dp->provider());
     if (idb != 0) {
       sc = idb->getRange(clid, key, time, range, tag, ioa);
     } else {
@@ -1104,7 +1105,7 @@ IOVSvcTool::setRangeInDB(const CLID& clid, const std::string& key,
           << " not registered with the IOVSvc" << endmsg;
   }
 
-  IAddressProvider *iadp = dp->transientAddress()->provider();
+  IAddressProvider *iadp = dp->provider();
   IIOVDbSvc *idb = dynamic_cast<IIOVDbSvc*>(iadp);
 
   if (idb != 0) {
@@ -1137,11 +1138,11 @@ IOVSvcTool::preLoadProxies() {
     if (m_log.level() <= MSG::VERBOSE) {
       m_log << MSG::VERBOSE;
       m_log.setColor(MSG::CYAN);
-      m_log << "loading proxy for CLID: " << dp->transientAddress()->clID()
+      m_log << "loading proxy for CLID: " << dp->clID()
             << "  " << m_names[dp] << endmsg;
     }
 
-    if (dp->transientAddress() == 0 || dp->transientAddress()->provider() == 0) {
+    if (dp->provider() == 0) {
       m_log << MSG::FATAL << "No provider found for proxy " << m_names[dp]
             << ".  It is probably  not a conditions object" << endl;
       m_log << "Proxy Map: ";
@@ -1160,17 +1161,18 @@ IOVSvcTool::preLoadProxies() {
       if (m_log.level() <= MSG::VERBOSE) {
         m_log << MSG::VERBOSE << "updating Range" << endmsg;
       }
-      sc = dp->transientAddress()->provider()->updateAddress(dp->transientAddress()->storeID(), dp->transientAddress());
+      if (!dp->updateAddress())
+        sc = StatusCode::FAILURE;
     }
 
     if ( ( m_partialPreLoadData && 
-           m_partPreLoad.find(dp->transientAddress()) != m_partPreLoad.end() )
+           m_partPreLoad.find(TADkey(*dp)) != m_partPreLoad.end() )
          ||
          m_preLoadData ) {
       if (m_log.level() <= MSG::VERBOSE) {
         m_log << MSG::VERBOSE << "preloading data for (" 
-              << dp->transientAddress()->clID() << "/"
-              << dp->transientAddress()->name() << ")" << endmsg;
+              << dp->clID() << "/"
+              << dp->name() << ")" << endmsg;
       }
       sc =  ( dp->accessData() != 0 ? 
               StatusCode::SUCCESS : StatusCode::FAILURE );
@@ -1357,7 +1359,7 @@ IOVSvcTool::PrintProxyMap(){
 void 
 IOVSvcTool::PrintProxyMap(const SG::DataProxy* dp){
 
-  m_log << "  " << dp << "  " << dp->transientAddress()->clID() << "  "
+  m_log << "  " << dp << "  " << dp->clID() << "  "
         << m_names.find(dp)->second << endl;
 
   pair<pmITR,pmITR> pi = m_proxyMap.equal_range(dp);
@@ -1461,7 +1463,7 @@ IOVSvcTool::regFcn(SG::DataProxy* dp,
       m_trigTree->connectNode(cn,cp);
     else
       m_log << MSG::ERROR << "Cannot find callback node for parent DataProxy "
-            << dp->transientAddress()->name()
+            << dp->name()
             << endmsg;
   }
 
diff --git a/Control/IOVSvc/src/MetaInputLoader.cxx b/Control/IOVSvc/src/MetaInputLoader.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..394d8a9697b73c6a98623f6918e06f6744cd51b8
--- /dev/null
+++ b/Control/IOVSvc/src/MetaInputLoader.cxx
@@ -0,0 +1,231 @@
+///////////////////////// -*- C++ -*- /////////////////////////////
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// MetaInputLoader.cxx 
+// Implementation file for class MetaInputLoader
+/////////////////////////////////////////////////////////////////// 
+
+#include "MetaInputLoader.h"
+
+// FrameWork includes
+#include "GaudiKernel/Property.h"
+#include "StoreGate/ReadHandle.h"
+#include "SGTools/DataProxy.h"
+#include "AthenaKernel/errorcheck.h"
+
+#include "PersistentDataModel/DataHeader.h"
+
+/////////////////////////////////////////////////////////////////// 
+// Public methods: 
+/////////////////////////////////////////////////////////////////// 
+
+// Constructors
+////////////////
+MetaInputLoader::MetaInputLoader( const std::string& name, 
+                                  ISvcLocator* pSvcLocator ) : 
+  ::AthAlgorithm( name, pSvcLocator ), m_dump(false),
+  m_metaStore("StoreGateSvc/MetaDataStore", name),
+  m_inputStore("StoreGateSvc/InputMetaDataStore", name)
+{
+  //
+  // Property declaration
+  // 
+  declareProperty( "Load", m_load); 
+  declareProperty( "Dump", m_dump=false);
+}
+
+// Destructor
+///////////////
+MetaInputLoader::~MetaInputLoader()
+{}
+
+//-----------------------------------------------------------------------------
+
+// Athena Algorithm's Hooks
+////////////////////////////
+StatusCode 
+MetaInputLoader::initialize()
+{
+  ATH_MSG_INFO ("Initializing " << name() << "...");
+
+  if (!m_inputStore.isValid()) {
+    ATH_MSG_ERROR("could not get the InputMetaDataStore");
+    return StatusCode::FAILURE;
+  }
+
+  if (!m_metaStore.isValid()) {
+    ATH_MSG_ERROR("could not get the MetaDataStore");
+    return StatusCode::FAILURE;
+  }
+
+
+  // Update the properties, set the ExtraOutputs for Alg deps
+  const Property &p = getProperty("Load");
+
+  ATH_MSG_DEBUG("setting prop ExtraOutputs to " <<  p.toString());
+  if (!setProperty("ExtraOutputs", p).isSuccess()) {
+    ATH_MSG_ERROR("failed setting property ExtraOutputs");
+    return StatusCode::FAILURE;
+  }
+
+  StatusCode sc(StatusCode::SUCCESS);
+  std::ostringstream str;
+  str << "Will create WriteCondHandle dependencies for the following DataObjects:";
+  for (auto &e : m_load) {
+    str << "\n    + " << e;
+    if (e.key() == "") {
+      sc = StatusCode::FAILURE;
+      str << "   ERROR: empty key is not allowed!";
+    } else {
+      Gaudi::DataHandle dh(e, Gaudi::DataHandle::Writer, this);
+    }
+  }
+
+  ATH_MSG_INFO(str.str());
+
+  return sc;
+}
+
+//-----------------------------------------------------------------------------
+
+StatusCode 
+MetaInputLoader::finalize()
+{
+  ATH_MSG_INFO ("Finalizing " << name() << "...");
+
+  return StatusCode::SUCCESS;
+}
+
+//-----------------------------------------------------------------------------
+
+StatusCode 
+MetaInputLoader::execute()
+{  
+  ATH_MSG_DEBUG ("Executing " << name() << "...");
+
+  if (m_first) {
+    DataObjIDColl::iterator itr;
+    for (itr = m_load.begin(); itr != m_load.end(); ) {
+      if ( ! m_metaStore->contains<MetaContBase>( "MetaDataStore+"+itr->key() ) ){
+        ATH_MSG_INFO("ConditionStore does not contain a MetaCont<> of "
+                     << *itr
+                     << ". Either a ReadMetaHandle was not initialized or "
+                     << "no other Algorithm is using this Handle");
+        itr = m_load.erase(itr);
+      } else {
+        ++itr;
+      }
+    }
+    m_first = false;
+  }
+
+  const DataHeader* thisDH;
+  if(evtStore()->retrieve(thisDH)!=StatusCode::SUCCESS) {
+    ATH_MSG_ERROR("Unable to get Event Info");
+    return StatusCode::FAILURE;
+  }
+  // Get string guid for SourceID
+  const MetaContBase::SourceID sid(thisDH->begin()->getToken()->dbID().toString());
+
+  if (sid.size()==0) {
+    ATH_MSG_ERROR("Unable to get source id from dataheader");
+    return StatusCode::FAILURE;
+  }
+
+  for (auto &obj: m_load) {
+
+    ATH_MSG_DEBUG( "handling id: " << obj );
+
+    MetaContBase* mcb(0);
+    if (! m_metaStore->retrieve(mcb, "MetaDataStore+"+obj.key()).isSuccess()) {
+      ATH_MSG_ERROR( "unable to get MetaContBase* for " << obj 
+                     << " from MetaDataStore" );
+      continue;
+    }
+
+    ATH_MSG_INFO("Retrieved mcb with entries = " << mcb->entries());
+   
+    if (mcb->valid(sid)) {
+      ATH_MSG_INFO( "  MetaObj " << obj << " is still valid for " << sid );
+      //evtStore()->addedNewTransObject(obj.clid(), obj.key());
+      continue;
+    }
+
+    if (createMetaObj( mcb, obj.clid(), obj.key(), sid ).isFailure()) {
+      ATH_MSG_ERROR("unable to create Metadata object for " << obj << " SID: " 
+                    << sid);
+      return StatusCode::FAILURE;
+    } 
+    else {
+      m_metaStore->addedNewTransObject(obj.clid(), obj.key());
+    }
+
+  }
+
+  if (m_dump) {
+    ATH_MSG_DEBUG(m_metaStore->dump()); 
+  }
+  
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode MetaInputLoader::createMetaObj(MetaContBase* mcb,
+                                          const CLID& clid,
+                                          const std::string key,
+                                          MetaContBase::SourceID sid)
+{
+  ATH_MSG_INFO("createMetaObj for " << key << " and sid " << sid);
+
+  // Get proxy from input store
+  const SG::DataProxy* dpin = m_inputStore->proxy(clid,key,true);
+  if (dpin!=0) {
+    // If the input store has a new proxy for the clid/key
+    // Get the current proxy from the output store
+    SG::DataProxy* dp1 = m_metaStore->proxy(clid,key,true);
+    ATH_MSG_INFO(" address0 " << dpin->address());
+    if (dp1==0) {
+      // If none in the output store, create it
+      ATH_CHECK(m_metaStore->recordAddress(key,dpin->address()));
+    }
+    else {
+      // If already there, update it
+      dp1->setAddress(dpin->address());
+    }
+    // Get the proxy again, in case it was zero before
+    SG::DataProxy* dp = m_metaStore->proxy(clid,key,true);
+    ATH_MSG_INFO(" address1 " << dpin->address());
+    // If the proxy is now good, add it to the container for this sid
+    if (dp!=0) {
+      mcb->setProxy(dp);
+      SG::DataProxy* dpcont = mcb->proxy();
+      DataObject* dobj(0);
+      void* v(0);
+      if (dpcont->loader()->createObj(dpcont->address(), dobj).isFailure()) {
+        ATH_MSG_ERROR(" could not create new DataObject");
+        return StatusCode::FAILURE;
+      }
+      v = SG::Storable_cast(dobj,clid);
+      if (!mcb->insert(sid,v)) {
+        ATH_MSG_ERROR("Could not insert object " << clid << " with key " << key << " for SID=" << sid);
+        return StatusCode::FAILURE;
+      }
+      ATH_MSG_INFO("Now have mcb with " << mcb->entries() << " entries");
+    }
+    else {
+      ATH_MSG_INFO("Unable to create proxy for " <<clid<< ", " <<key<< " in metadata store");
+    }
+  }
+  else { 
+    ATH_MSG_INFO("No proxy in input store for " << clid << " " << key);
+  }
+
+  return StatusCode::SUCCESS;
+}
+  
+  
+//-----------------------------------------------------------------------------
+
diff --git a/Control/IOVSvc/src/MetaInputLoader.h b/Control/IOVSvc/src/MetaInputLoader.h
new file mode 100644
index 0000000000000000000000000000000000000000..8d3f69a24ff8337b2317ed01ac16afc756dbbc1b
--- /dev/null
+++ b/Control/IOVSvc/src/MetaInputLoader.h
@@ -0,0 +1,90 @@
+///////////////////////// -*- C++ -*- /////////////////////////////
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// MetaInputLoader.h 
+// Header file for class MetaInputLoader
+/////////////////////////////////////////////////////////////////// 
+#ifndef IOVSVC_METAINPUTLOADER_H
+#define IOVSVC_METAINPUTLOADER_H 1
+
+// STL includes
+#include <string>
+
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/ClassID.h"
+
+#include "AthenaKernel/MetaCont.h"
+#include "StoreGate/StoreGateSvc.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "PersistentDataModel/AthenaAttributeList.h"
+
+#include <string>
+#include <map>
+
+
+class MetaInputLoader
+  : public ::AthAlgorithm
+{ 
+
+  /////////////////////////////////////////////////////////////////// 
+  // Public methods: 
+  /////////////////////////////////////////////////////////////////// 
+ public: 
+
+  // Copy constructor: 
+
+  /// Constructor with parameters: 
+  MetaInputLoader( const std::string& name, ISvcLocator* pSvcLocator );
+
+  /// Destructor: 
+  virtual ~MetaInputLoader(); 
+
+  // Assignment operator: 
+  //MetaInputLoader &operator=(const MetaInputLoader &alg); 
+
+  // Athena algorithm's Hooks
+  virtual StatusCode  initialize();
+  virtual StatusCode  execute();
+  virtual StatusCode  finalize();
+
+  /////////////////////////////////////////////////////////////////// 
+  // Const methods: 
+  ///////////////////////////////////////////////////////////////////
+
+  /////////////////////////////////////////////////////////////////// 
+  // Non-const methods: 
+  /////////////////////////////////////////////////////////////////// 
+
+  /////////////////////////////////////////////////////////////////// 
+  // Private data: 
+  /////////////////////////////////////////////////////////////////// 
+ private: 
+
+  /// Default constructor: 
+  //  MetaInputLoader();
+
+  //  void loader(Property&);
+  StatusCode createMetaObj(MetaContBase* mcb, 
+                           const CLID& clid, 
+                           const std::string key,
+                           MetaContBase::SourceID);
+
+  /// Containers
+  DataObjIDColl m_load;
+
+  bool m_dump;
+  bool m_first { true };
+
+  ServiceHandle<StoreGateSvc> m_metaStore;
+  ServiceHandle<StoreGateSvc> m_inputStore;
+  
+  std::map<std::string,std::string> m_keyFolderMap;
+}; 
+
+
+#endif //> !SGCOMPS_SGINPUTLOADER_H
diff --git a/Control/IOVSvc/src/components/IOVSvc_entries.cxx b/Control/IOVSvc/src/components/IOVSvc_entries.cxx
index 50856f3eccd9f9dcfd96c238d70a8bd6b960231c..887f4c2f011dfbaf078f1dbd16240934a37ffa98 100755
--- a/Control/IOVSvc/src/components/IOVSvc_entries.cxx
+++ b/Control/IOVSvc/src/components/IOVSvc_entries.cxx
@@ -2,6 +2,7 @@
 #include "IOVSvc/CondSvc.h"
 #include "IOVSvc/IOVSvcTool.h"
 #include "../CondInputLoader.h"
+#include "../MetaInputLoader.h"
 #include "GaudiKernel/DeclareFactoryEntries.h"
 
 DECLARE_SERVICE_FACTORY(IOVSvc)
@@ -10,9 +11,11 @@ DECLARE_TOOL_FACTORY( IOVSvcTool )
 DECLARE_SERVICE_FACTORY(CondSvc)
 
 DECLARE_ALGORITHM_FACTORY( CondInputLoader )
+DECLARE_ALGORITHM_FACTORY( MetaInputLoader )
 
-// DECLARE_FACTORY_ENTRIES(IOVSvc) {
+//DECLARE_FACTORY_ENTRIES(IOVSvc) {
+//  DECLARE_ALGORITHM( MetaInputLoader )
 //   DECLARE_SERVICE( IOVSvc );
 //   DECLARE_TOOL( IOVSvcTool );
-// }
+//}
 
diff --git a/Control/IOVSvc/test/IOVSvcTool_test.cxx b/Control/IOVSvc/test/IOVSvcTool_test.cxx
index dcfb549beaa2d3e5443bd10b53f33018a4a6c225..71d68f6a83cbc9713c83586a712433fe418d9e38 100644
--- a/Control/IOVSvc/test/IOVSvcTool_test.cxx
+++ b/Control/IOVSvc/test/IOVSvcTool_test.cxx
@@ -51,7 +51,8 @@ int main() {
   //  ROOT::Reflex::PluginService::SetDebug(8);
   std::cout << "*** IOVSvcTool_test starts ***" << std::endl;
   ISvcLocator* pSvc;
-  initGaudi("IOVSvcTool_test.txt", pSvc); 
+  if (!initGaudi("IOVSvcTool_test.txt", pSvc))
+    return 1;
   //initGaudi(pSvc); 
   IToolSvc* pTS(0);
   assert((pSvc->service("ToolSvc", pTS, true)).isSuccess());
diff --git a/Control/Navigation/Navigation/NavigationToken.h b/Control/Navigation/Navigation/NavigationToken.h
index 9e41a16925b01bc82cb7665a606e818ee9ded9ff..4891c1e6947b2be5cda217ebf6177e2c14d0cbb0 100644
--- a/Control/Navigation/Navigation/NavigationToken.h
+++ b/Control/Navigation/Navigation/NavigationToken.h
@@ -269,7 +269,7 @@ class NavigationToken : public INavigationToken
  // copy operator
  NavigationToken& operator=(const NavigationToken & anotherToken)
  {
-   if ( anotherToken.m_data != 0 )
+   if ( this != &anotherToken && anotherToken.m_data != 0 )
      {
        m_data         = anotherToken.m_data;
        m_navCondition = anotherToken.m_navCondition; 
@@ -278,6 +278,18 @@ class NavigationToken : public INavigationToken
    return *this;
  }
 
+ // move operator
+ NavigationToken& operator=(NavigationToken&& anotherToken)
+ {
+   if ( this != &anotherToken && anotherToken.m_data != 0 )
+     {
+       m_data         = std::move (anotherToken.m_data);
+       m_navCondition = anotherToken.m_navCondition; 
+       m_navSelector  = anotherToken.m_navSelector;
+     }   
+   return *this;
+ }
+
  // dump 
  void dumpStore();
 
diff --git a/Control/Navigation/cmt/requirements b/Control/Navigation/cmt/requirements
deleted file mode 100644
index b563b2449ceb9439fbfd445dbc70a9e1a0005559..0000000000000000000000000000000000000000
--- a/Control/Navigation/cmt/requirements
+++ /dev/null
@@ -1,38 +0,0 @@
-
-package Navigation
-
-author Peter Loch <loch@physics.arizona.edu>
-
-use AtlasPolicy		AtlasPolicy-*
-
-use AtlasBoost		AtlasBoost-*	   External
-
-use CxxUtils            CxxUtils-*              Control
-use AthAllocators       AthAllocators-*         Control
-use AthLinks            AthLinks-*              Control
-use DataModel		DataModel-*		Control
-
-use AthenaKernel          AthenaKernel-*           Control
-
-
-branches Navigation
-library Navigation *.cxx 
-apply_pattern installed_library
-#apply_pattern dual_use_library *.cxx
-
-private
-use GaudiInterface GaudiInterface-*	External
-use SGTools		  SGTools-*		   Control
-use StoreGate             StoreGate-*              Control
-use uuid            *                  LCG_Interfaces
-use AtlasReflex   AtlasReflex-*   External -no_auto_imports
-
-apply_pattern lcgdict dict=Navigation selectionfile=selection.xml \
-headerfiles="../Navigation/NavigationDict.h"
-
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern install_runtime
-apply_pattern UnitTest_run unit_test=NavigationToken
-apply_pattern UnitTest_run unit_test=NavigableIterator extrapatterns='JobOptionsSvc +INFO'
-apply_pattern UnitTest_run unit_test=AthenaBarCodeImpl extrapatterns='found service JobIDSvc'
-
diff --git a/Control/PerformanceMonitoring/PerfMonAna/cmt/requirements b/Control/PerformanceMonitoring/PerfMonAna/cmt/requirements
deleted file mode 100755
index 9be2d319db002cd91884075d9f2054fa58f75b27..0000000000000000000000000000000000000000
--- a/Control/PerformanceMonitoring/PerfMonAna/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-package PerfMonAna
-author  Sebastien Binet <binet@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## Put here your package dependencies...
-use AtlasPyROOT		AtlasPyROOT-*		External -no_auto_imports
-use AtlasPyFwdBwdPorts  AtlasPyFwdBwdPorts-*	External -no_auto_imports
-use PerfMonEvent	PerfMonEvent-*		Control/PerformanceMonitoring -no_auto_imports
-##
-
-branches doc python bin
-
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_scripts files="-s=${PerfMonAna_root}/bin *.py"
-alias perfmon perfmon.py
-alias perfrtt perfrtt.py
-alias pmontree pmontree.py
-alias perfgrind perfgrind.py
-alias perf-dpmon perf-dpmon.py
diff --git a/Control/PerformanceMonitoring/PerfMonAna/doc/packagedoc.h b/Control/PerformanceMonitoring/PerfMonAna/doc/packagedoc.h
index 8a3e2ece53d306c427af84ad0a561e63052d014e..195d3c0901757643ad01c9f8a91467bfba4ea3ef 100644
--- a/Control/PerformanceMonitoring/PerfMonAna/doc/packagedoc.h
+++ b/Control/PerformanceMonitoring/PerfMonAna/doc/packagedoc.h
@@ -40,17 +40,6 @@ Informations about various switches, options and usage are available via:
 @endcode
 
 
-@ref used_PerfMonAna
 
-@ref requirements_PerfMonAna
 
 */
-
-/**
-@page used_PerfMonAna Used Packages
-*/
-
-/**
-@page requirements_PerfMonAna Requirements
-*/
-
diff --git a/Control/PerformanceMonitoring/PerfMonComps/cmt/requirements b/Control/PerformanceMonitoring/PerfMonComps/cmt/requirements
deleted file mode 100644
index 86f6c082609ad6fc5dbb5f72035e7b6a78d5d86b..0000000000000000000000000000000000000000
--- a/Control/PerformanceMonitoring/PerfMonComps/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package PerfMonComps
-author  Sebastien Binet <binet@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-private
-
-## Put here your package dependencies...
-use AtlasBoost		AtlasBoost-*		External
-use AtlasPython 	AtlasPython-*		External
-use AtlasROOT 		AtlasROOT-*		    External
-use AtlasPyROOT		AtlasPyROOT-*		External
-use AtlasAIDA		AtlasAIDA-*		    External
-
-## For Gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-
-use CxxUtils        CxxUtils-*          Control
-use AthenaKernel	AthenaKernel-*		Control
-use AthenaBaseComps	AthenaBaseComps-*	Control
-use SGTools		    SGTools-*		    Control
-use StoreGate		StoreGate-*		    Control
-use PerfMonKernel	PerfMonKernel-*		Control/PerformanceMonitoring
-use PerfMonEvent	PerfMonEvent-*		Control/PerformanceMonitoring
-use PyUtils		    PyUtils-*		    Tools -no_auto_imports
-
-##
-
-branches src src/components doc python share
-
-## make a component library
-library PerfMonComps *.cxx components/*.cxx
-macro PerfMon_PyROOT_linkopts " -L$(ROOT_home)/lib -lPyROOT"
-macro_append PerfMonComps_linkopts " $(PerfMon_PyROOT_linkopts)"
-macro_append PerfMonComps_linkopts " -l" # just to trick checkreq.py...
-macro_append PerfMonComps_linkopts "AthDSoCallBacks"
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-end_private
diff --git a/Control/PerformanceMonitoring/PerfMonComps/doc/packagedoc.h b/Control/PerformanceMonitoring/PerfMonComps/doc/packagedoc.h
index 998db01bbe9e117d3e1bbb17213e460d12c71a9b..31ee8278628a0f17230b28adb610dfe3a59426f5 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/doc/packagedoc.h
+++ b/Control/PerformanceMonitoring/PerfMonComps/doc/packagedoc.h
@@ -27,16 +27,5 @@ It ships the concrete implementations of interfaces exported from the PerfMonKer
   - PerfMon::CallGraphBuilderSvc : a <i>work in progress</i> service, meant to build a callgraph structure out of the sequence of algorithms and attach (performance monitoring) informations at each edge. Not yet in production.
   - PerfMon::CallGraphAuditor : a <i>work in progress</i> auditor, meant to notify the @c PerfMon::CallGraphBuilderSvc when (new) nodes of the callgraph structure should be added/updated. Not yet in production.
 
-@ref used_PerfMonComps
 
-@ref requirements_PerfMonComps
-
-*/
-
-/**
-@page used_PerfMonComps Used Packages
-*/
-
-/**
-@page requirements_PerfMonComps Requirements
 */
diff --git a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonSvc.cxx b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonSvc.cxx
index cef670dd0cc26af1a56dca3bac0b4ab0e19e14b6..109f4ffe7f762ca85c86799abbc6f111a43a8ce4 100644
--- a/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonSvc.cxx
+++ b/Control/PerformanceMonitoring/PerfMonComps/src/PerfMonSvc.cxx
@@ -336,7 +336,7 @@ PerfMonSvc::postFinalize()
           );
       if ( 0 == res ) {
         PMON_WARNING("Problem on python side during finalize() !!");
-        ::throw_py_exception();
+        std::abort();
       }
       Py_DECREF( res );
     }
@@ -349,7 +349,7 @@ PerfMonSvc::postFinalize()
           const_cast<char*>("") );
       if ( 0 == res ) {
         PMON_WARNING("Problem on python side during finalize() !!");
-        ::throw_py_exception();
+        std::abort();
       }
       Py_DECREF( res );
     }
diff --git a/Control/PerformanceMonitoring/PerfMonEvent/cmt/requirements b/Control/PerformanceMonitoring/PerfMonEvent/cmt/requirements
deleted file mode 100755
index 0b5a4c66ddda5ce70b4970ee8fcfda6d51d6eae5..0000000000000000000000000000000000000000
--- a/Control/PerformanceMonitoring/PerfMonEvent/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-## Automatically generated CMT requirements file
-package PerfMonEvent
-author  Sebastien Binet <binet@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## Put here your package dependencies...
-use AtlasPython		AtlasPython-*		External
-use GaudiInterface 	GaudiInterface-*	External
-##
-
-branches PerfMonEvent src
-
-# Add cmake compatibility (doesn't do anything on CMT side of things)
-apply_pattern cmake_add_libraries target=PerfMonEvent libraries=rt
-
-library PerfMonEvent \
- PyStore.cxx PyChrono.cxx DataModel.cxx \
- MemStatsHooks.cxx MallocStats.cxx
-
-
-macro PerfMonEvent_linkopts_extras " -lrt -lpthread" \
-                            Darwin " -lpthread"
-# Export $(PerfMonEvent_linkopts_extras) to clients
-# by adding to PerfMonEvent_linkopts
-apply_pattern installed_library extras="$(PerfMonEvent_linkopts_extras)"
-
-### dict generation
-private
-use AtlasReflex  AtlasReflex-*  External -no_auto_imports
-
-apply_pattern lcgdict dict=PerfMonEvent \
- selectionfile=selection.xml \
- headerfiles="../PerfMonEvent/PerfMonEventDict.h"
-
-end_private
diff --git a/Control/PerformanceMonitoring/PerfMonEvent/doc/packagedoc.h b/Control/PerformanceMonitoring/PerfMonEvent/doc/packagedoc.h
index 1324cd3f50fe5d5986d8d11809eba662491b0e89..0c591bd6d766f60ab573345fc51d9d94c8bc9239 100644
--- a/Control/PerformanceMonitoring/PerfMonEvent/doc/packagedoc.h
+++ b/Control/PerformanceMonitoring/PerfMonEvent/doc/packagedoc.h
@@ -21,16 +21,6 @@ Each class holds information(s) about a very specialized monitoring aspect (CPU,
   - PerfMon::CfgHdr : meta data class holding information about the configuration of the job. It right now only holds the list of all top-level (ie: not the deeply nested) algorithms part of the TopSequence.
   - PerfMon::HephaestusHdr and PerfMon::HephaestusData : <i>dummies for now</i>
 
-@ref used_PerfMonEvent
 
-@ref requirements_PerfMonEvent
 
 */
-
-/**
-@page used_PerfMonEvent Used Packages
-*/
-
-/**
-@page requirements_PerfMonEvent Requirements
-*/
diff --git a/Control/PerformanceMonitoring/PerfMonGPerfTools/cmt/requirements b/Control/PerformanceMonitoring/PerfMonGPerfTools/cmt/requirements
deleted file mode 100644
index 5e349313f25ab95f27f0753b7b5cc42fe211f525..0000000000000000000000000000000000000000
--- a/Control/PerformanceMonitoring/PerfMonGPerfTools/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package PerfMonGPerfTools
-
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-author Elmar Ritsch         <Elmar.Ritsch@cern.ch>
-
-use   AtlasPolicy       AtlasPolicy-*
-use   GaudiInterface    GaudiInterface-*    External
-
-private
-
-apply_tag use_gpt_profiler
-
-use   AtlasGPerfTools   AtlasGPerfTools-*   External
-use   AthenaBaseComps   AthenaBaseComps-*   Control
-use   AthenaKernel      AthenaKernel-*      Control
-
-# Add cmake compatibility (doesn't do anything on CMT side of things)
-apply_pattern cmake_add_command command="find_package(gperftools COMPONENTS tcmalloc profiler)"
-
-library PerfMonGPerfTools *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions     files=*.py
-apply_pattern declare_scripts        files="../scripts/*.py ../scripts/gathena"
-apply_pattern declare_python_modules files=*.py
diff --git a/Control/PerformanceMonitoring/PerfMonKernel/cmt/requirements b/Control/PerformanceMonitoring/PerfMonKernel/cmt/requirements
deleted file mode 100755
index 4fa4e31d0d3fdde69e16ca469ce950d326f8c33f..0000000000000000000000000000000000000000
--- a/Control/PerformanceMonitoring/PerfMonKernel/cmt/requirements
+++ /dev/null
@@ -1,20 +0,0 @@
-## Automatically generated CMT requirements file
-package PerfMonKernel
-author  Sebastien Binet <binet@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-use AtlasCxxPolicy 	AtlasCxxPolicy-*
-
-## For Gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-
-## Put here your package dependencies...
-use AtlasBoost	 	AtlasBoost-*		External
-##
-
-branches PerfMonKernel src
-
-library PerfMonKernel *.cxx
-
-apply_pattern installed_library
diff --git a/Control/PerformanceMonitoring/PerfMonKernel/doc/packagedoc.h b/Control/PerformanceMonitoring/PerfMonKernel/doc/packagedoc.h
index 6a8c31880ecbddc86f289aab9f54361e9ade96e8..4d0e51a2581999226b4d36c08b64eddee5b309f4 100644
--- a/Control/PerformanceMonitoring/PerfMonKernel/doc/packagedoc.h
+++ b/Control/PerformanceMonitoring/PerfMonKernel/doc/packagedoc.h
@@ -37,16 +37,6 @@ The assumption that performance data is in good shape and may be committed to pe
 
  - ICallGraphBuilderSvc : the interface to the service building a callgraph out of the sequence of @c Algorithm. It is a rather <i>'work in progress'</i> class at the moment (June 2007) and not (yet) officially part of the toolkit of the Performance Monitoring domain. The main idea is to use the Gaudi @c IAuditor infrastructure to monitor algorithms/services and later on attach to each of the nodes of the callgraph additional informations (CPU, memory consumption,...).
 
-@ref used_PerfMonKernel
 
-@ref requirements_PerfMonKernel
 
 */
-
-/**
-@page used_PerfMonKernel Used Packages
-*/
-
-/**
-@page requirements_PerfMonKernel Requirements
-*/
diff --git a/Control/PerformanceMonitoring/PerfMonTests/cmt/requirements b/Control/PerformanceMonitoring/PerfMonTests/cmt/requirements
deleted file mode 100755
index f52b01b1541f2c35794a5ec8009ac0365d80a29c..0000000000000000000000000000000000000000
--- a/Control/PerformanceMonitoring/PerfMonTests/cmt/requirements
+++ /dev/null
@@ -1,35 +0,0 @@
-## Automatically generated CMT requirements file
-package PerfMonTests
-author  Sebastien Binet <binet@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-private
-## For Gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-
-## Put here your package dependencies...
-use AtlasCLHEP		AtlasCLHEP-*		External
-use AthenaKernel	AthenaKernel-*		Control
-use AthenaBaseComps	AthenaBaseComps-*	Control
-use StoreGate		StoreGate-*		Control
-use SGTools		SGTools-*		Control
-use AthAllocators	AthAllocators-*		Control
-use AthContainers	AthContainers-*		Control
-use PerfMonKernel	PerfMonKernel-*		Control/PerformanceMonitoring
-use PerfMonComps	PerfMonComps-*		Control/PerformanceMonitoring -no_auto_imports
-use JetRec		JetRec-*		Reconstruction/Jet -no_auto_imports
-use McParticleTests	McParticleTests-*	PhysicsAnalysis/TruthParticleID -no_auto_imports
-
-##
-end_private
-
-branches python share share/tests src src/components test
-
-## make a component library
-library PerfMonTests *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py tests/*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Control/PileUpComps/cmt/requirements b/Control/PileUpComps/cmt/requirements
deleted file mode 100755
index 4fb232a6a5628b29cfed01cf162087b1eb9d0918..0000000000000000000000000000000000000000
--- a/Control/PileUpComps/cmt/requirements
+++ /dev/null
@@ -1,19 +0,0 @@
-package PileUpComps
-author P. Calafiura   <Paolo.Calafiura@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-private
-use AtlasCLHEP          AtlasCLHEP-*       External
-use AtlasBoost          AtlasBoost-*       External
-use GaudiInterface      GaudiInterface-*   External
-use AthenaKernel        AthenaKernel-*     Control
-use AthenaBaseComps     AthenaBaseComps-*  Control
-use StoreGate           StoreGate-*        Control
-use PileUpTools         PileUpTools-*      Control
-use EventInfo           EventInfo-*        Event
-#use xAODCore            xAODCore-*         Event/xAOD
-use xAODEventInfo       xAODEventInfo-*    Event/xAOD
-use xAODCnvInterfaces   xAODCnvInterfaces-* Event/xAOD
-
-library PileUpComps  *.cxx -s=components *.cxx
-apply_pattern component_library
diff --git a/Control/PileUpComps/doc/packagedoc.h b/Control/PileUpComps/doc/packagedoc.h
index 6ee3109c4de16b5839487ab5bbf020c52d1c402c..090bc88c63030cfa7ec7b7646dcbbcdf0e08836f 100644
--- a/Control/PileUpComps/doc/packagedoc.h
+++ b/Control/PileUpComps/doc/packagedoc.h
@@ -21,7 +21,6 @@ theApp.EventLoop = "PileUpEventLoopMgr"
 
  - Simulation/Digitization/test/TestPileUp.xml
 
-@section PileUpComps_reqs CMT requirements file
 
 
 @section PileUpComps_refs More Documentation
diff --git a/Control/PileUpComps/src/PileUpEventLoopMgr.cxx b/Control/PileUpComps/src/PileUpEventLoopMgr.cxx
index 57e4eb2580d5b61fa4f9cfba9ee352044ecf2779..bc48912931be80594a5bd09f1feff854c647c6ab 100644
--- a/Control/PileUpComps/src/PileUpEventLoopMgr.cxx
+++ b/Control/PileUpComps/src/PileUpEventLoopMgr.cxx
@@ -11,6 +11,7 @@
 #include "AthenaKernel/errorcheck.h"
 #include "AthenaKernel/ITimeKeeper.h"
 #include "AthenaKernel/ExtendedEventContext.h"
+#include "AthenaKernel/EventContextClid.h"
 
 #include "EventInfo/PileUpEventInfo.h" // OLD EDM
 #include "EventInfo/EventID.h"         // OLD EDM
@@ -776,10 +777,18 @@ StatusCode PileUpEventLoopMgr::executeEvent(void* par)
   m_eventContext->set(m_nevt,0);
 
   /// Is this correct, or should it be set to a pileup store?
-  m_eventContext->setExtension( Atlas::ExtendedEventContext(m_evtStore->hiveProxyDict()) );
+  m_eventContext->setExtension( Atlas::ExtendedEventContext(m_evtStore->hiveProxyDict(),
+                                                            pEvent->event_ID()->run_number()) );
   Gaudi::Hive::setCurrentContext( m_eventContext );
 
   m_aess->reset(*m_eventContext);
+  if (m_evtStore->record(std::make_unique<EventContext> (*m_eventContext),
+                         "EventContext").isFailure())
+  {
+    m_msg << MSG::ERROR 
+          << "Error recording event context object" << endmsg;
+    return (StatusCode::FAILURE);
+  }
 
   /// Fire begin-Run incident if new run:
   if (m_firstRun || (m_currentRun != pEvent->event_ID()->run_number()) )
diff --git a/Control/PileUpTools/PileUpTools/PileUpMergeSvc.h b/Control/PileUpTools/PileUpTools/PileUpMergeSvc.h
index 8b36c7f5024fb2a98a72574c0c63435b5e580ebc..1652626d35dc3ea2b9a5c1a52c16490783a955c8 100755
--- a/Control/PileUpTools/PileUpTools/PileUpMergeSvc.h
+++ b/Control/PileUpTools/PileUpTools/PileUpMergeSvc.h
@@ -109,7 +109,6 @@ private:
   template <typename DATA, typename KEY>
   bool isLive(const KEY& key, int iXing);   ///< is iXing live for DATA/key?
   bool isLive(CLID id, const std::string& dataKey, int iXing);
-  bool doRefresh(CLID id, const std::string& dataKey, int iXing);
 
   void decodeIntervals();
 
@@ -158,6 +157,8 @@ private:
   ///< controls PileUpTimedEventIndex for TimedData returned by retrieveSubEvts
   BooleanProperty m_returnTimedData; 
 
+  bool doRefresh(const Range& r, int iXing);
+
 protected:
   /// Standard Gaudi Constructor
   PileUpMergeSvc(const std::string& name, ISvcLocator* svc);
diff --git a/Control/PileUpTools/cmt/requirements b/Control/PileUpTools/cmt/requirements
deleted file mode 100755
index 9cd427ec611fdacdad2703e7258c3434a6b7bb13..0000000000000000000000000000000000000000
--- a/Control/PileUpTools/cmt/requirements
+++ /dev/null
@@ -1,17 +0,0 @@
-package PileUpTools
-
-author P. Calafiura   <Paolo.Calafiura@cern.ch>
-author M. Marino      <Massimo_Marino@lbl.gov>
-
-use AtlasPolicy         AtlasPolicy-*
-use AthenaKernel        AthenaKernel-*       Control
-use AthenaBaseComps     AthenaBaseComps-*    Control
-use CLIDSvc             CLIDSvc-*            Control
-use AthLinks            AthLinks-*           Control
-use SGTools             SGTools-*            Control
-use StoreGate           StoreGate-*          Control
-use EventInfo           EventInfo-*          Event
-use xAODEventInfo       xAODEventInfo-*      Event/xAOD
-use GaudiInterface      GaudiInterface-*     External
-
-apply_pattern dual_use_library files=" *.cxx "
diff --git a/Control/PileUpTools/doc/packagedoc.h b/Control/PileUpTools/doc/packagedoc.h
index a41c5118df162f3475a0acde3174423652b0d651..ace9344cd05a2b729e40ad07488713ef5442515e 100644
--- a/Control/PileUpTools/doc/packagedoc.h
+++ b/Control/PileUpTools/doc/packagedoc.h
@@ -14,7 +14,6 @@ pileup job.
 
  - Simulation/Digitization/test/TestPileUp.xml
 
-@section PileUpTools_reqs CMT requirements file
 
 
 @section PileUpTools_refs More Documentation
diff --git a/Control/PileUpTools/src/PileUpMergeSvc.cxx b/Control/PileUpTools/src/PileUpMergeSvc.cxx
index bc40d55efd10776a0aa08e0a15cec50511f77cd7..d1186bcb9883e88663ff1aad75ab39a217fcd63c 100755
--- a/Control/PileUpTools/src/PileUpMergeSvc.cxx
+++ b/Control/PileUpTools/src/PileUpMergeSvc.cxx
@@ -145,8 +145,7 @@ PileUpMergeSvc::isLive(CLID id, const string& dataKey, int iXing) {
 }
 
 bool
-PileUpMergeSvc::doRefresh(CLID id, const string& dataKey, int iXing) {
-  const Range& r(m_ranges[make_pair(id, dataKey)]);
+PileUpMergeSvc::doRefresh(const Range& r, int iXing) {
   //  bool result(r.contains(iXing) && r.doRefresh(double(random())/RAND_MAX));
   //  std::cerr << "doRefresh: id " << id << " key " << dataKey 
   //	    << " xing " << iXing << " result " << result << std::endl;
@@ -165,35 +164,23 @@ PileUpMergeSvc::clearDataCaches() {
       StoreGateSvc* pSubEvtSG(iEvt->pSubEvtSG);
       assert(pSubEvtSG);
       //go object-by-object (driven by PileUpXingFolder settings)
-      SG::DataStore::ConstStoreIterator s_iter, s_end;
-      if ((pSubEvtSG->store()->tRange(s_iter, s_end)).isSuccess()) {
-	// loop over each type:
-	while (s_iter != s_end) {
-	  CLID id = s_iter->first;	
-	  // loop over proxies:
-	  SG::ConstProxyIterator p_iter = (s_iter->second).begin();
-	  SG::ConstProxyIterator p_end =  (s_iter->second).end();
-	  while (p_iter != p_end) {
-	    const std::string& key(p_iter->first);
-	    //FIXME turning the double iEvt->time is fraught with peril. Luckily 
-	    //FIXME it just works, but we should have the beam xing in iEvt
-	    if (doRefresh(id, key, int(iEvt->time()))) {
-	      (const_cast<SG::DataProxy&>(*p_iter->second)).setObject((DataObject*)0);
-#ifndef NDEBUG
-	      if (msg().level() <= MSG::DEBUG) {
-		msg() << MSG::DEBUG
-		      << "clearDataCachesByFolder: object with clid "
-		      << id << " and key " << key 
-		      << " removed from cache " 
-		      << iEvt->pSubEvtSG->name() << endmsg;
-	      }
-#endif
-	    }
-	    ++p_iter;
-	  } //Proxy loop
-	  ++s_iter;
-	} // CLID loop
-      } //tRange success
+      for (const auto& item : m_ranges) {
+        SG::sgkey_t sgkey = pSubEvtSG->stringToKey (item.first.second,
+                                                      item.first.first);
+        SG::DataProxy* proxy = pSubEvtSG->proxy_exact (sgkey);
+        //FIXME turning the double iEvt->time is fraught with peril. Luckily 
+        //FIXME it just works, but we should have the beam xing in iEvt
+        if (proxy && doRefresh (item.second, int(iEvt->time()))) {
+          proxy->setObject ((DataObject*)0);
+          if (msg().level() <= MSG::DEBUG) {
+            msg() << MSG::DEBUG
+                  << "clearDataCachesByFolder: object with clid "
+                  << item.first.first << " and key " << item.first.second
+                  << " removed from cache " 
+                  << pSubEvtSG->name() << endmsg;
+          }
+        }
+      }
       //even if we don't clear the store we need to empty the trash...
       iEvt->pSubEvtSG->emptyTrash();
 #ifndef NDEBUG
diff --git a/Control/PileUpTools/src/PileUpStream.cxx b/Control/PileUpTools/src/PileUpStream.cxx
index f35b27d25e6f7e58ca88700a3ad801b13b936bfc..de9679ffdb42ec155504a95271d5d527bf6888bd 100755
--- a/Control/PileUpTools/src/PileUpStream.cxx
+++ b/Control/PileUpTools/src/PileUpStream.cxx
@@ -140,7 +140,7 @@ bool PileUpStream::setupStore()
       m_ownStore = true;
       // further initialization of the cloned service 
       rc = (p_SG->sysInitialize()).isSuccess();      
-      p_SG->setStoreID(StoreID::EVENT_STORE); //needed by ProxyProviderSvc
+      p_SG->setStoreID(StoreID::PILEUP_STORE); //needed by ProxyProviderSvc
     } //clones
   }
   if (rc) {
diff --git a/Control/PyKernel/cmt/requirements b/Control/PyKernel/cmt/requirements
deleted file mode 100755
index 34185b6364f00150fc825e5f7b80942b3925e4f2..0000000000000000000000000000000000000000
--- a/Control/PyKernel/cmt/requirements
+++ /dev/null
@@ -1,19 +0,0 @@
-package PyKernel
-
-author Tadashi Maeno <Tadashi.Maeno@cern.ch>
-
-use AtlasPolicy		AtlasPolicy-*
-use AtlasPython		AtlasPython-*	External
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions     files="*.py"
-
-library PyKernel *.cxx
-apply_pattern installed_library
-
-private
-
-use AtlasReflex  AtlasReflex*  External
-
-apply_pattern lcgdict dict=PyKernel selectionfile=selection.xml \
-        headerfiles="../PyKernel/PyKernelDict.h"
diff --git a/Control/PyKernel/doc/packagedoc.h b/Control/PyKernel/doc/packagedoc.h
index dc62516371f32b94d6fbc03d04476072c029f7a5..8ac78abb65d72839197c9b8cffa845cb65e5d6c9 100644
--- a/Control/PyKernel/doc/packagedoc.h
+++ b/Control/PyKernel/doc/packagedoc.h
@@ -29,13 +29,3 @@ treat python very well. See <a href="http://tmaeno.home.cern.ch/tmaeno/PyKernel/
   - @ref PyKernelUsed
   - @ref PyKernelReq
 */
-
-/**
-@page PyKernelUsed Used Packages
-*/
-
-
-/**
-@page PyKernelReq Requirements
-
-*/
diff --git a/Control/RngComps/cmt/requirements b/Control/RngComps/cmt/requirements
deleted file mode 100644
index 2ef71613a9effe89c46a3630853d9e2bb8556cfe..0000000000000000000000000000000000000000
--- a/Control/RngComps/cmt/requirements
+++ /dev/null
@@ -1,56 +0,0 @@
-## automatically generated CMT requirements file
-package RngComps
-author  Atlas Collaboration
-
-## for athena policies: this has to be the first use statement
-use AtlasPolicy     AtlasPolicy-*
-
-## put here your package dependencies...
-private
-## for gaudi tools, services and objects
-use GaudiInterface  GaudiInterface-*    External
-use AtlasCLHEP      AtlasCLHEP-*        External
-use AtlasBoost      AtlasBoost-*        External
-
-use AthenaKernel    AthenaKernel-*      Control
-use AthenaBaseComps AthenaBaseComps-*   Control
-use StoreGate       StoreGate-*         Control
-use EventInfo       EventInfo-*         Event
-use AtlasCLHEP_RandomGenerators    AtlasCLHEP_RandomGenerators-*    Simulation/Tools
-end_private
-##
-
-branches src src/components doc python share
-
-private
-## default is to make component library
-library RngComps *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
-
-
-## --- tests ---
-apply_pattern install_runtime
-use TestTools       TestTools-*          AtlasTest
-
-apply_pattern UnitTest_run unit_test=AtRndmGen \
-extrapatterns="//GP:|^IncidentSvc *DEBUG Adding .* listener|^JobOptionsSvc +INFO|DEBUG Property update for OutputLevel"
-macro_append AtRndmGen_testlinkopts " -L../$(CMTCONFIG) -lRngComps"
-# Line numbers not right on x86_64?
-
-apply_pattern UnitTest_run unit_test=AtRanlux \
-extrapatterns="^IncidentSvc *DEBUG Adding .* listener|^JobOptionsSvc +INFO|DEBUG Property update for OutputLevel"
-macro_append AtRanlux_testlinkopts " -L../$(CMTCONFIG) -lRngComps"
-
-apply_pattern UnitTest_run unit_test=AtDSFMT \
-extrapatterns="^IncidentSvc *DEBUG Adding .* listener|^JobOptionsSvc +INFO|DEBUG Property update for OutputLevel"
-macro_append AtDSFMT_testlinkopts " -L../$(CMTCONFIG) -lRngComps"
-
-apply_pattern athenarun_test name="TestSeedRunEvent" \
-pre_script="../cmt/setup.sh" \
-options="RngComps/TestSeedRunEvent.py" \
-post_script="post.sh TestSeedRunEvent $(q)SGAudSvc +INFO Finalizing|Py:Athena +INFO executing ROOT6Setup|SGAudSvc +INFO Initializing|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|DEBUG Calling destructor|DEBUG Property update for OutputLevel$(q)"
-
-end_private
diff --git a/Control/RootUtils/cmt/requirements b/Control/RootUtils/cmt/requirements
deleted file mode 100755
index 4177bae90a8e068344be216bc90af0f79e4a4a7a..0000000000000000000000000000000000000000
--- a/Control/RootUtils/cmt/requirements
+++ /dev/null
@@ -1,53 +0,0 @@
-package RootUtils
-
-author Scott Snyder <snyder@bnl.gov>
-
-# This shouldn't depend on anything other than root/python/boost.
-use AtlasPolicy      AtlasPolicy-*    
-use AtlasROOT        AtlasROOT-*        External
-use AtlasBoost       AtlasBoost-*       External
-use AtlasPython      AtlasPython-*      External
-
-# Add cmake compatibility (doesn't do anything on CMT side of things)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS RIO Hist Tree PyROOT)"
-
-library RootUtils  *.cxx
-apply_pattern installed_library
-
-apply_pattern declare_python_modules files="*.py"
-
-macro_append DOXYGEN_INPUT " ../doc" 
-
-macro_remove RootUtils_linkopts " -lRootUtilsPyROOT"
-
-# root 5.22.00-patches as of jan 27 moves the cint api headers
-# into a cint subdirectory.  Add this for now, so that things
-# will work with both the old and this new versions of root.
-include_dirs $(ROOT_home)/include/cint
-
-private
-use AtlasReflex      AtlasReflex-*      External
-apply_pattern lcgdict dict=RootUtils selectionfile=selection.xml headerfiles="../RootUtils/RootUtilsDict.h"
-
-library RootUtilsPyROOT pyroot/*.cxx
-apply_pattern named_installed_library library=RootUtilsPyROOT
-macro_append RootUtilsPyROOT_shlibflags " -L$(ROOT_home)/lib -lTreePlayer -lPyROOT "
-
-apply_pattern lcgdict dict=RootUtilsPyROOT selectionfile=selection_PyROOT.xml headerfiles="../RootUtils/RootUtilsPyROOTDict.h"
-macro_append RootUtilsPyROOTDict_shlibflags " -lRootUtilsPyROOT -L$(ROOT_home)/lib -lTreePlayer -lPyROOT "
-macro_append RootUtilsPyROOTGen_dependencies " RootUtilsPyROOT"
-
-## unit tests
-use TestTools	   TestTools-*         AtlasTest
-apply_pattern UnitTest_run unit_test=Type
-apply_pattern UnitTest_run unit_test=TSMethodCall
-
-document athenarun_launcher ttreepatch_utest -group=check \
-    athenarun_exe="python" \
-    athenarun_pre="'source ../cmt/setup.sh'" \
-    athenarun_opt="../test/TTreePatch_t.py" \
-    athenarun_out="' >& TTreePatch_t.log'"
-macro_append ttreepatch_dependencies " RootUtilsPyROOT"
-
-end_private
-
diff --git a/Control/SGComps/cmt/requirements b/Control/SGComps/cmt/requirements
deleted file mode 100644
index d97aeaea1fb409f759617763f9220c6ac289e3b1..0000000000000000000000000000000000000000
--- a/Control/SGComps/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package SGComps
-
-author Paolo Calafiura   <Paolo.Calafiura@cern.ch>
-
-use AtlasPolicy    AtlasPolicy-*
-
-private
-use GaudiInterface GaudiInterface-* External
-use AtlasBoost     AtlasBoost-*     External
-
-use AthenaKernel    AthenaKernel-*      Control
-use AthenaBaseComps AthenaBaseComps-*   Control
-use SGTools         SGTools-*           Control
-use AthLinks        AthLinks-*          Control
-use AthContainers   AthContainers-*     Control
-use StoreGate       StoreGate-*         Control
-
-end_private
-
-branches src src/components
-
-apply_pattern declare_python_modules files=" *.py "
-
-private
-
-library SGComps *.cxx -s=components *.cxx
-apply_pattern component_library
-
-use TestTools      TestTools-*      AtlasTest
-
-apply_pattern UnitTest_run unit_test=SGFolder \
-  extrapatterns='^JobOptionsSvc +INFO'
-macro_append SGFolder_testlinkopts  "-L../$(CMTCONFIG) -lSGComps"
-
-apply_pattern UnitTest_run unit_test=ProxyProviderSvc \
-  extrapatterns='^JobOptionsSvc +INFO'
-
-apply_pattern UnitTest_run unit_test=AddressRemappingSvc \
-  extrapatterns='^JobOptionsSvc +INFO'
-
-macro_append DOXYGEN_INPUT " ../test " 
-
-end_private
diff --git a/Control/SGComps/doc/packagedoc.h b/Control/SGComps/doc/packagedoc.h
index 4165bcad8f675b37a51eddd85bd0ed570dda2c21..15e4c44b3400caf0521dac24da5d130396fe837c 100644
--- a/Control/SGComps/doc/packagedoc.h
+++ b/Control/SGComps/doc/packagedoc.h
@@ -14,7 +14,6 @@ contains the Gaudi components implementing StoreGate.
  - ProxyProviderSvc_test.cxx
  - SGFolder_test.cxx
 
-@section SGComps_reqs CMT requirements file
 
 
 @section SGComps_refs More Documentation
diff --git a/Control/SGComps/src/AddressRemappingSvc.cxx b/Control/SGComps/src/AddressRemappingSvc.cxx
index f49f8baf25bd401b8ee0d0d5fb232c6adc8a1d59..60f65d29d77f033917a54c35d9289b059299ea89 100644
--- a/Control/SGComps/src/AddressRemappingSvc.cxx
+++ b/Control/SGComps/src/AddressRemappingSvc.cxx
@@ -237,7 +237,8 @@ StatusCode AddressRemappingSvc::loadAddresses(StoreID::type /*storeID*/,
 		   newIter = m_newTads.begin(), oldIterEnd = m_oldTads.end();
 		   oldIter != oldIterEnd; oldIter++, newIter++) {
       CLID goodCLID = newIter->clID(); //newIter are the things we are remapping to 
-      SG::TransientAddress::TransientClidSet clidToKeep(oldIter->transientID());
+      SG::TransientAddress::TransientClidSet clidvec(oldIter->transientID());
+      std::set<CLID> clidToKeep (clidvec.begin(), clidvec.end());
       //try dataproxy, if it fails, try data proxy of next type 
       SG::DataProxy* dataProxy(m_proxyDict->proxy(goodCLID,newIter->name()/*the name of the address in the input file*/));
       if(dataProxy==0) {
@@ -285,7 +286,9 @@ StatusCode AddressRemappingSvc::loadAddresses(StoreID::type /*storeID*/,
 }
 //________________________________________________________________________________
 StatusCode AddressRemappingSvc::updateAddress(StoreID::type /*storeID*/,
-					      SG::TransientAddress* tad) {
+					      SG::TransientAddress* tad,
+                                              const EventContext& /*ctx*/)
+{
    for (std::vector<SG::TransientAddress>::const_iterator oldIter = m_oldTads.begin(),
 		   newIter = m_newTads.begin(), oldIterEnd = m_oldTads.end();
 		   oldIter != oldIterEnd; oldIter++, newIter++) {
diff --git a/Control/SGComps/src/AddressRemappingSvc.h b/Control/SGComps/src/AddressRemappingSvc.h
index 408432b4ce2dc17fb8a05f3f31462918d3d88858..5435e9d566ebc1b7d1ecc0c9e905850ecea4dce7 100644
--- a/Control/SGComps/src/AddressRemappingSvc.h
+++ b/Control/SGComps/src/AddressRemappingSvc.h
@@ -64,7 +64,8 @@ public: // Non-static members
    /// Update a transient address. Do mapping from one address to another
    /// @param tad [IN] transient address to be updated.
   virtual StatusCode updateAddress(StoreID::type /*storeID*/,
-				   SG::TransientAddress* pTad) override;
+				   SG::TransientAddress* pTad,
+                                   const EventContext& ctx) override;
 
 
   /**
diff --git a/Control/SGComps/src/ProxyProviderSvc.cxx b/Control/SGComps/src/ProxyProviderSvc.cxx
index 081c80b39efc6721365770ea3280edf79fed1d1a..925583b5463b2193bd072daf5194467236470eb8 100644
--- a/Control/SGComps/src/ProxyProviderSvc.cxx
+++ b/Control/SGComps/src/ProxyProviderSvc.cxx
@@ -11,6 +11,7 @@
 
 #include "AthenaKernel/IAddressProvider.h"
 #include "AthenaKernel/IProxyRegistry.h"
+#include "AthenaKernel/EventContextClid.h"
 
 #include "GaudiKernel/IConversionSvc.h"
 #include "GaudiKernel/ListItem.h"
@@ -18,8 +19,6 @@
 
 #include "ProxyProviderSvc.h"
 
-#include "boost/foreach.hpp"
-
 using namespace std;
 
 ProxyProviderSvc::ProxyProviderSvc(const std::string& name, 
@@ -175,9 +174,9 @@ StatusCode ProxyProviderSvc::addAddresses(IProxyRegistry& store,
     {
       proxy->setAddress(pTAD->address());
       delete pTAD;
-      pTAD = proxy->transientAddress();
-      if (pTAD->provider() == 0)
-        pTAD->setProvider(provider, store.storeID());
+      pTAD = nullptr;
+      if (proxy->provider() == 0)
+        proxy->setProvider(provider, store.storeID());
     } else {
       pTAD->setProvider(provider, store.storeID());
       if ( 0 == addAddress(store, pTAD) ) return StatusCode::FAILURE;
@@ -204,9 +203,8 @@ ProxyProviderSvc::addAddress(IProxyRegistry& store,
   bool addedProxy(false);
   // loop over all the transient CLIDs:
   SG::TransientAddress::TransientClidSet tClid = tAddr->transientID();
-  SG::TransientAddress::TransientClidSet::const_iterator tIter = tClid.begin();
-  for (; tIter != tClid.end(); tIter++) {
-    addedProxy |= (store.addToStore(*tIter, dp)).isSuccess();
+  for (CLID clid : tClid) {
+    addedProxy |= (store.addToStore(clid, dp)).isSuccess();
   }
 
   if (addedProxy) {
@@ -218,15 +216,15 @@ ProxyProviderSvc::addAddress(IProxyRegistry& store,
     // Add any other allowable conversions.
     const SG::BaseInfoBase* bi = SG::BaseInfoBase::find (tAddr->clID());
     if (bi) {
-      BOOST_FOREACH(CLID clid, bi->get_bases()) {
-	if (tClid.find (clid) == tClid.end()) {
+      for (CLID clid : bi->get_bases()) {
+        if (std::find (tClid.begin(), tClid.end(), clid) == tClid.end()) {
 	  store.addToStore (clid, dp).ignore();
           tAddr->setTransientID (clid);
         }
       }
 
-      BOOST_FOREACH(CLID clid, bi->get_copy_conversions()) {
-	if (tClid.find (clid) == tClid.end()) {
+      for (CLID clid : bi->get_copy_conversions()) {
+        if (std::find (tClid.begin(), tClid.end(), clid) == tClid.end()) {
 	  store.addToStore (clid, dp).ignore();
           tAddr->setTransientID (clid);
         }
@@ -249,10 +247,11 @@ ProxyProviderSvc::retrieveProxy(const CLID& id, const std::string& key,
   if ( (dp=store.proxy(id,key)) != 0 ) return dp;
 
   if ( store.storeID() != StoreID::SIMPLE_STORE ) {
+    const EventContext& ctx = contextFromStore (store);
     SG::TransientAddress* pTAd = new SG::TransientAddress(id, key);
     pAPiterator iProvider(m_providers.begin()), iEnd(m_providers.end());
     for (; iProvider != iEnd; iProvider++) {
-      if ( ((*iProvider)->updateAddress(store.storeID(),pTAd)).isSuccess() ) 
+      if ( ((*iProvider)->updateAddress(store.storeID(),pTAd,ctx)).isSuccess() ) 
 	{
 	  pTAd->setProvider(*iProvider, store.storeID());
 	  return this->addAddress(store,pTAd);
@@ -265,24 +264,26 @@ ProxyProviderSvc::retrieveProxy(const CLID& id, const std::string& key,
 
 }
 
-StatusCode
-ProxyProviderSvc::updateAddress(StoreID::type storeID,
-				SG::TransientAddress* pTAd)
+/**
+ * @brief Retrieve the EventContext saved in store DS.
+ * @param ds The store from which to retrieve the context.
+ *
+ * If there is no context recorded in the store, return a default-initialized
+ * context.
+ */
+const EventContext& ProxyProviderSvc::contextFromStore (IProxyRegistry& ds) const
 {
-
-  pAPiterator iProvider(m_providers.begin()), iEnd(m_providers.end());
-  for (; iProvider != iEnd; ++iProvider) {
-    if ( ((*iProvider)->updateAddress(storeID, pTAd)).isSuccess() ) 
-    {
-      pTAd->setProvider(*iProvider, storeID);
-      return StatusCode::SUCCESS;
-    }
-  }  
-
-  return StatusCode::SUCCESS;
-
+  SG::DataProxy* proxy = ds.proxy (ClassID_traits<EventContext>::ID(),
+                                   "EventContext");
+  if (proxy) {
+    EventContext* ctx = SG::DataProxy_cast<EventContext> (proxy);
+    if (ctx) return *ctx;
+  }
+  static const EventContext emptyContext;
+  return emptyContext;
 }
 
+
 /// Gaudi Service boilerplate
 /// Gaudi_cast...
 // N.B. Don't forget to release the interface after use!!!
diff --git a/Control/SGComps/src/ProxyProviderSvc.h b/Control/SGComps/src/ProxyProviderSvc.h
index 70088b3f480a940bc7bd0cab7473b140fd2bda9f..b8b2918d864ffea6e9c21064bea9476bea9bb95b 100644
--- a/Control/SGComps/src/ProxyProviderSvc.h
+++ b/Control/SGComps/src/ProxyProviderSvc.h
@@ -54,18 +54,14 @@ public:
   ///IProxyProvider interface
   //@{
   ///add proxies to the store to modify (before Begin Event)
-  virtual StatusCode preLoadProxies(IProxyRegistry& storeToModify);
+  virtual StatusCode preLoadProxies(IProxyRegistry& storeToModify) override;
 
   ///add proxies to the store to modify (during Begin Event)
-  virtual StatusCode loadProxies(IProxyRegistry& storeToModify);
+  virtual StatusCode loadProxies(IProxyRegistry& storeToModify) override;
 
   ///get the default proxy. Optionally add proxies to the store to modify
   virtual SG::DataProxy* retrieveProxy(const CLID& id, const std::string& key,
-				       IProxyRegistry& storeToModify);
-
-  /// update a transient Address
-  virtual StatusCode updateAddress(StoreID::type storeID,
-				   SG::TransientAddress* tad);
+				       IProxyRegistry& storeToModify) override;
 
  ///create a list of transient Addresses:
   StatusCode addAddresses(IProxyRegistry& dataStore,
@@ -80,12 +76,12 @@ public:
 
   ///IAddressProvider manager functionality
   ///add a provider to the set of known ones. PROVIDER IS OWNED BY THE CLIENT
-  virtual void addProvider(IAddressProvider* aProvider);
+  virtual void addProvider(IAddressProvider* aProvider) override;
 
   /// Service boilerplate
   //@{
-  virtual StatusCode initialize();
-  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
+  virtual StatusCode initialize() override;
+  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override;
   //@}
 
 protected:    
@@ -96,6 +92,16 @@ protected:
   virtual ~ProxyProviderSvc();
 
 private:
+  /**
+   * @brief Retrieve the EventContext saved in store DS.
+   * @param ds The store from which to retrieve the context.
+   *
+   * If there is no context recorded in the store, return a default-initialized
+   * context.
+   */
+   const EventContext& contextFromStore (IProxyRegistry& ds) const;
+
+
   /**
    * @brief Add lists of TADs to the store.
    * @param store Store to which to add.
diff --git a/Control/SGComps/src/SGInputLoader.cxx b/Control/SGComps/src/SGInputLoader.cxx
index fd48f72d3d5cff1a9de7eeb114fe248ebe4e5b6a..3e5c44744b35c9fda8f9744c9b9c7730057b226b 100644
--- a/Control/SGComps/src/SGInputLoader.cxx
+++ b/Control/SGComps/src/SGInputLoader.cxx
@@ -14,23 +14,21 @@
 #include "GaudiKernel/Property.h"
 #include "AthenaKernel/errorcheck.h"
 #include "StoreGate/VarHandleKey.h"
+#include "AthenaKernel/StoreID.h"
 
 //---------------------------------------------------------------------------------
 
 
 SGInputLoader::SGInputLoader( const std::string& name, 
 			  ISvcLocator* pSvcLocator ) : 
-  ::AthAlgorithm( name, pSvcLocator ), m_dump(false)
+  ::AthAlgorithm( name, pSvcLocator )
 {
   //
   // Property declaration
   // 
-  declareProperty( "Load", m_load)->declareUpdateHandler(&SGInputLoader::loader, this);
-  declareProperty( "ShowEventDump", m_dump=false);
-  declareProperty( "FailIfNoProxy", m_failEvt=true, 
-                   "execute returns FAILURE if a requested proxy is not found in store");
-  declareProperty( "LoadExtraProxies", m_loadProxies=true,
-                   "load the Proxies attributed to the SGInputLoader by the Scheduler");
+  declareProperty( "Load", m_load, "create Output data dependencies for these objects")
+    ->declareUpdateHandler(&SGInputLoader::loader, this);
+
 }
 
 //---------------------------------------------------------------------------------
@@ -84,21 +82,35 @@ SGInputLoader::execute()
 
   // add objects automatically added by the Scheduler
   if (m_first) {
-    if (m_loadProxies) {
+    if (m_loadProxies.value()) {
       for (auto obj : outputDataObjs() ) {
         m_load.emplace(obj);
       }
     }
+
+    // check if objects are not in EventStore
+    DataObjIDColl toLoad;
+    for (auto obj : m_load) {
+      SG::VarHandleKey vhk(obj.clid(),obj.key(),Gaudi::DataHandle::Writer);
+      if (StoreID::findStoreID(vhk.storeHandle().name()) == StoreID::EVENT_STORE) {
+        toLoad.emplace(obj);
+      } else {
+        ATH_MSG_WARNING("Will not auto-load proxy for non-EventStore object: "
+                        << obj);
+      }
+    }
+    m_load = toLoad;
+    
     m_first = false;
   }
 
   bool b = loadObjs( m_load );
 
-  if (m_dump) {
+  if (m_dump.value()) {
     ATH_MSG_DEBUG(evtStore()->dump()); 
   }
 
-  if (m_failEvt && !b) {
+  if (m_failEvt.value() && !b) {
     ATH_MSG_ERROR("autoload of objects failed. aborting event processing");
     sc = StatusCode::FAILURE;
   }
@@ -113,6 +125,16 @@ SGInputLoader::loader(Property& p ) {
 
   ATH_MSG_DEBUG("setting prop ExtraOutputs to " <<  p.toString());
 
+  DataObjIDColl toLoad;
+
+  for (auto obj : m_load) {
+    // add an explicit storename as needed
+    SG::VarHandleKey vhk(obj.clid(),obj.key(),Gaudi::DataHandle::Writer);
+    obj.updateKey( vhk.objKey() );
+    toLoad.emplace(obj);
+  }
+  m_load = toLoad;
+
   if (!setProperty("ExtraOutputs", p).isSuccess()) {
     ATH_MSG_WARNING("failed setting property ExtraOutputs");
   }
@@ -136,7 +158,7 @@ SGInputLoader::loadObjs(const DataObjIDColl& objs) const {
     SG::DataProxy* dp = evtStore()->proxy(obj.clid(), vhk.key());
     if (dp != 0) {
       ATH_MSG_DEBUG(" found proxy for " << obj);
-      if (dp->transientAddress()->provider() == 0) {
+      if (dp->provider() == 0) {
 	ATH_MSG_DEBUG("   obj " << obj << " has no provider, and is only Transient" );
       }
 
@@ -149,16 +171,16 @@ SGInputLoader::loadObjs(const DataObjIDColl& objs) const {
       }
 
       // ... and linked classes.
-      for (CLID clid2 : dp->transientAddress()->transientID()) {
+      for (CLID clid2 : dp->transientID()) {
         if (clid2 != obj.clid())
           evtStore()->addedNewTransObject(clid2, vhk.key());
       }
     } else {
       ok = false;
-      if (m_failEvt) {
-        ATH_MSG_ERROR("unable to get proxy for " << obj);
+      if (m_failEvt.value()) {
+        ATH_MSG_ERROR("unable to find proxy for " << obj);
       } else {
-        ATH_MSG_WARNING("unable to get proxy for " << obj);
+        ATH_MSG_WARNING("unable to find proxy for " << obj);
       }
     }
   }
diff --git a/Control/SGComps/src/SGInputLoader.h b/Control/SGComps/src/SGInputLoader.h
index ad8ce90f089a28daab4bc134dc7788ae830712ce..7380b6993c858295fe8448a128581c6ef2dcde23 100644
--- a/Control/SGComps/src/SGInputLoader.h
+++ b/Control/SGComps/src/SGInputLoader.h
@@ -16,8 +16,6 @@
 // FrameWork includes
 #include "GaudiKernel/DataObjID.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/DataObjID.h"
-
 
 class SGInputLoader
   : public ::AthAlgorithm
@@ -25,21 +23,13 @@ class SGInputLoader
 
  public: 
 
-  // Copy constructor: 
-
-  /// Constructor with parameters: 
   SGInputLoader( const std::string& name, ISvcLocator* pSvcLocator );
 
-  /// Destructor: 
   virtual ~SGInputLoader(); 
 
   /// this Alg is Clonable (for AthenaMT)
   bool isClonable() const override { return true; }
 
-  // Assignment operator: 
-  //SGInputLoader &operator=(const SGInputLoader &alg); 
-
-  // Athena algorithm's Hooks
   virtual StatusCode  initialize() override;
   virtual StatusCode  execute() override;
   virtual StatusCode  finalize() override;
@@ -52,13 +42,20 @@ class SGInputLoader
   void loader(Property&);
   bool loadObjs(const DataObjIDColl& objs) const;
 
-  /// Containers
-  DataObjIDColl m_load;
+  /// Properties
+  DataObjIDColl m_load;    // create Output data dependencies for these objects
 
-  bool m_dump{false}, m_first{true};
+  Gaudi::Property< bool > m_dump {this, "ShowEventDump", false, 
+      "printout contents of EventStore at end of execute()"};
+  
+  Gaudi::Property<bool> m_failEvt{this, "FailIfNoProxy", true, 
+      "execute returns FAILURE if a requested proxy is not found in store"};
+      
+  Gaudi::Property<bool> m_loadProxies{this, "LoadExtraProxies", true,
+      "load the Proxies attributed to the SGInputLoader by the Scheduler"};
 
-  Gaudi::Property<bool> m_failEvt{true};
-  Gaudi::Property<bool> m_loadProxies{true};
+  // other
+  bool m_first{true};
 
 }; 
 
diff --git a/Control/SGComps/test/AddressRemappingSvc_test.cxx b/Control/SGComps/test/AddressRemappingSvc_test.cxx
index 0b15c79552c1a9f36b8412b4a11903a4f53de2f3..c7b2a0debfc30e36a69262ec9cd24bf3b2a03410 100644
--- a/Control/SGComps/test/AddressRemappingSvc_test.cxx
+++ b/Control/SGComps/test/AddressRemappingSvc_test.cxx
@@ -114,7 +114,7 @@ void checkTADList (const IAddressProvider::tadList& tads,
       assert (tad->address() == &addrs.addr2);
       assert (tad->clearAddress() == false);
       assert (tad->transientID() ==
-              (SG::TransientAddress::TransientClidSet { fooclid, 321 }));
+              (SG::TransientAddress::TransientClidSet { 321, fooclid }));
       assert (tad->alias() ==
               (SG::TransientAddress::TransientAliasSet { "bar2.d1",
                                                          "bar2.d2",
diff --git a/Control/SGComps/test/ProxyProviderSvc_test.cxx b/Control/SGComps/test/ProxyProviderSvc_test.cxx
index 62901ffcd845bd5e29b1462d8a8abb4349706861..b50ca5aafc6e48b069521af3a1b7d71e0187bf58 100644
--- a/Control/SGComps/test/ProxyProviderSvc_test.cxx
+++ b/Control/SGComps/test/ProxyProviderSvc_test.cxx
@@ -37,7 +37,8 @@ public:
 				   tadList& list) override;
 
   virtual StatusCode updateAddress(StoreID::type storeID,
-				   SG::TransientAddress* pTAd) override;
+				   SG::TransientAddress* pTAd,
+                                   const EventContext& ctx) override;
 
 
   void add (CLID clid, const std::string& name);
@@ -72,7 +73,8 @@ StatusCode TestProvider::loadAddresses(StoreID::type /*storeID*/,
 
 
 StatusCode TestProvider::updateAddress(StoreID::type /*storeID*/,
-                                       SG::TransientAddress* /*pTAd*/)
+                                       SG::TransientAddress* /*pTAd*/,
+                                       const EventContext& /*ctx*/)
 {
   std::abort();
 }
@@ -106,7 +108,6 @@ public:
                                      const std::string& /*key*/) const override
   { return nullptr; }
 
-  std::vector<SG::TransientAddress> tads;
   std::vector<std::unique_ptr<SG::DataProxy> > proxies;
 };
 
@@ -114,8 +115,7 @@ public:
 StatusCode
 TestProxyRegistry::addToStore (const CLID& /*id*/, SG::DataProxy* proxy)
 {
-  tads.emplace_back (*proxy->transientAddress());
-  proxies.push_back (std::unique_ptr<SG::DataProxy> (proxy));
+  proxies.emplace_back (proxy);
   return StatusCode::SUCCESS;
 }
 
@@ -126,23 +126,23 @@ TestProvider providers[NPROVIDERS];
 
 void checkStore (const TestProxyRegistry& store)
 {
-  assert (store.tads.size() == 3);
+  assert (store.proxies.size() == 3);
   assert (providers[0].tListLen == 0);
   assert (providers[1].tListLen == 0);
   assert (providers[2].tListLen == 2);
   assert (providers[3].tListLen == 2);
 
-  assert (store.tads[0].clID() == 10);
-  assert (store.tads[0].name() == "x1");
-  assert (store.tads[0].provider() == &providers[1]);
+  assert (store.proxies[0]->clID() == 10);
+  assert (store.proxies[0]->name() == "x1");
+  assert (store.proxies[0]->provider() == &providers[1]);
 
-  assert (store.tads[1].clID() == 11);
-  assert (store.tads[1].name() == "x2");
-  assert (store.tads[1].provider() == &providers[1]);
+  assert (store.proxies[1]->clID() == 11);
+  assert (store.proxies[1]->name() == "x2");
+  assert (store.proxies[1]->provider() == &providers[1]);
 
-  assert (store.tads[2].clID() == 12);
-  assert (store.tads[2].name() == "y1");
-  assert (store.tads[2].provider() == &providers[3]);
+  assert (store.proxies[2]->clID() == 12);
+  assert (store.proxies[2]->name() == "y1");
+  assert (store.proxies[2]->provider() == &providers[3]);
 }
 
 
@@ -164,7 +164,7 @@ void test1 (IProxyProviderSvc& svc)
 
   for (TestProvider& p : providers)
     p.tListLen = -1;
-  store.tads.clear();
+  store.proxies.clear();
 
   assert (svc.loadProxies (store).isSuccess());
   checkStore (store);
diff --git a/Trigger/TrigT1/L1Topo/L1TopoHardware/cmt/fragments/l1topohw_pygen b/Control/SGMon/SGAudCore/SGAudCore/ATLAS_CHECK_THREAD_SAFETY
similarity index 100%
rename from Trigger/TrigT1/L1Topo/L1TopoHardware/cmt/fragments/l1topohw_pygen
rename to Control/SGMon/SGAudCore/SGAudCore/ATLAS_CHECK_THREAD_SAFETY
diff --git a/Control/SGMon/SGAudCore/cmt/requirements b/Control/SGMon/SGAudCore/cmt/requirements
deleted file mode 100644
index ccd97af1dafd2c921314a31eb71ba69fea324306..0000000000000000000000000000000000000000
--- a/Control/SGMon/SGAudCore/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-## Automatically generated CMT requirements file
-package SGAudCore
-author  Ilija Vukotic <ivukotic@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## For Gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-## Put here your package dependencies...
-
-##
-
-branches SGAudCore src
-
-library SGAudCore *.cxx
-
-apply_pattern installed_library
diff --git a/Control/SGMon/SGAudSvc/cmt/requirements b/Control/SGMon/SGAudSvc/cmt/requirements
deleted file mode 100644
index 3b70a3755a41a23b49346591786f9b47c3171861..0000000000000000000000000000000000000000
--- a/Control/SGMon/SGAudSvc/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package SGAudSvc
-
-author  Ilija Vukotic <ivukotic@cern.ch>
-
-use AtlasPolicy 	AtlasPolicy-*
-use AthenaKernel        AthenaKernel-*          Control
-use AthenaBaseComps     AthenaBaseComps-*       Control
-
-## For Gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-
-## Put here your package dependencies...
-use SGAudCore		SGAudCore-*		Control/SGMon
-
-private
-use StoreGate		StoreGate-*		Control
-
-public
-branches src src/components doc share
-
-
-## make a component library
-library SGAudSvc *.cxx components/*.cxx
-
-apply_pattern component_library
-#apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_scripts files="SGout2dot.py"
-
-alias SGout2dot SGout2dot.py
diff --git a/Control/SGMon/SGAudSvc/doc/packagedoc.h b/Control/SGMon/SGAudSvc/doc/packagedoc.h
index c766eec9e4144d27d20e1e327e51c30b58f956e5..b5ae904a43ea6321c17c0f4140889daf688d6d79 100644
--- a/Control/SGMon/SGAudSvc/doc/packagedoc.h
+++ b/Control/SGMon/SGAudSvc/doc/packagedoc.h
@@ -16,15 +16,5 @@ To obtain ps file from dot file you may use:'dot -Tps graph1.dot -o graph1.ps'.
 Please keep in mind that data are not collected for the first three events.
 
     
-@ref used_MyPackage
    
-@ref requirements_MyPackage
-*/
- 
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
 */
diff --git a/Control/SGTools/CMakeLists.txt b/Control/SGTools/CMakeLists.txt
index 38dc2dcc73f62dff3f9f4a07dba7d5e3535a2634..e071052820295507a4d2e99d26a7a2024b6ee72c 100644
--- a/Control/SGTools/CMakeLists.txt
+++ b/Control/SGTools/CMakeLists.txt
@@ -33,12 +33,6 @@ atlas_add_dictionary( SGToolsDict
                       INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
                       LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
 
-atlas_add_test( CLIDRegistry_test
-                SOURCES
-                test/CLIDRegistry_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
-
 atlas_add_test( VersionedKey_test
                 SOURCES
                 test/VersionedKey_test.cxx
@@ -52,12 +46,6 @@ atlas_add_test( DataBucket_test
                 LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools
                 EXTRA_PATTERNS "^HistogramPersis.* INFO" )
 
-atlas_add_test( BaseInfo_test
-                SOURCES
-                test/BaseInfo_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
-
 atlas_add_test( safe_clid_test
                 SOURCES
                 test/safe_clid_test.cxx
@@ -82,12 +70,6 @@ atlas_add_test( StringPool_test
                 INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
                 LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
 
-atlas_add_test( ClassName_test
-                SOURCES
-                test/ClassName_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
-
 atlas_add_test( DataProxy_test
                 SOURCES
                 test/DataProxy_test.cxx
diff --git a/Control/SGTools/SGTools/BaseInfo.h b/Control/SGTools/SGTools/BaseInfo.h
index fd22fb13c58d0188662424b97bf0773b3096d0e5..0e822347bc142fc30b3ddebd46e9abad76b9b91b 100755
--- a/Control/SGTools/SGTools/BaseInfo.h
+++ b/Control/SGTools/SGTools/BaseInfo.h
@@ -12,889 +12,13 @@
  * @date Nov 2005
  * @brief Provide an interface for finding inheritance information
  *        at run time.
- *
- * The @a SG::BaseInfo<T> class provides an interface for finding
- * inheritance information about class @a T.  In the absence of compiler
- * support for reflection, the inheritance information must be
- * explicitly declared.  This is done with the @a SG_BASE macro
- * and friends.  To declare that class @a D derives from class @a B, use
- *
- *@code
- *   struct B {};
- *   struct D : public B {};
- *   SG_BASE (D, B);
- @endcode
- *
- * You can also use multiple inheritance with the @a SG_BASES2
- * and @a SG_BASES3 macros:
- *
- *@code
- *   struct B1 {};
- *   struct B2 {};
- *   struct B3 {};
- *   struct D : public B1, public B2, public B3 {};
- *   SG_BASES3 (D, B1, B2, B3);
- @endcode
- *
- * Supporting more than three base classes requires (straightforward)
- * changes to the code here.
- *
- * If any of the derivations are virtual, the corresponding
- * base class should be within a @a SG_VIRTUAL macro:
- *    
- *@code
- *   struct B1 {};
- *   struct B2 {};
- *   struct D : public B1, virtual public B2 {};
- *   SG_BASES2 (D, B1, SG_VIRTUAL (B2));
- @endcode
- *
- * Note that these macros will only work with non-templated types,
- * or with specific instantiations of templated types.  If you want
- * a templated @a SG_BASE, you'll need to declare the specialization
- * yourself.  You should specialize @a SG::Bases<T>, defining types
- * @a Base1, @a Base2, and @a Base3 (which should be @a SG::NoBase
- * if not used).  Example:
- *
- *@code
- *   template <class T> struct B {};
- *   template <class T> struct D : public B<T> {};
- *   namespace SG {
- *     template <class T>
- *     struct Bases<D<T> > {
- *       typedef B<T> Base1;
- *       typedef NoBase Base2;
- *       typedef NoBase Base3;
- *     };
- *   }
- @endcode
- *
- * Once these declarations are in place, what can you do with it?
- * The interface is provided by the @a SG::BaseInfo<T> class.
- * (This is a wrapper around a singleton, so it's not expensive
- * to create instances of this class.)  You can specify the base
- * classes either by the Gaudi class ID or by the C++ @c std::type_info.
- * Of course, you'll only be able to get information by class ID
- * if the classes actually have IDs defined.
- *
- * Here are the available methods of @a SG::BaseInfo<T>:
- *
- *@code
- *   static bool is_base (CLID clid)
- *   static bool is_base (const std::type_info& tinfo)
- @endcode
- *     Test to see if the type given by @a clid or @a tinfo
- *     is a base of @a T.  Note that @a T counts as its own base.
- *
- *@code
- *   static bool is_virtual (CLID clid)
- *   static bool is_virtual (const std::type_info& tinfo)
- @endcode
- *     Test to see if the type given by @a clid or @a tinfo
- *     is a virtual base of @a T.  This should always be @a false
- *     for @a T itself.
- *
- *@code
- *   static void* cast (T* p, CLID clid)
- *   static void* cast (T* p, const std::type_info& tinfo)
- @endcode
- *     Cast a pointer from @a T* to a pointer to the type given
- *     by @a clid or @a tinfo, which must be a base if @a T
- *     known to @a BaseInfo.  The result is returned as a @a void*.
- *     If the conversion cannot be done (because the target is not
- *     known to be a base of @a T), then 0 is returned.
- *
- *@code
- *   static T* castTo (void* p, CLID clid)
- *   static T* castTo (void* p, const std::type_info& tinfo)
- @endcode
- *     Similar, except converts from a pointer to the type given by
- *     @a clid or @a tinfo (which must be a base of @a T) to @a T*.
- *     This involves a @a dynamic_cast.  Returns 0 if the cast fails.
- *
- *@code
- *   static std::vector<CLID> get_bases ()
- @endcode
- *     Return all the known bases of @a T (that have class IDs).
- *     @a T itself will be included in this list.
- *
- *@code
- *   static std::vector<const std::type_info*> get_ti_bases ()
- @endcode
- *     Return all the known bases of @a T.
- *     @a T itself will be included in this list.
- *
- * It is also possible to get a non-templated version of @c SG::BaseInfo<T>.
- * This is called @c SG::BaseInfoBase.  These objects can be found using
- * @c SG::BaseInfoBase::find, by either class ID or @c std::type_info
- * (in order for this to work, the corresponding @c SG::BaseInfo<T> class
- * must have been used somewhere in the program).  The interface
- * of @c SG::BaseInfoBase is the same as @c SG::BaseInfo<T>, except
- * that @c void* replaces @c T* in the @c cast methods.
- *
- * Initialization issues: We don't want to build the @c SG::BaseInfo<T>
- * objects at static initialization time.  But we do need to remember
- * which ones are available.  Thus, @c BaseInfoBase maintains a list
- * of CLIDs and @c std::type_info's for which we may not have done
- * initialization, along with a function to call to do the initialization.
- * The initialization list is filled during static initialization.
- * When we look for an instance, if we don't find one, we look in the
- * initialization list; if there's a match there, we run the initialization
- * and remove it from the list.
- *
- * Copy conversions: The conversion machinery above provides access to the
- * standard C++ base<>derived conversions.  However, sometimes you'd like
- * to allow additional conversions as well, for example between a
- * vector<ElementLink<T> > and DataVector<T>.  For those cases,
- * you can register a conversion function with the _source_ type
- * that can initialize an instance of the _destination_ type
- * from the _source_ type.  Then, when you try to retrieve the object
- * from StoreGate with the _destination_ type, your conversion function
- * will be called.
- *
- * Your conversion function should be the method @a convert of
- * a class deriving from the @a SG::CopyConversion template;
- * for example,
- *
- *@code
- *   class MyCopyConversion
- *     : public SG::CopyConversion<std::vector<ElementLink<MyType> >,
- *                                 DataVector<MyType> >
- *   {
- *   public:
- *     virtual void convert (const std::vector<ElementLink<MyType> >& src,
- *                           DataVector<MyType>& dst) const
- *     {
- *       size_t sz = src.size();
- *       if (dst.size() != sz) {
- *         dst.clear (SG::VIEW_ELEMENTS);
- *         dst.reserve (sz);
- *         for (size_t i = 0; i < sz; i++) {
- *           const MyType* p = *(src[i]).cptr(); 
- *           dst.push_back (const_cast<MyType*> (p));
- *         }
- *       }
- *     }
- *   };
- @endcode
- *
- * You then declare this using the macro
- *
- @code
- *  SG_ADD_COPY_CONVERSION (std::vector<ElementLink<MyType> >,
- *                          MyCopyConversion);
- @endcode
- *
- * Copy conversions are enabled only for objects that have been marked as const.
  */
 
 #ifndef SGTOOLS_BASEINFO_H
 #define SGTOOLS_BASEINFO_H
 
-#include "GaudiKernel/ClassID.h"
-#include <vector>
-#include <typeinfo>
 
-
-//===========================================================================
-// Macros used to declare base class information.
-//
-
-/**
- * @brief Used to mark virtual derivation.
- *        When using the @a SG_BASE macros below, use this in the case
- *        of virtual derivation.  Example:
- *
- *@code
- *   struct B1 {};
- *   struct B2 {};
- *   struct D : public B1, virtual public B2 {};
- *   SG_BASES2 (D, B1, SG_VIRTUAL (B2));
- @endcode
- */
-#define SG_VIRTUAL(T) Virtual<T>
-
-
-/**
- * @brief Declare that class @a D derives from class @a B.  Example:
- *
- *@code
- *   struct B {};
- *   struct D : public B {};
- *   SG_BASE (D, B);
- @endcode
- */
-#define SG_BASE(D, B) SG_BASES1(D, B)
-
-
-/**
- * @brief Declare that class @a D derives from class @a B.
- *        This is the same as @a SG_BASE.  Example:
- *
- *@code
- *   struct B {};
- *   struct D : public B {};
- *   SG_BASES1 (D, B);
- @endcode
- */
-#define SG_BASES1(D, B)          \
-  namespace SG        {          \
-    template<> struct Bases<D >{ \
-      typedef B Base1;           \
-      typedef NoBase Base2;      \
-      typedef NoBase Base3;      \
-    };                           \
-    template struct RegisterBaseInit<D >; \
-    template struct BaseInit<D >; \
-} struct sg_dummy // to swallow semicolon
-
-
-/**
- * @brief Declare that class @a D derives from classes @a B1 and @a B2.
- *        Example:
- *
- *@code
- *   struct B1 {};
- *   struct B2 {};
- *   struct D : public B1, public B2 {};
- *   SG_BASES2 (D, B1, B2);
- @endcode
- */
-#define SG_BASES2(D, B1, B2)     \
-  namespace SG        {          \
-    template<> struct Bases<D >{ \
-      typedef B1 Base1;          \
-      typedef B2 Base2;          \
-      typedef NoBase Base3;      \
-    };                           \
-    template struct RegisterBaseInit<D >; \
-    template struct BaseInit<D >; \
-} struct sg_dummy // to swallow semicolon
-
-
-/**
- * @brief Declare that class @a D derives from classes @a B1, @a B2, and @a B3.
- *        Example:
- *
- *@code
- *   struct B1 {};
- *   struct B2 {};
- *   struct B3 {};
- *   struct D : public B1, public B2, public B3 {};
- *   SG_BASES3 (D, B1, B2, B3);
- @endcode
- */
-#define SG_BASES3(D, B1, B2, B3) \
-  namespace SG        {          \
-    template<> struct Bases<D >{ \
-      typedef B1 Base1;          \
-      typedef B2 Base2;          \
-      typedef B3 Base3;          \
-    };                           \
-    template struct RegisterBaseInit<D >; \
-    template struct BaseInit<D >; \
-} struct sg_dummy // to swallow semicolon
-
-
-
-/**
- * @brief Add a new base class @c B to class @c D.
- *
- * Sometimes, the SG_BASE macro for a class isn't present in its header.
- *
- * One can try to put the appropriate SG_BASE macro somewhere else,
- * but this doesn't always work: if the @c BaseInfoBase for @c D has
- * already been created by the time the @c SG_BASE initialization
- * runs, then that @c SG_BASE macro won't do anything.
- *
- * @c SG_ADD_BASE, however, will add a new base to an existing @c BaseInfoBase.
- *
- *@code
- *   struct B {};
- *   struct D : public B {};
- *   SG_ADD_BASES (D, B);
- @endcode
- */
-#define SG_ADD_BASE(D, B) \
-  namespace SG        {          \
-    template struct AddBaseInit<D, B >;            \
-} struct sg_dummy // to swallow semicolon
-
-
-/**
- * @brief Declare a copy conversion from class @c T using converter @c C.
- *
- * See the comments in the header for a detailed description.
- */
-#define SG_ADD_COPY_CONVERSION(D, C) \
-  namespace SG        {          \
-    template struct AddCopyConversionInit<D, C >;            \
-} struct sg_dummy // to swallow semicolon
-
-
-
-namespace SG {
-
-
-/**
- * @brief Helper metafunction to get base class types.
- *
- * For a class @c T,
- *@code
- *   SG::BaseType<SG::Bases<T>::Base1>::type
- @endcode
- * gives the type of @c T's first base.  Also,
- *@code
- *   SG::BaseType<SG::Bases<T>::Base1>::is_virtual
- @endcode
- * tells whether the derivation is virtual
- * (either @c true_type or @c false_type).
- *
- * Note that @c SG::Bases\<T>::Base1 is not the actual type
- * of @c T's first base if virtual derivation was used.
- */
-template <class T>
-struct BaseType;
-
-
-// Forward declaration.
-template <class T>
-class BaseInfoImpl;
-
-
-struct BaseInfoBaseImpl;
-
-
-//===========================================================================
-// Copy conversion declarations.
-//
-
-
-/**
- * @brief Base class for copy conversions.
- */
-class CopyConversionBase
-{
-public:
-  /// Destructor.
-  virtual ~CopyConversionBase() {}
-
-  /// Create an instance of the destination class.
-  virtual void* create() const = 0;
-
-  /// Destroy an instance of the destination class.
-  virtual void destroy (void* p) const = 0;
-
-  /// Convert the contents of an instance of the source class SRC
-  /// to an instance of the destination class DST.
-  virtual void convertUntyped (const void* src, void* dst) const = 0;
-};
-
-
-/**
- * @brief Base class for copy conversions, templated on source
- *        and destination classes.
- */
-template <class SRC, class DST>
-class CopyConversion
-  : public CopyConversionBase
-{
-public:
-  /// The destination class.
-  typedef DST target_type;
-
-  /// Create an instance of the destination class.
-  virtual void* create() const { return new DST; }
-
-  /// Destroy an instance of the destination class.
-  virtual void destroy (void* p) const { delete reinterpret_cast<DST*>(p); }
-
-  /// Convert the contents of an instance of the source class SRC
-  /// to an instance of the destination class DST.
-  virtual void convertUntyped (const void* src, void* dst) const
-  {
-    convert (*reinterpret_cast<const SRC*>(src),
-             *reinterpret_cast<DST*>(dst));
-  }
-
-  /// Convert the contents of an instance of the source class SRC
-  /// to an instance of the destination class DST.
-  /// (Type-safe version.)
-  virtual void convert (const SRC& src, DST& dst) const = 0;
-};
-
-
-//===========================================================================
-// Base class declaration.
-// This factors out the part of the implementation that doesn't
-// depend on the template parameter @a T.
-//
-
-
-/**
- * @brief The non-template portion of the @a BaseInfo implementation.
- */
-class BaseInfoBase
-{
-public:
-  /**
-   * @brief Return the CLID for this class.
-   */
-  CLID clid() const;
-
-
-  /**
-   * @brief Return the @c std::type_info for this class.
-   */
-  const std::type_info& typeinfo() const;
-  
-
-  /**
-   * @brief Cast to a base pointer.
-   * @param p The pointer to cast (a @a T* cast to a @a void*).
-   * @param clid ID of the class to which to cast.
-   * @return The pointer cast to the requested type, returned
-   *         as a @a void*.  @a clid must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   */
-  void* cast (void* p, CLID clid) const;
-
-  /**
-   * @brief Cast to a base pointer.
-   * @param p The pointer to cast (a @a T* cast to a @a void*).
-   * @param clid @a type_info of the class to which to cast.
-   * @return The pointer cast to the requested type, returned
-   *         as a @a void*.  @a tinfo must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   */
-  void* cast (void* p, const std::type_info& tinfo) const;
-
-
-  /**
-   * @brief Cast to a derived pointer.
-   * @param p The pointer to cast (a @a B* cast to a @a void*).
-   * @param clid ID of the class @a B from which to cast.
-   * @return The pointer cast to the requested type, returned
-   *         as a @a void*.  @a clid must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   *         0 will also be returned if the @a dynamic_cast fails.
-   */
-  void* castTo (void* p, CLID clid) const;
-
-  /**
-   * @brief Cast to a derived pointer.
-   * @param p The pointer to cast (a @a B* cast to a @a void*).
-   * @param clid @a type_info of the class @a B from which to cast.
-   * @return The pointer cast to the requested type, returned
-   *         as a @a void*.  @a tinfo must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   *         0 will also be returned if the @a dynamic_cast fails.
-   */
-  void* castTo (void* p, const std::type_info& tinfo) const;
-
-
-  /// Type of a pointer conversion function.
-  typedef void* castfn_t (void* p);
-
-
-  // gcc 4.3 complains about the code genreflex generates for these.
-  // They're not useful from python anyway, so just suppress them.
-#ifndef __REFLEX__
-  /**
-   * @brief Return a function for casting to a base pointer.
-   * @param clid ID of the class to which to cast.
-   * @return A function to convert a pointer to a @c T to a pointer
-   *         to the type identified by @a clid.
-   *         @a clid must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   */
-  castfn_t* castfn (CLID clid) const;
-
-
-  /**
-   * @brief Return a function for casting to a base pointer.
-   * @param clid @a type_info of the class to which to cast.
-   * @return A function to convert a pointer to a @c T to a pointer
-   *         to the type identified by @a tinfo.
-   *         @a tinfo must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   */
-  castfn_t* castfn (const std::type_info& tinfo) const;
-
-  /**
-   * @brief Return a function for casting to a derived pointer.
-   * @param clid ID of the class @a B from which to cast.
-   * @return A function to convert a pointer to a @a B to a pointer
-   *         to a @a T.  @a B must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   *         0 will also be returned if the @a dynamic_cast fails.
-   */
-  castfn_t* castfnTo (CLID clid) const;
-
-
-  /**
-   * @brief Return a function for casting to a derived pointer.
-   * @param clid @a type_info of the class @a B from which to cast.
-   * @return A function to convert a pointer to a @a B to a pointer
-   *         to a @a T.  @a B must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   *         0 will also be returned if the @a dynamic_cast fails.
-   */
-  castfn_t* castfnTo (const std::type_info& tinfo) const;
-#endif
-
-
-  /**
-   * @brief Return the class IDs of all known bases of @a T (that
-   *        have class IDs).  The list will include @a T itself.
-   */
-  std::vector<CLID> get_bases () const;
-
-  /**
-   * @brief Return the @c type_info's of all known bases of @a T.
-   *        The list will include @a T itself.
-   */
-  std::vector<const std::type_info*> get_ti_bases () const;
-
-  /**
-   * @brief Return true if @a clid is the ID of a class that
-   *        is known to be a base of @a T.  @a T is considered
-   *        to be its own base for this purpose.
-   * @param clid The ID of the class to test.
-   */
-  bool is_base (CLID clid) const;
-
-  /**
-   * @brief Return true if @a tinfo is the @a type_info of a class that
-   *        is known to be a base of @a T.  @a T is considered
-   *        to be its own base for this purpose.
-   * @param clid The ID of the class to test.
-   */
-  bool is_base (const std::type_info& tinfo) const;
-
-
-  /**
-   * @brief Return true if @a clid is the ID of a class that
-   *        is known to be a virtual base of @a T.  (This will always
-   *        be false for @a T itself.)
-   * @param clid The ID of the class to test.
-   */
-  bool is_virtual (CLID clid) const;
-
-  /**
-   * @brief Return true if @a tinfo is the @a std::type_info of a class that
-   *        is known to be a virtual base of @a T.  (This will always
-   *        be false for @a T itself.)
-   * @param tinfo The @a std::type_info of the class to test.
-   */
-  bool is_virtual (const std::type_info& tinfo) const;
-
-
-  /**
-   * @brief Search for a copy conversion to @c tinfo.
-   * @param tinfo The class to which we want to convert.
-   *
-   * Returns the conversion instance or 0.
-   */
-  const CopyConversionBase* copy_conversion (const std::type_info& tinfo) const;
-
-
-  /**
-   * @brief Search for a copy conversion to @c clid.
-   * @param clid The class to which we want to convert.
-   *
-   * Returns the conversion instance or 0.
-   */
-  const CopyConversionBase* copy_conversion (CLID clid) const;
-
-
-  /**
-   * @brief Add a new copy conversion.
-   * @param tinfo The @c std::type_info of the target class.
-   * @param cnv A @c CopyConversionBase instance describing the conversion.
-   *
-   * The @c BaseInfoBase takes ownership of the @c cnv object.
-   */
-  void add_copy_conversion (const std::type_info& tinfo,
-                            const CopyConversionBase* cnv);
-
-
-  /**
-   * @brief Return known copy conversions.
-   *
-   * Returns the CLIDs of all target classes that have been registered
-   * with this one for copy conversion.
-   */
-  std::vector<CLID> get_copy_conversions() const;
-
-
-#ifndef __REFLEX__
-  /**
-   * @brief Add information about one base class.
-   * @param tinfo The @a std::type_info of the base.
-   * @param converter Converter function.  This should be able to
-   *                  convert a @a T* to a pointer to this base.
-   * @param converterTo Converter function.  This should be able to
-   *                    convert a pointer to this base to a @a T*.
-   * @param is_virtual True if the derivation from this base to @a T
-   *                   is via virtual derivation.
-   */
-  void add_info (const std::type_info& tinfo,
-                 castfn_t* converter,
-                 castfn_t* converterTo,
-                 bool is_virtual);
-#endif
-
-
-  /**
-   * @brief Find the @c BaseInfoBase instance for @c clid.
-   * @param clid The class ID of the class for which we want information.
-   *
-   * Returns 0 if no @c BaseInfoBase instance is available.
-   */
-  static const BaseInfoBase* find (CLID clid);
-
-
-  /**
-   * @brief Find the @c BaseInfoBase instance for @c tinfo.
-   * @param tinfo The @c std::type_info of the class
-   *              for which we want information.
-   *
-   * Returns 0 if no @c BaseInfoBase instance is available.
-   */
-  static const BaseInfoBase* find (const std::type_info& tinfo);
-
-
-  /// Type for an initialization function.
-  typedef const BaseInfoBase& init_func_t();
-
-
-#ifndef __REFLEX__
-  /**
-   * @brief Register an initialization function.
-   * @param tinfo The @c std::type_info for the class being registered.
-   * @param init_func Function to initialize @c BaseInfo for the class.
-   */
-  static void addInit (const std::type_info* tinfo,
-                       init_func_t* init_func);
-#endif
-
-
-  /**
-   * @brief Run initializations for this class, if needed.
-   */
-  void maybeInit();
-
-
-protected:
-  /**
-   * @brief Constructor.
-   * @param tinfo The @c std::type_info for this class.
-   */
-  BaseInfoBase (const std::type_info& tinfo);
-
-
-  /**
-   * @brief Destructor.
-   */
-  ~BaseInfoBase();
-
-
-private:
-  /**
-   * @brief Helper for @c find.
-   * @param tinfo The @c std::type_info of the class
-   *              for which we want information.
-   *
-   * Returns 0 if no @c BaseInfoBase instance is available.
-   */
-  static const BaseInfoBase* find1 (const std::type_info& tinfo);
-
-
-  /// Pointer to internal state.
-  BaseInfoBaseImpl* m_impl;
-
-  BaseInfoBase (const BaseInfoBase&);
-  BaseInfoBase& operator= (const BaseInfoBase&);
-};
-
-
-//===========================================================================
-// The templated @c BaseInfo class.
-//
-
-/**
- * @brief Provide an interface for finding inheritance information
- *        at run time.  See the file comments for full details.
- */
-template <class T>
-class BaseInfo
-{
-public:
-  /**
-   * @brief Cast to a base pointer.
-   * @param p The pointer to cast.
-   * @param clid ID of the class to which to cast.
-   * @return The pointer cast to the requested type, returned
-   *         as a @a void*.  @a clid must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   */
-  static void* cast (T* p, CLID clid);
-
-  /**
-   * @brief Cast to a base pointer.
-   * @param p The pointer to cast.
-   * @param clid @a type_info of the class to which to cast.
-   * @return The pointer cast to the requested type, returned
-   *         as a @a void*.  @a tinfo must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   */
-  static void* cast (T* p, const std::type_info& tinfo);
-
-
-  /**
-   * @brief Cast to a derived pointer.
-   * @param p The pointer to cast.
-   * @param clid ID of the class @a B from which to cast.
-   * @return The pointer cast to a @a T*.
-   *         @a B must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   *         0 will also be returned if the @a dynamic_cast fails.
-   */
-  static T* castTo (void* p, CLID clid);
-
-  /**
-   * @brief Cast to a derived pointer.
-   * @param p The pointer to cast.
-   * @param clid @a type_info of the class @a B from which to cast.
-   * @return The pointer cast to a @a T*.
-   *         @a B must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   *         0 will also be returned if the @a dynamic_cast fails.
-   */
-  static T* castTo (void* p, const std::type_info& tinfo);
-
-
-  /**
-   * @brief Return a function for casting to a base pointer.
-   * @param clid ID of the class to which to cast.
-   * @return A function to convert a pointer to a @c T to a pointer
-   *         to the type identified by @a clid.
-   *         @a clid must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   */
-  static BaseInfoBase::castfn_t* castfn (CLID clid);
-
-
-  /**
-   * @brief Return a function for casting to a base pointer.
-   * @param clid @a type_info of the class to which to cast.
-   * @return A function to convert a pointer to a @c T to a pointer
-   *         to the type identified by @a tinfo.
-   *         @a tinfo must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   */
-  static BaseInfoBase::castfn_t* castfn (const std::type_info& tinfo);
-
-
-  /**
-   * @brief Return a function for casting to a derived pointer.
-   * @param clid ID of the class @a B from which to cast.
-   * @return A function to convert a pointer to a @c T to a pointer
-   *         to a @a T.  @a clid must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   *         0 will also be returned if the @a dynamic_cast fails.
-   */
-  static BaseInfoBase::castfn_t* castfnTo (CLID clid);
-
-
-  /**
-   * @brief Return a function for casting to a derived pointer.
-   * @param clid @a type_info of the class @a B from which to cast.
-   * @return A function to convert a pointer to a @c B to a pointer
-   *         to a @a T.  @a tinfo must be known to be a base
-   *         of @a T; otherwise, 0 will be returned.
-   *         0 will also be returned if the @a dynamic_cast fails.
-   */
-  static BaseInfoBase::castfn_t* castfnTo (const std::type_info& tinfo);
-
-
-  /**
-   * @brief Return the class IDs of all known bases of @a T (that
-   *        have class IDs).  The list will include @a T itself.
-   */
-  static std::vector<CLID> get_bases ();
-
-
-  /**
-   * @brief Return the @c type_info's of all known bases of @a T.
-   *        The list will include @a T itself.
-   */
-  static std::vector<const std::type_info*> get_ti_bases ();
-
-
-  /**
-   * @brief Return true if @a clid is the ID of a class that
-   *        is known to be a base of @a T.  @a T is considered
-   *        to be its own base for this purpose.
-   * @param clid The ID of the class to test.
-   */
-  static bool is_base (CLID clid);
-
-  /**
-   * @brief Return true if @a tinfo is the @a std::type_info of a class that
-   *        is known to be a base of @a T.  @a T is considered
-   *        to be its own base for this purpose.
-   * @param tinfo The @a std::type_info of the class to test.
-   */
-  static bool is_base (const std::type_info& tinfo);
-
-
-  /**
-   * @brief Return true if @a clid is the ID of a class that
-   *        is known to be a virtual base of @a T.  (This will always
-   *        be false for @a T itself.)
-   * @param clid The ID of the class to test.
-   */
-  static bool is_virtual (CLID clid);
-
-  /**
-   * @brief Return true if @a tinfo is the @a std::type_info of a class that
-   *        is known to be a virtual base of @a T.  (This will always
-   *        be false for @a T itself.)
-   * @param tinfo The @a std::type_info of the class to test.
-   */
-  static bool is_virtual (const std::type_info& tinfo);
-
-
-  /**
-   * @brief Return the non-templated @c BaseInfoBase object for this type.
-   */
-  static const BaseInfoBase& baseinfo ();
-
-
-  static void maybeInit ();
-
-
-private:
-  /// Return a reference to the (singleton) implementation object
-  /// for this class.
-  static const BaseInfoImpl<T>& instance();
-
-  /// This holds the singleton implementation object instance.
-  struct instance_holder
-  {
-    instance_holder();
-    BaseInfoImpl<T>* instance;
-  };
-  static instance_holder s_instance;
-};
-
-
-} // namespace SG
-
-
-#include "SGTools/BaseInfo.icc"
+#include "AthenaKernel/BaseInfo.h"
 
 
 #endif // not SGTOOLS_BASEINFO_H
diff --git a/Control/SGTools/SGTools/BuiltinsClids.h b/Control/SGTools/SGTools/BuiltinsClids.h
index 73ac98b1ee3368f9da15c1c64a843aa3619760fb..91688256c30430f27179aff0d800c173bab6214b 100644
--- a/Control/SGTools/SGTools/BuiltinsClids.h
+++ b/Control/SGTools/SGTools/BuiltinsClids.h
@@ -11,14 +11,9 @@
 #ifndef SGTOOLS_BUILTINSCLIDS_H 
 #define SGTOOLS_BUILTINSCLIDS_H 
 
-// STL includes
+#include "AthenaKernel/CLASS_DEF.h"
 #include <string>
 
-// Gaudi includes
-
-// SGTools includes
-#include "SGTools/CLASS_DEF.h"
-
 CLASS_DEF( char ,          81926032 , 1 )
 CLASS_DEF( bool ,         134610868 , 1 )
 CLASS_DEF( int ,          244260744 , 1 )
diff --git a/Control/SGTools/SGTools/CLASS_DEF.h b/Control/SGTools/SGTools/CLASS_DEF.h
index da8fa1dadf6cd371874eb071166876c5702df344..c17ffe8383dd558b0ffa58f8fa420a160faab6bc 100755
--- a/Control/SGTools/SGTools/CLASS_DEF.h
+++ b/Control/SGTools/SGTools/CLASS_DEF.h
@@ -11,125 +11,8 @@
  *  $Id: CLASS_DEF.h,v 1.3 2009-01-15 19:07:29 binet Exp $
  */
 
-#include "SGTools/ClassID_traits.h"
-#include "CxxUtils/unused.h"
-#include <boost/preprocessor/stringize.hpp>
 
-#ifdef __CLING__
-# define CLIDREGISTRY_ADDENTRY(CID, NAME)                               \
-  namespace detail {							\
-    const bool UNUSED(clidEntry_ ## CID) =                              \
-      CLIDRegistry::addEntry(CID, typeid(NAME),                         \
-                                  ClassID_traits< NAME >::typeNameString(), \
-				  ClassID_traits< NAME >::packageInfo(), \
-				  ClassName< NAME >::name());		\
-  } 
-# define CLIDREGISTRY_ADDENTRY2(CID, ARG1, ARG2)                        \
-  namespace detail {							\
-    const bool UNUSED(clidEntry_ ## CID) =                              \
-      CLIDRegistry::addEntry                                            \
-      (CID, typeid(ARG1,ARG2),                                          \
-       ClassID_traits< ARG1,ARG2 >::typeNameString(),                   \
-       ClassID_traits< ARG1,ARG2 >::packageInfo(),			\
-       ClassName< ARG1,ARG2 >::name());					\
-  } 
-#else
-# define CLIDREGISTRY_ADDENTRY(CID, NAME)                               \
-  namespace detail {							\
-    const bool UNUSED(clidEntry_ ## CID) =                              \
-      CLIDRegistry::addEntry<CID>(typeid(NAME),                         \
-                                  ClassID_traits< NAME >::typeNameString(), \
-				  ClassID_traits< NAME >::packageInfo(), \
-				  ClassName< NAME >::name());		\
-  } 
-# define CLIDREGISTRY_ADDENTRY2(CID, ARG1, ARG2)                        \
-  namespace detail {							\
-    const bool UNUSED(clidEntry_ ## CID) =                              \
-      CLIDRegistry::addEntry<CID>                                       \
-      (typeid(ARG1,ARG2),                                               \
-       ClassID_traits< ARG1,ARG2 >::typeNameString(),                   \
-       ClassID_traits< ARG1,ARG2 >::packageInfo(),			\
-       ClassName< ARG1,ARG2 >::name());					\
-  } 
-#endif
+#include "AthenaKernel/CLASS_DEF.h"
 
-/** @def CLASS_DEF(NAME, CID , VERSION) 
- *  @brief associate a clid and a version to a type
- *  eg 
- *  @code 
- *  CLASS_DEF(std::vector<Track*>,8901, 1)
- *  @endcode 
- *  @param NAME 	type name
- *  @param CID 		clid
- *  @param VERSION 	not yet used
- */
-#define CLASS_DEF(NAME, CID , VERSION)                                  \
-  template <>                                                           \
-  struct ClassID_traits< NAME > {                                       \
-    typedef std::is_base_of<DataObject, NAME> isDObj_t;                 \
-    static const bool s_isDataObject = isDObj_t::value;                 \
-    typedef std::integral_constant<bool, s_isDataObject> is_DataObject_tag; \
-    typedef std::true_type has_classID_tag;                             \
-    static const CLID& ID() { static CLID c(CID); return  c; }		\
-    static const char* typeNameString() {                               \
-      return #NAME;                                                     \
-    }									\
-    static const std::string& typeName() {                              \
-      static const std::string name = typeNameString();                 \
-      return name;		 					\
-    }									\
-    static  Athena::PackageInfo packageInfo() {				\
-      static Athena::PackageInfo pi( BOOST_PP_STRINGIZE(PACKAGE_VERSION_UQ)  ); \
-      return pi;							\
-    }									\
-    static const std::type_info& typeInfo() {				\
-      return typeid (NAME);						\
-    }									\
-    typedef std::true_type has_version_tag;                             \
-    static const int s_version = VERSION;                               \
-    static const bool s_isConst = false;                                \
-  };									\
-  CLIDREGISTRY_ADDENTRY(CID, NAME)
-
-
-/** @def CLASS_DEF2(ARG1, ARG2, CID , VERSION) 
- *  @brief hack to use instead of CLASS_DEF when type name contains a comma ','
- *  eg
- *  @code 
- *    CLASS_DEF2(map<int,string>,8900, 1)
- *  @endcode 
- *  @param ARG1         type name (1st part)
- *  @param ARG2 	type name (2nd part)
- *  @param CID 		clid
- *  @param VERSION 	not yet used
- */
-#define CLASS_DEF2(ARG1, ARG2, CID , VERSION)	\
-  template <>					\
-  struct ClassID_traits< ARG1,ARG2 > {					\
-    typedef std::is_base_of<DataObject, ARG1, ARG2 > isDObj_t;          \
-    static const bool s_isDataObject = isDObj_t::value;                 \
-    typedef std::integral_constant<bool, s_isDataObject> is_DataObject_tag; \
-    typedef std::true_type has_classID_tag;                             \
-    static const CLID& ID() {						\
-      static CLID c(CID); return  c;					\
-    }									\
-    static const char* typeNameString() {				\
-      return #ARG1 "," #ARG2;                                           \
-    }									\
-    static const std::string& typeName() {				\
-      static const std::string name = typeNameString();                 \
-      return name;							\
-    }									\
-    static const std::type_info& typeInfo() {				\
-      return typeid (ARG1,ARG2);					\
-    }									\
-    static  Athena::PackageInfo packageInfo() {				\
-      return Athena::PackageInfo("Package-00-00-00");			\
-    }									\
-    typedef std::true_type has_version_tag;                             \
-    static const int s_version = VERSION;                               \
-    static const bool s_isConst = false;                                \
-  };									\
-  CLIDREGISTRY_ADDENTRY2(CID, ARG1, ARG2)
 
 #endif // not SGTOOLS_CLASS_DEF_H
diff --git a/Control/SGTools/SGTools/CLIDRegistry.h b/Control/SGTools/SGTools/CLIDRegistry.h
index b88d065e472362a810369b694059a5afcdc74618..5cf0f4c7ced7eaf018066966368cfd9d779b6b97 100755
--- a/Control/SGTools/SGTools/CLIDRegistry.h
+++ b/Control/SGTools/SGTools/CLIDRegistry.h
@@ -12,116 +12,9 @@
  *$Id: CLIDRegistry.h,v 1.2 2009-01-15 19:07:29 binet Exp $
  */
 
-#include <vector>
-#include <string>
-#include <utility> /* pair */
-#include <boost/tuple/tuple.hpp>
-#include <boost/static_assert.hpp>
 
-/* #define CLIDREG_DEBUG 1 */
-#ifdef CLIDREG_DEBUG
- #include <iostream> 
-#endif
+// Moved to AthenaKernel
+#include "AthenaKernel/CLIDRegistry.h"
 
-#include "AthenaKernel/tools/AthenaPackageInfo.h"
-#ifndef BOOST_HAS_STATIC_ASSERT
-# include "CxxUtils/unused.h"
-#endif
-
-namespace CLIDdetail {
-  /// @name allowed class id range
-  //@{	
-  const unsigned long MINCLID = 256;
-  const unsigned long MAXCLID = 2147483647; ///< 2**31 - 1
-  //@}	
-}
-
-/** @class CLIDRegistry
- * @brief  a static registry of CLID->typeName entries. NOT for general use.
- * Use ClassIDSvc instead.
- */
-class CLIDRegistry {
-private:
-  typedef boost::tuple <unsigned long, 
-			std::string, 
-			Athena::PackageInfo,
-			std::string> tuple_t;
-  typedef std::vector< tuple_t > CLIDRegistryImpl;
-public:
-  typedef CLIDRegistryImpl::const_iterator const_iterator;
-
-  ///to be called by the CLASS_DEFS
-  template <unsigned long CLID>
-  static bool addEntry(const std::type_info& ti,
-                       const char* typeName, 
-		       const Athena::PackageInfo& pkgInfo,
-		       const std::string& typeInfoName); 
-  //    static bool addEntry(unsigned long id, const std::string& typeName);
-
-  /// allowed class id range (backward compatibility)
-  //@{	
-  static const unsigned long MINCLID;
-  static const unsigned long MAXCLID;
-  //@}	
- 
-  /// registry accessors (used by ClassIDSvc)
-  //@{
-  static const_iterator begin();
-  static const_iterator end(); 
-  /// are there new entries since last call? Does not move the entries ptr
-  static bool hasNewEntries();
-  /// returns an iterator range over the entries added since last time
-  /// newEntries was called
-  static std::pair<const_iterator, const_iterator> newEntries();
-  //@}
-
-  /// Translate between CLID and type_info.
-  static const std::type_info* CLIDToTypeinfo (unsigned long clid);
-  static unsigned long typeinfoToCLID (const std::type_info& ti);
-
-
-  /// Out-of-line part of addEntry().
-  static bool addEntry (unsigned long clid,
-                        const std::type_info& ti,
-                        const char* typeName, 
-                        const Athena::PackageInfo& pkgInfo,
-                        const std::string& typeInfoName);
-
-private:
-  /// Add a CLID <> type_info mapping.
-  static void addCLIDMapping (unsigned long clid, const std::type_info& ti);
-
-  static CLIDRegistryImpl& registry();
-};
-
-
-//the drudgery below is to issue a compilation error when CLID is
-//out of range
-template <bool x> struct ERROR_CLID_out_of_CLIDRegistry_range;
-template <>       struct ERROR_CLID_out_of_CLIDRegistry_range<true>{};
-
-#ifndef __GCCXML__
-
-//<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
-template <unsigned long CLID>
-bool CLIDRegistry::addEntry(const std::type_info& ti,
-                            const char* typeName, 
-			    const Athena::PackageInfo& pkgInfo,
-			    const std::string& typeInfoName) {
-  //more drudgery
-#ifdef BOOST_HAS_STATIC_ASSERT
-  static_assert (CLIDdetail::MINCLID <= CLID && CLID <= CLIDdetail::MAXCLID,
-                 "CLID out of CLIDRegistry range");
-#else
-  UNUSED(typedef ::boost::static_assert_test<
-    sizeof(ERROR_CLID_out_of_CLIDRegistry_range< (bool)(CLIDdetail::MINCLID <= CLID && CLID <= CLIDdetail::MAXCLID) >)
-         > BOOST_JOIN(boost_static_assert_typedef_, __LINE__));
-#endif
-
-  addEntry (CLID, ti, typeName, pkgInfo, typeInfoName);
-  return true;
-}
-
-#endif
 
 #endif // SGTOOLS_CLIDREGISTRY_H
diff --git a/Control/SGTools/SGTools/ClassID_traits.h b/Control/SGTools/SGTools/ClassID_traits.h
index 81a90cb38d1950b616fd2a2f3ff5382a6cf14537..574d472db437aa43adc777ec239e4f154093294c 100755
--- a/Control/SGTools/SGTools/ClassID_traits.h
+++ b/Control/SGTools/SGTools/ClassID_traits.h
@@ -11,89 +11,10 @@
  * @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration
  * $Id: ClassID_traits.h,v 1.3 2009-01-15 19:07:29 binet Exp $
  */
-#include <string>
-#include <typeinfo>
 
-#include <boost/static_assert.hpp>
 
-#include "GaudiKernel/ClassID.h"
-#include "GaudiKernel/DataObject.h"
-#include "GaudiKernel/System.h"
+#include "AthenaKernel/ClassID_traits.h"
 
-#include "SGTools/CLIDRegistry.h"
-#include "SGTools/ClassName.h"
-
-#include "AthenaKernel/tools/AthenaPackageInfo.h"
-#ifndef BOOST_HAS_STATIC_ASSERT
-# include "CxxUtils/unused.h"
-#endif
-#include <type_traits>
-
-
-
-template <bool x> struct ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION;
-template <>       struct ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION<true>{};
-
-///internal use: issues a compilation error when condition B is false
-#ifdef BOOST_HAS_STATIC_ASSERT
-#define MY_STATIC_ASSERT( B ) \
-  static_assert (B, "You should use the CLASS_DEF macro to define CLID and VERSION");
-#else
-#define MY_STATIC_ASSERT( B ) \
-  UNUSED(typedef ::boost::static_assert_test<                           \
-      sizeof(ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION< (bool)( B ) >)>\
-         BOOST_JOIN(boost_static_assert_typedef_, __LINE__))
-#endif
-
-/** @class ClassID_traits
- * @brief  a traits class that associates a CLID to a type T
- * It also detects whether T inherits from Gaudi DataObject
- */
-template <typename T>
-struct ClassID_traits {
-  //default only works for DataObjects
-  typedef std::is_base_of<DataObject, T> isDObj_t; 
-  ///flags whether T inherits from DataObject
-  static const bool s_isDataObject = isDObj_t::value;
-
-  //default traits for class ID assignment
-  typedef std::integral_constant<bool, s_isDataObject> is_DataObject_tag;
-
-  ///the CLID of T
-  static const CLID& ID() { 
-    MY_STATIC_ASSERT(s_isDataObject);
-    return T::classID(); 
-  }
-
-  ///the demangled type name of T
-  static const std::string& typeName() {
-    MY_STATIC_ASSERT(s_isDataObject);
-    static const std::string tname = System::typeinfoName(typeid(T));
-    return tname;
-  }
-
-  ///the type id of T
-  static const std::type_info& typeInfo() {
-    MY_STATIC_ASSERT(s_isDataObject);
-    return typeid(T);
-  }
-
-  ///the package name of this CLASSDEF (and BY CONVENTION of the data obj too!)
-  static  Athena::PackageInfo packageInfo() {
-    MY_STATIC_ASSERT(s_isDataObject);
-    return Athena::PackageInfo("Package-00-00-00");
-  }
-
-  typedef std::false_type has_version_tag;
-  typedef std::false_type has_classID_tag;
-  static const int s_version = 0;
-
-  // Is this is true, these types will automatically be made
-  // const when added to StoreGate.
-  static const bool s_isConst = false;
-};
-
-#undef MY_STATIC_ASSERT
 
 #endif // not SGTOOLS_CLASSID_TRAITS_H
 
diff --git a/Control/SGTools/SGTools/ClassName.h b/Control/SGTools/SGTools/ClassName.h
index 80826d4edd32a4b31f304fa052da219967fb1773..cfe3d2026e6602f8fcdcf04f333b63d262ce40d9 100644
--- a/Control/SGTools/SGTools/ClassName.h
+++ b/Control/SGTools/SGTools/ClassName.h
@@ -17,37 +17,7 @@
 #define SGTOOLS_CLASSNAME_H
 
 
-#include <string>
-
-
-/**
- * @brief An interface for getting the name of a class as a string.
- *
- * This template class provides an interface for getting the name
- * of a class as a string.  By default, it uses @c typeinfoName
- * from @c GaudiKernel, but it may be specialized to override
- * the behavior for specific classes.
- */
-template <class T>
-class ClassName
-{
-public:
-  /**
-   * @brief Return the name of class @c T as a string.
-   */
-  static std::string name()
-#ifdef __GNUC__
-    // Force this function to appear as a symbol in the output file,
-    // even in an optimized build where it's always inlined.
-    // Otherwise, we get complaints from cling that it can't find the symbol
-    // (as of root 6.04).
-    __attribute__ ((used))
-#endif
-    ;
-};
-
-
-#include "SGTools/ClassName.icc"
+#include "AthenaKernel/ClassName.h"
 
 
 #endif // not SGTOOLS_CLASSNAME_H
diff --git a/Control/SGTools/SGTools/DataBucket.h b/Control/SGTools/SGTools/DataBucket.h
index 958d5a9fce5d9c6e3592f31387694bfeca7d26d0..d751606c58ae4033486d34f377b2f0095c7549d5 100755
--- a/Control/SGTools/SGTools/DataBucket.h
+++ b/Control/SGTools/SGTools/DataBucket.h
@@ -83,7 +83,7 @@ namespace SG {
      */
     virtual void* cast (CLID clid,
                         IRegisterTransient* irt = 0,
-                        bool isConst = true) const override;
+                        bool isConst = true) override;
     
 
     /**
@@ -96,7 +96,7 @@ namespace SG {
      */
     virtual void* cast (const std::type_info& tinfo,
                         IRegisterTransient* irt = 0,
-                        bool isConst = true) const override;
+                        bool isConst = true) override;
 
     /**
      * @brief Return a new @c DataBucket whose payload has been cloned from the
@@ -126,7 +126,7 @@ namespace SG {
     /// Objects made by copy conversion.
     typedef std::pair<const CopyConversionBase*, void*> ent_t;
     typedef std::vector<ent_t> vec_t;
-    mutable vec_t m_cnvcopies;
+    vec_t m_cnvcopies;
 
     DataBucket (const DataBucket&);
     DataBucket& operator= (const DataBucket&);
diff --git a/Control/SGTools/SGTools/DataBucket.icc b/Control/SGTools/SGTools/DataBucket.icc
index bf935515e8d30bb942b09d53dfccc240efb02a1b..371a529c495862c8ef0208941d79adbd452132f1 100755
--- a/Control/SGTools/SGTools/DataBucket.icc
+++ b/Control/SGTools/SGTools/DataBucket.icc
@@ -10,9 +10,9 @@
 #include <boost/type_traits/is_abstract.hpp>
 #include <boost/type_traits/has_trivial_copy.hpp>
 
-#include "SGTools/ClassID_traits.h"
-#include "SGTools/BaseInfo.h"
 #include "SGTools/IRegisterTransient.h"
+#include "AthenaKernel/ClassID_traits.h"
+#include "AthenaKernel/BaseInfo.h"
 #include "AthenaKernel/ILockable.h"
 
 #include <type_traits>
@@ -119,7 +119,7 @@ template <typename T>
 void*
 SG::DataBucket<T>::cast (CLID clid,
                          IRegisterTransient* irt /*= 0*/,
-                         bool isConst /*=true*/) const
+                         bool isConst /*=true*/)
 {
   void* ret = SG::BaseInfo<T>::cast (m_ptr, clid);
   if (ret || !isConst)
@@ -160,7 +160,7 @@ SG::DataBucket<T>::cast (CLID clid,
 template <typename T> 
 void* SG::DataBucket<T>::cast (const std::type_info& tinfo,
                                IRegisterTransient* irt /*= 0*/,
-                               bool isConst /*= true*/) const
+                               bool isConst /*= true*/)
 {
   void* ret = SG::BaseInfo<T>::cast (m_ptr, tinfo);
   if (ret || !isConst)
diff --git a/Control/SGTools/SGTools/DataBucketBase.h b/Control/SGTools/SGTools/DataBucketBase.h
index efab88c57fb4bd995177cab80eadaee8de967020..336949dcb44ecc12c46678f4e0a71495b6abd6d8 100755
--- a/Control/SGTools/SGTools/DataBucketBase.h
+++ b/Control/SGTools/SGTools/DataBucketBase.h
@@ -43,7 +43,7 @@ class DataBucketBase : public DataObject
    * @param isConst True if the object being converted is regarded as const.
    */
   template <class T> T* cast (SG::IRegisterTransient* irt = 0,
-                              bool isConst = true) const;
+                              bool isConst = true);
 
   /**
    * @brief Return the contents of the @c DataBucket,
@@ -55,7 +55,7 @@ class DataBucketBase : public DataObject
    */
   virtual void* cast (CLID clid,
                       SG::IRegisterTransient* irt = 0,
-                      bool isConst = true) const = 0;
+                      bool isConst = true) = 0;
 
   /**
    * @brief Return the contents of the @c DataBucket,
@@ -67,7 +67,7 @@ class DataBucketBase : public DataObject
    */
   virtual void* cast (const std::type_info& tinfo,
                       SG::IRegisterTransient* irt = 0,
-                      bool isConst = true) const = 0;
+                      bool isConst = true) = 0;
 
   /**
    * @brief Return a new @c DataBucket whose payload has been cloned from the
diff --git a/Control/SGTools/SGTools/DataBucketBase.icc b/Control/SGTools/SGTools/DataBucketBase.icc
index 38f59c4d07d1c3bd246a3f0705181b1f7d3c96a6..4f5eafb44b2ca456a2d49032a2426e98c7c1c7b6 100755
--- a/Control/SGTools/SGTools/DataBucketBase.icc
+++ b/Control/SGTools/SGTools/DataBucketBase.icc
@@ -12,7 +12,7 @@
  *        Implementation file.
  */
 
-#include "SGTools/ClassID_traits.h"
+#include "AthenaKernel/ClassID_traits.h"
 #include "boost/type_traits/remove_const.hpp"
 #include <typeinfo>
 
@@ -27,7 +27,7 @@
  */
 template <class T>
 T* DataBucketBase::cast (SG::IRegisterTransient* irt /*= 0*/,
-                         bool isConst /*= true*/) const
+                         bool isConst /*= true*/)
 {
   return reinterpret_cast<T*>
     (cast (typeid (typename boost::remove_const<T>::type), irt, isConst));
diff --git a/Control/SGTools/SGTools/DataProxy.h b/Control/SGTools/SGTools/DataProxy.h
index 8f0e2b57f04e01ccbf1daf580b6483a7ed629eee..917ddc93ba6412ea85fc84311340d6930703051e 100755
--- a/Control/SGTools/SGTools/DataProxy.h
+++ b/Control/SGTools/SGTools/DataProxy.h
@@ -48,15 +48,22 @@ namespace SG {
     typedef std::string id_type;
     typedef TransientAddress::TransientClidSet CLIDCont_t;
     typedef TransientAddress::TransientAliasSet AliasCont_t;
+    typedef IStringPool::sgkey_t sgkey_t;
 
     // Constructors
     DataProxy();                      // default constructor
 
     ///build from TransientAddress
+    ///Takes ownership of tAddr.
     DataProxy(TransientAddress* tAddr, 
               IConverter* pDataLoader,
               bool constFlag=false, bool resetOnly=true);
 
+    ///build from TransientAddress
+    DataProxy(std::unique_ptr<TransientAddress> tAddr, 
+              IConverter* pDataLoader,
+              bool constFlag=false, bool resetOnly=true);
+
     ///build from DataObject
     DataProxy(DataObject* dObject, 
               TransientAddress* tAddr,
@@ -68,39 +75,77 @@ namespace SG {
     ///\name IRegistry implementation
     //@{
     /// Add reference to object
-    virtual unsigned long addRef();
+    virtual unsigned long addRef() override;
 
     /// release reference to object
-    virtual unsigned long release();
+    virtual unsigned long release() override;
 
     /// return refCount
     unsigned long refCount() const;
 
     /// Retrieve data object key == string
-    virtual const name_type& name() const { return m_tAddress->name(); }
+    virtual const name_type& name() const override;
 
     /// Retrieve data object key == string
     /// duplicated for Gaudi folks does same as name()
-    virtual const id_type& identifier() const {return m_tAddress->name();}
+    virtual const id_type& identifier() const override;
 
     /// Retrieve DataObject
-    virtual DataObject* object() const      { return m_dObject; }
+    virtual DataObject* object() const override;
 
     /// set an IOpaqueAddress
-    virtual void setAddress(IOpaqueAddress* ioa);
+    virtual void setAddress(IOpaqueAddress* ioa) override;
 
     /// Retrieve IOpaqueAddress
-    virtual IOpaqueAddress* address() const { return m_tAddress->address(); } 
+    virtual IOpaqueAddress* address() const override;
 
     /// set DataSvc (Gaudi-specific); do nothing for us
-    virtual IDataProviderSvc* dataSvc() const { return 0; }
+    virtual IDataProviderSvc* dataSvc() const override;
     //@}
 
     /// Retrieve TransientAddress
-    virtual TransientAddress* transientAddress() const { return m_tAddress; }
+    TransientAddress* transientAddress() const;
+
+    ///< Get the primary (hashed) SG key.
+    sgkey_t sgkey() const;
+
+    ///< Set the primary (hashed) SG key.
+    void setSGKey (sgkey_t sgkey);
+
+    ///< Return the ID of the store containing this proxy.
+    StoreID::type storeID() const;
+
+    ///< check if it is a transient ID (primary or symLinked):
+    bool transientID (CLID id) const;
+
+    ///< return the list of transient IDs (primary or symLinked):
+    CLIDCont_t transientID() const;
+
+    /// Add a new transient ID
+    void setTransientID(CLID id);
 
     /// access set of proxy aliases
-    const AliasCont_t& alias() const { return m_tAddress->alias(); }
+    /// Returns a COPY of the alias set.
+    AliasCont_t alias() const;
+
+    /// Test to see if a given string is in the alias set.
+    bool hasAlias (const std::string& key) const;
+
+    /// Add a new proxy alias.
+    void setAlias(const std::string& key);
+
+    /// remove alias from proxy
+    bool removeAlias(const std::string& key);
+
+    /// Return the address provider.
+    IAddressProvider* provider();
+
+    /// Set the address provider.
+    void setProvider(IAddressProvider* provider, StoreID::type storeID);
+
+    /// Set the CLID / key.
+    /// This will only succeed if the clid/key are currently clear.
+    void setID (CLID id, const std::string& key);
 
     /// Other methods of DataProxy (not in Interface IRegistry):
 
@@ -108,8 +153,8 @@ namespace SG {
     /// If HARD is true, then the bound objects should also
     /// clear any data that depends on the identity
     /// of the current event store.  (See IResetable.h.)
-    virtual void reset (bool hard = false);
-    virtual void finalReset(); ///called by destructor
+    void reset (bool hard = false);
+    void finalReset(); ///called by destructor
 
     /// release or reset according to resetOnly flag
     /// If FORCE is true, then always release.
@@ -125,6 +170,8 @@ namespace SG {
     /// is the object valid?
     bool isValidObject() const;
 
+    bool updateAddress();
+
     /// set DataObject
     void setObject(DataObject* obj);
 
@@ -145,16 +192,16 @@ namespace SG {
      */
     std::unique_ptr<DataObject> readData (ErrNo* errNo) const;
 
-    ErrNo errNo() const { return m_errno; }
+    ErrNo errNo() const;
  
     /// Retrieve clid
-    CLID clID() const { return m_tAddress->clID(); }
+    CLID clID() const;
 
     /// Retrieve storage type
-    unsigned char svcType() const { return m_storageType; }
+    unsigned char svcType() const;
 
     /// Check if it is a const object
-    bool isConst() const { return m_const; }
+    bool isConst() const;
 
 
     /**
@@ -167,17 +214,14 @@ namespace SG {
 
 
     /// set the reset only flag: Clear Store will reset and not delete.
-    void resetOnly(const bool& flag) { m_resetFlag = flag; }
+    void resetOnly(const bool& flag);
 
     /// Check reset only:
-    bool isResetOnly() const { return m_resetFlag; }
+    bool isResetOnly() const;
 
     bool bindHandle(IResetable* ir);
     void unbindHandle(IResetable* ir);
 
-    /// The following kept temporarily for backward compatibility:
-    const CLIDCont_t& transientID() const {return m_tAddress->transientID();}  
-
     // cache the t2p
     void setT2p(T2pMap* t2p);
 
@@ -187,13 +231,13 @@ namespace SG {
      *
      * (@c IRegisterTransient interface.)
      */
-    virtual void registerTransient (void* p);
+    virtual void registerTransient (void* p) override;
 
     /// Set the store of which we're a part.
-    void setStore (IProxyDict* store) { m_store = store; }
+    void setStore (IProxyDict* store);
 
     /// Return the store of which we're a part.
-    IProxyDict* store() const { return m_store; }
+    IProxyDict* store() const;
 
     /// reset the bound DataHandles
     /// If HARD is true, then the bound objects should also
@@ -201,13 +245,13 @@ namespace SG {
     /// of the current event store.  (See IResetable.h.)
     void resetBoundHandles (bool hard);
 
-    IConverter* loader() const { return m_dataLoader; }
+    IConverter* loader() const;
 
   private:
-    DataProxy(const DataProxy&);
-    DataProxy& operator=(const DataProxy&);
+    DataProxy(const DataProxy&) = delete;
+    DataProxy& operator=(const DataProxy&) = delete;
 
-    TransientAddress* m_tAddress;
+    std::unique_ptr<TransientAddress> m_tAddress;
 
     unsigned long m_refCount;
 
@@ -256,19 +300,11 @@ namespace SG {
 
   ///const pointer version of the cast
   template<typename DATA>
-  const DATA* DataProxy_cast(const DataProxy* proxy)
-  {
-    return DataProxy_cast<DATA>(const_cast<DataProxy*>(proxy));
-  }
+  const DATA* DataProxy_cast(const DataProxy* proxy);
 
   ///const ref version of the cast. @throws SG::ExcBadDataProxyCast.
   template<typename DATA>
-  DATA DataProxy_cast(const DataProxy& proxy)
-  {
-    const DATA* result = DataProxy_cast<DATA>(&proxy);
-    if (!result) SG::throwExcBadDataProxyCast(proxy.clID(), typeid(DATA));
-    return *result;
-  }
+  DATA DataProxy_cast(const DataProxy& proxy);
 
   /**
    * @brief Try to get the pointer back from a @a DataProxy,
diff --git a/Control/SGTools/SGTools/DataProxy.icc b/Control/SGTools/SGTools/DataProxy.icc
index df4505d875a7f5d2c146e6de44851c3fbc800850..4050fc7aaa6466fbb2bc0a95444ceaa4ac9554da 100755
--- a/Control/SGTools/SGTools/DataProxy.icc
+++ b/Control/SGTools/SGTools/DataProxy.icc
@@ -12,10 +12,9 @@
 
 // $Id: DataProxy.icc,v 1.6 2008-07-14 22:16:25 calaf Exp $
 
-//<<<<<< INCLUDES                                                       >>>>>>
 #include "SGTools/DataBucketBase.h"
-#include "SGTools/ClassID_traits.h"
 #include "SGTools/StorableConversions.h"
+#include "AthenaKernel/ClassID_traits.h"
 #ifndef NDEBUG
 #  include "AthenaKernel/getMessageSvc.h"
 #  include "GaudiKernel/MsgStream.h"
@@ -24,6 +23,232 @@
 
 class DataObject;
 
+
+/// Retrieve data object key == string
+inline
+const SG::DataProxy::name_type& SG::DataProxy::name() const
+{
+  return m_tAddress->name();
+}
+
+
+/// Retrieve data object key == string
+/// duplicated for Gaudi folks does same as name()
+inline
+const SG::DataProxy::id_type& SG::DataProxy::identifier() const
+{
+  return m_tAddress->name();
+}
+
+
+/// Retrieve DataObject
+inline
+DataObject* SG::DataProxy::object() const
+{
+  return m_dObject;
+}
+
+
+/// Retrieve IOpaqueAddress
+inline
+IOpaqueAddress* SG::DataProxy::address() const
+{
+  return m_tAddress->address();
+} 
+
+
+/// set DataSvc (Gaudi-specific); do nothing for us
+inline
+IDataProviderSvc* SG::DataProxy::dataSvc() const
+{
+  return nullptr;
+}
+
+/// Retrieve TransientAddress
+inline
+SG::TransientAddress* SG::DataProxy::transientAddress() const
+{
+  return m_tAddress.get();
+}
+
+///< Get the primary (hashed) SG key.
+inline
+SG::sgkey_t SG::DataProxy::sgkey() const
+{
+  return m_tAddress->sgkey();
+}
+
+
+/// Set the primary (hashed) SG key.
+inline
+void SG::DataProxy::setSGKey (sgkey_t sgkey)
+{
+  m_tAddress->setSGKey (sgkey);
+}
+
+
+///< Return the ID of the store containing this proxy.
+inline
+StoreID::type SG::DataProxy::storeID() const
+{
+  return m_tAddress->storeID();
+}
+
+
+///< check if it is a transient ID (primary or symLinked):
+inline
+bool SG::DataProxy::transientID (CLID id) const
+{
+  return m_tAddress->transientID (id);
+}
+
+
+///< return the list of transient IDs (primary or symLinked):
+inline
+SG::DataProxy::CLIDCont_t SG::DataProxy::transientID() const
+{
+  return m_tAddress->transientID();
+}
+
+
+/// Add a new transient ID
+inline
+void SG::DataProxy::setTransientID(CLID id)
+{
+  m_tAddress->setTransientID (id);
+}
+
+
+/// access set of proxy aliases
+/// Returns a COPY of the alias set.
+inline
+SG::DataProxy::AliasCont_t SG::DataProxy::alias() const
+{
+  return m_tAddress->alias();
+}
+
+
+/// Add a new proxy alias.
+inline
+void SG::DataProxy::setAlias(const std::string& key)
+{
+  m_tAddress->setAlias (key);
+}
+
+
+/// Test to see if a given string is in the alias set.
+inline
+bool SG::DataProxy::hasAlias(const std::string& key) const
+{
+  lock_t lock (m_mutex);
+  const AliasCont_t& alias = m_tAddress->alias();
+  return alias.find(key) != alias.end();
+}
+
+
+/// remove alias from proxy
+inline
+bool SG::DataProxy::removeAlias(const std::string& key)
+{
+  return m_tAddress->removeAlias (key);
+}
+
+
+/// Return the address provider.
+inline
+IAddressProvider* SG::DataProxy::provider()
+{
+  return m_tAddress->provider();
+}
+
+
+/// Set the address provider.
+inline
+void SG::DataProxy::setProvider(IAddressProvider* provider,
+                                StoreID::type storeID)
+{
+  m_tAddress->setProvider (provider, storeID);
+}
+
+
+/// Set the CLID / key.
+/// This will only succeed if the clid/key are currently clear.
+inline
+void SG::DataProxy::setID (CLID id, const std::string& key)
+{
+  m_tAddress->setID (id, key);
+}
+
+
+inline
+SG::DataProxy::ErrNo SG::DataProxy::errNo() const
+{
+  return m_errno;
+}
+
+
+/// Retrieve clid
+inline
+CLID SG::DataProxy::clID() const
+{
+  return m_tAddress->clID();
+}
+
+
+/// Retrieve storage type
+inline
+unsigned char SG::DataProxy::svcType() const
+{
+  return m_storageType;
+}
+
+
+/// Check if it is a const object
+inline
+bool SG::DataProxy::isConst() const
+{
+  return m_const;
+}
+
+
+/// set the reset only flag: Clear Store will reset and not delete.
+inline
+void SG::DataProxy::resetOnly(const bool& flag)
+{
+  m_resetFlag = flag;
+}
+
+
+/// Check reset only:
+inline
+bool SG::DataProxy::isResetOnly() const
+{
+  return m_resetFlag;
+}
+
+
+/// Set the store of which we're a part.
+inline
+void SG::DataProxy::setStore (IProxyDict* store)
+{
+  m_store = store;
+}
+
+/// Return the store of which we're a part.
+inline
+IProxyDict* SG::DataProxy::store() const
+{
+  return m_store;
+}
+
+
+inline
+IConverter* SG::DataProxy::loader() const
+{
+  return m_dataLoader;
+}
+
+
 template <typename DATA>
 DATA* SG::DataProxy_cast(SG::DataProxy* proxy) {
   DATA* result(0);
@@ -96,3 +321,20 @@ DATA* SG::DataProxy_cast(SG::DataProxy* proxy) {
 }
 
 
+///const pointer version of the cast
+template<typename DATA>
+const DATA* SG::DataProxy_cast(const SG::DataProxy* proxy)
+{
+  return SG::DataProxy_cast<DATA>(const_cast<SG::DataProxy*>(proxy));
+}
+
+
+///const ref version of the cast. @throws SG::ExcBadDataProxyCast.
+template<typename DATA>
+DATA SG::DataProxy_cast(const SG::DataProxy& proxy)
+{
+  const DATA* result = SG::DataProxy_cast<DATA>(&proxy);
+  if (!result) SG::throwExcBadDataProxyCast(proxy.clID(), typeid(DATA));
+  return *result;
+}
+
diff --git a/Control/SGTools/SGTools/SGToolsDict.h b/Control/SGTools/SGTools/SGToolsDict.h
index 7434a922c7da4c8bed2ac64972f2104251a4d3b0..9e300fcf7a2210d0c962e3dfbe8fe9106b1b5b97 100755
--- a/Control/SGTools/SGTools/SGToolsDict.h
+++ b/Control/SGTools/SGTools/SGToolsDict.h
@@ -10,7 +10,6 @@
 #include <vector>
 #include "SGTools/DataBucket.h"
 #include "SGTools/DataProxy.h"
-#include "SGTools/BaseInfo.h"
 #include "SGTools/CurrentEventStore.h"
 
 // Need to instantiate iterators
diff --git a/Control/SGTools/SGTools/StlMapClids.h b/Control/SGTools/SGTools/StlMapClids.h
index 30fdadbf7318990238e93a732d9bc6b121ea371b..c7de36fa68ad4569d1219210699033a8a46d2df4 100644
--- a/Control/SGTools/SGTools/StlMapClids.h
+++ b/Control/SGTools/SGTools/StlMapClids.h
@@ -11,16 +11,11 @@
 #ifndef SGTOOLS_STLMAPCLIDS_H 
 #define SGTOOLS_STLMAPCLIDS_H 
 
-// STL includes
+#include "AthenaKernel/CLASS_DEF.h"
 #include <map>
 #include <string>
 #include <vector>
 
-// Gaudi includes
-
-// SGTools includes
-#include "SGTools/CLASS_DEF.h"
-
 CLASS_DEF2( std::map<int,int> ,    103402598 , 1 )
 CLASS_DEF2( std::map<int,float> ,  256222847 , 1 )
 CLASS_DEF2( std::map<int,double> , 235483215 , 1 )
diff --git a/Control/SGTools/SGTools/StlVectorClids.h b/Control/SGTools/SGTools/StlVectorClids.h
index 8072338147e2b3437d1d42438407ededca178669..88497315e50cbfe5bd4ec1e978fa7caf78b72be5 100644
--- a/Control/SGTools/SGTools/StlVectorClids.h
+++ b/Control/SGTools/SGTools/StlVectorClids.h
@@ -11,16 +11,11 @@
 #ifndef SGTOOLS_STLVECTORCLIDS_H 
 #define SGTOOLS_STLVECTORCLIDS_H 
 
-// STL includes
+#include "AthenaKernel/CLASS_DEF.h"
 #include <vector>
 #include <string>
 #include <stdint.h>
 
-// Gaudi includes
-
-// SGTools includes
-#include "SGTools/CLASS_DEF.h"
-
 CLASS_DEF( std::vector<bool> ,            45822813 , 1 )
 CLASS_DEF( std::vector<short> ,           35706084 , 1 )
 CLASS_DEF( std::vector<int> ,             22592129 , 1 )
diff --git a/Control/SGTools/SGTools/StorableConversions.h b/Control/SGTools/SGTools/StorableConversions.h
index 883cdfd89abc92fc2039e802546dfded9ab9b831..2f92a5ecfb27e08671c204dc9bd300fff9b8dace 100755
--- a/Control/SGTools/SGTools/StorableConversions.h
+++ b/Control/SGTools/SGTools/StorableConversions.h
@@ -12,10 +12,9 @@
  * @author ATLAS Collaboration
  **/
 
-//<<<<<< INCLUDES                                                       >>>>>>
 #include "SGTools/DataBucket.h"
-#include "SGTools/ClassID_traits.h"
 #include "SGTools/DataBucketTraitFwd.h"
+#include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/tools/type_tools.h"
 #include "AthenaKernel/DataObjectSharedPtr.h"
 #include "GaudiKernel/DataObject.h"
diff --git a/Control/SGTools/SGTools/TransientAddress.h b/Control/SGTools/SGTools/TransientAddress.h
index 77ffb8fd9f50d5e2a9fd51f7e6c99fbc4043ecfa..f865007a6da5113a0ec879c0f21ad9e809773f1c 100755
--- a/Control/SGTools/SGTools/TransientAddress.h
+++ b/Control/SGTools/SGTools/TransientAddress.h
@@ -8,6 +8,8 @@
 ///< includes:
 #include <string>
 #include <set>
+#include <vector>
+#include <algorithm>
 
 
 ///< Gaudi includes:
@@ -18,6 +20,8 @@
 ///< forward declarations:
 class IOpaqueAddress;
 class IAddressProvider;
+class IProxyDict;
+class EventContext;
 
 namespace SG {
 
@@ -26,7 +30,10 @@ namespace SG {
 
   public:
 
-    typedef std::set<CLID> TransientClidSet;
+    /// Strictly a set, but there shouldn't be more than a handful
+    /// of entries, so store it as a sorted vector instead.
+    typedef std::vector<CLID> TransientClidSet;
+
     typedef std::set<std::string> TransientAliasSet;
     typedef IStringPool::sgkey_t sgkey_t;
 
@@ -69,10 +76,10 @@ namespace SG {
     void setSGKey (sgkey_t sgkey);
 
     ///< check if it is a transient ID (primary or symLinked):
-    bool transientID (const CLID& id) const;
+    bool transientID (CLID id) const;
 
     ///< set transient CLID's
-    void setTransientID(const CLID& id);
+    void setTransientID(CLID id);
 
     ///< get transient CLID's
     const TransientClidSet& transientID() const;
@@ -83,6 +90,9 @@ namespace SG {
     ///< set alias'
     void setAlias(const std::set<std::string>& keys);
 
+    ///< set alias'
+    void setAlias(std::set<std::string>&& keys);
+
     /// remove alias from proxy
     bool removeAlias(const std::string& key);
 
@@ -100,7 +110,9 @@ namespace SG {
     void consultProvider(const bool& flag);
 
     ///< Check the validity of the Transient Address.
-    bool isValid();
+    /// If forceUpdate is true, then call @c updateAddress
+    /// even if we already have an address.
+    bool isValid (IProxyDict* store, bool forceUpdate = false);
 
     ///< cache the pointer to the Address provider which can update
     ///< this transient address
@@ -109,7 +121,16 @@ namespace SG {
     void setProvider(IAddressProvider* provider, StoreID::type storeID);
 
   private:
-
+    /**
+     * @brief Retrieve the EventContext saved in store STORE.
+     * @param store The store from which to retrieve the context, or nullptr.
+     *
+     * If there is no context recorded in the store, return a default-initialized
+     * context.
+     */
+    const EventContext& contextFromStore (IProxyDict* store) const;
+
+    
     ///< clid of the concrete class (persistent clid)
     CLID m_clid;
 
@@ -188,16 +209,10 @@ namespace SG {
 
   /// check if it is a transient ID:
   inline
-  bool TransientAddress::transientID(const CLID& id) const
-  { 
-    return 0 != m_transientID.count(id);
-  }
-
-  /// set transient CLID's
-  inline
-  void TransientAddress::setTransientID(const CLID& id)
-  { 
-    m_transientID.insert(id);
+  bool TransientAddress::transientID(CLID id) const
+  {
+    return std::find (m_transientID.begin(), m_transientID.end(), id) !=
+      m_transientID.end();
   }
 
   /// get transient CLID's
@@ -221,6 +236,13 @@ namespace SG {
     m_transientAlias = keys;
   } 
 
+  /// set transient Alias'
+  inline 
+  void TransientAddress::setAlias(std::set<std::string>&& keys)
+  {
+    m_transientAlias = std::move(keys);
+  } 
+
   /// remove alias
   inline bool TransientAddress::removeAlias(const std::string& key)
   {
diff --git a/Control/SGTools/SGTools/crc64.h b/Control/SGTools/SGTools/crc64.h
index d9a017ca7db4d1030dcc27b87686bce43ea0e2a8..c184530bcbd0e4be0992457dbba04c0e92b285a9 100755
--- a/Control/SGTools/SGTools/crc64.h
+++ b/Control/SGTools/SGTools/crc64.h
@@ -1,7 +1,10 @@
 // This file's extension implies that it's C, but it's really -*- C++ -*-.
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
 /**
  * @file  SGTools/crc64.h
- * @author scott snyder, originally from David T. Jones
+ * @author scott snyder
  * @date Mar 2007
  * @brief A CRC-64 implementation.
  */
diff --git a/Control/SGTools/SGTools/safe_clid.icc b/Control/SGTools/SGTools/safe_clid.icc
index 745257f0a83c9432f10e097eba3fcc0e9aa8847b..b1e98dabdea3af706b4a74db82913045a8a48c93 100755
--- a/Control/SGTools/SGTools/safe_clid.icc
+++ b/Control/SGTools/SGTools/safe_clid.icc
@@ -12,7 +12,7 @@
  *        Implementation file.
  */
 
-#include "SGTools/ClassID_traits.h"
+#include "AthenaKernel/ClassID_traits.h"
 #include "AthenaKernel/tools/type_tools.h"
 #include "boost/type_traits/remove_pointer.hpp"
 
diff --git a/Control/SGTools/SGTools/selection.xml b/Control/SGTools/SGTools/selection.xml
index 595175cccb3b425c3bf3af0e5e91d3cf828a9567..46e6021126648700fd625d090ea9d1553c5f9f6e 100755
--- a/Control/SGTools/SGTools/selection.xml
+++ b/Control/SGTools/SGTools/selection.xml
@@ -6,7 +6,6 @@
   </exclusion>
   <class name="std::vector<SG::DataProxy*>" />
   <class name="std::vector<const SG::DataProxy*>" />
-  <class name="SG::BaseInfoBase" />
   <class name="SG::CurrentEventStore" />
   <class name="SG::CurrentEventStore::Push" />
 </lcgdict>
diff --git a/Control/SGTools/cmt/requirements b/Control/SGTools/cmt/requirements
deleted file mode 100755
index 44a90364c028f3e0c0b81d6603d589d7159d6d4a..0000000000000000000000000000000000000000
--- a/Control/SGTools/cmt/requirements
+++ /dev/null
@@ -1,46 +0,0 @@
-package SGTools
-author Paolo Calafiura   <Paolo.Calafiura@cern.ch>
-author Srini Rajagopalan <srinir@bnl.gov>
-
-use AtlasPolicy    AtlasPolicy-*
-
-use CxxUtils	   CxxUtils-*	       Control	
-use AthenaKernel   AthenaKernel-*      Control
-
-#need IAddressProvider.h, IResetable.h
-
-use AtlasBoost     AtlasBoost-*	       External
-use GaudiInterface GaudiInterface-*    External
-
-library SGTools *.cxx 
-apply_pattern installed_library 
-
-private
-# Get the boost threads dso linked.
-macro_append Boost_linkopts $(Boost_linkopts_thread)
-macro_append SGTools_shlibflags $(Boost_linkopts)
-
-use SGAudCore 	   SGAudCore-*	       Control/SGMon
-use TestTools	   TestTools-*         AtlasTest
-use AtlasReflex    AtlasReflex-*       External  -no_auto_imports
-
-apply_pattern lcgdict dict=SGTools selectionfile=selection.xml headerfiles="-s=${SGTools_root}/SGTools SGToolsDict.h"
-
-apply_pattern UnitTest_run unit_test=CLIDRegistry
-apply_pattern UnitTest_run unit_test=VersionedKey
-apply_pattern UnitTest_run unit_test=DataBucket \
-  extrapatterns="^HistogramPersis.* INFO"
-apply_pattern UnitTest_run unit_test=BaseInfo
-apply_pattern UnitTest_run unit_test=safe_clid
-apply_pattern UnitTest_run unit_test=crc64
-apply_pattern UnitTest_run unit_test=exceptions
-apply_pattern UnitTest_run unit_test=StringPool
-apply_pattern UnitTest_run unit_test=ClassName
-apply_pattern UnitTest_run unit_test=DataProxy
-apply_pattern UnitTest_run unit_test=DataStore
-apply_pattern UnitTest_run unit_test=TransientAddress
-apply_pattern UnitTest_run unit_test=CurrentEventStore
-apply_pattern UnitTest_run unit_test=SGFolderItem
-
-macro_append DOXYGEN_INPUT " ../doc"
-end_private
diff --git a/Control/SGTools/doc/packagedoc.h b/Control/SGTools/doc/packagedoc.h
index fff7422f67c1a0d842045072f9b70428f180dd7a..2bc3627cba625676e312c9acd9e132f467fe0133 100644
--- a/Control/SGTools/doc/packagedoc.h
+++ b/Control/SGTools/doc/packagedoc.h
@@ -8,10 +8,8 @@
 
 This package contains implementation classes for StoreGate.
 
-@section SGTools_uses Packages used
 
 
-@section SGTools_requirements requirements
 
 
 @section SGTools_refs More Documentation
diff --git a/Control/SGTools/src/CLIDRegistry.cxx b/Control/SGTools/src/CLIDRegistry.cxx
deleted file mode 100755
index 9091d635377cc2013299116e96e0bd64911b025c..0000000000000000000000000000000000000000
--- a/Control/SGTools/src/CLIDRegistry.cxx
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "SGTools/CLIDRegistry.h"
-#include <unordered_map>
-#include <memory>
-/* #include <algorithm> */
-using namespace std;
-
-const unsigned long CLIDRegistry::MINCLID = CLIDdetail::MINCLID;
-const unsigned long CLIDRegistry::MAXCLID = CLIDdetail::MAXCLID;
-
-namespace {
-unsigned int alreadyDone (0);
-}
-
-
-//   bool 
-//   CLIDRegistry::addEntry(unsigned long id, const string& typeName) {
-//     assert( MINCLID <= id && id <= MAXCLID );
-//     registry().push_back(pair<unsigned long, string>(id,typeName));
-//     return true;
-//   }
-
-
-CLIDRegistry::const_iterator CLIDRegistry::begin() {
-#ifdef CLIDREG_DEBUG
-  cerr << "CLIDRegistry::begin: returns " 
-	    << &*(registry().begin()) << " for registry " <<&registry() 
-	    <<endl;
-#endif	
-  return registry().begin();
-}
-
-
-CLIDRegistry::const_iterator CLIDRegistry::end() {
-#ifdef CLIDREG_DEBUG
-  cerr << "CLIDRegistry::end: returns " 
-	    << &*(registry().end()) << " for registry " <<&registry() 
-	    <<endl;
-#endif	
-  return registry().end();
-  //return unique(registry().begin(), registry().end());  //FIXME O(N)!
-}
-
-bool
-CLIDRegistry::hasNewEntries() {
-  return (alreadyDone < CLIDRegistry::registry().size());
-}
-
-std::pair<CLIDRegistry::const_iterator, CLIDRegistry::const_iterator> 
-CLIDRegistry::newEntries() {
-  std::pair<CLIDRegistry::const_iterator, CLIDRegistry::const_iterator> ret =
-     std::make_pair(CLIDRegistry::begin()+alreadyDone, 
-                    CLIDRegistry::end());
-  alreadyDone = CLIDRegistry::registry().size();
-  return ret;
-}
-
-
-CLIDRegistry::CLIDRegistryImpl& CLIDRegistry::registry() {
-  static CLIDRegistryImpl reg;
-  return reg;
-}
-
-
-namespace {
-typedef std::unordered_map<unsigned long, const std::type_info*> clid_ti_map_t;
-std::unique_ptr<clid_ti_map_t> clid_ti_map;
-
-typedef std::unordered_map<const std::type_info*, unsigned long> ti_clid_map_t;
-std::unique_ptr<ti_clid_map_t> ti_clid_map;
-}
-
-
-/**
- * @brief Add a new CLID <> type_info mapping.
- * @param clid The CLID of the class.
- * @param ti The @c type_info of the class.
- */
-void CLIDRegistry::addCLIDMapping (unsigned long clid, const std::type_info& ti)
-{
-  if (!clid_ti_map)
-    clid_ti_map = std::make_unique<clid_ti_map_t>();
-  if (!ti_clid_map)
-    ti_clid_map = std::make_unique<ti_clid_map_t>();
-
-  (*clid_ti_map)[clid] = &ti;
-  (*ti_clid_map)[&ti] = clid;
-}
-
-
-/**
- * @brief Return the @c type_info corresponding to a CLID.
- * @param clid The CLID to find.
- *
- * Returns the corresponding @c type_info or nullptr.
- */
-const std::type_info* CLIDRegistry::CLIDToTypeinfo (unsigned long clid)
-{
-  if (clid_ti_map) {
-    auto i = clid_ti_map->find (clid);
-    if (i != clid_ti_map->end())
-      return i->second;
-  }
-  return nullptr;
-}
-
-
-/**
- * @brief Return the CLID corresponding to a @c type_info.
- * @param ti The @c type_info to find.
- *
- * Returns the corresponding @c CLID or CLID_NULL.
- */
-unsigned long CLIDRegistry::typeinfoToCLID (const std::type_info& ti)
-{
-  if (ti_clid_map) {
-    auto i = ti_clid_map->find (&ti);
-    if (i != ti_clid_map->end())
-      return i->second;
-  }
-  return 0;
-}
-
-
-/// Out-of-line part of addEntry().
-bool CLIDRegistry::addEntry (unsigned long clid,
-                             const std::type_info& ti,
-                             const char* typeName, 
-                             const Athena::PackageInfo& pkgInfo,
-                             const std::string& typeInfoName)
-{
-  registry().push_back(tuple_t(clid, std::string(typeName), pkgInfo, typeInfoName));
-#ifdef CLIDREG_DEBUG
-  std::cerr << "CLIDRegistry::addEntry: for CLID/type " 
-	    << clid << '/' << typeName << " to registry " <<&registry() 
-	    <<std::endl;
-#endif		
-  addCLIDMapping (clid, ti);
-  return true;
-}
-
diff --git a/Control/SGTools/src/DataProxy.cxx b/Control/SGTools/src/DataProxy.cxx
index effea2fdf756d12d9d6f176f51b55f282882df95..697819346881cbc76e9929c839a696b593596f93 100755
--- a/Control/SGTools/src/DataProxy.cxx
+++ b/Control/SGTools/src/DataProxy.cxx
@@ -104,9 +104,19 @@ DataProxy::DataProxy():
 // DataProxy constructor with Transient Address
 // (typically called from Proxy Provider)
 DataProxy::DataProxy(TransientAddress* tAddr, 
+		     IConverter* svc,
+		     bool constFlag, bool resetOnly)
+  : DataProxy (std::unique_ptr<TransientAddress> (tAddr),
+               svc, constFlag, resetOnly)
+{
+}
+
+// DataProxy constructor with Transient Address
+// (typically called from Proxy Provider)
+DataProxy::DataProxy(std::unique_ptr<TransientAddress> tAddr, 
 		     IConverter* svc,
 		     bool constFlag, bool resetOnly):
-  m_tAddress(tAddr),
+  m_tAddress(std::move(tAddr)),
   m_refCount(0),
   m_dObject(0), 
   m_dataLoader(svc),
@@ -146,7 +156,6 @@ DataProxy::DataProxy(DataObject* dObject,
 DataProxy::~DataProxy()
 {  
   finalReset();
-  delete m_tAddress;
 }
 
 void DataProxy::setT2p(T2pMap* t2p)
@@ -425,7 +434,7 @@ DataObject* DataProxy::accessData()
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 bool DataProxy::isValidAddress() const
 {
-  return (0 != m_tAddress && m_tAddress->isValid());
+  return (0 != m_tAddress && m_tAddress->isValid(m_store));
 }
 
 bool DataProxy::isValidObject() const
@@ -440,6 +449,11 @@ bool DataProxy::isValid() const
 }
 
 
+bool DataProxy::updateAddress()
+{
+  return m_tAddress->isValid(m_store, true);
+}
+
 /**
  * @brief Try to get the pointer back from a @a DataProxy,
  *        converted to be of type @a clid.
diff --git a/Control/SGTools/src/TestStore.cxx b/Control/SGTools/src/TestStore.cxx
index 6bbf526abdce4416454f685c5141fdf168dd1101..554aba4834b0a0dee844a72de838920d73233486 100644
--- a/Control/SGTools/src/TestStore.cxx
+++ b/Control/SGTools/src/TestStore.cxx
@@ -14,6 +14,7 @@
 #include "SGTools/TestStore.h"
 #include "SGTools/DataBucketBase.h"
 #include <iostream>
+#include <algorithm>
 
 
 namespace SGTest {
@@ -88,14 +89,14 @@ SG::DataProxy* TestStore::recordObject (SG::DataObjectSharedPtr<DataObject> obj,
       // Alias?
       m_kmap[sgkey] = proxy;
       proxy->addRef();
-      proxy->transientAddress()->setAlias (key);
+      proxy->setAlias (key);
       return proxy;
     }
     if (key == proxy->name()) {
       // Symlink?
       m_kmap[sgkey] = proxy;
       proxy->addRef();
-      proxy->transientAddress()->setTransientID (obj->clID());
+      proxy->setTransientID (obj->clID());
       return proxy;
     }
 
@@ -182,7 +183,7 @@ bool TestStore::tryELRemap (sgkey_t sgkey_in, size_t index_in,
 StatusCode TestStore::addToStore (CLID /*id*/, SG::DataProxy* proxy)
 {
   proxy->setStore (this);
-  m_kmap[proxy->transientAddress()->sgkey()] = proxy;
+  m_kmap[proxy->sgkey()] = proxy;
   proxy->addRef();
   return StatusCode::SUCCESS;
 }
@@ -210,8 +211,8 @@ SG::DataProxy* TestStore::record1 (const void* p, DataObject* obj,
   if (m_kmap.find (sgkey) != m_kmap.end()) {
     SG::DataProxy* dp = m_kmap[sgkey];
     dp->setObject (obj);
-    if (dp->transientAddress()->clID() == CLID_NULL)
-      dp->transientAddress()->setID (clid, key);
+    if (dp->clID() == CLID_NULL)
+      dp->setID (clid, key);
     m_tmap[p] = dp;
     return dp;
   }
@@ -242,7 +243,7 @@ void TestStore::alias (SG::DataProxy* proxy,
   sgkey_t sgkey = stringToKey (newKey, proxy->clID());
   m_kmap[sgkey] = proxy;
   proxy->addRef();
-  proxy->transientAddress()->setAlias (newKey);
+  proxy->setAlias (newKey);
 }
 
 
diff --git a/Control/SGTools/src/TransientAddress.cxx b/Control/SGTools/src/TransientAddress.cxx
index 5ad9091c0e64c6ecd9259da05de4230a754748f7..9800394f6e14ba1893a74cfebff1a46f9b7d4033 100755
--- a/Control/SGTools/src/TransientAddress.cxx
+++ b/Control/SGTools/src/TransientAddress.cxx
@@ -3,8 +3,12 @@
 */
 
 #include "SGTools/TransientAddress.h"
+#include "SGTools/DataProxy.h"
 #include "AthenaKernel/IAddressProvider.h"
+#include "AthenaKernel/IProxyDict.h"
+#include "AthenaKernel/EventContextClid.h"
 #include "GaudiKernel/IOpaqueAddress.h"
+#include "GaudiKernel/EventContext.h"
 
 #include <assert.h>
 
@@ -25,7 +29,7 @@ TransientAddress::TransientAddress(const CLID& id, const std::string& key)
     m_sgkey(0)
 { 
   if (id != CLID_NULL)
-    m_transientID.insert(id);
+    m_transientID.push_back(id);
 }
 
 // Constructor with CLID, string key and IOpaqueAddress:
@@ -38,7 +42,7 @@ TransientAddress::TransientAddress(const CLID& id, const std::string& key,
     m_sgkey(0)
 { 
   if (id != CLID_NULL)
-    m_transientID.insert(id);
+    m_transientID.push_back(id);
   setAddress(addr);
 }
 
@@ -49,6 +53,19 @@ TransientAddress::~TransientAddress()
 }
 
 
+/// set transient CLID's
+void TransientAddress::setTransientID(CLID id)
+{
+  if (m_transientID.empty()) {
+    m_transientID.push_back (id);
+  }
+  else if (!transientID (id)) {
+    m_transientID.push_back (id);
+    std::sort (m_transientID.begin(), m_transientID.end());
+  }
+}
+
+
 /**
  * @brief Set the CLID / key.
  * @param id The new CLID.
@@ -63,7 +80,7 @@ void TransientAddress::setID (CLID id, const std::string& key)
   m_clid = id;
   m_name = key;
   if (id != CLID_NULL)
-    m_transientID.insert(id);
+    m_transientID.push_back(id);
 }
 
 /// set IOpaqueAddress
@@ -74,22 +91,41 @@ void TransientAddress::setAddress(IOpaqueAddress* pAddress)
   m_address = pAddress;
 }
 
-bool TransientAddress::isValid()
+bool TransientAddress::isValid(IProxyDict* store,
+                               bool forceUpdate /*= false*/)
 {
-  if (0 != address()) return true;
+  if (!forceUpdate && 0 != address()) return true;
 
   // FIXME CGL
 //    if (!m_consultProvider) {
 //      if ( m_clid != 0 && m_name != "" ) { return true; }
 //    }
   if (m_consultProvider && 0 != provider()) {
-    if ((provider()->updateAddress(storeID(), this)).isSuccess())
+    if ((provider()->updateAddress(storeID(), this,
+                                   contextFromStore (store))).isSuccess())
       return true;
   }
   return false;
 }
 
 
-
-
-
+/**
+ * @brief Retrieve the EventContext saved in store STORE.
+ * @param store The store from which to retrieve the context, or nullptr.
+ *
+ * If there is no context recorded in the store, return a default-initialized
+ * context.
+ */
+const EventContext& TransientAddress::contextFromStore (IProxyDict* store) const
+{
+  if (store) {
+    SG::DataProxy* proxy = store->proxy (ClassID_traits<EventContext>::ID(),
+                                         "EventContext");
+    if (proxy) {
+      EventContext* ctx = SG::DataProxy_cast<EventContext> (proxy);
+      if (ctx) return *ctx;
+    }
+  }
+  static const EventContext emptyContext;
+  return emptyContext;
+}
diff --git a/Control/SGTools/src/crc64.cxx b/Control/SGTools/src/crc64.cxx
index 6081bbec8a8c382e209084552d5ab1afa8bfe9e7..9989a888c49a3265c4c2b0498598906bf02b21ba 100755
--- a/Control/SGTools/src/crc64.cxx
+++ b/Control/SGTools/src/crc64.cxx
@@ -1,19 +1,14 @@
+/*
+ * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
+ */
 // $Id: crc64.cxx,v 1.2 2007-03-08 02:02:06 ssnyder Exp $
 /**
  * @file  SGTools/crc64.cxx
- * @author scott snyder, originally from David T. Jones
+ * @author scott snyder
  * @date Mar 2007
  * @brief A CRC-64 implementation.
- */
-/*
- * Original comments:
- * Improved calculation of CRC-64 values for protein sequences
- * By David T. Jones (dtj@cs.ucl.ac.uk)  - September 28th 2002
- * 
- * Modified from code at URL:
- * ftp://ftp.ebi.ac.uk/pub/software/swissprot/Swissknife/old/SPcrc.tar.gz
  *
- * Changed to C++ and moved into a namespace.
+ * A good reference for CRC calculations is <https://zlib.net/crc_v3.txt>.
  */
 
 
@@ -22,36 +17,33 @@
 using namespace std;
 
 
-// I don't have a citation for the source of this polynomial.
-// Maybe should replace it with the ECMA DLT poly?
+// Polynomial taken from code from David T. Jones (dtj@cs.ucl.ac.uk).
+// http://www0.cs.ucl.ac.uk/staff/D.Jones/crcnote.pdf
 #define POLY64REV     0x95AC9329AC4BC9B5ULL
 #define INITIALCRC    0xFFFFFFFFFFFFFFFFULL
 
-// Original SWISSPROT/TrEMBL poly.  Shown to be weak.
-//#define POLY64REV	0xd800000000000000ULL
-//#define INITIALCRC	0x0000000000000000ULL
-
 
 namespace {
 
 bool crc_init = false;
 uint64_t CRCTable[256];
 
+
 // Initialize the CRC table.
 void init_table()
 {
   crc_init = true;
   for (int i = 0; i < 256; i++)
   {
-    uint64_t part = i;
+    uint64_t r = i;
     for (int j = 0; j < 8; j++)
     {
-      if (part & 1)
-        part = (part >> 1) ^ POLY64REV;
+      if (r & 1)
+        r = (r >> 1) ^ POLY64REV;
       else
-        part >>= 1;
+        r >>= 1;
     }
-    CRCTable[i] = part;
+    CRCTable[i] = r;
   }
 }
 
diff --git a/Control/SGTools/test/DataBucket_test.cxx b/Control/SGTools/test/DataBucket_test.cxx
index 39cbb6f704cbb917f64313e8d24b9d06e9d64613..1ad34f1712315fde35e80f259036f99f8d0325e6 100755
--- a/Control/SGTools/test/DataBucket_test.cxx
+++ b/Control/SGTools/test/DataBucket_test.cxx
@@ -84,7 +84,7 @@ private:
 };
 int MyDataObj::count = 0;
 
-#include "SGTools/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 CLASS_DEF(MyDataObj, 8000, 3) 
 
 #include <cassert>
diff --git a/Control/SGTools/test/DataProxy_test.cxx b/Control/SGTools/test/DataProxy_test.cxx
index f0664b5296b12c3f94b094b247071c398d1907aa..110e600c2a2ed58dbddacbee91ea116a9eb7c89e 100644
--- a/Control/SGTools/test/DataProxy_test.cxx
+++ b/Control/SGTools/test/DataProxy_test.cxx
@@ -16,7 +16,7 @@
 #include "SGTools/TestStore.h"
 #include "SGTools/CurrentEventStore.h"
 #include "SGTools/T2pMap.h"
-#include "SGTools/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "AthenaKernel/IProxyDict.h"
 #include "AthenaKernel/ILockable.h"
 #include "AthenaKernel/IResetable.h"
diff --git a/Control/SGTools/test/DataStore_test.cxx b/Control/SGTools/test/DataStore_test.cxx
index 20ed7131453a23acabbd9ceb26c061da84912a5e..fc5ca4be7b1f5598976aefaf9f5f08795c8d7814 100644
--- a/Control/SGTools/test/DataStore_test.cxx
+++ b/Control/SGTools/test/DataStore_test.cxx
@@ -29,15 +29,21 @@ class TestProvider
 {
 public:
   virtual StatusCode updateAddress(StoreID::type /*storeID*/,
-				   SG::TransientAddress* /*pTAd*/)
+				   SG::TransientAddress* /*pTAd*/,
+                                   const EventContext& /*ctx*/) override
   { return StatusCode::SUCCESS; }
 };
 
 
-SG::DataProxy* make_proxy (CLID clid, const std::string& name)
+SG::DataProxy* make_proxy (CLID clid,
+                           const std::string& name,
+                           SG::sgkey_t sgkey = 0)
 {
-  SG::TransientAddress* tad = new SG::TransientAddress (clid, name);
-  return new SG::DataProxy (tad, static_cast<IConverter*>(nullptr));
+  auto tad = std::make_unique<SG::TransientAddress> (clid, name);
+  if (sgkey) {
+    tad->setSGKey (sgkey);
+  }
+  return new SG::DataProxy (std::move(tad), static_cast<IConverter*>(nullptr));
 }
 
 
@@ -66,7 +72,7 @@ void test_addToStore()
   assert (store.addToStore (123, dp1).isSuccess());
   assert (dp1->store() == &pool);
   assert (dp1->refCount() == 1);
-  assert (dp1->transientAddress()->sgkey() == sgkey);
+  assert (dp1->sgkey() == sgkey);
   assert (store.proxy_exact (sgkey) == dp1);
   assert (store.proxy (123, "dp1") == dp1);
 
@@ -80,7 +86,7 @@ void test_addToStore()
   SG::StringPool::sgkey_t sgkey2b = pool.stringToKey ("dp2", 124);
   assert (store.proxy_exact (sgkey2b) == dp2);
   assert (store.proxy_exact (sgkey2a) == 0);
-  assert (dp2->transientAddress()->sgkey() == sgkey2a);
+  assert (dp2->sgkey() == sgkey2a);
 }
 
 
@@ -101,19 +107,19 @@ void test_addAlias()
   assert (store.proxy (123, "dp1a") == dp1);
   assert (store.proxy_exact (pool.stringToKey ("dp1a", 123)) == dp1);
 
-  assert (dp1->transientAddress()->alias().count ("dp1a") == 1);
+  assert (dp1->alias().count ("dp1a") == 1);
 
   SG::DataProxy* dp2 = make_proxy (123, "dp2");
   assert (store.addToStore (123, dp2).isSuccess());
   assert (store.addAlias ("dpx", dp2).isSuccess());
   assert (dp2->refCount() == 2);
-  assert (dp2->transientAddress()->alias().count ("dpx") == 1);
+  assert (dp2->alias().count ("dpx") == 1);
 
   assert (store.addAlias ("dpx", dp1).isSuccess());
   assert (dp1->refCount() == 4);
   assert (dp2->refCount() == 1);
-  assert (dp2->transientAddress()->alias().count ("dpx") == 0);
-  assert (dp1->transientAddress()->alias().count ("dpx") == 1);
+  assert (dp2->alias().count ("dpx") == 0);
+  assert (dp1->alias().count ("dpx") == 1);
   assert (store.addAlias ("dpx", dp1).isSuccess());
   assert (dp1->refCount() == 4);
   assert (dp2->refCount() == 1);
@@ -133,8 +139,8 @@ void test_addSymLink()
 
   assert (store.proxy_exact (123, "dp1") == dp1);
   assert (store.proxy_exact (124, "dp1") == dp1);
-  assert (dp1->transientAddress()->transientID(123));
-  assert (dp1->transientAddress()->transientID(124));
+  assert (dp1->transientID(123));
+  assert (dp1->transientID(124));
 
   assert (store.addSymLink (124, dp1).isSuccess());
   assert (store.proxy_exact (124, "dp1") == dp1);
@@ -142,7 +148,7 @@ void test_addSymLink()
   SG::DataProxy* dp2 = make_proxy (125, "dp1");
   assert (store.addToStore (125, dp2).isSuccess());
   assert (store.addSymLink (125, dp1).isFailure());
-  assert (!dp1->transientAddress()->transientID(125));
+  assert (!dp1->transientID(125));
 }
 
 
@@ -346,7 +352,7 @@ void test_keys()
   assert (store.addToStore (125, dp3).isSuccess());
   assert (store.addToStore (125, dp4).isSuccess());
   TestProvider prov;
-  dp4->transientAddress()->setProvider (&prov, StoreID::SPARE_STORE);
+  dp4->setProvider (&prov, StoreID::SPARE_STORE);
 
   store.keys (125, v, true, false);
   assert (v.size() == 2);
@@ -485,8 +491,7 @@ void test_dummy()
 
   SG::StringPool::sgkey_t sgkey = pool.stringToKey ("dp1", 456);
 
-  SG::DataProxy* dp1 = make_proxy (0, "");
-  dp1->transientAddress()->setSGKey (sgkey);
+  SG::DataProxy* dp1 = make_proxy (0, "", sgkey);
   assert (store.addToStore (0, dp1).isSuccess());
   assert (dp1->refCount() == 1);
   assert (store.proxy_exact (sgkey) == dp1);
@@ -497,8 +502,7 @@ void test_dummy()
   assert (dp1->refCount() == 1);
 
   SG::StringPool::sgkey_t sgkey2 = pool.stringToKey ("dp2", 456);
-  SG::DataProxy* dp2 = make_proxy (0, "");
-  dp2->transientAddress()->setSGKey (sgkey2);
+  SG::DataProxy* dp2 = make_proxy (0, "", sgkey2);
   assert (store.addToStore (0, dp2).isSuccess());
   assert (dp2->refCount() == 1);
   assert (store.proxy_exact (sgkey2) == dp2);
diff --git a/Control/SGTools/test/TransientAddress_test.cxx b/Control/SGTools/test/TransientAddress_test.cxx
index 3a58bbb610477ebdf37beaad415af2af906093ed..a74cfcf874a621ba560ad5a346a2708ada458b4d 100644
--- a/Control/SGTools/test/TransientAddress_test.cxx
+++ b/Control/SGTools/test/TransientAddress_test.cxx
@@ -51,7 +51,8 @@ class TestProvider
 {
 public:
   virtual StatusCode updateAddress(StoreID::type /*storeID*/,
-				   SG::TransientAddress* /*pTAd*/)
+				   SG::TransientAddress* /*pTAd*/,
+                                   const EventContext& /*ctx*/) override
   { return StatusCode::SUCCESS; }
 };
 
@@ -81,7 +82,7 @@ void test1()
   assert (tad1.name() == "");
   assert (tad1.transientID().size() == 0);
   assert (tad1.alias().size() == 0);
-  assert (!tad1.isValid());
+  assert (!tad1.isValid(nullptr));
   assert (tad1.provider() == 0);
   assert (tad1.storeID() == StoreID::UNKNOWN);
   assert (tad1.address() == 0);
@@ -97,7 +98,7 @@ void test1()
   assert (tad2.clID() == 123);
   assert (tad2.transientID().size() == 1);
   assert (tad2.alias().size() == 0);
-  assert (!tad2.isValid());
+  assert (!tad2.isValid(nullptr));
   assert (tad2.provider() == 0);
   assert (tad2.storeID() == StoreID::UNKNOWN);
   assert (tad2.address() == 0);
@@ -115,9 +116,14 @@ void test1()
   tad2.setAlias ("key2");
   assert (tad2.alias().size() == 1);
   std::set<std::string> a;
-  a.insert ("key3");
-  a.insert ("key4");
-  tad2.setAlias (a);
+  a.insert ("key3a");
+  a.insert ("key4a");
+  tad2.setAlias (std::move(a));
+  assert (a.size() == 0);
+  assert (tad2.alias().size() == 2);
+  assert (tad2.alias().count ("key2") == 0);
+  assert (tad2.alias().count ("key3a") == 1);
+  tad2.setAlias (std::set<std::string> {"key3", "key4"});
   assert (tad2.alias().size() == 2);
   assert (tad2.alias().count ("key2") == 0);
   assert (tad2.alias().count ("key3") == 1);
@@ -129,38 +135,38 @@ void test1()
   SG::TransientAddress tad3 (123, "key", &ad1);
   assert (tad3.name() == "key");
   assert (tad3.clID() == 123);
-  assert (tad3.isValid());
+  assert (tad3.isValid(nullptr));
   assert (tad3.provider() == 0);
   assert (tad3.storeID() == StoreID::UNKNOWN);
   assert (tad3.address() == &ad1);
 
   TestAddress ad2(2);
   tad3.setAddress (&ad2);
-  assert (tad3.isValid());
+  assert (tad3.isValid(nullptr));
   assert (tad3.address() == &ad2);
   tad3.reset();
-  assert (!tad3.isValid());
+  assert (!tad3.isValid(nullptr));
   assert (tad3.address() == 0);
 
   tad3.setAddress (&ad2);
   tad3.clearAddress (false);
   tad3.reset();
-  assert (tad3.isValid());
+  assert (tad3.isValid(nullptr));
   assert (tad3.address() == &ad2);
   tad3.clearAddress (true);
   tad3.reset();
-  assert (!tad3.isValid());
+  assert (!tad3.isValid(nullptr));
   assert (tad3.address() == 0);
 
   TestProvider tp;
   tad3.setProvider (&tp, StoreID::SPARE_STORE);
   assert (tad3.provider() == &tp);
   assert (tad3.storeID() == StoreID::SPARE_STORE);
-  assert (tad3.isValid());
+  assert (tad3.isValid(nullptr));
   tad3.consultProvider (false);
-  assert (!tad3.isValid());
+  assert (!tad3.isValid(nullptr));
   tad3.consultProvider (true);
-  assert (tad3.isValid());
+  assert (tad3.isValid(nullptr));
 
   SG::TransientAddress tad4(0, "");
   assert (tad4.clID() == CLID_NULL);
diff --git a/Control/SGTools/test/crc64_test.cxx b/Control/SGTools/test/crc64_test.cxx
index b97ad615c93f8498b5152656b67da4b2869d9727..b5d0400d5c71bba74efc10f1b67e5cc062dcc374 100755
--- a/Control/SGTools/test/crc64_test.cxx
+++ b/Control/SGTools/test/crc64_test.cxx
@@ -5,7 +5,7 @@
 // $Id: crc64_test.cxx,v 1.2 2007-03-08 02:02:06 ssnyder Exp $
 /**
  * @file  SGTools/crc64_test.cxx
- * @author scott snyder, originally from David T. Jones
+ * @author scott snyder
  * @date Mar 2007
  * @brief Regression tests for CRC-64 calculation.
  */
@@ -33,10 +33,10 @@ void testextend (const std::string& str, unsigned int x)
 
 int main()
 {
-  const char* testin1 = "MNIIQGNLVGTGLKIGIVVGRFNDFITSKLLSGAEDALLRHGVDTNDIDVAWVPGAFEIPFAAKKMAETKKYDAIITLGTVIRGATTSYDYVCNEAAKGIAQAANTTGVPVIFGIVTTENIEQAIERAGTKAGNKGVDCAVSAIEMANLNRSFE";
-  const char* testout1 = "C874767DA8254746";
-  const char* testin2 = "MNIIQGNLVGTGLKIGIVVGRFNDFITSKLLSGAEDALLRHGVDTNDIDVAWVPGAFEIPFAAKKMAETKKYDAIITLGDVIRGATTHYDYVCNEAAKGIAQAANTTGVPVIFGIVTTENIEQAIERAGTKAGNKGVDCAVSAIEMANLNRSFE"; /* Differs from 1st seq in two places */
-  const char* testout2 = "2DF1AA17420FCA3F";
+  const char* testin1 = "alkdkjasldjaldjalkdjaldjoqiwj;lknnfaoiuuhewfuasuhfaiuuhffiuuhaffoiuahfefiuauheofiuhapkjjjhdhfpiauw3hpkjajshhdfpkkuawheoiuahwefpiuawhfeiauehfpiauwehfpawieufhpaw";
+  const char* testout1 = "047BDD061CE68225";
+  const char* testin2 = "alkdkjasldjaldjalkdjalejoqiwj;lknnfaoiuuhewfuasuhfaiuuhffiuuhaffoiuahfefiuauheofiuhapkjjjhdhfpiauw2hpkjajshhdfpkkuawheoiuahwefpiuawhfeiauehfpiauwehfpawieufhpaw"; // DIffers from 1st in two bits.
+  const char* testout2 = "6051B184A58A80C6";
 
   assert (SG::crc64digest (testin1) == std::string (testout1));
   assert (SG::crc64digest (testin2) == std::string (testout2));
diff --git a/Control/SGTools/test/safe_clid_test.cxx b/Control/SGTools/test/safe_clid_test.cxx
index c5a042c6e9c642e8a169dd831852150bfb0833f0..7f4578f4f728d268862da8fdea9fa7da74dddba1 100755
--- a/Control/SGTools/test/safe_clid_test.cxx
+++ b/Control/SGTools/test/safe_clid_test.cxx
@@ -5,7 +5,7 @@
 #undef NDEBUG
 
 #include "SGTools/safe_clid.h"
-#include "SGTools/CLASS_DEF.h"
+#include "AthenaKernel/CLASS_DEF.h"
 #include "GaudiKernel/DataObject.h"
 #include <cassert>
 
diff --git a/Control/StoreGate/CMakeLists.txt b/Control/StoreGate/CMakeLists.txt
index 228646c34fc81bea15ac7057a6a5f8f2e83e6796..28d544bbb77e61ab92737df44c73a90de793d5a0 100644
--- a/Control/StoreGate/CMakeLists.txt
+++ b/Control/StoreGate/CMakeLists.txt
@@ -147,25 +147,25 @@ atlas_add_test( DecorKeyHelpers_test
 atlas_add_test( ReadDecorHandleKey_test
    SOURCES test/ReadDecorHandleKey_test.cxx
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} 
-   LINK_LIBRARIES StoreGateLib
+   LINK_LIBRARIES StoreGateLib TestTools
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
 atlas_add_test( WriteDecorHandleKey_test
    SOURCES test/WriteDecorHandleKey_test.cxx
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} 
-   LINK_LIBRARIES StoreGateLib
+   LINK_LIBRARIES StoreGateLib TestTools
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
 atlas_add_test( ReadDecorHandle_test
    SOURCES test/ReadDecorHandle_test.cxx
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} 
-   LINK_LIBRARIES StoreGateLib AthContainers
+   LINK_LIBRARIES StoreGateLib AthContainers TestTools
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
 atlas_add_test( WriteDecorHandle_test
    SOURCES test/WriteDecorHandle_test.cxx
    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} 
-   LINK_LIBRARIES StoreGateLib AthContainers
+   LINK_LIBRARIES StoreGateLib AthContainers TestTools
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
 # Install files from the package:
diff --git a/Control/StoreGate/StoreGate/MetaHandleKey.h b/Control/StoreGate/StoreGate/MetaHandleKey.h
new file mode 100644
index 0000000000000000000000000000000000000000..660b31c4fdbe9fd2fa4d42569126987afdb313d0
--- /dev/null
+++ b/Control/StoreGate/StoreGate/MetaHandleKey.h
@@ -0,0 +1,66 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef STOREGATE_METAHANDLEKEY_H
+#define STOREGATE_METAHANDLEKEY_H 1
+
+#include "AthenaKernel/MetaCont.h"
+#include "StoreGate/VarHandleKey.h"
+#include "StoreGate/StoreGateSvc.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/MsgStream.h"
+#include "PersistentDataModel/DataHeader.h"
+
+namespace SG {
+
+  template <class T>
+  class MetaHandleKey : public VarHandleKey {
+
+  public:
+    MetaHandleKey( const std::string& key,
+                   const std::string& dbKey,
+                   Gaudi::DataHandle::Mode a );
+
+    template <class OWNER, class K,
+              typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
+    inline MetaHandleKey( OWNER* owner,
+                          std::string name,
+                          const K& key={},
+                          std::string doc="") :
+      MetaHandleKey<T>( key ) {
+      auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
+      p->template setOwnerType<OWNER>();
+    }
+
+//    MetaHandleKey& operator= (const std::string& sgkey);
+
+    StatusCode initialize();
+
+    const MetaContBase::SourceID& dbKey() const { return m_dbKey; }
+    void setDbKey(const MetaContBase::SourceID& dbKey) { m_dbKey = dbKey; }
+
+  protected:
+    bool isInit() const { return m_isInit; }
+
+    MetaCont<T>* getContainer() const { return m_cont; }
+
+    StoreGateSvc* getStore() const;
+
+  private:
+
+    ServiceHandle<StoreGateSvc> m_store;
+    MetaCont<T>* m_cont{0};
+
+    MetaContBase::SourceID m_dbKey{""};
+
+    bool m_isInit {false};
+
+  };
+
+
+}
+
+#include "StoreGate/MetaHandleKey.icc"
+
+#endif
diff --git a/Control/StoreGate/StoreGate/MetaHandleKey.icc b/Control/StoreGate/StoreGate/MetaHandleKey.icc
new file mode 100644
index 0000000000000000000000000000000000000000..328a43ab4759a5a41a4b886a081aa47d92d3f1ad
--- /dev/null
+++ b/Control/StoreGate/StoreGate/MetaHandleKey.icc
@@ -0,0 +1,107 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+namespace SG {
+  
+  template <class T>
+  MetaHandleKey<T>::MetaHandleKey(const std::string& key, 
+                                  const std::string& dbKey,
+                                  Gaudi::DataHandle::Mode mode ) :
+    VarHandleKey(ClassID_traits<T>::ID(), key, mode,
+                 "StoreGateSvc/MetaDataStore"),
+    m_store("StoreGateSvc/MetaDataStore","MetaHandleKey"),
+    m_dbKey(dbKey)
+  {}
+
+  //------------------------------------------------------------------------  
+  
+  template <class T>
+  StatusCode
+  MetaHandleKey<T>::initialize() {
+    if (m_isInit) return StatusCode::SUCCESS;
+    
+
+    if (VarHandleKey::initialize() != StatusCode::SUCCESS) {
+      return StatusCode::FAILURE;
+    }
+
+    if (!m_store.isValid()) {
+      MsgStream msg(Athena::getMessageSvc(), "MetaHandleKey");
+      msg << MSG::ERROR 
+          << "MetaHandleKey::initialize() :Unable to locate MetaDataStore " 
+          << m_store.name()
+          << endmsg;
+      return StatusCode::FAILURE;
+    }
+
+
+    // If container does not exist, then create it in the store
+    //   otherwise cache pointer to container    
+    if (m_store->contains< MetaCont<T> > (Gaudi::DataHandle::objKey())) {      
+      if (m_store->retrieve(m_cont, Gaudi::DataHandle::objKey()).isFailure()) {
+        MsgStream msg(Athena::getMessageSvc(), "MetaHandleKey");
+        msg << MSG::ERROR 
+            << "MetaHandleKey::init(): unable to retrieve MetaCont of "
+            << Gaudi::DataHandle::fullKey() << " from MetaDataStore" 
+            << endmsg;
+        return StatusCode::FAILURE;
+      }
+    } else {
+      m_cont = new MetaCont<T>(Gaudi::DataHandle::fullKey());
+      if (m_store->record(m_cont, Gaudi::DataHandle::objKey()).isFailure()) {
+        MsgStream msg(Athena::getMessageSvc(), "MetaHandleKey");
+        msg << MSG::ERROR 
+            << "MetaHandleKey::init(): unable to record empty MetaCont of " 
+            << Gaudi::DataHandle::fullKey() << " in MetaDataStore" << endmsg;
+        delete m_cont;
+        m_cont = 0;
+        return StatusCode::FAILURE;
+      }
+    }
+
+    // Retrieve the guid/SID from the data header
+    const DataHeader* thisDH;
+    ServiceHandle<StoreGateSvc> instore("StoreGateSvc/InputMetaDataStore","MetaHandleKey");
+    if (instore.retrieve().isFailure()) return StatusCode::FAILURE;
+    if(instore->retrieve(thisDH)!=StatusCode::SUCCESS) {
+      MsgStream msg(Athena::getMessageSvc(), "MetaHandleKey");
+      msg << MSG::ERROR << "Unable to get DataHeader" << endmsg;
+      msg << instore->dump() << endmsg;
+      return StatusCode::FAILURE;
+    }
+    // Get string guid for SourceID
+    m_dbKey = thisDH->begin()->getToken()->dbID().toString();
+
+    // if you can't get the sid, then this won't work, so fail
+    if (m_dbKey.size()==0) {
+      MsgStream msg(Athena::getMessageSvc(), "MetaHandleKey");
+      msg << MSG::ERROR << "Unable to get source id from dataheader" << endmsg;
+      return StatusCode::FAILURE;
+    }
+
+    m_isInit = true;
+
+    return StatusCode::SUCCESS;
+
+  }
+
+  //------------------------------------------------------------------------
+
+  template <class T>
+  StoreGateSvc* 
+  MetaHandleKey<T>::getStore() const {
+    if (!m_store.isValid()) {
+      MsgStream msg(Athena::getMessageSvc(), "MetaHandleKey");
+      msg << MSG::ERROR 
+          << "MetaHandleKey::getStore() : Unable to locate MetaDataStore" 
+          << endmsg;
+      return 0;
+    }
+
+    return m_store.get();
+  }
+
+
+}
diff --git a/Control/StoreGate/StoreGate/ReadCondHandle.h b/Control/StoreGate/StoreGate/ReadCondHandle.h
index 73eff2450617c17303b587faff950e0aa8ca5455..ae81e5c1bdbf9b4d521b1c66da2d5c990206a250 100644
--- a/Control/StoreGate/StoreGate/ReadCondHandle.h
+++ b/Control/StoreGate/StoreGate/ReadCondHandle.h
@@ -8,6 +8,7 @@
 #include "AthenaKernel/getMessageSvc.h"
 #include "AthenaKernel/CondCont.h"
 #include "AthenaKernel/IOVEntryT.h"
+#include "AthenaKernel/ExtendedEventContext.h"
 
 #include "StoreGate/VarHandleBase.h"
 #include "StoreGate/ReadHandle.h"
@@ -61,7 +62,8 @@ namespace SG {
         
     EventIDBase m_eid;
     CondCont<T>*  m_cc {nullptr};
-    const IOVEntryT<T> * m_ent {nullptr};
+    const T* m_obj { nullptr };
+    EventIDRange m_range;
     
     const SG::ReadCondHandleKey<T>& m_hkey;
   };
@@ -85,14 +87,13 @@ namespace SG {
     m_cc( key.getCC() ),
     m_hkey(key)
   {
-    // FIXME: propagate input dependency?
-    SG::ReadHandleKey<AthenaAttributeList> inputKey ("Input");
-    inputKey.initialize().ignore();
-    SG::ReadHandle<AthenaAttributeList> input (inputKey, ctx);
-    if (input.isValid()) {
-      if (input->exists ("ConditionsRun"))
-        m_eid.set_run_number ((*input)["ConditionsRun"].data<unsigned int>());
+    EventIDBase::number_type conditionsRun =
+      ctx.template getExtension<Atlas::ExtendedEventContext>()->conditionsRun();
+    if (conditionsRun != EventIDBase::UNDEFNUM) {
+      m_eid.set_run_number (conditionsRun);
     }
+    // Event number not used in IOV comparisons, only run+lbn.
+    m_eid.set_event_number (EventIDBase::UNDEFEVT);
 
     if (! m_hkey.isInit()) {
       MsgStream msg(Athena::getMessageSvc(), "ReadCondHandle");
@@ -118,9 +119,9 @@ namespace SG {
   bool
   ReadCondHandle<T>::initCondHandle() {
 
-    if (m_ent != 0) return true;
+    if (m_obj != 0) return true;
 
-    if ( ! m_cc->findEntry(m_eid, m_ent) ) {
+    if ( ! m_cc->find(m_eid, m_obj, &m_range) ) {
       std::ostringstream ost;
       m_cc->list(ost);
       MsgStream msg(Athena::getMessageSvc(), "ReadCondHandle");
@@ -129,7 +130,7 @@ namespace SG {
           << m_eid  << " for key " << objKey() << "\n"
           << ost.str()
           << endmsg;
-      m_ent = nullptr;
+      m_obj = nullptr;
       return false;
     }
 
@@ -142,7 +143,7 @@ namespace SG {
   const T*
   ReadCondHandle<T>::retrieve() {
     
-    if (m_ent == 0) {
+    if (m_obj == 0) {
       if (!initCondHandle()) {
       // std::ostringstream ost;
       // m_cc->list(ost);
@@ -156,9 +157,7 @@ namespace SG {
       }
     }
 
-    const_pointer_type cobj = 
-      const_cast<const_pointer_type>( m_ent->objPtr() );      
-    return cobj;
+    return m_obj;
   }
 
   //---------------------------------------------------------------------------
@@ -212,13 +211,13 @@ namespace SG {
   bool 
   ReadCondHandle<T>::range(EventIDRange& r) {
 
-    if (m_ent == 0) {
+    if (m_obj == 0) {
       if (!initCondHandle()) {
         return false;
       }
     }
 
-    r = m_ent->range();
+    r = m_range;
     return true;
   }
 
diff --git a/Control/StoreGate/StoreGate/ReadCondHandleKey.h b/Control/StoreGate/StoreGate/ReadCondHandleKey.h
index f0a74595c58378b1e4ae573cb55a7d304d1e0226..a6703869139d8f74d52829e89d3da7f3d76247d8 100644
--- a/Control/StoreGate/StoreGate/ReadCondHandleKey.h
+++ b/Control/StoreGate/StoreGate/ReadCondHandleKey.h
@@ -26,6 +26,30 @@ namespace SG {
       CondHandleKey<T>(key, dbKey, Gaudi::DataHandle::Reader)
     {}    
 
+
+  /**
+   * @brief auto-declaring Property Constructor.
+   * @param name name of the Property
+   * @param key The StoreGate key for the object
+   * @param doc documentation string
+   *
+   * will associate the named Property with this RHK via declareProperty
+   *
+   * The provided key may actually start with the name of the store,
+   * separated by a "+":  "MyStore+Obj".  If no "+" is present
+   * the store named by @c storeName is used.   
+   */
+  template <class OWNER, class K,
+            typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
+  inline ReadCondHandleKey( OWNER* owner,
+                            std::string name,
+                            const K& key={},
+                            std::string doc="") :
+    ReadCondHandleKey<T>( key ) {
+    auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
+    p->template setOwnerType<OWNER>();
+  }
+
 };
 
 
diff --git a/Control/StoreGate/StoreGate/ReadDecorHandle.h b/Control/StoreGate/StoreGate/ReadDecorHandle.h
index e49050f8d319bb38fd15612760953eea72792200..025ca9964e6efa70da33b04a2b69a48c53245032 100644
--- a/Control/StoreGate/StoreGate/ReadDecorHandle.h
+++ b/Control/StoreGate/StoreGate/ReadDecorHandle.h
@@ -155,6 +155,17 @@ public:
   ReadDecorHandle& operator= (ReadDecorHandle&& rhs);
 
   
+  /**
+   * @brief Is the referenced container present in SG?
+   *
+   * Note that this tests for the presence of the _container_,
+   * not for the decoration.
+   *
+   * Const method; the handle does not change as a result of this.
+   */
+  bool isPresent() const;
+
+
   /**
    * @brief Fetch the variable for one element, as a const reference.
    * @param e The element for which to fetch the variable.
diff --git a/Control/StoreGate/StoreGate/ReadDecorHandle.icc b/Control/StoreGate/StoreGate/ReadDecorHandle.icc
index fbd154fa90f43e9e317bfb1d3bfd35dd894df338..baa1eaa71ab836019d1eb6b7b74bd932d7edad96 100644
--- a/Control/StoreGate/StoreGate/ReadDecorHandle.icc
+++ b/Control/StoreGate/StoreGate/ReadDecorHandle.icc
@@ -98,6 +98,21 @@ ReadDecorHandle<T, D>& ReadDecorHandle<T, D>::operator= (ReadDecorHandle&& rhs)
 }
 
 
+/**
+ * @brief Is the referenced container present in SG?
+ *
+ * Note that this tests for the presence of the _container_,
+ * not for the decoration.
+ *
+ * Const method; the handle does not change as a result of this.
+ */
+template <class T, class D>
+bool ReadDecorHandle<T, D>::isPresent() const
+{
+  return this->isPresent_impl (contKeyFromKey (this->key()));
+}
+
+
 /**
  * @brief Fetch the variable for one element, as a const reference.
  * @param e The element for which to fetch the variable.
diff --git a/Control/StoreGate/StoreGate/ReadHandleKey.h b/Control/StoreGate/StoreGate/ReadHandleKey.h
index f19822016ccf1e435b9bb4a6498b8e2c0fca684d..eef636938d68d507fe830b830b38ef49840d0427 100644
--- a/Control/StoreGate/StoreGate/ReadHandleKey.h
+++ b/Control/StoreGate/StoreGate/ReadHandleKey.h
@@ -51,7 +51,28 @@ public:
   ReadHandleKey (const std::string& key = "",
                  const std::string& storeName = StoreID::storeName(StoreID::EVENT_STORE));
 
-
+  /**
+   * @brief auto-declaring Property Constructor.
+   * @param name name of the Property
+   * @param key  default StoreGate key for the object.
+   *
+   * will associate the named Property with this RHK via declareProperty
+   *
+   * The provided key may actually start with the name of the store,
+   * separated by a "+":  "MyStore+Obj".  If no "+" is present
+   * the store named by @c storeName is used.
+   */
+  template <class OWNER, class K,
+            typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
+  inline ReadHandleKey( OWNER* owner,
+                        std::string name,
+                        const K& key={},
+                        std::string doc="") :
+    ReadHandleKey<T>( key ) {
+    auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
+    p->template setOwnerType<OWNER>();
+  }
+      
   /**
    * @brief Change the key of the object to which we're referring.
    * @param sgkey The StoreGate key for the object.
diff --git a/Control/StoreGate/StoreGate/ReadHandleKeyArray.h b/Control/StoreGate/StoreGate/ReadHandleKeyArray.h
index 7bfa2dc5635259298fe2b0cf6f6435486d768fdc..eba55f86312c65d868a45816e7d22e0758ad0712 100644
--- a/Control/StoreGate/StoreGate/ReadHandleKeyArray.h
+++ b/Control/StoreGate/StoreGate/ReadHandleKeyArray.h
@@ -65,6 +65,26 @@ namespace SG {
     ReadHandleKeyArray( std::initializer_list<std::string> l ):
       VarHandleKeyArrayCommon<ReadHandleKey<T>> {l} {};
 
+    /**
+     * @brief auto-declaring Property Constructor from a ReadHandleKeyArray 
+     * that takes an initializer list of std::strings, and associates the RHKA
+     * with the specified Property name
+     * @param name name of Property
+     * @param l initializer list of std::strings used to create the
+     *          ReadHandleKeys
+     * @param doc documentation string
+     */
+    template <class OWNER, 
+              typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
+    inline ReadHandleKeyArray( OWNER* owner,
+                               std::string name,
+                               std::initializer_list<std::string> l,
+                               std::string doc="") :
+      VarHandleKeyArrayCommon<ReadHandleKey<T>> {l} {
+      auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
+      p->template setOwnerType<OWNER>();
+    }
+
     /**
      * @brief return the type (Read/Write/Update) of handle
      */
diff --git a/Control/StoreGate/StoreGate/ReadMetaHandle.h b/Control/StoreGate/StoreGate/ReadMetaHandle.h
new file mode 100644
index 0000000000000000000000000000000000000000..d0a0e2298abbc3333a7c88fd4f83982e5db6ba48
--- /dev/null
+++ b/Control/StoreGate/StoreGate/ReadMetaHandle.h
@@ -0,0 +1,190 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef STOREGATE_READMETAHANDLE_H
+#define STOREGATE_READMETAHANDLE_H 1
+
+#include "AthenaKernel/getMessageSvc.h"
+#include "AthenaKernel/MetaCont.h"
+
+#include "StoreGate/VarHandleBase.h"
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/ReadMetaHandleKey.h"
+
+#include "GaudiKernel/DataHandle.h"
+#include "GaudiKernel/DataObjID.h"
+#include "GaudiKernel/EventContext.h"
+#include "GaudiKernel/ThreadLocalContext.h"
+
+#include <string>
+#include <stdexcept>
+
+
+namespace SG {
+
+  template <typename T>
+  class ReadMetaHandle : public SG::VarHandleBase {
+
+  public: 
+    typedef T*               pointer_type; // FIXME: better handling of
+    typedef const T*   const_pointer_type; //        qualified T type ?
+    typedef T&             reference_type;
+    typedef const T& const_reference_type;
+
+  public:
+    ReadMetaHandle(const SG::ReadMetaHandleKey<T>& key);
+    ReadMetaHandle(const SG::ReadMetaHandleKey<T>& key, 
+                   const EventContext& ctx);
+    
+    virtual ~ReadMetaHandle() override {};
+    
+    // retrieve <T> for current SID in data header
+    const_pointer_type retrieve();
+    // retrieve <T> for specified SID
+    const_pointer_type retrieve( const MetaContBase::SourceID& t);
+
+    const_pointer_type  operator->()  { return  retrieve(); }
+    const_pointer_type  operator*()   { return  retrieve(); }   
+
+    
+    virtual bool isValid() override;
+
+  private:
+
+    bool initMetaHandle();
+        
+    // current SID
+    MetaContBase::SourceID m_sid;
+    // pinter to container
+    MetaCont<T>*  m_cont {nullptr};
+    // pointer to object in container for current SID
+    T* m_ent {nullptr};
+    
+    const SG::ReadMetaHandleKey<T>& m_hkey;
+  };
+
+
+  //------------------------------------------------------------------------
+
+  template <typename T>
+  ReadMetaHandle<T>::ReadMetaHandle(const SG::ReadMetaHandleKey<T>& key):
+  ReadMetaHandle(key, Gaudi::Hive::currentContext())
+  { 
+  }
+
+  //------------------------------------------------------------------------
+
+  template <typename T>
+  ReadMetaHandle<T>::ReadMetaHandle(const SG::ReadMetaHandleKey<T>& key,
+                                    const EventContext& ctx):
+    SG::VarHandleBase( key, &ctx ),
+    m_sid( "" ),
+    m_cont( key.getContainer() ),
+    m_hkey(key)
+  {
+    if (! m_hkey.isInit()) {
+      MsgStream msg(Athena::getMessageSvc(), "ReadMetaHandle");
+      msg << MSG::ERROR 
+          << "ReadMetaHandleKey " << key.objKey() << " was not initialized"
+          << endmsg;
+      throw std::runtime_error("ReadMetaHandle: ReadMetaHandleKey was not initialized");
+    }
+
+    if (m_cont == 0) {
+      MsgStream msg(Athena::getMessageSvc(), "ReadMetaHandle");
+      msg << MSG::ERROR
+          << "ReadMetaHandle : ptr to MetaCont<T> is zero"
+          << endmsg;
+      throw std::runtime_error("ReadMetaHandle: ptr to MetaCont<T> is zero");
+    }
+  
+  }
+
+  //------------------------------------------------------------------------
+
+  template <typename T>
+  bool
+  ReadMetaHandle<T>::initMetaHandle() 
+  {
+
+    if (m_ent != 0) return true;
+
+    // Initialize sid from dbKey found at ReadMetaHandleKey initialize
+    m_sid = m_hkey.dbKey();
+
+    if ( ! m_cont->find(m_sid, m_ent) ) {
+      std::ostringstream ost;
+      MsgStream msg(Athena::getMessageSvc(), "ReadMetaHandle");
+      msg << MSG::ERROR 
+          << "ReadMetaHandle: could not find current SourceID " 
+          << m_sid  << " for key " << objKey() << "\n"
+          << endmsg;
+      m_ent = nullptr;
+      return false;
+    }
+
+    return true;
+  }
+
+  //------------------------------------------------------------------------
+
+  template <typename T>
+  const T*
+  ReadMetaHandle<T>::retrieve() 
+  {
+    
+    if (m_ent == 0) {
+      if (!initMetaHandle()) {
+        return nullptr;
+      }
+    }
+
+    const_pointer_type cobj = 
+      const_cast<const_pointer_type>( m_ent );      
+    return cobj;
+  }
+
+  //------------------------------------------------------------------------
+
+  template <typename T>
+  const T*
+  ReadMetaHandle<T>::retrieve(const MetaContBase::SourceID& sid) 
+  {
+    if (sid == m_sid) {
+      return retrieve();
+    }
+
+    pointer_type obj(0);
+    if (! (m_cont->find(sid, obj) ) ) {
+      std::ostringstream ost;
+      m_cont->list(ost);
+      MsgStream msg(Athena::getMessageSvc(), "ReadMetaHandle");
+      msg << MSG::ERROR 
+          << "ReadMetaHandle::retrieve() could not find SourceID " 
+          << sid  << " for key " << objKey() << "\n"
+          << "Container contents: \n" 
+          << ost.str()
+          << "\n Done" 
+          << endmsg;
+      return nullptr;
+    }
+  
+    const_pointer_type cobj = const_cast<const_pointer_type>( obj );
+
+    return cobj;
+  }
+
+  //---------------------------------------------------------------------------
+
+  template <typename T>
+  bool 
+  ReadMetaHandle<T>::isValid()  {
+
+    return initMetaHandle();
+  }
+
+}
+
+#endif
+  
diff --git a/Control/StoreGate/StoreGate/ReadMetaHandleKey.h b/Control/StoreGate/StoreGate/ReadMetaHandleKey.h
new file mode 100644
index 0000000000000000000000000000000000000000..7b4a2b144eea9807086b27935fce1932ecbf0a88
--- /dev/null
+++ b/Control/StoreGate/StoreGate/ReadMetaHandleKey.h
@@ -0,0 +1,34 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef STOREGATE_READMETAHANDLEKEY_H
+#define STOREGATE_READMETAHANDLEKEY_H
+
+#include "StoreGate/MetaHandleKey.h"
+#include <string>
+
+
+namespace SG {
+
+  template <class T>
+  class ReadMetaHandle;
+
+  template <class T>
+  class ReadMetaHandleKey
+    : public MetaHandleKey<T>
+  {      
+  public:
+    
+    friend class ReadMetaHandle<T>;
+        
+    ReadMetaHandleKey (const std::string& key, const std::string& dbKey="") :
+      MetaHandleKey<T>(key, dbKey, Gaudi::DataHandle::Reader)
+    {}    
+
+};
+
+
+} // namespace SG
+
+#endif // not STOREGATE_READMETAHANDLEKEY_H
diff --git a/Control/StoreGate/StoreGate/StoreGateSvc.h b/Control/StoreGate/StoreGate/StoreGateSvc.h
index 1afbdb94f3293b2bc2cc0931ec65b04afd66f2dc..0f16604866ee42355e04fa2db1ae6a6b89eff464 100644
--- a/Control/StoreGate/StoreGate/StoreGateSvc.h
+++ b/Control/StoreGate/StoreGate/StoreGateSvc.h
@@ -98,8 +98,6 @@ class IOVDbSvc;
 class IOVSvc;
 class IOVSvcTool;
 class PileUpMergeSvc;
-class EventDumperSvc;
-class MemoryMonitorSvc;
 class SGDeleteAlg;
 class ThinningSvc;
 class ActiveStoreSvc;
@@ -706,6 +704,9 @@ public:
   /// return the list of all current proxies in store
   virtual std::vector<const SG::DataProxy*> proxies() const override final;
 
+  /// Return all CLIDs in the store.
+  std::vector<CLID> clids() const;
+
   /// get proxy with given id and key. Does not query ProxyProviderSvc.
   ///  @returns 0 to flag failure
   SG::DataProxy* transientProxy(const CLID& id, const std::string& key) const;
@@ -911,6 +912,8 @@ private:
   void releaseObject(const CLID& id, const std::string& key);
 
 
+  /// access emptyTrash
+  friend class PileUpMergeSvc;
   ///access  clearProxyPayload
   friend class IOVDbSvc;
   friend class IOVSvcTool;
@@ -924,13 +927,6 @@ private:
   /// Unlike DataProxy::reset this method correctly updates SGSvc internals
   void clearProxyPayload(SG::DataProxy*);
 
-  ///access store()
-  friend class CondSvc;
-  friend class IOVSvc;              // FIXME
-  friend class PileUpMergeSvc;      // FIXME needs to call tRange
-  friend class EventDumperSvc;
-  friend class MemoryMonitorSvc;
-  friend void testHLTAutoKeyReset(StoreGateSvc&, IProxyProviderSvc&);
   ///access typeless_record
   friend class ThinningSvc;
   friend class SG::VarHandleBase;
@@ -951,10 +947,6 @@ private:
                                  bool noHist=false,
                                  const std::type_info* tinfo=0);
 
-  //FIXME need to add wrapper like this class, to make relevant DataStore methods thread-safe
-  ///thread UNSAFE access to underlying DataStore. Use at your own risk
-  const SG::DataStore* store() const { return currentStore()->store(); }
-  SG::DataStore* store() { return currentStore()->store(); } ///< DEPRECATED                                                   
   bool isSymLinked(const CLID& linkID, SG::DataProxy* dp);
 
   StatusCode addSymLink(const CLID& linkid, SG::DataProxy* dp);
diff --git a/Control/StoreGate/StoreGate/UpdateHandle.icc b/Control/StoreGate/StoreGate/UpdateHandle.icc
index 05cc6e3cc4a216a14835ce40da5a9d725ebdc907..81e7c333e45c493dae5a045b6e9e7608d35100cb 100644
--- a/Control/StoreGate/StoreGate/UpdateHandle.icc
+++ b/Control/StoreGate/StoreGate/UpdateHandle.icc
@@ -30,7 +30,7 @@ namespace SG {
 template <class T>
 inline
 UpdateHandle<T>::UpdateHandle() 
-  : VarHandleBase(ClassID_traits<T>::ID(), Gaudi::DataHandle::Updater),
+  : VarHandleBase(ClassID_traits<T>::ID(), Gaudi::DataHandle::Reader),
     m_updated(false)
 {
 }
@@ -46,7 +46,7 @@ inline
 UpdateHandle<T>::UpdateHandle(const std::string& sgkey,
                               const std::string& storename /*= "StoreGateSvc"*/)
   : VarHandleBase( ClassID_traits<T>::ID(),
-                   sgkey, Gaudi::DataHandle::Updater, storename ),
+                   sgkey, Gaudi::DataHandle::Reader, storename ),
     m_updated(false)
 {
 }
diff --git a/Control/StoreGate/StoreGate/UpdateHandleKey.icc b/Control/StoreGate/StoreGate/UpdateHandleKey.icc
index 5f988fad5b98259b79df5d7f9113298e90afeebb..90704c1bbfe0f554411c0142dbaa531460198b13 100644
--- a/Control/StoreGate/StoreGate/UpdateHandleKey.icc
+++ b/Control/StoreGate/StoreGate/UpdateHandleKey.icc
@@ -27,7 +27,7 @@ template <class T>
 UpdateHandleKey<T>::UpdateHandleKey (const std::string& key /*= ""*/,
                                      const std::string& storeName /*= "StoreGateSvc"*/)
   : VarHandleKey (ClassID_traits<T>::ID(), key,
-                  Gaudi::DataHandle::Updater,
+                  Gaudi::DataHandle::Reader,
                   storeName)
 {
 }
diff --git a/Control/StoreGate/StoreGate/VarHandleBase.h b/Control/StoreGate/StoreGate/VarHandleBase.h
index 44329f16abfea42b0caf73e668fcea61e573ae49..ceef69777109d2a2fec0e411657f4cf554fbd40d 100644
--- a/Control/StoreGate/StoreGate/VarHandleBase.h
+++ b/Control/StoreGate/StoreGate/VarHandleBase.h
@@ -423,6 +423,15 @@ namespace SG {
     StatusCode symLink_impl (CLID newClid, const std::string& newKey) const;
 
 
+    /**
+     * @brief Is the referenced object present in SG?
+     * @param key SG key to test.
+     *
+     * Const method; the handle does not change as a result of this.
+     */
+    bool isPresent_impl (const std::string& key) const;
+
+
   protected: 
     //*************************************************************************
     // Protected data.
diff --git a/Control/StoreGate/StoreGate/VarHandleKeyArray.h b/Control/StoreGate/StoreGate/VarHandleKeyArray.h
index 3616da01c05da37858d315877283d3872e727ba7..7ab356e81b30226ea74caf44a2c865bbb92f836f 100644
--- a/Control/StoreGate/StoreGate/VarHandleKeyArray.h
+++ b/Control/StoreGate/StoreGate/VarHandleKeyArray.h
@@ -111,6 +111,11 @@ namespace SG {
   
 } // namespace SG
 
+namespace std {
+  ostream& operator<<(ostream& s, const SG::VarHandleKeyArray& m);
+}
+
+
 #include "StoreGate/VarHandleKeyArray.icc"
 
 #endif
diff --git a/Control/StoreGate/StoreGate/VarHandleKeyArrayProperty.h b/Control/StoreGate/StoreGate/VarHandleKeyArrayProperty.h
index cfdceea3bb4306c9c7efb9b7381d09a44f4861f8..cd26c7e1b450d373f2f5b64283ee8a5551270558 100644
--- a/Control/StoreGate/StoreGate/VarHandleKeyArrayProperty.h
+++ b/Control/StoreGate/StoreGate/VarHandleKeyArrayProperty.h
@@ -23,7 +23,7 @@ namespace Gaudi {
     GAUDI_API
     StatusCode parse(SG::VarHandleKeyArray& v, const std::string& s);    
   }
-
+  
   namespace Utils {
     GAUDI_API
     std::ostream& toStream(const SG::VarHandleKeyArray& v, std::ostream& o);    
diff --git a/Control/StoreGate/StoreGate/WriteCondHandle.h b/Control/StoreGate/StoreGate/WriteCondHandle.h
index bf5a59549f6db537368280f0743b324fc30ca075..2b060aa1154eda0cc56e6d3d50a678c66bc7a72e 100644
--- a/Control/StoreGate/StoreGate/WriteCondHandle.h
+++ b/Control/StoreGate/StoreGate/WriteCondHandle.h
@@ -41,6 +41,7 @@ namespace SG {
     bool isValid(const EventIDBase& t) const;
 
     StatusCode record(const EventIDRange& range, T* t);
+    StatusCode record(const EventIDRange& range, std::unique_ptr<T> t);
     void updateStore();
     
     const std::string& dbKey() const { return m_hkey.dbKey(); }
@@ -96,27 +97,33 @@ namespace SG {
 
   template <typename T>
   StatusCode
-  WriteCondHandle<T>::record(const EventIDRange& r, T* t) {
+  WriteCondHandle<T>::record(const EventIDRange& r, std::unique_ptr<T> t)
+  {
+    MsgStream msg(Athena::getMessageSvc(), "WriteCondHandle");
+    msg << MSG::DEBUG
+        << "WriteCondHandle::record() : obj at: " << t.get() << "  range: " << r 
+        << endmsg;
 
-    if (!m_cc->insert(r, t)) {
-      MsgStream msg(Athena::getMessageSvc(), "WriteCondHandle");
+    if (!m_cc->insert(r, std::move(t))) {
       msg << MSG::ERROR 
           << "WriteCondHandle::record() : unable to insert obj in CondCont<T>"
           << endmsg;
       return StatusCode::FAILURE;
     }
  
-
-    MsgStream msg(Athena::getMessageSvc(), "WriteCondHandle");
-    msg << MSG::DEBUG
-        << "WriteCondHandle::record() : obj at: " << t << "  range: " << r 
-        << endmsg;
-
     updateStore();
  
     return StatusCode::SUCCESS;
   }
 
+  
+  template <typename T>
+  StatusCode
+  WriteCondHandle<T>::record(const EventIDRange& r, T* t)
+  {
+    return record (r, std::unique_ptr<T> (t));
+  }
+
   //---------------------------------------------------------------------------
 
   template <typename T>
diff --git a/Control/StoreGate/StoreGate/WriteCondHandleKey.h b/Control/StoreGate/StoreGate/WriteCondHandleKey.h
index 05ef486574b15c29ff2a1a30d9397f3be6112bfb..1d8d0b8dbb1730c377e84759aef42932511f6369 100644
--- a/Control/StoreGate/StoreGate/WriteCondHandleKey.h
+++ b/Control/StoreGate/StoreGate/WriteCondHandleKey.h
@@ -22,10 +22,50 @@ namespace SG {
     friend class WriteCondHandle<T>;
     
   public:
+
+    /**
+     * @brief Constructor for WriteCondHandle
+     * @key   StoreGate key
+     * @dbKey key in the database
+     */
     WriteCondHandleKey(const std::string& key, const std::string& dbKey) :
       CondHandleKey<T>(key, dbKey, Gaudi::DataHandle::Writer)
     {}
 
+    /**
+     * @brief Constructor for WriteCondHandle that takes just a SG key
+     * @key   StoreGate key
+     *
+     * the value of the dbKey is the same as the StoreGate key
+     */
+    WriteCondHandleKey(const std::string& key) :
+      CondHandleKey<T>(key, key, Gaudi::DataHandle::Writer)
+    {}
+
+
+  /**
+   * @brief auto-declaring Property Constructor.
+   * @param name name of the Property
+   * @param key  default StoreGate key for the object.
+   * @param doc documentation string
+   *
+   * will associate the named Property with this RHK via declareProperty
+   *
+   * The provided key may actually start with the name of the store,
+   * separated by a "+":  "MyStore+Obj".  If no "+" is present
+   * the store named by @c storeName is used.
+   */
+    template <class OWNER, class K,
+              typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
+    inline WriteCondHandleKey( OWNER* owner,
+                               std::string name,
+                               const K& key={},
+                               std::string doc="") :
+      WriteCondHandleKey<T>(key) {
+      auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
+      p->template setOwnerType<OWNER>();
+    }
+    
   };
 
 } // namespace SG
diff --git a/Control/StoreGate/StoreGate/WriteDecorHandle.h b/Control/StoreGate/StoreGate/WriteDecorHandle.h
index bbdf59da9c2af1f217f4851e2cdcfabd44d0767d..ced61555169efd9d5d63ab9a27268396efeaf188 100644
--- a/Control/StoreGate/StoreGate/WriteDecorHandle.h
+++ b/Control/StoreGate/StoreGate/WriteDecorHandle.h
@@ -83,6 +83,9 @@ namespace SG {
  *      ...
  @endcode
  *
+ * When the decoration handle is destroyed, the decoration will be locked
+ * (i.e., converted to an ordinary variable).
+ *
  * Implementation note: we keep track of decorations using aliases.
  * For a container C with decoration d, the @c WriteDecorHandle will make
  * an alias C.d for C.  The @c ReadDecorHandle will then retrieve C.d from
@@ -143,6 +146,12 @@ public:
   WriteDecorHandle (WriteDecorHandle&& rhs);
 
 
+  /**
+   * @brief Destructor.  This will lock the decoration.
+   */
+  ~WriteDecorHandle();
+
+
   /**
    * @brief Assignment operator.
    */
@@ -155,6 +164,17 @@ public:
   WriteDecorHandle& operator= (WriteDecorHandle&& rhs);
 
 
+  /**
+   * @brief Is the referenced container present in SG?
+   *
+   * Note that this tests for the presence of the _container_,
+   * not for the decoration.
+   *
+   * Const method; the handle does not change as a result of this.
+   */
+  bool isPresent() const;
+
+
   /**
    * @brief Explicitly set the event store.
    * @param store The new event store.
@@ -192,6 +212,13 @@ public:
   getDecorationArray();
 
 
+  /**
+   * @brief Test to see if this variable exists in the store,
+   *        for the referenced object.
+   */
+  bool isAvailable();
+
+
   /**
    * @brief Return the aux id for this variable.
    */
diff --git a/Control/StoreGate/StoreGate/WriteDecorHandle.icc b/Control/StoreGate/StoreGate/WriteDecorHandle.icc
index aca80653ff6824094033dca01f3b8a896f5e5d3b..c792de94af782612e6ff54f834af8efad7672739 100644
--- a/Control/StoreGate/StoreGate/WriteDecorHandle.icc
+++ b/Control/StoreGate/StoreGate/WriteDecorHandle.icc
@@ -74,6 +74,22 @@ WriteDecorHandle<T, D>::WriteDecorHandle (WriteDecorHandle&& rhs)
 }
 
 
+/**
+ * @brief Destructor.  This will lock the decoration.
+ */
+template <class T, class D>
+WriteDecorHandle<T, D>::~WriteDecorHandle()
+{
+  // Lock the decoration.  But don't do anything if we haven't touched it.
+  if (this->cachedPtr()) {
+    const IConstAuxStore* store = this->vectorData()->getConstStore();
+    if (store) {
+      const_cast<IConstAuxStore*>(store)->lockDecoration (auxid());
+    }
+  }
+}
+
+
 /**
  * @brief Assignment operator.
  */
@@ -104,6 +120,21 @@ WriteDecorHandle<T, D>& WriteDecorHandle<T, D>::operator= (WriteDecorHandle&& rh
 }
 
 
+/**
+ * @brief Is the referenced container present in SG?
+ *
+ * Note that this tests for the presence of the _container_,
+ * not for the decoration.
+ *
+ * Const method; the handle does not change as a result of this.
+ */
+template <class T, class D>
+bool WriteDecorHandle<T, D>::isPresent() const
+{
+  return m_contHandle.isPresent();
+}
+
+
 /**
  * @brief Explicitly set the event store.
  * @param store The new event store.
@@ -162,6 +193,27 @@ WriteDecorHandle<T, D>::getDecorationArray()
 }
 
 
+/**
+ * @brief Test to see if this variable exists in the store,
+ *        for the referenced object.
+ */
+template <class T, class D>
+inline
+bool WriteDecorHandle<T, D>::isAvailable()
+{
+  const SG::AuxVectorData* obj = static_cast<SG::AuxVectorData*> (this->m_ptr);
+  if (!obj) {
+    obj = static_cast<SG::AuxVectorData*> (ReadHandle<T>::typeless_dataPointer_impl (true));
+  }
+
+  if (obj) {
+    return obj->isAvailable (m_acc.auxid());
+  }
+
+  return false;
+}
+
+
 /**
  * @brief Return the aux id for this variable.
  */
@@ -189,7 +241,8 @@ void* WriteDecorHandle<T, D>::typeless_dataPointer_impl (bool quiet)
   void* ptr = ReadHandle<T>::typeless_dataPointer_impl (quiet);
   // Important to call the base class method above before calling vectorData;
   // otherwise, we'll get an infinite recursion.
-  if (ptr) {
+  // Also don't call getDecorationArray if the container is empty.
+  if (ptr && this->vectorData()->size_v() > 0) {
     m_acc.getDecorationArray (*this->vectorData());
   }
   return ptr;
diff --git a/Control/StoreGate/StoreGate/WriteHandleKey.h b/Control/StoreGate/StoreGate/WriteHandleKey.h
index 2ea603aca82ab0a8c20bbc1a71f412dfd5900b18..29691104e2697d867dc15a85d9d7a80e43979db0 100644
--- a/Control/StoreGate/StoreGate/WriteHandleKey.h
+++ b/Control/StoreGate/StoreGate/WriteHandleKey.h
@@ -51,7 +51,28 @@ public:
   WriteHandleKey (const std::string& key = "",
                   const std::string& storeName = StoreID::storeName(StoreID::EVENT_STORE));
 
-  
+  /**
+   * @brief auto-declaring Property Constructor.
+   * @param name name of the Property
+   * @param key  default StoreGate key for the object.
+   *
+   * will associate the named Property with this WHK via declareProperty
+   *
+   * The provided key may actually start with the name of the store,
+   * separated by a "+":  "MyStore+Obj".  If no "+" is present
+   * the store named by @c storeName is used.
+   */
+  template <class OWNER, class K,
+            typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
+  inline WriteHandleKey( OWNER* owner,
+                        std::string name,
+                        const K& key={},
+                        std::string doc="") :
+    WriteHandleKey<T>(key) {
+    auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
+    p->template setOwnerType<OWNER>();
+  }
+
   /**
    * @brief Change the key of the object to which we're referring.
    * @param sgkey The StoreGate key for the object.
diff --git a/Control/StoreGate/StoreGate/WriteHandleKeyArray.h b/Control/StoreGate/StoreGate/WriteHandleKeyArray.h
index 40951f6ef6db56f2c7293e28e741504d48ad9ab2..171184eef0c59060218a3c5d55c4fd619bd5e010 100644
--- a/Control/StoreGate/StoreGate/WriteHandleKeyArray.h
+++ b/Control/StoreGate/StoreGate/WriteHandleKeyArray.h
@@ -65,6 +65,27 @@ namespace SG {
     WriteHandleKeyArray( std::initializer_list<std::string> l ):
       VarHandleKeyArrayCommon<WriteHandleKey<T>> {l} {};
 
+    /**
+     * @brief auto-declaring Property Constructor from a WriteHandleKeyArray 
+     * that takes an initializer list of std::strings, and associates the WHKA
+     * with the specified Property name
+     * @param name name of Property
+     * @param l initializer list of std::strings used to create the
+     *          WriteHandleKeys
+     * @param doc documentation string
+     */
+    template <class OWNER, 
+              typename = typename std::enable_if<std::is_base_of<IProperty, OWNER>::value>::type>
+    inline WriteHandleKeyArray( OWNER* owner,
+                                std::string name,
+                                std::initializer_list<std::string> l,
+                                std::string doc="") :
+      VarHandleKeyArrayCommon<WriteHandleKey<T>> {l} {
+      auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
+      p->template setOwnerType<OWNER>();
+    }
+
+
     /**
      * @brief return the type (Read/Write/Update) of handle
      */
diff --git a/Control/StoreGate/StoreGate/WriteMetaHandle.h b/Control/StoreGate/StoreGate/WriteMetaHandle.h
new file mode 100644
index 0000000000000000000000000000000000000000..c75d755530159a8c8d5fca1164ecfa58e0d8aa7d
--- /dev/null
+++ b/Control/StoreGate/StoreGate/WriteMetaHandle.h
@@ -0,0 +1,150 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef STOREGATE_WRITEMETAHANDLE_H
+#define STOREGATE_WRITEMETAHANDLE_H 1
+
+#include "AthenaKernel/MetaCont.h"
+#include "AthenaKernel/getMessageSvc.h"
+
+#include "StoreGate/StoreGateSvc.h"
+#include "StoreGate/VarHandleBase.h"
+#include "StoreGate/WriteMetaHandleKey.h"
+
+#include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/DataHandle.h"
+#include "GaudiKernel/DataObjID.h"
+
+#include <string>
+#include <stdexcept>
+
+namespace SG {
+
+  template <typename T>
+  class WriteMetaHandle : public SG::VarHandleBase {
+
+  public: 
+    typedef T*               pointer_type; // FIXME: better handling of
+    typedef const T*   const_pointer_type; //        qualified T type ?
+    typedef T&             reference_type;
+    typedef const T& const_reference_type;
+
+  public:
+    WriteMetaHandle(const WriteMetaHandleKey<T>& key);
+    WriteMetaHandle(const WriteMetaHandleKey<T>& key, const EventContext& ctx);
+    
+    virtual ~WriteMetaHandle() override {};   
+
+    virtual bool isValid() override;
+    bool isValid(const MetaContBase::SourceID& t) const;
+
+    StatusCode record(const MetaContBase::SourceID& range, T* t);
+    void updateStore();
+    
+    const std::string& dbKey() const { return m_hkey.dbKey(); }
+    
+  private:
+
+    const MetaContBase::SourceID& m_sid;
+    MetaCont<T>* m_cont {nullptr};
+    StoreGateSvc* m_cs {nullptr};
+
+    const SG::WriteMetaHandleKey<T>& m_hkey;
+    
+  };
+  
+
+  //---------------------------------------------------------------------------
+
+  template <typename T>
+  WriteMetaHandle<T>::WriteMetaHandle( const SG::WriteMetaHandleKey<T>& key ) :
+    WriteMetaHandle( key, Gaudi::Hive::currentContext() ) {}
+
+  //------------------------------------------------------------------------
+
+  template <typename T>
+  WriteMetaHandle<T>::WriteMetaHandle( const SG::WriteMetaHandleKey<T>& key,
+                                       const EventContext& ctx) :
+    SG::VarHandleBase( key, &ctx ),
+    m_sid( MetaContBase::SourceID("") ),
+    m_cont( key.getContainer() ),
+    m_cs( key.getStore() ),
+    m_hkey(key)
+  {
+    if (m_cont == 0) {
+      MsgStream msg(Athena::getMessageSvc(), "WriteMetaHandle");
+      msg << MSG::ERROR 
+          << "WriteMetaHandle : ptr to MetaCont<T> is zero"
+          << endmsg;
+    }
+
+    if (! m_hkey.isInit()) {
+      MsgStream msg(Athena::getMessageSvc(), "WriteMetaHandle");
+      msg << MSG::ERROR 
+          << "WriteMetaHandleKey " << key.objKey() << " was not initialized"
+          << endmsg;
+      throw std::runtime_error("WriteMetaHandle: WriteMetaHandleKey was not initialized");
+
+    }
+    
+  }
+
+
+  //------------------------------------------------------------------------
+
+  template <typename T>
+  StatusCode
+  WriteMetaHandle<T>::record(const MetaContBase::SourceID& r, T* t) {
+
+    if (!m_cont->insert(r, t)) {
+      MsgStream msg(Athena::getMessageSvc(), "WriteMetaHandle");
+      msg << MSG::ERROR 
+          << "WriteMetaHandle::record() : unable to insert obj in MetaCont<T>"
+          << endmsg;
+      return StatusCode::FAILURE;
+    }
+ 
+
+    MsgStream msg(Athena::getMessageSvc(), "WriteMetaHandle");
+    msg << MSG::DEBUG
+        << "WriteMetaHandle::record() : obj at: " << t << "  range: " << r 
+        << endmsg;
+
+    updateStore();
+ 
+    return StatusCode::SUCCESS;
+  }
+
+  //------------------------------------------------------------------------
+
+  template <typename T>
+  void
+  WriteMetaHandle<T>::updateStore() {
+    m_cs->addedNewTransObject( fullKey().clid(), fullKey().key() );
+  }
+
+
+  //------------------------------------------------------------------------
+
+  template <typename T>
+  bool 
+  WriteMetaHandle<T>::isValid(const MetaContBase::SourceID& t) const {
+
+    return (m_cont->valid(t));
+  }
+
+
+  //------------------------------------------------------------------------
+
+  template <typename T>
+  bool 
+  WriteMetaHandle<T>::isValid() {
+
+    return (m_cont->valid(m_sid));
+  }
+
+}
+
+#endif
+  
diff --git a/Control/StoreGate/StoreGate/WriteMetaHandleKey.h b/Control/StoreGate/StoreGate/WriteMetaHandleKey.h
new file mode 100644
index 0000000000000000000000000000000000000000..2d9ea98c2a71da18098f3f9ced94a33c7c36fee0
--- /dev/null
+++ b/Control/StoreGate/StoreGate/WriteMetaHandleKey.h
@@ -0,0 +1,33 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef STOREGATE_WRITEMETAHANDLEKEY_H
+#define STOREGATE_WRITEMETAHANDLEKEY_H
+
+
+#include "StoreGate/MetaHandleKey.h"
+
+
+namespace SG {
+
+  template <class T>
+  class WriteMetaHandle;
+
+  template <class T>
+  class WriteMetaHandleKey 
+    : public MetaHandleKey<T>
+  {
+    
+    friend class WriteMetaHandle<T>;
+    
+  public:
+    WriteMetaHandleKey(const std::string& key, const std::string& dbKey) :
+      MetaHandleKey<T>(key, dbKey, Gaudi::DataHandle::Writer)
+    {}
+
+  };
+
+} // namespace SG
+
+#endif
diff --git a/Control/StoreGate/StoreGate/tools/SGImplSvc.h b/Control/StoreGate/StoreGate/tools/SGImplSvc.h
index c9a31a99c570e711a5f2bb8c029a6908860098a4..6af40a8e3ce1df823b8b378eec92638abbc01fdf 100644
--- a/Control/StoreGate/StoreGate/tools/SGImplSvc.h
+++ b/Control/StoreGate/StoreGate/tools/SGImplSvc.h
@@ -96,8 +96,6 @@ class IOVDbSvc;
 class IOVSvc;
 class IOVSvcTool;
 class PileUpMergeSvc;
-class EventDumperSvc;
-class MemoryMonitorSvc;
 class SGDeleteAlg;
 class ThinningSvc;
 class ActiveStoreSvc;
@@ -630,7 +628,10 @@ public:
   /// Find an exact match; no handling of aliases, etc.
   /// Returns 0 to flag failure.
   virtual SG::DataProxy* proxy_exact (SG::sgkey_t sgkey) const override final
-  { return m_pStore->proxy_exact (sgkey); }
+  {
+    lock_t lock (m_mutex);
+    return m_pStore->proxy_exact (sgkey);
+  }
     
 
   //@}
@@ -652,6 +653,9 @@ public:
   /// return the list of all current proxies in store
   virtual std::vector<const SG::DataProxy*> proxies() const override final;
 
+  /// Return all CLIDs in the store.
+  std::vector<CLID> clids() const;
+
   /// get proxy with given id and key. Does not query ProxyProviderSvc.
   ///  @returns 0 to flag failure
   SG::DataProxy* transientProxy(const CLID& id, const std::string& key) const;
@@ -998,9 +1002,6 @@ private:
   ///access store()
   friend class IOVSvc;              // FIXME
   friend class PileUpMergeSvc;      // FIXME needs to call tRange
-  friend class EventDumperSvc;
-  friend class MemoryMonitorSvc;
-  friend void testHLTAutoKeyReset(SGImplSvc&, IProxyProviderSvc&);
   friend class StoreGateSvc;
   ///access typeless_record
   friend class ThinningSvc;
diff --git a/Control/StoreGate/cmt/requirements b/Control/StoreGate/cmt/requirements
deleted file mode 100644
index a3cd25252343fc762407335dc1939151ca712c72..0000000000000000000000000000000000000000
--- a/Control/StoreGate/cmt/requirements
+++ /dev/null
@@ -1,72 +0,0 @@
-package StoreGate
-
-author Paolo Calafiura   <Paolo.Calafiura@cern.ch>
-author Hong Ma           <hma@bnl.gov>
-author Srini Rajagopalan <srinir@bnl.gov>
-author Wim Lavrijsen     <WLavrijsen@lbl.gov>
-
-use AtlasPolicy    AtlasPolicy-*
-
-use AthenaKernel   AthenaKernel-*      Control
-#need ClassID_traits.h, CLASS_DEF.h
-use SGTools 	   SGTools-*           Control
-
-use AtlasBoost     AtlasBoost-*     External
-use AtlasTBB        AtlasTBB-*     External
-use GaudiInterface GaudiInterface-* External
-
-use AthAllocators  AthAllocators-*     Control
-use AthContainersInterfaces AthContainersInterfaces-* Control
-
-# Inform cmake that this package has private header files (transparent to CMT)
-apply_pattern cmake_add_command command="include_directories(src)"
-
-private
-use CxxUtils       CxxUtils-*          Control
-end_private
-
-apply_pattern dual_use_library files=*.cxx
-
-macro_append cppflags ""    \
-  gcc-3 " -DHAVE_ITERATOR -DHAVE_NEW_IOSTREAMS "
-
-private 
-
-apply_pattern install_runtime
-apply_pattern declare_joboptions files="StoreGate_jobOptions.txt StoreGate_jobOptions.py SGHive_test.txt ActiveStore_test.txt"
-apply_pattern declare_python_modules files="*.py"
-
-macro_append SGtests_dependencies "StoreGateLib"
-
-use TestTools      TestTools-*        AtlasTest 
-library SGtests ../test/SGtests.cxx 
-macro SGtests_shlibflags " $(componentshr_linkopts) $(use_linkopts) " 
-apply_pattern optdebug_library name=SGtests
- 
-apply_pattern UnitTest_run unit_test=ActiveStore extrapatterns="JobOptionsSvc +INFO"
-macro HIVEPATTERNS ".*" \
-      ATHENAHIVE "JobOptionsSvc +INFO|StoreGateSvc.*DEBUG|HiveMgrSvc +DEBUG"
-apply_pattern UnitTest_run unit_test=SGHive extrapatterns="$(HIVEPATTERNS)"
-apply_pattern UnitTest_run unit_test=DataHandle extrapatterns="ClassIDSvc Initialized successfully|^HistogramPersis.* INFO"
-apply_pattern UnitTest_run unit_test=SGIterator extrapatterns="^HistogramPersis.* INFO"
-
-apply_pattern UnitTest_run unit_test=KeyConcept
-apply_pattern UnitTest_run unit_test=StoreClearedIncident
-apply_pattern UnitTest_run unit_test=SegMemSvc extrapatterns="^HistogramPersis.* INFO"
-apply_pattern UnitTest_run unit_test=exceptions
-apply_pattern UnitTest_run unit_test=VarHandleKey
-apply_pattern UnitTest_run unit_test=VarHandleKeyProperty
-apply_pattern UnitTest_run unit_test=VarHandleProperty
-apply_pattern UnitTest_run unit_test=ReadHandleKey
-apply_pattern UnitTest_run unit_test=UpdateHandleKey
-apply_pattern UnitTest_run unit_test=VarHandleBase extrapatterns="could not get proxy for|try using a ReadHandle"
-apply_pattern UnitTest_run unit_test=VarHandles
-apply_pattern UnitTest_run unit_test=WriteHandle
-apply_pattern UnitTest_run unit_test=ReadHandle
-apply_pattern UnitTest_run unit_test=UpdateHandle
-
-macro_append DOXYGEN_INPUT " ../test" 
-macro_append DOXYGEN_FILE_PATTERNS    " *.icc"
-
-macro_append StoreGate_pp_cppflags " -Wno-deprecated "
-end_private
diff --git a/Control/StoreGate/doc/packagedoc.h b/Control/StoreGate/doc/packagedoc.h
index c7a11ae5fd03b04a0d00c166b74e39cb1d963cc7..b22c22cc2ed213dbe2328dec6af63b64b991b11b 100644
--- a/Control/StoreGate/doc/packagedoc.h
+++ b/Control/StoreGate/doc/packagedoc.h
@@ -34,8 +34,6 @@ The directory test contains several test programs that can be run issuing
 a "gmake check". 
  StoreGateSvcClient_test.cxx should cover most of the high-level client API.
 
-@section StoreGate_requirements file
-
 
 @section StoreGate_Documentation 
 
diff --git a/Control/StoreGate/share/UpdateHandle_test.ref b/Control/StoreGate/share/UpdateHandle_test.ref
index de1c6c45eeac439531a9373612f81f45beb092f5..d9ed7b86e3988f070bd0848dbb447b31d0e1a073 100644
--- a/Control/StoreGate/share/UpdateHandle_test.ref
+++ b/Control/StoreGate/share/UpdateHandle_test.ref
@@ -1,28 +1,25 @@
 
 
 Initializing Gaudi ApplicationMgr using job opts ../share/VarHandleBase_test.txt
-JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/VarHandleBase_test.txt
+JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Control/StoreGate/share/../share/VarHandleBase_test.txt
 JobOptionsSvc        INFO # (1,1): ApplicationMgr.ExtSvc = ["StoreGateSvc/OtherStore"]
 JobOptionsSvc        INFO # (2,1): OtherStore.ProxyProviderSvc = ""
 JobOptionsSvc        INFO Job options successfully read in from ../share/VarHandleBase_test.txt
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v999r999)
-                                          running on karma on Sun Apr 24 21:57:27 2016
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
+                                          running on lxplus013.cern.ch on Fri Sep  1 02:16:48 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-OtherStore           INFO Initializing OtherStore - package version StoreGate-00-00-00
-ClassIDSvc           INFO Initializing ClassIDSvc - package version CLIDComps-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 157 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 221 CLIDRegistry entries for module ALL
+ClassIDSvc          ERROR uncheckedSetTypePackageForID: PyAnalysisExamples-00-00-00 can not set CLID <86839352> for type name MyObj: Known CLID for this name <293847295> It was set by StoreGate-00-00-00
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
 EventLoopMgr      WARNING No events will be processed from external input.
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
 test1
-StoreGateSvc         INFO Initializing StoreGateSvc - package version StoreGate-00-00-00
-ProxyProviderSvc     INFO Initializing ProxyProviderSvc - package version SGComps-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 833 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 930 CLIDRegistry entries for module ALL
 ServiceManager      FATAL No Service factory for BazSvc available.
 VarHandleKey.Se...  ERROR ServiceLocatorHelper::service: can not locate service BazSvc
                     FATAL FILE:LINE (FUNC): code 0: m_storeHandle.retrieve()
@@ -32,13 +29,9 @@ VarHandleKey.Se...  ERROR ServiceLocatorHelper::service: can not locate service
 test2
 test3
 VarHandle(FooSv...WARNING FILE:LINE (FUNC): could not get proxy for key foox
-VarHandle(FooSv...WARNING FILE:LINE (FUNC):  try using a ReadHandle
 VarHandle(FooSv...WARNING FILE:LINE (FUNC): could not get proxy for key foox
-VarHandle(FooSv...WARNING FILE:LINE (FUNC):  try using a ReadHandle
 VarHandle(FooSv...WARNING FILE:LINE (FUNC): could not get proxy for key foox
-VarHandle(FooSv...WARNING FILE:LINE (FUNC):  try using a ReadHandle
 VarHandle(FooSv...WARNING FILE:LINE (FUNC): could not get proxy for key foox
-VarHandle(FooSv...WARNING FILE:LINE (FUNC):  try using a ReadHandle
 test4
 ServiceManager      FATAL No Service factory for BazSvc available.
 VarHandleKey.Se...  ERROR ServiceLocatorHelper::service: can not locate service BazSvc
diff --git a/Control/StoreGate/src/SGImplSvc.cxx b/Control/StoreGate/src/SGImplSvc.cxx
index 4e3c97ad284a231d829e097add00b45999042425..043adfd9d9bc637c61f1dfff2280ee4ad9ddc321 100644
--- a/Control/StoreGate/src/SGImplSvc.cxx
+++ b/Control/StoreGate/src/SGImplSvc.cxx
@@ -416,7 +416,7 @@ StatusCode SGImplSvc::recordAddress(const std::string& skey,
   //do not overwrite a persistent object
   if (m_pPPS) {
     DataProxy *dp(m_pPPS->retrieveProxy(dataID, skey, *m_pStore));
-    if (dp && dp->transientAddress() && dp->transientAddress()->provider()) {
+    if (dp && dp->provider()) {
       std::string clidTypeName; 
       m_pCLIDSvc->getTypeNameOfID(dataID, clidTypeName).ignore();
       msg() << MSG::WARNING
@@ -551,7 +551,7 @@ SGImplSvc::keys(const CLID& id, std::vector<std::string>& vkeys,
 
 bool SGImplSvc::isSymLinked(const CLID& linkID, DataProxy* dp)   
 {        
-  return (0 != dp) ? dp->transientAddress()->transientID(linkID) : false;        
+  return (0 != dp) ? dp->transientID(linkID) : false;        
 }
 
 //////////////////////////////////////////////////////////////////
@@ -760,7 +760,7 @@ SG::DataProxy* SGImplSvc::recordObject (SG::DataObjectSharedPtr<DataObject> obj,
     // Look for the same object recorded under a different key/clid.
     proxy = this->proxy (raw_ptr);
     if (proxy && proxy->isValid()) {
-      if (proxy->transientAddress()->transientID (obj->clID())) {
+      if (proxy->transientID (obj->clID())) {
         // CLID matches.  Make an alias.
         if (addAlias (key, proxy).isFailure()) {
           CLID clid = proxy->clID();
@@ -886,6 +886,28 @@ SGImplSvc::proxies() const
   return proxies;
 }
 
+
+std::vector<CLID>
+SGImplSvc::clids() const
+{
+  lock_t lock (m_mutex);
+
+  using std::distance;
+  DataStore::ConstStoreIterator s_iter, s_end;
+  store()->tRange(s_iter, s_end).ignore();
+
+  std::vector<CLID> clids;
+  clids.reserve( distance( s_iter, s_end ) );
+
+  for (; s_iter != s_end; ++s_iter ) {
+    const CLID id = s_iter->first;
+    clids.push_back (id);
+  }
+
+  return clids;
+}
+
+
 DataProxy*
 SGImplSvc::transientProxy(const CLID& id, const string& key) const
 { 
@@ -1034,9 +1056,7 @@ SGImplSvc::record_impl( DataObject* pDObj, const std::string& key,
     DataProxy *dp(proxy(clid, vk.key()));
     if (dp) {
       //proxies primary key
-      TransientAddress *pTA(dp->transientAddress());
-      assert(pTA);
-      const std::string& pTAName(pTA->name());
+      const std::string& pTAName(dp->name());
       //original key as versioned
       SG::VersionedKey primaryVK(pTAName);
       
@@ -1066,7 +1086,7 @@ SGImplSvc::record_impl( DataObject* pDObj, const std::string& key,
   if (!allowOverwrite && m_pPPS) {
     //do not overwrite a persistent object
     DataProxy *dp(m_pPPS->retrieveProxy(clid, rawKey, *m_pStore));
-    if (dp && dp->transientAddress() && dp->transientAddress()->provider()) {
+    if (dp && dp->provider()) {
       std::string clidTypeName; 
       m_pCLIDSvc->getTypeNameOfID(clid, clidTypeName).ignore();
       msg() << MSG::WARNING
@@ -1604,7 +1624,7 @@ void SGImplSvc::addedNewPersObject(CLID clid, DataProxy* dp) {
   lock_t lock (m_mutex);
   //if proxy is loading from persistency
   //add key of object to list of "newly recorded" objects
-  if (0 != dp->transientAddress()->provider()) {
+  if (0 != dp->provider()) {
     // The object itself.
     s_newObjs.insert(DataObjID(clid,dp->name()));
 
@@ -1614,7 +1634,7 @@ void SGImplSvc::addedNewPersObject(CLID clid, DataProxy* dp) {
     }
 
     // Symlinks.
-    for (CLID clid2 : dp->transientAddress()->transientID()) {
+    for (CLID clid2 : dp->transientID()) {
       if (clid2 != clid)
         s_newObjs.insert(DataObjID(clid2,dp->name()));
     }
diff --git a/Control/StoreGate/src/StoreGateSvc.cxx b/Control/StoreGate/src/StoreGateSvc.cxx
index c78d5d6d3df0c29e28e4f4946c9c0f784c0ecc0f..f37e8b314f9a265d26fabd888cc8b57a5649e1df 100644
--- a/Control/StoreGate/src/StoreGateSvc.cxx
+++ b/Control/StoreGate/src/StoreGateSvc.cxx
@@ -217,7 +217,7 @@ StatusCode StoreGateSvc::stop()    {
   //HACK ALERT: ID event store objects refer to det store objects
   //by setting an ad-hoc priority for event store(s) we make sure they are finalized and hence cleared first
   // see e.g. https://savannah.cern.ch/bugs/index.php?99993
-  if (store()->storeID() == StoreID::EVENT_STORE) {
+  if (m_defaultStore->store()->storeID() == StoreID::EVENT_STORE) {
     ISvcManager* pISM(dynamic_cast<ISvcManager*>(serviceLocator().get()));
     if (!pISM)
       return StatusCode::FAILURE;
@@ -350,6 +350,14 @@ StoreGateSvc::proxies() const {
   _SGXCALL(proxies, (), nullV);
 }
 
+/// Return all CLIDs in the store.
+vector<CLID> 
+StoreGateSvc::clids() const
+{
+  vector<CLID> nullV;
+  _SGXCALL(clids, (), nullV);
+}
+
 /// get proxy with given id and key. Does not query ProxyProviderSvc.
 ///  @returns 0 to flag failure
 SG::DataProxy* 
diff --git a/Control/StoreGate/src/VarHandleBase.cxx b/Control/StoreGate/src/VarHandleBase.cxx
index 0e1cd5bb5cb1acc587ff455b27b40852ff00cd69..9a4264ac8c4bafc7b33d4f6323c83985c40d4f49 100644
--- a/Control/StoreGate/src/VarHandleBase.cxx
+++ b/Control/StoreGate/src/VarHandleBase.cxx
@@ -72,8 +72,8 @@ namespace SG {
     virtual const CLID& clID() const override { return m_clid; }
     virtual void* object() override { return m_obj; }
     virtual const std::type_info& tinfo() const override { return typeid(void); }
-    virtual void* cast (CLID, SG::IRegisterTransient*, bool) const override { std::abort(); }
-    virtual void* cast (const std::type_info&, SG::IRegisterTransient*, bool) const override { std::abort(); }
+    virtual void* cast (CLID, SG::IRegisterTransient*, bool) override { std::abort(); }
+    virtual void* cast (const std::type_info&, SG::IRegisterTransient*, bool) override { std::abort(); }
     virtual DataBucketBase* clone() const override { std::abort(); }
     virtual void relinquish() override { std::abort(); }
     virtual void lock() override { }
@@ -345,18 +345,7 @@ namespace SG {
    */
   bool VarHandleBase::isPresent() const
   {
-    const DataProxy* proxy = m_proxy;
-    if (!proxy) {
-      const IProxyDict* store = m_store;
-      if (!store)
-        store = this->storeHandle().get();
-      if (store)
-        proxy = store->proxy(this->clid(), this->key());
-    }
-    if (proxy) {
-      return proxy->isValid();
-    }
-    return false;
+    return isPresent_impl (key());
   }
 
 
@@ -456,6 +445,10 @@ namespace SG {
   VarHandleBase::setState()
   {
     CHECK( initialize() );
+    if (!m_storeWasSet) {
+      IProxyDict* store = storeFromHandle (nullptr);
+      if (store) m_store = store;
+    }
 
     StatusCode sc = this->setState(m_store->proxy(this->clid(), this->key()));
 
@@ -988,7 +981,7 @@ namespace SG {
     // the object was stored with, nor it inherits from it.
     // before giving up, let's check its transient CLIDs
     DataBucketBase *dbb = 0;
-    if (proxy->transientAddress()->transientID(clid) &&
+    if (proxy->transientID(clid) &&
         0 != (dbb = dynamic_cast<DataBucketBase*>(dobj))) {
       // it is a symlink after all.
       // Let's hard cast (and keep our fingers Xed)
@@ -1005,6 +998,29 @@ namespace SG {
   }
 
 
+  /**
+   * @brief Is the referenced object present in SG?
+   * @param key SG key to test.
+   *
+   * Const method; the handle does not change as a result of this.
+   */
+  bool VarHandleBase::isPresent_impl (const std::string& key) const
+  {
+    const DataProxy* proxy = m_proxy;
+    if (!proxy) {
+      const IProxyDict* store = m_store;
+      if (!store)
+        store = this->storeHandle().get();
+      if (store)
+        proxy = store->proxy(this->clid(), key);
+    }
+    if (proxy) {
+      return proxy->isValid();
+    }
+    return false;
+  }
+
+
 //*************************************************************************
   // Free functions.
   //
diff --git a/Control/StoreGate/src/VarHandleKeyArray.cxx b/Control/StoreGate/src/VarHandleKeyArray.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..fed7aad25c1db0584eecd666d51ef6be6f751a73
--- /dev/null
+++ b/Control/StoreGate/src/VarHandleKeyArray.cxx
@@ -0,0 +1,66 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "StoreGate/VarHandleKeyArray.h"
+
+namespace Gaudi { 
+  namespace Parsers {
+    
+    
+/**
+ * @brief Gaudi function used to initialize a property from a string.
+ * @param v The object to initialize.
+ * @param s The string from which to initialize.
+ *
+ * Used during Gaudi property handling to set object @c v from the string @c s.
+ * Note that @c s is a representation of the property setting; thus, in the
+ * case of setting a property from a string, @c s will contain quote marks.
+ */
+    StatusCode 
+    GAUDI_API
+    parse(SG::VarHandleKeyArray& v, const std::string& s)
+    {
+      std::vector<std::string> vp;
+      StatusCode sc = Gaudi::Parsers::parse(vp, s);
+      
+      if (sc.isSuccess())
+        sc = v.assign( vp );
+      
+      return sc;
+    }
+    
+  } //> ns Parsers
+
+  namespace Utils {
+    
+    
+/**
+ * @brief Gaudi function used to convert a property to a string.
+ * @param v The object to convert.
+ * @param o Stream to which to do the conversion.
+ *
+ * Used during Gaudi property handling to get a string representation of @c v.
+ * Note that if the representation is a string, it should be surrounded
+ * by quote marks.
+ */
+    std::ostream& 
+    GAUDI_API
+    toStream(const SG::VarHandleKeyArray& v, std::ostream& o)
+    {
+      o << "[" << v.toString() << "]";      
+      return o;
+    }
+    
+  } //> ns Utils
+} //> ns Gaudi
+
+
+
+
+namespace std {
+  ostream& operator<<(ostream& s, const SG::VarHandleKeyArray& m) {
+    s << "[" <<  m.toString() << "]";
+    return s;
+  }
+}
diff --git a/Control/StoreGate/src/VarHandleKeyArrayProperty.cxx b/Control/StoreGate/src/VarHandleKeyArrayProperty.cxx
index 81583ed2b00706088864f6bedff9070ef37ea603..8dd7cf32383ddba130eaa06be71721d6df4c2d64 100644
--- a/Control/StoreGate/src/VarHandleKeyArrayProperty.cxx
+++ b/Control/StoreGate/src/VarHandleKeyArrayProperty.cxx
@@ -10,58 +10,6 @@
 // StoreGate includes
 #include "StoreGate/VarHandleKeyArrayProperty.h"
 
-namespace Gaudi { 
-  namespace Parsers {
-    
-    
-/**
- * @brief Gaudi function used to initialize a property from a string.
- * @param v The object to initialize.
- * @param s The string from which to initialize.
- *
- * Used during Gaudi property handling to set object @c v from the string @c s.
- * Note that @c s is a representation of the property setting; thus, in the
- * case of setting a property from a string, @c s will contain quote marks.
- */
-    StatusCode 
-    GAUDI_API
-    parse(SG::VarHandleKeyArray& v, const std::string& s)
-    {
-      std::vector<std::string> vp;
-      StatusCode sc = Gaudi::Parsers::parse(vp, s);
-      
-      if (sc.isSuccess())
-        sc = v.assign( vp );
-      
-      return sc;
-    }
-    
-  } //> ns Parsers
-
-  namespace Utils {
-    
-    
-/**
- * @brief Gaudi function used to convert a property to a string.
- * @param v The object to convert.
- * @param o Stream to which to do the conversion.
- *
- * Used during Gaudi property handling to get a string representation of @c v.
- * Note that if the representation is a string, it should be surrounded
- * by quote marks.
- */
-    std::ostream& 
-    GAUDI_API
-    toStream(const SG::VarHandleKeyArray& v, std::ostream& o)
-    {
-      o << "[" << v.toString() << "]";      
-      return o;
-    }
-    
-  } //> ns Utils
-} //> ns Gaudi
-
-
 namespace SG {
 
 
diff --git a/Control/StoreGate/test/ActiveStore_test.cxx b/Control/StoreGate/test/ActiveStore_test.cxx
index d3c6a473ac396b67b998d2896f120873fa51cb6b..cce4f36844441d6cd1e89346fd4563bb624c81d1 100644
--- a/Control/StoreGate/test/ActiveStore_test.cxx
+++ b/Control/StoreGate/test/ActiveStore_test.cxx
@@ -41,7 +41,9 @@ CLASS_DEF(Foo, 8101, 1)
 int main() {
   cout << "*** ActiveStoreTest BEGINS ***" << endl;
   ISvcLocator* pSvcLoc;
-  initGaudi("ActiveStore_test.txt", pSvcLoc);
+  if (!initGaudi("ActiveStore_test.txt", pSvcLoc)) {
+    return 1;
+  }
   ActiveStoreSvc* pASS(0);
   assert( pSvcLoc->service("ActiveStoreSvc", pASS, true).isSuccess() );
   assert( pASS->activeStore() == pASS->operator->() );
diff --git a/Control/StoreGate/test/ReadDecorHandle_test.cxx b/Control/StoreGate/test/ReadDecorHandle_test.cxx
index e59c4d5e161670a1df62169c1e810021d9d22a5a..9ffefe508e5dffff0ecd7efd88ad379bb42550a1 100644
--- a/Control/StoreGate/test/ReadDecorHandle_test.cxx
+++ b/Control/StoreGate/test/ReadDecorHandle_test.cxx
@@ -59,6 +59,7 @@ void test1()
   assert (h1.storeHandle().name() == "StoreGateSvc");
   assert (h1.mode() == Gaudi::DataHandle::Reader);
   assert (h1.auxid() == ityp);
+  assert (!h1.isPresent());
 
   SGTest::TestStore dumstore;
   EventContext ctx5;
@@ -209,6 +210,7 @@ void test3()
   SG::ReadDecorHandle<MyObjCont, int> h1 (k1);
   assert (h1.setProxyDict (&testStore).isSuccess());
   assert (h1.auxid() == ityp);
+  assert (h1.isPresent());
   assert (!h1.isAvailable());
 
   MyObj::Decorator<int> adec ("aaa");
@@ -310,7 +312,10 @@ int main()
 {
   errorcheck::ReportMessage::hideErrorLocus();
   ISvcLocator* svcloc;
-  Athena_test::initGaudi("VarHandleBase_test.txt", svcloc); //need MessageSvc
+  //need MessageSvc
+  if (!Athena_test::initGaudi("VarHandleBase_test.txt", svcloc)) {
+    return 1;
+  }
 
   test1();
   test2();
diff --git a/Control/StoreGate/test/ReadHandle_test.cxx b/Control/StoreGate/test/ReadHandle_test.cxx
index 1f0985cf5f41fbcb611b6a6de0321913645ff883..f3240b151d64fb8808cfdde9a35aaf15f5266239 100644
--- a/Control/StoreGate/test/ReadHandle_test.cxx
+++ b/Control/StoreGate/test/ReadHandle_test.cxx
@@ -288,14 +288,14 @@ void test5()
   SG::WriteHandleKey<MyObj> h2 ("foo3", "FooSvc");
   assert (h1.alias (h2).isSuccess());
   assert (testStore.proxy (MyCLID, "foo3") == prox1);
-  assert (prox1->transientAddress()->alias().count ("foo3") == 1);
+  assert (prox1->alias().count ("foo3") == 1);
   #if 0
 
   // Making symlink.
   SG::WriteHandleKey<MyObj2> h3 ("foo1", "FooSvc");
   assert (h1.symLink (h3).isSuccess());
   assert (testStore.proxy (ClassID_traits<MyObj2>::ID(), "foo1") == prox1);
-  assert (prox1->transientAddress()->transientID (ClassID_traits<MyObj2>::ID()));
+  assert (prox1->transientID (ClassID_traits<MyObj2>::ID()));
 
   // Should give an error.
   SG::WriteHandleKey<MyObj2> h4 ("foo3", "FooSvc");
@@ -308,7 +308,10 @@ int main()
 {
   errorcheck::ReportMessage::hideErrorLocus();
   ISvcLocator* svcloc;
-  Athena_test::initGaudi("VarHandleBase_test.txt", svcloc); //need MessageSvc
+  //need MessageSvc
+  if (!Athena_test::initGaudi("VarHandleBase_test.txt", svcloc)) {
+    return 1;
+  }
 
   test1();
   test2();
diff --git a/Control/StoreGate/test/SGHive_test.cxx b/Control/StoreGate/test/SGHive_test.cxx
index a899b4547d1c9556d3420991516d86d5e43d7426..675144cd118baafed15cdd01d1e90caaa1ff5dd1 100644
--- a/Control/StoreGate/test/SGHive_test.cxx
+++ b/Control/StoreGate/test/SGHive_test.cxx
@@ -136,7 +136,9 @@ public:
 int main() {
   cout << "*** SGHiveTest BEGINS ***" << endl;
   ISvcLocator* pSvcLoc;
-  initGaudi("SGHive_test.txt", pSvcLoc);
+  if (!initGaudi("SGHive_test.txt", pSvcLoc)) {
+    return 1;
+  }
   IHiveWhiteBoard* pWB(0);
   assert( pSvcLoc->service("SG::HiveMgrSvc/HiveMgrSvc", pWB, true).isSuccess() );
 
diff --git a/Control/StoreGate/test/SGTiming_test.cxx b/Control/StoreGate/test/SGTiming_test.cxx
index 42e49b683e3331cad8686f460e6ca1ef3db9427b..09a9d627ba6b37c1740e2dc7d75f18eb59124be3 100644
--- a/Control/StoreGate/test/SGTiming_test.cxx
+++ b/Control/StoreGate/test/SGTiming_test.cxx
@@ -21,7 +21,9 @@ int main() {
   std::cout << "**** SGTimingTest BEGINS ****" << std::endl;
 
   ISvcLocator* pSvcLoc;
-  Athena_test::initGaudi("SGTiming_test.txt", pSvcLoc);
+  if (!Athena_test::initGaudi("SGTiming_test.txt", pSvcLoc)) {
+    return 1;
+  }
 
   StoreGateSvc* pSG(0);
   assert( pSvcLoc->service("StoreGateSvc", pSG, true).isSuccess() );
diff --git a/Control/StoreGate/test/SGtests.cxx b/Control/StoreGate/test/SGtests.cxx
index 45f8797a2c53c9bcc6cd82ea3c7c06ea97f855ba..cdc805698d030dff94c2b7282a4ff7d275ee4f08 100644
--- a/Control/StoreGate/test/SGtests.cxx
+++ b/Control/StoreGate/test/SGtests.cxx
@@ -149,6 +149,7 @@ public:
   virtual void lock() { m_locked = true; }
   virtual void clearDecorations() { std::abort(); }
   virtual size_t size() const { std::abort(); }
+  virtual void lockDecoration (SG::auxid_t) { std::abort(); }
 
   bool m_locked;
 
@@ -166,8 +167,8 @@ public:
   virtual const CLID& clID() const override { return m_clid; }
   virtual void* object() override { return m_obj; }
   virtual const std::type_info& tinfo() const override { return typeid(Foo); }
-  virtual void* cast (CLID, SG::IRegisterTransient*, bool) const override { std::abort(); }
-  virtual void* cast (const std::type_info&, SG::IRegisterTransient*, bool) const override { std::abort(); }
+  virtual void* cast (CLID, SG::IRegisterTransient*, bool) override { std::abort(); }
+  virtual void* cast (const std::type_info&, SG::IRegisterTransient*, bool) override { std::abort(); }
   virtual DataBucketBase* clone() const override { std::abort(); }
   virtual void relinquish() override { std::abort(); }
   virtual void lock() override { std::abort(); }
@@ -187,12 +188,31 @@ namespace Athena_test
   static const bool LOCKED(false);
   static const bool RESET(true), DELETE(false);
 
+  void checkCLIDs (::StoreGateSvc& rSG, const std::set<CLID>& expCLIDs)
+  {
+    std::vector<CLID> clids = rSG.clids();
+    std::set<CLID> clid_set (clids.begin(), clids.end());
+    if (expCLIDs != clid_set) {
+      cout << "ERROR: CLID set mismatch\n";
+      cout << "  Expected ";
+      for (CLID id : expCLIDs) cout << id << " ";
+      cout << "\n  Got: ";
+      for (CLID id : clid_set) cout << id << " ";
+      cout << "\n";
+      std::abort();
+    }
+  }
+
   void testRecord(::StoreGateSvc& rSG) 
   {  
     cout << "*** StoreGateSvcClient_test record BEGINS ***" << endl;
+    std::vector<CLID> initCLIDs = rSG.clids();
+    std::set<CLID> expCLIDs (initCLIDs.begin(), initCLIDs.end());
     Foo* pFoo = new Foo(1);    
     //    cout << "pFoo=" << hex << pFoo << dec << endl;
     assert(rSG.record(pFoo, "pFoo1").isSuccess());
+    expCLIDs.insert (ClassID_traits<Foo>::ID());
+    checkCLIDs (rSG, expCLIDs);
     //can't record with same key
     SGASSERTERROR(rSG.record(new Foo(3), "pFoo1", LOCKED).isSuccess());
     //can't record same object twice
@@ -272,6 +292,7 @@ namespace Athena_test
     /// 14 Foo objects recorded above : check it
     assert(rSG.typeCount<Foo>() == 14);
 
+    checkCLIDs (rSG, expCLIDs);
 
     cout << "*** StoreGateSvcClient_test records OK ***\n\n" <<endl;
   }
@@ -389,6 +410,9 @@ namespace Athena_test
 
   void test_symlink2 (::StoreGateSvc& sg)
   {
+    std::vector<CLID> initCLIDs = sg.clids();
+    std::set<CLID> expCLIDs (initCLIDs.begin(), initCLIDs.end());
+
     // More symlink tests.
     // Check that we can put an object in and get the properly converted
     // base type out via the symlink.  Also tests auto symlink making.
@@ -408,6 +432,10 @@ namespace Athena_test
     std::cout << &sg << sg.name()  << std::endl;
     //    assert (dp->store() == &sg);
 
+    expCLIDs.insert (ClassID_traits<B1>::ID());
+    expCLIDs.insert (ClassID_traits<D1>::ID());
+    checkCLIDs (sg, expCLIDs);
+
     // create alias with type, key
     assert (sg.setAlias(d1, "d1Alias").isSuccess());
     D1* d1Alias = 0;
@@ -551,15 +579,6 @@ namespace Athena_test
 
 
 
-// Hack to get store from sg svc --- this is declared as a friend.
-class EventDumperSvc
-{
-public:
-  static SG::DataStore* get_store (::StoreGateSvc& sg)
-  { return sg.store(); }
-};
-
-
 namespace Athena_test {
   void test_symlink3 (::StoreGateSvc& sg)
   {
@@ -573,15 +592,14 @@ namespace Athena_test {
       new SG::TransientAddress (ClassID_traits<D1>::ID(), "dd",
                                 pIOA, false);
     DataProxy* dp = new SG::DataProxy (taddr, &cnv);
-    SG::DataStore* store = EventDumperSvc::get_store (sg);
-    assert (store->addToStore (ClassID_traits<D1>::ID(), dp).isSuccess());
+    assert (sg.addToStore (ClassID_traits<D1>::ID(), dp).isSuccess());
     IOpaqueAddress *pIOAB(new TestIOA);
     taddr =
       new SG::TransientAddress (ClassID_traits<D1>::ID(), "dd",
                                 pIOAB, false);
     taddr->setTransientID (ClassID_traits<B1>::ID());
     DataProxy* dpB = new SG::DataProxy (taddr, &cnv);
-    assert (store->addToStore (ClassID_traits<B1>::ID(), dpB).isSuccess());
+    assert (sg.addToStore (ClassID_traits<B1>::ID(), dpB).isSuccess());
 
     D1* d1 = 0;
     B1* b1 = 0;
diff --git a/Control/StoreGate/test/UpdateHandleKey_test.cxx b/Control/StoreGate/test/UpdateHandleKey_test.cxx
index 406c14764e74c8c84a35e550c0683b5377d8bf29..5fe3e4d6c33d02e76f9fc48c04412b57c0b7a95b 100644
--- a/Control/StoreGate/test/UpdateHandleKey_test.cxx
+++ b/Control/StoreGate/test/UpdateHandleKey_test.cxx
@@ -31,7 +31,7 @@ void test1()
   SG::UpdateHandleKey<MyObj> k1 ("aaa");
   assert (k1.clid() == 293847295);
   assert (k1.key() == "aaa");
-  assert (k1.mode() == Gaudi::DataHandle::Updater);
+  assert (k1.mode() == Gaudi::DataHandle::Reader);
   assert (k1.storeHandle().name() == "StoreGateSvc");
   assert (!k1.storeHandle().isSet());
   assert (k1.initialize().isSuccess());
@@ -40,21 +40,21 @@ void test1()
   k1 = "aab";
   assert (k1.clid() == 293847295);
   assert (k1.key() == "aab");
-  assert (k1.mode() == Gaudi::DataHandle::Updater);
+  assert (k1.mode() == Gaudi::DataHandle::Reader);
   assert (k1.storeHandle().name() == "StoreGateSvc");
   assert (k1.storeHandle().isSet());
 
   k1 = "FeeSvc+aac";
   assert (k1.clid() == 293847295);
   assert (k1.key() == "aac");
-  assert (k1.mode() == Gaudi::DataHandle::Updater);
+  assert (k1.mode() == Gaudi::DataHandle::Reader);
   assert (k1.storeHandle().name() == "FeeSvc");
   assert (!k1.storeHandle().isSet());
 
   SG::UpdateHandleKey<MyObj> k2 ("bbb", "FooSvc");
   assert (k2.clid() == 293847295);
   assert (k2.key() == "bbb");
-  assert (k2.mode() == Gaudi::DataHandle::Updater);
+  assert (k2.mode() == Gaudi::DataHandle::Reader);
   assert (k2.storeHandle().name() == "FooSvc");
   assert (!k2.storeHandle().isSet());
 }
diff --git a/Control/StoreGate/test/UpdateHandle_test.cxx b/Control/StoreGate/test/UpdateHandle_test.cxx
index b78aadda9ef9dcd84fce61953250ee4e02682de8..14df8affe9344dcf003a3f54e753358505b9e1e4 100644
--- a/Control/StoreGate/test/UpdateHandle_test.cxx
+++ b/Control/StoreGate/test/UpdateHandle_test.cxx
@@ -44,14 +44,14 @@ void test1()
   assert (h1.clid() == MyCLID);
   assert (h1.key() == "");
   assert (h1.storeHandle().name() == "StoreGateSvc");
-  assert (h1.mode() == Gaudi::DataHandle::Updater);
+  assert (h1.mode() == Gaudi::DataHandle::Reader);
 
   SG::UpdateHandle<MyObj> h2 ("foo", "FooSvc");
   assert (h2.clid() == MyCLID);
   assert (h2.key() == "foo");
   assert (h2.name() == "foo");
   assert (h2.storeHandle().name() == "FooSvc");
-  assert (h2.mode() == Gaudi::DataHandle::Updater);
+  assert (h2.mode() == Gaudi::DataHandle::Reader);
 
   SG::UpdateHandleKey<MyObj> k3 ("asd");
   assert (k3.initialize().isSuccess());
@@ -59,7 +59,7 @@ void test1()
   assert (h3.clid() == MyCLID);
   assert (h3.key() == "asd");
   assert (h3.storeHandle().name() == "StoreGateSvc");
-  assert (h3.mode() == Gaudi::DataHandle::Updater);
+  assert (h3.mode() == Gaudi::DataHandle::Reader);
 
   {
     SG::UpdateHandleKey<MyObj> k4 ("asd", "BazSvc");
@@ -75,7 +75,7 @@ void test1()
   assert (h5.clid() == MyCLID);
   assert (h5.key() == "asd");
   assert (h5.storeHandle().name() == "StoreGateSvc");
-  assert (h5.mode() == Gaudi::DataHandle::Updater);
+  assert (h5.mode() == Gaudi::DataHandle::Reader);
   assert (h5.store() == "TestStore");
 
   SG::UpdateHandleKey<MyObj> k6 ("asd", "OtherStore");
@@ -84,7 +84,7 @@ void test1()
   assert (h6.clid() == MyCLID);
   assert (h6.key() == "asd");
   assert (h6.storeHandle().name() == "OtherStore");
-  assert (h6.mode() == Gaudi::DataHandle::Updater);
+  assert (h6.mode() == Gaudi::DataHandle::Reader);
   assert (h6.store() == "OtherStore" || h6.store() == "OtherStore_Impl");
 
   {
@@ -236,7 +236,7 @@ void test4()
   assert (h1.clid() == MyCLID);
   assert (h1.key() == "asd");
   assert (h1.storeHandle().name() == "StoreGateSvc");
-  assert (h1.mode() == Gaudi::DataHandle::Updater);
+  assert (h1.mode() == Gaudi::DataHandle::Reader);
 
   SG::UpdateHandleKey<MyObj> k2 ("asd", "BazSvc");
   k2.initialize().ignore(); 
@@ -249,7 +249,7 @@ void test4()
   assert (h2.clid() == MyCLID);
   assert (h2.key() == "asd");
   assert (h2.storeHandle().name() == "StoreGateSvc");
-  assert (h2.mode() == Gaudi::DataHandle::Updater);
+  assert (h2.mode() == Gaudi::DataHandle::Reader);
   assert (h2.store() == "TestStore");
 
   SG::UpdateHandleKey<MyObj> k3 ("asd", "OtherStore");
@@ -258,7 +258,7 @@ void test4()
   assert (h3.clid() == MyCLID);
   assert (h3.key() == "asd");
   assert (h3.storeHandle().name() == "OtherStore");
-  assert (h3.mode() == Gaudi::DataHandle::Updater);
+  assert (h3.mode() == Gaudi::DataHandle::Reader);
   assert (h3.store() == "OtherStore" || h3.store() == "OtherStore_Impl");
 
   SG::UpdateHandleKey<MyObj> k4 ("asd", "BazSvc");
@@ -272,7 +272,10 @@ int main()
   errorcheck::ReportMessage::hideErrorLocus();
   errorcheck::ReportMessage::hideFunctionNames();
   ISvcLocator* svcloc;
-  Athena_test::initGaudi("VarHandleBase_test.txt", svcloc); //need MessageSvc
+  //need MessageSvc
+  if (!Athena_test::initGaudi("VarHandleBase_test.txt", svcloc)) {
+    return 1;
+  }
 
   test1();
   test2();
diff --git a/Control/StoreGate/test/VarHandleBase_test.cxx b/Control/StoreGate/test/VarHandleBase_test.cxx
index 98aa6c4ccb25e4ba72df3d44b5cd2c61b5bdb339..ac40efc68607c3421be4d9df1d7dd9a42d367f1b 100644
--- a/Control/StoreGate/test/VarHandleBase_test.cxx
+++ b/Control/StoreGate/test/VarHandleBase_test.cxx
@@ -421,7 +421,7 @@ void test6()
   testStore.record (new MyObj, "bar");
   assert (h1.setState (&testStore, "bar").isSuccess());
   assert (h1.isInitialized());
-  assert (h1.m_proxy->transientAddress()->name() == "bar");
+  assert (h1.m_proxy->name() == "bar");
 }
 
 
@@ -535,7 +535,7 @@ void test8()
   assert (h3.typeless_dataPointer_impl(false) == nullptr);
   assert (h3.typeless_dataPointer_impl(true) == nullptr);
 
-  testStore.proxy (293847296, "fee")->transientAddress()->setTransientID(293847295);
+  testStore.proxy (293847296, "fee")->setTransientID(293847295);
   assert (h3.typeless_dataPointer_impl(false) == obj2ptr);
   assert (h3.typeless_dataPointer(false) == obj2ptr);
   assert (h3.typeless_cptr() == obj2ptr);
@@ -716,7 +716,10 @@ int main()
 {
   errorcheck::ReportMessage::hideErrorLocus();
   ISvcLocator* svcloc;
-  Athena_test::initGaudi("VarHandleBase_test.txt", svcloc); //need MessageSvc
+  //need MessageSvc
+  if (!Athena_test::initGaudi("VarHandleBase_test.txt", svcloc)) {
+    return 1;
+  }
 
   test1();
   test2();
diff --git a/Control/StoreGate/test/VarHandleKeyProperty_test.cxx b/Control/StoreGate/test/VarHandleKeyProperty_test.cxx
index d175db74cdfc910a213a81bba1dbb4962826104e..d82a8a78d88254a9441e2f18d31e8285926ae63e 100644
--- a/Control/StoreGate/test/VarHandleKeyProperty_test.cxx
+++ b/Control/StoreGate/test/VarHandleKeyProperty_test.cxx
@@ -264,7 +264,9 @@ void test5()
 int main()
 {
   ISvcLocator* pDum;
-  Athena_test::initGaudi("VarHandleKeyProperty_test.txt", pDum);
+  if (!Athena_test::initGaudi("VarHandleKeyProperty_test.txt", pDum)) {
+    return 1;
+  }
 
   test1();
   test2();
diff --git a/Control/StoreGate/test/VarHandleProperty_test.cxx b/Control/StoreGate/test/VarHandleProperty_test.cxx
index 4dcb795cdf8c6dc5a148a8e0ae681cb69dec5d6f..f76accc00abba7ab4ddbd1f2ece757f1391e8f74 100644
--- a/Control/StoreGate/test/VarHandleProperty_test.cxx
+++ b/Control/StoreGate/test/VarHandleProperty_test.cxx
@@ -113,7 +113,9 @@ void test1()
 int main()
 {
   ISvcLocator* pDum;
-  Athena_test::initGaudi("VarHandleProperty_test.txt", pDum);
+  if (!Athena_test::initGaudi("VarHandleProperty_test.txt", pDum)) {
+    return 1;
+  }
 
   test1();
 }
diff --git a/Control/StoreGate/test/VarHandles_test.cxx b/Control/StoreGate/test/VarHandles_test.cxx
index b42dcb0c525b1ead7b688be32086c40fa1a990b8..7d3ab2b1b7dce92015af2a3e112262f9eee52cf2 100644
--- a/Control/StoreGate/test/VarHandles_test.cxx
+++ b/Control/StoreGate/test/VarHandles_test.cxx
@@ -96,7 +96,7 @@ namespace Athena_test {
     assert(hMyU.isValid());
     assert(hMyU->m_i==3);
     assert(*hMyU.cachedPtr() == 3);
-    assert(hMyU!=empty);
+    assert(hMyU==empty);
 
     WriteHandle<MyDataObj> hMy ("hMy");
     assert(!hMy.isInitialized());
diff --git a/Control/StoreGate/test/WriteDecorHandle_test.cxx b/Control/StoreGate/test/WriteDecorHandle_test.cxx
index dfda108872caf368fa5ac9302a460b614f41163b..98eb7dc8b2b090b1df672a08f5b326be694aa678 100644
--- a/Control/StoreGate/test/WriteDecorHandle_test.cxx
+++ b/Control/StoreGate/test/WriteDecorHandle_test.cxx
@@ -59,6 +59,7 @@ void test1()
   assert (h1.storeHandle().name() == "StoreGateSvc");
   assert (h1.mode() == Gaudi::DataHandle::Writer);
   assert (h1.auxid() == ityp);
+  assert (!h1.isPresent());
 
   SGTest::TestStore dumstore;
   EventContext ctx5;
@@ -210,10 +211,13 @@ void test3()
   SG::WriteDecorHandle<MyObjCont, int> h1 (k1);
   assert (h1.setProxyDict (&testStore).isSuccess());
   assert (h1.auxid() == ityp);
+  assert (!h1.isAvailable());
+  assert (h1.isPresent());
 
   h1.getDecorationArray()[0] = 10;
   h1 (*(*pcont)[1]) = 11;
   h1 (2) = 12;
+  assert (h1.isAvailable());
 
   MyObj::Accessor<int> adec ("aaa");
   assert (adec (*(*pcont)[0]) == 10);
@@ -303,7 +307,10 @@ int main()
 {
   errorcheck::ReportMessage::hideErrorLocus();
   ISvcLocator* svcloc;
-  Athena_test::initGaudi("VarHandleBase_test.txt", svcloc); //need MessageSvc
+  //need MessageSvc
+  if (!Athena_test::initGaudi("VarHandleBase_test.txt", svcloc)) {
+    return 1;
+  }
 
   test1();
   test2();
diff --git a/Control/StoreGate/test/WriteHandle_test.cxx b/Control/StoreGate/test/WriteHandle_test.cxx
index 72ea967e32f844138343994899294f5a77d06a76..5b9501190ef2af81273936266e03418b95365d6e 100644
--- a/Control/StoreGate/test/WriteHandle_test.cxx
+++ b/Control/StoreGate/test/WriteHandle_test.cxx
@@ -47,6 +47,7 @@ public:
   virtual void lock() override { m_locked = true; }
   virtual void clearDecorations() override { }
   virtual size_t size() const override { return 0; }
+  virtual void lockDecoration (SG::auxid_t) override { std::abort(); }
 
   static std::vector<int> deleted;
 };
@@ -690,13 +691,13 @@ void test12()
   SG::WriteHandleKey<MyObj> h2 ("foo3", "FooSvc");
   assert (h1.alias (h2).isSuccess());
   assert (testStore.proxy (ClassID_traits<MyObj>::ID(), "foo3") == prox1);
-  assert (prox1->transientAddress()->alias().count ("foo3") == 1);
+  assert (prox1->alias().count ("foo3") == 1);
 
   // Making symlink.
   SG::WriteHandleKey<MyObj2> h3 ("foo1", "FooSvc");
   assert (h1.symLink (h3).isSuccess());
   assert (testStore.proxy (ClassID_traits<MyObj2>::ID(), "foo1") == prox1);
-  assert (prox1->transientAddress()->transientID (ClassID_traits<MyObj2>::ID()));
+  assert (prox1->transientID (ClassID_traits<MyObj2>::ID()));
 
   // Should give an error.
   SG::WriteHandleKey<MyObj2> h4 ("foo3", "FooSvc");
@@ -709,7 +710,10 @@ int main()
   errorcheck::ReportMessage::hideErrorLocus();
   errorcheck::ReportMessage::hideFunctionNames();
   ISvcLocator* svcloc;
-  Athena_test::initGaudi("VarHandleBase_test.txt", svcloc); //need MessageSvc
+  //need MessageSvc
+  if (!Athena_test::initGaudi("VarHandleBase_test.txt", svcloc)) {
+    return 1;
+  }
 
   test1();
   test2();
diff --git a/Control/StoreGateBindings/cmt/requirements b/Control/StoreGateBindings/cmt/requirements
deleted file mode 100644
index 0940450edadc6f5052916205c160cab9f7a176c9..0000000000000000000000000000000000000000
--- a/Control/StoreGateBindings/cmt/requirements
+++ /dev/null
@@ -1,55 +0,0 @@
-package StoreGateBindings
-
-author P. Calafiura    <Paolo.Calafiura@cern.ch>
-author Wim Lavrijsen   <WLavrijsen@lbl.gov>
-author Sebastien Binet <binet@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## Put here your package dependencies...
-use AtlasPyROOT		AtlasPyROOT-*		External -no_auto_imports
-
-##
-
-private
-use GaudiInterface 	GaudiInterface-* 	External
-use AtlasPython		AtlasPython-*		External 
-use AtlasROOT	 	AtlasROOT-*		External
-use AtlasReflex  	AtlasReflex-*  		External
-use AthenaKernel	AthenaKernel-*		Control
-use SGTools             SGTools-*               Control
-use StoreGate	 	StoreGate-*		Control 
-end_private
-
-# Add cmake compatibility (doesn't do anything on CMT side of things)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS PyROOT)"
-
-branches src doc python
-
-library StoreGateBindings *.cxx
-apply_pattern installed_library
-
-#apply_pattern component_library
-#apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-macro SG_PyROOT_linkopts " -L$(ROOT_home)/lib -lPyROOT"
-macro_append StoreGateBindings_shlibflags " $(SG_PyROOT_linkopts)"
-macro_append StoreGateBindings_shlibflags " $(Python_linkopts)"
-
-private
-#
-# dictionary creation (patterns from Gaudi/SEAL) for bindings
-#
-use AtlasReflex  AtlasReflex-*  External -no_auto_imports
-use AtlasPython  AtlasPython-*  External -no_auto_imports
-
-apply_pattern lcgdict dict=StoreGateBindings \
-   selectionfile=selection.xml \
-   headerfiles="../src/StoreGateBindingsDict.h"
-macro_append StoreGateBindingsDict_shlibflags "  -lStoreGateBindings"
-
-use DataModelRoot                  DataModelRoot-*                  Control
-
-end_private
diff --git a/Control/StoreGateBindings/src/SgPyDataModel.cxx b/Control/StoreGateBindings/src/SgPyDataModel.cxx
index 623aad74d87e9d268a2fb0169c0ab95ef266bcd7..d3ab010f596fb37f61cbbb7a00fea40bdd7fb554 100644
--- a/Control/StoreGateBindings/src/SgPyDataModel.cxx
+++ b/Control/StoreGateBindings/src/SgPyDataModel.cxx
@@ -54,7 +54,7 @@ namespace SG {
 
   void* PyDataBucket::cast( CLID clid,
                             IRegisterTransient* /*itr*/,
-                            bool /*isConst*/ ) const
+                            bool /*isConst*/ )
   {
     // if requested type is same than myself ==> no conversion needed
     if ( clid == m_clid ) {
@@ -101,7 +101,7 @@ namespace SG {
 
   void* PyDataBucket::cast( const std::type_info& tinfo,
                             IRegisterTransient* /*itr*/,
-                            bool /*isConst*/) const
+                            bool /*isConst*/)
   {
     // if regular PyObject, meaningless
     if ( m_clid == PyCLID ) {
diff --git a/Control/StoreGateBindings/src/SgPyDataModel.h b/Control/StoreGateBindings/src/SgPyDataModel.h
index 59a84210473e0d555ed674d5a6faf588e83e10da..9717c7919433934ad95ecf7b2b7e48f31bd13e7f 100644
--- a/Control/StoreGateBindings/src/SgPyDataModel.h
+++ b/Control/StoreGateBindings/src/SgPyDataModel.h
@@ -117,7 +117,7 @@ namespace SG {
      * @param isConst True if the object being converted is regarded as const.
      */
     virtual void* cast (CLID clid, IRegisterTransient* itr = 0,
-                        bool isConst = true) const override;
+                        bool isConst = true) override;
 
 
     /**
@@ -130,7 +130,7 @@ namespace SG {
      */
     virtual void* cast (const std::type_info& tinfo,
                         IRegisterTransient* itr = 0,
-                        bool isConst = true) const override;
+                        bool isConst = true) override;
 
     /**
      * @brief Retrieve reference to class definition structure
diff --git a/Control/StoreGateTests/cmt/requirements b/Control/StoreGateTests/cmt/requirements
deleted file mode 100755
index c5a5730e05df9c30d0e439e91b7d2a6ff8159082..0000000000000000000000000000000000000000
--- a/Control/StoreGateTests/cmt/requirements
+++ /dev/null
@@ -1,38 +0,0 @@
-package StoreGateTests
-
-author  Sebastien Binet <binet@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## For Gaudi tools, services and objects
-use CLIDSvc		CLIDSvc-*		Control
-use AthAllocators	AthAllocators-*		Control
-use AthContainers	AthContainers-*		Control
-use AthenaPython	AthenaPython-*		Control -no_auto_imports
-
-private
-use GaudiInterface 	GaudiInterface-* 	External
-use StoreGate		StoreGate-*		Control
-use AthenaBaseComps     AthenaBaseComps-*       Control
-end_private
-
-branches src src/components doc python share share/tests test
-
-## default is to make a component library
-library StoreGateTests *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py tests/*.py"
-apply_pattern declare_python_modules files="*.py"
-
-
-#
-# dictionary creation (patterns from Gaudi/SEAL) for bindings
-#
-private
-use AtlasReflex		AtlasReflex-*		External
-
-apply_pattern lcgdict dict=StoreGateTests selectionfile=selection.xml \
-   headerfiles="../StoreGateTests/StoreGateTestsDict.h"
-end_private
diff --git a/Control/StoreGateTests/doc/packagedoc.h b/Control/StoreGateTests/doc/packagedoc.h
index ca331a3241da5ea809b9af42d5b904910f617039..86174427312bef61b1b6c58579f05c9540097fbc 100644
--- a/Control/StoreGateTests/doc/packagedoc.h
+++ b/Control/StoreGateTests/doc/packagedoc.h
@@ -25,16 +25,6 @@ A typical test job consists of these 2 algorithms chained together in the topSeq
   The tests can be run via the @c share/test_sgProducerConsumer_jobOptions.py file which will run in sequence the @c SgStressProducer and the @c SgStressConsumer algorithms. Performance data will be gathered during the job by the @c PerfMonSvc and saved into a tuple.
 This tuple can be analyzed later on by the @c perfmon.py script provided by the performance toolbox (see @ref PerfMonSvc)
 
-@ref used_StoreGateTests
 
-@ref requirements_StoreGateTests
 
 */
-
-/**
-@page used_StoreGateTests Used Packages
-*/
-
-/**
-@page requirements_StoreGateTests Requirements
-*/
diff --git a/Control/Valkyrie/cmt/requirements b/Control/Valkyrie/cmt/requirements
deleted file mode 100755
index 0c0c9914b7e648b634eef1b078d61353a1fd4116..0000000000000000000000000000000000000000
--- a/Control/Valkyrie/cmt/requirements
+++ /dev/null
@@ -1,30 +0,0 @@
-package Valkyrie
-author  Sebastien Binet  <binet@cern.ch>
-author  Frank Winklmeier <fwinkl@cern>
-
-use AtlasPolicy 	AtlasPolicy-*
-use AthenaCommon	AthenaCommon-*		Control -no_auto_imports
-
-private
-
-use GaudiInterface 	GaudiInterface-* 	External
-use AtlasValgrind	AtlasValgrind-*		External
-use AtlasBoost          AtlasBoost-*            External
-use AthenaKernel	AthenaKernel-*		Control
-use AthenaBaseComps	AthenaBaseComps-*	Control
-
-branches Valkyrie src src/components doc python share
-
-library Valkyrie *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_scripts files="valkyrie.py callgrind.py"
-
-# no valgrind for darwin...
-apply_pattern disable_package_on platform=Darwin
-
-end_private
-
diff --git a/Control/Valkyrie/doc/packagedoc.h b/Control/Valkyrie/doc/packagedoc.h
index 5fd5e8267c803855b69a7e7afa1e86aa35a80d0a..a5220b32bfd3418d5003d0923a7950f68b2dbcec 100644
--- a/Control/Valkyrie/doc/packagedoc.h
+++ b/Control/Valkyrie/doc/packagedoc.h
@@ -93,14 +93,4 @@ Additonal profiles can be dumped on any "Incident" by setting:
     
 @section Valkyrie_ValkyrieExtraPages Extra pages
 
-  - @ref ValkyrieUsedPackages
-  - @ref ValkyrieRequirements
-*/
-
-/**
-   @page ValkyrieUsedPackages Uses packages
-*/
-
-/**
-   @page ValkyrieRequirements Requirements
 */
diff --git a/Control/xAODRootAccess/Root/TAuxStore.cxx b/Control/xAODRootAccess/Root/TAuxStore.cxx
index 91d949fb2e3901d0aa9a23edd5d5cf15c027cab3..80830083f9437c0eb6d7136eca44bfa0e8cca03d 100644
--- a/Control/xAODRootAccess/Root/TAuxStore.cxx
+++ b/Control/xAODRootAccess/Root/TAuxStore.cxx
@@ -464,6 +464,15 @@ namespace xAOD {
       return;
    }
 
+   /// Lock a decoration.
+   void TAuxStore::lockDecoration (SG::auxid_t auxid)
+   { 
+     if( m_transientStore ) {
+       m_transientStore->lockDecoration (auxid);
+     }
+   }
+
+
    size_t TAuxStore::size() const {
 
       // First, try to find a managed vector in the store:
@@ -1006,10 +1015,14 @@ namespace xAOD {
       }
 
       // Create a new branch handle:
+      const std::type_info* objType = brType;
+      if (containerBranch) {
+        objType = m_vecs[ auxid ]->objType();
+        if (!objType)
+          objType = SG::AuxTypeRegistry::instance().getType( auxid );
+      }
       m_branches[ auxid ] = new TBranchHandle( staticBranch, primitiveBranch,
-                                               (containerBranch ?
-                                                m_vecs[ auxid ]->objType() :
-                                                brType),
+                                               objType,
                                                ( containerBranch ?
                                                  m_vecs[ auxid ]->toVector() :
                                                  m_vecs[ auxid ]->toPtr() ),
diff --git a/Control/xAODRootAccess/Root/TEventProxyDict.cxx b/Control/xAODRootAccess/Root/TEventProxyDict.cxx
index 99d204486c55cdaa7a0bf409e9309fafab0621ff..d69c7844f36556087e48179f95dbf97e2614fed6 100644
--- a/Control/xAODRootAccess/Root/TEventProxyDict.cxx
+++ b/Control/xAODRootAccess/Root/TEventProxyDict.cxx
@@ -75,7 +75,7 @@ namespace xAODPrivate {
 
       /// Return the object, cast to a CLID's type
       void* cast( CLID, SG::IRegisterTransient*,
-                  bool ) const override {
+                  bool ) override {
 
          throw std::runtime_error( "THolderBucket::cast not implemented" );
          return 0;
@@ -84,7 +84,7 @@ namespace xAODPrivate {
       /// Return the object, cast to a certain type
       void* cast( const std::type_info& tinfo,
                   SG::IRegisterTransient*,
-                  bool isConst ) const override {
+                  bool isConst ) override {
 
          // Do the cast:
          static const bool QUIET = true;
diff --git a/Control/xAODRootAccess/cmt/Makefile.RootCore b/Control/xAODRootAccess/cmt/Makefile.RootCore
deleted file mode 100644
index dded219e2e56a8031f0d4e6fc1dbc8aa7b60504e..0000000000000000000000000000000000000000
--- a/Control/xAODRootAccess/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,25 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = xAODRootAccess
-PACKAGE_PRELOAD  = Tree Net
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = AthContainers xAODCore xAODEventFormat xAODRootAccessInterfaces
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 1
-PACKAGE_SCRIPTS  = scripts/checkxAOD.py
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Control/xAODRootAccess/cmt/requirements b/Control/xAODRootAccess/cmt/requirements
deleted file mode 100644
index 9efb56d0c93d34e42fa994376dc5ab85b6f04417..0000000000000000000000000000000000000000
--- a/Control/xAODRootAccess/cmt/requirements
+++ /dev/null
@@ -1,46 +0,0 @@
-package xAODRootAccess
-# $Id: requirements 784654 2016-11-16 17:17:32Z krasznaa $
-
-public
-
-use AtlasPolicy              AtlasPolicy-*
-use AtlasROOT                AtlasROOT-*                External
-
-apply_tag ROOTNetLibs
-
-use AthContainers            AthContainers-*            Control
-use AthContainersInterfaces  AthContainersInterfaces-*  Control
-use xAODCore                 xAODCore-*                 Event/xAOD
-use xAODEventFormat          xAODEventFormat-*          Event/xAOD
-use xAODRootAccessInterfaces xAODRootAccessInterfaces-* Control
-use SGTools                  SGTools-*                  Control
-
-apply_pattern installed_library
-library xAODRootAccess ../Root/*.cxx
-
-macro_append xAODRootAccess_dependencies " xAODRootAccessDict "
-
-apply_pattern have_root_headers root_headers="tools/TTransTrees.h \
-                                              tools/TEventBranch.h \
-                                              tools/TEventTree.h \
-                                              tools/TMetaBranch.h \
-                                              tools/TMetaTree.h \
-                                              tools/TEventBranch.h \
-                                              tools/TEventTree.h \
-                                              tools/TMetaBranch.h \
-                                              tools/TMetaTree.h \
-                                              tools/TFileChecker.h \
-                                              tools/TFileMerger.h \
-                                              MakeTransientTree.h \
-                                              Init.h \
-                                              ../Root/LinkDef.h" \
-                                headers_lib="xAODRootAccess"
-
-private
-
-use AtlasReflex              AtlasReflex-*              External
-
-apply_pattern lcgdict dict=xAODRootAccessDict selectionfile=selection.xml \
-                      headerfiles="../xAODRootAccess/xAODRootAccessDict.h"
-
-end_private
diff --git a/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h b/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h
index f520c01d5819ed5586b0c9ba7fa624e8f8a57161..bf5505ce59d438ea774332ef4bc80c617b0e5bf8 100644
--- a/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h
+++ b/Control/xAODRootAccess/xAODRootAccess/TAuxStore.h
@@ -128,7 +128,10 @@ namespace xAOD {
       /// decorations.
       virtual void clearDecorations(); 
 
-      /// Return the number of elements in the store
+      /// Lock a decoration.
+      virtual void lockDecoration (SG::auxid_t auxid);
+
+     /// Return the number of elements in the store
       virtual size_t size() const;
 
       /// @}
diff --git a/Control/xAODRootAccessInterfaces/cmt/Makefile.RootCore b/Control/xAODRootAccessInterfaces/cmt/Makefile.RootCore
deleted file mode 100644
index 0d6ec01faab631cdcbd6a90c9a5e12c8be469fbe..0000000000000000000000000000000000000000
--- a/Control/xAODRootAccessInterfaces/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,24 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = xAODRootAccessInterfaces
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = 
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 0
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Control/xAODRootAccessInterfaces/cmt/requirements b/Control/xAODRootAccessInterfaces/cmt/requirements
deleted file mode 100644
index 670fab57838e17dae04bc80fdac601c15ac24ed7..0000000000000000000000000000000000000000
--- a/Control/xAODRootAccessInterfaces/cmt/requirements
+++ /dev/null
@@ -1,9 +0,0 @@
-package xAODRootAccessInterfaces
-# $Id: requirements 744380 2016-05-03 09:18:10Z krasznaa $
-
-use AtlasPolicy    AtlasPolicy-*
-use AtlasROOT      AtlasROOT-* External
-
-apply_pattern installed_library
-library xAODRootAccessInterfaces ../Root/*.cxx
-
diff --git a/DataQuality/DataQualityConfigurations/CMakeLists.txt b/DataQuality/DataQualityConfigurations/CMakeLists.txt
index 4830d8c7eda26664efcbb1fec095e4de20a6baef..2c303f12969d88414b75316fc949f109f8d4a945 100644
--- a/DataQuality/DataQualityConfigurations/CMakeLists.txt
+++ b/DataQuality/DataQualityConfigurations/CMakeLists.txt
@@ -11,7 +11,10 @@ atlas_depends_on_subdirs(PRIVATE DataQuality/DataQualityInterfaces)
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
-atlas_install_scripts( scripts/MergeConfigs.py scripts/UploadDQAMITag.py scripts/merge_all_han_configs.sh scripts/merge_some_han_configs.sh scripts/han-config-indent.sh scripts/han-config-check.sh scripts/han-config-parse.awk )
+atlas_install_scripts( scripts/MergeConfigs.py scripts/UploadDQAMITag.py
+   scripts/merge_all_han_configs.sh scripts/merge_some_han_configs.sh
+   scripts/han-config-indent.sh scripts/han-config-check.sh
+   scripts/han-config-parse.awk )
 
 execute_process(
   COMMAND git log -1 --format=%H
@@ -20,37 +23,70 @@ execute_process(
   OUTPUT_STRIP_TRAILING_WHITESPACE
 )
 
-# Merge all han configurations
-set( han_config_files collisions_run collisions_minutes10
-                      cosmics_run cosmics_minutes10
-		      heavyions_run heavyions_minutes10 )
+# The list of generated files:
 set( hcfgfiles )
 
-foreach (hanfile IN LISTS han_config_files)
-  add_custom_command(
-    OUTPUT ${CMAKE_DATA_OUTPUT_DIRECTORY}/DataQualityConfigurations/${hanfile}.hcfg
-    COMMENT "merge & build han configuration ${hanfile}"
-    # Merge
-    COMMAND ${CMAKE_COMMAND} -E env GIT_COMMIT_HASH=${GIT_COMMIT_HASH}
+# Loop over all configurations:
+foreach( hanfile collisions_run collisions_minutes10
+      cosmics_run cosmics_minutes10 heavyions_run heavyions_minutes10 )
+
+   # The name of the output file:
+   set( outputFile
+      ${CMAKE_DATA_OUTPUT_DIRECTORY}/DataQualityConfigurations/${hanfile}.hcfg )
+
+   # Get a list of all files used by han-config-gen:
+   file( GLOB configInputFiles
+      ${CMAKE_CURRENT_SOURCE_DIR}/config/*/${hanfile}.config
+      ${CMAKE_CURRENT_SOURCE_DIR}/config/*/*/${hanfile}.config )
+
+   # The name of the generated config file:
+   set( configOutputFile
+      ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${hanfile}.config )
+
+   # Set up the file generation command(s):
+   add_custom_command(
+      # The output to generate:
+      OUTPUT ${outputFile}
+      COMMENT "Merge & build han configuration ${hanfile}"
+      # Merge
+      COMMAND ${CMAKE_COMMAND} -E env GIT_COMMIT_HASH=${GIT_COMMIT_HASH}
       ${CMAKE_CURRENT_SOURCE_DIR}/scripts/MergeConfigs.py ${hanfile}.config
-      ${CMAKE_CURRENT_SOURCE_DIR}/config
-      ${CMAKE_CURRENT_BINARY_DIR}/${hanfile}.config
-    # Build binary config
-    COMMAND ${CMAKE_BINARY_DIR}/atlas_build_run.sh han-config-gen
-      ${CMAKE_CURRENT_BINARY_DIR}/${hanfile}.config
-    # Deploy binary config
-    COMMAND ${CMAKE_COMMAND} -E copy
-      ${CMAKE_CURRENT_BINARY_DIR}/${hanfile}.hcfg
-      ${CMAKE_DATA_OUTPUT_DIRECTORY}/DataQualityConfigurations/${hanfile}.hcfg
-    DEPENDS scripts/MergeConfigs.py config/*/${hanfile}.config
-  )
-  set( hcfgfiles ${hcfgfiles} 
-       ${CMAKE_DATA_OUTPUT_DIRECTORY}/DataQualityConfigurations/${hanfile}.hcfg )
-  install( FILES ${CMAKE_DATA_OUTPUT_DIRECTORY}/DataQualityConfigurations/${hanfile}.hcfg
-           DESTINATION ${CMAKE_INSTALL_DATADIR}/DataQualityConfigurations OPTIONAL )
-endforeach(hanfile)
-
-add_custom_target( DataQualityConfigurations_han_configs ALL SOURCES ${hcfgfiles} )
-add_dependencies( DataQualityConfigurations_han_configs han-config-gen )
-
-add_dependencies( Package_DataQualityConfigurations DataQualityConfigurations_han_configs )
+      ${CMAKE_CURRENT_SOURCE_DIR}/config ${configOutputFile}
+      # Build binary config
+      COMMAND ${CMAKE_BINARY_DIR}/atlas_build_run.sh han-config-gen
+      ${configOutputFile}
+      # Deploy binary config
+      COMMAND ${CMAKE_COMMAND} -E copy
+      ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${hanfile}.hcfg
+      ${outputFile}
+      # Dependencies for the command:
+      DEPENDS scripts/MergeConfigs.py ${configInputFiles} )
+
+   # Remember the generated file's name:
+   list( APPEND hcfgfiles ${outputFile} )
+
+   # Install the generated file:
+   install( FILES ${outputFile}
+      DESTINATION ${CMAKE_INSTALL_DATADIR}/DataQualityConfigurations OPTIONAL )
+
+   # Clean up:
+   unset( outputFile )
+   unset( configInputFiles )
+   unset( configOutputFile )
+
+endforeach()
+
+# Set up the custom target generating the configurations:
+add_custom_target( DataQualityConfigurations_han_configs
+   ALL SOURCES ${hcfgfiles} )
+add_dependencies( DataQualityConfigurations_han_configs
+   han-config-gen )
+add_dependencies( Package_DataQualityConfigurations
+   DataQualityConfigurations_han_configs )
+set_target_properties( DataQualityConfigurations_han_configs PROPERTIES
+   LABELS DataQualityConfigurations
+   FOLDER DataQuality/DataQualityConfigurations )
+
+# Clean up:
+unset( hcfgfiles )
+
diff --git a/DataQuality/DataQualityConfigurations/config/HLT/HLTbjet/collisions_run.config b/DataQuality/DataQualityConfigurations/config/HLT/HLTbjet/collisions_run.config
index d9c1b9514d093fbf787c92054ac31a0504259df3..3e3769b86f00a5f662a8d98737861feeedd2fe01 100644
--- a/DataQuality/DataQualityConfigurations/config/HLT/HLTbjet/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/HLT/HLTbjet/collisions_run.config
@@ -1,5 +1,5 @@
 ######################################################################
-# $Id: collisions_run.config Wed Apr 19 13:49:38 2017 enagy $
+# file  collisions_run.config  Sat Jul 22 14:02:10 2017 enagy
 ######################################################################
 
 #######################
@@ -18,31 +18,31 @@ output top_level {
 	output HLT {
 		output TRBJT {
 			output Expert {
-				output HLT_j320_boffperf {
+				output HLT_j225_gsc300_boffperf_split {
 				}
-				output HLT_j35_boffperf_split {
+				output HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
 				}
-				output HLT_j35_boffperf_split_FTKRefit {
-				}
-				output HLT_j35_boffperf_split_FTKVtx {
+				output HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
 				}
 				output HLT_j55_boffperf {
 				}
-				output HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15 {
+				output HLT_j55_boffperf_split {
+				}
+				output HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02 {
+				}
+				output HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02 {
 				}
-				output HLT_mu6_j110_bperf_split_dr05_dz02 {
+				output HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20 {
 				}
 			}
 			output Shifter {
-				output HLT_j225_gsc360_boffperf_split {
+				output HLT_j35_boffperf_split_FTK_L1J15_FTK {
 				}
-				output HLT_j320_boffperf_split {
+				output HLT_j35_gsc55_boffperf_split {
 				}
-				output HLT_j35_boffperf_split_FTK {
+				output HLT_j60_gsc110_boffperf_split {
 				}
-				output HLT_j55_boffperf_split {
-				}
-				output HLT_mu4_j55_bperf_split_dr05_dz02 {
+				output HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02 {
 				}
 				output Offline {
 				}
@@ -83,2093 +83,1949 @@ algorithm HLTbjet_Histogram_Not_Empty&GatherData {
 dir HLT {
 	dir BjetMon {
 		dir Expert {
-			dir HLT_j320_boffperf {
-				hist IP3D_pb_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
-					display     	= StatBox
-				}
-				hist IP3D_pc_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+			dir HLT_j225_gsc300_boffperf_split {
+				hist IP3D_pb_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist IP3D_pu_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pc_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist PVx_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pu_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist PVy_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist PVz_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_Hist_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist d0_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist diffz0PV0_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_Hist_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist diffzPV0offPVon_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist ed0_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_Hist_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist ez0_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist d0_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist jetEtaPhi_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffz0PV0_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist jetPt_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffzPV0offPVon_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist nJet_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ed0_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist nPV_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ez0_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist nTrack_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetEtaPhi_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist sigz0PV_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist trkEtaPhi_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist trkPt_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist wCOMB_Rbu_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_Hist_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist wIP3D_Rbu_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nTrack_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist wMV2c00_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist sigz0PV_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist wMV2c10_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkEtaPhi_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist wMV2c20_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkPt_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist wSV1_Rbu_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wCOMB_Rbu_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist xEVtx_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wIP3D_Rbu_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist xEVtx_trv_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c00_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist xMVtx_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c10_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist xMVtx_trv_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c20_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist xNVtx_tr_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wSV1_Rbu_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist xNVtx_trv_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist z0_HLT_j320_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_trv_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j320_boffperf
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-			}
-			dir HLT_j35_boffperf_split {
-				hist IP3D_pb_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist IP3D_pc_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_trv_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist IP3D_pu_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_tr_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist PVx_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_trv_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
-				hist PVx_tr_Hist_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist z0_HLT_j225_gsc300_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist PVy_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist PVy_tr_Hist_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist PVz_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist PVz_tr_Hist_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist d0_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist diffz0PV0_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist diffzPV0offPVon_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist ed0_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist ez0_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist jetEtaPhi_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist jetPt_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist nJet_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist nPV_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist nPV_tr_Hist_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist nTrack_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist sigz0PV_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist trkEtaPhi_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist trkPt_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist wCOMB_Rbu_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist wIP3D_Rbu_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist wMV2c00_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist wMV2c10_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist wMV2c20_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist wSV1_Rbu_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist xEVtx_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist xEVtx_trv_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist xMVtx_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist xMVtx_trv_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist xNVtx_tr_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist xNVtx_trv_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
-					display     	= StatBox
-				}
-				hist z0_HLT_j35_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
-					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j225_gsc300_boffperf_split
 					display     	= StatBox
 				}
 			}
-			dir HLT_j35_boffperf_split_FTKRefit {
-				hist IP3D_pb_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+			dir HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+				hist IP3D_pb_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist IP3D_pc_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pc_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist IP3D_pu_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pu_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVx_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVx_tr_Hist_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_Hist_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVy_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVy_tr_Hist_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_Hist_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVz_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVz_tr_Hist_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_Hist_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist d0_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist d0_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist diffz0PV0_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffz0PV0_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist diffzPV0offPVon_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffzPV0offPVon_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist ed0_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ed0_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist ez0_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ez0_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist jetEtaPhi_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetEtaPhi_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist jetPt_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nJet_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nPV_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nPV_tr_Hist_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_Hist_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nTrack_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nTrack_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist sigz0PV_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist sigz0PV_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist trkEtaPhi_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkEtaPhi_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist trkPt_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkPt_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wCOMB_Rbu_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wCOMB_Rbu_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wIP3D_Rbu_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wIP3D_Rbu_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wMV2c00_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c00_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wMV2c10_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c10_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wMV2c20_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c20_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wSV1_Rbu_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wSV1_Rbu_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xEVtx_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xEVtx_trv_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_trv_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xMVtx_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xMVtx_trv_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_trv_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xNVtx_tr_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_tr_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xNVtx_trv_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_trv_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
-				hist z0_HLT_j35_boffperf_split_FTKRefit {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist z0_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKRefit_L1J15_FTK
 					display     	= StatBox
 				}
 			}
-			dir HLT_j35_boffperf_split_FTKVtx {
-				hist IP3D_pb_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+			dir HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+				hist IP3D_pb_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist IP3D_pc_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pc_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist IP3D_pu_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pu_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVx_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVx_tr_Hist_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_Hist_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVy_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVy_tr_Hist_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_Hist_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVz_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVz_tr_Hist_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_Hist_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist d0_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist d0_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist diffz0PV0_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffz0PV0_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist diffzPV0offPVon_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffzPV0offPVon_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist ed0_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ed0_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist ez0_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ez0_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist jetEtaPhi_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetEtaPhi_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist jetPt_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nJet_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nPV_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nPV_tr_Hist_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_Hist_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nTrack_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nTrack_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist sigz0PV_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist sigz0PV_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist trkEtaPhi_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkEtaPhi_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist trkPt_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkPt_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wCOMB_Rbu_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wCOMB_Rbu_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wIP3D_Rbu_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wIP3D_Rbu_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wMV2c00_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c00_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wMV2c10_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c10_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wMV2c20_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c20_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wSV1_Rbu_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wSV1_Rbu_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xEVtx_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xEVtx_trv_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_trv_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xMVtx_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xMVtx_trv_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_trv_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xNVtx_tr_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_tr_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xNVtx_trv_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_trv_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
-				hist z0_HLT_j35_boffperf_split_FTKVtx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist z0_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx
+					output      	= HLT/TRBJT/Expert/HLT_j35_boffperf_split_FTKVtx_L1J15_FTK
 					display     	= StatBox
 				}
 			}
 			dir HLT_j55_boffperf {
 				hist IP3D_pb_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist IP3D_pc_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist IP3D_pu_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist PVx_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist PVy_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist PVz_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist d0_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist diffz0PV0_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist diffzPV0offPVon_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist ed0_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist ez0_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist jetEtaPhi_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist jetPt_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist nJet_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist nPV_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist nTrack_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist sigz0PV_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist trkEtaPhi_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist trkPt_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist wCOMB_Rbu_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist wIP3D_Rbu_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist wMV2c00_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist wMV2c10_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist wMV2c20_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist wSV1_Rbu_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist xEVtx_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist xEVtx_trv_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist xMVtx_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist xMVtx_trv_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist xNVtx_tr_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist xNVtx_trv_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 				hist z0_HLT_j55_boffperf {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf
 					display     	= StatBox
 				}
 			}
-			dir HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15 {
-				hist DeltaRAll_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+			dir HLT_j55_boffperf_split {
+				hist IP3D_pb_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist DeltaZAll_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pc_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist jetEtaPhi_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pu_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist jetPt_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist muonEtaPhi_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_Hist_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist muonPt_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist nJet_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_Hist_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist nMuon_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-			}
-			dir HLT_mu6_j110_bperf_split_dr05_dz02 {
-				hist DeltaRAll_HLT_mu6_j110_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_Hist_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist DeltaZAll_HLT_mu6_j110_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist d0_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist jetEtaPhi_HLT_mu6_j110_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffz0PV0_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist jetPt_HLT_mu6_j110_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffzPV0offPVon_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist muonEtaPhi_HLT_mu6_j110_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ed0_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist muonPt_HLT_mu6_j110_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ez0_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist nJet_HLT_mu6_j110_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetEtaPhi_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist nMuon_HLT_mu6_j110_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-			}
-		}
-		dir Shifter {
-			dir HLT_j225_gsc360_boffperf_split {
-				hist IP3D_pb_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist IP3D_pc_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist IP3D_pu_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_Hist_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVx_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nTrack_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVx_tr_Hist_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist sigz0PV_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVy_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkEtaPhi_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVy_tr_Hist_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkPt_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVz_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wCOMB_Rbu_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVz_tr_Hist_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wIP3D_Rbu_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist d0_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c00_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist diffz0PV0_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c10_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist diffzPV0offPVon_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c20_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist ed0_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wSV1_Rbu_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist ez0_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist jetEtaPhi_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_trv_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist jetPt_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist nJet_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_trv_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist nPV_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_tr_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist nPV_tr_Hist_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_trv_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist nTrack_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist z0_HLT_j55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_j55_boffperf_split
 					display     	= StatBox
 				}
-				hist sigz0PV_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+			}
+			dir HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02 {
+				hist DeltaRAll_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist trkEtaPhi_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist DeltaZAll_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist trkPt_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetEtaPhi_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist wCOMB_Rbu_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist wIP3D_Rbu_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist muonEtaPhi_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist wMV2c00_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist muonPt_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist wMV2c10_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist wMV2c20_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nMuon_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist wSV1_Rbu_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+			}
+			dir HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02 {
+				hist DeltaRAll_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist xEVtx_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist DeltaZAll_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist xEVtx_trv_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetEtaPhi_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist xMVtx_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist xMVtx_trv_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist muonEtaPhi_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist xNVtx_tr_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist muonPt_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist xNVtx_trv_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist z0_HLT_j225_gsc360_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nMuon_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j225_gsc360_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
 			}
-			dir HLT_j320_boffperf_split {
-				hist IP3D_pb_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+			dir HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20 {
+				hist DeltaRAll_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
+					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20
+					display     	= StatBox
+				}
+				hist DeltaZAll_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
+					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20
+					display     	= StatBox
+				}
+				hist jetEtaPhi_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20
 					display     	= StatBox
 				}
-				hist IP3D_pc_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20
 					display     	= StatBox
 				}
-				hist IP3D_pu_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist muonEtaPhi_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20
 					display     	= StatBox
 				}
-				hist PVx_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist muonPt_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20
 					display     	= StatBox
 				}
-				hist PVx_tr_Hist_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20
 					display     	= StatBox
 				}
-				hist PVy_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nMuon_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
+					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
+					output      	= HLT/TRBJT/Expert/HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20
+					display     	= StatBox
+				}
+			}
+		}
+		dir Shifter {
+			dir HLT_j35_boffperf_split_FTK_L1J15_FTK {
+				hist IP3D_pb_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVy_tr_Hist_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pc_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVz_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pu_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist PVz_tr_Hist_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist d0_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_Hist_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist diffz0PV0_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist diffzPV0offPVon_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_Hist_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist ed0_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist ez0_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_Hist_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist jetEtaPhi_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist d0_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist jetPt_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffz0PV0_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nJet_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffzPV0offPVon_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nPV_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ed0_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nPV_tr_Hist_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ez0_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist nTrack_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetEtaPhi_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist sigz0PV_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist trkEtaPhi_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist trkPt_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wCOMB_Rbu_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_Hist_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wIP3D_Rbu_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nTrack_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wMV2c00_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist sigz0PV_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wMV2c10_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkEtaPhi_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wMV2c20_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkPt_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist wSV1_Rbu_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wCOMB_Rbu_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xEVtx_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wIP3D_Rbu_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xEVtx_trv_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c00_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xMVtx_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c10_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xMVtx_trv_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c20_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xNVtx_tr_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wSV1_Rbu_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist xNVtx_trv_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
-				hist z0_HLT_j320_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_trv_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j320_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
+					display     	= StatBox
+				}
+				hist xMVtx_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
+					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
+					display     	= StatBox
+				}
+				hist xMVtx_trv_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
+					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
+					display     	= StatBox
+				}
+				hist xNVtx_tr_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
+					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
+					display     	= StatBox
+				}
+				hist xNVtx_trv_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
+					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
+					display     	= StatBox
+				}
+				hist z0_HLT_j35_boffperf_split_FTK_L1J15_FTK {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
+					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
+					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK_L1J15_FTK
 					display     	= StatBox
 				}
 			}
-			dir HLT_j35_boffperf_split_FTK {
-				hist IP3D_pb_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+			dir HLT_j35_gsc55_boffperf_split {
+				hist IP3D_pb_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist IP3D_pc_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pc_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist IP3D_pu_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pu_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVx_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVx_tr_Hist_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_Hist_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVy_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVy_tr_Hist_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_Hist_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVz_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist PVz_tr_Hist_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_Hist_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist d0_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist d0_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist diffz0PV0_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffz0PV0_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist diffzPV0offPVon_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffzPV0offPVon_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist ed0_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ed0_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist ez0_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ez0_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist jetEtaPhi_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetEtaPhi_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist jetPt_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist nJet_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist nPV_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist nPV_tr_Hist_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_Hist_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist nTrack_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nTrack_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist sigz0PV_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist sigz0PV_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist trkEtaPhi_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkEtaPhi_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist trkPt_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkPt_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist wCOMB_Rbu_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wCOMB_Rbu_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist wIP3D_Rbu_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wIP3D_Rbu_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist wMV2c00_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c00_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist wMV2c10_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c10_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist wMV2c20_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c20_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist wSV1_Rbu_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wSV1_Rbu_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist xEVtx_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist xEVtx_trv_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_trv_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist xMVtx_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist xMVtx_trv_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_trv_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist xNVtx_tr_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_tr_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist xNVtx_trv_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_trv_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
-				hist z0_HLT_j35_boffperf_split_FTK {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist z0_HLT_j35_gsc55_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j35_boffperf_split_FTK
+					output      	= HLT/TRBJT/Shifter/HLT_j35_gsc55_boffperf_split
 					display     	= StatBox
 				}
 			}
-			dir HLT_j55_boffperf_split {
-				hist IP3D_pb_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+			dir HLT_j60_gsc110_boffperf_split {
+				hist IP3D_pb_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist IP3D_pc_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pc_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist IP3D_pu_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist IP3D_pu_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist PVx_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist PVx_tr_Hist_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVx_tr_Hist_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist PVy_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist PVy_tr_Hist_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVy_tr_Hist_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist PVz_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist PVz_tr_Hist_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist PVz_tr_Hist_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist d0_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist d0_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist diffz0PV0_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffz0PV0_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist diffzPV0offPVon_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist diffzPV0offPVon_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist ed0_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ed0_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist ez0_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist ez0_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist jetEtaPhi_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetEtaPhi_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist jetPt_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist nJet_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist nPV_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist nPV_tr_Hist_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nPV_tr_Hist_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist nTrack_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nTrack_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist sigz0PV_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist sigz0PV_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist trkEtaPhi_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkEtaPhi_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist trkPt_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist trkPt_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist wCOMB_Rbu_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wCOMB_Rbu_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist wIP3D_Rbu_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wIP3D_Rbu_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist wMV2c00_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c00_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist wMV2c10_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c10_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist wMV2c20_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wMV2c20_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist wSV1_Rbu_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist wSV1_Rbu_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist xEVtx_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist xEVtx_trv_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xEVtx_trv_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist xMVtx_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist xMVtx_trv_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xMVtx_trv_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist xNVtx_tr_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_tr_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist xNVtx_trv_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist xNVtx_trv_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
-				hist z0_HLT_j55_boffperf_split {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist z0_HLT_j60_gsc110_boffperf_split {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_j55_boffperf_split
+					output      	= HLT/TRBJT/Shifter/HLT_j60_gsc110_boffperf_split
 					display     	= StatBox
 				}
 			}
-			dir HLT_mu4_j55_bperf_split_dr05_dz02 {
-				hist DeltaRAll_HLT_mu4_j55_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+			dir HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02 {
+				hist DeltaRAll_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_mu4_j55_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Shifter/HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist DeltaZAll_HLT_mu4_j55_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist DeltaZAll_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_mu4_j55_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Shifter/HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist jetEtaPhi_HLT_mu4_j55_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetEtaPhi_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_mu4_j55_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Shifter/HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist jetPt_HLT_mu4_j55_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist jetPt_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_mu4_j55_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Shifter/HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist muonEtaPhi_HLT_mu4_j55_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist muonEtaPhi_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_mu4_j55_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Shifter/HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist muonPt_HLT_mu4_j55_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist muonPt_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_mu4_j55_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Shifter/HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist nJet_HLT_mu4_j55_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nJet_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_mu4_j55_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Shifter/HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
-				hist nMuon_HLT_mu4_j55_bperf_split_dr05_dz02 {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+				hist nMuon_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02 {
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
-					output      	= HLT/TRBJT/Shifter/HLT_mu4_j55_bperf_split_dr05_dz02
+					output      	= HLT/TRBJT/Shifter/HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02
 					display     	= StatBox
 				}
 			}
 			dir Offline {
 				hist PVx {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Shifter/Offline
 					display     	= StatBox
 				}
 				hist PVy {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Shifter/Offline
 					display     	= StatBox
 				}
 				hist PVz {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Shifter/Offline
 					display     	= StatBox
 				}
 				hist nPV {
-					algorithm   	= HLTbjet_Histogram_Not_Empty&GatherData
+					algorithm   	= HLT_Histogram_Not_Empty_with_Ref&GatherData
 					description 	= https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0
 					output      	= HLT/TRBJT/Shifter/Offline
 					display     	= StatBox
diff --git a/DataQuality/DataQualityConfigurations/config/JetTagging/collisions_run.config b/DataQuality/DataQualityConfigurations/config/JetTagging/collisions_run.config
index 4ebd69934e8050f267af1eb9e3a1a53f0c446fbc..2755383fea517a64a6eaa251b2bc23ce48e5c70b 100644
--- a/DataQuality/DataQualityConfigurations/config/JetTagging/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/JetTagging/collisions_run.config
@@ -89,145 +89,145 @@ dir JetTagging {
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w {
+  hist tag_MV_w {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_pT10_20 {
+  hist tag_MV_w_pT10_20 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_pT20_50 {
+  hist tag_MV_w_pT20_50 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_pT50_100 {
+  hist tag_MV_w_pT50_100 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_pT100_200 {
+  hist tag_MV_w_pT100_200 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_pT200 {
+  hist tag_MV_w_pT200 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_eta0_05 {
+  hist tag_MV_w_eta0_05 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_eta05_10 {
+  hist tag_MV_w_eta05_10 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_eta10_15 {
+  hist tag_MV_w_eta10_15 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_eta15_20 {
+  hist tag_MV_w_eta15_20 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_eta20_25 {
+  hist tag_MV_w_eta20_25 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi0_07 {
+  hist tag_MV_w_phi0_07 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi07_14 {
+  hist tag_MV_w_phi07_14 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi14_21 {
+  hist tag_MV_w_phi14_21 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi21_28 {
+  hist tag_MV_w_phi21_28 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi28 {
+  hist tag_MV_w_phi28 {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi_sum85OP {
+  hist tag_MV_w_phi_sum85OP {
     ###display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi_sum77OP {
+  hist tag_MV_w_phi_sum77OP {
     ###display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi_sum70OP {
+  hist tag_MV_w_phi_sum70OP {
     ###display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi_sumAll {
+  hist tag_MV_w_phi_sumAll {
     ###display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi_frac85OP {
+  hist tag_MV_w_phi_frac85OP {
     ###display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi_frac77OP {
+  hist tag_MV_w_phi_frac77OP {
     ###display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi_frac70OP {
+  hist tag_MV_w_phi_frac70OP {
     ###display = LogY
     algorithm =  KolTest
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_phi_frac50OP {
+  hist tag_MV_w_phi_frac50OP {
    ### display = LogY
     algorithm =  KolTest
     weight = 0.8
@@ -239,7 +239,7 @@ dir JetTagging {
     weight = 0.8
     output = JetTagging/Quality_Control
   }
-  hist tag_MV2c20_w_sj {
+  hist tag_MV_w_sj {
     display = LogY
     algorithm =  KolTest
     weight = 0.8
@@ -250,11 +250,11 @@ dir JetTagging {
   ##################################################################
   ###  Diagnostics
   ##################################################################
-  ###hist trigPassed {
-  ###  display = LogY
-  ###  algorithm = KolTest
-  ###  output = JetTagging/Diagnostics
-  ###}
+  hist trigPassed {
+    display = LogY
+    algorithm = KolTest
+    output = JetTagging/Diagnostics
+  }
   hist jet_n {
     algorithm = KolTest
     output = JetTagging/Diagnostics
@@ -366,6 +366,41 @@ dir JetTagging {
     output = JetTagging/Diagnostics
   }
 
+  hist n_iso_el {
+    algorithm = KolTest
+    output = JetTagging/Diagnostics
+  }
+
+  hist n_iso_mu {
+    algorithm = KolTest
+    output = JetTagging/Diagnostics
+  }
+
+  hist jet_mv_top {
+    algorithm = KolTest
+    output = JetTagging/Diagnostics
+  }
+
+  hist jet_top_eff {
+    algorithm = KolTest
+    output = JetTagging/Diagnostics
+  }
+
+  hist jet_pt_top {
+    algorithm = KolTest
+    output = JetTagging/Diagnostics
+  }
+
+  hist jet_pt_top_tagged {
+    algorithm = KolTest
+    output = JetTagging/Diagnostics
+  }
+
+  hist jet_pt_top_eff {
+    algorithm = KolTest
+    output = JetTagging/Diagnostics
+  }
+
   ##################################################################
   ###  Diagnostics/ImpactParameters
   ##################################################################
@@ -395,15 +430,15 @@ dir JetTagging {
     output = JetTagging/Diagnostics/JetInformation
   }
 
-  hist mv2c20_tag_50_rate_2D {
+  hist mv_tag_60_rate_2D {
     algorithm = JetTag_BinsDiffFromStripMedian
     output = JetTagging/Diagnostics/JetInformation
   }
-  hist mv2c20_tag_70_rate_2D {
+  hist mv_tag_70_rate_2D {
     algorithm = JetTag_BinsDiffFromStripMedian
     output = JetTagging/Diagnostics/JetInformation
   }
-  hist mv2c20_tag_80_rate_2D {
+  hist mv_tag_80_rate_2D {
     algorithm = JetTag_BinsDiffFromStripMedian
     output = JetTagging/Diagnostics/JetInformation
   }
diff --git a/DataQuality/DataQualityConfigurations/config/L1Calo/collisions_run.config b/DataQuality/DataQualityConfigurations/config/L1Calo/collisions_run.config
index ead679a9474f2d1b4067dc2ab8697961b4485dfe..bd8d2c91ea9aede08dc0f4744e2d4d2d5da5f48b 100644
--- a/DataQuality/DataQualityConfigurations/config/L1Calo/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/L1Calo/collisions_run.config
@@ -5785,6 +5785,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetSTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_JetSTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation  
@@ -5793,6 +5794,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetSTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_JetLTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5801,6 +5803,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetLTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_JetLTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5809,6 +5812,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetLTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_MuTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5817,6 +5821,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_MuTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_MuTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5825,6 +5830,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_MuTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_TauTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5833,6 +5839,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_TauTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_TauTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5841,6 +5848,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_TauTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_EMTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5849,6 +5857,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_EMTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_EMTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5857,46 +5866,39 @@ dir LVL1_Interfaces {
     hist l1topo_2d_EMTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_ItemsBC0 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC1 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC2 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC3 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio0 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio1 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio2 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio3 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
   }
   dir CTP {
@@ -5911,8 +5913,10 @@ dir LVL1_Interfaces {
     hist ctp_1d_TIPMatches {
     }
     hist ctp_1d_TIPNoHitMismatch {
+      algorithm = L1Calo_IsEmpty
     } 
     hist ctp_1d_HitNoTIPMismatch {
+      algorithm = L1Calo_IsEmpty
     }
   }
   dir Calorimeter {
diff --git a/DataQuality/DataQualityConfigurations/config/L1Calo/cosmics_run.config b/DataQuality/DataQualityConfigurations/config/L1Calo/cosmics_run.config
index 795a5c2166f15274c2857c57646929388fb9cd30..68de19f53a6e4bf09a5714b0a985813fadab22d2 100644
--- a/DataQuality/DataQualityConfigurations/config/L1Calo/cosmics_run.config
+++ b/DataQuality/DataQualityConfigurations/config/L1Calo/cosmics_run.config
@@ -5759,6 +5759,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetSTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_JetSTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation  
@@ -5767,6 +5768,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetSTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_JetLTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5775,6 +5777,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetLTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_JetLTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5783,6 +5786,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetLTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_MuTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5791,6 +5795,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_MuTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_MuTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5799,6 +5804,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_MuTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_TauTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5807,6 +5813,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_TauTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_TauTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5815,6 +5822,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_TauTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_EMTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5823,6 +5831,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_EMTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_EMTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5831,46 +5840,39 @@ dir LVL1_Interfaces {
     hist l1topo_2d_EMTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_ItemsBC0 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC1 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC2 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC3 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio0 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio1 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio2 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio3 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
   }
   dir CTP {
@@ -5885,8 +5887,10 @@ dir LVL1_Interfaces {
     hist ctp_1d_TIPMatches {
     }
     hist ctp_1d_TIPNoHitMismatch {
+      algorithm = L1Calo_IsEmpty
     } 
     hist ctp_1d_HitNoTIPMismatch {
+      algorithm = L1Calo_IsEmpty
     }   
   }
   dir Calorimeter {
diff --git a/DataQuality/DataQualityConfigurations/config/L1Calo/heavyions_run.config b/DataQuality/DataQualityConfigurations/config/L1Calo/heavyions_run.config
index a0250b4e0cae3455364b7cc2bbfbb78b7b9c1838..cc690c1e87e099d4ebc0a555034c82b53578fc9d 100644
--- a/DataQuality/DataQualityConfigurations/config/L1Calo/heavyions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/L1Calo/heavyions_run.config
@@ -5759,6 +5759,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetSTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_JetSTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation  
@@ -5767,6 +5768,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetSTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_JetLTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5775,6 +5777,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetLTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_JetLTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5783,6 +5786,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_JetLTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_MuTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5791,6 +5795,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_MuTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_MuTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5799,6 +5804,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_MuTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_TauTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5807,6 +5813,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_TauTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_TauTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5815,6 +5822,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_TauTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_EMTobs_etaPhi_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5823,6 +5831,7 @@ dir LVL1_Interfaces {
     hist l1topo_2d_EMTobs_etaPhi_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_EMTobs_Hitmap_match {
       output = L1Interfaces/L1Topo/Transmission_Simulation
@@ -5831,46 +5840,39 @@ dir LVL1_Interfaces {
     hist l1topo_2d_EMTobs_Hitmap_mismatch {
       output = L1Interfaces/L1Topo/Transmission_Simulation
       display = SetPalette(1)
+      algorithm = L1Calo_IsEmpty
     }
     hist l1topo_2d_ItemsBC0 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC1 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC2 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC3 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio0 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio1 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio2 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
     hist l1topo_2d_ItemsBC_ratio3 {
       output = L1Interfaces/L1Topo/Timing
       display = SetPalette(1),LinZ
-      description = http://esimioni.web.cern.ch/esimioni/files/ForBrienne/L1Topoconfig_Physics_pp_v6_bits.txt
     }
   } 
   dir CTP {
@@ -5885,8 +5887,10 @@ dir LVL1_Interfaces {
     hist ctp_1d_TIPMatches {
     }
     hist ctp_1d_TIPNoHitMismatch {
+      algorithm = L1Calo_IsEmpty
     } 
     hist ctp_1d_HitNoTIPMismatch {
+      algorithm = L1Calo_IsEmpty
     }
   }
   dir Calorimeter {
diff --git a/DataQuality/DataQualityConfigurations/config/LArMonitoring/collisions_run.config b/DataQuality/DataQualityConfigurations/config/LArMonitoring/collisions_run.config
index c3993531527d80abcadba46489ddced64a32c6d6..8f397106698fe29d3f6eea354842012599fa7fe8 100644
--- a/DataQuality/DataQualityConfigurations/config/LArMonitoring/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/LArMonitoring/collisions_run.config
@@ -6296,6 +6296,8 @@ algorithm LAr_CaloCells_fractionOverQthVsEtaPhi_Bins_GreaterThan_Threshold {
   thresholds = LAr_CaloCells_fractionOverQthVsEtaPhi_Bins_GreaterThan_Threshold_thres 
   BinThreshold = 0.7
   PublishBins = 1
+  SuppressFactor = 0.0
+  SuppressRedFactor = 0.0
   MaxPublish = 20000	
 }
 
@@ -6381,6 +6383,7 @@ algorithm LAr_CaloCells_BinsDiffFromStripMedian {
   thresholds = LAr_CaloCells_BinsDiffFromStripMedian_threshold 
   SuppressFactor = 0.0
   SuppressRedFactor = 0.0
+  MaxPublish = 20000
 }
 
 ##############
diff --git a/DataQuality/DataQualityConfigurations/config/SCT/collisions_run.config b/DataQuality/DataQualityConfigurations/config/SCT/collisions_run.config
index c0ae92fe65c6b7b11ec94a3128ea59fe7e38a947..8d45d5554532b94677653ae856d87df96b1dccba 100644
--- a/DataQuality/DataQualityConfigurations/config/SCT/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/SCT/collisions_run.config
@@ -781,7 +781,7 @@ dir SCT {
 		hist SctTotalEffBCID {
 			##algorithm = SCT_BinPrint
 			output = InnerDetector/SCT/Summary
-			algorithm = SCT_SumEff_Total
+			algorithm = SCT_SumEff_TotalFBCID
 			display = AxisRange(0.95,1.009,"Y")
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#SCT_GENERAL_Efficiency
 		}
@@ -954,42 +954,42 @@ dir SCT {
                 	description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Byte_Stream_Error_Histograms
 			output = InnerDetector/SCT/_SCTB/Errors/BSErrVsLBs
                 }
-		hist modulemap_0_0 {
+		hist modulemapB0_0 {
 			output = InnerDetector/SCT/_SCTB/Conf
 			algorithm = SCT_BinPrint
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemap_0_1 {
+		hist modulemapB0_1 {
 			output = InnerDetector/SCT/_SCTB/Conf
 			algorithm = SCT_BinPrint
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemap_1_0 {
+		hist modulemapB1_0 {
 			output = InnerDetector/SCT/_SCTB/Conf
 			algorithm = SCT_BinPrint
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemap_1_1 {
+		hist modulemapB1_1 {
 			output = InnerDetector/SCT/_SCTB/Conf
 			algorithm = SCT_BinPrint
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemap_2_0 {
+		hist modulemapB2_0 {
 			output = InnerDetector/SCT/_SCTB/Conf
 			algorithm = SCT_BinPrint
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemap_2_1 {
+		hist modulemapB2_1 {
 			output = InnerDetector/SCT/_SCTB/Conf
 			algorithm = SCT_BinPrint
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemap_3_0 {
+		hist modulemapB3_0 {
 			output = InnerDetector/SCT/_SCTB/Conf
 			algorithm = SCT_BinPrint
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemap_3_1 {
+		hist modulemapB3_1 {
 			output = InnerDetector/SCT/_SCTB/Conf
 			algorithm = SCT_BinPrint
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
@@ -1096,92 +1096,92 @@ dir SCT {
                 	description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Byte_Stream_Error_Histograms
 			output = InnerDetector/SCT/_SCTEA/Errors/BSErrVsLBs
                 }
-		hist modulemapECp_0_0 {
+		hist modulemapEA0_0 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_0_1 {
+		hist modulemapEA0_1 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_1_0 {
+		hist modulemapEA1_0 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_1_1 {
+		hist modulemapEA1_1 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_2_0 {
+		hist modulemapEA2_0 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_2_1 {
+		hist modulemapEA2_1 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_3_0 {
+		hist modulemapEA3_0 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_3_1 {
+		hist modulemapEA3_1 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_4_0 {
+		hist modulemapEA4_0 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_4_1 {
+		hist modulemapEA4_1 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_5_0 {
+		hist modulemapEA5_0 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_5_1 {
+		hist modulemapEA5_1 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_6_0 {
+		hist modulemapEA6_0 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_6_1 {
+		hist modulemapEA6_1 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_7_0 {
+		hist modulemapEA7_0 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_7_1 {
+		hist modulemapEA7_1 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_8_0 {
+		hist modulemapEA8_0 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapECp_8_1 {
+		hist modulemapEA8_1 {
 			output = InnerDetector/SCT/_SCTEA/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
@@ -1288,92 +1288,92 @@ dir SCT {
                 	description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Byte_Stream_Error_Histograms
 			output = InnerDetector/SCT/_SCTEC/Errors/BSErrVsLBs
                 }
-		hist modulemapEcm_0_0 {
+		hist modulemapEC0_0 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_0_1 {
+		hist modulemapEC0_1 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_1_0 {
+		hist modulemapEC1_0 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_1_1 {
+		hist modulemapEC1_1 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_2_0 {
+		hist modulemapEC2_0 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_2_1 {
+		hist modulemapEC2_1 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_3_0 {
+		hist modulemapEC3_0 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_3_1 {
+		hist modulemapEC3_1 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_4_0 {
+		hist modulemapEC4_0 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_4_1 {
+		hist modulemapEC4_1 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_5_0 {
+		hist modulemapEC5_0 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_5_1 {
+		hist modulemapEC5_1 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_6_0 {
+		hist modulemapEC6_0 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_6_1 {
+		hist modulemapEC6_1 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_7_0 {
+		hist modulemapEC7_0 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_7_1 {
+		hist modulemapEC7_1 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_8_0 {
+		hist modulemapEC8_0 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
 		}
-		hist modulemapEcm_8_1 {
+		hist modulemapEC8_1 {
 			output = InnerDetector/SCT/_SCTEC/Conf
 			algorithm = SCT_AnyErr
 			description = https://twiki.cern.ch/twiki/bin/view/Atlas/SctDqHistograms#Errors
@@ -8224,6 +8224,16 @@ algorithm SCT_SumEff_Total {
 	BinMinEntries = 200 ##Do not check or print bins with fewer that 50 entries
 	reference = CentrallyManagedReferences
 }
+algorithm SCT_SumEff_TotalFBCID {
+	name = SCT_SumEff_CompAlg
+	Publish = 3 ##Print all layers
+	TypePublish = 2 ##Print Values
+	UseValue = -2 ##Less than thresholds
+	TypeValue = 0 ##Thresholds are for fractional distribution
+	thresholds = SCT_SumEffThreshold_TotalFBCID
+	BinMinEntries = 200 ##Do not check or print bins with fewer that 50 entries
+	reference = CentrallyManagedReferences
+}
 
 ## TEST
 
@@ -8291,19 +8301,26 @@ thresholds SCT_SumEffThreshold_Total {
 		error = 0.97
 	}
 }
+thresholds SCT_SumEffThreshold_TotalFBCID {
+	limits Value_All {
+		##Using less than definitions
+		warning = 0.99
+		error = 0.98
+	}
+}
 thresholds SCT_SumEffThreshold_Barrel {
 	limits Value_All {
 		##Using less than definitions
-		warning = 0.98
-		error = 0.97
+		warning = 0.95
+		error = 0.90
 	}
 }
 thresholds SCT_SumEffThreshold_EndCap {
 	limits Value_All {
 		##Using less than definitions
 		##Checking only first 4 bins
-		warning = 0.98
-		error = 0.97
+		warning = 0.95
+		error = 0.90
 	}
 }
 
diff --git a/DataQuality/DataQualityConfigurations/config/Tile/collisions_run.config b/DataQuality/DataQualityConfigurations/config/Tile/collisions_run.config
index 0c5385d2cc9d0081c8fa36832c97c0eb8d9d870c..79a25bfbf9b6b5743df3fe4041fe70a9839423cd 100644
--- a/DataQuality/DataQualityConfigurations/config/Tile/collisions_run.config
+++ b/DataQuality/DataQualityConfigurations/config/Tile/collisions_run.config
@@ -12,27 +12,22 @@
 #####################
 
 reference TileDigiErrorsLB {
-  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20140902.root
+  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20170814.root
   name = TileDigiErrorsLB
 }
 
-reference TileDigiErrorsLBC02 {
-  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20140902.root
-  name = TileDigiErrorsLBC02
-}
-
 reference TileDigiErrorsEB {
-  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20140902.root
+  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20170814.root
   name = TileDigiErrorsEB
 }
 
 reference TileDigiErrorsEB_special {
-  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20140902.root
+  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20170814.root
   name = TileDigiErrorsEB_special
 }
 
 reference TileDigiErrorsEB_innerMBTS {
-  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20140902.root
+  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20170814.root
   name = TileDigiErrorsEB_innerMBTS
 }
 
@@ -2539,56 +2534,51 @@ dir Tile {
       output = TileCal/Data_Corruption/LBA
       display = TCanvas(850,490),Draw=TEXTCOLZ
     }
-    hist (?!.*02$)TileDigiErrorsLBC\d{2} {
+    hist TileDigiErrorsLBC\d{2} {
       regex = 1
       algorithm = Tile_TileDigiErrors_CheckNonZeroBins/LB
       output = TileCal/Data_Corruption/LBC
       display = TCanvas(850,490),Draw=TEXTCOLZ
     }
-    hist TileDigiErrorsLBC02 {
-      algorithm = Tile_TileDigiErrors_CheckNonZeroBins/LBC02
-      output = TileCal/Data_Corruption/LBC
-      display = TCanvas(850,490),Draw=TEXTCOLZ
-    }
 
     hist (?!.*15|.*39|.*4[012]|.*5[5678])TileDigiErrorsEBA\d{2} {
       regex = 1
       algorithm = Tile_TileDigiErrors_CheckNonZeroBins/EB
       output = TileCal/Data_Corruption/EBA
-      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28)
+      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(8,28,10,29),TDota(8,29,10,30),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28),TDota(14,28,16,29),TDota(14,29,16,30)
     }
 
     hist TileDigiErrorsEBA(?:39|4[012]|5[5678]) {
       regex = 1
       algorithm = Tile_TileDigiErrors_CheckNonZeroBins/EB_innerMBTS
       output = TileCal/Data_Corruption/EBA
-      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28)
+      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(8,28,10,29),TDota(8,29,10,30),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28),TDota(14,28,16,29),TDota(14,29,16,30)
     }
 
     hist TileDigiErrorsEBA15 {
       algorithm = Tile_TileDigiErrors_CheckNonZeroBins/EB_special
       output = TileCal/Data_Corruption/EBA
-      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(0,0,1,1),TDota(0,1,1,2),TDota(0,2,1,3),TDota(0,3,1,4),TDota(0,4,1,5),TDota(0,5,1,6),TDota(0,6,1,7),TDota(0,7,1,8),TDota(0,8,1,9),TDota(0,9,1,10),TDota(0,10,1,11),TDota(0,11,1,12),TDota(0,12,1,13),TDota(0,13,1,14),TDota(0,14,1,15),TDota(0,15,1,16),TDota(0,16,1,17),TDota(0,17,1,18),TDota(0,18,1,19),TDota(0,19,1,20),TDota(0,20,1,21),TDota(0,21,1,22),TDota(0,22,1,23),TDota(0,23,1,24),TDota(0,24,1,25),TDota(0,25,1,26),TDota(0,26,1,27),TDota(0,27,1,28),TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28)
+      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(0,0,1,1),TDota(0,1,1,2),TDota(0,2,1,3),TDota(0,3,1,4),TDota(0,4,1,5),TDota(0,5,1,6),TDota(0,6,1,7),TDota(0,7,1,8),TDota(0,8,1,9),TDota(0,9,1,10),TDota(0,10,1,11),TDota(0,11,1,12),TDota(0,12,1,13),TDota(0,13,1,14),TDota(0,14,1,15),TDota(0,15,1,16),TDota(0,16,1,17),TDota(0,17,1,18),TDota(0,18,1,19),TDota(0,19,1,20),TDota(0,20,1,21),TDota(0,21,1,22),TDota(0,22,1,23),TDota(0,23,1,24),TDota(0,24,1,25),TDota(0,25,1,26),TDota(0,26,1,27),TDota(0,27,1,28),TDota(0,28,1,29),TDota(0,29,1,30),TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(8,28,10,29),TDota(8,29,10,30),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28),TDota(14,28,16,29),TDota(14,29,16,30)
     }
 
     hist (?!.*18|.*39|.*4[012]|.*5[5678])TileDigiErrorsEBC\d{2} {
       regex = 1
       algorithm = Tile_TileDigiErrors_CheckNonZeroBins/EB_innerMBTS
       output = TileCal/Data_Corruption/EBC
-      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28)
+      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(8,28,10,29),TDota(8,29,10,30),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28),TDota(14,28,16,29),TDota(14,29,16,30)
     }
 
     hist TileDigiErrorsEBC(?:39|4[012]|5[5678]) {
       regex = 1
       algorithm = Tile_TileDigiErrors_CheckNonZeroBins/EB_innerMBTS
       output = TileCal/Data_Corruption/EBC
-      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28)
+      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(8,28,10,29),TDota(8,29,10,30),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28),TDota(14,28,16,29),TDota(14,29,16,30)
     }
 
     hist TileDigiErrorsEBC18 {
       algorithm = Tile_TileDigiErrors_CheckNonZeroBins/EB_special
       output = TileCal/Data_Corruption/EBC
-      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(0,0,1,1),TDota(0,1,1,2),TDota(0,2,1,3),TDota(0,3,1,4),TDota(0,4,1,5),TDota(0,5,1,6),TDota(0,6,1,7),TDota(0,7,1,8),TDota(0,8,1,9),TDota(0,9,1,10),TDota(0,10,1,11),TDota(0,11,1,12),TDota(0,12,1,13),TDota(0,13,1,14),TDota(0,14,1,15),TDota(0,15,1,16),TDota(0,16,1,17),TDota(0,17,1,18),TDota(0,18,1,19),TDota(0,19,1,20),TDota(0,20,1,21),TDota(0,21,1,22),TDota(0,22,1,23),TDota(0,23,1,24),TDota(0,24,1,25),TDota(0,25,1,26),TDota(0,26,1,27),TDota(0,27,1,28),TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28)
+      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(0,0,1,1),TDota(0,1,1,2),TDota(0,2,1,3),TDota(0,3,1,4),TDota(0,4,1,5),TDota(0,5,1,6),TDota(0,6,1,7),TDota(0,7,1,8),TDota(0,8,1,9),TDota(0,9,1,10),TDota(0,10,1,11),TDota(0,11,1,12),TDota(0,12,1,13),TDota(0,13,1,14),TDota(0,14,1,15),TDota(0,15,1,16),TDota(0,16,1,17),TDota(0,17,1,18),TDota(0,18,1,19),TDota(0,19,1,20),TDota(0,20,1,21),TDota(0,21,1,22),TDota(0,22,1,23),TDota(0,23,1,24),TDota(0,24,1,25),TDota(0,25,1,26),TDota(0,26,1,27),TDota(0,27,1,28),TDota(0,28,1,29),TDota(0,29,1,30),TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(8,28,10,29),TDota(8,29,10,30),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28),TDota(14,28,16,29),TDota(14,29,16,30)
     }
 
     hist FracTileDigiErrorsLBA\d{2} {
@@ -3264,7 +3254,7 @@ algorithm Tile_TileDigiErrors_CheckNonZeroBins {
   libname = libdqm_algorithms.so
   name = MaskedBinRow
   OkBin = 1
-  MaskedBin = 13
+  MaskedBin = 15
   TestRows = 0
   thresholds = DMU_thr
   DoRate = 1
@@ -3273,9 +3263,6 @@ algorithm Tile_TileDigiErrors_CheckNonZeroBins {
   algorithm LB {
     reference = TileDigiErrorsLB
   }
-  algorithm LBC02 {
-    reference = TileDigiErrorsLBC02
-  }
   algorithm EB {
     reference = TileDigiErrorsEB
   }
diff --git a/DataQuality/DataQualityConfigurations/config/Tile/cosmics_run.config b/DataQuality/DataQualityConfigurations/config/Tile/cosmics_run.config
index 228ff0e49f27b0dc0982cbd8a54b39e2bff7cf27..9c44d4ed215c441326ff847bec36f80eabd2c58a 100644
--- a/DataQuality/DataQualityConfigurations/config/Tile/cosmics_run.config
+++ b/DataQuality/DataQualityConfigurations/config/Tile/cosmics_run.config
@@ -8,17 +8,17 @@
 
 
 reference TileDigiErrorsLB {
-  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReference_20120907.root
+  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20170814.root
   name = TileDigiErrorsLB
 }
 
 reference TileDigiErrorsEB {
-  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReference_20120907.root
+  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20170814.root
   name = TileDigiErrorsEB
 }
 
 reference TileDigiErrorsEB_special {
-  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReference_20120907.root
+  file = /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_references/Collisions/TileDigiErrorsReferences_20170814.root
   name = TileDigiErrorsEB_special
 }
 
@@ -1136,27 +1136,27 @@ dir Tile {
       regex = 1
       algorithm = DMU_alg/EB
       output = TileCal/Data_Corruption/EBA
-      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28)
+      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(8,28,10,29),TDota(8,29,10,30),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28),TDota(14,28,16,29),TDota(14,29,16,30)
     }
 
     hist TileDigiErrorsEBA15 {
       algorithm = DMU_alg/EB_special
       output = TileCal/Data_Corruption/EBA
-      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(0,0,1,1),TDota(0,1,1,2),TDota(0,2,1,3),TDota(0,3,1,4),TDota(0,4,1,5),TDota(0,5,1,6),TDota(0,6,1,7),TDota(0,7,1,8),TDota(0,8,1,9),TDota(0,9,1,10),TDota(0,10,1,11),TDota(0,11,1,12),TDota(0,12,1,13),TDota(0,13,1,14),TDota(0,14,1,15),TDota(0,15,1,16),TDota(0,16,1,17),TDota(0,17,1,18),TDota(0,18,1,19),TDota(0,19,1,20),TDota(0,20,1,21),TDota(0,21,1,22),TDota(0,22,1,23),TDota(0,23,1,24),TDota(0,24,1,25),TDota(0,25,1,26),TDota(0,26,1,27),TDota(0,27,1,28),TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28)
+      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(0,0,1,1),TDota(0,1,1,2),TDota(0,2,1,3),TDota(0,3,1,4),TDota(0,4,1,5),TDota(0,5,1,6),TDota(0,6,1,7),TDota(0,7,1,8),TDota(0,8,1,9),TDota(0,9,1,10),TDota(0,10,1,11),TDota(0,11,1,12),TDota(0,12,1,13),TDota(0,13,1,14),TDota(0,14,1,15),TDota(0,15,1,16),TDota(0,16,1,17),TDota(0,17,1,18),TDota(0,18,1,19),TDota(0,19,1,20),TDota(0,20,1,21),TDota(0,21,1,22),TDota(0,22,1,23),TDota(0,23,1,24),TDota(0,24,1,25),TDota(0,25,1,26),TDota(0,26,1,27),TDota(0,27,1,28),TDota(0,28,1,29),TDota(0,29,1,30),TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(8,28,10,29),TDota(8,29,10,30),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28),TDota(14,28,16,29),TDota(14,29,16,30)
     }
 
     hist (?!.*18$)TileDigiErrorsEBC\d{2} {
       regex = 1
       algorithm = DMU_alg/EB
       output = TileCal/Data_Corruption/EBC
-      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28)
+      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(8,28,10,29),TDota(8,29,10,30),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28),TDota(14,28,16,29),TDota(14,29,16,30)
     }
 
 
     hist TileDigiErrorsEBC18 {
       algorithm = DMU_alg/EB_special
       output = TileCal/Data_Corruption/EBC
-      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(0,0,1,1),TDota(0,1,1,2),TDota(0,2,1,3),TDota(0,3,1,4),TDota(0,4,1,5),TDota(0,5,1,6),TDota(0,6,1,7),TDota(0,7,1,8),TDota(0,8,1,9),TDota(0,9,1,10),TDota(0,10,1,11),TDota(0,11,1,12),TDota(0,12,1,13),TDota(0,13,1,14),TDota(0,14,1,15),TDota(0,15,1,16),TDota(0,16,1,17),TDota(0,17,1,18),TDota(0,18,1,19),TDota(0,19,1,20),TDota(0,20,1,21),TDota(0,21,1,22),TDota(0,22,1,23),TDota(0,23,1,24),TDota(0,24,1,25),TDota(0,25,1,26),TDota(0,26,1,27),TDota(0,27,1,28),TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28)
+      display = TCanvas(850,490),Draw=TEXTCOLZ,TDota(0,0,1,1),TDota(0,1,1,2),TDota(0,2,1,3),TDota(0,3,1,4),TDota(0,4,1,5),TDota(0,5,1,6),TDota(0,6,1,7),TDota(0,7,1,8),TDota(0,8,1,9),TDota(0,9,1,10),TDota(0,10,1,11),TDota(0,11,1,12),TDota(0,12,1,13),TDota(0,13,1,14),TDota(0,14,1,15),TDota(0,15,1,16),TDota(0,16,1,17),TDota(0,17,1,18),TDota(0,18,1,19),TDota(0,19,1,20),TDota(0,20,1,21),TDota(0,21,1,22),TDota(0,22,1,23),TDota(0,23,1,24),TDota(0,24,1,25),TDota(0,25,1,26),TDota(0,26,1,27),TDota(0,27,1,28),TDota(0,28,1,29),TDota(0,29,1,30),TDota(8,0,10,1),TDota(8,1,10,2),TDota(8,2,10,3),TDota(8,3,10,4),TDota(8,4,10,5),TDota(8,5,10,6),TDota(8,6,10,7),TDota(8,7,10,8),TDota(8,8,10,9),TDota(8,9,10,10),TDota(8,10,10,11),TDota(8,11,10,12),TDota(8,12,10,13),TDota(8,13,10,14),TDota(8,14,10,15),TDota(8,15,10,16),TDota(8,16,10,17),TDota(8,17,10,18),TDota(8,18,10,19),TDota(8,19,10,20),TDota(8,20,10,21),TDota(8,21,10,22),TDota(8,22,10,23),TDota(8,23,10,24),TDota(8,24,10,25),TDota(8,25,10,26),TDota(8,26,10,27),TDota(8,27,10,28),TDota(8,28,10,29),TDota(8,29,10,30),TDota(14,0,16,1),TDota(14,1,16,2),TDota(14,2,16,3),TDota(14,3,16,4),TDota(14,4,16,5),TDota(14,5,16,6),TDota(14,6,16,7),TDota(14,7,16,8),TDota(14,8,16,9),TDota(14,9,16,10),TDota(14,10,16,11),TDota(14,11,16,12),TDota(14,12,16,13),TDota(14,13,16,14),TDota(14,14,16,15),TDota(14,15,16,16),TDota(14,16,16,17),TDota(14,17,16,18),TDota(14,18,16,19),TDota(14,19,16,20),TDota(14,20,16,21),TDota(14,21,16,22),TDota(14,22,16,23),TDota(14,23,16,24),TDota(14,24,16,25),TDota(14,25,16,26),TDota(14,26,16,27),TDota(14,27,16,28),TDota(14,28,16,29),TDota(14,29,16,30)
     }
 
 
@@ -1440,7 +1440,7 @@ algorithm DMU_alg {
   libname = libdqm_algorithms.so
   name = MaskedBinRow
   OkBin = 1
-  MaskedBin = 13
+  MaskedBin = 15
   TestRows = 0
   thresholds = DMU_thr
   DoRate = 1
diff --git a/DataQuality/DataQualityUtils/scripts/hotSpotInHIST.py b/DataQuality/DataQualityUtils/scripts/hotSpotInHIST.py
index e37323117ded249cd3d0c047a0c1406b6c927150..66dd8f405fb52aed41a1314ebb9689a0a2420973 100644
--- a/DataQuality/DataQualityUtils/scripts/hotSpotInHIST.py
+++ b/DataQuality/DataQualityUtils/scripts/hotSpotInHIST.py
@@ -1,5 +1,4 @@
 #!/usr/bin env python
-
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 # Script to browse the unmerged HIST files and extract LBs for which at least N occurences of an object is found
 # at a position foundas noisy
@@ -441,18 +440,29 @@ for iHisto in histoKeys:
   totalInRegionRecomp[iHisto] = 0
   totalInRegion[iHisto] = 0
 # Then count the number of events and check if equal
+# Also sort the LB to highlight most problematic LB
+sortedLB = {}
+
 for iHisto in histoKeys:
   print "======= ",histoLegend[iHisto]
   for iBin in regionBins[iHisto]:
     totalInRegion[iHisto] = totalInRegion[iHisto] + histo[iHisto].GetBinContent(iBin)
+  
+  sortedLB[iHisto] = [0] * nLB
   for i in range(nLB):
     totalInRegionRecomp[iHisto] = totalInRegionRecomp[iHisto] + nbHitInHot[iHisto][i]
+    
+    sortedLB[iHisto][i] = i
     if (nbHitInHot[iHisto][i]>=minInLB):
-      print "LB: %d -> %d hits"%(i,nbHitInHot[iHisto][i])
       suspiciousLBlist.append(i)
     if (nbHitInHot[iHisto][i]>maxNbInHot):
       maxNbInHot = nbHitInHot[iHisto][i]
-
+      
+  sortedLB[iHisto].sort(key=dict(zip(sortedLB[iHisto],nbHitInHot[iHisto])).get,reverse=True)
+  for i in range(nLB):
+    if nbHitInHot[iHisto][sortedLB[iHisto][i]]>=minInLB:
+      print "%d-LB: %d -> %d hits"%(i,sortedLB[iHisto][i],nbHitInHot[iHisto][sortedLB[iHisto][i]])
+ 
   print "In the whole run, there are %d entries"%(totalInRegion[iHisto])
   if (totalInRegionRecomp[iHisto] != totalInRegion[iHisto]):
     print "To be compared with %d entries cumulated from unmerged files"%(totalInRegionRecomp[iHisto])
diff --git a/DataQuality/DataQualityUtils/scripts/pathExtract.py b/DataQuality/DataQualityUtils/scripts/pathExtract.py
index c0ba82fb897b16edd44bcb718f5d7c9e4ba3b037..55886ef82f9c5b78d6ab47a5144241fe7b3ba8fa 100644
--- a/DataQuality/DataQualityUtils/scripts/pathExtract.py
+++ b/DataQuality/DataQualityUtils/scripts/pathExtract.py
@@ -1,6 +1,4 @@
 #!/usr/bin env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 # arguments : list of run
 
 import os, sys  
@@ -13,13 +11,13 @@ from ROOT import *
 def returnEosHistPath(run,stream,amiTag,tag="data16_13TeV"):
    prefix = {'express':'express_','Egamma':'physics_','CosmicCalo':'physics_','JetTauEtmiss':'physics_','Main':'physics_','ZeroBias':'physics_','MinBias':'physics_'}
    path = '/eos/atlas/atlastier0/rucio/'+tag+'/'+prefix[stream]+stream+'/00'+str(run)+'/'
-   P = sp.Popen(['/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
+   P = sp.Popen(['/usr/bin/eos','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
    p = P.communicate()
    listOfFiles = p[0].split('\n')
    for iFile in listOfFiles:
       if ("HIST.%s"%(amiTag) in iFile):
          path = '/eos/atlas/atlastier0/rucio/'+tag+'/'+prefix[stream]+stream+'/00'+str(run)+'/'+iFile
-         P = sp.Popen(['/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
+         P = sp.Popen(['/usr/bin/eos','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
          p = P.communicate()
          path = '/eos/atlas/atlastier0/rucio/'+tag+'/'+prefix[stream]+stream+'/00'+str(run)+'/'+iFile+'/'+p[0]
          return path
@@ -54,7 +52,7 @@ def returnEosHistPath(run,stream,amiTag,tag="data16_13TeV"):
 def returnEosHistPathLB(run,lb0,lb1,stream,amiTag,tag="data16_13TeV"):
    prefix = {'express':'express_','Egamma':'physics_','CosmicCalo':'physics_','JetTauEtmiss':'physics_','Main':'physics_','ZeroBias':'physics_'}
    path = '/eos/atlas/atlastier0/tzero/prod/'+tag+'/'+prefix[stream]+stream+'/00'+str(run)+'/'
-   P = sp.Popen(['/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
+   P = sp.Popen(['/usr/bin/eos','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
    p = P.communicate()
    listOfFiles = p[0].split('\n')
 
@@ -62,7 +60,7 @@ def returnEosHistPathLB(run,lb0,lb1,stream,amiTag,tag="data16_13TeV"):
    for iFile in listOfFiles:
       if ("recon.HIST.%s"%(amiTag) in iFile and "LOG" not in iFile):
          path = '/eos/atlas/atlastier0/tzero/prod/'+tag+'/'+prefix[stream]+stream+'/00'+str(run)+'/'+iFile
-         P = sp.Popen(['/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
+         P = sp.Popen(['/usr/bin/eos','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
          p = P.communicate()
          listOfFiles2 = p[0].split('\n')
          for iFile2 in listOfFiles2:            
@@ -84,7 +82,7 @@ def returnEosTagPath(run,stream,amiTag="f",tag ="data16_13TeV"):
    found = False
    listOfFiles = []
    path = '/eos/atlas/atlastier0/rucio/'+tag+'/'+prefix[stream]+stream+'/00'+str(run)+'/'
-   P = sp.Popen(['/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
+   P = sp.Popen(['/usr/bin/eos','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
    p = P.communicate()
    if p[1]=='':
       files = p[0]
@@ -99,7 +97,7 @@ def returnEosTagPath(run,stream,amiTag="f",tag ="data16_13TeV"):
       print 'no TAG directory found in %s'%(path)
       return 
 
-   P = sp.Popen(['/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
+   P = sp.Popen(['/usr/bin/eos','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
    p = P.communicate()
    if p[1]=='':
       files = p[0].split('\n')
@@ -115,7 +113,7 @@ def returnEosLArNoisePath(run,stream,amiTag="f",tag ="data16_13TeV"):
    found = False
    listOfFiles = []
    path = '/eos/atlas/atlascerngroupdisk/det-larg/Tier0/perm/'+tag+'/'+prefix[stream]+stream+'/00'+str(run)+'/'
-   P = sp.Popen(['/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
+   P = sp.Popen(['/usr/bin/eos','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
    p = P.communicate()
    if p[1]=='':
       files = p[0]
@@ -130,7 +128,7 @@ def returnEosLArNoisePath(run,stream,amiTag="f",tag ="data16_13TeV"):
       print 'no LARNOISE directory found in %s'%(path)
       return 
 
-   P = sp.Popen(['/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
+   P = sp.Popen(['/usr/bin/eos','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
    p = P.communicate()
    if p[1]=='':
       files = p[0].split('\n')
@@ -146,7 +144,7 @@ def returnEosEsdPath(run,stream,amiTag="f",tag ="data16_13TeV"):
    found = False
    listOfFiles = []
    path = '/eos/atlas/atlastier0/rucio/'+tag+'/'+prefix[stream]+stream+'/00'+str(run)+'/'
-   P = sp.Popen(['/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
+   P = sp.Popen(['/usr/bin/eos','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
    p = P.communicate()
    if p[1]=='':
       files = p[0]
@@ -161,7 +159,7 @@ def returnEosEsdPath(run,stream,amiTag="f",tag ="data16_13TeV"):
       print 'no ESD directory found in %s'%(path)
       return 
 
-   P = sp.Popen(['/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
+   P = sp.Popen(['/usr/bin/eos','ls',path],stdout=sp.PIPE,stderr=sp.PIPE)
    p = P.communicate()
    if p[1]=='':
       files = p[0].split('\n')
diff --git a/DataQuality/DataQualityUtils/src/MonitoringFile_BJetTaggingNormalise.cxx b/DataQuality/DataQualityUtils/src/MonitoringFile_BJetTaggingNormalise.cxx
index 6d8265da011e87cdfae9f8a0bcf79a9cacfe9c76..8242759e37da6756a0817d6d17c7dec1dea1cc29 100644
--- a/DataQuality/DataQualityUtils/src/MonitoringFile_BJetTaggingNormalise.cxx
+++ b/DataQuality/DataQualityUtils/src/MonitoringFile_BJetTaggingNormalise.cxx
@@ -87,12 +87,15 @@ namespace dqutils{
 	    std::cout << "--> BJetTaggingNormalise: Setting the to process histgrams"
 		      << std::endl;
 	  }
+
+	  // 2D histograms
+
 	  std::vector < TString > nomHistosNames;
 	  std::vector < TString > denHistosNames;
 
 	  nomHistosNames.push_back("track_selector_eff");
-	  nomHistosNames.push_back("jet_2D_kinematic");
-
+	  nomHistosNames.push_back("track_selector_eff_LS"); // added by SARA
+	  //nomHistosNames.push_back("jet_2D_kinematic"); // removed by SARA
 	  nomHistosNames.push_back("ip3d_tag_def_rate_2D");
 	  //nomHistosNames.push_back("ip2d_tag_pos_rate_2D");
 	  nomHistosNames.push_back("ip3d_tag_neg_rate_2D");
@@ -101,7 +104,6 @@ namespace dqutils{
 	  //nomHistosNames.push_back("sv1_tag_pos_rate_2D");
 	  //nomHistosNames.push_back("sv2_tag_neg_rate_2D");
 	  //nomHistosNames.push_back("sv2_tag_pos_rate_2D");
-
 	  nomHistosNames.push_back("tracks_pTMin_2D");
 	  nomHistosNames.push_back("tracks_d0Max_2D");
 	  nomHistosNames.push_back("tracks_z0Max_2D");
@@ -120,11 +122,11 @@ namespace dqutils{
 	  nomHistosNames.push_back("tracks_fitChi2OnNdfMax_2D");
 
 	  denHistosNames.push_back("track_selector_all");
-	  denHistosNames.push_back("jet_2D_all");
+	  denHistosNames.push_back("track_selector_all_LS"); // added by SARA
+	  //denHistosNames.push_back("jet_2D_all"); // removed by SARA
           denHistosNames.push_back("jet_2D_all");
           denHistosNames.push_back("jet_2D_all");
           denHistosNames.push_back("jet_2D_all");
-
 	  //denHistosNames.push_back("track_selector_all");
 	  //denHistosNames.push_back("track_selector_all");
 	  //denHistosNames.push_back("track_selector_all");
@@ -133,8 +135,6 @@ namespace dqutils{
 	  //denHistosNames.push_back("track_selector_all");
 	  //denHistosNames.push_back("track_selector_all");
 	  //denHistosNames.push_back("track_selector_all");
-
-	  denHistosNames.push_back("tracks_all_2D");
 	  denHistosNames.push_back("tracks_all_2D");
 	  denHistosNames.push_back("tracks_all_2D");
 	  denHistosNames.push_back("tracks_all_2D");
@@ -151,6 +151,7 @@ namespace dqutils{
 	  denHistosNames.push_back("tracks_all_2D");
 	  denHistosNames.push_back("tracks_all_2D");
 	  denHistosNames.push_back("tracks_all_2D");
+	  //denHistosNames.push_back("tracks_all_2D"); // removed by SARA (was orphen)
 
 	  TH2F* workingHistogramNom(0);
 	  TH2F* workingHistogramDen(0);
@@ -211,7 +212,143 @@ namespace dqutils{
 	    workingHistogramNom->Write("", TObject::kOverwrite);
 
 	    // for eta/Pt range
-	  }
+	  } // end loop over 2D histograms
+
+	  // 1D histograms
+
+	  std::vector < TString > nom1DHistosNames; // added by SARA
+	  std::vector < TString > den1DHistosNames; // added by SARA
+	  std::vector < TString > eff1DHistosNames; // added by SARA
+
+	  nom1DHistosNames.push_back("jet_top_tagged"); // added by SARA
+	  nom1DHistosNames.push_back("jet_pt_top_tagged"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_phi_sum60OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_phi_sum70OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_phi_sum77OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_phi_sum85OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_eta_sum60OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_eta_sum70OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_eta_sum77OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_eta_sum85OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_sj_phi_sum60OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_sj_phi_sum70OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_sj_phi_sum77OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_sj_phi_sum85OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_sj_eta_sum60OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_sj_eta_sum70OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_sj_eta_sum77OP"); // added by SARA
+	  nom1DHistosNames.push_back("tag_MV_w_sj_eta_sum85OP"); // added by SARA
+
+	  den1DHistosNames.push_back("jet_top"); // added by SARA
+	  den1DHistosNames.push_back("jet_pt_top"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_phi_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_phi_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_phi_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_phi_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_eta_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_eta_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_eta_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_eta_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_sj_phi_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_sj_phi_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_sj_phi_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_sj_phi_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_sj_eta_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_sj_eta_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_sj_eta_sumAll"); // added by SARA
+	  den1DHistosNames.push_back("tag_MV_w_sj_eta_sumAll"); // added by SARA
+
+	  eff1DHistosNames.push_back("jet_top_eff"); // added by SARA
+	  eff1DHistosNames.push_back("jet_pt_top_eff"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_phi_frac60OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_phi_frac70OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_phi_frac77OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_phi_frac85OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_eta_frac60OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_eta_frac70OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_eta_frac77OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_eta_frac85OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_sj_phi_frac60OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_sj_phi_frac70OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_sj_phi_frac77OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_sj_phi_frac85OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_sj_eta_frac60OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_sj_eta_frac70OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_sj_eta_frac77OP"); // added by SARA
+	  eff1DHistosNames.push_back("tag_MV_w_sj_eta_frac85OP"); // added by SARA
+
+	  TH1F* working1DHistogramNom(0);
+	  TH1F* working1DHistogramDen(0);
+	  TH1F* working1DHistogramEff(0);
+
+	  TString nom1DHistos, working1DHistogramNameNom;
+	  TString den1DHistos, working1DHistogramNameDen;
+	  TString eff1DHistos, working1DHistogramNameEff;
+
+	  for (unsigned int i = 0; i < nom1DHistosNames.size(); i++) {
+
+	    working1DHistogramNameNom = (nom1DHistosNames[i]);
+	    working1DHistogramNameDen = (den1DHistosNames[i]);
+	    working1DHistogramNameEff = (eff1DHistosNames[i]);
+	    nom1DHistos = diag_dir + "/" + working1DHistogramNameNom;
+	    den1DHistos = diag_dir + "/" + working1DHistogramNameDen;
+	    eff1DHistos = diag_dir + "/" + working1DHistogramNameEff;
+	    //std::cout << "--> BJetTaggingNormalise: 1D histogram " << nom1DHistos << std::endl;
+
+
+	    //	 std::cout << "--> BJetTaggingNormalise: Doing the 1D normalisation" << std::endl;
+	    if (!f->Get(nom1DHistos)) {
+	      if (debugLevel > 0) {
+		std::cerr << "--> BBJetTaggingNormalise: no such 1D histogram " << nom1DHistos
+			  << std::endl;
+	      }
+	      continue;
+	    }
+	    if (!f->Get(den1DHistos)) {
+	      if (debugLevel > 0) {
+		std::cerr << "--> BJetTaggingNormalise: no such 1D histogram " << den1DHistos
+			  << std::endl;
+	      }
+	      continue;
+	    }
+	    if (!f->Get(eff1DHistos)) {
+	      if (debugLevel > 0) {
+		std::cerr << "--> BJetTaggingNormalise: no such 1D histogram " << eff1DHistos
+			  << std::endl;
+	      }
+	      continue;
+	    }
+
+	    working1DHistogramNom = dynamic_cast<TH1F*> (f->Get(nom1DHistos));
+	    working1DHistogramDen = dynamic_cast<TH1F*> (f->Get(den1DHistos));
+	    working1DHistogramEff = dynamic_cast<TH1F*> (f->Get(eff1DHistos));
+
+	    if (working1DHistogramNom == 0 || working1DHistogramDen == 0) {
+	      continue;
+	    }
+
+	    /*
+	     * Here the bins are initialised and the upper and lower end from the histogram data
+	     * are used as new borders of the updated histogram.
+	     * */
+
+	    {
+	      if (debugLevel > 1) {
+		std::cout << nom1DHistos << "/" << den1DHistos << " integral before "
+			  << working1DHistogramNom->Integral() << std::endl;
+	      }
+	      working1DHistogramEff->Divide(working1DHistogramNom,working1DHistogramDen,1.,1.,"B");
+
+	      if (debugLevel > 1) {
+		std::cout << "integral after " << working1DHistogramEff->Integral() << std::endl;
+	      }
+	    }
+	    dir->cd();
+	    working1DHistogramEff->Write("", TObject::kOverwrite);
+
+	    // for eta/Pt range
+	  } // end loop over 1D histograms
+
 	  if (debugLevel > 1) {
 	    std::cout << "--> BJetTaggingNormalise: Finished" << std::endl;
 	  }
@@ -219,5 +356,5 @@ namespace dqutils{
       }//while
     }//MonitoringFile::BJetTaggingNormalise
   }
-
+  
 }//namespace
diff --git a/DataQuality/dqm_algorithms/src/DivideReference.cxx b/DataQuality/dqm_algorithms/src/DivideReference.cxx
index c9fe2f1cf66637d961cee9c30c17913bcd805908..3941a1bbbb6cfd6ab69ba276e42befda9c24a178 100644
--- a/DataQuality/dqm_algorithms/src/DivideReference.cxx
+++ b/DataQuality/dqm_algorithms/src/DivideReference.cxx
@@ -114,13 +114,11 @@ dqm_algorithms::DivideReference::execute(const std::string& name, const TObject&
       if ( robject->IsA()->InheritsFrom("TCollection") ) //It is already an array add it...
 	{	  
 	  static_cast<TCollection*>(robject)->Add( histogram );
-	  //Check in again
-	  result->object_.reset( robject );
 	}
       else
 	{
 	  TObjArray* array = new TObjArray( 2 );
-	  array->AddAt( robject , 0 );
+	  array->AddAt( robject->Clone() , 0 );
 	  array->AddAt( histogram , 1 );
 	  //Check in again
 	  result->object_.reset( array );
diff --git a/Database/APR/RelationalCollection/src/RelationalCollection.h b/Database/APR/RelationalCollection/src/RelationalCollection.h
index 6bd0fe00b1df22e0abbf1d8376e1acffb97f14dc..7bcffdade295de3908251de577da93c8900ff827 100755
--- a/Database/APR/RelationalCollection/src/RelationalCollection.h
+++ b/Database/APR/RelationalCollection/src/RelationalCollection.h
@@ -71,6 +71,9 @@ namespace pool {
 
       /// Default destructor.
       ~RelationalCollection();
+
+      RelationalCollection (const RelationalCollection&) = delete;
+      RelationalCollection& operator= (const RelationalCollection&) = delete;
     
       /// Returns the open mode of the collection for the present transaction.
       virtual ICollection::OpenMode openMode() const;
diff --git a/Database/APR/RelationalCollection/src/RelationalCollectionDataEditor.h b/Database/APR/RelationalCollection/src/RelationalCollectionDataEditor.h
index 175af0ea107b703c2c4c8b11ad0ce9a6dbae1c68..5704df0d0f02ab54b4c2a4ad4ef562248e1b6d9f 100755
--- a/Database/APR/RelationalCollection/src/RelationalCollectionDataEditor.h
+++ b/Database/APR/RelationalCollection/src/RelationalCollectionDataEditor.h
@@ -72,6 +72,9 @@ namespace pool {
        */
       ~RelationalCollectionDataEditor();
 
+      RelationalCollectionDataEditor (const RelationalCollectionDataEditor&) = delete;
+      RelationalCollectionDataEditor& operator= (const RelationalCollectionDataEditor&) = delete;
+
       /**
        * Sets the number of rows to cache before insertion into the collection. If the input
        * argument is 0 (the default) bulk row insertion will not be applied.
diff --git a/Database/APR/RelationalCollection/src/RelationalCollectionSchemaEditor.h b/Database/APR/RelationalCollection/src/RelationalCollectionSchemaEditor.h
index 3965fbc34ab3ad3bfaf65727518a980fcf9bf675..80bc1e0125e0affc26d0da2a08a58b56779d6313 100755
--- a/Database/APR/RelationalCollection/src/RelationalCollectionSchemaEditor.h
+++ b/Database/APR/RelationalCollection/src/RelationalCollectionSchemaEditor.h
@@ -66,6 +66,9 @@ namespace pool {
       /// Default constructor.
       ~RelationalCollectionSchemaEditor();
 
+      RelationalCollectionSchemaEditor (const RelationalCollectionSchemaEditor&) = delete;
+      RelationalCollectionSchemaEditor& operator= (const RelationalCollectionSchemaEditor&) = delete;
+
       /**
        * Sets the name of the event reference Token column. Otherwise a default name is used.
        *
diff --git a/Database/APR/RootStorageSvc/src/RootDatabase.cpp b/Database/APR/RootStorageSvc/src/RootDatabase.cpp
index 01e194f2f78fd030513f6562501dd06890db92af..e4bb66d5d67ab88e1892de53fa2d41cb3f21972d 100644
--- a/Database/APR/RootStorageSvc/src/RootDatabase.cpp
+++ b/Database/APR/RootStorageSvc/src/RootDatabase.cpp
@@ -612,6 +612,27 @@ DbStatus RootDatabase::setOption(const DbOption& opt)  {
           }
           return sc;
        }
+       else if ( !strcasecmp(n+5,"MAX_VIRTUAL_SIZE") )  {
+          DbPrint log("RootDatabase.setOption");
+          log << DbPrintLvl::Debug << "Request virtual tree size" << DbPrint::endmsg;
+          if ( !m_file ) return Error;
+          log << DbPrintLvl::Debug << "File name " << m_file->GetName() << DbPrint::endmsg;
+
+          int virtMaxSize = 0;
+          opt._getValue(virtMaxSize);
+          if (!opt.option().size()) {
+             log << DbPrintLvl::Error << "Must set option to tree name to start TREE_MAX_VIRTUAL_SIZE " << DbPrint::endmsg;
+             return Error;
+          }
+          TTree* tree = (TTree*)m_file->Get(opt.option().c_str());
+          if (!tree) {
+             log << DbPrintLvl::Error << "Could not find tree " << opt.option() << DbPrint::endmsg;
+             return Error;
+          }
+          log << DbPrintLvl::Debug << "Got tree " << tree->GetName() << DbPrint::endmsg;
+          tree->SetMaxVirtualSize(virtMaxSize);
+          return Success;
+       }
        else if ( !strcasecmp(n+5,"AUTO_FLUSH") )  {
           return setAutoFlush(opt);
        }
diff --git a/Database/APR/RootStorageSvc/src/RootDomain.cpp b/Database/APR/RootStorageSvc/src/RootDomain.cpp
index 907afa28e0d670b0a53b92d11403ca9cfc151b37..c58666b1df95fe871b61c34d09748f6f001fa460 100755
--- a/Database/APR/RootStorageSvc/src/RootDomain.cpp
+++ b/Database/APR/RootStorageSvc/src/RootDomain.cpp
@@ -19,6 +19,7 @@
 #include "TError.h"
 #include "TFile.h"
 #include "TROOT.h"
+#include "TEnv.h"
 #include "TTree.h"
 #include "TVirtualStreamerInfo.h"
 
@@ -58,6 +59,11 @@ DbStatus RootDomain::setOption(const DbOption& opt)  {
         }
         return sc;
       }
+      else if ( !strcasecmp(n, "ASYNC_PREFETCHING") )  {
+        gEnv->SetValue("TFile.AsyncPrefetching", 1);
+        int asyncPrefetching = gEnv->GetValue("TFile.AsyncPrefetching", 0);
+        return opt._getValue(asyncPrefetching);
+      }
       break;
     case 'D':
       if ( !strcasecmp(n, "DEFAULT_COMPRESSION") )  {
@@ -142,6 +148,9 @@ DbStatus RootDomain::getOption(DbOption& opt) const   {
       if ( !strcasecmp(n, "ABORT_LEVEL") )  {
         return opt._setValue(int(gErrorAbortLevel));
       }
+      else if ( !strcasecmp(n, "ASYNC_PREFETCHING") )  {
+        return opt._setValue((int)gEnv->GetValue("TFile.AsyncPrefetching", 0));
+      }
       break;
     case 'C':
       if ( !strcasecmp(n, "CLASS") )  {
diff --git a/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp b/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
index f99526d73e34663e23af00f0c3b9e0a4b7224e07..8e26ce95bae3876819f31ddd28d9aecc6eb7b15f 100755
--- a/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
+++ b/Database/APR/RootStorageSvc/src/RootTreeContainer.cpp
@@ -442,6 +442,14 @@ RootTreeContainer::loadObject(DataCallBack* call, Token::OID_t& oid, DbAccessMod
               }
               // read the object
               numBytesBranch = dsc.branch->GetEntry(evt_id);
+              TTree::TClusterIterator clusterIterator = dsc.branch->GetTree()->GetClusterIterator(evt_id);
+              clusterIterator.Next();
+              if (evt_id == clusterIterator.GetStartEntry() && dsc.branch->GetTree()->GetMaxVirtualSize() != 0) {
+                 for (int i = dsc.branch->GetReadBasket(); i < dsc.branch->GetMaxBaskets()
+	                 && dsc.branch->GetBasketEntry()[i] < clusterIterator.GetNextEntry(); i++) {
+                    dsc.branch->GetBasket(i);
+                 }
+              }
               numBytes += numBytesBranch;
               if ( numBytesBranch >= 0 )     {
 		 hasRead=true;
diff --git a/Database/APR/StorageSvc/StorageSvc/DbBlob.h b/Database/APR/StorageSvc/StorageSvc/DbBlob.h
index a834472e2e056f09ac9f6f5a0a00e4d098923c8c..cb8a5a1799eea184f28dd06a9aab6d66830f3abf 100644
--- a/Database/APR/StorageSvc/StorageSvc/DbBlob.h
+++ b/Database/APR/StorageSvc/StorageSvc/DbBlob.h
@@ -82,6 +82,10 @@ namespace pool    {
       m_swapEnabled(do_swap)      {      m_analyzer = 0;          }
     /// Standard destructor
     virtual ~DbBlob();
+
+    DbBlob (const DbBlob&) = delete;
+    DbBlob& operator= (const DbBlob&) = delete;
+
     /// Read access to data buffer
     const char* data()    const   {      return m_buffer;         }
     /// write access to data buffer
diff --git a/Database/APR/TrigCollQuery/doc/packagedoc.h b/Database/APR/TrigCollQuery/doc/packagedoc.h
index 7bf1df6e1e9b49a340d659fcc06365c05fb89b92..482dbbff3e40bfa61c732e603757a626fcb1c4b8 100644
--- a/Database/APR/TrigCollQuery/doc/packagedoc.h
+++ b/Database/APR/TrigCollQuery/doc/packagedoc.h
@@ -68,14 +68,4 @@ Mapping of the trigger names to bit locations in the TAGs is done according to t
 
 @section TrigCollQuery_ExtrasTrigCollQuery Extra Pages
 
- - @ref UsedTrigCollQuery
- - @ref RequirementsTrigCollQuery
-*/
-
-/**
-@page UsedTrigCollQuery Used Packages
-*/
-
-/**
-@page RequirementsTrigCollQuery Requirements
 */
diff --git a/Database/APR/TrigCollQuery/share/TrigCollQuery_jobOptions.py b/Database/APR/TrigCollQuery/share/TrigCollQuery_jobOptions.py
index 791b03e5652ac33bc209d042edb89776712f74ac..ea88e97a0aea58e3c0902f1f702e5aa1da2190a0 100644
--- a/Database/APR/TrigCollQuery/share/TrigCollQuery_jobOptions.py
+++ b/Database/APR/TrigCollQuery/share/TrigCollQuery_jobOptions.py
@@ -23,28 +23,27 @@ class TrigTAGFilePeeker:
         # this is a TAG file, open it and read all run numbers
         # fileinfos have only the run number from the first TAG
         import PyUtils.Helpers as H
-        with H.restricted_ldenviron(projects=['AtlasCore']):
-            import re
-            with H.ShutUp(filters=[re.compile('TClass::TClass:0: RuntimeWarning: no dictionary for.*'),
-                                   re.compile('.*duplicate entry.*')]):
-                msg.debug("Opening TAG file %s" % fname)
-                import PyUtils.RootUtils as ru
-                f = ru.import_root().TFile.Open(fname, "read")
-                if f is None or not f:
-                    msg.warning("Failed to open TAG file %s" % fname)
-                    return []
-                coll_tree = f.Get('POOLCollectionTree')
-                run_numbers = set()
-                if coll_tree is not None:
-                    for row in xrange(0, coll_tree.GetEntries()):
-                        coll_tree.GetEntry(row)
-                        run_numbers.add( getattr(coll_tree, self.run_attr_name) )
-                    del coll_tree
-                f.Close()
-                del f
-                self.file_cache[fname] = run_numbers
-                msg.info("TAG file: %s, found runs: %s" % (fname, str(run_numbers)))
-                return run_numbers
+        import re
+        with H.ShutUp(filters=[re.compile('TClass::TClass:0: RuntimeWarning: no dictionary for.*'),
+                               re.compile('.*duplicate entry.*')]):
+            msg.debug("Opening TAG file %s" % fname)
+            import PyUtils.RootUtils as ru
+            f = ru.import_root().TFile.Open(fname, "read")
+            if f is None or not f:
+                msg.warning("Failed to open TAG file %s" % fname)
+                return []
+            coll_tree = f.Get('POOLCollectionTree')
+            run_numbers = set()
+            if coll_tree is not None:
+                for row in xrange(0, coll_tree.GetEntries()):
+                    coll_tree.GetEntry(row)
+                    run_numbers.add( getattr(coll_tree, self.run_attr_name) )
+                del coll_tree
+            f.Close()
+            del f
+            self.file_cache[fname] = run_numbers
+            msg.info("TAG file: %s, found runs: %s" % (fname, str(run_numbers)))
+            return run_numbers
 
     def get_runs_from_all_taginput(self):
         from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/doc/packagedoc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/doc/packagedoc.h
index b9359efa4d5342657f4adae610ff18ad6d35a617..3fa64924eb2b434cd815ecdeb3f96cf848c47826 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/doc/packagedoc.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/doc/packagedoc.h
@@ -26,10 +26,8 @@ The code can be browsed using LXR
 The package Database/AthenaPOOL/AthenaPoolExample contains running examples of algorithms writing and
 reading Data Objects using AthenaPoolCnvSvc. 
 
-@section AthenaPoolCnvSvc_Requirements Requirements
 
 
-@section AthenaPoolCnvSvc_PackagesUsed Packages Used
 
 
 @author Peter van Gemmeren <gemmeren@bnl.gov>
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
index 11b21e89ad7d414d5c7a545f81965a55b2a44957..1f34429dc8725faea6b0717d8593ae5128995a4a 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx
@@ -69,6 +69,7 @@ StatusCode AthenaPoolCnvSvc::initialize() {
    }
    // Retrieve OutputStreamingTool (if configured)
    if (!m_outputStreamingTool.empty()) {
+      m_streamClientFiles = m_streamClientFilesProp.value();
       if (!m_outputStreamingTool.retrieve().isSuccess()) {
          ATH_MSG_FATAL("Cannot get Output AthenaIPCTool");
          return(StatusCode::FAILURE);
@@ -305,7 +306,11 @@ StatusCode AthenaPoolCnvSvc::connectOutput(const std::string& outputConnectionSp
       return(StatusCode::FAILURE);
    }
 
-   if (!m_outputStreamingTool.empty() && m_outputStreamingTool->isClient()) {
+   if (!m_outputStreamingTool.empty() && m_outputStreamingTool[0]->isClient()) {
+      return(StatusCode::SUCCESS);
+   }
+   if (!m_outputStreamingTool.empty() && m_streamServer == m_outputStreamingTool.size()) {
+      ATH_MSG_DEBUG("connectOutput SKIPPED for expired server.");
       return(StatusCode::SUCCESS);
    }
    try {
@@ -326,13 +331,25 @@ StatusCode AthenaPoolCnvSvc::connectOutput(const std::string& outputConnectionSp
    return(StatusCode::SUCCESS);
 }
 //______________________________________________________________________________
-StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionSpec*/, bool doCommit) {
+StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& outputConnectionSpec, bool doCommit) {
 // This is called after all DataObjects are converted.
-   if (!m_outputStreamingTool.empty() && m_outputStreamingTool->isClient()) {
-      StatusCode sc = m_outputStreamingTool->lockObject("release");
+   if (!m_outputStreamingTool.empty() && m_outputStreamingTool[0]->isClient()) {
+      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()) {
+         if (m_streamClientFiles.size() < m_outputStreamingTool.size()) {
+            m_streamClientFiles.push_back(outputConnectionSpec);
+         } else {
+            streamClient = 0;
+         }
+      }
+      StatusCode sc = m_outputStreamingTool[streamClient]->lockObject("release");
       while (sc.isRecoverable()) {
          usleep(100);
-         sc = m_outputStreamingTool->lockObject("release");
+         sc = m_outputStreamingTool[streamClient]->lockObject("release");
       }
       if (!this->cleanUp().isSuccess()) {
          ATH_MSG_ERROR("commitOutput FAILED to cleanup converters.");
@@ -340,12 +357,17 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionS
       }
       return(StatusCode::SUCCESS);
    }
+   if (!m_outputStreamingTool.empty() && m_streamServer == m_outputStreamingTool.size()) {
+      ATH_MSG_DEBUG("commitOutput SKIPPED for expired server.");
+      return(StatusCode::SUCCESS);
+   }
    std::map<void*, RootType> commitCache;
-   if (!m_outputStreamingTool.empty() && m_outputStreamingTool->isServer()) {
+   if (!m_outputStreamingTool.empty() && m_streamServer < m_outputStreamingTool.size()
+		   && m_outputStreamingTool[m_streamServer]->isServer()) {
       // Clear object to get Placements for all objects in a Stream
       char* placementStr = nullptr;
       int num = -1;
-      StatusCode sc = m_outputStreamingTool->clearObject(&placementStr, num);
+      StatusCode sc = m_outputStreamingTool[m_streamServer]->clearObject(&placementStr, num);
       if (sc.isSuccess() && placementStr != nullptr && strlen(placementStr) > 0 && num > 0) {
          char* fileStr = strstr(placementStr, "[FILE=") + 6;
          char* endPos = strpbrk(fileStr, "]"); *endPos = 0;
@@ -368,10 +390,10 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionS
             // Get object
             void* buffer = nullptr;
             size_t nbytes = 0;
-            sc = m_outputStreamingTool->getObject(&buffer, nbytes, num);
+            sc = m_outputStreamingTool[m_streamServer]->getObject(&buffer, nbytes, num);
             while (sc.isRecoverable()) {
                //usleep(100);
-               sc = m_outputStreamingTool->getObject(&buffer, nbytes, num);
+               sc = m_outputStreamingTool[m_streamServer]->getObject(&buffer, nbytes, num);
             }
             if (!sc.isSuccess()) {
                ATH_MSG_ERROR("Failed to get Data for " << placementStr);
@@ -388,7 +410,7 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionS
                m_chronoStatSvc->chronoStart("wAux_ALL");
             }
             AuxDiscoverySvc auxDiscover;
-            if (!auxDiscover.receiveStore(m_serializeSvc.get(), m_outputStreamingTool.get(), obj, num).isSuccess()) {
+            if (!auxDiscover.receiveStore(m_serializeSvc.get(), m_outputStreamingTool[m_streamServer].get(), obj, num).isSuccess()) {
                ATH_MSG_ERROR("Failed to get Dynamic Aux Store for " << placementStr);
                return(StatusCode::FAILURE);
             }
@@ -429,16 +451,16 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionS
             }
 
             // Send Token back to Client
-            sc = m_outputStreamingTool->lockObject(token->toString().c_str(), num);
+            sc = m_outputStreamingTool[m_streamServer]->lockObject(token->toString().c_str(), num);
             if (!sc.isSuccess()) {
                ATH_MSG_ERROR("Failed to lock Data for " << token->toString());
                delete token; token = nullptr;
                return(StatusCode::FAILURE);
             }
             delete token; token = nullptr;
-            sc = m_outputStreamingTool->clearObject(&placementStr, num);
+            sc = m_outputStreamingTool[m_streamServer]->clearObject(&placementStr, num);
             while (sc.isRecoverable()) {
-               sc = m_outputStreamingTool->clearObject(&placementStr, num);
+               sc = m_outputStreamingTool[m_streamServer]->clearObject(&placementStr, num);
             }
             if (!sc.isSuccess()) {
                ATH_MSG_ERROR("Failed to get Data for client: " << num);
@@ -452,7 +474,7 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionS
       } else if (sc.isRecoverable() || num == -1) {
          return(StatusCode::RECOVERABLE);
       } else {
-         ATH_MSG_ERROR("Failed to get first Data for client: " << num);
+         ATH_MSG_INFO("Failed to get Data for client: " << num);
          return(StatusCode::FAILURE);
       }
    }
@@ -514,9 +536,16 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionS
 }
 //______________________________________________________________________________
 StatusCode AthenaPoolCnvSvc::disconnectOutput() {
-   if (!m_outputStreamingTool.empty() && m_outputStreamingTool->isClient()) {
+   if (!m_outputStreamingTool.empty() && m_outputStreamingTool[0]->isClient()) {
+      return(StatusCode::SUCCESS);
+   }
+   if (!m_outputStreamingTool.empty() && m_streamServer == m_outputStreamingTool.size()) {
+      ATH_MSG_DEBUG("disconnectOutput SKIPPED for expired server.");
       return(StatusCode::SUCCESS);
    }
+   if (!m_outputStreamingTool.empty()) {
+      m_streamServer = m_outputStreamingTool.size();
+   }
    // Setting default 'TREE_MAX_SIZE' for ROOT to 1024 GB to avoid file chains.
    std::vector<std::string> maxFileSize;
    maxFileSize.push_back("TREE_MAX_SIZE");
@@ -583,14 +612,29 @@ const Token* AthenaPoolCnvSvc::registerForWrite(const Placement* placement,
       m_chronoStatSvc->chronoStart("cRepR_ALL");
    }
    const Token* token = nullptr;
-   if (!m_outputStreamingTool.empty() && m_outputStreamingTool->isClient()) {
-      ATH_MSG_VERBOSE("Requesting write object for: " << placement->toString());
+   if (!m_outputStreamingTool.empty() && m_outputStreamingTool[0]->isClient()) {
+      std::string placementStr = placement->toString();
+      std::size_t streamClient = 0;
+      std::string fileName = placementStr.substr(placementStr.find("[FILE=") + 6);
+      fileName = fileName.substr(0, fileName.find(']'));
+      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()) {
+         if (m_streamClientFiles.size() < m_outputStreamingTool.size()) {
+            m_streamClientFiles.push_back(fileName);
+         } else {
+            streamClient = 0;
+         }
+      }
       // Lock object
-      std::string placementStr = placement->toString() + "[PNAME=" + classDesc.Name() + "]";
-      StatusCode sc = m_outputStreamingTool->lockObject(placementStr.c_str());
+      placementStr = placementStr + "[PNAME=" + classDesc.Name() + "]";
+      ATH_MSG_VERBOSE("Requesting write object for: " << placementStr);
+      StatusCode sc = m_outputStreamingTool[streamClient]->lockObject(placementStr.c_str());
       while (sc.isRecoverable()) {
          usleep(100);
-         sc = m_outputStreamingTool->lockObject(placementStr.c_str());
+         sc = m_outputStreamingTool[streamClient]->lockObject(placementStr.c_str());
       }
       if (!sc.isSuccess()) {
          ATH_MSG_ERROR("Failed to lock Data for " << placementStr);
@@ -618,10 +662,10 @@ const Token* AthenaPoolCnvSvc::registerForWrite(const Placement* placement,
          }
       }
       // Share object
-      sc = m_outputStreamingTool->putObject(buffer, nbytes);
+      sc = m_outputStreamingTool[streamClient]->putObject(buffer, nbytes);
       while (sc.isRecoverable()) {
          usleep(100);
-         sc = m_outputStreamingTool->putObject(buffer, nbytes);
+         sc = m_outputStreamingTool[streamClient]->putObject(buffer, nbytes);
       }
       if (own) { delete [] static_cast<const char*>(buffer); }
       buffer = nullptr;
@@ -631,24 +675,24 @@ const Token* AthenaPoolCnvSvc::registerForWrite(const Placement* placement,
          m_chronoStatSvc->chronoStart("wAux_ALL");
       }
       AuxDiscoverySvc auxDiscover;
-      if (!auxDiscover.sendStore(m_serializeSvc.get(), m_outputStreamingTool.get(), obj, pool::DbReflex::guid(classDesc), contName).isSuccess()) {
+      if (!auxDiscover.sendStore(m_serializeSvc.get(), m_outputStreamingTool[streamClient].get(), obj, pool::DbReflex::guid(classDesc), contName).isSuccess()) {
          ATH_MSG_ERROR("Could not share dynamic aux store for: " << placementStr);
          return(nullptr);
       }
       if (m_doChronoStat) {
          m_chronoStatSvc->chronoStop("wAux_ALL");
       }
-      if (!sc.isSuccess() || !m_outputStreamingTool->putObject(nullptr, 0).isSuccess()) {
+      if (!sc.isSuccess() || !m_outputStreamingTool[streamClient]->putObject(nullptr, 0).isSuccess()) {
          ATH_MSG_ERROR("Failed to put Data for " << placementStr);
          return(nullptr);
       }
       // Get Token back from Server
       char* tokenStr = nullptr;
       int num = -1;
-      sc = m_outputStreamingTool->clearObject(&tokenStr, num);
+      sc = m_outputStreamingTool[streamClient]->clearObject(&tokenStr, num);
       while (sc.isRecoverable()) {
          usleep(100);
-         sc = m_outputStreamingTool->clearObject(&tokenStr, num);
+         sc = m_outputStreamingTool[streamClient]->clearObject(&tokenStr, num);
       }
       if (!sc.isSuccess()) {
          ATH_MSG_ERROR("Failed to get Token");
@@ -658,6 +702,12 @@ const Token* AthenaPoolCnvSvc::registerForWrite(const Placement* placement,
       tempToken->fromString(tokenStr); tokenStr = nullptr;
       token = tempToken; tempToken = nullptr;
    } else {
+      if (!m_outputStreamingTool.empty() && m_streamServer == m_outputStreamingTool.size()) {
+         ATH_MSG_DEBUG("registerForWrite SKIPPED for expired server.");
+         Token* tempToken = new Token();
+         tempToken->setClassID(pool::DbReflex::guid(classDesc));
+         return(tempToken);
+      }
       token = m_poolSvc->registerForWrite(placement, obj, classDesc);
    }
    if (m_doChronoStat) {
@@ -821,9 +871,11 @@ StatusCode AthenaPoolCnvSvc::setInputAttributes(const std::string& fileName) {
 StatusCode AthenaPoolCnvSvc::makeServer(int num) {
    if (num < 0) {
       num = -num;
-      if (!m_outputStreamingTool.empty() && !m_outputStreamingTool->isServer()) {
+      m_streamServer = int(num / 1024);
+      num = num % 1024;
+      if (!m_outputStreamingTool.empty() && !m_outputStreamingTool[m_streamServer]->isServer()) {
          ATH_MSG_DEBUG("makeServer: " << m_outputStreamingTool << " = " << num);
-         if (m_outputStreamingTool->makeServer(num).isFailure()) {
+         if (m_outputStreamingTool[m_streamServer]->makeServer(num).isFailure()) {
             ATH_MSG_ERROR("makeServer: " << m_outputStreamingTool << " failed");
             return(StatusCode::FAILURE);
          }
@@ -839,11 +891,13 @@ StatusCode AthenaPoolCnvSvc::makeServer(int num) {
 }
 //________________________________________________________________________________
 StatusCode AthenaPoolCnvSvc::makeClient(int num) {
-   if (!m_outputStreamingTool.empty() && !m_outputStreamingTool->isClient() && num > 0) {
+   if (!m_outputStreamingTool.empty() && !m_outputStreamingTool[0]->isClient() && num > 0) {
       ATH_MSG_DEBUG("makeClient: " << m_outputStreamingTool << " = " << num);
-      if (m_outputStreamingTool->makeClient(num).isFailure()) {
-         ATH_MSG_ERROR("makeClient: " << m_outputStreamingTool << " failed");
-         return(StatusCode::FAILURE);
+      for (std::size_t streamClient = 0; streamClient < m_outputStreamingTool.size(); streamClient++) {
+         if (m_outputStreamingTool[streamClient]->makeClient(num).isFailure()) {
+            ATH_MSG_ERROR("makeClient: " << m_outputStreamingTool << ", " << streamClient << " failed");
+            return(StatusCode::FAILURE);
+         }
       }
    }
    if (m_inputStreamingTool.empty()) {
@@ -957,7 +1011,8 @@ AthenaPoolCnvSvc::AthenaPoolCnvSvc(const std::string& name, ISvcLocator* pSvcLoc
 	m_clidSvc("ClassIDSvc", name),
 	m_serializeSvc("AthenaRootSerializeSvc", name),
 	m_inputStreamingTool("", this),
-	m_outputStreamingTool("", this),
+	m_outputStreamingTool(this),
+	m_streamServer(0),
 	m_containerPrefix(),
 	m_containerNameHint(),
 	m_branchNameHint(),
@@ -969,6 +1024,7 @@ AthenaPoolCnvSvc::AthenaPoolCnvSvc(const std::string& name, ISvcLocator* pSvcLoc
    declareProperty("SubLevelBranchName", m_branchNameHintProp = "<type>/<key>");
    declareProperty("PoolAttributes", m_poolAttr);
    declareProperty("InputPoolAttributes", m_inputPoolAttr);
+   declareProperty("OutputPoolFileAllocator", m_streamClientFilesProp);
    declareProperty("PrintInputAttrPerEvt", m_inputPoolAttrPerEvent);
    declareProperty("MaxFileSizes", m_maxFileSizes);
    declareProperty("CommitInterval", m_commitInterval = 0);
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
index e8af472b8676d8a27085f699bec010431b53fb98..903e1834b92f4e3a021b93970b5c9db0b1e17d53 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h
@@ -193,7 +193,8 @@ private: // data
    ServiceHandle<IClassIDSvc>    m_clidSvc;
    ServiceHandle<IAthenaSerializeSvc> m_serializeSvc;
    ToolHandle<IAthenaIPCTool>    m_inputStreamingTool;
-   ToolHandle<IAthenaIPCTool>    m_outputStreamingTool;
+   ToolHandleArray<IAthenaIPCTool>    m_outputStreamingTool;
+   std::size_t     m_streamServer;
 
 private: // properties
    /// UseDetailChronoStat, enable detailed output for time and size statistics for AthenaPOOL:
@@ -223,6 +224,10 @@ private: // properties
    StringArrayProperty m_inputPoolAttrPerEvent;
    std::vector<std::vector<std::string> > m_inputAttrPerEvent;
 
+   /// Output FileNames to be associated with Stream Clients
+   StringArrayProperty m_streamClientFilesProp;
+   mutable std::vector<std::string>   m_streamClientFiles;
+
    /// MaxFileSizes, vector with maximum file sizes for Athena POOL output files
    StringArrayProperty m_maxFileSizes;
    long long m_domainMaxFileSize;
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx
index 104fd2ad5afbb106771e6e9d621ab62a544a58d5..a6c41a1e91bb62989cb2f242ddb9aab40e1231e6 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx
@@ -122,7 +122,7 @@ const SG::auxid_set_t& AuxDiscoverySvc::getAuxIDs(const void* obj, const Guid& c
    if (m_store == nullptr) {
       return s_emptySet;
    }
-   return m_store->getDynamicAuxIDs();
+   return m_store->getSelectedAuxIDs();
 }
 
 const void* AuxDiscoverySvc::getData(SG::auxid_t auxid) {
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt
index 5cfad0d92a23982d6381e1dcce253a0eac864432..82aa28baaaadf79dde0fc32ea50e1203e6594be3 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/CMakeLists.txt
@@ -10,7 +10,6 @@ atlas_depends_on_subdirs( PRIVATE
                           AtlasTest/TestTools
                           Control/AthenaBaseComps
                           Control/AthenaKernel
-                          Control/MinimalRunTime
                           Control/StoreGate
                           Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData
                           Database/AthenaPOOL/AthenaPoolKernel
@@ -37,7 +36,7 @@ function( _add_test testName toExecute )
 
    # Look for possible extra arguments:
    cmake_parse_arguments( ARG "" "POST_EXEC;PRE_EXEC;EXTRA_PATTERNS"
-      "ENVIRONMENT;DEPENDS" ${ARGN} )
+      "DEPENDS" ${ARGN} )
 
    # Create the script that will run the test:
    configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/test/athenarun_test.sh.in
@@ -53,17 +52,16 @@ function( _add_test testName toExecute )
       list( APPEND _options PRE_EXEC_SCRIPT
          "${CMAKE_CURRENT_SOURCE_DIR}/${ARG_PRE_EXEC} ${testName}" )
    endif()
-   if( ARG_ENVIRONMENT )
-      list( APPEND _options ENVIRONMENT ${ARG_ENVIRONMENT} )
-   endif()
    if( ARG_EXTRA_PATTERNS )
       list( APPEND _options EXTRA_PATTERNS ${ARG_EXTRA_PATTERNS} )
    endif()
 
+   list( APPEND _options ENVIRONMENT "ATLAS_REFERENCE_TAG=AthenaPoolExampleAlgorithms/AthenaPoolExampleAlgorithms-01-00-00" )
+
    # Set up the test:
    atlas_add_test( ${testName}
-      SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/${testName}_test.sh
-      ${_options} )
+       SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/${testName}_test.sh
+       ${_options} )
 
    if( ARG_DEPENDS )
       set_tests_properties( AthenaPoolExampleAlgorithms_${testName}_ctest
@@ -78,6 +76,7 @@ endfunction( _add_test )
 # Write 'Hits', with multistreamand TAGs
 _add_test( AthenaPoolExample_Write 
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_WriteJobOptions.py"
+   EXTRA_PATTERNS "RootCollection Debug File|found catalog guid|from the catalog"
    PRE_EXEC test/pre_check.sh )
 # Append to existing file
 _add_test( AthenaPoolExample_Append
@@ -86,10 +85,12 @@ _add_test( AthenaPoolExample_Append
 # Read 'Hits' and write 'Tracks'
 _add_test( AthenaPoolExample_ReWrite
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_RWJobOptions.py"
+   EXTRA_PATTERNS "RootCollection Debug File|found catalog guid|from the catalog"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_Append_ctest )
 # Read all output
 _add_test( AthenaPoolExample_Read
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py"
+   EXTRA_PATTERNS "BYTES_READ"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReWrite_ctest )
 # Read all output via TAGs
 _add_test( AthenaPoolExample_ReadTag
@@ -98,10 +99,12 @@ _add_test( AthenaPoolExample_ReadTag
 # Read all output including scoped BackNavigation
 _add_test( AthenaPoolExample_ReadBN
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadBNJobOptions.py"
+   EXTRA_PATTERNS "BYTES_READ"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReWrite_ctest )
 # Read all output w/o BackNavigation
 _add_test( AthenaPoolExample_ReadNoBN
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadNoBNJobOptions.py"
+   EXTRA_PATTERNS "BYTES_READ"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReWrite_ctest )
 
 # Copy 'Hits' file without extending provenance
@@ -117,10 +120,12 @@ _add_test( AthenaPoolExample_ReWriteAgain
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_Copy_ctest )
 _add_test( AthenaPoolExample_ReWriteNext
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReWriteNextJobOptions.py"
+   EXTRA_PATTERNS "RootCollection Debug File|found catalog guid|from the catalog"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReWriteAgain_ctest )
 # Read via TAGs and use query to filter events
 _add_test( AthenaPoolExample_Filter
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_FilterJobOptions.py"
+   EXTRA_PATTERNS "RootCollection Debug File|found catalog guid|from the catalog"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReWriteNext_ctest )
 _add_test( AthenaPoolExample_RFilter
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_RFilterJobOptions.py"
@@ -128,7 +133,7 @@ _add_test( AthenaPoolExample_RFilter
 # Read all (including bad files, skipped for now expected failure)
 _add_test( AthenaPoolExample_ReadAgain
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadAgainJobOptions.py"
-   EXTRA_PATTERNS "Deaccess DbContainer|Database being retired"
+   EXTRA_PATTERNS "Deaccess DbContainer|Database being retired|BYTES_READ"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_RFilter_ctest )
 
 # Concatenate jobs write 'Hits' and 'Tracks' to different streams
@@ -139,11 +144,13 @@ _add_test( AthenaPoolExample_Concat
    PRE_EXEC test/pre_check.sh )
 _add_test( AthenaPoolExample_ReadConcat
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadJobOptions.py"
+   EXTRA_PATTERNS "BYTES_READ"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_Concat_ctest )
 
 # Read ByteStream and write to APR/POOL
 _add_test( AthenaPoolExample_RWBs
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_RWBsJobOptions.py"
+   EXTRA_PATTERNS "BSF:|Picked valid file:|RootCollection Debug File|found catalog guid|from the catalog"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReadConcat_ctest )
 _add_test( AthenaPoolExample_ReadBs
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadBsJobOptions.py"
@@ -159,6 +166,7 @@ _add_test( AthenaPoolExample_RWcBs
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_RWcBsJobOptions.py"
 #   DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReadBsTag_ctest
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_ReadBs_ctest
+   EXTRA_PATTERNS "Events to copy|Checking file|Created DataWriter|File:|Event index:|^Run:|Event ID:|^LumiBlock:|Wrote 3 events"
    PRE_EXEC test/pre_check.sh )
 _add_test( AthenaPoolExample_ReadcBs
    "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_ReadBsJobOptions.py"
@@ -195,9 +203,11 @@ _add_test( AthenaPoolExample_RMeta
 # Testing APR/POOL 'fast' merge
 _add_test( AthenaPoolExample_WriteFast
    "athena.py  AthenaPoolExampleAlgorithms/AthenaPoolExample_WriteFastJobOptions.py"
+   EXTRA_PATTERNS "RootCollection Debug File|found catalog guid|from the catalog"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_RMeta_ctest )
 _add_test( AthenaPoolExample_AppendFast
    "athena.py  AthenaPoolExampleAlgorithms/AthenaPoolExample_AppendFastJobOptions.py"
+   EXTRA_PATTERNS "RootCollection Debug File|found catalog guid|from the catalog|DbContainer|Reading Shape|Reading Assoc|Reading Param|Adding Assoc|Adding Shape|#Elements|->ClassID:|Pushing back ref|Building shape|DataHeader|No objects passing|EventInfo|Info Token|Class:unsigned int|EventStreamInfo|Class:Token|Info unsigned int"
    DEPENDS AthenaPoolExampleAlgorithms_AthenaPoolExample_WriteFast_ctest )
 #_add_test( AthenaPoolExample_ReWriteFast
 #   "athena.py AthenaPoolExampleAlgorithms/AthenaPoolExample_RWJobOptions.py"
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/doc/packagedoc.h b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/doc/packagedoc.h
index f09f4ee593db48d90dfb47a45ca18b7a5aca886b..fd2ea65d4da917f70fa584812a067b8d8765647b 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/doc/packagedoc.h
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/doc/packagedoc.h
@@ -171,11 +171,9 @@ The code can be browsed using LXR
 (http://alxr.usatlas.bnl.gov/lxr/source/atlas/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/)
 
 
-@section AthenaPoolExampleAlgorithms_Requirements Requirements
 
 
 
-@section AthenaPoolExampleAlgorithms_PackagesUsed Packages Used
 
 
 
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWBsJobOptions.py b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWBsJobOptions.py
index 875de2290f600faebf38befd23a1435549b76b38..a1cac9c37c9cb62776e330575587647063558a8e 100755
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWBsJobOptions.py
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWBsJobOptions.py
@@ -44,7 +44,11 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
-svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data" ]
+import os
+fname = "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data"
+if not os.path.exists (fname) and os.environ.has_key('ATLAS_REFERENCE_DATA'):
+    fname = os.environ['ATLAS_REFERENCE_DATA'] + "/bstest/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data"
+svcMgr.ByteStreamInputSvc.FullFileName = [ fname ]
 #svcMgr.ByteStreamInputSvc.FullFileName = [ "test_defl.data" ]
 
 svcMgr.ByteStreamInputSvc.ValidateEvent = True
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWcBsJobOptions.py b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWcBsJobOptions.py
index dcc6b968277c1b812811c53884333f2404a52929..3cc936ae6f3d3be45546e16137dfec77ed01a069 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWcBsJobOptions.py
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/share/AthenaPoolExample_RWcBsJobOptions.py
@@ -32,6 +32,14 @@
 #
 #==============================================================
 
+import os
+if not os.path.exists ('test_defl.data'):
+    fname = "/afs/cern.ch/atlas/offline/test/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data"
+    if not os.path.exists (fname) and os.environ.has_key('ATLAS_REFERENCE_DATA'):
+        fname = os.environ['ATLAS_REFERENCE_DATA'] + "/bstest/daq.m4_combined.0020720.extract.L1TT-b00000010._0001.data"
+    os.system ('AtlCopyBSEvent.exe -d -e 14350,14356,14382 -o test_defl.data ' + fname)
+
+
 ## basic job configuration
 import AthenaCommon.AtlasUnixStandardJob
 
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.cxx b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.cxx
index c094312e024c2fc2505f342677fe778500547247..f2efa2b99b2aa8078d4d38bc0c214ca3656c21d1 100755
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.cxx
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadData.cxx
@@ -127,7 +127,8 @@ StatusCode ReadData::execute() {
       for (ExampleTrackContainer::const_iterator obj = cont->begin(); obj != cont->end(); obj++) {
          ATH_MSG_INFO("Track pt = " << (*obj)->getPT() << " eta = " << (*obj)->getEta() << " phi = " << (*obj)->getPhi() << " detector = " << (*obj)->getDetector());
          try {
-            ATH_MSG_INFO("ElementLink1 = " << (*obj)->getElement1()->getX());
+            double x = (*obj)->getElement1()->getX();
+            ATH_MSG_INFO("ElementLink1 = " << x);
             ATH_MSG_INFO("ElementLink2 = " << (*obj)->getElement2()->getX());
             ATH_MSG_INFO("Link ElementLinkVector = " << (*obj)->getElementLinkVector()->size());
             for (ElementLinkVector<ExampleHitContainer>::const_iterator iter = (*obj)->getElementLinkVector()->begin(); iter != (*obj)->getElementLinkVector()->end(); ++iter) {
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadMeta.cxx b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadMeta.cxx
index 4fcd3baf2239537add96d2d4ec7d2a2696b40218..44b642fbd4d96ef0d3e249d3cd738ccccf0f2e49 100755
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadMeta.cxx
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/src/ReadMeta.cxx
@@ -84,7 +84,7 @@ void ReadMeta::handle(const Incident& inc) {
             const ExampleHitContainer* ep = iter->dataObject;
             if (!m_pMetaDataStore->contains<ExampleHitContainer>("PedestalWriteData")) {
                ep_out = new ExampleHitContainer();
-               ExampleHit* entry = *ep->begin();
+               const ExampleHit* entry = *ep->begin();
                ExampleHit* entry_out = new ExampleHit();
                entry_out->setX(entry->getX());
                entry_out->setY(entry->getY());
@@ -100,7 +100,7 @@ void ReadMeta::handle(const Incident& inc) {
                   ATH_MSG_ERROR("Could not find DataObject in output: PedestalWriteData");
                   return;
                }
-               ExampleHit* entry = *ep->begin();
+               const ExampleHit* entry = *ep->begin();
                ExampleHit* entry_out = *ep_out->begin();
                int weight = entry->getDetector().size() - 2;
                int weight_out = entry_out->getDetector().size() - 2;
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/test/athenarun_test.sh.in b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/test/athenarun_test.sh.in
index 453d2e847e82db135125ff1fbe7961a1763d9c42..b340df859c9c3011fabd78feca38d24395a30260 100755
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/test/athenarun_test.sh.in
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleAlgorithms/test/athenarun_test.sh.in
@@ -17,7 +17,7 @@ s/^.*Py:Athena /Athena    /g
 s/fffffffff/f/g
 s/000000000/0/g
 s/INFO CLID = 222376821, key = Stream[12]/INFO CLID = 222376821, key = StreamX/g
-s/0x[0-9a-f]\\\\{7,8\\\\}/0x????/g
+s/0x[0-9a-f]\\\\{7,12\\\\}/0x????/g
 EOF
 
 # Ordering sensitivities
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/doc/packagedoc.h b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/doc/packagedoc.h
index 884ef83f60e9960814f7b54ea521d67741b385f1..f27af93fd24b1da3fb8626ce33b4fc4264bfabba 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/doc/packagedoc.h
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/doc/packagedoc.h
@@ -37,11 +37,9 @@ The code can be browsed using LXR
 (http://alxr.usatlas.bnl.gov/lxr/source/atlas/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/)
 
 
-@section AthenaPoolExampleConverter_Requirements Requirements
 
 
 
-@section AthenaPoolExampleConverter_PackagesUsed Packages Used
 
 
 
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/src/ExampleHitCnv_p1.h b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/src/ExampleHitCnv_p1.h
index 4778b1ec9c6f24dbc454257e978530fc4b630c68..ed85af11b9006514aeac0ad6c3dad5a6662daffa 100755
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/src/ExampleHitCnv_p1.h
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/src/ExampleHitCnv_p1.h
@@ -13,13 +13,8 @@
  **/
 
 #include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h"
-
-#define private public
-#define protected public
 #include "AthenaPoolExampleData/ExampleHit.h"
 #include "AthenaPoolExampleConverter/ExampleHit_p1.h"
-#undef private
-#undef protected
 
 
 class ExampleHitCnv_p1 : public T_AthenaPoolTPCnvBase<ExampleHit, ExampleHit_p1> { 
@@ -31,16 +26,20 @@ public:
     *  from its persistent representation @c ExampleHit_p1
     */
    virtual void persToTrans(const ExampleHit_p1* persObj, ExampleHit* transObj, MsgStream&/* msg*/) {
-      transObj->m_vec = persObj->m_vec;
-      transObj->m_detector = persObj->m_detector;
+      transObj->setX (persObj->m_vec.x());
+      transObj->setY (persObj->m_vec.y());
+      transObj->setZ (persObj->m_vec.z());
+      transObj->setDetector (persObj->m_detector);
    }
 
    /** Method creating the persistent representation @c ExampleHit_p1
     *  from its transient representation @c ExampleHit
     */
    virtual void transToPers(const ExampleHit* transObj, ExampleHit_p1* persObj, MsgStream&/* msg*/) {
-      persObj->m_vec = transObj->m_vec;
-      persObj->m_detector = transObj->m_detector;
+      persObj->m_vec.setX (transObj->getX());
+      persObj->m_vec.setY (transObj->getY());
+      persObj->m_vec.setZ (transObj->getZ());
+      persObj->m_detector = transObj->getDetector();
    }
 }; 
 
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/src/ExampleTrackCnv_p1.h b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/src/ExampleTrackCnv_p1.h
index 10f74382e3ffcd59fb8a2567a1047232235b3dbc..60a477c7b2e8117f8658b3427d149c041994bad3 100755
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/src/ExampleTrackCnv_p1.h
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleConverter/src/ExampleTrackCnv_p1.h
@@ -16,13 +16,8 @@
 #include "DataModelAthenaPool/ElementLinkCnv_p3.h"
 #include "DataModelAthenaPool/ElementLinkVectorCnv_p1.h"
 #include "DataModelAthenaPool/NavigableCnv_p2.h"
-
-#define private public
-#define protected public
 #include "AthenaPoolExampleData/ExampleTrack.h"
 #include "AthenaPoolExampleConverter/ExampleTrack_p1.h"
-#undef private
-#undef protected
 
 class ExampleTrackCnv_p1 : public T_AthenaPoolTPCnvBase<ExampleTrack, ExampleTrack_p1> { 
 
@@ -33,30 +28,30 @@ public:
     *  from its persistent representation @c ExampleTrack_p1
     */
    virtual void persToTrans(const ExampleTrack_p1* persObj, ExampleTrack* transObj, MsgStream& msg) {
-      transObj->m_detector = persObj->m_detector;
-      elCnv.persToTrans(&persObj->m_elementlink1, &transObj->m_elementlink1, msg);
-      elCnv.persToTrans(&persObj->m_elementlink2, &transObj->m_elementlink2, msg);
-      elvCnv.persToTrans(&persObj->m_elementlinkvector, &transObj->m_elementlinkvector, msg);
-      navCnv.persToTrans(persObj->m_navigable, transObj->m_navigable, msg);
-      wNavCnv.persToTrans(persObj->m_weightednavigable, transObj->m_weightednavigable, msg);
-      transObj->m_pt = persObj->m_pt;
-      transObj->m_eta = persObj->m_eta;
-      transObj->m_phi = persObj->m_phi;
+      transObj->setDetector (persObj->m_detector);
+      elCnv.persToTrans(&persObj->m_elementlink1, transObj->getElementLink1(), msg);
+      elCnv.persToTrans(&persObj->m_elementlink2, transObj->getElementLink2(), msg);
+      elvCnv.persToTrans(&persObj->m_elementlinkvector, transObj->getElementLinkVector(), msg);
+      navCnv.persToTrans(persObj->m_navigable, *transObj->getNavigable(), msg);
+      wNavCnv.persToTrans(persObj->m_weightednavigable, *transObj->getWeightedNavigable(), msg);
+      transObj->setPT (persObj->m_pt);
+      transObj->setEta (persObj->m_eta);
+      transObj->setPhi (persObj->m_phi);
    }
 
    /** Method creating the persistent representation @c ExampleTrack_p1
     *  from its transient representation @c ExampleTrack
     */
    virtual void transToPers(const ExampleTrack* transObj, ExampleTrack_p1* persObj, MsgStream& msg) {
-      persObj->m_detector = transObj->m_detector;
-      elCnv.transToPers(&transObj->m_elementlink1, &persObj->m_elementlink1, msg);
-      elCnv.transToPers(&transObj->m_elementlink2, &persObj->m_elementlink2, msg);
-      elvCnv.transToPers(&transObj->m_elementlinkvector, &persObj->m_elementlinkvector, msg);
-      navCnv.transToPers(transObj->m_navigable, persObj->m_navigable, msg);
-      wNavCnv.transToPers(transObj->m_weightednavigable, persObj->m_weightednavigable, msg);
-      persObj->m_pt = transObj->m_pt;
-      persObj->m_eta = transObj->m_eta;
-      persObj->m_phi = transObj->m_phi;
+      persObj->m_detector = transObj->getDetector();
+      elCnv.transToPers(transObj->getElementLink1(), &persObj->m_elementlink1, msg);
+      elCnv.transToPers(transObj->getElementLink2(), &persObj->m_elementlink2, msg);
+      elvCnv.transToPers(transObj->getElementLinkVector(), &persObj->m_elementlinkvector, msg);
+      navCnv.transToPers(*transObj->getNavigable(), persObj->m_navigable, msg);
+      wNavCnv.transToPers(*transObj->getWeightedNavigable(), persObj->m_weightednavigable, msg);
+      persObj->m_pt = transObj->getPT();
+      persObj->m_eta = transObj->getEta();
+      persObj->m_phi = transObj->getPhi();
    }
 
 private:
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData/AthenaPoolExampleData/ExampleTrack.h b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData/AthenaPoolExampleData/ExampleTrack.h
index aa30c6ea4f5a90a67aa8c5586ba842dac20e0012..1907ae079460fed17b7be5bde67ee79fa77cbd8a 100755
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData/AthenaPoolExampleData/ExampleTrack.h
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData/AthenaPoolExampleData/ExampleTrack.h
@@ -60,10 +60,12 @@ public: // Non-static members
 
    /// @return a pointer to the first element link.
    ElementLink<ExampleHitContainer>* getElementLink1() { return(&m_elementlink1); }
+   const ElementLink<ExampleHitContainer>* getElementLink1() const { return(&m_elementlink1); }
    /// @return a constant pointer to the first linked object.
    const ExampleHit* getElement1() const { return(*m_elementlink1); }
    /// @return a pointer to the second element link.
    ElementLink<ExampleHitContainer>* getElementLink2() { return(&m_elementlink2); }
+   const ElementLink<ExampleHitContainer>* getElementLink2() const { return(&m_elementlink2); }
    /// @return a constant pointer to the second linked object.
    const ExampleHit* getElement2() const { return(*m_elementlink2); }
 
diff --git a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData/doc/packagedoc.h b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData/doc/packagedoc.h
index 43b43ac501a698ce1faeea85d7c837a2443a8b5f..20ec28bfaea5774baeebb3c883d1354e0834edfe 100644
--- a/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData/doc/packagedoc.h
+++ b/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData/doc/packagedoc.h
@@ -24,11 +24,9 @@ The code can be browsed using LXR
 (http://alxr.usatlas.bnl.gov/lxr/source/atlas/Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData/)
 
 
-@section AthenaPoolExampleData_Requirements Requirements
 
 
 
-@section AthenaPoolExampleData_PackagesUsed Packages Used
 
 
 
diff --git a/Database/AthenaPOOL/AthenaPoolTools/CMakeLists.txt b/Database/AthenaPOOL/AthenaPoolTools/CMakeLists.txt
index fd67852d5d1d47ed92c21065465cf05726ec0ef0..1281d1a56081c9a6951942ba8fed218d079ce409 100644
--- a/Database/AthenaPOOL/AthenaPoolTools/CMakeLists.txt
+++ b/Database/AthenaPOOL/AthenaPoolTools/CMakeLists.txt
@@ -13,15 +13,17 @@ atlas_depends_on_subdirs( PRIVATE
                           Database/PersistentDataModel
                           Event/EventInfo
                           Event/xAOD/xAODEventInfo
+                          Event/xAOD/xAODCutFlow
                           GaudiKernel
                           TestPolicy )
 
 # Component(s) in the package:
 atlas_add_component( AthenaPoolTools
                      src/EventCount.cxx
+                     src/MetadataTest.cxx
                      src/RequireUniqueEvent.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps AthenaKernel StoreGateLib SGtests PersistentDataModel EventInfo xAODEventInfo GaudiKernel )
+                     LINK_LIBRARIES AthenaBaseComps AthenaKernel StoreGateLib SGtests PersistentDataModel EventInfo xAODEventInfo GaudiKernel xAODCutFlow)
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/Database/AthenaPOOL/AthenaPoolTools/share/MetadataTest.py b/Database/AthenaPOOL/AthenaPoolTools/share/MetadataTest.py
new file mode 100755
index 0000000000000000000000000000000000000000..fd7ac7128ed0254a5aae2742b5d7af95807d2fb2
--- /dev/null
+++ b/Database/AthenaPOOL/AthenaPoolTools/share/MetadataTest.py
@@ -0,0 +1,56 @@
+## @file EventCount.py
+## @brief TopOptions: Using command line argument In, read all events from
+## In to count them and find their run numbers. If dump flag is set, then an
+## object count is also given.
+## @author Jack Cranshaw (Jack.Cranshaw@cern.ch)
+## $Id: EventCount.py,v 1.5 2007-10-18 13:46:20 gemmeren Exp $
+#--------------------------------------------------------------
+# Event related parameters
+#--------------------------------------------------------------
+#import glob, os, re
+
+theApp.EvtMax = 200000
+#--------------------------------------------------------------
+# Load POOL support
+#--------------------------------------------------------------
+# Dummy flags to appease the god of JO
+#useNova=False; MuonLayout='P03-DC2'; MuonDDUseNova=False;
+
+import AthenaPoolCnvSvc.ReadAthenaPool
+
+# get a handle on the ServiceManager
+from AthenaCommon.AppMgr import ServiceMgr
+
+from AthenaCommon.AppMgr import theApp
+
+try:
+  theApp.EvtMax = EvtMax
+except:
+  theApp.EvtMax = -1
+
+# Take the file name form the command line -c options
+EventSelector = svcMgr.EventSelector
+try:
+  EventSelector.InputCollections = In
+except:
+  print "Usage: -c 'In=['file']'"
+# Check collection type
+try:
+  EventSelector.CollectionType = CollType
+except:
+  print "Reading from file"
+
+try:
+  EventSelector.Query = Query
+except:
+  pass
+
+include ("AthenaPoolTools/MetadataTest_jobOptions.py")
+                                                                               
+MessageSvc = svcMgr.MessageSvc
+MessageSvc.OutputLevel = INFO
+#==============================================================
+#
+# End of job options file
+#
+###############################################################
diff --git a/Database/AthenaPOOL/AthenaPoolTools/share/MetadataTest_jobOptions.py b/Database/AthenaPOOL/AthenaPoolTools/share/MetadataTest_jobOptions.py
new file mode 100755
index 0000000000000000000000000000000000000000..b2b0eb2472b3a52b9f01433a51eba6a06033ca48
--- /dev/null
+++ b/Database/AthenaPOOL/AthenaPoolTools/share/MetadataTest_jobOptions.py
@@ -0,0 +1,45 @@
+## @file EventCount_jobOptions.py
+## @brief JobOptions: Defaults.
+## @author Jack Cranshaw (Jack.Cranshaw@cern.ch)
+## $Id: EventCount_jobOptions.py,v 1.6 2007-10-18 13:46:20 gemmeren Exp $
+#--------------------------------------------------------------
+# Event related parameters
+#--------------------------------------------------------------
+
+## get a handle on the ServiceManager
+from AthenaCommon.AppMgr import ServiceMgr
+
+from CLIDComps.CLIDCompsConf import ClassIDSvc
+svcMgr += ClassIDSvc()
+
+from AthenaCommon.Constants   import INFO
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
+alg = xAODMaker__EventInfoCnvAlg()
+alg.xAODKey = ""
+topSequence += alg
+
+#include("EventSelectorAthenaPool/MetaDataSvc_jobOptions.py")
+from AthenaServices.AthenaServicesConf import MetaDataSvc
+svcMgr += MetaDataSvc()
+svcMgr.MetaDataSvc.OutputLevel = 2
+svcMgr.ProxyProviderSvc.ProviderNames += [ "MetaDataSvc" ]
+
+from IOVSvc.IOVSvcConf import MetaInputLoader
+metain = MetaInputLoader()
+metain.Dump = True
+metain.Load = [('xAOD::CutBookkeeperContainer','CutBookkeepers')]
+topSequence += metain
+
+from AthenaPoolTools.AthenaPoolToolsConf import EventCount
+topSequence += EventCount( OutputLevel = INFO,
+                           Dump        = True )
+from AthenaPoolTools.AthenaPoolToolsConf import MetadataTest
+topSequence += MetadataTest( OutputLevel = INFO )
+#==============================================================
+#
+# End of job options file
+#
+###############################################################
diff --git a/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.cxx b/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.cxx
index 8ee269efcdd8038367b6b139ad43bd26e0c2f42d..c1a19f873abef2b293e5407c14cbff15b57d3d7b 100755
--- a/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.cxx
+++ b/Database/AthenaPOOL/AthenaPoolTools/src/EventCount.cxx
@@ -92,7 +92,7 @@ StatusCode EventCount::execute()
    ATH_MSG_DEBUG ( "in execute()" );
 
    // Get the event header, print out event and run number
-   ATH_MSG_INFO ( evtStore()->dump() );
+   //ATH_MSG_INFO ( evtStore()->dump() );
    const DataHandle<xAOD::EventInfo> evt;
    ATH_CHECK( evtStore()->retrieve(evt) );
    if (!evt.isValid()) {
diff --git a/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.cxx b/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.cxx
new file mode 100755
index 0000000000000000000000000000000000000000..078ae3fde43595d93607cafd4b65318b05f0d09c
--- /dev/null
+++ b/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.cxx
@@ -0,0 +1,75 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file MetadataTest.cxx
+ * @brief Implementation of class MetadataTest
+ */
+ 
+#include "MetadataTest.h"
+
+//#include "GaudiKernel/MsgStream.h"
+//#include "GaudiKernel/AlgFactory.h"
+#include "StoreGate/ReadMetaHandle.h"
+
+#include "xAODCutFlow/CutBookkeeperContainer.h"
+
+#include "StoreGate/StoreGateSvc.h"
+
+
+//___________________________________________________________________________
+MetadataTest::MetadataTest(const std::string& name, ISvcLocator* pSvcLocator) : 
+   AthAlgorithm(name, pSvcLocator),
+   m_hkey("CutBookkeepers","MetaDataStore"),
+   m_ckey("CutBookkeepers","MetaDataStore")
+{
+}
+
+MetadataTest::~MetadataTest()
+{}
+
+StatusCode MetadataTest::initialize() 
+{
+   ATH_CHECK( m_hkey.initialize() );  
+   ATH_CHECK( m_ckey.initialize() );  
+   return StatusCode::SUCCESS;
+}
+
+StatusCode MetadataTest::execute() 
+{
+   ATH_MSG_DEBUG ( "in execute()" );
+
+   ServiceHandle<StoreGateSvc> metastore("StoreGateSvc/MetaDataStore",this->name());
+   ATH_CHECK(metastore.retrieve());
+ 
+/*
+   SG::ReadHandle< MetaCont<xAOD::CutBookkeeperContainer> > cont(m_ckey);
+   //const MetaCont<xAOD::CutBookkeeperContainer>* cont(*rckey);
+   if (cont != nullptr) {
+     ATH_MSG_INFO("BLARG cbk container size = " << cont->entries());
+   } else {
+     ATH_MSG_INFO("Did not retrieve MetaCont from store");
+   }
+*/
+
+   SG::ReadMetaHandle<xAOD::CutBookkeeperContainer> readkey(m_hkey);
+   const xAOD::CutBookkeeperContainer* cbkCont(*readkey);
+   //ATH_MSG_INFO("BLARG " << metastore->dump());
+   if (cbkCont != nullptr) {
+     ATH_MSG_INFO("Found cbk size " << cbkCont->size());
+     //for (auto it = cbkCont->begin(); it != cbkCont->end(); ++it) {
+       //ATH_MSG_INFO("Name: " <<(*it)->name() << ", N=" << (*it)->nAcceptedEvents());
+     //}
+   } else {
+     ATH_MSG_ERROR("Did not retrieve CutBookkeeperContainer from store");
+   }
+
+   return(StatusCode::SUCCESS);
+}
+
+StatusCode MetadataTest::finalize() 
+{
+   ATH_MSG_DEBUG ( "in m_finalize()" );
+   return(StatusCode::SUCCESS);
+}
diff --git a/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.h b/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.h
new file mode 100755
index 0000000000000000000000000000000000000000..a3dabd81655b043a90db8ef9b38cdc80c56b52f8
--- /dev/null
+++ b/Database/AthenaPOOL/AthenaPoolTools/src/MetadataTest.h
@@ -0,0 +1,46 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// MetadataTest.h
+
+#ifndef ATHENAPOOLTOOLS_METADATATEST_H
+#define ATHENAPOOLTOOLS_METADATATEST_H
+/**
+ * @file MetadataTest.h
+ * @brief class definition for MetadataTest
+ */
+ 
+/**
+ * @class MetadataTest
+ * @brief Counts events in a pool file, and can also count the objects 
+ * and give a summary of their keys. Output is via the message logger.
+ * <br>
+ * @author Jack Cranshaw (Jack.Cranshaw@cern.ch)
+ * Created October 2004
+ * $Id: MetadataTest.h,v 1.4 2007-12-20 21:54:12 cranshaw Exp $
+ */
+             
+                                                                                
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/ReadMetaHandleKey.h"
+#include "xAODCutFlow/CutBookkeeperContainer.h"
+
+class MetadataTest : public AthAlgorithm {
+public:
+
+	  
+  MetadataTest(const std::string& name, ISvcLocator* pSvcLocator);
+  virtual ~MetadataTest();
+  
+  StatusCode initialize(); /// Algorithm interface. Cannot re-initialize with this
+  StatusCode execute();    /// Algorithm interface.
+  StatusCode finalize();   /// Algorithm interface.
+
+private:
+  SG::ReadMetaHandleKey<xAOD::CutBookkeeperContainer> m_hkey;
+  SG::ReadHandleKey< MetaCont<xAOD::CutBookkeeperContainer> > m_ckey;
+
+
+};
+#endif
diff --git a/Database/AthenaPOOL/AthenaPoolTools/src/components/AthenaPoolTools_entries.cxx b/Database/AthenaPOOL/AthenaPoolTools/src/components/AthenaPoolTools_entries.cxx
index bc5cbd9ce043801025ccbac7a65f3f4863acb982..7f36b76a6ef1234d8808946aa2dcfe4cc928a420 100755
--- a/Database/AthenaPOOL/AthenaPoolTools/src/components/AthenaPoolTools_entries.cxx
+++ b/Database/AthenaPOOL/AthenaPoolTools/src/components/AthenaPoolTools_entries.cxx
@@ -4,13 +4,16 @@
  */
   
 #include "../EventCount.h"
+#include "../MetadataTest.h"
 #include "../RequireUniqueEvent.h"
 #include "GaudiKernel/DeclareFactoryEntries.h"
 
 DECLARE_ALGORITHM_FACTORY(EventCount)
+DECLARE_ALGORITHM_FACTORY(MetadataTest)
 DECLARE_ALGORITHM_FACTORY(RequireUniqueEvent)
 
 DECLARE_FACTORY_ENTRIES(AthenaPoolTools) {
    DECLARE_ALGORITHM(EventCount)
+   DECLARE_ALGORITHM(MetadataTest)
    DECLARE_ALGORITHM(RequireUniqueEvent)
 }
diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/doc/packagedoc.h b/Database/AthenaPOOL/AthenaPoolUtilities/doc/packagedoc.h
index 8ea9c99b14f5fa36039e28db5088854c330e3f80..e0d322ba27f2aa4fb33526e996c208543a323de9 100644
--- a/Database/AthenaPOOL/AthenaPoolUtilities/doc/packagedoc.h
+++ b/Database/AthenaPOOL/AthenaPoolUtilities/doc/packagedoc.h
@@ -101,6 +101,3 @@ TPCnvTokenList_p1 is used in case a top-level persistent object needs to be exte
     Full description of the TP separation used in Athena can be found on the Wiki page:
     https://twiki.cern.ch/twiki/bin/view/Atlas/TransientPersistentSeparation
 */
-
-
-
diff --git a/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh b/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh
index 30917c19f695434edab916897729704cc90711a7..b5030b221eee2404c25b22470156128c6553e19b 100755
--- a/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh
+++ b/Database/AthenaPOOL/AthenaPoolUtilities/share/post_tpcnvtest.sh
@@ -230,6 +230,10 @@ PP="$PP"'|bits/regex.h:1545'
 
 PP="$PP"'|Cannot convert TrigRNNOutput'
 
+# New warnings from GeoModelSvc.
+PP="$PP"'|GeoModelSvc.*WARNING  Getting .* with default tag'
+
+
 
 test=$1
 if [ -z "$testStatus" ]; then
diff --git a/Database/AthenaPOOL/DBDataModel/doc/packagedoc.h b/Database/AthenaPOOL/DBDataModel/doc/packagedoc.h
index c845527cda7943a39336a5f42865456cc3f313a9..a6d249fcc86693de0c7694dc3da4f5b6e60b0ac8 100644
--- a/Database/AthenaPOOL/DBDataModel/doc/packagedoc.h
+++ b/Database/AthenaPOOL/DBDataModel/doc/packagedoc.h
@@ -43,11 +43,9 @@ The package Database/AthenaPOOL/AthenaPoolExample contains running examples of a
 reading Data Objects using AthenaPool. 
 
 
-@section DBDataModel_Requirements Requirements
 
 
 
-@section DBDataModel_PackagesUsed Packages Used
 
 
 
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/doc/packagedoc.h b/Database/AthenaPOOL/EventSelectorAthenaPool/doc/packagedoc.h
index a89606bd3e1634f8145627e504a8c0f62f88ca0d..358bc04a36123cbf043e950c3914382c2a2d69f1 100644
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/doc/packagedoc.h
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/doc/packagedoc.h
@@ -37,11 +37,9 @@ The package Database/AthenaPOOL/AthenaPoolExample contains running examples of a
 reading Data Objects using AthenaPool.
 
 
-@section EventSelectorAthenaPool_Requirements Requirements
 
 
 
-@section EventSelectorAthenaPool_PackagesUsed Packages Used
 
 
 
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.cxx b/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.cxx
index 274f7815c53f0ff3bd728a2430e174cf28266194..c8ad7d4d63f4b0a7cd26e2b3eb4bd4c0240119a8 100755
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.cxx
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.cxx
@@ -127,7 +127,7 @@ StatusCode AthenaPoolAddressProviderSvc::preLoadAddresses(StoreID::type storeID,
 //________________________________________________________________________________
 StatusCode AthenaPoolAddressProviderSvc::loadAddresses(StoreID::type storeID,
 		IAddressProvider::tadList& tads) {
-   if (storeID != StoreID::EVENT_STORE) {
+   if (storeID != StoreID::EVENT_STORE && storeID != StoreID::PILEUP_STORE) {
       return(StatusCode::SUCCESS);
    }
 
@@ -190,9 +190,11 @@ StatusCode AthenaPoolAddressProviderSvc::loadAddresses(StoreID::type storeID,
 }
 //________________________________________________________________________________
 StatusCode AthenaPoolAddressProviderSvc::updateAddress(StoreID::type storeID,
-		SG::TransientAddress* tad) {
+                                                       SG::TransientAddress* tad,
+                                                       const EventContext& /*ctx*/)
+{
    assert(tad);
-   if (storeID != StoreID::EVENT_STORE) {
+   if (storeID != StoreID::EVENT_STORE && storeID != StoreID::PILEUP_STORE) {
       return(StatusCode::FAILURE);
    }
    // No BackNavigation to DataHeader or AttributeList
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.h b/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.h
index b4b54e6ef55415398923f8bbb80dc0a95ed31084..56f3ce2dc90b391af3febf766146347a61e8e616 100755
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.h
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/AthenaPoolAddressProviderSvc.h
@@ -54,7 +54,8 @@ public: // Constructor and Destructor
    /// Update a transient address.
    /// @param storeID [IN] store ID, this function only preloads event store addresses.
    /// @param tad [IN] transient address to be updated.
-   virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+   virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad,
+                                    const EventContext& ctx);
 
 private: // data
    ServiceHandle<ActiveStoreSvc> m_activeStoreSvc;
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.cxx b/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.cxx
index 3c8aba9538d284a44a5d7ca2f9ae1da05d469e5a..e05bb844662dca3cf1df57f92caa87171a9ae708 100755
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.cxx
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.cxx
@@ -168,7 +168,8 @@ StatusCode CondProxyProvider::loadAddresses(StoreID::type /*storeID*/,
 }
 //________________________________________________________________________________
 StatusCode CondProxyProvider::updateAddress(StoreID::type /*storeID*/,
-	SG::TransientAddress* /*tad*/) {
+                                            SG::TransientAddress* /*tad*/,
+                                            const EventContext& /*ctx*/) {
    return(StatusCode::FAILURE);
 }
 //__________________________________________________________________________
diff --git a/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.h b/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.h
index 9c2e4e7cf9ba78b3e2e9cbe529c2889e75539206..761bee1d20cf13d80e5e05a9061d32598b266e1b 100755
--- a/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.h
+++ b/Database/AthenaPOOL/EventSelectorAthenaPool/src/CondProxyProvider.h
@@ -52,7 +52,8 @@ public: // Constructor and Destructor
    /// Update a transient address.
    /// @param storeID [IN] store ID, this function only preloads detector store addresses.
    /// @param tad [IN] transient address to be updated.
-   virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+   virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad,
+                                    const EventContext& ctx);
 
 private: // data
    ServiceHandle<IAthenaPoolCnvSvc> m_athenaPoolCnvSvc;
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/src/AthenaPoolOutputStreamTool.cxx b/Database/AthenaPOOL/OutputStreamAthenaPool/src/AthenaPoolOutputStreamTool.cxx
index 2e77250d42362d40a0b29cc7cc5b1f00b4dd308d..f0702cd3e24e6b4dcbdb92068b3fcba0c91da751 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/src/AthenaPoolOutputStreamTool.cxx
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/src/AthenaPoolOutputStreamTool.cxx
@@ -217,7 +217,6 @@ StatusCode AthenaPoolOutputStreamTool::connectOutput(const std::string& outputNa
          if (m_extendProvenanceRecord) {
             std::string pTag;
             SG::TransientAddress* dhTransAddr = 0;
-            bool ownDhTransAddr = true;
             for (std::vector<DataHeaderElement>::const_iterator i = dh->begin(), iEnd = dh->end();
                 i != iEnd; i++) {
                if (i->getPrimaryClassID() == ClassID_traits<DataHeader>::ID()) {
@@ -227,15 +226,17 @@ StatusCode AthenaPoolOutputStreamTool::connectOutput(const std::string& outputNa
             }
             // Update dhTransAddr to handle fast merged files.
             SG::DataProxy* dhProxy = m_store->proxy(dh.operator->());
-            if (dhProxy != 0 && dhProxy->transientAddress() != 0 && dhProxy->transientAddress()->address() != 0) {
-               delete dhTransAddr; dhTransAddr = dhProxy->transientAddress();
-               ownDhTransAddr = false;
+            if (dhProxy != 0 && dhProxy->address() != 0) {
+              delete dhTransAddr;
+              m_dataHeader->insertProvenance(DataHeaderElement(dhProxy,
+                                                               dhProxy->address(),
+                                                               pTag));
             }
-            if (!dhTransAddr) std::abort();
-            DataHeaderElement dhe(dhTransAddr, dhTransAddr->address(), pTag);
-            m_dataHeader->insertProvenance(dhe);
-            if (ownDhTransAddr) {
-               delete dhTransAddr; dhTransAddr = 0;
+            else {
+              m_dataHeader->insertProvenance(DataHeaderElement(dhTransAddr,
+                                                               dhTransAddr->address(),
+                                                               pTag));
+              delete dhTransAddr;
             }
          }
          if (!m_provTagList.empty()) {
@@ -384,7 +385,7 @@ StatusCode AthenaPoolOutputStreamTool::streamObjects(const DataObjectVec& dataOb
             if ((*doIter)->clID() != 1) {
                SG::DataProxy* proxy = dynamic_cast<SG::DataProxy*>((*doIter)->registry());
                if (proxy != 0) {
-                  m_dataHeader->insert(proxy->transientAddress(), addr);
+                  m_dataHeader->insert(proxy, addr);
                   if (proxy->address() == 0) {
                      proxy->setAddress(addr);
                   } else {
@@ -397,7 +398,7 @@ StatusCode AthenaPoolOutputStreamTool::streamObjects(const DataObjectVec& dataOb
                ATH_MSG_DEBUG("Pers to Pers copy for " << (*doIter)->clID() << " " << (*doIter)->name());
                SG::DataProxy* proxy = dynamic_cast<SG::DataProxy*>((*doIter)->registry());
                if (proxy != 0) {
-                  m_dataHeader->insert(proxy->transientAddress(), addr);
+                  m_dataHeader->insert(proxy, addr);
                   if (proxy->address() == 0) {
                      proxy->setAddress(addr);
                   } else {
@@ -421,7 +422,7 @@ StatusCode AthenaPoolOutputStreamTool::streamObjects(const DataObjectVec& dataOb
    if ((m_conversionSvc->createRep(dataHeaderObj, addr)).isSuccess()) {
       SG::DataProxy* proxy = dynamic_cast<SG::DataProxy*>(dataHeaderObj->registry());
       if (proxy != 0) {
-         m_dataHeader->insert(proxy->transientAddress(), addr, m_processTag);
+         m_dataHeader->insert(proxy, addr, m_processTag);
          if (proxy->address() == 0) {
             proxy->setAddress(addr);
          } else {
diff --git a/Database/AthenaPOOL/PoolSvc/doc/packagedoc.h b/Database/AthenaPOOL/PoolSvc/doc/packagedoc.h
index ec72c3e8c2f13473f46ff43fabafd9f14e6a72f0..5e678bf7fe39f3966479d6cdaea3813bbe066b15 100644
--- a/Database/AthenaPOOL/PoolSvc/doc/packagedoc.h
+++ b/Database/AthenaPOOL/PoolSvc/doc/packagedoc.h
@@ -35,11 +35,9 @@ The package Database/AthenaPOOL/AthenaPoolExample contains running examples of a
 reading Data Objects using PoolSvc.
 
 
-@section PoolSvc_Requirements Requirements
 
 
 
-@section PoolSvc_PackagesUsed Packages Used
 
 
 
diff --git a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx
index b4224da7d7b603777572e2651fd932fa31fcade4..a981295953a901034394ed0f32e68b56fe2b1ced 100644
--- a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx
+++ b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.cxx
@@ -931,22 +931,24 @@ pool::IFileCatalog* PoolSvc::createCatalog() {
    for (std::vector<std::string>::const_iterator iter = m_readCatalog.value().begin(),
 	   last = m_readCatalog.value().end(); iter != last; ++iter) {
       ATH_MSG_DEBUG("POOL ReadCatalog is " << *iter);
-      if (iter->substr(0, 7) == "prfile:") {
-         std::string file = PathResolver::find_file(iter->substr(7), "DATAPATH");
-         if (file.empty()) {
-            ATH_MSG_WARNING("Unable to locate catalog for "
-	            << *iter
-	            << " via PathResolver, check your DATAPATH variable");
-         } else {
-            ATH_MSG_INFO("Resolved path (via DATAPATH) is " << file);
-            ctlg->addReadCatalog("file:" + file);
-         }
-      } else if (iter->substr(0, 8) == "apcfile:") {
+      if (iter->substr(0, 8) == "apcfile:" || iter->substr(0, 7) == "prfile:") {
+         std::string::size_type cpos = iter->find(":");
          // check for file accessed via ATLAS_POOLCOND_PATH
-         std::string file = poolCondPath(iter->substr(8));
+         std::string file = poolCondPath(iter->substr(cpos + 1));
          if (!file.empty()) {
             ATH_MSG_INFO("Resolved path (via ATLAS_POOLCOND_PATH) is " << file);
             ctlg->addReadCatalog("file:" + file);
+         } else {
+            // As backup, check for file accessed via PathResolver
+            std::string file = PathResolver::find_file(iter->substr(cpos + 1), "DATAPATH");
+            if (!file.empty()) {
+               ATH_MSG_INFO("Resolved path (via DATAPATH) is " << file);
+               ctlg->addReadCatalog("file:" + file);
+            } else {
+               ATH_MSG_WARNING("Unable to locate catalog for "
+	               << *iter
+	               << " check your ATLAS_POOLCOND_PATH and DATAPATH variables");
+            }
          }
       } else {
          ctlg->addReadCatalog(*iter);
diff --git a/Database/AthenaPOOL/RDBAccessSvc/RDBAccessSvc/IRDBAccessSvc.h b/Database/AthenaPOOL/RDBAccessSvc/RDBAccessSvc/IRDBAccessSvc.h
index 5db4da4ec56247e442014f30deb8631b4555547b..1cfad34a7fca0a25ad89dc1588e3ee59fc34c94c 100755
--- a/Database/AthenaPOOL/RDBAccessSvc/RDBAccessSvc/IRDBAccessSvc.h
+++ b/Database/AthenaPOOL/RDBAccessSvc/RDBAccessSvc/IRDBAccessSvc.h
@@ -44,26 +44,15 @@ static const InterfaceID IID_IRDBAccessSvc(1012, 1 , 0);
 
 class IRDBAccessSvc : virtual public IInterface 
 {
+  // Special friends who need to call connect()/disconnect() methods
+  friend class GeoModelSvc;
+  friend class SourceCompAlg;
+
  public:
 
   /// Retrieve interface ID
   static const InterfaceID& interfaceID() { return IID_IRDBAccessSvc; }
 
-  /// Connect to the relational DB.
-  /// If this method is called for already open connection the connection
-  /// counter is incremented.
-  /// @return success/failure
-  virtual bool connect(const std::string& connName = "ATLASDD") = 0;
-
-  /// If the counnection counter==1 closes the connection.
-  /// Decrements the connection counter value otherwise.
-  /// @return success/failure
-  virtual bool disconnect(const std::string& connName = "ATLASDD") = 0;
-
-  /// Closes the connection regardless of the counter value.
-  /// @return success/failure
-  virtual bool shutdown(const std::string& connName = "ATLASDD") = 0;
-
   /// Provides access to the Recordset object containing HVS-tagged data.
   /// @param node [IN] name of the leaf HVS node
   /// @param tag [IN] tag of the HVS node specified by node parameter if tag2node is omitted,
@@ -84,7 +73,6 @@ class IRDBAccessSvc : virtual public IInterface
   virtual std::string getChildTag(const std::string& childNode,
 				  const std::string& parentTag,
 				  const std::string& parentNode,
-				  bool fetchData = true,
 				  const std::string& connName = "ATLASDD") = 0;
 
 
@@ -113,6 +101,23 @@ class IRDBAccessSvc : virtual public IInterface
   /// @return attribute list with tag details
   virtual RDBTagDetails getTagDetails(const std::string& tag,
 				      const std::string& connName = "ATLASDD") = 0;
+
+ protected:
+  /// Connect to the relational DB.
+  /// If this method is called for already open connection the connection
+  /// counter is incremented.
+  /// @return success/failure
+  virtual bool connect(const std::string& connName = "ATLASDD") = 0;
+
+  /// If the counnection counter==1 closes the connection.
+  /// Decrements the connection counter value otherwise.
+  /// @return success/failure
+  virtual bool disconnect(const std::string& connName = "ATLASDD") = 0;
+
+  /// Closes the connection regardless of the counter value.
+  /// @return success/failure
+  virtual bool shutdown(const std::string& connName = "ATLASDD") = 0;
+
 };
 
 #endif 
diff --git a/Database/AthenaPOOL/RDBAccessSvc/cmt/requirements b/Database/AthenaPOOL/RDBAccessSvc/cmt/requirements
deleted file mode 100755
index 5a40aa9920bc1e11704b97c615b73e8898c9ffec..0000000000000000000000000000000000000000
--- a/Database/AthenaPOOL/RDBAccessSvc/cmt/requirements
+++ /dev/null
@@ -1,32 +0,0 @@
-package RDBAccessSvc
-
-public
-use AtlasPolicy     AtlasPolicy-*
-use GaudiInterface  GaudiInterface-* 	External 
-use AtlasCORAL      AtlasCORAL-*        External
-use AtlasBoost      AtlasBoost-*        External
-
-private 
-apply_tag NEEDS_CORAL_BASE
-
-use AthenaBaseComps AthenaBaseComps-*   Control
-use PoolSvc         PoolSvc-*           Database/AthenaPOOL
-
-# Remove some libs from POOL
-macro_remove POOL_linkopts "-llcg_Collection"
-macro_remove POOL_linkopts "-llcg_MultiCollection"
-
-library RDBAccessSvc RDBAccessSvc.cxx RDBRecordset.cxx \
-                     RDBRecord.cxx RDBVersionAccessor.cxx \
-                     RDBQuery.cxx SourceCompAlg.cxx \
-                     components/RDBAccessSvc_entries.cxx \
-                     components/RDBAccessSvc_load.cxx
-
-apply_pattern component_library  
-
-apply_pattern declare_joboptions files="*.py"
-
-macro_append DOXYGEN_INPUT " ../doc/MainPage.h "
-
-application geomdb2sqlite ../replicator/geomdb2sqlite.cpp
-application geomdb2oracle ../replicator/geomdb2oracle.cpp
diff --git a/Database/AthenaPOOL/RDBAccessSvc/replicator/geomdb2oracle.cpp b/Database/AthenaPOOL/RDBAccessSvc/replicator/geomdb2oracle.cpp
index 4f03003ca67d94b8edfbf2b30310e1abfc3d8fb3..6930163c546c39790fbcd280e56c31d68ff23e60 100644
--- a/Database/AthenaPOOL/RDBAccessSvc/replicator/geomdb2oracle.cpp
+++ b/Database/AthenaPOOL/RDBAccessSvc/replicator/geomdb2oracle.cpp
@@ -614,9 +614,9 @@ void transferTag(coral::ISessionProxy* proxySrc, coral::ISessionProxy* proxyTarg
       updateData.extend<bool>("lockflag");
       updateData[0].data<long long>() = detTagSrc["TAG_ID"].data<long long>();
       updateData[1].data<bool>() = 1;
-      std::string _action = "LOCKED = :lockflag";
-      std::string _condition = "TAG_ID = :tagid";
-      editorTarg.updateRows(_action,_condition,updateData);
+      std::string action = "LOCKED = :lockflag";
+      std::string condition = "TAG_ID = :tagid";
+      editorTarg.updateRows(action,condition,updateData);
 
       if(verbose) {
 	doFormatting(format_level);
@@ -914,8 +914,8 @@ int main(int argc, char ** argv)
     printUsage = true;
   else
     for(int i=1; i<argc; i++) {
-      std::string _param(argv[i]);
-      if(_param == "-h" || _param == "-help" || _param == "--help") {
+      std::string param(argv[i]);
+      if(param == "-h" || param == "-help" || param == "--help") {
 	printUsage = true;
 	break;
       } else if (argv[i][0] == '-') {
@@ -938,7 +938,7 @@ int main(int argc, char ** argv)
 	  }
 	if(printUsage) break;
       } else {
-	vectInpTags.push_back(_param);
+	vectInpTags.push_back(param);
       }
     }
 
@@ -967,10 +967,10 @@ int main(int argc, char ** argv)
     }
   }
 
-  coral::Context* m_context = &coral::Context::instance();
+  coral::Context* context = &coral::Context::instance();
 
-  m_context->loadComponent("CORAL/Services/RelationalService");
-  m_context->loadComponent("CORAL/Services/ConnectionService");
+  context->loadComponent("CORAL/Services/RelationalService");
+  context->loadComponent("CORAL/Services/ConnectionService");
  
   coral::ConnectionService conSvcH;
 
diff --git a/Database/AthenaPOOL/RDBAccessSvc/replicator/geomdb2sqlite.cpp b/Database/AthenaPOOL/RDBAccessSvc/replicator/geomdb2sqlite.cpp
index bec217f35168b9593e4778e797b93c8e4f271f11..8303a5131c01212e4a89a891aaf32445c6b35ed6 100644
--- a/Database/AthenaPOOL/RDBAccessSvc/replicator/geomdb2sqlite.cpp
+++ b/Database/AthenaPOOL/RDBAccessSvc/replicator/geomdb2sqlite.cpp
@@ -24,10 +24,10 @@
 
 int main(int, char **) 
 {
-  coral::Context* m_context = &coral::Context::instance();
+  coral::Context* context = &coral::Context::instance();
 
-  m_context->loadComponent("CORAL/Services/RelationalService");
-  m_context->loadComponent("CORAL/Services/ConnectionService");
+  context->loadComponent("CORAL/Services/RelationalService");
+  context->loadComponent("CORAL/Services/ConnectionService");
  
   coral::ConnectionService conSvcH;
 
diff --git a/Database/AthenaPOOL/RDBAccessSvc/src/RDBAccessSvc.cxx b/Database/AthenaPOOL/RDBAccessSvc/src/RDBAccessSvc.cxx
index 2e674968382099feb09c2f483d7673999d5332d8..ad6e8ffdda072373360fb392d8c9df01d80078d2 100755
--- a/Database/AthenaPOOL/RDBAccessSvc/src/RDBAccessSvc.cxx
+++ b/Database/AthenaPOOL/RDBAccessSvc/src/RDBAccessSvc.cxx
@@ -39,6 +39,8 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "PoolSvc/IPoolSvc.h"
 
+#include <thread>
+
 RDBAccessSvc::RDBAccessSvc(const std::string& name, ISvcLocator* svc):
   AthService(name,svc)
 {
@@ -166,89 +168,62 @@ IRDBRecordset_ptr RDBAccessSvc::getRecordsetPtr(const std::string& node,
 
   ATH_MSG_DEBUG("Getting RecordsetPtr with key " << key);
 
-  RecordsetPtrsByConn::const_iterator it_maps = m_recordsetptrs.find(connName);
-  if(it_maps==m_recordsetptrs.end()) {
-    ATH_MSG_DEBUG("Wrong name for connection " << connName << ". Unable to find recordset map. Returning empty recordset");
+  std::lock_guard<std::mutex> guard(m_mutex);
+  if(!connect(connName)) {
+    ATH_MSG_ERROR("Unable to open connection " << connName << ". Returning empty recordset");
     return IRDBRecordset_ptr(new RDBRecordset(this));
   }
 
-  RecordsetPtrMap* recordsets = it_maps->second;
+  RecordsetPtrMap* recordsets = m_recordsetptrs[connName];
   RecordsetPtrMap::const_iterator it = recordsets->find(key);
   if(it != recordsets->end()) {
     ATH_MSG_DEBUG("Reusing existing recordset");
+    disconnect(connName);
     return it->second;
   }
 
   IRDBRecordset_ptr rec(new RDBRecordset(this));
-  SessionMap::const_iterator it_sessions = m_sessions.find(connName);
-
-  if(it_sessions != m_sessions.end()) {
-    coral::ISessionProxy* session = it_sessions->second;
-    if(session) {
-      try {
-	// Start new readonly transaction
-	session->transaction().start(true);
-
-	// Check lookup table first
-	bool lookupFound = false;
-	std::string lookupMapKey = tag + "::" + connName;
-	GlobalTagLookupMap::const_iterator lookupmap = m_globalTagLookup.find(lookupMapKey);
-	if(lookupmap!=m_globalTagLookup.end()) {
-	  lookupFound = true;
-	  TagNameIdByNode::const_iterator childtagdet = lookupmap->second->find(node);
-	  RDBRecordset* recConcrete = dynamic_cast<RDBRecordset*>(rec.get());
-	  if(recConcrete) {
-	    if(childtagdet!=lookupmap->second->end()) {
-	      recConcrete->getData(session,node,childtagdet->second.first,childtagdet->second.second);
-	    }
-	    else {
-	      recConcrete->setNodeName(node);
-	      ATH_MSG_DEBUG("Unable to find tag for the node " << node << " in the cache of global tag " << tag << ". Returning empty recordset");
-	    }
-	  }
-	}
-
-	if(!lookupFound) {
-	  if(tag2node!="") {
-	    RDBVersionAccessor versionAccessor(node,tag2node,tag,session,msg());
-	    versionAccessor.getChildTagData();
-	    RDBRecordset* recConcrete = dynamic_cast<RDBRecordset*>(rec.get());
-	    if(recConcrete) {
-	      recConcrete->getData(session,versionAccessor.getNodeName(),versionAccessor.getTagName(),versionAccessor.getTagID());
-	    }
-	  }
-	  else {
-	    RDBVersionAccessor versionAccessor(node,node,tag,session,msg());
-	    versionAccessor.getChildTagData();
-	    RDBRecordset* recConcrete = dynamic_cast<RDBRecordset*>(rec.get());
-	    if(recConcrete) {
-	      recConcrete->getData(session,versionAccessor.getNodeName(),versionAccessor.getTagName(),versionAccessor.getTagID());
-	    }
-	  }
-	}
-	
-	// Finish the transaction
-	session->transaction().commit();
-      }
-      catch(coral::SchemaException& se) {
-	ATH_MSG_ERROR("Schema Exception : " << se.what());
-      }
-      catch(std::exception& e) {
-	ATH_MSG_ERROR(e.what());
+  RDBRecordset* recConcrete = dynamic_cast<RDBRecordset*>(rec.get());
+  coral::ISessionProxy* session = m_sessions[connName];
+
+  try {
+    // Start new readonly transaction
+    session->transaction().start(true);
+
+    // Check lookup table first
+    std::string lookupMapKey = tag + "::" + connName;
+    GlobalTagLookupMap::const_iterator lookupmap = m_globalTagLookup.find(lookupMapKey);
+    if(lookupmap!=m_globalTagLookup.end()) {
+      TagNameIdByNode::const_iterator childtagdet = lookupmap->second->find(node);
+      if(childtagdet!=lookupmap->second->end()) {
+	recConcrete->getData(session,node,childtagdet->second.first,childtagdet->second.second);
       }
-      catch(...) {
-	ATH_MSG_ERROR("Exception caught(...)");
+      else {
+	recConcrete->setNodeName(node);
+	ATH_MSG_DEBUG("Unable to find tag for the node " << node << " in the cache of global tag " << tag << ". Returning empty recordset");
       }
     }
     else {
-      ATH_MSG_ERROR("Connection " << connName << " is not open." << " Returning empty recordset");
+      RDBVersionAccessor versionAccessor(node,(tag2node.empty()?node:tag2node),tag,session,msg());
+      versionAccessor.getChildTagData();
+      recConcrete->getData(session,versionAccessor.getNodeName(),versionAccessor.getTagName(),versionAccessor.getTagID());
     }
+	
+    // Finish the transaction
+    session->transaction().commit();
+  }
+  catch(coral::SchemaException& se) {
+    ATH_MSG_ERROR("Schema Exception : " << se.what());
   }
-  else {
-    ATH_MSG_ERROR("Wrong name for connection " << connName << ". Unable to find session. Returning empty recordset");
+  catch(std::exception& e) {
+    ATH_MSG_ERROR(e.what());
+  }
+  catch(...) {
+    ATH_MSG_ERROR("Exception caught(...)");
   }
 
   (*recordsets)[key] = rec;
+  disconnect(connName);
   return rec;
 }
 
@@ -257,233 +232,202 @@ IRDBQuery* RDBAccessSvc::getQuery(const std::string& node,
 				  const std::string& tag2node,
 				  const std::string& connName)
 {
-  IRDBQuery* query(0);
-
-  SessionMap::const_iterator it_sessions = m_sessions.find(connName);
-  if(it_sessions != m_sessions.end()) {
-    coral::ISessionProxy* session = it_sessions->second;
-    if(session) {
-      try {
-	// Check lookup table first
-	std::string childTagId("");
-	bool lookupFound = false;
-	std::string lookupMapKey = tag + "::" + connName;
-	GlobalTagLookupMap::const_iterator lookupmap = m_globalTagLookup.find(lookupMapKey);
-	if(lookupmap!=m_globalTagLookup.end()) {
-	  lookupFound = true;
-	  TagNameIdByNode::const_iterator childtagdet = lookupmap->second->find(node);
-	  if(childtagdet!=lookupmap->second->end()) {
-	    childTagId = childtagdet->second.second;
-	  }
-	}
-
-	if(!lookupFound) {
-	  // Start new readonly transaction
-	  session->transaction().start(true);
-
-	  RDBVersionAccessor_ptr versionAccessor;
-	  if(tag2node.empty()) {
-	    versionAccessor = RDBVersionAccessor_ptr(new RDBVersionAccessor(node,node,tag,session,msg()));
-	  }
-	  else {
-	    versionAccessor = RDBVersionAccessor_ptr(new RDBVersionAccessor(node,tag2node,tag,session,msg()));
-	  }
-
-	  versionAccessor->getChildTagData();
-	  childTagId = versionAccessor->getTagID();
-
-	  // Finish the transaction
-	  session->transaction().commit();
-	}
-
-	if(childTagId.empty()) {
-	  ATH_MSG_DEBUG("Could not get the tag for " << node << " node. Returning 0 pointer to IRDBQuery");
-	}
-	else {
-	  query = new RDBQuery(this,session,node,childTagId);
-	}
-      }
-      catch(coral::SchemaException& se) {
-	ATH_MSG_ERROR("Schema Exception : " << se.what());
-      }
-      catch(std::exception& e) {
-	ATH_MSG_ERROR(e.what());
-      }
-      catch(...) {
-	ATH_MSG_ERROR("Exception caught(...)");
+  ATH_MSG_DEBUG("getQuery (" << node << "," << tag << "," << tag2node << "," << connName << ")");
+  std::lock_guard<std::mutex> guard(m_mutex);
+
+  IRDBQuery* query{nullptr};
+
+  if(!connect(connName)) {
+    ATH_MSG_ERROR("Unable to open connection " << connName << ". Returning nullptr to IRDBQuery");
+    return query;
+  }
+
+  coral::ISessionProxy* session = m_sessions[connName];
+
+  try {
+    // Check lookup table first
+    std::string childTagId("");
+    std::string lookupMapKey = tag + "::" + connName;
+    GlobalTagLookupMap::const_iterator lookupmap = m_globalTagLookup.find(lookupMapKey);
+    if(lookupmap!=m_globalTagLookup.end()) {
+      TagNameIdByNode::const_iterator childtagdet = lookupmap->second->find(node);
+      if(childtagdet!=lookupmap->second->end()) {
+	childTagId = childtagdet->second.second;
       }
     }
     else {
-      ATH_MSG_ERROR("Connection " << connName << " is not open."); 
+      // Start new readonly transaction
+      session->transaction().start(true);
+
+      RDBVersionAccessor versionAccessor{node,(tag2node.empty()?node:tag2node),tag,session,msg()};
+      versionAccessor.getChildTagData();
+      childTagId = versionAccessor.getTagID();
+      
+      // Finish the transaction
+      session->transaction().commit();
+    }
+
+    if(childTagId.empty()) {
+      ATH_MSG_WARNING("Could not get the tag for " << node << " node. Returning 0 pointer to IRDBQuery");
+    }
+    else {
+      query = new RDBQuery(this,session,node,childTagId);
     }
   }
-  else {
-    ATH_MSG_ERROR("Wrong name for connection " << connName << ". Unable to find session.");
+  catch(coral::SchemaException& se) {
+    ATH_MSG_ERROR("Schema Exception : " << se.what());
+  }
+  catch(std::exception& e) {
+    ATH_MSG_ERROR(e.what());
+  }
+  catch(...) {
+    ATH_MSG_ERROR("Exception caught(...)");
   }
 
+  disconnect(connName);
   return query;
 }
 
 std::string RDBAccessSvc::getChildTag(const std::string& childNode,
 				      const std::string& parentTag,
 				      const std::string& parentNode,
-				      bool fetchData,
 				      const std::string& connName)
 {
-  // The fetchData argument is not much of use and also
-  // after introduction of smart pointers to recordsets this parameter can lead to some
-  // extra data retrieval.
-  //
-  // Based on all above I'm going to make fetchData obsolete and keep it around only for backwards compatibility
-
-  ATH_MSG_DEBUG("getChildTag for " << childNode << " " << parentTag << " " << parentNode << " " << (fetchData?"Fetch":"Nofetch"));
-
-  SessionMap::const_iterator it_sessions = m_sessions.find(connName);
-
-  if(it_sessions != m_sessions.end()) {
-    coral::ISessionProxy* session = it_sessions->second;
-
-    if(session) {
-      try {
-	// Check lookup table first
-	std::string lookupMapKey = parentTag + "::" + connName;
-	GlobalTagLookupMap::const_iterator lookupmap = m_globalTagLookup.find(lookupMapKey);
-	if(lookupmap!=m_globalTagLookup.end()) {
-	  TagNameIdByNode::const_iterator childtagdet = lookupmap->second->find(childNode);
-	  if(childtagdet!=lookupmap->second->end()) {
-	    return childtagdet->second.first;
-	  }
-	  else {
-	    return std::string("");
-	  }
-	}
-
-	// We don't have lookup table for given parent tag. Go into slow mode through Version Accessor
-	// Start new readonly transaction
-	session->transaction().start(true);
-
-	RDBVersionAccessor versionAccessor(childNode,parentNode,parentTag,session,msg());
-	versionAccessor.getChildTagData();
-	      
-	// Finish the transaction
-	session->transaction().commit(); 
-
-	return versionAccessor.getTagName();
-      }
-      catch(coral::SchemaException& se) {
-	ATH_MSG_ERROR("Schema Exception : " << se.what());
-      }
-      catch(std::exception& e) {
-	ATH_MSG_ERROR(e.what());
-      }
-      catch(...) {
-	ATH_MSG_ERROR("Exception caught(...)");
-      }
+  ATH_MSG_DEBUG("getChildTag for " << childNode << " " << parentTag << " " << parentNode);
+  std::lock_guard<std::mutex> guard(m_mutex);
+
+  // Check lookup table first
+  std::string lookupMapKey = parentTag + "::" + connName;
+  GlobalTagLookupMap::const_iterator lookupmap = m_globalTagLookup.find(lookupMapKey);
+  if(lookupmap!=m_globalTagLookup.end()) {
+    TagNameIdByNode::const_iterator childtagdet = lookupmap->second->find(childNode);
+    if(childtagdet!=lookupmap->second->end()) {
+      return childtagdet->second.first;
     }
     else {
-      ATH_MSG_ERROR("Connection " << connName << " is not open.");
+      return std::string("");
     }
   }
-  else {
-    ATH_MSG_ERROR("Wrong name for connection " << connName);
+
+  if(!connect(connName)) {
+    ATH_MSG_ERROR("Unable to open connection " << connName << ". Returning empty string");
+    return std::string("");
+  }
+
+  std::string childTag("");
+  try {
+    // We don't have lookup table for given parent tag. Go into slow mode through Version Accessor
+    // Start new readonly transaction
+    coral::ISessionProxy* session = m_sessions[connName];
+    session->transaction().start(true);
+
+    RDBVersionAccessor versionAccessor(childNode,parentNode,parentTag,session,msg());
+    versionAccessor.getChildTagData();
+	      
+    // Finish the transaction
+    session->transaction().commit(); 
+
+    childTag = versionAccessor.getTagName();
+  }
+  catch(coral::SchemaException& se) {
+    ATH_MSG_ERROR("Schema Exception : " << se.what());
+  }
+  catch(std::exception& e) {
+    ATH_MSG_ERROR(e.what());
+  }
+  catch(...) {
+    ATH_MSG_ERROR("Exception caught(...)");
   }
 
-  return std::string("");
+  disconnect(connName);
+
+  return childTag;
 }
  
 RDBTagDetails RDBAccessSvc::getTagDetails(const std::string& tag,
 					  const std::string& connName)
 {
+  ATH_MSG_DEBUG("getTagDetails for tag: " << tag);
+  std::lock_guard<std::mutex> guard(m_mutex);
+
   RDBTagDetails tagDetails;
-  
-  SessionMap::const_iterator it_sessions = m_sessions.find(connName);
-  
-  if(it_sessions != m_sessions.end()) {
-    coral::ISessionProxy* session = it_sessions->second;
-    
-    if(session) {
-      try {
-	// Start new readonly transaction
-	session->transaction().start(true);
+
+  if(!connect(connName)) {
+    ATH_MSG_ERROR("Failed to open connection " << connName);
+    return tagDetails;
+  }
+
+  coral::ISessionProxy* session = m_sessions[connName];
+  try {
+    // Start new readonly transaction
+    session->transaction().start(true);
 	
-	coral::ITable& tableTag2Node = session->nominalSchema().tableHandle("HVS_TAG2NODE");
-	coral::IQuery *queryTag2Node = tableTag2Node.newQuery();
-	queryTag2Node->addToOutputList("LOCKED");
-	queryTag2Node->addToOutputList("SUPPORTED");
-	queryTag2Node->setMemoryCacheSize(1);
-	coral::AttributeList bindsTag2Node;
-	bindsTag2Node.extend<std::string>("tagN");
-	queryTag2Node->setCondition("TAG_NAME=:tagN", bindsTag2Node);
-	bindsTag2Node[0].data<std::string>() = tag;
-
-	coral::ICursor& cursorTag2Node = queryTag2Node->execute();
-	if(cursorTag2Node.next()) {
-	  tagDetails = cursorTag2Node.currentRow();
-	}
+    coral::ITable& tableTag2Node = session->nominalSchema().tableHandle("HVS_TAG2NODE");
+    coral::IQuery *queryTag2Node = tableTag2Node.newQuery();
+    queryTag2Node->addToOutputList("LOCKED");
+    queryTag2Node->addToOutputList("SUPPORTED");
+    queryTag2Node->setMemoryCacheSize(1);
+    coral::AttributeList bindsTag2Node;
+    bindsTag2Node.extend<std::string>("tagN");
+    queryTag2Node->setCondition("TAG_NAME=:tagN", bindsTag2Node);
+    bindsTag2Node[0].data<std::string>() = tag;
+    
+    coral::ICursor& cursorTag2Node = queryTag2Node->execute();
+    if(cursorTag2Node.next()) {
+      tagDetails = cursorTag2Node.currentRow();
+    }
 	
-	delete queryTag2Node;
+    delete queryTag2Node;
 
-	// Build lookup table for the given global tag if has not been built yet
-	std::string lookupMapKey = tag + "::" + connName;
-	if(m_globalTagLookup.find(lookupMapKey)==m_globalTagLookup.end()) {
-	  // Get tag contents from the database
-	  TagNameIdByNode* lookup = new TagNameIdByNode();
-	  
-	  coral::ITable& tableRootTag2Child = session->nominalSchema().tableHandle("HVS_TAGCACHE");
-	  coral::IQuery* queryRootTag2Child = tableRootTag2Child.newQuery();
-	  queryRootTag2Child->addToOutputList("CHILDNODE");
-	  queryRootTag2Child->addToOutputList("CHILDTAG");
-	  queryRootTag2Child->addToOutputList("CHILDTAGID");
-	  queryRootTag2Child->setMemoryCacheSize(1);
-	  coral::AttributeList bindsRootTag2Child;
-	  bindsRootTag2Child.extend<std::string>("tagN");
-	  queryRootTag2Child->setCondition("ROOTTAG=:tagN", bindsRootTag2Child);
-	  bindsRootTag2Child[0].data<std::string>() = tag;
-	  queryRootTag2Child->addToOrderList("CHILDNODE");
+    // Build lookup table for the given global tag if has not been built yet
+    std::string lookupMapKey = tag + "::" + connName;
+    if(m_globalTagLookup.find(lookupMapKey)==m_globalTagLookup.end()) {
+      // Get tag contents from the database
+      TagNameIdByNode* lookup = new TagNameIdByNode();
 	  
-	  coral::ICursor& cursorRootTag2Child = queryRootTag2Child->execute();
-	  while(cursorRootTag2Child.next()) {
-	    const coral::AttributeList& row = cursorRootTag2Child.currentRow();
-	    
-	    // turn TAG_ID into srting
-	    std::stringstream tagIdStream;
-	    tagIdStream << row["CHILDTAGID"].data<long long>();
-	    (*lookup)[row["CHILDNODE"].data<std::string>()]=std::make_pair(row["CHILDTAG"].data<std::string>(),tagIdStream.str());
-	  }
-
-	  delete queryRootTag2Child;
+      coral::ITable& tableRootTag2Child = session->nominalSchema().tableHandle("HVS_TAGCACHE");
+      coral::IQuery* queryRootTag2Child = tableRootTag2Child.newQuery();
+      queryRootTag2Child->addToOutputList("CHILDNODE");
+      queryRootTag2Child->addToOutputList("CHILDTAG");
+      queryRootTag2Child->addToOutputList("CHILDTAGID");
+      queryRootTag2Child->setMemoryCacheSize(1);
+      coral::AttributeList bindsRootTag2Child;
+      bindsRootTag2Child.extend<std::string>("tagN");
+      queryRootTag2Child->setCondition("ROOTTAG=:tagN", bindsRootTag2Child);
+      bindsRootTag2Child[0].data<std::string>() = tag;
+      queryRootTag2Child->addToOrderList("CHILDNODE");
 	  
-	  if(lookup->size()>0) {
-	    m_globalTagLookup[lookupMapKey]=lookup;
-	  }
-	  else {
-	    delete lookup;
-	  }
-	}
+      coral::ICursor& cursorRootTag2Child = queryRootTag2Child->execute();
+      while(cursorRootTag2Child.next()) {
+	const coral::AttributeList& row = cursorRootTag2Child.currentRow();
+	(*lookup)[row["CHILDNODE"].data<std::string>()]=std::make_pair(row["CHILDTAG"].data<std::string>(),std::to_string(row["CHILDTAGID"].data<long long>()));
       }
-      catch(coral::SchemaException& se) {
-	ATH_MSG_INFO("Schema Exception : " << se.what());
-      }
-      catch(std::exception& e) {
-	ATH_MSG_ERROR(e.what());
-      }
-      catch(...) {
-	ATH_MSG_ERROR("Exception caught(...)");
+
+      delete queryRootTag2Child;
+	  
+      if(lookup->size()>0) {
+	m_globalTagLookup[lookupMapKey]=lookup;
       }
-  
-      // Finish the transaction
-      if(session->transaction().isActive()) {
-	session->transaction().commit();
+      else {
+	delete lookup;
       }
     }
-    else {
-      ATH_MSG_ERROR("Connection " << connName << " is not open.");
+    // Finish the transaction
+    if(session->transaction().isActive()) {
+      session->transaction().commit();
     }
   }
-  else {
-    ATH_MSG_ERROR("Wrong name for connection " << connName);
+  catch(coral::SchemaException& se) {
+    ATH_MSG_INFO("Schema Exception : " << se.what());
+  }
+  catch(std::exception& e) {
+    ATH_MSG_ERROR(e.what());
+  }
+  catch(...) {
+    ATH_MSG_ERROR("Exception caught(...)");
   }
   
+  disconnect(connName);
   return tagDetails;
 }
 
@@ -491,53 +435,46 @@ void RDBAccessSvc::getAllLeafNodes(std::vector<std::string>& list,
 				   const std::string& connName)
 {
   list.clear();
-  SessionMap::const_iterator it_sessions = m_sessions.find(connName);
-
-  if(it_sessions != m_sessions.end()) {
-    coral::ISessionProxy* session = it_sessions->second;
-
-    if(session) {
-      try {
-	// Start new readonly transaction
-	session->transaction().start(true);
-
-	coral::ITable& tableNode = session->nominalSchema().tableHandle("HVS_NODE");
-	coral::IQuery *queryNode = tableNode.newQuery();
-	queryNode->addToOutputList("NODE_NAME");
-	queryNode->setMemoryCacheSize(1);
-	queryNode->setCondition("BRANCH_FLAG=0", coral::AttributeList());
-	queryNode->addToOrderList("NODE_NAME");
-
-	coral::ICursor& cursorNode = queryNode->execute();
-	while(cursorNode.next()) {
-	  list.push_back(cursorNode.currentRow()["NODE_NAME"].data<std::string>());
-	}
-
-	delete queryNode;
-      }
-      catch(coral::SchemaException& se) {
-	ATH_MSG_INFO("Schema Exception : " << se.what());
-      }
-      catch(std::exception& e) {
-	ATH_MSG_ERROR(e.what());
-      }
-      catch(...) {
-	ATH_MSG_ERROR("Exception caught(...)");
-      }
+  if(!connect(connName)) {
+    ATH_MSG_ERROR("Failed to open Connection " << connName);
+    return;
+  }
 
-      // Finish the transaction
-      if(session->transaction().isActive()) {
-	session->transaction().commit();
-      }
+  coral::ISessionProxy* session = m_sessions[connName];
+  try {
+    // Start new readonly transaction
+    session->transaction().start(true);
+
+    coral::ITable& tableNode = session->nominalSchema().tableHandle("HVS_NODE");
+    coral::IQuery *queryNode = tableNode.newQuery();
+    queryNode->addToOutputList("NODE_NAME");
+    queryNode->setMemoryCacheSize(1);
+    queryNode->setCondition("BRANCH_FLAG=0", coral::AttributeList());
+    queryNode->addToOrderList("NODE_NAME");
+    
+    coral::ICursor& cursorNode = queryNode->execute();
+    while(cursorNode.next()) {
+      list.push_back(cursorNode.currentRow()["NODE_NAME"].data<std::string>());
     }
-    else {
-      ATH_MSG_ERROR("Connection " << connName << " is not open.");
+    
+    delete queryNode;
+
+    // Finish the transaction
+    if(session->transaction().isActive()) {
+      session->transaction().commit();
     }
   }
-  else {
-    ATH_MSG_ERROR("Wrong name for connection " << connName);
+  catch(coral::SchemaException& se) {
+    ATH_MSG_INFO("Schema Exception : " << se.what());
+  }
+  catch(std::exception& e) {
+    ATH_MSG_ERROR(e.what());
+  }
+  catch(...) {
+    ATH_MSG_ERROR("Exception caught(...)");
   }
 
+  disconnect(connName);
 }
 
 
diff --git a/Database/AthenaPOOL/RDBAccessSvc/src/RDBAccessSvc.h b/Database/AthenaPOOL/RDBAccessSvc/src/RDBAccessSvc.h
index 7569225b9ec01c8b7fa55ec95e9b14eae3d8ea84..0e00afe7eecefff7240e0b98191d1291730cd1bc 100755
--- a/Database/AthenaPOOL/RDBAccessSvc/src/RDBAccessSvc.h
+++ b/Database/AthenaPOOL/RDBAccessSvc/src/RDBAccessSvc.h
@@ -57,7 +57,7 @@ typedef std::map<std::string, TagNameIdByNode*> GlobalTagLookupMap; // Key - <Gl
  *
  */
 
-class RDBAccessSvc : public AthService, virtual public IRDBAccessSvc 
+class RDBAccessSvc final : public AthService, virtual public IRDBAccessSvc 
 {
   friend class RDBRecordset;
 
@@ -70,16 +70,16 @@ class RDBAccessSvc : public AthService, virtual public IRDBAccessSvc
   /// If this method is called for already open connection the connection
   /// counter is incremented.
   /// @return success/failure
-  virtual bool connect(const std::string& connName);
+  bool connect(const std::string& connName) override;
 
   /// If the counnection counter==1 closes the connection.
   /// Decrements the connection counter value otherwise.
   /// @return success/failure
-  virtual bool disconnect(const std::string& connName);
+  bool disconnect(const std::string& connName) override;
 
  /// Closes the connection regardless of the counter value.
   /// @return success/failure
-  virtual bool shutdown(const std::string& connName);
+  bool shutdown(const std::string& connName) override;
 
   /// Provides access to the Recordset object containing HVS-tagged data.
   /// @param node [IN] name of the leaf HVS node
@@ -87,10 +87,10 @@ class RDBAccessSvc : public AthService, virtual public IRDBAccessSvc
   /// tag of the HVS branch node specified by tag2node otherwise
   /// @param tag2node [IN] some parent of the HVS leaf node specified by node parameter
   /// @return pointer to the recordset object
-  virtual IRDBRecordset_ptr getRecordsetPtr(const std::string& node,
+  IRDBRecordset_ptr getRecordsetPtr(const std::string& node,
 					    const std::string& tag,
 					    const std::string& tag2node="",
-					    const std::string& connName = "ATLASDD");
+					    const std::string& connName = "ATLASDD") override;
 
   /// Gets the tag name for the node by giving its parent node tag
   /// @param childNode [IN] name of the child node
@@ -98,28 +98,27 @@ class RDBAccessSvc : public AthService, virtual public IRDBAccessSvc
   /// @param parentNode [IN] name of the parent node
   /// @param fetchData [IN] if true fetch the corresponding data
   /// this parameter has no sence if child is the branch node
-  virtual std::string getChildTag(const std::string& childNode,
+  std::string getChildTag(const std::string& childNode,
 				  const std::string& parentTag,
 				  const std::string& parentNode,
-				  bool fetchData,
-				  const std::string& connName);
+				  const std::string& connName) override;
 
-  virtual IRDBQuery* getQuery(const std::string& node,
+  IRDBQuery* getQuery(const std::string& node,
 			      const std::string& tag,
 			      const std::string& tag2node,
-			      const std::string& connName);
+			      const std::string& connName) override;
 
-  virtual RDBTagDetails getTagDetails(const std::string& tag,
-				      const std::string& connName = "ATLASDD");
+  RDBTagDetails getTagDetails(const std::string& tag,
+				      const std::string& connName = "ATLASDD") override;
 
   void getAllLeafNodes(std::vector<std::string>& list,
 		       const std::string& connName = "ATLASDD");
 
   inline MsgStream& msgStream() { return msg(); }
 
-  virtual StatusCode initialize();
-  virtual StatusCode finalize();
-  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
+  StatusCode initialize() override;
+  StatusCode finalize() override;
+  StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override;
 
  protected:
 
@@ -129,7 +128,7 @@ class RDBAccessSvc : public AthService, virtual public IRDBAccessSvc
   RDBAccessSvc(const std::string& name, ISvcLocator* svc);
 
   /// Standard Service Destructor
-  virtual ~RDBAccessSvc();
+  ~RDBAccessSvc() override;
 
 private:
   SessionMap m_sessions;
@@ -138,6 +137,8 @@ private:
   RecordsetPtrsByConn m_recordsetptrs;  
   GlobalTagLookupMap m_globalTagLookup;
 
+  std::mutex m_mutex;
+
   bool shutdown_connection(const std::string& connName);
 };
 
diff --git a/Database/AthenaPOOL/RDBAccessSvc/src/RDBQuery.h b/Database/AthenaPOOL/RDBAccessSvc/src/RDBQuery.h
index fe48ad0d1941203d9efe5af25a3ec2bbef119750..810b9557dd21b4b9bd8709eb10e30d2ffda4dff1 100755
--- a/Database/AthenaPOOL/RDBAccessSvc/src/RDBQuery.h
+++ b/Database/AthenaPOOL/RDBAccessSvc/src/RDBQuery.h
@@ -10,9 +10,6 @@
 #include <vector>
 #include <string>
 
-class RDBVersionAccessor;
-typedef std::shared_ptr<RDBVersionAccessor> RDBVersionAccessor_ptr;
-
 namespace coral
 {
   class IQuery;
@@ -29,9 +26,7 @@ namespace coral
 
 class RDBAccessSvc;
 
-#include "RDBVersionAccessor.h" 
-
-class RDBQuery : public IRDBQuery
+class RDBQuery final : public IRDBQuery
 {
  public:
   RDBQuery(RDBAccessSvc* _accessSvc,
@@ -39,15 +34,15 @@ class RDBQuery : public IRDBQuery
 	   const std::string& nodeName,
 	   const std::string& tagId);
 
-  virtual ~RDBQuery();
+  virtual ~RDBQuery() override;
   
-  void execute();
-  long size();
-  void finalize();
-  void setOrder(const std::string&);
-  void addToOutput(const std::string&);
+  virtual void execute() override;
+  virtual long size() override;
+  virtual void finalize() override;
+  virtual void setOrder(const std::string&) override;
+  virtual void addToOutput(const std::string&) override;
 
-  bool next();
+  virtual bool next() override;
 
  private:
   RDBQuery() {}
diff --git a/Database/AthenaPOOL/RDBAccessSvc/src/RDBRecord.h b/Database/AthenaPOOL/RDBAccessSvc/src/RDBRecord.h
index 0b78c3b8a69517ac532f3d15cf4d2b26954293b6..0ec88e63b3e20f7b1c7354e24f04bce641d7cc32 100755
--- a/Database/AthenaPOOL/RDBAccessSvc/src/RDBRecord.h
+++ b/Database/AthenaPOOL/RDBAccessSvc/src/RDBRecord.h
@@ -30,44 +30,44 @@ namespace coral
  *
  * @brief RDBRecord is one record in the RDBRecordset object
  */
-class RDBRecord : public IRDBRecord
+class RDBRecord final : public IRDBRecord
 {
   friend class RDBRecordset;
 
  public:
 
   /// Destructor
-  virtual ~RDBRecord();
+  ~RDBRecord() override;
 
   /// Check if the field value is NULL
   /// @param fieldName [IN] field name
   /// @retun TRUE if the field is NULL, FALSE otherwise
-  bool isFieldNull(const std::string& fieldName) const;
+  bool isFieldNull(const std::string& fieldName) const override;
 
   /// Get int field value
   /// @param fieldName [IN] field name
   /// @return field value
-  int getInt(const std::string& fieldName) const;
+  int getInt(const std::string& fieldName) const override;
 
   /// Get long field value
   /// @param fieldName [IN] field name
   /// @return field value
-  long getLong(const std::string& fieldName) const;
+  long getLong(const std::string& fieldName) const override;
 
   /// Get double field value
   /// @param fieldName [IN] field name
   /// @return field value
-  double getDouble(const std::string& fieldName) const;
+  double getDouble(const std::string& fieldName) const override;
 
   /// Get float field value
   /// @param fieldName [IN] field name
   /// @return field value
-  float getFloat(const std::string& fieldName) const;
+  float getFloat(const std::string& fieldName) const override;
 
   /// Get string field value
   /// @param fieldName [IN] field name
   /// @return field value
-  std::string getString(const std::string& fieldName) const;
+  std::string getString(const std::string& fieldName) const override;
 
   // Access array values by index
   // arrays are implemented using the field with names like NAME_0, NAME_1 etc.
@@ -76,31 +76,31 @@ class RDBRecord : public IRDBRecord
   /// @param fieldName [IN] field name
   /// @param index [IN] index in the array
   /// @return field value
-  int getInt(const std::string& fieldName, unsigned int index) const;
+  int getInt(const std::string& fieldName, unsigned int index) const override;
 
   /// Get array long field value
   /// @param fieldName [IN] field name
   /// @param index [IN] index in the array
   /// @return field value
-  long getLong(const std::string& fieldName, unsigned int index) const;
+  long getLong(const std::string& fieldName, unsigned int index) const override;
 
   /// Get array double field value
   /// @param fieldName [IN] field name
   /// @param index [IN] index in the array
   /// @return field value
-  double getDouble(const std::string& fieldName, unsigned int index) const;
+  double getDouble(const std::string& fieldName, unsigned int index) const override;
 
   /// Get array float field value
   /// @param fieldName [IN] field name
   /// @param index [IN] index in the array
   /// @return field value
-  float getFloat(const std::string& fieldName, unsigned int index) const;
+  float getFloat(const std::string& fieldName, unsigned int index) const override;
 
   /// Get array string field value
   /// @param fieldName [IN] field name
   /// @param index [IN] index in the array
   /// @return field value
-  std::string getString(const std::string& fieldName, unsigned int index) const;
+  std::string getString(const std::string& fieldName, unsigned int index) const override;
 
   // Comparison operator
   bool operator!=(const RDBRecord& rhs) const;
diff --git a/Database/AthenaPOOL/RDBAccessSvc/src/RDBRecordset.h b/Database/AthenaPOOL/RDBAccessSvc/src/RDBRecordset.h
index 0ed5c540c3265607a26b564eae9640a8dcac0844..6aad45ae2dc695d484524829bb199773b358a8fd 100755
--- a/Database/AthenaPOOL/RDBAccessSvc/src/RDBRecordset.h
+++ b/Database/AthenaPOOL/RDBAccessSvc/src/RDBRecordset.h
@@ -37,14 +37,14 @@ class RDBAccessSvc;
 
 #include "RDBVersionAccessor.h" 
 
-class RDBRecordset : public IRDBRecordset
+class RDBRecordset final: public IRDBRecordset
 {
  public:
   /// Construct empty recordset
   RDBRecordset(RDBAccessSvc* accessSvc);
   
   /// Destructor, deletes all records
-  virtual ~RDBRecordset();
+  ~RDBRecordset() override;
 
   /// Constructs SQL query and retrieves the data from DB
   /// @param session [IN] active relational session
@@ -55,23 +55,23 @@ class RDBRecordset : public IRDBRecordset
 	       const std::string& tagId);
 
   /// @return number of records
-  unsigned int size() const;
+  unsigned int size() const override;
 
   /// @return node name
-  std::string nodeName() const;
+  std::string nodeName() const override;
 
   /// @return tag name
-  std::string tagName() const;
+  std::string tagName() const override;
 
   /// @param index [IN] index of the record
   /// @return RDBRecord by index
-  const IRDBRecord* operator[](unsigned int index) const;
+  const IRDBRecord* operator[](unsigned int index) const override;
 
   /// @return begin iterator
-  IRDBRecordset::const_iterator begin() const;
+  IRDBRecordset::const_iterator begin() const override;
 
   /// @return end iterator
-  IRDBRecordset::const_iterator end() const;
+  IRDBRecordset::const_iterator end() const override;
 
   // Comparison operator
   bool operator!=(const RDBRecordset& rhs) const;
diff --git a/Database/AthenaPOOL/RDBAccessSvc/src/SourceCompAlg.cxx b/Database/AthenaPOOL/RDBAccessSvc/src/SourceCompAlg.cxx
index 550be594dd02f75d2bd280f4410f2729fbf4cac2..5a6f6752e2b36cc333e564c20339817a1f07aa18 100644
--- a/Database/AthenaPOOL/RDBAccessSvc/src/SourceCompAlg.cxx
+++ b/Database/AthenaPOOL/RDBAccessSvc/src/SourceCompAlg.cxx
@@ -53,7 +53,7 @@ StatusCode SourceCompAlg::initialize()
     }
 
     // Check existence of the global tag in the database
-    if(rdbAccess->getChildTag("ATLAS",m_globalTag,"ATLAS",false,connName)=="") {
+    if(rdbAccess->getChildTag("ATLAS",m_globalTag,"ATLAS",connName)=="") {
       msg(MSG::FATAL) << "Unable to find " << m_globalTag << " in the connection " << connName << endmsg;
       return StatusCode::FAILURE;
     }
diff --git a/Database/AthenaRoot/AthenaRootComps/CMakeLists.txt b/Database/AthenaRoot/AthenaRootComps/CMakeLists.txt
index 3e38730e28972c477a78cc8ee56e249201a059f6..e88b1718ce055b4e40edcd7d14a435bf01558996 100644
--- a/Database/AthenaRoot/AthenaRootComps/CMakeLists.txt
+++ b/Database/AthenaRoot/AthenaRootComps/CMakeLists.txt
@@ -47,3 +47,49 @@ atlas_install_joboptions( share/tests/*.py )
 atlas_install_scripts( test/*.sh test/ref.* )
 
 
+atlas_add_test( test_athena_ntuple_dumper_multiple
+                SCRIPT test/test_athena_ntuple_dumper_multiple.sh
+                EXTRA_PATTERNS ".*"
+                PROPERTIES TIMEOUT 300 )
+
+
+atlas_add_test( test_athena_ntuple_dumper_varhandles_nooutput
+                SCRIPT test/test_athena_ntuple_dumper_varhandles_nooutput.sh
+                EXTRA_PATTERNS ".*"
+                PROPERTIES TIMEOUT 300 )
+
+atlas_add_test( test_athena_ntuple_dumper_varhandles
+                SCRIPT test/test_athena_ntuple_dumper_varhandles.sh
+                EXTRA_PATTERNS ".*"
+                PROPERTIES TIMEOUT 300 )
+
+atlas_add_test( test_athena_ntuple_dumper_novarhandles
+                SCRIPT test/test_athena_ntuple_dumper_novarhandles.sh
+                EXTRA_PATTERNS ".*"
+                PROPERTIES TIMEOUT 600 )
+
+atlas_add_test( test_athena_variable_shape1
+                SCRIPT test/test_athena_variable_shape1.sh
+                EXTRA_PATTERNS ".*"
+                PROPERTIES TIMEOUT 300 )
+
+atlas_add_test( test_athena_variable_shape2
+                SCRIPT test/test_athena_variable_shape2.sh
+                EXTRA_PATTERNS ".*"
+                PROPERTIES TIMEOUT 300 )
+
+atlas_add_test( test_athena_variable_shape3
+                SCRIPT test/test_athena_variable_shape3.sh
+                EXTRA_PATTERNS ".*"
+                PROPERTIES TIMEOUT 300 )
+
+configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/test/test_athena_variable_shape_merged.sh.in
+                ${CMAKE_CURRENT_BINARY_DIR}/test_athena_variable_shape_merged_script.sh
+                @ONLY )
+atlas_add_test( test_athena_variable_shape_merged
+                SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/test_athena_variable_shape_merged_script.sh
+                EXTRA_PATTERNS ".*"
+                PROPERTIES TIMEOUT 300 )
+set_tests_properties( AthenaRootComps_test_athena_variable_shape_merged_ctest
+                      PROPERTIES DEPENDS
+                      "AthenaRootComps_test_athena_variable_shape1_ctest;AthenaRootComps_test_athena_variable_shape2_ctest;AthenaRootComps_test_athena_variable_shape3_ctest" )
diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_multiple.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_multiple.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_novarhandles.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_novarhandles.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_varhandles.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_varhandles.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_varhandles_nooutput.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_ntuple_dumper_varhandles_nooutput.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape1.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape1.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape2.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape2.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape3.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape3.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape_merged.ref b/Database/AthenaRoot/AthenaRootComps/share/test_athena_variable_shape_merged.ref
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_ntuple_dumper.py b/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_ntuple_dumper.py
index 86de9bc8371e1649459e1aabb239e17b2c7c8c2e..985b2ae667e91aa9ef5b52c336880c4394eaa541 100644
--- a/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_ntuple_dumper.py
+++ b/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_ntuple_dumper.py
@@ -1,8 +1,10 @@
 from glob import glob
 if 1:
+    testdir = os.environ.get ('ATLAS_REFERENCE_DATA',
+                              'root://eosatlas//eos/atlas/user/b/binet/utests/utests/filter-d3pd')
     _cbntfiles = [
-        'root://eosatlas//eos/atlas/user/b/binet/utests/utests/filter-d3pd/ntuple.0.root',
-        'root://eosatlas//eos/atlas/user/b/binet/utests/utests/filter-d3pd/ntuple.1.root',
+        testdir + '/ntuple.0.root',
+        testdir + '/ntuple.1.root',
         ]
     ## _cbntfiles = [
     ##     '/tmp/binet/data/ntuple.0.root',
diff --git a/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_variable_shape_ntuple.py b/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_variable_shape_ntuple.py
index a9d6a3254c89228071fb6fbdbd5cf4a83db8d2b0..5db07f5520947fb55dcaa109671ea0d20a3d46a5 100644
--- a/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_variable_shape_ntuple.py
+++ b/Database/AthenaRoot/AthenaRootComps/share/tests/test_athena_variable_shape_ntuple.py
@@ -1,8 +1,10 @@
 from glob import glob
 if 1:
+    testdir = os.environ.get ('ATLAS_REFERENCE_DATA',
+                              'root://eosatlas//eos/atlas/user/b/binet/utests/utests/filter-d3pd')
     _cbntfiles = [
-        'root://eosatlas//eos/atlas/user/b/binet/utests/utests/filter-d3pd/ntuple.0.root',
-        'root://eosatlas//eos/atlas/user/b/binet/utests/utests/filter-d3pd/ntuple.1.root',
+        testdir + '/ntuple.0.root',
+        testdir + '/ntuple.1.root',
         ]
     # _cbntfiles = [
     #     '/tmp/binet/data/ntuple.0.root',
diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootDataBucketBranch.cxx b/Database/AthenaRoot/AthenaRootComps/src/RootDataBucketBranch.cxx
index 3798ebf5c26915fdc0fc12c5a1fc987a15ad48d9..063a7169ccec17cafa5606475b769c1b5ba193e8 100644
--- a/Database/AthenaRoot/AthenaRootComps/src/RootDataBucketBranch.cxx
+++ b/Database/AthenaRoot/AthenaRootComps/src/RootDataBucketBranch.cxx
@@ -25,7 +25,7 @@ DataBucketBranch::~DataBucketBranch()
 
 void*
 DataBucketBranch::cast(CLID clid, SG::IRegisterTransient* /*itr*/,
-                       bool /*isConst*/) const
+                       bool /*isConst*/)
 {
   // no conversion needed
   if (allowMismatchCLID || clid == m_clid) {
@@ -50,7 +50,7 @@ DataBucketBranch::cast(const std::type_info& tinfo,
 DataBucketBranch::cast(const std::type_info& /*tinfo*/,
 #endif
                        SG::IRegisterTransient* /*itr*/,
-                       bool /*isConst*/) const
+                       bool /*isConst*/)
 {
 #if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0)
   // no conversion needed
diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootDataBucketBranch.h b/Database/AthenaRoot/AthenaRootComps/src/RootDataBucketBranch.h
index 5907950f3367d86aac3914c7b2a06c4c60299e05..3cf992263420fd58e39b662dbd81b4d92792c3c5 100644
--- a/Database/AthenaRoot/AthenaRootComps/src/RootDataBucketBranch.h
+++ b/Database/AthenaRoot/AthenaRootComps/src/RootDataBucketBranch.h
@@ -55,12 +55,12 @@ public:
 
   virtual
   void* cast(CLID clid, SG::IRegisterTransient* itr,
-             bool isConst = true) const override;
+             bool isConst = true) override;
 
   virtual
   void* cast(const std::type_info& tinfo,
              SG::IRegisterTransient* itr,
-             bool isConst = true) const override;
+             bool isConst = true) override;
 
   virtual
   DataBucketBranch* clone() const override;
diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx
index e22543c0d03f40e98323c9725f77ed3e3e94f957..c3ae609eb0c7a24c253ef2b01da2a6a65be1a647 100644
--- a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx
+++ b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.cxx
@@ -796,7 +796,8 @@ RootNtupleEventSelector::loadAddresses(StoreID::type storeID, tadList& tads)
  
 /// update a transient Address
 StatusCode 
-RootNtupleEventSelector::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad)
+RootNtupleEventSelector::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad,
+                                       const EventContext& /*ctx*/)
 {
   // FIXME: check if we couldn't just use TTree::GetListOfBranches...
   // check memory usage/cpu consumption tradeoff
diff --git a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.h b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.h
index be61766565b57027340dfb9e7562bdd5ac53d145..73c33bcf024a0f955e052153900bcde2e4850859 100644
--- a/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.h
+++ b/Database/AthenaRoot/AthenaRootComps/src/RootNtupleEventSelector.h
@@ -121,7 +121,8 @@ class RootNtupleEventSelector :
  
   /// update a transient Address
   virtual 
-  StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad,
+                           const EventContext& ctx);
   ///@}
 
   ///@c ICollectionSize interface
diff --git a/Database/AthenaRoot/AthenaRootComps/src/TTreeEventSelector.cxx b/Database/AthenaRoot/AthenaRootComps/src/TTreeEventSelector.cxx
index 92dece46935ef69768f7cf30c13719d0e72c84ae..20d7c43ee1c4097f0a10d06a9e68925e57aefbc7 100644
--- a/Database/AthenaRoot/AthenaRootComps/src/TTreeEventSelector.cxx
+++ b/Database/AthenaRoot/AthenaRootComps/src/TTreeEventSelector.cxx
@@ -500,7 +500,8 @@ TTreeEventSelector::loadAddresses(StoreID::type /*storeID*/, tadList& /*tads*/)
  
 /// update a transient Address
 StatusCode 
-TTreeEventSelector::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad)
+TTreeEventSelector::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad,
+                                  const EventContext& /*ctx*/)
 {
   // FIXME: check if we couldn't just use TTree::GetListOfBranches...
   // check memory usage/cpu consumption tradeoff
diff --git a/Database/AthenaRoot/AthenaRootComps/src/TTreeEventSelector.h b/Database/AthenaRoot/AthenaRootComps/src/TTreeEventSelector.h
index bcd0f5b7924e1d660a3b6f537250e8eaa5a0290e..4ffbf356442aaef2655e52298db98a15c846dd79 100644
--- a/Database/AthenaRoot/AthenaRootComps/src/TTreeEventSelector.h
+++ b/Database/AthenaRoot/AthenaRootComps/src/TTreeEventSelector.h
@@ -102,7 +102,8 @@ class TTreeEventSelector :
  
   /// update a transient Address
   virtual 
-  StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad,
+                           const EventContext& ctx);
   ///@}
 
   /////////////////////////////////////////////////////////////////// 
diff --git a/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx b/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx
index e073b5f650902cf9b9a1bc0a3b493e3f760147a5..1afdf53fa63b51b6c99690fa16226d53470c0cfb 100644
--- a/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx
+++ b/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.cxx
@@ -679,7 +679,8 @@ xAODEventSelector::loadAddresses(StoreID::type storeID, tadList& tads)
  
 /// update a transient Address
 StatusCode 
-xAODEventSelector::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad)
+xAODEventSelector::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad,
+                                 const EventContext& /*ctx*/)
 {
   // check if this tad is known to us.
   if (tad) {
diff --git a/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.h b/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.h
index 19a2b6b0881b1a01e3e124c48538a93e6017c440..fa81688b5c40fae825144ba46d395b9032cab34b 100644
--- a/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.h
+++ b/Database/AthenaRoot/AthenaRootComps/src/xAODEventSelector.h
@@ -123,7 +123,8 @@ class xAODEventSelector :
  
   /// update a transient Address
   virtual 
-  StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad,
+                           const EventContext& ctx);
   ///@}
 
   ///@c ICollectionSize  interface
diff --git a/Database/AthenaRoot/AthenaRootComps/test/AthenaRootComps.xml b/Database/AthenaRoot/AthenaRootComps/test/AthenaRootComps.xml
index 856349523c6ede430cd476c0f429c55ad7101f4a..a2aa4019fce5c7636f5a9754d5f674a281d4d2ee 100644
--- a/Database/AthenaRoot/AthenaRootComps/test/AthenaRootComps.xml
+++ b/Database/AthenaRoot/AthenaRootComps/test/AthenaRootComps.xml
@@ -1,27 +1,5 @@
 <?xml version="1.0"?>
 <atn>
-   <TEST name="arc_rw" type="script" suite="athenarootcomps">
-      <package_atn>Control/AthenaRootComps</package_atn>
-      <options_atn>run_test_athena_ntuple_dumper.sh</options_atn>
-      <timelimit>30</timelimit>
-      <author> Sebastien Binet </author>
-      <mailto> binet@cern.ch </mailto>
-      <expectations>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-
-   <TEST name="arc_variable_shape" type="script" suite="athenarootcomps">
-      <package_atn>Control/AthenaRootComps</package_atn>
-      <options_atn>run_test_athena_variable_shape_ntuple.sh</options_atn>
-      <timelimit>30</timelimit>
-      <author> Sebastien Binet </author>
-      <mailto> binet@cern.ch </mailto>
-      <expectations>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-
    <TEST name="arc_filters" type="makecheck" suite="AthenaRootComps">
       <timelimit>20</timelimit>
       <author>Jack Cranshaw</author>
diff --git a/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_multiple.sh b/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_multiple.sh
new file mode 100755
index 0000000000000000000000000000000000000000..ffda90b66f81a7ad510d35b8ccb589f9501a10cc
--- /dev/null
+++ b/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_multiple.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+set -e
+
+testname=test_athena_ntuple_dumper_multiple
+rm -rf $testname
+mkdir $testname
+cd $testname
+
+ATLAS_REFERENCE_TAG=AthenaRootComps/AthenaRootCompsReference-01-00-00
+refbase=ref.d3pd.ascii
+chkfile=d3pd.ascii
+
+reffile=$refbase
+get_files -data -symlink $reffile > /dev/null
+if [ ! -r $reffile ]; then
+  # Look for the file in DATAPATH.
+  # We have to look for the directory, not the file itself,
+  # since get_files is hardcoded not to look more than two
+  # levels down.
+  get_files -data -symlink $ATLAS_REFERENCE_TAG > /dev/null
+  reffile=`basename $ATLAS_REFERENCE_TAG`/$refbase
+  if [ ! -r $reffile ]; then
+      testdata=$ATLAS_REFERENCE_DATA
+      if [ "$testdata" = "" ]; then
+          testdata=/afs/cern.ch/atlas/maxidisk/d33/referencefiles
+      fi
+      reffile=$testdata/$ATLAS_REFERENCE_TAG/$refbase
+  fi
+fi
+
+echo "::::::::::::::::::::::::::::::::::::::::::::::"
+echo "::: run athena-ntuple-dumper... (w/ multiple output-streams)"
+time_cmd="/usr/bin/time -a -o d3pd.rw.timing.log"
+/bin/rm -rf d3pd.rw.timing.log >& /dev/null
+($time_cmd athena.py -c'USEVARHANDLE=1; DOWRITE=2' -lERROR AthenaRootComps/test_athena_ntuple_dumper.py >& d3pd.000.0.log.txt) || exit 1
+grep "user" d3pd.rw.timing.log
+echo "::: comparing ascii dumps..."
+/bin/rm -f d3pd.ascii.diff
+diff -urN $reffile $chkfile >& d3pd.ascii.diff
+sc=$?
+echo "::: comparing ascii dumps...[$sc]"
+if [ $sc -ne 0 ]; then
+    exit $sc
+fi
+echo "::: comparing output n-tuples..."
+acmd.py diff-root d3pd.root d3pd_2.root -t egamma 2> /dev/null
+sc=$?
+echo "::: comparing output n-tuples...[$sc]"
+if [ $sc -ne 0 ]; then
+    exit $sc
+fi
diff --git a/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_novarhandles.sh b/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_novarhandles.sh
new file mode 100755
index 0000000000000000000000000000000000000000..46353583161732466981442a4466096cd74c8783
--- /dev/null
+++ b/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_novarhandles.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+
+set -e
+
+testname=test_athena_ntuple_dumper_novarhandles
+rm -rf $testname
+mkdir $testname
+cd $testname
+
+IIMAX=5
+if [[ "$CMTCONFIG" == *-dbg* ]]; then
+    IIMAX=1
+    echo "::: setting IIMAX=1 (debug mode is slower)"
+else
+    IIMAX=5
+    echo "::: setting IIMAX=5 (opt mode is faster)"
+fi
+
+
+ATLAS_REFERENCE_TAG=AthenaRootComps/AthenaRootCompsReference-01-00-00
+refbase=ref.d3pd.ascii
+chkfile=d3pd.ascii
+
+reffile=$refbase
+get_files -data -symlink $reffile > /dev/null
+if [ ! -r $reffile ]; then
+  # Look for the file in DATAPATH.
+  # We have to look for the directory, not the file itself,
+  # since get_files is hardcoded not to look more than two
+  # levels down.
+  get_files -data -symlink $ATLAS_REFERENCE_TAG > /dev/null
+  reffile=`basename $ATLAS_REFERENCE_TAG`/$refbase
+  if [ ! -r $reffile ]; then
+      testdata=$ATLAS_REFERENCE_DATA
+      if [ "$testdata" = "" ]; then
+          testdata=/afs/cern.ch/atlas/maxidisk/d33/referencefiles
+      fi
+      reffile=$testdata/$ATLAS_REFERENCE_TAG/$refbase
+  fi
+fi
+
+echo "::::::::::::::::::::::::::::::::::::::::::::::"
+echo "::: run athena-ntuple-dumper... (w/o varhandles)"
+time_cmd="/usr/bin/time -a -o d3pd.rw.timing.log"
+/bin/rm -rf d3pd.rw.timing.log >& /dev/null
+for ii in `seq $IIMAX`; do
+    echo " - iter $ii/$IIMAX..."
+    ($time_cmd athena.py -c'USEVARHANDLE=0' -lERROR AthenaRootComps/test_athena_ntuple_dumper.py >& d3pd.003.$ii.log.txt) || exit 1
+done
+grep "user" d3pd.rw.timing.log
+echo "::: comparing ascii dumps..."
+/bin/rm -f d3pd.ascii.diff
+diff -urN $reffile $chkfile >& d3pd.ascii.diff
+sc=$?
+echo "::: comparing ascii dumps...[$sc]"
+
+if [ $sc -ne 0 ]; then
+    exit $sc
+fi
+
+
+echo ""
+echo "::::::::::::::::::::::::::::::::::::::::::::::"
+echo "::: reading back n-tuple file..."
+/bin/mv d3pd.root rb.d3pd.root || exit 1
+/bin/rm -f $chkfile > /dev/null
+time_cmd="/usr/bin/time -a -o d3pd.rb.timing.log"
+/bin/rm -rf d3pd.rb.timing.log >& /dev/null
+for ii in `seq $IIMAX`; do
+    echo " - iter $ii/$IIMAX..."
+    ($time_cmd athena.py -c'FNAMES=["rb.d3pd.root"]' -lERROR AthenaRootComps/test_athena_ntuple_dumper.py >& d3pd.004.$ii.log.txt) || exit 1
+done
+grep "user" d3pd.rb.timing.log
+echo "::: comparing ascii dumps..."
+/bin/rm -f rb.d3pd.ascii.diff
+diff -urN $reffile $chkfile >& rb.d3pd.ascii.diff
+sc=$?
+echo "::: comparing ascii dumps...[$sc]"
+
+exit $sc
diff --git a/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_varhandles.sh b/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_varhandles.sh
new file mode 100755
index 0000000000000000000000000000000000000000..183a9bc753c238f0d6b127515b7044a8b2abae96
--- /dev/null
+++ b/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_varhandles.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+set -e
+
+testname=test_athena_ntuple_dumper_varhandles
+rm -rf $testname
+mkdir $testname
+cd $testname
+
+IIMAX=5
+if [[ "$CMTCONFIG" == *-dbg* ]]; then
+    IIMAX=1
+    echo "::: setting IIMAX=1 (debug mode is slower)"
+else
+    IIMAX=5
+    echo "::: setting IIMAX=5 (opt mode is faster)"
+fi
+
+
+ATLAS_REFERENCE_TAG=AthenaRootComps/AthenaRootCompsReference-01-00-00
+refbase=ref.d3pd.ascii
+chkfile=d3pd.ascii
+
+reffile=$refbase
+get_files -data -symlink $reffile > /dev/null
+if [ ! -r $reffile ]; then
+  # Look for the file in DATAPATH.
+  # We have to look for the directory, not the file itself,
+  # since get_files is hardcoded not to look more than two
+  # levels down.
+  get_files -data -symlink $ATLAS_REFERENCE_TAG > /dev/null
+  reffile=`basename $ATLAS_REFERENCE_TAG`/$refbase
+  if [ ! -r $reffile ]; then
+      testdata=$ATLAS_REFERENCE_DATA
+      if [ "$testdata" = "" ]; then
+          testdata=/afs/cern.ch/atlas/maxidisk/d33/referencefiles
+      fi
+      reffile=$testdata/$ATLAS_REFERENCE_TAG/$refbase
+  fi
+fi
+
+echo "::::::::::::::::::::::::::::::::::::::::::::::"
+echo "::: run athena-ntuple-dumper... (w/ varhandles)"
+time_cmd="/usr/bin/time -a -o d3pd.rw.timing.log"
+/bin/rm -rf d3pd.rw.timing.log >& /dev/null
+for ii in `seq $IIMAX`; do
+    echo " - iter $ii/$IIMAX..."
+    ($time_cmd athena.py -c'USEVARHANDLE=1' -lERROR AthenaRootComps/test_athena_ntuple_dumper.py >& d3pd.002.$ii.log.txt) || exit 1
+done
+grep "user" d3pd.rw.timing.log
+echo "::: comparing ascii dumps..."
+/bin/rm -f d3pd.ascii.diff
+diff -urN $reffile $chkfile >& d3pd.ascii.diff
+sc=$?
+echo "::: comparing ascii dumps...[$sc]"
+
+if [ $sc -ne 0 ]; then
+    exit $sc
+fi
diff --git a/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_varhandles_nooutput.sh b/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_varhandles_nooutput.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c50fc764ddb2eba6f85066e540497214c53fddf2
--- /dev/null
+++ b/Database/AthenaRoot/AthenaRootComps/test/test_athena_ntuple_dumper_varhandles_nooutput.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+set -e
+
+testname=test_athena_ntuple_dumper_varhandles_nooutput
+rm -rf $testname
+mkdir $testname
+cd $testname
+
+IIMAX=5
+if [[ "$CMTCONFIG" == *-dbg* ]]; then
+    IIMAX=1
+    echo "::: setting IIMAX=1 (debug mode is slower)"
+else
+    IIMAX=5
+    echo "::: setting IIMAX=5 (opt mode is faster)"
+fi
+
+
+ATLAS_REFERENCE_TAG=AthenaRootComps/AthenaRootCompsReference-01-00-00
+refbase=ref.d3pd.ascii
+chkfile=d3pd.ascii
+
+reffile=$refbase
+get_files -data -symlink $reffile > /dev/null
+if [ ! -r $reffile ]; then
+  # Look for the file in DATAPATH.
+  # We have to look for the directory, not the file itself,
+  # since get_files is hardcoded not to look more than two
+  # levels down.
+  get_files -data -symlink $ATLAS_REFERENCE_TAG > /dev/null
+  reffile=`basename $ATLAS_REFERENCE_TAG`/$refbase
+  if [ ! -r $reffile ]; then
+      testdata=$ATLAS_REFERENCE_DATA
+      if [ "$testdata" = "" ]; then
+          testdata=/afs/cern.ch/atlas/maxidisk/d33/referencefiles
+      fi
+      reffile=$testdata/$ATLAS_REFERENCE_TAG/$refbase
+  fi
+fi
+
+echo "::::::::::::::::::::::::::::::::::::::::::::::"
+echo "::: run athena-ntuple-dumper... (w/ varhandles, w/o output)"
+time_cmd="/usr/bin/time -a -o d3pd.rw.timing.log"
+/bin/rm -rf d3pd.rw.timing.log >& /dev/null
+for ii in `seq $IIMAX`; do
+    echo " - iter $ii/$IIMAX..."
+    ($time_cmd athena.py -c'USEVARHANDLE=1; DOWRITE=0' -lERROR AthenaRootComps/test_athena_ntuple_dumper.py >& d3pd.001.$ii.log.txt) || exit 1
+done
+grep "user" d3pd.rw.timing.log
+echo "::: comparing ascii dumps..."
+/bin/rm -f d3pd.ascii.diff
+diff -urN $reffile $chkfile >& d3pd.ascii.diff
+sc=$?
+echo "::: comparing ascii dumps...[$sc]"
+
+if [ $sc -ne 0 ]; then
+    exit $sc
+fi
diff --git a/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape1.sh b/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape1.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a2edc53325d72ad323fd08f468a882c88a0cba5c
--- /dev/null
+++ b/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape1.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e
+
+testname=test_athena_variable_shape/shape1
+rm -rf $testname
+mkdir -p $testname
+cd $testname
+
+echo "::: generate f1.root..."
+athena.py \
+    -c 'EVTMAX=10; BRANCHES=["RunNumber", "EventNumber", "el_n", "el_eta"]; OUTBRANCHES=["el_n","el_eta"]' \
+    AthenaRootComps/test_athena_variable_shape_ntuple.py \
+    >| log.001.txt 2>| log.001.stderr.txt \
+    || exit 1
+/bin/mv d3pd.root f1.root || exit 1
+/bin/mv data.var.txt data.1.txt || exit 1
+(acmd.py dump-root f1.root 2> f1.stderr.ascii) \
+    | grep "^egamma" \
+    | egrep "RunNumber|EventNumber|el_n" \
+    | tee f1.ascii \
+    || return 1
+cat f1.ascii| cut -d. -f3 >| f1.ascii.todiff || exit 1
+
+exit 0
diff --git a/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape2.sh b/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape2.sh
new file mode 100755
index 0000000000000000000000000000000000000000..b7692ee7a985a0cd1bbe5d1fe592731bf2c8fa7e
--- /dev/null
+++ b/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape2.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e
+
+testname=test_athena_variable_shape/shape2
+rm -rf $testname
+mkdir -p $testname
+cd $testname
+
+echo "::: generate f2.root..."
+athena.py \
+    -c 'EVTMAX=10; BRANCHES=["RunNumber", "EventNumber", "el_n", "el_phi"]; OUTBRANCHES=["el_n","el_phi"]' \
+    AthenaRootComps/test_athena_variable_shape_ntuple.py \
+    >| log.002.txt 2>| log.002.stderr.txt \
+    || exit 1
+/bin/mv d3pd.root f2.root || exit 1
+/bin/mv data.var.txt data.2.txt || exit 1
+(acmd.py dump-root f2.root 2> f2.stderr.txt) \
+    | grep "^egamma" \
+    | egrep "RunNumber|EventNumber|el_n" \
+    | tee f2.ascii \
+    || exit 1
+cat f2.ascii| cut -d. -f3 >| f2.ascii.todiff || exit 1
+
+exit 0
diff --git a/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape3.sh b/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape3.sh
new file mode 100755
index 0000000000000000000000000000000000000000..e426844d86d935d716d61ecbfb9a0badd6eaee6b
--- /dev/null
+++ b/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape3.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e
+
+testname=test_athena_variable_shape/shape3
+rm -rf $testname
+mkdir -p $testname
+cd $testname
+
+echo "::: generate f3.root..."
+athena.py \
+    -c 'EVTMAX=10; BRANCHES=["RunNumber", "EventNumber", "el_n", "el_eta"]; OUTBRANCHES=["el_n","el_eta"]' \
+    AthenaRootComps/test_athena_variable_shape_ntuple.py \
+    >| log.003.txt 2>| log.003.stderr.txt \
+    || exit 1
+/bin/mv d3pd.root f3.root || exit 1
+/bin/mv data.var.txt data.3.txt || exit 1
+(acmd.py dump-root f3.root 2> f3.stderr.txt) \
+    | grep "^egamma" \
+    | egrep "RunNumber|EventNumber|el_n" \
+    | tee f3.ascii \
+    || exit 1
+cat f3.ascii| cut -d. -f3 >| f3.ascii.todiff || exit 1
+
+exit 0
diff --git a/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape_merged.sh.in b/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape_merged.sh.in
new file mode 100755
index 0000000000000000000000000000000000000000..8d8aca285cc87fee77b1f38ef25d06ffecb1d982
--- /dev/null
+++ b/Database/AthenaRoot/AthenaRootComps/test/test_athena_variable_shape_merged.sh.in
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+set -e
+
+testname=test_athena_variable_shape
+mkdir -p $testname
+cd $testname
+rm -f *.txt *.xml
+
+cp @CMAKE_CURRENT_SOURCE_DIR@/test/ref.data.merged.ascii .
+
+echo "::: generate merged.root..."
+athena.py \
+    -c 'EVTMAX=30; BRANCHES=["RunNumber", "EventNumber", "el_n", "el_eta","el_phi"]; OUTBRANCHES=["el_n",]; FNAMES=["shape1/f1.root","shape2/f2.root","shape3/f3.root"]' \
+    AthenaRootComps/test_athena_variable_shape_ntuple.py \
+    >| log.004.txt 2>| log.004.stderr.txt \
+    || exit 1
+/bin/mv d3pd.root f4.root || exit 1
+/bin/mv data.var.txt data.4.txt || exit 1
+(acmd.py dump-root f4.root 2> f4.stderr.txt) \
+    | grep "^egamma" \
+    | egrep "RunNumber|EventNumber|el_n" \
+    | tee f4.ascii \
+    || exit 1
+cat f4.ascii| cut -d. -f3 >| f4.ascii.todiff || exit 1
+
+echo "::: compare py-alg outputs..."
+cat shape[123]/data.*.txt > data.merged.txt || exit 1
+diff -urN data.merged.txt data.4.txt || exit 1
+echo "::: compare py-alg outputs... [ok]"
+
+echo "::: compare py-alg output to reference..."
+diff -urN data.merged.txt ref.data.merged.ascii || exit 1
+echo "::: compare py-alg output to reference... [ok]"
+
+echo "::: compare dump-root outputs..."
+cat shape[123]/f*.ascii.todiff > merged.ascii.todiff || exit 1
+diff -urN merged.ascii.todiff f4.ascii.todiff || exit 1
+echo "::: compare dump-root outputs... [ok]"
+
+exit 0
diff --git a/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynReader.cxx b/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynReader.cxx
index df0c77c4bf3779eb226abbd459b5932562daacf9..8f8ff93d06604d09a1bca605388982328ed4c9dd 100644
--- a/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynReader.cxx
+++ b/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynReader.cxx
@@ -284,11 +284,11 @@ RootAuxDynReader::getBranchInfo(const SG::auxid_t& auxid, const SG::AuxStoreInte
       // For example, suppose we've renamed attribute `foo' to `foo_old',
       // and someone then comes and asks for `foo'.
       // `foo' will not be found in the m_branchMap test below
-      // (`foo_old' will be in this map).  Howeve, in the following
+      // (`foo_old' will be in this map).  However, in the following
       // else clause, we'll recreate the branch name from `foo'.
       // This branch exists (renaming is only in the transient store),
       // so if we didn't have the condition here, then we'd then
-      // make a `foo' attribute from theat branch.
+      // make a `foo' attribute from that branch.
       if (r.inputRename (m_key, brInfo.attribName) != brInfo.attribName) {
         brInfo.status = BranchInfo::NotFound;
         return brInfo;
diff --git a/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynStore.cxx b/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynStore.cxx
index 93ceef89c67f55884970390bad1b7fb51eccfc66..2ba71446d39dd2b8a170d35be32e7beac45f70dd 100644
--- a/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynStore.cxx
+++ b/Database/AthenaRoot/RootAuxDynIO/src/RootAuxDynStore.cxx
@@ -90,6 +90,14 @@ bool RootAuxDynStore::readData(SG::auxid_t auxid)
          throw string("Error reading branch ") + brInfo.branch->GetName();
       // read OK
       m_reader.addBytes(nbytes);
+      TTree::TClusterIterator clusterIterator = brInfo.branch->GetTree()->GetClusterIterator(m_entry);
+      clusterIterator.Next();
+      if (m_entry == clusterIterator.GetStartEntry() && brInfo.branch->GetTree()->GetMaxVirtualSize() != 0) {
+         for (int i = brInfo.branch->GetReadBasket(); i < brInfo.branch->GetMaxBaskets()
+	         && brInfo.branch->GetBasketEntry()[i] < clusterIterator.GetNextEntry(); i++) {
+            brInfo.branch->GetBasket(i);
+         }
+      }
    }
    catch(const string& e_str) {
       ATHCONTAINERS_ERROR("RootAuxDynStore::getData", e_str);
diff --git a/Database/AtlasSTLAddReflex/doc/packagedoc.h b/Database/AtlasSTLAddReflex/doc/packagedoc.h
index 0a390a8180c1f00c9d87830b73951ecc6a6479e6..9c3ea166530e0743e774a42a7c6511f925236f05 100644
--- a/Database/AtlasSTLAddReflex/doc/packagedoc.h
+++ b/Database/AtlasSTLAddReflex/doc/packagedoc.h
@@ -17,12 +17,3 @@ external package. This package defines other STL containers used in
 ATLAS, e.g. std::vector<std::vector<float> >.
 
 */
-
-/**
-@page UsedAtlasSTLAddReflex Used Packages
-*/
-
-/**
-@page RequirementsAtlasSTLAddReflex Requirements
-*/
-
diff --git a/Database/AtlasSealCLHEP/doc/packagedoc.h b/Database/AtlasSealCLHEP/doc/packagedoc.h
index a86a6d770c2a443b530d844659a8161baac403ee..ab43fd03168ac6cf18c4f96fa0ab44f7e9fc3be5 100644
--- a/Database/AtlasSealCLHEP/doc/packagedoc.h
+++ b/Database/AtlasSealCLHEP/doc/packagedoc.h
@@ -22,12 +22,3 @@ with schema evolved CLHEP classes in the data. This is no longer
 needed with data written with from release 13 and beyond.
 
 */
-
-/**
-@page UsedAtlasSealCLHEP Used Packages
-*/
-
-/**
-@page RequirementsAtlasSealCLHEP Requirements
-*/
-
diff --git a/Database/ConnectionManagement/DBReplicaSvc/doc/packagedoc.h b/Database/ConnectionManagement/DBReplicaSvc/doc/packagedoc.h
index 9e08969252f948ff86e52d8c42faeec8b212f0a3..2110a35fe498e717d3f20423603dd9abc84bf330 100644
--- a/Database/ConnectionManagement/DBReplicaSvc/doc/packagedoc.h
+++ b/Database/ConnectionManagement/DBReplicaSvc/doc/packagedoc.h
@@ -60,10 +60,8 @@ The following job options are defined:
  - UseGeomSQLIte (default 'True') - use SQLite replicas for geometry if offered
  - DisableFailover (default 'False') - only allow one (primary) Oracle replica
 
-@section DBReplicaSvc_requirements requirements
 
 
-@section DBReplicaSvc_uses Packages used
 
 
 */
diff --git a/Database/CoolConvUtilities/doc/packagedoc.h b/Database/CoolConvUtilities/doc/packagedoc.h
index 3b3885ad4b746e01d5c6bd35dcc779de3a5a752f..ddacad8ee3905a82e0279b3067e3b36c4a57c274 100644
--- a/Database/CoolConvUtilities/doc/packagedoc.h
+++ b/Database/CoolConvUtilities/doc/packagedoc.h
@@ -537,11 +537,8 @@ Welcome to AtlCoolConsole. Type 'help' for instructions.
   Name              Description       Count     Size        
 </pre>
 
-@section CoolConvUtilities_requirements requirements
 
 
-@section CoolConvUtilities_uses Packages used
 
 
 */
-
diff --git a/Database/CoraCool/doc/packagedoc.h b/Database/CoraCool/doc/packagedoc.h
index a33abdf7e8c9b4acdeea52907f6701fb9fc03ea4..c568faaa4e3fc3def44c090c82e9245126cd0d39 100644
--- a/Database/CoraCool/doc/packagedoc.h
+++ b/Database/CoraCool/doc/packagedoc.h
@@ -158,10 +158,5 @@ hasNext and next methods.
 a sequence for the generation of primary keys. It should not be used by
 clients.
 
-@section CoraCool_requirements requirements
-
-
-@section CoraCool_uses Packages used
-
 
 */
diff --git a/Database/IOVDbSvc/doc/packagedoc.h b/Database/IOVDbSvc/doc/packagedoc.h
index f354e1ffa2ead41ddf085ff37a4410579c52d536..8364aeb1673ee61bb87c911a433fb7bdda6a5781 100644
--- a/Database/IOVDbSvc/doc/packagedoc.h
+++ b/Database/IOVDbSvc/doc/packagedoc.h
@@ -326,11 +326,7 @@ Larger numbers indicate the schema was reaccessed later in the job to
 read more data.
 
  
-@section IOVDbSvc_Req The requirements file:
-
 @section IOVDbSvc_joFile The example jobOptions file:
 @include IOVDbSvc_jobOptions.py
 
-@section IOVDbSvc_Uses The packages used:
-
 */
diff --git a/Database/IOVDbSvc/python/CondDB.py b/Database/IOVDbSvc/python/CondDB.py
index 54c4ba1b4b0d247bd5860305faec06a5fc17dbe8..797f496149651a0565dce3c0fbe1128096e6897a 100644
--- a/Database/IOVDbSvc/python/CondDB.py
+++ b/Database/IOVDbSvc/python/CondDB.py
@@ -205,25 +205,25 @@ class CondDB:
         self.iovdbsvc.Folders+=[folderadd]
 
         if className:
-            condInputLoader.Load += [ (className, folder) ]
+            condInputLoader.Load += [ (className, self.extractFolder(folder)) ]
 
-    def addFolderWithTag(self,ident,folder,tag,force=False,forceMC=False,forceData=False):
+    def addFolderWithTag(self,ident,folder,tag,force=False,forceMC=False,forceData=False,className=None):
         "Add access to the given folder/schema, using a specified tag"
-        self.addFolder(ident,folder+" <tag>%s</tag>" % tag,force,forceMC,forceData)
+        self.addFolder(ident,folder+" <tag>%s</tag>" % tag,force,forceMC,forceData,className=className)
 
-    def addFolderSplitOnline(self,ident,folder1,folder2,force=False,forceMC=False,forceData=False):
+    def addFolderSplitOnline(self,ident,folder1,folder2,force=False,forceMC=False,forceData=False,className=None):
         "Add access to given folder, using folder1 online, folder2 offline"
         if self.isOnline and not self.isMC:
-            self.addFolder(ident,folder1,force=force,forceMC=forceMC,forceData=forceData)
+            self.addFolder(ident,folder1,force=force,forceMC=forceMC,forceData=forceData,className=className)
         else:
-            self.addFolder(ident+'_OFL',folder2,force=force,forceMC=forceMC,forceData=forceData)
+            self.addFolder(ident+'_OFL',folder2,force=force,forceMC=forceMC,forceData=forceData,className=className)
 
-    def addFolderSplitMC(self,ident,folder1,folder2,force=False,forceMC=False,forceData=False):
+    def addFolderSplitMC(self,ident,folder1,folder2,force=False,forceMC=False,forceData=False,className=None):
         "Add access to given folder, using folder1 (online) for real data, folde2 (offline) for MC"
         if self.isMC:
-            self.addFolder(ident+'_OFL',folder2,force=force,forceMC=forceMC,forceData=forceData)
+            self.addFolder(ident+'_OFL',folder2,force=force,forceMC=forceMC,forceData=forceData,className=className)
         else:
-            self.addFolder(ident,folder1,force=force,forceMC=forceMC,forceData=forceData)
+            self.addFolder(ident,folder1,force=force,forceMC=forceMC,forceData=forceData,className=className)
 
     def addOverride(self,folder,tag):
         "Add a tag override for the specified folder"
@@ -377,4 +377,4 @@ class CondDB:
 
 # make instance for use
 # false indicates no backward compatibility objects
-conddb=CondDB(False)
+conddb=CondDB(False)
\ No newline at end of file
diff --git a/Database/IOVDbSvc/src/IOVDbFolder.cxx b/Database/IOVDbSvc/src/IOVDbFolder.cxx
index d12364088a46f29fb4cb451b766e7aef00124473..19c6b63cefab7983a1a02347c37d975941438b89 100644
--- a/Database/IOVDbSvc/src/IOVDbFolder.cxx
+++ b/Database/IOVDbSvc/src/IOVDbFolder.cxx
@@ -1291,7 +1291,15 @@ IOVDbFolder::preLoadFolder(StoreGateSvc* detStore,
     std::string linkname;
     std::string::size_type idx;
     do {
-      idx=buf.find(":");
+      // Type names may be qualified C++ names including a scope: SCOPE::NAME.
+      // So ignore double colons when splitting the symlink list.
+      idx = 0;
+      while (true) {
+        idx=buf.find(":", idx);
+        if (idx == std::string::npos || buf[idx+1] != ':') break;
+        idx += 2;
+      }
+
       if (idx!=std::string::npos) {
         linkname=buf.substr(0,idx);
         buf=buf.substr(1+idx,buf.size());
diff --git a/Database/IOVDbSvc/src/IOVDbSvc.cxx b/Database/IOVDbSvc/src/IOVDbSvc.cxx
index d3d18c2e0201252ab456af7e1c090f0fee256579..aabe718801427d42e30eb77309ed472e9e80a2da 100644
--- a/Database/IOVDbSvc/src/IOVDbSvc.cxx
+++ b/Database/IOVDbSvc/src/IOVDbSvc.cxx
@@ -108,10 +108,6 @@ IOVDbSvc::IOVDbSvc( const std::string& name, ISvcLocator* svc )
 
 IOVDbSvc::~IOVDbSvc() {}
 
-const InterfaceID& IOVDbSvc::type() const { 
-  return IIOVDbSvc::interfaceID();
-}
-
 /// Identify interfaces to which this service is responsive
 StatusCode
 IOVDbSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
@@ -440,7 +436,9 @@ StatusCode IOVDbSvc::loadAddresses(StoreID::type /*storeID*/, tadList& /*list*/
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-StatusCode IOVDbSvc::updateAddress(StoreID::type storeID, SG::TransientAddress* tad) {
+StatusCode IOVDbSvc::updateAddress(StoreID::type storeID, SG::TransientAddress* tad,
+                                   const EventContext& /*ctx*/)
+{
   // Provide TAD and associated range, actually reading the conditions data
 
   // Read information for folders and setup TADs
@@ -687,23 +685,21 @@ StatusCode IOVDbSvc::setRange( const CLID&        /*clid*/,
   return StatusCode::SUCCESS;
 }
 
-StatusCode IOVDbSvc::signalBeginRun(const IOVTime& beginRunTime) {
+StatusCode IOVDbSvc::signalBeginRun(const IOVTime& beginRunTime,
+                                    const EventContext& ctx)
+{
   // Begin run - set state and save time for later use
   m_state=IOVDbSvc::BEGIN_RUN;
   m_iovTime=beginRunTime;
 
   // For a MC event, the run number we need to use to look up the conditions
-  // may be different from that of the event itself.  If we have
-  // a ConditionsRun attribute defined, use that to override
-  // the event number.
-  const AthenaAttributeList* attr = nullptr;
-  if (m_h_sgSvc->contains<AthenaAttributeList> ("Input") &&
-      m_h_sgSvc->retrieve(attr, "Input").isSuccess())
-  {
-    if (attr->exists ("ConditionsRun"))
-      m_iovTime.setRunEvent
-        ((*attr)["ConditionsRun"].data<unsigned int>(),
-         m_iovTime.event());
+  // may be different from that of the event itself.  Override the run
+  // number with the conditions run number from the event context,
+  // if it is defined.
+  EventIDBase::number_type conditionsRun =
+    ctx.template getExtension<Atlas::ExtendedEventContext>()->conditionsRun();
+  if (conditionsRun != EventIDBase::UNDEFNUM) {
+    m_iovTime.setRunEvent (conditionsRun, m_iovTime.event());
   }
 
   if (m_log->level()<MSG::DEBUG) 
diff --git a/Database/IOVDbSvc/src/IOVDbSvc.h b/Database/IOVDbSvc/src/IOVDbSvc.h
index c540e9db62b65d3842b7b538bcc577638b46e00d..ed34bed94c810a1613d0b185c01adbf3ed9fbe0f 100644
--- a/Database/IOVDbSvc/src/IOVDbSvc.h
+++ b/Database/IOVDbSvc/src/IOVDbSvc.h
@@ -13,8 +13,8 @@
  * $Header: /build/atlas/cvs/atlas/offline/Database/IOVDbSvc/src/IOVDbSvc.h,v 1.48 2009-02-10 14:09:58 hawkings Exp $
  */
 
-#ifndef __IOVDBSVC_H__
-#define __IOVDBSVC_H__
+#ifndef IOVDBSVC_IOVDBSVC_H
+#define IOVDBSVC_IOVDBSVC_H
 
 #include "GaudiKernel/IInterface.h"
 #include "GaudiKernel/IService.h"
@@ -87,23 +87,20 @@ public:
   IOVDbSvc( const std::string& name, ISvcLocator* svc );
   virtual ~IOVDbSvc();
   
-  /// Serice init
-  virtual StatusCode initialize();
+  /// Service init
+  virtual StatusCode initialize() override;
 
   /// Service finalize
-  virtual StatusCode finalize();
+  virtual StatusCode finalize() override;
   
   /// Query the interfaces.
-  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
+  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface )  override;
   static const InterfaceID& interfaceID();
   
-  /// Service type.
-  virtual const InterfaceID& type() const;
-
   // IIOVDbSvc interface   
 
   /// Access to COOL database for a given folder
-  virtual cool::IDatabasePtr getDatabase( bool readOnly );
+  virtual cool::IDatabasePtr getDatabase( bool readOnly ) override;
 
   typedef IAddressProvider::tadList tadList;
   typedef IAddressProvider::tadListIterator tadListIterator;
@@ -112,15 +109,16 @@ public:
   //@{
   /// Get all addresses that the provider wants to preload in SG maps
   virtual StatusCode preLoadAddresses( StoreID::type storeID,
-                                       tadList& list );
+                                       tadList& list ) override;
     
   /// Get all new addresses from Provider for this Event.
   virtual StatusCode loadAddresses( StoreID::type storeID,
-                                    tadList& list );
+                                    tadList& list ) override;
       
   /// Update a transient Address
   virtual StatusCode updateAddress( StoreID::type storeID,
-                                    SG::TransientAddress* tad );
+                                    SG::TransientAddress* tad,
+                                    const EventContext& ctx ) override;
   //@}
   
 
@@ -133,7 +131,7 @@ public:
                                const IOVTime& time,
                                IOVRange& range,
                                std::string& tag,
-                               IOpaqueAddress*& ioa);
+                               IOpaqueAddress*& ioa) override;
 
 
 
@@ -141,34 +139,36 @@ public:
   virtual StatusCode setRange( const CLID& clid,
                                const std::string& dbKey,
                                const IOVRange& range,
-                               const std::string& tag );
+                               const std::string& tag ) override;
 
   /// Set time for begin run
-  virtual StatusCode signalBeginRun(const IOVTime& beginRunTime);
+  virtual StatusCode signalBeginRun(const IOVTime& beginRunTime,
+                                    const EventContext& ctx) override;
 
   /// Signal that callback has been fired
-  virtual void       signalEndProxyPreload();
+  virtual void       signalEndProxyPreload() override;
   //@}
   
   /// Incident service handle for EndEvent
-  virtual void handle( const Incident& incident );
+  virtual void handle( const Incident& incident ) override;
 
   /// Register callback for TagInfo access
-  StatusCode registerTagInfoCallback();
+  virtual StatusCode registerTagInfoCallback() override;
 
   /// Callback method for TagInfo access
   StatusCode         processTagInfo(IOVSVC_CALLBACK_ARGS);
 
   // return list of SG keys being provided by IOVDbSvc
-  std::vector<std::string> getKeyList();
+  virtual std::vector<std::string> getKeyList() override;
 
   // return information about one SG key
   // - folder, tag, IOVRange and whether data has been retrieved
   // (if not, range and tag may not be meaningful)
   // return false if this key is not known to IOVDbSvc
+  virtual
   bool getKeyInfo(const std::string& key, std::string& foldername,
                   std::string& tag, IOVRange& range, bool& retrieved,
-                  unsigned long long& bytesRead, float& readTime);
+                  unsigned long long& bytesRead, float& readTime) override;
 
 
   // drop an IOVDbSvc-managed object from Storegate, indicating we will
@@ -176,7 +176,8 @@ public:
   // If resetCache=True, also drop the corresponding folder cache
   // so any subsequent reads will access the database again
   // returns False if key not known to IOVDbSvc
-  bool dropObject(const std::string& key,const bool resetCache=false);
+  virtual
+  bool dropObject(const std::string& key,const bool resetCache=false) override;
 
 
 private:
diff --git a/Database/PersistentDataModel/PersistentDataModel/DataHeader.h b/Database/PersistentDataModel/PersistentDataModel/DataHeader.h
index 1a70e8fd63cf4b98da48e7ce364d298e58054d9d..6d9d2077ce80aa90ddb97514363d13ad151a5629 100755
--- a/Database/PersistentDataModel/PersistentDataModel/DataHeader.h
+++ b/Database/PersistentDataModel/PersistentDataModel/DataHeader.h
@@ -22,6 +22,7 @@
 class IOpaqueAddress;
 namespace SG {
    class TransientAddress;
+   class DataProxy;
 }
 namespace coral {
    class AttributeList;
@@ -37,10 +38,17 @@ public: // Constructor and Destructor
    DataHeaderElement();
    /// Copy Constructor
    DataHeaderElement(const DataHeaderElement& rhs);
+
    /// Constructor
    /// @param sgAddress [IN] pointer to TransientAddress for which a DataHeaderElement is created.
    /// @param pTag [IN] string used as key element in DataHeader (SG key for DataObjects).
    DataHeaderElement(const SG::TransientAddress* sgAddress, IOpaqueAddress* tokAddress, const std::string& pTag);
+
+   /// Constructor
+   /// @param proxy [IN] pointer to DataProxy for which a DataHeaderElement is created.
+   /// @param pTag [IN] string used as key element in DataHeader (SG key for DataObjects).
+   DataHeaderElement(const SG::DataProxy* proxy, IOpaqueAddress* tokAddress, const std::string& pTag);
+
    /// Constructor
    /// @param classID [IN] Primary ClassID of the DataObject for which a DataHeaderElement is created.
    /// @param key [IN] SG Key of the DataObject for which a DataHeaderElement is created.
@@ -82,6 +90,14 @@ private:
    friend class DataHeaderElementCnv_p5;
    friend class DataHeaderElementCnv_p6;
 
+   /// Internal constructor.
+   DataHeaderElement(CLID clid,
+                     const std::string& name,
+                     const std::vector<CLID>& tClids,
+                     std::set<std::string>&& alias,
+                     IOpaqueAddress* tadAddress,
+                     IOpaqueAddress* tokAddress, const std::string& pTag);
+
    /// primary ClassID.
    CLID m_pClid;
    /// set of unsigned long to store ClassID's for symlinked container.
@@ -144,6 +160,10 @@ public: // Non-static members
    /// @param pTag [IN] string to overwrite key meber of the DataHeaderElement
    void insert(const SG::TransientAddress* sgAddress, IOpaqueAddress* tokAddress = 0, const std::string& pTag = "");
    /// Insert a new element into the "DataObject" vector.
+   /// @param proxy [IN] pointer to the DataProxy for the DataObject.
+   /// @param pTag [IN] string to overwrite key meber of the DataHeaderElement
+   void insert(const SG::DataProxy* proxy, IOpaqueAddress* tokAddress = 0, const std::string& pTag = "");
+   /// Insert a new element into the "DataObject" vector.
    /// @param dhe [IN] reference to the DataHeaderElement to be inserted.
    void insert(const DataHeaderElement& dhe);
 
diff --git a/Database/PersistentDataModel/doc/packagedoc.h b/Database/PersistentDataModel/doc/packagedoc.h
index edd4fc5ac07cb14f77b3b625c650db1386e1d302..87cd3d5d953c8adad7c72b39efa65f24c3bc9c2d 100644
--- a/Database/PersistentDataModel/doc/packagedoc.h
+++ b/Database/PersistentDataModel/doc/packagedoc.h
@@ -34,11 +34,9 @@ The code can be browsed using LXR
 (http://alxr.usatlas.bnl.gov/lxr/source/atlas/Database/PersistentDataModel/)
    
 
-@section PersistentDataModel_Requirements Requirements
 
 
 
-@section PersistentDataModel_PackagesUsed Packages Used
 
 
 
diff --git a/Database/PersistentDataModel/src/DataHeader.cxx b/Database/PersistentDataModel/src/DataHeader.cxx
index 6e9643f030374d28c9ea8817849b2324e979a88d..1e99e4ddfa5586999eeb1d5d01e77c6a0fe213c1 100755
--- a/Database/PersistentDataModel/src/DataHeader.cxx
+++ b/Database/PersistentDataModel/src/DataHeader.cxx
@@ -11,6 +11,7 @@
 #include "PersistentDataModel/TokenAddress.h"
 
 #include "SGTools/TransientAddress.h"
+#include "SGTools/DataProxy.h"
 #include "AthenaKernel/IStringPool.h"
 
 //______________________________________________________________________________
@@ -30,34 +31,58 @@ DataHeaderElement::DataHeaderElement(const DataHeaderElement& rhs) : m_pClid(rhs
 }
 //______________________________________________________________________________
 DataHeaderElement::DataHeaderElement(const SG::TransientAddress* sgAddress, IOpaqueAddress* tokAddress,
-	const std::string& pTag) : m_pClid(0), m_clids(), m_key(), m_alias(), m_token(0), m_ownToken(false), m_hashes() {
-   if (sgAddress != 0) {
-      m_pClid = sgAddress->clID();
-      std::set<CLID> tClids = sgAddress->transientID();
-      std::set<CLID>::iterator lastClid = m_clids.begin();
-      for (std::set<CLID>::const_iterator iter = tClids.begin(), last = tClids.end();
-	      iter != last; iter++) {
-         lastClid = m_clids.insert(lastClid, *iter);
-      }
-      m_clids.erase(m_pClid);
-      m_key = (pTag.empty()) ? sgAddress->name() : pTag;
-      m_alias = sgAddress->alias();
-      TokenAddress* tokAddr = dynamic_cast<TokenAddress*>(tokAddress);
-      if (tokAddr != 0 && tokAddr->getToken() != 0) {
-         m_token = new Token(tokAddr->getToken()); m_ownToken = true;
-      } else {
-         tokAddr = dynamic_cast<TokenAddress*>(sgAddress->address());
-         if (tokAddr != 0 && tokAddr->getToken() != 0) {
-            m_token = tokAddr->getToken();
-         } else if (tokAddress != 0) {
-            m_token = new Token; m_ownToken = true;
-            const_cast<Token*>(m_token)->fromString(*(tokAddress->par()));
-         } else if (sgAddress->address() != 0) {
-            m_token = new Token; m_ownToken = true;
-            const_cast<Token*>(m_token)->fromString(*(sgAddress->address()->par()));
-         }
-      }
-   }
+                                     const std::string& pTag)
+  : DataHeaderElement (sgAddress->clID(),
+                       sgAddress->name(),
+                       sgAddress->transientID(),
+                       SG::DataProxy::AliasCont_t (sgAddress->alias()),
+                       sgAddress->address(),
+                       tokAddress, pTag)
+{
+}
+//______________________________________________________________________________
+DataHeaderElement::DataHeaderElement(const SG::DataProxy* proxy, IOpaqueAddress* tokAddress,
+                                     const std::string& pTag)
+  : DataHeaderElement (proxy->clID(),
+                       proxy->name(),
+                       proxy->transientID(),
+                       proxy->alias(),
+                       proxy->address(),
+                       tokAddress, pTag)
+{
+}
+//______________________________________________________________________________
+DataHeaderElement::DataHeaderElement(CLID clid,
+                                     const std::string& name,
+                                     const std::vector<CLID>& tClids,
+                                     std::set<std::string>&& alias,
+                                     IOpaqueAddress* tadAddress,
+                                     IOpaqueAddress* tokAddress,
+                                     const std::string& pTag)
+  : m_pClid(clid),
+    m_clids(tClids.begin(), tClids.end()),
+    m_key((pTag.empty()) ? name : pTag),
+    m_alias(std::move(alias)),
+    m_token(0), m_ownToken(false), m_hashes()
+{
+  m_clids.erase(m_pClid);
+  TokenAddress* tokAddr = dynamic_cast<TokenAddress*>(tokAddress);
+  if (tokAddr != 0 && tokAddr->getToken() != 0) {
+    m_token = new Token(tokAddr->getToken()); m_ownToken = true;
+  } else {
+    tokAddr = dynamic_cast<TokenAddress*>(tadAddress);
+    if (tokAddr != 0 && tokAddr->getToken() != 0) {
+      m_token = tokAddr->getToken();
+    } else if (tokAddress != 0) {
+      Token* token = new Token;
+      m_token = token; m_ownToken = true;
+      token->fromString(*(tokAddress->par()));
+    } else if (tadAddress != 0) {
+      Token* token = new Token;
+      m_token = token; m_ownToken = true;
+      token->fromString(*(tadAddress->par()));
+    }
+  }
 }
 //______________________________________________________________________________
 DataHeaderElement::DataHeaderElement(const CLID classID,
@@ -93,14 +118,9 @@ CLID DataHeaderElement::getPrimaryClassID() const {
 }
 //______________________________________________________________________________
 const std::set<CLID> DataHeaderElement::getClassIDs() const {
-   std::set<CLID> allClids;
-   std::set<CLID>::iterator lastClid = allClids.begin();
-   for (std::set<CLID>::const_iterator iter = m_clids.begin(), last = m_clids.end();
-	   iter != last; iter++) {
-      lastClid = allClids.insert(lastClid, *iter);
-   }
-   allClids.insert(m_pClid);
-   return(allClids);
+  std::set<CLID> allClids (m_clids);
+  allClids.insert(m_pClid);
+  return(allClids);
 }
 //______________________________________________________________________________
 const std::string& DataHeaderElement::getKey() const {
@@ -227,11 +247,14 @@ const std::vector<DataHeaderElement>& DataHeader::elements() const {
 //______________________________________________________________________________
 void DataHeader::insert(const SG::TransientAddress* sgAddress, IOpaqueAddress* tokAddress, const std::string& pTag) {
    if (sgAddress != 0) {
-      DataHeaderElement dhElement(sgAddress, tokAddress, pTag);
-      m_dataHeader.push_back(dhElement);
+      m_dataHeader.emplace_back(sgAddress, tokAddress, pTag);
    }
 }
 //______________________________________________________________________________
+void DataHeader::insert(const SG::DataProxy* proxy, IOpaqueAddress* tokAddress, const std::string& pTag) {
+  m_dataHeader.emplace_back(proxy, tokAddress, pTag);
+}
+//______________________________________________________________________________
 void DataHeader::insert(const DataHeaderElement& dhe) {
    m_dataHeader.push_back(dhe);
 }
diff --git a/Database/PersistentDataModelAthenaPool/doc/packagedoc.h b/Database/PersistentDataModelAthenaPool/doc/packagedoc.h
index 1e9850f66de216bfdb9c2f758bc39073d924ace3..482eff9a70147f279bc80f282854d67c14a88bbe 100644
--- a/Database/PersistentDataModelAthenaPool/doc/packagedoc.h
+++ b/Database/PersistentDataModelAthenaPool/doc/packagedoc.h
@@ -28,11 +28,9 @@ The package Database/AthenaPOOL/AthenaPoolExample contains running examples of a
 reading Data Objects using AthenaPool. 
 
 
-@section PersistentDataModelAthenaPool_Requirements Requirements
 
 
 
-@section PersistentDataModelAthenaPool_PackagesUsed Packages Used
 
 
 
diff --git a/Database/PersistentDataModelAthenaPool/src/DataHeaderCnv.cxx b/Database/PersistentDataModelAthenaPool/src/DataHeaderCnv.cxx
index d2ab1a62233381107b748dcac8185c0d2304b1bf..54424fb6116bf0ee72a7c5a1df9d53af0eef3cfe 100755
--- a/Database/PersistentDataModelAthenaPool/src/DataHeaderCnv.cxx
+++ b/Database/PersistentDataModelAthenaPool/src/DataHeaderCnv.cxx
@@ -55,6 +55,7 @@ StatusCode DataHeaderCnv::updateRep(IOpaqueAddress* pAddress, DataObject* pObjec
    for (unsigned int i = 0; i < dataHeader->elements().size(); i++) {
       m_dhOutForm->next();
    }
+   m_dhOutForm = nullptr;
    std::size_t tagBeg = pAddress->par()[1].find("[KEY=") + 5;
    std::size_t tagSize = pAddress->par()[1].find("]", tagBeg) - tagBeg;
    m_tpOutConverter.insertDHRef(dataHeader, pAddress->par()[1].substr(tagBeg, tagSize), pAddress->par()[0]);
diff --git a/Database/RegistrationServices/doc/packagedoc.h b/Database/RegistrationServices/doc/packagedoc.h
index 4fc52c35acf3760c058f87b733a981597a9ab392..6b3d42c5a1452052f5cffc1a9c068142e4ec108a 100644
--- a/Database/RegistrationServices/doc/packagedoc.h
+++ b/Database/RegistrationServices/doc/packagedoc.h
@@ -389,10 +389,8 @@ classname.
 
 @include OutputConditionsAlg_jobOptions.py
 
-@section RegistrationServices_requirements requirements
 
 
-@section RegistrationServices_uses Packages used
 
 
 
diff --git a/Database/RegistrationServices/src/IOVRegistrationSvc.cxx b/Database/RegistrationServices/src/IOVRegistrationSvc.cxx
index 800c9a1f9b33efb0be1e84052c68164a3d67618b..1207d454f38544721b397d0a7e495880807ecb6c 100755
--- a/Database/RegistrationServices/src/IOVRegistrationSvc.cxx
+++ b/Database/RegistrationServices/src/IOVRegistrationSvc.cxx
@@ -581,18 +581,12 @@ StatusCode IOVRegistrationSvc::registerIOVCOOL( const std::string& typeName,
 	std::string saddr;
 	if (addr) {
   	  // Get symlinks, if any
-	  typedef SG::TransientAddress::TransientClidSet TransientClidSet;
-	  const SG::TransientAddress* tad = proxy->transientAddress();
-	  if (tad) {
-	    const TransientClidSet clids = tad->transientID();
-	    ATH_MSG_DEBUG ("clid size " << clids.size());
-	    TransientClidSet::const_iterator clidIt  = clids.begin();
-	    TransientClidSet::const_iterator clidEnd = clids.end();
-	    for (; clidIt != clidEnd; ++clidIt) {
-	     if (clid != (*clidIt)) symlinks.push_back((*clidIt));
-	     ATH_MSG_DEBUG ("clid  " << (*clidIt));
-	    }
-	  }
+          symlinks = proxy->transientID();
+          auto it = std::find (symlinks.begin(), symlinks.end(), clid);
+          if (it != symlinks.end()) {
+            symlinks.erase (it);
+          }
+
 	  // Check whether the IOA is a CondAttrListCollAddress - if so
 	  // we will store a CondAttrListCollection
 	  CondAttrListCollAddress* collAddr = dynamic_cast<CondAttrListCollAddress*>(addr);
diff --git a/Database/RegistrationServices/src/RegistrationStream.cxx b/Database/RegistrationServices/src/RegistrationStream.cxx
index 99a3e146afcb839ff0ea3a1fed3d152799a5df9c..abc37e36e1094e8d0e9ca44afae7671cea6950fe 100755
--- a/Database/RegistrationServices/src/RegistrationStream.cxx
+++ b/Database/RegistrationServices/src/RegistrationStream.cxx
@@ -411,8 +411,8 @@ StatusCode RegistrationStream::getRefs(std::vector< std::pair<std::string,std::s
 	
         // Update ref token to handle fast merged files.
         SG::DataProxy* dhProxy = evtStore()->proxy(hdr);
-        if (dhProxy != 0 && dhProxy->transientAddress() != 0 && dhProxy->transientAddress()->address() != 0) {
-          ref  = dhProxy->transientAddress()->address()->par()[0];
+        if (dhProxy != 0 && dhProxy->address() != 0) {
+          ref  = dhProxy->address()->par()[0];
         }
 
         ATH_MSG_DEBUG("Pushing back ref " << ref << " for " << ptag);
diff --git a/DetectorDescription/AtlasDetDescr/doc/packagedoc.h b/DetectorDescription/AtlasDetDescr/doc/packagedoc.h
index 99116f6f94675ac4da424b22eba5bd0ff1c6054b..ffc4d7c7b1423559f629fa72fab8f255e1442d69 100644
--- a/DetectorDescription/AtlasDetDescr/doc/packagedoc.h
+++ b/DetectorDescription/AtlasDetDescr/doc/packagedoc.h
@@ -18,10 +18,8 @@ AtlasDetectorID also provides facilities for printing out identifiers,
 e.g. show_to_string, and maintains the version tags.
 
 
-@section AtlasDetDescr_requirements requirements
 
 
-@section AtlasDetDescr_uses Packages used
 
 
 */
diff --git a/DetectorDescription/DetDescrCond/DetDescrCondExample/doc/packagedoc.h b/DetectorDescription/DetDescrCond/DetDescrCondExample/doc/packagedoc.h
index 7073deb2635f9aa7cdd66b93acbfb73c19ba32a4..e70e851c58a45399fa9792900de6365229516f1f 100644
--- a/DetectorDescription/DetDescrCond/DetDescrCondExample/doc/packagedoc.h
+++ b/DetectorDescription/DetDescrCond/DetDescrCondExample/doc/packagedoc.h
@@ -120,10 +120,8 @@ For more details see the ATLAS wiki topic CoolHistograms
 
 @include CoolHistExample_jobOptions.py 
 
-@section DetDescrCondExample_requirements Requirements
 
 
-@section DetDescrCondExample_uses Packages used
 
 
 */
diff --git a/DetectorDescription/DetDescrCond/DetDescrCondTools/doc/packagedoc.h b/DetectorDescription/DetDescrCond/DetDescrCondTools/doc/packagedoc.h
index 841bbf8129e8d450361fc2c01253f46734a625d8..2557662b471744514e166fa2823ace084e0a8980 100644
--- a/DetectorDescription/DetDescrCond/DetDescrCondTools/doc/packagedoc.h
+++ b/DetectorDescription/DetDescrCond/DetDescrCondTools/doc/packagedoc.h
@@ -130,9 +130,6 @@ in AlignableTransform objects in the TDS. It sorts the contents of the
 AlignableTransform objects by Identifier, facilititing rapid access.
 This tool is not widely used, and might be declared obselete.
 
-@section DetDescrCondTools_Req The requirements file:
 
-@section DetDescrCondTools_uses Packages used
 
 */
-
diff --git a/DetectorDescription/DetDescrCond/DetectorStatus/doc/packagedoc.h b/DetectorDescription/DetDescrCond/DetectorStatus/doc/packagedoc.h
index d335a0be22d4583e08c133dfa545ae69d849a46e..0e43c75b43056f2dae0d0f63d071058f70d5f3e3 100644
--- a/DetectorDescription/DetDescrCond/DetectorStatus/doc/packagedoc.h
+++ b/DetectorDescription/DetDescrCond/DetectorStatus/doc/packagedoc.h
@@ -276,10 +276,8 @@ from the conditions database, and write it to file-level meta-data.
 
 @include DetStatusSvc_ToFileMetaData.py
 
-@section DetectorStatus_requirements Package Requirements
 
 
-@section DetectorStatus_uses Packages used
 
 
 */
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..66ff21936ad15074b58a830217942ccdd9658dcd
--- /dev/null
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/GeoModelConfig.py
@@ -0,0 +1,23 @@
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+import GaudiSvc.GaudiSvcConf as GaudiSvcConf
+
+
+
+
+def GeoModelCfg():
+    result=ComponentAccumulator()
+    from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
+    theGeoSvc=GeoModelSvc()
+    result.addService(GeoModelSvc())
+    
+    from DetDescrCnvSvc.DetDescrCnvSvcConf import DetDescrCnvSvc
+    
+    # Specify primary Identifier dictionary to be used
+    result.addService(DetDescrCnvSvc(IdDictName = "IdDictParser/ATLAS_IDS.xml"))
+    
+    evtPersSvc=GaudiSvcConf.EvtPersistencySvc( "EventPersistencySvc" )
+    evtPersSvc.CnvServices += [ "DetDescrCnvSvc" ]
+    result.addService(evtPersSvc)
+
+    return result
+
diff --git a/DetectorDescription/GeoModel/AtlasGeoModel/python/LArGMConfig.py b/DetectorDescription/GeoModel/AtlasGeoModel/python/LArGMConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..a0de2681710ca5128ea27e47e03a2c659dbe2cc3
--- /dev/null
+++ b/DetectorDescription/GeoModel/AtlasGeoModel/python/LArGMConfig.py
@@ -0,0 +1,11 @@
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AtlasGeoModel.GeoModelConfig import GeoModelCfg
+
+def LArGMCfg():
+    result=GeoModelCfg()
+    from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV
+    gm=result.getService("GeoModelSvc")[0]
+    gm.DetectorTools.append(LArDetectorToolNV())
+
+    return result
+
diff --git a/DetectorDescription/GeoModel/GeoModelSvc/cmt/requirements b/DetectorDescription/GeoModel/GeoModelSvc/cmt/requirements
deleted file mode 100755
index 41130b4eaadd0539eb2469eeb95eabbb76d2d901..0000000000000000000000000000000000000000
--- a/DetectorDescription/GeoModel/GeoModelSvc/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package GeoModelSvc
-
-author David Quarrie      <David.Quarrie@cern.ch>
-
-use AtlasPolicy        AtlasPolicy-*
-
-library GeoModelSvc GeoModelSvc.cxx RDBMaterialManager.cxx \
-                    components/GeoModelSvc_entries.cxx components/GeoModelSvc_load.cxx
-
-apply_pattern component_library 
-apply_pattern declare_joboptions files="*.py"
-
-private
-use CxxUtils         CxxUtils-*          Control
-use StoreGate        StoreGate-*         Control
-use SGTools          SGTools-*           Control
-use AthenaKernel     AthenaKernel-*      Control
-use AthenaBaseComps  AthenaBaseComps-*   Control
-use CLIDSvc          CLIDSvc-*           Control
-use GaudiInterface   GaudiInterface-*    External
-use EventInfo        EventInfo-*         Event
-use EventInfoMgt     EventInfoMgt-*      Event
-use GeoModelKernel   GeoModelKernel-*    DetectorDescription/GeoModel
-use RDBAccessSvc     RDBAccessSvc-*      Database/AthenaPOOL
-use GeoModelInterfaces GeoModelInterfaces-* DetectorDescription/GeoModel
-use GeoModelUtilities  GeoModelUtilities-*  DetectorDescription/GeoModel
-
-
diff --git a/DetectorDescription/GeoModel/GeoModelSvc/share/jobOptions.BuildGeometry.py b/DetectorDescription/GeoModel/GeoModelSvc/share/jobOptions.BuildGeometry.py
index ed5f6e632018db240038040cbe695c4f05c52069..6e1f8e603c5e76885f9e9e8dfaba625c0940d13b 100755
--- a/DetectorDescription/GeoModel/GeoModelSvc/share/jobOptions.BuildGeometry.py
+++ b/DetectorDescription/GeoModel/GeoModelSvc/share/jobOptions.BuildGeometry.py
@@ -17,7 +17,7 @@ DetFlags.Lucid_setOn()
 DetFlags.Print()
 
 # GeoModel
-globalflags.DetDescrVersion = "ATLAS-GEO-18-01-03"
+globalflags.DetDescrVersion = "ATLAS-R2-2016-01-00-01"
 from AtlasGeoModel import SetGeometryVersion
 from AtlasGeoModel import GeoModelInit
 
diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx
index 8b8ca26153aecdcd0beea8b81aaaab9eaac80257..9958ab7fba3c2087124b64c226c38912c2ef7883 100755
--- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx
+++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoDbTagSvc.cxx
@@ -65,10 +65,6 @@ StatusCode GeoDbTagSvc::setupTags()
     ATH_MSG_FATAL("Failed to retrieve RDBAccessSvc");
     return StatusCode::FAILURE;
   }
-  if(!rdbAccessSvc->connect()) {
-    ATH_MSG_ERROR("Unable to connect to the Geometry DB");
-    return StatusCode::FAILURE;
-  }
 
   // Get subsystem tags
   m_InDetVersion = (m_InDetVersionOverride.empty() 
@@ -140,6 +136,5 @@ StatusCode GeoDbTagSvc::setupTags()
     }
   }
 
-  rdbAccessSvc->disconnect();
   return StatusCode::SUCCESS;
 }
diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx
index 7d53dc0abb75f77faf8dfe35de12fa333d3796d3..bc505860934814bf23829a5dbb36491cb126069b 100755
--- a/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx
+++ b/DetectorDescription/GeoModel/GeoModelSvc/src/GeoModelSvc.cxx
@@ -274,7 +274,14 @@ StatusCode GeoModelSvc::geoInit()
   }
 
   // Create a material manager
-  StoredMaterialManager *theMaterialManager = new RDBMaterialManager(m_pSvcLocator);
+  StoredMaterialManager *theMaterialManager{nullptr};
+  try{
+    theMaterialManager = new RDBMaterialManager(m_pSvcLocator);
+  }
+  catch(std::runtime_error& e) {
+    ATH_MSG_FATAL(e.what());
+    return StatusCode::FAILURE;
+  }
   ATH_CHECK( m_detStore->record(theMaterialManager,"MATERIALS") );
   
   // Setup the GeoDbTagSvc
diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx
index 9658bd1f856bb609b90e9c04acc1807401a5f868..9082962a454e794cac27b794d15d2fe6ee82ee4c 100755
--- a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx
+++ b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.cxx
@@ -20,9 +20,11 @@
 #include "GaudiKernel/IMessageSvc.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/MsgStream.h"
+#include "AthenaBaseComps/AthCheckMacros.h"
 
 #include <algorithm>
 #include <iostream>
+#include <stdexcept>
 
 bool RDBMaterialManager::s_specialMaterials = false;
 
@@ -130,221 +132,188 @@ int printFullMaterial ( GeoMaterial* &p_material)
 	
 	
 
-RDBMaterialManager::RDBMaterialManager(ISvcLocator* pSvcLocator )
+RDBMaterialManager::RDBMaterialManager(ISvcLocator* pSvcLocator)
+{
+  if(!readMaterialsFromDB(pSvcLocator).isSuccess()) {
+    throw std::runtime_error("RDBMaterialManager failed to read Geometry DB");
+  }
+}
+
+StatusCode RDBMaterialManager::readMaterialsFromDB(ISvcLocator* pSvcLocator)
 {
   IGeoModelSvc*  iGeoModel;		
   IRDBAccessSvc* iAccessSvc;
   MsgStream log(Athena::getMessageSvc(), "GeoModelSvc::RDBMaterialManager"); 		
 
-  StatusCode sc = pSvcLocator->service("GeoModelSvc",iGeoModel);
-  if(sc.isFailure())
-    log << MSG::ERROR << "Unable to access GeoModelSvc" << endmsg;
-  else
-  {
-    sc = pSvcLocator->service("RDBAccessSvc",iAccessSvc);
- 
-    if(sc.isSuccess())
-    {
-      if(iAccessSvc->connect())
-      {
-	// --- Standard materials, elements
-	DecodeVersionKey keyAtlas(iGeoModel, "ATLAS");
-	m_elements = iAccessSvc->getRecordsetPtr("Elements",keyAtlas.tag(),keyAtlas.node());
-	if(m_elements->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting Elements with default tag" <<endmsg;
-	  m_elements = iAccessSvc->getRecordsetPtr("Elements","Materials-00","Materials");
-	}
-	m_stdmatcomponents = iAccessSvc->getRecordsetPtr("StdMatComponents",keyAtlas.tag(),keyAtlas.node());
-	if(m_stdmatcomponents->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting StdMatComponents with default tag" <<endmsg;
-	  m_stdmatcomponents = iAccessSvc->getRecordsetPtr("StdMatComponents","Materials-00","Materials");
-	}
-	m_stdmaterials = iAccessSvc->getRecordsetPtr("StdMaterials",keyAtlas.tag(),keyAtlas.node());
-	if(m_stdmaterials->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting StdMaterials with default tag" <<endmsg;
-	  m_stdmaterials = iAccessSvc->getRecordsetPtr("StdMaterials","Materials-00","Materials");
-	}
-
-	// --- Pixel materials
-	DecodeVersionKey keyPixel(iGeoModel, "Pixel");
-	m_pixmatcomponents = iAccessSvc->getRecordsetPtr("PixMatComponents",keyPixel.tag(),keyPixel.node());
-	if(m_pixmatcomponents->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting PixMatComponents with default tag" <<endmsg;
-	  m_pixmatcomponents = iAccessSvc->getRecordsetPtr("PixMatComponents","PixMatComponents-00");
-	}
-	m_pixmaterials = iAccessSvc->getRecordsetPtr("PixMaterials",keyPixel.tag(),keyPixel.node());
-	if(m_pixmaterials->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting PixMaterials with default tag" <<endmsg;
-	  m_pixmaterials = iAccessSvc->getRecordsetPtr("PixMaterials","PixMaterials-00");
-	}
-
-	// --- Pixel materials for TB
-        m_pixtbmatcomponents = iAccessSvc->getRecordsetPtr("PixelTBMatComponents",keyPixel.tag(),keyPixel.node());
-        if(m_pixtbmatcomponents->size()==0)
-        {
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting PixTBMatComponents with default tag" <<endmsg;
-          m_pixtbmatcomponents = iAccessSvc->getRecordsetPtr("PixMatComponents","PixMatComponents-00");
-        }
-        m_pixtbmaterials = iAccessSvc->getRecordsetPtr("PixelTBMaterials",keyPixel.tag(),keyPixel.node());
-        if(m_pixtbmaterials->size()==0)
-        {
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting PixTBMaterials with default tag" <<endmsg;
-          m_pixtbmaterials = iAccessSvc->getRecordsetPtr("PixMaterials","PixMaterials-00");
-        }
-
-	// --- SCT materials
-	DecodeVersionKey keySCT(iGeoModel, "SCT");
-	m_sctmatcomponents = iAccessSvc->getRecordsetPtr("SCTMatComponents",keySCT.tag(),keySCT.node());
-	if(m_sctmatcomponents->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting SCTMatComponents with default tag" <<endmsg;
-	  m_sctmatcomponents = iAccessSvc->getRecordsetPtr("SCTMatComponents","SCTMatComponents-00");
-	}
+  ATH_CHECK(pSvcLocator->service("GeoModelSvc",iGeoModel));
+  ATH_CHECK(pSvcLocator->service("RDBAccessSvc",iAccessSvc));
 
-	m_sctmaterials = iAccessSvc->getRecordsetPtr("SCTMaterials",keySCT.tag(),keySCT.node());
-	if(m_sctmaterials->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting SCTMaterials with default tag" <<endmsg;
-	  m_sctmaterials = iAccessSvc->getRecordsetPtr("SCTMaterials","SCTMaterials-00");
-	}
-
-	// --- TRT materials
-	DecodeVersionKey keyTRT(iGeoModel, "TRT");
-	m_trtmatcomponents = iAccessSvc->getRecordsetPtr("TrtMatComponents",keyTRT.tag(),keyTRT.node());
-	if(m_trtmatcomponents->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting TrtMatComponents with default tag" <<endmsg;
-	  m_trtmatcomponents = iAccessSvc->getRecordsetPtr("TrtMatComponents","TrtMatComponents-00");
-	}
-	m_trtmaterials = iAccessSvc->getRecordsetPtr("TrtMaterials",keyTRT.tag(),keyTRT.node());
-	if(m_trtmaterials->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting TrtMaterials with default tag" <<endmsg;
-	  m_trtmaterials = iAccessSvc->getRecordsetPtr("TrtMaterials","TrtMaterials-00");
-	}
-
-	// --- InDet common materials
-	DecodeVersionKey keyInDet(iGeoModel, "InnerDetector");
-	m_indetmatcomponents = iAccessSvc->getRecordsetPtr("InDetMatComponents",keyInDet.tag(),keyInDet.node());
-	if(m_indetmatcomponents->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting InDetMatComponents with default tag" <<endmsg;
-	  m_indetmatcomponents = iAccessSvc->getRecordsetPtr("InDetMatComponents","InDetMatComponents-00");
-	}
-
-	m_indetmaterials = iAccessSvc->getRecordsetPtr("InDetMaterials",keyInDet.tag(),keyInDet.node());
-	if(m_indetmaterials->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting InDetMaterials with default tag" <<endmsg;
-	  m_indetmaterials = iAccessSvc->getRecordsetPtr("InDetMaterials","InDetMaterials-00");
-	}
-
-	// --- LAr materials
-	DecodeVersionKey keyLAr(iGeoModel, "LAr");    
-	m_larmatcomponents = iAccessSvc->getRecordsetPtr("LArMatComponents",keyLAr.tag(),keyLAr.node());
-	if(m_larmatcomponents->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting LArMatComponents with default tag" <<endmsg;
-	  m_larmatcomponents = iAccessSvc->getRecordsetPtr("LArMatComponents","LArMatComponents-00");
-	}
-	m_larmaterials = iAccessSvc->getRecordsetPtr("LArMaterials",keyLAr.tag(),keyLAr.node());
-	if(m_larmaterials->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting LArMaterials with default tag" <<endmsg;
-	  m_larmaterials = iAccessSvc->getRecordsetPtr("LArMaterials","LArMaterials-00");
-	}
-
-	// --- Tile materials
-	DecodeVersionKey keyTile(iGeoModel, "TileCal");    
-	m_tilematcomponents = iAccessSvc->getRecordsetPtr("TileMatComponents",keyTile.tag(),keyTile.node());
-	if(m_tilematcomponents->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting TileMatComponents with default tag" <<endmsg;
-	  m_tilematcomponents = iAccessSvc->getRecordsetPtr("TileMatComponents","TileMatComponents-00");
-	}
-	m_tilematerials = iAccessSvc->getRecordsetPtr("TileMaterials",keyTile.tag(),keyTile.node());
-	if(m_tilematerials->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting TileMaterials with default tag" <<endmsg;
-	  m_tilematerials = iAccessSvc->getRecordsetPtr("TileMaterials","TileMaterials-00");
-	}
-
-	// --- Muon
-	DecodeVersionKey keyMuon(iGeoModel, "MuonSpectrometer");
-	m_muomatcomponents = iAccessSvc->getRecordsetPtr("MUOMatComponents",keyMuon.tag(),keyMuon.node());
-	if(m_muomatcomponents->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting MUOMatComponents with default tag" <<endmsg;
-	  m_muomatcomponents = iAccessSvc->getRecordsetPtr("MUOMatComponents","MUOMatComponents-00");
-	}
-	m_muomaterials = iAccessSvc->getRecordsetPtr("MUOMaterials",keyMuon.tag(),keyMuon.node());
-	if(m_muomaterials->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting MUOMaterials with default tag" <<endmsg;
-	  m_muomaterials = iAccessSvc->getRecordsetPtr("MUOMaterials","MUOMaterials-00");  
-	}
-	m_shieldmatcomponents = iAccessSvc->getRecordsetPtr("ShieldMatComponents",keyMuon.tag(),keyMuon.node());
-	if(m_shieldmatcomponents->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting ShieldMatComponents with default tag" <<endmsg;
-	  m_shieldmatcomponents = iAccessSvc->getRecordsetPtr("ShieldMatComponents","ShieldMatComponents-00");
-	}
-	m_shieldmaterials = iAccessSvc->getRecordsetPtr("ShieldMaterials",keyMuon.tag(),keyMuon.node());
-	if(m_shieldmaterials->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting ShieldMaterials with default tag" <<endmsg;
-	  m_shieldmaterials = iAccessSvc->getRecordsetPtr("ShieldMaterials","ShieldMaterials-00");
-	}
-	m_toromatcomponents = iAccessSvc->getRecordsetPtr("ToroMatComponents",keyMuon.tag(),keyMuon.node());
-	if(m_toromatcomponents->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting ToroMatComponents with default tag" <<endmsg;
-	  m_toromatcomponents =	iAccessSvc->getRecordsetPtr("ToroMatComponents","ToroMatComponents-00");
-	}
-	m_toromaterials = iAccessSvc->getRecordsetPtr("ToroMaterials",keyMuon.tag(),keyMuon.node());
-	if(m_toromaterials->size()==0)
-	{
-	  if(log.level()<=MSG::DEBUG)
-	    log << MSG::DEBUG << " Getting ToroMaterials with default tag" <<endmsg; 
-	  m_toromaterials = iAccessSvc->getRecordsetPtr("ToroMaterials","ToroMaterials-00");
-	}
-    
-	iAccessSvc->disconnect();
-      }
-      else
-	log << MSG::ERROR << "Unable to fetch data from the Geometry DB" << endmsg;
-    }
-    else
-      log << MSG::ERROR << "Unable to get RDBAccessSvc" << endmsg;
+  // --- Standard materials, elements
+  DecodeVersionKey keyAtlas(iGeoModel, "ATLAS");
+  m_elements = iAccessSvc->getRecordsetPtr("Elements",keyAtlas.tag(),keyAtlas.node());
+  if(m_elements->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting Elements with default tag" <<endmsg;
+    m_elements = iAccessSvc->getRecordsetPtr("Elements","Materials-00","Materials");
   }
-
+  m_stdmatcomponents = iAccessSvc->getRecordsetPtr("StdMatComponents",keyAtlas.tag(),keyAtlas.node());
+  if(m_stdmatcomponents->size()==0)	{
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting StdMatComponents with default tag" <<endmsg;
+    m_stdmatcomponents = iAccessSvc->getRecordsetPtr("StdMatComponents","Materials-00","Materials");
+  }
+  m_stdmaterials = iAccessSvc->getRecordsetPtr("StdMaterials",keyAtlas.tag(),keyAtlas.node());
+  if(m_stdmaterials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting StdMaterials with default tag" <<endmsg;
+    m_stdmaterials = iAccessSvc->getRecordsetPtr("StdMaterials","Materials-00","Materials");
+  }
+  
+  // --- Pixel materials
+  DecodeVersionKey keyPixel(iGeoModel, "Pixel");
+  m_pixmatcomponents = iAccessSvc->getRecordsetPtr("PixMatComponents",keyPixel.tag(),keyPixel.node());
+  if(m_pixmatcomponents->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting PixMatComponents with default tag" <<endmsg;
+    m_pixmatcomponents = iAccessSvc->getRecordsetPtr("PixMatComponents","PixMatComponents-00");
+  }
+  m_pixmaterials = iAccessSvc->getRecordsetPtr("PixMaterials",keyPixel.tag(),keyPixel.node());
+  if(m_pixmaterials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting PixMaterials with default tag" <<endmsg;
+    m_pixmaterials = iAccessSvc->getRecordsetPtr("PixMaterials","PixMaterials-00");
+  }
+  
+  // --- Pixel materials for TB
+  m_pixtbmatcomponents = iAccessSvc->getRecordsetPtr("PixelTBMatComponents",keyPixel.tag(),keyPixel.node());
+  if(m_pixtbmatcomponents->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting PixTBMatComponents with default tag" <<endmsg;
+    m_pixtbmatcomponents = iAccessSvc->getRecordsetPtr("PixMatComponents","PixMatComponents-00");
+  }
+  m_pixtbmaterials = iAccessSvc->getRecordsetPtr("PixelTBMaterials",keyPixel.tag(),keyPixel.node());
+  if(m_pixtbmaterials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting PixTBMaterials with default tag" <<endmsg;
+    m_pixtbmaterials = iAccessSvc->getRecordsetPtr("PixMaterials","PixMaterials-00");
+  }
+  
+  // --- SCT materials
+  DecodeVersionKey keySCT(iGeoModel, "SCT");
+  m_sctmatcomponents = iAccessSvc->getRecordsetPtr("SCTMatComponents",keySCT.tag(),keySCT.node());
+  if(m_sctmatcomponents->size()==0)	{
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting SCTMatComponents with default tag" <<endmsg;
+    m_sctmatcomponents = iAccessSvc->getRecordsetPtr("SCTMatComponents","SCTMatComponents-00");
+  }
+  
+  m_sctmaterials = iAccessSvc->getRecordsetPtr("SCTMaterials",keySCT.tag(),keySCT.node());
+  if(m_sctmaterials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting SCTMaterials with default tag" <<endmsg;
+    m_sctmaterials = iAccessSvc->getRecordsetPtr("SCTMaterials","SCTMaterials-00");
+  }
+  
+  // --- TRT materials
+  DecodeVersionKey keyTRT(iGeoModel, "TRT");
+  m_trtmatcomponents = iAccessSvc->getRecordsetPtr("TrtMatComponents",keyTRT.tag(),keyTRT.node());
+  if(m_trtmatcomponents->size()==0)	{
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting TrtMatComponents with default tag" <<endmsg;
+    m_trtmatcomponents = iAccessSvc->getRecordsetPtr("TrtMatComponents","TrtMatComponents-00");
+  }
+  m_trtmaterials = iAccessSvc->getRecordsetPtr("TrtMaterials",keyTRT.tag(),keyTRT.node());
+  if(m_trtmaterials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting TrtMaterials with default tag" <<endmsg;
+    m_trtmaterials = iAccessSvc->getRecordsetPtr("TrtMaterials","TrtMaterials-00");
+  }
+  
+  // --- InDet common materials
+  DecodeVersionKey keyInDet(iGeoModel, "InnerDetector");
+  m_indetmatcomponents = iAccessSvc->getRecordsetPtr("InDetMatComponents",keyInDet.tag(),keyInDet.node());
+  if(m_indetmatcomponents->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting InDetMatComponents with default tag" <<endmsg;
+    m_indetmatcomponents = iAccessSvc->getRecordsetPtr("InDetMatComponents","InDetMatComponents-00");
+  }
+  
+  m_indetmaterials = iAccessSvc->getRecordsetPtr("InDetMaterials",keyInDet.tag(),keyInDet.node());
+  if(m_indetmaterials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting InDetMaterials with default tag" <<endmsg;
+    m_indetmaterials = iAccessSvc->getRecordsetPtr("InDetMaterials","InDetMaterials-00");
+  }
+  
+  // --- LAr materials
+  DecodeVersionKey keyLAr(iGeoModel, "LAr");    
+  m_larmatcomponents = iAccessSvc->getRecordsetPtr("LArMatComponents",keyLAr.tag(),keyLAr.node());
+  if(m_larmatcomponents->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting LArMatComponents with default tag" <<endmsg;
+    m_larmatcomponents = iAccessSvc->getRecordsetPtr("LArMatComponents","LArMatComponents-00");
+  }
+  m_larmaterials = iAccessSvc->getRecordsetPtr("LArMaterials",keyLAr.tag(),keyLAr.node());
+  if(m_larmaterials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting LArMaterials with default tag" <<endmsg;
+    m_larmaterials = iAccessSvc->getRecordsetPtr("LArMaterials","LArMaterials-00");
+  }
+  
+  // --- Tile materials
+  DecodeVersionKey keyTile(iGeoModel, "TileCal");    
+  m_tilematcomponents = iAccessSvc->getRecordsetPtr("TileMatComponents",keyTile.tag(),keyTile.node());
+  if(m_tilematcomponents->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting TileMatComponents with default tag" <<endmsg;
+    m_tilematcomponents = iAccessSvc->getRecordsetPtr("TileMatComponents","TileMatComponents-00");
+  }
+  m_tilematerials = iAccessSvc->getRecordsetPtr("TileMaterials",keyTile.tag(),keyTile.node());
+  if(m_tilematerials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting TileMaterials with default tag" <<endmsg;
+    m_tilematerials = iAccessSvc->getRecordsetPtr("TileMaterials","TileMaterials-00");
+  }
+  
+  // --- Muon
+  DecodeVersionKey keyMuon(iGeoModel, "MuonSpectrometer");
+  m_muomatcomponents = iAccessSvc->getRecordsetPtr("MUOMatComponents",keyMuon.tag(),keyMuon.node());
+  if(m_muomatcomponents->size()==0)	{
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting MUOMatComponents with default tag" <<endmsg;
+    m_muomatcomponents = iAccessSvc->getRecordsetPtr("MUOMatComponents","MUOMatComponents-00");
+  }
+  m_muomaterials = iAccessSvc->getRecordsetPtr("MUOMaterials",keyMuon.tag(),keyMuon.node());
+  if(m_muomaterials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting MUOMaterials with default tag" <<endmsg;
+    m_muomaterials = iAccessSvc->getRecordsetPtr("MUOMaterials","MUOMaterials-00");  
+  }
+  m_shieldmatcomponents = iAccessSvc->getRecordsetPtr("ShieldMatComponents",keyMuon.tag(),keyMuon.node());
+  if(m_shieldmatcomponents->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting ShieldMatComponents with default tag" <<endmsg;
+    m_shieldmatcomponents = iAccessSvc->getRecordsetPtr("ShieldMatComponents","ShieldMatComponents-00");
+  }
+  m_shieldmaterials = iAccessSvc->getRecordsetPtr("ShieldMaterials",keyMuon.tag(),keyMuon.node());
+  if(m_shieldmaterials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting ShieldMaterials with default tag" <<endmsg;
+    m_shieldmaterials = iAccessSvc->getRecordsetPtr("ShieldMaterials","ShieldMaterials-00");
+  }
+  m_toromatcomponents = iAccessSvc->getRecordsetPtr("ToroMatComponents",keyMuon.tag(),keyMuon.node());
+  if(m_toromatcomponents->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting ToroMatComponents with default tag" <<endmsg;
+    m_toromatcomponents =	iAccessSvc->getRecordsetPtr("ToroMatComponents","ToroMatComponents-00");
+  }
+  m_toromaterials = iAccessSvc->getRecordsetPtr("ToroMaterials",keyMuon.tag(),keyMuon.node());
+  if(m_toromaterials->size()==0) {
+    if(log.level()<=MSG::WARNING)
+      log << MSG::WARNING << " Getting ToroMaterials with default tag" <<endmsg; 
+    m_toromaterials = iAccessSvc->getRecordsetPtr("ToroMaterials","ToroMaterials-00");
+  }
+  return StatusCode::SUCCESS;
 }
 
 // Destructor:
diff --git a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.h b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.h
index 9db41b4db66fedec1df764a31b55fac462d0b73b..1e0e4d72127c6362d8824e5e423ea24ed9cd7ef7 100755
--- a/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.h
+++ b/DetectorDescription/GeoModel/GeoModelSvc/src/RDBMaterialManager.h
@@ -61,6 +61,9 @@ class RDBMaterialManager: public StoredMaterialManager {
 
  private:
   static bool s_specialMaterials;
+
+  StatusCode readMaterialsFromDB(ISvcLocator* pSvcLocator);
+
   void buildSpecialMaterials();
   void buildSpecialMaterials() const;
 
diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamReader.cxx b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamReader.cxx
index d693d20aff0c3beb96ae605649b0f4fbe584644d..009b8bde83a6aa1104223db4f2e003cb3d824baa 100644
--- a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamReader.cxx
+++ b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamReader.cxx
@@ -15,12 +15,10 @@
 RDBParamReader::RDBParamReader(IRDBAccessSvc* rdbAccess) :
 	m_rdbAccess(rdbAccess)
 {
-	acquire();
 }
 
 
 RDBParamReader::~RDBParamReader() {
-	release();
 }
 
 RDBParamRecords  RDBParamReader::data(const std::string& node, const std::string& tag, const std::string& tag2node) {
@@ -32,12 +30,3 @@ IRDBRecordset_ptr  RDBParamReader::_getRecordsetPtr(const std::string& node, con
 	return m_rdbAccess->getRecordsetPtr(node, tag, tag2node);
 }
 
-void RDBParamReader::acquire() {
-  if (!m_rdbAccess->connect())
-    std::cout << "ERROR: RDBParamReader: cannot connect.\n";
-}
-
-void RDBParamReader::release() {
-	m_rdbAccess->disconnect();
-}
-
diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamReader.h b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamReader.h
index b6ebf5833387a67f0b57397592d7d42c6e9e1f0e..a3ca69b46198ee7fd3a73c38f143328d90628875 100644
--- a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamReader.h
+++ b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamReader.h
@@ -24,9 +24,6 @@ class RDBParamReader {
 		RDBParamRecords  data(const std::string& node, const std::string& tag, const std::string& tag2node="");
 		// for internal use only
 		IRDBRecordset_ptr  _getRecordsetPtr(const std::string& node, const std::string& tag, const std::string& tag2node="");
-		void acquire();
-		void release();
-		
 	private:
 		IRDBAccessSvc* m_rdbAccess;
 };
diff --git a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamRecords.cxx b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamRecords.cxx
index c0b5230b3294c54ebd6be8f21d85681402a58439..e2595d05bee38a7574d3977cede04fad13072a2b 100644
--- a/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamRecords.cxx
+++ b/DetectorDescription/GeoModel/GeoSpecialShapes/src/LArWheelCalculator_Impl/RDBParamRecords.cxx
@@ -15,19 +15,16 @@ RDBParamRecords::RDBParamRecords(RDBParamReader* rdbParAcc, IRDBRecordset_ptr in
 	m_rdbParAcc(rdbParAcc),
 	m_RecSet(initRecSet)
 {
-	m_rdbParAcc->acquire();
 }
 
 RDBParamRecords::RDBParamRecords(const RDBParamRecords& other)
   : m_rdbParAcc (other.m_rdbParAcc),
     m_RecSet (other.m_RecSet)
 {
-  m_rdbParAcc->acquire();
 }
 
 
 RDBParamRecords::~RDBParamRecords() {
-	m_rdbParAcc->release();
 }
 
 RDBParamRecords::self_t & RDBParamRecords::fallback_to(const std::string& node, const std::string& tag, const std::string& tag2node) {
diff --git a/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx b/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx
index 8c47b2b2c67c337a72f271cf08c0dd2c49532d54..d21483e337f6ce8e923784129bf52db7d629a186 100755
--- a/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx
+++ b/DetectorDescription/IdDictDetDescrCnv/src/IdDictDetDescrCnv.cxx
@@ -802,194 +802,183 @@ IdDictDetDescrCnv::getFileNamesFromTags()
     //  inDetCustom = true;
     //} else {
 
-    // Must be sure a connection is open
-    if(rdbAccessSvc->connect()) {
-        // Get InDet
-        DecodeVersionKey detectorKey(geoModelSvc, "InnerDetector");
-        log << MSG::DEBUG << "From Version Tag: " 
-            << detectorKey.tag()  << " at Node: " << detectorKey.node() << endmsg;
-        IRDBRecordset_ptr idDictSet   = rdbAccessSvc->getRecordsetPtr("InDetIdentifier",
-								      detectorKey.tag(), 
-								      detectorKey.node());
-        std::string        dictName;
-        const IRDBRecord*  idDictTable = 0;
-        // Size == 0 if not found
-        if (idDictSet->size()) {
-            idDictTable       = (*idDictSet)[0];
-            dictName          = idDictTable->getString("DICT_NAME");
-            m_inDetIDFileName = idDictTable->getString("DICT_FILENAME");
-            // NOTE: the internal tag for IdDict is global, but is
-            // only used for InDet and thus is defined by InDet
-            if(!idDictTable->isFieldNull("DICT_TAG")) {
-                m_inDetIDTag      = idDictTable->getString("DICT_TAG");
-            }
-            m_inDetIdDictTag  = idDictSet->tagName();
-            log << MSG::DEBUG << " using dictionary:  " << dictName 
-                << ", file: " <<  m_inDetIDFileName  
-                << ", with internal tag: " << m_inDetIDTag
-                << ", dictionary tag: " << m_inDetIdDictTag
-                << endmsg;
-        }
-        else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
-        
-        // Get LAr
-        detectorKey = DecodeVersionKey(geoModelSvc, "LAr");
-        log << MSG::DEBUG << "From Version Tag: " 
-            << detectorKey.tag()  << " at Node: " << detectorKey.node() << endmsg;
-        idDictSet = rdbAccessSvc->getRecordsetPtr("LArIdentifier", 
-                                               detectorKey.tag(), 
-                                               detectorKey.node());
-        // Size == 0 if not found
-        if (idDictSet->size()) {
-            idDictTable      = (*idDictSet)[0];
-            dictName         = idDictTable->getString("DICT_NAME");
-            m_larIDFileName  = idDictTable->getString("DICT_FILENAME");
-            m_larIdDictTag   = idDictSet->tagName();
-            log << MSG::DEBUG << " using Dictionary:  " << dictName 
-                << ", file: " <<  m_larIDFileName
-                << ", dictionary tag: " << m_larIdDictTag
-                << endmsg;
-        }
-        else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
-                        
-
-        // Get Tile
-        detectorKey = DecodeVersionKey(geoModelSvc, "TileCal");
-        log << MSG::DEBUG << "From Version Tag: " 
-            << detectorKey.tag()  << " at Node: " << detectorKey.node() << endmsg;
-        idDictSet = rdbAccessSvc->getRecordsetPtr("TileIdentifier",
-                                               detectorKey.tag(), 
-                                               detectorKey.node());
-        // Size == 0 if not found
-        if (idDictSet->size()) {
-            idDictTable       = (*idDictSet)[0];
-            dictName          = idDictTable->getString("DICT_NAME");
-            m_tileIDFileName  = idDictTable->getString("DICT_FILENAME");
-            m_tileIdDictTag   = idDictSet->tagName();
-            log << MSG::DEBUG << " using Dictionary:  " << dictName  
-                << ", file: " <<  m_tileIDFileName 
-                << ", dictionary tag: " << m_tileIdDictTag
-                << endmsg;
-        }
-        else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
-
-        // Get Calo
-        detectorKey = DecodeVersionKey(geoModelSvc, "Calorimeter");
-        log << MSG::DEBUG << "From Version Tag: " << detectorKey.tag()  
-            << " at Node: " << detectorKey.node() << endmsg;
-        idDictSet = rdbAccessSvc->getRecordsetPtr("CaloIdentifier",
-                                               detectorKey.tag(), 
-                                               detectorKey.node());
-        // Size == 0 if not found
-        if (idDictSet->size()) {
-            idDictTable       = (*idDictSet)[0];
-            dictName          = idDictTable->getString("DICT_NAME");
-            m_caloIDFileName  = idDictTable->getString("DICT_FILENAME");
-            m_caloIdDictTag   = idDictSet->tagName();
-            log << MSG::DEBUG << " using Dictionary:  " << dictName  
-                << ", file: " <<  m_caloIDFileName 
-                << ", dictionary tag: " << m_caloIdDictTag
-                << endmsg;
-        }
-        else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
-
-        // Calo neighbor files:
-        IRDBRecordset_ptr caloNeighborTable = rdbAccessSvc->getRecordsetPtr("CaloNeighborTable",
-                                                                            detectorKey.tag(), 
-                                                                            detectorKey.node());
-        if (caloNeighborTable->size()==0) {
-            caloNeighborTable = rdbAccessSvc->getRecordsetPtr("CaloNeighborTable","CaloNeighborTable-00");
-        }
-        // Size == 0 if not found
-        if (caloNeighborTable->size()) {
-            const IRDBRecord* neighborTable =  (*caloNeighborTable)[0];
-            m_fullAtlasNeighborsName        = neighborTable->getString("FULLATLASNEIGHBORS");
-            m_fcal2dNeighborsName           = neighborTable->getString("FCAL2DNEIGHBORS");
-            m_fcal3dNeighborsNextName       = neighborTable->getString("FCAL3DNEIGHBORSNEXT");
-            m_fcal3dNeighborsPrevName       = neighborTable->getString("FCAL3DNEIGHBORSPREV");
-            m_tileNeighborsName             = neighborTable->getString("TILENEIGHBORS");
-            log << MSG::DEBUG << " using neighbor files:  " << endmsg;
-            log << MSG::DEBUG << "   FullAtlasNeighborsFileName:  " << m_fullAtlasNeighborsName
-                << endmsg;
-            log << MSG::DEBUG << "   FCAL2DNeighborsFileName:     " << m_fcal2dNeighborsName      
-                << endmsg;
-            log << MSG::DEBUG << "   FCAL3DNeighborsNextFileName: " << m_fcal3dNeighborsNextName
-                << endmsg;
-            log << MSG::DEBUG << "   FCAL3DNeighborsPrevFileName: " << m_fcal3dNeighborsPrevName  
-                << endmsg;
-            log << MSG::DEBUG << "   TileNeighborsFileName:       " << m_tileNeighborsName        
-                << endmsg;
-        }
-        else log << MSG::ERROR << " no record set found neighbor file " << endmsg;
-
-
-
-        // Get Muon
-        detectorKey = DecodeVersionKey(geoModelSvc, "MuonSpectrometer");
-        log << MSG::DEBUG << "From Version Tag: " 
-            << detectorKey.tag()  << " at Node: " << detectorKey.node() << endmsg;
-        idDictSet = rdbAccessSvc->getRecordsetPtr("MuonIdentifier",
-                                               detectorKey.tag(), 
-                                               detectorKey.node());
-        // Size == 0 if not found
-        if (idDictSet->size()) {
-            idDictTable       = (*idDictSet)[0];
-            dictName          = idDictTable->getString("DICT_NAME");
-            m_muonIDFileName  = idDictTable->getString("DICT_FILENAME");
-            m_muonIdDictTag   = idDictSet->tagName();
-            log << MSG::DEBUG << " using Dictionary:  " << dictName  
-                << ", file: " <<  m_muonIDFileName 
-                << ", dictionary tag: " << m_muonIdDictTag
-                << endmsg;
-            if (m_muonIDFileName == "") {
-                log << MSG::ERROR << "MuonIDFileName CANNOT be empty " << endmsg;
-                return StatusCode::FAILURE;
-            }
-            else if (m_muonIDFileName == "IdDictMuonSpectrometer.xml") {
-                log << MSG::ERROR << "MuonIDFileName must NOT be IdDictMuonSpectrometer.xml " 
-                    << endmsg;
-                return StatusCode::FAILURE;
-            }
-
-        }
-        else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
-
-        // Get Forward
-        detectorKey = DecodeVersionKey(geoModelSvc, "ForwardDetectors");
-        log << MSG::DEBUG << "From Version Tag: " << detectorKey.tag()
-            << " at Node: " << detectorKey.node() << endmsg;
-        idDictSet = rdbAccessSvc->getRecordsetPtr("ForDetIdentifier",
-                                               detectorKey.tag(), 
-                                               detectorKey.node());
-        // For older datasets use ForDetIdentifier-00 as fallback
-        if (0 == idDictSet->size()) {
-            idDictSet = rdbAccessSvc->getRecordsetPtr("ForDetIdentifier",
-                                                   "ForDetIdentifier-00");
-            log << MSG::DEBUG << " explicitly requesting ForDetIdentifier-00 tag for pre-forward detector data  " 
-                << endmsg;
-        }
-        // Size == 0 if not found
-        if (idDictSet->size()) {
-            idDictTable          = (*idDictSet)[0];
-            dictName             = idDictTable->getString("DICT_NAME");
-            m_forwardIDFileName  = idDictTable->getString("DICT_FILENAME");
-            m_forwardIdDictTag   = idDictSet->tagName();
-            log << MSG::DEBUG << " using Dictionary:  " << dictName  
-                << ", file: " <<  m_forwardIDFileName 
-                << ", dictionary tag: " << m_forwardIdDictTag
-                << endmsg;
-        }
-        else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
+    // Get InDet
+    DecodeVersionKey detectorKey(geoModelSvc, "InnerDetector");
+    log << MSG::DEBUG << "From Version Tag: " 
+	<< detectorKey.tag()  << " at Node: " << detectorKey.node() << endmsg;
+    IRDBRecordset_ptr idDictSet   = rdbAccessSvc->getRecordsetPtr("InDetIdentifier",
+								  detectorKey.tag(), 
+								  detectorKey.node());
+    std::string        dictName;
+    const IRDBRecord*  idDictTable = 0;
+    // Size == 0 if not found
+    if (idDictSet->size()) {
+      idDictTable       = (*idDictSet)[0];
+      dictName          = idDictTable->getString("DICT_NAME");
+      m_inDetIDFileName = idDictTable->getString("DICT_FILENAME");
+      // NOTE: the internal tag for IdDict is global, but is
+      // only used for InDet and thus is defined by InDet
+      if(!idDictTable->isFieldNull("DICT_TAG")) {
+	m_inDetIDTag      = idDictTable->getString("DICT_TAG");
+      }
+      m_inDetIdDictTag  = idDictSet->tagName();
+      log << MSG::DEBUG << " using dictionary:  " << dictName 
+	  << ", file: " <<  m_inDetIDFileName  
+	  << ", with internal tag: " << m_inDetIDTag
+	  << ", dictionary tag: " << m_inDetIdDictTag
+	  << endmsg;
+    }
+    else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
+    
+    // Get LAr
+    detectorKey = DecodeVersionKey(geoModelSvc, "LAr");
+    log << MSG::DEBUG << "From Version Tag: " 
+	<< detectorKey.tag()  << " at Node: " << detectorKey.node() << endmsg;
+    idDictSet = rdbAccessSvc->getRecordsetPtr("LArIdentifier", 
+					      detectorKey.tag(), 
+					      detectorKey.node());
+    // Size == 0 if not found
+    if (idDictSet->size()) {
+      idDictTable      = (*idDictSet)[0];
+      dictName         = idDictTable->getString("DICT_NAME");
+      m_larIDFileName  = idDictTable->getString("DICT_FILENAME");
+      m_larIdDictTag   = idDictSet->tagName();
+      log << MSG::DEBUG << " using Dictionary:  " << dictName 
+	  << ", file: " <<  m_larIDFileName
+	  << ", dictionary tag: " << m_larIdDictTag
+	  << endmsg;
+    }
+    else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
+    
+    
+    // Get Tile
+    detectorKey = DecodeVersionKey(geoModelSvc, "TileCal");
+    log << MSG::DEBUG << "From Version Tag: " 
+	<< detectorKey.tag()  << " at Node: " << detectorKey.node() << endmsg;
+    idDictSet = rdbAccessSvc->getRecordsetPtr("TileIdentifier",
+					      detectorKey.tag(), 
+					      detectorKey.node());
+    // Size == 0 if not found
+    if (idDictSet->size()) {
+      idDictTable       = (*idDictSet)[0];
+      dictName          = idDictTable->getString("DICT_NAME");
+      m_tileIDFileName  = idDictTable->getString("DICT_FILENAME");
+      m_tileIdDictTag   = idDictSet->tagName();
+      log << MSG::DEBUG << " using Dictionary:  " << dictName  
+	  << ", file: " <<  m_tileIDFileName 
+	  << ", dictionary tag: " << m_tileIdDictTag
+	  << endmsg;
+    }
+    else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
+    
+    // Get Calo
+    detectorKey = DecodeVersionKey(geoModelSvc, "Calorimeter");
+    log << MSG::DEBUG << "From Version Tag: " << detectorKey.tag()  
+	<< " at Node: " << detectorKey.node() << endmsg;
+    idDictSet = rdbAccessSvc->getRecordsetPtr("CaloIdentifier",
+					      detectorKey.tag(), 
+					      detectorKey.node());
+    // Size == 0 if not found
+    if (idDictSet->size()) {
+      idDictTable       = (*idDictSet)[0];
+      dictName          = idDictTable->getString("DICT_NAME");
+      m_caloIDFileName  = idDictTable->getString("DICT_FILENAME");
+      m_caloIdDictTag   = idDictSet->tagName();
+      log << MSG::DEBUG << " using Dictionary:  " << dictName  
+	  << ", file: " <<  m_caloIDFileName 
+	  << ", dictionary tag: " << m_caloIdDictTag
+	  << endmsg;
+    }
+    else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
+    
+    // Calo neighbor files:
+    IRDBRecordset_ptr caloNeighborTable = rdbAccessSvc->getRecordsetPtr("CaloNeighborTable",
+									detectorKey.tag(), 
+									detectorKey.node());
+    if (caloNeighborTable->size()==0) {
+      caloNeighborTable = rdbAccessSvc->getRecordsetPtr("CaloNeighborTable","CaloNeighborTable-00");
+    }
+    // Size == 0 if not found
+    if (caloNeighborTable->size()) {
+      const IRDBRecord* neighborTable =  (*caloNeighborTable)[0];
+      m_fullAtlasNeighborsName        = neighborTable->getString("FULLATLASNEIGHBORS");
+      m_fcal2dNeighborsName           = neighborTable->getString("FCAL2DNEIGHBORS");
+      m_fcal3dNeighborsNextName       = neighborTable->getString("FCAL3DNEIGHBORSNEXT");
+      m_fcal3dNeighborsPrevName       = neighborTable->getString("FCAL3DNEIGHBORSPREV");
+      m_tileNeighborsName             = neighborTable->getString("TILENEIGHBORS");
+      log << MSG::DEBUG << " using neighbor files:  " << endmsg;
+      log << MSG::DEBUG << "   FullAtlasNeighborsFileName:  " << m_fullAtlasNeighborsName
+	  << endmsg;
+      log << MSG::DEBUG << "   FCAL2DNeighborsFileName:     " << m_fcal2dNeighborsName      
+	  << endmsg;
+      log << MSG::DEBUG << "   FCAL3DNeighborsNextFileName: " << m_fcal3dNeighborsNextName
+	  << endmsg;
+      log << MSG::DEBUG << "   FCAL3DNeighborsPrevFileName: " << m_fcal3dNeighborsPrevName  
+	  << endmsg;
+      log << MSG::DEBUG << "   TileNeighborsFileName:       " << m_tileNeighborsName        
+	  << endmsg;
+    }
+    else log << MSG::ERROR << " no record set found neighbor file " << endmsg;
+    
+    
+    
+    // Get Muon
+    detectorKey = DecodeVersionKey(geoModelSvc, "MuonSpectrometer");
+    log << MSG::DEBUG << "From Version Tag: " 
+	<< detectorKey.tag()  << " at Node: " << detectorKey.node() << endmsg;
+    idDictSet = rdbAccessSvc->getRecordsetPtr("MuonIdentifier",
+					      detectorKey.tag(), 
+					      detectorKey.node());
+    // Size == 0 if not found
+    if (idDictSet->size()) {
+      idDictTable       = (*idDictSet)[0];
+      dictName          = idDictTable->getString("DICT_NAME");
+      m_muonIDFileName  = idDictTable->getString("DICT_FILENAME");
+      m_muonIdDictTag   = idDictSet->tagName();
+      log << MSG::DEBUG << " using Dictionary:  " << dictName  
+	  << ", file: " <<  m_muonIDFileName 
+	  << ", dictionary tag: " << m_muonIdDictTag
+	  << endmsg;
+      if (m_muonIDFileName == "") {
+	log << MSG::ERROR << "MuonIDFileName CANNOT be empty " << endmsg;
+	return StatusCode::FAILURE;
+      }
+      else if (m_muonIDFileName == "IdDictMuonSpectrometer.xml") {
+	log << MSG::ERROR << "MuonIDFileName must NOT be IdDictMuonSpectrometer.xml " 
+	    << endmsg;
+	return StatusCode::FAILURE;
+      }
+      
+    }
+    else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
+    
+    // Get Forward
+    detectorKey = DecodeVersionKey(geoModelSvc, "ForwardDetectors");
+    log << MSG::DEBUG << "From Version Tag: " << detectorKey.tag()
+	<< " at Node: " << detectorKey.node() << endmsg;
+    idDictSet = rdbAccessSvc->getRecordsetPtr("ForDetIdentifier",
+					      detectorKey.tag(), 
+					      detectorKey.node());
+    // For older datasets use ForDetIdentifier-00 as fallback
+    if (0 == idDictSet->size()) {
+      idDictSet = rdbAccessSvc->getRecordsetPtr("ForDetIdentifier",
+						"ForDetIdentifier-00");
+      log << MSG::DEBUG << " explicitly requesting ForDetIdentifier-00 tag for pre-forward detector data  " 
+	  << endmsg;
+    }
+    // Size == 0 if not found
+    if (idDictSet->size()) {
+      idDictTable          = (*idDictSet)[0];
+      dictName             = idDictTable->getString("DICT_NAME");
+      m_forwardIDFileName  = idDictTable->getString("DICT_FILENAME");
+      m_forwardIdDictTag   = idDictSet->tagName();
+      log << MSG::DEBUG << " using Dictionary:  " << dictName  
+	  << ", file: " <<  m_forwardIDFileName 
+	  << ", dictionary tag: " << m_forwardIdDictTag
+	  << endmsg;
+    }
+    else log << MSG::WARNING << " no record set found - using default dictionary " << endmsg;
                         
-        // Close request for this connection
-        rdbAccessSvc->disconnect();
-    }
-    else {
-        log << MSG::ERROR 
-            << "unable to get connect to database for to get Identifier records" 
-            << endmsg;
-        return (StatusCode::FAILURE);
-    }
 
     log << MSG::DEBUG << "End access to RDB for id dictionary info " << endmsg;
 
diff --git a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelEtaPhiLUT.h b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelEtaPhiLUT.h
index d8acfe72dc1413819f2639f11a6a824b4bba383c..0813bcf9c0232057acca7425e3bc0b0e5a2183c9 100644
--- a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelEtaPhiLUT.h
+++ b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelEtaPhiLUT.h
@@ -142,11 +142,11 @@ private:
 
 
 
-inline std::ostream& operator<<( std::ostream& s, const RegSelEtaPhiLUT& _f ) { 
+inline std::ostream& operator<<( std::ostream& s, const RegSelEtaPhiLUT& f ) { 
 
-  for ( unsigned i=0 ; i<_f.map().size() ; i++ ) { 
+  for ( unsigned i=0 ; i<f.map().size() ; i++ ) { 
 
-    const std::vector< RegSelEtaPhiLUT::map_element >& row = _f.map()[i];
+    const std::vector< RegSelEtaPhiLUT::map_element >& row = f.map()[i];
 
     s << "row " << i << std::endl;
     
diff --git a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelEtaPhiModule.h b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelEtaPhiModule.h
index e48a316497265108bbeabe47340713c0f08bff6a..fb353a3ba61bee6a2c78a2b1d6c5413be6677c16 100644
--- a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelEtaPhiModule.h
+++ b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelEtaPhiModule.h
@@ -104,9 +104,9 @@ protected:
 
 
 
-inline std::ostream& operator<<( std::ostream& s, const EtaPhiBase& _e ) { 
-  s << "[ eta=" << _e.etamin() << " - " << _e.etamax();
-  s << "\tphi=" << 180*_e.phimin()/M_PI << " - " << 180*_e.phimax()/M_PI;
+inline std::ostream& operator<<( std::ostream& s, const EtaPhiBase& e ) { 
+  s << "[ eta=" << e.etamin() << " - " << e.etamax();
+  s << "\tphi=" << 180*e.phimin()/M_PI << " - " << 180*e.phimax()/M_PI;
   s<< " ]";
   return s;
 }
@@ -150,10 +150,10 @@ private:
 /// the payload class needs to have an << streamer defined or
 /// we cannot stream it
 template<class T>
-inline std::ostream& operator<<( std::ostream& s, const TRegSelEtaPhiModule<T>& _e ) { 
-  s << "[ eta= " << _e.etamin() << " - " << _e.etamax();
-  s << "\tphi= " << 180*_e.phimin()/M_PI << " - " << 180*_e.phimax()/M_PI;
-  s << "\tpay= " << _e.payload();
+inline std::ostream& operator<<( std::ostream& s, const TRegSelEtaPhiModule<T>& e ) { 
+  s << "[ eta= " << e.etamin() << " - " << e.etamax();
+  s << "\tphi= " << 180*e.phimin()/M_PI << " - " << 180*e.phimax()/M_PI;
+  s << "\tpay= " << e.payload();
   s << " ]";
   return s;
 }
diff --git a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelLayer.h b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelLayer.h
index 8c275dfc5205b1ae21d79fc7c65d31a076e64668..d8895af1dd9af52b81c0213bde383d0728b1c382 100644
--- a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelLayer.h
+++ b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelLayer.h
@@ -22,8 +22,8 @@
  **************************************************************************/ 
 
 
-#ifndef __REGSELLAYER_H
-#define __REGSELLAYER_H
+#ifndef REGSELLUT_REGSELLAYER_H
+#define REGSELLUT_REGSELLAYER_H
 
 
 #include <vector>
@@ -42,15 +42,14 @@ public:
   
   RegSelLayer() : 
     ZRObject(0,0,0,0), 
-    m_set(false), m_ID(0), m_detID(0), 
-    m_modules(0),   m_disabled(0), m_Nphi(0),  m_Nz(0), m_Nr(0),
-    m_ideltaphi(0), m_ideltaz(0),  m_phiMin(0), m_phiMax(0), m_phimaps(0) { }   
+    m_set(false), m_ID(0),
+    m_modules(0),   m_disabled(0), m_Nphi(0),
+    m_ideltaphi(0), m_phiMin(0), m_phiMax(0), m_phimaps(0) { }   
   
   RegSelLayer(double rmin, double rmax, double zmin, double zmax) :
     ZRObject(rmin, rmax, zmin, zmax), 
-    m_set(true), m_ID(0), m_detID(0), m_modules(0), m_disabled(0), m_Nphi(0),
-    m_Nz(0), m_Nr(0),
-    m_ideltaphi(0), m_ideltaz(0),  m_phiMin(0), m_phiMax(0), m_phimaps(0) { }    
+    m_set(true), m_ID(0), m_modules(0), m_disabled(0), m_Nphi(0),
+    m_ideltaphi(0), m_phiMin(0), m_phiMax(0), m_phimaps(0) { }    
   
   void reset(); 
 
@@ -86,10 +85,10 @@ private:
     // add and cluster module 
     void addModule(const RegSelModule& m);
     // how many phi clusters are there?
-    unsigned size() const { return mN.size(); }
+    unsigned size() const { return m_N.size(); }
   private:
-    std::vector<int>    mN; 
-    std::vector<double> mpositions;
+    std::vector<int>    m_N; 
+    std::vector<double> m_positions;
   };
 
   // driver routine to pick which modules to cluster
@@ -99,7 +98,6 @@ private:
 
   bool m_set;
   int  m_ID;
-  int  m_detID;
 
   std::vector<const RegSelModule*> m_modules;
   std::vector<const RegSelModule*> m_disabled;
@@ -108,11 +106,8 @@ private:
 
 
   int m_Nphi;
-  int m_Nz;
-  int m_Nr;
 
   double m_ideltaphi;
-  double m_ideltaz;
 
   double m_phiMin;
   double m_phiMax; 
@@ -125,14 +120,4 @@ private:
 std::ostream& operator<<(std::ostream& s, const RegSelLayer& layer);
 
 
-#endif  /* __REGSELLAYER_H */
-
-
-
-
-
-
-
-
-
-
+#endif // not REGSELLUT_REGSELLAYER_H
diff --git a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelROB.h b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelROB.h
index 8adb5bc02749a52194ba837989bb487242abae9c..c4e43e5328ad69bc6b6adfbfd3eaa764bd09b984 100644
--- a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelROB.h
+++ b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelROB.h
@@ -59,13 +59,13 @@ protected:
  
 };
 
-inline std::ostream& operator<<( std::ostream& s, const RegSelROB& _r ) { 
-  return s << "[ robID 0x" << std::hex << _r.robID() << std::dec
-	   << "\tr: " << _r.rMin() << " " << _r.rMax()
-	   << "\tz: " << _r.zMin() << " " << _r.zMax()
-	   << "\tphi: " << _r.phiMin() << " " << _r.phiMax() 
-	   << "\teta: " << _r.etaMin() << " " << _r.etaMax() 
-	   << "\tsize " << _r.size() << " ]";
+inline std::ostream& operator<<( std::ostream& s, const RegSelROB& r ) { 
+  return s << "[ robID 0x" << std::hex << r.robID() << std::dec
+	   << "\tr: " << r.rMin() << " " << r.rMax()
+	   << "\tz: " << r.zMin() << " " << r.zMax()
+	   << "\tphi: " << r.phiMin() << " " << r.phiMax() 
+	   << "\teta: " << r.etaMin() << " " << r.etaMax() 
+	   << "\tsize " << r.size() << " ]";
     
 }
 
diff --git a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelRoI.h b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelRoI.h
index 9e6e13ba231389353905c9bee4b2edfc4fc0eb10..1de53c7ea55428547e2fa6a7c728cb15b33d9ed1 100644
--- a/DetectorDescription/RegSelLUT/RegSelLUT/RegSelRoI.h
+++ b/DetectorDescription/RegSelLUT/RegSelLUT/RegSelRoI.h
@@ -41,32 +41,32 @@ public:
 
   ~RegSelRoI() { } 
 
-  double getzMin()   const { return mzMin; } 
-  double getzMax()   const { return mzMax; } 
-  double getphiMin() const { return mphiMin; } 
-  double getphiMax() const { return mphiMax; } 
-  double getetaMin() const { return metaMin; } 
-  double getetaMax() const { return metaMax; } 
-  double getaMin()   const { return maMin; } 
-  double getaMax()   const { return maMax; } 
-  bool   getsplit()  const { return msplit; } 
-
-  double getphiWidth() const { return ( mphiMax>=mphiMin ? mphiMax-mphiMin : mphiMax-mphiMin+2*M_PI ); } 
-  double getzWidth()   const { return mzMax-mzMin; } 
+  double getzMin()   const { return m_zMin; } 
+  double getzMax()   const { return m_zMax; } 
+  double getphiMin() const { return m_phiMin; } 
+  double getphiMax() const { return m_phiMax; } 
+  double getetaMin() const { return m_etaMin; } 
+  double getetaMax() const { return m_etaMax; } 
+  double getaMin()   const { return m_aMin; } 
+  double getaMax()   const { return m_aMax; } 
+  bool   getsplit()  const { return m_split; } 
+
+  double getphiWidth() const { return ( m_phiMax>=m_phiMin ? m_phiMax-m_phiMin : m_phiMax-m_phiMin+2*M_PI ); } 
+  double getzWidth()   const { return m_zMax-m_zMin; } 
 
   // given a radius calculate the min and max z values of the RoI 
-  double getzMin(const double r) const { return  r*maMin+mzMin; } 
-  double getzMax(const double r) const { return  r*maMax+mzMax; } 
+  double getzMin(const double r) const { return  r*m_aMin+m_zMin; } 
+  double getzMax(const double r) const { return  r*m_aMax+m_zMax; } 
 
   // given a z position calculate the min and max r values of the RoI 
-  double getrMin(const double z) const { return (z-mzMin)*minvaMin; } 
-  double getrMax(const double z) const { return (z-mzMax)*minvaMax; } 
+  double getrMin(const double z) const { return (z-m_zMin)*m_invaMin; } 
+  double getrMax(const double z) const { return (z-m_zMax)*m_invaMax; } 
 
   
   /// find the min eta limits for an object fully contained 
   /// within an roi, bounded with the specifed radius
   double etaMinLimit(double r) const {
-    double x = r*maMin-getzWidth();
+    double x = r*m_aMin-getzWidth();
     if ( x==0 ) return 0;
     double tantheta = r/x;
     double theta = std::atan(tantheta);
@@ -77,7 +77,7 @@ public:
   /// find the max eta limits for an object fully contained 
   /// within an roi, bounded with the specifed radius
   double etaMaxLimit(double r) const { 
-    double x = r*maMax+getzWidth();
+    double x = r*m_aMax+getzWidth();
     if ( x==0 ) return 0;
     double tantheta = r/x;
     double theta = std::atan(tantheta);
@@ -87,13 +87,13 @@ public:
 
 private:
 
-  double mzMin,    mzMax;    // z positions at front and back of RoI
-  double mphiMin,  mphiMax;  // phi at either side
-  double metaMin,  metaMax;  // eta at front and back
-  double minvaMin, minvaMax; // gradient dr/dz
-  double maMin,    maMax;    // gradient dz/dr 
+  double m_zMin,    m_zMax;    // z positions at front and back of RoI
+  double m_phiMin,  m_phiMax;  // phi at either side
+  double m_etaMin,  m_etaMax;  // eta at front and back
+  double m_invaMin, m_invaMax; // gradient dr/dz
+  double m_aMin,    m_aMax;    // gradient dz/dr 
 
-  bool   msplit;             // is the roi split over the pi boundary
+  bool   m_split;             // is the roi split over the pi boundary
 
 };
 
diff --git a/DetectorDescription/RegSelLUT/src/RegSelEtaPhiLUT.cxx b/DetectorDescription/RegSelLUT/src/RegSelEtaPhiLUT.cxx
index d0425a4cf5664ccf76f43de24049ba915fbd2181..a5f0291a8975053b891d762e3763d1be39c15c5e 100644
--- a/DetectorDescription/RegSelLUT/src/RegSelEtaPhiLUT.cxx
+++ b/DetectorDescription/RegSelLUT/src/RegSelEtaPhiLUT.cxx
@@ -44,7 +44,7 @@ RegSelEtaPhiLUT::RegSelEtaPhiLUT(int Neta, int Nphi) :
   m_ideta = m_Neta/(m_etamax-m_etamin);    
   m_idphi = m_Nphi/(m_phimax-m_phimin);
     
-  std::vector< std::vector< map_element > >& _map = m_grandmap.payload();
+  std::vector< std::vector< map_element > >& themap = m_grandmap.payload();
   
   //  std::cout << "RegSelEtaPhiUT::RegSelEtaPhiLUT() Neta " << Neta << "\tNphi " << Nphi << std::endl;
 
@@ -52,22 +52,22 @@ RegSelEtaPhiLUT::RegSelEtaPhiLUT(int Neta, int Nphi) :
   
   for ( int i=0 ; i<m_Neta ; i++ ) { 
     
-    double _etamin = m_etamin+i/m_ideta;
-    double _etamax = m_etamin+(i+1)/m_ideta;
+    double etamin = m_etamin+i/m_ideta;
+    double etamax = m_etamin+(i+1)/m_ideta;
     
       std::vector< map_element > row;
       
       for ( int j=0 ; j<m_Nphi ; j++ ) { 
-	double _phimin = m_phimin+j/m_idphi;
-	double _phimax = m_phimin+(j+1)/m_idphi;
+	double phimin = m_phimin+j/m_idphi;
+	double phimax = m_phimin+(j+1)/m_idphi;
 	
-	map_element m( _etamin, _etamax, _phimin, _phimax, empty_set );
+	map_element m( etamin, etamax, phimin, phimax, empty_set );
 	
 	row.push_back( m ); 
 	
       }
       
-      _map.push_back( row ); 
+      themap.push_back( row ); 
       
   }
   
@@ -89,7 +89,7 @@ bool RegSelEtaPhiLUT::addModule( EtaPhiModule& m ) {
 
   //    std::cout << "adding... " << m << std::endl;
 
-  static std::vector< std::vector< map_element > >& _map = m_grandmap.payload();
+  static std::vector< std::vector< map_element > >& themap = m_grandmap.payload();
   
   int first_eta = (m.etamin()-m_etamin)*m_ideta;
   int last_eta  = (m.etamax()-m_etamin)*m_ideta;
@@ -115,13 +115,13 @@ bool RegSelEtaPhiLUT::addModule( EtaPhiModule& m ) {
   /// does it overlap phi boundary? 
   if ( first_phi<last_phi ) { 
     for ( int i=int(first_eta) ; i<=last_eta ; i++ ) { 
-      for ( int j=int(first_phi) ; j<=last_phi ; j++ ) _map[i][j].payload().insert( m );
+      for ( int j=int(first_phi) ; j<=last_phi ; j++ ) themap[i][j].payload().insert( m );
     }
   }
   else { 
     for ( int i=int(first_eta) ; i<=last_eta ; i++ ) { 
-      for ( int j=0 ; j<=int(last_phi) ; j++ ) _map[i][j].payload().insert( m );
-      for ( int j=first_phi ; j<m_Nphi ; j++ ) _map[i][j].payload().insert( m );
+      for ( int j=0 ; j<=int(last_phi) ; j++ ) themap[i][j].payload().insert( m );
+      for ( int j=first_phi ; j<m_Nphi ; j++ ) themap[i][j].payload().insert( m );
     }
   }
   
@@ -202,18 +202,18 @@ const EtaPhiBase RegSelEtaPhiLUT::getElements( const RegSelRoI& roi,
     if ( last_phi<0 )       last_phi += m_Nphi;
     if ( last_phi>=m_Nphi ) last_phi -= m_Nphi;
 
-    static const std::vector< std::vector< map_element > >& _map = map();
+    static const std::vector< std::vector< map_element > >& themap = map();
 
     /// does the roi overlap the phi boundary? 
     if ( first_phi<last_phi ) { 
       for ( int i=first_eta ; i<=last_eta ; i++ ) { 
-	getRowElements( virtual_roi, _map[i], first_phi, last_phi, modules );
+	getRowElements( virtual_roi, themap[i], first_phi, last_phi, modules );
       }
     }
     else { 
       for ( int i=first_eta ; i<=last_eta ; i++ ) { 
-	getRowElements( virtual_roi, _map[i], 0,        last_phi, modules );
-	getRowElements( virtual_roi, _map[i], first_phi, m_Nphi-1,  modules );
+	getRowElements( virtual_roi, themap[i], 0,        last_phi, modules );
+	getRowElements( virtual_roi, themap[i], first_phi, m_Nphi-1,  modules );
       }
     }
     
diff --git a/DetectorDescription/RegSelLUT/src/RegSelLayer.cxx b/DetectorDescription/RegSelLUT/src/RegSelLayer.cxx
index 9729565ac2fb946dba0a762e6828e3955a50baee..9ff67fa9f45dba940a5d9b2a45d295885841db89 100644
--- a/DetectorDescription/RegSelLUT/src/RegSelLayer.cxx
+++ b/DetectorDescription/RegSelLUT/src/RegSelLayer.cxx
@@ -97,25 +97,25 @@ void RegSelLayer::PhiCluster::addModule(const RegSelModule& m) {
   double start   = pmin;
   
   bool notoverlaping = true;
-  for ( int i=mpositions.size() ; i-- ; ) { 
+  for ( int i=m_positions.size() ; i-- ; ) { 
     
-     double _delphi = mpositions[i]-start;
+     double delphi = m_positions[i]-start;
     
-     if ( _delphi>M_PI  ) start+=M_TWOPI;
-     if ( _delphi<-M_PI ) start-=M_TWOPI;
+     if ( delphi>M_PI  ) start+=M_TWOPI;
+     if ( delphi<-M_PI ) start-=M_TWOPI;
     
-     if ( std::fabs(mpositions[i]-start)<overlap ) {  
-        mpositions[i] = mpositions[i]*mN[i]+start;
-	mN[i]++;
-	mpositions[i] /= mN[i];
+     if ( std::fabs(m_positions[i]-start)<overlap ) {  
+        m_positions[i] = m_positions[i]*m_N[i]+start;
+	m_N[i]++;
+	m_positions[i] /= m_N[i];
 	notoverlaping = false;
 	break;
       }
   }
 
   if ( notoverlaping ) {  
-    mN.push_back(1);
-    mpositions.push_back(start);  
+    m_N.push_back(1);
+    m_positions.push_back(start);  
   }
 
 }
@@ -351,14 +351,14 @@ void RegSelLayer::createMaps() {
   //  std::map<const RegSelModule*, const RegSelModule*> tmap;
   std::set<const RegSelModule*> tmap;
   
-  double _rmax = 0;
+  double rmax = 0;
 
   std::vector<const RegSelModule*>::const_iterator mptr(m_modules.begin());
   for ( ; mptr!=m_modules.end() ; mptr++ ) {
     
     double phicent = 0.5*((*mptr)->phiMax()+(*mptr)->phiMin());
     
-    if ( (*mptr)->rMax()>_rmax ) _rmax = (*mptr)->rMax();
+    if ( (*mptr)->rMax()>rmax ) rmax = (*mptr)->rMax();
 
     // if cell spans pi boundary
     if ( (*mptr)->phiMax()<(*mptr)->phiMin() ) phicent += M_PI;
diff --git a/DetectorDescription/RegSelLUT/src/RegSelModule.cxx b/DetectorDescription/RegSelLUT/src/RegSelModule.cxx
index 2f67ea240b9392a5754895b160f7c9b342ad0b44..0022cf2808b7dd7ac9ec2c1d3ff1156c5368cb3d 100644
--- a/DetectorDescription/RegSelLUT/src/RegSelModule.cxx
+++ b/DetectorDescription/RegSelLUT/src/RegSelModule.cxx
@@ -112,7 +112,7 @@ std::ostream& operator<<(std::ostream& s, const RegSelModule& m)
 
 bool getModule(std::istream& s, RegSelModule& m)
 {
-  char _s[128], _s1[128], _s2[128]; 
+  char sbuf[128], s1buf[128], s2buf[128]; 
 
   int layer;
   int detector;
@@ -126,26 +126,26 @@ bool getModule(std::istream& s, RegSelModule& m)
   //  IdentifierHash hash;
   unsigned int hashint;
 
-  s >> _s >> _s >> std::dec >> layer 
-    >> _s >> _s >> std::dec >> detector 
-    >> _s >> _s >> rMin    >> _s >> rMax  
-    >> _s >> _s >> phiMin  >> _s >> phiMax  
-    >> _s >> _s >> zMin    >> _s >> zMax;
+  s >> sbuf >> sbuf >> std::dec >> layer 
+    >> sbuf >> sbuf >> std::dec >> detector 
+    >> sbuf >> sbuf >> rMin    >> sbuf >> rMax  
+    >> sbuf >> sbuf >> phiMin  >> sbuf >> phiMax  
+    >> sbuf >> sbuf >> zMin    >> sbuf >> zMax;
  
   /// copy z limits to max radius values just in case
   z2Min = zMin;
   z2Max = zMax;
   
-  s >> _s1 >> _s2;
+  s >> s1buf >> s2buf;
 
   /// read in extra z limits if required
-  if ( std::string(_s2)=="z2=" ) { 
-    s >> z2Min    >> _s >> z2Max;
-    s >> _s >> _s;
+  if ( std::string(s2buf)=="z2=" ) { 
+    s >> z2Min    >> sbuf >> z2Max;
+    s >> sbuf >> sbuf;
   }
 
   s >> std::hex >> robid 
-    >> _s >> _s >> std::hex >> hashint >> std::dec >> _s;
+    >> sbuf >> sbuf >> std::hex >> hashint >> std::dec >> sbuf;
 
   if ( s.fail() ) return false;
   
@@ -154,18 +154,14 @@ bool getModule(std::istream& s, RegSelModule& m)
   phiMin *= M_PI/180;   
   phiMax *= M_PI/180;   
 
-  RegSelModule _m( zMin,   zMax, 
-		   z2Min,  z2Max, 
-		   rMin,   rMax, 
-		   phiMin, phiMax, 
-		   layer, 
-		   detector, 
-		   robid, 
-		   IdentifierHash(hashint));
-  
-  m=_m;
-
-  //  std::cout << _m << std::endl;
+  m = RegSelModule( zMin,   zMax, 
+                    z2Min,  z2Max, 
+                    rMin,   rMax, 
+                    phiMin, phiMax, 
+                    layer, 
+                    detector, 
+                    robid, 
+                    IdentifierHash(hashint));
 
   return true;
 }  
diff --git a/DetectorDescription/RegSelLUT/src/RegSelRoI.cxx b/DetectorDescription/RegSelLUT/src/RegSelRoI.cxx
index 66e523b9bb1585b5e20f2360230646871ab6abcf..c7473fa2073819ee792be99575b843ee5f05b503 100644
--- a/DetectorDescription/RegSelLUT/src/RegSelRoI.cxx
+++ b/DetectorDescription/RegSelLUT/src/RegSelRoI.cxx
@@ -31,35 +31,35 @@ static const double M_2PI = 2*M_PI;
 RegSelRoI::RegSelRoI(double zMin,   double zMax, 
 		     double phiMin, double phiMax, 
 		     double etaMin, double etaMax) 
-  : mzMin(zMin),     mzMax(zMax), 
-    mphiMin(phiMin), mphiMax(phiMax), 
-    metaMin(etaMin), metaMax(etaMax),
-    msplit(false)
+  : m_zMin(zMin),     m_zMax(zMax), 
+    m_phiMin(phiMin), m_phiMax(phiMax), 
+    m_etaMin(etaMin), m_etaMax(etaMax),
+    m_split(false)
 {
   // calculate and store inverses
-  minvaMin = std::tan(2*atan(exp(-metaMin)));
-  minvaMax = std::tan(2*atan(exp(-metaMax)));
-  maMin = 1/minvaMin;
-  maMax = 1/minvaMax;
+  m_invaMin = std::tan(2*atan(exp(-m_etaMin)));
+  m_invaMax = std::tan(2*atan(exp(-m_etaMax)));
+  m_aMin = 1/m_invaMin;
+  m_aMax = 1/m_invaMax;
 
   // AAARGH!!!! Check that the roi is in the correct range 
-  double deltaphi = mphiMax-mphiMin;
+  double deltaphi = m_phiMax-m_phiMin;
 
-  if ( mphiMax<mphiMin ) deltaphi+=M_2PI;
+  if ( m_phiMax<m_phiMin ) deltaphi+=M_2PI;
 
   if ( std::fabs(deltaphi-M_2PI)>1e-10 ) { 
-    if ( mphiMin> M_PI ) mphiMin -= M_2PI;
-    if ( mphiMin<-M_PI ) mphiMin += M_2PI;
+    if ( m_phiMin> M_PI ) m_phiMin -= M_2PI;
+    if ( m_phiMin<-M_PI ) m_phiMin += M_2PI;
     
-    if ( mphiMax> M_PI ) mphiMax -= M_2PI;
-    if ( mphiMax<-M_PI ) mphiMax += M_2PI;
+    if ( m_phiMax> M_PI ) m_phiMax -= M_2PI;
+    if ( m_phiMax<-M_PI ) m_phiMax += M_2PI;
   }
   else { 
-    mphiMin = -M_PI;
-    mphiMax =  M_PI;
+    m_phiMin = -M_PI;
+    m_phiMax =  M_PI;
   }  
 
-  msplit = (mphiMax<mphiMin);
+  m_split = (m_phiMax<m_phiMin);
 
 }
 
diff --git a/DetectorDescription/RegSelLUT/src/RegSelSiLUT.cxx b/DetectorDescription/RegSelLUT/src/RegSelSiLUT.cxx
index 181d33655b197f80627342f02ddecfcc8d212b4a..fd387e2036265f84fbbccbbebfe9e5f08ff54343 100644
--- a/DetectorDescription/RegSelLUT/src/RegSelSiLUT.cxx
+++ b/DetectorDescription/RegSelLUT/src/RegSelSiLUT.cxx
@@ -403,14 +403,14 @@ bool RegSelSiLUT::getRoIData(const RegSelRoI& roi, std::vector<const RegSelModul
 
 	//	std::cout << layers[j] << "\tphimin=" << phimin << "\tphimax=" << phimax << std::endl;
 	
-	RegSelRoI _roi( roi.getzMin(), roi.getzMax(), phimin, phimax, roi.getetaMin(), roi.getetaMax() ); 
+	RegSelRoI selroi( roi.getzMin(), roi.getzMax(), phimin, phimax, roi.getetaMin(), roi.getetaMax() ); 
        
 	
-	bool inLayer = layers[j].inRoI(_roi);
+	bool inLayer = layers[j].inRoI(selroi);
 
 	inDet |= inLayer;
 	
-	if ( inLayer ) layers[j].getModules(_roi, modules);
+	if ( inLayer ) layers[j].getModules(selroi, modules);
 	
       } 
 
@@ -485,13 +485,13 @@ bool RegSelSiLUT::getRoIData(const RegSelRoI& roi, unsigned subdetector, unsigne
 	//      std::cout << layers[j] << "\tphimin=" << phimin << "\tphimax=" << phimax << std::endl;
 	//	std::cout << "lyr[" << subdetector << "] " << "\tphimin=" << phimin << "\tphimax=" << phimax << std::endl;
 
-	RegSelRoI _roi( roi.getzMin(), roi.getzMax(), phimin, phimax, roi.getetaMin(), roi.getetaMax() ); 
+	RegSelRoI selroi( roi.getzMin(), roi.getzMax(), phimin, phimax, roi.getetaMin(), roi.getetaMax() ); 
        
-	bool inLayer = layers[layer].inRoI(_roi);
+	bool inLayer = layers[layer].inRoI(selroi);
 
 	inDet |= inLayer;
 	
-	if ( inLayer ) layers[layer].getModules(_roi, modules);
+	if ( inLayer ) layers[layer].getModules(selroi, modules);
 	
       } 
     }
diff --git a/DetectorDescription/RegionSelector/RegionSelector/RegSelectorHashMap.h b/DetectorDescription/RegionSelector/RegionSelector/RegSelectorHashMap.h
index bfbd7dc3943fdde3c060e4bb6a4ea40d28fb67fd..9d9047e67271998552269b048d31af6940c9d872 100755
--- a/DetectorDescription/RegionSelector/RegionSelector/RegSelectorHashMap.h
+++ b/DetectorDescription/RegionSelector/RegionSelector/RegSelectorHashMap.h
@@ -101,8 +101,6 @@ class RegSelectorHashMap{
   std::vector<std::vector<uint32_t> > m_robId;
   double m_etaminDet, m_etamaxDet;
   double m_phiminDet, m_phimaxDet;
-  double m_numCols, m_numLines;
-  double m_phiMinVal, m_etaMinVal;
   int m_NumSamples;
   int m_iColumns, m_iLines;
   bool m_readFromFile;
diff --git a/DetectorDescription/RegionSelector/doc/packagedoc.h b/DetectorDescription/RegionSelector/doc/packagedoc.h
index 4d106d44cce0a94bb894d80659634bc658950df5..eefd738513cc95ba0364af4cd5bb7924849f96c4 100644
--- a/DetectorDescription/RegionSelector/doc/packagedoc.h
+++ b/DetectorDescription/RegionSelector/doc/packagedoc.h
@@ -108,17 +108,6 @@ RegionSelector has the following properties:
 
 Note that RegionSelector has a run-time dependency on InnerDetector and Calo tools which produce the lookup tables it needs. These tools will automatically be configured and invoked by the RegSelSvc if the relevant @c enable flags are on.
 
-@ref used_MyPackage
 
-@ref requirements_MyPackage
 
 */
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-*/
-
diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
index 30ef68ad454eee74564ac5d584bf0db6033a2108..e8e5b7c5303203c3228b67144d7d4d1a6766cfcc 100755
--- a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
+++ b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
@@ -779,35 +779,35 @@ void RegSelSvc::getRoIData(DETID detectorID,
   //  std::cout << "RegSelSvc::getRoIData()" << detectorID << std::endl; 
 
 
-  RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+  RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
 
   switch(detectorID){
   case PIXEL: { // Pixel
-    if ( m_newpixel) m_newpixel->getRoIData( _roi, modules );
+    if ( m_newpixel) m_newpixel->getRoIData( selroi, modules );
     break;    
   }
   case SCT:  { // Semiconductor Tracker
-    if ( m_newsct ) m_newsct->getRoIData( _roi, modules );    
+    if ( m_newsct ) m_newsct->getRoIData( selroi, modules );    
     break;
   }
   case TRT:  { // TRT
-    if ( m_newtrt ) m_newtrt->getRoIData( _roi, modules );    
+    if ( m_newtrt ) m_newtrt->getRoIData( selroi, modules );    
     break;
   }
   case RPC: { // RPC (obviously)
-    if ( m_newrpc ) m_newrpc->getRoIData(_roi, modules); 
+    if ( m_newrpc ) m_newrpc->getRoIData(selroi, modules); 
     break;
   }
   case MDT: { // MDT (obviously)
-    if ( m_newmdt ) m_newmdt->getRoIData(_roi, modules); 
+    if ( m_newmdt ) m_newmdt->getRoIData(selroi, modules); 
     break;
   }
   case TGC: { // TGC (obviously)
-    if ( m_newtgc ) m_newtgc->getRoIData(_roi, modules); 
+    if ( m_newtgc ) m_newtgc->getRoIData(selroi, modules); 
     break;
   }
   case CSC: { // CSC (obviously)
-    if ( m_newcsc ) m_newcsc->getRoIData(_roi, modules); 
+    if ( m_newcsc ) m_newcsc->getRoIData(selroi, modules); 
     break;
   }
   default:
@@ -857,43 +857,43 @@ void RegSelSvc::DetHashIDList(DETID detectorID,
 
   switch(detectorID){
   case PIXEL: { // Pixel    
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newpixel ) m_newpixel->getHashList(_roi, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newpixel ) m_newpixel->getHashList(selroi, IDList); 
     break;
   }
   case SCT: { // Semiconductor Tracker (and pixel)
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newsct ) m_newsct->getHashList(_roi, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newsct ) m_newsct->getHashList(selroi, IDList); 
     break;
   }
   case TRT: { // TRT (obviously)
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtrt ) m_newtrt->getHashList(_roi, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newtrt ) m_newtrt->getHashList(selroi, IDList); 
     break;
   }
   case MDT: { // etc
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newmdt ) m_newmdt->getHashList(_roi, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newmdt ) m_newmdt->getHashList(selroi, IDList); 
     break;
   }
   case RPC: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newrpc ) m_newrpc->getHashList(_roi, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newrpc ) m_newrpc->getHashList(selroi, IDList); 
     break;
   }
   case TGC: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtgc ) m_newtgc->getHashList(_roi, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newtgc ) m_newtgc->getHashList(selroi, IDList); 
     break;
   }
   case CSC: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newcsc ) m_newcsc->getHashList(_roi, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newcsc ) m_newcsc->getHashList(selroi, IDList); 
     break;
   }
   case FTK: { // FTK    
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_ftklut ) m_ftklut->getHashList(_roi, IDList); 
+    RegSelRoI roi2( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_ftklut ) m_ftklut->getHashList(roi2, IDList); 
     break;
   }
   case LAR: {  // Liquid Argon Calorimeter
@@ -963,43 +963,43 @@ void RegSelSvc::DetHashIDList(DETID detectorID, long layer,
 
   switch(detectorID){
   case PIXEL: { // Pixel    
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newpixel ) m_newpixel->getHashList(_roi, layer, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newpixel ) m_newpixel->getHashList(selroi, layer, IDList); 
     break;
   }
   case SCT: { // Semiconductor Tracker 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newsct ) m_newsct->getHashList(_roi, layer, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newsct ) m_newsct->getHashList(selroi, layer, IDList); 
     break;
   }
   case TRT: { // TRT (obviously)
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtrt ) m_newtrt->getHashList(_roi, layer, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newtrt ) m_newtrt->getHashList(selroi, layer, IDList); 
     break;
   }
   case MDT: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newmdt ) m_newmdt->getHashList(_roi, layer, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newmdt ) m_newmdt->getHashList(selroi, layer, IDList); 
     break;
   }
   case RPC: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newrpc ) m_newrpc->getHashList(_roi, layer, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newrpc ) m_newrpc->getHashList(selroi, layer, IDList); 
     break;
   }
   case TGC: {
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtgc ) m_newtgc->getHashList(_roi, layer, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newtgc ) m_newtgc->getHashList(selroi, layer, IDList); 
     break;
   }
   case CSC: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newcsc ) m_newcsc->getHashList(_roi, layer, IDList); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newcsc ) m_newcsc->getHashList(selroi, layer, IDList); 
     break;
   }
   case FTK: { // FTK    
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_ftklut ) m_ftklut->getHashList(_roi, layer, IDList); 
+    RegSelRoI roi2( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_ftklut ) m_ftklut->getHashList(roi2, layer, IDList); 
     break;
   }
   case LAR: { // Liquid Argon Calorimeter
@@ -1241,43 +1241,43 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID,
 
   switch (detectorID) {
   case PIXEL: { // Pixel
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newpixel ) m_newpixel->getRobList(_roi, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newpixel ) m_newpixel->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case SCT: {  // SCT
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newsct ) m_newsct->getRobList(_roi, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newsct ) m_newsct->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case TRT: {  // TRT
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtrt ) m_newtrt->getRobList(_roi, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newtrt ) m_newtrt->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case MDT: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newmdt ) m_newmdt->getRobList(_roi, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newmdt ) m_newmdt->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case RPC: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newrpc ) m_newrpc->getRobList(_roi, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newrpc ) m_newrpc->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case TGC: {
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtgc ) m_newtgc->getRobList(_roi, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newtgc ) m_newtgc->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case CSC: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newcsc ) m_newcsc->getRobList(_roi, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newcsc ) m_newcsc->getRobList(selroi, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case FTK: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_ftklut ) m_ftklut->getRobList(_roi, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI roi2( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_ftklut ) m_ftklut->getRobList(roi2, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case LAR: {  // Liquid Argon Calorimeter
@@ -1348,43 +1348,43 @@ void RegSelSvc::DetROBIDListUint(DETID detectorID, long layer,
 
   switch (detectorID) {
   case PIXEL: { // Pixel
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newpixel ) m_newpixel->getRobList(_roi, layer, outputROBIDList, m_duplicateRemoval );
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newpixel ) m_newpixel->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval );
     break;
   }
   case SCT: {  // SCT
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newsct ) m_newsct->getRobList(_roi, layer, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newsct ) m_newsct->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case TRT: { // TRT
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtrt ) m_newtrt->getRobList(_roi, layer, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newtrt ) m_newtrt->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case MDT: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newmdt ) m_newmdt->getRobList(_roi, layer, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newmdt ) m_newmdt->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case RPC: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newrpc ) m_newrpc->getRobList(_roi, layer, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newrpc ) m_newrpc->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case TGC: {
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newtgc ) m_newtgc->getRobList(_roi, layer, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newtgc ) m_newtgc->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case CSC: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_newcsc ) m_newcsc->getRobList(_roi, layer, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI selroi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_newcsc ) m_newcsc->getRobList(selroi, layer, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case FTK: { 
-    RegSelRoI _roi( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
-    if ( m_ftklut ) m_ftklut->getRobList(_roi, layer, outputROBIDList, m_duplicateRemoval ); 
+    RegSelRoI roi2( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
+    if ( m_ftklut ) m_ftklut->getRobList(roi2, layer, outputROBIDList, m_duplicateRemoval ); 
     break;
   }
   case LAR: { // Liquid Argon Calorimeter
diff --git a/DetectorDescription/RoiDescriptor/Root/RoiUtil.cxx b/DetectorDescription/RoiDescriptor/Root/RoiUtil.cxx
index 1c1cef80e15280ec898ee8cfe8df2d7e8354131f..812ed0b16f148d02e615ffbee6359e3a2f94b420 100644
--- a/DetectorDescription/RoiDescriptor/Root/RoiUtil.cxx
+++ b/DetectorDescription/RoiDescriptor/Root/RoiUtil.cxx
@@ -26,6 +26,21 @@ static const float  M_PIF = float(M_PI);
 
 
 
+namespace RoiUtil { 
+  
+class range_error : public std::exception { 
+public:
+  range_error( const char* s ) : std::exception(), m_str(s) { } 
+  virtual const char* what() const throw() { return m_str; } 
+private:
+  const char*  m_str;
+};
+  
+}
+
+
+
+
 /// test whether a stub is contained within the roi
 bool RoiUtil::contains( const IRoiDescriptor& roi, double z0, double dzdr ) {
   static const double maxR = 1100; // maximum radius of RoI - outer TRT radius ~1070 mm - should be configurable? 
@@ -145,7 +160,7 @@ double RoiUtil::phicheck(double phi) {
   while ( phi> M_PIF ) phi-=M_2PI;
   while ( phi<-M_PIF ) phi+=M_2PI;
   if ( !(phi >= -M_PIF && phi <= M_PIF) ) { // use ! of range rather than range to also catch nan etc
-    throw std::exception(); 
+    throw range_error( (std::string("phi out of range: ")+std::to_string(phi)).c_str() ); 
   } 
   return phi;
 }
@@ -153,7 +168,7 @@ double RoiUtil::phicheck(double phi) {
 
 double RoiUtil::etacheck(double eta) {
   if ( !(eta>-100  && eta<100) ) { // check also for nan
-    throw std::exception();
+    throw range_error( (std::string("eta out of range: ")+std::to_string(eta)).c_str() ); 
   } 
   return eta;
 }
@@ -161,7 +176,7 @@ double RoiUtil::etacheck(double eta) {
 
 double RoiUtil::zedcheck(double zed ) {
   if ( !(zed>-100000  && zed<100000 ) ) { // check also for nan
-    throw std::exception();
+    throw range_error( (std::string("zed out of range: ")+std::to_string(zed)).c_str() ); 
   } 
   return zed;
 }
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx
index 9871abb5081e74e6d06caee267d9a1ffc37d2329..fa0263f26580dbc532ede3c8ef2d0b13a1b39fb4 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamEventStorageInputSvc.cxx
@@ -520,7 +520,7 @@ StatusCode ByteStreamEventStorageInputSvc::generateDataHeader()
     if (ioc.isSuccess()) {
       const SG::DataProxy* ptmp = m_sgSvc->transientProxy(ClassID_traits<EventInfo>::ID(), "ByteStreamEventInfo");
       if (ptmp !=0) {
-        DataHeaderElement DheEI(ptmp->transientAddress(), 0, "ByteStreamEventInfo");
+        DataHeaderElement DheEI(ptmp, 0, "ByteStreamEventInfo");
         Dh->insert(DheEI);
       }
       //else ATH_MSG_ERROR("Failed to create EventInfo proxy " << ptmp);
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx
index 3666a4c33953924a55d75a271a2c9a7cab62edda..e3b14b4a789e6a9d297afa9aa5543df486d404b3 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.cxx
@@ -107,7 +107,9 @@ StatusCode ByteStreamNavigationProviderSvc::loadAddresses(StoreID::type storeId,
    return(sc_pLA);
 }
 //------------------------------------------------------------------------------------
-StatusCode ByteStreamNavigationProviderSvc::updateAddress(StoreID::type storeId, SG::TransientAddress* tad) {
+StatusCode ByteStreamNavigationProviderSvc::updateAddress(StoreID::type storeId,
+                                                          SG::TransientAddress* tad,
+                                                          const EventContext& ctx) {
    ATH_MSG_DEBUG("In updateAddress for: " << tad->clID() << " / " << tad->name());
    if (storeId != StoreID::EVENT_STORE) {
       return(StatusCode::FAILURE);
@@ -129,7 +131,7 @@ StatusCode ByteStreamNavigationProviderSvc::updateAddress(StoreID::type storeId,
       m_robDataProviderSvc->setNextEvent(m_rawEvent);
    }
    // Do Update address like in ByteStreamAddressProviderSvc
-   StatusCode sc_dUA = m_addressProvider->updateAddress(storeId, tad);
+   StatusCode sc_dUA = m_addressProvider->updateAddress(storeId, tad, ctx);
    return(sc_dUA);
 }
 //------------------------------------------------------------------------------------
diff --git a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h
index cc1e0a60e6419b40fd0ca0808daf92d3920409f6..de863b6e74565592f475d30637cbf17aeca00a8a 100644
--- a/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h
+++ b/Event/ByteStreamCnvSvc/src/ByteStreamNavigationProviderSvc.h
@@ -48,7 +48,9 @@ public:
    virtual StatusCode loadAddresses(StoreID::type id, tadList& tlist);
 
    /// Update an existing transient Address
-   virtual StatusCode updateAddress(StoreID::type id, SG::TransientAddress* tad);
+   virtual StatusCode updateAddress(StoreID::type id,
+                                    SG::TransientAddress* tad,
+                                    const EventContext& ctx);
 
 private:
    /// Return pointer to active event SG
diff --git a/Event/ByteStreamCnvSvc/src/DumpFrags.h b/Event/ByteStreamCnvSvc/src/DumpFrags.h
index 9389f178f00bd6b5f2dca21a6f00fe7996f043e9..8b66944053da90940a12166a69daa6c8d954e071 100644
--- a/Event/ByteStreamCnvSvc/src/DumpFrags.h
+++ b/Event/ByteStreamCnvSvc/src/DumpFrags.h
@@ -68,7 +68,7 @@ public:
 
 
     // get all the ROBFragments
-    const size_t MAX_ROBFRAGMENTS = 2048 * 1024;
+    const size_t MAX_ROBFRAGMENTS = 2048;
     OFFLINE_FRAGMENTS_NAMESPACE::PointerType robF[MAX_ROBFRAGMENTS];
     OFFLINE_FRAGMENTS_NAMESPACE::PointerType rePointer;
     re->start(rePointer);
@@ -81,7 +81,6 @@ public:
     // loop over all ROBs
     for (size_t irob=0; irob<robcount; ++irob)
       {
-	{
 	  // add to the map
 	  OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment rob(robF[irob]);
 	  
@@ -111,7 +110,6 @@ public:
 	    std::cout << std::endl << "WARNING : ROD has unexpected data size " 
 		      << rob.rod_ndata() << " and RODFragment size_word is too small!" << std::endl;
           }
-	}    
       } 
   }
 };
diff --git a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h
index b069334d4aeabd8e8a5115b2eb539372303c4644..f4870d3d884a458e2e430b34092d925d1c19cb39 100755
--- a/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h
+++ b/Event/ByteStreamCnvSvcBase/ByteStreamCnvSvcBase/ByteStreamAddressProviderSvc.h
@@ -39,7 +39,9 @@ public:
    virtual StatusCode preLoadAddresses(StoreID::type id, tadList& tlist);
 
    /// update an existing transient Address
-   virtual StatusCode updateAddress(StoreID::type id, SG::TransientAddress* tad) ;
+   virtual StatusCode updateAddress(StoreID::type id,
+                                    SG::TransientAddress* tad,
+                                    const EventContext& ctx);
 
 private:
    // type and name of the objects to create the address for.
diff --git a/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressProviderSvc.cxx b/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressProviderSvc.cxx
index ab6baeceb2c3b8a3f347d2df2dd59e35662d1e4d..7d2b41b5ae916ead6d901ce9016fe35977399591 100755
--- a/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressProviderSvc.cxx
+++ b/Event/ByteStreamCnvSvcBase/src/ByteStreamAddressProviderSvc.cxx
@@ -130,7 +130,9 @@ StatusCode ByteStreamAddressProviderSvc::preLoadAddresses(StoreID::type id, tadL
    return(StatusCode::SUCCESS);
 }
 //________________________________________________________________________________
-StatusCode ByteStreamAddressProviderSvc::updateAddress(StoreID::type id, SG::TransientAddress* tad) {
+StatusCode ByteStreamAddressProviderSvc::updateAddress(StoreID::type id,
+                                                       SG::TransientAddress* tad,
+                                                       const EventContext& /*ctx*/) {
    if (id != m_storeID) {
       return(StatusCode::FAILURE);
    }
diff --git a/Event/EventBookkeeperTools/src/CutFlowSvc.h b/Event/EventBookkeeperTools/src/CutFlowSvc.h
index 8aec81ea9d7fb43048364dbc359722ce9e3aa78e..0601ec84e0cbd06cb516e5b27f4c1b8d76e31d1f 100644
--- a/Event/EventBookkeeperTools/src/CutFlowSvc.h
+++ b/Event/EventBookkeeperTools/src/CutFlowSvc.h
@@ -69,15 +69,15 @@ public:
 
   /// Gaudi Service Implementation
   //@{
-  StatusCode initialize();
-  StatusCode stop();
-  StatusCode finalize();
-  StatusCode queryInterface( const InterfaceID& riid, void** ppvi );
+  virtual StatusCode initialize() override;
+  virtual StatusCode stop() override;
+  virtual StatusCode finalize() override;
+  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvi ) override;
   //@}
 
 
   /// Incident service handle listening for BeginFile and EndFile.
-  void handle(const Incident& incident);
+  virtual void handle(const Incident& incident) override;
 
   ///////////////////////////////////////////////////////////////////
   // Non-const methods:
diff --git a/Event/EventBookkeeperTools/src/FileCutFlowSvc.cxx b/Event/EventBookkeeperTools/src/FileCutFlowSvc.cxx
index ef0957997f88b771aeee2ba89afe9f3687d3895f..2ae79d1e48848eb6ad39a90fe8cf556f97f3c671 100644
--- a/Event/EventBookkeeperTools/src/FileCutFlowSvc.cxx
+++ b/Event/EventBookkeeperTools/src/FileCutFlowSvc.cxx
@@ -42,8 +42,7 @@ FileCutFlowSvc::FileCutFlowSvc(const std::string& name,
   m_incompleteCollName(""),
   m_skimmingCycle(0),
   m_fileCollName("CutBookkeepersFile"),
-  m_inputStream(""),
-  m_alreadyDeterminedCycleNumber(false)
+  m_inputStream("")
 {
   declareProperty("OutputCollName",           m_completeCollName="CutBookkeepers",
     "DEFUNCT - handled by tool now");
diff --git a/Event/EventBookkeeperTools/src/FileCutFlowSvc.h b/Event/EventBookkeeperTools/src/FileCutFlowSvc.h
index 4060db8fbe1000f6f1aa56cf68233e43ea74cb95..5a7f8c6674831166b5eda1e915247137650897cb 100644
--- a/Event/EventBookkeeperTools/src/FileCutFlowSvc.h
+++ b/Event/EventBookkeeperTools/src/FileCutFlowSvc.h
@@ -70,15 +70,15 @@ public:
 
   /// Gaudi Service Implementation
   //@{
-  StatusCode initialize();
-  StatusCode stop();
-  StatusCode finalize();
-  StatusCode queryInterface( const InterfaceID& riid, void** ppvi );
+  virtual StatusCode initialize() override;
+  virtual StatusCode stop() override;
+  virtual StatusCode finalize() override;
+  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvi ) override;
   //@}
 
 
   /// Incident service handle listening for BeginFile and EndFile.
-  void handle(const Incident& incident);
+  virtual void handle(const Incident& incident) override;
 
   ///////////////////////////////////////////////////////////////////
   // Non-const methods:
@@ -181,9 +181,6 @@ private:
   /// to the pointer of associated CutBookkeeper
   CutIDMap_t m_ebkMap;
 
-  /// Internal flag to track if we have already determined the cycle number from the first input file
-  bool m_alreadyDeterminedCycleNumber;
-
 public:
 
   /// Publish the interface for this service
diff --git a/Event/EventContainers/CMakeLists.txt b/Event/EventContainers/CMakeLists.txt
index adb8d6b7010ee5ba22eb956fea85395411121fda..9c5e652145df7d649637219cf077d7144f39dcd0 100644
--- a/Event/EventContainers/CMakeLists.txt
+++ b/Event/EventContainers/CMakeLists.txt
@@ -13,11 +13,18 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/CLIDSvc
                           Control/SGTools )
 
-# Component(s) in the package:
-atlas_add_executable( testIdCont
-                      src/ID_ContainerTest.cxx
-                      LINK_LIBRARIES Identifier GaudiKernel SGTools )
-
 # Install files from the package:
-atlas_install_headers( EventContainers )
 
+atlas_add_library( EventContainers 
+   src/IdentifiableCacheBase.cxx
+   PUBLIC_HEADERS EventContainers
+   LINK_LIBRARIES GaudiKernel SGTools )
+
+atlas_add_test( IdCont SOURCES test/ID_ContainerTest.cxx
+                INCLUDE_DIRS src test EventContainers
+                LINK_LIBRARIES Identifier GaudiKernel SGTools
+               )
+atlas_add_test( IdMTCont SOURCES test/IDMT_ContainerTest.cxx
+                INCLUDE_DIRS src test EventContainers
+                LINK_LIBRARIES Identifier GaudiKernel SGTools
+               )
diff --git a/Event/EventContainers/EventContainers/IdentifiableCache.h b/Event/EventContainers/EventContainers/IdentifiableCache.h
new file mode 100644
index 0000000000000000000000000000000000000000..7cc9630a2768acfe84b305cd5e454ba2835cbcd4
--- /dev/null
+++ b/Event/EventContainers/EventContainers/IdentifiableCache.h
@@ -0,0 +1,85 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: IdentifiableCache.h 791541 2017-01-09 10:43:53Z smh $
+/**
+ * @file IdentifiableCache.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Mar, 2016
+ * @brief 
+ */
+
+
+#ifndef EVENTCONTAINERS_IDENTIFIABLECACHE_H
+#define EVENTCONTAINERS_IDENTIFIABLECACHE_H
+
+
+#include "EventContainers/IdentifiableCacheBase.h"
+
+
+namespace EventContainers {
+
+
+template <class T>
+class IdentifiableCache
+  : public IdentifiableCacheBase
+{
+public:
+  
+
+  class Maker
+    : public IMaker
+  {
+  public:
+    virtual std::unique_ptr<T> make (IdentifierHash hash) const = 0;
+  private:
+    virtual void_unique_ptr typelessMake (IdentifierHash hash) const
+    { return void_unique_ptr (make (hash)); }
+  };
+
+  IdentifiableCache (IdentifierHash maxHash, const Maker* maker)
+    : IdentifiableCacheBase (maxHash, maker)
+  {
+  }
+
+  ~IdentifiableCache()
+  {
+    IdentifiableCacheBase::cleanUp (void_unique_ptr::Deleter<T>::deleter);
+  }
+
+  // Return payload if there, null if not there.
+  const T* find (IdentifierHash hash) const
+  {
+    return reinterpret_cast<const T*> (IdentifiableCacheBase::find (hash));
+  }
+
+  const T* get (IdentifierHash hash)
+  {
+    return reinterpret_cast<const T*> (IdentifiableCacheBase::get (hash));
+  }
+
+  // ids
+
+  bool add (IdentifierHash hash, const T* p, bool TakeOwnerShip = false)
+  {
+    return IdentifiableCacheBase::add (hash, p, TakeOwnerShip);
+  }
+
+  bool add (IdentifierHash hash, std::unique_ptr<T> p)
+  {
+    return IdentifiableCacheBase::add (hash, void_unique_ptr(std::move(p)));
+  }
+
+  void clearCache(){
+    IdentifiableCacheBase::clear (void_unique_ptr::Deleter<T>::deleter);
+  }
+};
+
+
+} // namespace EventContainers
+
+
+#endif // not EVENTCONTAINERS_IDENTIFIABLECACHE_H
diff --git a/Event/EventContainers/EventContainers/IdentifiableCacheBase.h b/Event/EventContainers/EventContainers/IdentifiableCacheBase.h
new file mode 100644
index 0000000000000000000000000000000000000000..cb323548ca60ae2a51a59c2d362e10314fa357ec
--- /dev/null
+++ b/Event/EventContainers/EventContainers/IdentifiableCacheBase.h
@@ -0,0 +1,123 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: IdentifiableCacheBase.h 791541 2017-01-09 10:43:53Z smh $
+/**
+ * @file IdentifiableCacheBase.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Mar, 2016
+ * @brief 
+ */
+
+
+#ifndef EVENTCONTAINERS_IDENTIFIABLECACHEBASE_H
+#define EVENTCONTAINERS_IDENTIFIABLECACHEBASE_H
+
+
+#include "Identifier/IdentifierHash.h"
+#include <stdexcept>
+#include <mutex>
+#include <atomic>
+#include <condition_variable>
+
+//abarton
+//Enabling the ability to remove collections to help compatability with old code.
+//This may be removed to improved threadsafety.
+#define IdentifiableCacheBaseRemove
+
+namespace EventContainers {
+
+
+class IdentifiableCacheBase
+{
+public:
+
+typedef std::true_type thread_safe;
+typedef std::set<IdentifierHash> idset_t;
+#if 0
+  struct deleter
+  {
+    void operator() (const void* p);
+  };
+#endif
+
+  typedef void deleter_f (const void* p);
+
+  class void_unique_ptr
+    : public std::unique_ptr<const void, deleter_f*>
+  {
+  public:
+    using std::unique_ptr<const void, deleter_f*>::unique_ptr;
+
+    template <class T>
+    struct Deleter
+    {
+      static void deleter (const void* p)
+      {
+        delete reinterpret_cast<const T*>(p);
+      }
+    };
+
+    template <class T>
+    void_unique_ptr(std::unique_ptr<T> p)
+      : std::unique_ptr<const void, deleter_f*> (p.release(),
+                                                 Deleter<T>::deleter)
+    {
+    }
+  };
+  
+  struct IMaker
+  {
+    virtual ~IMaker() {}
+    virtual void_unique_ptr typelessMake (IdentifierHash hash) const = 0;  // unique_ptr<T>??
+  };
+  
+  // Return payload if there, null if not there.
+  const void* find (IdentifierHash hash) const;
+
+  // Try to make payload if not there.
+  const void* get (IdentifierHash hash);
+
+  std::vector<IdentifierHash> ids() const;
+  
+  bool add (IdentifierHash hash, const void* p, bool TakeOwnerShip);
+  bool add (IdentifierHash hash, void_unique_ptr p);
+
+#ifdef IdentifiableCacheBaseRemove
+  bool remove (IdentifierHash hash);
+#endif
+  size_t fullSize() const { return m_owns.size(); }
+  size_t numberOfHashes() const;
+  
+protected:
+  IdentifiableCacheBase (IdentifierHash maxHash, const IMaker* maker);
+  ~IdentifiableCacheBase();
+  void clear (deleter_f* deleter);
+  void cleanUp(deleter_f* deleter);//Call once before delection
+  
+private:
+  std::vector<std::atomic<const void*> > m_vec;
+  std::vector<bool> m_owns;
+  
+  const IMaker* m_maker;
+  // Set of currently populated hashes.
+  // If a hash has an entry in the set but not in the vector,
+  // a conversion is in progress.
+
+  idset_t m_ids;
+
+  typedef std::mutex mutex_t;
+  typedef std::lock_guard<mutex_t> lock_t;
+  mutable mutex_t m_mutex;
+
+  std::condition_variable m_cond;
+};
+
+
+} // namespace EventContainers
+
+
+#endif // not EVENTCONTAINERS_IDENTIFIABLECACHEBASE_H
diff --git a/Event/EventContainers/EventContainers/IdentifiableContainer.h b/Event/EventContainers/EventContainers/IdentifiableContainer.h
index 1daffec6711de05925fa24d8f2a5b35996970ba1..e0b4dff5f52b7825f897428f40c4d0fd1cde20fa 100755
--- a/Event/EventContainers/EventContainers/IdentifiableContainer.h
+++ b/Event/EventContainers/EventContainers/IdentifiableContainer.h
@@ -4,382 +4,9 @@
 
 #ifndef EVENTCONTAINERS_IDENTIFIABLECONTAINER_H
 #define EVENTCONTAINERS_IDENTIFIABLECONTAINER_H
-/**
- * @file IdentifiableContainer.h
- *
- * @brief This class is a general container which can hold objects of
- * accessed by an IdentifierHash 
- *
- * @author RD Schaffer <R.D.Schaffer@cern.ch>
- *
- * $Id: IdentifiableContainer.h,v 1.39 2008-10-27 17:53:55 schaffer Exp $
- */
-
-#include "Identifier/IdentifierHash.h"
-#include "EventContainers/DataLinkVector.h"
-
-#include <set>
-#include <iostream> 
-
-/** @class IdentifiableContainer
- *
- * @brief This class is a general container which can hold objects of
- * accessed by an IdentifierHash 
- *
- */
-template < class T>
-class IdentifiableContainer : public DataLinkVector<T>
-{
-public:
-
-    typedef T        IDENTIFIABLE;
-    typedef DataLinkVector<T> DLV;
-    typedef IdentifiableContainer<T> MyType;
-    typedef typename DataLinkVector<T>::DataLinkT DataLinkT;
-
-    /// vector typedefs: it behaves like a vector<T*>
-    typedef int        size_type;
-    typedef T*&        reference;
-    typedef T* const & const_reference;
-    typedef T*         value_type;
-    typedef T**        pointer;
-    typedef T* const * const_pointer;
-    typedef T          base_value_type;
-
-    /// type for hash IDs
-    typedef std::set<IdentifierHash> HashIDs_t;
-    typedef typename HashIDs_t::const_iterator HashIDsIt_t;
-
-    /// this const_iterator is for DataLinkT, a non-const object
-    /// but DataLinkT is smart pointer for const T* 
-    class const_iterator
-    {
-    public:
-
-        /// iterator constructor
-        const_iterator();
-
-        /// assignment operator
-        const_iterator& operator = ( const const_iterator & it );
-        
-        /// increment operator
-        const_iterator& operator ++ ();
-
-        /// increment operator
-        const_iterator operator ++ ( int );
-        
-        /// access to DataLinkT by ref
-        DataLinkT& operator * ();
-        
-        /// access to DataLinkT by pointer
-        DataLinkT* operator-> ();
-
-        /// comparison operator
-        bool operator != ( const const_iterator &it ) const;
-
-        /// comparison operator
-        bool operator == ( const const_iterator &it ) const;
-
-        /// hashId of the pointed-to element
-        IdentifierHash hashId() const;
-        
-    protected:
-        friend class IdentifiableContainer<T>;
-
-        const_iterator( const MyType* idC, HashIDsIt_t it );
-        const_iterator( const MyType* idC, DataLinkT *dl );
-        
-        // This method makes sure m_hashIDsIt is points to the first
-        // DataHolder with data
-        void lookForData();
-        const MyType *m_idContainer;
-        HashIDsIt_t m_hashIDsIt;
-        DataLinkT * m_dl;
-    };
-
-    // default constructor initializes the DataLinkVector to hash max 
-    IdentifiableContainer(unsigned int hashMax = 0 );
-
-    /// return const_iterator for first entry
-    const_iterator begin() const;
-
-    /// return const_iterator for end of container
-    const_iterator end() const;
-
-    /// return const_iterator on the found entry or end() if out of
-    ///  range using hashed index - fast version, does not call cnv
-    ///  if object not there
-    const_iterator indexFind( IdentifierHash hashId ) const;
-    
-    /// insert collection into container with id hash
-    /// if IDC should not take ownership of collection, set ownsColl to false
-    StatusCode addCollection(const T* coll, IdentifierHash hashId, bool ownsColl = true);
-
-    /// remove collection from container for id hash, returning it
-    /// (and ownership) to client
-    T*  removeCollection(IdentifierHash hashId);
-
-    /// set m_hashids to have all the possible hash values given
-    /// the hash max
-    void setAllCollections(unsigned int hashMax);
-    
-    /// reset m_hashids and call DLV's cleanup
-    void cleanup();
-
-    /// return full size of container
-    int fullSize() const;
-    
-    /// return number of collections
-    int numberOfCollections() const;
-    
-protected: 
-
-    // list of hash IDs
-    mutable HashIDs_t m_hashids;
-};
-
-/// inline methods
-
-template < class T>
-IdentifiableContainer<T>::const_iterator::const_iterator() 
-        : 
-        m_idContainer(0), 
-        m_dl(0)
-{}
-
-template < class T>
-typename IdentifiableContainer<T>::const_iterator& 
-IdentifiableContainer<T>::const_iterator::operator = ( const const_iterator & it ) 
-{
-  if (this != &it) {
-    m_idContainer = it.m_idContainer;
-    m_hashIDsIt   = it.m_hashIDsIt;
-    m_dl          = it.m_dl;
-    if (m_dl == 0)
-        lookForData();
-  }
-  return *this;
-}
-
-template < class T>
-typename IdentifiableContainer<T>::const_iterator&
-IdentifiableContainer<T>::const_iterator::operator ++ () 
-{
-    if (m_dl != 0)
-        {
-            // just go to end
-            m_dl = 0;
-            m_hashIDsIt = (m_idContainer->m_hashids).end();
-            return *this;
-        }
-
-    ++m_hashIDsIt;
-    lookForData();
-    return *this;
-}
-
-template < class T>
-typename IdentifiableContainer<T>::const_iterator
-IdentifiableContainer<T>::const_iterator::operator ++ ( int ) 
-{
-    const_iterator tmp = *this;
-    if (m_dl != 0)
-        {
-            // just go to end
-            m_dl = 0;
-            m_hashIDsIt = (m_idContainer->m_hashids).end();
-            return tmp;
-        }
-    ++m_hashIDsIt;
-    lookForData();
-    return tmp;
-}
-
-template < class T>
-typename IdentifiableContainer<T>::DataLinkT& 
-IdentifiableContainer<T>::const_iterator::operator * () 
-{
-    if (m_dl != 0) return *m_dl;
-    typename DLV::iterator it = m_idContainer->DLV::find(*m_hashIDsIt);
-    return *it;
-}
-
-template < class T>
-typename IdentifiableContainer<T>::DataLinkT* 
-IdentifiableContainer<T>::const_iterator::operator-> () 
-{
-    if (m_dl != 0) return m_dl;
-    typename DLV::iterator it = m_idContainer->DLV::find(*m_hashIDsIt);
-    return &(*it);
-}
-
-template < class T>
-bool 
-IdentifiableContainer<T>::const_iterator::operator != ( const const_iterator &it ) const
-{
-    if ((m_dl != 0) or (it.m_dl != 0)) return it.m_dl != m_dl;
-    return it.m_hashIDsIt != m_hashIDsIt;
-}
-
-template < class T>
-bool
-IdentifiableContainer<T>::const_iterator::operator == ( const const_iterator &it ) const
-{
-    if ((m_dl != 0) or (it.m_dl != 0)) return it.m_dl == m_dl;
-    return it.m_hashIDsIt == m_hashIDsIt;
-}
-
-template < class T>
-IdentifierHash
-IdentifiableContainer<T>::const_iterator::hashId() const
-{
-    return *m_hashIDsIt;
-}
-
-template < class T>
-IdentifiableContainer<T>::const_iterator::const_iterator( const MyType* idC, HashIDsIt_t it )
-        : m_idContainer(idC), m_hashIDsIt(it), m_dl(0)
-{}
-
-template < class T>
-IdentifiableContainer<T>::const_iterator::const_iterator( const MyType* idC, DataLinkT *dl )
-        : m_idContainer(idC), m_dl(dl) 
-{}
-
-template < class T>
-void
-IdentifiableContainer<T>::const_iterator::lookForData() 
-{
-    if (!m_idContainer) return;
-    HashIDsIt_t itE = (m_idContainer->m_hashids).end();
-    typename DLV::iterator dlv_itE = m_idContainer->DLV::end();
-    while (m_hashIDsIt != itE) {
-        // check if DL is in DLV
-        typename DLV::iterator it = m_idContainer->DLV::find(*m_hashIDsIt);
-        if (dlv_itE != it)
-            // check if DL is valid
-            if (it.hasData()) break;
-        ++m_hashIDsIt;
-    }
-}
-
-
-// default constructor initializes the DataLinkVector 
-template < class T>
-IdentifiableContainer<T>::IdentifiableContainer(unsigned int hashMax)
-{  
-    // This constructor should be called with hashMax set the the
-    // max hash value. If set to 0, one can initialize DLV itself
-    // by calling init with the hashmax.
-
-    if(hashMax) DLV::init( hashMax );
-}
-
-// return const_iterator on first entry
-template < class T>
-typename IdentifiableContainer<T>::const_iterator
-IdentifiableContainer<T>::begin() const 
-{
-    const_iterator it(this, m_hashids.begin());
-    it.lookForData(); 
-    return it; 
-}
-
-template < class T>
-typename IdentifiableContainer<T>::const_iterator
-IdentifiableContainer<T>::end() const 
-{ 
-    return const_iterator(this, m_hashids.end());
-}
-
-// return const_iterator on the found entry or end() if out of
-//  range using hashed index - fast version, does not call cnv
-//  if object not there
-template < class T>
-typename IdentifiableContainer<T>::const_iterator
-IdentifiableContainer<T>::indexFind( IdentifierHash hashId ) const 
-{ 
-    // check if DL is valid
-    typename DLV::iterator it = DLV::find(hashId);
-    if( it != DLV::end() && it->hasData() ) {
-        return const_iterator(this, &*it);
-    }
-    return end();
-}
-
-// insert collection into container with id hash
-template < class T>
-StatusCode      
-IdentifiableContainer<T>::addCollection(const T* coll, IdentifierHash hashId, bool ownsColl)
-{
-            
-    // update m_hashids
-    if (!m_hashids.insert(hashId).second) return StatusCode::FAILURE;
-
-    // set DataLink to have the transient pointer
-    typename DLV::iterator it = DLV::find(hashId);
-    if( it != DLV::end()) {
-        it->setDataPtr(coll);
-        // set IDC to own the collection
-        if (ownsColl)DLV::setObjectOwnership(hashId,true);
-        return StatusCode::SUCCESS;
-    } 
-    else {
-        std::cout << "addCollection: it is at end " << (unsigned int)hashId << std::endl;
-        return StatusCode::FAILURE;
-    }
-}
-
-template < class T>
-T*  
-IdentifiableContainer<T>::removeCollection(IdentifierHash hashId)
-{
-           
-    // remove hash from set
-    m_hashids.erase(hashId);
-
-    // get collectino pointer if it exists
-    typename DLV::iterator it = DLV::find(hashId);
-    if( it != DLV::end() ) {
-        DLV::setObjectOwnership(hashId,false);
-        T* result = it->getDataPtr();
-        it->reset();
-        return (result);
-    }
-    else {
-        return (0);
-    }
-}
-
-template < class T>
-void
-IdentifiableContainer<T>::setAllCollections(unsigned int hashMax)
-{
-    int iMax = hashMax;
-    for (int i=0; i<iMax; ++i)
-        m_hashids.insert(i);
-}
-
-template < class T>
-void
-IdentifiableContainer<T>::cleanup()
-{
-    m_hashids.clear();
-    DLV::cleanup();
-}
-
-template < class T>
-int
-IdentifiableContainer<T>::fullSize() const
-{
-    return DLV::size();
-}
-
-template < class T>
-int
-IdentifiableContainer<T>::numberOfCollections() const
-{
-    return m_hashids.size();
-}
-
+//IdentifiableContainer is now a wrapper to IDCMT
+#include "EventContainers/IdentifiableContainerMT.h"
+//template alias
+template<class T>
+using IdentifiableContainer = IdentifiableContainerMT<T>;
 #endif 
diff --git a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h
new file mode 100644
index 0000000000000000000000000000000000000000..5066207ca6ae5a7eb310709bca009677c4148eaa
--- /dev/null
+++ b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h
@@ -0,0 +1,390 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef EVENTCONTAINERS_IDENTIFIABLECONTAINERMT_H
+#define EVENTCONTAINERS_IDENTIFIABLECONTAINERMT_H
+/**
+ * @file IdentifiableContainer.h
+ *
+ * @brief This class is a general container which can hold objects of
+ * accessed by an IdentifierHash
+ *
+ * @author A E Barton <abarton@cern.ch>
+ *
+ *
+ */
+
+#include "Identifier/Identifier.h"
+#include "EventContainers/IdentifiableCache.h"
+#include <iostream>
+#include <memory>
+#include <algorithm>
+#include "GaudiKernel/DataObject.h"
+
+
+
+//const_iterator and indexFind are provided for backwards compatability. they are not optimal
+/*
+IT is faster to iterate over the container with this method:
+    auto hashes= m_container->GetAllCurrentHashs(); 
+    for (auto hash : hashes) {
+        T* coll = m_container->indexFindPtr(hash); 
+        //Use coll here
+    }
+*/
+
+template < class T>
+class IdentifiableContainerMT : public DataObject
+{
+
+
+public:
+
+    typedef T        IDENTIFIABLE;
+    typedef EventContainers::IdentifiableCache<T> ICACHE;
+    typedef IdentifiableContainerMT<T> MyType;
+    typedef std::vector<std::atomic<const void*> >::size_type size_type;
+    typedef T*&        reference;
+    typedef T* const & const_reference;
+    typedef T*         value_type;
+    typedef T**        pointer;
+    typedef T* const * const_pointer;
+    typedef T          base_value_type;
+    typedef std::vector<IdentifierHash> Hash_Container;
+
+private:
+    ICACHE *m_cacheLink;
+    std::vector<bool> m_mask;
+    bool m_OnlineMode;
+
+public:
+
+    class const_iterator
+    {
+
+    public:
+
+        /// iterator constructor
+        const_iterator() : m_sptr(), m_current(nullptr), m_idContainer(nullptr), m_end(false) { }
+
+        /// assignment operator
+        const_iterator& operator = ( const const_iterator & it ) {
+            m_hashItr     = it.m_hashItr;
+            m_sptr        = it.m_sptr;
+            m_current     = it.m_current;
+            m_idContainer = it.m_idContainer;
+            m_end         = it.m_end;
+            return *this;
+        }
+
+        /// increment operator
+        const_iterator& operator ++ () {
+            if(m_end) return *this;
+            //If called on iterator created by "fast" iterator method const_iterator( const MyType* idC, IdentifierHash hash  )
+            if(!m_sptr) { 
+                auto ids = m_idContainer->GetAllCurrentHashs();
+                m_sptr    = std::shared_ptr<Hash_Container> (new Hash_Container());
+                m_sptr->swap(ids);
+                m_hashItr = std::find(m_sptr->begin(), m_sptr->end(), m_hash);
+                if(m_hashItr==m_sptr->end()) {
+                    m_end = true;
+                    m_sptr.reset();
+                    return *this;
+                }
+            }
+            
+#ifdef IdentifiableCacheBaseRemove            
+            do {
+                ++m_hashItr;
+                if(m_hashItr==m_sptr->end()) {
+                    m_end = true;
+                    m_sptr.reset();
+                    return *this;
+                }
+                m_current = m_idContainer->indexFindPtr(*m_hashItr);
+            } while(m_current==nullptr); //If we implement remove, this can happen
+            
+#else
+             ++m_hashItr;
+             if(m_hashItr==m_sptr->end()) {
+                 m_end = true;
+                 m_sptr.reset();
+                 return *this;
+             }
+             m_current = m_idContainer->indexFindPtr(*m_hashItr);
+#endif       
+             return *this;
+        }
+
+        /// increment operator
+        const_iterator operator ++ ( int ) {
+            const_iterator tmp = *this;
+            ++*this;
+            return tmp;
+        }
+
+        const T* cptr () const {
+            return m_current;
+        }
+
+        const T* operator * () const {
+            return m_current;
+        }
+
+        const T* operator ->() const { return (operator*()); }
+
+        /// comparison operator
+        bool operator != ( const const_iterator &it ) const {
+            if(m_end || it.m_end) return m_end!= it.m_end;
+            return m_current!= it.m_current;
+        }
+
+        /// comparison operator
+        bool operator == ( const const_iterator &it ) const {
+            if(m_end || it.m_end) return m_end == it.m_end;
+            return m_current == it.m_current;
+        }
+
+        /// hashId of the pointed-to element
+        //Calling this on an end iterator is undefined behaviour
+        IdentifierHash hashId() const {
+            return !m_sptr ? m_hash : *m_hashItr;
+        }
+
+    protected:
+        friend class IdentifiableContainerMT<T>;
+
+        const_iterator(const MyType* idC, bool end) : m_sptr(), m_current(nullptr), m_idContainer(idC), m_end(end)
+        {
+            if(!m_end) {
+                auto ids = m_idContainer->GetAllCurrentHashs();
+                if(ids.empty()) {//For empty containers
+                    m_end = true;
+                } else {
+                    m_sptr   = std::shared_ptr<Hash_Container> (new Hash_Container());
+                    m_sptr->swap(ids);
+                    m_hashItr = m_sptr->begin();            
+                    m_current = m_idContainer->indexFindPtr(*m_hashItr);
+#ifdef IdentifiableCacheBaseRemove  
+                    if(m_current==nullptr){  ++(*this); } //If we implement remove, this can happen
+#endif
+                }
+            }
+        }
+
+
+        //Alot of existing code creates a lot of iterators but doesn't interator over it
+        //This constructor delays creation of hash vector until ++ is called
+        const_iterator( const MyType* idC, IdentifierHash hash  ) :m_sptr(),
+            m_hash(hash), m_idContainer(idC) {
+
+            m_current = m_idContainer->indexFindPtr(hash);
+            m_end = m_current==nullptr;
+        }
+
+        Hash_Container::const_iterator m_hashItr;
+        std::shared_ptr<Hash_Container> m_sptr;
+        const T* m_current;
+        IdentifierHash m_hash;
+        const MyType *m_idContainer;
+        bool m_end;
+    };
+
+
+
+    // constructor initializes the collection the hashmax, OFFLINE usages pattern
+    IdentifiableContainerMT(IdentifierHash hashMax);
+
+    // constructor initializes with a link to a cache, ONLINE usage pattern
+    IdentifiableContainerMT(ICACHE *cache);
+
+    ~IdentifiableContainerMT() { if(!m_OnlineMode) delete m_cacheLink; }
+
+
+
+
+    /// return pointer on the found entry or null if out of
+    ///  range using hashed index - fast version, does not call cnv
+    ///  if object not there
+    const T* indexFindPtr( IdentifierHash hashId ) const;
+
+    const_iterator indexFind( IdentifierHash hashId ) const {
+        const_iterator it(this, hashId);
+        return it;
+    }
+
+    /// insert collection into container with id hash
+    /// if IDC should not take ownership of collection, set ownsColl to false
+    StatusCode addCollection(const T* coll, IdentifierHash hashId, bool ownsColl = true);
+
+    /// Tries to add the item to the cache, if the item already exists then it is deleted
+    /// This is a convenience method for online multithreaded scenarios
+    StatusCode addOrDelete(std::unique_ptr<T>, IdentifierHash hashId);
+
+    /// Looks in the cache to see if item already exists if not it returns false,
+    /// If it does exist it incorporates it into the IDC view but changing the mask.
+    bool tryFetch(IdentifierHash hashId);
+
+    /// Tries will look for item in cache, if it doesn't exist will call the cache IMAKER
+    /// If cache doesn't have an IMAKER then this fails.
+    StatusCode fetchOrCreate(IdentifierHash hashId);
+
+#ifdef IdentifiableCacheBaseRemove
+    /// remove collection from container for id hash, returning it
+    /// (and ownership) to client
+    T*  removeCollection(IdentifierHash hashId);
+#endif
+
+    /// set m_hashids to have all the possible hash values given
+    /// the hash max
+    void setAllCollections(unsigned int hashMax);
+
+    /// reset m_hashids and call IdentifiableCache's cleanup
+    void cleanup();
+
+    /// return full size of container
+    size_t fullSize() const {
+        return m_cacheLink->fullSize();
+    }
+
+    //Duplicate of fullSize for backwards compatability
+    size_t size() const {
+        return m_cacheLink->fullSize();
+    }    
+
+    /// return number of collections
+    size_t numberOfCollections() const {
+        if(!m_OnlineMode) return m_cacheLink->numberOfHashes();
+        size_t count =0;
+        for(auto b : m_mask) count += b;
+        return count;
+    }
+
+    
+    //Returns a collection of all hashes availiable in this IDC.
+    //If this is an "offline" mode IDC then this is identical to the cache
+    //If this is an "online" mode IDC then this is the items that both exist in the cache 
+    //and have a postive mask element
+    std::vector<IdentifierHash> GetAllCurrentHashs() const {
+        if(not m_OnlineMode) return m_cacheLink->ids();
+        else{
+	    std::vector<IdentifierHash> ids;
+            for(size_t i =0 ; i < m_mask.size(); ++i) if(m_mask[i]) ids.emplace_back(i);
+            return ids;
+        }
+    }
+
+    /// return const_iterator for first entry
+    const_iterator begin() const {
+        const_iterator it(this, false);
+        return it;
+    }
+
+
+    /// return const_iterator for end of container
+    const_iterator end() const {
+        return const_iterator(nullptr, true);
+    }
+};
+
+#ifdef IdentifiableCacheBaseRemove
+template < class T>
+T*
+IdentifiableContainerMT<T>::removeCollection( IdentifierHash hashId )
+{
+    using namespace EventContainers;
+    const T* ptr = reinterpret_cast<const T*> (m_cacheLink->find (hashId));
+    m_cacheLink->remove(hashId);
+    m_mask[hashId] = false;
+    return const_cast<T*>(ptr);
+}
+#endif
+
+
+
+// Constructor for OFFLINE style IDC
+template < class T>
+IdentifiableContainerMT<T>::IdentifiableContainerMT(IdentifierHash maxHash) : m_cacheLink(new ICACHE(maxHash, nullptr))
+{
+    m_mask.assign(maxHash, true);
+    m_OnlineMode = false;
+}
+
+// Constructor for ONLINE style IDC
+template < class T>
+IdentifiableContainerMT<T>::IdentifiableContainerMT(ICACHE *cache) : m_cacheLink(cache)
+{
+    m_mask.assign(cache->fullSize(), false);
+    m_OnlineMode = true;
+}
+
+// return valuetype on the found entry or null if out of
+//  range using hashed index - fast version, does not call cnv
+//  if object not there
+template < class T>
+const T*
+IdentifiableContainerMT<T>::indexFindPtr( IdentifierHash hashId ) const
+{
+    if(m_mask[hashId])  return m_cacheLink->find(hashId);
+    else                return nullptr;
+}
+
+// insert collection into container with id hash
+template < class T>
+StatusCode
+IdentifiableContainerMT<T>::addCollection(const T* coll, IdentifierHash hashId, bool ownsColl)
+{
+    // update m_hashids
+    if (! m_cacheLink->add(hashId, coll, ownsColl)) return StatusCode::FAILURE;
+    m_mask[hashId] = true;
+    return StatusCode::SUCCESS;
+
+}
+
+
+
+template < class T>
+void
+IdentifiableContainerMT<T>::cleanup()
+{
+    if(m_OnlineMode) { m_mask.assign(m_cacheLink->fullSize(), false);  }
+    else { m_cacheLink->clearCache(); }
+}
+
+template < class T>
+StatusCode
+IdentifiableContainerMT<T>::fetchOrCreate(IdentifierHash hashId)
+{
+    auto ptr = m_cacheLink->get(hashId);
+    if(ptr==nullptr){
+        return StatusCode::FAILURE; 
+    }
+    m_mask[hashId] = true;
+    return StatusCode::SUCCESS; 
+}
+
+template < class T>
+bool
+IdentifiableContainerMT<T>::tryFetch(IdentifierHash hashId)
+{
+    auto ptr = m_cacheLink->find(hashId);
+    if(ptr==nullptr){
+        return false; 
+    }
+    m_mask[hashId] = true;
+    return true; 
+}
+
+template < class T>
+StatusCode
+IdentifiableContainerMT<T>::addOrDelete(std::unique_ptr<T> ptr, IdentifierHash hashId)
+{
+    bool added = m_cacheLink->add(hashId, std::move(ptr));
+    if(added) return StatusCode::SUCCESS;
+    ptr.reset();//Explicity delete my ptr - should not be necessary maybe remove this line for optimization
+    return StatusCode::SUCCESS;
+}
+
+#endif
+
diff --git a/Event/EventContainers/EventContainers/SelectAllObject.h b/Event/EventContainers/EventContainers/SelectAllObject.h
index 35eede274a648d825b2be83170dfb7572f151bf6..4d0ba884510db97208cfbe92e4b224dc495d6e96 100755
--- a/Event/EventContainers/EventContainers/SelectAllObject.h
+++ b/Event/EventContainers/EventContainers/SelectAllObject.h
@@ -5,141 +5,9 @@
 #ifndef EVENTCONTAINERS_SELECTALLOBJECT_H
 #define EVENTCONTAINERS_SELECTALLOBJECT_H
 
-//  This is a Selection class that provides iterator over all objects
-// contained in the IdentifiableContainer.  The Identifiable in the
-// Container is presumed to be a DigitCollection (DC). DC 
-// should define OBJECT class in its scope, as well as const_iterator
-// class for accessing the OBJECTs. 
-
-// The const_iterator classes, both in DC and DCC, should follow the 
-// standard STL iterator syntax.
+#include "SelectAllObjectMT.h"
 
 template < class DCC, typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT >
-class SelectAllObject
-{
-public:
-
-	typedef typename DCC::IDENTIFIABLE DC;
-//	typedef typename DC::OBJECT OBJECT;
-//	typedef OBJECT OBJECT;
-	typedef SelectAllObject<DCC,OBJECT>  MyType;
-	typedef typename DCC::const_iterator DC_const_iterator;
-	typedef typename DC::const_iterator Object_const_iterator;
-
-	class const_iterator 
-	{
-	public:
-                const_iterator() 
-                  : m_dcc(nullptr),
-                    m_dc_it(),
-                    m_dc(nullptr),
-                    m_digit_it()
-                {}
-
-		const_iterator& operator ++ () // pre increment
-			{ ++m_digit_it; 
-			  if(m_digit_it != m_dc->end()) {
-			  // OK 
-			  } else 
-			  {
-			    // reached end of a collection, 
-			    ++m_dc_it; 
-				
-			    // advance until we see a valid digit, 
-			    //   or all the way to the end.
-			    while(m_dc_it != m_dcc->end() ){
-				m_dc       = *m_dc_it ; 
-				m_digit_it = m_dc->begin() ;  
-				if(m_digit_it != m_dc->end()){
-					break; 
-				} else 
-				{   ++m_dc_it; 
-				}
-			    } 
-			  }
-			  return *this; 
-
-			}
-
-		const_iterator operator ++ ( int ) // post increment
-			{       const_iterator tmp = *this; 
-				++tmp;  
-				return tmp; 
-			}
-
-		const OBJECT*  operator * () 
-			{ return *m_digit_it; }
-
-		// comparison operator.
-		// if m_dc_it == end, don't compare digit_it
-		bool operator != ( const const_iterator it ) const
-		 { if( it.m_dcc != m_dcc || it.m_dc_it != m_dc_it ) 
-			return true; 
-		   if( m_dcc && m_dc_it != m_dcc->end()) {
-		      // check digit_it only if it is not end
-		      if(it.m_digit_it != m_digit_it) return true; 
-		      return false; 
-		   } 
-		   return false; 		   
-		 }
-		bool operator == ( const const_iterator it ) const
-			{ return it.m_dcc == m_dcc 
-			      && it.m_dc_it == m_dc_it 
-			      && ((it.m_digit_it == m_digit_it) || 
-				  (m_dcc && (m_dc_it==m_dcc->end())));
-			// if both dc_it == end, then don't check digit_it
-			}
-
-		//	protected:
-		// friend class MyType; 
-		friend class SelectAllObject<DCC,OBJECT> ;
-
-		const_iterator( const DCC* dcc,  DC_const_iterator& dc_it )
-                  : m_dcc(dcc), m_dc_it(dc_it), m_dc(0)
-	         {
-		  while(m_dcc && m_dc_it!=m_dcc->end()) 
-		   {
-		     m_dc = *m_dc_it; 
-		     m_digit_it = m_dc->begin(); 
-		     if(m_digit_it != m_dc->end() ) break; 
-		     ++m_dc_it; 
-		     // FIXME !! need to check if m_digit_it is end.
-
-		   }
-
-		 }
-
-		const DCC* m_dcc; 
-		DC_const_iterator m_dc_it;
-		const DC* m_dc;  // cache DC 
-		Object_const_iterator m_digit_it;
-
-	};
-
-	// friend class const_iterator; 
-	// Constructor initializes the DataLinkVector 
-	SelectAllObject(const DCC* dcc) : m_dcc(dcc) 
-	{ }
-
-	// return iterator on first entry
-	const_iterator begin() 
-	  { DC_const_iterator dc_it = m_dcc->begin(); 
-	    return const_iterator ( m_dcc, dc_it ); 
-	  }
-
-	const_iterator end() 
-	  { DC_const_iterator dc_it = m_dcc->end(); 
-	    return const_iterator ( m_dcc, dc_it );
-	  }
-
-private: 
-	SelectAllObject( )
-	{ }
-
-	// pointer to the container it is processing. 
-	const DCC* m_dcc; 
-
-};
-
+using SelectAllObject = SelectAllObjectMT<DCC, OBJECT>;
 
 #endif 
diff --git a/Event/EventContainers/EventContainers/SelectAllObjectMT.h b/Event/EventContainers/EventContainers/SelectAllObjectMT.h
new file mode 100644
index 0000000000000000000000000000000000000000..6bbeacde4206ec553afa94b794037f2a381d1abd
--- /dev/null
+++ b/Event/EventContainers/EventContainers/SelectAllObjectMT.h
@@ -0,0 +1,156 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef EVENTCONTAINERS_SELECTALLOBJECTMT_H
+#define EVENTCONTAINERS_SELECTALLOBJECTMT_H
+
+//after SelectAllObjectMT is destroyed all iterators become invalid!
+template < class DCC, typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT >
+class SelectAllObjectMT
+{
+public:
+    typedef typename DCC::IDENTIFIABLE DC;
+//	typedef typename DC::OBJECT OBJECT;
+//	typedef OBJECT OBJECT;
+    typedef SelectAllObjectMT<DCC,OBJECT>  MyType;
+    typedef typename DC::const_iterator Object_const_iterator;
+    typedef typename DCC::Hash_Container::const_iterator Hash_iterator;
+
+    class const_iterator
+    {
+        Hash_iterator m_hash_itr;
+        const SelectAllObjectMT<DCC,OBJECT>* m_Parent;
+        Object_const_iterator m_digit_it;
+        const DC* m_dc;  // cache DC
+        friend class SelectAllObjectMT<DCC,OBJECT>;
+
+        void AdvanceCollection() {
+
+SKIPNEXT:
+
+            ++m_hash_itr;
+            if(m_hash_itr != m_Parent->m_hashes.cend()) {
+                m_dc = m_Parent->m_dcc->indexFindPtr(*m_hash_itr);
+#ifdef IdentifiableCacheBaseRemove
+                if(m_dc == nullptr) goto SKIPNEXT;//In case we implement remove
+#endif
+                m_digit_it = m_dc->begin();
+                if(m_digit_it == m_dc->end()) goto SKIPNEXT;
+            } else {
+                m_dc = nullptr;
+                m_digit_it = Object_const_iterator();
+            }
+        }
+
+    public:
+
+        const_iterator()
+            :
+            m_hash_itr(),
+            m_Parent(nullptr),
+            m_digit_it(),
+            m_dc(nullptr)
+        {}
+
+        const_iterator(const Hash_iterator &itr, const SelectAllObjectMT<DCC,OBJECT>* parent,
+                       Object_const_iterator digitit, const DC* dc )
+            :
+            m_hash_itr(itr),
+            m_Parent(parent),
+            m_digit_it(digitit),
+            m_dc(dc)
+        {}
+
+        const OBJECT*  operator * ()
+        {
+            return  *m_digit_it;
+        }
+
+
+
+
+        const_iterator& operator ++ () // pre increment
+        {
+            ++m_digit_it;
+            if(m_digit_it != m_dc->end()) {
+                // OK
+            } else
+            {
+                // reached end of a collection,
+                AdvanceCollection();
+            }
+            return *this;
+
+        }
+
+
+        const_iterator operator ++ ( int ) // post increment
+        {   const_iterator tmp = *this;
+            ++*this;
+            return tmp;
+        }
+
+
+        bool operator != ( const const_iterator it ) const
+        {
+            if( it.m_hash_itr != m_hash_itr || it.m_digit_it != m_digit_it )
+                return true;
+
+            return false;
+        }
+
+        bool operator == ( const const_iterator it ) const
+        {
+            return( it.m_hash_itr == m_hash_itr && it.m_digit_it == m_digit_it );
+        }
+
+
+
+    };
+
+    SelectAllObjectMT(const DCC* dcc) : m_dcc(dcc), m_hashes(dcc->GetAllCurrentHashs())
+    { }
+
+    SelectAllObjectMT( ) = delete;
+
+    const_iterator begin() {
+        Hash_iterator b = m_hashes.cbegin();
+NEXT:
+        const DC* dc = nullptr;
+        Object_const_iterator digit_it;
+        if(b!= m_hashes.cend()) {
+            dc = m_dcc->indexFindPtr(*b);
+            digit_it = dc->begin();
+            if(digit_it == dc->end()){ 
+               ++b;
+               goto NEXT;
+            }
+        }
+        return const_iterator(b, this, digit_it, dc);
+    }
+
+    const_iterator end() {
+        Hash_iterator b = m_hashes.cend();
+        const DC* dc = nullptr;
+        Object_const_iterator digit_it;
+        return const_iterator(b, this, digit_it, dc);
+    }
+
+    //Compatability with C++11
+    const_iterator cbegin() {
+        return begin();
+    }
+    const_iterator cend() {
+        return end();
+    }
+
+
+private:
+    // pointer to the container it is processing.
+    const DCC* m_dcc;
+    const typename DCC::Hash_Container m_hashes;
+};
+
+
+#endif
diff --git a/Event/EventContainers/EventContainers/SelectObject.h b/Event/EventContainers/EventContainers/SelectObject.h
index 40ee492555626bfedd2a62362d08c266311cfeef..82884ee128fd429edd9a48c78a54eef928263dd5 100755
--- a/Event/EventContainers/EventContainers/SelectObject.h
+++ b/Event/EventContainers/EventContainers/SelectObject.h
@@ -82,7 +82,7 @@ public:
 
 		const_iterator operator ++ ( int ) // post increment
 			{       const_iterator tmp = *this; 
-				++tmp;  
+				++*this;  
 				return tmp; 
 			}
 
@@ -160,5 +160,4 @@ private:
 
 };
 
-
 #endif 
diff --git a/Event/EventContainers/src/IdentifiableCacheBase.cxx b/Event/EventContainers/src/IdentifiableCacheBase.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..17e38d3d8a1dc4cb63e3071651cd2833919d81be
--- /dev/null
+++ b/Event/EventContainers/src/IdentifiableCacheBase.cxx
@@ -0,0 +1,211 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: IdentifiableCacheBase.cxx 791541 2017-01-09 10:43:53Z smh $
+/**
+ * @file IdentifiableCacheBase.h
+ * @author scott snyder <snyder@bnl.gov>
+ * @date Mar, 2016
+ * @brief 
+ */
+
+// Not in ids, null --- default state.
+// In ids, INVALID -- conversion/add failed.
+// In ids, valid --- Have payload
+// In ids, null --- Conversion in progress.
+
+
+#include "EventContainers/IdentifiableCacheBase.h"
+using namespace std;
+namespace EventContainers {
+
+
+static const void* INVALID = reinterpret_cast<const void*>(-1L);
+
+
+IdentifiableCacheBase::IdentifiableCacheBase (IdentifierHash maxHash,
+                                              const IMaker* maker)
+  : m_vec(maxHash),
+    m_owns(maxHash, false),
+    m_maker (maker)
+{
+}
+
+
+IdentifiableCacheBase::~IdentifiableCacheBase()
+{
+  if (!m_ids.empty())
+    std::abort();
+}
+
+void IdentifiableCacheBase::clear (deleter_f* deleter)
+{
+  lock_t lock (m_mutex);
+  for (IdentifierHash hash : m_ids) {
+    if (m_owns[hash])
+      deleter (m_vec[hash]);
+    m_owns[hash] = false;
+  }
+  m_ids.clear();
+
+//debug
+  for(auto& h : m_vec) h = nullptr;
+}
+
+void IdentifiableCacheBase::cleanUp (deleter_f* deleter)
+{
+  clear(deleter);
+  m_vec.clear();
+  m_owns.clear();
+  
+}
+
+
+const void* IdentifiableCacheBase::find (IdentifierHash hash) const
+{
+  if (hash >= m_vec.size()) return nullptr;
+  const void* p = m_vec[hash];
+  if (p == INVALID)
+    return nullptr;
+  return p;
+}
+
+
+const void* IdentifiableCacheBase::get (IdentifierHash hash)
+{
+  // If it's there already, return directly without locking.
+  if (hash >= m_vec.size()) return nullptr;
+  if (m_vec[hash]) return find (hash);
+
+  std::unique_lock<mutex_t> lock (m_mutex);
+  {
+    // Check again.
+    if (m_vec[hash]) return find (hash);
+    idset_t::iterator it = m_ids.find (hash);
+
+    if (it != m_ids.end()) {
+      // It's in the set.  Someone's running the conversion already.
+      // Wait for the condition, then check again.
+      while (!m_vec[hash])
+        m_cond.wait (lock);
+      return find (hash);
+    }
+
+    // We're going to try to do a conversion.
+    // Enter the id in the set.
+    m_ids.insert (hash);
+
+    // If there's no maker, mark it as invalid.
+    if (!m_maker) {
+      m_vec[hash] = INVALID;
+      return nullptr;
+    }
+
+    // Let go of the lock.
+  }
+
+  // Make the payload.
+  const void* p = nullptr;
+  try {
+    p = m_maker->typelessMake (hash).release();
+  }
+  catch (...) {
+    // FIXME: Can this be done with RAII?
+    m_vec[hash] = INVALID;
+    m_cond.notify_all();
+    throw;
+  }
+
+  // Stick it in the vector; notify other threads.
+  if (p) {
+    m_vec[hash] = p;
+    m_owns[hash] = true;
+  }
+  else{
+    m_vec[hash] = INVALID;
+  }
+  m_cond.notify_all();
+  return p;
+}
+#ifdef IdentifiableCacheBaseRemove
+bool IdentifiableCacheBase::remove (IdentifierHash hash)
+{
+   if (hash >= m_vec.size()) return false;
+   lock_t lock (m_mutex);
+   idset_t::const_iterator it = m_ids.find (hash);
+   if(it != m_ids.end()){
+      m_vec[hash] = nullptr;
+      m_owns[hash] = false;
+      m_ids.erase(it);
+   }
+   return true;
+}
+#endif
+size_t IdentifiableCacheBase::numberOfHashes() const
+{
+  lock_t lock (m_mutex);
+  return m_ids.size();
+}
+
+std::vector<IdentifierHash> IdentifiableCacheBase::ids() const
+{
+  std::vector<IdentifierHash> ret;
+  ret.reserve (m_vec.size());
+  lock_t lock (m_mutex);
+  for (IdentifierHash hash : m_ids) {
+    const void* p = m_vec[hash];
+    if (p && p != INVALID)
+      ret.push_back (hash);
+  }
+  return ret;
+}
+
+
+bool IdentifiableCacheBase::add (IdentifierHash hash, const void* p, bool owns)
+{
+  if (hash >= m_vec.size()) {
+//     cout << "Out of bounds " << hash << " / " << m_vec.size() << endl;
+     return false;
+  }
+  lock_t lock (m_mutex);
+  idset_t::iterator it = m_ids.lower_bound (hash);
+  if (it != m_ids.end() && *it == hash)
+  {
+//     cout << "iterator wrong " << endl;
+     return false;
+  }
+  assert (m_vec[hash] == nullptr);
+  m_vec[hash] = p ? p : INVALID;
+  m_owns[hash] = p!=nullptr ? owns : false;
+  m_ids.insert (it, hash);
+  return true;
+}
+
+
+
+bool IdentifiableCacheBase::add (IdentifierHash hash,
+                                 void_unique_ptr p)
+{
+  if (hash >= m_vec.size()) return false;
+  lock_t lock (m_mutex);
+  idset_t::iterator it = m_ids.lower_bound (hash);
+  if (it != m_ids.end() && *it == hash)
+    return false;
+  assert (m_vec[hash] == nullptr);
+  if (p) {
+    m_vec[hash] = p.release();
+    m_owns[hash] = true;
+  }
+  else {
+    m_vec[hash] = INVALID;
+  }
+  m_ids.insert (it, hash);
+  return true;
+}
+
+
+
+} // namespace EventContainers
+
+
diff --git a/Event/EventContainers/test/IDMT_ContainerTest.cxx b/Event/EventContainers/test/IDMT_ContainerTest.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ad328bda85b58578cb30acae5c047cc3708abe89
--- /dev/null
+++ b/Event/EventContainers/test/IDMT_ContainerTest.cxx
@@ -0,0 +1,620 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// This is a test cxx file for IdentifiableContainerMT. 
+//  
+#include "src/IdentifiableCacheBase.cxx"
+#include "EventContainers/IdentifiableContainerMT.h" 
+#include "EventContainers/SelectAllObjectMT.h" 
+#include "ID_ContainerTest.h" 
+#include "GaudiKernel/System.h" 
+#include "CLIDSvc/CLASS_DEF.h"
+
+// define a bunch of fake data classes 
+
+namespace IDC_TEST
+{
+
+    class MyID 
+    {
+    public: 
+        MyID(IdentifierHash id=0): m_id(id) {} 
+        IdentifierHash id()const { return m_id;} 
+    private: 
+        IdentifierHash m_id; 
+    }; 
+
+
+    class MyDigit 
+    {
+    
+    public: 
+        MyDigit(float d) :m_digit(d) {s_total++;} 
+        float val() const { return m_digit ;}
+    ~MyDigit(){ s_total--; }
+    static int s_total;
+    private: 
+        float m_digit; 
+    }; 
+    int MyDigit::s_total = 0;
+    static const CLID CLID_MYCOLLECTION=10000; 
+
+    class MyCollection
+    {
+    public: 
+
+        typedef MyDigit DIGIT; 
+
+        typedef std::vector<DIGIT*>::const_iterator const_iterator; 
+
+        MyCollection( ) :m_id(0) { return; } 
+        MyCollection(const MyID& id ){ m_id=id; return; } 
+        ~MyCollection()         {
+            std::vector<DIGIT*>::const_iterator it = m_vector.begin();
+            std::vector<DIGIT*>::const_iterator it_end = m_vector.end();
+            for(; it!=it_end; ++it)
+                delete (*it); 
+            return ;
+        }
+
+        unsigned int   identifyHash() const  { return m_id.id();} 
+
+        const_iterator begin() const { return m_vector.begin();} 
+        const_iterator end()  const { return m_vector.end()  ;} 
+
+        void add (DIGIT* d){ m_vector.push_back(d); } 
+
+        static const CLID& classID() { return CLID_MYCOLLECTION;} 
+
+    private: 
+        std::vector<DIGIT*> m_vector; 
+        MyID m_id;   
+
+    }; 
+
+    class MyCollectionContainer 
+        :public   IdentifiableContainerMT<MyCollection> 
+    {
+    public: 
+        typedef IdentifiableContainerMT<MyCollection>  MyType; 
+
+        // constructor 
+        MyCollectionContainer( int m ) :
+                IdentifiableContainerMT<MyCollection>(m)   {    
+             
+        }
+
+        MyCollectionContainer( EventContainers::IdentifiableCache<MyCollection> *m ) :
+                IdentifiableContainerMT<MyCollection>(m)   {    
+             
+        }
+
+    }; 
+
+//Setup cache with a helper class
+class DefaultMaker : public EventContainers::IdentifiableCache<MyCollection>::Maker
+{
+   public:
+    virtual std::unique_ptr<MyCollection> make (IdentifierHash )  const override{
+       return std::make_unique<MyCollection>(); //Create cache element collections
+    }
+
+}; 
+
+
+}  // end of the name space 
+
+
+CLASS_DEF( IDC_TEST::MyCollectionContainer , 21011234 , 1 )
+
+using namespace IDC_TEST;
+
+
+// Implement the test Algorithm class  ID_ContainerTest 
+
+// Constructor 
+ID_ContainerTest::ID_ContainerTest()
+        :
+  m_ncollections(100000),m_nskip(0),m_test(10), m_container(0)
+{
+//     // properties
+//     // number of collections in the containers 
+//     declareProperty("NumCollections",m_ncollections);  
+//     // skip every m_nskip collections when create the collection 
+//     declareProperty("Skip",m_nskip);  
+//     // level of testing control 
+//     declareProperty("Test",m_test);  
+//     declareProperty("Nhits",m_nhits);  
+    m_nhits = 10; 
+
+} 
+
+// ------ initialize() 
+int ID_ContainerTest::initialize()  
+{ 
+    // we own the Container 
+
+    m_container = new MyCollectionContainer(m_ncollections);
+
+    std::cout <<" Collection, Skip = " << m_ncollections<<" "<<m_nskip<<std::endl;
+    std::cout <<" Test level =  " << m_test<<std::endl;
+
+    return 0;
+} 
+
+// ------ finalize() 
+int ID_ContainerTest::finalize()  
+{ return 0;} 
+
+//------ execute() 
+
+int ID_ContainerTest::execute(){
+
+    typedef SelectAllObjectMT<MyCollectionContainer,MyDigit> SELECTOR ;
+    typedef SELECTOR::const_iterator digit_const_iterator; 
+//    typedef MyCollectionContainer::const_iterator collection_iterator;
+    
+    int hfmax = m_ncollections;
+//    int m_nhits = 100;
+
+    longlong startOfUserTime    = System::userTime( System::microSec );
+    longlong startOfKernelTime  = System::kernelTime   ( System::microSec );
+    longlong startOfElapsedTime = System::ellapsedTime ( System::microSec );
+    m_container->cleanup(); 
+    /// following lines could be platform dependent!
+    longlong deltaUser    = System::userTime    ( System::microSec ) - startOfUserTime   ;
+    longlong deltaKernel  = System::kernelTime  ( System::microSec ) - startOfKernelTime ;
+    longlong deltaElapsed = System::ellapsedTime( System::microSec ) - startOfElapsedTime ;
+
+    std::cout << "Container cleanup: user, kernel, elapsed " 
+	      << deltaUser << " " 
+	      << deltaKernel << " "
+	      << deltaElapsed << " " 
+	      << std::endl;
+
+    std::string key("MyDIgitCont"); 
+
+    static bool first=true; 
+
+    int skip= m_nskip; 
+
+    if(first) { 
+	first = false;	
+        //	skip = 0 ; 
+    }
+
+    std::vector< MyCollection* > vColl; 
+    std::vector< const MyCollection* > vCollRem; 
+
+    startOfUserTime    = System::userTime( System::microSec );
+    startOfKernelTime  = System::kernelTime   ( System::microSec );
+    startOfElapsedTime = System::ellapsedTime ( System::microSec );
+    for (int coll =0; coll <hfmax; coll=coll+(1+skip) ){
+        MyID id(coll); 
+        MyCollection* dcoll = new MyCollection(id); 
+      
+//      int index = hf(id); 
+//      char key[5]; 
+//      sprintf(key,"%d",index ); 
+//      std::string skey(key)
+
+        vColl.push_back(dcoll); 
+      
+        for(int j=0; j<m_nhits; ++j){
+            float t = j; 
+            MyDigit* digit = new MyDigit(t); 
+            dcoll->add(digit); 
+        }
+
+    }
+    deltaUser    = System::userTime    ( System::microSec ) - startOfUserTime   ;
+    deltaKernel  = System::kernelTime  ( System::microSec ) - startOfKernelTime ;
+    deltaElapsed = System::ellapsedTime( System::microSec ) - startOfElapsedTime ;
+    std::cout << "Created vector of coll + digits: user, kernel, elapsed " 
+	      << deltaUser << " " 
+	      << deltaKernel << " "
+	      << deltaElapsed << " " 
+	      << std::endl;
+
+    StatusCode sc;
+    std::vector<MyCollection*>::const_iterator it_p = vColl.begin();
+    std::vector<MyCollection*>::const_iterator it_p_end = vColl.end();
+    for(; it_p!=it_p_end;++it_p){
+	const MyCollection* p = (*it_p); 
+	sc = m_container->addCollection(p, p->identifyHash());
+	if (sc.isFailure())
+            std::cout << "error:addCollection->" << p->identifyHash() << std::endl;
+    }
+
+    deltaUser    = System::userTime    ( System::microSec ) - startOfUserTime   ;
+    deltaKernel  = System::kernelTime  ( System::microSec ) - startOfKernelTime ;
+    deltaElapsed = System::ellapsedTime( System::microSec ) - startOfElapsedTime ;
+    std::cout << "Add colls to container: user, kernel, elapsed " 
+	      << deltaUser << " " 
+	      << deltaKernel << " "
+	      << deltaElapsed << " " 
+	      << std::endl;
+
+    if(m_test<=0) return 0;
+
+    std::cout << "Full Size:" << m_container->fullSize() << " N Coll:" << m_container->numberOfCollections() << std::endl;
+    std::cout << "By interation\n";
+    startOfUserTime    = System::userTime( System::microSec );
+    startOfKernelTime  = System::kernelTime   ( System::microSec );
+    startOfElapsedTime = System::ellapsedTime ( System::microSec );
+    // Access all COllections
+/*    auto hashes= m_container->GetAllCurrentHashs(); 
+    int nc1 = 0 ; 
+    for (auto hash : hashes) {
+        auto coll = m_container->indexFindPtr(hash); 
+        coll->identifyHash(); 
+        ++nc1; 
+    }
+*/
+
+    // Access all COllections
+    auto it1_coll= m_container->begin(); 
+    auto it2_coll= m_container->end(); 
+    int nc1 = 0 ; 
+    for (  ; it1_coll!=it2_coll; ++it1_coll) {
+        const  MyCollection* coll = *it1_coll; 
+        coll->identifyHash(); 
+        ++nc1; 
+    }
+
+    deltaUser    = System::userTime    ( System::microSec ) - startOfUserTime   ;
+    deltaKernel  = System::kernelTime  ( System::microSec ) - startOfKernelTime ;
+    deltaElapsed = System::ellapsedTime( System::microSec ) - startOfElapsedTime ;
+    std::cout << "Iteration over collections: user, kernel, elapsed " 
+	      << deltaUser << " " 
+	      << deltaKernel << " "
+	      << deltaElapsed << " " 
+	      << std::endl;
+
+    std::cout <<"  Number of Collection  Accessed "<<nc1<<std::endl;
+
+    std::cout << "By GetAllCurrentHashs search\n";
+
+    startOfUserTime    = System::userTime( System::microSec );
+    startOfKernelTime  = System::kernelTime   ( System::microSec );
+    startOfElapsedTime = System::ellapsedTime ( System::microSec );
+    // Access all COllections
+    auto hashes= m_container->GetAllCurrentHashs(); 
+    nc1 = 0 ; 
+    for (auto hash : hashes) {
+        auto coll = m_container->indexFindPtr(hash); 
+        coll->identifyHash(); 
+        ++nc1; 
+    }
+
+    deltaUser    = System::userTime    ( System::microSec ) - startOfUserTime   ;
+    deltaKernel  = System::kernelTime  ( System::microSec ) - startOfKernelTime ;
+    deltaElapsed = System::ellapsedTime( System::microSec ) - startOfElapsedTime ;
+    std::cout << "Iteration over collections : user, kernel, elapsed " 
+	      << deltaUser << " " 
+	      << deltaKernel << " "
+	      << deltaElapsed << " " 
+	      << std::endl;
+
+
+    // Print out some hash ids via iterator
+    hashes= m_container->GetAllCurrentHashs();  
+    nc1 = 0 ; 
+    unsigned int skip1 = 0;
+    for ( auto h = hashes.cbegin() ; h!=hashes.cend() && nc1 < 10; ++h, ++skip1) {
+        if (skip1%4 != 1)continue;
+        auto it1_coll = m_container->indexFindPtr(*h);
+        std::cout << "iter, hash id "
+                  << nc1 << " " 
+                  << std::endl;
+        
+        MyCollection::const_iterator it_dig      = (it1_coll)->begin();
+        MyCollection::const_iterator it_dig_last = (it1_coll)->end();
+        for (unsigned int nd = 0; it_dig != it_dig_last; ++nd, ++ it_dig) {
+            std::cout << "nd, val " << nd << " " << (*it_dig)->val() << std::endl;
+        }
+        ++nc1; 
+    }
+
+    if(m_test<=1) return 0;
+
+    if(m_test<=2) return 0;
+    // access ALL digits
+    startOfUserTime    = System::userTime( System::microSec );
+    startOfKernelTime  = System::kernelTime   ( System::microSec );
+    startOfElapsedTime = System::ellapsedTime ( System::microSec );
+
+    int nd = 0 ; 
+{
+    SELECTOR select(m_container); 
+    digit_const_iterator it1 = select.begin(); 
+    digit_const_iterator it2 = select.end(); 
+
+    for(; it1!=it2; ++it1){
+        const MyDigit* digit = *it1; 
+        volatile float t = digit->val(); 
+        t = t + 1.; 
+        ++nd; 
+    }
+    if(nd != m_ncollections*m_nhits) { 
+      std::cout << nd << "!=" <<  m_ncollections*m_nhits << std::endl;
+      std::cout << "SELECTOR Bug LINE " << __LINE__ << std::endl; std::abort();
+    }
+}
+{//Repeat with post incrementor operator
+    SELECTOR select(m_container); 
+    digit_const_iterator it1 = select.begin(); 
+    digit_const_iterator it2 = select.end(); 
+    nd = 0 ; 
+    for(; it1!=it2; it1++){
+        const MyDigit* digit = *it1; 
+        volatile float t = digit->val(); 
+        t = t + 1.; 
+        ++nd; 
+    }
+    if(nd != m_ncollections*m_nhits) { 
+      std::cout << nd << "!=" <<  m_ncollections*m_nhits << std::endl;
+      std::cout << "SELECTOR Bug LINE " << __LINE__ << std::endl; std::abort();
+    }
+}
+
+    deltaUser    = System::userTime    ( System::microSec ) - startOfUserTime   ;
+    deltaKernel  = System::kernelTime  ( System::microSec ) - startOfKernelTime ;
+    deltaElapsed = System::ellapsedTime( System::microSec ) - startOfElapsedTime ;
+    std::cout << "Iteration over digits : user, kernel, elapsed " 
+	      << deltaUser << " " 
+	      << deltaKernel << " "
+	      << deltaElapsed << " " 
+	      << std::endl;
+    std::cout <<"  Number of Digits  Accessed "<<nd<<std::endl;
+
+    if(m_test<=3) return 0;
+
+    std::cout <<"  TESTING find and lower/upper bound " <<std::endl;
+
+    // access digit with lower/upper bounds 
+
+    int low = hfmax/4; 
+    int hi = hfmax/2; 
+
+    MyID id_low( low ); 
+    MyID id_high(hi ); 
+
+//     collection_iterator coll_it1 = m_container->lower_bound( id_low); 
+//     collection_iterator coll_it2 = m_container->upper_bound( id_high);
+    
+//     for(; coll_it1!=coll_it2; ++coll_it1){
+//       const MyCollection* coll = (*coll_it1); 
+//       MyID id = coll->identifyHash(); 
+
+//       // test find 
+//       collection_iterator it = m_container->find(id);	
+//       const MyCollection* coll1 = (*it) ;
+//       if(!coll1) { 
+// 	std::cout <<"  ERROR: IDC::find failed"<<std::endl; 
+//       }
+//     }
+
+    auto
+        it_low=m_container->indexFindPtr(id_low.id());
+
+    auto
+        it_high=m_container->indexFindPtr(id_high.id());
+
+    if(it_low){
+        (it_low)->identifyHash();
+    }
+    if(it_high){
+        (it_high)->identifyHash();
+    }
+
+    startOfUserTime    = System::userTime( System::microSec );
+    startOfKernelTime  = System::kernelTime   ( System::microSec );
+    startOfElapsedTime = System::ellapsedTime ( System::microSec );
+    int nColl = 0 ; 
+    for (  int i=0; i<hfmax;++i) {
+        auto
+            it=m_container->indexFindPtr(i);
+        if(it) { 
+            ++nColl; 
+            (it)->identifyHash(); 
+        }
+    }
+    deltaUser    = System::userTime    ( System::microSec ) - startOfUserTime   ;
+    deltaKernel  = System::kernelTime  ( System::microSec ) - startOfKernelTime ;
+    deltaElapsed = System::ellapsedTime( System::microSec ) - startOfElapsedTime ;
+    std::cout << "Random access: user, kernel, elapsed " 
+	      << deltaUser << " " 
+	      << deltaKernel << " "
+	      << deltaElapsed << " " 
+	      << std::endl;
+
+    std::cout<<" Number of Collections from Random Access "
+             << nColl<< std::endl;
+
+
+    // Test removal of collections
+/*
+    unsigned int collsRemoved = 0;
+    for (int coll =0; coll <hfmax; coll += 3) {
+        collsRemoved++;
+        const MyCollection* c = m_container->removeCollection(coll);
+        if (coll < 10) std::cout << "coll " << c << std::endl;
+        vCollRem.push_back(c);
+    }
+    unsigned int collsFound = 0;
+    unsigned int collsFound1 = 0;
+    for (int coll =0; coll <hfmax; coll += 3) {
+        auto it_low = m_container->indexFind(coll);
+        if (it_low != nullptr) collsFound++;
+        collsFound1++;
+    }
+    std::cout << "Removed " << collsRemoved << " collections. Size "
+              << vCollRem.size() << " removed collections found again " << collsFound
+              << " tested " << collsFound1
+              << std::endl;
+*/
+
+
+    auto
+        it_low2=m_container->indexFind(id_low.id());
+
+    auto
+        it_high2=m_container->indexFind(id_high.id());
+
+    if(it_low2!=m_container->end()){
+        if(id_low.id() != (*it_low2)->identifyHash()) std::cout << "wrong hash "<< id_low.id() << '\n';
+    }
+    if(it_high2!=m_container->end()){
+        (*it_high2)->identifyHash();
+    }
+    
+    int count=0;
+    int correct =0;
+    int wrong =0;
+    for(; it_low2!=m_container->end();++it_low2, ++count){
+        if(MyID( low+count ).id() != (*it_low2)->identifyHash()) {
+           std::cout << "wrong hash "<< id_low.id() << '\n';
+           wrong++;
+        }
+        else correct++;
+    }
+
+    auto testend = m_container->end();
+    auto teststa = m_container->begin();
+    int size = m_container->numberOfCollections();
+    count = 0;
+    for(; teststa != testend; teststa++ , count++){
+       if(count >= size) { std::cout << "Error in iterating Line " << __LINE__ << " at count " << count << std::endl; std::abort(); }
+    }
+
+    std::cout << "wrong hash allignment " << wrong <<'/' << correct+wrong << std::endl;
+    m_container->cleanup();
+    for (unsigned int coll = 0; coll < vCollRem.size(); ++coll) {
+        delete vCollRem[coll];
+    }
+    std::cout << "Deleted collections " << std::endl;
+ 
+
+{
+   auto container2 = new MyCollectionContainer(m_ncollections);
+   int itemsadded=0;
+   for (int coll =0; coll <hfmax; coll=coll+(1+skip) ){
+        MyID id(coll); 
+        MyCollection* dcoll = new MyCollection(id); 
+	sc = container2->addCollection(dcoll, dcoll->identifyHash());
+	if (sc.isFailure())
+            std::cout << "error:addCollection->" << dcoll->identifyHash() << std::endl;
+        if(coll %2 ==0) continue; //Allow some empty containers
+        for(int j=0; j<m_nhits; ++j){
+            float t = j; 
+            MyDigit* digit = new MyDigit(t); 
+            dcoll->add(digit); 
+            itemsadded++;
+        }
+
+    }
+
+    SELECTOR select(container2); 
+    digit_const_iterator it1 = select.begin(); 
+    digit_const_iterator it2 = select.end(); 
+    nd = 0 ; 
+    for(; it1!=it2; it1++){
+        const MyDigit* digit = *it1; 
+        volatile float t = digit->val(); 
+        t = t + 1.; 
+        ++nd; 
+    }
+    if(nd != itemsadded) { 
+      std::cout << nd << "!=" <<  itemsadded << std::endl;
+      std::cout << "SELECTOR Bug LINE " << __LINE__ << std::endl; std::abort();
+    }
+    delete container2; container2 = nullptr;
+//Test Empty
+    MyCollectionContainer* dempty = new MyCollectionContainer(100); 
+    if(dempty->begin() != dempty->end()){
+       std::cout << __FILE__ << " empty container not working see LINE " << __LINE__ << std::endl; std::abort();
+    }
+    SELECTOR emptyselect(dempty);
+    if(emptyselect.begin() != emptyselect.end()){
+       std::cout << __FILE__ << " empty SELECTOR not working see LINE " << __LINE__ << std::endl; std::abort();
+    }
+    delete dempty; dempty = nullptr;
+
+//Test Online IDC
+    static const DefaultMaker* maker= new DefaultMaker();
+    auto cache = new EventContainers::IdentifiableCache<MyCollection>(IdentifierHash(100), maker);
+    cache->add(IdentifierHash(0), new MyCollection(MyID(0)));
+    cache->add(IdentifierHash(3), new MyCollection(MyID(3)));//Some pre cached collections
+
+    auto containerOnline = new MyCollectionContainer(cache);
+    if(containerOnline->fetchOrCreate(IdentifierHash(0)).isFailure()){
+         cout << "Error in FetchOrCreate " << endl; std::abort();
+
+    }
+    if(containerOnline->addCollection(new MyCollection(MyID(10)), IdentifierHash(10)).isFailure()){
+         cout << "Error in addCollection cache link " << endl; std::abort();
+    }
+//	if (sc.isFailure())
+//            std::cout << "error:addCollection->" << p->identifyHash() << std::endl;
+    std::vector<IdentifierHash> cacheshouldcontain = { IdentifierHash(0), IdentifierHash(3), IdentifierHash(10) };
+    std::vector<IdentifierHash> IDCshouldContain = { IdentifierHash(0), IdentifierHash(10) };
+    assert(cache->ids().size() == 3);
+    if(cache->ids() != cacheshouldcontain){
+        std::cout << __FILE__ << " cache does not contain correct elements" << endl;
+        std::abort();
+    }
+    assert(containerOnline->GetAllCurrentHashs().size() == 2);
+    if(containerOnline->GetAllCurrentHashs() != IDCshouldContain){
+        std::cout << __FILE__ << " IDC does not contain correct elements" << endl;
+        std::abort();
+    }
+
+    {
+       int l = 0;
+       auto be = containerOnline->begin();
+       auto end = containerOnline->end();
+       while(be!=end){
+	  if(IDCshouldContain[l] != be.hashId()) {
+             std::cout << __FILE__ << " IDC does not contain correct elements " << __LINE__ << endl;
+             std::cout << "should be " << cacheshouldcontain[l]  << " is " << be.hashId() << endl; std::abort();
+          }else{
+             std::cout << "Correctly contains " << cacheshouldcontain[l].value() << endl;
+          }
+//          for(int f=0;f<l;f++) be->add(new MyDigit(l));
+          ++be; ++l;
+       }
+       auto acollection = new MyCollection(MyID(55));
+       for(int f=0;f<20;f++) acollection->add(new MyDigit(f));
+       containerOnline->addCollection(acollection, IdentifierHash(55));
+       SELECTOR select(containerOnline);
+
+       digit_const_iterator it1 = select.begin(); 
+       digit_const_iterator it2 = select.end();  
+       size_t count = 0;
+       for( ; it1!=it2; ++it1) count++;
+       cout << "count is " << count << " should be 20 " << endl;
+       if(count !=20) std::abort();
+    }
+
+
+
+    delete cache;
+    delete containerOnline;
+    cout << "MyDigits left undeleted " << MyDigit::s_total << endl;    
+}
+    return 0;
+
+}// end of execute 
+
+
+int main (int /*argc*/, char** /*argv[]*/)  
+{  
+
+    ID_ContainerTest test;
+    test.initialize();
+    for (unsigned int i = 0; i < 5; i++) test.execute();
+    test.finalize();
+}
+
diff --git a/Event/EventContainers/src/ID_ContainerTest.cxx b/Event/EventContainers/test/ID_ContainerTest.cxx
similarity index 98%
rename from Event/EventContainers/src/ID_ContainerTest.cxx
rename to Event/EventContainers/test/ID_ContainerTest.cxx
index 289d6cdd764f43ff34d7e169c55aab7a09117b68..9286abb1efc1fe1053c2562c6472d01c2f5ac6ca 100755
--- a/Event/EventContainers/src/ID_ContainerTest.cxx
+++ b/Event/EventContainers/test/ID_ContainerTest.cxx
@@ -4,7 +4,7 @@
 
 // This is a test cxx file for IdentifiableContainer. 
 //  
-
+#include "src/IdentifiableCacheBase.cxx"
 #include "EventContainers/IdentifiableContainer.h" 
 #include "EventContainers/SelectAllObject.h" 
 #include "ID_ContainerTest.h" 
@@ -78,8 +78,8 @@ namespace IDC_TEST
 
         // constructor 
         MyCollectionContainer( int m ) :
-                IdentifiableContainer<MyCollection>(false)   {    
-            init(m) ;  
+                IdentifiableContainer<MyCollection>(m)   {    
+            
         }
 
     }; 
@@ -381,7 +381,7 @@ int ID_ContainerTest::execute(){
     std::cout<<" Number of Collections from Random Access "
              << nColl<< std::endl;
 
-
+#ifdef IdentifiableCacheBaseRemove
     // Test removal of collections
     unsigned int collsRemoved = 0;
     for (int coll =0; coll <hfmax; coll += 3) {
@@ -401,6 +401,9 @@ int ID_ContainerTest::execute(){
               << vCollRem.size() << " removed collections found again " << collsFound
               << " tested " << collsFound1
               << std::endl;
+#endif        
+              
+              
     m_container->cleanup();
     for (unsigned int coll = 0; coll < vCollRem.size(); ++coll) {
         delete vCollRem[coll];
diff --git a/Event/EventContainers/src/ID_ContainerTest.h b/Event/EventContainers/test/ID_ContainerTest.h
similarity index 100%
rename from Event/EventContainers/src/ID_ContainerTest.h
rename to Event/EventContainers/test/ID_ContainerTest.h
diff --git a/Event/EventInfo/doc/packagedoc.h b/Event/EventInfo/doc/packagedoc.h
index a24f5af9023bcddd235ac33e196cf08aa6139b75..4495f5b8339ad7d96f3011907b17cb170d364383 100644
--- a/Event/EventInfo/doc/packagedoc.h
+++ b/Event/EventInfo/doc/packagedoc.h
@@ -33,10 +33,8 @@ begin/end event incidences by the IIncidentSvc. This class provides
 access to the EventInfo object to the object receiving the Incident. 
 
 
-@section EventInfo_requirements requirements
 
 
-@section EventInfo_uses Packages used
 
 
 */
diff --git a/Event/EventInfoMgt/doc/packagedoc.h b/Event/EventInfoMgt/doc/packagedoc.h
index c09d85826a42570f3b1d8f22977a4b86ff1c7de3..36e9ac14bd86ad3387ed7c4be69ce4b0843247e4 100644
--- a/Event/EventInfoMgt/doc/packagedoc.h
+++ b/Event/EventInfoMgt/doc/packagedoc.h
@@ -48,10 +48,8 @@ OverrideEventInfoTags   - true
 ExtraTagValuePairs      - just add in release version
 TagInfoKey              - ProcessingTags
 
-@section EventInfoMgt_requirements requirements
 
 
-@section EventInfoMgt_uses Packages used
 
 
 */
diff --git a/Event/EventInfoMgt/src/TagInfoMgr.cxx b/Event/EventInfoMgt/src/TagInfoMgr.cxx
index 6af6ec962e09c238b3f7095d111e15c875aaf332..771e396958d6d10bd92c6954ef891be432d54217 100755
--- a/Event/EventInfoMgt/src/TagInfoMgr.cxx
+++ b/Event/EventInfoMgt/src/TagInfoMgr.cxx
@@ -710,7 +710,9 @@ TagInfoMgr::handle(const Incident& inc) {
         nsTime         += evt->event_ID()->time_stamp_ns_offset();
         curTime.setTimestamp(nsTime);
 
-        if (StatusCode::SUCCESS != m_iovDbSvc->signalBeginRun(curTime)) {
+        if (StatusCode::SUCCESS != m_iovDbSvc->signalBeginRun(curTime,
+                                                              inc.context()))
+        {
             m_log << MSG::ERROR << "Unable to signal begin run to IOVDbSvc" << endmsg;
             throw GaudiException( "Unable to signal begin run to IOVDbSvc", "TagInfoMgr::handle", StatusCode::FAILURE );
         }
@@ -920,7 +922,8 @@ TagInfoMgr::preLoadAddresses( StoreID::type storeID,
 
 
 StatusCode       
-TagInfoMgr::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad)
+TagInfoMgr::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad,
+                          const EventContext& /*ctx*/)
 {
     //
     // Here we do nothing, simply return success for TagInfo
diff --git a/Event/EventInfoMgt/src/TagInfoMgr.h b/Event/EventInfoMgt/src/TagInfoMgr.h
index 26337abd9d972aa932ba1923a79a52ee892d423a..51eb17a333c5a3d5a14555cdc61c9fb796202a15 100755
--- a/Event/EventInfoMgt/src/TagInfoMgr.h
+++ b/Event/EventInfoMgt/src/TagInfoMgr.h
@@ -125,7 +125,8 @@ public:
 					 tadList& tlist );
       
     ///  Create a TagInfo object and record in storegate
-    virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad );
+    virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad,
+                                     const EventContext& ctx);
 
 
     /// Implementation of IConverter: Create the transient representation of an object from persistent state.
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py
index 04aeded00b9d54cccdc957d31490c2b184249d42..0e2a58ffa5c1ca9363cd899bc46d3286a73765de 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/ConfiguredOverlay_jobOptions.py
@@ -49,7 +49,8 @@ if readBS:
     include("RecExCommon/BSRead_config.py")
     ServiceMgr.ByteStreamInputSvc.FullFileName = DataInputCollections
     ServiceMgr.ByteStreamInputSvc.EventStore= "StoreGateSvc/OriginalEvent_SG"
-    ServiceMgr.ByteStreamAddressProviderSvc.StoreID=6
+    from AthenaKernel import StoreID
+    ServiceMgr.ByteStreamAddressProviderSvc.StoreID=StoreID.UNKNOWN
     from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import AthenaPoolAddressProviderSvc
     ServiceMgr += AthenaPoolAddressProviderSvc("AthenaPoolAddressProviderSvc")
     ServiceMgr.ProxyProviderSvc.ProviderNames += [ "AthenaPoolAddressProviderSvc" ]
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
index 9a650f13535f61589c6119d4b0e9ee8e26832224..26a4b0d6a6911094242c6b1b11f9dcb9e215022d 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/InnerDetectorOverlay_jobOptions.py
@@ -48,11 +48,6 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
            #if not conddb.folderRequested('/SCT/DAQ/Calibration/ChipNoise'):
            #   conddb.addFolderSplitOnline("SCT","/SCT/DAQ/Calibration/ChipNoise","/SCT/DAQ/Calibration/ChipNoise",forceMC=True)
 
-        # Dynamic configuration of SCT RDO type
-        # This algorithm must be executed before SCT_Digitization
-        from InDetOverlay.InDetOverlayConf import DynConfSCT
-        job += DynConfSCT()
-
         job += CfgGetter.getAlgorithm("SCT_OverlayDigitization")
         CfgGetter.getPublicTool("SCT_DigitizationTool").InputObjectName="SCT_Hits"
         if readBS and isRealData:
@@ -90,3 +85,4 @@ if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.
        include ("EventOverlayJobTransforms/InDetMcSignal_jobOptions.py")
 
     job += CfgGetter.getAlgorithm("InDetOverlay")
+    job += CfgGetter.getAlgorithm("InDetSDOOverlay")
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/Looper.py b/Event/EventOverlay/EventOverlayJobTransforms/share/Looper.py
index 61950654e7d84a57ff1d6a5ca2dae3094d23ceff..f9835f3453b78fbe378f10b97e96849320892d41 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/Looper.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/Looper.py
@@ -1,31 +1,5 @@
 
 ## Enable the looper killer, with options for overlay
 #  Don't kill the event, but flag it as bad
-try:
-    if (hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions()):
-        # this configures the MT LooperKiller
-        from G4UserActions import G4UserActionsConfig
-        try:
-            G4UserActionsConfig.addLooperKillerTool() #FIXME should be LooperKillerEventOverlay
-        except AttributeError:
-            atlasG4log.warning("Could not add the MT-version of the LooperKiller")
-    else:
-        # this configures the non-MT looperKiller
-        try:
-            from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-        except ImportError:
-            from G4AtlasServices.UserActionStore import UAStore
-        from AthenaCommon.CfgGetter import getPublicToolClone
-        # create a special instance of the LooperKiller, with specific configuration
-        lkAction = getPublicToolClone("LooperKillerEventOverlay", "LooperKiller", PrintSteps=10, MaxSteps=1000000, VerboseLevel=1, AbortEvent=0, SetError=1)
-        UAStore.addAction(lkAction,['Step'])
-except:
-    # Pre UserAction Migration
-    def use_looperkiller():
-        from G4AtlasApps import PyG4Atlas, AtlasG4Eng
-        lkAction = PyG4Atlas.UserAction('G4UserActions', 'LooperKiller', ['BeginOfRun', 'EndOfRun', 'BeginOfEvent', 'EndOfEvent', 'Step'])
-        #lkAction.set_Properties( {"PrintSteps":"0", "MaxSteps":"10", "VerboseLevel":"0", "AbortEvent":"0", "SetError":"1"} ) #to kill most everything
-        lkAction.set_Properties( {"PrintSteps":"10", "MaxSteps":"1000000", "VerboseLevel":"1", "AbortEvent":"0", "SetError":"1"} )
-        AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(lkAction)
-
-    simFlags.InitFunctions.add_function("postInit", use_looperkiller)
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerEventOverlayTool', ['Step'])
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/TruthOverlay_jobOptions.py b/Event/EventOverlay/EventOverlayJobTransforms/share/TruthOverlay_jobOptions.py
index 7aaa8f8515b832bab24d2c9a6da4d34e2b11d57e..85d7d0afa1b081bfc3775376ac035173ce33f5f6 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/TruthOverlay_jobOptions.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/TruthOverlay_jobOptions.py
@@ -17,6 +17,7 @@ from OverlayCommonAlgs.OverlayCommonAlgsConf import CopyMcEventCollection
 job += CopyMcEventCollection()
 if readBS and isRealData:
     job.CopyMcEventCollection.RealData = True
+    job.CopyMcEventCollection.InfoType = "ByteStreamEventInfo"
 
 if not isRealData:
     from OverlayCommonAlgs.OverlayCommonAlgsConf import CopyTruthInfo
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py
index 2e9925f4c94dfddf70b16d9dd302b45cda07c383..5613117dc7a4aaf0a78f64319e2e564f2a5971cc 100644
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py
+++ b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.combinedinput.py
@@ -152,6 +152,11 @@ if jobproperties.Beam.beamType.get_Value() != 'cosmics':
     else:
         simFlags.EventFilter.set_On()
 
+## Always enable the looper killer, unless it's been disabled
+if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
+    simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool', ['Step'])
+else:
+    atlasG4log.warning("The looper killer will NOT be run in this job.")
 
 ## Add G4 alg to alg sequence
 from AthenaCommon.AlgSequence import AlgSequence
@@ -217,31 +222,3 @@ if hasattr(runArgs, "postExec"):
         atlasG4log.info(cmd)
         exec(cmd)
 
-
-## Always enable the looper killer, unless it's been disabled
-if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
-    try:
-        # Pre UserAction Migration
-        def use_looperkiller():
-            from G4AtlasApps import PyG4Atlas, AtlasG4Eng
-            lkAction = PyG4Atlas.UserAction('G4UserActions', 'LooperKiller', ['BeginOfRun', 'EndOfRun', 'BeginOfEvent', 'EndOfEvent', 'Step'])
-            AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(lkAction)
-        simFlags.InitFunctions.add_function("postInit", use_looperkiller)
-    except:
-        if (hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions()):
-            # this configures the MT LooperKiller
-            from G4UserActions import G4UserActionsConfig
-            try:
-                G4UserActionsConfig.addLooperKillerTool()
-            except AttributeError:
-                atlasG4log.warning("Could not add the MT-version of the LooperKiller")
-        else:
-            # this configures the non-MT looperKiller
-            try:
-                from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-            except ImportError:
-                from G4AtlasServices.UserActionStore import UAStore
-            # add default configurable
-            UAStore.addAction('LooperKiller',['Step'])
-else:
-    atlasG4log.warning("The looper killer will NOT be run in this job.")
diff --git a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.overlay.py b/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.overlay.py
deleted file mode 100644
index 92fb88a5640db2de4d4cff4090a808d736564aa9..0000000000000000000000000000000000000000
--- a/Event/EventOverlay/EventOverlayJobTransforms/share/skeleton.overlay.py
+++ /dev/null
@@ -1,175 +0,0 @@
-from AthenaCommon.Logging import logging
-overlaylog = logging.getLogger('overlay')
-overlaylog.info( '****************** STARTING OVERLAY *****************' )
-
-import AthenaCommon.AtlasUnixStandardJob
-
-for cf in runArgs.jobConfig:
-    include(cf)
-
-#==============================================================
-# Job definition parameters:
-#==============================================================
-from AthenaCommon.GlobalFlags import GlobalFlags
-from AthenaCommon.GlobalFlags  import globalflags
-
-globalflags.isOverlay.set_Value_and_Lock(True)
-
-from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-from AthenaCommon.AthenaCommonFlags import jobproperties
-jobproperties.AthenaCommonFlags.EvtMax = runArgs.maxEvents
-jobproperties.AthenaCommonFlags.SkipEvents= runArgs.skipEvents
-
-jobproperties.AthenaCommonFlags.PoolHitsInput=runArgs.inputHitsFile
-jobproperties.AthenaCommonFlags.PoolRDOOutput=runArgs.outputRDOFile
-
-from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion=runArgs.geometryVersion
-
-from Digitization.DigitizationFlags import jobproperties
-jobproperties.Digitization.rndmSeedOffset1=int(runArgs.digiSeedOffset1)
-jobproperties.Digitization.rndmSeedOffset2=int(runArgs.digiSeedOffset2)
-jobproperties.Digitization.physicsList=runArgs.samplingFractionDbTag
-jobproperties.Digitization.rndmSvc=runArgs.digiRndmSvc
-
-SignalInputCollections = runArgs.inputHitsFile
-jobproperties.AthenaCommonFlags.PoolRDOOutput = runArgs.outputRDOFile
-OverlayCollection = runArgs.outputRDOFile
-
-from AthenaCommon.DetFlags import DetFlags
-SignalCollection = runArgs.signalRDOFile
-if runArgs.signalRDOFile=="NONE":
-    overlayFlags.doSignal=False
-else:
-    overlayFlags.doSignal=True
-
-DetFlags.overlay.BCM_setOff()
-DetFlags.overlay.Lucid_setOff()
-
-readBS = runArgs.ReadByteStream
-isRealData = False
-
-if readBS:
-   globalflags.InputFormat.set_Value_and_Lock('bytestream')
-   DataInputCollections=runArgs.inputZeroBiasBSFile
-else:
-   DataInputCollections=runArgs.pileupBSFile
-   jobproperties.AthenaCommonFlags.PoolRDOInput=runArgs.pileupBSFile
-
-if runArgs.conditionsTag!='NONE' and runArgs.conditionsTag!='':
-   globalflags.ConditionsTag=runArgs.conditionsTag
-   if len(globalflags.ConditionsTag())!=0:
-      from IOVDbSvc.CondDB import conddb
-      conddb.setGlobalTag(globalflags.ConditionsTag())
-
-DetFlags.Print()
-
-# LVL1 Trigger Menu
-if runArgs.triggerConfig!="NONE":
-    # LVL1 Trigger Menu
-    # PJB 9/2/2009 Setup the new triggerConfig flags here
-    from TriggerJobOpts.TriggerFlags import TriggerFlags
-    triggerArg = runArgs.triggerConfig
-    #if not prefixed with LVL1: add it here
-    Args = triggerArg.split(":")
-    if Args[0] != "LVL1":
-        TriggerFlags.triggerConfig ="LVL1:"+triggerArg
-    else:
-        TriggerFlags.triggerConfig =triggerArg
-    overlaylog.info( 'triggerConfig argument is: %s ', TriggerFlags.triggerConfig.get_Value() )
-    from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
-    cfg = TriggerConfigGetter("HIT2RDO")
-
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.ID_setOn()
-DetFlags.Muon_setOn()
-DetFlags.LAr_setOn()
-DetFlags.Tile_setOn()
-if runArgs.triggerConfig=="NONE":
-  DetFlags.LVL1_setOff()
-else:
-  DetFlags.LVL1_setOn()
-
-DetFlags.BCM_setOn()
-DetFlags.Lucid_on()
-
-DetFlags.simulateLVL1.Lucid_setOff()
-
-print "================ DetFlags ================ "
-DetFlags.Print()
-
-# Geometry, controlled by DetFlags
-#GlobalFlags.DetGeo.set_atlas()
-#GlobalFlags.DataSource.set_geant4()
-globalflags.DataSource.set_Value_and_Lock('geant4')
-
-#from AtlasGeoModel import SetGeometryVersion
-#from AtlasGeoModel import GeoModelInit
-
-include ( "RecExCond/AllDet_detDescr.py" )
-
-#from AtlasGeoModel import SetGeometryVersion
-#from AtlasGeoModel import GeoModelInit
-#from AtlasGeoModel import SetupRecoGeometry
-
-#include( "BFieldAth/BFieldAth_jobOptions.py" )
-
-#--------
-from AthenaCommon.AppMgr import theApp
-theApp.EventLoop = "PileUpEventLoopMgr"
-theApp.EvtMax = runArgs.maxEvents
-
-include ( "EventOverlayJobTransforms/ConfiguredOverlay_jobOptions.py" )
-
-if DetFlags.overlay.Truth_on():
-   include ( "EventOverlayJobTransforms/TruthOverlay_jobOptions.py" )
-
-if DetFlags.overlay.BCM_on() or DetFlags.overlay.Lucid_on():
-   include ( "EventOverlayJobTransforms/BeamOverlay_jobOptions.py" )
-
-if DetFlags.overlay.pixel_on() or DetFlags.overlay.SCT_on() or DetFlags.overlay.TRT_on():
-   include ( "EventOverlayJobTransforms/InnerDetectorOverlay_jobOptions.py" )
-
-if DetFlags.overlay.LAr_on() or DetFlags.overlay.Tile_on():
-   include ( "EventOverlayJobTransforms/CaloOverlay_jobOptions.py" )
-
-if DetFlags.overlay.CSC_on() or DetFlags.overlay.MDT_on() or DetFlags.overlay.RPC_on() or DetFlags.overlay.TGC_on():
-   include ( "EventOverlayJobTransforms/MuonOverlay_jobOptions.py" )
-
-if DetFlags.overlay.LVL1_on():
-   include ( "EventOverlayJobTransforms/Level1Overlay_jobOptions.py" )
-
-# save the overlay output first
-include ( "EventOverlayJobTransforms/OverlayOutputItemList_jobOptions.py" )
-
-# now save the signal information in the same job
-overlayFlags.doSignal==True:
-   include ( "EventOverlayJobTransforms/SignalOutputItemList_jobOptions.py" )
-
-# For random number initialization
-from AthenaCommon.ConfigurableDb import getConfigurable
-ServiceMgr += getConfigurable(jobproperties.Digitization.rndmSvc.get_Value())()
-jobproperties.Digitization.rndmSeedList.addtoService()
-jobproperties.Digitization.rndmSeedList.printSeeds()
-
-# To not overwrite the BCID
-#from AthenaCommon.AppMgr import ServiceMgr
-#ServiceMgr.PileUpEventLoopMgr.IsEventOverlayJob=True
-
-#================================================================
-print "overlay_trf: final outStream = ", outStream
-
-#================================================================
-# Logging
-#--------------------------------------------------------------
-#ServiceMgr.MessageSvc.OutputLevel = INFO
-ServiceMgr.MessageSvc.OutputLevel = INFO
-ServiceMgr.MessageSvc.Format = "% F%45W%S%7W%R%T %0W%M"
-
-print "overlay_trf: at the end. job=\n", job
-print "\n\noverlay_trf: at the end. ServiceMgr=\n", ServiceMgr
-
-# Post-include
-if hasattr(runArgs,"postInclude"):
-    for fragment in runArgs.postInclude:
-        include(fragment)
diff --git a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc
index d7a666dca918ae9b3754984a2d2cab6787922601..e3b27d65eb4695d8b1f2afe6974fe9bc05a9d043 100644
--- a/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc
+++ b/Event/EventOverlay/IDC_OverlayBase/IDC_OverlayBase/IDC_OverlayCommon.icc
@@ -50,63 +50,62 @@ namespace Overlay {
                         IDC_Container *outputContainer,       
 			OvlAlg *parent)
   {
-    typedef typename IDC_Container::base_value_type Collection;
-std::cout<<"start overlayContainer"<<std::endl;
-    if(parent->msgLvl(MSG::DEBUG)) { parent->msg(MSG::DEBUG)<<"overlayContainerNew<>() begin"<<endmsg; }
+   typedef typename IDC_Container::base_value_type Collection;
+   std::cout<<"start overlayContainer"<<std::endl;
+   if(parent->msgLvl(MSG::DEBUG)) { parent->msg(MSG::DEBUG)<<"overlayContainerNew<>() begin"<<endmsg; }
 
+   //There are some use cases where this is empty
+   if(dataContainer != nullptr){
    /** Add data from the data container to the output one */
-   typename IDC_Container::const_iterator p_data = dataContainer->begin();
-   typename IDC_Container::const_iterator p_data_end = dataContainer->end();
+      typename IDC_Container::const_iterator p_data = dataContainer->begin();
+      typename IDC_Container::const_iterator p_data_end = dataContainer->end();
 
-   for(; p_data != p_data_end; ++p_data) {
-   IdentifierHash hashId = p_data.hashId();
-   Collection *coll_data=new Collection(hashId); 
-   copyCollection(p_data->cptr(),coll_data);
+      for(; p_data != p_data_end; ++p_data) {
+         IdentifierHash hashId = p_data.hashId();
+         auto coll_data = std::make_unique<Collection>(hashId); 
+         copyCollection(*p_data,coll_data.get());
    
-   if ( outputContainer->addCollection(coll_data, p_data.hashId()).isFailure() ) {
-      parent->msg(MSG::WARNING) <<"add data Collection failed for output "<< p_data.hashId()<<endmsg; //" collectionNo "<<collectionNo<<endmsg; 
+         if ( outputContainer->addCollection(coll_data.release(), p_data.hashId()).isFailure() ) {
+            parent->msg(MSG::WARNING) <<"add data Collection failed for output "<< p_data.hashId   ()<<endmsg; //" collectionNo "<<collectionNo<<endmsg; 
+         } 
       }
-   }     
+   }
 
-  /** Add data from the ovl container to the output one */
-  typename IDC_Container::const_iterator p_ovl = mcContainer->begin(); 
-  typename IDC_Container::const_iterator p_ovl_end = mcContainer->end();
+   /** Add data from the ovl container to the output one */
+   typename IDC_Container::const_iterator p_ovl = mcContainer->begin(); 
+   typename IDC_Container::const_iterator p_ovl_end = mcContainer->end();
 
-  for(; p_ovl != p_ovl_end; ++p_ovl) {
+   for(; p_ovl != p_ovl_end; ++p_ovl) {
  
-  IdentifierHash coll_id = p_ovl.hashId();//(*p_ovl)->identify();
-  Collection *coll_ovl=new Collection(coll_id); 
-  copyCollection(p_ovl->cptr(),coll_ovl);
-
-   /** The newly created stuff will go to the output EventStore SG */
-   Collection *out_coll = new Collection( coll_id );
-   out_coll->setIdentifier((*p_ovl)->identify());
-
-/** Look for the same ID in the main StoreGate EventStore */ 
-    typename IDC_Container::const_iterator q = outputContainer->indexFind( coll_id );
-    if( q != outputContainer->end() ) {
-      /** Need to merge the collections
-          Retrieve q */
-
-      Collection *coll_data = (Collection *) q->cptr();
-      mergeCollectionsNew(coll_data,coll_ovl, out_coll,parent);
-
-      outputContainer->removeCollection(p_ovl.hashId());
-      if (outputContainer->addCollection(out_coll, p_ovl.hashId()).isFailure() ) {
-	parent->msg(MSG::WARNING) << "overlay addCollection failed " << endmsg; 
-      }
-
+      IdentifierHash coll_id = p_ovl.hashId();//(*p_ovl)->identify();
+      auto coll_ovl = std::make_unique<Collection>(coll_id);	
+      copyCollection(*p_ovl,coll_ovl.get());
+
+      /** The newly created stuff will go to the output EventStore SG */
+      auto coll_out = std::make_unique<Collection>(coll_id);
+      coll_out->setIdentifier((*p_ovl)->identify());
+
+      /** Look for the same ID in the main StoreGate EventStore */ 
+      typename IDC_Container::const_iterator q = outputContainer->indexFind( coll_id );
+      if( q != outputContainer->end() ) {
+      /**Need to merge the collections
+         Retrieve q */
+         std::unique_ptr <Collection> coll_data ((Collection *) *q);
+         mergeCollectionsNew(coll_data.get(),coll_ovl.get(),coll_out.get(),parent);
+
+         outputContainer->removeCollection(p_ovl.hashId());
+         if (outputContainer->addCollection(coll_out.release(), p_ovl.hashId()).isFailure() ) {
+      	    parent->msg(MSG::WARNING) << "overlay addCollection failed " << endmsg; 
+         }
       }
     else {
-      /** Copy the complete collection from ovl to output, 
-          hopefully preserving the "most derived" type of its raw data */ 
-       if ( outputContainer->addCollection(coll_ovl, coll_id).isFailure() ) {
-        	parent->msg(MSG::WARNING) << "add mc Collection failed " << endmsg; 
+       /** 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() ) {
+       	  parent->msg(MSG::WARNING) << "add mc Collection failed " << endmsg; 
       }
-  
-  }
+    }   
    }
-
   }
 
 
@@ -127,70 +126,69 @@ std::cout<<"start overlayContainer"<<std::endl;
     // min bias and pile up.   Thus we firstly copy data collection to the 
     // output and then merge with MC inputs.
 
-   /** Add data from the data container to the output one */
-   typename IDC_Container::const_iterator p_data = dataContainer->begin();
-   typename IDC_Container::const_iterator p_data_end = dataContainer->end();
+    /** Add data from the data container to the output one */
+    typename IDC_Container::const_iterator p_data = dataContainer->begin();
+    typename IDC_Container::const_iterator p_data_end = dataContainer->end();
  
-   for(; p_data != p_data_end; ++p_data) {
-     IdentifierHash hashId = p_data.hashId();
-     Identifier ident = p_data->cptr()->identify();	
-     Collection *coll_data=new Collection(ident, hashId); 
-
-     typename Collection::const_iterator firstData = p_data->cptr()->begin();
-     typename Collection::const_iterator lastData = p_data->cptr()->end();    
-     for (; firstData != lastData; ++firstData) {		       
-        Datum* newData = new Datum (*(dynamic_cast<const Datum*>(*firstData)));
-        coll_data->push_back(newData);
-    }	
+    for(; p_data != p_data_end; ++p_data) {
+       IdentifierHash hashId = p_data.hashId();
+       Identifier ident = p_data->identify();	
+       auto coll_data = std::make_unique<Collection>(ident, hashId);	
+      
+       typename Collection::const_iterator firstData = p_data->begin();
+       typename Collection::const_iterator lastData = p_data->end();    
+       for (; firstData != lastData; ++firstData) {		       
+          Datum* newData = new Datum (*(dynamic_cast<const Datum*>(*firstData)));
+          coll_data->push_back(newData);
+       }	
    
-   if ( outputContainer->addCollection(coll_data, p_data.hashId()).isFailure() ) {
-     parent->msg(MSG::WARNING) <<"add data Collection failed for output "<< p_data.hashId()<<endmsg; 
+       if ( outputContainer->addCollection(coll_data.release(), p_data.hashId()).isFailure() ) {
+          parent->msg(MSG::WARNING) <<"add data Collection failed for output "<< p_data.hashId()<<endmsg; 
       }
-   }     
-
-   /** Add data from the ovl container to the output one */
-   typename IDC_Container::const_iterator p_ovl = mcContainer->begin(); 
-   typename IDC_Container::const_iterator p_ovl_end = mcContainer->end();
-
-   for(; p_ovl != p_ovl_end; ++p_ovl) {
-    IdentifierHash coll_id = p_ovl.hashId();//(*p_ovl)->identify();
-    Identifier elemId = p_ovl->cptr()->identify();
-    Collection *coll_ovl=new Collection(elemId, coll_id); 
-
-    typename Collection::const_iterator firstData = p_ovl->cptr()->begin();
-    typename Collection::const_iterator lastData = p_ovl->cptr()->end();    
-    for (; firstData != lastData; ++firstData) {		       
-        Datum* newData = new Datum (*(dynamic_cast<const Datum*>(*firstData)));
-        coll_ovl->push_back(newData);
+    }     
+
+    /** Add data from the ovl container to the output one */
+    typename IDC_Container::const_iterator p_ovl = mcContainer->begin(); 
+    typename IDC_Container::const_iterator p_ovl_end = mcContainer->end();
+
+    for(; p_ovl != p_ovl_end; ++p_ovl) {
+       IdentifierHash coll_id = p_ovl.hashId();//(*p_ovl)->identify();
+       Identifier elemId = p_ovl->identify();
+       auto coll_ovl = std::make_unique<Collection>(elemId, coll_id);	
+     
+       typename Collection::const_iterator firstData = p_ovl->begin();
+       typename Collection::const_iterator lastData = p_ovl->end();    
+       for (; firstData != lastData; ++firstData) {		       
+          Datum* newData = new Datum (*(dynamic_cast<const Datum*>(*firstData)));
+          coll_ovl->push_back(newData);
     }	
    	
-   /** The newly created stuff will go to the output EventStore SG */
-   Collection *out_coll = new Collection(elemId, coll_id);
-
-   /** Look for the same ID in the main StoreGate EventStore */ 
-   typename IDC_Container::const_iterator q = outputContainer->indexFind(coll_id);
-   if( q != outputContainer->end() ) {
-      /** Need to merge the collections
-          Retrieve q */
-
-      Collection *coll_data = (Collection *) q->cptr();
-      parent->mergeCollections(coll_data,coll_ovl, out_coll);
-
-      outputContainer->removeCollection(p_ovl.hashId());
-      if (outputContainer->addCollection(out_coll, p_ovl.hashId()).isFailure() ) {
-	parent->msg(MSG::WARNING) << "overlay addCollection failed " << endmsg; 
-      }
-
-      }
-    else {
-      /** Copy the complete collection from ovl to output, 
-          hopefully preserving the "most derived" type of its raw data */ 
-       if ( outputContainer->addCollection(coll_ovl, coll_id).isFailure() ) {
-        parent->msg(MSG::WARNING) << "add mc Collection failed " << endmsg; 
-      }  
-    }   
-   }
-  }
+       /** The newly created stuff will go to the output EventStore SG */
+       auto coll_out = std::make_unique<Collection>(elemId, coll_id);	    
+     
+       /** Look for the same ID in the main StoreGate EventStore */ 
+       typename IDC_Container::const_iterator q = outputContainer->indexFind(coll_id);
+       if( q != outputContainer->end() ) {
+       /** Need to merge the collections
+           Retrieve q */
+
+          std::unique_ptr <Collection> coll_data ((Collection *) *q);
+          parent->mergeCollections(coll_data.get(),coll_ovl.get(),coll_out.get());
+
+          outputContainer->removeCollection(p_ovl.hashId());
+          if (outputContainer->addCollection(coll_out.release(), p_ovl.hashId()).isFailure() ) {
+	     parent->msg(MSG::WARNING) << "overlay addCollection failed " << endmsg; 
+          }
+       }
+       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() ) {
+              parent->msg(MSG::WARNING) << "add mc Collection failed " << endmsg; 
+           }  
+       }   
+    }  
+ }
 
 } // namespace Overlay
 
diff --git a/Event/EventOverlay/OverlayCommonAlgs/src/CopyMcEventCollection.cxx b/Event/EventOverlay/OverlayCommonAlgs/src/CopyMcEventCollection.cxx
index c99d4bcf39485b5cbaf061b2d7e97d324df98512..edd310ed8f10809c97f6cbcb4371367c4f71f7c7 100644
--- a/Event/EventOverlay/OverlayCommonAlgs/src/CopyMcEventCollection.cxx
+++ b/Event/EventOverlay/OverlayCommonAlgs/src/CopyMcEventCollection.cxx
@@ -30,7 +30,7 @@ CopyMcEventCollection::CopyMcEventCollection(const std::string &name, ISvcLocato
   m_storeGateData2("StoreGateSvc/OriginalEvent2_SG", name),
   m_cnvTool( "xAODMaker::EventInfoCnvTool/EventInfoCnvTool", this )
 {
-  declareProperty("InfoType", m_infoType="MyEvent");
+  declareProperty("InfoType", m_infoType="McEventInfo");
   declareProperty("RealData", m_realdata=false);
   declareProperty("DataStore2", m_storeGateData2, "help");
   declareProperty("CheckEventNumbers", m_checkeventnumbers=true);
diff --git a/Event/EventOverlay/OverlayMonitoringRTT/test/OverlayMonitoringRTT_TestConfiguration.xml b/Event/EventOverlay/OverlayMonitoringRTT/test/OverlayMonitoringRTT_TestConfiguration.xml
index a1818eef1c0eb519423b5df8985a47a1b34a14fc..eed63832789bc43be71981b35763d07f1b0cb032 100644
--- a/Event/EventOverlay/OverlayMonitoringRTT/test/OverlayMonitoringRTT_TestConfiguration.xml
+++ b/Event/EventOverlay/OverlayMonitoringRTT/test/OverlayMonitoringRTT_TestConfiguration.xml
@@ -19,7 +19,7 @@
               <doc></doc>
               <jobTransformJobName>MC15_2016_Legacy_OverlayChain_tf</jobTransformJobName>
               <jobTransformCmd>
-		OverlayChain_tf.py --inputZeroBiasBSFile /afs/cern.ch/work/t/tkharlam/public/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 --DataRunNumber 2015 --inputEVNTFile /afs/cern.ch/work/t/tkharlam/public/overlay_RTT/mc15_13TeV.147407.PowhegPythia8_AZNLO_Zmumu.evgen.EVNT.e4032/EVNT.05685490._000002.pool.root.1 --outputRDOFile testRTT.RDO.pool.root --outputHITSFile testRTT.HITS.pool.root --triggerBit 240 --skipEvents 0 --maxEvents 10 --randomSeed 123456789 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag CONDBR2-BLKPA-2016-12 --digiSeedOffset1=211 --digiSeedOffset2=122 --samplingFractionDbTag FTFP_BERT_BIRK --fSampltag LARElecCalibMCfSampl-G496-19213- --preInclude 'sim:EventOverlayJobTransforms/custom.py,EventOverlayJobTransforms/magfield.py' 'overlayBS:EventOverlayJobTransforms/custom.py' --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' --postInclude 'sim:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py,EventOverlayJobTransforms/muAlign.py,EventOverlayJobTransforms/g4runnumber.py' 'overlayBS:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' --ignorePatterns "L1TopoMenuLoader.+ERROR." 
+		OverlayChain_tf.py --inputZeroBiasBSFile /afs/cern.ch/work/t/tkharlam/public/overlay_RTT/mc15_valid.00200010.overlay_streamsAll_2016_pp_1.skim.DRAW.r8381/DRAW.09331084._000146.pool.root.1 --DataRunNumber 2015 --inputEVNTFile /afs/cern.ch/work/t/tkharlam/public/overlay_RTT/mc15_13TeV.147407.PowhegPythia8_AZNLO_Zmumu.evgen.EVNT.e4032/EVNT.05685490._000002.pool.root.1 --outputRDOFile testRTT.RDO.pool.root --outputHITSFile testRTT.HITS.pool.root --triggerBit 240 --skipEvents 0 --maxEvents 10 --randomSeed 123456789 --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag CONDBR2-BLKPA-2016-12 --digiSeedOffset1=211 --digiSeedOffset2=122 --samplingFractionDbTag FTFP_BERT_BIRK --fSampltag LARElecCalibMCfSampl-G496-19213- --preInclude 'sim:EventOverlayJobTransforms/custom.py,EventOverlayJobTransforms/magfield.py' 'overlayBS:EventOverlayJobTransforms/custom.py' --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.nSamples.set_Value_and_Lock(4);from LArConditionsCommon.LArCondFlags import larCondFlags; larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase")' --postInclude 'sim:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py,EventOverlayJobTransforms/muAlign.py,EventOverlayJobTransforms/g4runnumber.py' 'overlayBS:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py' --ignorePatterns "L1TopoMenuLoader.+ERROR." 
               </jobTransformCmd>
               <group>Overlay_JobTransforms</group>
               <queue>long</queue>
@@ -115,7 +115,7 @@
                   <doc>Reco of MC+Data overlay</doc>
                   <jobTransformJobName>MC15_2016_Legacy_Reco_tf</jobTransformJobName>
                   <jobTransformCmd>
-		    Reco_tf.py --inputRDOFile testRTT.RDO.pool.root --outputESDFile testRTT.ESD.pool.root --outputAODFile testRTT.AOD.pool.root --preInclude 'EventOverlayJobTransforms/custom.py,EventOverlayJobTransforms/recotrfpre.py' --postInclude 'r2e:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py,EventOverlayJobTransforms/muAlign_reco.py' --preExec 'from LArConditionsCommon.LArCondFlags import larCondFlags;larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase");rec.doTrigger=False;' --ignorePatterns "L1TopoMenuLoader.+ERROR." --postExec 'r2e:from AthenaCommon import CfgGetter;CfgGetter.getPublicTool("LArCellBuilderFromLArRawChannelTool").RawChannelsName = "LArRawChannels_FromDigits"'
+		    Reco_tf.py --inputRDOFile testRTT.RDO.pool.root --outputESDFile testRTT.ESD.pool.root --outputAODFile testRTT.AOD.pool.root --preInclude 'EventOverlayJobTransforms/custom.py,EventOverlayJobTransforms/recotrfpre.py' --postInclude 'r2e:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py,EventOverlayJobTransforms/muAlign_reco.py' --preExec 'from LArConditionsCommon.LArCondFlags import larCondFlags;larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase");rec.doTrigger=False;' --ignorePatterns "L1TopoMenuLoader.+ERROR." --postExec 'r2e:from LArCellRec.LArCellRecConf import LArCellBuilderFromLArRawChannelTool;LArCellBuilderFromLArRawChannelTool.RawChannelsName="LArRawChannels_FromDigits"'
                   </jobTransformCmd>
                   <group>Overlay_JobTransforms</group>
                   <chaindataset_info>
@@ -286,7 +286,7 @@
                   <doc>Reco of MC+Data overlay</doc>
                   <jobTransformJobName>MC15_2015_Legacy_Reco_tf</jobTransformJobName>
                   <jobTransformCmd>
-		    Reco_tf.py --inputRDOFile testRTT.RDO.pool.root --outputESDFile testRTT.ESD.pool.root --outputAODFile testRTT.AOD.pool.root --preInclude 'EventOverlayJobTransforms/custom.py,EventOverlayJobTransforms/recotrfpre.py' --postInclude 'r2e:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py,EventOverlayJobTransforms/muAlign_reco.py' --postExec 'r2e:from AthenaCommon import CfgGetter;CfgGetter.getPublicTool("LArCellBuilderFromLArRawChannelTool").RawChannelsName = "LArRawChannels_FromDigits"' --preExec 'from LArConditionsCommon.LArCondFlags import larCondFlags;larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase");rec.doTrigger=False' --ignorePatterns "L1TopoMenuLoader.+ERROR."
+		    Reco_tf.py --inputRDOFile testRTT.RDO.pool.root --outputESDFile testRTT.ESD.pool.root --outputAODFile testRTT.AOD.pool.root --preInclude 'EventOverlayJobTransforms/custom.py,EventOverlayJobTransforms/recotrfpre.py' --postInclude 'r2e:EventOverlayJobTransforms/Rt_override_CONDBR2-BLKPA-2015-12.py,EventOverlayJobTransforms/muAlign_reco.py' --postExec 'r2e:from LArCellRec.LArCellRecConf import LArCellBuilderFromLArRawChannelTool;LArCellBuilderFromLArRawChannelTool.RawChannelsName="LArRawChannels_FromDigits"' --preExec 'from LArConditionsCommon.LArCondFlags import larCondFlags;larCondFlags.OFCShapeFolder.set_Value_and_Lock("4samples1phase");rec.doTrigger=False' --ignorePatterns "L1TopoMenuLoader.+ERROR."
                   </jobTransformCmd>
                   <group>Overlay_JobTransforms</group>
                   <chaindataset_info>
@@ -361,7 +361,7 @@
               <doc></doc>
               <jobTransformJobName>MC_Legacy_OverlayPool_tf</jobTransformJobName>
               <jobTransformCmd>
-		OverlayPool_tf.py --inputHITSFile /afs/cern.ch/work/t/tkharlam/public/mc15_13TeV.422011.ParticleGun_single_mu_Pt100.simul.HITS.e4459_s2726/HITS.06623162._000064.pool.root.1 --inputRDO_BKGFile /afs/cern.ch/work/t/tkharlam/public/user.tkharlam.mc15_13TeV.159000.ParticleGenerator_nu_E50.RDO_EXT0/user.tkharlam.10837893.EXT0._000906.RDO.pool.root --outputRDOFile MC_plus_MC.RDO.pool.root --AddCaloDigi True --maxEvents 10 --skipEvents 2  --digiSeedOffset1 511 --digiSeedOffset2 727 --conditionsTag OFLCOND-RUN12-SDR-31 --triggerConfig 'OverlayPool=default' --postExec 'ServiceMgr.TGCcablingServerSvc.forcedUse=True;' --preExec '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);'
+		OverlayPool_tf.py --inputHITSFile /afs/cern.ch/work/t/tkharlam/public/overlay_RTT/mc16_13TeV.424000.ParticleGun_single_mu_Pt100.simul.HITS.e3580_s3126/HITS.11330296._000376.pool.root.1 --inputRDO_BKGFile /afs/cern.ch/work/t/tkharlam/public/overlay_RTT/user.tkharlam.PileupPremixing.r21.0.22.159000.ParticleGenerator_nu_E50.pileup.mc16a_caseA_EXT0/user.tkharlam.11805093.EXT0._000346.RDO.pool.root --outputRDOFile MC_plus_MC.RDO.pool.root --maxEvents 10 --skipEvents 2  --digiSeedOffset1 511 --digiSeedOffset2 727 --conditionsTag OFLCOND-MC16-SDR-14 --geometryVersion ATLAS-R2-2016-01-00-01 --digiRndmSvc AtRanluxGenSvc --samplingFractionDbTag QGSP_BERT_BIRK --triggerConfig 'OverlayPool=NONE' --postExec 'ServiceMgr.TGCcablingServerSvc.forcedUse=True' --preExec 'from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True);from LArConditionsCommon.LArCondFlags import larCondFlags;larCondFlags.OFCShapeFolder.set_Value_and_Lock("5samples1phase")' 
               </jobTransformCmd>
               <group>Overlay_JobTransforms</group>
               <queue>long</queue>
diff --git a/Event/PyDumper/python/Dumpers.py b/Event/PyDumper/python/Dumpers.py
index 29b8274d13434f0b5eeae43c0c5cb30375e68403..51f1524e7080d81e5614c4e34919649ecd3aab34 100644
--- a/Event/PyDumper/python/Dumpers.py
+++ b/Event/PyDumper/python/Dumpers.py
@@ -581,12 +581,12 @@ def dump_Muon (m, f):
            m.fitChi2(), m.fitNumberDoF(), m.fitChi2OverDoF(),
            m.bestMatch()),
     print >> f, '\n      b: %d %d %d %d %d %d %d %d %d %d %d %d' % \
-          (m.numberOfBLayerHits(),
+          (m.numberOfInnermostPixelLayerHits(),
            m.numberOfPixelHits(),
            m.numberOfSCTHits(),
            m.numberOfTRTHits(),
            m.numberOfTRTHighThresholdHits(),
-           m.numberOfBLayerSharedHits(),
+           m.numberOfInnermostPixelLayerSharedHits(),
            m.numberOfPixelSharedHits(),
            m.numberOfPixelHoles(),
            m.numberOfSCTSharedHits(),
diff --git a/Event/xAOD/xAODBase/xAODBase/ObjectType.h b/Event/xAOD/xAODBase/xAODBase/ObjectType.h
index 7df15566d8d70d2b26b203236342c82e9ff9218e..1c29e4b25207a365dc0168f7faabcae6b272e37d 100644
--- a/Event/xAOD/xAODBase/xAODBase/ObjectType.h
+++ b/Event/xAOD/xAODBase/xAODBase/ObjectType.h
@@ -57,6 +57,8 @@ namespace xAOD {
          Photon   = 7, ///< The object is a photon
          Muon     = 8, ///< The object is a muon
          Tau      = 9, ///< The object is a tau (jet)
+         
+         TrackCaloCluster = 10, ///< The object is a track-calo-cluster
 
          // }
 
diff --git a/Event/xAOD/xAODCore/Root/AuxContainerBase.cxx b/Event/xAOD/xAODCore/Root/AuxContainerBase.cxx
index db101afafaa0b715821bca0260fd8feacb151a9a..745ae9c44525f26f9eab59d3efb58406e7a71d18 100644
--- a/Event/xAOD/xAODCore/Root/AuxContainerBase.cxx
+++ b/Event/xAOD/xAODCore/Root/AuxContainerBase.cxx
@@ -323,6 +323,15 @@ namespace xAOD {
       return;
    }
    
+   /// Lock a decoration.
+   void AuxContainerBase::lockDecoration (SG::auxid_t auxid)
+   { 
+     guard_t guard (m_mutex);
+     if (m_store) {
+       m_store->lockDecoration (auxid);
+     }
+   }
+
    size_t AuxContainerBase::size() const {
 
       // Guard against multi-threaded execution:
diff --git a/Event/xAOD/xAODCore/Root/AuxInfoBase.cxx b/Event/xAOD/xAODCore/Root/AuxInfoBase.cxx
index ee7dd21d7d8bf1e43879aa1e2ef96781aa969662..1ed4da2d668703177aaf48097873ab13e904ad37 100644
--- a/Event/xAOD/xAODCore/Root/AuxInfoBase.cxx
+++ b/Event/xAOD/xAODCore/Root/AuxInfoBase.cxx
@@ -322,6 +322,15 @@ namespace xAOD {
       return;
    }
 
+   /// Lock a decoration.
+   void AuxInfoBase::lockDecoration (SG::auxid_t auxid)
+   { 
+     guard_t guard (m_mutex);
+     if (m_store) {
+       m_store->lockDecoration (auxid);
+     }
+   }
+
    size_t AuxInfoBase::size() const {
 
       // Should really always be 1, but do the general thing anyway...
diff --git a/Event/xAOD/xAODCore/Root/ShallowAuxContainer.cxx b/Event/xAOD/xAODCore/Root/ShallowAuxContainer.cxx
index dbb29b3717b0338dc8efbc28cbac09e1705c1fcc..cd2edfd99e1845bd14dbbbae8ea495ca425081d1 100644
--- a/Event/xAOD/xAODCore/Root/ShallowAuxContainer.cxx
+++ b/Event/xAOD/xAODCore/Root/ShallowAuxContainer.cxx
@@ -263,12 +263,11 @@ namespace xAOD {
    }
 
 
-   /// Clear all decorations.
-   void ShallowAuxContainer::clearDecorations()
+   /// Lock a decoration.
+   void ShallowAuxContainer::lockDecoration (SG::auxid_t auxid)
    { 
      guard_t guard (m_mutex);
-     m_store->clearDecorations();
-     ++m_tick;
+     m_store->lockDecoration (auxid);
    }
 
    size_t ShallowAuxContainer::size() const {
@@ -284,6 +283,15 @@ namespace xAOD {
       return 0;
    }
 
+   /// Clear all decorations.
+   void ShallowAuxContainer::clearDecorations()
+   { 
+     guard_t guard (m_mutex);
+     m_store->clearDecorations();
+     ++m_tick;
+   }
+
+
    //
    /////////////////////////////////////////////////////////////////////////////
 
diff --git a/Event/xAOD/xAODCore/xAODCore/AuxContainerBase.h b/Event/xAOD/xAODCore/xAODCore/AuxContainerBase.h
index 23f620bd1e43955c2e35b53e4bcfa2c4b136ee35..a7ff236d97d47a4eecd1d751059554d40ff85208 100644
--- a/Event/xAOD/xAODCore/xAODCore/AuxContainerBase.h
+++ b/Event/xAOD/xAODCore/xAODCore/AuxContainerBase.h
@@ -105,6 +105,9 @@ namespace xAOD {
       /// Get the size of the container.
       virtual size_t size() const;
 
+      /// Lock a decoration.
+      virtual void lockDecoration (SG::auxid_t auxid);
+ 
       /// @}
 
       /// @name Functions implementing the SG::IAuxStore interface
diff --git a/Event/xAOD/xAODCore/xAODCore/AuxInfoBase.h b/Event/xAOD/xAODCore/xAODCore/AuxInfoBase.h
index 03bf8b0a7612a8472aa02f84d57ccc7b0234a782..f72048d1f734b618b72532d29bcce86b72c1252e 100644
--- a/Event/xAOD/xAODCore/xAODCore/AuxInfoBase.h
+++ b/Event/xAOD/xAODCore/xAODCore/AuxInfoBase.h
@@ -102,6 +102,9 @@ namespace xAOD {
       /// Get the size of the container
       virtual size_t size() const;
 
+      /// Lock a decoration.
+      virtual void lockDecoration (SG::auxid_t auxid);
+
       /// @}
 
       /// @name Functions implementing the SG::IAuxStore interface
diff --git a/Event/xAOD/xAODCore/xAODCore/ShallowAuxContainer.h b/Event/xAOD/xAODCore/xAODCore/ShallowAuxContainer.h
index 8c24e7312c09b837bc1445593d38206b4de47b16..e22f63851767c684a735b1ec5a15d663d955c369 100644
--- a/Event/xAOD/xAODCore/xAODCore/ShallowAuxContainer.h
+++ b/Event/xAOD/xAODCore/xAODCore/ShallowAuxContainer.h
@@ -110,6 +110,8 @@ namespace xAOD {
       virtual void clearDecorations();
       /// Get the size of the container.
       virtual size_t size() const;
+      /// Lock a decoration.
+      virtual void lockDecoration (SG::auxid_t auxid);
       /// @}
 
       /// @name Functions implementing the SG::IAuxStore interface
diff --git a/Event/xAOD/xAODCutFlow/xAODCutFlow/CutBookkeeperContainer.h b/Event/xAOD/xAODCutFlow/xAODCutFlow/CutBookkeeperContainer.h
index 7af9fada3a7c689073d95b92be349cf567491146..029b6e51a7771a0638da0e89379ea8872bec0a4b 100644
--- a/Event/xAOD/xAODCutFlow/xAODCutFlow/CutBookkeeperContainer.h
+++ b/Event/xAOD/xAODCutFlow/xAODCutFlow/CutBookkeeperContainer.h
@@ -22,5 +22,9 @@ namespace xAOD {
 // Set up a CLID for the container:
 #include "xAODCore/CLASS_DEF.h"
 CLASS_DEF( xAOD::CutBookkeeperContainer, 1234982351, 1 )
+#include "AthenaKernel/MetaCont.h"
+CLASS_DEF( MetaCont<xAOD::CutBookkeeperContainer> , 34480468 , 1 )
+#include "SGTools/BaseInfo.h"
+SG_BASE( MetaCont<xAOD::CutBookkeeperContainer>, MetaContBase );
 
 #endif // XAODCUTFLOW_CUTBOOKKEEPERCONTAINER_H
diff --git a/Event/xAOD/xAODJet/Root/JetContainerInfo.cxx b/Event/xAOD/xAODJet/Root/JetContainerInfo.cxx
index 566a48ede05045c30aea4df85a32dc03ced6f345..cb57358b46b81cce2c5d39dcf2e75a8d57671004 100644
--- a/Event/xAOD/xAODJet/Root/JetContainerInfo.cxx
+++ b/Event/xAOD/xAODJet/Root/JetContainerInfo.cxx
@@ -74,19 +74,20 @@ namespace xAOD {
       static bool inited = false;
       if(inited) return;
       // name in the atlas convention
-      nameToTypemap["LCTopo"] =        LCTopo;            
-      nameToTypemap["EMTopo"] =        EMTopo;            
-      nameToTypemap["LCTopoOrigin"] =  LCTopoOrigin;
-      nameToTypemap["EMTopoOrigin"] =  EMTopoOrigin;
-      nameToTypemap["TopoTower"] =     TopoTower;         
-      nameToTypemap["Tower"] =         Tower;             
-      nameToTypemap["Truth"] =         Truth;             
-      nameToTypemap["TruthWZ"] =       TruthWZ;             
-      nameToTypemap["Track"] =         Track;             
-      nameToTypemap["PFlow"] =         PFlow;             
-      nameToTypemap["LCPFlow"] =       LCPFlow;             
-      nameToTypemap["EMPFlow"] =       EMPFlow;             
-      nameToTypemap["EMCPFlow"] =      EMCPFlow;             
+      nameToTypemap["LCTopo"] =             LCTopo;            
+      nameToTypemap["EMTopo"] =             EMTopo;            
+      nameToTypemap["LCTopoOrigin"] =       LCTopoOrigin;
+      nameToTypemap["EMTopoOrigin"] =       EMTopoOrigin;
+      nameToTypemap["TopoTower"] =          TopoTower;         
+      nameToTypemap["Tower"] =              Tower;             
+      nameToTypemap["Truth"] =              Truth;             
+      nameToTypemap["TruthWZ"] =            TruthWZ;             
+      nameToTypemap["Track"] =              Track;             
+      nameToTypemap["PFlow"] =              PFlow;             
+      nameToTypemap["LCPFlow"] =            LCPFlow;             
+      nameToTypemap["EMPFlow"] =            EMPFlow;             
+      nameToTypemap["EMCPFlow"] =           EMCPFlow;   
+      nameToTypemap["TrackCaloCluster"] =   TrackCaloCluster;         
       nameToTypemap[c_unCategorized] = Uncategorized;
 
 
diff --git a/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h b/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h
index 648b4ec6b88a667dfec5ca5fb41e3e908d0b98db..8061513a23a95cdd216c707514a4f1ca0cde6b1f 100644
--- a/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h
+++ b/Event/xAOD/xAODJet/xAODJet/JetContainerInfo.h
@@ -65,6 +65,7 @@ namespace xAOD {
       Jet,
       LCTopoOrigin,
       EMTopoOrigin,
+      TrackCaloCluster,
       Other = 100,
       Uncategorized= 1000
     };
diff --git a/Event/xAOD/xAODMuon/xAODMuon/versions/Muon_v1.h b/Event/xAOD/xAODMuon/xAODMuon/versions/Muon_v1.h
index 142097ad2995fae2b6fb40241896465f7cca2c1e..8a7443c91588b906acdcdffe5b7fb11def5505ff 100644
--- a/Event/xAOD/xAODMuon/xAODMuon/versions/Muon_v1.h
+++ b/Event/xAOD/xAODMuon/xAODMuon/versions/Muon_v1.h
@@ -137,9 +137,9 @@ namespace xAOD {
     /// then the function fills 'value' and returns 'true', otherwise it returns 'false', and does not touch 'value'. 
     /// See below for an example of how this is intended to be used.
     /// @code
-    /// uint8_t numberOfBLayerHits=0;
-    /// if( myParticle.summaryValue<uint8_t>(numberOfBLayerHits,numberOfBLayerHits) ){
-    ///   ATH_MSG_INFO("Successfully retrieved the integer value, numberOfBLayerHits"); 
+    /// uint8_t numberOfInnermostPixelLayerHits=0;
+    /// if( myParticle.summaryValue<uint8_t>(numberOfInnermostPixelLayerHits,numberOfInnermostPixelLayerHits) ){
+    ///   ATH_MSG_INFO("Successfully retrieved the integer value, numberOfInnermostPixelLayerHits");
     /// }
     /// float numberOfCscPhiHits=0.0; //Wrong! This is actually an int too.
     /// if( !myParticle.summaryValue<float>(numberOfCscPhiHits,numberOfCscPhiHits) ){
diff --git a/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx b/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx
index 22dc910c803cc1b60525149748878ca45b209d3d..129ec2fe404c5ef88942ff7c2cc578a82abb57c3 100644
--- a/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx
+++ b/Event/xAOD/xAODPFlow/Root/PFO_v1.cxx
@@ -1,3 +1,4 @@
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
@@ -158,8 +159,8 @@ namespace xAOD {
    }
 
   const PFO_v1::FourMom_t& PFO_v1::p4EM() const { 
-    
-    if (0.0 != this->charge()) return this->p4();
+
+    if (fabs(this->charge()) > FLT_MIN) return this->p4();
 
     if (!m_p4EMCached){
 
@@ -212,7 +213,7 @@ namespace xAOD {
 
    double PFO_v1::ptEM() const {
 
-     if (0.0 != this->charge()) return this->pt();
+     if (fabs(this->charge()) > FLT_MIN) return this->pt();
 
      const static Accessor<float> accPt("ptEM");
      float pt = accPt(*this);
@@ -221,29 +222,29 @@ namespace xAOD {
    }
 
    double PFO_v1::etaEM() const {
-
-     if (0.0 != this->charge()) return this->eta();
+          
+     if (fabs(this->charge()) > FLT_MIN) return this->eta();
 
      return p4EM().Eta();
    }
 
    double PFO_v1::phiEM() const {
 
-     if (0.0 != this->charge()) return this->phi();
+     if (fabs(this->charge()) > FLT_MIN) return this->phi();
 
      return p4EM().Phi();
    }
 
    double PFO_v1::mEM() const {
 
-     if (0.0 != this->charge()) return this->m();
+     if (fabs(this->charge()) > FLT_MIN) return this->m();
 
      return p4EM().M();
    }
 
    double PFO_v1::eEM() const {
 
-     if (0.0 != this->charge()) return this->e();
+     if (fabs(this->charge()) > FLT_MIN) return this->e();
 
      const static Accessor<float> accPt("ptEM");
      float pt = accPt(*this);
diff --git a/Event/xAOD/xAODPFlow/Root/TrackCaloClusterAuxContainer_v1.cxx b/Event/xAOD/xAODPFlow/Root/TrackCaloClusterAuxContainer_v1.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..df82f81684de53f20ea3f1ce2a5bd3f0e9f74041
--- /dev/null
+++ b/Event/xAOD/xAODPFlow/Root/TrackCaloClusterAuxContainer_v1.cxx
@@ -0,0 +1,33 @@
+// $Id: TrackCaloClusterAuxContainer_v1.cxx $
+
+// Local include(s):
+#include "xAODPFlow/versions/TrackCaloClusterAuxContainer_v1.h"
+ 
+namespace xAOD {
+ 
+   TrackCaloClusterAuxContainer_v1::TrackCaloClusterAuxContainer_v1()
+      : AuxContainerBase() {
+	AUX_VARIABLE(pt);
+	AUX_VARIABLE(eta);
+	AUX_VARIABLE(phi);
+	AUX_VARIABLE(m);
+	AUX_VARIABLE(taste);
+	AUX_VARIABLE( trackParticleLink );
+	AUX_VARIABLE( caloClusterLinks );
+      }
+   
+   void TrackCaloClusterAuxContainer_v1::dump() const {
+     std::cout<<" Dumping TrackCaloClusterAuxContainer_v1"<<std::endl;
+     std::cout<<"pt:";      
+     std::copy(pt.begin()   , pt.end()   , std::ostream_iterator<float>(std::cout, ", "));
+     std::cout<<"eta:";                  
+     std::copy(eta.begin()  , eta.end()  , std::ostream_iterator<float>(std::cout, ", "));
+     std::cout<<"phi:";                  
+     std::copy(phi.begin()  , phi.end()  , std::ostream_iterator<float>(std::cout, ", "));
+     std::cout<<"m:";                    
+     std::copy(m.begin()    , m.end()    , std::ostream_iterator<float>(std::cout, ", "));
+     std::cout<<"taste:";
+     std::copy(taste.begin(), taste.end(), std::ostream_iterator<int>(std::cout, ", "));
+   }
+   
+} // namespace xAOD
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlow/Root/TrackCaloCluster_v1.cxx b/Event/xAOD/xAODPFlow/Root/TrackCaloCluster_v1.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..8e8eaf52ed5e05e4d4a8d9562915707eecf5eb35
--- /dev/null
+++ b/Event/xAOD/xAODPFlow/Root/TrackCaloCluster_v1.cxx
@@ -0,0 +1,94 @@
+// $Id: TrackCaloCluster_v1.cxx $
+
+// Misc includes
+#include <bitset>
+#include <vector>
+
+// EDM include(s):
+#include "xAODCore/AuxStoreAccessorMacros.h"
+
+// Local include(s):
+#include "xAODPFlow/versions/TrackCaloCluster_v1.h"
+
+namespace xAOD {
+
+  TrackCaloCluster_v1::TrackCaloCluster_v1() : IParticle(), m_p4(), m_p4Cached( false ) {}
+  
+  TrackCaloCluster_v1::~TrackCaloCluster_v1() {}
+  
+  double TrackCaloCluster_v1::e() const {
+    return p4().E();
+  }
+ 
+  double TrackCaloCluster_v1::rapidity() const {
+    return p4().Rapidity();
+  }
+   
+  AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(TrackCaloCluster_v1, float, double, pt)
+  AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(TrackCaloCluster_v1, float, double, eta)
+  AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(TrackCaloCluster_v1, float, double, phi)
+  AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(TrackCaloCluster_v1, float, double, m)
+  AUXSTORE_PRIMITIVE_GETTER(TrackCaloCluster_v1,    int, taste)
+  
+  const TrackCaloCluster_v1::FourMom_t& TrackCaloCluster_v1::p4() const {
+    // Check if we need to reset the cached object:     
+    if( ! m_p4Cached ) {
+      m_p4.SetPtEtaPhiM( pt(), eta(), phi(), m() );       
+      m_p4Cached = true;     
+    }   
+    // Return the cached object:     
+    return m_p4;
+  }
+
+  Type::ObjectType TrackCaloCluster_v1::type() const { 
+     return Type::TrackCaloCluster;
+  }
+    
+  AUXSTORE_OBJECT_SETTER_AND_GETTER( TrackCaloCluster_v1,
+				     ElementLink< xAOD::TrackParticleContainer >,
+				     trackParticleLink, 
+				     setTrackParticleLink)
+  
+  const xAOD::TrackParticle* TrackCaloCluster_v1::trackParticle() const {
+    // The accessor:       
+    static SG::AuxElement::Accessor< ElementLink< xAOD::TrackParticleContainer > >  acc( "trackPartcleLink" );
+    if( !acc.isAvailable( *this ) ) {
+      return 0;       
+    }
+    if( !acc( *this ).isValid() ) {
+      return 0;
+    }
+    return *(acc( *this ));
+  }
+  
+  AUXSTORE_OBJECT_SETTER_AND_GETTER( TrackCaloCluster_v1, 
+				     std::vector< ElementLink< xAOD::CaloClusterContainer > >, 
+				     caloClusterLinks, 
+				     setCaloClusterLinks)
+  
+  void TrackCaloCluster_v1::setParameters(float pt, float eta, float phi, float m, TrackCaloCluster_v1::Taste taste,
+					  const ElementLink<xAOD::TrackParticleContainer> particle, 
+					  const std::vector< ElementLink< xAOD::CaloClusterContainer > > clusters) {
+
+    static const Accessor< float > acc1( "pt" );     
+    acc1( *this ) = pt;     
+    static const  Accessor< float > acc2( "eta" );     
+    acc2( *this ) = eta;     
+    static const  Accessor< float > acc3( "phi" );     
+    acc3( *this ) = phi;     
+    static const  Accessor< float > acc4( "m" );     
+    acc4( *this ) = m;     
+    
+    m_p4Cached = false;        
+    
+    static Accessor< int > acc( "taste" );     
+    acc( *this ) = (int)taste;
+    
+    setTrackParticleLink(particle);
+    setCaloClusterLinks(clusters);
+    
+  }
+  
+
+
+} // namespace xAOD
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlow/Root/dict/ContainerProxies.cxx b/Event/xAOD/xAODPFlow/Root/dict/ContainerProxies.cxx
index b62929899dbd0188274b2713accf63b8b5030d61..63aff550c225d1742337da19181624dae7d2c39e 100644
--- a/Event/xAOD/xAODPFlow/Root/dict/ContainerProxies.cxx
+++ b/Event/xAOD/xAODPFlow/Root/dict/ContainerProxies.cxx
@@ -9,6 +9,8 @@
 
 // Local include(s):
 #include "xAODPFlow/versions/PFOContainer_v1.h"
+#include "xAODPFlow/versions/TrackCaloClusterContainer_v1.h"
 
 // Set up the collection proxies:
 ADD_NS_DV_PROXY( xAOD, PFOContainer_v1 );
+ADD_NS_DV_PROXY( xAOD, TrackCaloClusterContainer_v1 );
diff --git a/Event/xAOD/xAODPFlow/doc/packagedoc.h b/Event/xAOD/xAODPFlow/doc/packagedoc.h
index 15c9f8805cea61d67ef25271693cc539d786eb24..e4a97c1ce6f4cc305bd912efb6ed1fbf4f57c448 100644
--- a/Event/xAOD/xAODPFlow/doc/packagedoc.h
+++ b/Event/xAOD/xAODPFlow/doc/packagedoc.h
@@ -25,5 +25,3 @@ $Date: 2014-01-11 14:31:58 +0100 (Sat, 11 Jan 2014) $
     - xAOD::PFOAuxContainer: Typedef to the latest pfo auxiliray
       container version.
     - xAOD::PFO_v1: The current latest pfo implementation.
-
-
diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/TrackCaloCluster.h b/Event/xAOD/xAODPFlow/xAODPFlow/TrackCaloCluster.h
new file mode 100644
index 0000000000000000000000000000000000000000..3b5562fdf6ed43a151e2e8b13b3d5edb9057236d
--- /dev/null
+++ b/Event/xAOD/xAODPFlow/xAODPFlow/TrackCaloCluster.h
@@ -0,0 +1,16 @@
+#ifndef XAODPFLOW_TRACKCALOCLUSTER_H
+#define XAODPFLOW_TRACKCALOCLUSTER_H
+
+// Local include(s):
+#include "xAODPFlow/versions/TrackCaloCluster_v1.h"
+
+namespace xAOD {
+  /// Reference the current persistent version:
+  typedef TrackCaloCluster_v1 TrackCaloCluster;
+}
+
+// Set up a CLID for the class:
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF( xAOD::TrackCaloCluster, 138661214, 1 )
+
+#endif // XAODPFLOW_TRACKCALOCLUSTER_H
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/TrackCaloClusterAuxContainer.h b/Event/xAOD/xAODPFlow/xAODPFlow/TrackCaloClusterAuxContainer.h
new file mode 100644
index 0000000000000000000000000000000000000000..4cd164649d6c463bd12b514122754367492295aa
--- /dev/null
+++ b/Event/xAOD/xAODPFlow/xAODPFlow/TrackCaloClusterAuxContainer.h
@@ -0,0 +1,22 @@
+#ifndef XAODPFLOW_TRACKCALOCLUSTERAUXCONTAINER_H
+#define XAODPFLOW_TRACKCALOCLUSTERAUXCONTAINER_H
+ 
+// Local include(s):
+#include "xAODPFlow/versions/TrackCaloClusterAuxContainer_v1.h"
+ 
+namespace xAOD {
+   /// Definition of the current TrackCaloCluster auxiliary container
+   ///
+   /// All reconstruction code should attach the typedefed auxiliary
+   /// container to the xAOD::TrackCaloCluster, so it will be easy to change
+   /// the container type as we get new I/O technologies for these
+   /// objects.
+   ///
+   typedef TrackCaloClusterAuxContainer_v1 TrackCaloClusterAuxContainer;
+}
+
+// Set up a CLID and StoreGate inheritance for the class:
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF( xAOD::TrackCaloClusterAuxContainer, 1284131157, 1 )
+ 
+#endif // XAODPFLOW_TRACKCALOCLUSTERAUXCONTAINER_H
diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/TrackCaloClusterContainer.h b/Event/xAOD/xAODPFlow/xAODPFlow/TrackCaloClusterContainer.h
new file mode 100644
index 0000000000000000000000000000000000000000..b69677f7842789315d2a6ac7dbfb37413a876c10
--- /dev/null
+++ b/Event/xAOD/xAODPFlow/xAODPFlow/TrackCaloClusterContainer.h
@@ -0,0 +1,17 @@
+#ifndef XAODPFLOW_TRACKCALOCLUSTERCONTAINER_H
+#define XAODPFLOW_TRACKCALOCLUSTERCONTAINER_H
+ 
+// Local include(s):
+#include "xAODPFlow/TrackCaloCluster.h"
+#include "xAODPFlow/versions/TrackCaloClusterContainer_v1.h"
+ 
+namespace xAOD {
+   /// Definition of the current "TrackCaloCluster container version"
+   typedef TrackCaloClusterContainer_v1 TrackCaloClusterContainer;
+}
+
+// Set up a CLID for the container:
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF( xAOD::TrackCaloClusterContainer, 1138314170, 1 )
+ 
+#endif // XAODPFLOW_TRACKCALOCLUSTERCONTAINER_H
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/selection.xml b/Event/xAOD/xAODPFlow/xAODPFlow/selection.xml
index 1800974ea9ee7779cb0f6be04787d97faa991d11..098b5395c20c8d5a95bcb8efddfec2550f223c4e 100644
--- a/Event/xAOD/xAODPFlow/xAODPFlow/selection.xml
+++ b/Event/xAOD/xAODPFlow/xAODPFlow/selection.xml
@@ -27,6 +27,23 @@
 
   <class name="xAOD::PFOAuxContainer_v1"
          id="F691F845-4A3D-466A-9187-FED7837D9372" />
+  
+  <!-- TrackCaloCluster_v1 dictionaries: -->
+  <class name="xAOD::TrackCaloCluster_v1">
+         <field name="m_p4" transient="true"/>
+  </class>
+  
+  <read sourceClass="xAOD::TrackCaloCluster_v1" version="[1-]"
+        targetClass="xAOD::TrackCaloCluster_v1" source="" target="m_p4Cached" >
+    <![CDATA[
+       m_p4Cached = false;
+    ]]>
+  </read>
+   
+  <class name="xAOD::TrackCaloClusterAuxContainer_v1"
+         id="E3492C37-2469-4346-BCBA-7A18CACD46AC"/>
+  <class name="xAOD::TrackCaloClusterContainer_v1"
+         id="84C52180-1AC0-4877-BAD3-B5C7A71F9125"/>
 
   <!-- Link types pointing at clusters: -->
   <class name="DataLink<xAOD::PFOContainer_v1>" />
@@ -39,10 +56,18 @@
   <class name="ElementLink<xAOD::IParticleContainer>" />
   <class name="std::vector< ElementLink<xAOD::IParticleContainer> >" />
   <class name="std::vector<std::vector< ElementLink<xAOD::IParticleContainer> > >" />
-
+    
   <enum pattern="xAOD::PFODetails::*" />
   <class name="std::vector<xAOD::PFODetails::PFOLeptonType>" />
 
+  <!-- All smart pointer dictionaries for xAOD::IParticle -->
+  <class name="DataLink<xAOD::TrackCaloClusterContainer_v1>" />
+  <class name="std::vector<DataLink<xAOD::TrackCaloClusterContainer_v1> >" />
+ 
+  <class name="ElementLink<xAOD::TrackCaloClusterContainer_v1>" />
+  <class name="std::vector<ElementLink<xAOD::TrackCaloClusterContainer_v1> >" />
+  <class name="std::vector<std::vector<ElementLink<xAOD::TrackCaloClusterContainer_v1> > >" />
+      
   <!-- Suppress the unwanted classes found by ROOT 6. -->
   <!-- Hopefully we can remove these extra lines at one point... -->
   <exclusion>
diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/versions/TrackCaloClusterAuxContainer_v1.h b/Event/xAOD/xAODPFlow/xAODPFlow/versions/TrackCaloClusterAuxContainer_v1.h
new file mode 100644
index 0000000000000000000000000000000000000000..cf57ab1462ec4b0c273586c57cc6891589a565b5
--- /dev/null
+++ b/Event/xAOD/xAODPFlow/xAODPFlow/versions/TrackCaloClusterAuxContainer_v1.h
@@ -0,0 +1,59 @@
+// Dear emacs, this is -*- c++ -*-
+// $Id: TrackCaloClusterAuxContainer_v1.h $
+#ifndef XAODPFLOW_VERSIONS_TRACKCALOCLUSTERAUXCONTAINER_V1_H
+#define XAODPFLOW_VERSIONS_TRACKCALOCLUSTERAUXCONTAINER_V1_H
+ 
+// System include(s):
+// #include <stdint.h>
+#include <vector>
+ 
+// EDM include(s):
+#include "xAODCore/AuxContainerBase.h"
+#include "AthLinks/ElementLink.h"
+
+// xAOD include(s):
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+
+namespace xAOD {
+ 
+   
+   /// This class is meant to implement the TrackCaloCluster EDM.
+   ///
+   /// @author Noemi Calace
+   ///
+   class TrackCaloClusterAuxContainer_v1 : public AuxContainerBase {
+ 
+   public:
+      /// Default constructor
+      TrackCaloClusterAuxContainer_v1();
+      
+      /// Dumps contents (for debugging)
+      void dump() const;
+       
+   private:
+     
+     /// @name Defining parameters 
+     /// @{
+     std::vector< float > pt;
+     std::vector< float > eta;
+     std::vector< float > phi;
+     std::vector< float > m;
+     std::vector< int >   taste;
+     /// @}
+     
+     /// @name Links
+     /// @{
+     std::vector<ElementLink< xAOD::TrackParticleContainer > >               trackParticleLink;
+     std::vector<std::vector< ElementLink< xAOD::CaloClusterContainer > > >  caloClusterLinks;
+     /// @}
+     
+
+   }; // class TrackCaloClusterAuxContainer_v1
+ 
+} // namespace xAOD
+ 
+#include "SGTools/BaseInfo.h"
+SG_BASE( xAOD::TrackCaloClusterAuxContainer_v1, xAOD::AuxContainerBase ); 
+ 
+#endif // XAODPFLOW_VERSIONS_TRACKCALOCLUSTERAUXCONTAINER_V1_H
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/versions/TrackCaloClusterContainer_v1.h b/Event/xAOD/xAODPFlow/xAODPFlow/versions/TrackCaloClusterContainer_v1.h
new file mode 100644
index 0000000000000000000000000000000000000000..a5a84f2e5369b4ac142a80dd2c25a5f8b2886d0c
--- /dev/null
+++ b/Event/xAOD/xAODPFlow/xAODPFlow/versions/TrackCaloClusterContainer_v1.h
@@ -0,0 +1,21 @@
+#ifndef XAODPFLOW_VERSIONS_TRACKCALOCLUSTERCONTAINER_V1_H
+#define XAODPFLOW_VERSIONS_TRACKCALOCLUSTERCONTAINER_V1_H
+ 
+#include <stdint.h>
+ 
+// Core include(s):
+#include "AthContainers/DataVector.h"
+#include "xAODBase/IParticleContainer.h"
+ 
+// Local include(s):
+#include "xAODPFlow/versions/TrackCaloCluster_v1.h"
+
+// Declare IParticle as a base class of CaloCluster_v1:
+DATAVECTOR_BASE( xAOD::TrackCaloCluster_v1, xAOD::IParticle );
+ 
+namespace xAOD {
+   /// The container is a simple typedef for now
+   typedef DataVector< xAOD::TrackCaloCluster_v1 > TrackCaloClusterContainer_v1;
+}
+ 
+#endif // XAODPFLOW_VERSIONS_TRACKCALOCLUSTERCONTAINER_V1_H
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/versions/TrackCaloCluster_v1.h b/Event/xAOD/xAODPFlow/xAODPFlow/versions/TrackCaloCluster_v1.h
new file mode 100644
index 0000000000000000000000000000000000000000..f42eb06e3314e9730f5576da27be91cd31550f0c
--- /dev/null
+++ b/Event/xAOD/xAODPFlow/xAODPFlow/versions/TrackCaloCluster_v1.h
@@ -0,0 +1,95 @@
+// Dear emacs, this is -*- c++ -*-
+// $Id: TrackCaloCluster_v1.h $
+#ifndef XAODPFLOW_VERSIONS_TRACKCALOCLUSTER_V1_H
+#define XAODPFLOW_VERSIONS_TRACKCALOCLUSTER_V1_H
+
+// Core include(s):
+#include "AthContainers/DataVector.h"
+#include "AthLinks/ElementLink.h"
+
+// xAOD include(s):
+#include "xAODBase/IParticle.h"
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+
+namespace xAOD {
+  /** Class describing a TrackCaloCluster 
+   * 
+   * @author Noemi Calace <Noemi.Calace@cern.ch>
+   * 
+   **/
+  
+  class TrackCaloCluster_v1 : public IParticle {
+    
+  public: 
+    
+    /// Type of TrackCaloCluster - Charged - Neutral - Combined
+    enum Taste { Charged = 0, Neutral, Combined };
+    
+    // Default Constructor
+    TrackCaloCluster_v1();
+    // Destuctor
+    ~TrackCaloCluster_v1();
+    
+    /// @name xAOD::IParticle functions
+    /// @{
+    /// The transverse momentum (\f$p_T\f$) of the particle.
+    virtual double           pt() const;
+    /// The pseudorapidity (\f$\eta\f$) of the particle.
+    virtual double           eta() const;
+    /// The azimuthal angle (\f$\phi\f$) of the particle (has range \f$-\pi\f$ to \f$+\pi\f$.)
+    virtual double           phi() const;
+    /// The invariant mass of the particle..
+    virtual double           m() const;
+    /// The total energy of the particle.
+    virtual double           e() const;
+    /// The true rapidity (y) of the particle.
+    virtual double           rapidity() const;
+    /// The taste of the particle
+    virtual int              taste() const;
+    
+    /// Definition of the 4-momentum type.
+    typedef IParticle::FourMom_t FourMom_t;
+    
+    /// The full 4-momentum of the particle.
+    virtual const FourMom_t& p4() const;
+    
+    /// The type of the object as a simple enumeration
+    virtual Type::ObjectType type() const;
+    /// @}
+    
+    /// @name Defining parameters functions
+    /// The 'defining parameters' are key to the concept of a TrackCaloCluster, and give the values for the IParticle interface
+    /// ( pt(), phi(), eta() etc.).
+    /// The \f$\phi\f$ parameter is returned by either the phi() or the phi0() methods, the difference just being whether it is returned as a float or a double (it is stored as a float)
+    /// @{
+    void setParameters(float pt, float eta, float phi, float m, TrackCaloCluster_v1::Taste taste, 
+		       const ElementLink<xAOD::TrackParticleContainer> particle, 
+		       const std::vector< ElementLink< xAOD::CaloClusterContainer > > clusters);       
+    /// @}
+    
+    /// @name Links       
+    /// @{
+    /// @brief Returns a link (which can be invalid) to the xAOD::TrackParticle associated with this TrackCaloCluster.
+    const ElementLink<xAOD::TrackParticleContainer>& trackParticleLink() const;
+    /// @brief Set the link to the TrackParticle
+    void setTrackParticleLink(const ElementLink< xAOD::TrackParticleContainer >& particle);
+    /// @brief Returns a pointer (which can be NULL) to the xAOD::TrackParticle associated with this TrackCaloCluster.
+    const xAOD::TrackParticle* trackParticle() const;       
+    /// @brief Returns a vector to the links (which can be invalid) to the xAOD::CaloClusters associated with this TrackCaloCluster.
+    const std::vector< ElementLink<xAOD::CaloClusterContainer> > & caloClusterLinks() const;
+    /// @brief Set the links to the CaloClusters
+    void setCaloClusterLinks(const std::vector< ElementLink< xAOD::CaloClusterContainer > >& caloClusterLinks);
+    /// @}   
+    
+    
+  private:
+    /// Cached 4-momentum object.
+    mutable FourMom_t m_p4;
+    mutable bool m_p4Cached;
+            
+  }; 
+  
+}
+
+#endif // XAODPFLOW_VERSIONS_TRACKCALOCLUSTER_V1_H
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlow/xAODPFlow/xAODPFlowDict.h b/Event/xAOD/xAODPFlow/xAODPFlow/xAODPFlowDict.h
index 92ee70d0fd4b0ed4dd96fa0a6fe92fef7c28536b..1c65c53587427f6af8d5cd2f27a12c2ce0065ea1 100644
--- a/Event/xAOD/xAODPFlow/xAODPFlow/xAODPFlowDict.h
+++ b/Event/xAOD/xAODPFlow/xAODPFlow/xAODPFlowDict.h
@@ -24,25 +24,34 @@
 #include "xAODPFlow/PFOAuxContainer.h"
 #include "xAODPFlow/versions/PFOContainer_v1.h"
 #include "xAODPFlow/versions/PFOAuxContainer_v1.h"
+#include "xAODPFlow/versions/TrackCaloClusterContainer_v1.h"
+#include "xAODPFlow/versions/TrackCaloClusterAuxContainer_v1.h"
 #include "xAODPFlow/PFODefs.h"
 
 namespace {
   struct GCCXML_DUMMY_INSTANTIATION_XAODPFLOW {
-    xAOD::PFOContainer_v1 c1;
-    DataLink< xAOD::PFOContainer_v1 > l1;
-    ElementLink< xAOD::PFOContainer_v1 > l2;
-    std::vector< DataLink< xAOD::PFOContainer_v1 > > l4;
-    std::vector< ElementLink< xAOD::PFOContainer_v1 > > l5;
-    std::vector< std::vector< ElementLink< xAOD::PFOContainer_v1 > > > l6;
-
-    xAOD::IParticleContainer c2;
-    ElementLink<xAOD::IParticleContainer> l8;
-    std::vector< ElementLink<xAOD::IParticleContainer> > l9;
-    std::vector<std::vector< ElementLink<xAOD::IParticleContainer> > > l10;
-
-    std::vector<xAOD::PFODetails::PFOLeptonType> l11;
-
-    ElementLink< xAOD::VertexContainer > l12;
+    xAOD::PFOContainer_v1                                                           c1;
+    DataLink< xAOD::PFOContainer_v1 >                                               l1;
+    ElementLink< xAOD::PFOContainer_v1 >                                            l2;
+    std::vector< DataLink< xAOD::PFOContainer_v1 > >                                l4;
+    std::vector< ElementLink< xAOD::PFOContainer_v1 > >                             l5;
+    std::vector< std::vector< ElementLink< xAOD::PFOContainer_v1 > > >              l6;
+                                                                                    
+    xAOD::IParticleContainer                                                        c2;
+    ElementLink< xAOD::IParticleContainer >                                         l8;
+    std::vector< ElementLink<xAOD::IParticleContainer > >                           l9;
+    std::vector< std::vector< ElementLink<xAOD::IParticleContainer > > >            l10;
+    std::vector< xAOD::PFODetails::PFOLeptonType >                                  l11;
+    ElementLink< xAOD::VertexContainer >                                            l12;
+    
+    xAOD::TrackCaloClusterContainer_v1                                              c3;
+    DataLink< xAOD::TrackCaloClusterContainer_v1 >                                  l13;
+    ElementLink< xAOD::TrackCaloClusterContainer_v1 >                               l14;
+    ElementLinkVector< xAOD::TrackCaloClusterContainer_v1 >                         l15;
+    std::vector< DataLink< xAOD::TrackCaloClusterContainer_v1 > >                   l16;
+    std::vector< ElementLink< xAOD::TrackCaloClusterContainer_v1 > >                l17;
+    std::vector< ElementLinkVector< xAOD::TrackCaloClusterContainer_v1 > >          l18;
+    std::vector< std::vector< ElementLink< xAOD::TrackCaloClusterContainer_v1 > > > l19;
     
    };
 }
diff --git a/Event/xAOD/xAODPFlowAthenaPool/CMakeLists.txt b/Event/xAOD/xAODPFlowAthenaPool/CMakeLists.txt
index 639db707cfd9667b7db031ade021e9dc83f54927..4d9e04be6e591e3aa58ee3763bebe50a61f3ae6f 100644
--- a/Event/xAOD/xAODPFlowAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODPFlowAthenaPool/CMakeLists.txt
@@ -16,8 +16,8 @@ atlas_depends_on_subdirs( PRIVATE
 # Component(s) in the package:
 atlas_add_poolcnv_library( xAODPFlowAthenaPoolPoolCnv
                            src/*.cxx
-                           FILES xAODPFlow/PFOContainer.h xAODPFlow/PFOAuxContainer.h
-                           TYPES_WITH_NAMESPACE xAOD::PFOContainer xAOD::PFOAuxContainer
+                           FILES xAODPFlow/PFOContainer.h xAODPFlow/PFOAuxContainer.h xAODPFlow/TrackCaloClusterContainer.h xAODPFlow/TrackCaloClusterAuxContainer.h
+                           TYPES_WITH_NAMESPACE xAOD::PFOContainer xAOD::PFOAuxContainer xAOD::TrackCaloClusterContainer xAOD::TrackCaloClusterAuxContainer
                            CNV_PFX xAOD
                            LINK_LIBRARIES AthContainers AthenaKernel AthenaPoolCnvSvcLib AthenaPoolUtilities xAODPFlow )
 
diff --git a/Event/xAOD/xAODPFlowAthenaPool/src/xAODPFOContainerCnv.cxx b/Event/xAOD/xAODPFlowAthenaPool/src/xAODPFOContainerCnv.cxx
index f589f5ef3f98e39023d1ce2437f96af1903ca433..5190d2e0b5f41c538e7c093638f2dfc9c5e06127 100644
--- a/Event/xAOD/xAODPFlowAthenaPool/src/xAODPFOContainerCnv.cxx
+++ b/Event/xAOD/xAODPFlowAthenaPool/src/xAODPFOContainerCnv.cxx
@@ -22,11 +22,6 @@ xAOD::PFOContainer* xAODPFOContainerCnv::createPersistent(xAOD::PFOContainer* tr
 
   xAOD::PFOContainer* viewContainer = new xAOD::PFOContainer(trans->begin(),trans->end(), SG::VIEW_ELEMENTS);
 
-  xAOD::PFOContainer::iterator firstPFO = viewContainer->begin();
-  xAOD::PFOContainer::iterator lastPFO = viewContainer->end();
-  
-  for (; firstPFO != lastPFO; ++firstPFO) toPersistent(*firstPFO);
-
   return viewContainer;
 
 }
diff --git a/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAthenaPoolTPCnv.cxx b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAthenaPoolTPCnv.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..36341e6d2e0dc5d3856935a269056c0691a874e1
--- /dev/null
+++ b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAthenaPoolTPCnv.cxx
@@ -0,0 +1,18 @@
+/*   
+Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration 
+*/ 
+
+// $Id$ 
+// Gaudi/Athena include(s): 
+#include "AthenaKernel/TPCnvFactory.h" 
+// EDM include(s): 
+#include "xAODPFlow/TrackCaloClusterAuxContainer.h" 
+#include "xAODPFlow/versions/TrackCaloClusterAuxContainer_v1.h" 
+// Local include(s): 
+#include "xAODTrackCaloClusterAuxContainerCnv_v1.h" 
+
+// Declare the T/P converter(s): 
+DECLARE_TPCNV_FACTORY( xAODTrackCaloClusterAuxContainerCnv_v1,
+                       xAOD::TrackCaloClusterAuxContainer,
+                       xAOD::TrackCaloClusterAuxContainer_v1,   
+                       Athena::TPCnvVers::Old ) 
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv.cxx b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..eecf338caa74572f40d3faad16aba44a86585bdc
--- /dev/null
+++ b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv.cxx
@@ -0,0 +1,64 @@
+// $Id: xAODTrackCaloClusterAuxContainerCnv.cxx 791368 2017-01-05 08:55:07Z hrivnac $
+
+// System include(s):
+#include <exception>
+#include <memory>
+
+// ROOT include(s):
+#include <TClass.h>
+
+// Athena/Gaudi include(s):
+#include "AthContainers/tools/copyThinned.h"
+#include "AthenaKernel/IThinningSvc.h"
+#include "AthenaKernel/errorcheck.h"
+
+// Local include(s):
+#include "xAODTrackCaloClusterAuxContainerCnv.h"
+#include "xAODTrackCaloClusterAuxContainerCnv_v1.h"
+
+// EDM include(s):
+#include "xAODPFlow/TrackCaloClusterContainer.h"
+
+xAODTrackCaloClusterAuxContainerCnv::
+xAODTrackCaloClusterAuxContainerCnv( ISvcLocator* svcLoc )
+   : xAODTrackCaloClusterAuxContainerCnvBase( svcLoc ) {
+
+}
+
+StatusCode xAODTrackCaloClusterAuxContainerCnv::initialize() {
+
+   // Call the base class's initialize:
+   CHECK( xAODTrackCaloClusterAuxContainerCnvBase::initialize() );
+
+   // Return gracefully:
+   return StatusCode::SUCCESS;
+}
+
+xAOD::TrackCaloClusterAuxContainer*
+xAODTrackCaloClusterAuxContainerCnv::
+createPersistent( xAOD::TrackCaloClusterAuxContainer* trans ) {
+   
+   // Create a copy of the container:
+   std::unique_ptr< xAOD::TrackCaloClusterAuxContainer > result(
+            SG::copyThinned( *trans, IThinningSvc::instance() ) );
+   
+   // Return the thinned object:
+   return result.release();
+}
+
+xAOD::TrackCaloClusterAuxContainer*
+xAODTrackCaloClusterAuxContainerCnv::createTransient() {
+
+  // The known ID(s) for this container:
+  static const pool::Guid v1_guid( "E3492C37-2469-4346-BCBA-7A18CACD46AC" );
+  
+  // Check which version of the container we're reading:
+  if ( compareClassGuid( v1_guid ) )
+    return poolReadObject< xAOD::TrackCaloClusterAuxContainer >();
+  
+
+  // If we didn't recognise the ID:
+  throw std::runtime_error( "Unsupported version of "
+    "xAOD::TrackCaloClusterAuxContainer found" );
+  return 0;
+}
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv.h b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv.h
new file mode 100644
index 0000000000000000000000000000000000000000..f4cfb61488dd1868b4d70d33b6f7b2f6f5e59188
--- /dev/null
+++ b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv.h
@@ -0,0 +1,52 @@
+// Dear emacs, this is -*- c++ -*-
+// $Id: xAODTrackCaloClusterAuxContainerCnv.h $
+#ifndef XAODPFLOWATHENAPOOL_XAODTRACKCALOCLUSTERAUXCONTAINERCNV_H
+#define XAODPFLOWATHENAPOOL_XAODTRACKCALOCLUSTERAUXCONTAINERCNV_H
+
+// Gaudi/Athena include(s):
+#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
+#include "GaudiKernel/ToolHandle.h"
+
+// EDM include(s):
+#include "xAODPFlow/TrackCaloClusterAuxContainer.h"
+
+/// Base class for the converter
+typedef T_AthenaPoolCustomCnv< xAOD::TrackCaloClusterAuxContainer,
+                               xAOD::TrackCaloClusterAuxContainer >
+   xAODTrackCaloClusterAuxContainerCnvBase;
+
+/**
+ *  @short POOL converter for the xAOD::TrackCaloClusterAuxContainer class
+ *
+ *         This is the converter doing the actual schema evolution
+ *         of the package... The converter for xAOD::TrackCaloClusterContainer
+ *         doesn't do much, as the "interface classes" don't contain
+ *         too much/any payload. Most of the payload is in the auxiliary
+ *         containers like this one.
+ *
+ * @author Noemi Calace <Noemi.Calace@cern.ch>
+ */
+class xAODTrackCaloClusterAuxContainerCnv :
+   public xAODTrackCaloClusterAuxContainerCnvBase {
+
+   // Declare the factory as our friend:
+   friend class CnvFactory< xAODTrackCaloClusterAuxContainerCnv >;
+
+   /// Function initialising the converter
+   virtual StatusCode initialize() override;
+
+protected:
+   /// Converter constructor
+   xAODTrackCaloClusterAuxContainerCnv( ISvcLocator* svcLoc );
+
+   /// Function preparing the container to be written out
+   virtual xAOD::TrackCaloClusterAuxContainer*
+   createPersistent( xAOD::TrackCaloClusterAuxContainer* trans ) override;
+   /// Function reading in the object from the input file
+   virtual xAOD::TrackCaloClusterAuxContainer* createTransient() override;
+
+private:
+
+}; // class xAODTrackCaloClusterAuxContainerCnv
+
+#endif // XAODPFLOWATHENAPOOL_XAODTRACKCALOCLUSTERAUXCONTAINERCNV_H
diff --git a/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv_v1.cxx b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv_v1.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a6fb823fa13497a609779d530c790a861df3cbc9
--- /dev/null
+++ b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv_v1.cxx
@@ -0,0 +1,83 @@
+// $Id$
+       
+// System include(s):
+#include <stdexcept>
+       
+// Gaudi/Athena include(s):
+#include "GaudiKernel/MsgStream.h"
+       
+// Core EDM include(s):
+#include "AthContainers/tools/copyAuxStoreThinned.h"
+       
+// Local include(s):
+#include "xAODTrackCaloClusterAuxContainerCnv_v1.h"
+#include "xAODPFlow/TrackCaloClusterContainer.h"
+#include "xAODPFlow/versions/TrackCaloClusterContainer_v1.h"
+       
+/// Convenience macro for setting the level of output messages
+#define MSGLVL MSG::DEBUG
+       
+/// Another convenience macro for printing messages in the converter
+#define ATH_MSG( MSG )                       \
+do {                                         \
+  if( log.level() <= MSGLVL ) {              \
+    log << MSGLVL << MSG << endmsg;          \
+  }                                          \
+} while( 0 )
+       
+xAODTrackCaloClusterAuxContainerCnv_v1::xAODTrackCaloClusterAuxContainerCnv_v1()
+    : T_AthenaPoolTPCnvBase< xAOD::TrackCaloClusterAuxContainer, xAOD::TrackCaloClusterAuxContainer_v1 >()
+{
+}
+       
+void xAODTrackCaloClusterAuxContainerCnv_v1::
+persToTrans(  const xAOD::TrackCaloClusterAuxContainer_v1* oldObj,
+              xAOD::TrackCaloClusterAuxContainer* newObj,
+              MsgStream& log ) {
+       
+  // Greet the user:
+  ATH_MSG( "Converting xAOD::TrackCaloClusterAuxContainer_v1 to current version..." );
+       
+  // Clear the transient object:
+  newObj->resize( 0 );
+       
+  // Copy the payload of the v1 object into the latest one by misusing
+  // the thinning code a bit...
+  SG::copyAuxStoreThinned( *oldObj, *newObj, 0 );
+
+  // Set up interface containers on top of them:
+       
+  //The old  uses v_
+  xAOD::TrackCaloClusterContainer_v1 oldInt;
+  for( size_t i = 0; i < oldObj->size(); ++i ) {
+    oldInt.push_back( new xAOD::TrackCaloCluster_v1() );
+  }
+  oldInt.setStore( oldObj );
+           
+  xAOD::TrackCaloClusterContainer newInt;
+  for( size_t i = 0; i < newObj->size(); ++i ) {
+    newInt.push_back( new xAOD::TrackCaloCluster() );
+  }
+  newInt.setStore( newObj );
+    
+         
+  // Print what happened:
+  ATH_MSG( "Converting xAOD::TrackCaloClusterAuxContainer_v1 to current version [OK]" );
+       
+  return;
+}
+       
+/// This function should never be called, as we are not supposed to convert
+/// object before writing.
+///
+void xAODTrackCaloClusterAuxContainerCnv_v1::transToPers( const xAOD::TrackCaloClusterAuxContainer*,
+                                                       xAOD::TrackCaloClusterAuxContainer_v1*,
+                                                       MsgStream& log ) {
+       
+  log << MSG::ERROR
+      << "Somebody called xAODTrackCaloClusterAuxContainerCnv_v1::transToPers"
+      << endmsg;
+  throw std::runtime_error( "Somebody called xAODTrackCaloClusterAuxContainerCnv_v1::"
+    "transToPers" );
+  return;
+}
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv_v1.h b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv_v1.h
new file mode 100644
index 0000000000000000000000000000000000000000..83974b557efa01ded35607b1929563d222f690ce
--- /dev/null
+++ b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterAuxContainerCnv_v1.h
@@ -0,0 +1,42 @@
+// Dear emacs, this is -*- c++ -*-
+// $Id$
+#ifndef XAODPFLOWATHENAPOOL_XAODTRACKCALOCLUSTERAUXCONTAINERCNV_V1_H
+#define XAODPFLOWATHENAPOOL_XAODTRACKCALOCLUSTERAUXCONTAINERCNV_V1_H
+
+// Gaudi/Athena include(s):
+#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h"
+
+// EDM include(s):
+#include "xAODPFlow/versions/TrackCaloClusterAuxContainer_v1.h"
+#include "xAODPFlow/TrackCaloClusterAuxContainer.h"
+       
+/// Converter class used for reading xAOD::TrackCaloClusterAuxContainer_v1
+///
+/// This converter implements the conversion from xAOD::TrackCaloClusterAuxContainer_v1
+/// to the latest version of the class. In a way that makes this converter
+/// usable both from the POOL converter, and the BS converter.
+///
+/// @author Noemi Calace <Noemi.Calace@cern.ch> (copied from convertor from Attila)
+///
+/// $Revision$
+/// $Date$
+///
+class xAODTrackCaloClusterAuxContainerCnv_v1 :
+  public T_AthenaPoolTPCnvBase< xAOD::TrackCaloClusterAuxContainer, xAOD::TrackCaloClusterAuxContainer_v1 > 
+{
+public:
+  /// Default constructor
+  xAODTrackCaloClusterAuxContainerCnv_v1();
+
+  /// Function converting from the old type to the current one
+  virtual void persToTrans( const xAOD::TrackCaloClusterAuxContainer_v1* oldObj,
+                            xAOD::TrackCaloClusterAuxContainer* newObj,
+                            MsgStream& log );
+  /// Dummy function inherited from the base class
+  virtual void transToPers( const xAOD::TrackCaloClusterAuxContainer*,
+                            xAOD::TrackCaloClusterAuxContainer_v1*,
+                            MsgStream& log );
+
+}; // class xAODTrackCaloClusterAuxContainerCnv_v1
+       
+#endif // XAODPFLOWATHENAPOOL_XAODTRACKCALOCLUSTERAUXCONTAINERCNV_V1_H
\ No newline at end of file
diff --git a/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterContainerCnv.cxx b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterContainerCnv.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a1d2cc125f1140fe840ddd42f388443697e55385
--- /dev/null
+++ b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterContainerCnv.cxx
@@ -0,0 +1,70 @@
+// $Id: xAODTrackCaloClusterContainerCnv.cxx $
+
+// System include(s):
+#include <exception>
+
+// Local include(s):
+#include "xAODTrackCaloClusterContainerCnv.h"
+
+namespace {
+
+   /// Helper function setting up the container's link to its auxiliary store
+   void setStoreLink( SG::AuxVectorBase* cont, const std::string& key ) {
+
+      // The link to set up:
+      DataLink< SG::IConstAuxStore > link( key + "Aux." );
+
+      // Give it to the container:
+      cont->setStore( link );
+
+      return;
+   }
+
+} // private namespace
+
+xAODTrackCaloClusterContainerCnv::xAODTrackCaloClusterContainerCnv( ISvcLocator* svcLoc )
+   : xAODTrackCaloClusterContainerCnvBase( svcLoc ) {
+}
+
+xAOD::TrackCaloClusterContainer*
+xAODTrackCaloClusterContainerCnv::
+createPersistent( xAOD::TrackCaloClusterContainer* trans ) {
+
+   // Create a view copy of the container:
+   return
+      new xAOD::TrackCaloClusterContainer( trans->begin(), trans->end(),
+                                           SG::VIEW_ELEMENTS );
+}
+
+/**
+ * This function needs to be re-implemented in order to figure out the StoreGate
+ * key of the container that's being created. After that's done, it lets the
+ * base class do its normal task.
+ */
+StatusCode xAODTrackCaloClusterContainerCnv::createObj( IOpaqueAddress* pAddr,
+                                                   DataObject*& pObj ) {
+
+   // Get the key of the container that we'll be creating:
+   m_key = *( pAddr->par() + 1 );
+   ATH_MSG_VERBOSE( "Key of xAOD::TrackCaloClusterContainer: " << m_key );
+
+   // Let the base class do its thing now:
+   return AthenaPoolConverter::createObj( pAddr, pObj );
+}
+
+xAOD::TrackCaloClusterContainer* xAODTrackCaloClusterContainerCnv::createTransient() {
+
+   // The known ID(s) for this container:
+   static pool::Guid v1_guid( "84C52180-1AC0-4877-BAD3-B5C7A71F9125" );
+
+   // Check if we're reading the most up to date type:
+   if( compareClassGuid( v1_guid ) ) {
+      xAOD::TrackCaloClusterContainer* c = poolReadObject< xAOD::TrackCaloClusterContainer >();
+      setStoreLink( c, m_key );
+      return c;
+   }
+
+   // If we didn't recognise the ID, let's complain:
+   throw std::runtime_error( "Unsupported version of xAOD::TrackCaloClusterContainer found" );
+   return 0;
+}
diff --git a/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterContainerCnv.h b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterContainerCnv.h
new file mode 100644
index 0000000000000000000000000000000000000000..c487abf416ee349a64ffdc9f328788d25d49965b
--- /dev/null
+++ b/Event/xAOD/xAODPFlowAthenaPool/src/xAODTrackCaloClusterContainerCnv.h
@@ -0,0 +1,49 @@
+#ifndef XAODPFLOWATHENAPOOL_XAODTRACKCALOCLUSTERCONTAINERCNV_H
+#define XAODPFLOWATHENAPOOL_XAODTRACKCALOCLUSTERCONTAINERCNV_H
+
+// Gaudi/Athena include(s):
+#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
+
+// EDM include(s):
+#include "xAODPFlow/TrackCaloClusterContainer.h"
+
+/// Type definition for the converter's base
+typedef T_AthenaPoolCustomCnv< xAOD::TrackCaloClusterContainer,
+                               xAOD::TrackCaloClusterContainer >
+   xAODTrackCaloClusterContainerCnvBase;
+
+/**
+ *  @short POOL converter for the xAOD::TrackCaloClusterContainer class
+ *
+ *         Simple converter class making the xAOD::TrackCaloClusterContainer
+ *         class known to POOL.
+ *
+ * @author Noemi Calace <Noemi.Calace@cern.ch>
+ *
+ */
+class xAODTrackCaloClusterContainerCnv : public xAODTrackCaloClusterContainerCnvBase {
+
+   // Declare the factory as our friend:
+   friend class CnvFactory< xAODTrackCaloClusterContainerCnv >;
+
+public:
+   /// Converter constructor
+   xAODTrackCaloClusterContainerCnv( ISvcLocator* svcLoc );
+
+   /// Re-implemented function in order to get access to the SG key
+   virtual StatusCode createObj( IOpaqueAddress* pAddr, DataObject*& pObj );
+   
+   /// Function preparing the container to be written out
+   virtual xAOD::TrackCaloClusterContainer* createPersistent( xAOD::TrackCaloClusterContainer* trans );
+
+   /// Function reading in the persistent object
+   virtual xAOD::TrackCaloClusterContainer* createTransient();
+
+private:
+
+   /// StoreGate key of the container just being created
+   std::string m_key;
+
+}; // class xAODTrackCaloClusterContainerCnv
+
+#endif // XAODPFLOWATHENAPOOL_XAODTRACKCALOCLUSTERCONTAINERCNV_H
\ No newline at end of file
diff --git a/Event/xAOD/xAODPrimitives/Root/getIsolationCorrectionDecorator.cxx b/Event/xAOD/xAODPrimitives/Root/getIsolationCorrectionDecorator.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..7424bd2d645513c0096423105892574bb8084884
--- /dev/null
+++ b/Event/xAOD/xAODPrimitives/Root/getIsolationCorrectionDecorator.cxx
@@ -0,0 +1,97 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: getIsolationCorrectionDecorator.cxx 625328 2014-10-31 09:39:45Z laplace $
+
+// System include(s):
+#include <vector>
+#include <memory>
+#include <map>
+#include <stdexcept>
+
+// Local include(s):
+#include "xAODPrimitives/tools/getIsolationCorrectionDecorator.h"
+
+/// The type to be used as the smart pointer
+#if __cplusplus >= 201100
+typedef std::unique_ptr< SG::AuxElement::Decorator< float > > SmartPointer_t;
+typedef std::unique_ptr< SG::AuxElement::Decorator< uint32_t > > SmartPointerUint_t; // Needs to match size of IsolationCalo/TrackCorrectionBitset
+#else
+typedef std::auto_ptr< SG::AuxElement::Decorator< float > > SmartPointer_t;
+typedef std::auto_ptr< SG::AuxElement::Decorator< uint32_t > > SmartPointerUint_t; // Needs to match size of IsolationCalo/TrackCorrectionBitset
+#endif // C++11
+
+namespace xAOD {
+
+  SG::AuxElement::Decorator< uint32_t >*
+  getIsolationCorrectionBitsetDecorator( Iso::IsolationFlavour type ){
+    // Thought we could try it this way, since it's likely to be pretty sparse?
+    // Can optimise if necessary
+    static std::map<Iso::IsolationFlavour, SmartPointerUint_t > sDecorators;
+
+    if (sDecorators.find(type)==sDecorators.end()){
+      // create Decorator
+      std::string name(Iso::toString(type));
+      name+="CorrBitset";
+      sDecorators[type] = SmartPointerUint_t( new SG::AuxElement::Decorator< uint32_t >( name ) ) ;
+    }
+  
+    return sDecorators[ type ].get();    
+  }
+
+  SG::AuxElement::Decorator< float >*
+  getIsolationCorrectionDecorator( Iso::IsolationFlavour type, Iso::IsolationCaloCorrection corr, Iso::IsolationCorrectionParameter param  ){
+      static std::map<uint32_t, SmartPointer_t > sDecorators;                                                          
+      uint32_t hash = (static_cast<uint8_t>(corr)<<8)+(static_cast<uint8_t>(param)); 
+      if(corr == Iso::coreCone) hash += (static_cast<uint8_t>(type)<<16); 
+
+      assert (0 <= static_cast<int>(param) && static_cast<int>(param) < xAOD::Iso::NumCorrParameters);
+      if (sDecorators.find(hash)==sDecorators.end()){                                                                   
+        std::string name(Iso::toString(type));                                                                      
+        if (corr == Iso::coreCone || corr == Iso::coreConeSC)
+	  name+=toString(corr); 
+	else
+	  name = toString(corr);
+        if (param==xAOD::Iso::coreEnergy || param==xAOD::Iso::coreArea){
+          name+=toString(param );    
+        }else{
+          throw std::runtime_error("IsolationCorrectionParameter out of bounds");
+        }
+        name+="Correction";
+                                                                                           
+        sDecorators[hash] = SmartPointer_t( new SG::AuxElement::Decorator< float >( name ) ) ;                          
+      }                                                                                                               
+      return sDecorators[hash].get();  
+  }
+
+  // Isolation Calo 
+   SG::AuxElement::Decorator< float >*
+   getIsolationCorrectionDecorator( Iso::IsolationType type, Iso::IsolationCaloCorrection corr){
+      static std::map<uint32_t, SmartPointer_t > sDecorators;
+      uint32_t hash = (static_cast<uint8_t>(type)<<16)+(static_cast<uint8_t>(corr)<<8);
+      if (sDecorators.find(hash)==sDecorators.end()){
+        std::string name(Iso::toString(type));
+        name+=toString(corr);
+        name+="Correction";
+        
+        sDecorators[hash] = SmartPointer_t( new SG::AuxElement::Decorator< float >( name ) ) ;
+      }
+      return sDecorators[hash].get();
+  }
+
+  SG::AuxElement::Decorator< float >*
+  getIsolationCorrectionDecorator( Iso::IsolationFlavour type, Iso::IsolationTrackCorrection corr ){
+      static std::map<uint32_t, SmartPointer_t > sDecorators;                                                           
+      uint32_t hash = (static_cast<uint8_t>(type)<<16)+(static_cast<uint8_t>(corr)<<8);  
+                                                                                                                       
+      if (sDecorators.find(hash)==sDecorators.end()){                                                                    
+        std::string name(Iso::toString(type));                                                                         
+        name+=toString(corr);    
+        name+="Correction";
+                                                                                              
+        sDecorators[hash] = SmartPointer_t( new SG::AuxElement::Decorator< float >( name ) ) ;                           
+      }                                                                                                                
+      return sDecorators[hash].get();  
+  }
+} // namespace xAOD
diff --git a/Event/xAOD/xAODPrimitives/Root/getIsolationDecorator.cxx b/Event/xAOD/xAODPrimitives/Root/getIsolationDecorator.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..69e05bc7b3fab5dd78f5288e6b7261a0bbe78a4b
--- /dev/null
+++ b/Event/xAOD/xAODPrimitives/Root/getIsolationDecorator.cxx
@@ -0,0 +1,70 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: getIsolationDecorator.cxx 630627 2014-11-24 14:35:22Z emoyse $
+
+// System include(s):
+#include <vector>
+#include <memory>
+
+// Local include(s):
+#include "xAODPrimitives/tools/getIsolationDecorator.h"
+
+/// The type to be used as the smart pointer
+#if __cplusplus >= 201100
+typedef std::unique_ptr< SG::AuxElement::Decorator< float > > SmartPointer_t;
+#else
+typedef std::auto_ptr< SG::AuxElement::Decorator< float > > SmartPointer_t;
+#endif // C++11
+
+/// Helper macro for populating the static vector of this file
+#define DEFINE_ISO_DECORATOR( TYPE )                                     \
+   if( sDecorators.size() <=                                             \
+       static_cast< size_t >( xAOD::Iso::TYPE ) ) {                     \
+      sDecorators.resize( static_cast< size_t >( xAOD::Iso::TYPE ) +     \
+                         1 );                                           \
+   }                                                                    \
+   sDecorators[ static_cast< size_t >( xAOD::Iso::TYPE ) ] =             \
+      SmartPointer_t( new SG::AuxElement::Decorator< float >( #TYPE ) )
+
+namespace xAOD {
+
+   SG::AuxElement::Decorator< float >*
+   getIsolationDecorator( Iso::IsolationType type ) {
+
+      /// Decorator objects
+      static std::vector< SmartPointer_t > sDecorators;
+
+      // Create the accessor objects if they don't exist yet:
+      if( sDecorators.empty() ) {
+         // Make the vector large enough for all the accessors:
+         sDecorators.resize( Iso::numIsolationTypes );
+         // Etcone variables:
+         DEFINE_ISO_DECORATOR( etcone20 );
+         DEFINE_ISO_DECORATOR( etcone30 );
+         DEFINE_ISO_DECORATOR( etcone40 );
+         // Ptcone variables:
+         DEFINE_ISO_DECORATOR( ptcone20 );
+         DEFINE_ISO_DECORATOR( ptcone30 );
+         DEFINE_ISO_DECORATOR( ptcone40 );
+         // TopoEtcone variables:
+         DEFINE_ISO_DECORATOR( topoetcone20 );
+         DEFINE_ISO_DECORATOR( topoetcone30 );
+         DEFINE_ISO_DECORATOR( topoetcone40 );
+         // Mini-Isolation (http://arxiv.org/abs/1007.2221) variables:
+         DEFINE_ISO_DECORATOR(ptvarcone20);
+         DEFINE_ISO_DECORATOR(ptvarcone30);
+         DEFINE_ISO_DECORATOR(ptvarcone40);
+         // neutral eflow
+         DEFINE_ISO_DECORATOR(neflowisol20);
+         DEFINE_ISO_DECORATOR(neflowisol30);
+         DEFINE_ISO_DECORATOR(neflowisol40);
+      }
+
+      // Look up the element, throwing an exception for too large
+      // enum values:
+      return sDecorators.at( static_cast< size_t >( type ) ).get();
+   }
+
+} // namespace xAOD
diff --git a/Event/xAOD/xAODPrimitives/xAODPrimitives/tools/getIsolationCorrectionDecorator.h b/Event/xAOD/xAODPrimitives/xAODPrimitives/tools/getIsolationCorrectionDecorator.h
new file mode 100644
index 0000000000000000000000000000000000000000..bbf2f9d756d1052068a4af2af704ec198bdff6ba
--- /dev/null
+++ b/Event/xAOD/xAODPrimitives/xAODPrimitives/tools/getIsolationCorrectionDecorator.h
@@ -0,0 +1,35 @@
+// Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: getIsolationAccessor.h 582418 2014-02-10 15:03:46Z krasznaa $
+#ifndef XAODPRIMITIVES_TOOLS_GETISOLATIONCORRECTIONDECORATOR_H
+#define XAODPRIMITIVES_TOOLS_GETISOLATIONCORRECTIONDECORATOR_H
+
+// EDM include(s):
+#include "AthContainers/AuxElement.h"
+
+// Local include(s):
+#include "xAODPrimitives/IsolationCorrection.h"
+#include "xAODPrimitives/IsolationType.h"
+#include "xAODPrimitives/IsolationFlavour.h"
+
+namespace xAOD {
+   /// Returns an decorator for the correction bitset corresponding to this IsolationType. 
+   /// The bitset encodes which corrections were applied for this specific type - 
+   /// use getIsolationCorrectionAccessor(Iso::IsolationType, Iso::IsolationCaloCorrection type) to get Accessors for the correction values.
+
+   SG::AuxElement::Decorator< uint32_t >*
+   getIsolationCorrectionBitsetDecorator( Iso::IsolationFlavour type );
+
+   SG::AuxElement::Decorator< float >*
+   getIsolationCorrectionDecorator( Iso::IsolationFlavour, Iso::IsolationCaloCorrection type, Iso::IsolationCorrectionParameter param );
+   SG::AuxElement::Decorator< float >*
+   getIsolationCorrectionDecorator( Iso::IsolationType, Iso::IsolationCaloCorrection type);
+   SG::AuxElement::Decorator< float >*
+   getIsolationCorrectionDecorator( Iso::IsolationFlavour, Iso::IsolationTrackCorrection type);   
+} // namespace xAOD
+
+#endif
diff --git a/Event/xAOD/xAODPrimitives/xAODPrimitives/tools/getIsolationDecorator.h b/Event/xAOD/xAODPrimitives/xAODPrimitives/tools/getIsolationDecorator.h
new file mode 100644
index 0000000000000000000000000000000000000000..0e3b1fe7032305a325364e216d76e51f222b7e0c
--- /dev/null
+++ b/Event/xAOD/xAODPrimitives/xAODPrimitives/tools/getIsolationDecorator.h
@@ -0,0 +1,33 @@
+// Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: getIsolationAccessor.h 630627 2014-11-24 14:35:22Z emoyse $
+#ifndef XAODPRIMITIVES_TOOLS_GETISOLATIONDECORATOR_H
+#define XAODPRIMITIVES_TOOLS_GETISOLATIONDECORATOR_H
+
+// EDM include(s):
+#include "AthContainers/AuxElement.h"
+
+// Local include(s):
+#include "xAODPrimitives/IsolationType.h"
+
+namespace xAOD {
+
+  /// Get the Decorator object for a given isolation type
+  ///
+  /// This function should be used in the EDM code to retrieve the Decorator
+  /// object meant to handle one of the isolation values. The function throws
+  /// an exception if it is given an enumeration value that's out of bounds.
+  ///
+  /// @param type The Iso::IsolationType type
+  /// @returns A pointer to the Decorator object if successful, or a
+  ///          null-pointer if not
+  SG::AuxElement::Decorator< float >*
+  getIsolationDecorator( Iso::IsolationType type );
+
+} // namespace xAOD
+
+#endif // XAODPRIMITIVES_TOOLS_GETISOLATIONDECORATOR_H
diff --git a/Event/xAOD/xAODTau/doc/packagedoc.h b/Event/xAOD/xAODTau/doc/packagedoc.h
index 6904f56ec54e9aab9279076d2fbc3630690ad122..4f4bbfacd5564a2e44fbaa30d11191cb1a832850 100644
--- a/Event/xAOD/xAODTau/doc/packagedoc.h
+++ b/Event/xAOD/xAODTau/doc/packagedoc.h
@@ -25,5 +25,3 @@ $Date: 2013-11-13 18:03:12 +0100 (Wed, 13 Nov 2013) $
     - xAOD::TauJetAuxContainer: Typedef to the latest tau jet auxiliray
       container version.
     - xAOD::TauJet_v1: The current latest tau jet implementation.
-
-
diff --git a/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackMeasurementValidationContainerCnv.cxx b/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackMeasurementValidationContainerCnv.cxx
index aa4b18469508d27772e532d45cc15ceefdca552a..73b4ff93519c481951526f25f1968ccde5beb11d 100644
--- a/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackMeasurementValidationContainerCnv.cxx
+++ b/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackMeasurementValidationContainerCnv.cxx
@@ -37,10 +37,6 @@ createPersistent( xAOD::TrackMeasurementValidationContainer* trans ) {
       new xAOD::TrackMeasurementValidationContainer( trans->begin(), trans->end(),
                                       SG::VIEW_ELEMENTS );
 
-   // Prepare the objects to be written out:
-   xAOD::TrackMeasurementValidationContainer::iterator itr = result->begin();
-   xAOD::TrackMeasurementValidationContainer::iterator end = result->end();
-
    // Return the new container:
    return result;
 }
diff --git a/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackParticleAuxContainerCnv.h b/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackParticleAuxContainerCnv.h
index 82274344120b6084afc789a263ff6f6fb09f9879..c0e03bfb956f76d703a850625b56466bc5e3c3ea 100644
--- a/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackParticleAuxContainerCnv.h
+++ b/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackParticleAuxContainerCnv.h
@@ -47,9 +47,9 @@ protected:
 
    /// Function preparing the container to be written out
    virtual xAOD::TrackParticleAuxContainer*
-   createPersistent( xAOD::TrackParticleAuxContainer* trans );
+   createPersistent( xAOD::TrackParticleAuxContainer* trans ) override;
    /// Function reading in the object from the input file
-   virtual xAOD::TrackParticleAuxContainer* createTransient();
+   virtual xAOD::TrackParticleAuxContainer* createTransient() override;
 
 private:
    /// Compressor tool for the track particles
diff --git a/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackParticleContainerCnv.cxx b/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackParticleContainerCnv.cxx
index dbcc75bfb6913244492d99c26e644a1a436230c7..990df248eb977af325067b89bfc97ff0a29c8923 100644
--- a/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackParticleContainerCnv.cxx
+++ b/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackParticleContainerCnv.cxx
@@ -43,10 +43,6 @@ createPersistent( xAOD::TrackParticleContainer* trans ) {
       new xAOD::TrackParticleContainer( trans->begin(), trans->end(),
                                       SG::VIEW_ELEMENTS );
 
-   // Prepare the objects to be written out:
-   xAOD::TrackParticleContainer::iterator itr = result->begin();
-   xAOD::TrackParticleContainer::iterator end = result->end();
-
    // Return the new container:
    return result;
 }
diff --git a/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackStateValidationContainerCnv.cxx b/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackStateValidationContainerCnv.cxx
index 6524011ba87e60046579cb50cc682b93ec1de194..45c9ce2538a05208812d985430b74bfc1b50b7fb 100644
--- a/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackStateValidationContainerCnv.cxx
+++ b/Event/xAOD/xAODTrackingAthenaPool/src/xAODTrackStateValidationContainerCnv.cxx
@@ -37,11 +37,6 @@ createPersistent( xAOD::TrackStateValidationContainer* trans ) {
       new xAOD::TrackStateValidationContainer( trans->begin(), trans->end(),
                                       SG::VIEW_ELEMENTS );
 
-   // Prepare the objects to be written out:
-   xAOD::TrackStateValidationContainer::iterator itr = result->begin();
-   xAOD::TrackStateValidationContainer::iterator end = result->end();
-   
-
    // Return the new container:
    return result;
 }
diff --git a/Event/xAOD/xAODTrackingAthenaPool/src/xAODVertexContainerCnv.cxx b/Event/xAOD/xAODTrackingAthenaPool/src/xAODVertexContainerCnv.cxx
index 01bfe3e99eb844c471a89b10e6b7e418c791582a..210d16f52333eb71b4ccb157c79aa9b65482acf2 100644
--- a/Event/xAOD/xAODTrackingAthenaPool/src/xAODVertexContainerCnv.cxx
+++ b/Event/xAOD/xAODTrackingAthenaPool/src/xAODVertexContainerCnv.cxx
@@ -42,10 +42,6 @@ createPersistent( xAOD::VertexContainer* trans ) {
       new xAOD::VertexContainer( trans->begin(), trans->end(),
                                       SG::VIEW_ELEMENTS );
 
-   // Prepare the objects to be written out:
-   xAOD::VertexContainer::iterator itr = result->begin();
-   xAOD::VertexContainer::iterator end = result->end();
-
    // Return the new container:
    return result;
 }
diff --git a/Event/xAOD/xAODTrigL1CaloCnv/doc/packagedoc.h b/Event/xAOD/xAODTrigL1CaloCnv/doc/packagedoc.h
index f883933ee85976f04a1f39ff51e223fec437821d..87fddcd3cede98dc58655425fd39a2d9abbd2b31 100644
--- a/Event/xAOD/xAODTrigL1CaloCnv/doc/packagedoc.h
+++ b/Event/xAOD/xAODTrigL1CaloCnv/doc/packagedoc.h
@@ -28,4 +28,3 @@
    
 
 */
-   
diff --git a/Event/xAOD/xAODTrigger/Root/ByteStreamAuxContainer_v1.cxx b/Event/xAOD/xAODTrigger/Root/ByteStreamAuxContainer_v1.cxx
index f348915f8f60bd8fb2160c8f776daf9c222fbb8b..f54a36d96b8fbf8b6b3cd052f68a2a155a6e6a08 100644
--- a/Event/xAOD/xAODTrigger/Root/ByteStreamAuxContainer_v1.cxx
+++ b/Event/xAOD/xAODTrigger/Root/ByteStreamAuxContainer_v1.cxx
@@ -199,6 +199,16 @@ namespace xAOD {
    }
 
 
+   /// Lock a decoration.
+   void ByteStreamAuxContainer_v1::lockDecoration (SG::auxid_t auxid)
+   { 
+     guard_t guard (m_mutex);
+     if (auxid < m_isDecoration.size()) {
+       m_isDecoration[auxid] = false;
+     }
+   }
+
+
    size_t ByteStreamAuxContainer_v1::size_noLock() const
    {
      auxid_set_t::const_iterator i = m_auxids.begin();
diff --git a/Event/xAOD/xAODTrigger/xAODTrigger/versions/ByteStreamAuxContainer_v1.h b/Event/xAOD/xAODTrigger/xAODTrigger/versions/ByteStreamAuxContainer_v1.h
index 601cb8362f06904c12dfebd55ddd1059191607f9..eb58a848d93f8d46983ae6a694559c7c32be723c 100644
--- a/Event/xAOD/xAODTrigger/xAODTrigger/versions/ByteStreamAuxContainer_v1.h
+++ b/Event/xAOD/xAODTrigger/xAODTrigger/versions/ByteStreamAuxContainer_v1.h
@@ -83,6 +83,9 @@ namespace xAOD {
       /// Clear all decorations.
       virtual void clearDecorations();
 
+      /// Lock a decoration.
+      virtual void lockDecoration (SG::auxid_t auxid);
+
       /// Get the size of the container.
       virtual size_t size() const;
 
diff --git a/External/AtlasPyFwdBwdPorts/CMakeLists.txt b/External/AtlasPyFwdBwdPorts/CMakeLists.txt
index 2f15475289ac1f1157ef88ad86aabc06684d3465..2913362cf0ca9bce787305717b9ebe69e79bd22e 100644
--- a/External/AtlasPyFwdBwdPorts/CMakeLists.txt
+++ b/External/AtlasPyFwdBwdPorts/CMakeLists.txt
@@ -185,5 +185,16 @@ _setup_python_package( simplejson
    2f8351f6e6fe7ef25744805dfa56c0d5
    DEPENDS distribute )
 
+
+# Install gcovr:
+_setup_python_package( gcovr
+   ${CMAKE_CURRENT_SOURCE_DIR}/src/gcovr-3.3.tar.gz
+   85af705ca6e1187d2bae967d26810c55
+   DEPENDS distribute 
+   SINGLE_VERSION )
+
+
+
+
 # Clean up:
 unset( _setup_python_package )
diff --git a/External/AtlasPyFwdBwdPorts/src/gcovr-3.3.tar.gz b/External/AtlasPyFwdBwdPorts/src/gcovr-3.3.tar.gz
new file mode 100644
index 0000000000000000000000000000000000000000..a65abc035e91ec9cdcd80bbabfdde8288530011d
Binary files /dev/null and b/External/AtlasPyFwdBwdPorts/src/gcovr-3.3.tar.gz differ
diff --git a/ForwardDetectors/ALFA/ALFA_BeamTransport/doc/packagedoc.h b/ForwardDetectors/ALFA/ALFA_BeamTransport/doc/packagedoc.h
index ee16e4f1ad1de11a13ac24b59a08704e1785bb19..97674d633e3ec3207e5f170c07058906e6220d2e 100644
--- a/ForwardDetectors/ALFA/ALFA_BeamTransport/doc/packagedoc.h
+++ b/ForwardDetectors/ALFA/ALFA_BeamTransport/doc/packagedoc.h
@@ -16,17 +16,6 @@ It uses as beam transport library the FPTracker library.
 
   - ALFA_BeamTransport : main class which handels initialization(), execution() and finalize()
   - ALFA_BeamTrack : calling functions of FPTracekr to calculate beamtransport
-@ref used_ALFA_BeamTransport
 
-@ref requirements_ALFA_BeamTransport
 
 */
-
-/**
-@page used_ALFA_BeamTransport Used Packages
-*/
-
-/**
-@page requirements_ALFA_BeamTransport Requirements
-*/
- 
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_Decoder.h b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_Decoder.h
index bfc46fb37053ab6bb8f95c59d237d9bc9c0e8654..b062ffa924d760c6887fbcb2fbe73089d97efdae 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_Decoder.h
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_Decoder.h
@@ -35,11 +35,6 @@
 #include "ByteStreamCnvSvcBase/IByteStreamEventAccess.h"
 
 
-using eformat::helper::SourceIdentifier; 
-
-using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
-using OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment;
-
 class ISvcLocator;
 class StatusCode;
 
@@ -64,7 +59,7 @@ class ALFA_Decoder: public AthAlgTool {
   virtual StatusCode initialize();
   virtual StatusCode finalize();
 
-  StatusCode fillCollection(const ROBFragment *robFrag, ALFA_RawDataContainer* rdoCont,  std::vector<unsigned int>* vecHash = NULL); 
+  StatusCode fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFrag, ALFA_RawDataContainer* rdoCont,  std::vector<unsigned int>* vecHash = NULL); 
  
   ALFA_RawDataCollection* getCollection (unsigned int MotherBoardId, ALFA_RawDataContainer* cont);
   ALFA_RawData* getRawData (unsigned int PMFId, ALFA_RawDataCollection* coll);
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_Decoder_charge.h b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_Decoder_charge.h
index 7c23964a27df944bcdbf9242983f030f8645292e..b24415ed4a5bcfca51fba6123fa0992d222e9342 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_Decoder_charge.h
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_Decoder_charge.h
@@ -35,11 +35,6 @@
 #include "ByteStreamCnvSvcBase/IByteStreamEventAccess.h"
 
 
-using eformat::helper::SourceIdentifier; 
-
-using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
-using OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment;
-
 class ISvcLocator;
 class StatusCode;
 
@@ -64,7 +59,7 @@ class ALFA_Decoder_charge: public AthAlgTool {
   virtual StatusCode initialize();
   virtual StatusCode finalize();
 
-  StatusCode fillCollection(const ROBFragment *robFrag, ALFA_RawDataContainer_charge* rdoCont,  std::vector<unsigned int>* vecHash = NULL); 
+  StatusCode fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFrag, ALFA_RawDataContainer_charge* rdoCont,  std::vector<unsigned int>* vecHash = NULL); 
  
 ALFA_RawDataCollection_charge* getCollection (unsigned int MotherBoardId, ALFA_RawDataContainer_charge* cont);
 ALFA_RawData_charge* getRawData_charge (unsigned int PMFId, ALFA_RawDataCollection_charge* coll);
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataCollectionReadOut.h b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataCollectionReadOut.h
index 8d014823892607c5a0ed572d186e7bc9bb0b0518..66f8b6736617c7056e2b77789cf88feb179116b9 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataCollectionReadOut.h
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataCollectionReadOut.h
@@ -33,7 +33,6 @@
 // Decoding methods for a block
 // S. Diglio
 
-using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
 
 class ALFA_RawDataCollectionReadOut : public ALFA_ReadOut
 {
@@ -65,26 +64,26 @@ class ALFA_RawDataCollectionReadOut : public ALFA_ReadOut
   
   // Word header Position and values
   // The word header occupies the 8 highest bits of each   word 
-  static const uint16_t headerPos  = 24;
-  static const uint16_t headerBits = 0xff;
+  static const uint16_t s_headerPos  = 24;
+  static const uint16_t s_headerBits = 0xff;
   
   // Word header Position and values
   // The word header occupies the 12 highest bits of each   word 
-  static const uint16_t headerPos2  = 20;
-  static const uint16_t headerBits2 = 0xfff;
+  static const uint16_t s_headerPos2  = 20;
+  static const uint16_t s_headerBits2 = 0xfff;
    
   // Beginning of buffer
-  static const uint16_t BOBvalue = 0x80;
+  static const uint16_t s_BOBvalue = 0x80;
   // Link Word Count: first word of a   link block
-  static const uint16_t LWCvalue   = 0x810;
+  static const uint16_t s_LWCvalue   = 0x810;
   // Beginning of Link: signals which   link is giving its data
-  static const uint16_t BOLvalue   = 0x18;
+  static const uint16_t s_BOLvalue   = 0x18;
   // TDC Link Present
-  static const uint16_t TLPvalue   = 0x890;
+  static const uint16_t s_TLPvalue   = 0x890;
   // Trailer Word Count: last word of a   link block
-  static const uint16_t TWCvalue   = 0x8a;
+  static const uint16_t s_TWCvalue   = 0x8a;
   // End of Block (end of data from the  s)
-  static const uint16_t EOBvalue   = 0xf0;
+  static const uint16_t s_EOBvalue   = 0xf0;
   
  public:
   ALFA_RawDataCollectionReadOut();
@@ -92,12 +91,12 @@ class ALFA_RawDataCollectionReadOut : public ALFA_ReadOut
 
   void decodeWord(uint32_t dataWord);
 
-  bool is_BOB() {return m_wordHeader == BOBvalue;};  
-  bool is_LWC() {return m_wordHeader2 == LWCvalue;};  
-  bool is_BOL() {return m_wordHeader == BOLvalue;};
-  bool is_TLP() {return m_wordHeader2 == TLPvalue;};
-  bool is_TWC() {return m_wordHeader == TWCvalue;}; 
-  bool is_EOB() {return m_wordHeader == EOBvalue;}; 
+  bool is_BOB() {return m_wordHeader == s_BOBvalue;};  
+  bool is_LWC() {return m_wordHeader2 == s_LWCvalue;};  
+  bool is_BOL() {return m_wordHeader == s_BOLvalue;};
+  bool is_TLP() {return m_wordHeader2 == s_TLPvalue;};
+  bool is_TWC() {return m_wordHeader == s_TWCvalue;}; 
+  bool is_EOB() {return m_wordHeader == s_EOBvalue;}; 
 
   // Methods to access the decoded information
   uint32_t lvl1Id() {return m_lvl1Id;}
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataContainerReadOut.h b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataContainerReadOut.h
index 890318c2461abac5c26dc756f678e0c82a75c7d3..349ca39df0ac6d39098f109dc3c60d77e173d257 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataContainerReadOut.h
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataContainerReadOut.h
@@ -43,7 +43,6 @@ class ALFA_RawDataContainerReadOut : public ALFA_ReadOut
   // Raw data word and word header
  
   uint32_t m_wordMarker;
-  uint32_t m_dataWord;
 
   // Data members
   uint16_t m_subdetId;   // Sub-detector Id 
@@ -64,22 +63,22 @@ class ALFA_RawDataContainerReadOut : public ALFA_ReadOut
   // Data words in the ROD header
   
   // Full Event marker
-  static const uint32_t FullEVmarker = 0xaa1234aa;
+  static const uint32_t s_FullEVmarker = 0xaa1234aa;
   // ROB marker
-  static const uint32_t ROBmarker = 0xdd1234dd;
+  static const uint32_t s_ROBmarker = 0xdd1234dd;
   // ROD marker
-  static const uint32_t RODmarker = 0xee1234ee;
+  static const uint32_t s_RODmarker = 0xee1234ee;
 
-  static const uint32_t RODheadersize = 0x00000009; 
-  static const uint32_t RODversion  = 0x03010000;    
+  static const uint32_t s_RODheadersize = 0x00000009; 
+  static const uint32_t s_RODversion  = 0x03010000;    
 
  public:
   ALFA_RawDataContainerReadOut();
   ~ALFA_RawDataContainerReadOut();
  
-  bool is_FullEVmarker() {return m_wordMarker == FullEVmarker;};
-  bool is_ROBmarker() {return m_wordMarker == ROBmarker;};  	
-  bool is_RODmarker() {return m_wordMarker == RODmarker;};  	
+  bool is_FullEVmarker() {return m_wordMarker == s_FullEVmarker;};
+  bool is_ROBmarker() {return m_wordMarker == s_ROBmarker;};  	
+  bool is_RODmarker() {return m_wordMarker == s_RODmarker;};  	
   
  
   void decodeWord(uint32_t dataWord);
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProvider.h b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProvider.h
index e5d35d189a2485cd22c68cf1ef260f04933f44e4..fac3d9026521a5e3f3f4ec5c1c7ca4fbe78dc772 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProvider.h
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProvider.h
@@ -55,9 +55,6 @@ class ALFA_RawDataProvider : public AthAlgorithm
 
  private:
 
-  int m_nRawDataCollection ;
-  int m_nRawData ;
-     
   /// Service for reading bytestream
   ServiceHandle<IROBDataProviderSvc>   m_robDataProvider;
   
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool.h b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool.h
index 830867305257d40de5d7d8b4d9a17bf962bc5646..c472421f149f4d40e2094312f3a5cb4713bfb4cc 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool.h
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool.h
@@ -31,8 +31,6 @@
 #include <string>
 
 
-using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
-
 class ALFA_RawData;
 class ALFA_RawDataCollection;
 class ALFA_RawDataContainer;
@@ -62,7 +60,7 @@ class ALFA_RawDataProviderTool : public AthAlgTool
   
 
    //! this is the main decoding method
-  StatusCode convert(std::vector<const ROBFragment*>& vecRobs,ALFA_RawDataContainer* rdoCont);
+  StatusCode convert(std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs,ALFA_RawDataContainer* rdoCont);
   
 private:
  
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool_charge.h b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool_charge.h
index 9d09afa91835590dc267bc8614b7fa491b79d5ef..e72a2c27c1ccfde97a75d97010b58507bdfe2c37 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool_charge.h
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool_charge.h
@@ -31,8 +31,6 @@
 #include <string>
 
 
-using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
-
 class ALFA_RawData_charge;
 class ALFA_RawDataCollection_charge;
 class ALFA_RawDataContainer_charge;
@@ -62,7 +60,7 @@ class ALFA_RawDataProviderTool_charge : public AthAlgTool
   
 
    //! this is the main decoding method
-  StatusCode convert_charge(std::vector<const ROBFragment*>& vecRobs,ALFA_RawDataContainer_charge* rdoCont);
+  StatusCode convert_charge(std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs,ALFA_RawDataContainer_charge* rdoCont);
   
 private:
  
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProvider_charge.h b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProvider_charge.h
index 4cfd9830d8a36f9c655df0ba64d45a3ced79bf34..ef073039423fca75833d3ba31ea771e3b5779262 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProvider_charge.h
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataProvider_charge.h
@@ -56,9 +56,6 @@ class ALFA_RawDataProvider_charge : public AthAlgorithm
 
  private:
 
-  int m_nRawDataCollection ;
-  int m_nRawData ;
-
   /// Service for reading bytestream
   ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
 
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataReadOut.h b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataReadOut.h
index 1a25eab9c82da3e25f96362197cc49415ace1277..5234339a3f5aa532e72454ec551cee6c81d6e2e9 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataReadOut.h
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataReadOut.h
@@ -29,7 +29,6 @@
 // Decoding methods for raw data words 
 // S. Diglio Sept 2009
 
-using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
 
 class ALFA_RawDataReadOut : public ALFA_ReadOut {  
 
@@ -67,23 +66,23 @@ class ALFA_RawDataReadOut : public ALFA_ReadOut {
   bool     m_error_bit17;
   bool     m_bit18;
  
-  std::vector<uint32_t> MarocChan;
+  std::vector<uint32_t> m_MarocChan;
 
   // Define the data structure and the word header values
 
   // Word header Position and values
   // The word header occupies the 4 highest bits of each TDC data word 
-  static const uint16_t headerPos  = 28;  // from bit 28 to 31
-  static const uint16_t headerBits = 0xf;
+  static const uint16_t s_headerPos  = 28;  // from bit 28 to 31
+  static const uint16_t s_headerBits = 0xf;
 
   // Beginning of TDC 
-  static const uint16_t BOTvalue  = 0xa;
+  static const uint16_t s_BOTvalue  = 0xa;
     
   // End of TDC
-  static const uint16_t EOTvalue   = 0xc;
+  static const uint16_t s_EOTvalue   = 0xc;
   
   // TDC single measurement
-  static const uint16_t TSMvalue   = 0x3;  
+  static const uint16_t s_TSMvalue   = 0x3;  
   
  public:
   
@@ -98,11 +97,11 @@ class ALFA_RawDataReadOut : public ALFA_ReadOut {
 
   // Methods to identify the word type
   // Beginning of TDC
-  bool is_BOT() {return (m_wordHeader == BOTvalue);};
+  bool is_BOT() {return (m_wordHeader == s_BOTvalue);};
   // End of TDC
-  bool is_EOT() {return (m_wordHeader == EOTvalue);};
+  bool is_EOT() {return (m_wordHeader == s_EOTvalue);};
   // TDC single measurement
-  bool is_TDCt() {return (m_wordHeader == TSMvalue);};
+  bool is_TDCt() {return (m_wordHeader == s_TSMvalue);};
    
   // Methods to retrieve the decoded word content (Get)
   
@@ -126,7 +125,7 @@ class ALFA_RawDataReadOut : public ALFA_ReadOut {
   uint16_t     bit26_27()   {return m_bit26_27;}
   uint16_t     bit24_27()   {return m_bit24_27;}
 
-  std::vector<uint32_t> HitChan() const {return MarocChan;}
+  std::vector<uint32_t> HitChan() const {return m_MarocChan;}
 
  private:
 
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataReadOut_charge.h b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataReadOut_charge.h
index 64e19b9cabc962b67f0bb66274f873110df97a37..cfea2a0a1c89f05e703a7eeba29e867e6ef362ce 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataReadOut_charge.h
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataByteStreamCnv/ALFA_RawDataReadOut_charge.h
@@ -30,7 +30,6 @@
 // Decoding methods for raw data words 
 // S. Diglio Sept 2009
 
-using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
 
 class ALFA_RawDataReadOut_charge : public ALFA_ReadOut {  
 
@@ -65,24 +64,24 @@ class ALFA_RawDataReadOut_charge : public ALFA_ReadOut {
   uint16_t     m_bit24_27;	
   uint16_t     m_bit27_24;	
 
-  std::vector<uint32_t> ChargeChan;
+  std::vector<uint32_t> m_ChargeChan;
 
 
   // Define the data structure and the word header values
 
   // PMF header Position and values
   // The word header occupies the 4 highest bits of each TDC data word 
-  static const uint16_t headerPos  = 28;  // from bit 28 to 31
-  static const uint16_t headerBits = 0xf;
+  static const uint16_t s_headerPos  = 28;  // from bit 28 to 31
+  static const uint16_t s_headerBits = 0xf;
 
   // Beginning of TDC 
-  static const uint16_t BOTvalue  = 0xa;
+  static const uint16_t s_BOTvalue  = 0xa;
     
   // End of TDC
-  static const uint16_t EOTvalue   = 0xc;
+  static const uint16_t s_EOTvalue   = 0xc;
   
   // TDC single measurement charge
-  static const uint16_t TSMvalue_charge   = 0x4;
+  static const uint16_t s_TSMvalue_charge   = 0x4;
   
   
  public:
@@ -98,11 +97,11 @@ class ALFA_RawDataReadOut_charge : public ALFA_ReadOut {
 
   // Methods to identify the word type
   // Beginning of TDC
-  bool is_BOT() {return (m_wordHeader == BOTvalue);};
+  bool is_BOT() {return (m_wordHeader == s_BOTvalue);};
   // End of TDC
-  bool is_EOT() {return (m_wordHeader == EOTvalue);};
+  bool is_EOT() {return (m_wordHeader == s_EOTvalue);};
   // TDC single measurement
-  bool is_TDCch() {return (m_wordHeader == TSMvalue_charge);};
+  bool is_TDCch() {return (m_wordHeader == s_TSMvalue_charge);};
    
   
   // Methods to retrieve the decoded word content (Get)
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_Decoder.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_Decoder.cxx
index 701de561f3811a3f0557e53ab24bbacbd9376a9b..c728d988ea94cc747e0657f9b0b26112d1b2a39a 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_Decoder.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_Decoder.cxx
@@ -107,7 +107,7 @@ StatusCode ALFA_Decoder::finalize()
 ////////////////////////
 // fillCollection() -
 ////////////////////////
-StatusCode ALFA_Decoder::fillCollection(const ROBFragment *robFrag, ALFA_RawDataContainer* rdoCont, std::vector<unsigned int>* )
+StatusCode ALFA_Decoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFrag, ALFA_RawDataContainer* rdoCont, std::vector<unsigned int>* )
 {
   msg(MSG::DEBUG) << " ALFA_RoDDecoder::fillCollection" << endmsg;
 
@@ -205,7 +205,7 @@ StatusCode ALFA_Decoder::fillCollection(const ROBFragment *robFrag, ALFA_RawData
   uint32_t size = robFrag->rod_ndata();
 
   // get source ID
-  uint32_t m_ROD_source_ID = robFrag->rod_source_id();
+  uint32_t ROD_source_ID = robFrag->rod_source_id();
 
 
   uint32_t ROD_LVL1_ID  = robFrag->rod_lvl1_id();
@@ -213,7 +213,7 @@ StatusCode ALFA_Decoder::fillCollection(const ROBFragment *robFrag, ALFA_RawData
   msg(MSG::DEBUG) << "============================" << std::endl;
   msg(MSG::DEBUG) << "Frag Size  : " << robFrag->rod_fragment_size_word() << endmsg;
   msg(MSG::DEBUG) << "Header Size: " << robFrag->rod_header_size_word() << endmsg;
-  msg(MSG::DEBUG) << "Source  ID : " << m_ROD_source_ID << endmsg;
+  msg(MSG::DEBUG) << "Source  ID : " << ROD_source_ID << endmsg;
   msg(MSG::DEBUG) << "Run num    : " << robFrag->rod_run_no() << endmsg;
   msg(MSG::DEBUG) << "Version    : " << robFrag->rod_version() << endmsg;
   msg(MSG::DEBUG) << " ROD_LVL1_ID " << ROD_LVL1_ID <<  endmsg;
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_Decoder_charge.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_Decoder_charge.cxx
index 6544e4391ba0e33326f37acc6e06b5a848f9c339..16335316fc317b4eb59a2754e05c7a374a176b33 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_Decoder_charge.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_Decoder_charge.cxx
@@ -99,7 +99,7 @@ msg(MSG::DEBUG) << " Bytestream summary:" << m_fragment_number << " fragments fo
 ////////////////////////
 // fillCollection() -
 ////////////////////////
-StatusCode ALFA_Decoder_charge::fillCollection(const ROBFragment *robFrag, ALFA_RawDataContainer_charge* rdoCont, std::vector<unsigned int>* ) {
+StatusCode ALFA_Decoder_charge::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFrag, ALFA_RawDataContainer_charge* rdoCont, std::vector<unsigned int>* ) {
  msg(MSG::DEBUG) << " ALFA_RoDDecoder_charge::fillCollection" << endmsg;
 
 StatusCode sc = StatusCode::SUCCESS;
@@ -171,7 +171,7 @@ uint16_t CountPMF0=0;
   uint32_t size = robFrag->rod_ndata(); 
 
  // get source ID
-  uint32_t m_ROD_source_ID = robFrag->rod_source_id();
+  uint32_t ROD_source_ID = robFrag->rod_source_id();
 
 
   uint32_t ROD_LVL1_ID  = robFrag->rod_lvl1_id(); 
@@ -179,7 +179,7 @@ uint16_t CountPMF0=0;
 msg(MSG::DEBUG) << "============================" << std::endl;
 msg(MSG::DEBUG) <<"Frag Size  : " << robFrag->rod_fragment_size_word() << endmsg;
 msg(MSG::DEBUG) <<"Header Size: " << robFrag->rod_header_size_word() << endmsg;
-msg(MSG::DEBUG) <<"Source  ID : " << m_ROD_source_ID << endmsg;
+msg(MSG::DEBUG) <<"Source  ID : " << ROD_source_ID << endmsg;
 msg(MSG::DEBUG) <<"Run num    : " << robFrag->rod_run_no() << endmsg;
 msg(MSG::DEBUG) <<"Version    : " << robFrag->rod_version() << endmsg;
 msg(MSG::DEBUG) << " ROD_LVL1_ID " <<ROD_LVL1_ID<<  endmsg; 
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataCollectionReadOut.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataCollectionReadOut.cxx
index 192e654736a5578f78d5f2b0d72e27c0afcd3bde..3f22554b3873e2cdea8d3fef0115d9a08821e92f 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataCollectionReadOut.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataCollectionReadOut.cxx
@@ -33,8 +33,8 @@ void ALFA_RawDataCollectionReadOut::decodeWord(uint32_t dataWord)
 
   m_dataWord   = dataWord;
   m_word       = dataWord;
-  m_wordHeader = (dataWord>>headerPos) & headerBits;
-  m_wordHeader2 = (dataWord>>headerPos2) & headerBits2;
+  m_wordHeader = (dataWord>>s_headerPos) & s_headerBits;
+  m_wordHeader2 = (dataWord>>s_headerPos2) & s_headerBits2;
 
   if (is_BOB())
     {
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataContainerReadOut.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataContainerReadOut.cxx
index a3bd937d745b66dce3070d6a9c999421f4811fad..ccf738a2519557a8f6b8275491355f19f6085a3f 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataContainerReadOut.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataContainerReadOut.cxx
@@ -14,7 +14,6 @@
  
 ALFA_RawDataContainerReadOut::ALFA_RawDataContainerReadOut():
   m_wordMarker(0),
-  m_dataWord(0),
   m_subdetId(0),
   m_mrodId(0),
   m_lvl1Id(0),
@@ -42,7 +41,7 @@ void ALFA_RawDataContainerReadOut::decodeHeaderFull(std::vector<uint32_t>& vData
   setZeroFull();
 
  
-  if (vDataFull[0] == FullEVmarker) 
+  if (vDataFull[0] == s_FullEVmarker) 
     {
       // cout  << "Full HEADER found : vDataFull[0]  "<< std::hex  << vDataFull[0] <<  std::dec  <<endl;
 
@@ -75,14 +74,14 @@ void ALFA_RawDataContainerReadOut::decodeHeader(std::vector<uint32_t>& vData)
 
   setZero();
 
-  if (vData[0] != RODmarker) 
+  if (vData[0] != s_RODmarker) 
     {
 #ifndef NDEBUG
       log << MSG::ERROR << "ROD Start of header marker not found" << endmsg;
 #endif
       assert(0);
     }
-  if (vData[1] != RODheadersize) 
+  if (vData[1] != s_RODheadersize) 
     {
 #ifndef NDEBUG
       log << MSG::ERROR << "ROD header size doesn't match " << endmsg;
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProvider.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProvider.cxx
index e3bf0f95a6134bff831d81a2b1cd945c27a3c3d1..b18d0b7b9023cb9f0e59ce48d3f02ca991f9042d 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProvider.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProvider.cxx
@@ -16,8 +16,6 @@
 ////////////////////////
 ALFA_RawDataProvider::ALFA_RawDataProvider(const std::string& name, ISvcLocator* pSvcLocator):
   AthAlgorithm         (name, pSvcLocator),
-  m_nRawDataCollection(0),
-  m_nRawData(0),
   m_robDataProvider("ROBDataProviderSvc",name),
   m_rawDataTool("ALFA_RawDataProviderTool"),
   m_ALFA_RawDataCollectionKey(),
@@ -89,7 +87,7 @@ StatusCode ALFA_RawDataProvider::execute()
 
 
 
-  std::vector<const ROBFragment*> listOfRobf;
+  std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> listOfRobf;
   std::vector<unsigned int> ROBIDs;
   ROBIDs.push_back(0x00840000);
   ROBIDs.push_back(0x00840001);
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProviderTool.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProviderTool.cxx
index 4d9ec40095a58c8dfaf15c59d129d69bd5bec4c5..8cf1088fe51659c00345108566c2ac31f8048ac1 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProviderTool.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProviderTool.cxx
@@ -4,6 +4,8 @@
 
 #include "ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool.h"
 
+using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
+
 static const InterfaceID IID_IALFA_RawCollByteStreamTool("ALFA_RawDataProviderTool", 1, 0);
 const InterfaceID& ALFA_RawDataProviderTool::interfaceID( )
 { return IID_IALFA_RawCollByteStreamTool; }
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProviderTool_charge.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProviderTool_charge.cxx
index 3580b803187b6f5d6d7cdf5810829809137f7363..8e9764e8e5048945c4d882668c53dd60aff9a8bd 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProviderTool_charge.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProviderTool_charge.cxx
@@ -4,6 +4,8 @@
 
 #include "ALFA_RawDataByteStreamCnv/ALFA_RawDataProviderTool_charge.h"
 
+using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
+
 static const InterfaceID IID_IALFA_RawCollByteStreamTool("ALFA_RawDataProviderTool_charge", 1, 0);
 const InterfaceID& ALFA_RawDataProviderTool_charge::interfaceID( )
 { return IID_IALFA_RawCollByteStreamTool; }
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProvider_charge.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProvider_charge.cxx
index 48cae1cebf92c983632b8761cbb4b12ef74d74c9..7fb2a9fadbbfa19dbdb600d40d18a52f88931016 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProvider_charge.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataProvider_charge.cxx
@@ -16,8 +16,6 @@
 ////////////////////////
 ALFA_RawDataProvider_charge::ALFA_RawDataProvider_charge(const std::string& name, ISvcLocator* pSvcLocator):
   AthAlgorithm (name, pSvcLocator),
-  m_nRawDataCollection(0),
-  m_nRawData(0),
   m_robDataProvider("ROBDataProviderSvc",name),
   m_rawDataTool_charge("ALFA_RawDataProviderTool_charge"),
   m_ALFA_RawDataCollectionKey_charge(),
@@ -85,7 +83,7 @@ msg(MSG::DEBUG) << "ALFA_RawDataProvider_charge::EXECUTE" << endmsg;
 
 
 
-  std::vector<const ROBFragment*> listOfRobf;
+  std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> listOfRobf;
   std::vector<unsigned int> ROBIDs;
   ROBIDs.push_back(0x00840000);
   ROBIDs.push_back(0x00840001);
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataReadOut.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataReadOut.cxx
index c71c36518501ee05c9089be69720a01e4ba81591..ac61000932341adf0700cc608433cf73c7754772 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataReadOut.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataReadOut.cxx
@@ -24,8 +24,7 @@ ALFA_RawDataReadOut::ALFA_RawDataReadOut() :
   m_scaler(0),
   m_bit16(0),
   m_error_bit17(0),
-  m_bit18(0),
-  MarocChan()
+  m_bit18(0)
 {  }
 
 ALFA_RawDataReadOut::~ALFA_RawDataReadOut()
@@ -39,7 +38,7 @@ void ALFA_RawDataReadOut::decodeWord(uint32_t dataWord)
   setZero();
   m_dataWord = dataWord;
   m_word = dataWord;
-  m_wordHeader = (dataWord>>headerPos)&headerBits;
+  m_wordHeader = (dataWord>>s_headerPos)&s_headerBits;
 
   if (is_TDCt())         // TDC single measurement
     {
@@ -103,7 +102,6 @@ void ALFA_RawDataReadOut::setZero()
   m_MBId = 0;   
   m_bit26_27=0;
   m_bit24_27=0; 
-  //MarocChan.clear();
 }
 
 //-------------------------------------------------------------------------
diff --git a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataReadOut_charge.cxx b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataReadOut_charge.cxx
index 83066752e11a471d1a42c1c517aa092225ed4949..6bed71e37b5b593a175de6217c2cb3bfe85d3504 100644
--- a/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataReadOut_charge.cxx
+++ b/ForwardDetectors/ALFA/ALFA_EventCnv/ALFA_RawDataByteStreamCnv/src/ALFA_RawDataReadOut_charge.cxx
@@ -21,7 +21,7 @@ ALFA_RawDataReadOut_charge::ALFA_RawDataReadOut_charge() :
   m_bit12(0),
   m_bit24_27(0),	
   m_bit27_24(0),
-  ChargeChan()
+  m_ChargeChan()
 {  }
 
 ALFA_RawDataReadOut_charge::~ALFA_RawDataReadOut_charge()
@@ -35,7 +35,7 @@ void ALFA_RawDataReadOut_charge::decodeWord(uint32_t dataWord)
   setZero();
   m_dataWord = dataWord;
   m_word = dataWord;
-  m_wordHeader = (dataWord>>headerPos)&headerBits;
+  m_wordHeader = (dataWord>>s_headerPos)&s_headerBits;
 
   if (is_TDCch())         // TDC single measurement
     {
diff --git a/ForwardDetectors/ALFA/ALFA_Geometry/src/ALFA_RDBAccess.cxx b/ForwardDetectors/ALFA/ALFA_Geometry/src/ALFA_RDBAccess.cxx
index 1ec607ace03a042161d21f5b43f67174844dc8a8..861a0eb0de9a323dcef7b9bd1342a14bf28f19ec 100644
--- a/ForwardDetectors/ALFA/ALFA_Geometry/src/ALFA_RDBAccess.cxx
+++ b/ForwardDetectors/ALFA/ALFA_Geometry/src/ALFA_RDBAccess.cxx
@@ -43,13 +43,9 @@ bool ALFA_RDBAccess::ReadGeometry(const eRPotName eRPName, eFiberType eFType, st
 		throw GaudiException(" Could not initalize GeoModelSvc ", "ALFA_RDBAccess::ReadGeometry", StatusCode::FAILURE);
 	}*/
 
-	iAccessSvc->connect();
-
 	bRes=ReadFiberGeometry(iAccessSvc, element, tag, node);
 //	bRes|=ReadFiberGeometry("ALFAFibreUp","ALFA-00","ALFA");
 
-	iAccessSvc->disconnect();
-
 	return bRes;
 }
 
diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.cxx b/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.cxx
index 01e25b83b6dd9307f15026cc3aaa36925a0ef539..b281adcb6909bf70bc164024b81eb21cac09e7e3 100644
--- a/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.cxx
+++ b/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.cxx
@@ -37,7 +37,6 @@ MagField::ForwardRegionFieldSvc::ForwardRegionFieldSvc(const std::string& name,I
   AthService(name,svc),
   IMagFieldSvc(),
   m_magnet(-1),
-  m_refCounter(0),
   m_magDataType(0),
   m_MQXA_DataFile(""), //"MQXA_NOMINAL.dat" if name = Q1 or Q3
   m_MQXB_DataFile(""), //"MQXB_NOMINAL.dat" if name = Q2
@@ -180,7 +179,7 @@ G4ThreeVector MagField::ForwardRegionFieldSvc::FieldValue(G4ThreeVector Point) c
     double xShift = pointsNotDefined ? getMagXOff(m_magnet) : (pointMagStart[0]+pointMagEnd[0])*0.5;
     double yShift = pointsNotDefined ? getMagYOff(m_magnet) : (pointMagStart[1]+pointMagEnd[1])*0.5;
 
-    if(m_magnet <= Q3){ // inner triplet
+    if(m_magnet <= s_Q3){ // inner triplet
         if(m_Config.bUseFLUKAMapsForInnerTriplet)
             field = getMagInd(Point,m_magnet, beam);
         else {
@@ -188,9 +187,9 @@ G4ThreeVector MagField::ForwardRegionFieldSvc::FieldValue(G4ThreeVector Point) c
             field = G4ThreeVector(gradB*(Point[1]-yShift),gradB*(Point[0]-xShift),0);
         }
     }
-    else if(m_magnet <= D2) // dipoles
+    else if(m_magnet <= s_D2) // dipoles
         field = G4ThreeVector(0,getMag(m_magnet,beam)*CLHEP::tesla,0);
-    else if(m_magnet <= Q7) // other quadrupoles
+    else if(m_magnet <= s_Q7) // other quadrupoles
     {
         double gradB = getMag(m_magnet,beam)*CLHEP::tesla/CLHEP::m*pow(-1.0,beam);
         field = G4ThreeVector(gradB*(Point[1]-yShift),gradB*(Point[0]-xShift),0);
@@ -284,8 +283,8 @@ void MagField::ForwardRegionFieldSvc::InitMagDataFromTwiss(std::vector<std::vect
     double length;
 
     // init offsets (Q4--Q7 have dx=-97 mm, others 0), do not apply to kickers
-    if(m_magnet <= Q7) {
-        if(m_magnet >= Q4)
+    if(m_magnet <= s_Q7) {
+        if(m_magnet >= s_Q4)
             m_magData[2] = -97*CLHEP::mm;
         else
             m_magData[2] = 0;
@@ -296,41 +295,41 @@ void MagField::ForwardRegionFieldSvc::InitMagDataFromTwiss(std::vector<std::vect
     for(int i=0; i < 150; i++)
     {
         // dipoles
-        dipole =    (m_magnet == D1 && (loadedTwissFile[i][textIndex] == "\"MBXW.A4R1\"" || loadedTwissFile[i][textIndex] == "\"MBXW.A4L1\""))
-                 || (m_magnet == D2 && (loadedTwissFile[i][textIndex] == "\"MBRC.4R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MBRC.4L1.B2\""));
+        dipole =    (m_magnet == s_D1 && (loadedTwissFile[i][textIndex] == "\"MBXW.A4R1\"" || loadedTwissFile[i][textIndex] == "\"MBXW.A4L1\""))
+                 || (m_magnet == s_D2 && (loadedTwissFile[i][textIndex] == "\"MBRC.4R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MBRC.4L1.B2\""));
         if(dipole){
             m_magData[beam-1] = kLToB(atof(loadedTwissFile[i][k0LIndex].c_str()), atof(loadedTwissFile[i][lengthIndex].c_str()), momentum);
             return;
         }
 
         //quadrupoles
-        quadrupole =    (m_magnet == Q1 && (loadedTwissFile[i][textIndex] == "\"MQXA.1R1\"" || loadedTwissFile[i][textIndex] == "\"MQXA.1L1\""))
-                 || (m_magnet == Q2 && (loadedTwissFile[i][textIndex] == "\"MQXB.A2R1\"" || loadedTwissFile[i][textIndex] == "\"MQXB.A2L1\""))
-                 || (m_magnet == Q3 && (loadedTwissFile[i][textIndex] == "\"MQXA.3R1\"" || loadedTwissFile[i][textIndex] == "\"MQXA.3L1\""))
-                 || (m_magnet == Q4 && (loadedTwissFile[i][textIndex] == "\"MQY.4R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MQY.4L1.B2\""))
-                 || (m_magnet == Q5 && (loadedTwissFile[i][textIndex] == "\"MQML.5R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MQML.5L1.B2\""))
-                 || (m_magnet == Q6 && (loadedTwissFile[i][textIndex] == "\"MQML.6R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MQML.6L1.B2\""))
-                 || (m_magnet == Q7 && (loadedTwissFile[i][textIndex] == "\"MQM.A7R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MQM.A7L1.B2\""));
+        quadrupole =    (m_magnet == s_Q1 && (loadedTwissFile[i][textIndex] == "\"MQXA.1R1\"" || loadedTwissFile[i][textIndex] == "\"MQXA.1L1\""))
+                 || (m_magnet == s_Q2 && (loadedTwissFile[i][textIndex] == "\"MQXB.A2R1\"" || loadedTwissFile[i][textIndex] == "\"MQXB.A2L1\""))
+                 || (m_magnet == s_Q3 && (loadedTwissFile[i][textIndex] == "\"MQXA.3R1\"" || loadedTwissFile[i][textIndex] == "\"MQXA.3L1\""))
+                 || (m_magnet == s_Q4 && (loadedTwissFile[i][textIndex] == "\"MQY.4R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MQY.4L1.B2\""))
+                 || (m_magnet == s_Q5 && (loadedTwissFile[i][textIndex] == "\"MQML.5R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MQML.5L1.B2\""))
+                 || (m_magnet == s_Q6 && (loadedTwissFile[i][textIndex] == "\"MQML.6R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MQML.6L1.B2\""))
+                 || (m_magnet == s_Q7 && (loadedTwissFile[i][textIndex] == "\"MQM.A7R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MQM.A7L1.B2\""));
         if(quadrupole){
             m_magData[beam-1] = kLToB(atof(loadedTwissFile[i][k1LIndex].c_str()), atof(loadedTwissFile[i][lengthIndex].c_str()), momentum);
             return;
         }
 
         // kickers
-        kicker =    (m_magnet == Q1HKick && (loadedTwissFile[i][textIndex] == "\"MCBXH.1R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXH.1L1\""))
-                 || (m_magnet == Q1VKick && (loadedTwissFile[i][textIndex] == "\"MCBXV.1R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXV.1L1\""))
-                 || (m_magnet == Q2HKick && (loadedTwissFile[i][textIndex] == "\"MCBXH.2R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXH.2L1\""))
-                 || (m_magnet == Q2VKick && (loadedTwissFile[i][textIndex] == "\"MCBXV.2R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXV.2L1\""))
-                 || (m_magnet == Q3HKick && (loadedTwissFile[i][textIndex] == "\"MCBXH.3R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXH.3L1\""))
-                 || (m_magnet == Q3VKick && (loadedTwissFile[i][textIndex] == "\"MCBXV.3R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXV.3L1\""))
-                 || (m_magnet == Q4VKickA && (loadedTwissFile[i][textIndex] == "\"MCBYV.A4R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MCBYV.A4L1.B2\""))
-                 || (m_magnet == Q4HKick && (loadedTwissFile[i][textIndex] == "\"MCBYH.4R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MCBYH.4L1.B2\""))
-                 || (m_magnet == Q4VKickB && (loadedTwissFile[i][textIndex] == "\"MCBYV.B4R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MCBYV.B4L1.B2\""))
-                 || (m_magnet == Q5HKick && (loadedTwissFile[i][textIndex] == "\"MCBCH.5R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MCBCH.5L1.B2\""))
-                 || (m_magnet == Q6VKick && (loadedTwissFile[i][textIndex] == "\"MCBCV.6R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MCBCV.6L1.B2\""));
+        kicker =    (m_magnet == s_Q1HKick && (loadedTwissFile[i][textIndex] == "\"MCBXH.1R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXH.1L1\""))
+                 || (m_magnet == s_Q1VKick && (loadedTwissFile[i][textIndex] == "\"MCBXV.1R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXV.1L1\""))
+                 || (m_magnet == s_Q2HKick && (loadedTwissFile[i][textIndex] == "\"MCBXH.2R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXH.2L1\""))
+                 || (m_magnet == s_Q2VKick && (loadedTwissFile[i][textIndex] == "\"MCBXV.2R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXV.2L1\""))
+                 || (m_magnet == s_Q3HKick && (loadedTwissFile[i][textIndex] == "\"MCBXH.3R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXH.3L1\""))
+                 || (m_magnet == s_Q3VKick && (loadedTwissFile[i][textIndex] == "\"MCBXV.3R1\"" || loadedTwissFile[i][textIndex] == "\"MCBXV.3L1\""))
+                 || (m_magnet == s_Q4VKickA && (loadedTwissFile[i][textIndex] == "\"MCBYV.A4R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MCBYV.A4L1.B2\""))
+                 || (m_magnet == s_Q4HKick && (loadedTwissFile[i][textIndex] == "\"MCBYH.4R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MCBYH.4L1.B2\""))
+                 || (m_magnet == s_Q4VKickB && (loadedTwissFile[i][textIndex] == "\"MCBYV.B4R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MCBYV.B4L1.B2\""))
+                 || (m_magnet == s_Q5HKick && (loadedTwissFile[i][textIndex] == "\"MCBCH.5R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MCBCH.5L1.B2\""))
+                 || (m_magnet == s_Q6VKick && (loadedTwissFile[i][textIndex] == "\"MCBCV.6R1.B1\"" || loadedTwissFile[i][textIndex] == "\"MCBCV.6L1.B2\""));
 
         if(kicker){
-            // length of Q1--Q3 kickers in twiss files is zero -> it is set to 0.001 m (also the length of corresponding GeoModel volumes)
+            // length of s_Q1--s_Q3 kickers in twiss files is zero -> it is set to 0.001 m (also the length of corresponding GeoModel volumes)
             length = atof(loadedTwissFile[i][lengthIndex].c_str()) ? atof(loadedTwissFile[i][lengthIndex].c_str()) : 0.001;
             // calculation of the B from deflection angle --- beam going down at the IP
             m_magData[beam-1] = pow(-1.0, beam+1)*kLToB(atof(loadedTwissFile[i][vkick].c_str()), length, momentum);
@@ -342,7 +341,7 @@ void MagField::ForwardRegionFieldSvc::InitMagDataFromTwiss(std::vector<std::vect
 
 
 /** Non-inherited public methods FIXME - add new interface? */
-// get magnetic induction vector in certain point inside MQXA (MQXAB = 0) or MQXB (MQXAB = 1) (uses bilinear interpolation), q=0 - Q1, q=1 - Q2a, q=2 - Q2b, q=3 - Q3
+// get magnetic induction vector in certain point inside MQXA (MQXAB = 0) or MQXB (MQXAB = 1) (uses bilinear interpolation), q=0 - s_Q1, q=1 - Q2a, q=2 - Q2b, q=3 - s_Q3
 G4ThreeVector MagField::ForwardRegionFieldSvc::getMagInd(G4ThreeVector Point, int q, int beam) const
 {
   int MQXAB = 0;
@@ -602,37 +601,37 @@ void MagField::ForwardRegionFieldSvc::writeOutTwiss(std::vector<std::vector<std:
 int MagField::ForwardRegionFieldSvc::getMagNumFromName(std::string name) const
 {
     // dipoles
-    if (name == "\"MBXW.A4R1\"" || name == "\"MBXW.A4L1\"") return D1;
-    if (name == "\"MBXW.B4R1\"" || name == "\"MBXW.B4L1\"") return D1;
-    if (name == "\"MBXW.C4R1\"" || name == "\"MBXW.C4L1\"") return D1;
-    if (name == "\"MBXW.D4R1\"" || name == "\"MBXW.D4L1\"") return D1;
-    if (name == "\"MBXW.E4R1\"" || name == "\"MBXW.E4L1\"") return D1;
-    if (name == "\"MBXW.F4R1\"" || name == "\"MBXW.F4L1\"") return D1;
-    if (name == "\"MBRC.4R1.B1\"" || name == "\"MBRC.4L1.B2\"") return D2;
+    if (name == "\"MBXW.A4R1\"" || name == "\"MBXW.A4L1\"") return s_D1;
+    if (name == "\"MBXW.B4R1\"" || name == "\"MBXW.B4L1\"") return s_D1;
+    if (name == "\"MBXW.C4R1\"" || name == "\"MBXW.C4L1\"") return s_D1;
+    if (name == "\"MBXW.D4R1\"" || name == "\"MBXW.D4L1\"") return s_D1;
+    if (name == "\"MBXW.E4R1\"" || name == "\"MBXW.E4L1\"") return s_D1;
+    if (name == "\"MBXW.F4R1\"" || name == "\"MBXW.F4L1\"") return s_D1;
+    if (name == "\"MBRC.4R1.B1\"" || name == "\"MBRC.4L1.B2\"") return s_D2;
 
     //quadrupoles
-    if(name == "\"MQXA.1R1\"" || name == "\"MQXA.1L1\"") return Q1;
-    if(name == "\"MQXB.A2R1\"" || name == "\"MQXB.A2L1\"") return Q2;
-    if(name == "\"MQXB.B2R1\"" || name == "\"MQXB.B2L1\"") return Q2;
-    if(name == "\"MQXA.3R1\"" || name == "\"MQXA.3L1\"") return Q3;
-    if(name == "\"MQY.4R1.B1\"" || name == "\"MQY.4L1.B2\"") return Q4;
-    if(name == "\"MQML.5R1.B1\"" || name == "\"MQML.5L1.B2\"") return Q5;
-    if(name == "\"MQML.6R1.B1\"" || name == "\"MQML.6L1.B2\"") return Q6;
-    if(name == "\"MQM.A7R1.B1\"" || name == "\"MQM.A7L1.B2\"") return Q7;
-    if(name == "\"MQM.B7R1.B1\"" || name == "\"MQM.B7L1.B2\"") return Q7;
+    if(name == "\"MQXA.1R1\"" || name == "\"MQXA.1L1\"") return s_Q1;
+    if(name == "\"MQXB.A2R1\"" || name == "\"MQXB.A2L1\"") return s_Q2;
+    if(name == "\"MQXB.B2R1\"" || name == "\"MQXB.B2L1\"") return s_Q2;
+    if(name == "\"MQXA.3R1\"" || name == "\"MQXA.3L1\"") return s_Q3;
+    if(name == "\"MQY.4R1.B1\"" || name == "\"MQY.4L1.B2\"") return s_Q4;
+    if(name == "\"MQML.5R1.B1\"" || name == "\"MQML.5L1.B2\"") return s_Q5;
+    if(name == "\"MQML.6R1.B1\"" || name == "\"MQML.6L1.B2\"") return s_Q6;
+    if(name == "\"MQM.A7R1.B1\"" || name == "\"MQM.A7L1.B2\"") return s_Q7;
+    if(name == "\"MQM.B7R1.B1\"" || name == "\"MQM.B7L1.B2\"") return s_Q7;
 
     // kickers
-    if(name == "\"MCBXH.1R1\"" || name == "\"MCBXH.1L1\"") return Q1HKick;
-    if(name == "\"MCBXV.1R1\"" || name == "\"MCBXV.1L1\"") return Q1VKick;
-    if(name == "\"MCBXH.2R1\"" || name == "\"MCBXH.2L1\"") return Q2HKick;
-    if(name == "\"MCBXV.2R1\"" || name == "\"MCBXV.2L1\"") return Q2VKick;
-    if(name == "\"MCBXH.3R1\"" || name == "\"MCBXH.3L1\"") return Q3HKick;
-    if(name == "\"MCBXV.3R1\"" || name == "\"MCBXV.3L1\"") return Q3VKick;
-    if(name == "\"MCBYV.A4R1.B1\"" || name == "\"MCBYV.A4L1.B2\"") return Q4VKickA;
-    if(name == "\"MCBYH.4R1.B1\"" || name == "\"MCBYH.4L1.B2\"") return Q4HKick;
-    if(name == "\"MCBYV.B4R1.B1\"" || name == "\"MCBYV.B4L1.B2\"") return Q4VKickB;
-    if(name == "\"MCBCH.5R1.B1\"" || name == "\"MCBCH.5L1.B2\"") return Q5HKick;
-    if(name == "\"MCBCV.6R1.B1\"" || name == "\"MCBCV.6L1.B2\"") return Q6VKick;
+    if(name == "\"MCBXH.1R1\"" || name == "\"MCBXH.1L1\"") return s_Q1HKick;
+    if(name == "\"MCBXV.1R1\"" || name == "\"MCBXV.1L1\"") return s_Q1VKick;
+    if(name == "\"MCBXH.2R1\"" || name == "\"MCBXH.2L1\"") return s_Q2HKick;
+    if(name == "\"MCBXV.2R1\"" || name == "\"MCBXV.2L1\"") return s_Q2VKick;
+    if(name == "\"MCBXH.3R1\"" || name == "\"MCBXH.3L1\"") return s_Q3HKick;
+    if(name == "\"MCBXV.3R1\"" || name == "\"MCBXV.3L1\"") return s_Q3VKick;
+    if(name == "\"MCBYV.A4R1.B1\"" || name == "\"MCBYV.A4L1.B2\"") return s_Q4VKickA;
+    if(name == "\"MCBYH.4R1.B1\"" || name == "\"MCBYH.4L1.B2\"") return s_Q4HKick;
+    if(name == "\"MCBYV.B4R1.B1\"" || name == "\"MCBYV.B4L1.B2\"") return s_Q4VKickB;
+    if(name == "\"MCBCH.5R1.B1\"" || name == "\"MCBCH.5L1.B2\"") return s_Q5HKick;
+    if(name == "\"MCBCV.6R1.B1\"" || name == "\"MCBCV.6L1.B2\"") return s_Q6VKick;
     return -1;
 }
 
@@ -640,12 +639,12 @@ void MagField::ForwardRegionFieldSvc::getMagnetTransformParams(int beam, int mag
 {
     // find out which magnet we are in and get corresponding displacements
     switch(magnet){
-    case Q1:
+    case s_Q1:
         pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ1Start[(beam-1)*3],m_Config.pointQ1Start[(beam-1)*3+1],m_Config.pointQ1Start[(beam-1)*3+2]);
         pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ1End[(beam-1)*3],m_Config.pointQ1End[(beam-1)*3+1],m_Config.pointQ1End[(beam-1)*3+2]);
         rotZ = m_Config.fQ1RotZ[beam-1];
         break;
-    case Q2:
+    case s_Q2:
       if(std::abs(Point[2]) < 38*CLHEP::m){
             pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ2aStart[(beam-1)*3],m_Config.pointQ2aStart[(beam-1)*3+1],m_Config.pointQ2aStart[(beam-1)*3+2]);
             pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ2aEnd[(beam-1)*3],m_Config.pointQ2aEnd[(beam-1)*3+1],m_Config.pointQ2aEnd[(beam-1)*3+2]);
@@ -658,27 +657,27 @@ void MagField::ForwardRegionFieldSvc::getMagnetTransformParams(int beam, int mag
             rotZ = m_Config.fQ2bRotZ[beam-1];
         }
         break;
-    case Q3:
+    case s_Q3:
         pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ3Start[(beam-1)*3],m_Config.pointQ3Start[(beam-1)*3+1],m_Config.pointQ3Start[(beam-1)*3+2]);
         pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ3End[(beam-1)*3],m_Config.pointQ3End[(beam-1)*3+1],m_Config.pointQ3End[(beam-1)*3+2]);
         rotZ = m_Config.fQ3RotZ[beam-1];
         break;
-    case Q4:
+    case s_Q4:
         pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ4Start[(beam-1)*3],m_Config.pointQ4Start[(beam-1)*3+1],m_Config.pointQ4Start[(beam-1)*3+2]);
         pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ4End[(beam-1)*3],m_Config.pointQ4End[(beam-1)*3+1],m_Config.pointQ4End[(beam-1)*3+2]);
         rotZ = m_Config.fQ4RotZ[beam-1];
         break;
-    case Q5:
+    case s_Q5:
         pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ5Start[(beam-1)*3],m_Config.pointQ5Start[(beam-1)*3+1],m_Config.pointQ5Start[(beam-1)*3+2]);
         pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ5End[(beam-1)*3],m_Config.pointQ5End[(beam-1)*3+1],m_Config.pointQ5End[(beam-1)*3+2]);
         rotZ = m_Config.fQ5RotZ[beam-1];
         break;
-    case Q6:
+    case s_Q6:
         pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ6Start[(beam-1)*3],m_Config.pointQ6Start[(beam-1)*3+1],m_Config.pointQ6Start[(beam-1)*3+2]);
         pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ6End[(beam-1)*3],m_Config.pointQ6End[(beam-1)*3+1],m_Config.pointQ6End[(beam-1)*3+2]);
         rotZ = m_Config.fQ6RotZ[beam-1];
         break;
-    case Q7:
+    case s_Q7:
         if(std::abs(Point[2]) < 263.5*CLHEP::m){
             pointMagStart = HepGeom::Point3D<double>(m_Config.pointQ7aStart[(beam-1)*3],m_Config.pointQ7aStart[(beam-1)*3+1],m_Config.pointQ7aStart[(beam-1)*3+2]);
             pointMagEnd = HepGeom::Point3D<double>(m_Config.pointQ7aEnd[(beam-1)*3],m_Config.pointQ7aEnd[(beam-1)*3+1],m_Config.pointQ7aEnd[(beam-1)*3+2]);
@@ -691,7 +690,7 @@ void MagField::ForwardRegionFieldSvc::getMagnetTransformParams(int beam, int mag
             rotZ = m_Config.fQ7bRotZ[beam-1];
         }
         break;
-    case D1:
+    case s_D1:
         if(std::abs(Point[2]) < 63.5*CLHEP::m){
             pointMagStart = HepGeom::Point3D<double>(m_Config.pointD1aStart[(beam-1)*3],m_Config.pointD1aStart[(beam-1)*3+1],m_Config.pointD1aStart[(beam-1)*3+2]);
             pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD1aEnd[(beam-1)*3],m_Config.pointD1aEnd[(beam-1)*3+1],m_Config.pointD1aEnd[(beam-1)*3+2]);
@@ -727,7 +726,7 @@ void MagField::ForwardRegionFieldSvc::getMagnetTransformParams(int beam, int mag
             rotZ = m_Config.fD1fRotZ[beam-1];
         }
         break;
-    case D2:
+    case s_D2:
         pointMagStart = HepGeom::Point3D<double>(m_Config.pointD2Start[(beam-1)*3],m_Config.pointD2Start[(beam-1)*3+1],m_Config.pointD2Start[(beam-1)*3+2]);
         pointMagEnd = HepGeom::Point3D<double>(m_Config.pointD2End[(beam-1)*3],m_Config.pointD2End[(beam-1)*3+1],m_Config.pointD2End[(beam-1)*3+2]);
         rotZ = m_Config.fD2RotZ[beam-1];
diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.h b/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.h
index a391ce72c8a8de0cace86e6acb9189e577ca3040..5ebd1551076f03108080d7df818518c0f61e67bb 100644
--- a/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.h
+++ b/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/src/ForwardRegionFieldSvc.h
@@ -71,8 +71,6 @@ namespace MagField {
 
     int m_magnet;
 
-    int m_refCounter;
-
     void InitMagData();
 
     std::vector<std::vector<std::string> > m_magnets;
@@ -90,27 +88,27 @@ namespace MagField {
 
     //std::string m_twissFileB1, m_twissFileB2;
 
-     // file indexes - FIXME need to rename these to comply with naming conventions.
-    static const int Q1 = 0;
-    static const int Q2 = 1;
-    static const int Q3 = 2;
-    static const int D1 = 3;
-    static const int D2 = 4;
-    static const int Q4 = 5;
-    static const int Q5 = 6;
-    static const int Q6 = 7;
-    static const int Q7 = 8;
-    static const int Q1HKick = 9;
-    static const int Q1VKick = 10;
-    static const int Q2HKick = 11;
-    static const int Q2VKick = 12;
-    static const int Q3HKick = 13;
-    static const int Q3VKick = 14;
-    static const int Q4VKickA = 15;
-    static const int Q4HKick = 16;
-    static const int Q4VKickB = 17;
-    static const int Q5HKick = 18;
-    static const int Q6VKick = 19;
+     // file indexes
+    static const int s_Q1 = 0;
+    static const int s_Q2 = 1;
+    static const int s_Q3 = 2;
+    static const int s_D1 = 3;
+    static const int s_D2 = 4;
+    static const int s_Q4 = 5;
+    static const int s_Q5 = 6;
+    static const int s_Q6 = 7;
+    static const int s_Q7 = 8;
+    static const int s_Q1HKick = 9;
+    static const int s_Q1VKick = 10;
+    static const int s_Q2HKick = 11;
+    static const int s_Q2VKick = 12;
+    static const int s_Q3HKick = 13;
+    static const int s_Q3VKick = 14;
+    static const int s_Q4VKickA = 15;
+    static const int s_Q4HKick = 16;
+    static const int s_Q4VKickB = 17;
+    static const int s_Q5HKick = 18;
+    static const int s_Q6VKick = 19;
    //mapfile parameters
     static const int s_rowsMQXA = 97;
     static const int s_colsMQXA = 97;
diff --git a/ForwardDetectors/LUCID/LUCID_GeoModel/cmt/requirements b/ForwardDetectors/LUCID/LUCID_GeoModel/cmt/requirements
deleted file mode 100755
index 575b7509c8b2c46a9eca557181bf66a7c91ddf93..0000000000000000000000000000000000000000
--- a/ForwardDetectors/LUCID/LUCID_GeoModel/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package LUCID_GeoModel
-
-use AtlasPolicy    	AtlasPolicy-*
-use GaudiInterface 	GaudiInterface-*    	External
-use GeoModelKernel 	GeoModelKernel-*    	DetectorDescription/GeoModel
-use GeoModelUtilities 	GeoModelUtilities-*     DetectorDescription/GeoModel
-use CLIDSvc 	   	CLIDSvc-* 		Control
-use GeoModelUtilities   GeoModelUtilities-*	DetectorDescription/GeoModel
-
-####include_dirs "$(LUCID_GeoModel_root)/LUCID_GeoModel"
-
-apply_pattern dual_use_library files=*.cxx
-
-private
-use AthenaKernel   	AthenaKernel-*   	Control
-use AtlasCLHEP     	AtlasCLHEP-*     	External
-use RDBAccessSvc   	RDBAccessSvc-*      	Database/AthenaPOOL
-use StoreGate      	StoreGate-*         	Control
-use CLIDSvc             CLIDSvc-*               Control
-use SGTools             SGTools-*               Control
-use GeoModelInterfaces 	GeoModelInterfaces-*    DetectorDescription/GeoModel
\ No newline at end of file
diff --git a/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_RDBAaccess.cxx b/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_RDBAaccess.cxx
index 92916203a4380314beaddce139c5f98f48bd6d18..39e8269351228ace4a9ba8dfb0d0778d6156474d 100755
--- a/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_RDBAaccess.cxx
+++ b/ForwardDetectors/LUCID/LUCID_GeoModel/src/LUCID_RDBAaccess.cxx
@@ -51,13 +51,9 @@ void LUCID_RDBAccess::ReadDB() {
   DecodeVersionKey atlasVersion("ATLAS");
   std::string AtlasVersion = atlasVersion.tag();
   
-  iAccessSvc->connect();
-  
   lucidParams = iAccessSvc->getRecordsetPtr("LucidParams", AtlasVersion, "ATLAS");
   
   if (!lucidParams->size()) std::cerr << " ERROR: Unable to retrieve LucidParams data "<< std::endl;
-
-  iAccessSvc->disconnect();
   
   log << MSG::INFO << " LUCID data corresponding to " << AtlasVersion << " fetched " << endmsg;
 }
diff --git a/Generators/AcerMC_i/doc/packagedoc.h b/Generators/AcerMC_i/doc/packagedoc.h
index 7d1c259d52e011e819cb5626b4a88a5c46986e5b..83ef525fae0c07765b5981d283a6c1d050e50d90 100644
--- a/Generators/AcerMC_i/doc/packagedoc.h
+++ b/Generators/AcerMC_i/doc/packagedoc.h
@@ -35,16 +35,6 @@ The  AcerMC generator home page is here
 https://twiki.cern.ch/twiki/bin/view/AtlasProtected/AcerMCForAtlas
 
 
-@ref used_MyPackage
 
-@ref requirements_MyPackage
 
 */
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-*/
diff --git a/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml b/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml
index f75b771c4553f75ee323677b01b61af96ee27705..a6457e9185999db99e6adf1fed8141152d05c339 100644
--- a/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml
+++ b/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml
@@ -29,7 +29,8 @@
       <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
     </TEST>
 
-    
+
+    <!-- Fails momentum balance test.    
     <TEST name="Py8Jets" type="script" suite="EvgenJobTransforms-Core">
       <doc>Test a Pythia8 jet slice, with a very low filter efficiency</doc>
       <classification>
@@ -41,6 +42,7 @@
       <timelimit>15</timelimit>
       <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
     </TEST>
+    -->
     
     
     <TEST name="Py8Ztautau" type="script" suite="EvgenJobTransforms-Core">
@@ -68,7 +70,7 @@
     </TEST>
    
 
-    
+    <!-- Powheg is not in git builds.
     <TEST name="powhegpy8TauolaPPEG" type="script" suite="EvgenJobTransforms-Core">
       <doc>Test Powheg+Pythia8+TauolaPP+EvtGen</doc>
       <classification>
@@ -80,6 +82,7 @@
       <timelimit>25</timelimit>
       <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
     </TEST>
+    -->
     
 
     
@@ -166,7 +169,7 @@
     </TEST>
     
 
-    
+    <!--- Need a newer version of Herwig7_i than is in master.
     <TEST name="Herwig7" type="script" suite="EvgenJobTransforms-Core">
       <doc>Test minimum bias generation with Herwig7</doc>
       <classification>
@@ -190,7 +193,9 @@
       <timelimit>35</timelimit>
       <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
     </TEST>
-    
+    -->
+
+    <!-- powheg is not in git builds.
     <TEST name="PowhegWenu" type="script" suite="EvgenJobTransforms-Core">
       <doc>Test W-enu generation with Powheg</doc>
       <classification>
@@ -226,7 +231,9 @@
       <timelimit>30</timelimit>
       <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
     </TEST>
+    -->
 
+    <!-- Fails momentum balance test.    
     <TEST name="MadGraphttW" type="script" suite="EvgenJobTransforms-Core">
       <doc>Test ttbar generation with MadGraph</doc>
       <classification>
@@ -238,7 +245,9 @@
       <timelimit>30</timelimit>
       <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
     </TEST>
+    -->
 
+    <!-- Fails momentum balance test.    
     <TEST name="MadGraphZmumu" type="script" suite="EvgenJobTransforms-Core">
       <doc>Test ttbar generation with MadGraph</doc>
       <classification>
@@ -250,6 +259,7 @@
       <timelimit>30</timelimit>
       <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
     </TEST>
+    -->
 
     
     <TEST name="SherpaDY" type="script" suite="EvgenJobTransforms-Core">
diff --git a/Generators/EvgenJobTransforms/test/setup_testenv b/Generators/EvgenJobTransforms/test/setup_testenv
index 5b2205f26e832eba8ff2f0095daa0ffb7dfd13b3..079a9261c2b9b35b33a1b9ffe64287a45ea76c43 100644
--- a/Generators/EvgenJobTransforms/test/setup_testenv
+++ b/Generators/EvgenJobTransforms/test/setup_testenv
@@ -1,3 +1,33 @@
 export TESTDATA=/afs/cern.ch/atlas/offline/ProdData/17.2.X
 export JODIR=/afs/cern.ch/atlas/groups/Generators/MC14JobOptions/latest
 export JODIR15=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest
+
+if [ "$MADPATH" = "" ]; then
+  for p in `echo $LD_LIBRARY_PATH | tr : ' '`; do
+    if [ "${p%LCG_*}" != "$p" ]; then
+      while [ "$p" != "/" ]; do
+        d=`basename $p`
+        if [ "${d#LCG_}" != "$d" ]; then
+          for mgdir in `echo $p/MCGenerators/madgraph5amc/*`; do
+            export MADPATH=$mgdir/$LCG_PLATFORM
+            break 3
+          done
+          break 2
+        fi
+        p=`dirname $p`
+      done
+      break
+    fi
+  done
+fi
+
+if [ "$HERWIG7_PATH" = "" ]; then
+  for p in `echo $LD_LIBRARY_PATH | tr : ' '`; do
+    if [ `basename $p` = "Herwig" ]; then
+      d=`dirname $p`
+      d=`dirname $d`
+      export HERWIG7_PATH=$d
+      break
+    fi
+  done
+fi
diff --git a/Generators/EvgenJobTransforms/test/test_alpgen_jimmy b/Generators/EvgenJobTransforms/test/test_alpgen_jimmy
index b8fb599ea5aa38944e9a5a75362dea31a4e2e414..73a8be26e9ed32d3ddc3fdf60cbca2460589118a 100755
--- a/Generators/EvgenJobTransforms/test/test_alpgen_jimmy
+++ b/Generators/EvgenJobTransforms/test/test_alpgen_jimmy
@@ -2,6 +2,7 @@
 
 ## Any arguments are considered overrides, and will be added at the end
 export TRF_ECHO=True;
+LD_PRELOAD=libphotos.so \
 Generate_tf.py --ecmEnergy=8000 --runNumber=107680 --maxEvents=5 \
     --jobConfig=$JODIR/share/tests/MC14.107680.AlpgenHerwig_AUET2CTEQ6L1_WenuNp0.py \
     --outputEVNTFile=test_AlpgenHerwigJimmy_WenuNp0.EVNT.pool.root \
diff --git a/Generators/EvgenJobTransforms/test/test_mcatnlo_jimmy b/Generators/EvgenJobTransforms/test/test_mcatnlo_jimmy
index 01e074726da41c9606280bf04fb3acc9ad9bf8cd..bd3c0459776a490dffb326168df8122a95e7dc81 100755
--- a/Generators/EvgenJobTransforms/test/test_mcatnlo_jimmy
+++ b/Generators/EvgenJobTransforms/test/test_mcatnlo_jimmy
@@ -2,6 +2,7 @@
 
 ## Any arguments are considered overrides, and will be added at the end
 export TRF_ECHO=True;
+LD_PRELOAD=libphotos.so \
 Generate_tf.py --ecmEnergy=8000 --runNumber=105200 --maxEvents=10 \
     --jobConfig=$JODIR/share/tests/MC14.105200.McAtNloHerwig_CT10_ttbar_LeptonFilter.py \
     --inputGeneratorFile=$TESTDATA/group.phys-gener.mcatnlo406.105200.ttbar_8TeV.TXT.mc12_v1._02667.tar.gz \
diff --git a/Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu b/Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu
index 8a1d9a51e1ae12a94a4e1f3aabf7dff6cb8c8f50..96e7829b58fc773f7bf46a930ee33d7029cee04d 100755
--- a/Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu
+++ b/Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu
@@ -3,6 +3,7 @@
 ## Any arguments are considered overrides, and will be added at the end
 export TRF_ECHO=True;
 rm *;
+DISPLAY='' \
 Generate_tf.py --ecmEnergy=13000 --runNumber=361505 --maxEvents=10 \
     --jobConfig=$JODIR15/share/DSID361xxx/MC15.361505.MadGraphPythia8EvtGen_A14NNPDF23LO_Zmumu_Np0.py \
     --outputEVNTFile=test_mgpythia8_Zmumu.EVNT.pool.root \
diff --git a/Generators/EvgenJobTransforms/test/test_mgpythia8_ttW b/Generators/EvgenJobTransforms/test/test_mgpythia8_ttW
index 7ca0a0c1f1813e82525a684c72bf786316f104c0..e62a7611d530a8ce35f1611713507eadd667d524 100755
--- a/Generators/EvgenJobTransforms/test/test_mgpythia8_ttW
+++ b/Generators/EvgenJobTransforms/test/test_mgpythia8_ttW
@@ -3,6 +3,7 @@
 ## Any arguments are considered overrides, and will be added at the end
 export TRF_ECHO=True;
 rm *;
+DISPLAY='' \
 Generate_tf.py --ecmEnergy=13000 --runNumber=410066 --maxEvents=10 \
     --jobConfig=$JODIR15/share/DSID410xxx/MC15.410066.MadGraphPythia8EvtGen_A14NNPDF23LO_ttW_Np0.py \
     --outputEVNTFile=test_mgpythia8_ttW.EVNT.pool.root \
diff --git a/Generators/EvgenProdTools/CMakeLists.txt b/Generators/EvgenProdTools/CMakeLists.txt
index b7de7408052892816101a5013331fb093a6495c1..fe58e620547a358be6b82507a79c9b50373b5144 100644
--- a/Generators/EvgenProdTools/CMakeLists.txt
+++ b/Generators/EvgenProdTools/CMakeLists.txt
@@ -9,6 +9,7 @@ atlas_subdir( EvgenProdTools )
 atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaBaseComps
                           Generators/GenAnalysisTools/TruthHelper
+                          Generators/GenInterfaces
                           Generators/GeneratorModules
                           PRIVATE
                           Control/AthenaKernel
diff --git a/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h b/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h
index 2dfd1b81156f5c31c523167ca80a2caabe652d59..7c8ead95431ec8d3af5661009e414d8206429627 100644
--- a/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h
+++ b/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h
@@ -8,7 +8,7 @@
 #define EVGENPRODTOOLS_EVGENOTFTOPUPSVC_H
 
 #include "AthenaBaseComps/AthService.h"
-#include "EvgenProdTools/IEvgenOTFTopUpSvc.h"
+#include "GenInterfaces/IEvgenOTFTopUpSvc.h"
 #include <string>
 
 /// @brief Service to hold some information for topping up
diff --git a/Generators/EvgenProdTools/python/LogicalExpressionFilter.py b/Generators/EvgenProdTools/python/LogicalExpressionFilter.py
index d5cdb5b05709484b4d323b85af02834e8529b479..1f378361f897062e19f6add295f2273cec054964 100644
--- a/Generators/EvgenProdTools/python/LogicalExpressionFilter.py
+++ b/Generators/EvgenProdTools/python/LogicalExpressionFilter.py
@@ -158,7 +158,7 @@ class LogicalExpressionFilter( PyAthena.Alg ):
 
     def evalFilter(self, filterName):
       if not self.algdict[filterName].isExecuted():
-         self.algdict[filterName].sysExecute()
+         self.algdict[filterName].sysExecute(self.getContext())
          self.algdict[filterName].setExecuted(True)
       decision = self.algdict[filterName].filterPassed()
       self.msg.verbose(filterName + " decision=" + str(decision))
diff --git a/Generators/EvgenProdTools/src/FixHepMC.cxx b/Generators/EvgenProdTools/src/FixHepMC.cxx
index 21a75ecadad31874e7c73785720f039dddd63620..c63016ed940a16b83b867ebf60e4a0793424b1d0 100644
--- a/Generators/EvgenProdTools/src/FixHepMC.cxx
+++ b/Generators/EvgenProdTools/src/FixHepMC.cxx
@@ -97,7 +97,11 @@ StatusCode FixHepMC::execute() {
     const int num_nochild_vtxs_orig = MC::const_vertices_match(evt, MC::hasNoChildren).size();
 
     // Clean!
+    int signal_vertex_bc = evt->signal_process_vertex() ? evt->signal_process_vertex()->barcode() : 0;
     MC::reduce(evt , toremove);
+    if (evt->barcode_to_vertex (signal_vertex_bc) == nullptr) {
+      evt->set_signal_process_vertex (nullptr);
+    }
 
     // Properties after cleaning
     const int num_particles_filt = evt->particles_size();
@@ -159,4 +163,4 @@ bool FixHepMC::isLoop(const HepMC::GenParticle* p) {
 
 //@}
 
-#endif
\ No newline at end of file
+#endif
diff --git a/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt b/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt
index 0ed427c7fa7a4a9a2416f879cc654c5092284f92..67ee7be505758dd89469aa20d165022b3cbe45b0 100644
--- a/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt
+++ b/Generators/GenAnalysisTools/ReweightTools/CMakeLists.txt
@@ -9,6 +9,7 @@ atlas_subdir( ReweightTools )
 atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaBaseComps
                           GaudiKernel
+                          Generators/GenInterfaces
                           PRIVATE
                           Control/DataModel
                           Control/StoreGate
diff --git a/Generators/GenAnalysisTools/ReweightTools/ReweightTools/PDFReweightTool.h b/Generators/GenAnalysisTools/ReweightTools/ReweightTools/PDFReweightTool.h
index 491f381a3036493084fc65dea784b84abf15c4a7..b648f3d7c9b8622194550ff86b7e4abb19102fe9 100644
--- a/Generators/GenAnalysisTools/ReweightTools/ReweightTools/PDFReweightTool.h
+++ b/Generators/GenAnalysisTools/ReweightTools/ReweightTools/PDFReweightTool.h
@@ -7,7 +7,7 @@
 
 //#include "GaudiKernel/AlgTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
-#include "ReweightTools/IPDFReweightTool.h"
+#include "GenInterfaces/IPDFReweightTool.h"
 #include "HepMC/GenEvent.h"
 #include <string>
 #include <vector>
diff --git a/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt b/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt
index 873abe21af97eef417bff70fe4c4d30aa01e16b0..2f5004985bd8b0358184dca5cef18331bdec27f6 100644
--- a/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt
+++ b/Generators/GenAnalysisTools/TruthTools/CMakeLists.txt
@@ -10,6 +10,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaBaseComps
                           GaudiKernel
                           PRIVATE
+                          Generators/GenInterfaces
                           Generators/GeneratorObjects
                           Generators/TruthUtils )
 
diff --git a/Generators/GenAnalysisTools/TruthTools/TruthTools/TruthSelector.h b/Generators/GenAnalysisTools/TruthTools/TruthTools/TruthSelector.h
index 7077f86b290b3f747c96e360a8c5fefaaf898318..5fa0d1e67f3d5da3105ca47a5cffecd52aca0eac 100644
--- a/Generators/GenAnalysisTools/TruthTools/TruthTools/TruthSelector.h
+++ b/Generators/GenAnalysisTools/TruthTools/TruthTools/TruthSelector.h
@@ -15,7 +15,7 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "HepPDT/ParticleDataTable.hh"
 #include "HepMC/GenParticle.h"
-#include "TruthTools/ITruthSelector.h"
+#include "GenInterfaces/ITruthSelector.h"
 
 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
 
diff --git a/Generators/GenInterfaces/CMakeLists.txt b/Generators/GenInterfaces/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ea23276ef7014851a09d54c889b4db38de853e73
--- /dev/null
+++ b/Generators/GenInterfaces/CMakeLists.txt
@@ -0,0 +1,24 @@
+# The name of the package:
+atlas_subdir( GenInterfaces )
+
+# The dependencies of the package:
+atlas_depends_on_subdirs(
+   PUBLIC
+   GaudiKernel )
+
+# External dependencies:
+find_package( HepMC )
+
+# Component(s) in the package:
+atlas_add_library( GenInterfacesLib
+   GenInterfaces/*.h
+   INTERFACE
+   PUBLIC_HEADERS GenInterfaces
+   LINK_LIBRARIES ${HEPMC_LIBRARIES} GaudiKernel )
+
+atlas_add_dictionary( GenInterfacesDict
+   GenInterfaces/GenInterfacesDict.h
+   GenInterfaces/selection.xml
+   INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS}
+   LINK_LIBRARIES ${HEPMC_LIBRARIES} GenInterfacesLib )
+
diff --git a/Generators/GenInterfaces/GenInterfaces/GenInterfacesDict.h b/Generators/GenInterfaces/GenInterfaces/GenInterfacesDict.h
new file mode 100644
index 0000000000000000000000000000000000000000..6aa39bf6341710a46e5837c10f5871f67764d4e7
--- /dev/null
+++ b/Generators/GenInterfaces/GenInterfaces/GenInterfacesDict.h
@@ -0,0 +1,28 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef GENINTERFACES_GENINTERFACESDICT_H
+#define GENINTERFACES_GENINTERFACESDICT_H
+
+#if defined(__GCCXML__) and not defined(EIGEN_DONT_VECTORIZE)
+#define EIGEN_DONT_VECTORIZE
+#endif // __GCCXML__
+
+// Includes for the dictionary generation:
+#include "GenInterfaces/IEvgenOTFTopUpSvc.h"
+#include "GenInterfaces/IHepMCWeightSvc.h"
+#include "GenInterfaces/IHforTool.h"
+#include "GenInterfaces/IPDFReweightTool.h"
+#include "GenInterfaces/ITruthSelector.h"
+
+#include "HepMC/SimpleVector.h"
+#include <vector>
+
+namespace HforToolDict {
+  struct tmp {
+    std::vector<HepMC::FourVector> v;
+  };
+}
+
+#endif // GENINTERFACES_GENINTERFACESDICT_H
\ No newline at end of file
diff --git a/Generators/EvgenProdTools/EvgenProdTools/IEvgenOTFTopUpSvc.h b/Generators/GenInterfaces/GenInterfaces/IEvgenOTFTopUpSvc.h
similarity index 100%
rename from Generators/EvgenProdTools/EvgenProdTools/IEvgenOTFTopUpSvc.h
rename to Generators/GenInterfaces/GenInterfaces/IEvgenOTFTopUpSvc.h
diff --git a/Generators/HepMCWeightSvc/HepMCWeightSvc/IHepMCWeightSvc.h b/Generators/GenInterfaces/GenInterfaces/IHepMCWeightSvc.h
similarity index 100%
rename from Generators/HepMCWeightSvc/HepMCWeightSvc/IHepMCWeightSvc.h
rename to Generators/GenInterfaces/GenInterfaces/IHepMCWeightSvc.h
diff --git a/Generators/HforTool/HforTool/IHforTool.h b/Generators/GenInterfaces/GenInterfaces/IHforTool.h
similarity index 100%
rename from Generators/HforTool/HforTool/IHforTool.h
rename to Generators/GenInterfaces/GenInterfaces/IHforTool.h
diff --git a/Generators/GenAnalysisTools/ReweightTools/ReweightTools/IPDFReweightTool.h b/Generators/GenInterfaces/GenInterfaces/IPDFReweightTool.h
similarity index 100%
rename from Generators/GenAnalysisTools/ReweightTools/ReweightTools/IPDFReweightTool.h
rename to Generators/GenInterfaces/GenInterfaces/IPDFReweightTool.h
diff --git a/Generators/GenAnalysisTools/TruthTools/TruthTools/ITruthSelector.h b/Generators/GenInterfaces/GenInterfaces/ITruthSelector.h
similarity index 100%
rename from Generators/GenAnalysisTools/TruthTools/TruthTools/ITruthSelector.h
rename to Generators/GenInterfaces/GenInterfaces/ITruthSelector.h
diff --git a/Generators/GenInterfaces/GenInterfaces/selection.xml b/Generators/GenInterfaces/GenInterfaces/selection.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4c4f5af9ca0bbfd6f4b8ac5448af6eeeb4faf4c4
--- /dev/null
+++ b/Generators/GenInterfaces/GenInterfaces/selection.xml
@@ -0,0 +1,10 @@
+<lcgdict>
+  <!-- Requested dictionary generation -->
+  <class name="IEvgenOTFTopUpSvc" />
+  <class name="IHepMCWeightSvc" />
+  <class name="IHforTool" />
+  <class name="IPDFReweightTool" />
+  <class name="ITruthSelector" />
+
+ <class name="std::vector<HepMC::FourVector>"/>
+</lcgdict>
\ No newline at end of file
diff --git a/Generators/GeneratorObjectsTPCnv/CMakeLists.txt b/Generators/GeneratorObjectsTPCnv/CMakeLists.txt
index f8e253e8f37e8b3dba35286175755fcd5c890bb6..5e2fca9ae1508002191d60415769b59262acc534 100644
--- a/Generators/GeneratorObjectsTPCnv/CMakeLists.txt
+++ b/Generators/GeneratorObjectsTPCnv/CMakeLists.txt
@@ -13,7 +13,7 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           Control/AthAllocators
                           Control/AthenaKernel
-                          Generators/HepMCWeightSvc )
+                          Generators/GenInterfaces )
 
 # External dependencies:
 find_package( HepMC )
diff --git a/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p4.cxx b/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p4.cxx
index 986bcabcd0d6a755c34429a70ffc6f8debea420d..2387cd0c7e0bbef422de860c77441460677b093d 100755
--- a/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p4.cxx
+++ b/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p4.cxx
@@ -19,7 +19,7 @@
 #include "GeneratorObjectsTPCnv/McEventCollectionCnv_p4.h"
 #include "HepMcDataPool.h"
 
-#include "HepMCWeightSvc/IHepMCWeightSvc.h"
+#include "GenInterfaces/IHepMCWeightSvc.h"
 
 namespace
 {
diff --git a/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p5.cxx b/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p5.cxx
index 9f979f3c241564ad46db8fc709d232292bb3ad23..b6b62ea144570e1619588dbd0bfb5d35850b7789 100755
--- a/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p5.cxx
+++ b/Generators/GeneratorObjectsTPCnv/src/McEventCollectionCnv_p5.cxx
@@ -18,7 +18,7 @@
 #include "GeneratorObjectsTPCnv/McEventCollectionCnv_p5.h"
 #include "HepMcDataPool.h"
 
-#include "HepMCWeightSvc/IHepMCWeightSvc.h"
+#include "GenInterfaces/IHepMCWeightSvc.h"
 
 namespace {
   // helper method to compute the number of particles and vertices in a
diff --git a/Generators/GravADD_i/doc/packagedoc.h b/Generators/GravADD_i/doc/packagedoc.h
index 835effaf7907f3a28ca16eab10edb6516b512fec..246c0accf63984112feff99127553d7e38843ea8 100644
--- a/Generators/GravADD_i/doc/packagedoc.h
+++ b/Generators/GravADD_i/doc/packagedoc.h
@@ -85,10 +85,4 @@ The flag gravev that GravADD uses to distinguish the three types of events (QCD,
 
 
 
-*/
-/**
-@page usedGravADD_i Used Packages
-*/
-/**
-@page requirementsGravADD_i Requirements
 */
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.108295.Herwigpp_UEEE3_CTEQ6L1_Zmumu.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.108295.Herwigpp_UEEE3_CTEQ6L1_Zmumu.py
deleted file mode 100755
index c8f996692bf6c68946c80b5d070169ecedb312e1..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.108295.Herwigpp_UEEE3_CTEQ6L1_Zmumu.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# ---------------------------------------------------------------------- 
-# JO file for RTT
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-#from TruthExamples.TruthExamplesConf import *
-from EvgenProdTools/EvgenProdToolsConfig import TestHepMC
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.108295.Herwigpp_UEEE3_CTEQ6L1_Zmumu.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-# ----------------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.ZAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
-
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.133333.Herwigpp_UEEE3_CTEQ6L1_Wenu.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.133333.Herwigpp_UEEE3_CTEQ6L1_Wenu.py
deleted file mode 100755
index 2a3773557bab1eff08294b2ff285d3c18e817026..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.133333.Herwigpp_UEEE3_CTEQ6L1_Wenu.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# ---------------------------------------------------------------------- 
-# JO file for RTT
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-#from TruthExamples.TruthExamplesConf import *
-from EvgenProdTools/EvgenProdToolsConfig import *
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.133333.Herwigpp_UEEE3_CTEQ6L1_Wenu.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-# ----------------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.WplusJetAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147810.Pythia8_AU2CTEQ6L1_Wenu.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147810.Pythia8_AU2CTEQ6L1_Wenu.py
deleted file mode 100755
index 17c8b966a1d5053a1e2199409d243376a84fe663..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147810.Pythia8_AU2CTEQ6L1_Wenu.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# ---------------------------------------------------------------------- 
-# 
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-#from TruthExamples.TruthExamplesConf import *
-from EvgenProdTools/EvgenProdToolsConfig import *
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.147810.Pythia8_AU2CTEQ6L1_Wenu.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.WplusJetAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
-
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147811.Pythia8_AU2CTEQ6L1_Wmunu.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147811.Pythia8_AU2CTEQ6L1_Wmunu.py
deleted file mode 100755
index 15960b398e50f95f645f6586a6ce9c1a22e6a086..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147811.Pythia8_AU2CTEQ6L1_Wmunu.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# ---------------------------------------------------------------------- 
-# JO file for RTT
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-#from TruthExamples.TruthExamplesConf import *
-from EvgenProdTools/EvgenProdToolsConfig import *
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.147811.Pythia8_AU2CTEQ6L1_Wmunu.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-# ----------------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.WplusJetAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
-
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147812.Pythia8_AU2CTEQ6L1_Wtaunu.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147812.Pythia8_AU2CTEQ6L1_Wtaunu.py
deleted file mode 100755
index 3059550a55ad6370604d3902af835769356a48d9..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147812.Pythia8_AU2CTEQ6L1_Wtaunu.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# ---------------------------------------------------------------------- 
-# JO file for RTT
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-#from TruthExamples.TruthExamplesConf import *
-from EvgenProdTools/EvgenProdToolsConfig import *
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.147812.Pythia8_AU2CTEQ6L1_Wtaunu.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-# ----------------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.WplusJetAnalysis=True
-myHepMCAnalysis.WtaunuAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
-
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147816.Pythia8_AU2CTEQ6L1_Zee.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147816.Pythia8_AU2CTEQ6L1_Zee.py
deleted file mode 100755
index b822b318515613f148ae97709bb05a2358675ec6..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147816.Pythia8_AU2CTEQ6L1_Zee.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# ---------------------------------------------------------------------- 
-# JO file for RTT
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-#from TruthExamples.TruthExamplesConf import *
-from EvgenProdTools/EvgenProdToolsConfig import *
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.147816.Pythia8_AU2CTEQ6L1_Zee.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-# ----------------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.ZAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
-
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147830.Pythia_AUET2BCTEQ6L1_Wenu.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147830.Pythia_AUET2BCTEQ6L1_Wenu.py
deleted file mode 100755
index bdf95be6b682acda493cab155c1313a0bc8f8c91..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147830.Pythia_AUET2BCTEQ6L1_Wenu.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# ---------------------------------------------------------------------- 
-# JO file for RTT
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-#from TruthExamples.TruthExamplesConf import *
-from EvgenProdTools/EvgenProdToolsConfig import *
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.147830.Pythia_AUET2BCTEQ6L1_Wenu.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-# ----------------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.WplusJetAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
-
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147831.Pythia_AUET2BCTEQ6L1_Wmunu.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147831.Pythia_AUET2BCTEQ6L1_Wmunu.py
deleted file mode 100755
index 6ff95a3377694f6f76e2c89dc6fe7b26af45fb14..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147831.Pythia_AUET2BCTEQ6L1_Wmunu.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# ---------------------------------------------------------------------- 
-# JO file for RTT
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-#from TruthExamples.TruthExamplesConf import *
-from EvgenProdTools/EvgenProdToolsConfig import *
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.147831.Pythia_AUET2BCTEQ6L1_Wmunu.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-# ----------------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.WplusJetAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
-
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147832.Pythia_AUET2BCTEQ6L1_Wtaunu.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147832.Pythia_AUET2BCTEQ6L1_Wtaunu.py
deleted file mode 100755
index 2f20682b79ecf939b94f5a1ab99fcdac5628b8ad..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147832.Pythia_AUET2BCTEQ6L1_Wtaunu.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# ---------------------------------------------------------------------- 
-# JO file for RTT
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-#from TruthExamples.TruthExamplesConf import *
-from EvgenProdTools/EvgenProdToolsConfig import *
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.147832.Pythia_AUET2BCTEQ6L1_Wtaunu.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-# ----------------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.WplusJetAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
-
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147900.Pythia8_AU2CT10_jetjet_JZ0.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147900.Pythia8_AU2CT10_jetjet_JZ0.py
deleted file mode 100755
index 822ed350dbd384a066c3afeb028a30ea2574b129..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147900.Pythia8_AU2CT10_jetjet_JZ0.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# ---------------------------------------------------------------------- 
-# JO file for RTT
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-from EvgenProdTools/EvgenProdToolsConfig import TestHepMC
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.147900.Pythia8_AU2CT10_jetjet_JZ0.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-# ----------------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
-
diff --git a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147907.Pythia8_AU2CT10_jetjet_JZ7.py b/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147907.Pythia8_AU2CT10_jetjet_JZ7.py
deleted file mode 100755
index bbfd7c84b41c1357c8b2fa26ea0c6a1702e4db6f..0000000000000000000000000000000000000000
--- a/Generators/HepMCAnalysis_i/share/jobOptions.RTT.MC12.147907.Pythia8_AU2CT10_jetjet_JZ7.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# ---------------------------------------------------------------------- 
-# JO file for RTT
-# ---------------------------------------------------------------------- 
-
-from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel = INFO
-
-#from TruthExamples.TruthExamplesConf import *
-from EvgenProdTools/EvgenProdToolsConfig import *
-from PyJobTransformsCore.runargs import *
-runArgs = RunArguments()
-
-outputFileName="RTT.MC12.147907.Pythia8_AU2CT10_jetjet_JZ7.root"
-print "Output file name: ", outputFileName
-
-from AthenaCommon.AlgSequence import AlgSequence
-topAlg = AlgSequence("TopAlg") 
-
-from EvgenJobTransforms.EvgenConfig import *
-
-# ----------------------------------------------------------------------
-from AthenaServices.AthenaServicesConf import AtRndmGenSvc
-ServiceMgr += AtRndmGenSvc()
-
-# Add HepMCAnalysis algorithms
-from HepMCAnalysis_i.HepMCAnalysis_iConfig import HepMCAnalysis_i
-
-myHepMCAnalysis = HepMCAnalysis_i("HepMCAnalysis_i", file = outputFileName)
-myHepMCAnalysis.JetAnalysis=True
-myHepMCAnalysis.EtmissAnalysis=True
-
-topAlg += myHepMCAnalysis
-
diff --git a/Generators/HepMCWeightSvc/CMakeLists.txt b/Generators/HepMCWeightSvc/CMakeLists.txt
index 83ab77f54343dcd8a49f1f0264673864a0762882..cfc35202a5ae4e9ca13d15dc90c30a25698da228 100644
--- a/Generators/HepMCWeightSvc/CMakeLists.txt
+++ b/Generators/HepMCWeightSvc/CMakeLists.txt
@@ -14,7 +14,8 @@ atlas_depends_on_subdirs(
    Database/AthenaPOOL/AthenaPoolUtilities
    Database/IOVDbDataModel
    Database/IOVDbMetaDataTools
-   Event/EventInfo )
+   Event/EventInfo
+   Generators/GenInterfaces )
 
 find_package( Boost COMPONENTS algorithm )
 find_package( CORAL COMPONENTS CoralBase )
diff --git a/Generators/HepMCWeightSvc/src/HepMCWeightSvc.h b/Generators/HepMCWeightSvc/src/HepMCWeightSvc.h
index f5c16923aabbb06739b49e16122227a974187095..60eb6878e7d4dfbea131b256157925c5b31bb517 100644
--- a/Generators/HepMCWeightSvc/src/HepMCWeightSvc.h
+++ b/Generators/HepMCWeightSvc/src/HepMCWeightSvc.h
@@ -6,7 +6,7 @@
 #define EVGENPRODTOOLS_HEPMCWEIGHTSVC_H
 
 #include "AthenaBaseComps/AthService.h"
-#include "HepMCWeightSvc/IHepMCWeightSvc.h"
+#include "GenInterfaces/IHepMCWeightSvc.h"
 #include <string>
 
 #include "IOVDbMetaDataTools/IIOVDbMetaDataTool.h"
diff --git a/Generators/Herwig7_i/python/Herwig7Config.py b/Generators/Herwig7_i/python/Herwig7Config.py
new file mode 100644
index 0000000000000000000000000000000000000000..dfe97b65eaf81e7772622b4174f8560b6a42094f
--- /dev/null
+++ b/Generators/Herwig7_i/python/Herwig7Config.py
@@ -0,0 +1,402 @@
+#! /usr/bin/env python
+
+## \file Herwig7Config.py
+## \brief Python convenience snippets providing re-usable bits of settings for use in the jobOptions
+
+import Herwig7Utils as hw7Utils
+
+## Configuration base class for %Herwig7
+class Hw7Config(object):
+
+  ## Constructor
+  def __init__(self, genSeq, runArgs, run_name="Herwig"):
+
+    self.genSeq   = genSeq
+    self.runArgs  = runArgs
+
+    self.run_name = run_name
+    # self.seed     = runArgs.randomSeed
+    # self.energy   = runArgs.ecmEnergy
+
+    self.me_pdf_name  = "MMHT2014lo68cl"
+    self.mpi_pdf_name = "MMHT2014lo68cl"
+
+    self.set_printout_commands            = False
+    self.set_physics_parameter_commands   = False
+    self.set_technical_parameter_commands = False
+
+    self.default_commands = hw7Utils.ConfigurationCommands()
+    self.commands         = hw7Utils.ConfigurationCommands()
+
+
+  ## \brief Commands applied to all configuration classes before commands from the JobOptions
+  ## \todo  Remove `AngularOrdered` settungs once they are included in %Herwig7 by default
+  def global_pre_commands(self):
+    return """
+## =========================================
+## Global Pre-Commands from Herwig7Config.py
+## =========================================
+
+## fix for global default settings until released with Herwig7 itself
+set /Herwig/Shower/GtoQQbarSplitFn:AngularOrdered Yes
+set /Herwig/Shower/GammatoQQbarSplitFn:AngularOrdered Yes
+
+## fix for GeV-mass photon radiation until released with Herwig7 itself
+set /Herwig/Shower/GammatoQQbarSudakov:Alpha /Herwig/Shower/AlphaQED
+
+## ensure JetFinder uses AntiKt with R=0.4
+set /Herwig/Cuts/JetFinder:Variant AntiKt
+set /Herwig/Cuts/JetFinder:ConeRadius 0.4
+"""
+
+
+  ## Add direct %Herwig7 repository commands as they wo
+  def add_commands(self, commands):
+
+    self.commands += commands
+
+
+  ## Sets the seed for the random number generator
+  def random_seed_commands(self):
+
+    return("""
+## Random number generator seed
+set /Herwig/Random:Seed {}
+""".format(self.runArgs.randomSeed))
+
+
+  ## Sets center-of-mass energy sqrts(s) in GeV
+  ##
+  ## * 2016/10/07 Daniel Rauch (daniel.rauch@desy.de)
+  ##
+  ##   The extrapolation of the intrinsic pT `/Herwig/Shower/Evolver:IntrinsicPtGaussian`
+  ##   depending on sqrt(s) according to the formula
+  ##   \f[
+  ##     p_{T, intrinsic}^{default} = 1.85 \text{GeV} + \sqrt{s}*(0.1/4000.0)
+  ##   \f]
+  ##   was removed after discussion with the authors since the intrinsic pT is tuned
+  ##   and the extrapolated value disagreed with the tuned value.
+  def energy_commands(self):
+
+    return("""
+## Center-of-mass energy
+set /Herwig/Generators/{}:EventHandler:LuminosityFunction:Energy {}
+""".format(self.event_generator, self.runArgs.ecmEnergy))
+
+
+  ## Sets printout verbosity and error tolerance
+  def printout_commands(self):
+
+    self.set_printout_commands = True
+
+    return("""
+## Verbosity and printout settings
+set /Herwig/Generators/{0}:DebugLevel 1
+set /Herwig/Generators/{0}:PrintEvent 2
+set /Herwig/Generators/{0}:UseStdout Yes
+set /Herwig/Generators/{0}:NumberOfEvents 1000000000
+set /Herwig/Generators/{0}:MaxErrors 1000000
+
+## Make sampler print out cross sections for each subprocess
+set /Herwig/Samplers/Sampler:Verbose On
+""".format(self.event_generator))
+
+
+  ## ATLAS MC15 default parameters for particle masses and widths and Weinberg angle
+  ##
+  ## As specified in https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/McProductionCommonParametersMC15
+  def physics_parameter_commands(self):
+
+    self.physics_parameter_commands = True
+
+    return("""
+## Masses and widths: PDG 2010 values (except TOP mass; kept at PDG2007)
+set /Herwig/Particles/t:NominalMass 172.5*GeV
+set /Herwig/Particles/tbar:NominalMass 172.5*GeV
+set /Herwig/Particles/W+:NominalMass 80.399*GeV
+set /Herwig/Particles/W-:NominalMass 80.399*GeV
+set /Herwig/Particles/Z0:NominalMass 91.1876*GeV
+set /Herwig/Particles/W+:Width 2.085*GeV
+set /Herwig/Particles/W-:Width 2.085*GeV
+set /Herwig/Particles/Z0:Width 2.4952*GeV
+
+## Weinberg angle
+set /Herwig/Model:EW/Sin2ThetaW 0.23113
+""")
+
+
+  def technical_parameter_commands(self):
+
+    self.set_technical_parameter_commands = True
+
+    return("""
+## Disable default attempts to use Pomeron PDF data files, until we're worked how to do that on the Grid!
+set /Herwig/Particles/pomeron:PDF /Herwig/Partons/NoPDF
+
+## Set long-lived particles stable
+set /Herwig/Decays/DecayHandler:MaxLifeTime 10*mm
+
+# Turn off intermediate photons inserted explicitly into the event record with an incorrect life length in the pi0 -> e+e-e+e- decay mode 
+# This is the default from H++ 2.6.1
+set /Herwig/Decays/PScalar4f:GenerateIntermediates 0
+""")
+
+
+
+  ## \brief Commands for setting the strong coupling \f$\alpha_s\f$ in the hard process
+  ##
+  ## By default %Herwig7 uses the world average value \f$\alpha_s(M_Z=91.188~\mbox{GeV})=0.118\f$.
+  ##
+  ## \param[in] order Order of the evolution of the strong coupling
+  ##                  - LO:  1-loop running
+  ##                  - NLO: 2-loop running
+  ## \param[in] scale Scale at which the value of the strong coupling is specified
+  ## \param[in] value Value of the strong coupling at the given scale
+  def me_alphas_commands(self, order="NLO", scale=91.1876, value=0.118):
+
+    if not order in ["LO", "NLO"]:
+      raise RuntimeError(hw7Utils.ansi_format_error("Parameter 'order' must either be 'LO' or 'NLO'!"))
+
+    self.commands += """
+## Configure {0} AlphaS for the hard process
+## (LO: 1-loop-running / NLO: 2-loop running)
+set /Herwig/Couplings/{0}AlphaS:input_scale {1}
+set /Herwig/Couplings/{0}AlphaS:input_alpha_s {2}
+set /Herwig/Model:QCD/RunningAlphaS /Herwig/Couplings/{0}AlphaS
+""".format(order, scale, value)
+
+
+  ## \brief Commands for setting the PDF in the hard process
+  ##
+  ## \param[in] order    perturbative order of the PDF set
+  ## \param[in] name     name of the PDF set
+  ## \param[in] member   index of the PDF member
+  ## \param[in] max_flav number of massless quark flavours
+  def me_pdf_commands(self, order="NLO", name="MMHT2014nlo68cl", member=0, max_flav=5):
+
+    if not order in ["LO", "NLO"]:
+      raise RuntimeError(hw7Utils.ansi_format_error("Parameter 'order' must either be 'LO' or 'NLO'!"))
+
+    self.me_pdf_name = name
+
+    self.commands += """
+## Configure {0} PDF set for the hard process
+set /Herwig/Partons/Hard{0}PDF:PDFName {1}
+set /Herwig/Partons/Hard{0}PDF:Member {2}
+set /Herwig/Partons/Hard{0}PDF:MaxFlav {3}
+set /Herwig/Partons/Hard{0}PDF:RemnantHandler /Herwig/Partons/HadronRemnants
+set /Herwig/Particles/p+:PDF /Herwig/Partons/Hard{0}PDF
+set /Herwig/Particles/pbar-:PDF /Herwig/Partons/Hard{0}PDF
+set /Herwig/Partons/QCDExtractor:FirstPDF  /Herwig/Partons/Hard{0}PDF
+set /Herwig/Partons/QCDExtractor:SecondPDF /Herwig/Partons/Hard{0}PDF
+""".format(order, name, member, max_flav)
+
+
+  ## \brief Commands for setting the PDF in the parton showers
+  ##
+  ## \param[in] order    perturbative order of the PDF set
+  ## \param[in] name     name of the PDF set
+  ## \param[in] member   index of the PDF member
+  ## \param[in] max_flav number of massless quark flavours
+  def shower_pdf_commands(self, order="LO", name="MMHT2014lo68cl", member=0, max_flav=5):
+
+    if not order in ["LO", "NLO"]:
+      raise RuntimeError(hw7Utils.ansi_format_error("Parameter 'order' must either be 'LO' or 'NLO'!"))
+
+    ## set parton shower PDF name in the Herwig7 C++ class
+    # self.genSeq.Herwig7.PDFNamePS = PS_PDF
+
+    self.commands += """
+## Configure {0} PDF set for the parton shower
+set /Herwig/Partons/Shower{0}PDF:PDFName {1}
+set /Herwig/Partons/Shower{0}PDF:Member {2}
+set /Herwig/Partons/Shower{0}PDF:MaxFlav {3}
+set /Herwig/Shower/ShowerHandler:PDFA /Herwig/Partons/Shower{0}PDF
+set /Herwig/Shower/ShowerHandler:PDFB /Herwig/Partons/Shower{0}PDF
+set /Herwig/Shower/PowhegShowerHandler:PDFA /Herwig/Partons/Shower{0}PDF
+set /Herwig/Shower/PowhegShowerHandler:PDFB /Herwig/Partons/Shower{0}PDF
+set /Herwig/DipoleShower/DipoleShowerHandler:PDFA /Herwig/Partons/Shower{0}PDF
+set /Herwig/DipoleShower/DipoleShowerHandler:PDFB /Herwig/Partons/Shower{0}PDF
+""".format(order, name, member, max_flav)
+
+
+  ## \brief Commands for setting the PDF in the underlying event (UE)
+  ##
+  ## \param[in] name     name of the PDF set
+  ## \param[in] member   index of the PDF member
+  ## \param[in] max_flav number of massless quark flavours
+  def mpi_pdf_commands(self, name="MMHT2014lo68cl", member=0, max_flav=5):
+
+    self.mpi_pdf_name = name
+
+    self.commands += """
+## Configure MPI PDF
+set /Herwig/Partons/MPIPDF:PDFName {}
+set /Herwig/Partons/MPIPDF:Member {}
+set /Herwig/Partons/MPIPDF:MaxFlav {}
+""".format(name, member, max_flav)
+
+
+  ## \brief Commands for setting the remnant PDF
+  ##
+  ## \param[in] name     name of the PDF set
+  ## \param[in] member   index of the PDF member
+  ## \param[in] max_flav number of massless quark flavours
+  def remnant_pdf_commands(self, name="MMHT2014lo68cl", member=0, max_flav=5):
+
+    self.commands += """
+## Configure Remnant PDF
+set /Herwig/Partons/RemnantPDF:PDFName {}
+set /Herwig/Partons/RemnantPDF:Member {}
+set /Herwig/Partons/RemnantPDF:MaxFlav {}
+""".format(name, member, max_flav)
+
+
+
+  ## \brief Commands for setting PS/hadronization and UE/MPI tune simultaneously
+  ##
+  ## \param[in] ps_tune_name name identifying the PS/hadronization tune
+  ## \param[in] ue_tune_name name identifying the UE/MPI tune
+  ## \return    Nothing, adds the corresponding commands directly to the generator configuration object
+  def tune_commands(self, ps_tune_name = "H7-PS-MMHT2014LO", ue_tune_name = "H7-UE-MMHT"):
+
+    cmds = """
+## -------------
+## Tune Settings
+## -------------
+"""
+
+    self.ps_tune_commands(tune_name = ps_tune_name)
+    self.ue_tune_commands(tune_name = ue_tune_name)
+
+
+  ## \brief Commands for only setting the PS/hadronization tune
+  ##
+  ## \param[in] tune_name name identifying the PS/hadronization tune
+  ## \return    Nothing, adds the corresponding commands directly to the generator configuration object
+  def ps_tune_commands(self, tune_name = "H7-PS-MMHT2014LO"):
+
+    cmds = """
+## Parton shower / hadronization tune settings
+"""
+
+    if tune_name == "H7-PS-MMHT2014LO":
+      cmds += """
+# > The parton shower / hadronization tune "H7-MMHT2014LO" is already
+# > configured in Herwig7 via the default settings.
+"""
+    # elif tune_name == "some-other-name":
+    #   cmds += self.load_PS_tune(tune_name)
+    else:
+      raise Exception("Parton shower tune name '{}' unknown".format(tune_name))
+
+    self.commands += cmds
+
+
+  def load_PS_tune(self, tune_name):
+
+    return """
+## some commands
+"""
+
+
+  ## \brief Commands for only setting the UE/MPI tune
+  ##
+  ## \param[in] tune_name name identifying the UE/MPI tune
+  ## \return    Nothing, adds the corresponding commands directly to the generator configuration object
+  def ue_tune_commands(self, tune_name = "H7-UE-MMHT"):
+
+    cmds = """
+## Underlying event tune settings
+"""
+
+    if tune_name == "H7-UE-MMHT":
+      cmds += """
+# > The underlying event tune "H7-UE-MMHT" is already
+# > configured in Herwig7 via the default settings.
+"""
+    # elif tune_name == "some-other-name":
+    #   cmds = self.UE_tune_commands(tune_name)
+    else:
+      raise Exception("Underlying event tune name '{}' unknown".format(tune_name))
+
+    self.commands += cmds
+
+
+  def load_ue_tune(self, tune_name):
+
+    return """
+## some commands
+"""
+
+
+  def get_dpdf_path(self):
+    import os
+    cmt_path = os.environ.get("CMTPATH")
+    cmt_dir = os.environ.get("CMTCONFIG")
+    
+    cmtPaths = cmt_path.split(':')
+    
+    for path in cmtPaths:
+      pathNow = path + "/InstallArea/" + cmt_dir + "/share/"
+      try:
+        fileList = os.listdir(pathNow)
+      except:
+        fileList = []
+      if "HerwigDefaults.rpo" in fileList:
+        simSharePath = pathNow
+
+    dpdf_path = os.path.dirname(os.path.normpath(os.path.join(simSharePath, os.readlink(simSharePath + 'HerwigDefaults.rpo')))) + "/PDF/diffraction/"
+    
+    return dpdf_path
+
+
+  ## Set pomeron structure function
+  def pdf_pomeron_cmds(self, flux, pdf):
+
+    dpdf_path = self.get_dpdf_path()
+
+    cmds  = "\n"
+    cmds += "set /Herwig/Partons/PomeronPDF:RootName %s\n" % dpdf_path
+    cmds += "set /Herwig/Partons/PomeronFlux:PDFFit %s\n"  % flux
+    cmds += "set /Herwig/Partons/PomeronPDF:PDFFit %s\n"  % pdf
+
+    cmds += """\
+set /Herwig/Particles/pomeron:PDF /Herwig/Partons/PomeronPDF
+
+# Technical parameters for this run
+set /Herwig/Generators/LHCGenerator:EventHandler:Sampler:Ntry 100000
+set /Herwig/Generators/LHCGenerator:MaxErrors 100000
+
+# MPI doesn't work
+# TODO: Is this a problem?
+set /Herwig/Generators/LHCGenerator:EventHandler:CascadeHandler:MPIHandler NULL
+
+# Choice of phase-space generation for PDFs
+set /Herwig/Partons/QCDExtractor:FlatSHatY 0
+
+"""
+    return cmds
+
+
+  ## Initialize Budnev Photon flux for two-photon exclusive exchange. From Pavel Ruzicka.
+  ##
+  def pdf_gammagamma_cmds(self):
+
+    return """
+
+# Technical parameters for this run
+set /Herwig/Generators/LHCGenerator:EventHandler:Sampler:Ntry 100000
+
+# Choice of phase-space generation for PDFs
+set /Herwig/Partons/QCDExtractor:FlatSHatY 0
+
+# Change the proton PDFs to those for photon radiation
+set /Herwig/Particles/p+:PDF    /Herwig/Partons/BudnevPDF
+set /Herwig/Particles/pbar-:PDF /Herwig/Partons/BudnevPDF
+
+# MPI doesn't work
+# TODO: Is this a problem?
+set /Herwig/Generators/LHCGenerator:EventHandler:CascadeHandler:MPIHandler NULL
+
+"""
diff --git a/Generators/Herwig7_i/python/Herwig7ConfigBuiltinME.py b/Generators/Herwig7_i/python/Herwig7ConfigBuiltinME.py
new file mode 100644
index 0000000000000000000000000000000000000000..1a3dab529c64791c5bbe8b58d552cc5cd016cb47
--- /dev/null
+++ b/Generators/Herwig7_i/python/Herwig7ConfigBuiltinME.py
@@ -0,0 +1,76 @@
+#! /usr/bin/env python
+
+## \file Herwig7ConfigBuiltinME.py
+## \brief Configuration class for built-in / "old-style" matrix elements
+## \author Daniel Rauch (daniel.rauch@desy.de)
+
+import Herwig7Config as hw7Config
+import Herwig7Control as hw7Control
+import Herwig7Utils as hw7Utils
+
+
+## Configuration class for built-in / "old-style" matrix elements
+## 
+## Example JobOptions are available in [`examples/BuiltinME`](https://svnweb.cern.ch/trac/atlasoff/browser/Generators/Herwig7_i/trunk/examples/BuiltinME) and [`tests/athenaBuiltinMEs/jobOptions`](https://svnweb.cern.ch/trac/atlasoff/browser/Generators/Herwig7_i/trunk/tests/athenaBuiltinMEs/jobOptions).
+##
+class Hw7ConfigBuiltinME(hw7Config.Hw7Config):
+
+
+  def __init__(self, genSeq, runArgs, run_name="Herwig"):
+
+    ## provide variables initialized by the parent class
+    super(Hw7ConfigBuiltinME, self).__init__(genSeq, runArgs, run_name)
+
+    self.event_generator = "LHCGenerator"
+
+
+  def local_pre_commands(self):
+
+    return """
+## =================================================
+## Local Pre-Commands from Herwig7ConfigBuiltinME.py
+## =================================================
+
+# > no local pre-commands at the moment
+"""
+
+  def local_post_commands(self):
+
+    return """
+## ==================================================
+## Local Post-Commands from Herwig7ConfigBuiltinME.py
+## ==================================================
+
+saverun {} /Herwig/Generators/LHCGenerator
+""".format(self.run_name)
+
+
+  ## High-level function for triggering the process setup and the event generation.
+  ##
+  ## \warning Please do not modify the generator configuration in the job options after calling the `run()` function as
+  ##          the modified settings would not be applied in the event generation
+  ##
+  def run(self):
+
+    ## add default settings if they were not overwritten in the JobOptions
+
+    self.default_commands += self.energy_commands()
+    self.default_commands += self.random_seed_commands()
+
+    if not self.set_printout_commands:
+      self.default_commands += self.printout_commands()
+    if not self.set_physics_parameter_commands:
+      self.default_commands += self.physics_parameter_commands()
+    if not self.set_technical_parameter_commands:
+      self.default_commands += self.technical_parameter_commands()
+
+    ## do read and run step in one go
+
+    hw7Control.run(self)
+
+
+  def powheg_commands():
+    return """
+## Set up Powheg truncated shower
+set /Herwig/Shower/Evolver:HardEmissionMode POWHEG
+"""
diff --git a/Generators/Herwig7_i/python/Herwig7Control.py b/Generators/Herwig7_i/python/Herwig7Control.py
new file mode 100644
index 0000000000000000000000000000000000000000..778c867a90bfb02b02ba3800550d0bf83e18c63a
--- /dev/null
+++ b/Generators/Herwig7_i/python/Herwig7Control.py
@@ -0,0 +1,443 @@
+## \file Herwig7Control.py
+## \brief Main python interface for %Herwig7 for preparing the event generation
+## \author Daniel Rauch (daniel.rauch@desy.de)
+##
+## This part of the interface provides functionality for running all the tasks
+## necessary to initialize and prepare the event generation.
+## More concretely, it handles the read or alternatively the build/integrate/
+## mergegrids steps in order to produce the Herwig runfile and all other
+## ingredients for a run, possibly also creating a gridpack.
+## The event generation itself starting from reading the runfile is handled
+## in Herwig7_i/Herwig7.h and src/Herwig7.cxx.
+
+import datetime, os, shutil, subprocess, sys, time
+
+import Herwig7Config as hw7Config
+import Herwig7Utils as hw7Utils
+# import Herwig7Defaults as HwDefaults
+
+from AthenaCommon import Logging
+athMsgLog = Logging.logging.getLogger('Herwig7Control')
+
+
+## \brief Get path to the `share/Herwig` folder
+##
+
+def get_share_path():
+
+  path = os.path.join(os.environ['HERWIG7_PATH'], 'share/Herwig')
+  if os.path.isfile(os.path.join(path, 'HerwigDefaults.rpo')):
+    return(path)
+
+  # raise exception if none of the two methods work out
+  raise RuntimeError(hw7Utils.ansi_format_error('Could not find a valid share/Herwig folder'))
+
+
+# proper handling with path set in External/Herwig7/cmt/requirements
+herwig7_path = os.environ['HERWIG7_PATH']
+herwig7_bin_path   = os.path.join(herwig7_path, 'bin')
+herwig7_share_path = get_share_path()
+
+herwig7_binary     = os.path.join(herwig7_bin_path, 'Herwig')
+herwig7_mergegrids = os.path.join(herwig7_bin_path, 'herwig-mergegrids')
+
+
+## Do the read/run sequence.
+##
+## This function should provide the build, integrate, mergegrids and run step
+## in one go without creating a gridpack - just pure and direct event generation
+def run(gen_config):
+
+  ## perform build/integrate/mergegrids sequence
+  do_read(gen_config)
+
+  ## start the event generation
+  do_run(gen_config, cleanup_herwig_scratch=False)
+
+
+## Do the build, integrate, mergegrids and run step in one go
+## without creating a gridpack
+##
+## \param[in] cleanup_herwig_scratch Remove `Herwig-scratch` folder after event generation to save disk space
+def matchbox_run(gen_config, integration_jobs, cleanup_herwig_scratch):
+
+  ## perform build/integrate/mergegrids sequence
+  do_build_integrate_mergegrids(gen_config, integration_jobs)
+
+  ## start the event generation
+  do_run(gen_config, cleanup_herwig_scratch)
+
+
+## Either do the build, integrate and mergegrids steps and create a gridpack
+## or extract it and generate events from it
+##
+## \param[in] cleanup_herwig_scratch Remove `Herwig-scratch` folder after event generation to save disk space
+def matchbox_run_gridpack(gen_config, integration_jobs, gridpack_name, cleanup_herwig_scratch):
+
+  print_integration_logs = True
+
+  gridpack_exists = hasattr(gen_config.runArgs, 'inputGenConfFile')
+
+  ## print start banner including version numbers
+  log(message=start_banner())
+
+  if not gridpack_exists:
+
+    ## create infile from jobOption commands
+    write_infile(gen_config)
+    # write_infile(run_name, event_generator, seed, commands)
+
+    ## do build/integrate/mergegrids sequence
+    xsec, err = do_build_integrate_mergegrids(gen_config, integration_jobs)
+
+    ## compress infile, runfile and process folder to gridpack tarball
+    do_compress_gridpack(gen_config.run_name, gridpack_name)
+
+    ## display banner and exit
+    log(message=exit_banner(gridpack_name, xsec, err))
+    sys.exit(0)
+
+  else:
+
+    ## unpack the gridpack
+    do_uncompress_gridpack(gen_config.runArgs.inputGenConfFile)
+    athMsgLog.info("Finished unpacking the gridpack")
+
+    ## start the event generation
+    do_run(gen_config, cleanup_herwig_scratch)
+
+
+
+def do_step(step, command, logfile_name=None):
+
+  athMsgLog.info(hw7Utils.ansi_format_info("Starting Herwig7 '{}' step with command '{}'".format(step, ' '.join(command))))
+
+  logfile = open(logfile_name, 'w') if logfile_name else None
+  do = subprocess.Popen(command, stdout=logfile, stderr=logfile)
+  do.wait()
+  if not do.returncode == 0:
+    raise RuntimeError(hw7Utils.ansi_format_error("Some error occured during the '{}' step.".format(step)))
+
+  if logfile:
+    athMsgLog.info("Content of {} log file '{}':".format(step, logfile_name))
+    athMsgLog.info("")
+    with open(logfile_name, 'r') as logfile:
+      for line in logfile:
+        athMsgLog.info('  {}'.format(line.rstrip('\n')))
+    athMsgLog.info("")
+
+
+def do_abort():
+  athMsgLog.info(hw7Utils.ansi_format_info("Doing abort"))
+  sys.exit(0)
+
+
+## Do the read step
+def do_read(gen_config):
+
+  ## print start banner including version numbers
+  log(message=start_banner())
+
+  ## create infile from JobOption object
+  write_infile(gen_config)
+
+  ## copy HerwigDefaults.rpo to the current working directory
+  get_default_repository()
+
+  ## call Herwig7 binary to do the read step
+  share_path = get_share_path()
+  do_step('read', [herwig7_binary, 'read', get_infile_name(gen_config.run_name), '-I', share_path])
+
+
+## Do the build step
+def do_build(gen_config, integration_jobs):
+
+  ## print start banner including version numbers
+  log(message=start_banner())
+
+  ## create infile from JobOption object
+  write_infile(gen_config)
+
+  ## copy HerwigDefaults.rpo to the current working directory
+  get_default_repository()
+
+  ## call the Herwig7 binary to do the build step
+  share_path = get_share_path()
+  do_step('build', [herwig7_binary, 'build', get_infile_name(gen_config.run_name), '-I', share_path, '-y'+str(integration_jobs)])
+
+
+## Do the integrate step for one specific integration job
+## \todo provide info about the range
+def do_integrate(run_name, integration_job):
+
+  runfile_name = get_runfile_name(run_name)
+  # setupfile_name = get_setupfile_name(run_name) if setupfile else None
+
+  integrate_log = run_name+'.integrate'+str(integration_job)+'.log'
+  integrate_command = [herwig7_binary,'integrate',runfile_name,'--jobid='+str(integration_job)]
+  # if setupfile: integrate_command.append('--setupfile='+setupfile_name)
+
+  do_step('integrate', integrate_command, integrate_log)
+
+
+## This function provides the mergegrids step
+def do_mergegrids(run_name, integration_jobs):
+
+  runfile_name = get_runfile_name(run_name)
+  mergegrids_command = [herwig7_mergegrids, runfile_name]
+  # if setupfile_name: mergegrids_command.append('--setupfile='+setupfile_name)
+
+  do_step('mergegrids', mergegrids_command)
+
+  ## calculate the cross section from the integration logfiles and possibly warn about low accuracy
+  xsec, err = hw7Utils.get_cross_section(run_name, integration_jobs)
+
+  return(xsec, err)
+
+
+## Subsequent build, integrate and mergegrid steps
+def do_build_integrate_mergegrids(gen_config, integration_jobs):
+
+  ## run build step
+  do_build(gen_config, integration_jobs)
+
+  ## run integration jobs in parallel subprocesses
+  runfile_name = get_runfile_name(gen_config.run_name)
+  # setupfile_name = get_setupfile_name(run_name) if setupfile else None
+  athMsgLog.info(hw7Utils.ansi_format_info('Starting integration with {} jobs'.format(integration_jobs)))
+
+  integration_procs = []
+  for integration_job in range(integration_jobs):
+    integrate_log = gen_config.run_name+'.integrate'+str(integration_job)+'.log'
+    integrate_command = [herwig7_binary,'integrate',runfile_name,'--jobid='+str(integration_job)]
+    # if setupfile: integrate_command.append('--setupfile='+setupfile_name)
+    integration_procs.append(hw7Utils.Process(integration_job, integrate_command, integrate_log))
+
+  integration_handler = hw7Utils.ProcessHandler(integration_procs, athMsgLog)
+  if not integration_handler.success():
+    raise RuntimeError(hw7Utils.ansi_format_error('Not all of the integration jobs finished successfully'))
+
+  athMsgLog.info(hw7Utils.ansi_format_ok('All integration jobs finished successfully'))
+
+  ## combine the different integration grids
+  xsec, err = do_mergegrids(gen_config.run_name, integration_jobs)
+
+  return(xsec, err)
+
+
+def do_compress_gridpack(run_name, gridpack_name):
+
+  if not (gridpack_name.endswith('.tar.gz') or gridpack_name.endswith('.tgz')): gridpack_name += '.tar.gz'
+  infile_name = get_infile_name(run_name)
+  runfile_name = get_runfile_name(run_name)
+  do_step('compress', ['tar', 'czf', gridpack_name, infile_name, runfile_name, 'Herwig-scratch'])
+
+
+def do_uncompress_gridpack(gridpack_name):
+
+  athMsgLog.info("unpacking gridpack '{}'".format(gridpack_name))
+  do_step('uncompress', ['tar', 'xzf', gridpack_name])
+
+
+## \param[in] cleanup_herwig_scratch Remove `Herwig-scratch` folder after event generation to save disk space
+def do_run(gen_config, cleanup_herwig_scratch=True):
+
+  ## this is necessary to make Herwig aware of the name of the run file
+  gen_config.genSeq.Herwig7.RunFile = get_runfile_name(gen_config.run_name)
+
+  ## overwrite athena's seed for the random number generator
+  if gen_config.runArgs.randomSeed is None:
+    gen_config.genSeq.Herwig7.UseRandomSeedFromGeneratetf = False
+  else:
+    gen_config.genSeq.Herwig7.UseRandomSeedFromGeneratetf = True
+    gen_config.genSeq.Herwig7.RandomSeedFromGeneratetf = gen_config.runArgs.randomSeed
+
+  ## set matrix element PDF name in the Herwig7 C++ class
+  gen_config.genSeq.Herwig7.PDFNameME = gen_config.me_pdf_name
+
+  ## set underlying event PDF name in the Herwig7 C++ class
+  gen_config.genSeq.Herwig7.PDFNameMPI = gen_config.mpi_pdf_name
+
+  ## possibly delete Herwig-scratch folder after finishing the event generation
+  gen_config.genSeq.Herwig7.CleanupHerwigScratch = cleanup_herwig_scratch
+
+  ## don't break out here so that the job options can be finished and the C++
+  ## part of the interface can take over and generate the events
+  athMsgLog.info(hw7Utils.ansi_format_info("Returning to the job options and starting the event generation afterwards"))
+
+
+
+# utility functions -----------------------------------------------------------
+
+
+def herwig_version():
+
+  versions = get_software_versions()
+  return(' '.join(versions[0].split()[1:]))
+
+def thepeg_version():
+
+  versions = get_software_versions()
+  return(' '.join(versions[1].split()[1:]))
+
+def start_banner():
+
+  herwig_version_number = herwig_version()
+  thepeg_version_number = thepeg_version()
+  herwig_version_space = ' '.join(['' for i in range(14-len(herwig_version_number))])
+  thepeg_version_space = ' '.join(['' for i in range(14-len(thepeg_version_number))])
+
+  banner = ''
+  banner += "#####################################\n"
+  banner += "##   {}   ##\n".format(hw7Utils.ansi_format_ok("---------------------------"))
+  banner += "##   {}   ##\n".format(hw7Utils.ansi_format_ok("Starting HERWIG 7 in ATHENA"))
+  banner += "##   {}   ##\n".format(hw7Utils.ansi_format_ok("---------------------------"))
+  banner += "##                                 ##\n"
+  banner += "##   with software versions:       ##\n"
+  banner += "##   - Herwig7:    {}{}   ##\n".format(herwig_version_number, herwig_version_space)
+  banner += "##   - ThePEG:     {}{}   ##\n".format(thepeg_version_number, thepeg_version_space)
+  # banner += "##                                            ##\n"
+  # banner += "##   with depencency versions                 ##\n"
+  # banner += "##   - GoSam\n"
+  # banner += "##     - GoSam-Contrib\n"
+  # banner += "##     - GoSam\n"
+  # banner += "##   - HJets\n"
+  # banner += "##   - MadGraph5_aMC@NLO: \n"
+  # banner += "##   - NJet: \n"
+  # banner += "##   - OpenLoops: \n"
+  # banner += "##   - VBFNLO: \n"
+  banner += "##                                 ##\n"
+  banner += "#####################################\n"
+  return(banner)
+
+
+def get_software_versions():
+
+  return(subprocess.check_output([herwig7_binary,'--version']).splitlines())
+  
+
+def get_infile_name(run_name="Herwig-Matchbox"):
+
+  return('{}.in'.format(run_name))
+
+
+def get_setupfile_name(run_name="Herwig-Matchbox"):
+
+  return('{}.setupfile.in'.format(run_name))
+
+
+def get_runfile_name(run_name="Herwig-Matchbox"):
+
+  return('{}.run'.format(run_name) if not run_name.endswith('.run') else run_name)
+
+
+def write_infile(gen_config, print_infile=True):
+
+  # lock settings to prevent modification from within the job options after infile was written to disk
+  gen_config.default_commands.lock()
+  gen_config.commands.lock()
+
+  infile_name = get_infile_name(gen_config.run_name)
+  if print_infile: athMsgLog.info("")
+  athMsgLog.info(hw7Utils.ansi_format_info("Writing infile '{}'".format(infile_name)))
+  commands = \
+    gen_config.global_pre_commands().splitlines() \
+    + gen_config.local_pre_commands().splitlines() \
+    + ["",
+       "## ================",
+       "## Default Commands",
+       "## ================"] \
+    + str(gen_config.default_commands.commands).splitlines() \
+    + ["",
+       "## ========================",
+       "## Commands from jobOptions",
+       "## ========================"] \
+    + str(gen_config.commands.commands).splitlines() \
+    + gen_config.local_post_commands().splitlines()
+  try:
+    with open(infile_name, 'w') as infile:
+        for command in commands:
+          infile.write(command+'\n')
+  except:
+    raise RuntimeError('Could not write Herwig/Matchbox infile')
+
+  if print_infile:
+    athMsgLog.info("")
+    for command in commands:
+      athMsgLog.info('  {}'.format(command))
+    athMsgLog.info("")
+
+
+def write_setupfile(run_name, commands, print_setupfile=True):
+
+  setupfile_name = get_setupfile_name(run_name)
+
+  if len(commands) > 0:
+    if print_setupfile: athMsgLog.info("")
+    athMsgLog.info("Writing setupfile '{}'".format(setupfile_name))
+    try:
+      with open(setupfile_name, 'w') as setupfile:
+          for command in commands: setupfile.write(command+'\n')
+    except:
+      raise RuntimeError('Could not write Herwig/Matchbox setupfile')
+
+    if print_setupfile:
+      athMsgLog.info("")
+      for command in commands: athMsgLog.info('  {}'.format(command))
+      athMsgLog.info("")
+
+  else:
+    athMsgLog.info("No setupfile commands given.")
+
+
+## \brief Copy default repository `HerwigDefaults.rpo` to current working directory
+##
+def get_default_repository():
+
+  shutil.copy(os.path.join(get_share_path(), 'HerwigDefaults.rpo'), 'HerwigDefaults.rpo')
+
+
+def log(level='info', message=''):
+
+  if level in ['info', 'warn', 'error']:
+    logger = getattr(athMsgLog, level)
+    for line in message.splitlines(): logger(line)
+  else:
+    raise ValueError("Unknown logging level'{}' specified. Possible values are 'info', 'warn' or 'error'".format(level))
+
+
+def exit_banner(gridpack, cross_section, cross_section_error):
+
+  size = hw7Utils.humanize_bytes(hw7Utils.get_size(gridpack))
+  space_size = hw7Utils.get_repeated_pattern(' ', 31-len(size))
+
+  xsec    = '{:f}'.format(cross_section)
+  err     = '{:f}'.format(cross_section_error)
+  rel_err = '{:.2f}'.format(cross_section_error / cross_section * 100.0)
+  space_xsec = hw7Utils.get_repeated_pattern(' ', 37-len(xsec)-len(err)-len(rel_err))
+
+  banner = ''
+  space = ' '.join(['' for i in range(70+4+1-len(gridpack))])
+  banner += "##########################################################################################\n"
+  banner += "##   -------------------------------------------------------------------------------    ##\n"
+  banner += "##   {} (size: {}){} ##\n".format(hw7Utils.ansi_format_ok("HERWIG 7 successfully created the gridpack"), size, space_size)
+  banner += "##                                                                                      ##\n"
+  banner += "##      {}{}      ##\n".format(hw7Utils.ansi_format_info(gridpack), space)
+  banner += "##                                                                                      ##\n"
+  banner += "##   cross section from integration: {} +/- {} ({}%) nb {} ##\n".format(xsec, err, rel_err, space_xsec)
+
+  if cross_section_error / cross_section > hw7Utils.integration_grids_precision_threshold:
+    threshold = '{}%'.format(hw7Utils.integration_grids_precision_threshold*100.0)
+    space_threshold = hw7Utils.get_repeated_pattern(' ', 6-len(threshold))
+    banner += "##                                                                                      ##\n"
+    banner += "##   {}    ##\n".format(hw7Utils.ansi_format_warning("! WARNING: The integration grids only have a low precision (worse than {}){}!".format(threshold, space_threshold)))
+
+  banner += "##                                                                                      ##\n"
+  banner += "##   -------------------------------------------------------------------------------    ##\n"
+  banner += "##                                                                                      ##\n"
+  banner += "##   Please ignore the error                                                            ##\n"
+  banner += "##                                                                                      ##\n"
+  banner += "##      No such file or directory: 'evgen.root' raised while stating file evgen.root    ##\n"
+  banner += "##                                                                                      ##\n"
+  banner += "##########################################################################################\n"
+  return(banner)
diff --git a/Generators/Herwig7_i/python/Herwig7Utils.py b/Generators/Herwig7_i/python/Herwig7Utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..636e825e5a4aed6ea2b1e91cb05786118e80730e
--- /dev/null
+++ b/Generators/Herwig7_i/python/Herwig7Utils.py
@@ -0,0 +1,267 @@
+#! /usr/bin/env python
+
+## \file Herwig7Utils.py
+## \brief Module with helper functions and classes
+## \author Daniel Rauch (daniel.rauch@desy.de)
+
+import math, os, subprocess, time
+
+from AthenaCommon import Logging
+athMsgLog = Logging.logging.getLogger('Herwig7Utils')
+
+integration_grids_precision_threshold = 0.002 # warn if integration xsec below
+
+
+## Class for handling commands to modify the generator configuration
+##
+## The specific purpose of this class is to provide a mechanism for the locking
+## of the generator configuration after the creation of the Herwig7 input file.
+## The input file gets written upon execution of onoe of the run or build
+## functions of the specific generator configuration object. Beyond this point
+## no further modification of the configuration in the job options can be
+## propagated and used in the Herwig7 run.
+class ConfigurationCommands:
+
+  def __init__(self):
+    self.commands = ""
+    self.locked = False
+  
+  def lock(self):
+    self.locked = True
+  
+  def add(self, commands):
+    if self.locked == False:
+      self.commands += commands
+    else:
+      raise RuntimeError("The commands associated to this configuration object can't be modified anymore because the Herwig7 infile has already been written to disk. Therefore, any subsequent additional modifications can't be adopted in the Herwig7 run.")
+    return(self)
+  
+  __iadd__ = add
+
+
+## Class for handling parallel local multi-processing
+##
+## Provides management functionality for waiting for a set of subprocesses
+## to terminate and catch success/failure
+class ProcessHandler:
+
+  def __init__(self, process_list, logger):
+    self.processes = process_list
+    self.n_initial = len(process_list)
+    self.logger = logger
+
+  def success(self):
+    result = True
+    while len(self.processes) > 0:
+      for ID, process in enumerate(self.processes):
+        returncode = process.poll()
+        if not returncode is None:
+
+          ## print exit status and number of pending process
+          self.processes.remove(process)
+          if returncode == 0:
+            athMsgLog.info(ansi_format_info('Process #{} finished sucessfully, {}/{} still running'.format(process.ID, len(self.processes), self.n_initial)))
+          elif returncode > 0:
+            athMsgLog.error(ansi_format_error("Process #{} finished with error code {} (please check logfile '{}'), {}/{} still running".format(process.ID, returncode, process.logfile_title, len(self.processes), self.n_initial)))
+            result = False
+          elif returncode < 0:
+            athMsgLog.error(ansi_format_error("Process #{} was terminated by signal {} (please check logfile '{}'), {}/{} still running".format(process.ID, -returncode, process.logfile_title, len(self.processes), self.n_initial)))
+            result = False
+
+          ## attach integration log to main log file
+          # self.logger.info('================================================================================')
+          # self.logger.info("Including content of integration log file '{}'".format(process.logfile_title))
+          # self.logger.info('================================================================================')
+          athMsgLog.info("Content of integration log file '{}':".format(process.logfile_title))
+          athMsgLog.info("")
+          with open(process.logfile_title, 'r') as logfile:
+            for line in logfile:
+              athMsgLog.info('  {}'.format(line.rstrip('\n')))
+          athMsgLog.info("")
+          # self.logger.info('================================================================================')
+          # self.logger.info("End of integration log file '{}'".format(process.logfile_title))
+          # self.logger.info('================================================================================')
+
+    return(result)
+
+
+## Class for handling a single process
+##
+## This class provides the infrastructure to spawn a new subprocess from python,
+## pipe the output to a logfile and check the status of the subprocess
+class Process:
+
+  def __init__(self, ID, command, logfile_title):
+
+    athMsgLog.info(ansi_format_info("Starting subprocess #{} with command '{}' and logfile '{}'".format(ID, ' '.join(command), logfile_title)))
+    self.ID = ID
+    self.logfile_title = logfile_title
+    self.logfile = open(logfile_title, 'w')
+    self.process = subprocess.Popen(command, stdout=self.logfile, stderr=self.logfile)
+
+  def poll(self):
+    return(self.process.poll())
+
+
+## Calculate the total cross section from the integration log files
+def get_cross_section(run_name, integration_jobs=1):
+
+  athMsgLog.info("Calculating cross section after integration")
+  logfiles = [run_name+'.integrate'+str(integration_job)+'.log' for integration_job in range(integration_jobs)]
+
+  xsec = 0.0
+  err  = 0.0
+
+  for logfile in logfiles:
+
+    athMsgLog.info("- {}".format(logfile))
+
+    ## entire file content
+    with open(logfile, 'r') as log: data = log.read().strip()
+
+    with open(logfile, 'r') as log:
+
+      ## get number of subprocesses that are integrated
+      for line in log:
+        if 'Integrate ' in line:
+          n_subprocs = int(line.split('of')[1].replace(':',''))
+          athMsgLog.info("  found {} subprocesses".format(n_subprocs))
+          break
+
+    data = data.split("Integrate ")[1:]
+  
+    for s, subproc in enumerate(data, start=1):
+      _xsec = 0.0
+      _err  = 0.0
+      for line in subproc.split("\n"):
+        if 'integrated ( ' in line:
+          _xsec = float(line.split()[2])
+          _err = float(line.split()[4])
+      athMsgLog.info("  - subprocess {}: xsec = {} +/- {} nb".format(s, _xsec, _err))
+      xsec += _xsec
+      err  += _err*_err
+
+  err = math.sqrt(err)
+
+  if err / xsec > integration_grids_precision_threshold:
+    threshold = '{}%'.format(integration_grids_precision_threshold*100.0)
+    athMsgLog.warn(ansi_format_warning('! WARNING: The integration grids only have a low precision (worse than {}): xsec = {} +/- {} nb (accuracy: {:.3f}%)'.format(threshold, xsec, err, err/xsec*100.0)))
+  else:
+    athMsgLog.info(ansi_format_info('After integration the estimated cross section was found to be: xsec = {} +/- {} nb (accuracy: {:.3f}%)'.format(xsec, err, err/xsec*100.0)))
+
+  return(xsec, err)
+
+
+## Return a string made up of a certain number of repetitions of the same pattern
+def get_repeated_pattern(pattern, repetitions):
+
+  return(pattern.join(['' for i in range(repetitions+1)]))
+
+
+## Get size of file or folder
+def get_size(path):
+
+  size = 0
+  
+  if os.path.isfile(path):
+    return(os.path.getsize(path))
+
+  elif os.path.isdir(path):
+    for dirpath, dirs, files in os.walk(path):
+      for file in files:
+        file_path = os.path.join(dirpath, file)
+        # if not os.path.islink(file_path): # exclude symlinks because MadGraph has lots of broken symlinks
+        if os.path.isfile(file_path):
+          size += os.path.getsize(file_path)
+
+  return(size)
+
+
+## Convert file/folder size from bytes to units with appropriate prefixes (multiples of 1000, not 1024!)
+def humanize_bytes(bytes, precision=2):
+  # shamelessly stolen from
+  # http://code.activestate.com/recipes/577081-humanized-representation-of-a-number-of-bytes/
+
+  abbrevs = (
+      (1<<50L, 'PiB'),
+      (1<<40L, 'TiB'),
+      (1<<30L, 'GiB'),
+      (1<<20L, 'MiB'),
+      (1<<10L, 'KiB'),
+      (1, 'byte(s)')
+  )
+  if bytes == 1:
+    return '1 byte'
+  for factor, suffix in abbrevs:
+    if bytes >= factor:
+      break
+  return '%.*f %s' % (precision, bytes / factor, suffix)
+
+
+## Format and colorize terminal output.
+def ansi_format(text, colour='None', background_colour='None',
+           bold=False, underline=False, italics=False, marked=False, strikethrough=False):
+
+  format_none          = '\033[0m'
+  format_bold          = '\033[1m'
+  format_underline     = '\033[4m'
+  format_italics       = '\033[3m'
+  format_marked        = '\033[7m'
+  format_strikethrough = '\033[9m'
+
+  colours = {
+    'None': '',
+    'Black':     '\033[30m',
+    'Grey':      '\033[90m',
+    'Red':       '\033[91m', 'DarkRed':   '\033[31m',
+    'Green':     '\033[92m', 'DarkGreen': '\033[32m',
+    'Yellow':    '\033[93m', 'Orange':    '\033[33m',
+    'Blue':      '\033[94m', 'DarkBlue':  '\033[34m',
+    'Pink':      '\033[95m', 'DarkPink':  '\033[35m',
+    'Cyan':      '\033[96m', 'DarkCyan':  '\033[36m',
+    'White':     '\033[97m', 'LightGrey': '\033[37m',
+  }
+
+  background_colours = {
+    'None': '',
+    'Black':  '\033[40m',
+    'Red':    '\033[41m',
+    'Green':  '\033[42m',
+    'Orange': '\033[43m',
+    'Blue':   '\033[44m',
+    'Punk':   '\033[45m',
+    'Cyan':   '\033[46m',
+    'Grey':   '\033[47m',
+  }
+
+  if colour in colours:
+    if background_colour in background_colours:
+      return (format_none
+        + colours[colour]
+        + background_colours[background_colour]
+        + (format_bold          if bold          else '')
+        + (format_underline     if underline     else '')
+        + (format_italics       if italics       else '')
+        + (format_marked        if marked        else '')
+        + (format_strikethrough if strikethrough else '')
+        + text + format_none)
+    else:
+      raise Exception("Could not find background colour '{}'.".format(background_colour))
+  else:
+    raise Exception("Could not find colour '{}'.".format(colour))
+
+## Green colouring
+def ansi_format_ok(text):
+  return (ansi_format(text, "Green"))
+
+## Blue colouring
+def ansi_format_info(text):
+  return (ansi_format(text, "Blue"))
+
+## Yellow colouring
+def ansi_format_warning(text):
+  return (ansi_format(text, "Yellow"))
+
+## Red colouring
+def ansi_format_error(text):
+  return (ansi_format(text, "Red"))
diff --git a/Generators/Herwigpp_i/doc/packagedoc.h b/Generators/Herwigpp_i/doc/packagedoc.h
index 2a5d88d9ae06c1aeae5a980f8f1413e3e5642cac..d7137e25d3c2b3c9c31f9fdc868fb8df49cc67fb 100644
--- a/Generators/Herwigpp_i/doc/packagedoc.h
+++ b/Generators/Herwigpp_i/doc/packagedoc.h
@@ -18,15 +18,6 @@ Athena interface for Herwig++ was written by Andy Buckley and is available
 since rel.14.
 
 
-@ref used_MyPackage
 
-@ref requirements_MyPackage
 
 */
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
diff --git a/Generators/HforTool/CMakeLists.txt b/Generators/HforTool/CMakeLists.txt
index 09afa42fff3d48da3eb669d19a3e977e71a0a068..267ec0bdf5678159f23e3599587e8ecb359ae1a2 100644
--- a/Generators/HforTool/CMakeLists.txt
+++ b/Generators/HforTool/CMakeLists.txt
@@ -13,8 +13,9 @@ atlas_depends_on_subdirs( PUBLIC
                           Reconstruction/Jet/JetEvent
                           PRIVATE
                           Control/StoreGate
+                          Generators/TruthUtils
                           Generators/GeneratorObjects
-                          Generators/TruthUtils )
+                          Generators/GenInterfaces )
 
 # External dependencies:
 find_package( HepMC )
@@ -27,12 +28,6 @@ atlas_add_component( HforTool
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps EventInfo GaudiKernel JetEvent StoreGateLib SGtests GeneratorObjects TruthUtils )
 
-atlas_add_dictionary( HforToolDict
-                      HforTool/HforToolDict.h
-                      HforTool/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps EventInfo GaudiKernel JetEvent StoreGateLib SGtests GeneratorObjects TruthUtils )
-
 # Install files from the package:
 atlas_install_headers( HforTool )
 
diff --git a/Generators/HforTool/HforTool/HforTool.h b/Generators/HforTool/HforTool/HforTool.h
index 85b581adb3577950da61df57a2cf08968ec77333..c5fd22caa2006be349672e2d7bba9b95edfc61e4 100644
--- a/Generators/HforTool/HforTool/HforTool.h
+++ b/Generators/HforTool/HforTool/HforTool.h
@@ -5,7 +5,7 @@
 #ifndef HFORTOOL_H
 #define HFORTOOL_H
 
-#include "HforTool/IHforTool.h"
+#include "GenInterfaces/IHforTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 
 #include "HepMC/GenEvent.h"
diff --git a/Generators/HforTool/HforTool/HforToolDict.h b/Generators/HforTool/HforTool/HforToolDict.h
deleted file mode 100644
index 8b1544b2e86780ce26e036b04a42b6c1b258b98a..0000000000000000000000000000000000000000
--- a/Generators/HforTool/HforTool/HforToolDict.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef TRUTHUTILS_DICT_H
-#define TRUTHUTILS_DICT_H
-
-#include "HforTool/IHforTool.h"
-#include "HepMC/SimpleVector.h"
-
-namespace HforToolDict {
-  struct tmp {
-    std::vector<HepMC::FourVector> v;
-  };
-}
-
-#endif
diff --git a/Generators/HforTool/HforTool/selection.xml b/Generators/HforTool/HforTool/selection.xml
deleted file mode 100644
index f4151dfcc820adf2e2ea5bf87109d6e1bc945de3..0000000000000000000000000000000000000000
--- a/Generators/HforTool/HforTool/selection.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<lcgdict>
- <class name="IHforTool"/>
- <class name="std::vector<HepMC::FourVector>"/>
-</lcgdict>
diff --git a/Generators/Photos_i/doc/packagedoc.h b/Generators/Photos_i/doc/packagedoc.h
index 68f4f754be3252abf2ae2b71adec4df6545aaca6..adc5399484a8e94f2ae7046adb0952142f928056 100644
--- a/Generators/Photos_i/doc/packagedoc.h
+++ b/Generators/Photos_i/doc/packagedoc.h
@@ -23,4 +23,3 @@ Borut Paul Kersevan, Elzbieta Richter-Was
 
 
 */
-
diff --git a/Generators/Pythia_i/doc/packagedoc.h b/Generators/Pythia_i/doc/packagedoc.h
index ec8fe411b50ca7b7934a23a6b55c610ebab626ae..8e0ead5591dec579f7baa80415e19c2ed0c1208c 100644
--- a/Generators/Pythia_i/doc/packagedoc.h
+++ b/Generators/Pythia_i/doc/packagedoc.h
@@ -224,11 +224,3 @@ of the Generators/Lhapdf_i package for the LHAPDF set/member index settings).
 
 
 */
-
-/**
-@page usedPythia_i Used Packages
-*/
-
-/**
-@page requirementsPythia_i Requirements
-*/
diff --git a/HLT/Event/ByteStreamEmonSvc/cmt/requirements b/HLT/Event/ByteStreamEmonSvc/cmt/requirements
deleted file mode 100644
index 7f1ebef0d1e6e1692467dde727ad839d9c63d7de..0000000000000000000000000000000000000000
--- a/HLT/Event/ByteStreamEmonSvc/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package ByteStreamEmonSvc
-
-author Reiner Hauser <Reiner.Hauser@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use ByteStreamData      ByteStreamData-*                Event
-use DataCollection      DataCollection-*                External
-use GaudiInterface      GaudiInterface-*                External
-use ByteStreamCnvSvc    ByteStreamCnvSvc-*              Event
-use AtlasBoost          AtlasBoost-*                    External
-use HLTtdaq             HLTtdaq-*                       HLT/HLTExternal
-
-private
-use EventInfo           EventInfo-*                     Event
-use StoreGate           StoreGate-*                     Control
-use ByteStreamCnvSvcBase ByteStreamCnvSvcBase-*         Event
-use PersistentDataModel PersistentDataModel-*           Database
-end_private
-
-macro_append ByteStreamEmonSvc_shlibflags "-lemon -lohroot"
-
-apply_pattern dual_use_library files="ByteStreamEmonInputSvc.cxx"
-apply_pattern declare_joboptions files="*.py"
-
-
diff --git a/HLT/HLTTestApps/cmt/requirements b/HLT/HLTTestApps/cmt/requirements
deleted file mode 100755
index b8ee917024613f174e5841120ccdf60eb19bd3c0..0000000000000000000000000000000000000000
--- a/HLT/HLTTestApps/cmt/requirements
+++ /dev/null
@@ -1,53 +0,0 @@
-package HLTTestApps 
-author  andre.dos.anjos@cern.ch,ricardo.abreu@cern.ch
-manager andre.dos.anjos@cern.ch,ricardo.abreu@cern.ch,werner.wiedenmann@cern.ch
-
-public
-
-use AtlasPolicy           AtlasPolicy-*            
-use DataCollection        DataCollection-*         External
-
-private
-use AtlasBoost            AtlasBoost-*             External
-use AtlasPython           AtlasPython-*            External
-use GaudiInterface        GaudiInterface-*         External
-use HLTtdaq               HLTtdaq-*                HLT/HLTExternal
-use HLTtdaqcommon         HLTtdaqcommon-*          HLT/HLTExternal
-use TrigT1Result          TrigT1Result-*           Trigger/TrigT1
-use StoreGate             StoreGate-*              Control
-use CTPfragment           v*
-
-# Remove to avoid compiler warning
-macro_remove_regexp AtlasCxxPolicy_pp_cppflags "'-DPACKAGE_VERSION=.*'"
-
-# Build and install the python bindings in $CMTCONFIG/lib/$Python_version
-
-library pyhlttestapps "../src/*.cxx"
-apply_pattern named_installed_library library=pyhlttestapps
-
-apply_pattern generic_declare_for_link kind=python_libs1 \
-        files='-s=../$(CMTCONFIG) libpyhlttestapps.so' \
-        prefix=$(CMTCONFIG)/lib/python$(Python_version) \
-        name=pyhlttestapps
-        
-apply_pattern declare_python_modules files="HLTTestApps/*.py HLTTestApps/plugins"
-apply_pattern declare_scripts files="../python/scripts/*.py ../python/scripts/*.sh"
-
-macro_append install_pyhlttestappspython_libs1_dependencies " pyhlttestapps "
-
-# CMAKE hacks
-apply_pattern cmake_add_command command="find_package( Boost COMPONENTS filesystem thread system python )"
-apply_pattern cmake_add_command command="find_package( tdaq-common COMPONENTS CTPfragment hltinterface pyeformat_util )"
-apply_pattern cmake_add_command command="find_package( tdaq COMPONENTS dynlibs owl ipc )"
-
-# ATTENTION: Here there is some tricky bussiness with the linkage. TDAQ
-# projects use the libboost-*-mt.so variants and Offline don't. This causes
-# some problems with the rvalue converter tables in Boost.Python because both
-# versions of the libray contain the tables, the bindings can easily get lost.
-# To overcome this, I removed the linkage options in the line bellow. DON'T
-# PUT THEM BACK UNLESS YOU UNDERSTAND WHAT YOU ARE DOING. This way, we use the
-# TDAQ problem libboost-*-mt.so libraries (indirectly through libpyeformat_util
-# and should be in peace with it.
-#
-macro_append pyhlttestapps_shlibflags " $(HLTtdaq_linkopts) $(HLTtdaqcommon_linkopts) -lGaudiKernel -lStoreGate -lTrigT1Result -lCTPfragment -lhltinterface -lpyeformat_util -ldynlibs -lowl -lipc"
-
diff --git a/HLT/HLToks/cmt/requirements b/HLT/HLToks/cmt/requirements
deleted file mode 100755
index 64c3c0164f0b59a5b35f57bcd5b81904b979623a..0000000000000000000000000000000000000000
--- a/HLT/HLToks/cmt/requirements
+++ /dev/null
@@ -1,47 +0,0 @@
-package HLToks
-
-author Frank Winklmeier
-
-use AtlasPolicy    AtlasPolicy-* 
-use HLTtdaq        HLTtdaq-*           HLT/HLTExternal
-use HLTUtils       HLTUtils-*          HLT
-
-#
-# Create HLT-Environment and HLT_SW_Repository
-#
-action generate-hlt-environment   \
-        "mkdir -p $(bin)/daq/segments; \
-        cd ${HLTOKSROOT}/${BINDIR}/daq/segments/; \
-        ${HLTUTILSROOT}/share/make_hlt_env.py HLT-Environment.data.xml"
-
-action generate-hlt-sw-repository \
-        "mkdir -p $(bin)/daq/sw; cd $(bin)/daq/sw; \
-         /usr/bin/env TDAQ_DB_PATH=${HLTOKSROOT}/${BINDIR}:${TDAQ_DB_PATH}:${tdaq_home}/installed/databases ${HLTUTILSROOT}/share/make_hlt_rep.py; \
-         /usr/bin/env TDAQ_DB_PATH=${HLTOKSROOT}/${BINDIR}:${TDAQ_DB_PATH}:${tdaq_home}/installed/databases ${HLTUTILSROOT}/share/make_coralServer_rep.py"
-
-#
-# Create symlinks in InstallArea
-# HLT-Environment is platform specific, HLT_SW_Repository is not
-#
-apply_pattern generic_declare_for_link kind="repo" \
-        files="-s=$(bin)/daq/sw HLT_SW_Repository.data.xml CoralServer-repository.data.xml" \
-        prefix="share/data/daq/sw"
-
-apply_pattern generic_declare_for_link kind="env" \
-        files="-s=$(bin)/daq/segments HLT-Environment.data.xml" \
-        prefix="${CMTCONFIG}/data/daq/segments/"
-
-#
-# Dependencies
-#
-macro_append constituents ' generate-hlt-environment generate-hlt-sw-repository'
-macro_append generate-hlt-sw-repository_dependencies ' generate-hlt-environment'
-macro_append install_repo_dependencies ' generate-hlt-sw-repository'
-macro_append install_env_dependencies ' generate-hlt-environment'
-
-private
-
-# Executed by release copy scripts and kit installation
-macro post_install_script "${HLTUTILSROOT}/share/hlt_postinstall.sh"
-
-path HLT_INST_PATH ${CMTINSTALLAREA}
diff --git a/HLT/Services/JiveXMLServer/cmt/requirements b/HLT/Services/JiveXMLServer/cmt/requirements
deleted file mode 100644
index 4d5c5964fe50cf436aea6dbe951af78709c92bb2..0000000000000000000000000000000000000000
--- a/HLT/Services/JiveXMLServer/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package JiveXMLServer
-
-author Sebastian Boeser <sboeser@hep.ucl.ac.uk>
-
-
-use AtlasPolicy         AtlasPolicy-*                                                               
-use HLTtdaq             HLTtdaq-*          HLT/HLTExternal                                    
-use GaudiInterface      GaudiInterface-*   External
-use JiveXML             JiveXML-*          graphics
-                                                                                                    
-private
-
-# Remove to avoid compiler warning
-macro_remove_regexp AtlasCxxPolicy_pp_cppflags "'-DPACKAGE_VERSION=.*'"
-
-library      JiveXMLServer -s=../src *.cxx 
-apply_pattern installed_library
-
-macro_append JiveXMLServer_linkopts " -lers -lipc -lcmdline " 
-
-macro   jivexmlserverlinkopts " -lJiveXMLServer "
-macro   jivexmlserver_dependencies " JiveXMLServer "
-application  jivexmlserver -s=../bin jivexmlserver.cc
-
-
diff --git a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/cmt/requirements b/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/cmt/requirements
deleted file mode 100644
index 2cf53b6ba1b85181be94f404cafd5d34c40b17db..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigConfiguration/TrigConf2COOLOnline/cmt/requirements
+++ /dev/null
@@ -1,53 +0,0 @@
-# $Revision: 1.2 $
-
-package TrigConf2COOLOnline
-
-author  Joerg.Stelzer@cern.ch
-
-use  AtlasHLTPolicy             AtlasHLTPolicy-*     HLT 
-use  HLTtdaq	                HLTtdaq-*            HLT/HLTExternal
-
-private
-#use  HLTPUDal                   HLTPUDal-*           
-use  AtlasCOOL                  AtlasCOOL-*          External
-use  AtlasBoost                 AtlasBoost-*         External
-use  TrigConfL1Data             TrigConfL1Data-*     Trigger/TrigConfiguration
-use  TrigConfHLTData            TrigConfHLTData-*    Trigger/TrigConfiguration
-use  TrigConfStorage            TrigConfStorage-*    Trigger/TrigConfiguration
-
-
-
-# Remove to avoid compiler warning
-macro_remove_regexp AtlasCxxPolicy_pp_cppflags "'-DPACKAGE_VERSION=.*'"
-
-library TrigConf2COOLOnline *.cxx
-
-apply_pattern linked_library
-
-apply_tag NEEDS_CORAL_BASE
-apply_tag NEEDS_COOL_FACTORY
-
-application   TrigConf2CoolOnline   TrigConf2CoolOnline.cxx
-
-macro TrigConf2COOLOnline_dependencies " is_conf "
-
-macro TrigConf2CoolOnline_dependencies " TrigConf2COOLOnline "
-
-macro TrigConf2CoolOnlinelinkopts   "-ldaq-hlt-dal -lrc_CmdLine -lrc_ItemCtrl -lers -lTrigConf2COOLOnline $(Boost_linkopts_program_options)"
-
-action is_conf "is_generator.sh -d ../TrigConf2COOLOnline --cpp -n ../schema/is_trigconf_hlt.schema.xml ../schema/is_trigconf_l1.schema.xml "
-action is_confcln "rm -f ../TrigConf2COOLOnline/TrigConfHlt*.h"
-
-declare_hlt_db_schema files="../schema/is_trigconf_hlt.schema.xml" 
-
-private
-
-set JAVA_HOME $(java_home_linux)
-
-# until checkreq is fixed to translate RunControl to HLTtdaq
-
-#action checkreq "checkreq.py -i 3 -n"
-
-# disable it completely
-action checkreq "true"
-
diff --git a/HLT/Trigger/TrigControl/TrigCommon/cmt/requirements b/HLT/Trigger/TrigControl/TrigCommon/cmt/requirements
deleted file mode 100755
index 2eadbfafb77837ceab6b06b9091169bc19ff6844..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigControl/TrigCommon/cmt/requirements
+++ /dev/null
@@ -1,9 +0,0 @@
-package TrigCommon
-
-author Werner Wiedenmann <Werner.Wiedenmann@cern.ch>
-
-use AtlasPolicy    AtlasPolicy-* 
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
-
diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExL2muCalibTest/cmt/requirements b/HLT/Trigger/TrigControl/TrigExamples/TrigExL2muCalibTest/cmt/requirements
deleted file mode 100755
index d655f8bad734ca538c822507aeeca50090c98ec1..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigControl/TrigExamples/TrigExL2muCalibTest/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigExL2muCalibTest
-
-author Werner Wiedenmann <Werner.Wiedenmann@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  EventInfo                  EventInfo-*                     Event
-use  GaudiInterface             GaudiInterface-*                External
-use  TrigNavigation        	TrigNavigation-*        	Trigger/TrigEvent
-
-private
-use  StoreGate                  StoreGate-*                     Control
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigHLTResultByteStream 	TrigHLTResultByteStream-* 	Trigger/TrigSteer
-use ByteStreamCnvSvcBase        ByteStreamCnvSvcBase-*          Event
-use  xAODTrigger             	xAODTrigger-*                	Event/xAOD
-end_private
-
-library TrigExL2muCalibTest *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-
-private
diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExMTHelloWorld/cmt/requirements b/HLT/Trigger/TrigControl/TrigExamples/TrigExMTHelloWorld/cmt/requirements
deleted file mode 100755
index 19b2f8dc03635327e857276e58f5098e833036b5..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigControl/TrigExamples/TrigExMTHelloWorld/cmt/requirements
+++ /dev/null
@@ -1,16 +0,0 @@
-package TrigExMTHelloWorld
-
-author Werner Wiedenmann <Werner.Wiedenmann@cern.ch>
-author Frank Winklmeier <frank.winklmeier@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-
-library TrigExMTHelloWorld *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-
-private
-use  GaudiInterface             GaudiInterface-*                External
diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExMTHelloWorldLvl1/cmt/requirements b/HLT/Trigger/TrigControl/TrigExamples/TrigExMTHelloWorldLvl1/cmt/requirements
deleted file mode 100755
index 9ee3b7bf3a142d7e6031f045f109f4cd48fcb759..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigControl/TrigExamples/TrigExMTHelloWorldLvl1/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-package TrigExMTHelloWorldLvl1
-
-author Paolo Calafiura <Paolo.Calafiura@cern.ch>
-author Werner Wiedenmann <Werner.Wiedenmann@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-private
-use  ByteStreamCnvSvcBase       ByteStreamCnvSvcBase-*          Event
-use  ByteStreamData             ByteStreamData-*                Event
-use  GaudiInterface             GaudiInterface-*                External
-use  StoreGate                  StoreGate-*                     Control
-use  TrigT1Result               TrigT1Result-*                  Trigger/TrigT1
-end_private
-
-library TrigExMTHelloWorldLvl1 *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-
-
diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExMTHistNtup/cmt/requirements b/HLT/Trigger/TrigControl/TrigExamples/TrigExMTHistNtup/cmt/requirements
deleted file mode 100755
index 35a3c1518704fda3c72a9a227ddcc83d094d4e73..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigControl/TrigExamples/TrigExMTHistNtup/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package TrigExMTHistNtup
-author Tomasz Bold <Tomasz.Bold@cern.ch>
-author Werner Wiedenmann <Werner.Wiedenmann@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-private
-use  AtlasAIDA                  AtlasAIDA-*                     External
-use  AtlasROOT                  AtlasROOT-*                     External
-use  EventInfo                  EventInfo-*                     Event
-use  GaudiInterface             GaudiInterface-*                External
-use  StoreGate                  StoreGate-*                     Control
-use  TrigMonitorBase            TrigMonitorBase-*               Trigger/TrigMonitoring
-end_private
-
-
-library TrigExMTHistNtup *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py entries.C"
diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/cmt/requirements b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/cmt/requirements
deleted file mode 100644
index 480f4972458b415fa2700aa05f418799529d8520..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigExPartialEB
-
-author W. Wiedenmann  <Werner.Wiedenmann@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  DataCollection             DataCollection-*                External
-use  EventInfo                  EventInfo-*                     Event
-use  GaudiInterface             GaudiInterface-*                External
-use  TrigROBDataProviderSvc     TrigROBDataProviderSvc-*        Trigger/TrigDataAccess
-private
-use  AthenaKernel               AthenaKernel-*                  Control
-use  AtlasBoost                 AtlasBoost-*                    External
-use  ByteStreamCnvSvcBase       ByteStreamCnvSvcBase-*          Event
-use  StoreGate                  StoreGate-*                     Control
-use  TrigDataAccessMonitoring   TrigDataAccessMonitoring-*      Trigger/TrigDataAccess
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigT1Result               TrigT1Result-*                  Trigger/TrigT1
-end_private
-
-
-library TrigExPartialEB *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
diff --git a/HLT/Trigger/TrigControl/TrigKernel/cmt/requirements b/HLT/Trigger/TrigControl/TrigKernel/cmt/requirements
deleted file mode 100644
index bfe8f780cba94d0fb744cea77daabd15949144cc..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigControl/TrigKernel/cmt/requirements
+++ /dev/null
@@ -1,15 +0,0 @@
-package TrigKernel
-
-author W. Wiedenmann  <Werner.Wiedenmann@cern.ch>
-author Ricardo Abreu  <Ricardo.Abreu@cern.ch>
-
-public
-use AtlasPolicy           AtlasPolicy-*
-use GaudiInterface        GaudiInterface-*         External
-use DataCollection        DataCollection-*         External
-use AtlasBoost            AtlasBoost-*             External
-use HLTtdaq               HLTtdaq-*                HLT/HLTExternal
-
-library TrigKernel *.cxx
-apply_pattern installed_library
-
diff --git a/HLT/Trigger/TrigControl/TrigPSC/cmt/requirements b/HLT/Trigger/TrigControl/TrigPSC/cmt/requirements
deleted file mode 100644
index e8a78d6aed530c13182c6e672462fa071543214a..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigControl/TrigPSC/cmt/requirements
+++ /dev/null
@@ -1,30 +0,0 @@
-package TrigPSC
-
-author Frank Winklmeier  <frank.winklmeier@cern.ch>
-author Ricardo Abreu     <Ricardo.Abreu@cern.ch>
-
-public
-
-use AtlasPolicy         AtlasPolicy-*
-use AtlasBoost          AtlasBoost-*             External
-use DataCollection      DataCollection-*         External
-use GaudiInterface      GaudiInterface-*         External
-use HLTtdaqcommon       HLTtdaqcommon-*          HLT/HLTExternal
-
-library TrigPSC *.cxx
-apply_pattern linked_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-private
-use AtlasPython         AtlasPython-*            External
-use PathResolver        PathResolver-*           Tools
-use TrigKernel          TrigKernel-*             HLT/Trigger/TrigControl
-use TrigConfBase        TrigConfBase-*           Trigger/TrigConfiguration
-use RDBAccessSvc        RDBAccessSvc-*           Database/AthenaPOOL
-use AtlasCORAL          AtlasCORAL-*             External
-
-# use online libraries
-macro_append TrigPSC_linkopts " -lers -leformat -leformat_write -lhltinterface "
-
diff --git a/HLT/Trigger/TrigControl/TrigPython/cmt/requirements b/HLT/Trigger/TrigControl/TrigPython/cmt/requirements
deleted file mode 100644
index 68bfb06c6ed4046a03add4351d27b79ab62322ab..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigControl/TrigPython/cmt/requirements
+++ /dev/null
@@ -1,17 +0,0 @@
-package TrigPython
-
-author Frank Winklmeier   <frank.winklmeier@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-
-# dictionary creation
-private
-use AtlasReflex   AtlasReflex-*   External
-# Package dependencies for dictionary generation
-use TrigKernel            TrigKernel-*             HLT/Trigger/TrigControl
-
-apply_pattern lcgdict dict=TrigPython \
-    selectionfile=selection.xml \
-    headerfiles="../TrigPython/TrigPythonDict.h"
-end_private
-
diff --git a/HLT/Trigger/TrigControl/TrigServices/cmt/requirements b/HLT/Trigger/TrigControl/TrigServices/cmt/requirements
deleted file mode 100755
index 48161de2595a4ca6cbe23d18d525c66fdf499f3d..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigControl/TrigServices/cmt/requirements
+++ /dev/null
@@ -1,49 +0,0 @@
-package TrigServices
-
-author W. Wiedenmann     <Werner.Wiedenmann@cern.ch>
-author Frank Winklmeier  <Frank.Winklmeier@cern.ch>
-author Ricardo Abreu     <Ricardo.Abreu@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-use GaudiInterface        GaudiInterface-*         External
-use AthenaKernel          AthenaKernel-*           Control
-use StoreGate             StoreGate-*              Control
-use TrigKernel            TrigKernel-*             HLT/Trigger/TrigControl
-use EventInfo             EventInfo-*              Event
-use xAODEventInfo         xAODEventInfo-*          Event/xAOD
-use AthenaBaseComps       AthenaBaseComps-*        Control
-use TrigSteeringEvent     TrigSteeringEvent-*      Trigger/TrigEvent
-use TrigDataAccessMonitoring  TrigDataAccessMonitoring-*  Trigger/TrigDataAccess
-use TrigROBDataProviderSvc    TrigROBDataProviderSvc-*    Trigger/TrigDataAccess
-use ByteStreamCnvSvcBase  ByteStreamCnvSvcBase-*   Event
-use ByteStreamData        ByteStreamData-*         Event
-use DataCollection        DataCollection-*         External
-use HLTtdaq               HLTtdaq-*                HLT/HLTExternal
-use HLTtdaqcommon         HLTtdaqcommon-*          HLT/HLTExternal
-
-private
-use AtlasBoost            AtlasBoost-*             External
-use AtlasROOT             AtlasROOT-*              External
-use AtlasCORAL            AtlasCORAL-*             External
-use AthenaPoolUtilities   AthenaPoolUtilities-*    Database/AthenaPOOL
-use TrigInterfaces        TrigInterfaces-*         Trigger/TrigSteer
-use TrigConfInterfaces    TrigConfInterfaces-*     Trigger/TrigConfiguration
-use TrigMonitorBase       TrigMonitorBase-*        Trigger/TrigMonitoring
-use TrigNavigation        TrigNavigation-*         Trigger/TrigEvent
-use CLIDSvc               CLIDSvc-*                Control
-use CTPfragment           *
-end_private
-
-apply_pattern dual_use_library files="*.cxx"
-
-apply_pattern declare_joboptions files="*.py"
-
-apply_pattern declare_python_modules files="*.py"
-
-#--- leave this as public
-macro_append TrigServices_linkopts \
-             " $(HLTtdaq_linkopts) -lers -leformat -leformat_write "
-
-private
-macro_append TrigServices_linkopts " $(Boost_linkopts) $(Boost_linkopts_regex) "
-macro_append TrigServices_linkopts " $(HLTtdaq_linkopts) -lhltinterface -lCTPfragment -lomniORB4 -lomnithread -lipc -lis -lowl "
diff --git a/HLT/Trigger/TrigMonitoring/HLTRates2COOL/cmt/requirements b/HLT/Trigger/TrigMonitoring/HLTRates2COOL/cmt/requirements
deleted file mode 100644
index 017629d4c17498acc8f13b1e6738151788aef785..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigMonitoring/HLTRates2COOL/cmt/requirements
+++ /dev/null
@@ -1,49 +0,0 @@
-# $Revision: 1.7 $
-
-package HLTRates2COOL
-
-author  Joerg Stelzer     stelzer@cern.ch
-
-#use OnlinePolicy # This one doesn't produce the executables in the install area.
-use  AtlasPolicy                AtlasPolicy-*
-use  AtlasROOT                  AtlasROOT-*                     External
-use  AtlasCOOL                  AtlasCOOL-*                     External
-use  HLTtdaq		            HLTtdaq-*                       HLT/HLTExternal
-
-private
-use  AtlasBoost                 AtlasBoost-*                    External
-use  AtlasCORAL                 AtlasCORAL-*                    External
-
-# Remove to avoid compiler warning
-macro_remove_regexp AtlasCxxPolicy_pp_cppflags "'-DPACKAGE_VERSION=.*'"
-
-macro LcgLibs " -llcg_CoolApplication "
-
-library HLTRates2COOL *.cxx
-apply_pattern installed_library
-
-apply_tag NEEDS_CORAL_BASE
-apply_tag NEEDS_COOL_FACTORY
-
-application  HLTCountsArchiver                  test/HLTCountsArchiver.cxx
-macro        HLTCountsArchiver_dependencies     HLTRates2COOL
-macro	     HLTCountsArchiver_cppflags         " $(LcgIncludes) "
-macro        HLTCountsArchiverlinkopts          " $(LcgLibs) -lrc_CmdLine -lrc_ItemCtrl -lohroot -lers -lcmdline -lHLTRates2COOL $(Boost_linkopts_program_options) "
-
-application  testHLTtoCOOL                      test/testHLTtoCOOL.cxx
-macro        testHLTtoCOOL_dependencies         HLTRates2COOL
-macro	     testHLTtoCOOL_cppflags             " $(LcgIncludes) "
-macro        testHLTtoCOOLlinkopts              " $(LcgLibs) -lohroot -lers -lcmdline -lHLTRates2COOL "
-
-application  HLTRatesFromCOOL                   test/HLTRatesFromCOOL.cxx
-macro        HLTRatesFromCOOL_dependencies      HLTRates2COOL
-macro	     HLTRatesFromCOOL_cppflags          " $(LcgIncludes) "
-macro        HLTRatesFromCOOLlinkopts           " $(LcgLibs) -lohroot -lers -lcmdline -lHLTRates2COOL $(Boost_linkopts_program_options) "
-
-# until checkreq is fixed to translate RunControl to HLTtdaq
-
-#action checkreq "checkreq.py -i 3 -n"
-
-# disable it completely
-action checkreq "true"
-
diff --git a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/cmt/requirements b/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/cmt/requirements
deleted file mode 100644
index e8ee7876049a62c1ce16147fb4c4eea85118996d..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigMonitoring/TrigOnlineMonitor/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package TrigOnlineMonitor
-
-author W. Wiedenmann  <Werner.Wiedenmann@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-use DataCollection        DataCollection-*         External
-use GaudiInterface        GaudiInterface-*         External
-use ByteStreamData        ByteStreamData-*         Event
-use TrigT1Result          TrigT1Result-*           Trigger/TrigT1
-use AthenaBaseComps       AthenaBaseComps-*        Control
-use TrigConfInterfaces    TrigConfInterfaces-*     Trigger/TrigConfiguration/
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-
-private
-use AtlasROOT             AtlasROOT-*              External
-use AtlasBoost            AtlasBoost-*             External
-use AthenaKernel          AthenaKernel-*           Control
-use TrigROBDataProviderSvc TrigROBDataProviderSvc-* Trigger/TrigDataAccess
-use EventInfo             EventInfo-*              Event
-use ByteStreamCnvSvcBase  ByteStreamCnvSvcBase-*   Event
-use TrigT1ResultByteStream TrigT1ResultByteStream-* Trigger/TrigT1
-use TrigT1Interfaces	  TrigT1Interfaces-*	   Trigger/TrigT1
-use TrigMonitorBase       TrigMonitorBase-*        Trigger/TrigMonitoring
-use L1TopoRDO		  L1TopoRDO-*		   Trigger/TrigT1/L1Topo
-use L1TopoConfig	  L1TopoConfig-*	   Trigger/TrigT1/L1Topo
-use TrigSteering          TrigSteering-*           Trigger/TrigSteer
-use TrigT1Result          TrigT1Result-*           Trigger/TrigT1
-use TrigConfL1Data        TrigConfL1Data-*         Trigger/TrigConfiguration
-use TrigConfHLTData       TrigConfHLTData-*        Trigger/TrigConfiguration
-use TrigSteeringEvent     TrigSteeringEvent-*      Trigger/TrigEvent
-
-library TrigOnlineMonitor *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-
-apply_pattern declare_scripts files="../share/plotL1TopoROBMonHist.py"
-
-# REMOVE BEFORE COMMIT!!!
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/cmt/requirements b/HLT/Trigger/TrigTransforms/TrigTransform/cmt/requirements
deleted file mode 100644
index 983c42f99bf9c8b7df96a935c159c19b4edada74..0000000000000000000000000000000000000000
--- a/HLT/Trigger/TrigTransforms/TrigTransform/cmt/requirements
+++ /dev/null
@@ -1,16 +0,0 @@
-package TrigTransform
-
-author Carsten Kendziorra <kendzi@physik.hu-berlin.de>
-author Simon George <S.George@rhul.ac.uk>
-author Martin Zur Nedden <martin.zur.nedden@desy.de>
-author Joerg Stelzer <stelzer@cern.ch>
-author Mark Stockton <mark.stockton@cern.ch>
-
-use PyJobTransforms PyJobTransforms-* Tools
-use RecJobTransforms RecJobTransforms-* Reconstruction
-
-use AtlasPolicy AtlasPolicy-*
-
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_job_transforms tfs="*.py"
diff --git a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/doc/packagedoc.h b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/doc/packagedoc.h
index 437103c0a6dd16f97f3c07806c4a6c8f06578fee..4701cda90d97fa062cca29941310ca5889bf9363 100644
--- a/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/doc/packagedoc.h
+++ b/InnerDetector/InDetAlignAlgs/InDetAlignGenAlgs/doc/packagedoc.h
@@ -588,5 +588,3 @@ Athena job - it therefore has less external dependencies and should be more
 robust.
 
 */
-
-
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt b/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt
index f2b36098e479059c0af3a20a2cacf2e6fb57f2ff..f1a79abff9a5686598e45beca9e81720cd59b329 100644
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/CMakeLists.txt
@@ -22,6 +22,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Tracking/TrkEvent/TrkTrack
                           Tracking/TrkExtrapolation/TrkExInterfaces
                           Tracking/TrkTools/TrkToolInterfaces
+                          Event/EventContainers
                           PRIVATE
                           Control/AthenaKernel
                           Control/DataModel
@@ -52,7 +53,7 @@ atlas_add_component( InDetAlignGenTools
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps SGTools AthenaPoolUtilities GeoPrimitives Identifier EventPrimitives InDetAlignTrkInfo InDetPrepRawData TrkEventPrimitives TrkEventUtils TrkTrack TrkExInterfaces TrkToolInterfaces AthenaKernel DataModel AtlasDetDescr DetDescrConditions GaudiKernel InDetIdentifier InDetReadoutGeometry TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkTrackSummary TrkTruthData TrkFitterInterfaces )
+                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps SGTools AthenaPoolUtilities GeoPrimitives Identifier EventPrimitives InDetAlignTrkInfo InDetPrepRawData TrkEventPrimitives TrkEventUtils TrkTrack TrkExInterfaces TrkToolInterfaces AthenaKernel DataModel AtlasDetDescr DetDescrConditions GaudiKernel InDetIdentifier InDetReadoutGeometry TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkTrackSummary TrkTruthData TrkFitterInterfaces EventContainers )
 
 # Install files from the package:
 atlas_install_headers( InDetAlignGenTools )
diff --git a/InnerDetector/InDetAlignTools/InDetAlignGenTools/doc/packagedoc.h b/InnerDetector/InDetAlignTools/InDetAlignGenTools/doc/packagedoc.h
index daf9d273121e777054f1cd38f6fd2a4c0c9d93ca..c48b480fb34699eb32b750e3646f14e6bb93572f 100644
--- a/InnerDetector/InDetAlignTools/InDetAlignGenTools/doc/packagedoc.h
+++ b/InnerDetector/InDetAlignTools/InDetAlignGenTools/doc/packagedoc.h
@@ -722,11 +722,8 @@ algorithm in InnerDetector/InDetAlignment/InDetAlignAlgs.
 
 @include InDetAlignTrackSelTool_jobOptions.py
 
-@section InDetAlignGenTools_requirements requirements
 
 
-@section InDetAlignGenTools_uses Packages used
 
 
 */
-
diff --git a/InnerDetector/InDetAlignTools/InDetAlignToolInterfaces/doc/packagedoc.h b/InnerDetector/InDetAlignTools/InDetAlignToolInterfaces/doc/packagedoc.h
index 113d7d686f3c707edc1101f0502239df9a1e4719..4b2468a65caf5f6a5579ac1e09d56ec1d7c7bec8 100644
--- a/InnerDetector/InDetAlignTools/InDetAlignToolInterfaces/doc/packagedoc.h
+++ b/InnerDetector/InDetAlignTools/InDetAlignToolInterfaces/doc/packagedoc.h
@@ -20,7 +20,6 @@ which are used to prepare track collections prior to alignment.
 
 This package is not going to be built as any library, it is a simple include package.   
       
-@section InDetAlignToolInterfaces_InDetAlignIntReq Requirements
 
 
  */
\ No newline at end of file
diff --git a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/PixelGeometryManagerTool.cxx b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/PixelGeometryManagerTool.cxx
index c654ca07ac8b0748ffc7f6a2c47b8259fa77fa2c..da8aeb0d1fd8fb4fbca9c629d69d81d2d94489ff 100644
--- a/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/PixelGeometryManagerTool.cxx
+++ b/InnerDetector/InDetAlignment/InDetAlignGeomTools/src/PixelGeometryManagerTool.cxx
@@ -171,12 +171,6 @@ namespace InDet {
     }  
     else ATH_MSG_INFO("retrieved RDBAccessSvc");
     
-    if(!m_rdbAccessSvc->connect()) {
-      msg(MSG::FATAL) << "Unable to connect to the Geometry DB" << endmsg;
-      return StatusCode::FAILURE;
-    }
-    else ATH_MSG_INFO("connection to geometry DB successfull");  
-
     // dump module selection
     if(m_doModuleSelection && msgLvl(MSG::INFO)) {
       msg(MSG::INFO)<<"Creating geometry for selected "<<m_moduleSelection.size()<<" modules:"<<endmsg;
diff --git a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/doc/packagedoc.h b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/doc/packagedoc.h
index 5d324b33b088d5ef9b99baac91c3cd374dee08b9..5aa2c82b77cd14f50e4920454d34c42b9f728502 100644
--- a/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetCalibAlgs/InDetBeamSpotFinder/doc/packagedoc.h
@@ -12,8 +12,6 @@ Package for the offline determination of the beamspot position, width, slope, fo
 @introduction
 See TWiki page InDetBeamSpot for general information.
 
-@page UsedInDetBeamSpotFinder Used Packages
 
-@page RequirementsInDetBeamSpotFinder Requirements
 
 */
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/hackNoiseMapsForStudyCP.C b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/hackNoiseMapsForStudyCP.C
index 1212edfac0fc289ead63841e69e479121d444391..0b21e69cae2e734f0c14fc8d2df9c7d644e783b3 100644
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/hackNoiseMapsForStudyCP.C
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/Application/hackNoiseMapsForStudyCP.C
@@ -10,6 +10,7 @@
 #include<iostream>
 #include<fstream>
 #include<cstdlib> // std::atoi
+#include<algorithm>
 
 #include "TFile.h"
 #include "TH1.h"
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/findMin.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/findMin.py
deleted file mode 100644
index 1b0af48bdd1222b9f55704a7e0d9421dc0cd010b..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/NNClusteringCalibration_RunI/getMinTraining/findMin.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-
-def findMin(path)
-
-minimum=10000
-epochWithMinimum=-1
-
-
-import os
-command = "cp "+path+" ."
-os.system(command)
-os.system('source cleanFile.sh')
-
-
-for line in file('chron.txt'):
-	line = line.split()
-	epoch = int(line[0])
-	trainingError = float(line[1])
-	testError = float(line[2])   
-	if testError < minimum:
-		minimum = testError
-		epochWithMinimum = epoch
-		
-return epochWithMinimum
-		
-
-
-
-
diff --git a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
index f865eed7567fddcaf22dd0b5d8e2b03cdd1a999b..aa93eee13a3121c9b0f55a26dbf33b93f85838b9 100755
--- a/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
+++ b/InnerDetector/InDetCalibAlgs/PixelCalibAlgs/share/NoiseMapBuilder.py
@@ -235,18 +235,6 @@ if doClusterization :
 #  topSequence += monMan
 #
 
-# include Pixel ntuple writer alg (useful if some further validation is needed)
-# adds information about all PRDs in the Pixels
-#from InDetTrackValidation.InDetTrackValidationConf import InDet__PixelClusterValidationNtupleWriter
-#PixelNtupleWriter = InDet__PixelClusterValidationNtupleWriter(name                       = 'InDetPixelClusterValidationNtupleWriter',
-#                                                              NtupleFileName           = 'TRKVAL',
-#                                                              NtupleDirectoryName      = 'Validation',
-#                                                              NtupleTreeName           = 'PixelRIOs',
-#                                                              PixelClusterContainer    = 'PixelClusters')
-#topSequence += PixelNtupleWriter
-#ServiceMgr.THistSvc.Output += [ "TRKVAL DATAFILE='/tmp/aandreaz/TrkValidation.root' TYPE='ROOT' OPT='RECREATE'" ]
-
-
 
 #ServiceMgr.EventSelector.SkipEvents = 0
 theApp.EvtMax = -1
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
index 44e96b6ee7849eadbfbabfa4348d2ab356aabf75..5515b086569066f352fd05e9af46ed22d325a009 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCTCalib.cxx
@@ -778,15 +778,15 @@ StatusCode SCTCalib::getDeadStrip() {
     ATH_MSG_INFO( "getDeadStrip() called" );
 
     // Bad Mods
-    std::set<Identifier>* badMods = m_ConfigurationConditionsSvc->badModules();
+    const std::set<Identifier>* badMods = m_ConfigurationConditionsSvc->badModules();
     std::set<Identifier>::const_iterator ModItr(badMods->begin());
     std::set<Identifier>::const_iterator ModEnd(badMods->end());
     // Bad links
-    std::map<Identifier, std::pair<bool, bool> >* badLinks = m_ConfigurationConditionsSvc->badLinks();
+    const std::map<Identifier, std::pair<bool, bool> >* badLinks = m_ConfigurationConditionsSvc->badLinks();
     std::map<Identifier, std::pair<bool, bool> >::const_iterator linkItr(badLinks->begin());
     std::map<Identifier, std::pair<bool, bool> >::const_iterator linkEnd(badLinks->end());
     // Bad chips
-    std::map<Identifier, unsigned int>* badChips = m_ConfigurationConditionsSvc->badChips();
+    const std::map<Identifier, unsigned int>* badChips = m_ConfigurationConditionsSvc->badChips();
     std::map<Identifier, unsigned int>::const_iterator chipItr(badChips->begin());
     std::map<Identifier, unsigned int>::const_iterator chipEnd(badChips->end());
     // Bad strips (w/o bad modules and chips)
@@ -1922,7 +1922,7 @@ StatusCode SCTCalib::getBSErrors() {
                             if ( iType == errItr->first ) {
                                 ostringstream streamHist;
                                 //temporal fix: folder and histogram names should be Preamble
-                                streamHist << "T" << errItr->second << "Errs" << detector_part << "_" << iDisk << "_" << iSide;
+                                streamHist << errItr->second << "Errs" << "_" << iDisk << "_" << iSide;
                                 //		    streamHist << "T" << errItr->second << "Errs" << detector_part << "_" << iDisk << "_" << iSide;
                                 std::string folder = errItr->second+std::string("/");
                                 //histogram might or might not be inside a folder with the same name
diff --git a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorSvc.cxx b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorSvc.cxx
index 0fb5baccb669b2c87c7cdf654274d38af2084c31..c88890525ddcf3dc3c8c6d7cd554a49d8e3db429 100644
--- a/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorSvc.cxx
+++ b/InnerDetector/InDetCalibAlgs/SCT_CalibAlgs/src/SCT_CalibBsErrorSvc.cxx
@@ -149,10 +149,10 @@ SCT_CalibBsErrorSvc::fillFromData(){
  m_numberOfEventsHisto->Fill( 1 );
  //--- Loop over BSErrors
   for ( int type = 0; type < SCT_ByteStreamErrors::NUM_ERROR_TYPES; ++type ) {
-    std::set<IdentifierHash>* errorSet = m_bytestreamErrorsSvc->getErrorSet( type );
+    const std::set<IdentifierHash>* errorSet = m_bytestreamErrorsSvc->getErrorSet( type );
     if ( errorSet != 0 ) {
-      std::set<IdentifierHash>::iterator it  = errorSet->begin();
-      std::set<IdentifierHash>::iterator itE = errorSet->end();
+      std::set<IdentifierHash>::const_iterator it  = errorSet->begin();
+      std::set<IdentifierHash>::const_iterator itE = errorSet->end();
       for ( ; it != itE; ++it ) {
         Identifier waferId = m_pSCTHelper->wafer_id( *it );
         fillBsErrorsForWafer(waferId, type);
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionCalibTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionCalibTemplate.py
index 0f47caacc43fe8a60b750381aa32f739398cc6d7..b320e2a8ea750fa0baf4f612f842a2ea0e233b91 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionCalibTemplate.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionCalibTemplate.py
@@ -166,9 +166,7 @@ InDetFlags.doTrkNtuple      = True
 InDetFlags.doPixelTrkNtuple = True
 InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py
index a272542b002f6140a031c01a18262e678e8858a6..da709c1a861a23bf561e23b3d9761164eeec995f 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/CollisionTemplate.py
@@ -170,9 +170,7 @@ InDetFlags.doTrkNtuple      = False
 InDetFlags.doPixelTrkNtuple = False
 InDetFlags.doSctTrkNtuple   = False
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py
index 1fae4a4a6a28fe35731c3c54eb6ae7d2aa93923d..3dee72da556e9ed55fdec38eb2708517991fa0c7 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/RAWHITemplate.py
@@ -181,9 +181,7 @@ InDetFlags.doTruth       = (globalflags.InputFormat() == 'pool' and globalflags.
 #InDetFlags.doPixelTrkNtuple = False
 #InDetFlags.doSctTrkNtuple   = False
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py
index ad86ffdfc86de98ae235ea8fb9aa44ce7b350549..276d3251b158eff7d3541e9de83633d2e0d9b620 100755
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsFullReco.py
@@ -158,9 +158,7 @@ InDetFlags.doTrkNtuple      = False
 InDetFlags.doPixelTrkNtuple = False
 InDetFlags.doSctTrkNtuple   = False
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsRefitting.py b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsRefitting.py
index eb152b66a8c0db4cb5914906bf0350e2132290c1..fe76aa8e13884a9fbc06f2b096b1e1e6becd6a1b 100644
--- a/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsRefitting.py
+++ b/InnerDetector/InDetCalibAlgs/TRT_CalibAlgs/share/joboptionsRefitting.py
@@ -157,9 +157,7 @@ InDetFlags.doTrkNtuple      = False
 InDetFlags.doPixelTrkNtuple = False
 InDetFlags.doSctTrkNtuple   = False
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetCalibTools/TRT_CalibTools/doc/packagedoc.h b/InnerDetector/InDetCalibTools/TRT_CalibTools/doc/packagedoc.h
index 801a9ee2266449c3c2c1cc9b8fed3144ecf0cb72..a2e66c10a6ed7a6e115c9820c2a2f3705f8f9f1c 100644
--- a/InnerDetector/InDetCalibTools/TRT_CalibTools/doc/packagedoc.h
+++ b/InnerDetector/InDetCalibTools/TRT_CalibTools/doc/packagedoc.h
@@ -42,17 +42,6 @@ whole detector.
   TRTCalibrator
   Calibrator
 
-@ref used_MyPackage
 
-@ref requirements_MyPackage
 
 */
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-*/
-
diff --git a/InnerDetector/InDetConditions/PixelConditionsData/doc/packagedoc.h b/InnerDetector/InDetConditions/PixelConditionsData/doc/packagedoc.h
index 1e5a86dea67b1a185c3c635d349341189816e96f..9fca77cfd1de8445eb55d6825b08e283f7a0c5e3 100644
--- a/InnerDetector/InDetConditions/PixelConditionsData/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/PixelConditionsData/doc/packagedoc.h
@@ -45,14 +45,4 @@ the doc directory of the package PixelConditionsServices.
 
 @section PixelConditionsData_PixelConditionsDataExtras Extra Pages
 
- - @ref PixelConditionsDataUsedPackages
- - @ref PixelConditionsDataRequirements
-*/
-
-/**
-@page PixelConditionsDataUsedPackages Used Packages
-*/
-
-/**
-@page PixelConditionsDataRequirements Requirements
 */
diff --git a/InnerDetector/InDetConditions/PixelConditionsServices/doc/packagedoc.h b/InnerDetector/InDetConditions/PixelConditionsServices/doc/packagedoc.h
index 32c3f6520ba8baaa1a24f82caffa4f981ece2da0..00202199562da0797172ff6840a3f67f8e526c1d 100644
--- a/InnerDetector/InDetConditions/PixelConditionsServices/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/PixelConditionsServices/doc/packagedoc.h
@@ -38,15 +38,4 @@ to the screen.
 
 @section PixelConditionsServices_PixelConditionsServicesExtras Extra Pages
 
- - @ref PixelConditionsServicesUsedPackages
- - @ref PixelConditionsServicesRequirements
 */
-
-/**
-@page PixelConditionsServicesUsedPackages Used Packages
-*/
-
-/**
-@page PixelConditionsServicesRequirements Requirements
-*/
-
diff --git a/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelSiliconConditionsSvc.cxx b/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelSiliconConditionsSvc.cxx
index 72e6d5bb995dac5b0d95a74e352a9a6f02292712..8b0e89b34523f781290b78659ccf5aaadfa45a7b 100644
--- a/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelSiliconConditionsSvc.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsServices/src/PixelSiliconConditionsSvc.cxx
@@ -217,8 +217,6 @@ PixelSiliconConditionsSvc::setConditionsFromGeoModel()
     return false;
   }
 
-  m_rdbSvc->connect();
-
   DecodeVersionKey versionKey(&*m_geoModelSvc, "Pixel");
   msg(MSG::DEBUG) << "Checking GeoModel Version Tag: "<<  versionKey.tag() << " at Node: " << versionKey.node() << endmsg;
 
@@ -251,8 +249,6 @@ PixelSiliconConditionsSvc::setConditionsFromGeoModel()
     msg(MSG::INFO) << "Default conditions not provided by GeoModel."  << endmsg;
   }
  
-  m_rdbSvc->disconnect();
-
   return (!useCondDB && conditionsPresent);
 
 
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelCalibDbTool.h b/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelCalibDbTool.h
index f8caabd522317a21517668fabf2750deb42d853c..bc902523190c300d87c54b3b34644e3783cc98a9 100755
--- a/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelCalibDbTool.h
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelCalibDbTool.h
@@ -24,7 +24,8 @@ public:
   
     /** required by the IAddressProvider interface **/
   virtual StatusCode updateAddress(StoreID::type storeID,
-                                   SG::TransientAddress* tad)=0; 
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx)=0; 
 
      /** Default Destructor */
   virtual ~IPixelCalibDbTool(){};
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelRecoDbTool.h b/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelRecoDbTool.h
index 3ca4478b63ec85f604a497fce0771e9f4ef9f6c6..4596cc05cd42347855ab39d037f1e74e877848e8 100644
--- a/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelRecoDbTool.h
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/PixelConditionsTools/IPixelRecoDbTool.h
@@ -42,7 +42,8 @@ public:
 
     /** required by the IAddressProvider interface **/
   virtual StatusCode updateAddress(StoreID::type storeID,
-                                   SG::TransientAddress* tad)=0; 
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx)=0; 
 
      /** Default Destructor */
   virtual ~IPixelRecoDbTool(){};
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/doc/packagedoc.h b/InnerDetector/InDetConditions/PixelConditionsTools/doc/packagedoc.h
index 377ca7c01ed4b5d330c7f2670bf81b5b3ea9e0bc..21768a6634ce56ad340301271003f0198d5dbf3a 100644
--- a/InnerDetector/InDetConditions/PixelConditionsTools/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/doc/packagedoc.h
@@ -29,15 +29,4 @@
 
 @section PixelConditionsTools_PixelConditionsToolsExtras Extra Pages
 
- - @ref PixelConditionsToolsUsedPackages
- - @ref PixelConditionsToolsRequirements
 */
-
-/**
-@page PixelConditionsToolsUsedPackages Used Packages
-*/
-
-/**
-@page PixelConditionsToolsRequirements Requirements
-*/
-
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelCalibDbTool.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelCalibDbTool.cxx
index 4ccda012bbb16146163be3ebe998a63980b5aac7..cc55ae6e87823581f473fac978f828de5e4c3ae2 100755
--- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelCalibDbTool.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelCalibDbTool.cxx
@@ -82,7 +82,8 @@ PixelCalibDbTool::PixelCalibDbTool(const std::string& type, const std::string& n
 }
 //================ Address update =============================================
 
-StatusCode PixelCalibDbTool::updateAddress(StoreID::type /*storeID*/,SG::TransientAddress* tad)
+StatusCode PixelCalibDbTool::updateAddress(StoreID::type /*storeID*/,SG::TransientAddress* tad,
+                                           const EventContext& /*ctx*/)
 { 
   CLID clid = tad->clID(); 
   std::string key = tad->name(); 
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelCalibDbTool.h b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelCalibDbTool.h
index 19320c13d8f23903d1fe22c3cac821fa04b2eb29..5f63344e28429fd55bc421dfce7442074d2e0817 100755
--- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelCalibDbTool.h
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelCalibDbTool.h
@@ -58,7 +58,8 @@ public:
   PixelCalibDbTool(const std::string& type, const std::string& name, const IInterface* parent); 
 
     /** required by the IAddressProvider interface **/
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad); 
+  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad,
+                                   const EventContext& ctx); 
 
      /** Default Destructor */
   virtual ~PixelCalibDbTool();
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelRecoDbTool.cxx b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelRecoDbTool.cxx
index d15fca9fbb1bb13183e1cbfe5b0bb15d0bc61211..b70f437a63e230843d0aa4f7ec40a8d1e3f14965 100755
--- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelRecoDbTool.cxx
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelRecoDbTool.cxx
@@ -72,7 +72,8 @@ PixelRecoDbTool::PixelRecoDbTool(const std::string& type,
 
 //================ Address update =============================================
 // What is this stuff ???
-StatusCode PixelRecoDbTool::updateAddress(StoreID::type, SG::TransientAddress* tad)
+StatusCode PixelRecoDbTool::updateAddress(StoreID::type, SG::TransientAddress* tad,
+                                          const EventContext& /*ctx*/)
 { 
   CLID clid = tad->clID(); 
   std::string key = tad->name(); 
diff --git a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelRecoDbTool.h b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelRecoDbTool.h
index ae1d7b65efafcea5d0003bbaeeab4b7034fade5a..5bf504af26bf9d339d994f0d9837e87b26204583 100644
--- a/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelRecoDbTool.h
+++ b/InnerDetector/InDetConditions/PixelConditionsTools/src/PixelRecoDbTool.h
@@ -62,7 +62,8 @@ public:
                   const IInterface* parent); 
 
     /** required by the IAddressProvider interface **/
-  virtual StatusCode updateAddress(StoreID::type storeID,SG::TransientAddress* tad); 
+  virtual StatusCode updateAddress(StoreID::type storeID,SG::TransientAddress* tad,
+                                   const EventContext& ctx); 
 
      /** Default Destructor */
   virtual ~PixelRecoDbTool();
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CalibData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CalibData.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CalibDefectData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_CalibDefectData.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSConditionsData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSConditionsData.h
deleted file mode 100755
index e101d919d5231516ef01469813b4e643dea3fb8d..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSConditionsData.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * SCT_DCSConditionsData.h
- * @file header file for data object
- * @author A. Robichaud-Veronneau - 23/02/07
- **/
-
-#ifndef SCT_DCSCONDITIONSDATA_H
-#define SCT_DCSCONDITIONSDATA_H
-
-#include "CLIDSvc/CLASS_DEF.h"
-#include "AthenaPoolUtilities/CondAttrListCollection.h"
-#include <map>
-#include <vector>
-#include <string>
-
-class SCT_DCSConditionsData {
-public:
-  //constructor
-  SCT_DCSConditionsData();
-
-  //destructor
-  virtual ~SCT_DCSConditionsData();
-  //@name main methods
-  //@{
-  /// add defect
-  void fill( const CondAttrListCollection::ChanNum& chanNum , const std::string param);
-  /// remove a defect
-  void remove( const CondAttrListCollection::ChanNum& chanNum , const std::string param);
-  /// copy all defects to a users vector, the return value is the size
-  int output( const CondAttrListCollection::ChanNum & chanNum,std::vector< std::string > & usersVector);
-  //@}
-  
-  //@name methods re-instated to satisfy 14.2.2X-VAL compilation
-  //@{
-  void fill( const CondAttrListCollection::ChanNum& chanNum , const int status);//!< dummy, to fix rel 14.2 
-  bool check( const CondAttrListCollection::ChanNum& chanNum , const int status); //!< dummy, to fix rel 14.2 
-  int output(const CondAttrListCollection::ChanNum & chanNum);
-  //@}
-  
-private:
-  typedef std::map<CondAttrListCollection::ChanNum, std::vector< std::string > > DCSConditions;
-  DCSConditions m_bad_channels;
-};
-
-CLASS_DEF( SCT_DCSConditionsData , 91615746 , 1 )
-
-#endif // SCT_DCSCONDITIONSDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSFloatCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSFloatCondData.h
new file mode 100644
index 0000000000000000000000000000000000000000..b90f4001293d4d3d8d6535ba63f84fca6e6f11bb
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSFloatCondData.h
@@ -0,0 +1,48 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * SCT_DCSFloatCondData.h
+ * @file header file for data object
+ * @author Susumu Oda - 11/08/17
+ **/
+
+#ifndef SCT_DCSFLOATCONDDATA_H
+#define SCT_DCSFLOATCONDDATA_H
+
+#include "CLIDSvc/CLASS_DEF.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
+#include <map>
+
+class SCT_DCSFloatCondData {
+public:
+  //constructor
+  SCT_DCSFloatCondData();
+
+  //destructor
+  virtual ~SCT_DCSFloatCondData();
+  //@name main methods
+  //@{
+  /// set a float value for a channel
+  void setValue(const CondAttrListCollection::ChanNum& chanNum, const float value);
+  /// get the float value for a channel
+  bool getValue(const CondAttrListCollection::ChanNum& chanNum, float& value) const;
+  /// clear the m_channelValues
+  void clear();
+  //@}
+  
+private:
+  typedef std::map<CondAttrListCollection::ChanNum, float> FloatConditions;
+  FloatConditions m_channelValues;
+};
+
+CLASS_DEF( SCT_DCSFloatCondData , 234553277 , 1 )
+
+#include "AthenaKernel/CondCont.h"
+CLASS_DEF( CondCont<SCT_DCSFloatCondData> , 257878639 , 1 )
+
+#include "SGTools/BaseInfo.h"
+SG_BASE( CondCont<SCT_DCSFloatCondData>, CondContBase );
+
+#endif // SCT_DCSFLOATCONDDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSStatCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSStatCondData.h
new file mode 100644
index 0000000000000000000000000000000000000000..d6569cbbea01cd5b3c0db634f452b7e9c980309c
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_DCSStatCondData.h
@@ -0,0 +1,52 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * SCT_DCSStatCondData.h
+ * @file header file for data object
+ * @author A. Robichaud-Veronneau - 23/02/07
+ **/
+
+#ifndef SCT_DCSSTATCONDDATA_H
+#define SCT_DCSSTATCONDDATA_H
+
+#include "CLIDSvc/CLASS_DEF.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
+#include <map>
+#include <vector>
+#include <string>
+
+class SCT_DCSStatCondData {
+public:
+  //constructor
+  SCT_DCSStatCondData();
+
+  //destructor
+  virtual ~SCT_DCSStatCondData();
+  //@name main methods
+  //@{
+  /// add defect
+  void fill(const CondAttrListCollection::ChanNum& chanNum, const std::string param);
+  /// remove a defect
+  void remove(const CondAttrListCollection::ChanNum& chanNum, const std::string param);
+  /// copy all defects to a users vector, the return value is the size
+  int output(const CondAttrListCollection::ChanNum& chanNum, std::vector<std::string>& usersVector);
+  ///
+  int output(const CondAttrListCollection::ChanNum & chanNum);
+  //@}
+  
+private:
+  typedef std::map<CondAttrListCollection::ChanNum, std::vector<std::string> > DCSConditions;
+  DCSConditions m_bad_channels;
+};
+
+CLASS_DEF( SCT_DCSStatCondData , 254074432 , 1 )
+
+#include "AthenaKernel/CondCont.h"
+CLASS_DEF( CondCont<SCT_DCSStatCondData> , 162792902 , 1 )
+
+#include "SGTools/BaseInfo.h"
+SG_BASE( CondCont<SCT_DCSStatCondData>, CondContBase );
+
+#endif // SCT_DCSSTATCONDDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorConditionsCondData.h b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorConditionsCondData.h
new file mode 100644
index 0000000000000000000000000000000000000000..624700bf3413731db9a881f780d941264079d23b
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/SCT_ConditionsData/SCT_MonitorConditionsCondData.h
@@ -0,0 +1,52 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+ * @file SCT_MonitorConditionsCondData.h
+ * header file for data object
+ * @author Susumu Oda - 2017-07-26
+ **/
+
+#ifndef SCT_MONITORCONDITIONSCONDDATA_H
+#define SCT_MONITORCONDITIONSCONDDATA_H
+
+#include <map>
+#include <string>
+
+// Include Athena stuff
+#include "CLIDSvc/CLASS_DEF.h"
+
+class SCT_MonitorConditionsCondData {
+public:
+
+  // Constructor
+  SCT_MonitorConditionsCondData();
+
+  // Destructor
+  virtual ~SCT_MonitorConditionsCondData();
+
+  // Check if a module has a defect (a list of bad strips). If it does not have defect return false.
+  bool find(const int& channelNumber, std::string& defectList) const;
+
+  // Insert a new defect (a list of bad strips) for a module
+  void insert(const int& channelNumber, const std::string& defectList);
+
+  // Clear m_defectListMap
+  void clear();
+
+private:
+  // Store the relation between modules and defects (lists of bad strips).
+  std::map<const int, const std::string> m_defectListMap;
+
+};
+
+CLASS_DEF( SCT_MonitorConditionsCondData , 153824898 , 1 )
+
+#include "AthenaKernel/CondCont.h"
+CLASS_DEF( CondCont<SCT_MonitorConditionsCondData> , 30296880 , 1 )
+
+#include "SGTools/BaseInfo.h"
+SG_BASE( CondCont<SCT_MonitorConditionsCondData>, CondContBase );
+
+#endif // SCT_MONITORCONDITIONSCONDDATA_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/cmt/requirements b/InnerDetector/InDetConditions/SCT_ConditionsData/cmt/requirements
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h b/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h
index 861dceb0d68f35ff923d0d7701d4cc89eff069f5..3de847547034a9a067a47e843c134f164a15de40 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/doc/packagedoc.h
@@ -28,16 +28,4 @@ This package provides data classes used to access data in the conditions
   - StringifyVector: Local utility function to tokenise and stream a string to a vector.
 
 @section SCT_ConditionsData_SCT_ConditionsDataRefs Reference pages
-  - @ref used_SCT_ConditionsData
-  - @ref requirements_SCT_ConditionsData
-*/
-
-
-/**
-@page used_SCT_ConditionsData Used packages
-*/
-
-
-/**
-@page requirements_SCT_ConditionsData Requirements
 */
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CalibData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CalibData.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CalibDefectData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_CalibDefectData.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSConditionsData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSConditionsData.cxx
deleted file mode 100755
index 6305b175ea87428ede165c057fc0045b37d85da6..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSConditionsData.cxx
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//Implementation file for the data object class
-//The object is a map of channel number<->vector<string>
-//Each string is the name of the guilty DCS parameter
-
-#include "SCT_ConditionsData/SCT_DCSConditionsData.h"
-#include "AthenaPoolUtilities/CondAttrListCollection.h"
-#include <utility>
-using namespace std;
-//constructor
-SCT_DCSConditionsData::SCT_DCSConditionsData()
-{}
-//////////////////////////////////
-//destructor
-SCT_DCSConditionsData::~SCT_DCSConditionsData()
-{ }
-//////////////////////////////////
-//add map entries
-void SCT_DCSConditionsData::fill(const CondAttrListCollection::ChanNum & chanNum, const string param) {
-  
-  if (m_bad_channels.find(chanNum) != m_bad_channels.end()) { 
-
-    // chan num has an entry already
-    //get the parameter list for this chan num
-
-    vector<string> par= (*m_bad_channels.find(chanNum)).second;   
-
-    vector<string>::iterator par_itr=find(par.begin(),par.end(),param);
-    if (par_itr == par.end()){
-      
-      // if this parameter (hv, chanstat etc) doesn't exist in the list add it to the param vector
-      par.push_back(param); 
-
-      //don't insert! not a new map entry, just update the vector 
-      (*m_bad_channels.find(chanNum)).second = par;
-    }
-  } else { 
-    // no entry yet for this chan num, so start fresh
-    
-    vector<string> par;
-    par.push_back(param);
-    pair < map< CondAttrListCollection::ChanNum,vector<string> >::iterator, bool > successfulInsert = m_bad_channels.insert(make_pair(chanNum, par));
-    if (not successfulInsert.second) std::cout<<"WARNING: SCT_ConditionsData map insert failed"<<std::endl;
-  }
-}
-
-
-void SCT_DCSConditionsData::fill(const CondAttrListCollection::ChanNum & /*chanNum*/, const int /*status*/){
-  //nop
-}
-
-//////////////////////////////////
-//check map entries and initialize
-//this is only here to keep release 14.2 happy
-bool SCT_DCSConditionsData::check(const CondAttrListCollection::ChanNum & /*chanNum*/, const int /*status*/)
-{
-  return false;
-}
-
-
-//////////////////////////////////
-//remove entries in map vector
-void SCT_DCSConditionsData::remove(const CondAttrListCollection::ChanNum & chanNum, const string param)
-{
-	map< CondAttrListCollection::ChanNum,vector<string> >::iterator itr=m_bad_channels.find(chanNum);
-	if (itr != m_bad_channels.end()) {
-                vector<string>::iterator vec_itr=find((*itr).second.begin(),(*itr).second.end(),param);	
-		if (vec_itr != (*itr).second.end()){
-		  if ((*itr).second.size()>1) (*itr).second.erase(vec_itr);
-		  else m_bad_channels.erase(itr);
-		}
-	}
-}
-//////////////////////////////////
-//output map vector
-int SCT_DCSConditionsData::output(const CondAttrListCollection::ChanNum & chanNum, vector< string > & usersVector){
-  DCSConditions::const_iterator pPair(m_bad_channels.find(chanNum) );
-  if ( pPair != m_bad_channels.end()){
-    const vector< string > & v(pPair->second);
-    usersVector.insert(usersVector.begin(), v.begin(), v.end() );
-  }
-  return usersVector.size();
-}
-
-//output map size
-int SCT_DCSConditionsData::output(const CondAttrListCollection::ChanNum & chanNum){
-  DCSConditions::const_iterator pPair(m_bad_channels.find(chanNum) );
-  return (pPair != m_bad_channels.end() )? (pPair->second.size()) : 0;
-}
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSFloatCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSFloatCondData.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..797c4c18e9731b17a478e1775443f55b260f7282
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSFloatCondData.cxx
@@ -0,0 +1,42 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// Implementation file for the SCT DCS float data object class for HV and temperature
+// The object is a map of channel number <-> float
+
+#include "SCT_ConditionsData/SCT_DCSFloatCondData.h"
+
+//////////////////////////////////
+// constructor
+SCT_DCSFloatCondData::SCT_DCSFloatCondData() {
+}
+
+//////////////////////////////////
+// destructor
+SCT_DCSFloatCondData::~SCT_DCSFloatCondData() {
+}
+
+//////////////////////////////////
+// set a float value for a channel
+void SCT_DCSFloatCondData::setValue(const CondAttrListCollection::ChanNum& chanNum, const float value) {
+  m_channelValues[chanNum] = value;
+}
+
+//////////////////////////////////
+// get the float value for a channel
+bool SCT_DCSFloatCondData::getValue(const CondAttrListCollection::ChanNum& chanNum, float& value) const {
+  auto itr{m_channelValues.find(chanNum)};
+  if(itr!=m_channelValues.end()) {
+    value = itr->second;
+    return true;
+  }
+  // the channel is not found.
+  return false;
+}
+
+//////////////////////////////////
+// clear
+void SCT_DCSFloatCondData::clear() {
+  m_channelValues.clear();
+}
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSStatCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSStatCondData.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a2bff7e06862e3132e3eba9aeb1f872defc49ea3
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_DCSStatCondData.cxx
@@ -0,0 +1,74 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+//Implementation file for the data object class
+//The object is a map of channel number<->vector<string>
+//Each string is the name of the guilty DCS parameter
+
+#include "SCT_ConditionsData/SCT_DCSStatCondData.h"
+
+#include <iostream>
+#include <algorithm>
+using namespace std;
+
+//////////////////////////////////
+//constructor
+SCT_DCSStatCondData::SCT_DCSStatCondData() {
+}
+//////////////////////////////////
+//destructor
+SCT_DCSStatCondData::~SCT_DCSStatCondData() {
+}
+//////////////////////////////////
+//add map entries
+void SCT_DCSStatCondData::fill(const CondAttrListCollection::ChanNum& chanNum, const string param) {
+  if (m_bad_channels.find(chanNum)!=m_bad_channels.end()) {
+    // chan num has an entry already
+    //get the parameter list for this chan num
+
+    vector<string> par{(*m_bad_channels.find(chanNum)).second};
+
+    vector<string>::iterator par_itr{find(par.begin(), par.end(), param)};
+    if (par_itr==par.end()) {
+      // if this parameter (hv, chanstat etc) doesn't exist in the list add it to the param vector
+      par.push_back(param); 
+      //don't insert! not a new map entry, just update the vector 
+      (*m_bad_channels.find(chanNum)).second = par;
+    }
+  } else { 
+    // no entry yet for this chan num, so start fresh
+    vector<string> par;
+    par.push_back(param);
+    pair<map<CondAttrListCollection::ChanNum, vector<string> >::iterator, bool> successfulInsert{m_bad_channels.insert(make_pair(chanNum, par))};
+    if (not successfulInsert.second) cout << "WARNING: SCT_ConditionsData map insert failed" << endl;
+  }
+}
+//////////////////////////////////
+//remove entries in map vector
+void SCT_DCSStatCondData::remove(const CondAttrListCollection::ChanNum& chanNum, const string param) {
+  map<CondAttrListCollection::ChanNum, vector<string> >::iterator itr{m_bad_channels.find(chanNum)};
+  if (itr!=m_bad_channels.end()) {
+    vector<string>::iterator vec_itr{find((*itr).second.begin(), (*itr).second.end(), param)};
+    if (vec_itr!=(*itr).second.end()) {
+      if ((*itr).second.size()>1) (*itr).second.erase(vec_itr);
+      else m_bad_channels.erase(itr);
+    }
+  }
+}
+//////////////////////////////////
+//output map vector
+int SCT_DCSStatCondData::output(const CondAttrListCollection::ChanNum& chanNum, vector<string>& usersVector) {
+  DCSConditions::const_iterator pPair{m_bad_channels.find(chanNum)};
+  if (pPair!=m_bad_channels.end()) {
+    const vector<string>& v{pPair->second};
+    usersVector.insert(usersVector.begin(), v.begin(), v.end());
+  }
+  return usersVector.size();
+}
+//////////////////////////////////
+//output map size
+int SCT_DCSStatCondData::output(const CondAttrListCollection::ChanNum& chanNum) {
+  DCSConditions::const_iterator pPair{m_bad_channels.find(chanNum)};
+  return (pPair!=m_bad_channels.end()) ? (pPair->second.size()) : 0;
+}
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MonitorConditionsCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MonitorConditionsCondData.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..364c07b2a0e018efad8f7ef2f6cc206864eac9f4
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_MonitorConditionsCondData.cxx
@@ -0,0 +1,50 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+//----------------------------------------------------------------------
+// Implementation file for the data object class for SCT_MonitorConditionsSvc
+//----------------------------------------------------------------------
+
+#include "SCT_ConditionsData/SCT_MonitorConditionsCondData.h"
+
+#include <utility>
+
+//----------------------------------------------------------------------
+// Constructor
+SCT_MonitorConditionsCondData::SCT_MonitorConditionsCondData():
+  m_defectListMap{}
+{}
+
+//----------------------------------------------------------------------
+// Destructor
+SCT_MonitorConditionsCondData::~SCT_MonitorConditionsCondData()
+{}
+
+//----------------------------------------------------------------------
+// Check if a module has a defect (a list of bad strips). If it does not have defect return false.
+bool SCT_MonitorConditionsCondData::find(const int& channelNumber, std::string& defectList) const
+{
+  std::map<const int, const std::string>::const_iterator it{m_defectListMap.find(channelNumber)};
+  if(it!=m_defectListMap.end()) {
+    // A defect is found, set the defect to defectList and return true.
+    defectList = it->second;
+    return true;
+  }
+  // Any defect is not found and return true.
+  return false;
+}
+
+//----------------------------------------------------------------------
+// Insert a new defect (a list of bad strips) for a module
+void SCT_MonitorConditionsCondData::insert(const int& channelNumber, const std::string& defectList)
+{
+  m_defectListMap.insert(std::make_pair(channelNumber, defectList));
+}
+
+//----------------------------------------------------------------------
+// Clear m_defectListMap
+void SCT_MonitorConditionsCondData::clear()
+{
+  m_defectListMap.clear();
+}
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_TdaqEnabledCondData.cxx b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_TdaqEnabledCondData.cxx
index 2ea407dc026700ab10ed2ab0a3bce36b6e117ac6..3f5ba630fb9495beacedc63af585fd0aa41207b8 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_TdaqEnabledCondData.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsData/src/SCT_TdaqEnabledCondData.cxx
@@ -14,10 +14,10 @@
 //----------------------------------------------------------------------
 // Constructor
 SCT_TdaqEnabledCondData::SCT_TdaqEnabledCondData():
-  m_goodRods(),
-  m_goodIds(),
-  m_noneBad(false),
-  m_filled(false)
+  m_goodRods{},
+  m_goodIds{},
+  m_noneBad{false},
+  m_filled{false}
 {}
 
 //----------------------------------------------------------------------
@@ -90,4 +90,3 @@ void SCT_TdaqEnabledCondData::clear() {
   m_noneBad = false;
   m_filled = false;
 }
-
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ByteStreamErrorsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ByteStreamErrorsSvc.h
index e26989bd3c3b97744d9199de799a29533d0d5bd6..8b059d9d9148fa85d30bf13c8c25c35d7a53073b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ByteStreamErrorsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ByteStreamErrorsSvc.h
@@ -6,86 +6,99 @@
  * @file ISCT_ByteStreamErrorsSvc.h
  * interface file for service that keeps track of errors in the bytestream.
  * @author nbarlow@cern.ch
-**/
+ **/
 
 #ifndef ISCT_ByteStreamErrorsSvc_h
 #define ISCT_ByteStreamErrorsSvc_h
 
 #include <set>
-#include <list>
 
 #include "InDetConditionsSummaryService/InDetHierarchy.h"
 #include "SCT_ConditionsServices/ISCT_ConditionsSvc.h"
 
 class Identifier;
 class IdentifierHash;
-class StatusCode;
 
 /** put this enum here for now - would be better to 
  * have it in SCT_ConditionsData along with other 
  * error types..
  */
 
+// http://stackoverflow.com/questions/21456262/enum-to-string-in-c11
+#ifndef SCT_ERRORTYPELIST
+#define SCT_ERRORTYPELIST(XYZ)						\
+  XYZ(ByteStreamParseError)						\
+  XYZ(TimeOutError)							\
+  XYZ(BCIDError)							\
+  XYZ(LVL1IDError)							\
+  XYZ(PreambleError)							\
+  XYZ(FormatterError)							\
+  XYZ(TrailerError)							\
+  XYZ(TrailerOverflowError)						\
+  XYZ(HeaderTrailerLimitError)						\
+  XYZ(ABCDError)							\
+  XYZ(RawError)								\
+  XYZ(MaskedLink)							\
+  XYZ(RODClockError)							\
+  XYZ(TruncatedROD)							\
+  XYZ(ROBFragmentError)							\
+  XYZ(MissingLinkHeaderError)						\
+  XYZ(MaskedROD)							\
+  XYZ(ABCDError_Chip0)							\
+  XYZ(ABCDError_Chip1)							\
+  XYZ(ABCDError_Chip2)							\
+  XYZ(ABCDError_Chip3)							\
+  XYZ(ABCDError_Chip4)							\
+  XYZ(ABCDError_Chip5)							\
+  XYZ(ABCDError_Error1)							\
+  XYZ(ABCDError_Error2)							\
+  XYZ(ABCDError_Error4)							\
+  XYZ(TempMaskedChip0)							\
+  XYZ(TempMaskedChip1)							\
+  XYZ(TempMaskedChip2)							\
+  XYZ(TempMaskedChip3)							\
+  XYZ(TempMaskedChip4)							\
+  XYZ(TempMaskedChip5)							\
+  XYZ(ABCDError_Error7)							\
+  XYZ(ABCDError_Invalid)						\
+  XYZ(NUM_ERROR_TYPES) // always have this one last, so we can use it as a loop index
+#endif // SCT_ERRORTYPELIST
+
+#ifndef SCT_DO_ENUM
+#define SCT_DO_ENUM(e) e,
+#endif // SCT_DO_ENUM
+
+#ifndef SCT_DO_DESCRIPTION
+#define SCT_DO_DESCRIPTION(e) #e,
+#endif // SCT_DO_DESCRIPTION
+
 namespace SCT_ByteStreamErrors {
   enum errorTypes {
-    ByteStreamParseError,
-    TimeOutError,
-    BCIDError,
-    LVL1IDError,
-    PreambleError,
-    FormatterError,
-    TrailerError,
-    TrailerOverflowError,
-    HeaderTrailerLimitError,
-    ABCDError,
-    RawError,
-    MaskedLink,
-    RODClockError,
-    TruncatedROD,
-    ROBFragmentError,
-    MissingLinkHeaderError,
-    MaskedROD,
-    ABCDError_Chip0,
-    ABCDError_Chip1,
-    ABCDError_Chip2,
-    ABCDError_Chip3,
-    ABCDError_Chip4,
-    ABCDError_Chip5,
-    ABCDError_Error1,
-    ABCDError_Error2,
-    ABCDError_Error4,
-    TempMaskedChip0,
-    TempMaskedChip1,
-    TempMaskedChip2,
-    TempMaskedChip3,
-    TempMaskedChip4,
-    TempMaskedChip5,
-    ABCDError_Error7,
-    ABCDError_Invalid,
-    NUM_ERROR_TYPES  // always have this one last, so we can use it as a loop index
+    SCT_ERRORTYPELIST(SCT_DO_ENUM)
+  };
+  static const std::string errorTypesDescription[]{
+    SCT_ERRORTYPELIST(SCT_DO_DESCRIPTION)
   };
 }
 
-
 /**
  * @class SCT_ByteStreamErrorsSvc
  * Service that keeps track of modules that give rise to errors in the bytestram.
-**/
+ **/
 
 class ISCT_ByteStreamErrorsSvc: virtual public ISCT_ConditionsSvc {
 
-public:
+ public:
   //@name Service methods
   //@{
 
-  virtual ~ISCT_ByteStreamErrorsSvc(){}
+  virtual ~ISCT_ByteStreamErrorsSvc() {}
 
-  //  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
-  static const InterfaceID & interfaceID();
+  static const InterfaceID& interfaceID();
 
   //@}
   
-  virtual std::set<IdentifierHash>* getErrorSet(int errorType)=0;
+  virtual const std::set<IdentifierHash>* getErrorSet(int errorType)=0;
 
   virtual void setRODSimulatedData()=0;
 
@@ -98,35 +111,35 @@ public:
   virtual void resetCounts()=0; /** for the counts used by HLT */
   virtual int getNumberOfErrors(int errorType)=0; /** for HLT */
 
-  virtual void addRODHVCounter(bool HVisOn) = 0;
+  virtual void addRODHVCounter(bool HVisOn)=0;
 
-  virtual bool isCondensedReadout() = 0;
+  virtual bool isCondensedReadout()=0;
 
-  virtual void setCondensedReadout(bool isCondensed) = 0;
+  virtual void setCondensedReadout(bool isCondensed)=0;
 
-  virtual bool HVisOn() = 0;
+  virtual bool HVisOn()=0;
 
-  virtual void setDecodedROD(const boost::uint32_t rodId) = 0;
-  virtual std::vector<boost::uint32_t> getRODOuts() const = 0;
+  virtual void setDecodedROD(const boost::uint32_t rodId)=0;
+  virtual std::vector<boost::uint32_t> getRODOuts() const =0;
 
   /** Set first temporarily masked chip information from byte stream trailer */
   virtual void setFirstTempMaskedChip(const IdentifierHash& hashId, const unsigned int firstTempMaskedChip)=0;
   /** Get first temporarily masked chip information */
   virtual unsigned int getFirstTempMaskedChip(const IdentifierHash& hashId) const =0;
   /** Map of temporary chip status for all modules with at least one bad chip (packed as 1st 12 bits of unsigned int) */
-  virtual std::map<Identifier, unsigned int>* tempMaskedChips() const =0;
+  virtual const std::map<Identifier, unsigned int>* tempMaskedChips() const =0;
   /** Temporary status of chips for a particular module (packed as 1st 12 bits of unsigned int) */
-  virtual unsigned int tempMaskedChips(const Identifier & moduleId) const =0;
+  virtual unsigned int tempMaskedChips(const Identifier& moduleId) const =0;
   /** Status ABCD errors of chips for a particular module (packed as 1st 12 bits of unsigned int) */
-  virtual unsigned int abcdErrorChips(const Identifier & moduleId) const =0;
+  virtual unsigned int abcdErrorChips(const Identifier& moduleId) const =0;
 
-private:
+ private:
 
 };
 
-inline const InterfaceID & ISCT_ByteStreamErrorsSvc::interfaceID(){
-  static const InterfaceID IID_SCT_ByteStreamErrorsSvc("SCT_ByteStreamErrorsSvc",1,0);
+inline const InterfaceID& ISCT_ByteStreamErrorsSvc::interfaceID() {
+  static const InterfaceID IID_SCT_ByteStreamErrorsSvc{"SCT_ByteStreamErrorsSvc", 1, 0};
   return IID_SCT_ByteStreamErrorsSvc;
 }
 
-#endif
+#endif // ISCT_ByteStreamErrorsSvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ChargeTrappingSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ChargeTrappingSvc.h
index 514addd0fa50076af5f7dcd6cb066369c4ad98ed..3b52f1b6dfe72dbf254af96a1226ccc38f300291 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ChargeTrappingSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ChargeTrappingSvc.h
@@ -11,12 +11,12 @@
 
 #ifndef ISCT_ChargeTrappingSvc_h
 #define ISCT_ChargeTrappingSvc_h
+
 //Gaudi Includes
 #include "GaudiKernel/IInterface.h"
 #include "AthenaKernel/IOVSvcDefs.h"
 
 //forward declarations
-class Identifier;
 class IdentifierHash;
 
 /**
@@ -27,31 +27,30 @@ class IdentifierHash;
 class ISCT_ChargeTrappingSvc: virtual public IInterface
 {
  public:
-  virtual ~ISCT_ChargeTrappingSvc(){}
+  virtual ~ISCT_ChargeTrappingSvc() {}
   
-  static const InterfaceID & interfaceID(); //!< reimplemented from IInterface
-
+  static const InterfaceID& interfaceID(); //!< reimplemented from IInterface
   
-  virtual double getTrappingProbability(const IdentifierHash & elementHash, const double & pos) = 0;
-  virtual double getTrappingElectrons(const IdentifierHash & elementHash, const double & pos) = 0;
-  virtual double getElectricField(const IdentifierHash & elementHash, const double & pos) = 0;
-  virtual double getTrappingTime(const IdentifierHash & elementHash, const double & pos) = 0;
-  virtual double getTimeToElectrode(const IdentifierHash & elementHash, const double & pos) = 0;
-  virtual double getTrappingPositionZ(const IdentifierHash & elementHash, const double & pos) = 0;
-  virtual double getTrappingHoles(const IdentifierHash & elementHash, const double & pos) = 0;  
-  virtual double getHoleDriftMobility(const IdentifierHash & elementHash, const double & pos) = 0;
-  virtual bool getdoCTrap(const IdentifierHash & elementHash,  const double & pos) = 0;
-  virtual void getHoleTransport(double & x0, double & y0, double & xfin, double & yfin, double & Q_m2, double & Q_m1, double & Q_00, double & Q_p1, double & Q_p2 )const  = 0;
-  virtual void getInitPotentialValue() = 0;
-
- /// IOV CallBack
-  virtual StatusCode callBack(IOVSVC_CALLBACK_ARGS) = 0;
+  virtual double getTrappingProbability(const IdentifierHash& elementHash, const double& pos)=0;
+  virtual double getTrappingElectrons(const IdentifierHash& elementHash, const double& pos)=0;
+  virtual double getElectricField(const IdentifierHash& elementHash, const double& pos)=0;
+  virtual double getTrappingTime(const IdentifierHash& elementHash, const double& pos)=0;
+  virtual double getTimeToElectrode(const IdentifierHash& elementHash, const double& pos)=0;
+  virtual double getTrappingPositionZ(const IdentifierHash& elementHash, const double& pos)=0;
+  virtual double getTrappingHoles(const IdentifierHash& elementHash, const double& pos)=0;  
+  virtual double getHoleDriftMobility(const IdentifierHash& elementHash, const double& pos)=0;
+  virtual bool getdoCTrap(const IdentifierHash& elementHash,  const double& pos)=0;
+  virtual void getHoleTransport(double& x0, double& y0, double& xfin, double& yfin, double& Q_m2, double& Q_m1, double& Q_00, double& Q_p1, double& Q_p2) const =0;
+  virtual void getInitPotentialValue()=0;
+
+  /// IOV CallBack
+  virtual StatusCode callBack(IOVSVC_CALLBACK_ARGS)=0;
   
 };
 
-inline const InterfaceID & ISCT_ChargeTrappingSvc::interfaceID(){
-  static const InterfaceID IID_ISCT_ChargeTrappingSvc("ISCT_ChargeTrappingSvc",1,0); 
+inline const InterfaceID& ISCT_ChargeTrappingSvc::interfaceID() {
+  static const InterfaceID IID_ISCT_ChargeTrappingSvc{"ISCT_ChargeTrappingSvc", 1, 0};
   return IID_ISCT_ChargeTrappingSvc; 
-
 }
-#endif
+
+#endif // ISCT_ChargeTrappingSvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConditionsParameterSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConditionsParameterSvc.h
index e17efeae250cba3941e1cb1a5f8db4acff54cc72..2ec3e1865c6a3d1c9b69d6d7737e5730e36e98a3 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConditionsParameterSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConditionsParameterSvc.h
@@ -6,17 +6,14 @@
  * @file ISCT_ConditionsParameterSvc.h
  * header file for baseclass of SCT conditions services
  * @author shaun.roe@cern.ch
-**/
+ **/
+
 #ifndef ISCT_ConditionsParameterSvc_h
 #define ISCT_ConditionsParameterSvc_h
+
 //STL includes
-#include <list>
-#include <string>
 #include <vector>
 
-//boost include
-#include "boost/array.hpp"
-
 //Gaudi Includes
 #include "GaudiKernel/IInterface.h"
 
@@ -25,24 +22,24 @@
 
 //fwd declarations
 class IdentifierHash;
-class StatusCode;
+
 /**
  * @class ISCT_ConditionsParameterSvc
  * Base class to give a numerical value from conditions for each detector element (module side)
-**/
-class ISCT_ConditionsParameterSvc: virtual public IInterface{
-public:
-  virtual ~ISCT_ConditionsParameterSvc(){}
-  static const InterfaceID & interfaceID(); //!< reimplemented from IInterface
+ **/
+class ISCT_ConditionsParameterSvc: virtual public IInterface {
+ public:
+  virtual ~ISCT_ConditionsParameterSvc() {}
+  static const InterfaceID& interfaceID(); //!< reimplemented from IInterface
   
   ///Is the required parameter available?
   virtual bool available(const SCT_ConditionsServices::ParameterIndex iparam)=0;
   
   ///Give the indicated value for a module identifier hash
-  virtual float value(const IdentifierHash & idHash, const SCT_ConditionsServices::ParameterIndex iparam) = 0;
+  virtual float value(const IdentifierHash& idHash, const SCT_ConditionsServices::ParameterIndex iparam)=0;
   
   ///Measure of how many valid values went to calculate it. Should be 1 but if, say, 3 chip values were valid out of 6, it could be less (0.5 in this case)
-  virtual float validity(const IdentifierHash & idHash, const SCT_ConditionsServices::ParameterIndex iparam)=0;
+  virtual float validity(const IdentifierHash& idHash, const SCT_ConditionsServices::ParameterIndex iparam)=0;
   
   ///Is a given value within acceptable limits?
   virtual bool isValid(const float parameterValue, const SCT_ConditionsServices::ParameterIndex iparam)=0;
@@ -66,16 +63,16 @@ public:
   virtual unsigned int n(const SCT_ConditionsServices::ParameterIndex iparam)=0;
   
   ///Fill a user-provided vector with the values (hopefully won't be needed?)
-  virtual void getValues(std::vector<float> & userVector, const SCT_ConditionsServices::ParameterIndex iparam)=0;
+  virtual void getValues(std::vector<float>& userVector, const SCT_ConditionsServices::ParameterIndex iparam)=0;
  
   ///Report whether the structure was filled
-  virtual bool filled() const = 0;
+  virtual bool filled() const =0;
 };
 
 
-inline const InterfaceID & ISCT_ConditionsParameterSvc::interfaceID(){
-  static const InterfaceID IID("ISCT_ConditionsParameterSvc",1,0);
+inline const InterfaceID& ISCT_ConditionsParameterSvc::interfaceID() {
+  static const InterfaceID IID{"ISCT_ConditionsParameterSvc", 1, 0};
   return IID;
 }
 
-#endif
+#endif // ISCT_ConditionsParameterSvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConditionsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConditionsSvc.h
index b82cefeea2b6a34afbf9b4eab565188178147db0..ee9dc335b48ea77cd669b8a19a6c1fcad5d66566 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConditionsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConditionsSvc.h
@@ -6,9 +6,11 @@
  * @file ISCT_ConditionsSvc.h
  * header file for baseclass of SCT conditions services
  * @author shaun.roe@cern.ch
-**/
+ **/
+
 #ifndef ISCT_ConditionsSvc_h
 #define ISCT_ConditionsSvc_h
+
 //STL includes
 #include <list>
 #include <string>
@@ -27,20 +29,20 @@ class StatusCode;
 /**
  * @class ISCT_ConditionsSvc
  * Base class for SCT conditions services so they can be used in the summary service
-**/
-class ISCT_ConditionsSvc: virtual public IInterface{
-public:
-  virtual ~ISCT_ConditionsSvc(){}
-  static const InterfaceID & interfaceID(); //!< reimplemented from IInterface
+ **/
+class ISCT_ConditionsSvc: virtual public IInterface {
+ public:
+  virtual ~ISCT_ConditionsSvc() {}
+  static const InterfaceID& interfaceID(); //!< reimplemented from IInterface
   
   ///Return whether this service can report on the hierarchy level (e.g. module, chip...)
-   virtual bool canReportAbout(InDetConditions::Hierarchy h) = 0;
+  virtual bool canReportAbout(InDetConditions::Hierarchy h)=0;
   
   ///Summarise the result from the service as good/bad
-  virtual bool isGood(const Identifier & elementId,InDetConditions::Hierarchy h=InDetConditions::DEFAULT) = 0;
+  virtual bool isGood(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT)=0;
   
   //@todo introduce hash identifier method
-  virtual bool isGood(const IdentifierHash & hashId) = 0;
+  virtual bool isGood(const IdentifierHash& hashId)=0;
 
   //these next two/three methods could be improved...work it out.
   ///Fill the data structures, if not overridden then return failure
@@ -48,21 +50,20 @@ public:
 
   /**Fill the data structures from a callback, the arguments are needed by IOVDbSvc, 
    * if not overridden then return failure
-  **/
-  virtual StatusCode fillData(int& i , std::list<std::string>& l)=0;
+   **/
+  virtual StatusCode fillData(int& i, std::list<std::string>& l)=0;
 
   ///Report whether the structure was filled
-  virtual bool filled() const = 0;
+  virtual bool filled() const =0;
 
   ///Report whether the tool can fill its data during the initialize phase
   virtual bool canFillDuringInitialize()=0;
   
-  
 };
 
-inline const InterfaceID & ISCT_ConditionsSvc::interfaceID(){
-  static const InterfaceID IID("ISCT_ConditionsSvc",1,0);
+inline const InterfaceID& ISCT_ConditionsSvc::interfaceID() {
+  static const InterfaceID IID{"ISCT_ConditionsSvc", 1, 0};
   return IID;
 }
 
-#endif
+#endif // ISCT_ConditionsSvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConfigurationConditionsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConfigurationConditionsSvc.h
index 8b937a9ad424f3ef3e195e47a35544882bb1ba60..5b92a86fbdd632ffc83009e306cf376a99ad45d2 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConfigurationConditionsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ConfigurationConditionsSvc.h
@@ -6,69 +6,64 @@
  * @file ISCT_ConfigurationConditionsSvc.h
  * interface file for service that keeps track of configuration conditions
  * @author gwilliam@mail.cern.ch
-**/
+ **/
 
 #ifndef ISCT_ConfigurationConditionsSvc_h
 #define ISCT_ConfigurationConditionsSvc_h
 
 #include <set>
-#include <list>
 #include <map>
 
 #include "InDetConditionsSummaryService/InDetHierarchy.h"
 #include "SCT_ConditionsServices/ISCT_ConditionsSvc.h"
 
 class Identifier;
-class IdentifierHash;
-class StatusCode;
-
 
 /**
  * @class SCT_ConfigurationConditionsSvc
  * Service that keeps track of configuration conditions
-**/
+ **/
 
 class ISCT_ConfigurationConditionsSvc: virtual public ISCT_ConditionsSvc {
 
-public:
+ public:
   //@name Service methods
   //@{
 
-  virtual ~ISCT_ConfigurationConditionsSvc(){}
+  virtual ~ISCT_ConfigurationConditionsSvc() {}
 
   //  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
-  static const InterfaceID & interfaceID();
+  static const InterfaceID& interfaceID();
 
   //@}
 
   /** Set of bad module Identifiers */
-  virtual std::set<Identifier>*                          badModules()                                                                                        = 0;  
+  virtual const std::set<Identifier>* badModules()=0;
 
   /** Map of link status for all modules with at least one bad link (true = good, false = bad)*/
-  virtual std::map<Identifier, std::pair<bool, bool> >*  badLinks()                                                                                          = 0;
+  virtual const std::map<Identifier, std::pair<bool, bool> >* badLinks()=0;
   /** Link status for a particluar module (true = good, false = bad)*/
-  virtual std::pair<bool, bool>                          badLinks(const Identifier & moduleId)                                                                       = 0;
+  virtual std::pair<bool, bool> badLinks(const Identifier& moduleId)=0;
 
   /** Map of chips status for all modules with at least one bad chip (packed as 1st 12 bits of unsigned int)*/
-  virtual std::map<Identifier, unsigned int>*            badChips()                                                                                          = 0;  
+  virtual const std::map<Identifier, unsigned int>* badChips()=0;
   /** Chips status for a particular module (packed as 1st 12 bits of unsigned int)*/ 
-  virtual unsigned int                                   badChips(const Identifier & moduleId)                                                                       = 0;  
+  virtual unsigned int badChips(const Identifier& moduleId)=0;
 
   /** Set of bad strip Identifiers */ 
-  virtual void                                           badStrips(std::set<Identifier>& strips, bool ignoreBadModules = false, bool ignoreBadChips = false) = 0;  
+  virtual void badStrips(std::set<Identifier>& strips, bool ignoreBadModules=false, bool ignoreBadChips=false)=0;  
   /** Set of bad strip Identifiers for a particular module*/
-  virtual void                                           badStrips(const Identifier & moduleId, std::set<Identifier>& strips, bool ignoreBadModules = false, bool ignoreBadChips = false) = 0;
+  virtual void badStrips(const Identifier& moduleId, std::set<Identifier>& strips, bool ignoreBadModules=false, bool ignoreBadChips=false)=0;
 
   /** Get the chip number containing a particular strip*/
-  virtual int                                            getChip(const Identifier & stripId) = 0;
-
-private:
+  virtual int getChip(const Identifier& stripId)=0;
 
+ private:
 };
 
-inline const InterfaceID & ISCT_ConfigurationConditionsSvc::interfaceID(){
-  static const InterfaceID IID_SCT_ConfigurationConditionsSvc("SCT_ConfigurationConditionsSvc",1,0);
+inline const InterfaceID& ISCT_ConfigurationConditionsSvc::interfaceID() {
+  static const InterfaceID IID_SCT_ConfigurationConditionsSvc{"SCT_ConfigurationConditionsSvc", 1, 0};
   return IID_SCT_ConfigurationConditionsSvc;
 }
 
-#endif
+#endif // ISCT_ConfigurationConditionsSvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_DCSConditionsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_DCSConditionsSvc.h
index 380c9efcb26a0c468132c4d12fa2628c39ae181a..bcaf741b7681296500bc21ca10397202c20ce85b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_DCSConditionsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_DCSConditionsSvc.h
@@ -6,7 +6,7 @@
  * @file ISCT_DCSConditionsSvc.h
  * interface file for service that keeps track of errors in the bytestream.
  * @author timothy.robert.andeen@cern.ch
-**/
+ **/
 
 #ifndef ISCT_DCSConditionsSvc_h
 #define ISCT_DCSConditionsSvc_h
@@ -16,45 +16,42 @@
 
 class Identifier;
 class IdentifierHash;
-class StatusCode;
 
 /**
  * @class SCT_DCSConditionsSvc
  * Service that returns DCS info about a module
-**/
+ **/
 
 class ISCT_DCSConditionsSvc: virtual public ISCT_ConditionsSvc {
 
-public:
+ public:
   //@name Service methods
   //@{
 
-  virtual ~ISCT_DCSConditionsSvc(){}
+  virtual ~ISCT_DCSConditionsSvc() {}
 
-  //  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
-  static const InterfaceID & interfaceID();
+  static const InterfaceID& interfaceID();
 
   //@}
-  virtual float modHV(const Identifier & elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT)=0;
+  virtual float modHV(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT)=0;
   //Does the same for hashIds
-  virtual float modHV(const IdentifierHash & hashId)=0;
+  virtual float modHV(const IdentifierHash& hashId)=0;
   //Returns temp0 (0 if there is no information)
-  virtual float hybridTemperature(const Identifier & elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT)=0;
+  virtual float hybridTemperature(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT)=0;
   //Does the same for hashIds
-  virtual float hybridTemperature(const IdentifierHash & hashId)=0;
+  virtual float hybridTemperature(const IdentifierHash& hashId)=0;
   //Returns temp0 + correction for Lorentz angle calculation (0 if there is no information)
-  virtual float sensorTemperature(const Identifier & elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT)=0;
+  virtual float sensorTemperature(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT)=0;
   //Does the same for hashIds
-  virtual float sensorTemperature(const IdentifierHash & hashId)=0;
+  virtual float sensorTemperature(const IdentifierHash& hashId)=0;
 
-private:
+ private:
 
 };
 
-inline const InterfaceID & ISCT_DCSConditionsSvc::interfaceID(){
-  static const InterfaceID IID_SCT_DCSConditionsSvc("SCT_DCSConditionsSvc",1,0);
+inline const InterfaceID& ISCT_DCSConditionsSvc::interfaceID() {
+  static const InterfaceID IID_SCT_DCSConditionsSvc{"SCT_DCSConditionsSvc", 1, 0};
   return IID_SCT_DCSConditionsSvc;
 }
 
-#endif
-
+#endif // ISCT_DCSConditionsSvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_DetectorLevelConditionsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_DetectorLevelConditionsSvc.h
index 4562cf38e27b51d1a63e09da9018bf8c5dbcadc0..63927349025afdc81fe5883a72349f3db24c4486 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_DetectorLevelConditionsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_DetectorLevelConditionsSvc.h
@@ -6,63 +6,61 @@
  * @file ISCT_DetectorLevelConditionsSvc.h
  * interface file for services that report on the detector or ECC/B/ECA level
  * @author gwilliam@mail.cern.ch
-**/
+ **/
 
 #ifndef ISCT_DetectorLevelConditionsSvc_h
 #define ISCT_DetectorLevelConditionsSvc_h
 
-#include <set>
 #include <list>
-#include <map>
 
 class StatusCode;
 
 /**
  * @class SCT_DetectorLevelConditionsSvc
  * Interface for services that report on the detector or ECC/B/ECA level
-**/
+ **/
 
 class ISCT_DetectorLevelConditionsSvc: virtual public IInterface {
 
-public:
+ public:
   //@name Service methods
   //@{
 
-  virtual ~ISCT_DetectorLevelConditionsSvc(){}
+  virtual ~ISCT_DetectorLevelConditionsSvc() {}
 
-  static const InterfaceID & interfaceID();
+  static const InterfaceID& interfaceID();
 
   //@}
 
   ///Summarise the result of the detector as good/bad
-  virtual bool isGood() = 0;
+  virtual bool isGood()=0;
 
   ///Summarise the result of the barrel/endcap as good/bad
   //BEC = -2/0/2 for ECC/B/ECA
-  virtual bool isGood(int bec) = 0;
+  virtual bool isGood(int bec)=0;
   
   ///Fill the data structures, if not overridden then return failure
-  virtual StatusCode fillData() = 0;
+  virtual StatusCode fillData()=0;
   
   /**Fill the data structures from a callback, the arguments are needed by IOVDbSvc, 
    * if not overridden then return failure
    **/
-  virtual StatusCode fillData(int& i , std::list<std::string>& l) = 0;
+  virtual StatusCode fillData(int& i, std::list<std::string>& l)=0;
   
   ///Report whether the structure was filled
-  virtual bool filled() const = 0;
+  virtual bool filled() const =0;
 
   ///Report whether the tool can fill its data during the initialize phase
   virtual bool canFillDuringInitialize()=0;
 
 
-private:
+ private:
 
 };
 
-inline const InterfaceID & ISCT_DetectorLevelConditionsSvc::interfaceID(){
-  static const InterfaceID IID_SCT_DetectorLevelConditionsSvc("SCT_DetectorLevelConditionsSvc",1,0);
+inline const InterfaceID& ISCT_DetectorLevelConditionsSvc::interfaceID() {
+  static const InterfaceID IID_SCT_DetectorLevelConditionsSvc{"SCT_DetectorLevelConditionsSvc", 1, 0};
   return IID_SCT_DetectorLevelConditionsSvc;
 }
 
-#endif
+#endif // ISCT_DetectorLevelConditionsSvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ElectricFieldTool.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ElectricFieldTool.h
index 55e0c1f797dee5eb3c9f82f1a1ac8662acbf5c63..c03d893323b981d4f23af287074b71a6cc0a5769 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ElectricFieldTool.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ElectricFieldTool.h
@@ -7,12 +7,13 @@
  * @note primary author for Pixels Carolina Deluca (carolina.deluca.silberberg@cern.ch)
  * @author for SCT Peter Vankov (peter.vankov@cern.ch)
  **/
+
 #ifndef ISCT_ElectricFieldTool_h
 #define ISCT_ElectricFieldTool_h
+
 //Gaudi Includes
 #include "GaudiKernel/AlgTool.h"
 
-
 /**
  * @class ISCT_ElectricFieldTool
  * Interface class for tool providing Electric Field
@@ -20,9 +21,9 @@
 class ISCT_ElectricFieldTool: virtual public IAlgTool
 {
  public:
-  virtual ~ISCT_ElectricFieldTool(){}
+  virtual ~ISCT_ElectricFieldTool() {}
   
-  static const InterfaceID & interfaceID(); 
+  static const InterfaceID& interfaceID(); 
 
   /// Get the Ramo potential for a given detector element (x,y,z)-dependent
   /// Assumes the center of the detector
@@ -30,13 +31,14 @@ class ISCT_ElectricFieldTool: virtual public IAlgTool
                                   double fluence,
                                   double depletionVoltage,
                                   double sensorThickness,
-                                  double biasVoltage) = 0;
+                                  double biasVoltage)=0;
   
 };
 
-inline const InterfaceID & ISCT_ElectricFieldTool::interfaceID(){
-  static const InterfaceID IID_ISCT_ElectricFieldTool("ISCT_ElectricFieldTool",1,0); 
+inline const InterfaceID& ISCT_ElectricFieldTool::interfaceID() {
+  static const InterfaceID IID_ISCT_ElectricFieldTool{"ISCT_ElectricFieldTool", 1, 0};
   return IID_ISCT_ElectricFieldTool; 
 
 }
-#endif
+
+#endif // ISCT_ElectricFieldTool_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_FlaggedConditionSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_FlaggedConditionSvc.h
index c1d026df4f5637e29e8e043d61c3c40846529376..0d453a1803efdffd8caba7519262cc4c60e92251 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_FlaggedConditionSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_FlaggedConditionSvc.h
@@ -24,7 +24,7 @@
 
 // Forward declarations
 class Identifier;
-class StatusCode;
+class IdentifierHash;
 
 /*
  * @class SCT_FlaggedConditionSvc
@@ -33,38 +33,38 @@ class StatusCode;
 
 class ISCT_FlaggedConditionSvc: virtual public ISCT_ConditionsSvc {
 
-public:
+ public:
   //@name Service methods
   //@{
-  virtual ~ISCT_FlaggedConditionSvc(){}
-  static const InterfaceID & interfaceID();
+  virtual ~ISCT_FlaggedConditionSvc() {}
+  static const InterfaceID& interfaceID();
   //@}
 
   /**Flag a wafer as bad with a reason (by Identifier)*/
-  virtual bool flagAsBad(const Identifier& id, const std::string& source) = 0;
+  virtual bool flagAsBad(const Identifier& id, const std::string& source) =0;
   /**Flag a wafer ID as bad with a reason (by IdentifierHash)*/
-  virtual bool flagAsBad(const IdentifierHash& hashId, const std::string& source) = 0;
+  virtual bool flagAsBad(const IdentifierHash& hashId, const std::string& source) =0;
   
   /**Get the reason why the wafer is bad (by Identifier)*/ 
-  virtual const std::string& details(const Identifier& id) const = 0;
+  virtual const std::string& details(const Identifier& id) const =0;
   /**Get the reason why the wafer is bad (by IdentifierHash)*/ 
-  virtual const std::string& details(const IdentifierHash& id) const = 0;
+  virtual const std::string& details(const IdentifierHash& id) const =0;
 
   /**Get number flagged as bad (per event)*/
-  virtual int numBadIds() const = 0;
+  virtual int numBadIds() const =0;
 
   /**Get IdentifierHashs ofwafers flagged as bad + reason (per event)*/
-  virtual std::map <IdentifierHash, std::string>* getBadIds() const = 0;
+  virtual const std::map<IdentifierHash, std::string>* getBadIds() const =0;
 
   /**Reset between events*/
-  virtual void resetBadIds() = 0;
+  virtual void resetBadIds()=0;
 
  private:
 };
 
-inline const InterfaceID & ISCT_FlaggedConditionSvc::interfaceID(){
-  static const InterfaceID IID_SCT_FlaggedConditionSvc("SCT_FlaggedConditionSvc",1,0);
+inline const InterfaceID& ISCT_FlaggedConditionSvc::interfaceID() {
+  static const InterfaceID IID_SCT_FlaggedConditionSvc{"SCT_FlaggedConditionSvc", 1, 0};
   return IID_SCT_FlaggedConditionSvc;
 }
 
-#endif
+#endif // ISCT_FlaggedConditionSvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_MonitorConditionsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_MonitorConditionsSvc.h
index e0d56c050a743ca89ba1b0abedf8cc0140b79515..019f88c7d41b3702101da1911ae366accd61e79e 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_MonitorConditionsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_MonitorConditionsSvc.h
@@ -6,7 +6,7 @@
  * @file ISCT_MonitorConditionsSvc.h
  * interface file for service that keeps track of errors caught by the monitoring.
  * @author gwilliam@mail.cern.ch
-**/
+ **/
 
 #ifndef ISCT_MonitorConditionsSvc_h
 #define ISCT_MonitorConditionsSvc_h
@@ -18,20 +18,19 @@
 #include "SCT_ConditionsServices/ISCT_ConditionsSvc.h"
 
 class Identifier;
-class StatusCode;
 
 /**
  * @class ISCT_MonitorConditionsSvc
  * Service that keeps track of errors caught by the monitoring
-**/
+ **/
 
 class ISCT_MonitorConditionsSvc: virtual public ISCT_ConditionsSvc {
 
-public:
+ public:
   //@name Service methods
   //@{
 
-  virtual ~ISCT_MonitorConditionsSvc(){}
+  virtual ~ISCT_MonitorConditionsSvc() {}
   static const InterfaceID & interfaceID();
 
   //@}
@@ -39,17 +38,17 @@ public:
   /// Return a list of bad stip Identifiers
   virtual void badStrips(std::set<Identifier>& strips)=0;
   /// Return a list of bad stip Identifiers for a given module
-  virtual void badStrips(const Identifier & moduleId, std::set<Identifier>& strips)=0;
+  virtual void badStrips(const Identifier& moduleId, std::set<Identifier>& strips)=0;
   /// Return a (space-separated) string of bad stip numbers (including hyphanated ranges) as they are written to the DB 
-  virtual std::string badStripsAsString(const Identifier & moduleId)=0;
+  virtual std::string badStripsAsString(const Identifier& moduleId)=0;
 
-private:
+ private:
 
 };
 
-inline const InterfaceID & ISCT_MonitorConditionsSvc::interfaceID(){
-  static const InterfaceID IID_SCT_MonitorConditionsSvc("SCT_MonitorConditionsSvc",1,0);
+inline const InterfaceID& ISCT_MonitorConditionsSvc::interfaceID() {
+  static const InterfaceID IID_SCT_MonitorConditionsSvc{"SCT_MonitorConditionsSvc", 1, 0};
   return IID_SCT_MonitorConditionsSvc;
 }
 
-#endif
+#endif // ISCT_MonitorConditionsSvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_RadDamageSummarySvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_RadDamageSummarySvc.h
index fbb84434240f1d5c958f47dfcea2af9accaefd7a..8aab574206b33d42f2c031a8ecc307e2e23e9532 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_RadDamageSummarySvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_RadDamageSummarySvc.h
@@ -11,13 +11,13 @@
 
 #ifndef ISCT_RadDamageSummarySvc_h
 #define ISCT_RadDamageSummarySvc_h
+
 //Gaudi Includes
 #include "GaudiKernel/IInterface.h"
-#include "AthenaKernel/IOVSvcDefs.h"
-#include "CLHEP/Vector/ThreeVector.h"
+// #include "AthenaKernel/IOVSvcDefs.h"
+// #include "CLHEP/Vector/ThreeVector.h"
 
 //forward declarations
-class Identifier;
 class IdentifierHash;
 
 /**
@@ -28,27 +28,25 @@ class IdentifierHash;
 class ISCT_RadDamageSummarySvc: virtual public IInterface
 {
  public:
-  virtual ~ISCT_RadDamageSummarySvc(){}
+  virtual ~ISCT_RadDamageSummarySvc() {}
   
-  static const InterfaceID & interfaceID(); //!< reimplemented from IInterface
-
-  // virtual double RamoPotential(const IdentifierHash & elementHash, const Hep3Vector & pos) = 0;
-  virtual double ChargeTrappingProbability(const IdentifierHash & elementHash, const double & zpos) = 0;
-  virtual double TrappingConstant(const IdentifierHash & elementHash, const double & zpos) = 0;
-  virtual double ElectricField(const IdentifierHash & elementHash, const double & zpos) = 0;
-  virtual double TrappingTime(const IdentifierHash & elementHash, const double & zpos) = 0;
-  virtual double TimeToElectrode(const IdentifierHash & elementHash, const double & zpos) = 0;
-  virtual double TrappingPositionZ(const IdentifierHash & elementHash, const double & zpos) = 0;
-  virtual double HoleDriftMobility(const IdentifierHash & elementHash, const double & zpos) = 0;
-  virtual bool doCTrap(const IdentifierHash & elementHash, const double & zpos) = 0; 
-  virtual void HoleTransport(double & x0, double & y0, double & xfin, double & yfin, double & Q_m2, double & Q_m1, double & Q_00, double & Q_p1, double & Q_p2 )const  = 0;
-  virtual void InitPotentialValue() = 0;
-
+  static const InterfaceID& interfaceID(); //!< reimplemented from IInterface
+
+  virtual double ChargeTrappingProbability(const IdentifierHash& elementHash, const double& zpos) =0;
+  virtual double TrappingConstant(const IdentifierHash& elementHash, const double& zpos) =0;
+  virtual double ElectricField(const IdentifierHash& elementHash, const double& zpos) =0;
+  virtual double TrappingTime(const IdentifierHash& elementHash, const double& zpos) =0;
+  virtual double TimeToElectrode(const IdentifierHash& elementHash, const double& zpos) =0;
+  virtual double TrappingPositionZ(const IdentifierHash& elementHash, const double& zpos) =0;
+  virtual double HoleDriftMobility(const IdentifierHash& elementHash, const double& zpos) =0;
+  virtual bool doCTrap(const IdentifierHash& elementHash, const double& zpos) =0; 
+  virtual void HoleTransport(double& x0, double& y0, double& xfin, double& yfin, double& Q_m2, double& Q_m1, double& Q_00, double& Q_p1, double& Q_p2) const =0;
+  virtual void InitPotentialValue()=0;
 };
 
-inline const InterfaceID & ISCT_RadDamageSummarySvc::interfaceID(){
-  static const InterfaceID IID_ISCT_RadDamageSummarySvc("ISCT_RadDamageSummarySvc",1,0);  
+inline const InterfaceID& ISCT_RadDamageSummarySvc::interfaceID() {
+  static const InterfaceID IID_ISCT_RadDamageSummarySvc{"ISCT_RadDamageSummarySvc", 1, 0};
   return IID_ISCT_RadDamageSummarySvc;  
-
 }
-#endif
+
+#endif // ISCT_RadDamageSummarySvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadCalibChipDataSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadCalibChipDataSvc.h
index 58a25179c0c5e19df208c819a67f1cbf93caa0b1..d4e73f4a2e282e5213297af084c209e6a20a5b84 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadCalibChipDataSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadCalibChipDataSvc.h
@@ -3,7 +3,7 @@
 */
 
 /** @file ISCT_ReadCalibDataTool.h Interface file for SCT_ReadCalibDataSvc.
-*/
+ */
 
 // Multiple inclusion protection
 #ifndef ISCT_READ_CALIB_CHIP_DATA_SVC
@@ -18,50 +18,46 @@
 #include "InDetConditionsSummaryService/InDetHierarchy.h"
 #include "SCT_ConditionsServices/ISCT_ConditionsSvc.h"
 
-class ISvcLocator;
-class SCT_CalibData;
-class Identifier;
-class StatusCode;
-
 class ISCT_ReadCalibChipDataSvc: virtual public ISCT_ConditionsSvc {
 
  public:
   
   //----------Public Member Functions----------//
   // Structors
-  virtual ~ISCT_ReadCalibChipDataSvc(){}                                           //!< Destructor
+  virtual ~ISCT_ReadCalibChipDataSvc() {} //!< Destructor
   
   // Retrive interface ID
   static const InterfaceID& interfaceID();
   
   /// @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) =0;
+  virtual bool canReportAbout(InDetConditions::Hierarchy)=0;
   ///Summarise the result from the service as good/bad
-  virtual bool isGood(const Identifier&, InDetConditions::Hierarchy) =0;
+  virtual bool isGood(const Identifier&, InDetConditions::Hierarchy)=0;
   ///same thing with id hash, introduced by shaun with dummy method for now
   virtual bool isGood(const IdentifierHash& /*hashId*/)=0;
   // Fill the data structures
   StatusCode fillData()=0;
   // Fill the data structures from a Callback 
-  StatusCode fillData(int&, std::list<std::string>&) =0;
+  StatusCode fillData(int&, std::list<std::string>&)=0;
   // Report whether the map was filled
-  bool filled() const  =0;
+  bool filled() const =0;
   // Report whether the service can fill its data during the initialize phase
-  virtual bool canFillDuringInitialize() =0;
+  virtual bool canFillDuringInitialize()=0;
 
-  virtual StatusCode fillCalibData(std::list<std::string>&) =0;             //!< Callback for retriving chip data
+  virtual StatusCode fillCalibData(std::list<std::string>&)=0; //!< Callback for retriving chip data
   
   // Methods to return calibration data 
   //PJ change to wafer hash id?!
-  virtual std::vector<float> getNPtGainData(const Identifier & moduleId, const int side, const std::string & datatype) =0; //!<Get NPtGain data per wafer
-  virtual std::vector<float> getNoiseOccupancyData(const Identifier & moduleId, const int side, const std::string & datatype) =0; //!<Get NoiseOccupancy data wafer
+  virtual std::vector<float> getNPtGainData(const Identifier& moduleId, const int side, const std::string& datatype)=0; //!<Get NPtGain data per wafer
+  virtual std::vector<float> getNoiseOccupancyData(const Identifier& moduleId, const int side, const std::string& datatype)=0; //!<Get NoiseOccupancy data wafer
 
 };
 
-inline const InterfaceID & ISCT_ReadCalibChipDataSvc::interfaceID(){
-  static const InterfaceID IID_SCT_ReadCalibChipDataSvc("SCT_ReadCalibChipDataSvc",1,0);
+inline const InterfaceID & ISCT_ReadCalibChipDataSvc::interfaceID() {
+  static const InterfaceID IID_SCT_ReadCalibChipDataSvc{"SCT_ReadCalibChipDataSvc", 1, 0};
   return IID_SCT_ReadCalibChipDataSvc;
 }
+
 //---------------------------------------------------------------------- 
 #endif // ISCT_READ_CALIB_CHIP_DATA_SVC
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadCalibDataSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadCalibDataSvc.h
index 3fe61750668299bc8a82873cc44c9aed90ab64c4..4c00830ab3e7007e59b71a5cb506bafc9169a3aa 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadCalibDataSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadCalibDataSvc.h
@@ -3,7 +3,7 @@
 */
 
 /** @file ISCT_ReadCalibDataTool.h Interface file for SCT_ReadCalibDataSvc.
-*/
+ */
 
 // Multiple inclusion protection
 #ifndef ISCT_READ_CALIB_DATA_SVC
@@ -22,50 +22,49 @@
 #include "InDetConditionsSummaryService/InDetHierarchy.h"
 #include "SCT_ConditionsServices/ISCT_ConditionsSvc.h"
 
-class ISvcLocator;
 class Identifier;
+class IdentifierHash;
 class StatusCode;
 
 class ISCT_ReadCalibDataSvc: virtual public ISCT_ConditionsSvc {
 
  public:
   
-  typedef struct{ 
+  typedef struct { 
     std::vector<std::string> scan;
     std::vector<std::string> defect;
     std::vector<float> value;
-  } calibDefectType;
+  } CalibDefectType;
 
   //----------Public Member Functions----------//
   // Structors
-  virtual ~ISCT_ReadCalibDataSvc(){}                                           //!< Destructor
+  virtual ~ISCT_ReadCalibDataSvc() {} //!< Destructor
   
   // Retrive interface ID
   static const InterfaceID& interfaceID();
   
   /// @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) =0;
+  virtual bool canReportAbout(InDetConditions::Hierarchy)=0;
   ///Summarise the result from the service as good/bad
-  virtual bool isGood(const Identifier&, InDetConditions::Hierarchy) =0;
+  virtual bool isGood(const Identifier&, InDetConditions::Hierarchy)=0;
   ///same thing with id hash, introduced by shaun with dummy method for now
   virtual bool isGood(const IdentifierHash& /*hashId*/)=0;
   // Fill the data structures
   StatusCode fillData()=0;
   // Fill the data structures from a Callback 
-  StatusCode fillData(int&, std::list<std::string>&) =0;
+  StatusCode fillData(int&, std::list<std::string>&)=0;
   // Report whether the map was filled
-  bool filled() const  =0;
+  bool filled() const =0;
   // Report whether the service can fill its data during the initialize phase
-  virtual bool canFillDuringInitialize() =0;
-
-  virtual StatusCode fillCalibDefectData(std::list<std::string>&) =0;             //!< Callback for retriving defect data
-  
+  virtual bool canFillDuringInitialize()=0;
+  virtual StatusCode fillCalibDefectData(std::list<std::string>&)=0; //!< Callback for retriving defect data  
 };
 
-inline const InterfaceID & ISCT_ReadCalibDataSvc::interfaceID(){
-  static const InterfaceID IID_SCT_ReadCalibDataSvc("SCT_ReadCalibDataSvc",1,0);
+inline const InterfaceID& ISCT_ReadCalibDataSvc::interfaceID() {
+  static const InterfaceID IID_SCT_ReadCalibDataSvc{"SCT_ReadCalibDataSvc", 1, 0};
   return IID_SCT_ReadCalibDataSvc;
 }
+
 //---------------------------------------------------------------------- 
 #endif // ISCT_READ_CALIB_DATA_SVC
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadoutTool.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadoutTool.h
index 2f7a753902e8526fe1c6e442bd9f2632603da048..23372a244f41871e16a34c9a389d7c6775941206 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadoutTool.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_ReadoutTool.h
@@ -8,7 +8,6 @@
  * @author Carl Gwilliam <gwilliam@mail.cern.ch>
  */
 
-
 #ifndef SCT_ConditionServices_ISCT_ReadoutTool_h
 #define SCT_ConditionServices_ISCT_ReadoutTool_h
 
@@ -20,10 +19,9 @@
 
 // Forward declarations
 class Identifier;
-class StatusCode;
 class SCT_Chip;
 
-static const InterfaceID IID_ISCT_ReadoutTool("InDet::ISCT_ReadoutTool", 1, 0);
+static const InterfaceID IID_ISCT_ReadoutTool{"InDet::ISCT_ReadoutTool", 1, 0};
 
 /**
  * @class ISCT_ReadoutTool
@@ -32,16 +30,16 @@ static const InterfaceID IID_ISCT_ReadoutTool("InDet::ISCT_ReadoutTool", 1, 0);
  */
 
 class ISCT_ReadoutTool : virtual public IAlgTool {
-public:
+ public:
 
   virtual ~ISCT_ReadoutTool() {};
   
   static const InterfaceID& interfaceID() { return IID_ISCT_ReadoutTool; };
   
   /** 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)=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)=0;
 };
 
-#endif
+#endif // SCT_ConditionServices_ISCT_ReadoutTool_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_SensorsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_SensorsSvc.h
index 845f5f971dcc0df29c66537fea201e275b152a58..c14595f11e797768d3e6be29c2f3cf2d69e6080f 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_SensorsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/ISCT_SensorsSvc.h
@@ -6,45 +6,41 @@
  * @file ISCT_SensorsSvc.h
  * header file for baseclass of SCT conditions services
  * @author shaun.roe@cern.ch
-**/
+ **/
+
 #ifndef ISCT_SensorsSvc_h
 #define ISCT_SensorsSvc_h
+
 //STL includes
 #include <list>
 #include <string>
 #include <vector>
 
-//boost include
-#include "boost/array.hpp"
-
 //Gaudi Includes
 #include "GaudiKernel/IInterface.h"
 
-
 //fwd declarations
-class IdentifierHash;
-class StatusCode;
+
 /**
  * @class ISCT_SensorsSvc
  * Base class to give a Vdep, crystal orientation and Mfr from conditions for each sensor in a module
-**/
-class ISCT_SensorsSvc: virtual public IInterface{
-public:
-  virtual ~ISCT_SensorsSvc(){}
+ **/
+class ISCT_SensorsSvc: virtual public IInterface {
+ public:
+  virtual ~ISCT_SensorsSvc() {}
   static const InterfaceID & interfaceID(); //!< reimplemented from IInterface
-  virtual StatusCode fillSensorsData(int&  i  , std::list<std::string>& keys)=0;
+  virtual StatusCode fillSensorsData(int& i, std::list<std::string>& keys)=0;
 
   ///Fill vector with sensors info
-  virtual void getSensorsData(std::vector<std::string> & userVector)=0;
-  //virtual std::string getManufacturer(const IdentifierHash &hashId)=0;
+  virtual void getSensorsData(std::vector<std::string>& userVector)=0;
   virtual std::string getManufacturer(unsigned int i)=0;
   virtual void printManufacturers()=0;
 };
 
 
-inline const InterfaceID & ISCT_SensorsSvc::interfaceID(){
-  static const InterfaceID IID("ISCT_SensorsSvc",1,0);
+inline const InterfaceID& ISCT_SensorsSvc::interfaceID() {
+  static const InterfaceID IID{"ISCT_SensorsSvc", 1, 0};
   return IID;
 }
 
-#endif
+#endif // ISCT_SensorsSvc_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/SCT_ConditionsParameters.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/SCT_ConditionsParameters.h
index 639c5fc7d24bfe433e51e9de88adcd9306907c63..7c86c9f73aa8ab2b4f3778326afa40c2a86b3283 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/SCT_ConditionsParameters.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/SCT_ConditionsServices/SCT_ConditionsParameters.h
@@ -8,12 +8,15 @@
  * by the ISCT_ConditionsParameterSvc, and their string interpretation
  * @author shaun.roe@cern.ch
 **/
+
 #ifndef SCT_ConditionsParameters_h
 #define SCT_ConditionsParameters_h
+
 #include <string>
+
 namespace SCT_ConditionsServices{
-  enum ParameterIndex{AVG_THRESHOLD,N_PARAMETERS,INVALID_PARAMETER};
-  static const std::string parameterNames[]={"average threshold per module side","number of parameters"};
+  enum ParameterIndex{AVG_THRESHOLD, N_PARAMETERS, INVALID_PARAMETER};
+  static const std::string parameterNames[]{"average threshold per module side","number of parameters"};
 }
-#endif
 
+#endif // SCT_ConditionsParameters_h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.cxx
index 420489093de31a4b8dd28077b44797309b96f40c..c2c91a543d3defe5d14b4229a5fd124e421ad2bb 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.cxx
@@ -30,15 +30,15 @@
 SCT_ByteStreamErrorsSvc::SCT_ByteStreamErrorsSvc( const std::string& name, ISvcLocator* pSvcLocator ) : 
   AthService(name, pSvcLocator), 
   m_sct_id{nullptr},
-  m_storeGate("StoreGateSvc",name),
-  m_detStore("DetectorStore",name),
-  m_cabling("SCT_CablingSvc",name),
+  m_storeGate{"StoreGateSvc", name},
+  m_detStore{"DetectorStore", name},
+  m_cabling{"SCT_CablingSvc", name},
   m_config("InDetSCT_ConfigurationConditionsSvc",name),
   m_filled(false) ,
   m_lookForSGErrContainer(true),
   //
-  m_rxRedundancy{nullptr},
-  m_tempMaskedChips{nullptr},
+  m_rxRedundancy{},
+  m_tempMaskedChips{},
   m_isRODSimulatedData(false),
   m_numRODsHVon(0),
   m_numRODsTotal(0),
@@ -57,7 +57,7 @@ SCT_ByteStreamErrorsSvc::SCT_ByteStreamErrorsSvc( const std::string& name, ISvcL
   declareProperty("RandomNumberSeed",m_randomSeed=1); // The seed of random numbers for ROD disabling
 
   for(int errorType=0; errorType<SCT_ByteStreamErrors::NUM_ERROR_TYPES; errorType++) {
-    m_bsErrors[errorType] = 0;
+    m_bsErrors[errorType].clear();
     m_numBsErrors[errorType] = 0;
   }
 }
@@ -67,12 +67,11 @@ StatusCode
 SCT_ByteStreamErrorsSvc::initialize(){
   StatusCode sc(StatusCode::SUCCESS);
 
+  m_rxRedundancy.clear();
   for(int errorType=0; errorType<SCT_ByteStreamErrors::NUM_ERROR_TYPES; errorType++) {
-    m_bsErrors[errorType] = new std::set<IdentifierHash>;
+    m_bsErrors[errorType].clear();
   }
 
-  m_rxRedundancy = new std::set<IdentifierHash>;
-
   m_isRODSimulatedData=false;
 
   IIncidentSvc* incsvc;
@@ -120,8 +119,6 @@ SCT_ByteStreamErrorsSvc::initialize(){
     } 
   }
 
-  m_tempMaskedChips = new std::map<Identifier, unsigned int>;
-
   // Read Handle Key
   ATH_CHECK(m_bsErrContainerName.initialize());
 
@@ -132,18 +129,7 @@ SCT_ByteStreamErrorsSvc::initialize(){
 /** Finalize */
 StatusCode
 SCT_ByteStreamErrorsSvc::finalize(){
-  StatusCode sc(StatusCode::SUCCESS);
-  for(int errType=0; errType<SCT_ByteStreamErrors::NUM_ERROR_TYPES; errType++) {
-    delete m_bsErrors[errType];
-    m_bsErrors[errType] = 0;
-  }
-  delete m_rxRedundancy;
-  m_rxRedundancy = 0;
-
-  delete m_tempMaskedChips;
-  m_tempMaskedChips = nullptr;
-
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 //////////////////////////////////////////////////////////////////////////////////
@@ -156,7 +142,7 @@ SCT_ByteStreamErrorsSvc::finalize(){
 void
 SCT_ByteStreamErrorsSvc::handle(const Incident& inc) {
   if ((inc.type() == "BeginRun") && (m_useRXredundancy)) {
-    m_rxRedundancy->clear();
+    m_rxRedundancy.clear();
     m_rodDecodeStatuses.clear();
 
     std::vector<boost::uint32_t> listOfRODs;
@@ -179,11 +165,11 @@ SCT_ByteStreamErrorsSvc::handle(const Incident& inc) {
 	std::pair<bool, bool> links = m_config->badLinks(modId);
 	if (((! links.first) && ( links.second) && (side==1)) ||  
 	  ((links.first) && ( ! links.second) && (side==0))) {
-	  m_rxRedundancy->insert(*hashIt);
+	  m_rxRedundancy.insert(*hashIt);
 	}
       }
     }
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"Number of hashes in redundancy are "<<m_rxRedundancy->size()<<endmsg;
+    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"Number of hashes in redundancy are "<<m_rxRedundancy.size()<<endmsg;
     
   } else if (inc.type() == "BeginEvent") {
     this->resetSets();
@@ -197,7 +183,7 @@ SCT_ByteStreamErrorsSvc::handle(const Incident& inc) {
       rodDecodeStatus.second = false;
     }
     m_firstTempMaskedChips.clear();
-    m_tempMaskedChips->clear();
+    m_tempMaskedChips.clear();
   }
   return;
 }
@@ -315,36 +301,36 @@ SCT_ByteStreamErrorsSvc::isGood(const IdentifierHash & elementIdHash) {
   
   bool result(true);
   
-  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::TimeOutError]->begin(),
-		      m_bsErrors[SCT_ByteStreamErrors::TimeOutError]->end(),
-		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::TimeOutError]->end());
+  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::TimeOutError].begin(),
+		      m_bsErrors[SCT_ByteStreamErrors::TimeOutError].end(),
+		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::TimeOutError].end());
   if (!result) return result;
-  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::BCIDError]->begin(),
-		      m_bsErrors[SCT_ByteStreamErrors::BCIDError]->end(),
-		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::BCIDError]->end());
+  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::BCIDError].begin(),
+		      m_bsErrors[SCT_ByteStreamErrors::BCIDError].end(),
+		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::BCIDError].end());
   if (!result) return result;
-  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::LVL1IDError]->begin(),
-		      m_bsErrors[SCT_ByteStreamErrors::LVL1IDError]->end(),
-		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::LVL1IDError]->end());
+  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::LVL1IDError].begin(),
+		      m_bsErrors[SCT_ByteStreamErrors::LVL1IDError].end(),
+		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::LVL1IDError].end());
   if (!result) return result;
-  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::MaskedLink]->begin(),
-		      m_bsErrors[SCT_ByteStreamErrors::MaskedLink]->end(),
-		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::MaskedLink]->end());
+  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::MaskedLink].begin(),
+		      m_bsErrors[SCT_ByteStreamErrors::MaskedLink].end(),
+		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::MaskedLink].end());
   if (!result) return result;
 
-  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::ROBFragmentError]->begin(),
-		      m_bsErrors[SCT_ByteStreamErrors::ROBFragmentError]->end(),
-		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::ROBFragmentError]->end());
+  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::ROBFragmentError].begin(),
+		      m_bsErrors[SCT_ByteStreamErrors::ROBFragmentError].end(),
+		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::ROBFragmentError].end());
   if (!result) return result;
 
-  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::MissingLinkHeaderError]->begin(),
-		      m_bsErrors[SCT_ByteStreamErrors::MissingLinkHeaderError]->end(),
-		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::MissingLinkHeaderError]->end());
+  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::MissingLinkHeaderError].begin(),
+		      m_bsErrors[SCT_ByteStreamErrors::MissingLinkHeaderError].end(),
+		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::MissingLinkHeaderError].end());
   if (!result) return result;
 
-  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::MaskedROD]->begin(),
-		      m_bsErrors[SCT_ByteStreamErrors::MaskedROD]->end(),
-		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::MaskedROD]->end());
+  result = (std::find(m_bsErrors[SCT_ByteStreamErrors::MaskedROD].begin(),
+		      m_bsErrors[SCT_ByteStreamErrors::MaskedROD].end(),
+		      elementIdHash) == m_bsErrors[SCT_ByteStreamErrors::MaskedROD].end());
   if (!result) return result;
 
   // If all 6 chips of a link issue ABCD errors or are bad chips or temporarily masked chips, the link is treated as bad one. 
@@ -356,7 +342,7 @@ SCT_ByteStreamErrorsSvc::isGood(const IdentifierHash & elementIdHash) {
   short id(side==0 ? 0 : 6);
   bool allChipsBad(true);
   for(int errType=SCT_ByteStreamErrors::ABCDError_Chip0; (errType<=SCT_ByteStreamErrors::ABCDError_Chip5) and allChipsBad; errType++) {
-    bool issueABCDError = (std::find(m_bsErrors[errType]->begin(), m_bsErrors[errType]->end(), elementIdHash)!=m_bsErrors[errType]->end());
+    bool issueABCDError = (std::find(m_bsErrors[errType].begin(), m_bsErrors[errType].end(), elementIdHash)!=m_bsErrors[errType].end());
     bool isBadChip = ((badChips >> (id)) & 0x1);
     bool isTempMaskedChip = ((tempMaskedChips2 >> (id)) & 0x1);
     id++;
@@ -387,7 +373,7 @@ void
 SCT_ByteStreamErrorsSvc::resetSets() {
 
   for(int errType=0; errType<SCT_ByteStreamErrors::NUM_ERROR_TYPES; errType++) {
-    m_bsErrors[errType]->clear();
+    m_bsErrors[errType].clear();
   }
 
   return;
@@ -400,7 +386,7 @@ SCT_ByteStreamErrorsSvc::resetSets() {
  * e.g. for monitoring plots.
  */
 
-std::set<IdentifierHash>* 
+const std::set<IdentifierHash>* 
 SCT_ByteStreamErrorsSvc::getErrorSet(int errorType) {
 
   if (!m_filled) {
@@ -410,7 +396,7 @@ SCT_ByteStreamErrorsSvc::getErrorSet(int errorType) {
 					<<endmsg;
   }
   if(errorType>=0 and errorType<SCT_ByteStreamErrors::NUM_ERROR_TYPES) {
-    return m_bsErrors[errorType];
+    return &(m_bsErrors[errorType]);
   }
   return 0;
 }
@@ -457,9 +443,9 @@ SCT_ByteStreamErrorsSvc::fillData() {
     for (const auto* elt : *errCont) {
       addError(elt->first,elt->second);
       if (m_useRXredundancy) {
-	bool result = std::find(m_rxRedundancy->begin(),
-				m_rxRedundancy->end(),
-				elt->first) != m_rxRedundancy->end();
+	bool result = std::find(m_rxRedundancy.begin(),
+				m_rxRedundancy.end(),
+				elt->first) != m_rxRedundancy.end();
 	if (result) {
 	  /// error in a module using RX redundancy - add an error for the other link as well!!
 	  int side = m_sct_id->side(m_sct_id->wafer_id(elt->first));
@@ -501,7 +487,7 @@ SCT_ByteStreamErrorsSvc::filled() const{
 void 
 SCT_ByteStreamErrorsSvc::addError(IdentifierHash id, int errorType) {
   if(errorType>=0 and errorType<SCT_ByteStreamErrors::NUM_ERROR_TYPES) {
-    m_bsErrors[errorType]->insert(id);
+    m_bsErrors[errorType].insert(id);
   }
 }
 
@@ -622,10 +608,10 @@ void SCT_ByteStreamErrorsSvc::setFirstTempMaskedChip(const IdentifierHash& hashI
   
   int type(0);
   // Check if Rx redundancy is used or not in this module
-  if(m_rxRedundancy->find(hash_side0)!=m_rxRedundancy->end() or 
-     m_rxRedundancy->find(hash_side1)!=m_rxRedundancy->end()) {
+  if(m_rxRedundancy.find(hash_side0)!=m_rxRedundancy.end() or 
+     m_rxRedundancy.find(hash_side1)!=m_rxRedundancy.end()) {
     // Rx redundancy is used in this module.
-    std::pair<bool, bool> links = m_config->badLinks(moduleId);
+    std::pair<bool, bool> links(m_config->badLinks(moduleId));
     if(links.first and not links.second) {
       // link-1 is broken
       type = 1;
@@ -654,7 +640,42 @@ void SCT_ByteStreamErrorsSvc::setFirstTempMaskedChip(const IdentifierHash& hashI
 		      " firstTempMaskedChip " << firstTempMaskedChip);
     }
   }
-      
+
+  // "Modified" module (using Rx redundancy) case
+  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
+     fullSerialNumber==20220330200693    // hash=5554 bec=0 layer=3 eta=-5 phi=29
+     ) {
+    if(type!=1) ATH_MSG_WARNING("Link-0 is broken but modified module readingout link-0, inconsistent");
+    type = 3;
+  }
+  if(// Readout through link-1
+     fullSerialNumber==20220170200653 or // hash=2786 bec=0 layer=1 eta= 4 phi= 1
+     fullSerialNumber==20220330200117 or // hash=5516 bec=0 layer=3 eta= 1 phi=27
+     fullSerialNumber==20220330200209 or // hash=5062 bec=0 layer=3 eta= 2 phi= 8
+     fullSerialNumber==20220330200505 or // hash=5260 bec=0 layer=3 eta= 5 phi=16
+     fullSerialNumber==20220330200637 or // hash=4184 bec=0 layer=2 eta=-6 phi=20
+     fullSerialNumber==20220330200701    // hash=4136 bec=0 layer=2 eta=-6 phi=18
+     ) {
+    if(type!=2) ATH_MSG_WARNING("Link-1 is broken but modified module readingout link-1, inconsistent");
+    type = 4;
+  }
+
+  static const int chipOrder[5][12] = {
+    // type=0 not prepared for both link-0 and link-1 are working
+    {},
+    // type=1 link-1 is broken: chip 0 1 2 3 4 5 6 7 8 9 10 11
+    {0, 1, 2, 3,  4,  5, 6, 7, 8,  9, 10, 11},
+    // type=2 link-0 is broken: chip 6 7 8 9 10 11 0 1 2 3 4 5
+    {6, 7, 8, 9, 10, 11, 0, 1, 2,  3,  4,  5},
+    // type=3 "modified" modules and link-1 is broken: chip 0 1 2 3 4 5 7 8 9 10 11 6
+    {0, 1, 2, 3,  4,  5, 7, 8, 9, 10, 11,  6},
+    // type=4 "modified" modules and link-0 is broken: chip 6 7 8 9 10 11 1 2 3 4 5 0
+    {6, 7, 8, 9, 10, 11, 1, 2, 3,  4,  5,  0}
+  };
+
   unsigned int tempMaskedChips2(0);
   if(type==0) {
     // both link-0 and link-1 are working
@@ -688,26 +709,18 @@ void SCT_ByteStreamErrorsSvc::setFirstTempMaskedChip(const IdentifierHash& hashI
 	addError(hash_side1, SCT_ByteStreamErrors::TempMaskedChip0+iChip-6);
       }
     }
-  } else if(type==1) {
-    // link-1 is broken: chip 0 1 2 3 4 5 6 7 8 9 10 11
-    if(firstTempMaskedChip>0) {
-      for(int iChip(firstTempMaskedChip-1); iChip<12; iChip++) {
-	tempMaskedChips2 |= (1<<iChip);
-	if(iChip<6) addError(hash_side0, SCT_ByteStreamErrors::TempMaskedChip0+iChip);
-	else        addError(hash_side1, SCT_ByteStreamErrors::TempMaskedChip0+iChip-6);
-      }
-    }
   } else {
-    // link-0 is broken: chip 6 7 8 9 10 11 0 1 2 3 4 5
+    // type=1, 2, 3, 4: cases using Rx redundancy
     if(firstTempMaskedChip>0) {
-      int tmpFirstTempMaskedChip(firstTempMaskedChip);
-      if(tmpFirstTempMaskedChip<=6) tmpFirstTempMaskedChip += 12;
-      for(int iChip(tmpFirstTempMaskedChip-1); iChip<12+6; iChip++) {
-	int jChip(iChip);
-	if(jChip>=12) jChip -= 12;
-	tempMaskedChips2 |= (1<<jChip);
-	if(jChip<6) addError(hash_side0, SCT_ByteStreamErrors::TempMaskedChip0+jChip);
-	else        addError(hash_side1, SCT_ByteStreamErrors::TempMaskedChip0+jChip-6);
+      bool toBeMasked(false);
+      for(int iChip(0); iChip<12; iChip++) {
+	int jChip(chipOrder[type][iChip]);
+	if(jChip==static_cast<int>(firstTempMaskedChip-1)) toBeMasked = true;
+	if(toBeMasked) {
+	  tempMaskedChips2 |= (1<<jChip);
+	  if(jChip<6) addError(hash_side0, SCT_ByteStreamErrors::TempMaskedChip0+jChip);
+	  else        addError(hash_side1, SCT_ByteStreamErrors::TempMaskedChip0+jChip-6);
+	}
       }
     }
   }
@@ -723,7 +736,7 @@ void SCT_ByteStreamErrorsSvc::setFirstTempMaskedChip(const IdentifierHash& hashI
 		  << " firstTempMaskedChip " << firstTempMaskedChip
 		  << " tempMaskedChips2 " << tempMaskedChips2);
 
-  (*m_tempMaskedChips)[moduleId] = tempMaskedChips2;
+  m_tempMaskedChips[moduleId] = tempMaskedChips2;
 }
 
 unsigned int SCT_ByteStreamErrorsSvc::getFirstTempMaskedChip(const IdentifierHash& hashId) const {
@@ -733,8 +746,8 @@ unsigned int SCT_ByteStreamErrorsSvc::getFirstTempMaskedChip(const IdentifierHas
 }
 
 unsigned int SCT_ByteStreamErrorsSvc::tempMaskedChips(const Identifier & moduleId) const {
-  std::map<Identifier, unsigned int>::const_iterator it(m_tempMaskedChips->find(moduleId));
-  if(it!=m_tempMaskedChips->end()) return it->second;
+  std::map<Identifier, unsigned int>::const_iterator it(m_tempMaskedChips.find(moduleId));
+  if(it!=m_tempMaskedChips.end()) return it->second;
   return 0;
 }
 
@@ -745,12 +758,12 @@ unsigned int SCT_ByteStreamErrorsSvc::abcdErrorChips(const Identifier & moduleId
   // Side 0
   IdentifierHash hash_side0;
   m_sct_id->get_hash(moduleId, hash_side0, &m_cntx_sct);
-  if(std::find(m_bsErrors[SCT_ByteStreamErrors::ABCDError]->begin(),
-	       m_bsErrors[SCT_ByteStreamErrors::ABCDError]->end(),
+  if(std::find(m_bsErrors[SCT_ByteStreamErrors::ABCDError].begin(),
+	       m_bsErrors[SCT_ByteStreamErrors::ABCDError].end(),
 	       hash_side0)
-     !=m_bsErrors[SCT_ByteStreamErrors::ABCDError]->end()) {
+     !=m_bsErrors[SCT_ByteStreamErrors::ABCDError].end()) {
     for(int errType=SCT_ByteStreamErrors::ABCDError_Chip0; errType<=SCT_ByteStreamErrors::ABCDError_Chip5; errType++) {
-      if(std::find(m_bsErrors[errType]->begin(), m_bsErrors[errType]->end(), hash_side0)!=m_bsErrors[errType]->end()) {
+      if(std::find(m_bsErrors[errType].begin(), m_bsErrors[errType].end(), hash_side0)!=m_bsErrors[errType].end()) {
 	abcdErrorChips2 |= (1 << chip);
       }
       chip++;
@@ -762,12 +775,12 @@ unsigned int SCT_ByteStreamErrorsSvc::abcdErrorChips(const Identifier & moduleId
   // Side 1
   IdentifierHash hash_side1;
   m_sct_id->get_other_side(hash_side0, hash_side1);
-  if(std::find(m_bsErrors[SCT_ByteStreamErrors::ABCDError]->begin(),
-               m_bsErrors[SCT_ByteStreamErrors::ABCDError]->end(),
+  if(std::find(m_bsErrors[SCT_ByteStreamErrors::ABCDError].begin(),
+               m_bsErrors[SCT_ByteStreamErrors::ABCDError].end(),
                hash_side1)
-     !=m_bsErrors[SCT_ByteStreamErrors::ABCDError]->end()) {
+     !=m_bsErrors[SCT_ByteStreamErrors::ABCDError].end()) {
     for(int errType=SCT_ByteStreamErrors::ABCDError_Chip0; errType<=SCT_ByteStreamErrors::ABCDError_Chip5; errType++) {
-      if(std::find(m_bsErrors[errType]->begin(), m_bsErrors[errType]->end(), hash_side1)!=m_bsErrors[errType]->end()) {
+      if(std::find(m_bsErrors[errType].begin(), m_bsErrors[errType].end(), hash_side1)!=m_bsErrors[errType].end()) {
 	abcdErrorChips2 |= (1 << chip);
       }
       chip++;
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.h
index 633b57af2b8228134e3bc79e5ce399e3849bd791..a762fbff41913a0d7b3ce96a9aa7963d18fb492f 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ByteStreamErrorsSvc.h
@@ -28,6 +28,7 @@
 #include "StoreGate/StoreGateSvc.h"
 
 #include "Identifier/IdContext.h"
+#include "Identifier/Identifier.h"
 
 /** Read Handle Key */
 #include "StoreGate/ReadHandleKey.h"
@@ -36,7 +37,6 @@
 template <class TYPE> class SvcFactory;
 class ISvcLocator;
 class SCT_ID;
-class Identifier;
 class IdentifierHash;
 class StatusCode;
 class ISCT_CablingSvc;
@@ -80,7 +80,7 @@ public:
   virtual bool canFillDuringInitialize(){ return false; }
 
 
-  std::set<IdentifierHash>* getErrorSet(int errorType);
+  const std::set<IdentifierHash>* getErrorSet(int errorType);
 
   void setRODSimulatedData();
 
@@ -106,7 +106,7 @@ public:
 
   virtual void setFirstTempMaskedChip(const IdentifierHash& hashId, const unsigned int firstTempMaskedChip);
   virtual unsigned int getFirstTempMaskedChip(const IdentifierHash& hashId) const;
-  virtual std::map<Identifier, unsigned int>* tempMaskedChips() const {return m_tempMaskedChips;}
+  virtual const std::map<Identifier, unsigned int>* tempMaskedChips() const {return &m_tempMaskedChips;}
   virtual unsigned int tempMaskedChips(const Identifier & moduleId) const;
   virtual unsigned int abcdErrorChips(const Identifier & moduleId) const;
 
@@ -121,12 +121,12 @@ private:
 
   bool m_filled;
   bool m_lookForSGErrContainer;
-  std::set<IdentifierHash>* m_bsErrors[SCT_ByteStreamErrors::NUM_ERROR_TYPES];
+  std::set<IdentifierHash> m_bsErrors[SCT_ByteStreamErrors::NUM_ERROR_TYPES];
 
-  std::set<IdentifierHash>* m_rxRedundancy;
+  std::set<IdentifierHash> m_rxRedundancy;
 
   std::map<IdentifierHash, unsigned int> m_firstTempMaskedChips;
-  std::map<Identifier, unsigned int>* m_tempMaskedChips;
+  std::map<Identifier, unsigned int> m_tempMaskedChips;
   IdContext m_cntx_sct;
 
   int m_numBsErrors[SCT_ByteStreamErrors::NUM_ERROR_TYPES];
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ChargeTrappingSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ChargeTrappingSvc.cxx
index ff2e2d47567160aef8b73005328548f5a943e579..4d907711c67bad8a2711800a3384f0daaec3b05d 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ChargeTrappingSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ChargeTrappingSvc.cxx
@@ -15,8 +15,6 @@
 
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetReadoutGeometry/SCT_DetectorManager.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/SiDetectorManager.h"
 
@@ -31,7 +29,6 @@
 
 #include "InDetConditionsSummaryService/ISiliconConditionsSvc.h"
 
-#include "SCT_ElectricFieldTool.h"
 #include "SCT_ConfigurationConditionsSvc.h"
 
 #include <algorithm>
@@ -39,15 +36,14 @@
 
 SCT_ChargeTrappingSvc::SCT_ChargeTrappingSvc( const std::string& name,  ISvcLocator* pSvcLocator ) :
   AthService(name, pSvcLocator),
-  m_siConditionsSvc("SCT_SiliconConditionsSvc", name),
-  m_detStore("StoreGateSvc/DetectorStore", name),
-  m_conditionsSvcValid(false),
-  m_conditionsSvcWarning(false),
-  m_isSCT(true),
+  m_siConditionsSvc{"SCT_SiliconConditionsSvc", name},
+  m_detStore{"StoreGateSvc/DetectorStore", name},
+  m_conditionsSvcValid{false},
+  m_conditionsSvcWarning{false},
+  m_isSCT{true},
   m_detManager{nullptr},
-  m_getdoCTrap(false),
-  m_PotentialValue{{0.}},
-  m_electricFieldTool("SCT_ElectricFieldTool", this)
+  m_getdoCTrap{false},
+  m_PotentialValue{{0.}}
 {
   
   declareProperty("SiConditionsServices", m_siConditionsSvc);
@@ -62,7 +58,6 @@ SCT_ChargeTrappingSvc::SCT_ChargeTrappingSvc( const std::string& name,  ISvcLoca
   // 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);
-  declareProperty("SCT_ElectricFieldTool",m_electricFieldTool);
   
   // -- Radiation damage specific
   declareProperty("CalcHoles", m_calcHoles=false,"Default is to ignore holes in signal formation.");
@@ -93,14 +88,6 @@ SCT_ChargeTrappingSvc::initialize()
     return StatusCode::FAILURE;
   }
   
-  //ElectricFieldTool
-  if (m_electricFieldTool.retrieve().isFailure())
-  {
-    msg(MSG::FATAL) << "Could not initialize the electric field svc: " << m_electricFieldTool << endmsg;
-    return StatusCode::FAILURE;
-  }
-  
-  
   if (m_detectorName != "SCT") {
     msg(MSG::FATAL) << "Invalid detector name: " << m_detectorName  << ". Must be SCT." << endmsg;
     return StatusCode::FAILURE;
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ChargeTrappingSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ChargeTrappingSvc.h
index 70f56bce4bc3f620343b47b117cc4470be6ae0fe..a4e14e2e6a9263b89ce94e6a6c760fdab6844dd0 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ChargeTrappingSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ChargeTrappingSvc.h
@@ -23,12 +23,13 @@
 #include <string>
 #include <vector>
 
+#include "SCT_ElectricFieldTool.h"
+
 //forward declarations
 class IdentifierHash;
 class ISiliconConditionsSvc;
 class IGeoModelSvc;
 class StoreGateSvc;
-class ISCT_ElectricFieldTool;
 
 namespace InDetDD {
   class SiDetectorManager;
@@ -122,7 +123,7 @@ private:
   double m_PotentialValue[81][115];
 
   // -- Tool Handle for Electric field
-  ToolHandle<ISCT_ElectricFieldTool> m_electricFieldTool;
+  ToolHandle<ISCT_ElectricFieldTool> m_electricFieldTool{this, "SCT_ElectricFieldTool", "SCT_ElectricFieldTool", "SCT electric field tool"};
 
 };
 inline const InterfaceID & SCT_ChargeTrappingSvc::interfaceID(){
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_Chip.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_Chip.cxx
index e7fd13046cb6d9ef9b36dec1f9e2e855eb4f3211..6d4c8e66cc2f35859cb870c58b58ef84094135d8 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_Chip.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_Chip.cxx
@@ -7,8 +7,6 @@
 #include <sstream>
 #include <iostream>
 
-typedef unsigned int uint;
-
 // Default constructor: chip has id 0, config = 0 and all strips good.
 SCT_Chip::SCT_Chip():
   m_id(0),
@@ -33,10 +31,10 @@ bool SCT_Chip::initializeMaskFromInts(uint32_t mask0, uint32_t mask1, uint32_t m
   uint32_t subWords[nSubwords]={mask0,mask1,mask2,mask3};
   // Put the integers into 32 bit bitsets
   std::bitset<lenSubword> subBinary;
-  for(uint i(0);i!=nSubwords;++i){
+  for(unsigned int i{0}; i!=nSubwords; ++i) {
     subBinary = subWords[i];
     // Put the four bitsets together in one 128 bit bitset (private member data)
-    for(uint j(0);j!=lenSubword;++j){
+    for(unsigned int j{0}; j!=lenSubword; ++j) {
       m_mask[i*lenSubword+j]=subBinary[j];
     }
   }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsSvc.cxx
index 985c9768b5fda644a93fee021604080c19111239..c493bd6311b4f59df279b8a336a464b30225bf88 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsSvc.cxx
@@ -43,18 +43,17 @@ static const int invalidChipNumber(-1);
 // Constructor
 SCT_ConfigurationConditionsSvc::SCT_ConfigurationConditionsSvc( const std::string& name, ISvcLocator* pSvcLocator ) : 
   AthService(name, pSvcLocator),
-  m_badChannelIds{nullptr},
-  m_badModuleIds{nullptr},
-  m_badWaferIds{nullptr},
-  m_badLinks{nullptr},
-  m_badChips{nullptr},
+  m_badChannelIds{},
+  m_badModuleIds{},
+  m_badWaferIds{},
+  m_badLinks{},
+  m_badChips{},
   m_filled(false),
   m_detStore("DetectorStore", name),
   m_IOVSvc("IOVSvc", name),
   m_IOVDbSvc("IOVDbSvc", name),
   m_pHelper{nullptr},
   m_cablingSvc("SCT_CablingSvc", name),
-  m_readoutTool("SCT_ReadoutTool", this),
   m_pManager{nullptr},
   m_checkStripsInsideModules(true) 
 { 
@@ -68,15 +67,8 @@ StatusCode SCT_ConfigurationConditionsSvc::initialize(){
   ATH_CHECK(m_detStore.retrieve());
   ATH_CHECK(m_detStore->retrieve(m_pManager,"SCT"));
   ATH_CHECK(m_detStore->retrieve(m_pHelper, "SCT_ID"));
-  ATH_CHECK(m_readoutTool.retrieve());
   ATH_CHECK(m_IOVSvc.retrieve());
   ATH_CHECK(m_IOVDbSvc.retrieve());
-    // Assign memory for structres
-  m_badChannelIds =  new std::set<Identifier>;
-  m_badModuleIds  =  new std::set<Identifier>;
-  m_badWaferIds   =  new std::set<Identifier>;
-  m_badLinks      =  new std::map<Identifier, std::pair<bool, bool> >;
-  m_badChips      =  new std::map<Identifier, unsigned int>;
 
   // Register callbacks for folders 
   const std::string channelFolderName=determineFolder(coolChannelFolderName,coolChannelFolderName2);
@@ -94,12 +86,6 @@ StatusCode SCT_ConfigurationConditionsSvc::initialize(){
 StatusCode SCT_ConfigurationConditionsSvc::finalize(){
   ATH_MSG_INFO( "Configuration finalize" );
 
-  if (m_badChannelIds) delete m_badChannelIds; 
-  if (m_badModuleIds)  delete m_badModuleIds; 
-  if (m_badWaferIds  ) delete m_badWaferIds;   
-  if (m_badLinks     ) delete m_badLinks;      
-  if (m_badChips     ) delete m_badChips;      
-
   return StatusCode::SUCCESS;
 }
 
@@ -129,13 +115,13 @@ bool SCT_ConfigurationConditionsSvc::isGood(const Identifier & elementId, InDetC
 
   bool result(true);
   if (h == InDetConditions::SCT_STRIP) {
-    result = (m_badChannelIds->find(elementId) == m_badChannelIds->end());
+    result = (m_badChannelIds.find(elementId) == m_badChannelIds.end());
     // If strip itself is not bad, check if it's in a bad module
     if (result and m_checkStripsInsideModules) result = !isStripInBadModule(elementId);
   } else if (h == InDetConditions::SCT_MODULE) {
-    result = (m_badModuleIds->find(elementId) == m_badModuleIds->end());
+    result = (m_badModuleIds.find(elementId) == m_badModuleIds.end());
   } else if (h == InDetConditions::SCT_SIDE or h == InDetConditions::DEFAULT) {
-    result = (m_badWaferIds->find(elementId) == m_badWaferIds->end());
+    result = (m_badWaferIds.find(elementId) == m_badWaferIds.end());
   }
   return result;
 }
@@ -163,7 +149,7 @@ StatusCode SCT_ConfigurationConditionsSvc::fillData(int& /*i*/ , std::list<std::
     if(fillChannelData().isFailure()) return StatusCode::FAILURE;
   }
   // The bad channel list contains all the information
-  m_filled = (not m_badChannelIds->empty());
+  m_filled = (not m_badChannelIds.empty());
   return StatusCode::SUCCESS;
 }
 
@@ -191,17 +177,17 @@ StatusCode SCT_ConfigurationConditionsSvc::fillChannelData(){
   enum RUN2_CHIP_INDICES{CHIP_2, ACTIVE_2, ADDRESS_2, CONFIG_2, MASK0_2,MASK1_2,MASK2_2,
    MASK3_2, VTHR_2, VCAL_2, DELAY_2, PREAMP_2, SHAPER_2, RC_FUNCTION_2, RC_ARGS_2,
    C_FACTOR_2, TARGET_2, TRIM_2};
-  typedef unsigned int uint;
-  const uint chipIndex=run1?uint(CHIP_1):uint(CHIP_2);
-  const uint configIndex=run1?uint(CONFIG_1):uint(CONFIG_2);
-  const uint mask0Index=run1?uint(MASK0_1):uint(MASK0_2);
-  const uint mask1Index=run1?uint(MASK1_1):uint(MASK1_2);
-  const uint mask2Index=run1?uint(MASK2_1):uint(MASK2_2);
-  const uint mask3Index=run1?uint(MASK3_1):uint(MASK3_2);
+  typedef unsigned int uint_t;
+  const uint_t chipIndex=run1?uint_t(CHIP_1):uint_t(CHIP_2);
+  const uint_t configIndex=run1?uint_t(CONFIG_1):uint_t(CONFIG_2);
+  const uint_t mask0Index=run1?uint_t(MASK0_1):uint_t(MASK0_2);
+  const uint_t mask1Index=run1?uint_t(MASK1_1):uint_t(MASK1_2);
+  const uint_t mask2Index=run1?uint_t(MASK2_1):uint_t(MASK2_2);
+  const uint_t mask3Index=run1?uint_t(MASK3_1):uint_t(MASK3_2);
   //
   // Clear previous information at callback
-  m_badChannelIds->clear();
-  m_badChips->clear();
+  m_badChannelIds.clear();
+  m_badChips.clear();
   // Fill link status
   if (fillLinkStatus().isFailure()) return StatusCode::FAILURE;
   // Get Chip folder
@@ -227,16 +213,16 @@ StatusCode SCT_ConfigurationConditionsSvc::fillChannelData(){
     m_pHelper->get_other_side(hash, oppWaferHash);
     const Identifier oppWaferId(m_pHelper->wafer_id(oppWaferHash));
 
-    bool isBadModule(m_badModuleIds->find(moduleId) != m_badModuleIds->end()); 
+    bool isBadModule(m_badModuleIds.find(moduleId) != m_badModuleIds.end()); 
 
     // Don't need to bother checking chips if the module is already bad
     // Commented out until fully tested
-    //if (m_badModuleIds->find(moduleId) == m_badModuleIds->end()) continue;
+    //if (m_badModuleIds.find(moduleId) == m_badModuleIds.end()) continue;
     // Get link status 
     // Can maybe be smarter if both links are bad (but the module will probably be bad then)
     bool link0ok(true), link1ok(true);
-    std::map<Identifier, std::pair<bool, bool> >::const_iterator linkItr =  m_badLinks->find(moduleId);
-    if (linkItr != m_badLinks->end()) {
+    std::map<Identifier, std::pair<bool, bool> >::const_iterator linkItr =  m_badLinks.find(moduleId);
+    if (linkItr != m_badLinks.end()) {
       link0ok = (*linkItr).second.first;
       link1ok = (*linkItr).second.second;
     }
@@ -254,18 +240,18 @@ StatusCode SCT_ConfigurationConditionsSvc::fillChannelData(){
       // Can get AttributeList from second (see http://lcgapp.cern.ch/doxygen/CORAL/CORAL_1_9_3/doxygen/html/classcoral_1_1_attribute_list.html)
       const short id      = run1?(channelItr->second[chipIndex].data<short>()):(channelItr->second[chipIndex].data<unsigned char>());
       const short config  = run1?(channelItr->second[configIndex].data<short>()):(channelItr->second[configIndex].data<unsigned short>());
-      const int mask0     = run1?(channelItr->second[mask0Index].data<int>()):(channelItr->second[mask0Index].data<uint>());
-      const int mask1     = run1?(channelItr->second[mask1Index].data<int>()):(channelItr->second[mask1Index].data<uint>());
-      const int mask2     = run1?(channelItr->second[mask2Index].data<int>()):(channelItr->second[mask2Index].data<uint>());  // (=noMask, declared as static int at top of this file)
-      const int mask3     = run1?(channelItr->second[mask3Index].data<int>()):(channelItr->second[mask3Index].data<uint>());
+      const int mask0     = run1?(channelItr->second[mask0Index].data<int>()):(channelItr->second[mask0Index].data<uint_t>());
+      const int mask1     = run1?(channelItr->second[mask1Index].data<int>()):(channelItr->second[mask1Index].data<uint_t>());
+      const int mask2     = run1?(channelItr->second[mask2Index].data<int>()):(channelItr->second[mask2Index].data<uint_t>());  // (=noMask, declared as static int at top of this file)
+      const int mask3     = run1?(channelItr->second[mask3Index].data<int>()):(channelItr->second[mask3Index].data<uint_t>());
       chipsInMod.push_back(new SCT_Chip(id, config, mask0, mask1, mask2, mask3));
 
       if(id>=0 and id< 6 and (mask0!=0 or mask1!=0 or mask2!=0 or mask3!=0)) isBadSide0 = false;
       if(id>=6 and id<12 and (mask0!=0 or mask1!=0 or mask2!=0 or mask3!=0)) isBadSide1 = false;
     }
 
-    if(isBadSide0) m_badWaferIds->insert(waferId);
-    if(isBadSide1) m_badWaferIds->insert(oppWaferId);
+    if(isBadSide0) m_badWaferIds.insert(waferId);
+    if(isBadSide1) m_badWaferIds.insert(oppWaferId);
     
     // Check the module readout to look for bypassed chips, disabled links etc
     if (m_readoutTool->determineReadout(moduleId, chipsInMod, link0ok, link1ok).isFailure()) return StatusCode::FAILURE; 
@@ -282,7 +268,7 @@ StatusCode SCT_ConfigurationConditionsSvc::fillChannelData(){
         for(const auto & thisBadStrip:badStripsVec){
           Identifier stripId(getStripId(truncatedSerialNumber, thisChip->id(), thisBadStrip));
           // If in rough order, may be better to call with itr of previous insertion as a suggestion    
-          if (stripId.is_valid()) m_badChannelIds->insert(stripId);
+          if (stripId.is_valid()) m_badChannelIds.insert(stripId);
         }
       }
       // Bad chips (= all strips bad) bitpacked
@@ -297,7 +283,7 @@ StatusCode SCT_ConfigurationConditionsSvc::fillChannelData(){
 
     }
     // Store chip status if not all good (==0)
-    if (chipStatusWord != 0) (*m_badChips)[moduleId] = chipStatusWord;
+    if (chipStatusWord != 0) m_badChips[moduleId] = chipStatusWord;
     // Clear up memory associated with chips    
     for (const auto & thisChip:chipsInMod){
       delete thisChip;
@@ -307,7 +293,7 @@ StatusCode SCT_ConfigurationConditionsSvc::fillChannelData(){
   // No longer need the conditions folder as stored locally
   m_IOVDbSvc->dropObject(channelFolderName,true); 
 
-  const unsigned int totalBad(m_badChannelIds->size());
+  const unsigned int totalBad(m_badChannelIds.size());
   msg(MSG:: INFO)<< "Total number of bad chips is " << nDisabledChips << endmsg;
   msg(MSG:: INFO)<< "Total number of bad chips not in bad modules is " << nDisabledChipsExclusive << endmsg;
   msg(MSG:: INFO)<< "Total number of bad strip identifiers is " << totalBad << endmsg;
@@ -323,8 +309,8 @@ StatusCode SCT_ConfigurationConditionsSvc::fillModuleData(){
   unsigned int totalNumberOfValidModules(0);
 
   // Clear previous information at callback
-  m_badModuleIds->clear();
-  m_badWaferIds->clear();
+  m_badModuleIds.clear();
+  m_badWaferIds.clear();
 
   // Get Module folder
   if (retrieveFolder(m_dataModule, moduleFolderName).isFailure()) {
@@ -337,8 +323,8 @@ StatusCode SCT_ConfigurationConditionsSvc::fillModuleData(){
   CondAttrListVec::const_iterator pLastModule(m_dataModule->end());
   enum RUN1_INDICES{PK, FOREIGN_KEY, ID_1, GROUP_1, ACTIVE_1, SELECT_1};
   enum RUN2_INDICES{ID_2, SLAVEGROUP_2, ACTIVE_2, CLOCKSELECT_2, CHIPSTATUS_2};
-  typedef unsigned int uint;
-  const uint groupIndex=run1?uint(GROUP_1):uint(SLAVEGROUP_2);
+  typedef unsigned int uint_t;
+  const uint_t groupIndex=run1?uint_t(GROUP_1):uint_t(SLAVEGROUP_2);
   for (;pModule != pLastModule; ++pModule){
     // Get SN and identifiers (the channel number is serial number+1 for the CoraCool folders but =serial number 
     //  for Cool Vector Payload ; i.e. Run 1 and Run 2 resp.)
@@ -357,14 +343,14 @@ StatusCode SCT_ConfigurationConditionsSvc::fillModuleData(){
     const short group=pModule->second[groupIndex].data<short>();
     if (group < 0) { 
       // Insert module/wafer ID into set of bad modules/wafers IDs
-      m_badModuleIds->insert(moduleId);
-      m_badWaferIds->insert(waferId);
-      m_badWaferIds->insert(oppWaferId);
+      m_badModuleIds.insert(moduleId);
+      m_badWaferIds.insert(waferId);
+      m_badWaferIds.insert(oppWaferId);
     }
   }  
   // No longer need the conditions folder as stored locally
   m_IOVDbSvc->dropObject(moduleFolderName,true); 
-  const unsigned int totalBad(m_badModuleIds->size());
+  const unsigned int totalBad(m_badModuleIds.size());
   ATH_MSG_INFO( "Total number of module identifiers is " << totalNumberOfModules );
   ATH_MSG_INFO( "Total number of modules also found in the cabling is " << totalNumberOfValidModules );
   ATH_MSG_INFO( "Total number of bad module identifiers is " << totalBad );    
@@ -425,7 +411,7 @@ StatusCode SCT_ConfigurationConditionsSvc::fillLinkStatus() {
   const std::string murFolderName=determineFolder(coolMurFolderName,coolMurFolderName2);
   const bool run1(murFolderName==coolMurFolderName);
   // Clear previous information at call back
-  m_badLinks->clear();
+  m_badLinks.clear();
 
   // Get MUR folders for link info 
   if (retrieveFolder(m_dataMur, murFolderName).isFailure()) {
@@ -439,10 +425,10 @@ StatusCode SCT_ConfigurationConditionsSvc::fillLinkStatus() {
   // loop over MUR folder
   CondAttrListVec::const_iterator pMur(m_dataMur->begin());
   CondAttrListVec::const_iterator pLastMur(m_dataMur->end());
-  typedef unsigned int uint;
-  const uint snIndex=run1?uint(MODULEID_1):uint(MODULEID_2);
-  const uint link0Index=run1?uint(RX0FIBRE_1):uint(RX0FIBRE_2);
-  const uint link1Index=run1?uint(RX1FIBRE_1):uint(RX1FIBRE_2);
+  typedef unsigned int uint_t;
+  const uint_t snIndex=run1?uint_t(MODULEID_1):uint_t(MODULEID_2);
+  const uint_t link0Index=run1?uint_t(RX0FIBRE_1):uint_t(RX0FIBRE_2);
+  const uint_t link1Index=run1?uint_t(RX1FIBRE_1):uint_t(RX1FIBRE_2);
   //
   for (; pMur != pLastMur; ++pMur) {
     // Check for null values
@@ -460,7 +446,7 @@ StatusCode SCT_ConfigurationConditionsSvc::fillLinkStatus() {
 
     // Store the modules with bad links, represented by badLink (enum in header) = 255 = 0xFF 
     if (link0 == badLink or link1 == badLink) {
-      (*m_badLinks)[moduleId] = std::make_pair((link0!=badLink), (link1!=badLink));
+      m_badLinks[moduleId] = std::make_pair((link0!=badLink), (link1!=badLink));
     }
   }
   // No longer need the conditions folder as stored locally
@@ -472,13 +458,13 @@ StatusCode SCT_ConfigurationConditionsSvc::fillLinkStatus() {
 // Check if a strip is within a bad module
 bool SCT_ConfigurationConditionsSvc::isStripInBadModule(const Identifier& stripId){
   const Identifier moduleId(m_pHelper->module_id(m_pHelper->wafer_id(stripId)));
-  return (m_badModuleIds->find(moduleId) != m_badModuleIds->end());
+  return (m_badModuleIds.find(moduleId) != m_badModuleIds.end());
 }
 
 // Check if a wafer is within a bad module
 bool SCT_ConfigurationConditionsSvc::isWaferInBadModule(const Identifier& waferId){
   Identifier moduleId(m_pHelper->module_id(waferId));
-  return (m_badModuleIds->find(moduleId) != m_badModuleIds->end());
+  return (m_badModuleIds.find(moduleId) != m_badModuleIds.end());
 }
 
 // Find the chip number containing a particular strip Identifier
@@ -505,18 +491,18 @@ void SCT_ConfigurationConditionsSvc::badStrips(const Identifier & moduleId,  std
   // Bad strips for a given module
   if (ignoreBadModules) {
     // Ignore strips in bad modules
-    if (m_badModuleIds->find(moduleId) != m_badModuleIds->end()) return;    
+    if (m_badModuleIds.find(moduleId) != m_badModuleIds.end()) return;    
   }
 
-  std::set<Identifier>::const_iterator chanItr(m_badChannelIds->begin());
-  std::set<Identifier>::const_iterator chanEnd(m_badChannelIds->end());
+  std::set<Identifier>::const_iterator chanItr(m_badChannelIds.begin());
+  std::set<Identifier>::const_iterator chanEnd(m_badChannelIds.end());
   for (; chanItr != chanEnd; ++chanItr) {
     if (ignoreBadChips) {
       // Ignore strips in bad chips
       int chip = getChip(*chanItr);
       if (chip!=invalidChipNumber){
-        std::map<Identifier, unsigned int>::const_iterator chipItr(m_badChips->find(moduleId));
-        if ((chipItr != m_badChips->end()) && ((*chipItr).second & (1 << chip)) != 0) continue;
+        std::map<Identifier, unsigned int>::const_iterator chipItr(m_badChips.find(moduleId));
+        if ((chipItr != m_badChips.end()) && ((*chipItr).second & (1 << chip)) != 0) continue;
       }   
     }
     if (m_pHelper->module_id(m_pHelper->wafer_id((*chanItr))) == moduleId) strips.insert(*chanItr);
@@ -525,36 +511,36 @@ void SCT_ConfigurationConditionsSvc::badStrips(const Identifier & moduleId,  std
        
 std::pair<bool, bool> SCT_ConfigurationConditionsSvc::badLinks(const Identifier & moduleId) {
   // Bad links for a given module
-  std::map<Identifier, std::pair<bool, bool> >::const_iterator linkItr(m_badLinks->find(moduleId));
-  return ((linkItr != m_badLinks->end()) ? (*linkItr).second : std::make_pair(true,true));
+  std::map<Identifier, std::pair<bool, bool> >::const_iterator linkItr(m_badLinks.find(moduleId));
+  return ((linkItr != m_badLinks.end()) ? (*linkItr).second : std::make_pair(true,true));
 }
 
 unsigned int SCT_ConfigurationConditionsSvc::badChips(const Identifier & moduleId) {
   // Bad chips for a given module
-  std::map<Identifier, unsigned int>::const_iterator chipItr(m_badChips->find(moduleId));  
-  return ((chipItr != m_badChips->end()) ? (*chipItr).second : static_cast<unsigned int>(0));
+  std::map<Identifier, unsigned int>::const_iterator chipItr(m_badChips.find(moduleId));  
+  return ((chipItr != m_badChips.end()) ? (*chipItr).second : static_cast<unsigned int>(0));
 }
 
 void 
 SCT_ConfigurationConditionsSvc::badStrips(std::set<Identifier>& strips, bool ignoreBadModules, bool ignoreBadChips) {
   if (ignoreBadModules == false && ignoreBadChips == false) {
-    std::copy(m_badChannelIds->begin(), m_badChannelIds->end(), std::inserter(strips,strips.begin()));
+    std::copy(m_badChannelIds.begin(), m_badChannelIds.end(), std::inserter(strips,strips.begin()));
     return;
   }
-  std::set<Identifier>::const_iterator chanItr(m_badChannelIds->begin());
-  std::set<Identifier>::const_iterator chanEnd(m_badChannelIds->end());
+  std::set<Identifier>::const_iterator chanItr(m_badChannelIds.begin());
+  std::set<Identifier>::const_iterator chanEnd(m_badChannelIds.end());
   for (; chanItr != chanEnd; ++chanItr) {
     Identifier moduleId(m_pHelper->module_id(m_pHelper->wafer_id(*chanItr)));
     // Ignore strips in bad modules
     if (ignoreBadModules) {
-      if (m_badModuleIds->find(moduleId) != m_badModuleIds->end()) continue;    
+      if (m_badModuleIds.find(moduleId) != m_badModuleIds.end()) continue;    
     }
     // Ignore strips in bad chips
     if (ignoreBadChips) {    
       int chip = getChip(*chanItr);
       if (chip !=invalidChipNumber){
-        std::map<Identifier, unsigned int>::const_iterator chipItr(m_badChips->find(moduleId));
-        if ((chipItr != m_badChips->end()) && ((*chipItr).second & (1 << chip)) != 0) continue;
+        std::map<Identifier, unsigned int>::const_iterator chipItr(m_badChips.find(moduleId));
+        if ((chipItr != m_badChips.end()) && ((*chipItr).second & (1 << chip)) != 0) continue;
       }  
     }
     strips.insert(*chanItr);
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsSvc.h
index 9b8347515092d3990ca1f3cd2460f7172c94e7c8..e397ca4847233ed013162ab11b8161b468187745 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsSvc.h
@@ -93,28 +93,28 @@ public:
   virtual bool                          canFillDuringInitialize(){ return false; }
 
   /**List of bad modules*/
-  virtual std::set<Identifier>*         badModules() { return m_badModuleIds; }
+  virtual const std::set<Identifier>*   badModules() { return &m_badModuleIds; }
   /**List of bad strips*/
-  virtual void                          badStrips(std::set<Identifier>& strips, bool ignoreBadModules = false, bool ignoreBadChips = false); //  { return m_badChannelIds; }
+  virtual void                          badStrips(std::set<Identifier>& strips, bool ignoreBadModules = false, bool ignoreBadChips = false);
   /**List of bad strips for a given module*/
   virtual void                          badStrips(const Identifier & moduleId , std::set<Identifier>& strips, bool ignoreBadModules = false, bool ignoreBadChips = false);
   /**List of bad links*/
-  virtual std::pair<bool, bool>         badLinks(const Identifier & moduleId);                        
+  virtual std::pair<bool, bool>         badLinks(const Identifier & moduleId);
   /**Bad links for a given module*/
-  virtual std::map<Identifier, std::pair<bool, bool> >* badLinks() {return m_badLinks;}
+  virtual const std::map<Identifier, std::pair<bool, bool> >* badLinks() {return &m_badLinks;}
   /**List of bad chips*/
-  virtual std::map<Identifier, unsigned int>*           badChips() {return m_badChips;}
+  virtual const std::map<Identifier, unsigned int>*           badChips() {return &m_badChips;}
   /**Bad chips for a given module*/
   virtual unsigned int                  badChips(const Identifier & moduleId);
   /** Get the chip number containing a particular strip*/
   int                                   getChip(const Identifier & stripId);
 
 private:
-  std::set<Identifier>*                 m_badChannelIds;                 //!< Set of bad strip identifiers (not those in bad strips)
-  std::set<Identifier>*                 m_badModuleIds;                  //!< Set of bad module identifiers
-  std::set<Identifier>*                 m_badWaferIds;                   //!< Set of bad wafer identifiers
-  std::map<Identifier, std::pair<bool, bool> >* m_badLinks;              //!< Map of the state of the 2 links in a module by truncated serial number 
-  std::map<Identifier, unsigned int>*   m_badChips;                      //!< Map of bad chips per module
+  std::set<Identifier> m_badChannelIds;                 //!< Set of bad strip identifiers (not those in bad strips)
+  std::set<Identifier> m_badModuleIds;                  //!< Set of bad module identifiers
+  std::set<Identifier> m_badWaferIds;                   //!< Set of bad wafer identifiers
+  std::map<Identifier, std::pair<bool, bool>> m_badLinks;                //!< Map of the state of the 2 links in a module by truncated serial number
+  std::map<Identifier, unsigned int>    m_badChips;                      //!< Map of bad chips per module
   bool                                  m_filled;                        //!< Had the data been filled?
   ServiceHandle<StoreGateSvc>           m_detStore;                      //!< Handle on the detector store
   ServiceHandle<IIOVSvc>                m_IOVSvc;                        //!< Handle on the IOV service
@@ -124,7 +124,7 @@ private:
   const DataHandle<CondAttrListVec>     m_dataMur;                       //!< Handle for link info from DB
   const SCT_ID*                         m_pHelper;                       //!< ID helper for SCT
   ServiceHandle<ISCT_CablingSvc>        m_cablingSvc;                    //!< Handle on SCT cabling service
-  ToolHandle<ISCT_ReadoutTool>          m_readoutTool;                   //!< Handle on readout tool
+  ToolHandle<ISCT_ReadoutTool> m_readoutTool{this, "SCT_ReadoutTool", "SCT_ReadoutTool", "Handle on readout tool"}; //!< Handle on readout tool
   const InDetDD::SCT_DetectorManager*   m_pManager;                      //!< SCT detector manager
   bool                                  m_checkStripsInsideModules;      //!< Do we want to check if a strip is bad because it is inside a bad module
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsTestAlg.cxx
index ec657bc3d91862b99ffdf87b08431fe862a5ed94..33cd7edbf53e60684aa59b446ed6278a680970a3 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsTestAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ConfigurationConditionsTestAlg.cxx
@@ -50,7 +50,7 @@ StatusCode SCT_ConfigurationConditionsTestAlg::execute(){
   unsigned int nBadMods   = m_configConditions->badModules()->size();
 
   // Bad links
-  std::map<Identifier, std::pair<bool, bool> >* badLinks = m_configConditions->badLinks();
+  const std::map<Identifier, std::pair<bool, bool> >* badLinks = m_configConditions->badLinks();
   std::map<Identifier, std::pair<bool, bool> >::const_iterator linkItr(badLinks->begin());
   std::map<Identifier, std::pair<bool, bool> >::const_iterator linkEnd(badLinks->end());
 
@@ -64,7 +64,7 @@ StatusCode SCT_ConfigurationConditionsTestAlg::execute(){
   }
 
   // Bad chips
-  std::map<Identifier, unsigned int>* badChips = m_configConditions->badChips();
+  const std::map<Identifier, unsigned int>* badChips = m_configConditions->badChips();
   std::map<Identifier, unsigned int>::const_iterator chipItr(badChips->begin());
   std::map<Identifier, unsigned int>::const_iterator chipEnd(badChips->end());
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DCSConditionsSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DCSConditionsSvc.cxx
index eff7ecdaf9a5f4482be56ab1e7ee13b350ca4fa7..3815724b0ef4bcff0ae659b99d89ac7e2e0e843f 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DCSConditionsSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DCSConditionsSvc.cxx
@@ -5,164 +5,144 @@
 // New SCT_DCSConditions Service, based on existing tool in SCT_ConditionsAlgs
 // A. R-Veronneau 26/02/08
 
-
-#include "Identifier/Identifier.h"
-#include "GaudiKernel/Property.h"
-
 #include "SCT_DCSConditionsSvc.h"
-#include "SCT_DcsAlerts.h"
 #include "SCT_SlhcIdConverter.h"
-#include "SCT_ConditionsData/SCT_DCSConditionsData.h"
-
-// AttributeList
-#include "CoolKernel/StorageType.h"
-#include "CoralBase/Attribute.h"
-#include "CoralBase/AttributeListSpecification.h"
-#include "AthenaPoolUtilities/AthenaAttributeList.h"
-#include "AthenaPoolUtilities/CondAttrListCollection.h"
-
-#include "Identifier/IdentifierHash.h"
 #include "InDetIdentifier/SCT_ID.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
 
-#include <iostream>
-#include <algorithm>
-
-using namespace std;
-using SCT_ConditionsServices::DcsValueStatus;
 using SCT_ConditionsServices::castId;
-static const Identifier InvalidId;
-
-SCT_DCSConditionsSvc::SCT_DCSConditionsSvc( const std::string& name,
-                                           ISvcLocator* pSvcLocator ) :
-AthService( name, pSvcLocator ),
-m_detStore("DetectorStore",name),
-m_IOVDbSvc("IOVDbSvc", name),
-m_dataFilled(false),
-m_status(0),
-m_readAllDBFolders(true),
-m_returnHVTemp(true),
-m_dropFolder(true),
-m_barrel_correction(-3.7),
-m_ecInner_correction(-13.1),
-m_ecOuter_correction(-15.5),
-m_hvLowLimit(0.0),
-m_hvUpLimit(1000000.0),
-m_pBadModules{nullptr},
-m_pModulesHV{nullptr},
-m_pModulesTemp0{nullptr},
-m_pModulesTemp1{nullptr},
-m_pHelper{nullptr}, 
-m_folderPrefix("/SCT/DCS"),
-m_chanstatCut("NORM"),
-m_useHV(false),
-m_useHVLowLimit(19.),
-m_useHVUpLimit(1000000.0),
-m_useHVChanCut("LOOSE") { 
-  //declare variables which will be filled by jobOptions
-  declareProperty("DetectorStore", m_detStore);
-  declareProperty("AttrListCollFolders",m_par_atrcollist);
-  declareProperty("ReadAllDBFolders", m_readAllDBFolders);
-  declareProperty("ReturnHVTemp", m_returnHVTemp);
-  declareProperty("DropDCSFolders", m_dropFolder);
-  declareProperty("TempBarrelCorrection", m_barrel_correction);
-  declareProperty("TempEcInnerCorrection", m_ecInner_correction);
-  declareProperty("HVCutLow", m_hvLowLimit);
-  declareProperty("HVCutUp", m_hvUpLimit);
-  declareProperty("TempEcOuterCorrection", m_ecOuter_correction);
-  declareProperty("FolderLocation",m_folderPrefix);
-  declareProperty("StateCut",m_chanstatCut);
-  declareProperty("UseDefaultHV",m_useHV);
-  declareProperty("useHVLow",m_useHVLowLimit);
-  declareProperty("useHVUp",m_useHVUpLimit);
-  declareProperty("useHVChan",m_useHVChanCut);
-}
+
+const Identifier SCT_DCSConditionsSvc::s_invalidId;
+const float SCT_DCSConditionsSvc::s_defaultHV{-30.}; 
+const float SCT_DCSConditionsSvc::s_defaultTemperature{-40.};
+
+SCT_DCSConditionsSvc::SCT_DCSConditionsSvc(const std::string& name,
+                                           ISvcLocator* pSvcLocator) :
+  AthService(name, pSvcLocator),
+  m_detStore{"DetectorStore", name},
+  m_IOVDbSvc{"IOVDbSvc", name},
+  m_dataFilled{false},
+  m_status{0},
+  m_readAllDBFolders{true},
+  m_returnHVTemp{true},
+  m_dropFolder{true},
+  m_barrel_correction{-3.7},
+  m_ecInner_correction{-13.1},
+  m_ecOuter_correction{-15.5},
+  m_hvLowLimit{0.0},
+  m_hvUpLimit{1000000.0},
+  m_pBadModules{nullptr},
+  m_pModulesHV{nullptr},
+  m_pModulesTemp0{nullptr},
+  m_pModulesTemp1{nullptr},
+  m_pHelper{nullptr}, 
+  m_folderPrefix{"/SCT/DCS"},
+  m_chanstatCut{"NORM"},
+  m_useHV{false},
+  m_useHVLowLimit{19.},
+  m_useHVUpLimit{1000000.0},
+  m_useHVChanCut{"LOOSE"} { 
+    //declare variables which will be filled by jobOptions
+    declareProperty("DetectorStore", m_detStore);
+    declareProperty("AttrListCollFolders", m_par_atrcollist);
+    declareProperty("ReadAllDBFolders", m_readAllDBFolders);
+    declareProperty("ReturnHVTemp", m_returnHVTemp);
+    declareProperty("DropDCSFolders", m_dropFolder);
+    declareProperty("TempBarrelCorrection", m_barrel_correction);
+    declareProperty("TempEcInnerCorrection", m_ecInner_correction);
+    declareProperty("HVCutLow", m_hvLowLimit);
+    declareProperty("HVCutUp", m_hvUpLimit);
+    declareProperty("TempEcOuterCorrection", m_ecOuter_correction);
+    declareProperty("FolderLocation", m_folderPrefix);
+    declareProperty("StateCut", m_chanstatCut);
+    declareProperty("UseDefaultHV", m_useHV);
+    declareProperty("useHVLow", m_useHVLowLimit);
+    declareProperty("useHVUp", m_useHVUpLimit);
+    declareProperty("useHVChan", m_useHVChanCut);
+  }
 
 StatusCode SCT_DCSConditionsSvc::initialize() {
-  static const StatusCode fail(StatusCode::FAILURE);
-  if (AthService::initialize().isFailure()) return fail;
+  if (AthService::initialize().isFailure()) return StatusCode::FAILURE;
   if (m_detStore.retrieve().isFailure()) {
-    msg(MSG::ERROR) << " Cannot retrieve detector store " << endmsg;
-    return fail;
+    ATH_MSG_ERROR(" Cannot retrieve detector store ");
+    return StatusCode::FAILURE;
   }
-  if (m_readAllDBFolders && m_returnHVTemp){
-    std::vector<std::string> names(3);
+  if (m_readAllDBFolders and m_returnHVTemp) {
+    std::vector<std::string> names{3};
     names[0] = m_folderPrefix+std::string("/HV");
     names[1] = m_folderPrefix+std::string("/MODTEMP");
     names[2] = m_folderPrefix+std::string("/CHANSTAT");
     m_par_atrcollist.setValue(names);
-  } else if (m_returnHVTemp) { 
-    std::vector<std::string> names(2);
+  } else if (m_returnHVTemp) {
+    std::vector<std::string> names{2};
     names[0] = m_folderPrefix+std::string("/HV");
     names[1] = m_folderPrefix+std::string("/MODTEMP");
     m_par_atrcollist.setValue(names);
-  } else if (!m_readAllDBFolders && !m_returnHVTemp) {
-    std::vector<std::string> names(1);
+  } else if (not m_readAllDBFolders and not m_returnHVTemp) {
+    std::vector<std::string> names{1};
     names[0] = m_folderPrefix+std::string("/CHANSTAT");
     m_par_atrcollist.setValue(names);
   } else {
-    msg(MSG::INFO) << "Please check jobOptions, SCT_DCSConditionsSvs does nothing as set up." << endmsg;
+    ATH_MSG_INFO("Please check jobOptions, SCT_DCSConditionsSvs does nothing as set up.");
+  }
+  ATH_MSG_INFO("Test: How many folders in Coll: " << m_par_atrcollist.value().size());
+  if (m_detStore->retrieve(m_pHelper,"SCT_ID").isFailure()) {
+    ATH_MSG_ERROR("SCT helper failed to retrieve ");
+    return StatusCode::FAILURE;
   }
-  msg(MSG::INFO) << "Test: How many folders in Coll: " << m_par_atrcollist.value().size()  << endmsg;
-  if (m_detStore->retrieve(m_pHelper,"SCT_ID").isFailure()) return  msg(MSG::ERROR) << "SCT helper failed to retrieve " << endmsg, fail;
   
-  if (m_useHV){
+  if (m_useHV) {
     m_hvLowLimit = m_useHVLowLimit;
     m_hvUpLimit = m_useHVUpLimit;
     m_chanstatCut = m_useHVChanCut;
-    msg(MSG::INFO) << "Using HV and Chanstat"<< m_chanstatCut << " for marking modules bad. >=Hvlow: "<<  m_hvLowLimit<< " and <=Hv Up: " <<  m_hvUpLimit << m_par_atrcollist.value().size()  << ". Note: UseHV Overrides hv limit and chanstat values in joboptions!!"<< endmsg;
+    ATH_MSG_INFO("Using HV and Chanstat"<< m_chanstatCut << " for marking modules bad. >=Hvlow: " <<
+		 m_hvLowLimit<< " and <=Hv Up: " <<  m_hvUpLimit << m_par_atrcollist.value().size() <<
+		 ". Note: UseHV Overrides hv limit and chanstat values in joboptions!!");
   }
 
   //Register callbacks for folders in CondAttrListCollection using vector of keys (not hard-coded)
-  std::vector<std::string>::const_iterator itr(m_par_atrcollist.value().begin());
-  std::vector<std::string>::const_iterator end(m_par_atrcollist.value().end());
-  for (;itr!=end;++itr) {
-    std::string key = *itr ;
-    msg(MSG::INFO) << key << endmsg;
-    if (key==m_folderPrefix+std::string("/HV")){
-      if (StatusCode::SUCCESS==m_detStore->regFcn(&SCT_DCSConditionsSvc::fillData,this,m_DCSData_HV,key)) {
-	msg(MSG::INFO) << "Registered callback for key: " << *itr << endmsg;
+  std::vector<std::string>::const_iterator itr{m_par_atrcollist.value().begin()};
+  std::vector<std::string>::const_iterator end{m_par_atrcollist.value().end()};
+  for (; itr!=end; ++itr) {
+    std::string key{*itr};
+    ATH_MSG_INFO(key);
+    if (key==m_folderPrefix+std::string("/HV")) {
+      if (StatusCode::SUCCESS==m_detStore->regFcn(&SCT_DCSConditionsSvc::fillData, this, m_DCSData_HV, key)) {
+	ATH_MSG_INFO("Registered callback for key: " << *itr);
       } else {
-	msg(MSG::ERROR) << "Cannot register callback function for key " <<  *itr  << endmsg;
+	ATH_MSG_ERROR("Cannot register callback function for key " <<  *itr);
       }
-    } else if (key==m_folderPrefix+std::string("/MODTEMP")){
-      if (StatusCode::SUCCESS==m_detStore->regFcn(&SCT_DCSConditionsSvc::fillData,this,m_DCSData_MT,key)) {
-	msg(MSG::INFO) << "Registered callback for key: " << *itr << endmsg;
+    } else if (key==m_folderPrefix+std::string("/MODTEMP")) {
+      if (StatusCode::SUCCESS==m_detStore->regFcn(&SCT_DCSConditionsSvc::fillData, this, m_DCSData_MT, key)) {
+	ATH_MSG_INFO("Registered callback for key: " << *itr);
       } else {
-	msg(MSG::ERROR) << "Cannot register callback function for key " <<  *itr  << endmsg;
+	ATH_MSG_ERROR("Cannot register callback function for key " <<  *itr);
       }
-    } else if (key==m_folderPrefix+std::string("/CHANSTAT")){
-      if (StatusCode::SUCCESS==m_detStore->regFcn(&SCT_DCSConditionsSvc::fillData,this,m_DCSData_CS,key)) {
-	msg(MSG::INFO) << "Registered callback for key: " << *itr << endmsg;
+    } else if (key==m_folderPrefix+std::string("/CHANSTAT")) {
+      if (StatusCode::SUCCESS==m_detStore->regFcn(&SCT_DCSConditionsSvc::fillData, this, m_DCSData_CS, key)) {
+	ATH_MSG_INFO("Registered callback for key: " << *itr);
       } else {
-	msg(MSG::ERROR) << "Cannot register callback function for key " <<  *itr  << endmsg;
+	ATH_MSG_ERROR("Cannot register callback function for key " <<  *itr);
       }
     } else { 
-	  msg(MSG::INFO) << "Cannot registered callback for key: " << *itr <<" Missing data handle."<<endmsg;
+      ATH_MSG_INFO("Cannot registered callback for key: " << *itr <<" Missing data handle.");
     }
   }
-  m_pBadModules = new SCT_DCSConditionsData;
-  m_pModulesHV = new map<CondAttrListCollection::ChanNum, float >;
-  m_pModulesTemp0 = new map<CondAttrListCollection::ChanNum, float >;
-  m_pModulesTemp1 = new map<CondAttrListCollection::ChanNum, float >;
+  m_pBadModules = std::make_unique<SCT_DCSStatCondData>();
+  m_pModulesHV = std::make_unique<SCT_DCSFloatCondData>();
+  m_pModulesTemp0 = std::make_unique<SCT_DCSFloatCondData>();
+  m_pModulesTemp1 = std::make_unique<SCT_DCSFloatCondData>();
   return StatusCode::SUCCESS;
 }
 
-StatusCode SCT_DCSConditionsSvc::finalize(){ 
-  if (m_pBadModules){
-    delete m_pBadModules;   
-  }
-  if (m_pModulesHV){
+StatusCode SCT_DCSConditionsSvc::finalize() { 
+  if (m_pModulesHV) {
     m_pModulesHV->clear();
-    delete m_pModulesHV;    
   }
-  if (m_pModulesTemp0){
+  if (m_pModulesTemp0) {
     m_pModulesTemp0->clear();
-    delete m_pModulesTemp0; 
   }
-  if (m_pModulesTemp1){
+  if (m_pModulesTemp1) {
     m_pModulesTemp1->clear();
-    delete m_pModulesTemp1; 
   }
   return StatusCode::SUCCESS;
 }
@@ -174,10 +154,10 @@ StatusCode SCT_DCSConditionsSvc::finalize(){
 //          ppvInterface, Pointer to requested interface
 //   Return: StatusCode indicating SUCCESS or FAILURE.
 // N.B. Don't forget to release the interface after use!!!
-StatusCode SCT_DCSConditionsSvc::queryInterface(const InterfaceID& riid, void** ppvInterface){
-  if ( ISCT_DCSConditionsSvc::interfaceID().versionMatch(riid) ) {
+StatusCode SCT_DCSConditionsSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
+  if (ISCT_DCSConditionsSvc::interfaceID().versionMatch(riid)) {
     *ppvInterface = this;
-  } else if ( ISCT_ConditionsSvc::interfaceID().versionMatch(riid) ) {
+  } else if (ISCT_ConditionsSvc::interfaceID().versionMatch(riid)) {
     *ppvInterface = dynamic_cast<ISCT_ConditionsSvc*>(this);
   } else {
     // Interface is not directly available : try out a base class
@@ -188,203 +168,211 @@ StatusCode SCT_DCSConditionsSvc::queryInterface(const InterfaceID& riid, void**
 }
 
 //returns if fillData worked correctly
-bool SCT_DCSConditionsSvc::filled() const{
+bool SCT_DCSConditionsSvc::filled() const {
   return m_dataFilled;
 }
 
 //Can report about the module as a whole or the wafer
 bool SCT_DCSConditionsSvc::canReportAbout(InDetConditions::Hierarchy h) {
-  return (h == InDetConditions::SCT_MODULE or h == InDetConditions::SCT_SIDE or h == InDetConditions::SCT_STRIP);
+  return (h==InDetConditions::SCT_MODULE or h==InDetConditions::SCT_SIDE or h==InDetConditions::SCT_STRIP);
 }   
 
 //returns the module ID (int), or returns -1 if not able to report
-Identifier SCT_DCSConditionsSvc::getModuleID(const Identifier & elementId, InDetConditions::Hierarchy h) {
-  if (not canReportAbout(h)) return InvalidId;  
-  else {
-    if ( h == InDetConditions::SCT_MODULE ) m_moduleId = elementId;
-    else if (h == InDetConditions::SCT_SIDE) m_moduleId = m_pHelper->module_id(elementId); 
-    else if (h == InDetConditions::SCT_STRIP) {
-      m_waferId = m_pHelper->wafer_id(elementId);
-      m_moduleId = m_pHelper->module_id(m_waferId); 
-    }
-    return m_moduleId;
+Identifier SCT_DCSConditionsSvc::getModuleID(const Identifier& elementId, InDetConditions::Hierarchy h) {
+  if (not canReportAbout(h)) return s_invalidId;  
+
+  if (h==InDetConditions::SCT_MODULE) {
+    m_moduleId = elementId;
+  } else if (h==InDetConditions::SCT_SIDE) {
+    m_moduleId = m_pHelper->module_id(elementId); 
+  } else if (h==InDetConditions::SCT_STRIP) {
+    m_waferId = m_pHelper->wafer_id(elementId);
+    m_moduleId = m_pHelper->module_id(m_waferId); 
   }
+  return m_moduleId;
 }
 
 //Returns if element Id is good or bad
-bool SCT_DCSConditionsSvc::isGood(const Identifier & elementId, InDetConditions::Hierarchy h) {
-  m_moduleId=getModuleID(elementId,h);
-  if (m_moduleId==InvalidId) return true; // not canreportabout
-  else if (m_pBadModules->output(castId(m_moduleId)) == 0) return true; //No params are listed as bad
+bool SCT_DCSConditionsSvc::isGood(const Identifier& elementId, InDetConditions::Hierarchy h) {
+  m_moduleId=getModuleID(elementId, h);
+  if (not m_moduleId.is_valid()) return true; // not canreportabout
+  else if (m_pBadModules->output(castId(m_moduleId))==0) return true; //No params are listed as bad
   else return false;
 }
 
 //Does the same for hashIds
-bool SCT_DCSConditionsSvc::isGood(const IdentifierHash & hashId){
+bool SCT_DCSConditionsSvc::isGood(const IdentifierHash& hashId) {
   m_waferId = m_pHelper->wafer_id(hashId);
   m_moduleId = m_pHelper->module_id(m_waferId);
-  return isGood(m_moduleId,InDetConditions::SCT_MODULE);
+  return isGood(m_moduleId, InDetConditions::SCT_MODULE);
 }
 
 /////////////////////////////////// 
 
 // some lame helper methods: 
-// returns HV (-30 if there is no information)
-float SCT_DCSConditionsSvc::modHV(const Identifier & elementId, InDetConditions::Hierarchy h) {
-  m_moduleId = getModuleID(elementId,h);
-  if (m_moduleId==InvalidId) return -30.; // not canreportabout, return -30. 
-  std::map<CondAttrListCollection::ChanNum, float >::const_iterator pPair(m_pModulesHV->find(castId(m_moduleId)) ); // find the module 
-  if (pPair != m_pModulesHV->end() && isGood(elementId, h) ) return pPair->second;  //return the hv 
-  return -30.; //didn't find the module, return -30. 
+// returns HV (s_defaultHV(-30) if there is no information)
+float SCT_DCSConditionsSvc::modHV(const Identifier& elementId, InDetConditions::Hierarchy h) {
+  m_moduleId = getModuleID(elementId, h);
+  if (not m_moduleId.is_valid()) return s_defaultHV; // not canreportabout, return s_defaultHV(-30)
+
+  float hvval{s_defaultHV};
+  if (m_pModulesHV->getValue(castId(m_moduleId), hvval) and isGood(elementId, h)) {
+    return hvval;
+  }
+  return s_defaultHV; //didn't find the module, return s_defaultHV(-30)
 }
 
 //Does the same for hashIds
-float SCT_DCSConditionsSvc::modHV(const IdentifierHash & hashId){
+float SCT_DCSConditionsSvc::modHV(const IdentifierHash& hashId) {
   m_waferId = m_pHelper->wafer_id(hashId);
   m_moduleId = m_pHelper->module_id(m_waferId);
   return modHV(m_moduleId,InDetConditions::SCT_MODULE);
 } 
 
-//Returns temp0 (-40 if there is no information)
-float SCT_DCSConditionsSvc::hybridTemperature(const Identifier & elementId, InDetConditions::Hierarchy h) {
-  m_moduleId = getModuleID(elementId,h);
-  if (m_moduleId==InvalidId) return -50.; // not canreportabout
-  std::map<CondAttrListCollection::ChanNum, float >::const_iterator pPair(m_pModulesTemp0->find(castId(m_moduleId)) );  // find the module 
-  if (pPair != m_pModulesTemp0->end() && isGood(elementId, h) ){
-    return pPair->second;  //return the temp
+//Returns temp0 (s_defaultTemperature(-40) if there is no information)
+float SCT_DCSConditionsSvc::hybridTemperature(const Identifier& elementId, InDetConditions::Hierarchy h) {
+  m_moduleId = getModuleID(elementId, h);
+  if (not m_moduleId.is_valid()) return s_defaultTemperature; // not canreportabout
+
+  float temperature{s_defaultTemperature};
+  if (m_pModulesTemp0->getValue(castId(m_moduleId), temperature) and isGood(elementId, h)) {
+    return temperature;
   }
-  return -40.;//didn't find the module, return -40. 
+  return s_defaultTemperature;//didn't find the module, return -40. 
 } 
 
 //Does the same for hashIds
-float SCT_DCSConditionsSvc::hybridTemperature(const IdentifierHash & hashId){
+float SCT_DCSConditionsSvc::hybridTemperature(const IdentifierHash& hashId) {
   m_waferId = m_pHelper->wafer_id(hashId);
   m_moduleId = m_pHelper->module_id(m_waferId);
-  return hybridTemperature(m_moduleId,InDetConditions::SCT_MODULE);
+  return hybridTemperature(m_moduleId, InDetConditions::SCT_MODULE);
 }
 
-//Returns temp0 + correction for Lorentz angle calculation (-40 if there is no information)
-float SCT_DCSConditionsSvc::sensorTemperature(const Identifier & elementId, InDetConditions::Hierarchy h) {
-  m_moduleId = getModuleID(elementId,h);
-  if (m_moduleId==InvalidId) return -50.; // not canreportabout
-  std::map<CondAttrListCollection::ChanNum, float >::const_iterator pPair(m_pModulesTemp0->find(castId(m_moduleId)) );  // find the module 
-  if ( pPair != m_pModulesTemp0->end() && isGood(elementId, h)){
-    int bec = m_pHelper->barrel_ec(m_moduleId);
-    if (bec == 0){
-      return ( pPair->second + m_barrel_correction);  //return the temp+correction    
-    } else {
-      int modeta =  m_pHelper->eta_module(m_moduleId);
-      if (modeta==2){
-      	return ( pPair->second + m_ecInner_correction);  //return the temp+correction
+//Returns temp0 + correction for Lorentz angle calculation (s_defaultTemperature(-40) if there is no information)
+float SCT_DCSConditionsSvc::sensorTemperature(const Identifier& elementId, InDetConditions::Hierarchy h) {
+  m_moduleId = getModuleID(elementId, h);
+  if (not m_moduleId.is_valid()) return s_defaultTemperature; // not canreportabout
+
+  float temperature{s_defaultTemperature};
+  if (m_pModulesTemp0->getValue(castId(m_moduleId), temperature) and isGood(elementId, h)) {
+    int bec{m_pHelper->barrel_ec(m_moduleId)};
+    if (bec==0) { // Barrel
+      return ( temperature + m_barrel_correction);  //return the temp+correction
+    } else { // Endcaps
+      int modeta{m_pHelper->eta_module(m_moduleId)};
+      if (modeta==2) {
+      	return (temperature + m_ecInner_correction);  //return the temp+correction
       } else {
-	      return ( pPair->second + m_ecOuter_correction);  //return the temp+correction	
+	return (temperature + m_ecOuter_correction);  //return the temp+correction
       }
     }
   }
-  return -40.;  //didn't find the module, return -40. 
+  return s_defaultTemperature;  //didn't find the module, return s_defaultTemperature(-40).
 } 
 
 //Does the same for hashIds
-float SCT_DCSConditionsSvc::sensorTemperature(const IdentifierHash & hashId){
+float SCT_DCSConditionsSvc::sensorTemperature(const IdentifierHash& hashId) {
   m_waferId = m_pHelper->wafer_id(hashId);
   m_moduleId = m_pHelper->module_id(m_waferId);
-  return sensorTemperature(m_moduleId,InDetConditions::SCT_MODULE);
+  return sensorTemperature(m_moduleId, InDetConditions::SCT_MODULE);
 }
 
 ///////////////////////////////////
 
 //The actual function which puts a error code in a map for each DCS parameter/folder
-StatusCode SCT_DCSConditionsSvc::fillData(int &/* i */, std::list<std::string>& keys) {
+StatusCode SCT_DCSConditionsSvc::fillData(int& /* i */, std::list<std::string>& keys) {
  
   m_dataFilled=false;
-  if (not m_pBadModules) {
-    msg(MSG::ERROR) << "Bad modules data object has NULL pointer" << endmsg;
+  if (!m_pBadModules) {
+    ATH_MSG_ERROR("Bad modules data object has NULL pointer");
     return StatusCode::FAILURE;
   }
 
-  std::list<std::string>::const_iterator itr_key(keys.begin());
+  std::list<std::string>::const_iterator itr_key{keys.begin()};
   // Retrieve CondAttrListCollection
   const CondAttrListCollection* attrListCollection;
   for (; itr_key!=keys.end(); ++itr_key) {
-    const std::string & thisFolder=*itr_key;
+    const std::string& thisFolder{*itr_key};
     if (m_detStore->retrieve(attrListCollection,thisFolder).isSuccess()) {
       // loop over collection
-      CondAttrListCollection::const_iterator attrList( attrListCollection->begin());
-      CondAttrListCollection::const_iterator end( attrListCollection->end());
+      CondAttrListCollection::const_iterator attrList{attrListCollection->begin()};
+      CondAttrListCollection::const_iterator end{attrListCollection->end()};
       //std::ostringstream attrStr1;
-      for (;attrList!=end;++attrList) {
+      for (; attrList!=end; ++attrList) {
         //A CondAttrListCollection is a map of ChanNum and AttributeList
-        CondAttrListCollection::ChanNum  channelNumber=(*attrList).first;
-        const CondAttrListCollection::AttributeList   & payload=attrList->second;
+        CondAttrListCollection::ChanNum channelNumber{(*attrList).first};
+        const CondAttrListCollection::AttributeList& payload{attrList->second};
         //loop over AttributeListSpecification
-        coral::AttributeList::const_iterator attrspecb = payload.begin();
-        coral::AttributeList::const_iterator attrspece = payload.end();
-        for (;attrspecb!=attrspece;++attrspecb) {
-          //0 is OK, 1 is Alarm, 2 is Unknown : see SCT_DcsAlerts.h 'DcsStatus' enum.
-          std::string param=(*attrspecb).specification().name();
-	        //Check if modules was not ok (1 or 16 for HV and LV) and not set manually (3 or 48). Both LV and HV must be either for module to be good.  
-          if (param == "STATE") {
-	    try{
-	      int hvstate = (*attrList).second[param].data<unsigned int>() bitand 240;
-	      int lvstate = (*attrList).second[param].data<unsigned int>() bitand 15;
-	      if ((    (m_chanstatCut == "NORM")  && !( ( hvstate==16 || hvstate==48 ) && ( lvstate==1 || lvstate==3 ) )  )
-		  || ( (m_chanstatCut == "NSTBY") && !( ( hvstate==16 || hvstate==48 || hvstate == 32) && ( lvstate==1 || lvstate==3 || lvstate == 2) ) )
-		  || ( (m_chanstatCut == "LOOSE") && !( ( hvstate==16 || hvstate==48 || hvstate == 32 || hvstate == 128) && ( lvstate==1 || lvstate==3 || lvstate == 2 || lvstate == 8) ) )
-		  ){  //Option for no cut is m_chanstatCut == 'NONE'
+        coral::AttributeList::const_iterator attrspecb{payload.begin()};
+        coral::AttributeList::const_iterator attrspece{payload.end()};
+        for (; attrspecb!=attrspece; ++attrspecb) {
+          std::string param{(*attrspecb).specification().name()};
+	  //Check if modules was not ok (1 or 16 for HV and LV) and not set manually (3 or 48). Both LV and HV must be either for module to be good.  
+          if (param=="STATE") {
+	    try {
+	      unsigned int hvstate{(*attrList).second[param].data<unsigned int>() bitand 240};
+	      unsigned int lvstate{(*attrList).second[param].data<unsigned int>() bitand 15};
+	      if (   ( (m_chanstatCut=="NORM")  and not ((hvstate==16 or hvstate==48)                                and (lvstate==1 or lvstate==3)) )
+		 or ( (m_chanstatCut=="NSTBY") and not ((hvstate==16 or hvstate==48 or hvstate==32)                 and (lvstate==1 or lvstate==3 or lvstate==2)) )
+       	         or ( (m_chanstatCut=="LOOSE") and not ((hvstate==16 or hvstate==48 or hvstate==32 or hvstate==128) and (lvstate==1 or lvstate==3 or lvstate==2 or lvstate==8)) )
+		 ) {  //Option for no cut is m_chanstatCut == 'NONE'
 		m_pBadModules->fill(channelNumber, param);
-	      } 
-	      else m_pBadModules->remove(channelNumber, param);
-	    }catch(...){
-        ATH_MSG_DEBUG( "Exception caught while trying to access STATE");
+	      } else {
+		m_pBadModules->remove(channelNumber, param);
+	      }
+	    } catch(...) {
+	      ATH_MSG_DEBUG("Exception caught while trying to access STATE");
 	    }
-	  } 
-	  //Set to ignore all parameters, except HV and LV
-	  else if (param == "CCtagON_Name" || param == "CCtagON_Send" || param == "CCtagON_Recv" || param == "LVCHSTAT_RECV" || param == "HVCHCURR_RECV") {
+	  } else if (param=="CCtagON_Name" or param=="CCtagON_Send" or param=="CCtagON_Recv" or param=="LVCHSTAT_RECV" or param=="HVCHCURR_RECV") {
+	    //Set to ignore all parameters, except HV and LV
 	    continue;
 	  } 
+
 	  // if we are asked to return the HV and temp, then we need to fill these strucures. 
-	  if (param == "HVCHVOLT_RECV") {
-	    try{
-	      float hvval = (*attrList).second[param].data<float>();
-	      if( (hvval < m_hvLowLimit) || (hvval > m_hvUpLimit) ) {
+	  if (param=="HVCHVOLT_RECV") {
+	    try {
+	      float hvval{(*attrList).second[param].data<float>()};
+	      if ((hvval<m_hvLowLimit) or (hvval>m_hvUpLimit)) {
 		m_pBadModules->fill(channelNumber, param);
+	      } else {
+		m_pBadModules->remove(channelNumber, param);
 	      }
-	      else m_pBadModules->remove(channelNumber, param);
-	      if (m_returnHVTemp){
-		(*m_pModulesHV)[channelNumber]=hvval;
+	      if (m_returnHVTemp) {
+		m_pModulesHV->setValue(channelNumber, hvval);
 	      }
-	    }catch(...){
-        ATH_MSG_DEBUG("Exception caught while trying to access HVCHVOLT_RECV");
+	    } catch(...) {
+	      ATH_MSG_DEBUG("Exception caught while trying to access HVCHVOLT_RECV");
 	    }
-	  } else if (m_returnHVTemp && param == "MOCH_TM0_RECV") {
-	    try{
-              (*m_pModulesTemp0)[channelNumber]=(*attrList).second[param].data<float>();
-	    }catch(...){
+	  } else if (m_returnHVTemp and param=="MOCH_TM0_RECV") {
+	    try {
+              m_pModulesTemp0->setValue(channelNumber, (*attrList).second[param].data<float>());
+	    } catch(...) {
 	      ATH_MSG_DEBUG("Exception caught while trying to access MOCH_TM0_RECV");
 	    }
-	  } else if (m_returnHVTemp && param == "MOCH_TM1_RECV") { //2 temp sensors per module
-	    try{
-	      (*m_pModulesTemp1)[channelNumber]=(*attrList).second[param].data<float>();
-	    }catch(...){
-        ATH_MSG_DEBUG("Exception caught while trying to access MOCH_TM1_RECV");
+	  } else if (m_returnHVTemp and param=="MOCH_TM1_RECV") { //2 temp sensors per module
+	    try {
+	      m_pModulesTemp1->setValue(channelNumber, (*attrList).second[param].data<float>());
+	    } catch(...) {
+	      ATH_MSG_DEBUG("Exception caught while trying to access MOCH_TM1_RECV");
 	    }
 	  }
 	}
 
-        }
       }
-      m_dataFilled=true;
     }
+    m_dataFilled=true;
+  }
 
   //we are done with the db folders and have the data locally. 
-  if (!m_dropFolder){
-    std::list<std::string>::const_iterator itr2_key(keys.begin());
-    for (; itr2_key!=keys.end(); ++itr2_key) {
-      const std::string & aFolder=*itr2_key;
+  if (not m_dropFolder) {
+    std::list<std::string>::const_iterator itr2_key{keys.begin()};
+    std::list<std::string>::const_iterator end2_key{keys.end()};
+    for (; itr2_key!=end2_key; ++itr2_key) {
+      const std::string& aFolder{*itr2_key};
       // loop over collection
-      m_IOVDbSvc->dropObject(aFolder,false); //"false" here keeps the data in the cache, so SG doesn't have to go back to the DB each time  
+      m_IOVDbSvc->dropObject(aFolder, false); //"false" here keeps the data in the cache, so SG doesn't have to go back to the DB each time  
     }
   }
+
   return StatusCode::SUCCESS;
 }
-
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DCSConditionsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DCSConditionsSvc.h
index 2ffdd2bf58730c7b0f3247d47d34324c90213801..ce1c9d6b54ca23c27e6ddaf2df3b81db407e8184 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DCSConditionsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DCSConditionsSvc.h
@@ -16,70 +16,65 @@
 //
 #include "AthenaBaseComps/AthService.h"
 #include "GaudiKernel/ServiceHandle.h"
+#include "GaudiKernel/Property.h"
 //
 #include "InDetConditionsSummaryService/InDetHierarchy.h"
 #include "SCT_ConditionsServices/ISCT_DCSConditionsSvc.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
-#include "AthenaKernel/IOVSvcDefs.h" 
 #include "AthenaKernel/IIOVDbSvc.h" 
+#include "Identifier/Identifier.h"
+#include "Identifier/IdentifierHash.h"
+#include "SCT_ConditionsData/SCT_DCSFloatCondData.h"
+#include "SCT_ConditionsData/SCT_DCSStatCondData.h"
 //STL
-#include <vector>
 #include <list>
 #include <string>
 #include <map>
 
-class IIOVSvc;
-template <class TYPE> class SvcFactory;
-class ISvcLocator;
-class IdentifierHash;
-class StatusCode;
-class SCT_DCSConditionsData;
 class SCT_ID;
 
 /**
  * Class to provide DCS information about modules from the COOL database
  **/
-class SCT_DCSConditionsSvc: virtual public ISCT_DCSConditionsSvc,virtual public AthService {
-  friend class SvcFactory<SCT_DCSConditionsSvc>;
+class SCT_DCSConditionsSvc: virtual public ISCT_DCSConditionsSvc, virtual public AthService {
   
 public:
-  SCT_DCSConditionsSvc( const std::string& name, ISvcLocator* pSvcLocator );
-  virtual ~SCT_DCSConditionsSvc(){ /*do nothing*/}
+  SCT_DCSConditionsSvc(const std::string& name, ISvcLocator* pSvcLocator);
+  virtual ~SCT_DCSConditionsSvc() { /*do nothing*/ }
   virtual StatusCode initialize();
   virtual StatusCode finalize();
-  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
+  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
   static const InterfaceID& interfaceID();
   
-  
   /// @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);
   //returns the module ID (int), or returns 9999 (not a valid module number) if not able to report
-  virtual  Identifier getModuleID(const Identifier & elementId, InDetConditions::Hierarchy h);
+  virtual  Identifier getModuleID(const Identifier& elementId, InDetConditions::Hierarchy h);
   ///Summarise the result from the service as good/bad
-  virtual bool isGood(const Identifier & elementId,InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
+  virtual bool isGood(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
   ///is it good?, using wafer hash
-  virtual bool isGood(const IdentifierHash & hashId);
+  virtual bool isGood(const IdentifierHash& hashId);
   //Returns HV (0 if there is no information)
-  virtual float modHV(const Identifier & elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
+  virtual float modHV(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
   //Does the same for hashIds
-  virtual float modHV(const IdentifierHash & hashId);
+  virtual float modHV(const IdentifierHash& hashId);
   //Returns temp0 (0 if there is no information)
-  virtual float hybridTemperature(const Identifier & elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
+  virtual float hybridTemperature(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
   //Does the same for hashIds
-  virtual float hybridTemperature(const IdentifierHash & hashId);
+  virtual float hybridTemperature(const IdentifierHash& hashId);
   //Returns temp0 + correction for Lorentz angle calculation (0 if there is no information)
-  virtual float sensorTemperature(const Identifier & elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
+  virtual float sensorTemperature(const Identifier& elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
   //Does the same for hashIds
-  virtual float sensorTemperature(const IdentifierHash & hashId);
-  virtual StatusCode fillData(int&  i  , std::list<std::string>& keys);
+  virtual float sensorTemperature(const IdentifierHash& hashId);
+  virtual StatusCode fillData(int& i, std::list<std::string>& keys);
   ///Manually get the data in the structure before proceding
-  virtual StatusCode fillData(){return StatusCode::FAILURE;}
+  virtual StatusCode fillData() { return StatusCode::FAILURE; }
   virtual bool filled() const;
   ///Need to access cool on every callback, so can't fill during initialize
-  virtual bool canFillDuringInitialize(){return false; }
+  virtual bool canFillDuringInitialize() { return false; }
   //@}
     
 private:
@@ -103,27 +98,22 @@ private:
   float m_ecOuter_correction;
   float m_hvLowLimit;
   float m_hvUpLimit;
-  SCT_DCSConditionsData* m_pBadModules;
-  std::map<CondAttrListCollection::ChanNum, float >* m_pModulesHV;
-  std::map<CondAttrListCollection::ChanNum, float >* m_pModulesTemp0;
-  std::map<CondAttrListCollection::ChanNum, float >* m_pModulesTemp1;
-  const SCT_ID*  m_pHelper;
-  //IdentifierHash  m_hashId;
-  //IdentifierHash  channum_hash;
-  Identifier  m_moduleId;
-  Identifier  m_waferId;
+  std::unique_ptr<SCT_DCSStatCondData> m_pBadModules;
+  std::unique_ptr<SCT_DCSFloatCondData> m_pModulesHV;
+  std::unique_ptr<SCT_DCSFloatCondData> m_pModulesTemp0;
+  std::unique_ptr<SCT_DCSFloatCondData> m_pModulesTemp1;
+  const SCT_ID* m_pHelper;
+  Identifier m_moduleId;
+  Identifier m_waferId;
   std::string m_folderPrefix;
   std::string m_chanstatCut;
   bool m_useHV;
   float m_useHVLowLimit;
   float  m_useHVUpLimit;
   std::string m_useHVChanCut;
+  static const Identifier s_invalidId;
+  static const float s_defaultHV;
+  static const float s_defaultTemperature;
 };
 
-// inline const InterfaceID & SCT_DCSConditionsSvc::interfaceID(){
-//   static const InterfaceID IID_SCT_DCSConditionsSvc("SCT_DCSConditionsSvc",1,0);
-//   return IID_SCT_DCSConditionsSvc;
-// }
-
-
 #endif // SCT_DCSConditionsSvc_h 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DcsAlerts.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DcsAlerts.h
deleted file mode 100644
index 6448bed1c520d7070f8b9ed322bac056d8344111..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_DcsAlerts.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file ISCT_ConditionsSvc.h
- * header file containing DCS limits for the SCT_DCSConditionsSvc
- * @author shaun.roe@cern.ch, based on values from A. R-Veronneau
-**/
-
-#include <string>
-#include <utility>
-#include <map>
-#include <algorithm>
-
-namespace SCT_ConditionsServices{
-  ///Struct to store the upper and lower thresholds for alarms
-  struct LimitValues{
-    float loAlarm, hiAlarm;
-    LimitValues(float a, float b):loAlarm(a), hiAlarm(b) { }
-  };
-  ///A DCS value may be any of these
-  enum DcsStatus{DCS_OK, DCS_ALARM, DCS_UNKNOWN};
-  
-  typedef std::pair<const std::string, LimitValues> AlertsPair;
-  ///Hardwired values for warnings and alarms
-  const AlertsPair alertsPairs[]={
-    AlertsPair("LVCH_VCC_RECV",LimitValues(0.0, 3.7) ),
-    //AlertsPair("LVPS_VCC_RECV",LimitValues(0.0, 3.7) ),
-    //AlertsPair("LVRETVCC_RECV",LimitValues(0.0, 5.7) ),
-    //AlertsPair("LVCH_VDD_RECV",LimitValues(0.0, 4.2) ),
-    //AlertsPair("LVPS_VDD_RECV",LimitValues(0.0, 4.2) ),
-    //AlertsPair("LVRETVDD_RECV",LimitValues(0.0, 5.7) ),
-    //AlertsPair("LVCHVCSV_RECV",LimitValues(0.0, 4.2) ),
-    //AlertsPair("LVCHVCSI_RECV",LimitValues(0.0, 4.0) ),
-    //AlertsPair("LVCHPINV_RECV",LimitValues(0.0, 6.2) ),
-    //AlertsPair("LVCHPINI_RECV",LimitValues(0.0, 0.6) ),
-    //AlertsPair("MOCH_TM0_RECV",LimitValues(10, 33, 35, -273.0) ), //odd value??
-    //AlertsPair("MOCH_TM1_RECV",LimitValues(10, 33, 35, -273.0) ), //odd value??
-    AlertsPair("HVCHVOLT_RECV",LimitValues(140.0, 157.5) ),
-    AlertsPair("HVCHCURR_RECV",LimitValues(0.0, 30000000.0) ), //value in nA
-    AlertsPair("LVCH_ICC_RECV",LimitValues(0.0, 1250.0) ),
-    //AlertsPair("LVCH_IDD_RECV",LimitValues(0.0, 1000.0) )
-  };
-  
-  ///utility to return the 'end' of a classic array
-  template<class T, int Size> T  * endof( T (&parray)[Size]){
-   return parray + Size;
-  }
-  ///A map of the parameter name to the threshold values
-  const std::map<std::string, LimitValues> alertsMap(alertsPairs, endof(alertsPairs) );
-  
-  ///Indicate the status of a given value for a given DCS parameter
-  DcsStatus
-  DcsValueStatus(const std::string & parameterName, const float parameterValue){
-    std::map<std::string, LimitValues>::const_iterator thisPair=alertsMap.find(parameterName);
-    if (thisPair == alertsMap.end()) return DCS_UNKNOWN;
-    LimitValues theseLimits=thisPair->second;
-    //hopefully, OK is most likely value, so check for that first
-    if ((parameterValue>theseLimits.loAlarm) and (parameterValue<theseLimits.hiAlarm)) return DCS_OK;
-    return DCS_ALARM;
-  }
-  
-  
-}//end of namespace scope
-
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ElectricFieldTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ElectricFieldTool.cxx
index 405b2c58710a93f3070c611bcf5de90dc9a126d1..5c211f3725020a2902d90adfd7db7257e41b79f0 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ElectricFieldTool.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ElectricFieldTool.cxx
@@ -18,7 +18,6 @@ SCT_ElectricFieldTool::SCT_ElectricFieldTool(const std::string& t, const std::st
 }
 
 SCT_ElectricFieldTool::~SCT_ElectricFieldTool(){
-  delete m_model;
 }
 
 StatusCode 
@@ -93,7 +92,7 @@ double SCT_ElectricFieldTool::getElectricField(double positionZ,
     ATH_MSG_INFO( "Using for E-field simple toy model corresponding to 10^15 fluence, full depletion end for holes." );
     
     if (!m_model) {
-      m_model = new TF1("pol6","pol6",0,0.03);
+      m_model = std::make_unique<TF1>("pol6","pol6",0,0.03);
       m_model->SetParameters(1.04176,
              2095.14,
              -606483.,
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ElectricFieldTool.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ElectricFieldTool.h
index 62a0dcad8adb1bf918d57e28b98c655f0185def6..f4af92a5752e60d3ed818c48e6b7a485a09d2fae 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ElectricFieldTool.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ElectricFieldTool.h
@@ -14,7 +14,6 @@
 
 //Gaudi Includes
 //#include "GaudiKernel/IInterface.h"
-//#include "GaudiKernel/ToolHandle.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "SCT_ConditionsServices/ISCT_ElectricFieldTool.h"
 
@@ -43,7 +42,7 @@ public:
   int m_eFieldModel;      //!< 0 uniform E-field model, 1 flat diode model
 
 private:
-  TF1* m_model;
+  std::unique_ptr<TF1> m_model;
 };
 
 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_FlaggedConditionSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_FlaggedConditionSvc.cxx
index d840b4e785f292ad6788e2294a9fe33b25cd45b5..481512e55c113ea2d870562ee1763dc348aa077b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_FlaggedConditionSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_FlaggedConditionSvc.cxx
@@ -16,7 +16,7 @@
 SCT_FlaggedConditionSvc::SCT_FlaggedConditionSvc( const std::string& name, ISvcLocator* pSvcLocator ): 
   AthService(name, pSvcLocator),
   m_filled(false),
-  m_badIds{nullptr},
+  m_badIds{},
   m_detStore("DetectorStore", name),
   m_sctID{nullptr}
 {/* Do nothing */}
@@ -36,9 +36,6 @@ StatusCode SCT_FlaggedConditionSvc::initialize(){
     incsvc->addListener( this, "BeginEvent", priority);
   }
 
-  // Allocate memory for map of bad IDs
-  m_badIds = new std::map <IdentifierHash, std::string>;
-
   // Retrieve SCT helper
   if (m_detStore->retrieve(m_sctID,"SCT_ID").isFailure()) 
     return  msg(MSG:: ERROR) << "SCT helper failed to retrieve" << endmsg, StatusCode::FAILURE;
@@ -50,7 +47,6 @@ StatusCode SCT_FlaggedConditionSvc::initialize(){
 StatusCode SCT_FlaggedConditionSvc::finalize(){
   StatusCode sc(StatusCode::SUCCESS);
   msg(MSG::INFO) << "SCT_FlaggedConditionSvc::finalize()" << endmsg;
-  delete m_badIds;
   return sc;
 }
 
@@ -71,7 +67,7 @@ StatusCode SCT_FlaggedConditionSvc::queryInterface(const InterfaceID& riid, void
 
 // Clear list of bad IDs (called at begin event)
 void SCT_FlaggedConditionSvc::resetBadIds() {
-  m_badIds->clear();
+  m_badIds.clear();
 }
 
 // Handle BeginEvent incident and call reset function
@@ -93,12 +89,12 @@ bool SCT_FlaggedConditionSvc::isGood(const Identifier& elementId, InDetCondition
 
 // Is this element good (by IdentifierHash)?
 bool SCT_FlaggedConditionSvc::isGood(const IdentifierHash& hashId){
-  return (m_badIds->find(hashId) == m_badIds->end());;
+  return (m_badIds.find(hashId) == m_badIds.end());;
 }
 
 // Flag a wafer as bad (by IdentifierHash) with a reason
 bool SCT_FlaggedConditionSvc::flagAsBad(const IdentifierHash& hashId, const std::string& source) {
-  return m_badIds->insert(make_pair(hashId, source)).second;
+  return m_badIds.insert(make_pair(hashId, source)).second;
 }
 
 // Flag a wafer as bad (by Identifier) with a reason
@@ -110,9 +106,9 @@ bool SCT_FlaggedConditionSvc::flagAsBad(const Identifier& Id, const std::string&
 // Retrieve the reason why the wafer is flagged as bad (by IdentifierHash)
 // If wafer is not found return a null string
 const std::string& SCT_FlaggedConditionSvc::details(const IdentifierHash& hashId) const {
-  std::map<IdentifierHash, std::string>::const_iterator itr(m_badIds->find(hashId)); 
+  std::map<IdentifierHash, std::string>::const_iterator itr(m_badIds.find(hashId)); 
   static const std::string nullString;
-  return ((itr != m_badIds->end()) ? (*itr).second : nullString);
+  return ((itr != m_badIds.end()) ? (*itr).second : nullString);
 }
 
 // Retrieve the reason why the wafer is flagged as bad (by Identifier)
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_FlaggedConditionSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_FlaggedConditionSvc.h
index c909b30a1751ebaa81b9bcfd7365ce935b26cc3c..e8db272078a78b9561d6dd0c223c5aae198a5fa3 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_FlaggedConditionSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_FlaggedConditionSvc.h
@@ -89,17 +89,17 @@ public:
   const std::string& details(const IdentifierHash& id) const;
 
   /**Get number flagged as bad (per event)*/
-  inline int numBadIds() const {return m_badIds->size();}
+  inline int numBadIds() const {return m_badIds.size();}
 
   /**Get IdentifierHashs ofwafers flagged as bad + reason (per event)*/
-  inline std::map <IdentifierHash, std::string>* getBadIds() const {return m_badIds;}
+  inline const std::map<IdentifierHash, std::string>* getBadIds() const {return &m_badIds;}
 
   /**Reset between events*/
   virtual void resetBadIds();
 
  private:
   bool                                                m_filled;      //!< Has this been filles
-  std::map <IdentifierHash, std::string>*             m_badIds;      //!< Map of bad IdentiferHash and reason
+  std::map<IdentifierHash, std::string> m_badIds;  //!< Map of bad IdentiferHash and reason
 
   ServiceHandle<StoreGateSvc>                         m_detStore;    //!< Handle on detector store
   const SCT_ID*                                       m_sctID;       //!< ID helper for SCT
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ModuleVetoSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ModuleVetoSvc.cxx
index 8ba0b65188a50629e210dd551a768356c0de958e..363fab26e4de3bdf9b80a06a99cd197e4c516133 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ModuleVetoSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ModuleVetoSvc.cxx
@@ -35,16 +35,16 @@ string2Vector(const std::string & s){
 		std::istream_iterator<T> endOfString; //relies on default constructor to produce eof
 		std::copy(vecRead,endOfString,std::back_inserter(v));// DOESN'T ALLOW NON-WHITESPACE DELIMITER !
 		return v;
-	}
+}
 
 // Constructor
 SCT_ModuleVetoSvc::SCT_ModuleVetoSvc( const std::string& name, ISvcLocator* pSvcLocator ) :
-  AthService(name, pSvcLocator), 
-  m_filled(false), 
+  AthService(name, pSvcLocator),
+  m_filled{false},
   m_pHelper{nullptr},
-  m_useDatabase(false), 
-  m_maskLayers(false),
-  m_maskSide(-1),
+  m_useDatabase{false},
+  m_maskLayers{false},
+  m_maskSide{-1},
   m_detStore("DetectorStore",name)
 {
   declareProperty("BadModuleIdentifiers",m_badElements);
@@ -57,50 +57,57 @@ SCT_ModuleVetoSvc::SCT_ModuleVetoSvc( const std::string& name, ISvcLocator* pSvc
 //Initialize
 StatusCode 
 SCT_ModuleVetoSvc::initialize(){
-  StatusCode sc(StatusCode::SUCCESS);
- //
-   //
+  StatusCode sc{StatusCode::SUCCESS};
 
-  if (m_maskLayers &&  !m_layersToMask.size() && !m_disksToMask.size()){
+  if(m_maskLayers &&  !m_layersToMask.size() && !m_disksToMask.size()) {
     ATH_MSG_DEBUG( "Layer/Disk masking enabled, but no layer/disk specified!" );
     m_maskLayers = false;
   }
   
-  if (!m_maskLayers &&  (m_layersToMask.size() || m_disksToMask.size())){
+  if(!m_maskLayers &&  (m_layersToMask.size() || m_disksToMask.size())) {
     ATH_MSG_DEBUG( "Layer/Disk to mask specified, but masking is disabled!" );
   } 
 
-   if (!m_maskLayers &&  m_maskSide!=-1){
+  if(!m_maskLayers &&  m_maskSide!=-1) {
     ATH_MSG_DEBUG( "Layer/Disk side to mask specified, but masking is disabled!" );
    } 
   
-  if (m_maskLayers &&  m_disksToMask.size() && (std::find(m_disksToMask.begin(), m_disksToMask.end(),0)!=m_disksToMask.end())){
+  if(m_maskLayers &&  m_disksToMask.size() && (std::find(m_disksToMask.begin(), m_disksToMask.end(),0)!=m_disksToMask.end())) {
     ATH_MSG_WARNING( "0th Disk not defined (-N to N) - check your setup!" );
   }   
 
-  if (m_detStore->retrieve(m_pHelper,"SCT_ID").isFailure()) return msg(MSG::ERROR)<<"SCT helper failed to retrieve"<<endmsg, StatusCode::FAILURE;
-  else  msg(MSG::INFO)<<"Successfully retrieved SCT_ID helper"<<endmsg;  
+  if(m_detStore->retrieve(m_pHelper,"SCT_ID").isFailure()) {
+    ATH_MSG_ERROR("SCT helper failed to retrieve");
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_INFO("Successfully retrieved SCT_ID helper");
+  }
 
   m_useDatabase=(std::find(m_badElements.value().begin(),m_badElements.value().end(),databaseSignature) != m_badElements.value().end());
-  if (not m_useDatabase){
-    if (fillData().isFailure()) return msg(MSG::ERROR)<<"Failed to fill data"<<endmsg, StatusCode::FAILURE;
+  if(not m_useDatabase) {
+    if(fillData().isFailure()) {
+      ATH_MSG_ERROR("Failed to fill data");
+      return StatusCode::FAILURE;
+    }
   } else {
-     if (m_detStore->regFcn(&SCT_ModuleVetoSvc::fillData,this,m_dbList,coolFolderName).isFailure()) return msg(MSG::ERROR)<<"Failed to register callback"<<endmsg, StatusCode::FAILURE;
+    if(m_detStore->regFcn(&SCT_ModuleVetoSvc::fillData,this,m_dbList,coolFolderName).isFailure()) {
+      ATH_MSG_ERROR("Failed to register callback");
+      return StatusCode::FAILURE;
+    }
   }
   //
-  const std::string databaseUseString(m_useDatabase?"":"not ");
-  msg(MSG::INFO)<<"Initialized veto service with data, "
-  <<(m_badElements.value().size() - int(m_useDatabase))
-  <<" elements declared bad. Database will "<<databaseUseString<<"be used."<<endmsg;
+  const std::string databaseUseString{m_useDatabase?"":"not "};
+  ATH_MSG_INFO("Initialized veto service with data, "
+	       <<(m_badElements.value().size() - int(m_useDatabase))
+	       <<" elements declared bad. Database will "<<databaseUseString<<"be used.");
  
   return sc;
 }
 
 //Finalize
 StatusCode
-SCT_ModuleVetoSvc::finalize(){
-  StatusCode sc(StatusCode::SUCCESS);
-  //Code
+SCT_ModuleVetoSvc::finalize() {
+  StatusCode sc{StatusCode::SUCCESS};
   return sc;
 }
 
@@ -111,9 +118,8 @@ SCT_ModuleVetoSvc::finalize(){
 //   Return: StatusCode indicating SUCCESS or FAILURE.
 // N.B. Don't forget to release the interface after use!!!
 StatusCode 
-SCT_ModuleVetoSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) 
-{
-  if ( ISCT_ConditionsSvc::interfaceID().versionMatch(riid) ) {
+SCT_ModuleVetoSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
+  if(ISCT_ConditionsSvc::interfaceID().versionMatch(riid)) {
     *ppvInterface = dynamic_cast<ISCT_ConditionsSvc*>(this);
   } else {
     // Interface is not directly available : try out a base class
@@ -124,83 +130,81 @@ SCT_ModuleVetoSvc::queryInterface(const InterfaceID& riid, void** ppvInterface)
 }
 
 bool 
-SCT_ModuleVetoSvc::canReportAbout(InDetConditions::Hierarchy h){
+SCT_ModuleVetoSvc::canReportAbout(InDetConditions::Hierarchy h) {
   return ((h==InDetConditions::DEFAULT) or (h==InDetConditions::SCT_SIDE) );
 }
 
 bool 
-SCT_ModuleVetoSvc::isGood(const Identifier & elementId, InDetConditions::Hierarchy h){
-  if (not canReportAbout(h)) return true;
-  bool result = (m_badIds.find(elementId) == m_badIds.end());
+SCT_ModuleVetoSvc::isGood(const Identifier & elementId, InDetConditions::Hierarchy h) {
+  if(not canReportAbout(h)) return true;
+  bool result{m_badIds.find(elementId) == m_badIds.end()};
   return result;
 }
 
 bool 
-SCT_ModuleVetoSvc::isGood(const IdentifierHash & hashId){
-  Identifier elementId=m_pHelper->wafer_id(hashId);
+SCT_ModuleVetoSvc::isGood(const IdentifierHash & hashId) {
+  Identifier elementId{m_pHelper->wafer_id(hashId)};
   return isGood(elementId);
 }
 
 StatusCode 
-SCT_ModuleVetoSvc::fillData(){
-  StatusCode sc(StatusCode::SUCCESS);
-  if ((m_badElements.value().size() - int(m_useDatabase)) == 0 && !m_maskLayers){
-    msg(MSG::INFO)<<"No bad modules in job options."<<endmsg;
+SCT_ModuleVetoSvc::fillData() {
+  StatusCode sc{StatusCode::SUCCESS};
+  if((m_badElements.value().size() - int(m_useDatabase)) == 0 && !m_maskLayers) {
+    ATH_MSG_INFO("No bad modules in job options.");
     return sc;
   } 
-  bool success(true);
-  std::vector<std::string>::const_iterator pId=m_badElements.value().begin();
-  std::vector<std::string>::const_iterator last=m_badElements.value().end();
-  for(;pId not_eq last;++pId){
-    unsigned long long idToWrite = atoll(pId->c_str()); 
-    if (*pId != databaseSignature) success &= m_badIds.insert(Identifier(idToWrite)).second;
+  bool success{true};
+  std::vector<std::string>::const_iterator pId{m_badElements.value().begin()};
+  std::vector<std::string>::const_iterator last{m_badElements.value().end()};
+  for(;pId not_eq last;++pId) {
+    unsigned long long idToWrite{static_cast<unsigned long long>(atoll(pId->c_str()))};
+    if(*pId != databaseSignature) success &= m_badIds.insert(Identifier(idToWrite)).second;
   }
 
-  if(m_maskLayers){
-    
-    msg(MSG::INFO)<<"Masking "<<m_layersToMask.size()<<" SCT Layers"<<endmsg;
-    msg(MSG::INFO)<<"Masking "<<m_disksToMask.size()<<" SCT Disks"<<endmsg;
-    for(unsigned int i = 0; i < m_pHelper->wafer_hash_max(); i++){
-      Identifier mID( m_pHelper->wafer_id(i) );
-      if (
+  if(m_maskLayers) {
+    ATH_MSG_INFO("Masking "<<m_layersToMask.size()<<" SCT Layers");
+    ATH_MSG_INFO("Masking "<<m_disksToMask.size()<<" SCT Disks");
+    for(unsigned int i{0}; i < m_pHelper->wafer_hash_max(); i++){
+      Identifier mID{m_pHelper->wafer_id(i)};
+      if(
 	  (m_pHelper->barrel_ec(mID) == 0 && (m_maskSide==-1 || m_pHelper->side(mID)==m_maskSide) && (std::find(m_layersToMask.begin(), m_layersToMask.end(), m_pHelper->layer_disk(mID)) != m_layersToMask.end())) ||
 	  (m_pHelper->barrel_ec(mID) == 2  && (m_maskSide==-1 || m_pHelper->side(mID)==m_maskSide) && (std::find(m_disksToMask.begin(), m_disksToMask.end(), (m_pHelper->layer_disk(mID) + 1)) != m_disksToMask.end())) ||
 	  (m_pHelper->barrel_ec(mID) == -2 && (m_maskSide==-1 || m_pHelper->side(mID)==m_maskSide) && (std::find(m_disksToMask.begin(), m_disksToMask.end(), -1*(m_pHelper->layer_disk(mID) + 1)) != m_disksToMask.end()))
-	  ){
-	msg(MSG::DEBUG)<<"Masking ID Hash"<<i<<endmsg;
+	 ) {
+	ATH_MSG_DEBUG("Masking ID Hash"<<i);
 	m_badIds.insert(mID);
       }
     }
   }
   
   m_filled=true;
-  msg(MSG::DEBUG)<<"Successfully filled bad SCT identifiers list"<<endmsg;
+  ATH_MSG_DEBUG("Successfully filled bad SCT identifiers list");
   return success?sc:(StatusCode::FAILURE);
 }
 
 StatusCode 
-SCT_ModuleVetoSvc::fillData(int& /*i*/ , std::list<std::string>& /*folderList*/){
-  StatusCode sc(fillData());
-  const StatusCode fail(StatusCode::FAILURE);
-  if (sc.isFailure() ) return fail;
-  if (m_detStore->retrieve(m_dbList,coolFolderName).isFailure())  return fail;
-  std::string badModuleString=m_dbList[0]["ModuleList"].data<std::string>();
-  std::vector<int> v=string2Vector<int>(badModuleString);
-  int numberInDb=v.size();
-  msg(MSG::INFO)<<numberInDb<<" elements were declared bad in the database."<<endmsg;
-  for (std::vector<int>::const_iterator i(v.begin());i!=v.end();++i){
+SCT_ModuleVetoSvc::fillData(int& /*i*/ , std::list<std::string>& /*folderList*/) {
+  StatusCode sc{fillData()};
+  if(sc.isFailure()) return StatusCode::FAILURE;
+  if(m_detStore->retrieve(m_dbList,coolFolderName).isFailure()) return StatusCode::FAILURE;
+  std::string badModuleString{m_dbList[0]["ModuleList"].data<std::string>()};
+  std::vector<int> v{string2Vector<int>(badModuleString)};
+  int numberInDb{static_cast<int>(v.size())};
+  ATH_MSG_INFO(numberInDb<<" elements were declared bad in the database.");
+  for(std::vector<int>::const_iterator i(v.begin());i!=v.end();++i) {
     m_badIds.insert(Identifier(*i));
   }
   return sc;
 }
 
 bool 
-SCT_ModuleVetoSvc::canFillDuringInitialize(){
+SCT_ModuleVetoSvc::canFillDuringInitialize() {
   return (not m_useDatabase);// can only fill during intialize if we don't use the database
 }
+
 bool
-SCT_ModuleVetoSvc::filled() const{
+SCT_ModuleVetoSvc::filled() const {
   //code
   return m_filled;
 }
-
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsCondAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..7567d0c6dc7ea1df92f13dccc6169e5c6f8f4d61
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsCondAlg.cxx
@@ -0,0 +1,106 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "SCT_MonitorConditionsCondAlg.h"
+
+#include "GaudiKernel/EventIDRange.h"
+
+SCT_MonitorConditionsCondAlg::SCT_MonitorConditionsCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
+  : ::AthAlgorithm(name, pSvcLocator)
+  , m_readKey{"/SCT/Derived/Monitoring"}
+  , m_writeKey{"SCT_MonitorConditionsCondData", "SCT_MonitorConditionsCondData"}
+  , m_condSvc{"CondSvc", name}
+{
+  declareProperty("ReadKey", m_readKey);
+  declareProperty("WriteKey", m_writeKey);
+}
+
+SCT_MonitorConditionsCondAlg::~SCT_MonitorConditionsCondAlg()
+{
+}
+
+StatusCode SCT_MonitorConditionsCondAlg::initialize()
+{
+  ATH_MSG_DEBUG("initialize " << name());
+
+  // CondSvc
+  ATH_CHECK(m_condSvc.retrieve());
+
+  // Read Cond Handle
+  ATH_CHECK(m_readKey.initialize());
+
+  // Write Cond Handle
+  ATH_CHECK(m_writeKey.initialize());
+  // Register write handle
+  if(m_condSvc->regHandle(this, m_writeKey, m_writeKey.dbKey()).isFailure()) {
+    ATH_MSG_ERROR("unable to register WriteCondHandle " << m_writeKey.fullKey() << " with CondSvc");
+    return StatusCode::FAILURE;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode SCT_MonitorConditionsCondAlg::execute()
+{
+  ATH_MSG_DEBUG("execute " << name());
+
+  // Write Cond Handle
+  SG::WriteCondHandle<SCT_MonitorConditionsCondData> writeHandle{m_writeKey};
+
+  // Do we have a valid Write Cond Handle for current time?
+  if(writeHandle.isValid()) {
+    // in theory this should never be called in MT
+    writeHandle.updateStore();
+    ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid."
+                  << ". In theory this should not be called, but may happen"
+                  << " if multiple concurrent events are being processed out of order."
+                  << " Forcing update of Store contents");
+    return StatusCode::SUCCESS;
+  }
+
+  // Construct the output Cond Object and fill it in
+  SCT_MonitorConditionsCondData* writeCdo{new SCT_MonitorConditionsCondData()};
+
+  // Read Cond Handle
+  SG::ReadCondHandle<CondAttrListCollection> readHandle{m_readKey};
+  const CondAttrListCollection* readCdo{*readHandle};
+  if(readCdo==nullptr) {
+    ATH_MSG_ERROR("Null pointer to the read conditions object");
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_INFO("Size of CondAttrListCollection readCdo->size()= " << readCdo->size());
+
+  // Fill Write Cond Handle
+  static const unsigned int defectListIndex{7};
+  CondAttrListCollection::const_iterator iter{readCdo->begin()};
+  CondAttrListCollection::const_iterator last{readCdo->end()};
+  for(; iter!=last; ++iter) {
+    const AthenaAttributeList& list{iter->second};
+    if(list.size()>defectListIndex) {
+      writeCdo->insert(iter->first, list[defectListIndex].data<std::string>());
+    }
+  }
+
+  // Define validity of the output cond obbject and record it
+  EventIDRange rangeW;
+  if(not readHandle.range(rangeW)) {
+    ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key());
+    return StatusCode::FAILURE;
+  }
+  if(writeHandle.record(rangeW, writeCdo).isFailure()) {
+    ATH_MSG_ERROR("Could not record SCT_TdaqEnabledCondData " << writeHandle.key()
+                  << " with EventRange " << rangeW
+                  << " into Conditions Store");
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_INFO("recorded new CDO " << writeHandle.key() << " with range " << rangeW << " into Conditions Store");
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode SCT_MonitorConditionsCondAlg::finalize()
+{
+  ATH_MSG_DEBUG("finalize " << name());
+  return StatusCode::SUCCESS;
+}
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsCondAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..6603418cf251454e506f2f515d8bdc8eb476f705
--- /dev/null
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsCondAlg.h
@@ -0,0 +1,30 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/ 
+
+#ifndef SCT_MONITORCONDITIONSCONDALG
+#define SCT_MONITORCONDITIONSCONDALG
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
+#include "StoreGate/WriteCondHandleKey.h"
+#include "SCT_ConditionsData/SCT_MonitorConditionsCondData.h"
+#include "GaudiKernel/ICondSvc.h"
+
+class SCT_MonitorConditionsCondAlg : public AthAlgorithm 
+{  
+ public:
+  SCT_MonitorConditionsCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
+  ~SCT_MonitorConditionsCondAlg();
+  StatusCode initialize();
+  StatusCode execute();
+  StatusCode finalize();
+
+ private:
+  SG::ReadCondHandleKey<CondAttrListCollection> m_readKey;
+  SG::WriteCondHandleKey<SCT_MonitorConditionsCondData> m_writeKey;
+  ServiceHandle<ICondSvc> m_condSvc; 
+};
+
+#endif // SCT_MONITORCONDITIONSCONDALG
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsSvc.cxx
index 7fcc537eac9e7a4b090c9d035750c0b9b890e6a3..30390fe1096e6b78d7fe0f82f99f8eeba54c4738 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsSvc.cxx
@@ -11,183 +11,81 @@
  * @author Kazu
  * @date 5 March 2008
  **/
-#include "SCT_MonitorConditionsSvc.h"
-#include "SCT_SlhcIdConverter.h"
-// IOVDbTest includes
-#include "RegistrationServices/IIOVRegistrationSvc.h"
 
-// Gaudi includes
-#include "GaudiKernel/StatusCode.h"
-#include "GaudiKernel/IToolSvc.h"
-
-// Athena includes
-#include "AthenaKernel/IAthenaOutputStreamTool.h"
-#include "CoralBase/Attribute.h"
+#include "SCT_MonitorConditionsSvc.h"
 
-#include "AthenaPoolUtilities/AthenaAttributeList.h"
-#include "AthenaPoolUtilities/CondAttrListCollection.h"
-#include "CoralBase/AttributeListSpecification.h"
+#include "SCT_SlhcIdConverter.h"
 
-#include "StoreGate/StoreGateSvc.h"
 #include "Identifier/IdentifierHash.h"
 #include "InDetIdentifier/SCT_ID.h"
 
-#include "EventInfo/EventID.h"
-
-//path resolver to find the file
-#include "PathResolver/PathResolver.h"
-
-#include <fstream>
 #include <iterator>
-#include <sstream>
-#include <iostream>
 #include <istream>
 
 using std::string;
 using SCT_ConditionsServices::castId;
-namespace{
- coral::AttributeListSpecification*
- basicAttrList(const bool camelCasedBec){
-   const std::string becString=(camelCasedBec)?("BarrelEndcap"):("barrel_endcap");
-   coral::AttributeListSpecification *basicSpec=new  coral::AttributeListSpecification();
-   basicSpec->extend("SampleSize","int");
-   basicSpec->extend(becString,"int");
-   basicSpec->extend("Layer","int");
-   basicSpec->extend("Eta","int");
-   basicSpec->extend("Phi","int");
-   return basicSpec;
- } 
-  bool doesNotHaveNumbers(const std::string & numberString){
+
+namespace {
+  bool doesNotHaveNumbers(const std::string & numberString) {
     return (numberString.empty() or numberString.find_first_of("0123456789") == std::string::npos);
   }
 }
+
 /////////////////////////////////////////////////////////////////////////////
-string SCT_MonitorConditionsSvc::s_separator = string("-");
-string SCT_MonitorConditionsSvc::s_defectFolderName = string("/SCT/Derived/Monitoring");
-string SCT_MonitorConditionsSvc::s_deadStripFolderName = string("/SCT/Derived/DeadStrips");
-string SCT_MonitorConditionsSvc::s_deadChipFolderName = string("/SCT/Derived/DeadChips");
-string SCT_MonitorConditionsSvc::s_effFolderName = string("/SCT/Derived/Efficiency");
-string SCT_MonitorConditionsSvc::s_noFolderName = string("/SCT/Derived/NoiseOccupancy");
-
-SCT_MonitorConditionsSvc::SCT_MonitorConditionsSvc( const std::string& name,ISvcLocator* pSvcLocator ) :
-  AthService( name, pSvcLocator ),
-  m_attrListCollection{nullptr},
-  m_attrListColl{nullptr},
-  m_attrListColl_eff{nullptr},
-  m_attrListColl_no{nullptr},
-  m_detStore("DetectorStore", name),
-  m_IOVDbSvc("IOVDbSvc", name),
-  m_writeCondObjs(false),
-  m_regIOV(false),
-  m_readWriteCool(false),
-  m_twoStepWriteReg(false),
-  m_manualiov(false),
-  m_regTime(0),
-  m_version(0),
-  m_nhits_noisychip(64),
-  m_nhits_noisywafer(384),
-  m_nhits_noisymodule(768),
-  m_beginRun(IOVTime::MINRUN),
-  m_endRun(IOVTime::MAXRUN),
-  m_streamName("CondStreamTest"),
-  m_regSvc{nullptr},
-  m_streamer{nullptr},
-  m_filled(false),
-  m_defectRecorded(false),
-  m_effRecorded(false),
-  m_noRecorded(false),
+
+string SCT_MonitorConditionsSvc::s_separator{string("-")};
+string SCT_MonitorConditionsSvc::s_defectFolderName{string("/SCT/Derived/Monitoring")};
+
+SCT_MonitorConditionsSvc::SCT_MonitorConditionsSvc(const std::string& name,ISvcLocator* pSvcLocator) :
+  AthService(name, pSvcLocator),
+  m_detStore{"DetectorStore", name},
+  m_nhits_noisychip{64},
+  m_nhits_noisywafer{384},
+  m_nhits_noisymodule{768},
   m_pHelper{nullptr},
-  m_currentDefectList("")
+  m_currentDefectList{""},
+  m_condData{nullptr},
+  m_condKey{std::string{"SCT_MonitorConditionsCondData"}}
 {
-  declareProperty("WriteCondObjs",     m_writeCondObjs);
-  declareProperty("RegisterIOV",       m_regIOV);
-  declareProperty("ReadWriteCool",     m_readWriteCool);
-  declareProperty("TwoStepWriteReg",   m_twoStepWriteReg);
-  declareProperty("ManualIOV",         m_manualiov);
-  declareProperty("RegTime",           m_regTime);  // Register time in sec
-  declareProperty("VersionN",          m_version);
   declareProperty("Nnoisychip",        m_nhits_noisychip);
   declareProperty("Nnoisywafer",       m_nhits_noisywafer);
   declareProperty("Nnoisycmodule",     m_nhits_noisymodule);
-  declareProperty("BeginRun",          m_beginRun);
-  declareProperty("EndRun",            m_endRun);
-  declareProperty("StreamName",        m_streamName);
-  declareProperty("TagID4List",        m_tagID4List);
-  declareProperty("TagID4Eff",         m_tagID4Eff);
-  declareProperty("TagID4NO",          m_tagID4NO);
-  declareProperty("EventInfoKey",      m_evtKey=std::string("ByteStreamEventInfo"));
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////
 
 SCT_MonitorConditionsSvc::~SCT_MonitorConditionsSvc()
-{ }
+{}
 
 ///////////////////////////////////////////////////////////////////////////////////////////
 
-StatusCode SCT_MonitorConditionsSvc::initialize(){
-  if (m_detStore->retrieve(m_pHelper,"SCT_ID").isFailure()) {
-    msg(MSG:: ERROR) << "SCT helper failed to retrieve" << endmsg;
+StatusCode
+SCT_MonitorConditionsSvc::initialize() {
+  if(m_detStore->retrieve(m_pHelper,"SCT_ID").isFailure()) {
+    ATH_MSG_ERROR("SCT helper failed to retrieve");
     return StatusCode::FAILURE;
   }
 
-  // Retrieve IOVDb service
-  if (m_IOVDbSvc.retrieve().isFailure())
-    return msg(MSG:: ERROR)<< "Failed to retrieve IOVDbSvc " << endmsg, StatusCode::FAILURE;
-
-  // ------------------------------------------------------------
-  // The following is requried for writing out something to COOL
-
-  // CondAttrListCollection to store table temporarily
-  m_attrListColl = new CondAttrListCollection(true);
-  m_attrListColl_eff = new CondAttrListCollection(true);
-  m_attrListColl_no = new CondAttrListCollection(true);
-
-  // Get Output Stream tool for writing
-  if (m_writeCondObjs) {
-    IToolSvc* toolSvc = 0;// Pointer to Tool Service
-    StatusCode sc = service("ToolSvc", toolSvc);
-    if (sc.isFailure()) return msg(MSG:: ERROR)<< " Tool Service not found "<< endmsg, StatusCode::FAILURE;
-    //different versions have different names for the tool?
-    const std::string outputToolName=(m_version==0)?("AthenaOutputStreamTool"):("AthenaPoolOutputStreamTool");
-    sc = toolSvc->retrieveTool(outputToolName,m_streamName, m_streamer);
-    if (sc.isFailure()) return msg(MSG:: ERROR)<< "Unable to find "<<outputToolName << endmsg, StatusCode::FAILURE;
-  }
-    
-  // Get the IOVRegistrationSvc when needed
-  if (m_regIOV) {
-    StatusCode sc = service("IOVRegistrationSvc", m_regSvc);
-    if (sc.isFailure()){
-       msg(MSG:: ERROR)<< "Unable to find IOVRegistrationSvc "<< endmsg;
-       return StatusCode::FAILURE;
-    }  
-  }
-  
-  if (m_detStore->regFcn(&SCT_MonitorConditionsSvc::getAttrListCollection, this, m_DefectData, s_defectFolderName).isFailure())
-    return msg(MSG:: ERROR)<< "Failed to register callback" << endmsg, StatusCode::FAILURE;
-  // This should not be here and causes a SG WARNING (CBG)
-  //  m_IOVDbSvc->dropObject(s_defectFolderName,false);
+  // Read Cond Handle Key
+  ATH_CHECK(m_condKey.initialize());
   
-  // Read Handle Key
-  ATH_CHECK(m_evtKey.initialize());
-
   return StatusCode::SUCCESS;
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////
-StatusCode SCT_MonitorConditionsSvc::finalize(){
-  if (!m_defectRecorded) delete m_attrListColl;
-  if (!m_effRecorded) delete m_attrListColl_eff;
-  if (!m_noRecorded) delete m_attrListColl_no;
+
+StatusCode
+SCT_MonitorConditionsSvc::finalize() {
   return StatusCode::SUCCESS;
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-StatusCode SCT_MonitorConditionsSvc::queryInterface(const InterfaceID& riid, void** ppvInterface){
-  if ( ISCT_MonitorConditionsSvc::interfaceID().versionMatch(riid) ) {
+StatusCode
+SCT_MonitorConditionsSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
+  if(ISCT_MonitorConditionsSvc::interfaceID().versionMatch(riid)) {
     *ppvInterface = this;
-  } else if (ISCT_ConditionsSvc::interfaceID().versionMatch(riid)) {
+  } else if(ISCT_ConditionsSvc::interfaceID().versionMatch(riid)) {
     *ppvInterface = dynamic_cast<ISCT_ConditionsSvc*>(this);
   } else {
     // Interface is not directly available : try out a base class
@@ -197,28 +95,24 @@ StatusCode SCT_MonitorConditionsSvc::queryInterface(const InterfaceID& riid, voi
   return StatusCode::SUCCESS;
 }
 
+///////////////////////////////////////////////////////////////////////////////////
+
 bool 
 SCT_MonitorConditionsSvc::canReportAbout(InDetConditions::Hierarchy h) {
-  //  return h?(h==InDetConditions::SCT_SIDE):true; 
-  return ( (h==InDetConditions::SCT_MODULE) || (h==InDetConditions::SCT_SIDE)|| (h==InDetConditions::SCT_CHIP) || (h==InDetConditions::SCT_STRIP) );
+  return ((h==InDetConditions::SCT_MODULE) or (h==InDetConditions::SCT_SIDE) or
+	  (h==InDetConditions::SCT_CHIP) or (h==InDetConditions::SCT_STRIP));
 }
 
-unsigned int
-SCT_MonitorConditionsSvc::computeIstrip4moncond(const Identifier& elementId) const {
-  const unsigned int stripsPerSide(768);
-  unsigned int iiside = m_pHelper->side(elementId);
-  unsigned int iistrip = m_pHelper->strip(elementId);
-  return stripsPerSide*iiside + iistrip;
-}
+///////////////////////////////////////////////////////////////////////////////////
 
 bool
 SCT_MonitorConditionsSvc::isGood(const Identifier& elementId, InDetConditions::Hierarchy h) {
-  Identifier waferid = m_pHelper->wafer_id(elementId);
-  Identifier iimodule = m_pHelper->module_id(waferid);
+  Identifier waferid{m_pHelper->wafer_id(elementId)};
+  Identifier iimodule{m_pHelper->module_id(waferid)};
   // defectlist is based on each module
-  std::string defectlist = getList(iimodule);
+  std::string defectlist{getList(iimodule)};
 
-  if (!defectlist.empty()) { 
+  if(not defectlist.empty()) {
     switch (h) {
     case InDetConditions::SCT_MODULE:
       return (!moduleIsNoisy(defectlist));
@@ -231,25 +125,29 @@ SCT_MonitorConditionsSvc::isGood(const Identifier& elementId, InDetConditions::H
     default:
       return true;
     }//end of switch statement
-  } else 
-    return true;
+  }
+
+  return true;
 }
 
+///////////////////////////////////////////////////////////////////////////////////
 
 bool 
 SCT_MonitorConditionsSvc::isGood(const IdentifierHash& hashId) {
   //bool result(true);
-  Identifier elementId=m_pHelper->wafer_id(hashId);
+  Identifier elementId{m_pHelper->wafer_id(hashId)};
   return isGood(elementId);
 }
 
+///////////////////////////////////////////////////////////////////////////////////
 
 StatusCode 
-SCT_MonitorConditionsSvc::fillData(){
+SCT_MonitorConditionsSvc::fillData() {
   // this is a dummy function
   return StatusCode::SUCCESS;
 }
 
+//////////////////////////////////////////////////////////////////////////////////////////
 
 bool
 SCT_MonitorConditionsSvc::filled() const {
@@ -259,394 +157,178 @@ SCT_MonitorConditionsSvc::filled() const {
 
 //////////////////////////////////////////////////////////////////////////////////////////
 
-///////////////////////////////////////////////////////////////////////////////////////////
-// Local stuff
-//////////////////////////////////////////////////////////////////////////////////////////
-string
-SCT_MonitorConditionsSvc::addDefect(const string& defectlist,const int defectBeginChannel,const int defectEndChannel) const{
-  // check size of defect list,
-  // if it is empty then use createDefectString to make first entry. 
-  if (defectlist.empty()){
-    return createDefectString(defectBeginChannel,defectEndChannel);
-  }
-  // adding another Defect in DefectList
-  std::string defect= defectlist + " " +std::to_string( defectBeginChannel);
-  if (defectBeginChannel==defectEndChannel){
-     defect+= " ";
-  } else {
-    defect+= "-" +std::to_string( defectEndChannel) + " ";
-  }
-  return defect;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-std::string
-SCT_MonitorConditionsSvc::createDefectString(const int defectBeginChannel,const int defectEndChannel) const{
-  std::string defect(" ");
-  defect += std::to_string(defectBeginChannel);
-  if (defectBeginChannel!=defectEndChannel) {
-    defect += "-" + std::to_string(defectEndChannel);
+void 
+SCT_MonitorConditionsSvc::badStrips(std::set<Identifier>& strips) {
+  // Set of bad strip Identifers for all modules
+  SCT_ID::const_id_iterator waferItr{m_pHelper->wafer_begin()}, waferEnd{m_pHelper->wafer_end()};
+  // Loop over modules (side-0 of wafers)
+  for(; waferItr != waferEnd; ++waferItr) {
+    if(m_pHelper->side(*waferItr) != 0) continue;
+    Identifier moduleId{m_pHelper->module_id(*waferItr)};
+    badStrips(moduleId, strips);
   }
-  defect += " ";
-  return defect;
-}
-StatusCode 
-SCT_MonitorConditionsSvc::setBasicListValues(coral::AttributeList & attrList0,
-    const Identifier & module_id,
-    const SCT_ID* sctId,
-    const int samplesize,
-    const bool camelCasedBec) const{
-  const int eta = sctId->eta_module(module_id);
-  const int phi = sctId->phi_module(module_id);
-  const int barrel_ec = sctId->barrel_ec(module_id);
-  const int layer = sctId->layer_disk(module_id);
-  const std::string becString=(camelCasedBec)?("BarrelEndcap"):("barrel_endcap");
-  //coral::AttributeList & attrList0(*pattrList);
-  attrList0["SampleSize"].setValue(static_cast<int>(samplesize));
-  attrList0[becString].setValue(static_cast<int>(barrel_ec));
-  attrList0["Layer"].setValue(static_cast<int>(layer));
-  attrList0["Phi"].setValue(static_cast<int>(phi));
-  attrList0["Eta"].setValue(static_cast<int>(eta));
-  //not allow any failure at this stage?
-  return StatusCode::SUCCESS;
 }
 
+//////////////////////////////////////////////////////////////////////////////////////////
 
-/////////////////////////////////////////////////////////////////////////////////////////////
-StatusCode SCT_MonitorConditionsSvc::createCondObjects(const Identifier& module_id,
-                   const SCT_ID* sctId,
-                   const int samplesize,
-                   const std::string & defectType,
-                   const float threshold,
-                   const std::string & defectList) const{
-  if (!m_writeCondObjs) {return StatusCode::SUCCESS;}
-
-  const bool camelCasedBec=true;
-  coral::AttributeListSpecification* attrSpec =basicAttrList(camelCasedBec);
-  attrSpec->extend("DefectType","string");
-  attrSpec->extend("Threshold","float");
-  attrSpec->extend("DefectList","string");
- 
-  if (!attrSpec->size()) return msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg, StatusCode::FAILURE;
-
-  // Add attr list values
-  coral::AttributeList  attrList0(*attrSpec);
-  if (setBasicListValues(attrList0,module_id,sctId,samplesize,camelCasedBec).isFailure()) return StatusCode::FAILURE;
-  attrList0["DefectType"].setValue(static_cast<std::string>(defectType));
-  attrList0["Threshold"].setValue(static_cast<float>(threshold));
-  attrList0["DefectList"].setValue(static_cast<std::string>(defectList));
-
-  std::ostringstream attrStr2;
-  attrList0.toOutputStream( attrStr2 );
-  m_attrListColl->add(castId(module_id), attrList0);
-
-  return StatusCode::SUCCESS;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-StatusCode SCT_MonitorConditionsSvc::createListEff(const Identifier& module_id,const SCT_ID* sctId,const int samplesize, const float eff) const {
-  if(!m_writeCondObjs) {return StatusCode::SUCCESS;}
-
-  const bool camelCasedBec=false;
-  coral::AttributeListSpecification* attrSpec =basicAttrList(camelCasedBec);
-  attrSpec->extend("Efficiency", "float");
- 
-  if (!attrSpec->size()) return msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg,StatusCode::FAILURE;
-
-  // Add three attr lists
-  coral::AttributeList attrList0(*attrSpec);
-  if (setBasicListValues(attrList0,module_id,sctId,samplesize,camelCasedBec).isFailure()) return StatusCode::FAILURE;
-  attrList0["Efficiency"].setValue(static_cast<float>(eff));
-  
-  std::ostringstream attrStr2;
-  attrList0.toOutputStream(attrStr2);
-  m_attrListColl_eff->add(castId(module_id), attrList0);
-
-  return StatusCode::SUCCESS;
-}
+void 
+SCT_MonitorConditionsSvc::badStrips(const Identifier & moduleId, std::set<Identifier>& strips) {
+  // Set of bad strip Identifers for a given module
+  // Get defect string and check it is sensible, i.e. non-empty and contains numbers
+  std::string defectStr{getList(moduleId)};
+  if(doesNotHaveNumbers(defectStr)) return;
 
-///////////////////////////////////////////////////////////////////////////////////
+  // Expand the string
+  std::set<int> defectList;
+  expandList(defectStr, defectList);
 
-StatusCode SCT_MonitorConditionsSvc::createListNO(const Identifier& module_id,const SCT_ID* sctId,const int samplesize,const float noise_occ) const {
-  if (!m_writeCondObjs) {return StatusCode::SUCCESS;}
-  const bool camelCasedBec=false;
-  coral::AttributeListSpecification* attrSpec =basicAttrList(camelCasedBec);
-  attrSpec->extend("NoiseOccupancy", "float");
- 
-  if (!attrSpec->size()) return msg(MSG:: ERROR) << " Attribute list specification is empty" <<endmsg,StatusCode::FAILURE;
-
-  // Add three attr lists
-  coral::AttributeList attrList0(*attrSpec);
-  if (setBasicListValues(attrList0,module_id,sctId,samplesize,camelCasedBec).isFailure()) return StatusCode::FAILURE;
-  attrList0["NoiseOccupancy"].setValue(static_cast<float>(noise_occ));
-  
-  std::ostringstream attrStr2;
-  attrList0.toOutputStream(attrStr2);
-  m_attrListColl_no->add(castId(module_id), attrList0);
-  return StatusCode::SUCCESS;
-}
+  // Convert strip number to Identifier and add to list
+  std::set<int>::const_iterator defectItr{defectList.begin()}, defectEnd{defectList.end()};
+  for(; defectItr!=defectEnd; ++defectItr) {
+    // Strips in the DB are numbered 0-767 (side 0) and 768-1536 (side 1).  
+    // This is different from the usual online/offline numbering schemes
+    int side{(*defectItr) > 767 ? 1 : 0};
+    int stripNum{side==1 ? (*defectItr) - 768 : (*defectItr)};
+   
+    Identifier stripId{m_pHelper->strip_id(m_pHelper->barrel_ec(moduleId),  m_pHelper->layer_disk(moduleId),
+					   m_pHelper->phi_module(moduleId), m_pHelper->eta_module(moduleId),
+					   side, stripNum)};
 
-///////////////////////////////////////////////////////////////////////////////////
+    ATH_MSG_DEBUG("Bad Strip: Strip number in DB = " << *defectItr<< ", side/offline strip number = " << side << "/" << stripNum<< ", Identifier = " << stripId);
 
-std::string
-SCT_MonitorConditionsSvc::getList(const Identifier& imodule) const{
-  static const string errorstring("");
-  //static const string defectlistString("DefectList"); <- this should correspond to index 7 in the payload
-  //static const unsigned int defectlistIndex(7); //slightly faster, but less transparent than using the string name
-  //to be completely robust, could use iter->index("DefectList") below (before the loop)
-  if (not m_attrListCollection) {
-    msg(MSG::ERROR) << "In getList - no attrListCollection" << endmsg;
-    return errorstring;
-  }
-  m_currentDefectList = "";
-  int channelNumber(imodule.get_identifier32().get_compact());
-  std::map<const int, const std::string>::iterator it(m_defectListMap.find(channelNumber));
-  if (it !=  m_defectListMap.end()) {
-    m_currentDefectList = it->second;
+    strips.insert(stripId);
   }
-  return m_currentDefectList;
-
 }
 
-// =============================================================================
-const CondAttrListCollection*
-SCT_MonitorConditionsSvc::getAttrListCollectionByFolder(const string& foldername) const {
-    // trying to find the pointer in the hashmap
-    // if it exists, return it, otherwise put it in.
-    const CondAttrListCollection* attrListCollection = 0;
-    if (m_attrListCollectionMap.count(foldername) == 0) {
-        StatusCode sc = m_detStore->retrieve(attrListCollection, foldername);
-        if (sc.isFailure()) {
-            msg(MSG:: ERROR)<< "Could not retrieve " << foldername << endmsg;
-            return 0;
-        }
-        m_attrListCollectionMap.insert(make_pair(foldername, attrListCollection));
-    } else {
-        attrListCollection = m_attrListCollectionMap[foldername];
-    }
-    return attrListCollection;
-}
-
-// =============================================================================
-StatusCode 
-SCT_MonitorConditionsSvc::getAttrListCollection(int& /*i*/ , std::list<std::string>& /*l*/) {
-    // trying to find the pointer in the hashmap
-    // if it exists, return it, otherwise put it in.
-
-  m_attrListCollectionMap.erase(s_defectFolderName);
-  m_defectListMap.clear();
-
-  StatusCode sc = m_detStore->retrieve(m_attrListCollection, s_defectFolderName);
-  if (sc.isFailure()) {
-    msg(MSG:: ERROR)<< "Could not retrieve " << s_defectFolderName << endmsg;
-    // Using COOL, is failure
-    return StatusCode::FAILURE;
-  }
-  m_attrListCollectionMap.insert(make_pair(s_defectFolderName, m_attrListCollection));
-  static const unsigned int defectListIndex(7);
-  CondAttrListCollection::const_iterator iter = m_attrListCollection->begin();
-  CondAttrListCollection::const_iterator last = m_attrListCollection->end();
-  for (; iter != last; ++iter) {
-      const AthenaAttributeList& list(iter->second);
-      if (list.size()) {
-        m_defectListMap.insert(make_pair(iter->first,list[defectListIndex].data<std::string>()));
-      }
-  }
-  return StatusCode::SUCCESS;
-}
+//////////////////////////////////////////////////////////////////////////////////////////
 
-//
 std::string 
-SCT_MonitorConditionsSvc::getDeadThingList(const Identifier & imodule, const bool thingIsStrip) const{
-  static const string deadstring("");
-  static const string defectlistString("DefectList");
-  const string folderName=(thingIsStrip)?(s_deadStripFolderName):(s_deadChipFolderName);
-  const CondAttrListCollection* attrListColl_local = getAttrListCollectionByFolder(folderName);
-  if (not attrListColl_local) {
-    return deadstring;
-  }
-
-    // Loop over collection
-  CondAttrListCollection::const_iterator iter = attrListColl_local->begin();
-  CondAttrListCollection::const_iterator last = attrListColl_local->end();
-  for (; iter != last; ++iter) {
-    Identifier offlineID((*iter).first);
-    m_currentDefectList = "";
-    if (offlineID==imodule) {
-      const AthenaAttributeList& list(iter->second);
-      if (list.size()) {
-        try {m_currentDefectList = (*iter).second[defectlistString].data<std::string>();}
-        catch (const std::exception& e) {
-          // Do Nothing
-        // if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "getDeadStripList catch : " << e.what()<< endmsg;
-        }
-      }
-      return m_currentDefectList;
-    }
-  }
-  return deadstring;
+SCT_MonitorConditionsSvc::badStripsAsString(const Identifier & moduleId) {
+   return getList(moduleId);
 }
-  
-
 
+///////////////////////////////////////////////////////////////////////////////////////////
+// Local stuff
+//////////////////////////////////////////////////////////////////////////////////////////
 
-// ===============================================================================
-std::string
-SCT_MonitorConditionsSvc::getDeadStripList(const Identifier& imodule) const{
-  const bool thingIsStrip(true);
-  return getDeadThingList(imodule, thingIsStrip);
-}
-
-// ===============================================================================
 std::string
-SCT_MonitorConditionsSvc::getDeadChipList(const Identifier& imodule) const{
-  const bool thingIsStrip(false);
-  return getDeadThingList(imodule,thingIsStrip);
-}
-
-// ===============================================================================
-float
-SCT_MonitorConditionsSvc::getEff(const Identifier& imodule,const std::string& foldername) const{
-  static const string efficiencyString("Efficiency");
-  const CondAttrListCollection* attrListColl_local = getAttrListCollectionByFolder(foldername);
-  if (not attrListColl_local) {
-    return -1.;
-  }
-
-  // Loop over collection
-  CondAttrListCollection::const_iterator iter = attrListColl_local->begin();
-  CondAttrListCollection::const_iterator last = attrListColl_local->end();
-  for (; iter != last; ++iter) {
-    Identifier offlineID(iter->first);
-    if (offlineID==imodule){
-      return (iter->second)[efficiencyString].data<float>();
-    }
+SCT_MonitorConditionsSvc::getList(const Identifier& imodule) const {
+  m_currentDefectList = "";
+  int channelNumber{static_cast<int>(imodule.get_identifier32().get_compact())};
+  if(getCondData()) {
+    m_condData->find(channelNumber, m_currentDefectList);
+  } else {
+    ATH_MSG_ERROR("In getList - no data");
   }
-  return -1.;
-}
+  return m_currentDefectList;
 
-// =============================================================================
-float 
-SCT_MonitorConditionsSvc::getNO(const Identifier& imodule, const std::string & foldername) const {
-  static const string noiseOccupancyString("NoiseOccupancy");
-  const CondAttrListCollection* attrListColl_local = getAttrListCollectionByFolder(foldername);
-  if (not attrListColl_local) {
-    return -1.;
-  }
-  
-  // Loop over collection
-  CondAttrListCollection::const_iterator iter = attrListColl_local->begin();
-  CondAttrListCollection::const_iterator last = attrListColl_local->end();
-  for (; iter != last; ++iter) {
-    Identifier offlineID(iter->first);
-    if (offlineID==imodule){
-      return (iter->second)[noiseOccupancyString].data<float>();
-    }
-  }
-  return -1;
 }
 
+///////////////////////////////////////////////////////////////////////////////////
 
-// =============================================================================
-
-bool SCT_MonitorConditionsSvc::stripIsNoisy(const int strip, const std::string & defectList) const {
+bool
+SCT_MonitorConditionsSvc::stripIsNoisy(const int strip, const std::string & defectList) const {
   return inList(strip, defectList);
 }
 
-// =============================================================================
-bool SCT_MonitorConditionsSvc::chipIsNoisy(int strip, const std::string & defectList) const {
+///////////////////////////////////////////////////////////////////////////////////
+
+bool
+SCT_MonitorConditionsSvc::chipIsNoisy(int strip, const std::string & defectList) const {
   return nDefect(strip,defectList)>=m_nhits_noisychip;
 }
 
-// =============================================================================
-bool SCT_MonitorConditionsSvc::waferIsNoisy(const int strip, const std::string & defectList) const {
+///////////////////////////////////////////////////////////////////////////////////
+
+bool
+SCT_MonitorConditionsSvc::waferIsNoisy(const int strip, const std::string & defectList) const {
   return nDefect(strip,defectList)>=m_nhits_noisywafer;
 }
 
-// =============================================================================
+///////////////////////////////////////////////////////////////////////////////////
+
 bool SCT_MonitorConditionsSvc::moduleIsNoisy(const std::string & defectList) const {
   return nDefect(defectList)>=m_nhits_noisymodule;
 }
 
-// ===========================================================================
+///////////////////////////////////////////////////////////////////////////////////
 
-bool SCT_MonitorConditionsSvc::inRange(const int theNumber, const std::string & stringRange) const{
-  std::string::size_type p = stringRange.find(s_separator);
-  if (p != std::string::npos) { //its a range
-    std::string::size_type len1(p++), len2(stringRange.size()-p);
-    int min = std::stoi(stringRange.substr(0,len1));
-    int max = std::stoi(stringRange.substr(p,len2));
+bool
+SCT_MonitorConditionsSvc::inRange(const int theNumber, const std::string & stringRange) const {
+  std::string::size_type p{stringRange.find(s_separator)};
+  if(p != std::string::npos) { //its a range
+    std::string::size_type len1{p++}, len2{stringRange.size()-p};
+    int min{std::stoi(stringRange.substr(0,len1))};
+    int max{std::stoi(stringRange.substr(p,len2))};
     return inRange(theNumber, min, max);
   } else { //assume its a single number
     return std::stoi(stringRange) == theNumber;
   }
 }
 
-// ===========================================================================
+///////////////////////////////////////////////////////////////////////////////////
   
 bool 
-SCT_MonitorConditionsSvc::inList(const int theNumber, const std::string& theList) const{
-  if (doesNotHaveNumbers(theList)) return false;
+SCT_MonitorConditionsSvc::inList(const int theNumber, const std::string& theList) const {
+  if(doesNotHaveNumbers(theList)) return false;
   
-  std::istringstream is(theList);
-  std::istream_iterator<std::string> readString(is);
+  std::istringstream is{theList};
+  std::istream_iterator<std::string> readString{is};
   std::istream_iterator<std::string> endOfString; //relies on default constructor to produce eof
-  bool answer(false);
-  for (;readString != endOfString; ++readString) {
+  bool answer{false};
+  for(;readString != endOfString; ++readString) {
     answer = inRange(theNumber, *readString);
-    if ( answer ) break;
+    if(answer) break;
   }
 
   return answer;
 }
 
-// ===========================================================================
+///////////////////////////////////////////////////////////////////////////////////
 
 int 
-SCT_MonitorConditionsSvc::nBlock(const int theNumber, const std::string& stringRange) const{
-  const int one(1);
-  int ndefect=0;
-  std::string::size_type p=stringRange.find(s_separator);
-  if (p!=std::string::npos){ //its a range
-    std::string::size_type len1(p++), len2(stringRange.size()-p);
-    int min=std::stoi(stringRange.substr(0,len1));
-    int max=std::stoi(stringRange.substr(p,len2));
-    if ( inRange(theNumber, min, max) )
+SCT_MonitorConditionsSvc::nBlock(const int theNumber, const std::string& stringRange) const {
+  const int one{1};
+  int ndefect{0};
+  std::string::size_type p{stringRange.find(s_separator)};
+  if(p!=std::string::npos) { //its a range
+    std::string::size_type len1{p++}, len2{stringRange.size()-p};
+    int min{std::stoi(stringRange.substr(0,len1))};
+    int max{std::stoi(stringRange.substr(p,len2))};
+    if(inRange(theNumber, min, max))
       ndefect = max-min+one;
   } else { //assume its a single number
-    if ( std::stoi(stringRange) == theNumber )
-      ndefect = 0;
+    if(std::stoi(stringRange) == theNumber) ndefect = 0;
   }
   return ndefect;
 }
 
-// ===========================================================================
+///////////////////////////////////////////////////////////////////////////////////
 
 int 
-SCT_MonitorConditionsSvc::nDefect(const int theNumber, const std::string& theList) const{
-  int sum = 0;
-  if (doesNotHaveNumbers(theList)) return 0;
-  std::istringstream is(theList);
-  std::istream_iterator<std::string> readString(is);
+SCT_MonitorConditionsSvc::nDefect(const int theNumber, const std::string& theList) const {
+  int sum{0};
+  if(doesNotHaveNumbers(theList)) return 0;
+  std::istringstream is{theList};
+  std::istream_iterator<std::string> readString{is};
   std::istream_iterator<std::string> endOfString; //relies on default constructor to produce eof
-  for (;readString != endOfString; ++readString){
+  for(;readString != endOfString; ++readString) {
     sum += nBlock(theNumber, *readString);
   }
   return sum;
 }
 
-// ===========================================================================
+///////////////////////////////////////////////////////////////////////////////////
 
 int 
-SCT_MonitorConditionsSvc::nBlock(const std::string& stringRange) const{
-  const int one(1);
-  int ndefect=0;
-  std::string::size_type p = stringRange.find(s_separator);
-  if (p != std::string::npos){ //its a range
-    std::string::size_type len1(p++), len2(stringRange.size()-p);
-    int min=std::stoi(stringRange.substr(0,len1));
-    int max=std::stoi(stringRange.substr(p,len2));
+SCT_MonitorConditionsSvc::nBlock(const std::string& stringRange) const {
+  const int one{1};
+  int ndefect{0};
+  std::string::size_type p{stringRange.find(s_separator)};
+  if(p!=std::string::npos) { //its a range
+    std::string::size_type len1{p++}, len2{stringRange.size()-p};
+    int min{std::stoi(stringRange.substr(0,len1))};
+    int max{std::stoi(stringRange.substr(p,len2))};
     ndefect = max-min+one;
   } else { //assume its a single number
     ndefect = one;
@@ -654,287 +336,87 @@ SCT_MonitorConditionsSvc::nBlock(const std::string& stringRange) const{
   return ndefect;
 }
 
-// ===========================================================================
+///////////////////////////////////////////////////////////////////////////////////
 
 int 
-SCT_MonitorConditionsSvc::nDefect(const std::string& theList) const{
-  int sum=0;
-  if (doesNotHaveNumbers(theList)) return 0;
-  std::istringstream is(theList);
-  std::istream_iterator<std::string> readString(is);
+SCT_MonitorConditionsSvc::nDefect(const std::string& theList) const {
+  int sum{0};
+  if(doesNotHaveNumbers(theList)) return 0;
+  std::istringstream is{theList};
+  std::istream_iterator<std::string> readString{is};
   std::istream_iterator<std::string> endOfString; //relies on default constructor to produce eof
-  for (;readString != endOfString; ++readString){
+  for(;readString != endOfString; ++readString) {
     sum += nBlock(*readString);
   }
   return sum;
 }
 
-// ===========================================================================
+///////////////////////////////////////////////////////////////////////////////////
 
 bool 
-SCT_MonitorConditionsSvc::inRange(const int x, const int min, const int max) const{
+SCT_MonitorConditionsSvc::inRange(const int x, const int min, const int max) const {
   return ((x >= min) and (x <= max));
 }
-// ===========================================================================
-
-
-
-
-
-StatusCode SCT_MonitorConditionsSvc::genericWrapUp(const CondAttrListCollection* theCollection, const std::string & theFolderName, const std::string & theTag){
-  StatusCode sc;  
-  // This need to be on finalize?  yes.
-  if (m_writeCondObjs) {
-    sc = m_detStore->record(theCollection,theFolderName);
-    m_defectRecorded = true;
-    if (sc.isFailure()) return msg(MSG:: ERROR) << "Could not record "<<theFolderName << endmsg, StatusCode::FAILURE;
- 
-    // Stream out and register objects here
-    sc = streamOutCondObjects(theFolderName);
-    if (sc.isFailure()) return msg(MSG:: ERROR) <<"Could not stream out "<<theFolderName <<endmsg, StatusCode::FAILURE;
-  }
-
-  if (m_regIOV) {
-    sc = registerCondObjects(theFolderName, theTag);
-    if (sc.isFailure()) return msg(MSG:: ERROR) <<"Could not register "<<theFolderName <<endmsg, StatusCode::FAILURE;
-  }
-  return StatusCode::SUCCESS;
-  
-}
-
-// ======================================================================
-StatusCode 
-SCT_MonitorConditionsSvc::wrapUpNoisyChannel(){
-  return genericWrapUp(m_attrListColl,s_defectFolderName, m_tagID4List);
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-StatusCode 
-SCT_MonitorConditionsSvc::wrapUpEfficiency(){
-  return genericWrapUp(m_attrListColl_eff,s_effFolderName, m_tagID4Eff);
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-StatusCode 
-SCT_MonitorConditionsSvc::wrapUpNoiseOccupancy(){
-  return genericWrapUp(m_attrListColl_no,s_noFolderName, m_tagID4NO);
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-
-StatusCode 
-SCT_MonitorConditionsSvc::printCondObjects(const std::string& foldername) const{
-  // This function seems to be reserved for possible debugging.
-  // Currently nobody calls this function.
-  const CondAttrListCollection* attrListColl_local = getAttrListCollectionByFolder(foldername);
-  if (!m_twoStepWriteReg && m_readWriteCool) {
-    if (not attrListColl_local) return StatusCode::FAILURE;
-    // Loop over collection
-    CondAttrListCollection::const_iterator iter = attrListColl_local->begin();
-    CondAttrListCollection::const_iterator last  = attrListColl_local->end();
-    for (; iter != last; ++iter) {
-      std::ostringstream attrStr1;
-      (*iter).second.toOutputStream(attrStr1);
-    } // end of loop over collections
-  }    
-  return StatusCode::SUCCESS;
-}
-
-// =====================================================================
-StatusCode 
-SCT_MonitorConditionsSvc::streamOutCondObjects(const std::string& foldername) const{
-  StatusCode sc = m_streamer->connectOutput();
-  if (sc.isFailure()) {
-    msg(MSG:: ERROR) <<"Could not connect stream to output" <<endmsg;
-    return( StatusCode::FAILURE);
-  }
-    
-  IAthenaOutputStreamTool::TypeKeyPairs typeKeys(1);
-  if (m_readWriteCool) {
-    IAthenaOutputStreamTool::TypeKeyPair attrCollPair("CondAttrListCollection",foldername);
-    typeKeys[0] = attrCollPair;
-  }
-    
-  sc = m_streamer->streamObjects(typeKeys);
-  if (sc.isFailure()) {
-    msg(MSG:: ERROR) << "Could not stream out AttributeLists" << endmsg;
-    return StatusCode::FAILURE;
-  }
-  sc = m_streamer->commitOutput();
-  if (sc.isFailure()) {
-    msg(MSG:: ERROR) << "Could not commit output stream" << endmsg;
-    return StatusCode::FAILURE;
-  }
-  return StatusCode::SUCCESS;
-}
-
-
-// ======================================================================
-StatusCode 
-SCT_MonitorConditionsSvc::registerCondObjects(const std::string& foldername,const std::string& tagname) {
-  // Register the IOV DB with the conditions data written out
-  if (m_readWriteCool) {
-    // Can only write out AttrList's if this is NOT write and reg in two steps
-    if (!m_twoStepWriteReg) { 
-      // Using COOL, write out attrlist and collection of attrlists
-      // attrlist collection 
-      StatusCode sc;
-      unsigned int beginRun;
-      unsigned int endRun;
-      if ( !m_manualiov ) {
-	SG::ReadHandle<EventInfo> evt(m_evtKey);
-        if (not evt.isValid()) {
-          msg(MSG:: ERROR) << "Unable to get the EventInfo" << endmsg;
-          return StatusCode::FAILURE;
-        }
-        beginRun = evt->event_ID()->run_number();
-        endRun = beginRun;
-      } else {
-        beginRun = m_beginRun;
-        endRun = m_endRun;
-      }
-      unsigned int beginLB = IOVTime::MINEVENT;
-      unsigned int endLB = IOVTime::MAXEVENT;
-      if (not tagname.empty()) {
-        sc = m_regSvc->registerIOV("CondAttrListCollection",foldername,tagname,beginRun, endRun,beginLB, endLB);
-      } else {
-        sc = m_regSvc->registerIOV("CondAttrListCollection",foldername,"",beginRun, endRun,beginLB, endLB);
-      }
-      if (sc.isFailure()) {
-        msg(MSG:: ERROR) <<"Could not register in IOV DB for CondAttrListCollection" << endmsg;
-        return StatusCode::FAILURE;
-      }
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////
-std::string 
-SCT_MonitorConditionsSvc::deadStrip_module(const Identifier& id) const {
-  Identifier waferid = m_pHelper->wafer_id(id);
-  Identifier imodule = m_pHelper->module_id(waferid);
-  std::string defectlist = getDeadStripList(imodule);
-  return defectlist;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-std::string 
-SCT_MonitorConditionsSvc::deadChip_module(const Identifier& id) const {
-  Identifier waferid = m_pHelper->wafer_id(id);
-  Identifier imodule = m_pHelper->module_id(waferid);
-  std::string defectlist = getDeadChipList(imodule);
-  return defectlist;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-float 
-SCT_MonitorConditionsSvc::eff_module(const Identifier& id) const {
-  Identifier waferid = m_pHelper->wafer_id(id);
-  Identifier imodule = m_pHelper->module_id(waferid);
-  float efficiency = getEff(imodule, s_effFolderName);
-  return efficiency;
-}
 
-//////////////////////////////////////////////////////////////////////////////
-
-float 
-SCT_MonitorConditionsSvc::no_module(const Identifier& id) const{
-  Identifier waferid = m_pHelper->wafer_id(id);
-  Identifier imodule = m_pHelper->module_id(waferid);
-  float noise_occ = getNO(imodule, s_noFolderName);
-  return noise_occ;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-std::string 
-SCT_MonitorConditionsSvc::badStripsAsString(const Identifier & moduleId) {
-   return getList(moduleId);
-}
+///////////////////////////////////////////////////////////////////////////////////
 
-void 
-SCT_MonitorConditionsSvc::badStrips(std::set<Identifier>& strips) {
-  // Set of bad strip Identifers for all modules
-  SCT_ID::const_id_iterator waferItr(m_pHelper->wafer_begin()), waferEnd(m_pHelper->wafer_end());
-  // Loop over modules (side-0 of wafers)
-  for(; waferItr != waferEnd; ++waferItr){
-    if (m_pHelper->side(*waferItr) != 0) continue;
-    Identifier moduleId = m_pHelper->module_id(*waferItr);
-    badStrips(moduleId, strips);
-  }
+void
+SCT_MonitorConditionsSvc::expandRange(const std::string& rangeStr, std::set<int>& rangeList) {
+  // Expand a given defect range
+  // Find separator
+  std::string::size_type sepPos{rangeStr.find(s_separator)};
+  // Check if it's a range
+  if(sepPos != std::string::npos) {
+    // Extract min and max
+    std::string::size_type len1{sepPos++}, len2{rangeStr.size()-sepPos};
+    int min{std::stoi(rangeStr.substr(0,len1))};
+    int max{std::stoi(rangeStr.substr(sepPos,len2))};
+    // Add all strips in range to list
+    while(min != (max+1)) rangeList.insert(min++);
+  } else { 
+    // Assume single number
+    rangeList.insert(std::stoi(rangeStr));
+  }  
 }
 
-void 
-SCT_MonitorConditionsSvc::badStrips(const Identifier & moduleId, std::set<Identifier>& strips) {
-  // Set of bad strip Identifers for a given module
-  // Get defect string and check it is sensible, i.e. non-empty and contains numbers
-  std::string defectStr = getList(moduleId);
-  if (doesNotHaveNumbers(defectStr)) return;
-
-  // Expand the string
-  std::set<int> defectList;
-  expandList(defectStr, defectList);
-
-  // Convert strip number to Identifier and add to list
-  std::set<int>::const_iterator defectItr(defectList.begin()), defectEnd(defectList.end());
-  for (; defectItr != defectEnd; ++defectItr) {
-    // Strips in the DB are numbered 0-767 (side 0) and 768-1536 (side 1).  
-    // This is different from the usual online/offline numbering schemes
-    int side     = ((*defectItr) > 767 ? 1 : 0); 
-    int stripNum = (side==1 ? (*defectItr) - 768 : (*defectItr));
-   
-    Identifier stripId = m_pHelper->strip_id(m_pHelper->barrel_ec(moduleId),  m_pHelper->layer_disk(moduleId),
-               m_pHelper->phi_module(moduleId), m_pHelper->eta_module(moduleId),
-               side, stripNum);
-
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Bad Strip: Strip number in DB = " << *defectItr<< ", side/offline strip number = " << side << "/" << stripNum<< ", Identifier = " << stripId << endmsg;
-
-    strips.insert(stripId);
-  }
-}
+///////////////////////////////////////////////////////////////////////////////////
 
-void SCT_MonitorConditionsSvc::expandList(const std::string& defectStr, std::set<int>& defectList) {
+void
+SCT_MonitorConditionsSvc::expandList(const std::string& defectStr, std::set<int>& defectList) {
   // Expand a given defect list
 
   // Empty list or one without numbers
-  if (doesNotHaveNumbers(defectStr)) return;
+  if(doesNotHaveNumbers(defectStr)) return;
 
-  std::istringstream is(defectStr);
-  std::istream_iterator<std::string> defectItr(is);
+  std::istringstream is{defectStr};
+  std::istream_iterator<std::string> defectItr{is};
   std::istream_iterator<std::string> defectEnd;     //relies on default constructor to produce eof
 
   // Loop over (space-seperated) defects and add to list
-  for (; defectItr != defectEnd; ++defectItr) expandRange(*defectItr, defectList);
+  for(; defectItr != defectEnd; ++defectItr) expandRange(*defectItr, defectList);
 }
 
-void SCT_MonitorConditionsSvc::expandRange(const std::string& rangeStr, std::set<int>& rangeList) {
-  // Expand a given defect range
-  // Find separator
-  std::string::size_type sepPos(rangeStr.find(s_separator));
-  // Check if it's a range
-  if (sepPos != std::string::npos) { 
-    // Extract min and max
-    std::string::size_type len1(sepPos++), len2(rangeStr.size()-sepPos);
-    int min = std::stoi(rangeStr.substr(0,len1));
-    int max = std::stoi(rangeStr.substr(sepPos,len2));
-    // Add all strips in range to list
-    while (min != (max+1)) rangeList.insert(min++);
-  } else { 
-    // Assume single number
-    rangeList.insert(std::stoi(rangeStr));
-  }  
-}
+///////////////////////////////////////////////////////////////////////////////////
 
-//////////////////////////////////////////////////////////////////////////////
-std::string SCT_MonitorConditionsSvc::deadStripsAsString(const Identifier & moduleId) {
-  return getDeadStripList(moduleId);
+unsigned int
+SCT_MonitorConditionsSvc::computeIstrip4moncond(const Identifier& elementId) const {
+  const unsigned int stripsPerSide{768};
+  unsigned int iiside{static_cast<unsigned int>(m_pHelper->side(elementId))};
+  unsigned int iistrip{static_cast<unsigned int>(m_pHelper->strip(elementId))};
+  return stripsPerSide*iiside + iistrip;
 }
 
-//////////////////////////////////////////////////////////////////////////////
-std::string SCT_MonitorConditionsSvc::deadChipsAsString(const Identifier & moduleId) {
-  return getDeadChipList(moduleId);
+///////////////////////////////////////////////////////////////////////////////////
+
+bool
+SCT_MonitorConditionsSvc::getCondData() const {
+  if(!m_condData) {
+    SG::ReadCondHandle<SCT_MonitorConditionsCondData> condData{m_condKey};
+    if((not condData.isValid()) or !(*condData)) {
+      ATH_MSG_ERROR("Failed to get " << m_condKey.key());
+      return false;
+    }
+    m_condData = *condData;
+  }
+  return true;
 }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsSvc.h
index c9c3ad3cb132c99992e389568072f55945e804dd..ca3f12e9fa67adaa78298deb05b4250a28dfe6f7 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_MonitorConditionsSvc.h
@@ -16,48 +16,35 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/StatusCode.h"
 
-//COOL includes
-
 // Athena includes
 #include "Identifier/Identifier.h"
 #include "StoreGate/StoreGateSvc.h"
-#include "AthenaKernel/IIOVDbSvc.h"
 
 // local includes
 #include "InDetConditionsSummaryService/InDetHierarchy.h"
 #include "SCT_ConditionsServices/ISCT_ConditionsSvc.h"
 #include "SCT_ConditionsServices/ISCT_MonitorConditionsSvc.h"
 
-// Read Handle
-#include "StoreGate/ReadHandleKey.h"
+#include "SCT_ConditionsData/SCT_MonitorConditionsCondData.h"
 
-// Event Info
-#include "EventInfo/EventInfo.h"
+// Read Handle Key
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/ReadCondHandleKey.h"
 
 //forward declarations
-template <class TYPE> class SvcFactory;
 class ISvcLocator;
 class IdentifierHash;
 class SCT_ID;
-class EventInfo;
-class IIOVRegistrationSvc;
-class IAthenaOutputStreamTool;
-class CondAttrListCollection;
-namespace coral{
-  class AttributeList;
-}
-//class IIOVDbSvc;
 
 /**
  ** Class for keeping track of errors caught by the monitoring
  **/
 
 class SCT_MonitorConditionsSvc: virtual public ISCT_MonitorConditionsSvc, virtual public AthService{
-  friend class SvcFactory<SCT_MonitorConditionsSvc>;
 
 public:
   // Constructor
-  SCT_MonitorConditionsSvc ( const std::string& name, ISvcLocator* svc );
+  SCT_MonitorConditionsSvc(const std::string& name, ISvcLocator* svc);
   // Destructor
   virtual ~SCT_MonitorConditionsSvc();
 
@@ -75,18 +62,17 @@ public:
   ///is it good?, using wafer hash
   virtual bool isGood(const IdentifierHash& hashId);
 
-
   ///Manually get the data in the structure before proceding
   virtual StatusCode fillData();
 
+  ///Are the data available?
+  virtual bool filled() const;
+
   //I'm going to fill this from job options, so the callback version of fillData is not needed.
   virtual StatusCode fillData(int& /*i */, std::list<std::string>& /*l*/) { //comment out unused parameters to prevent compiler warning
     return StatusCode::FAILURE;
   }
 
-  ///Are the data available?
-  virtual bool filled() const;
-
   ///Can the data be filled during the initialize phase?
   virtual bool canFillDuringInitialize() { return true; }
 
@@ -99,63 +85,11 @@ public:
   /// String of bad strip numbers for a given module
   virtual std::string badStripsAsString(const Identifier & moduleId);
 
-  /// String of dead strip/chip numbers for a given module
-  virtual std::string deadStripsAsString(const Identifier & moduleId);
-  virtual std::string deadChipsAsString(const Identifier & moduleId);
-
+private:
   // ------------------------------------------------------------------------------------
   // local stuff 
   // ------------------------------------------------------------------------------------
-
-private:
-  std::string deadStrip_module(const Identifier& id) const;
-  std::string deadChip_module(const Identifier& id) const;
-  float eff_module(const Identifier& id) const;
-  float no_module(const Identifier& id) const;
-
-  std::string addDefect(const std::string& defectlist,
-    const int defectBeginChannel,
-    const int defectEndChannel) const;
-
-  std::string createDefectString(const int defectBeginChannel,
-    const int defectEndChannel) const;
-
-  StatusCode createCondObjects( const Identifier& wafer_id,
-    const SCT_ID* sctId,
-    const int samplesize,
-    const std::string& defectType,
-    const float threshold,
-    const std::string& defectList ) const;
-    
-  StatusCode setBasicListValues(coral::AttributeList & attrList,
-    const Identifier & module_id,
-    const SCT_ID* sctId,
-    const int samplesize,
-    const bool camelCasedBec) const;
-
-  StatusCode createListEff( const Identifier& wafer_id,
-    const SCT_ID* sctId,
-    const int samplesize,
-    const float eff ) const;
-
-  StatusCode createListNO( const Identifier& wafer_id,
-    const SCT_ID* sctId,
-    const int samplesize,
-    const float noise_occ ) const;
-
-    //std::string getList(const unsigned int imodule,
-    //const std::string& foldername) const;
-    
   std::string getList(const Identifier & imodule) const;
-  std::string getDeadThingList(const Identifier & imodule, const bool thingIsStrip) const;
-  std::string getDeadStripList(const Identifier & imodule) const;
-  std::string getDeadChipList(const Identifier & imodule) const;
-
-  float getEff(const Identifier& imodule,
-    const std::string& foldername) const;
-
-  float getNO(const Identifier& imodule,
-    const std::string& foldername) const;
 
   bool stripIsNoisy(const int strip, const std::string& defectList) const;
 
@@ -183,80 +117,24 @@ private:
   
   void expandList(const std::string& defectStr, std::set<int>& defectList);
 
-  StatusCode printCondObjects(const std::string & foldername) const;
-
-  StatusCode streamOutCondObjects(const std::string & foldername) const;
-
-  StatusCode registerCondObjects(const std::string & foldername,const std::string & tagname);
-
-  StatusCode genericWrapUp(const CondAttrListCollection* theCollection, const std::string & theFolderName, const std::string & theTag);
-  
-  StatusCode wrapUpNoisyChannel();
-
-  StatusCode wrapUpEfficiency();
-
-  StatusCode wrapUpNoiseOccupancy();
-
-  StatusCode registerIOV(const CLID& clid);
-
   // small helper function
   unsigned int computeIstrip4moncond(const Identifier& elementId) const;
 
-  virtual StatusCode getAttrListCollection(int& i, std::list<std::string>& l);
-
-  const CondAttrListCollection* getAttrListCollectionByFolder(const std::string&) const;
-
-  // would it make sense to change the strings to properties?
-  // that would be a fairly simple fix
-  std::vector<std::string> m_keys;
   static std::string s_separator;
   static std::string s_defectFolderName;
-  static std::string s_deadStripFolderName;
-  static std::string s_deadChipFolderName;
-  static std::string s_effFolderName;
-  static std::string s_noFolderName;
-  // cache for the Collections, access by foldername
+
   mutable std::map<const int, const std::string>  m_defectListMap;
-  mutable std::map<const std::string, const CondAttrListCollection*>  m_attrListCollectionMap;
-  const DataHandle<CondAttrListCollection> m_DefectData;
-  const CondAttrListCollection*      m_attrListCollection;
-  CondAttrListCollection*      m_attrListColl;
-  CondAttrListCollection*      m_attrListColl_eff;
-  CondAttrListCollection*      m_attrListColl_no;
   ServiceHandle<StoreGateSvc>  m_detStore;
-  ServiceHandle<IIOVDbSvc>     m_IOVDbSvc;
-  BooleanProperty              m_writeCondObjs;
-  BooleanProperty              m_regIOV;
-  BooleanProperty              m_readWriteCool;
-  BooleanProperty              m_twoStepWriteReg;
-  BooleanProperty              m_manualiov;
-  IntegerProperty              m_regTime;
-  IntegerProperty              m_version;
   IntegerProperty              m_nhits_noisychip;
   IntegerProperty              m_nhits_noisywafer;
   IntegerProperty              m_nhits_noisymodule;
-  UnsignedIntegerProperty      m_beginRun;
-  UnsignedIntegerProperty      m_endRun;
-  StringProperty               m_streamName;
-  std::string                  m_tagID4List;
-  std::string                  m_tagID4Eff;
-  std::string                  m_tagID4NO;
-
-  SG::ReadHandleKey<EventInfo> m_evtKey;
-  IIOVRegistrationSvc*         m_regSvc;
-  IAthenaOutputStreamTool*     m_streamer;
-
-  StringArrayProperty          m_badElements; //list of bad detector elements (= module sides)
-  std::set<Identifier>         m_badIds;
   bool                         m_filled;
-  bool                         m_defectRecorded;
-  bool                         m_effRecorded;
-  bool                         m_noRecorded;
   const SCT_ID*                m_pHelper;
-  // FIXME: this caches only the last call of getList.
-  // creating a hash of _all_ calls may be faster, but wastes a lot of memory
   mutable std::string          m_currentDefectList;
 
+  mutable const SCT_MonitorConditionsCondData *m_condData;
+  SG::ReadCondHandleKey<SCT_MonitorConditionsCondData> m_condKey;
+  bool getCondData() const;
 };
 
-#endif // SCT_MonitorConditinosSvc.h
\ No newline at end of file
+#endif // SCT_MonitorConditinosSvc.h
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataSvc.cxx
index 6a43c37748fd790099151fd1bd467ee87ca14d07..033ba7c97ac929366b99284c547c51da59bb84bf 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataSvc.cxx
@@ -3,14 +3,12 @@
 */
 
 /** @file SCT_ReadCalibChipDataSvc.cxx Implementation file for SCT_ReadCalibChipDataSvc.
-@author Per Johansson (23/03/09), Shaun Roe (17/2/2010)
+    @author Per Johansson (23/03/09), Shaun Roe (17/2/2010)
 */
 
-// Include SCT_ReadCalibChipDataSvc.h 
 #include "SCT_ReadCalibChipDataSvc.h"
 
 // Include Athena stuff
-#include "StoreGate/StoreGateSvc.h"
 #include "AthenaPoolUtilities/CondAttrListCollection.h"
 #include "AthenaPoolUtilities/AthenaAttributeList.h"
 #include "Identifier/Identifier.h"
@@ -19,62 +17,57 @@
 #include "InDetReadoutGeometry/SCT_DetectorManager.h" 
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "SCT_SlhcIdConverter.h"
+#include "StoreGate/StoreGateSvc.h"
+
 // Include Gaudi stuff
 #include "GaudiKernel/IIncidentSvc.h"
 #include "GaudiKernel/StatusCode.h"
 
 // Include STL stuff
-#include <sstream>
-#include <vector>
-#include <string>
-#include <list>
 #include <limits>
-#include <map>
 #include <algorithm>
+
+// Include boost stuff
 #include "boost/tokenizer.hpp"
 #include "boost/lexical_cast.hpp"
 
+boost::array<std::string, SCT_ReadCalibChipDataSvc::N_NPTGAIN> nPtGainDbParameterNames{ {"gainByChip", "gainRMSByChip", "offsetByChip", "offsetRMSByChip", "noiseByChip", "noiseRMSByChip"} };
+boost::array<std::string, SCT_ReadCalibChipDataSvc::N_NPTGAIN> nPtGainParameterNames{ {"GainByChip", "GainRMSByChip", "OffsetByChip", "OffsetRMSByChip", "NoiseByChip", "NoiseRMSByChip"} };
 
-using namespace std;
-using namespace SCT_ConditionsServices;
+boost::array<std::string, SCT_ReadCalibChipDataSvc::N_NOISEOCC> noiseOccDbParameterNames{ {"occupancyByChip", "occupancyRMSByChip", "offsetByChip", "noiseByChip"} };
+boost::array<std::string, SCT_ReadCalibChipDataSvc::N_NOISEOCC> noiseOccParameterNames{ {"OccupancyByChip", "OccupancyRMSByChip", "OffsetByChip", "NoiseByChip"} };
 
-boost::array<std::string, SCT_ReadCalibChipDataSvc::N_NPTGAIN> nPtGainDbParameterNames={ {"gainByChip", "gainRMSByChip","offsetByChip" ,"offsetRMSByChip", "noiseByChip", "noiseRMSByChip"} };
-boost::array<std::string, SCT_ReadCalibChipDataSvc::N_NPTGAIN> nPtGainParameterNames={ {"GainByChip", "GainRMSByChip","OffsetByChip" ,"OffsetRMSByChip", "NoiseByChip", "NoiseRMSByChip"} };
-
-boost::array<std::string, SCT_ReadCalibChipDataSvc::N_NOISEOCC> noiseOccDbParameterNames={ {"occupancyByChip", "occupancyRMSByChip","offsetByChip" ,"noiseByChip"} };
-boost::array<std::string, SCT_ReadCalibChipDataSvc::N_NOISEOCC> noiseOccParameterNames={ {"OccupancyByChip", "OccupancyRMSByChip","OffsetByChip" ,"NoiseByChip"} };
-
-enum FolderType{NPTGAIN,NOISEOCC,UNKNOWN_FOLDER,N_FOLDERTYPES};
+enum FolderType {NPTGAIN, NOISEOCC, UNKNOWN_FOLDER, N_FOLDERTYPES};
 
 
 // Utility functions in anon. namespace
-namespace{
-  int noiseOccIndex(const std::string & dataName){
-    int i(SCT_ReadCalibChipDataSvc::N_NOISEOCC);
-    while(i--) if (dataName==noiseOccParameterNames[i]) break;
+namespace {
+  int noiseOccIndex(const std::string& dataName) {
+    int i{SCT_ReadCalibChipDataSvc::N_NOISEOCC};
+    while (i--) if (dataName==noiseOccParameterNames[i]) break;
     return i;
   }
-  int nPtGainIndex(const std::string & dataName){
-    int i(SCT_ReadCalibChipDataSvc::N_NPTGAIN);
-    while(i--) if (dataName==nPtGainParameterNames[i]) break;
+  int nPtGainIndex(const std::string& dataName) {
+    int i{SCT_ReadCalibChipDataSvc::N_NPTGAIN};
+    while (i--) if (dataName==nPtGainParameterNames[i]) break;
     return i;
   }
 
   template <typename C> 
-  bool fillFromString(const std::string& source, C & userContainer){
+    bool fillFromString(const std::string& source, C& userContainer) {
     if (source.empty()) return false;
     typedef typename C::value_type V_t;
-    V_t errVal(numeric_limits<V_t>::has_quiet_NaN?(numeric_limits<V_t>::quiet_NaN()):0);
-    boost::char_separator<char> sep(" ");
+    V_t errVal{std::numeric_limits<V_t>::has_quiet_NaN ? (std::numeric_limits<V_t>::quiet_NaN()) : 0};
+    boost::char_separator<char> sep{" "};
     typedef boost::tokenizer<boost::char_separator<char> > Tokenizer;
-    Tokenizer tok(source,sep);
-    bool noNan(true);
-    const Tokenizer::iterator end(tok.end());
+    Tokenizer tok{source, sep};
+    bool noNan{true};
+    const Tokenizer::iterator end{tok.end()};
     int j(0);
-    for(Tokenizer::iterator i(tok.begin());i !=end ;++i){
-      try{
+    for (Tokenizer::iterator i{tok.begin()}; i!=end; ++i) {
+      try {
         userContainer[j]=boost::lexical_cast<V_t>(*i);
-      } catch(boost::bad_lexical_cast) {
+      } catch (boost::bad_lexical_cast) {
         userContainer[j]=errVal;
         noNan=false;
       }
@@ -82,97 +75,97 @@ namespace{
     }
     return noNan;
   }
-
-/**
-  //decide whether folder contains noise occupancy or gain
-  FolderType folderType(const std::string & folderName){
-    if ( folderName.find("Gain")!=std::string::npos) return NPTGAIN;
-    if ( folderName.find("Noise")!=std::string::npos) return NOISEOCC;
-    return UNKNOWN_FOLDER;
-  }
-  **/
 }//end of anon namespace
 
 
 
 //----------------------------------------------------------------------
 SCT_ReadCalibChipDataSvc::SCT_ReadCalibChipDataSvc (const std::string& name, ISvcLocator* pSvcLocator) :
-AthService(name, pSvcLocator),
-  m_storeGateSvc("StoreGateSvc", name),
-  m_detStoreSvc("DetectorStore", name),
-  m_IOVDbSvc("IOVDbSvc", name),
+  AthService(name, pSvcLocator),
+  m_storeGateSvc{"StoreGateSvc", name},
+  m_detStoreSvc{"DetectorStore", name},
+  m_IOVDbSvc{"IOVDbSvc", name},
   m_SCTdetMgr{nullptr},
   m_attrListColl{nullptr},
   m_id_sct{nullptr},
-  m_dataFilled(false),
-  m_printCalibDataMaps(false)
-{
-  declareProperty("PrintCalibDataMaps",    m_printCalibDataMaps    = false, "Print data read from the Calib Data map?");
-  declareProperty("AttrListCollFolders",   m_atrcollist, "List of calibration data folder?"); 
-  declareProperty("NoiseLevel",            m_noiseLevel = 1800.0, "Noise Level for isGood if ever used");
-  std::vector<std::string> names(2);
-  names[0] = std::string("/SCT/DAQ/Calibration/ChipGain");
-  names[1] = std::string("/SCT/DAQ/Calibration/ChipNoise");
-  m_atrcollist.setValue(names);
-  //initialize boost arrays
-  ModuleGain_t oneModuleGain;
-  oneModuleGain.assign(0);
-  ModuleNoise_t oneModuleNoise;
-  oneModuleNoise.assign(0);
-  //
-  GainParameters_t oneModuleGainParameters;
-  oneModuleGainParameters.assign(oneModuleGain);
-  NoiseOccParameters_t oneModuleNoiseParameters;
-  oneModuleNoiseParameters.assign(oneModuleNoise);
-  //
-  m_nPtGainData.assign(oneModuleGainParameters);
-  m_noiseOccData.assign(oneModuleNoiseParameters);
-}
+  m_dataFilled{false},
+  m_printCalibDataMaps{false}
+  {
+    declareProperty("PrintCalibDataMaps",  m_printCalibDataMaps = false, "Print data read from the Calib Data map?");
+    declareProperty("AttrListCollFolders", m_atrcollist,                 "List of calibration data folder?"); 
+    declareProperty("NoiseLevel",          m_noiseLevel = 1800.0,        "Noise Level for isGood if ever used");
+    std::vector<std::string> names{2};
+    names[0] = std::string{"/SCT/DAQ/Calibration/ChipGain"};
+    names[1] = std::string{"/SCT/DAQ/Calibration/ChipNoise"};
+    m_atrcollist.setValue(names);
+    //initialize boost arrays
+    ModuleGain_t oneModuleGain;
+    oneModuleGain.assign(0);
+    ModuleNoise_t oneModuleNoise;
+    oneModuleNoise.assign(0);
+    //
+    GainParameters_t oneModuleGainParameters;
+    oneModuleGainParameters.assign(oneModuleGain);
+    NoiseOccParameters_t oneModuleNoiseParameters;
+    oneModuleNoiseParameters.assign(oneModuleNoise);
+    //
+    m_nPtGainData.assign(oneModuleGainParameters);
+    m_noiseOccData.assign(oneModuleNoiseParameters);
+  }
 
 //----------------------------------------------------------------------
-SCT_ReadCalibChipDataSvc::~SCT_ReadCalibChipDataSvc(){ 
-//nop
+SCT_ReadCalibChipDataSvc::~SCT_ReadCalibChipDataSvc() { 
+  //nop
 }
 
 //----------------------------------------------------------------------
 
 StatusCode 
-SCT_ReadCalibChipDataSvc::initialize(){
+SCT_ReadCalibChipDataSvc::initialize() {
   // Print where you are
   // Get SCT detector manager
-  if (m_detStoreSvc->retrieve(m_SCTdetMgr, "SCT").isFailure()) return msg(MSG:: FATAL) << "Failed to get SCT detector manager" << endmsg,  StatusCode::FAILURE;
+  if (m_detStoreSvc->retrieve(m_SCTdetMgr, "SCT").isFailure()) {
+    ATH_MSG_FATAL("Failed to get SCT detector manager");
+    return StatusCode::FAILURE;
+  }
   // Get SCT helper
-  if( m_detStoreSvc->retrieve(m_id_sct, "SCT_ID").isFailure()) return msg(MSG:: FATAL) << "Failed to get SCT helper" << endmsg, StatusCode::FAILURE;
+  if (m_detStoreSvc->retrieve(m_id_sct, "SCT_ID").isFailure()) {
+    ATH_MSG_FATAL("Failed to get SCT helper");
+    return StatusCode::FAILURE;
+  }
   // Retrieve IOVDb service
-  if (m_IOVDbSvc.retrieve().isFailure()) return msg(MSG:: ERROR)<< "Failed to retrieve IOVDbSvc " << endmsg, StatusCode::FAILURE;
+  if (m_IOVDbSvc.retrieve().isFailure()) {
+    ATH_MSG_ERROR("Failed to retrieve IOVDbSvc ");
+    return StatusCode::FAILURE;
+  }
   //Register callbacks for CalibData folders using a vector of keys defined in jobOpt
-  std::vector<std::string>::const_iterator itr(m_atrcollist.value().begin());
-  std::vector<std::string>::const_iterator end(m_atrcollist.value().end()); 
-  for (;itr!=end;++itr) {
+  std::vector<std::string>::const_iterator itr{m_atrcollist.value().begin()};
+  std::vector<std::string>::const_iterator end{m_atrcollist.value().end()};
+  for (; itr!=end; ++itr) {
     m_key = *itr;
-    if ( m_key == "/SCT/DAQ/Calibration/ChipGain"){
-      if (m_detStoreSvc->regFcn(&SCT_ReadCalibChipDataSvc::fillData,this,m_coolGainData,m_key).isFailure()){
-        msg(MSG:: ERROR) << "Cannot register callbacks function for key " << m_key << endmsg;
+    if (m_key == "/SCT/DAQ/Calibration/ChipGain") {
+      if (m_detStoreSvc->regFcn(&SCT_ReadCalibChipDataSvc::fillData, this, m_coolGainData, m_key).isFailure()) {
+        ATH_MSG_ERROR("Cannot register callbacks function for key " << m_key);
         return StatusCode::FAILURE;
       }
     }
-    if ( m_key == "/SCT/DAQ/Calibration/ChipNoise" ){
-      if (m_detStoreSvc->regFcn(&SCT_ReadCalibChipDataSvc::fillData,this,m_coolNoiseData,m_key).isFailure()){
-        msg(MSG:: ERROR) << "Cannot register callbacks function for key " << m_key << endmsg;
+    if (m_key == "/SCT/DAQ/Calibration/ChipNoise") {
+      if (m_detStoreSvc->regFcn(&SCT_ReadCalibChipDataSvc::fillData, this, m_coolNoiseData, m_key).isFailure()) {
+        ATH_MSG_ERROR("Cannot register callbacks function for key " << m_key);
         return StatusCode::FAILURE;
       }
     }
   }
-  const float errVal=numeric_limits<float>::quiet_NaN();
+  const float errVal{std::numeric_limits<float>::quiet_NaN()};
   //double check: initialize arrays to NaN
-  for (int m(0); m!=NUMBER_OF_MODULES;++m){
-    for (int p(0);p!=N_NPTGAIN;++p){
-      for (int c(0);c!=CHIPS_PER_MODULE;++c){
+  for (int m{0}; m!=NUMBER_OF_MODULES; ++m) {
+    for (int p{0}; p!=N_NPTGAIN; ++p) {
+      for (int c{0}; c!=CHIPS_PER_MODULE; ++c) {
         m_nPtGainData[m][p][c]=errVal;
       }
     } 
-    for (int p(0);p!=N_NOISEOCC;++p){
-      for (int c(0);c!=CHIPS_PER_MODULE;++c){
+    for (int p{0}; p!=N_NOISEOCC; ++p) {
+      for (int c{0}; c!=CHIPS_PER_MODULE; ++c) {
         m_noiseOccData[m][p][c]=errVal;
       }
     }
@@ -180,20 +173,21 @@ SCT_ReadCalibChipDataSvc::initialize(){
   return StatusCode::SUCCESS;
 } // SCT_ReadCalibChipDataSvc::initialize()
 
-
 //----------------------------------------------------------------------
-StatusCode SCT_ReadCalibChipDataSvc::finalize(){
+StatusCode
+SCT_ReadCalibChipDataSvc::finalize() {
   // Print where you are
   return StatusCode::SUCCESS;
 } // SCT_ReadCalibChipDataSvc::finalize()
 
 //----------------------------------------------------------------------
 // Query the interfaces.
-StatusCode SCT_ReadCalibChipDataSvc::queryInterface(const InterfaceID& riid, void** ppvInterface){
-  if ( ISCT_ReadCalibChipDataSvc::interfaceID().versionMatch(riid) ) {
+StatusCode
+SCT_ReadCalibChipDataSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
+  if (ISCT_ReadCalibChipDataSvc::interfaceID().versionMatch(riid)) {
     *ppvInterface = this;
-  } else if (ISCT_ConditionsSvc::interfaceID().versionMatch(riid) ) {
-    *ppvInterface =  dynamic_cast<ISCT_ConditionsSvc*>(this);
+  } else if (ISCT_ConditionsSvc::interfaceID().versionMatch(riid)) {
+    *ppvInterface = dynamic_cast<ISCT_ConditionsSvc*>(this);
   } else {
     return AthService::queryInterface(riid, ppvInterface);
   }
@@ -203,42 +197,45 @@ StatusCode SCT_ReadCalibChipDataSvc::queryInterface(const InterfaceID& riid, voi
 
 //----------------------------------------------------------------------
 //Can only report good/bad at side level
-bool SCT_ReadCalibChipDataSvc::canReportAbout(InDetConditions::Hierarchy h) {
+bool
+SCT_ReadCalibChipDataSvc::canReportAbout(InDetConditions::Hierarchy h) {
   return (h==InDetConditions::SCT_SIDE);
 }
 
 
 //----------------------------------------------------------------------
 // Returns ok if fillData worked properly
-bool SCT_ReadCalibChipDataSvc::filled() const{
+bool
+SCT_ReadCalibChipDataSvc::filled() const {
   return m_dataFilled;
 } //SCT_ReadCalibChipDataSvc::filled()
 
 
 //----------------------------------------------------------------------
 // Fill the data structures from a callback
-StatusCode SCT_ReadCalibChipDataSvc::fillData(int& /*i*/ , std::list<std::string>& l){
-  std::list<std::string>::const_iterator itr(l.begin()), end(l.end());
+StatusCode
+SCT_ReadCalibChipDataSvc::fillData(int& /*i*/, std::list<std::string>& l) {
+  std::list<std::string>::const_iterator itr{l.begin()}, end{l.end()};
   // Print where you are
-  if (msgLvl(MSG::DEBUG)){
+  if (msgLvl(MSG::DEBUG)) {
     msg(MSG::DEBUG) << "fillData has been triggered by: ";
     for (; itr!=end; ++itr) {
       msg() << *itr << " ";
     }
     msg() << endmsg;
   }
-  StatusCode sc0 = SCT_ReadCalibChipDataSvc::fillCalibData(l);
+  StatusCode sc0{SCT_ReadCalibChipDataSvc::fillCalibData(l)};
   // No longer need the conditions folder as stored locally
   for (itr=l.begin(); itr!=end; ++itr) {
-    m_IOVDbSvc->dropObject(*itr,true); 
+    m_IOVDbSvc->dropObject(*itr, true); 
   }
-  if ( sc0==StatusCode::SUCCESS ){
+  if (sc0==StatusCode::SUCCESS) {
     m_dataFilled = true;
-    msg(MSG:: INFO) << "Calib Data maps filled ok" << endmsg;
+    ATH_MSG_INFO("Calib Data maps filled ok");
     return StatusCode::SUCCESS;
   } else {
     m_dataFilled = false;
-    msg(MSG:: ERROR) << "fillData failed" << endmsg;
+    ATH_MSG_ERROR("fillData failed");
     return StatusCode::FAILURE;
   }
 
@@ -246,44 +243,51 @@ StatusCode SCT_ReadCalibChipDataSvc::fillData(int& /*i*/ , std::list<std::string
 
 //----------------------------------------------------------------------
 // Callback for Calib data
-StatusCode SCT_ReadCalibChipDataSvc::fillCalibData(std::list<std::string>& keys){
-  const string noiseOccFolder("/SCT/DAQ/Calibration/ChipNoise");
-  const string nPtGainFolder("/SCT/DAQ/Calibration/ChipGain");
-    // Retrieve CondAttrListCollection
-  if (std::find(keys.begin(), keys.end(),noiseOccFolder) != keys.end()){
-    if (m_detStoreSvc->retrieve(m_coolNoiseData,noiseOccFolder).isFailure()) return msg(MSG:: ERROR) << "Could not retrieve CondAttrListCollection for: " << noiseOccFolder << endmsg, StatusCode::FAILURE;
+StatusCode
+SCT_ReadCalibChipDataSvc::fillCalibData(std::list<std::string>& keys) {
+  const std::string noiseOccFolder{"/SCT/DAQ/Calibration/ChipNoise"};
+  const std::string nPtGainFolder{"/SCT/DAQ/Calibration/ChipGain"};
+  // Retrieve CondAttrListCollection
+  if (std::find(keys.begin(), keys.end(), noiseOccFolder) != keys.end()) {
+    if (m_detStoreSvc->retrieve(m_coolNoiseData, noiseOccFolder).isFailure()) {
+      ATH_MSG_ERROR("Could not retrieve CondAttrListCollection for: " << noiseOccFolder);
+      return StatusCode::FAILURE;
+    }
     // loop over collection
-    CondAttrListCollection::const_iterator itLoop=m_coolNoiseData->begin();
-    CondAttrListCollection::const_iterator itLoop_end=m_coolNoiseData->end();
+    CondAttrListCollection::const_iterator itLoop{m_coolNoiseData->begin()};
+    CondAttrListCollection::const_iterator itLoop_end{m_coolNoiseData->end()};
     for (; itLoop!=itLoop_end; ++itLoop) {
-      CondAttrListCollection::ChanNum chanNum = itLoop->first;
-      const coral::AttributeList & anAttrList = itLoop->second;
-        // Convert chanNum=offlineID into identifier
-
-      Identifier32 moduleId(chanNum);
-        //find the corresponding hash
-      const IdentifierHash hashId = m_id_sct->wafer_hash(moduleId);
-        //find the index to the module (hash is for each side), to use as index into array
-      const unsigned int moduleIdx=hashId/2;
-      NoiseOccParameters_t & theseCalibData=m_noiseOccData[moduleIdx];
+      CondAttrListCollection::ChanNum chanNum{itLoop->first};
+      const coral::AttributeList& anAttrList{itLoop->second};
+      // Convert chanNum=offlineID into identifier
+
+      Identifier32 moduleId{chanNum};
+      //find the corresponding hash
+      const IdentifierHash hashId{m_id_sct->wafer_hash(moduleId)};
+      //find the index to the module (hash is for each side), to use as index into array
+      const unsigned int moduleIdx{hashId/2};
+      NoiseOccParameters_t& theseCalibData{m_noiseOccData[moduleIdx]};
       insertNoiseOccFolderData(theseCalibData, anAttrList);
     }
   }
-  if (std::find(keys.begin(), keys.end(),nPtGainFolder) != keys.end()){
-    if (m_detStoreSvc->retrieve(m_coolGainData,nPtGainFolder).isFailure()) return msg(MSG:: ERROR) << "Could not retrieve CondAttrListCollection for: " << nPtGainFolder << endmsg, StatusCode::FAILURE;
+  if (std::find(keys.begin(), keys.end(), nPtGainFolder) != keys.end()) {
+    if (m_detStoreSvc->retrieve(m_coolGainData, nPtGainFolder).isFailure()) {
+      ATH_MSG_ERROR("Could not retrieve CondAttrListCollection for: " << nPtGainFolder);
+      return StatusCode::FAILURE;
+    }
     // loop over collection
-    CondAttrListCollection::const_iterator itLoop=m_coolGainData->begin();
-    CondAttrListCollection::const_iterator itLoop_end=m_coolGainData->end();
+    CondAttrListCollection::const_iterator itLoop{m_coolGainData->begin()};
+    CondAttrListCollection::const_iterator itLoop_end{m_coolGainData->end()};
     for (; itLoop!=itLoop_end; ++itLoop) {
-      CondAttrListCollection::ChanNum chanNum = itLoop->first;
-      coral::AttributeList anAttrList = itLoop->second;
-        // Convert chanNum=offlineID into identifier
-      Identifier32 moduleId(chanNum);
-        //find the corresponding hash
-      const IdentifierHash hashId = m_id_sct->wafer_hash(moduleId);
-        //find the index to the module (hash is for each side), to use as index into array
-      const unsigned int moduleIdx=hashId/2;
-      GainParameters_t & theseCalibData=m_nPtGainData[moduleIdx];
+      CondAttrListCollection::ChanNum chanNum{itLoop->first};
+      coral::AttributeList anAttrList{itLoop->second};
+      // Convert chanNum=offlineID into identifier
+      Identifier32 moduleId{chanNum};
+      //find the corresponding hash
+      const IdentifierHash hashId{m_id_sct->wafer_hash(moduleId)};
+      //find the index to the module (hash is for each side), to use as index into array
+      const unsigned int moduleIdx{hashId/2};
+      GainParameters_t& theseCalibData{m_nPtGainData[moduleIdx]};
       insertNptGainFolderData(theseCalibData, anAttrList);
     }
   }
@@ -293,137 +297,139 @@ StatusCode SCT_ReadCalibChipDataSvc::fillCalibData(std::list<std::string>& keys)
 
 //----------------------------------------------------------------------
 // Returns a bool summary of the data
-bool SCT_ReadCalibChipDataSvc::isGood(const IdentifierHash & elementHashId){
-  int moduleIdx=elementHashId/2;
-    // Retrieve defect data from map
-  NoiseOccParameters_t &noiseOccData = m_noiseOccData[moduleIdx];
-
-    // Retrieve the data
-  int i=noiseOccIndex("NoiseByChip");
-  if (i==-1) return  msg(MSG:: ERROR) << "This NoiseOccupancy noise data does not exist" << endmsg, true;
-  ModuleNoise_t & moduleNoiseData=noiseOccData[i];
-
-    // Calcuate module status
-    // For now just simple check NO mean noise level
-    // Chip could be 0 if bypassed, need to check
-      //int side = m_id_sct->side(waferId);
-  int side=elementHashId % 2;
-  int chip=side * 6;
-  const int endChip=6+chip;
-  int nChips(0);
-  float sum(0.0);
-  for (;chip!=endChip;++chip){
-    float chipNoise=moduleNoiseData[chip];
-    if (chipNoise!=0.0){
+bool
+SCT_ReadCalibChipDataSvc::isGood(const IdentifierHash& elementHashId) {
+  int moduleIdx{static_cast<int>(elementHashId/2)};
+  // Retrieve defect data from map
+  NoiseOccParameters_t& noiseOccData{m_noiseOccData[moduleIdx]};
+
+  // Retrieve the data
+  int i{noiseOccIndex("NoiseByChip")};
+  if (i==-1) {
+    ATH_MSG_ERROR("This NoiseOccupancy noise data does not exist");
+    return true;
+  }
+  ModuleNoise_t& moduleNoiseData{noiseOccData[i]};
+
+  // Calcuate module status
+  // For now just simple check NO mean noise level
+  // Chip could be 0 if bypassed, need to check
+  //int side = m_id_sct->side(waferId);
+  int side{static_cast<int>(elementHashId%2)};
+  int chip{side*6};
+  const int endChip{6+chip};
+  int nChips{0};
+  float sum{0.0};
+  for (; chip!=endChip; ++chip) {
+    float chipNoise{moduleNoiseData[chip]};
+    if (chipNoise!=0.0) {
       sum+=chipNoise;
       ++nChips;
     }
   }
-  float meanNoiseValue = sum/nChips;
-  ATH_MSG_DEBUG ( "Module mean noise: " << meanNoiseValue );
-  return ( meanNoiseValue < m_noiseLevel );
+  float meanNoiseValue{sum/nChips};
+  ATH_MSG_DEBUG("Module mean noise: " << meanNoiseValue);
+  return (meanNoiseValue < m_noiseLevel);
 } //SCT_ReadCalibChipDataSvc::summary()
 
 //----------------------------------------------------------------------
 // Returns a bool summary of the data
-bool SCT_ReadCalibChipDataSvc::isGood(const Identifier & elementId, InDetConditions::Hierarchy h){
-
+bool
+SCT_ReadCalibChipDataSvc::isGood(const Identifier& elementId, InDetConditions::Hierarchy h) {
   if (h==InDetConditions::SCT_SIDE) { //Could do by chip too
-    const IdentifierHash elementIdHash = m_id_sct->wafer_hash(elementId);
+    const IdentifierHash elementIdHash{m_id_sct->wafer_hash(elementId)};
     return isGood(elementIdHash);
-  }
-  else{
+  } else{
     // Not applicable for Calibration data
-    ATH_MSG_WARNING( "summary(): " << h << "good/bad is not applicable for Calibration data" );
+    ATH_MSG_WARNING("summary(): " << h << "good/bad is not applicable for Calibration data");
     return true;
   }
 }
 
 //----------------------------------------------------------------------
 std::vector<float> 
-SCT_ReadCalibChipDataSvc::getNPtGainData(const Identifier & moduleId, const int side, const std::string & datatype){
+SCT_ReadCalibChipDataSvc::getNPtGainData(const Identifier& moduleId, const int side, const std::string& datatype) {
   // Print where you are
-  ATH_MSG_DEBUG ( "in getNPtGainData()" );
+  ATH_MSG_DEBUG("in getNPtGainData()");
   std::vector<float> waferData;
-    //find hash
-  const IdentifierHash hashId = m_id_sct->wafer_hash(moduleId);
-    //make indx
-  const int idx=hashId/2;
-    //Retrieve defect data from map
-  try{
-    GainParameters_t & wantedNPGData = m_nPtGainData.at(idx);
+  //find hash
+  const IdentifierHash hashId{m_id_sct->wafer_hash(moduleId)};
+  //make index
+  const int idx{static_cast<int>(hashId/2)};
+  //Retrieve defect data from map
+  try {
+    GainParameters_t& wantedNPGData{m_nPtGainData.at(idx)};
     //find the correct index for the required data
-    int dataIdx= nPtGainIndex(datatype);
-    if (dataIdx<0){
-      msg(MSG:: ERROR) << "This N-point gain data: " << datatype << " does not exist" << endmsg;
+    int dataIdx{nPtGainIndex(datatype)};
+    if (dataIdx<0) {
+      ATH_MSG_ERROR("This N-point gain data: " << datatype << " does not exist");
       return waferData;
     }
-    ModuleGain_t & moduleGains=wantedNPGData[dataIdx];
-    int startOffset=side*6;
-    int endOffset=6+startOffset;
-    ModuleGain_t::const_iterator it=moduleGains.begin() + startOffset;
-    ModuleGain_t::const_iterator end=moduleGains.begin() + endOffset;
+    ModuleGain_t& moduleGains{wantedNPGData[dataIdx]};
+    int startOffset{side*6};
+    int endOffset{6+startOffset};
+    ModuleGain_t::const_iterator it{moduleGains.begin() + startOffset};
+    ModuleGain_t::const_iterator end{moduleGains.begin() + endOffset};
     // Returns the data for the wanted wafer
     if (*it != *it) return waferData;
     //could use signaling NaN here and catch the exception instead, would be quicker: NO! 
     //see: http://stackoverflow.com/questions/235386/using-nan-in-c
-    waferData.assign(it,end);    
+    waferData.assign(it, end);
     return waferData;
-  } catch (std::out_of_range e){
-     return waferData; 
-   }
+  } catch (std::out_of_range e) {
+    return waferData; 
+  }
 } //SCT_ReadCalibChipDataSvc::getNPtGainData()
 
 //----------------------------------------------------------------------
-std::vector<float> 
-SCT_ReadCalibChipDataSvc::getNoiseOccupancyData(const Identifier & moduleId, const int side, const std::string & datatype){
-    // Print where you are
-  ATH_MSG_DEBUG ( "in getNoiseOccupancyData()" );
+std::vector<float>
+SCT_ReadCalibChipDataSvc::getNoiseOccupancyData(const Identifier& moduleId, const int side, const std::string& datatype) {
+  // Print where you are
+  ATH_MSG_DEBUG("in getNoiseOccupancyData()");
   std::vector<float> waferData;
-   //find hash
-  const IdentifierHash hashId = m_id_sct->wafer_hash(moduleId);
-   //make indx
-  const int idx=hashId/2;
-  try{
-     //Retrieve defect data from array
-    NoiseOccParameters_t & wantedNoiseData = m_noiseOccData.at(idx);
-
-     //find the correct index for the required data
-    int dataIdx=noiseOccIndex(datatype);
-    if (dataIdx<0){
-      msg(MSG:: ERROR) << "This Noise Occupancy data: " << datatype << " does not exist" << endmsg;
+  //find hash
+  const IdentifierHash hashId{m_id_sct->wafer_hash(moduleId)};
+  //make index
+  const int idx{static_cast<int>(hashId/2)};
+  try {
+    //Retrieve defect data from array
+    NoiseOccParameters_t& wantedNoiseData{m_noiseOccData.at(idx)};
+
+    //find the correct index for the required data
+    int dataIdx{noiseOccIndex(datatype)};
+    if (dataIdx<0) {
+      ATH_MSG_ERROR("This Noise Occupancy data: " << datatype << " does not exist");
       return waferData;
     }
-    ModuleNoise_t & moduleNoise=wantedNoiseData[dataIdx];
-    int startOffset=side*6;
-    int endOffset=6+startOffset;
-    ModuleNoise_t::const_iterator it=moduleNoise.begin() + startOffset;
-    ModuleNoise_t::const_iterator end=moduleNoise.begin() + endOffset;
+    ModuleNoise_t& moduleNoise{wantedNoiseData[dataIdx]};
+    int startOffset{side*6};
+    int endOffset{6+startOffset};
+    ModuleNoise_t::const_iterator it{moduleNoise.begin() + startOffset};
+    ModuleNoise_t::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 (std::out_of_range e){
+  } catch (std::out_of_range e) {
     return waferData; 
   }
 } // SCT_ReadCalibChipDataSvc::getNoiseOccupancyData()
 //---------------------------------------------------------------------- 
- //fill appropriate folder
+//fill appropriate folder
 void 
-SCT_ReadCalibChipDataSvc::insertNptGainFolderData(GainParameters_t & theseCalibData, const coral::AttributeList & folderData){
-  for (int i(0);i!=N_NPTGAIN;++i){
-    ModuleGain_t & datavec=theseCalibData[i];
-    std::string dbData = ((folderData)[nPtGainDbParameterNames[i] ]).data<std::string>();
-     fillFromString(dbData, datavec);
+SCT_ReadCalibChipDataSvc::insertNptGainFolderData(GainParameters_t& theseCalibData, const coral::AttributeList& folderData) {
+  for (int i{0}; i!=N_NPTGAIN; ++i) {
+    ModuleGain_t& datavec{theseCalibData[i]};
+    std::string dbData{((folderData)[nPtGainDbParameterNames[i] ]).data<std::string>()};
+    fillFromString(dbData, datavec);
   }
 }
 
 void 
-SCT_ReadCalibChipDataSvc::insertNoiseOccFolderData(NoiseOccParameters_t & theseCalibData, const coral::AttributeList & folderData){
-  for (int i(0);i!=N_NOISEOCC;++i){
-    ModuleNoise_t & datavec=theseCalibData[i];
-    std::string dbData = ((folderData)[noiseOccDbParameterNames[i] ]).data<std::string>();
+SCT_ReadCalibChipDataSvc::insertNoiseOccFolderData(NoiseOccParameters_t& theseCalibData, const coral::AttributeList& folderData) {
+  for (int i{0}; i!=N_NOISEOCC; ++i) {
+    ModuleNoise_t& datavec{theseCalibData[i]};
+    std::string dbData{((folderData)[noiseOccDbParameterNames[i]]).data<std::string>()};
     fillFromString(dbData, datavec);
   }
 }
-
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataSvc.h
index 4828f10733c0ed19e563b4f322b2551a7fc1c4eb..1e00ba838fcacfacf3ee061f58e87618a425d642 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataSvc.h
@@ -13,54 +13,38 @@
 // Include interface class
 #include "SCT_ConditionsServices/ISCT_ReadCalibChipDataSvc.h"
 
-// Include top level interface
-#include "InDetConditionsSummaryService/InDetHierarchy.h"
-#include "SCT_ConditionsServices/ISCT_ConditionsSvc.h"
-
 // Include Athena stuff 
 #include "AthenaBaseComps/AthService.h"
+#include "AthenaKernel/IIOVDbSvc.h" 
 #include "GaudiKernel/ServiceHandle.h"
 #include "StoreGate/DataHandle.h"
-#include "AthenaKernel/IIOVDbSvc.h" 
 
-//boost
+// Include boost stuff
 #include "boost/array.hpp"
 
-// Include STL stuff
-#include <string>
-#include <list>
-#include <vector>
-
 // Forward declarations
 class CondAttrListCollection;
 class ISvcLocator;
-class SCT_CalibData;
 class StoreGateSvc;
-class Identifier;
-class StatusCode;
 class SCT_ID;
 namespace InDetDD{class SCT_DetectorManager;}
 namespace coral{class AttributeList;}
-template <class TYPE> class SvcFactory;
-
-//class Identifier;
 
-  /** This class contains a Service that reads SCT calibration data and makes it available to 
-      other algorithms. The current implementation reads the data from a COOL database. 
-  */
+/** This class contains a Service that reads SCT calibration data and makes it available to 
+    other algorithms. The current implementation reads the data from a COOL database. 
+*/
 
-class SCT_ReadCalibChipDataSvc: virtual public ISCT_ReadCalibChipDataSvc, virtual public AthService{
-  friend class SvcFactory<SCT_ReadCalibChipDataSvc>;
+class SCT_ReadCalibChipDataSvc: virtual public ISCT_ReadCalibChipDataSvc, virtual public AthService {
 
  public:
-  enum {CHIPS_PER_MODULE=12,NUMBER_OF_MODULES=4088, N_NPTGAIN=6, N_NOISEOCC=4};
+  enum {CHIPS_PER_MODULE=12, NUMBER_OF_MODULES=4088, N_NPTGAIN=6, N_NOISEOCC=4};
   //----------Public Member Functions----------//
   // Structors
-  SCT_ReadCalibChipDataSvc (const std::string& name, ISvcLocator* pSvcLocator ); //!< Constructor
+  SCT_ReadCalibChipDataSvc(const std::string& name, ISvcLocator* pSvcLocator); //!< Constructor
   virtual ~SCT_ReadCalibChipDataSvc();                                           //!< Destructor
   
   // Retrive interface ID
-  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
+  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
   static const InterfaceID& interfaceID();
   
   // Standard Gaudi functions
@@ -71,26 +55,25 @@ class SCT_ReadCalibChipDataSvc: virtual public ISCT_ReadCalibChipDataSvc, virtua
   ///Return whether this service can report on the hierarchy level (e.g. module, chip...)
   virtual bool canReportAbout(InDetConditions::Hierarchy h);
   ///Summarise the result from the service as good/bad
-  virtual bool isGood(const Identifier & elementId,InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
+  virtual bool isGood(const Identifier& elementId,InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
   ///same thing with id hash, introduced by shaun with dummy method for now
-  virtual bool isGood(const IdentifierHash & hashId);
+  virtual bool isGood(const IdentifierHash& hashId);
   // Fill the data structures
-  StatusCode fillData() {return StatusCode::FAILURE;}
+  StatusCode fillData() { return StatusCode::FAILURE; }
   // Fill the data structures from a Callback 
   StatusCode fillData(int& /*i*/, std::list<std::string>& l);
   /// Report whether the map was filled
   bool filled() const ;
   // Report whether the service can fill its data during the initialize phase
-  virtual bool canFillDuringInitialize(){ return false ; } //PJ need to know IOV/run#
+  virtual bool canFillDuringInitialize() { return false; } //PJ need to know IOV/run#
   //@}
   
   //Define methods
   virtual StatusCode fillCalibData(std::list<std::string>& keys); //!< Callback for retriving defect data
   
   // Methods to return calibration data
-  //virtual float getNPtGainData(const Identifier & moduleId); //!<Get NPtGain data per wafer
-  virtual std::vector<float> getNPtGainData(const Identifier & moduleId, const int side, const std::string & datatype); //!<Get NPtGain data per wafer
-  virtual std::vector<float> getNoiseOccupancyData(const Identifier & moduleId, const int side, const std::string & datatype); //!<Get NoiseOccupancy data wafer
+  virtual std::vector<float> getNPtGainData(const Identifier& moduleId, const int side, const std::string& datatype); //!<Get NPtGain data per wafer
+  virtual std::vector<float> getNoiseOccupancyData(const Identifier& moduleId, const int side, const std::string& datatype); //!<Get NoiseOccupancy data wafer
 
  private:
    
@@ -106,11 +89,8 @@ class SCT_ReadCalibChipDataSvc: virtual public ISCT_ReadCalibChipDataSvc, virtua
   bool m_dataFilled;  
   // List folders to be read as CondAttrListCollection*
   StringArrayProperty m_atrcollist;
-  // Calib data maps
-  //SCT_CalibData* m_NPGCalibData;
-  //SCT_CalibData* m_NOCalibData;
 
-  //
+  // Calib data maps
   typedef boost::array<float, CHIPS_PER_MODULE> ModuleGain_t;
   typedef boost::array<float, CHIPS_PER_MODULE> ModuleNoise_t;
   //
@@ -121,6 +101,7 @@ class SCT_ReadCalibChipDataSvc: virtual public ISCT_ReadCalibChipDataSvc, virtua
   typedef boost::array< NoiseOccParameters_t, NUMBER_OF_MODULES> AllModulesNoise_t;
   AllModulesGains_t m_nPtGainData;
   AllModulesNoise_t m_noiseOccData;
+
   // DataHandles for callback
   const DataHandle<CondAttrListCollection> m_coolGainData;
   const DataHandle<CondAttrListCollection> m_coolNoiseData;
@@ -128,9 +109,10 @@ class SCT_ReadCalibChipDataSvc: virtual public ISCT_ReadCalibChipDataSvc, virtua
   std::string m_key;
   // Noise level for isGood::Side
   float m_noiseLevel;
-  BooleanProperty                   m_printCalibDataMaps;           //!< Print the calib data maps?
-  void insertNptGainFolderData(GainParameters_t & theseCalibData, const coral::AttributeList & folderData);
-  void insertNoiseOccFolderData(NoiseOccParameters_t & theseCalibData, const coral::AttributeList & folderData);
+  BooleanProperty m_printCalibDataMaps; //!< Print the calib data maps?
+
+  void insertNptGainFolderData(GainParameters_t& theseCalibData, const coral::AttributeList& folderData);
+  void insertNoiseOccFolderData(NoiseOccParameters_t& theseCalibData, const coral::AttributeList& folderData);
 };
 
 //---------------------------------------------------------------------- 
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataTestAlg.cxx
index 0762eaa580e28d7497df7532044abbf3520d281e..ebe8731a8c760aa2ec60bab0797ed0cf4cd33751 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataTestAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataTestAlg.cxx
@@ -12,78 +12,73 @@
 #include "SCT_ConditionsServices/ISCT_ReadCalibChipDataSvc.h"
 
 // Include Athena stuff
-#include "Identifier/Identifier.h"
 #include "InDetIdentifier/SCT_ID.h"
 
 // Include Gaudi stuff
-#include "GaudiKernel/StatusCode.h"
 
 // Include Read Handle
 #include "StoreGate/ReadHandle.h"
 
 // Include STL stuff
 #include <vector>
-#include <string>
-using namespace std;
 
 //----------------------------------------------------------------------
 SCT_ReadCalibChipDataTestAlg::SCT_ReadCalibChipDataTestAlg(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
-  m_sc(0),
+  m_sc{0},
   m_id_sct{nullptr},
-  m_currentEventKey(std::string("EventInfo")),
-  m_moduleId(0),
-  m_waferId(0),
-  m_stripId(0),
-  m_ReadCalibChipDataSvc("SCT_ReadCalibChipDataSvc",name),
-  m_doTestmyConditionsSummary(false),
-  m_doTestmyDataSummary(false),
-  m_moduleOfflinePosition()
-{
-  declareProperty("SCT_ReadCalibChipDataSvc", m_ReadCalibChipDataSvc);
-  declareProperty("DoTestmyConditionsSummary",   m_doTestmyConditionsSummary   = false, "Test return bool conditions summary?");
-  declareProperty("DoTestmyDataSummary",         m_doTestmyDataSummary         = false, "Test return data summary?");
-  declareProperty("ModuleOfflinePosition",       m_moduleOfflinePosition              , "Offline pos. as: B-EC,layer-disk,phi,eta");
-}
+  m_currentEventKey{std::string("EventInfo")},
+  m_moduleId{0},
+  m_waferId{0},
+  m_stripId{0},
+  m_ReadCalibChipDataSvc{"SCT_ReadCalibChipDataSvc", name},
+  m_doTestmyConditionsSummary{false},
+  m_doTestmyDataSummary{false},
+  m_moduleOfflinePosition{} {
+    declareProperty("SCT_ReadCalibChipDataSvc",  m_ReadCalibChipDataSvc);
+    declareProperty("DoTestmyConditionsSummary", m_doTestmyConditionsSummary = false, "Test return bool conditions summary?");
+    declareProperty("DoTestmyDataSummary",       m_doTestmyDataSummary       = false, "Test return data summary?");
+    declareProperty("ModuleOfflinePosition",     m_moduleOfflinePosition            , "Offline pos. as: B-EC,layer-disk,phi,eta");
+  }
 
 //----------------------------------------------------------------------
-SCT_ReadCalibChipDataTestAlg::~SCT_ReadCalibChipDataTestAlg()
-{ }
+SCT_ReadCalibChipDataTestAlg::~SCT_ReadCalibChipDataTestAlg() {
+}
 
 //----------------------------------------------------------------------
-StatusCode SCT_ReadCalibChipDataTestAlg::initialize(){
+StatusCode SCT_ReadCalibChipDataTestAlg::initialize() {
   // Print where you are
-  ATH_MSG_DEBUG( "in 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" );
+    ATH_MSG_FATAL("Failed to get SCT ID helper");
     return StatusCode::FAILURE;
   } else {
-    ATH_MSG_DEBUG( "Found SCT detector manager" );
+    ATH_MSG_DEBUG("Found SCT detector manager");
   }
   
   // Process jobOption properties
   m_sc = processProperties();
   if (m_sc.isFailure()) {
-    ATH_MSG_ERROR( "Failed to process jobOpt properties");
+    ATH_MSG_ERROR("Failed to process jobOpt properties");
     return StatusCode::FAILURE;
   } else {
-    ATH_MSG_DEBUG( "Processed jobOpt properties" );
+    ATH_MSG_DEBUG("Processed jobOpt properties");
   }
 
   // Get the SCT_ReadCaliChipDataSvc
   m_sc = m_ReadCalibChipDataSvc.retrieve();
   if (m_sc.isFailure()) {
-    msg(MSG::FATAL) << "Cannot locate CalibChipData service" << endmsg;
+    ATH_MSG_FATAL("Cannot locate CalibChipData service");
     return StatusCode::FAILURE;
   } else {
     ATH_MSG_DEBUG("CalibChipData Service located ");
   }
 
   // Read Handle
-  ATH_CHECK( m_currentEventKey.initialize() );
+  ATH_CHECK(m_currentEventKey.initialize());
 
   return StatusCode::SUCCESS;
 } // SCT_ReadCalibChipDataTestAlg::initialize()
@@ -92,25 +87,25 @@ StatusCode SCT_ReadCalibChipDataTestAlg::initialize(){
 StatusCode SCT_ReadCalibChipDataTestAlg::processProperties()
 {
   // Print where you are
-  ATH_MSG_DEBUG( "in processProperties()");
+  ATH_MSG_DEBUG("in processProperties()");
   
   // Get module position from jobOpt property
-  std::vector<int>::const_iterator itLoop = m_moduleOfflinePosition.value().begin();
-  int offlineBarrelEC  = (*itLoop); ++itLoop;
-  int offlineLayerDisk = (*itLoop); ++itLoop;
-  int offlineEta       = (*itLoop); ++itLoop;
-  int offlinePhi       = (*itLoop); ++itLoop;
-  int offlineSide      = (*itLoop); ++itLoop;
-  int offlineStrip     = (*itLoop); ++itLoop;
+  std::vector<int>::const_iterator itLoop{m_moduleOfflinePosition.value().begin()};
+  int offlineBarrelEC{*itLoop};  ++itLoop;
+  int offlineLayerDisk{*itLoop}; ++itLoop;
+  int offlineEta{*itLoop};       ++itLoop;
+  int offlinePhi{*itLoop};       ++itLoop;
+  int offlineSide{*itLoop};      ++itLoop;
+  int offlineStrip{*itLoop};     ++itLoop;
   
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Module positions from jobOpt property:" << endmsg;
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "B-EC/layer-disk/eta/phi: "
-      << offlineBarrelEC  << "/"
-      << offlineLayerDisk << "/"
-      << offlineEta       << "/"
-      << offlinePhi       << "/"
-      << offlineSide      << "/"
-      << offlineStrip     << endmsg;
+  ATH_MSG_DEBUG("Module positions from jobOpt property:");
+  ATH_MSG_DEBUG("B-EC/layer-disk/eta/phi: "
+		<< offlineBarrelEC  << "/"
+		<< offlineLayerDisk << "/"
+		<< offlineEta       << "/"
+		<< offlinePhi       << "/"
+		<< offlineSide      << "/"
+		<< offlineStrip);
   
   // Create offline Identifier for this module position, wafer,chip and strip
   m_moduleId = m_id_sct->module_id(offlineBarrelEC, offlineLayerDisk, offlinePhi, offlineEta);
@@ -118,79 +113,79 @@ StatusCode SCT_ReadCalibChipDataTestAlg::processProperties()
   m_stripId = m_id_sct->strip_id(offlineBarrelEC, offlineLayerDisk, offlinePhi, offlineEta, offlineSide, offlineStrip);
 
   // Debug output
-  ATH_MSG_DEBUG( "id-getString : " << m_moduleId.getString() );   // hex format
-  ATH_MSG_DEBUG( "id-getCompact: " << m_moduleId.get_compact() ); // dec format
-  ATH_MSG_DEBUG( "id-getCompact2: " << m_stripId.get_compact() ); // dec format
-  ATH_MSG_DEBUG( "Module Id: " << m_id_sct->print_to_string(m_moduleId) );
-  ATH_MSG_DEBUG( "Strip Id: " << m_id_sct->print_to_string(m_stripId) );
+  ATH_MSG_DEBUG("id-getString : " << m_moduleId.getString());   // hex format
+  ATH_MSG_DEBUG("id-getCompact: " << m_moduleId.get_compact()); // dec format
+  ATH_MSG_DEBUG("id-getCompact2: " << m_stripId.get_compact()); // dec format
+  ATH_MSG_DEBUG("Module Id: " << m_id_sct->print_to_string(m_moduleId));
+  ATH_MSG_DEBUG("Strip Id: " << m_id_sct->print_to_string(m_stripId));
   
   return StatusCode::SUCCESS;
 } // SCT_ReadCalibChipDataTestAlg::processProperties()
 
 //----------------------------------------------------------------------
-StatusCode SCT_ReadCalibChipDataTestAlg::execute(){
+StatusCode SCT_ReadCalibChipDataTestAlg::execute() {
   //This method is only used to test the summary service, and only used within this package,
   // so the INFO level messages have no impact on performance of these services when used by clients
   
   // Print where you are
-  ATH_MSG_DEBUG( "in execute()");
+  ATH_MSG_DEBUG("in execute()");
   
   // Get the current event
-  SG::ReadHandle<xAOD::EventInfo> currentEvent(m_currentEventKey);
-  if ( not currentEvent.isValid() ) {
-    ATH_MSG_ERROR( "Could not get event info" );
+  SG::ReadHandle<xAOD::EventInfo> currentEvent{m_currentEventKey};
+  if (not currentEvent.isValid()) {
+    ATH_MSG_ERROR("Could not get event info");
     return StatusCode::FAILURE;
   }
-  ATH_MSG_DEBUG( "Current Run.Event,Time: "
-      << "[" << currentEvent->runNumber()
-      << "." << currentEvent->eventNumber()
-      << "," << currentEvent->timeStamp()
-      << "]" );
+  ATH_MSG_DEBUG("Current Run.Event,Time: "
+		<< "[" << currentEvent->runNumber()
+		<< "." << currentEvent->eventNumber()
+		<< "," << currentEvent->timeStamp()
+		<< "]");
   
   //Make sure data was filled
-  bool CalibChipDataFilled = m_ReadCalibChipDataSvc->filled();  
-  if( CalibChipDataFilled ){
+  bool CalibChipDataFilled{m_ReadCalibChipDataSvc->filled()};
+  if(CalibChipDataFilled) {
     //Test Chip Data ConditionsSummary
     if (m_doTestmyConditionsSummary) {
       // Test summmary, ask status of strip in module
-      Identifier IdM = m_moduleId;
-      Identifier IdS = m_waferId;
-      bool Sok = m_ReadCalibChipDataSvc->isGood(IdS, InDetConditions::SCT_SIDE);
-      ATH_MSG_INFO( "Side " << IdS << " on module " << IdM << " is " << (Sok?"good":"bad") );
+      Identifier IdM{m_moduleId};
+      Identifier IdS{m_waferId};
+      bool Sok{m_ReadCalibChipDataSvc->isGood(IdS, InDetConditions::SCT_SIDE)};
+      ATH_MSG_INFO("Side " << IdS << " on module " << IdM << " is " << (Sok ? "good" : "bad"));
     }
   
     //Test data summary
     if (m_doTestmyDataSummary) {
       // Test to get some data from the NPtGain or NoiseOccupancy
-      Identifier Id = m_moduleId; 
-      const int side = 1; 
+      Identifier Id{m_moduleId}; 
+      const int side{1}; 
       
       // Try to get some NPtGain data
       // GainByChip, GainRMSByChip, NoiseByChip, NoiseRMSByChip, OffsetByChip, OffsetRMSByChip
-      std::string whatNPdata = "GainByChip";
-      std::vector<float> NPdata = m_ReadCalibChipDataSvc->getNPtGainData(Id, side, whatNPdata);
-      for ( unsigned int i = 0;  i < NPdata.size(); i++ ){
-        ATH_MSG_INFO( "The " << whatNPdata << " for chip number " << i << " on side " << side << " is: " << NPdata[i] );
+      std::string whatNPdata{"GainByChip"};
+      std::vector<float> NPdata{m_ReadCalibChipDataSvc->getNPtGainData(Id, side, whatNPdata)};
+      for (unsigned int i{0}; i<NPdata.size(); i++) {
+        ATH_MSG_INFO("The " << whatNPdata << " for chip number " << i << " on side " << side << " is: " << NPdata[i]);
       }
 
       // Try to get some NO data
       // occupancy, occupancyRMS, noise, offset
-      std::string whatNOdata = "OccupancyRMSByChip";
-      std::vector<float> NOdata = m_ReadCalibChipDataSvc->getNoiseOccupancyData(Id, side, whatNOdata);
+      std::string whatNOdata{"OccupancyRMSByChip"};
+      std::vector<float> NOdata{m_ReadCalibChipDataSvc->getNoiseOccupancyData(Id, side, whatNOdata)};
       ATH_MSG_INFO("Size of returned data: "<<NOdata.size());
-      for ( unsigned int i = 0;  i < NOdata.size(); i++ ){
-       ATH_MSG_INFO( "The " << whatNOdata << " for chip number " << i << " on side " << side << " is: " << NOdata[i] );
+      for (unsigned int i{0}; i<NOdata.size(); i++) {
+	ATH_MSG_INFO("The " << whatNOdata << " for chip number " << i << " on side " << side << " is: " << NOdata[i]);
       }
       
       // Try to get some INVALID NPtGain data
       // GainByChip, GainRMSByChip, NoiseByChip, NoiseRMSByChip, OffsetByChip, OffsetRMSByChip
       Identifier invalidId;//constructor forms invalid Id
       ATH_MSG_INFO("Trying to retrieve invalid data");
-      std::vector<float> nvNPdata = m_ReadCalibChipDataSvc->getNPtGainData(invalidId, 0, whatNPdata);
-      const unsigned int sizeOfInvalidNPData(nvNPdata.size());
-      ATH_MSG_INFO("Size of returned data: "<<sizeOfInvalidNPData);
-      for ( unsigned int i(0);  i !=sizeOfInvalidNPData; ++i ){
-        ATH_MSG_INFO( "The " << whatNPdata << " for chip number " << i << " on side " << side << " is: " << nvNPdata[i] );
+      std::vector<float> nvNPdata{m_ReadCalibChipDataSvc->getNPtGainData(invalidId, 0, whatNPdata)};
+      const long unsigned int sizeOfInvalidNPData{nvNPdata.size()};
+      ATH_MSG_INFO("Size of returned data: " << sizeOfInvalidNPData);
+      for (long unsigned int i{0}; i!=sizeOfInvalidNPData; ++i) {
+        ATH_MSG_INFO("The " << whatNPdata << " for chip number " << i << " on side " << side << " is: " << nvNPdata[i]);
       }
     }
   }
@@ -198,12 +193,11 @@ StatusCode SCT_ReadCalibChipDataTestAlg::execute(){
 } // SCT_ReadCalibChipDataTestAlg::execute()
 
 //----------------------------------------------------------------------
-StatusCode SCT_ReadCalibChipDataTestAlg::finalize(){
+StatusCode SCT_ReadCalibChipDataTestAlg::finalize() {
   // Print where you are
-  ATH_MSG_DEBUG( "in finalize()" );
+  ATH_MSG_DEBUG("in finalize()");
   
   return StatusCode::SUCCESS;
 } // SCT_ReadCalibChipDataTestAlg::finalize()
 
 //----------------------------------------------------------------------
-
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataTestAlg.h
index fdd28caa3f02ee521c5d3d992e8f4aa9a0039331..e2c5cb6846dbfbaafed8aa2c90d62ea54f1808bd 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataTestAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibChipDataTestAlg.h
@@ -29,31 +29,28 @@
 
 // Forward declarations
 class ISvcLocator;
-class StatusCode;
 class ISCT_ReadCalibChipDataSvc;
 class SCT_ID;
 
-class ISCT_ConditionsSvc;
-
 /** This class acts as a test/sample client to the SCT_ReadSCalibChipDataSvc class.*/
-class SCT_ReadCalibChipDataTestAlg:public AthAlgorithm 
+class SCT_ReadCalibChipDataTestAlg : public AthAlgorithm 
 {
  public:
   //----------Public Member Functions----------//
   // Structors
-  SCT_ReadCalibChipDataTestAlg (const std::string& name, ISvcLocator* pSvcLocator); //!< Constructor
-  ~SCT_ReadCalibChipDataTestAlg();                                                  //!< Destructor
+  SCT_ReadCalibChipDataTestAlg(const std::string& name, ISvcLocator* pSvcLocator); //!< Constructor
+  ~SCT_ReadCalibChipDataTestAlg();                                                 //!< Destructor
   
   // Standard Gaudi functions
   StatusCode initialize(); //!< Gaudi initialiser
   StatusCode execute();    //!< Gaudi executer
   StatusCode finalize();   //!< Gaudi finaliser
   
-  private:
+ private:
   //----------Private Member Functions----------//
   StatusCode processProperties();             //!< Process jobOpt properties
   
-//----------Private Attributes----------//
+  //----------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
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataSvc.cxx
index e688c6637f1cf951a817ad784b45ff6ee862df42..7d70f4e613b7b01db9ed4664166071eab911bdf7 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataSvc.cxx
@@ -3,7 +3,7 @@
 */
 
 /** @file SCT_ReadCalibDataSvc.cxx Implementation file for SCT_ReadCalibDataSvc.
-@author Per Johansson, 17/05/08, based on SCT_ReadCalibDataTool.
+    @author Per Johansson, 17/05/08, based on SCT_ReadCalibDataTool.
 */
 
 // Include SCT_ReadCalibDataSvc.h
@@ -16,190 +16,172 @@
 #include "EventInfo/EventType.h"
 #include "CoralBase/TimeStamp.h"
 
-
 // Include Athena stuff
-#include "StoreGate/StoreGateSvc.h"
-#include "AthenaPoolUtilities/CondAttrListCollection.h"
 #include "AthenaPoolUtilities/AthenaAttributeList.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
+#include "EventInfo/EventID.h"
 #include "Identifier/Identifier.h"
 #include "Identifier/IdentifierHash.h"
-#include "SCT_Cabling/ISCT_CablingSvc.h"
 #include "InDetIdentifier/SCT_ID.h"
 #include "InDetReadoutGeometry/SCT_DetectorManager.h" 
 #include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "EventInfo/EventID.h"
+#include "SCT_Cabling/ISCT_CablingSvc.h"
+#include "StoreGate/StoreGateSvc.h"
 
 // Include Gaudi stuff
 #include "GaudiKernel/IIncidentSvc.h"
 #include "GaudiKernel/StatusCode.h"
 
 // Include STL stuff
-#include <sstream>
-#include <vector>
-#include <string>
-#include <list>
-#include <map>
 #include <limits>
-#include "boost/tokenizer.hpp"
+#include <map>
+#include <sstream>
+
+// Include boost stuff
 #include "boost/lexical_cast.hpp"
+#include "boost/tokenizer.hpp"
 
 // Utility functions
 namespace {
-	template <typename C> 
-	bool fillFromString(const std::string& source, C & userContainer){
-	  typedef typename C::value_type V_t;
-	  V_t errVal(0);
-	  boost::char_separator<char> sep(" ");
-	  typedef boost::tokenizer<boost::char_separator<char> > Tokenizer;
-	  Tokenizer tok(source,sep);
-	  bool noNan(true);
-	  for(Tokenizer::iterator i(tok.begin());i != tok.end();++i){
-		try{
-		  userContainer.push_back(boost::lexical_cast<V_t>(*i));
-		} catch(boost::bad_lexical_cast) {
-		  userContainer.push_back(errVal);
-		  noNan=false;
-		}
-	  }
-	  return noNan;
-	}
-	float 
-	coerceToFloatRange(const double value){
-	 const float maxfloat(std::numeric_limits<float>::max());
-	 if (value>maxfloat) return maxfloat;
-	 else return float(value);
-	} 
+  template <typename C> 
+  bool fillFromString(const std::string& source, C& userContainer) {
+    typedef typename C::value_type V_t;
+    V_t errVal{0};
+    boost::char_separator<char> sep{" "};
+    typedef boost::tokenizer<boost::char_separator<char> > Tokenizer;
+    Tokenizer tok{source, sep};
+    bool noNan{true};
+    for (Tokenizer::iterator i{tok.begin()}; i!=tok.end(); ++i) {
+      try {
+	userContainer.push_back(boost::lexical_cast<V_t>(*i));
+      } catch (boost::bad_lexical_cast) {
+	userContainer.push_back(errVal);
+	noNan=false;
+      }
+    }
+    return noNan;
+  }
+  float coerceToFloatRange(const double value) {
+    const float maxfloat{std::numeric_limits<float>::max()};
+    if (value>maxfloat) return maxfloat;
+    else return static_cast<float>(value);
+  } 
 }
 
-using namespace std;
-
 //----------------------------------------------------------------------
-SCT_ReadCalibDataSvc::SCT_ReadCalibDataSvc (const std::string& name, ISvcLocator* pSvcLocator) :
+SCT_ReadCalibDataSvc::SCT_ReadCalibDataSvc(const std::string& name, ISvcLocator* pSvcLocator) :
   AthService(name, pSvcLocator),
-  m_storeGateSvc("StoreGateSvc", name),
-  m_detStoreSvc("DetectorStore", name),
-  m_IOVDbSvc("IOVDbSvc", name),
-  m_cabling("SCT_CablingSvc",name),
+  m_storeGateSvc{"StoreGateSvc", name},
+  m_detStoreSvc{"DetectorStore", name},
+  m_IOVDbSvc{"IOVDbSvc", name},
+  m_cabling{"SCT_CablingSvc", name},
   m_SCTdetMgr{nullptr},
   m_attrListColl{nullptr},
   m_id_sct{nullptr},
-  m_dataFilled(false),
-  m_NPGDefects{nullptr},
-  m_NODefects{nullptr},
-  m_printCalibDefectMaps(false),
-  m_recoOnly(true),
-  m_ignoreDefects(0),
-  m_ignoreDefectParameters(0)
-{
-  declareProperty("PrintCalibDefectMaps",  m_printCalibDefectMaps  = false, "Print data read from the Calib Defect map?");
-  declareProperty("AttrListCollFolders",   m_atrcollist, "List of calibration data folder?"); 
-  declareProperty("RecoOnly",              m_recoOnly, "Use new improved isGood method, all other methods defunct"); 
-  declareProperty("EventInfoKey",          m_eventInfoKey=std::string("ByteStreamEventInfo"), "Key of EventInfo container");
-  std::vector<std::string> names(2);
-  names[0] = std::string("/SCT/DAQ/Calibration/NPtGainDefects");
-  names[1] = std::string("/SCT/DAQ/Calibration/NoiseOccupancyDefects");
-  m_atrcollist.setValue(names);
-  //
-  WaferIsGoodInfo_t OneWaferIsGoodInfo;
-  OneWaferIsGoodInfo.assign(0);
-  m_isGoodAllWafersInfo.assign(OneWaferIsGoodInfo);
-  //
-  //  m_ignoreDefects.push_back("BADFIT");
-  m_ignoreDefects.push_back("NOISE_SLOPE");
-  m_ignoreDefects.push_back("OFFSET_SLOPE");
-  m_ignoreDefects.push_back("GAIN_SLOPE");
-  m_ignoreDefects.push_back("BAD_OPE");
-  //  m_ignoreDefectParameters.push_back(-1000.);
-  m_ignoreDefectParameters.push_back(-1000.);
-  m_ignoreDefectParameters.push_back(-1000.);
-  m_ignoreDefectParameters.push_back(-1000.);
-  m_ignoreDefectParameters.push_back(-1000.);
-  //
-  declareProperty("IgnoreDefects", m_ignoreDefects, "Defects to ignore");
-  declareProperty("IgnoreDefectsParameters", m_ignoreDefectParameters, "Limit on defect to ignore parameters");
-  //
-}
-
-//----------------------------------------------------------------------
-SCT_ReadCalibDataSvc::~SCT_ReadCalibDataSvc(){ 
- 
+  m_dataFilled{false},
+  m_NPGDefects{},
+  m_NODefects{},
+  m_printCalibDefectMaps{false},
+  m_recoOnly{true},
+  m_ignoreDefects{},
+  m_ignoreDefectParameters{} {
+    declareProperty("PrintCalibDefectMaps", m_printCalibDefectMaps=false, "Print data read from the Calib Defect map?");
+    declareProperty("AttrListCollFolders", m_atrcollist, "List of calibration data folder?"); 
+    declareProperty("RecoOnly", m_recoOnly, "Use new improved isGood method, all other methods defunct"); 
+    declareProperty("EventInfoKey", m_eventInfoKey=std::string{"ByteStreamEventInfo"}, "Key of EventInfo container");
+    declareProperty("IgnoreDefects", m_ignoreDefects, "Defects to ignore");
+    declareProperty("IgnoreDefectsParameters", m_ignoreDefectParameters, "Limit on defect to ignore parameters");
+
+    std::vector<std::string> names{2};
+    names[0] = std::string{"/SCT/DAQ/Calibration/NPtGainDefects"};
+    names[1] = std::string{"/SCT/DAQ/Calibration/NoiseOccupancyDefects"};
+    m_atrcollist.setValue(names);
+    WaferIsGoodInfo_t OneWaferIsGoodInfo;
+    OneWaferIsGoodInfo.assign(0);
+    m_isGoodAllWafersInfo.assign(OneWaferIsGoodInfo);
+    m_ignoreDefects.push_back("NOISE_SLOPE");
+    m_ignoreDefects.push_back("OFFSET_SLOPE");
+    m_ignoreDefects.push_back("GAIN_SLOPE");
+    m_ignoreDefects.push_back("BAD_OPE");
+    m_ignoreDefectParameters.push_back(-1000.);
+    m_ignoreDefectParameters.push_back(-1000.);
+    m_ignoreDefectParameters.push_back(-1000.);
+    m_ignoreDefectParameters.push_back(-1000.);
   }
 
 //----------------------------------------------------------------------
+SCT_ReadCalibDataSvc::~SCT_ReadCalibDataSvc() {
+}
 
-StatusCode SCT_ReadCalibDataSvc::initialize(){
+//----------------------------------------------------------------------
+StatusCode SCT_ReadCalibDataSvc::initialize() {
   StatusCode sc;
   // Print where you are
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in initialize()" << endmsg;
+  ATH_MSG_DEBUG("in initialize()");
   // Get SCT detector manager
   sc = m_detStoreSvc->retrieve(m_SCTdetMgr, "SCT");
   if (sc.isFailure()) {
-    msg(MSG:: FATAL) << "Failed to get SCT detector manager" << endmsg;
+    ATH_MSG_FATAL("Failed to get SCT detector manager");
     return StatusCode::FAILURE;
-  }else {
-    if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found SCT detector manager" << endmsg;
+  } else {
+    ATH_MSG_VERBOSE("Found SCT detector manager");
   }
 
   // Get SCT helper
   sc = m_detStoreSvc->retrieve(m_id_sct, "SCT_ID");
   if (sc.isFailure()) {
-    msg(MSG:: FATAL) << "Failed to get SCT helper" << endmsg;
+    ATH_MSG_FATAL("Failed to get SCT helper");
     return StatusCode::FAILURE;
   } else {
-    if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Found SCT helper" << endmsg;
+    ATH_MSG_VERBOSE("Found SCT helper");
   }
 
   // Retrieve IOVDb service
   sc = m_IOVDbSvc.retrieve();
-  if (sc.isFailure()) {  
-    msg(MSG:: ERROR)<< "Failed to retrieve IOVDbSvc " << endmsg;
+  if (sc.isFailure()) {
+    ATH_MSG_ERROR("Failed to retrieve IOVDbSvc ");
     return StatusCode::FAILURE;
   }
 
   // Retrieve SCT Cabling service
   sc = m_cabling.retrieve();
   if (sc.isFailure()) {  
-    msg(MSG:: ERROR)<< "Failed to retrieve SCT cabling service" << endmsg;
+    ATH_MSG_ERROR("Failed to retrieve SCT cabling service");
     return StatusCode::FAILURE;
   }
 
   //Register callbacks for CalibData folders using a vector of keys defined in jobOpt
-  std::vector<std::string>::const_iterator itr(m_atrcollist.value().begin());
-  std::vector<std::string>::const_iterator end(m_atrcollist.value().end()); 
+  std::vector<std::string>::const_iterator itr{m_atrcollist.value().begin()};
+  std::vector<std::string>::const_iterator end{m_atrcollist.value().end()}; 
   for (;itr!=end;++itr) {
     m_key = *itr;
-    if ( m_key == "/SCT/DAQ/Calibration/NPtGainDefects" ){
-      if ( StatusCode::SUCCESS==m_detStoreSvc->regFcn(&SCT_ReadCalibDataSvc::fillData,this,m_CalibDefects_NP,m_key) ){
-        msg(MSG:: INFO) << "Registered callback for key: " << m_key << endmsg;
+    if (m_key == "/SCT/DAQ/Calibration/NPtGainDefects") {
+      if (StatusCode::SUCCESS==m_detStoreSvc->regFcn(&SCT_ReadCalibDataSvc::fillData, this, m_CalibDefects_NP, m_key)) {
+        ATH_MSG_INFO("Registered callback for key: " << m_key);
       } else {
-        msg(MSG:: ERROR) << "Cannot register callbacks function for key " << m_key << endmsg;
+        ATH_MSG_ERROR("Cannot register callbacks function for key " << m_key);
       }
-    }
-    else if ( m_key == "/SCT/DAQ/Calibration/NoiseOccupancyDefects" ){
-      if ( StatusCode::SUCCESS==m_detStoreSvc->regFcn(&SCT_ReadCalibDataSvc::fillData,this,m_CalibDefects_NO,m_key) ){
-        msg(MSG:: INFO) << "Registered callback for key: " << m_key << endmsg;
+    } else if (m_key == "/SCT/DAQ/Calibration/NoiseOccupancyDefects") {
+      if (StatusCode::SUCCESS==m_detStoreSvc->regFcn(&SCT_ReadCalibDataSvc::fillData, this, m_CalibDefects_NO, m_key)) {
+        ATH_MSG_INFO("Registered callback for key: " << m_key);
       } else {
-        msg(MSG:: ERROR) << "Cannot register callbacks function for key " << m_key << endmsg;
+        ATH_MSG_ERROR("Cannot register callbacks function for key " << m_key);
       }
     } else {
-      msg(MSG:: ERROR) << "Cannot register callbacks function for key " << m_key << endmsg;
+      ATH_MSG_ERROR("Cannot register callbacks function for key " << m_key);
     }
   }
   
-  // Create Calib Defect and Data maps 
-  m_NPGDefects = new SCT_CalibDefectData;
-  m_NODefects = new SCT_CalibDefectData;
-   
   // Initialize arrays and all strips to True
-  for (int w(0); w!=NUMBER_OF_WAFERS;++w){
-    for (int s(0);s!=STRIPS_PER_WAFER;++s){
+  for (int w{0}; w!=NUMBER_OF_WAFERS; ++w) {
+    for (int s{0}; s!=STRIPS_PER_WAFER; ++s) {
       m_isGoodAllWafersInfo[w][s]=true;
     }
   }
   
   //Check ignoreDefects vectors are the same size
-  if ( m_ignoreDefects.size() != m_ignoreDefectParameters.size() ){
-    msg(MSG:: ERROR) << "IgnoreDefect != IgnoreDefectsParameters, check job options!" << endmsg;
+  if (m_ignoreDefects.size() != m_ignoreDefectParameters.size()) {
+    ATH_MSG_ERROR("IgnoreDefect != IgnoreDefectsParameters, check job options!");
     return StatusCode::FAILURE;
   }
 
@@ -210,20 +192,17 @@ StatusCode SCT_ReadCalibDataSvc::initialize(){
 } // SCT_ReadCalibDataSvc::initialize()
 
 //----------------------------------------------------------------------
-StatusCode SCT_ReadCalibDataSvc::finalize(){
-  //delete new'ed objects (bug http://savannah.cern.ch/bugs/?47484 )
-  delete m_NPGDefects;
-  delete m_NODefects;
+StatusCode SCT_ReadCalibDataSvc::finalize() {
   return StatusCode::SUCCESS;
 } // SCT_ReadCalibDataSvc::finalize()
 
 //----------------------------------------------------------------------
 // Query the interfaces.
-StatusCode SCT_ReadCalibDataSvc::queryInterface(const InterfaceID& riid, void** ppvInterface){
-  if ( ISCT_ReadCalibDataSvc::interfaceID().versionMatch(riid) ) {
+StatusCode SCT_ReadCalibDataSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
+  if (ISCT_ReadCalibDataSvc::interfaceID().versionMatch(riid)) {
     *ppvInterface = this;
-  } else if (ISCT_ConditionsSvc::interfaceID().versionMatch(riid) ) {
-    *ppvInterface =  dynamic_cast<ISCT_ConditionsSvc*>(this);
+  } else if (ISCT_ConditionsSvc::interfaceID().versionMatch(riid)) {
+    *ppvInterface = dynamic_cast<ISCT_ConditionsSvc*>(this);
   } else {
     return AthService::queryInterface(riid, ppvInterface);
   }
@@ -237,56 +216,54 @@ bool SCT_ReadCalibDataSvc::canReportAbout(InDetConditions::Hierarchy h) {
   return (h==InDetConditions::SCT_STRIP);
 }
 
-
 //----------------------------------------------------------------------
 // Returns ok if fillData worked properly
 bool SCT_ReadCalibDataSvc::filled() const {
   return m_dataFilled;
 } //SCT_ReadCalibDataSvc::filled()
 
-
 //----------------------------------------------------------------------
 // Fill the data structures from a callback
-StatusCode SCT_ReadCalibDataSvc::fillData(int& /*i*/ , std::list<std::string>& l){
+StatusCode SCT_ReadCalibDataSvc::fillData(int& /*i*/ , std::list<std::string>& l) {
   // Print where you are
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "fillData has been triggered by: ";
   std::list<std::string>::const_iterator itr;
-  for (itr=l.begin(); itr!=l.end(); ++itr) {
-    msg() << *itr << " ";
+  if (msgLvl(MSG::DEBUG)) {
+    msg(MSG::DEBUG) << "fillData has been triggered by: ";
+    for (itr=l.begin(); itr!=l.end(); ++itr) {
+      msg(MSG::DEBUG) << *itr << " ";
+    }
+    msg(MSG::DEBUG) << endmsg;
   }
-  msg() << endmsg;
 
-  StatusCode sc0= SCT_ReadCalibDataSvc::fillCalibDefectData(l);
+  StatusCode sc0{SCT_ReadCalibDataSvc::fillCalibDefectData(l)};
   // No longer need the conditions folder as stored locally
   for (itr=l.begin(); itr!=l.end(); ++itr) {
     m_IOVDbSvc->dropObject(*itr,true); 
   }
 
-  if ( sc0==StatusCode::SUCCESS ){
+  if (sc0==StatusCode::SUCCESS) {
     m_dataFilled = true;
-    msg(MSG:: INFO) << "Calib Defect array/maps filled ok" << endmsg;
+    ATH_MSG_INFO("Calib Defect array/maps filled ok");
     // Print the defect maps
-    if ( m_printCalibDefectMaps and !m_recoOnly ){
-      std::string NPGCalibDefectMap;
-      std::string NOCalibDefectMap;
-      NPGCalibDefectMap = m_NPGDefects -> str();
-      NOCalibDefectMap = m_NODefects -> str();
-      msg(MSG::DEBUG) << "\n" << NPGCalibDefectMap << endmsg;
-      msg(MSG::DEBUG) << NOCalibDefectMap << endmsg;
+    if (m_printCalibDefectMaps and not m_recoOnly) {
+      std::string NPGCalibDefectMap{m_NPGDefects.str()};
+      std::string NOCalibDefectMap{m_NODefects.str()};
+      ATH_MSG_DEBUG("\n" << NPGCalibDefectMap);
+      ATH_MSG_DEBUG(NOCalibDefectMap);
     }
     return StatusCode::SUCCESS;
   } else {
     m_dataFilled = false;
-    msg(MSG:: ERROR) << "fillData failed" << endmsg;
+    ATH_MSG_ERROR("fillData failed");
     return StatusCode::FAILURE;
   }
 } //SCT_ReadCalibDataSvc::fillData()
 
 //----------------------------------------------------------------------
 // Callback for Calib defect data
-StatusCode SCT_ReadCalibDataSvc::fillCalibDefectData(std::list<std::string>& keys){
+StatusCode SCT_ReadCalibDataSvc::fillCalibDefectData(std::list<std::string>& keys) {
   // Defect type map, contains Fit, NPtGain and No defects for now
-  static std::map<int, std::string> s_defectMapIntToString;    
+  static std::map<int, std::string> s_defectMapIntToString;
   // Fit Defects
   s_defectMapIntToString[0]  = "UNKNOWN";       //<! Defect type not in this map, add!  
   s_defectMapIntToString[1]  = "DEAD";          //<! Output always < 1%
@@ -313,19 +290,19 @@ StatusCode SCT_ReadCalibDataSvc::fillCalibDefectData(std::list<std::string>& key
   s_defectMapIntToString[38] = "DOUBTR_HI";     //<! High double trigger noise occupancy, > 5
 
   // Get the current event and print info
-  SG::ReadHandle<EventInfo> event(m_eventInfoKey);
+  SG::ReadHandle<EventInfo> event{m_eventInfoKey};
   if (event.isValid()) {
-    coral::TimeStamp::ValueType nsTime=event->event_ID()->time_stamp()*1000000000LL;
-    ATH_MSG_VERBOSE( "In run/event [" << event->event_ID()->run_number() <<
-		     "," << event->event_ID()->event_number() << "] timestamp " << nsTime ); 
+    coral::TimeStamp::ValueType nsTime{event->event_ID()->time_stamp()*1000000000LL};
+    ATH_MSG_VERBOSE("In run/event [" << event->event_ID()->run_number() <<
+		     "," << event->event_ID()->event_number() << "] timestamp " << nsTime); 
   } else {
-    ATH_MSG_ERROR( "Could not get pointer to event" );
+    ATH_MSG_ERROR("Could not get pointer to event");
   }
 
-  if (!m_recoOnly){
+  if (not m_recoOnly) {
     // Check if maps empty, and if not clear them
-    if( !m_NPGDefects -> empty() ) m_NPGDefects -> clear();
-    if( !m_NODefects -> empty() ) m_NODefects -> clear();
+    if (not m_NPGDefects.empty()) m_NPGDefects.clear();
+    if (not m_NODefects.empty()) m_NODefects.clear();
   }
   
   // Create pointer to CalibDataDefect object 
@@ -335,90 +312,93 @@ StatusCode SCT_ReadCalibDataSvc::fillCalibDefectData(std::list<std::string>& key
   const CondAttrListCollection* atrlistcol;
   std::list<std::string>::const_iterator itr_key;
   for (itr_key=keys.begin(); itr_key!=keys.end(); ++itr_key) {
-    std::string folder = *itr_key;
-    if (m_detStoreSvc->retrieve(atrlistcol,*itr_key)==StatusCode::SUCCESS) {
+    std::string folder{*itr_key};
+    if (m_detStoreSvc->retrieve(atrlistcol, *itr_key)==StatusCode::SUCCESS) {
       // loop over collection
-      CondAttrListCollection::const_iterator itLoop=atrlistcol->begin();
-      CondAttrListCollection::const_iterator itLoop_end=atrlistcol->end();
+      CondAttrListCollection::const_iterator itLoop{atrlistcol->begin()};
+      CondAttrListCollection::const_iterator itLoop_end{atrlistcol->end()};
       for (; itLoop!=itLoop_end; ++itLoop) {
-        CondAttrListCollection::ChanNum chanNum = (*itLoop).first;
-        coral::AttributeList anAttrList = (*itLoop).second;
+        CondAttrListCollection::ChanNum chanNum{(*itLoop).first};
+        coral::AttributeList anAttrList{(*itLoop).second};
   
         // Convert chanNum=offlineID into identifier
-        Identifier moduleId(chanNum);
-        IdentifierHash hashId0 = m_id_sct->wafer_hash(moduleId);
+        Identifier moduleId{chanNum};
+        IdentifierHash hashId0{m_id_sct->wafer_hash(moduleId)};
         IdentifierHash hashId1;
         m_id_sct->get_other_side(hashId0, hashId1);
 
         // Check for PhiSwap readout
-        bool phiSwap0Present=false;
-        bool phiSwap1Present=false;
-        InDetDD::SiDetectorElement * p_element = (m_SCTdetMgr->getDetectorElement(hashId0));
+        bool phiSwap0Present{false};
+        bool phiSwap1Present{false};
+        InDetDD::SiDetectorElement* p_element{m_SCTdetMgr->getDetectorElement(hashId0)};
         if (p_element->swapPhiReadoutDirection()) { phiSwap0Present = true; }
         p_element = (m_SCTdetMgr->getDetectorElement(hashId1));
         if (p_element->swapPhiReadoutDirection()) { phiSwap1Present = true; }
        
-  // Clear theseDefects
+	// Clear theseDefects
         theseDefects.begDefects.clear();
         theseDefects.endDefects.clear();
         theseDefects.typeOfDefect.clear();
         theseDefects.parValue.clear();
   
-  // Get all defect parameters from COOL attrib list
-        std::string Gaindefectb = ((anAttrList)["defectBeginChannel"]).data<std::string>();
-        std::string Gaindefecte = ((anAttrList)["defectEndChannel"]).data<std::string>();
-        std::string DefectType = ((anAttrList)["defectType"]).data<std::string>();
-        std::string parValue = ((anAttrList)["defectParameter"]).data<std::string>();
+	// Get all defect parameters from COOL attrib list
+        std::string Gaindefectb{((anAttrList)["defectBeginChannel"]).data<std::string>()};
+        std::string Gaindefecte{((anAttrList)["defectEndChannel"]).data<std::string>()};
+        std::string DefectType{((anAttrList)["defectType"]).data<std::string>()};
+        std::string parValue{((anAttrList)["defectParameter"]).data<std::string>()};
   
-  // Convert the defect strings to vectors
-        vector<unsigned int> Gaindefectbvec; fillFromString(Gaindefectb, Gaindefectbvec);
-        vector<unsigned int> Gaindefectevec; fillFromString(Gaindefecte, Gaindefectevec);
-        vector<unsigned int> DefectTypevec;  fillFromString(DefectType, DefectTypevec);
-        vector<double> parValuevec; fillFromString(parValue, parValuevec);
-
-  // Fill the Calib defect objects    
-        unsigned Gainvec_size = Gaindefectbvec.size();
-        for ( unsigned int i = 0; i<Gainvec_size; ++i ){
+	// Convert the defect strings to vectors
+	std::vector<unsigned int> Gaindefectbvec;
+	fillFromString(Gaindefectb, Gaindefectbvec);
+	std::vector<unsigned int> Gaindefectevec;
+	fillFromString(Gaindefecte, Gaindefectevec);
+	std::vector<unsigned int> DefectTypevec;
+	fillFromString(DefectType, DefectTypevec);
+	std::vector<double> parValuevec;
+	fillFromString(parValue, parValuevec);
+
+	// Fill the Calib defect objects    
+        long unsigned int Gainvec_size{Gaindefectbvec.size()};
+        for (long unsigned int i=0; i<Gainvec_size; ++i) {
           theseDefects.begDefects.push_back(Gaindefectbvec[i]);
           theseDefects.endDefects.push_back(Gaindefectevec[i]);
           theseDefects.typeOfDefect.push_back(s_defectMapIntToString[DefectTypevec[i]]);
           theseDefects.parValue.push_back(coerceToFloatRange(parValuevec[i]));
         }
         // Fill the isGoodWaferArray
-        if ( !theseDefects.begDefects.empty() ){
-          for ( unsigned int i = 0; i < theseDefects.begDefects.size(); ++i ){ // loop over all defects
-          // Check for defects and their limits not to take into account in isGood 
-            bool ignoreDefect = false; 
-            unsigned int ig=0;
+        if (not theseDefects.begDefects.empty()) {
+          for (unsigned int i{0}; i<theseDefects.begDefects.size(); ++i) { // loop over all defects
+	    // Check for defects and their limits not to take into account in isGood 
+            bool ignoreDefect{false};
+            unsigned int ig{0};
             //std::string defectType = theseDefects.typeOfDefect[i];
-            while ( ig<m_ignoreDefects.size() ){ //loop until found defect or end of ignoredefects
-              if ( m_ignoreDefects[ig] == theseDefects.typeOfDefect[i] ){
-                if ( m_ignoreDefectParameters[ig] < -999 ) //no check on parameter value, defect ignored
-                  ignoreDefect = true;
-                else if ( theseDefects.typeOfDefect[i] == "NO_HI" and m_ignoreDefectParameters[ig] > theseDefects.parValue[i] ) ignoreDefect = true; //noise below threshold, > 0.0005 (in DB, so default values printed here)
-                else if ( theseDefects.typeOfDefect[i] == "NOISY" and m_ignoreDefectParameters[ig] > theseDefects.parValue[i] ) ignoreDefect = true; //noise below threshold, > 1.15* av chip average
-                else if ( theseDefects.typeOfDefect[i] == "V_NOISY" and m_ignoreDefectParameters[ig] > theseDefects.parValue[i] ) ignoreDefect = true; //noise below threshold, > 1.25* av chip average
-                else if ( theseDefects.typeOfDefect[i] == "VLO_GAIN" and m_ignoreDefectParameters[ig] < theseDefects.parValue[i] ) ignoreDefect = true; // gain to low, < 0.3 * chip average
-                else if ( theseDefects.typeOfDefect[i] == "LO_GAIN" and m_ignoreDefectParameters[ig] < theseDefects.parValue[i] ) ignoreDefect = true; // gain to low < 0.75 * chip average
-                else if ( theseDefects.typeOfDefect[i] == "HI_GAIN" and m_ignoreDefectParameters[ig] > theseDefects.parValue[i] ) ignoreDefect = true; // gain to high > 1.25 * chip average
-                else if ( theseDefects.typeOfDefect[i] == "LO_OFFSET" and m_ignoreDefectParameters[ig] > theseDefects.parValue[i] ) ignoreDefect = true; // offset to low < -100
-                else if ( theseDefects.typeOfDefect[i] == "HI_OFFSET" and m_ignoreDefectParameters[ig] < theseDefects.parValue[i] ) ignoreDefect = true; // offset to high > 200
+            while (ig<m_ignoreDefects.size()) { //loop until found defect or end of ignoredefects
+              if (m_ignoreDefects[ig] == theseDefects.typeOfDefect[i]) {
+                if (                                                   m_ignoreDefectParameters[ig]<-999) ignoreDefect = true; //no check on parameter value, defect ignored
+                else if (theseDefects.typeOfDefect[i]=="NO_HI"     and m_ignoreDefectParameters[ig]>theseDefects.parValue[i]) ignoreDefect = true; //noise below threshold, > 0.0005 (in DB, so default values printed here)
+                else if (theseDefects.typeOfDefect[i]=="NOISY"     and m_ignoreDefectParameters[ig]>theseDefects.parValue[i]) ignoreDefect = true; //noise below threshold, > 1.15* av chip average
+                else if (theseDefects.typeOfDefect[i]=="V_NOISY"   and m_ignoreDefectParameters[ig]>theseDefects.parValue[i]) ignoreDefect = true; //noise below threshold, > 1.25* av chip average
+                else if (theseDefects.typeOfDefect[i]=="VLO_GAIN"  and m_ignoreDefectParameters[ig]<theseDefects.parValue[i]) ignoreDefect = true; // gain to low, < 0.3 * chip average
+                else if (theseDefects.typeOfDefect[i]=="LO_GAIN"   and m_ignoreDefectParameters[ig]<theseDefects.parValue[i]) ignoreDefect = true; // gain to low < 0.75 * chip average
+                else if (theseDefects.typeOfDefect[i]=="HI_GAIN"   and m_ignoreDefectParameters[ig]>theseDefects.parValue[i]) ignoreDefect = true; // gain to high > 1.25 * chip average
+                else if (theseDefects.typeOfDefect[i]=="LO_OFFSET" and m_ignoreDefectParameters[ig]>theseDefects.parValue[i]) ignoreDefect = true; // offset to low < -100
+                else if (theseDefects.typeOfDefect[i]=="HI_OFFSET" and m_ignoreDefectParameters[ig]<theseDefects.parValue[i]) ignoreDefect = true; // offset to high > 200
               }
               ig++;
             }
-            if (!ignoreDefect){
-            //set the isGoodBool value for all strips for this defect
-              for ( unsigned int strip = theseDefects.begDefects[i]; strip <= theseDefects.endDefects[i]; ++strip ){ 
-              // Check for phiSwap and which wafer side before filling isGood vector
-                if ( strip < 768 ){ //side 0 0->767
-                  const unsigned int waferId0=hashId0;
-                  WaferIsGoodInfo_t & thisWaferIsGoodData0 = m_isGoodAllWafersInfo[waferId0];
-                  const unsigned int side0StripNumber = phiSwap0Present?(767-strip):strip;
+            if (!ignoreDefect) {
+	      //set the isGoodBool value for all strips for this defect
+              for (unsigned int strip{theseDefects.begDefects[i]}; strip <= theseDefects.endDefects[i]; ++strip) { 
+		// Check for phiSwap and which wafer side before filling isGood vector
+                if (strip < 768) { //side 0 0->767
+                  const unsigned int waferId0{hashId0};
+                  WaferIsGoodInfo_t& thisWaferIsGoodData0{m_isGoodAllWafersInfo[waferId0]};
+                  const unsigned int side0StripNumber{phiSwap0Present ? (767-strip) : strip};
                   thisWaferIsGoodData0[side0StripNumber] = false;
-                } else {               // side 1 768->1535 => 0->767
-                  const unsigned int waferId1=hashId1;
-                  WaferIsGoodInfo_t & thisWaferIsGoodData1 = m_isGoodAllWafersInfo[waferId1];
-                  const unsigned int side1StripNumber = phiSwap1Present?(1535-strip):(strip-768);
+                } else { // side 1 768->1535 => 0->767
+                  const unsigned int waferId1{hashId1};
+                  WaferIsGoodInfo_t& thisWaferIsGoodData1{m_isGoodAllWafersInfo[waferId1]};
+                  const unsigned int side1StripNumber{phiSwap1Present ? (1535-strip) : (strip-768)};
                   thisWaferIsGoodData1[side1StripNumber] = false;
                 }
               }
@@ -426,45 +406,45 @@ StatusCode SCT_ReadCalibDataSvc::fillCalibDefectData(std::list<std::string>& key
           }
         }
 
-        if ( !m_recoOnly ){
-        // Check what folder we are in
-          size_t folderfoundNP = folder.find("NPtGain");
-          size_t folderfoundNO = folder.find("NoiseOccupancy");
+        if (not m_recoOnly) {
+	  // Check what folder we are in
+          size_t folderfoundNP{folder.find("NPtGain")};
+          size_t folderfoundNO{folder.find("NoiseOccupancy")};
 
           // Fill the CalibDefectData maps with the Calib defect objects
-          if ( folderfoundNP!=string::npos ){ 
-            if ( theseDefects.begDefects.empty() ){
-              if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "No NPtGain defects for module " << moduleId << endmsg;  
+          if (folderfoundNP!=std::string::npos) {
+            if (theseDefects.begDefects.empty()) {
+              ATH_MSG_DEBUG("No NPtGain defects for module " << moduleId);
               continue;
             }
-            if (!(m_NPGDefects -> addModule( moduleId, theseDefects ))) {
-              msg(MSG:: ERROR) << "Unable to add module " << moduleId << " to NPtGain defect map" << endmsg;
+            if (!(m_NPGDefects.addModule(moduleId, theseDefects))) {
+              ATH_MSG_ERROR("Unable to add module " << moduleId << " to NPtGain defect map");
               return StatusCode::FAILURE;
             } else {
-              if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Defects for module " << moduleId << " added to NPG defect map" << endmsg;
+              ATH_MSG_DEBUG("Defects for module " << moduleId << " added to NPG defect map");
             }
-          }else if ( folderfoundNO!=string::npos ){  
-            if ( theseDefects.begDefects.empty() ){
-              if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "No NoiseOccupancy defects for module " << moduleId << endmsg; 
+          } else if (folderfoundNO!=std::string::npos) {  
+            if (theseDefects.begDefects.empty()) {
+              ATH_MSG_DEBUG("No NoiseOccupancy defects for module " << moduleId);
               continue;
             }
-            if (!(m_NODefects -> addModule( moduleId, theseDefects ))) {
-              msg(MSG:: ERROR) << "Unable to add module " << moduleId << " to NoiseOccupancy defect map" << endmsg;
+            if (!(m_NODefects.addModule(moduleId, theseDefects))) {
+              ATH_MSG_ERROR("Unable to add module " << moduleId << " to NoiseOccupancy defect map");
               return StatusCode::FAILURE;
             } else {
-              if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Defects for module " << moduleId << " added to NoiseOccupancy defect map" << endmsg;
+              ATH_MSG_DEBUG("Defects for module " << moduleId << " added to NoiseOccupancy defect map");
             } 
           }
         }
       }
     } else {
-      msg(MSG:: ERROR) << "Could not retrieve CondAttrListCollection " << *itr_key << endmsg;
+      ATH_MSG_ERROR("Could not retrieve CondAttrListCollection " << *itr_key);
     }  
   }
 
-  if (!m_recoOnly){
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "There are " << m_NPGDefects->size() << " elements in the NPtGain module defect map" << endmsg;
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "There are " << m_NODefects->size() << " elements in the NoiseOccupancy module defect map" << endmsg;
+  if (not m_recoOnly) {
+    ATH_MSG_DEBUG("There are " << m_NPGDefects.size() << " elements in the NPtGain module defect map");
+    ATH_MSG_DEBUG("There are " << m_NODefects.size() << " elements in the NoiseOccupancy module defect map");
   }
  
   return StatusCode::SUCCESS;
@@ -472,111 +452,110 @@ StatusCode SCT_ReadCalibDataSvc::fillCalibDefectData(std::list<std::string>& key
 
 //----------------------------------------------------------------------
 // Returns a bool summary of the data
-bool 
-SCT_ReadCalibDataSvc::isGood(const Identifier & elementId, InDetConditions::Hierarchy h){
+bool SCT_ReadCalibDataSvc::isGood(const Identifier& elementId, InDetConditions::Hierarchy h) {
   // Status of the compId
-  bool status(true);
+  bool status{true};
   // Extract the moduleId from the comp identifier
-  Identifier moduleId = m_id_sct->module_id(elementId);
-  switch (h){
-    case InDetConditions::SCT_MODULE:
+  Identifier moduleId{m_id_sct->module_id(elementId)};
+  switch (h) {
+  case InDetConditions::SCT_MODULE:
     {
       // Not applicable for Calibration data
-      msg(MSG:: WARNING) << "summary(): Module good/bad is not applicable for Calibration data" << endmsg;
+      ATH_MSG_WARNING("summary(): Module good/bad is not applicable for Calibration data");
       break;
     }
 
-    case InDetConditions::SCT_SIDE:
+  case InDetConditions::SCT_SIDE:
     {
       // Not applicable for Calibration data
-      msg(MSG:: WARNING) << "summary(): Wafer good/bad is not applicable for Calibration data" << endmsg;
+      ATH_MSG_WARNING("summary(): Wafer good/bad is not applicable for Calibration data");
       break;
     }
 
-    case InDetConditions::SCT_CHIP:
+  case InDetConditions::SCT_CHIP:
     {
       // Not applicable for Calibration data
-      msg(MSG:: WARNING) << "summary(): Chip good/bad is not applicable for Calibration data" << endmsg;
+      ATH_MSG_WARNING("summary(): Chip good/bad is not applicable for Calibration data");
       break;
     }
-    case InDetConditions::SCT_STRIP:
+  case InDetConditions::SCT_STRIP:
     {
       // Get hashId
-      IdentifierHash hashIdx = m_id_sct->wafer_hash(moduleId);
-      int side = m_id_sct->side(elementId);
-      if ( side==1 ) m_id_sct->get_other_side(hashIdx, hashIdx);
-      unsigned int waferIdx=hashIdx;
+      IdentifierHash hashIdx{m_id_sct->wafer_hash(moduleId)};
+      int side{m_id_sct->side(elementId)};
+      if (side==1) m_id_sct->get_other_side(hashIdx, hashIdx);
+      unsigned int waferIdx{hashIdx};
       //unsigned int waferIdx=hashIdx+side; //uhm
       // Get strip on wafer to check
-      int strip = m_id_sct->strip(elementId);
+      int strip{m_id_sct->strip(elementId)};
       // Retrieve isGood Wafer data
-      WaferIsGoodInfo_t & wantedIsGoodWafer = m_isGoodAllWafersInfo[waferIdx];
+      WaferIsGoodInfo_t& wantedIsGoodWafer{m_isGoodAllWafersInfo[waferIdx]};
       // Set value
       status = wantedIsGoodWafer[strip];
       break;
     }
-    default:
+  default:
     {
       status = true ;
-      if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "Unknown component has been asked for, should be Module/Wafer/Chip or Strip; returning 'good' and continuing" << endmsg ; 
+      ATH_MSG_INFO("Unknown component has been asked for, should be Module/Wafer/Chip or Strip; returning 'good' and continuing");
     }    
-  }//end of switch structure
+  } //end of switch structure
   
   // Print status  
-  return status ;
+  return status;
 } //SCT_ReadCalibDataSvc::summary()
 
 
 //----------------------------------------------------------------------
 // Returns a defect summary of a defect strip, scan, type and value
-SCT_ReadCalibDataSvc::calibDefectType SCT_ReadCalibDataSvc::defectType(const Identifier & stripId, InDetConditions::Hierarchy h){
+SCT_ReadCalibDataSvc::CalibDefectType SCT_ReadCalibDataSvc::defectType(const Identifier& stripId, InDetConditions::Hierarchy h) {
   // Print where you are
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in defectType()" << endmsg;
+  ATH_MSG_DEBUG("in defectType()");
 
   // Extract the moduleId from the comp identifier
-  Identifier moduleId = m_id_sct->module_id(stripId);
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Summary wanted for component: " << stripId << " on module: " << moduleId << endmsg;
+  Identifier moduleId{m_id_sct->module_id(stripId)};
+  ATH_MSG_DEBUG("Summary wanted for component: " << stripId << " on module: " << moduleId);
 
   // Create the CalibDataDefect objects
   SCT_CalibDefectData::CalibModuleDefects wantedNPGDefects;
   SCT_CalibDefectData::CalibModuleDefects wantedNODefects;
 
   // Create the calibDefectSummary
-  calibDefectType theseSummaryDefects;
+  CalibDefectType theseSummaryDefects;
   // Retrieve defect data from map
-  wantedNPGDefects = m_NPGDefects->findModule(moduleId);
-  wantedNODefects = m_NODefects->findModule(moduleId);
+  wantedNPGDefects = m_NPGDefects.findModule(moduleId);
+  wantedNODefects = m_NODefects.findModule(moduleId);
 
-  switch (h){
-    case InDetConditions::SCT_MODULE:
+  switch (h) {
+  case InDetConditions::SCT_MODULE:
     {
       // Not applicable for Calibration data
-      msg(MSG:: WARNING) << "summary(): Module defect summary is not applicable for Calibration data" << endmsg;
+      ATH_MSG_WARNING("summary(): Module defect summary is not applicable for Calibration data");
       break;
     }
 
-    case InDetConditions::SCT_SIDE:
+  case InDetConditions::SCT_SIDE:
     {
       // Not applicable for Calibration data
-      msg(MSG:: WARNING) << "summary(): Wafer defect summary is not applicable for Calibration data" << endmsg;
+      ATH_MSG_WARNING("summary(): Wafer defect summary is not applicable for Calibration data");
       break;
     }
 
-    case InDetConditions::SCT_CHIP:
+  case InDetConditions::SCT_CHIP:
     {
       // Not applicable for Calibration data
-      msg(MSG:: WARNING) << "summary(): Chip defect summary is not applicable for Calibration data" << endmsg;
+      ATH_MSG_WARNING("summary(): Chip defect summary is not applicable for Calibration data");
       break;
     }
-    case InDetConditions::SCT_STRIP:
+  case InDetConditions::SCT_STRIP:
     {
       // Get the strip/channel number to check
-      int side = m_id_sct->side(stripId);
-      int strip = m_id_sct->strip(stripId);
+      int side{m_id_sct->side(stripId)};
+      int strip{m_id_sct->strip(stripId)};
       unsigned int stripNum;
-      const InDetDD::SiDetectorElement * p_element = (m_SCTdetMgr->getDetectorElement(stripId));
+      const InDetDD::SiDetectorElement* p_element{m_SCTdetMgr->getDetectorElement(stripId)};
       if (p_element->swapPhiReadoutDirection()) {
-        if ( side == 0 ){
+        if (side == 0) {
           stripNum = 767 - strip;
         } else {
           stripNum = 1535 - strip;
@@ -586,40 +565,39 @@ SCT_ReadCalibDataSvc::calibDefectType SCT_ReadCalibDataSvc::defectType(const Ide
       }
       
       // Find the bad strip and fill calibDefectSummary
-      if ( wantedNPGDefects.begDefects.empty() ){
-        msg(MSG::VERBOSE) << "No NPtGain defects in this module" << endmsg;
-      }
-      else{
-        for ( unsigned int i = 0; i < wantedNPGDefects.begDefects.size(); ++i ){
-          if ( stripNum >= wantedNPGDefects.begDefects[i] && stripNum <= wantedNPGDefects.endDefects[i] ){
+      if (wantedNPGDefects.begDefects.empty()) {
+        ATH_MSG_VERBOSE("No NPtGain defects in this module");
+      } else {
+        for (unsigned int i{0}; i<wantedNPGDefects.begDefects.size(); ++i) {
+          if (stripNum>=wantedNPGDefects.begDefects[i] and stripNum<=wantedNPGDefects.endDefects[i]) {
             theseSummaryDefects.scan.push_back("NPtGain");
             theseSummaryDefects.defect.push_back(wantedNPGDefects.typeOfDefect[i]);
             theseSummaryDefects.value.push_back(wantedNPGDefects.parValue[i]);
-            if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "NPtGain defect summary for strip " << stripNum << " filled" << endmsg;
+            ATH_MSG_VERBOSE("NPtGain defect summary for strip " << stripNum << " filled");
           }
         }
       }
 
-      if ( wantedNODefects.begDefects.empty() ){
-        msg(MSG::VERBOSE) << "No NoiseOccupancy defects in this module" << endmsg;
-      }else{
-        for ( unsigned int i = 0; i != wantedNODefects.begDefects.size(); ++i ){
-          if ( stripNum >= wantedNODefects.begDefects[i] && stripNum <= wantedNODefects.endDefects[i] ){
+      if (wantedNODefects.begDefects.empty()) {
+        ATH_MSG_VERBOSE("No NoiseOccupancy defects in this module");
+      } else {
+        for (unsigned int i{0}; i != wantedNODefects.begDefects.size(); ++i) {
+          if (stripNum>=wantedNODefects.begDefects[i] and stripNum <= wantedNODefects.endDefects[i]) {
             theseSummaryDefects.scan.push_back("NoiseOccupancy");
             theseSummaryDefects.defect.push_back(wantedNODefects.typeOfDefect[i]);
             theseSummaryDefects.value.push_back(wantedNODefects.parValue[i]);
-            if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "NoiseOccupancy defect summary for strip " << stripNum << "  filled" << endmsg;
+            ATH_MSG_VERBOSE("NoiseOccupancy defect summary for strip " << stripNum << "  filled");
           }
-        }       
+        }
       } 
-      if ( theseSummaryDefects.scan.empty() ){
-        if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "defectSummary(): can't retrieve the defects for this strip: " <<  stripNum << " since strip good" << endmsg;
+      if (theseSummaryDefects.scan.empty()) {
+        ATH_MSG_VERBOSE("defectSummary(): can't retrieve the defects for this strip: " <<  stripNum << " since strip good");
       }     
       break;    
     }
-    default:
+  default:
     {
-      if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "Unknown component requested, should be one of Module/Side/Chip or Strip" << endmsg ; 
+      ATH_MSG_INFO("Unknown component requested, should be one of Module/Side/Chip or Strip");
       return theseSummaryDefects;
     }
 
@@ -630,16 +608,16 @@ SCT_ReadCalibDataSvc::calibDefectType SCT_ReadCalibDataSvc::defectType(const Ide
 
 //----------------------------------------------------------------------
 // Returns a summary of all defects on a module for a given scan
-SCT_CalibDefectData::CalibModuleDefects SCT_ReadCalibDataSvc::defectsSummary(const Identifier & moduleId, const std::string& scan){
+SCT_CalibDefectData::CalibModuleDefects SCT_ReadCalibDataSvc::defectsSummary(const Identifier& moduleId, const std::string& scan) {
   // Create pointer to the CalibDataDefect object 
   SCT_CalibDefectData::CalibModuleDefects wantedDefects;
   // Retrieve the correct defect map
-  if ( scan == "NPtGain" ){
-    wantedDefects = m_NPGDefects->findModule(moduleId);
-  } else if ( scan == "NoiseOccupancy" ){
-    wantedDefects = m_NODefects->findModule(moduleId);
-  } else{
-    msg(MSG:: ERROR) << "defectsSummary(): Module defects for scan" << scan << " does not exist (only NPtGain or NoiseOccupancy)." << endmsg; 
+  if (scan == "NPtGain") {
+    wantedDefects = m_NPGDefects.findModule(moduleId);
+  } else if (scan == "NoiseOccupancy") {
+    wantedDefects = m_NODefects.findModule(moduleId);
+  } else {
+    ATH_MSG_ERROR("defectsSummary(): Module defects for scan" << scan << " does not exist (only NPtGain or NoiseOccupancy).");
   }
 
   return wantedDefects;
@@ -648,70 +626,70 @@ SCT_CalibDefectData::CalibModuleDefects SCT_ReadCalibDataSvc::defectsSummary(con
 //---------------------------------------------------------------------- 
 //----------------------------------------------------------------------
 // Returns a list of all strips with a certain defects
-std::list<Identifier> SCT_ReadCalibDataSvc::defectList(const std::string& defect){
+std::list<Identifier> SCT_ReadCalibDataSvc::defectList(const std::string& defect) {
   std::list<Identifier> defectList;
   // Create pointer to the CalibDataDefect object 
   SCT_CalibDefectData::CalibModuleDefects wantedDefects;
   
   //Check which scan the defect belongs
-  bool NPDefect = false;
-  bool NODefect = false;
-  if ( defect == "NO_HI" || defect == "BAD_OPE" || defect == "DOUBTR_HI" ){
+  bool NPDefect{false};
+  bool NODefect{false};
+  if (defect=="NO_HI" or defect=="BAD_OPE" or defect=="DOUBTR_HI") {
     NODefect = true;
-  }else{
+  } else {
     NPDefect = true;
   }
   
   //Loop over all wafers using hashIds from the cabling service
   std::vector<boost::uint32_t> listOfRODs;
   m_cabling->getAllRods(listOfRODs);
-  std::vector<boost::uint32_t>::iterator rodIter = listOfRODs.begin();
-  std::vector<boost::uint32_t>::iterator rodEnd = listOfRODs.end();
-  for (; rodIter != rodEnd; ++rodIter) {
+  std::vector<boost::uint32_t>::iterator rodIter{listOfRODs.begin()};
+  std::vector<boost::uint32_t>::iterator rodEnd{listOfRODs.end()};
+  for (; rodIter!=rodEnd; ++rodIter) {
     std::vector<IdentifierHash> listOfHashes;
-    m_cabling->getHashesForRod(listOfHashes,*rodIter);
-    std::vector<IdentifierHash>::iterator hashIt = listOfHashes.begin();
-    std::vector<IdentifierHash>::iterator hashEnd = listOfHashes.end();
+    m_cabling->getHashesForRod(listOfHashes, *rodIter);
+    std::vector<IdentifierHash>::iterator hashIt{listOfHashes.begin()};
+    std::vector<IdentifierHash>::iterator hashEnd{listOfHashes.end()};
     for (; hashIt != hashEnd; ++hashIt) {
-      Identifier waferId = m_id_sct->wafer_id(*hashIt); 
-      int side = m_id_sct->side(waferId);
+      Identifier waferId{m_id_sct->wafer_id(*hashIt)};
+      int side{m_id_sct->side(waferId)};
       //Only use the hashid for side 0, since data saved per module basis
-      if ( side!=0 ) continue;
-      Identifier moduleId = m_id_sct->module_id(waferId); 
-      if ( NPDefect ){
-        wantedDefects = m_NPGDefects->findModule(moduleId);
-      }  else if ( NODefect ){
-        wantedDefects = m_NODefects->findModule(moduleId);
+      if (side!=0) continue;
+      Identifier moduleId{m_id_sct->module_id(waferId)};
+      if (NPDefect) {
+        wantedDefects = m_NPGDefects.findModule(moduleId);
+      }  else if (NODefect) {
+        wantedDefects = m_NODefects.findModule(moduleId);
       }
-      if ( !wantedDefects.begDefects.empty() ){
-        for ( unsigned int i = 0; i < wantedDefects.begDefects.size(); ++i ){
-          if ( wantedDefects.typeOfDefect[i] == defect ){
-        // Create identifier for all strips inside begin to end
-            int strip_beg = wantedDefects.begDefects[i];
-            int strip_end = wantedDefects.endDefects[i];
+      if (!wantedDefects.begDefects.empty()) {
+        for (unsigned int i{0}; i < wantedDefects.begDefects.size(); ++i) {
+          if (wantedDefects.typeOfDefect[i] == defect) {
+	    // Create identifier for all strips inside begin to end
+            int strip_beg{static_cast<int>(wantedDefects.begDefects[i])};
+            int strip_end{static_cast<int>(wantedDefects.endDefects[i])};
             // In DB: strip from 0-1535, need to convert to side and 0-767 and take into account phiSwaps
-            for ( int strip=strip_beg; strip<strip_end+1; strip++ ){
-              int nside = (strip<768) ? 0 : 1; 
+            for (int strip{strip_beg}; strip<strip_end+1; strip++) {
+              int nside{(strip<768) ? 0 : 1};
               int strip_cor;
-              const InDetDD::SiDetectorElement * p_element;
-              if (nside == 1){ // if side 1 need waferId of side 1 to get phiswap and correct stripId
+              const InDetDD::SiDetectorElement* p_element;
+              if (nside==1) { // if side 1 need waferId of side 1 to get phiswap and correct stripId
                 IdentifierHash hashSide1;
                 m_id_sct->get_other_side(*hashIt, hashSide1);
                 waferId = m_id_sct->wafer_id(hashSide1);
                 p_element = (m_SCTdetMgr->getDetectorElement(hashSide1));  
-              }else{
+              } else {
                 p_element = (m_SCTdetMgr->getDetectorElement(*hashIt));  
               }
               if (p_element->swapPhiReadoutDirection()) {
-                if ( nside == 0 ){
+                if (nside == 0) {
                   strip_cor = 767 - strip;
-                }else{
+                } else {
                   strip_cor = 1535 - strip;
                 }      
-              }else{
+              } else {
                 strip_cor = strip - nside * 768;
               }
-              Identifier stripId = m_id_sct->strip_id(waferId,strip_cor);
+              Identifier stripId{m_id_sct->strip_id(waferId,strip_cor)};
               defectList.push_back(stripId);
             }
           }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataSvc.h
index b4382035502f77112be1196360f435fbc232106b..d72d9188f1e7bbbe83c9b16ea9c1ecf55dfc2388 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataSvc.h
@@ -33,72 +33,61 @@
 ///Read Handle
 #include "StoreGate/ReadHandleKey.h"
 
-// Include STL stuff
-#include <string>
-#include <list>
-#include <vector>
-#include <map>
+// Include boost stuff
 #include "boost/array.hpp"
 
 // Forward declarations
 class CondAttrListCollection;
 class ISvcLocator;
 class StoreGateSvc;
-class Identifier;
-class IdentifierHash;
-class StatusCode;
 class ISCT_CablingSvc;
 class SCT_ID;
-namespace InDetDD{class SCT_DetectorManager;}
-template <class TYPE> class SvcFactory;
+namespace InDetDD{ class SCT_DetectorManager; }
 
-//class Identifier;
-
-  /** This class contains a Service that reads SCT calibration data and makes it available to 
-      other algorithms. The current implementation reads the data from a COOL database. 
-  */
+/** This class contains a Service that reads SCT calibration data and makes it available to 
+    other algorithms. The current implementation reads the data from a COOL database. 
+*/
 
-class SCT_ReadCalibDataSvc: virtual public ISCT_ReadCalibDataSvc, virtual public AthService{
-  friend class SvcFactory<SCT_ReadCalibDataSvc>;
+class SCT_ReadCalibDataSvc: virtual public ISCT_ReadCalibDataSvc, virtual public AthService {
 
  public:
-  enum {STRIPS_PER_WAFER=768,NUMBER_OF_WAFERS=8176};  
+  enum {STRIPS_PER_WAFER=768, NUMBER_OF_WAFERS=8176};  
   //----------Public Member Functions----------//
   // Structors
-  SCT_ReadCalibDataSvc (const std::string& name, ISvcLocator* pSvcLocator ); //!< Constructor
+  SCT_ReadCalibDataSvc(const std::string& name, ISvcLocator* pSvcLocator); //!< Constructor
   virtual ~SCT_ReadCalibDataSvc();                                           //!< Destructor
   
   // Retrive interface ID
-  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
+  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
   static const InterfaceID& interfaceID();
   
   // Standard Gaudi functions
   virtual StatusCode initialize(); //!< Gaudi initialiser
-  virtual StatusCode finalize();   //!< Gaudi finaliser
+  virtual StatusCode finalize(); //!< 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);
   ///Summarise the result from the service as good/bad
-  virtual bool isGood(const Identifier & elementId,InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
+  virtual bool isGood(const Identifier& elementId,InDetConditions::Hierarchy h=InDetConditions::DEFAULT);
   ///same thing with id hash, introduced by shaun with dummy method for now
-  virtual bool isGood(const IdentifierHash & /*hashId*/){ return true; }
+  virtual bool isGood(const IdentifierHash& /*hashId*/) { return true; }
   // Fill the data structures
-  StatusCode fillData() {return StatusCode::FAILURE;}
+  StatusCode fillData() { return StatusCode::FAILURE; }
   // Fill the data structures from a Callback 
   StatusCode fillData(int& /*i*/, std::list<std::string>& l);
   // Report whether the map was filled
-  bool filled() const ;
+  bool filled() const;
   // Report whether the service can fill its data during the initialize phase
-  virtual bool canFillDuringInitialize(){ return false ; } //PJ need to know IOV/run#
+  virtual bool canFillDuringInitialize() { return false ; } //PJ need to know IOV/run#
   //@}
   
   //Define methods
-  virtual StatusCode fillCalibDefectData(std::list<std::string>& keys);             //!< Callback for retriving defect data
+  virtual StatusCode fillCalibDefectData(std::list<std::string>& keys); //!< Callback for retriving defect data
   
   // Methods to return calibration defect type and summary
-  virtual SCT_ReadCalibDataSvc::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 SCT_ReadCalibDataSvc::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  
 
  private:
@@ -117,14 +106,14 @@ class SCT_ReadCalibDataSvc: virtual public ISCT_ReadCalibDataSvc, virtual public
   // List folders to be read as CondAttrListCollection*
   StringArrayProperty m_atrcollist;
   // Calib defect maps
-  SCT_CalibDefectData* m_NPGDefects;
-  SCT_CalibDefectData* m_NODefects;
-  BooleanProperty      m_printCalibDefectMaps;             //!< Print the calib defect maps?
+  SCT_CalibDefectData m_NPGDefects;
+  SCT_CalibDefectData m_NODefects;
+  BooleanProperty m_printCalibDefectMaps; //!< Print the calib defect maps?
   // Flag to set true to be able to use all methods not just isGood
   bool m_recoOnly;
   // Calib defect arrays
   typedef boost::array<bool, STRIPS_PER_WAFER> WaferIsGoodInfo_t; // [768b]
-  typedef boost::array< WaferIsGoodInfo_t, NUMBER_OF_WAFERS> AllWaferIsGoodInfo_t; // [8176][768b]
+  typedef boost::array<WaferIsGoodInfo_t, NUMBER_OF_WAFERS> AllWaferIsGoodInfo_t; // [8176][768b]
   AllWaferIsGoodInfo_t m_isGoodAllWafersInfo;
   // Arrays to hold defects to ignore/limits
   std::vector<std::string> m_ignoreDefects;
@@ -138,9 +127,7 @@ class SCT_ReadCalibDataSvc: virtual public ISCT_ReadCalibDataSvc, virtual public
 
   // Read Handle Key
   SG::ReadHandleKey<EventInfo> m_eventInfoKey;
-  
-  //  BooleanProperty                   m_printCalibDefectMaps;         //!< Print the calib defect maps?
 };
 
 //---------------------------------------------------------------------- 
-#endif // SCT_READ_CALIB_DATA_SVC
\ No newline at end of file
+#endif // SCT_READ_CALIB_DATA_SVC
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataTestAlg.cxx
index 313c09fb551064789ba8868ac13e910a8c4f2230..0cc7f37e56f7d78110583f429d1ff04d534642a2 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataTestAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataTestAlg.cxx
@@ -12,13 +12,11 @@
 #include "SCT_ConditionsServices/ISCT_ReadCalibDataSvc.h"
 
 // Include Athena stuff
-#include "Identifier/Identifier.h"
 #include "Identifier/IdentifierHash.h"
 #include "SCT_Cabling/ISCT_CablingSvc.h"
 #include "InDetIdentifier/SCT_ID.h"
 
 // Include Gaudi stuff
-#include "GaudiKernel/StatusCode.h"
 
 // Include Read Handle
 #include "StoreGate/ReadHandle.h"
@@ -26,83 +24,80 @@
 // Include STL stuff
 #include <vector>
 #include <string>
-using namespace std;
 
 //----------------------------------------------------------------------
 SCT_ReadCalibDataTestAlg::SCT_ReadCalibDataTestAlg(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
-  m_sc(0),
+  m_sc{StatusCode::SUCCESS, true},
   m_id_sct{nullptr},
-  m_currentEventKey(std::string("EventInfo")),
-  m_moduleId(0),
-  m_waferId(0),
-  m_stripId(0),
-  m_ReadCalibDataSvc("SCT_ReadCalibDataSvc",name),
-  m_cabling("SCT_CablingSvc",name),
-  m_doTestmyConditionsSummary(false),
-  m_doTestmyDefectIsGood(false),
-  m_doTestmyDefectType(false),
-  m_doTestmyDefectsSummary(false),
-  m_doTestmyDefectList(false),
-  m_moduleOfflinePosition()
+  m_currentEventKey{std::string{"EventInfo"}},
+  m_moduleId{0},
+  m_waferId{0},
+  m_stripId{0},
+  m_ReadCalibDataSvc{"SCT_ReadCalibDataSvc", name},
+  m_cabling{"SCT_CablingSvc", name},
+  m_doTestmyConditionsSummary{false},
+  m_doTestmyDefectIsGood{false},
+  m_doTestmyDefectType{false},
+  m_doTestmyDefectsSummary{false},
+  m_doTestmyDefectList{false},
+  m_moduleOfflinePosition{}
 {
-  declareProperty("SCT_ReadCalibDataSvc", m_ReadCalibDataSvc);
-  declareProperty("DoTestmyConditionsSummary",   m_doTestmyConditionsSummary   = false, "Test return bool conditions summary?");
-  declareProperty("DoTestmyDefectIsGood",        m_doTestmyDefectIsGood        = false, "Test return defect type summary?");
-  declareProperty("DoTestmyDefectType",          m_doTestmyDefectType          = false, "Test return defect type summary?");
-  declareProperty("DoTestmyDefectsSummary",      m_doTestmyDefectsSummary      = false, "Test return module defects summary?");
-  declareProperty("DoTestmyDefectList",          m_doTestmyDefectList          = false, "Test return defectList?");
-  declareProperty("ModuleOfflinePosition",       m_moduleOfflinePosition              , "Offline pos. as: B-EC,layer-disk,phi,eta");
+  declareProperty("SCT_ReadCalibDataSvc",        m_ReadCalibDataSvc);
+  declareProperty("DoTestmyConditionsSummary",   m_doTestmyConditionsSummary = false, "Test return bool conditions summary?");
+  declareProperty("DoTestmyDefectIsGood",        m_doTestmyDefectIsGood      = false, "Test return defect type summary?");
+  declareProperty("DoTestmyDefectType",          m_doTestmyDefectType        = false, "Test return defect type summary?");
+  declareProperty("DoTestmyDefectsSummary",      m_doTestmyDefectsSummary    = false, "Test return module defects summary?");
+  declareProperty("DoTestmyDefectList",          m_doTestmyDefectList        = false, "Test return defectList?");
+  declareProperty("ModuleOfflinePosition",       m_moduleOfflinePosition            , "Offline pos. as: B-EC,layer-disk,phi,eta");
 }
 
 //----------------------------------------------------------------------
 SCT_ReadCalibDataTestAlg::~SCT_ReadCalibDataTestAlg()
-{ }
+{
+}
 
 //----------------------------------------------------------------------
 StatusCode SCT_ReadCalibDataTestAlg::initialize()
 {
   // Print where you are
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in initialize()" << endmsg;
+  ATH_MSG_DEBUG("in initialize()");
   
   // Get SCT ID helper
   m_sc = detStore()->retrieve(m_id_sct, "SCT_ID");
   if (m_sc.isFailure()) {
-    msg(MSG::FATAL) << "Failed to get SCT ID helper" << endmsg;
+    ATH_MSG_FATAL("Failed to get SCT ID helper");
     return StatusCode::FAILURE;
-  }
-  else {
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Found SCT detector manager" << endmsg;
+  } else {
+    ATH_MSG_DEBUG("Found SCT detector manager");
   }
   
   // Process jobOption properties
   m_sc = processProperties();
   if (m_sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to process jobOpt properties" << endmsg;
+    ATH_MSG_ERROR("Failed to process jobOpt properties");
     return StatusCode::FAILURE;
-  }
-  else {
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Processed jobOpt properties" << endmsg;
+  } else {
+    ATH_MSG_DEBUG("Processed jobOpt properties");
   }
 
   // Get the SCT_ReadCaliDataSvc
   m_sc = m_ReadCalibDataSvc.retrieve();
   if (m_sc.isFailure()) {
-    msg(MSG::FATAL) << "Cannot locate CalibData service" << endmsg;
+    ATH_MSG_FATAL("Cannot locate CalibData service");
     return StatusCode::FAILURE;
-  }
-  else {
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "CalibData Service located " << endmsg;
+  } else {
+    ATH_MSG_DEBUG( "CalibData Service located ");
   }
 
   // Retrieve SCT Cabling service
   m_sc = m_cabling.retrieve();
-  if (m_sc.isFailure()) {  
-    msg(MSG:: ERROR)<< "Failed to retrieve SCT cabling service" << endmsg;
+  if (m_sc.isFailure()) {
+    ATH_MSG_ERROR("Failed to retrieve SCT cabling service");
     return StatusCode::FAILURE;
   }
 
-  ATH_CHECK( m_currentEventKey.initialize() );
+  ATH_CHECK(m_currentEventKey.initialize());
 
   return StatusCode::SUCCESS;
 } // SCT_ReadCalibDataTestAlg::initialize()
@@ -111,25 +106,25 @@ StatusCode SCT_ReadCalibDataTestAlg::initialize()
 StatusCode SCT_ReadCalibDataTestAlg::processProperties()
 {
   // Print where you are
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in processProperties()" << endmsg;
+  ATH_MSG_DEBUG("in processProperties()");
   
   // Get module position from jobOpt property
-  std::vector<int>::const_iterator itLoop = m_moduleOfflinePosition.value().begin();
-  int offlineBarrelEC  = (*itLoop); ++itLoop;
-  int offlineLayerDisk = (*itLoop); ++itLoop;
-  int offlineEta       = (*itLoop); ++itLoop;
-  int offlinePhi       = (*itLoop); ++itLoop;
-  int offlineSide      = (*itLoop); ++itLoop;
-  int offlineStrip     = (*itLoop); ++itLoop;
+  std::vector<int>::const_iterator itLoop{m_moduleOfflinePosition.value().begin()};
+  int offlineBarrelEC{*itLoop};  ++itLoop;
+  int offlineLayerDisk{*itLoop}; ++itLoop;
+  int offlineEta{*itLoop};       ++itLoop;
+  int offlinePhi{*itLoop};       ++itLoop;
+  int offlineSide{*itLoop};      ++itLoop;
+  int offlineStrip{*itLoop};     ++itLoop;
   
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Module positions from jobOpt property:" << endmsg;
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "B-EC/layer-disk/eta/phi: "
-      << offlineBarrelEC  << "/"
-      << offlineLayerDisk << "/"
-      << offlineEta       << "/"
-      << offlinePhi       << "/"
-      << offlineSide      << "/"
-      << offlineStrip     << endmsg;
+  ATH_MSG_DEBUG("Module positions from jobOpt property:");
+  ATH_MSG_DEBUG("B-EC/layer-disk/eta/phi: "
+		<< offlineBarrelEC  << "/"
+		<< offlineLayerDisk << "/"
+		<< offlineEta       << "/"
+		<< offlinePhi       << "/"
+		<< offlineSide      << "/"
+		<< offlineStrip);
   
   // Create offline Identifier for this module position, wafer,chip and strip
   m_moduleId = m_id_sct->module_id(offlineBarrelEC, offlineLayerDisk, offlinePhi, offlineEta);
@@ -137,11 +132,11 @@ StatusCode SCT_ReadCalibDataTestAlg::processProperties()
   m_stripId = m_id_sct->strip_id(offlineBarrelEC, offlineLayerDisk, offlinePhi, offlineEta, offlineSide, offlineStrip);
 
   // Debug output
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "id-getString : " << m_moduleId.getString() << endmsg;   // hex format
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "id-getCompact: " << m_moduleId.get_compact() << endmsg; // dec format
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "id-getCompact2: " << m_stripId.get_compact() << endmsg; // dec format
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Module Id: " << m_id_sct->print_to_string(m_moduleId) << endmsg;
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Strip Id: " << m_id_sct->print_to_string(m_stripId) << endmsg;
+  ATH_MSG_DEBUG("id-getString : " << m_moduleId.getString());   // hex format
+  ATH_MSG_DEBUG("id-getCompact: " << m_moduleId.get_compact()); // dec format
+  ATH_MSG_DEBUG("id-getCompact2: " << m_stripId.get_compact()); // dec format
+  ATH_MSG_DEBUG("Module Id: " << m_id_sct->print_to_string(m_moduleId));
+  ATH_MSG_DEBUG("Strip Id: " << m_id_sct->print_to_string(m_stripId));
   
   return StatusCode::SUCCESS;
 } // SCT_ReadCalibDataTestAlg::processProperties()
@@ -153,67 +148,65 @@ StatusCode SCT_ReadCalibDataTestAlg::execute()
   // so the INFO level messages have no impact on performance of these services when used by clients
   
   // Print where you are
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in execute()" << endmsg;
+  ATH_MSG_DEBUG("in execute()");
   
   // Get the current event
-  SG::ReadHandle<xAOD::EventInfo> currentEvent(m_currentEventKey);
-  if ( not currentEvent.isValid() ) {
-    msg(MSG::ERROR) << "Could not get event info" << endmsg;
+  SG::ReadHandle<xAOD::EventInfo> currentEvent{m_currentEventKey};
+  if (not currentEvent.isValid() ) {
+    ATH_MSG_ERROR("Could not get event info");
     return StatusCode::FAILURE;
   }
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Current Run.Event,Time: "
+  ATH_MSG_DEBUG("Current Run.Event,Time: "
       << "[" << currentEvent->runNumber()
       << "." << currentEvent->eventNumber()
       << "," << currentEvent->timeStamp()
-      << "]" << endmsg;
+      << "]");
   
   //Make sure data was filled
   bool CalibDataFilled = m_ReadCalibDataSvc->filled();  
-  if( CalibDataFilled ){
+  if (CalibDataFilled) {
     
     //Test ConditionsSummary
     if (m_doTestmyConditionsSummary) {
       // Test summmary, ask status of strip in module
-      Identifier IdM = m_moduleId;
-      Identifier IdS = m_stripId;
-      bool Sok = m_ReadCalibDataSvc->isGood(IdS, InDetConditions::SCT_STRIP);
-      msg(MSG::INFO) << "Strip " << IdS << " on module " << IdM << " is " << (Sok?"good":"bad") << endmsg;
+      Identifier IdM{m_moduleId};
+      Identifier IdS{m_stripId};
+      bool Sok{m_ReadCalibDataSvc->isGood(IdS, InDetConditions::SCT_STRIP)};
+      ATH_MSG_INFO("Strip " << IdS << " on module " << IdM << " is " << (Sok?"good":"bad"));
     }
   }
 
   // Loop over all strips and check if good or not using isGood, and print the bad ones
-  if (m_doTestmyDefectIsGood){
-    int ngood=0;
-    int nbad=0;
+  if (m_doTestmyDefectIsGood) {
+    int ngood{0};
+    int nbad{0};
     //Loop over all wafers using hashIds from the cabling service
     std::vector<boost::uint32_t> listOfRODs;
     m_cabling->getAllRods(listOfRODs);
-    //for ( unsigned int it(0); it<100;it++){ // For CPU time gain study
-    std::vector<boost::uint32_t>::iterator rodIter = listOfRODs.begin();
-    std::vector<boost::uint32_t>::iterator rodEnd = listOfRODs.end();
+    std::vector<boost::uint32_t>::iterator rodIter{listOfRODs.begin()};
+    std::vector<boost::uint32_t>::iterator rodEnd{listOfRODs.end()};
     for (; rodIter != rodEnd; ++rodIter) {
       std::vector<IdentifierHash> listOfHashes;
-      m_cabling->getHashesForRod(listOfHashes,*rodIter);
-      std::vector<IdentifierHash>::iterator hashIt = listOfHashes.begin();
-      std::vector<IdentifierHash>::iterator hashEnd = listOfHashes.end();
+      m_cabling->getHashesForRod(listOfHashes, *rodIter);
+      std::vector<IdentifierHash>::iterator hashIt{listOfHashes.begin()};
+      std::vector<IdentifierHash>::iterator hashEnd{listOfHashes.end()};
       for (; hashIt != hashEnd; ++hashIt) {
-        Identifier waferId = m_id_sct->wafer_id(*hashIt); 
+        Identifier waferId{m_id_sct->wafer_id(*hashIt)};
         //loop over all strips and check if good or not
-        for ( unsigned int stripIndex=0; stripIndex!=768; ++stripIndex){
-          Identifier IdS = m_id_sct->strip_id(waferId,stripIndex);
-          const unsigned int stripId = m_id_sct->strip(IdS);
-          const int side = m_id_sct->side(IdS);
-          const bool stripOk = m_ReadCalibDataSvc->isGood(IdS, InDetConditions::SCT_STRIP);
-          if ( stripOk) ++ngood;
-           else ++nbad; 
-          if ( !stripOk ){ // Print info on all bad strips
-            std::cout << "ModuleId/side/strip: " << m_id_sct->module_id(waferId) << "/" << side << "/" << stripId<< " is bad" << std::endl;
+        for (unsigned int stripIndex{0}; stripIndex<768; ++stripIndex) {
+          Identifier IdS{m_id_sct->strip_id(waferId,stripIndex)};
+          const int stripId{m_id_sct->strip(IdS)};
+          const int side{m_id_sct->side(IdS)};
+          const bool stripOk{m_ReadCalibDataSvc->isGood(IdS, InDetConditions::SCT_STRIP)};
+          if (stripOk) ++ngood;
+	  else ++nbad; 
+          if (not stripOk) { // Print info on all bad strips
+            ATH_MSG_INFO("ModuleId/side/strip: " << m_id_sct->module_id(waferId) << "/" << side << "/" << stripId << " is bad");
           }
         }
       }
-      //}
     }
-    std::cout << "Number of good strips: " << ngood << " number of bad strips: " << nbad << std::endl;
+    ATH_MSG_INFO("Number of good strips: " << ngood << " number of bad strips: " << nbad);
   }
                
   return StatusCode::SUCCESS;
@@ -223,10 +216,9 @@ StatusCode SCT_ReadCalibDataTestAlg::execute()
 StatusCode SCT_ReadCalibDataTestAlg::finalize()
 {
   // Print where you are
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in finalize()" << endmsg;
+  ATH_MSG_DEBUG("in finalize()");
   
   return StatusCode::SUCCESS;
 } // SCT_ReadCalibDataTestAlg::finalize()
 
 //----------------------------------------------------------------------
-
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataTestAlg.h
index d17b44a5c785e249bb7ec8f620e5de3e028373c5..5c003033a7f09305856814312bc122dab6127cd2 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataTestAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadCalibDataTestAlg.h
@@ -29,11 +29,9 @@
 
 // Forward declarations
 class ISvcLocator;
-class StatusCode;
 class ISCT_ReadCalibDataSvc;
 class SCT_ID;
 class ISCT_CablingSvc;
-class ISCT_ConditionsSvc;
 
 /** This class acts as a test/sample client to the SCT_ReadSCalibDataSvc class.*/
 class SCT_ReadCalibDataTestAlg:public AthAlgorithm 
@@ -41,19 +39,19 @@ class SCT_ReadCalibDataTestAlg:public AthAlgorithm
  public:
   //----------Public Member Functions----------//
   // Structors
-  SCT_ReadCalibDataTestAlg (const std::string& name, ISvcLocator* pSvcLocator); //!< Constructor
-  ~SCT_ReadCalibDataTestAlg();                                                  //!< Destructor
+  SCT_ReadCalibDataTestAlg(const std::string& name, ISvcLocator* pSvcLocator); //!< Constructor
+  ~SCT_ReadCalibDataTestAlg();                                                 //!< Destructor
   
   // Standard Gaudi functions
   StatusCode initialize(); //!< Gaudi initialiser
   StatusCode execute();    //!< Gaudi executer
   StatusCode finalize();   //!< Gaudi finaliser
   
-  private:
+ private:
   //----------Private Member Functions----------//
   StatusCode processProperties();             //!< Process jobOpt properties
   
-//----------Private Attributes----------//
+  //----------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
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadoutTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadoutTestAlg.h
index a9811c74f419a2c4ae2956d9d7346d1f6207a10c..fd22450e08dd2b168f4be3f8adcc42abb1d1ff9f 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadoutTestAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_ReadoutTestAlg.h
@@ -45,7 +45,7 @@ class SCT_ReadoutTestAlg : public AthAlgorithm {
   StatusCode                          finalize();
    
  private:
-  ToolHandle<ISCT_ReadoutTool>        m_readout;      //!< Handle to the SCT_ReadoutTool
+  ToolHandle<ISCT_ReadoutTool>        m_readout{this, "SCT_ReadoutTool", "SCT_ReadoutTool", "Handle to the SCT_ReadoutTool"};      //!< Handle to the SCT_ReadoutTool
   std::vector<SCT_Chip*>              m_chips;        //!< List of chips for that module
   std::vector<std::string>            m_chipConfigs;  //!< The configuration of the chips in that module (from job options)
   int                                 m_moduleId;     //!< The Module identifier (from job options)
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SensorsSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SensorsSvc.cxx
index d55211f57944eeb456cf0bb00741045a486e82df..74c713f2a80dc03fa953b43ca65323dafaa42d68 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SensorsSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SensorsSvc.cxx
@@ -20,11 +20,10 @@ const std::string sensorsFolderName("/SCT/Sensors");
 SCT_SensorsSvc::SCT_SensorsSvc( const std::string& name, ISvcLocator* pSvcLocator ):
   AthService(name, pSvcLocator),
   m_detStore("DetectorStore",name),
-  m_sensorsManufacturer{nullptr}{
+  m_sensorsManufacturer{} {
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 StatusCode SCT_SensorsSvc::initialize(){
-  m_sensorsManufacturer = new std::map<CondAttrListCollection::ChanNum, std::string >;
   // Retrieve detector store
   if (m_detStore.retrieve().isFailure())  return msg(MSG:: FATAL)<< "Detector service is not found!" << endmsg, StatusCode::FAILURE;
   // Register callback function
@@ -61,12 +60,12 @@ void SCT_SensorsSvc::getSensorsData(std::vector<std::string> & userVector){
 
 std::string SCT_SensorsSvc::getManufacturer(unsigned int i){
   std::string manufacturer="";
-  manufacturer = (*m_sensorsManufacturer)[i];
+  manufacturer = m_sensorsManufacturer[i];
   return manufacturer;
 }
 
 void SCT_SensorsSvc::printManufacturers() {
-  for(auto it: *m_sensorsManufacturer) {
+  for(auto it: m_sensorsManufacturer) {
     ATH_MSG_INFO("channel " << it.first << " manufacturer " << it.second);
   }
 }
@@ -81,7 +80,7 @@ StatusCode SCT_SensorsSvc::fillSensorsData(int& /* i */ , std::list<std::string>
   for(sensorsData_itr = m_sensorsData->begin(); sensorsData_itr!= m_sensorsData->end(); ++sensorsData_itr)
     {
       CondAttrListCollection::ChanNum  channelNumber=sensorsData_itr->first;
-      (*m_sensorsManufacturer)[channelNumber] = sensorsData_itr->second[0].data<std::string>();
+      m_sensorsManufacturer[channelNumber] = sensorsData_itr->second[0].data<std::string>();
     }
 
   return StatusCode::SUCCESS;
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SensorsSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SensorsSvc.h
index 862fede4223a9926e90116d09a85da9816f072e7..d21529677ce4116fea9ce38981c8629a83eeace4 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SensorsSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SensorsSvc.h
@@ -69,7 +69,7 @@ private:
   const DataHandle<CondAttrListCollection> m_sensorsData;
   std::vector<std::string> m_sensorsValues;
 
-  std::map<CondAttrListCollection::ChanNum, std::string >* m_sensorsManufacturer;
+  std::map<CondAttrListCollection::ChanNum, std::string> m_sensorsManufacturer;
 };
 
 inline const InterfaceID & SCT_SensorsSvc::interfaceID(){
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SiliconConditionsSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SiliconConditionsSvc.cxx
index 6fc91b0b6f13d3ed6ad46496301367fa8fe31ed1..8410ee16fddde969f0611f9cf4fe9e923d7a3838 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SiliconConditionsSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_SiliconConditionsSvc.cxx
@@ -188,7 +188,6 @@ SCT_SiliconConditionsSvc::setConditionsFromGeoModel()
     msg(MSG::ERROR) << "Could not locate GeoModelSvc" << endmsg;
     return false;
   }
-  m_rdbSvc->connect();
   DecodeVersionKey versionKey(&*m_geoModelSvc, "SCT");
   ATH_MSG_DEBUG( "Checking GeoModel Version Tag: "<<  versionKey.tag() << " at Node: " << versionKey.node() );
 
@@ -214,8 +213,6 @@ SCT_SiliconConditionsSvc::setConditionsFromGeoModel()
     conditionsPresent = true; 
   }
 
-  m_rdbSvc->disconnect();
-
   return (!useCondDB && conditionsPresent);
 
 }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledCondAlg.cxx
index dff3acf750e129be43020cd17b1b8d169519c4f3..c46cfa01d1cb4039733957a2509d9d984272eda1 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledCondAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledCondAlg.cxx
@@ -12,14 +12,14 @@
 
 SCT_TdaqEnabledCondAlg::SCT_TdaqEnabledCondAlg(const std::string& name, ISvcLocator* pSvcLocator)
   : ::AthAlgorithm(name, pSvcLocator)
-  , m_readKey("/TDAQ/Resources/ATLAS/SCT/Robins")
-  , m_writeKey("SCT_TdaqEnabledCondData", "SCT_TdaqEnabledCondData")
-  , m_condSvc("CondSvc", name)
-  , m_cablingSvc("SCT_CablingSvc", name)
+  , m_readKey{"/TDAQ/Resources/ATLAS/SCT/Robins"}
+  , m_writeKey{"SCT_TdaqEnabledCondData", "SCT_TdaqEnabledCondData"}
+  , m_condSvc{"CondSvc", name}
+  , m_cablingSvc{"SCT_CablingSvc", name}
 {
-  declareProperty("ReadKey", m_readKey);
-  declareProperty("WriteKey", m_writeKey);
-  declareProperty("EventInfoKey", m_eventInfoKey=std::string("ByteStreamEventInfo"));
+  declareProperty("ReadKey", m_readKey, "Key of input (raw) conditions folder");
+  declareProperty("WriteKey", m_writeKey, "Key of output (derived) conditions folder");
+  declareProperty("EventInfoKey", m_eventInfoKey=std::string{"ByteStreamEventInfo"}, "Key of non-xAOD EventInfo");
 }
 
 SCT_TdaqEnabledCondAlg::~SCT_TdaqEnabledCondAlg()
@@ -71,7 +71,7 @@ StatusCode SCT_TdaqEnabledCondAlg::execute()
   }
 
   // Construct the output Cond Object and fill it in
-  SCT_TdaqEnabledCondData* writeCdo = new SCT_TdaqEnabledCondData();
+  SCT_TdaqEnabledCondData* writeCdo{new SCT_TdaqEnabledCondData()};
   // clear structures before filling
   writeCdo->clear();
 
@@ -80,9 +80,9 @@ StatusCode SCT_TdaqEnabledCondAlg::execute()
 
   // check whether we expect valid data at this time
   if(unfilledRun()) {
-    EventIDBase unfilledStart(0, 0, 0, 0); // run 0, event 0, timestamp 0, timestamp_ns 0
-    EventIDBase unfilledStop(s_earliestRunForFolder, 0, s_earliestTimeStampForFolder, 0); // run 119253, event 0, timestamp 1245064619, timestamp_ns 0
-    EventIDRange unfilledRange(unfilledStart, unfilledStop);
+    EventIDBase unfilledStart{0, 0, 0, 0}; // run 0, event 0, timestamp 0, timestamp_ns 0
+    EventIDBase unfilledStop{s_earliestRunForFolder, 0, s_earliestTimeStampForFolder, 0}; // run 119253, event 0, timestamp 1245064619, timestamp_ns 0
+    EventIDRange unfilledRange{unfilledStart, unfilledStop};
     rangeW = unfilledRange;
     writeCdo->setNoneBad(true);
     writeCdo->setFilled(true);
@@ -97,16 +97,16 @@ StatusCode SCT_TdaqEnabledCondAlg::execute()
 
     ATH_MSG_INFO("Size of CondAttrListCollection readCdo->size()= " << readCdo->size());
 
-    CondAttrListCollection::const_iterator attrList(readCdo->begin());
-    CondAttrListCollection::const_iterator end(readCdo->end());
+    CondAttrListCollection::const_iterator attrList{readCdo->begin()};
+    CondAttrListCollection::const_iterator end{readCdo->end()};
     // CondAttrListCollection doesnt support C++11 type loops, no generic 'begin'
     for(; attrList!=end; ++attrList) {
       // A CondAttrListCollection is a map of ChanNum and AttributeList
-      CondAttrListCollection::ChanNum channelNumber = attrList->first;
-      CondAttrListCollection::AttributeList payload = attrList->second;
-      std::string enabled = payload["class"].data<std::string>();
-      std::string chanName = readCdo->chanName(channelNumber);
-      unsigned int rodNumber = parseChannelName(chanName);
+      CondAttrListCollection::ChanNum channelNumber{attrList->first};
+      CondAttrListCollection::AttributeList payload{attrList->second};
+      std::string enabled{payload["class"].data<std::string>()};
+      std::string chanName{readCdo->chanName(channelNumber)};
+      unsigned int rodNumber{parseChannelName(chanName)};
       // range check on the rod channel number has been removed, since it refers both to existing channel names
       // which can be rods in slots 1-128 but also historical names which have since been removed
       if(SCT_OnlineId::rodIdInRange(rodNumber)) {
@@ -124,8 +124,8 @@ StatusCode SCT_TdaqEnabledCondAlg::execute()
       return StatusCode::FAILURE;
     }
     
-    unsigned int nBad = s_NRODS-writeCdo->getGoodRods().size();
-    std::string howMany = inWords(nBad);
+    long unsigned int nBad{s_NRODS-writeCdo->getGoodRods().size()};
+    std::string howMany{inWords(nBad)};
     ATH_MSG_DEBUG(howMany << " declared bad in the database.");
     
     // provide short-cut for no rods bad (hopefully the most common case)
@@ -135,7 +135,7 @@ StatusCode SCT_TdaqEnabledCondAlg::execute()
     } else {
       // now find the modules which belong to those rods...
       //      const int modulesPerRod(48);
-      std::vector<IdentifierHash> tmpIdVec(0);
+      std::vector<IdentifierHash> tmpIdVec{0};
       tmpIdVec.reserve(s_modulesPerRod);
       for(const auto & thisRod : writeCdo->getGoodRods()) {
 	tmpIdVec.clear();
@@ -169,10 +169,10 @@ StatusCode SCT_TdaqEnabledCondAlg::finalize()
 }
 
 bool SCT_TdaqEnabledCondAlg::unfilledRun() const {
-  SG::ReadHandle<EventInfo> event(m_eventInfoKey);
+  SG::ReadHandle<EventInfo> event{m_eventInfoKey};
   if (event.isValid()) {
-    const unsigned int runNumber=event->event_ID()->run_number();
-    const bool noDataExpected=(runNumber < s_earliestRunForFolder);
+    const unsigned int runNumber{event->event_ID()->run_number()};
+    const bool noDataExpected{runNumber < s_earliestRunForFolder};
     if (noDataExpected) ATH_MSG_INFO("This run occurred before the /TDAQ/EnabledResources/ATLAS/SCT/Robins folder was filled in COOL; assuming the SCT is all ok.");
     return noDataExpected;
   }
@@ -183,11 +183,11 @@ bool SCT_TdaqEnabledCondAlg::unfilledRun() const {
 //parse a rod channel name to a rod number, names are of the format 'ROL-SCT-BA-00-210000'
 //October 2014: names can now also be of format 'ROL-SCT-B-00-210100'
 unsigned int SCT_TdaqEnabledCondAlg::parseChannelName(const std::string &chanNameString) const {
-  unsigned int result(0);
-  const unsigned int length=chanNameString.size();
+  unsigned int result{0};
+  const long unsigned int length{chanNameString.size()};
   if (length < 19) return result; //very rough check on sanity of string, should use regex
   //get the last six numbers, these are in hex  
-  std::istringstream iss(chanNameString.substr(length-6, 6));
+  std::istringstream iss{chanNameString.substr(length-6, 6)};
   iss.exceptions(std::ios_base::badbit|std::ios_base::failbit);
   try{
     iss>>std::hex>>result;
@@ -212,7 +212,7 @@ std::string SCT_TdaqEnabledCondAlg::inWords(const unsigned int aNumber) const {
   }
 }
 
-const unsigned int SCT_TdaqEnabledCondAlg::s_NRODS(128);
-const unsigned int SCT_TdaqEnabledCondAlg::s_modulesPerRod(48);
-const unsigned int SCT_TdaqEnabledCondAlg::s_earliestRunForFolder(119253);
-const unsigned int SCT_TdaqEnabledCondAlg::s_earliestTimeStampForFolder(1245064619); // 20090615T111659 UTC for run 119253
+const unsigned int SCT_TdaqEnabledCondAlg::s_NRODS{128};
+const unsigned int SCT_TdaqEnabledCondAlg::s_modulesPerRod{48};
+const unsigned int SCT_TdaqEnabledCondAlg::s_earliestRunForFolder{119253};
+const unsigned int SCT_TdaqEnabledCondAlg::s_earliestTimeStampForFolder{1245064619}; // 20090615T111659 UTC for run 119253
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledCondAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledCondAlg.h
index 87c66209ed69003af01b99f99becee3f55cbff09..edba1732e537790c6c82c490db0508cb57acdfab 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledCondAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledCondAlg.h
@@ -31,7 +31,7 @@ class SCT_TdaqEnabledCondAlg : public AthAlgorithm
   SG::WriteCondHandleKey<SCT_TdaqEnabledCondData> m_writeKey;
   SG::ReadHandleKey<EventInfo> m_eventInfoKey;
   ServiceHandle<ICondSvc> m_condSvc; 
-  ServiceHandle<ISCT_CablingSvc>        m_cablingSvc;                    //!< Handle on SCT cabling service
+  ServiceHandle<ISCT_CablingSvc> m_cablingSvc; //!< Handle on SCT cabling service
 
   unsigned int parseChannelName(const std::string &chanNameString) const;
   std::string inWords(const unsigned int aNumber) const;
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledSvc.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledSvc.cxx
index 2043ec435b781fa14079a740dc94a92503bf292b..9ab11c470872188df10da38f1603be9a174eaf0f 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledSvc.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledSvc.cxx
@@ -11,13 +11,9 @@
 #include "SCT_TdaqEnabledSvc.h"
 
 //STL includes
-#include <vector>
-#include <list>
-#include <algorithm>
-#include <sstream>
 #include <iterator>
-#include "boost/array.hpp"
 #include <iostream>
+
 //Use Event info to determine whether folder is expetd to have valid data
 #include "EventInfo/EventID.h"
 #include "EventInfo/EventInfo.h"
@@ -37,19 +33,19 @@
 
 // Constructor
 SCT_TdaqEnabledSvc::SCT_TdaqEnabledSvc( const std::string& name, ISvcLocator* pSvcLocator ) : AthService(name, pSvcLocator), 
-m_data{nullptr},
+m_condData{nullptr},
 m_pHelper{nullptr},
-m_useDatabase(true), m_detStore("DetectorStore",name),
-m_condKey(std::string("SCT_TdaqEnabledCondData"))
+m_useDatabase{true},
+m_detStore{"DetectorStore", name},
+m_condKey{std::string{"SCT_TdaqEnabledCondData"}}
 {
-  //declareProperty("BadRodIdentifiers",m_badElements);
-  declareProperty("EventInfoKey", m_eventInfoKey=std::string("ByteStreamEventInfo"));
+  declareProperty("EventInfoKey", m_eventInfoKey=std::string{"ByteStreamEventInfo"});
 }
 
 //Initialize
 StatusCode 
 SCT_TdaqEnabledSvc::initialize(){
-  const std::string databaseUseString(m_useDatabase?"":"not ");
+  const std::string databaseUseString{m_useDatabase?"":"not "};
   ATH_MSG_INFO(" Database will "<<databaseUseString<<"be used.");
 
   ATH_CHECK(m_detStore->retrieve(m_pHelper,"SCT_ID"));
@@ -64,8 +60,7 @@ SCT_TdaqEnabledSvc::initialize(){
 //Finalize
 StatusCode
 SCT_TdaqEnabledSvc::finalize(){
-  StatusCode sc(StatusCode::SUCCESS);
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 // From s.binet
@@ -75,9 +70,8 @@ SCT_TdaqEnabledSvc::finalize(){
 //   Return: StatusCode indicating SUCCESS or FAILURE.
 // N.B. Don't forget to release the interface after use!!!
 StatusCode 
-SCT_TdaqEnabledSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) 
-{
-  if ( ISCT_ConditionsSvc::interfaceID().versionMatch(riid) ) {
+SCT_TdaqEnabledSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
+  if(ISCT_ConditionsSvc::interfaceID().versionMatch(riid)) {
     *ppvInterface = dynamic_cast<ISCT_ConditionsSvc*>(this);
   } else {
     // Interface is not directly available : try out a base class
@@ -88,44 +82,44 @@ SCT_TdaqEnabledSvc::queryInterface(const InterfaceID& riid, void** ppvInterface)
 }
 
 bool 
-SCT_TdaqEnabledSvc::canReportAbout(InDetConditions::Hierarchy h){
+SCT_TdaqEnabledSvc::canReportAbout(InDetConditions::Hierarchy h) {
   return (h==InDetConditions::DEFAULT or h==InDetConditions::SCT_SIDE or h==InDetConditions::SCT_MODULE); 
 }
 
 bool 
-SCT_TdaqEnabledSvc::isGood(const Identifier & elementId, InDetConditions::Hierarchy h){
-  if (not canReportAbout(h)) return true;
+SCT_TdaqEnabledSvc::isGood(const Identifier & elementId, InDetConditions::Hierarchy h) {
+  if(not canReportAbout(h)) return true;
   //turn to hash, given the identifier
-  const IdentifierHash hashId=m_pHelper->wafer_hash(elementId);
+  const IdentifierHash hashId{m_pHelper->wafer_hash(elementId)};
   return isGood(hashId);
 }
 
 bool 
-SCT_TdaqEnabledSvc::isGood(const IdentifierHash & hashId){
+SCT_TdaqEnabledSvc::isGood(const IdentifierHash & hashId) {
   if(not getCondData()) return false;
-  return m_data->isGood(hashId);
+  return m_condData->isGood(hashId);
 }
 
 bool 
-SCT_TdaqEnabledSvc::canFillDuringInitialize(){
+SCT_TdaqEnabledSvc::canFillDuringInitialize() {
   return (not m_useDatabase);// can only fill during intialize if we don't use the database
 }
 
 bool
-SCT_TdaqEnabledSvc::filled() const{
+SCT_TdaqEnabledSvc::filled() const {
   if(not getCondData()) return false;
-  return m_data->isFilled();
+  return m_condData->isFilled();
 }
 
 bool
 SCT_TdaqEnabledSvc::getCondData() const {
-  if(!m_data) {
-    SG::ReadCondHandle<SCT_TdaqEnabledCondData> data(m_condKey);
-    if((not data.isValid()) or !(*data)) {
+  if(!m_condData) {
+    SG::ReadCondHandle<SCT_TdaqEnabledCondData> condData{m_condKey};
+    if((not condData.isValid()) or !(*condData)) {
       ATH_MSG_ERROR("Failed to get " << m_condKey.key());
       return false;
     }
-    m_data = *data;
+    m_condData = *condData;
   }
   return true;
 }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledSvc.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledSvc.h
index ac6caded4bbfc7bff9ac198179fbe42909a1bb33..4377134ab17633729d94fc42e9a47693542dcd04 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledSvc.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledSvc.h
@@ -77,8 +77,7 @@ public:
    virtual bool canFillDuringInitialize();
   
 private:
-   //   static const unsigned int NRODS; //!< This was 90 in run 1; changed to 128 on Oct 22, 2014
-   const mutable SCT_TdaqEnabledCondData *m_data;
+   mutable const SCT_TdaqEnabledCondData *m_condData;
   
    const SCT_ID * m_pHelper;
    bool m_useDatabase;
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledTestAlg.cxx
index c4e8ff28ac90f8e0136d14f97b3c8ea155a86096..b9a0f9cedef8e38af0e17bc9468440485871f091 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledTestAlg.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledTestAlg.cxx
@@ -13,7 +13,6 @@
 
 #include "SCT_TdaqEnabledTestAlg.h"
 
-
 //Gaudi includes
 #include "GaudiKernel/StatusCode.h"
 
@@ -23,71 +22,67 @@
 //local includes
 #include "SCT_TdaqEnabledSvc.h"
 
-SCT_TdaqEnabledTestAlg::SCT_TdaqEnabledTestAlg( 
-                         const std::string& name, 
-                         ISvcLocator* pSvcLocator ) : 
-                         AthAlgorithm( name, pSvcLocator ), m_pTdaqEnabledSvc("SCT_TdaqEnabledSvc",name){
-                           //nop
+SCT_TdaqEnabledTestAlg::SCT_TdaqEnabledTestAlg(const std::string& name, ISvcLocator* pSvcLocator) : 
+  AthAlgorithm(name, pSvcLocator),
+  m_pTdaqEnabledSvc{"SCT_TdaqEnabledSvc", name} {
+  //nop
 }
 
 SCT_TdaqEnabledTestAlg::~SCT_TdaqEnabledTestAlg()
 { 
-  msg(MSG::INFO) << "Calling destructor" << endmsg;
+  ATH_MSG_INFO("Calling destructor");
 }
 
 //Initialize
-StatusCode 
-SCT_TdaqEnabledTestAlg::initialize(){
-  StatusCode sc(StatusCode::SUCCESS);
-  msg(MSG::INFO) << "Calling initialize" << endmsg;
+StatusCode
+SCT_TdaqEnabledTestAlg::initialize() {
+  StatusCode sc{StatusCode::SUCCESS, true};
+  ATH_MSG_INFO("Calling initialize");
   sc = m_pTdaqEnabledSvc.retrieve();
   if (StatusCode::SUCCESS not_eq sc) {
-    msg(MSG::ERROR)<<"Could not retrieve the veto service"<<endmsg;
+    ATH_MSG_ERROR("Could not retrieve the veto service");
   }
   return sc;
 }
 
 //Execute
 StatusCode 
-SCT_TdaqEnabledTestAlg::execute(){
+SCT_TdaqEnabledTestAlg::execute() {
   //This method is only used to test the summary service, and only used within this package,
   // so the INFO level messages have no impact on performance of these services when used by clients
-  StatusCode sc(StatusCode::SUCCESS);
-  msg(MSG::INFO) << "Calling execute" << endmsg;
-  msg(MSG::INFO) <<"Dummy call to module idHash 0: module is "<<endmsg;
-  bool result=m_pTdaqEnabledSvc->isGood(IdentifierHash(0));
-  msg(MSG::INFO) << (result?"good":"bad") << endmsg;
-  msg(MSG::INFO) <<"Dummy call to module Identifier 1: module is "<<endmsg;
-  result=m_pTdaqEnabledSvc->isGood(Identifier(1));
-  msg(MSG::INFO) << (result?"good":"bad") << endmsg;
-  msg(MSG::INFO) << "Using Identifier Hash method: with number 2137 "<<endmsg;
-  result=m_pTdaqEnabledSvc->isGood(IdentifierHash(2137));
-  msg(MSG::INFO) << (result?"good":"bad") << endmsg;
-  msg(MSG::INFO) <<"Dummy call to module idHash 3: module is "<<endmsg;
-  result=m_pTdaqEnabledSvc->isGood(IdentifierHash(3));
-   msg(MSG::INFO) << (result?"good":"bad") << endmsg;
-   unsigned int printNbad(10),printNgood(10);
-   msg(MSG::INFO)<<"Printing the first "<<printNbad<<" bad modules, and the first "<<printNgood<<" good modules."<<endmsg;
-   for (int i(0);i!=8176;++i){
-     IdentifierHash idh(i);
-     if ( printNbad and (not  m_pTdaqEnabledSvc->isGood(idh)) ){
-        msg(MSG::INFO) <<i<<" is bad."<<endmsg;
-        --printNbad;
-      }
-      if ( printNgood and m_pTdaqEnabledSvc->isGood(idh) ){
-          msg(MSG::INFO) <<i<<" is good."<<endmsg;
-          --printNgood;
-        }
+  StatusCode sc{StatusCode::SUCCESS, true};
+  ATH_MSG_INFO("Calling execute");
+  ATH_MSG_INFO("Dummy call to module idHash 0: module is ");
+  bool result{m_pTdaqEnabledSvc->isGood(IdentifierHash{0})};
+  ATH_MSG_INFO((result ? "good" : "bad"));
+  ATH_MSG_INFO("Dummy call to module Identifier 1: module is ");
+  result=m_pTdaqEnabledSvc->isGood(Identifier{1});
+  ATH_MSG_INFO((result ? "good" : "bad"));
+  ATH_MSG_INFO("Using Identifier Hash method: with number 2137 ");
+  result=m_pTdaqEnabledSvc->isGood(IdentifierHash{2137});
+  ATH_MSG_INFO((result ? "good" : "bad"));
+  ATH_MSG_INFO("Dummy call to module idHash 3: module is ");
+  result=m_pTdaqEnabledSvc->isGood(IdentifierHash{3});
+  ATH_MSG_INFO((result ? "good" : "bad"));
+  unsigned int printNbad{10}, printNgood{10};
+  ATH_MSG_INFO("Printing the first " << printNbad << " bad modules, and the first " << printNgood << " good modules.");
+  for (unsigned int i{0}; i<8176; ++i) {
+    IdentifierHash idh{i};
+     if (printNbad and (not m_pTdaqEnabledSvc->isGood(idh))) {
+       ATH_MSG_INFO(i << " is bad.");
+       --printNbad;
+     }
+     if (printNgood and m_pTdaqEnabledSvc->isGood(idh)) {
+       ATH_MSG_INFO(i << " is good.");
+       --printNgood;
+     }
    }
   return sc;
 }
 
-
 //Finalize
 StatusCode
-SCT_TdaqEnabledTestAlg::finalize(){
-  StatusCode sc(StatusCode::SUCCESS);
-  MsgStream log(msgSvc(),name());
-  log << MSG::INFO << "Calling finalize" << endmsg;
-  return sc;
+SCT_TdaqEnabledTestAlg::finalize() {
+  ATH_MSG_INFO("Calling finalize");
+  return StatusCode::SUCCESS;
 }
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledTestAlg.h
index 7863d7eb23859f818ad02e83591133d4f8beb564..f1ecd13c9c9416d475585e3933180062c0b2f13b 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledTestAlg.h
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/SCT_TdaqEnabledTestAlg.h
@@ -26,12 +26,11 @@
 
 //Forward declarations
 class ISvcLocator;
-class StatusCode;
 
 ///Example algorithm to show calling the SCT_ModuleVeto to exclude bad components
 class SCT_TdaqEnabledTestAlg : public AthAlgorithm {
  public:
-  SCT_TdaqEnabledTestAlg(const std::string &name,ISvcLocator *pSvcLocator) ;
+  SCT_TdaqEnabledTestAlg(const std::string& name, ISvcLocator *pSvcLocator);
  ~SCT_TdaqEnabledTestAlg();
 
   StatusCode initialize();
@@ -42,4 +41,4 @@ class SCT_TdaqEnabledTestAlg : public AthAlgorithm {
    ServiceHandle<ISCT_ConditionsSvc> m_pTdaqEnabledSvc;
 }; //end of class
 
-#endif
+#endif // SCT_TdaqEnabledTestAlg_H
diff --git a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/components/SCT_ConditionsServices_entries.cxx b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/components/SCT_ConditionsServices_entries.cxx
index 785c332e9a73f160154789b55eca892e870b7efe..51b16847c3e4b87d35c8a5534d5ab024cebb0b87 100644
--- a/InnerDetector/InDetConditions/SCT_ConditionsServices/src/components/SCT_ConditionsServices_entries.cxx
+++ b/InnerDetector/InDetConditions/SCT_ConditionsServices/src/components/SCT_ConditionsServices_entries.cxx
@@ -12,6 +12,7 @@
 #include "../SCT_ConfigurationConditionsTestAlg.h"
 
 #include "../SCT_MonitorConditionsSvc.h"
+#include "../SCT_MonitorConditionsCondAlg.h"
 #include "../SCT_MonitorConditionsTestAlg.h"
 
 #include "../SCT_FlaggedConditionSvc.h"
@@ -63,6 +64,7 @@ DECLARE_ALGORITHM_FACTORY(SCT_ModuleVetoTestAlg)
 DECLARE_ALGORITHM_FACTORY(SCT_ConditionsSummaryTestAlg)
 DECLARE_ALGORITHM_FACTORY(SCT_CachedSummaryTestAlg)
 DECLARE_ALGORITHM_FACTORY(SCT_DCSConditionsTestAlg)
+DECLARE_ALGORITHM_FACTORY(SCT_MonitorConditionsCondAlg)
 DECLARE_ALGORITHM_FACTORY(SCT_MonitorConditionsTestAlg)
 DECLARE_ALGORITHM_FACTORY(SCT_ReadCalibDataTestAlg)
 DECLARE_ALGORITHM_FACTORY(SCT_ReadCalibChipDataTestAlg)
@@ -129,6 +131,7 @@ DECLARE_ALGORITHM( SCT_RODVetoTestAlg )
   DECLARE_ALGORITHM( SCT_CachedSummaryTestAlg )
 
   DECLARE_ALGORITHM( SCT_DCSConditionsTestAlg )
+  DECLARE_ALGORITHM( SCT_MonitorConditionsCondAlg )
   DECLARE_ALGORITHM( SCT_MonitorConditionsTestAlg )
   DECLARE_ALGORITHM( SCT_ReadCalibDataTestAlg )
   DECLARE_ALGORITHM( SCT_ReadCalibChipDataTestAlg )
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleSvc.h b/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleSvc.h
index 00d5c3e401373a290941dd8e14281e7f1c6e30b4..78588ac948fb4025761afb997036faa530bd514f 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleSvc.h
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/SiLorentzAngleSvc/SiLorentzAngleSvc.h
@@ -139,7 +139,6 @@ private:
   const DataHandle<AthenaAttributeList> m_dbData;
 
   bool m_isPixel;  
-  bool m_magFieldInit;
 
   InDet::SiliconProperties m_siProperties;
   const InDetDD::SiDetectorManager * m_detManager;
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/doc/packagedoc.h b/InnerDetector/InDetConditions/SiLorentzAngleSvc/doc/packagedoc.h
index 55382e88eb39647eda406c63286f66ef1f54c4a1..c83b513489040770ab492c779f9538bd06b398dc 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/doc/packagedoc.h
@@ -107,7 +107,6 @@ or
 @endverbatim
 
 
-@section SiLorentzAngleSvc_SiLorentzAngleSvcReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx
index 29cc3911c7c9021fbfc0e7d53865414b0f3202ea..15768f306e41a589d83e31c055bbfdaa55bbaffd 100644
--- a/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx
+++ b/InnerDetector/InDetConditions/SiLorentzAngleSvc/src/SiLorentzAngleSvc.cxx
@@ -28,7 +28,6 @@ SiLorentzAngleSvc::SiLorentzAngleSvc( const std::string& name, ISvcLocator* pSvc
   m_magFieldSvc("AtlasFieldSvc", name),
   m_detStore("StoreGateSvc/DetectorStore", name),
   m_isPixel(true),
-  m_magFieldInit(false),
   m_detManager(0)
  
 {
@@ -79,19 +78,28 @@ StatusCode SiLorentzAngleSvc::initialize() {
   }
   m_isPixel = (m_detectorName == "Pixel");
  
-  // Get conditions summary service. 
-  CHECK(m_siConditionsSvc.retrieve());
+  // 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->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." );
+  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.
diff --git a/InnerDetector/InDetConditions/SiPropertiesSvc/doc/packagedoc.h b/InnerDetector/InDetConditions/SiPropertiesSvc/doc/packagedoc.h
index 9b315f8d31d885aded61dc975a15461f6c8c1143..84851aef587b6681df6e8bb41f27aa5d1e5e7787 100644
--- a/InnerDetector/InDetConditions/SiPropertiesSvc/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/SiPropertiesSvc/doc/packagedoc.h
@@ -17,7 +17,6 @@ number of electron hole pairs per deposited energy.  Some of these
 are dependent on temperature and voltages which are obtained via the
 appropriate service and updated via a call back.
 
-@section SiPropertiesSvc_SiPropertiesReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/doc/packagedoc.h b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/doc/packagedoc.h
index 4f7f68abcd1c9464ba8a28fe8194c9f7e9236f42..8214a314fb5c7e76fc703412332e6ca8a221ecd8 100644
--- a/InnerDetector/InDetConditions/TRT_ConditionsAlgs/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/TRT_ConditionsAlgs/doc/packagedoc.h
@@ -44,5 +44,3 @@ Example algorithm illustrating use of the TRT_ConditionsSummaryTool from the TRT
   - TRT_ConditionsSummaryExAlg.py   example of use of TRT_ConditionsSummaryTool
 
 */
-
-
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsData/doc/packagedoc.h b/InnerDetector/InDetConditions/TRT_ConditionsData/doc/packagedoc.h
index 7b0070a2cd73de1410266777d6bb44d808b86590..a1bb6b70bfb51af9be6c602619befcde38e15fb1 100644
--- a/InnerDetector/InDetConditions/TRT_ConditionsData/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/TRT_ConditionsData/doc/packagedoc.h
@@ -40,17 +40,13 @@ This package provides TDS objects for storing TRT Conditions data.
   -  TRTWeifloat : DEPRECIATED
   -  TRTStrawStatusData :  A class holding dead/noisy status (to be relaced by TRTCond::StrawStatus)
  
-@ref used_TRT_ConditionsData
 
-@ref requirements_TRT_ConditionsData
 
 */
 /**
-@page used_TRT_ConditionsData Used Packages
 
 
 */
 /**
-@page requirements_TRT_ConditionsData requirements
 
 */
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/doc/packagedoc.h b/InnerDetector/InDetConditions/TRT_ConditionsServices/doc/packagedoc.h
index b4f3dae2a7f0c7dfca6c10f63e2f9327e37b75a4..dc5c1c8783abab96e84e26d82b88fbc06097bed3 100644
--- a/InnerDetector/InDetConditions/TRT_ConditionsServices/doc/packagedoc.h
+++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/doc/packagedoc.h
@@ -150,4 +150,3 @@ Rphi rotations of each end of a straw.
 @section TRT_ConditionsServices_jobOptions jobOptions
 
 */
-
diff --git a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawNeighbourSvc.cxx b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawNeighbourSvc.cxx
index 91695799943d8be51ed9553cdaec97f9e9adc9b2..13b3bfeb9e654be732c656b15392e3491961cff2 100755
--- a/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawNeighbourSvc.cxx
+++ b/InnerDetector/InDetConditions/TRT_ConditionsServices/src/TRT_StrawNeighbourSvc.cxx
@@ -110,8 +110,6 @@ StatusCode TRT_StrawNeighbourSvc::initialize()
     throw GaudiException("Could not initalize RDBAccessSvc","TRT_GeoModel",StatusCode::FAILURE);
   }
   
-  iAccessSvc->connect();
-
   IGeoModelSvc *geoModel;
   result = svcLocator->service ("GeoModelSvc",geoModel);
   if ( result.isFailure()) {
@@ -276,7 +274,6 @@ StatusCode TRT_StrawNeighbourSvc::initialize()
     m_pad_to_straw.push_back(dummy3);
     m_chip_to_straw.push_back(dumdumdum3);
     
-    iAccessSvc->disconnect();
   
 
   ATH_MSG_DEBUG("TRT_StrawNeighbourSvc initialized ");
diff --git a/InnerDetector/InDetCosmics/InDetCosmicsFilters/doc/packagedoc.h b/InnerDetector/InDetCosmics/InDetCosmicsFilters/doc/packagedoc.h
index 06685ebb55770d030858ca2af114beb4f336d48b..4e4377c48b9fccf8f876ef5a4a935a927ffd27b2 100644
--- a/InnerDetector/InDetCosmics/InDetCosmicsFilters/doc/packagedoc.h
+++ b/InnerDetector/InDetCosmics/InDetCosmicsFilters/doc/packagedoc.h
@@ -16,6 +16,5 @@ those events that contain at least one good track in any specified trackcollecti
 @author Christian.Schmitt@cern.ch
 @author Wouter.Hulsbergen@cern.ch
 
-@section InDetCosmicsFilters_requirementsInDetCosmicsFilters Requirements
 
 */
diff --git a/InnerDetector/InDetCosmics/TRT_SegmentsToTrack/doc/packagedoc.h b/InnerDetector/InDetCosmics/TRT_SegmentsToTrack/doc/packagedoc.h
index 2fd80f810bdebe3db5d2d5884dae14a6798a6478..354483f618f3d745f52499dc3f3b63c169bf015f 100644
--- a/InnerDetector/InDetCosmics/TRT_SegmentsToTrack/doc/packagedoc.h
+++ b/InnerDetector/InDetCosmics/TRT_SegmentsToTrack/doc/packagedoc.h
@@ -16,6 +16,5 @@ the eventphase correction and the per wheel t0 correction (TRT endcap).
 
 @author Christian.Schmitt@cern.ch
 
-@section TRT_SegmentsToTrack_requirementsTRT_SegmentsToTrack Requirements
 
 */
diff --git a/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Builder.cxx b/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Builder.cxx
index 2e10d7f0779344c336eeb0b9d4ab60876e1eace9..6182ad749786db607158b9b772e3670ce4343814 100755
--- a/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Builder.cxx
+++ b/InnerDetector/InDetDetDescr/BCM_GeoModel/src/BCM_Builder.cxx
@@ -134,8 +134,7 @@ StatusCode InDetDD::BCM_Builder::build(GeoVPhysVol* pv)
       
       // Print the BCM version tag:
       std::string BCMVersionTag;
-      BCMVersionTag = accessSvc->getChildTag("BCM", versionKey.tag(), versionKey.node(), false);
-      //BCMVersionTag = accessSvc->getChildTag("BCM", "InnerDetector-DC3-Dev", "InnerDetector", false);
+      BCMVersionTag = accessSvc->getChildTag("BCM", versionKey.tag(), versionKey.node());
       ATH_MSG_INFO("BCM Version: " << BCMVersionTag <<  "  Package Version: " << PACKAGE_VERSION);
       
       // Check if version is empty. If so, then the BCM cannot be built. This may or may not be intentional. We just issue an INFO message. 
@@ -146,10 +145,8 @@ StatusCode InDetDD::BCM_Builder::build(GeoVPhysVol* pv)
 	  return StatusCode::SUCCESS; 
      	}
       
-      accessSvc->connect();
       IRDBRecordset_ptr DBmodul = accessSvc->getRecordsetPtr("BCMModule", versionKey.tag(), versionKey.node());
       //DBmodul = accessSvc->getRecordset("BCMModule", "InnerDetector-DC3-Dev", "InnerDetector");
-      accessSvc->disconnect();
       
       ATH_MSG_DEBUG(" --> Number of records fetched = " << DBmodul->size());
       
diff --git a/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Builder.cxx b/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Builder.cxx
index 046ed50123bdd1e6b1a74238053392896693cfe1..419410bd5df303e08c1bdc6777ec1accfb1f8711 100644
--- a/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Builder.cxx
+++ b/InnerDetector/InDetDetDescr/BLM_GeoModel/src/BLM_Builder.cxx
@@ -142,8 +142,7 @@ StatusCode InDetDD::BLM_Builder::build(GeoVPhysVol* pv)
 
       // Print the BLM version tag:
       std::string BLMVersionTag;
-      BLMVersionTag = accessSvc->getChildTag("BLM", versionKey.tag(), versionKey.node(), false);
-      //BLMVersionTag = accessSvc->getChildTag("BLM", "InnerDetector-DC3-Dev", "InnerDetector", false);
+      BLMVersionTag = accessSvc->getChildTag("BLM", versionKey.tag(), versionKey.node());
       ATH_MSG_INFO("BLM Version: " << BLMVersionTag <<  "  Package Version: " << PACKAGE_VERSION);
 
       // Check if version is empty. If so, then the BLM cannot be built. This may or may not be intentional. We just issue an INFO message.
@@ -154,10 +153,8 @@ StatusCode InDetDD::BLM_Builder::build(GeoVPhysVol* pv)
 	  return StatusCode::SUCCESS;
      	}
 
-      accessSvc->connect();
       IRDBRecordset_ptr DBmodul = accessSvc->getRecordsetPtr("BLMModule", versionKey.tag(), versionKey.node());
       //DBmodul = accessSvc->getRecordset("BLMModule", "InnerDetector-DC3-Dev", "InnerDetector");
-      accessSvc->disconnect();
 
       ATH_MSG_DEBUG(" --> Number of records fetched = " << DBmodul->size());
 
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/doc/packagedoc.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/doc/packagedoc.h
index 30536507a5f0333c9aa226f5d8660be1c57f4c7f..6d8518bde0d18c5bf1a679ab5639d5370f98d6eb 100644
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/doc/packagedoc.h
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/doc/packagedoc.h
@@ -65,7 +65,6 @@ normally use.
 The managers are retrieved from storegate. Their names are Pixel, SCT and TRT.
 From the manager, one can get the id helpers and access the detector elements using various methods. 
 
-@section InDetReadoutGeometry_InDetReadoutGeometryReq Requirements
 
 
 
diff --git a/InnerDetector/InDetDetDescr/InDetRegionSelector/doc/packagedoc.h b/InnerDetector/InDetDetDescr/InDetRegionSelector/doc/packagedoc.h
index 24f44e8234af3e5bbc717c939c9c958f0ea0badd..4b3399fc763632c7ac1dcb74b4e743ffbd5194bc 100644
--- a/InnerDetector/InDetDetDescr/InDetRegionSelector/doc/packagedoc.h
+++ b/InnerDetector/InDetDetDescr/InDetRegionSelector/doc/packagedoc.h
@@ -62,7 +62,6 @@ The package contains the two tools:
  - InDetRegionSelectorTable_jobOptions.py: Job option fragment for initializing all tools using genConf. 
    Makes use of DetFlags to control which tables will be created.
 
-@section InDetRegionSelector_InDetRegionSelectorReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ComputeStaveServices.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ComputeStaveServices.h
index f27d70bc2bc11d30eb6ded6d393dd20307bd752f..4868d8df5ddd12d8d7760f23ccdd6438110a0878 100644
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ComputeStaveServices.h
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ComputeStaveServices.h
@@ -11,7 +11,7 @@
 class ComputeStaveServices {
 public:
 
-  ComputeStaveServices(const Athena::MsgStreamMember& msg):m_msg(msg) {}
+  ComputeStaveServices(Athena::MsgStreamMember& msg):m_msg(msg) {}
 
   StaveServices compute( DetType::Type, DetType::Part, int layerNumber, int nModulesPerStave, int nChipsPerModule) const;
   int computeLVGaugeSerial( DetType::Type, DetType::Part, int layerNumber, 
@@ -21,7 +21,7 @@ public:
  private:
   // the message stream (same for all derived classes)
   MsgStream& msg (MSG::Level lvl) const { return m_msg << lvl; }
-  const Athena::MsgStreamMember m_msg;
+  mutable Athena::MsgStreamMember m_msg;
   
 };
 
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/Route.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/Route.h
index 2ce90eccb6a690a39f6ee4c8471099015ab50a99..4477275fbe9041cd13e3f29b7a39e57eaf3b80e4 100644
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/Route.h
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/Route.h
@@ -17,9 +17,9 @@ public:
 
   typedef std::vector<ServiceVolume*>   VolumeContainer;
 
-  virtual ServiceVolume* entryVolume( double pos, bool ascending, const Athena::MsgStreamMember& msg) const ;
+  virtual ServiceVolume* entryVolume( double pos, bool ascending, Athena::MsgStreamMember& msg) const ;
 
-  virtual ServiceVolume* exitVolume( bool ascending, const Athena::MsgStreamMember& msg) const ;
+  virtual ServiceVolume* exitVolume( bool ascending, Athena::MsgStreamMember& msg) const ;
 
   
   Route(): m_exitVolume(0) {}
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/Routing2.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/Routing2.h
index bdcce28c8510ed838fee12fcdd464d583bf2ea74..55d1f822a5f8145d97bb0eb361b652713546fc8f 100644
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/Routing2.h
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/Routing2.h
@@ -92,11 +92,11 @@ private:
   std::string nextVolumeName( const Route& route) const;
 
   // the message stream (same for all derived classes)
-  const Athena::MsgStreamMember m_msg;
-  MsgStream& msg (MSG::Level lvl) const { return m_msg << lvl; }
-  const Athena::MsgStreamMember& msgStream() const {return m_msg;}
+  Athena::MsgStreamMember m_msg;
+  MsgStream& msg (MSG::Level lvl) { return m_msg << lvl; }
+  Athena::MsgStreamMember& msgStream() {return m_msg;}
   //Declaring the Method providing Verbosity Level
-  bool msgLvl (MSG::Level lvl) const { return m_msg.get().level() <= lvl; }
+  bool msgLvl (MSG::Level lvl) { return m_msg.get().level() <= lvl; }
 };
 
 #endif
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServicesTracker.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServicesTracker.h
index 03fd4c6bb92eef12797eae5e6655d54695ba8bab..5921cf4e04db6c7fa2729d0cd98e21e525ca79ab 100644
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServicesTracker.h
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/InDetServMatGeoModel/ServicesTracker.h
@@ -75,12 +75,12 @@ private:
   void add( std::map<std::string, double>& res, const std::string& name, double len);
   void addEosMaterial( const ServiceVolume& vol, std::vector<ServiceMaterial>& result);
   
-  const Athena::MsgStreamMember m_msg;
+  Athena::MsgStreamMember m_msg;
   // the message stream (same for all derived classes)
-  MsgStream& msg (MSG::Level lvl) const { return m_msg << lvl; }
-  const Athena::MsgStreamMember& msgStream() const {return m_msg;}
+  MsgStream& msg (MSG::Level lvl) { return m_msg << lvl; }
+  Athena::MsgStreamMember& msgStream() {return m_msg;}
   //Declaring the Method providing Verbosity Level
-  bool msgLvl (MSG::Level lvl) const { return m_msg.get().level() <= lvl; }
+  bool msgLvl (MSG::Level lvl) { return m_msg.get().level() <= lvl; }
 
 };
 
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/doc/packagedoc.h b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/doc/packagedoc.h
index 6e23f527c3c1a9057ffbd606342bd0d85da6ac87..41cf1679e93438332cf3786f036b380282a04c92 100644
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/doc/packagedoc.h
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/doc/packagedoc.h
@@ -34,8 +34,6 @@ The following diagram illustrates the location of the service materials.
 
 @image html inafpp.gif
 
-@section InDetServMatGeoModel_InDetServMatGeoModelReq Requirements
 
 
 */
-
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactory.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactory.cxx
index 4f473cc9bc0b8e46bcbf728acd5d42be43220362..c29725f0f0b82c4497a0077fcad2b748802f27b6 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactory.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactory.cxx
@@ -75,9 +75,9 @@ void InDetServMatFactory::create(GeoPhysVol *world )
       << trtVersionKey.node() << endmsg;
   msg(MSG::DEBUG) << "                                with SCT   Version Tag: " << sctVersionKey.tag() << " at Node: "
       << sctVersionKey.node() << endmsg;
-  msg(MSG::DEBUG) << " InDetServices Version " << rdbAccessSvc()->getChildTag("InDetServices", indetVersionKey.tag(), indetVersionKey.node(), false) << endmsg;
-  msg(MSG::DEBUG) << " TRT           Version " << rdbAccessSvc()->getChildTag("TRT", trtVersionKey.tag(), trtVersionKey.node(), false) << endmsg;
-  msg(MSG::DEBUG) << " SCT           Version " << rdbAccessSvc()->getChildTag("SCT", sctVersionKey.tag(), sctVersionKey.node(), false) << endmsg;
+  msg(MSG::DEBUG) << " InDetServices Version " << rdbAccessSvc()->getChildTag("InDetServices", indetVersionKey.tag(), indetVersionKey.node()) << endmsg;
+  msg(MSG::DEBUG) << " TRT           Version " << rdbAccessSvc()->getChildTag("TRT", trtVersionKey.tag(), trtVersionKey.node()) << endmsg;
+  msg(MSG::DEBUG) << " SCT           Version " << rdbAccessSvc()->getChildTag("SCT", sctVersionKey.tag(), sctVersionKey.node()) << endmsg;
 
   IRDBRecordset_ptr atls = rdbAccessSvc()->getRecordsetPtr("AtlasMother",  atlasVersionKey.tag(), atlasVersionKey.node());
 
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC2.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC2.cxx
index 29343835a3eb4a137832939c8ba599bf009c8169..548b9d8597c692757e55f2874499e85fec0e83c9 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC2.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC2.cxx
@@ -69,9 +69,9 @@ void InDetServMatFactoryDC2::create(GeoPhysVol *world)
       << sctVersionKey.node() << endmsg;
   msg(MSG::DEBUG) << "                                with TRT   Version Tag: " << trtVersionKey.tag() << " at Node: "
       << trtVersionKey.node() << endmsg;
-  msg(MSG::DEBUG) << " InDetServices Version " << m_rdbAccess->getChildTag("InDetServices", indetVersionKey.tag(), indetVersionKey.node(), false) << endmsg;
-  msg(MSG::DEBUG) << " SCT           Version " << m_rdbAccess->getChildTag("SCT", sctVersionKey.tag(), sctVersionKey.node(), false) << endmsg;
-  msg(MSG::DEBUG) << " TRT           Version " << m_rdbAccess->getChildTag("TRT", trtVersionKey.tag(), trtVersionKey.node(), false) << endmsg;
+  msg(MSG::DEBUG) << " InDetServices Version " << m_rdbAccess->getChildTag("InDetServices", indetVersionKey.tag(), indetVersionKey.node()) << endmsg;
+  msg(MSG::DEBUG) << " SCT           Version " << m_rdbAccess->getChildTag("SCT", sctVersionKey.tag(), sctVersionKey.node()) << endmsg;
+  msg(MSG::DEBUG) << " TRT           Version " << m_rdbAccess->getChildTag("TRT", trtVersionKey.tag(), trtVersionKey.node()) << endmsg;
 
 
   IRDBRecordset_ptr atls = m_rdbAccess->getRecordsetPtr("AtlasMother",  atlasVersionKey.tag(), atlasVersionKey.node());
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC3.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC3.cxx
index 4842faaf504070db3866ed1286bbf1390cdea374..b772fcb94f7ce33c90cd822aa911d3ec3b2812de 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC3.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryDC3.cxx
@@ -73,9 +73,9 @@ void InDetServMatFactoryDC3::create(GeoPhysVol *world )
       << trtVersionKey.node() << endmsg;
   msg(MSG::DEBUG) << "                                with SCT   Version Tag: " << sctVersionKey.tag() << " at Node: "
       << sctVersionKey.node() << endmsg;
-  msg(MSG::DEBUG) << " InDetServices Version " << rdbAccessSvc()->getChildTag("InDetServices", indetVersionKey.tag(), indetVersionKey.node(), false) << endmsg;
-  msg(MSG::DEBUG) << " TRT           Version " << rdbAccessSvc()->getChildTag("TRT", trtVersionKey.tag(), trtVersionKey.node(), false) << endmsg;
-  msg(MSG::DEBUG) << " SCT           Version " << rdbAccessSvc()->getChildTag("SCT", sctVersionKey.tag(), sctVersionKey.node(), false) << endmsg;
+  msg(MSG::DEBUG) << " InDetServices Version " << rdbAccessSvc()->getChildTag("InDetServices", indetVersionKey.tag(), indetVersionKey.node()) << endmsg;
+  msg(MSG::DEBUG) << " TRT           Version " << rdbAccessSvc()->getChildTag("TRT", trtVersionKey.tag(), trtVersionKey.node()) << endmsg;
+  msg(MSG::DEBUG) << " SCT           Version " << rdbAccessSvc()->getChildTag("SCT", sctVersionKey.tag(), sctVersionKey.node()) << endmsg;
 
 
   IRDBRecordset_ptr atls = rdbAccessSvc()->getRecordsetPtr("AtlasMother",  atlasVersionKey.tag(), atlasVersionKey.node());
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryFS.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryFS.cxx
index 4d37dda0d5f1b887a12e4f068e7cb3015d80ee99..c0dd46354f1c8dab029343975deed3b99e1598a5 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryFS.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactoryFS.cxx
@@ -79,9 +79,9 @@ void InDetServMatFactoryFS::create(GeoPhysVol *world )
       << trtVersionKey.node() << endmsg;
   msg(MSG::DEBUG) << "                                with SCT   Version Tag: " << sctVersionKey.tag() << " at Node: "
       << sctVersionKey.node() << endmsg;
-  msg(MSG::DEBUG) << " InDetServices Version " << m_rdbAccess->getChildTag("InDetServices", indetVersionKey.tag(), indetVersionKey.node(), false) << endmsg;
-  msg(MSG::DEBUG) << " TRT           Version " << m_rdbAccess->getChildTag("TRT", trtVersionKey.tag(), trtVersionKey.node(), false) << endmsg;
-  msg(MSG::DEBUG) << " SCT           Version " << m_rdbAccess->getChildTag("SCT", sctVersionKey.tag(), sctVersionKey.node(), false) << endmsg;
+  msg(MSG::DEBUG) << " InDetServices Version " << m_rdbAccess->getChildTag("InDetServices", indetVersionKey.tag(), indetVersionKey.node()) << endmsg;
+  msg(MSG::DEBUG) << " TRT           Version " << m_rdbAccess->getChildTag("TRT", trtVersionKey.tag(), trtVersionKey.node()) << endmsg;
+  msg(MSG::DEBUG) << " SCT           Version " << m_rdbAccess->getChildTag("SCT", sctVersionKey.tag(), sctVersionKey.node()) << endmsg;
 
 
   IRDBRecordset_ptr atls = m_rdbAccess->getRecordsetPtr("AtlasMother",  atlasVersionKey.tag(), atlasVersionKey.node());
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactorySLHC.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactorySLHC.cxx
index f6c868d2dea98ec53ac274084ab0e490bb1178cb..965e4d4758a307dffb43b7c8fcfd565059e23325 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactorySLHC.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatFactorySLHC.cxx
@@ -138,7 +138,7 @@ InDetServMatFactorySLHC::fetchTables()
   msg(MSG::INFO) << "Building InDet Service Material with InDet Version Tag: "  
 		 << indetVersionKey.tag() << " at Node: " << indetVersionKey.node() << endmsg;
   msg(MSG::INFO) << " InDetServices Version " 
-		 << rdbAccessSvc()->getChildTag("InDetServices", indetVersionKey.tag(), indetVersionKey.node(), false) << endmsg;
+		 << rdbAccessSvc()->getChildTag("InDetServices", indetVersionKey.tag(), indetVersionKey.node()) << endmsg;
  
   m_InDetServGenEnvelope = rdbAccessSvc()->getRecordsetPtr("InDetServGenEnvelope", indetVersionKey.tag(), indetVersionKey.node());
   msg(MSG::DEBUG) << "Table InDetServGenEnvelope Fetched" << endmsg;
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatTool.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatTool.cxx
index 2de8444b28a0fe793de313f6c16e6171b2718d15..6041d4b2ae6dffb616ae69389084185e15e042ea 100755
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatTool.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/InDetServMatTool.cxx
@@ -99,7 +99,7 @@ StatusCode InDetServMatTool::create( StoreGateSvc* detStore )
     return (StatusCode::FAILURE); 
   }  
   
-  std::string versionTag = m_rdbAccessSvc->getChildTag("InDetServices", versionKey.tag(), versionKey.node(), false);
+  std::string versionTag = m_rdbAccessSvc->getChildTag("InDetServices", versionKey.tag(), versionKey.node());
   msg(MSG::INFO) << "InDetServMat Package Version: " << PACKAGE_VERSION << endmsg;
   if(msgLvl(MSG::DEBUG)) msg() << "versionTag=" << versionTag <<" %%%"<< endmsg;
 
@@ -115,7 +115,7 @@ StatusCode InDetServMatTool::create( StoreGateSvc* detStore )
   
   std::string versionName;
   std::string descrName="noDescr";
-  if (!m_rdbAccessSvc->getChildTag("InDetServSwitches", versionKey.tag(), versionKey.node(), false).empty()) {
+  if (!m_rdbAccessSvc->getChildTag("InDetServSwitches", versionKey.tag(), versionKey.node()).empty()) {
     IRDBRecordset_ptr switchSet = m_rdbAccessSvc->getRecordsetPtr("InDetServSwitches", versionKey.tag(), versionKey.node());
     const IRDBRecord    *switchTable   = (*switchSet)[0];    
     versionName = switchTable->getString("VERSIONNAME"); 
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/Route.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/Route.cxx
index e7f882ce7fa836bd44f43c2ed798730c8c998836..c1845c111405b07f9f6be0c3bdde0a5758a3080c 100644
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/Route.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/Route.cxx
@@ -9,7 +9,7 @@
 #include <iostream>
 using namespace std;
 
-ServiceVolume* Route::entryVolume( double pos, bool ascending, const Athena::MsgStreamMember& msg) const 
+ServiceVolume* Route::entryVolume( double pos, bool ascending, Athena::MsgStreamMember& msg) const 
 {
   msg << MSG::DEBUG  << "entering entryVolume with ascending = " << ascending 
        << " and pos = " << pos << endmsg;
@@ -46,7 +46,7 @@ ServiceVolume* Route::entryVolume( double pos, bool ascending, const Athena::Msg
   //}
 }
 
-ServiceVolume* Route::exitVolume( bool ascending, const Athena::MsgStreamMember& msg) const 
+ServiceVolume* Route::exitVolume( bool ascending, Athena::MsgStreamMember& msg) const 
 {
 
   msg << MSG::DEBUG  << "entering exitVolume with ascending = " << ascending 
diff --git a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTrackerBuilder.cxx b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTrackerBuilder.cxx
index 65a4c739c143321e5115185f939f479abdd76880..f0c77e967abe551492ea7c2c874575205407d562 100644
--- a/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTrackerBuilder.cxx
+++ b/InnerDetector/InDetDetDescr/InDetServMatGeoModel/src/ServicesTrackerBuilder.cxx
@@ -15,7 +15,7 @@ using namespace std;
 ServicesTracker* ServicesTrackerBuilder::buildGeometry(const InDetServMatGeometryManager& geoMgr) const
 {
 
-  const Athena::MsgStreamMember msg(Athena::Options::Eager,"ServiceTrackerBuilder");
+  Athena::MsgStreamMember msg(Athena::Options::Eager,"ServiceTrackerBuilder");
   
   msg<< MSG::INFO << "Entering ServicesTrackerBuilder::buildGeometry" <<endmsg;
 
diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/doc/packagedoc.h b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/doc/packagedoc.h
index 0372a61e1d5e7bbacdcf26df625eb63c3eeb6530..344e8f84f4d3ddf2f468eca1b0c1b19fe345b65e 100644
--- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/doc/packagedoc.h
+++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/doc/packagedoc.h
@@ -43,7 +43,6 @@ material description for DC2 Layout and default values. Fine-tuning of the value
 </tr>
 </table>
   
-@section InDetTrackingGeometry_InDetTrackingGeometryReq Requirements
 
 
 */
\ No newline at end of file
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/doc/packagedoc.h b/InnerDetector/InDetDetDescr/PixelGeoModel/doc/packagedoc.h
index 36c4b9bc6c9adead52f94c8d7346da72cf32bdb8..f282b5e3b6a36bcb4f3091b9f988024e5c9566ee 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/doc/packagedoc.h
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/doc/packagedoc.h
@@ -39,7 +39,6 @@ Some of the other classes are described here:
  - PixelGeometryManager: %Base class for interfaces to primary numbers. 
  - OraclePixGeoManager: Interface to primary numbers from the Detector Description Database.
 
-@section PixelGeoModel_PixelGeoModelReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/IBLParameterSvc.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/IBLParameterSvc.cxx
index a70cc753051655c2a53e8ccfc82a9aab0ec8651d..52b83eb7919492561ef50e2b51467a46e14b1c0c 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/IBLParameterSvc.cxx
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/IBLParameterSvc.cxx
@@ -92,7 +92,6 @@ StatusCode IBLParameterSvc::setIblParameters() {
      msg(MSG::FATAL) << "Could not locate RDBAccessSvc" << endmsg;
      return (StatusCode::FAILURE); 
   } 
-  m_rdbAccessSvc->connect();
   IRDBRecordset_ptr switchSet = m_rdbAccessSvc->getRecordsetPtr("PixelSwitches", versionKey.tag(), versionKey.node());
   const IRDBRecord    *switchTable   = (*switchSet)[0];
   std::string versionName("");
@@ -129,7 +128,6 @@ StatusCode IBLParameterSvc::setIblParameters() {
 		for (int i =0; i < 4; i++) m_LayerFEsPerHalfModule.push_back(m_LayerFEsPerHalfModule_3d);
 	}
   }
-  m_rdbAccessSvc->disconnect();
   return StatusCode::SUCCESS;
 } 
 
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.cxx
index ed96ffe4876058e6f3637b4befd1bfb46e9f31a4..c4af76ae2423d4b8e541fc6b201c58c544788f85 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.cxx
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/OraclePixGeoManager.cxx
@@ -90,7 +90,7 @@ OraclePixGeoManager::init()
   // Get version tag and node for InnerDetector.
   DecodeVersionKey indetVersionKey(geoDbTag,"InnerDetector");
 
-  m_versionTag = rdbSvc->getChildTag("Pixel", versionKey.tag(), versionKey.node(), false);
+  m_versionTag = rdbSvc->getChildTag("Pixel", versionKey.tag(), versionKey.node());
 
 /////////////////////////////////////////////////////////
 //
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx
index 183928c4bfd621de2f8ee12957ecdd2612c061bf..30a4c14a45e0b496673f3225c93ec27159a8b2c7 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorDC1DC2.cxx
@@ -1593,7 +1593,7 @@ OraclePixGeoManager::OraclePixGeoManager()
   std::string detectorKey  = versionKey.tag();
   std::string detectorNode = versionKey.node();
 
-  m_versionTag = rdbSvc->getChildTag("Pixel", versionKey.tag(), versionKey.node(), false);
+  m_versionTag = rdbSvc->getChildTag("Pixel", versionKey.tag(), versionKey.node());
 
 
 /////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx
index f1662c1bbfb00944f5e63f29e8616f64ea0a7649..691c8aa72230b259254986cf4abde8f56b0cff9b 100644
--- a/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/PixelGeoModel/src/PixelDetectorTool.cxx
@@ -114,7 +114,7 @@ StatusCode PixelDetectorTool::create( StoreGateSvc* detStore )
   }  
 
   // Print the version tag:
-  pixelVersionTag = m_rdbAccessSvc->getChildTag("Pixel", versionKey.tag(), versionKey.node(), false);
+  pixelVersionTag = m_rdbAccessSvc->getChildTag("Pixel", versionKey.tag(), versionKey.node());
   msg(MSG::INFO) << "Pixel Version: " << pixelVersionTag << "  Package Version: " << PACKAGE_VERSION << endmsg;
   
   
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/doc/packagedoc.h b/InnerDetector/InDetDetDescr/SCT_GeoModel/doc/packagedoc.h
index c72234e553d21ea6d512f658ac1ddec6a4594574..79faf688d1e2fd0d8872acd06c06be941a98929f 100644
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/doc/packagedoc.h
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/doc/packagedoc.h
@@ -45,7 +45,6 @@ Some of the other classes are described here:
  - SCT_Options: Class to contain various building options.
  - SCT_DefaultConditions: Class to store default conditions data.
 
-@section SCT_GeoModel_SCT_GeoModelReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DataBase.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DataBase.cxx
index c5ceac69abc03951f7a1e2c46a64d89a076d44bc..35264aee4d29c4491c9d8190c45732db3b18793e 100755
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DataBase.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DataBase.cxx
@@ -63,7 +63,7 @@ SCT_DataBase::SCT_DataBase()
   IRDBAccessSvc* rdbSvc = s_athenaComps->rdbAccessSvc();
 
   // SCT version tag
-  m_sctVersionTag = rdbSvc->getChildTag("SCT", versionKey.tag(), versionKey.node(), false);
+  m_sctVersionTag = rdbSvc->getChildTag("SCT", versionKey.tag(), versionKey.node());
 
 
 /////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx
index 02445c9294103680a561d520b1b2f5b498e459a9..f6efe007950a930db3a26fc21488d501fa8a5fd6 100755
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorFactory.cxx
@@ -102,7 +102,7 @@ SCT_DetectorFactory::SCT_DetectorFactory(const SCT_GeoModelAthenaComps * athenaC
     description = switches->getString("DESCRIPTION");
   }
 
-  std::string versionTag = rdbAccessSvc()->getChildTag("SCT", versionKey.tag(), versionKey.node(), false);
+  std::string versionTag = rdbAccessSvc()->getChildTag("SCT", versionKey.tag(), versionKey.node());
   std::string versionName = switches->getString("VERSIONNAME");
   int versionMajorNumber = 3;
   int versionMinorNumber = 6;
diff --git a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx
index 77141e15737452d7e539763f9983509cdfab2508..8facfa3da05555ef8a6be6890e3cd5e051fea0ec 100755
--- a/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_GeoModel/src/SCT_DetectorTool.cxx
@@ -107,7 +107,7 @@ SCT_DetectorTool::create( StoreGateSvc* detStore )
 
   // Print the SCT version tag:
   std::string sctVersionTag;
-  sctVersionTag =  m_rdbAccessSvc->getChildTag("SCT", versionKey.tag(), versionKey.node(), false);
+  sctVersionTag =  m_rdbAccessSvc->getChildTag("SCT", versionKey.tag(), versionKey.node());
   msg(MSG::INFO) << "SCT Version: " << sctVersionTag <<  "  Package Version: " << PACKAGE_VERSION << endmsg;
 
 
diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DataBase.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DataBase.cxx
index 0da79f19b504a33f2e1f7e00ca5ad308f94bbf1b..7e7629b02341eed7c98d274af96f7ac0b74fc03f 100644
--- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DataBase.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DataBase.cxx
@@ -31,7 +31,7 @@ SCT_DataBase::SCT_DataBase(const SCT_GeoModelAthenaComps * athenaComps)
   IRDBAccessSvc* rdbSvc = m_athenaComps->rdbAccessSvc();
 
   // SCT version tag
-  m_sctVersionTag = rdbSvc->getChildTag("SCT", versionKey.tag(), versionKey.node(), false);
+  m_sctVersionTag = rdbSvc->getChildTag("SCT", versionKey.tag(), versionKey.node());
 
 
 /////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx
index 84abb7bed2f22392761bca3ad6a8c9039582d00e..f666264cb840b863a339c76c99bf3f76f28f9fa9 100644
--- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_DetectorFactory.cxx
@@ -92,7 +92,7 @@ SCT_DetectorFactory::SCT_DetectorFactory(const SCT_GeoModelAthenaComps * athenaC
     description = switches->getString("DESCRIPTION");
   }
 
-  std::string versionTag = rdbAccessSvc()->getChildTag("SCT", versionKey.tag(), versionKey.node(), false);
+  std::string versionTag = rdbAccessSvc()->getChildTag("SCT", versionKey.tag(), versionKey.node());
   std::string versionName = switches->getString("VERSIONNAME");
   int versionMajorNumber = 3;
   int versionMinorNumber = 4;
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 9898b3571d143b0161c36e512252b93cd0ee10bf..7b1da7b483fc222b6c40c47862e843e30968db8e 100644
--- a/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_SLHC_DetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/SCT_SLHC_GeoModel/src/SCT_SLHC_DetectorTool.cxx
@@ -86,7 +86,7 @@ StatusCode SCT_SLHC_DetectorTool::create( StoreGateSvc* detStore ){
 
   // Print the SCT version tag:
   std::string sctVersionTag;
-  sctVersionTag = m_rdbAccessSvc->getChildTag("SCT", versionKey.tag(), versionKey.node(), false);
+  sctVersionTag = m_rdbAccessSvc->getChildTag("SCT", versionKey.tag(), versionKey.node());
   msg(MSG::INFO) << "SCT Version: " << sctVersionTag <<  "  Package Version: " << PACKAGE_VERSION << endmsg;
 
   // Check if version is empty. If so, then the SCT cannot be built. 
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/doc/packagedoc.h b/InnerDetector/InDetDetDescr/TRT_GeoModel/doc/packagedoc.h
index 7077c606255bb8ca95c77b589b8206c9a34d0f17..56b9ae0b674608d07cd4ed6518fcf3922315ae23 100644
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/doc/packagedoc.h
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/doc/packagedoc.h
@@ -39,7 +39,6 @@ The package contains the following main classes:
  - TRTParameterInterface: %Base class for Interface to primary numbers.
  - TRT_DetDescrDB_ParameterInterface: Interface to primary numbers from the Detector Description Database.
 
-@section TRT_GeoModel_TRT_GeoModelReq Requirements
 
 
 
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx
index 608d2966d71db354478992bfa70115c480c035f7..0d1510e75311d2c32e7a2ea0a4c5637d73a572cd 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetDescrDB_ParameterInterface.cxx
@@ -77,7 +77,7 @@ void TRT_DetDescrDB_ParameterInterface::SetValues() {
   /////////////////////////////////////////////////////////////////////////////////////////
   //                                  Version Information                                //
   /////////////////////////////////////////////////////////////////////////////////////////
-  versionTag = iAccessSvc->getChildTag("TRT", versionKey.tag(), versionKey.node(), false);
+  versionTag = iAccessSvc->getChildTag("TRT", versionKey.tag(), versionKey.node());
 
   /////////////////////////////////////////////////////////////////////////////////////////
   //                                    Special Flags                                    //
diff --git a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
index 31c568a7d7419832f2db6fafab4e4d2c3f07d25e..88e0f0fbc3add424d4762aa22468857c5214d54a 100755
--- a/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_GeoModel/src/TRT_DetectorTool.cxx
@@ -92,7 +92,7 @@ StatusCode TRT_DetectorTool::create( StoreGateSvc* detStore )
   }  
  
   // Print the TRT version tag:
-  std::string trtVersionTag = m_rdbAccessSvc->getChildTag("TRT", versionKey.tag(), versionKey.node(), false);
+  std::string trtVersionTag = m_rdbAccessSvc->getChildTag("TRT", versionKey.tag(), versionKey.node());
   msg(MSG::INFO) << "TRT Version: " << trtVersionTag << "  Package Version: " << PACKAGE_VERSION << endmsg;
  
 
diff --git a/InnerDetector/InDetDigitization/BCM_Digitization/doc/packagedoc.h b/InnerDetector/InDetDigitization/BCM_Digitization/doc/packagedoc.h
index e953ea0a66ca09cc8e0cd864ae9d43835a77b979..87aa09fb1f85a78185f72cedc5b2a09322262182 100644
--- a/InnerDetector/InDetDigitization/BCM_Digitization/doc/packagedoc.h
+++ b/InnerDetector/InDetDigitization/BCM_Digitization/doc/packagedoc.h
@@ -10,17 +10,6 @@
 
 This package is used to simulate the electronics response of the 8 ATLAS Beam Conditions Monitor (BCM) modules. The GEANT4 BCM hit collection(s) is/are first retrieved from the simulation store. For each hit in the collection, a pulse whose height is linearly correlated with the energy deposit is added to the corresponding channel waveform, which has been pre-filled with Gaussian noise. This is then split into two parts, which correspond to high- and low-gain channels. A time-over-threshold is used to digitize the analog pulses, and the positions and widths of the first two digital pulses in each channel are recorded in a raw data object. The 16 RDOs are packed into a container which is then saved to the output store.
 
-@ref used_BCM_Digitization
 
-@ref requirements_BCM_Digitization
 
 */
-
-/**
-@page used_BCM_Digitization Used Packages
-*/
-
-/**
-@page requirements_BCM_Digitization Requirements
-*/
-
diff --git a/InnerDetector/InDetDigitization/FastTRT_Digitization/CMakeLists.txt b/InnerDetector/InDetDigitization/FastTRT_Digitization/CMakeLists.txt
index 74deca15af3c42eab075506fb87af695fecfea15..717b779301024d4c3f229da5081f24ae939b1c57 100644
--- a/InnerDetector/InDetDigitization/FastTRT_Digitization/CMakeLists.txt
+++ b/InnerDetector/InDetDigitization/FastTRT_Digitization/CMakeLists.txt
@@ -23,6 +23,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Tracking/TrkEvent/TrkParameters
                           Tracking/TrkEvent/TrkTruthData
                           Tracking/TrkTools/TrkToolInterfaces
+                          Event/EventContainers
                           PRIVATE
                           Control/CxxUtils
                           DetectorDescription/GeoPrimitives
@@ -42,7 +43,7 @@ atlas_add_component( FastTRT_Digitization
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib StoreGateLib SGtests Identifier EventInfo xAODEventInfo GaudiKernel TRT_ConditionsServicesLib InDetPrepRawData InDetSimEvent HitManagement TrkParameters TrkTruthData TrkToolInterfaces CxxUtils GeoPrimitives GeneratorObjects InDetIdentifier InDetReadoutGeometry InDetSimData TrkDetElementBase )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaKernel PileUpToolsLib StoreGateLib SGtests Identifier EventInfo xAODEventInfo GaudiKernel TRT_ConditionsServicesLib InDetPrepRawData InDetSimEvent HitManagement TrkParameters TrkTruthData TrkToolInterfaces CxxUtils GeoPrimitives GeneratorObjects InDetIdentifier InDetReadoutGeometry InDetSimData TrkDetElementBase EventContainers)
 
 # Install files from the package:
 atlas_install_headers( FastTRT_Digitization )
diff --git a/InnerDetector/InDetDigitization/PixelDigitization/doc/packagedoc.h b/InnerDetector/InDetDigitization/PixelDigitization/doc/packagedoc.h
index 79b9dc0776830ff6df16b36599e2401b54a2ae65..be730330a4d9ca78f2e1b071bd122b1fd250ef9e 100644
--- a/InnerDetector/InDetDigitization/PixelDigitization/doc/packagedoc.h
+++ b/InnerDetector/InDetDigitization/PixelDigitization/doc/packagedoc.h
@@ -234,15 +234,4 @@ for example the PixelMonitoring package.
 
 @section PixelDigitization_PixelDigitizationExtras Extra Pages
 
- - @ref PixelDigitizationUsedPackages
- - @ref PixelDigitizationRequirements
 */
-
-/**
-@page PixelDigitizationUsedPackages Used Packages
-*/
-
-/**
-@page PixelDigitizationRequirements Requirements
-*/
-
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_Amp.h b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_Amp.h
old mode 100755
new mode 100644
index 0d21e2d941f99fef4fdf5b07eec254942f60c416..8028269a570ea58ecf23e2c169ac61cb06c3a2d3
--- a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_Amp.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_Amp.h
@@ -8,7 +8,7 @@
  * (c) ATLAS Detector software
  * Interface for the SiChargedDiode processor classes
  * 23/08/2007 Kondo.Gnanvo@cern.ch, and others   
-*/
+ */
 
 #ifndef SIDIGITIZATION_ISCT_AMP_H
 #define SIDIGITIZATION_ISCT_AMP_H
@@ -18,14 +18,14 @@
 
 #include <vector>
 
-static const InterfaceID IID_ISCT_Amp("ISCT_Amp",1,0);
+static const InterfaceID IID_ISCT_Amp("ISCT_Amp", 1, 0);
 
 class ISCT_Amp : virtual public IAlgTool {
 
   ///////////////////////////////////////////////////////////////////
   // Public methods:
   ///////////////////////////////////////////////////////////////////
-public:
+ public:
   typedef SiTotalCharge::list_t list_t;
 
   //Retrieve interface ID
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_FrontEnd.h b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_FrontEnd.h
index 56da5bc7addce0edc1d0534044681819d99cc3cc..a02c5ba2da8a46890a3f81d46b7ec20e00a159e6 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_FrontEnd.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_FrontEnd.h
@@ -6,7 +6,7 @@
  * ISCT_FrontEnd.h
  * Header file for interface class for SCT_FrontEnd
  * (c) ATLAS Detector software
-*/
+ */
 
 #ifndef SCT_DIGITIZATION_ISCT_FRONTEND_H
 #define SCT_DIGITIZATION_ISCT_FRONTEND_H
@@ -22,7 +22,7 @@ namespace CLHEP {
   class HepRandomEngine;
 }
 
-static const InterfaceID IID_ISCT_FrontEnd("ISCT_FrontEnd",1,0);
+static const InterfaceID IID_ISCT_FrontEnd("ISCT_FrontEnd", 1, 0);
 
 class ISCT_FrontEnd : virtual public ISiChargedDiodesProcessorTool {
 
@@ -32,7 +32,7 @@ class ISCT_FrontEnd : virtual public ISiChargedDiodesProcessorTool {
  public:
 
   //** Retrieve interface ID */
-  static const InterfaceID & interfaceID() {return IID_ISCT_FrontEnd; }
+  static const InterfaceID& interfaceID() { return IID_ISCT_FrontEnd; }
 
   //** Destructor: */
   virtual ~ISCT_FrontEnd() {}
@@ -42,16 +42,8 @@ class ISCT_FrontEnd : virtual public ISiChargedDiodesProcessorTool {
   ///////////////////////////////////////////////////////////////////
 
   //** process the collection of charged diodes */
-  virtual void process(SiChargedDiodeCollection &collection) const =0;
-  virtual void setRandomEngine(CLHEP::HepRandomEngine *rndmEngine) =0;
-  //  virtual StatusCode doSignalChargeForHits(SiChargedDiodeCollection &collection, std::vector<SiChargedDiode*> &FirstDiode) const=0;
-  //  virtual StatusCode doClustering(SiChargedDiodeCollection &collection, std::vector<SiChargedDiode*> &FirstDiode) const=0;
-  //  virtual StatusCode prepareGainAndOffset(SiChargedDiodeCollection &collection, const Identifier & moduleId) const=0;
-  //  virtual StatusCode prepareGainAndOffset(SiChargedDiodeCollection &collection, const int & side, const Identifier & moduleId) const=0;
-  //  virtual StatusCode randomnoise(const Identifier & moduleId) const=0;
-  //  virtual StatusCode randomnoise(const Identifier & moduleId, const int & side) const=0;
-  //  virtual float meanValue(std::vector<float> & calibDataVect) const =0;
-  //  virtual StatusCode initVectors(const int & strips, const short & comp_mode) const =0;
+  virtual void process(SiChargedDiodeCollection& collection) const =0;
+  virtual void setRandomEngine(CLHEP::HepRandomEngine* rndmEngine) =0;
 };
 
 #endif // SCT_DIGITIZATION_ISCT_FRONTEND_H
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_RandomDisabledCellGenerator.h b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_RandomDisabledCellGenerator.h
index 9a48c345c307751e69b974151f6024358a6ea764..b5cb45fce30dd7188e730a86d6c0a1cb5e465b9e 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_RandomDisabledCellGenerator.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_RandomDisabledCellGenerator.h
@@ -6,7 +6,7 @@
  * ISCT_RandomDisabledCellGenerator.h
  * Header file for interface class for SCT_RandomDisabledCellGenerator
  * (c) ATLAS Detector software
-*/
+ */
 
 #ifndef SCT_DIGITIZATION_ISCT_RANDOMDISABLEDCELLGENERATOR_H
 #define SCT_DIGITIZATION_ISCT_RANDOMDISABLEDCELLGENERATOR_H
@@ -27,10 +27,10 @@ class ISCT_RandomDisabledCellGenerator : virtual public ISiChargedDiodesProcesso
   ///////////////////////////////////////////////////////////////////
   // Public methods:
   ///////////////////////////////////////////////////////////////////
-public:
+ public:
 
   //Retrieve interface ID
-  static const InterfaceID & interfaceID() {return IID_ISCT_RandomDisabledCellGenerator; }
+  static const InterfaceID& interfaceID() { return IID_ISCT_RandomDisabledCellGenerator; }
 
   // Destructor:
   virtual ~ISCT_RandomDisabledCellGenerator() {}
@@ -40,8 +40,8 @@ public:
   ///////////////////////////////////////////////////////////////////
 
   // process the collection of charged diodes
-  virtual void process(SiChargedDiodeCollection &collection) const =0;
-  virtual void setRandomEngine(CLHEP::HepRandomEngine *rndmEngine) =0;
+  virtual void process(SiChargedDiodeCollection& collection) const =0;
+  virtual void setRandomEngine(CLHEP::HepRandomEngine* rndmEngine) =0;
 };
 
 #endif // SCT_DIGITIZATION_ISCT_RANDOMDISABLEDCELLGENERATOR_H
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_SurfaceChargesGenerator.h b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_SurfaceChargesGenerator.h
index b305ea8f14c4e401fd0a2146939d78b1114ec6da..7288af2dc5cc85abb0e9502789239d2fbbe14b1d 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_SurfaceChargesGenerator.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/ISCT_SurfaceChargesGenerator.h
@@ -31,7 +31,7 @@ namespace CLHEP {
 
 class ISiSurfaceChargesInserter
 {
-public:
+ public:
   virtual ~ISiSurfaceChargesInserter() {}
   virtual void operator() (const SiSurfaceCharge& scharge) const = 0;
 };
@@ -43,16 +43,16 @@ class ISCT_SurfaceChargesGenerator : virtual public IAlgTool {
   ///////////////////////////////////////////////////////////////////
   // Public methods:
   ///////////////////////////////////////////////////////////////////
-public:
+ public:
 
   //Retrieve interface ID
-  static const InterfaceID & interfaceID() {return IID_ISCT_SurfaceChargesGenerator; }
+  static const InterfaceID& interfaceID() { return IID_ISCT_SurfaceChargesGenerator; }
   
   // Destructor:
   virtual ~ISCT_SurfaceChargesGenerator() {}
 
-  virtual void setDetectorElement(const InDetDD::SiDetectorElement *ele) = 0 ;
-  virtual void process(const TimedHitPtr<SiHit> & phit,
+  virtual void setDetectorElement(const InDetDD::SiDetectorElement* ele) = 0 ;
+  virtual void process(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
@@ -60,7 +60,7 @@ public:
   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;       
+  virtual void setRandomEngine(CLHEP::HepRandomEngine* rndmEngine) =0;       
 };
 
 #endif // SIDIGITIZATION_ISCT_SURFACECHARGESGENERATOR_H
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_Digitization.h b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_Digitization.h
old mode 100755
new mode 100644
index 2388e5b338094b6e7423247933ecdcf7ccfb07ac..a2c159df823383cd1cff9b8f8e1f99a771cc2a18
--- a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_Digitization.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_Digitization.h
@@ -8,7 +8,7 @@
  *          Jorgen.Dalmau@cern.ch, Kondo.Gnanvo@cern.ch, and others
  * Version 23/08/2007 Kondo.Gnanvo@cern.ch
  *          Conversion of the processors into AlgTool
-*/
+ */
 
 // Multiple inclusion protection
 #ifndef SCT_DIGITIZATION_SCT_DIGITIZATION_H
@@ -19,9 +19,6 @@
 // Gaudi
 #include "GaudiKernel/ToolHandle.h"
 
-
-
-
 class SCT_DigitizationTool;
 /** Top algorithm class for SCT digitization */
 class SCT_Digitization : public AthAlgorithm {
@@ -29,7 +26,7 @@ class SCT_Digitization : public AthAlgorithm {
  public:
 
   /** Constructor with parameters */
-  SCT_Digitization(const std::string &name,ISvcLocator *pSvcLocator);
+  SCT_Digitization(const std::string& name, ISvcLocator* pSvcLocator);
 
   /** Destructor */
   ~SCT_Digitization();
@@ -41,7 +38,7 @@ class SCT_Digitization : public AthAlgorithm {
 
  private:
 
-  ToolHandle<SCT_DigitizationTool> m_sctDigitizationTool;
+  ToolHandle<SCT_DigitizationTool> m_sctDigitizationTool{this, "DigitizationTool", "SCT_DigitizationTool", "SCT_DigitizationTool name"};
 
 };
 
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h
old mode 100755
new mode 100644
index df47c224a9cf0571cb93a53b4e877c7af3b8d7c1..8bfd2e27344239e03fb66fffd4c326e439e2c1c1
--- a/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/SCT_Digitization/SCT_DigitizationTool.h
@@ -51,8 +51,6 @@ class ISiSurfaceChargesInserter;
 class SiChargedDiodeCollection;
 class ISiChargedDiodesProcessorTool;
 class StoreGateService;
-// class TimeSvc;
-//class CalibSvc;
 
 namespace InDetDD
 {
@@ -65,8 +63,7 @@ namespace CLHEP
   class HepRandomEngine;
 }
 
-static const InterfaceID IID_ISCT_DigitizationTool ("SCT_DigitizationTool",1,0);
-
+static const InterfaceID IID_ISCT_DigitizationTool ("SCT_DigitizationTool", 1, 0);
 
 class SCT_DigitizationTool :
   virtual public IPileUpTool,
@@ -80,7 +77,7 @@ public:
   /**
      @brief Called before processing physics events
   */
-  StatusCode prepareEvent( unsigned int ) override final;
+  StatusCode prepareEvent(unsigned int) override final;
   virtual StatusCode processBunchXing(int bunchXing,
                                       SubEventIterator bSubEvents,
                                       SubEventIterator eSubEvents) override final;
@@ -95,9 +92,8 @@ protected:
   void       applyProcessorTools(SiChargedDiodeCollection* chargedDiodes); //!
   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
-//  void setManager(const InDetDD::SiDetectorManager *p_manager) {m_detMgr = p_manager;} //FIXME should be removed
+  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:
 
@@ -112,15 +108,15 @@ private:
   /**
      @brief Initialize the SCT_FrontEnd AlgTool
   */
-  StatusCode initFrontEndTool() ;
+  StatusCode initFrontEndTool();
   /**
      @brief Initialize the SCT_RandomDisabledCellGenerator AlgTool
   */
-  StatusCode initDisabledCells() ;
+  StatusCode initDisabledCells();
   /**
      @brief Initialize the SCT_SurfaceChargesGenerator AlgTool
   */
-  StatusCode initSurfaceChargesGeneratorTool() ;
+  StatusCode initSurfaceChargesGeneratorTool();
 
   /** RDO and SDO methods*/
   /**
@@ -139,12 +135,8 @@ private:
   void       digitizeAllHits();     //!< digitize all hits
   void       digitizeNonHits();     //!< digitize SCT without hits
 
-  //enum {totmods = 8, totsides = 2, totstrips=768};
-
-
   float m_tfix;           //!< Use fixed timing for cosmics
   float m_comTime;         //!< Use Commission time for timing
-  //  float m_temperatureC ;  //!< Temperature
 
   bool m_enableHits;            //!< Flag to enable hits
   bool m_onlyHitElements;       //!<
@@ -152,7 +144,6 @@ private:
   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_onlyElementsWithHits;  //!< Process only elements with hits
   bool m_createNoiseSDO;        //!< Create SDOs for strips with only noise hits (huge increase in SDO collection size)
   int  m_HardScatterSplittingMode; //!< Process all SiHit or just those from signal or background events
   bool m_HardScatterSplittingSkipper;
@@ -182,13 +173,13 @@ private:
 
   std::string                                        m_inputObjectName;     //! name of the sub event  hit collections.
   ServiceHandle <IAtRndmGenSvc>                      m_rndmSvc;             //!< Random number service
-  ServiceHandle <PileUpMergeSvc> m_mergeSvc; //!
+  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;
+  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;
 
 
@@ -199,4 +190,4 @@ inline const InterfaceID& SCT_DigitizationTool::interfaceID()
   return IID_ISCT_DigitizationTool;
 }
 
-#endif
+#endif // SCT_DIGITZATION_SCT_DIGITZATIONTOOL_H
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/cmt/requirements b/InnerDetector/InDetDigitization/SCT_Digitization/cmt/requirements
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/doc/index.html b/InnerDetector/InDetDigitization/SCT_Digitization/doc/index.html
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/doc/notes.html b/InnerDetector/InDetDigitization/SCT_Digitization/doc/notes.html
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/doc/packagedoc.h b/InnerDetector/InDetDigitization/SCT_Digitization/doc/packagedoc.h
index 181dfc005ec0411313136788e4090940348156a5..9c2c4a8045faf833631c3f1b02d00e8be5362cc8 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/doc/packagedoc.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/doc/packagedoc.h
@@ -37,18 +37,10 @@ The SCT_Digitization package contains the following classes:
  - SCT_SurfaceChargesGenerator: Drifts charge from hits to SCT wafer surface.
 
 @section SCT_Digitization_SCT_DigitizationRefs Reference pages
- - @ref used_SCT_Digitization
- - @ref requirements_SCT_Digitization
  - @ref notes_SCT_Digitization
 */
 
-/**
-@page used_SCT_Digitization Used packages
-*/
 
-/**
-@page requirements_SCT_Digitization Requirements
-*/
 
 /**
 @page notes_SCT_Digitization Change notes
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/share/SCT_Digitization_jobOptions.py b/InnerDetector/InDetDigitization/SCT_Digitization/share/SCT_Digitization_jobOptions.py
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx
old mode 100755
new mode 100644
index 4fb20fc691fa3422e1f6f67f9d0b5a65c299cedc..4f55b6d75cb3601144614043bbcd54c13305ec92
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.cxx
@@ -14,22 +14,22 @@
 //#define SCT_DIG_DEBUG
 
 // constructor
-SCT_Amp::SCT_Amp(const std::string& type, const std::string& name,const IInterface* parent ) 
-  : AthAlgTool(type,name,parent), 
-    m_NormConstCentral(0),
-    m_NormConstNeigh(0)
+SCT_Amp::SCT_Amp(const std::string& type, const std::string& name, const IInterface* parent) 
+  : AthAlgTool(type, name, parent), 
+    m_NormConstCentral{0},
+  m_NormConstNeigh{0}
 {
-  declareInterface< ISCT_Amp >( this ); 
-  declareProperty("CrossFactor2sides",m_CrossFactor2sides=0.1); //! <Loss of charge to neighbour strip constant
-  declareProperty("CrossFactorBack",m_CrossFactorBack=0.07);    //! <Loss of charge to back plane constant
-  declareProperty("PeakTime",m_PeakTime=21);                    //! <Front End Electronics peaking time
-  declareProperty("deltaT",m_dt=1.0);
-  declareProperty("Tmin",m_tmin=-25.0);
-  declareProperty("Tmax",m_tmax=150.0);
+  declareInterface<ISCT_Amp>(this); 
+  declareProperty("CrossFactor2sides", m_CrossFactor2sides=0.1); //! <Loss of charge to neighbour strip constant
+  declareProperty("CrossFactorBack", m_CrossFactorBack=0.07);    //! <Loss of charge to back plane constant
+  declareProperty("PeakTime", m_PeakTime=21.);                   //! <Front End Electronics peaking time
+  declareProperty("deltaT", m_dt=1.0);
+  declareProperty("Tmin", m_tmin=-25.0);
+  declareProperty("Tmax", m_tmax=150.0);
 }
 
 // Destructor
-SCT_Amp::~SCT_Amp(){
+SCT_Amp::~SCT_Amp() {
 }
 
 //----------------------------------------------------------------------
@@ -37,136 +37,128 @@ SCT_Amp::~SCT_Amp(){
 //----------------------------------------------------------------------
 StatusCode SCT_Amp::initialize() {
   
-  StatusCode sc = AthAlgTool::initialize();
+  StatusCode sc{AthAlgTool::initialize()};
   if (sc.isFailure()) {
-    ATH_MSG_FATAL ( "SCT_Amp::initialize() failed" );
-    return sc ;
+    ATH_MSG_FATAL("SCT_Amp::initialize() failed");
+    return sc;
   }
-  ATH_MSG_DEBUG ( "SCT_Amp::initialize()" );
+  ATH_MSG_DEBUG("SCT_Amp::initialize()");
 
   /** CHLEP Units */
   m_PeakTime *= CLHEP::ns;
-  m_dt *= CLHEP::ns ;
-  m_tmin *= CLHEP::ns ;
-  m_tmax *= CLHEP::ns ;
+  m_dt *= CLHEP::ns;
+  m_tmin *= CLHEP::ns;
+  m_tmax *= CLHEP::ns;
 
   m_NormConstCentral = (exp(3.0)/27.0)*(1.0-m_CrossFactor2sides)*(1.0-m_CrossFactorBack); 
   m_NormConstNeigh = exp(3.0-sqrt(3.0))/(6*(2.0*sqrt(3.0)-3.0));
   m_NormConstNeigh *= (m_CrossFactor2sides/2.0)*(1.0-m_CrossFactorBack);
 
 #ifdef SCT_DIG_DEBUG
-  ATH_MSG_INFO (  "\tAmp created, PeakTime = " << m_PeakTime );
-  ATH_MSG_INFO (  "\tResponse will be CR-RC^3 with tp = " << m_PeakTime/3.0 );
-  ATH_MSG_INFO (  "\tCoupling to both neighbours = " << m_CrossFactor2sides );
-  ATH_MSG_INFO (  "\tCoupling to backplane = " << m_CrossFactorBack );
-  ATH_MSG_INFO (  "\tNormalization for central " << m_NormConstCentral );
-  ATH_MSG_INFO (  "\tNormalization for neighbour " << m_NormConstNeigh  );
+  ATH_MSG_INFO("\tAmp created, PeakTime = " << m_PeakTime);
+  ATH_MSG_INFO("\tResponse will be CR-RC^3 with tp = " << m_PeakTime/3.0);
+  ATH_MSG_INFO("\tCoupling to both neighbours = " << m_CrossFactor2sides);
+  ATH_MSG_INFO("\tCoupling to backplane = " << m_CrossFactorBack);
+  ATH_MSG_INFO("\tNormalization for central " << m_NormConstCentral);
+  ATH_MSG_INFO("\tNormalization for neighbour " << m_NormConstNeigh);
 #endif
 
-  return sc ;
+  return sc;
 }
 
 //----------------------------------------------------------------------
 // Finalize 
 //----------------------------------------------------------------------
 StatusCode SCT_Amp::finalize() {
-  StatusCode sc = AthAlgTool::finalize();
+  StatusCode sc{AthAlgTool::finalize()};
   if (sc.isFailure()) {
-    ATH_MSG_FATAL ( "SCT_Amp::finalize() failed" );
-    return sc ;
+    ATH_MSG_FATAL("SCT_Amp::finalize() failed");
+    return sc;
   }
-  ATH_MSG_DEBUG ( "SCT_Amp::finalize()" );
-  return sc ;
+  ATH_MSG_DEBUG("SCT_Amp::finalize()");
+  return sc;
 }
 
 //----------------------------------------------------------------------
 // Electronique response is now CR-RC^3 of the charge diode
 //----------------------------------------------------------------------
-float SCT_Amp::response(const list_t & Charges,const float timeOfThreshold) const {
-  float resp=0.0 ;
-  float tp=m_PeakTime/3.0 ; // for CR-RC^3
-  list_t::const_iterator p_charge = Charges.begin();
-  list_t::const_iterator p_charge_end = Charges.end();
-  for(;	p_charge != p_charge_end; ++p_charge) {
-    float ch=p_charge->charge() ;
-    float tC= timeOfThreshold - p_charge->time() ;
-    // if(tC > 0.0) resp += ch*std::pow(tC/tp,3)*exp(-tC/tp) ;
-    if(tC > 0.0) 
-      {
-	tC/=tp; //to avoid doing it four times
-	resp += ch*tC*tC*tC*exp(-tC) ; //faster than pow
-      }
+float SCT_Amp::response(const list_t& Charges,const float timeOfThreshold) const {
+  float resp{0.0};
+  float tp{static_cast<float>(m_PeakTime/3.0)}; // for CR-RC^3
+  list_t::const_iterator p_charge{Charges.begin()};
+  list_t::const_iterator p_charge_end{Charges.end()};
+  for (; p_charge != p_charge_end; ++p_charge) {
+    float ch{static_cast<float>(p_charge->charge())};
+    float tC{static_cast<float>(timeOfThreshold - p_charge->time())};
+    if(tC > 0.0) {
+      tC/=tp; //to avoid doing it four times
+      resp += ch*tC*tC*tC*exp(-tC); //faster than pow
+    }
   }
-  return resp*m_NormConstCentral ;
+  return resp*m_NormConstCentral;
 }
 
-void SCT_Amp::response(const list_t & Charges,const float timeOfThreshold, std::vector<float> &response) const {
-  short bin_max = response.size();
+void SCT_Amp::response(const list_t& Charges,const float timeOfThreshold, std::vector<float>& response) const {
+  short bin_max{static_cast<short>(response.size())};
   std::fill(response.begin(), response.end(), 0.0);
-  float tp=m_PeakTime/3.0 ; // for CR-RC^3
-  list_t::const_iterator p_charge = Charges.begin();
-  list_t::const_iterator p_charge_end = Charges.end();
-  for(;	p_charge != p_charge_end; ++p_charge) {
-    float ch=p_charge->charge() ;
-    float ch_time = p_charge->time();
-    short bin_end = bin_max-1;
-    for(short bin=-1; bin<bin_end; ++bin){
-      float bin_timeOfThreshold = timeOfThreshold + bin*25;//25, fix me
-      float tC= bin_timeOfThreshold - ch_time;
-      //if(tC > 0.0) response[bin+1] += ch*std::pow(tC/tp,3)*exp(-tC/tp) ;
-      if(tC > 0.0) 
-	{
-	  tC/=tp; //to avoid doing it four times
-	  response[bin+1] += ch*tC*tC*tC*exp(-tC) ; //faster than pow
-	}
+  float tp{static_cast<float>(m_PeakTime/3.0)}; // for CR-RC^3
+  list_t::const_iterator p_charge{Charges.begin()};
+  list_t::const_iterator p_charge_end{Charges.end()};
+  for (; p_charge != p_charge_end; ++p_charge) {
+    float ch{static_cast<float>(p_charge->charge())};
+    float ch_time{static_cast<float>(p_charge->time())};
+    short bin_end{static_cast<short>(bin_max-1)};
+    for (short bin{-1}; bin<bin_end; ++bin) {
+      float bin_timeOfThreshold{timeOfThreshold + bin*25};//25, fix me
+      float tC{bin_timeOfThreshold - ch_time};
+      if (tC > 0.0) {
+	tC/=tp; //to avoid doing it four times
+	response[bin+1] += ch*tC*tC*tC*exp(-tC); //faster than pow
+      }
     }
   }
-  for(short bin=0; bin<bin_max; ++bin) response[bin] = response[bin]*m_NormConstCentral;
+  for (short bin{0}; bin<bin_max; ++bin) response[bin] = response[bin]*m_NormConstCentral;
   return;
 }
 
 //----------------------------------------------------------------------
 // differenciated and scaled pulse on the neighbour strip! 
 //----------------------------------------------------------------------
-float SCT_Amp::crosstalk(const list_t & Charges,const float timeOfThreshold) const {
-  float resp=0 ;
-  float tp=m_PeakTime/3.0 ; // for CR-RC^3
-  list_t::const_iterator p_charge = Charges.begin();
-  list_t::const_iterator p_charge_end = Charges.end();
-  for(;	p_charge != p_charge_end; ++p_charge) {
-    float ch=p_charge->charge() ;
-    float tC= timeOfThreshold - p_charge->time() ;
-    //if(tC > 0.0) resp += ch*std::pow(tC/tp,2)*exp(-tC/tp)*(3.0-tC/tp) ;
-    if(tC > 0.0) 
-      {
-	tC/=tp; //to avoid doing it four times
-	resp += ch*tC*tC*exp(-tC)*(3.0-tC) ; //faster than pow
-      }
+float SCT_Amp::crosstalk(const list_t& Charges,const float timeOfThreshold) const {
+  float resp{0};
+  float tp{static_cast<float>(m_PeakTime/3.0)}; // for CR-RC^3
+  list_t::const_iterator p_charge{Charges.begin()};
+  list_t::const_iterator p_charge_end{Charges.end()};
+  for (; p_charge != p_charge_end; ++p_charge) {
+    float ch{static_cast<float>(p_charge->charge())};
+    float tC{static_cast<float>(timeOfThreshold - p_charge->time())};
+    if (tC > 0.0) {
+      tC/=tp; //to avoid doing it four times
+      resp += ch*tC*tC*exp(-tC)*(3.0-tC); //faster than pow
+    }
   }
-  return resp*m_NormConstNeigh ;
+  return resp*m_NormConstNeigh;
 }
 
-void SCT_Amp::crosstalk(const list_t & Charges,const float timeOfThreshold, std::vector<float> &response) const {
-  short bin_max = response.size();
+void SCT_Amp::crosstalk(const list_t& Charges, const float timeOfThreshold, std::vector<float>& response) const {
+  short bin_max{static_cast<short>(response.size())};
   std::fill(response.begin(), response.end(), 0.0);
-  float tp=m_PeakTime/3.0 ; // for CR-RC^3
-  list_t::const_iterator p_charge = Charges.begin();
-  list_t::const_iterator p_charge_end = Charges.end();
-  for(;	p_charge != p_charge_end; ++p_charge) {
-    float ch=p_charge->charge();
-    float ch_time = p_charge->time();
-    short bin_end = bin_max-1;
-    for(short bin=-1; bin<bin_end; ++bin){
-      float bin_timeOfThreshold = timeOfThreshold + bin*25;// 25, fix me
-      float tC= bin_timeOfThreshold - ch_time;
-      //if(tC > 0.0) response[bin+1] += ch*std::pow(tC/tp,2)*exp(-tC/tp)*(3.0-tC/tp);
-      if(tC > 0.0) 
-	{
-	  tC/=tp; //to avoid doing it four times
-	  response[bin+1] += ch*tC*tC*exp(-tC)*(3.0-tC) ; //faster than pow
-	}
+  float tp{static_cast<float>(m_PeakTime/3.0)}; // for CR-RC^3
+  list_t::const_iterator p_charge{Charges.begin()};
+  list_t::const_iterator p_charge_end{Charges.end()};
+  for (;	p_charge != p_charge_end; ++p_charge) {
+    float ch{static_cast<float>(p_charge->charge())};
+    float ch_time{static_cast<float>(p_charge->time())};
+    short bin_end{static_cast<short>(bin_max-1)};
+    for (short bin{-1}; bin<bin_end; ++bin) {
+      float bin_timeOfThreshold{timeOfThreshold + bin*25}; // 25, fix me
+      float tC{bin_timeOfThreshold - ch_time};
+      if (tC > 0.0) {
+	tC/=tp; //to avoid doing it four times
+	response[bin+1] += ch*tC*tC*exp(-tC)*(3.0-tC); //faster than pow
+      }
     }
   }
-  for(short bin=0; bin<bin_max; ++bin) response[bin] = response[bin]*m_NormConstNeigh;
+  for (short bin{0}; bin<bin_max; ++bin) response[bin] = response[bin]*m_NormConstNeigh;
   return;
 }
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Amp.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.cxx
old mode 100755
new mode 100644
index 37b16c7e2bf9a0a0971ab1573269dc82cbe96e23..12d737bba1062e7403fa7f59f30f9f919516be60
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.cxx
@@ -71,55 +71,53 @@ SCT_DetailedSurfaceChargesGenerator::SCT_DetailedSurfaceChargesGenerator(const s
     m_vs_h(8761659.83530), //<! hole mobility at 273.15K
     m_Ec_h(15366.52650), 
     m_PotentialValue{{0.}},
-    m_ExValue150{{0.}},
-    m_EyValue150{{0.}},
-    m_stripCharge{{{{0.}}}},
-    m_distortionsTool("SCT_DistortionsTool", this),
-    m_siConditionsSvc("SCT_SiliconConditionsSvc",name),
-    m_siPropertiesSvc("SCT_SiPropertiesSvc",name),
-    m_element(0),
-    m_rndmEngine(0),
-    m_rndmEngineName("SCT_Digitization")
-{
-  declareInterface< ISCT_SurfaceChargesGenerator  >( this );
-
-  declareProperty("FixedTime",m_tfix=-999);                //!< fixed timing
-  declareProperty("SubtractTime",m_tsubtract=-999);        //!< substract drift time
-  declareProperty("SurfaceDriftTime",m_tSurfaceDrift=10);  //!< max surface drift time
-  declareProperty("NumberOfCharges",m_numberOfCharges=1);
-  declareProperty("SmallStepLength",m_smallStepLength=5);
-  declareProperty("ChargeDriftModel",m_chargeDriftModel=1); //!< 1 eh transport model, 2 map model
-  declareProperty("EFieldModel",m_eFieldModel=2);           //!< FEM solution as default
-  declareProperty("DepletionVoltage",m_depletionVoltage=70);
-  declareProperty("BiasVoltage",m_biasVoltage=150);
-  declareProperty("MagneticField",m_magneticField=-2.0);
-  declareProperty("SensorTemperature",m_sensorTemperature=273.15);
-  declareProperty("TransportTimeStep",m_transportTimeStep=0.25);
-  declareProperty("TransportTimeMax",m_transportTimeMax=25.0);
-  declareProperty("SiConditionsSvc", m_siConditionsSvc);
-  declareProperty("SiPropertiesSvc", m_siPropertiesSvc);
-  //  declareProperty("rndmEngineName",m_rndmEngineName="SCT_Digitization");
-  declareProperty("doDistortions",   m_doDistortions, "Simulation of module distortions");
-  declareProperty("SCTDistortionsTool", m_distortionsTool, "Tool to retrieve SCT distortions");
-  declareProperty("doHistoTrap", m_doHistoTrap, "Allow filling of histos for charge trapping effect"); 
-  declareProperty("doTrapping", m_doTrapping, "Simulation of charge trapping effect"); 
-  declareProperty("Fluence", m_Fluence, "Fluence for charge trapping effect");
-  // 
-  m_beta_e = 2.57E-2* pow(m_sensorTemperature,0.66);
-  m_beta_h = 0.46 * pow(m_sensorTemperature,0.17);
-  double Emean = m_biasVoltage / m_depletion_depth;
-  m_driftMobility  = mud_h(Emean);
-  m_diffusion = m_kB * m_sensorTemperature * m_driftMobility/ m_e;
-  double r_h = 0.72 - 0.0005*(m_sensorTemperature-273.15);
-  m_tanLA = r_h * m_driftMobility * m_magneticField * 1.E-4;
-  // sroe: the following were never initialised before, which begs the question:
-  // Did this code *ever* work? Has it *ever* been used?
-  m_stripCharge_ixmax = 80;
-  m_stripCharge_iymax = 284;
-  m_stripCharge_dx=1;
-  m_stripCharge_dy=1;
-  declareProperty("isOverlay", m_isOverlay=false);
-}
+  m_ExValue150{{0.}},
+  m_EyValue150{{0.}},
+  m_stripCharge{{{{0.}}}},
+  m_siConditionsSvc("SCT_SiliconConditionsSvc",name),
+  m_siPropertiesSvc("SCT_SiPropertiesSvc",name),
+  m_element(0),
+  m_rndmEngine(0),
+  m_rndmEngineName("SCT_Digitization")
+  {
+    declareInterface< ISCT_SurfaceChargesGenerator  >( this );
+
+    declareProperty("FixedTime",m_tfix=-999);                //!< fixed timing
+    declareProperty("SubtractTime",m_tsubtract=-999);        //!< substract drift time
+    declareProperty("SurfaceDriftTime",m_tSurfaceDrift=10);  //!< max surface drift time
+    declareProperty("NumberOfCharges",m_numberOfCharges=1);
+    declareProperty("SmallStepLength",m_smallStepLength=5);
+    declareProperty("ChargeDriftModel",m_chargeDriftModel=1); //!< 1 eh transport model, 2 map model
+    declareProperty("EFieldModel",m_eFieldModel=2);           //!< FEM solution as default
+    declareProperty("DepletionVoltage",m_depletionVoltage=70);
+    declareProperty("BiasVoltage",m_biasVoltage=150);
+    declareProperty("MagneticField",m_magneticField=-2.0);
+    declareProperty("SensorTemperature",m_sensorTemperature=273.15);
+    declareProperty("TransportTimeStep",m_transportTimeStep=0.25);
+    declareProperty("TransportTimeMax",m_transportTimeMax=25.0);
+    declareProperty("SiConditionsSvc", m_siConditionsSvc);
+    declareProperty("SiPropertiesSvc", m_siPropertiesSvc);
+    //  declareProperty("rndmEngineName",m_rndmEngineName="SCT_Digitization");
+    declareProperty("doDistortions",   m_doDistortions, "Simulation of module distortions");
+    declareProperty("doHistoTrap", m_doHistoTrap, "Allow filling of histos for charge trapping effect"); 
+    declareProperty("doTrapping", m_doTrapping, "Simulation of charge trapping effect"); 
+    declareProperty("Fluence", m_Fluence, "Fluence for charge trapping effect");
+    // 
+    m_beta_e = 2.57E-2* pow(m_sensorTemperature,0.66);
+    m_beta_h = 0.46 * pow(m_sensorTemperature,0.17);
+    double Emean = m_biasVoltage / m_depletion_depth;
+    m_driftMobility  = mud_h(Emean);
+    m_diffusion = m_kB * m_sensorTemperature * m_driftMobility/ m_e;
+    double r_h = 0.72 - 0.0005*(m_sensorTemperature-273.15);
+    m_tanLA = r_h * m_driftMobility * m_magneticField * 1.E-4;
+    // sroe: the following were never initialised before, which begs the question:
+    // Did this code *ever* work? Has it *ever* been used?
+    m_stripCharge_ixmax = 80;
+    m_stripCharge_iymax = 284;
+    m_stripCharge_dx=1;
+    m_stripCharge_dy=1;
+    declareProperty("isOverlay", m_isOverlay=false);
+  }
 
 // Destructor:
 SCT_DetailedSurfaceChargesGenerator::~SCT_DetailedSurfaceChargesGenerator(){}
@@ -149,13 +147,6 @@ StatusCode SCT_DetailedSurfaceChargesGenerator::initialize() {
     return sc ;
   }
   
-  //Get ISCT_ModuleDistortionsTool
-  sc = m_distortionsTool.retrieve();
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL ( "Could not retrieve distortions tool: " << m_distortionsTool.name() );
-    return sc ;
-  }
-  
   ///////////////////////////////////////////////////  
   if (m_doHistoTrap){  
     //-- Get Histogram Service
@@ -309,7 +300,7 @@ float SCT_DetailedSurfaceChargesGenerator::MaxDriftTime() const {
   }
   else {
     ATH_MSG_INFO ("Error: SiDetectorElement not set!") ;
-   return 0;
+    return 0;
   }
 }
 
@@ -492,7 +483,7 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
       float x1 = xhit+StepX*dstep;//(static_cast<float>(istep)+0.5) ;
       float y1 = yhit+StepY*dstep;//(static_cast<float>(istep)+0.5) ;
 
-     //PJ select driftmodel here
+      //PJ select driftmodel here
       if (m_chargeDriftModel == 0 || m_element->isEndcap()){ //Standard SCT driftmodel
 	y1 += tanLorentz*zReadout ; //!< Taking into account the magnetic field
 	float diffusionSigma = DiffusionSigma(zReadout);
@@ -532,7 +523,7 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
 	}
 	
 	double stripPitch         = p_design->stripPitch();
-  double stripPatternCentre = b_design->phiStripPatternCentre();
+	double stripPatternCentre = b_design->phiStripPatternCentre();
 	double dstrip=(y1-stripPatternCentre)/stripPitch;
 
 	// need the distance from the nearest strips edge not centre, xtaka = 1/2*stripPitch
@@ -625,9 +616,9 @@ void SCT_DetailedSurfaceChargesGenerator::processSiHit(const SiHit& phit, const
 	    double time = 0.;
 	    double charge = 0.;
 	    for (int it=0; it<50; it++) {
-		time = 0.25 + 0.5*it;
-		charge = q1 * inducedCharge(strip, x0, y0, time);
-		if (charge != 0.) inserter(SiSurfaceCharge(position, SiCharge(charge,time+timeOfFlight,hitproc,trklink))) ; 
+	      time = 0.25 + 0.5*it;
+	      charge = q1 * inducedCharge(strip, x0, y0, time);
+	      if (charge != 0.) inserter(SiSurfaceCharge(position, SiCharge(charge,time+timeOfFlight,hitproc,trklink))) ; 
 	    }
 	  }
 	  else {
@@ -749,7 +740,7 @@ void SCT_DetailedSurfaceChargesGenerator::init_mud_h(double T) {
   ATH_MSG_INFO("     m_beta_h  = "<< m_beta_h);
 #endif  
 
-return ;
+  return ;
 }
 
 //--------------------------------------------------------------
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h
old mode 100755
new mode 100644
index 7f84931ee3ab170a098f95269c64f6c0888a23b9..ed4ce322810f15466eb6ae6ba53751a401019a17
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DetailedSurfaceChargesGenerator.h
@@ -70,7 +70,7 @@ class SCT_DetailedSurfaceChargesGenerator : public AthAlgTool, virtual public IS
   /** AlgTool finalize */
   virtual StatusCode finalize();
 
-private:
+ private:
 
   void setComTime(float comTime)                                 {m_comTime = comTime;} 
   void setFixedTime(float fixedTime)                             {m_tfix = fixedTime;} 
@@ -189,7 +189,7 @@ private:
   double m_stripCharge_dy;
   
   //ToolHandles
-  ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool;
+  ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool{this, "SCTDistortionsTool", "SCT_DistortionsTool", "Tool to retrieve SCT distortions"};
   //ServiceHandles
   ServiceHandle<ISiliconConditionsSvc> m_siConditionsSvc;
   ServiceHandle<ISiPropertiesSvc> m_siPropertiesSvc;
@@ -202,6 +202,3 @@ private:
 };
 
 #endif // SCT_DETAILEDSURFACECHARGESGENERATOR_H
-
-
- 
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Digitization.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Digitization.cxx
old mode 100755
new mode 100644
index 2e83371f12f5f89dd442dd770d31f85c50a6e9cb..721a0a0a2868ecaa1ec8e285d6b15d2aaf10de52
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Digitization.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_Digitization.cxx
@@ -8,32 +8,19 @@
 //----------------------------------------------------------------------
 // Constructor with parameters:
 //---------------------------------------------------------------------- 
-SCT_Digitization::SCT_Digitization(const std::string &name, ISvcLocator *pSvcLocator) :
-  AthAlgorithm(name, pSvcLocator),
-  m_sctDigitizationTool("SCT_DigitizationTool", this)
+SCT_Digitization::SCT_Digitization(const std::string& name, ISvcLocator* pSvcLocator) :
+  AthAlgorithm(name, pSvcLocator)
 {
-  declareProperty("DigitizationTool",     m_sctDigitizationTool,                 "SCT_DigitizationTool name");              
 }
 
-SCT_Digitization::~SCT_Digitization()
-{
-
+SCT_Digitization::~SCT_Digitization() {
 }
 
 //----------------------------------------------------------------------
 // Initialize method:
 //----------------------------------------------------------------------
 StatusCode SCT_Digitization::initialize() {
-
-  ATH_MSG_DEBUG ( "SCT_Digitization::initialize()" );
-
-  if (m_sctDigitizationTool.retrieve().isFailure())
-  {
-    ATH_MSG_FATAL ( "Could not retrieve ISCT_DigitizationTool");
-    return StatusCode::FAILURE;
-  }
-  else ATH_MSG_DEBUG ( "Successfully retreived ISCT_DigitizaitonTool." );
-
+  ATH_MSG_DEBUG("SCT_Digitization::initialize()");
   return StatusCode::SUCCESS ;
 }
 
@@ -42,8 +29,7 @@ StatusCode SCT_Digitization::initialize() {
 //---------------------------------------------------------------------- 
 
 StatusCode SCT_Digitization::execute() {
- 
-  ATH_MSG_DEBUG ( "execute()" );
+  ATH_MSG_DEBUG("execute()");
   return m_sctDigitizationTool->processAllSubEvents();
 } 
 
@@ -51,7 +37,6 @@ StatusCode SCT_Digitization::execute() {
 // Finalize method:                                                     //
 //----------------------------------------------------------------------//
 StatusCode SCT_Digitization::finalize() {
-
-  ATH_MSG_DEBUG ( "SCT_Digitization::finalize()" );
+  ATH_MSG_DEBUG("SCT_Digitization::finalize()");
   return StatusCode::SUCCESS;
 }
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
old mode 100755
new mode 100644
index 8b5c8b50149c10fc9dcba296b866d273108a3216..9b7df5667dd4ecdbb7f3c20f4b4ae3fd2a36a9e4
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_DigitizationTool.cxx
@@ -37,291 +37,257 @@
 #include <string>
 #include <limits>
 
-static constexpr unsigned int crazyParticleBarcode(
-    std::numeric_limits<int32_t>::max());
+static constexpr unsigned int crazyParticleBarcode(std::numeric_limits<int32_t>::max());
 // Barcodes at the HepMC level are int
 
 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),
-    m_HardScatterSplittingSkipper(false),
-    m_ComTimeKey("ComTime"),
-    m_detID(nullptr),
-    m_detMgr(nullptr),
-    m_sct_FrontEnd("SCT_FrontEnd", this),
-    m_sct_SurfaceChargesGenerator("SCT_SurfaceChargesGenerator", this),
-    m_sct_RandomDisabledCellGenerator("SCT_RandomDisabledCellGenerator", this),
-    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) {
+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},
+  m_HardScatterSplittingSkipper{false},
+  m_ComTimeKey{"ComTime"},
+  m_detID{nullptr},
+  m_detMgr{nullptr},
+  m_sct_FrontEnd{"SCT_FrontEnd", this},
+  m_sct_SurfaceChargesGenerator{"SCT_SurfaceChargesGenerator", this},
+  m_sct_RandomDisabledCellGenerator{"SCT_RandomDisabledCellGenerator", this},
+  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("CosmicsRun", m_cosmicsRun = false,
-                    "Cosmics run selection");
+    declareProperty("FixedTime", m_tfix, "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("OnlyHitElements", m_onlyHitElements, "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 = std::string("SCT_RDOs"),
-                    "Output Object name");
-    declareProperty("OutputSDOName", m_simDataCollMapKey = std::string("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("ParticleBarcodeVeto", m_vetoThisBarcode =
-                        crazyParticleBarcode, "Barcode of particle to ignore");
-    m_WriteSCT1_RawData.declareUpdateHandler(
-        &SCT_DigitizationTool::SetupRdoOutputType, this);
-}
+    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("ParticleBarcodeVeto", m_vetoThisBarcode = crazyParticleBarcode, "Barcode of particle to ignore");
+    m_WriteSCT1_RawData.declareUpdateHandler(&SCT_DigitizationTool::SetupRdoOutputType, this);
+  }
 
 // ----------------------------------------------------------------------
 // Initialize method:
 // ----------------------------------------------------------------------
 StatusCode SCT_DigitizationTool::initialize() {
-    ATH_MSG_DEBUG("SCT_DigitizationTool::initialize()");
-
-    if (m_inputObjectName == "") {
-        ATH_MSG_FATAL("Property InputObjectName not set !");
-        return StatusCode::FAILURE;
-    }
-    else {
-        ATH_MSG_DEBUG("Input objects: '" << m_inputObjectName << "'");
-    }
+  ATH_MSG_DEBUG("SCT_DigitizationTool::initialize()");
 
-    // +++ Init the services
-    CHECK(initServices());
+  if (m_inputObjectName == "") {
+    ATH_MSG_FATAL("Property InputObjectName not set !");
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_DEBUG("Input objects: '" << m_inputObjectName << "'");
+  }
 
-    // +++ Get the random generator engine
-    CHECK(initRandomEngine());
+  // +++ Init the services
+  CHECK(initServices());
 
-    // +++ Get the Surface Charges Generator tool
-    CHECK(initSurfaceChargesGeneratorTool());
+  // +++ Get the random generator engine
+  CHECK(initRandomEngine());
 
+  // +++ Get the Surface Charges Generator tool
+  CHECK(initSurfaceChargesGeneratorTool());
 
-    // +++ Get the Front End tool
-    CHECK(initFrontEndTool());
+  // +++ Get the Front End tool
+  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_MSG_INFO("Use of Random disabled cells");
+  }
 
+  // +++ Initialize WriteHandleKey
+  ATH_CHECK(m_rdoContainerKey.initialize());
+  ATH_CHECK(m_simDataCollMapKey.initialize());
+  ATH_CHECK(m_ComTimeKey.initialize(m_useComTime));
 
-    // +++ 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_MSG_INFO("Use of Random disabled cells");
-    }
-
-    // +++ Initialize WriteHandleKey
-    ATH_CHECK(m_rdoContainerKey.initialize());
-    ATH_CHECK(m_simDataCollMapKey.initialize());
-    ATH_CHECK(m_ComTimeKey.initialize(m_useComTime));
-
-    ATH_MSG_DEBUG("SiDigitizationTool::initialize() complete");
+  ATH_MSG_DEBUG("SiDigitizationTool::initialize() complete");
 
-    return StatusCode::SUCCESS;
+  return StatusCode::SUCCESS;
 }
 
 namespace {
-class SiDigitizationSurfaceChargeInserter
+  class SiDigitizationSurfaceChargeInserter
     : public ISiSurfaceChargesInserter
-{
-public:
-    SiDigitizationSurfaceChargeInserter (const
-                                         InDetDD::SiDetectorElement *sielement,
-                                         SiChargedDiodeCollection *chargedDiodes)
-
-        : m_sielement(sielement),
+  {
+  public:
+    SiDigitizationSurfaceChargeInserter(const InDetDD::SiDetectorElement* sielement,
+					SiChargedDiodeCollection* chargedDiodes)
+      : m_sielement(sielement),
         m_chargedDiodes(chargedDiodes) {
     }
 
-    void operator () (const SiSurfaceCharge &scharge) const;
-private:
-    const InDetDD::SiDetectorElement *m_sielement;
-    SiChargedDiodeCollection *m_chargedDiodes;
-};
+    void operator () (const SiSurfaceCharge& scharge) const;
+  private:
+    const InDetDD::SiDetectorElement* m_sielement;
+    SiChargedDiodeCollection* m_chargedDiodes;
+  };
 
 
-void SiDigitizationSurfaceChargeInserter::operator ()
-    (const SiSurfaceCharge &scharge) const {
+  void SiDigitizationSurfaceChargeInserter::operator ()
+    (const SiSurfaceCharge& scharge) const {
     // get the diode in which this charge is
-    SiCellId diode = m_sielement->cellIdOfPosition(scharge.position());
+    SiCellId diode{m_sielement->cellIdOfPosition(scharge.position())};
 
     if (diode.isValid()) {
-        // add this charge to the collection (or merge in existing charged
-        // diode)
-        m_chargedDiodes->add(diode, scharge.charge());
+      // add this charge to the collection (or merge in existing charged diode)
+      m_chargedDiodes->add(diode, scharge.charge());
     }
-}
+  }
 } // anonymous namespace
 
 // ----------------------------------------------------------------------
 // Initialise the surface charge generator Tool
 // ----------------------------------------------------------------------
 StatusCode SCT_DigitizationTool::initSurfaceChargesGeneratorTool() {
-    StatusCode sc = m_sct_SurfaceChargesGenerator.retrieve();
+  StatusCode sc{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 (!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);
 
-    ATH_MSG_DEBUG("Retrieved and initialised tool " <<
-        m_sct_SurfaceChargesGenerator);
+  ATH_MSG_DEBUG("Retrieved and initialised tool " << m_sct_SurfaceChargesGenerator);
 
-    return sc;
+  return sc;
 }
 
 // ----------------------------------------------------------------------
 // Initialise the Front End electronics Tool
 // ----------------------------------------------------------------------
 StatusCode SCT_DigitizationTool::initFrontEndTool() {
-    StatusCode sc = 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));
-
-    // m_diodeCollectionTools.push_back( &(*m_sct_FrontEnd) ); // retrieve a ref
-    // to the from the tool handle, then take its address.
+  StatusCode sc{m_sct_FrontEnd.retrieve()};
 
-    ATH_MSG_DEBUG("Retrieved and initialised tool " << m_sct_FrontEnd);
+  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;
 }
 
 // ----------------------------------------------------------------------
 // Initialize the Random Engine
 // ----------------------------------------------------------------------
 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);
-        return StatusCode::FAILURE;
-    }
-    ATH_MSG_DEBUG("Get random number engine : <" << rndmEngineName << ">");
-    return StatusCode::SUCCESS;
+  std::string rndmEngineName{"SCT_Digitization"};
+
+  m_rndmEngine = m_rndmSvc->GetEngine(rndmEngineName);
+  if (m_rndmEngine == 0) {
+    ATH_MSG_ERROR("Could not find RndmEngine : " << rndmEngineName);
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_DEBUG("Get random number engine : <" << rndmEngineName << ">");
+  return StatusCode::SUCCESS;
 }
 
 // ----------------------------------------------------------------------
 // Initialize the different services
 // ----------------------------------------------------------------------
 StatusCode SCT_DigitizationTool::initServices() {
-    // +++ Get SCT detector manager
-    std::string managerName = "SCT";
-    StatusCode sc = detStore()->retrieve(m_detMgr, managerName);
-
-    if (sc.isFailure()) {
-        ATH_MSG_ERROR("Failed to retrieve the SCT detector manager:" <<
-            managerName);
-        return sc;
-    }
-    ATH_MSG_DEBUG("Retrieved the SCT detector manager " << managerName);
-
-    // Get SCT ID helper for hash function and Store them using methods from the
-    // SiDigitization.
-    sc = detStore()->retrieve(m_detID, "SCT_ID");
-    if (sc.isFailure()) {
-        ATH_MSG_ERROR("Failed to get SCT ID helper");
-        return sc;
-    }
+  // +++ Get SCT detector manager
+  std::string managerName{"SCT"};
+  StatusCode sc{detStore()->retrieve(m_detMgr, managerName)};
 
-    if (!m_mergeSvc.retrieve().isSuccess()) {
-        ATH_MSG_ERROR("Could not find PileUpMergeSvc");
-        return StatusCode::FAILURE;
-    }
-    if (!m_rndmSvc.retrieve().isSuccess()) {
-        ATH_MSG_ERROR("Could not find given RndmSvc");
-        return StatusCode::FAILURE;
-    }
+  if (sc.isFailure()) {
+    ATH_MSG_ERROR("Failed to retrieve the SCT detector manager:" << managerName);
+    return sc;
+  }
+  ATH_MSG_DEBUG("Retrieved the SCT detector manager " << managerName);
+
+  // Get SCT ID helper for hash function and Store them using methods from the
+  // SiDigitization.
+  sc = detStore()->retrieve(m_detID, "SCT_ID");
+  if (sc.isFailure()) {
+    ATH_MSG_ERROR("Failed to get SCT ID helper");
+    return sc;
+  }
 
-    store(m_detID);
-    // setManager(m_detMgr);
+  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;
+  }
 
-    return sc;
+  store(m_detID);
+
+  return sc;
 }
 
 // ----------------------------------------------------------------------
 // Initialize the disabled cells for cosmics or CTB cases
 // ----------------------------------------------------------------------
 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;
-    }
+  // +++ Retrieve the SCT_RandomDisabledCellGenerator
+  StatusCode sc{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);
+  if (sc.isFailure()) {
+    ATH_MSG_ERROR("Failed to retrieve the SCT_RandomDisabledCellGenerator tool:" << m_sct_RandomDisabledCellGenerator);
     return sc;
-}
+  }
 
-StatusCode SCT_DigitizationTool::processAllSubEvents() {
-    if (prepareEvent(0).isFailure()) {
-        return StatusCode::FAILURE;
-    }
-    ATH_MSG_VERBOSE("Begin digitizeAllHits");
-    if (m_enableHits && !getNextEvent().isFailure()) {
-        digitizeAllHits();
-    }
-    else {
-        ATH_MSG_DEBUG("no hits found in event!");
-    }
-    delete m_chargedDiodes;
-    ATH_MSG_DEBUG("Digitized Elements with Hits");
+  m_sct_RandomDisabledCellGenerator->setRandomEngine(m_rndmEngine);
+  storeTool(&(*m_sct_RandomDisabledCellGenerator));
 
-    // loop over elements without hits
-    digitizeNonHits();
-    ATH_MSG_DEBUG("Digitized Elements without Hits");
+  ATH_MSG_INFO("Retrieved the SCT_RandomDisabledCellGenerator tool:" << m_sct_RandomDisabledCellGenerator);
+  return sc;
+}
 
-    ATH_MSG_VERBOSE("Digitize success!");
-    return StatusCode::SUCCESS;
+StatusCode SCT_DigitizationTool::processAllSubEvents() {
+  if (prepareEvent(0).isFailure()) {
+    return StatusCode::FAILURE;
+  }
+  ATH_MSG_VERBOSE("Begin digitizeAllHits");
+  if (m_enableHits && !getNextEvent().isFailure()) {
+    digitizeAllHits();
+  } else {
+    ATH_MSG_DEBUG("no hits found in event!");
+  }
+  delete m_chargedDiodes;
+  m_chargedDiodes = nullptr;
+  ATH_MSG_DEBUG("Digitized Elements with Hits");
+
+  // loop over elements without hits
+  digitizeNonHits();
+  ATH_MSG_DEBUG("Digitized Elements without Hits");
+
+  ATH_MSG_VERBOSE("Digitize success!");
+  return StatusCode::SUCCESS;
 }
 
 
@@ -329,320 +295,292 @@ StatusCode SCT_DigitizationTool::processAllSubEvents() {
 // prepareEvent
 // ======================================================================
 StatusCode SCT_DigitizationTool::prepareEvent(unsigned int /*index*/) {
-    ATH_MSG_VERBOSE("SCT_DigitizationTool::prepareEvent()");
-    // Create the IdentifiableContainer to contain the digit collections Create
-    // a new RDO container
-    m_rdoContainer = SG::makeHandle(m_rdoContainerKey);
-    ATH_CHECK(m_rdoContainer.record(std::make_unique<SCT_RDO_Container>(m_detID->wafer_hash_max())));
-
-    // Create a map for the SDO and register it into StoreGate
-    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 && 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);
-
-
-    m_thpcsi = new TimedHitCollection<SiHit>();
-    m_chargedDiodes = new SiChargedDiodeCollection;
-    m_HardScatterSplittingSkipper = false;
-    return StatusCode::SUCCESS;
+  ATH_MSG_VERBOSE("SCT_DigitizationTool::prepareEvent()");
+  // Create the IdentifiableContainer to contain the digit collections Create
+  // a new RDO container
+  m_rdoContainer = SG::makeHandle(m_rdoContainerKey);
+  ATH_CHECK(m_rdoContainer.record(std::make_unique<SCT_RDO_Container>(m_detID->wafer_hash_max())));
+
+  // Create a map for the SDO and register it into StoreGate
+  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);
+
+  m_thpcsi = new TimedHitCollection<SiHit>();
+  m_chargedDiodes = new SiChargedDiodeCollection;
+  m_HardScatterSplittingSkipper = false;
+  return StatusCode::SUCCESS;
 }
 
 // =========================================================================
 // mergeEvent
 // =========================================================================
 StatusCode SCT_DigitizationTool::mergeEvent() {
-    ATH_MSG_VERBOSE("SCT_DigitizationTool::mergeEvent()");
+  ATH_MSG_VERBOSE("SCT_DigitizationTool::mergeEvent()");
 
 
-    if (m_enableHits) {
-        digitizeAllHits();
-    }
-    delete m_chargedDiodes;
+  if (m_enableHits) {
+    digitizeAllHits();
+  }
+  delete m_chargedDiodes;
+  m_chargedDiodes = nullptr;
 
-    digitizeNonHits();
+  digitizeNonHits();
 
-    for (std::vector<SiHitCollection *>::iterator it = m_hitCollPtrs.begin();
-         it != m_hitCollPtrs.end(); it++) {
-        (*it)->Clear();
-        delete(*it);
-    }
-    m_hitCollPtrs.clear();
+  for (std::vector<SiHitCollection*>::iterator it{m_hitCollPtrs.begin()}; it != m_hitCollPtrs.end(); it++) {
+    (*it)->Clear();
+    delete (*it);
+  }
+  m_hitCollPtrs.clear();
 
-    ATH_MSG_DEBUG("Digitize success!");
-    return StatusCode::SUCCESS;
+  ATH_MSG_DEBUG("Digitize success!");
+  return StatusCode::SUCCESS;
 }
 
 void SCT_DigitizationTool::digitizeAllHits() {
-    /////////////////////////////////////////////////
-    //
-    // In order to process all element rather than just those with hits we
-    // create a vector to keep track of which elements have been processed.
-    // NB. an element is an sct module
-    //
-    /////////////////////////////////////////////////
-    ATH_MSG_DEBUG("Digitizing hits");
-    int hitcount = 0; // First, elements with hits.
-
-    while (digitizeElement(m_chargedDiodes)) {
-        ATH_MSG_DEBUG("Hit collection ID=" << m_detID->show_to_string(
-                          m_chargedDiodes->identify()));
-
-        hitcount++;  // Hitcount will be a number in the hit collection minus
-                     // number of hits in missing mods
-
-        ATH_MSG_DEBUG("in digitize elements with hits: ec - layer - eta - phi  "
-                      << m_detID->barrel_ec(m_chargedDiodes->identify()) << " - "
-                      << m_detID->layer_disk(m_chargedDiodes->identify()) << " - "
-                      << m_detID->eta_module(m_chargedDiodes->identify()) << " - "
-                      << m_detID->phi_module(m_chargedDiodes->identify()) << " - "
-                      << " processing hit number " << hitcount
-                      );
-
-        // Have a flag to check if the module is present or not
-        // Generally assume it is:
-
-        IdentifierHash idHash = m_chargedDiodes->identifyHash();
-
-        assert(idHash < m_processedElements.size());
-        m_processedElements[idHash] = true;
-
-        // create and store RDO and SDO
-
-        if (!m_chargedDiodes->empty()) {
-            StatusCode sc = createAndStoreRDO(m_chargedDiodes);
-            if (sc.isSuccess()) { // error msg is given inside
-                                  // createAndStoreRDO()
-                addSDO(m_chargedDiodes);
-            }
-        }
-
-        m_chargedDiodes->clear();
-    }
-    ATH_MSG_DEBUG("hits processed");
-    return;
+  /////////////////////////////////////////////////
+  //
+  // In order to process all element rather than just those with hits we
+  // create a vector to keep track of which elements have been processed.
+  // NB. an element is an sct module
+  //
+  /////////////////////////////////////////////////
+  ATH_MSG_DEBUG("Digitizing hits");
+  int hitcount{0}; // First, elements with hits.
+
+  while (digitizeElement(m_chargedDiodes)) {
+    ATH_MSG_DEBUG("Hit collection ID=" << m_detID->show_to_string(m_chargedDiodes->identify()));
+
+    hitcount++;  // Hitcount will be a number in the hit collection minus
+    // number of hits in missing mods
+
+    ATH_MSG_DEBUG("in digitize elements with hits: ec - layer - eta - phi  "
+		  << m_detID->barrel_ec(m_chargedDiodes->identify()) << " - "
+		  << m_detID->layer_disk(m_chargedDiodes->identify()) << " - "
+		  << m_detID->eta_module(m_chargedDiodes->identify()) << " - "
+		  << m_detID->phi_module(m_chargedDiodes->identify()) << " - "
+		  << " processing hit number " << hitcount);
+
+    // Have a flag to check if the module is present or not
+    // Generally assume it is:
+
+    IdentifierHash idHash{m_chargedDiodes->identifyHash()};
+
+    assert(idHash < m_processedElements.size());
+    m_processedElements[idHash] = true;
+
+    // create and store RDO and SDO
+
+    if (!m_chargedDiodes->empty()) {
+      StatusCode sc{createAndStoreRDO(m_chargedDiodes)};
+      if (sc.isSuccess()) { // error msg is given inside
+	// createAndStoreRDO()
+	addSDO(m_chargedDiodes);
+      }
+    }
+
+    m_chargedDiodes->clear();
+  }
+  ATH_MSG_DEBUG("hits processed");
+  return;
 }
 
 // digitize elements without hits
 void SCT_DigitizationTool::digitizeNonHits() {
-    if (m_onlyHitElements) {
-        return;
-    }
-
-    ATH_MSG_DEBUG("processing elements without hits");
-    m_chargedDiodes = new SiChargedDiodeCollection;
-
-    for (unsigned int i = 0; i < m_processedElements.size(); i++) {
-        if (!m_processedElements[i]) {
-            IdentifierHash idHash = i;
-            if (!idHash.is_valid()) {
-                ATH_MSG_ERROR("SCT Detector element id hash is invalid = " <<
-                    i);
-            }
-
-            const InDetDD::SiDetectorElement *element =
-                m_detMgr->getDetectorElement(idHash);
-            if (element) {
-                ATH_MSG_DEBUG(
-                    "In digitize of untouched elements: layer - phi - eta  "
-                    << m_detID->layer_disk(element->identify()) << " - "
-                    << m_detID->phi_module(element->identify()) << " - "
-                    << m_detID->eta_module(element->identify()) << " - "
-                    << "size: " << m_processedElements.size()
-                    );
-
-                m_chargedDiodes->setDetectorElement(element);
-                ATH_MSG_DEBUG("calling applyProcessorTools() for NON hits");
-                applyProcessorTools(m_chargedDiodes);
-
-                // Create and store RDO and SDO
-                // Don't create empty ones.
-                if (!m_chargedDiodes->empty()) {
-                    StatusCode sc = createAndStoreRDO(m_chargedDiodes);
-                    if (sc.isSuccess()) {// error msg is given inside
-                                         // createAndStoreRDO()
-                        addSDO(m_chargedDiodes);
-                    }
-                }
-
-                m_chargedDiodes->clear();
-            }
-        }
-    }
-
-    delete m_chargedDiodes;
+  if (m_onlyHitElements) {
     return;
+  }
+
+  ATH_MSG_DEBUG("processing elements without hits");
+  m_chargedDiodes = new SiChargedDiodeCollection;
+
+  for (unsigned int i{0}; i < m_processedElements.size(); i++) {
+    if (!m_processedElements[i]) {
+      IdentifierHash idHash{i};
+      if (!idHash.is_valid()) {
+	ATH_MSG_ERROR("SCT Detector element id hash is invalid = " << i);
+      }
+
+      const InDetDD::SiDetectorElement* element{m_detMgr->getDetectorElement(idHash)};
+      if (element) {
+	ATH_MSG_DEBUG("In digitize of untouched elements: layer - phi - eta  "
+		      << m_detID->layer_disk(element->identify()) << " - "
+		      << m_detID->phi_module(element->identify()) << " - "
+		      << m_detID->eta_module(element->identify()) << " - "
+		      << "size: " << m_processedElements.size());
+
+	m_chargedDiodes->setDetectorElement(element);
+	ATH_MSG_DEBUG("calling applyProcessorTools() for NON hits");
+	applyProcessorTools(m_chargedDiodes);
+
+	// Create and store RDO and SDO
+	// Don't create empty ones.
+	if (!m_chargedDiodes->empty()) {
+	  StatusCode sc{createAndStoreRDO(m_chargedDiodes)};
+	  if (sc.isSuccess()) {// error msg is given inside
+	    // createAndStoreRDO()
+	    addSDO(m_chargedDiodes);
+	  }
+	}
+
+	m_chargedDiodes->clear();
+      }
+    }
+  }
+
+  delete m_chargedDiodes;
+  m_chargedDiodes = nullptr;
+  return;
 }
 
-bool SCT_DigitizationTool::digitizeElement(
-    SiChargedDiodeCollection *chargedDiodes) {
-    if (0 == m_thpcsi) {
-        ATH_MSG_ERROR("thpcsi should not be zero!");
-
-        return false;
-    }
-
-    // get the iterator pairs for this DetEl
-
-    TimedHitCollection<SiHit>::const_iterator i, e;
-    if (m_thpcsi->nextDetectorElement(i, e) == false) { // no more hits
-        delete m_thpcsi;
-        m_thpcsi = 0;
-        return false;
-    }
-
-    // create the identifier for the collection:
-    ATH_MSG_DEBUG("create ID for the hit collection");
-    Identifier id;
-    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 == 0) {
-            ATH_MSG_ERROR("expected a SCT_ID but failed...");
-            return false;
-        }
-        id = sctID->wafer_id(Barrel, firstHit->getLayerDisk(),
-                             firstHit->getPhiModule(), firstHit->getEtaModule(),
-                             firstHit->getSide());
-    }
-
-
-    // get the det element from the manager
-    InDetDD::SiDetectorElement *sielement = m_detMgr->getDetectorElement(id);
-
-    if (sielement == 0) {
-        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;
-    }
-    // create the charged diodes collection
-    chargedDiodes->setDetectorElement(sielement);
-
-    // Loop over the hits and created charged diodes:
-    while (i != e) {
-        TimedHitPtr<SiHit> phit(*i++);
-
-        // skip hits which are more than 10us away
-        if (fabs(phit->meanTime()) < 10000. * CLHEP::ns) {
-            ATH_MSG_DEBUG("HASH = " << m_detID->wafer_hash(m_detID->wafer_id(
-                                                               phit->
-                                                                getBarrelEndcap(),
-                                                               phit->
-            getLayerDisk(), phit->getPhiModule(),
-                                                               phit->
-                                                                getEtaModule(),
-                                                               phit->getSide())));
-            ATH_MSG_DEBUG("calling process() for all methods");
-            m_sct_SurfaceChargesGenerator->setDetectorElement(sielement);
-
-            // const ISiSurfaceChargesInserter *charge_inserter = 0;
-            // m_sct_SurfaceChargesGenerator->process(phit, *charge_inserter);
-            m_sct_SurfaceChargesGenerator->process(phit,
-                                                   SiDigitizationSurfaceChargeInserter(
-                                                       sielement,
-                                                       chargedDiodes));
-            ATH_MSG_DEBUG("charges filled!");
-        }
-    }
-    applyProcessorTools(chargedDiodes); // !< Use of the new AlgTool surface
-                                        // charges generator class
-    return true;
+bool SCT_DigitizationTool::digitizeElement(SiChargedDiodeCollection* chargedDiodes) {
+  if (0 == m_thpcsi) {
+    ATH_MSG_ERROR("thpcsi should not be zero!");
+
+    return false;
+  }
+
+  // get the iterator pairs for this DetEl
+
+  TimedHitCollection<SiHit>::const_iterator i, e;
+  if (m_thpcsi->nextDetectorElement(i, e) == false) { // no more hits
+    delete m_thpcsi;
+    m_thpcsi = nullptr;
+    return false;
+  }
+
+  // create the identifier for the collection:
+  ATH_MSG_DEBUG("create ID for the hit collection");
+  Identifier id;
+  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());
+  }
+
+
+  // get the det element from the manager
+  InDetDD::SiDetectorElement* sielement{m_detMgr->getDetectorElement(id)};
+
+  if (sielement == nullptr) {
+    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;
+  }
+  // create the charged diodes collection
+  chargedDiodes->setDetectorElement(sielement);
+
+  // Loop over the hits and created charged diodes:
+  while (i != e) {
+    TimedHitPtr<SiHit> phit{*i++};
+
+    // skip hits which are more than 10us away
+    if (fabs(phit->meanTime()) < 10000. * CLHEP::ns) {
+      ATH_MSG_DEBUG("HASH = " << m_detID->wafer_hash(m_detID->wafer_id(phit->getBarrelEndcap(),
+								       phit->getLayerDisk(),
+								       phit->getPhiModule(),
+								       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));
+      ATH_MSG_DEBUG("charges filled!");
+    }
+  }
+  applyProcessorTools(chargedDiodes); // !< Use of the new AlgTool surface
+  // charges generator class
+  return true;
 }
 
 // -----------------------------------------------------------------------------
 // Applies processors to the current detector element for the current element:
 // -----------------------------------------------------------------------------
-void SCT_DigitizationTool::applyProcessorTools(
-    SiChargedDiodeCollection *chargedDiodes) {
-    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);
-
-        processorNumber++;
-        ATH_MSG_DEBUG("Applied processor # " << processorNumber);
-    }
+void SCT_DigitizationTool::applyProcessorTools(SiChargedDiodeCollection* chargedDiodes) {
+  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);
+
+    processorNumber++;
+    ATH_MSG_DEBUG("Applied processor # " << processorNumber);
+  }
 }
 
 StatusCode SCT_DigitizationTool::processBunchXing(int bunchXing,
                                                   SubEventIterator bSubEvents,
                                                   SubEventIterator eSubEvents) {
-    ATH_MSG_VERBOSE("SCT_DigitizationTool::processBunchXing() " << bunchXing);
-    // decide if this event will be processed depending on
-    // HardScatterSplittingMode & bunchXing
-    if (m_HardScatterSplittingMode == 2 && !m_HardScatterSplittingSkipper) {
-        m_HardScatterSplittingSkipper = true;
-        return StatusCode::SUCCESS;
-    }
-    if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper) {
-        return StatusCode::SUCCESS;
-    }
-    if (m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper) {
-        m_HardScatterSplittingSkipper = true;
-    }
-
-    SubEventIterator iEvt = bSubEvents;
-    for (; iEvt != eSubEvents; iEvt++) {
-        StoreGateSvc &seStore = *iEvt->ptr()->evtStore();
-        ATH_MSG_VERBOSE("SubEvt StoreGate " << seStore.name() << " :"
-                                            << " bunch crossing : " << bunchXing
-                                            << " time offset : " << iEvt->time()
-                                            << " event number : " <<
-            iEvt->ptr()->eventNumber()
-                                            << " run number : " <<
-            iEvt->ptr()->runNumber());
-        const SiHitCollection *seHitColl(0);
-        if (!seStore.retrieve(seHitColl, m_inputObjectName).isSuccess()) {
-            ATH_MSG_ERROR(
-                "SubEvent SCT SiHitCollection not found in StoreGate " <<
-                seStore.name());
-            return StatusCode::FAILURE;
-        }
-        ATH_MSG_DEBUG("SiHitCollection found with " << seHitColl->size() <<
-            " hits");
-        PileUpTimeEventIndex timeIndex(iEvt->time(), iEvt->index());
-        SiHitCollection *hitCollPtr = new SiHitCollection(*seHitColl);
-        m_thpcsi->insert(timeIndex, hitCollPtr);
-        m_hitCollPtrs.push_back(hitCollPtr);
-    }
-
+  ATH_MSG_VERBOSE("SCT_DigitizationTool::processBunchXing() " << bunchXing);
+  // decide if this event will be processed depending on
+  // HardScatterSplittingMode & bunchXing
+  if (m_HardScatterSplittingMode == 2 and !m_HardScatterSplittingSkipper) {
+    m_HardScatterSplittingSkipper = true;
+    return StatusCode::SUCCESS;
+  }
+  if (m_HardScatterSplittingMode == 1 and m_HardScatterSplittingSkipper) {
     return StatusCode::SUCCESS;
+  }
+  if (m_HardScatterSplittingMode == 1 and !m_HardScatterSplittingSkipper) {
+    m_HardScatterSplittingSkipper = true;
+  }
+
+  SubEventIterator iEvt{bSubEvents};
+  for (; iEvt != eSubEvents; iEvt++) {
+    StoreGateSvc& seStore{*iEvt->ptr()->evtStore()};
+    ATH_MSG_VERBOSE("SubEvt StoreGate " << seStore.name() << " :"
+		    << " bunch crossing : " << bunchXing
+		    << " time offset : " << iEvt->time()
+		    << " event number : " <<
+		    iEvt->ptr()->eventNumber()
+		    << " run number : " <<
+		    iEvt->ptr()->runNumber());
+    const SiHitCollection* seHitColl{nullptr};
+    if (!seStore.retrieve(seHitColl, m_inputObjectName).isSuccess()) {
+      ATH_MSG_ERROR("SubEvent SCT SiHitCollection not found in StoreGate " << seStore.name());
+      return StatusCode::FAILURE;
+    }
+    ATH_MSG_DEBUG("SiHitCollection found with " << seHitColl->size() << " hits");
+    PileUpTimeEventIndex timeIndex{iEvt->time(), iEvt->index()};
+    SiHitCollection* hitCollPtr{new SiHitCollection(*seHitColl)};
+    m_thpcsi->insert(timeIndex, hitCollPtr);
+    m_hitCollPtrs.push_back(hitCollPtr);
+  }
+
+  return StatusCode::SUCCESS;
 }
 
 // =========================================================================
@@ -660,388 +598,323 @@ void SCT_DigitizationTool::SetupRdoOutputType(Property &) {
 class DigitizeNonHitElementsDebugPrinter
 {
 public:
-    DigitizeNonHitElementsDebugPrinter(const SCT_ID *detID) :
-        m_detID(detID), m_msgNo(-1) {
-    }
+  DigitizeNonHitElementsDebugPrinter(const SCT_ID* detID) :
+    m_detID{detID}, m_msgNo{-1} {
+  }
 
-    std::string msg(const InDetDD::SiDetectorElement *element) {
-        std::ostringstream ost;
+  std::string msg(const InDetDD::SiDetectorElement* element) {
+    std::ostringstream ost;
 
-        ost << "Digitized unprocessed elements: layer - phi - eta - side  "
-            << m_detID->layer_disk(element->identify()) << " - "
-            << m_detID->phi_module(element->identify()) << " - "
-            << m_detID->eta_module(element->identify()) << " - "
-            << m_detID->side(element->identify()) << " - "
-            << " unprocessed hit number: " << ++m_msgNo << '\n';
+    ost << "Digitized unprocessed elements: layer - phi - eta - side  "
+	<< m_detID->layer_disk(element->identify()) << " - "
+	<< m_detID->phi_module(element->identify()) << " - "
+	<< m_detID->eta_module(element->identify()) << " - "
+	<< m_detID->side(element->identify()) << " - "
+	<< " unprocessed hit number: " << ++m_msgNo << '\n';
 
-        return ost.str();
-    }
+    return ost.str();
+  }
 
 private:
-    const SCT_ID *m_detID;
-    // const InDetDD::SiDetectorManager*   m_detMgr;
-    int m_msgNo;
+  const SCT_ID* m_detID;
+  int m_msgNo;
 };
 
 // ----------------------------------------------------------------------//
-// createAndStoreRDO                                                    //
+// createAndStoreRDO                                                     //
 // ----------------------------------------------------------------------//
-StatusCode SCT_DigitizationTool::createAndStoreRDO(
-    SiChargedDiodeCollection *chDiodeCollection) {
-
-    // Create the RDO collection
-    SCT_RDO_Collection *RDOColl(createRDO(chDiodeCollection));
-
-    // Add it to storegate
-    Identifier id_coll(RDOColl->identify());
-    int barrelec(m_detID->barrel_ec(id_coll));
-
-    if (!m_barrelonly || 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;
-            return StatusCode::FAILURE;
-        }
-    }
-    else {
-        ATH_MSG_VERBOSE("Not saving SCT_RDO_Collection: " <<
-            m_detID->show_to_string(RDOColl->identify()) << " to container!");
-        delete RDOColl;
-    }
-    return StatusCode::SUCCESS;
+StatusCode SCT_DigitizationTool::createAndStoreRDO(SiChargedDiodeCollection* chDiodeCollection) {
+
+  // Create the RDO collection
+  SCT_RDO_Collection* RDOColl{createRDO(chDiodeCollection)};
+
+  // Add it to storegate
+  Identifier id_coll{RDOColl->identify()};
+  int barrelec{m_detID->barrel_ec(id_coll)};
+
+  if (!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;
+      RDOColl = nullptr;
+      return StatusCode::FAILURE;
+    }
+  } else {
+    ATH_MSG_VERBOSE("Not saving SCT_RDO_Collection: " << m_detID->show_to_string(RDOColl->identify()) << " to container!");
+    delete RDOColl;
+    RDOColl = nullptr;
+  }
+  return StatusCode::SUCCESS;
 } // SCT_Digitization::createAndStoreRDO()
 
 // ----------------------------------------------------------------------
 // createRDO
 // ----------------------------------------------------------------------
-SCT_RDO_Collection *SCT_DigitizationTool::createRDO(
-    SiChargedDiodeCollection *collection) {
-
-    // create a new SCT RDO collection
-    SCT_RDO_Collection *p_rdocoll = 0;
-
-    // need the DE identifier
-    const Identifier id_de = collection->identify();
-    IdentifierHash idHash_de = collection->identifyHash();
-    try {
-        p_rdocoll = new SCT_RDO_Collection(idHash_de);
-    } catch (std::bad_alloc)
-    {
-        ATH_MSG_FATAL("Could not create a new SCT_RDORawDataCollection !");
-    }
-    p_rdocoll->setIdentifier(id_de);
-
-    SiChargedDiodeIterator i_chargedDiode = collection->begin();
-    SiChargedDiodeIterator i_chargedDiode_end = collection->end();
-    // Choice of producing SCT1_RawData or SCT3_RawData
-    if (m_WriteSCT1_RawData.value()) {
-        for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
-            unsigned int flagmask = (*i_chargedDiode).second.flag() & 0xFE;
-
-            if (!flagmask) { // now check it wasn't masked:
-                             // create new SCT RDO, using method 1 for mask:
-                             // GroupSize=1: need readout id, make use of
-                             // SiTrackerDetDescr
-                InDetDD::SiReadoutCellId roCell =
-                    (*i_chargedDiode).second.getReadoutCell();
-                int strip = roCell.strip();
-                if (strip > 0xffff) { // In upgrade layouts strip can be bigger
-                                      // than 4000
-                  ATH_MSG_FATAL(
-                    "Strip number too big for SCT1 raw data format.");
-                }
-                const Identifier id_readout = m_detID->strip_id(
-                    collection->identify(), strip);
-
-                // build word, masks taken from SiTrackerEvent/SCTRawData.cxx
-                const unsigned int strip_rdo = (strip & 0xFFFF) << 16;
-
-                // user can define what GroupSize is, here 1: TC. Incorrect,
-                // GroupSize >= 1
-                int size = SiHelper::GetStripNum((*i_chargedDiode).second);
-                // int groupSize=size;
-                unsigned int size_rdo = (size & 0xFFFF);
-
-                // TC. Need to check if there are disabled strips in the cluster
-                int cluscounter = 0;
-                if (size > 1) {
-                    SiChargedDiodeIterator it2 = i_chargedDiode;
-                    ++it2;
-                    for (; it2 != i_chargedDiode_end; ++it2) {
-                        ++cluscounter;
-                        if (cluscounter >= size) {
-                            break;
-                        }
-                        if (it2->second.flag() & 0xDE) {
-                            int tmp = cluscounter;
-                            while (it2 != i_chargedDiode_end && cluscounter <
-                                   size - 1 && (it2->second.flag() & 0xDE)) {
-                                it2++;
-                                cluscounter++;
-                            }
-                            if (it2 != collection->end() &&
-                                !(it2->second.flag() & 0xDE)) {
-                                SiHelper::ClusterUsed(it2->second, false);
-                                SiHelper::SetStripNum(it2->second, size -
-                                                      cluscounter);
-                            }
-                            // groupSize=tmp;
-                            size_rdo = tmp & 0xFFFF;
-                            break;
-                        }
-                    }
-                }
-                unsigned int SCT_Word = (strip_rdo | size_rdo);
-                SCT1_RawData *p_rdo = new SCT1_RawData(id_readout, SCT_Word);
-                if (p_rdo) {
-                    p_rdocoll->push_back(p_rdo);
-                }
-            }
-        }
-    }
-    else {
-        // Under the current scheme time bin and ERRORS are hard-coded to
-        // default values.
-        int ERRORS = 0;
-        static std::vector<int> dummyvector;
-        for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
-            unsigned int flagmask = (*i_chargedDiode).second.flag() & 0xFE;
-
-            if (!flagmask) { // Check it wasn't masked
-                int tbin = SiHelper::GetTimeBin((*i_chargedDiode).second);
-                // create new SCT RDO
-                InDetDD::SiReadoutCellId roCell =
-                    (*i_chargedDiode).second.getReadoutCell();
-                int strip = roCell.strip();
-                const InDetDD::SiDetectorDesign &detDesign =
-                    collection->design();
-                const InDetDD::SCT_ModuleSideDesign &sctDesign =
-                    dynamic_cast<const
-                                 InDetDD::SCT_ModuleSideDesign &> (detDesign);
-                int row2D = sctDesign.row(strip);
-                Identifier id_readout;
-                if (row2D < 0) { // SCT sensors
-                    id_readout = m_detID->strip_id(collection->identify(),
-                                                   strip);
-                }
-                else { // Upgrade sensors
-                    int strip2D = sctDesign.strip(strip);
-                    id_readout = m_detID->strip_id(collection->identify(),
-                                                   row2D, strip2D);
-                }
+SCT_RDO_Collection* SCT_DigitizationTool::createRDO(SiChargedDiodeCollection* collection) {
+
+  // create a new SCT RDO collection
+  SCT_RDO_Collection* p_rdocoll{nullptr};
+
+  // need the DE identifier
+  const Identifier id_de{collection->identify()};
+  IdentifierHash idHash_de{collection->identifyHash()};
+  try {
+    p_rdocoll = new SCT_RDO_Collection(idHash_de);
+  } catch (std::bad_alloc) {
+    ATH_MSG_FATAL("Could not create a new SCT_RDORawDataCollection !");
+  }
+  p_rdocoll->setIdentifier(id_de);
+
+  SiChargedDiodeIterator i_chargedDiode{collection->begin()};
+  SiChargedDiodeIterator i_chargedDiode_end{collection->end()};
+  // Choice of producing SCT1_RawData or SCT3_RawData
+  if (m_WriteSCT1_RawData.value()) {
+    for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
+      unsigned int flagmask{static_cast<unsigned int>((*i_chargedDiode).second.flag() & 0xFE)};
+
+      if (!flagmask) { // now check it wasn't masked:
+	// create new SCT RDO, using method 1 for mask:
+	// GroupSize=1: need readout id, make use of
+	// SiTrackerDetDescr
+	InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()};
+	int strip{roCell.strip()};
+	if (strip > 0xffff) { // In upgrade layouts strip can be bigger
+	  // than 4000
+	  ATH_MSG_FATAL("Strip number too big for SCT1 raw data format.");
+	}
+	const Identifier id_readout{m_detID->strip_id(collection->identify(), strip)};
+
+	// build word, masks taken from SiTrackerEvent/SCTRawData.cxx
+	const unsigned int strip_rdo{static_cast<unsigned int>((strip & 0xFFFF) << 16)};
+
+	// user can define what GroupSize is, here 1: TC. Incorrect,
+	// GroupSize >= 1
+	int size{SiHelper::GetStripNum((*i_chargedDiode).second)};
+	unsigned int size_rdo{static_cast<unsigned int>(size & 0xFFFF)};
+
+	// TC. Need to check if there are disabled strips in the cluster
+	int cluscounter{0};
+	if (size > 1) {
+	  SiChargedDiodeIterator it2{i_chargedDiode};
+	  ++it2;
+	  for (; it2 != i_chargedDiode_end; ++it2) {
+	    ++cluscounter;
+	    if (cluscounter >= size) {
+	      break;
+	    }
+	    if (it2->second.flag() & 0xDE) {
+	      int tmp{cluscounter};
+	      while ((it2 != i_chargedDiode_end) and (cluscounter < size - 1) and (it2->second.flag() & 0xDE)) {
+		it2++;
+		cluscounter++;
+	      }
+	      if ((it2 != collection->end()) and !(it2->second.flag() & 0xDE)) {
+		SiHelper::ClusterUsed(it2->second, false);
+		SiHelper::SetStripNum(it2->second, size - cluscounter);
+	      }
+	      // groupSize=tmp;
+	      size_rdo = tmp & 0xFFFF;
+	      break;
+	    }
+	  }
+	}
+	unsigned int SCT_Word{strip_rdo | size_rdo};
+	SCT1_RawData* p_rdo{new SCT1_RawData(id_readout, SCT_Word)};
+	if (p_rdo) {
+	  p_rdocoll->push_back(p_rdo);
+	}
+      }
+    }
+  } else {
+    // Under the current scheme time bin and ERRORS are hard-coded to
+    // default values.
+    int ERRORS{0};
+    static std::vector<int> dummyvector;
+    for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
+      unsigned int flagmask{static_cast<unsigned int>((*i_chargedDiode).second.flag() & 0xFE)};
+
+      if (!flagmask) { // Check it wasn't masked
+	int tbin{SiHelper::GetTimeBin((*i_chargedDiode).second)};
+	// create new SCT RDO
+	InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()};
+	int strip{roCell.strip()};
+	const InDetDD::SiDetectorDesign& detDesign{collection->design()};
+	const InDetDD::SCT_ModuleSideDesign& sctDesign{dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(detDesign)};
+	int row2D{sctDesign.row(strip)};
+	Identifier id_readout;
+	if (row2D < 0) { // SCT sensors
+	  id_readout = m_detID->strip_id(collection->identify(), strip);
+	} else { // Upgrade sensors
+	  int strip2D{sctDesign.strip(strip)};
+	  id_readout = m_detID->strip_id(collection->identify(), row2D, strip2D);
+	}
                 
-                // build word (compatible with
-                // SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx)
-                int size = SiHelper::GetStripNum((*i_chargedDiode).second);
-                int groupSize = size;
-
-                // TC. Need to check if there are disabled strips in the cluster
-                int cluscounter = 0;
-                if (size > 1) {
-		  SiChargedDiode * diode = i_chargedDiode->second.nextInCluster();
-		  while(diode){//check if there is a further strip in the cluster
-		    ++cluscounter;
-		    if (cluscounter >= size) {
-		      ATH_MSG_WARNING("Cluster size reached while neighbouring strips still defined.");
-		      break;
-		    }
-		    if (diode->flag() & 0xDE) {//see if it is disabled/below threshold/disconnected/etc (0xDE corresponds to BT_SET | DISABLED_SET | BADTOT_SET | DISCONNECTED_SET | MASKOFF_SET)
-		      int tmp = cluscounter;
-		      while (cluscounter < size - 1 && (diode->flag() & 0xDE)) { //check its not the end and still disabled
-			diode = diode->nextInCluster();
-			cluscounter++;
-		      }
-		      if (diode &&
-			  !(diode->flag() & 0xDE)) {
-			SiHelper::ClusterUsed(*diode, false);
-			SiHelper::SetStripNum(*diode, size - 
-					      cluscounter);
-		      }
-		      
-		      groupSize = tmp;
-		      break;
-		      
-		    } 
-		    
-		    diode = diode->nextInCluster();                 
-		  }
-		}
+	// build word (compatible with
+	// SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx)
+	int size{SiHelper::GetStripNum((*i_chargedDiode).second)};
+	int groupSize{size};
+
+	// TC. Need to check if there are disabled strips in the cluster
+	int cluscounter{0};
+	if (size > 1) {
+	  SiChargedDiode* diode{i_chargedDiode->second.nextInCluster()};
+	  while (diode) {//check if there is a further strip in the cluster
+	    ++cluscounter;
+	    if (cluscounter >= size) {
+	      ATH_MSG_WARNING("Cluster size reached while neighbouring strips still defined.");
+	      break;
+	    }
+	    if (diode->flag() & 0xDE) {//see if it is disabled/below threshold/disconnected/etc (0xDE corresponds to BT_SET | DISABLED_SET | BADTOT_SET | DISCONNECTED_SET | MASKOFF_SET)
+	      int tmp{cluscounter};
+	      while ((cluscounter < size - 1) and (diode->flag() & 0xDE)) { //check its not the end and still disabled
+		diode = diode->nextInCluster();
+		cluscounter++;
+	      }
+	      if (diode and !(diode->flag() & 0xDE)) {
+		SiHelper::ClusterUsed(*diode, false);
+		SiHelper::SetStripNum(*diode, size - cluscounter);
+	      }
+	      groupSize = tmp;
+	      break;
+	    } 
+	    diode = diode->nextInCluster();                 
+	  }
+	}
 		
-                int stripIn11bits = strip & 0x7ff;
-                if (stripIn11bits != strip) {
-                    ATH_MSG_DEBUG("Strip number " << strip <<
-                        " doesn't fit into 11 bits - will be truncated");
-                }
+	int stripIn11bits{strip & 0x7ff};
+	if (stripIn11bits != strip) {
+	  ATH_MSG_DEBUG("Strip number " << strip << " doesn't fit into 11 bits - will be truncated");
+	}
                 
-                unsigned int SCT_Word = (groupSize | (stripIn11bits << 11) |
-                                         (tbin << 22) | (ERRORS << 25));
-                SCT3_RawData *p_rdo = new SCT3_RawData(id_readout, SCT_Word,
-                                                       &dummyvector);
-                if (p_rdo) {
-                    p_rdocoll->push_back(p_rdo);
-                }
-            }
-        }
-    }
-    return p_rdocoll;
+	unsigned int SCT_Word{static_cast<unsigned int>(groupSize | (stripIn11bits << 11) | (tbin << 22) | (ERRORS << 25))};
+	SCT3_RawData *p_rdo{new SCT3_RawData(id_readout, SCT_Word, &dummyvector)};
+	if (p_rdo) {
+	  p_rdocoll->push_back(p_rdo);
+	}
+      }
+    }
+  }
+  return p_rdocoll;
 } // SCT_Digitization::createRDO()
 
 // ------------------------------------------------------------
 // Get next event and extract collection of hit collections:
 // ------------------------------------------------------------
 StatusCode SCT_DigitizationTool::getNextEvent() {
-    ATH_MSG_DEBUG("SCT_DigitizationTool::getNextEvent()");
-    //  get the container(s)
-    typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
-    // this is a list<pair<time_t, DataLink<SiHitCollection> >
-    TimedHitCollList hitCollList;
-    unsigned int numberOfSiHits(0);
-    if (!(m_mergeSvc->retrieveSubEvtsData(m_inputObjectName, hitCollList,
-                                          numberOfSiHits).isSuccess()) &&
-        hitCollList.size() == 0) {
-        ATH_MSG_ERROR("Could not fill TimedHitCollList");
-        return StatusCode::FAILURE;
-    }
-    else {
-        ATH_MSG_DEBUG(hitCollList.size() << " SiHitCollections with key " <<
-            m_inputObjectName << " found");
-    }
-    // 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) {
-        // decide if this event will be processed depending on
-        // HardScatterSplittingMode & bunchXing
-        if (m_HardScatterSplittingMode == 2 && !m_HardScatterSplittingSkipper) {
-            m_HardScatterSplittingSkipper = true;
-            ++iColl;
-            continue;
-        }
-        if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper) {
-            ++iColl;
-            continue;
-        }
-        if (m_HardScatterSplittingMode == 1 && !m_HardScatterSplittingSkipper) {
-            m_HardScatterSplittingSkipper = true;
-        }
-        const SiHitCollection *p_collection(iColl->second);
-        m_thpcsi->insert(iColl->first, p_collection);
-        ATH_MSG_DEBUG("SiTrackerHitCollection found with" <<
-            p_collection->size() << " hits");    // loop on the hit collections
-        ++iColl;
-    }
-    return StatusCode::SUCCESS;
+  ATH_MSG_DEBUG("SCT_DigitizationTool::getNextEvent()");
+  //  get the container(s)
+  typedef PileUpMergeSvc::TimedList<SiHitCollection>::type TimedHitCollList;
+  // this is a list<pair<time_t, DataLink<SiHitCollection> >
+  TimedHitCollList hitCollList;
+  unsigned int numberOfSiHits{0};
+  if (not (m_mergeSvc->retrieveSubEvtsData(m_inputObjectName, hitCollList, numberOfSiHits).isSuccess()) and hitCollList.size() == 0) {
+    ATH_MSG_ERROR("Could not fill TimedHitCollList");
+    return StatusCode::FAILURE;
+  } else {
+    ATH_MSG_DEBUG(hitCollList.size() << " SiHitCollections with key " << m_inputObjectName << " found");
+  }
+  // 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) {
+    // decide if this event will be processed depending on
+    // HardScatterSplittingMode & bunchXing
+    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) {
+      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;
+  }
+  return StatusCode::SUCCESS;
 }
 
 // -----------------------------------------------------------------------------------------------
 // Convert a SiTotalCharge to a InDetSimData, and store it.
 // -----------------------------------------------------------------------------------------------
-void SCT_DigitizationTool::addSDO(SiChargedDiodeCollection *collection) {
-    typedef SiTotalCharge::list_t list_t;
-    std::vector<InDetSimData::Deposit> deposits;
-    deposits.reserve(5); // no idea what a reasonable number for this would be
-                         // with pileup
-    // loop over the charged diodes
-    SiChargedDiodeIterator EndOfDiodeCollection = collection->end();
-    for (SiChargedDiodeIterator i_chargedDiode = collection->begin();
-         i_chargedDiode != EndOfDiodeCollection; ++i_chargedDiode) {
-        deposits.clear();
-        const list_t &charges =
-            (*i_chargedDiode).second.totalCharge().chargeComposition();
-
-        bool real_particle_hit = false;
-        // loop over the list
-        list_t::const_iterator EndOfChargeList = charges.end();
-        for (list_t::const_iterator i_ListOfCharges = charges.begin();
-             i_ListOfCharges != EndOfChargeList; ++i_ListOfCharges) {
-            const HepMcParticleLink &trkLink = i_ListOfCharges->particleLink();
-            const int barcode = trkLink.barcode();
-            if ((barcode == 0)or(barcode == m_vetoThisBarcode)) {
-                continue;
-            }
-            if (!real_particle_hit) {
-                // Types of SiCharges expected from SCT
-                // Noise:                        barcode==0 &&
-                // processType()==SiCharge::noise
-                // Delta Rays:                   barcode==0 &&
-                // processType()==SiCharge::track
-                // Pile Up Tracks With No Truth: barcode!=0 &&
-                // processType()==SiCharge::cut_track
-                // Tracks With Truth:            barcode!=0 &&
-                // processType()==SiCharge::track
-                if (barcode != 0 && i_ListOfCharges->processType() ==
-                    SiCharge::track) {
-                    real_particle_hit = true;
-                }
-                // real_particle_hit = trkLink.isValid();
-            }
-            // if(!real_particle_hit) { if(barcode!=0) real_particle_hit = true;
-            // }
-            // check if this track number has been already used.
-            std::vector<InDetSimData::Deposit>::reverse_iterator theDeposit =
-                deposits.rend();  // dummy value
-            std::vector<InDetSimData::Deposit>::reverse_iterator depositsR_end =
-                deposits.rend();
-            std::vector<InDetSimData::Deposit>::reverse_iterator i_Deposit =
-                deposits.rbegin();
-            for (; i_Deposit != depositsR_end; ++i_Deposit) {
-                if ((*i_Deposit).first == trkLink) {
-                    theDeposit = i_Deposit;
-                    break;
-                }
-            }
-
-            // if the charge has already hit the Diode add it to the deposit
-            if (theDeposit != depositsR_end) {
-                (*theDeposit).second += i_ListOfCharges->charge();
-            }
-            else { // create a new deposit
-                InDetSimData::Deposit deposit(trkLink,
-                                              i_ListOfCharges->charge());
-                deposits.push_back(deposit);
-            }
-        }
-
-        // add the simdata object to the map:
-        if (real_particle_hit || m_createNoiseSDO) {
-            // m_simDataCollMap->insert(
-                // std::make_pair(collection->getId((*i_chargedDiode).first),
-                               // InDetSimData(deposits,
-                                            // (*i_chargedDiode).second.flag())));
-
-          InDetDD::SiReadoutCellId roCell =
-            (*i_chargedDiode).second.getReadoutCell();
-          
-          int strip = roCell.strip();
-          
-          const InDetDD::SiDetectorDesign &detDesign =
-            collection->design();
-
-          const InDetDD::SCT_ModuleSideDesign &sctDesign =
-            dynamic_cast<const InDetDD::SCT_ModuleSideDesign &> (detDesign);
-
-          int row2D = sctDesign.row(strip);
-          Identifier id_readout;
-          if (row2D < 0) { // SCT sensors
-            id_readout = m_detID->strip_id(collection->identify(),strip);
-          }
-
-          else { // Upgrade sensors
-            int strip2D = sctDesign.strip(strip);
-            id_readout = m_detID->strip_id(collection->identify(),row2D, strip2D);
-          }
-
-          m_simDataCollMap->insert(
-            std::make_pair(id_readout,
-                           InDetSimData(deposits,
-                                        (*i_chargedDiode).second.flag())));
-
-            
-        }
-    }
+void SCT_DigitizationTool::addSDO(SiChargedDiodeCollection* collection) {
+  typedef SiTotalCharge::list_t list_t;
+  std::vector<InDetSimData::Deposit> deposits;
+  deposits.reserve(5); // no idea what a reasonable number for this would be
+  // with pileup
+  // loop over the charged diodes
+  SiChargedDiodeIterator EndOfDiodeCollection{collection->end()};
+  for (SiChargedDiodeIterator i_chargedDiode{collection->begin()}; i_chargedDiode != EndOfDiodeCollection; ++i_chargedDiode) {
+    deposits.clear();
+    const list_t& charges{(*i_chargedDiode).second.totalCharge().chargeComposition()};
+
+    bool real_particle_hit{false};
+    // loop over the list
+    list_t::const_iterator EndOfChargeList{charges.end()};
+    for (list_t::const_iterator i_ListOfCharges{charges.begin()}; i_ListOfCharges != EndOfChargeList; ++i_ListOfCharges) {
+      const HepMcParticleLink& trkLink{i_ListOfCharges->particleLink()};
+      const int barcode{trkLink.barcode()};
+      if ((barcode == 0) or (barcode == m_vetoThisBarcode)) {
+	continue;
+      }
+      if (!real_particle_hit) {
+	// Types of SiCharges expected from SCT
+	// Noise:                        barcode==0 &&
+	// processType()==SiCharge::noise
+	// Delta Rays:                   barcode==0 &&
+	// processType()==SiCharge::track
+	// Pile Up Tracks With No Truth: barcode!=0 &&
+	// processType()==SiCharge::cut_track
+	// Tracks With Truth:            barcode!=0 &&
+	// processType()==SiCharge::track
+	if (barcode != 0 and i_ListOfCharges->processType() == SiCharge::track) {
+	  real_particle_hit = true;
+	}
+      }
+      // check if this track number has been already used.
+      std::vector<InDetSimData::Deposit>::reverse_iterator theDeposit{deposits.rend()};  // dummy value
+      std::vector<InDetSimData::Deposit>::reverse_iterator depositsR_end{deposits.rend()};
+      std::vector<InDetSimData::Deposit>::reverse_iterator i_Deposit{deposits.rbegin()};
+      for (; i_Deposit != depositsR_end; ++i_Deposit) {
+	if ((*i_Deposit).first == trkLink) {
+	  theDeposit = i_Deposit;
+	  break;
+	}
+      }
+
+      // if the charge has already hit the Diode add it to the deposit
+      if (theDeposit != depositsR_end) {
+	(*theDeposit).second += i_ListOfCharges->charge();
+      } else { // create a new deposit
+	InDetSimData::Deposit deposit(trkLink, i_ListOfCharges->charge());
+	deposits.push_back(deposit);
+      }
+    }
+
+    // add the simdata object to the map:
+    if (real_particle_hit or m_createNoiseSDO) {
+      InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()};
+      int strip{roCell.strip()};
+      const InDetDD::SiDetectorDesign& detDesign{collection->design()};
+      const InDetDD::SCT_ModuleSideDesign& sctDesign{dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(detDesign)};
+
+      int row2D{sctDesign.row(strip)};
+      Identifier id_readout;
+      if (row2D < 0) { // SCT sensors
+	id_readout = m_detID->strip_id(collection->identify(),strip);
+      } else { // Upgrade sensors
+	int strip2D{sctDesign.strip(strip)};
+	id_readout = m_detID->strip_id(collection->identify(),row2D, strip2D);
+      }
+
+      m_simDataCollMap->insert(std::make_pair(id_readout, InDetSimData(deposits, (*i_chargedDiode).second.flag())));
+    }
+  }
 }
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx
old mode 100755
new mode 100644
index 7a4ea54a14d4550d3d97f6ac58789933e7833d3b..1839074e77770728b39c23a26bf43305667a76bb
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.cxx
@@ -37,7 +37,6 @@ SCT_FrontEnd::SCT_FrontEnd(const std::string &type, const std::string &name,
     m_sc(0),
     m_SCTdetMgr(0),
     m_sct_id(0),
-    m_sct_amplifier("SCT_Amp", this),
     m_ReadCalibChipDataSvc("SCT_ReadCalibChipDataSvc", name),
     m_rndmEngine(nullptr) {
     declareInterface< ISCT_FrontEnd >(this);
@@ -79,7 +78,6 @@ SCT_FrontEnd::SCT_FrontEnd(const std::string &type, const std::string &name,
                     "Flag to use Calib Data");
     declareProperty("MaxStripsPerSide", m_strip_max = 768, "For SLHC studies");
     declareProperty("SCT_ReadCalibChipDataSvc", m_ReadCalibChipDataSvc);
-    declareProperty("SCT_Amp", m_sct_amplifier);
 }
 
 // Destructor:
@@ -102,7 +100,6 @@ StatusCode SCT_FrontEnd::initialize() {
     // Get SCT detector manager
     ATH_CHECK(detStore()->retrieve(m_SCTdetMgr, "SCT"));
     // Get the amplifier tool
-    ATH_CHECK(m_sct_amplifier.retrieve());
     ATH_MSG_DEBUG("SCT Amplifier tool located ");
 
 
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.h
old mode 100755
new mode 100644
index cee43957c4c3d3d836e01b68cb2ede67a8fcd83d..1c3080fa212086b9d6a3ccaee6f3b0fe202c017d
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_FrontEnd.h
@@ -124,7 +124,7 @@ class  SCT_FrontEnd : public AthAlgTool, virtual public ISCT_FrontEnd {
   StatusCode                          m_sc;               //!< Help variable to take care of returned status codes
   const InDetDD::SCT_DetectorManager* m_SCTdetMgr;        //!< Handle to SCT detector manager
   const SCT_ID*                       m_sct_id;           //!< Handle to SCT ID helper
-  ToolHandle<ISCT_Amp> m_sct_amplifier;                   //!< Handle the Amplifier tool 
+  ToolHandle<ISCT_Amp> m_sct_amplifier{this, "SCT_Amp", "SCT_Amp", "Handle the Amplifier tool"}; //!< Handle the Amplifier tool
   ServiceHandle<ISCT_ReadCalibChipDataSvc> m_ReadCalibChipDataSvc; //!< Handle to the Calibration ConditionsService
 
   CLHEP::HepRandomEngine   *m_rndmEngine;        //!< Random number generation engine 
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_RandomDisabledCellGenerator.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_RandomDisabledCellGenerator.cxx
old mode 100755
new mode 100644
index 7002fb1475851d80c5b25a43830d28a1e8b62d0e..d252ceddda23b461491d6f7b744784d3b77b5d07
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_RandomDisabledCellGenerator.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_RandomDisabledCellGenerator.cxx
@@ -13,13 +13,13 @@
 #include "SiDigitization/SiChargedDiodeCollection.h"
 
 // constructor
-SCT_RandomDisabledCellGenerator::SCT_RandomDisabledCellGenerator(const std::string& type, const std::string& name,const IInterface* parent )
-  : AthAlgTool(type,name,parent),
-    m_myfunc(0),
-    m_rndmEngine(0)
+SCT_RandomDisabledCellGenerator::SCT_RandomDisabledCellGenerator(const std::string& type, const std::string& name, const IInterface* parent )
+  : AthAlgTool(type, name, parent),
+    m_myfunc{0},
+    m_rndmEngine{0}
 {
-  declareInterface<ISCT_RandomDisabledCellGenerator>( this );
-  declareProperty("TotalBadChannels",m_disableProbability=0.01);
+  declareInterface<ISCT_RandomDisabledCellGenerator>(this);
+  declareProperty("TotalBadChannels", m_disableProbability=0.01);
 }
 
 // Destructor:
@@ -27,39 +27,39 @@ SCT_RandomDisabledCellGenerator::~SCT_RandomDisabledCellGenerator(){
 }
 
 StatusCode SCT_RandomDisabledCellGenerator::initialize() {
-
-  StatusCode sc = AthAlgTool::initialize();
+  StatusCode sc{AthAlgTool::initialize()};
   if (sc.isFailure()) {
-    ATH_MSG_INFO ( "SCT_RandomDisabledCellGenerator::initialize() failed") ;
+    ATH_MSG_INFO("SCT_RandomDisabledCellGenerator::initialize() failed") ;
     return sc ;
   }
-  ATH_MSG_DEBUG ( "SCT_RandomDisabledCellGenerator::initialize()");
+  ATH_MSG_DEBUG("SCT_RandomDisabledCellGenerator::initialize()");
 
   m_myfunc = SiHelper::disconnected ; 
 
-  ATH_MSG_INFO ( "\tCreating missing bond generator with "<<m_disableProbability<<" probability");
+  ATH_MSG_INFO("\tCreating missing bond generator with "<<m_disableProbability<<" probability");
 
   return sc ;
 }
 
-StatusCode SCT_RandomDisabledCellGenerator::finalize(){
-  StatusCode sc = AthAlgTool::finalize();
+StatusCode SCT_RandomDisabledCellGenerator::finalize() {
+  StatusCode sc{AthAlgTool::finalize()};
   if (sc.isFailure()) {
-    ATH_MSG_FATAL ( "SCT_RandomDisabledCellGenerator::finalize() failed");
-    return sc ;
+    ATH_MSG_FATAL("SCT_RandomDisabledCellGenerator::finalize() failed");
+    return sc;
   }
-  ATH_MSG_INFO ( "SCT_RandomDisabledCellGenerator::finalize()");
-  return sc ;
+  ATH_MSG_INFO("SCT_RandomDisabledCellGenerator::finalize()");
+  return sc;
 }
 
 // process the collection 
-void SCT_RandomDisabledCellGenerator::process(SiChargedDiodeCollection &collection) const {
-  
+void SCT_RandomDisabledCellGenerator::process(SiChargedDiodeCollection& collection) const {
   // disabling is applied to all cells even unconnected or below threshold ones to be able to use these cells as well
   // loop on all charged diodes
-  SiChargedDiodeIterator i_chargedDiode=collection.begin();
-  SiChargedDiodeIterator i_chargedDiode_end=collection.end();
-  for(; i_chargedDiode!=i_chargedDiode_end; ++i_chargedDiode) {
-    if(CLHEP::RandFlat::shoot(m_rndmEngine)<m_disableProbability) (*m_myfunc)((*i_chargedDiode).second,true,false);
+  SiChargedDiodeIterator i_chargedDiode{collection.begin()};
+  SiChargedDiodeIterator i_chargedDiode_end{collection.end()};
+  for (; i_chargedDiode!=i_chargedDiode_end; ++i_chargedDiode) {
+    if (CLHEP::RandFlat::shoot(m_rndmEngine)<m_disableProbability) {
+      (*m_myfunc)((*i_chargedDiode).second, true, false);
+    }
   }
 }
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_RandomDisabledCellGenerator.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_RandomDisabledCellGenerator.h
old mode 100755
new mode 100644
index 92d98efd9b24c3beb2d5f354cd1ed5d6a009ca77..a3dac89d73496e56abb5ed876d3c54e0a99ca808
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_RandomDisabledCellGenerator.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_RandomDisabledCellGenerator.h
@@ -33,16 +33,16 @@ namespace CLHEP {
   class HepRandomEngine;
 }
 
-class SCT_RandomDisabledCellGenerator :  public AthAlgTool, virtual public ISCT_RandomDisabledCellGenerator {
+class SCT_RandomDisabledCellGenerator : public AthAlgTool, virtual public ISCT_RandomDisabledCellGenerator {
 
   ///////////////////////////////////////////////////////////////////
   // Public methods:
   ///////////////////////////////////////////////////////////////////
 
-public:
+ public:
 
   /**  constructor */
-  SCT_RandomDisabledCellGenerator( const std::string& type, const std::string& name, const IInterface* parent ) ;
+  SCT_RandomDisabledCellGenerator(const std::string& type, const std::string& name, const IInterface* parent) ;
 
   /** Destructor */
   virtual ~SCT_RandomDisabledCellGenerator();
@@ -54,15 +54,15 @@ public:
   /** AlgTool finalize */
   virtual StatusCode finalize();
 
-  virtual void process(SiChargedDiodeCollection &collection) const;
-  void setRandomEngine(CLHEP::HepRandomEngine *rndmEngine) {m_rndmEngine = rndmEngine;}
+  virtual void process(SiChargedDiodeCollection& collection) const;
+  void setRandomEngine(CLHEP::HepRandomEngine* rndmEngine) {m_rndmEngine = rndmEngine;}
 
-private:
+ private:
 
   ///////////////////////////////////////////////////////////////////
   // Private data:
   ///////////////////////////////////////////////////////////////////
-private:
+ private:
 
   float m_disableProbability;   // probability that a cell is disabled
   void (*m_myfunc)(SiChargedDiode& chDiode, bool flag1, bool flag2);
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx
old mode 100755
new mode 100644
index 99d6e96d179b6c9f696eff232279cc2f6e10a87e..d794205f137d6a9ebf27897bd5900f4845ef0080
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.cxx
@@ -63,31 +63,30 @@ parent)
     m_doHistoTrap(false),
     m_doRamo(false),
     m_doCTrap(false),
-    m_thistSvc(nullptr),
-    m_h_efieldz(nullptr),
-    m_h_efield(nullptr),
-    m_h_spess(nullptr),
-    m_h_depD(nullptr),
-    m_h_drift_electrode(nullptr),
-    m_h_ztrap(nullptr),
-    m_h_drift_time(nullptr),
-    m_h_t_electrode(nullptr),
-    m_h_zhit(nullptr),                               
-    m_h_ztrap_tot(nullptr),
-    m_h_no_ztrap(nullptr),
-    m_h_trap_drift_t(nullptr),
-    m_h_notrap_drift_t(nullptr),
-    m_h_mob_Char(nullptr),
-    m_h_vel(nullptr),
-    m_h_drift1(nullptr),
-    m_h_gen(nullptr),
-    m_h_gen1(nullptr),
-    m_h_gen2(nullptr),
-    m_h_velocity_trap(nullptr),
-    m_h_mobility_trap(nullptr),
-    m_h_trap_pos(nullptr),
+    m_thistSvc{nullptr},
+    m_h_efieldz{nullptr},
+    m_h_efield{nullptr},
+    m_h_spess{nullptr},
+    m_h_depD{nullptr},
+    m_h_drift_electrode{nullptr},
+    m_h_ztrap{nullptr},
+    m_h_drift_time{nullptr},
+    m_h_t_electrode{nullptr},
+    m_h_zhit{nullptr},                               
+    m_h_ztrap_tot{nullptr},
+    m_h_no_ztrap{nullptr},
+    m_h_trap_drift_t{nullptr},
+    m_h_notrap_drift_t{nullptr},
+    m_h_mob_Char{nullptr},
+    m_h_vel{nullptr},
+    m_h_drift1{nullptr},
+    m_h_gen{nullptr},
+    m_h_gen1{nullptr},
+    m_h_gen2{nullptr},
+    m_h_velocity_trap{nullptr},
+    m_h_mobility_trap{nullptr},
+    m_h_trap_pos{nullptr},
     m_hashId(0),
-    m_distortionsTool("SCT_DistortionsTool", this),
     m_siConditionsSvc("SCT_SiliconConditionsSvc", name),
     m_siPropertiesSvc("SCT_SiPropertiesSvc", name),
     m_radDamageSvc("SCT_RadDamageSummarySvc", name),
@@ -120,8 +119,6 @@ parent)
                     "Histogram the charge trapping effect"); //
     declareProperty("doRamo", m_doRamo,
                     "Ramo Potential for charge trapping effect"); //
-    declareProperty("SCTDistortionsTool", m_distortionsTool,
-                    "Tool to retrieve SCT distortions");
     declareProperty("SCT_RadDamageSummarySvc", m_radDamageSvc);
     declareProperty("isOverlay", m_isOverlay=false);
 }
@@ -149,9 +146,6 @@ StatusCode SCT_SurfaceChargesGenerator::initialize() {
     // Get ISiliconConditionsSvc
     ATH_CHECK(m_siConditionsSvc.retrieve());
 
-    // Get ISCT_ModuleDistortionsTool
-    ATH_CHECK(m_distortionsTool.retrieve());
-
     if (m_doTrapping) {
         ///////////////////////////////////////////////////
         // -- Get Radiation Damage Service
@@ -286,44 +280,30 @@ StatusCode SCT_SurfaceChargesGenerator::finalize() {
 // perpandicular Drift time calculation
 // ----------------------------------------------------------------------
 float SCT_SurfaceChargesGenerator::DriftTime(float zhit) const {
-    float sensorThickness = m_element->thickness();
-
-    if ((zhit < 0.0) || (zhit > sensorThickness)) {
+    if ((zhit < 0.0) || (zhit > m_thickness)) {
         ATH_MSG_DEBUG("DriftTime: hit coordinate zhit=" << zhit /
             CLHEP::micrometer << " out of range");
         return -2.0;
     }
 
-    float vdepl = 0.;
-    float vbias = 0.;
-    if (m_useSiCondDB) {
-        vdepl = m_siConditionsSvc->depletionVoltage(m_hashId) * CLHEP::volt;
-        vbias = m_siConditionsSvc->biasVoltage(m_hashId) * CLHEP::volt;
-    }
-    else {
-        vdepl = m_vdepl * CLHEP::volt;
-        vbias = m_vbias * CLHEP::volt;
-    }
-    float denominator = vdepl + vbias - (2.0 * zhit * vdepl / sensorThickness);
+    float denominator = m_depletionVoltage + m_biasVoltage - (2.0 * zhit * m_depletionVoltage / m_thickness);
     if (denominator <= 0.0) {
-        if (vbias >= vdepl) { // Should not happen
+        if (m_biasVoltage >= m_depletionVoltage) { // Should not happen
 	  if(!m_isOverlay) {
             ATH_MSG_ERROR("DriftTime: negative argument X for log(X) " << zhit);
 	  }
 	  return -1.0;
         }
-        else { // (vbias<vdepl) can happen with underdepleted sensors, lose
-               // charges in that volume
-            // ATH_MSG_DEBUG ( "DriftTime: ->infinity since vdepl>vbias, zhit: "
+        else { // (m_biasVoltage<m_depletionVoltage) can happen with
+               // underdepleted sensors, lose charges in that volume
+            // ATH_MSG_DEBUG ( "DriftTime: ->infinity since m_depletionVoltage>m_biasVoltage, zhit: "
             // << zhit );
             return -10.0;
         }
     }
 
-    float driftTime = log((vdepl + vbias) / denominator);
-    driftTime = driftTime * sensorThickness * sensorThickness /
-                (2.0 * m_siPropertiesSvc->getSiProperties(
-                     m_hashId).holeDriftMobility() * vdepl);
+    float driftTime = log((m_depletionVoltage + m_biasVoltage) / denominator);
+    driftTime *= m_thickness * m_thickness / (2.0 * m_holeDriftMobility * m_depletionVoltage);
     return driftTime;
 }
 
@@ -334,10 +314,7 @@ float SCT_SurfaceChargesGenerator::DiffusionSigma(float zhit) const {
     float t = this->DriftTime(zhit); // in ns
 
     if (t > 0.0) {
-        float diffusionSigma = sqrt(2 * m_siPropertiesSvc->getSiProperties(
-                                        m_hashId).holeDiffusionConstant() * t); //
-                                                                                // in
-                                                                                // mm
+        float diffusionSigma = sqrt(2. * m_holeDiffusionConstant * t); // in mm
         return diffusionSigma;
     }
     else {
@@ -448,12 +425,9 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
                                                inserter, float p_eventTime,
                                                unsigned short
                                                p_eventId) const {
-    const InDetDD::SCT_ModuleSideDesign *p_design =
-      dynamic_cast<const SCT_ModuleSideDesign *>(&(m_element ->design()));
-
-    if (!p_design) {
+    if (!m_design) {
         ATH_MSG_ERROR("SCT_SurfaceChargesGenerator::process can not get " <<
-            p_design);
+            m_design);
         return;
     }
 
@@ -470,7 +444,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
 
     // 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
+    timeOfFlight -= (m_center) / CLHEP::c_light;  // !< extract
                                                                    // the
                                                                    // distance
                                                                    // to the
@@ -493,13 +467,6 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
     }
     // ---**************************************
 
-    // Get HashId
-    m_hashId = m_element->identifyHash();
-
-    // get sensor thickness and tg lorentz from SiDetectorDesign
-    const float sensorThickness = p_design->thickness();
-    const float tanLorentz = m_element->getTanLorentzAnglePhi();
-
     const CLHEP::Hep3Vector pos = phit.localStartPosition();
     const float xEta = pos[SiHit::xEta];
     const float xPhi = pos[SiHit::xPhi];
@@ -514,8 +481,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
     int numberOfSteps = int(LargeStep / m_smallStepLength) + 1;
     float steps = static_cast<float>(m_numberOfCharges * numberOfSteps);
     float e1 = phit.energyLoss() / steps;
-    float q1 = e1 * m_siPropertiesSvc->getSiProperties(
-        m_hashId).electronHolePairsPerEnergy();
+    float q1 = e1 * m_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
@@ -525,7 +491,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
     float zhit = xDep;
 
     if (m_doDistortions) {
-        if (m_element->isBarrel() == 1) {// Only apply disortions to barrel
+        if (m_isBarrel) {// Only apply disortions to barrel
                                          // modules
             Amg::Vector2D BOW;
             BOW[0] = m_distortionsTool->correctSimulation(m_hashId, xhit, yhit,
@@ -562,15 +528,15 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
         // double xEta1 = xEta +  stepEta * (istep + 0.5);
         // double xPhi1 = xPhi +  stepPhi * (istep + 0.5);
         // double depD  = xDep +  stepDep * (istep + 0.5);
-        // Distance between charge and readout side.  p_design->readoutSide() is
+        // Distance between charge and readout side.  m_design->readoutSide() is
         // +1 if readout side is in +ve depth axis direction and visa-versa.
-        // double spess = 0.5 * sensorThickness - p_design->readoutSide() *
+        // double spess = 0.5 * sensorThickness - m_design->readoutSide() *
         // depD;
         // if (spess<0) spess=0;
 
-        // Distance between charge and readout side. p_design->readoutSide() is
+        // 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 = 0.5 * sensorThickness - p_design->readoutSide() * z1;
+        float zReadout = 0.5 * m_thickness - m_design->readoutSide() * z1;
         double spess = zReadout;
 
         if (m_doHistoTrap) {
@@ -583,17 +549,17 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
                                              // time
         if (tdrift > -2.0000002 && tdrift < -1.9999998) {
             ATH_MSG_DEBUG("Checking for rounding errors in compression");
-            if ((fabs(z1) - 0.5 * sensorThickness) < 0.000010) {
+            if ((fabs(z1) - 0.5 * m_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 * sensorThickness;
+                    z1 = 0.0000005 - 0.5 * m_thickness;
                 } // set new coordinate to be 0.5nm inside wafer volume.
                 else {
-                    z1 = 0.5 * sensorThickness - 0.0000005;
+                    z1 = 0.5 * m_thickness - 0.0000005;
                 } // set new coordinate to be 0.5nm inside wafer volume.
-                zReadout = 0.5 * sensorThickness - p_design->readoutSide() * z1;
+                zReadout = 0.5 * m_thickness - m_design->readoutSide() * z1;
                 tdrift = DriftTime(zReadout);
                 if (tdrift > -2.0000002 && tdrift < -1.9999998) {
                     ATH_MSG_WARNING("Attempt failed. Making no correction.");
@@ -611,7 +577,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
         if (tdrift > 0.0) {
             float x1 = xhit + StepX * dstep;// (static_cast<float>(istep)+0.5) ;
             float y1 = yhit + StepY * dstep;// (static_cast<float>(istep)+0.5) ;
-            y1 += tanLorentz * zReadout; // !< Taking into account the magnetic
+            y1 += m_tanLorentz * zReadout; // !< Taking into account the magnetic
                                          // field
             float diffusionSigma = DiffusionSigma(zReadout);
 
@@ -639,7 +605,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
                 // confuse everebody
                 double yStripDist = dstrip * stripPitch;    // mm
                 double y0 = yStripDist; // mm
-                double z0 = (sensorThickness - zReadout); // mm
+                double z0 = (m_thickness - zReadout); // mm
 
                 // -- Charge Trapping
                 if (m_doTrapping) {
@@ -699,7 +665,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
                                 // make sure to confuse everebody
                                 double yStripDist = dstrip * stripPitch;    // mm
                                 double yfin = yStripDist; // mm
-                                double zfin = (sensorThickness - trap_pos); // mm
+                                double zfin = (m_thickness - trap_pos); // mm
 
                                 m_radDamageSvc->HoleTransport(y0, z0, yfin,
                                                               zfin, Q_m2, Q_m1,
@@ -721,7 +687,7 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
                                                                               // QUANTITY
                                     SiLocalPosition position(
                                         m_element->hitLocalToLocal(xd, ystrip));
-                                    if (p_design->inActiveArea(position)) {
+                                    if (m_design->inActiveArea(position)) {
                                         double charge(0.);
                                         if (strip == -2) {
                                             charge = Q_m2;
@@ -763,8 +729,8 @@ void SCT_SurfaceChargesGenerator::processSiHit(const SiHit &phit, const
                 if (!m_doRamo) {
                     SiLocalPosition position(m_element->hitLocalToLocal(xd,
                                                                         yd));
-                    if (p_design->inActiveArea(position)) {
-                        float sdist = p_design->scaledDistanceToNearestDiode(
+                    if (m_design->inActiveArea(position)) {
+                        float sdist = m_design->scaledDistanceToNearestDiode(
                             position);       // !< dist on the surface from the
                                              // hit point to the nearest strip
                                              // (diode)
@@ -860,3 +826,35 @@ 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_siConditionsSvc->depletionVoltage(m_hashId) * CLHEP::volt;
+    m_biasVoltage = m_siConditionsSvc->biasVoltage(m_hashId) * CLHEP::volt;
+  } else {
+    m_depletionVoltage = m_vdepl * CLHEP::volt;
+    m_biasVoltage = m_vbias * CLHEP::volt;
+  }
+
+  m_holeDriftMobility = m_siPropertiesSvc->getSiProperties(m_hashId).holeDriftMobility();
+  m_holeDiffusionConstant = m_siPropertiesSvc->getSiProperties(m_hashId).holeDiffusionConstant();
+  m_electronHolePairsPerEnergy = m_siPropertiesSvc->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_element->getTanLorentzAnglePhi();
+
+  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
old mode 100755
new mode 100644
index 4103780ede1919af44ec182cda4727c83af59137..1b3eba822f576122aa82852810c687d8c4cbcd64
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SCT_SurfaceChargesGenerator.h
@@ -50,6 +50,7 @@ class TProfile;
 
 namespace InDetDD{
   class SiDetectorElement;
+  class SCT_ModuleSideDesign;
 }
 
 namespace CLHEP {
@@ -87,7 +88,7 @@ private:
   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;} 
+  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;
@@ -156,7 +157,7 @@ private:
   mutable IdentifierHash m_hashId;
 
   //ToolHandles
-  ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool;
+  ToolHandle<ISCT_ModuleDistortionsTool> m_distortionsTool{this, "SCTDistortionsTool", "SCT_DistortionsTool", "Tool to retrieve SCT distortions"};
   //ServiceHandles
   ServiceHandle<ISiliconConditionsSvc> m_siConditionsSvc;
   ServiceHandle<ISiPropertiesSvc> m_siPropertiesSvc;
@@ -167,6 +168,18 @@ private:
   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/InDetDigitization/SCT_Digitization/src/SiChargedDiodeCollectionFiller.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/SiChargedDiodeCollectionFiller.h
index 64293fc29b25265b63f2847e1bee52e85e20c385..ee81b6925e7617a9b45815fa5ecd50a189faba84 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/SiChargedDiodeCollectionFiller.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/SiChargedDiodeCollectionFiller.h
@@ -23,22 +23,19 @@ namespace InDetDD
   class SiDetectorManager;
 }
 
-class SiChargedDiodeCollectionFiller{
+class SiChargedDiodeCollectionFiller {
  public:
-  SiChargedDiodeCollectionFiller(
-				 const SCT_ID*, 
+  SiChargedDiodeCollectionFiller(const SCT_ID*, 
 				 const InDetDD::SiDetectorManager*, 
-				 ToolHandle<ISCT_SurfaceChargesGenerator>&
-				 );
+				 ToolHandle<ISCT_SurfaceChargesGenerator>&);
   
-  void operator()( const std::pair< const IdentifierHash, std::vector<HitIndexAndTime> >& );
+  void operator() (const std::pair<const IdentifierHash, std::vector<HitIndexAndTime>>&);
 
-  boost::shared_ptr<SiChargedDiodeCollection>  chargedDiodes() const;
-  bool errorCondition()                                        const;
-  std::string errMsg()                                         const;
+  boost::shared_ptr<SiChargedDiodeCollection> chargedDiodes() const;
+  bool errorCondition()                                       const;
+  std::string errMsg()                                        const;
   
  private:
-  HitToDiodeConverter      m_hitToDiodeConverter;
+  HitToDiodeConverter m_hitToDiodeConverter;
 };		      
-#endif
-  
+#endif // SCT_DIGITIZATION_SICHARGEDDIODECOLLECTIONFILLER_H
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/components/SCT_Digitization_entries.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/components/SCT_Digitization_entries.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/components/SCT_Digitization_load.cxx b/InnerDetector/InDetDigitization/SCT_Digitization/src/components/SCT_Digitization_load.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetDigitization/SCT_Digitization/src/memPrint.h b/InnerDetector/InDetDigitization/SCT_Digitization/src/memPrint.h
index d0bc292d5c3ced7e5c127c4e4506d93e3c382a90..700213e564ba4c3bfe3514b9f4cdc43e5327a1ec 100644
--- a/InnerDetector/InDetDigitization/SCT_Digitization/src/memPrint.h
+++ b/InnerDetector/InDetDigitization/SCT_Digitization/src/memPrint.h
@@ -20,7 +20,7 @@ namespace PSUtils{
   struct HitCacheCounter
   {
     
-    HitCacheCounter():m_count(0){}
+  HitCacheCounter():m_count(0){}
     void operator()(const HitCache::value_type& entry)
     {
       m_count += (entry.second).size();
@@ -31,7 +31,7 @@ namespace PSUtils{
   struct DiodeCacheCounter
   {
     
-    DiodeCacheCounter():m_count(0){}
+  DiodeCacheCounter():m_count(0){}
     void operator()(const DiodeCache::value_type&  entry)
     {
       m_count += ((entry.second)->chargedDiodes()).size();
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/doc/packagedoc.h b/InnerDetector/InDetDigitization/TRT_Digitization/doc/packagedoc.h
index 6408b721a643f8b60147b25dbb8396dde51769e1..41fa65fa4d52b6f084ed7b774bb5d2a57d123d75 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/doc/packagedoc.h
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/doc/packagedoc.h
@@ -82,16 +82,6 @@ after the detector performance in the 2004 combined test beam.
   - TRTNoise: Together with @c TRTElectronicsNoise, this controls the
                          simulation of electronics noise.
 
-@ref used_Package
 
-@ref requirements_TRT_Digitization
 
 */
-
-/**
-@page used_Package Used Packages
-*/
-
-/**
-@page requirements_TRT_Digitization Requirements
-*/
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/share/postInclude.OverrideTRTparameters.py b/InnerDetector/InDetDigitization/TRT_Digitization/share/postInclude.OverrideTRTparameters.py
index f135a040297adf1720d6cd2b4c96a432ea5557b0..c13a647b22866fdc0a4889dee6542607b80a7fe8 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/share/postInclude.OverrideTRTparameters.py
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/share/postInclude.OverrideTRTparameters.py
@@ -91,8 +91,8 @@ trt.Override_trEfficiencyEndCapBKrypton = 0.68
 trt.Override_overallT0Shift            = 1.0
 trt.Override_overallT0ShiftShortBarrel = 0.0
 
-# Noise, defaults = 1, 0.02
-trt.Override_noiseInUnhitStraws = 1
+# Noise, defaults = 0(since July 2017), 0.02
+trt.Override_noiseInUnhitStraws = 0
 trt.Override_averageNoiseLevel  = 0.02
 
 # HL delta shift w.r.t m_overallT0Shift (steps of 0.78125 ns) (HT middle-bit fraction tune)
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigSettings.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigSettings.cxx
index be03d30cfc8092855a08ae3ede1a67414ebcaf6c..479df8f562aa12c2d6b0f4461202807fbc9c345c 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigSettings.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigSettings.cxx
@@ -448,10 +448,10 @@ void TRTDigSettings::fillDefaults(const InDetDD::TRT_DetectorManager* detmgr) {
   m_cosmicFlag=0;
   m_isCTB = false;
   m_isOverlay=false;
+  m_noiseInUnhitStraws = false;
 
   // trues
   m_timeCorrection = true;
-  m_noiseInUnhitStraws = true;
   m_noiseInSimhits = true;
   m_electronicsAreAtFarEnd = true;
   m_timeshiftsSymmetricForPhiSectors = true;
@@ -509,7 +509,7 @@ void TRTDigSettings::fillDefaults(const InDetDD::TRT_DetectorManager* detmgr) {
   // Delta-ray suppression tune with backward compatibility with non suppressed delta-ray simulation tagged as 01-01-07
   // Delta-ray suppression HT middle-bit fraction tune - 2015 data; 01-01-16
   m_trtRangeCutProperty = m_doubleparMap["TrtRangeCutProperty"].valueSetByUser;//To avoid overwritting warning message and to use python configured value
-  if(fabs(m_trtRangeCutProperty-0.05) >= std::numeric_limits<double>::epsilon()){ 
+  if(fabs(m_trtRangeCutProperty-0.05) >= std::numeric_limits<double>::epsilon()){
     m_lowThresholdBar        = 0.260*CLHEP::keV;
     m_lowThresholdEC         = 0.275*CLHEP::keV;
     m_highThresholdBarShort  = 5.195*CLHEP::keV;
@@ -537,7 +537,7 @@ void TRTDigSettings::fillDefaults(const InDetDD::TRT_DetectorManager* detmgr) {
   // HT middle-bit fraction tune - wider shaping function; 01-00-24
   // HT middle-bit fraction tune - 2015 data; 01-01-16
   // Argon LT tune to 2015 data; 01-02-06
-  m_lowThresholdBarArgon        = 0.150*CLHEP::keV; 
+  m_lowThresholdBarArgon        = 0.150*CLHEP::keV;
   m_lowThresholdECArgon         = 0.150*CLHEP::keV;
   m_highThresholdBarShortArgon  = 2.607*CLHEP::keV;
   m_highThresholdBarLongArgon   = 2.540*CLHEP::keV;
@@ -547,7 +547,7 @@ void TRTDigSettings::fillDefaults(const InDetDD::TRT_DetectorManager* detmgr) {
   m_trEfficiencyEndCapAArgon = 0.80;
   m_trEfficiencyEndCapBArgon = 0.80;
 
-  // (Krypton) 
+  // (Krypton)
   // Initial implementation in May 2015 - guess; 01-01-00
   // Tuning from 2015 data by Kevin in April 2016, no LT tune; 01-02-01
   m_lowThresholdBarKrypton = 0.140*CLHEP::keV;
@@ -556,7 +556,7 @@ void TRTDigSettings::fillDefaults(const InDetDD::TRT_DetectorManager* detmgr) {
   m_highThresholdBarLongKrypton   = 2.90*CLHEP::keV;
   m_highThresholdECAwheelsKrypton = 3.15*CLHEP::keV;
   m_highThresholdECBwheelsKrypton = 3.02*CLHEP::keV;
-  m_trEfficiencyBarrelKrypton = 0.49; 
+  m_trEfficiencyBarrelKrypton = 0.49;
   m_trEfficiencyEndCapAKrypton = 0.68;
   m_trEfficiencyEndCapBKrypton = 0.68;
 
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx
index 82dba0b7ac8856e48622c84fed34266ab1a10f14..5985885a344983081c4e3dc5834f7b8bda1285f1 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTDigitizationTool.cxx
@@ -436,12 +436,12 @@ StatusCode TRTDigitizationTool::processStraws(std::set<int>& sim_hitids, std::se
   m_cosmicEventPhase = 0.0;
   if (m_settings->doCosmicTimingPit()) {
     m_cosmicEventPhase = getCosmicEventPhase();
-     //std::cout << "AJB " << m_cosmicEventPhase << std::endl;
+    //std::cout << "AJB " << m_cosmicEventPhase << std::endl;
   };
 
-  // Create  a vector of deposits 
-  std::vector<InDetSimData::Deposit> depositVector(100); 
-  
+  // Create  a vector of deposits
+  std::vector<InDetSimData::Deposit> depositVector(100);
+
   // loop over all straws
   TimedHitCollection<TRTUncompressedHit>::const_iterator i, e;
   while (m_thpctrt->nextDetectorElement(i, e)) {
@@ -532,14 +532,15 @@ StatusCode TRTDigitizationTool::processStraws(std::set<int>& sim_hitids, std::se
 				       emulateKrFlag,
                                        m_particleFlag);
 
-
-// Sorry, a lot of test code here before the output digit is saved.
+    // Sorry, a lot of test code here before the output digit is saved.
 
     // query m_particleFlag bits 0 to 15 (left-to-right)
     //std::cout << "AJB "; for (unsigned i=0;i<16;i++) std::cout << particleFlagQueryBit(i,m_particleFlag); std::cout << std::endl;
 
     //AJB, Print out the digits etc (for debugging)
+    //int          mstrw = digit_straw.GetStrawID();
     //unsigned int mword = digit_straw.GetDigit();
+    //std::cout << "AJB " << mstrw << ":" << mword << std::endl;
     //print_mword_properties(mword); // AJB
     //std::cout << "AJB "; bits24(mword);
     //std::cout << "AJB "; bits27(mword);
@@ -570,6 +571,9 @@ StatusCode TRTDigitizationTool::processStraws(std::set<int>& sim_hitids, std::se
     // finally push back the output digit.
     if ( digit_straw.GetDigit() ) {
       m_vDigits.push_back(digit_straw);
+      //int          mstrw = digit_straw.GetStrawID();
+      //unsigned int mword = digit_straw.GetDigit();
+      //std::cout << "AJB "; bits32(mword);
     }
 
   } // end of straw loop
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTElectronicsProcessing.cxx b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTElectronicsProcessing.cxx
index 157ce4c53e38a6ce3c7166906cd88463a2b1dd17..ceee2aed57a9569259b1b852bfdeb65ff804f27c 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTElectronicsProcessing.cxx
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/TRTElectronicsProcessing.cxx
@@ -308,8 +308,27 @@ void TRTElectronicsProcessing::ProcessDeposits( const std::vector<TRTElectronics
   //for (int i=0; i<m_totalNumberOfBins; ++i) std::cout <<  m_highhThresholdDiscriminator[i] << " ";
   //std::cout << std::endl;
 
-  // Finally turn the fine discriminator response arrays into an output digit.
-  const unsigned int digit(EncodeDigit());
+  // Finally turn the fine discriminator response arrays into an output digit;
+  // for RDO reduction, zero: msb, and first 4 unused bits, first and third HT bits, last 4 LT bits
+  //
+  //   bit31                          bit0
+  //   |    leading          trailing |
+  //   #----HLLLLLLLLHLLLLLLLLHLLLLLLLL
+  //   00000011111111111111111011110000
+
+  unsigned int digit = EncodeDigit() & 0x03FFFEF0;
+
+  // Only attempt this if the digit is non-zero
+  if ( m_settings->isOverlay() && digit ) { //doing overlay
+    digit += (1<<31);//flag digit a "MC" one
+    static bool first = true;
+    if (first){
+      first=false;
+      msg(MSG::DEBUG) << "ACH666: Flagging digits as MC (for overlay)" << endmsg;
+    }
+  }
+
+  // The digit only gets written to disk if it is non-zero
   if (digit) {
     outdigit = TRTDigit(hitID, digit);
   }
@@ -496,15 +515,6 @@ unsigned TRTElectronicsProcessing::EncodeDigit() const {
     }
   }
 
-  if (m_settings->isOverlay()){//doing overlay
-    digit += (1<<31);//flag digit a "MC" one
-    static bool first = true;
-    if (first){
-      first=false;
-      msg(MSG::DEBUG) << "ACH666: Flagging digits as MC (for overlay)" << endmsg;
-    }
-  }
-
   return digit;
 }
 
diff --git a/InnerDetector/InDetDigitization/TRT_Digitization/src/driftCircle.h b/InnerDetector/InDetDigitization/TRT_Digitization/src/driftCircle.h
index bc788fa52083f4612fbcc0706da6c9f77f3c5024..cfe4cf0d6f31cc0eac3063dfdea9deeea5efa047 100644
--- a/InnerDetector/InDetDigitization/TRT_Digitization/src/driftCircle.h
+++ b/InnerDetector/InDetDigitization/TRT_Digitization/src/driftCircle.h
@@ -10,6 +10,16 @@
 // For basic tuning and development tests.
 // 13/10/2012 Andrew.Beddall@cern.ch
 
+void bits32(unsigned int n) {
+  for (unsigned int k=0; k<32; k++) {
+    unsigned int i = n & 0x80000000u;
+    bool b = (i==0x80000000u);
+    std::cout << b;
+    n=n<<1;
+  }
+  std::cout << std::endl;
+}
+
 void bits27(unsigned int n) {
   for (unsigned int k=0; k<32; k++) {
     if (k>4) {
diff --git a/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/doc/packagedoc.h b/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/doc/packagedoc.h
index 670d3825d733b7d8739020beb304267d22ad94d2..09ed5299c18dfd354306b3fb5ac8fbd22e2eaf22 100644
--- a/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/doc/packagedoc.h
+++ b/InnerDetector/InDetEventCnv/InDetBCM_EventAthenaPool/doc/packagedoc.h
@@ -10,17 +10,6 @@
 
 This package contains the persistent representations of the Beam Conditions Monitor (BCM) raw data objects (RDOs), as well as converters between these persistent forms and their transient analogues, which are found in the package InDetBCM_RawData.
 
-@ref used_InDetBCM_EventAthenaPool
 
-@ref requirements_InDetBCM_EventAthenaPool
 
 */
-
-/**
-@page used_InDetBCM_EventAthenaPool Used Packages
-*/
-
-/**
-@page requirements_InDetBCM_EventAthenaPool Requirements
-*/
-
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/CreateTransientTemplate.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/CreateTransientTemplate.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..df1ecd58416547f88eabca79d92f70de7479d812
--- /dev/null
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/CreateTransientTemplate.cxx
@@ -0,0 +1,26 @@
+#include "CreateTransientTemplate.h"
+#include <iostream>
+#include <signal.h>
+
+using namespace TPCnv;
+
+std::unique_ptr<InDetRawDataContainer<InDetRawDataCollection<PixelRDORawData> >>
+  CreateTransient<InDetRawDataContainer<InDetRawDataCollection<PixelRDORawData> >>::create() { 
+  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+return nullptr; }
+
+
+std::unique_ptr<InDetRawDataContainer<InDetRawDataCollection<TRT_RDORawData> >>
+  CreateTransient<InDetRawDataContainer<InDetRawDataCollection<TRT_RDORawData> >>::create() { 
+  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+  return nullptr; }
+
+std::unique_ptr<InDetRawDataContainer<InDetRawDataCollection<SCT_RDORawData> >>
+  CreateTransient<InDetRawDataContainer<InDetRawDataCollection<SCT_RDORawData> >>::create() { 
+  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+  return nullptr; }
+
+
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/CreateTransientTemplate.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/CreateTransientTemplate.h
new file mode 100644
index 0000000000000000000000000000000000000000..c89d0ae54a2a61995d9da07950148cbb2dfbf550
--- /dev/null
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/CreateTransientTemplate.h
@@ -0,0 +1,32 @@
+#ifndef INDETEVENTATHENAPOOL_CREATETRANSIENTTEMPLATE_H
+#define INDETEVENTATHENAPOOL_CREATETRANSIENTTEMPLATE_H
+
+
+#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h"
+
+#include "InDetRawData/InDetRawDataContainer.h"
+#include "InDetRawData/InDetRawDataCollection.h"
+#include "InDetRawData/PixelRDORawData.h"
+#include "InDetRawData/TRT_RDORawData.h"
+#include "InDetRawData/SCT_RDORawData.h"
+
+
+namespace TPCnv {
+
+  template<> class CreateTransient<InDetRawDataContainer<InDetRawDataCollection<PixelRDORawData> >> {
+    public: static std::unique_ptr<InDetRawDataContainer<InDetRawDataCollection<PixelRDORawData> >> create();
+  };
+
+  template<> class CreateTransient<InDetRawDataContainer<InDetRawDataCollection<TRT_RDORawData> >> {
+    public: static std::unique_ptr<InDetRawDataContainer<InDetRawDataCollection<TRT_RDORawData> >> create();
+  };
+
+  template<> class CreateTransient<InDetRawDataContainer<InDetRawDataCollection<SCT_RDORawData> >> {
+    public: static std::unique_ptr<InDetRawDataContainer<InDetRawDataCollection<SCT_RDORawData> >> create();
+  };
+
+}
+//InDetRawDataContainer<InDetRawDataCollection<SCT_RDORawData> >
+
+#endif
+
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx
index 5e8664961ea1feabdcecb2a3cfc129ee1fcc95ba..496a13a8ce7bec0f682b4fa4193164e469352f44 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p1.cxx
@@ -11,6 +11,7 @@
 #include "Pixel1RawDataCnv_p1.h"
 #include "Pixel1RawDataContainerCnv_p1.h"
 #include "MsgUtil.h"
+#include "CreateTransientTemplate.h"
 
 void Pixel1RawDataContainerCnv_p1::transToPers(const PixelRDO_Container* transCont, InDetRawDataContainer_p1* persCont, MsgStream &log) 
 {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p2.cxx
index 69f1a1ee81659c6f1116d02acb39eab29f7f68c7..b38e98c752857f36bf5076f981bc23120965a044 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p2.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/Pixel1RawDataContainerCnv_p2.cxx
@@ -11,6 +11,8 @@
 #include "Pixel1RawDataCnv_p2.h"
 #include "Pixel1RawDataContainerCnv_p2.h"
 #include "MsgUtil.h"
+#include "CreateTransientTemplate.h"
+
 
 void Pixel1RawDataContainerCnv_p2::transToPers(const PixelRDO_Container* transCont, InDetRawDataContainer_p2* persCont, MsgStream &log) 
 {
@@ -35,10 +37,9 @@ void Pixel1RawDataContainerCnv_p2::transToPers(const PixelRDO_Container* transCo
     Pixel1RawDataCnv_p2  chanCnv;
     TRANS::const_iterator it_Coll     = transCont->begin();
     TRANS::const_iterator it_CollEnd  = transCont->end();
-    unsigned int collIndex;
     unsigned int chanBegin = 0;
     unsigned int chanEnd = 0;
-    int numColl = transCont->numberOfCollections();
+    unsigned int numColl = transCont->numberOfCollections();
     //if(numColl == transCont->fullSize() ) { // let's count how many collections we have:
     // numColl = 0;
     // for ( ; it_Coll != it_CollEnd; it_Coll++)
@@ -46,14 +47,16 @@ void Pixel1RawDataContainerCnv_p2::transToPers(const PixelRDO_Container* transCo
     // it_Coll     = transCont->begin(); // reset the iterator, we used it!
     //}
     persCont->m_collections.resize(numColl);
-    MSG_DEBUG(log," Preparing " << persCont->m_collections.size() << "Collections");
-  
-    for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++)  {
+    log << MSG::INFO << " Preparing " << persCont->m_collections.size() << " Collections" << endmsg;
+
+    for (unsigned int collIndex = 0; it_Coll != it_CollEnd; ++collIndex, it_Coll++)  {
         // Add in new collection
         const PixelRDO_Collection& collection = (**it_Coll);
         chanBegin  = chanEnd;
         chanEnd   += collection.size();
+        if(collIndex >= numColl) log << MSG::ERROR << "Accessing collIndex " << collIndex << "/" << numColl << endmsg;
         InDetRawDataCollection_p1& pcollection = persCont->m_collections[collIndex];
+
         pcollection.m_id    = collection.identify().get_identifier32().get_compact();
         pcollection.m_hashId = (unsigned int) collection.identifyHash();
         pcollection.m_begin = chanBegin;
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx
index 850e899e66a30aca361794fe19a55728d2b3a7e5..2f36bd5feb3c31e24bad776f4c3e65c74362fd10 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.cxx
@@ -84,7 +84,6 @@ InDet::PixelClusterContainer* PixelClusterContainerCnv::createTransient() {
     p_collection = m_converter_p2.createTransient( p_coll.get(), msg() );
   } else if( compareClassGuid(p1_guid) ) {
     ATH_MSG_DEBUG("createTransient(): T/P version 1 detected");
-    usingTPCnvForReading( m_TPConverter );
     std::unique_ptr< InDet::PixelClusterContainer_tlp1 >  p_coll( poolReadObject< InDet::PixelClusterContainer_tlp1 >() );
     p_collection = m_TPConverter.createTransient( p_coll.get(), msg() );
   }
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.h
index d03257b582c65ea0ce25290258660eac0bee8fee..b86c6ddfdc94796efad1b9723bf2a4721c5a5299 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.h
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelClusterContainerCnv.h
@@ -32,9 +32,7 @@ typedef  T_AthenaPoolCustomCnv<InDet::PixelClusterContainer, PixelClusterContain
 ** Create derived converter to customize the saving of identifiable
 ** container
 **/
-class PixelClusterContainerCnv :
-    public PixelClusterContainerCnvBase,
-    public AthenaPoolCnvTPExtension
+class PixelClusterContainerCnv :  public PixelClusterContainerCnvBase
 {
   friend class CnvFactory<PixelClusterContainerCnv >;
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx
index 284ba17954b59ea15f2b095a11cd7ca86c083a6a..4d922261b3337d737fb1f727ea53ad14884bbfab 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.cxx
@@ -10,6 +10,8 @@
 
 #include <iostream>
 
+#include "CreateTransientTemplate.h"
+
 //================================================================
 namespace {
   std::string shortPrint(const PixelRDO_Container *main_input_Pixel, unsigned maxprint=25) {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.h
index 432d02de82586a06058a2da1216d4941dab7f770..d465136586a613268d2b2f49255c4f3bcb24863d 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.h
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv.h
@@ -16,6 +16,7 @@
 #include "PixelRDO_ContainerCnv_p0.h"
 #include "Pixel1RawDataContainerCnv_p1.h"
 #include "Pixel1RawDataContainerCnv_p2.h"
+#include "CreateTransientTemplate.h"
 
 // the latest persistent representation type of DataCollection:
 typedef  InDetRawDataContainer_p2      PixelRDO_Container_PERS;
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv_p0.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv_p0.cxx
index cae2491e3c3f9d2fbd6199143c96df1a0ee8bf20..75d6bbc034fb5c082634c73e34fd59685d73797d 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv_p0.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/PixelRDO_ContainerCnv_p0.cxx
@@ -13,6 +13,7 @@
 #include <string>
 #include <iostream>
 #include <sstream>
+#include "CreateTransientTemplate.h"
 
 //================================================================
 PixelRDO_Container* PixelRDO_ContainerCnv_p0::createTransient(const PixelRDO_Container_p0* persObj, MsgStream& log) {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT1_RawDataContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT1_RawDataContainerCnv_p1.cxx
index 0cf378516fb018b66d4689f5f455443ef6b5f9c8..fc91f7baf4484bc89cce6dc913ebdb844dab0bb7 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT1_RawDataContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT1_RawDataContainerCnv_p1.cxx
@@ -11,6 +11,7 @@
 #include "SCT1_RawDataCnv_p1.h"
 #include "SCT1_RawDataContainerCnv_p1.h"
 #include "MsgUtil.h"
+#include "CreateTransientTemplate.h"
 
 void SCT1_RawDataContainerCnv_p1::transToPers(const SCT_RDO_Container* transCont, InDetRawDataContainer_p1* persCont, MsgStream &log) 
 {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx
index 08c6b67b8826fde35d46d0eda2d5fd1d0bd1350c..9176f31d1632cb9a80c49189e3d32a99de8c37d2 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.cxx
@@ -85,7 +85,6 @@ InDet::SCT_ClusterContainer* SCT_ClusterContainerCnv::createTransient() {
    
   } else if( compareClassGuid(p1_guid) ) {
     //ATH_MSG_DEBUG("createTransient(): T/P version 1 detected");
-    usingTPCnvForReading( m_TPConverter );
     std::unique_ptr< InDet::SCT_ClusterContainer_tlp1 >  p_coll( poolReadObject< InDet::SCT_ClusterContainer_tlp1 >() );
     p_collection = m_TPConverter.createTransient( p_coll.get(), msg() );
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h
index e7658909fb97797f904f78a8dc518f628158c106..027a1e159acc2fb668316540ab8afd943651cbec 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_ClusterContainerCnv.h
@@ -32,9 +32,7 @@ typedef  T_AthenaPoolCustomCnv<InDet::SCT_ClusterContainer, SCT_ClusterContainer
 ** Create derived converter to customize the saving of identifiable
 ** container
 **/
-class SCT_ClusterContainerCnv :
-    public SCT_ClusterContainerCnvBase,
-    public AthenaPoolCnvTPExtension
+class SCT_ClusterContainerCnv : public SCT_ClusterContainerCnvBase
 {
   friend class CnvFactory<SCT_ClusterContainerCnv >;
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv.cxx
index fd41f623577a5568a4e821a9a815d399a4b43867..82f71227d153cbd71d101c17b4c9bd9f003e6fb9 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv.cxx
@@ -9,7 +9,7 @@
 #include <memory>
 
 #include <iostream>
-
+#include "CreateTransientTemplate.h"
 
 //================================================================
 namespace {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv_p0.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv_p0.cxx
index f2b02bb3cf7b20361089650bbdcb716527903efa..cd8ae923550531e12f3fbbe725f625e22b4bcd19 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv_p0.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RDO_ContainerCnv_p0.cxx
@@ -11,6 +11,7 @@
 #include <string>
 #include <iostream>
 #include <sstream>
+#include "CreateTransientTemplate.h"
 
 //================================================================
 SCT_RDO_Container* SCT_RDO_ContainerCnv_p0::createTransient(const SCT_RDO_Container_p0* persObj, MsgStream& log) {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p1.cxx
index 576508995fc0af12134fa6871e687403de149025..2f463e2ac3b2e93c49b1446a92668b5aa6b79a56 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p1.cxx
@@ -12,6 +12,7 @@
 #include "SCT1_RawDataCnv_p1.h"
 #include "SCT3_RawDataCnv_p1.h"
 #include "SCT_RawDataContainerCnv_p1.h"
+#include "CreateTransientTemplate.h"
 
 void SCT_RawDataContainerCnv_p1::transToPers(const SCT_RDO_Container* transCont, SCT_RawDataContainer_p1* persCont, MsgStream& log) 
 {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p2.cxx
index 22d4323a4ffc03561ac8166a2763b7d354caff1e..9677156c4b7d1edc09f66f8b802044e37857dbe5 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p2.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p2.cxx
@@ -13,6 +13,7 @@
 #include "SCT1_RawDataCnv_p1.h"
 #include "SCT3_RawDataCnv_p2.h"
 #include "SCT_RawDataContainerCnv_p2.h"
+#include "CreateTransientTemplate.h"
 
 //#define SCT_DEBUG
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p3.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p3.cxx
index d45e26edcf908a7e73718b3fcc69dfb8c7b949c2..49c6c83f2a2cd712f7de392c2e4918dbf1639bb0 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p3.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/SCT_RawDataContainerCnv_p3.cxx
@@ -13,6 +13,7 @@
 #include "SCT1_RawDataCnv_p2.h"
 #include "SCT3_RawDataCnv_p3.h"
 #include "SCT_RawDataContainerCnv_p3.h"
+#include "CreateTransientTemplate.h"
 
 //#define SCT_DEBUG
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx
index dd12d213ae14c1cadcc1d5a3371694be0a3acbd0..247294325de03cfe2f53d1cf72a63a8133392dbd 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.cxx
@@ -81,14 +81,12 @@ InDet::TRT_DriftCircleContainer* TRT_DriftCircleContainerCnv::createTransient()
   }
   else if( compareClassGuid(p1_guid) ) {
     ATH_MSG_DEBUG("createTransient(): T/P version 1 detected");
-    usingTPCnvForReading( m_TPConverter );
     std::unique_ptr< InDet::TRT_DriftCircleContainer_tlp1 >  p_coll( poolReadObject< InDet::TRT_DriftCircleContainer_tlp1 >() );
     p_collection = m_TPConverter.createTransient( p_coll.get(), msg() );
   }
   //----------------------------------------------------------------
   else if( compareClassGuid(p0_guid) ) {
     ATH_MSG_DEBUG("createTransient(): Old input file");
-
     std::unique_ptr< TRT_DriftCircleContainer_p0 >   col_vect( poolReadObject< TRT_DriftCircleContainer_p0 >() );
     p_collection = m_converter_p0.createTransient( col_vect.get(), msg() );
   }
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.h b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.h
index ef45eb72a0aa5994fbaaad5fe2b10c8f38955366..3ae53a511fee2f77b5270276217f4080e5456d0e 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.h
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_DriftCircleContainerCnv.h
@@ -20,9 +20,7 @@
 typedef  InDet::TRT_DriftCircleContainer_p2  TRT_DriftCircleContainer_PERS;
 typedef  T_AthenaPoolCustomCnv<InDet::TRT_DriftCircleContainer, TRT_DriftCircleContainer_PERS >   TRT_DriftCircleContainerCnvBase;
 
-class TRT_DriftCircleContainerCnv :
-    public TRT_DriftCircleContainerCnvBase, 
-    public AthenaPoolCnvTPExtension
+class TRT_DriftCircleContainerCnv : public TRT_DriftCircleContainerCnvBase
 {
   friend class CnvFactory<TRT_DriftCircleContainerCnv >;
 
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p1.cxx
index 6813f43198d3fdf7769e0b4a967edb462d371fac..629837dd1f0d92769249258bb5a2f17a23263f47 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p1.cxx
@@ -10,6 +10,8 @@
 #include "TRT_LoLumRawDataCnv_p1.h"
 #include "TRT_LoLumRawDataContainerCnv_p1.h"
 #include "MsgUtil.h"
+#include "CreateTransientTemplate.h"
+
 
 void TRT_LoLumRawDataContainerCnv_p1::transToPers(const TRT_RDO_Container* transCont, InDetRawDataContainer_p1* persCont, MsgStream &log) 
 {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p2.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p2.cxx
index 57214e093478233ee967155ecaf349d129927916..6ba4bb7fee1b6e997d844c4aacaec9ed1a2effda 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p2.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_LoLumRawDataContainerCnv_p2.cxx
@@ -10,6 +10,8 @@
 #include "TRT_LoLumRawDataCnv_p2.h"
 #include "TRT_LoLumRawDataContainerCnv_p2.h"
 #include "MsgUtil.h"
+#include "CreateTransientTemplate.h"
+
 
 void TRT_LoLumRawDataContainerCnv_p2::transToPers(const TRT_RDO_Container* transCont, InDetRawDataContainer_p2* persCont, MsgStream &log) 
 {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx
index add6ef5a8d52d6ca1aabfd683fb5586094514dee..1004b4dc54d856def9761c1c8f374d8a663cf43e 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv.cxx
@@ -9,6 +9,7 @@
 #include <memory>
 
 #include <iostream>
+#include "CreateTransientTemplate.h"
 
 //================================================================
 namespace {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p0.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p0.cxx
index 0c88796d73e7d29c2b8ed2547279f4e05722c0d8..dc8ce89a1b6c3f3c19b88b75acd444a58bfa9ca0 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p0.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p0.cxx
@@ -13,6 +13,7 @@
 #include <string>
 #include <iostream>
 #include <sstream>
+#include "CreateTransientTemplate.h"
 
 //================================================================
 TRT_RDO_Container* TRT_RDO_ContainerCnv_p0::createTransient(const TRT_RDO_Container_p0* persObj, MsgStream& log) {
diff --git a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx
index 8a9bcd9fd7dd167e99ed736520603dcc2a558e8e..c6798a99dd2b521bc99e54e561addb5a747e6413 100644
--- a/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventAthenaPool/src/TRT_RDO_ContainerCnv_p1.cxx
@@ -13,6 +13,8 @@
 #include <string>
 #include <iostream>
 #include <sstream>
+#include "CreateTransientTemplate.h"
+
 
 //================================================================
 namespace {
@@ -66,8 +68,8 @@ void TRT_RDO_ContainerCnv_p1::transToPers(const TRT_RDO_Container* trans, TRT_RD
   if(trans->begin() != trans->end()) {
     MSG_DEBUG(log,"[p1] using container iterators");
     for(TRT_RDO_Container::const_iterator it=trans->begin(); it != trans->end(); it++) {
-      if(it->cptr()) {
-	pers->push_back(const_cast<TRT_RDO_Container::IDENTIFIABLE*>(it->cptr()) );
+      if(*it) {
+	pers->push_back(const_cast<TRT_RDO_Container::IDENTIFIABLE*>(*it) );
       }
       else {
 	null_count++;
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p1_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p1_test.cxx
index e6e77c8c63f9a0d312b6132f03ee9bad70c8a05e..610c8ae642aa650f77aa6d1e4b1c882b646a24b3 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p1_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p1_test.cxx
@@ -85,14 +85,11 @@ void compare (const InDet::PixelClusterContainer& p1,
   InDet::PixelClusterContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const InDet::PixelClusterCollection& coll1 = **it1;
-      const InDet::PixelClusterCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
+    const InDet::PixelClusterCollection& coll1 = **it1;
+    const InDet::PixelClusterCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
         compare (*coll1[j], *coll2[j]);
-      }
     }
     ++it1;
     ++it2;
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p2_test.cxx
index aca18b2e2c30e0c474a826c6fd740d516c65ad02..0156e2863c21ba27ffe0b5577cae61b2b7241134 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p2_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p2_test.cxx
@@ -84,14 +84,11 @@ void compare (const InDet::PixelClusterContainer& p1,
   InDet::PixelClusterContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const InDet::PixelClusterCollection& coll1 = **it1;
-      const InDet::PixelClusterCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const InDet::PixelClusterCollection& coll1 = **it1;
+    const InDet::PixelClusterCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p3_test.cxx
index 183e91ab898883d15ddcfb9f23e02a8d9ffe2ee8..67902fbb528269c805b7436194ffec700096fffd 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p3_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/PixelClusterContainerCnv_p3_test.cxx
@@ -84,14 +84,11 @@ void compare (const InDet::PixelClusterContainer& p1,
   InDet::PixelClusterContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const InDet::PixelClusterCollection& coll1 = **it1;
-      const InDet::PixelClusterCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const InDet::PixelClusterCollection& coll1 = **it1;
+    const InDet::PixelClusterCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx
index 12523d030727fae6e887afd63fb5c70e79b1af67..fb3884cad414f4582dc3e8853eb9c13c2ff8c840 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p2_test.cxx
@@ -73,14 +73,11 @@ void compare (const InDet::SCT_ClusterContainer& p1,
   InDet::SCT_ClusterContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const InDet::SCT_ClusterCollection& coll1 = **it1;
-      const InDet::SCT_ClusterCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const InDet::SCT_ClusterCollection& coll1 = **it1;
+    const InDet::SCT_ClusterCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx
index b50c49193e6c2712f6ca5ed6ca1917eaaa4c58ea..71f05f52d0a3c7f4c7f96fed705bafb41a5bf0e9 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/SCT_ClusterContainerCnv_p3_test.cxx
@@ -73,14 +73,11 @@ void compare (const InDet::SCT_ClusterContainer& p1,
   InDet::SCT_ClusterContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const InDet::SCT_ClusterCollection& coll1 = **it1;
-      const InDet::SCT_ClusterCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const InDet::SCT_ClusterCollection& coll1 = **it1;
+    const InDet::SCT_ClusterCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/TRT_DriftCircleContainerCnv_p2_test.cxx b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/TRT_DriftCircleContainerCnv_p2_test.cxx
index ff8acb4f3d0ab421cc2565dee4bde474d2c45edd..c4f3e9a7e5fe26d28888783639f41fe88a205837 100644
--- a/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/TRT_DriftCircleContainerCnv_p2_test.cxx
+++ b/InnerDetector/InDetEventCnv/InDetEventTPCnv/test/TRT_DriftCircleContainerCnv_p2_test.cxx
@@ -53,14 +53,11 @@ void compare (const InDet::TRT_DriftCircleContainer& p1,
   InDet::TRT_DriftCircleContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const InDet::TRT_DriftCircleCollection& coll1 = **it1;
-      const InDet::TRT_DriftCircleCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const InDet::TRT_DriftCircleCollection& coll1 = **it1;
+    const InDet::TRT_DriftCircleCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/InnerDetector/InDetEventCnv/InDetJiveXML/doc/packagedoc.h b/InnerDetector/InDetEventCnv/InDetJiveXML/doc/packagedoc.h
index 9dfbde70bfd305a10c3d99f51f0892fd9d9b7c45..db3794322db92a2e5e7e7f577d8b8c4c4a6af7bf 100644
--- a/InnerDetector/InDetEventCnv/InDetJiveXML/doc/packagedoc.h
+++ b/InnerDetector/InDetEventCnv/InDetJiveXML/doc/packagedoc.h
@@ -25,15 +25,5 @@ forward them to the formatting tool. Each tool implements the IDataRetriever int
 - JiveXML::SCTRDORetriever @copydoc JiveXML::SCTRDORetriever
 
 @section InDetJiveXML_InDetJiveXMLEnv Environment
- - @ref used_InDetJiveXML
- - @ref requirements_InDetJiveXML
 
 */
-
-/**
-@page used_InDetJiveXML Used Packages
-*/
-
-/**
-@page requirements_InDetJiveXML Requirements
-*/
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/python/SCTxAODJobProperties.py b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/python/SCTxAODJobProperties.py
index 8a8733d1a6a434636979852ec633801150fef59a..07e0708f76190156748e343e9f634c499f56fbbb 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/python/SCTxAODJobProperties.py
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/python/SCTxAODJobProperties.py
@@ -18,11 +18,27 @@ class SCTxAODJobPropertyContainer(JobPropertyContainer):
 jobproperties.add_Container(SCTxAODJobPropertyContainer)
 
 class Prescale(JobProperty):
-    """ Prescale factor for SCT AxAOD """
+    """ Default prescale factor for SCT AxAOD """
     statusOn = True
     allowedTypes = ['int']
     StoredValue = 1
     pass
 jobproperties.SCTxAODJobPropertyContainer.add_JobProperty(Prescale)
 
+class PrescaleExpress(JobProperty):
+    """ Prescale factor for express stream for SCT AxAOD """
+    statusOn = True
+    allowedTypes = ['int']
+    StoredValue = 50
+    pass
+jobproperties.SCTxAODJobPropertyContainer.add_JobProperty(PrescaleExpress)
+
+class PrescaleIDprescaledL1(JobProperty):
+    """ Prescale factor for IDprescaledL1 stream for SCT AxAOD """
+    statusOn = True
+    allowedTypes = ['int']
+    StoredValue = 10
+    pass
+jobproperties.SCTxAODJobPropertyContainer.add_JobProperty(PrescaleIDprescaledL1)
+
 SCTxAODFlags = jobproperties.SCTxAODJobPropertyContainer
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/SCTxAOD.py b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/SCTxAOD.py
index 5235fd3b113e387764456c88913d43245d74b10a..9bc6eb9007140c51718a5231b714f1cd7b3879ee 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/SCTxAOD.py
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/share/SCTxAOD.py
@@ -20,6 +20,10 @@ dumpTriggerInfo=True
 # Print settings for main tools
 printSctDxAODConf = True
 
+# Message logger
+from AthenaCommon import Logging
+msg = Logging.logging.getLogger('SCTxAOD')
+
 ## Autoconfiguration adjustements
 isSctDxAODSimulation = False
 if (globalflags.DataSource == 'geant4'):
@@ -43,6 +47,16 @@ skimmingTools = []
 # https://twiki.cern.ch/twiki/bin/view/AtlasProtected/DerivationFramework#Applying_prescales
 from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__PrescaleTool
 from InDetPrepRawDataToxAOD.SCTxAODJobProperties import SCTxAODFlags
+
+from RecExConfig.RecFlags import rec
+msg.info("rec.triggerStream() is "+rec.triggerStream())
+if not SCTxAODFlags.Prescale.is_locked():
+    if rec.triggerStream()=='express':
+        SCTxAODFlags.Prescale = SCTxAODFlags.PrescaleExpress()
+    elif rec.triggerStream()=='IDprescaledL1':
+        SCTxAODFlags.Prescale = SCTxAODFlags.PrescaleIDprescaledL1()
+msg.info("SCTxAODFlags.Prescale() is "+str(SCTxAODFlags.Prescale()))
+
 prescaleTool = DerivationFramework__PrescaleTool(name = "SCTxAOD_PrescaleTool",
                                                  Prescale = SCTxAODFlags.Prescale())
 ToolSvc += prescaleTool
@@ -61,16 +75,16 @@ xAOD_SCT_PrepDataToxAOD.WriteRDOinformation = True
     #xAOD_SCT_PrepDataToxAOD.WriteSDOs           = True
     #xAOD_SCT_PrepDataToxAOD.WriteSiHits         = True # if available
 
-if (printSctDxAODConf):
-    print xAOD_SCT_PrepDataToxAOD
-    print xAOD_SCT_PrepDataToxAOD.properties()
+if printSctDxAODConf:
+    msg.info(xAOD_SCT_PrepDataToxAOD)
+    msg.info(xAOD_SCT_PrepDataToxAOD.properties())
 
 from InDetPrepRawDataToxAOD.InDetPrepRawDataToxAODConf import SCT_RawDataToxAOD
 xAOD_SCT_RawDataToxAOD = SCT_RawDataToxAOD( name = "SCTxAOD_SCT_RawDataToxAOD")
 xAOD_SCT_RawDataToxAOD.OutputLevel = INFO
 if printSctDxAODConf:
-    print xAOD_SCT_RawDataToxAOD
-    print xAOD_SCT_RawDataToxAOD.properties()
+    msg.info(xAOD_SCT_RawDataToxAOD)
+    msg.info(xAOD_SCT_RawDataToxAOD.properties())
 
 
 #################
@@ -113,9 +127,9 @@ if dumpBytestreamErrors:
                                                         OutputLevel =INFO)
     ToolSvc += DFEI
     augmentationTools+=[DFEI]
-    if (printSctDxAODConf):
-        print DFEI
-        print DFEI.properties()
+    if printSctDxAODConf:
+        msg.info(DFEI)
+        msg.info(DFEI.properties())
 
 # Add Unassociated hits augmentation tool
 if dumpUnassociatedHits:
@@ -126,9 +140,9 @@ if dumpUnassociatedHits:
                                                                                   SCTClusterContainer = "SCT_Clusters",
                                                                                   TRTDriftCircleContainer = "TRT_DriftCircles")
     ToolSvc += unassociatedHitsGetterTool
-    if (printSctDxAODConf):
-        print unassociatedHitsGetterTool
-        print unassociatedHitsGetterTool.properties()
+    if printSctDxAODConf:
+        msg.info(unassociatedHitsGetterTool)
+        msg.info(unassociatedHitsGetterTool.properties())
 
     from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__UnassociatedHitsDecorator
     unassociatedHitsDecorator = DerivationFramework__UnassociatedHitsDecorator (name ='SCTxAOD_unassociatedHitsDecorator',
@@ -138,9 +152,9 @@ if dumpUnassociatedHits:
                                                                                 OutputLevel =INFO)
     ToolSvc += unassociatedHitsDecorator
     augmentationTools+=[unassociatedHitsDecorator]
-    if (printSctDxAODConf):
-        print unassociatedHitsDecorator
-        print unassociatedHitsDecorator.properties()
+    if printSctDxAODConf:
+        msg.info(unassociatedHitsDecorator)
+        msg.info(unassociatedHitsDecorator.properties())
 
 
 # Add the derivation job to the top AthAlgSeqeuence
@@ -155,9 +169,9 @@ DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel("SCTxAOD_
                                                                         OutputLevel =INFO)
 
 topSequence += DerivationFrameworkJob
-if (printSctDxAODConf):
-    print DerivationFrameworkJob
-    print DerivationFrameworkJob.properties()
+if printSctDxAODConf:
+    msg.info(DerivationFrameworkJob)
+    msg.info(DerivationFrameworkJob.properties())
 
 #################
 ### Steer output file content
@@ -222,5 +236,5 @@ if dumpTriggerInfo:
     SCTVALIDStream.AddItem("xAOD::TrigDecisionAuxInfo#xTrigDecisionAux.")
     SCTVALIDStream.AddItem("xAOD::TrigNavigationAuxInfo#TrigNavigationAux.")
 
-if (printSctDxAODConf):
-    print SCTVALIDStream
+if printSctDxAODConf:
+    msg.info(SCTVALIDStream)
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
index c2505f3bfae21c0bafa59aecaa6360ec6ccf6c73..95df48195b11e7d24f15eace02416070dce6cb01 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx
@@ -60,12 +60,14 @@ PixelPrepDataToxAOD::PixelPrepDataToxAOD(const std::string &name, ISvcLocator *p
   declareProperty("WriteRDOinformation", m_writeRDOinformation = true);
 
   // --- Configuration keys
-  declareProperty("SiClusterContainer",  m_clustercontainer = "PixelClusters");
-  declareProperty("MC_SDOs", m_SDOcontainer = "PixelSDO_Map");
-  declareProperty("MC_Hits", m_sihitContainer = "PixelHits");
-  declareProperty("PRD_MultiTruth", m_multiTruth = "PRD_MultiTruthPixel");
+  declareProperty("SiClusterContainer",  m_clustercontainer_key = "PixelClusters");
+  declareProperty("MC_SDOs", m_SDOcontainer_key = "PixelSDO_Map");
+  declareProperty("MC_Hits", m_sihitContainer_key = "PixelHits");
+  declareProperty("PRD_MultiTruth", m_multiTruth_key = "PRD_MultiTruthPixel");
 
   // --- Services and Tools
+  declare(m_write_xaod);
+  declare(m_write_offsets);
 
 }
 
@@ -92,6 +94,17 @@ StatusCode PixelPrepDataToxAOD::initialize()
 
   CHECK(m_lorentzAngleSvc.retrieve());
 
+  ATH_CHECK(m_clustercontainer_key.initialize());
+  m_need_sihits = (m_writeNNinformation || m_writeSiHits) && m_useTruthInfo;
+  ATH_CHECK(m_sihitContainer_key.initialize(m_need_sihits));
+  ATH_CHECK(m_SDOcontainer_key.initialize(m_writeSDOs));
+  ATH_CHECK(m_multiTruth_key.initialize(m_useTruthInfo));
+
+  m_write_xaod = m_clustercontainer_key.key();
+  ATH_CHECK(m_write_xaod.initialize());
+  m_write_offsets = m_clustercontainer_key.key() + "Offsets";
+  ATH_CHECK(m_write_offsets.initialize());
+
   return StatusCode::SUCCESS;
 }
 
@@ -103,60 +116,15 @@ StatusCode PixelPrepDataToxAOD::initialize()
 StatusCode PixelPrepDataToxAOD::execute() 
 {
   //Mandatory. Require if the algorithm is scheduled.
-  const InDet::PixelClusterContainer* PixelClusterContainer = 0;     
-  if( evtStore()->retrieve(PixelClusterContainer,m_clustercontainer).isFailure() ) {
-    ATH_MSG_ERROR("Cannot retrieve Pixel PrepDataContainer " << m_clustercontainer);
-    return StatusCode::FAILURE;
-  }
-
-  // Optional. Normally only available in Hits files -- samples need to digitised and Hits need to be copied for this to work
-  const SiHitCollection* sihitCollection = 0;
-  if((m_writeNNinformation||m_writeSiHits)&&m_useTruthInfo) {
-    if ( evtStore()->contains<SiHitCollection>(m_sihitContainer) ) {
-      ATH_CHECK(evtStore()->retrieve(sihitCollection, m_sihitContainer));
-    } else {
-      if (m_firstEventWarnings) {
-        ATH_MSG_WARNING("Si Hit cotainer no found (" << m_sihitContainer << "). Skipping it although requested.");
-        sihitCollection = 0;
-      }
-    }
-  }
-
-  // Optional. On RDO
-  const InDetSimDataCollection* sdoCollection = 0;
-  if(m_writeSDOs) {
-    if ( evtStore()->contains<InDetSimDataCollection>(m_SDOcontainer) ) {
-      ATH_CHECK(evtStore()->retrieve(sdoCollection, m_SDOcontainer));
-    } else {
-      if (m_firstEventWarnings) {
-        ATH_MSG_WARNING("SDO Collection not found (" << m_SDOcontainer << "). Skipping it although requested.");
-        sdoCollection = 0;
-      }
-    }
-  }
-
-  // Optional. On ESD and AOD
-  const PRD_MultiTruthCollection* prdmtColl = 0;
-  if (m_useTruthInfo) {
-    if ( evtStore()->contains<PRD_MultiTruthCollection>(m_multiTruth) ) {
-      ATH_CHECK(evtStore()->retrieve(prdmtColl, m_multiTruth));
-    } else {
-      ATH_MSG_WARNING("PRD Truth collection missing (" << m_multiTruth << "). Skipping it although requested.");
-      prdmtColl = 0;
-    }
-  }
-
+  SG::ReadHandle<InDet::PixelClusterContainer> PixelClusterContainer(m_clustercontainer_key);
 
   // Create the xAOD container and its auxiliary store:
-  xAOD::TrackMeasurementValidationContainer* xaod = new xAOD::TrackMeasurementValidationContainer();
-  CHECK( evtStore()->record( xaod, m_clustercontainer ) );
-  xAOD::TrackMeasurementValidationAuxContainer* aux = new xAOD::TrackMeasurementValidationAuxContainer();
-  CHECK( evtStore()->record( aux, m_clustercontainer + "Aux." ) );
-  xaod->setStore( aux );
-
-  std::vector<unsigned int>* offsets = new std::vector<unsigned int>( m_PixelHelper->wafer_hash_max(), 0 );
-  CHECK( evtStore()->record( offsets, m_clustercontainer + "Offsets" ) );
+  SG::WriteHandle<xAOD::TrackMeasurementValidationContainer> xaod(m_write_xaod);
+  ATH_CHECK(xaod.record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),
+			std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>()));
 
+  SG::WriteHandle<std::vector<unsigned int>> offsets(m_write_offsets);
+  ATH_CHECK(offsets.record(std::make_unique<std::vector<unsigned int>>(m_PixelHelper->wafer_hash_max(), 0)));
   
   // Loop over the container
   unsigned int counter(0);
@@ -273,12 +241,12 @@ StatusCode PixelPrepDataToxAOD::execute()
       xprd->auxdata<uint64_t>("detectorElementID") = detElementId;
       
       // Use the MultiTruth Collection to get a list of all true particle contributing to the cluster
-      if(prdmtColl){
+      if (m_useTruthInfo) {
+	SG::ReadHandle<PRD_MultiTruthCollection> prdmtColl(m_multiTruth_key);
         std::vector<int> barcodes;
-        //std::pair<PRD_MultiTruthCollection::const_iterator,PRD_MultiTruthCollection::const_iterator>;
         auto range = prdmtColl->equal_range(clusterId);
         for (auto i = range.first; i != range.second; ++i) {
-           barcodes.push_back( i->second.barcode() );
+	  barcodes.push_back( i->second.barcode() );
         }
         xprd->auxdata< std::vector<int> >("truth_barcode") = barcodes;
       }
@@ -286,27 +254,28 @@ StatusCode PixelPrepDataToxAOD::execute()
       std::vector< std::vector< int > > sdo_tracks;
       // Use the SDO Collection to get a list of all true particle contributing to the cluster per readout element
       //  Also get the energy deposited by each true particle per readout element   
-      if( sdoCollection ){
-	  sdo_tracks = addSDOInformation( xprd, prd,sdoCollection);
+      if(m_writeSDOs) {
+	SG::ReadHandle<InDetSimDataCollection> sdoCollection(m_SDOcontainer_key);
+	sdo_tracks = addSDOInformation(xprd, prd, *sdoCollection);
       }
     
       // Now Get the most detailed truth from the SiHits
       // Note that this could get really slow if there are a lot of hits and clusters
-      if(  sihitCollection  ){
-	  const std::vector<SiHit> matched_hits = findAllHitsCompatibleWithCluster(  prd, sihitCollection, sdo_tracks );
+      if (m_need_sihits) {
+	SG::ReadHandle<SiHitCollection> sihitCollection(m_sihitContainer_key);
+	const std::vector<SiHit> matched_hits = findAllHitsCompatibleWithCluster(prd, *sihitCollection, sdo_tracks);
 	  
-	  if(m_writeSiHits)
-	  {
-	      if ( ! sdoCollection )
-		  ATH_MSG_WARNING("Si hit truth information requested, but SDO collection not available!" );
-	      addSiHitInformation( xprd, prd, matched_hits ); 
-	  }
-	  if(m_writeNNinformation)
-	  {
-	      if ( ! sdoCollection )
-		  ATH_MSG_WARNING("Si hit truth information requested, but SDO collection not available!" );
-	      addNNTruthInfo(  xprd, prd, matched_hits );
-	  }
+	if (m_writeSiHits) {
+	  if (!m_writeSDOs)
+	    ATH_MSG_WARNING("Si hit truth information requested, but SDO collection not available!");
+	  addSiHitInformation(xprd, prd, matched_hits); 
+	}
+
+	if (m_writeNNinformation) {
+	  if (!m_writeSDOs)
+	    ATH_MSG_WARNING("Si hit truth information requested, but SDO collection not available!");
+	  addNNTruthInfo(xprd, prd, matched_hits);
+	}
       }
     }
   }
@@ -361,15 +330,15 @@ StatusCode PixelPrepDataToxAOD::execute()
 
 std::vector< std::vector< int > > PixelPrepDataToxAOD::addSDOInformation( xAOD::TrackMeasurementValidation* xprd,
 									  const InDet::PixelCluster* prd,
-									  const InDetSimDataCollection* sdoCollection ) const
+									  const InDetSimDataCollection& sdoCollection ) const
 {
   std::vector<int> sdo_word;
   std::vector< std::vector< int > > sdo_depositsBarcode;
   std::vector< std::vector< float > > sdo_depositsEnergy;
   // find hit
   for( const auto &hitIdentifier : prd->rdoList() ){
-    auto pos = sdoCollection->find(hitIdentifier);
-    if( pos != sdoCollection->end() ) {
+    auto pos = sdoCollection.find(hitIdentifier);
+    if( pos != sdoCollection.end() ) {
       sdo_word.push_back( pos->second.word() ) ;
       
       std::vector< int > sdoDepBC;
@@ -467,10 +436,10 @@ void  PixelPrepDataToxAOD::addSiHitInformation( xAOD::TrackMeasurementValidation
 
 
 std::vector<SiHit> PixelPrepDataToxAOD::findAllHitsCompatibleWithCluster( const InDet::PixelCluster* prd, 
-                                                                          const SiHitCollection* collection,
+                                                                          const SiHitCollection& collection,
 									  std::vector< std::vector< int > > & trkBCs ) const
 {
-  ATH_MSG_VERBOSE( "Got " << collection->size() << " SiHits to look through" );
+  ATH_MSG_VERBOSE( "Got " << collection.size() << " SiHits to look through" );
   std::vector<SiHit>  matchingHits;
     
   // Check if we have detector element  --  needed to find the local position of the SiHits
@@ -480,7 +449,7 @@ std::vector<SiHit> PixelPrepDataToxAOD::findAllHitsCompatibleWithCluster( const
 
   std::vector<const SiHit* >  multiMatchingHits;
   
-  for ( const auto&  siHit : *collection) {
+  for ( const auto&  siHit : collection) {
     // Check if it is a Pixel hit
     if( !siHit.isPixel() )
       continue;
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.h b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.h
index 6c124e2aae5d8dce7fd5081986be04710b5e8bd3..88139ea54074f74e609390ec311e53776b756648 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.h
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.h
@@ -12,9 +12,13 @@
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ServiceHandle.h"
-
 #include "InDetSimEvent/SiHitCollection.h"
+#include "InDetPrepRawData/PixelClusterContainer.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+#include "TrkTruthData/PRD_MultiTruthCollection.h"
 #include "xAODTracking/TrackMeasurementValidation.h"
+#include "xAODTracking/TrackMeasurementValidationContainer.h"
 
 
 #include <string>
@@ -56,7 +60,7 @@ private:
 
   std::vector< std::vector< int > >  addSDOInformation( xAOD::TrackMeasurementValidation* xprd,
 							const InDet::PixelCluster* prd,
-							const InDetSimDataCollection* sdoCollection ) const;
+							const InDetSimDataCollection& sdoCollection ) const;
 
 
   void  addSiHitInformation( xAOD::TrackMeasurementValidation* xprd, 
@@ -64,7 +68,7 @@ private:
                              const std::vector<SiHit> & matchingHits ) const;
   
   std::vector<SiHit>  findAllHitsCompatibleWithCluster(const InDet::PixelCluster* prd,
-                                                       const SiHitCollection* collection,
+                                                       const SiHitCollection& collection,
 						       std::vector< std::vector< int > > & trkBCs) const;
 
 
@@ -90,10 +94,6 @@ private:
 
 
   const PixelID *m_PixelHelper;
-  std::string  m_clustercontainer;
-  std::string  m_SDOcontainer;
-  std::string  m_sihitContainer;
-  std::string  m_multiTruth;
 
   bool  m_useTruthInfo;
   bool  m_writeSDOs;
@@ -109,7 +109,15 @@ private:
 
   // -- Private members   
   bool m_firstEventWarnings;
+  bool m_need_sihits;
+
+  SG::ReadHandleKey<InDet::PixelClusterContainer> m_clustercontainer_key;
+  SG::ReadHandleKey<SiHitCollection> m_sihitContainer_key;
+  SG::ReadHandleKey<InDetSimDataCollection> m_SDOcontainer_key;
+  SG::ReadHandleKey<PRD_MultiTruthCollection> m_multiTruth_key;
 
+  SG::WriteHandleKey<xAOD::TrackMeasurementValidationContainer> m_write_xaod;
+  SG::WriteHandleKey<std::vector<unsigned int>> m_write_offsets;
 };
 
 
diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
index 55bf7ff751104d5de00a3874cd6b68963aad925f..04d9e29172abdcc09eac01e8fe0410f46b6efd8b 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_PrepDataToxAOD.cxx
@@ -109,10 +109,10 @@ StatusCode SCT_PrepDataToxAOD::execute()
 
       // get all the RIO_Collections in the container
       
-      for( auto& collection: *rdoContainer ){
+      for(const auto& collection: *rdoContainer ){
 
         //get all the RDOs in the collection
-        for (auto& rdo : *collection) {
+        for (const auto& rdo : *collection) {
 
           if ( !rdo) {
             ATH_MSG_WARNING( "Null SCT RDO. Skipping it");
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/PixelRawDataByteStreamCnv/IPixelRawDataProviderTool.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/PixelRawDataByteStreamCnv/IPixelRawDataProviderTool.h
index 275447496331ea7fcb886cd14a9cf2f73138b370..f395fe04b32518351657d504a30292f2e4ca061b 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/PixelRawDataByteStreamCnv/IPixelRawDataProviderTool.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/PixelRawDataByteStreamCnv/IPixelRawDataProviderTool.h
@@ -9,8 +9,6 @@
 #include "ByteStreamData/RawEvent.h" 
 #include "InDetRawData/PixelRDO_Container.h"
 
-using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
-
 // the tool to decode a ROB frament
 class IPixelRawDataProviderTool : virtual public IAlgTool
 {
@@ -24,7 +22,7 @@ class IPixelRawDataProviderTool : virtual public IAlgTool
   virtual ~IPixelRawDataProviderTool(){};
 
   //! this is the main decoding method
-  virtual StatusCode convert( std::vector<const ROBFragment*>& vecRobs,
+  virtual StatusCode convert( std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs,
 		      PixelRDO_Container*               rdoIdc ) = 0;
 
 };
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/PixelRawDataByteStreamCnv/IPixelRodDecoder.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/PixelRawDataByteStreamCnv/IPixelRodDecoder.h
index c36e45f0a34f5ca2e2bead6d5af225c37ea7e4e8..07aa2afebc49609afde956625051f77096e88e06 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/PixelRawDataByteStreamCnv/IPixelRodDecoder.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/PixelRawDataByteStreamCnv/IPixelRodDecoder.h
@@ -10,8 +10,6 @@
 #include "InDetRawData/PixelRDO_Container.h"
 #include "ByteStreamData/RawEvent.h" 
 
-using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
-
 class IPixelRodDecoder : virtual public IAlgTool{
 
 public: 
@@ -20,7 +18,7 @@ public:
   // destructor 
   virtual ~IPixelRodDecoder(){}; 
 
-  virtual StatusCode fillCollection  (const ROBFragment *robFrag, PixelRDO_Container* rdoIdc, 
+  virtual StatusCode fillCollection  (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFrag, PixelRDO_Container* rdoIdc, 
 				      std::vector<IdentifierHash>* vecHash = NULL) = 0;
 };
 
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx
index 255ee3d81df789a1ccde821eac29c665ebd5b1e5..525f02cb77e0a8a42049cebd3906fb838628ea82 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.cxx
@@ -34,7 +34,6 @@ PixelRawContByteStreamCnv::PixelRawContByteStreamCnv(ISvcLocator* svcloc) :
   Converter(ByteStream_StorageType, classID(),svcloc),
   m_PixelRawContBSTool(NULL),
   m_ByteStreamEventAccess(NULL),
-  m_PixelRDO_Container(NULL),
   m_StoreGate(NULL),
   m_ChronoStat(NULL),
   m_log(msgSvc(), "PixelRawContByteStreamCnv")
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.h
index fd695795b855d3de7d1b431f778a7f69bc2075ee..426906a1133de385eda490944544766df2894834 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawContByteStreamCnv.h
@@ -72,7 +72,6 @@ private:
   PixelRawContByteStreamTool* m_PixelRawContBSTool;
 
   IByteStreamEventAccess* m_ByteStreamEventAccess; 
-  PixelRDO_Container* m_PixelRDO_Container ; 
 
   StoreGateSvc* m_StoreGate;
 
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
index cc28adee3ae0cafbe47326590969a1dda1c661a6..c58da3caceeddd67fae40f0f37060eaf048357be 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProvider.cxx
@@ -11,6 +11,7 @@
 #include "IRegionSelector/IRegSelSvc.h" 
 #include "PixelCabling/IPixelCablingSvc.h"
   
+using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
 
 // --------------------------------------------------------------------
 // Constructor
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.cxx
index 9872c1c88e0f878b5c8d0a3b39362a7574469ef1..d763b91e42346e00e309c6ada6cd555a0c701d74 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.cxx
@@ -7,6 +7,8 @@
 #include "PixelRawDataByteStreamCnv/IPixelRodDecoder.h"
 #include "PixelConditionsServices/IPixelByteStreamErrorsSvc.h"
 
+using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
+
 //#define PIXEL_DEBUG
 //#define PLOTS
 
@@ -19,7 +21,6 @@ PixelRawDataProviderTool::PixelRawDataProviderTool
      m_decoder   ("PixelRodDecoder"),
      m_bsErrSvc  ("PixelByteStreamErrorsSvc",name),
      m_robIdSet(),
-     m_lastLvl1ID(0),
      m_LVL1Collection(nullptr),
      m_BCIDCollection(nullptr)
 {
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.h
index de6e76c5b9b0240e336941443200f82cc7fdf337..5693da86baad781466f80ef6ad7090db1d6dc3b0 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRawDataProviderTool.h
@@ -38,7 +38,7 @@ class PixelRawDataProviderTool : virtual public IPixelRawDataProviderTool, publi
   StatusCode finalize();
   
   //! this is the main decoding method
-  StatusCode convert( std::vector<const ROBFragment*>& vecRobs,
+  StatusCode convert( std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs,
 		      PixelRDO_Container*               rdoIdc );
 
 
@@ -49,7 +49,6 @@ private:
   
   // bookkeeping if we have decoded a ROB already
   std::set<uint32_t> m_robIdSet;
-  unsigned int      m_lastLvl1ID;
 
   InDetTimeCollection* m_LVL1Collection;
   InDetTimeCollection* m_BCIDCollection;
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
index 30200edd39f352789445f6dd87998046a0e7d28c..8b1c75342429901c17008dbd58aa2ecb6ec98198 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.cxx
@@ -38,6 +38,8 @@
     else {++this->m_numBCIDWarnings; /* No warning */}
 
 
+using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
+
 
 //--------------------------------------------------------------------------- constructor
 PixelRodDecoder::PixelRodDecoder
@@ -46,7 +48,7 @@ PixelRodDecoder::PixelRodDecoder
       m_is_ibl_present(false),
       m_is_ibl_module(false),
       m_is_dbm_module(false),
-      masked_errors(0),
+      m_masked_errors(0),
       m_numGenWarnings(0),
       m_maxNumGenWarnings(200),
       m_numBCIDWarnings(0),
@@ -116,7 +118,7 @@ StatusCode PixelRodDecoder::initialize() {
     } else
         msg(MSG::INFO) << "Retrieved ByteStream Errors tool " << m_errors << endmsg;
 
-    masked_errors = 0;
+    m_masked_errors = 0;
 
     m_numGenWarnings = 0;
     m_maxNumGenWarnings = 200;
@@ -132,7 +134,7 @@ StatusCode PixelRodDecoder::finalize() {
 
 #ifdef PIXEL_DEBUG
     msg(MSG::VERBOSE) << "in PixelRodDecoder::finalize" << endmsg;
-    msg(MSG::DEBUG) << masked_errors << " times BCID and LVL1ID error masked" << endmsg;
+    msg(MSG::DEBUG) << m_masked_errors << " times BCID and LVL1ID error masked" << endmsg;
 #endif
 
     ATH_MSG_INFO("Total number of warnings (output limit)");
@@ -250,8 +252,8 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, PixelRDO
 
     IdentifierHash skipHash = 0xffffffff, lastHash = 0xffffffff; // used for decoding to not have to search the vector all the time
 
-    PixelRawCollection* m_coll = NULL;
-    PixelRDO_Container::const_iterator m_cont_it;
+    PixelRawCollection* coll = NULL;
+    PixelRDO_Container::const_iterator cont_it;
 
     // get the data from the word
     OFFLINE_FRAGMENTS_NAMESPACE::PointerType vint;
@@ -674,19 +676,19 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, PixelRDO
                         else { // the Hash is to be filled, the cont iterator has to be set
 
                             // search for the collection (if it's not the old one)
-                            m_cont_it = rdoIdc->indexFind(offlineIdHash);
+                            cont_it = rdoIdc->indexFind(offlineIdHash);
                             // check if collection already exists and do a nasty trick
-                            if (m_cont_it != rdoIdc->end()) {
-                                m_coll = const_cast<PixelRawCollection*>(&**m_cont_it);
+                            if (cont_it != rdoIdc->end()) {
+                                coll = const_cast<PixelRawCollection*>(&**cont_it);
                             }
                             else { 	   //if the Collection does not exist, create it
-                                m_coll = new PixelRawCollection (offlineIdHash);
+                                coll = new PixelRawCollection (offlineIdHash);
                                 // get identifier from the hash, this is not nice
                                 Identifier ident = m_pixel_id->wafer_id(offlineIdHash);
                                 // set the Identifier to be nice to downstream clients
-                                m_coll->setIdentifier(ident);
+                                coll->setIdentifier(ident);
                                 // add collection into IDC
-                                StatusCode sc = rdoIdc->addCollection(m_coll, offlineIdHash);
+                                StatusCode sc = rdoIdc->addCollection(coll, offlineIdHash);
                                 if (sc.isFailure()){
                                     msg(MSG::ERROR) << "failed to add Pixel RDO collection to container" << endmsg;
                                 return sc;
@@ -709,11 +711,11 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, PixelRDO
                     if (offlineIdHash != lastHash) { // vecHash == NULL: offline case; is the hash new?
                         lastHash = offlineIdHash;
                         // search for the collection (if it's not the old one)
-                        m_cont_it = rdoIdc->indexFind(offlineIdHash);
+                        cont_it = rdoIdc->indexFind(offlineIdHash);
                         // check if collection already exists and do a nasty trick
 
-                        if (m_cont_it != rdoIdc->end()) {
-                            m_coll = const_cast<PixelRawCollection*>(&**m_cont_it);
+                        if (cont_it != rdoIdc->end()) {
+                            coll = const_cast<PixelRawCollection*>(&**cont_it);
                             if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Collection ID = " << offlineIdHash << " already exists" << endmsg;
 
                         }
@@ -721,13 +723,13 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, PixelRDO
 
                             if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Collection ID = " << offlineIdHash << " does not exist, create it " << endmsg;
 
-                            m_coll = new PixelRawCollection (offlineIdHash);
+                            coll = new PixelRawCollection (offlineIdHash);
                             // get identifier from the hash, this is not nice
                             Identifier ident = m_pixel_id->wafer_id(offlineIdHash);
                             // set the Identifier to be nice to downstream clients
-                            m_coll->setIdentifier(ident);
+                            coll->setIdentifier(ident);
                             // add collection into IDC
-                            StatusCode sc = rdoIdc->addCollection(m_coll, offlineIdHash);
+                            StatusCode sc = rdoIdc->addCollection(coll, offlineIdHash);
                             if (sc.isFailure()) {
                                 msg(MSG::ERROR) << "failed to add Pixel RDO collection to container" << endmsg;
                                 return sc;
@@ -800,7 +802,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, PixelRDO
                                 if (hitDiscCnfg == 2 && IBLtot[1] == 2) IBLtot[1] = 16;
 
                                 // Insert the first part of the ToT info in the collection
-                                m_coll->push_back(new RDO(pixelId, IBLtot[0], mBCID,mLVL1ID,mLVL1A));
+                                coll->push_back(new RDO(pixelId, IBLtot[0], mBCID,mLVL1ID,mLVL1A));
 
 
 #ifdef PIXEL_DEBUG
@@ -846,7 +848,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, PixelRDO
                                             continue;
                                         }
 
-                                        m_coll->push_back(new RDO(pixelId, IBLtot[1], mBCID, mLVL1ID, mLVL1A));
+                                        coll->push_back(new RDO(pixelId, IBLtot[1], mBCID, mLVL1ID, mLVL1A));
 
 #ifdef PIXEL_DEBUG
                                         msg(MSG::VERBOSE) << "Collection filled with pixelId: " << pixelId << " TOT = 0x" << std::hex << IBLtot[1] << std::dec << " mBCID = " << mBCID << " mLVL1ID = " << mLVL1ID << "  mLVL1A = " << mLVL1A << endmsg;
@@ -878,7 +880,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, PixelRDO
                     }
                     // Now the Collection is there for sure. Create RDO and push it into Collection.
 
-                    m_coll->push_back(new RDO(pixelId, mToT, mBCID,mLVL1ID,mLVL1A));
+                    coll->push_back(new RDO(pixelId, mToT, mBCID,mLVL1ID,mLVL1A));
 #ifdef PIXEL_DEBUG
                     msg(MSG::VERBOSE) << "Collection filled with pixelId: " << pixelId << " TOT = 0x" << std::hex << mToT << std::dec << " mBCID = " << mBCID << " mLVL1ID = " << mLVL1ID << "  mLVL1A = " << mLVL1A << endmsg;
 #endif
@@ -1176,7 +1178,7 @@ StatusCode PixelRodDecoder::fillCollection( const ROBFragment *robFrag, PixelRDO
     if (sc == StatusCode::RECOVERABLE) {
 
         if (errorcode == (3 << 20) ){  // Fix for M8, this error always occurs, masked out REMOVE FIXME !!
-            masked_errors++;
+            m_masked_errors++;
             return StatusCode::SUCCESS;
         }
 
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
index c2dd40584f5429e6c91f27e74844136fe87bd25f..d2638373fa8d2b3cc0ae52483c3f0237803055b7 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodDecoder.h
@@ -37,7 +37,7 @@ public:
   StatusCode initialize();
   StatusCode finalize();
 
-  StatusCode fillCollection  (const ROBFragment *robFrag, PixelRDO_Container* rdoIdc, 
+  StatusCode fillCollection  (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *robFrag, PixelRDO_Container* rdoIdc, 
 			std::vector<IdentifierHash>* vecHash = NULL);
 
   inline void setDet( const eformat::SubDetector det );
@@ -123,7 +123,7 @@ public:
   void addToFlaggedErrorCounter(const unsigned int & serviceCodeCounter);
 
  private:
-  int masked_errors;
+  int m_masked_errors;
 
   int m_numGenWarnings;
   int m_maxNumGenWarnings;     // Maximum number of general warnings to print
diff --git a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodEncoder.cxx b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodEncoder.cxx
index 7eedff6e9c93fd07be64604f6c91c105c0f9d2ac..3b6f787fffc6177015f590de54e949047b569edb 100644
--- a/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodEncoder.cxx
+++ b/InnerDetector/InDetEventCnv/PixelRawDataByteStreamCnv/src/PixelRodEncoder.cxx
@@ -451,7 +451,6 @@ void PixelRodEncoder::fillROD(std::vector<uint32_t>& v32rod, MsgStream& log, int
 	rdo_same_it_end = rdos_sameIBL_offlineId.end();
 
 	VRDO::iterator rdo_test_it = rdos_sameIBL_offlineId.begin();
-	VRDO::iterator rdo_test_it_end = rdos_sameIBL_offlineId.end();
 #ifdef PIXEL_DEBUG
 	log << MSG::VERBOSE << "Looking for adjacent pixels and saving col, row and tot information." << endmsg;
 #endif
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCT_RodDecoder.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCT_RodEncoder.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/SCT_RawDataByteStreamCnv/ISCT_RodEncoder.h
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/cmt/requirements b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/cmt/requirements
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/doc/packagedoc.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/doc/packagedoc.h
index 17f88d095ed1c5528209b63e5b7742513c000cb0..b4bc8b88aa080e0c5ad52338a13ca44de53ff1c2 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/doc/packagedoc.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/doc/packagedoc.h
@@ -64,11 +64,3 @@ InDetCabling package.
     has to do the bookkeeping and cleanup, and there is no longer any need to write out empty collections.
 
 */
-
-/**
-@page used_SCT_RawDataByteStreamCnv Used Packages
-*/
-
-/**
-@page requirements_SCT_RawDataByteStreamCnv Requirements
-*/
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.cxx
index daaff559d527026d2a4277e9cea6f85df70889fb..330ccb7f1d95e541a88005d4e4c7b8247a733668 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.cxx
@@ -19,9 +19,9 @@
 
 SCTRawContByteStreamCnv::SCTRawContByteStreamCnv(ISvcLocator* svcloc) :
   Converter(ByteStream_StorageType, classID(),svcloc),
-  m_service              ("SCTRawContByteStreamService", "SCTRawContByteStreamCnv"),
-  m_byteStreamEventAccess("ByteStreamCnvSvc","SCTRawContByteStreamCnv"),
-  m_log                   (msgSvc(), "SCTRawContByteStreamCnv")
+  m_service{"SCTRawContByteStreamService", "SCTRawContByteStreamCnv"},
+  m_byteStreamEventAccess{"ByteStreamCnvSvc", "SCTRawContByteStreamCnv"},
+  m_log{msgSvc(), "SCTRawContByteStreamCnv"}
 {}
  
 /// ------------------------------------------------------
@@ -36,25 +36,27 @@ SCTRawContByteStreamCnv::~SCTRawContByteStreamCnv( )
 StatusCode
 SCTRawContByteStreamCnv::initialize()
 {
-  StatusCode sc = Converter::initialize(); 
+  StatusCode sc{Converter::initialize()};
   if(StatusCode::SUCCESS!=sc) return sc; 
-
+  
   m_log << MSG::DEBUG<< " initialize " <<endmsg; 
 
   /** Retrieve ByteStreamCnvSvc */
   if (m_byteStreamEventAccess.retrieve().isFailure()) {
     m_log << MSG::FATAL << "Failed to retrieve service " << m_byteStreamEventAccess << endmsg;
     return StatusCode::FAILURE;
-  } else 
+  } else {
     m_log << MSG::INFO << "Retrieved service " << m_byteStreamEventAccess << endmsg;
+  }
 
   /** Retrieve byte stream Service */
   if (m_service.retrieve().isFailure()) {
     m_log << MSG::FATAL << "Failed to retrieve service " << m_service << endmsg;
     return StatusCode::FAILURE;
-  } else 
+  } else {
     m_log << MSG::INFO << "Retrieved service " << m_service << endmsg;
-   
+  }
+
   return StatusCode::SUCCESS; 
    
 }
@@ -67,23 +69,23 @@ SCTRawContByteStreamCnv::createRep(DataObject* pObj, IOpaqueAddress*& pAddr)
 {
   
   /** get RawEvent pointer */
-  RawEventWrite* re = m_byteStreamEventAccess->getRawEvent(); 
+  RawEventWrite* re{m_byteStreamEventAccess->getRawEvent()};
   
   /** get IDC for SCT Raw Data */
-  SCT_RDO_Container* cont(0); 
+  SCT_RDO_Container* cont{nullptr};
   StoreGateSvc::fromStorable(pObj, cont); 
-  if(!cont){
-    m_log << MSG::ERROR << " Can not cast to SCTRawContainer " << endmsg ; 
+  if (!cont) {
+    m_log << MSG::ERROR << " Can not cast to SCTRawContainer " << endmsg;
     return StatusCode::FAILURE;    
   } 
   
   /** set up the IOpaqueAddress for Storegate */
-  std::string nm = pObj->registry()->name(); 
-  pAddr = new ByteStreamAddress(classID(),nm,""); 
+  std::string nm{pObj->registry()->name()};
+  pAddr = new ByteStreamAddress(classID(), nm, ""); 
 
   /** now use the service to do the conversion */
-  StatusCode sc = m_service->convert(cont, re, m_log) ;
-  if(sc.isFailure()){
+  StatusCode sc{m_service->convert(cont, re, m_log)};
+  if (sc.isFailure()) {
     m_log << MSG::ERROR
 	  << " Could not convert rdo with SCTRawContByteStreamSvc " << endmsg;
     return StatusCode::FAILURE;
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.h
index c87134043d43080882be15f6af103eda7871d07f..7da6d4831bc1e9acdda90274c62e85d9aba82030 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamCnv.h
@@ -34,19 +34,19 @@ extern long ByteStream_StorageType;
 class SCTRawContByteStreamCnv: public Converter {
   friend class CnvFactory<SCTRawContByteStreamCnv>;
   
-  ~SCTRawContByteStreamCnv( );
+  ~SCTRawContByteStreamCnv();
 
  protected:
 
   SCTRawContByteStreamCnv(ISvcLocator* svcloc);
   
  public:
-  typedef SCT_RDO_Container       SCTRawContainer; 
+  typedef SCT_RDO_Container SCTRawContainer; 
 
   /** Storage type and class ID */
   virtual long repSvcType() const { return ByteStream_StorageType;}
   static long storageType() { return ByteStream_StorageType; } 
-  static const CLID& classID()    { return ClassID_traits<SCTRawContainer>::ID(); }
+  static const CLID& classID() { return ClassID_traits<SCTRawContainer>::ID(); }
   
   /** initialize */
   virtual StatusCode initialize();
@@ -64,5 +64,4 @@ class SCTRawContByteStreamCnv: public Converter {
   ServiceHandle<IByteStreamEventAccess> m_byteStreamEventAccess; 
   MsgStream m_log;
 };
-#endif
-
+#endif // SCT_RAWDATABYTESTREAMCNV_SCTRAWCONTRAWEVENTCNV_H
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamService.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamService.cxx
index 953e56189a38d077321d975e85ed69dd21a6f2cd..ad8db7b81457ceaa265e0534b4cc5f93e72a4547 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamService.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamService.cxx
@@ -20,17 +20,15 @@
 /// contructor 
 
 SCTRawContByteStreamService::SCTRawContByteStreamService
-( const std::string& name, ISvcLocator* svcloc) :
-     AthService(name, svcloc),
-     m_encoder   ("SCT_RodEncoder", this),
-     m_cabling   ("SCT_CablingSvc",name),
-     m_detStore  ("StoreGateSvc/DetectorStore", name),
-     m_sct_mgr(0),
-     m_sct_idHelper(0)
+(const std::string& name, ISvcLocator* svcloc) :
+  AthService(name, svcloc),
+  m_cabling{"SCT_CablingSvc", name},
+  m_detStore{"StoreGateSvc/DetectorStore", name},
+  m_sct_mgr{nullptr},
+  m_sct_idHelper{nullptr}
 {
-  declareProperty("Encoder",m_encoder);
-  declareProperty("RodBlockVersion",m_RodBlockVersion=0);
-  declareProperty("CablingSvc",m_cabling);
+  declareProperty("RodBlockVersion", m_RodBlockVersion=0);
+  declareProperty("CablingSvc", m_cabling);
   return;
 }
 
@@ -43,8 +41,8 @@ SCTRawContByteStreamService::~SCTRawContByteStreamService()
 }
 
 StatusCode
-SCTRawContByteStreamService::queryInterface( const InterfaceID& riid, void** ppvIf ) {
-  if ( ISCTRawContByteStreamService::interfaceID().versionMatch(riid) ) {
+SCTRawContByteStreamService::queryInterface(const InterfaceID& riid, void** ppvIf) {
+  if (ISCTRawContByteStreamService::interfaceID().versionMatch(riid)) {
     *ppvIf = dynamic_cast<ISCTRawContByteStreamService*>(this);
   } else {
     // Interface is not directly available : try out a base class
@@ -62,30 +60,24 @@ SCTRawContByteStreamService::initialize() {
   StatusCode sc = AthService::initialize(); 
   /** Retrieve id mapping  */
   if (m_cabling.retrieve().isFailure()) {
-    msg(MSG::FATAL) << "Failed to retrieve service " << m_cabling << endmsg;
+    ATH_MSG_FATAL("Failed to retrieve service " << m_cabling);
     return StatusCode::FAILURE;
   } else {
-    msg(MSG::INFO) << "Retrieved service " << m_cabling << endmsg;
+    ATH_MSG_INFO("Retrieved service " << m_cabling);
   }
   /** Retrieve detector manager */
-  sc = m_detStore->retrieve(m_sct_mgr,"SCT"); 
+  sc = m_detStore->retrieve(m_sct_mgr, "SCT"); 
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Cannot retrieve SCT_DetectorManager!" << endmsg;
+    ATH_MSG_FATAL("Cannot retrieve SCT_DetectorManager!");
     return StatusCode::FAILURE;
   }
 
   /** Get the SCT Helper */
-  sc = m_detStore->retrieve(m_sct_idHelper,"SCT_ID"); 
+  sc = m_detStore->retrieve(m_sct_idHelper, "SCT_ID"); 
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Cannot retrieve ID helper!" << endmsg;
+    ATH_MSG_FATAL("Cannot retrieve ID helper!");
     return StatusCode::FAILURE;
   }
-
-  /**get the RodEncoder */
-
-  sc = m_encoder.retrieve();
-  if (sc.isFailure())
-    msg(MSG::FATAL) <<" Failed to retrieve tool "<< m_encoder <<endmsg;
   
   return sc;
 }
@@ -95,7 +87,7 @@ SCTRawContByteStreamService::initialize() {
 
 StatusCode
 SCTRawContByteStreamService::finalize() {
-  StatusCode sc = AthService::finalize(); 
+  StatusCode sc{AthService::finalize()}; 
   return sc;
 }
 
@@ -107,11 +99,11 @@ SCTRawContByteStreamService::finalize() {
 StatusCode
 SCTRawContByteStreamService::convert(SCT_RDO_Container* cont, RawEventWrite* re, MsgStream& log) {
   m_fea.clear();   
-  FullEventAssembler<SrcIdMap>::RODDATA*  theROD ; 
+  FullEventAssembler<SrcIdMap>::RODDATA* theROD; 
   
   /** set ROD Minor version */
   m_fea.setRodMinorVersion(m_RodBlockVersion);
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<" Setting Minor Version Number to "<<m_RodBlockVersion<<endmsg;
+  ATH_MSG_DEBUG(" Setting Minor Version Number to " << m_RodBlockVersion);
   
   /** mapping between ROD IDs and the hits in that ROD */
   std::map<uint32_t, std::vector<const RDO*> > rdoMap;
@@ -122,42 +114,42 @@ SCTRawContByteStreamService::convert(SCT_RDO_Container* cont, RawEventWrite* re,
 
   std::vector<boost::uint32_t> listOfAllRODs;
   m_cabling->getAllRods(listOfAllRODs);
-  std::vector<boost::uint32_t>::iterator rodIter = listOfAllRODs.begin();
-  std::vector<boost::uint32_t>::iterator rodEnd = listOfAllRODs.end();
+  std::vector<boost::uint32_t>::iterator rodIter{listOfAllRODs.begin()};
+  std::vector<boost::uint32_t>::iterator rodEnd{listOfAllRODs.end()};
   for (; rodIter != rodEnd; ++rodIter) {
     rdoMap[*rodIter].clear();
   }
 
   /**loop over the collections in the SCT RDO container */
-  SCTRawContainer::const_iterator it_coll     = cont->begin(); 
-  SCTRawContainer::const_iterator it_coll_end = cont->end();
+  SCTRawContainer::const_iterator it_coll{cont->begin()}; 
+  SCTRawContainer::const_iterator it_coll_end{cont->end()};
   
-  for( ; it_coll!=it_coll_end;++it_coll) {
-    const SCTRawCollection* coll = (*it_coll) ;
+  for(; it_coll!=it_coll_end;++it_coll) {
+    const SCTRawCollection* coll{*it_coll};
     if (coll == 0) {
-      msg(MSG::WARNING) <<"Null pointer to SCT RDO collection."<<endmsg;
+      ATH_MSG_WARNING("Null pointer to SCT RDO collection.");
       continue;
     } else {
       /** Collection Id */
-      Identifier idColl = coll->identify() ;  
-      IdentifierHash idCollHash = m_sct_idHelper->wafer_hash(idColl);
-      uint32_t robid = m_cabling->getRobIdFromHash(idCollHash) ;
-      if ( robid == 0 ) continue ; 
+      Identifier idColl{coll->identify()};
+      IdentifierHash idCollHash{m_sct_idHelper->wafer_hash(idColl)};
+      uint32_t robid{m_cabling->getRobIdFromHash(idCollHash)};
+      if (robid == 0) continue ; 
       
       /** Building the rod ID */
-      eformat::helper::SourceIdentifier sid_rob(robid);
-      eformat::helper::SourceIdentifier sid_rod(sid_rob.subdetector_id(), sid_rob.module_id()); 
-      uint32_t rodid = sid_rod.code(); 
+      eformat::helper::SourceIdentifier sid_rob{robid};
+      eformat::helper::SourceIdentifier sid_rod{sid_rob.subdetector_id(), sid_rob.module_id()};
+      uint32_t rodid{sid_rod.code()};
       /** see if strip numbers go from 0 to 767 or vice versa for this wafer */
-      InDetDD::SiDetectorElement* siDetElement = m_sct_mgr->getDetectorElement(idColl);      
+      InDetDD::SiDetectorElement* siDetElement{m_sct_mgr->getDetectorElement(idColl)};
       siDetElement->updateCache();
-      bool swapPhiReadoutDirection = siDetElement->swapPhiReadoutDirection();
+      bool swapPhiReadoutDirection{siDetElement->swapPhiReadoutDirection()};
       
       /** loop over RDOs in the collection;  */
-      SCTRawCollection::const_iterator it_b = coll->begin(); 
-      SCTRawCollection::const_iterator it_e = coll->end(); 
-      for(; it_b!=it_e; ++it_b) {           
-	const RDO* theRdo = *it_b;          
+      SCTRawCollection::const_iterator it_b{coll->begin()};
+      SCTRawCollection::const_iterator it_e{coll->end()}; 
+      for(; it_b!=it_e; ++it_b) {
+	const RDO* theRdo{*it_b};          
 	/** fill ROD/ RDO map */
 	rdoMap[rodid].push_back(theRdo);
 	if (swapPhiReadoutDirection) m_encoder->addSwapModuleId(idColl);
@@ -167,16 +159,14 @@ SCTRawContByteStreamService::convert(SCT_RDO_Container* cont, RawEventWrite* re,
 
   /** now encode data for each ROD in turn */
   
-  std::map<uint32_t,std::vector<const RDO*> >::iterator it_map     = rdoMap.begin();
-  std::map<uint32_t,std::vector<const RDO*> >::iterator it_map_end = rdoMap.end();
+  std::map<uint32_t,std::vector<const RDO*> >::iterator it_map{rdoMap.begin()};
+  std::map<uint32_t,std::vector<const RDO*> >::iterator it_map_end{rdoMap.end()};
   
   for (; it_map != it_map_end; ++it_map) { 
     theROD = m_fea.getRodData(it_map->first); /** get ROD data address */
-    m_encoder->fillROD( *theROD,it_map->first, it_map->second) ;  /** encode ROD data */
+    m_encoder->fillROD(*theROD,it_map->first, it_map->second) ;  /** encode ROD data */
   }
-  m_fea.fill(re,log); 
+  m_fea.fill(re, log); 
   
   return StatusCode::SUCCESS; 
 }
-
-
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamService.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamService.h
index 44d8a6fe5e5ce4f3b95e110404e593a199149853..168d35e7ce0daff57febf1ca10f8f0448f330de0 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamService.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawContByteStreamService.h
@@ -46,12 +46,12 @@ class SCTRawContByteStreamService: virtual public ISCTRawContByteStreamService,
 
 
   //! constructor
-  SCTRawContByteStreamService( const std::string& name, ISvcLocator* svcloc) ;
+  SCTRawContByteStreamService(const std::string& name, ISvcLocator* svcloc) ;
   
   //! destructor 
   virtual ~SCTRawContByteStreamService() ;
 
-  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvIf );
+  virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvIf);
 
   virtual StatusCode initialize();
   virtual StatusCode finalize();
@@ -61,12 +61,12 @@ class SCTRawContByteStreamService: virtual public ISCTRawContByteStreamService,
   
  private: 
   
-  ToolHandle<ISCT_RodEncoder> m_encoder;
+  ToolHandle<ISCT_RodEncoder> m_encoder{this, "Encoder", "SCT_RodEncoder", "SCT ROD Encoder for RDO to BS conversion"};
   ServiceHandle<ISCT_CablingSvc> m_cabling;
   ServiceHandle<StoreGateSvc> m_detStore;
   const InDetDD::SCT_DetectorManager* m_sct_mgr;
-  const SCT_ID*                m_sct_idHelper;
-  unsigned short               m_RodBlockVersion;
+  const SCT_ID* m_sct_idHelper;
+  unsigned short m_RodBlockVersion;
   FullEventAssembler<SrcIdMap> m_fea; 
 
 };
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx
index 44deadfe0c4d06f24b4da72524f2ddd758495751..f9b78aaff0d3efacaf37a434f8721a0421e35b7e 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx
@@ -18,25 +18,23 @@ using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
 SCTRawDataProvider::SCTRawDataProvider(const std::string& name,
 				       ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
-  m_regionSelector  ("RegSelSvc", name), 
-  m_robDataProvider ("ROBDataProviderSvc",name),
-  m_rawDataTool     ("SCTRawDataProviderTool",this),
-  m_cabling         ("SCT_CablingSvc",name),
-  m_sct_id(nullptr),
-  m_roiSeeded(false),
-  m_roiCollectionKey(""),
-  m_rdoContainerKey(""),
-  m_lvl1CollectionKey(""),
-  m_bcidCollectionKey("")
+  m_regionSelector{"RegSelSvc", name},
+  m_robDataProvider{"ROBDataProviderSvc", name},
+  m_cabling{"SCT_CablingSvc", name},
+  m_sct_id{nullptr},
+  m_roiSeeded{false},
+  m_roiCollectionKey{""},
+  m_rdoContainerKey{""},
+  m_lvl1CollectionKey{""},
+  m_bcidCollectionKey{""}
 {
-  declareProperty("RoIs", m_roiCollectionKey = std::string(""), "RoIs to read in");
+  declareProperty("RoIs", m_roiCollectionKey = std::string{""}, "RoIs to read in");
   declareProperty("isRoI_Seeded", m_roiSeeded = false, "Use RoI");
-  declareProperty("RDOKey", m_rdoContainerKey = std::string("SCT_RDOs"));
-  declareProperty("LVL1IDKey", m_lvl1CollectionKey = std::string("SCT_LVL1ID"));
-  declareProperty("BCIDKey", m_bcidCollectionKey = std::string("SCT_BCID"));
-  declareProperty("ByteStreamErrContainer", m_bsErrContainerKey = std::string("SCT_ByteStreamErrs"));
-  declareProperty ("ProviderTool", m_rawDataTool);
-  declareProperty ("CablingSvc",   m_cabling);
+  declareProperty("RDOKey", m_rdoContainerKey = std::string{"SCT_RDOs"});
+  declareProperty("LVL1IDKey", m_lvl1CollectionKey = std::string{"SCT_LVL1ID"});
+  declareProperty("BCIDKey", m_bcidCollectionKey = std::string{"SCT_BCID"});
+  declareProperty("ByteStreamErrContainer", m_bsErrContainerKey = std::string{"SCT_ByteStreamErrs"});
+  declareProperty("CablingSvc", m_cabling);
 }
 
 /// --------------------------------------------------------------------
@@ -45,23 +43,20 @@ SCTRawDataProvider::SCTRawDataProvider(const std::string& name,
 StatusCode SCTRawDataProvider::initialize() {
   /** Get ROBDataProviderSvc */
   ATH_CHECK(m_robDataProvider.retrieve());
-  /** Get SCTRawDataProviderTool */
-  ATH_CHECK(m_rawDataTool.retrieve());
   /** Get the SCT ID helper **/
-  ATH_CHECK(detStore()->retrieve(m_sct_id,"SCT_ID"));
+  ATH_CHECK(detStore()->retrieve(m_sct_id, "SCT_ID"));
   if (m_roiSeeded) {//Don't need SCT cabling if running in RoI-seeded mode
-    ATH_CHECK( m_roiCollectionKey.initialize() );
+    ATH_CHECK(m_roiCollectionKey.initialize());
     ATH_CHECK(m_regionSelector.retrieve());
-  }
-  else {
+  } else {
     /** Retrieve Cabling service */ 
     ATH_CHECK(m_cabling.retrieve());
   }
   //Initialize 
-  ATH_CHECK( m_rdoContainerKey.initialize() );
-  ATH_CHECK( m_lvl1CollectionKey.initialize() );
-  ATH_CHECK( m_bcidCollectionKey.initialize() );
-  ATH_CHECK( m_bsErrContainerKey.initialize() );
+  ATH_CHECK(m_rdoContainerKey.initialize());
+  ATH_CHECK(m_lvl1CollectionKey.initialize());
+  ATH_CHECK(m_bcidCollectionKey.initialize());
+  ATH_CHECK(m_bsErrContainerKey.initialize());
   return StatusCode::SUCCESS;
 }
 
@@ -71,11 +66,11 @@ StatusCode SCTRawDataProvider::initialize() {
 StatusCode SCTRawDataProvider::execute()
 {
   SG::WriteHandle<SCT_RDO_Container> rdoContainer(m_rdoContainerKey);
-  ATH_CHECK( rdoContainer.record (std::make_unique<SCT_RDO_Container>(m_sct_id->wafer_hash_max()) ) );
+  ATH_CHECK(rdoContainer.record (std::make_unique<SCT_RDO_Container>(m_sct_id->wafer_hash_max())));
   ATH_CHECK(rdoContainer.isValid());
   
   SG::WriteHandle<InDetBSErrContainer> bsErrContainer(m_bsErrContainerKey);
-  ATH_CHECK( bsErrContainer.record (std::make_unique<InDetBSErrContainer>()) );
+  ATH_CHECK(bsErrContainer.record(std::make_unique<InDetBSErrContainer>()));
 
   //// do we need this??  rdoIdc->cleanup();
 
@@ -84,63 +79,60 @@ StatusCode SCTRawDataProvider::execute()
   if (!m_roiSeeded) {
     std::vector<uint32_t> rodList;
     m_cabling->getAllRods(rodList);
-  m_robDataProvider->getROBData( rodList , listOfRobf);
-  }
-  else {//Only load ROBs from RoI
+    m_robDataProvider->getROBData(rodList , listOfRobf);
+  } else {//Only load ROBs from RoI
     std::vector<uint32_t> listOfRobs;
-    SG::ReadHandle<TrigRoiDescriptorCollection> roiCollection(m_roiCollectionKey);
+    SG::ReadHandle<TrigRoiDescriptorCollection> roiCollection{m_roiCollectionKey};
     ATH_CHECK(roiCollection.isValid());
-    TrigRoiDescriptorCollection::const_iterator roi = roiCollection->begin();
-    TrigRoiDescriptorCollection::const_iterator roiE = roiCollection->end();
+    TrigRoiDescriptorCollection::const_iterator roi{roiCollection->begin()};
+    TrigRoiDescriptorCollection::const_iterator roiE{roiCollection->end()};
     TrigRoiDescriptor superRoI;//add all RoIs to a super-RoI
     superRoI.setComposite(true);
     superRoI.manageConstituents(false);
     for (; roi!=roiE; ++roi) {
       superRoI.push_back(*roi);
     }
-    m_regionSelector->DetROBIDListUint(SCT, 
-        superRoI,
-        listOfRobs);
-    m_robDataProvider->getROBData( listOfRobs, listOfRobf);
+    m_regionSelector->DetROBIDListUint(SCT, superRoI, listOfRobs);
+    m_robDataProvider->getROBData(listOfRobs, listOfRobf);
   }
 
 
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Number of ROB fragments " << listOfRobf.size() << endmsg;
+  ATH_MSG_DEBUG("Number of ROB fragments " << listOfRobf.size());
 
-  SG::WriteHandle<InDetTimeCollection> lvl1Collection(m_lvl1CollectionKey);
+  SG::WriteHandle<InDetTimeCollection> lvl1Collection{m_lvl1CollectionKey};
   lvl1Collection = std::make_unique<InDetTimeCollection>(listOfRobf.size()); 
   ATH_CHECK(lvl1Collection.isValid());
 
-  SG::WriteHandle<InDetTimeCollection> bcidCollection(m_bcidCollectionKey);
+  SG::WriteHandle<InDetTimeCollection> bcidCollection{m_bcidCollectionKey};
   bcidCollection = std::make_unique<InDetTimeCollection>(listOfRobf.size()); 
   ATH_CHECK(bcidCollection.isValid());
 
-  std::vector<const ROBFragment*>::const_iterator rob_it = listOfRobf.begin();  
-  for(; rob_it!=listOfRobf.end(); ++rob_it) {
+  std::vector<const ROBFragment*>::const_iterator rob_it{listOfRobf.begin()};
+  for (; rob_it!=listOfRobf.end(); ++rob_it) {
     
-    uint32_t robid = (*rob_it)->rod_source_id();
+    uint32_t robid{(*rob_it)->rod_source_id()};
     /**
      * Store LVL1ID and BCID information in InDetTimeCollection 
      * to be stored in StoreGate at the end of the loop.
      * We want to store a pair<ROBID, LVL1ID> for each ROD, once per event.
      **/
     
-    unsigned int lvl1id = (*rob_it)->rod_lvl1_id();
-    std::pair<uint32_t, unsigned int>* lvl1Pair = new std::pair<uint32_t, unsigned int>(std::make_pair(robid,lvl1id));
-    lvl1Collection->push_back(lvl1Pair) ;
+    unsigned int lvl1id{(*rob_it)->rod_lvl1_id()};
+    std::unique_ptr<std::pair<uint32_t, unsigned int>> lvl1Pair{std::make_unique<std::pair<uint32_t, unsigned int>>(std::make_pair(robid, lvl1id))};
+    lvl1Collection->push_back(std::move(lvl1Pair));
     
-    unsigned int bcid = (*rob_it)->rod_bc_id();  
-    std::pair<uint32_t, unsigned int>* bcidPair = new std::pair<uint32_t, unsigned int>(std::make_pair(robid,bcid));
-    bcidCollection->push_back(bcidPair);
+    unsigned int bcid{(*rob_it)->rod_bc_id()};
+    std::unique_ptr<std::pair<uint32_t, unsigned int>> bcidPair{std::make_unique<std::pair<uint32_t, unsigned int>>(std::make_pair(robid, bcid))};
+    bcidCollection->push_back(std::move(bcidPair));
     
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) <<"Stored LVL1ID "<<lvl1id<<" and BCID "<<bcid<<" in InDetTimeCollections"<<endmsg;
+    ATH_MSG_DEBUG("Stored LVL1ID " << lvl1id << " and BCID " << bcid << " in InDetTimeCollections");
     
   }
 
   /** ask SCTRawDataProviderTool to decode it and to fill the IDC */
-  if (m_rawDataTool->convert(listOfRobf, *rdoContainer, bsErrContainer.ptr()).isFailure())
-    msg(MSG::ERROR) << "BS conversion into RDOs failed" << endmsg;
+  if (m_rawDataTool->convert(listOfRobf, *rdoContainer, bsErrContainer.ptr()).isFailure()) {
+    ATH_MSG_ERROR("BS conversion into RDOs failed");
+  }
   
   return StatusCode::SUCCESS;
 }
-
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.h
old mode 100755
new mode 100644
index eecc400f34e6e41ff8a6739aba84b6cef2866134..6ce31d0e9c713ca529d2cabf4fb9afd9b3601aaf
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.h
@@ -47,6 +47,10 @@ class SCTRawDataProvider : public AthAlgorithm
   //! Constructor.
   SCTRawDataProvider(const std::string &name, ISvcLocator *pSvcLocator);
 
+  //! Destructur
+  ~SCTRawDataProvider() {
+  }
+
   //! Initialize
   virtual StatusCode initialize();
 
@@ -54,20 +58,17 @@ class SCTRawDataProvider : public AthAlgorithm
   virtual StatusCode execute();
 
   //! Finalize
-  virtual StatusCode finalize()
-  { return StatusCode::SUCCESS;}
-
-  //! Destructur
-  ~SCTRawDataProvider() 
-    { }
+  virtual StatusCode finalize() {
+    return StatusCode::SUCCESS;
+  }
 
  private:
 
-  ServiceHandle<IRegSelSvc>             m_regionSelector;     
+  ServiceHandle<IRegSelSvc> m_regionSelector;     
   ServiceHandle<IROBDataProviderSvc> m_robDataProvider;
-  ToolHandle<ISCTRawDataProviderTool> m_rawDataTool;
-  ServiceHandle<ISCT_CablingSvc>     m_cabling;
-  const SCT_ID*                      m_sct_id; 
+  ToolHandle<ISCTRawDataProviderTool> m_rawDataTool{this, "ProviderTool", "SCTRawDataProviderTool", "SCT  Raw Data Provider Tool"};
+  ServiceHandle<ISCT_CablingSvc> m_cabling;
+  const SCT_ID* m_sct_id; 
   bool m_roiSeeded;
   SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey;
   SG::WriteHandleKey<SCT_RDO_Container> m_rdoContainerKey;
@@ -77,4 +78,4 @@ class SCTRawDataProvider : public AthAlgorithm
 
 };
 
-#endif
+#endif // SCT_RAWDATABYTESTREAMCNV_SCTRAWDATAPROVIDER_H
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx
index 65bc199a745d07068185a554a525a955b775b901..2b2daf393852a59be187d9c124bc2236e49c107e 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.cxx
@@ -17,18 +17,16 @@ using OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment;
 /// contructor
 
 SCTRawDataProviderTool::SCTRawDataProviderTool
-( const std::string& type, const std::string& name,const IInterface* parent )
-  :  AthAlgTool(type,name,parent),
-     m_decoder   ("SCT_RodDecoder", this), 
-     m_bsErrSvc  ("SCT_ByteStreamErrorsSvc",name),
-     m_robIdSet()
-{
-  declareProperty ("Decoder", m_decoder);
-  declareProperty ("ErrorsSvc",m_bsErrSvc);
-  declareProperty ("xAODEventInfoKey", m_xevtInfoKey=std::string("EventInfo"));
-  declareProperty ("EventInfoKey", m_evtInfoKey=std::string("ByteStreamEventInfo"));
-  declareInterface< ISCTRawDataProviderTool >( this );   
-}
+(const std::string& type, const std::string& name, const IInterface* parent)
+  :  AthAlgTool(type, name, parent),
+     m_bsErrSvc{"SCT_ByteStreamErrorsSvc", name},
+  m_robIdSet()
+     {
+       declareProperty("ErrorsSvc", m_bsErrSvc);
+       declareProperty("xAODEventInfoKey", m_xevtInfoKey=std::string{"EventInfo"});
+       declareProperty("EventInfoKey", m_evtInfoKey=std::string{"ByteStreamEventInfo"});
+       declareInterface<ISCTRawDataProviderTool>(this);   
+     }
 
 /// -------------------------------------------------------
 /// destructor 
@@ -41,36 +39,29 @@ SCTRawDataProviderTool::~SCTRawDataProviderTool()
 
 StatusCode SCTRawDataProviderTool::initialize()
 {
-
-  StatusCode sc = AlgTool::initialize(); 
+  StatusCode sc{AlgTool::initialize()};
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Failed to init baseclass" << endmsg;
+    ATH_MSG_FATAL("Failed to init baseclass");
     return StatusCode::FAILURE;
   }
    
-  /** Retrieve decoder */
-  if (m_decoder.retrieve().isFailure()) {
-    msg(MSG::FATAL) << "Failed to retrieve tool " << m_decoder << endmsg;
-    return StatusCode::FAILURE;
-  } else 
-    msg(MSG::DEBUG) << "Retrieved tool " << m_decoder << endmsg;
-
   /** Get ByteStreamErrorsSvc  */
   if (m_bsErrSvc.retrieve().isFailure()) {
-    msg(MSG::FATAL) << "Failed to retrieve service " << m_bsErrSvc << endmsg;
+    ATH_MSG_FATAL("Failed to retrieve service " << m_bsErrSvc);
     return StatusCode::FAILURE;
-  } else
-    msg(MSG::DEBUG) << "Retrieved service " << m_bsErrSvc << endmsg;
+  } else {
+    ATH_MSG_DEBUG("Retrieved service " << m_bsErrSvc);
+  }
 
   IIncidentSvc* incsvc;
   sc = service("IncidentSvc", incsvc);
-  int priority = 100;
-  if( sc.isSuccess() ) {
-    incsvc->addListener( this, "BeginEvent", priority);
+  int priority{100};
+  if (sc.isSuccess()) {
+    incsvc->addListener(this, "BeginEvent", priority);
   }
 
-  ATH_CHECK( m_xevtInfoKey.initialize() );
-  ATH_CHECK( m_evtInfoKey.initialize() );
+  ATH_CHECK(m_xevtInfoKey.initialize());
+  ATH_CHECK(m_evtInfoKey.initialize());
 
   return StatusCode::SUCCESS;
 }
@@ -80,7 +71,7 @@ StatusCode SCTRawDataProviderTool::initialize()
 
 StatusCode SCTRawDataProviderTool::finalize()
 {
-  StatusCode sc = AlgTool::finalize(); 
+  StatusCode sc{AlgTool::finalize()}; 
   return sc;
 }
 
@@ -94,37 +85,37 @@ void SCTRawDataProviderTool::handle(const Incident& inc) {
   }  
 }
 
-StatusCode SCTRawDataProviderTool::convert( std::vector<const ROBFragment*>& vecRobs,
-                                            SCT_RDO_Container& rdoIdc,
-                                            InDetBSErrContainer* errs)
+StatusCode SCTRawDataProviderTool::convert(std::vector<const ROBFragment*>& vecRobs,
+					   SCT_RDO_Container& rdoIdc,
+					   InDetBSErrContainer* errs)
 {
   if(vecRobs.empty()) return StatusCode::SUCCESS;
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "SCTRawDataProviderTool::convert()" << endmsg;
-  static int DecodeErrCount = 0;
+  ATH_MSG_DEBUG("SCTRawDataProviderTool::convert()");
+  static int DecodeErrCount{0};
 
   /**  are we working on a new event ? */
-  std::vector<const ROBFragment*>::const_iterator rob_it = vecRobs.begin();  
+  std::vector<const ROBFragment*>::const_iterator rob_it{vecRobs.begin()};
   
-  StatusCode sc = StatusCode::SUCCESS;
+  StatusCode sc{StatusCode::SUCCESS};
 
   /** loop over the ROB fragments */
 
   for(; rob_it!=vecRobs.end(); ++rob_it) {
     /** get the ID of this ROB/ROD */
-    uint32_t robid = (*rob_it)->rod_source_id();
+    uint32_t robid{(*rob_it)->rod_source_id()};
     /** check if this ROBFragment was already decoded (EF case in ROIs) */
     if (!m_robIdSet.insert(robid).second) {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " ROB Fragment with ID  "
-					      << std::hex<<robid<<std::dec
-					      << " already decoded, skip" << endmsg; 
+      ATH_MSG_DEBUG(" ROB Fragment with ID  "
+		    << std::hex<<robid << std::dec
+		    << " already decoded, skip"); 
     } else {
-      sc = m_decoder->fillCollection( **rob_it, rdoIdc, errs);
-      if ( sc==StatusCode::FAILURE ) {
-	if ( DecodeErrCount < 100 ) {
-	  msg(MSG::ERROR) << "Problem with SCT ByteStream Decoding!" << endmsg;
+      sc = m_decoder->fillCollection(**rob_it, rdoIdc, errs);
+      if (sc==StatusCode::FAILURE) {
+	if (DecodeErrCount < 100) {
+	  ATH_MSG_ERROR("Problem with SCT ByteStream Decoding!");
 	  DecodeErrCount++;
-	} else if ( 100 == DecodeErrCount ) {
-	  msg(MSG::ERROR) << "Too many Problem with SCT Decoding messages, turning message off.  "<< endmsg;
+	} else if (100 == DecodeErrCount) {
+	  ATH_MSG_ERROR("Too many Problem with SCT Decoding messages, turning message off.  ");
 	  DecodeErrCount++;
 	}
       }
@@ -132,39 +123,37 @@ StatusCode SCTRawDataProviderTool::convert( std::vector<const ROBFragment*>& vec
   }  
 
   if (sc==StatusCode::FAILURE) {
-    msg(MSG::ERROR) << "There was a problem with SCT ByteStream conversion" << endmsg;   
+    ATH_MSG_ERROR("There was a problem with SCT ByteStream conversion");
     return sc;
   }
-  int nLVL1ID = m_bsErrSvc->getErrorSet(SCT_ByteStreamErrors::LVL1IDError)->size();
-  int nROBFragment = m_bsErrSvc->getErrorSet(SCT_ByteStreamErrors::ROBFragmentError)->size();
+  long unsigned int nLVL1ID{m_bsErrSvc->getErrorSet(SCT_ByteStreamErrors::LVL1IDError)->size()};
+  long unsigned int nROBFragment{m_bsErrSvc->getErrorSet(SCT_ByteStreamErrors::ROBFragmentError)->size()};
 
-  if (nLVL1ID > 500 or nROBFragment > 1000) {
+  if ((nLVL1ID > 500) or (nROBFragment > 1000)) {
     //// retrieve EventInfo.  
     /// First the xAOD one
-    bool setOK_xAOD = false;
-    SG::ReadHandle<xAOD::EventInfo> xevtInfo_const(m_xevtInfoKey);
+    bool setOK_xAOD{false};
+    SG::ReadHandle<xAOD::EventInfo> xevtInfo_const{m_xevtInfoKey};
     if (xevtInfo_const.isValid()) {
-      xAOD::EventInfo* xevtInfo = const_cast<xAOD::EventInfo*>(&*xevtInfo_const);
+      xAOD::EventInfo* xevtInfo{const_cast<xAOD::EventInfo*>(&*xevtInfo_const)};
       setOK_xAOD = xevtInfo->setErrorState(xAOD::EventInfo::SCT, xAOD::EventInfo::Error);
     } 
 
     /// Second the old-style one
-    bool setOK_old = false;
-    SG::ReadHandle<EventInfo> evtInfo_const(m_evtInfoKey);
+    bool setOK_old{false};
+    SG::ReadHandle<EventInfo> evtInfo_const{m_evtInfoKey};
     if (evtInfo_const.isValid()) {
-      EventInfo* evtInfo = const_cast<EventInfo*>(&*evtInfo_const);
+      EventInfo* evtInfo{const_cast<EventInfo*>(&*evtInfo_const)};
       setOK_old = evtInfo->setErrorState(EventInfo::SCT, EventInfo::Error);
     }
 
     if ((not setOK_xAOD) and (not setOK_old)) {
-      msg(MSG::ERROR)<<"Failed to retrieve EventInfo containers or to set error states"<<endmsg;
+      ATH_MSG_ERROR("Failed to retrieve EventInfo containers or to set error states");
       return StatusCode::RECOVERABLE;
     }
 
     sc = StatusCode::SUCCESS;
   } /// 500 LVL1ID errors or 1000 ROBFragment errors
 
-  return sc; 
-
+  return sc;
 }
-
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h
index 8c1081f5f85f540425d066c47e8946bb60e02a56..76f833d69657fa16c0250be8bee323ede57003c1 100644
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProviderTool.h
@@ -30,14 +30,14 @@ class SCTRawDataProviderTool : virtual public ISCTRawDataProviderTool,
   virtual public IIncidentListener
 {
 
-public:
+ public:
    
   //! AlgTool InterfaceID
   //  static const InterfaceID& interfaceID( ) ;
   
   //! constructor
-  SCTRawDataProviderTool( const std::string& type, const std::string& name,
-			    const IInterface* parent ) ;
+  SCTRawDataProviderTool(const std::string& type, const std::string& name,
+			 const IInterface* parent ) ;
 
   //! destructor 
   virtual ~SCTRawDataProviderTool();
@@ -46,19 +46,19 @@ public:
   virtual StatusCode initialize() override;
 
   //! finalize
-  virtual StatusCode finalize()  override;
+  virtual StatusCode finalize() override;
   
   //! this is the main decoding method
-  virtual StatusCode convert( std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs,
-			      SCT_RDO_Container&               rdoIdc,
-                              InDetBSErrContainer*             errs) override;
+  virtual StatusCode convert(std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*>& vecRobs,
+			     SCT_RDO_Container& rdoIdc,
+                             InDetBSErrContainer* errs) override;
 
   /** function to be executed at BeginEvent incident */
   virtual void handle(const Incident& inc) override;
 
-private: 
+ private: 
   
-  ToolHandle<ISCT_RodDecoder>  m_decoder; 
+  ToolHandle<ISCT_RodDecoder> m_decoder{this, "Decoder", "SCT_RodDecoder", "Decoder"};
   ServiceHandle<ISCT_ByteStreamErrorsSvc> m_bsErrSvc;
   
   // bookkeeping if we have decoded a ROB already
@@ -68,7 +68,4 @@ private:
   SG::ReadHandleKey<EventInfo> m_evtInfoKey;
 };
 
-#endif
-
-
-
+#endif // SCT_RAWDATABYTESTREAMCNV_SCTRAWDATAPROVIDERTOOL_H
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
old mode 100755
new mode 100644
index 633c0e42942227f6b16404f03b6250c81c93dc23..c5e53fb3232e9ce079ce9874f1f48f80d98dc559
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx
@@ -27,49 +27,49 @@ union RawWord{
 
 //constructor
 SCT_RodDecoder::SCT_RodDecoder
-( const std::string& type, const std::string& name,const IInterface* parent )
-  :  AthAlgTool(type,name,parent),
-     m_sct_id(nullptr),
-     m_indet_mgr(nullptr),
-     m_cabling("SCT_CablingSvc",name),
-     m_byteStreamErrSvc("SCT_ByteStreamErrorsSvc",name),
-     m_condensedMode(false),
-     m_superCondensedMode(false),
-     m_singleCondHitNumber(0),
-     m_pairedCondHitNumber(0),
-     m_firstExpHitNumber(0),
-     m_evenExpHitNumber(0),
-     m_lastExpHitNumber(0),
-     m_headnumber(0),
-     m_trailnumber(0),
-     m_head_error_bcid(0),
-     m_head_error_lvl1id(0),
-     m_head_error_timeout(0),
-     m_head_error_formatter(0),
-     m_head_error_preamb(0),
-     m_trail_error_overflow(0),
-     m_trail_error_limit(0),
-     m_trail_error_bit(0),
-     m_config_data_bit(0),
-     m_flag_error_bit(0),
-     m_cond_hit1_error(0),
-     m_cond_hit2_error(0),
-     m_chip_number_error(0),
-     m_unknown_data_format(0),
-     m_nHits(0),
-     m_nRDOs(0),
-     m_maskedLinkNumber(0),
-     m_maskedRODNumber(0),
-     m_RODClockErrorNumber(0),
-     m_truncatedRODNumber(0),
-     m_numMissingLinkHeader(0),
-     m_numUnknownOfflineId(0),
-     m_incidentSvc("IncidentSvc", name)
+(const std::string& type, const std::string& name,const IInterface* parent) :
+  AthAlgTool(type, name, parent),
+  m_sct_id{nullptr},
+  m_indet_mgr{nullptr},
+  m_cabling{"SCT_CablingSvc", name},
+  m_byteStreamErrSvc{"SCT_ByteStreamErrorsSvc", name},
+  m_condensedMode{false},
+  m_superCondensedMode{false},
+  m_singleCondHitNumber{0},
+  m_pairedCondHitNumber{0},
+  m_firstExpHitNumber{0},
+  m_evenExpHitNumber{0},
+  m_lastExpHitNumber{0},
+  m_headnumber{0},
+  m_trailnumber{0},
+  m_head_error_bcid{0},
+  m_head_error_lvl1id{0},
+  m_head_error_timeout{0},
+  m_head_error_formatter{0},
+  m_head_error_preamb{0},
+  m_trail_error_overflow{0},
+  m_trail_error_limit{0},
+  m_trail_error_bit{0},
+  m_config_data_bit{0},
+  m_flag_error_bit{0},
+  m_cond_hit1_error{0},
+  m_cond_hit2_error{0},
+  m_chip_number_error{0},
+  m_unknown_data_format{0},
+  m_nHits{0},
+  m_nRDOs{0},
+  m_maskedLinkNumber{0},
+  m_maskedRODNumber{0},
+  m_RODClockErrorNumber{0},
+  m_truncatedRODNumber{0},
+  m_numMissingLinkHeader{0},
+  m_numUnknownOfflineId{0},
+  m_incidentSvc{"IncidentSvc", name}
 {
-  declareProperty("CablingSvc",m_cabling);
-  declareProperty("ErrorsSvc",m_byteStreamErrSvc);
-  declareProperty("TriggerMode",m_triggerMode=true);
-  declareInterface< ISCT_RodDecoder  >( this );
+  declareProperty("CablingSvc", m_cabling);
+  declareProperty("ErrorsSvc", m_byteStreamErrSvc);
+  declareProperty("TriggerMode", m_triggerMode=true);
+  declareInterface<ISCT_RodDecoder>(this);
 }
 
 //destructor  
@@ -77,107 +77,105 @@ SCT_RodDecoder::~SCT_RodDecoder() {
 }
 
 StatusCode SCT_RodDecoder::initialize() {
-  ATH_CHECK( AlgTool::initialize() );
+  ATH_CHECK(AlgTool::initialize());
 
-  ATH_CHECK( m_incidentSvc.retrieve() );
+  ATH_CHECK(m_incidentSvc.retrieve());
  
   /** Retrieve cabling service */
   ATH_CHECK(m_cabling.retrieve());
-  ATH_MSG_DEBUG( "Retrieved service " << m_cabling  );
+  ATH_MSG_DEBUG("Retrieved service " << m_cabling);
 
-  ATH_CHECK(detStore()->retrieve(m_indet_mgr,"SCT")) ;
+  ATH_CHECK(detStore()->retrieve(m_indet_mgr,"SCT"));
   
   ATH_CHECK(detStore()->retrieve(m_sct_id,"SCT_ID"));
 
-  ATH_CHECK(m_byteStreamErrSvc.retrieve()) ;
+  ATH_CHECK(m_byteStreamErrSvc.retrieve());
 
-  return StatusCode::SUCCESS ;
+  return StatusCode::SUCCESS;
 }
 
 StatusCode 
 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"   );
+  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_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" );
-  if (m_head_error_timeout > 0)   ATH_MSG_INFO("SCT BytestreamCnv summary: header-> "       <<m_head_error_timeout   <<" timeout errors found" );
-  if (m_head_error_formatter > 0) ATH_MSG_INFO("SCT BytestreamCnv summary: header-> "       <<m_head_error_formatter <<" formatter errors found" );
-  if (m_head_error_preamb > 0)    ATH_MSG_INFO("SCT BytestreamCnv summary: header-> "       <<m_head_error_preamb<<" preamble errors found" );
-  if (m_maskedLinkNumber > 0)     ATH_MSG_INFO("SCT BytestreamCnv summary: header-> " <<m_maskedLinkNumber<<" masked links found" );
-  if (m_trail_error_overflow > 0) ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> "      <<m_trail_error_overflow <<" trailer data overflow errors found" );
-  if (m_trail_error_limit > 0)    ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> "      <<m_trail_error_limit<<" header trailer limit errors found" );
-  if (m_trail_error_bit > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> "      <<m_trail_error_bit<<" trailer bit errors found" );
-  if (m_config_data_bit > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: raw Data-> "     <<m_config_data_bit <<" raw data found: Config data mode" );
-  if (m_flag_error_bit > 0)       ATH_MSG_INFO("SCT BytestreamCnv summary: flag-> "         <<m_flag_error_bit<<" module link flag bit errors found" );
-  if (m_cond_hit1_error > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> "          <<m_cond_hit1_error<<" 1st hit error found in condensed mode"  );
-  if (m_cond_hit2_error > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> "          <<m_cond_hit2_error<<" 2nd hit error found in condensed mode"  );
-  if (m_chip_number_error > 0)    ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> "          <<m_chip_number_error<<" Chip number > 5 error found" );
-  if (m_unknown_data_format > 0)  ATH_MSG_INFO("SCT BytestreamCnv summary: unknown data-> " <<m_unknown_data_format<<" Unknown data format found" );
-  if (m_RODClockErrorNumber > 0)  ATH_MSG_INFO("SCT BytestreamCnv summary: ROD status word-> " <<m_RODClockErrorNumber<<" ROD clock errors found" );
-  if (m_maskedRODNumber > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: ROB status word-> " <<m_maskedRODNumber<<" masked RODs found" );
-  if (m_truncatedRODNumber > 0)   ATH_MSG_INFO("SCT BytestreamCnv summary: ROB status word-> " <<m_truncatedRODNumber<<" truncated ROBFragments" );
-  ATH_MSG_INFO("Number of SCT hits in ByteStream-> "<<m_nHits );
-  ATH_MSG_INFO("Number of SCT RDOs created->       "<<m_nRDOs );
-
-  if (m_numMissingLinkHeader > 0) ATH_MSG_WARNING("SCT Missing Link Headers found "<<m_numMissingLinkHeader );
-  if (m_numUnknownOfflineId  > 0) ATH_MSG_WARNING("SCT unknown onlineId found "<<m_numUnknownOfflineId);
-
-
-  ATH_CHECK(  AlgTool::finalize() );
-  ATH_MSG_DEBUG("SCT_RodDecoder::finalize()" );
+  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");
+  if (m_head_error_timeout > 0)   ATH_MSG_INFO("SCT BytestreamCnv summary: header-> "       << m_head_error_timeout << " timeout errors found");
+  if (m_head_error_formatter > 0) ATH_MSG_INFO("SCT BytestreamCnv summary: header-> "       << m_head_error_formatter << " formatter errors found");
+  if (m_head_error_preamb > 0)    ATH_MSG_INFO("SCT BytestreamCnv summary: header-> "       << m_head_error_preamb << " preamble errors found");
+  if (m_maskedLinkNumber > 0)     ATH_MSG_INFO("SCT BytestreamCnv summary: header-> "       << m_maskedLinkNumber << " masked links found");
+  if (m_trail_error_overflow > 0) ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> "      << m_trail_error_overflow << " trailer data overflow errors found");
+  if (m_trail_error_limit > 0)    ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> "      << m_trail_error_limit << " header trailer limit errors found");
+  if (m_trail_error_bit > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: trailer-> "      << m_trail_error_bit << " trailer bit errors found");
+  if (m_config_data_bit > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: raw Data-> "     << m_config_data_bit << " raw data found: Config data mode");
+  if (m_flag_error_bit > 0)       ATH_MSG_INFO("SCT BytestreamCnv summary: flag-> "         << m_flag_error_bit << " module link flag bit errors found");
+  if (m_cond_hit1_error > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> "          << m_cond_hit1_error << " 1st hit error found in condensed mode");
+  if (m_cond_hit2_error > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> "          << m_cond_hit2_error << " 2nd hit error found in condensed mode");
+  if (m_chip_number_error > 0)    ATH_MSG_INFO("SCT BytestreamCnv summary: hit-> "          << m_chip_number_error << " Chip number > 5 error found");
+  if (m_unknown_data_format > 0)  ATH_MSG_INFO("SCT BytestreamCnv summary: unknown data-> " << m_unknown_data_format << " Unknown data format found");
+  if (m_RODClockErrorNumber > 0)  ATH_MSG_INFO("SCT BytestreamCnv summary: ROD status word-> " << m_RODClockErrorNumber << " ROD clock errors found");
+  if (m_maskedRODNumber > 0)      ATH_MSG_INFO("SCT BytestreamCnv summary: ROB status word-> " << m_maskedRODNumber << " masked RODs found");
+  if (m_truncatedRODNumber > 0)   ATH_MSG_INFO("SCT BytestreamCnv summary: ROB status word-> " << m_truncatedRODNumber << " truncated ROBFragments");
+  ATH_MSG_INFO("Number of SCT hits in ByteStream-> " << m_nHits);
+  ATH_MSG_INFO("Number of SCT RDOs created->       " << m_nRDOs);
+
+  if (m_numMissingLinkHeader > 0) ATH_MSG_WARNING("SCT Missing Link Headers found " << m_numMissingLinkHeader);
+  if (m_numUnknownOfflineId  > 0) ATH_MSG_WARNING("SCT unknown onlineId found " << m_numUnknownOfflineId);
+
+
+  ATH_CHECK(AlgTool::finalize());
+  ATH_MSG_DEBUG("SCT_RodDecoder::finalize()");
 
   return StatusCode::SUCCESS;
 }
 
 
 StatusCode
-SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag,
-                                SCT_RDO_Container& rdoIdc,
-                                InDetBSErrContainer* errs,
-                                std::vector<IdentifierHash>* vecHash )
+SCT_RodDecoder::fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment& robFrag,
+			       SCT_RDO_Container& rdoIdc,
+			       InDetBSErrContainer* errs,
+			       std::vector<IdentifierHash>* vecHash)
 {
-  uint32_t robid = robFrag.rod_source_id();
+  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();
-  if ((rod_datatype >> 20 ) & 1)   m_byteStreamErrSvc->setRODSimulatedData();
+  uint32_t rod_datatype{robFrag.rod_detev_type()};
+  if ((rod_datatype >> 20) & 1) m_byteStreamErrSvc->setRODSimulatedData();
 
   /** look for the bit that denotes "Super-condensed" mode.*/
-  m_superCondensedMode =  ((rod_datatype >> 21 ) & 1);   
-
-
-  int strip = 0;
-  int oldstrip = -1;
-  int oldside = -1;
-  int chip = 0;
-  int side = 0;
-  int nStripsInWord=0;
-  int linkNb = 0 ;
-  uint32_t onlineId = 0;
-  int tbin = 0;
-  int groupSize = 0;
-  //bool ErrorHeader = false;
-  //bool ErrorTrailer = false;
-
-  bool saved[768*2] = {false};
-  int ABCerror = 0;
-  int wordcount = -1;
+  m_superCondensedMode = ((rod_datatype >> 21) & 1);   
+
+
+  int strip{0};
+  int oldstrip{-1};
+  int oldside{-1};
+  int chip{0};
+  int side{0};
+  int nStripsInWord{0};
+  int linkNb{0};
+  uint32_t onlineId{0};
+  int tbin{0};
+  int groupSize{0};
+
+  bool saved[768*2]{false};
+  int ABCerror{0};
+  int wordcount{-1};
   RawWord robData;
   robData.word32=0;
   int n;
-  int ERRORS = 0; /** encodes the errors on the header
-		   * bit 4: error in condensed mode 1st hit
-		   * bit 5: error in condensed mode 2nd hit
-		   */
+  int ERRORS{0}; /** encodes the errors on the header
+		  * bit 4: error in condensed mode 1st hit
+		  * bit 5: error in condensed mode 2nd hit
+		  */
 
   /** These are for the trigger */
   IdentifierHash skipHash, lastHash;
@@ -186,30 +184,30 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 
   std::vector<int> errorHit;
 
-  StatusCode sc = StatusCode::SUCCESS;
+  StatusCode sc{StatusCode::SUCCESS};
 
   /// look at ROB status word ////////////////////////
 
-  if (robFrag.nstatus() !=0) {  
+  if (robFrag.nstatus()!=0) {  
     const uint32_t* rob_status;
     robFrag.status(rob_status);
-    if ((*rob_status) != 0) {
-      ATH_MSG_DEBUG("ROB status word for robid "<<std::hex<<robid<<" is non-zero "<<(*rob_status)<<std::dec);
+    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);
       sc = StatusCode::RECOVERABLE;
       /// now look for specific problems, e.g. truncated or masked-off RODs
       if (((*rob_status) >> 27) & 0x1) {
-        if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)<<"ROB status word for robid "<<std::hex<<robid<<std::dec<<" indicates data truncation."<<endmsg;
-        addRODError(robid,SCT_ByteStreamErrors::TruncatedROD, errs);
-        m_truncatedRODNumber++;
-        return sc;
+	ATH_MSG_DEBUG("ROB status word for robid " << std::hex << robid << std::dec << " indicates data truncation.");
+	addRODError(robid,SCT_ByteStreamErrors::TruncatedROD, errs);
+	m_truncatedRODNumber++;
+	return sc;
       }
       if ((((*rob_status) >> 29) & 0x1) ||(((*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);
-        m_maskedRODNumber++;
-        return sc;
+	ATH_MSG_DEBUG("ROB status word for robid " << std::hex << robid << std::dec << " indicates resource was masked off.");
+	addRODError(robid,SCT_ByteStreamErrors::MaskedROD, errs);
+	m_maskedRODNumber++;
+	return sc;
       }
     }
   }
@@ -217,23 +215,23 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
   /// look at ROD status words /////////
 
   OFFLINE_FRAGMENTS_NAMESPACE::PointerType vRodStatus;
-  int vRodStatusSize = robFrag.rod_nstatus();
+  long unsigned int vRodStatusSize{robFrag.rod_nstatus()};
 
   robFrag.rod_status(vRodStatus);
-  for (int j=0; j< vRodStatusSize; j++) {
-    uint32_t statusWord = vRodStatus[j];
+  for (long unsigned int j{0}; j< vRodStatusSize; j++) {
+    uint32_t statusWord{vRodStatus[j]};
     /** check for clock errors in second ROD status word */
-    if (j ==1 ) {
-      int timClockError = (statusWord >> 16) & 0x1;
-      int bocClockError = (statusWord >> 17) & 0x1;
+    if (j==1) {
+      int timClockError{static_cast<int>((statusWord >> 16) & 0x1)};
+      int bocClockError{static_cast<int>((statusWord >> 17) & 0x1)};
       if (timClockError || bocClockError) {
-        ATH_MSG_DEBUG(" Clock error in ROD status word: "<<timClockError<<" "<<bocClockError);
-        addRODError(robid,SCT_ByteStreamErrors::RODClockError, errs);
-        m_RODClockErrorNumber++;
-        sc=StatusCode::RECOVERABLE;
+	ATH_MSG_DEBUG(" Clock error in ROD status word: " << timClockError << " " << bocClockError);
+	addRODError(robid,SCT_ByteStreamErrors::RODClockError, errs);
+	m_RODClockErrorNumber++;
+	sc=StatusCode::RECOVERABLE;
       }
       /** look at bits 20-23 for DCS HV */
-      int hvBits = (statusWord >> 20)& 0xf;
+      int hvBits{static_cast<int>((statusWord >> 20) & 0xf)};
       if (hvBits==0xf) m_byteStreamErrSvc->addRODHVCounter(true); 
       else m_byteStreamErrSvc->addRODHVCounter(false); 
     }
@@ -241,27 +239,27 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
   
   /** now look at the data words */
 
-  bool foundHeader = false;
+  bool foundHeader{false};
   
   OFFLINE_FRAGMENTS_NAMESPACE::PointerType vRobData;
-  int vRobDataSize = robFrag.rod_ndata();
-  robFrag.rod_data( vRobData ); 
+  unsigned long int vRobDataSize{robFrag.rod_ndata()};
+  robFrag.rod_data(vRobData);
   
-  for (int i=0; i<vRobDataSize; i++ ) {
+  for (unsigned long int i{0}; i<vRobDataSize; i++) {
     wordcount++;
-    robData.word32 = vRobData[i] ;
+    robData.word32 = vRobData[i];
     /** the data is 16-bits wide packed to a 32-bit word (rob_it1). So we unpack it here. */
     uint16_t d[2];
     d[1] = robData.word16[0];
     d[0] = robData.word16[1];
     
-    for( n=0;n<2;n++){
+    for (n=0; n<2; n++) {
       ///---------------------------------------------------------------------
       /// hit element
       ///---------------------------------------------------------------------
       if (d[n]&0x8000) {
 	if (!foundHeader) {
-	  ATH_MSG_INFO(" Missing link header in ROD "<<std::hex<<robid<<std::dec);
+	  ATH_MSG_INFO(" Missing link header in ROD " << std::hex << robid << std::dec);
 	  addRODError(robid,SCT_ByteStreamErrors::MissingLinkHeaderError, errs);
 	  m_numMissingLinkHeader++;
 	  sc = StatusCode::RECOVERABLE;
@@ -276,25 +274,25 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
            *  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) ; 
-	  side = ((d[n]>>14)&0x1) ;
-	  strip = chip*128 + ((d[n]>>4)&0x7F) ;
-	  tbin = 0x2 ; /** assuming tbin is 010 in super-condensed mode */
+	  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 */
 	  nStripsInWord = (d[n]&0xf)+1;
-	  if(chip>5){
-	    ATH_MSG_DEBUG("    Hit super-condensed : xxx Chip number = "<<chip<<" > 5 "<<" for hit "<<std::hex<<d[n]) ;
-	    m_chip_number_error++ ;
+	  if (chip>5) {
+	    ATH_MSG_DEBUG("    Hit super-condensed : xxx Chip number = " << chip << " > 5 " << " for hit " << std::hex << d[n]);
+	    m_chip_number_error++;
 	    addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	    sc=StatusCode::RECOVERABLE;
-	    continue ;
+	    continue;
 	  }
 
 	  /**------------ Search for redundancy only for the master chip  */
 	  if ((side == 1) && ((linkNb%2)==0)) { 
 	    if (((strip != oldstrip) || (side!=oldside)) && (groupSize>0)) { /** if it is a new cluster,  
-							 * make RDO with the previous cluster */
-	      int rdoMade = this->makeRDO(oldstrip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	      if ( rdoMade == -1 ) {
+									      * make RDO with the previous cluster */
+	      int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	      if (rdoMade == -1) {
 		sc=StatusCode::RECOVERABLE;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	      } else {
@@ -304,13 +302,13 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	      oldside = side;
 	      groupSize = 0;
 	    }
-	    linkNb++ ;
+	    linkNb++;
 	  }
 	  if ((side == 0) && ((linkNb%2)!=0)) {
 	    if (((strip != oldstrip) || (side!=oldside)) && (groupSize>0)) { /** if it is a new cluster,  
-							 * make RDO with the previous cluster */
-	      int rdoMade = this->makeRDO(oldstrip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	      if ( rdoMade == -1 ) {
+									      * make RDO with the previous cluster */
+	      int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	      if (rdoMade == -1) {
 		sc=StatusCode::RECOVERABLE;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	      } else {
@@ -320,20 +318,20 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	      oldside = side;
 	      groupSize = 0;
 	    }
-	    linkNb-- ;
+	    linkNb--;
 	  }
-	  onlineId = ((robid & 0xFFFFFF)|(linkNb << 24)) ;
+	  onlineId = ((robid & 0xFFFFFF)|(linkNb << 24));
      
 	  if (groupSize == 0)  {
 	    oldstrip = strip; /** if it's the first super-condensed word */
 	    oldside = side;
 	  }
      
-	  if ((strip != oldstrip) || (side!=oldside)){ 
+	  if ((strip != oldstrip) || (side!=oldside)) { 
 	    /** if it is a new cluster,  
 	     * make RDO with the previous cluster */
-	    int rdoMade = this->makeRDO(oldstrip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	    if ( rdoMade == -1 ) {
+	    int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	    if (rdoMade == -1) {
 	      sc=StatusCode::RECOVERABLE;
 	      addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	    } else {
@@ -343,7 +341,7 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	    oldside = side;
 	    groupSize = 0;
 	  }
-	  groupSize+=nStripsInWord ; // Split clusters have the same strip number.
+	  groupSize+=nStripsInWord; // Split clusters have the same strip number.
      
 	} else if (m_condensedMode) {
     
@@ -352,24 +350,24 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
            *  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) ; 
-	  side = ((d[n]>>14)&0x1) ;
-	  strip = chip*128 + ((d[n]>>4)&0x7F) ;
-	  tbin = 0x2 ; /** assuming tbin is 010 in condensed mode */
-	  if(chip>5){
-	    ATH_MSG_DEBUG("    Hit condensed : xxx Chip number = "<<chip<<" > 5 "<<" for hit "<<std::hex<<d[n]) ;
-	    m_chip_number_error++ ;
+	  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 */
+	  if (chip>5) {
+	    ATH_MSG_DEBUG("    Hit condensed : xxx Chip number = " << chip << " > 5 " << " for hit " << std::hex << d[n]);
+	    m_chip_number_error++;
 	    addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	    sc=StatusCode::RECOVERABLE;
-	    continue ;
+	    continue;
 	  }
 
 	  /**------------ Search for redundancy only for the master chip  */
 	  if ((side == 1) && ((linkNb%2)==0)) { 
 	    if (((strip != oldstrip) || (side!=oldside)) && (groupSize>0)) { /** if it is a new cluster,  
-							 * make RDO with the previous cluster */
-	      int rdoMade = this->makeRDO(oldstrip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	      if ( rdoMade == -1 ) {
+									      * make RDO with the previous cluster */
+	      int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	      if (rdoMade == -1) {
 		sc=StatusCode::RECOVERABLE;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	      } else {
@@ -379,13 +377,13 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	      oldside = side;
 	      groupSize = 0;
 	    }
-	    linkNb++ ;
+	    linkNb++;
 	  }
 	  if ((side == 0) && ((linkNb%2)!=0)) {
 	    if (((strip != oldstrip) || (side!=oldside)) && (groupSize>0)) { /** if it is a new cluster,  
-							 * make RDO with the previous cluster */
-	      int rdoMade = this->makeRDO(oldstrip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	      if ( rdoMade == -1 ) {
+									      * make RDO with the previous cluster */
+	      int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	      if (rdoMade == -1) {
 		sc=StatusCode::RECOVERABLE;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	      } else {
@@ -395,20 +393,20 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	      oldside = side;
 	      groupSize = 0;
 	    }
-	    linkNb-- ;
+	    linkNb--;
 	  }
-	  onlineId = ((robid & 0xFFFFFF)|(linkNb << 24)) ;
+	  onlineId = ((robid & 0xFFFFFF)|(linkNb << 24));
 	  if (groupSize == 0)  {
 	    oldstrip = strip; /** if it's the first condensed word */
 	    oldside = side;
 	  }
-	  if (!(d[n]&0x1)){ /** 1-hit */
-	    m_singleCondHitNumber++ ;
-	    if ((strip != oldstrip) || (side!=oldside)){ 
+	  if (!(d[n]&0x1)) { /** 1-hit */
+	    m_singleCondHitNumber++;
+	    if ((strip != oldstrip) || (side!=oldside)) { 
 	      /** if it is a new cluster,  
 	       * make RDO with the previous cluster */
-	      int rdoMade = this->makeRDO(oldstrip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	      if ( rdoMade == -1 ) {
+	      int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	      if (rdoMade == -1) {
 		sc=StatusCode::RECOVERABLE;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	      } else {
@@ -419,11 +417,11 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	      groupSize = 0;
 	    }
       
-	    if (d[n]&0x4){ /** Error in the hit */
-	      ATH_MSG_DEBUG( "    Hit condensed : xxx ERROR in 1-hit "<<std::hex<<d[n]) ;
+	    if (d[n]&0x4) { /** Error in the hit */
+	      ATH_MSG_DEBUG("    Hit condensed : xxx ERROR in 1-hit " << std::hex << d[n]);
 	      errorHit.push_back(groupSize);
-	      ERRORS = (ERRORS | 0x10) ;
-	      m_cond_hit1_error++ ;
+	      ERRORS = (ERRORS | 0x10);
+	      m_cond_hit1_error++;
 	      sc=StatusCode::RECOVERABLE;
 	    }
 	    groupSize = (groupSize>=2 ? groupSize : 1);
@@ -436,12 +434,12 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 
 	      continue;
 	    }
-	    m_pairedCondHitNumber++ ;
+	    m_pairedCondHitNumber++;
 	    if ((strip != oldstrip) || (side!=oldside)) { /** if it is a new cluster, 
-				      * make RDO with the previous cluster 
-				      */
-	      int rdoMade = this->makeRDO(oldstrip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	      if ( rdoMade == -1 ) {
+							   * make RDO with the previous cluster 
+							   */
+	      int rdoMade{this->makeRDO(oldstrip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	      if (rdoMade == -1) {
 		sc=StatusCode::RECOVERABLE;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	      } else {
@@ -452,17 +450,17 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	      groupSize = 0;
 	    }    
 	    if (d[n]&0x4) { /** Error in the first hit */
-	      ATH_MSG_DEBUG( "    Hit condensed : xxx ERROR in 1st hit"<<std::hex<<d[n]);
+	      ATH_MSG_DEBUG("    Hit condensed : xxx ERROR in 1st hit" << std::hex << d[n]);
 	      errorHit.push_back(groupSize);
-	      m_cond_hit1_error++ ;
-	      ERRORS = (ERRORS | 0x10) ;
+	      m_cond_hit1_error++;
+	      ERRORS = (ERRORS | 0x10);
 	      sc=StatusCode::RECOVERABLE;
 	    }
 	    if (d[n]&0x8) { /** Error in the second hit */
-	      ATH_MSG_DEBUG( "    Hit condensed : xxx ERROR in 2nd hit"<<std::hex<<d[n]) ;
+	      ATH_MSG_DEBUG("    Hit condensed : xxx ERROR in 2nd hit" << std::hex << d[n]);
 	      errorHit.push_back(groupSize);
-	      m_cond_hit1_error++ ;
-	      ERRORS = (ERRORS | 0x20) ;
+	      m_cond_hit1_error++;
+	      ERRORS = (ERRORS | 0x20);
 	      sc=StatusCode::RECOVERABLE;
 	    }
 	    groupSize = 2;
@@ -475,37 +473,37 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	   */
 
           if (!(d[n]&0x8)) {  /** 1st hit cluster expanded */
-	    m_firstExpHitNumber++ ;
-	    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 */
+	    m_firstExpHitNumber++;
+	    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 */
       
-	    if(chip>5){
-	      ATH_MSG_DEBUG( "Expanded hit: First hit xxx ERROR chip Nb = " <<chip<< " > 5" ) ;   
-	      m_chip_number_error++ ;
+	    if (chip>5) {
+	      ATH_MSG_DEBUG("Expanded hit: First hit xxx ERROR chip Nb = " << chip << " > 5");   
+	      m_chip_number_error++;
 	      addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
-	      continue ;
+	      continue;
 	    }
       
 
 	    /** -------------- Search for redundancy only for the master chip  */
 	    if ((side == 1) && ((linkNb%2)==0))  {
-	      linkNb++ ;
+	      linkNb++;
 	    }
 	    if ((side == 0) && ((linkNb%2)!=0)) {
-	      linkNb-- ;
+	      linkNb--;
 	    }
-	    onlineId = ((robid & 0xFFFFFF)|(linkNb << 24)) ; 
-	    groupSize =  1 ;
-	    int rdoMade = this->makeRDO(strip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	    if ( rdoMade == -1 ) {
+	    onlineId = ((robid & 0xFFFFFF)|(linkNb << 24)); 
+	    groupSize =  1;
+	    int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	    if (rdoMade == -1) {
 	      sc=StatusCode::RECOVERABLE;
 	      addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	    } else { 
 	      saved[side*768+strip] = rdoMade; 
 	    }
-            groupSize = 0 ;
+            groupSize = 0;
 	  } else {  /** next hits cluster expanded */
 	    if (d[n]&0x80) { /** paired hits */
 	      if (strip > 767) {
@@ -514,19 +512,19 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 		ATH_MSG_DEBUG("Expanded mode - strip number out of range");
 		continue;
 	      }
-	      m_evenExpHitNumber++ ;
-	      if(chip>5){
-		ATH_MSG_DEBUG( "Expanded Hit: paired hits xxx ERROR chip Nb = "<<chip<<" > 5") ;  
-		m_chip_number_error++ ;
+	      m_evenExpHitNumber++;
+	      if (chip>5) {
+		ATH_MSG_DEBUG("Expanded Hit: paired hits xxx ERROR chip Nb = " << chip << " > 5");  
+		m_chip_number_error++;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
-		continue ;
+		continue;
 	      }
 	      /** first hit from the pair  */
 	      strip++;
 	      tbin = d[n]&0x7;
 	      groupSize = 1;
-	      int rdoMade = this->makeRDO(strip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	      if ( rdoMade == -1 ) {
+	      int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	      if (rdoMade == -1) {
 		sc=StatusCode::RECOVERABLE;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	      } else {
@@ -534,9 +532,9 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	      }
 	      /** second hit from the pair */
 	      strip++;
-	      tbin = (d[n] >> 4) & 0x7 ;
-	      rdoMade = this->makeRDO(strip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	      if ( rdoMade == -1 ) {
+	      tbin = (d[n] >> 4) & 0x7;
+	      rdoMade = this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit);
+	      if (rdoMade == -1) {
 		sc=StatusCode::RECOVERABLE;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	      } else {
@@ -544,18 +542,18 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	      }
 	      groupSize = 0;
 	    } else {  /** Last hit of the cluster */
-	      m_lastExpHitNumber++ ;
-	      if(chip>5){
-		ATH_MSG_DEBUG("Expanded Hit: last hit xxx ERROR chip Nb = "<<chip<<" > 5") ;  
-		m_chip_number_error++ ;
+	      m_lastExpHitNumber++;
+	      if (chip>5) {
+		ATH_MSG_DEBUG("Expanded Hit: last hit xxx ERROR chip Nb = " << chip << " > 5");  
+		m_chip_number_error++;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
-		continue ;
+		continue;
 	      }     
 	      strip++;
 	      tbin = d[n]&0x7;
 	      groupSize = 1;
-	      int rdoMade = this->makeRDO(strip,groupSize,tbin,onlineId,ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	      if ( rdoMade == -1 ) {
+	      int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	      if (rdoMade == -1) {
 		sc=StatusCode::RECOVERABLE;
 		addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	      } else {
@@ -574,10 +572,10 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
       else if (((d[n]>>13)&0x7) == 0x1) {
 	foundHeader=true;
 	
-        m_headnumber++ ;
+        m_headnumber++;
         if (saved[side*768+strip]==false && oldstrip>=0) {
-	  int rdoMade = this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-	  if ( rdoMade == -1 ) {
+	  int rdoMade{this->makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+	  if (rdoMade == -1) {
 	    sc=StatusCode::RECOVERABLE;
 	    addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	  } else {
@@ -586,73 +584,73 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
 	}
   
 	/** Everything is set to default for a new hunt of RDO */
-	strip =0 ;
-	oldstrip = -1 ;
+	strip =0;
+	oldstrip = -1;
 	oldside = -1;
-	groupSize = 0 ;
-	//ErrorHeader = false ;
-	ERRORS = 0 ;
+	groupSize = 0;
+	//ErrorHeader = false;
+	ERRORS = 0;
 	memset(saved,0,768*2);
 	errorHit.clear();
 
 	/** Link Number (or stream) in the ROD fragment */
-	int rodlinkNb = d[n] & 0x7F ;  
+	int rodlinkNb{static_cast<int>(d[n] & 0x7F)};
 
 	/** This is the real calculation for the offline  */
-	linkNb  = ((( rodlinkNb >>4)&0x7)*12+(rodlinkNb &0xF)) ;
-	onlineId = ((robid & 0xFFFFFF)|(linkNb << 24)) ;     
+	linkNb = (((rodlinkNb >>4)&0x7)*12+(rodlinkNb &0xF));
+	onlineId = ((robid & 0xFFFFFF)|(linkNb << 24));     
 	if ((onlineId ==0) || (linkNb > 95)) {
 	  addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
 	  sc=StatusCode::RECOVERABLE;
-	  ATH_MSG_DEBUG("Header: xxx Link nb out of range (skipping following data)"<<std::dec<<linkNb) ;
+	  ATH_MSG_DEBUG("Header: xxx Link nb out of range (skipping following data)" << std::dec << linkNb);
 	  break;
 	} else {
-	  currentLinkIdHash = m_cabling->getHashFromOnlineId(onlineId) ;
+	  currentLinkIdHash = m_cabling->getHashFromOnlineId(onlineId);
 	}
 	/// look for masked off links - bit 7
 	if (d[n] >> 7 & 0x1) {
-	  ATH_MSG_DEBUG("Masked link "<<onlineId<<" "<<currentLinkIdHash);
-	  //no counter increment here , is that correct? (sar)
+	  ATH_MSG_DEBUG("Masked link " << onlineId << " " << currentLinkIdHash);
+	  //no counter increment here, is that correct? (sar)
 	  addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::MaskedLink, errs);
 	  sc=StatusCode::RECOVERABLE; 
 	}
-	if (d[n]&0x800){
-	  ATH_MSG_DEBUG( "    Header: xxx TimeOut Error " <<currentLinkIdHash);
+	if (d[n]&0x800) {
+	  ATH_MSG_DEBUG("    Header: xxx TimeOut Error " << currentLinkIdHash);
 	  m_head_error_timeout++;
 	  addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::TimeOutError, errs);
 	  sc=StatusCode::RECOVERABLE;
 	}
   
-	if (d[n]&0x1000){
-	  ATH_MSG_DEBUG( "    Header: xxx Preamble Error " <<currentLinkIdHash) ;
-	  m_head_error_preamb++ ;
+	if (d[n]&0x1000) {
+	  ATH_MSG_DEBUG("    Header: xxx Preamble Error " << currentLinkIdHash);
+	  m_head_error_preamb++;
 	  addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::PreambleError, errs);
 	  sc=StatusCode::RECOVERABLE;
 	}
   
-	if (d[n]&0x400){ 
-	  ATH_MSG_DEBUG( "    Header: xxx LVL1 ID Error " <<currentLinkIdHash);
-	  m_head_error_lvl1id++ ;
+	if (d[n]&0x400) { 
+	  ATH_MSG_DEBUG("    Header: xxx LVL1 ID Error " << currentLinkIdHash);
+	  m_head_error_lvl1id++;
 	  addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::LVL1IDError, errs);
 	  sc=StatusCode::RECOVERABLE;
 	}
   
-	if (d[n]&0x200){
-	  ATH_MSG_DEBUG( "    Header: xxx BCID Error " << currentLinkIdHash) ;
-	  m_head_error_bcid++ ;
+	if (d[n]&0x200) {
+	  ATH_MSG_DEBUG("    Header: xxx BCID Error " << currentLinkIdHash);
+	  m_head_error_bcid++;
 	  addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::BCIDError, errs);
 	  sc=StatusCode::RECOVERABLE;
 	}
   
 	if ((d[n]&0xF) > 11) {
-	  ATH_MSG_DEBUG("    Header: xxx Error in formatter " << currentLinkIdHash) ;
-	  m_head_error_formatter++ ;
+	  ATH_MSG_DEBUG("    Header: xxx Error in formatter " << currentLinkIdHash);
+	  m_head_error_formatter++;
 	  addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::FormatterError, errs);
 	  sc=StatusCode::RECOVERABLE;
 	}
 
-        bool condensedMode = false;
-	if (d[n]&0x100)  condensedMode = true ;
+        bool condensedMode{false};
+	if (d[n]&0x100) condensedMode = true;
 
         if (condensedMode != m_condensedMode) {
           m_condensedMode = condensedMode;
@@ -670,29 +668,29 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
       else if (((d[n]>>13)&0x7) == 0x2) { 
 	foundHeader=false;
 	
-	m_trailnumber++ ;
+	m_trailnumber++;
 	//ErrorTrailer = false;
   
-	if (d[n]&0x1000){
+	if (d[n]&0x1000) {
 	  //ErrorTrailer = true;
-	  ATH_MSG_DEBUG( "    Trailer: xxx Trailer ERROR " << std::hex << d[n] ) ;
-	  m_trail_error_bit++ ;
+	  ATH_MSG_DEBUG("    Trailer: xxx Trailer ERROR " << std::hex << d[n]);
+	  m_trail_error_bit++;
 	  addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::TrailerError, errs);
 	  sc=StatusCode::RECOVERABLE;
 	}
   
-	if (d[n]&0x800){
+	if (d[n]&0x800) {
 	  //ErrorTrailer = true;/** no data should appear between header and trailer */
-	  ATH_MSG_DEBUG( "    Trailer: xxx Header-Trailer limit ERROR " << std::hex << d[n] ) ;
-	  m_trail_error_limit++ ;
+	  ATH_MSG_DEBUG("    Trailer: xxx Header-Trailer limit ERROR " << std::hex << d[n]);
+	  m_trail_error_limit++;
 	  addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::HeaderTrailerLimitError, errs);
 	  sc=StatusCode::RECOVERABLE;
 	}
   
-	if (d[n]&0x400){
+	if (d[n]&0x400) {
 	  //ErrorTrailer = true; /** not sure if there are hit elements before (probably yes but in principle they are fine) */
-	  ATH_MSG_DEBUG( "    Trailer: xxx Data Overflow ERROR " << std::hex << d[n] );
-	  m_trail_error_overflow++ ;
+	  ATH_MSG_DEBUG("    Trailer: xxx Data Overflow ERROR " << std::hex << d[n]);
+	  m_trail_error_overflow++;
 	  addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::TrailerOverflowError, errs);
 	  sc=StatusCode::RECOVERABLE;
 	}
@@ -727,29 +725,29 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
       /// 000xxxxxxFFFFEEE
       /// 000: FlaggedABCD error: xxxxxxx not used, FFFF: chip, EEE: error code
       ///---------------------------------------------------------------------
-      else if (((d[n]>>13)&0x7) == 0x0){
-        chip = ((d[n]>>3)&0xF) ;
+      else if (((d[n]>>13)&0x7) == 0x0) {
+        chip = ((d[n]>>3)&0xF);
         ABCerror = d[n]&0x7; 
         /** no data should appear for that chip but how do we 
          * want to transmit this information ? */
-        IdentifierHash flagIdHash(0);
+        IdentifierHash flagIdHash{0};
         if (onlineId == 0) {
           addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
-          continue ;
+          continue;
         } else {
-          flagIdHash = m_cabling->getHashFromOnlineId(onlineId) ;
+          flagIdHash = m_cabling->getHashFromOnlineId(onlineId);
         }
-        ATH_MSG_DEBUG(" xxx Flagged ABCD ERROR in chip "<<chip<<" Error code ABCerror "<<ABCerror<<" Link Nb (or Stream) "<<linkNb) ;
-        m_flag_error_bit++ ;
+        ATH_MSG_DEBUG(" xxx Flagged ABCD ERROR in chip " << chip << " Error code ABCerror " << ABCerror << " Link Nb (or Stream) "<<linkNb);
+        m_flag_error_bit++;
         // Error code of ABCD error should be 1, 2, 4 or 7.
-        if(ABCerror!=0x1 and ABCerror!=0x2 and ABCerror!=0x4 and ABCerror!=0x7) {
+        if (ABCerror!=0x1 and ABCerror!=0x2 and ABCerror!=0x4 and ABCerror!=0x7) {
           ATH_MSG_DEBUG("ABCD error has an invalid error code " << ABCerror <<
                         " the 16-bit word is 0x" << std::hex << d[n] << std::dec << " for hash " << flagIdHash);
           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);
-          if(flagIdHash.value()%2!=side_ABCDError) {
+          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.
             // Hash Id is flipped.
@@ -758,48 +756,48 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
             flagIdHash = (flagIdHash.value()/2)*2+side_ABCDError;
           }
           // Chip should be 0-5 or 8-13.
-	  if(chip%8>=6) {
+	  if (chip%8>=6) {
             ATH_MSG_DEBUG("ABCD error has an invalid chip 0x" << std::hex << chip << std::dec <<
                           " the 16-bit word is 0x" << std::hex << d[n] << std::dec <<
                           " for hash " << flagIdHash.value());
             addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Invalid, errs);
 	  } else {
-            if(     ABCerror==0x1) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Error1, errs);
-            else if(ABCerror==0x2) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Error2, errs);
-            else if(ABCerror==0x4) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Error4, errs);
-            else if(ABCerror==0x7) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Error7, errs);
-            if(     chip%8==0) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip0, errs);
-            else if(chip%8==1) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip1, errs);
-            else if(chip%8==2) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip2, errs);
-            else if(chip%8==3) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip3, errs);
-            else if(chip%8==4) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip4, errs);
-            else if(chip%8==5) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip5, errs);
+            if (     ABCerror==0x1) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Error1, errs);
+            else if (ABCerror==0x2) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Error2, errs);
+            else if (ABCerror==0x4) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Error4, errs);
+            else if (ABCerror==0x7) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Error7, errs);
+            if (     chip%8==0) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip0, errs);
+            else if (chip%8==1) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip1, errs);
+            else if (chip%8==2) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip2, errs);
+            else if (chip%8==3) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip3, errs);
+            else if (chip%8==4) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip4, errs);
+            else if (chip%8==5) addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError_Chip5, errs);
           }
         }
         addSingleError(flagIdHash, SCT_ByteStreamErrors::ABCDError, errs);
         sc=StatusCode::RECOVERABLE;
         continue;
-      } else if (((d[n]>>13)&0x7) == 0x3){
+      } else if (((d[n]>>13)&0x7) == 0x3) {
         ///---------------------------------------------------------------------
         /// Raw Data
         ///---------------------------------------------------------------------
-        IdentifierHash rawIdHash(0);
+        IdentifierHash rawIdHash{0};
         if (onlineId == 0) {
           addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
-          continue ;
+          continue;
         } else {
-          rawIdHash = m_cabling->getHashFromOnlineId(onlineId) ;
+          rawIdHash = m_cabling->getHashFromOnlineId(onlineId);
         }
-  
-        ATH_MSG_DEBUG( " xxx Raw Data Mode "<<std::hex<<d[n]<<std::dec<<": Config Data Mode ");
+
+        ATH_MSG_DEBUG(" xxx Raw Data Mode " << std::hex << d[n] << std::dec << ": Config Data Mode ");
         /** too many errors in the BS for the ROD to decode the data */
-        m_config_data_bit++ ;
+        m_config_data_bit++;
         addSingleError(rawIdHash, SCT_ByteStreamErrors::RawError, errs);
         sc=StatusCode::RECOVERABLE;
         continue;
       } else {
-        ATH_MSG_DEBUG( "Data word format unknown " );
-        m_unknown_data_format++ ;
+        ATH_MSG_DEBUG("Data word format unknown ");
+        m_unknown_data_format++;
         addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
         sc=StatusCode::RECOVERABLE;
       }
@@ -807,9 +805,9 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
   }   //end of 32-bit word loop
 
   /** create RDO of the last ink or stream of the event */
-  if (saved[side*768+strip]==false && oldstrip>=0){
-    int rdoMade = makeRDO(strip, groupSize, tbin, onlineId, ERRORS,rdoIdc,vecHash,skipHash,lastHash, errorHit);
-    if ( rdoMade == -1 ) {
+  if (saved[side*768+strip]==false && oldstrip>=0) {
+    int rdoMade{makeRDO(strip, groupSize, tbin, onlineId, ERRORS, rdoIdc, vecHash, skipHash, lastHash, errorHit)};
+    if (rdoMade == -1) {
       sc=StatusCode::RECOVERABLE;
       addSingleError(currentLinkIdHash, SCT_ByteStreamErrors::ByteStreamParseError, errs);
     } else {
@@ -820,7 +818,7 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
   // Set this ROD as decoded in SCT_ByteStreamErrorSvc
   m_byteStreamErrSvc->setDecodedROD(robid);
 
-  if (sc.isFailure() and msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "One or more ByteStream errors found " << endmsg;
+  if (sc.isFailure()) ATH_MSG_DEBUG("One or more ByteStream errors found ");
   return sc;
 }
 /** makeRDO has 3 possible return values: 
@@ -830,7 +828,8 @@ SCT_RodDecoder::fillCollection( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment&
  *            on as StatusCode::RECOVERABLE by fillCollection().
  */
 
-int SCT_RodDecoder::makeRDO(int strip, int groupSize,int tbin, uint32_t onlineId, int ERRORS, SCT_RDO_Container& rdoIdc, std::vector<IdentifierHash>* vecHash,IdentifierHash& skipHash, IdentifierHash& lastHash,
+int SCT_RodDecoder::makeRDO(int strip, int groupSize, int tbin, uint32_t onlineId, int ERRORS, SCT_RDO_Container& rdoIdc,
+			    std::vector<IdentifierHash>* vecHash, IdentifierHash& skipHash, IdentifierHash& lastHash,
                             const std::vector<int>& errorHit)
 {
 
@@ -841,11 +840,11 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize,int tbin, uint32_t onlineId
     return -1;
   }
   /** get offlineId from the link number and ROB number */
-  IdentifierHash idCollHash =  m_cabling->getHashFromOnlineId(onlineId) ;
+  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);
+    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"));
@@ -853,21 +852,21 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize,int tbin, uint32_t onlineId
   }
 
   if (((strip & 0x7f) + (groupSize-1) > 127) or (strip<0) or (strip>767)) {
-    ATH_MSG_WARNING("Cluster with "<<groupSize<<" strips, starting at strip "<<strip<<" in collection "<<idCollHash<<" out of range. Will not make RDO");
+    ATH_MSG_WARNING("Cluster with " << groupSize << " strips, starting at strip " << strip << " in collection " << idCollHash << " out of range. Will not make RDO");
     return -1;
   }
 
   /** this option is for the trigger, if there is a vecHash* given, test it ! */
   if (vecHash) {
     if (idCollHash == skipHash) {
-      ATH_MSG_VERBOSE( "Collection for Hash not to be decoded, skip" );
+      ATH_MSG_VERBOSE("Collection for Hash not to be decoded, skip");
       return 0;
     } else if (idCollHash != lastHash) {
       lastHash = idCollHash;
       /** maybe the new hash is not in the list, so test it */
-      std::vector<IdentifierHash>::iterator p = find(vecHash->begin(),vecHash->end(),idCollHash);
+      std::vector<IdentifierHash>::iterator p{find(vecHash->begin(), vecHash->end(), idCollHash)};
       if (p == vecHash->end()) {
-        ATH_MSG_VERBOSE( "Collection for Hash not to be decoded, skip" );
+        ATH_MSG_VERBOSE("Collection for Hash not to be decoded, skip");
         /** remember this one, so that we do not find(...) forever */
         skipHash = idCollHash;
         return 0;
@@ -876,41 +875,41 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize,int tbin, uint32_t onlineId
   }
 
   /** get identifier from the hash, this is not nice */
-  Identifier idColl= m_sct_id->wafer_id(idCollHash);
+  Identifier idColl{m_sct_id->wafer_id(idCollHash)};
 
-  SCT_RDO_Collection* theColl = 0;
+  SCT_RDO_Collection* theColl{nullptr};
   SCT_RDO_Container::const_iterator itColl;
 
   /** see if strips go from 0 to 767 or vice versa */
-  const InDetDD::SiDetectorElement * p_element = (m_indet_mgr->getDetectorElement(idCollHash));
+  const InDetDD::SiDetectorElement* p_element{m_indet_mgr->getDetectorElement(idCollHash)};
   if (p_element->swapPhiReadoutDirection()) {
-    strip = 767 - strip ;
+    strip = 767 - strip;
     strip = strip-(groupSize-1);
   }
 
-  Identifier iddigit = m_sct_id->strip_id(idColl,strip) ;
-  if(not m_sct_id->is_sct(iddigit)) {
+  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 = (groupSize | (strip << 11) | (tbin <<22) | (ERRORS << 25)) ;
+  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) ;
+  ATH_MSG_DEBUG("Output Raw Data " << std::hex << " Coll " << idColl.getString() << ":-> " << m_sct_id->print_to_string(iddigit) << std::dec);
   
-  itColl = rdoIdc.indexFind( idCollHash );
+  itColl = rdoIdc.indexFind(idCollHash);
   
   /** Check if the Collection is already created.*/
-  if ( itColl != rdoIdc.end() ) {
+  if (itColl != rdoIdc.end()) {
     theColl = const_cast<SCT_RDO_Collection*>(&**itColl); //very nasty!!
   } else {
-    ATH_MSG_DEBUG( " Collection ID = " << idCollHash<< " does not exist, create it " );
+    ATH_MSG_DEBUG(" Collection ID = " << idCollHash << " does not exist, create it ");
     /** create new collection */
-    theColl = new SCT_RDO_Collection ( idCollHash );
+    theColl = new SCT_RDO_Collection{idCollHash};
     /** set the Identifier to be nice to downstream clients */
     theColl->setIdentifier(idColl);
     /** add collection into IDC */
     if (rdoIdc.addCollection(theColl, idCollHash).isFailure()) {
-      ATH_MSG_ERROR("Failed to add SCT RDO collection to container" );
+      ATH_MSG_ERROR("Failed to add SCT RDO collection to container");
     }
   }
   
@@ -918,9 +917,9 @@ int SCT_RodDecoder::makeRDO(int strip, int groupSize,int tbin, uint32_t onlineId
    * into Collection. 
    */
   m_nRDOs++;
-  theColl->push_back( std::make_unique<SCT3_RawData> ( iddigit,
-                                                       rawDataWord,
-                                                       &errorHit ) );
+  theColl->push_back(std::make_unique<SCT3_RawData>(iddigit,
+						    rawDataWord,
+						    &errorHit));
   return 1;
 }
 
@@ -929,9 +928,9 @@ SCT_RodDecoder::addRODError(uint32_t rodid, int errorType,
                             InDetBSErrContainer* errs)
 {
   std::vector<IdentifierHash> idHashes;
-  m_cabling->getHashesForRod(idHashes,rodid);
-  std::vector<IdentifierHash>::iterator hashIt = idHashes.begin();
-  std::vector<IdentifierHash>::iterator hashEnd = idHashes.end();
+  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);
   }
@@ -943,14 +942,14 @@ SCT_RodDecoder::addSingleError(const IdentifierHash idHash,
                                const int bsErrorType,
                                InDetBSErrContainer* errs)
 {
-  bool ok(true);
+  bool ok{true};
   if (m_triggerMode) {
     m_byteStreamErrSvc->addErrorCount(bsErrorType);
   } else {
     ok=idHash.is_valid();
-    if (ok){
-      errs->push_back( std::make_unique<std::pair<IdentifierHash, int> >
-                         (idHash, bsErrorType) );
+    if (ok) {
+      errs->push_back(std::make_unique<std::pair<IdentifierHash, int> >
+		      (idHash, bsErrorType));
     }
   }
   return ok;
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h
old mode 100755
new mode 100644
index 2788e591ac2e3c5aad871dab1ae74ae75f50a12c..bf7d0c45af81eca6cccbc81c82f5a63b91a12f43
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.h
@@ -63,7 +63,7 @@ class SCT_RodDecoder : public AthAlgTool, public ISCT_RodDecoder
     override;
 
 
-private:
+ private:
   /// method that builds the RawData RDO and add it to the collection 
   int makeRDO(int strip, int groupSize, int tbin, 
 	      uint32_t onlineId, int ERRORS,
@@ -74,7 +74,7 @@ private:
 
   /// add an error for each wafer in a problematic ROD.
   void addRODError(uint32_t rodid, int errorType,
-                      InDetBSErrContainer* errs);
+		   InDetBSErrContainer* errs);
 
   bool addSingleError(const IdentifierHash idHash,
                       const int bsErrorType,
@@ -122,5 +122,4 @@ private:
   ServiceHandle<IIncidentSvc> m_incidentSvc;
 };
 
-
 #endif //SCT_RAWDATABYTESTREAM_SCT_RODDECODER_H
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.cxx
old mode 100755
new mode 100644
index eab2d0627e9ff437a2b19865235a2548b7477f18..15cf674ca687f3ef2438b3e328ac0820d43430d6
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.cxx
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.cxx
@@ -19,13 +19,13 @@
 ///STL
 #include <set>
 
-namespace{
-  int rodLinkFromOnlineId(const uint32_t id){
-    SCT_OnlineId online(id);
-    uint32_t f(online.fibre());
-    int formatter((f/12) & 0x7);
-    int linknb = (f - (formatter*12)) & 0xF ;
-    int rodlink = (formatter << 4) | linknb ;
+namespace {
+  int rodLinkFromOnlineId(const uint32_t id) {
+    SCT_OnlineId online{id};
+    uint32_t f{online.fibre()};
+    int formatter{static_cast<int>((f/12) & 0x7)};
+    int linknb{static_cast<int>((f - (formatter*12)) & 0xF)};
+    int rodlink{(formatter << 4) | linknb};
     return rodlink;
   } 
   bool isOdd(const int someNumber){
@@ -37,30 +37,29 @@ namespace{
   }
  
   bool swappedCable(const int moduleSide, const int linkNumber){
-    return isOdd(linkNumber)?(moduleSide==0) : (moduleSide==1);
+    return isOdd(linkNumber) ? (moduleSide==0) : (moduleSide==1);
   }
 }//end of anon namespace
 
 
 SCT_RodEncoder::SCT_RodEncoder
-( const std::string& type, const std::string& name,const IInterface* parent )
-  :  AthAlgTool(type,name,parent),
-     m_cabling("SCT_CablingSvc",name),
-     m_bsErrs("SCT_ByteStreamErrorsSvc",name),
-     m_sct_id(nullptr),
-     m_condensed(false),
-     m_swapModuleId{},
-  m_singleCondHitNumber(0),
-  m_pairedCondHitNumber(0),
-  m_firstExpHitNumber(0),
-  m_evenExpHitNumber(0),
-  m_lastExpHitNumber(0),
-  m_headerNumber(0),
-  m_trailerNumber(0)
-     {
-       declareInterface< ISCT_RodEncoder  >( this );
-       declareProperty("CondensedMode",m_condensed=true);
-     }
+(const std::string& type, const std::string& name,const IInterface* parent) : 
+  AthAlgTool(type, name, parent),
+  m_cabling{"SCT_CablingSvc", name},
+  m_bsErrs{"SCT_ByteStreamErrorsSvc", name},
+  m_sct_id{nullptr},
+  m_condensed{false},
+  m_swapModuleId{},
+  m_singleCondHitNumber{0},
+  m_pairedCondHitNumber{0},
+  m_firstExpHitNumber{0},
+  m_evenExpHitNumber{0},
+  m_lastExpHitNumber{0},
+  m_headerNumber{0},
+  m_trailerNumber{0} {
+    declareInterface<ISCT_RodEncoder>(this);
+    declareProperty("CondensedMode", m_condensed=true);
+  }
 
 
 /** destructor  */
@@ -75,9 +74,9 @@ StatusCode SCT_RodEncoder::initialize() {
   ATH_MSG_DEBUG("SCT_RodEncoder::initialize()");
   
   /** Retrieve cabling service */
-  ATH_CHECK( m_cabling.retrieve());
-  ATH_MSG_DEBUG( "Retrieved service " << m_cabling );
-  ATH_CHECK( detStore()->retrieve(m_sct_id,"SCT_ID") );
+  ATH_CHECK(m_cabling.retrieve());
+  ATH_MSG_DEBUG("Retrieved service " << m_cabling);
+  ATH_CHECK(detStore()->retrieve(m_sct_id, "SCT_ID"));
   ATH_CHECK(m_bsErrs.retrieve());
   return StatusCode::SUCCESS;
 }
@@ -90,37 +89,27 @@ StatusCode SCT_RodEncoder::finalize() {
 ///  fillROD convert SCT RDO to a vector of 32bit words
 ///=========================================================================  
 
-void SCT_RodEncoder::fillROD(std::vector<uint32_t>&  v32rod, uint32_t robid, 
-			     vRDOs& rdoVec) {
+void SCT_RodEncoder::fillROD(std::vector<uint32_t>& v32rod, uint32_t robid, 
+			     vRDOs_t& rdoVec) {
   
   /** retrieve errors from SCT_ByteStreamErrorsSvc */
   
-  std::set<IdentifierHash>* timeOutErrors = 
-    m_bsErrs->getErrorSet(SCT_ByteStreamErrors::TimeOutError);
-  std::set<IdentifierHash>* l1idErrors =
-    m_bsErrs->getErrorSet(SCT_ByteStreamErrors::LVL1IDError);
-  std::set<IdentifierHash>* bcidErrors = 
-    m_bsErrs->getErrorSet(SCT_ByteStreamErrors::BCIDError);
-  std::set<IdentifierHash>* preambleErrors = 
-    m_bsErrs->getErrorSet(SCT_ByteStreamErrors::PreambleError);
-  std::set<IdentifierHash>* formatterErrors =
-    m_bsErrs->getErrorSet(SCT_ByteStreamErrors::FormatterError);
-  std::set<IdentifierHash>* trailerErrors = 
-    m_bsErrs->getErrorSet(SCT_ByteStreamErrors::TrailerError);
-  std::set<IdentifierHash>* headertrailerErrors = 
-    m_bsErrs->getErrorSet(SCT_ByteStreamErrors::HeaderTrailerLimitError);
-  std::set<IdentifierHash>* traileroverflowErrors = 
-    m_bsErrs->getErrorSet(SCT_ByteStreamErrors::TrailerOverflowError);
-  std::set<IdentifierHash>* rawErrors = 
-    m_bsErrs->getErrorSet(SCT_ByteStreamErrors::RawError);
-  std::set<IdentifierHash>* abcdErrors = 
-    m_bsErrs->getErrorSet(SCT_ByteStreamErrors::ABCDError);  
-
-  std::vector<int> vtbin ;
-  std::vector<uint16_t> v16data ;
-  int strip1    = 0 ;
-  int theTimeBin  = 0 ;
-  int groupsize = 0 ;
+  const std::set<IdentifierHash>* timeOutErrors{m_bsErrs->getErrorSet(SCT_ByteStreamErrors::TimeOutError)};
+  const std::set<IdentifierHash>* l1idErrors{m_bsErrs->getErrorSet(SCT_ByteStreamErrors::LVL1IDError)};
+  const std::set<IdentifierHash>* bcidErrors{m_bsErrs->getErrorSet(SCT_ByteStreamErrors::BCIDError)};
+  const std::set<IdentifierHash>* preambleErrors{m_bsErrs->getErrorSet(SCT_ByteStreamErrors::PreambleError)};
+  const std::set<IdentifierHash>* formatterErrors{m_bsErrs->getErrorSet(SCT_ByteStreamErrors::FormatterError)};
+  const std::set<IdentifierHash>* trailerErrors{m_bsErrs->getErrorSet(SCT_ByteStreamErrors::TrailerError)};
+  const std::set<IdentifierHash>* headertrailerErrors{m_bsErrs->getErrorSet(SCT_ByteStreamErrors::HeaderTrailerLimitError)};
+  const std::set<IdentifierHash>* traileroverflowErrors{m_bsErrs->getErrorSet(SCT_ByteStreamErrors::TrailerOverflowError)};
+  const std::set<IdentifierHash>* rawErrors{m_bsErrs->getErrorSet(SCT_ByteStreamErrors::RawError)};
+  const std::set<IdentifierHash>* abcdErrors{m_bsErrs->getErrorSet(SCT_ByteStreamErrors::ABCDError)};
+
+  std::vector<int> vtbin;
+  std::vector<uint16_t> v16data;
+  int strip1{0};
+  int theTimeBin{0};
+  int groupsize{0};
   
   /** loop over errors here - just add headers (w/ errors), trailers (w/errors), 
    * and raw and abcd errors */
@@ -139,22 +128,22 @@ void SCT_RodEncoder::fillROD(std::vector<uint32_t>&  v32rod, uint32_t robid,
   addSpecificErrors(robid, rawErrors, RAWDATA_ERR, v16data);
   
   std::vector<bool> v_isDuplicated(rdoVec.size(), false);
-  for(unsigned int iRdo=0; iRdo<rdoVec.size(); iRdo++) {
-    const RDO* rawdata = rdoVec.at(iRdo);
-    if(rawdata==0) {
-      msg(MSG::ERROR) << "RDO pointer is NULL. skipping this hit." <<endmsg;
+  for (unsigned int iRdo{0}; iRdo<rdoVec.size(); iRdo++) {
+    const RDO* rawdata{rdoVec.at(iRdo)};
+    if (rawdata==0) {
+      ATH_MSG_ERROR("RDO pointer is NULL. skipping this hit.");
       v_isDuplicated.at(iRdo) = true;
       continue;
     }
 
     // Check if there is another RDO with the same first strip
-    for(unsigned int iRdo2=0; iRdo2<iRdo; iRdo2++) {
-      const RDO* rawdata2 = rdoVec.at(iRdo2);
-      if(v_isDuplicated.at(iRdo2)) continue;
+    for (unsigned int iRdo2{0}; iRdo2<iRdo; iRdo2++) {
+      const RDO* rawdata2{rdoVec.at(iRdo2)};
+      if (v_isDuplicated.at(iRdo2)) continue;
 
-      if(rawdata->identify()==rawdata2->identify()) {
+      if (rawdata->identify()==rawdata2->identify()) {
 	// Keep RDO with larger cluster size. If cluster sizes are the same, keep the first one.
-	if(rawdata->getGroupSize()>=rawdata2->getGroupSize()) {
+	if (rawdata->getGroupSize()>=rawdata2->getGroupSize()) {
 	  v_isDuplicated.at(iRdo2) = true;
 	} else {
 	  v_isDuplicated.at(iRdo)  = true;
@@ -164,14 +153,14 @@ void SCT_RodEncoder::fillROD(std::vector<uint32_t>&  v32rod, uint32_t robid,
     }
   }
 
-  uint32_t lastHeader = 0;
-  bool firstInRod = true;
-  uint16_t lastTrailer=0;
-  for(unsigned int iRdo=0; iRdo<rdoVec.size(); iRdo++) {
-    const RDO* rawdata = rdoVec.at(iRdo);
-    if(v_isDuplicated.at(iRdo)) continue;
+  uint32_t lastHeader{0};
+  bool firstInRod{true};
+  uint16_t lastTrailer{0};
+  for (unsigned int iRdo{0}; iRdo<rdoVec.size(); iRdo++) {
+    const RDO* rawdata{rdoVec.at(iRdo)};
+    if (v_isDuplicated.at(iRdo)) continue;
 
-    uint16_t header = this->getHeaderUsingRDO(rawdata);
+    uint16_t header{this->getHeaderUsingRDO(rawdata)};
     if (header != lastHeader) {
       if (! firstInRod) {
         v16data.push_back(lastTrailer);
@@ -182,37 +171,37 @@ void SCT_RodEncoder::fillROD(std::vector<uint32_t>&  v32rod, uint32_t robid,
       lastTrailer = getTrailer(0);
     }
     if (m_condensed) { /** Condensed mode  */
-      strip1= strip(rawdata) ;
-      groupsize = groupSize(rawdata) ;
-      if(groupsize == 1) { /** For single hit */
-        int gSize = 1 ;
-        int strip2 = strip1;
-        encodeData(vtbin,v16data,rawdata,gSize,strip2) ;
+      strip1 = strip(rawdata);
+      groupsize = groupSize(rawdata);
+      if (groupsize == 1) { /** For single hit */
+        int gSize{1};
+        int strip2{strip1};
+        encodeData(vtbin, v16data, rawdata, gSize, strip2);
       }
       /** Sim rdo could have groupe size > 1 then I need to split 
        * them 2 by 2 to built the condensed BS data */
       else { /** Encoding in condensed BS paired data from groupe size > 1 */
-	int chipFirst = strip1/128;
-	int chipLast  = (strip1+groupsize-1)/128;
+	int chipFirst{strip1/128};
+	int chipLast{(strip1+groupsize-1)/128};
 
-	for(int chip=chipFirst; chip<=chipLast; chip++) {
+	for (int chip{chipFirst}; chip<=chipLast; chip++) {
 	  int tmpGroupsize = 0;
-	  if(chipFirst==chipLast) tmpGroupsize = groupsize; // In case of one chip
-	  else if(chip==chipLast) tmpGroupsize = strip1+groupsize-chip*128; // In case of last chip
-	  else if(chip==chipFirst) tmpGroupsize = (chip+1)*128-strip1; // In case of first chip
+	  if (chipFirst==chipLast) tmpGroupsize = groupsize; // In case of one chip
+	  else if (chip==chipLast) tmpGroupsize = strip1+groupsize-chip*128; // In case of last chip
+	  else if (chip==chipFirst) tmpGroupsize = (chip+1)*128-strip1; // In case of first chip
 	  else tmpGroupsize = 128; // In case of middle chip
-	  int tmpStrip1 = (chip==chipFirst ? strip1 : 128*chip);
+	  int tmpStrip1{chip==chipFirst ? strip1 : 128*chip};
 
-	  int n_pairedRdo = tmpGroupsize/2 ;
-	  for (int i = 0; i< n_pairedRdo; i++ ) {
-	    int gSize = 2 ;
-	    int strip2 = tmpStrip1+ (2*i) ;
-	    encodeData(vtbin,v16data,rawdata,gSize,strip2) ;
+	  int n_pairedRdo{tmpGroupsize/2};
+	  for (int i =0; i<n_pairedRdo; i++) {
+	    int gSize{2};
+	    int strip2{tmpStrip1+ (2*i)};
+	    encodeData(vtbin, v16data, rawdata, gSize, strip2);
 	  } 
-	  if((tmpGroupsize != 0) && isOdd(tmpGroupsize)) {/** The last hit from a cluster with odd group size */
-	    int gSize = 1 ;
-	    int strip2 = tmpStrip1+ (tmpGroupsize - 1) ;
-	    encodeData(vtbin,v16data,rawdata,gSize,strip2) ;
+	  if ((tmpGroupsize != 0) && isOdd(tmpGroupsize)) {/** The last hit from a cluster with odd group size */
+	    int gSize{1};
+	    int strip2{tmpStrip1+ (tmpGroupsize - 1)};
+	    encodeData(vtbin, v16data, rawdata, gSize, strip2);
 	  }  
 	}
 
@@ -222,72 +211,72 @@ void SCT_RodEncoder::fillROD(std::vector<uint32_t>&  v32rod, uint32_t robid,
     
     else {/** Expanded mode */
       
-      vtbin.clear() ;
-      const RDO* rawdata = rdoVec.at(iRdo);
-      strip1    = strip(rawdata) ;
-      theTimeBin      = tbin(rawdata) ;
-      groupsize = groupSize(rawdata) ;
+      vtbin.clear();
+      const RDO* rawdata{rdoVec.at(iRdo)};
+      strip1 = strip(rawdata);
+      theTimeBin = tbin(rawdata);
+      groupsize = groupSize(rawdata);
       
-      for(int t = 0; t < groupsize; t++) {
-        vtbin.push_back(theTimeBin) ;
-        strip1++ ;
+      for (int t{0}; t < groupsize; t++) {
+        vtbin.push_back(theTimeBin);
+        strip1++;
       }
-      int strip2 = strip(rawdata) ;
-      int gSize = groupSize(rawdata) ;
-      encodeData(vtbin,v16data,rawdata,gSize,strip2) ;
+      int strip2{strip(rawdata)};
+      int gSize{groupSize(rawdata)};
+      encodeData(vtbin, v16data, rawdata, gSize, strip2);
       
     }  // End of (else) Expanded
   } //end of RDO loop
-  if (!firstInRod && lastTrailer !=0) {
+  if (!firstInRod && lastTrailer!=0) {
     v16data.push_back(lastTrailer);
   }
   /** 16 bits TO 32 bits and pack into 32 bit vectors */
-  packFragments(v16data,v32rod) ;
+  packFragments(v16data,v32rod);
   
-  return ;
+  return;
   
 } // end of fillROD(...)
 
-void SCT_RodEncoder::addHeadersWithErrors(const uint32_t robid,const std::set<IdentifierHash> * errors, ErrorWords errType, std::vector<uint16_t> & v16data){
-  std::set<IdentifierHash>::iterator step(errors->begin());
-  const std::set<IdentifierHash>::iterator end(errors->end());
-  for (;step != end;++step){
-    IdentifierHash linkHash(*step);
-    uint32_t errRobId(m_cabling->getRobIdFromHash(linkHash));
+void SCT_RodEncoder::addHeadersWithErrors(const uint32_t robid, const std::set<IdentifierHash>* errors, ErrorWords errType, std::vector<uint16_t>& v16data) {
+  std::set<IdentifierHash>::iterator step{errors->begin()};
+  const std::set<IdentifierHash>::iterator end{errors->end()};
+  for (;step != end; ++step) {
+    IdentifierHash linkHash{*step};
+    uint32_t errRobId{m_cabling->getRobIdFromHash(linkHash)};
     if (errRobId == robid) {
-      uint16_t header = getHeaderUsingHash(linkHash,errType);
+      uint16_t header{getHeaderUsingHash(linkHash, errType)};
       v16data.push_back(header);
-      uint16_t trailer = getTrailer(NULL_TRAILER_ERR);
+      uint16_t trailer{getTrailer(NULL_TRAILER_ERR)};
       v16data.push_back(trailer);
     }
   }
 } 
 
 //
-void SCT_RodEncoder::addTrailersWithErrors(const uint32_t robid, const std::set<IdentifierHash> * errors, ErrorWords errType, std::vector<uint16_t> & v16data){
-  std::set<IdentifierHash>::iterator step(errors->begin());
-  const std::set<IdentifierHash>::iterator end(errors->end());
-  for (;step != end;++step){
-    IdentifierHash linkHash(*step);
-    uint32_t errRobId(m_cabling->getRobIdFromHash(linkHash));
+void SCT_RodEncoder::addTrailersWithErrors(const uint32_t robid, const std::set<IdentifierHash>* errors, ErrorWords errType, std::vector<uint16_t>& v16data) {
+  std::set<IdentifierHash>::iterator step{errors->begin()};
+  const std::set<IdentifierHash>::iterator end{errors->end()};
+  for (;step != end; ++step) {
+    IdentifierHash linkHash{*step};
+    uint32_t errRobId{m_cabling->getRobIdFromHash(linkHash)};
     if (errRobId == robid) {
-      uint16_t header = getHeaderUsingHash(linkHash,NULL_HEADER_ERR);
-      uint16_t trailer = getTrailer(errType);
+      uint16_t header{getHeaderUsingHash(linkHash, NULL_HEADER_ERR)};
+      uint16_t trailer{getTrailer(errType)};
       v16data.push_back(header);
       v16data.push_back(trailer);
     }
   }
 }
 
-void SCT_RodEncoder::addSpecificErrors(const uint32_t robid, const std::set<IdentifierHash> * errors, ErrorWords errType, std::vector<uint16_t> & v16data){
-  std::set<IdentifierHash>::iterator step(errors->begin());
-  const std::set<IdentifierHash>::iterator end(errors->end());
-  for (;step != end;++step){
+void SCT_RodEncoder::addSpecificErrors(const uint32_t robid, const std::set<IdentifierHash>* errors, ErrorWords errType, std::vector<uint16_t>& v16data) {
+  std::set<IdentifierHash>::iterator step{errors->begin()};
+  const std::set<IdentifierHash>::iterator end{errors->end()};
+  for (;step != end; ++step) {
     IdentifierHash linkHash(*step);
-    uint32_t errRobId(m_cabling->getRobIdFromHash(linkHash));
+    uint32_t errRobId{m_cabling->getRobIdFromHash(linkHash)};
     if (errRobId == robid) {
-      uint16_t header = getHeaderUsingHash(linkHash,NULL_HEADER_ERR);
-      uint16_t trailer = getTrailer(NULL_TRAILER_ERR);
+      uint16_t header{getHeaderUsingHash(linkHash, NULL_HEADER_ERR)};
+      uint16_t trailer{getTrailer(NULL_TRAILER_ERR)};
       v16data.push_back(header);
       v16data.push_back(errType);
       v16data.push_back(trailer);
@@ -305,42 +294,41 @@ void SCT_RodEncoder::encodeData(std::vector<int>& vtbin, std::vector<uint16_t>&
   /// Check if the strip has to be swapped (swap phi readout direction)
   ///-------------------------------------------------------------------------------------
   
-  int encodedSide    = side(rdo) << 14 ; 
-  int strip1  = strip2 ;
+  int encodedSide{side(rdo) << 14};
+  int strip1{strip2};
   
-  Identifier idColl = offlineId(rdo) ;
-  if(m_swapModuleId.find(idColl)!= m_swapModuleId.end() ) {
+  Identifier idColl{offlineId(rdo)};
+  if (m_swapModuleId.find(idColl)!= m_swapModuleId.end()) {
     strip1= 767 - strip1;
-    strip1= strip1-(gSize-1) ;
+    strip1= strip1-(gSize-1);
   }
   
-  int chipNb            = ((strip1/128) & 0x7)           << 11 ;
-  int clustBaseAddr     = ((strip1-(chipNb*128)) & 0x7F) << 4 ;
-  int theTimeBin              = 0 ;  
-  int firstHitErr       = 0 << 2  ;     
-  int secondHitErr      = 0 << 3  ;
+  int chipNb{((strip1/128) & 0x7) << 11};
+  int clustBaseAddr{((strip1-(chipNb*128)) & 0x7F) << 4};
+  int theTimeBin{0};
+  int firstHitErr{0 << 2};
+  int secondHitErr{0 << 3};
   
-  const SCT3_RawData* rdoCosmic = dynamic_cast<const SCT3_RawData*>(rdo);
+  const SCT3_RawData* rdoCosmic{dynamic_cast<const SCT3_RawData*>(rdo)};
   if (rdoCosmic != 0) {       
-    theTimeBin              = tbin(rdoCosmic) ;
-    firstHitErr       = ((rdoCosmic)->FirstHitError())    << 2  ;
-    secondHitErr      = ((rdoCosmic)->SecondHitError())   << 3  ;
+    theTimeBin = tbin(rdoCosmic);
+    firstHitErr = ((rdoCosmic)->FirstHitError()) << 2;
+    secondHitErr = ((rdoCosmic)->SecondHitError()) << 3;
   }
   
   ///-------------------------------------------------------------------------------------
   ///   Condensed
   ///-------------------------------------------------------------------------------------
-  if(m_condensed){/** single Hit on condensed Mode */
+  if (m_condensed) {/** single Hit on condensed Mode */
     
-    if(gSize == 1) {/** Group size = 1 */
-      uint16_t HitCondSingle = 0x8000 | encodedSide | chipNb | clustBaseAddr | firstHitErr;
+    if (gSize == 1) {/** Group size = 1 */
+      uint16_t HitCondSingle{static_cast<uint16_t>(0x8000 | encodedSide | chipNb | clustBaseAddr | firstHitErr)};
       v16.push_back(HitCondSingle);
       m_singleCondHitNumber++;
-    } 
-    else if(gSize == 2) {/** paired strip Hits on condensed Mode  */
-      uint16_t HitCondPaired = 0x8001 | encodedSide | chipNb | clustBaseAddr | secondHitErr | firstHitErr;
+    } else if (gSize == 2) {/** paired strip Hits on condensed Mode  */
+      uint16_t HitCondPaired{static_cast<uint16_t>(0x8001 | encodedSide | chipNb | clustBaseAddr | secondHitErr | firstHitErr)};
       v16.push_back(HitCondPaired);
-      m_pairedCondHitNumber++ ;
+      m_pairedCondHitNumber++;
     }    
   }  /// end of condensed
   
@@ -348,51 +336,51 @@ void SCT_RodEncoder::encodeData(std::vector<int>& vtbin, std::vector<uint16_t>&
   ///   Expanded
   ///-------------------------------------------------------------------------------------
   else{  
-    int nEven = (vtbin.size() - 1)/2 ;
+    int nEven{static_cast<int>((vtbin.size() - 1)/2)};
     /** First hit */
-    uint16_t HitExpFirst = 0x8000 | encodedSide | chipNb | clustBaseAddr | theTimeBin;
+    uint16_t HitExpFirst{static_cast<uint16_t>(0x8000 | encodedSide | chipNb | clustBaseAddr | theTimeBin)};
     v16.push_back(HitExpFirst);
-    m_firstExpHitNumber++ ;
+    m_firstExpHitNumber++;
     /** Even consecutive strips to the first one 1DDD 1st consec strip 1DDD 2nd consec strip */
-    for(int i=1; i<=nEven; i++) {
-      uint16_t HitExpEven = 0x8088 | ((vtbin[(2*i-1)] & 0xF) << 4) | (vtbin[2*i] & 0xF);
+    for (int i=1; i<=nEven; i++) {
+      uint16_t HitExpEven{static_cast<uint16_t>(0x8088 | ((vtbin[(2*i-1)] & 0xF) << 4) | (vtbin[2*i] & 0xF))};
       v16.push_back(HitExpEven); 
-      m_evenExpHitNumber++ ;
+      m_evenExpHitNumber++;
     }
     /** Last bin of the Odd next hits    */
-    if( (not vtbin.empty() ) and isEven(vtbin.size()) ) {
-      uint16_t HitExpLast = 0x8008 | (vtbin[vtbin.size()-1] & 0xF);
+    if ((not vtbin.empty() ) and isEven(vtbin.size())) {
+      uint16_t HitExpLast{static_cast<uint16_t>(0x8008 | (vtbin[vtbin.size()-1] & 0xF))};
       v16.push_back(HitExpLast);
-      m_lastExpHitNumber++ ;
+      m_lastExpHitNumber++;
     }  
 
   } /** end of  expanded */
   
-  return ;
+  return;
 }  /** end of encodeData */
 
 ///=========================================================================
 ///  Converting the 16 bit vector v16 to 32 bit words v32
 ///=========================================================================  
-void SCT_RodEncoder::packFragments( std::vector<uint16_t>& v16, std::vector<uint32_t>& v32) const { 
-  int n16words = v16.size() ;
-  if(isOdd(n16words)){
+void SCT_RodEncoder::packFragments(std::vector<uint16_t>& v16, std::vector<uint32_t>& v32) const {
+  int n16words{static_cast<int>(v16.size())};
+  if (isOdd(n16words)) {
     /** just add an additional 16bit words to make even size v16 to in the 32 bits word 0x40004000  */
     v16.push_back(0x4000); 
     n16words++;
   }
   /** now merge 2 consecutive 16 bit words in 32 bit words */
-  const unsigned short int nWords     = 2;
-  unsigned short int position[nWords] = { 0, 16 };
-  unsigned short int v16words[nWords] = { 0, 0 };
+  const unsigned short int nWords{2};
+  unsigned short int position[nWords]{0, 16};
+  unsigned short int v16words[nWords]{0,  0};
   for (int i=0; i<n16words; ) {
     v16words[i%nWords]     = v16[i+1];
     v16words[(i+1)%nWords] = v16[i];
-    uint32_t v32word       = set32bits(v16words,position,nWords);
+    uint32_t v32word{set32bits(v16words, position, nWords)};
     v32.push_back(v32word);
     i += nWords;
 #ifdef SCT_DEBUG
-    ATH_MSG_INFO("SCT encoder -> PackFragments: Output rod 0x"<<std::hex<<v32word<<std::dec) ;
+    ATH_MSG_INFO("SCT encoder -> PackFragments: Output rod 0x"<<std::hex<<v32word<<std::dec);
 #endif
   }
   
@@ -403,10 +391,11 @@ void SCT_RodEncoder::packFragments( std::vector<uint16_t>& v16, std::vector<uint
 ///  set the 16 bit word v16 to 32 bit words v32
 ///=========================================================================  
 
-uint32_t SCT_RodEncoder::set32bits(const unsigned short int * v16, const unsigned short int * pos, const unsigned short int n) const { 
-  uint32_t v32 = 0;
-  uint32_t p=0, v=0;
-  for(uint16_t i=0; i<n; i++){
+uint32_t SCT_RodEncoder::set32bits(const unsigned short int* v16, const unsigned short int* pos, const unsigned short int n) const { 
+  uint32_t v32{0};
+  uint32_t p{0};
+  uint32_t v{0};
+  for (uint16_t i{0}; i<n; i++) {
     v   = (uint32_t) (*(v16+i));
     p   = (uint32_t) (*(pos+i));
     v32 = v32 | ( v<<p );
@@ -418,47 +407,47 @@ uint32_t SCT_RodEncoder::set32bits(const unsigned short int * v16, const unsigne
 ///  Link and Side Numbers 
 ///=========================================================================
 /** Strip number  */ 
-int SCT_RodEncoder::strip(const RDO * rdo) {
-  Identifier rdoId     = rdo->identify() ;               
-  return m_sct_id->strip(rdoId) ;
+int SCT_RodEncoder::strip(const RDO* rdo) {
+  Identifier rdoId{rdo->identify()};
+  return m_sct_id->strip(rdoId);
 }
 
 /** RDO ID  */
-Identifier SCT_RodEncoder::offlineId(const RDO * rdo) {
-  Identifier rdoId     = rdo->identify() ;               
-  return m_sct_id->wafer_id(rdoId) ;
+Identifier SCT_RodEncoder::offlineId(const RDO* rdo) {
+  Identifier rdoId{rdo->identify()};
+  return m_sct_id->wafer_id(rdoId);
 }
 
 /** ROD online ID  */
-uint32_t  SCT_RodEncoder::onlineId(const RDO * rdo) {
-  Identifier rdoId     = rdo->identify() ;               
-  Identifier thisId = m_sct_id->wafer_id(rdoId) ; 
-  IdentifierHash offlineIdHash = m_sct_id->wafer_hash(thisId);
-  uint32_t thisOnlineId    = m_cabling->getOnlineIdFromHash(offlineIdHash) ;
-  return thisOnlineId ;
+uint32_t  SCT_RodEncoder::onlineId(const RDO* rdo) {
+  Identifier rdoId{rdo->identify()}; 
+  Identifier thisId{m_sct_id->wafer_id(rdoId)};
+  IdentifierHash offlineIdHash{m_sct_id->wafer_hash(thisId)};
+  uint32_t thisOnlineId{m_cabling->getOnlineIdFromHash(offlineIdHash)};
+  return thisOnlineId;
 }
 
 /** ROD Link Number In the ROD header data  */
-int  SCT_RodEncoder::rodLink(const RDO * rdo) {
+int  SCT_RodEncoder::rodLink(const RDO* rdo) {
   return rodLinkFromOnlineId(onlineId(rdo));
 }
 
 /** Side Info */
-int  SCT_RodEncoder::side(const RDO * rdo) {
-  Identifier rdoId      = rdo->identify() ;    
-  int s              = m_sct_id->side(rdoId) ;
+int  SCT_RodEncoder::side(const RDO* rdo) {
+  Identifier rdoId{rdo->identify()};
+  int s{m_sct_id->side(rdoId)};
   /** see if we need to swap sides due to cabling weirdness */
-  int linknb = rodLink(rdo) & 0xF;
+  int linknb{rodLink(rdo) & 0xF};
   if (swappedCable(s,linknb)) s = 1-s;
-  return s ;
+  return s;
 }
 
 /** Time Bin Info */
-int  SCT_RodEncoder::tbin(const RDO * rdo) {
-  int theTimeBin = 0 ;
-  const SCT3_RawData* rdoCosmic = dynamic_cast<const SCT3_RawData*>(rdo) ;
-  if (rdoCosmic != 0) theTimeBin = rdoCosmic->getTimeBin() ;
-  return theTimeBin ;
+int  SCT_RodEncoder::tbin(const RDO* rdo) {
+  int theTimeBin{0};
+  const SCT3_RawData* rdoCosmic{dynamic_cast<const SCT3_RawData*>(rdo)};
+  if (rdoCosmic != 0) theTimeBin = rdoCosmic->getTimeBin();
+  return theTimeBin;
 }
 
 ///-------------------------------------------------------------------------------------
@@ -467,14 +456,9 @@ int  SCT_RodEncoder::tbin(const RDO * rdo) {
 
 uint16_t 
 SCT_RodEncoder::getHeaderUsingRDO(const RDO* rdo) {
-  //Identifier rdoId     = rdo->identify() ;               
-  //Identifier thisId = m_sct_id->wafer_id(rdoId) ; 
-  //IdentifierHash offlineIdHash = m_sct_id->wafer_hash(thisId);
-  int rodlink = rodLink(rdo);
-  uint16_t LinkHeader = 0x2000 
-    | (m_condensed << 8) 
-    |  rodlink  ;
-  m_headerNumber++ ;
+  int rodlink{rodLink(rdo)};
+  uint16_t LinkHeader{static_cast<uint16_t>(0x2000 | (m_condensed << 8) | rodlink)};
+  m_headerNumber++;
   return LinkHeader;
 }
 
@@ -483,16 +467,15 @@ SCT_RodEncoder::getHeaderUsingRDO(const RDO* rdo) {
 ///-------------------------------------------------------------------------------------
 uint16_t 
 SCT_RodEncoder::getTrailer(int errorword) {
-  uint16_t LinkTrailer = 0x4000 | errorword;
-  m_trailerNumber++ ;
+  uint16_t LinkTrailer{static_cast<uint16_t>(0x4000 | errorword)};
+  m_trailerNumber++;
   return LinkTrailer;
 }
 
 uint16_t 
 SCT_RodEncoder::getHeaderUsingHash(IdentifierHash linkHash, int errorWord) {
-  int rodlink = rodLinkFromOnlineId(m_cabling->getOnlineIdFromHash(linkHash));
-  uint16_t LinkHeader = 0x2000 | errorWord | (m_condensed << 8) |  rodlink  ;
-  m_headerNumber++ ;
+  int rodlink{rodLinkFromOnlineId(m_cabling->getOnlineIdFromHash(linkHash))};
+  uint16_t LinkHeader{static_cast<uint16_t>(0x2000 | errorWord | (m_condensed << 8) | rodlink)};
+  m_headerNumber++;
   return LinkHeader;
 }
-
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.h b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.h
old mode 100755
new mode 100644
index 23160c58da81ab0874fddfc70e04f7a12f4dc890..ef01f8f842740fb53547688e091b4d3b904aea8a
--- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.h
+++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCT_RodEncoder.h
@@ -50,7 +50,7 @@ class SCT_RodEncoder : virtual public ISCT_RodEncoder, virtual public AthAlgTool
  public:
  
   typedef SCT_RDORawData RDO ;
-  typedef std::vector<const RDO*> vRDOs ;
+  typedef std::vector<const RDO*> vRDOs_t;
   typedef SCT_RDO_Container SCTRawContainer ;
   
   /** constructor  */
@@ -67,40 +67,40 @@ class SCT_RodEncoder : virtual public ISCT_RodEncoder, virtual public AthAlgTool
   virtual StatusCode finalize();
 
   /// convert all collections of RDO's in the current  list to vector of 32bit words   
-  virtual void fillROD(std::vector<uint32_t>& v, uint32_t robid, vRDOs& rdoVec) ;
+  virtual void fillROD(std::vector<uint32_t>& v, uint32_t robid, vRDOs_t& rdoVec);
 
   /// Encode rdo into the data: called by fillROD(..) 
   void encodeData(std::vector<int>& vtbin, std::vector<uint16_t>& v16, const RDO *rdo, int gSize, int strip);
   
   /// pack 32 bit word:  called by  encodeData(..) 
-  void packFragments(std::vector<uint16_t>& v16, std::vector<uint32_t>& v32) const ;
+  void packFragments(std::vector<uint16_t>& v16, std::vector<uint32_t>& v32) const;
 
   /// from 16 bits array to 32 bit array   
-  uint32_t set32bits(const unsigned short int * v16, const unsigned short int * pos, const unsigned short int n) const;
+  uint32_t set32bits(const unsigned short int* v16, const unsigned short int* pos, const unsigned short int n) const;
 
   /// Get the side info from the RDO 
-  int side(const RDO * rdo) ;
+  int side(const RDO* rdo);
   
-  /// Get the time bin info from the RDO 
-  int tbin(const RDO * rdo);
+  /// Get the time bin info from the RDO
+  int tbin(const RDO* rdo);
 
   /// Get the group size info from the RDO 
-  int groupSize(const RDO * rdo) {return rdo->getGroupSize(); }
+  int groupSize(const RDO* rdo) { return rdo->getGroupSize(); }
   
   /// Get the strip number info from the RDO  
-  int strip(const RDO * rdo) ;
+  int strip(const RDO* rdo);
  
   /// Get the offline Identifirer from the RDO  
-  Identifier offlineId(const RDO * rdo) ;
+  Identifier offlineId(const RDO* rdo);
 
   /// Get the online id from the RDO  
-  uint32_t onlineId(const RDO * rdo) ;
+  uint32_t onlineId(const RDO* rdo);
 
   /// Get the ROD link info from the RDO 
-  int rodLink(const RDO * rdo) ;
+  int rodLink(const RDO* rdo);
 
   /// fill vector with module with inverted phi readout direction between offline and online position 
-  void addSwapModuleId (Identifier IdColl) { m_swapModuleId.insert(IdColl) ;} 
+  void addSwapModuleId (Identifier IdColl) { m_swapModuleId.insert(IdColl); } 
 
   /// Get the 16-bit word for a header for a hit 
   uint16_t getHeaderUsingRDO(const RDO* rdo);
@@ -112,31 +112,36 @@ class SCT_RodEncoder : virtual public ISCT_RodEncoder, virtual public AthAlgTool
   uint16_t getTrailer(int);
 
  private:
-  enum ErrorWords{ TIMEOUT_ERR=(1<<11), L1_ERR=(1<<10), BCID_ERR=(1<<9), 
-		   PREAMBLE_ERR=(1<<12), FORMATTER_ERR=12,
-		   TRAILER_ERR=(1<<12), NULL_HEADER_ERR=0, 
-		   HEADER_TRAILER_ERR=(1<<11), TRAILER_OVFLW_ERR=(1<<10), 
-		   ABCD_ERR=0, RAWDATA_ERR=(3<<13),
-		   NULL_TRAILER_ERR=0  }; 
+  enum ErrorWords{TIMEOUT_ERR=(1<<11),
+		  L1_ERR=(1<<10),
+		  BCID_ERR=(1<<9),
+		  PREAMBLE_ERR=(1<<12),
+		  FORMATTER_ERR=12,
+		  TRAILER_ERR=(1<<12),
+		  NULL_HEADER_ERR=0,
+		  HEADER_TRAILER_ERR=(1<<11),
+		  TRAILER_OVFLW_ERR=(1<<10),
+		  ABCD_ERR=0,
+		  RAWDATA_ERR=(3<<13),
+		  NULL_TRAILER_ERR=0}; 
   void addHeadersWithErrors(const uint32_t robid, const std::set<IdentifierHash>* errors, 
-			    ErrorWords errType, std::vector<uint16_t> & v16data);
+			    ErrorWords errType, std::vector<uint16_t>& v16data);
   void addTrailersWithErrors(const uint32_t robid, const std::set<IdentifierHash>* errors, 
-			     ErrorWords errType, std::vector<uint16_t> & v16data);
+			     ErrorWords errType, std::vector<uint16_t>& v16data);
   void addSpecificErrors(const uint32_t robid, const std::set<IdentifierHash>* errors, 
-			 ErrorWords errType, std::vector<uint16_t> & v16data);
-  ServiceHandle<ISCT_CablingSvc> m_cabling ;
-  ServiceHandle<ISCT_ByteStreamErrorsSvc> m_bsErrs ;
-  const SCT_ID * m_sct_id ;
-  bool m_condensed ;
-  std::set<Identifier> m_swapModuleId ;
-  unsigned int  m_singleCondHitNumber ;
-  unsigned int  m_pairedCondHitNumber ;
-  unsigned int  m_firstExpHitNumber ;
-  unsigned int  m_evenExpHitNumber ;
-  unsigned int  m_lastExpHitNumber ;
-  unsigned int  m_headerNumber ;  
-  unsigned int  m_trailerNumber ;
-}; 
-
-#endif
-
+			 ErrorWords errType, std::vector<uint16_t>& v16data);
+  ServiceHandle<ISCT_CablingSvc> m_cabling;
+  ServiceHandle<ISCT_ByteStreamErrorsSvc> m_bsErrs;
+  const SCT_ID* m_sct_id;
+  bool m_condensed;
+  std::set<Identifier> m_swapModuleId;
+  unsigned int m_singleCondHitNumber;
+  unsigned int m_pairedCondHitNumber;
+  unsigned int m_firstExpHitNumber;
+  unsigned int m_evenExpHitNumber;
+  unsigned int m_lastExpHitNumber;
+  unsigned int m_headerNumber;
+  unsigned int m_trailerNumber;
+};
+
+#endif // SCT_RAWDATABYTESTREAM_SCT_RODENCODER_H
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/components/SCT_RawDataByteStreamCnv_entries.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/components/SCT_RawDataByteStreamCnv_entries.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/components/SCT_RawDataByteStreamCnv_load.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/components/SCT_RawDataByteStreamCnv_load.cxx
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/doc/packagedoc.h b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/doc/packagedoc.h
index 4afe00bb4a45f34ebe74d83728b69a3febc35b4d..e91adb2fd8ccee39c7ab84dd1859a1895799fc83 100644
--- a/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/doc/packagedoc.h
+++ b/InnerDetector/InDetEventCnv/TRT_RawDataByteStreamCnv/doc/packagedoc.h
@@ -29,7 +29,6 @@ The writing of the Byte Stream makes use of the old Byte Stream converter infras
 
  - TRT_RodEncoder: the tool that encodes the RDOs of one ROD block.
 
-@section TRT_RawDataByteStreamCnv_TRT_RawDataByteStreamCnvReq Requirements file
 
 
 */
diff --git a/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/ReadInDet_jobOptions.py b/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/ReadInDet_jobOptions.py
index f1bc3e56f032ef30b831ecd4cc5226f6d1b6f3ce..25b8e5703f8932c9baf2bd5cdc6998c237329406 100755
--- a/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/ReadInDet_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/ReadInDet_jobOptions.py
@@ -169,9 +169,7 @@ InDetFlags.doTrkNtuple        = False
 InDetFlags.doPixelTrkNtuple   = False
 InDetFlags.doSctTrkNtuple     = False
 InDetFlags.doTrtTrkNtuple     = False
-InDetFlags.doPixelClusterNtuple = False
 InDetFlags.doSctClusterNtuple   = False
-InDetFlags.doTrtDriftCircleNtuple = False
 InDetFlags.doVtxNtuple        = False
 InDetFlags.doConvVtxNtuple    = False
 InDetFlags.doV0VtxNtuple      = False
diff --git a/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptions.py b/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptions.py
index b1641022cf52ae52ecd75d71bea528aa91eeacda..593d580cfb265c5588938a54bd839601552009b8 100644
--- a/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptions.py
+++ b/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptions.py
@@ -172,9 +172,7 @@ InDetFlags.doMonitoringAlignment = True
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptionsESD.py b/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptionsESD.py
index 87a809110d42a7152e0b307a153d9cf02a9f16bd..7cf33321e9b2e29890cade8ca0ce3e165e5cfef0 100755
--- a/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptionsESD.py
+++ b/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptionsESD.py
@@ -173,9 +173,7 @@ InDetFlags.doPixelClusterSplitting = False
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptionsRAW.py b/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptionsRAW.py
index 5c2b20f3c4e67282a3fecee734855e9abf59a6a7..d56cfda2273f333bdff11e53360a4cc3a2a261fb 100755
--- a/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptionsRAW.py
+++ b/InnerDetector/InDetExample/InDetAlignExample/ErrorScaling/jobOptionsRAW.py
@@ -200,9 +200,7 @@ InDetFlags.doPRDFormation = True
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetAlignExample/doc/packagedoc.h b/InnerDetector/InDetExample/InDetAlignExample/doc/packagedoc.h
index a0c85cd0242072edad73971ae0d32800b9d45f36..6304a9de671a6388158318e57d91fd75c03f74ee 100644
--- a/InnerDetector/InDetExample/InDetAlignExample/doc/packagedoc.h
+++ b/InnerDetector/InDetExample/InDetAlignExample/doc/packagedoc.h
@@ -102,7 +102,6 @@ See ReadDBS.py and WriteDBS.py.
 
 The standalone job options should run out of the box.
 
-@section InDetAlignExample_InDetAlignExampleReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_DBMRel17.py b/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_DBMRel17.py
index 63b253b11b4d33e41b82aa9c44f4a4320852cfcc..604b86ce28ed4657b2b488f38af5c4baea5d849d 100644
--- a/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_DBMRel17.py
+++ b/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_DBMRel17.py
@@ -225,9 +225,7 @@ InDetFlags.doMonitoringAlignment = False
 #InDetFlags.doPixelTrkNtuple = loadInDetRec_Options["doTrkNtuple"]
 #InDetFlags.doSctTrkNtuple   = loadInDetRec_Options["doTrkNtuple"]
 #InDetFlags.doTrtTrkNtuple   = loadInDetRec_Options["doTrkNtuple"]
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_Run2Rel17.py b/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_Run2Rel17.py
index 582db965065182a8af79acee1656fcc18142c299..7678a6527f2dfb39f661182d21d137e39f31b53e 100644
--- a/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_Run2Rel17.py
+++ b/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_Run2Rel17.py
@@ -271,9 +271,7 @@ InDetFlags.doTrkNtuple.set_Value_and_Lock( False )
 InDetFlags.doPixelTrkNtuple = loadInDetRec_Options["doTrkNtuple"]
 InDetFlags.doSctTrkNtuple   = loadInDetRec_Options["doTrkNtuple"]
 InDetFlags.doTrtTrkNtuple   = loadInDetRec_Options["doTrkNtuple"]
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
@@ -295,8 +293,6 @@ if (hasattr(InDetFlags,"doPixelClusterSplitting")) :
 from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags
 TrkDetFlags.MaterialDatabaseLocal =False
 
-InDetFlags.doPixelClusterNtuple = False
-
 # For Rel17 we need pre and post include
 #--------------------------------------------------------------
 # configure IBL reco
diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_Run2Rel19.py b/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_Run2Rel19.py
index 2098028b05d9bda892041e20dba650f72e4092b8..85968df463914723ceeec8a9f5b38a0b3bf36596 100644
--- a/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_Run2Rel19.py
+++ b/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_Run2Rel19.py
@@ -284,9 +284,7 @@ InDetFlags.doTrkNtuple.set_Value_and_Lock( False )
 InDetFlags.doPixelTrkNtuple = loadInDetRec_Options["doTrkNtuple"]
 InDetFlags.doSctTrkNtuple   = loadInDetRec_Options["doTrkNtuple"]
 InDetFlags.doTrtTrkNtuple   = loadInDetRec_Options["doTrkNtuple"]
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
@@ -304,9 +302,6 @@ InDetFlags.doTrackSegmentsTRT   = False
 #  InDetFlags.doPixelClusterSplitting=False
 #conddb.addOverride("/PIXEL/PixelClustering/PixelClusNNCalib","PixClusNNCalib-IBL3D25-00-00-02")
 InDetFlags.doPixelClusterSplitting.set_Value_and_Lock(False);
-InDetFlags.doPixelClusterNtuple = False
-
-
 
 
 # IMPORTANT NOTE: initialization of the flags and locking them is done in InDetRec_jobOptions.py!
diff --git a/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_newDBM.py b/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_newDBM.py
index 7aecc8e52e8451bcd363b819ee1a8026f719efdd..07932892dbf5c51194f951269380b693da713786 100644
--- a/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_newDBM.py
+++ b/InnerDetector/InDetExample/InDetAlignExample/share/loadInDetRec_newDBM.py
@@ -233,9 +233,7 @@ InDetFlags.doMonitoringAlignment = False
 #InDetFlags.doPixelTrkNtuple = loadInDetRec_Options["doTrkNtuple"]
 #InDetFlags.doSctTrkNtuple   = loadInDetRec_Options["doTrkNtuple"]
 #InDetFlags.doTrtTrkNtuple   = loadInDetRec_Options["doTrkNtuple"]
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
@@ -264,8 +262,6 @@ TrkDetFlags.MaterialDatabaseLocal =False
 
 include("InDetRecExample/InDetRec_all.py")
 
-#InDetFlags.doPixelClusterNtuple = False
-
 # My change
 #--------------------------------------------------------------
 # configure IBL reco
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/beamspotman.py b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/beamspotman.py
index 8b972b33acda64c8b35cc7ac4f39b71c5deaa744..99f47a3cfa40267dec6645d59bd49fb5cf1f368c 100755
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/beamspotman.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/beamspotman.py
@@ -4,7 +4,7 @@
 """
 beamspotman is a command line utility to do typical beam spot related tasks.
 """
-__author__  = 'Juerg Beringer'
+__authors__  = ['Juerg Beringer', 'Carl Suster']
 __version__ = 'beamspotman.py atlas/athena'
 __usage__   = '''%prog [options] command [args ...]
 
@@ -23,10 +23,10 @@ upload DBFILE                           Upload SQLite file into COOL (independen
 upload DSNAME TASKNAME                  Upload result of beam spot determination into COOL
 dq2get DSNAME TASKNAME                  Retrieve task data from grid job (must have set up grid env.)
 queryT0 DSNAME TASKNAME                 Query Tier-0 database about a task
-backup DIR                              Backup directory DIR (may contain wildcards) to castor
-archive DSNAME TASKNAME                 Archive task data (deletes files after copying to castor,
+backup DIR                              Backup directory DIR (may contain wildcards) to EOS
+archive DSNAME TASKNAME                 Archive task data (deletes files after copying to EOS,
                                         sets on-disk status to ARCHIVED)
-lsbackup                                List contents of backup directory on castor
+lsbackup                                List contents of backup directory on EOS
 reproc TEMPLATE DSNAME TASKNAME INPUTDIR Run reprocessing task consisting of several jobs split into 5 LBs
                                         over the files in INPUTDIR
 runaod TEMPLATE DSNAME TASKNAME INPUTDIR Run over AOD, splitting jobs into sets of N LBs (similar
@@ -54,22 +54,22 @@ prodcoolpasswdfile = '/private/coolinfo.dat'
 proddqcoolpasswdfile = '/private/cooldqinfo.dat'
 tier0dbinfofile = '/private/t0dbinfo.dat'
 beamspottag = ''
-#castorbackuppath = '/castor/cern.ch/atlas/atlascerngroupdisk/phys-beamspot/jobs/backup'
-#castorarchivepath = '/castor/cern.ch/atlas/atlascerngroupdisk/phys-beamspot/jobs/archive'
-castorbackuppath = '/eos/atlas/atlascerngroupdisk/phys-beamspot/jobs/backup'
-castorarchivepath = '/eos/atlas/atlascerngroupdisk/phys-beamspot/jobs/archive'
+backuppath = '/eos/atlas/atlascerngroupdisk/phys-beamspot/jobs/backup'
+archivepath = '/eos/atlas/atlascerngroupdisk/phys-beamspot/jobs/archive'
 
 import sys, os, stat,commands
 import re
+import subprocess
 import time
+from copy import copy
+
 from InDetBeamSpotExample.TaskManager import *
 from InDetBeamSpotExample.PostProcessing import doPostProcessing
 from InDetBeamSpotExample import BeamSpotPostProcessing
 from InDetBeamSpotExample import COOLUtils
 from InDetBeamSpotExample import DiskUtils
 
-from copy import copy
-from optparse import Option,OptionParser
+from optparse import Option, OptionParser, OptionGroup
 def check_commsep(option, opt, value):
     return re.split('\s*,\s*|\s+', value)
 class BeamSpotOption(Option):
@@ -78,12 +78,29 @@ class BeamSpotOption(Option):
     TYPE_CHECKER['commsep'] = check_commsep
 
 parser = OptionParser(usage=__usage__, version=__version__, option_class=BeamSpotOption)
+
+g_input = OptionGroup(parser, 'Input file options')
+g_input.add_option('', '--eos', dest='eos', default=False, action='store_true', help='access files over EOS (not needed if /eos is mounted)')
+g_input.add_option('-e', '--eospath', dest='eospath', default='/eos/atlas/atlastier0/rucio', help='eos path (excluding project and stream name)')
+g_input.add_option('-p', '--project', dest='project', default='data17_13TeV', help='project name')
+g_input.add_option('-s', '--stream', dest='stream', default='calibration_BeamSpot', help='stream name')
+g_input.add_option('-f', '--filter', dest='filter', default='.*\.AOD\..*', help='regular expression to filter input files')
+g_input.add_option('', '--lbfilemap', dest='lbfilemap', default='', help='text file with mapping between filename and lumi blocks')
+g_input.add_option('', '--rucio', dest='rucio', action='store_true', default=False, help='rucio directory structure')
+g_input.add_option('', '--dpdinput', dest='dpdinput', action='store_true', default=False, help='Run over DPD for runaod')
+g_input.add_option('-l', '--filelist', dest='filelist', default=None, help='Explicit list of files for reproc command')
+g_input.add_option('', '--removedups', dest='removedups', action='store_true', default=False, help='Remove duplicate retry files of form root.N, keeping the latest')
+parser.add_option_group(g_input)
+
+g_mode = OptionGroup(parser, 'Mode flags')
+g_mode.add_option('-b', '--batch', dest='batch', action='store_true', default=False, help='batch mode - never ask for confirmation')
+g_mode.add_option('', '--test', dest='testonly', action='store_true', default=False, help='for runaod, show only options and input files')
+g_mode.add_option('', '--expertmode', dest='expertmode', action='store_true', default=False, help='expert mode (BE VERY CAREFUL)')
+g_mode.add_option('', '--ignoremode', dest='ignoremode', default='', help='ignore update protection mode (needs expert pwd)')
+parser.add_option_group(g_mode)
+
+# Other options:
 parser.add_option('-t', '--beamspottag', dest='beamspottag', default=beamspottag, help='beam spot tag')
-parser.add_option('-c', '--castorpath', dest='castorpath', default='/castor/cern.ch/grid/atlas/tzero/prod1/perm', help='castor path (excluding project and stream name)')
-parser.add_option('-e', '--eospath', dest='eospath', default='/eos/atlas/atlastier0/rucio', help='eos path (excluding project and stream name)')
-parser.add_option('-p', '--project', dest='project', default='data16_13TeV', help='project name')
-parser.add_option('-s', '--stream', dest='stream', default='calibration_BeamSpot', help='stream name')
-parser.add_option('-f', '--filter', dest='filter', default='.*\.AOD\..*', help='regular expression to filter input files')
 parser.add_option('-d', '--dbconn', dest='dbconn', default='', help='task manager database connection string (default: check TASKDB, otherwise use sqlite_file:taskdata.db)')
 parser.add_option('', '--proddir', dest='proddir', default=proddir, help='production directory (default: %s' % proddir)
 parser.add_option('', '--destdbname', dest='destdbname', default='CONDBR2', help='destination database instance name (default: CONDBR2)')
@@ -96,15 +113,11 @@ parser.add_option('', '--bcidjoboptions', dest='bcidjoboptions', default='InDetB
 parser.add_option('', '--montaskname', dest='montaskname', default='MON', help='task name')
 parser.add_option('', '--bcidtaskname', dest='bcidtaskname', default='BCID', help='BCID task name')
 parser.add_option('-g', '--griduser', dest='griduser', default='user10.JuergBeringer', help='grid user name prefix (e.g. user10.JuergBeringer)')
-parser.add_option('-b', '--batch', dest='batch', action='store_true', default=False, help='batch mode - never ask for confirmation')
 parser.add_option('-n', '--nowildcards', dest='nowildcards', action='store_true', default=False, help='do not add wildcards when looking up dataset and task names')
 parser.add_option('-x', '--excludeiftask', dest='excludeiftask', default='', help='Exclude running cmd with runCmd if such task exists already')
 parser.add_option('', '--excludeds', dest='excludeds', default='', help='Exclude running cmd with runCmd for dataset containing a certain string')
-parser.add_option('', '--expertmode', dest='expertmode', action='store_true', default=False, help='expert mode (BE VERY CAREFUL)')
-parser.add_option('', '--ignoremode', dest='ignoremode', default='', help='ignore update protection mode (needs expert pwd)')
 parser.add_option('', '--archive', dest='archive', action='store_true', default=False, help='archive, ie delete data after backup')
 parser.add_option('', '--incremental', dest='incremental', action='store_true', default=False, help='incremental backup')
-parser.add_option('', '--lbfilemap', dest='lbfilemap', default='', help='text file with mapping between filename and lumi blocks')
 parser.add_option('', '--lbperjob', dest='lbperjob', type='int', default=5, help='number of luminosity blocks per job (default: 5)')
 parser.add_option('', '--params', dest='params', default='', help='job option parameters to pass to job option template')
 parser.add_option('-z', '--postprocsteps', dest='postprocsteps', type='commsep', default=['JobPostProcessing'], help='Task-level postprocessing steps, comma-separated (Default: JobPostProcessing)')
@@ -114,16 +127,11 @@ parser.add_option('', '--destdqdbname', dest='destdqdbname', default='CONDBR2',
 parser.add_option('', '--srcdqdbname', dest='srcdqdbname', default='IDBSDQ', help='DQ source database instance name (default: IDBSDQT)')
 parser.add_option('', '--dslist', dest='dslist', default='', help='Exclude running cmd with runCmd if the dataset is not in this file')
 parser.add_option('', '--nominbias', dest='nominbias', action='store_true', default=False, help='overwrite MinBias_physics in DSNAME with express_express')
-parser.add_option('', '--test', dest='testonly', action='store_true', default=False, help='for runaod, show only options and input files')
 parser.add_option('', '--resultsondisk', dest='resultsondisk', action='store_true', default=False, help='Leave the results on disk when archiving')
-parser.add_option('', '--removedups', dest='removedups', action='store_true', default=False, help='Remove duplicate rerty files of form root.N, keeping the last, for reporc command')
-parser.add_option('', '--dpdinput', dest='dpdinput', action='store_true', default=False, help='Run over DPD for runaod')
 parser.add_option('', '--pLbFile', dest='pseudoLbFile', default=None, help='File for pseudo LB info from scan')
-parser.add_option('-l', '--filelist', dest='filelist', default=None, help='Explicit list of files for reproc command')
 parser.add_option('', '--prefix', dest='prefix', default='', help='Prefix for reading files from mass storage (Default: determine from filename (`\'\') ')
 parser.add_option('', '--rl', dest='runMin', type='int', default=None, help='Minimum run number for mctag (inclusive)')
 parser.add_option('', '--ru', dest='runMax', type='int', default=None, help='Maximum run number for mctag (inclusive)')
-parser.add_option('', '--rucio', dest='rucio', action='store_true', default=False, help='rucio directory structure')
 parser.add_option('', '--noCheckAcqFlag', dest='noCheckAcqFlag', action='store_true', default=False, help='Don\'t check acqFlag when submitting VdM jobs')
 parser.add_option('', '--mon', dest='mon', action='store_true', default=False, help='mon directory structure')
 parser.add_option('', '--resubAll', dest='resubAll', action='store_true', default=False, help='Resubmit all jobs irrespective of status')
@@ -150,18 +158,6 @@ else:
 #
 # Utilities
 #
-def getFullEosPath(run):
-    eosPath = '/'.join([options.eospath,options.project,options.stream])
-    return os.path.normpath('/'.join([eosPath,'%08i' % int(run)])) + '/'
-
-def getFullCastorPath(run):
-    """Return full castor path given a run number."""
-    if run>240000:
-        return getFullEosPath(run)
-    castorPath = '/'.join([options.castorpath,options.project,options.stream])
-    return os.path.normpath('/'.join([castorPath,'%08i' % int(run)])) + '/'   # Run numbers are now 8 digits in castor paths
-    #return '/'.join([castorPath,'%07i' % int(run)])   # For now, run numbers are 7 digits in castor paths
-
 def getT0DbConnection():
     try:
         connstring = open(os.environ.get('HOME')+tier0dbinfofile,'r').read().strip()
@@ -195,9 +191,41 @@ def getTaskManager():
 
 def fail(message):
     print
-    print 'ERROR:' % message
+    print 'ERROR:', message
     sys.exit(1)
 
+def dataset_from_run_and_tag(run, tag):
+    ''' Given a run number and tag, check input dataset and work out name. '''
+    fs = DiskUtils.FileSet.from_ds_info(run,
+            project=options.project,
+            stream=options.stream,
+            base=options.eospath)
+    datasets = list(fs
+            .strict_mode()
+            .use_files_from(options.filelist)
+            .matching(options.filter + tag + '.*')
+            .excluding(r'.*\.TMP\.log.*')
+            .only_single_dataset())
+    dataset = os.path.dirname(datasets[0])
+    dsname = '.'.join(os.path.basename(datasets[0]).split('.')[:3])
+    return (dataset, dsname)
+
+def run_jobs(script, ds_name, task_name, params, *args):
+    ''' Invoke runJobs.py '''
+    arg_list = ['runJobs']
+    arg_list.extend(map(str, args))
+    if params:
+        param_args = []
+        for k,v in params.items():
+            param_args.append("{}={}".format(k,repr(v)))
+        arg_list.extend(['--params', ', '.join(param_args)])
+    if options.testonly:
+        arg_list.append('--test')
+    arg_list.extend([script, ds_name, task_name])
+
+    print subprocess.list2cmdline(arg_list)
+    subprocess.check_call(arg_list)
+
 
 #
 # Upload any SQLite file to COOL (independent of task, w/o book keeping)
@@ -233,28 +261,23 @@ if cmd == 'upload' and len(cmdargs) == 1:
     if stat: fail("UPLOADING TO COOL FAILED - PLEASE CHECK CAREFULLY!")
     sys.exit(0)
 
-
 #
 # Run beam spot reconstruction jobs
 #
 if cmd=='run' and len(args)==3:
     run = args[1]
     tag = args[2]
-    c = getFullCastorPath(run)
-    datasets = []
-    pattern = re.compile(options.filter+tag+'.*')
-    for p in DiskUtils.filelist(c):
-        f = p.split('/')[-1]
-        if pattern.search(f):
-            datasets.append(f)
-    if len(datasets)!=1:
-        print 'ERROR: %i datasets found - use TAG to uniquely identify dataset' % len(datasets)
-        sys.exit(1)
-
-    dsname = '.'.join(datasets[0].split('.')[:3])
-    #os.system('runJobs.py -n0 -c %s %s %s.%s %s' % (options.runjoboptions,dsname,options.runtaskname,tag,'/'.join([c,datasets[0]])))
-    #os.system('runJobs.py -n0 -c -p "LumiRange=2" %s %s %s.%s %s' % (options.runjoboptions,dsname,options.runtaskname+'-LR2',tag,'/'.join([c,datasets[0]])))
-    os.system('runJobs.py -n0 -c -f \'%s\' -p "LumiRange=5" %s %s %s.%s %s' % (options.filter,options.runjoboptions,dsname,options.runtaskname+'-LR5',tag,'/'.join([c,datasets[0]])))
+    dataset, dsname = dataset_from_run_and_tag(run, tag)
+
+    run_jobs(options.runjoboptions, dsname,
+            '{}-LR5.{}'.format(options.runtaskname, tag),
+            {
+                'LumiRange' : 5,
+                },
+            '--files-per-job', 0,
+            '--match', options.filter,
+            '--exclude', r'.*\.TMP\.log.*',
+            '--directory', dataset)
     sys.exit(0)
 
 
@@ -265,54 +288,62 @@ if cmd=='runMon' and len(args)==3:
     run = args[1]
     tag = args[2]
 
-    datasets = []
-    c=''
-    if options.filelist == None:
-        c = getFullCastorPath(run)
-
-        pattern = re.compile(options.filter+tag+'.*')
-        for p in DiskUtils.filelist(c):
-            f = p.split('/')[-1]
-            if pattern.search(f) and ('.TMP.log' not in f):
-                datasets.append(f)
-        if len(datasets)!=1:
-            print 'ERROR: %i datasets found (if ambiguous, use full TAG to uniquely identify dataset)' % len(datasets)
-            sys.exit(1)
-        dsname = '.'.join(datasets[0].split('.')[:3])
-    else:
-        if options.eospath=='':
-          datasets.append(options.filelist.rstrip())
-        else :
-          datasets.append('root://eosatlas/' + options.filelist.rstrip() )
-        dsname=options.project+'.'+run+'.'+options.stream
-
     if not options.beamspottag:
-        sys.exit('ERROR: No beam spot tag specified')
+        fail('No beam spot tag specified')
+
+    dataset, dsname = dataset_from_run_and_tag(run, tag)
+
     # NOTE: The command below may be executed via a cron job, so we need set STAGE_SVCCLASS
     #       explicitly in all cases, since it may not be inherited from the environment.
     if 'ESD' in options.filter:
         # NOTE: We pass along the filter setting, but currently we can do --lbperjob only for ESD since for
         #       other data sets we have only the merged files.
-        os.system('runJobs.py --lbperjob 10 -c -f \'%s\' -p "cmdjobpreprocessing=\'export STAGE_SVCCLASS=atlcal\', useBeamSpot=True, beamspottag=\'%s\'" %s %s %s.%s %s/' % (options.filter,options.beamspottag,options.monjoboptions,dsname,options.montaskname,tag,'/'.join([c,datasets[0]])))
+        run_jobs(options.monjoboptions, dsname,
+                '{}.{}'.format(options.montaskname, tag),
+                {
+                    'cmdjobpreprocessing' : 'export STAGE_SVCCLASS=atlcal',
+                    'useBeamSpot' : True,
+                    'beamspottag' : options.beamspottag,
+                    },
+                '--lbperjob', 10,
+                '--match', options.filter,
+                '--exclude', r'.*\.TMP\.log.*',
+                '--directory', dataset)
     elif options.filelist != None:
-        lbinfoinfiles=True
-        for line in open(options.filelist,'r'):
-            if "lb" not in line: 
-                lbinfoinfiles=False
+        lbinfoinfiles = True
+        for line in open(options.filelist, 'r'):
+            if "lb" not in line:
+                lbinfoinfiles = False
                 break
-        lboptions='--lbperjob 10' if lbinfoinfiles else '-n 10'
-        cmd = 'runJobs.py %s -f \'%s\' -q atlasb1_long -p "useBeamSpot=True, beamspottag=\'%s\', tracksAlreadyOnBeamLine=True" %s %s %s.%s %s' % (lboptions,options.filter,options.beamspottag,options.monjoboptions,dsname,options.montaskname,tag,datasets[0])
-        print cmd
-        os.system(cmd)
+        lboptions='--lbperjob=10' if lbinfoinfiles else '--files-per-job=10'
+        run_jobs(options.monjoboptions, dsname, '{}.{}'.format(options.montaskname, tag),
+                {
+                    'tracksAlreadyOnBeamLine' : True,
+                    'useBeamSpot' : True,
+                    'beamspottag' : options.beamspottag,
+                    },
+                lboptions,
+                '--match', options.filter,
+                '--exclude', r'.*\.TMP\.log.*',
+                '--directory', dataset,
+                '--queue', 'atlasb1_long')
     else:
-        cmd = 'runJobs.py --lbperjob 10 -c -f \'%s\' -p "cmdjobpreprocessing=\'export STAGE_SVCCLASS=atlcal\', useBeamSpot=True, beamspottag=\'%s\'" %s %s %s.%s %s/' % (options.filter,options.beamspottag,options.monjoboptions,dsname,options.montaskname,tag,'/'.join([c,datasets[0]]))
-        os.system(cmd)
+        run_jobs(options.monjoboptions, dsname, '{}.{}'.format(options.montaskname, tag),
+                {
+                    'cmdjobpreprocessing' : 'export STAGE_SVCCLASS=atlcal',
+                    'useBeamSpot' : True,
+                    'beamspottag' : options.beamspottag,
+                    },
+                '--lbperjob', 10,
+                '--match', options.filter,
+                '--exclude', r'.*\.TMP\.log.*',
+                '--directory', dataset)
 
     sys.exit(0)
 
 
 #
-# Backup to castor
+# Backup to EOS
 #
 if cmd=='backup' and len(args)==2:
     if options.archive and options.incremental:
@@ -351,26 +382,26 @@ if cmd=='backup' and len(args)==2:
         tmpdir = '/tmp'
         if options.archive:
             outname = d.replace('/','-')+time.strftime('-%G_%m_%d.tar.gz')
-            backuppath = castorarchivepath
+            path = archivepath
         else:
             outname = d.replace('/','-')+'.tar.gz'
-            backuppath = castorbackuppath
+            path = backuppath
 
-        print '\nBacking up  %s  -->  %s/%s ...\n' % (d,backuppath,outname)
+        print '\nBacking up  %s  -->  %s/%s ...\n' % (d,path,outname)
 
         status = os.system('tar czf %s/%s %s' % (tmpdir,outname,d)) >> 8
         if status:
             sys.exit('\nERROR: Unable to create local tar file %s/%s' % (tmpdir,outname))
 
-        status = os.system('xrdcp -f %s/%s root://eosatlas/%s/%s' % (tmpdir,outname,backuppath,outname)) >> 8
+        status = os.system('xrdcp -f %s/%s root://eosatlas/%s/%s' % (tmpdir,outname,path,outname)) >> 8
 
         if status:
-            # Continue to try other files if one failed to upload to castor
-            print '\nERROR: Unable to copy file to CASTOR to %s/%s' % (backuppath,outname)            
+            # Continue to try other files if one failed to upload to EOS
+            print '\nERROR: Unable to copy file to EOS to %s/%s' % (path,outname)
             continue
 
         os.system('rm %s/%s' % (tmpdir,outname))
-        status = os.system('echo "`date`   %s/%s" >> %s/backup.log' % (backuppath,outname,d)) >> 8
+        status = os.system('echo "`date`   %s/%s" >> %s/backup.log' % (path,outname,d)) >> 8
         if status:
             sys.exit('\nERROR: Could not update backup log file')
 
@@ -380,16 +411,12 @@ if cmd=='backup' and len(args)==2:
 
 
 #
-# List backup directory on castor
+# List backup directory on EOS
 #
 if cmd == 'lsbackup' and not cmdargs:
-    backuppath = castorarchivepath if options.archive else castorbackuppath
-    backuppath = os.path.normpath(backuppath)+'/'
-    print '\nCASTOR directory %s:\n' % backuppath
-    #os.system('nsls -l %s' % backuppath)
-    #os.system('xrd castoratlas ls %s' % backuppath)
-    print DiskUtils.ls(backuppath, longls=True)
-    print
+    path = archivepath if options.archive else backuppath
+    print 'Backup directory:', path
+    for f in DiskUtils.from_directory(path): print f
     sys.exit(0)
 
 
@@ -399,21 +426,18 @@ if cmd == 'lsbackup' and not cmdargs:
 if cmd == 'show' and len(cmdargs)==1:
     run = cmdargs[0]
 
-    c = getFullCastorPath(run)
+    print 'Base path:     ', options.eospath
+    print 'Project tag:   ', options.project
+    print 'Stream:        ', options.stream
     print
-    print 'CASTOR base path:   ', options.castorpath
-    print 'Project tag:        ', options.project
-    print 'Stream:             ', options.stream
-    print 'Full path:          ', c
-    print
-    print 'Files in CASTOR (filtered by: %s):' % options.filter
+    print 'Files available (filtered by: {}):'.format(options.filter)
     print '---------------'
 
-    pattern = re.compile(options.filter)
-    for f in DiskUtils.ls(c, longls=True).split('\n'):
-        if pattern.search(f):
-            (access,nfiles,user,group,size,modmonth,modyear,modtime,name) = f.split()
-            print '%-80s   %s file(s), last modified %s %s %s' % (name,nfiles,modmonth,modyear,modtime)
+    fs = DiskUtils.FileSet.from_ds_info(run,
+            project=options.project,
+            stream=options.stream,
+            base=options.eospath)
+    for f in fs.matching(options.filter): print f
 
     print
     print 'Beam spot tasks:'
@@ -824,8 +848,8 @@ if cmd=='runMonJobs' and len(args)<3:
             if int(runnr)<240000:
                 print '   ',r
             print '... Submitting monitoring task'
-            cmd = 'beamspotman.py --eospath=%s -p %s -s %s -f \'.*\\.%s\\..*\' -t %s --montaskname %s runMon %i %s' % (eospath,ptag,stream,filter,bstag,'MON.'+taskName,int(runnr),datatag)
-            print '    %s' % cmd
+            cmd = 'beamspotman --eospath=%s -p %s -s %s -f \'.*\\.%s\\..*\' -t %s --montaskname %s runMon %i %s' % (eospath,ptag,stream,filter,bstag,monTaskName,int(runnr),datatag)
+            print cmd
             sys.stdout.flush()
             status = os.system(cmd) >> 8   # Convert to standard Unix exit code
             if status:
@@ -836,12 +860,12 @@ if cmd=='runMonJobs' and len(args)<3:
 
 
 #
-# Archive task to castor
+# Archive task to EOS
 #
 if cmd=='archive' and len(args)==3:
     if not options.batch:
         print '\nWARNING: If you confirm below, each of the following datasets will:'
-        print '         - be archived to CASTOR'
+        print '         - be archived to EOS'
         if options.resultsondisk:
             print '         - will be marked as RESULTSONDISK in the task database'
             print '         - all except the results files *** WILL BE DELETED ***'
@@ -858,7 +882,7 @@ if cmd=='archive' and len(args)==3:
             sys.exit(1)
 
         tmpdir = '/tmp'
-        backuppath = castorarchivepath
+        path = archivepath
         onDiskCode = TaskManager.OnDiskCodes.get('ALLONDISK',None)
         archivedCode = TaskManager.OnDiskCodes.get('RESULTSONDISK',None) if options.resultsondisk else TaskManager.OnDiskCodes.get('ARCHIVED',None)
         exceptList = ['*dqflags.txt', '*.gif', '*.pdf', '*.config.py*', '*.argdict.gpickle', '*.AveBeamSpot.log', '*.PlotBeamSpotCompareReproc.log', '*.sh', '*.BeamSpotNt.*', '*.BeamSpotGlobalNt.log', '*.status.*', '*.exit.*']
@@ -875,21 +899,21 @@ if cmd=='archive' and len(args)==3:
             dir = '%s/%s' % (dsname,taskname)
             outname = dir.replace('/','-')+time.strftime('-%G_%m_%d.tar.gz')
             print 'Archiving task %s / %s ...' % (dsname,taskname)
-            print '    --> %s/%s ...' % (backuppath,outname)
+            print '    --> %s/%s ...' % (path,outname)
 
             # Paranoia check against later catastrophic delete
             if dir=='.' or dir=='*':
                 print '\n**** FATAL ERROR: Very dangerous value of task directory found: %s - ABORTING' % dir
                 sys.exit(1)
 
-            # If expected directory exists, tar up files, write to CASTOR, mark as archived, and delete
+            # If expected directory exists, tar up files, write to EOS, mark as archived, and delete
             if os.path.exists(dir):
                 status = os.system('tar czf %s/%s %s' % (tmpdir,outname,dir)) >> 8
                 if status:
                     sys.exit('\n**** ERROR: Unable to create local tar file %s/%s' % (tmpdir,outname))
-                status = os.system('xrdcp %s/%s root://eosatlas/%s/%s' % (tmpdir,outname,backuppath,outname)) >> 8
+                status = os.system('xrdcp %s/%s root://eosatlas/%s/%s' % (tmpdir,outname,path,outname)) >> 8
                 if status:
-                    sys.exit('\n**** ERROR: Unable to copy file to CASTOR to %s/%s' % (backuppath,outname))
+                    sys.exit('\n**** ERROR: Unable to copy file to EOS to %s/%s' % (path,outname))
 
                 os.system('rm %s/%s' % (tmpdir,outname))
                 n = taskman.setValue(dsname,taskname,'ONDISK',archivedCode)
@@ -989,7 +1013,7 @@ if cmd=='resubmit' and len(args) in [3,4]:
 # Run beam spot reprocessing jobs
 # Defines one task with several jobs where the splitting into groups of 5 LBs is done by hand
 #
-if cmd=='reproc' and len(args)==5: 
+if cmd=='reproc' and len(args)==5:
     from InDetBeamSpotExample import LSFJobRunner
 
     jobopts   = args[1]
@@ -1000,7 +1024,6 @@ if cmd=='reproc' and len(args)==5:
     lbperjob  = options.lbperjob
     params    = {'LumiRange': lbperjob}
     cmd       = ' '.join(sys.argv)
-    pattern   = re.compile(options.filter)
     files     = []
 
     # Additional job parameters
@@ -1012,79 +1035,22 @@ if cmd=='reproc' and len(args)==5:
             except:
                 print '\nERROR parsing user parameter',p,'- parameter will be ignored'
 
-    # Make list of all files (either from explicit list or by 'globbing' dir)
-    if options.filelist:
-        inputdata = os.path.normpath(inputdata)
-
-        protocol=''
-        if options.prefix:
-            protocol = options.prefix
-        elif inputdata.split('/')[1]=='castor':
-            protocol = 'root://castoratlas/'
-        elif inputdata.split('/')[1]=='eos':
-            protocol = 'root://eosatlas/'
-
-        flist = open(options.filelist)
-        files = sorted(['%s%s/%s' % (protocol,inputdata,f.strip('\n')) for f in flist if pattern.search(f)])
-
-        if options.rucio:
-            # Has extra subdirectories: find unique set of these from filepaths, ignoring final part (i.e. filename).
-            # Will also work for single directory but more time consuming.
-            #inputdirs = set(['/'+'/'.join(f.split('/')[4:-1])+'/' for f in files])
-            inputdirs = set(['/'.join(f.replace(protocol, '').split('/')[:-1])+'/' for f in files])
-        else:
-            inputdirs = [inputdata]
-    else:
-        if os.path.isfile(inputdata):
-          # read in the file names from the text file
-          for line in open(inputdata,'r'):
-             files.append('root://eosatlas/'+line.rstrip())
-
-        elif inputdata.split('/')[1] in ('castor', 'eos'):
-            inputdata = os.path.normpath(inputdata)+'/'
-            castorfiles = DiskUtils.filelist(inputdata, prefix=options.prefix if options.prefix else True)
-            for f in castorfiles:
-                if pattern.search(f):
-                    files.append(f)
-        else:
-            files = sorted(glob.glob(inputdata+'/'+options.filter))
-
-    # Check if files, matching pattern, exist
-    if not files: sys.exit('No files existing in directory %s matching "%s"' % (inputdata, options.filter))
+    # TODO: Is this still needed?
+    # if options.rucio:
+    #     # Has extra subdirectories: find unique set of these from filepaths, ignoring final part (i.e. filename).
+    #     # Will also work for single directory but more time consuming.
+    #     #inputdirs = set(['/'+'/'.join(f.split('/')[4:-1])+'/' for f in files])
+    #     inputdirs = set(['/'.join(f.replace(protocol, '').split('/')[:-1])+'/' for f in files])
 
-    # Remove duplicate with different retry number, keeping latest    
-    if options.removedups:
-        nWithDup = len(files)
-        fileAndExt = {}
-        for f in files:
-            tokens = f.split('.')
-            fname  = '.'.join(tokens[:-1])
-            ext    = tokens[-1]
-            try:
-                fileAndExt[fname].append(ext)
-            except KeyError:
-                fileAndExt[fname] = [ext]
-
-        files = []
-        for fname,ext in fileAndExt.items():
-            files.append(fname+'.'+ext[-1])
-
-        print 'Removed ', (nWithDup - len(files)), 'duplicates'
-
-    # Get file-LB mapping
+    # Make list of all files (either from explicit list or by 'globbing' dir)
     lbMap = {}
-    if options.lbfilemap:
-        lbfilemap = open(options.lbfilemap, 'r')
-
-        for line in lbfilemap:
-            fname = line.split(' ')[0]
-            lbs   = [int(l) for l in line.split(' ')[1].split(',')]
-
-            lbMap[fname] = lbs
-    else:
-        from InDetBeamSpotExample.ExtractLBFileMap import extract,extractFromFiles
-        #lbMap = extract(inputdirs, options.filter, prefix=options.prefix if options.prefix else True)
-        lbMap = extractFromFiles( files )
+    backend = DiskUtils.EOS() if options.eos else None
+    fs = DiskUtils.FileSet.from_input(inputdata, backend=backend)
+    fs = fs.matching(options.filter).use_files_from(options.filelist).only_latest(options.removedups)
+    for f, lbs in file_set.with_lumi_blocks(options.lbfilemap):
+        lbMap[f] = lbs
+        files.append(f)
+    if not files: fail('No files were found.')
 
     # Form bunched jobs
     jobFileDict = {}
@@ -1166,192 +1132,11 @@ if cmd=='reproc' and len(args)==5:
     sys.exit(0)
 
 
-#
-# Run beam spot reprocessing jobs
-# Defines one task with several jobs where the splitting into groups of 5 LBs is done by hand
-#
-if cmd=='reproc' and len(args)==5:
-    from InDetBeamSpotExample import LSFJobRunner
-
-    jobopts   = args[1]
-    dsname    = args[2]
-    taskname  = args[3]
-    inputdata = args[4]
-
-    lbperjob  = options.lbperjob
-    params    = {'LumiRange': lbperjob}
-    cmd       = ' '.join(sys.argv)
-    pattern   = re.compile(options.filter)
-    files     = []
-
-    # Additional job parameters
-    for s in options.params.split(', '):
-        if s:
-            try:
-                p = s.split('=',1)
-                params[p[0].strip()] = eval(p[1].strip())
-            except:
-                print '\nERROR parsing user parameter',p,'- parameter will be ignored'
-
-    # Make list of all files (either from explicit list or by 'globbing' dir)
-    if options.filelist:
-        inputdata = os.path.normpath(inputdata)
-
-        protocol=''
-        if options.prefix:
-            protocol = options.prefix
-        elif inputdata.split('/')[1]=='castor':
-            protocol = 'root://castoratlas/'
-        elif inputdata.split('/')[1]=='eos':
-            protocol = 'root://eosatlas/'
-
-        flist = open(options.filelist)
-        files = sorted(['%s%s/%s' % (protocol,inputdata,f.strip('\n')) for f in flist if pattern.search(f)])
-
-        if options.rucio:
-            # Has extra subdirectories: find unique set of these from filepaths, ignoring final part (i.e. filename).
-            # Will also work for single directory but more time consuming.
-            #inputdirs = set(['/'+'/'.join(f.split('/')[4:-1])+'/' for f in files])
-            inputdirs = set(['/'.join(f.replace(protocol, '').split('/')[:-1])+'/' for f in files])
-        else:
-            inputdirs = [inputdata]
-    else:
-        if os.path.isfile(inputdata):
-          # read in the file names from the text file
-          for line in open(inputdata,'r'):
-             files.append('root://eosatlas/'+line.rstrip())
-
-        elif inputdata.split('/')[1] in ('castor', 'eos'):
-            inputdata = os.path.normpath(inputdata)+'/'
-            castorfiles = DiskUtils.filelist(inputdata, prefix=options.prefix if options.prefix else True)
-            for f in castorfiles:
-                if pattern.search(f):
-                    files.append(f)
-        else:
-            files = sorted(glob.glob(inputdata+'/'+options.filter))
-
-    # Check if files, matching pattern, exist
-    if not files: sys.exit('No files existing in directory %s matching "%s"' % (inputdata, options.filter))
-
-    # Remove duplicate with different retry number, keeping latest    
-    if options.removedups:
-        nWithDup = len(files)
-        fileAndExt = {}
-        for f in files:
-            tokens = f.split('.')
-            fname  = '.'.join(tokens[:-1])
-            ext    = tokens[-1]
-            try:
-                fileAndExt[fname].append(ext)
-            except KeyError:
-                fileAndExt[fname] = [ext]
-
-        files = []
-        for fname,ext in fileAndExt.items():
-            files.append(fname+'.'+ext[-1])
-
-        print 'Removed ', (nWithDup - len(files)), 'duplicates'
-
-    # Get file-LB mapping
-    lbMap = {}
-    if options.lbfilemap:
-        lbfilemap = open(options.lbfilemap, 'r')
-
-        for line in lbfilemap:
-            fname = line.split(' ')[0]
-            lbs   = [int(l) for l in line.split(' ')[1].split(',')]
-
-            lbMap[fname] = lbs
-    else:
-        from InDetBeamSpotExample.ExtractLBFileMap import extract,extractFromFiles
-        #lbMap = extract(inputdirs, options.filter, prefix=options.prefix if options.prefix else True)
-        lbMap = extractFromFiles( files )
-
-    # Form bunched jobs
-    jobFileDict = {}
-    jobLBDict   = {}
-
-    # Special case to submit a single job over all files
-    if lbperjob == -1:
-        jobId = 1
-        jobFileDict[jobId] = files
-        jobLBDict[jobId] = []
-
-        for f in files:
-            try:
-                lbs = sorted(lbMap[f.split('/')[-1]])
-            except KeyError:
-                sys.exit('No mapping for file %s' % f.split('/')[-1])
-
-            jobLBDict[jobId].extend(lbs)
-    else:
-        for f in files:
-            try:
-                lbs = sorted(lbMap[f.split('/')[-1]])
-            except KeyError:
-                sys.exit('No mapping for file %s' % f.split('/')[-1])
-
-            for lbnr in lbs:
-                jobId = int((lbnr-1)/lbperjob)
-
-                if not jobId in jobFileDict:
-                    jobFileDict[jobId] = [f]
-                    jobLBDict[jobId]   = [lbnr]
-                else:
-                    if not f in jobFileDict[jobId]:
-                        jobFileDict[jobId].append(f)
-                    jobLBDict[jobId].append(lbnr)
-
-    # Submit bunched jobs
-    with getTaskManager() as taskman:
-        for i in  sorted(jobFileDict.keys()):
-            jobnr = i*lbperjob+1  # use first LB number as job number
-            files=jobFileDict[i]
-            lbs = sorted(set(jobLBDict[i]))
-
-            #params['lbList'] = '[' + ','.join([str(l) for l in lbs]) + ']'
-            intlbs = []
-            for lbnr in lbs:
-                intlbs.append(int(lbnr))
-            params['lbList'] = intlbs
-            jobname=dsname+'-'+taskname+'-lb%03i' % jobnr
-
-            queue = options.batch_queue or '2nd'
-            runner = LSFJobRunner.LSFJobRunner(
-                    jobnr=jobnr,
-                    jobdir=os.getcwd()+'/'+dsname+'/'+taskname+'/'+jobname,
-                    jobname=jobname,
-                    inputds='',
-                    inputfiles=files,
-                    joboptionpath=jobopts,
-                    filesperjob=len(files),
-                    batchqueue=queue,
-                    addinputtopoolcatalog=True,
-                    taskpostprocsteps='ReprocVertexDefaultProcessing',
-                    #outputfilelist=['dpd.root', 'nt.root', 'monitoring,root', 'beamspot.db'],
-                    autoconfparams='DetDescrVersion',
-                    returnstatuscode=True,
-                    comment=cmd,
-                    **params)
-
-            #runner.showParams()
-            try:
-                runner.configure()
-            except Exception,e:
-                print "ERROR: Unable to configure JobRunner job - perhaps same job was already configured / run before?"
-                print "DEBUG: Exception =",e
-            else:
-                taskman.addTask(dsname, taskname, jobopts, runner.getParam('release'), runner.getNJobs(), runner.getParam('taskpostprocsteps'), comment=cmd)
-                runner.run()
-
-    sys.exit(0)
-
 #
 # Run task over AOD, bunching input files to jobs according to meta-data in input
 # AOD files.
 #
 
-
 if cmd=='runaod' and len(args)==5:
     from InDetBeamSpotExample import LSFJobRunner
 
@@ -1368,7 +1153,6 @@ if cmd=='runaod' and len(args)==5:
         params    = {'LumiRange': 1}
 
     cmd       = ' '.join(sys.argv)
-    pattern   = re.compile(options.filter)
     files     = []
 
     # Additional job parameters
@@ -1380,46 +1164,14 @@ if cmd=='runaod' and len(args)==5:
             except:
                 print '\nERROR parsing user parameter',p,'- parameter will be ignored'
 
-    # Make list of all files
-    # first, is this a directory?  probably.
-    if os.path.isdir(inputdata) or "castor" in inputdata or "eos" in inputdata:
-        if inputdata.split('/')[1] in ('castor', 'eos'):
-            inputdata = os.path.normpath(inputdata)+'/'
-            #files=[]
-            castorfiles = DiskUtils.filelist(inputdata, options.prefix if options.prefix else True)
-            for f in castorfiles:
-                if pattern.search(f):
-                    files.append(f)
-        elif options.dpdinput:
-            files = sorted(glob.glob(inputdata+'/*/*-dpd.root*'))
-        else:
-            files = sorted(glob.glob(inputdata+'/*'+options.filter+'*'))
-    elif os.path.isfile(inputdata):
-        # read in the file names from the text file
-        for line in open(inputdata,'r'):
-          if line.split('/')[1] == 'castor':
-            files.append('root://castoratlas/'+line.rstrip())
-          else:
-            files.append('root://eosatlas/'+line.rstrip())
-
-    # Check if files, matching pattern, exist
-    if not files: sys.exit('No files existing in directory %s matching "%s"' % (inputdata, options.filter))
-
-    # Get file-LB mapping
     lbMap = {}
-    if options.lbfilemap:
-        lbfilemap = open(options.lbfilemap, 'r')
-
-        for line in lbfilemap:
-            fname = line.split(' ')[0]
-            lbs   = [int(l) for l in line.split(' ')[1].split(',')]
-            lbMap[fname] = lbs
-    else:
-        from InDetBeamSpotExample.ExtractLBFileMap import extract
-        if options.dpdinput:
-            lbMap = extract([inputdata], 'dpd')
-        else:
-            lbMap = extract([inputdata], options.filter, prefix=options.prefix if options.prefix else True)
+    backend = DiskUtils.EOS() if options.eos else None
+    fs = DiskUtils.FileSet.from_input(inputdata, backend=backend)
+    fs = fs.matching(options.filter)
+    for f, lbs in fs.with_lumi_blocks(options.lbfilemap):
+        lbMap[f] = lbs
+        files.append(f)
+    if not files: fail('No files were found.')
 
     # Form bunched jobs
     jobFileDict = {}
@@ -1455,7 +1207,7 @@ if cmd=='runaod' and len(args)==5:
                 filenames = []
                 for f in files:
                     try:
-                        lbs = sorted(lbMap[f.split('/')[-1]])
+                        lbs = sorted(lbMap[f])
                     except KeyError:
                         sys.exit('No mapping for file %s' % f.split('/')[-1])
 
@@ -1474,7 +1226,7 @@ if cmd=='runaod' and len(args)==5:
     else:
         for f in files:
             try:
-                lbs = sorted(lbMap[f.split('/')[-1]])
+                lbs = sorted(lbMap[f])
             except KeyError:
                 print 'WARNING: No mapping for file %s.  Skipping' % f.split('/')[-1]
                 continue
@@ -1647,28 +1399,23 @@ if cmd=='dqflag' and len(args)==3:
 if cmd=='runBCID' and len(args)==3:
     run = args[1]
     tag = args[2]
-    c = getFullCastorPath(run)
-    datasets = []
-    pattern = re.compile(options.filter+tag+'.*')
-    for p in DiskUtils.filelist(c):
-        f = p.split('/')[-1]
-        if pattern.search(f):
-            datasets.append(f)
-
-    if len(datasets)!=1:
-        print 'ERROR: %i datasets found (if ambiguous, use full TAG to uniquely identify dataset)' % len(datasets)
-        sys.exit(1)
-    dsname = '.'.join(datasets[0].split('.')[:3])
+
+    dataset, dsname = dataset_from_run_and_tag(run, tag)
+
     # NOTE: The command below may be executed via a cron job, so we need set STAGE_SVCCLASS
     #       explicitly in all cases, since it may not be inherited from the environment.
-    if 'ESD' in options.filter:
-        # For ESD, run over 10 LBs
-        # NOTE: We pass along the filter setting, but currently we can do --lbperjob only for ESD since for
-        #       other data sets we have only the merged files.
-        os.system('runJobs.py -c -n 0 -f \'%s\' -z \'BCIDDefaultProcessing\' -p "cmdjobpreprocessing=\'export STAGE_SVCCLASS=atlcal\', SeparateByBCID=True, VertexNtuple=False" %s %s %s.%s %s/' % (options.filter,options.bcidjoboptions,dsname,options.bcidtaskname,tag,'/'.join([c,datasets[0]])))
-    else:
-        # Non-ESD format (most likely merged AOD) - run over 2 files
-        os.system('runJobs.py -c -n 0 -f \'%s\' -z \'BCIDDefaultProcessing\' -p "cmdjobpreprocessing=\'export STAGE_SVCCLASS=atlcal\', SeparateByBCID=True, VertexNtuple=False" %s %s %s.%s %s/' % (options.filter,options.bcidjoboptions,dsname,options.bcidtaskname,tag,'/'.join([c,datasets[0]])))
+    # NOTE: We pass along the filter setting, but currently we can do --lbperjob only for ESD since for
+    #       other data sets we have only the merged files.
+    run_jobs(options.bcidjoboptions, dsname, options.bcidtaskname,
+            {
+                'cmdjobpreprocessing' : 'export STAGE_SVCCLASS=atlcal',
+                'SeparateByBCID' : True,
+                'VertexNtuple' : False,
+                },
+            '--files-per-job', 0,
+            '--match', options.filter,
+            '--exclude', r'.*\.TMP\.log.*',
+            '-postprocsteps', 'BCIDDefaultProcessing')
 
     sys.exit(0)
 
@@ -1792,5 +1539,5 @@ if cmd=='mctag' and len(args)<12:
     sys.exit(0)
 
 
-print 'ERROR: Illegal command or number of arguments'
+print 'ERROR: Illegal command or number of arguments ({})'.format(' '.join(args))
 sys.exit(1)
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/beamspotnt.py b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/beamspotnt.py
index f4fe75a62a38124bc8a35f35a20d081f538fe04f..2e543b59cc15c27eaeff8fadb42f46042a90b2d3 100755
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/beamspotnt.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/beamspotnt.py
@@ -142,6 +142,9 @@ parser.add_option('', '--scans', dest='scans', default='', help='comma-separated
 parser.add_option('', '--acqFlag', dest='acqFlag', default = False, action='store_true', help='Cut on AcquistionFlag=1.0 for stationary points of VdM scan')
 parser.add_option('', '--overlayScans', dest='overlayScans', default = False, action='store_true', help='overlay VdM scans on same plot')
 parser.add_option('', '--useAve', dest='useAve', action='store_true', default=False, help='Average over poor fits in the beamspot -- performed during merging step')
+parser.add_option('', '--database', dest='database', default='COOLOFL_INDET/CONDBR2', help='DB to read beamspot info from when -s BeamSpotCOOL is enabled and running merge')
+parser.add_option('', '--dbfolder', dest='dbfolder', default='/Indet/Beampos', help='Folder to read beamspot info from when -s BeamSpotCOOL is enabled and running merge')
+
 (options,args) = parser.parse_args()
 if len(args) < 1:
     parser.error('wrong number of command line arguments')
@@ -1162,7 +1165,12 @@ if cmd=='inspect' and len(args)==1:
 #
 if cmd=='merge' and len(args)==2:
     srcNtClass = locals()[options.srctype]
-    srcNt = srcNtClass(args[1],fullCorrelations=options.fullCorrelations)
+    if (options.srctype == 'BeamSpotCOOL'):
+      print '\n Reading in from database '
+      srcNt = srcNtClass(args[1],database=options.database,folder=options.dbfolder,fullCorrelations=options.fullCorrelations)
+    else :
+      srcNt = srcNtClass(args[1],fullCorrelations=options.fullCorrelations)
+
     setCuts(srcNt)
     print '\nImporting from '+srcNt.summary()
     print srcNt.cutSummary()
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/dumpLBFileMap.py b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/dumpLBFileMap.py
index d15237288293660d4d085f045865e961df1f67cf..e9aabfb4c90cf21883939060761ccacd8d23309e 100755
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/dumpLBFileMap.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/dumpLBFileMap.py
@@ -2,29 +2,29 @@
 
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import sys
-from optparse import OptionParser
-from InDetBeamSpotExample.ExtractLBFileMap import extract
-
-if __name__ == "__main__":
-
-    # Command line parsing
-    parser = OptionParser(usage="usage: %prog [options] dir")
-    parser.add_option( "-f", "--filter", dest = "filter",  default = 'AOD',  help = "The pattern to search for files in the directory" )
-    parser.add_option('', '--prefix', dest='prefix', default='', help='Prefix for reading files from mass storage (Default: determine from filename (`\'\') ')
-
-    (options, args) = parser.parse_args()
+""" Extracts a luminosity block map from a dataset.
 
-    # Check files provided
-    if not len(args): 
-        print 'No directory supplied'
-        sys.exit(1)
+This map lists filenames from the dataset alongside the luminosity block
+numbers contained in the file. It is time-consuming to read this information,
+so this LB map can be passed to beamspotman's --lbmap so that you only need to
+build the map once instead of for every time you submit jobs.
+"""
 
-    lbDict = extract(args, options.filter, prefix = options.prefix if options.prefix else True)
-
-    # Write to file ...
-    out = open('lbfilemap.txt', 'w')
-    for fname,lb in sorted(lbDict.items()):
-        out.write(fname + ' ' + ','.join([str(l) for l in lb]) + '\n')
-
-    out.close()
+import sys
+from optparse import OptionParser
+from InDetBeamSpotExample import DiskUtils
+
+# Command line parsing
+parser = OptionParser(usage="usage: %prog [options] INPUTDATA")
+parser.add_option('', "--eos", dest='eos', default=False,
+        help="Access files using EOS (not needed if using /eos fuse mount)")
+parser.add_option('-f', "--file", dest='map_file', default='dataset.lbmap',
+        help="Output path")
+(options, args) = parser.parse_args()
+
+if len(args) < 1:
+    sys.exit('No dataset supplied')
+
+backend = DiskUtils.EOS() if options.eos else DiskUtils.Local()
+file_set = DiskUtils.FileSet.from_input(args[0], backend=backend)
+DiskUtils.make_lumi_block_map_file(file_set, options.map_file)
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/makeDatasetOnDiskList b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/makeDatasetOnDiskList
index 0525878bdf4cccc7b8b0464cb083471136970ae5..ad227a24e4a04e78f08309514be654f841f4be0c 100755
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/makeDatasetOnDiskList
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/makeDatasetOnDiskList
@@ -1,155 +1,84 @@
+#!/bin/bash
+
 help() {
     echo "Usage: makeDatasetOnDiskList [options] pattern"
-    echo "Make a list of the datasets mathcing pattern having a complete replica on a particular token"
+    echo "Make a list of the datasets matching pattern having a complete replica on a particular token"
     echo "    OPTIONS:"
-    echo "         -h | --help       Print this help and exit"
-    echo "         -f | --file       Output filename (default: datasets.txt)"
-    echo "         -t | --token      Space token to query (default: CERN-PROD_TZERO)"
-    echo "         -l | --list       Make output list of correct fles"
-    echo "         -e | --eos        Use EOS rather than castor"
-    echo "         -r | --rucio      Use rucio directory format rather than dq2."    
+    echo "         -h, --help           Print this help and exit"
+    echo "         -d, --directory=DIR  Output directory (default: reprocfiles_$USER)"
+    echo "         -t, --token=RSE      Space token to query (default: CERN-PROD_TZERO)"
+    echo "         -m, --lb-map         Also build a map of lumi blocks in each file"
 }
 
 # Parse options
-OPTS=`getopt -o hclerf:t: -l help,container,list,eos,rucio,file:,token: -- "$@"`
-if [ $? != 0 ] ; then echo "Terminating..."; return -1 ; fi
+OPTS=$(getopt -o ht:d:m -l help,token:,directory:,lb-map -- "$@")
+if [[ $? != 0 ]] ; then echo "Terminating..."; return -1 ; fi
 eval set -- "$OPTS"
 
 fname="datasets.txt"
 fdir="reprocfiles_$USER"
-token="CERN-PROD_TZERO"
-container=0
-list=0
-type="castor"
+token="CERN-PROD_TZDISK"
+lbmap=0
 
 while true ; do
     case "$1" in
         -h|--help)         help; exit 0;;
-        -f|--file)         fname=$2;    shift 2;;
+        -d|--directory)    fdir=$2;     shift 2;;
         -t|--token)        token=$2;    shift 2;;
-	-c|--container)    container=1; shift;;
-	-l|--list)         list=1; shift;;
-	-e|--eos)          type="eos"; shift;;
-	-r|--rucio)        type="rucio"; shift;;
-	--)                shift ; break ;;
-        \?)                break ;
-        exit 1 ;;
+        -m|--lb-map)       lbmap=1;     shift;;
+        --)                shift ; break ;;
+        *)                 exit 1 ;;
     esac
 done
 
 # Arguments
-pattern=$1; shift
+pattern="$1"; shift
 
 echo "Looking for datasets matching pattern $pattern in $token ..."
 
 # Need to do this in a subshell to avoid grid stuff causing clashes
 (
-echo "Setting up grid environament"
-
-source /afs/cern.ch/project/gd/LCG-share/current/etc/profile.d/grid_env.sh
-source /afs/cern.ch/atlas/offline/external/GRID/ddm/DQ2Clients/setup.sh
-voms-proxy-init -voms atlas -valid 96:00
-
-[[ -f "$fname" ]] && cp $fname $fname.back
-rm $fname
-touch $fname
-
-if [[ ! -d "$fdir" ]]
-then 
-   mkdir $fdir 
-else
-   rm $fdir/*.files
-fi
-
-# Don't really need nloc/nds anymore as use full dsname not part.  Clean up.
-nloc=12
-nds=10
-
-if [[ $type == "eos" ]]
-then
-      nloc=10
-      nds=8
-fi
-
-if [[ $type == "rucio" ]]
-then
-      nloc=8
-fi
-
-if [[ $token == "CERN-PROD_TZERO" ]]
-then
-      nloc=14
-      nds=12
-
-      if [[ $type=="eos" ]]
-      then
-	  echo "EOS not yet implemented for CERN-PROD_TZERO"
-          exit 1
-      fi
-
-fi
-
-if [[ $container -eq 0 ]]
-then
-
-    for ds in $( dq2-list-dataset "$pattern" | grep -v '_sub')
-      do
-      replicas=$( dq2-list-dataset-replicas $ds | grep -v 'INCOMPLETE' )
-      [[ $replicas != *"$token"* ]] && continue
-      echo "--> Found complete replica of $ds at CERN"
-      
-      # Find location of first file
-      # For some reason this seems to give a python broken pipe error now
-      #location=$( dq2-ls -fp -L $token $ds | grep $type | head -n1 )
-
-      dq2-ls -fp -L $token $ds | grep $type > tmp.ds.txt
-      location=$(head -n1 tmp.ds.txt)
-
-      if [[ $list -eq 1 ]]; then
-	  if [[ $type=="rucio" ]]; then
-	      cat tmp.ds.txt | awk -F '/' '{print $(NF-2)"/"$(NF-1)"/"$NF}' | sort > $fdir/$ds.files
-	  else
-	      cat tmp.ds.txt | awk -F '/' '{print $NF}' | sort > $fdir/$ds.file
-	  fi
-      fi
-
-      rm tmp.ds.txt
-
-      # remove srm://srm-atlas.cern.ch and filename
-      #location=$( echo $location | cut -d '/' -f 4-12 ) # T1
-      #location=$( echo $location | cut -d '/' -f 4-14 ) # T0
-      ##location=$( echo $location | cut -d '/' -f 4-$nloc )
-      location=$( echo $location | cut -d '/' -f 4-$nloc )
-      location='/'$location'/'
-      echo "   $location"
-	     
-      #dsname=$( echo $location | cut -d '/' -f 10 ) #| cut -d '.' -f -3) # T1
-      #dsname=$( echo $location | cut -d '/' -f 12 ) #| cut -d '.' -f -3) # T0
-      ##dsname=$( echo $location | cut -d '/' -f $nds ) #| cut -d '.' -f -3)
-      ##run=$( echo $dsname | cut -d '.' -f 2 )
-      # dsname is now full name rather than first part
-      dsname=$(echo $ds) 
-      echo "   $dsname"  
-      
-      # Write locations to file
-      echo $dsname >> $fname
-    done
-
-else
-    
-    echo "Not yet implemented"
-    exit 1
-
-    for cont in $( dq2-list-dataset "$pattern" )
-    do
-      echo $cont
-      nds=$( dq2-list-dataset-replicas-container $cont | grep 'Total  datasets' | cut -d ':' -f 2 | tr -d ' ' )
-      echo $nds
-      ntoken=$( dq2-list-dataset-replicas-container $cont | grep $token )
-      echo $ntoken
-
-    done
-
+echo "Setting up grid environment"
+export ATLAS_LOCAL_ROOT_BASE="/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase"
+source "${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh" --quiet
+lsetup rucio
+if ! voms-proxy-info --exists; then
+  voms-proxy-init -voms atlas
 fi
 
+mkdir -p "$fdir"
+
+for ds in $(rucio list-dids "$pattern" --short --filter type=container); do
+  echo
+  replica="$(rucio list-dataset-replicas "$ds")";
+  if { echo "$replica" | grep "$token" > /dev/null; } then
+    echo "--> Found replica at CERN: $replica"
+  else
+    echo "$replica"
+    echo "Couldn't find replica on $token" >&2
+    continue
+  fi
+
+  name="$(echo $ds | awk -F ':' '{print $NF}')"
+  target="${fdir}/${name}.files"
+
+  # Parse rucio output to get the path on EOS:
+  # rucio list-file-replicas --rse $token $ds | grep $token  | awk -F '/' '{print "/"$(NF-2)"/"$(NF-1)"/"$NF}' > tmp.ds.txt
+  rucio list-file-replicas --rse $token $ds \
+    | grep $token \
+    | awk -F '/eos/atlas' '{print "/eos/atlas"$NF}' \
+    | grep AOD \
+    | awk  '{print $1}' \
+    > "$target"
+
+  echo
+  echo "Saved file list: $target"
+
+  if [[ $lbmap -eq 1 ]]; then
+    map="${fdir}/${name}.lbmap"
+    set -e
+    dumpLBFileMap --file="$map" "$target"
+    echo "Saved LB map: $map"
+  fi
+done
 )
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/makeDatasetOnDiskList2 b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/makeDatasetOnDiskList2
deleted file mode 100755
index 41f2fff08058404a2e3725874f76ddf0f7ed8515..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/makeDatasetOnDiskList2
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/bash
-
-help() {
-    echo "Usage: makeDatasetOnDiskList [options] pattern"
-    echo "Make a list of the datasets mathcing pattern having a complete replica on a particular token"
-    echo "    OPTIONS:"
-    echo "         -h | --help       Print this help and exit"
-    echo "         -f | --file       Output filename (default: datasets.txt)"
-    echo "         -t | --token      Space token to query (default: CERN-PROD_TZERO)"
-    echo "         -l | --list       Make output list of correct fles"
-}
-
-# Parse options
-OPTS=`getopt -o hclerf:t: -l help,container,list,eos,rucio,file:,token: -- "$@"`
-if [ $? != 0 ] ; then echo "Terminating..."; return -1 ; fi
-eval set -- "$OPTS"
-
-fname="datasets.txt"
-fdir="reprocfiles_$USER"
-token="CERN-PROD_TZDISK"
-container=0
-list=0
-type="eos"
-
-while true ; do
-    case "$1" in
-        -h|--help)         help; exit 0;;
-        -f|--file)         fname=$2;    shift 2;;
-        -t|--token)        token=$2;    shift 2;;
-        -c|--container)    container=1; shift;;
-        -l|--list)         list=1; shift;;
-        --)                shift ; break ;;
-        \?)                break ;
-        exit 1 ;;
-    esac
-done
-
-# Arguments
-pattern=$1; shift
-
-echo "Looking for datasets matching pattern $pattern in $token ..."
-
-# Need to do this in a subshell to avoid grid stuff causing clashes
-(
-echo "Setting up grid environament"
-
-
-export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
-source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh
-lsetup rucio
-voms-proxy-init -voms atlas -valid 96:00
-
-[[ -f "$fname" ]] && cp $fname $fname.back
-rm $fname
-touch $fname
-
-
-echo $fdir
-if [[ -d "$fdir" ]]
-then
-   rm $fdir/*.files
-else
-   mkdir $fdir 
-fi
-
-
-if [[ $container -eq 0 ]]
-then
-
-    for ds in $( rucio list-dids "$pattern" | grep AOD | awk '{print $2}') 
-      do
-			echo "$ds"
-      replicas=$( rucio list-dataset-replicas $ds | grep $token | awk -F  '|' '{print $(NF-1) == $(NF-2)}' ) 
-			[[ $replicas != '1' ]] && continue
-      echo "--> Found complete replica of $ds at CERN"
-      
-      # Find location of first file
-
-      #rucio list-file-replicas --rse $token  $ds  | grep $token  | awk -F '/' '{print "/"$(NF-2)"/"$(NF-1)"/"$NF}' > tmp.ds.txt
-      rucio list-file-replicas --rse $token  $ds  | grep $token  | awk -F '/eos/atlas' '{print "/eos/atlas"$NF}' | grep AOD |awk  '{print $1}' > tmp.ds.txt
-
-      myName=$(echo $ds | awk -F ':' '{print $NF}' )  
-         
-      #location=$(head -n1 tmp.ds.txt)
-      cat tmp.ds.txt >  $fdir/$myName.files # // no sorting due to the new directory structure
-
-      rm tmp.ds.txt
-
-      echo $myName>> $fname
-
-      done
-fi
-
-)
-
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/runJobs.py b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/runJobs.py
index fd31fbd880c99715de96814c9141767e35503a8a..6fc57341f59713c940d58ed275e8759f5a317ffa 100755
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/bin/runJobs.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/bin/runJobs.py
@@ -3,256 +3,321 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 # Front-end script to run JobRunner jobs
 
-__author__  = 'Juerg Beringer'
+__authors__  = ['Juerg Beringer', 'Carl Suster']
 __version__ = 'runJobs.py atlas/athena'
-__usage__   = """%prog [options] JOBOPTIONTEMPLATE DATASET TASK INPUTDATA
+__usage__   = """%prog [options] JOBOPTIONTEMPLATE DATASET TASK
 
-Templates:  - InDetBeamSpotExample/ESDToDPDTemplate.py
-            - InDetBeamSpotExample/BSToDPDTemplate.py
-            - InDetBeamSpotExample/VertexTemplate.py
-            - InDetBeamSpotExample/TrackChi2Template.py
-            - InDetBeamSpotExample/MonitoringTemplate.py
-            - your own template file
-
-Examples:   - runJobs InDetBeamSpotExample/ESDToDPDTemplate.py 105039 DPD 105039/ESD
-            - runJobs -d InDetBeamSpotExample/VertexTemplate.py 105039 VTX DPD
-            - runJobs -d -q all.64bit.q -r PDSFJobRunner InDetBeamSpotExample/TrackChi2Template.py 105039 TRK DPD
-            - runJobs -o dpd.root -g user09.YourName -p 'DetDescrVersion="ATLAS-GEO-02-01-00"' \\
-                      InDetBeamSpotExample/ESDToDPDTemplate.py 105039 DPD \\
-                      mc08.105039.J0_pythia_jetjetNU.recon.ESD.e372_s490_r603/"""
+Templates: - InDetBeamSpotExample/VertexTemplate.py
+           - InDetBeamSpotExample/*Template.py
+           - your own template file
 
+See the comment field of jobs (e.g. MON.DB_BEAMSPOT jobs) in the beam spot
+summary webpage for real usage examples.
+"""
 
 import sys
 import glob
 import os
 import re
+import subprocess
 import InDetBeamSpotExample
 from InDetBeamSpotExample import TaskManager
 from InDetBeamSpotExample import DiskUtils
 
-# Create a properly quoted string of the command line to save
-qargv = [ ]
-for s in sys.argv:
-    if re.search('\s|\*|\?',s):   # any white space or special characters in word so we need quoting?
-        if "'" in s:
-            qargv.append('"%s"' % re.sub('"',"'",s))
-        else:
-            qargv.append("'%s'" % re.sub("'",'"',s))
-    else:
-        qargv.append(s)
-cmd = ' '.join(qargv)
-
-from optparse import OptionParser
-parser = OptionParser(usage=__usage__, version=__version__)
-parser.add_option('', '--bytestream', dest='bytestream', action='store_true', default=False, help='input files are bytestream instead of ROOT/POOL files')
-parser.add_option('-m', '--mc', dest='isMc', action='store_true', default=False, help='input data is from Monte-Carlo instead of data (automatically chooses between COMP200 and OFLP200 / CONDBR2 conditions DBs)')
-parser.add_option('-d', '--dpd', dest='runoverdpd', action='store_true', default=False, help='run over DPD (single job, INPUTDATA is DPD task name)')
-parser.add_option('-j', '--maxjobs', dest='maxjobs', type='int', default=0, help='max number of jobs (default: 0 ie no maximum)')
-parser.add_option('-n', '--nfiles', dest='nfiles', type='int', default=1, help='number of files per job (default: 1, set to 0 for single job over all files)') 
-parser.add_option('-e', '--maxevents', dest='evtmax', type='int', default=-1, help='max number of events per job')
-parser.add_option('', '--lbperjob', dest='lbperjob', type='int', default=0, help='number of luminosity blocks per job (default: 0 - no bunching)') 
-parser.add_option('-o', '--outputfilelist', dest='outputfilelist', default='', help='list of desired output files (default: "dpd.root,nt.root,monitoring.root,beamspot.db"; must be specified explicitly for grid)')
-parser.add_option('-c', '--castor', dest='fromcastor', action='store_true', default=False, help='INPUTDATA refers to CASTOR directory')
-parser.add_option('-f', '--filter', dest='filter', default='', help='use specified pattern to filter input files (default: *.root* for local files, .*ESD.* for castor)')
-parser.add_option('-k', '--taskdb', dest='taskdb', default='', help='TaskManager database (default: from TASKDB or sqlite_file:taskdata.db; set to string None to avoid using a task database)')
-parser.add_option('-l', '--logmail', dest='users', default='', help='send log mail to specified users (default: no mail)')
-parser.add_option('-q', '--queue', dest='batchqueue', default='atlasb1', help='batch queue (default: atlasb1)')
-parser.add_option('-i', '--interactive', dest='interactive', action='store_true', default=False, help='run interatively (same as -r JobRunner)')
-parser.add_option('-g', '--grid', dest='griduser', default='', help='run on grid (GRIDUSER is user prefix of grid job name, e.g. user09.JuergBeringer; INPUTDATA is grid dataset name)')
-parser.add_option('-s', '--gridsite', dest='gridsite', default='AUTO', help='site name where jobs are sent (default:AUTO)')
-parser.add_option('-r', '--runner', dest='runner', default='LSFJobRunner', help='type of JobRunner (class name, default: LSFJobRunner)')
-parser.add_option('-w', '--wait', dest='dowait', action='store_true', default=False, help='wait for jobs to complete')
-parser.add_option('-z', '--postprocsteps', dest='postprocsteps', default='JobPostProcessing', help='Task-level postprocessing steps (Default: JobPostProcessing)')
-parser.add_option('-t', '--test', dest='testonly', action='store_true', default=False, help='show only options and input files')
-parser.add_option('-v', '--verbosity', dest='outputlevel', type='int', default=4, help='output level (default:4, where 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)')
-parser.add_option('-p', '--params', dest='params', default='', help='job option parameters to pass to job option template')
-parser.add_option('', '--autoconfparams', dest='autoconfparams', default='DetDescrVersion', help='comma-separated list of automatically determined parameters (template must include AutoConfFragment.py, default: "DetDescrVersion")')
-parser.add_option('', '--prefix', dest='prefix', default='', help='Prefix for reading files from mass storage (Default: determine from filename (`\'\') ')
-# Additional optional files requiring special treatment (other parameters should be passed
-# to the job option template via "-p params")
-parser.add_option('-a', '--alignment-file', dest='alignmentfile', default='', help='alignment file (default: none)')
-parser.add_option('-b', '--beamspot-file', dest='beamspotfile', default='', help='beam spot SQLite file (default: none)')
-
-(options,args) = parser.parse_args()
-if len(args) != 4:
-    parser.error('wrong number of command line arguments')
-
-userparams = { }
-for s in options.params.split(', '):
-    if s:
-        try:
-            p = s.split('=',1)
-            userparams[p[0].strip()] = eval(p[1].strip())
-        except:
-            print '\nERROR parsing user parameter',p,'- parameter will be ignored'
-
-joboptiontemplate = args[0]
-dsname = args[1]
-taskname = args[2]
-inputdata = args[3]
-filter = options.filter
-
-# Set input data type
-if options.isMc:
-    DataSource = 'geant4'
-else:
-    DataSource = 'data'
-
-# Set input dataset and files
-if options.griduser:
-    inputDS = inputdata
-    files = [ inputdata ]
-    options.runner = 'PandaJobRunner'
-
-else:
-    inputDS = ''
-    files = []
-    if options.fromcastor:
-        # INPUTDATA specifies a CASTOR directory with files
-        # (the default filter is to use ESD files)
-        if not options.filter:
-            if options.bytestream:
-                filter = '.*'
-            else:
-                filter = '.*ESD.*'
-        castorFiles = DiskUtils.filelist(inputdata, prefix=options.prefix if options.prefix else True)
-        pattern = re.compile(filter)
-        for f in castorFiles:
-            if pattern.search(f):
-                files.append(f)
+def extract_file_list_legacy(inputdata, options):
+    ''' Reads several legacy options to work out what input data to use. '''
+    if options.legacy_griduser:
+        fs = [inputdata]
+    elif options.legacy_fromcastor:
+        # INPUTDATA specifies a directory with files
+        pattern = options.legacy_filter or (None if options.bytestream else '.*ESD.*')
+        fs = DiskUtils.FileSet.from_directory(inputdata).matching(pattern)
     elif os.path.isfile(inputdata):
         # inputdata is a text file with filenames
-        for line in open(inputdata,'r'):
-            files.append('root://eosatlas/'+line.rstrip())
+        fs = DiskUtils.FileSet.from_file_containing_list(inputdata)
+    elif options.legacy_runoverdpd:
+        # INPUTDATA is filename
+        rundir = os.path.join(os.getcwd(), dsname)
+        if not os.path.exists(rundir):
+            fail('Run ' + dsname + ' (directory ' + rundir + ') not found')
+        dpddir = os.path.join(rundir, inputdata)
+        if not os.path.exists(dpddir):
+            fail('Dataset with name ' + inputdata + ' (directory ' + dpddir + ') not found')
+        fs = DiskUtils.FileSet.from_glob(os.path.join(dpddir, '*', '*-dpd.root*'))
+    else:
+        # INPUTDATA is a directory with files
+        pattern = options.legacy_filter or '*.root*'
+        fs = DiskUtils.FileSet.from_glob(os.path.join(inputdata, pattern))
+    return list(sorted(fs))
+
+def extract_file_list(options):
+    ''' Use new flags to work out input file list. '''
+    if options.in_directory:
+        fs = DiskUtils.FileSet.from_directory(options.in_directory)
+    elif options.in_list:
+        fs = DiskUtils.FileSet.from_file_containing_list(options.in_list)
+    return list(sorted(fs
+            .matching(options.f_match)
+            .excluding(options.f_exclude)
+            ))
+
+def process_flags(options, legacy=False):
+    flags = {
+            'inputds' : '',
+            'bytestream' : options.bytestream,
+            'DataSource' : 'geant4' if options.is_mc else 'data',
+            'evtmax' : options.evtmax,
+            'maxjobs' : options.maxjobs,
+            'outputlevel' : options.outputlevel,
+            'logmail' : options.users,
+            'alignmentfile' : options.alignmentfile,
+            'beamspotfile' : options.beamspotfile,
+            'autoconfparams' : options.autoconfparams,
+            'taskpostprocsteps' : options.postprocsteps,
+            'filesperjob' : options.nfiles,
+            'lbperjob' : options.lbperjob,
+            'batchqueue' : options.batchqueue,
+            'gridsite' : options.gridsite,
+            'addinputtopoolcatalog' : not (options.bytestream or options.submit == 'grid' or options.legacy_griduser),
+            }
+
+    # List of desired output files. For grid jobs, it must specify exactly
+    # the expected files (otherwise the grid jobs will fail or not return the
+    # desired output). For all other jobs, it can be an inclusive list of
+    # possible outputs and JobRunner will return only the actually present
+    # output files when asked for output files.
+    if options.outputfilelist:
+        flags['outputfilelist'] = [ f.strip() for f in options.outputfilelist.split(',') ]
+    else:
+        flags['outputfilelist'] = ['dpd.root', 'nt.root', 'monitoring.root', 'beamspot.db']
+
+    if legacy:
+        flags['griduser'] = options.legacy_griduser
+    else:
+        flags['griduser'] = '.'.join(['user', options.grid_user or os.getenv('USER')])
+
+    if options.legacy_runoverdpd and not options.lbperjob:
+        flags['maxjobs'] = 1
+
+    for s in options.params.split(', '):
+        if s:
+            try:
+                p = s.split('=', 1)
+                flags[p[0].strip()] = eval(p[1].strip())
+            except:
+                print '\nERROR parsing user parameter', p, '- parameter will be ignored'
+
+    return flags
+
+def make_runner(runner_type, flags):
+    runner_class = InDetBeamSpotExample.loadClass(runner_type)
+    return runner_class(**flags)
+
+if __name__ == '__main__':
+    cmd = subprocess.list2cmdline(sys.argv)
+
+    from optparse import OptionParser, OptionGroup
+    parser = OptionParser(usage=__usage__, version=__version__)
+    parser.add_option('', '--bytestream', dest='bytestream', action='store_true', default=False,
+            help='input files are bytestream instead of ROOT/POOL files')
+    parser.add_option('-m', '--mc', dest='is_mc', action='store_true', default=False,
+            help='input data is from Monte-Carlo instead of data (automatically chooses between COMP200 and OFLP200 / CONDBR2 conditions DBs)')
+    parser.add_option('-j', '--maxjobs', dest='maxjobs', type='int', default=0,
+            help='max number of jobs (default: 0 ie no maximum)')
+    parser.add_option('', '--files-per-job', dest='nfiles', type='int', default=1, metavar='N',
+            help='number of files per job (default: 1, set to 0 for single job over all files)')
+    parser.add_option('-e', '--maxevents', dest='evtmax', type='int', default=-1,
+            help='max number of events per job')
+    parser.add_option('', '--lbperjob', dest='lbperjob', type='int', default=0, metavar='N',
+            help='number of luminosity blocks per job (default: 0 - no bunching)')
+    parser.add_option('-o', '--outputfilelist', dest='outputfilelist', default='', metavar='FILES',
+            help='list of desired output files (default: "dpd.root,nt.root,monitoring.root,beamspot.db"; must be specified explicitly for grid)')
+    parser.add_option('-k', '--taskdb', dest='taskdb', default='',
+            help='TaskManager database (default: from TASKDB or sqlite_file:taskdata.db; set to string None to avoid using a task database)')
+    parser.add_option('-l', '--logmail', dest='users', default='', metavar='USERS',
+            help='send log mail to specified users (default: no mail)')
+    parser.add_option('-z', '--postprocsteps', dest='postprocsteps', default='JobPostProcessing', metavar='STEPS',
+            help='Task-level postprocessing steps (Default: JobPostProcessing)')
+    parser.add_option('-t', '--test', dest='testonly', action='store_true', default=False,
+            help='show only options and input files')
+    parser.add_option('-v', '--verbosity', dest='outputlevel', type='int', default=4, metavar='LEVEL',
+            help='output level (default:4, where 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)')
+    parser.add_option('-p', '--params', dest='params', default='',
+            help='job option parameters to pass to job option template')
+    parser.add_option('', '--autoconfparams', dest='autoconfparams', default='DetDescrVersion',
+            help='comma-separated list of automatically determined parameters (template must include AutoConfFragment.py, default: "DetDescrVersion")')
+
+    # Additional optional files requiring special treatment (other parameters
+    # should be passed to the job option template via "-p params")
+    parser.add_option('-a', '--alignment-file', dest='alignmentfile', default='', metavar='FILE',
+            help='alignment file (default: none)')
+    parser.add_option('-b', '--beamspot-file', dest='beamspotfile', default='', metavar='FILE',
+            help='beam spot SQLite file (default: none)')
+
+    execopt = OptionGroup(parser, 'Execution Options')
+    execopt.add_option('', '--submit', dest='submit', default='lsf', metavar='TYPE',
+            choices=['grid', 'lsf', 'shell', 'bg', 'pdsf', 'simple'],
+            help='submission type (default: lsf, choices: grid,lsf,shell,bg,pdsf,simple)')
+    execopt.add_option('', '--grid-user', dest='grid_user', default=None, metavar='USER',
+            help='grid username (default: $USER)')
+    execopt.add_option('', '--grid-site', dest='gridsite', default='AUTO', metavar='SITE',
+            help='site name where jobs are sent (default: AUTO)')
+    execopt.add_option('', '--lsf-submit', dest='lsf_submit', default=False, action='store_true',
+            help='submit on the LSF batch system')
+    execopt.add_option('-q', '--queue', dest='batchqueue', default='atlasb1',
+            help='batch queue (default: atlasb1)')
+    parser.add_option_group(execopt)
+
+    inopt = OptionGroup(parser, 'Input File Options',
+            "One of these must be specified.")
+    inopt.add_option('', '--directory', dest='in_directory', metavar='DIR',
+            help='run over all matching files in the directory')
+    inopt.add_option('', '--file-list', dest='in_list', metavar='FILE',
+            help='run over all matching files in the directory')
+    inopt.add_option('', '--dsid', dest='in_dsid', metavar='DSID',
+            help='run over a rucio DSID')
+    parser.add_option_group(inopt)
+
+    filtopt = OptionGroup(parser, 'Input Filtering Options',
+            "Optional filters to select input files.")
+    inopt.add_option('', '--match', dest='f_match', default=None, metavar='REGEX',
+            help='keep only files matching the pattern')
+    inopt.add_option('', '--exclude', dest='f_exclude', default=None, metavar='REGEX',
+            help='skip files matching the pattern')
+    parser.add_option_group(filtopt)
 
+    # TODO Check if these flags can be removed:
+    deprecated = OptionGroup(parser, 'Deprecated Options')
+    deprecated.add_option('-c', '--castor', dest='legacy_fromcastor', action='store_true', default=False,
+            help='INPUTDATA refers to CASTOR directory')
+    deprecated.add_option('', '--prefix', dest='legacy_prefix', default='',
+            help='Prefix for reading files from mass storage (ignored)')
+    deprecated.add_option('-d', '--dpd', dest='legacy_runoverdpd', action='store_true', default=False,
+            help='run over DPD (single job, INPUTDATA is DPD task name)')
+    deprecated.add_option('-i', '--interactive', dest='legacy_interactive', action='store_true', default=False,
+            help='run interatively (same as -r JobRunner)')
+    deprecated.add_option('-f', '--filter', dest='legacy_filter', default='',
+            help='use specified pattern to filter input files (default: *.root* for local files, .*ESD.* for castor)')
+    deprecated.add_option('-g', '--grid', dest='legacy_griduser', default='',
+            help='run on grid (GRIDUSER is user prefix of grid job name, e.g. user09.JuergBeringer; INPUTDATA is grid dataset name)')
+    deprecated.add_option('-s', '--gridsite', dest='gridsite', default='AUTO',
+            help='deprecated spelling of --grid-site')
+    deprecated.add_option('-r', '--runner', dest='legacy_runner', default='LSFJobRunner',
+            help='type of JobRunner (default: LSFJobRunner or PandaJobRunner)')
+    deprecated.add_option('-w', '--wait', dest='legacy_dowait', action='store_true', default=False,
+            help='wait for jobs to complete')
+    deprecated.add_option('-n', '--nfiles', dest='nfiles', type='int',
+            help='deprecated spelling of --files-per-job')
+    parser.add_option_group(deprecated)
+
+    (opts,args) = parser.parse_args()
+    if len(args) not in [3, 4]:
+        parser.error('wrong number of command line arguments')
+
+    joboptiontemplate = args[0]
+    dsname = args[1]
+    taskname = args[2]
+
+    legacy_options = len(args) == 4
+    if legacy_options:
+        print "WARNING: the four-argument invocation of runJobs is deprecated"
+        print "WARNING: enabling (imperfect) legacy compatibility mode"
+        files = extract_file_list_legacy(args[3], opts)
+        grid_mode = bool(opts.legacy_griduser)
+        runner_type = opts.legacy_runner
+        if grid_mode:
+            runner_type = 'PandaJobRunner'
+        if opts.legacy_interactive:
+            opts.legacy_runner='JobRunner'
     else:
-        if options.runoverdpd:
-            # INPUTDATA is DPD task name
-            rundir = os.getcwd()+'/'+dsname
-            if not os.path.exists(rundir):
-                sys.exit('ERROR: Run '+dsname+' (directory '+rundir+') not found')
-            dpddir = rundir+'/'+inputdata
-            if not os.path.exists(dpddir):
-                sys.exit('ERROR: DPD with name '+inputdata+' (directory '+dpddir+') not found')
-            files = sorted(glob.glob(dpddir+'/*/*-dpd.root*'))
-
-        else:
-            # INPUTDATA is a directory with files
-            inputDS = ''
-            if not options.filter:
-                filter = '*.root*'
-            if inputdata[0]=='/':
-                files = sorted(glob.glob(inputdata+'/'+filter))
-            else:
-                files = sorted(glob.glob(os.getcwd()+'/'+inputdata+'/'+filter))
-
-if options.interactive:
-    options.runner='JobRunner'
-
-if not files:
-    sys.exit('ERROR: No input files found')
-
-if options.runoverdpd and not options.lbperjob:
-    options.maxjobs = 1
-
-if options.lbperjob and options.griduser:
-    sys.exit('ERROR: Bunching per LB not supported for grid jobs')
-
-if options.nfiles<1 or (options.runoverdpd and options.nfiles==1):
-    options.nfiles = len(files)   # run single job over all files
-    if options.griduser:
-        sys.exit('ERROR: Must specify number of files per job explicity when running on grid')
-
-# List of desired output files. For grid jobs, it must specify exactly
-# the expected files (otherwise the grid jobs will fail or not return the
-# desired output). For all other jobs, it can be an inclusive list of
-# possible outputs and JobRunner will return only the actually present
-# output files when asked for output files.
-if not options.outputfilelist:
-    if options.griduser:
-        sys.exit('ERROR: For grid jobs, must specify output files expclitly using option -o (e.g. -o dpd.root)')
+        files = extract_file_list(opts)
+        grid_mode = opts.submit == 'grid'
+        runner_type = {
+                'lsf': 'LSFJobRunner',
+                'grid': 'PandaJobRunner',
+                'shell': 'ShellJobRunner',
+                'bg': 'BackgroundJobRunner',
+                'pdsf': 'PDSFJobRunner',
+                'simple': 'JobRunner',
+                }[opts.submit]
+        if grid_mode:
+            if not opts.in_dsid:
+                sys.exit('ERROR: For grid submission, a DSID must be given')
+    if not files:
+        sys.exit('ERROR: No input files found')
+
+    flags = process_flags(opts, legacy=legacy_options)
+    flags['comment'] = cmd
+    flags['inputfiles'] = files
+    flags['joboptionpath'] = joboptiontemplate
+
+    if grid_mode:
+        flags['inputds'] = files[0]
+        if opts.lbperjob:
+            sys.exit('ERROR: Bunching per LB not supported for grid jobs')
+        if not opts.outputfilelist:
+            sys.exit('ERROR: For grid jobs, must specify output files expclitly using option -o (e.g. -o dpd.root)')
+
+    if opts.nfiles < 1 or (opts.legacy_runoverdpd and opts.nfiles == 1):
+        # run single job over all files:
+        flags['filesperjob'] = len(files)
+        if grid_mode:
+            sys.exit('ERROR: Must specify number of files per job explicitly when running on grid')
+
+    workdir = os.path.join(os.getcwd(), dsname, taskname)
+    flags['jobdir'] = os.path.join(workdir, '%(jobnr)03i')
+    if os.path.exists(workdir):
+        sys.exit("ERROR: Task %s exists already for dataset %s (directory %s)" % (taskname,dsname,workdir))
+
+    if opts.lbperjob:
+        flags['jobname'] = '-'.join([dsname, taskname, 'lb%(jobnr)03i'])
     else:
-        outputfilelist = ['dpd.root', 'nt.root', 'monitoring,root', 'beamspot.db']
-else:
-    outputfilelist = [ f.strip() for f in options.outputfilelist.split(',') ]
-
-workdir = os.getcwd()+'/'+dsname+'/'+taskname
-if os.path.exists(workdir):
-    sys.exit("ERROR: Task %s exists already for dataset %s (directory %s)" % (taskname,dsname,workdir))
-
-if options.lbperjob:
-    jobname=dsname+'-'+taskname+'-lb%(jobnr)03i'
-else:
-    jobname=dsname+'-'+taskname+'-%(jobnr)03i'
-    if options.runoverdpd or options.griduser:
-        jobname=dsname+'-'+taskname
-
-runnerClass = InDetBeamSpotExample.loadClass(options.runner)
-runner = runnerClass(inputfiles=files,
-                     inputds=inputDS,
-                     bytestream=options.bytestream,
-                     filesperjob=options.nfiles,
-                     lbperjob=options.lbperjob,
-                     joboptionpath=joboptiontemplate,
-                     batchqueue=options.batchqueue,
-                     jobname=jobname,
-                     griduser=options.griduser,
-                     gridsite=options.gridsite,
-                     jobdir=workdir+'/%(jobnr)03i',
-                     addinputtopoolcatalog=not (options.bytestream or options.griduser),
-                     evtmax=options.evtmax,
-                     maxjobs=options.maxjobs,
-                     outputlevel=options.outputlevel,
-                     logmail=options.users,
-                     outputfilelist=outputfilelist,
-                     alignmentfile=options.alignmentfile,
-                     beamspotfile=options.beamspotfile,
-                     autoconfparams=options.autoconfparams,
-                     taskpostprocsteps=options.postprocsteps,
-                     DataSource=DataSource,
-                     comment=cmd,
-                     **userparams)
-
-if options.alignmentfile:
-    runner.addFilesToPoolFileCatalog([options.alignmentfile])
-
-if options.griduser:
-    runner.setParam('outputfileprefix','%(jobname)s-')
-    runner.setParam('addinputtopoolcatalog',False)   # input is a grid dataset
-    runner.registerToBeCopied('alignmentfile')
-    runner.registerToBeCopied('beamspotfile')
-
-print
-runner.showParams()
-print
-
-# Temporary warning
-if options.griduser and options.autoconfparams:
-    print "WARNING: Automatic configuration of parameters such as DetDescrVersion doesn't work yet on the grid!"
-    print "         Please be sure the values of each of the following parameters are specified explicitly above,"
-    print "         unless the defaults in the job option template are correct:\n"
-    print "           ", options.autoconfparams
+        flags['jobname'] = '-'.join([dsname, taskname, '%(jobnr)03i'])
+        if grid_mode or opts.legacy_runoverdpd:
+            flags['jobname'] = dsname + '-' + taskname
+
+    runner = make_runner(runner_type, flags)
+
+    if opts.alignmentfile:
+        runner.addFilesToPoolFileCatalog([opts.alignmentfile])
+
+    if grid_mode:
+        runner.setParam('outputfileprefix','%(jobname)s-')
+        runner.setParam('addinputtopoolcatalog',False)   # input is a grid dataset
+        runner.registerToBeCopied('alignmentfile')
+        runner.registerToBeCopied('beamspotfile')
+
+    print
+    runner.showParams(-1)
     print
 
-print len(files),"input file(s)/input dataset found."
-print
-if not options.testonly:
-    runner.configure()
-    if options.taskdb!='None':
-        try:
-            with TaskManager.TaskManager(options.taskdb) as taskman:
-                taskman.addTask(dsname,taskname,joboptiontemplate,runner.getParam('release'),runner.getNJobs(),options.postprocsteps,comment=cmd)
-        except:
-            print 'WARNING: Unable to add task to task manager database '+options.taskdb
-    runner.run()
-    if options.dowait and not options.griduser:
-        if not options.interactive: runner.wait()
-        print
-        print "Job directories in %s for this task:" % workdir
-        print
-        os.system('ls -l %s' % workdir)
-        print
-        print "The following output file(s) were produced:"
-        print
-        print runner.getOutputFiles()
+    # Temporary warning. TODO: still needed?
+    if grid_mode and opts.autoconfparams:
+        print "WARNING: Automatic configuration of parameters such as DetDescrVersion doesn't work yet on the grid!"
+        print "         Please be sure the values of each of the following parameters are specified explicitly above,"
+        print "         unless the defaults in the job option template are correct:\n"
+        print "           ", opts.autoconfparams
         print
+
+    print len(files), "input file(s)/dataset found."
+    print
+    if not opts.testonly:
+        runner.configure()
+        if opts.taskdb != 'None':
+            try:
+                with TaskManager.TaskManager(opts.taskdb) as taskman:
+                    taskman.addTask(dsname,taskname,joboptiontemplate,runner.getParam('release'),runner.getNJobs(),opts.postprocsteps,comment=cmd)
+            except:
+                print 'WARNING: Unable to add task to task manager database ' + opts.taskdb
+        runner.run()
+        if opts.legacy_dowait and not grid_mode:
+            if not opts.legacy_interactive: runner.wait()
+            print
+            print "Job directories in %s for this task:" % workdir
+            print
+            os.system('ls -l %s' % workdir)
+            print
+            print "The following output file(s) were produced:"
+            print
+            print runner.getOutputFiles()
+            print
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/python/DiskUtils.py b/InnerDetector/InDetExample/InDetBeamSpotExample/python/DiskUtils.py
index bda5049513618057fedfc7ac7931b1c1a4eb4afb..5dba839ef4ddb11696936ccc6880f46999914793 100644
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/python/DiskUtils.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/python/DiskUtils.py
@@ -1,32 +1,38 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-import os, re, fnmatch, subprocess
+from __future__ import print_function
+import glob
+import itertools
+import os
+import re
+import subprocess
 
-# StorageManager to deal with listing, copying, reading files from different storage systems
+# DEPRECATED CODE #############################################################
+
+import sys
+from functools import wraps
+def deprecated(message):
+    def deco(fn):
+        @wraps(fn)
+        def wrapper(*args, **kwargs):
+            print('WARNING: [InDetBeamSpotExample.DiskUtils]',
+                    '{}() is deprecated and will be removed'.format( fn.__name__),
+                    file=sys.stderr)
+            print('WARNING:                                 ', message,
+                    file=sys.stderr)
+            return fn(*args, **kwargs)
+        return wrapper
+    return deco
+
+import fnmatch
 from collections import namedtuple
 StorageManager = namedtuple('StorageManager', ['name', 'prefix', 'cp', 'ls', 'longls'])
 CastorMgr = StorageManager(name='castor', prefix='root://castoratlas/', cp='xrdcp', ls='nsls %s', longls='nsls -l %s')
 RFIOMgr = StorageManager(name='rfio', prefix='rfio:', cp='rfcp', ls='rfdir %s', longls='rfdir %s')
-# As a workaround to athena's xrootd library being binary-incompatible with the
-# eos executable we set LD_LIBRARY_PATH. This can be reverted to the commented
-# out line once the eos executable learns to pick up the right library.
-# EOSMgr = StorageManager(name='eos', prefix='root://eosatlas/', cp='xrdcp', ls='/bin/sh -l -c "eos ls %s"', longls='/bin/sh -l -c "eos ls -l %s"')
 EOSMgr = StorageManager(name='eos', prefix='root://eosatlas/', cp='xrdcp', ls='/bin/sh -l -c "LD_LIBRARY_PATH=/usr/lib64/ eos ls %s"', longls='/bin/sh -l -c "LD_LIBRARY_PATH=/usr/lib64/ eos ls -l %s"')
 UnixMgr = StorageManager(name='unix', prefix='', cp='cp', ls='ls %s', longls='ls -l %s')
 
-# Can also use 'xrd castoratlas ls'/'xrd eosatlas ls' but always does a long listing and so much slower than 'nsls'/'eos ls'
-
-def _hasWildcard(name) :
-    """
-    Return true if the name has a UNIX wildcard (*,?,[,])
-    """
-    if ( name.count('*') > 0 or name.count('?') > 0 or
-         name.count('[') > 0 or name.count(']') > 0 ) :
-        return True
-    else :
-        return False
-
-def rationalise(path):
+def _rationalise(path):
     """
     Rationalise a path, removing prefix and esuring single leading slash
     """
@@ -41,11 +47,12 @@ def rationalise(path):
 
     return path
 
+@deprecated("EOS is mounted on /eos with fuse, so you probably don't need this abstraction")
 def storageManager(name):
     """
     Return SotrageManager to deal with listing, copying and reading files from various storage systems
     """
-    name = rationalise(name)
+    name = _rationalise(name)
     if name.startswith('/castor/'):
         return CastorMgr
     elif name.startswith('/eos/'):
@@ -53,6 +60,7 @@ def storageManager(name):
     else:
         return UnixMgr
 
+@deprecated("DiskUtils.FileSet replaces this functionality")
 def filelist(files, prefix=None):
     """
     lists CASTOR/EOS name server directory/file entries.
@@ -72,9 +80,10 @@ def filelist(files, prefix=None):
     """
 
     path, fname = os.path.split(files)
-    path = rationalise(path)
+    path = _rationalise(path)
 
-    if _hasWildcard(path):
+    if ( path.count('*') > 0 or path.count('?') > 0 or
+         path.count('[') > 0 or path.count(']') > 0 ) :
         paths = ls(path)
         return sum([ls(os.path.join(p,fname))
                     for p in paths], [])
@@ -84,7 +93,7 @@ def filelist(files, prefix=None):
     try:
         flist = subprocess.check_output(mgr.ls % path, shell=True).split()
     except subprocess.CalledProcessError as err:
-        print err.output
+        print(err.output)
         return []
 
     if not (os.path.basename(files) in ['', '*']): # no need to filter
@@ -99,6 +108,7 @@ def filelist(files, prefix=None):
     else:
         return [os.path.join(path, p) for p in flist]
 
+@deprecated("EOS is mounted on /eos with fuse, so you probably don't need this abstraction")
 def ls(path, longls=False):
     """
     Simple list of files
@@ -106,7 +116,7 @@ def ls(path, longls=False):
     `longls` specifies long listing format
     """
 
-    path = rationalise(path)
+    path = _rationalise(path)
     mgr = storageManager(path)
 
     if longls:
@@ -114,9 +124,10 @@ def ls(path, longls=False):
     else:
         return subprocess.check_output(mgr.ls % path, shell=True)
 
+@deprecated("EOS is mounted on /eos with fuse, so you probably don't need this abstraction")
 def cp(src, dest='.'):
-    src = rationalise(src)
-    dest = rationalise(dest)
+    src = _rationalise(src)
+    dest = _rationalise(dest)
     srcmgr = storageManager(src)
     destmgr = storageManager(dest)
 
@@ -124,3 +135,309 @@ def cp(src, dest='.'):
     if srcmgr.cp == 'xrdcp' or destmgr.cp == 'xrdcp': cp = 'xrdcp'
 
     return os.system('%s %s%s %s%s' %(cp, srcmgr.prefix, src, destmgr.prefix, dest))
+
+###############################################################################
+
+class AccessError(RuntimeError): pass
+
+def get_lumi_blocks(root_file):
+    import ROOT
+    from AthenaROOTAccess.transientTree import makeTree
+    try:
+        f = ROOT.TFile(root_file)
+        if not f.IsOpen(): raise AccessError('Unable to open file: ' + root_file)
+        t = f.Get('MetaData')
+        tt = makeTree(t, dhTreeName='MetaDataHdr')
+        for branch in tt.GetListOfBranches():
+            if branch.GetClassName() == 'EventStreamInfo':
+                if branch.GetEntry(0) < 0:
+                    raise AccessError('Unable to read entry from: ' + branch.GetClassName())
+                esi = getattr(tt, branch.GetName())
+                return esi.getLumiBlockNumbers()
+        raise RuntimeError('No EventStreamInfo object found in file: ' + root_file)
+    finally:
+        f.Close()
+
+def make_lumi_block_map_file(file_set, path):
+    with open(path, 'w') as mapfile:
+        for f, lbs in file_set.with_lumi_blocks():
+            print('Reading:', f)
+            mapfile.write('{} {}\n'.format(
+                os.path.basename(f),
+                ','.join(str(x) for x in lbs)))
+
+
+class Backend:
+    def exists(self, path): raise NotImplemented
+    def is_file(self, path): raise NotImplemented
+    def is_directory(self, path): raise NotImplemented
+    def children(self, path): raise NotImplemented
+    def glob(self, pattern): raise NotImplemented
+    def wrap(self, path): return path
+
+class Local(Backend):
+    def exists(self, path): return os.path.exists(path)
+    def is_directory(self, path): return os.path.isdir(path)
+    def is_file(self, path): return os.path.isfile(path)
+
+    def children(self, path):
+        def generator(p):
+            for dir_name, dirs, files in os.walk(p):
+                for f in files:
+                    yield os.path.join(dir_name, f)
+        return generator(path)
+
+    def glob(self, pattern):
+        return glob.glob(pattern)
+
+class EOS(Backend):
+    """ Accesses EOS using the command line interface.
+    NB: when EOS is fuse-mounted on /eos this class is not really necessary.
+    """
+
+    def __init__(self, prefix='root://eosatlas/'):
+        self.prefix = prefix
+
+    def wrap(self, path):
+        if path.startswith('/'):
+            path = self.prefix + path
+        return path
+
+    def unwrap(self, path):
+        if path.startswith(self.prefix):
+          path = path[len(self.prefix):]
+        return path
+
+    def exists(self, path):
+        return self._call('eos', '-b', 'ls', '-s', self.unwrap(path)) == 0
+
+    def is_file(self, path):
+        return self._call('eos', '-b', 'sat', '-f', self.unwrap(path)) == 0
+
+    def is_directory(self, path):
+        return self._call('eos', '-b', 'sat', '-d', self.unwrap(path)) == 0
+
+    def children(self, path):
+        with open(os.devnull, 'w') as null:
+            output = subprocess.check_output(['eos', '-b', 'find', '-f',
+                self.unwrap(path)], stderr=null)
+        return [l.strip() for l in output.split('\n')]
+
+    def _call(self, *args):
+        with open(os.devnull, 'w') as null:
+          retcode = subprocess.call(args, stderr=null)
+        return retcode
+
+class FilterError(RuntimeError): pass
+
+class FileSet:
+    """ Represents a list of input files.
+    This class abstracts over the different ways files can be specified, and
+    the different storage backends/protocols on which they reside. It is an
+    iterator, and provides some methods for filtering the file set. E.g.:
+
+        fs = FileSet.from_input('/eos/atlas/path/to/dataset/')
+        for f in fs.matching(r'.*AOD.*').only_existing():
+            print(f)
+    """
+
+    def __init__(self, iterator, backend):
+        self.backend = backend
+        self._iter = iterator
+        self._existing = False
+        self._white_pattern = None
+        self._black_pattern = None
+        self._strict = True
+        self._explicit = None
+        self._dedup = False
+        self._single_dataset = False
+        self.broken = []
+        self.lb_map = {}
+
+    @classmethod
+    def from_single_file(cls, path, backend=None):
+        return cls(iter([path]), backend or Local())
+
+    @classmethod
+    def from_directory(cls, path, backend=None):
+        be = backend or Local()
+        return cls(be.children(path), be)
+
+    @classmethod
+    def from_file_containing_list(cls, path, backend=None):
+        with open(path) as lf:
+            iterator = iter([l.strip() for l in lf.readlines()])
+        return cls(iterator, backend or Local())
+
+    @classmethod
+    def from_glob(cls, pattern, backend=None):
+        be = backend or Local()
+        return cls(be.glob(pattern), be)
+
+    @classmethod
+    def from_ds_info(cls, run, project, stream, base, backend=None):
+        path = os.path.join(base, project, stream,
+                '{:0{digits}d}'.format(int(run), digits=8))
+        return cls.from_directory(path, backend=backend)
+
+    @classmethod
+    def from_input(cls, input_string, backend=None):
+        ''' Guess what kind of input file specification was provided. '''
+        be = backend or Local()
+        if be.is_directory(input_string):
+            return cls.from_directory(input_string, be)
+        elif Local().is_file(input_string) and not (
+                input_string.endswith('.root') or
+                input_string[-7:-2] == '.root'):
+            return cls.from_file_containing_list(input_string, be)
+        elif be.is_file(input_string):
+            return cls.from_single_file(input_string, be)
+        elif '*' in input_string or '?' in input_string or '[' in input_string:
+            return cls.from_glob(input_string, be)
+        else:
+            raise AccessError('Unable to resolve input: ' + repr(input_string))
+
+    def __iter__(self):
+        it = self._iter
+        if self._white_pattern:
+            it = itertools.ifilter(lambda x: self._white_pattern.search(x), it)
+        if self._black_pattern:
+            it = itertools.ifilter(lambda x: not self._black_pattern.search(x), it)
+        if self._existing: # see: only_existing
+            if self._strict:
+                def generator(i, b):
+                    for f in i:
+                        if b.exists(f):
+                            yield f
+                        else:
+                            raise AccessError('File not found: ' + f)
+                it = generator(it, self.backend)
+            else:
+                it = itertools.ifilter(lambda x: self.backend.exists(x), it)
+        if self._explicit is not None: # see: use_files_from
+            def generator(i, strict):
+                for f in i:
+                    name = os.path.basename(f)
+                    if self._explicit.pop(name, False):
+                        yield f
+                if strict and self._explicit:
+                    for f in self._explicit: print('Missing:', f)
+                    raise FilterError('Not all explicit files were found.')
+            it = generator(it, self._strict)
+        if self._dedup: # see: only_latest
+            def fn(m, f):
+                name, ext = os.path.splitext(f)
+                if name in m:
+                    m[name] = str(max(int(m[name]), int(ext[1:])))
+                else:
+                    m[name] = ext[1:]
+                return m
+            def generator(em):
+                for name, ext in em.items():
+                    yield '.'.join([name, ext])
+            it = generator(reduce(fn, self, {}))
+        if self._single_dataset: # see: only_single_dataset
+            def generator(i):
+                dataset = None
+                for f in i:
+                    ds = '.'.join(f.split('.')[0:3])
+                    if dataset is None:
+                        dataset = ds
+                    if ds == dataset:
+                        yield f
+                    else:
+                        raise FilterError(
+                                "Files found from more than one dataset: '{}' != '{}'"
+                                .format(ds, dataset))
+            it = generator(it)
+        it = itertools.imap(lambda x: self.backend.wrap(x), it)
+        return it
+
+    def strict_mode(self, setting=True):
+        """ When strict, errors are raised in the following cases (which
+        otherwise cause the corresponding files to be silently skipped):
+
+          * When LB info is requested but cannot be found for a file (because
+            it was not in the map file, or ARA couldn't open the ROOT file).
+          * When `only_existing` is set and a file is missing.
+          * When a file list is provided and not all of the files it mentions
+            were encountered by the end of iteration.
+        """
+        self._strict = setting
+        return self
+
+    def matching(self, pattern):
+        ''' Only accept filenames matching the provided regular expression. '''
+        self._white_pattern = re.compile(pattern) if pattern else None
+        return self
+
+    def excluding(self, pattern):
+        ''' Skip filenames matching the provided regular expression. '''
+        self._black_pattern = re.compile(pattern) if pattern else None
+        return self
+
+    def use_files_from(self, path):
+        ''' Use specific filenames from within the provided dataset. '''
+        if path:
+            with open(path) as lf:
+                self._explicit = [l.strip() for l in lf.readlines()]
+        else:
+            self._explicit = None
+        return self
+
+    def only_existing(self, setting=True):
+        ''' Only use existing files. '''
+        self._existing = setting
+        return self
+
+    def only_latest(self, setting=True):
+        ''' Keep only the latest retry from sets like `*.1`, `*.2`. '''
+        self._dedup = setting
+        return self
+
+    def only_single_dataset(self, setting=True):
+        ''' Require all files to be from the same dataset. '''
+        self._single_dataset = setting
+        return self
+
+    def with_lumi_blocks(self, map_file=None):
+        """ Lookup the luminosity blocks contained in each file.
+        If a map file is provided it will be queried for the LB mapping,
+        otherwise each file will be opened and accessed using AthenaROOTAccess
+        which can be a little slow.
+        """
+        if map_file:
+            return self._with_lumi_blocks_from_map(map_file)
+        else:
+            return self._with_lumi_blocks_from_ara()
+
+    def _with_lumi_blocks_from_map(self, map_file):
+        with open(map_file) as mf:
+            for line in mf:
+                fname = line.split(' ')[0]
+                lbs = set(int(l) for l in line.split(' ')[1].split(','))
+                self.lb_map[fname] = lbs
+        def generator(s):
+            for f in s:
+                try:
+                    yield f, s.lb_map[os.path.basename(f)]
+                except KeyError:
+                    if s._strict:
+                        raise
+                    else:
+                        s.broken.append(f)
+        return generator(self)
+
+    def _with_lumi_blocks_from_ara(self):
+        def generator(s):
+            for f in s:
+                try:
+                    lbs = get_lumi_blocks(f)
+                except AccessError:
+                    if s._strict:
+                        raise
+                    else:
+                        s.broken.append(f)
+                        continue
+                yield f, set(lbs)
+        return generator(self)
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/python/ExtractLBFileMap.py b/InnerDetector/InDetExample/InDetBeamSpotExample/python/ExtractLBFileMap.py
deleted file mode 100755
index 52e6b1253d62e70062cb0d47c53317c17c435b49..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/python/ExtractLBFileMap.py
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-#
-import user
-import sys, traceback
-import os, re,commands,fnmatch
-from glob import glob
-import ROOT
-from PyUtils.Helpers import ShutUp, ROOT6Setup
-ROOT6Setup()
-rootMsg = ShutUp()
-rootMsg.mute()
-from PyCool import coral
-from time import ctime
-import cppyy
-import AthenaROOTAccess.transientTree
-rootMsg.unMute()
-
-from InDetBeamSpotExample import DiskUtils
-
-
-def getLBs(tt, name):
-    # Get helper for dumping EventStreamInfo
-    import AthenaPython.PyAthena as PyAthena
-    esi1 = PyAthena.EventStreamInfo
-
-    # Get EventStreamInfo
-    br  = tt.GetBranch( name )
-    if br == None: print "Could not find branch for ",name; return None
-    try:
-        if br.GetEntry( 0 ) <= 0:
-            print ":: Could not get meta data for first event for branch", anem
-        esi = getattr(tt, name)
-        if esi == None:
-            print "Could not get object for EventStreamInfo: ", name
-        else:
-            return esi.lumi_blocks()
-    
-    except Exception, e:
-        print "## Caught exception [%s] !!" % str(e.__class__)
-        print "## What:",e
-        import sys
-        print sys.exc_info()[0]
-        print sys.exc_info()[1]
-        sc = 1
-
-def extract(dirs, filter, prefix = True):
-    # Get list of file names for dir
-    fileNames = []
-    for arg in dirs:
-        # Handle castor
-        if os.path.isdir(arg) or "castor" in arg or "eos" in arg:
-            if arg.split('/')[1] in ('castor', 'eos'):
-                fileNames.extend(DiskUtils.filelist('%s/*%s*' % (arg,filter), prefix=prefix))
-            elif filter == 'dpd':
-                fileNames.extend(glob('%s/*/*-dpd.root' %(arg)))
-            else:
-                if os.path.isdir(arg):
-                    fileNames.extend(glob('%s/*%s*' % (arg, filter)))
-                else:
-                    print 'ERROR: arguments must be directories'
-                    sys.exit(1)
-        else:
-            for line in open(arg,'r'):
-                fileNames.append('root://eosatlas/'+line.rstrip())
-
-    fileNames = set( fileNames )
-    return extractFromFiles(fileNames)
-
-def extractFromFiles(fileNames):
-    sc = 0
-    lbDict = {}
-    # Loop over files
-    for fileName in fileNames:
-        try:
-            f = ROOT.TFile.Open (fileName)
-            assert f.IsOpen()
-            isNewDataHdr = True
-            tree = f.Get ('MetaDataHdr')
-
-            if not isinstance(tree, ROOT.TTree):
-                isNewDataHdr = False
-                tree = f.Get ('MetaDataHdrDataHeader')
-                if not isinstance(tree, ROOT.TTree):
-                    print "File does NOT contain meta data Tree"
-                    continue
-
-            # get the DataHeader_pX name
-            if isNewDataHdr:
-                branches = set([ 'DataHeader' ])
-            else:    
-                branches = set([ br.GetName() for br in tree.GetListOfBranches()
-                                 if re.match(r'DataHeader_p.*?', br.GetName()) ])
-
-            if len(branches) <= 0:
-                raise RuntimeError("Could not find a persistent DataHeader in MetaDataHdrDataHeader tree")
-            if len(branches) > 1:
-                print "*** Warning *** Too many DataHeader_pX:",branches
-
-            dh_name = branches.pop()
-
-            # Fill this in if you want to change the names of the transient branches.
-            branchNames = {}
-            if isNewDataHdr:
-                tt = AthenaROOTAccess.transientTree.makeTree(f, persTreeName='MetaData',
-                                                             dhTreeName='MetaDataHdr',
-                                                             dhBranchName=dh_name,
-                                                             branchNames = branchNames)
-            else:
-                tt = AthenaROOTAccess.transientTree.makeTree(f, persTreeName='MetaData',
-                                                             dhTreeName='MetaDataHdrDataHeader',
-                                                             dhBranchName=dh_name,
-                                                             branchNames = branchNames)
-
-            try:
-                for br in tt.GetListOfBranches():
-                    if not br.GetClassName() == 'EventStreamInfo': continue
-
-                    # Find LBs in a given file
-                    for lb in getLBs(tt, br.GetName()):
-                        fname = fileName.split('/')[-1]
-                        try:
-                            lbDict[fname].append(lb)
-                        except KeyError:
-                            lbDict[fname] = [lb]
-                    #print 'Added lbs for Dict'
-
-            except Exception, e:
-                print "## Caught exception [%s] !!" % str(e.__class__)
-                print "## What:",e
-                import sys
-                print sys.exc_info()[0]
-                print sys.exc_info()[1]
-                sc = 1
-                pass
-
-            #if not "eos" in fileName:
-            f.Close()
-        
-        except Exception, e:
-            print "## Caught exception [%s] !!" % str(e.__class__)
-            print "## What:",e
-            import sys
-            print sys.exc_info()[0]
-            print sys.exc_info()[1]
-            sc = 1
-            pass
-    return lbDict
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/python/JobRunner.py b/InnerDetector/InDetExample/InDetBeamSpotExample/python/JobRunner.py
index fbc8db071221578fbf35bcf34096160a0479cbdc..50402f61fbf71d9ec226df1e1d655bb3dfd4f2bf 100644
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/python/JobRunner.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/python/JobRunner.py
@@ -217,8 +217,8 @@ class JobRunner:
         """Show current job parameters."""
         for p in self.paramOrder:
             s = str(self.params[p])
-            if len(s)>maxLineLength:
-                s = s[0:maxLineLength-3]+'...'
+            if maxLineLength > 0 and len(s) > maxLineLength:
+                s = s[0:maxLineLength-3] + '...'
             print s
 
 
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/share/900GeV-BSToDPDTemplate.py b/InnerDetector/InDetExample/InDetBeamSpotExample/share/900GeV-BSToDPDTemplate.py
index 2362ad285bae836268c9802d1f9184ff8030c06a..6ffbe958136e311e0e4b003cabb85ed8ef30bf10 100755
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/share/900GeV-BSToDPDTemplate.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/share/900GeV-BSToDPDTemplate.py
@@ -161,9 +161,7 @@ InDetFlags.doMonitoringAlignment = False
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/share/900GeV-FirstData-BSToDPDTemplate.py b/InnerDetector/InDetExample/InDetBeamSpotExample/share/900GeV-FirstData-BSToDPDTemplate.py
index d2b0fcb143b85e9bc76f6904977d156bcb875dfe..70087353cbb6a686aaa1eae2f172d167ea474d0e 100755
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/share/900GeV-FirstData-BSToDPDTemplate.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/share/900GeV-FirstData-BSToDPDTemplate.py
@@ -151,9 +151,7 @@ InDetFlags.doMonitoringAlignment = False
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/share/BSToDPDTemplate.py b/InnerDetector/InDetExample/InDetBeamSpotExample/share/BSToDPDTemplate.py
index 4ea1c0f8dfbbb3a581c4b01c6bbbcda044a1be1d..02a9481f7d5c0cc2652914c1cfa7eefb8e7410f6 100644
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/share/BSToDPDTemplate.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/share/BSToDPDTemplate.py
@@ -191,9 +191,7 @@ InDetFlags.doMonitoringAlignment = False
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetBeamSpotExample/share/ReadInDetRecFragment.py b/InnerDetector/InDetExample/InDetBeamSpotExample/share/ReadInDetRecFragment.py
index 93e87c51b8df3eca56c7a6a943e45393ecc76fab..9b61c60e0f49ae7fa5a53541ee0ad9f76140b3fc 100644
--- a/InnerDetector/InDetExample/InDetBeamSpotExample/share/ReadInDetRecFragment.py
+++ b/InnerDetector/InDetExample/InDetBeamSpotExample/share/ReadInDetRecFragment.py
@@ -236,9 +236,7 @@ InDetFlags.doTrkNtuple        = False
 InDetFlags.doPixelTrkNtuple   = False
 InDetFlags.doSctTrkNtuple     = False
 InDetFlags.doTrtTrkNtuple     = False
-InDetFlags.doPixelClusterNtuple = False
 InDetFlags.doSctClusterNtuple   = False
-InDetFlags.doTrtDriftCircleNtuple = False
 InDetFlags.doVtxNtuple        = False
 InDetFlags.doConvVtxNtuple    = False
 InDetFlags.doV0VtxNtuple      = False
diff --git a/InnerDetector/InDetExample/InDetRecExample/doc/packagedoc.h b/InnerDetector/InDetExample/InDetRecExample/doc/packagedoc.h
index 9a1e9b5726f6e9977c97e7a605272db40db00bc0..eb5bd40a56ca7180d4e61c857396c7cb0d5d2bda 100644
--- a/InnerDetector/InDetExample/InDetRecExample/doc/packagedoc.h
+++ b/InnerDetector/InDetExample/InDetRecExample/doc/packagedoc.h
@@ -65,7 +65,6 @@ The following control what is written out. ESD includes AOD, so it's normally en
 @section InDetRecExample_Event Data Model Monitor
 In debug the EventDataModelMonitor will run and do instance counting of EDM objects to help flagging memory leaks.
 
-@section InDetRecExample_InDetRecExampleReq Requirements file
 
 
 */
diff --git a/InnerDetector/InDetExample/InDetRecExample/python/ConfiguredNewTrackingCuts.py b/InnerDetector/InDetExample/InDetRecExample/python/ConfiguredNewTrackingCuts.py
index bb0858285223da6c1e1440871d24b394cf642e37..de69d115c739bc1f3bbf694a61825054cea803e8 100755
--- a/InnerDetector/InDetExample/InDetRecExample/python/ConfiguredNewTrackingCuts.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/ConfiguredNewTrackingCuts.py
@@ -338,6 +338,30 @@ class ConfiguredNewTrackingCuts :
       self.__nHolesGapMax       = self.__maxHoles # not as tight as 2*maxDoubleHoles  
       self.__seedFilterLevel   = 1
       self.__maxTracksPerSharedPRD = 2
+
+    # --- mode for high-d0 tracks down to 100 MeV (minPT, minClusters, minSecondaryPt cuts loosened to MinBias level)
+    if mode == "LowPtLargeD0": 
+      self.__extension          = "LowPtLargeD0" # this runs parallel to NewTracking
+      self.__maxPT              = 1.0 * Units.TeV
+      self.__minPT              = 100 * Units.MeV
+      self.__maxEta             = 5
+      self.__maxPrimaryImpact   = 300.0 * Units.mm
+      self.__maxZImpact         = 1500.0 * Units.mm
+      self.__maxSecondaryImpact = 300.0 * Units.mm
+      self.__minSecondaryPt     = 400.0 * Units.MeV
+      self.__minClusters        = 5
+      self.__minSiNotShared     = 5
+      self.__maxShared          = 2   # cut is now on number of shared modules
+      self.__minPixel           = 0   
+      self.__maxHoles           = 2
+      self.__maxPixelHoles      = 1
+      self.__maxSctHoles        = 2
+      self.__maxDoubleHoles     = 1
+      self.__radMax             = 600. * Units.mm
+      self.__nHolesMax          = self.__maxHoles
+      self.__nHolesGapMax       = self.__maxHoles # not as tight as 2*maxDoubleHoles  
+      self.__seedFilterLevel   = 1
+      self.__maxTracksPerSharedPRD = 2
     
     # --- change defaults for low pt tracking  
     if mode == "LowPt": 
diff --git a/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py b/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py
index 8081bfa9069f5c302b8cf632fcf50b902361cbd9..ce406f9caa47937306c967f373d08f364f6272aa 100644
--- a/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py
+++ b/InnerDetector/InDetExample/InDetRecExample/python/InDetJobProperties.py
@@ -277,6 +277,12 @@ class doForwardTracks(InDetFlagsJobProperty):
     allowedTypes = ['bool']
     StoredValue  = True
 
+class doLowPtLargeD0(InDetFlagsJobProperty):
+    """Turn running of doLargeD0 second pass down to 100 MeV on and off"""
+    statusOn     = True
+    allowedTypes = ['bool']
+    StoredValue   = False
+
 class doLargeD0(InDetFlagsJobProperty):
     """Turn running of doLargeD0 second pass on and off"""
     statusOn     = True
@@ -721,24 +727,12 @@ class materialInteractionsType(InDetFlagsJobProperty):
     allowedValues= [0,1,2,3,4,5]
     StoredValue  = 3
 
-class doPixelClusterNtuple(InDetFlagsJobProperty):
-    """  """
-    statusOn     = True
-    allowedTypes = ['bool']
-    StoredValue  = False
-        
 class doSctClusterNtuple(InDetFlagsJobProperty):
     """  """
     statusOn     = True
     allowedTypes = ['bool']
     StoredValue  = False
 
-class doTrtDriftCircleNtuple(InDetFlagsJobProperty):
-    """  """
-    statusOn     = True
-    allowedTypes = ['bool']
-    StoredValue  = False
-
 class doTrkNtuple(InDetFlagsJobProperty):
     """  """
     statusOn     = True
@@ -1163,7 +1157,7 @@ class checkDeadElementsOnTrack(InDetFlagsJobProperty):
   """Enable check for dead modules and FEs""" 
   statusOn     = True 
   allowedTypes = ['bool']
-  StoredValue  = False
+  StoredValue  = True
 
 
 ##-----------------------------------------------------------------------------
@@ -1693,6 +1687,7 @@ class InDetJobProperties(JobPropertyContainer):
       # --------------------------------------------------------------------      
       # no Large radius tracking if pixel or sct off (new tracking = inside out only)
       self.doLargeD0 = self.doLargeD0() and (DetFlags.haveRIO.pixel_on() or DetFlags.haveRIO.SCT_on())
+      self.doLowPtLargeD0 = self.doLowPtLargeD0() and (DetFlags.haveRIO.pixel_on() or DetFlags.haveRIO.SCT_on())
       if self.doDVRetracking():
           self.setDVRetracking()
       
@@ -1738,7 +1733,7 @@ class InDetJobProperties(JobPropertyContainer):
       #
       # control whether to run SiSPSeededTrackFinder
       self.doSiSPSeededTrackFinder = (self.doNewTracking() or self.doNewTrackingSegments() or \
-                                      self.doBeamGas() or self.doLargeD0() ) \
+                                      self.doBeamGas() or self.doLargeD0() or self.doLowPtLargeD0() ) \
                                     and (DetFlags.haveRIO.pixel_on() or DetFlags.haveRIO.SCT_on())      
       # failsafe lines in case requirements are not met to run TRT standalone or back tracking
       self.doTRTStandalone         = self.doTRTStandalone() and DetFlags.haveRIO.TRT_on()
@@ -1925,7 +1920,7 @@ class InDetJobProperties(JobPropertyContainer):
   def doAmbiSolving(self):
     from AthenaCommon.DetFlags import DetFlags
     return (self.doNewTracking() or self.doBeamGas() or self.doTrackSegmentsPixel() \
-            or self.doTrackSegmentsSCT() or self.doLargeD0() ) \
+            or self.doTrackSegmentsSCT() or self.doLargeD0() or self.doLowPtLargeD0() ) \
            and (DetFlags.haveRIO.pixel_on() or DetFlags.haveRIO.SCT_on())
   
   def loadRotCreator(self):
@@ -1949,7 +1944,7 @@ class InDetJobProperties(JobPropertyContainer):
   def doNewTrackingPattern(self):
     return self.doNewTracking() or self.doBackTracking() or self.doBeamGas() \
            or self.doLowPt() or self.doVeryLowPt() or self.doTRTStandalone() \
-           or self.doForwardTracks() or self.doLargeD0()
+           or self.doForwardTracks() or self.doLargeD0() or self.doLowPtLargeD0()
 
   def doNewTrackingSegments(self):
     return self.doTrackSegmentsPixel() or self.doTrackSegmentsSCT() or self.doTrackSegmentsTRT()
@@ -1959,11 +1954,13 @@ class InDetJobProperties(JobPropertyContainer):
   
   def doTRTExtension(self):
     from AthenaCommon.DetFlags import DetFlags
-    return ((self.doNewTracking() or self.doBeamGas() or self.doLargeD0()) and DetFlags.haveRIO.TRT_on() ) and self.doTRTExtensionNew()
+    return ((self.doNewTracking() or self.doBeamGas() or self.doLargeD0() or self.doLowPtLargeD0()) \
+             and DetFlags.haveRIO.TRT_on() ) and self.doTRTExtensionNew()
   
   def doExtensionProcessor(self):
     from AthenaCommon.DetFlags    import DetFlags
-    return (self.doNewTracking() or self.doBeamGas() or self.doLargeD0()) and DetFlags.haveRIO.TRT_on()
+    return (self.doNewTracking() or self.doBeamGas() or self.doLargeD0() or self.doLowPtLargeD0()) \
+            and DetFlags.haveRIO.TRT_on()
  
   def solenoidOn(self):
     from AthenaCommon.BFieldFlags import jobproperties
@@ -1982,7 +1979,7 @@ class InDetJobProperties(JobPropertyContainer):
     return (self.useDCS() and DetFlags.dcs.TRT_on())  
 
   def doNtupleCreation(self):
-    return (self.doPixelClusterNtuple() or self.doSctClusterNtuple() or self.doTrtDriftCircleNtuple() or
+    return (self.doSctClusterNtuple() or
 	    self.doTrkNtuple() or self.doPixelTrkNtuple() or self.doSctTrkNtuple() or
             self.doTrtTrkNtuple() or self.doVtxNtuple() or self.doConvVtxNtuple() or
             self.doV0VtxNtuple())
@@ -2009,6 +2006,7 @@ class InDetJobProperties(JobPropertyContainer):
        self.doVeryLowPt               = False  
        self.doForwardTracks           = False
        self.doLargeD0                 = False
+       self.doLowPtLargeD0            = False
        self.doHadCaloSeededSSS        = False
 
        self.doxKalman                 = False
@@ -2287,7 +2285,7 @@ class InDetJobProperties(JobPropertyContainer):
           standAloneTracking += 'TRT'
        print standAloneTracking
     # -----------------------------------------
-    if self.doLargeD0() :
+    if self.doLargeD0() or self.doLowPtLargeD0() :
        print '*'
        print '* LargeD0 Tracking is ON'
        if self.doSiSPSeededTrackFinder() :
@@ -2420,13 +2418,9 @@ class InDetJobProperties(JobPropertyContainer):
        print '* run Physics Validation Monitoring'
     if self.doNtupleCreation():
        ntupleString = '* Ntuple cluster/drift circle trees activated:'
-       if self.doPixelClusterNtuple():
-          ntupleString += ' Pixel'
        if self.doSctClusterNtuple():
           ntupleString += ' SCT'
-       if self.doTrtDriftCircleNtuple():
-          ntupleString += ' TRT'
-       if self.doPixelClusterNtuple() or self.doSctClusterNtuple() or self.doTrtDriftCircleNtuple():
+       if self.doSctClusterNtuple():
           print ntupleString
 
        ntupleString = '* Ntuple track trees activated:'
@@ -2629,6 +2623,7 @@ _list_InDetJobProperties = [Enabled,
                             doVeryLowPt,
                             doSLHCConversionFinding,
                             doForwardTracks,
+                            doLowPtLargeD0,
                             doLargeD0,
                             useExistingTracksAsInput,
                             cutLevel,
@@ -2702,9 +2697,7 @@ _list_InDetJobProperties = [Enabled,
                             doPhysValMon,
                             materialInteractions,
                             materialInteractionsType,
-                            doPixelClusterNtuple,
                             doSctClusterNtuple,
-                            doTrtDriftCircleNtuple,
                             doTrkNtuple,
                             doPixelTrkNtuple,
                             doSctTrkNtuple,
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py
index 954bbd62ed95805fd0beb2e8887db04c3da91760..9cfb0b31a11c761673a7e4ca9d07a38ef2095c3e 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredBackTracking.py
@@ -225,7 +225,11 @@ class ConfiguredBackTracking:
                                                                      usePixel                = NewTrackingCuts.usePixel(),
                                                                      useSCT                  = NewTrackingCuts.useSCT(),
                                                                      minTRTonTrk             = NewTrackingCuts.minSecondaryTRTonTrk(),
-                                                                     minTRTPrecisionFraction = NewTrackingCuts.minSecondaryTRTPrecFrac())
+                                                                     minTRTPrecisionFraction = NewTrackingCuts.minSecondaryTRTPrecFrac(),
+                                                                     doEmCaloSeed = DetFlags.detdescr.Calo_allOn())
+            if not InDetTRT_SeededScoringTool.doEmCaloSeed:
+               InDetTRT_SeededScoringTool.InputEmClusterContainerName = ''
+                                                                     
          # InDetTRT_SeededScoringTool.OutputLevel = DEBUG
          ToolSvc += InDetTRT_SeededScoringTool
          if (InDetFlags.doPrintConfigurables()):
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
index 6fcba2f0104d604ec7e2217945e69c89ec9b02e3..75dc1ac309b7be6f2e0d1f03d83a5db1c207d2a4 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingSiPattern.py
@@ -24,7 +24,7 @@ class  ConfiguredNewTrackingSiPattern:
       #
       # --- decide if use the association tool
       #
-      if (len(InputCollections) > 0) and (NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode() == "BeamGas" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "ForwardSLHCTracks"  or NewTrackingCuts.mode() == "PixelPrdAssociation" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks" or NewTrackingCuts.mode() == "SLHCConversionFinding"):
+      if (len(InputCollections) > 0) and (NewTrackingCuts.mode() == "LowPt" or NewTrackingCuts.mode() == "VeryLowPt" or NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode() == "LowPtLargeD0" or NewTrackingCuts.mode() == "BeamGas" or NewTrackingCuts.mode() == "ForwardTracks" or NewTrackingCuts.mode() == "ForwardSLHCTracks"  or NewTrackingCuts.mode() == "PixelPrdAssociation" or NewTrackingCuts.mode() == "VeryForwardSLHCTracks" or NewTrackingCuts.mode() == "SLHCConversionFinding"):
          usePrdAssociationTool = True
       else:
          usePrdAssociationTool = False
@@ -237,7 +237,7 @@ class  ConfiguredNewTrackingSiPattern:
          elif NewTrackingCuts.mode() == "SLHCConversionFinding":
            InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_SLHCConversionTracks'
 
-         elif NewTrackingCuts.mode() == "LargeD0":
+         elif NewTrackingCuts.mode() == "LargeD0" or NewTrackingCuts.mode() == "LowPtLargeD0":
            InDetSiTrackMaker.TrackPatternRecoInfo = 'SiSpacePointsSeedMaker_LargeD0'
         
          else:
@@ -414,9 +414,11 @@ class  ConfiguredNewTrackingSiPattern:
                                                                usePixel                = NewTrackingCuts.usePixel(),
                                                                useSCT                  = NewTrackingCuts.useSCT(),
                                                                InputEmClusterContainerName = InDetKeys.CaloClusterROIContainer(),
-                                                               doEmCaloSeed            = True and InDetFlags.doCaloSeededBrem(),
+                                                               doEmCaloSeed            = True and InDetFlags.doCaloSeededBrem() and DetFlags.detdescr.Calo_allOn(),
                                                                minTRTonTrk             = 0,
                                                                minTRTPrecisionFraction = 0);
+            if not InDetAmbiScoringTool.doEmCaloSeed:
+               InDetAmbiScoringTool.InputEmClusterContainerName = ''
             # allow for some overlap for low-pt tracking
             #if InDetFlags.doLowPt() and not NewTrackingCuts.mode() == "LowPt":
             #   InDetAmbiScoringTool.minPt = NewTrackingCuts.minPT()-100.*Units.MeV
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingTRTExtension.py b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingTRTExtension.py
index 9bbbb99024070a2886c9d7d697bff037fec01c16..5b23c3eb1fe774dd055ebe141a3c8593022c1e45 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingTRTExtension.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ConfiguredNewTrackingTRTExtension.py
@@ -133,7 +133,11 @@ class  ConfiguredNewTrackingTRTExtension:
                                                                 usePixel                = NewTrackingCuts.usePixel(),
                                                                 useSCT                  = NewTrackingCuts.useSCT(),
                                                                 minTRTonTrk             = NewTrackingCuts.minTRTonTrk(),
-                                                                minTRTPrecisionFraction = NewTrackingCuts.minTRTPrecFrac())
+                                                                minTRTPrecisionFraction = NewTrackingCuts.minTRTPrecFrac(),
+                                                                doEmCaloSeed = DetFlags.detdescr.Calo_allOn())
+            if not InDetExtenScoringTool.doEmCaloSeed:
+               InDetExtenScoringTool.InputEmClusterContainerName = ''
+            
             
             if InDetFlags.trackFitterType() in ['KalmanFitter', 'KalmanDNAFitter', 'ReferenceKalmanFitter']:
                InDetExtenScoringTool.minTRTPrecisionFraction = 0.2
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringAlignment.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringAlignment.py
index d118a0818beb9ee2b0719940ff57e1527b0984ed..11d103a3851b545df6bb54177295e816e5e6dfeb 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringAlignment.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringAlignment.py
@@ -52,7 +52,7 @@ if not jobproperties.Beam.beamType()=='cosmics':
                                                                          maxNPixelHoles = 1,
                                                                          minNBothInnermostLayersHits = 0,
                                                                          minNInnermostLayerHits = 1,
-                                                                         minPt = 1000,
+                                                                         minPt = 5000,
                                                                          TrackSummaryTool    = InDetTrackSummaryTool,
                                                                          Extrapolator        = InDetExtrapolator))
    
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py
index 48ce0c7eb18445de0671c1e420a5b6004fb542ef..7ad6440b165e02973f5443845c8335597c6bbbf5 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py
@@ -1,9 +1,5 @@
 # configure the pixel main monitoring tool
 doAllHits          = True
-# online: only run pixel tracks, offline: only combined tracks available
-#doHitsOnPixelTrack = True if athenaCommonFlags.isOnline() else False
-#doHitsOnTrack      = False if athenaCommonFlags.isOnline() else True
-doHitsOnPixelTrack = False
 doHitsOnTrack      = True
 
 # switch on all modules histograms for all hits if pixel online monitoring
@@ -20,8 +16,7 @@ if doAllHits:
      doDCS = True 
   InDetPixelMainsMon=PixelMainMon(name                = "InDetPixelMonitoringAllHits",
                                   onTrack             = False,
-                                  onPixelTrack        = False,
-                                  #TrkSummaryTool      = InDetTrackSummaryTool,
+
                                   ##Flags for normal monitoring.  This will run over all hits/clusters/etc, not just ones on track    
                                   doOffline           = True,       #Histograms for offline (tier0) running                                             
                                   doOnline            = True if athenaCommonFlags.isOnline() else False,      #Histograms for online (athenaPT) running
@@ -29,14 +24,10 @@ if doAllHits:
 
                                   do2DMaps            = True,       #Turn on/off the sets of 2D module maps                                             
                                   doModules           = doAllHitsModules, #Turn on/off the sets of 1744 module histograms (for dqmf)
-                                  doFEChipSummary     = doAllHitsModules, #Turn on/off the 1744 module FE chip summary histograms (low memory version of doModules)
                                   doLowOccupancy      = False,      #Turn on/off histograms with binning for cosmics/single beam                        
                                   doHighOccupancy     = True,       #Turn on/off histograms with binning for collisions                                 
-                                  doRodSim            = False,      #Turn on/off histograms specific for the rod simulator                              
                                   doDetails           = False,      #Turn on/off the set of histograms with detailed info for 4 modules                 
                                   doPixelOccupancy    = False,      #Turn on/off histograms displaying pixel occupancy.  VERY memory heavy!      
-                                  doSpectrum          = False,      #Turn on/off histograms displaying pixel occupancy spectrum.  VERY memory heavy!    
-                                  doNoiseMap          = False,      #Turn on/off histograms displaying pixel occupancy noise map.  VERY memory heavy!
                                   doLumiBlock         = False if athenaCommonFlags.isOnline() else True,       #Turn on/off histograms stored for each lumi block
                                   
                                   doTiming            = True,       #Turn on/off histograms with BCID/timing information  
@@ -55,13 +46,11 @@ if doAllHits:
                                   DetailsMod1         = "D1A_B03_S2_M3",  #Give the 4 modules which you want to do detailed monitoring of                        
                                   DetailsMod2         = "L0_B05_S2_M1A",  #Use the normal name like D1A_B03_S2_M4 or                                             
                                   DetailsMod3         = "L1_B10_S1_M2C",  #L1_B10_S2_M2C and the code should be able to parse
-                                  DetailsMod4         = "D2C_B01_S1_M6",  #this for you
-                                  OccupancyCut        = 1e-5)
+                                  DetailsMod4         = "D2C_B01_S1_M6")
   
   InDetPixelMainsMon.TrackName = InDetKeys.PixelTracks() if InDetFlags.doTrackSegmentsPixel() else InDetKeys.Tracks() 
     
   ##Other parameters                                                                                                                  
-  #PixelMainsMon.OfflineDoPixelOccupancy = False  #pixel occupancy plots for offline analysis.  Leave off except for private analysis 
 
   if jobproperties.Beam.beamType()=='collisions' and hasattr(ToolSvc, 'DQFilledBunchFilterTool'):
     InDetPixelMainsMon.FilterTools.append(monFilledBunchFilterTool)
@@ -75,29 +64,24 @@ if doAllHits:
 if doHitsOnTrack:
   InDetPixelMainsMonOnTrack=PixelMainMon(name                = "InDetPixelMonitoringOnTrack",
                                          onTrack             = True,
-                                         onPixelTrack        = False,
-                                         #TrkSummaryTool      = InDetTrackSummaryTool,                                         
+
                                          ##Flags for data container types                                                                                                    
                                          doOffline           = True,      #Histograms for offline (tier0) running                                          
                                          doOnline            = True if athenaCommonFlags.isOnline() else False,     #Histograms for online (athenaPT) running                                        
                                          doHeavyIonMon       = InDetFlags.doHeavyIon(),   # Histogram modification for heavy ion monitoring
 
                                          do2DMaps            = True ,     #Turn on/off the sets of 2D module maps                                          
-                                         doModules           = False,     #Turn on/off the sets of 1744 module histograms (for dqmf)                       
-                                         doFEChipSummary     = False,     #Turn on/off the 1744 module FE chip summary histograms (low memory version of doModules)
+                                         doModules           = doAllHitsModules,     #Turn on/off the sets of 1744 module histograms (for dqmf)                       
                                          doLowOccupancy      = False,     #Turn on/off histograms with binning for cosmics/single beam                     
                                          doHighOccupancy     = True,      #Turn on/off histograms with binning for collisions                              
-                                         doRodSim            = False,     #Turn on/off histograms specific for the rod simulator                           
                                          doDetails           = False,     #Turn on/off the set of histograms with detailed info for 4 modules              
                                          doPixelOccupancy    = False,     #Turn on/off histograms displaying pixel occupancy.  VERY memory heavy!          
-                                         doSpectrum          = False,     #Turn on/off histograms displaying pixel occupancy spectrum.  VERY memory heavy! 
-                                         doNoiseMap          = False,     #Turn on/off histograms displaying pixel occupancy noise map.  VERY memory heavy!
                                          doLumiBlock         = False if athenaCommonFlags.isOnline() else True,      #Turn on/off histograms stored for each lumi block
                                          doHoleSearch        = True,
                                          doTiming            = False,     #Turn on/off histograms with BCID/timing information                             
                                          doRDO               = False,     #Turn on/off histograms with RDO/Hit  information                                
                                          doErrors            = False,     #Turn on/off histograms with ROD Error information                               
-                                         doSpacePoint        = False,     #Turn on/off histograms with Spacepoint information                              
+                                         doSpacePoint        = True,      #Turn on/off histograms with Spacepoint information                              
                                          doCluster           = True,      #Turn on/off histograms with Cluster information
                                          doTrack             = True,      #Turn on/off histograms with Track information                                   
                                          doStatus            = False,     #Turn on/off histograms with Module Status information                           
@@ -112,13 +96,11 @@ if doHitsOnTrack:
                                          DetailsMod1         = "D1A_B03_S2_M3",  #Give the 4 modules which you want to do detailed monitoring of                 
                                          DetailsMod2         = "L0_B05_S2_M1A",  #Use the normal name like D1A_B03_S2_M4 or                                      
                                          DetailsMod3         = "L1_B10_S1_M2C",  #L1_B10_S2_M2C and the code should be able to parse                             
-                                         DetailsMod4         = "D2C_B01_S1_M6",  #this for you                                                                   
-                                         OccupancyCut        = 1e-5)                                                                           
+                                         DetailsMod4         = "D2C_B01_S1_M6")                                                                   
   
   InDetPixelMainsMonOnTrack.TrackName      = InDetKeys.Tracks()
 
   ##Other parameters                                                                                                                  
-  #PixelMainsMon.OfflineDoPixelOccupancy = False  #pixel occupancy plots for offline analysis.  Leave off except for private analysis 
 
   if jobproperties.Beam.beamType()=='collisions' and hasattr(ToolSvc, 'DQFilledBunchFilterTool'):
     InDetPixelMainsMonOnTrack.FilterTools.append(monFilledBunchFilterTool)
@@ -129,65 +111,6 @@ if doHitsOnTrack:
 
 ##########################################################################
 
-if doHitsOnPixelTrack:
-  InDetPixelMainsMonOnPixelTrack=PixelMainMon(name                = "InDetPixelMonitoringOnPixelTrack",
-                                              onTrack             = False,
-                                              onPixelTrack        = True,
-                                              #TrkSummaryTool      = InDetTrackSummaryTool,                                              
-                                              ##Flags for data container types
-                                              doOffline           = True,      #Histograms for offline (tier0) running                                          
-                                              doOnline            = True if athenaCommonFlags.isOnline() else False,     #Histograms for online (athenaPT) running                                        
-                                              doHeavyIonMon       = InDetFlags.doHeavyIon(),   # Histogram modification for heavy ion monitoring
-
-                                              do2DMaps            = True ,     #Turn on/off the sets of 2D module maps                                          
-                                              doModules           = False,     #Turn on/off the sets of 1744 module histograms (for dqmf)                       
-                                              doFEChipSummary     = False,     #Turn on/off the 1744 module FE chip summary histograms (low memory version of doModules)
-                                              doLowOccupancy      = True,      #Turn on/off histograms with binning for cosmics/single beam                     
-                                              doHighOccupancy     = True,      #Turn on/off histograms with binning for collisions                              
-                                              doRodSim            = False,     #Turn on/off histograms specific for the rod simulator                           
-                                              doDetails           = False,     #Turn on/off the set of histograms with detailed info for 4 modules              
-                                              doPixelOccupancy    = False,     #Turn on/off histograms displaying pixel occupancy.  VERY memory heavy!          
-                                              doSpectrum          = False,     #Turn on/off histograms displaying pixel occupancy spectrum.  VERY memory heavy! 
-                                              doNoiseMap          = False,     #Turn on/off histograms displaying pixel occupancy noise map.  VERY memory heavy!
-                                              doLumiBlock         = False if athenaCommonFlags.isOnline() else True,      #Turn on/off histograms stored for each lumi block
-                                              
-                                              doTiming            = False,     #Turn on/off histograms with BCID/timing information                             
-                                              doRDO               = False,     #Turn on/off histograms with RDO/Hit  information                                
-                                              doErrors            = False,     #Turn on/off histograms with ROD Error information                               
-                                              doSpacePoint        = False,     #Turn on/off histograms with Spacepoint information                              
-                                              doCluster           = True,      #Turn on/off histograms with Cluster information
-                                              doTrack             = True,      #Turn on/off histograms with Track information                                   
-                                              doStatus            = False,     #Turn on/off histograms with Module Status information                           
-                                              doDCS               = False,
-                                             
-                                              ##Names of storegate containers
-                                              RDOName             = InDetKeys.PixelRDOs(),                                                                         
-                                              RODErrorName        = "pixel_error_summary",                                                                         
-                                              SpacePointName      = InDetKeys.PixelSpacePoints(),                                                                  
-                                              ClusterName         = InDetKeys.PixelClusters(),                                                                     
-                                              
-                                              DetailsMod1         = "D1A_B03_S2_M3",  #Give the 4 modules which you want to do detailed monitoring of                 
-                                              DetailsMod2         = "L0_B05_S2_M1A",  #Use the normal name like D1A_B03_S2_M4 or                                      
-                                              DetailsMod3         = "L1_B10_S1_M2C",  #L1_B10_S2_M2C and the code should be able to parse                             
-                                              DetailsMod4         = "D2C_B01_S1_M6",  #this for you                                                                   
-                                              OccupancyCut        = 1e-5)                                                                           
-  
-  InDetPixelMainsMonOnPixelTrack.TrackName = InDetKeys.PixelTracks() 
-
-  ##Other parameters                                                                                                                  
-  #PixelMainsMon.OfflineDoPixelOccupancy = False  #pixel occupancy plots for offline analysis.  Leave off except for private analysis 
-
-  if jobproperties.Beam.beamType()=='collisions' and hasattr(ToolSvc, 'DQFilledBunchFilterTool'):
-    InDetPixelMainsMonOnPixelTrack.FilterTools.append(monFilledBunchFilterTool)
-  
-  ToolSvc += InDetPixelMainsMonOnPixelTrack                
-  if (InDetFlags.doPrintConfigurables()): 
-    print InDetPixelMainsMonOnPixelTrack            
-
-
-######################################
-
-
 # configure the pixel mon manager and add main pixel monitoring tool
 from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
 from AthenaMonitoring.DQMonFlags           import DQMonFlags
@@ -204,8 +127,6 @@ if doAllHits:
   InDetPixMonMan.AthenaMonTools     += [ InDetPixelMainsMon ]
 if doHitsOnTrack:
   InDetPixMonMan.AthenaMonTools     += [ InDetPixelMainsMonOnTrack ]
-if doHitsOnPixelTrack:
-  InDetPixMonMan.AthenaMonTools     += [ InDetPixelMainsMonOnPixelTrack ]
 
 topSequence += InDetPixMonMan
 if (InDetFlags.doPrintConfigurables()):
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py
index 9f57e1de5a39a1d88124ee01a7968d332adcdd65..c1b0b5a4f309935dcf290e35cc46a3ea15c0f798 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecConditionsAccess.py
@@ -214,9 +214,14 @@ if DetFlags.haveRIO.SCT_on():
         conddb.addFolderSplitMC("SCT","/SCT/DAQ/Calibration/NoiseOccupancyDefects","/SCT/DAQ/Calibration/NoiseOccupancyDefects")
 
     if not athenaCommonFlags.isOnline():
-        if not conddb.folderRequested('/SCT/Derived/Monitoring'):
-            conddb.addFolder("SCT_OFL","/SCT/Derived/Monitoring")
-    
+        sctDerivedMonitoringFolder = '/SCT/Derived/Monitoring'
+        if not conddb.folderRequested(sctDerivedMonitoringFolder):
+            conddb.addFolder("SCT_OFL", sctDerivedMonitoringFolder, className="CondAttrListCollection")
+            from AthenaCommon.AlgSequence import AthSequencer
+            condSequence = AthSequencer("AthCondSeq")
+            from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_MonitorConditionsCondAlg
+            condSequence += SCT_MonitorConditionsCondAlg(name = "SCT_MonitorConditionsCondAlg",
+                                                         ReadKey = sctDerivedMonitoringFolder)
     
     # Load conditions summary service
     from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_ConditionsSummarySvc
@@ -251,11 +256,7 @@ if DetFlags.haveRIO.SCT_on():
     if not athenaCommonFlags.isOnline():
         from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_MonitorConditionsSvc
         InDetSCT_MonitorConditionsSvc = SCT_MonitorConditionsSvc(name          = "InDetSCT_MonitorConditionsSvc",
-                                                                 OutputLevel   = INFO,
-                                                                 WriteCondObjs = False,
-                                                                 RegisterIOV   = False,
-                                                                 ReadWriteCool = True,
-                                                                 EventInfoKey  = eventInfoKey)
+                                                                 OutputLevel   = INFO)
         ServiceMgr += InDetSCT_MonitorConditionsSvc
         if (InDetFlags.doPrintConfigurables()):
             print InDetSCT_MonitorConditionsSvc
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecNtupleCreation.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecNtupleCreation.py
index 790421697e24a572402a0d0278324b2eb8e588f0..b3135009493bf6e19c4a9ef8e0196ecb8d5dc9db 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecNtupleCreation.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecNtupleCreation.py
@@ -49,28 +49,6 @@ if InDetFlags.doNtupleCreation():
 
     minNumberOfPixelHitsForTracksInNtuple = 1 # for now, crashes if set to zero, under investigation
 
-    if InDetFlags.doPixelTrkNtuple() or InDetFlags.doSctTrkNtuple():
-      # Pixel specific helper tool
-      from InDetTrackValidation.InDetTrackValidationConf import InDet__SiResidualValidationNtupleHelper
-      PixSiResidualNtupleHelper      = InDet__SiResidualValidationNtupleHelper( name = 'InDetPixelSiResidualValHelper' )
-      ToolSvc += PixSiResidualNtupleHelper
-      if (InDetFlags.doPrintConfigurables()):
-        print PixSiResidualNtupleHelper
-      # add to lists of tools to use
-      if InDetFlags.doPixelTrkNtuple():
-        PixelNtupleHelperToolsList  += [PixSiResidualNtupleHelper]
-      if InDetFlags.doSctTrkNtuple():
-        SCTNtupleHelperToolsList    += [PixSiResidualNtupleHelper]
-    
-    # helper tool to fill trt ntuple part with drift time info
-    if InDetFlags.doTrtTrkNtuple():
-      from InDetTrackValidation.InDetTrackValidationConf import InDet__TRT_DriftTimeNtupleHelper
-      TRT_DriftTimeNtupleHelper      = InDet__TRT_DriftTimeNtupleHelper ( name = 'InDetTRT_DriftTimeNtupleHelper' )
-      ToolSvc += TRT_DriftTimeNtupleHelper
-      if (InDetFlags.doPrintConfigurables()):
-        print TRT_DriftTimeNtupleHelper
-      TRTNtupleHelperToolsList  += [TRT_DriftTimeNtupleHelper]
-
     # --- set ntuple structore for track variables
     from TrkValTools.TrkValToolsConf import Trk__TrackInformationNtupleTool
     InDetTrackInfoNtupleTool = Trk__TrackInformationNtupleTool(name="InDetTrackInfoNtupleTool")
@@ -109,7 +87,7 @@ if InDetFlags.doNtupleCreation():
                                                             maxD0                 = 2000.,
                                                             maxD0overSigmaD0      = 500.,
                                                             numberOfPixelHits     = minNumberOfPixelHitsForTracksInNtuple,
-                                                            numberOfBLayerHits    = 0,
+                                                            numberOfInnermostPixelLayerHits    = 0,
                                                             TrackSummaryTool      = InDetTrackSummaryTool)
     #if (InDetFlags.doLowPt()):
     #  TrkValTrackSelectorTool.minPt = InDetNewTrackingCutsLowPt.minPT()
@@ -121,7 +99,7 @@ if InDetFlags.doNtupleCreation():
       TrkValTrackSelectorTool.maxD0                   = 9999999.0
       TrkValTrackSelectorTool.maxD0overSigmaD0        = 9999999.0
       TrkValTrackSelectorTool.numberOfPixelHits       =       1
-      TrkValTrackSelectorTool.numberOfBLayerHits      =       0
+      TrkValTrackSelectorTool.numberOfInnermostPixelLayerHits      =       0
       
     ToolSvc += TrkValTrackSelectorTool
     if (InDetFlags.doPrintConfigurables()):
@@ -178,20 +156,6 @@ if InDetFlags.doNtupleCreation():
       print TrkValNtupleWriter
 
   # configure sub detector tracking independent ntuple trees
-  if InDetFlags.doPixelClusterNtuple():
-    # include Pixel ntuple writer alg
-    # adds information about all PRDs in the Pixels
-    from InDetTrackValidation.InDetTrackValidationConf import InDet__PixelClusterValidationNtupleWriter
-    PixelNtupleWriter = InDet__PixelClusterValidationNtupleWriter(name                       = 'InDetPixelClusterValidationNtupleWriter',
-                                                                  NtupleFileName           = 'TRKVAL',
-                                                                  NtupleDirectoryName      = 'Validation',
-                                                                  NtupleTreeName           = 'PixelRIOs',
-                                                                  PixelClusterContainer    = InDetKeys.PixelClusters())
-    if rec.Production() and globalflags.DataSource == "data":
-      PixelNtupleWriter.WriteDetailedPixelInformation=True
-    topSequence += PixelNtupleWriter
-    if (InDetFlags.doPrintConfigurables()):
-      print PixelNtupleWriter  
 
   if InDetFlags.doSctClusterNtuple():
     from InDetTrackValidation.InDetTrackValidationConf import InDet__SCT_ClusterValidationNtupleWriter
@@ -204,20 +168,7 @@ if InDetFlags.doNtupleCreation():
     topSequence += SctNtupleWriter
     if (InDetFlags.doPrintConfigurables()):
       print SctNtupleWriter
-
-  if InDetFlags.doTrtDriftCircleNtuple():
-    # include TRT ntuple writer alg (large ntuple !!!)
-    # adds information about all PRDs in the TRT
-    from InDetTrackValidation.InDetTrackValidationConf import InDet__TRT_DriftCircleValidationNtupleWriter
-    TRT_NtupleWriter = InDet__TRT_DriftCircleValidationNtupleWriter(name                     = 'InDetTRT_DriftCircleNtupleWriter',
-                                                                    NtupleFileName           = 'TRKVAL',
-                                                                    NtupleDirectoryName      = 'Validation',
-                                                                    NtupleTreeName           = 'TRT_RIOs',
-                                                                    TRT_DriftCircleContainer = InDetKeys.TRT_DriftCircles())
-    topSequence += TRT_NtupleWriter
-    if (InDetFlags.doPrintConfigurables()):
-      print TRT_NtupleWriter
-  
+ 
   # --------------------------------------------      
 
   if InDetFlags.doVtxNtuple():  
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
index f225e02c08efa38e9590284df8bd6c3d4cbbf27f..0bb671845f64d3d69efab42f3c4cba7c454c63ac 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_all.py
@@ -14,7 +14,7 @@
 from AthenaCommon.AppMgr import theApp
 from AthenaCommon.AppMgr import ServiceMgr
 #
-from AthenaCommon.AlgSequence import AlgSequence
+from AthenaCommon.AlgSequence import AlgSequence, AthSequencer
 topSequence = AlgSequence()
 #
 from AthenaCommon.AppMgr import ToolSvc
@@ -74,6 +74,12 @@ else:
     ServiceMgr.EventSelector.SkipEvents         = athenaCommonFlags.SkipEvents()
 
 
+# --- Conditions input loader.
+from IOVSvc.IOVSvcConf import CondInputLoader
+condSeq = AthSequencer("AthCondSeq")
+condSeq += CondInputLoader()
+
+
 # ---- Beam Spot service
 include("InDetBeamSpotService/BeamCondSvc.py")
 # --- particle property service
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
index f7f76eda2a8532c137de0637ab40e3c1fe9e8a56..15d072992d4508895312d3d2a9e8f03e7c69ecd5 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRec_jobOptions.py
@@ -442,7 +442,7 @@ else:
     #     after standard reconstruction...?
     #
     # ------------------------------------------------------------
-    if InDetFlags.doLargeD0():
+    if InDetFlags.doLargeD0() or InDetFlags.doLowPtLargeD0():
       #
       # --- run Si pattern for high-d0
       #
@@ -452,7 +452,10 @@ else:
       if (not 'InDetNewTrackingCutsLargeD0' in dir()):
         print "InDetRec_jobOptions: InDetNewTrackingCutsLargeD0 not set before - import them now"      
         from InDetRecExample.ConfiguredNewTrackingCuts import ConfiguredNewTrackingCuts
-        InDetNewTrackingCutsLargeD0 = ConfiguredNewTrackingCuts("LargeD0")
+        if InDetFlags.doLowPtLargeD0():
+          InDetNewTrackingCutsLargeD0 = ConfiguredNewTrackingCuts("LowPtLargeD0")
+        else:
+          InDetNewTrackingCutsLargeD0 = ConfiguredNewTrackingCuts("LargeD0")
       InDetNewTrackingCutsLargeD0.printInfo()
       include ("InDetRecExample/ConfiguredNewTrackingSiPattern.py")
       # ----- Include (in the case of ESD processing) the standard tracks
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetxAODCreator.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetxAODCreator.py
index f89442e9885458a125dc4e1ce847f6336fe64000..2ab28ad08b31e4061f9fdcd7d4b3912b72be5d7f 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetxAODCreator.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetxAODCreator.py
@@ -1,10 +1,10 @@
 from InDetRecExample.InDetJobProperties import InDetFlags
 from InDetRecExample.InDetKeys import InDetKeys
 
-doCreation = ( InDetFlags.doNewTracking() or InDetFlags.doPseudoTracking() or InDetFlags.doLargeD0) \
+doCreation = ( InDetFlags.doNewTracking() or InDetFlags.doPseudoTracking() or InDetFlags.doLargeD0() or InDetFlags.doLowPtLargeD0() ) \
                     and InDetFlags.doParticleCreation()
 doConversion = not InDetFlags.doNewTracking()  and not InDetFlags.doPseudoTracking() and not InDetFlags.doLargeD0() \
-                    and InDetFlags.doParticleConversion()
+                    and not InDetFlags.doLowPtLargeD0() and InDetFlags.doParticleConversion()
 
 if doCreation:
     print "Creating xAOD::TrackParticles from Trk::Tracks"
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/ReadInDet_jobOptions.py b/InnerDetector/InDetExample/InDetRecExample/share/ReadInDet_jobOptions.py
index 3581a078871d49826ba37f77b9ce01a3ffa117ba..2a878d78ebcf87dc86689062b2cf28f34b4fdad4 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/ReadInDet_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/ReadInDet_jobOptions.py
@@ -156,9 +156,7 @@ InDetFlags.doTrkNtuple        = False
 InDetFlags.doPixelTrkNtuple   = False
 InDetFlags.doSctTrkNtuple     = False
 InDetFlags.doTrtTrkNtuple     = False
-InDetFlags.doPixelClusterNtuple = False
 InDetFlags.doSctClusterNtuple   = False
-InDetFlags.doTrtDriftCircleNtuple = False
 InDetFlags.doVtxNtuple        = False
 InDetFlags.doConvVtxNtuple    = False
 InDetFlags.doV0VtxNtuple      = False
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_900gev.py b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_900gev.py
index 2d2aa6f1831fd1b7d2fb643a84fec93154783a8d..e02b1e2ba053eaf3379407e87c0b8141562e2173 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_900gev.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_900gev.py
@@ -151,9 +151,7 @@ InDetFlags.doMonitoringAlignment = True
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_HeavyIons.py b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_HeavyIons.py
index 084e1af7ffc2af635728b48f261587c61f0f397c..92b14fc473e6a2381e6679f45a3bd82ae2a94261 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_HeavyIons.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_HeavyIons.py
@@ -130,9 +130,7 @@ InDetFlags.doTruth       = (globalflags.DataSource == 'geant4' and globalflags.I
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_Standalone.py b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_Standalone.py
index ce1c3d4f493a55078f83d4d1a5f7e59c7c0dd48c..3592bb89ceca0df0d263c0805e92a951eba1b76b 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_Standalone.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_Standalone.py
@@ -180,9 +180,7 @@ InDetFlags.doMonitoringAlignment = False
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_StandaloneDBM_RAW.py b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_StandaloneDBM_RAW.py
index 3e0c5aed4d017c6c1e834dd169cc595783527f74..bc5e50e6c0ea2ea959648335dbc4e00c007f83c3 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_StandaloneDBM_RAW.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_StandaloneDBM_RAW.py
@@ -134,7 +134,6 @@ InDetFlags.doPhysValMon  = False
 # --- produce various ntuples (all in one root file)
 InDetFlags.doTrkNtuple      = False
 InDetFlags.doPixelTrkNtuple = False
-InDetFlags.doPixelClusterNtuple = False
 #InDetFlags.doMinBias   = True
 
 # activate the print InDetXYZAlgorithm statements
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_StandaloneDBM_RDO.py b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_StandaloneDBM_RDO.py
index 359f800c35f045988e9564cea1d62827b3c2a2fa..8082accc2dffab23d6fce62b19c6f98597ef82aa 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_StandaloneDBM_RDO.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_StandaloneDBM_RDO.py
@@ -140,7 +140,6 @@ InDetFlags.doPhysValMon  = True
 # --- produce various ntuples (all in one root file)
 InDetFlags.doTrkNtuple      = False
 InDetFlags.doPixelTrkNtuple = False
-InDetFlags.doPixelClusterNtuple = False
 
 #InDetFlags.doMinBias   = True
 
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_cosmic.py b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_cosmic.py
index b6073371aed614ee66e0977bb234da18b5548f59..a95b07cffc644f5f9d0f206d7a92961c6a6e405e 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_cosmic.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_cosmic.py
@@ -153,9 +153,7 @@ InDetFlags.doTruth       = (globalflags.DataSource == 'geant4' and globalflags.I
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_singlebeam.py b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_singlebeam.py
index 2e4d7fdfd4b1a42025c039e91243b2bf6ef2cfa1..de1f4d753e7b2d815164c3a7bc892f8edc414a40 100755
--- a/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_singlebeam.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/jobOptions_singlebeam.py
@@ -131,9 +131,7 @@ InDetFlags.doTruth = (globalflags.DataSource == 'geant4' and globalflags.InputFo
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/GeantinoMapping_ITk_jobOptions.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/GeantinoMapping_ITk_jobOptions.py
index 075d293c80636afaab3d98da1fe8cf1039aaa040..2b1ae6fc71d3dd581d6739377b357a9b4bd77759 100644
--- a/InnerDetector/InDetExample/InDetSLHC_Example/share/GeantinoMapping_ITk_jobOptions.py
+++ b/InnerDetector/InDetExample/InDetSLHC_Example/share/GeantinoMapping_ITk_jobOptions.py
@@ -102,25 +102,9 @@ myAtRndmGenSvc.OutputLevel 	= VERBOSE
 myAtRndmGenSvc.EventReseeding   = False
 ServiceMgr += myAtRndmGenSvc
 
-
 ## Add an action
-try:
-    # Post UserAction Migration (ATLASSIM-1752)
-    # NB the migrated MaterialStepRecorder does not have any special
-    # properties, hence these are not set here.
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-    UAStore.addAction('MaterialStepRecorder',['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'])
-except:
-    # Pre UserAction Migration
-    def geantino_action():
-        from G4AtlasApps import AtlasG4Eng,PyG4Atlas
-        GeantinoAction = PyG4Atlas.UserAction('TrkG4UserActions','MaterialStepRecorder', ['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'])
-        GeantinoAction.set_Properties({ "verboseLevel" : "1",
-                                        "recordELoss"  : "1",
-                                        "recordMSc"    : "1" })
-        AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(GeantinoAction)
-
-    SimFlags.InitFunctions.add_function('preInitG4', geantino_action)
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::MaterialStepRecorderTool'['Run','Event','Step'])
 
 ############### The Material hit collection ##################
 
diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/GeantinoMapping_jobOptionsOverride.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/GeantinoMapping_jobOptionsOverride.py
index 69a821e090f2ae37000ee988d804089303c3b93d..1060c87f1581c0da24cb703fb06e617aad9ee8c5 100755
--- a/InnerDetector/InDetExample/InDetSLHC_Example/share/GeantinoMapping_jobOptionsOverride.py
+++ b/InnerDetector/InDetExample/InDetSLHC_Example/share/GeantinoMapping_jobOptionsOverride.py
@@ -95,23 +95,8 @@ except:
     topSeq += CopyEventWeight(TruthCollKey="GEN_EVENT")
 
 ## Add an action
-try:
-    # Post UserAction Migration (ATLASSIM-1752)
-    # NB the migrated MaterialStepRecorder does not have any special
-    # properties, hence these are not set here.
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-    UAStore.addAction('MaterialStepRecorder',['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'])
-except:
-    # Pre UserAction Migration
-    def geantino_action():
-        from G4AtlasApps import AtlasG4Eng,PyG4Atlas
-        GeantinoAction = PyG4Atlas.UserAction('TrkG4UserActions','MaterialStepRecorder', ['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'])
-        GeantinoAction.set_Properties({ "verboseLevel" : "1",
-                                        "recordELoss"  : "1",
-                                        "recordMSc"    : "1" })
-        AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(GeantinoAction)
-
-    simFlags.InitFunctions.add_function('preInitG4', geantino_action)
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::MaterialStepRecorderTool'['Run','Event','Step'])
 
 # suppress the enormous amount of MC output
 from TruthExamples.TruthExamplesConf import DumpMC
diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_SLHC_nn_prodTrainingSample.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_SLHC_nn_prodTrainingSample.py
deleted file mode 100644
index f8455debc388b3c7208aa0f0ff0ccf73d99c6714..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_SLHC_nn_prodTrainingSample.py
+++ /dev/null
@@ -1,148 +0,0 @@
-###############################################################################
-# jobOptions_SLHC_nn_prodTrainingSample.py
-#
-# script that reads a series of simulated HIT files, runs digitization and
-# clusterization and produces the Ntuples needed to train the cluster splitting
-# neuronal network.
-# The ntuples produced are stored in TrkValidation.root
-# -Validation
-#       |-> PixelRIOs    : Cluster info.
-#       |-> NNinput      : Input to train the NN.
-#
-# Note:   This jobOptions WILL NOT WORK as it is neither for SLHC nor for IBL.
-#         YOU NEED TO EDIT PixelClusterValidationNtupleWriter.cxx
-#         IN  InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/
-#         TO USE ToT INSTEAD OF CHARGE IN NNinput
-#
-# Note 2: This jobOptions are based on InDetSLHCExample options. There there
-#         is also a stand alone .py file in this dir. 
-#
-# Author: Tiago Perez <tperez@cern.ch>
-# Date:   9-Jan-2012
-##############################################################################
-#--------------------------------------------------------------
-# Template jobOptions: SLHC 
-#  - Digitization
-#--------------------------------------------------------------
-
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.ConditionsTag = "OFLCOND-SDR-BS14T-ATLAS-00"
-
-include("InDetSLHC_Example/preInclude.SLHC.py")
-
-include("InDetSLHC_Example/preInclude.SiliconOnly.py")
-
-from AthenaCommon.AthenaCommonFlags import jobproperties
-jobproperties.AthenaCommonFlags.EvtMax=-1
-#
-## Input data
-DATADIR="root://eosatlas.cern.ch//eos/atlas/user/t/tperez/"
-#
-## MinBias
-#FILEPATH+="mc11_slhcid.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e876_s1333_s1335_tid514272_00/"
-#FILEPATH+="HITS.514272._000030.pool.root.1"
-#
-## ttbar
-FILEPATH=DATADIR+"mc11_slhcid.105568.ttbar_Pythia.simul.HITS.e842_s1333_tid510282_00/"
-FILEPATH+="HITS.510282._000429.pool.root.1"
-#
-#
-jobproperties.AthenaCommonFlags.PoolHitsInput=[FILEPATH]
-jobproperties.AthenaCommonFlags.PoolRDOOutput=DATADIR+"ttbar.digit.RDO.pool.root"
-
-from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion='ATLAS-SLHC-01-00-00'
-
-from Digitization.DigitizationFlags import jobproperties 
-jobproperties.Digitization.doInDetNoise=False
-
-include ( "Digitization/Digitization.py" )
-
-include("InDetSLHC_Example/postInclude.SLHC_Digitization.py")
-
-#
-# Start clusterization
-#
-#
-# Suppress usage of pixel distortions when validating simulation
-# (otherwise clusters are corrected for module bow while G4 is not)
-#
-from IOVDbSvc.CondDB import conddb
-if not conddb.folderRequested('/Indet/PixelDist'):
-    conddb.addFolder('PIXEL_OFL','/Indet/PixelDist')
-    conddb.addOverride("/Indet/PixelDist","InDetPixelDist-nominal")
-
-#
-# Include clusterization
-# (need to set up services not already configured for digitization) 
-#
-#include ("PixelConditionsServices/PixelRecoDb_jobOptions.py")
-#
-## Disable some COOL queries ?
-from PixelConditionsTools.PixelConditionsToolsConf import PixelRecoDbTool
-ToolSvc += PixelRecoDbTool()
-ToolSvc.PixelRecoDbTool.InputSource = 0
-
-## Configure the clusterization tool
-from SiClusterizationTool.SiClusterizationToolConf import InDet__ClusterMakerTool
-ClusterMakerTool = InDet__ClusterMakerTool( name = "InDet::ClusterMakerTool",
-                                            UsePixelCalibCondDB = False )
-ToolSvc += ClusterMakerTool
-
-## Configure PixelConditionsSummarySvc
-from PixelConditionsServices.PixelConditionsServicesConf import PixelConditionsSummarySvc
-InDetPixelConditionsSummarySvc = PixelConditionsSummarySvc()
-InDetPixelConditionsSummarySvc.UseSpecialPixelMap = False
-InDetPixelConditionsSummarySvc.UseDCS             = False
-InDetPixelConditionsSummarySvc.UseByteStream      = False
-ServiceMgr += InDetPixelConditionsSummarySvc
-print InDetPixelConditionsSummarySvc
-
-from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__PixelClusterization
-job += InDet__PixelClusterization("PixelClusterization")
-
-#
-# Include PixelValidationNtuple 
-# with some information about Geant4 hits
-#
-from InDetTrackValidation.InDetTrackValidationConf import InDet__PixelClusterValidationNtupleWriter
-job += InDet__PixelClusterValidationNtupleWriter("PixelNtupleWriter",
-                                                 NtupleFileName 	  = 'TRKVAL',
-                                                 NtupleDirectoryName	  = 'Validation',
-                                                 NtupleTreeName 	  = 'PixelRIOs',
-                                                 PixelClusterContainer    = 'PixelClusters',
-                                                 WriteDetailedPixelInformation = False,
-                                                 DoHits 		  = True,
-                                                 DoMC			  = True,
-                                                 FindNotAssociatedParticle= False,
-                                                 WriteNNTraining          = True,
-                                                 # Extra flags ONLY ON PRIVATE InDetTrackValidation/PixelClusterValidationNtupleWriter
-                                                 UseToT = True, 
-                                                 DetGeo = 'SLHC')
-
-print job.PixelNtupleWriter
-
-theApp.HistogramPersistency = 'ROOT'
-if not 'OutputNTpl' in dir():
-  OutputNTpl = "TrkValidation_noTrack_ttbar_.root"
-
-# Root file definition
-if not hasattr(ServiceMgr, 'THistSvc'):
-  from GaudiSvc.GaudiSvcConf import THistSvc
-  ServiceMgr += THistSvc()
-
-ServiceMgr.THistSvc.Output += [ "TRKVAL DATAFILE='" + OutputNTpl + "' TYPE='ROOT' OPT='RECREATE'" ]
-theApp.Dlls += [ 'RootHistCnv' ]
-#
-#
-#
-
-MessageSvc = Service( "MessageSvc" )
-#increase the number of letter reserved to the alg/tool name from 18 to 30
-MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M"
-# to change the default limit on number of message per alg
-MessageSvc.defaultLimit = 9999999  # all messages
-# Set output level threshold among DEBUG, INFO, WARNING, ERROR, FATAL 
-MessageSvc.OutputLevel = INFO
-
-include("InDetSLHC_Example/postInclude.SLHC_Setup.py")
diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_SLHC_nn_prodTrainingSample_standAlone.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_SLHC_nn_prodTrainingSample_standAlone.py
deleted file mode 100644
index 96acf4386a3ea20340a5afd1ae56f3ef30561181..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_SLHC_nn_prodTrainingSample_standAlone.py
+++ /dev/null
@@ -1,252 +0,0 @@
-##############################################################################
-# jobOptions_SLHC_nn_prodTrainingSample_standAlone.py
-# Based of DeLorenzi's:   "~lorenzi/public/clusterizationTools/DigiAndReco.py"
-#
-# This script read a series of simulated HIT files and produces the Ntuples
-# needed to train the cluster splitting neuronal network.
-# The ntuples produced are stored in TrkValidation.root
-# -Validation
-#       |-> PixelRIOs    : Cluster info.
-#       |-> NNinput      : Input to train the NN.
-#
-# Note:   This jobOptions WILL NOT WORK as it is neither for SLHC nor for IBL.
-#         YOU NEED TO EDIT PixelClusterValidationNtupleWriter.cxx
-#         IN  InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/
-#         TO USE ToT INSTEAD OF CHARGE IN NNinput
-#
-# Note 2: This is a stand-alone jobOptions script that work todays but can't
-#         guarantee that will work always, there are some picky config options down there...
-#         I also prepared a script to work using the standard SLHC options. 
-#
-# Note 3: SCT is not needed to produce NN trainnig samples without tracking, but
-#         you'll need it later on for tracking. So you can just leave it on so you
-#         can reuse the produce digit.RDO file.
-#
-# Author: Tiago Perez <tperez@cern.ch>
-# Date:   15-Dec-2011
-##############################################################################
-#
-#
-OutputLevel = WARNING
-#
-# Get flags
-#
-from AthenaCommon.AthenaCommonFlags import jobproperties
-# Numbers of events to process: set -1 for all.
-jobproperties.AthenaCommonFlags.EvtMax= -1
-
-#
-## OUTPUT
-#
-## Output dir. Leave it empty to write in the current working dir.
-OUTDIR="~/scratch0/prodTrainingSample_standAlone/"
-## Dir to write the digit file. This file can be very large, so better don't try to write
-## your afs space.
-RDOOUT="root://eosatlas.cern.ch//eos/atlas/user/t/tperez/prodTrainingSample_standAlone/"
-
-#
-## INPUT
-#
-## Input HIT files
-DATADIR="root://eosatlas.cern.ch//eos/atlas/user/t/tperez/"
-#
-## Electrons
-## File form sample: group.det-slhc.mc11_14TeV.4907070.multi_electrons.simul.HITS.etest1.sslhc01
-##DATADIR+="group.det-slhc.mc11_14TeV.4907070.multi_electrons.simul.HITS.etest1.sslhc01.110907225930/"
-##FILEPATH=DATADIR+"group.det-slhc.32103_001265.EXT0._00005.HITS.pool.root"
-#
-## MinBias
-## File form sample: group.det-slhc.mc11_14TeV.4907070.multi_electrons.simul.HITS.etest1.sslhc01
-FILEPATH=DATADIR+"mc11_slhcid.108119.Pythia8_minbias_Inelastic_high.merge.HITS.e876_s1333_s1335_tid514272_00/"
-FILEPATH+="HITS.514272._000030.pool.root.1"
-## ttbar
-## FILEPATH=DATADIR+"mc11_slhcid.105568.ttbar_Pythia.simul.HITS.e842_s1333_tid510282_00/"
-## FILEPATH+="HITS.510282._000429.pool.root.1"
-#
-#
-jobproperties.AthenaCommonFlags.PoolHitsInput=[FILEPATH]
-#
-# RDO Output file
-jobproperties.AthenaCommonFlags.PoolRDOOutput=RDOOUT+"minbias_standAlone_.digit.RDO.pool.root"
-#
-# Need to define SLHC layout (Standard UTOPIA) else WARNING:
-from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion='ATLAS-SLHC-01-00-00'
-
-#
-# I dont need this, I'm not retrieving anything from Conditions DB
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.ConditionsTag = "OFLCOND-SDR-BS14T-ATLAS-00"
-
-#
-# Detector Flags (Pixel only)
-#
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.ID_setOn()
-#DetFlags.SCT_setOff()
-DetFlags.TRT_setOff()
-DetFlags.Calo_setOff()
-DetFlags.Muon_setOff()
-DetFlags.Truth_setOn()
-DetFlags.LVL1_setOff()
-## Disable RDO write out.
-##DetFlags.writeRDOPool.all_setOff()
-
-from Digitization.DigitizationFlags import digitizationFlags
-digitizationFlags.doInDetNoise=False
-#
-# Include Digitization
-#
-include("Digitization/Digitization.py")
-
-#disable some Pixel stuff
-from PixelGeoModel.PixelGeoModelConf import PixelDetectorTool
-pixelTool =  PixelDetectorTool()
-pixelTool.Alignable = False
-#
-#
-from PixelConditionsTools.PixelConditionsToolsConf import PixelRecoDbTool
-ToolSvc += PixelRecoDbTool()
-ToolSvc.PixelRecoDbTool.InputSource = 0
-
-Stream1.ItemList += [ "SiHitCollection#PixelHits" ]
-#
-# PixelDigitization configurable is added to the job sequence in
-# PixelDigitization_jobOptions.py.
-# It can be accessed by job.PixelDigitization as below.
-#
-from AthenaCommon.CfgGetter import getService, getPublicTool
-from AthenaCommon.AlgSequence import AlgSequence
-job = AlgSequence()
-pixeldigi = None
-from PyJobTransforms.trfUtils import releaseIsOlderThan
-if releaseIsOlderThan(19,2):
-    if not digitizationFlags.doXingByXingPileUp() and hasattr(job, 'PixelDigitization'):
-        if hasattr( job.PixelDigitization, 'DigitizationTool'):
-            pixeldigi = job.PixelDigitization.DigitizationTool
-        else:
-            pixeldigi = job.PixelDigitization
-    elif hasattr( ToolSvc, 'PixelDigitizationTool'):
-        pixeldigi = ToolSvc.PixelDigitizationTool
-    else:
-        for alg in job:
-            if hasattr(alg, 'PileUpTools'):
-                pixeldigi = alg.PileUpTools[ "PixelDigitizationTool" ]
-                break
-            pass
-else:
-    pixeldigi = getPublicTool("PixelDigitizationTool")
-if None == pixeldigi:
-    raise AttributeError("PixelDigitization(Tool) not found.")
-
-pixeldigi.EnableSpecialPixels = False
-if hasattr(pixeldigi,'UseCalibCondDB'):
-    pixeldigi.UseCalibCondDB = False
-    pixeldigi.UsePixMapCondDB = False
-    pixeldigi.UsePixCondSum = False
-    pixeldigi.DisableDistortions = True
-    pixeldigi.EnableNoise     = False  	# default True
-    #
-    pixeldigi.RndNoiseProb   = 0	# default 5e-8  
-    pixeldigi.SpmNoiseOccu   = 0	# default 1.E-5 
-    pixeldigi.RndDisableProb = 0	# default 0.009    
-    print job.PixelDigitization
-else:
-    #From PixelDigitization-01-00-05 onwards configure tools directly
-    calibSvc = getService("CalibSvc")
-    calibSvc.UseCalibCondDB = False
-    calibSvc.UsePixMapCondDB = False
-    getPublicTool("SpecialPixelGenerator").UsePixCondSum = False
-    getPublicTool("PixelBarrelChargeTool").DisableDistortions = True
-    getPublicTool("PixelECChargeTool").DisableDistortions = True
-    getPublicTool("DBMChargeTool").DisableDistortions = True
-    getPublicTool("IblPlanarChargeTool").DisableDistortions = True
-    getPublicTool("Ibl3DChargeTool").DisableDistortions = True
-    pixeldigi.EnableNoise = False
-    getPublicTool("PixelNoisyCellGenerator").RndNoiseProb   = 0
-    getPublicTool("PixelNoisyCellGenerator").SpmNoiseOccu   = 0
-
-if DetFlags.digitize.SCT_on():
-    Stream1.ItemList += [ "SiHitCollection#SCT_Hits" ]
-    from SCT_Digitization.SCT_DigitizationConf import SCT_FrontEnd
-    theSCT_FrontEnd = SCT_FrontEnd("SCT_FrontEnd")
-    theSCT_FrontEnd.MaxStripsPerSide= 1280
-    theSCT_FrontEnd.UseCalibData=False
-    ToolSvc += theSCT_FrontEnd
-
-#
-# Suppress usage of pixel distortions when validating simulation
-# (otherwise clusters are corrected for module bow while G4 is not)
-#
-from IOVDbSvc.CondDB import conddb
-if not conddb.folderRequested('/Indet/PixelDist'):
-    conddb.addFolder('PIXEL_OFL','/Indet/PixelDist')
-    conddb.addOverride("/Indet/PixelDist","InDetPixelDist-nominal")
-
-#
-# Include clusterization
-# (need to set up services not already configured for digitization) 
-#
-#include ("PixelConditionsServices/PixelRecoDb_jobOptions.py")
-#
-## Disable some COOL queries ?
-from PixelConditionsTools.PixelConditionsToolsConf import PixelRecoDbTool
-ToolSvc += PixelRecoDbTool()
-ToolSvc.PixelRecoDbTool.InputSource = 0
-
-## Configure the clusterization tool
-from SiClusterizationTool.SiClusterizationToolConf import InDet__ClusterMakerTool
-ClusterMakerTool = InDet__ClusterMakerTool( name = "InDet::ClusterMakerTool",
-                                            UsePixelCalibCondDB = False )
-ToolSvc += ClusterMakerTool
-
-## Configure PixelConditionsSummarySvc
-from PixelConditionsServices.PixelConditionsServicesConf import PixelConditionsSummarySvc
-InDetPixelConditionsSummarySvc = PixelConditionsSummarySvc()
-InDetPixelConditionsSummarySvc.UseSpecialPixelMap = False
-InDetPixelConditionsSummarySvc.UseDCS             = False
-InDetPixelConditionsSummarySvc.UseByteStream      = False
-ServiceMgr += InDetPixelConditionsSummarySvc
-print InDetPixelConditionsSummarySvc
-
-from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__PixelClusterization
-job += InDet__PixelClusterization("PixelClusterization")
-print job.PixelClusterization
-
-from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiTrackerSpacePointFinder
-job += InDet__SiTrackerSpacePointFinder("PixelSpacePoints",
-                                        ProcessSCTs = False)
-print job.PixelSpacePoints
-
-#
-# Include PixelValidationNtuple 
-# with some information about Geant4 hits
-#
-from InDetTrackValidation.InDetTrackValidationConf import InDet__PixelClusterValidationNtupleWriter
-job += InDet__PixelClusterValidationNtupleWriter("PixelNtupleWriter",
-                                                 NtupleFileName 	  = 'TRKVAL',
-                                                 NtupleDirectoryName	  = 'Validation',
-                                                 NtupleTreeName 	  = 'PixelRIOs',
-                                                 PixelClusterContainer    = 'PixelClusters',
-                                                 WriteDetailedPixelInformation = False,
-                                                 DoHits 		  = True,
-                                                 DoMC			  = True,
-                                                 FindNotAssociatedParticle= False,
-                                                 WriteNNTraining          = True,
-                                                 # Extra flags ONLY ON PRIVATE InDetTrackValidation/PixelClusterValidationNtupleWriter
-                                                 UseToT = True,
-                                                 DetGeo = 'SLHC')
-print job.PixelNtupleWriter
-
-theApp.HistogramPersistency = 'ROOT'
-if not 'OutputNTpl' in dir():
-  OutputNTpl = OUTDIR+"TrkValidation_noTrack_StandAlone_.root"
-
-# Root file definition
-if not hasattr(ServiceMgr, 'THistSvc'):
-  from GaudiSvc.GaudiSvcConf import THistSvc
-  ServiceMgr += THistSvc()
-
-ServiceMgr.THistSvc.Output += [ "TRKVAL DATAFILE='" + OutputNTpl + "' TYPE='ROOT' OPT='RECREATE'" ]
-theApp.Dlls += [ 'RootHistCnv' ]
-
diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_SLHC_nn_tracking.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_SLHC_nn_tracking.py
deleted file mode 100644
index 599d274ee0fa5bd121e1b5e8b718e1cb9b7df017..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_SLHC_nn_tracking.py
+++ /dev/null
@@ -1,250 +0,0 @@
-#--------------------------------------------------------------
-# Run tracking on digit.RDO file and produce NN training ntuple.
-# this is based on the standard SLHC reconstruction.
-# To ge the propper output in the TrkValidation ntuple need to
-# edit InDetRecNtupleCreation in InnerDetector/InDetExample/InDetRecExample
-# - Tracking
-#
-# author: Tiago Perez <tperez@cern.ch>
-# date  : 9-Jan-2012
-#--------------------------------------------------------------
-
-# --- Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-OutputLevel     = WARNING
-# --- produce an atlantis data file
-doJiveXML       = False
-# --- run the Virtual Point 1 event visualisation
-doVP1           = False
-# --- controls what is written out. ESD includes AOD, so it's normally enough
-doWriteESD      = False
-doWriteAOD      = False
-# --- read BS - please look at the default input file(s) to know the det descr and cond tag
-doReadBS        = False
-# --- do auditors ?
-doAuditors      = True
-
-if os.environ['CMTCONFIG'].endswith('-dbg'):
-  # --- do EDM monitor (debug mode only)
-  doEdmMonitor    = True 
-  # --- write out a short message upon entering or leaving each algorithm
-  doNameAuditor   = True
-else:
-  doEdmMonitor    = False
-  doNameAuditor   = False
-
-#--------------------------------------------------------------
-# load Global Flags and set defaults (import the new jobProperty globalflags)
-#--------------------------------------------------------------
-
-from AthenaCommon.GlobalFlags import globalflags
-# --- default is atlas geometry
-globalflags.DetGeo = 'atlas'
-# --- set defaults
-globalflags.DataSource = 'geant4'
-# --- input is pool for SLHC 
-globalflags.InputFormat = 'pool'
-
-from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion='ATLAS-SLHC-01-00-00'
-
-# --- printout
-globalflags.print_JobProperties()
-    
-from AthenaCommon.BeamFlags import jobproperties
-# --- default is high luminosity for SLHC
-jobproperties.Beam.numberOfCollisions = 40.0  
-
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.ConditionsTag = "OFLCOND-SDR-BS14T-ATLAS-00"
-
-# --- no conditions for SLHC
-if len(globalflags.ConditionsTag())!=0:
-   from IOVDbSvc.CondDB import conddb
-   conddb.setGlobalTag(globalflags.ConditionsTag())
-
-#--------------------------------------------------------------
-# Set Detector setup
-#--------------------------------------------------------------
-
-from RecExConfig.RecFlags import rec
-rec.Commissioning=False
-
-from AthenaCommon.DetFlags import DetFlags 
-# --- switch on InnerDetector
-DetFlags.ID_setOn()
-# --- no TRT for SLHC
-DetFlags.TRT_setOff()
-DetFlags.detdescr.TRT_setOff()
-DetFlags.makeRIO.TRT_setOff()
-# --- and switch off all the rest
-DetFlags.Calo_setOff()
-DetFlags.Muon_setOff()
-# --- printout
-DetFlags.Print()
-
-#--------------------------------------------------------------
-# Load InDet configuration
-#--------------------------------------------------------------
-
-# --- setup InDetJobProperties
-from InDetRecExample.InDetJobProperties import InDetFlags
-InDetFlags.doTruth       = (globalflags.InputFormat() == 'pool')
-
-InDetFlags.doLowBetaFinder = False
-
-# --- uncomment to change the default of one of the following options:
-#OutputLevel          = DEBUG
-
-# --- possibility to change the trackfitter
-#InDetFlags.trackFitterType = 'KalmanFitter'
-if (hasattr(InDetFlags,"doPixelClusterSplitting")) :
-  InDetFlags.doPixelClusterSplitting=False
-#---slhc
-InDetFlags.doTrackSegmentsPixel = False
-InDetFlags.doTrackSegmentsSCT   = False
-InDetFlags.doTrackSegmentsTRT   = False
-
-InDetFlags.doNewTracking  =         True
-InDetFlags.doLowPt        =         False
-InDetFlags.doxKalman      =         False
-InDetFlags.doiPatRec      =         False
-InDetFlags.doBackTracking =         False
-InDetFlags.doTRTStandalone =        False
-#InDetFlags.doSingleSpBackTracking = False
-InDetFlags.postProcessing =         True
-InDetFlags.doBeamGas      =         False
-InDetFlags.doBeamHalo     =         False
-InDetFlags.doCosmics      =         False
-InDetFlags.doSharedHits   =         False
-# --- Turn off track slimming
-InDetFlags.doSlimming = False
-#---endslhc
-
-# --- de-activate monitorings
-InDetFlags.doMonitoringGlobal    = False
-InDetFlags.doMonitoringPixel     = False
-InDetFlags.doMonitoringSCT       = False
-InDetFlags.doMonitoringTRT       = False
-InDetFlags.doMonitoringAlignment = False
-
-# --- activate (memory/cpu) monitoring
-#InDetFlags.doPerfMon = True
-
-# --- activate creation of ntuples, standard plots
-InDetFlags.doTrkNtuple      = True
-InDetFlags.doStandardPlots  = False
-InDetFlags.doSGDeletion     = False
-InDetFlags.doTrkD3PD        = False # was True
-# --- activate cluster ntuple
-InDetFlags.doPixelClusterNtuple = True
-
-from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
-TrackD3PDFlags.trackParametersAtGlobalPerigeeLevelOfDetails     = 2
-TrackD3PDFlags.storeTrackPredictionAtBLayer                     = False
-TrackD3PDFlags.storeTrackSummary                                = True
-TrackD3PDFlags.storeHitTruthMatching                            = True
-TrackD3PDFlags.storeDetailedTruth                               = True
-
-from InDetRecExample.InDetKeys import InDetKeys
-InDetKeys.trkValidationNtupleName = 'TrkValidation_onTrak_ttbar_100.root'
-InDetKeys.trkD3PDFileName = 'myInDetTrackD3PD.root'
-
-# activate the print InDetXYZAlgorithm statements
-InDetFlags.doPrintConfigurables = True
-
-# IMPORTANT NOTE: initialization of the flags and locking them is done in InDetRec_jobOptions.py!
-# This way RecExCommon just needs to import the properties without doing anything else!
-# DO NOT SET JOBPROPERTIES AFTER THIS LINE! The change will be ignored!
-
-#--------------------------------------------------------------
-# turn on SLHC tracking
-#--------------------------------------------------------------
-
-from InDetRecExample.InDetJobProperties import InDetFlags
-InDetFlags.doSLHC = True
-
-# --- do not use DCS
-InDetFlags.useDCS  = False
-
-# --- turn off conditions
-# ... missing
-
-from InDetSLHC_Example.SLHC_JobProperties import SLHC_Flags
-SLHC_Flags.SLHC_Version = ''
-
-# ---- setup of pixel tool
-from PixelGeoModel.PixelGeoModelConf import PixelDetectorTool
-pixelTool           = PixelDetectorTool()
-# --- turn off alignment
-pixelTool.Alignable = False
-
-# --- setup of tracking geometry
-from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags
-TrkDetFlags.SLHC_Geometry                   = True
-TrkDetFlags.PixelBuildingOutputLevel        = WARNING
-TrkDetFlags.SCT_BuildingOutputLevel         = WARNING
-TrkDetFlags.TRT_BuildingOutputLevel         = WARNING
-TrkDetFlags.MagneticFieldCallbackEnforced   = False
-TrkDetFlags.TRT_BuildStrawLayers            = False
-TrkDetFlags.MaterialFromCool                = True
-TrkDetFlags.MaterialDatabaseLocal           = False and TrkDetFlags.MaterialFromCool()
-TrkDetFlags.MaterialStoreGateKey            = '/GLOBAL/TrackingGeo/SLHC_LayerMaterial'
-TrkDetFlags.MaterialTagBase                 = 'SLHC_LayerMat_v'
-TrkDetFlags.MaterialVersion                 = 6
-if SLHC_Flags.SLHC_Version() is '' :
- TrkDetFlags.MaterialMagicTag                = jobproperties.Global.DetDescrVersion()
-else :
- TrkDetFlags.MaterialMagicTag                = SLHC_Flags.SLHC_Version() 
-if TrkDetFlags.MaterialDatabaseLocal() is True :
-   TrkDetFlags.MaterialDatabaseLocalPath    = ''
-   TrkDetFlags.MaterialDatabaseLocalName    = 'SLHC_LayerMaterial-'+SLHC_Flags.SLHC_Version()+'.db'
-TrkDetFlags.MagneticFieldCallbackEnforced         = False
-TrkDetFlags.LArUseMaterialEffectsOnTrackProvider  = False
-TrkDetFlags.TileUseMaterialEffectsOnTrackProvider = False
-
-#--------------------------------------------------------------
-# load master joboptions file
-#--------------------------------------------------------------
-
-include("InDetRecExample/InDetRec_all.py")
-
-#--------------------------------------------------------------
-# try to access ntuple writer
-#--------------------------------------------------------------
-from InDetTrackValidation.InDetTrackValidationConf import InDet__PixelClusterValidationNtupleWriter
-PixelNtupleWriter = InDet__PixelClusterValidationNtupleWriter(name                          = 'InDetPixelClusterValidationNtupleWriter',
-                                                              NtupleFileName                = 'TRKVAL',
-                                                              NtupleDirectoryName           = 'Validation',
-                                                              #NtupleTreeName                = 'PixelRIOs', ## not needed PixelRIOs is default. 
-                                                              PixelClusterContainer         = InDetKeys.PixelClusters(),
-                                                              WriteDetailedPixelInformation = True,
-                                                              DoHits 		            = True,
-                                                              OnlyClusterOnTrack            = True, ## For OnTrack ntuples
-                                                              DoMC			    = True,
-                                                              WriteNNTraining               = True,
-                                                              # Extra flags ONLY ON PRIVATE InDetTrackValidation/PixelClusterValidationNtupleWriter
-                                                              UseToT = True, 
-                                                              DetGeo = 'SLHC')
-
-topSequence += PixelNtupleWriter
-if (InDetFlags.doPrintConfigurables()):
-  print PixelNtupleWriter 
-
-#--------------------------------------------------------------
-# Event related parameters and input files
-#--------------------------------------------------------------
-
-# Number of events to be processed (default is 10)
-theApp.EvtMax = -1
-#ServiceMgr.EventSelector.SkipEvents = 2
-#ServiceMgr.StoreGateSvc.Dump = True
-
-ServiceMgr.PoolSvc.AttemptCatalogPatch=True
-
-# --- default SLHC test file from digit output
-# ServiceMgr.EventSelector.InputCollections = [ 'tperez.minbias.digit.RDO.pool.root' ]
-ServiceMgr.EventSelector.InputCollections = [ 'root://eosatlas.cern.ch//eos/atlas/user/t/tperez/NNtrainSamples/ttbar_100evt.digit.RDO.pool.root' ]
-
-# set the path variables consistently
-from InDetSLHC_Example.SLHC_Setup import SLHC_Setup
-SLHC_Setup = SLHC_Setup()
diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_XX0_GMX.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_XX0_GMX.py
index e8a738083dd144f3356016262fe05700e13689ae..45204d3f2f464c3c877ecbf618b518757e934286 100755
--- a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_XX0_GMX.py
+++ b/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_XX0_GMX.py
@@ -28,16 +28,8 @@ topSeq += pg
 MessageSvc.Format = "% F%40W%S%7W%R%T %0W%M"
 MessageSvc.defaultLimit = 500
 
-from RadLengthIntTool.RadLengthIntToolConf import XX0_Tool
-mXX0_Tool = XX0_Tool()
-
 from AthenaCommon.AppMgr import ServiceMgr
 
-from UserActionSvc.UserActionSvcConf import UserActionSvc;
-ServiceMgr += UserActionSvc()
-ServiceMgr.UserActionSvc.UserActions += [ mXX0_Tool]
-theApp.CreateSvc += [ "UserActionSvc"]
-
 if not hasattr(ServiceMgr, 'THistSvc'):
     from GaudiSvc.GaudiSvcConf import THistSvc
     ServiceMgr += THistSvc()
@@ -45,33 +37,6 @@ ServiceMgr.THistSvc.Output  += ["xx0 DATAFILE='xx0.root' OPT='RECREATE'"];
 
 print ServiceMgr
 
-mXX0_Tool.ActionName = "XX0_ActionTool"
-mXX0_Tool.volumePartsFile = "VolumeNameParts.txt"
-mXX0_Tool.DoIntLength = False
-mXX0_Tool.DoEta = True
-
-mXX0_Tool.NBinsEta = 480
-mXX0_Tool.EtaMin = -5
-mXX0_Tool.EtaMax = 5.
-
-mXX0_Tool.DoPhi = False
-mXX0_Tool.NBinsPhi = 50
-
-mXX0_Tool.DoRadial = False
-mXX0_Tool.NBinsRadial = 200
-
-mXX0_Tool.RMin =   0.  * mm
-mXX0_Tool.RMax =  1150. * mm
-
-mXX0_Tool.DoZScan = False
-
-mXX0_Tool.ZMin = -3490. * mm 
-mXX0_Tool.ZMax =  3490. * mm 
-
-
-print mXX0_Tool
-print UserActionSvc
-
 from G4AtlasApps import SimKernel
 
 
@@ -83,12 +48,26 @@ if 'GeometryTextFile' in dir():
 # enter interactive mode 
 theApp.initialize()
 
-from G4AtlasApps import  AtlasG4Eng,PyG4Atlas
-XX0_Action = PyG4Atlas.UserAction( 'RadLengthIntTool','XX0_ActionTool',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step'])
-AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(XX0_Action)
+## TODO Something like this should work with the appropriate CfgGetter method:
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('XX0_Tool',['Event','Run','Step'])
+simFlags.UserActionConfig.addConfig('XX0_Tool','volumePartsFile', "VolumeNameParts.txt")
+simFlags.UserActionConfig.addConfig('XX0_Tool','DoIntLength', False)
+simFlags.UserActionConfig.addConfig('XX0_Tool','DoEta', True)
+simFlags.UserActionConfig.addConfig('XX0_Tool','NBinsEta', 480)
+simFlags.UserActionConfig.addConfig('XX0_Tool','EtaMin', -5)
+simFlags.UserActionConfig.addConfig('XX0_Tool','EtaMax', 5.)
+simFlags.UserActionConfig.addConfig('XX0_Tool','DoPhi', False)
+simFlags.UserActionConfig.addConfig('XX0_Tool','NBinsPhi', 50)
+simFlags.UserActionConfig.addConfig('XX0_Tool','DoRadial', False)
+simFlags.UserActionConfig.addConfig('XX0_Tool','NBinsRadial', 200)
+simFlags.UserActionConfig.addConfig('XX0_Tool','RMin',   0.  * mm)
+simFlags.UserActionConfig.addConfig('XX0_Tool','RMax',  1150. * mm)
+simFlags.UserActionConfig.addConfig('XX0_Tool','DoZScan', False)
+simFlags.UserActionConfig.addConfig('XX0_Tool','ZMin', -3490. * mm)
+simFlags.UserActionConfig.addConfig('XX0_Tool','ZMax',  3490. * mm)
 
 
-SimFlags.InitFunctions.add_function('preInitG4', XX0_Action)
 #AtlasG4Eng.G4Eng.init_Simulation(3)
 
 from G4AtlasApps.PyG4Atlas import PyG4AtlasAlg
diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_prod_nn_input_trf_RIO_SLHC.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_prod_nn_input_trf_RIO_SLHC.py
deleted file mode 100644
index 729bcda9bd8e1bb5338fb2e89de38a857aa9ccf2..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_prod_nn_input_trf_RIO_SLHC.py
+++ /dev/null
@@ -1,267 +0,0 @@
-#--------------------------------------------------------------
-# Job trasnformation to tracking on digit.RDO file and produce
-# NN training ntuple.
-# This is based on the standard SLHC tracking trf.
-# To ge the propper output in the TrkValidation ntuple need to
-# edit InDetRecNtupleCreation in InnerDetector/InDetExample/InDetRecExample
-#
-#  - Tracking 
-#
-# author: Tiago Perez <tperez@cern.ch>
-# date  : 20-Aug-2012
-#--------------------------------------------------------------
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-
-if not athenaCommonFlags.PoolRDOInput.isDefault():
-  athenaCommonFlags.FilesInput = athenaCommonFlags.PoolRDOInput()
-elif not athenaCommonFlags.PoolESDInput.isDefault():
-  athenaCommonFlags.FilesInput = athenaCommonFlags.PoolESDInput()  
-
-from RecExConfig.RecFlags import rec
-# --- Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-OutputLevel     = WARNING
-# --- produce an atlantis data file
-doJiveXML       = False
-# --- run the Virtual Point 1 event visualisation
-doVP1           = False
-# --- controls what is written out. ESD includes AOD, so it's normally enough
-doWriteESD      = False
-doWriteAOD      = False
-# --- read BS - please look at the default input file(s) to know the det descr and cond tag
-doReadBS        = False
-# --- do auditors ?
-doAuditors      = True
-
-if os.environ['CMTCONFIG'].endswith('-dbg'):
-  # --- do EDM monitor (debug mode only)
-  doEdmMonitor    = True 
-  # --- write out a short message upon entering or leaving each algorithm
-  doNameAuditor   = True
-else:
-  doEdmMonitor    = False
-  doNameAuditor   = False
-
-#--------------------------------------------------------------
-# load Global Flags and set defaults (import the new jobProperty globalflags)
-#--------------------------------------------------------------
-
-from AthenaCommon.GlobalFlags import globalflags
-# --- default is atlas geometry
-globalflags.DetGeo = 'atlas'
-# --- set defaults
-globalflags.DataSource = 'geant4'
-# --- input is pool for SLHC 
-globalflags.InputFormat = 'pool'
-
-from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion='ATLAS-SLHC-01-02-01'
-
-# --- printout
-globalflags.print_JobProperties()
-    
-from AthenaCommon.BeamFlags import jobproperties
-# --- default is high luminosity for SLHC
-jobproperties.Beam.numberOfCollisions = 40.0  
-
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.ConditionsTag = "OFLCOND-SDR-BS14T-ATLAS-00"
-
-# --- no conditions for SLHC
-if len(globalflags.ConditionsTag())!=0:
-   from IOVDbSvc.CondDB import conddb
-   conddb.setGlobalTag(globalflags.ConditionsTag())
-
-#--------------------------------------------------------------
-# Set Detector setup
-#--------------------------------------------------------------
-
-from RecExConfig.RecFlags import rec
-rec.Commissioning=False
-
-## Skip check algorithm retun codes.
-## rec.abortOnUncheckedStatusCode=False
-
-from AthenaCommon.DetFlags import DetFlags 
-# --- switch on InnerDetector
-DetFlags.ID_setOn()
-# --- no TRT for SLHC
-DetFlags.TRT_setOff()
-DetFlags.detdescr.TRT_setOff()
-DetFlags.makeRIO.TRT_setOff()
-# --- and switch off all the rest
-DetFlags.Calo_setOff()
-DetFlags.Muon_setOff()
-# --- printout
-DetFlags.Print()
-
-#DetFlags.writeRDOPool.pixel_setOn()
-
-#--------------------------------------------------------------
-# Load InDet configuration
-#--------------------------------------------------------------
-
-# --- setup InDetJobProperties
-from InDetRecExample.InDetJobProperties import InDetFlags
-InDetFlags.doTruth       = (globalflags.InputFormat() == 'pool')
-
-InDetFlags.doLowBetaFinder = False
-
-# --- uncomment to change the default of one of the following options:
-#OutputLevel          = DEBUG
-
-# --- possibility to change the trackfitter
-#InDetFlags.trackFitterType = 'KalmanFitter'
-if (hasattr(InDetFlags,"doPixelClusterSplitting")) :
-  InDetFlags.doPixelClusterSplitting=False
-#---slhc
-InDetFlags.doTrackSegmentsPixel = False
-InDetFlags.doTrackSegmentsSCT   = False
-InDetFlags.doTrackSegmentsTRT   = False
-
-InDetFlags.doNewTracking  =         True
-InDetFlags.doLowPt        =         False
-InDetFlags.doxKalman      =         False
-InDetFlags.doiPatRec      =         False
-InDetFlags.doBackTracking =         False
-InDetFlags.doTRTStandalone =        False
-#InDetFlags.doSingleSpBackTracking = False
-InDetFlags.postProcessing =         True
-InDetFlags.doBeamGas      =         False
-InDetFlags.doBeamHalo     =         False
-InDetFlags.doCosmics      =         False
-InDetFlags.doSharedHits   =         True
-# --- Turn off track slimming
-InDetFlags.doSlimming = False
-#---endslhc
-
-# --- de-activate monitorings
-InDetFlags.doMonitoringGlobal    = False
-InDetFlags.doMonitoringPixel     = False
-InDetFlags.doMonitoringSCT       = False
-InDetFlags.doMonitoringTRT       = False
-InDetFlags.doMonitoringAlignment = False
-
-# --- activate (memory/cpu) monitoring
-#InDetFlags.doPerfMon = True
-
-# --- activate creation of ntuples, standard plots
-InDetFlags.doTrkNtuple      = True
-InDetFlags.doStandardPlots  = False
-InDetFlags.doSGDeletion     = False
-InDetFlags.doTrkD3PD        = False # was True
-# --- activate cluster ntuple
-InDetFlags.doPixelClusterNtuple = True
-
-from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
-TrackD3PDFlags.trackParametersAtGlobalPerigeeLevelOfDetails     = 2
-TrackD3PDFlags.storeTrackPredictionAtBLayer                     = False
-TrackD3PDFlags.storeTrackSummary                                = True
-TrackD3PDFlags.storeHitTruthMatching                            = True
-TrackD3PDFlags.storeDetailedTruth                               = True
-
-from InDetRecExample.InDetKeys import InDetKeys
-InDetKeys.trkValidationNtupleName = 'myTrkValidationLoI.root'
-#InDetKeys.trkD3PDFileName = 'myInDetTrackD3PD.root'
-
-# activate the print InDetXYZAlgorithm statements
-InDetFlags.doPrintConfigurables = True
-
-# IMPORTANT NOTE: initialization of the flags and locking them is done in InDetRec_jobOptions.py!
-# This way RecExCommon just needs to import the properties without doing anything else!
-# DO NOT SET JOBPROPERTIES AFTER THIS LINE! The change will be ignored!
-
-#--------------------------------------------------------------
-# turn on SLHC tracking
-#--------------------------------------------------------------
-
-from InDetRecExample.InDetJobProperties import InDetFlags
-InDetFlags.doSLHC = True
-
-# --- do not use DCS
-InDetFlags.useDCS  = False
-
-# --- turn off conditions
-# ... missing
-
-from InDetSLHC_Example.SLHC_JobProperties import SLHC_Flags
-SLHC_Flags.SLHC_Version = ''
-
-# ---- setup of pixel tool
-from PixelGeoModel.PixelGeoModelConf import PixelDetectorTool
-pixelTool           = PixelDetectorTool()
-# --- turn off alignment
-pixelTool.Alignable = False
-
-# --- setup of tracking geometry
-from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags
-TrkDetFlags.SLHC_Geometry                   = True
-TrkDetFlags.PixelBuildingOutputLevel        = WARNING
-TrkDetFlags.SCT_BuildingOutputLevel         = WARNING
-TrkDetFlags.TRT_BuildingOutputLevel         = WARNING
-TrkDetFlags.MagneticFieldCallbackEnforced   = False
-TrkDetFlags.TRT_BuildStrawLayers            = False
-TrkDetFlags.MaterialFromCool                = True
-TrkDetFlags.MaterialDatabaseLocal           = False and TrkDetFlags.MaterialFromCool()
-TrkDetFlags.MaterialStoreGateKey            = '/GLOBAL/TrackingGeo/SLHC_LayerMaterial'
-TrkDetFlags.MaterialTagBase                 = 'SLHC_LayerMat_v'
-TrkDetFlags.MaterialVersion                 = 6
-if SLHC_Flags.SLHC_Version() is '' :
- TrkDetFlags.MaterialMagicTag                = jobproperties.Global.DetDescrVersion()
-else :
- TrkDetFlags.MaterialMagicTag                = SLHC_Flags.SLHC_Version() 
-if TrkDetFlags.MaterialDatabaseLocal() is True :
-   TrkDetFlags.MaterialDatabaseLocalPath    = ''
-   TrkDetFlags.MaterialDatabaseLocalName    = 'SLHC_LayerMaterial-'+SLHC_Flags.SLHC_Version()+'.db'
-TrkDetFlags.MagneticFieldCallbackEnforced         = False
-TrkDetFlags.LArUseMaterialEffectsOnTrackProvider  = False
-TrkDetFlags.TileUseMaterialEffectsOnTrackProvider = False
-
-
-
-# --- do tracking D3PD
-if hasattr(runArgs,"outputDESDM_TRACKFile"):
-  InDetFlags.doTrkD3PD.set_Value_and_Lock(True)
-  InDetKeys.trkD3PDFileName.set_Value_and_Lock(runArgs.outputDESDM_TRACKFile)
-
-# --- Set output names such that they work with Reco_trf.py
-#if athenaCommonFlags.PoolESDOutput(): InDetKeys.OutputESDFileName = athenaCommonFlags.PoolESDOutput()
-#if athenaCommonFlags.PoolAODOutput(): InDetKeys.OutputAODFileName = athenaCommonFlags.PoolAODOutput()
-#--------------------------------------------------------------
-# load master joboptions file
-#--------------------------------------------------------------
-
-include("InDetRecExample/InDetRec_all.py")
-
-#--------------------------------------------------------------
-# try to access ntuple writer
-#--------------------------------------------------------------
-topSequence.InDetPixelClusterValidationNtupleWriter.UseToT = True
-topSequence.InDetPixelClusterValidationNtupleWriter.WriteDetailedPixelInformation = True
-topSequence.InDetPixelClusterValidationNtupleWriter.DoHits 		          = True
-topSequence.InDetPixelClusterValidationNtupleWriter.OnlyClusterOnTrack            = False
-topSequence.InDetPixelClusterValidationNtupleWriter.DoMC			  = True
-topSequence.InDetPixelClusterValidationNtupleWriter.WriteNNTraining               = True
-
-if (InDetFlags.doPrintConfigurables()):
-  print PixelNtupleWriter 
-
-#--------------------------------------------------------------
-# Event related parameters and input files
-#--------------------------------------------------------------
-
-# Number of events to be processed 
-theApp.EvtMax = athenaCommonFlags.EvtMax()
-#ServiceMgr.EventSelector.SkipEvents = 2
-#ServiceMgr.StoreGateSvc.Dump = True
-
-#ServiceMgr.PoolSvc.AttemptCatalogPatch=True
-
-# --- default SLHC test file from digit output
-#ServiceMgr.EventSelector.InputCollections = [ 'singleMuon_test_slhc_Digits.pool.root' ]
-
-# set the path variables consistently
-from InDetSLHC_Example.SLHC_Setup import SLHC_Setup
-SLHC_Setup = SLHC_Setup()
-
-
diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_prod_nn_input_trf_ROT_SLHC.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_prod_nn_input_trf_ROT_SLHC.py
deleted file mode 100644
index 9bde3654d7b5f8c6f3a6db4152314cc65c4ea921..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_prod_nn_input_trf_ROT_SLHC.py
+++ /dev/null
@@ -1,267 +0,0 @@
-#--------------------------------------------------------------
-# Job trasnformation to tracking on digit.RDO file and produce
-# NN training ntuple.
-# This is based on the standard SLHC tracking trf.
-# To ge the propper output in the TrkValidation ntuple need to
-# edit InDetRecNtupleCreation in InnerDetector/InDetExample/InDetRecExample
-#
-#  - Tracking 
-#
-# author: Tiago Perez <tperez@cern.ch>
-# date  : 20-Aug-2012
-#--------------------------------------------------------------
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-
-if not athenaCommonFlags.PoolRDOInput.isDefault():
-  athenaCommonFlags.FilesInput = athenaCommonFlags.PoolRDOInput()
-elif not athenaCommonFlags.PoolESDInput.isDefault():
-  athenaCommonFlags.FilesInput = athenaCommonFlags.PoolESDInput()  
-
-from RecExConfig.RecFlags import rec
-# --- Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-OutputLevel     = WARNING
-# --- produce an atlantis data file
-doJiveXML       = False
-# --- run the Virtual Point 1 event visualisation
-doVP1           = False
-# --- controls what is written out. ESD includes AOD, so it's normally enough
-doWriteESD      = False
-doWriteAOD      = False
-# --- read BS - please look at the default input file(s) to know the det descr and cond tag
-doReadBS        = False
-# --- do auditors ?
-doAuditors      = True
-
-if os.environ['CMTCONFIG'].endswith('-dbg'):
-  # --- do EDM monitor (debug mode only)
-  doEdmMonitor    = True 
-  # --- write out a short message upon entering or leaving each algorithm
-  doNameAuditor   = True
-else:
-  doEdmMonitor    = False
-  doNameAuditor   = False
-
-#--------------------------------------------------------------
-# load Global Flags and set defaults (import the new jobProperty globalflags)
-#--------------------------------------------------------------
-
-from AthenaCommon.GlobalFlags import globalflags
-# --- default is atlas geometry
-globalflags.DetGeo = 'atlas'
-# --- set defaults
-globalflags.DataSource = 'geant4'
-# --- input is pool for SLHC 
-globalflags.InputFormat = 'pool'
-
-from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion='ATLAS-SLHC-01-02-01'
-
-# --- printout
-globalflags.print_JobProperties()
-    
-from AthenaCommon.BeamFlags import jobproperties
-# --- default is high luminosity for SLHC
-jobproperties.Beam.numberOfCollisions = 40.0  
-
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.ConditionsTag = "OFLCOND-SDR-BS14T-ATLAS-00"
-
-# --- no conditions for SLHC
-if len(globalflags.ConditionsTag())!=0:
-   from IOVDbSvc.CondDB import conddb
-   conddb.setGlobalTag(globalflags.ConditionsTag())
-
-#--------------------------------------------------------------
-# Set Detector setup
-#--------------------------------------------------------------
-
-from RecExConfig.RecFlags import rec
-rec.Commissioning=False
-
-## Skip check algorithm retun codes.
-## rec.abortOnUncheckedStatusCode=False
-
-from AthenaCommon.DetFlags import DetFlags 
-# --- switch on InnerDetector
-DetFlags.ID_setOn()
-# --- no TRT for SLHC
-DetFlags.TRT_setOff()
-DetFlags.detdescr.TRT_setOff()
-DetFlags.makeRIO.TRT_setOff()
-# --- and switch off all the rest
-DetFlags.Calo_setOff()
-DetFlags.Muon_setOff()
-# --- printout
-DetFlags.Print()
-
-#DetFlags.writeRDOPool.pixel_setOn()
-
-#--------------------------------------------------------------
-# Load InDet configuration
-#--------------------------------------------------------------
-
-# --- setup InDetJobProperties
-from InDetRecExample.InDetJobProperties import InDetFlags
-InDetFlags.doTruth       = (globalflags.InputFormat() == 'pool')
-
-InDetFlags.doLowBetaFinder = False
-
-# --- uncomment to change the default of one of the following options:
-#OutputLevel          = DEBUG
-
-# --- possibility to change the trackfitter
-#InDetFlags.trackFitterType = 'KalmanFitter'
-if (hasattr(InDetFlags,"doPixelClusterSplitting")) :
-  InDetFlags.doPixelClusterSplitting=False
-#---slhc
-InDetFlags.doTrackSegmentsPixel = False
-InDetFlags.doTrackSegmentsSCT   = False
-InDetFlags.doTrackSegmentsTRT   = False
-
-InDetFlags.doNewTracking  =         True
-InDetFlags.doLowPt        =         False
-InDetFlags.doxKalman      =         False
-InDetFlags.doiPatRec      =         False
-InDetFlags.doBackTracking =         False
-InDetFlags.doTRTStandalone =        False
-#InDetFlags.doSingleSpBackTracking = False
-InDetFlags.postProcessing =         True
-InDetFlags.doBeamGas      =         False
-InDetFlags.doBeamHalo     =         False
-InDetFlags.doCosmics      =         False
-InDetFlags.doSharedHits   =         True
-# --- Turn off track slimming
-InDetFlags.doSlimming = False
-#---endslhc
-
-# --- de-activate monitorings
-InDetFlags.doMonitoringGlobal    = False
-InDetFlags.doMonitoringPixel     = False
-InDetFlags.doMonitoringSCT       = False
-InDetFlags.doMonitoringTRT       = False
-InDetFlags.doMonitoringAlignment = False
-
-# --- activate (memory/cpu) monitoring
-#InDetFlags.doPerfMon = True
-
-# --- activate creation of ntuples, standard plots
-InDetFlags.doTrkNtuple      = True
-InDetFlags.doStandardPlots  = False
-InDetFlags.doSGDeletion     = False
-InDetFlags.doTrkD3PD        = False # was True
-# --- activate cluster ntuple
-InDetFlags.doPixelClusterNtuple = True
-
-from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
-TrackD3PDFlags.trackParametersAtGlobalPerigeeLevelOfDetails     = 2
-TrackD3PDFlags.storeTrackPredictionAtBLayer                     = False
-TrackD3PDFlags.storeTrackSummary                                = True
-TrackD3PDFlags.storeHitTruthMatching                            = True
-TrackD3PDFlags.storeDetailedTruth                               = True
-
-from InDetRecExample.InDetKeys import InDetKeys
-InDetKeys.trkValidationNtupleName = 'myTrkValidationLoI.root'
-#InDetKeys.trkD3PDFileName = 'myInDetTrackD3PD.root'
-
-# activate the print InDetXYZAlgorithm statements
-InDetFlags.doPrintConfigurables = True
-
-# IMPORTANT NOTE: initialization of the flags and locking them is done in InDetRec_jobOptions.py!
-# This way RecExCommon just needs to import the properties without doing anything else!
-# DO NOT SET JOBPROPERTIES AFTER THIS LINE! The change will be ignored!
-
-#--------------------------------------------------------------
-# turn on SLHC tracking
-#--------------------------------------------------------------
-
-from InDetRecExample.InDetJobProperties import InDetFlags
-InDetFlags.doSLHC = True
-
-# --- do not use DCS
-InDetFlags.useDCS  = False
-
-# --- turn off conditions
-# ... missing
-
-from InDetSLHC_Example.SLHC_JobProperties import SLHC_Flags
-SLHC_Flags.SLHC_Version = ''
-
-# ---- setup of pixel tool
-from PixelGeoModel.PixelGeoModelConf import PixelDetectorTool
-pixelTool           = PixelDetectorTool()
-# --- turn off alignment
-pixelTool.Alignable = False
-
-# --- setup of tracking geometry
-from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags
-TrkDetFlags.SLHC_Geometry                   = True
-TrkDetFlags.PixelBuildingOutputLevel        = WARNING
-TrkDetFlags.SCT_BuildingOutputLevel         = WARNING
-TrkDetFlags.TRT_BuildingOutputLevel         = WARNING
-TrkDetFlags.MagneticFieldCallbackEnforced   = False
-TrkDetFlags.TRT_BuildStrawLayers            = False
-TrkDetFlags.MaterialFromCool                = True
-TrkDetFlags.MaterialDatabaseLocal           = False and TrkDetFlags.MaterialFromCool()
-TrkDetFlags.MaterialStoreGateKey            = '/GLOBAL/TrackingGeo/SLHC_LayerMaterial'
-TrkDetFlags.MaterialTagBase                 = 'SLHC_LayerMat_v'
-TrkDetFlags.MaterialVersion                 = 6
-if SLHC_Flags.SLHC_Version() is '' :
- TrkDetFlags.MaterialMagicTag                = jobproperties.Global.DetDescrVersion()
-else :
- TrkDetFlags.MaterialMagicTag                = SLHC_Flags.SLHC_Version() 
-if TrkDetFlags.MaterialDatabaseLocal() is True :
-   TrkDetFlags.MaterialDatabaseLocalPath    = ''
-   TrkDetFlags.MaterialDatabaseLocalName    = 'SLHC_LayerMaterial-'+SLHC_Flags.SLHC_Version()+'.db'
-TrkDetFlags.MagneticFieldCallbackEnforced         = False
-TrkDetFlags.LArUseMaterialEffectsOnTrackProvider  = False
-TrkDetFlags.TileUseMaterialEffectsOnTrackProvider = False
-
-
-
-# --- do tracking D3PD
-if hasattr(runArgs,"outputDESDM_TRACKFile"):
-  InDetFlags.doTrkD3PD.set_Value_and_Lock(True)
-  InDetKeys.trkD3PDFileName.set_Value_and_Lock(runArgs.outputDESDM_TRACKFile)
-
-# --- Set output names such that they work with Reco_trf.py
-#if athenaCommonFlags.PoolESDOutput(): InDetKeys.OutputESDFileName = athenaCommonFlags.PoolESDOutput()
-#if athenaCommonFlags.PoolAODOutput(): InDetKeys.OutputAODFileName = athenaCommonFlags.PoolAODOutput()
-#--------------------------------------------------------------
-# load master joboptions file
-#--------------------------------------------------------------
-
-include("InDetRecExample/InDetRec_all.py")
-
-#--------------------------------------------------------------
-# try to access ntuple writer
-#--------------------------------------------------------------
-topSequence.InDetPixelClusterValidationNtupleWriter.UseToT = True
-topSequence.InDetPixelClusterValidationNtupleWriter.WriteDetailedPixelInformation = True
-topSequence.InDetPixelClusterValidationNtupleWriter.DoHits 		          = True
-topSequence.InDetPixelClusterValidationNtupleWriter.OnlyClusterOnTrack            = True
-topSequence.InDetPixelClusterValidationNtupleWriter.DoMC			  = True
-topSequence.InDetPixelClusterValidationNtupleWriter.WriteNNTraining               = True
-
-if (InDetFlags.doPrintConfigurables()):
-  print PixelNtupleWriter 
-
-#--------------------------------------------------------------
-# Event related parameters and input files
-#--------------------------------------------------------------
-
-# Number of events to be processed 
-theApp.EvtMax = athenaCommonFlags.EvtMax()
-#ServiceMgr.EventSelector.SkipEvents = 2
-#ServiceMgr.StoreGateSvc.Dump = True
-
-#ServiceMgr.PoolSvc.AttemptCatalogPatch=True
-
-# --- default SLHC test file from digit output
-#ServiceMgr.EventSelector.InputCollections = [ 'singleMuon_test_slhc_Digits.pool.root' ]
-
-# set the path variables consistently
-from InDetSLHC_Example.SLHC_Setup import SLHC_Setup
-SLHC_Setup = SLHC_Setup()
-
-
diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_tracking_SLHC.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_tracking_SLHC.py
index a46261284be7290843aa6677f6e2a878b253d463..9e563d3c7ce11835a4f4bce8c1d256ce66a89e92 100755
--- a/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_tracking_SLHC.py
+++ b/InnerDetector/InDetExample/InDetSLHC_Example/share/jobOptions_tracking_SLHC.py
@@ -133,7 +133,6 @@ InDetFlags.doSGDeletion     = False
 InDetFlags.doTrkD3PD        = False
 
 InDetFlags.doPixelTrkNtuple = False
-InDetFlags.doPixelClusterNtuple = False
 # InDetFlags.doSctTrkNtuple = True
 # InDetFlags.doSctClusterNtuple = True
 
diff --git a/InnerDetector/InDetExample/InDetSLHC_Example/share/preInclude.SLHC_Rec.py b/InnerDetector/InDetExample/InDetSLHC_Example/share/preInclude.SLHC_Rec.py
index a4592e7dd0fbd01472c554d9c3ad11f218906839..590b6fa7938993cc6aee7317d58334eb21ab009f 100644
--- a/InnerDetector/InDetExample/InDetSLHC_Example/share/preInclude.SLHC_Rec.py
+++ b/InnerDetector/InDetExample/InDetSLHC_Example/share/preInclude.SLHC_Rec.py
@@ -88,10 +88,8 @@ if rec.doWriteESD() or rec.doWriteAOD() or ('doWriteESD' in dir() and doWriteESD
         InDetFlags.doSctTrkNtuple = False
         InDetFlags.doTrtTrkNtuple = False
         if InDetFlags.doTrkNtuple():
-            InDetFlags.doPixelClusterNtuple = True
             InDetFlags.doSctClusterNtuple = True
         else:
-            InDetFlags.doPixelClusterNtuple = False
             InDetFlags.doSctClusterNtuple = False
 
         # --- do tracking D3PD
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/doc/packagedoc.h b/InnerDetector/InDetExample/InDetTrigRecExample/doc/packagedoc.h
index cf76d0237fb1efd738250361c8b29fd11132f8b5..97b87bce29ec1cf8257062837f9c504d7f8fb5d0 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/doc/packagedoc.h
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/doc/packagedoc.h
@@ -147,8 +147,6 @@ There are two jobOptions files to run a memory-leak test. They are put in /TESTS
 
 A recipe how to run the memory-leak test is given in the README file in /TESTS.
 
-@section InDetTrigRecExample_InDetTrigRecExampleReq Requirements file
 
 
 */
-
diff --git a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py
index 3cb177e27ce02127161406ca500f880345029c89..a9c6830c0a22ef68c11d30080845d03c36b52940 100644
--- a/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py
+++ b/InnerDetector/InDetExample/InDetTrigRecExample/python/InDetTrigConfigConditions.py
@@ -141,11 +141,11 @@ class PixelConditionsServicesSetup:
     
     if self._print:  print SpecialPixelMapSvc
 
-
+    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
     from AthenaCommon.GlobalFlags import globalflags
     if self.useDCS or self.onlineMode:
       #sim
-      if globalflags.DataSource() == 'geant4':      
+      if globalflags.DataSource() == 'geant4' or (not athenaCommonFlags.isOnline()):      
         if not conddb.folderRequested('/PIXEL/DCS/TEMPERATURE'):
           conddb.addFolder("DCS_OFL","/PIXEL/DCS/TEMPERATURE")
         if not conddb.folderRequested('/PIXEL/DCS/HV'):
@@ -179,8 +179,12 @@ class PixelConditionsServicesSetup:
                                       )
 
       if globalflags.DataSource() == 'data':
-        InDetPixelDCSSvc.TemperatureFolder = "/PIXEL/HLT/DCS/TEMPERATURE"
-        InDetPixelDCSSvc.HVFolder = "/PIXEL/HLT/DCS/HV"
+        if (not athenaCommonFlags.isOnline()):
+          InDetPixelDCSSvc.TemperatureFolder = "/PIXEL/DCS/TEMPERATURE"
+          InDetPixelDCSSvc.HVFolder = "/PIXEL/DCS/HV"
+        else:
+          InDetPixelDCSSvc.TemperatureFolder = "/PIXEL/HLT/DCS/TEMPERATURE"
+          InDetPixelDCSSvc.HVFolder = "/PIXEL/HLT/DCS/HV"
         
       ServiceMgr += InDetPixelDCSSvc
 
@@ -354,11 +358,7 @@ class SCT_ConditionsServicesSetup:
       monitorSvc = getattr(self.svcMgr, instanceName); 
     else:        
       from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_MonitorConditionsSvc
-      monitorSvc = SCT_MonitorConditionsSvc(name = instanceName, 
-                                            WriteCondObjs = False,
-                                            RegisterIOV   = False,
-                                            ReadWriteCool = True,
-                                            EventInfoKey  = self.eventInfoKey)
+      monitorSvc = SCT_MonitorConditionsSvc(name = instanceName)
                                             #OutputLevel = INFO)
       self.svcMgr += monitorSvc
 
@@ -373,7 +373,7 @@ class SCT_ConditionsServicesSetup:
     "Init DCS conditions service"
     dcs_folder="/SCT/DCS"
     db_loc = "DCS_OFL"
-    if not self.isMC:
+    if (not self.isMC): 
       dcs_folder="/SCT/HLT/DCS"
       db_loc = "SCT"
       
@@ -382,7 +382,7 @@ class SCT_ConditionsServicesSetup:
     else:        
       from SCT_ConditionsServices.SCT_ConditionsServicesConf import SCT_DCSConditionsSvc
       dcsSvc = SCT_DCSConditionsSvc(name = instanceName)
-      if not self.isMC:
+      if (not self.isMC):
         dcsSvc.FolderLocation="/SCT/HLT/DCS"
         dcsSvc.ReadAllDBFolders=False
         dcsSvc.ReturnHVTemp=True
diff --git a/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDConfig.py b/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDConfig.py
index 95a27e71fb68552e16a9ed5bab565318dcb88d0d..ca581ae91a121233df2eab41367f5bbd8e47472d 100644
--- a/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDConfig.py
+++ b/InnerDetector/InDetG4/BCM_G4_SD/python/BCM_G4_SDConfig.py
@@ -1,7 +1,18 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
+from G4AtlasApps.SimFlags import simFlags
+
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+
+
 def getBCMSensorSD(name="BCMSensorSD", **kwargs):
+    bare_collection_name = "BCMHits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "BCMHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Pixel::bcmDiamondLog"])
-    kwargs.setdefault("OutputCollectionNames", ["BCMHits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.BCMSensorSDTool(name, **kwargs)
diff --git a/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDConfig.py b/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDConfig.py
index e695795b7dd0dd3e55b04bee1e81b09c8ef9ebae..f4f5488b2ab4da173e8a0f0b3955037d9e426e49 100644
--- a/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDConfig.py
+++ b/InnerDetector/InDetG4/BLM_G4_SD/python/BLM_G4_SDConfig.py
@@ -1,7 +1,18 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
+from G4AtlasApps.SimFlags import simFlags
+
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+
+
 def getBLMSensorSD(name="BLMSensorSD", **kwargs):
+    bare_collection_name = "BLMHits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "BLMHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Pixel::blmDiamondLog"])
-    kwargs.setdefault("OutputCollectionNames", ["BLMHits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.BLMSensorSDTool(name, **kwargs)
diff --git a/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDConfig.py b/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDConfig.py
index dd6a7bd237d6e927f0390fad8aedccd8306a1252..2348cf5c91cba77749d92c44b581be9b0489f7f7 100644
--- a/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDConfig.py
+++ b/InnerDetector/InDetG4/PixelG4_SD/python/PixelG4_SDConfig.py
@@ -1,10 +1,21 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
+from G4AtlasApps.SimFlags import simFlags
+
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+
+
 def getPixelSensorSD(name="PixelSensorSD", **kwargs):
+    bare_collection_name = "PixelHits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "PixelHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Pixel::siBLayLog","Pixel::siLog","Pixel::dbmDiamondLog"])
     #kwargs.setdefault("LogicalVolumeNames", ["Pixel::siBLayLog","Pixel::siLog"])
-    kwargs.setdefault("OutputCollectionNames", ["PixelHits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.PixelSensorSDTool(name, **kwargs)
 
 def getPixelSensor_CTB(name="PixelSensor_CTB", **kwargs):
diff --git a/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDConfig.py b/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDConfig.py
index ea41e1934fb7fb4e2d22c82b9de954ff02390902..12e86c04d138a5e61e172bda4fc6591d6125f65b 100644
--- a/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDConfig.py
+++ b/InnerDetector/InDetG4/SCT_G4_SD/python/SCT_G4_SDConfig.py
@@ -1,10 +1,21 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
+from G4AtlasApps.SimFlags import simFlags
+
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+
+
 def getSctSensorSD(name="SctSensorSD", **kwargs):
+    bare_collection_name = "SCT_Hits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "SCTHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["SCT::BRLSensor","SCT::ECSensor0","SCT::ECSensor1",
                                              "SCT::ECSensor2","SCT::ECSensor3"])
-    kwargs.setdefault("OutputCollectionNames", ["SCT_Hits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.SctSensorSDTool(name, **kwargs)
 
 
diff --git a/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDConfig.py b/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDConfig.py
index 69101df2cecf2860057abd1eae55d7cb36c8e7d5..059804aa1905467b8448978825fac3f3bc2334ef 100644
--- a/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDConfig.py
+++ b/InnerDetector/InDetG4/TRT_G4_SD/python/TRT_G4_SDConfig.py
@@ -1,7 +1,18 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
+from G4AtlasApps.SimFlags import simFlags
+
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+
+
 def getTRTSensitiveDetector(name="TRTSensitiveDetector", **kwargs):
+    bare_collection_name = "TRTUncompressedHits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "TRTUncompressedHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     logicalVolumeNames = ["TRT::Gas","TRT::GasMA"]
     from AtlasGeoModel.InDetGMJobProperties import GeometryFlags as geoFlags
     if geoFlags.Run()=="RUN2":
@@ -10,11 +21,11 @@ def getTRTSensitiveDetector(name="TRTSensitiveDetector", **kwargs):
                                "TRT::Gas_Kr","TRT::GasMA_Kr"]
     kwargs.setdefault("LogicalVolumeNames", logicalVolumeNames)
 
-    kwargs.setdefault("OutputCollectionNames", ["TRTUncompressedHits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.TRTSensitiveDetectorTool(name, **kwargs)
 
+
 def getTRTSensitiveDetector_CTB(name="TRTSensitiveDetector_CTB", **kwargs):
     kwargs.setdefault("LogicalVolumeNames", ["TRT::GasMA"])
     kwargs.setdefault("OutputCollectionNames", ["TRTUncompressedHits"])
     return CfgMgr.TRTSensitiveDetectorTool(name, **kwargs)
-
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
index 9317a2f7390690fdf467723cdcae71069fbacf2a..949d6b88957e20ce06a1106cca4db99341d6d7de 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorLocalFrames.h
@@ -54,7 +54,7 @@ class GetDetectorLocalFrames:public AthAlgorithm {
 
     /** Name of the Output file */
     std::string m_outputFileName;
-    std::ofstream outputFile;
+    std::ofstream m_outputFile;
     
     /** Pixel Data */
     
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h
index b1588998799c738ab2e9db917f0ddd3b50fff393..8dafb7be08269590eaa7fccfb3a595775d4f5ad3 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/InDetSimpleVisual/GetDetectorPositions.h
@@ -53,36 +53,8 @@ class GetDetectorPositions:public AthAlgorithm {
     unsigned int m_detailLevel;
     bool         m_doTRT;
     std::string m_outputFileName;
-    std::ofstream outputFile;
+    std::ofstream m_outputFile;
     
-    /** Pixel Data */
-    int m_pix_barrel_ec;
-    int m_pix_layer_disk;
-    int m_pix_phi_module;
-    int m_pix_eta_module;
-    float m_pix_x;
-    float m_pix_y;
-    float m_pix_z;
-
-    /** SCT Data */
-    int m_sct_barrel_ec;
-    int m_sct_layer_disk;
-    int m_sct_phi_module;
-    int m_sct_eta_module;
-    float m_sct_x;
-    float m_sct_y;
-    float m_sct_z;
-
-    /** TRT Data */
-    int m_trt_barrel_ec;
-    int m_trt_layer_or_wheel;
-    int m_trt_phi_module;
-    int m_trt_straw_layer;
-    int m_trt_straw;
-    float m_trt_x;
-    float m_trt_y;
-    float m_trt_z;
-
     /** Tools */
     const PixelID *m_PixelHelper;
     const InDetDD::PixelDetectorManager *m_pixelDetectorManager;
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
index cf48118516c913ef781949cf731006d6b03a2e94..4d6ae45b7563fadec5fd92d6d8ad93c43b29dad6 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorLocalFrames.cxx
@@ -106,7 +106,7 @@ StatusCode GetDetectorLocalFrames::initialize(){
   }
   
   /** Output text File */
-  outputFile.open((m_outputFileName).c_str());
+  m_outputFile.open((m_outputFileName).c_str());
   
   return StatusCode::SUCCESS;
 }
@@ -144,7 +144,7 @@ StatusCode GetDetectorLocalFrames::finalize() {
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "finalize()" << endmsg;
   
   /** Close the file */
-  outputFile.close();
+  m_outputFile.close();
 
   return StatusCode::SUCCESS;
 }
@@ -206,13 +206,13 @@ void GetDetectorLocalFrames::writeTRTFrames(){
     m_trt_straw_layer = m_TRTHelper->straw_layer(trtId);
     m_trt_straw = m_TRTHelper->straw(trtId);
     
-    outputFile << 3 << " "
+    m_outputFile << 3 << " "
 	       << m_trt_barrel_ec << " "
 	       << m_trt_layer_or_wheel << " "
 	       << m_trt_phi_module << " "
 	       << m_trt_straw_layer << " "
 	       << m_trt_straw << " ";
-    outputFile << std::endl;
+    m_outputFile << std::endl;
 
     //const HepGeom::Transform3D& localTransform = m_TRTDetectorManager->getElement( trtId )->transform(trtId);
     Amg::Vector3D xaxis(1,0,0);
@@ -231,11 +231,11 @@ void GetDetectorLocalFrames::writeTRTFrames(){
     writeVector("straw x-axis",strawXAxis);
     writeVector("straw y-axis",strawYAxis);
     writeVector("straw z-axis",strawZAxis);
-    outputFile << std::endl;
+    m_outputFile << std::endl;
     writeVector("straw x-axis (No sign)",strawXAxis_NoSign);
     writeVector("straw y-axis (No sign)",strawYAxis_NoSign);
     writeVector("straw z-axis (No sign)",strawZAxis_NoSign);
-    outputFile << std::endl;
+    m_outputFile << std::endl;
   }
   
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Leaving writeTRTFrames()" << endmsg;
@@ -245,7 +245,7 @@ void GetDetectorLocalFrames::writeTRTFrames(){
 void GetDetectorLocalFrames::writeVector(std::string name, const Amg::Vector3D& vector){
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "In writeVector()" << endmsg;
   
-  outputFile << name << " " << vector.x() << " " << vector.y() << "  " << vector.z() << std::endl;
+  m_outputFile << name << " " << vector.x() << " " << vector.y() << "  " << vector.z() << std::endl;
   
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Leaving writeVector()" << endmsg;
   return;
@@ -254,11 +254,11 @@ void GetDetectorLocalFrames::writeVector(std::string name, const Amg::Vector3D&
 void GetDetectorLocalFrames::writeTransForm(const HepGeom::Transform3D& transform){
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "In writeTransForm()" << endmsg;
   
-  outputFile << " Trans(x,y,z): " << transform.dx() << " " << transform.dy() << "  " << transform.dz() << std::endl;
-  outputFile << " Rotation Matrix " << std::endl;
-  outputFile << transform.xx() << " " << transform.xy() << "  " << transform.xz() << std::endl;
-  outputFile << transform.yx() << " " << transform.yy() << "  " << transform.yz() << std::endl;
-  outputFile << transform.zx() << " " << transform.zy() << "  " << transform.zz() << std::endl;
+  m_outputFile << " Trans(x,y,z): " << transform.dx() << " " << transform.dy() << "  " << transform.dz() << std::endl;
+  m_outputFile << " Rotation Matrix " << std::endl;
+  m_outputFile << transform.xx() << " " << transform.xy() << "  " << transform.xz() << std::endl;
+  m_outputFile << transform.yx() << " " << transform.yy() << "  " << transform.yz() << std::endl;
+  m_outputFile << transform.zx() << " " << transform.zy() << "  " << transform.zz() << std::endl;
 
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Leaving writeTransForm()" << endmsg;
   return;
diff --git a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx
index 60bd10556ed61708dc207d88360fd7c06ddc0311..6923686f736878323b1143b559f23e87c8d4095e 100644
--- a/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx
+++ b/InnerDetector/InDetGraphics/InDetAlignVisual/InDetSimpleVisual/src/GetDetectorPositions.cxx
@@ -41,34 +41,6 @@ GetDetectorPositions::GetDetectorPositions(std::string const&  name, ISvcLocator
   m_detailLevel(0),
   m_doTRT(true),
   m_outputFileName("IDgeometry.txt"),  
-  
-  /** Pixel Variables */
-  m_pix_barrel_ec(0),
-  m_pix_layer_disk(0),
-  m_pix_phi_module(0),
-  m_pix_eta_module(0),
-  m_pix_x(0),
-  m_pix_y(0),
-  m_pix_z(0),
-  
-  /** SCT variables */  
-  m_sct_barrel_ec(0),
-  m_sct_layer_disk(0),
-  m_sct_phi_module(0),
-  m_sct_eta_module(0),
-  m_sct_x(0),
-  m_sct_y(0),
-  m_sct_z(0),
-
-  /** TRT variables */    
-  m_trt_barrel_ec(0),
-  m_trt_layer_or_wheel(0),
-  m_trt_phi_module(0),
-  m_trt_straw_layer(0),
-  m_trt_straw(0),
-  m_trt_x(0),
-  m_trt_y(0),
-  m_trt_z(0),
 
   /** ID Tools */
   m_PixelHelper(0),
@@ -80,8 +52,8 @@ GetDetectorPositions::GetDetectorPositions(std::string const&  name, ISvcLocator
 
 {
   declareProperty("OutputTextFile",m_outputFileName);
-  declareProperty("DetailLevel",m_detailLevel);
-  declareProperty("DoTRT",        m_doTRT);
+  declareProperty("DetailLevel",   m_detailLevel);
+  declareProperty("DoTRT",         m_doTRT);
 }
 
 /** initialize */
@@ -127,7 +99,7 @@ StatusCode GetDetectorPositions::initialize(){
   }
   
   /** Output text File */
-  outputFile.open((m_outputFileName).c_str());
+  m_outputFile.open((m_outputFileName).c_str());
   
   return StatusCode::SUCCESS;
 }
@@ -166,7 +138,7 @@ StatusCode GetDetectorPositions::finalize() {
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "finalize()" << endmsg;
   
   /** Close the file */
-  outputFile.close();
+  m_outputFile.close();
 
   return StatusCode::SUCCESS;
 }
@@ -183,22 +155,26 @@ void GetDetectorPositions::writePixelPositions(){
     InDetDD::SiDetectorElement* si_hit = m_pixelDetectorManager->getDetectorElement( *pixIt );
     Amg::Vector3D p3d = si_hit->center();
     
-    m_pix_barrel_ec = m_PixelHelper->barrel_ec(*pixIt);
-    m_pix_layer_disk= m_PixelHelper->layer_disk(*pixIt);
-    m_pix_phi_module= m_PixelHelper->phi_module(*pixIt);
-    m_pix_eta_module = m_PixelHelper->eta_module(*pixIt);
-    m_pix_x = p3d.x();
-    m_pix_y = p3d.y();
-    m_pix_z = p3d.z();
+    int   pix_barrel_ec = m_PixelHelper->barrel_ec(*pixIt);
+    int   pix_layer_disk= m_PixelHelper->layer_disk(*pixIt);
+    int   pix_phi_module= m_PixelHelper->phi_module(*pixIt);
+    int   pix_eta_module = m_PixelHelper->eta_module(*pixIt);
+    int   nPixPhi      = m_PixelHelper->phi_index_max(*pixIt)+1;
+    int   nPixEta      = m_PixelHelper->eta_index_max(*pixIt)+1;
+    float pix_x = p3d.x();
+    float pix_y = p3d.y();
+    float pix_z = p3d.z();
     
-    outputFile << 1 << " "
-	       << m_pix_barrel_ec << " " 
-	       << m_pix_layer_disk << " " 
-	       << m_pix_phi_module << " "
-	       << m_pix_eta_module << " "
-	       << m_pix_x << " "
-	       << m_pix_y << " " 
-	       << m_pix_z << " " 
+    m_outputFile << 1 << " "
+	       << pix_barrel_ec << " " 
+	       << pix_layer_disk << " " 
+	       << pix_phi_module << " "
+	       << pix_eta_module << " "
+	       << pix_x << " "
+	       << pix_y << " " 
+	       << pix_z << " " 
+	       << nPixPhi << " " 
+	       << nPixEta << " " 
 	       << std::endl;
   }
   
@@ -218,22 +194,24 @@ void GetDetectorPositions::writeSCTPositions(){
     InDetDD::SiDetectorElement* si_hit = m_SCTDetectorManager->getDetectorElement( *sctIt );
     Amg::Vector3D p3d = si_hit->center();
     
-    m_sct_barrel_ec = m_SCTHelper->barrel_ec(*sctIt);
-    m_sct_layer_disk= m_SCTHelper->layer_disk(*sctIt);
-    m_sct_phi_module= m_SCTHelper->phi_module(*sctIt);
-    m_sct_eta_module = m_SCTHelper->eta_module(*sctIt);
-    m_sct_x = p3d.x();
-    m_sct_y = p3d.y();
-    m_sct_z = p3d.z();
+    int sct_barrel_ec = m_SCTHelper->barrel_ec(*sctIt);
+    int sct_layer_disk= m_SCTHelper->layer_disk(*sctIt);
+    int sct_phi_module= m_SCTHelper->phi_module(*sctIt);
+    int sct_eta_module = m_SCTHelper->eta_module(*sctIt);
+    int nStrips      = m_SCTHelper->strip_max(*sctIt)+1;
+    float sct_x = p3d.x();
+    float sct_y = p3d.y();
+    float sct_z = p3d.z();
     
-    outputFile << 2 << " "
-	       << m_sct_barrel_ec << " "
-	       << m_sct_layer_disk << " "
-	       << m_sct_phi_module << " "
-	       << m_sct_eta_module << " " 
-	       << m_sct_x << " "
-	       << m_sct_y << " "
-	       << m_sct_z << " " 
+    m_outputFile << 2 << " "
+	       << sct_barrel_ec << " "
+	       << sct_layer_disk << " "
+	       << sct_phi_module << " "
+	       << sct_eta_module << " " 
+	       << sct_x << " "
+	       << sct_y << " "
+	       << sct_z << " " 
+	       << nStrips << " " 
 	       << std::endl;
   }
   
@@ -317,27 +295,27 @@ void GetDetectorPositions::writeTRTPositions(Identifier const& trtId){
   const Amg::Vector3D  &p3d = m_TRTDetectorManager->getElement( trtId )->center(trtId);
   
   
-    m_trt_barrel_ec = m_TRTHelper->barrel_ec(trtId);
-  m_trt_layer_or_wheel = m_TRTHelper->layer_or_wheel(trtId);
-  m_trt_phi_module = m_TRTHelper->phi_module(trtId);
-  m_trt_straw_layer = m_TRTHelper->straw_layer(trtId);
-  m_trt_straw = m_TRTHelper->straw(trtId);
-  m_trt_x = p3d.x();
-  m_trt_y = p3d.y();
-  m_trt_z = p3d.z();
+  int trt_barrel_ec = m_TRTHelper->barrel_ec(trtId);
+  int trt_layer_or_wheel = m_TRTHelper->layer_or_wheel(trtId);
+  int trt_phi_module = m_TRTHelper->phi_module(trtId);
+  int trt_straw_layer = m_TRTHelper->straw_layer(trtId);
+  int trt_straw = m_TRTHelper->straw(trtId);
+  float trt_x = p3d.x();
+  float trt_y = p3d.y();
+  float trt_z = p3d.z();
   
-  outputFile << 3 << " "
-	     << m_trt_barrel_ec << " "
-	     << m_trt_layer_or_wheel << " "
-	     << m_trt_phi_module << " "
-	     << m_trt_straw_layer << " ";
+  m_outputFile << 3 << " "
+	     << trt_barrel_ec << " "
+	     << trt_layer_or_wheel << " "
+	     << trt_phi_module << " "
+	     << trt_straw_layer << " ";
   
   if(m_detailLevel)	     
-    outputFile << m_trt_straw << " ";
+    m_outputFile << trt_straw << " ";
   
-  outputFile << m_trt_x << " "
-	     << m_trt_y << " "
-	     << m_trt_z << " "
+  m_outputFile << trt_x << " "
+	     << trt_y << " "
+	     << trt_z << " "
 	     << std::endl;
   
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Leaving writeTRTPositions()" << endmsg;
@@ -352,50 +330,45 @@ void GetDetectorPositions::writeTRTPositions(Identifier const& trtId){
 void GetDetectorPositions::writeTwoTRTPositions(Identifier const& trtId){
   if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "In writeTwoTRTPositions()" << endmsg;
 
-  const Amg::Vector3D &p3d = m_TRTDetectorManager->getElement( trtId )->center(trtId);
-  
-  m_trt_barrel_ec = m_TRTHelper->barrel_ec(trtId);
-  m_trt_layer_or_wheel = m_TRTHelper->layer_or_wheel(trtId);
-  m_trt_phi_module = m_TRTHelper->phi_module(trtId);
-  m_trt_straw_layer = m_TRTHelper->straw_layer(trtId);
-  m_trt_straw = m_TRTHelper->straw(trtId);
-  m_trt_x = p3d.x();
-  m_trt_y = p3d.y();
-  m_trt_z = p3d.z();
+  int trt_barrel_ec = m_TRTHelper->barrel_ec(trtId);
+  int trt_layer_or_wheel = m_TRTHelper->layer_or_wheel(trtId);
+  int trt_phi_module = m_TRTHelper->phi_module(trtId);
+  int trt_straw_layer = m_TRTHelper->straw_layer(trtId);
+  int trt_straw = m_TRTHelper->straw(trtId);
  
   // We sample the straw position at two places
   Amg::Vector3D posZSample(0,0,100);
-  Amg::Vector3D firstSampling = m_TRTDetectorManager->getElement( trtId )->strawTransform(m_trt_straw) * posZSample;
-  float m_first_X = firstSampling.x();
-  float m_first_Y = firstSampling.y();
-  float m_first_Z = firstSampling.z();
+  Amg::Vector3D firstSampling = m_TRTDetectorManager->getElement( trtId )->strawTransform(trt_straw) * posZSample;
+  float first_X = firstSampling.x();
+  float first_Y = firstSampling.y();
+  float first_Z = firstSampling.z();
 
   Amg::Vector3D negZSample(0,0,-100);
-  Amg::Vector3D secondSampling = m_TRTDetectorManager->getElement( trtId )->strawTransform(m_trt_straw) * negZSample;
-  float m_second_X = secondSampling.x();
-  float m_second_Y = secondSampling.y();
-  float m_second_Z = secondSampling.z();
+  Amg::Vector3D secondSampling = m_TRTDetectorManager->getElement( trtId )->strawTransform(trt_straw) * negZSample;
+  float second_X = secondSampling.x();
+  float second_Y = secondSampling.y();
+  float second_Z = secondSampling.z();
   
-  outputFile << 3 << " "
-	     << m_trt_barrel_ec << " "
-	     << m_trt_layer_or_wheel << " "
-	     << m_trt_phi_module << " "
-	     << m_trt_straw_layer << " "
-	     << m_trt_straw << " "
-  	     << m_first_X << " "
-	     << m_first_Y << " "
-	     << m_first_Z << " "
+  m_outputFile << 3 << " "
+	     << trt_barrel_ec << " "
+	     << trt_layer_or_wheel << " "
+	     << trt_phi_module << " "
+	     << trt_straw_layer << " "
+	     << trt_straw << " "
+  	     << first_X << " "
+	     << first_Y << " "
+	     << first_Z << " "
 	     << std::endl;
 
-  outputFile << 3 << " "
-	     << m_trt_barrel_ec << " "
-	     << m_trt_layer_or_wheel << " "
-	     << m_trt_phi_module << " "
-	     << m_trt_straw_layer << " "
-	     << m_trt_straw << " "
-  	     << m_second_X << " "
-	     << m_second_Y << " "
-	     << m_second_Z << " "
+  m_outputFile << 3 << " "
+	     << trt_barrel_ec << " "
+	     << trt_layer_or_wheel << " "
+	     << trt_phi_module << " "
+	     << trt_straw_layer << " "
+	     << trt_straw << " "
+  	     << second_X << " "
+	     << second_Y << " "
+	     << second_Z << " "
 	     << std::endl;
 
   
diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/share/MakeAlignmentMonitoringPlots_ForCosmics.py b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/share/MakeAlignmentMonitoringPlots_ForCosmics.py
deleted file mode 100755
index ea63ff85e8f1ab3b96c626cbd3916172240f7b80..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/share/MakeAlignmentMonitoringPlots_ForCosmics.py
+++ /dev/null
@@ -1,732 +0,0 @@
-#!/usr/bin/env python
-# Author
-# John Alison johnda@hep.upenn.edu
-# Ben Cooper b.d.cooper@qmul.ac.uk
-# this file also needs the utilities.py and AtlasStyle.py files
-
-# used to draw the alignment monitoring plots side-by-side of up to 3 monitoring.root files (number of files can be 1,2 or 3)
-# need to provide a configuration file - see makeMonitoringPlotsExampleConfigFile.py
-
-##--------------------------
-# usage:
-#
-# ./MakeAlignmentMonitoringPlots_ForCosmics.py -c <configurationFile>
-#
-##--------------------------
-
-import sys
-from ROOT import *
-from utilities import *
-import AtlasStyle
-gStyle.SetOptStat(0)
-
-
-
-#some initialization
-configFileName = ""
-makeOutput = True
-
-#reading in the root file names from input arguments
-for i in range(len(sys.argv)):
-    if sys.argv[i]=="-c":
-        configFileName = sys.argv[i+1]
-
-# reading in configuration file
-fd = open(configFileName)
-config = fd.readlines()
-exec(''.join(config))
-
-print "Reading in from .root files:", rootFileNames[0], rootFileNames[1], rootFileNames[2]
-if makeOutput:
-    print "Producing output in directory:", outputDir
-
-#getting the TFile objects using the rootFileNames
-rootFiles = [TFile,TFile,TFile,TFile]
-nFiles = 0
-for i in range(4):
-    if rootFileNames[i]!="": 
-        rootFiles[i] = TFile(rootFileNames[i])
-        nFiles = nFiles + 1
-
-#nFiles is used in the drawing of the plots
-print "nFiles = ",nFiles
-
-# Drawing and saving of the plots....
-# Plots are first "made" using MakePlots - that is, the plots are fetched from the input 
-# files and any fits that should be done are made. MakePlots returns a tuple object which 
-# contains the histogram and fit. MakePlots also performs normalisation if specified (see config options)
-# tuple is passed to DrawPlots where the plots are drawn on top of each other, with legend, axistitles etc
-# DrawPlots is also where the figure is saved 
-
-## Basic Barrel Residual distributions
-
-PIXX = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"pix_b_residualx_fine","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(PIXX, outputDir+"/"+"PIXX.png", "Pixel Barrel", "Number of hits on tracks",
-          "x residual [mm]", 0.2, 0.9, "#mum",canvasText,makeOutput,0.60,0.91)
-
-SCTX = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_b_residualx_fine","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(SCTX, outputDir+"/"+"SCTX.png", "SCT Barrel", "Number of hits on tracks",
-          "x residual [mm]", 0.2, 0.9, "#mum",canvasText,makeOutput,0.60,0.91)
-
-TRTR = MakePlots(trtResidualsDir,legendTitles,markerColors,markerStyles,"trt_b_residualR","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(TRTR, outputDir+"/"+"TRTR.png", "TRT Barrel", "Number of hits on tracks",
-          "residual [mm]", 0.2, 0.9, "#mum",canvasText,makeOutput)
-
-# Residual mean and width distributions as a function of layer, ring, stave in barrel 
-
-SiBarrelResXMean = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"si_barrel_resX_mean","noFit",rootFiles,nFiles,False)
-DrawPlots(SiBarrelResXMean, outputDir+"/"+"SiBarrelResXMean.png", "Pixel/SCT Barrel", "residual mean [mm]",
-          "", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91,False)
-
-SiBarrelResXWidth = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"si_barrel_resX_rms","noFit",rootFiles,nFiles,False)
-DrawPlots(SiBarrelResXWidth, outputDir+"/"+"SiBarrelResXWidth.png", "Pixel/SCT Barrel", "residual width [mm]",
-          "", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91,False)
-
-PixelXEta = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"pix_b_xresvsmodeta","noFit",rootFiles,nFiles,False)
-DrawPlots(PixelXEta, outputDir+"/"+"PixelXvsModEta.png", "Pixel Barrel", "residual mean [mm]",
-          "Module Eta", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91,False)
-
-PixelXEtaW = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"pix_b_xresvsmodeta_width","noFit",rootFiles,nFiles,False)
-DrawPlots(PixelXEtaW, outputDir+"/"+"PixelXvsModEtaWidth.png", "Pixel Barrel", "residual width [mm]",
-          "Module Eta", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91,False)
-
-
-PixelXPhi = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"pix_b_xresvsmodphi","noFit",rootFiles,nFiles,False)
-DrawPlots(PixelXPhi, outputDir+"/"+"PixelXvsModPhi.png", "Pixel Barrel", "residual mean [mm]",
-          "Module Phi", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91,False)
-
-PixelXPhiW = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"pix_b_xresvsmodphi_width","noFit",rootFiles,nFiles,False)
-DrawPlots(PixelXPhiW, outputDir+"/"+"PixelXvsModPhiWidth.png", "Pixel Barrel", "residual width [mm]",
-          "Module Phi", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91,False)
-
-SCTXEta = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_b_xresvsmodeta","noFit",rootFiles,nFiles,False)
-DrawPlots(SCTXEta, outputDir+"/"+"SCTXvsModEta.png", "SCT Barrel", "residual mean [mm]",
-          "Module Eta", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91,False)
-
-SCTXEtaW = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_b_xresvsmodeta_width","noFit",rootFiles,nFiles,False)
-DrawPlots(SCTXEtaW, outputDir+"/"+"SCTXvsModEtaWidth.png", "SCT Barrel", "residual width [mm]",
-          "Module Eta", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91,False)
-
-
-SCTXPhi = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_b_xresvsmodphi","noFit",rootFiles,nFiles,False)
-DrawPlots(SCTXPhi, outputDir+"/"+"SCTXvsModPhi.png", "SCT Barrel", "residual mean [mm]",
-          "Module Phi", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91,False)
-
-SCTXPhiW = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_b_xresvsmodphi_width","noFit",rootFiles,nFiles,False)
-DrawPlots(SCTXPhiW, outputDir+"/"+"SCTXvsModPhiWidth.png", "SCT Barrel", "residual width [mm]",
-          "Module Phi", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91,False)
-
-
-## Individual Barrel Layer Residual Distributions
-
-PIXX0 = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"pix_b0_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(PIXX0, outputDir+"/"+"PIXX0.png", "Pixel Barrel L0", "Number of hits on tracks",
-          "x residual [mm]", 0.2, 0.9, "#mum",canvasText,makeOutput,0.60,0.91)
-
-PIXX1 = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"pix_b1_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(PIXX1, outputDir+"/"+"PIXX1.png", "Pixel Barrel L1", "Number of hits on tracks",
-          "x residual [mm]", 0.2, 0.9, "#mum",canvasText,makeOutput,0.60,0.91)
-
-PIXX2 = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"pix_b2_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(PIXX2, outputDir+"/"+"PIXX2.png", "Pixel Barrel L2", "Number of hits on tracks",
-          "x residual [mm]", 0.2, 0.9, "#mum",canvasText,makeOutput,0.60,0.91)
-
-SCTX0 = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_b0_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(SCTX0, outputDir+"/"+"SCTX0.png", "SCT Barrel L0", "Number of hits on tracks",
-          "x residual [mm]", 0.2, 0.9, "#mum",canvasText,makeOutput,0.60,0.91)
-
-SCTX1 = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_b1_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(SCTX1, outputDir+"/"+"SCTX1.png", "SCT Barrel L1", "Number of hits on tracks",
-          "x residual [mm]", 0.2, 0.9, "#mum",canvasText,makeOutput,0.60,0.91)
-
-SCTX2 = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_b2_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(SCTX2, outputDir+"/"+"SCTX2.png", "SCT Barrel L2", "Number of hits on tracks",
-          "x residual [mm]", 0.2, 0.9, "#mum",canvasText,makeOutput,0.60,0.91)
-
-SCTX3 = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_b3_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(SCTX3, outputDir+"/"+"SCTX3.png", "SCT Barrel L3", "Number of hits on tracks",
-          "x residual [mm]", 0.2, 0.9, "#mum",canvasText,makeOutput,0.60,0.91)
-
-## Basic Endcap Residual distributions
-
-PIXECAX = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"pix_eca_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(PIXECAX, outputDir+"/"+"PIXECAX.png", "PIX Endcap A", "Number of hits on tracks",
-          "x residual [mm]", 0.19, 0.9, "#mum",
-          canvasText,makeOutput)
-
-PIXECCX = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"pix_ecc_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(PIXECCX, outputDir+"/"+"PIXECCX.png", "PIX Endcap C", "Number of hits on tracks",
-          "x residual [mm]", 0.19, 0.9, "#mum",
-          canvasText,makeOutput)
-
-SCTECAX = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_eca_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(SCTECAX, outputDir+"/"+"SCTECAX.png", "SCT Endcap A", "Number of hits on tracks",
-          "x residual [mm]", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91)
-
-SCTECCX = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"sct_ecc_residualx","noFitWithStats",rootFiles,nFiles,normaliseHistos,unitArea)
-DrawPlots(SCTECCX, outputDir+"/"+"SCTECCX.png", "SCT Endcap C", "Number of hits on tracks",
-          "x residual [mm]", 0.19, 0.9, "#mum",
-          canvasText,makeOutput,0.60,0.91)
-
-
-# Residual mean and width distributions as a function of endcap disk
-SiEcaResXMean = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"si_eca_resX_mean","noFit",rootFiles,nFiles,False)
-DrawPlots(SiEcaResXMean, outputDir+"/"+"SiEcaResXMean.png", "Pixel/SCT Endcap A", "residual mean [mm]",
-          "", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-SiEcaResXWidth = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"si_eca_resX_rms","noFit",rootFiles,nFiles,False)
-DrawPlots(SiEcaResXWidth, outputDir+"/"+"SiEcaResXWidth.png", "Pixel/SCT Endcap A", "residual width [mm]",
-          "", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-SiEccResXMean = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"si_ecc_resX_mean","noFit",rootFiles,nFiles,False)
-DrawPlots(SiEccResXMean, outputDir+"/"+"SiEccResXMean.png", "Pixel/SCT Endcap C", "residual mean [mm]",
-          "", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-SiEccResXWidth = MakePlots(residualsDir,legendTitles,markerColors,markerStyles,"si_ecc_resX_rms","noFit",rootFiles,nFiles,False)
-DrawPlots(SiEccResXWidth, outputDir+"/"+"SiEccResXWidth.png", "Pixel/SCT Endcap C", "residual width [mm]",
-          "", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-# TRT residual mean and width distributions
-
-TRTBL0PHI = MakePlots(trtResidualsDir,legendTitles,markerColors,markerStyles,"trt_b_aveRes_l0","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTBL0PHI, outputDir+"/"+"TRTBLayer0vsPhi.png", "TRT Barrel Layer 0", "residual mean [mm]",
-          "Module Phi", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-TRTBL0PHIRMS = MakePlots(trtResidualsDir,legendTitles,markerColors,markerStyles,"trt_b_rmsRes_l0","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTBL0PHIRMS, outputDir+"/"+"TRTBLayer0vsPhiRMS.png", "TRT Barrel Layer 0", "residual RMS [mm]",
-          "Module Phi", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-TRTBL1PHI = MakePlots(trtResidualsDir,legendTitles,markerColors,markerStyles,"trt_b_aveRes_l1","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTBL1PHI, outputDir+"/"+"TRTBLayer1vsPhi.png", "TRT Barrel Layer 1", "residual mean [mm]",
-          "Module Phi", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-TRTBL1PHIRMS = MakePlots(trtResidualsDir,legendTitles,markerColors,markerStyles,"trt_b_rmsRes_l1","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTBL1PHIRMS, outputDir+"/"+"TRTBLayer1vsPhiRMS.png", "TRT Barrel Layer 1", "residual RMS [mm]",
-          "Module Phi", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-TRTBL2PHI = MakePlots(trtResidualsDir,legendTitles,markerColors,markerStyles,"trt_b_aveRes_l2","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTBL2PHI, outputDir+"/"+"TRTBLayer2vsPhi.png", "TRT Barrel Layer 2", "residual mean [mm]",
-          "Module Phi", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-TRTBL2PHIRMS = MakePlots(trtResidualsDir,legendTitles,markerColors,markerStyles,"trt_b_rmsRes_l2","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTBL2PHIRMS, outputDir+"/"+"TRTBLayer2vsPhiRMS.png", "TRT Barrel Layer 2", "residual RMS [mm]",
-          "Module Phi", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-TRTBRADIUS = MakePlots(trtResidualsDir,legendTitles,markerColors,markerStyles,"trt_b_aveResOverPhiVsStrawLayer","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTBRADIUS, outputDir+"/"+"TRTBVsStrawLayer.png", "TRT Barrel", "residual mean [mm]",
-          "Straw Layer", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-TRTBRADIUSRMS = MakePlots(trtResidualsDir,legendTitles,markerColors,markerStyles,"trt_b_rmsResOverPhiVsStrawLayer","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTBRADIUSRMS, outputDir+"/"+"TRTBVsStrawLayerRMS.png", "TRT Barrel", "residual RMS [mm]",
-          "Straw Layer", 0.19, 0.9, "#mum",canvasText,makeOutput)
-
-
-# Add TRT endcap plots e.g. trt_ec_aveResVsPhiSec_Endcap_A, trt_ec_rmsResVsPhiSec_Endcap_A, trt_ec_aveResVsRing_Endcap_A, trt_ec_rmsResVsRing_Endcap_A
-
-
-
-
-## Generic Track
-
-TrackD0 = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"d0","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackD0, outputDir+"/"+"d0.png", "", "N Tracks",
-          "Impact Parameter [mm]", 0.19, 0.9, "#mum",
-          canvasText,makeOutput)
-
-TrackZ0 = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"z0","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackZ0, outputDir+"/"+"z0.png", "", "N Tracks",
-          "z0 [mm]", 0.19, 0.9, "#mum",
-          canvasText,makeOutput)
-
-TrackPHI = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"phi","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackPHI, outputDir+"/"+"phi.png", "", "N Tracks",
-          "phi [radians]", 0.19, 0.9, "radians",
-          canvasText,makeOutput)
-
-TrackETA = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"eta","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackETA, outputDir+"/"+"eta.png", "", "N Tracks",
-          "eta", 0.19, 0.9, "",
-          canvasText,makeOutput)
-
-TrackPT = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"pT_nolog","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackPT, outputDir+"/"+"pT.png", "", "N Tracks",
-          "pT", 0.19, 0.9, "",
-          canvasText,makeOutput)
-
-TrackSUMMARY = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"summary","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackSUMMARY, outputDir+"/"+"summary.png", "N Hits Summary", "N Tracks",
-          "", 0.19, 0.9, "",
-          canvasText,makeOutput)
-
-TrackCHI2DOF = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"chi2oDoF","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackCHI2DOF, outputDir+"/"+"chi2oDoF.png", "", "N Tracks",
-          "Chi2/DOF", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-TrackNTRACKS = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"ntracks","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackNTRACKS, outputDir+"/"+"ntracks.png", "Tracks/Event", "N Events",
-          "N Tracks", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-TrackNTRTHits = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"Ntrthits_per_track","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackNTRTHits, outputDir+"/"+"nTRTHits.png", "", "N Tracks",
-          "N TRT Hits", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-TrackNSCTHits = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"Nscthits_per_track","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackNSCTHits, outputDir+"/"+"nSCTHits.png", "", "N Tracks",
-          "N SCT Hits", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-TrackNSCTHitsBarrel = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"Nscthits_per_track_barrel","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackNSCTHitsBarrel, outputDir+"/"+"nSCTHitsBarrel.png", "", "N Tracks",
-          "N SCT Hits Barrel", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-TrackNSCTHitsEca = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"Nscthits_per_track_eca","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackNSCTHitsEca, outputDir+"/"+"nSCTHitsEca.png", "", "N Tracks",
-          "N SCT Hits Eca", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-TrackNSCTHitsEcc = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"Nscthits_per_track_ecc","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackNSCTHitsEcc, outputDir+"/"+"nSCTHitsEcc.png", "", "N Tracks",
-          "N SCT Hits Ecc", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-TrackNPIXHits = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"Npixhits_per_track","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackNPIXHits, outputDir+"/"+"nPIXHits.png", "", "N Tracks",
-          "N PIX Hits", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-TrackNPIXHitsBarrel = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"Npixhits_per_track_barrel","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackNPIXHitsBarrel, outputDir+"/"+"nPIXHitsBarrel.png", "", "N Tracks",
-          "N PIX Hits Barrel", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-TrackNPIXHitsEca = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"Npixhits_per_track_eca","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackNPIXHitsEca, outputDir+"/"+"nPIXHitsEca.png", "", "N Tracks",
-          "N PIX Hits ECA", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-
-TrackNPIXHitsEcc = MakePlots(genericTracksDir,legendTitles,markerColors,markerStyles,"Npixhits_per_track_ecc","noFit",rootFiles,nFiles,normaliseHistos)
-DrawPlots(TrackNPIXHitsEcc, outputDir+"/"+"nPIXHitsEcc.png", "", "N Tracks",
-          "N PIX Hits ECC", 0.69, 0.6, "",
-          canvasText,makeOutput)
-
-
-
-
-# Hit Efficiencies
-
-SiBarrelHitEff = MakePlots(hitEffDir,legendTitles,markerColors,markerStyles,"measurements_eff_vs_layer_barrel","noFit",rootFiles,nFiles,False)
-DrawPlots(SiBarrelHitEff, outputDir+"/"+"SiBarrelHitEff.png", "Si Barrel Hit Eff.", "Hit Efficiency",
-          "Barrel Layer", 0.19, 0.41, "",
-          canvasText,makeOutput,0.60,0.41)
-
-SiEcaHitEff = MakePlots(hitEffDir,legendTitles,markerColors,markerStyles,"measurements_eff_vs_layer_eca","noFit",rootFiles,nFiles,False)
-DrawPlots(SiEcaHitEff, outputDir+"/"+"SiEcaHitEff.png", "Si Endcap A Hit Eff.", "Hit Efficiency",
-          "ECA Disk", 0.19, 0.41, "",
-          canvasText,makeOutput,0.60,0.41)
-
-SiEccHitEff = MakePlots(hitEffDir,legendTitles,markerColors,markerStyles,"measurements_eff_vs_layer_ecc","noFit",rootFiles,nFiles,False)
-DrawPlots(SiEccHitEff, outputDir+"/"+"SiEccHitEff.png", "Si Endcap C Hit Eff.", "Hit Efficiency",
-          "ECC Disk", 0.19, 0.41, "",
-          canvasText,makeOutput,0.60,0.41)
-
-TRTB0HitEff = MakePlots(hitEffDir,legendTitles,markerColors,markerStyles,"hits_eff_vs_phiSector_trt_b0","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTB0HitEff, outputDir+"/"+"TRTB0HitEff.png", "TRT Barrel Layer 0 Hit Eff.", "Hit Efficiency",
-          "Barrel Layer 0 Phi Sector", 0.19, 0.41, "",
-          canvasText,makeOutput,0.60,0.41)
-
-TRTB1HitEff = MakePlots(hitEffDir,legendTitles,markerColors,markerStyles,"hits_eff_vs_phiSector_trt_b1","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTB1HitEff, outputDir+"/"+"TRTB1HitEff.png", "TRT Barrel Layer 1 Hit Eff.", "Hit Efficiency",
-          "Barrel Layer 1 Phi Sector", 0.19, 0.41, "",
-          canvasText,makeOutput,0.60,0.41)
-
-TRTB2HitEff = MakePlots(hitEffDir,legendTitles,markerColors,markerStyles,"hits_eff_vs_phiSector_trt_b2","noFit",rootFiles,nFiles,False)
-DrawPlots(TRTB2HitEff, outputDir+"/"+"TRTB2HitEff.png", "TRT Barrel Layer 2 Hit Eff.", "Hit Efficiency",
-          "Barrel Layer 2 Phi Sector", 0.19, 0.41, "",
-          canvasText,makeOutput,0.60,0.41)
-
-#TRTECAHitEff = MakePlots(hitEffDir,legendTitles,markerColors,markerStyles,"hits_eff_vs_wheel_trt_ea","noFit",rootFiles,nFiles,False)
-#DrawPlots(TRTECAHitEff, outputDir+"/"+"TRTECAHitEff.png", "TRT Endcap A Hit Eff.", "Hit Efficiency",
-#          "Endcap A Wheel", 0.19, 0.41, "",
-#          canvasText,makeOutput,0.60,0.41)
-#
-#TRTECCHitEff = MakePlots(hitEffDir,legendTitles,markerColors,markerStyles,"hits_eff_vs_wheel_trt_ec","noFit",rootFiles,nFiles,False)
-#DrawPlots(TRTECCHitEff, outputDir+"/"+"TRTECCHitEff.png", "TRT Endcap C Hit Eff.", "Hit Efficiency",
-#          "Endcap C Wheel", 0.19, 0.41, "",
-#          canvasText,makeOutput,0.60,0.41)
-
-
-# Split track distributions
-
-DELTAD0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"delta_d0","noFitWithStats",rootFiles,nFiles,normaliseHistos)
-DrawPlots(DELTAD0,outputDir+"/"+"DELTAD0.png","#Delta(Up-Down) Tracks","number of tracks",
-          "#Delta d0 [mm]",0.2,0.9,"#mum",
-          canvasText,makeOutput);
-
-DELTAPHI0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"delta_phi0","noFitWithStats",rootFiles,nFiles,normaliseHistos)
-DrawPlots(DELTAPHI0,outputDir+"/"+"DELTAPHI0.png","#Delta(Up-Down) Tracks","number of tracks",
-          "#Delta phi [radians]",0.2,0.95,"mrad",
-          canvasText,makeOutput);
-
-DELTAETA = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"delta_eta0","noFitWithStats",rootFiles,nFiles,normaliseHistos)
-DrawPlots(DELTAETA,outputDir+"/"+"DELTAETA.png","#Delta(Up-Down) Tracks","number of tracks",
-          "#Delta #eta",0.2,0.95,"",
-          canvasText,makeOutput);
-
-DELTAQOPT = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"delta_qOverPt","noFitWithStats",rootFiles,nFiles,normaliseHistos)
-DrawPlots(DELTAQOPT,outputDir+"/"+"DELTAQOPT.png","#Delta(Up-Down) Tracks","number of tracks",
-          "#Delta Q/p_{T}  [GeV^{-1}]",0.2,0.95,"TeV^{-1}",
-          canvasText,makeOutput);
-
-DELTAZ0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"delta_z0","noFitWithStats",rootFiles,nFiles,normaliseHistos)
-DrawPlots(DELTAZ0,outputDir+"/"+"DELTAZ0.png","#Delta(Up-Down) Tracks","number of tracks"
-          ,"#Delta z0 [mm]",0.2,0.90,"#mum",
-          canvasText,makeOutput);
-
-
-
-SIGMAQPTVSPT = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"sigma_delta_qOverPtVsPt","noFit",rootFiles,nFiles,False)
-DrawPlots(SIGMAQPTVSPT,outputDir+"/"+"SIGMAQPTVSPT.png","","#sigma(q/p_{T}) [1/GeV]"
-          ,"#p_{T}^{upper} [GeV]",0.4,0.80,"#mum",
-          canvasText,makeOutput,0.60,0.91,True,"SmallLegend");
-
-SIGMAD0VSPT = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"sigma_delta_d0VsPt","noFit",rootFiles,nFiles,False)
-DrawPlots(SIGMAD0VSPT,outputDir+"/"+"SIGMAD0VSPT.png","","#sigma(d_{0})"
-          ,"#p_{T}^{upper} [GeV]",0.4,0.80,"#mum",
-          canvasText,makeOutput,0.60,0.91,True,"SmallLegend");
-
-## Split track distributions as function of other parameters
-#
-## vs eta
-DELTAD0VSETA = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_d0VsEta","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAD0VSETA,outputDir+"/"+"DELTAD0VSETA.png","","<#Deltad0(Up-Down Tracks>"
-          ,"#eta^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAZ0VSETA = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_z0VsEta","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAZ0VSETA,outputDir+"/"+"DELTAZ0VSETA.png","","<#Deltaz0(Up-Down Tracks>"
-          ,"#eta^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAPHI0VSETA = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_phi0VsEta","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAPHI0VSETA,outputDir+"/"+"DELTAPHI0VSETA.png","","<#Deltaphi0(Up-Down Tracks>"
-          ,"#eta^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAQOVERPTVSETA = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_qOverPtVsEta","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAQOVERPTVSETA,outputDir+"/"+"DELTAQOVERPTVSETA.png","","<#DeltaqOverPt(Up-Down Tracks>"
-          ,"#eta^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAETA0VSETA = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_eta0VsEta","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAETA0VSETA,outputDir+"/"+"DELTAETA0VSETA.png","","<#Deltaeta0(Up-Down Tracks>"
-          ,"#eta^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-# vs phi
-DELTAD0VSPHI0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_d0VsPhi0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAD0VSPHI0,outputDir+"/"+"DELTAD0VSPHI0.png","","<#Deltad0(Up-Down Tracks>"
-          ,"#phi0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAZ0VSPHI0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_z0VsPhi0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAZ0VSPHI0,outputDir+"/"+"DELTAZ0VSPHI0.png","","<#Deltaz0(Up-Down Tracks>"
-          ,"#phi0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAPHI0VSPHI0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_phi0VsPhi0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAPHI0VSPHI0,outputDir+"/"+"DELTAPHI0VSPHI0.png","","<#Deltaphi0(Up-Down Tracks>"
-          ,"#phi0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAQOVERPTVSPHI0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_qOverPtVsPhi0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAQOVERPTVSPHI0,outputDir+"/"+"DELTAQOVERPTVSPHI0.png","","<#DeltaqOverPt(Up-Down Tracks>"
-          ,"#phi0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAETA0VSPHI0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_eta0VsPhi0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAETA0VSPHI0,outputDir+"/"+"DELTAETA0VSPHI0.png","","<#Deltaeta0(Up-Down Tracks>"
-          ,"#phi0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-# vs d0
-DELTAD0VSD0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_d0VsD0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAD0VSD0,outputDir+"/"+"DELTAD0VSD0.png","","<#Deltad0(Up-Down Tracks>"
-          ,"#d0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAZ0VSD0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_z0VsD0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAZ0VSD0,outputDir+"/"+"DELTAZ0VSD0.png","","<#Deltaz0(Up-Down Tracks>"
-          ,"#d0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAPHI0VSD0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_phi0VsD0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAPHI0VSD0,outputDir+"/"+"DELTAPHI0VSD0.png","","<#Deltaphi0(Up-Down Tracks>"
-          ,"#d0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAQOVERPTVSD0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_qOverPtVsD0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAQOVERPTVSD0,outputDir+"/"+"DELTAQOVERPTVSD0.png","","<#DeltaqOverPt(Up-Down Tracks>"
-          ,"#d0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAETA0VSD0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_eta0VsD0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAETA0VSD0,outputDir+"/"+"DELTAETA0VSD0.png","","<#Deltaeta0(Up-Down Tracks>"
-          ,"#d0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-
-# vs z0
-DELTAD0VSZ0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_d0VsZ0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAD0VSZ0,outputDir+"/"+"DELTAD0VSZ0.png","","<#Deltad0(Up-Down Tracks>"
-          ,"#z0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAZ0VSZ0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_z0VsZ0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAZ0VSZ0,outputDir+"/"+"DELTAZ0VSZ0.png","","<#Deltaz0(Up-Down Tracks>"
-          ,"#z0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAPHI0VSZ0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_phi0VsZ0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAPHI0VSZ0,outputDir+"/"+"DELTAPHI0VSZ0.png","","<#Deltaphi0(Up-Down Tracks>"
-          ,"#z0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAQOVERPTVSZ0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_qOverPtVsZ0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAQOVERPTVSZ0,outputDir+"/"+"DELTAQOVERPTVSZ0.png","","<#DeltaqOverPt(Up-Down Tracks>"
-          ,"#z0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAETA0VSZ0 = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_eta0VsZ0","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAETA0VSZ0,outputDir+"/"+"DELTAETA0VSZ0.png","","<#Deltaeta0(Up-Down Tracks>"
-          ,"#z0^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-# vs pT
-DELTAD0VSPT = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_d0VsPt","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAD0VSPT,outputDir+"/"+"DELTAD0VSPT.png","","<#Deltad0(Up-Down Tracks>"
-          ,"#p_{T}^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAZ0VSPT = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_z0VsPt","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAZ0VSPT,outputDir+"/"+"DELTAZ0VSPT.png","","<#Deltaz0(Up-Down Tracks>"
-          ,"#p_{T}^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAPHI0VSPT = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_phi0VsPt","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAPHI0VSPT,outputDir+"/"+"DELTAPHI0VSPT.png","","<#Deltaphi0(Up-Down Tracks>"
-          ,"#p_{T}^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAQOVERPTVSPT = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_qOverPtVsPt","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAQOVERPTVSPT,outputDir+"/"+"DELTAQOVERPTVSPT.png","","<#DeltaqOverPt(Up-Down Tracks>"
-          ,"#p_{T}^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-DELTAETA0VSPT = MakePlots(splitTracksDir,legendTitles,markerColors,markerStyles,"average_delta_eta0VsPt","noFit",rootFiles,nFiles,False)
-DrawPlots(DELTAETA0VSPT,outputDir+"/"+"DELTAETA0VSPT.png","","<#Deltaeta0(Up-Down Tracks>"
-          ,"#p_{T}^{upper}",0.2,0.45,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-
-
-## We draw the curve for positive and negative tracks on top of each other for each file (so files are not compared in this case)
-newLegendTitles = ["Negative Tracks","Positive Tracks"]
-
-# as function of eta
-histogramNames = ["average_delta_d0VsEta_n","average_delta_d0VsEta_p"]
-for i in range(nFiles):
-    DELTAD0VSETA = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAD0VSETA,outputDir+"/"+"DELTAD0VSETA_"+str(i)+".png",legendTitles[i],"<#Deltad0(Up-Down) Tracks>"
-          ,"#eta^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_z0VsEta_n","average_delta_z0VsEta_p"]
-for i in range(nFiles):
-    DELTAZ0VSETA = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAZ0VSETA,outputDir+"/"+"DELTAZ0VSETA_"+str(i)+".png",legendTitles[i],"<#Deltaz0(Up-Down) Tracks>"
-          ,"#eta^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_phi0VsEta_n","average_delta_phi0VsEta_p"]
-for i in range(nFiles):
-    DELTAPHI0VSETA = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAPHI0VSETA,outputDir+"/"+"DELTAPHI0VSETA_"+str(i)+".png",legendTitles[i],"<#Deltaphi0(Up-Down) Tracks>"
-          ,"#eta^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_qOverPtVsEta_n","average_delta_qOverPtVsEta_p"]
-for i in range(nFiles):
-    DELTAQOVERPTVSETA = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAQOVERPTVSETA,outputDir+"/"+"DELTAQOVERPTVSETA_"+str(i)+".png",legendTitles[i],"<#DeltaqOverPt(Up-Down) Tracks>"
-          ,"#eta^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_eta0VsEta_n","average_delta_eta0VsEta_p"]
-for i in range(nFiles):
-    DELTAETA0VSETA = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAETA0VSETA,outputDir+"/"+"DELTAETA0VSETA_"+str(i)+".png",legendTitles[i],"<#Deltaeta0(Up-Down) Tracks>"
-          ,"#eta^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-
-
-# as function of d0
-histogramNames = ["average_delta_d0VsD0_n","average_delta_d0VsD0_p"]
-for i in range(nFiles):
-    DELTAD0VSD0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAD0VSD0,outputDir+"/"+"DELTAD0VSD0_"+str(i)+".png",legendTitles[i],"<#Deltad0(Up-Down) Tracks>"
-          ,"d0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_z0VsD0_n","average_delta_z0VsD0_p"]
-for i in range(nFiles):
-    DELTAZ0VSD0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAZ0VSD0,outputDir+"/"+"DELTAZ0VSD0_"+str(i)+".png",legendTitles[i],"<#Deltaz0(Up-Down) Tracks>"
-          ,"d0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_phi0VsD0_n","average_delta_phi0VsD0_p"]
-for i in range(nFiles):
-    DELTAPHI0VSD0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAPHI0VSD0,outputDir+"/"+"DELTAPHI0VSD0_"+str(i)+".png",legendTitles[i],"<#Deltaphi0(Up-Down) Tracks>"
-          ,"d0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-istogramNames = ["average_delta_qOverPtVsD0_n","average_delta_qOverPtVsD0_p"]
-or i in range(nFiles):
-   DELTAQOVERPTVSD0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-   DrawPlots(DELTAQOVERPTVSD0,outputDir+"/"+"DELTAQOVERPTVSD0_"+str(i)+".png",legendTitles[i],"<#DeltaqOverPt(Up-Down) Tracks>"
-         ,"d0^{upper}",0.2,0.90,"#mum",
-         canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_eta0VsD0_n","average_delta_eta0VsD0_p"]
-for i in range(nFiles):
-    DELTAETA0VSD0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAETA0VSD0,outputDir+"/"+"DELTAETA0VSD0_"+str(i)+".png",legendTitles[i],"<#Deltaeta0(Up-Down) Tracks>"
-          ,"d0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-# as function of z0
-histogramNames = ["average_delta_d0VsZ0_n","average_delta_d0VsZ0_p"]
-for i in range(nFiles):
-    DELTAD0VSZ0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAD0VSZ0,outputDir+"/"+"DELTAD0VSZ0_"+str(i)+".png",legendTitles[i],"<#Deltad0(Up-Down) Tracks>"
-          ,"z0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_z0VsZ0_n","average_delta_z0VsZ0_p"]
-for i in range(nFiles):
-    DELTAZ0VSZ0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAZ0VSZ0,outputDir+"/"+"DELTAZ0VSZ0_"+str(i)+".png",legendTitles[i],"<#Deltaz0(Up-Down) Tracks>"
-          ,"z0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_phi0VsZ0_n","average_delta_phi0VsZ0_p"]
-for i in range(nFiles):
-    DELTAPHI0VSZ0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAPHI0VSZ0,outputDir+"/"+"DELTAPHI0VSZ0_"+str(i)+".png",legendTitles[i],"<#Deltaphi0(Up-Down) Tracks>"
-          ,"z0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-istogramNames = ["average_delta_qOverPtVsZ0_n","average_delta_qOverPtVsZ0_p"]
-or i in range(nFiles):
-   DELTAQOVERPTVSZ0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-   DrawPlots(DELTAQOVERPTVSZ0,outputDir+"/"+"DELTAQOVERPTVSZ0_"+str(i)+".png",legendTitles[i],"<#DeltaqOverPt(Up-Down) Tracks>"
-         ,"z0^{upper}",0.2,0.90,"#mum",
-         canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_eta0VsZ0_n","average_delta_eta0VsZ0_p"]
-for i in range(nFiles):
-    DELTAETA0VSZ0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAETA0VSZ0,outputDir+"/"+"DELTAETA0VSZ0_"+str(i)+".png",legendTitles[i],"<#Deltaeta0(Up-Down) Tracks>"
-          ,"z0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-# as function of pT
-histogramNames = ["average_delta_d0VsPt_n","average_delta_d0VsPt_p"]
-for i in range(nFiles):
-    DELTAD0VSPT = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAD0VSPT,outputDir+"/"+"DELTAD0VSPT_"+str(i)+".png",legendTitles[i],"<#Deltad0(Up-Down) Tracks>"
-          ,"p_{T}^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_z0VsPt_n","average_delta_z0VsPt_p"]
-for i in range(nFiles):
-    DELTAZ0VSPT = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAZ0VSPT,outputDir+"/"+"DELTAZ0VSPT_"+str(i)+".png",legendTitles[i],"<#Deltaz0(Up-Down) Tracks>"
-          ,"p_{T}^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_phi0VsPt_n","average_delta_phi0VsPt_p"]
-for i in range(nFiles):
-    DELTAPHI0VSPT = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAPHI0VSPT,outputDir+"/"+"DELTAPHI0VSPT_"+str(i)+".png",legendTitles[i],"<#Deltaphi0(Up-Down) Tracks>"
-          ,"p_{T}^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-istogramNames = ["average_delta_qOverPtVsPt_n","average_delta_qOverPtVsPt_p"]
-or i in range(nFiles):
-   DELTAQOVERPTVSPT = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-   DrawPlots(DELTAQOVERPTVSPT,outputDir+"/"+"DELTAQOVERPTVSPT_"+str(i)+".png",legendTitles[i],"<#DeltaqOverPt(Up-Down) Tracks>"
-         ,"p_{T}^{upper}",0.2,0.90,"#mum",
-         canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_eta0VsPt_n","average_delta_eta0VsPt_p"]
-for i in range(nFiles):
-    DELTAETA0VSPT = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAETA0VSPT,outputDir+"/"+"DELTAETA0VSPT_"+str(i)+".png",legendTitles[i],"<#Deltaeta0(Up-Down) Tracks>"
-          ,"p_{T}^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-
-# as function of phi0
-histogramNames = ["average_delta_d0VsPhi0_n","average_delta_d0VsPhi0_p"]
-for i in range(nFiles):
-    DELTAD0VSPHI0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAD0VSPHI0,outputDir+"/"+"DELTAD0VSPHI0_"+str(i)+".png",legendTitles[i],"<#Deltad0(Up-Down) Tracks>"
-          ,"phi0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_z0VsPhi0_n","average_delta_z0VsPhi0_p"]
-for i in range(nFiles):
-    DELTAZ0VSPHI0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAZ0VSPHI0,outputDir+"/"+"DELTAZ0VSPHI0_"+str(i)+".png",legendTitles[i],"<#Deltaz0(Up-Down) Tracks>"
-          ,"phi0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_phi0VsPhi0_n","average_delta_phi0VsPhi0_p"]
-for i in range(nFiles):
-    DELTAPHI0VSPHI0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAPHI0VSPHI0,outputDir+"/"+"DELTAPHI0VSPHI0_"+str(i)+".png",legendTitles[i],"<#Deltaphi0(Up-Down) Tracks>"
-          ,"phi0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_qOverPtVsPhi0_n","average_delta_qOverPtVsPhi0_p"]
-for i in range(nFiles):
-    DELTAQOVERPTVSPHI0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAQOVERPTVSPHI0,outputDir+"/"+"DELTAQOVERPTVSPHI0_"+str(i)+".png",legendTitles[i],"<#DeltaqOverPt(Up-Down) Tracks>"
-          ,"phi0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
-
-histogramNames = ["average_delta_eta0VsPhi0_n","average_delta_eta0VsPhi0_p"]
-for i in range(nFiles):
-    DELTAETA0VSPHI0 = MakeTwoPlotsFromSameFile(splitTracksDir,newLegendTitles,markerColors,markerStyles,histogramNames,"noFit",rootFiles,i,False)
-    DrawPlots(DELTAETA0VSPHI0,outputDir+"/"+"DELTAETA0VSPHI0_"+str(i)+".png",legendTitles[i],"<#Deltaeta0(Up-Down) Tracks>"
-          ,"phi0^{upper}",0.2,0.90,"#mum",
-          canvasText,makeOutput,0.60,0.91,False,"SmallLegend");
diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/share/makeMonitoringPlots_HandsOn.py b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/share/makeMonitoringPlots_HandsOn.py
deleted file mode 100644
index df20f43c114f224d72a74c23de7f49fafe04a12e..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/share/makeMonitoringPlots_HandsOn.py
+++ /dev/null
@@ -1,38 +0,0 @@
-
-# specify the ROOT histogram files containing the monitoring plots here that you want to compare
-# Anything from 1 file to 4 files can be specified
-rootFileNames = ["",   #Put here the cosmic sample
-                 "",   #Put here the collision sample
-                 "",
-                 "",
-                 ""
-                 ]
-
-
-
-# this sets the output directory where plot gifs will be saved. REMEMBER TO CREATE THE DIRECTORY
-outputDir = "HandsOn" #Change this name if you want
-
-normaliseHistos = True # set to true if you want to normalise to same area
-unitArea = False # set to true if you want to draw residual histos to unit area
-
-#Example on how to fill the residualsDir. Watch out for the order. It must respect the inputFiles order
-residualsDir = ["/IDAlignMon/CombinedInDetTracks_alignSelection/Residuals/",
-                "/IDAlignMon/ExtendedTracks_alignSelection/Residuals/"]
-
-genericTracksDir = [] #You have to fill this
-hitEffDir=[] #You have to fill this
-
-#following array determines ROOT file directory from which TRT residual plots are taken
-#for each of the (up to) 4 files
-
- 
-    
-
-#following array determines ROOT file directory from which the BeamSpot plots are taken
-#for each of the (up to) 4 files
-markerStyles = [kOpenCircle,kFullCircle,kOpenSquare, kFullSquare] #determines marker styles for plots
-markerColors = [kRed,kBlue,kBlack,kBlack] #determines marker colors for plots
-legendTitles = ["","","",""] #determines legend titles
-canvasText = [","","",""] #specifies additional canvas text
-##----------------------------
diff --git a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/TrackSelectionAlg.cxx b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/TrackSelectionAlg.cxx
index e4b3abb11f4d4c1e05d6bd86274154aed5b9edbf..ef358d01057f2a6c24e9e28ca989d04355a64a84 100644
--- a/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/TrackSelectionAlg.cxx
+++ b/InnerDetector/InDetMonitoring/InDetAlignmentMonitoring/src/TrackSelectionAlg.cxx
@@ -186,7 +186,7 @@ bool TrackSelectionAlg::makeTrackCuts(Trk::Track* track, float zVtx)
   else{
 
     nhpix = summary->get(Trk::numberOfPixelHits);
-    nhblay = summary->get(Trk::numberOfBLayerHits);
+    nhblay = summary->get(Trk::numberOfInnermostPixelLayerHits);
     nhsct = summary->get(Trk::numberOfSCTHits);
     nhtrt = summary->get(Trk::numberOfTRTHits);
     nhtrtHT = summary->get(Trk::numberOfTRTHighThresholdHits);
diff --git a/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx b/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx
index 74e3400ca4b133e58db634ada847b5c1f74e19e2..5e507e3a0223e063a400b8f87d16a436ba90184d 100644
--- a/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx
+++ b/InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/src/DiMuMon.cxx
@@ -666,8 +666,8 @@ bool DiMuMon::trackQuality(const xAOD::TrackParticle *idTrk){
   // https://twiki.cern.ch/twiki/bin/view/AtlasProtected/MCPAnalysisGuidelinesEPS2011
   if (idTrk) {
     uint8_t dummy(-1);
-    bool eBLhits = idTrk->summaryValue( dummy, xAOD::expectBLayerHit )? dummy :-1;
-    int  nBLhits = idTrk->summaryValue( dummy, xAOD::numberOfBLayerHits )? dummy :-1;
+    bool eBLhits = idTrk->summaryValue( dummy, xAOD::expectInnermostPixelLayerHit )? dummy :-1;
+    int  nBLhits = idTrk->summaryValue( dummy, xAOD::numberOfInnermostPixelLayerHits )? dummy :-1;
     int nhitsPIX = idTrk->summaryValue( dummy, xAOD::numberOfPixelHits )? dummy :-1;
     int nPIXDS = idTrk->summaryValue( dummy, xAOD::numberOfPixelDeadSensors )? dummy :-1;
     int nhitsSCT = idTrk->summaryValue( dummy, xAOD::numberOfSCTHits )? dummy :-1;
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/doc/packagedoc.h b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/doc/packagedoc.h
index dbd2951b950bbbc63de6dce9e57345d46a4b5ffb..84eb77d540aff6773d73dd9e8318bd24abf666aa 100644
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/doc/packagedoc.h
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/doc/packagedoc.h
@@ -29,7 +29,6 @@
  * - SCT
  * - TRT
  *
-@section InDetGlobalMonitoring_requirements Requirements file
  *
 @section InDetGlobalMonitoring_ChangeLog Change log
  *@include ChangeLog
diff --git a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.cxx b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.cxx
index b797224aaae87d625f8747dea7fc31123764b50f..7ec143fccf349fd8726c0a115953da9223da0630 100755
--- a/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/InDetGlobalMonitoring/src/InDetGlobalErrorMonTool.cxx
@@ -259,9 +259,9 @@ bool InDetGlobalErrorMonTool::SyncErrorSCT()
   
   for ( unsigned int i = 0; i < SCT_ByteStreamErrors::NUM_ERROR_TYPES; i++ )
     {
-      std::set<IdentifierHash> * sctErrors = m_byteStreamErrSvc->getErrorSet( i );
-      std::set<IdentifierHash>::iterator fit = sctErrors->begin();
-      std::set<IdentifierHash>::iterator fitEnd = sctErrors->end();
+      const std::set<IdentifierHash> * sctErrors = m_byteStreamErrSvc->getErrorSet( i );
+      std::set<IdentifierHash>::const_iterator fit = sctErrors->begin();
+      std::set<IdentifierHash>::const_iterator fitEnd = sctErrors->end();
       
       // Check that all modules are registered
       for (; fit != fitEnd; ++fit) {
@@ -341,9 +341,9 @@ bool InDetGlobalErrorMonTool::SyncDisabledSCT()
   double deltaZ = 0;
   
   m_disabledGeoSCT.clear();
-  std::set<Identifier>* badModules = m_ConfigurationSvc->badModules();
-  std::set<Identifier>::iterator fit = badModules->begin();
-  std::set<Identifier>::iterator fitEnd = badModules->end();
+  const std::set<Identifier>* badModules = m_ConfigurationSvc->badModules();
+  std::set<Identifier>::const_iterator fit = badModules->begin();
+  std::set<Identifier>::const_iterator fitEnd = badModules->end();
   
   // Check that all modules are registered
   for (; fit != fitEnd; ++fit)
diff --git a/InnerDetector/InDetMonitoring/InDetMonitoringATN/CMakeLists.txt b/InnerDetector/InDetMonitoring/InDetMonitoringATN/CMakeLists.txt
index c161f1e3dcc8b163d9281c6706a70d79036c8ef2..71d470b8ae73e731adcfd5011faa1329915c23c0 100644
--- a/InnerDetector/InDetMonitoring/InDetMonitoringATN/CMakeLists.txt
+++ b/InnerDetector/InDetMonitoring/InDetMonitoringATN/CMakeLists.txt
@@ -11,5 +11,5 @@ atlas_depends_on_subdirs( PRIVATE
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
-atlas_install_runtime( share/jobOptions_monitoring.py )
+atlas_install_runtime( share/jobOptions_monitoring.py test/InDetMonitoringATN_Subdetector.sh )
 
diff --git a/InnerDetector/InDetMonitoring/InDetMonitoringATN/share/jobOptions_monitoring.py b/InnerDetector/InDetMonitoring/InDetMonitoringATN/share/jobOptions_monitoring.py
index 5582a55e11aed23b24e3705f5d43abb8d0927301..789069e5e05cd9d851808d74c51ef0182d5705aa 100644
--- a/InnerDetector/InDetMonitoring/InDetMonitoringATN/share/jobOptions_monitoring.py
+++ b/InnerDetector/InDetMonitoring/InDetMonitoringATN/share/jobOptions_monitoring.py
@@ -144,9 +144,7 @@ InDetFlags.doPerfMon        = True
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
@@ -165,4 +163,8 @@ InDetFlags.doPrintConfigurables = True
 #--------------------------------------------------------------
 
 include("InDetRecExample/InDetRec_all.py")
+if not hasattr (svcMgr, 'TrigConfigSvc'):
+  from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
+  TriggerConfigGetter()
+ToolSvc.TrigDecisionTool.TrigConfigSvc = 'Trig::TrigConfigSvc/TrigConfigSvc'
 
diff --git a/InnerDetector/InDetMonitoring/InDetMonitoringATN/test/InDetMonitoringATN_Subdetector.sh b/InnerDetector/InDetMonitoring/InDetMonitoringATN/test/InDetMonitoringATN_Subdetector.sh
index 5c531f9449d5df9134d2705f6587b7492f886100..1c61e9993440822cf47eb84c999ae6a037bb353d 100755
--- a/InnerDetector/InDetMonitoring/InDetMonitoringATN/test/InDetMonitoringATN_Subdetector.sh
+++ b/InnerDetector/InDetMonitoring/InDetMonitoringATN/test/InDetMonitoringATN_Subdetector.sh
@@ -3,7 +3,7 @@
 
 splitPoint() {
     # Split before InDetRec_all called and InDetFlags locked
-    splitLine=`grep -n "IMPORTANT NOTE" ../share/jobOptions_monitoring.py | cut -d ':' -f 1 | grep -v "^$"`
+    splitLine=`grep -n "IMPORTANT NOTE" $ATN_PACKAGE/share/jobOptions_monitoring.py | cut -d ':' -f 1 | grep -v "^$"`
     echo $splitLine
 }
 
@@ -13,7 +13,7 @@ makePixOpts() {
     splitLine=`splitPoint`
     splitLineMinus1=$(( splitLine - 1 ))
 
-    head -n $splitLineMinus1  ../share/jobOptions_monitoring.py > jobOptions_nopixel.py
+    head -n $splitLineMinus1  $ATN_PACKAGE/share/jobOptions_monitoring.py > jobOptions_nopixel.py
     cat >> jobOptions_nopixel.py << EOF
 # Test script options
 DetFlags.pixel_setOff()
@@ -27,7 +27,7 @@ InDetFlags.doTIDE_Ambi = False
 # End
 
 EOF
-    tail -n +$splitLine  ../share/jobOptions_monitoring.py >> jobOptions_nopixel.py
+    tail -n +$splitLine  $ATN_PACKAGE/share/jobOptions_monitoring.py >> jobOptions_nopixel.py
     echo "theApp.EvtMax = 1" >> jobOptions_nopixel.py
 }
 
@@ -37,7 +37,7 @@ makeSCTOpts() {
     splitLine=`splitPoint`
     splitLineMinus1=$(( splitLine - 1 ))
 
-    head -n $splitLineMinus1  ../share/jobOptions_monitoring.py > jobOptions_nosct.py
+    head -n $splitLineMinus1  $ATN_PACKAGE/share/jobOptions_monitoring.py > jobOptions_nosct.py
     cat >> jobOptions_nosct.py << EOF
 # Test script options
 DetFlags.SCT_setOff()
@@ -47,7 +47,7 @@ InDetFlags.doMonitoringSCT       = False
 # End
 
 EOF
-    tail -n +$splitLine  ../share/jobOptions_monitoring.py >> jobOptions_nosct.py
+    tail -n +$splitLine  $ATN_PACKAGE/share/jobOptions_monitoring.py >> jobOptions_nosct.py
     echo "theApp.EvtMax = 1" >> jobOptions_nosct.py
 }
 
@@ -57,17 +57,18 @@ makeTRTOpts() {
     splitLine=`splitPoint`
     splitLineMinus1=$(( splitLine - 1 ))
 
-    head -n $splitLineMinus1  ../share/jobOptions_monitoring.py > jobOptions_notrt.py
+    head -n $splitLineMinus1  $ATN_PACKAGE/share/jobOptions_monitoring.py > jobOptions_notrt.py
     cat >> jobOptions_notrt.py << EOF
 # Test script options
 DetFlags.TRT_setOff()
 DetFlags.detdescr.TRT_setOn()
 InDetFlags.doTrackSegmentsTRT    = False
 InDetFlags.doMonitoringTRT       = False
+InDetFlags.doTrackSegmentsPixelPrdAssociation = False
 # End
 
 EOF
-    tail -n +$splitLine  ../share/jobOptions_monitoring.py >> jobOptions_notrt.py
+    tail -n +$splitLine  $ATN_PACKAGE/share/jobOptions_monitoring.py >> jobOptions_notrt.py
     echo "theApp.EvtMax = 1" >> jobOptions_notrt.py
 }
 
@@ -75,10 +76,6 @@ preCheck() {
     # Pre test steps
     echo "## Starting pre-checks"
     
-    # Run directory
-    cd ../../../InnerDetector/InDetMonitoring/InDetMonitoringATN/run    
-    echo "## Running in $PWD"
-    
     # Cleaning
     echo "## Cleaning"
     /bin/rm -f geomDB sqlite200
@@ -87,10 +84,6 @@ preCheck() {
     #echo "## Setting up local DB access"
     #setupLocalDBReplica_CERN.sh
        
-    # Set environment
-    echo "## Setting up environment "
-    source ../cmt/setup.sh
-	
     # Make job options
     makePixOpts
     makeSCTOpts
@@ -116,7 +109,7 @@ postCheck() {
  
     # Cleaning
     echo "## Cleaning"
-    /bin/rm -f geomDB sqlite200 nopixel.log nosct.log notrt.log jobOptions_nopixel.py jobOptions_nosct.py jobOptions_notrt.py
+    /bin/rm -f geomDB sqlite200 # nopixel.log nosct.log notrt.log jobOptions_nopixel.py jobOptions_nosct.py jobOptions_notrt.py
 }
 
 logCheck() {
diff --git a/InnerDetector/InDetMonitoring/InDetMonitoringATN/test/InDetMonitoringATN_TestConfiguration.xml b/InnerDetector/InDetMonitoring/InDetMonitoringATN/test/InDetMonitoringATN_TestConfiguration.xml
index 4f1495cb8756b1acf57475de1216749646857963..10cd4747fd208ecfecd41d8e97e7c7dff8e6ddd7 100644
--- a/InnerDetector/InDetMonitoring/InDetMonitoringATN/test/InDetMonitoringATN_TestConfiguration.xml
+++ b/InnerDetector/InDetMonitoring/InDetMonitoringATN/test/InDetMonitoringATN_TestConfiguration.xml
@@ -24,7 +24,7 @@
    </TEST>
 
    <TEST name="InDetMonitoringATN_Subdetector" type="script" suite="Examples">
-     <options_atn>InnerDetector/InDetMonitoring/InDetMonitoringATN/test/InDetMonitoringATN_Subdetector.sh</options_atn>
+     <options_atn>InDetMonitoringATN_Subdetector.sh</options_atn>
      <timelimit>8</timelimit>
      <author> Atlas Developer </author>
      <mailto> Markus.Elsing@cern.ch, nicholas.styles@desy.de </mailto>
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx
index 39f89e52cf9b9d916de51c7d3b931949e39f73d8..e9188b04bae0f240d6bac1b84dd8457b34ffc4b3 100755
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/IDPerfMonEoverP.cxx
@@ -185,7 +185,7 @@ StatusCode IDPerfMonEoverP::initialize()
   m_PID_TrackCaloMatchType_Names.push_back( std::make_pair( xAOD::EgammaParameters::deltaPhi2,"deltaphi2"));//21
   //  m_PID_TrackCaloMatchType_Names.push_back( std::make_pair( xAOD::EgammaParameters::deltaPhiRescaled,"deltaphiRescaled"));//22
   // Following are of summary type
-  //  m_PID_SummaryType_Names.push_back( std::make_pair(xAOD::expectBLayerHit,"expectHitInBLayer"));//23 // throwing an error for some reason
+  //  m_PID_SummaryType_Names.push_back( std::make_pair(xAOD::expectInnermostPixelLayerHit,"expectHitInBLayer"));//23 // throwing an error for some reason
 
 
   //
@@ -550,7 +550,7 @@ StatusCode IDPerfMonEoverP::execute()
       m_nTRT[m_electronCounter]      = mytp->summaryValue(  dummy , xAOD::numberOfTRTHits  )? dummy :-1;
       m_nSCT[m_electronCounter]      = mytp->summaryValue(  dummy , xAOD::numberOfSCTHits )? dummy :-1;
       m_nPIX[m_electronCounter]      = mytp->summaryValue(  dummy , xAOD::numberOfPixelHits )? dummy :-1;
-      m_nBLayer[m_electronCounter]   = mytp->summaryValue(  dummy , xAOD::numberOfBLayerHits)? dummy :-1;
+      m_nBLayer[m_electronCounter]   = mytp->summaryValue(  dummy , xAOD::numberOfInnermostPixelLayerHits)? dummy :-1;
       m_nTRTout[m_electronCounter]   = mytp->summaryValue(  dummy , xAOD::numberOfTRTOutliers)? dummy :-1;
       m_nSCTout[m_electronCounter]   = mytp->summaryValue(  dummy , xAOD::numberOfSCTOutliers)? dummy :-1;
       m_nTRTHT[m_electronCounter]    = mytp->summaryValue(  dummy , xAOD::numberOfTRTHighThresholdHits)? dummy :-1;
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx
index 6ce1627c2aa8da1f954155feda35cdb276c55b52..c27ee1c18aa5de111c8a088606ecb9daf171ac79 100644
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/MuonSelector.cxx
@@ -182,8 +182,8 @@ bool MuonSelector::passQualCuts()
   if( xAOD::Muon::Combined ) return false;
   if (IDTrk) {
     uint8_t dummy(-1);
-    bool eBLhits = IDTrk->summaryValue( dummy, xAOD::expectBLayerHit )? dummy :-1;
-    int  nBLhits = IDTrk->summaryValue( dummy, xAOD::numberOfBLayerHits )? dummy :-1;
+    bool eBLhits = IDTrk->summaryValue( dummy, xAOD::expectInnermostPixelLayerHit )? dummy :-1;
+    int  nBLhits = IDTrk->summaryValue( dummy, xAOD::numberOfInnermostPixelLayerHits )? dummy :-1;
 
     int nhitsPIX = IDTrk->summaryValue( dummy, xAOD::numberOfPixelHits )? dummy :-1;
     int nhitsSCT = IDTrk->summaryValue( dummy, xAOD::numberOfSCTHits )? dummy :-1;
diff --git a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx
index cf03900bbae58c34fc960886a6b110a3c636bba8..8071f1a7abb08b57075aa80921fc141a40486cb0 100644
--- a/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx
+++ b/InnerDetector/InDetMonitoring/InDetPerformanceMonitoring/src/TRT_Electron_Monitoring_Tool.cxx
@@ -553,7 +553,7 @@ pionQualityCuts(xAOD::TrackParticle *trkP,std::vector<Trk::Track*> &v_usedTrks)
   uint8_t dummy(-1);
   int nPix = trkP->summaryValue(dummy,xAOD::numberOfPixelHits)?dummy:-1;
   int nSCT = trkP->summaryValue(dummy,xAOD::numberOfSCTHits)?dummy:-1;
-  int nBLa = trkP->summaryValue(dummy,xAOD::numberOfBLayerHits)?dummy:-1;
+  int nBLa = trkP->summaryValue(dummy,xAOD::numberOfInnermostPixelLayerHits)?dummy:-1;
   int nTRT = trkP->summaryValue(dummy,xAOD::numberOfTRTHits)?dummy:-1;
   int nTRTOut = trkP->summaryValue(dummy,xAOD::numberOfTRTOutliers)?dummy:-1;
   float dEdX = trkP->summaryValue(dummy,xAOD::pixeldEdx)?dummy:-1;
diff --git a/InnerDetector/InDetMonitoring/InDetVertexMonitoring/doc/packagedoc.h b/InnerDetector/InDetMonitoring/InDetVertexMonitoring/doc/packagedoc.h
index 265d473c605d89a883a86be618aecb2ef605a239..4f1d18c21f3fc09c44b6f85a9d2d87ff44b95957 100644
--- a/InnerDetector/InDetMonitoring/InDetVertexMonitoring/doc/packagedoc.h
+++ b/InnerDetector/InDetMonitoring/InDetVertexMonitoring/doc/packagedoc.h
@@ -7,6 +7,3 @@
 Try This
 
 */
-
-
-
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/Components.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/Components.h
new file mode 100644
index 0000000000000000000000000000000000000000..bbab10c2b77ffd69c449543ef2256ca2a02183e5
--- /dev/null
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/Components.h
@@ -0,0 +1,71 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef PIXMON_COMPONENTS_H_
+#define PIXMON_COMPONENTS_H_
+
+#include <array>
+#include <string>
+
+namespace PixMon {
+/**
+ * Enum class listing all pixel detector components
+ *
+ * N.B. This is identical to the PixLayerIBL2D3DDBM enum of PixelMainMon and is
+ * supposed to replace it in the future.
+ */
+enum class LayerIBL2D3DDBM {kECA = 0, kECC, kB0, kB1, kB2, kDBMA, kDBMC, kIBL, kIBL2D, kIBL3D, COUNT};
+
+const unsigned int kNumLayersDisk{3};
+const unsigned int kNumLayersDBM{3};
+const unsigned int kNumStavesIBL{14};
+const unsigned int kNumStavesL0{22};
+const unsigned int kNumStavesL1{38};
+const unsigned int kNumStavesL2{52};
+
+const unsigned int kNumModulesIBL{32};
+const unsigned int kNumModulesIBL2D{12};
+const unsigned int kNumModulesIBL3D{8};
+const unsigned int kNumModulesBarrel{13};
+const unsigned int kNumModulesDisk{48};
+const unsigned int kNumModulesDBM{4};
+
+extern const std::array<std::string, kNumStavesIBL> StavesIBL;
+extern const std::array<std::string, kNumStavesL0> StavesL0;
+extern const std::array<std::string, kNumStavesL1> StavesL1;
+extern const std::array<std::string, kNumStavesL2> StavesL2;
+extern const std::array<std::string, kNumModulesBarrel> ModulesBarrel;
+extern const std::array<std::string, kNumModulesIBL> ModulesIBL;
+extern const std::array<std::string, kNumModulesIBL2D> ModulesIBL2D;
+extern const std::array<std::string, kNumModulesIBL3D> ModulesIBL3D;
+
+extern const std::array<std::string, kNumLayersDisk> LayersDisk;
+extern const std::array<std::string, kNumLayersDBM> LayersDBM;
+extern const std::array<std::string, kNumModulesDisk> ModulesECA;
+extern const std::array<std::string, kNumModulesDisk> ModulesECC;
+extern const std::array<std::string, kNumModulesDBM> ModulesDBM;
+
+/**
+ * Enum class to set configuration of histogram containers
+ *
+ * This object is given to all histogram classes and determines for which
+ * components the histograms are initialised.
+  *   - Pix  = pixel components (L0, L1, L2, ECA, ECC)
+ *   - IBL  = IBL
+ *   - IBL2D3D = IBL plus additional IBL2D and IBL3D
+ *   - DBM  = DBM
+ */
+enum class HistConf {kPix = 0, kPixIBL, kPixIBL2D3D, kPixDBM, kPixDBMIBL, kPixDBMIBL2D3D, kDBM, kDBMIBL, kDBMIBL2D3D, kIBL, kIBL2D3D, COUNT};
+
+/**
+ * Function to check whether the HistConfig object 'config' includes a certain
+ * pixel detector component (desribed by enum class LayerIBL2D3DDBM).
+ *
+ * @param config: histogram configuration object
+ * @param component: the pixel detector component to be tested
+ */
+bool HasComponent(const HistConf& config, const LayerIBL2D3DDBM& component);
+}
+
+#endif  // PIXMON_COMPONENTS_H_
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/DBMMon2DMaps.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/DBMMon2DMaps.h
deleted file mode 100644
index e68e619b8af0fd12d44591fd3f2a8294fa82dc31..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/DBMMon2DMaps.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef DBMMON2DMAPS_H_
-#define DBMMON2DMAPS_H_
-#include "AthenaMonitoring/ManagedMonitorToolBase.h"
-#include <string.h>
-
-class TH2F;
-class Identifier;
-class PixelID;
-class StatusCode;
-
-// A helper class to remove a lot of the code duplication.
-// This is a collection of 5 2D histograms which make up the '2D maps' used a lot of in the monitoring.
-// Each of the 2D maps correspond to a detector region (B0, B1, B2, ECA, ECC).
-// This books and formats the histograms in the constructor. The fill method will take the identifier 
-// as the input and fill the correct histogram and bin. The histograms are also public so that they
-// can be formated/accessed like any other histograms in the monitoring.
-
-class DBMMon2DMaps
-{
-   public:
-      DBMMon2DMaps(std::string name, std::string title);
-      ~DBMMon2DMaps();
-      TH2F* DBMA;
-      TH2F* DBMC;
-      void Fill(Identifier &id, const PixelID* pixID);
-      void Scale(double number);
-      StatusCode regHist(ManagedMonitorToolBase::MonGroup &group);
-private:
-      void formatHist();
-      
-};
-
-#endif
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h
index e1de89c9f8063b9f63785e9ba29f9decd1df17ba..185c1de10d38b4e4c52ef5a50125facbc55a97cd 100755
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h
@@ -25,11 +25,8 @@
 class PixelMonModules1D;
 class PixelMonModulesProf;
 class PixelMonModules2D;
-class PixelMon2DMaps;
-class DBMMon2DMaps;
 class PixelMon2DMapsLW;
 class PixelMon2DProfilesLW;
-class PixelMonProfiles;
 class PixelMon2DLumiProfiles;
 class PixelMon2DLumiMaps;
 class StatusCode;
@@ -135,9 +132,10 @@ public:
    void TH1FFillMonitoring(TH1F_LW* mon, TH1F_LW* tmp);
    void TH2FSetBinScaled(TH2F_LW* mon, TH2F_LW* tmp, int nevent);
    void FillTimeHisto(double, TProfile*, TProfile*, TProfile*, double, double, double);
-   void FillSummaryHistos(PixelMon2DMaps* occupancy, TH1F_LW* A, TH1F_LW* C, TH1F_LW* IBL, TH1F_LW* B0, TH1F_LW* B1, TH1F_LW* B2);
+   void FillSummaryHistos(PixelMon2DMapsLW* occupancy, TH1F_LW* A, TH1F_LW* C, TH1F_LW* IBL, TH1F_LW* B0, TH1F_LW* B1, TH1F_LW* B2);
    int ParseDetailsString(std::string & detailsMod);
    bool OnTrack(Identifier id, bool isCluster);
+   double getErrorBitFraction(const Identifier& WaferID, const unsigned int& num_femcc_errorwords);
    int getErrorState(int bit, bool isibl);
 	std::string makeHistname(std::string set, bool ontrk);
 	std::string makeHisttitle(std::string set, std::string axis, bool ontrk);
@@ -263,24 +261,18 @@ private:
    bool m_doESD;
    bool m_do2DMaps;
    bool m_doModules;
-   bool m_doFEChipSummary;
    bool m_doOffline;
    bool m_doOnline;
    bool m_doLowOccupancy;
    bool m_doHighOccupancy;
    bool m_doOnTrack;
-   bool m_doOnPixelTrack;
    bool m_doPixelOccupancy; 
-   bool m_doRodSim;
    bool m_doDetails;
-   bool m_doSpectrum;
-   bool m_doNoiseMap;
    bool m_doTiming;
    bool m_doLumiBlock;   //store module status, error etc for each lumiblock
    bool m_doRefresh;
    bool m_doRefresh5min;
    bool m_isFirstBook;
-   bool m_doDegFactorMap;
    bool m_doOfflineAnalysis;
 
    bool m_doHeavyIonMon;  //modifications for heavy ion monitoring
@@ -298,8 +290,6 @@ private:
 
    double m_occupancy_cut;
 
-   std::vector<double> m_hitocc_stock[PixLayer::COUNT];
-
    int                   m_ClusPerEventArray_disksA[48][3];
    int                   m_ClusPerEventArray_disksC[48][3];
    int                   m_ClusPerEventArray_lI[14][20];
@@ -307,6 +297,13 @@ private:
    int                   m_ClusPerEventArray_l1[38][13];
    int                   m_ClusPerEventArray_l2[52][13];
 
+   int                   m_HitPerEventArray_disksA[48][3] = {0};
+   int                   m_HitPerEventArray_disksC[48][3] = {0};
+   int                   m_HitPerEventArray_lI[14][20] = {0};
+   int                   m_HitPerEventArray_l0[22][13] = {0};
+   int                   m_HitPerEventArray_l1[38][13] = {0};
+   int                   m_HitPerEventArray_l2[52][13] = {0};
+
    //////////////////////Histograms///////////////////////////
    
    ///
@@ -324,8 +321,8 @@ private:
    /// the number of hits
    TProfile_LW*            m_hits_per_lumi;
    TH1I_LW*                m_num_hits;
-   PixelMon2DMaps*         m_hitmap_mon;
-   PixelMon2DMaps*         m_hitmap_tmp;
+   PixelMon2DMapsLW*       m_hitmap_mon;
+   PixelMon2DMapsLW*       m_hitmap_tmp;
    TH1F_LW*                m_nhits_mod[PixLayer::COUNT];
    TProfile_LW*            m_hits_per_lumi_mod[PixLayer::COUNT];
    TH1F_LW*                m_nlargeevt_per_lumi_mod[PixLayerIBL2D3D::COUNT];
@@ -338,11 +335,12 @@ private:
    TProfile2D_LW*          m_avgocc_per_bcid_per_lumi_mod[PixLayerIBL2D3D::COUNT];
    TProfile_LW*            m_avgocc_active_per_lumi_mod[PixLayerIBL2D3D::COUNT];
    TH2F_LW*                m_maxocc_per_lumi_mod[PixLayerIBL2D3D::COUNT];
+   TH2F_LW*                m_modocc_per_lumi[PixLayer::COUNT];
    TH1F_LW*                m_maxocc_per_bcid_mod[PixLayerIBL2D3D::COUNT];
-   PixelMon2DMaps*         m_occupancy;
+   PixelMon2DMapsLW*       m_occupancy;
    PixelMon2DMapsLW*       m_average_pixocc;
    PixelMon2DProfilesLW*   m_occupancy_pix_evt;
-   PixelMon2DMaps*         m_occupancy_10min;
+   PixelMon2DMapsLW*       m_occupancy_10min;
    TProfile*               m_occupancy_time1;
    TProfile*               m_occupancy_time2;
    TProfile*               m_occupancy_time3;
@@ -378,9 +376,6 @@ private:
    PixelMonModulesProf*    m_hiteff_mod;
    PixelMonModules1D*      m_FE_chip_hit_summary;
    PixelMonModules2D*      m_pixel_occupancy;
-   /// ROD Sim
-   TH1F_LW*                m_RodSim_BCID_minus_ToT;
-   TH1F_LW*                m_RodSim_FrontEnd_minus_Lvl1ID;
    /// details
    TH1F_LW*                m_Details_mod1_num_hits;
    TH1F_LW*                m_Details_mod2_num_hits;
@@ -428,9 +423,6 @@ private:
    TProfile2D_LW*          m_LorentzAngle_B0;
    TProfile2D_LW*          m_LorentzAngle_B1;
    TProfile2D_LW*          m_LorentzAngle_B2;
-   /// degradation factor
-   TProfile2D_LW*          m_degFactorMap;
-   TProfile_LW*            m_degFactorMap_per_lumi;
 
    /// cluster size
    TH1F_LW*                m_clusize_ontrack_mod[PixLayerIBL2D3D::COUNT];
@@ -477,9 +469,9 @@ private:
    TH1F_LW*              m_2cluster_Q_mod[PixLayer::COUNT];
    TH1F_LW*              m_3cluster_Q_mod[PixLayer::COUNT];
    TH1F_LW*              m_bigcluster_Q_mod[PixLayer::COUNT];
-   PixelMonProfiles*     m_clussize_map;
-   PixelMonProfiles*     m_cluscharge_map;
-   PixelMonProfiles*     m_clusToT_map;
+   PixelMon2DProfilesLW* m_clussize_map;
+   PixelMon2DProfilesLW* m_cluscharge_map;
+   PixelMon2DProfilesLW* m_clusToT_map;
    TH1F_LW*              m_cluster_groupsize;
    TH1F_LW*              m_cluster_col_width;
    TH1F_LW*              m_cluster_row_width;
@@ -493,15 +485,15 @@ private:
    TH2F_LW*              m_ToT_vs_clussize_mod[PixLayer::COUNT];
    TProfile_LW*          m_clussize_vs_eta_mod[PixLayer::COUNT];
 
-   PixelMon2DMaps*       m_clustermap_mon;
-   PixelMon2DMaps*       m_clustermap_tmp;
-   PixelMon2DMaps*       m_cluster_occupancy;
+   PixelMon2DMapsLW*     m_clustermap_mon;
+   PixelMon2DMapsLW*     m_clustermap_tmp;
+   PixelMon2DMapsLW*     m_cluster_occupancy;
    TH2F_LW*              m_cluster_occupancy_FE_B0_mon;
    TProfile*             m_cluster_occupancy_time1;
    TProfile*             m_cluster_occupancy_time2;
    TProfile*             m_cluster_occupancy_time3;
 
-   PixelMon2DMaps*       m_clusocc_sizenot1; 
+   PixelMon2DMapsLW*     m_clusocc_sizenot1;
    PixelMonModulesProf*  m_cluseff_mod;
    PixelMonModules1D*    m_cluster_ToT_mod;
    PixelMonModules1D*    m_cluster_size_mod;
@@ -510,8 +502,8 @@ private:
    TProfile_LW*          m_clusters_per_track_per_lumi_mod[PixLayer::COUNT];
    TH1I_LW*              m_num_clusters_mod[PixLayer::COUNT];
    TH1F_LW*              m_cluster_occupancy_summary_mod[PixLayer::COUNT];
-   PixelMonProfiles*     m_cluster_LVL1A_mod;
-   PixelMonProfiles*     m_clus_LVL1A_sizenot1;
+   PixelMon2DProfilesLW* m_cluster_LVL1A_mod;
+   PixelMon2DProfilesLW* m_clus_LVL1A_sizenot1;
    TProfile_LW*          m_clustersOnOffTrack_per_lumi;
    /// Quick status
    TH2F_LW*              m_clusters_onTrack_L0_B11_S2_C6;
@@ -522,11 +514,10 @@ private:
    ///Status histograms
    ///
    PixelMonModules1D*    m_Status_modules;
-   PixelMonProfiles*     m_status;
-   PixelMonProfiles*     m_status_mon;
-   PixelMonProfiles*     m_status_LB;
-   PixelMonProfiles*     m_disabled;
-   PixelMon2DMaps*       m_dqStatus;
+   PixelMon2DProfilesLW* m_status;
+   PixelMon2DProfilesLW* m_status_mon;
+   PixelMon2DProfilesLW* m_status_LB;
+   PixelMon2DMapsLW*     m_dqStatus;
    TProfile_LW*          m_disabledModules_per_lumi_PIX;
    TProfile_LW*          m_badModules_per_lumi_mod[PixLayerIBL2D3D::COUNT];
    TProfile_LW*          m_disabledModules_per_lumi_mod[PixLayerIBL2D3D::COUNT];
@@ -537,11 +528,13 @@ private:
    ///
    static const int      kNumErrorBits{32};
    static const int      kNumErrorStates{16};
+   static const int      kNumErrorStatesIBL{27};
    TProfile_LW*          m_errhist_errcat_LB[PixLayerIBL2D3D::COUNT][ErrorCategory::COUNT];
    TProfile_LW*          m_errhist_errtype_LB[PixLayerIBL2D3D::COUNT][ErrorCategoryMODROD::COUNT - 3];
    PixelMon2DMapsLW*     m_errhist_errcat_map[ErrorCategory::COUNT];
    PixelMon2DMapsLW*     m_errhist_errtype_map[ErrorCategoryMODROD::COUNT];
    TProfile_LW*          m_errhist_errcat_avg[ErrorCategory::COUNT][PixLayerIBL2D3D::COUNT];
+   TProfile_LW*          m_errhist_errtype_avg[ErrorCategoryMODROD::COUNT - 3][PixLayerIBL2D3D::COUNT];
    TProfile_LW*          m_errhist_tot_LB[PixLayerIBL2D3D::COUNT];
    TProfile2D_LW*        m_errhist_per_bit_LB[PixLayerIBL2D3D::COUNT];
    TProfile2D_LW*        m_errhist_per_type_LB[PixLayerIBL2D3D::COUNT];
@@ -550,11 +543,13 @@ private:
    TProfile*             m_error_time2;       
    TProfile*             m_error_time3;       
    PixelMonModules1D*    m_errors;
+   PixelMon2DProfilesLW* m_errhist_femcc_errwords_map;
 
    // Histograms in 'ErrorsExpert' folder
-   PixelMon2DLumiMaps*   m_errhist_expert_LB_maps[kNumErrorStates];
-   PixelMon2DMapsLW*     m_errhist_expert_maps[kNumErrorStates];
+   PixelMon2DLumiMaps*   m_errhist_expert_LB_maps[kNumErrorStates + kNumErrorStatesIBL];
+   PixelMon2DMapsLW*     m_errhist_expert_maps[kNumErrorStates + kNumErrorStatesIBL];
    TProfile_LW*          m_errhist_expert_LB[PixLayer::COUNT-1][kNumErrorStates];
+   TProfile_LW*          m_errhist_expert_IBL_LB[kNumErrorStatesIBL];
    TH3F*                 m_errhist_expert_fe_trunc_err_3d[PixLayer::COUNT];
    TH1F_LW*              m_errhist_expert_servrec_ibl_unweighted;
    TH1F_LW*              m_errhist_expert_servrec_ibl_weighted;
@@ -579,7 +574,7 @@ private:
    TH2F_LW*  m_spHit_rz;
 
    //Histograms stored for certain number of LB at a time
-   PixelMon2DMaps*    m_cluster_occupancy_LB;  //cluster occupancy (shows module status)
+   PixelMon2DMapsLW*  m_cluster_occupancy_LB;  //cluster occupancy (shows module status)
    PixelMonModules1D* m_cluster_ToT_mod_LB;
    PixelMonModules1D* m_cluster_num_mod_LB;
    PixelMonModules1D* m_hit_num_mod_LB;
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DLumiMaps.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DLumiMaps.h
index a87c8ba3b251900443ca60dfe128defa57097d03..bef854c508c0248e8723962a9668fff89e08dddf 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DLumiMaps.h
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DLumiMaps.h
@@ -5,6 +5,7 @@
 #ifndef PIXELMON2DLUMIMAPS_H_
 #define PIXELMON2DLUMIMAPS_H_
 #include "AthenaMonitoring/ManagedMonitorToolBase.h"
+#include <array>
 #include <string.h>
 
 class TH2F_LW;
@@ -12,17 +13,25 @@ class Identifier;
 class PixelID;
 class StatusCode;
 
+namespace PixMon {
+enum class HistConf;
+}
+
 // A helper class to remove a lot of the code duplication.
-// This is a collection of 5 2D histograms which make up the '2D maps' used a lot of in the monitoring.
-// Each of the 2D maps correspond to a detector region (B0, B1, B2, ECA, ECC).
+// This is a collection of 6 2D histograms which make up the '2D luminosity maps' used a lot of in the monitoring.
+// Each of the 2D maps correspond to a detector region (IBL, B0, B1, B2, ECA, ECC).
 // This books and formats the histograms in the constructor. The fill method will take the identifier 
 // as the input and fill the correct histogram and bin. The histograms are also public so that they
 // can be formated/accessed like any other histograms in the monitoring.
+//
+// N.B. Currently no support for IBL2D/3D histograms as well as DBM monitoring. Should this be added?
+// Also, if the histogram configuration contains unsupported histograms, this is completely ignored.
+// Should we do anything against it?
  
 class PixelMon2DLumiMaps
 {
    public:
-      PixelMon2DLumiMaps(std::string name, std::string title, std::string zlabel, bool doIBL, bool errorHist = false);
+      PixelMon2DLumiMaps(std::string name, std::string title, std::string zlabel, const PixMon::HistConf& config);
       ~PixelMon2DLumiMaps();
       TH2F_LW* IBLlbm;
       TH2F_LW* B0lbm;
@@ -30,14 +39,15 @@ class PixelMon2DLumiMaps
       TH2F_LW* B2lbm;
       TH2F_LW* Albm;
       TH2F_LW* Clbm;
+      TH2F_LW* DBMAlbm;
+      TH2F_LW* DBMClbm;
       void Fill(double LB,Identifier &id, const PixelID* pixID, double weight = 1);
-      void Scale(double number);
       StatusCode regHist(ManagedMonitorToolBase::MonGroup &group);
 private:
       void formatHist();
-      const bool m_doIBL;
-      const bool m_errorHist;
-      
+      std::array<TH2F_LW*, 10> m_histograms;
+      const PixMon::HistConf m_config;
+      static const bool m_doIBL;
 };
 
 #endif
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DLumiProfiles.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DLumiProfiles.h
index e1083c72f966d562dea406cc82a8daad5a5f54b4..83925fdbcc42ef6ae5f2b7b36d6e46de226ac128 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DLumiProfiles.h
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DLumiProfiles.h
@@ -5,6 +5,7 @@
 #ifndef PIXELMON2DLUMIPROFILES_H_
 #define PIXELMON2DLUMIPROFILES_H_
 #include "AthenaMonitoring/ManagedMonitorToolBase.h"
+#include <array>
 #include <string.h>
 
 class TProfile2D_LW;
@@ -12,17 +13,25 @@ class Identifier;
 class PixelID;
 class StatusCode;
 
+namespace PixMon {
+enum class HistConf;
+}
+
 // A helper class to remove a lot of the code duplication.
-// This is a collection of 5 2D histograms which make up the '2D maps' used a lot of in the monitoring.
-// Each of the 2D maps correspond to a detector region (B0, B1, B2, ECA, ECC).
+// This is a collection of 6 2D histograms which make up the '2D lumi profiles' used a lot of in the monitoring.
+// Each of the 2D maps correspond to a detector region (IBL, B0, B1, B2, ECA, ECC).
 // This books and formats the histograms in the constructor. The fill method will take the identifier 
 // as the input and fill the correct histogram and bin. The histograms are also public so that they
 // can be formated/accessed like any other histograms in the monitoring.
+//
+// N.B. Currently no support for IBL2D/3D histograms as well as DBM monitoring. Should this be added?
+// Also, if the histogram configuration contains unsupported histograms, this is completely ignored.
+// Should we do anything against it?
 
 class PixelMon2DLumiProfiles
 {
    public:
-      PixelMon2DLumiProfiles(std::string name, std::string title, std::string zlabel, bool doIBL, bool errorHist = false);
+      PixelMon2DLumiProfiles(std::string name, std::string title, std::string zlabel, const PixMon::HistConf& config);
       ~PixelMon2DLumiProfiles();
       TProfile2D_LW* IBLlbp;
       TProfile2D_LW* B0lbp;
@@ -30,13 +39,15 @@ class PixelMon2DLumiProfiles
       TProfile2D_LW* B2lbp;
       TProfile2D_LW* Albp;
       TProfile2D_LW* Clbp;
+      TProfile2D_LW* DBMAlbp;
+      TProfile2D_LW* DBMClbp;
       void Fill(double LB, Identifier &id, const PixelID* pixID, double weight = 1);
       StatusCode regHist(ManagedMonitorToolBase::MonGroup &group);
 private:
       void formatHist();
-      const bool m_doIBL;
-      const bool m_errorHist;
-      
+      std::array<TProfile2D_LW*, 10> m_histograms;
+      const PixMon::HistConf m_config;
+      static const bool m_doIBL;
 };
 
 #endif
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DMaps.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DMaps.h
deleted file mode 100644
index 9b9c7548b02312732d303c0c1ed9e0d70e1bd572..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DMaps.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef PIXELMON2DMAPS_H_
-#define PIXELMON2DMAPS_H_
-#include "AthenaMonitoring/ManagedMonitorToolBase.h"
-#include <string.h>
-
-class TH2F;
-class Identifier;
-class PixelID;
-class StatusCode;
-
-// A helper class to remove a lot of the code duplication.
-// This is a collection of 5 2D histograms which make up the '2D maps' used a lot of in the monitoring.
-// Each of the 2D maps correspond to a detector region (B0, B1, B2, ECA, ECC).
-// This books and formats the histograms in the constructor. The fill method will take the identifier 
-// as the input and fill the correct histogram and bin. The histograms are also public so that they
-// can be formated/accessed like any other histograms in the monitoring.
-
-class PixelMon2DMaps
-{
-   public:
-      PixelMon2DMaps(std::string name, std::string title, bool doIBL);
-      ~PixelMon2DMaps();
-      TH2F* IBL2D;
-      TH2F* IBL3D;
-      TH2F* IBL;
-      TH2F* B0;
-      TH2F* B1;
-      TH2F* B2;
-      TH2F* A;
-      TH2F* C;
-      TH2F* DBMA;
-      TH2F* DBMC;
-      int m_cnt;
-      void Reset();
-      void Fill(Identifier &id, const PixelID* pixID);
-      void WeightingFill(Identifier &id, const PixelID* pixID, float weight);
-      void Scale(double number);
-      void ScaleByNChannels(int nActive_IBL2D, int nActive_IBL3D, int nActive_B0, int nActive_B1, int nActive_B2, int nActive_ECA, int nActive_ECC, int nActive_DBMA, int nActive_DBMC);
-      void ScaleBynPixnEvt(int nevent);
-      void Fill2DMon(PixelMon2DMaps* oldmap);
-      StatusCode regHist(ManagedMonitorToolBase::MonGroup &group);
-private:
-      void formatHist();
-      const bool m_doIBL;
-};
-
-#endif
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DMapsLW.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DMapsLW.h
index d71846fff02f2ef324147118e9e563ebd4832e4b..1edcf7452fb12a1832dddc779d36d65549998f7a 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DMapsLW.h
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DMapsLW.h
@@ -5,12 +5,16 @@
 #ifndef PIXELMON2DMAPSLW_H_
 #define PIXELMON2DMAPSLW_H_
 #include "AthenaMonitoring/ManagedMonitorToolBase.h"
+#include <array>
 #include <string.h>
 
 class TH2F_LW;
 class Identifier;
 class PixelID;
 class StatusCode;
+namespace PixMon {
+enum class HistConf;
+}
 
 // A helper class to remove a lot of the code duplication.
 // This is a collection of 5 2D histograms which make up the '2D mapsLW' used a lot of in the monitoring.
@@ -22,7 +26,7 @@ class StatusCode;
 class PixelMon2DMapsLW
 {
    public:
-      PixelMon2DMapsLW(std::string name, std::string title, bool doIBL, bool errorHist = false);
+      PixelMon2DMapsLW(std::string name, std::string title, const PixMon::HistConf& config, bool copy2DFEval = false);
       ~PixelMon2DMapsLW();
       TH2F_LW* IBL;
       TH2F_LW* IBL2D;
@@ -35,14 +39,16 @@ class PixelMon2DMapsLW
       TH2F_LW* DBMA;
       TH2F_LW* DBMC;
       void Fill(Identifier &id, const PixelID* pixID);
-      void FillNormalized(PixelMon2DMapsLW* old, int nevent);
       void WeightingFill(Identifier &id, const PixelID* pixID, float weight);
-      void Scale(double number);
+      void Fill2DMon(PixelMon2DMapsLW* oldmap);
       StatusCode regHist(ManagedMonitorToolBase::MonGroup &group);
 private:
+      friend class PixelMon2DProfilesLW;
       void formatHist();
-      const bool m_doIBL;
-      const bool m_errorHist;
+      std::array<TH2F_LW*, 10> m_histograms;
+      const PixMon::HistConf m_config;
+      static const bool m_doIBL;
+      const bool m_copy2DFEval;
 };
 
 #endif
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DProfilesLW.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DProfilesLW.h
index 34a676f60e11fce218a0deae3a09d755bcb6031e..83cffbcc8d6d25cb10a3193f0e251dfef35cbe8d 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DProfilesLW.h
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMon2DProfilesLW.h
@@ -8,46 +8,48 @@
 #include <string.h>
 
 class TProfile2D_LW;
-class TH2F_LW;
 class Identifier;
 class PixelID;
 class StatusCode;
-class PixelMon2DMaps;
 class PixelMon2DMapsLW;
 
+namespace PixMon {
+enum class HistConf;
+}
+
 // A helper class to facilitate definition of per-layer 2D profile maps.
 // It defines a collection of TProfile2D_LW histograms for each pixel layer, which then can be declared or
 // filled in a single call.
 // This books and formats the histograms in the constructor. The fill method will take the identifier 
 // as the input and fill the correct histogram and bin. The histograms are also public so that they
 // can be formated/accessed like any other histograms in the monitoring.
-//
-// N.B. the type of histograms is the same as for PixelMonProfiles class,
-// but the filling methods are somewhat different. Candidate for cleanup.
 
 class PixelMon2DProfilesLW
 {
 public:
-  PixelMon2DProfilesLW(std::string name, std::string title, bool doIBL, bool errorHist = false, bool copy2DFEval = false);
+  PixelMon2DProfilesLW(std::string name, std::string title, const PixMon::HistConf& config, bool copy2DFEval = false);
   ~PixelMon2DProfilesLW();
-  TProfile2D_LW* IBL;
-  TProfile2D_LW* IBL2D;
   TProfile2D_LW* IBL3D;
+  TProfile2D_LW* IBL2D;
+  TProfile2D_LW* IBL;
   TProfile2D_LW* B0;
   TProfile2D_LW* B1;
   TProfile2D_LW* B2;
   TProfile2D_LW* A;
   TProfile2D_LW* C;
-  //TProfile2D_LW* DBMA;
-  //TProfile2D_LW* DBMC;
+  TProfile2D_LW* DBMA;
+  TProfile2D_LW* DBMC;
   void Fill(Identifier &id, const PixelID* pixID, float value);
   void Fill2DMon(PixelMon2DProfilesLW* oldmap);
-  void FillFromMap(PixelMon2DMaps* inputmap, bool clear_inputmap);
+  void FillFromMap(PixelMon2DMapsLW* inputmap, bool clear_inputmap);
+  void SetMaxValue(float max);
+  void Reset();
   StatusCode regHist(ManagedMonitorToolBase::MonGroup &group);
 private:
   void formatHist();
-  const bool m_doIBL;
-  const bool m_errorHist;
+  std::array<TProfile2D_LW*, 10> m_histograms;
+  const PixMon::HistConf m_config;
+  static const bool m_doIBL;
   const bool m_copy2DFEval;
 };
 
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonModules.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonModules.h
index eba7765dcc06bba60f9bc590a099b1d7a5a6e998..a7677590ec814b220393aad5322c46750975e21b 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonModules.h
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonModules.h
@@ -31,14 +31,15 @@ class PixelMonModules
       virtual StatusCode regHist(ManagedMonitorToolBase* thisptr, std::string path, ManagedMonitorToolBase::Interval_t Run) = 0;
    protected:
       int m_nBins;
-      std::string getHistName(int i, bool forPath = false, bool doIBL = false);
+      std::string getHistName(int i, bool forPath = false);
+      static const bool m_doIBL;
 };
 
 class PixelMonModules1D : public PixelMonModules
 {
    public:
-      PixelMonModules1D(std::string name, std::string title, int nbins, double low, double high, bool doIBL);
-      PixelMonModules1D(std::string name, std::string title, int nbins, double *arr, bool doIBL);
+      PixelMonModules1D(std::string name, std::string title, int nbins, double low, double high);
+      PixelMonModules1D(std::string name, std::string title, int nbins, double *arr);
       virtual ~PixelMonModules1D();
       StatusCode regHist(ManagedMonitorToolBase* thisptr, std::string path, ManagedMonitorToolBase::Interval_t Run);
       TH1F* IBL[20][14];
@@ -55,14 +56,13 @@ class PixelMonModules1D : public PixelMonModules
    private:
       TH1F* m_Dummy;           //shouldn't be used unless messed up;
       TH1F* &getHist(int i); //make looping over all the histos easier.
-      const bool m_doIBL;
 };
 
 class PixelMonModulesProf : public PixelMonModules
 {
    public:
-      PixelMonModulesProf(std::string name, std::string title, int nbins, double low, double high, bool doIBL);
-      PixelMonModulesProf(std::string name, std::string title, int nbins, double *arr, bool doIBL);
+      PixelMonModulesProf(std::string name, std::string title, int nbins, double low, double high);
+      PixelMonModulesProf(std::string name, std::string title, int nbins, double *arr);
       virtual ~PixelMonModulesProf();
       StatusCode regHist(ManagedMonitorToolBase* thisptr, std::string path, ManagedMonitorToolBase::Interval_t Run);
       TProfile_LW* IBL[20][14];
@@ -78,13 +78,12 @@ class PixelMonModulesProf : public PixelMonModules
    private:
       TProfile_LW* m_Dummy;           //shouldn't be used unless messed up;
       TProfile_LW* &getHist(int i); //make looping over all the histos easier.
-      const bool m_doIBL;
 };
 
 class PixelMonModules2D : public PixelMonModules
 {
    public:
-      PixelMonModules2D(std::string name, std::string title, int nbins0, double low0, double high0,int nbins1, double low1, double high1, bool doIBL);
+      PixelMonModules2D(std::string name, std::string title, int nbins0, double low0, double high0,int nbins1, double low1, double high1);
       virtual ~PixelMonModules2D();
       StatusCode regHist(ManagedMonitorToolBase* thisptr, std::string path, ManagedMonitorToolBase::Interval_t Run);
       TH2F* IBL[20][14];
@@ -94,13 +93,11 @@ class PixelMonModules2D : public PixelMonModules
       TH2F* A[3][48];
       TH2F* C[3][48];
       virtual void formatHist(std::string opt="");  //pass the bin labels here if needed
-      void Fill(double value0, double value1, Identifier &id, const PixelID* pixID, double weight);
-      void Fill(double value0, double value1, Identifier &id, const PixelID* pixID);
+      void Fill(double value0, double value1, Identifier &id, const PixelID* pixID, double weight = 1.);
       virtual void Reset();
    private:
       TH2F* m_Dummy;           //shouldn't be used unless messed up;
       TH2F* &getHist(int i); //make looping over all the histos easier.
-      const bool m_doIBL;
 };
 
 #endif
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonProfiles.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonProfiles.h
deleted file mode 100644
index 203fec416f3d1f4d1e05989d3e153b7cda5cc1f8..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMonProfiles.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef PIXELMONPROFILES_H_
-#define PIXELMONPROFILES_H_
-#include "AthenaMonitoring/ManagedMonitorToolBase.h"
-#include <string.h>
-
-class TProfile2D_LW;
-class Identifier;
-class PixelID;
-class StatusCode;
-
-// A helper class to facilitate definition of per-layer 2D profile maps.
-// It defines a collection of TProfile2D_LW histograms for each pixel layer, which then can be declared or
-// filled in a single call.
-// The fill method will take the identifier as the input and fill the correct histogram and bin.
-// The histograms are also public so that they can be formated/accessed just like any other histograms in the monitoring.
-//
-// N.B. the type of histograms is the same as for PixelMon2DProfilesLW class,
-// but the filling methods are somewhat different. Candidate for cleanup.
-
-class PixelMonProfiles
-{
-   public:
-      PixelMonProfiles(std::string name, std::string title, bool doIBL);
-      ~PixelMonProfiles();
-      TProfile2D_LW* IBL;
-      TProfile2D_LW* IBL2D;
-      TProfile2D_LW* IBL3D;
-      TProfile2D_LW* B0;
-      TProfile2D_LW* B1;
-      TProfile2D_LW* B2;
-      TProfile2D_LW* A;
-      TProfile2D_LW* C;
-      void Fill(Identifier &id, const PixelID* pixID, float Index);
-      void SetMaxValue(float max);
-      void Reset();
-      StatusCode regHist(ManagedMonitorToolBase::MonGroup &group);
-   private:
-      void formatHist();
-      const bool m_doIBL;
-};
-
-#endif
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx
index eef19f371bc5463f036379ff60a668061831f3c9..5cca08c061e423f20467a966c86a2f4abf3825cd 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx
@@ -25,10 +25,9 @@
 #include "LWHists/TProfile2D_LW.h"
 #include <sstream>
 
-#include "PixelMonitoring/PixelMon2DMaps.h"
-#include "PixelMonitoring/DBMMon2DMaps.h"
+#include "PixelMonitoring/Components.h"
+#include "PixelMonitoring/PixelMon2DMapsLW.h"
 #include "PixelMonitoring/PixelMonModules.h"
-#include "PixelMonitoring/PixelMonProfiles.h"
 #include "PixelMonitoring/PixelMon2DProfilesLW.h"
 
 #include "PixelCabling/IPixelCablingSvc.h"
@@ -44,13 +43,11 @@ StatusCode PixelMainMon::BookClustersMon(void)
   
   std::string path = "Pixel/Clusters";
   if(m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/ClustersOnTrack");
-  if(m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/ClustersOnPixelTrack");
   MonGroup clusterShift(   this, path.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms                         
   MonGroup clusterExpert ( this, path.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms                                      
   
   std::string pathT = "Pixel/Timing";
   if(m_doOnTrack) pathT.replace(pathT.begin(), pathT.end(), "Pixel/TimingOnTrack");
-  if(m_doOnPixelTrack) pathT.replace(pathT.begin(), pathT.end(), "Pixel/TimingOnPixelTrack");
   MonGroup timeShift(  this, pathT.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms                                 
   MonGroup timeExpert( this, pathT.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms                                         
   
@@ -63,7 +60,7 @@ StatusCode PixelMainMon::BookClustersMon(void)
   int nbins_eta = 13;   double min_eta = -6.5;  double max_eta = min_eta + (1.0*nbins_eta);
   int nbins_tot = 300;  double min_tot = -0.5; double max_tot = min_tot + (1.0*nbins_tot);
   int nbins_ibl_tot = 150;  double min_ibl_tot = -0.5; double max_ibl_tot = min_tot + (1.0*nbins_tot);
-  int nbins_Q = 70;     double min_Q = -0.5; double max_Q = min_Q + (3000.0*nbins_Q);
+  int nbins_Q = 140;    double min_Q = -0.5; double max_Q = min_Q + (1500.0*nbins_Q);
   int nbins_lvl1 = 14;  double min_lvl1 = -1.5; double max_lvl1 = min_lvl1 + (1.0*nbins_lvl1);
   std::string atext_LB = ";lumi block"; 
   std::string atext_BCID = ";BCID"; 
@@ -243,7 +240,7 @@ StatusCode PixelMainMon::BookClustersMon(void)
   }
   
    
-  if (m_doOnTrack || m_doOnPixelTrack) { 
+  if (m_doOnTrack) { 
     sc = clusterExpert.regHist(m_clustersOnOffTrack_per_lumi = TProfile_LW::create("ClustersOnOffTrack_per_lumi",("Fraction pixel clusters on track per event per LB" + m_histTitleExt + ";lumi block; fraction clusters/event").c_str(),2500,-0.5,2499.5));
   }
 
@@ -251,41 +248,41 @@ StatusCode PixelMainMon::BookClustersMon(void)
   if (m_do2DMaps)
     {
       tmp = "Cluster_Occupancy"; tmp2 = "Cluster occupancy";
-      m_cluster_occupancy = new PixelMon2DMaps(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), m_doIBL);
+      m_cluster_occupancy = new PixelMon2DMapsLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D);
       sc = m_cluster_occupancy->regHist(clusterShift);
       
       tmp = "Cluster_LVL1A_Mod"; tmp2 = "Average cluster Level 1 Accept";
-      m_cluster_LVL1A_mod = new PixelMonProfiles(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), m_doIBL);
+      m_cluster_LVL1A_mod = new PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true);
       sc = m_cluster_LVL1A_mod->regHist(timeShift);
 
       tmp = "Clus_Occ_SizeCut"; tmp2 = "Size>1 Cluster occupancy";
-      m_clusocc_sizenot1 = new PixelMon2DMaps(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), m_doIBL);
+      m_clusocc_sizenot1 = new PixelMon2DMapsLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D);
       sc = m_clusocc_sizenot1->regHist(clusterShift); 
 
       tmp = "Clus_LVL1A_SizeCut"; tmp2 = "Average Size>1 Cluster Level 1 Accept";
-      m_clus_LVL1A_sizenot1 = new PixelMonProfiles(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), m_doIBL);
+      m_clus_LVL1A_sizenot1 = new PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true);
       sc = m_clus_LVL1A_sizenot1->regHist(timeShift); 
 
       if (m_doOnline){
         tmp = "ClusterMap_Mon"; tmp2 = "Cluster map for monitoring";
-        m_clustermap_mon = new PixelMon2DMaps(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), m_doIBL);
+        m_clustermap_mon = new PixelMon2DMapsLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D);
         sc = m_clustermap_mon->regHist(clusterShift);
 
         tmp = "ClusterMap_tmp"; tmp2 = "Cluster map for monitoring";
-        m_clustermap_tmp = new PixelMon2DMaps(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), m_doIBL);
+        m_clustermap_tmp = new PixelMon2DMapsLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D);
         sc = m_clustermap_tmp->regHist(clusterShift);
       }
       if (!m_doOnline){
 	tmp = "Cluster_Size_Map"; tmp2 = "Average cluster size map";
-	m_clussize_map = new PixelMonProfiles(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), m_doIBL);
+	m_clussize_map = new PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true);
 	sc = m_clussize_map->regHist(clusterExpert);
 	
 	tmp = "Cluster_Charge_Map"; tmp2 = "Average cluster charge map";
-	m_cluscharge_map = new PixelMonProfiles(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), m_doIBL);
+	m_cluscharge_map = new PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true);
 	sc = m_cluscharge_map->regHist(clusterExpert);
 	
 	tmp = "Cluster_ToT_Map"; tmp2 = "Average cluster ToT map";
-	m_clusToT_map = new PixelMonProfiles(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), m_doIBL);
+	m_clusToT_map = new PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true);
 	sc = m_clusToT_map->regHist(clusterExpert);
 	
 
@@ -316,18 +313,18 @@ StatusCode PixelMainMon::BookClustersMon(void)
       }
     }
 
-  if (m_doModules)
+  if (m_doModules && m_doOnTrack)
     {
-      m_cluseff_mod = new PixelMonModulesProf("Clus_track_eff", ("Proportion of clusters on track vs t in module" + m_histTitleExt).c_str(), 2500,-0.5,2499.5,m_doIBL);
+      m_cluseff_mod = new PixelMonModulesProf("Clus_track_eff", ("Proportion of clusters on track vs t in module" + m_histTitleExt).c_str(), 2500,-0.5,2499.5);
       sc = m_cluseff_mod->regHist(this,(path+"/Modules_Cluseff").c_str(),run);
       
-      m_cluster_size_mod = new PixelMonModules1D("Cluster_size", ("Cluster size in Module" + m_histTitleExt).c_str(), 20,-0.5,19.5,m_doIBL);
+      m_cluster_size_mod = new PixelMonModules1D("Cluster_size", ("Cluster size in Module" + m_histTitleExt).c_str(), 20,-0.5,19.5);
       sc = m_cluster_size_mod->regHist(this,(path+"/Modules_ClusterSize").c_str(),run);
       
-      m_cluster_num_mod = new PixelMonModules1D("Cluster_num", ("Number of clusters per event in module" + m_histTitleExt).c_str(), 30,-0.5,29.5,m_doIBL);
+      m_cluster_num_mod = new PixelMonModules1D("Cluster_num", ("Number of clusters per event in module" + m_histTitleExt).c_str(), 30,-0.5,29.5);
       sc = m_cluster_num_mod->regHist(this,(path+"/Modules_NumberOfClusters").c_str(),run);
       
-      m_cluster_ToT_mod = new PixelMonModules1D("Cluster_ToT", ("Cluster ToT in Module" + m_histTitleExt).c_str(), 200,0.,200.,m_doIBL);
+      m_cluster_ToT_mod = new PixelMonModules1D("Cluster_ToT", ("Cluster ToT in Module" + m_histTitleExt).c_str(), 200,0.,200.);
       sc = m_cluster_ToT_mod->regHist(this,(path+"/Modules_ClusToT").c_str(),run);
     }
   if (m_doOnline)
@@ -366,7 +363,7 @@ StatusCode PixelMainMon::BookClustersMon(void)
       tmp2 = "Average cluster occupancy, " + m_modLabel_PixLayerIBL2D3D[i] + m_histTitleExt + ";average # of clusters per module per event;# modules";
       sc = clusterExpert.regHist(m_cluster_occupancy_summary_mod[i]= TH1F_LW::create(hname.c_str(), tmp2.c_str(), nbins_avclusters, 0., max_avclusters));
 
-      if(m_doOnTrack || m_doOnPixelTrack) { 
+      if(m_doOnTrack) { 
 	hname = makeHistname(("num_clusters_per_track_per_lumi_"+m_modLabel_PixLayerIBL2D3D[i]), true);
 	tmp2 = "Number of pixel clusters in an event, " + m_modLabel_PixLayerIBL2D3D[i] + m_histTitleExt + atext_LB + ";Avg #clusters/track/event";
 	sc = clusterExpert.regHist(m_clusters_per_track_per_lumi_mod[i] = TProfile_LW::create(hname.c_str(), tmp2.c_str(), nbins_LB, min_LB, max_LB));
@@ -378,7 +375,7 @@ StatusCode PixelMainMon::BookClustersMon(void)
  
   /// Quick Status
   if (m_doOfflineAnalysis) {
-    if (m_doOnTrack || m_doOnPixelTrack) { 
+    if (m_doOnTrack) { 
       hname = makeHistname("Clusters_onTrack_per_lumi_L0_B11_S2_C6", false);
       htitles = makeHisttitle("Number of clusters on track, L0_B11_S2_C6", ";lumi block;FE ID (16*(6-eta_mod) + 8*(pix_phi/164) + (eta_pix/18);#hits", false);
       sc = clusterExpert.regHist(m_clusters_onTrack_L0_B11_S2_C6 = TH2F_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB, 96, -0.5, -0.5+96));
@@ -403,7 +400,6 @@ StatusCode PixelMainMon::BookClustersLumiBlockMon(void)
   
   std::string path = "Pixel/LumiBlock";
   if (m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/LumiBlockOnTrack");
-  if (m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/LumiBlockOnPixelTrack");
   MonGroup lumiBlockHist(   this, path.c_str(), lowStat, ATTRIB_MANAGED); //declare a group of histograms                                  
   
   StatusCode sc;
@@ -411,7 +407,7 @@ StatusCode PixelMainMon::BookClustersLumiBlockMon(void)
   sc = lumiBlockHist.regHist(m_cluster_ToT_LB  = TH1F_LW::create("Cluster_ToT_LB", ("Cluster Time over Threshold" + m_histTitleExt + ";ToT;# clusters").c_str(), 300,-0.5,299.5));   
   
   if (m_do2DMaps) {
-    m_cluster_occupancy_LB = new PixelMon2DMaps("Cluster_Occupancy_LB", ("Cluster Occupancy" + m_histTitleExt).c_str(), m_doIBL);
+    m_cluster_occupancy_LB = new PixelMon2DMapsLW("Cluster_Occupancy_LB", ("Cluster Occupancy" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D);
     sc = m_cluster_occupancy_LB->regHist(lumiBlockHist);
   }
   if (m_doLowOccupancy || m_doHighOccupancy) {
@@ -420,10 +416,10 @@ StatusCode PixelMainMon::BookClustersLumiBlockMon(void)
     sc = lumiBlockHist.regHist(m_num_clusters_LB = TH1I_LW::create("num_clusters_LB", ("Number of pixel clusters per event" + m_histTitleExt + ";# pixel clusters/event;# events").c_str(), nbins_nclusters, min_nclusters, max_nclusters));
   }
   
-  if (m_doModules) {
-    m_cluster_num_mod_LB = new PixelMonModules1D("Cluster_num_LB", ("Number of clusters per event in module" + m_histTitleExt).c_str(), 20,-0.5,59.5,m_doIBL);
+  if (m_doModules && m_doOnTrack) {  // normally not booked, as doModules is online, doLumiBlock is offline
+    m_cluster_num_mod_LB = new PixelMonModules1D("Cluster_num_LB", ("Number of clusters per event in module" + m_histTitleExt).c_str(), 20,-0.5,59.5);
     sc = m_cluster_num_mod_LB->regHist(this,(path+"/Modules_NumberOfClusters").c_str(),lowStat);
-    m_cluster_ToT_mod_LB = new PixelMonModules1D("Cluster_ToT_mod_LB", ("Cluster ToT in Module" + m_histTitleExt).c_str(), 75,0.,300.,m_doIBL);
+    m_cluster_ToT_mod_LB = new PixelMonModules1D("Cluster_ToT_mod_LB", ("Cluster ToT in Module" + m_histTitleExt).c_str(), 75,0.,300.);
     sc = m_cluster_ToT_mod_LB->regHist(this,(path+"/Modules_ClusToT").c_str(),lowStat);
   }
   
@@ -450,19 +446,18 @@ StatusCode PixelMainMon::FillClustersMon(void)
   int nclusters_all=0;
   int nclusters_ontrack=0;
 
-  if (m_doModules){
-    if(m_doIBL){
-      for(int i=0;i<20;i++){
-	for(int j=0;j<14;j++) m_ClusPerEventArray_lI[j][i]=0;
-      }
+  if (m_doModules && m_doOnTrack) {
+    if (m_doIBL) {
+      for (int i=0;i<20;i++)
+	for (int j=0;j<14;j++) m_ClusPerEventArray_lI[j][i]=0;
     }
-    for(int i=0;i<13;i++){
-      for(int j=0;j<22;j++) m_ClusPerEventArray_l0[j][i]=0;
-      for(int j=0;j<38;j++) m_ClusPerEventArray_l1[j][i]=0;
-      for(int j=0;j<52;j++) m_ClusPerEventArray_l2[j][i]=0;
+    for (int i=0;i<13;i++) {
+      for (int j=0;j<22;j++) m_ClusPerEventArray_l0[j][i]=0;
+      for (int j=0;j<38;j++) m_ClusPerEventArray_l1[j][i]=0;
+      for (int j=0;j<52;j++) m_ClusPerEventArray_l2[j][i]=0;
     }
-    for(int j=0;j<3;j++){
-      for(int i=0;i<48;i++){
+    for (int j=0;j<3;j++) {
+      for (int i=0;i<48;i++) {
 	m_ClusPerEventArray_disksA[i][j]=0;
 	m_ClusPerEventArray_disksC[i][j]=0;
       }
@@ -518,7 +513,7 @@ StatusCode PixelMainMon::FillClustersMon(void)
 	  int feeta=0;
 	  if ( m_doOfflineAnalysis ) {
 	    if ( pixlayer == PixLayer::kB0 && GetFEID( pixlayer, m_pixelid->phi_index(clusID), m_pixelid->eta_index(clusID), fephi, feeta) ) {
-	      if ( m_doOnTrack || m_doOnPixelTrack ) { 
+	      if ( m_doOnTrack ) { 
 		if ( m_pixelid->phi_module(clusID) == 0 && m_pixelid->eta_module(clusID) < 0 ) {
 		  if ( OnTrack(clusID,true) ) {
 		    if ( m_clusters_onTrack_L0_B11_S2_C6 ) m_clusters_onTrack_L0_B11_S2_C6->Fill( m_manager->lumiBlockNumber(), (16*fabs(6+m_pixelid->eta_module(clusID)))+(8.0*fephi)+feeta );
@@ -532,7 +527,7 @@ StatusCode PixelMainMon::FillClustersMon(void)
 	 
 	  if (pixlayer != 99) nclusters_all++; // count all (no DBM) clusters on and off track
  
-	  if( (m_doOnTrack || m_doOnPixelTrack) && !OnTrack(clusID,true) ){
+	  if( m_doOnTrack && !OnTrack(clusID,true) ){
 	    continue;
 	    /// if we only want hits on track, and the hit is NOT on the track, skip filling.
 	    /// true means doing clusters, false means rdos
@@ -662,7 +657,7 @@ StatusCode PixelMainMon::FillClustersMon(void)
 	  if (cluster.rdoList().size() > 10) nlargeclusters++;
 	  if (cluster.rdoList().size() > 50) nverylargeclusters++;
 	  
-	  if (m_doModules)//fill module cluster arrays 
+	  if (m_doModules && m_doOnTrack) // fill module cluster arrays 
 	    {
 	      if (m_pixelid->barrel_ec(clusID)==2 ) m_ClusPerEventArray_disksA[m_pixelid->phi_module(clusID)][m_pixelid->layer_disk(clusID)]++;
 	      if (m_pixelid->barrel_ec(clusID)==-2) m_ClusPerEventArray_disksC[m_pixelid->phi_module(clusID)][m_pixelid->layer_disk(clusID)]++;
@@ -677,7 +672,7 @@ StatusCode PixelMainMon::FillClustersMon(void)
 
 	  if (m_doLumiBlock) {
 	    if (m_cluster_occupancy_LB) m_cluster_occupancy_LB->Fill(clusID,m_pixelid);
-	    if (m_cluster_ToT_LB)m_cluster_ToT_LB->Fill(cluster.totalToT());     
+	    if (m_cluster_ToT_LB) m_cluster_ToT_LB->Fill(cluster.totalToT());     
 	    if (m_cluster_ToT_mod_LB) m_cluster_ToT_mod_LB->Fill(cluster.totalToT(),clusID,m_pixelid);
 	  }
 
@@ -715,7 +710,7 @@ StatusCode PixelMainMon::FillClustersMon(void)
   //if(m_clusters_per_lumi_PIX)m_clusters_per_lumi_PIX->Fill(m_manager->lumiBlockNumber(),nclusters-nclusters_IBL); 
   for ( int i=0; i<PixLayer::COUNT-1+(int)(m_doIBL); i++){
     if (m_clusters_per_lumi_mod[i]) m_clusters_per_lumi_mod[i]->Fill( m_manager->lumiBlockNumber(), nclusters_mod[i]);
-    if (m_doOnTrack || m_doOnPixelTrack) { 
+    if (m_doOnTrack) { 
       if (m_clusters_per_track_per_lumi_mod[i] && m_ntracksPerEvent>0) m_clusters_per_track_per_lumi_mod[i]->Fill(m_manager->lumiBlockNumber(), (1.0*nclusters_mod[i])/(1.0*m_ntracksPerEvent));
     }
   }
@@ -723,7 +718,7 @@ StatusCode PixelMainMon::FillClustersMon(void)
   if (m_largeclusters_per_lumi)m_largeclusters_per_lumi->Fill(m_manager->lumiBlockNumber(), nlargeclusters); 
   if (m_verylargeclusters_per_lumi)m_verylargeclusters_per_lumi->Fill(m_manager->lumiBlockNumber(),nverylargeclusters); 
   if ((nclusters>=1000) && m_highNclusters_per_lumi) m_highNclusters_per_lumi->Fill(m_manager->lumiBlockNumber()); 
-  if (m_doOnTrack || m_doOnPixelTrack) {
+  if (m_doOnTrack) {
     if (m_clustersOnOffTrack_per_lumi && nclusters_all>0) m_clustersOnOffTrack_per_lumi->Fill(m_manager->lumiBlockNumber(),(float)nclusters_ontrack/nclusters_all); 
   }
   
@@ -741,7 +736,7 @@ StatusCode PixelMainMon::FillClustersMon(void)
     if (m_cluster_occupancy_time1&&m_cluster_occupancy_time2&&m_cluster_occupancy_time3) FillTimeHisto(double(nclusters/(1744.0+280*m_doIBL)),m_cluster_occupancy_time1, m_cluster_occupancy_time2, m_cluster_occupancy_time3,10.,60.,360. );
     if (m_doLumiBlock && m_num_clusters_LB) m_num_clusters_LB->Fill(nclusters);
     
-    if (m_doModules)
+    if (m_doModules && m_doOnTrack)
       {
 	PixelID::const_id_iterator idIt       = m_pixelid->wafer_begin();
 	PixelID::const_id_iterator idItEnd    = m_pixelid->wafer_end();
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Components.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Components.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..13a7735e91a6ab089f6b006c435551b000b2dbb9
--- /dev/null
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Components.cxx
@@ -0,0 +1,115 @@
+#include "PixelMonitoring/Components.h"
+
+namespace PixMon {
+// Definitions for barrel layers and IBL
+const std::array<std::string, kNumStavesIBL> StavesIBL = {{
+    "S01", "S02", "S03", "S04", "S05", "S06", "S07", "S08", "S09", "S10", "S11",
+    "S12", "S13","S14"}};
+
+const std::array<std::string, kNumStavesL0> StavesL0 = {{
+    "B11_S2", "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2",
+    "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2", "B07_S1",
+    "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2","B10_S1", "B10_S2",
+    "B11_S1"}};
+
+const std::array<std::string, kNumStavesL1> StavesL1 = {{
+    "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2", "B04_S1",
+    "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2", "B07_S1", "B07_S2",
+    "B08_S1", "B08_S2", "B09_S1", "B09_S2", "B10_S1", "B10_S2", "B11_S1",
+    "B11_S2", "B12_S1", "B12_S2", "B13_S1", "B13_S2", "B14_S1", "B14_S2",
+    "B15_S1", "B15_S2", "B16_S1", "B16_S2", "B17_S1", "B17_S2", "B18_S1",
+    "B18_S2", "B19_S1", "B19_S2"}};
+
+const std::array<std::string, kNumStavesL2> StavesL2 = {{
+    "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2", "B04_S1", "B04_S2",
+    "B05_S1", "B05_S2", "B06_S1", "B06_S2", "B07_S1", "B07_S2", "B08_S1",
+    "B08_S2", "B09_S1", "B09_S2", "B10_S1", "B10_S2", "B11_S1", "B11_S2",
+    "B12_S1", "B12_S2", "B13_S1", "B13_S2", "B14_S1", "B14_S2", "B15_S1",
+    "B15_S2", "B16_S1", "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2",
+    "B19_S1", "B19_S2", "B20_S1", "B20_S2", "B21_S1", "B21_S2", "B22_S1",
+    "B22_S2", "B23_S1", "B23_S2", "B24_S1", "B24_S2", "B25_S1", "B25_S2",
+    "B26_S1", "B26_S2", "B01_S1"}};
+
+const std::array<std::string, kNumModulesIBL> ModulesIBL = {{
+    "C8", "", "C7", "", "C6", "", "C5", "", "C4", "", "C3", "", "C2", "",
+    "C1", "", "A1", "", "A2", "", "A3", "", "A4", "", "A5", "", "A6", "",
+    "A7", "", "A8", ""}};
+
+const std::array<std::string, kNumModulesIBL2D> ModulesIBL2D = {{
+    "M3_C6", "M3_C5", "M2_C4", "M1_C3", "M1_C2", "M1_C1", "M1_A1", "M1_A2",
+    "M2_A3", "M2_A4", "M3_A5", "M3_A6"}};
+
+const std::array<std::string, kNumModulesIBL3D> ModulesIBL3D = {{
+    "M4_C8_2", "M4_C8_1", "M4_C7_2", "M4_C7_1", "M4_A7_1", "M4_A7_2", "M4_A8_1",
+    "M4_A8_2"}};
+
+const std::array<std::string, kNumModulesBarrel> ModulesBarrel = {{
+    "M6C", "M5C", "M4C", "M3C", "M2C", "M1C", "M0","M1A", "M2A", "M3A", "M4A",
+    "M5A", "M6A"}};
+
+
+// Definitions for end-caps and DBM
+const std::array<std::string, kNumLayersDisk> LayersDisk = {{
+  "Disk 1", "Disk 2", "Disk 3"}};
+
+const std::array<std::string, kNumLayersDBM> LayersDBM = {{
+  "Layer 0", "Layer 1", "Layer 2"}};
+
+const std::array<std::string, kNumModulesDisk> ModulesECA = {{
+    "B01_S2_M1", "B01_S2_M6", "B01_S2_M2", "B01_S2_M5", "B01_S2_M3",
+    "B01_S2_M4", "B02_S1_M1", "B02_S1_M6", "B02_S1_M2", "B02_S1_M5",
+    "B02_S1_M3", "B02_S1_M4", "B02_S2_M1", "B02_S2_M6", "B02_S2_M2",
+    "B02_S2_M5", "B02_S2_M3", "B02_S2_M4", "B03_S1_M1", "B03_S1_M6",
+    "B03_S1_M2", "B03_S1_M5", "B03_S1_M3", "B03_S1_M4", "B03_S2_M1",
+    "B03_S2_M6", "B03_S2_M2", "B03_S2_M5", "B03_S2_M3", "B03_S2_M4",
+    "B04_S1_M1", "B04_S1_M6", "B04_S1_M2", "B04_S1_M5", "B04_S1_M3",
+    "B04_S1_M4", "B04_S2_M1", "B04_S2_M6", "B04_S2_M2", "B04_S2_M5",
+    "B04_S2_M3", "B04_S2_M4", "B01_S1_M1", "B01_S1_M6", "B01_S1_M2",
+    "B01_S1_M5", "B01_S1_M3", "B01_S1_M4"}};
+
+const std::array<std::string, kNumModulesDisk> ModulesECC = {{
+    "B01_S2_M4", "B01_S2_M3", "B01_S2_M5", "B01_S2_M2", "B01_S2_M6",
+    "B01_S2_M1", "B02_S1_M4", "B02_S1_M3", "B02_S1_M5", "B02_S1_M2",
+    "B02_S1_M6", "B02_S1_M1", "B02_S2_M4", "B02_S2_M3", "B02_S2_M5",
+    "B02_S2_M2", "B02_S2_M6", "B02_S2_M1", "B03_S1_M4", "B03_S1_M3",
+    "B03_S1_M5", "B03_S1_M2", "B03_S1_M6", "B03_S1_M1", "B03_S2_M4",
+    "B03_S2_M3", "B03_S2_M5", "B03_S2_M2", "B03_S2_M6", "B03_S2_M1",
+    "B04_S1_M4", "B04_S1_M3", "B04_S1_M5", "B04_S1_M2", "B04_S1_M6",
+    "B04_S1_M1", "B04_S2_M4", "B04_S2_M3", "B04_S2_M5", "B04_S2_M2",
+    "B04_S2_M6", "B04_S2_M1", "B01_S1_M4", "B01_S1_M3", "B01_S1_M5",
+    "B01_S1_M2", "B01_S1_M6", "B01_S1_M1"}};
+
+const std::array<std::string, kNumModulesDBM> ModulesDBM = {{
+    "M3", "M4", "M1", "M2"}};
+
+bool HasComponent(const HistConf& config, const LayerIBL2D3DDBM& component) {
+   if (component >= LayerIBL2D3DDBM::COUNT) {
+      // return here if we are out of scope
+      return false;
+   } else if (config == HistConf::kPix && component <= LayerIBL2D3DDBM::kB2) {
+      return true;
+   } else if (config == HistConf::kPixIBL && (component <= LayerIBL2D3DDBM::kB2 || component == LayerIBL2D3DDBM::kIBL)) {
+      return true;
+   } else if (config == HistConf::kPixIBL2D3D && (component <= LayerIBL2D3DDBM::kB2 || component >= LayerIBL2D3DDBM::kIBL)) {
+      return true;
+   } else if (config == HistConf::kPixDBM && component <= LayerIBL2D3DDBM::kDBMC) {
+      return true;
+   } else if (config == HistConf::kPixDBMIBL && component <= LayerIBL2D3DDBM::kIBL) {
+      return true;
+   } else if (config == HistConf::kPixDBMIBL2D3D) {
+      return true;
+   } else if (config == HistConf::kDBM && (component == LayerIBL2D3DDBM::kDBMA || component == LayerIBL2D3DDBM::kDBMC)) {
+      return true;
+   } else if (config == HistConf::kDBMIBL && component >= LayerIBL2D3DDBM::kDBMA && component <= LayerIBL2D3DDBM::kIBL) {
+      return true;
+   } else if (config == HistConf::kDBMIBL2D3D && component >= LayerIBL2D3DDBM::kDBMA) {
+      return true;
+   } else if (config == HistConf::kIBL && component == LayerIBL2D3DDBM::kIBL) {
+      return true;
+   } else if (config == HistConf::kIBL2D3D && component >= LayerIBL2D3DDBM::kIBL) {
+      return true;
+   } else {
+      return false;
+   }
+}
+}  // namespace PixMon
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/DBMMon2DMaps.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/DBMMon2DMaps.cxx
deleted file mode 100644
index 67c8fa0a54645145ae4eb20726ae2ea3d6d4f4fd..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/DBMMon2DMaps.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//////////////////////////////////////////////////////////////////////////////
-// Function to handle 2D maps of modules, one for each region
-///////////////////////////////////////////////////////////////////////////////
-
-#include "PixelMonitoring/DBMMon2DMaps.h"
-#include "InDetIdentifier/PixelID.h"
-#include "TH2F.h"
-#include "GaudiKernel/StatusCode.h"     
-#include <string.h>
-
-DBMMon2DMaps::DBMMon2DMaps(std::string name, std::string title)
-{
-   DBMA = new TH2F((name+"_A").c_str(),("Side A " + title + "; layer number; phi index of telescope").c_str(),3,-0.5,2.5,4,-.5,3.5);
-   DBMC = new TH2F((name+"_C").c_str(),("Side C " + title + "; layer number; phi index of telescope").c_str(),3,-0.5,2.5,4,-.5,3.5);
-
-   formatHist();
-}
-
-DBMMon2DMaps::~DBMMon2DMaps()
-{
-   delete DBMA;
-   delete DBMC;
-}
-
-void DBMMon2DMaps::Fill(Identifier &id, const PixelID* pixID)
-{
-   const int bec = pixID->barrel_ec(id);
-   const int ld  = pixID->layer_disk(id);
-   const int pm  = pixID->phi_module(id);
-
-   if (bec == 4) {
-      DBMA->Fill(ld, pm);
-   }
-   if (bec == -4) {
-      DBMC->Fill(ld, pm);
-   }
-}   
-
-
-void DBMMon2DMaps::Scale (double number)
-{
-   if (number==0) return; //shouldn't happen the way function is called, but dummy check to avoid divide by zero
-   DBMA->Scale((float) 1.0/number);
-   DBMC->Scale((float) 1.0/number);
-}
-
-void DBMMon2DMaps::formatHist()
-{
-   const int ndisk = 3;
-   const int nphi  = 4;
-   const char *phi[nphi] = { "M1","M2","M3","M4"};
-   const char *disk[ndisk] = { "Disk 0","Disk 1","Disk 2"};
-
-   for (int i = 0; i < nphi; i++) {
-      DBMA->GetYaxis()->SetBinLabel(i + 1, phi[i]);
-      DBMC->GetYaxis()->SetBinLabel(i + 1, phi[i]);
-   }
-   for (int i = 0; i < ndisk; i++) {
-      DBMA->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-      DBMC->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-   }
-
-   //Make the text smaller
-   DBMA->GetYaxis()->SetLabelSize(0.04);
-   DBMC->GetYaxis()->SetLabelSize(0.04);
-   DBMA->GetXaxis()->SetLabelSize(0.04);
-   DBMC->GetXaxis()->SetLabelSize(0.04);
-   //Move the lable so you can read it
-   DBMA->GetYaxis()->SetTitleOffset(1.35);
-   DBMC->GetYaxis()->SetTitleOffset(1.35);
-   //put histograms in the easier to read colz format
-   DBMA->SetOption("colz");
-   DBMC->SetOption("colz");
-   //force the minimum to be 0 so you can spot empty blocks easily
-   DBMA->SetMinimum(0.);
-   DBMC->SetMinimum(0.);
-   //Remvoe the stats box because it's in the way
-   DBMA->SetStats(0.);
-   DBMC->SetStats(0.);
-}
-
-StatusCode DBMMon2DMaps::regHist(ManagedMonitorToolBase::MonGroup &group)
-{
-   StatusCode sc = StatusCode::SUCCESS;
-   if (group.regHist(DBMA).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(DBMC).isFailure()) sc = StatusCode::FAILURE;
-  
-   return sc;
-}
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx
index 5bb33c3dc65c6a0aeca44c19016390c4776b7af4..cf2ab68095ab8c454196c618a95e53b6392c0c3f 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx
@@ -25,7 +25,9 @@
 #include <sstream>
 
 #include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "PixelMonitoring/Components.h"
 #include "PixelMonitoring/PixelMon2DMapsLW.h"
+#include "PixelMonitoring/PixelMon2DProfilesLW.h"
 #include "PixelMonitoring/PixelMonModules.h"
 #include "PixelMonitoring/PixelMon2DLumiMaps.h"
 
@@ -41,7 +43,6 @@ StatusCode PixelMainMon::BookRODErrorMon(void)
    std::string path = "Pixel/Errors";
    std::string path2 = "Pixel/ErrorsExpert";
    if (m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/ErrorsOnTrack");
-   if (m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/ErrorsOnPixelTrack");
    MonGroup rodHistos(this, path.c_str(), run, ATTRIB_MANAGED); //declare a group of histograms
    MonGroup rodExpert(this, path2.c_str(), run, ATTRIB_MANAGED); //declare a group of histograms
 
@@ -64,6 +65,36 @@ StatusCode PixelMainMon::BookRODErrorMon(void)
        std::make_pair("FE_Warning",                    "FE Warning errors"),
      }};
 
+   std::array <std::pair <std::string, std::string>, kNumErrorStatesIBL > error_state_labelsIBL = {{
+       std::make_pair("BCID_errors",                   "Synchronization BCID errors"),
+       std::make_pair("LVL1ID_errors",                 "Synchronization LVL1ID errors"),
+       std::make_pair("Row_Column_errors",             "Row Column errors"),
+       std::make_pair("Limit_errors",                  "Limit_errors"),
+       std::make_pair("Preamble_errors",               "Preamble errors"),
+       std::make_pair("Masked_link_errors",            "Masked link errors"),
+       std::make_pair("Hamming_code_0_errors",         "Hamming code 0 errors"),
+       std::make_pair("Hamming_code_1_errors",         "Hamming code 1 errors"),
+       std::make_pair("Hamming_code_2_errors",         "Hamming code 2 errors"),
+       std::make_pair("L1_incounter_errors",           "L1 in counter errors"),
+       std::make_pair("L1_request_counter_errors",     "L1 request counter errors"),
+       std::make_pair("L1_register_errors",            "L1 register errors"),
+       std::make_pair("L1_Trigger_ID_errors",          "L1 trigger ID errors"),
+       std::make_pair("Readout_processor_errors",      "Readout processor errors"),
+       std::make_pair("Skipped_trig_counter_errors",   "Skipped trigger counter errors"),
+       std::make_pair("Truncated_event_flag_errors",   "Truncated event errors"),
+       std::make_pair("Triple redundant_errors",       "Triple redundant errors"),
+       std::make_pair("Write_reg_data_errors",         "Write register data errors"),
+       std::make_pair("Address_errors",                "Address errors"),
+       std::make_pair("Other_CMD_decoder_errors",      "CMD decoder errors"),
+       std::make_pair("CMD_decoder_bitflip_errors",    "CMD decoder bit flip errors"),
+       std::make_pair("CMD_decoder_SEU_errors",        "CMD decoder SEU errors"),
+       std::make_pair("Data_bus_address_errors",       "Data bus address errors"),
+       std::make_pair("ROD_Timeout_errors",            "ROD Timeout errors"),
+       std::make_pair("Timeout_errors",                "Timeout errors"),
+       std::make_pair("BCID_counter_errors",           "BCID counter errors"),
+       std::make_pair("Triple_redundant_errors2",      "Triple redundant errors 2"),
+     }};
+
    const char * errorBitsPIX[kNumErrorBits] = {
                                     "ROD Trunc FIFO Overflow",   "ROD Trunc H/T Limit",       "2",                 "3",
                                     "Module Trunc EoC",          "SEU Hit Parity",            "SEU Reg Parity",    "SEU Hamming Code",
@@ -170,6 +201,13 @@ StatusCode PixelMainMon::BookRODErrorMon(void)
          htitles = makeHisttitle((tmp[j]+", "+modlabel2[i]), (atext_LB+atext_erf), false);
          sc = rodHistos.regHist(m_errhist_errcat_avg[j][i] = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, minbin_LB, maxbin_LB));
       }
+
+      const std::string tmp2[ErrorCategoryMODROD::COUNT - 3] = {"SyncErrors_Mod_Frac_per_event", "SyncErrors_ROD_Frac_per_event", "TruncErrors_Mod_Frac_per_event", "TruncErrors_ROD_Frac_per_event"};
+      for (int j = 0; j < ErrorCategoryMODROD::COUNT - 3; j++) {
+         hname = makeHistname((tmp2[j]+"_"+modlabel2[i]), false);
+         htitles = makeHisttitle((tmp2[j]+", "+modlabel2[i]), (atext_LB+atext_erf), false);
+         sc = rodHistos.regHist(m_errhist_errtype_avg[j][i] = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, minbin_LB, maxbin_LB));
+      }
    }
 
    if (m_doOnline) {
@@ -182,25 +220,29 @@ StatusCode PixelMainMon::BookRODErrorMon(void)
    }
 
    if (m_doModules) {
-      m_errors = new PixelMonModules1D("errors", ("Errors in module:ErrorType" + m_histTitleExt + ";Number of Errors").c_str(), 7, 0.5, 7.5, m_doIBL);
+      m_errors = new PixelMonModules1D("errors", ("Errors in module:ErrorType" + m_histTitleExt + ";Number of Errors").c_str(), 7, 0.5, 7.5);
       sc = m_errors->regHist(this, (path+"/ModulesErrors").c_str(), run);
       for (int k = 0; k < 7; k++) m_errors->SetBinLabel(error_type_labels[k].second.c_str(), k+1);
    }
 
    if (m_do2DMaps && !m_doOnline) {
       for (int i = 0; i < ErrorCategoryMODROD::COUNT - 3; i++) {
-         m_errhist_errtype_map[i] = new PixelMon2DMapsLW(error_type_labels[i].first, (error_type_labels[i].second + m_histTitleExt).c_str(), m_doIBL);
+         m_errhist_errtype_map[i] = new PixelMon2DMapsLW(error_type_labels[i].first, (error_type_labels[i].second + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true);
          sc = m_errhist_errtype_map[i]->regHist(rodHistos);
       }
       for (int i = 0; i < ErrorCategory::COUNT; i++) {
-         m_errhist_errcat_map[i] = new PixelMon2DMapsLW(error_cat_labels[i].first.c_str(), (error_cat_labels[i].second + m_histTitleExt).c_str(), m_doIBL);
+         m_errhist_errcat_map[i] = new PixelMon2DMapsLW(error_cat_labels[i].first.c_str(), (error_cat_labels[i].second + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true);
          sc = m_errhist_errcat_map[i]->regHist(rodHistos);
       }
    }
 
    if (m_do2DMaps && !m_doOnline) {
       for (int j = 0; j < kNumErrorStates; j++) {
-         m_errhist_expert_LB_maps[j]  = new PixelMon2DLumiMaps(error_state_labels[j].first + "_int_LB", error_state_labels[j].second + " per event per LB" + m_histTitleExt, "# Errors", m_doIBL, true);
+         m_errhist_expert_LB_maps[j]  = new PixelMon2DLumiMaps(error_state_labels[j].first + "_int_LB", error_state_labels[j].second + " per event per LB" + m_histTitleExt, "# Errors", PixMon::HistConf::kPix);
+         sc = m_errhist_expert_LB_maps[j]->regHist(rodExpert);
+      }
+      for (int j = kNumErrorStates; j < kNumErrorStates+kNumErrorStatesIBL; j++) {
+         m_errhist_expert_LB_maps[j] = new PixelMon2DLumiMaps(error_state_labelsIBL[j - kNumErrorStates].first + "_int_LB", error_state_labelsIBL[j - kNumErrorStates].second + " per event per LB" + m_histTitleExt, "# Errors", PixMon::HistConf::kIBL);
          sc = m_errhist_expert_LB_maps[j]->regHist(rodExpert);
       }
    }
@@ -213,7 +255,25 @@ StatusCode PixelMainMon::BookRODErrorMon(void)
       }
       hname = makeHistname((error_state_labels[j].first+"_Map"), false);
       htitles = makeHisttitle((error_state_labels[j].second + " per event per LB"), "", false);
-      m_errhist_expert_maps[j] = new PixelMon2DMapsLW(hname.c_str(), htitles.c_str(), m_doIBL, true);
+      m_errhist_expert_maps[j] = new PixelMon2DMapsLW(hname.c_str(), htitles.c_str(), PixMon::HistConf::kPix, true);
+      sc = m_errhist_expert_maps[j]->regHist(rodExpert);
+   }
+
+   if (m_do2DMaps) {
+      m_errhist_femcc_errwords_map = new PixelMon2DProfilesLW("femcc_errorwords", ("Average FE/MCC Error Words" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D);
+      sc = m_errhist_femcc_errwords_map->regHist(rodHistos);
+   }
+
+   for (int j = 0; j < kNumErrorStatesIBL; j++) {
+      hname = makeHistname((error_state_labelsIBL[j].first + "_per_lumi_" + modlabel2[PixLayerIBL2D3D::kIBL]), false);
+      htitles = makeHisttitle(("Average " + error_state_labelsIBL[j].second + " per event per LB, " + modlabel2[PixLayerIBL2D3D::kIBL]), (atext_LB + atext_erf), false);
+      sc = rodExpert.regHist(m_errhist_expert_IBL_LB[j] = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, minbin_LB, maxbin_LB));
+   }
+
+   for (int j = kNumErrorStates; j < kNumErrorStates+kNumErrorStatesIBL; j++) {
+      hname = makeHistname((error_state_labelsIBL[j - kNumErrorStates].first+"_Map"), false);
+      htitles = makeHisttitle((error_state_labelsIBL[j - kNumErrorStates].second + " per event per LB"), "", false);
+      m_errhist_expert_maps[j] = new PixelMon2DMapsLW(hname.c_str(), htitles.c_str(), PixMon::HistConf::kIBL, m_doIBL);
       sc = m_errhist_expert_maps[j]->regHist(rodExpert);
    }
 
@@ -257,19 +317,18 @@ StatusCode PixelMainMon::BookRODErrorLumiBlockMon(void)
 
    std::string path = "Pixel/LumiBlock";
    if (m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/LumiBlockOnTrack");
-   if (m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/LumiBlockOnPixelTrack");
    MonGroup lumiBlockHist(this, path.c_str(), lowStat, ATTRIB_MANAGED); //declare a group of histograms
 
    StatusCode sc;
 
    if (m_do2DMaps && !m_doOnline) {
-      m_errors_LB = new PixelMon2DMapsLW("Errors_LB", ("Errors" + m_histTitleExt).c_str(), m_doIBL);
+      m_errors_LB = new PixelMon2DMapsLW("Errors_LB", ("Errors" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true);
       sc = m_errors_LB->regHist(lumiBlockHist);
 
-      m_errors_RODSync_mod = new PixelMon2DMapsLW("Errors_RODSync_LB", ("Errors_RODSync" + m_histTitleExt).c_str(), m_doIBL);
+      m_errors_RODSync_mod = new PixelMon2DMapsLW("Errors_RODSync_LB", ("Errors_RODSync" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true);
       sc = m_errors_RODSync_mod->regHist(lumiBlockHist);
 
-      m_errors_ModSync_mod = new PixelMon2DMapsLW("Errors_ModSync_LB", ("Errors_ModSync" + m_histTitleExt).c_str(), m_doIBL);
+      m_errors_ModSync_mod = new PixelMon2DMapsLW("Errors_ModSync_LB", ("Errors_ModSync" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true);
       sc = m_errors_ModSync_mod->regHist(lumiBlockHist);
    }
 
@@ -289,6 +348,7 @@ StatusCode PixelMainMon::FillRODErrorMon(void)
    int num_errors[PixLayerIBL2D3D::COUNT] = {0};
    int num_errors_per_bit[PixLayerIBL2D3D::COUNT][kNumErrorBits] = {0};
    int num_errors_per_state[PixLayer::COUNT - 1][kNumErrorStates] = {0}; // no IBL here
+   int num_errors_per_stateIBL[kNumErrorStatesIBL] = {0};  // IBL
 
    // Counter for erroneous modules on the layer, per error type and
    // category (error cat. = error type w/o ROD/MOD distinction).
@@ -302,6 +362,8 @@ StatusCode PixelMainMon::FillRODErrorMon(void)
    int num_errorFEs_B1[kNumModulesPhi[PixLayer::kB1] ][kNumModulesEta[PixLayer::kB1] ][kNumFEs] = {0};
    int num_errorFEs_B2[kNumModulesPhi[PixLayer::kB2] ][kNumModulesEta[PixLayer::kB2] ][kNumFEs] = {0};
 
+   const auto& kFeErrorWords = m_ErrorSvc->getAllFeErrors();
+
    PixelID::const_id_iterator idIt    = m_pixelid->wafer_begin();
    PixelID::const_id_iterator idItEnd = m_pixelid->wafer_end();
 
@@ -325,6 +387,9 @@ StatusCode PixelMainMon::FillRODErrorMon(void)
 
       for (unsigned int bit = 0; bit < kNumErrorBits; bit++) {
          if ((kErrorWord & (static_cast<uint64_t>(1)<<bit)) != 0) {
+           // For non-IBL, We deal with FE/MCC errors separately, so ignore them here!
+           if (!is_ibl && bit >= 4 && bit <=16) continue;
+
             num_errors[kLayer]++;
             num_errors_per_bit[kLayer][bit]++;
             if (kLayerIBL != 99) {
@@ -407,6 +472,7 @@ StatusCode PixelMainMon::FillRODErrorMon(void)
 
             if (getErrorState(bit, is_ibl) != 99) {
                num_errors_per_state[kLayer][getErrorState(bit, is_ibl)]++;
+               num_errors_per_stateIBL[getErrorState(bit, is_ibl)]++;
                if (m_errhist_expert_maps[getErrorState(bit, is_ibl)])
                   m_errhist_expert_maps[getErrorState(bit, is_ibl)]->Fill(WaferID, m_pixelid);
                if (m_errhist_expert_LB_maps[getErrorState(bit, is_ibl)])
@@ -421,6 +487,79 @@ StatusCode PixelMainMon::FillRODErrorMon(void)
          } //end bit shifting
       } //end for loop over bits
 
+      unsigned int num_femcc_errwords = 0;
+
+      // Do the same bit-shifting again, this time for FE/MCC error words.
+      if (!is_ibl && kFeErrorWords.find(id_hash) != kFeErrorWords.end()) {
+         // Collection of: FE ID, associated error word
+         std::map<unsigned int, unsigned int> fe_errorword_map = kFeErrorWords.find(id_hash)->second;
+         if (fe_errorword_map.size() > 0) {
+            num_femcc_errwords = fe_errorword_map.size();
+         }
+
+         for (const auto& map_entry : fe_errorword_map) {
+            const auto& fe_errorword = map_entry.second;
+
+            for (int bit = 0; bit < kNumErrorBits; ++bit) {
+               if ((fe_errorword & (static_cast<uint64_t>(1) << bit)) != 0) {
+                  // FE Error word contains 'bit', so take appropriate actions.
+                  num_errors[kLayer]++;
+                  num_errors_per_bit[kLayer][bit]++;
+
+                  int error_type = 0;  // same definitions as above
+                  int error_cat = 0;   // same definitions as above
+
+                  if (bit == 14 || bit == 15 || bit == 16) error_type = 1;
+                  if (bit == 4  || bit == 12 || bit == 13) error_type = 3;
+                  if (bit >= 5  && bit <= 7)               error_type = 6;
+
+                  if (error_type) {  // if there were any errors we care about
+                     if (error_type == 1) error_cat = ErrorCategory::kSync;
+                     if (error_type == 3) error_cat = ErrorCategory::kTrunc;
+                     if (error_type == 6) error_cat = ErrorCategory::kSeu;
+
+                     if (m_errors) m_errors->Fill(error_type, WaferID, m_pixelid);
+
+                     if (m_doLumiBlock && m_errors_LB) {
+                        m_errors_LB->Fill(WaferID, m_pixelid);
+                     }
+
+                     // Should this stay the same? This counts '1' for errors,
+                     // regardless of how many FEs have that error type.
+                     if (!has_err_type[error_type-1]) {
+                        if (m_errhist_errtype_map[error_type-1] && !m_doOnline) {
+                           m_errhist_errtype_map[error_type-1]->Fill(WaferID, m_pixelid);
+                        }
+                        num_errormodules_per_type[kLayer][error_type-1]++;
+                        if (kLayerIBL != 99) num_errormodules_per_type[kLayerIBL][error_type-1]++;
+                        has_err_type[error_type-1] = true;
+                     }
+                     if (!has_err_cat[error_cat]) {
+                        if (m_errhist_errcat_map[error_cat] && !m_doOnline) {
+                           m_errhist_errcat_map[error_cat]->Fill(WaferID, m_pixelid);
+                        }
+                        num_errormodules_per_cat[kLayer][error_cat]++;
+                        if (kLayerIBL != 99) {
+                           num_errormodules_per_cat[kLayerIBL][error_cat]++;
+                        }
+                        has_err_cat[error_cat] = true;
+                     }
+                  }
+
+                  if (getErrorState(bit, is_ibl) != 99) {
+                     num_errors_per_state[kLayer][getErrorState(bit, is_ibl)]++;
+                     if (m_errhist_expert_maps[getErrorState(bit, is_ibl)])
+                        m_errhist_expert_maps[getErrorState(bit, is_ibl)]->Fill(WaferID, m_pixelid);
+                     if (m_errhist_expert_LB_maps[getErrorState(bit, is_ibl)])
+                        m_errhist_expert_LB_maps[getErrorState(bit, is_ibl)]->Fill(kLumiBlock, WaferID, m_pixelid, 1);
+                  }
+               } // end bit shifting
+            } // end for loop over bits
+         } // end loop over FE error words
+      }
+
+      m_errhist_femcc_errwords_map->Fill(WaferID, m_pixelid, num_femcc_errwords);
+
       if (m_doLumiBlock) {
          if (m_errors_ModSync_mod && has_err_type[0])
             m_errors_ModSync_mod->Fill(WaferID, m_pixelid);
@@ -444,6 +583,12 @@ StatusCode PixelMainMon::FillRODErrorMon(void)
       }
    }
 
+   for (int j = 0; j < kNumErrorStatesIBL; j++) {
+      if (m_errhist_expert_IBL_LB[j]) {
+         m_errhist_expert_IBL_LB[j]->Fill(kLumiBlock, (float) num_errors_per_stateIBL[j]/m_nActive_mod[PixLayerIBL2D3D::kIBL]);
+      }
+   }
+
    for (int i = 0; i < PixLayerIBL2D3D::COUNT; i++) {
       if (m_errhist_per_bit_LB[i] && m_nActive_mod[i] > 0) {
          for (int j = 0; j < kNumErrorBits; j++) {
@@ -474,6 +619,11 @@ StatusCode PixelMainMon::FillRODErrorMon(void)
             m_errhist_errcat_avg[j][i]->Fill(kLumiBlock, (float) num_errormodules_per_cat[i][j]/m_nActive_mod[i]);
          }
       }
+      for (int j = 0; j < ErrorCategoryMODROD::COUNT - 3; j++) {
+         if (m_errhist_errtype_avg[j][i] && m_nActive_mod[i] > 0) {
+            m_errhist_errtype_avg[j][i]->Fill(kLumiBlock, (float) num_errormodules_per_type[i][j]/m_nActive_mod[i]);
+         }
+      }
    }
    if (m_errhist_syncerr_LB_pix) {
       m_errhist_syncerr_LB_pix->Fill(kLumiBlock, num_errormodules_per_cat[PixLayerIBL2D3D::kB0][ErrorCategory::kSync]
@@ -500,6 +650,46 @@ StatusCode PixelMainMon::FillRODErrorMon(void)
    return StatusCode::SUCCESS;
 }
 
+double PixelMainMon::getErrorBitFraction(const Identifier& WaferID, const unsigned int& num_femcc_errwords)
+{
+   // Do an estimation of the bit fraction consumed by FE/MCC error words in the
+   // MCC output. Simplifications: hits are distributed uniformly on all FEs,
+   // errors only occur on FEs with hits. Without these simplifications, we
+   // would have to consider the FE ID bit blocks (8 bits) more carefully.
+   //
+   // The assumed bit lengths are:
+   //  - 45 bits for event ID, header, trailer
+   //  - 9 bits for each FE ID. If more than 16 hits:, count 16 FE ID blocks;
+   //    otherwise calculate max(number of hits, number of error words).
+   //  - 22 bits for each hit word
+   //  - 22 bits for each error word
+   const int layer = GetPixLayerID(m_pixelid->barrel_ec(WaferID), m_pixelid->layer_disk(WaferID), m_doIBL);
+   if (layer == PixLayer::kIBL) return 0.;
+
+   unsigned int num_hits = 0;
+   if (layer == PixLayer::kB0) {
+      num_hits = m_HitPerEventArray_l0[m_pixelid->phi_module(WaferID)][static_cast<int>(fabs(6+m_pixelid->eta_module(WaferID)))];
+   } else if (layer == PixLayer::kB1) {
+      num_hits = m_HitPerEventArray_l1[m_pixelid->phi_module(WaferID)][static_cast<int>(fabs(6+m_pixelid->eta_module(WaferID)))];
+   } else if (layer == PixLayer::kB2) {
+      num_hits = m_HitPerEventArray_l2[m_pixelid->phi_module(WaferID)][static_cast<int>(fabs(6+m_pixelid->eta_module(WaferID)))];
+   } else if (layer == PixLayer::kECA) {
+      num_hits = m_HitPerEventArray_disksA[m_pixelid->phi_module(WaferID)][static_cast<int>(fabs(6+m_pixelid->eta_module(WaferID)))];
+   } else if (layer == PixLayer::kECC) {
+      num_hits = m_HitPerEventArray_disksC[m_pixelid->phi_module(WaferID)][static_cast<int>(fabs(6+m_pixelid->eta_module(WaferID)))];
+   }
+
+   int total_bits = 45;
+   if (num_hits >= 16) {
+      total_bits += 16 * 9;
+   } else {
+      total_bits += std::max(num_hits, num_femcc_errwords) * 9;
+   }
+   total_bits += num_hits * 22;
+   total_bits += num_femcc_errwords * 22;
+   return static_cast<double>(num_femcc_errwords * 22 / total_bits);
+}
+
 int PixelMainMon::getErrorState(int bit, bool isibl)
 {
    int erstate = 99;
@@ -541,6 +731,67 @@ int PixelMainMon::getErrorState(int bit, bool isibl)
             erstate = 99; break;
       }
    }
+   else {
+      switch (bit) {
+         case 3:
+            erstate = 16; break;  // BCID, Synch
+         case 4:
+            erstate = 17; break;  // LVL1ID, Synch
+         case 8:
+            erstate = 18; break;  // BCID counter, Synch
+         case 12:
+            erstate = 19; break;  // L1 trigger input in EODCL counter (write pointer), Synch
+         case 13:
+            erstate = 20; break;  // L1 trigger request counter to EODCL (read pointer), Synch
+         case 14:
+            erstate = 21; break;  // L1 register, register is full, Synch
+         case 15:
+            erstate = 22; break;  // L1 trigger ID in BC register, Synch
+         case 17:
+            erstate = 23; break;  // Skipped trigger because the L1 register is full, Synch
+         case 0:
+            erstate = 24; break;  // Row/Column, Trunc
+         case 18:
+            erstate = 25; break;  // Truncated event, Trunc
+         case 1:
+            erstate = 26; break;  // Limit error ROD, Trunc
+         case 5:
+            erstate = 27; break;  // Preamble error, Optical
+         case 9:
+            erstate = 28; break;  // Hamming code in word 0 in EOCHL, SEU
+         case 10:
+            erstate = 29; break;  // Hamming code in word 1 in EOCHL, SEU
+         case 11:
+            erstate = 30; break;  // Hamming code in word 2 in EOCHL, SEU
+         case 19:
+            erstate = 31; break;  // Triple redundant mismatch in Global Configuration Memory (CNFGMEM,) SEU
+         case 23:
+            erstate = 32; break;  // Bit flip in CMD, SEU
+         case 24:
+            erstate = 33; break;  // Triple redundant mismatch in CMD, SEU
+         case 26:
+            erstate = 34; break;  // Triple redundant mismatch in EFUSE,  SEU
+         case 2:
+            erstate = 35; break;  // Trailer timeout, Timeout
+         case 7:
+            erstate = 36; break;  // Timeout ROD, Timeout
+         case 6:
+            erstate = 37; break;  // Masked link
+         case 16:
+            erstate = 38; break;  // FE readout process error
+         case 20:
+            erstate = 39; break;  // Write register data error
+         case 21:
+            erstate = 40; break;  // Address error
+         case 22:
+            erstate = 41; break;  // Other CMD decoder error
+         case 25:
+            erstate = 42; break;  // Data bus address
+         default:
+            erstate = 99; break;
+      }
+   }
+
    return erstate;
 }
 
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/HelperFunctions.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/HelperFunctions.cxx
index 5a7aea07b747cc3bfdf34f017c847aac829f4393..a7fab828199a05528922e292053bb438e2191910 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/HelperFunctions.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/HelperFunctions.cxx
@@ -19,14 +19,13 @@
 #include <sstream>
 #include <algorithm>
 #include "InDetIdentifier/PixelID.h"
-#include "PixelMonitoring/PixelMon2DMaps.h"
+#include "PixelMonitoring/PixelMon2DMapsLW.h"
 
 
 std::string PixelMainMon :: makeHistname(std::string set, bool ontrk)
 {
    std::string name = set;
    if( ontrk && m_doOnTrack ) name += "_OnTrack";
-   if( ontrk && m_doOnPixelTrack ) name += "_OnPixelTrack";
    return name;
 }
 
@@ -34,7 +33,6 @@ std::string PixelMainMon :: makeHisttitle(std::string set, std::string axis, boo
 {
    std::string name = set;
    if( ontrk && m_doOnTrack ) name += "_OnTrack";
-   if( ontrk && m_doOnPixelTrack ) name += "_OnPixelTrack";
    name = name + m_histTitleExt + axis;
    return name;
 }
@@ -315,7 +313,7 @@ void PixelMainMon::FillTimeHisto(double value, TProfile* one=0, TProfile* two=0,
    }
 }
 
-void PixelMainMon::FillSummaryHistos (PixelMon2DMaps* occupancy, TH1F_LW* A, TH1F_LW* C, TH1F_LW* IBL, TH1F_LW* B0, TH1F_LW* B1, TH1F_LW* B2)
+void PixelMainMon::FillSummaryHistos (PixelMon2DMapsLW* occupancy, TH1F_LW* A, TH1F_LW* C, TH1F_LW* IBL, TH1F_LW* B0, TH1F_LW* B1, TH1F_LW* B2)
 {
        
    if( !(A && C && B0 && B1 && B2 && occupancy) )return; //if the histos don't exist, dont' fill them
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx
index 67e28c87bb642593f31eca8500893eeea8b2c373..9216039a52e85ba62727a7883afbb52f3f5900f9 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx
@@ -26,10 +26,9 @@
 
 #include "InDetRawData/InDetRawDataContainer.h"
 #include "InDetRawData/InDetRawDataCLASS_DEF.h" 
-#include "PixelMonitoring/PixelMon2DMaps.h"
+#include "PixelMonitoring/Components.h"
 #include "PixelMonitoring/PixelMon2DMapsLW.h"
 #include "PixelMonitoring/PixelMon2DProfilesLW.h"
-#include "PixelMonitoring/DBMMon2DMaps.h"
 #include "PixelMonitoring/PixelMonModules.h"
 #include "PixelMonitoring/PixelMon2DLumiProfiles.h"
 
@@ -45,17 +44,14 @@
 
 StatusCode PixelMainMon::BookHitsMon(void)
 {
-  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "starting Book Hits" << endmsg;  
- 
+   ATH_MSG_DEBUG("Start booking Hit histogtams..");
    std::string path = "Pixel/Hits";
    if(m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/HitsOnTrack");
-   if(m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/HitsOnPixelTrack");
    MonGroup rdoShift(   this, path.c_str(),  run, ATTRIB_MANAGED ); //declare a group of histograms
    MonGroup rdoExpert ( this, path.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms
 
    std::string pathT = "Pixel/Timing";
    if(m_doOnTrack) pathT.replace(pathT.begin(), pathT.end(), "Pixel/TimingOnTrack");
-   if(m_doOnPixelTrack) pathT.replace(pathT.begin(), pathT.end(), "Pixel/TimingOnPixelTrack");
    MonGroup timeShift(  this, pathT.c_str(),  run, ATTRIB_MANAGED ); //declare a group of histograms
    MonGroup timeExpert( this, pathT.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms
    
@@ -80,6 +76,7 @@ StatusCode PixelMainMon::BookHitsMon(void)
    std::string atext_nhit = ";# hits"; 
    std::string atext_hit = ";# hits/event"; 
    std::string atext_occ = ";# hits/pixel/event"; 
+   std::string atext_occ_mod = ";# hits/pixel";
    std::string atext_tot = ";ToT [BC]"; 
    std::string atext_lv1 = ";Level 1 Accept"; 
 
@@ -110,6 +107,12 @@ StatusCode PixelMainMon::BookHitsMon(void)
       hname = makeHistname(("Hit_ToTMean_"+m_modLabel_PixLayerIBL2D3D[i]), false);
       htitles = makeHisttitle(("Hit ToT Mean, "+m_modLabel_PixLayerIBL2D3D[i]), (atext_LB+";Average Hit ToT"), false);
       sc = rdoExpert.regHist( m_hit_ToTMean_mod[i] = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB) );
+
+      if (!m_doOnline) {
+	hname = makeHistname(("ModOcc_per_lumi_"+m_modLabel_PixLayerIBL2D3D[i]), false);
+	htitles = makeHisttitle(("Module occupancy per event, "+m_modLabel_PixLayerIBL2D3D[i]), (atext_LB+atext_occ_mod), false);
+	sc = rdoShift.regHist(m_modocc_per_lumi[i] = TH2F_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB, 100, 0.0001, 0.0101));
+      }
    }
 
    for(int i=0; i<PixLayerIBL2D3D::COUNT; i++){
@@ -155,7 +158,7 @@ StatusCode PixelMainMon::BookHitsMon(void)
       }
    }
    
-   m_hitmap_tmp = new PixelMon2DMaps("HitMap_tmp", ("Hit map for monitoring" + m_histTitleExt).c_str(), m_doIBL);
+   m_hitmap_tmp = new PixelMon2DMapsLW("HitMap_tmp", ("Hit map for monitoring" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D);
    sc = m_hitmap_tmp->regHist(rdoShift);
 
    for( int i=0; i<PixLayer::COUNT; i++){
@@ -170,7 +173,7 @@ StatusCode PixelMainMon::BookHitsMon(void)
        sc = rdoShift.regHist(m_occupancy_time2= new TProfile("occupancy_time_1hr",   ("Module hit occupancy as function of time over 1 hour.  36 sec/bin" + m_histTitleExt + ";time;module occupancy").c_str(), 99,0.,1.,"i"));
        sc = rdoShift.regHist(m_occupancy_time3= new TProfile("occupancy_time_6hr",   ("Module hit occupancy as function of time over 6 hours.  3.6 min/bin" + m_histTitleExt + ";time;module occupancy").c_str(), 99,0.,1.,"i"));
        
-       m_hitmap_mon = new PixelMon2DMaps("HitMap_Mon", ("Hit map for monitoring" + m_histTitleExt).c_str(), m_doIBL);
+       m_hitmap_mon = new PixelMon2DMapsLW("HitMap_Mon", ("Hit map for monitoring" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D);
        sc = m_hitmap_mon->regHist(rdoShift);
        
        for (int i=0; i<PixLayer::COUNT-1+(int)(m_doIBL); i++){
@@ -230,34 +233,32 @@ StatusCode PixelMainMon::BookHitsMon(void)
 
    if (m_do2DMaps)
      {
-       m_occupancy = new PixelMon2DMaps("Occupancy", ("hit map"+ m_histTitleExt).c_str(), m_doIBL);
+       m_occupancy = new PixelMon2DMapsLW("Occupancy", ("hit map"+ m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D);
        sc = m_occupancy->regHist(rdoShift);
        
-       m_average_pixocc = new PixelMon2DMapsLW("Occupancy_per_pixel", ("#hits / pixel" + m_histTitleExt).c_str(), m_doIBL);
+       m_average_pixocc = new PixelMon2DMapsLW("Occupancy_per_pixel", ("#hits / pixel" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D, true);
        sc = m_average_pixocc->regHist(rdoShift);
        
-       m_occupancy_pix_evt = new PixelMon2DProfilesLW("Occupancy_per_pixel_event", ("#hits / pixel / event" + m_histTitleExt).c_str(), m_doIBL);
+       m_occupancy_pix_evt = new PixelMon2DProfilesLW("Occupancy_per_pixel_event", ("#hits / pixel / event" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D);
        sc = m_occupancy_pix_evt->regHist(rdoShift);
              
-       m_Lvl1ID_diff_mod_ATLAS_per_LB = new PixelMon2DLumiProfiles("Lvl1ID_diff_ATLAS_mod_per_LB", ("ATLAS_{Level 1 ID} - Module_{Level 1 ID} per LB" + m_histTitleExt).c_str(),"#Delta Level 1 ID",m_doIBL);
+       m_Lvl1ID_diff_mod_ATLAS_per_LB = new PixelMon2DLumiProfiles("Lvl1ID_diff_ATLAS_mod_per_LB", ("ATLAS_{Level 1 ID} - Module_{Level 1 ID} per LB" + m_histTitleExt).c_str(),"#Delta Level 1 ID", PixMon::HistConf::kPixIBL);
        sc = m_Lvl1ID_diff_mod_ATLAS_per_LB->regHist(timeExpert);
        
-       m_Lvl1ID_absdiff_mod_ATLAS_per_LB = new PixelMon2DLumiProfiles("Lvl1ID_absdiff_ATLAS_mod_per_LB", ("ATLAS_{Level 1 ID} - Module_{Level 1 ID} per LB" + m_histTitleExt).c_str(),"#Delta Level 1 ID",m_doIBL);
+       m_Lvl1ID_absdiff_mod_ATLAS_per_LB = new PixelMon2DLumiProfiles("Lvl1ID_absdiff_ATLAS_mod_per_LB", ("ATLAS_{Level 1 ID} - Module_{Level 1 ID} per LB" + m_histTitleExt).c_str(),"#Delta Level 1 ID", PixMon::HistConf::kPixIBL);
        sc = m_Lvl1ID_absdiff_mod_ATLAS_per_LB->regHist(timeExpert);
      }
    
    if (m_doModules)
      {
-       m_hit_num_mod = new PixelMonModules1D("Hit_num", ("Number of hits in a module in an event" + m_histTitleExt).c_str(), 15,-0.5,149.5,m_doIBL);
+       m_hit_num_mod = new PixelMonModules1D("Hit_num", ("Number of hits in a module in an event" + m_histTitleExt).c_str(), 15,-0.5,149.5);
        sc = m_hit_num_mod->regHist(this,(path+"/Modules_NumberOfHits").c_str(),run);
-       m_hiteff_mod = new PixelMonModulesProf("Hit_track_eff", ("Proportion of hits on track" + m_histTitleExt).c_str(), 2500,-0.5,2499.5,m_doIBL);
+       m_hiteff_mod = new PixelMonModulesProf("Hit_track_eff", ("Proportion of hits on track" + m_histTitleExt).c_str(), 2500,-0.5,2499.5);
        sc = m_hiteff_mod->regHist(this,(path+"/Modules_HitEff").c_str(),run);
-     }
-   if (m_doFEChipSummary)
-     {
-       m_FE_chip_hit_summary = new PixelMonModules1D("FE_Chip_Summary", ("FE Chip Summary" + m_histTitleExt).c_str(), 16,-0.5,15.5,m_doIBL);
+       m_FE_chip_hit_summary = new PixelMonModules1D("FE_Chip_Summary", ("FE Chip Summary" + m_histTitleExt).c_str(), 16,-0.5,15.5);
        sc = m_FE_chip_hit_summary->regHist(this,(path+"/Modules_FEChipSummary").c_str(),run);
      }
+
    if (m_doLowOccupancy || m_doHighOccupancy)
      {
        int nbins_hits = 2000;  float max_hits = 80000.0;
@@ -280,14 +281,9 @@ StatusCode PixelMainMon::BookHitsMon(void)
      }
    if (m_doPixelOccupancy)
      {
-       m_pixel_occupancy = new PixelMonModules2D("Pixel_Occupancy", ("Pixel Occupancy" + m_histTitleExt).c_str(), 160, -0.,160.,336,0.,336.,m_doIBL);
+       m_pixel_occupancy = new PixelMonModules2D("Pixel_Occupancy", ("Pixel Occupancy" + m_histTitleExt).c_str(), 160, -0.,160.,336,0.,336.);
        sc = m_pixel_occupancy->regHist(this,(path+"/PixelOccupancy").c_str(),run);
      }
-   if (m_doRodSim)
-     {
-       sc = rdoExpert.regHist(m_RodSim_BCID_minus_ToT= TH1F_LW::create("RodSim_BCID_minus_ToT",  ("BCID - ToT" + m_histTitleExt).c_str(), 300,-0.5,299.5));
-       sc = rdoExpert.regHist(m_RodSim_FrontEnd_minus_Lvl1ID= TH1F_LW::create("RodSim_FrontEnd_minus_Lvl1ID",  ("Front End Chip - Lvl1ID" + m_histTitleExt).c_str(), 33,-16.5,16.5));
-     }
 
    if (m_doDetails)
      /// 4 special modules
@@ -332,17 +328,16 @@ StatusCode PixelMainMon::BookHitsMon(void)
      }
    }
 
-   if(sc.isFailure())if(msgLvl(MSG::WARNING)) msg(MSG::WARNING)  << "histograms not booked" << endmsg;         
+   if (sc.isFailure()) ATH_MSG_WARNING("Problems with booking Hit histograms");
    return StatusCode::SUCCESS;
 }
 
 StatusCode PixelMainMon::BookHitsLumiBlockMon(void)
 {
-   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "starting Book Hits for lowStat" << endmsg;  
+   ATH_MSG_DEBUG("Start booking Hits histograms per LB (low stat)");
    
    std::string path = "Pixel/LumiBlock";
    if(m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/LumiBlockOnTrack");
-   if(m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/LumiBlockOnPixelTrack");
    MonGroup lumiBlockHist(   this, path.c_str(), lowStat, ATTRIB_MANAGED); //declare a group of histograms
 
    std::string hname;
@@ -369,7 +364,7 @@ StatusCode PixelMainMon::BookHitsLumiBlockMon(void)
    if(m_doModules) {
       hname = makeHistname("num_Hits_mod_LB", false);
       htitles = makeHisttitle("Number of pixel hits in a module in an event", (atext_hit+atext_nevt), false);
-      m_hit_num_mod_LB = new PixelMonModules1D(hname.c_str(), htitles.c_str(), 20, -0.5, 19.5, m_doIBL);
+      m_hit_num_mod_LB = new PixelMonModules1D(hname.c_str(), htitles.c_str(), 20, -0.5, 19.5);
       sc = m_hit_num_mod_LB->regHist(this, (path+"/Modules_NumberOfHits").c_str(), lowStat);
    }
    for( int i=0; i<PixLayer::COUNT; i++){
@@ -386,10 +381,10 @@ StatusCode PixelMainMon::BookHitsLumiBlockMon(void)
       sc = lumiBlockHist.regHist(m_Lvl1A_10min_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), 14, -1.5, 12.5));
    }
 
-   m_occupancy_10min = new PixelMon2DMaps("Occupancy_10min", ("hit occupancy" + m_histTitleExt).c_str(), m_doIBL);
+   m_occupancy_10min = new PixelMon2DMapsLW("Occupancy_10min", ("hit occupancy" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D);
    sc = m_occupancy_10min->regHist(lumiBlockHist);
    
-   if(sc.isFailure())if(msgLvl(MSG::WARNING)) msg(MSG::WARNING)  << "histograms not booked" << endmsg;         
+   if (sc.isFailure()) ATH_MSG_WARNING("Problems with booking Hit histograms per LB (low stat)");
    return StatusCode::SUCCESS;
 }
 
@@ -415,26 +410,14 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
   static constexpr int nmod_phi[PixLayer::COUNT] = {48, 48, 22, 38, 52, 14};
   static constexpr int nmod_eta[PixLayer::COUNT] = {3, 3, 13, 13, 13, 20};
   
-  int HitPerEventArray_disksA[ nmod_phi[PixLayer::kECA] ][ nmod_eta[PixLayer::kECA] ];
-  int HitPerEventArray_disksC[ nmod_phi[PixLayer::kECC] ][ nmod_eta[PixLayer::kECC] ];
-  int HitPerEventArray_l0[ nmod_phi[PixLayer::kB0] ][ nmod_eta[PixLayer::kB0] ];
-  int HitPerEventArray_l1[ nmod_phi[PixLayer::kB1] ][ nmod_eta[PixLayer::kB1] ];
-  int HitPerEventArray_l2[ nmod_phi[PixLayer::kB2] ][ nmod_eta[PixLayer::kB2] ];
-  int HitPerEventArray_lI[ nmod_phi[PixLayer::kIBL] ][ nmod_eta[PixLayer::kIBL] ];
-  
-  for(int i=0; i<PixLayer::COUNT; i++){
-    for( int phi=0; phi<nmod_phi[i]; phi++){
-      for(int eta=0; eta<nmod_eta[i]; eta++){
-	if(i==PixLayer::kECA) HitPerEventArray_disksA[phi][eta]=0;
-	if(i==PixLayer::kECC) HitPerEventArray_disksC[phi][eta]=0;
-	if(i==PixLayer::kB0)  HitPerEventArray_l0[phi][eta]=0;
-	if(i==PixLayer::kB1)  HitPerEventArray_l1[phi][eta]=0;
-	if(i==PixLayer::kB2)  HitPerEventArray_l2[phi][eta]=0;
-	if(i==PixLayer::kIBL) HitPerEventArray_lI[phi][eta]=0;
-      }
-    }
-  }
-  
+  // Reset the centrally saved hit arrays back to zero.
+  memset(m_HitPerEventArray_disksA, 0, sizeof(m_HitPerEventArray_disksA[0][0]) * nmod_phi[PixLayer::kECA] * nmod_eta[PixLayer::kECA]);
+  memset(m_HitPerEventArray_disksC, 0, sizeof(m_HitPerEventArray_disksC[0][0]) * nmod_phi[PixLayer::kECC] * nmod_eta[PixLayer::kECC]);
+  memset(m_HitPerEventArray_l0,     0, sizeof(m_HitPerEventArray_l0[0][0])     * nmod_phi[PixLayer::kB0]  * nmod_eta[PixLayer::kB0]);
+  memset(m_HitPerEventArray_l1,     0, sizeof(m_HitPerEventArray_l1[0][0])     * nmod_phi[PixLayer::kB1]  * nmod_eta[PixLayer::kB1]);
+  memset(m_HitPerEventArray_l2,     0, sizeof(m_HitPerEventArray_l2[0][0])     * nmod_phi[PixLayer::kB2]  * nmod_eta[PixLayer::kB2]);
+  memset(m_HitPerEventArray_lI,     0, sizeof(m_HitPerEventArray_lI[0][0])     * nmod_phi[PixLayer::kIBL] * nmod_eta[PixLayer::kIBL]);
+
   double nhits=0;
   double nhits_mod[PixLayerIBL2D3D::COUNT]={0};
   int nhits_L0_B11_S2_C6[96] = {0};
@@ -461,10 +444,12 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
   Identifier rdoID;
   
   int nChannels_mod[PixLayerIBL2D3D::COUNT] = {46080, 46080, 46080, 46080, 46080, 26880, 53760, 26880};
+  double inv_nChannels_mod[PixLayerIBL2D3D::COUNT];
   double nGoodChannels_total = 0.;
   double nGoodChannels_layer[PixLayerIBL2D3D::COUNT];
   double nActiveChannels_layer[PixLayerIBL2D3D::COUNT];
   for( int i=0; i<PixLayerIBL2D3D::COUNT; i++){
+    inv_nChannels_mod[i] = 1.0/(1.0 * nChannels_mod[i]);
     nGoodChannels_layer[i]   = 1.0 * nChannels_mod[i] * m_nGood_mod[i];
     nActiveChannels_layer[i] = 1.0 * nChannels_mod[i] * m_nActive_mod[i];
     nGoodChannels_total    =+ nGoodChannels_layer[i];
@@ -481,7 +466,7 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
   int pix_rod_bcid      = 0;
   if ( !sc.isFailure() && Pixel_BCIDColl!=0 ) 
     {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "Found Pixel BCID collection"<<endmsg;
+      ATH_MSG_DEBUG("Found Pixel BCID collection");
       for ( InDetTimeCollection::const_iterator ipix_bcid = Pixel_BCIDColl->begin(); ipix_bcid != Pixel_BCIDColl->end(); ++ipix_bcid ) 
 	{
 	  if (!(*ipix_bcid)) continue;
@@ -489,17 +474,15 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
 	  pix_rod_bcid = pix_bcid;
 	} 
     }
-  if (sc.isFailure()) if(msgLvl(MSG::INFO)) {msg(MSG::INFO)  << "Could not find the data object PixelBCID" << " !" << endmsg;}
+  if (sc.isFailure()) ATH_MSG_WARNING("Could not find the data object PixelBCID !");
 
   // get ATLAS LVL1ID
   //
   int lvl1idATLAS(-1);
   const EventInfo* thisEventInfo;
   sc=evtStore()->retrieve(thisEventInfo);
-  if (sc != StatusCode::SUCCESS)
-    {
-      if (msgLvl(MSG::WARNING)) msg(MSG::WARNING)  << "No EventInfo object found" << endmsg;
-    } else 
+  if (sc != StatusCode::SUCCESS) ATH_MSG_WARNING("No EventInfo object found");
+  else 
     {
       lvl1idATLAS = (int)((thisEventInfo->trigger_info()->extendedLevel1ID())&0xf);
     }
@@ -508,11 +491,11 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
   sc=evtStore()->retrieve(m_rdocontainer,m_Pixel_RDOName);
   if (sc.isFailure() || !m_rdocontainer) 
     {
-      if (msgLvl(MSG::INFO)) msg(MSG::INFO)  << "Could not find the data object " << m_Pixel_RDOName << " !" << endmsg;
+      ATH_MSG_WARNING("Could not retrieve Pixel RDO container !");
       if (m_storegate_errors) m_storegate_errors->Fill(1.,3.);  //first entry (1). is for RDO, second (2) is for retrieve problem
       return StatusCode::SUCCESS;  //fail gracefully and keep going in the next tool
     } else {
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "Data object " << m_Pixel_RDOName << " found" << endmsg;
+    ATH_MSG_DEBUG("Pixel RDO container " << m_Pixel_RDOName << " found");
   }
 
   PixelRDO_Container::const_iterator colNext   = m_rdocontainer->begin();
@@ -531,7 +514,7 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
       for (p_rdo=PixelCollection->begin(); p_rdo!=PixelCollection->end(); ++p_rdo) {
 	
 	rdoID=(*p_rdo)->identify();
-	if (m_doOnTrack || m_doOnPixelTrack) if(!OnTrack(rdoID,false) ) continue; //if we only want hits on track, and the hit is NOT on the track, skip filling
+	if (m_doOnTrack) if(!OnTrack(rdoID,false) ) continue; //if we only want hits on track, and the hit is NOT on the track, skip filling
 
 	int pixlayer = GetPixLayerID(m_pixelid->barrel_ec(rdoID), m_pixelid->layer_disk(rdoID), m_doIBL);
 	int pixlayerdbm = GetPixLayerIDDBM(m_pixelid->barrel_ec(rdoID), m_pixelid->layer_disk(rdoID), m_doIBL);
@@ -585,10 +568,6 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
 	if (m_Atlas_BCID) m_Atlas_BCID->Fill(pix_rod_bcid); //defined at the start of the method
 	if (m_BCID_Profile) m_BCID_Profile->Fill(double(pix_rod_bcid),double(nhits));          
 	if (pixlayer != 99 && m_diff_ROD_vs_Module_BCID_mod[pixlayer]) m_diff_ROD_vs_Module_BCID_mod[pixlayer]->Fill( (pix_rod_bcid&0x000000ff)-(*p_rdo)->getBCID() ); 
-	if (m_doRodSim) {
-	  if (m_RodSim_FrontEnd_minus_Lvl1ID) m_RodSim_FrontEnd_minus_Lvl1ID->Fill(m_pixelCableSvc->getFE(&rdoID,rdoID) -(*p_rdo)->getLVL1ID());
-	  if (m_RodSim_BCID_minus_ToT) m_RodSim_BCID_minus_ToT->Fill((*p_rdo)->getBCID() - (*p_rdo)->getToT() );
-	}
        
 	if (m_FE_chip_hit_summary) m_FE_chip_hit_summary->Fill(m_pixelCableSvc->getFE(&rdoID,rdoID),rdoID,m_pixelid);
 	
@@ -637,16 +616,16 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
 	nhitsM3++;
 	nhitsM4++;
 	
-	///if (m_doModuleas)//fill module hit arrays so we can calculate the number of hits/event/module 
+	///if (m_doModules)//fill module hit arrays so we can calculate the number of hits/event/module 
 	///{
-	if(m_pixelid->barrel_ec(rdoID)==2 ) HitPerEventArray_disksA[m_pixelid->phi_module(rdoID)][m_pixelid->layer_disk(rdoID)]++;
-	if(m_pixelid->barrel_ec(rdoID)==-2) HitPerEventArray_disksC[m_pixelid->phi_module(rdoID)][m_pixelid->layer_disk(rdoID)]++;
+	if(m_pixelid->barrel_ec(rdoID)==2 ) m_HitPerEventArray_disksA[m_pixelid->phi_module(rdoID)][m_pixelid->layer_disk(rdoID)]++;
+	if(m_pixelid->barrel_ec(rdoID)==-2) m_HitPerEventArray_disksC[m_pixelid->phi_module(rdoID)][m_pixelid->layer_disk(rdoID)]++;
 	if(m_pixelid->barrel_ec(rdoID)==0 )
 	  {
-	    if(m_doIBL && m_pixelid->layer_disk(rdoID)==0) HitPerEventArray_lI[m_pixelid->phi_module(rdoID)][m_pixelid->eta_module(rdoID)+10]++;
-	    if(m_pixelid->layer_disk(rdoID)==0+m_doIBL) HitPerEventArray_l0[m_pixelid->phi_module(rdoID)][m_pixelid->eta_module(rdoID)+6]++;
-	    if(m_pixelid->layer_disk(rdoID)==1+m_doIBL) HitPerEventArray_l1[m_pixelid->phi_module(rdoID)][m_pixelid->eta_module(rdoID)+6]++;
-	    if(m_pixelid->layer_disk(rdoID)==2+m_doIBL) HitPerEventArray_l2[m_pixelid->phi_module(rdoID)][m_pixelid->eta_module(rdoID)+6]++;
+	    if(m_doIBL && m_pixelid->layer_disk(rdoID)==0) m_HitPerEventArray_lI[m_pixelid->phi_module(rdoID)][m_pixelid->eta_module(rdoID)+10]++;
+	    if(m_pixelid->layer_disk(rdoID)==0+m_doIBL) m_HitPerEventArray_l0[m_pixelid->phi_module(rdoID)][m_pixelid->eta_module(rdoID)+6]++;
+	    if(m_pixelid->layer_disk(rdoID)==1+m_doIBL) m_HitPerEventArray_l1[m_pixelid->phi_module(rdoID)][m_pixelid->eta_module(rdoID)+6]++;
+	    if(m_pixelid->layer_disk(rdoID)==2+m_doIBL) m_HitPerEventArray_l2[m_pixelid->phi_module(rdoID)][m_pixelid->eta_module(rdoID)+6]++;
 	  } 
 	///}
 	
@@ -734,7 +713,7 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
     if(m_avgocc_per_bcid_mod[i]) m_avgocc_per_bcid_mod[i]->Fill(pix_rod_bcid, avgocc_mod[i]);
     if(m_avgocc_active_per_lumi_mod[i]) m_avgocc_active_per_lumi_mod[i]->Fill(m_manager->lumiBlockNumber(),avgocc_active_mod[i]);
 
-    if(m_maxocc_per_lumi_mod[i]) m_maxocc_per_lumi_mod[i]->Fill(m_manager->lumiBlockNumber(), avgocc_mod[i]);
+    if(m_maxocc_per_lumi_mod[i]) m_maxocc_per_lumi_mod[i]->Fill(m_manager->lumiBlockNumber(), avgocc_active_mod[i]);
     if(m_maxocc_per_bcid_mod[i]){
       int bin = m_maxocc_per_bcid_mod[i]->GetXaxis()->FindBin( 1.0*pix_rod_bcid );
       double content = m_maxocc_per_bcid_mod[i]->GetBinContent( bin );
@@ -752,28 +731,40 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
   
   /// Fill the #hit per module per event
   for(int i=0; i<PixLayer::COUNT; i++){
-    for(int phi=0; phi<nmod_phi[i]; phi++){
-      for(int eta=0; eta<nmod_eta[i]; eta++){
-	if(i == PixLayer::kECA && m_nhits_mod[i]) m_nhits_mod[i]->Fill( HitPerEventArray_disksA[phi][eta] );
-	if(i == PixLayer::kECC && m_nhits_mod[i]) m_nhits_mod[i]->Fill( HitPerEventArray_disksC[phi][eta] );
-	if(i == PixLayer::kB0  && m_nhits_mod[i]) m_nhits_mod[i]->Fill( HitPerEventArray_l0[phi][eta]);
-	if(i == PixLayer::kB1  && m_nhits_mod[i]) m_nhits_mod[i]->Fill( HitPerEventArray_l1[phi][eta]);
-	if(i == PixLayer::kB2  && m_nhits_mod[i]) m_nhits_mod[i]->Fill( HitPerEventArray_l2[phi][eta]);
-	if(i == PixLayer::kIBL && m_nhits_mod[i]) m_nhits_mod[i]->Fill( HitPerEventArray_lI[phi][eta]);
+    if (m_nhits_mod[i]) {
+      for(int phi=0; phi<nmod_phi[i]; phi++){
+	for(int eta=0; eta<nmod_eta[i]; eta++){
+	  if (i == PixLayer::kECA) m_nhits_mod[i]->Fill( m_HitPerEventArray_disksA[phi][eta] );
+	  if (i == PixLayer::kECC) m_nhits_mod[i]->Fill( m_HitPerEventArray_disksC[phi][eta] );
+	  if (i == PixLayer::kB0)  m_nhits_mod[i]->Fill( m_HitPerEventArray_l0[phi][eta]);
+	  if (i == PixLayer::kB1)  m_nhits_mod[i]->Fill( m_HitPerEventArray_l1[phi][eta]);
+	  if (i == PixLayer::kB2)  m_nhits_mod[i]->Fill( m_HitPerEventArray_l2[phi][eta]);
+	  if (i == PixLayer::kIBL) m_nhits_mod[i]->Fill( m_HitPerEventArray_lI[phi][eta]);
+	}
       }
     }
   }
-  
-  /// Put the #hits per event for each layer
-  if ( m_event == 0) {
-    for( int i=0; i<PixLayer::COUNT-1+(int)(m_doIBL); i++) {
-      m_hitocc_stock[i].push_back( avgocc_mod[i] );
-    }
-  } else if ( !newLumiBlockFlag() ) {
-    for( int i=0; i<PixLayer::COUNT-1+(int)(m_doIBL); i++) {
-      m_hitocc_stock[i].push_back( avgocc_mod[i] );
+
+  if ( !m_doOnline ) { 
+    for (int i=0; i<PixLayer::COUNT; i++) {
+      if (m_modocc_per_lumi[i]) {
+	for (int phi=0; phi<nmod_phi[i]; phi++) {
+	  for (int eta=0; eta<nmod_eta[i]; eta++) {
+	    if (i == PixLayer::kECA) m_modocc_per_lumi[i]->Fill( m_manager->lumiBlockNumber(), m_HitPerEventArray_disksA[phi][eta]*inv_nChannels_mod[i] );
+	    if (i == PixLayer::kECC) m_modocc_per_lumi[i]->Fill( m_manager->lumiBlockNumber(), m_HitPerEventArray_disksC[phi][eta]*inv_nChannels_mod[i] );
+	    if (i == PixLayer::kB0)  m_modocc_per_lumi[i]->Fill( m_manager->lumiBlockNumber(), m_HitPerEventArray_l0[phi][eta]*inv_nChannels_mod[i] );
+	    if (i == PixLayer::kB1)  m_modocc_per_lumi[i]->Fill( m_manager->lumiBlockNumber(), m_HitPerEventArray_l1[phi][eta]*inv_nChannels_mod[i] );
+	    if (i == PixLayer::kB2)  m_modocc_per_lumi[i]->Fill( m_manager->lumiBlockNumber(), m_HitPerEventArray_l2[phi][eta]*inv_nChannels_mod[i] );
+	    if (i == PixLayer::kIBL) {
+	      if (eta<4 || eta>15) m_modocc_per_lumi[i]->Fill( m_manager->lumiBlockNumber(), m_HitPerEventArray_lI[phi][eta]*inv_nChannels_mod[i] );
+	      else m_modocc_per_lumi[i]->Fill( m_manager->lumiBlockNumber(), m_HitPerEventArray_lI[phi][eta]*inv_nChannels_mod[i+1] );
+	    }
+	  }
+	}
+      }
     }
   }
+ 
   /// Fill some histograms only if =< 50% of modules disabled
   if(!m_majorityDisabled) {
     if (m_doDetails) {
@@ -794,30 +785,30 @@ StatusCode PixelMainMon::FillHitsMon(void) //Called once per event
 	for (; idIt != idItEnd; ++idIt) {
 	  Identifier WaferID = *idIt;
 	  if(m_pixelid->barrel_ec(WaferID)==2 ){
-	    m_hit_num_mod->Fill( HitPerEventArray_disksA[m_pixelid->phi_module(WaferID)][m_pixelid->layer_disk(WaferID)], WaferID, m_pixelid);
+	    m_hit_num_mod->Fill( m_HitPerEventArray_disksA[m_pixelid->phi_module(WaferID)][m_pixelid->layer_disk(WaferID)], WaferID, m_pixelid);
 	  }
-	  if(m_pixelid->barrel_ec(WaferID)==-2) m_hit_num_mod->Fill( HitPerEventArray_disksC[m_pixelid->phi_module(WaferID)][m_pixelid->layer_disk(WaferID)], WaferID, m_pixelid);
+	  if(m_pixelid->barrel_ec(WaferID)==-2) m_hit_num_mod->Fill( m_HitPerEventArray_disksC[m_pixelid->phi_module(WaferID)][m_pixelid->layer_disk(WaferID)], WaferID, m_pixelid);
 	  if(m_pixelid->barrel_ec(WaferID)==0 )
 	    {
 	      if(m_doIBL && m_pixelid->layer_disk(WaferID)==0) {
-		m_hit_num_mod->Fill( HitPerEventArray_lI[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+10], WaferID, m_pixelid);
+		m_hit_num_mod->Fill( m_HitPerEventArray_lI[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+10], WaferID, m_pixelid);
 	      }
 	      if(m_pixelid->layer_disk(WaferID)==0+m_doIBL) {
-		 m_hit_num_mod->Fill( HitPerEventArray_l0[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
+		 m_hit_num_mod->Fill( m_HitPerEventArray_l0[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
 	      }
-	      if(m_pixelid->layer_disk(WaferID)==1+m_doIBL) m_hit_num_mod->Fill( HitPerEventArray_l1[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
-	      if(m_pixelid->layer_disk(WaferID)==2+m_doIBL) m_hit_num_mod->Fill( HitPerEventArray_l2[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
+	      if(m_pixelid->layer_disk(WaferID)==1+m_doIBL) m_hit_num_mod->Fill( m_HitPerEventArray_l1[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
+	      if(m_pixelid->layer_disk(WaferID)==2+m_doIBL) m_hit_num_mod->Fill( m_HitPerEventArray_l2[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
 	    }  
 	  
 	  if (m_doLumiBlock) {
-	    if(m_pixelid->barrel_ec(WaferID)==2 ) m_hit_num_mod_LB->Fill( HitPerEventArray_disksA[m_pixelid->phi_module(WaferID)][m_pixelid->layer_disk(WaferID)], WaferID, m_pixelid);
-	    if(m_pixelid->barrel_ec(WaferID)==-2) m_hit_num_mod_LB->Fill( HitPerEventArray_disksC[m_pixelid->phi_module(WaferID)][m_pixelid->layer_disk(WaferID)], WaferID, m_pixelid);
+	    if(m_pixelid->barrel_ec(WaferID)==2 ) m_hit_num_mod_LB->Fill( m_HitPerEventArray_disksA[m_pixelid->phi_module(WaferID)][m_pixelid->layer_disk(WaferID)], WaferID, m_pixelid);
+	    if(m_pixelid->barrel_ec(WaferID)==-2) m_hit_num_mod_LB->Fill( m_HitPerEventArray_disksC[m_pixelid->phi_module(WaferID)][m_pixelid->layer_disk(WaferID)], WaferID, m_pixelid);
 	    if(m_pixelid->barrel_ec(WaferID)==0 )                                                                                                                                       
 	      {
-		if(m_doIBL && m_pixelid->layer_disk(WaferID)==0) m_hit_num_mod_LB->Fill( HitPerEventArray_lI[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+10], WaferID, m_pixelid);
-		if(m_pixelid->layer_disk(WaferID)==0+m_doIBL) m_hit_num_mod_LB->Fill( HitPerEventArray_l0[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
-		if(m_pixelid->layer_disk(WaferID)==1+m_doIBL) m_hit_num_mod_LB->Fill( HitPerEventArray_l1[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
-		if(m_pixelid->layer_disk(WaferID)==2+m_doIBL) m_hit_num_mod_LB->Fill( HitPerEventArray_l2[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
+		if(m_doIBL && m_pixelid->layer_disk(WaferID)==0) m_hit_num_mod_LB->Fill( m_HitPerEventArray_lI[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+10], WaferID, m_pixelid);
+		if(m_pixelid->layer_disk(WaferID)==0+m_doIBL) m_hit_num_mod_LB->Fill( m_HitPerEventArray_l0[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
+		if(m_pixelid->layer_disk(WaferID)==1+m_doIBL) m_hit_num_mod_LB->Fill( m_HitPerEventArray_l1[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
+		if(m_pixelid->layer_disk(WaferID)==2+m_doIBL) m_hit_num_mod_LB->Fill( m_HitPerEventArray_l2[m_pixelid->phi_module(WaferID)][m_pixelid->eta_module(WaferID)+6], WaferID, m_pixelid);
 	      }  
 	  }
 	}
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelDCSMon.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelDCSMon.cxx
index 93465c780357af17687b789d2626da2b0b9d838c..9ba2564b1616e028b216367e6ddf7c672a74eda5 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelDCSMon.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelDCSMon.cxx
@@ -20,9 +20,7 @@
 #include "LWHists/TProfile2D_LW.h"
 #include "LWHists/TProfile_LW.h"
 #include "InDetIdentifier/PixelID.h"
-#include "PixelMonitoring/PixelMon2DMaps.h"
 #include "PixelMonitoring/PixelMonModules.h"
-#include "PixelMonitoring/PixelMonProfiles.h"
 #include "TString.h"
 #include "TMath.h"
 // Database
@@ -43,18 +41,10 @@ StatusCode PixelMainMon::BookPixelDCSMon(void)
 
    msg(MSG::DEBUG)  << "[BookPixelDCSMon]" << endmsg;
 
-   //if(m_doOnTrack) return StatusCode::SUCCESS;
-
    std::string path = "Pixel/DCS";
    if(m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/DCSOnTrack");
-   if(m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/DCSOnPixelTrack");
-   //MonGroup dcsShift(   this, path.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms
    MonGroup dcsExpert ( this, path.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms
 
-  //sc = dcsExpert.regHist(m_hist_moduleTemperature2D = TH2F_LW::create("module Temperature_chanNum_all", "Module Temprerature vs Channel Number; Channel Number;Temperature",2048,0,2048,100,-15,5));
-  //sc = dcsExpert.regHist(m_hist_coolingPipeTemperatureInlet2D = TH2F_LW::create("cooling Pipe TemperatureInlet_chanNum", "cooling Pipe TempreratureInlet vs Channel Number; Channel Number;Temperature",14,1,15,150,-15,15));
-  //sc = dcsExpert.regHist(m_hist_coolingPipeTemperatureOutlet2D = TH2F_LW::create("cooling Pipe TemperatureOutlet_chanNum", "cooling Pipe TempreratureOutlet vs Channel Number; Channel Number;Temperature",14,1,15,150,-15,15));
-  //sc = dcsExpert.regHist(m_hist_HV_voltage2D = TH2F_LW::create("HV voltage_chanNum", "HV vs Channel Number; Channel Number;HV",14,1,15,100,-100,0));
   float min_temperature = -20.; float max_temperature = 0.; int nbins_temperature = 100;
   float min_LB = 0.;            float max_LB = 1500.;       int nbins_LB = 1500;
   float min_module = -10.;      float max_module = 10.;     int nbins_module = 20;
@@ -581,39 +571,6 @@ StatusCode PixelMainMon::FillPixelDCSMon(void)
 
   msg(MSG::DEBUG)  << "[FillPixelDCSMon]" << endmsg;
 
-  // loop over DCS directories
-//  const CondAttrListCollection* atrlistcol;
-//  for (std::vector<std::string>::const_iterator itr=m_atrcollist.begin();
-//       itr!=m_atrcollist.end();++itr) {
-//    if (StatusCode::SUCCESS==detStore()->retrieve(atrlistcol,*itr)) {
-//      // loop over collection
-//      int chanNum(0); // loop counter
-//      for (CondAttrListCollection::const_iterator citr=atrlistcol->begin();
-//           citr!=atrlistcol->end();++citr) {
-//        // the following code dumps the attribute list into a string for printing
-//        // to access individual elements by name, use e.g.
-//        // float var1=(((*citr).second)["T04"]).data<float>();
-//        // to get the value of a float column called T04 into var1
-//        float var = 0.;
-//        int element_index = 0; // 0 or 1
-//        for (auto& chan : (*citr).second) {
-//          try {
-//            var = chan.data<float>();
-//            if( m_elementsMap[*itr][element_index] == "temperature") m_moduleTemperature2D->Fill(chanNum, var);
-//          }
-//          catch (...)
-//          {
-//            ATH_MSG_ERROR("Channel " << (*citr).first << " does not have any values!");
-//            continue;
-//          }
-//        }
-//        chanNum++;
-//      }
-//    } else {
-//      ATH_MSG_INFO("Could not retrieve CondAttrListCollection " << *itr);
-//    }
-//  }
-
   // loop over DCS directories
   const CondAttrListCollection* atrlistcol;
   const CondAttrListCollection* atrlistcol_temperature;
@@ -1201,7 +1158,6 @@ StatusCode PixelMainMon::ProcPixelDCSMon(void)
      for(const auto& valueMap : *( m_coolingPipeTemperatureInlet->m_values->at( chanNum ) ) ){
        LB = valueMap.first;
        value = valueMap.second;
-       //m_hist_coolingPipeTemperatureInlet2D->Fill(chanNum, valueMap.second);
        m_hist_Pipes_inlet2Dscatter->Fill(staveNum, value);
        m_hist_Pipes_inletLB[staveNum - 1]->Fill(LB,value);
        m_hist_LB_staveID_coolingPipeInlet->Fill(LB,staveNum,value);
@@ -1255,7 +1211,6 @@ StatusCode PixelMainMon::ProcPixelDCSMon(void)
      for(const auto& valueMap : *( m_LV_voltage->m_values->at( chanNum ) ) ){
        LB = valueMap.first;
        value = valueMap.second;
-       //m_hist_coolingPipeTemperatureInlet2D->Fill(chanNum, valueMap.second);
        //m_hist_Pipes_inlet2D->Fill(staveNum, value);
        //m_hist_Pipes_inletLB[staveNum - 1]->Fill(LB,value);
        //std::cout << "ProcPixelDCSMon(): LB " << LB << ", value " << value << std::endl;
@@ -1286,7 +1241,6 @@ StatusCode PixelMainMon::ProcPixelDCSMon(void)
        LB = valueMap.first;
        value = valueMap.second;
        //m_hist_Pipes_outlet2D->Fill(staveNum, value);
-       ////m_hist_coolingPipeTemperatureOutlet2D->Fill(chanNum, valueMap.second);
        //m_hist_Pipes_outletLB[staveNum - 1]->Fill(LB,value);
        m_hist_LB_moduleGroup_LVcurrent[staveNum - 1]->Fill(LB, moduleGroup, value);
        m_hist_LB_staveID_LVcurrent->Fill(LB,staveNum,value);
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx
index b16c716df3e64cab041fbfc9c5652bc8e902085c..7980fa5dccbad738a29323da454c5ed7cbd7f81c 100755
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx
@@ -28,9 +28,6 @@
 #include "InDetConditionsSummaryService/IInDetConditionsSvc.h"
 #include "TH2S.h"
 #include "TProfile2D.h"
-#include "PixelMonitoring/DBMMon2DMaps.h"
-#include "PixelMonitoring/PixelMon2DMaps.h"
-#include "PixelMonitoring/PixelMonProfiles.h"
 #include "LWHists/TH2F_LW.h"
 #include "LWHists/TH1F_LW.h"
 #include "LWHists/TH1I_LW.h"
@@ -93,19 +90,14 @@ PixelMainMon::PixelMainMon(const std::string & type,
    declareProperty("TrackName",        m_TracksName            = "Pixel_Cosmic_Tracks");         
 
    declareProperty("onTrack",          m_doOnTrack         = false); //using inner detector tracks
-   declareProperty("onPixelTrack",     m_doOnPixelTrack    = false); //using pixel only tracks
    declareProperty("do2DMaps",         m_do2DMaps          = false);   
    declareProperty("doModules",        m_doModules         = false); 
-   declareProperty("doFEChipSummary",  m_doFEChipSummary   = false);
    declareProperty("doOffline",        m_doOffline         = false);
    declareProperty("doOnline",         m_doOnline          = false);
    declareProperty("doLowOccupancy",   m_doLowOccupancy    = false);
    declareProperty("doHighOccupancy",  m_doHighOccupancy   = false);
    declareProperty("doPixelOccupancy", m_doPixelOccupancy  = false); 
-   declareProperty("doRodSim",         m_doRodSim          = false);
    declareProperty("doDetails",        m_doDetails         = false);
-   declareProperty("doSpectrum",       m_doSpectrum        = false);
-   declareProperty("doNoiseMap",       m_doNoiseMap        = false);
    declareProperty("doTiming",         m_doTiming          = false);
    declareProperty("doLumiBlock",      m_doLumiBlock       = false);
    declareProperty("doOfflineAnalysis",m_doOfflineAnalysis = false); // !!! if true using a lot of memory to be absolutely avoided for monitoring
@@ -119,7 +111,6 @@ PixelMainMon::PixelMainMon(const std::string & type,
    declareProperty("doStatus",        m_doStatus     = false);
    declareProperty("doDCS",           m_doDCS        = false);
 
-   declareProperty("doDegFactorMap",  m_doDegFactorMap = true);
    declareProperty("doHeavyIonMon",   m_doHeavyIonMon = false);
 
    declareProperty("doIBL",           m_doIBL = false);
@@ -129,7 +120,7 @@ PixelMainMon::PixelMainMon(const std::string & type,
    declareProperty("DetailsMod2",     m_DetailsMod2 = "");
    declareProperty("DetailsMod3",     m_DetailsMod3 = "");
    declareProperty("DetailsMod4",     m_DetailsMod4 = "");
-   declareProperty("OccupancyCut",    m_occupancy_cut = 1e-5);
+
 
    m_lbRange = 3000;
    m_bcidRange = 3600;
@@ -230,9 +221,6 @@ PixelMainMon::PixelMainMon(const std::string & type,
    m_hiteff_mod = 0;
    m_FE_chip_hit_summary = 0;
    m_pixel_occupancy = 0;
-   /// ROD Sim
-   m_RodSim_BCID_minus_ToT = 0;
-   m_RodSim_FrontEnd_minus_Lvl1ID = 0;
    /// details
    m_Details_mod1_num_hits = 0;
    m_Details_mod2_num_hits = 0;
@@ -278,9 +266,6 @@ PixelMainMon::PixelMainMon(const std::string & type,
    m_LorentzAngle_B0 = 0;
    m_LorentzAngle_B1 = 0;
    m_LorentzAngle_B2 = 0;
-   /// degradation factor
-   m_degFactorMap = 0;
-   m_degFactorMap_per_lumi = 0;
    /// cluster size
    memset(m_clusize_ontrack_mod, 0, sizeof(m_clusize_ontrack_mod));
    memset(m_clusize_offtrack_mod, 0, sizeof(m_clusize_offtrack_mod));
@@ -368,7 +353,6 @@ PixelMainMon::PixelMainMon(const std::string & type,
    m_status = 0;
    m_status_mon = 0;
    m_status_LB = 0;           
-   m_disabled = 0;
    m_dqStatus = 0;
    m_disabledModules_per_lumi_PIX = 0;
    memset(m_badModules_per_lumi_mod, 0, sizeof(m_badModules_per_lumi_mod));
@@ -718,15 +702,6 @@ StatusCode PixelMainMon::bookHistograms()
 
    if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "bookHistograms()" << endmsg; 
 
-   if(m_environment==AthenaMonManager::tier0Raw&&!m_doOnline)
-   {
-     //m_doRDO        = false;
-     //m_doRODError   = false;
-     //m_doSpacePoint = false;
-     //m_doCluster    = false;
-     //m_doStatus     = false;
-     //m_doTrack      = false;
-   }
    if(m_environment==AthenaMonManager::tier0ESD&&!m_doOnline)
    {
      m_doRDO        = false;
@@ -786,7 +761,6 @@ StatusCode PixelMainMon::bookHistograms()
    ///
      std::string path_hits = "Pixel/Hits";
      if(m_doOnTrack)      path_hits.replace(path_hits.begin(), path_hits.end(), "Pixel/HitsOnTrack");
-     if(m_doOnPixelTrack) path_hits.replace(path_hits.begin(), path_hits.end(), "Pixel/HitsOnPixelTrack");
      MonGroup hitsHistos(   this, path_hits.c_str(),  run, ATTRIB_MANAGED ); //declare a group of histograms
      StatusCode sc;
      sc = hitsHistos.regHist(m_mu_vs_bcid = TProfile_LW::create("Interactions_vs_bcid", "<Interactions> vs BCID;BCID;<#Interactions/event>"    , m_bcidRange,-0.5,-0.5+(1.0*m_bcidRange)));
@@ -797,7 +771,6 @@ StatusCode PixelMainMon::bookHistograms()
    ///
    std::string path = "Pixel/Errors";
    if(m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/ErrorsOnTrack");
-   if(m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/ErrorsOnPixelTrack");
    MonGroup errorHistos( this, path.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms
    sc = errorHistos.regHist(m_storegate_errors = TH2F_LW::create("storegate_errors",  ("Storegate Errors" + m_histTitleExt + ";Container Name;Error Type").c_str(), 6,0.5,6.5,5,0.5,5.5));
    if (sc.isFailure()) if(msgLvl(MSG::INFO)) msg(MSG::INFO)  << "Could not book histograms" << endmsg; 
@@ -961,6 +934,18 @@ StatusCode PixelMainMon::fillHistograms() //get called twice per event
      }
    }
 
+   /// Hits
+   if(m_doRDO){
+     if(evtStore()->contains<PixelRDO_Container>(m_Pixel_RDOName) ) {
+       if (FillHitsMon().isFailure()) {
+	 if(msgLvl(MSG::INFO)) msg(MSG::INFO)  << "Could not fill histograms" << endmsg;
+       }
+     }
+     else if(m_storegate_errors) m_storegate_errors->Fill(1.,2.);
+   }else{
+      if(m_storegate_errors) m_storegate_errors->Fill(1.,1.);
+   }
+
    //if(m_doRODError&&evtStore()->contains<PixelRODErrorCollection>(m_detector_error_name))
    if(m_doRODError)
    {
@@ -982,18 +967,6 @@ StatusCode PixelMainMon::fillHistograms() //get called twice per event
       if(m_storegate_errors) m_storegate_errors->Fill(4.,1.);
    }
 
-   /// Hits
-   if(m_doRDO){
-     if(evtStore()->contains<PixelRDO_Container>(m_Pixel_RDOName) ) {
-       if (FillHitsMon().isFailure()) {
-	 if(msgLvl(MSG::INFO)) msg(MSG::INFO)  << "Could not fill histograms" << endmsg; 
-       }
-     }
-     else if(m_storegate_errors) m_storegate_errors->Fill(1.,2.); 
-   }else{
-      if(m_storegate_errors) m_storegate_errors->Fill(1.,1.); 
-   }
-
    /// Cluster
    if(m_doCluster){
       if(evtStore()->contains<InDet::PixelClusterContainer>(m_Pixel_SiClustersName)){
@@ -1041,8 +1014,6 @@ StatusCode PixelMainMon::procHistograms()
   if ( endOfLumiBlockFlag() )
     {
       m_LBendTime = m_currentTime;
-      //if (m_doTrack) { sc=ProcTrackMon(); }
-      //if (sc.isFailure()) if(msgLvl(MSG::INFO)) msg(MSG::INFO)  << "Could not proc histograms" << endmsg; 
     }
   
   if ( !m_doOnline && endOfRunFlag() )
@@ -1077,4 +1048,3 @@ StatusCode PixelMainMon::procHistograms()
   return StatusCode::SUCCESS;
 }
 
-
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DLumiMaps.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DLumiMaps.cxx
index 9a0787cfc438f919c7b257c116e95e438e395bc9..ae9aabbc4c111e1ae2aad7e4d297df325b42c854 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DLumiMaps.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DLumiMaps.cxx
@@ -7,37 +7,87 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "PixelMonitoring/PixelMon2DLumiMaps.h"
+#include "PixelMonitoring/Components.h"
 #include "InDetIdentifier/PixelID.h"
-//#include "TH2I.h"
 #include "LWHists/TH2F_LW.h"
 #include "GaudiKernel/StatusCode.h"     
 #include <string.h>
 
-PixelMon2DLumiMaps::PixelMon2DLumiMaps(std::string name, std::string title, std::string zlabel, bool doIBL, bool errorHist) : m_doIBL(doIBL), m_errorHist(errorHist)
+PixelMon2DLumiMaps::PixelMon2DLumiMaps(std::string name, std::string title, std::string zlabel, const PixMon::HistConf& config)
+    : IBLlbm(nullptr),
+      B0lbm(nullptr),
+      B1lbm(nullptr),
+      B2lbm(nullptr),
+      Albm(nullptr),
+      Clbm(nullptr),
+      DBMAlbm(nullptr),
+      DBMClbm(nullptr),
+      m_config(config)
 {
    const int lbRange = 3000;
-   if (m_doIBL && !m_errorHist) {
-      IBLlbm = TH2F_LW::create((name+"_2D_Map_IBL").c_str(),(title + ", IBL " + " (Map);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5 + (float)lbRange,280,-0.5,279.5);
-   }
-   B0lbm = TH2F_LW::create((name+"_2D_Map_B0").c_str(),  (title + ", B0 "  + " (Map);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5 + (float)lbRange,286,-0.5,285.5);
-   B1lbm = TH2F_LW::create((name+"_2D_Map_B1").c_str(),  (title + ", B1 "  + " (Map);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5 + (float)lbRange,494,-0.5,493.5);
-   B2lbm = TH2F_LW::create((name+"_2D_Map_B2").c_str(),  (title + ", B2 "  + " (Map);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5 + (float)lbRange,676,-0.5,675.5);
-   Albm  = TH2F_LW::create((name+"_2D_Map_ECA" ).c_str(),(title + ", ECA " + " (Map);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5 + (float)lbRange,144,-0.5,143.5);
-   Clbm  = TH2F_LW::create((name+"_2D_Map_ECC" ).c_str(),(title + ", ECC " + " (Map);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5 + (float)lbRange,144,-0.5,143.5);
+   int num_modules;
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kIBL)) {
+      num_modules = PixMon::kNumStavesIBL * (PixMon::kNumModulesIBL2D + PixMon::kNumModulesIBL3D);
+      IBLlbm = TH2F_LW::create((name+"_2D_Map_IBL").c_str(),(title + ", IBL " + " (Map);LB;Module;" + zlabel).c_str(),
+                               lbRange, -0.5, -0.5 + lbRange,
+                               num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB0)) {
+      num_modules = PixMon::kNumStavesL0 * PixMon::kNumModulesBarrel;
+      B0lbm = TH2F_LW::create((name+"_2D_Map_B0").c_str(), (title + ", B0 " + " (Map);LB;Module;" + zlabel).c_str(),
+                              lbRange, -0.5, -0.5 + lbRange,
+                              num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB1)) {
+      num_modules = PixMon::kNumStavesL1 * PixMon::kNumModulesBarrel;
+      B1lbm = TH2F_LW::create((name+"_2D_Map_B1").c_str(), (title + ", B1 " + " (Map);LB;Module;" + zlabel).c_str(),
+                              lbRange, -0.5, -0.5 + lbRange,
+                              num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB2)) {
+      num_modules = PixMon::kNumStavesL2 * PixMon::kNumModulesBarrel;
+      B2lbm = TH2F_LW::create((name+"_2D_Map_B2").c_str(), (title + ", B2 " + " (Map);LB;Module;" + zlabel).c_str(),
+                              lbRange, -0.5, -0.5 + lbRange,
+                              num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kECA)) {
+      num_modules = PixMon::kNumLayersDisk * PixMon::kNumModulesDisk;
+      Albm = TH2F_LW::create((name+"_2D_Map_ECA" ).c_str(),(title + ", ECA " + " (Map);LB;Module;" + zlabel).c_str(),
+                             lbRange, -0.5, -0.5 + lbRange,
+                             num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kECC)) {
+      num_modules = PixMon::kNumLayersDisk * PixMon::kNumModulesDisk;
+      Clbm = TH2F_LW::create((name+"_2D_Map_ECC" ).c_str(),(title + ", ECC " + " (Map);LB;Module;" + zlabel).c_str(),
+                             lbRange, -0.5, -0.5 + lbRange,
+                             num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kDBMA)) {
+      num_modules = PixMon::kNumLayersDBM * PixMon::kNumModulesDBM;
+      DBMAlbm = TH2F_LW::create((name+"_2D_Map_DBMA").c_str(),(title + ", DBMA " + " (Map);LB;Module;" + zlabel).c_str(),
+                                lbRange, -0.5, -0.5 + lbRange,
+                                num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kDBMC)) {
+      num_modules = PixMon::kNumLayersDBM * PixMon::kNumModulesDBM;
+      DBMClbm = TH2F_LW::create((name+"_2D_Map_DBMC").c_str(),(title + ", DBMC " + " (Map);LB;Module;" + zlabel).c_str(),
+                                lbRange, -0.5, -0.5 + lbRange,
+                                num_modules, -0.5, -0.5 + num_modules);
+   }
+
+   // We do not have support for IBL2D/3D in this class, but the histogram
+   // array should look the same for all classes. Therefore, we fill the
+   // blanks for IBL2D/3d with null pointers.
+   m_histograms = {IBLlbm, nullptr, nullptr, B0lbm, B1lbm, B2lbm, Albm, Clbm, DBMAlbm, DBMClbm};
 
    formatHist();
 }
 
 PixelMon2DLumiMaps::~PixelMon2DLumiMaps()
 {
-   if (m_doIBL && !m_errorHist) {
-      LWHist::safeDelete(IBLlbm);//includes null pointer check
-   }
-   LWHist::safeDelete(B0lbm);
-   LWHist::safeDelete(B1lbm);
-   LWHist::safeDelete(B2lbm);
-   LWHist::safeDelete(Albm);
-   LWHist::safeDelete(Clbm);
+   for (auto& hist : m_histograms) {
+      if (hist) LWHist::safeDelete(hist);
+   }
 }
 
 void PixelMon2DLumiMaps::Fill(double LB,Identifier &id, const PixelID* pixID,double weight)
@@ -46,173 +96,114 @@ void PixelMon2DLumiMaps::Fill(double LB,Identifier &id, const PixelID* pixID,dou
    const int pm  = pixID->phi_module(id);
    int ld = pixID->layer_disk(id);
 
-   if (bec == 2) {
+   if (bec == 2 && Albm) {
       Albm->Fill(LB, ld * 48 + pm, weight);
-   } else if (bec == -2) {
+   } else if (bec == -2 && Clbm) {
       Clbm->Fill(LB, ld * 48 + pm, weight);
+   } else if (bec == 4 && DBMAlbm) {
+      DBMAlbm->Fill(LB, ld * 4 + pm, weight);
+   } else if (bec == -4 && DBMClbm) {
+      DBMClbm->Fill(LB, ld * 4 + pm, weight);
    } else if (bec == 0) {
       if (m_doIBL) ld--;
       const int em  = pixID->eta_module(id) + 6;
-      if (ld == 0) {
+      if (ld == 0 && B0lbm) {
          B0lbm->Fill(LB, em + 13 * pm, weight);
-      }else if (ld == 1) {
+      }else if (ld == 1 && B1lbm) {
          B1lbm->Fill(LB, em + 13 * pm, weight);
-      } else if (ld == 2) {
+      } else if (ld == 2 && B2lbm) {
          B2lbm->Fill(LB, em + 13 * pm, weight);
-      } else if (ld == -1 && !m_errorHist && m_doIBL) {
+      } else if (ld == -1 && IBLlbm) {
          IBLlbm->Fill(LB, em + 4 + 20 * pm, weight);
       }
    }
 }
 
-void PixelMon2DLumiMaps::Scale (double number)
-{
-   if (number==0) return; //shouldn't happen the way function is called, but dummy check to avoid divide by zero
-
-   Albm->scaleContentsAndErrors((float) 1.0/number);
-   Clbm->scaleContentsAndErrors((float) 1.0/number);
-   B0lbm->scaleContentsAndErrors((float) 1.0/number);
-   B1lbm->scaleContentsAndErrors((float) 1.0/number);
-   B2lbm->scaleContentsAndErrors((float) 1.0/number);
-   if (!m_errorHist && m_doIBL) IBLlbm->scaleContentsAndErrors((float) 1.0/number);
-}
-
 void PixelMon2DLumiMaps::formatHist()
 {
-   const int ndisk = 3;
-   const int nphi  = 48;
-   const char *disk[ndisk] = { "D1", "D2", "D3" };
-   const int nmod = 13;
-   const int nmodIBL = 20;
-   const char *mod[nmod] = { "M6C", "M5C", "M4C", "M3C", "M2C", "M1C", "M0", "M1A", "M2A", "M3A", "M4A", "M5A", "M6A" };
-   const char *modIBL[nmodIBL] = {
-      "M4_C8_2", "M4_C8_1", "M4_C7_2", "M4_C7_1", "M3_C6", "M3_C5", "M2_C4", "M1_C3", "M1_C2", "M1_C1",
-      "M1_A1", "M1_A2", "M2_A3", "M2_A4", "M3_A5", "M3_A6","M4_A7_1","M4_A7_2","M4_A8_1","M4_A8_2" };
-   char label[30];
-   const int nstaveb = 14;
-   const char *staveb[nstaveb] = {
-      "S01", "S02", "S03", "S04", "S05", "S06","S07",
-      "S08", "S09", "S10", "S11", "S12", "S13","S14"};
-   const int nstave0 = 22;
-   const char *stave0[nstave0] = {
-      "B11_S2", "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1",
-      "B03_S2", "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1",
-      "B06_S2", "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1",
-      "B09_S2", "B10_S1", "B10_S2", "B11_S1" };
-   const int nstave1 = 38;
-   const char *stave1[nstave1] = {
-      "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2",
-      "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2",
-      "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2",
-      "B10_S1", "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2",
-      "B13_S1", "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2",
-      "B16_S1", "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2",
-      "B19_S1", "B19_S2" };
-   const int nstave2 = 52;
-   const char *stave2[nstave2] = {          
-      "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2", "B04_S1",
-      "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2", "B07_S1",
-      "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2", "B10_S1",
-      "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2", "B13_S1",
-      "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2", "B16_S1",
-      "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2", "B19_S1",
-      "B19_S2", "B20_S1", "B20_S2", "B21_S1", "B21_S2", "B22_S1",
-      "B22_S2", "B23_S1", "B23_S2", "B24_S1", "B24_S2", "B25_S1",
-      "B25_S2", "B26_S1", "B26_S2", "B01_S1" };
-   const char *nstaveA[nphi] = {
-      "B01_S2_M1", "B01_S2_M6", "B01_S2_M2", "B01_S2_M5", "B01_S2_M3", "B01_S2_M4", 
-      "B02_S1_M1", "B02_S1_M6", "B02_S1_M2", "B02_S1_M5", "B02_S1_M3", "B02_S1_M4", 
-      "B02_S2_M1", "B02_S2_M6", "B02_S2_M2", "B02_S2_M5", "B02_S2_M3", "B02_S2_M4", 
-      "B03_S1_M1", "B03_S1_M6", "B03_S1_M2", "B03_S1_M5", "B03_S1_M3", "B03_S1_M4", 
-      "B03_S2_M1", "B03_S2_M6", "B03_S2_M2", "B03_S2_M5", "B03_S2_M3", "B03_S2_M4", 
-      "B04_S1_M1", "B04_S1_M6", "B04_S1_M2", "B04_S1_M5", "B04_S1_M3", "B04_S1_M4", 
-      "B04_S2_M1", "B04_S2_M6", "B04_S2_M2", "B04_S2_M5", "B04_S2_M3", "B04_S2_M4", 
-      "B01_S1_M1", "B01_S1_M6", "B01_S1_M2", "B01_S1_M5", "B01_S1_M3", "B01_S1_M4"};
-   const char *nstaveC[nphi] = {
-      "B01_S2_M4", "B01_S2_M3", "B01_S2_M5", "B01_S2_M2", "B01_S2_M6", "B01_S2_M1", 
-      "B02_S1_M4", "B02_S1_M3", "B02_S1_M5", "B02_S1_M2", "B02_S1_M6", "B02_S1_M1", 
-      "B02_S2_M4", "B02_S2_M3", "B02_S2_M5", "B02_S2_M2", "B02_S2_M6", "B02_S2_M1", 
-      "B03_S1_M4", "B03_S1_M3", "B03_S1_M5", "B03_S1_M2", "B03_S1_M6", "B03_S1_M1", 
-      "B03_S2_M4", "B03_S2_M3", "B03_S2_M5", "B03_S2_M2", "B03_S2_M6", "B03_S2_M1", 
-      "B04_S1_M4", "B04_S1_M3", "B04_S1_M5", "B04_S1_M2", "B04_S1_M6", "B04_S1_M1", 
-      "B04_S2_M4", "B04_S2_M3", "B04_S2_M5", "B04_S2_M2", "B04_S2_M6", "B04_S2_M1", 
-      "B01_S1_M4", "B01_S1_M3", "B01_S1_M5", "B01_S1_M2", "B01_S1_M6", "B01_S1_M1"};
-
-   int count = 1;
-   for (int j = 0; j < ndisk; j++) {
-      for (int i = 0; i < nphi; i++) {
-         sprintf(label, "%sA_%s", disk[j], nstaveA[i]);
-         Albm->GetYaxis()->SetBinLabel(count, label);
-         sprintf(label, "%sC_%s", disk[j], nstaveC[i]);
-         Clbm->GetYaxis()->SetBinLabel(count, label);
-         count++;
+   std::string label;
+   unsigned int count = 1;
+   if (Albm && Clbm) {
+      for (unsigned int j = 0; j < PixMon::kNumLayersDisk; ++j) {
+         for (unsigned int i = 0; i < PixMon::kNumModulesDisk; ++i) {
+            label = PixMon::LayersDisk.at(j) + "A_" + PixMon::ModulesECA.at(i);
+            Albm->GetYaxis()->SetBinLabel(count, label.c_str());
+            label = PixMon::LayersDisk.at(j) + "C_" + PixMon::ModulesECC.at(i);
+            Clbm->GetYaxis()->SetBinLabel(count, label.c_str());
+            count++;
+         }
       }
+      count = 1;
    }
-   count = 1;
-   for (int i = 0; i < nstave0; i++) {
-      for (int j = 0; j < nmod; j++) {
-         sprintf(label, "L0_%s_%s", stave0[i], mod[j]);
-         B0lbm->GetYaxis()->SetBinLabel(count, label); 
-         count++;
+   if (DBMAlbm && DBMClbm) {
+      for (unsigned int j = 0; j < PixMon::kNumLayersDBM; ++j) {
+         for (unsigned int i = 0; i < PixMon::kNumModulesDBM; ++i) {
+            label = PixMon::LayersDBM.at(j) + "A_" + PixMon::ModulesDBM.at(i);
+            DBMAlbm->GetYaxis()->SetBinLabel(count, label.c_str());
+            label = PixMon::LayersDBM.at(j) + "C_" + PixMon::ModulesDBM.at(i);
+            DBMClbm->GetYaxis()->SetBinLabel(count, label.c_str());
+            count++;
+         }
       }
+      count = 1;
    }
-   count = 1;
-   for (int i = 0; i < nstave1; i++) {
-      for (int j = 0; j < nmod; j++) {
-         sprintf(label, "L1_%s_%s", stave1[i], mod[j]);
-         B1lbm->GetYaxis()->SetBinLabel(count, label);
-         count++; 
+   if (B0lbm && B1lbm && B2lbm) {
+      for (unsigned int i = 0; i < PixMon::kNumStavesL0; ++i) {
+         for (unsigned int j = 0; j < PixMon::kNumModulesBarrel; ++j) {
+            label = "L0_" + PixMon::StavesL0.at(i) + "_" + PixMon::ModulesBarrel.at(j);
+            B0lbm->GetYaxis()->SetBinLabel(count, label.c_str());
+            count++;
+         }
       }
-   }
-   count = 1;
-   for (int i = 0; i < nstave2; i++) {
-      for (int j = 0; j < nmod; j++) {
-         sprintf(label, "L2_%s_%s", stave2[i], mod[j]);
-         B2lbm->GetYaxis()->SetBinLabel(count, label);
-         count++;
-      } 
-   }
-   count = 1;
-   if (!m_errorHist && m_doIBL) {
-      for (int i = 0; i < nstaveb; i++) {
-	 for (int j = 0; j < nmodIBL; j++) {
-            sprintf(label, "IBL_%s_%s", staveb[i], modIBL[j]);
-            IBLlbm->GetYaxis()->SetBinLabel(count, label);
+      count = 1;
+      for (unsigned int i = 0; i < PixMon::kNumStavesL1; ++i) {
+         for (unsigned int j = 0; j < PixMon::kNumModulesBarrel; ++j) {
+            label = "L1_" + PixMon::StavesL1.at(i) + "_" + PixMon::ModulesBarrel.at(j);
+            B1lbm->GetYaxis()->SetBinLabel(count, label.c_str());
             count++;
-	 }
+         }
       }
+      count = 1;
+      for (unsigned int i = 0; i < PixMon::kNumStavesL2; ++i) {
+         for (unsigned int j = 0; j < PixMon::kNumModulesBarrel; ++j) {
+            label = "L2_" + PixMon::StavesL2.at(i) + "_" + PixMon::ModulesBarrel.at(j);
+            B2lbm->GetYaxis()->SetBinLabel(count, label.c_str());
+            count++;
+         }
+      }
+      count = 1;
    }
-   
-   if (!m_errorHist && m_doIBL) {
-      IBLlbm->GetYaxis()->SetLabelSize(0.04);
-      IBLlbm->SetOption("colz");
+
+   if (IBLlbm) {
+      for (unsigned int i = 0; i < PixMon::kNumStavesIBL; ++i) {
+         for (unsigned int j = 0; j < PixMon::kNumModulesIBL; ++j) {
+            label = "IBL_" + PixMon::StavesIBL.at(i) + "_" + PixMon::ModulesIBL.at(j);
+            IBLlbm->GetYaxis()->SetBinLabel(count, label.c_str());
+            count++;
+         }
+      }
    }
 
-   //Make the text smaller
-   B0lbm->GetYaxis()->SetLabelSize(0.04);
-   B1lbm->GetYaxis()->SetLabelSize(0.04);
-   B2lbm->GetYaxis()->SetLabelSize(0.04);
-   Albm->GetYaxis()->SetLabelSize(0.04);
-   Clbm->GetYaxis()->SetLabelSize(0.04);
-   //put histograms in the easier to read colz format
-   B0lbm->SetOption("colz");
-   B1lbm->SetOption("colz");
-   B2lbm->SetOption("colz");
-   Albm->SetOption("colz");
-   Clbm->SetOption("colz");
+   for (auto& hist : m_histograms) {
+      if (!hist) continue;
+      hist->GetYaxis()->SetLabelSize(0.04);
+      hist->SetOption("colz");
+      hist->SetMinimum(0.);
+   }
 }
 
 StatusCode PixelMon2DLumiMaps::regHist(ManagedMonitorToolBase::MonGroup &group)
 {
    StatusCode sc = StatusCode::SUCCESS;
-   if (!m_errorHist && m_doIBL) {
-      if (group.regHist(IBLlbm).isFailure()) sc = StatusCode::FAILURE;
-   }
-   if (group.regHist(B0lbm).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(B1lbm).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(B2lbm).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(Albm).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(Clbm).isFailure()) sc = StatusCode::FAILURE;
+
+   for (auto& hist : m_histograms) {
+      if (!hist) continue;
+      if (group.regHist(hist).isFailure()) {
+         sc = StatusCode::FAILURE;
+      }
+   }
 
    return sc;
 }
+
+const bool PixelMon2DLumiMaps::m_doIBL{true};
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DLumiProfiles.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DLumiProfiles.cxx
index 3305c5d597eb57a7b27d7ad055226528087ba7cd..3e64dcf54f05117be6a32519c024ef4f0c3d7a30 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DLumiProfiles.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DLumiProfiles.cxx
@@ -6,39 +6,88 @@
 // Function to handle 2D maps of modules, one for each region
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "PixelMonitoring/Components.h"
 #include "PixelMonitoring/PixelMon2DLumiProfiles.h"
 #include "InDetIdentifier/PixelID.h"
-//#include "TH2I.h"
-#include "TH2F.h"
 #include "LWHists/TProfile2D_LW.h"
 #include "GaudiKernel/StatusCode.h"     
 #include <string.h>
 
-PixelMon2DLumiProfiles::PixelMon2DLumiProfiles(std::string name, std::string title, std::string zlabel, bool doIBL, bool errorHist) : m_doIBL(doIBL), m_errorHist(errorHist)
+PixelMon2DLumiProfiles::PixelMon2DLumiProfiles(std::string name, std::string title, std::string zlabel, const PixMon::HistConf& config)
+    : IBLlbp(nullptr),
+      B0lbp(nullptr),
+      B1lbp(nullptr),
+      B2lbp(nullptr),
+      Albp(nullptr),
+      Clbp(nullptr),
+      DBMAlbp(nullptr),
+      DBMClbp(nullptr),
+      m_config(config)
 {
    const int lbRange = 3000;
-   if (m_doIBL && !m_errorHist) {
-      IBLlbp= TProfile2D_LW::create((name+"_2D_Profile_IBL").c_str(), (title + ", IBL " + title + " (Profile);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5+(float)lbRange,280,-0.5,279.5);
-   }
-   B0lbp = TProfile2D_LW::create((name+"_2D_Profile_B0").c_str(),  (title + ", B0 "  + title + " (Profile);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5+(float)lbRange,286,-0.5,285.5);
-   B1lbp = TProfile2D_LW::create((name+"_2D_Profile_B1").c_str(),  (title + ", B1 "  + title + " (Profile);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5+(float)lbRange,494,-0.5,493.5);
-   B2lbp = TProfile2D_LW::create((name+"_2D_Profile_B2").c_str(),  (title + ", B2 "  + title + " (Profile);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5+(float)lbRange,676,-0.5,675.5);
-   Albp  = TProfile2D_LW::create((name+"_2D_Profile_ECA" ).c_str(),(title + ", ECA " + title + " (Profile);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5+(float)lbRange,144,-0.5,143.5);
-   Clbp  = TProfile2D_LW::create((name+"_2D_Profile_ECC" ).c_str(),(title + ", ECC " + title + " (Profile);LB;Module;" + zlabel).c_str(),lbRange,-0.5,-0.5+(float)lbRange,144,-0.5,143.5);
+   int num_modules;
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kIBL)) {
+      num_modules = PixMon::kNumStavesIBL * (PixMon::kNumModulesIBL2D + PixMon::kNumModulesIBL3D);
+      IBLlbp= TProfile2D_LW::create((name+"_2D_Profile_IBL").c_str(), (title + ", IBL " + title + " (Profile);LB;Module;" + zlabel).c_str(),
+                                    lbRange, -0.5, -0.5 + lbRange,
+                                    num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB0)) {
+      num_modules = PixMon::kNumStavesL0 * PixMon::kNumModulesBarrel;
+      B0lbp = TProfile2D_LW::create((name+"_2D_Profile_B0").c_str(),  (title + ", B0 " + title + " (Profile);LB;Module;" + zlabel).c_str(),
+                                    lbRange, -0.5, -0.5 + lbRange,
+                                    num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB1)) {
+      num_modules = PixMon::kNumStavesL1 * PixMon::kNumModulesBarrel;
+      B1lbp = TProfile2D_LW::create((name+"_2D_Profile_B1").c_str(),  (title + ", B1 " + title + " (Profile);LB;Module;" + zlabel).c_str(),
+                                    lbRange, -0.5, -0.5 + lbRange,
+                                    num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB2)) {
+      num_modules = PixMon::kNumStavesL2 * PixMon::kNumModulesBarrel;;
+      B2lbp = TProfile2D_LW::create((name+"_2D_Profile_B2").c_str(),  (title + ", B2 " + title + " (Profile);LB;Module;" + zlabel).c_str(),
+                                    lbRange, -0.5, -0.5 + lbRange,
+                                    num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kECA)) {
+      num_modules = PixMon::kNumLayersDisk * PixMon::kNumModulesDisk;
+      Albp = TProfile2D_LW::create((name+"_2D_Profile_ECA" ).c_str(),(title + ", ECA " + title + " (Profile);LB;Module;" + zlabel).c_str(),
+                                   lbRange, -0.5, -0.5 + lbRange,
+                                   num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kECC)) {
+      num_modules = PixMon::kNumLayersDisk * PixMon::kNumModulesDisk;
+      Clbp = TProfile2D_LW::create((name+"_2D_Profile_ECC" ).c_str(),(title + ", ECC " + title + " (Profile);LB;Module;" + zlabel).c_str(),
+                                   lbRange, -0.5, -0.5 + lbRange,
+                                   num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kDBMA)) {
+      num_modules = PixMon::kNumLayersDBM * PixMon::kNumModulesDBM;
+      DBMAlbp = TProfile2D_LW::create((name+"_2D_Profile_DBMA" ).c_str(),(title + ", DBMA " + title + " (Profile);LB;Module;" + zlabel).c_str(),
+                                      lbRange, -0.5, -0.5 + lbRange,
+                                      num_modules, -0.5, -0.5 + num_modules);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kDBMC)) {
+      num_modules = PixMon::kNumLayersDBM * PixMon::kNumModulesDBM;
+      DBMClbp = TProfile2D_LW::create((name+"_2D_Profile_DBMC" ).c_str(),(title + ", DBMC " + title + " (Profile);LB;Module;" + zlabel).c_str(),
+                                      lbRange, -0.5, -0.5 + lbRange,
+                                      num_modules, -0.5, -0.5 + num_modules);
+   }
+
+   // We do not have support for IBL2D/3D in this class, but the histogram
+   // array should look the same for all classes. Therefore, we fill the
+   // blanks for IBL2D/3d with null pointers.
+   m_histograms = {IBLlbp, nullptr, nullptr, B0lbp, B1lbp, B2lbp, Albp, Clbp, DBMAlbp, DBMClbp};
 
    formatHist();
 }
 
 PixelMon2DLumiProfiles::~PixelMon2DLumiProfiles()
 {
-   if (m_doIBL && !m_errorHist) {
-      LWHist::safeDelete(IBLlbp);
-   }
-   LWHist::safeDelete(B0lbp);
-   LWHist::safeDelete(B1lbp);
-   LWHist::safeDelete(B2lbp);
-   LWHist::safeDelete(Albp);
-   LWHist::safeDelete(Clbp);
+   for (auto& hist : m_histograms) {
+      if (hist) LWHist::safeDelete(hist);
+   }
 }
 
 void PixelMon2DLumiProfiles::Fill(double LB,Identifier &id, const PixelID* pixID, double weight)
@@ -47,20 +96,24 @@ void PixelMon2DLumiProfiles::Fill(double LB,Identifier &id, const PixelID* pixID
    const int pm  = pixID->phi_module(id);
    int ld = pixID->layer_disk(id);
 
-   if (bec == 2) {
+   if (bec == 2 && Albp) {
       Albp->Fill(LB, ld * 48 + pm, weight);
-   } else if (bec == -2) {
+   } else if (bec == -2 && Clbp) {
       Clbp->Fill(LB, ld * 48 + pm, weight);
+   } else if (bec == 4 && DBMAlbp) {
+      DBMAlbp->Fill(LB, ld * 4 + pm, weight);
+   } else if (bec == -4 && DBMClbp) {
+      DBMClbp->Fill(LB, ld * 4 + pm, weight);
    } else if (bec == 0) {
       if (m_doIBL) ld--;
       const int em = pixID->eta_module(id) + 6;
-      if (ld == 0) {
+      if (ld == 0 && B0lbp) {
          B0lbp->Fill(LB, em + 13 * pm, weight);
-      } else if (ld == 1) {
+      } else if (ld == 1 && B1lbp) {
          B1lbp->Fill(LB, em + 13 * pm, weight);
-      } else if (ld == 2) {
+      } else if (ld == 2 && B2lbp) {
          B2lbp->Fill(LB, em + 13 * pm, weight);
-      } else if (ld == -1 && !m_errorHist && m_doIBL) {
+      } else if (ld == -1 && IBLlbp) {
          IBLlbp->Fill(LB, em + 4 + 20 * pm, weight);
       }
    }
@@ -69,141 +122,91 @@ void PixelMon2DLumiProfiles::Fill(double LB,Identifier &id, const PixelID* pixID
 
 void PixelMon2DLumiProfiles::formatHist()
 {
-   const int ndisk = 3;
-   const int nphi  = 48;
-   const char *disk[ndisk] = { "D1", "D2", "D3" };
-   const int nmod = 13;
-   const int nmodIBL = 20;
-   const char *mod[nmod] = { "M6C", "M5C", "M4C", "M3C", "M2C", "M1C", "M0", "M1A", "M2A", "M3A", "M4A", "M5A", "M6A" } ;
-   const char *modIBL[nmodIBL] = {
-      "M4_C8_2", "M4_C8_1", "M4_C7_2", "M4_C7_1", "M3_C6", "M3_C5", "M2_C4", "M1_C3", "M1_C2", "M1_C1",
-      "M1_A1", "M1_A2", "M2_A3", "M2_A4", "M3_A5", "M3_A6", "M4_A7_1", "M4_A7_2", "M4_A8_1", "M4_A8_2" };
-   char label[30];
-
-   const int nstaveb = 14;
-   const char *staveb[nstaveb] = {
-      "S01", "S02", "S03", "S04", "S05", "S06","S07",
-      "S08", "S09", "S10", "S11", "S12", "S13","S14"};
-   const int nstave0 = 22;
-   const char *stave0[nstave0] = {
-      "B11_S2", "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1",
-      "B03_S2", "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1",
-      "B06_S2", "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1",
-      "B09_S2","B10_S1", "B10_S2", "B11_S1" };
-   const int nstave1 = 38;
-   const char *stave1[nstave1] = {
-      "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2",
-      "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2",
-      "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2",
-      "B10_S1", "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2",
-      "B13_S1", "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2",
-      "B16_S1", "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2",
-      "B19_S1", "B19_S2" };
-   const int nstave2 = 52;
-   const char *stave2[nstave2] = {          
-      "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2", "B04_S1",
-      "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2", "B07_S1",
-      "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2", "B10_S1",
-      "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2", "B13_S1",
-      "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2", "B16_S1",
-      "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2", "B19_S1",
-      "B19_S2", "B20_S1", "B20_S2", "B21_S1", "B21_S2", "B22_S1",
-      "B22_S2", "B23_S1", "B23_S2", "B24_S1", "B24_S2", "B25_S1",
-      "B25_S2", "B26_S1", "B26_S2", "B01_S1" };
-   const char *nstaveA[nphi] = {
-      "B01_S2_M1", "B01_S2_M6", "B01_S2_M2", "B01_S2_M5", "B01_S2_M3", "B01_S2_M4", 
-      "B02_S1_M1", "B02_S1_M6", "B02_S1_M2", "B02_S1_M5", "B02_S1_M3", "B02_S1_M4", 
-      "B02_S2_M1", "B02_S2_M6", "B02_S2_M2", "B02_S2_M5", "B02_S2_M3", "B02_S2_M4", 
-      "B03_S1_M1", "B03_S1_M6", "B03_S1_M2", "B03_S1_M5", "B03_S1_M3", "B03_S1_M4", 
-      "B03_S2_M1", "B03_S2_M6", "B03_S2_M2", "B03_S2_M5", "B03_S2_M3", "B03_S2_M4", 
-      "B04_S1_M1", "B04_S1_M6", "B04_S1_M2", "B04_S1_M5", "B04_S1_M3", "B04_S1_M4", 
-      "B04_S2_M1", "B04_S2_M6", "B04_S2_M2", "B04_S2_M5", "B04_S2_M3", "B04_S2_M4", 
-      "B01_S1_M1", "B01_S1_M6", "B01_S1_M2", "B01_S1_M5", "B01_S1_M3", "B01_S1_M4"};
-   const char *nstaveC[nphi] = {
-      "B01_S2_M4", "B01_S2_M3", "B01_S2_M5", "B01_S2_M2", "B01_S2_M6", "B01_S2_M1", 
-      "B02_S1_M4", "B02_S1_M3", "B02_S1_M5", "B02_S1_M2", "B02_S1_M6", "B02_S1_M1", 
-      "B02_S2_M4", "B02_S2_M3", "B02_S2_M5", "B02_S2_M2", "B02_S2_M6", "B02_S2_M1", 
-      "B03_S1_M4", "B03_S1_M3", "B03_S1_M5", "B03_S1_M2", "B03_S1_M6", "B03_S1_M1", 
-      "B03_S2_M4", "B03_S2_M3", "B03_S2_M5", "B03_S2_M2", "B03_S2_M6", "B03_S2_M1", 
-      "B04_S1_M4", "B04_S1_M3", "B04_S1_M5", "B04_S1_M2", "B04_S1_M6", "B04_S1_M1", 
-      "B04_S2_M4", "B04_S2_M3", "B04_S2_M5", "B04_S2_M2", "B04_S2_M6", "B04_S2_M1", 
-      "B01_S1_M4", "B01_S1_M3", "B01_S1_M5", "B01_S1_M2", "B01_S1_M6", "B01_S1_M1"};
-
-   int count = 1;
-   for (int j = 0; j < ndisk; j++) {
-      for (int i = 0; i < nphi; i++) {
-         sprintf(label, "%sA_%s", disk[j], nstaveA[i]);
-         Albp->GetYaxis()->SetBinLabel(count, label);
-         sprintf(label, "%sC_%s", disk[j], nstaveC[i]);
-         Clbp->GetYaxis()->SetBinLabel(count, label);
-         count++;
+   std::string label;
+   unsigned int count = 1;
+   if (Albp && Clbp) {
+      for (unsigned int j = 0; j < PixMon::kNumLayersDisk; ++j) {
+         for (unsigned int i = 0; i < PixMon::kNumModulesDisk; ++i) {
+            label = PixMon::LayersDisk.at(j) + "A_" + PixMon::ModulesECA.at(i);
+            Albp->GetYaxis()->SetBinLabel(count, label.c_str());
+            label = PixMon::LayersDisk.at(j) + "C_" + PixMon::ModulesECC.at(i);
+            Clbp->GetYaxis()->SetBinLabel(count, label.c_str());
+            count++;
+         }
       }
+      count = 1;
    }
-   count = 1;
-   for (int i = 0; i < nstave0; i++) {
-      for (int j = 0; j < nmod; j++) {
-         sprintf(label, "L0_%s_%s", stave0[i], mod[j]);
-         B0lbp->GetYaxis()->SetBinLabel(count, label); 
-         count++;
+   if (DBMAlbp && DBMClbp) {
+      for (unsigned int j = 0; j < PixMon::kNumLayersDBM; ++j) {
+         for (unsigned int i = 0; i < PixMon::kNumModulesDBM; ++i) {
+            label = PixMon::LayersDBM.at(j) + "A_" + PixMon::ModulesDBM.at(i);
+            DBMAlbp->GetYaxis()->SetBinLabel(count, label.c_str());
+            label = PixMon::LayersDBM.at(j) + "C_" + PixMon::ModulesDBM.at(i);
+            DBMClbp->GetYaxis()->SetBinLabel(count, label.c_str());
+            count++;
+         }
       }
+      count = 1;
    }
-   count = 1;
-   for (int i = 0; i < nstave1; i++) {
-      for (int j = 0; j < nmod; j++) {
-         sprintf(label, "L1_%s_%s", stave1[i], mod[j]);
-         B1lbp->GetYaxis()->SetBinLabel(count,label);
-         count++; 
+   if (B0lbp && B1lbp && B2lbp) {
+      for (unsigned int i = 0; i < PixMon::kNumStavesL0; ++i) {
+         for (unsigned int j = 0; j < PixMon::kNumModulesBarrel; ++j) {
+            label = "L0_" + PixMon::StavesL0.at(i) + "_" + PixMon::ModulesBarrel.at(j);
+            B0lbp->GetYaxis()->SetBinLabel(count, label.c_str());
+            count++;
+         }
+      }
+      count = 1;
+      for (unsigned int i = 0; i < PixMon::kNumStavesL1; ++i) {
+         for (unsigned int j = 0; j < PixMon::kNumModulesBarrel; ++j) {
+            label = "L1_" + PixMon::StavesL1.at(i) + "_" + PixMon::ModulesBarrel.at(j);
+            B1lbp->GetYaxis()->SetBinLabel(count, label.c_str());
+            count++;
+         }
+      }
+      count = 1;
+      for (unsigned int i = 0; i < PixMon::kNumStavesL2; ++i) {
+         for (unsigned int j = 0; j < PixMon::kNumModulesBarrel; ++j) {
+            label = "L2_" + PixMon::StavesL2.at(i) + "_" + PixMon::ModulesBarrel.at(j);
+            B2lbp->GetYaxis()->SetBinLabel(count, label.c_str());
+            count++;
+         }
       }
+      count = 1;
    }
-   count = 1;
-   for (int i = 0; i < nstave2; i++) {
-      for (int j = 0; j < nmod; j++) {
-         sprintf(label, "L2_%s_%s", stave2[i], mod[j]);
-         B2lbp->GetYaxis()->SetBinLabel(count, label);
-         count++;
-      } 
-   }
-   count = 1;
-   if (!m_errorHist && m_doIBL) {
-      for (int i = 0; i < nstaveb; i++) {
-	 for (int j = 0; j < nmodIBL; j++) {
-            sprintf(label, "IBL_%s_%s", staveb[i], modIBL[j]);
-            IBLlbp->GetYaxis()->SetBinLabel(count, label);
+   if (IBLlbp) {
+      for (unsigned int i = 0; i < PixMon::kNumStavesIBL; ++i) {
+         for (unsigned int j = 0; j < PixMon::kNumModulesIBL; ++j) {
+            label = "IBL_" + PixMon::StavesIBL.at(i) + "_" + PixMon::ModulesIBL.at(j);
+            IBLlbp->GetYaxis()->SetBinLabel(count, label.c_str());
             count++;
 	 }
       }
    }
 
-   if (!m_errorHist && m_doIBL) {
-     IBLlbp->GetYaxis()->SetLabelSize(0.03);
-     IBLlbp->SetOption("colz");
+   for (auto& hist : m_histograms) {
+      if (!hist) continue;
+      if (hist == Albp || hist == Clbp) {
+         hist->GetYaxis()->SetLabelSize(0.02);
+      } else {
+         hist->GetYaxis()->SetLabelSize(0.03);
+      }        
+      hist->SetOption("colz");
    }
-
-   //Make the text smaller
-   B0lbp->GetYaxis()->SetLabelSize(0.03);
-   B1lbp->GetYaxis()->SetLabelSize(0.03);
-   B2lbp->GetYaxis()->SetLabelSize(0.03);
-   Albp->GetYaxis()->SetLabelSize(0.02);
-   Clbp->GetYaxis()->SetLabelSize(0.02);
-   //put histograms in the easier to read colz format
-   B0lbp->SetOption("colz");
-   B1lbp->SetOption("colz");
-   B2lbp->SetOption("colz");
-   Albp->SetOption("colz");
-   Clbp->SetOption("colz");
 }
 
 StatusCode PixelMon2DLumiProfiles::regHist(ManagedMonitorToolBase::MonGroup &group)
 {
    StatusCode sc = StatusCode::SUCCESS;
-   if (!m_errorHist && m_doIBL) {
-      if (group.regHist(IBLlbp).isFailure()) sc = StatusCode::FAILURE;
-   }
-   if (group.regHist(B0lbp).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(B1lbp).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(B2lbp).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(Albp).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(Clbp).isFailure()) sc = StatusCode::FAILURE;
-   
+
+   for (auto& hist : m_histograms) {
+      if (!hist) continue;
+      if (group.regHist(hist).isFailure()) {
+         sc = StatusCode::FAILURE;
+      }
+   }
+
    return sc;
 }
+
+const bool PixelMon2DLumiProfiles::m_doIBL{true};
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DMaps.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DMaps.cxx
deleted file mode 100644
index 5856783b4b1388d84ce10a56790758a56170c063..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DMaps.cxx
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//////////////////////////////////////////////////////////////////////////////
-// Function to handle 2D maps of modules, one for each region
-///////////////////////////////////////////////////////////////////////////////
-
-#include "PixelMonitoring/PixelMon2DMaps.h"
-#include "InDetIdentifier/PixelID.h"
-//#include "TH2I.h"
-#include "TH2F.h"
-#include "GaudiKernel/StatusCode.h"     
-#include <string.h>
-
-PixelMon2DMaps::PixelMon2DMaps(std::string name, std::string title, bool doIBL) : m_doIBL(doIBL)
-{
-   m_cnt = 0;
-   if (m_doIBL) {
-      IBL3D = new TH2F((name+"_IBL3D").c_str(),(title + ", IBL 3D modules " + ";eta index of module;phi index of module").c_str(), 8, -.5, 7.5, 14, -0.5, 13.5);
-      IBL2D = new TH2F((name+"_IBL2D").c_str(),(title + ", IBL planar modules " + ";shifted eta index of module;phi index of module").c_str(), 12, -6.5, 5.5, 14, -0.5, 13.5);
-      IBL   = new TH2F((name+"_IBL").c_str(),  (title + ", IBL " + ";shifted eta index of module;phi index of module").c_str(), 32, -16.5, 15.5, 14, -0.5, 13.5);
-   }
-   B0 = new TH2F((name+"_B0").c_str(),      (title + ", B0 "   + ";eta index of module;phi index of module").c_str(), 13, -6.5, 6.5, 22, -0.5, 21.5);
-   B1 = new TH2F((name+"_B1").c_str(),      (title + ", B1 "   + ";eta index of module;phi index of module").c_str(), 13, -6.5, 6.5, 38, -0.5, 37.5);
-   B2 = new TH2F((name+"_B2").c_str(),      (title + ", B2 "   + ";eta index of module;phi index of module").c_str(), 13, -6.5, 6.5, 52, -0.5, 51.5);
-   A  = new TH2F((name+"_ECA" ).c_str(),    (title + ", ECA "  + ";disk number;phi index of module").c_str(),          3, -0.5, 2.5, 48, -0.5, 47.5);
-   C  = new TH2F((name+"_ECC" ).c_str(),    (title + ", ECC "  + ";disk number;phi index of module").c_str(),          3, -0.5, 2.5, 48, -0.5, 47.5);
-   DBMA = new TH2F((name+"_DBMA" ).c_str(), (title + ", DBMA " + ";layer number;phi index of telescope").c_str(),      3, -0.5, 2.5, 4, -0.5, 3.5);
-   DBMC = new TH2F((name+"_DBMC" ).c_str(), (title + ", DBMC " + ";layer number;phi index of telescope").c_str(),      3, -0.5, 2.5, 4, -0.5, 3.5);
-
-   formatHist();
-}
-
-PixelMon2DMaps::~PixelMon2DMaps()
-{
-   if (m_doIBL) {
-      delete IBL3D;
-      delete IBL2D;
-      delete IBL;
-   }
-   delete B0;
-   delete B1;
-   delete B2;
-   delete A;
-   delete C;
-   delete DBMA;
-   delete DBMC;
-}
-
-void PixelMon2DMaps::Reset()
-{
-   if (m_doIBL) {
-      IBL3D->Reset();
-      IBL2D->Reset();
-      IBL->Reset();
-   }
-   B0->Reset();
-   B1->Reset();
-   B2->Reset();
-   A->Reset();
-   C->Reset();
-   DBMA->Reset();
-   DBMC->Reset();
-}
-
-void PixelMon2DMaps::Fill(Identifier &id, const PixelID* pixID)
-{
-   const int bec = pixID->barrel_ec(id);
-   const int pm  = pixID->phi_module(id);
-   int ld = pixID->layer_disk(id);
-
-   if (bec == 2) A->Fill(ld, pm);
-   else if (bec == -2) C->Fill(ld, pm);
-   else if (bec == 4) DBMA->Fill(ld, pm);
-   else if (bec == -4) DBMC->Fill(ld, pm);
-   else if (bec == 0) {
-      if (m_doIBL) ld--;
-      const int em  = pixID->eta_module(id);
-      if (ld == 0) {
-         B0->Fill(em, pm);
-      } else if (ld == 1) {
-         B1->Fill(em, pm);
-      } else if (ld == 2) {
-         B2->Fill(em, pm);
-      } else if (ld == -1) {
-         int feid = 0;
-         int emf = 0;
-         if (em < 6 && em > -7) {
-            if (pixID->eta_index(id) >= 80) feid = 1;
-            emf = 2 * em + feid; 
-            IBL2D->Fill(em, pm);
-         } else if (em < -6) {
-            emf = em - 6;
-            IBL3D->Fill(em + 10, pm);
-         } else {
-            emf = em + 6;
-            IBL3D->Fill(em - 2, pm);
-         }
-         IBL->Fill(emf, pm);
-      }
-   }
-}
-
-void PixelMon2DMaps::WeightingFill(Identifier &id, const PixelID* pixID, float weight)
-{
-   const int bec = pixID->barrel_ec(id);
-   const int pm  = pixID->phi_module(id);
-   int ld = pixID->layer_disk(id);
-
-   if (bec == 2) A->Fill(ld, pm, weight);
-   else if (bec == -2) C->Fill(ld, pm, weight);
-   else if (bec == 4) DBMA->Fill(ld, pm, weight);
-   else if (bec == -4) DBMC->Fill(ld, pm, weight);
-   else if (bec == 0) {
-      if (m_doIBL) ld--;
-      int em  = pixID->eta_module(id);
-      if (ld == 0) {
-         B0->Fill(em, pm, weight);
-      } else if (ld == 1) { 
-         B1->Fill(em, pm, weight);
-      } else if (ld == 2) { 
-         B2->Fill(em, pm, weight);
-      } else if (ld == -1) {
-         int feid = 0;
-         int emf = 0;
-         if (em < 6 && em > -7) {
-            if (pixID->eta_index(id) >= 80) feid = 1;
-            emf = 2 * em + feid; 
-            IBL2D->Fill(em, pm, weight);
-         } else if (em < -6) {
-            emf = em - 6;
-            IBL3D->Fill(em + 10, pm, weight);
-         } else {
-            emf = em + 6;
-            IBL3D->Fill(em - 2, pm, weight);
-         }
-         IBL->Fill(emf, pm, weight);
-      }
-   }
-}   
-
-
-//void PixelMon2DMaps::Scale (double number)
-void PixelMon2DMaps::Scale (double number)
-{
-   if (number==0) return; //shouldn't happen the way function is called, but dummy check to avoid divide by zero
-
-   A->Scale((float) 1.0/number);
-   C->Scale((float) 1.0/number);
-   DBMA->Scale((float) 1.0/number);
-   DBMC->Scale((float) 1.0/number);
-   B0->Scale((float) 1.0/number);
-   B1->Scale((float) 1.0/number);
-   B2->Scale((float) 1.0/number);
-   if (m_doIBL) {
-      IBL2D->Scale((float) 1.0/number);
-      IBL3D->Scale((float) 1.0/number);
-      IBL->Scale((float) 1.0/number);
-   }
-}
-
-void PixelMon2DMaps::ScaleBynPixnEvt(int nevent)
-{
-   double nactivechannels_DBMA  = 1.0*nevent*46080;
-   double nactivechannels_DBMC  = 1.0*nevent*46080;
-   double nactivechannels_ECA   = 1.0*nevent*46080;
-   double nactivechannels_ECC   = 1.0*nevent*46080;
-   double nactivechannels_IBL2D = 1.0*nevent*26880*2;
-   double nactivechannels_IBL3D = 1.0*nevent*26880;
-   double nactivechannels_IBL   = nactivechannels_IBL2D + nactivechannels_IBL3D;
-   double nactivechannels_B0    = 1.0*nevent*46080;
-   double nactivechannels_B1    = 1.0*nevent*46080;
-   double nactivechannels_B2    = 1.0*nevent*46080;
-
-   if (nevent==0) return; //shouldn't happen the way function is called, but dummy check to avoid divide by zero
-
-   DBMA->Scale((float) 1.0/nactivechannels_DBMA);
-   DBMC->Scale((float) 1.0/nactivechannels_DBMC);
-   A->Scale((float)  1.0/nactivechannels_ECA);
-   C->Scale((float)  1.0/nactivechannels_ECC);
-   B0->Scale((float) 1.0/nactivechannels_B0);
-   B1->Scale((float) 1.0/nactivechannels_B1);
-   B2->Scale((float) 1.0/nactivechannels_B2);
-   if (m_doIBL) {
-      IBL2D->Scale((float) 1.0/nactivechannels_IBL2D);
-      IBL3D->Scale((float) 1.0/nactivechannels_IBL3D);
-      IBL->Scale((float) 1.0/nactivechannels_IBL);
-   }
-}
-
-void PixelMon2DMaps::Fill2DMon(PixelMon2DMaps* oldmap)
-{
-   for (int x = 1; x <= DBMA->GetNbinsX(); x++) {
-      for (int y = 1; y <= DBMA->GetNbinsY(); y++) {
-         float content = oldmap->DBMA->GetBinContent(x, y);
-         DBMA->SetBinContent(x, y, content);
-         oldmap->DBMA->SetBinContent(x, y, 0);
-      }
-   }
-   for (int x = 1; x <= DBMC->GetNbinsX(); x++) {
-      for (int y = 1; y <= DBMC->GetNbinsY(); y++) {
-         float content = oldmap->DBMC->GetBinContent(x, y);
-         DBMC->SetBinContent(x, y, content);
-         oldmap->DBMC->SetBinContent(x, y, 0);
-      }
-   }
-   for (int x = 1; x <= A->GetNbinsX(); x++) {
-      for (int y = 1; y <= A->GetNbinsY(); y++) {
-         float content = oldmap->A->GetBinContent(x, y);
-         A->SetBinContent(x, y, content);
-         oldmap->A->SetBinContent(x, y, 0);
-      }
-   }
-   for (int x = 1; x <= C->GetNbinsX(); x++) {
-      for (int y = 1; y <= C->GetNbinsY(); y++) {
-         float content = oldmap->C->GetBinContent(x, y);
-         C->SetBinContent(x, y, content);
-         oldmap->C->SetBinContent(x, y, 0);
-      }
-   }
-   for (int x = 1; x <= B0->GetNbinsX(); x++) {
-      for (int y = 1; y <= B0->GetNbinsY(); y++) {
-         float content = oldmap->B0->GetBinContent(x, y);
-         B0->SetBinContent(x, y, content);
-         oldmap->B0->SetBinContent(x, y, 0);
-      }
-   }
-   for (int x = 1; x <= B1->GetNbinsX(); x++) {
-      for (int y = 1; y <= B1->GetNbinsY(); y++) {
-         float content = oldmap->B1->GetBinContent(x, y);
-         B1->SetBinContent(x, y, content);
-         oldmap->B1->SetBinContent(x, y, 0);
-      }
-   }
-   for (int x = 1; x <= B2->GetNbinsX(); x++) {
-      for (int y = 1; y <= B2->GetNbinsY(); y++) {
-         float content = oldmap->B2->GetBinContent(x, y);
-         B2->SetBinContent(x, y, content );
-         oldmap->B2->SetBinContent(x, y, 0);
-      }
-   }
-   if (m_doIBL) {
-      for (int x = 1; x <= IBL->GetNbinsX(); x++) {
-         for (int y = 1; y <= IBL->GetNbinsY(); y++) {
-            float content = oldmap->IBL->GetBinContent(x, y);
-            IBL->SetBinContent(x, y, content);
-            oldmap->IBL->SetBinContent(x, y, 0);
-         }
-      }
-      for (int x = 1; x <= IBL2D->GetNbinsX(); x++) {
-         for (int y = 1; y <= IBL2D->GetNbinsY(); y++) {
-            float content = oldmap->IBL2D->GetBinContent(x, y);
-            IBL2D->SetBinContent(x, y, content);
-            oldmap->IBL2D->SetBinContent(x, y, 0);
-         }
-      }
-      for (int x = 1; x <= IBL3D->GetNbinsX(); x++) {
-         for (int y = 1; y <= IBL3D->GetNbinsY(); y++) {
-            float content = oldmap->IBL3D->GetBinContent(x, y);
-            IBL3D->SetBinContent(x, y, content);
-            oldmap->IBL3D->SetBinContent(x, y, 0);
-         }
-      }
-   }
-}
-
-
-void PixelMon2DMaps::ScaleByNChannels(int nActive_IBL2D, int nActive_IBL3D, int nActive_B0, int nActive_B1, int nActive_B2, int nActive_ECA, int nActive_ECC, int nActive_DBMA, int nActive_DBMC)
-{
-   double nactivechannels_DBMA   = 1.0*26880*nActive_DBMA;
-   double nactivechannels_DBMC   = 1.0*26880*nActive_DBMC;
-   double nactivechannels_ECA   = 1.0*46080*nActive_ECA;
-   double nactivechannels_ECC   = 1.0*46080*nActive_ECC;
-   double nactivechannels_IBL2D = 1.0*26880*2*nActive_IBL2D;
-   double nactivechannels_IBL3D = 1.0*26880*nActive_IBL3D;
-   double nactivechannels_IBL   = nactivechannels_IBL2D + nactivechannels_IBL3D;
-   double nactivechannels_B0    = 1.0*46080*nActive_B0;
-   double nactivechannels_B1    = 1.0*46080*nActive_B1;
-   double nactivechannels_B2    = 1.0*46080*nActive_B2;
-
-   if(nActive_DBMA>0) DBMA->Scale((double) 1.0/nactivechannels_DBMA);
-   if(nActive_DBMC>0) DBMC->Scale((double) 1.0/nactivechannels_DBMC);
-   if(nActive_ECA>0)  A->Scale((double) 1.0/nactivechannels_ECA);
-   if(nActive_ECC>0)  C->Scale((double) 1.0/nactivechannels_ECC);
-   if(nActive_B0>0)   B0->Scale((double) 1.0/nactivechannels_B0);
-   if(nActive_B1>0)   B1->Scale((double) 1.0/nactivechannels_B1);
-   if(nActive_B2>0)   B2->Scale((double) 1.0/nactivechannels_B2);
-   if (m_doIBL) {
-      if(nActive_IBL2D>0) IBL2D->Scale((double) 1.0/nactivechannels_IBL2D);
-      if(nActive_IBL3D>0) IBL3D->Scale((double) 1.0/nactivechannels_IBL3D);
-      if(nActive_IBL3D>0 || nActive_IBL2D>0) IBL->Scale((double) 1.0/nactivechannels_IBL);
-   }
-}
-
-void PixelMon2DMaps::formatHist()
-{
-   const int ndisk = 3;
-   const int nphi_dbm  = 4;
-   const int nphi  = 48;
-   const char *disk[ndisk] = { "Disk 1", "Disk 2", "Disk 3" };
-   const char *phi_dbm[nphi_dbm] = { "M1","M2","M3","M4"};
-   const int nmod = 13;
-   const int nmodIBL2D = 12;
-   const int nmodIBL3D = 8;
-   const int nmodIBL = 32;
-   const char *mod[nmod] = { "M6C", "M5C", "M4C", "M3C", "M2C", "M1C", "M0","M1A", "M2A", "M3A", "M4A", "M5A", "M6A" } ;
-   const char *modIBL2D[nmodIBL2D] = { "M3_C6", "M3_C5", "M2_C4", "M1_C3", "M1_C2", "M1_C1", "M1_A1", "M1_A2", "M2_A3", "M2_A4", "M3_A5", "M3_A6" } ;
-   const char *modIBL3D[nmodIBL3D] = {"M4_C8_2","M4_C8_1","M4_C7_2","M4_C7_1","M4_A7_1","M4_A7_2","M4_A8_1","M4_A8_2"};
-   const char *modIBL[nmodIBL] = {"C8","","C7","",
-				  "C6","","C5","",
-				  "C4","","C3","",
-				  "C2","","C1","",
-				  "A1","","A2","",
-				  "A3","","A4","",
-				  "A5","","A6","",
-				  "A7","","A8",""};
-
-   const int nstaveb = 14;
-   const char *staveb[nstaveb] = {
-      "S01", "S02", "S03", "S04", "S05", "S06","S07",
-      "S08", "S09", "S10", "S11", "S12", "S13","S14"};
-   const int nstave0 = 22;
-   const char *stave0[nstave0] = {
-      "B11_S2", "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1",
-      "B03_S2", "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1",
-      "B06_S2", "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1",
-      "B09_S2","B10_S1", "B10_S2", "B11_S1" };
-   const int nstave1 = 38;
-   const char *stave1[nstave1] = {
-      "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2",
-      "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2",
-      "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2",
-      "B10_S1", "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2",
-      "B13_S1", "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2",
-      "B16_S1", "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2",
-      "B19_S1", "B19_S2" };
-   const int nstave2 = 52;
-   const char *stave2[nstave2] = {          
-      "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2", "B04_S1",
-      "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2", "B07_S1",
-      "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2", "B10_S1",
-      "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2", "B13_S1",
-      "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2", "B16_S1",
-      "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2", "B19_S1",
-      "B19_S2", "B20_S1", "B20_S2", "B21_S1", "B21_S2", "B22_S1",
-      "B22_S2", "B23_S1", "B23_S2", "B24_S1", "B24_S2",
-      "B25_S1", "B25_S2", "B26_S1", "B26_S2", "B01_S1" };
-   const char *nstaveA[nphi] = {
-      "B01_S2_M1", "B01_S2_M6", "B01_S2_M2", "B01_S2_M5", "B01_S2_M3", "B01_S2_M4", 
-      "B02_S1_M1", "B02_S1_M6", "B02_S1_M2", "B02_S1_M5", "B02_S1_M3", "B02_S1_M4", 
-      "B02_S2_M1", "B02_S2_M6", "B02_S2_M2", "B02_S2_M5", "B02_S2_M3", "B02_S2_M4", 
-      "B03_S1_M1", "B03_S1_M6", "B03_S1_M2", "B03_S1_M5", "B03_S1_M3", "B03_S1_M4", 
-      "B03_S2_M1", "B03_S2_M6", "B03_S2_M2", "B03_S2_M5", "B03_S2_M3", "B03_S2_M4", 
-      "B04_S1_M1", "B04_S1_M6", "B04_S1_M2", "B04_S1_M5", "B04_S1_M3", "B04_S1_M4", 
-      "B04_S2_M1", "B04_S2_M6", "B04_S2_M2", "B04_S2_M5", "B04_S2_M3", "B04_S2_M4", 
-      "B01_S1_M1", "B01_S1_M6", "B01_S1_M2", "B01_S1_M5", "B01_S1_M3", "B01_S1_M4"};
-   const char *nstaveC[nphi] = {
-      "B01_S2_M4", "B01_S2_M3", "B01_S2_M5", "B01_S2_M2", "B01_S2_M6", "B01_S2_M1", 
-      "B02_S1_M4", "B02_S1_M3", "B02_S1_M5", "B02_S1_M2", "B02_S1_M6", "B02_S1_M1", 
-      "B02_S2_M4", "B02_S2_M3", "B02_S2_M5", "B02_S2_M2", "B02_S2_M6", "B02_S2_M1", 
-      "B03_S1_M4", "B03_S1_M3", "B03_S1_M5", "B03_S1_M2", "B03_S1_M6", "B03_S1_M1", 
-      "B03_S2_M4", "B03_S2_M3", "B03_S2_M5", "B03_S2_M2", "B03_S2_M6", "B03_S2_M1", 
-      "B04_S1_M4", "B04_S1_M3", "B04_S1_M5", "B04_S1_M2", "B04_S1_M6", "B04_S1_M1", 
-      "B04_S2_M4", "B04_S2_M3", "B04_S2_M5", "B04_S2_M2", "B04_S2_M6", "B04_S2_M1", 
-      "B01_S1_M4", "B01_S1_M3", "B01_S1_M5", "B01_S1_M2", "B01_S1_M6", "B01_S1_M1"};
-
-   for (int i = 0; i < nphi; i++) {
-      A->GetYaxis()->SetBinLabel(i + 1, nstaveA[i]);
-      C->GetYaxis()->SetBinLabel(i + 1, nstaveC[i]);
-   }
-   for (int i = 0; i < nphi_dbm; i++) {
-      DBMA->GetYaxis()->SetBinLabel(i + 1, phi_dbm[i]);
-      DBMC->GetYaxis()->SetBinLabel(i + 1, phi_dbm[i]);
-   }
-   for (int i = 0; i < ndisk; i++) {
-      A->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-      C->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-      DBMA->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-      DBMC->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-   }
-   for (int i = 0; i < nmod; i++) {
-      B0->GetXaxis()->SetBinLabel(i + 1, mod[i]);  // bin 0 is underflow
-      B1->GetXaxis()->SetBinLabel(i + 1, mod[i]);
-      B2->GetXaxis()->SetBinLabel(i + 1, mod[i]);
-   }
-
-   if (m_doIBL) {
-      for (int i = 0; i < nmodIBL; i++) IBL->GetXaxis()->SetBinLabel(i + 1, modIBL[i]);
-      for (int i = 0; i < nstaveb; i++) IBL->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
-      for (int i = 0; i < nmodIBL2D; i++) IBL2D->GetXaxis()->SetBinLabel(i + 1, modIBL2D[i]);
-      for (int i = 0; i < nstaveb; i++) IBL2D->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
-      for (int i = 0; i < nmodIBL3D; i++) IBL3D->GetXaxis()->SetBinLabel(i + 1, modIBL3D[i]);
-      for (int i = 0; i < nstaveb; i++) IBL3D->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
-   }
-
-   for (int i = 0; i < nstave0; i++) {
-      B0->GetYaxis()->SetBinLabel(i + 1, stave0[i]); 
-   }
-   for (int i = 0; i < nstave1; i++) {
-      B1->GetYaxis()->SetBinLabel(i + 1, stave1[i]); 
-   }
-   for (int i = 0; i < nstave2; i++) {
-      B2->GetYaxis()->SetBinLabel(i + 1, stave2[i]); 
-   }
-
-   //Make the text smaller
-   if (m_doIBL) {
-      IBL2D->GetYaxis()->SetLabelSize(0.03);
-      IBL3D->GetYaxis()->SetLabelSize(0.03);
-      IBL->GetYaxis()->SetLabelSize(0.03);
-   }
-   B0->GetYaxis()->SetLabelSize(0.03);
-   B1->GetYaxis()->SetLabelSize(0.03);
-   B2->GetYaxis()->SetLabelSize(0.03);
-   A->GetYaxis()->SetLabelSize(0.02);
-   C->GetYaxis()->SetLabelSize(0.02);
-   DBMA->GetYaxis()->SetLabelSize(0.02);
-   DBMC->GetYaxis()->SetLabelSize(0.02);
-   //Move the lable so you can read it
-   if (m_doIBL) {
-      IBL2D->GetYaxis()->SetTitleOffset(1.35);
-      IBL3D->GetYaxis()->SetTitleOffset(1.35);
-      IBL->GetYaxis()->SetTitleOffset(1.35);
-   }
-   B0->GetYaxis()->SetTitleOffset(1.35);
-   B1->GetYaxis()->SetTitleOffset(1.35);
-   B2->GetYaxis()->SetTitleOffset(1.35);
-   A->GetYaxis()->SetTitleOffset(1.35);
-   C->GetYaxis()->SetTitleOffset(1.35);
-   DBMA->GetYaxis()->SetTitleOffset(1.35);
-   DBMC->GetYaxis()->SetTitleOffset(1.35);
-   //put histograms in the easier to read colz format
-   if (m_doIBL) {
-      IBL2D->SetOption("colz");
-      IBL3D->SetOption("colz");
-      IBL->SetOption("colz");
-   }
-   B0->SetOption("colz");
-   B1->SetOption("colz");
-   B2->SetOption("colz");
-   A->SetOption("colz");
-   C->SetOption("colz");
-   DBMA->SetOption("colz");
-   DBMC->SetOption("colz");
-   //force the minimum to be 0 so you can spot empty blocks easily
-   if (m_doIBL) {
-      IBL2D->SetMinimum(0.);
-      IBL3D->SetMinimum(0.);
-      IBL->SetMinimum(0.);
-   }
-   B0->SetMinimum(0.);
-   B1->SetMinimum(0.);
-   B2->SetMinimum(0.);
-   A->SetMinimum(0.);
-   C->SetMinimum(0.);
-   DBMA->SetMinimum(0.);
-   DBMC->SetMinimum(0.);
-   //Remvoe the stats box because it's in the way
-   if (m_doIBL) {
-      IBL2D->SetStats(0.);
-      IBL3D->SetStats(0.);
-      IBL->SetStats(0.);
-   }
-   B0->SetStats(0.);
-   B1->SetStats(0.);
-   B2->SetStats(0.);
-   A->SetStats(0.);
-   C->SetStats(0.);
-   DBMA->SetStats(0.);
-   DBMC->SetStats(0.);
-
-}
-
-StatusCode PixelMon2DMaps::regHist(ManagedMonitorToolBase::MonGroup &group)
-{
-  StatusCode sc = StatusCode::SUCCESS;
-  if (m_doIBL) {
-     if (group.regHist(IBL2D).isFailure()) sc = StatusCode::FAILURE;
-     if (group.regHist(IBL3D).isFailure()) sc = StatusCode::FAILURE;
-     if (group.regHist(IBL).isFailure()) sc = StatusCode::FAILURE;
-  }
-  if (group.regHist(B0).isFailure()) sc = StatusCode::FAILURE;
-  if (group.regHist(B1).isFailure()) sc = StatusCode::FAILURE;
-  if (group.regHist(B2).isFailure()) sc = StatusCode::FAILURE;
-  if (group.regHist(A).isFailure()) sc = StatusCode::FAILURE;
-  if (group.regHist(C).isFailure()) sc = StatusCode::FAILURE;
-  if (group.regHist(DBMA).isFailure()) sc = StatusCode::FAILURE;
-  if (group.regHist(DBMC).isFailure()) sc = StatusCode::FAILURE;
-  return sc;
-}
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DMapsLW.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DMapsLW.cxx
index 3f8216c77022b417e73bd04d786a8050ee2dccfe..4ddabf175e1cbb804c8eb75a7d7eda4e5a6d4b65 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DMapsLW.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DMapsLW.cxx
@@ -7,53 +7,92 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "PixelMonitoring/PixelMon2DMapsLW.h"
+#include "PixelMonitoring/Components.h"
 #include "InDetIdentifier/PixelID.h"
-//#include "TH2I.h"
-#include "TH2F.h"
 #include "LWHists/TH2F_LW.h"
 #include "GaudiKernel/StatusCode.h"     
 #include <string.h>
 
-PixelMon2DMapsLW::PixelMon2DMapsLW(std::string name, std::string title, bool doIBL, bool errorHist) : m_doIBL(doIBL), m_errorHist(errorHist)
+PixelMon2DMapsLW::PixelMon2DMapsLW(std::string name, std::string title, const PixMon::HistConf& config, bool copy2DFEval)
+    : IBL(nullptr),
+      IBL2D(nullptr),
+      IBL3D(nullptr),
+      B0(nullptr),
+      B1(nullptr),
+      B2(nullptr),
+      A(nullptr),
+      C(nullptr),
+      DBMA(nullptr),
+      DBMC(nullptr),
+      m_config(config),
+      m_copy2DFEval(copy2DFEval)
 {
    std::string setatext = ";shifted eta index of module";
    std::string etatext = ";eta index of module";
    std::string phitext = ";phi index of module";
    std::string disktext = ";disk number";
+   std::string layertext = ";layer number";
 
-   if (m_doIBL && !m_errorHist) {
-      IBL3D = TH2F_LW::create((name+"_IBL3D").c_str(), (title + ", IBL 3D modules " + etatext + phitext).c_str(),8,-.5,7.5,14,-0.5,13.5);
-      IBL2D = TH2F_LW::create((name+"_IBL2D").c_str(), (title + ", IBL planar modules " + setatext + phitext).c_str(),12,-6.5,5.5,14,-0.5,13.5);
-      IBL   = TH2F_LW::create((name+"_IBL").c_str(),   (title + ", IBL " + setatext + phitext).c_str(),32,-16.5,15.5,14,-0.5,13.5);
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kIBL)) {
+      IBL = TH2F_LW::create((name+"_IBL").c_str(), (title + ", IBL " + setatext + phitext).c_str(),
+                            PixMon::kNumModulesIBL, -16.5, -16.5 + PixMon::kNumModulesIBL,
+                            PixMon::kNumStavesIBL, -0.5, -0.5 + PixMon::kNumStavesIBL);
    }
-   B0 = TH2F_LW::create((name+"_B0").c_str(),       (title + ", B0 " + etatext + phitext).c_str(),13,-6.5,6.5,22,-0.5,21.5);
-   B1 = TH2F_LW::create((name+"_B1").c_str(),       (title + ", B1 " + etatext + phitext).c_str(),13,-6.5,6.5,38,-0.5,37.5);
-   B2 = TH2F_LW::create((name+"_B2").c_str(),       (title + ", B2 " + etatext + phitext).c_str(),13,-6.5,6.5,52,-0.5,51.5);
-   A  = TH2F_LW::create((name+"_ECA" ).c_str(),     (title + ", ECA " + disktext + phitext).c_str(),3,-0.5,2.5,48,-0.5,47.5);
-   C  = TH2F_LW::create((name+"_ECC" ).c_str(),     (title + ", ECC " + disktext + phitext).c_str(),3,-0.5,2.5,48,-0.5,47.5);
-   if (!m_errorHist) {
-      DBMA = TH2F_LW::create((name+"_DBMA" ).c_str(),  (title + ", DBMA " + disktext + phitext).c_str(),3,-0.5,2.5,4,-0.5,3.5);
-      DBMC = TH2F_LW::create((name+"_DBMC" ).c_str(),  (title + ", DBMC " + disktext + phitext).c_str(),3,-0.5,2.5,4,-0.5,3.5);
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kIBL2D)) {
+      IBL2D = TH2F_LW::create((name+"_IBL2D").c_str(), (title + ", IBL planar modules " + setatext + phitext).c_str(),
+                              PixMon::kNumModulesIBL2D, -6.5, -6.5 + PixMon::kNumModulesIBL2D,
+                              PixMon::kNumStavesIBL, -0.5, -0.5 + PixMon::kNumStavesIBL);
    }
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kIBL3D)) {
+      IBL3D = TH2F_LW::create((name+"_IBL3D").c_str(), (title + ", IBL 3D modules " + etatext + phitext).c_str(),
+                              PixMon::kNumModulesIBL3D, -0.5, -0.5 + PixMon::kNumModulesIBL3D,
+                              PixMon::kNumStavesIBL, -0.5, -0.5 + PixMon::kNumStavesIBL);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB0)) {
+     B0 = TH2F_LW::create((name+"_B0").c_str(), (title + ", B0 " + etatext + phitext).c_str(),
+                          PixMon::kNumModulesBarrel, -6.5, -6.5 + PixMon::kNumModulesBarrel,
+                          PixMon::kNumStavesL0, -0.5, -0.5 + PixMon::kNumStavesL0);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB1)) {
+     B1 = TH2F_LW::create((name+"_B1").c_str(), (title + ", B1 " + etatext + phitext).c_str(),
+                          PixMon::kNumModulesBarrel, -6.5, -6.5 + PixMon::kNumModulesBarrel,
+                          PixMon::kNumStavesL1, -0.5, -0.5 + PixMon::kNumStavesL1);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB2)) {
+     B2 = TH2F_LW::create((name+"_B2").c_str(), (title + ", B2 " + etatext + phitext).c_str(),
+                          PixMon::kNumModulesBarrel, -6.5, -6.5 + PixMon::kNumModulesBarrel,
+                          PixMon::kNumStavesL2, -0.5, -0.5 + PixMon::kNumStavesL2);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kECA)) {
+     A  = TH2F_LW::create((name+"_ECA" ).c_str(), (title + ", ECA " + disktext + phitext).c_str(),
+                          PixMon::kNumLayersDisk, -0.5, -0.5 + PixMon::kNumLayersDisk,
+                          PixMon::kNumModulesDisk, -0.5, -0.5 + PixMon::kNumModulesDisk);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kECC)) {
+     C  = TH2F_LW::create((name+"_ECC" ).c_str(), (title + ", ECC " + disktext + phitext).c_str(),
+                          PixMon::kNumLayersDisk, -0.5, -0.5 + PixMon::kNumLayersDisk,
+                          PixMon::kNumModulesDisk, -0.5, -0.5 + PixMon::kNumModulesDisk);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kDBMA)) {
+     DBMA = TH2F_LW::create((name+"_DBMA" ).c_str(), (title + ", DBMA " + layertext + phitext).c_str(),
+                            PixMon::kNumLayersDBM, -0.5, -0.5 + PixMon::kNumLayersDBM,
+                            PixMon::kNumModulesDBM, -0.5, -0.5 + PixMon::kNumModulesDBM);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kDBMC)) {
+     DBMC = TH2F_LW::create((name+"_DBMC" ).c_str(), (title + ", DBMC " + layertext + phitext).c_str(),
+                            PixMon::kNumLayersDBM, -0.5, -0.5 + PixMon::kNumLayersDBM,
+                            PixMon::kNumModulesDBM, -0.5, -0.5 + PixMon::kNumModulesDBM);
+   }
+
+   m_histograms = {IBL, IBL2D, IBL3D, B0, B1, B2, A, C, DBMA, DBMC};
 
    formatHist();
 }
 
 PixelMon2DMapsLW::~PixelMon2DMapsLW()
 {
-   if (m_doIBL && !m_errorHist) {
-      LWHist::safeDelete(IBL3D);
-      LWHist::safeDelete(IBL2D);
-      LWHist::safeDelete(IBL);
-   }
-   LWHist::safeDelete(B0);
-   LWHist::safeDelete(B1);
-   LWHist::safeDelete(B2);
-   LWHist::safeDelete(A);
-   LWHist::safeDelete(C);
-   if (!m_errorHist) {
-      LWHist::safeDelete(DBMA);
-      LWHist::safeDelete(DBMC);
+   for (auto& hist : m_histograms) {
+      if (hist) LWHist::safeDelete(hist);
    }
 }
 
@@ -63,37 +102,37 @@ void PixelMon2DMapsLW::Fill(Identifier &id, const PixelID* pixID)
    const int pm  = pixID->phi_module(id);
    int ld = pixID->layer_disk(id);
 
-   if (bec == 2) A->Fill(ld, pm); 
-   else if (bec == -2) C->Fill(ld, pm);
-   else if (bec == 4 && !m_errorHist) DBMA->Fill(ld, pm);
-   else if (bec == -4 && !m_errorHist) DBMC->Fill(ld, pm);
+   if (bec == 2 && A) A->Fill(ld, pm);
+   else if (bec == -2 && C) C->Fill(ld, pm);
+   else if (bec == 4 && DBMA) DBMA->Fill(ld, pm);
+   else if (bec == -4 && DBMC) DBMC->Fill(ld, pm);
    else if (bec == 0) {
       if (m_doIBL) ld--;
       const int em = pixID->eta_module(id);
-      if (ld == 0) {
-	 B0->Fill(em, pm);
-      } else if (ld == 1) {
-	 B1->Fill(em,pm);
-      } else if (ld == 2) {
-	 B2->Fill(em,pm);
-      } else if (ld == -1 && m_doIBL && !m_errorHist) {
-	 int feid = 0;
-	 int emf = 0;
+      if (ld == 0 && B0) {
+         B0->Fill(em, pm);
+      } else if (ld == 1 && B1) {
+         B1->Fill(em,pm);
+      } else if (ld == 2 && B2) {
+         B2->Fill(em,pm);
+      } else if (ld == -1 && IBL) {
+         int feid = 0;
+         int emf = 0;
          bool copy = false;
-	 if (em < 6 && em > -7) {
+         if (em < 6 && em > -7) {
             if (pixID->eta_index(id) >= 80) feid = 1;
             emf = 2 * em + feid; 
-            IBL2D->Fill(em, pm);
+            if (IBL2D) IBL2D->Fill(em, pm);
             copy = true;
-	 } else if (em < -6) {
+         } else if (em < -6) {
             emf = em - 6;
-            IBL3D->Fill(em + 10, pm); 
-	 } else {
+            if (IBL3D) IBL3D->Fill(em + 10, pm);
+         } else {
             emf = em + 6;
-            IBL3D->Fill(em - 2,pm); 
-	 }
-	 IBL->Fill(emf, pm);
-         if (copy) IBL->Fill(emf + 1, pm);
+            if (IBL3D) IBL3D->Fill(em - 2, pm);
+         }
+         IBL->Fill(emf, pm);
+         if (m_copy2DFEval && copy) IBL->Fill(emf + 1, pm);
       }
    }
 }
@@ -104,89 +143,50 @@ void PixelMon2DMapsLW::WeightingFill(Identifier &id, const PixelID* pixID, float
    const int pm  = pixID->phi_module(id);
    int ld = pixID->layer_disk(id);
 
-   if (bec == 2) A->Fill(ld, pm, weight);
-   else if (bec == -2) C->Fill(ld, pm, weight);
-   else if (bec == 4 && !m_errorHist) DBMA->Fill(ld, pm, weight);
-   else if (bec == -4 && !m_errorHist) DBMC->Fill(ld, pm, weight);
-
+   if (bec == 2 && A) A->Fill(ld, pm, weight);
+   else if (bec == -2 && C) C->Fill(ld, pm, weight);
+   else if (bec == 4 && DBMA) DBMA->Fill(ld, pm, weight);
+   else if (bec == -4 && DBMC) DBMC->Fill(ld, pm, weight);
    else if (bec == 0) {
       if (m_doIBL) ld--;
       const int em  = pixID->eta_module(id);
-      if (ld == 0) { 
+      if (ld == 0 && B0) {
          B0->Fill(em, pm, weight);
-      } else if (ld == 1) { 
+      } else if (ld == 1 && B1) {
          B1->Fill(em, pm, weight);
-      } else if (ld == 2) { 
+      } else if (ld == 2 && B2) {
          B2->Fill(em, pm, weight);
-      } else if (ld == -1 && m_doIBL && !m_errorHist) {
+      } else if (ld == -1 && IBL) {
          int feid = 0;
          int emf = 0;
          if (em < 6 && em > -7) {
             if (pixID->eta_index(id) >= 80) feid = 1;
             emf = 2 * em + feid; 
-            IBL2D->Fill(em, pm, weight);
+            if (IBL2D) IBL2D->Fill(em, pm, weight);
          } else if (em < -6) {
             emf = em - 6;
-            IBL3D->Fill(em + 10, pm, weight);
+            if (IBL3D) IBL3D->Fill(em + 10, pm, weight);
          } else {
             emf = em + 6;
-            IBL3D->Fill(em - 2, pm, weight);
+            if (IBL3D) IBL3D->Fill(em - 2, pm, weight);
          }
          IBL->Fill(emf, pm, weight);
       }
    }
 }   
 
-void PixelMon2DMapsLW::FillNormalized(PixelMon2DMapsLW* old, int nevent)
+void PixelMon2DMapsLW::Fill2DMon(PixelMon2DMapsLW* oldmap)
 {
-   double nactivechannels_ECA   = 1.0*nevent;
-   double nactivechannels_ECC   = 1.0*nevent;
-   double nactivechannels_IBL2D = 1.0*nevent;
-   double nactivechannels_IBL3D = 1.0*nevent;
-   double nactivechannels_IBL   = nactivechannels_IBL2D + nactivechannels_IBL3D;
-   double nactivechannels_B0    = 1.0*nevent;
-   double nactivechannels_B1    = 1.0*nevent;
-   double nactivechannels_B2    = 1.0*nevent;
-
-   for (unsigned int x = 1; x <= A->GetXaxis()->GetNbins(); x++) {
-      for (unsigned int y = 1; y <= A->GetYaxis()->GetNbins(); y++) {
-         A->SetBinContent(x, y, old->A->GetBinContent(x, y)/nactivechannels_ECA);
-      }
-   }
-   for (unsigned int x = 1; x <= C->GetXaxis()->GetNbins(); x++) {
-      for (unsigned int y = 1; y <= C->GetYaxis()->GetNbins(); y++) {
-         C->SetBinContent(x, y, old->C->GetBinContent(x, y)/nactivechannels_ECC);
-      }
-   }
-   for (unsigned int x = 1; x <= B0->GetXaxis()->GetNbins(); x++) {
-      for (unsigned int y = 1; y <= B0->GetYaxis()->GetNbins(); y++) {
-         B0->SetBinContent(x, y, old->B0->GetBinContent(x, y)/nactivechannels_B0);
-      }
-   }
-   for (unsigned int x = 1; x <= B1->GetXaxis()->GetNbins(); x++) {
-      for (unsigned int y = 1; y <= B1->GetYaxis()->GetNbins(); y++) {
-         B1->SetBinContent(x, y, old->B1->GetBinContent(x, y)/nactivechannels_B1);
-      }
-   }
-   for (unsigned int x = 1; x <= B2->GetXaxis()->GetNbins(); x++) {
-      for (unsigned int y = 1; y <= B2->GetYaxis()->GetNbins(); y++) {
-         B2->SetBinContent(x, y, old->B2->GetBinContent(x, y)/nactivechannels_B2);
-      }
-   }
-   if (m_doIBL && !m_errorHist) {
-      for (unsigned int x = 1; x <= IBL->GetXaxis()->GetNbins(); x++) {
-         for (unsigned int y = 1; y <= IBL->GetYaxis()->GetNbins(); y++) {
-            IBL->SetBinContent(x, y, old->IBL->GetBinContent(x, y)/nactivechannels_IBL);
-         }
-      }
-      for (unsigned int x = 1; x <= IBL2D->GetXaxis()->GetNbins(); x++) {
-         for (unsigned int y = 1; y <= IBL2D->GetYaxis()->GetNbins(); y++) {
-            IBL2D->SetBinContent(x, y, old->IBL2D->GetBinContent(x, y)/nactivechannels_IBL2D);
-         }
-      }
-      for (unsigned int x = 1; x <= IBL3D->GetXaxis()->GetNbins(); x++) {
-         for (unsigned int y = 1; y <= IBL3D->GetYaxis()->GetNbins(); y++) {
-            IBL3D->SetBinContent(x, y, old->IBL3D->GetBinContent(x, y)/nactivechannels_IBL3D);
+   for (unsigned int index = 0; index < m_histograms.size(); ++index) {
+      auto& hist = m_histograms.at(index);
+      auto& oldhist = oldmap->m_histograms.at(index);
+      if (!hist) continue;
+      if (!oldhist) continue;
+      for (unsigned int x = 1; x <= hist->GetNbinsX(); ++x) {
+         for (unsigned int y = 1; y <= hist->GetNbinsY(); ++y) {
+            const auto content = oldhist->GetBinContent(x, y);
+            hist->SetBinContent(x, y, content);
+            oldhist->SetBinContent(x, y, 0);
          }
       }
    }
@@ -194,188 +194,87 @@ void PixelMon2DMapsLW::FillNormalized(PixelMon2DMapsLW* old, int nevent)
 
 void PixelMon2DMapsLW::formatHist()
 {
-   const int ndisk = 3;
-   const int nphi  = 48;
-   const int nphi_dbm  = 4;
-   const char *disk[ndisk] = { "Disk 1", "Disk 2", "Disk 3" };
-   const char *phi_dbm[nphi_dbm] = { "M1","M2","M3","M4"};
-   const int nmod = 13;
-   const int nmodIBL2D = 12;
-   const int nmodIBL3D = 8;
-   const int nmodIBL = 32;
-   const char *mod[nmod] = { "M6C", "M5C", "M4C", "M3C", "M2C", "M1C", "M0","M1A", "M2A", "M3A", "M4A", "M5A", "M6A" } ;
-   const char *modIBL2D[nmodIBL2D] = { "M3_C6", "M3_C5", "M2_C4", "M1_C3", "M1_C2", "M1_C1", "M1_A1", "M1_A2", "M2_A3", "M2_A4", "M3_A5", "M3_A6" } ;
-   const char *modIBL3D[nmodIBL3D] = {"M4_C8_2","M4_C8_1","M4_C7_2","M4_C7_1","M4_A7_1","M4_A7_2","M4_A8_1","M4_A8_2"};
-   const char *modIBL[nmodIBL] = {"C8","","C7","",
-				  "C6","","C5","",
-				  "C4","","C3","",
-				  "C2","","C1","",
-				  "A1","","A2","",
-				  "A3","","A4","",
-				  "A5","","A6","",
-				  "A7","","A8",""};
-   const int nstaveb = 14;
-   const char *staveb[nstaveb] = {
-      "S01", "S02", "S03", "S04", "S05", "S06","S07",
-      "S08", "S09", "S10", "S11", "S12", "S13","S14"};
-   const int nstave0 = 22;
-   const char *stave0[nstave0] = {
-      "B11_S2", "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1",
-      "B03_S2", "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1",
-      "B06_S2", "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1",
-      "B09_S2","B10_S1", "B10_S2", "B11_S1" };
-   const int nstave1 = 38;
-   const char *stave1[nstave1] = {
-      "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2",
-      "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2",
-      "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2",
-      "B10_S1", "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2",
-      "B13_S1", "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2",
-      "B16_S1", "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2",
-      "B19_S1", "B19_S2" };
-   const int nstave2 = 52;
-   const char *stave2[nstave2] = {          
-      "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2", "B04_S1",
-      "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2", "B07_S1",
-      "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2", "B10_S1",
-      "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2", "B13_S1",
-      "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2", "B16_S1",
-      "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2", "B19_S1",
-      "B19_S2", "B20_S1", "B20_S2", "B21_S1", "B21_S2", "B22_S1",
-      "B22_S2", "B23_S1", "B23_S2", "B24_S1", "B24_S2", "B25_S1",
-      "B25_S2", "B26_S1", "B26_S2", "B01_S1" };
-   const char *nstaveA[nphi] = {
-      "B01_S2_M1", "B01_S2_M6", "B01_S2_M2", "B01_S2_M5", "B01_S2_M3", "B01_S2_M4", 
-      "B02_S1_M1", "B02_S1_M6", "B02_S1_M2", "B02_S1_M5", "B02_S1_M3", "B02_S1_M4", 
-      "B02_S2_M1", "B02_S2_M6", "B02_S2_M2", "B02_S2_M5", "B02_S2_M3", "B02_S2_M4", 
-      "B03_S1_M1", "B03_S1_M6", "B03_S1_M2", "B03_S1_M5", "B03_S1_M3", "B03_S1_M4", 
-      "B03_S2_M1", "B03_S2_M6", "B03_S2_M2", "B03_S2_M5", "B03_S2_M3", "B03_S2_M4", 
-      "B04_S1_M1", "B04_S1_M6", "B04_S1_M2", "B04_S1_M5", "B04_S1_M3", "B04_S1_M4", 
-      "B04_S2_M1", "B04_S2_M6", "B04_S2_M2", "B04_S2_M5", "B04_S2_M3", "B04_S2_M4", 
-      "B01_S1_M1", "B01_S1_M6", "B01_S1_M2", "B01_S1_M5", "B01_S1_M3", "B01_S1_M4"};
-   const char *nstaveC[nphi] = {
-      "B01_S2_M4", "B01_S2_M3", "B01_S2_M5", "B01_S2_M2", "B01_S2_M6", "B01_S2_M1", 
-      "B02_S1_M4", "B02_S1_M3", "B02_S1_M5", "B02_S1_M2", "B02_S1_M6", "B02_S1_M1", 
-      "B02_S2_M4", "B02_S2_M3", "B02_S2_M5", "B02_S2_M2", "B02_S2_M6", "B02_S2_M1", 
-      "B03_S1_M4", "B03_S1_M3", "B03_S1_M5", "B03_S1_M2", "B03_S1_M6", "B03_S1_M1", 
-      "B03_S2_M4", "B03_S2_M3", "B03_S2_M5", "B03_S2_M2", "B03_S2_M6", "B03_S2_M1", 
-      "B04_S1_M4", "B04_S1_M3", "B04_S1_M5", "B04_S1_M2", "B04_S1_M6", "B04_S1_M1", 
-      "B04_S2_M4", "B04_S2_M3", "B04_S2_M5", "B04_S2_M2", "B04_S2_M6", "B04_S2_M1", 
-      "B01_S1_M4", "B01_S1_M3", "B01_S1_M5", "B01_S1_M2", "B01_S1_M6", "B01_S1_M1"};
-
-   for (int i = 0; i < nphi; i++) {
-      A->GetYaxis()->SetBinLabel(i + 1, nstaveA[i]);
-      C->GetYaxis()->SetBinLabel(i + 1, nstaveC[i]);
-   }
-   if (!m_errorHist) {
-      for (int i = 0; i < nphi_dbm; i++) {
-         DBMA->GetYaxis()->SetBinLabel(i + 1, phi_dbm[i]);
-         DBMC->GetYaxis()->SetBinLabel(i + 1, phi_dbm[i]);
+   if (A && C) {
+      for (unsigned int i = 0; i < PixMon::kNumModulesDisk; ++i) {
+         A->GetYaxis()->SetBinLabel(i + 1, PixMon::ModulesECA.at(i).c_str());
+         C->GetYaxis()->SetBinLabel(i + 1, PixMon::ModulesECC.at(i).c_str());
       }
-      for (int i = 0; i < ndisk; i++) {
-         DBMA->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-         DBMC->GetXaxis()->SetBinLabel(i + 1, disk[i]);
+      for (unsigned int i = 0; i < PixMon::kNumLayersDisk; ++i) {
+         A->GetXaxis()->SetBinLabel(i + 1, PixMon::LayersDisk.at(i).c_str());
+         C->GetXaxis()->SetBinLabel(i + 1, PixMon::LayersDisk.at(i).c_str());
       }
    }
-   for (int i = 0; i < ndisk; i++) {
-      A->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-      C->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-   }
-   for (int i = 0; i < nmod; i++) {
-      B0->GetXaxis()->SetBinLabel(i + 1, mod[i]);  // bin 0 is underflow
-      B1->GetXaxis()->SetBinLabel(i + 1, mod[i]);
-      B2->GetXaxis()->SetBinLabel(i + 1, mod[i]);
-   }
-   if (m_doIBL && !m_errorHist) {
-      for (int i = 0; i < nmodIBL; i++) {
-         IBL->GetXaxis()->SetBinLabel(i + 1, modIBL[i]);
+   if (DBMA && DBMC) {
+      for (unsigned int i = 0; i < PixMon::kNumModulesDBM; ++i) {
+         DBMA->GetYaxis()->SetBinLabel(i + 1, PixMon::ModulesDBM.at(i).c_str());
+         DBMC->GetYaxis()->SetBinLabel(i + 1, PixMon::ModulesDBM.at(i).c_str());
       }
-      for (int i = 0; i < nstaveb; i++) {
-         IBL->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
+      for (unsigned int i = 0; i < PixMon::kNumLayersDBM; ++i) {
+         DBMA->GetXaxis()->SetBinLabel(i + 1, PixMon::LayersDBM.at(i).c_str());
+         DBMC->GetXaxis()->SetBinLabel(i + 1, PixMon::LayersDBM.at(i).c_str());
       }
-      for (int i = 0; i < nmodIBL2D; i++){
-	 IBL2D->GetXaxis()->SetBinLabel(i + 1, modIBL2D[i]);
+   }
+   if (B0 && B1 && B2) {
+      for (unsigned int i = 0; i < PixMon::kNumModulesBarrel; ++i) {
+         B0->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesBarrel.at(i).c_str());
+         B1->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesBarrel.at(i).c_str());
+         B2->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesBarrel.at(i).c_str());
       }
-      for (int i = 0; i < nstaveb; i++) {
-	 IBL2D->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
+      for (unsigned int i = 0; i < PixMon::kNumStavesL0; ++i) {
+         B0->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesL0.at(i).c_str());
       }
-      for (int i = 0; i < nmodIBL3D; i++) {
-	 IBL3D->GetXaxis()->SetBinLabel(i + 1, modIBL3D[i]);
+      for (unsigned int i = 0; i < PixMon::kNumStavesL1; ++i) {
+         B1->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesL1.at(i).c_str());
       }
-      for (int i = 0; i < nstaveb; i++) {
-	 IBL3D->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
+      for (unsigned int i = 0; i < PixMon::kNumStavesL2; ++i) {
+         B2->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesL2.at(i).c_str());
       }
    }
-
-   for (int i = 0; i < nstave0; i++) {
-      B0->GetYaxis()->SetBinLabel(i + 1, stave0[i]); 
-   }
-   for (int i = 0; i < nstave1; i++) {
-      B1->GetYaxis()->SetBinLabel(i + 1, stave1[i]); 
-   }
-   for (int i = 0; i < nstave2; i++) {
-      B2->GetYaxis()->SetBinLabel(i + 1, stave2[i]); 
+   if (IBL) {
+      for (unsigned int i = 0; i < PixMon::kNumModulesIBL; ++i) {
+         IBL->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesIBL.at(i).c_str());
+      }
+      for (unsigned int i = 0; i < PixMon::kNumStavesIBL; ++i) {
+         IBL->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesIBL.at(i).c_str());
+      }
    }
-
-   if (m_doIBL && !m_errorHist) {
-      IBL->GetYaxis()->SetLabelSize(0.03);
-      IBL2D->GetYaxis()->SetLabelSize(0.03);
-      IBL3D->GetYaxis()->SetLabelSize(0.03);
-      IBL->SetOption("colz");
-      IBL2D->SetOption("colz");
-      IBL3D->SetOption("colz");
-      IBL->SetMinimum(0.);
-      IBL2D->SetMinimum(0.);
-      IBL3D->SetMinimum(0.);
+   if (IBL2D && IBL3D) {
+      for (unsigned int i = 0; i < PixMon::kNumModulesIBL2D; ++i){
+         IBL2D->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesIBL2D.at(i).c_str());
+      }
+      for (unsigned int i = 0; i < PixMon::kNumModulesIBL3D; ++i) {
+         IBL3D->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesIBL3D.at(i).c_str());
+      }
+      for (unsigned int i = 0; i < PixMon::kNumStavesIBL; ++i) {
+         IBL2D->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesIBL.at(i).c_str());
+         IBL3D->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesIBL.at(i).c_str());
+      }
    }
 
-   if (!m_errorHist) {
-      DBMA->GetYaxis()->SetLabelSize(0.02);
-      DBMC->GetYaxis()->SetLabelSize(0.02);
-      DBMA->SetOption("colz");
-      DBMC->SetOption("colz");
-      DBMA->SetMinimum(0.);
-      DBMC->SetMinimum(0.);
+   for (auto& hist : m_histograms) {
+      if (!hist) continue;
+      if (hist == A || hist == C) {
+         hist->GetYaxis()->SetLabelSize(0.02);
+      } else {
+         hist->GetYaxis()->SetLabelSize(0.03);
+      }
+      hist->SetOption("colz");
+      hist->SetMinimum(0.);
    }
-
-   //Make the text smaller
-   B0->GetYaxis()->SetLabelSize(0.03);
-   B1->GetYaxis()->SetLabelSize(0.03);
-   B2->GetYaxis()->SetLabelSize(0.03);
-   A->GetYaxis()->SetLabelSize(0.02);
-   C->GetYaxis()->SetLabelSize(0.02);
-   //put histograms in the easier to read colz format
-   B0->SetOption("colz");
-   B1->SetOption("colz");
-   B2->SetOption("colz");
-   A->SetOption("colz");
-   C->SetOption("colz");
-   //force the minimum to be 0 so you can spot empty blocks easily
-   B0->SetMinimum(0.);
-   B1->SetMinimum(0.);
-   B2->SetMinimum(0.);
-   A->SetMinimum(0.);
-   C->SetMinimum(0.);
 }
 
 StatusCode PixelMon2DMapsLW::regHist(ManagedMonitorToolBase::MonGroup &group)
 {
    StatusCode sc = StatusCode::SUCCESS;
 
-   if(m_doIBL && !m_errorHist){
-      if (group.regHist(IBL).isFailure()) sc = StatusCode::FAILURE;
-      if (group.regHist(IBL2D).isFailure()) sc = StatusCode::FAILURE;
-      if (group.regHist(IBL3D).isFailure()) sc = StatusCode::FAILURE;
-   }
-   if (group.regHist(B0).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(B1).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(B2).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(A).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(C).isFailure()) sc = StatusCode::FAILURE;
-   if (!m_errorHist) {
-      if (group.regHist(DBMA).isFailure()) sc = StatusCode::FAILURE;
-      if (group.regHist(DBMC).isFailure()) sc = StatusCode::FAILURE;
+   for (auto& hist : m_histograms) {
+      if (!hist) continue;
+      if (group.regHist(hist).isFailure()) {
+         sc = StatusCode::FAILURE;
+      }
    }
 
    return sc;
 }
+
+const bool PixelMon2DMapsLW::m_doIBL{true};
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DProfilesLW.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DProfilesLW.cxx
index c3fd85d4fb9f2c48f2ca9677a47c1183822e6ea8..d7b9628d5468aea6237b4eb312448cc55382bf01 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DProfilesLW.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMon2DProfilesLW.cxx
@@ -6,51 +6,110 @@
 // Function to handle 2D profile histograms of modules, one for each region
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "PixelMonitoring/Components.h"
 #include "PixelMonitoring/PixelMon2DProfilesLW.h"
 #include "PixelMonitoring/PixelMon2DMapsLW.h"
-#include "PixelMonitoring/PixelMon2DMaps.h"
 #include "InDetIdentifier/PixelID.h"
-#include "LWHists/TProfile2D_LW.h"
 #include "LWHists/TH2F_LW.h"
+#include "LWHists/TProfile2D_LW.h"
 #include "GaudiKernel/StatusCode.h"     
 #include <string.h>
 
-PixelMon2DProfilesLW::PixelMon2DProfilesLW(std::string name, std::string title, bool doIBL, bool errorHist, bool copy2DFEval) : m_doIBL(doIBL), m_errorHist(errorHist), m_copy2DFEval(copy2DFEval)
+PixelMon2DProfilesLW::PixelMon2DProfilesLW(std::string name, std::string title, const PixMon::HistConf& config, bool copy2DFEval)
+    : IBL3D(nullptr),
+      IBL2D(nullptr),
+      IBL(nullptr),
+      B0(nullptr),
+      B1(nullptr),
+      B2(nullptr),
+      A(nullptr),
+      C(nullptr),
+      DBMA(nullptr),
+      DBMC(nullptr),
+      m_config(config),
+      m_copy2DFEval(copy2DFEval)
 {
    std::string setatext = ";shifted eta index of module";
    std::string etatext = ";eta index of module";
    std::string phitext = ";phi index of module";
    std::string disktext = ";disk number";
+   std::string layertext = ";layer number";
 
-   if (m_doIBL && !m_errorHist) {
-      IBL3D = TProfile2D_LW::create((name+"_IBL3D").c_str(), (title + ", IBL 3D modules " + etatext + phitext).c_str(),8,-.5,7.5,14,-0.5,13.5);
-      IBL2D = TProfile2D_LW::create((name+"_IBL2D").c_str(), (title + ", IBL planar modules " + setatext + phitext).c_str(),12,-6.5,5.5,14,-0.5,13.5);
-      IBL   = TProfile2D_LW::create((name+"_IBL").c_str(),   (title + ", IBL " + setatext + phitext).c_str(),32,-16.5,15.5,14,-0.5,13.5);
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kIBL3D)) {
+      IBL3D = TProfile2D_LW::create((name+"_IBL3D").c_str(), (title + ", IBL 3D modules " + etatext + phitext).c_str(),
+                                    PixMon::kNumModulesIBL3D, -.5, -.5 + PixMon::kNumModulesIBL3D,
+                                    PixMon::kNumStavesIBL, -0.5, -0.5 + PixMon::kNumStavesIBL);
+   }
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kIBL2D) ){
+      IBL2D = TProfile2D_LW::create((name+"_IBL2D").c_str(), (title + ", IBL planar modules " + setatext + phitext).c_str(),
+                                    PixMon::kNumModulesIBL2D, -6.5, -6.5 + PixMon::kNumModulesIBL2D,
+                                    PixMon::kNumStavesIBL, -0.5, -0.5 + PixMon::kNumStavesIBL);
+   }
+   if (m_doIBL && PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kIBL)) {
+      IBL = TProfile2D_LW::create((name+"_IBL").c_str(), (title + ", IBL " + setatext + phitext).c_str(),
+                                  PixMon::kNumModulesIBL, -16.5, -16.5 + PixMon::kNumModulesIBL,
+                                  PixMon::kNumStavesIBL, -0.5, -0.5 + PixMon::kNumStavesIBL);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB0)) {
+      B0 = TProfile2D_LW::create((name+"_B0").c_str(), (title + ", B0 " + etatext + phitext).c_str(),
+                                 PixMon::kNumModulesBarrel, -6.5, -6.5 + PixMon::kNumModulesBarrel,
+                                 PixMon::kNumStavesL0, -0.5, -0.5 + PixMon::kNumStavesL0);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB1)) {
+      B1 = TProfile2D_LW::create((name+"_B1").c_str(), (title + ", B1 " + etatext + phitext).c_str(),
+                                 PixMon::kNumModulesBarrel, -6.5, -6.5 + PixMon::kNumModulesBarrel,
+                                 PixMon::kNumStavesL1, -0.5, -0.5 + PixMon::kNumStavesL1);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kB2)) {
+      B2 = TProfile2D_LW::create((name+"_B2").c_str(), (title + ", B2 " + etatext + phitext).c_str(),
+                                 PixMon::kNumModulesBarrel, -6.5, -6.5 + PixMon::kNumModulesBarrel,
+                                 PixMon::kNumStavesL2, -0.5, -0.5 + PixMon::kNumStavesL2);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kECA)) {
+      A = TProfile2D_LW::create((name+"_ECA" ).c_str(), (title + ", ECA " + disktext + phitext).c_str(),
+                                PixMon::kNumLayersDisk, -0.5, -0.5 + PixMon::kNumLayersDisk,
+                                PixMon::kNumModulesDisk, -0.5, -0.5 + PixMon::kNumModulesDisk);
    }
-   B0 = TProfile2D_LW::create((name+"_B0").c_str(),    (title + ", B0 " + etatext + phitext).c_str(),13,-6.5,6.5,22,-0.5,21.5);
-   B1 = TProfile2D_LW::create((name+"_B1").c_str(),    (title + ", B1 " + etatext + phitext).c_str(),13,-6.5,6.5,38,-0.5,37.5);
-   B2 = TProfile2D_LW::create((name+"_B2").c_str(),    (title + ", B2 " + etatext + phitext).c_str(),13,-6.5,6.5,52,-0.5,51.5);
-   A  = TProfile2D_LW::create((name+"_ECA" ).c_str(),  (title + ", ECA " + disktext + phitext).c_str(),3,-0.5,2.5,48,-0.5,47.5);
-   C  = TProfile2D_LW::create((name+"_ECC" ).c_str(),  (title + ", ECC " + disktext + phitext).c_str(),3,-0.5,2.5,48,-0.5,47.5);
-   //DBMA = TProfile2D_LW::create((name+"_DBMA" ).c_str(),  (title + ", DBMA " + disktext + phitext).c_str(),3,-0.5,2.5,4,-0.5,3.5);
-   //DBMC = TProfile2D_LW::create((name+"_DBMC" ).c_str(),  (title + ", DBMC " + disktext + phitext).c_str(),3,-0.5,2.5,4,-0.5,3.5);
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kECC)) {
+      C = TProfile2D_LW::create((name+"_ECC" ).c_str(), (title + ", ECC " + disktext + phitext).c_str(),
+                                PixMon::kNumLayersDisk, -0.5, -0.5 + PixMon::kNumLayersDisk,
+                                PixMon::kNumModulesDisk, -0.5, -0.5 + PixMon::kNumModulesDisk);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kDBMA)) {
+      DBMA = TProfile2D_LW::create((name+"_DBMA").c_str(), (title + ", DBMA " + layertext + phitext).c_str(),
+                                   PixMon::kNumLayersDBM, -0.5, -0.5 + PixMon::kNumLayersDBM,
+                                   PixMon::kNumModulesDBM, -0.5, -0.5 + PixMon::kNumModulesDBM);
+   }
+   if (PixMon::HasComponent(m_config, PixMon::LayerIBL2D3DDBM::kDBMC)) {
+      DBMC = TProfile2D_LW::create((name+"_DBMC").c_str(), (title + ", DBMC " + layertext + phitext).c_str(),
+                                   PixMon::kNumLayersDBM, -0.5, -0.5 + PixMon::kNumLayersDBM,
+                                   PixMon::kNumModulesDBM, -0.5, -0.5 + PixMon::kNumModulesDBM);
+   }
+
+   m_histograms = {IBL, IBL2D, IBL3D, B0, B1, B2, A, C, DBMA, DBMC};
+
    formatHist();
 }
 
 PixelMon2DProfilesLW::~PixelMon2DProfilesLW()
 {
-   if (m_doIBL && !m_errorHist) {
-      LWHist::safeDelete(IBL3D);
-      LWHist::safeDelete(IBL2D);
-      LWHist::safeDelete(IBL);
+   for (auto& hist : m_histograms) {
+      if (hist) LWHist::safeDelete(hist);
+   }
+}
+
+void PixelMon2DProfilesLW::SetMaxValue(float max)
+{
+   for (auto& hist : m_histograms) {
+      if (hist) hist->SetMaximum(max);
+   }
+}
+
+void PixelMon2DProfilesLW::Reset()
+{
+   for (auto& hist : m_histograms) {
+      if (hist) hist->Reset();
    }
-   LWHist::safeDelete(B0);
-   LWHist::safeDelete(B1);
-   LWHist::safeDelete(B2);
-   LWHist::safeDelete(A);
-   LWHist::safeDelete(C);
-   //LWHist::safeDelete(DBMA);
-   //LWHist::safeDelete(DBMC);
 }
 
 void PixelMon2DProfilesLW::Fill(Identifier &id, const PixelID* pixID, float weight)
@@ -59,34 +118,34 @@ void PixelMon2DProfilesLW::Fill(Identifier &id, const PixelID* pixID, float weig
    const int pm  = pixID->phi_module(id);
    int ld = pixID->layer_disk(id);
 
-   if (bec == 2) A->Fill(ld, pm, weight); 
-   else if (bec == -2) C->Fill(ld, pm, weight);
-   //else if (bec == 4) DBMA->Fill(ld, pm, weight);
-   //else if (bec == -4) DBMC->Fill(ld, pm, weight);
+   if (bec == 2 && A) A->Fill(ld, pm, weight);
+   else if (bec == -2 && C) C->Fill(ld, pm, weight);
+   else if (bec == 4 && DBMA) DBMA->Fill(ld, pm, weight);
+   else if (bec == -4 && DBMC) DBMC->Fill(ld, pm, weight);
    else if (bec == 0) {
       if (m_doIBL) ld--;
       const int em = pixID->eta_module(id);
-      if (ld == 0) { 
+      if (ld == 0 && B0) {
          B0->Fill(em, pm, weight);
-      } else if (ld == 1) { 
+      } else if (ld == 1 && B1) {
          B1->Fill(em, pm, weight);
-      } else if (ld == 2) { 
+      } else if (ld == 2 && B2) {
          B2->Fill(em, pm, weight);
-      } else if (ld == -1 && m_doIBL && !m_errorHist) {
+      } else if (ld == -1 && IBL) {
          int feid = 0;
          int emf = 0;
          bool copy = false;
          if (em < 6 && em > -7) {
             if (pixID->eta_index(id) >= 80) feid = 1;
             emf = 2 * em + feid; 
-            IBL2D->Fill(em, pm, weight);
+            if (IBL2D) IBL2D->Fill(em, pm, weight);
             copy = true;
          } else if (em < -6) {
             emf = em - 6;
-            IBL3D->Fill(em + 10, pm, weight); 
+            if (IBL3D) IBL3D->Fill(em + 10, pm, weight);
          } else {
             emf = em + 6;
-            IBL3D->Fill(em - 2, pm, weight);
+            if (IBL3D) IBL3D->Fill(em - 2, pm, weight);
          }
          IBL->Fill(emf, pm, weight);
          if (m_copy2DFEval && copy) IBL->Fill(emf + 1, pm, weight);
@@ -96,322 +155,131 @@ void PixelMon2DProfilesLW::Fill(Identifier &id, const PixelID* pixID, float weig
 
 void PixelMon2DProfilesLW::formatHist()
 {
-   const int ndisk = 3;
-   const int nphi  = 48;
-   // const int nphi_dbm  = 4;
-   const char *disk[ndisk] = { "Disk 1", "Disk 2", "Disk 3" };
-   // const char *phi_dbm[nphi_dbm] = { "M1","M2","M3","M4"};
-   const int nmod = 13;
-   const int nmodIBL2D = 12;
-   const int nmodIBL3D = 8;
-   const int nmodIBL = 32;
-   const char *mod[nmod] = { "M6C", "M5C", "M4C", "M3C", "M2C", "M1C", "M0","M1A", "M2A", "M3A", "M4A", "M5A", "M6A" } ;
-   const char *modIBL2D[nmodIBL2D] = { "M3_C6", "M3_C5", "M2_C4", "M1_C3", "M1_C2", "M1_C1", "M1_A1", "M1_A2", "M2_A3", "M2_A4", "M3_A5", "M3_A6" } ;
-   const char *modIBL3D[nmodIBL3D] = {"M4_C8_2","M4_C8_1","M4_C7_2","M4_C7_1","M4_A7_1","M4_A7_2","M4_A8_1","M4_A8_2"};
-   const char *modIBL[nmodIBL] = {"C8","","C7","",
-				  "C6","","C5","",
-				  "C4","","C3","",
-				  "C2","","C1","",
-				  "A1","","A2","",
-				  "A3","","A4","",
-				  "A5","","A6","",
-				  "A7","","A8",""};
-   const int nstaveb = 14;
-   const char *staveb[nstaveb] = {
-      "S01", "S02", "S03", "S04", "S05", "S06","S07",
-      "S08", "S09", "S10", "S11", "S12", "S13","S14"};
-   const int nstave0 = 22;
-   const char *stave0[nstave0] = {
-      "B11_S2", "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1",
-      "B03_S2", "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1",
-      "B06_S2", "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1",
-      "B09_S2", "B10_S1", "B10_S2", "B11_S1" };
-   const int nstave1 = 38;
-   const char *stave1[nstave1] = {
-      "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2",
-      "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2",
-      "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2",
-      "B10_S1", "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2",
-      "B13_S1", "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2",
-      "B16_S1", "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2",
-      "B19_S1", "B19_S2" };
-   const int nstave2 = 52;
-   const char *stave2[nstave2] = {          
-      "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2", "B04_S1",
-      "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2", "B07_S1",
-      "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2", "B10_S1",
-      "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2", "B13_S1",
-      "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2", "B16_S1",
-      "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2", "B19_S1",
-      "B19_S2", "B20_S1", "B20_S2", "B21_S1", "B21_S2", "B22_S1",
-      "B22_S2", "B23_S1", "B23_S2", "B24_S1", "B24_S2", "B25_S1",
-      "B25_S2", "B26_S1", "B26_S2", "B01_S1" };
-   const char *nstaveA[nphi] = {
-      "B01_S2_M1", "B01_S2_M6", "B01_S2_M2", "B01_S2_M5", "B01_S2_M3", "B01_S2_M4", 
-      "B02_S1_M1", "B02_S1_M6", "B02_S1_M2", "B02_S1_M5", "B02_S1_M3", "B02_S1_M4", 
-      "B02_S2_M1", "B02_S2_M6", "B02_S2_M2", "B02_S2_M5", "B02_S2_M3", "B02_S2_M4", 
-      "B03_S1_M1", "B03_S1_M6", "B03_S1_M2", "B03_S1_M5", "B03_S1_M3", "B03_S1_M4", 
-      "B03_S2_M1", "B03_S2_M6", "B03_S2_M2", "B03_S2_M5", "B03_S2_M3", "B03_S2_M4", 
-      "B04_S1_M1", "B04_S1_M6", "B04_S1_M2", "B04_S1_M5", "B04_S1_M3", "B04_S1_M4", 
-      "B04_S2_M1", "B04_S2_M6", "B04_S2_M2", "B04_S2_M5", "B04_S2_M3", "B04_S2_M4", 
-      "B01_S1_M1", "B01_S1_M6", "B01_S1_M2", "B01_S1_M5", "B01_S1_M3", "B01_S1_M4"};
-   const char *nstaveC[nphi] = {
-      "B01_S2_M4", "B01_S2_M3", "B01_S2_M5", "B01_S2_M2", "B01_S2_M6", "B01_S2_M1", 
-      "B02_S1_M4", "B02_S1_M3", "B02_S1_M5", "B02_S1_M2", "B02_S1_M6", "B02_S1_M1", 
-      "B02_S2_M4", "B02_S2_M3", "B02_S2_M5", "B02_S2_M2", "B02_S2_M6", "B02_S2_M1", 
-      "B03_S1_M4", "B03_S1_M3", "B03_S1_M5", "B03_S1_M2", "B03_S1_M6", "B03_S1_M1", 
-      "B03_S2_M4", "B03_S2_M3", "B03_S2_M5", "B03_S2_M2", "B03_S2_M6", "B03_S2_M1", 
-      "B04_S1_M4", "B04_S1_M3", "B04_S1_M5", "B04_S1_M2", "B04_S1_M6", "B04_S1_M1", 
-      "B04_S2_M4", "B04_S2_M3", "B04_S2_M5", "B04_S2_M2", "B04_S2_M6", "B04_S2_M1", 
-      "B01_S1_M4", "B01_S1_M3", "B01_S1_M5", "B01_S1_M2", "B01_S1_M6", "B01_S1_M1"};
-
-   for (int i = 0; i < nphi; i++) {
-      A->GetYaxis()->SetBinLabel(i + 1, nstaveA[i]);
-      C->GetYaxis()->SetBinLabel(i + 1, nstaveC[i]);
-   }
-
-   // for (int i=0; i<nphi_dbm; i++) {
-   //    DBMA->GetYaxis()->SetBinLabel(i + 1, phi_dbm[i]);
-   //    DBMC->GetYaxis()->SetBinLabel(i + 1, phi_dbm[i]);
-   // }
-
-   for (int i = 0; i < ndisk; i++) {
-      A->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-      C->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-      //DBMA->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-      //DBMC->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-   }
-
-   for (int i = 0; i < nmod; i++) {
-      B0->GetXaxis()->SetBinLabel(i + 1, mod[i]);  // bin 0 is underflow
-      B1->GetXaxis()->SetBinLabel(i + 1, mod[i]);
-      B2->GetXaxis()->SetBinLabel(i + 1, mod[i]);
-   }
-
-   if (m_doIBL && !m_errorHist) {
-      for (int i = 0; i < nmodIBL; i++)   IBL->GetXaxis()->SetBinLabel(i + 1, modIBL[i]);
-      for (int i = 0; i < nstaveb; i++)   IBL->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
-      for (int i = 0; i < nmodIBL2D; i++) IBL2D->GetXaxis()->SetBinLabel(i + 1, modIBL2D[i]);
-      for (int i = 0; i < nstaveb; i++)   IBL2D->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
-      for (int i = 0; i < nmodIBL3D; i++) IBL3D->GetXaxis()->SetBinLabel(i + 1, modIBL3D[i]);
-      for (int i = 0; i < nstaveb; i++)   IBL3D->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
-   }
-
-   for (int i = 0; i < nstave0; i++) B0->GetYaxis()->SetBinLabel(i + 1, stave0[i]); 
-   for (int i = 0; i < nstave1; i++) B1->GetYaxis()->SetBinLabel(i + 1, stave1[i]); 
-   for (int i = 0; i < nstave2; i++) B2->GetYaxis()->SetBinLabel(i + 1, stave2[i]); 
-  
-
-   if (m_doIBL && !m_errorHist){
-      IBL->GetYaxis()->SetLabelSize(0.03);
-      IBL2D->GetYaxis()->SetLabelSize(0.03);
-      IBL3D->GetYaxis()->SetLabelSize(0.03);
-      IBL->SetOption("colz");
-      IBL2D->SetOption("colz");
-      IBL3D->SetOption("colz");
-      IBL->SetMinimum(0.);
-      IBL2D->SetMinimum(0.);
-      IBL3D->SetMinimum(0.);
-   }
-
-   //Make the text smaller
-   B0->GetYaxis()->SetLabelSize(0.03);
-   B1->GetYaxis()->SetLabelSize(0.03);
-   B2->GetYaxis()->SetLabelSize(0.03);
-   A->GetYaxis()->SetLabelSize(0.02);
-   C->GetYaxis()->SetLabelSize(0.02);
-   //DBMA->GetYaxis()->SetLabelSize(0.02);
-   //DBMC->GetYaxis()->SetLabelSize(0.02);
-   //put histograms in the easier to read colz format
-   B0->SetOption("colz");
-   B1->SetOption("colz");
-   B2->SetOption("colz");
-   A->SetOption("colz");
-   C->SetOption("colz");
-   //DBMA->SetOption("colz");
-   //DBMC->SetOption("colz");
-   //force the minimum to be 0 so you can spot empty blocks easily
-   B0->SetMinimum(0.);
-   B1->SetMinimum(0.);
-   B2->SetMinimum(0.);
-   A->SetMinimum(0.);
-   C->SetMinimum(0.);
-   //DBMA->SetMinimum(0.);
-   //DBMC->SetMinimum(0.);
-}
-
-void PixelMon2DProfilesLW::Fill2DMon(PixelMon2DProfilesLW* oldmap)
-{
-   //for (int x = 1; x <= DBMA->GetNbinsX(); x++) {
-   //   for (int y = 1; y <= DBMA->GetNbinsY(); y++) {
-   //      float content = oldmap->DBMA->GetBinContent(x, y);
-   //      DBMA->SetBinContent(x, y, content);
-   //      oldmap->DBMA->SetBinContent(x, y, 0);
-   //   }
-   //}
-   //for (int x = 1; x <= DBMC->GetNbinsX(); x++) {
-   //   for (int y = 1; y <= DBMC->GetNbinsY(); y++) {
-   //      float content = oldmap->DBMC->GetBinContent(x, y);
-   //      DBMC->SetBinContent(x, y, content);
-   //      oldmap->DBMC->SetBinContent(x, y, 0);
-   //   }
-   //}
-   for (unsigned int x = 1; x <= A->GetNbinsX(); x++) {
-      for (unsigned int y = 1; y <= A->GetNbinsY(); y++) {
-         float content = oldmap->A->GetBinContent(x, y);
-         A->SetBinContent(x, y, content);
-         oldmap->A->SetBinContent(x, y, 0);
+   if (A && C) {
+      for (unsigned int i = 0; i < PixMon::kNumModulesDisk; ++i) {
+         A->GetYaxis()->SetBinLabel(i + 1, PixMon::ModulesECA.at(i).c_str());
+         C->GetYaxis()->SetBinLabel(i + 1, PixMon::ModulesECC.at(i).c_str());
       }
-   }
-   for (unsigned int x = 1; x <= C->GetNbinsX(); x++) {
-      for (unsigned int y = 1; y <= C->GetNbinsY(); y++) {
-         float content = oldmap->C->GetBinContent(x, y);
-         C->SetBinContent(x, y, content);
-         oldmap->C->SetBinContent(x, y, 0);
+      for (unsigned int i = 0; i < PixMon::kNumLayersDisk; ++i) {
+         A->GetXaxis()->SetBinLabel(i + 1, PixMon::LayersDisk.at(i).c_str());
+         C->GetXaxis()->SetBinLabel(i + 1, PixMon::LayersDisk.at(i).c_str());
       }
    }
-   for (unsigned int x = 1; x <= B0->GetNbinsX(); x++) {
-      for (unsigned int y = 1; y <= B0->GetNbinsY(); y++) {
-         float content = oldmap->B0->GetBinContent(x, y);
-         B0->SetBinContent(x, y, content);
-         oldmap->B0->SetBinContent(x, y, 0);
+   if (DBMA && DBMC) {
+      for (unsigned int i = 0; i < PixMon::kNumModulesDBM; ++i) {
+         DBMA->GetYaxis()->SetBinLabel(i + 1, PixMon::ModulesDBM.at(i).c_str());
+         DBMC->GetYaxis()->SetBinLabel(i + 1, PixMon::ModulesDBM.at(i).c_str());
+      }
+      for (unsigned int i = 0; i < PixMon::kNumLayersDBM; ++i) {
+         DBMA->GetXaxis()->SetBinLabel(i + 1, PixMon::LayersDBM.at(i).c_str());
+         DBMC->GetXaxis()->SetBinLabel(i + 1, PixMon::LayersDBM.at(i).c_str());
       }
    }
-   for (unsigned int x = 1; x <= B1->GetNbinsX(); x++) {
-      for (unsigned int y = 1; y <= B1->GetNbinsY(); y++) {
-         float content = oldmap->B1->GetBinContent(x, y);
-         B1->SetBinContent(x, y, content);
-         oldmap->B1->SetBinContent(x, y, 0);
+   if (B0 && B1 && B2) {
+      for (unsigned int i = 0; i < PixMon::kNumModulesBarrel; ++i) {
+         B0->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesBarrel.at(i).c_str());
+         B1->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesBarrel.at(i).c_str());
+         B2->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesBarrel.at(i).c_str());
+      }
+      for (unsigned int i = 0; i < PixMon::kNumStavesL0; ++i) {
+         B0->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesL0.at(i).c_str());
+      }
+      for (unsigned int i = 0; i < PixMon::kNumStavesL1; ++i) {
+         B1->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesL1.at(i).c_str());
+      }
+      for (unsigned int i = 0; i < PixMon::kNumStavesL2; ++i) {
+         B2->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesL2.at(i).c_str());
       }
    }
-   for (unsigned int x = 1; x <= B2->GetNbinsX(); x++) {
-      for (unsigned int y = 1; y <= B2->GetNbinsY(); y++) {
-         float content = oldmap->B2->GetBinContent(x, y);
-         B2->SetBinContent(x, y, content );
-         oldmap->B2->SetBinContent(x, y, 0);
+   if (IBL) {
+      for (unsigned int i = 0; i < PixMon::kNumModulesIBL; ++i) {
+         IBL->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesIBL.at(i).c_str());
+      }
+      for (unsigned int i = 0; i < PixMon::kNumStavesIBL; ++i) {
+         IBL->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesIBL.at(i).c_str());
       }
    }
-   if (m_doIBL && !m_errorHist) {
-      for (unsigned int x = 1; x <= IBL->GetNbinsX(); x++) {
-         for (unsigned int y = 1; y <= IBL->GetNbinsY(); y++) {
-            float content = oldmap->IBL->GetBinContent(x, y);
-            IBL->SetBinContent(x, y, content);
-            oldmap->IBL->SetBinContent(x, y, 0);
-         }
+   if (IBL2D && IBL3D) {
+      for (unsigned int i = 0; i < PixMon::kNumModulesIBL2D; ++i) {
+         IBL2D->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesIBL2D.at(i).c_str());
       }
-      for (unsigned int x = 1; x <= IBL2D->GetNbinsX(); x++) {
-         for (unsigned int y = 1; y <= IBL2D->GetNbinsY(); y++) {
-            float content = oldmap->IBL2D->GetBinContent(x, y);
-            IBL2D->SetBinContent(x, y, content);
-            oldmap->IBL2D->SetBinContent(x, y, 0);
-         }
+      for (unsigned int i = 0; i < PixMon::kNumModulesIBL3D; ++i) {
+         IBL3D->GetXaxis()->SetBinLabel(i + 1, PixMon::ModulesIBL3D.at(i).c_str());
+      }
+      for (unsigned int i = 0; i < PixMon::kNumStavesIBL; ++i) {
+         IBL2D->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesIBL.at(i).c_str());
+         IBL3D->GetYaxis()->SetBinLabel(i + 1, PixMon::StavesIBL.at(i).c_str());
       }
-      for (unsigned int x = 1; x <= IBL3D->GetNbinsX(); x++) {
-         for (unsigned int y = 1; y <= IBL3D->GetNbinsY(); y++) {
-            float content = oldmap->IBL3D->GetBinContent(x, y);
-            IBL3D->SetBinContent(x, y, content);
-            oldmap->IBL3D->SetBinContent(x, y, 0);
+   }
+
+   for (auto& hist : m_histograms) {
+      if (!hist) continue;
+      if (hist == A || hist == C) {
+         hist->GetYaxis()->SetLabelSize(0.02);
+      } else {
+         hist->GetYaxis()->SetLabelSize(0.03);
+      }
+      hist->SetOption("colz");
+      hist->SetMinimum(0.);
+   }
+}
+
+void PixelMon2DProfilesLW::Fill2DMon(PixelMon2DProfilesLW* oldmap)
+{
+   for (unsigned int index = 0; index < m_histograms.size(); ++index) {
+      auto& hist = m_histograms.at(index);
+      auto& oldhist = oldmap->m_histograms.at(index);
+      if (!hist) continue;
+      if (!oldhist) continue;
+      for (unsigned int x = 1; x <= hist->GetNbinsX(); ++x) {
+         for (unsigned int y = 1; y <= hist->GetNbinsY(); ++y) {
+            const auto content = oldhist->GetBinContent(x, y);
+            hist->SetBinContent(x, y, content);
+            oldhist->SetBinContent(x, y, 0);
          }
       }
    }
 }
 
-void PixelMon2DProfilesLW::FillFromMap(PixelMon2DMaps* inputmap, bool clear_inputmap)
+void PixelMon2DProfilesLW::FillFromMap(PixelMon2DMapsLW* inputmap, bool clear_inputmap)
 {
-  float weightIBL   = 1.0 / 26880.0;
-  float weightPixel = 1.0 / 46080.0;
+   const float weightIBL   = 1.0 / 26880.0;
+   const float weightPixel = 1.0 / 46080.0;
 
-  // for (int x = 1; x <= DBMA->GetNbinsX(); x++) {
-  //    for (int y = 1; y <= DBMA->GetNbinsY(); y++) {
-  //       float content = inputmap->DBMA->GetBinContent(x, y);
-  //       DBMA->Fill(inputmap->DBMA->GetXaxis()->GetBinCenter(x), inputmap->DBMA->GetYaxis()->GetBinCenter(y), content * weightIBL);
-  //    }
-  // }
-  // if (clear_inputmap) inputmap->DBMA->Reset(); 
-  // for (int x = 1; x <= DBMC->GetNbinsX(); x++) {
-  //    for (int y = 1; y <= DBMC->GetNbinsY(); y++) {
-  //       float content = inputmap->DBMC->GetBinContent(x, y);
-  //       DBMC->Fill(inputmap->DBMC->GetXaxis()->GetBinCenter(x), inputmap->DBMC->GetYaxis()->GetBinCenter(y), content * weightIBL);
-  //    }
-  // }
-  // if (clear_inputmap) inputmap->DBMC->Reset();
-  
-  for (unsigned int x = 1; x <= A->GetNbinsX(); x++) {
-     for (unsigned int y = 1; y <= A->GetNbinsY(); y++) {
-        float content = inputmap->A->GetBinContent(x, y);
-        A->Fill(inputmap->A->GetXaxis()->GetBinCenter(x), inputmap->A->GetYaxis()->GetBinCenter(y), content * weightPixel);
-     }
-  }
-  if (clear_inputmap) inputmap->A->Reset();
-  for (unsigned int x = 1; x <= C->GetNbinsX(); x++) {
-     for (unsigned int y = 1; y <= C->GetNbinsY(); y++) {
-        float content = inputmap->C->GetBinContent(x, y);
-        C->Fill(inputmap->C->GetXaxis()->GetBinCenter(x), inputmap->C->GetYaxis()->GetBinCenter(y), content * weightPixel);
-     }
-  }
-  if (clear_inputmap) inputmap->C->Reset();
-  for (unsigned int x = 1; x <= B0->GetNbinsX(); x++) {
-     for (unsigned int y = 1; y <= B0->GetNbinsY(); y++) {
-        float content = inputmap->B0->GetBinContent(x, y);
-        B0->Fill(inputmap->B0->GetXaxis()->GetBinCenter(x), inputmap->B0->GetYaxis()->GetBinCenter(y), content * weightPixel);
-     }
-  }
-  if (clear_inputmap) inputmap->B0->Reset();
-  for (unsigned int x = 1; x <= B1->GetNbinsX(); x++) {
-     for (unsigned int y = 1; y <= B1->GetNbinsY(); y++) {
-        float content = inputmap->B1->GetBinContent(x, y);
-        B1->Fill(inputmap->B1->GetXaxis()->GetBinCenter(x), inputmap->B1->GetYaxis()->GetBinCenter(y), content * weightPixel);
-     }
-  }
-  if (clear_inputmap) inputmap->B1->Reset();
-  for (unsigned int x = 1; x <= B2->GetNbinsX(); x++) {
-     for (unsigned int y = 1; y <= B2->GetNbinsY(); y++) {
-        float content = inputmap->B2->GetBinContent(x, y);
-        B2->Fill(inputmap->B2->GetXaxis()->GetBinCenter(x), inputmap->B2->GetYaxis()->GetBinCenter(y), content * weightPixel);
-     }
-  }
-  if (clear_inputmap) inputmap->B2->Reset();
-  if (m_doIBL && !m_errorHist) {
-     for (unsigned int x = 1; x <= IBL->GetNbinsX(); x++) {
-        for (unsigned int y = 1; y <= IBL->GetNbinsY(); y++) {
-           float content = inputmap->IBL->GetBinContent(x, y);
-           IBL->Fill(inputmap->IBL->GetXaxis()->GetBinCenter(x), inputmap->IBL->GetYaxis()->GetBinCenter(y), content * weightIBL);
-        }
-     }
-     if (clear_inputmap) inputmap->IBL->Reset();
-     for (unsigned int x = 1; x <= IBL2D->GetNbinsX(); x++) {
-        for (unsigned int y = 1; y <= IBL2D->GetNbinsY(); y++) {
-           float content = inputmap->IBL2D->GetBinContent(x, y);
-           IBL2D->Fill(inputmap->IBL2D->GetXaxis()->GetBinCenter(x), inputmap->IBL2D->GetYaxis()->GetBinCenter(y), content * weightIBL*0.5);
-        }
-     }
-     if (clear_inputmap) inputmap->IBL2D->Reset();
-     for (unsigned int x = 1; x <= IBL3D->GetNbinsX(); x++) {
-        for (unsigned int y = 1; y <= IBL3D->GetNbinsY(); y++) {
-           float content = inputmap->IBL3D->GetBinContent(x, y);
-           IBL3D->Fill(inputmap->IBL3D->GetXaxis()->GetBinCenter(x), inputmap->IBL3D->GetYaxis()->GetBinCenter(y), content * weightIBL);
-        }
-     }
-     if (clear_inputmap) inputmap->IBL3D->Reset();
-  }
+   for (unsigned int index = 0; index < m_histograms.size(); ++index) {
+      auto& hist = m_histograms.at(index);
+      auto& map = inputmap->m_histograms.at(index);
+      if (!hist) continue;
+      if (!map) continue;
+      for (unsigned int x = 1; x <= hist->GetNbinsX(); x++) {
+         for (unsigned int y = 1; y <= hist->GetNbinsY(); y++) {
+            auto content = map->GetBinContent(x, y);
+            if (hist == IBL || hist == IBL3D || hist == DBMA || hist == DBMC) {
+               content *= weightIBL;
+            } else if (hist == IBL2D) {
+               content *= weightIBL * 0.5;
+            } else {
+               content *= weightPixel;
+            }
+            hist->Fill(map->GetXaxis()->GetBinCenter(x), map->GetYaxis()->GetBinCenter(y), content);
+         }
+      }
+      if (clear_inputmap) map->Reset();
+   }
 }
 
-
 StatusCode PixelMon2DProfilesLW::regHist(ManagedMonitorToolBase::MonGroup &group)
 {
    StatusCode sc = StatusCode::SUCCESS;
-   if (m_doIBL && !m_errorHist) {
-      if (group.regHist(IBL).isFailure()) sc = StatusCode::FAILURE;
-      if (group.regHist(IBL2D).isFailure()) sc = StatusCode::FAILURE;
-      if (group.regHist(IBL3D).isFailure()) sc = StatusCode::FAILURE;
+
+   for (auto& hist : m_histograms) {
+      if (!hist) continue;
+      if (group.regHist(hist).isFailure()) {
+         sc = StatusCode::FAILURE;
+      }
    }
-   if (group.regHist(B0).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(B1).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(B2).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(A).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(C).isFailure()) sc = StatusCode::FAILURE;
-   //sc = group.regHist(DBMA);
-   //sc = group.regHist(DBMC);
   
    return sc;
 }
+
+const bool PixelMon2DProfilesLW::m_doIBL{true};
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMonModules.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMonModules.cxx
index 0180a974ae86349b2a4832dfb175e1df0cd0a37a..606ee96b65fb722d7364201c04ba7b4e9c36344d 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMonModules.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMonModules.cxx
@@ -8,44 +8,40 @@
 
 #include "PixelMonitoring/PixelMonModules.h"
 #include "AthenaMonitoring/ManagedMonitorToolBase.h"
-#include "TH1I.h"
-#include "TH2I.h"
-#include "TProfile.h"
 #include "LWHists/TH1F_LW.h"
 #include "LWHists/TProfile_LW.h"
 #include "InDetIdentifier/PixelID.h"
 #include "GaudiKernel/StatusCode.h"       
-#include <iostream>
 #include <string.h>
 
 PixelMonModules::~PixelMonModules()
 {
 }
 
-PixelMonModulesProf::PixelMonModulesProf(std::string name, std::string title, int nbins, double* arr, bool doIBL) : m_doIBL(doIBL)
+PixelMonModulesProf::PixelMonModulesProf(std::string name, std::string title, int nbins, double* arr)
 {
    m_nBins=nbins;
    for (int i = 0; i < 1744 + 280 * m_doIBL; i++) {
-      getHist(i) = TProfile_LW::create((getHistName(i,false,m_doIBL)+"_"+name).c_str(), (getHistName(i,false,m_doIBL)+" "+title).c_str(), nbins, arr);
+      getHist(i) = TProfile_LW::create((getHistName(i,false)+"_"+name).c_str(), (getHistName(i,false)+" "+title).c_str(), nbins, arr);
    }
    if (m_doIBL == false) {
       for (int i = 1744; i < 2024; i++) {
-         getHist(i) = 0;
+         getHist(i) = nullptr;
       }
    }
    formatHist("");
    m_Dummy = 0;
 }
 
-PixelMonModulesProf::PixelMonModulesProf(std::string name, std::string title, int nbins, double low, double high, bool doIBL) : m_doIBL(doIBL)
+PixelMonModulesProf::PixelMonModulesProf(std::string name, std::string title, int nbins, double low, double high)
 {
    m_nBins = nbins;
    for (int i = 0; i < 1744 + 280 * m_doIBL; i++) {
-      getHist(i) = TProfile_LW::create((getHistName(i,false,m_doIBL)+"_"+name).c_str(), (getHistName(i,false,m_doIBL)+" "+title).c_str(), nbins, low, high);
+      getHist(i) = TProfile_LW::create((getHistName(i,false)+"_"+name).c_str(), (getHistName(i,false)+" "+title).c_str(), nbins, low, high);
    }
    if (m_doIBL == false) {
       for (int i = 1744; i < 2024; i++) {
-         getHist(i) = 0;
+         getHist(i) = nullptr;
       }
    }
    formatHist("");
@@ -59,30 +55,30 @@ PixelMonModulesProf::~PixelMonModulesProf()
    }
 }
 
-PixelMonModules1D::PixelMonModules1D(std::string name, std::string title, int nbins, double* arr, bool doIBL) : m_doIBL(doIBL)
+PixelMonModules1D::PixelMonModules1D(std::string name, std::string title, int nbins, double* arr)
 {
    m_nBins = nbins;
    for (int i = 0; i < 1744 + 280 * m_doIBL; i++) {
-      getHist(i) = new TH1F((getHistName(i,false,m_doIBL)+"_"+name).c_str(), (getHistName(i,false,m_doIBL)+" "+title).c_str(), nbins, arr);
+      getHist(i) = new TH1F((getHistName(i,false)+"_"+name).c_str(), (getHistName(i,false)+" "+title).c_str(), nbins, arr);
    }
    if (m_doIBL == false) {
       for (int i = 1744; i < 2024; i++) {
-         getHist(i) = 0;
+         getHist(i) = nullptr;
       }
    }
    formatHist("");
    m_Dummy = 0;
 }
 
-PixelMonModules1D::PixelMonModules1D(std::string name, std::string title, int nbins, double low, double high, bool doIBL) : m_doIBL(doIBL)
+PixelMonModules1D::PixelMonModules1D(std::string name, std::string title, int nbins, double low, double high)
 {
    m_nBins=nbins;
    for (int i = 0; i < 1744 + 280 * m_doIBL; i++) {
-      getHist(i) = new TH1F((getHistName(i,false,m_doIBL)+"_"+name).c_str(), (getHistName(i,false,m_doIBL)+" "+title).c_str(), nbins, low, high);
+      getHist(i) = new TH1F((getHistName(i,false)+"_"+name).c_str(), (getHistName(i,false)+" "+title).c_str(), nbins, low, high);
    }
    if (m_doIBL == false) {
       for (int i = 1744; i < 2024; i++) {
-         getHist(i) = 0;
+         getHist(i) = nullptr;
       }
    }
    formatHist("");
@@ -96,15 +92,15 @@ PixelMonModules1D::~PixelMonModules1D()
    }
 }
 
-PixelMonModules2D::PixelMonModules2D(std::string name, std::string title, int nbins0, double low0, double high0, int nbins1, double low1, double high1, bool doIBL) : m_doIBL(doIBL)
+PixelMonModules2D::PixelMonModules2D(std::string name, std::string title, int nbins0, double low0, double high0, int nbins1, double low1, double high1)
 {
    m_nBins = nbins0 * nbins1;
    for (int i = 0; i < 1744 + 280 * m_doIBL; i++) {
-      getHist(i) = new TH2F((getHistName(i,false,m_doIBL)+"_"+name).c_str(), (getHistName(i,false,m_doIBL)+" "+title).c_str(), nbins0, low0, high0, nbins1, low1, high1);
+      getHist(i) = new TH2F((getHistName(i,false)+"_"+name).c_str(), (getHistName(i,false)+" "+title).c_str(), nbins0, low0, high0, nbins1, low1, high1);
    }
    if (m_doIBL == false) {
       for (int i = 1744; i < 2024; i++) {
-         getHist(i) = 0;
+         getHist(i) = nullptr;
       }
    }
    formatHist("");
@@ -128,7 +124,7 @@ void PixelMonModulesProf::Reset()
 StatusCode PixelMonModulesProf::regHist(ManagedMonitorToolBase* thisptr, std::string path, ManagedMonitorToolBase::Interval_t Run)
 {
    for (int i = 0; i < 1744 + 280 * m_doIBL; i++) {
-      ManagedMonitorToolBase::MonGroup mgroup(thisptr, (path+"/"+getHistName(i,true)).c_str(),Run);
+     ManagedMonitorToolBase::MonGroup mgroup(thisptr, (path+"/"+getHistName(i,true)).c_str(),Run);
       if (mgroup.regHist(getHist(i)).isFailure()) {
          return StatusCode::FAILURE;
       }
@@ -169,24 +165,6 @@ void PixelMonModulesProf::Fill(double value0, double value1, Identifier &id, con
    }
 }
 
-void PixelMonModules2D::Fill(double value0, double value1, Identifier &id, const PixelID* pixID)
-{
-   const int bec = pixID->barrel_ec(id);
-   const int pm  = pixID->phi_module(id);
-   int ld = pixID->layer_disk(id);
-
-   if (bec == 2) A[ld][pm]->Fill(value0, value1); 
-   else if (bec == -2) C[ld][pm]->Fill(value0, value1);
-   else if (bec == 0) {
-      if (m_doIBL) ld--;
-      const int em  = pixID->eta_module(id);
-      if (ld == 0) B0[em+6][pm]->Fill(value0, value1);
-      else if (ld == 1) B1[em+6][pm]->Fill(value0, value1);
-      else if (ld == 2) B2[em+6][pm]->Fill(value0, value1);
-      else if (ld == -1) IBL[em+10][pm]->Fill(value0, value1);
-   }
-}
-
 void PixelMonModules2D::Fill(double value0, double value1, Identifier &id, const PixelID* pixID, double weight)
 {
    const int bec = pixID->barrel_ec(id);
@@ -244,7 +222,7 @@ void PixelMonModules1D::Fill(double value, Identifier &id, const PixelID* pixID)
 StatusCode PixelMonModules1D::regHist(ManagedMonitorToolBase* thisptr, std::string path, ManagedMonitorToolBase::Interval_t Run)
 {
    for (int i = 0; i < 1744 + 280 * m_doIBL; i++) {
-      ManagedMonitorToolBase::MonGroup mgroup(thisptr, (path+"/"+getHistName(i,true)).c_str(),Run);
+     ManagedMonitorToolBase::MonGroup mgroup(thisptr, (path+"/"+getHistName(i,true)).c_str(),Run);
       if (mgroup.regHist(getHist(i)).isFailure()) {
          return StatusCode::FAILURE;
       }
@@ -255,7 +233,7 @@ StatusCode PixelMonModules1D::regHist(ManagedMonitorToolBase* thisptr, std::stri
 StatusCode PixelMonModules2D::regHist(ManagedMonitorToolBase* thisptr, std::string path, ManagedMonitorToolBase::Interval_t Run)
 {
    for (int i = 0; i < 1744 + 280 * m_doIBL; i++) {
-      ManagedMonitorToolBase::MonGroup mgroup(thisptr, (path+"/"+getHistName(i,true)).c_str(),Run);
+     ManagedMonitorToolBase::MonGroup mgroup(thisptr, (path+"/"+getHistName(i,true)).c_str(),Run);
       if (mgroup.regHist(getHist(i)).isFailure()) {
          return StatusCode::FAILURE;
       }
@@ -344,7 +322,7 @@ TH2F* &PixelMonModules2D::getHist(int i)
    return m_Dummy;
 }
 
-std::string PixelMonModules::getHistName(int i, bool forPath, bool doIBL)
+std::string PixelMonModules::getHistName(int i, bool forPath)
 {
    const int ndisk = 3;
    const int nphi  = 48;
@@ -426,7 +404,7 @@ std::string PixelMonModules::getHistName(int i, bool forPath, bool doIBL)
      i -= 144;                      
      if (i < 144) return diskC[i/48];
      i -= 144;
-     if (doIBL && i < 280) return newbarrel[0]+joint+staveb[i%14];
+     if (m_doIBL && i < 280) return newbarrel[0]+joint+staveb[i%14];
 
   } else {
      std::string joint = "_";
@@ -440,9 +418,10 @@ std::string PixelMonModules::getHistName(int i, bool forPath, bool doIBL)
      i -= 144;                      
      if (i < 144) return diskC[i/48]+joint+staveC[i%48];
      i -= 144;
-     if (doIBL && i < 280) return newbarrel[0]+joint+staveb[i%14]+joint+modIBL[i/14];;
+     if (m_doIBL && i < 280) return newbarrel[0]+joint+staveb[i%14]+joint+modIBL[i/14];;
   }
   std::string dummy="wrong initialization";
   return dummy;  //should never get here
 }
 
+const bool PixelMonModules::m_doIBL{true};
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMonProfiles.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMonProfiles.cxx
deleted file mode 100644
index f2489ff86f2e2d58ab903b76623a5cd7742fddba..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMonProfiles.cxx
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////////////////
-// Function to handle 2D profile histograms of modules, one for each region
-///////////////////////////////////////////////////////////////////////////////
-
-#include "PixelMonitoring/PixelMonProfiles.h"
-#include "InDetIdentifier/PixelID.h"
-#include "LWHists/TProfile2D_LW.h"
-#include "GaudiKernel/StatusCode.h"     
-#include <string.h>
-
-PixelMonProfiles::PixelMonProfiles(std::string name, std::string title, bool doIBL) : m_doIBL(doIBL)
-{
-   IBL3D = TProfile2D_LW::create((name+"_IBL3D").c_str(),(title + ", IBL 3D module " + ";eta index of module;phi index of module").c_str(),8,-.5,7.5,14,-0.5,13.5);
-   IBL2D = TProfile2D_LW::create((name+"_IBL2D").c_str(),(title + ", IBL planar module " + ";eta index of module;phi index of module").c_str(),12,-6.5,5.5,14,-0.5,13.5);
-   IBL   = TProfile2D_LW::create((name+"_IBL").c_str(),  (title + ", IBL " + ";eta index of module;phi index of module").c_str(), 32, -16.5, 15.5, 14, -0.5, 13.5);
-   B0    = TProfile2D_LW::create((name+"_B0").c_str(),   (title + ", B0 " + ";eta index of module;phi index of module").c_str(),13,-6.5,6.5,22,-0.5,21.5);
-   B1    = TProfile2D_LW::create((name+"_B1").c_str(),   (title + ", B1 " + ";eta index of module;phi index of module").c_str(),13,-6.5,6.5,38,-0.5,37.5);
-   B2    = TProfile2D_LW::create((name+"_B2").c_str(),   (title + ", B2 " + ";eta index of module;phi index of module").c_str(),13,-6.5,6.5,52,-0.5,51.5);
-   A     = TProfile2D_LW::create((name+"_ECA").c_str(), (title + ", ECA "+ ";disk number;phi index of module").c_str(),         3,-0.5,2.5,48,-0.5,47.5);
-   C     = TProfile2D_LW::create((name+"_ECC").c_str(), (title + ", ECC "+ ";disk number;phi index of module").c_str(),         3,-0.5,2.5,48,-0.5,47.5);
-
-   formatHist();
-}
-
-PixelMonProfiles::~PixelMonProfiles()
-{
-   LWHist::safeDelete(IBL3D);
-   LWHist::safeDelete(IBL2D);
-   LWHist::safeDelete(IBL);
-   LWHist::safeDelete(B0);
-   LWHist::safeDelete(B1);
-   LWHist::safeDelete(B2);
-   LWHist::safeDelete(A);
-   LWHist::safeDelete(C);
-}
-
-void PixelMonProfiles::SetMaxValue(float max)
-{
-   IBL->SetMaximum(max);
-   IBL2D->SetMaximum(max);
-   IBL3D->SetMaximum(max);
-   B0->SetMaximum(max);
-   B1->SetMaximum(max);
-   B2->SetMaximum(max);
-   A->SetMaximum(max); 
-   C->SetMaximum(max); 
-}
-
-void PixelMonProfiles::Reset()
-{
-   IBL->Reset();
-   IBL2D->Reset();
-   IBL3D->Reset();
-   B0->Reset();
-   B1->Reset();
-   B2->Reset();
-   A->Reset();
-   C->Reset();
-}
-
-void PixelMonProfiles::Fill(Identifier &id, const PixelID* pixID, float Index)
-{
-   const int bec = pixID->barrel_ec(id);
-   const int pm  = pixID->phi_module(id);
-   int ld = pixID->layer_disk(id);
-   
-   if (bec == 2) A->Fill(ld, pm, Index);
-   else if (bec == -2) C->Fill(ld, pm, Index);
-   else if (bec == 0) {
-      if (m_doIBL) ld--;
-      const int em = pixID->eta_module(id);
-      if (ld == 0) B0->Fill(em, pm, Index);
-      else if (ld == 1) B1->Fill(em, pm, Index);
-      else if (ld == 2) B2->Fill(em, pm, Index);
-      else if (ld == -1) {
-         int feid = 0;
-         int emf = 0;
-         bool dep = false;
-         if (em < 6 && em > -7) {
-            if (pixID->eta_index(id) >= 80) feid = 1;
-            emf = 2 * em + feid; 
-            IBL2D->Fill(em, pm, Index);
-            dep = true;
-         } else if (em < -6) {
-            emf = em - 6;
-            IBL3D->Fill(em + 10, pm, Index);
-         } else {
-            emf = em + 6;
-            IBL3D->Fill(em - 2, pm, Index);
-         }
-         IBL->Fill(emf, pm, Index);
-         if (dep) IBL->Fill(emf + 1, pm, Index); /// Temporary!!!! should be removed later
-      }
-   }
-}
-
-void PixelMonProfiles::formatHist()
-{
-   const int ndisk = 3;
-   const int nphi  = 48;
-   const char *disk[ndisk] = { "Disk 1", "Disk 2", "Disk 3" };
-   const int nmod = 13;
-   const int nmodIBL2D = 12;
-   const int nmodIBL3D = 8;
-   const int nmodIBL = 32;
-   const char *mod[nmod] = { "M6C", "M5C", "M4C", "M3C", "M2C", "M1C","M0", "M1A", "M2A", "M3A", "M4A", "M5A", "M6A" } ;
-   const char *modIBL2D[nmodIBL2D] = { "M3_C6", "M3_C5", "M2_C4", "M1_C3", "M1_C2", "M1_C1", "M1_A1", "M1_A2", "M2_A3", "M2_A4", "M3_A5", "M3_A6" } ;
-   const char *modIBL3D[nmodIBL3D] = {"M4_C8_2","M4_C8_1","M4_C7_2","M4_C7_1","M4_A7_1","M4_A7_2","M4_A8_1","M4_A8_2"};
-
-   const char *modIBL[nmodIBL] = {"C8","","C7","",
-				  "C6","","C5","",
-				  "C4","","C3","",
-				  "C2","","C1","",
-				  "A1","","A2","",
-				  "A3","","A4","",
-				  "A5","","A6","",
-				  "A7","","A8",""};
-
-   const int nstaveb = 14;
-   const char *staveb[nstaveb] = {
-      "S01", "S02", "S03", "S04", "S05", "S06","S07",
-      "S08", "S09", "S10", "S11", "S12", "S13","S14"};
-   const int nstave0 = 22;
-
-   const char *stave0[nstave0] = {
-      "B11_S2", "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1",
-      "B03_S2", "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1",
-      "B06_S2", "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1",
-      "B09_S2", "B10_S1", "B10_S2", "B11_S1" };
-   const int nstave1 = 38;
-   const char *stave1[nstave1] = {
-      "B01_S1", "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2",
-      "B04_S1", "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2",
-      "B07_S1", "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2",
-      "B10_S1", "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2",
-      "B13_S1", "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2",
-      "B16_S1", "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2",
-      "B19_S1", "B19_S2" };
-   const int nstave2 = 52;
-   const char *stave2[nstave2] = {          
-      "B01_S2", "B02_S1", "B02_S2", "B03_S1", "B03_S2", "B04_S1",
-      "B04_S2", "B05_S1", "B05_S2", "B06_S1", "B06_S2", "B07_S1",
-      "B07_S2", "B08_S1", "B08_S2", "B09_S1", "B09_S2", "B10_S1",
-      "B10_S2", "B11_S1", "B11_S2", "B12_S1", "B12_S2", "B13_S1",
-      "B13_S2", "B14_S1", "B14_S2", "B15_S1", "B15_S2", "B16_S1",
-      "B16_S2", "B17_S1", "B17_S2", "B18_S1", "B18_S2", "B19_S1",
-      "B19_S2", "B20_S1", "B20_S2", "B21_S1", "B21_S2", "B22_S1",
-      "B22_S2", "B23_S1", "B23_S2", "B24_S1", "B24_S2", "B25_S1",
-      "B25_S2", "B26_S1", "B26_S2", "B01_S1" };
-   const char *nstaveA[nphi] = {
-      "B01_S2_M1", "B01_S2_M6", "B01_S2_M2", "B01_S2_M5", "B01_S2_M3", "B01_S2_M4", 
-      "B02_S1_M1", "B02_S1_M6", "B02_S1_M2", "B02_S1_M5", "B02_S1_M3", "B02_S1_M4", 
-      "B02_S2_M1", "B02_S2_M6", "B02_S2_M2", "B02_S2_M5", "B02_S2_M3", "B02_S2_M4", 
-      "B03_S1_M1", "B03_S1_M6", "B03_S1_M2", "B03_S1_M5", "B03_S1_M3", "B03_S1_M4", 
-      "B03_S2_M1", "B03_S2_M6", "B03_S2_M2", "B03_S2_M5", "B03_S2_M3", "B03_S2_M4", 
-      "B04_S1_M1", "B04_S1_M6", "B04_S1_M2", "B04_S1_M5", "B04_S1_M3", "B04_S1_M4", 
-      "B04_S2_M1", "B04_S2_M6", "B04_S2_M2", "B04_S2_M5", "B04_S2_M3", "B04_S2_M4", 
-      "B01_S1_M1", "B01_S1_M6", "B01_S1_M2", "B01_S1_M5", "B01_S1_M3", "B01_S1_M4"};
-   const char *nstaveC[nphi] = {
-      "B01_S2_M4", "B01_S2_M3", "B01_S2_M5", "B01_S2_M2", "B01_S2_M6", "B01_S2_M1", 
-      "B02_S1_M4", "B02_S1_M3", "B02_S1_M5", "B02_S1_M2", "B02_S1_M6", "B02_S1_M1", 
-      "B02_S2_M4", "B02_S2_M3", "B02_S2_M5", "B02_S2_M2", "B02_S2_M6", "B02_S2_M1", 
-      "B03_S1_M4", "B03_S1_M3", "B03_S1_M5", "B03_S1_M2", "B03_S1_M6", "B03_S1_M1", 
-      "B03_S2_M4", "B03_S2_M3", "B03_S2_M5", "B03_S2_M2", "B03_S2_M6", "B03_S2_M1", 
-      "B04_S1_M4", "B04_S1_M3", "B04_S1_M5", "B04_S1_M2", "B04_S1_M6", "B04_S1_M1", 
-      "B04_S2_M4", "B04_S2_M3", "B04_S2_M5", "B04_S2_M2", "B04_S2_M6", "B04_S2_M1", 
-      "B01_S1_M4", "B01_S1_M3", "B01_S1_M5", "B01_S1_M2", "B01_S1_M6", "B01_S1_M1"};
-
-
-   for (int i = 0; i < nphi; i++) {
-      A->GetYaxis()->SetBinLabel(i + 1, nstaveA[i]);
-      C->GetYaxis()->SetBinLabel(i + 1, nstaveC[i]);
-   }
-   for (int i = 0; i < ndisk; i++) {
-      A->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-      C->GetXaxis()->SetBinLabel(i + 1, disk[i]);
-   }
-   for (int i = 0; i < nmod; i++) {
-      B0->GetXaxis()->SetBinLabel(i + 1, mod[i]);  // bin 0 is underflow
-      B1->GetXaxis()->SetBinLabel(i + 1, mod[i]);
-      B2->GetXaxis()->SetBinLabel(i + 1, mod[i]);
-   }
-
-   for (int i = 0; i < nmodIBL; i++) {
-      IBL->GetXaxis()->SetBinLabel(i + 1, modIBL[i]);
-   }
-   for (int i = 0; i < nstaveb; i++) {
-      IBL->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
-   }
-
-   for (int i = 0; i < nmodIBL2D; i++) {
-      IBL2D->GetXaxis()->SetBinLabel(i + 1, modIBL2D[i]);
-   }
-   for (int i = 0; i < nstaveb; i++) {
-      IBL2D->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
-   }
-   for (int i = 0; i < nmodIBL3D; i++) {
-      IBL3D->GetXaxis()->SetBinLabel(i + 1, modIBL3D[i]);
-   }
-   for (int i = 0; i < nstaveb; i++) {
-      IBL3D->GetYaxis()->SetBinLabel(i + 1, staveb[i]);
-   }
-   for (int i = 0; i < nstave0; i++) {
-      B0->GetYaxis()->SetBinLabel(i + 1, stave0[i]); 
-   }
-   for (int i = 0; i < nstave1; i++) {
-      B1->GetYaxis()->SetBinLabel(i + 1, stave1[i]); 
-   }
-   for (int i = 0; i < nstave2; i++) {
-      B2->GetYaxis()->SetBinLabel(i + 1, stave2[i]); 
-   }
-
-   //Make the text smaller
-   IBL2D->GetYaxis()->SetLabelSize(0.03);
-   IBL3D->GetYaxis()->SetLabelSize(0.03);
-   IBL->GetYaxis()->SetLabelSize(0.03);
-   B0->GetYaxis()->SetLabelSize(0.03);
-   B1->GetYaxis()->SetLabelSize(0.03);
-   B2->GetYaxis()->SetLabelSize(0.03);
-   A->GetYaxis()->SetLabelSize(0.02);
-   C->GetYaxis()->SetLabelSize(0.02);
-   //put histograms in the easier to read colz format
-   IBL->SetOption("colz");
-   IBL2D->SetOption("colz");
-   IBL3D->SetOption("colz");
-   B0->SetOption("colz");
-   B1->SetOption("colz");
-   B2->SetOption("colz");
-   A->SetOption("colz");
-   C->SetOption("colz");
-   //force the minimum to be 0 so you can spot empty blocks easily
-   IBL->SetMinimum(0.);   
-   IBL2D->SetMinimum(0.);
-   IBL3D->SetMinimum(0.);
-   B0->SetMinimum(0.);     
-   B1->SetMinimum(0.);   
-   B2->SetMinimum(0.);   
-   A->SetMinimum(0.);     
-   C->SetMinimum(0.);    
-}
-
-StatusCode PixelMonProfiles::regHist(ManagedMonitorToolBase::MonGroup &group)
-{
-   StatusCode sc = StatusCode::SUCCESS;
-   if (group.regHist(IBL2D).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(IBL3D).isFailure()) sc = StatusCode::FAILURE;
-   if (group.regHist(IBL).isFailure())   sc = StatusCode::FAILURE;
-   if (group.regHist(B0).isFailure())    sc = StatusCode::FAILURE;
-   if (group.regHist(B1).isFailure())    sc = StatusCode::FAILURE;
-   if (group.regHist(B2).isFailure())    sc = StatusCode::FAILURE;
-   if (group.regHist(A).isFailure())     sc = StatusCode::FAILURE;
-   if (group.regHist(C).isFailure())     sc = StatusCode::FAILURE;
-   return sc;
-}
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/SpacePoints.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/SpacePoints.cxx
index a7b1ab8ad23ea5681cdbaf79ab6824941069980d..000c95300fb98023f3c1dc03d454c93d33328a74 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/SpacePoints.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/SpacePoints.cxx
@@ -7,13 +7,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "PixelMonitoring/PixelMainMon.h"
-//#include "InDetRawData/InDetTimeCollection.h"
 #include "TrkSpacePoint/SpacePointContainer.h"
-//#include "InDetPrepRawData/PixelClusterContainer.h"         
-//#include "TrkParameters/MeasuredAtaPlane.h"
-//#include "TrkParameters/MeasuredPerigee.h"
-//#include "InDetRIO_OnTrack/SiClusterOnTrack.h"
-//#include "PixelConditionsServices/IPixelByteStreamErrorsSvc.h"
 #include "InDetIdentifier/PixelID.h"
 #include "TH1F.h"   
 #include "TH1I.h"   
@@ -25,12 +19,6 @@
 #include "LWHists/TH2I_LW.h"
 #include <sstream>
 
-//#include "InDetRawData/InDetRawDataContainer.h"
-//#include "InDetRawData/InDetRawDataCLASS_DEF.h" 
-//#include "TrkTrack/TrackCollection.h"            
-//#include "InDetReadoutGeometry/SiDetectorElement.h"
-//#include "TrkTrackSummary/TrackSummary.h"
-#include "PixelMonitoring/PixelMon2DMaps.h"
 #include "PixelMonitoring/PixelMonModules.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 
@@ -41,83 +29,73 @@
 
 StatusCode PixelMainMon::BookSpacePointMon(void)
 {
+  ATH_MSG_DEBUG("Start booking SpacePoint histogtams..");
   std::string path = "Pixel/SpacePoint";
-   if(m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/SpacePointOnTrack");
-   if(m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/SpacePointOnPixelTrack");
+  if (m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/SpacePointOnTrack");
 
-   StatusCode sc;
-   MonGroup spacePointHistos( this, path.c_str(),run,ATTRIB_MANAGED ); //declare a group of histograms
-   if(m_doHighOccupancy)
-   {
-     sc = spacePointHistos.regHist(m_num_spacepoints = TH1I_LW::create("num_spacepoints",  ("number of pixel spacepoint hits per event" + m_histTitleExt + ";# spacepoints;# events").c_str(), 100,0.,25000));
-   }
-   if(m_doLowOccupancy)
-   {
-      sc = spacePointHistos.regHist(m_num_spacepoints_low = TH1I_LW::create("num_spacepoints_low_occupancy",  ("number of pixel spacepoint hits per event" + m_histTitleExt + ";# spacepoints;# events").c_str(), 100,-0.5,99.5));
-   }
-   sc = spacePointHistos.regHist(m_spHit_x   = TH1F_LW::create("pixel_sp_x",("x location of hit" + m_histTitleExt + ";x (mm);# hits").c_str(),320,-160.,160.));                                                      //add each histogram to this group
-   sc = spacePointHistos.regHist(m_spHit_y   = TH1F_LW::create("pixel_sp_y",("y location of hit" + m_histTitleExt + ";y (mm);# hits").c_str(),320,-160.,160.));                                                      //summary means the type of histogram (summary, shifter, expert)
-   sc = spacePointHistos.regHist(m_spHit_z   = TH1F_LW::create("pixel_sp_z",("z location of hit" + m_histTitleExt + ";z (mm);# hits").c_str(),660,-660.,660.));                                                      //all is for what to integrate over (all, lumiblock, run....)
-   sc = spacePointHistos.regHist(m_spHit_r   = TH1F_LW::create("pixel_sp_r",("r location of hit" + m_histTitleExt + ";r (mm);# hits").c_str(),230,-0.  ,230.));                                                      //all is for what to integrate over (all, lumiblock, run....)
-   sc = spacePointHistos.regHist(m_spHit_phi = TH1F_LW::create("pixel_sp_phi",("phi location of hit" + m_histTitleExt + ";phi (mm);# hits").c_str(),60,-4.,4.));                                                      //all is for what to integrate over (all, lumiblock, run....)
-   sc = spacePointHistos.regHist(m_spHit_xy  = TH2F_LW::create("pixel_sp_x_vs_y",("xy location of barrel hits" + m_histTitleExt + ";x (mm);y (mm)").c_str(),100,-160,160,100,-160,160));                                                      //all is for what to integrate over (all, lumiblock, run....)
-   sc = spacePointHistos.regHist(m_spHit_rz  = TH2F_LW::create("pixel_sp_r_vs_z",("rz location of hit" + m_histTitleExt + ";z (mm);r (mm)").c_str(),200,-665,665,200,-0,165));                                                      //all is for what to integrate over (all, lumiblock, run....)
+  bool st(true);
+  MonGroup spacePointHistos( this, path.c_str(),run,ATTRIB_MANAGED );
+  if (m_doHighOccupancy) {
+    st &= spacePointHistos.regHist(m_num_spacepoints = TH1I_LW::create("num_spacepoints",  ("number of pixel spacepoint hits per event" + m_histTitleExt + ";# spacepoints;# events").c_str(), 100,0.,25000)).isSuccess();
+  }
+  if (m_doLowOccupancy) {
+    st &= spacePointHistos.regHist(m_num_spacepoints_low = TH1I_LW::create("num_spacepoints_low_occupancy",  ("number of pixel spacepoint hits per event" + m_histTitleExt + ";# spacepoints;# events").c_str(), 100,-0.5,99.5)).isSuccess();
+  }
+  st &= spacePointHistos.regHist(m_spHit_x   = TH1F_LW::create("pixel_sp_x",("x location of hit" + m_histTitleExt + ";x (mm);# hits").c_str(),320,-160.,160.)).isSuccess();
+  st &= spacePointHistos.regHist(m_spHit_y   = TH1F_LW::create("pixel_sp_y",("y location of hit" + m_histTitleExt + ";y (mm);# hits").c_str(),320,-160.,160.)).isSuccess();
+  st &= spacePointHistos.regHist(m_spHit_z   = TH1F_LW::create("pixel_sp_z",("z location of hit" + m_histTitleExt + ";z (mm);# hits").c_str(),660,-660.,660.)).isSuccess();
+  st &= spacePointHistos.regHist(m_spHit_r   = TH1F_LW::create("pixel_sp_r",("r location of hit" + m_histTitleExt + ";r (mm);# hits").c_str(),230,-0.  ,230.)).isSuccess();
+  st &= spacePointHistos.regHist(m_spHit_phi = TH1F_LW::create("pixel_sp_phi",("phi location of hit" + m_histTitleExt + ";phi (mm);# hits").c_str(),60,-4.,4.)).isSuccess();
+  st &= spacePointHistos.regHist(m_spHit_xy  = TH2F_LW::create("pixel_sp_x_vs_y",("xy location of barrel hits" + m_histTitleExt + ";x (mm);y (mm)").c_str(),100,-160,160,100,-160,160)).isSuccess();
+  st &= spacePointHistos.regHist(m_spHit_rz  = TH2F_LW::create("pixel_sp_r_vs_z",("rz location of hit" + m_histTitleExt + ";z (mm);r (mm)").c_str(),200,-665,665,200,-0,165)).isSuccess();
 
-   if(sc.isFailure())if(msgLvl(MSG::WARNING)) msg(MSG::WARNING)  << "histograms not booked" << endmsg;   
-
-   return StatusCode::SUCCESS;
+  if (!st) ATH_MSG_WARNING("Problems with booking SpacePoint histograms");
+  return StatusCode::SUCCESS;
 }
 
 StatusCode PixelMainMon::FillSpacePointMon(void)
 {
-   StatusCode sc = evtStore()->retrieve(m_Pixel_spcontainer, m_Pixel_SpacePointsName );
-   if (sc.isFailure() || !m_Pixel_spcontainer)
-   {
-      if(msgLvl(MSG::INFO)) msg(MSG::INFO)  <<"SpacePoint container for Pixels not found"<< endmsg;
-      if(m_storegate_errors) m_storegate_errors->Fill(2.,3.);  
+  StatusCode sc = evtStore()->retrieve(m_Pixel_spcontainer, m_Pixel_SpacePointsName );
+  if (sc.isFailure() || !m_Pixel_spcontainer)
+    {
+      ATH_MSG_WARNING("SpacePoint container for Pixels not found");
+      if (m_storegate_errors) m_storegate_errors->Fill(2.,3.);  
       return StatusCode::SUCCESS;
-   } else{
-      if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  <<"Si SpacePoint container for Pixels found" <<endmsg;
-   }
-
-   DataVector<SpacePoint>::const_iterator p_sp;             
-   //std::pair<IdentifierHash, IdentifierHash> sp_clusInfo;
-   //IdentifierHash first_clus;
-   Identifier PixelModuleId;
-   int nhits=0;
-
-   //loop over Pixel space points collections        //loop over rows    
-   for(SpacePointContainer::const_iterator it=m_Pixel_spcontainer->begin(); it!=m_Pixel_spcontainer->end(); ++it)
-   {
+    } else ATH_MSG_DEBUG("Si SpacePoint container for Pixels found");
+  
+  DataVector<SpacePoint>::const_iterator p_sp;             
+  Identifier PixelModuleId;
+  int nhits=0;
+  
+  //loop over Pixel space points collections
+  for (SpacePointContainer::const_iterator it=m_Pixel_spcontainer->begin(); it!=m_Pixel_spcontainer->end(); ++it)
+    {
       const SpacePointCollection *colNext=&(**it);
       if (!colNext)
-      {
-         if(m_storegate_errors) m_storegate_errors->Fill(2.,5.);  //first entry (1). is for SP, second (4) is for data problem
-         continue;
-      }
-
-      for(p_sp=colNext->begin(); p_sp!=colNext->end(); ++p_sp)  //loop over columns
-      {
-         const SpacePoint& sp = **p_sp;
-         //sp_clusInfo = sp.elementIdList();
-         //first_clus = sp_clusInfo.first;
-         PixelModuleId =  sp.clusterList().first->identify();
-
-         if(m_doOnTrack || m_doOnPixelTrack) if(!OnTrack(PixelModuleId,true) )continue; //if we only want hits on track, and the hit is NOT on the track, skip filling
-	 Amg::Vector3D point = sp.globalPosition();
-
-	 if(m_spHit_x)m_spHit_x->Fill(point.x());     // spacepoint x.
-         if(m_spHit_y)m_spHit_y->Fill(point.y());     // spacepoint y.
-         if(m_spHit_z)m_spHit_z->Fill(point.z());     // spacepoint z.
-         if(m_spHit_r)m_spHit_r->Fill(sqrt(point.y()*point.y() + point.x()*point.x()));     // spacepoint r.
-         if(m_spHit_phi)m_spHit_phi->Fill(point.phi());     // spacepoint phi.
-         if(m_spHit_xy && fabs(point.z()) < 400)m_spHit_xy->Fill(point.x(),point.y());
-         if(m_spHit_rz)m_spHit_rz->Fill(point.z(),sqrt(point.y()*point.y() + point.x()*point.x()));
-         nhits++;
-      }  //end cols
-   }     //end rows
-   if(m_num_spacepoints)m_num_spacepoints->Fill(nhits);
-   if(m_num_spacepoints_low)m_num_spacepoints_low->Fill(nhits);
-   if(nhits==0 && m_storegate_errors) m_storegate_errors->Fill(2.,4.);//first entry for sp, second for size = 0
-   return StatusCode::SUCCESS;
+	{
+	  if (m_storegate_errors) m_storegate_errors->Fill(2.,5.);  //first entry (1). is for SP, second (4) is for data problem
+	  continue;
+	}
+      for (p_sp=colNext->begin(); p_sp!=colNext->end(); ++p_sp)
+	{
+	  const SpacePoint& sp = **p_sp;
+	  PixelModuleId =  sp.clusterList().first->identify();
+	  
+	  if (m_doOnTrack) if (!OnTrack(PixelModuleId,true) ) continue; //if we only want hits on track, and the hit is NOT on the track, skip filling
+	  Amg::Vector3D point = sp.globalPosition();
+	  
+	  if (m_spHit_x) m_spHit_x->Fill(point.x());
+	  if (m_spHit_y) m_spHit_y->Fill(point.y());
+	  if (m_spHit_z) m_spHit_z->Fill(point.z());
+	  if (m_spHit_r) m_spHit_r->Fill(sqrt(point.y()*point.y() + point.x()*point.x()));     // spacepoint r.
+	  if (m_spHit_phi) m_spHit_phi->Fill(point.phi());                                     // spacepoint phi.
+	  if (m_spHit_xy && fabs(point.z()) < 400) m_spHit_xy->Fill(point.x(),point.y());
+	  if (m_spHit_rz) m_spHit_rz->Fill(point.z(),sqrt(point.y()*point.y() + point.x()*point.x()));
+	  nhits++;
+	} 
+    }
+  if (m_num_spacepoints) m_num_spacepoints->Fill(nhits);
+  if (m_num_spacepoints_low) m_num_spacepoints_low->Fill(nhits);
+  if (nhits==0 && m_storegate_errors) m_storegate_errors->Fill(2.,4.); //first entry for sp, second for size = 0
+  return StatusCode::SUCCESS;
 }
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Status.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Status.cxx
index 4bfac3004ae19bce19371bd9563aff0838b4de48..4d64a8ffad036a28246de36a5c19698185558617 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Status.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Status.cxx
@@ -21,9 +21,11 @@
 #include "LWHists/TProfile_LW.h"
 #include "InDetIdentifier/PixelID.h"
 #include <sstream>
-#include "PixelMonitoring/PixelMon2DMaps.h"
+
+#include "PixelMonitoring/Components.h"
+#include "PixelMonitoring/PixelMon2DMapsLW.h"
+#include "PixelMonitoring/PixelMon2DProfilesLW.h"
 #include "PixelMonitoring/PixelMonModules.h"
-#include "PixelMonitoring/PixelMonProfiles.h"
 
 ///////////////////////////////////////////////////////////////////////////////
 //////////////////////booking methods//////////////////////////////////////////
@@ -35,7 +37,6 @@ StatusCode PixelMainMon::BookStatusMon(void)
 
   std::string path = "Pixel/Status";
   if (m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/StatusOnTrack");
-  if (m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/StatusOnPixelTrack");
   MonGroup statusHistos( this, path.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms
 
   // use the following definitions for modules states:
@@ -45,24 +46,24 @@ StatusCode PixelMainMon::BookStatusMon(void)
 
   StatusCode sc;
 
-  m_status = new PixelMonProfiles("Map_Of_Modules_Status", ("Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive)" + m_histTitleExt).c_str(), m_doIBL);
+  m_status = new PixelMon2DProfilesLW("Map_Of_Modules_Status", ("Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive)" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true);
   sc = m_status->regHist(statusHistos);
   m_status->SetMaxValue( 2.0 );
 
-  m_status_mon = new PixelMonProfiles("Map_Of_Modules_Status_Mon", ("Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive) for monitoring" + m_histTitleExt).c_str(), m_doIBL);
+  m_status_mon = new PixelMon2DProfilesLW("Map_Of_Modules_Status_Mon", ("Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive) for monitoring" + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true);
   sc = m_status_mon->regHist(statusHistos);
   m_status_mon->SetMaxValue( 2.0 );
 
   if (m_doModules)
     {
-      m_Status_modules = new PixelMonModules1D("Status_of_Module", ("Module Status (0=Active+Good, 1=Active+Bad, 2=Inactive)" + m_histTitleExt + ";Status").c_str(),2,0,2,m_doIBL);
+      m_Status_modules = new PixelMonModules1D("Status_of_Module", ("Module Status (0=Active+Good, 1=Active+Bad, 2=Inactive)" + m_histTitleExt + ";Status").c_str(),2,0,2);
       sc = m_Status_modules->regHist(this, (path+"/Modules_Status").c_str(),run);
       m_Status_modules->SetBinLabel( "Status",2 ); 
       m_Status_modules->formatHist("status");
     }
   if (m_doOffline)
     { 
-      m_dqStatus = new PixelMon2DMaps("Ok_modules", ("module problems, empty bin means dead module not listed in status database"+ m_histTitleExt).c_str(), m_doIBL);
+      m_dqStatus = new PixelMon2DMapsLW("Ok_modules", ("module problems, empty bin means dead module not listed in status database"+ m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D);
       sc = m_dqStatus->regHist(statusHistos);
     }
 
@@ -103,10 +104,9 @@ StatusCode PixelMainMon::BookStatusLumiBlockMon(void)
 
   std::string path = "Pixel/LumiBlock";
   if (m_doOnTrack)      path.replace(path.begin(), path.end(), "Pixel/LumiBlockOnTrack");
-  if (m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/LumiBlockOnPixelTrack");
   MonGroup lumiBlockHist(this, path.c_str(), lowStat, ATTRIB_MANAGED);
 
-  m_status_LB = new PixelMonProfiles("Map_Of_Modules_Status_LB", ("Module Status (0=Active+Good, 1=Active+Bad, 2=Inactive)"+ m_histTitleExt).c_str(), m_doIBL);
+  m_status_LB = new PixelMon2DProfilesLW("Map_Of_Modules_Status_LB", ("Module Status (0=Active+Good, 1=Active+Bad, 2=Inactive)"+ m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true);
   StatusCode sc = m_status_LB->regHist(lumiBlockHist);
   m_status_LB->SetMaxValue( 2.0 );
      
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx
index fe9b6c09254d6c580a1e573974954cc80d697636..b16e89dd2ba423774a65670272d5f3c125c354bb 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx
@@ -35,7 +35,7 @@
 #include "TrkTrackSummary/TrackSummary.h"
 #include "TrkTrackSummary/InDetTrackSummary.h"
 #include "TrkToolInterfaces/ITrackHoleSearchTool.h"
-#include "PixelMonitoring/PixelMon2DMaps.h"
+#include "PixelMonitoring/Components.h"
 #include "PixelMonitoring/PixelMon2DMapsLW.h"
 #include "PixelMonitoring/PixelMon2DProfilesLW.h"
 #include "PixelMonitoring/PixelMonModules.h"
@@ -48,12 +48,11 @@
 ///////////////////////////////////////////////////////////////////////////////
 StatusCode PixelMainMon::BookTrackMon(void)
 {
-  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "starting Book Tracks" << endmsg;  
+  ATH_MSG_DEBUG("Start booking Track histogtams.."); 
   
   std::string path = "Pixel/Track";
-  if(m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/TrackOnTrack");
-  if(m_doOnPixelTrack) path.replace(path.begin(), path.end(), "Pixel/TrackOnPixelTrack");
-  MonGroup trackHistos( this, path.c_str(), run, ATTRIB_MANAGED ); //declare a group of histograms
+  if (m_doOnTrack) path.replace(path.begin(), path.end(), "Pixel/TrackOnTrack");
+  MonGroup trackHistos( this, path.c_str(), run, ATTRIB_MANAGED ); //declare a group of track histograms
   
   std::string modlabel[9];
   modlabel[0]="ECA"; modlabel[1]="ECC";
@@ -104,41 +103,35 @@ StatusCode PixelMainMon::BookTrackMon(void)
   if (m_LorentzAngle_B0)    m_LorentzAngle_B0->SetOption("colz");
   if (m_LorentzAngle_B1)    m_LorentzAngle_B1->SetOption("colz");
   if (m_LorentzAngle_B2)    m_LorentzAngle_B2->SetOption("colz");
-  
-  sc=trackHistos.regHist(m_degFactorMap_per_lumi = TProfile_LW::create("degFactorMap_per_lumi", ("deg. factor per lumi" + m_histTitleExt + ";lumi block;avg deg. factor").c_str(), nbins_LB, min_LB, max_LB));
-  sc=trackHistos.regHist(m_degFactorMap = TProfile2D_LW::create("degFactorMap", ("deg. factor map" + m_histTitleExt + ";track #eta;track #phi").c_str(), 60, -3.0, 3.0, 60, -3.0, 3.0));
-  m_degFactorMap->SetOption("colz");
-  m_degFactorMap->SetMinimum(1.0);
-  m_degFactorMap->SetMaximum(2.0);
-  
+    
   if (m_do2DMaps && !m_doOnline) {
-    m_tsos_hitmap = new PixelMon2DMapsLW("TSOS_Measurement", ("TSOS of type Measurement" + m_histTitleExt), m_doIBL);
+    m_tsos_hitmap = new PixelMon2DMapsLW("TSOS_Measurement", ("TSOS of type Measurement" + m_histTitleExt), PixMon::HistConf::kPixDBMIBL2D3D, true);
     sc = m_tsos_hitmap->regHist(trackHistos);
-    m_tsos_holemap = new PixelMon2DMapsLW("TSOS_Hole", ("TSOS of type Hole" + m_histTitleExt), m_doIBL);
+    m_tsos_holemap = new PixelMon2DMapsLW("TSOS_Hole", ("TSOS of type Hole" + m_histTitleExt), PixMon::HistConf::kPixDBMIBL2D3D, true);
     sc = m_tsos_holemap->regHist(trackHistos);
-    m_tsos_outliermap = new PixelMon2DMapsLW("TSOS_Outlier", ("TSOS of type Outlier" + m_histTitleExt), m_doIBL);
+    m_tsos_outliermap = new PixelMon2DMapsLW("TSOS_Outlier", ("TSOS of type Outlier" + m_histTitleExt), PixMon::HistConf::kPixDBMIBL2D3D, true);
     sc = m_tsos_outliermap->regHist(trackHistos);
     
-    //m_tsos_measratio = new PixelMon2DProfilesLW("TSOS_MeasRatio", ("TSOS of type Meas per track" + m_histTitleExt), m_doIBL, false, true);
+    //m_tsos_measratio = new PixelMon2DProfilesLW("TSOS_MeasRatio", ("TSOS of type Meas per track" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true);
     //sc = m_tsos_measratio->regHist(trackHistos);
-    //m_tsos_holeratio = new PixelMon2DProfilesLW("TSOS_HoleRatio", ("TSOS of type Hole per track" + m_histTitleExt), m_doIBL, false, true);
+    //m_tsos_holeratio = new PixelMon2DProfilesLW("TSOS_HoleRatio", ("TSOS of type Hole per track" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true);
     //sc = m_tsos_holeratio->regHist(trackHistos);
-    //m_misshits_ratio = new PixelMon2DProfilesLW("MissHitsRatioOnTrack", ("Hole+Outlier per track" + m_histTitleExt), m_doIBL, false, true);
+    //m_misshits_ratio = new PixelMon2DProfilesLW("MissHitsRatioOnTrack", ("Hole+Outlier per track" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true);
     //sc = m_misshits_ratio->regHist(trackHistos);
   }
   if (m_doOnline) {
-    m_tsos_holeratio_tmp = new PixelMon2DProfilesLW("HoleRatio_tmp", ("TSOS of type Hole per track tmp" + m_histTitleExt), m_doIBL, false, true);
+    m_tsos_holeratio_tmp = new PixelMon2DProfilesLW("HoleRatio_tmp", ("TSOS of type Hole per track tmp" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true);
     sc = m_tsos_holeratio_tmp->regHist(trackHistos);
-    m_tsos_holeratio_mon = new PixelMon2DProfilesLW("HoleRatio_mon", ("TSOS of type Hole per track for monitoring" + m_histTitleExt), m_doIBL, false, true);
+    m_tsos_holeratio_mon = new PixelMon2DProfilesLW("HoleRatio_mon", ("TSOS of type Hole per track for monitoring" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true);
     sc = m_tsos_holeratio_mon->regHist(trackHistos);
-    m_misshits_ratio_tmp = new PixelMon2DProfilesLW("MissHitsRatioOnTrack_tmp", ("Hole+Outlier per track" + m_histTitleExt), m_doIBL, false, true);
+    m_misshits_ratio_tmp = new PixelMon2DProfilesLW("MissHitsRatioOnTrack_tmp", ("Hole+Outlier per track" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true);
     sc = m_misshits_ratio_tmp->regHist(trackHistos);
-    m_misshits_ratio_mon = new PixelMon2DProfilesLW("MissHitsRatioOnTrack_mon", ("Hole+Outlier per track for monitoring" + m_histTitleExt), m_doIBL, false, true);
+    m_misshits_ratio_mon = new PixelMon2DProfilesLW("MissHitsRatioOnTrack_mon", ("Hole+Outlier per track for monitoring" + m_histTitleExt), PixMon::HistConf::kPixIBL2D3D, true);
     sc = m_misshits_ratio_mon->regHist(trackHistos);
   }
   
-  if (m_doModules) {
-    m_tsos_hiteff_vs_lumi = new PixelMonModulesProf("TSOS_HitEfficiency",("TSOS-based hit efficiency in module" + m_histTitleExt).c_str(),2500,-0.5,2499.5,m_doIBL);
+  if (m_doModules && !m_doOnTrack) { // tbc essentially code weren't used since doModules was enabled only for AllHits; to keep it disabled also now !m_doOnTrack switch was added
+    m_tsos_hiteff_vs_lumi = new PixelMonModulesProf("TSOS_HitEfficiency",("TSOS-based hit efficiency in module" + m_histTitleExt).c_str(),2500,-0.5,2499.5);
     sc = m_tsos_hiteff_vs_lumi->regHist(this,(path+"/Modules_TSOSHitEff").c_str(),run);
     if (!m_doOnline) {
       sc=trackHistos.regHist(m_clustot_lowpt = TH1F_LW::create("m_clustot_lowpt",("Cluster ToT vs Track pT (pT<10GeV)" + m_histTitleExt + "; Track pT; Cluster ToT (on track)").c_str(),250,0,250));
@@ -163,13 +156,13 @@ StatusCode PixelMainMon::BookTrackMon(void)
     sc = trackHistos.regHist(m_hiteff_incl_mod[i] = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB));
   }
 
-  if (sc.isFailure())if(msgLvl(MSG::WARNING)) msg(MSG::WARNING)  << "histograms not booked" << endmsg;   
+  if (sc.isFailure()) ATH_MSG_WARNING("Problems with booking Track histograms");
   return StatusCode::SUCCESS;
 }
 
 StatusCode PixelMainMon::FillTrackMon(void)
 {
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "MainFillTrackMon" << endmsg;  
+  ATH_MSG_DEBUG("Filling Track Monitoring Histograms");
 
   ///
   /// Retrieve and Check Store Gate Error
@@ -178,13 +171,13 @@ StatusCode PixelMainMon::FillTrackMon(void)
   sc = evtStore()->retrieve(m_tracks, m_TracksName);
   if (sc.isFailure())
     {
-      if (msgLvl(MSG::INFO)) msg(MSG::INFO)  <<"No tracks in StoreGate found"<< endmsg;
+      ATH_MSG_INFO("No tracks in StoreGate found");
       if (m_storegate_errors) m_storegate_errors->Fill(4.,3.);  
       return StatusCode::SUCCESS;
     } 
   else 
     {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  <<"Tracks in StoreGate found" <<endmsg;
+      ATH_MSG_DEBUG("Tracks in StoreGate found");
     }
 
   m_ntracksPerEvent = 0;
@@ -193,8 +186,10 @@ StatusCode PixelMainMon::FillTrackMon(void)
   ///
   /// Clear
   ///
-  if (m_doOnTrack || m_doOnPixelTrack)m_RDOIDs.clear();//reset these so you can fill them with the new id's
-  if (m_doOnTrack || m_doOnPixelTrack)m_ClusterIDs.clear();
+  if (m_doOnTrack) {
+    m_RDOIDs.clear();//reset these so you can fill them with the new id's
+    m_ClusterIDs.clear();
+  }
 
    
   ///
@@ -204,18 +199,16 @@ StatusCode PixelMainMon::FillTrackMon(void)
     {
       const Trk::Track *track0=(*m_tracks)[i];
       if (track0 == 0) {
-	if (msgLvl(MSG::ERROR) ) msg(MSG::ERROR) << "no pointer to track!!!" << endmsg; 
+	ATH_MSG_ERROR("no valid pointer to track!!!");
 	break;
       }
 
-      float degradationFactor = 1.0;
       int nholes=-1;
       int nbadclus=0;
       int ngoodclus=0;
       bool passQualityCut = false;
       bool passTightCut = false;
       bool pass1hole2GeVTightCut = false;
-      int hitsArrayLayer[PixLayer::COUNT] = {0};
       
       const Trk::TrackParameters *trkParameters = 0;
       const Trk::TrackSummary* summary = track0->trackSummary();
@@ -227,7 +220,7 @@ StatusCode PixelMainMon::FillTrackMon(void)
       if (summary) {
       	if (summary->get(Trk::numberOfPixelHits)==0) continue;
       } else {
-      	if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "No Track Summary Found" << endmsg; 
+      	ATH_MSG_INFO("No Track Summary Found"); 
 	continue;
       }
 
@@ -271,7 +264,7 @@ StatusCode PixelMainMon::FillTrackMon(void)
       /// TSOS Loop
       ///
       const DataVector< const Trk::TrackStateOnSurface>* trackStates=track->trackStateOnSurfaces();
-      for(DataVector< const Trk::TrackStateOnSurface>::const_iterator trackStateOnSurfaceIterator=trackStates->begin(); trackStateOnSurfaceIterator!=trackStates->end(); trackStateOnSurfaceIterator++)
+      for (DataVector< const Trk::TrackStateOnSurface>::const_iterator trackStateOnSurfaceIterator=trackStates->begin(); trackStateOnSurfaceIterator!=trackStates->end(); trackStateOnSurfaceIterator++)
       {
 	/// Change the track state on 1 surface into the cluster it represents
 	Identifier clusID;
@@ -300,8 +293,8 @@ StatusCode PixelMainMon::FillTrackMon(void)
 	  surfaceID = mesb->associatedSurface().associatedDetectorElement()->identify();
 	  side = dynamic_cast<const InDetDD::SiDetectorElement *>( mesb->associatedSurface().associatedDetectorElement() );
 	} else { // holes, perigee                                                                              
-	  if(not (*trackStateOnSurfaceIterator)->trackParameters() ) {
-	    msg(MSG::INFO) << "pointer of TSOS to track parameters or associated surface is null" << endmsg;
+	  if (not (*trackStateOnSurfaceIterator)->trackParameters() ) {
+	    ATH_MSG_INFO("pointer of TSOS to track parameters or associated surface is null");
 	    continue;
 	  }
 	  surfaceID = (*trackStateOnSurfaceIterator)->trackParameters()->associatedSurface().associatedDetectorElementIdentifier();//check ptr
@@ -311,7 +304,6 @@ StatusCode PixelMainMon::FillTrackMon(void)
 
 	int pixlayer = GetPixLayerID(m_pixelid->barrel_ec(surfaceID), m_pixelid->layer_disk(surfaceID), m_doIBL);
 	int pixlayerdisk = GetPixLayerDiskID(m_pixelid->barrel_ec(surfaceID), m_pixelid->layer_disk(surfaceID), m_doIBL);
-	//int pixlayerdbm = GetPixLayerIDDBM(m_pixelid->barrel_ec(surfaceID), m_pixelid->layer_disk(surfaceID), m_doIBL);
 	int pixlayeribl2d3d = pixlayer;
 	if ( pixlayeribl2d3d == PixLayer::kIBL ){
 	  pixlayeribl2d3d = GetPixLayerIDIBL2D3D(m_pixelid->barrel_ec(surfaceID), m_pixelid->layer_disk(surfaceID), m_pixelid->eta_module(surfaceID), m_doIBL);
@@ -321,8 +313,7 @@ StatusCode PixelMainMon::FillTrackMon(void)
 	id_hash = m_pixelid->wafer_hash(surfaceID);
 	//bool active = m_pixelCondSummarySvc->isActive(id_hash);
 
-
-	if ((*trackStateOnSurfaceIterator)->type(Trk::TrackStateOnSurface::Measurement)){
+	if ((*trackStateOnSurfaceIterator)->type(Trk::TrackStateOnSurface::Measurement)) {
 	  clus = dynamic_cast< const InDet::SiClusterOnTrack*>(mesb);
 	  if (clus) clusID = clus->identify();
 	  //nMeasurement = 1.0;
@@ -333,117 +324,108 @@ StatusCode PixelMainMon::FillTrackMon(void)
 	  if ( m_hiteff_incl_mod[pixlayerdisk] && pass1hole2GeVTightCut ) m_hiteff_incl_mod[pixlayerdisk]->Fill( m_manager->lumiBlockNumber(), 1.0 );
 	}
          
-         if((*trackStateOnSurfaceIterator)->type(Trk::TrackStateOnSurface::Outlier)){
-           clus = dynamic_cast< const InDet::SiClusterOnTrack*>((*trackStateOnSurfaceIterator)->measurementOnTrack());
-           if(clus) clusID = clus->identify();
-           nOutlier = 1.0;
-
-           if( m_tsos_holemap ) m_tsos_holemap->Fill(surfaceID, m_pixelid);
-           if( m_tsos_hiteff_vs_lumi ) m_tsos_hiteff_vs_lumi->Fill(m_manager->lumiBlockNumber(),0.,surfaceID,m_pixelid);
-           //if( m_hiteff_incl_mod[pixlayerdisk] && passQualityCut ) m_hiteff_incl_mod[pixlayerdisk]->Fill( m_manager->lumiBlockNumber(), 0.0 );
-           if( m_hiteff_incl_mod[pixlayerdisk] && pass1hole2GeVTightCut ) m_hiteff_incl_mod[pixlayerdisk]->Fill( m_manager->lumiBlockNumber(), 0.0 );
-         }
+	if ((*trackStateOnSurfaceIterator)->type(Trk::TrackStateOnSurface::Outlier)) {
+	  clus = dynamic_cast< const InDet::SiClusterOnTrack*>((*trackStateOnSurfaceIterator)->measurementOnTrack());
+	  if (clus) clusID = clus->identify();
+	  nOutlier = 1.0;
+
+	  if ( m_tsos_holemap ) m_tsos_holemap->Fill(surfaceID, m_pixelid);
+	  if ( m_tsos_hiteff_vs_lumi ) m_tsos_hiteff_vs_lumi->Fill(m_manager->lumiBlockNumber(),0.,surfaceID,m_pixelid);
+	  //if( m_hiteff_incl_mod[pixlayerdisk] && passQualityCut ) m_hiteff_incl_mod[pixlayerdisk]->Fill( m_manager->lumiBlockNumber(), 0.0 );
+	  if ( m_hiteff_incl_mod[pixlayerdisk] && pass1hole2GeVTightCut ) m_hiteff_incl_mod[pixlayerdisk]->Fill( m_manager->lumiBlockNumber(), 0.0 );
+	}
           
-         if((*trackStateOnSurfaceIterator)->type(Trk::TrackStateOnSurface::Hole)){
-           clus = dynamic_cast< const InDet::SiClusterOnTrack*>((*trackStateOnSurfaceIterator)->measurementOnTrack());
-           if(clus) clusID = clus->identify();
-           nHole = 1.0;
-
-           if( m_tsos_outliermap)m_tsos_outliermap->Fill(surfaceID, m_pixelid);
-           if( m_tsos_hiteff_vs_lumi) m_tsos_hiteff_vs_lumi->Fill(m_manager->lumiBlockNumber(),0.,surfaceID,m_pixelid);
-           //if( m_hiteff_incl_mod[pixlayerdisk] && passQualityCut ) m_hiteff_incl_mod[pixlayerdisk]->Fill( m_manager->lumiBlockNumber(), 0.0 );
-           if( m_hiteff_incl_mod[pixlayerdisk] && pass1hole2GeVTightCut ) m_hiteff_incl_mod[pixlayerdisk]->Fill( m_manager->lumiBlockNumber(), 0.0 );
-         }
-
-
-         //if(m_tsos_measratio && passQualityCut) m_tsos_measratio->Fill(surfaceID,m_pixelid,nMeasurement);
-         //if(m_tsos_holeratio && passQualityCut) m_tsos_holeratio->Fill(surfaceID,m_pixelid,nHole);
-         if (m_doOnline && m_tsos_holeratio_tmp && passQualityCut) m_tsos_holeratio_tmp->Fill(surfaceID,m_pixelid,nHole);
-         if (passQualityCut) {
-           if (nOutlier + nHole > 0.) {
-             if (m_misshits_ratio) m_misshits_ratio->Fill(surfaceID,m_pixelid,1.0);
-             if (m_doOnline && m_misshits_ratio_tmp) m_misshits_ratio_tmp->Fill(surfaceID,m_pixelid,1.0);
-           } else {
-             if (m_misshits_ratio) m_misshits_ratio->Fill(surfaceID,m_pixelid,0.0);
-             if (m_doOnline && m_misshits_ratio_tmp) m_misshits_ratio_tmp->Fill(surfaceID,m_pixelid,0.0);
-           }
-         }
-
-         ///
-         /// PixelClusters are valid
-         ///
-         if(!(*trackStateOnSurfaceIterator)->type(Trk::TrackStateOnSurface::Measurement)){continue;}
-         if(!clus)continue;
-         const InDet::SiCluster *RawDataClus = dynamic_cast< const InDet::SiCluster*>(clus->prepRawData());
-         if(!RawDataClus)continue;
-         if(!RawDataClus->detectorElement()->isPixel()) continue;
- 
-	      nPixelHits++;//add another pixel hit 
-	      for(unsigned int loopSize=0;loopSize < RawDataClus->rdoList().size(); loopSize++) {
-	        if(m_doOnTrack || m_doOnPixelTrack) m_RDOIDs.push_back(RawDataClus->rdoList().at(loopSize));
-	      }
-         if(m_doOnTrack || m_doOnPixelTrack) m_ClusterIDs.push_back( clus->identify());
+	if ((*trackStateOnSurfaceIterator)->type(Trk::TrackStateOnSurface::Hole)) {
+	  clus = dynamic_cast< const InDet::SiClusterOnTrack*>((*trackStateOnSurfaceIterator)->measurementOnTrack());
+	  if (clus) clusID = clus->identify();
+	  nHole = 1.0;
 
-         const InDet::PixelCluster* pixelCluster=dynamic_cast<const InDet::PixelCluster*>(RawDataClus);
-         
-         if(pixelCluster){
-            ///
-            /// Pixel Cluster Selection
-            ///
-            if( !RawDataClus->gangedPixel() && /// not include ganged-pixel
-                !pixelCluster->isFake() &&     /// not fake
-                ( (pixlayer == PixLayer::kIBL && fabs(clus->localParameters()[Trk::locX])<8.3)
-                  || (pixlayer != PixLayer::kIBL && fabs(clus->localParameters()[Trk::locX])<8.1) ) &&
-                (    (pixlayeribl2d3d == PixLayerIBL2D3D::kIBL2D && fabs(clus->localParameters()[Trk::locY])<19.7)
-                  || (pixlayeribl2d3d == PixLayerIBL2D3D::kIBL3D && fabs(clus->localParameters()[Trk::locY])<9.5) 
-                  || (pixlayer        != PixLayer::kIBL          && fabs(clus->localParameters()[Trk::locY])<28.7) )
-                ){
-              passClusterSelection = true;
-            }
-            ///
-            /// Cluster Variables
-            ///
-            npixHitsInCluster = pixelCluster->rdoList().size();
-            //colWidthOfCluster = pixelCluster->width().colRow().y();
-            rowWidthOfCluster = pixelCluster->width().colRow().x();
-            totalToTOfCluster = pixelCluster->totalToT();
+	  if ( m_tsos_outliermap) m_tsos_outliermap->Fill(surfaceID, m_pixelid);
+	  if ( m_tsos_hiteff_vs_lumi) m_tsos_hiteff_vs_lumi->Fill(m_manager->lumiBlockNumber(),0.,surfaceID,m_pixelid);
+	  //if( m_hiteff_incl_mod[pixlayerdisk] && passQualityCut ) m_hiteff_incl_mod[pixlayerdisk]->Fill( m_manager->lumiBlockNumber(), 0.0 );
+	  if ( m_hiteff_incl_mod[pixlayerdisk] && pass1hole2GeVTightCut ) m_hiteff_incl_mod[pixlayerdisk]->Fill( m_manager->lumiBlockNumber(), 0.0 );
+	}
+
+
+	//if(m_tsos_measratio && passQualityCut) m_tsos_measratio->Fill(surfaceID,m_pixelid,nMeasurement);
+	//if(m_tsos_holeratio && passQualityCut) m_tsos_holeratio->Fill(surfaceID,m_pixelid,nHole);
+	if (m_doOnline && m_tsos_holeratio_tmp && passQualityCut) m_tsos_holeratio_tmp->Fill(surfaceID,m_pixelid,nHole);
+	if (passQualityCut) {
+	  if (nOutlier + nHole > 0.) {
+	    if (m_misshits_ratio) m_misshits_ratio->Fill(surfaceID,m_pixelid,1.0);
+	    if (m_doOnline && m_misshits_ratio_tmp) m_misshits_ratio_tmp->Fill(surfaceID,m_pixelid,1.0);
+	  } else {
+	    if (m_misshits_ratio) m_misshits_ratio->Fill(surfaceID,m_pixelid,0.0);
+	    if (m_doOnline && m_misshits_ratio_tmp) m_misshits_ratio_tmp->Fill(surfaceID,m_pixelid,0.0);
+	  }
+	}
+
+	///
+	/// PixelClusters are valid
+	///
+	if (!(*trackStateOnSurfaceIterator)->type(Trk::TrackStateOnSurface::Measurement)) continue;
+	if (!clus) continue;
+	const InDet::SiCluster *RawDataClus = dynamic_cast< const InDet::SiCluster*>(clus->prepRawData());
+	if (!RawDataClus) continue;
+	if (!RawDataClus->detectorElement()->isPixel()) continue;
+ 
+	nPixelHits++; //add another pixel hit 
+	for (unsigned int loopSize=0;loopSize < RawDataClus->rdoList().size(); loopSize++) {
+	  if (m_doOnTrack) m_RDOIDs.push_back(RawDataClus->rdoList().at(loopSize));
+	}
+	if (m_doOnTrack) m_ClusterIDs.push_back( clus->identify());
+
+	const InDet::PixelCluster* pixelCluster = dynamic_cast<const InDet::PixelCluster*>(RawDataClus);
+	if (pixelCluster) {
+	  ///
+	  /// Pixel Cluster Selection
+	  ///
+	  if ( !RawDataClus->gangedPixel() && /// not include ganged-pixel
+	       !pixelCluster->isFake() &&     /// not fake
+	       ( (pixlayer == PixLayer::kIBL && fabs(clus->localParameters()[Trk::locX])<8.3)
+		 || (pixlayer != PixLayer::kIBL && fabs(clus->localParameters()[Trk::locX])<8.1) ) &&
+	       (    (pixlayeribl2d3d == PixLayerIBL2D3D::kIBL2D && fabs(clus->localParameters()[Trk::locY])<19.7)
+		    || (pixlayeribl2d3d == PixLayerIBL2D3D::kIBL3D && fabs(clus->localParameters()[Trk::locY])<9.5) 
+		    || (pixlayer        != PixLayer::kIBL          && fabs(clus->localParameters()[Trk::locY])<28.7) )
+	       ){
+	    passClusterSelection = true;
+	  }
+	  ///
+	  /// Cluster Variables
+	  ///
+	  npixHitsInCluster = pixelCluster->rdoList().size();
+	  //colWidthOfCluster = pixelCluster->width().colRow().y();
+	  rowWidthOfCluster = pixelCluster->width().colRow().x();
+	  totalToTOfCluster = pixelCluster->totalToT();
             
-            if( npixHitsInCluster == 1 && totalToTOfCluster < 8) { nbadclus++; }
-            else{ ngoodclus++; }
+	  if ( npixHitsInCluster == 1 && totalToTOfCluster < 8) { nbadclus++; }
+	  else { ngoodclus++; }
       	    
-            if(m_doModules && !m_doOnline){
-	           if(measPerigee){
-	             float pt = measPerigee->pT()/1000.0;
-	             if(m_clustot_vs_pt) m_clustot_vs_pt->Fill(pt, totalToTOfCluster);
-	             if(pt<10){
-	               if(m_clustot_lowpt) m_clustot_lowpt->Fill(totalToTOfCluster);
-	               if(npixHitsInCluster==1){ if(m_1hitclustot_lowpt) m_1hitclustot_lowpt->Fill(totalToTOfCluster);}
-	               if(npixHitsInCluster==2){ if(m_2hitclustot_lowpt) m_2hitclustot_lowpt->Fill(totalToTOfCluster);}
-	             }else{
-	               if(m_clustot_highpt) m_clustot_highpt->Fill(totalToTOfCluster);
-	               if(npixHitsInCluster==1){ if(m_1hitclustot_highpt) m_1hitclustot_highpt->Fill(totalToTOfCluster);}
-	               if(npixHitsInCluster==2){ if(m_2hitclustot_highpt) m_2hitclustot_highpt->Fill(totalToTOfCluster);}
-	             }
-	           }
-            }
-            ///
-            /// Hole module map
-            ///
-
-            ///
-            /// Categorize tracks for IP resolution degradation
-            ///
-            hitsArrayLayer[pixlayer] = 1;
+	  if (m_doModules && !m_doOnline) { //indirectly disabled
+	    if (measPerigee) {
+	      float pt = measPerigee->pT()/1000.0;
+	      if (m_clustot_vs_pt) m_clustot_vs_pt->Fill(pt, totalToTOfCluster);
+	      if (pt<10) {
+		if (m_clustot_lowpt) m_clustot_lowpt->Fill(totalToTOfCluster);
+		if (npixHitsInCluster==1){ if(m_1hitclustot_lowpt) m_1hitclustot_lowpt->Fill(totalToTOfCluster);}
+		if (npixHitsInCluster==2){ if(m_2hitclustot_lowpt) m_2hitclustot_lowpt->Fill(totalToTOfCluster);}
+	      } else {
+		if (m_clustot_highpt) m_clustot_highpt->Fill(totalToTOfCluster);
+		if (npixHitsInCluster==1){ if(m_1hitclustot_highpt) m_1hitclustot_highpt->Fill(totalToTOfCluster);}
+		if (npixHitsInCluster==2){ if(m_2hitclustot_highpt) m_2hitclustot_highpt->Fill(totalToTOfCluster);}
 	      }
+	    }
+	  }
+	}
 
 	    
-	      ///
-         /// Get track parameters for current surface (with AtaPlane)
-         ///
-         trkParameters = (*trackStateOnSurfaceIterator)->trackParameters();
-         const Trk::AtaPlane *trackAtPlane = dynamic_cast<const Trk::AtaPlane*>(trkParameters);
-         if(trackAtPlane)
-         {
+	///
+	/// Get track parameters for current surface (with AtaPlane)
+	///
+	trkParameters = (*trackStateOnSurfaceIterator)->trackParameters();
+	const Trk::AtaPlane *trackAtPlane = dynamic_cast<const Trk::AtaPlane*>(trkParameters);
+	if (trackAtPlane)
+	  {
             const Amg::Vector2D localpos = trackAtPlane->localPosition();
 
             // Get local error matrix for hit and track and calc pull
@@ -453,17 +435,17 @@ StatusCode PixelMainMon::FillTrackMon(void)
             //pulls and residuals Phi
             double error_sum = sqrt(pow(Amg::error(trackErrMat,Trk::locX),2) + pow(Amg::error(clusErrMat,Trk::locX), 2));
             double res = clus->localParameters()[Trk::locX]-localpos[0];
-            if(m_track_res_phi) m_track_res_phi->Fill(res);
+            if (m_track_res_phi) m_track_res_phi->Fill(res);
             double pull = 0;
-            if(error_sum != 0) pull = (res)/error_sum;
-            if(m_track_pull_phi) m_track_pull_phi->Fill(pull);
+            if (error_sum != 0) pull = (res)/error_sum;
+            if (m_track_pull_phi) m_track_pull_phi->Fill(pull);
 
             //pulls and residuals Eta
             error_sum = sqrt(pow(Amg::error(trackErrMat,Trk::locY),2) + pow(Amg::error(clusErrMat,Trk::locY), 2));
             res = clus->localParameters()[Trk::locY]-localpos[1];
-            if(m_track_res_eta) m_track_res_eta->Fill(res);
-            if(error_sum != 0) pull = (res)/error_sum;
-            if(m_track_pull_eta) m_track_pull_eta->Fill(pull);
+            if (m_track_res_eta) m_track_res_eta->Fill(res);
+            if (error_sum != 0) pull = (res)/error_sum;
+            if (m_track_pull_eta) m_track_pull_eta->Fill(pull);
 
             /// LorentzAngle
             Amg::Vector3D mynormal = side->normal();
@@ -472,39 +454,39 @@ StatusCode PixelMainMon::FillTrackMon(void)
             double trkphicomp = mytrack.dot(myphiax);
             double trknormcomp = mytrack.dot(mynormal); 
             double phiIncident =  atan2(trkphicomp,trknormcomp);
-            if(npixHitsInCluster > 0 && passTightCut && passClusterSelection){
-               if(pixlayer == PixLayer::kIBL && m_LorentzAngle_IBL) m_LorentzAngle_IBL->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
-               if(pixlayeribl2d3d == PixLayerIBL2D3D::kIBL2D && m_LorentzAngle_IBL2D) m_LorentzAngle_IBL2D->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
-               if(pixlayeribl2d3d == PixLayerIBL2D3D::kIBL3D && m_LorentzAngle_IBL3D) m_LorentzAngle_IBL3D->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
-               if(pixlayer == PixLayer::kB0 && m_LorentzAngle_B0) m_LorentzAngle_B0->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
-               if(pixlayer == PixLayer::kB1 && m_LorentzAngle_B1) m_LorentzAngle_B1->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
-               if(pixlayer == PixLayer::kB2 && m_LorentzAngle_B2) m_LorentzAngle_B2->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
+            if (npixHitsInCluster > 0 && passTightCut && passClusterSelection){
+	      if (pixlayer == PixLayer::kIBL && m_LorentzAngle_IBL) m_LorentzAngle_IBL->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
+	      if (pixlayeribl2d3d == PixLayerIBL2D3D::kIBL2D && m_LorentzAngle_IBL2D) m_LorentzAngle_IBL2D->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
+	      if (pixlayeribl2d3d == PixLayerIBL2D3D::kIBL3D && m_LorentzAngle_IBL3D) m_LorentzAngle_IBL3D->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
+	      if (pixlayer == PixLayer::kB0 && m_LorentzAngle_B0) m_LorentzAngle_B0->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
+	      if (pixlayer == PixLayer::kB1 && m_LorentzAngle_B1) m_LorentzAngle_B1->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
+	      if (pixlayer == PixLayer::kB2 && m_LorentzAngle_B2) m_LorentzAngle_B2->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0*rowWidthOfCluster);
             }
-         }
+	  }
       } // end of TSOS loop
     
-      if(!m_doOnline && m_doModules){
-	      float pt = measPerigee->pT()/1000.0;
-	      if(nbadclus==1){
-	         if(m_track_chi2_bcl1 && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bcl1->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
-	      }
-	      if(nbadclus==0){
-	         if(m_track_chi2_bcl0 && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bcl0->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
-	      } 
-	      if(nbadclus>1){
-	         if(m_track_chi2_bclgt1 && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bclgt1->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
-	      } 
-	      if(pt>=10){
-	         if(nbadclus==1){
-	            if(m_track_chi2_bcl1_highpt && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bcl1_highpt->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
-	         }
-	         if(nbadclus==0){
-	            if(m_track_chi2_bcl1_highpt && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bcl0_highpt->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
-	         } 
-	         if(nbadclus>1){
-	            if(m_track_chi2_bclgt1_highpt && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bclgt1_highpt->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
-	         } 
-	      }
+      if (m_doModules && !m_doOnline) { //indirectly disabled
+	float pt = measPerigee->pT()/1000.0;
+	if (nbadclus==1) {
+	  if (m_track_chi2_bcl1 && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bcl1->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
+	}
+	if (nbadclus==0) {
+	  if (m_track_chi2_bcl0 && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bcl0->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
+	} 
+	if (nbadclus>1) {
+	  if (m_track_chi2_bclgt1 && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bclgt1->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
+	} 
+	if (pt>=10) {
+	  if (nbadclus==1) {
+	    if (m_track_chi2_bcl1_highpt && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bcl1_highpt->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
+	  }
+	  if (nbadclus==0) {
+	    if (m_track_chi2_bcl1_highpt && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bcl0_highpt->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
+	  } 
+	  if (nbadclus>1) {
+	    if (m_track_chi2_bclgt1_highpt && track0->fitQuality()->numberDoF() != 0) m_track_chi2_bclgt1_highpt->Fill(track0->fitQuality()->chiSquared()/track0->fitQuality()->numberDoF());
+	  } 
+	}
       }
             
       if (nPixelHits>0)
@@ -512,39 +494,7 @@ StatusCode PixelMainMon::FillTrackMon(void)
 	  m_ntracksPerEvent++;
 	}
 
-      /// IP degradation factor map
-      if( m_doDegFactorMap ){
-         if (measPerigee){
-
-            double pt  = measPerigee->pT();
-            double eta = measPerigee->eta();
-            double phi = measPerigee->parameters()[Trk::phi0];
-
-            if(hitsArrayLayer[PixLayer::kECA]==1 || hitsArrayLayer[PixLayer::kECC]==1){
-               degradationFactor = 1.0;
-            }else{
-               if     ( hitsArrayLayer[PixLayer::kIBL] == 1 && hitsArrayLayer[PixLayer::kB0] == 1 && hitsArrayLayer[PixLayer::kB1] == 1 && hitsArrayLayer[PixLayer::kB2] == 1 ) degradationFactor = 1.0;
-               else if( hitsArrayLayer[PixLayer::kIBL] == 0 && hitsArrayLayer[PixLayer::kB0] == 1 && hitsArrayLayer[PixLayer::kB1] == 1 && hitsArrayLayer[PixLayer::kB2] == 1 ) degradationFactor = 1.8;
-               else if( hitsArrayLayer[PixLayer::kIBL] == 1 && hitsArrayLayer[PixLayer::kB0] == 0 && hitsArrayLayer[PixLayer::kB1] == 1 && hitsArrayLayer[PixLayer::kB2] == 1 ) degradationFactor = 1.16;
-               else if( hitsArrayLayer[PixLayer::kIBL] == 1 && hitsArrayLayer[PixLayer::kB0] == 1 && hitsArrayLayer[PixLayer::kB1] == 0 && hitsArrayLayer[PixLayer::kB2] == 1 ) degradationFactor = 1.0;
-               else if( hitsArrayLayer[PixLayer::kIBL] == 1 && hitsArrayLayer[PixLayer::kB0] == 1 && hitsArrayLayer[PixLayer::kB1] == 1 && hitsArrayLayer[PixLayer::kB2] == 0 ) degradationFactor = 1.0;
-               else if( hitsArrayLayer[PixLayer::kIBL] == 0 && hitsArrayLayer[PixLayer::kB0] == 0 && hitsArrayLayer[PixLayer::kB1] == 1 && hitsArrayLayer[PixLayer::kB2] == 1 ) degradationFactor = 3.5;
-               else if( hitsArrayLayer[PixLayer::kIBL] == 0 && hitsArrayLayer[PixLayer::kB0] == 1 && hitsArrayLayer[PixLayer::kB1] == 1 && hitsArrayLayer[PixLayer::kB2] == 0 ) degradationFactor = 1.8;
-               else if( hitsArrayLayer[PixLayer::kIBL] == 1 && hitsArrayLayer[PixLayer::kB0] == 0 && hitsArrayLayer[PixLayer::kB1] == 1 && hitsArrayLayer[PixLayer::kB2] == 0 ) degradationFactor = 1.17;
-               else if( hitsArrayLayer[PixLayer::kIBL] == 1 && hitsArrayLayer[PixLayer::kB0] == 1 && hitsArrayLayer[PixLayer::kB1] == 0 && hitsArrayLayer[PixLayer::kB2] == 0 ) degradationFactor = 1.0;
-               else if( hitsArrayLayer[PixLayer::kIBL] == 0 && hitsArrayLayer[PixLayer::kB0] == 0 && hitsArrayLayer[PixLayer::kB1] == 0 && hitsArrayLayer[PixLayer::kB2] == 1 ) degradationFactor = 6.0;
-               else if( hitsArrayLayer[PixLayer::kIBL] == 0 && hitsArrayLayer[PixLayer::kB0] == 0 && hitsArrayLayer[PixLayer::kB1] == 0 && hitsArrayLayer[PixLayer::kB2] == 0 ) degradationFactor = 6.0;
-               else degradationFactor = 1.0;
-            }
-
-            if( fabs(eta) < 2.5 && pt > 400.0 ){ // requirement of tracks
-               if(m_degFactorMap_per_lumi) m_degFactorMap_per_lumi->Fill(m_manager->lumiBlockNumber(), degradationFactor);
-               if(m_degFactorMap) m_degFactorMap->Fill( eta, phi, degradationFactor);
-            }
-         }
-      }
-
-      if(m_doHoleSearch && !m_doOnline && nholes>0){delete (track);}
+      if (m_doHoleSearch && !m_doOnline && nholes>0) delete track;
    } // end of track loop
 
    
@@ -552,17 +502,19 @@ StatusCode PixelMainMon::FillTrackMon(void)
    /// Fill histograms per event
    ///
     
-   if(m_tracksPerEvt_per_lumi) m_tracksPerEvt_per_lumi->Fill(m_manager->lumiBlockNumber(), m_ntracksPerEvent);
+   if (m_tracksPerEvt_per_lumi) m_tracksPerEvt_per_lumi->Fill(m_manager->lumiBlockNumber(), m_ntracksPerEvent);
 
-   if(m_doOnTrack || m_doOnPixelTrack)sort (m_RDOIDs.begin(), m_RDOIDs.end());
-   if(m_doOnTrack || m_doOnPixelTrack)sort (m_ClusterIDs.begin(), m_ClusterIDs.end());
+   if (m_doOnTrack) {
+     sort( m_RDOIDs.begin(), m_RDOIDs.end() );
+     sort( m_ClusterIDs.begin(), m_ClusterIDs.end() );
+   }
 
-   if(m_doOnline){
-      if(m_doRefresh5min) {
-         if(m_tsos_holeratio_mon && m_tsos_holeratio_tmp) m_tsos_holeratio_mon->Fill2DMon(m_tsos_holeratio_tmp);
-         if(m_misshits_ratio_mon && m_misshits_ratio_tmp) m_misshits_ratio_mon->Fill2DMon(m_misshits_ratio_tmp);
+   if (m_doOnline) {
+      if (m_doRefresh5min) {
+         if (m_tsos_holeratio_mon && m_tsos_holeratio_tmp) m_tsos_holeratio_mon->Fill2DMon(m_tsos_holeratio_tmp);
+         if (m_misshits_ratio_mon && m_misshits_ratio_tmp) m_misshits_ratio_mon->Fill2DMon(m_misshits_ratio_tmp);
       }
-   }//end of doOnline loop processing
+   }
 
 
    return StatusCode::SUCCESS;
@@ -573,7 +525,7 @@ StatusCode PixelMainMon::ProcTrackMon(void)
   double lengthLB = 0;
   lengthLB = m_LBendTime - m_LBstartTime;
   if (lengthLB <= 0) {
-    if(msgLvl(MSG::INFO)) msg(MSG::INFO)  << "Luminosity block has length <= 0 sec, cannot calculate track rate." << endmsg;  
+    ATH_MSG_INFO("Luminosity block has length <= 0 sec, cannot calculate track rate.");  
     return StatusCode::SUCCESS; //if LB length is zero, the rest is pointless and would divide by 0
   }
  
@@ -583,17 +535,9 @@ StatusCode PixelMainMon::ProcTrackMon(void)
   //  m_trackRate_per_lumi->Fill(m_manager->lumiBlockNumber(),trackRateLB);
   //}
   //for(int i=0; i<PixLayer::COUNT-1+(int)(m_doIBL); i++){
-  for(int i=0; i<PixLayerDisk::COUNT; i++){
-     if(m_hiteff_incl_mod[i]) m_hiteff_incl_mod[i]->SetMinimum(0.8);
-     if(m_hiteff_incl_mod[i]) m_hiteff_incl_mod[i]->SetMaximum(1.01);
-     //if(m_hiteff_actv_mod[i]) m_hiteff_actv_mod[i]->SetMinimum(0.8);
-     //if(m_hiteff_actv_mod[i]) m_hiteff_actv_mod[i]->SetMaximum(1.01);
-     //if(m_hiteff_newtrkreq_mod[i]) m_hiteff_newtrkreq_mod[i]->SetMinimum(0.8);
-     //if(m_hiteff_newtrkreq_mod[i]) m_hiteff_newtrkreq_mod[i]->SetMaximum(1.01);
+  for (int i=0; i<PixLayerDisk::COUNT; i++){
+     if (m_hiteff_incl_mod[i]) m_hiteff_incl_mod[i]->SetMinimum(0.8);
+     if (m_hiteff_incl_mod[i]) m_hiteff_incl_mod[i]->SetMaximum(1.01);
   }
-  return StatusCode::SUCCESS;
-  
+  return StatusCode::SUCCESS;  
 }
-
-
-
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h
index bf6fc76070b9a9521944a1306a351fa9157d37ef..8831a3f4b5fe136ace9b21bb5aae0a6384d277d6 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/SCT_Monitoring/SCTHitEffMonTool.h
@@ -133,7 +133,7 @@ private:
   const TrackCollection * m_tracks; 
   Trk::TrackSummaryTool* m_TrackSum;
 
-  std::map < Identifier, unsigned int > * m_badChips;
+  const std::map < Identifier, unsigned int > * m_badChips;
   ServiceHandle<MagField::IMagFieldSvc>  m_fieldServiceHandle;
   ToolHandle<Trig::IBunchCrossingTool> m_bunchCrossingTool;
 
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h b/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
index 2e8de9299b2b0e4843b4b147dc8a37b227eca839..d78de4c4f6f1d0304c366d4fd1e1a605bcb722ca 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/doc/packagedoc.h
@@ -55,6 +55,5 @@ These should definitely be deprecated and removed as soon as possible:
    - ParsedSCT_RDO
    - SCTHistoTest
    
-@section SCT_Monitoring_SCT_MonitoringReq Requirements
  
  */
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx
index f4241c2dc0b0fec6e4a8b6984740f9fc162d54d2..446aaa2b77ca9ee65cea87c405476bf373748ef2 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTErrMonTool.cxx
@@ -2430,7 +2430,7 @@ SCTErrMonTool::fillConfigurationDetails() {
     msg(MSG::DEBUG) << "Inside fillConfigurationDetails()" << endmsg;
   }
   unsigned int nBadMods = m_ConfigurationSvc->badModules()->size(); // bad modules
-  std::map<Identifier, std::pair<bool, bool> > *badLinks = m_ConfigurationSvc->badLinks(); // bad links
+  const std::map<Identifier, std::pair<bool, bool> > *badLinks = m_ConfigurationSvc->badLinks(); // bad links
   unsigned int nBadLink0(0), nBadLink1(0), nBadLinkBoth(0);
   for (auto link: *badLinks) {
     std::pair<bool, bool> status = link.second;
@@ -2445,7 +2445,7 @@ SCTErrMonTool::fillConfigurationDetails() {
     }
   }
 
-  std::map<Identifier, unsigned int> *badChips = m_ConfigurationSvc->badChips(); // bad chips
+  const std::map<Identifier, unsigned int> *badChips = m_ConfigurationSvc->badChips(); // bad chips
   unsigned int nBadChips(0);
   for (auto chip : *badChips) {
     unsigned int status = chip.second;
@@ -2720,9 +2720,9 @@ bool SCTErrMonTool::SyncErrorSCT()
 
   for ( unsigned int i = 0; i < SCT_ByteStreamErrors::NUM_ERROR_TYPES; i++ )
     {
-      std::set<IdentifierHash> * sctErrors = m_byteStreamErrSvc->getErrorSet( i );
-      std::set<IdentifierHash>::iterator fit = sctErrors->begin();
-      std::set<IdentifierHash>::iterator fitEnd = sctErrors->end();
+      const std::set<IdentifierHash> * sctErrors = m_byteStreamErrSvc->getErrorSet( i );
+      std::set<IdentifierHash>::const_iterator fit = sctErrors->begin();
+      std::set<IdentifierHash>::const_iterator fitEnd = sctErrors->end();
 
       // Check that all modules are registered
       for (; fit != fitEnd; ++fit) {
@@ -2753,9 +2753,9 @@ bool SCTErrMonTool::SyncDisabledSCT()
   double deltaZ = 0;
 
   m_disabledGeoSCT.clear();
-  std::set<Identifier>* badModules = m_ConfigurationSvc->badModules();
-  std::set<Identifier>::iterator fit = badModules->begin();
-  std::set<Identifier>::iterator fitEnd = badModules->end();
+  const std::set<Identifier>* badModules = m_ConfigurationSvc->badModules();
+  std::set<Identifier>::const_iterator fit = badModules->begin();
+  std::set<Identifier>::const_iterator fitEnd = badModules->end();
 
   // Check that all modules are registered
   for (; fit != fitEnd; ++fit){
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx
index 3247b426656d21c01269a4635906390f9ec27cd5..541a802b985e6941b1ff75ec360b2443d27dc3ab 100755
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/src/SCTHitEffMonTool.cxx
@@ -1844,7 +1844,7 @@ StatusCode
 SCTHitEffMonTool::procHistograms() {                                                                             // hidetoshi
                                                                                                                  // 14.01.22
   if (m_superDetailed) {
-    std::set<Identifier> *m_badModules = m_configConditions->badModules();
+    const std::set<Identifier> *m_badModules = m_configConditions->badModules();
     INFO("Found " << m_badModules->size() << " bad modules");
     std::array < std::array < double, N_ENDCAPS >, N_REGIONS > MaxEta;
     std::array < std::array < double, N_ENDCAPS >, N_REGIONS > MaxPhi;
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/DynConfSCT.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/DynConfSCT.h
deleted file mode 100644
index ed55c577370254993a5cd0ef53ccad477ecacad4..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/DynConfSCT.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Dear emacs, this is -*-c++-*-
-
-/**
- * @file
- * Dynamically configure the concrete type of SCT RDOs, on event per event basis.
- * The "real data" input stream defines the type that should be used.  We need
- * to make sure that SCT digitization that runs before InDetOverlay produces
- * the output in the same format.
- *
- * @author Andrei Gaponenko, 2008-2009
- */
-
-#ifndef INDETOVERLAY_DYNCONFSCT_H
-#define INDETOVERLAY_DYNCONFSCT_H
-
-#include <string>
-
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/ServiceHandle.h"
-
-// forward declaring template typedefs is unwieldy
-#include "InDetRawData/SCT_RDO_Container.h"
-
-class StoreGateSvc;
-class AlgTool;
-
-class DynConfSCT : public AthAlgorithm
-{
-public:
-
-  DynConfSCT(const std::string &name,ISvcLocator *pSvcLocator);
-
-  virtual StatusCode initialize();
-  virtual StatusCode execute();
-  virtual StatusCode finalize();
-
-private:
-  bool m_inputFormatDetermined;
-
-  //----------------
-  //! These two members are NOT properties. They are automatically set
-  //! to the same values that are used by InDetOverlay
-  ServiceHandle<StoreGateSvc> m_storeGateData;
-  std::string m_mainInputSCT_Name;
-
-  //! Use DataStore of this InDetOverlay alg to get "real data" SCT inputs
-  std::string m_InDetOverlayName;
-
-  //! this is the alg we control: set its output type to what we see in real data.
-  std::string m_SCT_DigitizationName;
-  AlgTool *m_digiAlgTool;
-
-  //----------------
-  //! gets a non-null RDO, if any
-  const SCT_RDORawData *getRDO(const SCT_RDO_Container *cont) const;
-};
-
-#endif/*INDETOVERLAY_DYNCONFSCT_H*/
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/InDetSDOOverlay.h b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/InDetSDOOverlay.h
new file mode 100644
index 0000000000000000000000000000000000000000..984dbb5c9012ba73fbd524b648e04f9acea24389
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/InDetOverlay/InDetSDOOverlay.h
@@ -0,0 +1,42 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef INDETSDOOVERLAY_H
+#define INDETSDOOVERLAY_H
+
+#include <string>
+
+#include "GaudiKernel/ServiceHandle.h"
+
+#include "InDetSimData/InDetSimDataCollection.h"
+
+#include "OverlayAlgBase/OverlayAlgBase.h"
+
+class InDetSDOOverlay : public OverlayAlgBase
+{
+public:
+  InDetSDOOverlay(const std::string &name, ISvcLocator *pSvcLocator);
+  
+  virtual StatusCode overlayInitialize() override;
+  virtual StatusCode overlayExecute() override;
+  virtual StatusCode overlayFinalize() override;
+
+private:
+  bool m_do_TRT, m_do_TRT_background;
+  SG::ReadHandleKey<InDetSimDataCollection> m_mainInputTRTKey;
+  SG::ReadHandleKey<InDetSimDataCollection> m_overlayInputTRTKey;
+  SG::WriteHandleKey<InDetSimDataCollection> m_outputTRTKey;
+
+  bool m_do_SCT, m_do_SCT_background;
+  SG::ReadHandleKey<InDetSimDataCollection> m_mainInputSCTKey;
+  SG::ReadHandleKey<InDetSimDataCollection> m_overlayInputSCTKey;
+  SG::WriteHandleKey<InDetSimDataCollection> m_outputSCTKey;
+
+  bool m_do_Pixel, m_do_Pixel_background;
+  SG::ReadHandleKey<InDetSimDataCollection> m_mainInputPixelKey;
+  SG::ReadHandleKey<InDetSimDataCollection> m_overlayInputPixelKey;
+  SG::WriteHandleKey<InDetSimDataCollection> m_outputPixelKey;
+};
+
+#endif // INDETSDOOVERLAY_H
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py
index e62cb45294e7c2763c093f0b34c50138a3e315d1..72f268c54fc074ec98c66c1731ad79ada4d8b31f 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfig.py
@@ -23,3 +23,27 @@ def getInDetOverlay(name="InDetOverlay", **kwargs):
     kwargs.setdefault("mainOutputPixelKey", overlayFlags.outputStore() + "+PixelRDOs");
 
     return CfgMgr.InDetOverlay(name, **kwargs)
+
+
+def getInDetSDOOverlay(name="InDetSDOOverlay", **kwargs):
+    from AthenaCommon.GlobalFlags import globalflags
+    from AthenaCommon.DetFlags import DetFlags
+    from OverlayCommonAlgs.OverlayFlags import overlayFlags
+
+    kwargs.setdefault("do_TRT", DetFlags.overlay.TRT_on());
+    kwargs.setdefault("do_TRT_background", globalflags.DataSource != "data");
+    kwargs.setdefault("mainInputTRTKey", overlayFlags.dataStore() + "+TRT_SDO_Map");
+    kwargs.setdefault("overlayInputTRTKey", overlayFlags.evtStore() + "+TRT_SDO_Map");
+    kwargs.setdefault("mainOutputTRTKey", overlayFlags.outputStore() + "+TRT_SDO_Map");
+    kwargs.setdefault("do_SCT", DetFlags.overlay.SCT_on());
+    kwargs.setdefault("do_SCT_background", globalflags.DataSource != "data");
+    kwargs.setdefault("mainInputSCTKey", overlayFlags.dataStore() + "+SCT_SDO_Map");
+    kwargs.setdefault("overlayInputSCTKey", overlayFlags.evtStore() + "+SCT_SDO_Map");
+    kwargs.setdefault("mainOutputSCTKey", overlayFlags.outputStore() + "+SCT_SDO_Map");
+    kwargs.setdefault("do_Pixel", DetFlags.overlay.pixel_on());
+    kwargs.setdefault("do_Pixel_background", globalflags.DataSource != "data");
+    kwargs.setdefault("mainInputPixelKey", overlayFlags.dataStore() + "+PixelSDO_Map");
+    kwargs.setdefault("overlayInputPixelKey", overlayFlags.evtStore() + "+PixelSDO_Map");
+    kwargs.setdefault("mainOutputPixelKey", overlayFlags.outputStore() + "+PixelSDO_Map");
+
+    return CfgMgr.InDetSDOOverlay(name, **kwargs)
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py
index 9f61200e4d2e5dc7754d53b1a88df7d67f37ed28..c8c4a87d5d65a9fc9c3c62cd512e6dbe3f6b49f0 100644
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/python/InDetOverlayConfigDb.py
@@ -2,3 +2,4 @@
 
 from AthenaCommon.CfgGetter import addAlgorithm
 addAlgorithm("InDetOverlay.InDetOverlayConfig.getInDetOverlay", "InDetOverlay")
+addAlgorithm("InDetOverlay.InDetOverlayConfig.getInDetSDOOverlay", "InDetSDOOverlay")
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/DynConfSCT.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/DynConfSCT.cxx
deleted file mode 100644
index ab7bd89cec976b2205029e5ce3a52a8c5bbb9a24..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/DynConfSCT.cxx
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// Andrei Gaponenko <agaponenko@lbl.gov>, 2008
-
-#include "InDetOverlay/DynConfSCT.h"
-
-#include "GaudiKernel/IAlgManager.h"
-#include "GaudiKernel/IToolSvc.h"
-#include "GaudiKernel/AlgTool.h"
-
-#include "GaudiKernel/ServiceHandle.h"
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
-
-#include "StoreGate/StoreGateSvc.h"
-
-#include "InDetOverlay/InDetOverlay.h"
-
-#include "InDetRawData/SCT1_RawData.h"
-
-#include <iostream>
-#include <typeinfo>
-
-//================================================================
-DynConfSCT::DynConfSCT(const std::string &name, ISvcLocator *pSvcLocator) :
-  AthAlgorithm(name, pSvcLocator)
-  , m_inputFormatDetermined(false)
-  , m_storeGateData("", name)
-  , m_digiAlgTool(0)
-{
-  declareProperty("InDetOverlayName", m_InDetOverlayName="InDetOverlay",
-                  "The name of InDetOverlay algorithm from which we take "
-                  "the SG key of the 'real data' SCT RDOs and the SG store"
-                  " where to find them"
-                  );
-
-  declareProperty("SCT_DigitizationName", m_SCT_DigitizationName="SCT_DigitizationTool",
-                  "We set the WriteSCT1_RawData property of this SCT_Digitization algorithm.");
-}
-
-//================================================================
-StatusCode DynConfSCT::initialize()
-{
-  ATH_MSG_DEBUG("DynConfSCT initialize begin");
-
-  IAlgManager* theAlgMgr(0);
-  if( ! serviceLocator()
-      ->getService("ApplicationMgr", IAlgManager::interfaceID(), *pp_cast<IInterface>(&theAlgMgr))
-      .isSuccess() )
-    {
-      ATH_MSG_FATAL("Can not get an IAlgManager");
-      return StatusCode::FAILURE;
-    }
-
-  IToolSvc* toolSvc;
-  if(!service("ToolSvc",toolSvc).isSuccess()){
-    ATH_MSG_FATAL("Can't get the ToolSvc!");
-    return StatusCode::FAILURE;
-  }
-
-  //----------------
-  // Figure out where to find real data SCT RDOs.
-  // (Need SG key and the store itself.)
-  // Copy the settings from InDetOverlay algorithm.
-
-  IAlgorithm *pAlg(0);
-  if( ! theAlgMgr->getAlgorithm(m_InDetOverlayName, pAlg).isSuccess() ) {
-    ATH_MSG_FATAL("Can not get algorithm \""<<m_InDetOverlayName<<"\"");
-    return StatusCode::FAILURE;
-  }
-
-  Algorithm *ovlAlg = dynamic_cast<Algorithm*>(pAlg);
-  if(!ovlAlg) {
-    ATH_MSG_FATAL("Pointer to Algorithm \""<<m_InDetOverlayName<<"\" is NULL");
-    return StatusCode::FAILURE;
-  }
-
-  m_mainInputSCT_Name = ovlAlg->getProperty("mainInputSCTKey").toString();
-  ATH_MSG_DEBUG("Got mainInputSCT_Name = "<<m_mainInputSCT_Name);
-
-  m_storeGateData.setTypeAndName(ovlAlg->getProperty("DataStore").toString());
-  if (m_storeGateData.retrieve().isFailure()) {
-    ATH_MSG_FATAL("Error retrieving SG handle: "<<m_storeGateData);
-    return StatusCode::FAILURE;
-  }
-
-  // another way: m_storeGateData =
-  // another way:   dynamic_cast<const ServiceHandle<StoreGateSvc>&>
-  // another way:   ( dynamic_cast<const GaudiHandleProperty&>(ovlAlg->getProperty("DataStore")).value() );
-
-  ATH_MSG_DEBUG("Got DataStore "<<m_storeGateData);
-
-  //----------------
-  // get the controlled algtool
-
-  IAlgTool *pTool(0);
-  if( ! toolSvc->retrieveTool(m_SCT_DigitizationName, pTool).isSuccess() ) {
-    ATH_MSG_FATAL("Can not get AlgTool \""<<m_InDetOverlayName<<"\"");
-    return StatusCode::FAILURE;
-  }
-
-  m_digiAlgTool = dynamic_cast<AlgTool*>(pTool);
-  if(!m_digiAlgTool) {
-    ATH_MSG_FATAL("Pointer to AlgTool \""<<m_SCT_DigitizationName<<"\" is NULL");
-    return StatusCode::FAILURE;
-  }
-
-  ATH_MSG_DEBUG("DynConfSCT initialized");
-  return StatusCode::SUCCESS;
-}
-
-//================================================================
-StatusCode DynConfSCT::finalize()
-{
-  ATH_MSG_DEBUG("DynConfSCT finalized");
-  return StatusCode::SUCCESS;
-}
-
-//================================================================
-StatusCode DynConfSCT::execute() {
-  ATH_MSG_DEBUG("DynConfSCT::execute() begin");
-
-  const std::string propName("WriteSCT1_RawData");
-  bool oldDigiSetting =
-    dynamic_cast<const BooleanProperty&>(m_digiAlgTool->getProperty(propName)).value();
-
-  //----------------------------------------------------------------
-  const SCT_RDO_Container *dataRDOs(0);
-  if(m_storeGateData->retrieve(dataRDOs, m_mainInputSCT_Name).isSuccess()) {
-    ATH_MSG_DEBUG("Got data RDOs");
-
-    const SCT_RDORawData* rdo = getRDO(dataRDOs);
-    if(!rdo) {
-      if(!m_inputFormatDetermined) {
-        ATH_MSG_WARNING("Can't determine SCT RDO format of the data input:"
-                        " non non-NULL entries in "<<m_mainInputSCT_Name
-                        );
-
-        ATH_MSG_WARNING("This event will use the previous setting of SCT digitization:"
-                        " WriteSCT1_RawData = "<<oldDigiSetting
-                        );
-      }
-    }
-    else {
-      if( ( dynamic_cast<const SCT1_RawData*>(rdo) && !oldDigiSetting) ||
-          (!dynamic_cast<const SCT1_RawData*>(rdo) &&  oldDigiSetting) ) {
-
-        // need to flip the setting
-        BooleanProperty bp(propName, !oldDigiSetting);
-
-        ATH_MSG_INFO("Changing SCT_Digitization settings to "<<bp);
-
-        if(!m_digiAlgTool->setProperty(bp).isSuccess()) {
-          ATH_MSG_FATAL("Error setting SCT_Digitization property "<<bp);
-          return StatusCode::FAILURE;
-        }
-
-      }
-      else {
-        if(!m_inputFormatDetermined) {
-          ATH_MSG_INFO("SCT_Digitization settings "<<propName<<"="<<oldDigiSetting
-                       <<" already agrees with the data input type."
-                       );
-        }
-      } // if (need to flip)
-
-      m_inputFormatDetermined = true;
-    } // if(!rdo) {} else {
-
-  }
-  else {
-    ATH_MSG_WARNING("Could not get data RDOs");
-    ATH_MSG_WARNING("This event will use the previous setting of SCT digitization:"
-                    " WriteSCT1_RawData = "<<oldDigiSetting
-                    );
-  }
-
-  //----------------------------------------------------------------
-  ATH_MSG_DEBUG("DynConfSCT::execute() end");
-  return StatusCode::SUCCESS;
-}
-
-//================================================================
-const SCT_RDORawData *DynConfSCT::getRDO(const SCT_RDO_Container *container) const {
-  bool hasWarned = false;
-
-  for(SCT_RDO_Container::const_iterator p = container->begin();
-      p != container->end(); ++p) {
-
-    for(SCT_RDO_Container::IDENTIFIABLE::const_iterator c = p->cptr()->begin();
-        c != p->cptr()->end(); ++c) {
-
-      if(*c) {
-        return *c;
-      }
-      else {
-        if(!hasWarned) {
-          ATH_MSG_WARNING("There is a NULL RDO* in SCT_RDO_Container.");
-          hasWarned = true;
-        }
-      }
-    }
-  }
-
-  return 0;
-}
-
-//================================================================
-//EOF
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx
index f06c92f96cb6789315c92c320304fd6838c0d90c..90cb41db45b5efdd9a15ce84045c396b3eca41a7 100755
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetOverlay.cxx
@@ -360,8 +360,8 @@ StatusCode InDetOverlay::overlayExecute() {
    if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) {
      if (m_do_TRT_background ) overlayContainerNew(dataContainer.cptr(), mcContainer.cptr(), outputContainer.ptr());
      else if(!m_do_TRT_background){
-       TRT_RDO_Container nobkg;
-       overlayContainerNew(&nobkg , mcContainer.cptr() , outputContainer.ptr());
+       TRT_RDO_Container* nobkg = nullptr;
+       overlayContainerNew(nobkg , mcContainer.cptr() , outputContainer.ptr());
      }
      ATH_MSG_INFO("TRT Result = "<<shortPrint(outputContainer.cptr()));
    }
@@ -389,8 +389,8 @@ StatusCode InDetOverlay::overlayExecute() {
     if(dataContainer.isValid() && mcContainer.isValid() && outputContainer.isValid()) {
       if(m_do_SCT_background) overlayContainerNew(dataContainer.cptr(), mcContainer.cptr(), outputContainer.ptr());
       else if(!m_do_SCT_background){
-	SCT_RDO_Container nobkg;
-	overlayContainerNew(&nobkg , mcContainer.cptr() , outputContainer.ptr());
+        SCT_RDO_Container *nobkg = nullptr;
+	overlayContainerNew(nobkg , mcContainer.cptr() , outputContainer.ptr());
        }
       ATH_MSG_INFO("SCT Result = "<<shortPrint(outputContainer.ptr(), 50));   
     }
@@ -452,28 +452,13 @@ for (containerItr=mcContainer->begin(); containerItr!=mcContainer->end(); ++cont
     if(dataContainer.isValid() && mcContainer.isValid()&&outputContainer.isValid()) {  
       if(m_do_Pixel_background) overlayContainerNew(dataContainer.cptr(), mcContainer.cptr(), outputContainer.ptr());
       else if(!m_do_Pixel_background){
-	PixelRDO_Container nobkg;
-	overlayContainerNew(&nobkg , mcContainer.cptr() , outputContainer.ptr());
+        PixelRDO_Container *nobkg = nullptr;
+	overlayContainerNew(nobkg, mcContainer.cptr() , outputContainer.ptr());
        }
       ATH_MSG_INFO("Pixel Result = "<<shortPrint(outputContainer.ptr()));
     }
   }
 
-  //----------------------------------------------------------------
-  ATH_MSG_DEBUG("Processing MC truth data");
-
-  // Main stream is normally real data without any MC info.
-  // In tests we may use a MC generated file instead of real data.
-  // Remove truth info from the main input stream, if any.
-  //
-  // Here we handle just InDet-specific truth classes.
-  // (McEventCollection is done by the base.)
-
-  //Simply don not copy: removeAllObjectsOfType<InDetSimDataCollection>(&*m_storeGateData);
-
-  // Now copy InDet-specific MC truth objects to the output.
-  copyAllObjectsOfType<InDetSimDataCollection>(&*m_storeGateOutput, &*m_storeGateMC);
-
   //----------------------------------------------------------------
   ATH_MSG_DEBUG("InDetOverlay::execute() end");
   return StatusCode::SUCCESS;
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetSDOOverlay.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetSDOOverlay.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..217d023e79637c9d836c40da524cc29d234052f7
--- /dev/null
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/InDetSDOOverlay.cxx
@@ -0,0 +1,134 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "CxxUtils/make_unique.h"
+#include "Identifier/Identifier.h"
+#include "InDetSimData/InDetSimData.h"
+
+#include "InDetOverlay/InDetSDOOverlay.h"
+
+InDetSDOOverlay::InDetSDOOverlay(const std::string &name, ISvcLocator *pSvcLocator) :
+  OverlayAlgBase(name, pSvcLocator)
+{
+  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_outputTRTKey);
+
+  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_outputSCTKey);
+
+  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_outputPixelKey);
+}
+
+//================================================================
+StatusCode InDetSDOOverlay::overlayInitialize()
+{
+  ATH_MSG_INFO("InDetSDOOverlay initialized");
+
+  // Check and initialize keys
+  ATH_CHECK( m_mainInputTRTKey.initialize() );
+  ATH_CHECK( m_overlayInputTRTKey.initialize() );
+  ATH_CHECK( m_outputTRTKey.initialize() );
+  ATH_CHECK( m_mainInputSCTKey.initialize() );
+  ATH_CHECK( m_overlayInputSCTKey.initialize() );
+  ATH_CHECK( m_outputSCTKey.initialize() );
+  ATH_CHECK( m_mainInputPixelKey.initialize() );
+  ATH_CHECK( m_overlayInputPixelKey.initialize() );
+  ATH_CHECK( m_outputPixelKey.initialize() );
+
+  return StatusCode::SUCCESS;
+}
+
+//================================================================
+StatusCode InDetSDOOverlay::overlayFinalize()
+{
+  ATH_MSG_INFO("InDetSDOOverlay finalized");
+  return StatusCode::SUCCESS;
+}
+
+//================================================================
+StatusCode InDetSDOOverlay::overlayExecute()
+{
+  ATH_MSG_DEBUG("InDetSDOOverlay::execute() begin");
+
+  if (m_do_TRT) {
+    ATH_MSG_VERBOSE("Retrieving data input TRT SDO collection");
+    SG::ReadHandle<InDetSimDataCollection> dataContainer(m_mainInputTRTKey);
+    if (m_do_TRT_background && !dataContainer.isValid()) {   
+      ATH_MSG_WARNING("Could not get data TRT SDO collection \"" << m_mainInputTRTKey.key() << "\"");
+    }
+
+    ATH_MSG_VERBOSE("Retrieving MC input TRT SDO collection");
+    SG::ReadHandle<InDetSimDataCollection> mcContainer(m_overlayInputTRTKey);
+    if (!mcContainer.isValid()) {
+      ATH_MSG_WARNING("Could not get MC TRT SDO collection \"" << m_overlayInputTRTKey.key() << "\"");
+    }
+
+    SG::WriteHandle<InDetSimDataCollection> outputContainer(m_outputTRTKey);
+    outputContainer = CxxUtils::make_unique<InDetSimDataCollection>();
+
+    if ((!m_do_TRT_background || dataContainer.isValid()) && mcContainer.isValid() && outputContainer.isValid()) {
+      ATH_MSG_VERBOSE("Doing TRT SDO overlay");
+
+      const InDetSimDataCollection &mcSDO = *mcContainer;
+      InDetSimDataCollection &outputSDO = *outputContainer;
+
+      // Copy over MC
+      ATH_MSG_VERBOSE("Inserting MC SDO, size=" << mcSDO.size());
+      outputSDO.insert(mcSDO.begin(), mcSDO.end());
+  
+      // Merge with background
+      if (m_do_TRT_background) {
+        const InDetSimDataCollection &dataSDO = *dataContainer;
+        ATH_MSG_VERBOSE("Inserting data SDO, size=" << dataSDO.size());
+
+        for (const auto &entry : dataSDO) {
+          auto it = outputSDO.find(entry.first);
+          if (it != outputSDO.end()) {
+            // merge necessary
+            InDetSimData outSimData = it->second;
+            std::vector<InDetSimData::Deposit> depositsVector(outSimData.getdeposits());
+            depositsVector.insert(depositsVector.end(), entry.second.getdeposits().begin(), entry.second.getdeposits().end());
+
+            it->second = InDetSimData(depositsVector);
+          } else {
+            outputSDO.insert(entry);
+          }
+        }
+      }
+
+      ATH_MSG_VERBOSE("Output SDO size " << outputSDO.size());
+    }
+  }
+
+  if (m_do_SCT) {
+    ATH_MSG_VERBOSE("Retrieving MC input SCT SDO collection");
+    std::auto_ptr<InDetSimDataCollection> ap(m_storeGateMC->retrievePrivateCopy<InDetSimDataCollection>(m_overlayInputSCTKey.key()));
+
+    if (!m_storeGateOutput->record(ap, m_outputSCTKey.key()).isSuccess()) {
+      ATH_MSG_WARNING("Problem recording SCT SDO collection");
+    }
+  }
+
+  if (m_do_Pixel) {
+    ATH_MSG_VERBOSE("Retrieving MC input Pixel SDO collection");
+    std::auto_ptr<InDetSimDataCollection> ap(m_storeGateMC->retrievePrivateCopy<InDetSimDataCollection>(m_overlayInputPixelKey.key()));
+
+    if (!m_storeGateOutput->record(ap, m_outputPixelKey.key()).isSuccess()) {
+      ATH_MSG_WARNING("Problem recording Pixel SDO collection");
+    }
+  }
+
+  ATH_MSG_DEBUG("InDetSDOOverlay::execute() end");
+  return StatusCode::SUCCESS;
+}
diff --git a/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx b/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx
index bbd67887ddcb669b9a5755b0e72fac6dc41c2ccc..910c0fc60c5b7ae36e4b9cf6edc919071d5838f4 100755
--- a/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx
+++ b/InnerDetector/InDetRawAlgs/InDetOverlay/src/components/InDetOverlay_entries.cxx
@@ -1,11 +1,11 @@
 #include "GaudiKernel/DeclareFactoryEntries.h"
 #include "InDetOverlay/InDetOverlay.h"
-#include "InDetOverlay/DynConfSCT.h"
+#include "InDetOverlay/InDetSDOOverlay.h"
 
 DECLARE_ALGORITHM_FACTORY( InDetOverlay )
-DECLARE_ALGORITHM_FACTORY( DynConfSCT )
+DECLARE_ALGORITHM_FACTORY( InDetSDOOverlay )
   
 DECLARE_FACTORY_ENTRIES( InDetOverlay ) {
   DECLARE_ALGORITHM( InDetOverlay )
-  DECLARE_ALGORITHM( DynConfSCT )
+  DECLARE_ALGORITHM( InDetSDOOverlay )
 }
diff --git a/InnerDetector/InDetRawEvent/InDetRawData/CMakeLists.txt b/InnerDetector/InDetRawEvent/InDetRawData/CMakeLists.txt
index b651d2f6233e0183618196beaba7372edab81f85..f6662637a0ef39ad18e46d225f29c77998040aac 100644
--- a/InnerDetector/InDetRawEvent/InDetRawData/CMakeLists.txt
+++ b/InnerDetector/InDetRawEvent/InDetRawData/CMakeLists.txt
@@ -24,12 +24,12 @@ atlas_add_library( InDetRawData
                    src/*.cxx
                    PUBLIC_HEADERS InDetRawData
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthContainers AthLinks SGTools Identifier
+                   LINK_LIBRARIES AthContainers AthLinks SGTools Identifier EventContainers
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel )
 
 atlas_add_dictionary( InDetRawDataDict
                       InDetRawData/InDetRawDataCLASS_DEF.h
                       InDetRawData/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks SGTools Identifier GaudiKernel InDetRawData )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AthLinks SGTools Identifier GaudiKernel InDetRawData EventContainers )
 
diff --git a/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/InDetRawDataContainer.h b/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/InDetRawDataContainer.h
index c6da1bb5f71d2c6762fd8dc59e7a90e39a963732..7dfda31c37c86cebcdddf111663723e307b37a24 100755
--- a/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/InDetRawDataContainer.h
+++ b/InnerDetector/InDetRawEvent/InDetRawData/InDetRawData/InDetRawDataContainer.h
@@ -69,11 +69,6 @@ private:
   InDetRawDataContainer(const InDetRawDataContainer&);
   InDetRawDataContainer &operator=(const InDetRawDataContainer&);
 
-public:
-  // The default constructor is required in DEBUG builds (opt is OK),
-  // by boost's remove_const.hpp via T_AthenaPoolTPConverter
-  InDetRawDataContainer(){};
-
   ///////////////////////////////////////////////////////////////////
   // Private data:
   ///////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetRawEvent/InDetRawData/doc/packagedoc.h b/InnerDetector/InDetRawEvent/InDetRawData/doc/packagedoc.h
index 6cf6902c2777315a5e1de5d25be5c9477e76e14e..3dc252d5777fda5a003c7d70d9084ca8b03032cd 100644
--- a/InnerDetector/InDetRawEvent/InDetRawData/doc/packagedoc.h
+++ b/InnerDetector/InDetRawEvent/InDetRawData/doc/packagedoc.h
@@ -42,6 +42,5 @@ deriving from the same base class).
 
    - TRT_TB04_RawData: Class to implement test beam 2004 RawData for TRT
    
-@section InDetRawData_InDetRawDataReq Requirements
 
 */
diff --git a/InnerDetector/InDetRecAlgs/InDetConversionFinder/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/InDetConversionFinder/doc/packagedoc.h
index d605e8c539d321a6f276e06ae94b4938fc687a2d..491cb79f3e8f6e95f1e00e874362a0bc14c5e51e 100644
--- a/InnerDetector/InDetRecAlgs/InDetConversionFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/InDetConversionFinder/doc/packagedoc.h
@@ -28,9 +28,7 @@ the algorithm will use this default value.
 <li>Specify the name of IVertexFinder:<br>
     <b>''VertexFinderTool' : PublicToolHandle('InDet::InDetConversionFinderTools') </b></li>
 </ul>
-@section InDetConversionFinder_used_packagesInDetConversionFinder used packages
 
-@section InDetConversionFinder_requirements Requirements
 
 \namespace Vtx
 A namespace for all vertexing packages and related stuff.
diff --git a/InnerDetector/InDetRecAlgs/InDetExtensionProcessor/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/InDetExtensionProcessor/doc/packagedoc.h
index ed01844699fcb9749fb061deeaaf1571cadbf3c8..4d6cde3f2f57bbb726c2faa35d21bd83116b67d0 100644
--- a/InnerDetector/InDetRecAlgs/InDetExtensionProcessor/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/InDetExtensionProcessor/doc/packagedoc.h
@@ -71,15 +71,4 @@ Trk::TrackExtensionMap and with any type of track fitter.
 
 @section InDetExtensionProcessor_ExtrasInDetExtensionProcessor Extra Pages
 
- - @ref UsedInDetExtensionProcessor
- - @ref RequirementsInDetExtensionProcessor
 */
-
-/**
-@page UsedInDetExtensionProcessor Used Packages
-*/
-
-/**
-@page RequirementsInDetExtensionProcessor Requirements
-*/
-
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt
index 0fc0bb3b8e865a3368d8bfb6e658c5f13c967fe4..027946140465dab5aadbd84da343896732a3e02d 100644
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/CMakeLists.txt
@@ -17,7 +17,6 @@ atlas_depends_on_subdirs( PUBLIC
                           InnerDetector/InDetRecTools/SiClusterizationTool
                           Trigger/TrigEvent/TrigSteeringEvent
                           PRIVATE
-                          Control/CxxUtils
                           DetectorDescription/AtlasDetDescr
                           InnerDetector/InDetConditions/InDetConditionsSummaryService
                           InnerDetector/InDetConditions/SCT_ConditionsServices
@@ -29,7 +28,7 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_component( InDetPrepRawDataFormation
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests IRegionSelector Identifier GaudiKernel InDetRawData InDetPrepRawData SiClusterizationToolLib TrigSteeringEvent CxxUtils AtlasDetDescr InDetIdentifier InDetReadoutGeometry )
+                     LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests IRegionSelector Identifier GaudiKernel InDetRawData InDetPrepRawData SiClusterizationToolLib TrigSteeringEvent AtlasDetDescr InDetIdentifier InDetReadoutGeometry )
 
 # Install files from the package:
 atlas_install_headers( InDetPrepRawDataFormation )
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/CacheCreator.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/CacheCreator.h
new file mode 100644
index 0000000000000000000000000000000000000000..cc1b91038ffad2e241b745f7a4f6cf07a47902c5
--- /dev/null
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/CacheCreator.h
@@ -0,0 +1,57 @@
+/*
+Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+/**
+* @file CacheCreator.h
+* @author a.barton
+*/
+
+#ifndef INDETPREPRAWDATAFORMATION_CACHECREATOR
+#define INDETPREPRAWDATAFORMATION_CACHECREATOR
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "InDetPrepRawData/PixelClusterContainer.h"
+#include "InDetPrepRawData/TRT_DriftCircleContainer.h"
+#include "InDetPrepRawData/SCT_ClusterContainer.h"
+
+class TRT_ID;
+class PixelID;
+class SCT_ID;
+
+namespace InDet{
+
+    class CacheCreator : public AthReentrantAlgorithm 
+    {
+    public:
+
+        CacheCreator(const std::string &name,ISvcLocator *pSvcLocator);
+        virtual ~CacheCreator()  ;
+        virtual StatusCode initialize () override;
+        virtual StatusCode execute_r (const EventContext& ctx) const override;
+        //No need for finalize
+    protected:
+        const TRT_ID* m_pTRTHelper;
+        const PixelID* m_pix_idHelper;
+        const SCT_ID*  m_sct_idHelper;
+        SG::WriteHandleKey<InDet::TRT_DriftCircleContainerCache> m_rioContainerCacheKey;
+        SG::WriteHandleKey<SCT_ClusterContainerCache>            m_SCTclusterContainerCacheKey;
+        SG::WriteHandleKey<InDet::PixelClusterContainerCache>    m_PIXclusterContainerCacheKey;
+
+        template<typename T>
+        StatusCode CreateContainer(const SG::WriteHandleKey<T>& , long unsigned int , const EventContext& ) const;
+    };
+
+    template<typename T>
+    StatusCode CacheCreator::CreateContainer(const SG::WriteHandleKey<T>& containerKey, long unsigned int size, const EventContext& ctx) const{
+        SG::WriteHandle<T> ContainerCacheKey(containerKey, ctx);
+        ATH_CHECK( ContainerCacheKey.record ( std::make_unique<T>(IdentifierHash(size), nullptr) ));
+        ATH_MSG_DEBUG( "Container "<< containerKey.key() << " created to hold " << size );
+        return StatusCode::SUCCESS;
+    }
+
+}
+
+
+#endif //INDETPREPRAWDATAFORMATION_CACHECREATOR
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h
old mode 100755
new mode 100644
index a8658d0687e70124fe71e982fe33a6162a8b1c99..f43c32d403e1ddc926b683b26e66009ae79dcc65
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/PixelClusterization.h
@@ -66,9 +66,9 @@ public:
 
   //@name Usual algorithm methods 
   //@{
-  virtual StatusCode initialize();
-  virtual StatusCode execute();
-  virtual StatusCode finalize();
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute() override;
+  virtual StatusCode finalize() override;
   /**    @name Disallow default instantiation, copy, assignment */
   //@{
   //@}
@@ -90,6 +90,7 @@ private:
   SG::WriteHandleKey<PixelClusterContainer> m_clusterContainerKey;
   SG::WriteHandleKey<SiClusterContainer> m_clusterContainerLinkKey;
   SG::WriteHandleKey<PixelGangedClusterAmbiguities> m_ambiguitiesMapKey;
+  SG::UpdateHandleKey<InDet::PixelClusterContainerCache> m_clusterContainercacheKey;
   const SiDetectorManager* m_manager;
 };
 
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h
old mode 100755
new mode 100644
index b89b0ea76421d207de828091f6f86e3094cfb33e..c66548ddb0bd01617f80f9b5dc76e6dfbc88eb63
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h
@@ -65,11 +65,11 @@ public:
   /**    @name Usual algorithm methods */
   //@{
   ///Retrieve the tools used and initialize variables
-  virtual StatusCode initialize();
+  virtual StatusCode initialize() override;
   ///Form clusters and record them in StoreGate (detector store)
-  virtual StatusCode execute();
+  virtual StatusCode execute() override;
   ///Clean up and release the collection containers
-  virtual StatusCode finalize();
+  virtual StatusCode finalize() override;
   //@}
 
 
@@ -101,6 +101,7 @@ private:
   bool                                     m_checkBadModules;
   std::set<IdentifierHash>                 m_flaggedModules;
   unsigned int                             m_maxTotalOccupancyPercent;
+  SG::UpdateHandleKey<SCT_ClusterContainerCache> m_clusterContainerCacheKey;
 };
 
 }
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/TRT_RIO_Maker.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/TRT_RIO_Maker.h
old mode 100755
new mode 100644
index b11db978906e444ae687023da70997d2b23b8722..bd5a8753d683aa879904e7e99174ac32f5b19c9e
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/TRT_RIO_Maker.h
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/TRT_RIO_Maker.h
@@ -51,9 +51,9 @@ namespace InDet{
     virtual ~TRT_RIO_Maker()  ;
     /**    @name Usual algorithm methods */
     //@{
-    StatusCode initialize ()  ;
-    StatusCode execute    ()  ;
-    StatusCode finalize   ()  ;
+    StatusCode initialize ()  override;
+    StatusCode execute    ()  override;
+    StatusCode finalize   ()  override;
     //@}
   private:
   
@@ -62,7 +62,7 @@ namespace InDet{
     TRT_RIO_Maker(const TRT_RIO_Maker&) = delete;
     TRT_RIO_Maker &operator=(const TRT_RIO_Maker&) = delete;
   
-    const TRT_ID* pTRTHelper;
+    const TRT_ID* m_pTRTHelper;
     SG::ReadHandleKey<TRT_RDO_Container> m_rdoContainerKey;
     ToolHandle< ITRT_DriftCircleTool > m_driftcircle_tool;
     SG::WriteHandleKey<InDet::TRT_DriftCircleContainer> m_rioContainerKey;
@@ -73,6 +73,7 @@ namespace InDet{
     bool m_roiSeeded;                                //!< detector manager name in StoreGate
     SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey;
     ServiceHandle<IRegSelSvc>     m_regionSelector;     //!< region selector service
+    SG::UpdateHandleKey<InDet::TRT_DriftCircleContainerCache> m_rioContainerCacheKey;
 
   };
 }//end of namespace
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/README b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/README
old mode 100755
new mode 100644
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/doc/packagedoc.h
index 8f9baf821f630743426ea05645162a25765b099a..8438d98daa7c0dd3056fd8cd9851d3287ae92a7d 100644
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/doc/packagedoc.h
@@ -33,18 +33,11 @@ introduction of the use of SCT_ConditionsAlgTools.
 TRT_RIO_Maker
 -------------
 
-@ref used_InDetPrepRawDataFormation
 
-@ref requirements_InDetPrepRawDataFormation
 
 */
 
 /**
 
-@page used_InDetPrepRawDataFormation Used Packages
 
 */
-
-/**
-@page requirements_InDetPrepRawDataFormation requirements
-*/
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a7db8e78a1a8b0db16b2bc52dd227ed30cb72ba3
--- /dev/null
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/CacheCreator.cxx
@@ -0,0 +1,67 @@
+/*
+Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#include "InDetPrepRawDataFormation/CacheCreator.h"
+
+#include "InDetIdentifier/PixelID.h"
+#include "InDetIdentifier/TRT_ID.h"
+#include "InDetIdentifier/SCT_ID.h"
+
+#include "Identifier/IdentifierHash.h"
+
+namespace InDet{
+
+    CacheCreator::CacheCreator(const std::string &name, ISvcLocator *pSvcLocator) :
+    AthReentrantAlgorithm(name,pSvcLocator),
+    m_pTRTHelper(nullptr),
+    m_pix_idHelper(nullptr),
+    m_sct_idHelper(nullptr),
+    m_rioContainerCacheKey(""),
+    m_SCTclusterContainerCacheKey(""),
+    m_PIXclusterContainerCacheKey("")
+    {
+        declareProperty("TRT_DriftCircleKey", m_rioContainerCacheKey);
+        declareProperty("SCT_ClusterKey"    , m_SCTclusterContainerCacheKey);
+        declareProperty("Pixel_ClusterKey"  , m_PIXclusterContainerCacheKey);
+    }
+
+
+    StatusCode CacheCreator::initialize(){
+        ATH_CHECK( m_rioContainerCacheKey.initialize(!m_rioContainerCacheKey.key().empty()) );
+        ATH_CHECK( m_SCTclusterContainerCacheKey.initialize(!m_SCTclusterContainerCacheKey.key().empty()) );
+        ATH_CHECK( m_PIXclusterContainerCacheKey.initialize(!m_PIXclusterContainerCacheKey.key().empty()) );
+
+        ATH_CHECK(detStore()->retrieve(m_pTRTHelper  , "TRT_ID"));
+        ATH_CHECK(detStore()->retrieve(m_sct_idHelper, "SCT_ID"));
+        ATH_CHECK(detStore()->retrieve(m_pix_idHelper, "PixelID"));
+        return StatusCode::SUCCESS;
+    }
+
+    CacheCreator::~CacheCreator() {}
+
+    StatusCode CacheCreator::execute_r (const EventContext& ctx) const
+    {
+
+        if(m_rioContainerCacheKey.key().empty()==false){
+            ATH_CHECK(CreateContainer(m_rioContainerCacheKey, m_pTRTHelper->straw_layer_hash_max(), ctx));
+        }else{
+            ATH_MSG_DEBUG( "Creation of container "<< m_rioContainerCacheKey.key() << " is disabled (no name specified)");    
+        }
+        
+        if(m_SCTclusterContainerCacheKey.key().empty()==false){
+            ATH_CHECK(CreateContainer(m_SCTclusterContainerCacheKey, m_sct_idHelper->wafer_hash_max(), ctx));
+        }else{
+            ATH_MSG_DEBUG( "Creation of container "<< m_SCTclusterContainerCacheKey.key() << " is disabled (no name specified)");    
+        }
+        
+        if(m_PIXclusterContainerCacheKey.key().empty()==false){
+            ATH_CHECK(CreateContainer(m_PIXclusterContainerCacheKey, m_pix_idHelper->wafer_hash_max(), ctx));
+        }else{
+            ATH_MSG_DEBUG( "Creation of container "<< m_PIXclusterContainerCacheKey.key() << " is disabled (no name specified)");    
+        }
+
+        return StatusCode::SUCCESS;
+    }
+}
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx
old mode 100755
new mode 100644
index c3fea463eef290a6b123b11fd563040e04a2fc15..c1161f3214ba39e45f353da79a66cfc509edb01d
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/PixelClusterization.cxx
@@ -44,6 +44,7 @@ namespace InDet{
   m_clusterContainerKey(""),
   m_clusterContainerLinkKey(""),
   m_ambiguitiesMapKey(""),
+  m_clusterContainercacheKey(""),
   m_manager(nullptr) {  
     // Get parameter values from jobOptions file
     declareProperty("DataObjectName", m_rdoContainerKey = std::string("PixelRDOs"));
@@ -61,7 +62,7 @@ namespace InDet{
                   "Ambiguity Map container");
     declareProperty("RoIs", m_roiCollectionKey = std::string(""), "RoIs to read in");
     declareProperty("isRoI_Seeded", m_roiSeeded = false, "Use RoI");
-    
+    declareProperty("ClusterContainerCacheKey", m_clusterContainercacheKey, "Optional External Pixel cluster Cache");
     // error strategy <-- this is now in the MergedPixelTool
     //
     // 0 : broad errors (cluster width/sqrt(12) )
@@ -100,6 +101,7 @@ namespace InDet{
     ATH_CHECK( m_clusterContainerKey.initialize() );
     ATH_CHECK( m_clusterContainerLinkKey.initialize() );
     ATH_CHECK( m_ambiguitiesMapKey.initialize() );
+    ATH_CHECK( m_clusterContainercacheKey.initialize(!m_clusterContainercacheKey.key().empty()) );
 
     ATH_MSG_DEBUG( "Initialize done !" );
     return StatusCode::SUCCESS;
@@ -109,9 +111,14 @@ namespace InDet{
   // Execute method:
   StatusCode PixelClusterization::execute() {
   
-//    ATH_MSG_INFO( "Container m_clusterContainer '" << m_clusterContainer.name() << "' set");
+
     SG::WriteHandle<PixelClusterContainer> clusterContainer(m_clusterContainerKey);
-    ATH_CHECK( clusterContainer.record (std::make_unique<PixelClusterContainer>(m_idHelper->wafer_hash_max())) );
+    if(m_clusterContainercacheKey.key().empty()){
+      ATH_CHECK( clusterContainer.record (std::make_unique<PixelClusterContainer>(m_idHelper->wafer_hash_max())) );
+    }else{
+      SG::UpdateHandle<PixelClusterContainerCache> clusterContainercache(m_clusterContainercacheKey);
+      ATH_CHECK( clusterContainer.record (std::make_unique<PixelClusterContainer>(clusterContainercache.ptr() )));
+    }
 
     ATH_CHECK(clusterContainer.isValid());
     ATH_MSG_DEBUG( "Container '" << clusterContainer->name() << "' initialised" );
@@ -121,7 +128,7 @@ namespace InDet{
 
     ATH_MSG_DEBUG( "Creating the ganged ambiguities map");
     SG::WriteHandle<PixelGangedClusterAmbiguities> ambiguitiesMap(m_ambiguitiesMapKey);
-    ambiguitiesMap = CxxUtils::make_unique<PixelGangedClusterAmbiguities>();
+    ambiguitiesMap = std::make_unique<PixelGangedClusterAmbiguities>();
 
     SG::ReadHandle<PixelRDO_Container> rdoContainer(m_rdoContainerKey);
 
@@ -135,16 +142,16 @@ namespace InDet{
       for(; rdoCollections!=rdoCollectionsEnd; ++rdoCollections){
         const COLLECTION* RDO_Collection(*rdoCollections);
         if (!RDO_Collection || RDO_Collection->empty()) continue;
+        if( clusterContainer->tryFetch( rdoCollections.hashId() )) continue;
+
 
         // Use one of the specific clustering AlgTools to make clusters
         std::unique_ptr<PixelClusterCollection> clusterCollection (m_clusteringTool->clusterize(*RDO_Collection, *m_manager, *m_idHelper));
         if (clusterCollection && !clusterCollection->empty()){
 
           m_gangedAmbiguitiesFinder->execute(clusterCollection.get(),*m_manager,*ambiguitiesMap);
-          // -me- new IDC does no longer register in Storegate if hash is used !
-          ATH_CHECK(clusterContainer->addCollection( clusterCollection.get(), clusterCollection->identifyHash() ));
-          clusterCollection.release();//Release ownership if sucessfully added to collection
-
+          
+          ATH_CHECK(clusterContainer->addOrDelete( std::move(clusterCollection), clusterCollection->identifyHash() ));
         }else{
           ATH_MSG_DEBUG("No PixelClusterCollection to write");
         }
@@ -156,7 +163,7 @@ namespace InDet{
 
       TrigRoiDescriptorCollection::const_iterator roi = roiCollection->begin();
       TrigRoiDescriptorCollection::const_iterator roiE = roiCollection->end();
-      PixelRDO_Container::const_iterator rdoCollectionsEnd   = rdoContainer->end();
+
       std::vector<IdentifierHash> listOfPixIds;
       for (; roi!=roiE; ++roi) {
         
@@ -166,13 +173,10 @@ namespace InDet{
         ATH_MSG_VERBOSE( "REGTEST: Pixel : Roi contains " 
 		     << listOfPixIds.size() << " det. Elements" );
         for (unsigned int i=0; i < listOfPixIds.size(); i++) {
-            
-          PixelRDO_Container::const_iterator 
-            RDO_collection_iter = rdoContainer->indexFind(listOfPixIds[i]); 
 
-          if (RDO_collection_iter == rdoCollectionsEnd) continue;
+          if( clusterContainer->tryFetch( listOfPixIds[i] )) continue;
 
-          const InDetRawDataCollection<PixelRDORawData>* RDO_Collection (*RDO_collection_iter);
+          const InDetRawDataCollection<PixelRDORawData>* RDO_Collection (rdoContainer->indexFindPtr(listOfPixIds[i]));
 
           if (!RDO_Collection) continue;
 
@@ -182,8 +186,7 @@ namespace InDet{
             ATH_MSG_VERBOSE( "REGTEST: Pixel : clusterCollection contains " 
                 << clusterCollection->size() << " clusters" );
             m_gangedAmbiguitiesFinder->execute(clusterCollection.get(),*m_manager,*ambiguitiesMap);
-            ATH_CHECK(clusterContainer->addCollection( clusterCollection.get(), clusterCollection->identifyHash() ));
-            clusterCollection.release();//Release ownership if sucessfully added to collection
+            ATH_CHECK(clusterContainer->addOrDelete( std::move(clusterCollection), clusterCollection->identifyHash() ));
 
           }else{
             ATH_MSG_DEBUG("No PixelClusterCollection to write");
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx
old mode 100755
new mode 100644
index e1c873b9dc63252b612852e09d523aeaad64ddbe..0276cd99f440ad0ed7408e187b15ef0a65a3badb
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx
@@ -44,7 +44,8 @@ namespace InDet{
     m_flaggedConditionSvc("SCT_FlaggedConditionSvc",name),
     m_checkBadModules(true),
     m_flaggedModules(),
-    m_maxTotalOccupancyPercent(10)
+    m_maxTotalOccupancyPercent(10),
+    m_clusterContainerCacheKey("")
   {  
   // Get parameter values from jobOptions file    
     declareProperty("DataObjectName", m_rdoContainerKey, "SCT RDOs" );
@@ -59,7 +60,7 @@ namespace InDet{
     declareProperty("maxTotalOccupancyInPercent",m_maxTotalOccupancyPercent);
     declareProperty("ClustersName", m_clusterContainerKey, "SCT cluster container");    
     declareProperty("ClustersLinkName_", m_clusterContainerLinkKey, "SCT cluster container link name (don't set this)");
-    
+    declareProperty("ClusterContainerCacheKey", m_clusterContainerCacheKey);
   }
 
 
@@ -79,7 +80,7 @@ namespace InDet{
     ATH_CHECK(m_rdoContainerKey.initialize());
     ATH_CHECK(m_clusterContainerKey.initialize());
     ATH_CHECK(m_clusterContainerLinkKey.initialize());
-
+    ATH_CHECK(m_clusterContainerCacheKey.initialize(!m_clusterContainerCacheKey.key().empty()));
     // Get the flagged conditions service
     ATH_CHECK(m_flaggedConditionSvc.retrieve());
 
@@ -104,8 +105,13 @@ namespace InDet{
 // Execute method:
   StatusCode SCT_Clusterization::execute(){
   // Register the IdentifiableContainer into StoreGate
-   SG::WriteHandle<SCT_ClusterContainer> clusterContainer(m_clusterContainerKey);   
-   ATH_CHECK( clusterContainer.record (std::make_unique<SCT_ClusterContainer>(m_idHelper->wafer_hash_max())) );
+   SG::WriteHandle<SCT_ClusterContainer> clusterContainer(m_clusterContainerKey);
+   if(m_clusterContainerCacheKey.key().empty()){
+    ATH_CHECK( clusterContainer.record (std::make_unique<SCT_ClusterContainer>(m_idHelper->wafer_hash_max())) );
+   }else{
+    SG::UpdateHandle<SCT_ClusterContainerCache> clusterContainercache(m_clusterContainerCacheKey);
+    ATH_CHECK( clusterContainer.record (std::make_unique<SCT_ClusterContainer>(clusterContainercache.ptr()) ));
+   }
    ATH_MSG_DEBUG( "Container '" << clusterContainer.name() << "' initialised" );
 
    ATH_CHECK( clusterContainer.symLink (m_clusterContainerLinkKey) );
@@ -151,6 +157,13 @@ namespace InDet{
     #ifndef NDEBUG
           ATH_MSG_DEBUG("RDO collection size=" << rd->size() << ", Hash=" << rd->identifyHash());
     #endif
+          if( clusterContainer->tryFetch( rdoCollections.hashId() )){ 
+    #ifndef NDEBUG
+            ATH_MSG_DEBUG("Item already in cache , Hash=" << rd->identifyHash());
+    #endif
+            continue;
+          }
+
           bool goodModule = (m_checkBadModules and m_pSummarySvc) ? m_pSummarySvc->isGood(rd->identifyHash()) : true;
           // Check the RDO is not empty and that the wafer is good according to the conditions
           if ((not rd->empty()) and goodModule){
@@ -165,9 +178,8 @@ namespace InDet{
             if (clusterCollection) { 
               if (not clusterCollection->empty()) {
                 //Using get because I'm unsure of move semantec status
-                ATH_CHECK(clusterContainer->addCollection(clusterCollection.get(), clusterCollection->identifyHash()));
+                ATH_CHECK(clusterContainer->addOrDelete(std::move(clusterCollection), clusterCollection->identifyHash()));
 
-                clusterCollection.release();//Release ownership if sucessfully added to collection
     #ifndef NDEBUG
                  ATH_MSG_DEBUG("Clusters with key '" << clusterCollection->identifyHash() << "' added to Container\n");
     #endif                
@@ -197,13 +209,15 @@ namespace InDet{
 		     << listOfSCTIds.size() << " det. Elements" );
 #endif
           for (size_t i=0; i < listOfSCTIds.size(); i++) {
-            
-            SCT_RDO_Container::const_iterator 
-            RDO_collection_iter = rdoContainer->indexFind(listOfSCTIds[i]); 
-
-            if (RDO_collection_iter == rdoCollectionsEnd) continue;
 
-            const InDetRawDataCollection<SCT_RDORawData>* RDO_Collection (*RDO_collection_iter);
+            if( clusterContainer->tryFetch( listOfSCTIds[i] )){
+              #ifndef NDEBUG
+              ATH_MSG_DEBUG("Item already in cache , Hash=" << listOfSCTIds[i]);
+              #endif
+              continue;
+            }
+            
+            const InDetRawDataCollection<SCT_RDORawData>* RDO_Collection (rdoContainer->indexFindPtr(listOfSCTIds[i]));
 
             if (!RDO_Collection) continue;
 
@@ -214,20 +228,16 @@ namespace InDet{
               ATH_MSG_VERBOSE( "REGTEST: SCT : clusterCollection contains " 
                 << clusterCollection->size() << " clusters" );
 #endif
-              ATH_CHECK(clusterContainer->addCollection( clusterCollection.get(), clusterCollection->identifyHash() ));
-              clusterCollection.release();//Release ownership if sucessfully added to collection
-
+              ATH_CHECK(clusterContainer->addOrDelete( std::move(clusterCollection), clusterCollection->identifyHash() ));
           }else{
               ATH_MSG_DEBUG("No SCTClusterCollection to write");
           }
         }
-      }   
+      }
        
      }
     }
     
-    
-    
     // Set container to const
     ATH_CHECK(clusterContainer.setConst());
     
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx
old mode 100755
new mode 100644
index ea02f901f65b64ad78c17205d4e69fe610c4d2af..dcde854a69728b1984a635fb6141e82efd077739
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/TRT_RIO_Maker.cxx
@@ -17,7 +17,7 @@
 //
 #include "GaudiKernel/ISvcLocator.h"
 #include "StoreGate/DataHandle.h"
-#include "CxxUtils/make_unique.h"
+
 
 
 namespace InDet {
@@ -28,7 +28,7 @@ namespace InDet {
   TRT_RIO_Maker::TRT_RIO_Maker
   (const std::string& name,ISvcLocator* pSvcLocator) : 
   AthAlgorithm(name,pSvcLocator),
-  pTRTHelper(nullptr),
+  m_pTRTHelper(nullptr),
   m_rdoContainerKey("TRT_RDOs"),
   m_driftcircle_tool("InDet::TRT_DriftCircleTool", this), //made private
   m_rioContainerKey("TRT_DriftCircles"),
@@ -36,7 +36,8 @@ namespace InDet {
   m_trtBadChannels(0),
   m_roiSeeded(false),
   m_roiCollectionKey(""),
-  m_regionSelector("RegSelSvc", name)
+  m_regionSelector("RegSelSvc", name),
+  m_rioContainerCacheKey("")
   {
     // Read TRT_RIO_Maker steering parameters
     declareProperty("TRTRDOLocation"      ,m_rdoContainerKey  );
@@ -45,7 +46,8 @@ namespace InDet {
     //selection of the TRT bad channels(true/false)
     declareProperty("TRTBadChannels"    ,m_trtBadChannels = true );
     declareProperty("TRT_DriftCircleTool", m_driftcircle_tool);
-    declareProperty("TRTRIOLocation",  m_rioContainerKey);    
+    declareProperty("TRTRIOLocation",  m_rioContainerKey);
+    declareProperty("TRTRIOCache",  m_rioContainerCacheKey);
   }
   
   ///////////////////////////////////////////////////////////////////
@@ -54,10 +56,11 @@ namespace InDet {
   StatusCode TRT_RIO_Maker::initialize() {
     // Get TRT_DriftCircle tool
     ATH_CHECK(m_driftcircle_tool.retrieve());
-    ATH_CHECK(detStore()->retrieve(pTRTHelper,"TRT_ID"));
+    ATH_CHECK(detStore()->retrieve(m_pTRTHelper,"TRT_ID"));
 
     ATH_CHECK( m_rdoContainerKey.initialize() );
     ATH_CHECK( m_rioContainerKey.initialize() );
+    ATH_CHECK( m_rioContainerCacheKey.initialize(!m_rioContainerCacheKey.key().empty()) );
     msg(MSG::DEBUG) << "getTRTBadChannels on or off (1/0)" <<m_trtBadChannels<< endmsg;
     return StatusCode::SUCCESS;
   }
@@ -73,7 +76,12 @@ namespace InDet {
 
 
     SG::WriteHandle<InDet::TRT_DriftCircleContainer> rioContainer(m_rioContainerKey);
-    rioContainer = CxxUtils::make_unique<InDet::TRT_DriftCircleContainer>(pTRTHelper->straw_layer_hash_max());
+    if(m_rioContainerCacheKey.key().empty()){
+      rioContainer = std::make_unique<InDet::TRT_DriftCircleContainer>(m_pTRTHelper->straw_layer_hash_max());
+    }else{
+      SG::UpdateHandle<TRT_DriftCircleContainerCache> clusterContainercache(m_rioContainerCacheKey);
+      ATH_CHECK( rioContainer.record (std::make_unique<TRT_DriftCircleContainer>(clusterContainercache.ptr()) ));
+    }
 
     ATH_CHECK(rioContainer.isValid());
     ATH_MSG_DEBUG( "Container "<< rioContainer.name() << " initialised" );
@@ -83,13 +91,13 @@ namespace InDet {
     // Get TRT_RDO and produce TRT_RIO collections
     if (!m_roiSeeded) {//Full-scan mode
 
-      for(auto& rdoCollections : *rdoContainer) {
+      for(const auto& rdoCollections : *rdoContainer) {
         const InDetRawDataCollection<TRT_RDORawData>* currentCollection(rdoCollections);
+        if( rioContainer->tryFetch( currentCollection->identifyHash() )) continue;
         std::unique_ptr<TRT_DriftCircleCollection> p_rio(m_driftcircle_tool->convert(m_mode_rio_production,
           currentCollection , m_trtBadChannels));
         if(p_rio && !p_rio->empty()) {
-           ATH_CHECK(rioContainer->addCollection(p_rio.get(), p_rio->identifyHash()));
-           p_rio.release();//Release ownership if sucessfully added to collection
+           ATH_CHECK(rioContainer->addOrDelete(std::move(p_rio), p_rio->identifyHash()));
         }
      }
     }else{
@@ -106,9 +114,8 @@ namespace InDet {
 		     << listOfTRTIds.size() << " det. Elements" );
 #endif   
          for(auto &id : listOfTRTIds){
-            TRT_RDO_Container::const_iterator RDO_collection_iter = rdoContainer->indexFind(id);
-            if (RDO_collection_iter == rdoContainer->end()) continue;
-            const InDetRawDataCollection<TRT_RDORawData>* RDO_Collection (*RDO_collection_iter);
+            if( rioContainer->tryFetch( id )) continue;
+            const InDetRawDataCollection<TRT_RDORawData>* RDO_Collection (rdoContainer->indexFindPtr(id));
             if (!RDO_Collection) continue;
             // Use one of the specific clustering AlgTools to make clusters
             std::unique_ptr<TRT_DriftCircleCollection> p_rio(m_driftcircle_tool->convert(m_mode_rio_production,
@@ -118,8 +125,8 @@ namespace InDet {
                  ATH_MSG_VERBOSE( "REGTEST: TRT : DriftCircleCollection contains "
                  << p_rio->size() << " clusters" );
 #endif
-                 ATH_CHECK(rioContainer->addCollection(p_rio.get(), p_rio->identifyHash()));
-                 p_rio.release();//Release ownership if sucessfully added to collection
+                 ATH_CHECK(rioContainer->addOrDelete(std::move(p_rio), p_rio->identifyHash()));
+
             }
          }
       }
diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/components/InDetPrepRawDataFormation_entries.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/components/InDetPrepRawDataFormation_entries.cxx
index 80662aa72554df1156432be41183ac64d8e36ab5..036a7f6a216e30ae60942d42732b7c637b911dee 100755
--- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/components/InDetPrepRawDataFormation_entries.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/components/InDetPrepRawDataFormation_entries.cxx
@@ -1,6 +1,7 @@
 #include "InDetPrepRawDataFormation/PixelClusterization.h"
 #include "InDetPrepRawDataFormation/SCT_Clusterization.h"
 #include "InDetPrepRawDataFormation/TRT_RIO_Maker.h"
+#include "InDetPrepRawDataFormation/CacheCreator.h"
 
 #include "GaudiKernel/DeclareFactoryEntries.h"
 
@@ -9,12 +10,14 @@ using namespace InDet;
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, PixelClusterization)
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, SCT_Clusterization )
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, TRT_RIO_Maker      )
+DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, CacheCreator      )
 
 DECLARE_FACTORY_ENTRIES( InDetPrepRawDataFormation ) 
 {
   DECLARE_NAMESPACE_ALGORITHM( InDet, PixelClusterization)
   DECLARE_NAMESPACE_ALGORITHM( InDet, SCT_Clusterization )
   DECLARE_NAMESPACE_ALGORITHM( InDet, TRT_RIO_Maker      )
+  DECLARE_NAMESPACE_ALGORITHM( InDet, CacheCreator       )
 }
 
 
diff --git a/InnerDetector/InDetRecAlgs/InDetPriVxFinder/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/InDetPriVxFinder/doc/packagedoc.h
index c489759ea6064722f28cddb8ee0898a6e82df79c..4803458b09c7142acbe190c5405934d34a422da0 100644
--- a/InnerDetector/InDetRecAlgs/InDetPriVxFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/InDetPriVxFinder/doc/packagedoc.h
@@ -24,9 +24,7 @@ name this can be left untouched.</i></li>
 <li>Specify the name of the output container:<br>
 <b>VxPrimary.VxCandidatesOutputName      = "VxPrimaryCandidate";</b></li>
 </ul>
-@section InDetPriVxFinder_used_packagesInDetPriVxFinder used packages
 
-@section InDetPriVxFinder_requirements Requirements
 
 \namespace Vtx
 A namespace for all vertexing packages and related stuff.
diff --git a/InnerDetector/InDetRecAlgs/InDetTrackPRD_Association/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/InDetTrackPRD_Association/doc/packagedoc.h
index 2c5b72285790984a7bb836654cc126a6e7af6f50..5c2a63fa31a2c63b7b0d0e36da171c0289a04fdb 100644
--- a/InnerDetector/InDetRecAlgs/InDetTrackPRD_Association/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/InDetTrackPRD_Association/doc/packagedoc.h
@@ -12,7 +12,5 @@ This algorithm is devoted to track - PRD assocoation.
 
 This algorithm uses Trk::IPRD_AssociationTool
 
-@section InDetTrackPRD_Association_InDetTrackPRD_AssociationReq Requirements file
 
 */
-
diff --git a/InnerDetector/InDetRecAlgs/InDetV0Finder/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/InDetV0Finder/doc/packagedoc.h
index 56866abb219107fe1396049af03ffbce257f3baa..0d50bb607e35bf318b2e4d303494eea992a6956d 100644
--- a/InnerDetector/InDetRecAlgs/InDetV0Finder/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/InDetV0Finder/doc/packagedoc.h
@@ -65,7 +65,6 @@ which can be changed through jobOptions:
   - double <b></i>m_nsig</i></b> : mass windows set to m_nsig times the mass resolution (5.)
 
 
-@section InDetV0Finder_requirementsInDetV0Finder Requirements
 
 
 */
diff --git a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0FinderTool.cxx b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0FinderTool.cxx
index 627d5248d7a2ac10078b4535e677eaa6ae2dd849..8eda9eb0881a219b48e67f7c1cf6b9a732b7850e 100755
--- a/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0FinderTool.cxx
+++ b/InnerDetector/InDetRecAlgs/InDetV0Finder/src/InDetV0FinderTool.cxx
@@ -478,9 +478,9 @@ StatusCode InDetV0FinderTool::performSearch(xAOD::VertexContainer*& v0Container,
 
             std::unique_ptr<xAOD::Vertex> myVxCandidate;
             if (m_useV0Fitter) {
-              myVxCandidate = std::move(std::unique_ptr<xAOD::Vertex>( concreteVertexFitter->fit(pairV0, startingPoint) ));
+              myVxCandidate = std::unique_ptr<xAOD::Vertex>( concreteVertexFitter->fit(pairV0, startingPoint) );
             } else {
-              myVxCandidate = std::move(std::unique_ptr<xAOD::Vertex>(  m_iVKVertexFitter->fit(pairV0, startingPoint) ));
+              myVxCandidate = std::unique_ptr<xAOD::Vertex>(  m_iVKVertexFitter->fit(pairV0, startingPoint) );
             }
       
               if (myVxCandidate)
@@ -517,7 +517,7 @@ StatusCode InDetV0FinderTool::performSearch(xAOD::VertexContainer*& v0Container,
                       bool foundLambdabar = false;
 
                       if (doKshortFit && !m_doSimpleV0) {
-                        myKshort = std::move(std::unique_ptr<xAOD::Vertex>( massFit(310, pairV0, vertex, concreteVertexFitter) ));
+                        myKshort = std::unique_ptr<xAOD::Vertex>( massFit(310, pairV0, vertex, concreteVertexFitter) );
                         if (myKshort) {
                           if (m_V0Tools->vertexProbability(myKshort.get()) >= m_minConstrVertProb) {
                             myKshort->setVertexType(xAOD::VxType::V0Vtx);
@@ -528,7 +528,7 @@ StatusCode InDetV0FinderTool::performSearch(xAOD::VertexContainer*& v0Container,
                       }
 
                       if (doLambdaFit && !m_doSimpleV0) {
-                        myLambda = std::move(std::unique_ptr<xAOD::Vertex>( massFit(3122, pairV0, vertex, concreteVertexFitter) ));
+                        myLambda = std::unique_ptr<xAOD::Vertex>( massFit(3122, pairV0, vertex, concreteVertexFitter) );
                         if (myLambda) {
                           if (m_V0Tools->vertexProbability(myLambda.get()) >= m_minConstrVertProb) {
                             myLambda->setVertexType(xAOD::VxType::V0Vtx);
@@ -538,7 +538,7 @@ StatusCode InDetV0FinderTool::performSearch(xAOD::VertexContainer*& v0Container,
                       }
 
                       if (doLambdabarFit && !m_doSimpleV0) {
-                        myLambdabar = std::move(std::unique_ptr<xAOD::Vertex>( massFit(-3122, pairV0, vertex, concreteVertexFitter)));
+                        myLambdabar = std::unique_ptr<xAOD::Vertex>( massFit(-3122, pairV0, vertex, concreteVertexFitter));
                         if (myLambdabar) {
                           if (m_V0Tools->vertexProbability(myLambdabar.get()) >= m_minConstrVertProb) {
                             myLambdabar->setVertexType(xAOD::VxType::V0Vtx);
@@ -644,7 +644,7 @@ StatusCode InDetV0FinderTool::performSearch(xAOD::VertexContainer*& v0Container,
                           v0_lbLinksDecor(*(v0Container->back())) = lbLink;
                         }
                         if (doGamma && !m_doSimpleV0) {
-		          myGamma = std::move(std::unique_ptr<xAOD::Vertex>( massFit(22, pairV0, vertex, concreteVertexFitter) ));
+		          myGamma = std::unique_ptr<xAOD::Vertex>( massFit(22, pairV0, vertex, concreteVertexFitter) );
                           if (myGamma && m_V0Tools->vertexProbability(myGamma.get()) >= m_minConstrVertProb) {
                             gamma_fit = 1;
                             gamma_prob = m_V0Tools->vertexProbability(myGamma.get());
diff --git a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/doc/packagedoc.h
index ca7ad963597b67cf2b157373f0c79aef560f0d15..fc896bb881af3051de31871f6c35cc724ac3df33 100644
--- a/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/InDetZVTOP_Alg/doc/packagedoc.h
@@ -14,7 +14,6 @@ contains: <br>
 
 ZVTOP_Algs is a package which contains algorithm to reconstruct vertices. The only job is to call a vertex finder tool - InDetZVTOPVxFinder (see InnerDetector/InDetRecTools/InDetZVTOPVxFinder). The topological vertex finder has been developed by David J. Jackson, Nucl.Instrum.Meth.A388: 247-253, 1997 and now implemented to ATHENA and adjusted  to ATLAS requirements. It reconstructs a set of vertices & associated subset of the charged tracks. The association accords to a vertex probability function which is based on the trajectories and position resolution of the tracks.
 
-@section InDetZVTOP_Alg_ZVTOP_AlgsReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/doc/packagedoc.h
index 7ae4be693a0642e700f9dfa2cb56ae006194a039..3ff29d720c553a137b6f3df4bef0d7c9c617a1fd 100644
--- a/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/SiSPSeededTrackFinder/doc/packagedoc.h
@@ -17,7 +17,5 @@ This algorithm uses three standard tools.
 2. ISiZvertexMake          - primary verices search tool.
 3. ISiTrackMaker           - local track-finding in Pixels and SCT tool.
 
-@section SiSPSeededTrackFinder_SiSPSeededTrackFinderReq Requirements file
 
 */
-
diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
index d71da8e36c5ec2a36a3c2bbc868aaca68a30329e..606d22870f10751d4a8e4f9dff1a0c59c954931d 100755
--- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
+++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h
@@ -106,17 +106,17 @@ namespace InDet {
 
     void addSCT_SpacePoints
       (const SCT_ClusterCollection* next, 
-       SpacePointCollection* spacepointCollection); 
+       SpacePointCollection* spacepointCollection, SpacePointOverlapCollection* spacepointOverlapCollection); 
 
     void checkForSCT_Points
       (const SCT_ClusterCollection* clusters1,
        const IdentifierHash& id2, double minDiff, double maxDiff,
-       SpacePointCollection* spacepointCollection, bool overlapColl); 
+       SpacePointCollection* spacepointCollection, bool overlapColl, SpacePointOverlapCollection* spacepointOverlapCollection); 
 
     void checkForSCT_Points
       (const SCT_ClusterCollection* clusters1, 
      const IdentifierHash& id2, double min1, double max1,
-     double min2, double max2);
+     double min2, double max2, SpacePointOverlapCollection* spacepointOverlapCollection);
     
 
     // data members
@@ -125,8 +125,8 @@ namespace InDet {
 //    std::string m_spacePointsSCTName;
 //    std::string m_spacePointsPixelName;
 //    std::string m_spacePointsOverlapName;
-    SG::ReadHandle<SCT_ClusterContainer>  m_Sct_clcontainer;
-    SG::ReadHandle<PixelClusterContainer> m_Pixel_clcontainer;
+    SG::ReadHandleKey<SCT_ClusterContainer>  m_Sct_clcontainerKey;
+    SG::ReadHandleKey<PixelClusterContainer> m_Pixel_clcontainerKey;
     bool m_selectPixels;
     bool m_selectSCTs;
     bool m_overlap;         // process all overlapping SCT pairs if true.
@@ -158,9 +158,9 @@ namespace InDet {
     const PixelID* m_idHelperPixel;
     SiElementPropertiesTable* m_properties;
     
-    SG::WriteHandle<SpacePointContainer> m_SpacePointContainer_SCT; 
-    SG::WriteHandle<SpacePointContainer> m_SpacePointContainerPixel; 
-    SG::WriteHandle<SpacePointOverlapCollection> m_spacepointoverlapCollection; 
+    SG::WriteHandleKey<SpacePointContainer> m_SpacePointContainer_SCTKey;
+    SG::WriteHandleKey<SpacePointContainer> m_SpacePointContainerPixelKey;
+    SG::WriteHandleKey<SpacePointOverlapCollection> m_spacepointoverlapCollectionKey;
 
     ToolHandle< SiSpacePointMakerTool > m_SiSpacePointMakerTool;
   };
diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/doc/packagedoc.h
index 2bb0f9b842c2fd884e056290869485ce6419dcb5..72cd5cffcf558aafba5d2f3496285e15f1d24db6 100644
--- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/doc/packagedoc.h
@@ -30,6 +30,5 @@ This algorithm is used in the offline reconstruction.
    SiElementProperties in order to access, for the SCT, the backside wafer
    of a given module and the neighbour ones from other modules.
 
-@section SiSpacePointFormation_SiSpacePointFormationReq Requirements
 
 */
diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx
index d6c502ea8c3b033793f7b962601de41333cfec3e..62d361f8c0725ff2038bea267a2e248f820fd7b4 100755
--- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx
+++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx
@@ -7,24 +7,24 @@
 ATLAS Collaboration
 ***************************************************************************/
 
-//<<<<<< INCLUDES                                                       >>>>>>
+//<<<<<< INCLUDES >>>>>>
 
 
 #include "SiSpacePointFormation/SiTrackerSpacePointFinder.h"
 #include "SiSpacePointFormation/SiElementPropertiesTable.h"
 
 // For processing clusters
-#include "InDetReadoutGeometry/SiLocalPosition.h" 
-#include "InDetReadoutGeometry/SiDetectorDesign.h" 
-#include "InDetReadoutGeometry/SiDetectorElement.h" 
-#include "InDetReadoutGeometry/SiDetectorElementCollection.h" 
+#include "InDetReadoutGeometry/SiLocalPosition.h"
+#include "InDetReadoutGeometry/SiDetectorDesign.h"
+#include "InDetReadoutGeometry/SiDetectorElement.h"
+#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
 
 // Space point Classes,
-#include "TrkSpacePoint/SpacePoint.h" 
-#include "TrkSpacePoint/SpacePointCollection.h" 
-#include "TrkSpacePoint/SpacePointContainer.h" 
-#include "TrkSpacePoint/SpacePointOverlapCollection.h" 
-#include "TrkSpacePoint/SpacePointCLASS_DEF.h" 
+#include "TrkSpacePoint/SpacePoint.h"
+#include "TrkSpacePoint/SpacePointCollection.h"
+#include "TrkSpacePoint/SpacePointContainer.h"
+#include "TrkSpacePoint/SpacePointOverlapCollection.h"
+#include "TrkSpacePoint/SpacePointCLASS_DEF.h"
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
 
@@ -37,69 +37,69 @@ ATLAS Collaboration
 
 #include "CxxUtils/make_unique.h"
 
-namespace InDet{
+namespace InDet {
 
 //------------------------------------------------------------------------
-SiTrackerSpacePointFinder::SiTrackerSpacePointFinder(const std::string&	name, 
-						     ISvcLocator*	pSvcLocator)
-    :	AthAlgorithm		(name, pSvcLocator),
-//	m_SCT_ClustersName	("SCT_Clusters"),
-//	m_PixelsClustersName	("PixelClusters"),
-//	m_spacePointsSCTName	("SCT_SpacePoints"),
-//	m_spacePointsPixelName	("PixelSpacePoints"),
-//	m_spacePointsOverlapName("OverlapSpacePoints"),
-	m_Sct_clcontainer("SCT_Clusters"),
-	m_Pixel_clcontainer("PixelClusters"),
-	m_selectPixels		(true),
-	m_selectSCTs(		true),
-	m_overlap		(true),		// process overlaps of SCT wafers.
-	m_allClusters		(false),	// process all clusters without limits.
-	m_overlapLimitOpposite	(2.8),		// overlap limit for opposite-neighbour.
-	m_overlapLimitPhi	(5.64),		// overlap limit for phi-neighbours.
-	m_overlapLimitEtaMin	(1.68),		// low overlap limit for eta-neighbours.
-	m_overlapLimitEtaMax	(3.0),		// high overlap limit for eta-neighbours.
-	m_epsWidth		(0.02),		// safety margin for half-widths, in cm.
-	m_overrideBS		(false),
-	m_xVertex		(0.),
-	m_yVertex		(0.),
-	m_zVertex		(0.),
-	m_iBeamCondSvc		("BeamCondSvc",name),
-	m_event			(nullptr),
-	m_numberOfEvents	(0),
-	m_manager(0),
-	m_idHelper		(nullptr),
-	m_idHelperPixel		(nullptr),
-	m_properties		(nullptr),
-	m_SpacePointContainer_SCT	("SCT_SpacePoints"),
-	m_SpacePointContainerPixel	("PixelSpacePoints"),
-	m_spacepointoverlapCollection	("OverlapSpacePoints"),
-	m_SiSpacePointMakerTool		("InDet::SiSpacePointMakerTool", this)
-    {
+  SiTrackerSpacePointFinder::SiTrackerSpacePointFinder(const std::string& name,
+      ISvcLocator* pSvcLocator)
+    : AthAlgorithm(name, pSvcLocator),
+    //m_SCT_ClustersName("SCT_Clusters"),
+    //m_PixelsClustersName("PixelClusters"),
+    //m_spacePointsSCTName("SCT_SpacePoints"),
+    //m_spacePointsPixelName("PixelSpacePoints"),
+    //m_spacePointsOverlapName("OverlapSpacePoints"),
+    m_Sct_clcontainerKey("SCT_Clusters"),
+    m_Pixel_clcontainerKey("PixelClusters"),
+    m_selectPixels(true),
+    m_selectSCTs(true),
+    m_overlap(true),  // process overlaps of SCT wafers.
+    m_allClusters(false),  // process all clusters without limits.
+    m_overlapLimitOpposite(2.8),  // overlap limit for opposite-neighbour.
+    m_overlapLimitPhi(5.64),  // overlap limit for phi-neighbours.
+    m_overlapLimitEtaMin(1.68),  // low overlap limit for eta-neighbours.
+    m_overlapLimitEtaMax(3.0),  // high overlap limit for eta-neighbours.
+    m_epsWidth(0.02),  // safety margin for half-widths, in cm.
+    m_overrideBS(false),
+    m_xVertex(0.),
+    m_yVertex(0.),
+    m_zVertex(0.),
+    m_iBeamCondSvc("BeamCondSvc",name),
+    m_event(nullptr),
+    m_numberOfEvents(0),
+    m_manager(0),
+    m_idHelper(nullptr),
+    m_idHelperPixel(nullptr),
+    m_properties(nullptr),
+    m_SpacePointContainer_SCTKey("SCT_SpacePoints"),
+    m_SpacePointContainerPixelKey("PixelSpacePoints"),
+    m_spacepointoverlapCollectionKey("OverlapSpacePoints"),
+    m_SiSpacePointMakerTool("InDet::SiSpacePointMakerTool", this)
+{
   //Use the same space point name both for internal use (for graphics) end
   // for storing in TDS. If a name is the empty string, do not retrieve
   // those clusters.
-  declareProperty("SCT_ClustersName",	m_Sct_clcontainer, "SCT clContainer" ) ;
-  declareProperty("PixelsClustersName",	m_Pixel_clcontainer, "Pixel clContainer");
-            
-  declareProperty("SpacePointsSCTName",	m_SpacePointContainer_SCT, "SpacePoint SCT container");
-  declareProperty("SpacePointsPixelName", m_SpacePointContainerPixel, "SpacePoint Pixel container");
-  declareProperty("SpacePointsOverlapName", m_spacepointoverlapCollection, "Space Point Overlap collection" );
+  declareProperty("SCT_ClustersName", m_Sct_clcontainerKey, "SCT clContainer" );
+  declareProperty("PixelsClustersName", m_Pixel_clcontainerKey, "Pixel clContainer");
+
+  declareProperty("SpacePointsSCTName", m_SpacePointContainer_SCTKey, "SpacePoint SCT container");
+  declareProperty("SpacePointsPixelName", m_SpacePointContainerPixelKey, "SpacePoint Pixel container");
+  declareProperty("SpacePointsOverlapName", m_spacepointoverlapCollectionKey, "Space Point Overlap collection" );
   
   
-  declareProperty("SiSpacePointMakerTool",	m_SiSpacePointMakerTool);
-  declareProperty("BeamPositionSvc",		m_iBeamCondSvc);
-  declareProperty("ProcessPixels",		m_selectPixels);
-  declareProperty("ProcessSCTs",		m_selectSCTs);
-  declareProperty("ProcessOverlaps",		m_overlap);
-  declareProperty("AllClusters",		m_allClusters);
-  declareProperty("OverlapLimitOpposite",	m_overlapLimitOpposite);
-  declareProperty("OverlapLimitPhi",		m_overlapLimitPhi);
-  declareProperty("OverlapLimitEtaMin",		m_overlapLimitEtaMin);
-  declareProperty("OverlapLimitEtaMax",		m_overlapLimitEtaMax);
-  declareProperty("OverrideBeamSpot",		m_overrideBS);
-  declareProperty("VertexX",			m_xVertex);
-  declareProperty("VertexY",			m_yVertex);
-  declareProperty("VertexZ",			m_zVertex);
+  declareProperty("SiSpacePointMakerTool", m_SiSpacePointMakerTool);
+  declareProperty("BeamPositionSvc", m_iBeamCondSvc);
+  declareProperty("ProcessPixels", m_selectPixels);
+  declareProperty("ProcessSCTs", m_selectSCTs);
+  declareProperty("ProcessOverlaps", m_overlap);
+  declareProperty("AllClusters", m_allClusters);
+  declareProperty("OverlapLimitOpposite", m_overlapLimitOpposite);
+  declareProperty("OverlapLimitPhi", m_overlapLimitPhi);
+  declareProperty("OverlapLimitEtaMin", m_overlapLimitEtaMin);
+  declareProperty("OverlapLimitEtaMax", m_overlapLimitEtaMax);
+  declareProperty("OverrideBeamSpot", m_overrideBS);
+  declareProperty("VertexX", m_xVertex);
+  declareProperty("VertexY", m_yVertex);
+  declareProperty("VertexZ", m_zVertex);
 }
 //--------------------------------------------------------------------------
 SiTrackerSpacePointFinder::~SiTrackerSpacePointFinder()
@@ -109,335 +109,293 @@ SiTrackerSpacePointFinder::~SiTrackerSpacePointFinder()
 //-----------------------------------------------------------------------
 StatusCode SiTrackerSpacePointFinder::initialize()
 {
-    ATH_MSG_DEBUG( "SiTrackerSpacePointFinder::initialize()" );
-  
-    // Check that clusters, space points and ids have names
-  
-    if  (m_selectSCTs && m_Sct_clcontainer.name().empty()){
-	ATH_MSG_FATAL( "SCTs selected and no name set for SCT clusters");
-	return StatusCode::FAILURE;
-    }
-  
-    if (m_SpacePointContainer_SCT.name().empty()){
-	ATH_MSG_FATAL( "No name set for SCT space points");
-	return StatusCode::FAILURE;
-    }
-    if (m_SpacePointContainerPixel.name().empty()){
-	ATH_MSG_FATAL( "No name set for Pixels space points");
-	return StatusCode::FAILURE;
-    }
-    if (m_spacepointoverlapCollection.name().empty()){
-	ATH_MSG_FATAL( "No name set for overlap space points");
-	return StatusCode::FAILURE;
-    }
-  
-    // create containers (requires the Identifier Helpers)
-    if (m_selectPixels){
-	  ATH_CHECK(detStore()->retrieve(m_idHelperPixel,"PixelID"));
-//	  m_SpacePointContainerPixel = new SpacePointContainer(m_idHelperPixel->wafer_hash_max()); 
+  ATH_MSG_DEBUG( "SiTrackerSpacePointFinder::initialize()" );
 
+  // Check that clusters, space points and ids have names
+  if (m_selectSCTs && m_Sct_clcontainerKey.key().empty()){
+    ATH_MSG_FATAL( "SCTs selected and no name set for SCT clusters");
+    return StatusCode::FAILURE;
+  }
+  ATH_CHECK( m_Sct_clcontainerKey.initialize() );
+
+  if (m_selectPixels && m_Pixel_clcontainerKey.key().empty()){
+    ATH_MSG_FATAL( "Pixels selected and no name set for Pixel clusters");
+    return StatusCode::FAILURE;
+  }
+  ATH_CHECK( m_Pixel_clcontainerKey.initialize() );
+
+  if (m_SpacePointContainer_SCTKey.key().empty()){
+    ATH_MSG_FATAL( "No name set for SCT space points");
+    return StatusCode::FAILURE;
+  }
+  ATH_CHECK( m_SpacePointContainer_SCTKey.initialize() );
+
+  if (m_SpacePointContainerPixelKey.key().empty()){
+    ATH_MSG_FATAL( "No name set for Pixels space points");
+    return StatusCode::FAILURE;
+  }
+  ATH_CHECK( m_SpacePointContainerPixelKey.initialize() );
+
+  if (m_spacepointoverlapCollectionKey.key().empty()){
+    ATH_MSG_FATAL( "No name set for overlap space points");
+    return StatusCode::FAILURE;
+  }
+  ATH_CHECK( m_spacepointoverlapCollectionKey.initialize() );
+
+  // create containers (requires the Identifier Helpers)
+  if (m_selectPixels){
+    ATH_CHECK(detStore()->retrieve(m_idHelperPixel,"PixelID"));
+    //m_SpacePointContainerPixel = new SpacePointContainer(m_idHelperPixel->wafer_hash_max());
+
+  }
+
+  if (m_selectSCTs) {
+    ATH_CHECK(detStore()->retrieve(m_idHelper,"SCT_ID"));
+
+    // also need the SCT Manager to get the detectorElementCollection
+    ATH_CHECK(detStore()->retrieve(m_manager,"SCT"));
+
+    // Make a table of neighbours and widths of side 1 SCT wafers
+    //ADAM - removed const cast to test without
+    const InDetDD::SiDetectorElementCollection* elements =(m_manager->getDetectorElementCollection());
+    m_properties = new SiElementPropertiesTable(*m_idHelper, *elements, m_epsWidth);
+  }
+
+  ATH_CHECK(m_SiSpacePointMakerTool.retrieve());
+  if (!m_overrideBS){
+    if (m_iBeamCondSvc.retrieve().isFailure()) {
+      m_overrideBS = true;
+      ATH_MSG_WARNING( "Could not retrieve Beam Conditions Service. " );
+      ATH_MSG_WARNING( "Using instead pre-set beam spot at ( " << m_xVertex
+          <<" , "<< m_yVertex << " , " << m_yVertex<< " ) " );
     }
- 
-    if (m_selectSCTs){
-	  ATH_CHECK(detStore()->retrieve(m_idHelper,"SCT_ID"));
-
-	
-	  // also need the SCT Manager to get the detectorElementCollection
-	  ATH_CHECK(detStore()->retrieve(m_manager,"SCT"));
-	
-	  // Make a table of neighbours and widths of side 1 SCT wafers
-	  //ADAM - removed const cast to test without
-	  const InDetDD::SiDetectorElementCollection* elements =(m_manager->getDetectorElementCollection());
-	  m_properties = new SiElementPropertiesTable(*m_idHelper, *elements, m_epsWidth);
-    } 
-
-    ATH_CHECK(m_SiSpacePointMakerTool.retrieve());
-    if (!m_overrideBS){
-	  if (m_iBeamCondSvc.retrieve().isFailure()) {
-	    m_overrideBS = true;
-	    ATH_MSG_WARNING( "Could not retrieve Beam Conditions Service. " );
-	    ATH_MSG_WARNING( "Using instead pre-set beam spot at ( " << m_xVertex
-			     <<" , "<< m_yVertex << " , " << m_yVertex<< " ) " );
-	  }
-    }
-    ATH_MSG_INFO( "SiTrackerSpacePointFinder::initialized for package version " << PACKAGE_VERSION );
-    return StatusCode::SUCCESS;
+  }
+  ATH_MSG_INFO( "SiTrackerSpacePointFinder::initialized for package version " << PACKAGE_VERSION );
+  return StatusCode::SUCCESS;
 }
 
 //-------------------------------------------------------------------------
 
 StatusCode SiTrackerSpacePointFinder::execute()
 {
-/*
-    if (msgLvl(MSG::DEBUG)){
-	  ATH_MSG_DEBUG( "SiTrackerSpacePointFinder::execute()" );
-	  // Put out info about event.
-	  const DataHandle<xAOD::EventInfo> eventInfo;
-	  StatusCode sc = evtStore()->retrieve(eventInfo);
-	  if (sc.isFailure()){
-	    ATH_MSG_ERROR( "Could not get event" );
-	    return StatusCode::RECOVERABLE;
-	  }
-	  ATH_MSG_DEBUG( "Event number event_" + std::to_string(eventInfo->eventNumber()) );
-    }
-*/
-    ++m_numberOfEvents;
-    
-    if (! m_overrideBS){
-        m_vertex = m_iBeamCondSvc->beamVtx().position();
-    } else {
-        m_vertex = Amg::Vector3D(m_xVertex,m_yVertex,m_zVertex);
-    }
+#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT
+  const EventContext& ctx = getContext();
+#else
+  const EventContext& ctx = *getContext();
+#endif
+
+  ++m_numberOfEvents;
+
+  if (! m_overrideBS){
+    m_vertex = m_iBeamCondSvc->beamVtx().position();
+  } else {
+    m_vertex = Amg::Vector3D(m_xVertex,m_yVertex,m_zVertex);
+  }
 
-    // register the IdentifiableContainer into StoreGate
-    if (m_selectPixels){
-//	  m_SpacePointContainerPixel->cleanup();
-//	  StatusCode sc = evtStore()->record(m_SpacePointContainerPixel,m_spacePointsPixelName,false);
-//	  if (sc.isFailure()){
-//	    ATH_MSG_ERROR( "Container '" << m_spacePointsPixelName
-//			   << "' could not be recorded in StoreGate !" );
-//	    return StatusCode::RECOVERABLE;
-//        }
-          m_SpacePointContainerPixel = CxxUtils::make_unique<SpacePointContainer>(m_idHelperPixel->wafer_hash_max());
-          if (! m_SpacePointContainerPixel.isValid() ){
-               msg(MSG:: FATAL) << "SpacePointContainer " << m_SpacePointContainerPixel.name() << "could not be initialised !"<< endmsg;
-               return StatusCode::FAILURE;
-          }
-	  // prevent SG from deleting object:
-//	  m_SpacePointContainerPixel->addRef();
-	  
-	  ATH_MSG_DEBUG( "Container '" << m_SpacePointContainerPixel.name() << "' initialised and recorded in StoreGate" );
-    }
-  
-    if (m_selectSCTs){
-	  m_SpacePointContainer_SCT = CxxUtils::make_unique<SpacePointContainer>(m_idHelper->wafer_hash_max());
-          if (! m_SpacePointContainer_SCT.isValid() ){
-               msg(MSG:: FATAL) << "SpacePointContainer " << m_SpacePointContainer_SCT.name() << "could not be initialised !"<< endmsg;
-               return StatusCode::FAILURE;
-          }
-          	  	  
-//n	  m_SpacePointContainer_SCT->addRef();	  	  
-	  ATH_MSG_DEBUG( "Container '" << m_SpacePointContainer_SCT.name() << "' initialised and recorded in StoreGate" );
-    }
+  // register the IdentifiableContainer into StoreGate
+  SG::WriteHandle<SpacePointContainer> spacePointContainerPixel;
+  if (m_selectPixels){
+
+    spacePointContainerPixel = SG::WriteHandle<SpacePointContainer>( m_SpacePointContainerPixelKey, ctx );
+    ATH_CHECK( spacePointContainerPixel.record( CxxUtils::make_unique<SpacePointContainer>(m_idHelperPixel->wafer_hash_max()) ) );
+
+    ATH_MSG_DEBUG( "Container '" << spacePointContainerPixel.name() << "' initialised and recorded in StoreGate" );
+  }
+
+  SG::WriteHandle<SpacePointContainer> spacePointContainer_SCT;
+  if (m_selectSCTs){
+    spacePointContainer_SCT = SG::WriteHandle<SpacePointContainer>( m_SpacePointContainer_SCTKey, ctx );
+    ATH_CHECK( spacePointContainer_SCT.record( CxxUtils::make_unique<SpacePointContainer>(m_idHelper->wafer_hash_max()) ) );
+
+    //m_SpacePointContainer_SCT->addRef();
+    ATH_MSG_DEBUG( "Container '" << spacePointContainer_SCT.name() << "' initialised and recorded in StoreGate" );
+  }
+
+  SG::WriteHandle<SpacePointOverlapCollection> spacepointoverlapCollection( m_spacepointoverlapCollectionKey, ctx );
+  ATH_CHECK( spacepointoverlapCollection.record( CxxUtils::make_unique<SpacePointOverlapCollection>() ) );
 
-    // Get hold of IdentifiableContainer holding SCT clusters from TDS
-    // ( because we need random access to get the second side).
-    // Note there may not be any, but there could still be pixel clusters.
-//    m_spacepointoverlapCollection = new SpacePointOverlapCollection();
+  //m_spacepointoverlapCollection->addRef();
+  ATH_MSG_DEBUG( "Container '" << spacepointoverlapCollection.name() << "' initialised" );
 
-    m_spacepointoverlapCollection = CxxUtils::make_unique<SpacePointOverlapCollection>();
-    if (! m_spacepointoverlapCollection.isValid() ){
-       msg(MSG:: FATAL) << "SpacePointOverlapCollection " << m_spacepointoverlapCollection.name() << "could not be initialised !"<< endmsg;
-       return StatusCode::FAILURE;
+  if (m_selectSCTs){
+
+    // retrieve SCT cluster container
+    SG::ReadHandle<SCT_ClusterContainer> sct_clcontainer( m_Sct_clcontainerKey, ctx );
+    if (!sct_clcontainer.isValid()){
+      msg(MSG:: FATAL) << "Could not find the data object "<< sct_clcontainer.name() << " !" << endmsg;
+      return StatusCode::RECOVERABLE;
     }
-          
-//    m_spacepointoverlapCollection->addRef();
-    ATH_MSG_DEBUG( "Container '" << m_spacepointoverlapCollection.name() << "' initialised" );
-    
-    if (m_selectSCTs){
-	  // retrieve SCT cluster container
-        if (!m_Sct_clcontainer.isValid()){
-          msg(MSG:: FATAL) << "Could not find the data object "<< m_Sct_clcontainer.name() << " !" << endmsg;
+    ATH_MSG_DEBUG( "SCT Cluster container found: " << sct_clcontainer->size() << " collections" );
+    // Get hold of all clusters and iterate through them.
+    // Pixel clusters will be converted immediately to pixel space points.
+    // For SCT clusters, posssible pairs will be found and space points computed.
+    // It is possible, though unlikely, that there are no clusters for the
+    // event. Therefore we do not terminate the job if we don't find any.
+    SCT_ClusterContainer::const_iterator it = sct_clcontainer->begin();
+    SCT_ClusterContainer::const_iterator itend = sct_clcontainer->end();
+
+    for (; it != itend; ++it){
+      const SCT_ClusterCollection *colNext=&(**it);
+      // Create SpacePointCollection
+      IdentifierHash idHash = colNext->identifyHash();
+      Identifier elementID = colNext->identify();
+      SpacePointCollection* spacepointCollection = new SpacePointCollection(idHash);
+      spacepointCollection->setIdentifier(elementID);
+
+      if ( colNext->size() != 0){
+        addSCT_SpacePoints(colNext,spacepointCollection,spacepointoverlapCollection.ptr());
+      } else {
+        ATH_MSG_DEBUG( "Empty SCT cluster collection" );
+      }
+
+      if (spacepointCollection->size() == 0){
+        ATH_MSG_VERBOSE( "SiTrackerSpacePointFinder algorithm found no space points" );
+        // -me- clean up memory
+        delete (spacepointCollection);
+      } else {
+        StatusCode sc= spacePointContainer_SCT->addCollection( spacepointCollection,
+            spacepointCollection->identifyHash() );
+        if (sc.isFailure()){
+          ATH_MSG_ERROR( "Failed to add SpacePoints to container" );
           return StatusCode::RECOVERABLE;
         }
-        ATH_MSG_DEBUG( "SCT Cluster container found:  " << m_Sct_clcontainer->size() << " collections" );
-	// Get hold of all clusters and iterate through them.
-	// Pixel clusters will be converted immediately to pixel space points. 
-	// For SCT clusters, posssible pairs will be found and space points computed.
-	// It is possible, though unlikely, that there are no clusters for the
-	// event. Therefore we do not terminate the job if we don't find any.  
-	SCT_ClusterContainer::const_iterator it     = m_Sct_clcontainer->begin();
-	SCT_ClusterContainer::const_iterator itend  = m_Sct_clcontainer->end();
-    
-	for (; it != itend; ++it){
-	    const SCT_ClusterCollection *colNext=&(**it);
-	    // Create SpacePointCollection
-	    IdentifierHash idHash = colNext->identifyHash(); 
-	    Identifier elementID = colNext->identify();
-	    SpacePointCollection* spacepointCollection = new SpacePointCollection(idHash); 
-	    spacepointCollection->setIdentifier(elementID); 
-
-	    if ( colNext->size() != 0){
-		 addSCT_SpacePoints(colNext,spacepointCollection);
-	    } else {
-		  ATH_MSG_DEBUG( "Empty SCT cluster collection" );
-	    }
-      
-	    if (spacepointCollection->size() == 0){
-		  ATH_MSG_VERBOSE( "SiTrackerSpacePointFinder algorithm found no space points" );
-		  // -me- clean up memory
-		  delete (spacepointCollection);
-	    } else {
-		  StatusCode sc= m_SpacePointContainer_SCT->addCollection( spacepointCollection,
-							      spacepointCollection->identifyHash() );
-		  if (sc.isFailure()){
-		    ATH_MSG_ERROR( "Failed to add SpacePoints to container" );
-		    return StatusCode::RECOVERABLE;
-		  }
-		  ATH_MSG_VERBOSE( spacepointCollection->size()<< " SpacePoints successfully added to Container !" );
-	    }
-	  }
+        ATH_MSG_VERBOSE( spacepointCollection->size()<< " SpacePoints successfully added to Container !" );
+      }
     }
-  
-    if (m_selectPixels)
+  }
+
+  if (m_selectPixels)
+  {
+
+    SG::ReadHandle<PixelClusterContainer> pixel_clcontainer( m_Pixel_clcontainerKey, ctx );
+    if (!pixel_clcontainer.isValid()){
+      msg(MSG:: FATAL) << "Could not find the data object "<< pixel_clcontainer.name() << " !" << endmsg;
+      return StatusCode::RECOVERABLE;
+    }
+
+    ATH_MSG_DEBUG( "Data object " << pixel_clcontainer.name() << " found" );
+
+    // loop over Pixel clusterCollections
+    PixelClusterContainer::const_iterator colNext = pixel_clcontainer->begin();
+    PixelClusterContainer::const_iterator lastCol = pixel_clcontainer->end();
+
+    int numColl=0;
+    for (; colNext != lastCol; ++colNext)
     {
-	// retrieve Pixel cluster container
-//	m_Pixel_clcontainer=0;
-	//StatusCode sc = evtStore()->retrieve(m_Pixel_clcontainer, m_PixelsClustersName);
-//	if (sc.isFailure()  || ! m_Pixel_clcontainer)
-//	{
-//	    ATH_MSG_ERROR( "Pixel Cluster container not found" );
-//	    return StatusCode::RECOVERABLE;
-//	}
-//	ATH_MSG_DEBUG( "Pixel Cluster container found:  " << m_Pixel_clcontainer->size() << " collections" );
-
-        if (!m_Pixel_clcontainer.isValid()){
-          msg(MSG:: FATAL) << "Could not find the data object "<< m_Pixel_clcontainer.name() << " !" << endmsg;
+      ATH_MSG_VERBOSE( "Collection num " << numColl++ );
+
+      // Create SpacePointCollection
+      Identifier elementID = (*colNext)->identify();
+      IdentifierHash idHash = (*colNext)->identifyHash();
+      SpacePointCollection* spacepointCollection = new SpacePointCollection(idHash);
+      spacepointCollection->setIdentifier(elementID);
+
+      if ((*colNext)->size() != 0)
+      {
+        m_SiSpacePointMakerTool->fillPixelSpacePointCollection(*colNext,spacepointCollection);
+      }
+      else
+      {
+        ATH_MSG_DEBUG( "Empty pixel cluster collection" );
+      }
+
+      if (spacepointCollection->size() == 0)
+      {
+        ATH_MSG_DEBUG( "SiTrackerSpacePointFinder algorithm found no space points" );
+        // -me- clean up memory
+        delete (spacepointCollection);
+      }
+      else
+      {
+        StatusCode sc= spacePointContainerPixel->addCollection( spacepointCollection,
+            spacepointCollection->identifyHash() );
+        if (sc.isFailure())
+        {
+          ATH_MSG_ERROR( "Failed to add SpacePoints to container" );
           return StatusCode::RECOVERABLE;
         }
-        
-        ATH_MSG_DEBUG( "Data object " << m_Pixel_clcontainer.name() << " found" );    
-    
-	// loop over Pixel clusterCollections
-	PixelClusterContainer::const_iterator colNext  = m_Pixel_clcontainer->begin();
-	PixelClusterContainer::const_iterator lastCol  = m_Pixel_clcontainer->end();
-
-	int numColl=0;
-	for (; colNext != lastCol; ++colNext)
-	{
-	    ATH_MSG_VERBOSE( "Collection num " << numColl++ );
-      
-	    // Create SpacePointCollection
-	    Identifier elementID = (*colNext)->identify(); 
-	    IdentifierHash idHash = (*colNext)->identifyHash(); 
-	    SpacePointCollection* spacepointCollection = new SpacePointCollection(idHash); 
-	    spacepointCollection->setIdentifier(elementID);
-
-	    if ((*colNext)->size() != 0)
-	    {
-		m_SiSpacePointMakerTool->fillPixelSpacePointCollection(*colNext,spacepointCollection);
-	    }
-	    else
-	    {
-		ATH_MSG_DEBUG( "Empty pixel cluster collection" );
-	    }
-      
-	    if (spacepointCollection->size() == 0)
-	    {
-		ATH_MSG_DEBUG( "SiTrackerSpacePointFinder algorithm found no space points" );
-		// -me- clean up memory
-		delete (spacepointCollection);
-	    }
-	    else
-	    {    
-		StatusCode sc= m_SpacePointContainerPixel->addCollection( spacepointCollection,
-							       spacepointCollection->identifyHash() );
-		if (sc.isFailure())
-		{
-		    ATH_MSG_ERROR( "Failed to add SpacePoints to container" );
-		    return StatusCode::RECOVERABLE;
-		}
-		ATH_MSG_VERBOSE( spacepointCollection->size()
-				 << " SpacePoints successfully added to Container !" );
-	    }
-	}
-    }
-  
-    // store the overlap space points.
-    // check that the set isn't empty.
-    if (m_spacepointoverlapCollection->size()==0)
-    {
-	ATH_MSG_DEBUG( "No overlap space points found" );
-    }
-    else
-    {
-	ATH_MSG_DEBUG( m_spacepointoverlapCollection->size() <<" overlap space points registered." );
-    }
-/*
-    StatusCode sc = evtStore()->record(m_spacepointoverlapCollection, m_spacePointsOverlapName, false);
-    if (sc.isFailure())
-    {
-	ATH_MSG_ERROR( "Failed to register overlap space points" );
-	return StatusCode::RECOVERABLE;
+        ATH_MSG_VERBOSE( spacepointCollection->size()
+            << " SpacePoints successfully added to Container !" );
+      }
     }
-*/
-    return StatusCode::SUCCESS;
+  }
+
+  // store the overlap space points.
+  // check that the set isn't empty.
+  if (spacepointoverlapCollection->size()==0)
+  {
+    ATH_MSG_DEBUG( "No overlap space points found" );
+  }
+  else
+  {
+    ATH_MSG_DEBUG( spacepointoverlapCollection->size() <<" overlap space points registered." );
+  }
+
+  return StatusCode::SUCCESS;
 }
 
 //---------------------------------------------------------------------------
 StatusCode SiTrackerSpacePointFinder::finalize()
 {
-    ATH_MSG_INFO( "SiTrackerSpacePointFinder::finalize()" );
-    ATH_MSG_INFO( m_numberOfEvents << " events processed" );
-/*
-    if (m_selectPixels)
-    {
-	m_SpacePointContainerPixel->cleanup();
-	m_SpacePointContainerPixel->release();
-    }
-  
-    if (m_selectSCTs)
-    {
-	m_SpacePointContainer_SCT->cleanup();
-	m_SpacePointContainer_SCT->release();
-    }
-*/
-    delete m_properties;
-  
-    return StatusCode::SUCCESS;
+  ATH_MSG_INFO( "SiTrackerSpacePointFinder::finalize()" );
+  ATH_MSG_INFO( m_numberOfEvents << " events processed" );
+
+  delete m_properties;
+
+  return StatusCode::SUCCESS;
 }
 
 //--------------------------------------------------------------------------
 
 void SiTrackerSpacePointFinder::
 addSCT_SpacePoints(const SCT_ClusterCollection* next,
-		   SpacePointCollection* spacepointCollection) 
+    SpacePointCollection* spacepointCollection, SpacePointOverlapCollection* spacepointOverlapCollection)
 {
 
   // Do nothing unless this is a side 1 detector (strips of const phi).
   IdentifierHash thisHash(next->identifyHash());
-  
+
   // if it is not the stereo side
   const InDetDD::SiDetectorElement *element = m_manager->getDetectorElement(thisHash);
   if (element && !(element->isStereo())){
-    //if (m_idHelper->side(thisID)==1) {
-    // Space points are created from clusters for all possibly 
-    // overlapping pairs in the given range if m_overlap=true. 
-    // Otherwise just the opposite pair are processed. 
-    // Pick up the five neighbours of detector, and check ranges 
+    //if (m_idHelper->side(thisID)==1){
+    // Space points are created from clusters for all possibly
+    // overlapping pairs in the given range if m_overlap=true.
+    // Otherwise just the opposite pair are processed.
+    // Pick up the five neighbours of detector, and check ranges
     // for which overlap is possible. 
     // "check1" is used for opposite and eta overlaps.
     // check2 for phi overlaps
-    
-    std::vector<IdentifierHash>* 
+
+    std::vector<IdentifierHash>*
       others(m_properties->neighbours(thisHash));
     if (others==0 || others->empty() ) return;
     std::vector<IdentifierHash>::const_iterator otherHash = others->begin();
-    
+
     bool overlapColl = false;
     // check opposite wafer
-    checkForSCT_Points(next, *otherHash, 
-		       -m_overlapLimitOpposite, +m_overlapLimitOpposite,
-		       spacepointCollection,overlapColl);
-    
-    if (! m_overlap) return; 
-    
+    checkForSCT_Points(next, *otherHash,
+        -m_overlapLimitOpposite, +m_overlapLimitOpposite,
+        spacepointCollection,overlapColl,spacepointOverlapCollection);
+
+    if (! m_overlap) return;
+
     // check phi overlaps
     overlapColl = true;
     ++otherHash;
     if (otherHash == others->end() ) return;
-    float hwidth(m_properties->halfWidth(thisHash)); 
+    float hwidth(m_properties->halfWidth(thisHash));
     // half-width of wafer
-    
-    checkForSCT_Points(next, *otherHash, 
-		       -hwidth, -hwidth+m_overlapLimitPhi, 
-		       +hwidth-m_overlapLimitPhi, +hwidth);
+
+    checkForSCT_Points(next, *otherHash,
+        -hwidth, -hwidth+m_overlapLimitPhi,
+        +hwidth-m_overlapLimitPhi, +hwidth,spacepointOverlapCollection);
     ++otherHash;
-    if (otherHash == others->end() )  return;
-    checkForSCT_Points(next, *otherHash, 
-		       +hwidth-m_overlapLimitPhi, +hwidth,
-		       -hwidth, -hwidth+m_overlapLimitPhi);
-    
+    if (otherHash == others->end() ) return;
+    checkForSCT_Points(next, *otherHash,
+        +hwidth-m_overlapLimitPhi, +hwidth,
+        -hwidth, -hwidth+m_overlapLimitPhi,spacepointOverlapCollection);
+
     // if barrel, check the eta overlaps too.
     // In this case, action depends on whether layer is even or odd
     // Also, whether we look at "lower in eta", which comes first,
@@ -449,32 +407,32 @@ addSCT_SpacePoints(const SCT_ClusterCollection* next,
 
     //if (m_idHelper->barrel_ec(thisID)==0)
     if (m_idHelper->is_barrel(thisID))
+    {
+      //if (m_idHelper->layer_disk(thisID)==0 || m_idHelper->layer_disk(thisID)==2)
+      if (m_idHelper->layer_disk(thisID)%2 == 0)
       {
-        //if (m_idHelper->layer_disk(thisID)==0 || m_idHelper->layer_disk(thisID)==2)
-        if (m_idHelper->layer_disk(thisID)%2 == 0)
-	  {
-	    checkForSCT_Points(next, *otherHash, +m_overlapLimitEtaMin, 
-			       +m_overlapLimitEtaMax,
-			       spacepointCollection,overlapColl);
-	    ++otherHash;
-	    if (otherHash == others->end() )  return;
-	    
-	    checkForSCT_Points(next, *otherHash, -m_overlapLimitEtaMax, 
-			       -m_overlapLimitEtaMin,
-			       spacepointCollection,overlapColl);
-	  }else{
-	    checkForSCT_Points(next, *otherHash, -m_overlapLimitEtaMax, 
-			       -m_overlapLimitEtaMin,
-			       spacepointCollection,overlapColl);
-	    ++otherHash;
-	    if (otherHash == others->end() )  return;
-	    
-	    
-	    checkForSCT_Points(next, *otherHash, +m_overlapLimitEtaMin,
-			       +m_overlapLimitEtaMax,
-			       spacepointCollection,overlapColl);
-	  }
+        checkForSCT_Points(next, *otherHash, +m_overlapLimitEtaMin, 
+            +m_overlapLimitEtaMax,
+            spacepointCollection,overlapColl,spacepointOverlapCollection);
+        ++otherHash;
+        if (otherHash == others->end() )  return;
+
+        checkForSCT_Points(next, *otherHash, -m_overlapLimitEtaMax, 
+            -m_overlapLimitEtaMin,
+            spacepointCollection,overlapColl,spacepointOverlapCollection);
+      }else{
+        checkForSCT_Points(next, *otherHash, -m_overlapLimitEtaMax, 
+            -m_overlapLimitEtaMin,
+            spacepointCollection,overlapColl,spacepointOverlapCollection);
+        ++otherHash;
+        if (otherHash == others->end() )  return;
+
+
+        checkForSCT_Points(next, *otherHash, +m_overlapLimitEtaMin,
+            +m_overlapLimitEtaMax,
+            spacepointCollection,overlapColl,spacepointOverlapCollection);
       }
+    }
   }
 }
 
@@ -482,46 +440,56 @@ addSCT_SpacePoints(const SCT_ClusterCollection* next,
 
 void SiTrackerSpacePointFinder::
 checkForSCT_Points(const SCT_ClusterCollection* clusters1,
-		   const IdentifierHash& id2, double min, double max,
-		   SpacePointCollection* spacepointCollection, bool overlapColl)
+    const IdentifierHash& id2, double min, double max,
+    SpacePointCollection* spacepointCollection, bool overlapColl, SpacePointOverlapCollection* spacepointOverlapCollection)
 {
-  
+#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT 
+  const EventContext& ctx = getContext();
+#else
+  const EventContext& ctx = *getContext();
+#endif
+
   // Get the cluster collections for these two detectors.
   // Require that (xPhi2 - xPhi1) lie in the range specified.
   // Used for opposite and eta modules
-  
+
+  SG::ReadHandle<SCT_ClusterContainer> sct_clcontainer( m_Sct_clcontainerKey, ctx );
   SCT_ClusterContainer::const_iterator
-    it(m_Sct_clcontainer->indexFind(id2));
-  if (it==m_Sct_clcontainer->end()) return;
-  
+    it(sct_clcontainer->indexFind(id2));
+  if (it==sct_clcontainer->end()) return;
+
   const SCT_ClusterCollection * clusters2 = *it;
-  
+
   if (!overlapColl) {
     m_SiSpacePointMakerTool->fillSCT_SpacePointCollection(clusters1, clusters2, min, max, m_allClusters, m_vertex, m_manager, spacepointCollection);
   }
   else {
-    m_SiSpacePointMakerTool->fillSCT_SpacePointEtaOverlapCollection(clusters1, clusters2, min, max, m_allClusters, m_vertex, m_manager, m_spacepointoverlapCollection.ptr());
+    m_SiSpacePointMakerTool->fillSCT_SpacePointEtaOverlapCollection(clusters1, clusters2, min, max, m_allClusters, m_vertex, m_manager, spacepointOverlapCollection);
   }
 }
 //--------------------------------------------------------------------------
 void SiTrackerSpacePointFinder::
 checkForSCT_Points(const SCT_ClusterCollection* clusters1,
-		   const IdentifierHash& id2,
-		   double min1, double max1, double min2, double max2)
+    const IdentifierHash& id2,
+    double min1, double max1, double min2, double max2, SpacePointOverlapCollection* spacepointOverlapCollection)
 {
+#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT 
+  const EventContext& ctx = getContext();
+#else
+  const EventContext& ctx = *getContext();
+#endif
+
   // get the cluster collections for these two detectors. Clus1 must lie
   // within min1 and max1 and clus between min2 and max2. Used for phi
   // overlaps.
-  
+
+  SG::ReadHandle<SCT_ClusterContainer> sct_clcontainer( m_Sct_clcontainerKey, ctx );
   SCT_ClusterContainer::const_iterator
-    it(m_Sct_clcontainer->indexFind(id2));
-  if (it==m_Sct_clcontainer->end()) return;
+    it(sct_clcontainer->indexFind(id2));
+  if (it==sct_clcontainer->end()) return;
   const SCT_ClusterCollection * clusters2 (&(**it));
-  
-  m_SiSpacePointMakerTool->fillSCT_SpacePointPhiOverlapCollection(clusters1, clusters2, min1, max1, min2, max2, m_allClusters, m_vertex, m_manager, m_spacepointoverlapCollection.ptr());
-  
-}
-
 
+  m_SiSpacePointMakerTool->fillSCT_SpacePointPhiOverlapCollection(clusters1, clusters2, min1, max1, min2, max2, m_allClusters, m_vertex, m_manager, spacepointOverlapCollection);
 }
 
+} //namespace
diff --git a/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/doc/packagedoc.h
index cdac33c0b6799773ddaf39f65b675bd956d9b986..8d3c5f5771910fe1c26946404044d47a1ae64c12 100644
--- a/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/TRT_SeededTrackFinder/doc/packagedoc.h
@@ -45,9 +45,7 @@ The TRT_SeededTrackFinder contains the following classes/files:
 
 - TRT_SeededTrackFinder.cxx...Main class calling all the necessary tools and producing the ouput track collection.
 
-@section TRT_SeededTrackFinder_TRT_SeededTrackFinderPackages Used Packages
 
 
-@section TRT_SeededTrackFinder_TRT_SeededTrackFinderReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecAlgs/TRT_StandaloneTrackFinder/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/TRT_StandaloneTrackFinder/doc/packagedoc.h
index 2858ce07e906464a98249898eeefd29d17e77974..901e438c9f1f507243c6d089e1aa7abf8f6f8a7d 100644
--- a/InnerDetector/InDetRecAlgs/TRT_StandaloneTrackFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/TRT_StandaloneTrackFinder/doc/packagedoc.h
@@ -42,9 +42,7 @@ The TRT_StandaloneTrackFinder contains the following classes/files:
 
 - TRT_StandaloneTrackFinder.cxx...Main class calling all the necessary tools and producing the ouput track collection.
 
-@section TRT_StandaloneTrackFinder_TRT_StandaloneTrackFinderPackages Used Packages
 
 
-@section TRT_StandaloneTrackFinder_TRT_StandaloneTrackFinderReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecAlgs/TRT_TrackExtensionAlg/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/TRT_TrackExtensionAlg/doc/packagedoc.h
index 19900fa822c3155093cb84dc065671e783ac8ade..0de8d8d2131d694757c16913692d882199a62cf4 100644
--- a/InnerDetector/InDetRecAlgs/TRT_TrackExtensionAlg/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/TRT_TrackExtensionAlg/doc/packagedoc.h
@@ -14,6 +14,5 @@ Input is tracks found in SCT and Pixels and output is TrackExtensionMap.
 This algorithm uses standard ITRT_TrackExtensionTool and shoud know 
 input tracks location and extended track location.
 
-@section TRT_TrackExtensionAlg_TRT_TrackExtensionAlgReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecAlgs/TRT_TrackSegmentsFinder/doc/packagedoc.h b/InnerDetector/InDetRecAlgs/TRT_TrackSegmentsFinder/doc/packagedoc.h
index 2b5f7ddf4706cff519a1320d53cbf0324cc2fb6d..7962d46bf926ded7448bde086a56266d2d0d9124 100644
--- a/InnerDetector/InDetRecAlgs/TRT_TrackSegmentsFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetRecAlgs/TRT_TrackSegmentsFinder/doc/packagedoc.h
@@ -13,6 +13,5 @@ Output of this algorithm is Trk::SegmentCollection.
 
 This algorithm uses standard ITRT_TrackSegmentsMaker tool.
 
-@section TRT_TrackSegmentsFinder_TRT_TrackSegmentsFinderReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/doc/packagedoc.h b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/doc/packagedoc.h
index 4347bda373142cee1e12af9224dabec06c868329..9a084e191d7fa48204ad0afa383445fae51c2006 100644
--- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/doc/packagedoc.h
+++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/doc/packagedoc.h
@@ -28,14 +28,4 @@ according to the weights (assignment probabilities).
 
 @section InDetCompetingRIOsOnTrack_ExtrasInDetCompetingRIOsOnTrack Extra Pages
 
- - @ref UsedInDetCompetingRIOsOnTrack
- - @ref requirementsInDetCompetingRIOsOnTrack
-*/
-
-/**
-@page UsedInDetCompetingRIOsOnTrack Used Packages
-*/
-
-/**
-@page requirementsInDetCompetingRIOsOnTrack Requirements
 */
diff --git a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx
index d97c391b299a9251c87dfcdb2a0d15ffd21e9fdc..087c8f2d3210464ac1d072631cef69776cc8d463 100755
--- a/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx
+++ b/InnerDetector/InDetRecEvent/InDetCompetingRIOsOnTrack/src/CompetingSCT_ClustersOnTrack.cxx
@@ -209,8 +209,9 @@ void InDet::CompetingSCT_ClustersOnTrack::setLocalParametersAndErrorMatrix() {
             const double cosTheta = cos(meanTheta);
             const double sinTheta = sin(meanTheta);
 //             std::cout << "[mean]: l1= " << meanEigen1 << " l2="<< meanEigen2 << " theta="<< meanTheta << std::endl;
-            
             //CLHEP::HepSymMatrix meanWeightMatrix = CLHEP::HepSymMatrix(2, 0);
+            meanWeightMatrix = Amg::MatrixX(2,2);
+            meanWeightMatrix.setZero(); 
             meanWeightMatrix(0,0) = cosTheta*cosTheta*meanEigen1 + sinTheta*sinTheta*meanEigen2;
             meanWeightMatrix(1,1) = cosTheta*cosTheta*meanEigen2 + sinTheta*sinTheta*meanEigen1;
             meanWeightMatrix(0,1) = cosTheta*sinTheta*meanEigen1 - cosTheta*sinTheta*meanEigen2;
diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt b/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt
index 1f3bf06362122fdbf9c9249113ce438e7465bb55..15f4c0a5e7ae421ff9b1dd70b66187dfb2ecf998 100644
--- a/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt
+++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/CMakeLists.txt
@@ -35,5 +35,5 @@ atlas_add_dictionary( InDetPrepRawDataDict
                       InDetPrepRawData/InDetPrepRawDataDict.h
                       InDetPrepRawData/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthLinks SGTools GeoPrimitives Identifier EventPrimitives GaudiKernel InDetReadoutGeometry TrkSurfaces TrkEventPrimitives TrkPrepRawData InDetPrepRawData )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthLinks SGTools GeoPrimitives Identifier EventPrimitives GaudiKernel InDetReadoutGeometry TrkSurfaces TrkEventPrimitives TrkPrepRawData InDetPrepRawData EventContainers )
 
diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/InDetPrepRawDataDict.h b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/InDetPrepRawDataDict.h
index 6d4ca2934673e700fc3b2118761ea266dbde6613..38a91d8b8cb84e92c5ef893b85b456cb358652cc 100755
--- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/InDetPrepRawDataDict.h
+++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/InDetPrepRawDataDict.h
@@ -29,20 +29,14 @@ template<class T>
 struct PrdWrapper
 {
   typedef typename T::const_iterator prd_iterator;
-  typedef typename T::DataHolder     prd_data_holder;
-  typedef typename T::Entry          prd_entry;
 };
 
 #define EXPAND_PRD(T, suffix)						\
   T ## Container m_prd_ ## suffix ;					\
   PrdWrapper<T ## Container> m_prd_wrapper_ ## suffix ;			\
-  PrdWrapper<T ## Container> ::prd_data_holder m_prd_holder_ ## suffix ; \
-  PrdWrapper<T ## Container> ::prd_entry m_prd_entry_ ## suffix ;	\
   PrdWrapper<T ## Container> ::prd_iterator m_prd_citr_ ## suffix ;	\
-  ::DataLinkVector< Trk::PrepRawDataCollection< T > > m_dummy_dlv_ ## suffix ; \
-  T ## Container ::DataHolder m_dummy_holder_ ## suffix ; \
-  T ## Container ::Entry m_dummy_entry_ ## suffix ; \
-  T ## Container ::iterator m_dummy_iter_ ## suffix  
+  ::EventContainers::IdentifiableCache< Trk::PrepRawDataCollection< T > > m_dummy_dlv_ ## suffix ; \
+  T ## Container ::const_iterator m_dummy_iter_ ## suffix  
   
 namespace InDet {
     struct InDetPrepRawDataDict_Dummy
diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelClusterContainer.h b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelClusterContainer.h
index 4368bdf76eed7bf947c29e8378555dbb96d28002..8aa26f2cbaad66fe1d75b08fb5c0d9d603623f40 100755
--- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelClusterContainer.h
+++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/PixelClusterContainer.h
@@ -20,14 +20,18 @@
 #include "TrkPrepRawData/PrepRawDataContainer.h"
 #include "InDetPrepRawData/PixelClusterCollection.h"
 #include "AthLinks/DeclareIndexingPolicy.h"
+#include "EventContainers/IdentifiableCache.h"
 
 // Containers
 // numbers obtained using clid.db
 namespace InDet {
-typedef Trk::PrepRawDataContainer< PixelClusterCollection > PixelClusterContainer; 
+typedef Trk::PrepRawDataContainer< PixelClusterCollection > PixelClusterContainer;
+typedef EventContainers::IdentifiableCache< PixelClusterCollection > PixelClusterContainerCache;  
 }
 
 CLASS_DEF(InDet::PixelClusterContainer,2560,1)
 CONTAINER_IS_IDENTCONT(InDet::PixelClusterContainer)
 
+CLASS_DEF( InDet::PixelClusterContainerCache , 1224316430 , 1 )
+
 #endif // TRKPREPRAWDATA_PREPRAWDATACLASS_DEF_H
diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_ClusterContainer.h b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_ClusterContainer.h
index 278c8fd50afd76b3c43da7466c020b08c06b862e..66a05c303d0819a326a4e958fc81fc2f6d44fbc7 100755
--- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_ClusterContainer.h
+++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_ClusterContainer.h
@@ -24,10 +24,13 @@
 // Containers
 // numbers obtained using clid.db
 namespace InDet {
-  typedef Trk::PrepRawDataContainer< SCT_ClusterCollection > SCT_ClusterContainer; 
+  typedef Trk::PrepRawDataContainer< SCT_ClusterCollection > SCT_ClusterContainer;
+  typedef EventContainers::IdentifiableCache< SCT_ClusterCollection > SCT_ClusterContainerCache;
 }
 
 CLASS_DEF(InDet::SCT_ClusterContainer,2561,1)
 CONTAINER_IS_IDENTCONT(InDet::SCT_ClusterContainer)
 
+CLASS_DEF( InDet::SCT_ClusterContainerCache , 1302859648 , 1 )
+
 #endif // TRKPREPRAWDATA_PREPRAWDATACLASS_DEF_H
diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircleContainer.h b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircleContainer.h
index c9902d440a0cb8262d8fc314c0818368987eb5bd..2ee6491229063149bb0be22af868a40c52fbfe1d 100755
--- a/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircleContainer.h
+++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/TRT_DriftCircleContainer.h
@@ -25,9 +25,12 @@
 // numbers obtained using clid.db
 namespace InDet {
 typedef Trk::PrepRawDataContainer< TRT_DriftCircleCollection > TRT_DriftCircleContainer;
+typedef EventContainers::IdentifiableCache< TRT_DriftCircleCollection > TRT_DriftCircleContainerCache;
 }
 
 CLASS_DEF(InDet::TRT_DriftCircleContainer,1128766825,1)
 CONTAINER_IS_IDENTCONT(InDet::TRT_DriftCircleContainer)
 
+CLASS_DEF( InDet::TRT_DriftCircleContainerCache , 1226029651 , 1 )
+
 #endif // TRKPREPRAWDATA_PREPRAWDATACLASS_DEF_H
diff --git a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx
index b5c7c1e1af9ea3f729eafccd0a2e2867dcc28757..574d66c7167710927e3076a25581e7159f2b4368 100755
--- a/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx
+++ b/InnerDetector/InDetRecEvent/InDetPrepRawData/src/SiCluster.cxx
@@ -120,7 +120,6 @@ MsgStream& SiCluster::dump( MsgStream&    stream) const
 	stream << "SiCluster object"<<std::endl;
 	
 	// have to do a lot of annoying checking to make sure that PRD is valid. 
-	if ( &(this->globalPosition() )!=0 ) 
 	{
 		stream << "at global coordinates (x,y,z) = ("<<this->globalPosition().x()<<", "
 			<<this->globalPosition().y()<<", "
@@ -145,7 +144,6 @@ MsgStream& SiCluster::dump( MsgStream&    stream) const
 std::ostream& SiCluster::dump( std::ostream&    stream) const
 {
 	stream << "SiCluster object"<<std::endl;
-	if ( &(this->globalPosition() )!=0 ) 
 	{
 		stream << "at global coordinates (x,y,z) = ("<<this->globalPosition().x()<<", "
 			<<this->globalPosition().y()<<", "
diff --git a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt
index 5a7487d5230a6e15c4e7cb43a0f451e15058da61..b796dc546e6a8f5211132b83a83be11e292ac3bf 100644
--- a/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt
+++ b/InnerDetector/InDetRecEvent/InDetRIO_OnTrack/CMakeLists.txt
@@ -13,6 +13,7 @@ atlas_depends_on_subdirs( PUBLIC
                           InnerDetector/InDetRecEvent/InDetPrepRawData
                           Tracking/TrkEvent/TrkEventPrimitives
                           Tracking/TrkEvent/TrkRIO_OnTrack
+                          Event/EventContainers
                           PRIVATE
                           InnerDetector/InDetDetDescr/InDetReadoutGeometry
                           Tracking/TrkDetDescr/TrkSurfaces )
@@ -25,12 +26,12 @@ atlas_add_library( InDetRIO_OnTrack
                    src/*.cxx
                    PUBLIC_HEADERS InDetRIO_OnTrack
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES DataModel Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack
+                   LINK_LIBRARIES DataModel Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack EventContainers
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} InDetReadoutGeometry TrkSurfaces )
 
 atlas_add_dictionary( InDetRIO_OnTrackDict
                       InDetRIO_OnTrack/InDetRIO_OnTrackDict.h
                       InDetRIO_OnTrack/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack InDetReadoutGeometry TrkSurfaces InDetRIO_OnTrack )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel Identifier GaudiKernel InDetPrepRawData TrkEventPrimitives TrkRIO_OnTrack InDetReadoutGeometry TrkSurfaces InDetRIO_OnTrack EventContainers )
 
diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/doc/packagedoc.h b/InnerDetector/InDetRecEvent/SiSpacePoint/doc/packagedoc.h
index 5ca368a49e63f9495bd2711615fc2da3013706e7..f5c76f3bfdf7dd0748d099afa684dbf08627eede 100644
--- a/InnerDetector/InDetRecEvent/SiSpacePoint/doc/packagedoc.h
+++ b/InnerDetector/InDetRecEvent/SiSpacePoint/doc/packagedoc.h
@@ -97,6 +97,5 @@ TrkSpacePoint.
 
 
 
-@section SiSpacePoint_SiSpacePointReq Requirements
 
 */
diff --git a/InnerDetector/InDetRecEvent/SiSpacePoint/src/PixelSpacePoint.cxx b/InnerDetector/InDetRecEvent/SiSpacePoint/src/PixelSpacePoint.cxx
index 3df7912b612a0486264ef324707dad3cf06a5c33..a779f8293abcd9f9949efbef3dd8a2f4a094c860 100755
--- a/InnerDetector/InDetRecEvent/SiSpacePoint/src/PixelSpacePoint.cxx
+++ b/InnerDetector/InDetRecEvent/SiSpacePoint/src/PixelSpacePoint.cxx
@@ -29,7 +29,7 @@ namespace InDet
   {
     assert (clus!=0);
     Trk::MeasurementBase::m_localParams = Trk::LocalParameters(clus->localPosition());
-    if( &clus->localCovariance() != 0 ) Trk::MeasurementBase::m_localCovariance = clus->localCovariance();
+    Trk::MeasurementBase::m_localCovariance = clus->localCovariance();
 
     const  Amg::Vector3D* tmpPos = clus->detectorElement()->surface().localToGlobal(clus->localPosition()) ;
     assert (tmpPos!=0) ;
@@ -39,7 +39,7 @@ namespace InDet
     m_clusList = new std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*>(clus,0);
     m_elemIdList.first = elementId ;
     m_elemIdList.second = 0 ;
-    if( &clus->localCovariance() != 0 ) setupGlobalFromLocalCovariance();
+    setupGlobalFromLocalCovariance();
   }
   
   //------------ -------------------------------------------------
@@ -54,7 +54,7 @@ namespace InDet
     assert (clus!=0);
     m_globalCovariance = *globcov;
     Trk::MeasurementBase::m_localParams = Trk::LocalParameters(clus->localPosition());
-    if( &clus->localCovariance() != 0 ) Trk::MeasurementBase::m_localCovariance = clus->localCovariance();
+    Trk::MeasurementBase::m_localCovariance = clus->localCovariance();
     delete globcov;
 
     const Amg::Vector3D* tmpPos = clus->detectorElement()->surface().localToGlobal(clus->localPosition()) ;
@@ -77,7 +77,7 @@ namespace InDet
     assert (clus!=0);
     m_globalCovariance = globcov;
     Trk::MeasurementBase::m_localParams = Trk::LocalParameters(clus->localPosition());
-    if( &clus->localCovariance() != 0 ) Trk::MeasurementBase::m_localCovariance = clus->localCovariance();
+    Trk::MeasurementBase::m_localCovariance = clus->localCovariance();
 
     const Amg::Vector3D* tmpPos = clus->detectorElement()->surface().localToGlobal(clus->localPosition()) ;
     assert (tmpPos!=0) ;
diff --git a/InnerDetector/InDetRecEvent/SiSpacePointsSeed/doc/packagedoc.h b/InnerDetector/InDetRecEvent/SiSpacePointsSeed/doc/packagedoc.h
index 622cad17e5c178e719563072a0eb4b4a1a9bbb3d..20f99bd984557ed520ce2dc5bd8db9ae7aabb6fe 100644
--- a/InnerDetector/InDetRecEvent/SiSpacePointsSeed/doc/packagedoc.h
+++ b/InnerDetector/InDetRecEvent/SiSpacePointsSeed/doc/packagedoc.h
@@ -20,6 +20,5 @@ Maind data member are:
 This class contains information after first step of pattern recognition using space points
 information and is input for local track finding in the road.
 
-@section SiSpacePointsSeed_SiSpacePointsSeedReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetDenseEnvAmbiTrackSelectionTool.h b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetDenseEnvAmbiTrackSelectionTool.h
index 83dd7da4dfc2f088cf0974f5480e22e634e2b742..a2a784258b712e631022cdf46d1498ba4dad7c02 100755
--- a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetDenseEnvAmbiTrackSelectionTool.h
+++ b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/InDetAmbiTrackSelectionTool/InDetDenseEnvAmbiTrackSelectionTool.h
@@ -12,7 +12,8 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/IIncidentSvc.h"
-
+#include "StoreGate/ReadHandleKey.h"
+#include "TrkCaloClusterROI/CaloClusterROI_Collection.h"
 #include "TrkTrack/TrackStateOnSurface.h"
 #include "TrkToolInterfaces/IAmbiTrackSelectionTool.h"
 #include "TrkToolInterfaces/IPRD_AssociationTool.h"
@@ -339,7 +340,7 @@ namespace InDet
       float m_minPtSplit;
       float m_phiWidth;
       float m_etaWidth;
-      std::string m_inputHadClusterContainerName;
+      SG::ReadHandleKey<CaloClusterROI_Collection> m_inputHadClusterContainerName;
       
       std::vector<double>   m_hadF;
       std::vector<double>   m_hadE;
@@ -352,7 +353,7 @@ namespace InDet
       float m_phiWidthEm;
       float m_etaWidthEm;
 
-      std::string m_inputEmClusterContainerName;
+      SG::ReadHandleKey<CaloClusterROI_Collection> m_inputEmClusterContainerName;
       std::vector<double>   m_emF;
       std::vector<double>   m_emE;
       std::vector<double>   m_emR;
diff --git a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/doc/packagedoc.h
index 01ab780a3a9a1a3bd70ac27d7f57df0be43ec312..22bc8091814cd927bbb6606604e4ed04793385ab 100644
--- a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/doc/packagedoc.h
@@ -33,7 +33,6 @@ If a track has more shared hits than allowed, as many shared hits as allowed are
 and a new track is constructed from these hits.
 If this track is sufficiently good, it is returned, otherweise zero is returned.
 
-@section InDetAmbiTrackSelectionTool_InDetAmbiTrackSelectionToolReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetAmbiTrackSelectionTool.cxx b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetAmbiTrackSelectionTool.cxx
index a57b5f8d2a9d6d60409e7fca7184a76cf4627533..8cb1eb190a51d4faee36412b4ea30b6b50654829 100755
--- a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetAmbiTrackSelectionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetAmbiTrackSelectionTool.cxx
@@ -34,7 +34,9 @@ InDet::InDetAmbiTrackSelectionTool::InDetAmbiTrackSelectionTool(const std::strin
   AthAlgTool(t,n,p),
   m_assoTool("Trk::PRD_AssociationTool/PRD_AssociationTool"),
   m_selectortool("InDet::InDetTrtDriftCircleCutTool"       ),
-  m_IBLParameterSvc("IBLParameterSvc",n)
+  m_IBLParameterSvc("IBLParameterSvc",n),
+  // Initialization of atlas id helper 
+  m_detID(nullptr)
 
 {
   declareInterface<IAmbiTrackSelectionTool>(this);
@@ -58,6 +60,7 @@ InDet::InDetAmbiTrackSelectionTool::InDetAmbiTrackSelectionTool(const std::strin
 
   // compute the number of shared hits from the number of max shared modules
   m_maxShared=2*m_maxSharedModules+1;
+    
 }
 
 //================ Destructor =================================================
diff --git a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx
index af9e33263e0c3bff52ab98267e67e093c3f62ea1..88f64406b5457af6baed39c44e2c4b0b7a7db09a 100755
--- a/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetAmbiTrackSelectionTool/src/InDetDenseEnvAmbiTrackSelectionTool.cxx
@@ -44,6 +44,7 @@ InDet::InDetDenseEnvAmbiTrackSelectionTool::InDetDenseEnvAmbiTrackSelectionTool(
   m_selectortool("InDet::InDetTrtDriftCircleCutTool"       ),
   m_IBLParameterSvc("IBLParameterSvc",n),
   m_incidentSvc("IncidentSvc", n),
+  m_detID(nullptr),
   m_observerTool("Trk::TrkObserverTool/TrkObserverTool"),
   m_mapFilled(false),
   m_monitorTracks(false)
@@ -79,7 +80,7 @@ InDet::InDetDenseEnvAmbiTrackSelectionTool::InDetDenseEnvAmbiTrackSelectionTool(
   declareProperty("minPtSplit"           ,m_minPtSplit   = 0.   );
   declareProperty("phiWidth"             ,m_phiWidth     = 0.2  );
   declareProperty("etaWidth"             ,m_etaWidth     = 0.2  );
-  declareProperty("InputHadClusterContainerName",m_inputHadClusterContainerName);  
+  declareProperty("InputHadClusterContainerName",m_inputHadClusterContainerName="InDetHadCaloClusterROIs");
   declareProperty("MonitorAmbiguitySolving"  , m_monitorTracks = false);
   declareProperty("ObserverTool"             , m_observerTool);
 
@@ -88,7 +89,7 @@ InDet::InDetDenseEnvAmbiTrackSelectionTool::InDetDenseEnvAmbiTrackSelectionTool(
   declareProperty("minPtConv"            ,m_minPtEm      = 10000.); // in MeV
   declareProperty("phiWidthEM"           ,m_phiWidthEm   = 0.05  );
   declareProperty("etaWidthEM"           ,m_etaWidthEm   = 0.05  );
-  declareProperty("InputEmClusterContainerName",m_inputEmClusterContainerName);  
+  declareProperty("InputEmClusterContainerName",m_inputEmClusterContainerName="InDetCaloClusterROIs");
  
  
   declareProperty("doPairSelection"       ,m_doPairSelection = true);
@@ -171,6 +172,9 @@ StatusCode InDet::InDetDenseEnvAmbiTrackSelectionTool::initialize()
   m_incidentSvc->addListener( this, "BeginEvent");
   //m_incidentSvc->addListener( this, "EndEvent");
 
+  ATH_CHECK(m_inputHadClusterContainerName.initialize(m_useHClusSeed));
+  ATH_CHECK(m_inputEmClusterContainerName.initialize(m_useEmClusSeed));
+
   ATH_MSG_INFO( "initialize() successful in " << name() );
   return StatusCode::SUCCESS;
 }
@@ -201,17 +205,13 @@ void InDet::InDetDenseEnvAmbiTrackSelectionTool::newEvent()
     m_hadE.clear();
     m_hadR.clear();
     m_hadZ.clear();
-    
-    const CaloClusterROI_Collection* calo = 0;
-    StatusCode sc = evtStore()->retrieve(calo,m_inputHadClusterContainerName);
-
-    if(sc == StatusCode::SUCCESS && calo) {
-      for( const auto& ccROI : *calo) {
-        m_hadF.push_back( ccROI->globalPosition().phi() );
-        m_hadE.push_back( ccROI->globalPosition().eta() );
-        m_hadR.push_back( ccROI->globalPosition().perp() );
-        m_hadZ.push_back( ccROI->globalPosition().z() );
-      }
+
+    SG::ReadHandle<CaloClusterROI_Collection> calo(m_inputHadClusterContainerName);
+    for( const auto& ccROI : *calo) {
+      m_hadF.push_back( ccROI->globalPosition().phi() );
+      m_hadE.push_back( ccROI->globalPosition().eta() );
+      m_hadR.push_back( ccROI->globalPosition().perp() );
+      m_hadZ.push_back( ccROI->globalPosition().z() );
     }
   }
 
@@ -221,20 +221,16 @@ void InDet::InDetDenseEnvAmbiTrackSelectionTool::newEvent()
     m_emE.clear();
     m_emR.clear();
     m_emZ.clear();
-    
-    const CaloClusterROI_Collection* calo = 0;
-    StatusCode sc = evtStore()->retrieve(calo,m_inputEmClusterContainerName);
 
-    if(sc == StatusCode::SUCCESS && calo) {
-      for( const Trk::CaloClusterROI* ccROI : *calo) {
-        if( ccROI->energy() * sin(ccROI->globalPosition().theta()) < m_minPtEm){ 
-          continue;
-        }  
-        m_emF.push_back( ccROI->globalPosition().phi() );
-        m_emE.push_back( ccROI->globalPosition().eta() );
-        m_emR.push_back( ccROI->globalPosition().perp() );
-        m_emZ.push_back( ccROI->globalPosition().z() );
+    SG::ReadHandle<CaloClusterROI_Collection> calo(m_inputEmClusterContainerName);
+    for( const Trk::CaloClusterROI* ccROI : *calo) {
+      if( ccROI->energy() * sin(ccROI->globalPosition().theta()) < m_minPtEm){
+	continue;
       }
+      m_emF.push_back( ccROI->globalPosition().phi() );
+      m_emE.push_back( ccROI->globalPosition().eta() );
+      m_emR.push_back( ccROI->globalPosition().perp() );
+      m_emZ.push_back( ccROI->globalPosition().z() );
     }
   }
   m_mapFilled = true;
diff --git a/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_AssociationToolGangedPixels.h b/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_AssociationToolGangedPixels.h
index e942061aafe1d0821f209852fe198a042801df0c..565874d717f323a2fceb1b3c25fa8b42516410c5 100755
--- a/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_AssociationToolGangedPixels.h
+++ b/InnerDetector/InDetRecTools/InDetAssociationTools/InDetAssociationTools/InDetPRD_AssociationToolGangedPixels.h
@@ -7,6 +7,7 @@
 
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ServiceHandle.h"
+#include "StoreGate/ReadHandleKey.h"
 #include "TrkToolInterfaces/IPRD_AssociationTool.h"
 #include "InDetPrepRawData/PixelGangedClusterAmbiguities.h"
 #include <set>
@@ -82,9 +83,9 @@ namespace InDet {
     /** holds the PRDs associated with each Track (i.e. the Track* is the key)*/
     IPRD_AssociationTool::TrackPrepRawDataMap m_trackPrepRawDataMap;
 
-    const PixelGangedClusterAmbiguities* m_gangedAmbis;
-
-    std::string m_pixelClusterAmbiguitiesMapName;
+    SG::ReadHandleKey<PixelGangedClusterAmbiguities> m_pixelClusterAmbiguitiesMapName;
+    SG::ReadHandle<PixelGangedClusterAmbiguities> m_gangedAmbis;
+    bool m_has_ambi_map;
 
     /** add TRT outliers in the addTrack method to avoid splits due to rejected extensions */
     bool m_addTRToutliers;
diff --git a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx
index bf3341d89b57643ac3ebe63a0ce1f3e0f5445a23..f20b55dee317907762555791e7a1a167ad7f9a05 100755
--- a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx
+++ b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_AssociationToolGangedPixels.cxx
@@ -30,6 +30,10 @@ InDet::InDetPRD_AssociationToolGangedPixels::~InDetPRD_AssociationToolGangedPixe
 
 StatusCode InDet::InDetPRD_AssociationToolGangedPixels::initialize()
 {
+  m_has_ambi_map = m_pixelClusterAmbiguitiesMapName.initialize().isSuccess();
+  if (!m_has_ambi_map)
+    ATH_MSG_WARNING("Could not retrieve "<< m_pixelClusterAmbiguitiesMapName << " this is ok if pixel is off");
+
   return StatusCode::SUCCESS;
 }
 
@@ -287,20 +291,13 @@ InDet::InDetPRD_AssociationToolGangedPixels::onTracks(const Trk::PrepRawData& pr
 
 void InDet::InDetPRD_AssociationToolGangedPixels::reset()
 {
-  if (evtStore()->contains<PixelGangedClusterAmbiguities>( m_pixelClusterAmbiguitiesMapName ) )
-    {      
-      StatusCode sc = evtStore()->retrieve(m_gangedAmbis, m_pixelClusterAmbiguitiesMapName );
-      
-      if (sc.isFailure()) {
-	msg(MSG::ERROR) << "Could not retrieve "<< m_pixelClusterAmbiguitiesMapName << endmsg;
-      } else {
-	if (msgLvl(MSG::DEBUG)) msg() << "Retrieved " << m_pixelClusterAmbiguitiesMapName
-				      << ", number of entries for this event:"
-				      << m_gangedAmbis->size() << endmsg;
-      }
-    } else {
-      if (msgLvl(MSG::DEBUG)) msg() << "Could not retrieve "<< m_pixelClusterAmbiguitiesMapName << " this is ok if pixel is off." << endmsg;
-    } 
+  if (m_has_ambi_map) {
+    m_gangedAmbis = SG::makeHandle(m_pixelClusterAmbiguitiesMapName);
+    ATH_MSG_DEBUG("Retrieved " << m_pixelClusterAmbiguitiesMapName
+		  << ", number of entries for this event:"
+		  << m_gangedAmbis->size());
+  }
+
   m_prepRawDataTrackMap.clear();
   m_trackPrepRawDataMap.clear();
 }
diff --git a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_Provider.cxx b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_Provider.cxx
index 8a8db4c9bae7e20f49ce8af874860cc5166fac31..6a34eaea72c66cc0f3d2c63f189553ee01a73cdd 100644
--- a/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_Provider.cxx
+++ b/InnerDetector/InDetRecTools/InDetAssociationTools/src/InDetPRD_Provider.cxx
@@ -78,7 +78,7 @@ StatusCode InDet::InDetPRD_Provider::retrieveCollection() {
        return StatusCode::FAILURE;
    }
    if (m_sctClusterContainerName!="" && evtStore()->retrieve(m_sctClusterContainer,m_sctClusterContainerName).isFailure() ){
-       ATH_MSG_ERROR("Could not retrieve " << m_pixClusterContainerName << ". Aborting." );
+       ATH_MSG_ERROR("Could not retrieve " << m_sctClusterContainerName << ". Aborting." );
        return StatusCode::FAILURE;
    }
    if (m_trtDriftCircleContainerName!="" && evtStore()->retrieve(m_trtDriftCircleContainer,m_trtDriftCircleContainerName).isFailure() ){
diff --git a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/doc/packagedoc.h
index 09ac3bb4737bb76a375fe55e5c2bf716267ecf63..51b0ebb28751c6300e541bcbc7ca19e6d7cdee16 100644
--- a/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetCompetingRIOsOnTrackTool/doc/packagedoc.h
@@ -40,14 +40,4 @@ This package contains the tools to create Trk::CompetingRIOsOnTrack for the InDe
 
 @section InDetCompetingRIOsOnTrackTool_ExtrasInDetCompetingRIOsOnTrackTool Extra Pages
 
- - @ref UsedInDetCompetingRIOsOnTrackTool
- - @ref requirementsInDetCompetingRIOsOnTrackTool
-*/
-
-/**
-@page UsedInDetCompetingRIOsOnTrackTool Used Packages
-*/
-
-/**
-@page requirementsInDetCompetingRIOsOnTrackTool Requirements
 */
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetConversionFinderTools/doc/packagedoc.h
index 1ef8f83f236c8595d9f71665c988f1910498cf37..e28fb3a7b6f2e92aaf83073e9f8e15e596cc355d 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/doc/packagedoc.h
@@ -29,9 +29,7 @@ The algorithm is configured automaticly via genConf
       <li><b>'max_mom_frac' : 0.7 </b> </li>
     </ul>
 
-@section InDetConversionFinderTools_used_packagesInDetConversionFinderTool used packages
 
-@section InDetConversionFinderTools_requirements Requirements
 
 \namespace Vtx
 A namespace for all vertexing packages and related stuff.
diff --git a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
index 0b6b1ecc5f70fd47457898122036ac475d0f06f8..01d3c77a789f6912d468b75de07db19d419af606 100644
--- a/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetConversionFinderTools/src/SingleTrackConversionTool.cxx
@@ -311,7 +311,7 @@ namespace InDet {
       
       bool pass = true;
 
-      const bool expectedHitInBLayer = tSum->get(Trk::expectBLayerHit);
+      const bool expectedHitInBLayer = tSum->get(Trk::expectInnermostPixelLayerHit);
       if (expectedHitInBLayer) {
         // ME: cut on minInitR if blayer is ok
         if(trkPar->position().perp() < m_minInitR ) pass = false;
@@ -331,7 +331,7 @@ namespace InDet {
       }
 
       // do we reject tracks with blayer ?
-      int nBLHits = tSum->get(Trk::numberOfBLayerHits) + tSum->get(Trk::numberOfBLayerOutliers);
+      int nBLHits = tSum->get(Trk::numberOfInnermostPixelLayerHits) + tSum->get(Trk::numberOfInnermostPixelLayerOutliers);
       if(nBLHits > m_maxBLhits) pass = false;
 
       delete tSum;
@@ -481,7 +481,7 @@ namespace InDet {
     uint8_t dummy;
 
     uint8_t expectedHitInBLayer(0); 
-    if( track->summaryValue(dummy,xAOD::expectBLayerHit) )
+    if( track->summaryValue(dummy,xAOD::expectInnermostPixelLayerHit) )
        expectedHitInBLayer = dummy;
 
     float Rfirst = trk_meas.position().perp();    
@@ -539,9 +539,9 @@ namespace InDet {
     }
 
     uint8_t nBLHits(0);
-    if( track->summaryValue(dummy,xAOD::numberOfBLayerHits))
+    if( track->summaryValue(dummy,xAOD::numberOfInnermostPixelLayerHits))
       nBLHits += dummy;
-    if( track->summaryValue(dummy, xAOD::numberOfBLayerOutliers))
+    if( track->summaryValue(dummy, xAOD::numberOfInnermostPixelLayerOutliers))
       nBLHits += dummy;
     if(nBLHits > m_maxBLhits) 
     {
diff --git a/InnerDetector/InDetRecTools/InDetDNASeparator/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetDNASeparator/doc/packagedoc.h
index b0505e26e1a0f98edead43011cfb0b3b3245d57c..8c8f1069ac1c33b66dd70ae16f581dc16a2c0e3b 100644
--- a/InnerDetector/InDetRecTools/InDetDNASeparator/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetDNASeparator/doc/packagedoc.h
@@ -49,14 +49,4 @@ brem-sensitive detector floors.
 
 @section InDetDNASeparator_InDetDNASeparatorExtras Extra Pages
 
- - @ref InDetDNASeparatorPackages
- - @ref InDetDNASeparatorRequirements
-*/
-
-/**
-@page InDetDNASeparatorPackages Used Packages
-*/
-
-/**
-@page InDetDNASeparatorRequirements
 */
diff --git a/InnerDetector/InDetRecTools/InDetDNASeparator/src/InDetDNASeparator.cxx b/InnerDetector/InDetRecTools/InDetDNASeparator/src/InDetDNASeparator.cxx
index 0cab9d9d6922ee9ad874b95bf4916da1f6b6ff4c..2c5ca2a7a87db861f74c64611a5041ba58e48c6f 100644
--- a/InnerDetector/InDetRecTools/InDetDNASeparator/src/InDetDNASeparator.cxx
+++ b/InnerDetector/InDetRecTools/InDetDNASeparator/src/InDetDNASeparator.cxx
@@ -28,7 +28,11 @@ InDet::InDetDNASeparator::InDetDNASeparator(const std::string& t,
   :
   AthAlgTool(t,n,p),
   m_kutoff(4.50),
-  m_floorseparation_drr(4.00*CLHEP::mm)
+  m_floorseparation_drr(4.00*CLHEP::mm),
+  // Initialization of ID SCT helper
+  m_SCT_Tool(nullptr),
+  // Initialization of ID Pixel helper
+  m_pixelTool(nullptr)
 {
   declareInterface<ITrackBreakpointAnalyser>(this);
 
diff --git a/InnerDetector/InDetRecTools/InDetMultipleVertexSeedFinderUtils/src/PVFindingTrackFilter_cxx b/InnerDetector/InDetRecTools/InDetMultipleVertexSeedFinderUtils/src/PVFindingTrackFilter_cxx
index 2be96486d9f72c28be7b1fabfb9d4bbd886d1e44..839cc6f80bc9e4484b5ffe6f1eadd84265bee9aa 100644
--- a/InnerDetector/InDetRecTools/InDetMultipleVertexSeedFinderUtils/src/PVFindingTrackFilter_cxx
+++ b/InnerDetector/InDetRecTools/InDetMultipleVertexSeedFinderUtils/src/PVFindingTrackFilter_cxx
@@ -47,7 +47,7 @@ namespace Trk
   declareProperty("maxD0",                    m_maxD0);
   declareProperty("maxD0overSigmaD0",         m_maxD0overSigmaD0);
   declareProperty("numberOfPixelHits",        m_numberOfPixelHits);
-  declareProperty("numberOfBLayerHits",       m_numberOfBLayerHits);
+  declareProperty("numberOfInnermostPixelLayerHits",       m_numberOfBLayerHits);
   declareProperty("TrackSummaryTool",         m_trackSumTool);
  }//end of constructor
 
@@ -106,7 +106,7 @@ namespace Trk
   
 //  std::cout<<" Getting to the number of hits "<<std::endl;     
   int nPixelHits  =  summary->get(Trk::numberOfPixelHits);
-  int nBLayerHits =  summary->get(Trk::numberOfBLayerHits); 
+  int nBLayerHits =  summary->get(Trk::numberOfInnermostPixelLayerHits);
    
 //  std::cout<<"Number of pixel hits: "<<nPixelHits<<"Number of b-layer hits: "<<nBLayerHits<<std::endl;
    
diff --git a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/doc/packagedoc.h
index 505a860a69ba0e60d226c770c4ca60fc0b56ce59..b9ab539d77f963e9909d475e6d9242117f7011b5 100644
--- a/InnerDetector/InDetRecTools/InDetPriVxFinderTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetPriVxFinderTool/doc/packagedoc.h
@@ -191,9 +191,7 @@ The AlgTool is automatically configured (see genConf). Following properties can
    </li>
 </ul>
 
-@section InDetPriVxFinderTool_used_packagesInDetPriVxFinder used packages
 
-@section InDetPriVxFinderTool_requirements Requirements
 
 \namespace Vtx
 A namespace for all vertexing packages and related stuff.
diff --git a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/doc/packagedoc.h
index a33bdb477ebf96b852a35cc49dbe1b18d7ab6504..0608d84885fc290b4fb1aaae2b6847cccfdda373 100644
--- a/InnerDetector/InDetRecTools/InDetRecToolInterfaces/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetRecToolInterfaces/doc/packagedoc.h
@@ -183,6 +183,5 @@ from base class IAlgTool and describe methodes and intefaces needs for different
  to determine the area of search inside the TRT. Passing a TRT track segment
  as input is the prefered method, most compatible with the new tracking requirements.
 
-@section InDetRecToolInterfaces_InDetRecToolInterfacesReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecTools/InDetTestBLayer/InDetTestBLayer/InDetTestBLayerTool.h b/InnerDetector/InDetRecTools/InDetTestBLayer/InDetTestBLayer/InDetTestBLayerTool.h
index 9ecf0d647f990189207053a8bb6a46e3b53a0281..3e7c5205ca69efc34a4a8ec2998d016bd246c3f1 100644
--- a/InnerDetector/InDetRecTools/InDetTestBLayer/InDetTestBLayer/InDetTestBLayerTool.h
+++ b/InnerDetector/InDetRecTools/InDetTestBLayer/InDetTestBLayer/InDetTestBLayerTool.h
@@ -25,6 +25,7 @@ class AtlasDetectorID;
 class Identifier;
 class PixelID;
 
+
 namespace InDet {
 
 
@@ -36,58 +37,78 @@ namespace InDet {
                     const std::string& n, const IInterface* p);
     virtual ~InDetTestBLayerTool();
 
-    virtual StatusCode initialize();
-    virtual StatusCode finalize();
+    virtual StatusCode initialize() override;
+    virtual StatusCode finalize() override;
 
     //    bool expectHitInBLayer(const Rec::TrackParticle*) const ;
-    virtual bool expectHitInBLayer(const Trk::TrackParticleBase*, bool recompute=false) const ;
-    virtual bool expectHitInBLayer(const Trk::Track*, bool recompute=false) const ;
-    virtual bool expectHitInBLayer(const Trk::TrackParameters* trackpar) const ;
+    virtual bool expectHitInBLayer(const Trk::TrackParticleBase*, bool recompute=false) const override;
+    virtual bool expectHitInBLayer(const Trk::Track*, bool recompute=false) const override;
+    virtual bool expectHitInBLayer(const Trk::TrackParameters* trackpar) const override;
 
-    virtual const Trk::ResidualPull* bLayerHitResidual(const Trk::Track* ) const ;
-    virtual const Trk::ResidualPull* bLayerHitResidual(const Trk::TrackParticleBase*) const ;
+    virtual const Trk::ResidualPull* bLayerHitResidual(const Trk::Track* ) const override;
+    virtual const Trk::ResidualPull* bLayerHitResidual(const Trk::TrackParticleBase*) const override;
 
     //// return false if extrapolation failed
     virtual bool getTrackStateOnBlayerInfo(const Trk::TrackParticleBase*, 
-					   std::vector<TrackStateOnBLayerInfo>& infoList)  const;
+					   std::vector<TrackStateOnBLayerInfo>& infoList)  const override;
     virtual bool getTrackStateOnBlayerInfo(const Trk::Track*, 
-					   std::vector<TrackStateOnBLayerInfo>& infoList)  const;
+					   std::vector<TrackStateOnBLayerInfo>& infoList)  const override;
     virtual bool getTrackStateOnBlayerInfo(const Trk::TrackParameters* trackpar, 
-					   std::vector<TrackStateOnBLayerInfo>& infoList)  const;
+					   std::vector<TrackStateOnBLayerInfo>& infoList)  const override;
+
+    virtual bool expectHitInInnermostPixelLayer(const Trk::TrackParticleBase*, bool recompute=false) const override;
+    virtual bool expectHitInInnermostPixelLayer(const Trk::Track*, bool recompute=false) const override;
+    virtual bool expectHitInInnermostPixelLayer(const Trk::TrackParameters* trackpar) const override;
 
-    virtual bool expectHitInInnermostPixelLayer(const Trk::TrackParticleBase*, bool recompute=false) const;
-    virtual bool expectHitInInnermostPixelLayer(const Trk::Track*, bool recompute=false) const;
-    virtual bool expectHitInInnermostPixelLayer(const Trk::TrackParameters* trackpar) const;
+    virtual const Trk::ResidualPull* innermostPixelLayerHitResidual(const Trk::Track* ) const override;
+    virtual const Trk::ResidualPull* innermostPixelLayerHitResidual(const Trk::TrackParticleBase*) const override;
 
-    virtual const Trk::ResidualPull* innermostPixelLayerHitResidual(const Trk::Track* ) const;
-    virtual const Trk::ResidualPull* innermostPixelLayerHitResidual(const Trk::TrackParticleBase*) const;
- 
     virtual bool getTrackStateOnInnermostPixelLayerInfo(const Trk::TrackParticleBase*, 
-				   std::vector<TrackStateOnBLayerInfo>& infoList)  const;
+				   std::vector<TrackStateOnBLayerInfo>& infoList)  const override;
     virtual bool getTrackStateOnInnermostPixelLayerInfo(const Trk::Track*, 
-				   std::vector<TrackStateOnBLayerInfo>& infoList)  const;
+				   std::vector<TrackStateOnBLayerInfo>& infoList)  const override;
     virtual bool getTrackStateOnInnermostPixelLayerInfo(const Trk::TrackParameters* trackpar, 
-				   std::vector<TrackStateOnBLayerInfo>& infoList)  const;
+				   std::vector<TrackStateOnBLayerInfo>& infoList)  const override;
+
+    virtual bool expectHitInNextToInnermostPixelLayer(const Trk::TrackParticleBase*, bool recompute=false) const override;
+    virtual bool expectHitInNextToInnermostPixelLayer(const Trk::Track*, bool recompute=false) const override;
+    virtual bool expectHitInNextToInnermostPixelLayer(const Trk::TrackParameters* trackpar) const override;
+
+    virtual const Trk::ResidualPull* nextToInnermostPixelLayerHitResidual(const Trk::Track* ) const override;
+    virtual const Trk::ResidualPull* nextToInnermostPixelLayerHitResidual(const Trk::TrackParticleBase*) const override;
 
-    virtual bool expectHitInNextToInnermostPixelLayer(const Trk::TrackParticleBase*, bool recompute=false) const;
-    virtual bool expectHitInNextToInnermostPixelLayer(const Trk::Track*, bool recompute=false) const;
-    virtual bool expectHitInNextToInnermostPixelLayer(const Trk::TrackParameters* trackpar) const;
-    
-    virtual const Trk::ResidualPull* nextToInnermostPixelLayerHitResidual(const Trk::Track* ) const;
-    virtual const Trk::ResidualPull* nextToInnermostPixelLayerHitResidual(const Trk::TrackParticleBase*) const;
-    
     virtual bool getTrackStateOnNextToInnermostPixelLayerInfo(const Trk::TrackParticleBase*, 
-							std::vector<TrackStateOnBLayerInfo>& infoList)  const;
+							std::vector<TrackStateOnBLayerInfo>& infoList)  const override;
     virtual bool getTrackStateOnNextToInnermostPixelLayerInfo(const Trk::Track*, 
-							std::vector<TrackStateOnBLayerInfo>& infoList)  const;
+							std::vector<TrackStateOnBLayerInfo>& infoList)  const override;
     virtual bool getTrackStateOnNextToInnermostPixelLayerInfo(const Trk::TrackParameters* trackpar, 
-							std::vector<TrackStateOnBLayerInfo>& infoList)  const;
-    
+							std::vector<TrackStateOnBLayerInfo>& infoList)  const override;
+
 
   private:
+    bool expectHitInPixelLayer(const Trk::TrackParticleBase*, int layer, bool recompute=false) const;
+    bool expectHitInPixelLayer(const Trk::Track*, int layer, bool recompute=false) const;
+    bool expectHitInPixelLayer(const Trk::TrackParameters* trackpar,int layer) const;
+
+    const Trk::ResidualPull* pixelLayerHitResidual(const Trk::Track*, int layer) const;
+    const Trk::ResidualPull* pixelLayerHitResidual(const Trk::TrackParticleBase*, int layer) const;
+
+
+    bool getTrackStateOnPixelLayerInfo(const Trk::TrackParticleBase*,
+                                       std::vector<TrackStateOnBLayerInfo>& infoList,
+                                       int layer)  const;
+    bool getTrackStateOnPixelLayerInfo(const Trk::Track*, 
+                                       std::vector<TrackStateOnBLayerInfo>& infoList,
+                                       int layer)  const;
+    bool getTrackStateOnPixelLayerInfo(const Trk::TrackParameters* trackpar, 
+                                       std::vector<TrackStateOnBLayerInfo>& infoList,
+                                       int layer)  const;
+
 
     bool isActive(const Trk::TrackParameters* trackpar) const ;
-    bool getPixelLayerParameters(const Trk::TrackParameters* trackpar, std::vector<const Trk::TrackParameters*>& blayerParam, int layer) const;
+    bool getPixelLayerParameters(const Trk::TrackParameters* trackpar,
+                                 std::vector<const Trk::TrackParameters*>& blayerParam,
+                                 int layer) const;
     double getFracGood(const Trk::TrackParameters* trackpar, double phiRegionSize, double etaRegionSize) const;
 
     /** Pointer to Extrapolator AlgTool*/
@@ -113,6 +134,7 @@ namespace InDet {
     double m_etaRegionSize;
     double m_goodFracCut;
     bool m_checkAtLeastNearestNeighbors;
+    static const char *s_layerNames[2];
   };
   
   
diff --git a/InnerDetector/InDetRecTools/InDetTestBLayer/src/InDetTestBLayerTool.cxx b/InnerDetector/InDetRecTools/InDetTestBLayer/src/InDetTestBLayerTool.cxx
index 5fd8ae12744ce22f0e882a023aac3d58bdeab70b..d00a6d5723de205821ad4f6e8819b80812b2033c 100644
--- a/InnerDetector/InDetRecTools/InDetTestBLayer/src/InDetTestBLayerTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTestBLayer/src/InDetTestBLayerTool.cxx
@@ -2,8 +2,8 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AthenaBaseComps/AthAlgTool.h" 
-#include "AthenaBaseComps/AthService.h" 
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "AthenaBaseComps/AthService.h"
 
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/PixelModuleDesign.h"
@@ -29,9 +29,22 @@
 #include <sstream>
 
 using Amg::Transform3D;
+// don't want to include TrackSummary in the header
+// therefore anonymous "static" definition in the implementation file
+//namespace {
+  Trk::SummaryType s_layerSummaryTypeExpectHit[2] {
+    Trk::expectInnermostPixelLayerHit,
+    Trk::expectNextToInnermostPixelLayerHit
+  };
+//}
+
 
 namespace InDet {
-  
+  const char *InDetTestBLayerTool::s_layerNames[2] {
+    "innermost pixel layer",
+    "next to innermost pixel layer"
+  };
+
   InDetTestBLayerTool::InDetTestBLayerTool(const std::string& name,
 					   const std::string& n, const IInterface* p):
     AthAlgTool(name, n,p),
@@ -50,76 +63,76 @@ namespace InDet {
     declareProperty("EtaRegionSize", m_etaRegionSize = 3.);
     declareProperty("GoodFracCut", m_goodFracCut = 0.5);
 
-  }  
+  }
 
   InDetTestBLayerTool::~InDetTestBLayerTool() {}
 
   StatusCode InDetTestBLayerTool::initialize() {
-    
-    
+
+
     StatusCode sc = AthAlgTool::initialize();
-    if (sc.isFailure()) return sc;    
+    if (sc.isFailure()) return sc;
 
     // retrieve ID helpers:
     if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) {
-      msg(MSG::FATAL) << "Could not get AtlasDetectorID helper" << endmsg;
+      ATH_MSG_FATAL( "Could not get AtlasDetectorID helper");
       return StatusCode::FAILURE;
     }
-    
+
     sc = detStore()->retrieve(m_pixelId, "PixelID");
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Could not get PixelID helper !" << endmsg;
+      ATH_MSG_ERROR("Could not get PixelID helper !");
       return StatusCode::FAILURE;
     }
-    
+
     m_configured=true;
     if( m_extrapolator.empty() ){
-      msg(MSG::INFO) << "Extrapolator not configured " << endmsg; //n
+      ATH_MSG_INFO( "Extrapolator not configured " );
       m_configured=false;
     }
     else{
       if ( m_extrapolator.retrieve().isFailure() )
 	{
-	  msg(MSG::FATAL) << "Failed to retrieve tool " << m_extrapolator << endmsg; //n
+	  ATH_MSG_FATAL( "Failed to retrieve tool " << m_extrapolator );
 	  return StatusCode::FAILURE;
-	}  else { 
-	msg(MSG::INFO) << "Retrieved tool " << m_extrapolator << endmsg; //n
+	}  else {
+	ATH_MSG_INFO( "Retrieved tool " << m_extrapolator );
       }
     }
-    
+
     // Get PixelConditionsSummarySvc
     if( m_pixelCondSummarySvc.empty() ){
-      msg(MSG::INFO) << "PixelConditionsSummarySvc not configured " << endmsg; //n
+      ATH_MSG_INFO( "PixelConditionsSummarySvc not configured " );
       m_configured=false;
     }
     else{
       if ( m_pixelCondSummarySvc.retrieve().isFailure() ) {
-	msg(MSG::FATAL) << "Failed to retrieve tool " << m_pixelCondSummarySvc << endmsg; //n
+	ATH_MSG_FATAL("Failed to retrieve tool " << m_pixelCondSummarySvc);
 	return StatusCode::FAILURE;
       } else {
-	msg(MSG::INFO) << "Retrieved tool " << m_pixelCondSummarySvc << endmsg; //n
+	ATH_MSG_INFO("Retrieved tool " << m_pixelCondSummarySvc);
       }
     }
 
     if(!m_configured){
-      msg(MSG::INFO) << "you are using an unconfigured tool" << endmsg; 
-      msg(MSG::INFO) << "will not be able to extrapolate to the blayer" << endmsg;
-      msg(MSG::INFO) << "the values from the track summary will be returned" << endmsg; 
+      ATH_MSG_INFO("you are using an unconfigured tool");
+      ATH_MSG_INFO("will not be able to extrapolate to the blayer");
+      ATH_MSG_INFO("the values from the track summary will be returned");
     }
-   
+
     if (m_residualPullCalculator.retrieve().isFailure()) {
-      msg(MSG::FATAL) << "Failed to retrieve tool " << m_residualPullCalculator << endmsg;
+      ATH_MSG_FATAL("Failed to retrieve tool " << m_residualPullCalculator);
       return StatusCode::FAILURE;
     } else {
-      msg(MSG::INFO) << "Retrieved tool " << m_residualPullCalculator << endmsg;
+      ATH_MSG_INFO("Retrieved tool " << m_residualPullCalculator);
     }
 
 
-    msg(MSG::VERBOSE) << " Initialization of InDetTestBLayerTool succesfull" << endmsg;
+    ATH_MSG_VERBOSE(" Initialization of InDetTestBLayerTool succesfull");
     return StatusCode::SUCCESS;
 
   }
-  
+
   StatusCode InDetTestBLayerTool::finalize() {
     ATH_MSG_DEBUG("Finalization of InDetTestBLayerTool succesfull");
     return StatusCode::SUCCESS;
@@ -127,117 +140,60 @@ namespace InDet {
 
   const Trk::ResidualPull* InDet::InDetTestBLayerTool::bLayerHitResidual(const Trk::TrackParticleBase* trackparticle) const
   {
-    const Trk::Track* track = trackparticle->originalTrack();
-    
-    if (!track) {
-      msg(MSG::DEBUG) << "No original track, residual calculation can not be performed" << endmsg;
-      return 0;
-    }
-
-    return(this->bLayerHitResidual(track));
-
+    return pixelLayerHitResidual(trackparticle,0);
   }
 
   const Trk::ResidualPull* InDet::InDetTestBLayerTool::innermostPixelLayerHitResidual(const Trk::TrackParticleBase* trackparticle) const
   {
-  
-    const Trk::Track* track = trackparticle->originalTrack();
-    
-    if (!track) {
-      msg(MSG::DEBUG) << "No original track, residual calculation can not be performed" << endmsg;
-      return 0;
-    }
-
-    return(this->innermostPixelLayerHitResidual(track));
-
+    return pixelLayerHitResidual(trackparticle,0);
   }
 
    const Trk::ResidualPull* InDet::InDetTestBLayerTool::nextToInnermostPixelLayerHitResidual(const Trk::TrackParticleBase* trackparticle) const
   {
-  
+    return pixelLayerHitResidual(trackparticle,1);
+  }
+
+  const Trk::ResidualPull* InDet::InDetTestBLayerTool::pixelLayerHitResidual(const Trk::TrackParticleBase* trackparticle, int layer) const
+  {
+    assert(layer>=0 && layer<=1);
     const Trk::Track* track = trackparticle->originalTrack();
-    
+
     if (!track) {
-      msg(MSG::DEBUG) << "No original track, residual calculation can not be performed" << endmsg;
+      ATH_MSG_DEBUG( "No original track, residual calculation for " << s_layerNames[layer] << " can not be performed" );
       return 0;
     }
 
-    return(this->nextToInnermostPixelLayerHitResidual(track));
-
+    return(this->pixelLayerHitResidual(track,layer));
   }
 
- 
+
   const Trk::ResidualPull* InDet::InDetTestBLayerTool::bLayerHitResidual(const Trk::Track* track) const
   {
-   
-    return (this->innermostPixelLayerHitResidual(track));
- 
-  }  
+    return pixelLayerHitResidual(track,0);
+  }
 
   const Trk::ResidualPull* InDet::InDetTestBLayerTool::innermostPixelLayerHitResidual(const Trk::Track* track) const
   {
-    //    const Trk::ResidualPull* residualPull=0;
-    const DataVector<const Trk::TrackStateOnSurface>* trackStates=track->trackStateOnSurfaces();    
-    
-    for (DataVector<const Trk::TrackStateOnSurface>::const_iterator it=trackStates->begin();
-	 it!=trackStates->end();
-	 it++) {
-      if (!(*it)) {
-	msg(MSG::WARNING) << "TrackStateOnSurface == Null" << endmsg;
-	continue;
-      }
-
-      if ((*it)->type(Trk::TrackStateOnSurface::Measurement) ){
-
-	ATH_MSG_VERBOSE ("try to get measurement for track state");
-	// Get pointer to measurement on track
-	const Trk::MeasurementBase *measurement = (*it)->measurementOnTrack();
-
-
-	if(  (*it)->trackParameters() !=0 &&
-	     &((*it)->trackParameters()->associatedSurface()) !=0 &&  
-	     (*it)->trackParameters()->associatedSurface().associatedDetectorElement() !=0 && 
-	     (*it)->trackParameters()->associatedSurface().associatedDetectorElement()->identify() !=0 )
-	  {  
-
-	    Identifier id;
-	    id = (*it)->trackParameters()->associatedSurface().associatedDetectorElement()->identify();
-	    if (m_idHelper->is_pixel(id)) 
-	      {
-		ATH_MSG_DEBUG("Found pixel module : Associated track parameter");
-		if(m_pixelId->is_barrel(id)) 
-		{ 
-		    ATH_MSG_DEBUG("Found pixel barrel");
-		    if(m_pixelId->layer_disk(id) == 0) 
-		      {
-			if (msgLvl(MSG::DEBUG)) 
-			  {
-			    msg(MSG::DEBUG) << "Found Innermost Pixel Layer  " << id.get_compact() << endmsg;	    
-			  }
-			
-			return m_residualPullCalculator->residualPull(measurement,(*it)->trackParameters(),Trk::ResidualPull::Biased);
-			
-		      }
-		  }
-	      }
-	  }
-      }
-    }
-  
-    return 0;
-    
-  }  
+    return pixelLayerHitResidual(track,0);
+  }
 
   const Trk::ResidualPull* InDet::InDetTestBLayerTool::nextToInnermostPixelLayerHitResidual(const Trk::Track* track) const
   {
+    return pixelLayerHitResidual(track,1);
+  }
+
+  const Trk::ResidualPull* InDet::InDetTestBLayerTool::pixelLayerHitResidual(const Trk::Track* track, int layer) const
+  {
+    assert(layer>=0 && layer<=1);
+
     //    const Trk::ResidualPull* residualPull=0;
-    const DataVector<const Trk::TrackStateOnSurface>* trackStates=track->trackStateOnSurfaces();    
-    
+    const DataVector<const Trk::TrackStateOnSurface>* trackStates=track->trackStateOnSurfaces();
+
     for (DataVector<const Trk::TrackStateOnSurface>::const_iterator it=trackStates->begin();
 	 it!=trackStates->end();
 	 it++) {
       if (!(*it)) {
-	msg(MSG::WARNING) << "TrackStateOnSurface == Null" << endmsg;
+	ATH_MSG_WARNING("TrackStateOnSurface == Null");
 	continue;
       }
 
@@ -249,400 +205,162 @@ namespace InDet {
 
 
 	if(  (*it)->trackParameters() !=0 &&
-	     &((*it)->trackParameters()->associatedSurface()) !=0 &&  
-	     (*it)->trackParameters()->associatedSurface().associatedDetectorElement() !=0 && 
+             /*	     &((*it)->trackParameters()->associatedSurface()) !=0 && */
+	     (*it)->trackParameters()->associatedSurface().associatedDetectorElement() !=0 &&
 	     (*it)->trackParameters()->associatedSurface().associatedDetectorElement()->identify() !=0 )
-	  {  
+	  {
 
 	    Identifier id;
 	    id = (*it)->trackParameters()->associatedSurface().associatedDetectorElement()->identify();
-	    if (m_idHelper->is_pixel(id)) 
+	    if (m_idHelper->is_pixel(id))
 	      {
 		ATH_MSG_DEBUG("Found pixel module : Associated track parameter");
-		if(m_pixelId->is_barrel(id)) 
-		{ 
+		if(m_pixelId->is_barrel(id))
+		{
 		    ATH_MSG_DEBUG("Found pixel barrel");
-		    if(m_pixelId->layer_disk(id) == 1) 
+		    if(m_pixelId->layer_disk(id) == layer)
 		      {
-			if (msgLvl(MSG::DEBUG)) 
-			  {
-			    msg(MSG::DEBUG) << "Found Next To Innermost Pixel Layer  " << id.get_compact() << endmsg;	    
-			  }
-			
+                        ATH_MSG_DEBUG("Found " << s_layerNames[layer] << " " << id.get_compact() );
 			return m_residualPullCalculator->residualPull(measurement,(*it)->trackParameters(),Trk::ResidualPull::Biased);
-			
 		      }
 		  }
 	      }
 	  }
       }
     }
-  
-    return 0;
-    
-  }   
-
-  bool InDet::InDetTestBLayerTool::expectHitInBLayer(const Trk::Track* track, bool recompute) const 
-  {
-    if(!recompute){
-      const Trk::TrackSummary* ts =  track->trackSummary();
-      if(ts){
-	int ehbl = ts->get(Trk::expectBLayerHit); 
-	if(0==ehbl || 1==ehbl ){
-	  ATH_MSG_DEBUG("Found expectHitInBLayer info in TrackSummary: return cached value" );
-	  return ehbl;
-	}
-      }
-    }
-    else{
-      ATH_MSG_DEBUG("Forced to recompute expectHitInBLayer info" );
-    }
 
-    ATH_MSG_DEBUG("computing expectHitInBLayer info" );
+    return 0;
 
-    const Trk::Perigee* mp = track->perigeeParameters();
-    
-    if (!mp)
-      {
-	ATH_MSG_WARNING("Found Track with no perigee parameters: no b-layer info will be provided " );
-	return false;
-      } 
-    else 
-      {
-	ATH_MSG_DEBUG("Track perigee parameters");
-	return this->expectHitInBLayer(mp);
-      }
   }
 
-   bool InDet::InDetTestBLayerTool::expectHitInInnermostPixelLayer(const Trk::Track* track, bool recompute) const 
+  bool InDet::InDetTestBLayerTool::expectHitInBLayer(const Trk::Track* track, bool recompute) const
   {
-    if(!recompute){
-      const Trk::TrackSummary* ts =  track->trackSummary();
-      if(ts){
-	int ehbl = ts->get(Trk::expectInnermostPixelLayerHit); 
-	if(0==ehbl || 1==ehbl ){
-	  ATH_MSG_DEBUG("Found expectHitInInnermostPixelLayer info in TrackSummary: return cached value" );
-	  return ehbl;
-	}
-      }
-    }
-    else{
-      ATH_MSG_DEBUG("Forced to recompute expectHitInInnermostPixelLayer info" );
-    }
-
-    ATH_MSG_DEBUG("computing expectHitInInnermostPixelLayer info" );
-
-    const Trk::Perigee* mp = track->perigeeParameters();
-    
-    if (!mp)
-      {
-	ATH_MSG_WARNING("Found Track with no perigee parameters: no Innermost Pixel Layer info will be provided " );
-	return false;
-      } 
-    else 
-      {
-	ATH_MSG_DEBUG("Track perigee parameters");
-	return this->expectHitInInnermostPixelLayer(mp);
-      }
+    return expectHitInPixelLayer(track,0, recompute);
   }
 
+   bool InDet::InDetTestBLayerTool::expectHitInInnermostPixelLayer(const Trk::Track* track, bool recompute) const
+  {
+    return expectHitInPixelLayer(track,0, recompute);
+  }
 
-  bool InDet::InDetTestBLayerTool::expectHitInNextToInnermostPixelLayer(const Trk::Track* track, bool recompute) const 
+  bool InDet::InDetTestBLayerTool::expectHitInNextToInnermostPixelLayer(const Trk::Track* track, bool recompute) const
   {
+    return expectHitInPixelLayer(track,1, recompute);
+  }
+
+  bool InDet::InDetTestBLayerTool::expectHitInPixelLayer(const Trk::Track *track, int layer, bool recompute) const {
+    assert( layer>=0 && layer<=1);
     if(!recompute){
       const Trk::TrackSummary* ts =  track->trackSummary();
       if(ts){
-	int ehbl = ts->get(Trk::expectNextToInnermostPixelLayerHit); 
+	int ehbl = ts->get(s_layerSummaryTypeExpectHit[layer]);
 	if(0==ehbl || 1==ehbl ){
-	  ATH_MSG_DEBUG("Found expectHitInNextToInnermostPixelLayer info in TrackSummary: return cached value" );
+	  ATH_MSG_DEBUG("Found the expected hit in the " << s_layerNames[layer] << " info in TrackSummary: return cached value" );
 	  return ehbl;
 	}
       }
     }
     else{
-      ATH_MSG_DEBUG("Forced to recompute expectHitInNextToInnermostPixelLayer info" );
+      ATH_MSG_DEBUG("Forced to recompute whether a hit is expected in the " << s_layerNames[layer] << " or not." );
     }
 
-    ATH_MSG_DEBUG("computing expectHitInNextToInnermostPixelLayer info" );
+    ATH_MSG_DEBUG("Computing whether a hit is expected in the " << s_layerNames[layer] << " or not." );
 
     const Trk::Perigee* mp = track->perigeeParameters();
-    
+
     if (!mp)
       {
-	ATH_MSG_WARNING("Found Track with no perigee parameters: no Next To Innermost Pixel Layer info will be provided " );
+        ATH_MSG_WARNING("Found Track with no perigee parameters: no information whether a hit is expected in the " << s_layerNames[layer] << " will be provided." );
 	return false;
-      } 
-    else 
+      }
+    else
       {
 	ATH_MSG_DEBUG("Track perigee parameters");
-	return this->expectHitInNextToInnermostPixelLayer(mp);
+	return this->expectHitInPixelLayer(mp,layer);
       }
   }
 
 
-  
   bool InDet::InDetTestBLayerTool::expectHitInBLayer(const Trk::TrackParticleBase* track, bool recompute) const
   {
-    if(!recompute){
-      const Trk::TrackSummary* ts =  track->trackSummary();
-      if(ts){
-	int ehbl = ts->get(Trk::expectBLayerHit); 
-	if(0==ehbl || 1==ehbl ){
-	  ATH_MSG_DEBUG("Found expectHitInBLayer info in TrackSummary: return cached value" );
-	  return ehbl;
-	}
-      }
-    }
-    else{
-      ATH_MSG_DEBUG("Forced to recompute expectHitInBLayer info" );
-    }
-
-    ATH_MSG_DEBUG("computing expectHitInBLayer info" );
-
-    const Trk::Perigee* mp = track->perigee();
-
-    if(!mp)
-      {
-	ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no b-layer info will be provided");
-	return false;
-      } 
-    else
-      {
-	ATH_MSG_DEBUG("TrackParticle perigee parameters");
-	//	  mp->dump(mLog);
-	return (this->expectHitInBLayer(mp));
-      }
+    return expectHitInPixelLayer(track,0,recompute);
   }
 
   bool InDet::InDetTestBLayerTool::expectHitInInnermostPixelLayer(const Trk::TrackParticleBase* track, bool recompute) const
   {
-    
-    if(!recompute){
-      const Trk::TrackSummary* ts =  track->trackSummary();
-      if(ts){
-	int ehbl = ts->get(Trk::expectInnermostPixelLayerHit); 
-	if(0==ehbl || 1==ehbl ){
-	  ATH_MSG_DEBUG("Found expectHitInInnerMostPixelLayer info in TrackSummary: return cached value" );
-	  return ehbl;
-	}
-      }
-    }
-    else{
-      ATH_MSG_DEBUG("Forced to recompute expectHitInInnermostPixelLayer info" );
-    }
-    
-    ATH_MSG_DEBUG("computing expectHitInInnermostPxielLayer info" );
-    
-    const Trk::Perigee* mp = track->perigee();
-    
-    if(!mp)
-      {
-	ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no Innermost Pixel info will be provided");
-	return false;
-      } 
-    else
-      {
-	ATH_MSG_DEBUG("TrackParticle perigee parameters");
-	//	  mp->dump(mLog);
-	return (this->expectHitInInnermostPixelLayer(mp));
-      }
+    return expectHitInPixelLayer(track,0,recompute);
   }
 
 
    bool InDet::InDetTestBLayerTool::expectHitInNextToInnermostPixelLayer(const Trk::TrackParticleBase* track, bool recompute) const
   {
-    
+    return expectHitInPixelLayer(track,1,recompute);
+  }
+
+  bool InDet::InDetTestBLayerTool::expectHitInPixelLayer(const Trk::TrackParticleBase *track, int layer, bool recompute) const {
+    assert( layer>=0 && layer<=1);
     if(!recompute){
       const Trk::TrackSummary* ts =  track->trackSummary();
       if(ts){
-	int ehbl = ts->get(Trk::expectNextToInnermostPixelLayerHit); 
+	int ehbl = ts->get(s_layerSummaryTypeExpectHit[layer]);
 	if(0==ehbl || 1==ehbl ){
-	  ATH_MSG_DEBUG("Found expectHitInNextToInnermostPxielLayer info in TrackSummary: return cached value" );
+	  ATH_MSG_DEBUG("Found the expected hit in the " << s_layerNames[layer] << " info in TrackSummary: return cached value" );
 	  return ehbl;
 	}
       }
     }
     else{
-      ATH_MSG_DEBUG("Forced to recompute expectHitInNextToInnermostLayer info" );
+      ATH_MSG_DEBUG("Forced to recompute whether a hit is expected in the " << s_layerNames[layer] << " or not." );
     }
-    
-    ATH_MSG_DEBUG("computing expectHitInNexttoInnermostPixelLayer info" );
-    
+
+    ATH_MSG_DEBUG("Computing whether a hit is expected in the " << s_layerNames[layer] << " or not." );
+
     const Trk::Perigee* mp = track->perigee();
-    
+
     if(!mp)
       {
-	ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no NextToInnermost info will be provided");
+        ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no information whether a hit is expected in the " << s_layerNames[layer] << " will be provided." );
 	return false;
-      } 
+      }
     else
       {
 	ATH_MSG_DEBUG("TrackParticle perigee parameters");
 	//	  mp->dump(mLog);
-	return (this->expectHitInNextToInnermostPixelLayer(mp));
-      }
-  }
-  
-
-
-  bool InDet::InDetTestBLayerTool::expectHitInBLayer(const Trk::TrackParameters* trackpar) const
-  {
-    if(!m_configured){
-      ATH_MSG_WARNING("Unconfigured tool, unable to compute expectHitInBLayer");
-      return false;
-    }
-
-
-    bool expect_hit = false; /// will be set to true if at least on good module is passed
-
-    //// Cylinder bigger than the b-layer ////
-    
-
-    std::vector<const Trk::TrackParameters*> blayerParam;
-    if(!this->getPixelLayerParameters(trackpar, blayerParam, 0)) return false;	
-
-    std::vector<const Trk::TrackParameters*>::const_iterator it = blayerParam.begin();
-
-    for(; it !=blayerParam.end(); ++it){
-
-      Identifier id = (*it)->associatedSurface().associatedDetectorElement()->identify();
-
-      if( m_pixelCondSummarySvc->isGood(id,InDetConditions::PIXEL_MODULE) ){
-
-	if( m_checkActiveAreas ){
-
-	  if( isActive(*it) ){
-
-	    if(m_checkDeadRegions){
-
-	      double fracGood = getFracGood(*it, m_phiRegionSize, m_etaRegionSize);
-	      if(fracGood>m_goodFracCut){
-		ATH_MSG_DEBUG("Condition Summary: b-layer good");
-		expect_hit=true;  /// pass good module -> hit is expected on blayer
-	      }
-	      else{
-		ATH_MSG_DEBUG("b-layer in dead region");
-	      }
-
-	    }
-	    else{ /// check dead regios
-	      ATH_MSG_DEBUG("Condition Summary: b-layer good");
-	      expect_hit=true;  /// pass good module -> hit is expected on blayer
-	    }
-
-	  }
-	  else{
-	    ATH_MSG_DEBUG("Condition Summary: b-layer good but outside active area");
-	  }
-
-	} /// check active area (check edges)
-	else{
-	  ATH_MSG_DEBUG("Condition Summary: b-layer good, active areas not checked");
-	  expect_hit=true; /// pass good module -> hit is expected on blayer
-	}
-
-      }
-      else{
-	ATH_MSG_DEBUG("b-layer not good");
-      }
-
-      delete *it;
-
-    } /// blayer param
-
-
-    return expect_hit;
-    
-  }
-
-  bool InDet::InDetTestBLayerTool::expectHitInInnermostPixelLayer(const Trk::TrackParameters* trackpar) const
-  {
-    
-    if(!m_configured){
-      ATH_MSG_WARNING("Unconfigured tool, unable to compute expectHitInInnermostPixelLayer");
-      return false;
-    }
-
-
-    bool expect_hit = false; /// will be set to true if at least on good module is passed
-
-    //// Cylinder bigger than the b-layer ////
-    
-
-    std::vector<const Trk::TrackParameters*> blayerParam;
-    if(!this->getPixelLayerParameters(trackpar, blayerParam,0)) return false;	
-
-    std::vector<const Trk::TrackParameters*>::const_iterator it = blayerParam.begin();
-
-    for(; it !=blayerParam.end(); ++it){
-
-      Identifier id = (*it)->associatedSurface().associatedDetectorElement()->identify();
-
-      if( m_pixelCondSummarySvc->isGood(id,InDetConditions::PIXEL_MODULE) ){
-
-	if( m_checkActiveAreas ){
-
-	  if( isActive(*it) ){
-
-	    if(m_checkDeadRegions){
-
-	      double fracGood = getFracGood(*it, m_phiRegionSize, m_etaRegionSize);
-	      if(fracGood>m_goodFracCut){
-		ATH_MSG_DEBUG("Condition Summary: Innermost Layer good");
-		expect_hit=true;  /// pass good module -> hit is expected on blayer
-	      }
-	      else{
-		ATH_MSG_DEBUG("b-layer in dead region");
-	      }
-
-	    }
-	    else{ /// check dead regios
-	      ATH_MSG_DEBUG("Condition Summary: Innermost Layer good");
-	      expect_hit=true;  /// pass good module -> hit is expected on blayer
-	    }
-
-	  }
-	  else{
-	    ATH_MSG_DEBUG("Condition Summary: Innermost Layer good but outside active area");
-	  }
-
-	} /// check active area (check edges)
-	else{
-	  ATH_MSG_DEBUG("Condition Summary: Innermost Layer good, active areas not checked");
-	  expect_hit=true; /// pass good module -> hit is expected on blayer
-	}
-
-      }
-      else{
-	ATH_MSG_DEBUG("Innermost Layer not good");
+	return (this->expectHitInPixelLayer(mp,layer));
       }
+  }
 
-      delete *it;
-
-    } /// blayer param
 
+  bool InDet::InDetTestBLayerTool::expectHitInBLayer(const Trk::TrackParameters* trackpar) const
+  {
+    return expectHitInPixelLayer(trackpar, 0);
+  }
 
-    return expect_hit;
-    
+  bool InDet::InDetTestBLayerTool::expectHitInInnermostPixelLayer(const Trk::TrackParameters* trackpar) const
+  {
+    return expectHitInPixelLayer(trackpar, 0);
   }
-		    
 
   bool InDet::InDetTestBLayerTool::expectHitInNextToInnermostPixelLayer(const Trk::TrackParameters* trackpar) const
   {
-    
+    return expectHitInPixelLayer(trackpar, 1);
+  }
+
+  bool InDet::InDetTestBLayerTool::expectHitInPixelLayer(const Trk::TrackParameters* trackpar,int layer) const
+  {
+    assert( layer >=0 && layer<=1);
+    const char *layer_name=s_layerNames[layer];
+
     if(!m_configured){
-      ATH_MSG_WARNING("Unconfigured tool, unable to compute expectHitInNextToInnermostPixelLayer");
+      ATH_MSG_WARNING("Unconfigured tool, unable to compute expected hit in the " << layer_name << ".");
       return false;
     }
 
-
     bool expect_hit = false; /// will be set to true if at least on good module is passed
 
-    //// Cylinder bigger than the b-layer ////
-    
-
+    //// Cylinder bigger than the given layer ? ////
     std::vector<const Trk::TrackParameters*> blayerParam;
-    if(!this->getPixelLayerParameters(trackpar, blayerParam,1)) return false;	
+    if(!this->getPixelLayerParameters(trackpar, blayerParam,layer)) return false;
 
     std::vector<const Trk::TrackParameters*>::const_iterator it = blayerParam.begin();
 
@@ -660,33 +378,33 @@ namespace InDet {
 
 	      double fracGood = getFracGood(*it, m_phiRegionSize, m_etaRegionSize);
 	      if(fracGood>m_goodFracCut){
-		ATH_MSG_DEBUG("Condition Summary: NExt To Innermost Layer good");
+		ATH_MSG_DEBUG("Condition Summary: " << layer_name << " good");
 		expect_hit=true;  /// pass good module -> hit is expected on blayer
 	      }
 	      else{
-		ATH_MSG_DEBUG("b-layer in dead region");
+		ATH_MSG_DEBUG( layer_name << " in dead region");
 	      }
 
 	    }
 	    else{ /// check dead regios
-	      ATH_MSG_DEBUG("Condition Summary: Next To Innermost Layer good");
+	      ATH_MSG_DEBUG("Condition Summary: " << layer_name << " good");
 	      expect_hit=true;  /// pass good module -> hit is expected on blayer
 	    }
 
 	  }
 	  else{
-	    ATH_MSG_DEBUG("Condition Summary: Next To Innermost Layer good but outside active area");
+	    ATH_MSG_DEBUG("Condition Summary: " << layer_name << " good but outside active area");
 	  }
 
 	} /// check active area (check edges)
 	else{
-	  ATH_MSG_DEBUG("Condition Summary: Next To Innermost Layer good, active areas not checked");
+	  ATH_MSG_DEBUG("Condition Summary: " << layer_name << " good, active areas not checked");
 	  expect_hit=true; /// pass good module -> hit is expected on blayer
 	}
 
       }
       else{
-	ATH_MSG_DEBUG(" Next To Innermost Layer not good");
+	ATH_MSG_DEBUG( layer_name << " not good");
       }
 
       delete *it;
@@ -695,7 +413,7 @@ namespace InDet {
 
 
     return expect_hit;
-    
+
   }
 
 
@@ -708,7 +426,7 @@ namespace InDet {
     if (siElement == 0 ) {
       // -------  in dubio pro reo --> return false (is assumed insensitive)
       ATH_MSG_DEBUG("TrackParameters do not belong to a Si Element" );
-      /// checking active material 
+      /// checking active material
      } else {
        double phitol = 2.5;
        double etatol = 5.;
@@ -717,82 +435,40 @@ namespace InDet {
        etatol = 3.* sqrt((*trackpar->covariance())(Trk::locY,Trk::locY));
 
        InDetDD::SiIntersect siIn = siElement->inDetector(trackpar->localPosition(), phitol, etatol);
-       if( siElement->nearBondGap(trackpar->localPosition(), etatol) ) { 
-	 if (msgLvl(MSG::DEBUG)) 
-	   {
-	     msg(MSG::DEBUG) << "---> extrapolation on bond gap within " << etatol << ", return" << endmsg;
-	   }
+       if( siElement->nearBondGap(trackpar->localPosition(), etatol) ) {
+         ATH_MSG_DEBUG( "---> extrapolation on bond gap within " << etatol << ", return" );
        } else if (!siIn.in()) {
-	 if (msgLvl(MSG::DEBUG)) 
-	   { 
-	     msg(MSG::DEBUG) << "---> extrapolation not inside (active?) detector within "<< phitol << " " << 
-				   etatol << ", return" << endmsg;
-	   }
+         ATH_MSG_DEBUG( "---> extrapolation not inside (active?) detector within "<< phitol << " " << etatol << ", return" );
        } else {
 	 return true;
        }
      }
-    
+
     return false;
 
   }
 
+  bool InDet::InDetTestBLayerTool::getTrackStateOnBlayerInfo(const Trk::Track* track, std::vector<TrackStateOnBLayerInfo>& infoList)  const {
+    return getTrackStateOnPixelLayerInfo(track,infoList,0);
+  }
 
 
-  bool InDet::InDetTestBLayerTool::getTrackStateOnBlayerInfo(const Trk::Track* track, std::vector<TrackStateOnBLayerInfo>& infoList)  const{
-  
-    const Trk::TrackParameters* startParameters = 0;
-  
-    if (track->perigeeParameters()){
-      startParameters = track->perigeeParameters()->clone();
-    }
-    else if (track->trackParameters()->front()) {
-      startParameters = m_extrapolator->extrapolate(*(track->trackParameters()->front()),
-						    Trk::PerigeeSurface(),
-						    Trk::anyDirection,
-						    false);
-    }
-  
-    if(!startParameters){
-      ATH_MSG_WARNING("Found Track with no perigee parameters: no b-layer info will be provided" );
-      return false;
-    }
-
-     bool succeed = getTrackStateOnBlayerInfo(startParameters, infoList);
-     delete startParameters;
-     return succeed;
+  bool InDet::InDetTestBLayerTool::getTrackStateOnInnermostPixelLayerInfo(const Trk::Track* track, std::vector<TrackStateOnBLayerInfo>& infoList)  const {
+     return getTrackStateOnPixelLayerInfo(track,infoList,0);
   }
 
 
-   bool InDet::InDetTestBLayerTool::getTrackStateOnInnermostPixelLayerInfo(const Trk::Track* track, std::vector<TrackStateOnBLayerInfo>& infoList)  const{
-   
-    const Trk::TrackParameters* startParameters = 0;
-  
-    if (track->perigeeParameters()){
-      startParameters = track->perigeeParameters()->clone();
-    }
-    else if (track->trackParameters()->front()) {
-      startParameters = m_extrapolator->extrapolate(*(track->trackParameters()->front()),
-						    Trk::PerigeeSurface(),
-						    Trk::anyDirection,
-						    false);
-    }
-  
-    if(!startParameters){
-      ATH_MSG_WARNING("Found Track with no perigee parameters: no Innermost Pixel layer info will be provided" );
-      return false;
-    }
-
-    bool succeed = getTrackStateOnInnermostPixelLayerInfo(startParameters, infoList);
-     delete startParameters;
-     return succeed;
+  bool InDet::InDetTestBLayerTool::getTrackStateOnNextToInnermostPixelLayerInfo(const Trk::Track* track, std::vector<TrackStateOnBLayerInfo>& infoList)  const {
+     return getTrackStateOnPixelLayerInfo(track,infoList,1);
   }
 
 
-   bool InDet::InDetTestBLayerTool::getTrackStateOnNextToInnermostPixelLayerInfo(const Trk::Track* track, std::vector<TrackStateOnBLayerInfo>& infoList)  const{
-   
+  bool InDet::InDetTestBLayerTool::getTrackStateOnPixelLayerInfo(const Trk::Track* track, std::vector<TrackStateOnBLayerInfo>& infoList, int layer)  const
+  {
+    assert( layer>=0 && layer<=1);
+
     const Trk::TrackParameters* startParameters = 0;
-  
+
     if (track->perigeeParameters()){
       startParameters = track->perigeeParameters()->clone();
     }
@@ -802,300 +478,92 @@ namespace InDet {
 						    Trk::anyDirection,
 						    false);
     }
-  
+
     if(!startParameters){
-      ATH_MSG_WARNING("Found Track with no perigee parameters: no Next to Innermost Pixel layer info will be provided" );
+      ATH_MSG_WARNING("Found Track with no perigee parameters: no " << s_layerNames[layer] << " info will be provided" );
       return false;
     }
 
-    bool succeed = getTrackStateOnNextToInnermostPixelLayerInfo(startParameters, infoList);
+    bool succeed = getTrackStateOnPixelLayerInfo(startParameters, infoList,layer);
      delete startParameters;
      return succeed;
   }
 
 
-  bool InDet::InDetTestBLayerTool::getTrackStateOnBlayerInfo(const Trk::TrackParticleBase* track, std::vector<TrackStateOnBLayerInfo>& infoList)  const{
-  
-   const Trk::Perigee* startParameters = track->perigee();
-
-    if(!startParameters){
-      ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no b-layer info will be provided");
-      return false;
-    } 
- 
-    return getTrackStateOnBlayerInfo(startParameters, infoList);
-    
+  bool InDet::InDetTestBLayerTool::getTrackStateOnBlayerInfo(const Trk::TrackParticleBase* trackparticle,
+                                                             std::vector<TrackStateOnBLayerInfo>& infoList)  const {
+    return getTrackStateOnPixelLayerInfo(trackparticle, infoList,0);
   }
 
-  bool InDet::InDetTestBLayerTool::getTrackStateOnInnermostPixelLayerInfo(const Trk::TrackParticleBase* track, std::vector<TrackStateOnBLayerInfo>& infoList)  const{
-    
-   const Trk::Perigee* startParameters = track->perigee();
-
-    if(!startParameters){
-      ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no Innermost Pixel layer info will be provided");
-      return false;
-    } 
- 
-    return getTrackStateOnInnermostPixelLayerInfo(startParameters, infoList);
-    
+  bool InDet::InDetTestBLayerTool::getTrackStateOnInnermostPixelLayerInfo(const Trk::TrackParticleBase* trackparticle,
+                                                                          std::vector<TrackStateOnBLayerInfo>& infoList)  const {
+    return getTrackStateOnPixelLayerInfo(trackparticle, infoList,0);
   }
 
 
-   bool InDet::InDetTestBLayerTool::getTrackStateOnNextToInnermostPixelLayerInfo(const Trk::TrackParticleBase* track, std::vector<TrackStateOnBLayerInfo>& infoList)  const{
-    
-   const Trk::Perigee* startParameters = track->perigee();
-
-    if(!startParameters){
-      ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no Next To Innermost Pixel layer info will be provided");
-      return false;
-    } 
- 
-    return getTrackStateOnNextToInnermostPixelLayerInfo(startParameters, infoList);
-    
+  bool InDet::InDetTestBLayerTool::getTrackStateOnNextToInnermostPixelLayerInfo(const Trk::TrackParticleBase* trackparticle,
+                                                                                std::vector<TrackStateOnBLayerInfo>& infoList) const {
+    return getTrackStateOnPixelLayerInfo(trackparticle, infoList,1);
   }
 
 
+  bool InDet::InDetTestBLayerTool::getTrackStateOnPixelLayerInfo(const Trk::TrackParticleBase* track,
+                                                                 std::vector<TrackStateOnBLayerInfo>& infoList,
+                                                                 int layer) const
+  {
+    assert( layer>=0 && layer<=1);
 
-  bool InDet::InDetTestBLayerTool::getTrackStateOnBlayerInfo(const Trk::TrackParameters* trackpar, std::vector<TrackStateOnBLayerInfo>& infoList)  const{
- 
-    infoList.clear();
-
+    const Trk::Perigee* startParameters = track->perigee();
 
-    if(!m_configured){
-      ATH_MSG_WARNING("Unconfigured tool, unable to compute BLayer info");
+    if(!startParameters){
+      ATH_MSG_WARNING("Found TrackParticle with no perigee parameters: no " << s_layerNames[layer] << " info will be provided");
       return false;
     }
 
-    std::vector<const Trk::TrackParameters*> blayerParam;
-    if(!getPixelLayerParameters(trackpar, blayerParam, 0)) return false;
-
-    std::vector<const Trk::TrackParameters*>::const_iterator it = blayerParam.begin();
-    for(; it !=blayerParam.end(); ++it){
-
-      const Trk::TrackParameters* trkParam = *it;           
-      TrackStateOnBLayerInfo blayerInfo;
-        
-      double fracGood = getFracGood(trkParam, m_phiRegionSize, m_etaRegionSize);
-      blayerInfo.goodFraction(fracGood);
-
-      Identifier id = trkParam->associatedSurface().associatedDetectorElement()->identify();
-      blayerInfo.moduleId(id);
-
-      const InDetDD::SiDetectorElement* sielem = dynamic_cast<const InDetDD::SiDetectorElement*>(trkParam->associatedSurface().associatedDetectorElement());
-//     const Trk::Surface *aS = trkParam->associatedSurface();
-//     const Trk::LocalPosition locPos = *(aS->globalToLocal(trkParam->position()));
-      const Amg::Vector2D& locPos = trkParam->localPosition();
-
-      if(sielem){
-	Identifier holeId_c =sielem->identifierOfPosition(locPos);
-	blayerInfo.pixelId(holeId_c);
-
-	double etaDist = -9999;
-	double phiDist = -9999;
-	const InDetDD::PixelModuleDesign* design = dynamic_cast<const InDetDD::PixelModuleDesign*>(&sielem->design());
-	if(design){
-	  design->distanceToDetectorEdge(locPos, etaDist, phiDist); //// implicite cast from Trk::LocalPosition to SiLocalPosition
-	}
-	else{
-	  ATH_MSG_WARNING (  "could not get pixel module design for  " <<   m_idHelper->show_to_string(id)  );
-	}
-	blayerInfo.distToModuleEdgePhi(phiDist);
-	blayerInfo.distToModuleEdgeEta(etaDist);
-      }
-      else{
-	ATH_MSG_WARNING ( " SiDetectorElement not found in TrackParameters" );
-      }
-
-      blayerInfo.globalPosition(trkParam->position());
-
-
-      blayerInfo.localX(locPos[Trk::locX]);
-      blayerInfo.localY(locPos[Trk::locY]);
-
-      blayerInfo.theta(trkParam->parameters()[Trk::theta]); 
-      blayerInfo.phi(trkParam->parameters()[Trk::phi0]); 
-
-      float error_locx = -9999;
-      float error_locy = -9999;
-
-      if(trkParam){
-        error_locx = sqrt((*trkParam->covariance())(Trk::locX,Trk::locX));
-        error_locy = sqrt((*trkParam->covariance())(Trk::locY,Trk::locY));
-      }
-      else{
-	ATH_MSG_DEBUG ( "could not MeasuredTrackParameters for hole  " <<   m_idHelper->show_to_string(id)  );
-      }
-
-      blayerInfo.errLocalX(error_locx);
-      blayerInfo.errLocalY(error_locy);
-
-      bool isgood =  m_pixelCondSummarySvc->isGood(id,InDetConditions::PIXEL_MODULE);
-    
-      double phitol = 2.5;
-      double etatol = 5.;
-      if (trkParam) {
-	phitol = 3.* sqrt((*trkParam->covariance())(Trk::locX,Trk::locX));			  
-	etatol = 3.* sqrt((*trkParam->covariance())(Trk::locY,Trk::locY));
-      }
-
-      bool isIn=true;
-      if(sielem){
-	InDetDD::SiIntersect siIn = sielem->inDetector(locPos, phitol, etatol);
-	isIn = siIn.in();
-      }
-
-      if(isgood){
-	if(isIn)blayerInfo.type(insideGoodModule);
-	else blayerInfo.type(nearGoodModuleEdge);
-      }
-      else{
-	if(isIn)blayerInfo.type(insideBadModule);
-	else blayerInfo.type(nearBadModuleEdge);
-      }
-
-      infoList.push_back(blayerInfo);
-
-      delete trkParam;
-
-    } /// blayer param
-
-    return true;
+    return getTrackStateOnPixelLayerInfo(startParameters, infoList, layer);
 
   }
 
-  bool InDet::InDetTestBLayerTool::getTrackStateOnInnermostPixelLayerInfo(const Trk::TrackParameters* trackpar, std::vector<TrackStateOnBLayerInfo>& infoList)  const{
-   
-    infoList.clear();
-
-
-    if(!m_configured){
-      ATH_MSG_WARNING("Unconfigured tool, unable to compute Innermost Pixel Layer info");
-      return false;
-    }
-
-    std::vector<const Trk::TrackParameters*> blayerParam;
-    if(!getPixelLayerParameters(trackpar, blayerParam, 0)) return false;
-
-    std::vector<const Trk::TrackParameters*>::const_iterator it = blayerParam.begin();
-    for(; it !=blayerParam.end(); ++it){
-
-      const Trk::TrackParameters* trkParam = *it;           
-      TrackStateOnBLayerInfo blayerInfo;
-        
-      double fracGood = getFracGood(trkParam, m_phiRegionSize, m_etaRegionSize);
-      blayerInfo.goodFraction(fracGood);
-
-      Identifier id;
-
-      if(trkParam){
-	id = trkParam->associatedSurface().associatedDetectorElement()->identify();
-	blayerInfo.moduleId(id);
-      }
-      else{
-	ATH_MSG_WARNING("Invalid TrackParameters - could not get Identifier");
-	return false;
-      } 
-      
-      const InDetDD::SiDetectorElement* sielem = dynamic_cast<const InDetDD::SiDetectorElement*>(trkParam->associatedSurface().associatedDetectorElement());
-
-      const Amg::Vector2D& locPos = trkParam->localPosition();
-
-      if(sielem){
-	Identifier holeId_c =sielem->identifierOfPosition(locPos);
-	blayerInfo.pixelId(holeId_c);
-
-	double etaDist = -9999;
-	double phiDist = -9999;
-	const InDetDD::PixelModuleDesign* design = dynamic_cast<const InDetDD::PixelModuleDesign*>(&sielem->design());
-	if(design){
-	  design->distanceToDetectorEdge(locPos, etaDist, phiDist); //// implicite cast from Trk::LocalPosition to SiLocalPosition
-	}
-	else{
-	  ATH_MSG_WARNING (  "could not get pixel module design for  " <<   m_idHelper->show_to_string(id)  );
-	}
-	blayerInfo.distToModuleEdgePhi(phiDist);
-	blayerInfo.distToModuleEdgeEta(etaDist);
-      }
-      else{
-	ATH_MSG_WARNING ( " SiDetectorElement not found in TrackParameters" );
-      }
-
-      blayerInfo.globalPosition(trkParam->position());
-
-
-      blayerInfo.localX(locPos[Trk::locX]);
-      blayerInfo.localY(locPos[Trk::locY]);
-
-      blayerInfo.theta(trkParam->parameters()[Trk::theta]); 
-      blayerInfo.phi(trkParam->parameters()[Trk::phi0]); 
-
-      float error_locx = -9999;
-      float error_locy = -9999;
-
-      error_locx = sqrt((*trkParam->covariance())(Trk::locX,Trk::locX));
-      error_locy = sqrt((*trkParam->covariance())(Trk::locY,Trk::locY));
-     
-
-      blayerInfo.errLocalX(error_locx);
-      blayerInfo.errLocalY(error_locy);
-
-      bool isgood =  m_pixelCondSummarySvc->isGood(id,InDetConditions::PIXEL_MODULE);
-    
-      double phitol = 2.5;
-      double etatol = 5.;
-      if (trkParam) {
-	phitol = 3.* sqrt((*trkParam->covariance())(Trk::locX,Trk::locX));			  
-	etatol = 3.* sqrt((*trkParam->covariance())(Trk::locY,Trk::locY));
-      }
-
-      bool isIn=true;
-      if(sielem){
-	InDetDD::SiIntersect siIn = sielem->inDetector(locPos, phitol, etatol);
-	isIn = siIn.in();
-      }
-
-      if(isgood){
-	if(isIn)blayerInfo.type(insideGoodModule);
-	else blayerInfo.type(nearGoodModuleEdge);
-      }
-      else{
-	if(isIn)blayerInfo.type(insideBadModule);
-	else blayerInfo.type(nearBadModuleEdge);
-      }
-
-      infoList.push_back(blayerInfo);
 
-      delete trkParam;
 
-    } /// blayer param
+  bool InDet::InDetTestBLayerTool::getTrackStateOnBlayerInfo(const Trk::TrackParameters* trackpar, std::vector<TrackStateOnBLayerInfo>& infoList)  const {
+    return getTrackStateOnPixelLayerInfo(trackpar,infoList,0);
+  }
 
-    return true;
+  bool InDet::InDetTestBLayerTool::getTrackStateOnInnermostPixelLayerInfo(const Trk::TrackParameters* trackpar, std::vector<TrackStateOnBLayerInfo>& infoList)  const {
+    return getTrackStateOnPixelLayerInfo(trackpar,infoList,0);
+  }
 
+  bool InDet::InDetTestBLayerTool::getTrackStateOnNextToInnermostPixelLayerInfo(const Trk::TrackParameters* trackpar, std::vector<TrackStateOnBLayerInfo>& infoList)  const {
+    return getTrackStateOnPixelLayerInfo(trackpar,infoList,1);
   }
 
-  bool InDet::InDetTestBLayerTool::getTrackStateOnNextToInnermostPixelLayerInfo(const Trk::TrackParameters* trackpar, std::vector<TrackStateOnBLayerInfo>& infoList)  const{
-   
-    infoList.clear();
+  bool InDet::InDetTestBLayerTool::getTrackStateOnPixelLayerInfo(const Trk::TrackParameters* trackpar,
+                                                                 std::vector<TrackStateOnBLayerInfo>& infoList,
+                                                                 int layer)  const
+  {
+    assert( layer>=0 && layer<=1);
 
+    infoList.clear();
 
     if(!m_configured){
-      ATH_MSG_WARNING("Unconfigured tool, unable to compute Next To Innermost Pixel Layer info");
+      ATH_MSG_WARNING("Unconfigured tool, unable to compute " << s_layerNames[layer] << " info");
       return false;
     }
 
     std::vector<const Trk::TrackParameters*> blayerParam;
-    if(!getPixelLayerParameters(trackpar, blayerParam, 1)) return false;
+    if(!getPixelLayerParameters(trackpar, blayerParam, layer)) return false;
 
     std::vector<const Trk::TrackParameters*>::const_iterator it = blayerParam.begin();
     for(; it !=blayerParam.end(); ++it){
 
-      const Trk::TrackParameters* trkParam = *it;           
+      const Trk::TrackParameters* trkParam = *it;
       TrackStateOnBLayerInfo blayerInfo;
-        
+
       double fracGood = getFracGood(trkParam, m_phiRegionSize, m_etaRegionSize);
       blayerInfo.goodFraction(fracGood);
 
-      Identifier id; 
+      Identifier id;
 
       if(trkParam){
 	id = trkParam->associatedSurface().associatedDetectorElement()->identify();
@@ -1107,8 +575,6 @@ namespace InDet {
       }
 
       const InDetDD::SiDetectorElement* sielem = dynamic_cast<const InDetDD::SiDetectorElement*>(trkParam->associatedSurface().associatedDetectorElement());
-//     const Trk::Surface *aS = trkParam->associatedSurface();
-//     const Trk::LocalPosition locPos = *(aS->globalToLocal(trkParam->position()));
       const Amg::Vector2D& locPos = trkParam->localPosition();
 
       if(sielem){
@@ -1137,25 +603,25 @@ namespace InDet {
       blayerInfo.localX(locPos[Trk::locX]);
       blayerInfo.localY(locPos[Trk::locY]);
 
-      blayerInfo.theta(trkParam->parameters()[Trk::theta]); 
-      blayerInfo.phi(trkParam->parameters()[Trk::phi0]); 
+      blayerInfo.theta(trkParam->parameters()[Trk::theta]);
+      blayerInfo.phi(trkParam->parameters()[Trk::phi0]);
 
       float error_locx = -9999;
       float error_locy = -9999;
 
       error_locx = sqrt((*trkParam->covariance())(Trk::locX,Trk::locX));
       error_locy = sqrt((*trkParam->covariance())(Trk::locY,Trk::locY));
-	
+
 
       blayerInfo.errLocalX(error_locx);
       blayerInfo.errLocalY(error_locy);
 
       bool isgood =  m_pixelCondSummarySvc->isGood(id,InDetConditions::PIXEL_MODULE);
-    
+
       double phitol = 2.5;
       double etatol = 5.;
       if (trkParam) {
-	phitol = 3.* sqrt((*trkParam->covariance())(Trk::locX,Trk::locX));			  
+	phitol = 3.* sqrt((*trkParam->covariance())(Trk::locX,Trk::locX));
 	etatol = 3.* sqrt((*trkParam->covariance())(Trk::locY,Trk::locY));
       }
 
@@ -1182,14 +648,14 @@ namespace InDet {
 
     return true;
 
-  } 
- 
+  }
+
   bool InDet::InDetTestBLayerTool::getPixelLayerParameters(const Trk::TrackParameters* trackpar, std::vector<const Trk::TrackParameters*>& blayerParam, int layer) const{
 
     //// Cylinder bigger than the b-layer ////
     ATH_MSG_DEBUG("Trying to extrapolate to Pixel layer " << layer);
 
-    Trk::CylinderSurface BiggerThanBLayerSurface (new Transform3D(Transform3D::Identity()), 
+    Trk::CylinderSurface BiggerThanBLayerSurface (new Transform3D(Transform3D::Identity()),
 						  100.0,
 						  10000.0);
 
@@ -1212,15 +678,15 @@ namespace InDet {
    ATH_MSG_DEBUG(" Number of generated parameters by propagator: " << paramList->size() );
 
 
-   int s_int = 0; 
+   int s_int = 0;
    for (std::vector<const Trk::TrackParameters*>::const_iterator it = paramList->begin();
 	it != paramList->end(); ++it){
 
      ATH_MSG_DEBUG( s_int++ << "th surface : ");
 
      Identifier id;
-     if( !( (*it)->associatedSurface().associatedDetectorElement() !=0 && 
-	 (*it)->associatedSurface().associatedDetectorElement()->identify() !=0 ) ){  
+     if( !( (*it)->associatedSurface().associatedDetectorElement() !=0 &&
+	 (*it)->associatedSurface().associatedDetectorElement()->identify() !=0 ) ){
        delete *it;
        continue;
      }
@@ -1253,19 +719,19 @@ namespace InDet {
   }
 
 
-  double InDet::InDetTestBLayerTool::getFracGood(const Trk::TrackParameters* trkParam, 
+  double InDet::InDetTestBLayerTool::getFracGood(const Trk::TrackParameters* trkParam,
 						 double phiRegionSize, double etaRegionSize) const{
 
     Identifier moduleid;
 
-    if(trkParam){ 
+    if(trkParam){
       moduleid = trkParam->associatedSurface().associatedDetectorElement()->identify();
     }
     else {
       ATH_MSG_WARNING (  "Invalid TrackParameters - could not get Identifier"  );
       return 0;
     }
-    
+
     IdentifierHash id_hash = m_pixelId->wafer_hash(moduleid);
 
     if( !m_pixelCondSummarySvc->isGood(id_hash) ){
@@ -1281,19 +747,19 @@ namespace InDet {
 
     error_locx = sqrt((*trkParam->covariance())(Trk::locX,Trk::locX));
     error_locy = sqrt((*trkParam->covariance())(Trk::locY,Trk::locY));
-        
+
     double phitol = 2.5;
     double etatol = 5.;
-   
-    phitol = phiRegionSize*error_locx; 		  
+
+    phitol = phiRegionSize*error_locx;
     etatol = etaRegionSize*error_locy;
 
-    const InDetDD::SiDetectorElement* sielem = 
+    const InDetDD::SiDetectorElement* sielem =
       dynamic_cast<const InDetDD::SiDetectorElement*>(trkParam->associatedSurface().associatedDetectorElement());
 
     if(sielem){
       const InDetDD::PixelModuleDesign* design = dynamic_cast<const InDetDD::PixelModuleDesign*>(&sielem->design());
-      
+
       if (m_checkAtLeastNearestNeighbors){
 	if(design){
 	  phitol = std::max(phitol, design->phiPitch()+1e-6);
@@ -1312,15 +778,15 @@ namespace InDet {
       double endLocY = locy + etatol;
 
       Amg::Vector2D startLocPostmp(startLocX,startLocY);
-      Amg::Vector2D endLocPostmp(endLocX,endLocY); 
+      Amg::Vector2D endLocPostmp(endLocX,endLocY);
 
       double etaDist = -9999;
       double phiDist = -9999;
       if(design){
-	design->distanceToDetectorEdge(startLocPostmp, etaDist, phiDist); 
+	design->distanceToDetectorEdge(startLocPostmp, etaDist, phiDist);
 	if(phiDist<0)startLocX += (fabs(phiDist)+1e-6);/// not exactly on the edge
 	if(etaDist<0)startLocY += (fabs(etaDist)+1e-6);
-	design->distanceToDetectorEdge(endLocPostmp, etaDist, phiDist); 
+	design->distanceToDetectorEdge(endLocPostmp, etaDist, phiDist);
 	if(phiDist<0)endLocX-=(fabs(phiDist)+1e-6);
 	if(etaDist<0)endLocY-=(fabs(etaDist)+1e-6);
       }
@@ -1329,7 +795,7 @@ namespace InDet {
       }
 
       Amg::Vector2D startLocPos(startLocX,startLocY);
-      Amg::Vector2D endLocPos(endLocX,endLocY); 
+      Amg::Vector2D endLocPos(endLocX,endLocY);
 
       Identifier startId = sielem->identifierOfPosition(startLocPos);
       Identifier endId = sielem->identifierOfPosition(endLocPos);
diff --git a/InnerDetector/InDetRecTools/InDetTestPixelLayer/src/InDetTestPixelLayerTool.cxx b/InnerDetector/InDetRecTools/InDetTestPixelLayer/src/InDetTestPixelLayerTool.cxx
index 4fd3fecbb2d252f9038a4543b84681dcde87e78a..0d5104a3513c4e8c01f651eaea807126d39d4f39 100644
--- a/InnerDetector/InDetRecTools/InDetTestPixelLayer/src/InDetTestPixelLayerTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTestPixelLayer/src/InDetTestPixelLayerTool.cxx
@@ -214,12 +214,12 @@ namespace InDet {
     int ehbl = -1;
     const Trk::TrackSummary* ts =  track->trackSummary();
     if(ts){
-      ehbl = ts->get(Trk::expectBLayerHit);
+      ehbl = ts->get(Trk::expectInnermostPixelLayerHit);
     }
 
     if(!recompute && pixel_layer==0){
       if(ts){
-	ehbl = ts->get(Trk::expectBLayerHit); 
+	ehbl = ts->get(Trk::expectInnermostPixelLayerHit);
 	if(0==ehbl || 1==ehbl ){
 	  m_cachedTrkParam =  0;
 	  m_cachedFracGood=-1;
@@ -277,7 +277,7 @@ namespace InDet {
     int ehbl = -1;
     const Trk::TrackSummary* ts =  track->trackSummary();
     if(ts){
-      ehbl = ts->get(Trk::expectBLayerHit); 
+      ehbl = ts->get(Trk::expectInnermostPixelLayerHit);
     }
 
     if(!recompute && pixel_layer==0){
diff --git a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/doc/packagedoc.h
index 590b079ad8476e367c9f5941330e259172177e12..c719ab9a371eea44b88293d41056b04f49e14819 100644
--- a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/doc/packagedoc.h
@@ -23,7 +23,6 @@ In order to work smoothly, the Trk::TrackStateOnSurface objects of a track which
 
 >> Please enter a brief description of the package here.
 
-@section InDetTrackHoleSearch_InDetTrackHoleSearchReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx
index 84ef2fc38bacebb20f1ad4351d2808f79b521f93..b3ef8c95ca831da70607f5bf821d0f37cd272c0f 100644
--- a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx
@@ -38,6 +38,7 @@ InDet::InDetTrackHoleSearchTool::InDetTrackHoleSearchTool(const std::string& t,
 							  const std::string& n,
 							  const IInterface*  p ) :
   AthAlgTool(t,n,p),
+  m_atlasId(nullptr),
   m_extrapolator("Trk::Extrapolator"),
   m_pixelCondSummarySvc("PixelConditionsSummarySvc",n),
   m_sctCondSummarySvc  ("SCT_ConditionsSummarySvc",n),
@@ -313,7 +314,6 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track ,
 	      hasID = true;
 	    }
 	  else if ( (*iterTSOS)->trackParameters() !=0 
-		    && &((*iterTSOS)->trackParameters()->associatedSurface()) !=0 
 		    && (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement() !=0
 		    && (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement()->identify() !=0 )
 	    { 
@@ -480,7 +480,6 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track ,
 	      hasID = true;
 	    }
 	  else if ( (*iterTSOS)->trackParameters() !=0 
-		    && &((*iterTSOS)->trackParameters()->associatedSurface()) !=0 
 		    && (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement() !=0
 		    && (*iterTSOS)->trackParameters()->associatedSurface().associatedDetectorElement()->identify() !=0 )
 	    { 
@@ -524,8 +523,7 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track ,
 		  
 		  // check if surface has identifer !
 		  Identifier id2;
-		  if (&thisParameters->associatedSurface() !=0 &&
-		      (thisParameters->associatedSurface()).associatedDetectorElement() !=0 &&
+		  if ((thisParameters->associatedSurface()).associatedDetectorElement() !=0 &&
 		      (thisParameters->associatedSurface()).associatedDetectorElement()->identify() !=0 )
 		    {
 		      id2 = (thisParameters->associatedSurface()).associatedDetectorElement()->identify();
@@ -642,7 +640,7 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track ,
       } else {    
 	ATH_MSG_VERBOSE ("Number of parameters in this step: " << paramList->size());
 	
-	// loop over the predictons and analyze them
+	// loop over the predictions and analyze them
 	for (std::vector<const Trk::TrackParameters*>::const_iterator it = paramList->begin();
 	     it != paramList->end(); ++it)
 	  {
@@ -651,8 +649,7 @@ bool InDet::InDetTrackHoleSearchTool::getMapOfHits(const Trk::Track& track ,
 	    
 	    // check if surface has identifer !
 	    Identifier id2;
-	    if (&(thisParameter->associatedSurface()) !=0 &&
-		thisParameter->associatedSurface().associatedDetectorElement() !=0 &&
+	    if (thisParameter->associatedSurface().associatedDetectorElement() !=0 &&
 		thisParameter->associatedSurface().associatedDetectorElement()->identify() !=0 )
 	      {
 		id2 = thisParameter->associatedSurface().associatedDetectorElement()->identify();
@@ -877,7 +874,7 @@ bool InDet::InDetTrackHoleSearchTool::isSensitive(const Trk::TrackParameters* pa
 {
   // do strict boundary check for SCT and Pixels to make sure we are in active area
   
-  if (!parameters || !&parameters->associatedSurface() || 
+  if (!parameters ||
       !parameters->associatedSurface().associatedDetectorElement()) return false;
   
   const InDetDD::SiDetectorElement* siElement =
diff --git a/InnerDetector/InDetRecTools/InDetTrackScoringTools/InDetTrackScoringTools/InDetAmbiScoringTool.h b/InnerDetector/InDetRecTools/InDetTrackScoringTools/InDetTrackScoringTools/InDetAmbiScoringTool.h
index 985bedf39079f7168500d663eb20570d04892ab6..7c522aba8c2e2059b986cb298119f56ddb1d3120 100755
--- a/InnerDetector/InDetRecTools/InDetTrackScoringTools/InDetTrackScoringTools/InDetAmbiScoringTool.h
+++ b/InnerDetector/InDetRecTools/InDetTrackScoringTools/InDetTrackScoringTools/InDetAmbiScoringTool.h
@@ -12,6 +12,8 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "TrkCaloClusterROI/CaloClusterROI_Collection.h"
 #include "TrkEventPrimitives/TrackScore.h"
 #include "TrkToolInterfaces/ITrackScoringTool.h"
 #include "TrkToolInterfaces/ITrackSummaryTool.h"
@@ -136,7 +138,7 @@ class InDetAmbiScoringTool : virtual public Trk::ITrackScoringTool,
   float m_phiWidthEm;
   float m_etaWidthEm;
 
-  std::string m_inputEmClusterContainerName;
+  SG::ReadHandleKey<CaloClusterROI_Collection> m_inputEmClusterContainerName;
 };
 
 
diff --git a/InnerDetector/InDetRecTools/InDetTrackScoringTools/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetTrackScoringTools/doc/packagedoc.h
index 299625c5c866d32916d88dc798e0fe571f01399a..3e3cdcb8fe1c971ca5faae39b078c7e8646e8235 100644
--- a/InnerDetector/InDetRecTools/InDetTrackScoringTools/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetTrackScoringTools/doc/packagedoc.h
@@ -36,7 +36,6 @@ a) Hits in the TRT are not relevant for the ambiguity processing in the InDet re
 b) In the case that a given Track has hits on the first and the third Pixel layer, two track candidates could be formed: One including the innermost hit and one excluding it. The inclusion of the innermost pixel hit automatically introduces also a hole (the missing second layer hit) to the track. The score of a track with two pixel hits and a hole is smaller than the score of a track with only one pixel hit but no holes. This would generally prefer the track without the b-layer information and therefore have a negative impact on the impact parameter measurement. Therefore, a correction is applied which penalizes the solution without the b-Layer hit in this situation.
 
 
-@section InDetTrackScoringTools_MyTestReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx
index 94cebce8d3518a9dd6b1f12d73f86e2e9ee40b9b..11abb50c86cf67851fe96a7bc72c5e748bda2294 100755
--- a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetAmbiScoringTool.cxx
@@ -35,7 +35,20 @@ InDet::InDetAmbiScoringTool::InDetAmbiScoringTool(const std::string& t,
   m_selectortool("InDet::InDetTrtDriftCircleCutTool"),
   m_summaryTypeScore(Trk::numberOfTrackSummaryTypes),
   m_iBeamCondSvc("BeamCondSvc",n),
-  m_magFieldSvc("AtlasFieldSvc",n)
+  m_magFieldSvc("AtlasFieldSvc",n),
+  // Initialization of ScoreModifiers variables
+  m_maxDblHoles(-1),
+  m_maxPixHoles(-1),
+  m_maxSCT_Holes(-1),
+  m_maxHits(-1),
+  m_maxSigmaChi2(-1),
+  m_maxTrtRatio(-1),
+  m_maxTrtFittedRatio(-1),
+  m_maxB_LayerHits(-1),
+  m_maxPixelHits(-1),
+  m_maxPixLay(-1),
+  m_maxLogProb(-1),
+  m_maxGangedFakes(-1)
 {
   declareInterface<Trk::ITrackScoringTool>(this);
   
@@ -78,14 +91,14 @@ InDet::InDetAmbiScoringTool::InDetAmbiScoringTool(const std::string& t,
   declareProperty("minPtEM",           m_minPtEm      = 5000. ); // in MeV
   declareProperty("phiWidthEM",        m_phiWidthEm   = 0.075 );
   declareProperty("etaWidthEM",        m_etaWidthEm   = 0.05  );
-  declareProperty("InputEmClusterContainerName",m_inputEmClusterContainerName);  
+  declareProperty("InputEmClusterContainerName",m_inputEmClusterContainerName="InDetCaloClusterROIs");
 
   //set values for scores
   m_summaryTypeScore[Trk::numberOfPixelHits]            =  20;
   m_summaryTypeScore[Trk::numberOfPixelSharedHits]      = -10;  // NOT USED --- a shared hit is only half the weight
   m_summaryTypeScore[Trk::numberOfPixelHoles]           = -10;  // a hole is bad
-  m_summaryTypeScore[Trk::numberOfBLayerHits]           =  10;  // addition for being b-layer
-  m_summaryTypeScore[Trk::numberOfBLayerSharedHits]     =  -5;  // NOT USED --- a shared hit is only half the weight
+  m_summaryTypeScore[Trk::numberOfInnermostPixelLayerHits]           =  10;  // addition for being b-layer
+  m_summaryTypeScore[Trk::numberOfInnermostPixelLayerSharedHits]     =  -5;  // NOT USED --- a shared hit is only half the weight
   m_summaryTypeScore[Trk::numberOfGangedPixels]         =  -5;  // decrease for being ganged
   m_summaryTypeScore[Trk::numberOfGangedFlaggedFakes]   = -10;  // decrease for being ganged fake
   m_summaryTypeScore[Trk::numberOfSCTHits]              =  10;  // half of a pixel, since only 1dim
@@ -165,6 +178,8 @@ StatusCode InDet::InDetAmbiScoringTool::initialize()
   
   
   if (m_useAmbigFcn || m_useTRT_AmbigFcn) setupScoreModifiers();
+
+  ATH_CHECK( m_inputEmClusterContainerName.initialize(m_useEmClusSeed) );
   
   return StatusCode::SUCCESS;
 }
@@ -473,7 +488,7 @@ Trk::TrackScore InDet::InDetAmbiScoringTool::ambigScore( const Trk::Track& track
          << "  New score now: " << prob);
     }
     // --- Pixel blayer hits
-    int bLayerHits = trackSummary.get(Trk::numberOfBLayerHits);
+    int bLayerHits = trackSummary.get(Trk::numberOfInnermostPixelLayerHits);
     if (bLayerHits > -1 && m_maxB_LayerHits > 0) {
       if (bLayerHits > m_maxB_LayerHits) {
         prob *= (bLayerHits - m_maxB_LayerHits + 1); // hits are good !
@@ -901,10 +916,8 @@ InDet::InDetAmbiScoringTool::getInfo() const
   if (rh.isValid())
     return rh.cptr();
 
-  const CaloClusterROI_Collection* calo = nullptr;
-  StatusCode sc = evtStore()->retrieve(calo,m_inputEmClusterContainerName);
-
-  if(sc == StatusCode::SUCCESS && calo) {
+  if (m_useEmClusSeed) {
+    SG::ReadHandle<CaloClusterROI_Collection> calo(m_inputEmClusterContainerName);
     auto info = std::make_unique<ROIInfoVec>();
     for( const Trk::CaloClusterROI* ccROI : *calo) {
       if( ccROI->energy() * sin(ccROI->globalPosition().theta()) < m_minPtEm){ 
diff --git a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx
index 36e0b3038603363b1dcce4482588e85c27a9bf78..60ded391716d0de2ba550387c5e8803d69c66f7d 100755
--- a/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackScoringTools/src/InDetTrtTrackScoringTool.cxx
@@ -25,7 +25,14 @@ InDet::InDetTrtTrackScoringTool::InDetTrtTrackScoringTool(const std::string& t,
   m_summaryTypeScore(Trk::numberOfTrackSummaryTypes),
   m_trkSummaryTool("Trk::TrackSummaryTool"),
   m_selectortool("InDet::InDetTrtDriftCircleCutTool"),
-  m_magFieldSvc("AtlasFieldSvc",n) 
+  m_magFieldSvc("AtlasFieldSvc",n),
+  // Initialization of ID TRT helper
+  m_trtId(nullptr),
+  // Initialization of ScoreModifiers variables
+  m_maxSigmaChi2(-1), 
+  m_maxLogProb(-1),
+  m_maxTrtRatio(-1),
+  m_maxTrtFittedRatio(-1) 
 {
   declareInterface<Trk::ITrackScoringTool>(this);
   
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackCut.h b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackCut.h
index 4666339f0a818ea854078d3604e641bfc92145ed..4e03c7d3cb7e1ac64a5270528901418b1d439c21 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackCut.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/Root/InDetTrackCut.h
@@ -11,6 +11,7 @@
 #define INDETTRACKSELECTIONTOOL_INDETTRACKCUT_H
 
 #include "InDetTrackAccessor.h"
+#include "AthenaBaseComps/AthCheckMacros.h"
 
 #include <map>
 #include <array>
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.cxx
index cf489640d78d190920f4bc981f35e788e653cd43..3eb6161fe5288b6c6a447182988b13c716bc08ea 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.cxx
@@ -16,10 +16,12 @@
 #endif
 
 InDet::ToolTester::ToolTester( const std::string& name, ISvcLocator* svcLoc )
-  : AthAlgorithm( name, svcLoc ),
-    m_selTool( "InDet::InDetTrackSelectionTool/TrackSelectionTool", this ) {
+  : AthReentrantAlgorithm( name, svcLoc ),
+    m_sgKey("InDetTrackParticles"),
+    m_selTool( "InDet::InDetTrackSelectionTool/TrackSelectionTool", this )
+{
     
-  declareProperty( "SGKey", m_sgKey = "InDetTrackParticles" );
+  declareProperty( "SGKey", m_sgKey);
 
   declareProperty( "TrackSelectionTool", m_selTool );
 }
@@ -34,15 +36,19 @@ StatusCode InDet::ToolTester::initialize() {
   // Retrieve the tools:
   ATH_CHECK( m_selTool.retrieve() );
 
+  ATH_CHECK( m_sgKey.initialize() );
   // Return gracefully:
   return StatusCode::SUCCESS;
 }
 
-StatusCode InDet::ToolTester::execute() {
+StatusCode InDet::ToolTester::execute_r(const EventContext &ctx) const {
 
   // Retrieve the tracks:
-  const xAOD::TrackParticleContainer* tracks = nullptr;
-  ATH_CHECK( evtStore()->retrieve( tracks, m_sgKey ) );
+  SG::ReadHandle<xAOD::TrackParticleContainer> tracks(m_sgKey,ctx);
+  if (!tracks.isValid()) {
+    ATH_MSG_ERROR("Invalid xAOD::TrackParticleContainer " << m_sgKey.key());
+    return StatusCode::FAILURE;
+  }
   Int_t numberOfTracks = tracks->size();
   ATH_MSG_INFO( "Number of tracks: " << numberOfTracks );
 
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.h b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.h
index df5da4754c54501a8a1adf50c6a5bfae23eea45b..b44dc7add5b8996a6777050709147341609a8fc2 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectionTool/src/ToolTester.h
@@ -8,9 +8,12 @@
 #define INDETTRACKSELECTIONTOOL_TOOLTESTER_H
 
 // Gaudi/Athena include(s):
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
 
+#include "xAODTracking/TrackParticleContainer.h"
+
+
 namespace InDet {
 
   // forward declaration of tool
@@ -21,7 +24,7 @@ namespace InDet {
    /// This is meant to be the "Athena equivalent" of the code put into
    /// util/InDetTrackSelectionToolTester.cxx.
    ///
-   class ToolTester : public AthAlgorithm {
+   class ToolTester : public AthReentrantAlgorithm {
 
    public:
       /// Regular Algorithm constructor
@@ -30,11 +33,11 @@ namespace InDet {
       /// Function initialising the algorithm
       virtual StatusCode initialize();
       /// Function executing the algorithm
-      virtual StatusCode execute();
+      virtual StatusCode execute_r(const EventContext &ctx) const;
 
    private:
       /// StoreGate key for the track container to investigate
-      std::string m_sgKey;
+      SG::ReadHandleKey<xAOD::TrackParticleContainer> m_sgKey;
 
       /// Connection to the selection tool
       ToolHandle< IInDetTrackSelectionTool > m_selTool;
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/doc/packagedoc.h
index e15652f7236e1724df432de2670c90f6931949b3..c5597466e1d905f7327c2604c5c966d9ea636c2a 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/doc/packagedoc.h
@@ -24,4 +24,3 @@ The cuts implemented in each version are shown below.
 @image html TrackSelectorVariables.png
 
 */
-
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetCosmicTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetCosmicTrackSelectorTool.cxx
index 5e58cfafe7b8f19e1fbb58540c42f147d95330ae..b710d226a217bbce1d2536a9e229871dd2a3578a 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetCosmicTrackSelectorTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetCosmicTrackSelectorTool.cxx
@@ -23,8 +23,9 @@ namespace InDet
 {
   //----------------------------------------------------------------------------
   InDetCosmicTrackSelectorTool::InDetCosmicTrackSelectorTool(const std::string& t, const std::string& n, const IInterface* p)
-    : AthAlgTool(t,n,p)
-    , m_magFieldSvc("AtlasFieldSvc",n)
+    : AthAlgTool(t,n,p), 
+    m_magFieldSvc("AtlasFieldSvc",n),
+    m_trackSumToolAvailable(false)
   {
     declareInterface<ITrackSelectorTool>(this);
     declareProperty("maxZ0",                     m_maxZ0 = 150.);
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx
index 89ccd5229aaa2bea939e21805a5a6d6819824a31..bc448fa1bbaaa85c377b92f07ec9552ba76fb701 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetDetailedTrackSelectorTool.cxx
@@ -581,7 +581,7 @@ namespace InDet
       }
       
     
-      int nb = getCount(tp,xAOD::numberOfBLayerHits );
+      int nb = getCount(tp,xAOD::numberOfInnermostPixelLayerHits );
       int np = getCount(tp,xAOD::numberOfPixelHits );
       int npd = getCount(tp,xAOD::numberOfPixelDeadSensors );
       int ns  = getCount(tp,xAOD::numberOfSCTHits );
@@ -724,7 +724,7 @@ namespace InDet
 
       if (m_useSharedHitInfo) {
 
-	int nbs = getCount(tp,xAOD::numberOfBLayerSharedHits); 
+	int nbs = getCount(tp,xAOD::numberOfInnermostPixelLayerSharedHits);
 	if (nbs>1) nbs=1;
 	if(nbs>m_nSharedBLayer) {
 	  ATH_MSG_DEBUG("Track rejected because of nSharedBLayer "<<nbs<<" < "<<m_nSharedBLayer);
@@ -958,7 +958,7 @@ namespace InDet
       return false;
     }
     
-    int nb = summary->get(Trk::numberOfBLayerHits); 
+    int nb = summary->get(Trk::numberOfInnermostPixelLayerHits);
     
     if(nb<0) nb=0; 
     
@@ -1136,7 +1136,7 @@ namespace InDet
 
     if (useSharedHitInfo) {
 
-      int nbs = summary->get(Trk::numberOfBLayerSharedHits); 
+      int nbs = summary->get(Trk::numberOfInnermostPixelLayerSharedHits);
       if(nbs < 0) nbs = 0;
       if (nbs>1) nbs=1;
       if(nbs>m_nSharedBLayer) {
diff --git a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetTrackSelectorTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetTrackSelectorTool.cxx
index 8d04bf92252f43516e24b6f3f974d0bf5fa72d55..bafa9074e6401e03a4862115f27003a9e995aae7 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetTrackSelectorTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSelectorTool/src/InDetTrackSelectorTool.cxx
@@ -37,7 +37,7 @@ InDetTrackSelectorTool::InDetTrackSelectorTool(const std::string & t, const std:
   declareProperty("maxD0",                    m_maxD0);
   declareProperty("maxD0overSigmaD0",         m_maxD0overSigmaD0);
   declareProperty("numberOfPixelHits",        m_numberOfPixelHits);
-  declareProperty("numberOfBLayerHits",       m_numberOfBLayerHits);
+  declareProperty("numberOfInnermostPixelLayerHits",       m_numberOfBLayerHits);
   declareProperty("TrackSummaryTool",         m_trackSumTool);
   declareProperty("Extrapolator",             m_extrapolator);
 }
@@ -112,7 +112,7 @@ bool InDetTrackSelectorTool::decision(const Trk::Track & track, const Trk::Verte
   if (nPixelDead<0)
     nPixelDead=0;
 
-  int nBLayerHits = summary->get(Trk::numberOfBLayerHits);
+  int nBLayerHits = summary->get(Trk::numberOfInnermostPixelLayerHits);
 
   if(nPixelHits+nPixelDead<m_numberOfPixelHits || nBLayerHits<m_numberOfBLayerHits )
     return false;
@@ -137,7 +137,7 @@ bool InDetTrackSelectorTool::decision(const Trk::TrackParticleBase & track, cons
   if (nPixelDead<0)
     nPixelDead=0;
 
-  int nBLayerHits =  summary->get(Trk::numberOfBLayerHits);
+  int nBLayerHits =  summary->get(Trk::numberOfInnermostPixelLayerHits);
 
   if(nPixelHits+nPixelDead<m_numberOfPixelHits || nBLayerHits<m_numberOfBLayerHits )
     return false;
diff --git a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/doc/packagedoc.h
index a90beab56b63ec076982a4b429396239e83c9a81..e40e3f29cea4ad6572bd165e2819809027bf452d 100644
--- a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/doc/packagedoc.h
@@ -13,7 +13,5 @@ The InDetTrackSummaryHelperTool is a helper tool which performs Inner Detector s
 
 The method analyse() basically takes a RIO_OnTrack, a Trk::TrackStateOnSurface, a vector of integers and a bitset. The RIO and the TSOS are true input quantities, the vector and the bitset are modified by analyse() and serve as output. Elements of the vector represent counters for different Trk::TrackSummary information. The analyse() methods increases these counters according to the information obtained from the other input quantities with help of the InDet ID helpers.
 
-@section InDetTrackSummaryHelperTool_InDetTrackSummaryHelperTool Requirements
-
 
 */
diff --git a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx
index a551d84e534a5479867e4d0a73941019d1a89392..3bc1117e37f856ed7b65798e24254d67243608fd 100755
--- a/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx
+++ b/InnerDetector/InDetRecTools/InDetTrackSummaryHelperTool/src/InDetTrackSummaryHelperTool.cxx
@@ -160,9 +160,6 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
 
       if (isOutlier && !ispatterntrack ) { // ME: outliers on pattern tracks may be reintegrated by fitter, so count them as hits
          information[Trk::numberOfPixelOutliers]++;
-         if (m_pixelId->is_blayer(id)){
-            information[Trk::numberOfBLayerOutliers]++;
-         }
 	 if (m_pixelId->layer_disk(id)==0 && m_pixelId->is_barrel(id)){
 	   information[Trk::numberOfInnermostPixelLayerOutliers]++;
 	 }
@@ -183,7 +180,6 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
 
 	 else {
 	   information[Trk::numberOfPixelHits]++;
-	   if ( (m_pixelId->is_blayer(id) ) ) information[Trk::numberOfBLayerHits]++; // found b layer hit
 	   if (m_pixelId->layer_disk(id)==0 && m_pixelId->is_barrel(id)) information[Trk::numberOfInnermostPixelLayerHits]++;
 	   if (m_pixelId->layer_disk(id)==1 && m_pixelId->is_barrel(id)) information[Trk::numberOfNextToInnermostPixelLayerHits]++;  
 	   // check to see if there's an ambiguity with the ganged cluster.
@@ -193,7 +189,6 @@ void InDet::InDetTrackSummaryHelperTool::analyse(const Trk::Track& track,
 	   } else {
 	     const InDet::PixelCluster* pixPrd = pix->prepRawData();
 	     if ( pixPrd && pixPrd->isSplit() ){ information[Trk::numberOfPixelSplitHits]++; hitIsSplit=true; }
-	     if ( pixPrd && m_pixelId->is_blayer(id) && pixPrd->isSplit() ) information[Trk::numberOfBLayerSplitHits]++;
 	     if ( pixPrd && m_pixelId->is_barrel(id) && m_pixelId->layer_disk(id)==0 && pixPrd->isSplit() ) information[Trk::numberOfInnermostLayerSplitHits]++;
 	     if ( pixPrd && m_pixelId->is_barrel(id) && m_pixelId->layer_disk(id)==1 && pixPrd->isSplit() ) information[Trk::numberOfNextToInnermostLayerSplitHits]++;
 	     if ( pix->isBroadCluster() ) information[Trk::numberOfPixelSpoiltHits]++;
@@ -370,27 +365,11 @@ void InDet::InDetTrackSummaryHelperTool::searchForHoles(const Trk::Track& track,
 
       if ( information[Trk::numberOfContribPixelLayers] == 0 ) {
          ATH_MSG_DEBUG("No pxiels on track, so wo do not expect a B-Layer hit !");
-         information[Trk::expectBLayerHit] = 0;
 	 information[Trk::expectInnermostPixelLayerHit] = 0;
 	 information[Trk::expectNextToInnermostPixelLayerHit] = 0;
       } else{
 
 
-	///blayer block
-	if ( information[Trk::numberOfBLayerHits] > 0) {
-	  ATH_MSG_DEBUG("B-Layer hit on track, so we expect a B-Layer hit !");
-	  information[Trk::expectBLayerHit] = 1;
-	} else {
-	  ATH_MSG_DEBUG("Testing B-Layer using tool..");
-	  if (m_testBLayerTool->expectHitInBLayer(&track) ) {
-            ATH_MSG_DEBUG("expect B-Layer hit !");
-            information[Trk::expectBLayerHit] = 1;
-	  } else {
-            ATH_MSG_DEBUG("do not expect B-Layer hit !");
-            information[Trk::expectBLayerHit] = 0;
-	  }
-	}
-
 	//innermost layer block
 	if (information[Trk::numberOfInnermostPixelLayerHits] > 0){
 	  information[Trk::expectInnermostPixelLayerHit] = 1;
@@ -432,14 +411,12 @@ void InDet::InDetTrackSummaryHelperTool::updateSharedHitCount(const Trk::Track &
     
     // loop over track states on surface and take pixel / sct to update the shared hit count
     summary.m_information[Trk::numberOfPixelSharedHits]  = 0;
-    summary.m_information[Trk::numberOfBLayerSharedHits] = 0;
     summary.m_information[Trk::numberOfInnermostPixelLayerSharedHits] = 0;
      summary.m_information[Trk::numberOfNextToInnermostPixelLayerSharedHits] = 0;
     summary.m_information[Trk::numberOfSCTSharedHits]    = 0;
      summary.m_information[Trk::numberOfTRTSharedHits]    = 0;
     if( m_runningTIDE_Ambi ) {
       summary.m_information[Trk::numberOfPixelSplitHits]   = 0;
-      summary.m_information[Trk::numberOfBLayerSplitHits]   = 0;
       summary.m_information[Trk::numberOfInnermostLayerSplitHits]   = 0;
       summary.m_information[Trk::numberOfNextToInnermostLayerSplitHits]   = 0;
     }
@@ -461,7 +438,6 @@ void InDet::InDetTrackSummaryHelperTool::updateSharedHitCount(const Trk::Track &
                          if ( pixPrd && pixPrd->isSplit() ){ 
                             summary.m_information[Trk::numberOfPixelSplitHits]++; 
                             hitIsSplit=true;
-			     if ( m_pixelId->is_blayer(id)) summary.m_information[Trk::numberOfBLayerSplitHits]++;
 			    if ( m_pixelId->is_barrel(id) && m_pixelId->layer_disk(id)==0) summary.m_information[Trk::numberOfInnermostLayerSplitHits]++;
 			    if ( m_pixelId->is_barrel(id) && m_pixelId->layer_disk(id)==1) summary.m_information[Trk::numberOfNextToInnermostLayerSplitHits]++;  
                          }
@@ -473,10 +449,6 @@ void InDet::InDetTrackSummaryHelperTool::updateSharedHitCount(const Trk::Track &
                       if ( m_assoTool->isShared(*(rot->prepRawData())) ) {
                           ATH_MSG_DEBUG("shared Pixel hit found");
                           summary.m_information[Trk::numberOfPixelSharedHits]++;
-			  if ( (m_pixelId->is_blayer(id) ) ) {
-			    ATH_MSG_DEBUG("--> shared Pixel hit is in b-layer");
-			    summary.m_information[Trk::numberOfBLayerSharedHits]++;       
-			  }
                           if ( (m_pixelId->is_barrel(id) && m_pixelId->layer_disk(id)==0) ) {
                              ATH_MSG_DEBUG("--> shared Pixel hit is in Innermost Pixel layer");
                              summary.m_information[Trk::numberOfInnermostPixelLayerSharedHits]++;       
@@ -516,48 +488,29 @@ void  InDet::InDetTrackSummaryHelperTool::updateExpectedHitInfo(const Trk::Track
     
     if ( summary.m_information[Trk::numberOfContribPixelLayers] == 0 ) {
       ATH_MSG_DEBUG("No pxiels on track, so wo do not expect a B-Layer hit !");
-      summary.m_information[Trk::expectBLayerHit] = 0;
       summary.m_information[Trk::expectInnermostPixelLayerHit] = 0;
       summary.m_information[Trk::expectNextToInnermostPixelLayerHit] = 0;
     } else{
-      
-      
-      ///blayer block
-      if ( summary.m_information[Trk::numberOfBLayerHits] > 0) {
-	ATH_MSG_DEBUG("B-Layer hit on track, so we expect a B-Layer hit !");
-	summary.m_information[Trk::expectBLayerHit] = 1;
-      } else {
-	ATH_MSG_DEBUG("Testing B-Layer using tool..");
-	if (m_testBLayerTool->expectHitInBLayer(&track) ) {
-	  ATH_MSG_DEBUG("expect B-Layer hit !");
-	  summary.m_information[Trk::expectBLayerHit] = 1;
-	} else {
-	  ATH_MSG_DEBUG("do not expect B-Layer hit !");
-	  summary.m_information[Trk::expectBLayerHit] = 0;
-	}
-      }
-      
       //innermost layer block
       if (summary.m_information[Trk::numberOfInnermostPixelLayerHits] > 0){
-	summary.m_information[Trk::expectInnermostPixelLayerHit] = 1;
+        ATH_MSG_DEBUG("Innermost pixel Layer hit on track, so we expect a innermost pixel layer hit !");
+        summary.m_information[Trk::expectInnermostPixelLayerHit] = 1;
       } else {
-	
 	if (m_testBLayerTool->expectHitInInnermostPixelLayer(&track) ) {
-	  ATH_MSG_DEBUG("expect Pixel Layer 0 hit !");
-	  summary.m_information[Trk::expectInnermostPixelLayerHit] = 1;
+          ATH_MSG_DEBUG("expect Pixel Layer 0 hit !");
+          summary.m_information[Trk::expectInnermostPixelLayerHit] = 1;
 	} else {
-	  ATH_MSG_DEBUG("do not expect Pixel Layer 0 hit !");
-	  summary.m_information[Trk::expectInnermostPixelLayerHit] = 0;
+          ATH_MSG_DEBUG("do not expect Pixel Layer 0 hit !");
+          summary.m_information[Trk::expectInnermostPixelLayerHit] = 0;
 	}  
 	
       }
       
       //next to innermost block
       if(summary.m_information[Trk::numberOfNextToInnermostPixelLayerHits] > 0){
-	summary.m_information[Trk::expectNextToInnermostPixelLayerHit] = 1;
+        summary.m_information[Trk::expectNextToInnermostPixelLayerHit] = 1;
       } else {
-	
-	if (m_testBLayerTool->expectHitInNextToInnermostPixelLayer(&track) ) {
+        if (m_testBLayerTool->expectHitInNextToInnermostPixelLayer(&track) ) {
 	  ATH_MSG_DEBUG("expect Pixel Layer 1 hit !");
 	  summary.m_information[Trk::expectNextToInnermostPixelLayerHit] = 1;
 	} else {
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx
index 4080858570c5cbf3d665ef4e2b35eedee0f03f53..d6330407e4ddc85f35b83447575615917db3bd22 100755
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/InDetVKalPriVxFinder.cxx
@@ -307,7 +307,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
               const Trk::TrackSummary* testSum = m_sumSvc->createSummary(*(*i_ntrk));
               PixelHits = (long int) testSum->get(Trk::numberOfPixelHits);
               SctHits   = (long int) testSum->get(Trk::numberOfSCTHits);
-              BLayHits  = (long int) testSum->get(Trk::numberOfBLayerHits);
+              BLayHits  = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits);
               SharedHits= (long int) testSum->get(Trk::numberOfPixelSharedHits);
 	      if(PixelHits<0)PixelHits=0;
               if(SctHits<0)SctHits=0;
@@ -347,7 +347,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
                const Trk::TrackSummary* testSum = m_sumSvc->createSummary(*(*i_ntrk));
                PixelHits = (long int) testSum->get(Trk::numberOfPixelHits);
                SctHits   = (long int) testSum->get(Trk::numberOfSCTHits);
-               BLayHits  = (long int) testSum->get(Trk::numberOfBLayerHits);
+               BLayHits  = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits);
                SharedHits= (long int) testSum->get(Trk::numberOfPixelSharedHits);
 	       if(PixelHits<0)PixelHits=0;
                if(SctHits<0)SctHits=0;
@@ -484,7 +484,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
                  const Trk::TrackSummary* testSum = (*i_nprt)->trackSummary();
                  PixelHits = (long int) testSum->get(Trk::numberOfPixelHits);
                  SctHits   = (long int) testSum->get(Trk::numberOfSCTHits);
-                 BLayHits  = (long int) testSum->get(Trk::numberOfBLayerHits);
+                 BLayHits  = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits);
                  SharedHits= (long int) testSum->get(Trk::numberOfPixelSharedHits);
 	         if(PixelHits<0)PixelHits=0;
                  if(SctHits<0)SctHits=0;
@@ -521,7 +521,7 @@ InDetVKalPriVxFinderTool::InDetVKalPriVxFinderTool(const std::string& type,
                  const Trk::TrackSummary* testSum = (*i_nprt)->trackSummary();
                  PixelHits = (long int) testSum->get(Trk::numberOfPixelHits);
                  SctHits   = (long int) testSum->get(Trk::numberOfSCTHits);
-                 BLayHits  = (long int) testSum->get(Trk::numberOfBLayerHits);
+                 BLayHits  = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits);
                  SharedHits= (long int) testSum->get(Trk::numberOfPixelSharedHits);
 	         if(PixelHits<0)PixelHits=0;
                  if(SctHits<0)SctHits=0;
diff --git a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx
index 8f6a04ae31c6032fc9ab5fc3d5e1b89e686b7319..b85ae1c93c5a927d9ff056f50ff4a3bf99c977f5 100755
--- a/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalPriVxFinderTool/src/Utilities.cxx
@@ -296,7 +296,7 @@ namespace InDet {
 //----------------------------------- Summary tools
        if(m_SummaryToolExist) {
           const Trk::TrackSummary* testSum = m_sumSvc->createSummary(*(*i_ntrk));
-          if( testSum->get(Trk::numberOfBLayerHits) <= 0) continue;
+          if( testSum->get(Trk::numberOfInnermostPixelLayerHits) <= 0) continue;
        }
        mapTracks.insert( std::pair<double, const Trk::Track*>(pmom,(*i_ntrk)));
     }
@@ -333,7 +333,7 @@ namespace InDet {
        double pmom = sin(VectPerig[3])/fabs(VectPerig[4]);
 //----------------------------------- Summary tools
        const Trk::TrackSummary* testSum = (*i_nprt)->trackSummary();
-       if( testSum->get(Trk::numberOfBLayerHits) <=0 ) continue;
+       if( testSum->get(Trk::numberOfInnermostPixelLayerHits) <=0 ) continue;
        mapTracks.insert( std::pair<double, const Trk::TrackParticleBase*>(pmom,(*i_nprt)));
     }
 
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx
index 2a469711e738c92d0a1546c5a5f5fae6618f064a..b3f1e142c4ca1d783239db657085a4b8e1dd75a4 100755
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/CutTrk.cxx
@@ -92,7 +92,7 @@ namespace InDet{
           const Trk::TrackSummary* testSum = (*i_ntrk)->trackSummary();
           PixelHits = (long int) testSum->get(Trk::numberOfPixelHits);
           SctHits   = (long int) testSum->get(Trk::numberOfSCTHits);
-          BLayHits  = (long int) testSum->get(Trk::numberOfBLayerHits);
+          BLayHits  = (long int) testSum->get(Trk::numberOfInnermostPixelLayerHits);
 	  if(PixelHits < 0 ) PixelHits=0; 
 	  if(SctHits   < 0 ) SctHits=0; 
 	  if(BLayHits  < 0 ) BLayHits=0; 
@@ -213,9 +213,9 @@ namespace InDet{
           if( !((*i_ntrk)->summaryValue(splPixHits,xAOD::numberOfPixelSpoiltHits)))splPixHits=0;
           if( !((*i_ntrk)->summaryValue(outPixHits,xAOD::numberOfPixelOutliers)))  outPixHits=0;
           //uint8_t BLaySharedH,BLaySplitH,BLayOutlier;
-          //if( !((*i_ntrk)->summaryValue(BLaySharedH,xAOD::numberOfBLayerSharedHits)) )  BLaySharedH=-1;
-          //if( !((*i_ntrk)->summaryValue(BLaySplitH ,xAOD::numberOfBLayerSplitHits))  )  BLaySplitH=-1;
-          //if( !((*i_ntrk)->summaryValue(BLayOutlier,xAOD::numberOfBLayerOutliers))   )  BLayOutlier=-1;
+          //if( !((*i_ntrk)->summaryValue(BLaySharedH,xAOD::numberOfInnermostPixelLayerSharedHits)) )  BLaySharedH=-1;
+          //if( !((*i_ntrk)->summaryValue(BLaySplitH ,xAOD::numberOfInnermostPixelLayerSplitHits))  )  BLaySplitH=-1;
+          //if( !((*i_ntrk)->summaryValue(BLayOutlier,xAOD::numberOfInnermostPixelLayerOutliers))   )  BLayOutlier=-1;
 //std::cout<<"NwBlayer="<<(long int)BLaySharedH<<", "<<(long int)BLaySplitH<<", "<<(long int)BLayOutlier<<'\n';
           //uint8_t InmHits,InmSharedH,InmSplitH,InmOutlier;
           //if( !((*i_ntrk)->summaryValue(InmHits,   xAOD::numberOfInnermostHits)) )        InmHits=-1;
diff --git a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx
index fa2d04c594beee297abd5b1121c18c34ef93f69b..ec39dc155791b5d152afe99627e57571decad8bb 100755
--- a/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx
+++ b/InnerDetector/InDetRecTools/InDetVKalVxInJetTool/src/Utilities.cxx
@@ -585,7 +585,7 @@ namespace InDet{
 	  //   bitH=HitPattern&((int)pow(2,Trk::pixelBarrel1));
         } else {                     // 3-layer pixel detector
           uint8_t BLhit,NPlay,NHoles,IBLhit;
-          if(!Part->summaryValue( BLhit,  xAOD::numberOfBLayerHits) )          BLhit = 0;
+          if(!Part->summaryValue( BLhit,  xAOD::numberOfInnermostPixelLayerHits) )          BLhit = 0;
           if(!Part->summaryValue(IBLhit,  xAOD::numberOfInnermostPixelLayerHits) )  IBLhit = 0; // Some safety
           BLhit=BLhit>IBLhit ? BLhit : IBLhit;                                                  // Some safety
           if(!Part->summaryValue( NPlay,  xAOD::numberOfContribPixelLayers) )  NPlay = 0;
diff --git a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/doc/packagedoc.h b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/doc/packagedoc.h
index 56adfa7fb47f47df523a172e58ef16e1892aa2f5..21b0bb2c4dcfc2693babcc47f697992f1a619cff 100644
--- a/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/InDetZVTOPVxFinder/doc/packagedoc.h
@@ -22,7 +22,6 @@ Documentation: David J. Jackson, Nucl.Instrum.Meth.A388: 247-253, 1997
 This AlgTool reconstructs a set of vertices and associated subset of the charged tracks, the association accords to a vertex probability function which is based on the trajectories and position resolution of the tracks. The track probability function, \f$ f_i \f$ is defined as a Gaussian tube around a track: the width is given by a track covariance (= error) matrix. The vertex probability function is \f$ \sum f_i - \frac{ \sum f_i^2}{\sum f_i} \f$. The job is to search for local maxima of the vertex probability function. So you have to calculate the vertex probability function at euch space point in detector. To reduce the number of spatial points, all possible combinations of two track pairs are build. For each pair the spatial point is calculated (see ZVTOP_SpatialPointFinder), all spatial points are candidates for a vertex. To reduce the number of vertex candidates the vertex candidate cluster are build. The tracks associated with each cluster are fitted, the vertex fitter can be set/changed via jobOptions, default Billoir FullFitter.
 On the fitted VxCandidate some quality cuts can be applied. The result is stored in a VxContainer. 
 
-@section InDetZVTOPVxFinder_InDetZVTOPVxFinderReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetRecTools/SeedToTrackConversionTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/SeedToTrackConversionTool/doc/packagedoc.h
index 3f2e94c4cf4e8fcca48d34605db499cfe0810d81..67442711f3d4493f8af12b137d08193412cd8df4 100644
--- a/InnerDetector/InDetRecTools/SeedToTrackConversionTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/SeedToTrackConversionTool/doc/packagedoc.h
@@ -21,7 +21,6 @@
    m_seedtotrackconversion->endEvent(); save SiSPSeedSegment objects 
  That's it and send in your feedbacks. 
 
-@section SeedToTrackConversionTool_SeedToTrackConversionToolReq Requirements
 
 
 */
diff --git a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/doc/packagedoc.h
index 5e1a989654a1ecf145c3451b6782ae2a355d88d0..8bb522fdbb6af36e5f5a3b3954723046bb1d14d5 100644
--- a/InnerDetector/InDetRecTools/SiClusterOnTrackTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/SiClusterOnTrackTool/doc/packagedoc.h
@@ -108,14 +108,4 @@ MakeTwoDimBarrelClusters=True.
 
 @section SiClusterOnTrackTool_ExtrasSiClusterOnTrackTool Extra Pages
 
- - @ref UsedSiClusterOnTrackTool
- - @ref RequirementsSiClusterOnTrackTool
-*/
-
-/**
-@page UsedSiClusterOnTrackTool Used Packages
-*/
-
-/**
-@page RequirementsSiClusterOnTrackTool Requirements
 */
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h
index f69758d9c7c545a66283cf1f768d5a698cba2a37..7869912dbdc06a4d095bc2eee11b227ed5a4b425 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/TruthClusterizationFactory.h
@@ -30,9 +30,17 @@
 #include "TrkParameters/TrackParameters.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "EventPrimitives/EventPrimitives.h"
+#include "CLHEP/Random/RandomEngine.h"
+#include "AthenaKernel/IAtRndmGenSvc.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "InDetSimData/InDetSimDataCollection.h"
+
+//class InDetSimDataCollection;
+
+namespace CLHEP{
+  class HepRandomEngine;
+}
 
- class InDetSimDataCollection;
- 
 namespace InDet {
  
   class PixelCluster;
@@ -63,12 +71,17 @@ namespace InDet {
                                                       
    private:
 	/** IncidentSvc to catch begining of event and end of event */   
-    ServiceHandle<IIncidentSvc>           m_incidentSvc;   
-	
-	std::string                             m_simDataCollectionName;    //!< sim data collection name
-	mutable const InDetSimDataCollection*   m_simDataCollection;        //!< sim data collection - refreshed at BeginEvent incident
+    ServiceHandle<IIncidentSvc>           m_incidentSvc;   	
+    SG::ReadHandleKey<InDetSimDataCollection> m_simDataCollectionName {this, "InputSDOMap", "PixelSDO_Map", "sim data collection name"};
+    mutable const InDetSimDataCollection*   m_simDataCollection;        //!< sim data collection - refreshed at BeginEvent incident
+
+  protected:
+    ServiceHandle<IAtRndmGenSvc> m_rndmSvc;
+    Gaudi::Property<std::string> m_rndmEngineName {this, "RndmEngine", "TruthClustering", "Random Engine Name"};
+    CLHEP::HepRandomEngine*      m_rndmEngine;	
+
    };
    
- }//end InDet namespace
+}//end InDet namespace
  
  #endif
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/SiClusterizationTool/doc/packagedoc.h
index 314e02903c46e2f5f6483366783b9b9fddcdeff3..04d5fb00ffdca84ca5b0de2b45064e4bcef1b2a2 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/doc/packagedoc.h
@@ -104,20 +104,4 @@ ClusterMakerTool
   It computes the global coordinates of a (pixel or strip) cluster, 
 including Lorentz angle correction, and the error to be associated 
 to the cluster, according to the ErrorStrategy flag.
-  
-
-@ref used_SiClusterizationTool
-
-@ref requirements_SiClusterizationTool
-
-*/
-
-/**
-
-@page used_SiClusterizationTool Used Packages
-
-*/
-
-/**
-@page requirements_SiClusterizationTool requirements
 */
diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx
index 9c40cfee851b8a81a9a9d0b7caa27061465f522f..a992b1a8eb2f797d35ada17d78abfb9fd7bc20ec 100644
--- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx
+++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/TruthClusterizationFactory.cxx
@@ -22,28 +22,29 @@
 
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/Incident.h"
-#include "InDetSimData/InDetSimDataCollection.h"
 #include "InDetSimData/InDetSimData.h"
 #include "HepMC/GenParticle.h"
 
 #include "TrkEventPrimitives/ParamDefs.h"
 
-#include "TRandom.h"
+#include "CLHEP/Random/RandFlat.h"
 
 namespace InDet {
 
   TruthClusterizationFactory::TruthClusterizationFactory(const std::string& name,
                                                    const std::string& n, const IInterface* p):
           AthAlgTool(name, n,p),
-		  m_incidentSvc("IncidentSvc", n),
-	      m_simDataCollectionName("PixelSDO_Map"),
-		  m_simDataCollection(0)
-  {
-    // further properties
-	declareProperty("IncidentService"      , m_incidentSvc );
-
-    declareInterface<TruthClusterizationFactory>(this);
-  } 
+	  m_incidentSvc("IncidentSvc", n),
+	  m_simDataCollection(0),
+	  m_rndmSvc("AtDSFMTGenSvc",name),
+	  m_rndmEngine(0)
+{
+  // further properties
+  declareProperty("IncidentService", m_incidentSvc );
+  declareProperty("RndmSvc", m_rndmSvc, "Random Number Service used in TruthClusterizationFactory");
+  
+  declareInterface<TruthClusterizationFactory>(this);
+      } 
   
 /////////////////////////////////////////////////////////////////////////////////////
 /// Destructor - check up memory allocation
@@ -60,7 +61,25 @@ namespace InDet {
 	// register to the incident service
 	m_incidentSvc->addListener( this, "BeginEvent");
 
-	msg(MSG::INFO) << "initialize() successful in " << name() << endmsg;
+	msg(MSG::INFO) << "initialize() successful in " << name() << endmsg;
+
+	 // random svc
+	CHECK(m_rndmSvc.retrieve());
+ 	
+	// get the random stream
+	ATH_MSG_DEBUG ( "Getting random number engine : <" << m_rndmEngineName << ">" );
+	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);
+	}
+	
+	ATH_CHECK( m_simDataCollectionName.initialize() );
+
+
     return StatusCode::SUCCESS;
   }
   
@@ -68,12 +87,16 @@ namespace InDet {
   { 
    if ( inc.type() == IncidentType::BeginEvent ){
    	// record the SDO collection
-   	if (evtStore()->retrieve(m_simDataCollection,m_simDataCollectionName).isFailure()){
-   		ATH_MSG_WARNING("Could not retrieve the  InDetSimDataCollection with name "   << m_simDataCollectionName);
-   		m_simDataCollection = 0;
-   	} else {
-   		ATH_MSG_VERBOSE("Successfully retrieved the InDetSimDataCollection with name " << m_simDataCollectionName);
-   	}
+     
+     SG::ReadHandle<InDetSimDataCollection> pixSdoColl(m_simDataCollectionName);
+
+     if (!pixSdoColl.isValid()){
+       ATH_MSG_WARNING("Could not retrieve the  InDetSimDataCollection with name "   << m_simDataCollectionName);
+       m_simDataCollection = 0;
+     } else {
+       ATH_MSG_VERBOSE("Successfully retrieved the InDetSimDataCollection with name " << m_simDataCollectionName);
+       m_simDataCollection = &(*pixSdoColl);  
+     }
    }  
   }
 
@@ -117,8 +140,6 @@ namespace InDet {
 	//barcodes in the cluster, each corresponding to a truth particle
 	nPartContributing = barcodes.size();
 	ATH_MSG_VERBOSE("n Part Contributing: " << nPartContributing);
-	//Set random seed for smearing NN efficiency
-	gRandom->SetSeed(0);
 	ATH_MSG_VERBOSE("Smearing TruthClusterizationFactory probability output for TIDE studies");
 	//If only 1 truth particles found
 	if (nPartContributing==1) {
@@ -128,14 +149,14 @@ namespace InDet {
 	//If two unique truth particles found in cluster
 	else if (nPartContributing==2) {
 		//90% chance NN returns high probability of there being 2 particles
-		if (gRandom->Uniform(0,1) < 0.9) probabilities[1] = 1.0;
+		if (CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1 ) < 0.9) probabilities[1] = 1.0;
 		//Other 10% NN returns high probability of there being 1 particle
 		else probabilities[0] = 1.0;
 	}
 	//If greater than 2 unique truth particles in cluster
 	else if (nPartContributing>2) {
 		//90% chance NN returns high probability of there being >2 particles
-		if (gRandom->Uniform(0,1) < 0.9) probabilities[2] = 1.0;
+		if (CLHEP::RandFlat::shoot( m_rndmEngine, 0, 1 ) < 0.9) probabilities[2] = 1.0;
 		//Other 10% NN returns high probability of there being 1 particle
 		else probabilities[0] = 1.0;
 	}
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h
index 7e4a56c9b995916dba68fdbf00046f81a83032f4..3b53198d23c10a35874dfc13490ea44884bb2357 100755
--- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinderTool_xk/SiCombinatorialTrackFinder_xk.h
@@ -20,6 +20,7 @@
 #include <map>
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
+#include "StoreGate/ReadHandleKey.h"
 #include "MagFieldInterfaces/IMagFieldSvc.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "InDetRecToolInterfaces/ISiCombinatorialTrackFinder.h"
@@ -143,8 +144,8 @@ namespace InDet{
       bool                           m_simpleTrack   ;
       bool                           m_heavyion      ;
 
-      SG::ReadHandle<InDet::SiClusterContainer>  m_pixcontainer  ;
-      SG::ReadHandle<InDet::SiClusterContainer>  m_sctcontainer  ;
+      SG::ReadHandleKey<InDet::SiClusterContainer>  m_pixcontainerkey  ;
+      SG::ReadHandleKey<InDet::SiClusterContainer>  m_sctcontainerkey  ;
       MagField::IMagFieldSvc*        m_fieldService  ;
       Trk::MagneticFieldProperties   m_fieldprop     ; // Magnetic field properties
       double                         m_xi2max        ; // max Xi2 for updators
diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
index 8073ecb63f8561ceb9b0eb1476556feadefbe1c3..bfd0c7f4b54f3dae99494de8b68c4cfef473f5ed 100755
--- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
+++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx
@@ -29,6 +29,7 @@
 #include "InDetReadoutGeometry/PixelDetectorManager.h"
 #include "InDetPrepRawData/SiClusterContainer.h"
 #include "TrkGeometry/MagneticFieldProperties.h"
+#include "StoreGate/ReadHandle.h"
 
 ///////////////////////////////////////////////////////////////////
 // Constructor
@@ -44,8 +45,8 @@ InDet::SiCombinatorialTrackFinder_xk::SiCombinatorialTrackFinder_xk
     m_updatortool("Trk::KalmanUpdator_xk/InDetPatternUpdator"  ),
     m_riocreator ("Trk::RIO_OnTrackCreator/RIO_OnTrackCreator" ),
     m_assoTool   ("InDet::InDetPRD_AssociationToolGangedPixels"),
-    m_pixcontainer ("PixelClusters"),
-    m_sctcontainer ("SCT_Clusters")
+    m_pixcontainerkey ("PixelClusters"),
+    m_sctcontainerkey ("SCT_Clusters")
 {
   m_usePIX      = true               ;
   m_useSCT      = true               ;
@@ -68,8 +69,8 @@ InDet::SiCombinatorialTrackFinder_xk::SiCombinatorialTrackFinder_xk
   declareProperty("UpdatorTool"          ,m_updatortool        );
   declareProperty("RIOonTrackTool"       ,m_riocreator         );
   declareProperty("MagneticFieldMode"    ,m_fieldmode          );
-  declareProperty("PixelClusterContainer",m_pixcontainer       );
-  declareProperty("SCT_ClusterContainer" ,m_sctcontainer       ); 
+  declareProperty("PixelClusterContainer",m_pixcontainerkey    );
+  declareProperty("SCT_ClusterContainer" ,m_sctcontainerkey    ); 
   declareProperty("AssosiationTool"      ,m_assoTool           );
   declareProperty("usePixel"             ,m_usePIX             );
   declareProperty("useSCT"               ,m_useSCT             );
@@ -256,10 +257,10 @@ MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpconditions( MsgStream& out
   std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
 
 
-  n     = 62-m_pixcontainer.name().size();
+  n     = 62-m_pixcontainerkey.key().size();
   std::string s7; for(int i=0; i<n; ++i) s7.append(" "); s7.append("|");
 
-  n     = 62-m_sctcontainer.name().size();
+  n     = 62-m_sctcontainerkey.key().size();
   std::string s8; for(int i=0; i<n; ++i) s8.append(" "); s8.append("|");
 
   n     = 62-m_assoTool.type().size();
@@ -269,10 +270,10 @@ MsgStream& InDet::SiCombinatorialTrackFinder_xk::dumpconditions( MsgStream& out
      <<"-------------------|"
        <<std::endl;
   if(m_usePIX) {
-    out<<"| Pixel clusters location | "<<m_pixcontainer.name()      <<s7<<std::endl;
+    out<<"| Pixel clusters location | "<<m_pixcontainerkey.key()      <<s7<<std::endl;
   }
   if(m_useSCT) {
-    out<<"| SCT   clusters location | "<<m_sctcontainer.name()      <<s8<<std::endl;
+    out<<"| SCT   clusters location | "<<m_sctcontainerkey.key()      <<s8<<std::endl;
   }
   out<<"| Tool for propagation    | "<<m_proptool   .type()<<s1<<std::endl;
   out<<"| Tool for updator        | "<<m_updatortool.type()<<s4<<std::endl;
@@ -363,27 +364,9 @@ std::ostream& InDet::operator <<
 
 void InDet::SiCombinatorialTrackFinder_xk::newEvent()
 {
-//  m_pix          = false;
-//  m_sct          = false;
-//  m_pixcontainer = 0    ;
-//  m_sctcontainer = 0    ; 
-
-//  // Test is sct clusters collection for given event
-//  //
-//  if(m_usePIX) {
-//    StatusCode sc = evtStore()->retrieve(m_pixcontainer,m_pixelname);
-//    if(!sc.isFailure() && m_pixcontainer) m_pix = true;
-//  }
-//  // Test is sct clusters collection for given event
-//  //
-//  if(m_useSCT) {
-//    StatusCode  sc = evtStore()->retrieve(m_sctcontainer,m_sctname);
-//    if(!sc.isFailure() && m_sctcontainer) m_sct = true;
-//  }
-
-//Adam - Migration to ReadHandle
-  m_pix = m_usePIX && m_pixcontainer.isValid();
-  m_sct = m_useSCT && m_sctcontainer.isValid();
+
+  m_pix = m_usePIX && m_pixcontainerkey.initialize().isSuccess();
+  m_sct = m_useSCT && m_sctcontainerkey.initialize().isSuccess();
 
 
   // Erase statistic information
@@ -452,7 +435,9 @@ const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracks
   m_tracks.erase(m_tracks.begin(),m_tracks.end());
 
   ++m_inputseeds;
-  if(!m_pix && !m_sct) return m_tracks;
+  if(!m_pix && !m_sct) {
+    return m_tracks;
+  }
 
   // Get track qulaity cuts information
   //
@@ -495,7 +480,9 @@ const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracks
   m_tracks.erase(m_tracks.begin(),m_tracks.end());
 
   ++m_inputseeds;
-  if(!m_pix && !m_sct) return m_tracks;
+  if(!m_pix && !m_sct) {
+    return m_tracks;
+  }
 
   if(!findTrack(Tp,Sp,Gp,DE,PT)     ) return m_tracks;
   if(!m_trajectory.isNewTrack(PT)) return m_tracks;
@@ -543,7 +530,9 @@ const std::list<Trk::Track*>&  InDet::SiCombinatorialTrackFinder_xk::getTracksWi
   m_tracks.erase(m_tracks.begin(),m_tracks.end());
 
   ++m_inputseeds;
-  if(!m_pix && !m_sct) return m_tracks;
+  if(!m_pix && !m_sct) {
+    return m_tracks;
+  }
 
   bool  Q = findTrack(Tp,Sp,Gp,DE,PT); 
   if(Q) Q = m_trajectory.isNewTrack(PT); 
@@ -612,33 +601,40 @@ bool InDet::SiCombinatorialTrackFinder_xk::findTrack
   std::list<const InDet::SiDetElementBoundaryLink_xk*> DEL; 
   detectorElementLinks(DE,DEL);
 
+  SG::ReadHandle<InDet::SiClusterContainer> pixcontainer(m_pixcontainerkey);
+  ATH_CHECK(pixcontainer.isValid());
+  SG::ReadHandle<InDet::SiClusterContainer> sctcontainer(m_sctcontainerkey);
+  ATH_CHECK(sctcontainer.isValid());
+
   // List cluster preparation
   //
   std::list<const InDet::SiCluster*> Cl; 
   bool TWO     = false;
 
   if     (Sp.size() > 1) {
-    if(!spacePointsToClusters(Sp,Cl)) return false;
+    if(!spacePointsToClusters(Sp,Cl)) {
+      return false;
+    }
     if(Sp.size()<=2) TWO = true;
   }
   else if(Gp.size() > 2) {
-    if(!m_trajectory.globalPositionsToClusters(m_pixcontainer.ptr(),m_sctcontainer.ptr(),Gp,DEL,PT,Cl)) return false;
+    if(!m_trajectory.globalPositionsToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Gp,DEL,PT,Cl)) return false;
   }
   else                   {
-    if(!m_trajectory.trackParametersToClusters(m_pixcontainer.ptr(),m_sctcontainer.ptr(),Tp,DEL,PT,Cl)) return false;
+    if(!m_trajectory.trackParametersToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Tp,DEL,PT,Cl)) return false;
   }
   ++m_goodseeds;
 
   // Build initial trajectory
   //
   bool Qr;
-  bool Q = m_trajectory.initialize(m_pix,m_sct,m_pixcontainer.ptr(),m_sctcontainer.ptr(),Tp,Cl,DEL,Qr);
+  bool Q = m_trajectory.initialize(m_pix,m_sct,pixcontainer.ptr(),sctcontainer.ptr(),Tp,Cl,DEL,Qr);
 
   if(!Q && Sp.size() < 2 && Gp.size() > 3) {
 
     Cl.clear();
-    if(!m_trajectory.trackParametersToClusters(m_pixcontainer.ptr(),m_sctcontainer.ptr(),Tp,DEL,PT,Cl)) return false;
-    if(!m_trajectory.initialize   (m_pix,m_sct,m_pixcontainer.ptr(),m_sctcontainer.ptr(),Tp,Cl,DEL,Qr)) return false;
+    if(!m_trajectory.trackParametersToClusters(pixcontainer.ptr(),sctcontainer.ptr(),Tp,DEL,PT,Cl)) return false;
+    if(!m_trajectory.initialize   (m_pix,m_sct,pixcontainer.ptr(),sctcontainer.ptr(),Tp,Cl,DEL,Qr)) return false;
     Q=Qr=true;
   }
 
diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/doc/packagedoc.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/doc/packagedoc.h
index 06434b08ad2c63b300d1d2a86fa3f141f55731b1..629d5a8e19c73638f43be098aae65e0afd562878 100644
--- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/doc/packagedoc.h
@@ -25,6 +25,5 @@ in propagation order and first detector element is closest to beam axis.
      
 This algorithm uses IMagneticFieldTool and IPropagator  tools.
 
-@section SiDetElementsRoadTool_xk_SiDetElementsRoadTool_xkReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecTools/SiSpacePointTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/SiSpacePointTool/doc/packagedoc.h
index 85f9265dd04bb594ac455921e01f009bc298aae3..380a264a4b93a458909c5233696c7e308493ec41 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointTool/doc/packagedoc.h
@@ -23,6 +23,5 @@ SiSpacePointFormation and also by the EF algorithms.
    SpacePoints given one Pixel cluster collection or two SCT cluster 
    collections. 
 
-@section SiSpacePointTool_SiSpacePointToolReq Requirements
 
 */
diff --git a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/doc/packagedoc.h b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/doc/packagedoc.h
index e95ad8ca5346241865863b53c17c398b9666d647..91329da0f42bcbf42746f78b1fea078a6531765a 100644
--- a/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/SiSpacePointsSeedTool_xk/doc/packagedoc.h
@@ -34,6 +34,5 @@ exist two addition requariments for this combination.
 
  This algorithm uses IMagneticFieldTool tool.
 
-@section SiSpacePointsSeedTool_xk_SiSpacePointsSeedTool_xkReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/doc/packagedoc.h b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/doc/packagedoc.h
index 3f20dd51a7583b648019eca3611fe78986d20830..36f18812934a3eb4ff71a261ed83dc9182808d4d 100644
--- a/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/SiTrackMakerTool_xk/doc/packagedoc.h
@@ -34,6 +34,5 @@ This track finding algorithm contains 6 steps.
      
 This algorithm uses IMagneticFieldTool, IPropagator, IUpdator, IRIO_OnTrackCreator, ISiDetElementsRoadMaker tools.
 
-@section SiTrackMakerTool_xk_SiTrackMakerTool_xkReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecTools/SiZvertexTool_xk/doc/packagedoc.h b/InnerDetector/InDetRecTools/SiZvertexTool_xk/doc/packagedoc.h
index 7368067285713da13b8b45abe06ffb9dab9f6011..dff35fa474f38e1d1489985fcea66950e61ad948 100644
--- a/InnerDetector/InDetRecTools/SiZvertexTool_xk/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/SiZvertexTool_xk/doc/packagedoc.h
@@ -18,6 +18,5 @@ has been filled primary vertices can be detected by simply scanning the contents
      
 This algorithm uses ISiSpacePointsSeedMaker tool for space point seeds production.
 
-@section SiZvertexTool_xk_SiZvertexTool_xkReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/doc/packagedoc.h b/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/doc/packagedoc.h
index 90fe093449a45da8bbc95d0f5672047f09f6d79c..26cf4e1b3e09763031a73e11ce37ae440393dc87 100644
--- a/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/TRT_DetElementsRoadTool_xk/doc/packagedoc.h
@@ -26,6 +26,5 @@ in propagation order and first detector element is closest to beam axis.
      
 This algorithm uses IMagneticFieldTool and IPropagator tools.
 
-@section TRT_DetElementsRoadTool_xk_TRT_DetElementsRoadTool_xkReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/doc/packagedoc.h
index d5279b8e7a599dee5425534578dc06e636bd435a..d57a6371b328e2182aa9d76afa55817002b364bd 100644
--- a/InnerDetector/InDetRecTools/TRT_DriftCircleTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/TRT_DriftCircleTool/doc/packagedoc.h
@@ -17,23 +17,4 @@ of trigger (cosmics/CTB).
 
   - InDet::TRT_DriftCircleTool : converts RDO coll to DriftCircle coll
   - InDet::TRT_DriftCircleToolCosmics : with appropiate phase corrections
-
-@ref used_TRT_DriftcircleTool
-
-@ref requirements_TRT_DriftCircleTool
-
-*/
-
-/**
-
-@page used_TRT_DriftCircleTool Used Packages
-
-
-*/
-
-/**
-
-@page requirements_TRT_DriftCircleTool requirements
-
-
 */
diff --git a/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/doc/packagedoc.h
index 9ad3491a939d652a77e10b3cdffa68e0babfb099..02d3d4073d01eb15f087f91460c012d4fd029c4b 100644
--- a/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/doc/packagedoc.h
@@ -32,18 +32,4 @@ drift radius using various conditions data.
  - UseCalDb : TRTCalDbTool is used for Db access in case of data (default is TRT_CondDbTool)
  - TRTCalDbTool : the tool handle is a property
  - TRT_CondDbTool : the tool handle is a property
-
-@ref used_TRT_DriftFunctionTool
-
-@ref requirements_TRT_DriftFunctionTool
-
-*/
-/**
-@page used_TRT_DriftFunctionTool Used Packages
-
-
-*/
-/**
-@page requirements_TRT_DriftFunctionTool requirements
-
 */
diff --git a/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/src/TRT_DriftFunctionTool.cxx b/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/src/TRT_DriftFunctionTool.cxx
index 3250df06fb80b314396e0978333ab8f966c6f22d..0ad1befa9e49aef58c448695d1ed55631d770471 100755
--- a/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/src/TRT_DriftFunctionTool.cxx
+++ b/InnerDetector/InDetRecTools/TRT_DriftFunctionTool/src/TRT_DriftFunctionTool.cxx
@@ -932,7 +932,7 @@ StatusCode TRT_DriftFunctionTool::update( IOVSVC_CALLBACK_ARGS_P(I,keys) ) {
               citr!=atrlistcol->end();++citr) {
 
 	    //get Barrel (1) or Endcap (2)
-	   channel = abs(citr->first);
+	   channel = citr->first;
 
 	   if ((channel == 1) || (channel == 2)) {
              const coral::AttributeList& atrlist = citr->second;
@@ -964,7 +964,7 @@ StatusCode TRT_DriftFunctionTool::update( IOVSVC_CALLBACK_ARGS_P(I,keys) ) {
 	 for (CondAttrListCollection::const_iterator citr=atrlistcol->begin();
               citr!=atrlistcol->end();++citr) {
 	      
-	   channel = abs(citr->first);
+	   channel = citr->first;
 
 	   if (channel == 1) {
              const coral::AttributeList& atrlist = citr->second;
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidTool.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidTool.cxx
index 80f96b4d8e380b9ca7b708365fd4364a907be2ea..c8c6d654d96a7ae6bbd741f421f2ccef79d6d2f6 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidTool.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidTool.cxx
@@ -313,9 +313,8 @@ InDet::TRT_ElectronPidTool::electronProbability(const Trk::Track& track) const
     if(sum_ToT_by_sum_L>0 && nHits>0){
       // correct for data/MC normalisation
       // unfortunately vertex container not yet available here so pileup correction not applied
-      ITRT_ToT_dEdx::EGasType gasType;
-      sum_ToT_by_sum_L*= m_TRTdEdxTool->correctNormalization(true,m_DATA, gasType);
-      prob_El_ToT = m_TRTdEdxTool->getTest(gasType, sum_ToT_by_sum_L, pTrk,  Trk::electron,  Trk::pion, nHits);
+      sum_ToT_by_sum_L*= m_TRTdEdxTool->correctNormalization(true,m_DATA);
+      prob_El_ToT = m_TRTdEdxTool->getTest(sum_ToT_by_sum_L, pTrk,  Trk::electron,  Trk::pion, nHits);
     }
     //Calculate the probability based on Brem
     if(m_bremFitterEnabled)
diff --git a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx
index d6189cba65e2a23bd8e0a1ad23a25ef6b8c3d6e6..e6bb9a45158488abb535f7f66f5dc80cf1191307 100644
--- a/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ElectronPidTools/src/TRT_ElectronPidToolRun2.cxx
@@ -403,9 +403,8 @@ InDet::TRT_ElectronPidToolRun2::electronProbability(const Trk::Track& track) con
 
   // Jared - ToT Implementation
   dEdx = m_TRTdEdxTool->dEdx( &track, true, false, true); // Divide by L, exclude HT hits 
-  ITRT_ToT_dEdx::EGasType gasType;
-  double usedHits = m_TRTdEdxTool->usedHits( &track, gasType, true, false);
-  prob_El_ToT = m_TRTdEdxTool->getTest( gasType, dEdx, pTrk, Trk::electron, Trk::pion, usedHits, true ); 
+  double usedHits = m_TRTdEdxTool->usedHits( &track, true, false);
+  prob_El_ToT = m_TRTdEdxTool->getTest( dEdx, pTrk, Trk::electron, Trk::pion, usedHits, true ); 
   
   // Limit the probability values the upper and lower limits that are given/trusted for each part:
   double limProbHT = HTcalc.Limit(prob_El_HT); 
diff --git a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/doc/packagedoc.h
index 033b2bad1400c24aea57fff93c069a40a84c702c..50038eae2c4a1547ef1359e75d68c8847650228e 100644
--- a/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/TRT_SeededSpacePointFinderTool/doc/packagedoc.h
@@ -82,9 +82,7 @@ This tool contains the following implementations:
 
 - SimpleTRT_SeededSpacePointFinder_ATL.cxx... Form SP seeds based mainly on geometrical arguments.
 
-@section TRT_SeededSpacePointFinderTool_TRT_SeededSpacePointFinderToolPackages Used Packages
 
 
-@section TRT_SeededSpacePointFinderTool_TRT_SeededSpacePointFinderToolReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/doc/packagedoc.h b/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/doc/packagedoc.h
index 7f0b6e6c832d6465bed2b9960ab2f161d426f847..5da77210a35a342fedde633afba164817da5408c 100644
--- a/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/TRT_SeededTrackFinderTool/doc/packagedoc.h
@@ -90,9 +90,7 @@ The TRT_SeededTrackFinderTool contains the following classes/files:
 
 - SiNoise_bt.cxx... Noise adding routine due to detector material
 
-@section TRT_SeededTrackFinderTool_TRT_SeededTrackFinderToolPackagess Used Packages
 
 
-@section TRT_SeededTrackFinderTool_TRT_SeededTrackFinderToolReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecTools/TRT_ToT_Tools/TRT_ToT_Tools/ITRT_ToT_dEdx.h b/InnerDetector/InDetRecTools/TRT_ToT_Tools/TRT_ToT_Tools/ITRT_ToT_dEdx.h
index 4265a8e7676c0ecc9b49b0cb53160331fb1d5a2c..788304dc0e06a34e9c096f383d0ec3b45b05f302 100644
--- a/InnerDetector/InDetRecTools/TRT_ToT_Tools/TRT_ToT_Tools/ITRT_ToT_dEdx.h
+++ b/InnerDetector/InDetRecTools/TRT_ToT_Tools/TRT_ToT_Tools/ITRT_ToT_dEdx.h
@@ -51,8 +51,8 @@ public:
    * @param bool variable whether HT hits shoule be used
    * @return nHits
    */
-  virtual double usedHits(const Trk::Track* track, EGasType& gasType, bool DivideByL, bool useHThits) const = 0;
-  virtual double usedHits(const Trk::Track* track, EGasType& gasType) const = 0;
+  virtual double usedHits(const Trk::Track* track, bool DivideByL, bool useHThits) const = 0;
+  virtual double usedHits(const Trk::Track* track) const = 0;
 
   /** 
    * @brief function to define what is a good hit to be used for dEdx calculation
@@ -70,7 +70,7 @@ public:
    * @param number of primary vertices per event
    * @return scaling variable
    */
-  virtual double correctNormalization(bool divideLength, bool scaledata, EGasType& gasType, double nVtx=-1) const = 0;
+  virtual double correctNormalization(bool divideLength, bool scaledata, double nVtx=-1) const = 0;
 
   /**
    * @brief function to calculate likelihood from prediction and resolution
@@ -92,8 +92,8 @@ public:
    * @param number of used hits
    * @return test value between 0 and 1
    */
-  virtual double getTest(EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits, bool dividebyL) const = 0;
-  virtual double getTest(EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const = 0;
+  virtual double getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits, bool dividebyL) const = 0;
+  virtual double getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const = 0;
 
 
   /**
diff --git a/InnerDetector/InDetRecTools/TRT_ToT_Tools/TRT_ToT_Tools/TRT_ToT_dEdx.h b/InnerDetector/InDetRecTools/TRT_ToT_Tools/TRT_ToT_Tools/TRT_ToT_dEdx.h
index e4cffacbd2b6cf0b72c5b71dcbc815688ad16401..74a4f1b93fffdc7ed59a2091419b23250ecc187a 100644
--- a/InnerDetector/InDetRecTools/TRT_ToT_Tools/TRT_ToT_Tools/TRT_ToT_dEdx.h
+++ b/InnerDetector/InDetRecTools/TRT_ToT_Tools/TRT_ToT_Tools/TRT_ToT_dEdx.h
@@ -125,14 +125,14 @@ public:
    * @param bool variable whether HT hits shoule be used
    * @return nHits
    */
-  double usedHits(const Trk::Track* track, EGasType& gasType, bool DivideByL, bool useHThits) const;
+  double usedHits(const Trk::Track* track, bool DivideByL, bool useHThits) const;
 
   /**
    * @brief function to calculate number of used hits
    * @param track pointer
    * @return nHits
    */
-  double usedHits(const Trk::Track* track, EGasType& gasType) const;
+  double usedHits(const Trk::Track* track) const;
 
   /** 
    * @brief function to define what is a good hit to be used for dEdx calculation
@@ -151,7 +151,7 @@ public:
    * @param number of primary vertices per event
    * @return scaling variable
    */
-  double correctNormalization(bool divideLength, bool scaledata, EGasType& gasType, double nVtx=-1) const;
+  double correctNormalization(bool divideLength, bool scaledata, double nVtx=-1) const;
 
   /**
    * @brief function to calculate likelihood from prediction and resolution
@@ -174,8 +174,8 @@ public:
    * @param number of used hits
    * @return test value between 0 and 1
    */
-  double getTest(EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const;
-  double getTest(EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits, bool dividebyL) const;
+  double getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const;
+  double getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits, bool dividebyL) const;
 
   /**
    * @brief function to calculate expectation value for dEdx using BB fit
diff --git a/InnerDetector/InDetRecTools/TRT_ToT_Tools/src/TRT_ToT_dEdx.cxx b/InnerDetector/InDetRecTools/TRT_ToT_Tools/src/TRT_ToT_dEdx.cxx
index 4f3f021dde49a05ea209f9a46b01820ab74a3bd6..e5a040ed74b593a2fadde19f5c049bb9475a292b 100644
--- a/InnerDetector/InDetRecTools/TRT_ToT_Tools/src/TRT_ToT_dEdx.cxx
+++ b/InnerDetector/InDetRecTools/TRT_ToT_Tools/src/TRT_ToT_dEdx.cxx
@@ -161,6 +161,7 @@ StatusCode TRT_ToT_dEdx::initialize()
     return StatusCode::FAILURE;
   }
       
+  //  ShowDEDXSetup();  
 
   ATH_MSG_INFO("//////////////////////////////////////////////////////////////////");
   ATH_MSG_INFO("///              TRT_ToT_Tool setup configuration              ///");
@@ -772,7 +773,6 @@ bool TRT_ToT_dEdx::isData() const {
 double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool divideByL, bool useHThits, bool corrected) const
 {
   ATH_MSG_DEBUG("dEdx()");
-  ShowDEDXSetup();  
 
   double nVtx=-1.;
 
@@ -825,7 +825,7 @@ double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool divideByL, bool useHThit
       for (int i = 0; i < nhits;i++){
         ToTsum+=vecToT.at(i);
       } 
-      ToTsum*=correctNormalization(divideByL, m_isData, gasType, nVtx);
+      ToTsum*=correctNormalization(divideByL, m_isData, nVtx);
 
       return ToTsum/nhits;
     }
@@ -921,7 +921,7 @@ double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool divideByL, bool useHThit
 
         double ToTsum = ToTsumXe*nhitsXe + ToTsumAr*nhitsAr + ToTsumKr*nhitsKr;
 
-        ToTsum*=correctNormalization(divideByL, m_isData, gasType, nVtx);
+        ToTsum*=correctNormalization(divideByL, m_isData, nVtx);
 
         return ToTsum/nhits;
       }
@@ -931,16 +931,15 @@ double TRT_ToT_dEdx::dEdx(const Trk::Track* track, bool divideByL, bool useHThit
   return 0.;
 }
 
-double TRT_ToT_dEdx::usedHits(const Trk::Track* track, EGasType& gasType) const
+double TRT_ToT_dEdx::usedHits(const Trk::Track* track) const
 {
-  return usedHits(track, gasType, m_divideByL, m_useHThits);
+  return usedHits(track, m_divideByL, m_useHThits);
 }
 
-double TRT_ToT_dEdx::usedHits(const Trk::Track* track, EGasType& gasType, bool divideByL, bool useHThits) const
+double TRT_ToT_dEdx::usedHits(const Trk::Track* track, bool divideByL, bool useHThits) const
 {
   ATH_MSG_DEBUG("usedHits()");
-  ShowDEDXSetup();  
-  gasType = kUnset;
+  EGasType gasType = kUnset;
 
   if (!track) {
     return 0;
@@ -1074,15 +1073,17 @@ double TRT_ToT_dEdx::getProb(EGasType gasType, const double dEdx_obs, const doub
 }
 
 
-double TRT_ToT_dEdx::getTest(EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const {
+double TRT_ToT_dEdx::getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits) const {
 
-  return getTest(gasType, dEdx_obs, pTrk, hypothesis, antihypothesis, nUsedHits, m_divideByL);
+  return getTest(dEdx_obs, pTrk, hypothesis, antihypothesis, nUsedHits, m_divideByL);
 
 }
 
-double TRT_ToT_dEdx::getTest(EGasType gasType, const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits, bool divideByL) const
+double TRT_ToT_dEdx::getTest(const double dEdx_obs, const double pTrk, Trk::ParticleHypothesis hypothesis, Trk::ParticleHypothesis antihypothesis, int nUsedHits, bool divideByL) const
 {
   ATH_MSG_DEBUG("getTest()");
+
+  EGasType gasType = kUnset;
         
   if ( dEdx_obs<=0. || pTrk<=0. || nUsedHits<=0 ) return 0.5;
   
@@ -1237,9 +1238,9 @@ double TRT_ToT_dEdx::getToT(unsigned int BitPattern) const
 // Corrections
 /////////////////////////////////
 
-double TRT_ToT_dEdx::correctNormalization(bool divideLength,bool scaledata, EGasType& gasType, double nVtx) const
+double TRT_ToT_dEdx::correctNormalization(bool divideLength,bool scaledata, double nVtx) const
 {
-  gasType = static_cast<EGasType> (m_useTrackPartWithGasType);
+  EGasType gasType = static_cast<EGasType> (m_useTrackPartWithGasType);
   if(m_useTrackPartWithGasType==kUnset)
     gasType=kXenon;
   if(nVtx<=0)nVtx=Dedxcorrection::norm_nzero[gasType];
diff --git a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/doc/packagedoc.h b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/doc/packagedoc.h
index 291cea3dddcd4f68da91687e073214c115ee1049..1973a88d1a1d7ac009b5321a5782149f4f43a24c 100644
--- a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_DAF/doc/packagedoc.h
@@ -83,14 +83,4 @@ The Trk::TRT_TrackExtensionTool_DAF can be configured by the Python setup class
 
 @section TRT_TrackExtensionTool_DAF_ExtrasTRT_TrackExtensionTool_DAF Extra Pages
 
- - @ref UsedTRT_TrackExtensionTool_DAF
- - @ref requirementsTRT_TrackExtensionTool_DAF
-*/
-
-/**
-@page UsedTRT_TrackExtensionTool_DAF Used Packages
-*/
-
-/**
-@page requirementsTRT_TrackExtensionTool_DAF Requirements
 */
diff --git a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/doc/packagedoc.h b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/doc/packagedoc.h
index 287d0708d447193608b8eeab334f5c54fa306375..5ebbf0143c681be4584ceebbbbc13b121107faa4 100644
--- a/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/TRT_TrackExtensionTool_xk/doc/packagedoc.h
@@ -48,6 +48,5 @@ This TRT track extention algorithm contains next steps.
      
 This algorithm uses IMagneticFieldTool, IPropagator, ITRT_DetElementsRoadMaker, IRIO_OnTrackCreator tools.
 
-@section TRT_TrackExtensionTool_xk_TRT_TrackExtensionTool_xkReq Requirements file
 
 */
diff --git a/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.auto.py b/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.auto.py
index d88ee6ebaaf052b23a011309d443c9b6433cb042..66447c8f475344b8ecbafbb7557a092934eb672b 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.auto.py
+++ b/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.auto.py
@@ -205,9 +205,7 @@ InDetFlags.doTrkNtuple      = False
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.data.raw.py b/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.data.raw.py
index e3683047438f976570b9b34c34ff8a872f638136..b71ef36dd99dbb1650ac112015066dd4c0072c2e 100755
--- a/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.data.raw.py
+++ b/InnerDetector/InDetRecTools/TRT_TrackHoleSearch/share/trt_eff_jobOptions.data.raw.py
@@ -153,9 +153,7 @@ InDetFlags.doMonitoringAlignment = False
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/doc/packagedoc.h b/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/doc/packagedoc.h
index 084f138786973945ac23ffe3c0e6403a1e8e3c91..50e5a3393b3a5d2b08dcf3a4311a3dc59ae2d77e 100644
--- a/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/doc/packagedoc.h
+++ b/InnerDetector/InDetRecTools/TRT_TrackSegmentsTool_xk/doc/packagedoc.h
@@ -24,8 +24,5 @@ Global pattern recognition step uses the Hough transformation and historamming m
 local step contains straight linde finding algorithm.
 This algorithm uses IMagneticFieldTool, IPropagator, ITRT_DetElementsRoadMaker and ITRT_TrackExtensionTool tools.
 
-@section TRT_TrackSegmentsTool_xk_TRT_TrackSegmentsTool_xkReq Requirements file
 
 */
-
-
diff --git a/InnerDetector/InDetSimUtils/TRT_PAI_Process/doc/packagedoc.h b/InnerDetector/InDetSimUtils/TRT_PAI_Process/doc/packagedoc.h
index 653fe140e41ca08aeab6add384443b645c8e58fd..f1fe1ce6c7301eda5f83856c2d610bc769ee3fa8 100644
--- a/InnerDetector/InDetSimUtils/TRT_PAI_Process/doc/packagedoc.h
+++ b/InnerDetector/InDetSimUtils/TRT_PAI_Process/doc/packagedoc.h
@@ -34,16 +34,6 @@ Other references to the PAI model are
                           to perform PAI
   - TRT_PAI_gasdata.h:    tabulated values of photon absorption cross section
 
-@ref used_Package
 
-@ref requirements_TRT_PAI_Process
 
 */
-
-/**
-@page used_Package Used Packages
-*/
-
-/**
-@page requirements_TRT_PAI_Process Requirements
-*/
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/doc/packagedoc.h
index 761c7a60db70cd453edef1cc7e7215afbaa7a5e6..260b7ab74fd88fe7028efb54b3a6aa4ab556f309 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigAmbiguitySolver/doc/packagedoc.h
@@ -23,8 +23,4 @@ More information on processing ambiguities is given in the
 TrkAmbiguityProcessor documentation.
 
  
-@section InDetTrigAmbiguitySolver_used_packagesInDetTrigAmbiguitySolver Used packages
-
-@section InDetTrigAmbiguitySolver_ReqInDetTrigAmbiguitySolver Requirements
-
 */
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/doc/packagedoc.h
index a5def2a7403dbb129fc1f2482b100e4bc5c5c3c5..68280590a9f7fc649e03685e8dc0402ac574d1b1 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigConversionFinder/doc/packagedoc.h
@@ -24,9 +24,7 @@ the algorithm will use this default value.
 <li>Specify the name of IVertexFinder:<br>
     <b>''VertexFinderTool' : PublicToolHandle('InDet::InDetConversionFinderTools') </b></li>
 </ul>
-@section InDetTrigConversionFinder_used_packagesInDetTrigConversionFinder used packages
 
-@section InDetTrigConversionFinder_requirements Requirements
 
 \namespace Vtx
 A namespace for all vertexing packages and related stuff.
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/doc/packagedoc.h
index e456e85937cfb6838d3d306c3b0b6c7c1f828e87..73b6602bedef178f9bd6d1f48dab42c3b45bd2e6 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/doc/packagedoc.h
@@ -24,9 +24,7 @@ Rec::PriVtx, if not it will be set to Rec::NoVtx.
 InDetTrigParticleCreation contains the following files/classes:
 - TrigParticleCreator.cxx ... the algoritm which creates particles
 
-@section InDetTrigParticleCreation_used_packagesInDetTrigParticleCreation used packages
 
-@section InDetTrigParticleCreation_requirements Requirements
 
 \namespace PCreate
 */
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a285b97ef7c2ee66e0bff3cf8cff4b8259c1b5e4
--- /dev/null
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.cxx
@@ -0,0 +1,700 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "GaudiKernel/ITHistSvc.h"
+#include "TrigTrackingxAODCnvMT.h"
+#include "TrkToolInterfaces/ITrackParticleCreatorTool.h"
+#include "TrkToolInterfaces/IResidualPullCalculator.h"
+#include "xAODTracking/TrackParticleAuxContainer.h"
+#include "xAODTracking/TrackParticleContainer.h"
+#include "VxVertex/VxContainer.h"
+#include "VxVertex/VxTrackAtVertex.h"
+#include "Particle/TrackParticle.h"
+#include "TrkTrack/Track.h"
+#include "TrkTrack/LinkToTrack.h"
+#include "TrkParameters/TrackParameters.h"
+#include "Particle/TrackParticleContainer.h"
+#include "TrkToolInterfaces/IPRD_AssociationTool.h"
+#include "TrigSteeringEvent/TrigRoiDescriptor.h"
+#include "TrigSteeringEvent/PhiHelper.h"
+#include "IRegionSelector/IRegSelSvc.h"
+#include "TrkTrackSummary/TrackSummary.h"
+
+#include "Identifier/Identifier.h"
+#include "InDetIdentifier/PixelID.h"
+#include "AtlasDetDescr/AtlasDetectorID.h"
+#include "IdDictDetDescr/IdDictManager.h"
+
+#include <cmath>
+#include <algorithm>
+
+#include "TrigTimeAlgs/TrigTimerSvc.h"
+
+namespace InDet
+{
+
+
+  TrigTrackingxAODCnvMT::TrigTrackingxAODCnvMT(const std::string &name,
+					   ISvcLocator *pSvcLocator)
+    : AthAlgorithm (name, pSvcLocator),
+      m_particleCreatorTool("Trk::ParticleCreatorTool"),
+      m_residualCalc("Trk::ResidualPullCalculator"),
+      m_doIBLresidual(false),
+      m_slice_name(""),
+      m_mon_doSliceSpecific(true),
+      m_mon_counter(0),
+      m_mon_prescale(1),
+      m_mon_ptmin(1),
+      m_roiCollectionKey(""),
+      m_trackKey(""),
+      m_trackParticleKey("")
+
+  {
+    declareProperty("ParticleCreatorTool", m_particleCreatorTool);
+    declareProperty("ResidualPullCalculator", m_residualCalc);
+    declareProperty("doIBLresidual", m_doIBLresidual);
+
+
+    declareProperty("TrackParticlesName", 
+                  m_trackParticleKey = std::string("TrackParticles"),
+                  "TrackParticle container");
+    declareProperty("TrackName", 
+                  m_trackKey = std::string("Tracks"),
+                  "Track Collection");
+    declareProperty("roiCollectionName", 
+                  m_roiCollectionKey = std::string("rois"),
+                  "RoI Collection");
+
+
+    //+++ DQM (SA): monitoring
+    declareProperty("MonSliceSpecific", m_mon_doSliceSpecific);
+    declareProperty("MonPrescale",      m_mon_prescale);
+    declareProperty("MonPtmin",         m_mon_ptmin);
+    // Common for all slices
+    /*    declareMonitoredStdContainer("trk_d0",     m_dqm_d0);
+    declareMonitoredStdContainer("trk_z0",     m_dqm_z0);
+    declareMonitoredStdContainer("trk_phi",    m_dqm_phi);
+    declareMonitoredStdContainer("trk_eta",    m_dqm_eta);
+    declareMonitoredStdContainer("trk_qoverp", m_dqm_qOverP);
+    declareMonitoredStdContainer("trk_nPIXHits", m_dqm_npix_hits);
+    declareMonitoredStdContainer("trk_nSCTHits", m_dqm_nsct_hits);
+    declareMonitoredStdContainer("trk_nTRTHits", m_dqm_ntrt_hits);
+    declareMonitoredStdContainer("trk_chi2dof", m_dqm_chi2dof);
+    declareMonitoredStdContainer("roi_etaRoi", m_dqm_eta_roi);
+    declareMonitoredStdContainer("roi_phiRoi", m_dqm_phi_roi);
+    declareMonitoredVariable("roi_nTrkPart",    m_dqm_ntrkpart);
+    declareMonitoredVariable("roi_nTracks",        m_dqm_ntrk);
+    declareMonitoredVariable("roi_nVertices",     m_dqm_nvertex);
+    declareMonitoredVariable("roi_eta", m_roiEta);
+    declareMonitoredVariable("roi_etaWidth", m_roiEtaWidth);
+    declareMonitoredVariable("roi_phi", m_roiPhi);
+    declareMonitoredVariable("roi_phiWidth", m_roiPhiWidth);
+    declareMonitoredVariable("roi_z", m_roiZ);
+    declareMonitoredVariable("roi_zWidth", m_roiZ_Width);
+    // Bjet slice
+    declareMonitoredVariable("bj_sumPt",  m_dqm_bj_sumpt);
+    // Muon slice
+    declareMonitoredVariable("mu_d0",     m_dqm_mu_d0);
+    declareMonitoredVariable("mu_z0",     m_dqm_mu_z0);
+    declareMonitoredVariable("mu_eta",    m_dqm_mu_eta);
+    declareMonitoredVariable("mu_phi",    m_dqm_mu_phi);
+    declareMonitoredVariable("mu_qOverP", m_dqm_mu_qOverP);
+    declareMonitoredVariable("mu_pt",     m_dqm_mu_pt);
+    declareMonitoredVariable("mu_nPIXHits", m_dqm_mu_npix_hits);
+    declareMonitoredVariable("mu_nSCTHits", m_dqm_mu_nsct_hits);
+    declareMonitoredVariable("mu_nTRTHits", m_dqm_mu_ntrt_hits);
+    declareMonitoredVariable("mu_chi2Dof", m_dqm_mu_chi2dof);
+    declareMonitoredVariable("mu_etaRoi", m_dqm_mu_eta_roi);
+    declareMonitoredVariable("mu_phiRoi", m_dqm_mu_phi_roi);
+    // Tau slice
+    declareMonitoredStdContainer("ta_roiDR", m_dqm_ta_roidr);
+    declareMonitoredVariable("ta_lPt",    m_dqm_ta_L_pt);
+    declareMonitoredVariable("ta_fracPt", m_dqm_ta_frac_pt);
+    declareMonitoredVariable("ta_sumCh",  m_dqm_ta_sum_ch);
+    declareMonitoredVariable("ta_asyCh",  m_dqm_ta_asy_ch);
+    declareMonitoredVariable("ta_m",       m_dqm_ta_m);
+    //IBL related
+    declareMonitoredStdContainer("IBLz", m_dqm_ibl_z);
+    declareMonitoredStdContainer("IBLresx", m_dqm_ibl_res_x);
+    declareMonitoredStdContainer("IBLresy", m_dqm_ibl_res_y);
+    declareMonitoredStdContainer("IBLHitExpectedAndFound", m_dqm_ibl_hit_expected_found); 
+    //Timers
+    m_timerMemAlloc = nullptr;
+    m_timerFeatureAttach = nullptr;
+    m_timerTrackConversion = nullptr;
+    */
+
+  }
+
+  TrigTrackingxAODCnvMT::~TrigTrackingxAODCnvMT()
+  {}
+
+  //----------------------------------
+  //          beginRun method:
+  //----------------------------------------------------------------------------
+  StatusCode TrigTrackingxAODCnvMT::beginRun() {
+    msg() << MSG::INFO << "TrigTrackingxAODCnvMT::beginRun()" << endmsg;
+    m_mon_counter = 1;
+
+    return StatusCode::SUCCESS;
+  }
+  //----------------------------------------------------------------------------
+
+  ///////////////////////////////////////////////////////////////////
+  // Initialisation
+  ///////////////////////////////////////////////////////////////////
+  StatusCode TrigTrackingxAODCnvMT::initialize() {
+
+    msg() << MSG::DEBUG << name() << " initialize() " << PACKAGE_VERSION << endmsg;
+
+    if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) {
+      msg(MSG::FATAL) << "Could not get AtlasDetectorID helper" << endmsg;
+      return StatusCode::FAILURE;
+    }
+    
+    if (detStore()->retrieve(m_pixelId, "PixelID").isFailure()) {
+      msg(MSG::ERROR) << "Could not get PixelID helper !" << endmsg;
+      return StatusCode::FAILURE;
+    }
+
+    if ( m_particleCreatorTool.retrieve().isFailure() ) {
+      msg() << MSG::FATAL << "Failed to retrieve tool " << m_particleCreatorTool << endmsg;
+      return StatusCode::FAILURE;
+    }
+    else{
+      msg() << MSG::INFO << "Retrieved tool " << m_particleCreatorTool << endmsg;
+    }
+
+    if ( m_residualCalc.retrieve().isFailure() ) {
+      msg() << MSG::FATAL << "Failed to retrieve tool " << m_residualCalc << endmsg;
+      return StatusCode::FAILURE;
+    }
+    else{
+      msg() << MSG::INFO << "Retrieved tool " << m_particleCreatorTool << endmsg;
+    }
+
+
+    ATH_CHECK( m_roiCollectionKey.initialize() );
+    
+    ATH_CHECK( m_trackKey.initialize() );
+    ATH_CHECK( m_trackParticleKey.initialize() );
+
+    //+++ DQM (SA): monitoring
+    std::string tmp_alg_name = this->name();
+    std::vector<std::string> slice_names;
+    slice_names.push_back("Bphysics");
+    slice_names.push_back("Electron");
+    slice_names.push_back("MinBias");
+    slice_names.push_back("Photon");
+    slice_names.push_back("Bjet");
+    slice_names.push_back("FullScan");
+    slice_names.push_back("Muon");
+    slice_names.push_back("Tau");
+
+    m_slice_name="";
+
+    std::vector<std::string>::const_iterator iter;
+    for (iter = slice_names.begin(); iter != slice_names.end(); ++iter) {
+      if(tmp_alg_name.find( (*iter), 0) != std::string::npos ) m_slice_name = (*iter);
+    }
+
+    //Initialise timer
+    /*
+    m_timerMemAlloc = addTimer("MemoryAlloc");
+    m_timerFeatureAttach = addTimer("FeatureAttach");
+    m_timerTrackConversion = addTimer("TrackConversion");
+    */
+    return StatusCode::SUCCESS;
+  }
+
+  ///////////////////////////////////////////////////////////////////
+  // Execute HLT Algorithm
+  ///////////////////////////////////////////////////////////////////
+  StatusCode TrigTrackingxAODCnvMT::execute() {
+
+
+    ATH_MSG_DEBUG("execute()");
+
+
+    //----------------------------------------------------------------------
+    //  Navigate throw the trigger element to retrieve the last TrackCollection
+    //----------------------------------------------------------------------
+
+    //const TrackCollection* allTracksFromStoreGate;
+
+    //initialize monitored objects
+    bool runAlg = true;
+    StatusCode statCode(StatusCode::SUCCESS);
+
+    if (statCode!=StatusCode::SUCCESS){
+      msg() << MSG::ERROR << "ErrorCode check to avoid unchecked SC" << endmsg;
+    }
+
+    //+++ DQM (SA): monitoring
+    //    ResetMon();
+
+    auto ctx = getContext();
+    auto tpHandle =   SG::makeHandle (m_trackParticleKey, ctx);
+    
+    ATH_CHECK( tpHandle.record (std::make_unique<xAOD::TrackParticleContainer>(),
+                           std::make_unique<xAOD::TrackParticleAuxContainer>()) );
+    xAOD::TrackParticleContainer* tpCont=tpHandle.ptr();
+    //
+    //float tmp_eta_roi = -999;  
+    //float tmp_phi_roi = -999;  
+    ATH_MSG_DEBUG(" Getting RoI");
+    auto roiCollection = SG::makeHandle(m_roiCollectionKey, ctx);
+    ATH_MSG_DEBUG(" Got RoICollection size "<<roiCollection->size() );
+
+    if (roiCollection->size()==0) {
+      ATH_MSG_DEBUG("RoICollection size 0");
+      //      tmp_eta_roi = 0;
+      //      tmp_phi_roi = 0;
+    } else {
+
+      //TrigRoiDescriptor* roi = *(roiCollection->begin());
+      //tmp_eta_roi = roi->eta();
+      //tmp_phi_roi = roi->phi();
+    }
+
+    auto tracks = SG::makeHandle(m_trackKey, ctx);
+
+    ATH_MSG_VERBOSE(" Input track collection has size " << tracks->size());
+    if ( tracks->size() == 0 ) {
+      ATH_MSG_DEBUG(" Input track collection has 0 size. Algorithm not executed!");
+      runAlg = false;
+    }
+    
+    
+    //convert tracks
+
+    
+    
+
+    if(runAlg) {
+      //Memory Alloc
+      //    if(doTiming()) m_timerMemAlloc->start();
+      tpCont->reserve(tracks->size());                                                     
+      //    if(doTiming()) m_timerMemAlloc->stop();
+      for(unsigned int idtr=0; idtr< tracks->size(); ++idtr) {
+        const ElementLink<TrackCollection> trackLink(*tracks, idtr);
+
+	if (m_doIBLresidual) fillIBLResidual(tracks->at(idtr));
+
+	//	if(doTiming()) m_timerTrackConversion->start();
+        xAOD::TrackParticle* tp = m_particleCreatorTool->createParticle( trackLink, tpCont);
+	//	if(doTiming()) m_timerTrackConversion->stop();
+
+        if(msgLvl(MSG::DEBUG) && (tp != 0)){
+  	  int npix, nsct, ntrt, npixh, nscth;
+  	  npix = nsct = ntrt = npixh = nscth = -1;
+  	  const Trk::Track *tr = tp->track();
+  	  if (tr){
+  	    const Trk::TrackSummary *ts = tr->trackSummary();
+  	    if (ts){
+  	      npix = ts->get(Trk::numberOfPixelHits);
+  	      nsct = ts->get(Trk::numberOfSCTHits);
+	      ntrt = ts->get(Trk::numberOfTRTHits);
+  	      nscth= ts->get(Trk::numberOfSCTHoles);
+  	      npixh= ts->get(Trk::numberOfPixelHoles);
+	      
+  	    }
+  	  }
+  
+    	  msg() << MSG::DEBUG << "REGTEST: " << std::setw(5) << idtr
+    	      << "  pT:  " << std::setw(10) << tp->pt()
+    	      << "  eta: " << tp->eta()
+    	      << "  phi: " << tp->phi()
+    	      << "  d0:  " << tp->d0()
+    	      << "  z0:  " << tp->z0()
+    	      << "\t" << npix << "/" << nsct << "/" << ntrt << "//" << npixh << "/" << nscth
+    	      << endmsg;
+
+        }
+      }
+    }
+ 
+    
+    ATH_MSG_DEBUG("REGTEST container size = " << tpCont->size());
+
+    //    for (xAOD::TrackParticleContainer::iterator itr = tpCont->begin(); itr != tpCont->end(); ++itr)  {
+    //FillMonPerTrack(*itr, tmp_eta_roi, tmp_phi_roi);
+    //}
+
+    if (runAlg){
+      //+++ DQM (SA): per RoI quantities
+      //      FillMonPerRoi(roi, *tracks, tmp_eta_roi, tmp_phi_roi);
+      //++m_mon_counter;
+      
+      return StatusCode::SUCCESS;
+    } else {
+      return statCode;
+    }
+  }
+
+  ///////////////////////////////////////////////////////////////////
+  // Finalize
+  ///////////////////////////////////////////////////////////////////
+
+  StatusCode TrigTrackingxAODCnvMT::finalize() {
+
+    msg() << MSG::DEBUG << "finalize() success" << endmsg;
+    return StatusCode::SUCCESS;
+  }
+
+  //----------------------------------
+  //          endRun method:
+  //----------------------------------------------------------------------------
+  StatusCode TrigTrackingxAODCnvMT::endRun() {
+
+    msg() << MSG::INFO << "TrigTrackingxAODCnvMT::endRun()" << endmsg;
+
+    return StatusCode::SUCCESS;
+  }
+  //---------------------------------------------------------------------------
+
+
+  //---------------------------------------------------------------------------
+  //  update the monitoring arrays
+  //---------------------------------------------------------------------------
+  void TrigTrackingxAODCnvMT::FillMonPerTrack(const xAOD::TrackParticle *particle,
+					    const double &tmp_eta_roi, const double &tmp_phi_roi) {
+
+    //+++ Prescale
+    if (m_mon_counter != m_mon_prescale) return;
+
+    //+++ Common for all slices
+    float tmp_eta = -999;
+    float tmp_phi = -999;
+
+    tmp_eta = particle->eta();
+    tmp_phi = particle->phi();
+    m_dqm_d0.push_back(particle->d0());
+    m_dqm_z0.push_back(particle->z0());
+    m_dqm_eta.push_back(tmp_eta);
+    m_dqm_phi.push_back(tmp_phi);
+    m_dqm_qOverP.push_back(particle->qOverP());
+
+    uint8_t numberOfPixelHits = 0;
+    particle->summaryValue(numberOfPixelHits, xAOD::numberOfPixelHits);
+    m_dqm_npix_hits.push_back(static_cast<int>(numberOfPixelHits));
+    uint8_t numberOfSCTHits = 0;
+    particle->summaryValue(numberOfSCTHits, xAOD::numberOfSCTHits);
+    m_dqm_nsct_hits.push_back(static_cast<int>(numberOfSCTHits));
+    uint8_t numberOfTRTHits = 0;
+    particle->summaryValue(numberOfTRTHits, xAOD::numberOfTRTHits);
+    if (fabs(particle->eta())<1.9){
+      m_dqm_ntrt_hits.push_back(static_cast<int>(numberOfTRTHits));
+    } else {
+      m_dqm_ntrt_hits.push_back(-1);
+    }
+
+    uint8_t expectInnermostHit = 0;
+    particle->summaryValue(expectInnermostHit, xAOD::expectInnermostPixelLayerHit  );
+    uint8_t numberOfInnermostHits = 0;
+    particle->summaryValue(numberOfInnermostHits, xAOD::numberOfInnermostPixelLayerHits  );
+    if (numberOfInnermostHits>1) numberOfInnermostHits = 1;
+    if (expectInnermostHit>0){
+      m_dqm_ibl_hit_expected_found.push_back(float(numberOfInnermostHits));
+    }
+    else {
+      m_dqm_ibl_hit_expected_found.push_back(-1.);
+    }
+
+    if(particle->numberDoF()>0) {
+      m_dqm_chi2dof.push_back(particle->chiSquared() / particle->numberDoF());
+    }
+
+    m_dqm_eta_roi.push_back(tmp_eta_roi);
+    m_dqm_phi_roi.push_back(tmp_phi_roi);
+
+    //+++ Slice specific
+    if (m_mon_doSliceSpecific) {
+      if (m_slice_name == "Tau") {
+      	float tmp_deta = tmp_eta - tmp_eta_roi;
+      	float tmp_dphi = tmp_phi - tmp_phi_roi;
+      	float tmp_roidr = sqrt(tmp_deta*tmp_deta + tmp_dphi*tmp_dphi);
+      	m_dqm_ta_roidr.push_back(tmp_roidr);
+      }
+    }
+
+    return;
+  }
+
+  void TrigTrackingxAODCnvMT::fillIBLResidual(const Trk::Track *track){
+    
+    ATH_MSG_DEBUG("In fillIBLResidual");
+    const DataVector<const Trk::TrackStateOnSurface>* trackStates=track->trackStateOnSurfaces();    
+    
+    for (DataVector<const Trk::TrackStateOnSurface>::const_iterator it=trackStates->begin();
+	 it!=trackStates->end();
+	 it++) {
+      if (!(*it)) {
+	msg(MSG::WARNING) << "TrackStateOnSurface == Null" << endmsg;
+	continue;
+      }
+      
+      ATH_MSG_VERBOSE("type of state on surface" << (*it)->dumpType());
+      if ((*it)->type(Trk::TrackStateOnSurface::Measurement) ){
+	
+	ATH_MSG_VERBOSE ("try to get measurement for track state");
+	// Get pointer to measurement on track
+	const Trk::MeasurementBase *measurement = (*it)->measurementOnTrack();
+	
+	/*
+	ATH_MSG_VERBOSE("(*it)->trackParameters() " << (*it)->trackParameters());
+	if ((*it)->trackParameters() !=0)
+	  ATH_MSG_VERBOSE("  (*it)->trackParameters()->associatedSurface() " << &((*it)->trackParameters()->associatedSurface()));
+	*/
+
+	if(  (*it)->trackParameters() !=0 &&
+           /*&((*it)->trackParameters()->associatedSurface()) !=0 &&  */
+	     (*it)->trackParameters()->associatedSurface().associatedDetectorElement() !=0 && 
+	     (*it)->trackParameters()->associatedSurface().associatedDetectorElement()->identify() !=0 )
+	  {  
+	    
+	    Identifier id;
+	    id = (*it)->trackParameters()->associatedSurface().associatedDetectorElement()->identify();
+	    float zmod = (*it)->trackParameters()->associatedSurface().associatedDetectorElement()->center().z();
+	    if (m_idHelper->is_pixel(id)) 
+	      {
+		ATH_MSG_VERBOSE("Found pixel module : Associated track parameter");
+		if(m_pixelId->is_barrel(id)) 
+		  { 
+		    ATH_MSG_VERBOSE("Found pixel barrel");
+		    if(m_pixelId->layer_disk(id) == 0) 
+		      {
+			ATH_MSG_VERBOSE("Found Innermost Pixel Layer  " << id.get_compact());
+			
+			const Trk::ResidualPull* pull = m_residualCalc->residualPull(measurement,(*it)->trackParameters(),Trk::ResidualPull::Unbiased);
+			m_dqm_ibl_z.push_back(zmod);
+			if (pull){
+			  m_dqm_ibl_res_x.push_back(pull->residual()[Trk::locX]);
+			  m_dqm_ibl_res_y.push_back(pull->residual()[Trk::locY]);
+			  delete pull;
+			} else {
+			  msg(MSG::WARNING) << "Could not calculate the pulls" << endmsg;
+			  m_dqm_ibl_res_x.push_back(-1.);   //out of range of the profile
+			  m_dqm_ibl_res_y.push_back(-1.);
+			}
+		      }
+		  }
+	      }
+	  }
+      } else {
+	ATH_MSG_VERBOSE("Not a measurement type");
+      }
+    }
+   
+  }
+
+
+  void TrigTrackingxAODCnvMT::FillMonPerRoi(const TrigRoiDescriptor* roi, const TrackCollection* tracks, const double &tmp_eta_roi, const double &tmp_phi_roi) {
+
+    //+++ Prescale
+    if (m_mon_counter >= m_mon_prescale) {
+      m_mon_counter = 0;
+    } else {
+      return;
+    }
+
+
+    //+++ Common for all slices
+    if (tracks) m_dqm_ntrk = tracks->size();
+
+    if (roi)
+    {
+      m_roiEta = roi->eta();
+      m_roiEtaWidth = roi->etaPlus() - roi->etaMinus();
+      m_roiPhi = roi->phi();
+      m_roiPhiWidth = HLT::wrapPhi(roi->phiPlus() - roi->phiMinus());
+      m_roiZ = roi->zed();
+      m_roiZ_Width = roi->zedPlus() - roi->zedMinus();    
+    }
+
+    //+++ Slice specific
+    if (m_mon_doSliceSpecific) {
+      //+++ Bjet
+      if (m_slice_name == "Bjet") {
+        const Trk::Perigee* tmpMp = 0;
+	if (tracks) {
+          for (auto track : *tracks) {
+	    tmpMp = track->perigeeParameters();
+	    if (tmpMp) {
+	      m_dqm_bj_sumpt += tmpMp->pT()/1000;
+	    }
+	  }
+	}
+      //+++ Muon
+      } else if (m_slice_name == "Muon") {
+
+	m_dqm_mu_eta_roi = tmp_eta_roi;
+	m_dqm_mu_phi_roi = tmp_phi_roi;
+
+	//+++ Find leading track with pT > X
+	const Trk::Track* tpL = 0;
+	const Trk::Perigee* tmpMp = 0;
+	float tmp_pt_max = 0;
+	if (tracks) {
+          for (auto track : *tracks) {
+	    tmpMp = track->perigeeParameters();
+	    if (tmpMp) {
+	      float tmp_pt = tmpMp->pT()/1000;
+	      if ((tmp_pt > tmp_pt_max) && (tmp_pt > m_mon_ptmin)) {
+		tpL = track;
+		tmp_pt_max = tmp_pt;
+	      }
+	    }
+	  }
+	}
+
+	//+++ Fill leading histograms
+	const Trk::TrackSummary * tmpSum = 0;
+	const Trk::FitQuality *   tmpQty = 0;
+	if (tpL) {
+	  tmpMp = tpL->perigeeParameters();
+	  tmpSum = tpL->trackSummary();
+	  tmpQty = tpL->fitQuality();
+	}
+	if (tmpMp){
+	  m_dqm_mu_d0 = tmpMp->parameters()[Trk::d0];
+	  m_dqm_mu_z0 = tmpMp->parameters()[Trk::z0];
+	  m_dqm_mu_phi = tmpMp->parameters()[Trk::phi];
+	  m_dqm_mu_eta = tmpMp->eta();
+	  m_dqm_mu_qOverP = tmpMp->parameters()[Trk::qOverP];
+	  m_dqm_mu_pt = tmpMp->pT();
+	}
+	if (tmpSum){
+	  m_dqm_mu_npix_hits = tmpSum->get(Trk::numberOfPixelHits);
+	  m_dqm_mu_nsct_hits = tmpSum->get(Trk::numberOfSCTHits);
+	  m_dqm_mu_ntrt_hits = tmpSum->get(Trk::numberOfTRTHits);
+	}
+	if (tmpQty){
+	  if (tmpQty->numberDoF()>0) m_dqm_mu_chi2dof = tmpQty->chiSquared() / tmpQty->numberDoF();
+	}
+      //+++ Tau
+      } else if (m_slice_name == "Tau") {
+
+	//+++ Find L and NL pT track and sum charge
+	const Trk::Track* tpL = 0;
+	const Trk::Track* tpNL = 0;
+	const Trk::Perigee* tmpLMp = 0;
+	const Trk::Perigee* tmpNLMp = 0;
+	float tmp_pt_max = 0;
+	int tmp_pos_ch = 0;
+	int tmp_neg_ch = 0;
+	float tmp_px = 0;
+	float tmp_py = 0;
+	float tmp_pz = 0;
+	float tmp_e  = 0;
+	if (tracks) {
+          for (auto track : *tracks) {
+	    tmpLMp = track->perigeeParameters();
+	    if (tmpLMp) {
+	      float tmp_qOverP = tmpLMp->parameters()[Trk::qOverP];
+	      float tmp_p  = 0;
+	      if (tmp_qOverP != 0) tmp_p  = fabs(1/tmp_qOverP)/1000;
+	      float tmp_pt = tmp_p*sin(tmpLMp->parameters()[Trk::theta]);
+	      tmp_px += tmp_pt*cos(tmpLMp->parameters()[Trk::phi]);
+	      tmp_py += tmp_pt*sin(tmpLMp->parameters()[Trk::phi]);
+	      tmp_pz += tmp_p*cos(tmpLMp->parameters()[Trk::theta]);
+	      tmp_e  += sqrt(tmp_p*tmp_p + 0.140*0.140);  // All tracks get the pi mass
+	      if ((tmp_pt > tmp_pt_max) && (tmp_pt > m_mon_ptmin)) {
+		tpNL = tpL;
+		tpL  = track;
+		tmp_pt_max = tmp_pt;
+	      }
+	      if (tmp_qOverP < 0) {
+		++tmp_neg_ch;
+	      } else {
+		++tmp_pos_ch;
+	      }
+	    }
+	  }
+	}
+
+	//+++ Fill m and pT of L and NL track
+	float tmp_p2 = tmp_px*tmp_px + tmp_py*tmp_py + tmp_pz*tmp_pz;
+	float tmp_m2 = tmp_e*tmp_e - tmp_p2;
+	if (tmp_m2 >= 0) m_dqm_ta_m = sqrt( tmp_m2 );
+	if (tpL)  tmpLMp = tpL->perigeeParameters();
+	if (tpNL)  tmpNLMp = tpNL->perigeeParameters();
+	if (tmpLMp){
+	  m_dqm_ta_L_pt = tmpLMp->pT()/1000;
+	  if (tmpNLMp) {
+	    float tmp_NL_pt = tmpNLMp->pT()/1000;
+	    if (m_dqm_ta_L_pt!=0) m_dqm_ta_frac_pt = tmp_NL_pt / m_dqm_ta_L_pt;
+	  }
+	}
+
+	//+++ Charge Asymmetry
+        float tmp_sumpart = tmp_pos_ch + tmp_neg_ch;
+        if (tmp_sumpart != 0) {
+          m_dqm_ta_sum_ch = tmp_pos_ch - tmp_neg_ch;
+          m_dqm_ta_asy_ch = m_dqm_ta_sum_ch / tmp_sumpart;
+        } else {
+          m_dqm_ta_asy_ch = -999;
+        }
+
+
+      }
+    }
+
+    return;
+  }
+
+  void TrigTrackingxAODCnvMT::ResetMon() {
+
+    // Common
+    m_dqm_d0.clear();
+    m_dqm_z0.clear();
+    m_dqm_phi.clear();
+    m_dqm_eta.clear();
+    m_dqm_qOverP.clear();
+    m_dqm_npix_hits.clear();
+    m_dqm_nsct_hits.clear();
+    m_dqm_ntrt_hits.clear();
+    m_dqm_chi2dof.clear();
+    m_dqm_eta_roi.clear();
+    m_dqm_phi_roi.clear();
+    m_dqm_ntrkpart = 0;
+    m_dqm_ntrk = 0;
+    m_dqm_nvertex = 0;
+
+    m_dqm_ibl_z.clear();
+    m_dqm_ibl_res_x.clear();
+    m_dqm_ibl_res_y.clear();
+    m_dqm_ibl_hit_expected_found.clear();
+
+    // Bjet
+    m_dqm_bj_sumpt = 0;
+
+    // Muon
+    m_dqm_mu_d0 = -999;
+    m_dqm_mu_z0 = -999;
+    m_dqm_mu_eta = -999;
+    m_dqm_mu_phi = -999;
+    m_dqm_mu_qOverP = -999;
+    m_dqm_mu_pt = -999999;
+    m_dqm_mu_npix_hits = 0;
+    m_dqm_mu_nsct_hits = 0;
+    m_dqm_mu_ntrt_hits = 0;
+    m_dqm_mu_chi2dof = -999;
+    m_dqm_mu_eta_roi = -999;
+    m_dqm_mu_phi_roi = -999;
+    // Tau
+    m_dqm_ta_roidr.clear();
+    m_dqm_ta_L_pt = 0;
+    m_dqm_ta_frac_pt = 0;
+    m_dqm_ta_sum_ch = -999;
+    m_dqm_ta_asy_ch = -999;
+    m_dqm_ta_m = -999;
+
+    return;
+  }
+
+
+} // end namespace
+
+
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.h
new file mode 100644
index 0000000000000000000000000000000000000000..31a5538407551f325b53e27752708020de9bd8b1
--- /dev/null
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/TrigTrackingxAODCnvMT.h
@@ -0,0 +1,147 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/////////////////////////////////////////////////////////////////////////////
+/**
+// filename: TrigTrackingxAODCnv.h
+//
+// author: Jiri Masik
+//         Jiri.Masik@manchester.ac.uk
+//
+//
+// -------------------------------
+// ATLAS Collaboration
+*/
+////////////////////////////////////////////////////////////////////////////
+
+#ifndef INDETTRIGPARTICLECREATION_TRACKINGXAODCNVMT_H
+#define INDETTRIGPARTICLECREATION_TRACKINGXAODCNVMT_H
+
+#include "GaudiKernel/ToolHandle.h"
+
+// Base class
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+
+
+#include "TrkTrack/TrackCollection.h"
+
+//!< Trigger specific stuff
+#include "TrigInterfaces/FexAlgo.h"
+
+// STL
+#include <map>
+#include <string>
+
+class StoreGateSvc;
+class TH1F;
+class AtlasDetectorID;
+class Identifier;
+class PixelID;
+ 
+
+namespace Trk {
+  class ITrackParticleCreatorTool;
+  class IResidualPullCalculator;
+}
+
+
+
+namespace InDet
+{
+
+
+  class TrigTrackingxAODCnvMT : public AthAlgorithm
+  {
+  public:
+    TrigTrackingxAODCnvMT(const std::string &name, ISvcLocator *pSvcLocator);
+    virtual ~TrigTrackingxAODCnvMT();
+    StatusCode beginRun();
+    StatusCode initialize();
+    StatusCode execute();
+    StatusCode finalize();
+    StatusCode endRun();
+
+  private:
+    void ResetMon();
+    void FillMonPerTrack(const xAOD::TrackParticle *, const double&, const double&);
+    void FillMonPerRoi(const TrigRoiDescriptor* , const TrackCollection* tracks, const double&, const double&);
+    void fillIBLResidual(const Trk::Track *track);
+
+  private:
+    ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreatorTool;
+    ToolHandle< Trk::IResidualPullCalculator > m_residualCalc;
+    const AtlasDetectorID* m_idHelper;
+    const PixelID* m_pixelId;
+
+    bool                         m_doIBLresidual;
+
+    //Monitoring
+    std::string                  m_slice_name;
+    bool                         m_mon_doSliceSpecific;
+    int                          m_mon_counter;
+    int                          m_mon_prescale;
+    float                        m_mon_ptmin;
+    //Common Variables
+    std::vector<float>          m_dqm_d0;
+    std::vector<float>          m_dqm_z0;
+    std::vector<float>          m_dqm_phi;
+    std::vector<float>          m_dqm_eta;
+    std::vector<float>          m_dqm_qOverP;
+    std::vector<int>            m_dqm_npix_hits;
+    std::vector<int>            m_dqm_nsct_hits;
+    std::vector<int>            m_dqm_ntrt_hits;
+    std::vector<float>          m_dqm_chi2dof;
+    std::vector<float>          m_dqm_eta_roi;
+    std::vector<float>          m_dqm_phi_roi;
+    double                      m_roiPhi, m_roiEta, m_roiZ;
+    double                      m_roiPhiWidth, m_roiEtaWidth, m_roiZ_Width;
+    int                         m_dqm_ntrkpart;
+    int                         m_dqm_ntrk;
+    int                         m_dqm_nvertex;
+    //Bjet
+    float                       m_dqm_bj_sumpt;
+    //Muon
+    float                       m_dqm_mu_d0;
+    float                       m_dqm_mu_z0;
+    float                       m_dqm_mu_eta;
+    float                       m_dqm_mu_phi;
+    float                       m_dqm_mu_qOverP;
+    float                       m_dqm_mu_pt;
+    int                         m_dqm_mu_npix_hits;
+    int                         m_dqm_mu_nsct_hits;
+    int                         m_dqm_mu_ntrt_hits;
+    float                       m_dqm_mu_chi2dof;
+    float                       m_dqm_mu_eta_roi;
+    float                       m_dqm_mu_phi_roi;
+    //Tau
+    std::vector<float>          m_dqm_ta_roidr;
+    float                       m_dqm_ta_L_pt;    //+++ pT of leading (L) pT track
+    float                       m_dqm_ta_frac_pt; //+++ fraction pT_L/pT_NL, NL= next-to-leading
+    float                       m_dqm_ta_sum_ch;  //+++ Charge sum all tracks
+    float                       m_dqm_ta_asy_ch;  //+++ Charge asymmetry all tracks
+    float                       m_dqm_ta_m;       //+++ Inv mass all tracks
+
+    //
+    std::vector<float>          m_dqm_ibl_z;         //IBL coordinate along z 
+    std::vector<float>          m_dqm_ibl_res_x;
+    std::vector<float>          m_dqm_ibl_res_y;
+    std::vector<float>          m_dqm_ibl_hit_expected_found;
+
+    //Timers
+    TrigTimer* m_timerMemAlloc;
+    TrigTimer* m_timerFeatureAttach;
+    TrigTimer* m_timerTrackConversion;
+
+
+    SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey;
+    SG::ReadHandleKey<TrackCollection> m_trackKey;
+    SG::WriteHandleKey<xAOD::TrackParticleContainer> m_trackParticleKey;
+
+  };
+
+}
+
+#endif
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/components/InDetTrigParticleCreation_entries.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/components/InDetTrigParticleCreation_entries.cxx
index 849925de2e199335c6e01f2db3143cf9643f79fd..17d6de6d0ac315ee5915f4c80add7813ce30f62b 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/components/InDetTrigParticleCreation_entries.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigParticleCreation/src/components/InDetTrigParticleCreation_entries.cxx
@@ -1,6 +1,7 @@
 #include "GaudiKernel/DeclareFactoryEntries.h"
 #include "InDetTrigParticleCreation/TrigParticleCreator.h"
 #include "InDetTrigParticleCreation/TrigTrackingxAODCnv.h"
+#include "../TrigTrackingxAODCnvMT.h"
 #include "InDetTrigParticleCreation/TrigVertexxAODCnv.h"
 #include "TrkTrack/Track.h"
 
@@ -8,6 +9,7 @@ using namespace InDet;
 
 DECLARE_ALGORITHM_FACTORY( TrigParticleCreator )
 DECLARE_ALGORITHM_FACTORY( TrigTrackingxAODCnv )
+DECLARE_ALGORITHM_FACTORY( TrigTrackingxAODCnvMT )
 DECLARE_ALGORITHM_FACTORY( TrigVertexxAODCnv )
 
 /** factory entries need to have the name of the package */
@@ -15,5 +17,6 @@ DECLARE_FACTORY_ENTRIES( InDetTrigParticleCreation )
 {
     DECLARE_ALGORITHM( TrigParticleCreator )
     DECLARE_ALGORITHM( TrigTrackingxAODCnv )
+    DECLARE_ALGORITHM( TrigTrackingxAODCnvMT )
     DECLARE_ALGORITHM( TrigVertexxAODCnv )
 }
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/FTK_TrackMaker.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/FTK_TrackMaker.h
index 6f63495a41af84bd0def65757e53457186cf9148..c0bcc7a1777d979a6e2631afb74931d373b068bd 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/FTK_TrackMaker.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/FTK_TrackMaker.h
@@ -1,17 +1,5 @@
 /*
   Copyright (C) 1995-2017 CERN for the benefit of the ATLAS collaboration
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
 */
 
 /////////////////////////////////////////////////////////////////////////////
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/doc/packagedoc.h
index 79c87f2a3e3e7e5c153251b5f0d81a5c67e0e297..861903ddfae9d3347691be6cdd330b2127bbd62a 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/doc/packagedoc.h
@@ -78,10 +78,4 @@ They can be changed via jobOptions.
 </li>
 </ul>
 
-
-@section InDetTrigPrepRawDataFormat_used_InDetTrigPrepRawDataFormat Used Packages
-
-@section InDetTrigPrepRawDataFormat_requirements_InDetTrigPrepRawDataFormat requirements
-
-
 */
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/FTK_TrackMaker.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/FTK_TrackMaker.cxx
index cf1a731eb8d63cf1e9c91aaa9341133a7525f7bc..e2d5c99994e3b73e99d1e47930329825f2661515 100755
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/FTK_TrackMaker.cxx
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/FTK_TrackMaker.cxx
@@ -1,17 +1,5 @@
 /*
   Copyright (C) 1995-2017 CERN for the benefit of the ATLAS collaboration
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
 */
 
 //***************************************************************************
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPriVxFinder/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPriVxFinder/doc/packagedoc.h
index eab4163da1fe09fce80b5ebf3f7a910ed640c7b7..986220a7b21d1e05b43885757368c1098c46dc5c 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPriVxFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPriVxFinder/doc/packagedoc.h
@@ -42,9 +42,7 @@ can be found in InDetPriVxFinder.
 InDetTrigPriVxFinder contains the following files/classes:
 - TrigVxPrimary.cxx ... the algoritm which steers the vertex fit
 
-@section InDetTrigPriVxFinder_used_packagesInDetTrigPriVxFinder used packages
 
-@section InDetTrigPriVxFinder_requirements Requirements
 
 \namespace Vtx
 A namespace for all vertexing packages and related stuff.
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/doc/packagedoc.h
index b0a69fb59538f7c763fcf2f98d920484431e8e6e..5bf9ce8ca77831cc157e1e35079887cc68b70af9 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTrackPRD_Association/doc/packagedoc.h
@@ -12,7 +12,5 @@ This algorithm is devoted to track - PRD assocoation.
 
 This algorithm uses Trk::IPRD_AssociationTool
 
-@section InDetTrigTrackPRD_Association_InDetTrigTrackPRD_AssociationReq Requirements file
 
 */
-
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigTruthAlgs/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigTruthAlgs/doc/packagedoc.h
index 94726e8cfa1060e0dec4c61b0f109a4246e66160..23a45b1351e24468f96905e651fbbea8878ce7e7 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigTruthAlgs/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigTruthAlgs/doc/packagedoc.h
@@ -45,6 +45,5 @@ the information of all the other sources that also contribute is lost.
    TrackParticleTruth and fills both objects in a map. It is based on
    the truth of the Track contained in the TrackParticle.
 
-@section InDetTrigTruthAlgs_InDetTrigTruthAlgsReq Requirements
 
 */
diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/doc/packagedoc.h
index 0e2f07ae4efb51edbc15a89b0409ab61c88f16e6..b240bc06e9da81f4343ad8505c5ba32321fe4299 100644
--- a/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigVxSecondary/doc/packagedoc.h
@@ -67,6 +67,5 @@ a given vertex candidate and fit again. Please refer to the
 documentation for InDetVKalVxInJetTool for further details specific to
 the default offline vertex finder.
 
-@section InDetTrigVxSecondary_InDetTrigVxSecondaryReq Requirements
 
 */
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/doc/packagedoc.h
index cce3fdc613f4a9f666dcff31b14b88a2b9c80c2a..3ce0c1d5ba34b44f741b6cafd20bdc741af6a8d7 100644
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSPSeededTrackFinder/doc/packagedoc.h
@@ -24,8 +24,6 @@ It can operate in RoI driven or full-scan mode (m_doFullScan). In the
 latter RegionSelector is used to obtain list of SCT and Pixel detector
 elements.
 
-@section SiTrigSPSeededTrackFinder_used_packagesSiTrigSPSeededTrackFinder Used packages
 
-@section SiTrigSPSeededTrackFinder_SiTrigSPSeededTrackFinderReq Requirements file
 
 */
diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/doc/packagedoc.h
index 2e0c60ac69568f33c892726a84140872e4ebca1f..df6062ee4ed336d70a2c622d9f02746077f1ced6 100644
--- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/doc/packagedoc.h
@@ -32,6 +32,5 @@ reconstruction.
    SiElementProperties in order to access, for the SCT, the backside wafer
    of a given module and the neighbour ones from other modules.
 
-@section SiTrigSpacePointFormation_SiTrigSpacePointFormationReq Requirements
 
 */
diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/doc/packagedoc.h
index a756035c44f876c5b52e81e210f3a1f732ae8fb2..ec3b7b9e9cecbb8ffd57fff69631e149743472bc 100644
--- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigSeededTrackFinder/doc/packagedoc.h
@@ -27,8 +27,6 @@ This algorithm performs the following tasks:
     track fitter.</li>
 </ul>
 
-@section TRT_TrigSeededTrackFinder_used_packagesTRT_TrigSeededTrackFinder used packages
 
-@section TRT_TrigSeededTrackFinder_TRT_TrigSeededTrackFinder Req Requirements file
 
 */
diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/doc/packagedoc.h
index 54c3ff27e17e67611d993cf431b1118bbf628dde..dc82eb34b73e76207445bc50e770c75cb24c3733 100644
--- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigStandaloneTrackFinder/doc/packagedoc.h
@@ -42,9 +42,7 @@ The TRT_TrigStandaloneTrackFinder contains the following classes/files:
 
 - TRT_TrigStandaloneTrackFinder.cxx...Main class calling all the necessary tools and producing the ouput track collection.
 
-@section TRT_TrigStandaloneTrackFinder_TRT_TrigStandaloneTrackFinderPackages Used Packages
 
 
-@section TRT_TrigStandaloneTrackFinder_TRT_TrigStandaloneTrackFinderReq Requirements file
 
 */
diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackExtensionAlg/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackExtensionAlg/doc/packagedoc.h
index 6a9120cf44f80ecfd67cdd75640e7b45b8bcc2ad..907a56d0d5b011a358648b61e9cad61da78b1821 100644
--- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackExtensionAlg/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackExtensionAlg/doc/packagedoc.h
@@ -16,8 +16,6 @@ TrackExtensionMap.
 This algorithm uses standard ITRT_TrackExtensionTool and should know 
 input tracks location and extended track location.
 
-@section TRT_TrigTrackExtensionAlg_used_packagesTRT_TrigTrackExtensionAlg used packages
 
-@section TRT_TrigTrackExtensionAlg_TRT_TrigTrackExtensionAlgReq Requirements file
 
 */
diff --git a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/doc/packagedoc.h b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/doc/packagedoc.h
index e1979915f83a6e308e36a1aac75a487483afcfac..e7aa656ac1d6f8ac5a5f4a918571a8ff42c8cc52 100644
--- a/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecAlgs/TRT_TrigTrackSegmentsFinder/doc/packagedoc.h
@@ -15,8 +15,6 @@ TRT_TrackSegmentsFinder in the offline.
 
 This algorithm uses standard ITRT_TrackSegmentsMaker tool.
 
-@section TRT_TrigTrackSegmentsFinder_TRT_TrigTrackSegmentsFinderReq Requirements file
 
-@section TRT_TrigTrackSegmentsFinder_used_packagesTRT_TrigTrackSegments Used packages
 
 */
diff --git a/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/doc/packagedoc.h b/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/doc/packagedoc.h
index 8f52b67158acc7c9bc8595a59059b9249bde4be5..14f96c2409be1222e8e9120642caac850c80d9f9 100644
--- a/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/doc/packagedoc.h
+++ b/InnerDetector/InDetTrigRecTools/InDetTrigToolInterfaces/doc/packagedoc.h
@@ -42,9 +42,4 @@ SiTrigSpacePointFormation.
 
 </li>
 
-@section InDetTrigToolInterfaces_used_InDetTrigToolInterfaces Used Packages
-
-@section InDetTrigToolInterfaces_requirements_InDetTrigToolInterfaces requirements
-
-
 */
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/CMakeLists.txt b/InnerDetector/InDetTruth/InDetTruthAlgs/CMakeLists.txt
index 1b979b49f81a5362102dd6410be8fea1d3e28bee..7ceb60cba20bb6adb1433d184f4e92d8f0da51ad 100644
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/CMakeLists.txt
+++ b/InnerDetector/InDetTruth/InDetTruthAlgs/CMakeLists.txt
@@ -15,17 +15,16 @@ atlas_depends_on_subdirs( PUBLIC
                           InnerDetector/InDetTruth/InDetTruthInterfaces
                           Tracking/TrkEvent/TrkTruthData
                           Tracking/TrkTools/TrkToolInterfaces
+                          Event/EventContainers
                           PRIVATE
                           Control/DataModel
-                          Reconstruction/Particle
-                          Reconstruction/ParticleTruth
                           Tracking/TrkEvent/TrkTrack )
 
 # Component(s) in the package:
 atlas_add_component( InDetTruthAlgs
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests GaudiKernel InDetSimData InDetPrepRawData TrkTruthData TrkToolInterfaces DataModel Particle ParticleTruth TrkTrack )
+                     LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests GaudiKernel InDetSimData InDetPrepRawData TrkTruthData TrkToolInterfaces DataModel TrkTrack EventContainers )
 
 # Install files from the package:
 atlas_install_headers( InDetTruthAlgs )
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/InDetDetailedTrackTruthMaker.h b/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/InDetDetailedTrackTruthMaker.h
index 0a002b9de90e8d51c64ca857391e46d273257117..264c084ed3b022b2b4b8ca00687a116d7278827d 100755
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/InDetDetailedTrackTruthMaker.h
+++ b/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/InDetDetailedTrackTruthMaker.h
@@ -7,12 +7,15 @@
 
 #include <string>
 
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
 
-#include "TrkToolInterfaces/IDetailedTrackTruthBuilder.h"
+#include "TrkTruthData/DetailedTrackTruthCollection.h"
+#include "TrkTrack/TrackCollection.h"
 
-#include "StoreGate/ReadHandleKey.h"
+#include "TrkToolInterfaces/IDetailedTrackTruthBuilder.h"
 
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 
@@ -21,30 +24,30 @@ namespace InDet {
 /**
  * This algorithm produces track truth data using InDet PRD truth collections.
  * Calls a DetailedTrackTruthBuilder tool that does the actual job.
- * 
- * @author Andrei Gaponenko <agaponenko@lbl.gov> 
+ *
+ * @author Andrei Gaponenko <agaponenko@lbl.gov>
  */
 
-class InDetDetailedTrackTruthMaker : public AthAlgorithm  {
-  
+class InDetDetailedTrackTruthMaker : public AthReentrantAlgorithm  {
+
 public:
   InDetDetailedTrackTruthMaker(const std::string &name,ISvcLocator *pSvcLocator);
-  
+
   virtual StatusCode initialize();
-  virtual StatusCode execute();
+  virtual StatusCode execute_r(const EventContext &ctx) const;
   virtual StatusCode finalize();
-  
+
 private:
   // PRD inputs
-  std::string m_PRDTruthNamePixel;
+  SG::ReadHandleKey<PRD_MultiTruthCollection> m_PRDTruthNamePixel;
   SG::ReadHandleKey<PRD_MultiTruthCollection> m_PRDTruthNameSCT;
-  std::string m_PRDTruthNameTRT;
+  SG::ReadHandleKey<PRD_MultiTruthCollection> m_PRDTruthNameTRT;
   // Track input
-  std::string m_trackCollectionName;
+  SG::ReadHandleKey<TrackCollection>          m_trackCollectionName;
 
   // DetailedTrackTruthCollection output
-  std::string m_detailedTrackTruthName;
-  
+  SG::WriteHandleKey<DetailedTrackTruthCollection> m_detailedTrackTruthName;
+
   // Tool Handle for truth tool
   ToolHandle<Trk::IDetailedTrackTruthBuilder> m_truthTool;
 
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/PRD_MultiTruthMaker.h b/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/PRD_MultiTruthMaker.h
index 032f96621323fe86b6062947fc05cdf52d061c78..18c533ea048f8f2f6d98a3da4626cae6eb96636b 100755
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/PRD_MultiTruthMaker.h
+++ b/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/PRD_MultiTruthMaker.h
@@ -10,11 +10,12 @@
 
 #include <string>
 
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
 
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 #include "InDetTruthInterfaces/IPRD_MultiTruthBuilder.h"
+#include "InDetPrepRawData/TRT_DriftCircleContainer.h"
 
 #include "StoreGate/ReadHandleKey.h"
 #include "StoreGate/WriteHandleKey.h"
@@ -23,27 +24,27 @@
 
 namespace InDet {
 
-class PRD_MultiTruthMaker : public AthAlgorithm  {
-  
+class PRD_MultiTruthMaker : public AthReentrantAlgorithm  {
+
 public:
   PRD_MultiTruthMaker(const std::string &name,ISvcLocator *pSvcLocator);
 
   virtual StatusCode initialize();
-  virtual StatusCode execute();
+  virtual StatusCode execute_r(const EventContext &ctx) const;
   virtual StatusCode finalize();
-  
+
 private:
-  
-  std::string m_PixelClustersName;
-  SG::ReadHandleKey<InDet::SiClusterContainer> m_SCTClustersName;
-  std::string m_TRTDriftCircleContainerName; 
-  std::string m_simDataMapNamePixel;
-  SG::ReadHandleKey<InDetSimDataCollection> m_simDataMapNameSCT;
-  std::string m_simDataMapNameTRT;
-
-  std::string m_PRDTruthNamePixel;
+
+  SG::ReadHandleKey<InDet::SiClusterContainer>       m_PixelClustersName;
+  SG::ReadHandleKey<InDet::SiClusterContainer>       m_SCTClustersName;
+  SG::ReadHandleKey<InDet::TRT_DriftCircleContainer> m_TRTDriftCircleContainerName;
+  SG::ReadHandleKey<InDetSimDataCollection>          m_simDataMapNamePixel;
+  SG::ReadHandleKey<InDetSimDataCollection>          m_simDataMapNameSCT;
+  SG::ReadHandleKey<InDetSimDataCollection>          m_simDataMapNameTRT;
+
+  SG::WriteHandleKey<PRD_MultiTruthCollection> m_PRDTruthNamePixel;
   SG::WriteHandleKey<PRD_MultiTruthCollection> m_PRDTruthNameSCT;
-  std::string m_PRDTruthNameTRT;
+  SG::WriteHandleKey<PRD_MultiTruthCollection> m_PRDTruthNameTRT;
 
   ToolHandle<InDet::IPRD_MultiTruthBuilder> m_PRDTruthTool;
 
@@ -53,14 +54,14 @@ private:
 			 PRD_Container_Iterator collections_begin,
 			 PRD_Container_Iterator collections_end,
 			 const InDetSimDataCollection* simDataMap,
-			 bool pixels);
-    
+			 bool pixels) const;
+
   template<class PRD_Collection_Iterator>
   void addPRDRange (PRD_MultiTruthCollection* prdTruth,
 		    PRD_Collection_Iterator range_begin,
 		    PRD_Collection_Iterator range_end,
 		    const InDetSimDataCollection* simDataMap,
-		    bool pixels);
+		    bool pixels) const;
 
 };
 
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/TrackParticleTruthMaker.h b/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/TrackParticleTruthMaker.h
deleted file mode 100755
index f9a30f186399c121ac8e46b3059a8ec157f79996..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/InDetTruthAlgs/TrackParticleTruthMaker.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// TrackParticleTruthMaker.h
-//   Header file for class TrackParticleTruthMaker
-///////////////////////////////////////////////////////////////////
-
-#ifndef TRUTHPARTICLEALGS_TRACKPARTICLETRUTHMAKER_H
-#define TRUTHPARTICLEALGS_TRACKPARTICLETRUTHMAKER_H
-
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include <string>
-
-namespace InDet {
-
-class TrackParticleTruthMaker : public AthAlgorithm  {
-
-public:
-
-  // Constructor with parameters:
-  TrackParticleTruthMaker(const std::string &name,ISvcLocator *pSvcLocator);
-
-  ///////////////////////////////////////////////////////////////////
-  // Non-const methods:
-  ///////////////////////////////////////////////////////////////////
-
-  // Basic algorithm methods:
-  virtual StatusCode initialize();
-  virtual StatusCode execute();
-  virtual StatusCode finalize();
-
-  ///////////////////////////////////////////////////////////////////
-  // Private methods:
-  ///////////////////////////////////////////////////////////////////
-private:
-  TrackParticleTruthMaker();
-  TrackParticleTruthMaker(const TrackParticleTruthMaker&);
-  TrackParticleTruthMaker &operator=(const TrackParticleTruthMaker&);
-  
-  ///////////////////////////////////////////////////////////////////
-  // Private data:
-  ///////////////////////////////////////////////////////////////////
-private:
-
-  std::string m_trackParticlesName;
-  std::string m_trackParticleTruthCollection;
-  std::string m_tracksName;
-  std::string m_tracksTruthName;
-
-};
-
-} // namespace InDet
-
-
-#endif //TRUTHPARTICLEALGS_TRACKPARTICLETRUTHMAKER_H
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/cmt/requirements b/InnerDetector/InDetTruth/InDetTruthAlgs/cmt/requirements
deleted file mode 100755
index cb59ecc72c3925df31dbeb8486146dbf4c094765..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package InDetTruthAlgs
-author Maria Jose Costa <Maria.Jose.Costa@cern.ch>
-
-public
-
-use AtlasPolicy		 AtlasPolicy-*
-use AthenaBaseComps      AthenaBaseComps-*         Control 
-use GaudiInterface       GaudiInterface-*          External
-use TrkTruthData 	 TrkTruthData-* 	   Tracking/TrkEvent
-use TrkToolInterfaces    TrkToolInterfaces-*       Tracking/TrkTools
-use InDetTruthInterfaces InDetTruthInterfaces-*    InnerDetector/InDetTruth
-
-apply_pattern component_library
-
-library InDetTruthAlgs *.cxx components/*.cxx
-
-private
-
-use DataModel 	         DataModel-*               Control
-use Particle             Particle-*                Reconstruction
-use ParticleTruth        ParticleTruth-*           Reconstruction
-use TrkTrack             TrkTrack-*                Tracking/TrkEvent
-use InDetSimData         InDetSimData-*            InnerDetector/InDetRawEvent
-use InDetPrepRawData     InDetPrepRawData-*        InnerDetector/InDetRecEvent
-
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/doc/packagedoc.h b/InnerDetector/InDetTruth/InDetTruthAlgs/doc/packagedoc.h
index 050918ecbaa663d68c309f50963bd3b4efc8b6e7..8aea5a803c158b61ba5a55c7214deb92f714abe6 100644
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/doc/packagedoc.h
+++ b/InnerDetector/InDetTruth/InDetTruthAlgs/doc/packagedoc.h
@@ -11,15 +11,15 @@
 This package contains the algorithms to create the truth objects and the
 maps objects that connect the truth and the reconstructed objects.
 
-For each of the reconstructed objects (PrepRawData, SpacePoint, Track and
-TrackParticle) there is a truth object associated with it. The truth object is 
-meant to point to the source that contributed the most to the creation of 
-that object, where source here stands for either noise or a generated 
-particle. It contains then a HepMcParticleLink object (dominant source) 
-and a probability to indicate what was the contribution of this source to 
-the creation of the reconstructed object. 
-
-Note that a decision is taken in the algorithms filling the truth since 
+For each of the reconstructed objects (PrepRawData, SpacePoint and Track)
+there is a truth object associated with it. The truth object is
+meant to point to the source that contributed the most to the creation of
+that object, where source here stands for either noise or a generated
+particle. It contains then a HepMcParticleLink object (dominant source)
+and a probability to indicate what was the contribution of this source to
+the creation of the reconstructed object.
+
+Note that a decision is taken in the algorithms filling the truth since
 the information of all the other sources that also contribute is lost.
 
 @section InDetTruthAlgs_InDetTruthAlgsOverview Algorithm Overview
@@ -32,10 +32,4 @@ the information of all the other sources that also contribute is lost.
      DetailedTrackTruthCollection. It is based on the truth of all the
      PrepRawData objects contained in the Track.
 
-   - TrackParticleTruthMaker: For each TrackParticle it creates the
-   TrackParticleTruth and fills both objects in a map. It is based on
-   the truth of the Track contained in the TrackParticle.
-
-@section InDetTruthAlgs_InDetTruthAlgsReq Requirements
-
 */
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/src/InDetDetailedTrackTruthMaker.cxx b/InnerDetector/InDetTruth/InDetTruthAlgs/src/InDetDetailedTrackTruthMaker.cxx
index e72f81837d4da3617e32c92d4b795c1c33b8a7f2..9262a1c5cb52275a53ac2702d45ea2b29fc22723 100755
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/src/InDetDetailedTrackTruthMaker.cxx
+++ b/InnerDetector/InDetTruth/InDetTruthAlgs/src/InDetDetailedTrackTruthMaker.cxx
@@ -6,10 +6,6 @@
 // A. Gaponenko, 2006
 
 #include "InDetTruthAlgs/InDetDetailedTrackTruthMaker.h"
-#include "TrkTruthData/DetailedTrackTruthCollection.h"
-#include "TrkTrack/TrackCollection.h"
-
-#include "StoreGate/ReadHandle.h"
 
 #include <iterator>
 
@@ -17,14 +13,19 @@ namespace InDet {
 
 //================================================================
 InDetDetailedTrackTruthMaker::InDetDetailedTrackTruthMaker(const std::string &name, ISvcLocator *pSvcLocator) :
-  AthAlgorithm(name,pSvcLocator),
+  AthReentrantAlgorithm(name,pSvcLocator),
+  m_PRDTruthNamePixel("PRD_MultiTruthPixel"),
+  m_PRDTruthNameSCT("PRD_MultiTruthSCT"),
+  m_PRDTruthNameTRT("PRD_MultiTruthTRT"),
+  m_trackCollectionName("Tracks"),
+  m_detailedTrackTruthName("DetailedTrackTruth"),
   m_truthTool("Trk::DetailedTrackTruthBuilder")
-{  
-  declareProperty("TruthNamePixel",          m_PRDTruthNamePixel      = "PRD_MultiTruthPixel");
-  declareProperty("TruthNameSCT",            m_PRDTruthNameSCT        = std::string("PRD_MultiTruthSCT"));
-  declareProperty("TruthNameTRT",            m_PRDTruthNameTRT        = "PRD_MultiTruthTRT");
-  declareProperty("TrackCollectionName",     m_trackCollectionName    = "Tracks");
-  declareProperty("DetailedTrackTruthName",  m_detailedTrackTruthName = "DetailedTrackTruth");
+{
+  declareProperty("TruthNamePixel",          m_PRDTruthNamePixel);
+  declareProperty("TruthNameSCT",            m_PRDTruthNameSCT);
+  declareProperty("TruthNameTRT",            m_PRDTruthNameTRT);
+  declareProperty("TrackCollectionName",     m_trackCollectionName);
+  declareProperty("DetailedTrackTruthName",  m_detailedTrackTruthName);
   declareProperty("TruthTool",               m_truthTool);
 }
 
@@ -33,99 +34,102 @@ InDetDetailedTrackTruthMaker::InDetDetailedTrackTruthMaker(const std::string &na
 StatusCode InDetDetailedTrackTruthMaker::initialize()
 {
   ATH_MSG_DEBUG ("InDetDetailedTrackTruthMaker::initialize()");
-  
+
   //----------------
   if ( m_truthTool.retrieve().isFailure() ) {
     ATH_MSG_FATAL ("Failed to retrieve tool " << m_truthTool);
     return StatusCode::FAILURE;
   } else {
-    ATH_MSG_INFO ("Retrieved tool " << m_truthTool);
+    ATH_MSG_DEBUG ("Retrieved tool " << m_truthTool);
   }
 
   // Read Handle Key
+  ATH_CHECK(m_trackCollectionName.initialize());
+
+  ATH_CHECK(m_PRDTruthNamePixel.initialize(not m_PRDTruthNamePixel.key().empty()));
   ATH_CHECK(m_PRDTruthNameSCT.initialize(not m_PRDTruthNameSCT.key().empty()));
+  ATH_CHECK(m_PRDTruthNameTRT.initialize(not m_PRDTruthNameTRT.key().empty()));
+
+  ATH_CHECK(m_detailedTrackTruthName.initialize());
 
   //----------------
   return StatusCode::SUCCESS;
 }
 
 // -----------------------------------------------------------------------------------------------------
-StatusCode InDetDetailedTrackTruthMaker::finalize() 
+StatusCode InDetDetailedTrackTruthMaker::finalize()
 {
   ATH_MSG_DEBUG ("InDetDetailedTrackTruthMaker finalized");
   return StatusCode::SUCCESS;
 }
 
 // -----------------------------------------------------------------------------------------------------
-StatusCode InDetDetailedTrackTruthMaker::execute()
+StatusCode InDetDetailedTrackTruthMaker::execute_r(const EventContext &ctx) const
 {
-  ATH_MSG_DEBUG ("InDetDetailedTrackTruthMaker::execute()");
-
-  StatusCode sc;
+  ATH_MSG_DEBUG ("InDetDetailedTrackTruthMaker::execute_r(...)");
 
   //----------------------------------------------------------------
   // Retrieve track collection
-  const TrackCollection *tracks = 0;
-  sc = evtStore()->retrieve(tracks, m_trackCollectionName);
-  if (sc.isFailure()){
-    ATH_MSG_ERROR ("TrackCollection "<<m_trackCollectionName<<" NOT found");
-    return sc;
+  SG::ReadHandle<TrackCollection> tracks(m_trackCollectionName,ctx);
+  if (!tracks.isValid()) {
+    ATH_MSG_ERROR ("TrackCollection "<<m_trackCollectionName.key()<<" NOT found");
+    return StatusCode::FAILURE;
   } else {
-    ATH_MSG_DEBUG ("Got TrackCollection "<<m_trackCollectionName);
+    ATH_MSG_DEBUG ("Got TrackCollection "<<m_trackCollectionName.key());
   }
 
   //----------------------------------------------------------------
   // Retrieve prep raw data truth
-  std::vector<const PRD_MultiTruthCollection*> prdCollectionVector(3);
+  std::vector<SG::ReadHandle<PRD_MultiTruthCollection> > read_handle;
+  read_handle.reserve(3);
 
-  if(!m_PRDTruthNamePixel.empty()) {
-    sc = evtStore()->retrieve(prdCollectionVector[0], m_PRDTruthNamePixel);
-    if (sc.isFailure()){
-      ATH_MSG_WARNING ("Pixel PRD_MultiTruthCollection "<<m_PRDTruthNamePixel<<" NOT found");
-    } else {
-      ATH_MSG_DEBUG ("Got Pixel PRD_MultiTruthCollection "<<m_PRDTruthNamePixel);
+  std::vector<const PRD_MultiTruthCollection*> prdCollectionVector;
+  prdCollectionVector.reserve(3);
+
+  if(!m_PRDTruthNamePixel.key().empty()) {
+    read_handle.push_back( SG::ReadHandle<PRD_MultiTruthCollection>(m_PRDTruthNamePixel,ctx) );
+    if (!read_handle.back().isValid())  {
+      ATH_MSG_WARNING ("Pixel PRD_MultiTruthCollection "<<m_PRDTruthNamePixel.key()<<" NOT found");
+    }
+    else {
+      ATH_MSG_DEBUG ("Got Pixel PRD_MultiTruthCollection "<<m_PRDTruthNamePixel.key());
+      prdCollectionVector.push_back( &(*read_handle.back()) );
     }
   }
 
   if(!m_PRDTruthNameSCT.key().empty()) {
-    SG::ReadHandle<PRD_MultiTruthCollection> prdCollection(m_PRDTruthNameSCT);
-    if (not prdCollection.isValid()){
+    read_handle.push_back( SG::ReadHandle<PRD_MultiTruthCollection>(m_PRDTruthNameSCT,ctx) );
+    if (!read_handle.back().isValid())  {
       ATH_MSG_WARNING ("SCT PRD_MultiTruthCollection "<<m_PRDTruthNameSCT.key()<<" NOT found");
     } else {
       ATH_MSG_DEBUG ("Got SCT PRD_MultiTruthCollection "<<m_PRDTruthNameSCT.key());
+      prdCollectionVector.push_back( &(*read_handle.back()) );
     }
-    prdCollectionVector[1] = prdCollection.cptr();
   }
 
-  if(!m_PRDTruthNameTRT.empty()) {
-    sc = evtStore()->retrieve(prdCollectionVector[2], m_PRDTruthNameTRT);
-    if (sc.isFailure()){
-      ATH_MSG_WARNING ("TRT PRD_MultiTruthCollection "<<m_PRDTruthNameTRT<<" NOT found");
+  if(!m_PRDTruthNameTRT.key().empty()) {
+    read_handle.push_back( SG::ReadHandle<PRD_MultiTruthCollection>(m_PRDTruthNameTRT,ctx) );
+    if (!read_handle.back().isValid())  {
+      ATH_MSG_WARNING ("TRT PRD_MultiTruthCollection "<<m_PRDTruthNameTRT.key()<<" NOT found");
     } else {
-      ATH_MSG_DEBUG ("Got TRT PRD_MultiTruthCollection "<<m_PRDTruthNameTRT);
+      ATH_MSG_DEBUG ("Got TRT PRD_MultiTruthCollection "<<m_PRDTruthNameTRT.key());
+      prdCollectionVector.push_back( &(*read_handle.back()) );
     }
   }
 
   //----------------------------------------------------------------
   // Produce and store the output.
-
-  DetailedTrackTruthCollection *dttc = new DetailedTrackTruthCollection(tracks);
-  m_truthTool->buildDetailedTrackTruth(dttc, *tracks, prdCollectionVector);
-
-  sc=evtStore()->record(dttc, m_detailedTrackTruthName, false);
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR ("DetailedTrackTruthCollection '" << m_detailedTrackTruthName << "' could not be registered in StoreGate !");
+  SG::WriteHandle<DetailedTrackTruthCollection> dttc(m_detailedTrackTruthName,ctx);
+  if (dttc.record(std::make_unique<DetailedTrackTruthCollection>(&(*tracks))).isFailure()) {
+    ATH_MSG_ERROR ("DetailedTrackTruthCollection '" << m_detailedTrackTruthName.key() << "' could not be recorded !");
     return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG ("DetailedTrackTruthCollection '" << m_detailedTrackTruthName	<< "' is registered in StoreGate, size="<<dttc->size());
   }
-  
-  return StatusCode::SUCCESS;
+  else {
+    ATH_MSG_DEBUG ("DetailedTrackTruthCollection '" << m_detailedTrackTruthName.key()	<< "' is registered in StoreGate, size="<<dttc->size());
+    m_truthTool->buildDetailedTrackTruth(&(*dttc), *tracks, prdCollectionVector);
+    return StatusCode::SUCCESS;
+  }
+
 }
 
-//================================================================
 } // namespace InDet
-
-
-//================================================================
-//EOF
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/src/PRD_MultiTruthMaker.cxx b/InnerDetector/InDetTruth/InDetTruthAlgs/src/PRD_MultiTruthMaker.cxx
index 9269f3f1a67c719430c15f421951153bfb5df33f..b0c0fe917376456ce7986be4ade2d3929fb1f7e6 100755
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/src/PRD_MultiTruthMaker.cxx
+++ b/InnerDetector/InDetTruth/InDetTruthAlgs/src/PRD_MultiTruthMaker.cxx
@@ -8,29 +8,33 @@
 #include "InDetTruthAlgs/PRD_MultiTruthMaker.h"
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 
-#include "InDetPrepRawData/TRT_DriftCircleContainer.h"
-
-#include "StoreGate/ReadHandle.h"
-#include "StoreGate/WriteHandle.h"
-
 #include <iterator>
 
 namespace InDet {
 
 //================================================================
 PRD_MultiTruthMaker::PRD_MultiTruthMaker(const std::string &name, ISvcLocator *pSvcLocator) :
-  AthAlgorithm(name,pSvcLocator),
+  AthReentrantAlgorithm(name,pSvcLocator),
+  m_PixelClustersName("PixelClusters"),
+  m_SCTClustersName("SCT_Clusters"),
+  m_TRTDriftCircleContainerName("TRT_DriftCircles"),
+  m_simDataMapNamePixel("PixelSDO_Map"),
+  m_simDataMapNameSCT("SCT_SDO_Map"),
+  m_simDataMapNameTRT("TRT_SDO_Map"),
+  m_PRDTruthNamePixel("PRD_MultiTruthPixel"),
+  m_PRDTruthNameSCT("PRD_MultiTruthSCT"),
+  m_PRDTruthNameTRT("PRD_MultiTruthTRT"),
   m_PRDTruthTool("InDet::PRD_MultiTruthBuilder")
-{  
-  declareProperty("PixelClusterContainerName",  m_PixelClustersName="PixelClusters");
-  declareProperty("SCTClusterContainerName",    m_SCTClustersName=std::string("SCT_Clusters"));
-  declareProperty("TRTDriftCircleContainerName",m_TRTDriftCircleContainerName="TRT_DriftCircles");
-  declareProperty("SimDataMapNamePixel",        m_simDataMapNamePixel="PixelSDO_Map");
-  declareProperty("SimDataMapNameSCT",          m_simDataMapNameSCT=std::string("SCT_SDO_Map"));
-  declareProperty("SimDataMapNameTRT",          m_simDataMapNameTRT="TRT_SDO_Map");
-  declareProperty("TruthNamePixel",             m_PRDTruthNamePixel="PRD_MultiTruthPixel");
-  declareProperty("TruthNameSCT",               m_PRDTruthNameSCT=std::string("PRD_MultiTruthSCT"));
-  declareProperty("TruthNameTRT",               m_PRDTruthNameTRT="PRD_MultiTruthTRT");
+{
+  declareProperty("PixelClusterContainerName",  m_PixelClustersName);
+  declareProperty("SCTClusterContainerName",    m_SCTClustersName);
+  declareProperty("TRTDriftCircleContainerName",m_TRTDriftCircleContainerName);
+  declareProperty("SimDataMapNamePixel",        m_simDataMapNamePixel);
+  declareProperty("SimDataMapNameSCT",          m_simDataMapNameSCT);
+  declareProperty("SimDataMapNameTRT",          m_simDataMapNameTRT);
+  declareProperty("TruthNamePixel",             m_PRDTruthNamePixel);
+  declareProperty("TruthNameSCT",               m_PRDTruthNameSCT);
+  declareProperty("TruthNameTRT",               m_PRDTruthNameTRT);
   declareProperty("PRDTruthTool",               m_PRDTruthTool);
 }
 
@@ -39,138 +43,125 @@ PRD_MultiTruthMaker::PRD_MultiTruthMaker(const std::string &name, ISvcLocator *p
 StatusCode PRD_MultiTruthMaker::initialize()
 {
   ATH_MSG_INFO ("PRD_MultiTruthMaker::initialize()");
-  
+
   if ( m_PRDTruthTool.retrieve().isFailure() ) {
     ATH_MSG_ERROR ("Failed to retrieve tool " << m_PRDTruthTool);
     return StatusCode::FAILURE;
   } else {
     ATH_MSG_INFO ("Retrieved tool " << m_PRDTruthTool);
   }
-  
+
   // Read Handle Key
+  ATH_CHECK(m_PixelClustersName.initialize(not m_PixelClustersName.key().empty()));
+  ATH_CHECK(m_simDataMapNamePixel.initialize(not m_simDataMapNamePixel.key().empty()));
+  // Write Handle Key
+  ATH_CHECK(m_PRDTruthNamePixel.initialize(not m_PRDTruthNamePixel.key().empty()));
+
   ATH_CHECK(m_SCTClustersName.initialize(not m_SCTClustersName.key().empty()));
   ATH_CHECK(m_simDataMapNameSCT.initialize(not m_simDataMapNameSCT.key().empty()));
   // Write Handle Key
   ATH_CHECK(m_PRDTruthNameSCT.initialize(not m_PRDTruthNameSCT.key().empty()));
 
+  ATH_CHECK(m_TRTDriftCircleContainerName.initialize(not m_TRTDriftCircleContainerName.key().empty()));
+  ATH_CHECK(m_simDataMapNameTRT.initialize(not m_simDataMapNameTRT.key().empty()));
+  // Write Handle Key
+  ATH_CHECK(m_PRDTruthNameTRT.initialize(not m_PRDTruthNameTRT.key().empty()));
+
   return StatusCode::SUCCESS;
 }
 
 // -----------------------------------------------------------------------------------------------------
-StatusCode PRD_MultiTruthMaker::finalize() 
+StatusCode PRD_MultiTruthMaker::finalize()
 {
   ATH_MSG_DEBUG ("PRD_MultiTruthMaker finalized");
   return StatusCode::SUCCESS;
 }
 
 // -----------------------------------------------------------------------------------------------------
-StatusCode PRD_MultiTruthMaker::execute() {
+StatusCode PRD_MultiTruthMaker::execute_r(const EventContext &ctx) const {
 
   ATH_MSG_DEBUG ("PRD_MultiTruthMaker::execute()");
 
-  StatusCode sc;
-
+  // @TODO move below each to a tool just dealing with Pixel, SCT or TRT.
   // work on Pixels
-  if(!m_PixelClustersName.empty() && !m_simDataMapNamePixel.empty() && !m_PRDTruthNamePixel.empty()) {
-    const InDet::SiClusterContainer* prdContainer=0;
-    // retrieve Pixel cluster container
-    sc = evtStore()->retrieve(prdContainer, m_PixelClustersName);
-    if (sc.isFailure() || !prdContainer){
-      ATH_MSG_DEBUG ("Pixel Cluster Container NOT found");
-    } else {
-      ATH_MSG_DEBUG("Pixel Cluster Container found");
+  if(!m_PixelClustersName.key().empty() && !m_simDataMapNamePixel.key().empty() && !m_PRDTruthNamePixel.key().empty()) {
+
+    SG::ReadHandle<InDet::SiClusterContainer> prdContainer(m_PixelClustersName,ctx);
+    if (!prdContainer.isValid()) {
+      ATH_MSG_ERROR ("Pixel Cluster Container " << m_PixelClustersName.key() << " NOT found");
+      return StatusCode::FAILURE;
+    }
+    ATH_MSG_DEBUG("Pixel Cluster Container " << m_PixelClustersName.key() << " found");
 
       // Retrieve the Pixel SDO map for this event
-      const InDetSimDataCollection*    simDataMap=0;
-      sc = evtStore()->retrieve(simDataMap, m_simDataMapNamePixel);
-      if (sc.isFailure() || !simDataMap ) {
-	ATH_MSG_DEBUG ("Could NOT find the InDetSimDataPixel map");
-	return StatusCode::SUCCESS;
-      }	else {
-	ATH_MSG_DEBUG ("Found InDetSimDataPixel, do association");
-
-	// Create and fill the PRD truth structure
-	PRD_MultiTruthCollection *prdt_pixels = new PRD_MultiTruthCollection;
-	addPRDCollections(prdt_pixels, prdContainer->begin(), prdContainer->end(), simDataMap, true);
-	
-	// And register it with the StoreGate
-	bool allow_modifications;
-	sc=evtStore()->record(prdt_pixels, m_PRDTruthNamePixel, allow_modifications=false);
-	if (sc.isFailure()) {
-	  ATH_MSG_ERROR ("PRD truth structure '" << m_PRDTruthNamePixel << "' could not be registered in StoreGate !");
-	  return StatusCode::FAILURE;
-	} else {
-	  ATH_MSG_DEBUG ("PRD truth structure '" << m_PRDTruthNamePixel << "' is registered in StoreGate, size="<<prdt_pixels->size());
-	}
-      }
+    SG::ReadHandle<InDetSimDataCollection>    simDataMap(m_simDataMapNamePixel,ctx);
+    if (!simDataMap.isValid()) {
+      ATH_MSG_ERROR ("Could NOT find the InDetSimDataPixel " << m_simDataMapNamePixel.key() << " map.");
+      return StatusCode::FAILURE;
     }
+    ATH_MSG_DEBUG ("Found InDetSimDataPixel " << m_simDataMapNamePixel.key() << ", do association");
+
+    // Create and fill the PRD truth structure
+    SG::WriteHandle<PRD_MultiTruthCollection> prdt_pixels(m_PRDTruthNamePixel,ctx);
+    if (prdt_pixels.record(std::make_unique<PRD_MultiTruthCollection>()).isFailure()) {
+      ATH_MSG_ERROR ("PRD truth structure '" << m_PRDTruthNamePixel.key() << "' could not be registered in StoreGate !");
+      return StatusCode::FAILURE;
+    }
+    addPRDCollections(&(*prdt_pixels), prdContainer->begin(), prdContainer->end(), &(*simDataMap), true);
+    ATH_MSG_DEBUG ("PRD truth structure '" << m_PRDTruthNamePixel.key() << "' is registered in StoreGate, size="<<prdt_pixels->size());
   }
 
   // work on SCT
   if(!m_SCTClustersName.key().empty() && !m_simDataMapNameSCT.key().empty() && !m_PRDTruthNameSCT.key().empty()) {
+    // Retrieve the SCT SDO map for this event
+    SG::ReadHandle<InDetSimDataCollection> simDataMap(m_simDataMapNameSCT,ctx);
+    if (not simDataMap.isValid()) {
+      ATH_MSG_ERROR ("Could NOT find the InDetSimDataSCT " << m_simDataMapNameSCT.key() << " map");
+      return StatusCode::FAILURE;
+    }
+
+    ATH_MSG_DEBUG ("Found InDetSimDataSCT " << m_simDataMapNameSCT.key() << ", do association");
     // retrieve SCT cluster container
-    SG::ReadHandle<InDet::SiClusterContainer> prdContainer(m_SCTClustersName);
+    SG::ReadHandle<InDet::SiClusterContainer> prdContainer(m_SCTClustersName,ctx);
     if (not prdContainer.isValid()){
-      ATH_MSG_DEBUG ("SCT Cluster Container NOT found");
-    } else{
-      ATH_MSG_DEBUG ("SCT Cluster Container found");
-    
-      // Retrieve the SCT SDO map for this event
-      SG::ReadHandle<InDetSimDataCollection> simDataMap(m_simDataMapNameSCT);
-      if (not simDataMap.isValid()) {
-	ATH_MSG_DEBUG ("Could NOT find the InDetSimDataSCT map");
-      }	else {
-	ATH_MSG_DEBUG ("Found InDetSimDataSCT, do association");
-      
-	// Create and fill the PRD truth structure
-	SG::WriteHandle<PRD_MultiTruthCollection> prdt_sct(m_PRDTruthNameSCT);
-	ATH_CHECK(prdt_sct.record(std::make_unique<PRD_MultiTruthCollection>()));
-	addPRDCollections(prdt_sct.ptr(), prdContainer->begin(), prdContainer->end(), simDataMap.cptr(), false);
-
-	// And register it with the StoreGate
-	if (not prdt_sct.isValid()) {
-	  ATH_MSG_ERROR ("PRD truth structure '" << m_PRDTruthNameSCT.key() << "' could not be registered in StoreGate !");
-	  return StatusCode::FAILURE;
-	} else {
-	  ATH_MSG_DEBUG ("PRD truth structure '" << m_PRDTruthNameSCT.key() << "' is registered in StoreGate, size="<<prdt_sct->size());
-	}
-      }
-    } 
+      ATH_MSG_ERROR ("SCT Cluster Container " << m_SCTClustersName.key() << " NOT found");
+      return StatusCode::FAILURE;
+    }
+    ATH_MSG_DEBUG ("SCT Cluster Container " << m_SCTClustersName.key() << " found");
+
+    // Create and fill the PRD truth structure
+    SG::WriteHandle<PRD_MultiTruthCollection> prdt_sct(m_PRDTruthNameSCT);
+    ATH_CHECK(prdt_sct.record(std::make_unique<PRD_MultiTruthCollection>()));
+    addPRDCollections(prdt_sct.ptr(), prdContainer->begin(), prdContainer->end(), simDataMap.cptr(), false);
+    ATH_MSG_DEBUG ("PRD truth structure '" << m_PRDTruthNameSCT.key() << "' is registered in StoreGate, size="<<prdt_sct->size());
   }
 
   // work on TRT
-  if(!m_TRTDriftCircleContainerName.empty() && !m_simDataMapNameTRT.empty() && !m_PRDTruthNameTRT.empty()) {
-    const InDet::TRT_DriftCircleContainer* trtContainer;
-    // retrieve TRT DriftCircle container
-    sc = evtStore()->retrieve(trtContainer, m_TRTDriftCircleContainerName);
-    if (sc.isFailure() || !trtContainer){
-      ATH_MSG_DEBUG ("TRT DriftCircle Container NOT found");
-    } else{
-      ATH_MSG_DEBUG ("TRT DriftCirlce Container found");
-     
-      // Retrieve the TRT SDO map for this event
-      const InDetSimDataCollection*    simDataMap=0;
-      sc = evtStore()->retrieve(simDataMap, m_simDataMapNameTRT);
-      if (sc.isFailure() || !simDataMap ) {
-	ATH_MSG_DEBUG ("Could NOT find the InDetSimDataTRT map");
-      } else {
-	ATH_MSG_DEBUG ("Found InDetSimDataTRT, do association");
-
-	// Fill the PRD truth structure
-	PRD_MultiTruthCollection *prdt_trt = new PRD_MultiTruthCollection;
-	addPRDCollections(prdt_trt, trtContainer->begin(), trtContainer->end(), simDataMap, false);
-
-	// And register it with the StoreGate
-	bool allow_modifications;
-	sc=evtStore()->record(prdt_trt, m_PRDTruthNameTRT, allow_modifications=false);
-	if (sc.isFailure()) {
-	  ATH_MSG_ERROR ("PRD truth structure '" << m_PRDTruthNameTRT << "' could not be registered in StoreGate !");
-	  return StatusCode::FAILURE;
-	} else {
-	  ATH_MSG_DEBUG ("PRD truth structure '" << m_PRDTruthNameTRT << "' is registered in StoreGate, size="<<prdt_trt->size());
-	}
-      }
+  if(!m_TRTDriftCircleContainerName.key().empty() && !m_simDataMapNameTRT.key().empty() && !m_PRDTruthNameTRT.key().empty()) {
+
+    SG::ReadHandle<InDet::TRT_DriftCircleContainer> trtContainer(m_TRTDriftCircleContainerName,ctx);
+    if (!trtContainer.isValid()){
+      ATH_MSG_ERROR ("TRT DriftCircle Container " << m_TRTDriftCircleContainerName.key() << " NOT found");
+      return StatusCode::FAILURE;
+    }
+    ATH_MSG_DEBUG ("TRT DriftCirlce Container " << m_TRTDriftCircleContainerName.key() << " found");
+
+    // Retrieve the TRT SDO map for this event
+    SG::ReadHandle<InDetSimDataCollection>    simDataMap(m_simDataMapNameTRT,ctx);
+    if (!simDataMap.isValid()) {
+      ATH_MSG_ERROR ("Could NOT find the InDetSimDataTRT " << m_simDataMapNameTRT.key() << " map");
+      return StatusCode::FAILURE;
+    }
+    ATH_MSG_DEBUG ("Found InDetSimDataTRT " << m_simDataMapNameTRT.key() << " , do association");
+
+    // Fill the PRD truth structure
+    SG::WriteHandle<PRD_MultiTruthCollection> prdt_trt(m_PRDTruthNameTRT,ctx);
+    if (prdt_trt.record(std::make_unique<PRD_MultiTruthCollection>()).isFailure()) {
+      ATH_MSG_ERROR ("PRD truth structure '" << m_PRDTruthNameTRT.key() << "' could not be registered in StoreGate !");
+      return StatusCode::FAILURE;
     }
+    addPRDCollections(&(*prdt_trt), trtContainer->begin(), trtContainer->end(), &(*simDataMap), false);
+    ATH_MSG_DEBUG ("PRD truth structure '" << m_PRDTruthNameTRT.key() << "' is registered in StoreGate, size="<<prdt_trt->size());
   }
 
   return StatusCode::SUCCESS;
@@ -182,7 +173,7 @@ void PRD_MultiTruthMaker::addPRDCollections(PRD_MultiTruthCollection* prdTruth,
 				  PRD_Container_Iterator collections_begin,
 				  PRD_Container_Iterator collections_end,
 				  const InDetSimDataCollection* simDataMap,
-				  bool pixels)
+				  bool pixels) const
 {
   for (PRD_Container_Iterator colNext=collections_begin; colNext != collections_end; ++colNext) {
     addPRDRange(prdTruth, (*colNext)->begin(), (*colNext)->end(), simDataMap, pixels);
@@ -196,7 +187,7 @@ void PRD_MultiTruthMaker::addPRDRange (PRD_MultiTruthCollection* prdTruth,
 			     PRD_Collection_Iterator range_begin,
 			     PRD_Collection_Iterator range_end,
 			     const InDetSimDataCollection* simDataMap,
-			     bool pixels) 
+			     bool pixels) const
 {
   for (PRD_Collection_Iterator nextDatum = range_begin; nextDatum != range_end; nextDatum++){
     m_PRDTruthTool->addPrepRawDatum(prdTruth, *nextDatum, simDataMap, pixels);
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/src/TrackParticleTruthMaker.cxx b/InnerDetector/InDetTruth/InDetTruthAlgs/src/TrackParticleTruthMaker.cxx
deleted file mode 100755
index 3255eb243254cfe1b12353cc6a800ef7436ad018..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/src/TrackParticleTruthMaker.cxx
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// TrackParticleTruthMaker.cxx
-//   Implementation file for class TrackParticleTruthMaker
-///////////////////////////////////////////////////////////////////
-
-#include "InDetTruthAlgs/TrackParticleTruthMaker.h"
-
-#include "Particle/TrackParticleContainer.h"
-#include "TrkTruthData/TrackTruthCollection.h"
-#include "ParticleTruth/TrackParticleTruthCollection.h"
-#include "TrkTrack/TrackCollection.h"
-
-#include <map>
-#include "DataModel/ElementLink.h"
-
-namespace InDet {
-
-// Constructor with parameters:
-TrackParticleTruthMaker::TrackParticleTruthMaker(const std::string &name, 
-				   ISvcLocator *pSvcLocator) :
-  AthAlgorithm(name,pSvcLocator),
-  m_trackParticlesName          ("TrackParticleCandidate"),
-  m_trackParticleTruthCollection("TrackParticleTruthCollection"),
-  m_tracksName                  ("Tracks"),
-  m_tracksTruthName             ("TrackTruthCollection")
-{  
-  // Get parameter values from jobOptions file
-  declareProperty("trackParticlesName"           , m_trackParticlesName);
-  declareProperty("trackParticleTruthCollection" , m_trackParticleTruthCollection);
-  declareProperty("tracksName"                   , m_tracksName);
-  declareProperty("tracksTruthName"              , m_tracksTruthName);
-}
-
-// Initialize method:
-StatusCode TrackParticleTruthMaker::initialize()
-{
-  return StatusCode::SUCCESS;
-}
-
-// Execute method:
-StatusCode TrackParticleTruthMaker::execute() 
-{
-  // Get the messaging service, print where you are
-  ATH_MSG_DEBUG ("TrackParticleTruthMaker::execute()");
-
-  // first check for the truth container, sometimes it's missing
-  if( ! evtStore()->contains< TrackTruthCollection >( m_tracksTruthName ) ) {
-    ATH_MSG_DEBUG ("Could not retrieve '" << m_tracksTruthName << "' from StoreGate !");
-    return StatusCode::SUCCESS;
-  }
-
-  // retrieve associated TrackTruth from StoreGate (Track*, TrackTruth)
-  const TrackTruthCollection * simTrackMap(0);
-  StatusCode sc = evtStore()->retrieve(simTrackMap, m_tracksTruthName);
-  if (sc.isFailure()) {
-    ATH_MSG_DEBUG ("Could not retrieve '" << m_tracksTruthName << "' from StoreGate !");
-    return StatusCode::SUCCESS;
-  } else {
-    ATH_MSG_DEBUG ("Retrieved '" << m_tracksTruthName << "' from StoreGate");
-  }
-
-  ///
-  const TrackCollection* myTracks(0); 
-  sc = evtStore()->retrieve(myTracks, m_tracksName);
-  if (sc.isFailure()) {
-    ATH_MSG_DEBUG ("Could not retrieve '" << m_tracksName << "' from StoreGate !");
-    return StatusCode::SUCCESS;
-  } else {
-    ATH_MSG_DEBUG ("Retrieved '" << m_tracksName << "' from StoreGate !");
-  }
-  ///
-  
-  const Rec::TrackParticleContainer * origTrackPC(0);
-  sc = evtStore()->retrieve(origTrackPC, m_trackParticlesName);
-  if (sc.isFailure()) {
-    ATH_MSG_DEBUG ("Could not retrieve '" << m_trackParticlesName << "' from StoreGate !");
-    return StatusCode::SUCCESS;
-  } else {
-    ATH_MSG_DEBUG ("Retrieve '" << m_trackParticlesName << "' from StoreGate !");
-  }
-  
-  TrackParticleTruthCollection* tpTruthColl = new TrackParticleTruthCollection(origTrackPC);
-  
-  typedef Rec::TrackParticleContainer::const_iterator TPCIter;
-  for (TPCIter i=origTrackPC->begin(); i!=origTrackPC->end(); i++) {
-    const Trk::Track* track = (*i)->originalTrack();
-    ElementLink<TrackCollection> tracklink;
-    tracklink.setElement(const_cast<Trk::Track*>(track));
-    tracklink.setStorableObject(*myTracks); // otherwise the find does not work
-    
-    TrackTruthCollection::const_iterator tempTrackTruthItr = simTrackMap->find(tracklink);  
-    if (tempTrackTruthItr != simTrackMap->end()) {    
-	ATH_MSG_VERBOSE ("Barcode: " << (*tempTrackTruthItr).second.particleLink().barcode() <<
-			 "\t Probability: " << (*tempTrackTruthItr).second.probability());
-	ElementLink< Rec::TrackParticleContainer > myLink;
-	myLink.setElement(const_cast<Rec::TrackParticle*>(*i));
-	myLink.setStorableObject(*origTrackPC);
-	std::pair< ElementLink< Rec::TrackParticleContainer > , TrackParticleTruth>
-	  entry(myLink,TrackParticleTruth((*tempTrackTruthItr).second.particleLink(),(*tempTrackTruthItr).second.probability()));
-	tpTruthColl->insert(entry);
-    }
-  } 
-  
-  // record associated TrackParticleTruth to StoreGate (TrackParticle*, TrackParticleTruth)
-  sc = evtStore()->record(tpTruthColl, m_trackParticleTruthCollection, false);
-  if (sc.isFailure()) {
-    ATH_MSG_FATAL ("Could not record '" << m_trackParticleTruthCollection << "' to StoreGate !");
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG ("Recorded '" << m_trackParticleTruthCollection << "' to StoreGate !");
-  }
-  return StatusCode::SUCCESS;
-}
-
-// Finalize method:
-StatusCode TrackParticleTruthMaker::finalize() 
-{
-  ATH_MSG_INFO ("TrackParticleTruthMaker::finalize()");
-  return StatusCode::SUCCESS;
-}
-
-} // namespace InDet
-
diff --git a/InnerDetector/InDetTruth/InDetTruthAlgs/src/components/InDetTruthAlgs_entries.cxx b/InnerDetector/InDetTruth/InDetTruthAlgs/src/components/InDetTruthAlgs_entries.cxx
index 91a80db8f05cb484fd82530cb02a549e02844d86..f5fb54528586048d1a1a59786820b950b5e418cf 100755
--- a/InnerDetector/InDetTruth/InDetTruthAlgs/src/components/InDetTruthAlgs_entries.cxx
+++ b/InnerDetector/InDetTruth/InDetTruthAlgs/src/components/InDetTruthAlgs_entries.cxx
@@ -1,15 +1,12 @@
 #include "GaudiKernel/DeclareFactoryEntries.h"
-#include "InDetTruthAlgs/TrackParticleTruthMaker.h"
 #include "InDetTruthAlgs/PRD_MultiTruthMaker.h"
 #include "InDetTruthAlgs/InDetDetailedTrackTruthMaker.h"
 
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, InDetDetailedTrackTruthMaker )
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, PRD_MultiTruthMaker )
-DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, TrackParticleTruthMaker )
 
-DECLARE_FACTORY_ENTRIES( InDetTruthAlgs ) 
+DECLARE_FACTORY_ENTRIES( InDetTruthAlgs )
 {
-  DECLARE_NAMESPACE_ALGORITHM( InDet, TrackParticleTruthMaker )
-  DECLARE_NAMESPACE_ALGORITHM( InDet, PRD_MultiTruthMaker )
   DECLARE_NAMESPACE_ALGORITHM( InDet, InDetDetailedTrackTruthMaker )
+  DECLARE_NAMESPACE_ALGORITHM( InDet, PRD_MultiTruthMaker )
 }
diff --git a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx
index 0ed49b7db666d224b2d093b3f730554198453f6f..826b443a5a272789e63e55c38539fee6c5309b93 100755
--- a/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx
+++ b/InnerDetector/InDetTruth/InDetTruthTools/src/PRD_MultiTruthBuilder.cxx
@@ -10,8 +10,8 @@
 #include "InDetIdentifier/PixelID.h"
 #include "InDetReadoutGeometry/SiDetectorElement.h"
 #include "InDetReadoutGeometry/SiReadoutCellId.h"
-#include <stdexcept>
-#include <ext/functional>
+//#include <stdexcept>
+//#include <ext/functional>
 
 
 namespace InDet {
@@ -83,14 +83,11 @@ void PRD_MultiTruthBuilder::addPrepRawDatum(PRD_MultiTruthCollection *prdTruth,
 	  // But may be not for the typically small RDO/PRD ratio.
 	  typedef PRD_MultiTruthCollection::iterator truthiter;
 	  std::pair<truthiter, truthiter> r = prdTruth->equal_range(prd->identify());
-	  // FIXME: Is it OK to use the gcc (SGI) extensions of the STL?
-	  if(r.second == std::find_if(r.first, r.second, 
-				      __gnu_cxx::compose1(std::bind2nd(std::equal_to<HepMcParticleLink>(), particleLink), 
-							  __gnu_cxx::select2nd<PRD_MultiTruthCollection::value_type>() 
-							  )
-				      )
-	     )
-	    {
+          if(r.second == std::find_if(r.first, r.second, 
+                          [ particleLink ](const PRD_MultiTruthCollection::value_type &prd_to_truth) {
+                             return prd_to_truth.second == particleLink;
+                          } ))
+            {
 	      prdTruth->insert(std::make_pair(prd->identify(), particleLink));
 	    }
 	}
diff --git a/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_digitization_R1.py b/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_digitization_R1.py
index 69c577ede29d7d7703d7df74eeda9e7067399bd8..d89ef4be1f02b40064c7f63c1f3a76e7e46fe1c9 100644
--- a/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_digitization_R1.py
+++ b/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_digitization_R1.py
@@ -16,12 +16,13 @@ DetFlags.Truth_setOn()
 DetFlags.LVL1_setOff()
 
 from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion='ATLAS-R1-2012-02-00-00'
+jobproperties.Global.DetDescrVersion='ATLAS-R1-2012-03-00-00'
+jobproperties.Global.ConditionsTag='OFLCOND-RUN12-SDR-31'
 
 ## Random Number Seed offsets
 ## should be altered between jobs in order to change noise etc.
-from Digitization.DigitizationFlags import jobproperties 
-jobproperties.Digitization.rndmSeedOffset1=11 
+from Digitization.DigitizationFlags import jobproperties
+jobproperties.Digitization.rndmSeedOffset1=11
 jobproperties.Digitization.rndmSeedOffset2=22
 
 ## Main Digitization configuration
@@ -34,5 +35,5 @@ MessageSvc = Service( "MessageSvc" )
 MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M"
 # to change the default limit on number of message per alg
 MessageSvc.defaultLimit = 9999999  # all messages
-# Set output level threshold among DEBUG, INFO, WARNING, ERROR, FATAL 
+# Set output level threshold among DEBUG, INFO, WARNING, ERROR, FATAL
 MessageSvc.OutputLevel = INFO
diff --git a/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_digitization_R2.py b/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_digitization_R2.py
index 05684aa41c715febf46304e22c680cf8c3da50af..1060355fd1db371ec0b555556f37c18cfea5cb06 100644
--- a/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_digitization_R2.py
+++ b/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_digitization_R2.py
@@ -1,5 +1,5 @@
 #--------------------------------------------------------------
-# Template jobOptions: ID only simulation for run 1 ATLAS
+# Template jobOptions: ID only simulation for run 2 ATLAS
 #  - Digitization
 #--------------------------------------------------------------
 
@@ -16,17 +16,19 @@ DetFlags.Truth_setOn()
 DetFlags.LVL1_setOff()
 
 from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion='ATLAS-R2-2015-01-05-00'
+jobproperties.Global.DetDescrVersion='ATLAS-R2-2015-03-01-00'
+jobproperties.Global.ConditionsTag.set_Value_and_Lock('OFLCOND-RUN12-SDR-31')
 
 ## Random Number Seed offsets
 ## should be altered between jobs in order to change noise etc.
-from Digitization.DigitizationFlags import jobproperties 
-jobproperties.Digitization.rndmSeedOffset1=11 
+from Digitization.DigitizationFlags import jobproperties
+jobproperties.Digitization.rndmSeedOffset1=11
 jobproperties.Digitization.rndmSeedOffset2=22
 
 ## Main Digitization configuration
 include ( "Digitization/Digitization.py" )
 
+svcMgr.IOVDbSvc.GlobalTag=jobproperties.Global.ConditionsTag()
 
 ## Re-configure MessageSvc
 MessageSvc = Service( "MessageSvc" )
@@ -34,5 +36,5 @@ MessageSvc = Service( "MessageSvc" )
 MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M"
 # to change the default limit on number of message per alg
 MessageSvc.defaultLimit = 9999999  # all messages
-# Set output level threshold among DEBUG, INFO, WARNING, ERROR, FATAL 
+# Set output level threshold among DEBUG, INFO, WARNING, ERROR, FATAL
 MessageSvc.OutputLevel = INFO
diff --git a/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_simulation_R1.py b/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_simulation_R1.py
index af8c603790761b2df025c7fb12080b58766f745d..08be5db6c17795a25a7e88bd0b664506f59c58d7 100644
--- a/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_simulation_R1.py
+++ b/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_simulation_R1.py
@@ -13,7 +13,7 @@ DetFlags.Muon_setOff()
 DetFlags.Truth_setOn()
 
 from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.ConditionsTag='OFLCOND-RUN12-SDR-10'
+jobproperties.Global.ConditionsTag='OFLCOND-RUN12-SDR-19'
 
 
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
@@ -24,9 +24,10 @@ athenaCommonFlags.EvtMax=10
 from G4AtlasApps.SimFlags import simFlags
 simFlags.load_atlas_flags()
 
-simFlags.SimLayout.set_On() 
-simFlags.SimLayout='ATLAS-R1-2012-02-00-00_VALIDATION'
+simFlags.SimLayout.set_On()
+simFlags.SimLayout='ATLAS-R1-2012-03-00-00'
 simFlags.EventFilter.set_On()
+simFlags.RunNumber = 212272
 
 ## Run ParticleGenerator
 athenaCommonFlags.PoolEvgenInput.set_Off()
diff --git a/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_simulation_R2.py b/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_simulation_R2.py
index 44abb94f024119da10777402f551d0d3c1e1610f..dc28ccc9f0b13b7309cef966e12acd27fd188f81 100644
--- a/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_simulation_R2.py
+++ b/InnerDetector/InDetValidation/InDetFullChainTests/share/jobOptions_simulation_R2.py
@@ -1,5 +1,5 @@
 #--------------------------------------------------------------
-# Template jobOptions: ID only simulation for run 1 ATLAS
+# Template jobOptions: ID only simulation for run 2 ATLAS
 #  - Simulation
 #--------------------------------------------------------------
 ## Algorithm sequence
@@ -13,7 +13,7 @@ DetFlags.Muon_setOff()
 DetFlags.Truth_setOn()
 
 from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.ConditionsTag='OFLCOND-RUN12-SDR-10'
+jobproperties.Global.ConditionsTag='OFLCOND-RUN12-SDR-19'
 
 
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
@@ -24,9 +24,10 @@ athenaCommonFlags.EvtMax=10
 from G4AtlasApps.SimFlags import simFlags
 simFlags.load_atlas_flags()
 
-simFlags.SimLayout.set_On() 
-simFlags.SimLayout='ATLAS-R2-2015-01-05-00_VALIDATION'
+simFlags.SimLayout.set_On()
+simFlags.SimLayout='ATLAS-R2-2015-03-01-00'
 simFlags.EventFilter.set_On()
+simFlags.RunNumber = 222525
 
 ## Run ParticleGenerator
 athenaCommonFlags.PoolEvgenInput.set_Off()
diff --git a/InnerDetector/InDetValidation/InDetFullChainTests/test/CompareFiles.sh b/InnerDetector/InDetValidation/InDetFullChainTests/test/CompareFiles.sh
index f83ed7498d19478e6fbcbf1e147df8b7e325651f..d64e5e820b878ff1066bb26cb698a1c0d1939173 100755
--- a/InnerDetector/InDetValidation/InDetFullChainTests/test/CompareFiles.sh
+++ b/InnerDetector/InDetValidation/InDetFullChainTests/test/CompareFiles.sh
@@ -35,24 +35,25 @@ echo " Compare output file with reference one "
 	     echo "no test key string found in test log"
 	 fi
 #         TheFileReference="../test/Reference_${TheFile}"
-         TheFileReference="../test/Reference_InDetFullChain_ExampleTesting${Suite}.log"
+         TheFileReference="/afs/cern.ch/atlas/maxidisk/d33/referencefiles/InDetFullChainTests/InDetFullChainTests-01-00-00/Reference_InDetFullChain_ExampleTesting${Suite}.log"
          echo  "TheFileReference name" $TheFileReference 
+         TheFileReference_stripped=`basename $TheFileReference`_stripped
          if test ! -f $TheFileReference ; then
            echo " Problem! Not existing file " $TheFileReference 
          else
 # only keep line with "error" or "warning" or "fatal"
 # keep last message from Application Manger to checkfinalized successfull
-           /bin/rm -f TheDiff ${TheFile}_stripped ${TheFileReference}_stripped
+           /bin/rm -f TheDiff ${TheFile}_stripped ${TheFileReference_stripped}
 # grep the logfile
 #           grep -Ei "WARNING|ERROR|FATAL" $TheFile > ${TheFile}_stripped
 	   grep -Ei "Detailed Statistics for Hits on Reconstructed tracks" $TheFile >> ${TheFile}_stripped
            grep -Ei "Application Manager Finalized successfully" $TheFile >> ${TheFile}_stripped
 # grep the reference
-#           grep -Ei "WARNING|ERROR|FATAL" $TheFileReference > ${TheFileReference}_stripped
-	   grep -Ei "Detailed Statistics for Hits on Reconstructed tracks" $TheFileReference >> ${TheFileReference}_stripped
-           grep -Ei "Application Manager Finalized successfully" $TheFileReference >> ${TheFileReference}_stripped
+#           grep -Ei "WARNING|ERROR|FATAL" $TheFileReference > ${TheFileReference_stripped}
+	   grep -Ei "Detailed Statistics for Hits on Reconstructed tracks" $TheFileReference >> ${TheFileReference_stripped}
+           grep -Ei "Application Manager Finalized successfully" $TheFileReference >> ${TheFileReference_stripped}
 # get the diffs
-           diff ${TheFile}_stripped ${TheFileReference}_stripped >  TheDiff_all
+           diff ${TheFile}_stripped ${TheFileReference_stripped} >  TheDiff_all
 # fix the warning from seal ...
 	   grep -v "seal.opts" TheDiff_all > TheDiff
 
@@ -69,7 +70,7 @@ echo " Compare output file with reference one "
 	     echo " ---   Check Ok   --- " 
 	     echo " -------------------- " 
 	   fi
-#           /bin/rm -f TheDiff ${TheFile}_stripped ${TheFileReference}_stripped 
+#           /bin/rm -f TheDiff ${TheFile}_stripped ${TheFileReference_stripped} 
          fi
       fi
      done
diff --git a/InnerDetector/InDetValidation/InDetFullChainTests/test/InDetFullChainTests_TestConfiguration.xml b/InnerDetector/InDetValidation/InDetFullChainTests/test/InDetFullChainTests_TestConfiguration.xml
index 87614f9b99b11c77f1226b06c9bce9bf5c093420..ac8157c96af306e0f5e790ca9897d7b17ea82bf3 100755
--- a/InnerDetector/InDetValidation/InDetFullChainTests/test/InDetFullChainTests_TestConfiguration.xml
+++ b/InnerDetector/InDetValidation/InDetFullChainTests/test/InDetFullChainTests_TestConfiguration.xml
@@ -84,7 +84,7 @@
 
    <TEST name="AtlasG4_trf_R1_single_particle_sim" type="script" suite="InDetFullChainTests_trf">
       <options_atn>
-        AtlasG4_tf.py --inputEVNTFile=/afs/cern.ch/atlas/offline/ProdData/15.6.11.3/e_E50_eta0-25-7000.evgen.pool.root --outputHITSFile=OUT.HITS.pool.root --maxEvents=10 --skipEvents=0 --randomSeed=10 --geometryVersion=ATLAS-R1-2012-02-00-00_VALIDATION --conditionsTag=OFLCOND-RUN12-SDR-10 --postInclude='sim:RecJobTransforms/UseFrontier.py'
+        AtlasG4_tf.py --inputEVNTFile=/afs/cern.ch/atlas/offline/ProdData/15.6.11.3/e_E50_eta0-25-7000.evgen.pool.root --outputHITSFile=OUT.HITS.pool.root --maxEvents=10 --skipEvents=0 --randomSeed=10 --geometryVersion=ATLAS-R1-2012-03-00-00 --conditionsTag=OFLCOND-RUN12-SDR-19 --DataRunNumber '212272' --postInclude='sim:PyJobTransforms/UseFrontier.py'
       </options_atn>
       <timelimit>30</timelimit>
       <author>Nick Styles</author>
@@ -98,7 +98,7 @@
 
    <TEST name="Digi_trf_R1_single_particle_digi" type="script" suite="InDetFullChainTests_trf">
       <options_atn>
-        Digi_tf.py --inputHITSFile=OUT.HITS.pool.root --outputRDOFile=OUT.RDO.pool.root --geometryVersion=ATLAS-R1-2012-02-00-00 --maxEvents=10 --skipEvents=0 --digiSeedOffset1=11 --digiSeedOffset2=22 --postInclude='HITtoRDO:RecJobTransforms/UseFrontier.py' --conditionsTag=OFLCOND-RUN12-SDR-10
+        Digi_tf.py --inputHITSFile=OUT.HITS.pool.root --outputRDOFile=OUT.RDO.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --maxEvents=10 --skipEvents=0 --digiSeedOffset1=11 --digiSeedOffset2=22 --postInclude='HITtoRDO:PyJobTransforms/UseFrontier.py' --conditionsTag=OFLCOND-RUN12-SDR-25
       </options_atn>
       <timelimit>20</timelimit>
       <author>Nick Styles</author>
@@ -112,7 +112,7 @@
 
    <TEST name="Reco_trf_R1_single_particle_reco" type="script" suite="InDetFullChainTests_trf">
       <options_atn>
-        Reco_tf.py inputRDOFile=OUT.RDO.pool.root outputESDFile=OUT.ESD.root outputAODFile=OUT.AOD.root postInclude=RecJobTransforms/UseFrontier.py --omitvalidation=ALL --test
+        Reco_tf.py --inputRDOFile=OUT.RDO.pool.root --outputESDFile=OUT.ESD.root --outputAODFile=OUT.AOD.root --postInclude=PyJobTransforms/UseFrontier.py --fileValidation=False
       </options_atn>
       <timelimit>20</timelimit>
       <author>Nick Styles</author>
@@ -124,9 +124,10 @@
        </expectations>
    </TEST>
 
+   <!--
    <TEST name="Reco_trf_R1_single_particle_reco_ESDtoESD" type="script" suite="IBL_Example_trf">
       <options_atn>
-        Reco_tf.py inputESDFile=OUT.ESD.root outputESDFile=OUT.ESD.copy.root postInclude=RecJobTransforms/UseFrontier.py  --omitvalidation=ALL --test
+        Reco_tf.py inputESDFile=OUT.ESD.root outputESDFile=OUT.ESD.copy.root postInclude=PyJobTransforms/UseFrontier.py  --omitvalidation=ALL --test
       </options_atn>
       <timelimit>20</timelimit>
       <author>Nick Styles</author>
@@ -137,10 +138,11 @@
             <returnValue>0</returnValue>
        </expectations>
    </TEST>
+   -->
 
     <TEST name="AtlasG4_trf_R2_single_particle_sim" type="script" suite="InDetFullChainTests_trf">
       <options_atn>
-        AtlasG4_tf.py --inputEVNTFile=/afs/cern.ch/atlas/offline/ProdData/15.6.11.3/e_E50_eta0-25-7000.evgen.pool.root --outputHITSFile=OUT.HITS.pool.root --maxEvents=10 --skipEvents=0 --randomSeed=10 --geometryVersion=ATLAS-R2-2015-01-05-00_VALIDATION --conditionsTag=OFLCOND-RUN12-SDR-10 --postInclude='sim:RecJobTransforms/UseFrontier.py'
+        AtlasG4_tf.py --inputEVNTFile=/afs/cern.ch/atlas/offline/ProdData/15.6.11.3/e_E50_eta0-25-7000.evgen.pool.root --outputHITSFile=OUT.HITS.pool.root --maxEvents=10 --skipEvents=0 --randomSeed=10 --geometryVersion=ATLAS-R2-2015-03-01-00 --DataRunNumber '222525' --conditionsTag=OFLCOND-RUN12-SDR-19 --postInclude='sim:PyJobTransforms/UseFrontier.py'
       </options_atn>
       <timelimit>30</timelimit>
       <author>Nick Styles</author>
@@ -154,7 +156,7 @@
 
        <TEST name="Digi_trf_R2_single_particle_digi" type="script" suite="InDetFullChainTests_trf">
       <options_atn>
-        Digi_tf.py --inputHITSFile=OUT.HITS.pool.root --outputRDOFile=OUT.RDO.pool.root --geometryVersion=ATLAS-R2-2015-01-05-00 --maxEvents=10 --skipEvents=0 --digiSeedOffset1=11 --digiSeedOffset2=22 --postInclude='HITtoRDO:RecJobTransforms/UseFrontier.py' --conditionsTag=OFLCOND-RUN12-SDR-10
+        Digi_tf.py --inputHITSFile=OUT.HITS.pool.root --outputRDOFile=OUT.RDO.pool.root --geometryVersion=ATLAS-R2-2015-03-01-00 --maxEvents=10 --skipEvents=0 --digiSeedOffset1=11 --digiSeedOffset2=22 --postInclude='HITtoRDO:PyJobTransforms/UseFrontier.py' --conditionsTag=OFLCOND-RUN12-SDR-25
       </options_atn>
       <timelimit>20</timelimit>
       <author>Nick Styles</author>
@@ -168,7 +170,7 @@
 
        <TEST name="Reco_trf_R2_single_particle_reco" type="script" suite="InDetFullChainTests_trf">
       <options_atn>
-        Reco_tf.py inputRDOFile=OUT.RDO.pool.root outputESDFile=OUT.ESD.root outputAODFile=OUT.AOD.root postInclude=RecJobTransforms/UseFrontier.py --omitvalidation=ALL --test
+        Reco_tf.py --inputRDOFile=OUT.RDO.pool.root --outputESDFile=OUT.ESD.root --outputAODFile=OUT.AOD.root --postInclude=PyJobTransforms/UseFrontier.py --fileValidation=False
       </options_atn>
       <timelimit>20</timelimit>
       <author>Nick Styles</author>
@@ -180,9 +182,10 @@
        </expectations>
    </TEST>
 
+       <!---
         <TEST name="Reco_trf_R2_single_particle_reco_ESDtoESD" type="script" suite="IBL_Example_trf">
       <options_atn>
-        Reco_tf.py inputESDFile=OUT.ESD.root outputESDFile=OUT.ESD.copy.root postInclude=RecJobTransforms/UseFrontier.py  --omitvalidation=ALL --test
+        Reco_tf.py inputESDFile=OUT.ESD.root outputESDFile=OUT.ESD.copy.root postInclude=PyJobTransforms/UseFrontier.py  --omitvalidation=ALL --test
       </options_atn>
       <timelimit>20</timelimit>
       <author>Nick Styles</author>
@@ -193,6 +196,7 @@
             <returnValue>0</returnValue>
        </expectations>
    </TEST>
+   -->
 
  </atn>
 </unifiedTestConfiguration>
diff --git a/InnerDetector/InDetValidation/InDetFullChainTests/test/script_post_check.sh b/InnerDetector/InDetValidation/InDetFullChainTests/test/script_post_check.sh
index 7590dd5282a39c31fd27c5b8a9defe28696116f5..f6db559a030afd234283d4ad7c1a7f70154c4422 100755
--- a/InnerDetector/InDetValidation/InDetFullChainTests/test/script_post_check.sh
+++ b/InnerDetector/InDetValidation/InDetFullChainTests/test/script_post_check.sh
@@ -1,7 +1,5 @@
 echo "## Running 2 script_post_check.sh "
 echo "##"
-cd ${ATN_PACKAGE}/run
-echo in `pwd`
 echo "##"
 echo "##"
 echo "##"
@@ -12,11 +10,11 @@ echo "## Cleaning symlinks"
 echo "##"
 echo "##"
 echo "##"
-echo "## Copying log file in run/ "
+echo "## Copying log file"
 echo "##"
 echo "##"
 echo "##"
-cp ${ATN_JOB_LOGFILE} ${ATN_PACKAGE}/run/InDetFullChainTests.log
+cp ${ATN_JOB_LOGFILE} InDetFullChainTests.log
 echo in `pwd`
 #
 echo "##"
@@ -26,5 +24,5 @@ echo "## Comparing"
 echo "##"
 echo "##"
 echo "##"
-source ../test/CompareFiles.sh InDetFullChainTests.log
+source ${ATN_PACKAGE}/test/CompareFiles.sh InDetFullChainTests.log
 #
diff --git a/InnerDetector/InDetValidation/InDetFullChainTests/test/script_pre_check.sh b/InnerDetector/InDetValidation/InDetFullChainTests/test/script_pre_check.sh
index ca27e48acd241e2678042a63e962440d7043fd6d..721eeff452187de0a05e118b2c197a8dd00e07e1 100755
--- a/InnerDetector/InDetValidation/InDetFullChainTests/test/script_pre_check.sh
+++ b/InnerDetector/InDetValidation/InDetFullChainTests/test/script_pre_check.sh
@@ -1,7 +1,6 @@
 #
 echo "Starting script_pre_check.sh"
 #
-cd ${ATN_PACKAGE}/run
 echo in `pwd`
 #
 #Cleaning
@@ -19,8 +18,8 @@ echo "## cleaning"
 #
 echo "## setting up local DB access"
 #setupLocalDBReplica_CERN.sh
-echo Setting up geomDB, triggerDB and sqlite200 links in current directory to use 
-echo CERN afs SQLite replicas of geometry, conditions and trigger databases
+echo Setting up geomDB and triggerDB links in current directory to use 
+echo CERN afs SQLite replicas of geometry and trigger databases
 if [ ! -e geomDB ]
 then
     ln -s /afs/cern.ch/atlas/project/database/DBREL/packaging/DBRelease/current/geomDB geomDB
@@ -29,22 +28,8 @@ if [ ! -e triggerDB ]
 then
     ln -s /afs/cern.ch/atlas/project/database/DBREL/packaging/DBRelease/current/triggerDB triggerDB
 fi
-if [ ! -e sqlite200 ]
-then
-    if [ -n "$1" -a "$1" = "COMP200" ]
-    then
-	echo Special setup for COMP200 replica
-	mkdir sqlite200
-	ln -s /afs/cern.ch/user/a/atlcond/coolrep/sqlite200/COMP200.db sqlite200/ALLP200.db
-    else
-	ln -s /afs/cern.ch/user/a/atlcond/coolrep/sqlite200 sqlite200
-    fi
-fi
 # end setting up local DB access
 
 #
 #Set All
 #
-echo "## setting up environment "
-source ../cmt/setup.sh
-echo "## ready to run"
diff --git a/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx b/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
index af5c22fe466e752fa93eacb2f2feb0a9a9319e06..d3405ab128b21f22490d65b5758a6ef1d1358f93 100755
--- a/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
+++ b/InnerDetector/InDetValidation/InDetPerformanceRTT/src/IDStandardPerformance.cxx
@@ -2828,7 +2828,7 @@ IDStandardPerformance::MakeTrackPlots(const DataVector<Trk::Track>* trks,
     const Trk::TrackSummary* summary = m_trkSummaryTool->createSummary(**trksItr);
     if (summary) {
       // Fill impact parameter significance for different numbers of shared hits
-      if (summary->get(Trk::numberOfBLayerSharedHits)>0) {
+      if (summary->get(Trk::numberOfInnermostPixelLayerSharedHits)>0) {
         m_d0sig_pt1_sharedBL->Fill(trkd0/trkd0err);
       }
       if (summary->get(Trk::numberOfPixelSharedHits)>0) {
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/CMakeLists.txt b/InnerDetector/InDetValidation/InDetPhysValMonitoring/CMakeLists.txt
index e0cf896ac7258ef2d435cdfbc26b2d9d16e3ec66..7c49bfebbd6256354fb26afb5e22ac91183ae12c 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/CMakeLists.txt
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/CMakeLists.txt
@@ -19,7 +19,6 @@ atlas_depends_on_subdirs( PUBLIC
                           InnerDetector/InDetRecTools/InDetTrackSelectionTool
                           PhysicsAnalysis/AnalysisCommon/PATCore
                           Tracking/TrkValidation/TrkValHistUtils
-			  DetectorDescription/AtlasDetDescr
                           PRIVATE
                           Control/AthToolSupport/AsgTools
                           Control/AthenaKernel
@@ -47,11 +46,25 @@ find_package( XercesC )
 find_package( Boost )
 
 # Component(s) in the package:
+atlas_add_library( InDetPhysValMonitoringLib
+                   src/*.cxx
+                   PUBLIC_HEADERS InDetPhysValMonitoring
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}  ${EIGEN_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${Boost_LIBRARIES} ${EIGEN_LIBRARIES} 
+                   AthenaBaseComps AthenaMonitoringLib AtlasDetDescr xAODTracking xAODTruth GaudiKernel InDetIdentifier InDetReadoutGeometry
+                   InDetTrackSelectionToolLib PATCoreLib TrkValHistUtils
+                   PRIVATE_LINK_LIBRARIES AsgTools AthenaKernel GeoPrimitives EventPrimitives 
+                   xAODBase xAODEventInfo xAODJet InDetPrepRawData InDetRIO_OnTrack 
+                   MCTruthClassifierLib PathResolver TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces )
+
 atlas_add_component( InDetPhysValMonitoring
-                     src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}  ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${Boost_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaMonitoringLib xAODTracking xAODTruth GaudiKernel PATCoreLib TrkValHistUtils AsgTools AthenaKernel AtlasDetDescr GeoPrimitives EventPrimitives xAODBase xAODEventInfo xAODJet InDetIdentifier InDetPrepRawData InDetRIO_OnTrack MCTruthClassifierLib PathResolver TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${Boost_LIBRARIES} ${EIGEN_LIBRARIES} 
+                     AthenaBaseComps AthenaMonitoringLib xAODTracking xAODTruth GaudiKernel PATCoreLib 
+                     TrkValHistUtils AsgTools AthenaKernel AtlasDetDescr GeoPrimitives EventPrimitives 
+                     xAODBase xAODEventInfo xAODJet InDetIdentifier InDetPrepRawData InDetRIO_OnTrack 
+                     MCTruthClassifierLib PathResolver TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces InDetPhysValMonitoringLib)
 
 # Install files from the package:
 atlas_install_headers( InDetPhysValMonitoring )
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/HistogramDefinitionSvc.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/HistogramDefinitionSvc.h
index 30b536f26ea68b40063d4116da32a731a94423b8..ca7428046c6d18a44bda8eef6f06a0e77892711e 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/HistogramDefinitionSvc.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/HistogramDefinitionSvc.h
@@ -41,10 +41,13 @@ public:
     std::string title(const std::string &name, const std::string &dirName="") const final;
     unsigned int nBinsX(const std::string &name, const std::string &dirName="") const final;
     unsigned int nBinsY(const std::string &name, const std::string &dirName="") const final;
+    unsigned int nBinsZ(const std::string &name, const std::string &dirName="") const final;
     IHistogramDefinitionSvc::axesLimits_t xLimits(const std::string &name, const std::string &dirName="") const final;
     IHistogramDefinitionSvc::axesLimits_t yLimits(const std::string &name, const std::string &dirName="") const final;
+    IHistogramDefinitionSvc::axesLimits_t zLimits(const std::string &name, const std::string &dirName="") const final;
     std::string xTitle(const std::string &name, const std::string &dirName="") const final;
     std::string yTitle(const std::string &name, const std::string &dirName="") const final;
+    std::string zTitle(const std::string &name, const std::string &dirName="") const final;
     
 private:
     StringProperty m_source;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/IHistogramDefinitionSvc.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/IHistogramDefinitionSvc.h
index 0481bcc1b573836790d9c00a352dd1f9fb1e6110..5bd6690529f2a9c2be172252bda8b7dce1abc6c6 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/IHistogramDefinitionSvc.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/IHistogramDefinitionSvc.h
@@ -37,14 +37,20 @@ public:
 	virtual unsigned int nBinsX(const std::string &name, const std::string &dirName="") const = 0;
 	///Return number of y bins by histogram identifier (and directory name, if supplied); default returns 0 for 1-D histos
 	virtual unsigned int nBinsY(const std::string &/*name*/, const std::string &/*dirName*/="") const { return 0; }
+	///Return number of z bins by histogram identifier (and directory name, if supplied); default returns 0 for 1-D histos
+	virtual unsigned int nBinsZ(const std::string &/*name*/, const std::string &/*dirName*/="") const { return 0; }
 	///Return x axes (lo,hi) by histogram identifier (and directory name, if supplied)
 	virtual axesLimits_t xLimits(const std::string &name, const std::string &dirName="") const = 0;
 	///Return y axes (lo,hi) by histogram identifier (and directory name, if supplied). Default returns (nan,nan).
 	virtual axesLimits_t yLimits(const std::string & /*name*/, const std::string &/*dirName*/="") const {return std::make_pair(std::numeric_limits<float>::quiet_NaN(),std::numeric_limits<float>::quiet_NaN());}
+	///Return z axes (lo,hi) by histogram identifier (and directory name, if supplied)
+	virtual axesLimits_t zLimits(const std::string &name, const std::string &dirName="") const = 0;
 	///Return x-axis title by histogram identifier (and directory name, if supplied)
 	virtual std::string xTitle(const std::string &name, const std::string &dirName="") const = 0;
 	///Return y-axis title by histogram identifier (and directory name, if supplied)
 	virtual std::string yTitle(const std::string &name, const std::string &dirName="") const = 0;
+	///Return z-axis title by histogram identifier (and directory name, if supplied)
+	virtual std::string zTitle(const std::string &name, const std::string &dirName="") const = 0;
 	//virtual bool initialise()=0;
 	
 };
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/SingleHistogramDefinition.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/SingleHistogramDefinition.h
index f6d660f3e9979bef6792f51249332e3f2e1cdc1c..617c1c6dfbce827f4572b58b89ad0166ca83debb 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/SingleHistogramDefinition.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/InDetPhysValMonitoring/SingleHistogramDefinition.h
@@ -21,20 +21,37 @@ struct SingleHistogramDefinition{
     SingleHistogramDefinition();
     
     ///C'tor for 1D histograms (no Y bins or limits)
-    SingleHistogramDefinition(Titles_t name, Titles_t histoType, Titles_t title, NBins_t nbinsX,Var_t xLo, Var_t xHi,Titles_t xName,Titles_t yName,Titles_t theFolder="");
+    SingleHistogramDefinition(Titles_t name, Titles_t histoType, Titles_t title, 
+			      NBins_t nbinsX, Var_t xLo, Var_t xHi, 
+			      Titles_t xName,Titles_t yName,Titles_t theFolder="");
     
     ///C'tor for 2D histograms (Y bins and limits)
-    SingleHistogramDefinition(Titles_t name, Titles_t histoType, Titles_t title, NBins_t nbinsX,  NBins_t nbinsY,Var_t xLo, Var_t xHi, Var_t yLo, Var_t yHi, Titles_t xName, Titles_t yName, Titles_t theFolder="");
+    SingleHistogramDefinition(Titles_t name, Titles_t histoType, Titles_t title, 
+			      NBins_t nbinsX,  NBins_t nbinsY, 
+			      Var_t xLo, Var_t xHi, 
+			      Var_t yLo, Var_t yHi, 
+			      Titles_t xName, Titles_t yName, Titles_t theFolder="");
+
+    ///C'tor for 3D histograms (Y,Z bins and limits)
+    SingleHistogramDefinition(Titles_t name, Titles_t histoType, Titles_t title, 
+			      NBins_t nbinsX,  NBins_t nbinsY, NBins_t nbinsZ, 
+			      Var_t xLo, Var_t xHi, 
+			      Var_t yLo, Var_t yHi, 
+			      Var_t zLo, Var_t zHi, 
+			      Titles_t xName, Titles_t yName, Titles_t zName, Titles_t theFolder="");
     
     std::string name;
     std::string histoType;
     std::string title;
     unsigned int nBinsX;
     unsigned int nBinsY;
+    unsigned int nBinsZ;
     IHistogramDefinitionSvc::axesLimits_t xAxis;
     IHistogramDefinitionSvc::axesLimits_t yAxis;
+    IHistogramDefinitionSvc::axesLimits_t zAxis;
     std::string xTitle;
     std::string yTitle;
+    std::string zTitle;
     std::string allTitles;
     std::string folder;
     bool empty() const;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/HistogramDefinitionSvc.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/HistogramDefinitionSvc.cxx
index 0facf58b02cac6f0dbc18bf68f754ebbf4944f4c..04517d84a46e5c03aeac533daedc6a13c303f4be 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/HistogramDefinitionSvc.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/HistogramDefinitionSvc.cxx
@@ -137,6 +137,17 @@ HistogramDefinitionSvc::nBinsY(const std::string& name, const std::string& dirNa
   return nbins;
 }
 
+unsigned int
+HistogramDefinitionSvc::nBinsZ(const std::string& name, const std::string& dirName) const {
+  unsigned int nbins(0);
+  const auto pthisHistoPair(m_histoDefMap.find(SingleHistogramDefinition::stringIndex(name, dirName)));
+
+  if (pthisHistoPair != m_histoDefMap.end()) {
+    nbins = pthisHistoPair->second.nBinsZ;
+  }
+  return nbins;
+}
+
 IHistogramDefinitionSvc::axesLimits_t
 HistogramDefinitionSvc::xLimits(const std::string& name, const std::string& dirName) const {
   axesLimits_t result(invalidLimits);
@@ -159,6 +170,17 @@ HistogramDefinitionSvc::yLimits(const std::string& name, const std::string& dirN
   return result;
 }
 
+IHistogramDefinitionSvc::axesLimits_t
+HistogramDefinitionSvc::zLimits(const std::string& name, const std::string& dirName) const {
+  axesLimits_t result(invalidLimits);
+  const auto pthisHistoPair(m_histoDefMap.find(SingleHistogramDefinition::stringIndex(name, dirName)));
+
+  if (pthisHistoPair != m_histoDefMap.end()) {
+    result = pthisHistoPair->second.zAxis;
+  }
+  return result;
+}
+
 std::string
 HistogramDefinitionSvc::xTitle(const std::string& name, const std::string& dirName) const {
   std::string result {};
@@ -180,6 +202,16 @@ HistogramDefinitionSvc::yTitle(const std::string& name, const std::string& dirNa
   return result;
 }
 
+std::string
+HistogramDefinitionSvc::zTitle(const std::string& name, const std::string& dirName) const {
+  std::string result {};
+  const auto pthisHistoPair(m_histoDefMap.find(SingleHistogramDefinition::stringIndex(name, dirName)));
+  if (pthisHistoPair != m_histoDefMap.end()) {
+    result = pthisHistoPair->second.zTitle;
+  }
+  return result;
+}
+
 bool
 HistogramDefinitionSvc::sourceExists() {
   return m_reader->sourceExists();
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_ExtendedFakes.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_ExtendedFakes.cxx
index ad224d4fb925b5044c8332cb7e51b4556bc8c013..57a502030c619f171892fed9692307d43cdd8e69 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_ExtendedFakes.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_ExtendedFakes.cxx
@@ -63,16 +63,16 @@ InDetPerfPlot_ExtendedFakes::fill(const xAOD::TrackParticle& trk, const bool isF
   uint8_t iTRTHits(0), iTRTHighThresholdHits(0), iTRTOutliers(0), iTRTHighThresholdOutliers(0);
 
 
-  if (trk.summaryValue(iBLayerHits, xAOD::numberOfBLayerHits)) {
+  if (trk.summaryValue(iBLayerHits, xAOD::numberOfInnermostPixelLayerHits)) {
     fillHisto(m_HitInfoFakerates["nBLayerHits"      ], iBLayerHits, fakeNum);
   }
-  if (trk.summaryValue(iBLayerOutliers, xAOD::numberOfBLayerOutliers)) {
+  if (trk.summaryValue(iBLayerOutliers, xAOD::numberOfInnermostPixelLayerOutliers)) {
     fillHisto(m_HitInfoFakerates["nBLayerOutliers"  ], iBLayerOutliers, fakeNum);
   }
-  if (trk.summaryValue(iBLayerSharedHits, xAOD::numberOfBLayerSharedHits)) {
+  if (trk.summaryValue(iBLayerSharedHits, xAOD::numberOfInnermostPixelLayerSharedHits)) {
     fillHisto(m_HitInfoFakerates["nBLayerSharedHits"], iBLayerSharedHits, fakeNum);
   }
-  if (trk.summaryValue(iBLayerSplitHits, xAOD::numberOfBLayerSplitHits)) {
+  if (trk.summaryValue(iBLayerSplitHits, xAOD::numberOfInnermostPixelLayerSplitHits)) {
     fillHisto(m_HitInfoFakerates["nBLayerSplitHits" ], iBLayerSplitHits, fakeNum);
   }
 
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_HitDetailed.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_HitDetailed.cxx
index 793d499e747a98ba637eeec1f9dd535fa45795cc..007586932e8e520dfeb82fe041ad0bd62300ccc4 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_HitDetailed.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_HitDetailed.cxx
@@ -115,7 +115,7 @@ InDetPerfPlot_HitDetailed::fill(const xAOD::TrackParticle& trk) {
   uint8_t iBLayerHits(0), iPixHits(0), iSctHits(0), iTrtHits(0);
   uint8_t iPixHoles(0), iSCTHoles(0), iTrtHTHits(0);
 
-  if (trk.summaryValue(iBLayerHits, xAOD::numberOfBLayerHits)) {
+  if (trk.summaryValue(iBLayerHits, xAOD::numberOfInnermostPixelLayerHits)) {
     fillHisto(nBLayerHits, iBLayerHits);
     fillHisto(n_vs_eta_BLayerHits, eta, iBLayerHits);
   }
@@ -151,15 +151,15 @@ InDetPerfPlot_HitDetailed::fill(const xAOD::TrackParticle& trk) {
       0);
     uint8_t iSCTOutliers(0), iSCTDoubleHoles(0), iSCTShared(0);
     uint8_t iTRTOutliers(0), iTRTHTOutliers(0);
-    if (trk.summaryValue(iBLayerOutliers, xAOD::numberOfBLayerOutliers)) {
+    if (trk.summaryValue(iBLayerOutliers, xAOD::numberOfInnermostPixelLayerOutliers)) {
       fillHisto(nBLayerOutliers, iBLayerOutliers);
       fillHisto(n_vs_eta_BLayerOutliers, eta, iBLayerOutliers);
     }
-    if (trk.summaryValue(iBLayerShared, xAOD::numberOfBLayerSharedHits)) {
+    if (trk.summaryValue(iBLayerShared, xAOD::numberOfInnermostPixelLayerSharedHits)) {
       fillHisto(nBLayerSharedHits, iBLayerShared);
       fillHisto(n_vs_eta_BLayerSharedHits, eta, iBLayerShared);
     }
-    if (trk.summaryValue(iBLayerSplit, xAOD::numberOfBLayerSplitHits)) {
+    if (trk.summaryValue(iBLayerSplit, xAOD::numberOfInnermostPixelLayerSplitHits)) {
       fillHisto(nBLayerSplitHits, iBLayerSplit);
       fillHisto(n_vs_eta_BLayerSplitHits, eta, iBLayerSplit);
     }
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.cxx
index 4556d756cca76777c79cbf6aa6ff372a024a50f0..0ebb8e30f06ebc726f35a9e2a53b61397d7c9756 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_TrkInJet.cxx
@@ -281,7 +281,7 @@ InDetPerfPlot_TrkInJet::fill(const xAOD::TrackParticle& trk, const xAOD::Jet& je
 
   fillHisto(m_recPt, trk.pt() / 1e3);
 
-  if (trk.summaryValue(iBLayerHits, xAOD::numberOfBLayerHits)) {
+  if (trk.summaryValue(iBLayerHits, xAOD::numberOfInnermostPixelLayerHits)) {
     fillHisto(n_vs_jetDR_BLayerHits, jetDR, iBLayerHits);
   }
   if (trk.summaryValue(iPixHits, xAOD::numberOfPixelHits)) {
@@ -309,13 +309,13 @@ InDetPerfPlot_TrkInJet::fill(const xAOD::TrackParticle& trk, const xAOD::Jet& je
     uint8_t iPixelOutliers(0), iPixelContribLayers(0), iPixelShared(0), iPixelSplit(0), iPixelGanged(0);
     uint8_t iSCTOutliers(0), iSCTDoubleHoles(0), iSCTShared(0);
     uint8_t iTRTOutliers(0), iTRTHTOutliers(0);
-    if (trk.summaryValue(iBLayerOutliers, xAOD::numberOfBLayerOutliers)) {
+    if (trk.summaryValue(iBLayerOutliers, xAOD::numberOfInnermostPixelLayerOutliers)) {
       fillHisto(n_vs_jetDR_BLayerOutliers, jetDR, iBLayerOutliers);
     }
-    if (trk.summaryValue(iBLayerShared, xAOD::numberOfBLayerSharedHits)) {
+    if (trk.summaryValue(iBLayerShared, xAOD::numberOfInnermostPixelLayerSharedHits)) {
       fillHisto(n_vs_jetDR_BLayerSharedHits, jetDR, iBLayerShared);
     }
-    if (trk.summaryValue(iBLayerSplit, xAOD::numberOfBLayerSplitHits)) {
+    if (trk.summaryValue(iBLayerSplit, xAOD::numberOfInnermostPixelLayerSplitHits)) {
       fillHisto(n_vs_jetDR_BLayerSplitHits, jetDR, iBLayerSplit);
     }
     if (trk.summaryValue(iPixelOutliers, xAOD::numberOfPixelOutliers)) {
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_hitResidual.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_hitResidual.cxx
index d2c43bbea508c4cbaeae71ab5fe3e2c93e20f883..e11fba62a08844a6225427b71341e7de42ac912b 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_hitResidual.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPerfPlot_hitResidual.cxx
@@ -171,7 +171,7 @@ InDetPerfPlot_hitResidual::fill(const xAOD::TrackParticle& trkprt) {
         if ((det == INVALID_DETECTOR)or(region == INVALID_REGION)) {
           continue;
         }
-        if (width > 0) {
+        if ((width > 0) or (det ==TRT)){//TRT does not have defined cluster width 
           // introduce cluster width histograms
           fillHisto(m_phiWidth[det][region], width);
           fillHisto(m_etaWidth[det][region], etaWidth);
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysHitDecoratorTool.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysHitDecoratorTool.cxx
index 09c8ae52510a9cffdc41ac59a3ddef74d475d484..fbfb380e6c5f4b231773fbc4e86973eed8bc2aad 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysHitDecoratorTool.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysHitDecoratorTool.cxx
@@ -390,7 +390,7 @@ InDetPhysHitDecoratorTool::getUnbiasedTrackParameters(const Trk::TrackParameters
                                                                measurement->localParameters(),
                                                                measurement->localCovariance());
       if (!unbiasedTrkParameters) {
-        msg(MSG::WARNING) << "Could not get unbiased track parameters, use normal parameters" << endmsg;
+        msg(MSG::INFO) << "Could not get unbiased track parameters, use normal parameters" << endmsg;
         m_isUnbiased = false;
       }
     } else if (not alreadyWarned) {
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ReadFromXmlDom.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ReadFromXmlDom.cxx
index b6e7be16fc2fa9c7a99f3920d9c8c3b696ebedc0..48b8ea70118f5d2eda0f5a90fa2df0255a5c8401 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ReadFromXmlDom.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ReadFromXmlDom.cxx
@@ -20,8 +20,8 @@
 
 namespace {
   bool
-  validAxisName(const std::string& proposedName, const std::array<std::string, 2>& allowedNames) {
-    return((proposedName == allowedNames[0])or(proposedName == allowedNames[1]));
+  validAxisName(const std::string& proposedName, const std::array<std::string, 3>& allowedNames) {
+    return((proposedName == allowedNames[0])or(proposedName == allowedNames[1])or(proposedName == allowedNames[2]));
   }
 }
 
@@ -118,12 +118,11 @@ SingleHistogramDefinition
 ReadFromXmlDom::parseXmlElement(const xercesc::DOMElement* element) {
   SingleHistogramDefinition s;
   enum RegXHistoGroups {
-    TYPE, NAME, TITLE, NX, NY, XLO, YLO, XHI, YHI, XAXIS, YAXIS, FOLDER, NGROUPS
+    TYPE, NAME, TITLE, NX, NY, NZ, XLO, YLO, ZLO, XHI, YHI, ZHI, XAXIS, YAXIS, ZAXIS, FOLDER, NGROUPS
   };
   const std::array<std::string, NGROUPS> attrNames = {
-    "type", "id", "title", "n", "n", "lo", "lo", "hi", "hi", "title", "title", "folder"
+    "type", "id", "title", "n", "n", "n", "lo", "lo", "lo", "hi", "hi", "hi", "title", "title", "title", "folder"
   };
-
   //
   // transform the std::string attribute names to Xerces string attribute names
   std::array<XercesString, NGROUPS> xercesNames;
@@ -133,9 +132,9 @@ ReadFromXmlDom::parseXmlElement(const xercesc::DOMElement* element) {
   // Use this array to store the primary returned attribute values, which will be Xerces strings
   std::array<XercesString, NGROUPS> xercesValues;
   //
-  constexpr unsigned int NAXES = 2; // allow only two axes, could be extended later
+  constexpr unsigned int NAXES = 3; // allow only two axes, could be extended later
   const std::array<std::string, NAXES> allowedAxisNames = {
-    "x", "y"
+    "x", "y", "z"
   };
 
   //
@@ -164,11 +163,14 @@ ReadFromXmlDom::parseXmlElement(const xercesc::DOMElement* element) {
   // only allow two axes, but could be ordered x-y or y-x
   std::string axisName0 = toNative(axisDef0->getTagName());
   std::string axisName1 = toNative(axisDef1->getTagName());
+  const xercesc::DOMElement* axisDef2 = axisDef1->getNextElementSibling();
+  std::string axisName2 = axisDef2 ? toNative(axisDef2->getTagName()) : "z";
   if (validAxisName(axisName0, allowedAxisNames) 
    and validAxisName(axisName1,allowedAxisNames) 
-   and (axisName1 != axisName0)) {
+   and validAxisName(axisName2,allowedAxisNames)
+   and (axisName1 != axisName0) and (axisName2 != axisName1)) {
     // default order
-    unsigned int xIndex = 0, yIndex = 1;
+    unsigned int xIndex = 0, yIndex = 1, zIndex = 2;
     if (axisName0 == allowedAxisNames[1]) {
       // inverted order
       xIndex = 1;
@@ -176,12 +178,16 @@ ReadFromXmlDom::parseXmlElement(const xercesc::DOMElement* element) {
     }
     xercesValues[NX + xIndex] = axisDef0->getAttribute(xercesNames[NX + xIndex].c_str());
     xercesValues[NX + yIndex] = axisDef1->getAttribute(xercesNames[NX + yIndex].c_str());
+    xercesValues[NX + zIndex] = axisDef2 ? axisDef2->getAttribute(xercesNames[NX + zIndex].c_str()) : XercesString();
     xercesValues[XLO + xIndex] = axisDef0->getAttribute(xercesNames[XLO + xIndex].c_str());
     xercesValues[XLO + yIndex] = axisDef1->getAttribute(xercesNames[XLO + yIndex].c_str());
+    xercesValues[XLO + zIndex] = axisDef2 ? axisDef2->getAttribute(xercesNames[XLO + zIndex].c_str()) : XercesString();
     xercesValues[XHI + xIndex] = axisDef0->getAttribute(xercesNames[XHI + xIndex].c_str());
     xercesValues[XHI + yIndex] = axisDef1->getAttribute(xercesNames[XHI + yIndex].c_str());
+    xercesValues[XHI + zIndex] = axisDef2 ? axisDef2->getAttribute(xercesNames[XHI + zIndex].c_str()) : XercesString();
     xercesValues[XAXIS + xIndex] = axisDef0->getAttribute(xercesNames[XAXIS + xIndex].c_str());
     xercesValues[XAXIS + yIndex] = axisDef1->getAttribute(xercesNames[XAXIS + yIndex].c_str());
+    xercesValues[XAXIS + zIndex] = axisDef2 ? axisDef2->getAttribute(xercesNames[XAXIS + zIndex].c_str()) : XercesString();
     // transform Xerces strings to normal std::string
     std::array<std::string, NGROUPS> stringValues {
       ""
@@ -193,13 +199,17 @@ ReadFromXmlDom::parseXmlElement(const xercesc::DOMElement* element) {
     const float NaN = std::nanf(""); // default 'invalid' float is not-a-number (NaN)
     const unsigned int nx = stringValues[NX].empty() ? 0 : (unsigned int) (std::stoul(stringValues[NX]));
     const unsigned int ny = stringValues[NY].empty() ? 0 : (unsigned int) (std::stoul(stringValues[NY]));
+    const unsigned int nz = stringValues[NZ].empty() ? 0 : (unsigned int) (std::stoul(stringValues[NZ]));
     const float xlo = stringValues[XLO].empty() ? NaN : std::stof(stringValues[XLO]);
     const float ylo = stringValues[YLO].empty() ? NaN : std::stof(stringValues[YLO]);
+    const float zlo = stringValues[ZLO].empty() ? NaN : std::stof(stringValues[ZLO]);
     const float xhi = stringValues[XHI].empty() ? NaN : std::stof(stringValues[XHI]);
     const float yhi = stringValues[YHI].empty() ? NaN : std::stof(stringValues[YHI]);
+    const float zhi = stringValues[ZHI].empty() ? NaN : std::stof(stringValues[ZHI]);
     // now build the histogram definition to return
-    SingleHistogramDefinition sx(stringValues[NAME], stringValues[TYPE], stringValues[TITLE], nx, ny, xlo, xhi, ylo,
-                                 yhi, stringValues[XAXIS], stringValues[YAXIS],
+    SingleHistogramDefinition sx(stringValues[NAME], stringValues[TYPE], stringValues[TITLE], 
+				 nx, ny, nz, xlo, xhi, ylo, yhi, zlo, zhi,
+				 stringValues[XAXIS], stringValues[YAXIS], stringValues[ZAXIS],
                                  stringValues[FOLDER]);
     return sx;
   }
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/SingleHistogramDefinition.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/SingleHistogramDefinition.cxx
index bad9da57f009203e981273570e3c994e1ade4ccd..c4135e2b28e67430d4e60de2302f119012d37a25 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/SingleHistogramDefinition.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/SingleHistogramDefinition.cxx
@@ -15,37 +15,63 @@ SingleHistogramDefinition::SingleHistogramDefinition() :
   title{},
   nBinsX{},
   nBinsY{},
+  nBinsZ{},
   xAxis(std::make_pair(std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN())),
   yAxis(std::make_pair(std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN())),
+  zAxis(std::make_pair(std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN())),
   xTitle{},
   yTitle{},
+  zTitle{},
   allTitles{},
   folder{},
   m_empty(true) {
 }
 
 SingleHistogramDefinition::SingleHistogramDefinition(Titles_t thename, Titles_t thehistoType,
-                                                     Titles_t thetitle, NBins_t nbinsX, Var_t xLo, Var_t xHi,
-                                                     Titles_t xName, Titles_t yName,
-                                                     Titles_t thefolder) :
-  name(thename), histoType(thehistoType), title(thetitle), nBinsX(nbinsX),
-  nBinsY(0), xTitle(xName), yTitle(yName), folder(thefolder) {
+						     Titles_t thetitle, NBins_t nbinsX, 
+						     Var_t xLo, Var_t xHi,
+						     Titles_t xName, Titles_t yName,
+						     Titles_t thefolder) :
+  name(thename), histoType(thehistoType), title(thetitle), 
+  nBinsX(nbinsX), nBinsY(0), nBinsZ(0), 
+  xTitle(xName), yTitle(yName), zTitle(""), 
+  folder(thefolder) {
   // should do sanity checks here
   xAxis = std::make_pair(xLo, xHi);
   yAxis = std::make_pair(std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN());
+  zAxis = std::make_pair(std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN());
   m_empty = false;
   allTitles = titleDigest();
 }
 
 SingleHistogramDefinition::SingleHistogramDefinition(Titles_t thename, Titles_t thehistoType,
-                                                     Titles_t thetitle, NBins_t nbinsX, NBins_t nbinsY, Var_t xLo,
-                                                     Var_t xHi, Var_t yLo,
-                                                     Var_t yHi, Titles_t xName, Titles_t yName, Titles_t thefolder) :
-  name(thename), histoType(thehistoType), title(thetitle), nBinsX(nbinsX), nBinsY(nbinsY),
-  xTitle(xName), yTitle(yName), folder(thefolder) {
+						     Titles_t thetitle, NBins_t nbinsX, NBins_t nbinsY, 
+						     Var_t xLo, Var_t xHi, Var_t yLo, Var_t yHi, 
+						     Titles_t xName, Titles_t yName, Titles_t thefolder) :
+  name(thename), histoType(thehistoType), title(thetitle), 
+  nBinsX(nbinsX), nBinsY(nbinsY), nBinsZ(0),
+  xTitle(xName), yTitle(yName), zTitle(""),
+  folder(thefolder) {
   // should do sanity checks here
   xAxis = std::make_pair(xLo, xHi);
   yAxis = std::make_pair(yLo, yHi);
+  zAxis = std::make_pair(std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN());
+  m_empty = false;
+  allTitles = titleDigest();
+}
+
+SingleHistogramDefinition::SingleHistogramDefinition(Titles_t thename, Titles_t thehistoType,
+                                                     Titles_t thetitle, NBins_t nbinsX, NBins_t nbinsY, NBins_t nbinsZ, 
+						     Var_t xLo, Var_t xHi, Var_t yLo, Var_t yHi, Var_t zLo, Var_t zHi, 
+						     Titles_t xName, Titles_t yName, Titles_t zName, Titles_t thefolder) :
+  name(thename), histoType(thehistoType), title(thetitle), 
+  nBinsX(nbinsX), nBinsY(nbinsY), nBinsZ(nbinsZ),
+  xTitle(xName), yTitle(yName), zTitle(zName), 
+  folder(thefolder) {
+  // should do sanity checks here
+  xAxis = std::make_pair(xLo, xHi);
+  yAxis = std::make_pair(yLo, yHi);
+  zAxis = std::make_pair(zLo, zHi);
   m_empty = false;
   allTitles = titleDigest();
 }
@@ -59,16 +85,18 @@ std::string
 SingleHistogramDefinition::str() const {
   const std::string s(" ");
 
-  return name + s + histoType + s + title + s + std::to_string(nBinsX) + s + std::to_string(nBinsY) +
+  return name + s + histoType + s + title + s + std::to_string(nBinsX) + s + std::to_string(nBinsY) + s + std::to_string(nBinsZ) +
          s + std::to_string(xAxis.first) + s + std::to_string(xAxis.second) + s +
-         std::to_string(yAxis.first) + s + std::to_string(yAxis.second) + s + xTitle + s + yTitle;
+         std::to_string(yAxis.first) + s + std::to_string(yAxis.second) + s +
+         std::to_string(zAxis.first) + s + std::to_string(zAxis.second) + s + 
+         xTitle + s + yTitle + s + zTitle;
 }
 
 bool
 SingleHistogramDefinition::validType() const {
   const std::string signature((histoType.substr(0, 3)));
 
-  return((signature == "TH1")or(signature == "TH2") or(signature == "TPr") or(signature == "TEf"));
+  return((signature == "TH1")or(signature == "TH2")or(signature == "TH3")or(signature == "TPr") or(signature == "TEf"));
 }
 
 bool
@@ -78,14 +106,18 @@ SingleHistogramDefinition::isValid() const {
   }
   bool sane(true);
   // note: if yaxis is left undefined, the limits should be NaN, but (NaN != NaN) is always true
-  const bool sensibleLimits = (xAxis.first != xAxis.second)and(yAxis.first != yAxis.second);
+  const bool sensibleLimits = (xAxis.first != xAxis.second)and(yAxis.first != yAxis.second)and(zAxis.first != zAxis.second);
   const bool sensibleXBins = (nBinsX != 0);
   const bool sensibleYBins = (nBinsY != 0);
+  const bool sensibleZBins = (nBinsZ != 0);
   const bool sensibleTitles = not (title.empty() or xTitle.empty());
   sane = (sensibleLimits and sensibleXBins and sensibleTitles);
   if (histoType.substr(0, 3) == "TH2") {
     sane = (sane and sensibleYBins);
   }
+  if (histoType.substr(0, 3) == "TH3") {
+    sane = (sane and sensibleYBins and sensibleZBins);
+  }
   return sane;
 }
 
@@ -98,7 +130,7 @@ std::string
 SingleHistogramDefinition::titleDigest() const {
   const std::string s(";");
 
-  return title + s + xTitle + s + yTitle;
+  return title + s + xTitle + s + yTitle + s + zTitle;
 }
 
 std::string
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/TrackSelectionTool.cxx b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/TrackSelectionTool.cxx
index 6c8ce32c2a9a363a62181ddb70a78f58d589ab18..70d1287ff5ef283b28c95f3fcd12dde28d8178be 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/TrackSelectionTool.cxx
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/TrackSelectionTool.cxx
@@ -218,16 +218,16 @@ TrackSelectionTool::accept(const xAOD::TrackParticle* p) const {
   // uint8_t iSiHits(0);//unused?
   uint8_t iTRTHits(0), iTRTHTHits(0), iTRTOutliers(0), iTRTHTOutliers(0);
 
-  if (!p->summaryValue(iBLayerHits, xAOD::numberOfBLayerHits)) {
+  if (!p->summaryValue(iBLayerHits, xAOD::numberOfInnermostPixelLayerHits)) {
     return m_accept;
   }
-  if (!p->summaryValue(iBLayerOutliers, xAOD::numberOfBLayerOutliers)) {
+  if (!p->summaryValue(iBLayerOutliers, xAOD::numberOfInnermostPixelLayerOutliers)) {
     return m_accept;
   }
-  if (!p->summaryValue(iBLayerSharedHits, xAOD::numberOfBLayerSharedHits)) {
+  if (!p->summaryValue(iBLayerSharedHits, xAOD::numberOfInnermostPixelLayerSharedHits)) {
     return m_accept;
   }
-  if (!p->summaryValue(iBLayerSplitHits, xAOD::numberOfBLayerSplitHits)) {
+  if (!p->summaryValue(iBLayerSplitHits, xAOD::numberOfInnermostPixelLayerSplitHits)) {
     return m_accept;
   }
 
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/XmlContentHandlers.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/XmlContentHandlers.h
index 2e588e5a41a8b1dfa78bf9b6bc8d6680aac0ea31..f2032802e96601f920102bc440ae9ccc210a19b6 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/XmlContentHandlers.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/XmlContentHandlers.h
@@ -136,6 +136,47 @@ yAxisFromAttributes(SingleHistogramDefinition& s, const xercesc::Attributes& att
   return nFilled;
 }
 
+unsigned int
+zAxisFromAttributes(SingleHistogramDefinition& s, const xercesc::Attributes& attrs) {
+  unsigned int nFilled(0);
+  // title, n, lo and hi are currently *necessary* attributes
+  XercesString histoStrings[] = {
+    fromNative("title"), fromNative("n"), fromNative("lo"), fromNative("hi")
+  };
+  const XMLCh* val(nullptr);
+  unsigned int idx {
+    0
+  };
+
+  IHistogramDefinitionSvc::axesLimits_t zaxis(std::nanf(""), std::nanf(""));
+
+  for (auto& h:histoStrings) {
+    if ((val = attrs.getValue(h.c_str())) != 0) {
+      switch (idx) {
+      case 0:
+        s.zTitle = toNative(val);
+        break;
+
+      case 1:
+        s.nBinsZ = std::stof(toNative(val));
+        break;
+
+      case 2:
+        zaxis.first = std::stof(toNative(val));
+        break;
+
+      case 3:
+        zaxis.second = std::stof(toNative(val));
+        break;
+      }
+      nFilled++;
+    }
+    idx++;
+  }
+  s.zAxis = zaxis;
+  return nFilled;
+}
+
 unsigned int
 partialHdefFromText(SingleHistogramDefinition& s, const std::string& line) {
   unsigned int nFilled(0);
@@ -195,7 +236,7 @@ partialHdefFromTProfText(SingleHistogramDefinition& s, const std::string& line)
 class HDefContentHandler: public xercesc::DefaultHandler {
 public:
   enum HistoTypes {
-    UNKNOWN, TH1, TPROFILE, TH2, TEFFICIENCY, NTYPES
+    UNKNOWN, TH1, TPROFILE, TH2, TH3, TEFFICIENCY, NTYPES
   };
   HDefContentHandler(std::vector<SingleHistogramDefinition>& defs) : m_histoType(UNKNOWN), m_numberFilled(0),
     m_currentDefinition{}, m_definitions(defs), m_currentText() {
@@ -209,6 +250,7 @@ public:
     const static XercesString hStr = fromNative("h");
     const static XercesString xStr = fromNative("x");
     const static XercesString yStr = fromNative("y");
+    const static XercesString zStr = fromNative("z");
     unsigned int nFilled(0);
 
     if (localName == hStr) {
@@ -222,6 +264,9 @@ public:
     if (localName == yStr) {
       nFilled = yAxisFromAttributes(m_currentDefinition, attrs);
     }
+    if (localName == zStr) {
+      nFilled = zAxisFromAttributes(m_currentDefinition, attrs);
+    }
     m_currentText.clear();
     m_numberFilled += nFilled;
   }
@@ -268,6 +313,7 @@ private:
     const static XercesString TH1Str = fromNative("TH1F");
     const static XercesString TProfileStr = fromNative("TProfile");
     const static XercesString TH2Str = fromNative("TH2F");
+    const static XercesString TH3Str = fromNative("TH3F");
     const static XercesString TEffStr = fromNative("TEfficiency");
     XercesString t = fromNative("type");
     val = attrs.getValue(t.c_str());
@@ -283,6 +329,9 @@ private:
     if (val == TH2Str) {
       m_histoType = TH2;
     }
+    if (val == TH3Str) {
+      m_histoType = TH3;
+    }
     if (val == TEffStr) {
       m_histoType = TEFFICIENCY;
     }
diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/doc/packagedoc.h b/InnerDetector/InDetValidation/InDetRecStatistics/doc/packagedoc.h
index bcd6bd811187326f958cd80f6113ff59c7b43e9e..cd19bd4ca73f2c7afb12c5e014c7ee5c572b4161 100644
--- a/InnerDetector/InDetValidation/InDetRecStatistics/doc/packagedoc.h
+++ b/InnerDetector/InDetValidation/InDetRecStatistics/doc/packagedoc.h
@@ -325,17 +325,4 @@ These are found in the /scripts directory, and are designed to run on the statis
 - <b>resolution_[param].cc (doplot = "res[param]", "pull[param]", "narres[param]") - average value for parameter resoltuions (pulls) as a function of eta, for abs(eta) < 2.5 (or abs(eta) < 1.5 for narres);  resolution = X_reco - X_truth, pull as above
 - <b>vertex.cc</b> (doplot = "vtx") - plot generated, and reconstructed z0 vertex, and the difference 
 
-@section InDetRecStatistics_used_packagesInDetRecStatistics Used Packages
-
-@section InDetRecStatistics_requirements Requirements
-
 */
-
-
-//@page used_InDetRecStatistics Used Packages
-//
-//@page requirements_InDetRecStatistics Requirements
-//
-*/
-
-
diff --git a/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx b/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
index a0a50c89a15dc6e5303e9cdb333e3c4d38f33836..8b6c220dea45425a94f9692d94af3071a7595f28 100755
--- a/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
+++ b/InnerDetector/InDetValidation/InDetRecStatistics/src/TrackStatHelper.cxx
@@ -806,9 +806,9 @@ bool InDet::TrackStatHelper::printTrackSummaryRegion(enum track_types track_type
       else
 	std::cout << std::setw(6) << "n/a";
       
-      std::cout << std::setw(6)  << std::setprecision(2); printTrackSummaryAverage( track_type , eta_region, Trk::numberOfBLayerHits );
-      std::cout << std::setw(6)  << std::setprecision(2); printTrackSummaryAverage( track_type , eta_region, Trk::numberOfBLayerSharedHits );
-      std::cout << std::setw(6)  << std::setprecision(2); printTrackSummaryAverage( track_type , eta_region, Trk::numberOfBLayerOutliers);
+      std::cout << std::setw(6)  << std::setprecision(2); printTrackSummaryAverage( track_type , eta_region, Trk::numberOfInnermostPixelLayerHits );
+      std::cout << std::setw(6)  << std::setprecision(2); printTrackSummaryAverage( track_type , eta_region, Trk::numberOfInnermostPixelLayerSharedHits );
+      std::cout << std::setw(6)  << std::setprecision(2); printTrackSummaryAverage( track_type , eta_region, Trk::numberOfInnermostPixelLayerOutliers);
       std::cout << std::setw(6)  << std::setprecision(2); printTrackSummaryAverage( track_type , eta_region, Trk::numberOfPixelHits  );
       std::cout << std::setw(6)  << std::setprecision(2); printTrackSummaryAverage( track_type , eta_region, Trk::numberOfPixelSharedHits );
       std::cout << std::setw(6)  << std::setprecision(2); printTrackSummaryAverage( track_type , eta_region, Trk::numberOfPixelHoles   );
diff --git a/InnerDetector/InDetValidation/InDetSegmentDriftCircleAssValidation/doc/packagedoc.h b/InnerDetector/InDetValidation/InDetSegmentDriftCircleAssValidation/doc/packagedoc.h
index 02275e3fd379c7845cf59203166493b44a782ebd..5c0f598c703ca35bca44585a977eab7124d5310b 100644
--- a/InnerDetector/InDetValidation/InDetSegmentDriftCircleAssValidation/doc/packagedoc.h
+++ b/InnerDetector/InDetValidation/InDetSegmentDriftCircleAssValidation/doc/packagedoc.h
@@ -43,9 +43,7 @@ The InDetSegmentDriftCircleAssValidation contains the following classes/files:
 
 - InDetSegmentDriftCircleAssValidation.cxx...Main class that does the truth association and computes an efficiency.
 
-@section InDetSegmentDriftCircleAssValidation_InDetSegmentDriftCircleAssValidationPackages Used Packages
 
 
-@section InDetSegmentDriftCircleAssValidation_InDetSegmentDriftCircleAssValidationReq Requirements file
 
 */
diff --git a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/InDetTrackClusterAssValidation/TrackClusterAssValidation.h b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/InDetTrackClusterAssValidation/TrackClusterAssValidation.h
index aaa2c0095d7830a0b1f94d3a15efb92d40c1e301..b35d3abdb4451e48fc27291d6a73942383569ac4 100755
--- a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/InDetTrackClusterAssValidation/TrackClusterAssValidation.h
+++ b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/InDetTrackClusterAssValidation/TrackClusterAssValidation.h
@@ -9,9 +9,9 @@
 #include <string>
 #include <map>
 
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include "TrkSpacePoint/SpacePointContainer.h" 
-#include "TrkSpacePoint/SpacePointOverlapCollection.h" 
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "TrkSpacePoint/SpacePointContainer.h"
+#include "TrkSpacePoint/SpacePointOverlapCollection.h"
 #include "InDetPrepRawData/SiClusterContainer.h"
 #include "InDetPrepRawData/TRT_DriftCircleContainer.h"
 #include "HepMC/GenParticle.h"
@@ -19,6 +19,8 @@
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 #include "StoreGate/ReadHandleKey.h"
 
+#include "TrkTrack/TrackCollection.h"
+
 namespace InDet {
 
   /////////////////////////////////////////////////////////////////////////////////
@@ -29,7 +31,7 @@ namespace InDet {
     {
       ///////////////////////////////////////////////////////////////////
       // Public methods:
-      ///////////////////////////////////////////////////////////////////    
+      ///////////////////////////////////////////////////////////////////
     public:
 
       Barcode()  {};
@@ -46,17 +48,17 @@ namespace InDet {
       int m_barcharge;
       int m_rapidity;
     };
-  
+
   /////////////////////////////////////////////////////////////////////////////////
   // Inline methods
   /////////////////////////////////////////////////////////////////////////////////
-  
+
   inline Barcode::Barcode(const Barcode& BC)
     {
       *this = BC;
     }
-  
-  inline Barcode& Barcode::operator = (const Barcode& BC) 
+
+  inline Barcode& Barcode::operator = (const Barcode& BC)
     {
       if(&BC!=this) {
 	m_barcharge = BC.m_barcharge;
@@ -72,15 +74,15 @@ namespace InDet {
 
   // Class-algorithm for track cluster association validation
   //
-  class TrackClusterAssValidation : public AthAlgorithm 
+  class TrackClusterAssValidation : public AthReentrantAlgorithm
     {
-    
+
       ///////////////////////////////////////////////////////////////////
       // Public methods:
       ///////////////////////////////////////////////////////////////////
-      
+
     public:
-      
+
       ///////////////////////////////////////////////////////////////////
       // Standard Algotithm methods
       ///////////////////////////////////////////////////////////////////
@@ -88,20 +90,13 @@ namespace InDet {
       TrackClusterAssValidation(const std::string &name, ISvcLocator *pSvcLocator);
       virtual ~TrackClusterAssValidation() {}
       StatusCode initialize();
-      StatusCode execute();
+      StatusCode execute_r(const EventContext& ctx) const;
       StatusCode finalize();
 
-      ///////////////////////////////////////////////////////////////////
-      // Print internal tool parameters and status
-      ///////////////////////////////////////////////////////////////////
-
-      MsgStream&    dump     (MsgStream&    out) const;
-      std::ostream& dump     (std::ostream& out) const;
-
     protected:
 
       ///////////////////////////////////////////////////////////////////
-      // Protected data 
+      // Protected data
       ///////////////////////////////////////////////////////////////////
 
       bool                               m_usePIX                 ;
@@ -109,44 +104,134 @@ namespace InDet {
       bool                               m_useTRT                 ;
       bool                               m_useOutliers            ;
       int                                m_pdg                    ;
-      int                                m_outputlevel            ;
-      int                                m_nprint                 ;
-      int                                m_ncolection             ; 
-      int                                m_nspacepoints           ;
-      int                                m_nclusters              ;
-      int                                m_nclustersTRT           ;
-      int                                m_nqtracks               ;
-      int                                m_efficiency   [100][6]  ;
-      int                                m_efficiencyN  [100][6][5];
-      int                                m_efficiencyBTE[100][6][5][4];
-      int                                m_efficiencyPOS[100][6]  ;
-      int                                m_efficiencyNEG[100][6]  ;
-      int                                m_ntracksPOSB  [100]     ;
-      int                                m_ntracksPOSE  [100]     ;
-      int                                m_ntracksPOSDBM[100];
-      int                                m_ntracksNEGB  [100]     ;
-      int                                m_ntracksNEGE  [100]     ;
-      int                                m_ntracksNEGDBM[100];
-      int                                m_total        [100][50] ;
-      int                                m_fake         [100][50] ;
-      int                                m_events                 ;
-      int                                m_eventsPOS              ;
-      int                                m_eventsNEG              ;
-      int                                m_eventsBTE[4]           ;
-      int                                m_particleClusters   [50];
-      int                                m_particleSpacePoints[50];
-      int                                m_particleClustersBTE   [50][4];
-      int                                m_particleSpacePointsBTE[50][4];
-      int                                m_nclustersPosBP         ;
-      int                                m_nclustersPosBS         ;
-      int                                m_nclustersPosEP         ;
-      int                                m_nclustersPosES         ;
-      int                                m_nclustersPosDBM;
-      int                                m_nclustersNegBP         ;
-      int                                m_nclustersNegBS         ;
-      int                                m_nclustersNegEP         ;
-      int                                m_nclustersNegES         ;
-      int                                m_nclustersNegDBM;
+      struct TrackCollectionStat_t {
+      public:
+        int                                m_efficiency   [6]  ;
+        int                                m_efficiencyN  [6][5];
+        int                                m_efficiencyBTE[6][5][4];
+        int                                m_efficiencyPOS[6]  ;
+        int                                m_efficiencyNEG[6]  ;
+        int                                m_ntracksPOSB       ;
+        int                                m_ntracksPOSE       ;
+        int                                m_ntracksPOSDBM;
+        int                                m_ntracksNEGB       ;
+        int                                m_ntracksNEGE       ;
+        int                                m_ntracksNEGDBM;
+        int                                m_total        [50] ;
+        int                                m_fake         [50] ;
+        int                                m_events                 ;
+        int                                m_eventsPOS              ;
+        int                                m_eventsNEG              ;
+        int                                m_eventsBTE[4]           ;
+
+        TrackCollectionStat_t()
+        : m_efficiency    {},
+          m_efficiencyN   {},
+          m_efficiencyBTE {},
+          m_efficiencyPOS {},
+          m_efficiencyNEG {},
+          m_ntracksPOSB   {},
+          m_ntracksPOSE   {},
+          m_ntracksPOSDBM {},
+          m_ntracksNEGB   {},
+          m_ntracksNEGE   {},
+          m_ntracksNEGDBM {},
+          m_total         {},
+          m_fake          {}
+        {}
+
+        TrackCollectionStat_t &operator+=(const TrackCollectionStat_t &a_stat) {
+            for (int i=0; i<6; ++i) { m_efficiency[i]+=a_stat.m_efficiency[i];}
+            for (int i=0; i<6; ++i) { for (int j=0; j<5; ++j) { m_efficiencyN[i][j]+=a_stat.m_efficiencyN[i][j];}}
+            for (int i=0; i<6; ++i) { for (int j=0; j<5; ++j) { for (int k=0; k<4; ++k) { m_efficiencyBTE[i][j][k]+=a_stat.m_efficiencyBTE[i][j][k];} } }
+            for (int i=0; i<6; ++i) { m_efficiencyPOS[i]+=a_stat.m_efficiencyPOS[i];}
+            for (int i=0; i<6; ++i) { m_efficiencyNEG[i]+=a_stat.m_efficiencyNEG[i];}
+            m_ntracksPOSB+=a_stat.m_ntracksPOSB       ;
+            m_ntracksPOSE+=a_stat.m_ntracksPOSE       ;
+            m_ntracksPOSDBM+=a_stat.m_ntracksPOSDBM;
+            m_ntracksNEGB+=a_stat.m_ntracksNEGB       ;
+            m_ntracksNEGE+=a_stat.m_ntracksNEGE       ;
+            m_ntracksNEGDBM+=a_stat.m_ntracksNEGDBM;
+            for (int i=0; i<50; ++i) { m_total[i]+=a_stat.m_total[i];}
+            for (int i=0; i<50; ++i) { m_fake[i]+=a_stat.m_fake[i];}
+
+            return *this;
+        }
+
+      };
+
+      struct EventStat_t {
+      public:
+        int                                m_events      ;
+        int                                m_eventsPOS   ;
+        int                                m_eventsNEG   ;
+        int                                m_eventsBTE[4];
+
+        int                                m_particleClusters   [50];
+        int                                m_particleSpacePoints[50];
+        int                                m_particleClustersBTE   [50][4];
+        int                                m_particleSpacePointsBTE[50][4];
+
+        int                                m_nclustersPosBP         ;
+        int                                m_nclustersPosBS         ;
+        int                                m_nclustersPosEP         ;
+        int                                m_nclustersPosES         ;
+        int                                m_nclustersPosDBM;
+        int                                m_nclustersNegBP         ;
+        int                                m_nclustersNegBS         ;
+        int                                m_nclustersNegEP         ;
+        int                                m_nclustersNegES         ;
+        int                                m_nclustersNegDBM;
+
+        EventStat_t()
+        : m_events                 {},
+          m_eventsPOS              {},
+          m_eventsNEG              {},
+          m_eventsBTE              {},
+          m_particleClusters       {},
+          m_particleSpacePoints    {},
+          m_particleClustersBTE    {},
+          m_particleSpacePointsBTE {},
+          m_nclustersPosBP         {},
+          m_nclustersPosBS         {},
+          m_nclustersPosEP         {},
+          m_nclustersPosES         {},
+          m_nclustersPosDBM        {},
+          m_nclustersNegBP         {},
+          m_nclustersNegBS         {},
+          m_nclustersNegEP         {},
+          m_nclustersNegES         {},
+          m_nclustersNegDBM        {}
+        {}
+
+        EventStat_t &operator+=(const EventStat_t &a_stat) {
+          m_events += a_stat.m_events;
+          m_eventsPOS += a_stat.m_eventsPOS;
+          m_eventsNEG += a_stat.m_eventsNEG;
+          for (int i=0; i<4; ++i)  { m_eventsBTE[i] += a_stat.m_eventsBTE[i]; }
+          for (int i=0; i<50; ++i) {m_particleClusters[i] += a_stat.m_particleClusters[i]; };
+          for (int i=0; i<50; ++i) {m_particleSpacePoints[i] += a_stat.m_particleSpacePoints[i]; };
+          for (int i=0; i<50; ++i) {for (int j=0; j<4; ++j) { m_particleClustersBTE[i][j] += a_stat.m_particleClustersBTE[i][j]; } }
+          for (int i=0; i<50; ++i) {for (int j=0; j<4; ++j) { m_particleSpacePointsBTE[i][j] += a_stat.m_particleSpacePointsBTE[i][j];} }
+          m_nclustersPosBP  += m_nclustersPosBP;
+          m_nclustersPosBS  += m_nclustersPosBS;
+          m_nclustersPosEP  += m_nclustersPosEP;
+          m_nclustersPosES  += m_nclustersPosES;
+          m_nclustersPosDBM += m_nclustersPosDBM;
+          m_nclustersNegBP  += m_nclustersNegBP;
+          m_nclustersNegBS  += m_nclustersNegBS;
+          m_nclustersNegEP  += m_nclustersNegEP;
+          m_nclustersNegES  += m_nclustersNegES;
+          m_nclustersNegDBM += m_nclustersNegDBM;
+
+          return *this;
+        }
+      };
+
+      mutable std::mutex                           m_statMutex;
+      mutable std::vector<TrackCollectionStat_t>   m_trackCollectionStat;
+      mutable EventStat_t                          m_eventStat;
+
       unsigned int                       m_clcut                  ;
       unsigned int                       m_clcutTRT               ;
       unsigned int                       m_spcut                  ;
@@ -156,62 +241,95 @@ namespace InDet {
       double                             m_tcut                   ;
       double                             m_rmin                   ;
       double                             m_rmax                   ;
-      std::vector<std::string>           m_tracklocation          ; 
-      SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCTname ;
-      std::string                        m_spacepointsPixelname   ;
-      std::string                        m_spacepointsOverlapname ; 
-      SG::ReadHandleKey<SiClusterContainer> m_clustersSCTname     ;
-      std::string                        m_clustersPixelname      ;
-      std::string                        m_clustersTRTname        ;
-      std::string                        m_truth_locationPixel    ;
-      SG::ReadHandleKey<PRD_MultiTruthCollection> m_truth_locationSCT;
-      std::string                        m_truth_locationTRT      ;
-      const SpacePointContainer        * m_spacepointsSCT         ;
-      const SpacePointContainer        * m_spacepointsPixel       ;
-      const SpacePointOverlapCollection* m_spacepointsOverlap     ;
-      const SiClusterContainer         * m_pixcontainer           ;
-      const SiClusterContainer         * m_sctcontainer           ;
-      const TRT_DriftCircleContainer   * m_trtcontainer           ;
-      const PRD_MultiTruthCollection   * m_truthPIX               ;
-      const PRD_MultiTruthCollection   * m_truthSCT               ;
-      const PRD_MultiTruthCollection   * m_truthTRT               ;
-      std::multimap<int,const Trk::PrepRawData*> m_kinecluster    ;
-      std::multimap<int,const Trk::PrepRawData*> m_kineclusterTRT ;
-      std::multimap<int,const Trk::SpacePoint*>  m_kinespacepoint ;
-      std::list<Barcode>                         m_particles[100] ;
-      std::list<int>                             m_difference[100];
-      std::multimap<int,int>                     m_tracks[100]    ;
+      SG::ReadHandleKeyArray<TrackCollection>        m_tracklocation;
+      SG::ReadHandleKey<SpacePointContainer>         m_spacepointsSCTname;
+      SG::ReadHandleKey<SpacePointContainer>         m_spacepointsPixelname;
+      SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlapname;
+      SG::ReadHandleKey<SiClusterContainer>          m_clustersSCTname;
+      SG::ReadHandleKey<SiClusterContainer>          m_clustersPixelname;
+      SG::ReadHandleKey<TRT_DriftCircleContainer>    m_clustersTRTname;
+      SG::ReadHandleKey<PRD_MultiTruthCollection>    m_truth_locationPixel;
+      SG::ReadHandleKey<PRD_MultiTruthCollection>    m_truth_locationSCT;
+      SG::ReadHandleKey<PRD_MultiTruthCollection>    m_truth_locationTRT;
+
+      struct EventData_t {
+      public:
+        EventData_t()
+        : m_nspacepoints(0),
+          m_nclusters(0),
+          m_nqtracks(0),
+          m_nclustersTRT(0),
+          m_truthPIX{},
+          m_truthSCT{},
+          m_truthTRT{}
+        {}
+
+        EventData_t(unsigned int n_collections)
+        : m_nspacepoints(0),
+          m_nclusters(0),
+          m_nqtracks(0),
+          m_nclustersTRT(0),
+          m_truthPIX{},
+          m_truthSCT{},
+          m_truthTRT{}
+        {
+          m_particles.resize(n_collections);
+          m_difference.resize(n_collections);
+          m_tracks.resize(n_collections);
+          m_trackCollectionStat.resize(n_collections);
+	}
+
+        int                                m_nspacepoints           ;
+        int                                m_nclusters              ;
+        int                                m_nqtracks               ;
+        int                                m_nclustersTRT           ;
+
+        std::vector<std::unique_ptr<SG::VarHandleBase> >  m_clusterHandles;
+        std::vector<SG::ReadHandle<TrackCollection> >     m_trackcontainer;
+        std::vector<SG::ReadHandle<SpacePointContainer> > m_spacePointContainer;
+        std::unique_ptr<SG::ReadHandle<SpacePointOverlapCollection> > m_spacepointsOverlap;
+        const PRD_MultiTruthCollection           * m_truthPIX       ;
+        const PRD_MultiTruthCollection           * m_truthSCT       ;
+        const PRD_MultiTruthCollection           * m_truthTRT       ;
+        std::multimap<int,const Trk::PrepRawData*> m_kinecluster    ;
+        std::multimap<int,const Trk::PrepRawData*> m_kineclusterTRT ;
+        std::multimap<int,const Trk::SpacePoint*>  m_kinespacepoint ;
+        std::vector<std::list<Barcode> >           m_particles      ;
+        std::vector<std::list<int> >               m_difference     ;
+        std::vector<std::multimap<int,int> >       m_tracks         ;
+        std::vector<TrackCollectionStat_t>         m_trackCollectionStat;
+        EventStat_t                                m_eventStat;
+      };
+
       const HepPDT::ParticleDataTable*        m_particleDataTable ;
 
       ///////////////////////////////////////////////////////////////////
       // Protected methods
       ///////////////////////////////////////////////////////////////////
 
-      void newSpacePointsEvent     ();
-      void newClustersEvent        ();
-      void tracksComparison        ();
-      void efficiencyReconstruction();
-      bool noReconstructedParticles();
+      void newSpacePointsEvent     (const EventContext& ctx, InDet::TrackClusterAssValidation::EventData_t &event_data) const;
+      void newClustersEvent        (const EventContext& ctx, InDet::TrackClusterAssValidation::EventData_t &event_data) const;
+      void tracksComparison        (const EventContext& ctx, InDet::TrackClusterAssValidation::EventData_t &event_data) const;
+      void efficiencyReconstruction(InDet::TrackClusterAssValidation::EventData_t &event_data) const;
+      bool noReconstructedParticles(const InDet::TrackClusterAssValidation::EventData_t &event_data) const;
+
+      int QualityTracksSelection(InDet::TrackClusterAssValidation::EventData_t &event_data) const;
+      int kine(const InDet::TrackClusterAssValidation::EventData_t &event_data,const Trk::PrepRawData*,const Trk::PrepRawData*,int*,int) const;
+      int kine (const InDet::TrackClusterAssValidation::EventData_t &event_data,const Trk::PrepRawData*,int*,int) const;
+      int kine0(const InDet::TrackClusterAssValidation::EventData_t &event_data,const Trk::PrepRawData*,int*,int) const;
 
-      int  QualityTracksSelection();
-      int kine(const Trk::PrepRawData*,const Trk::PrepRawData*,int*,int);
-      int kine (const Trk::PrepRawData*,int*,int);	
-      int kine0(const Trk::PrepRawData*,int*,int);
-      
-      bool isTheSameDetElement(int,const Trk::PrepRawData*);
-      bool isTheSameDetElement(int,const Trk::SpacePoint* );
+      bool isTheSameDetElement(const InDet::TrackClusterAssValidation::EventData_t &event_data, int,const Trk::PrepRawData*) const;
+      bool isTheSameDetElement(const InDet::TrackClusterAssValidation::EventData_t &event_data,int,const Trk::SpacePoint* ) const;
 
       PRD_MultiTruthCollection::const_iterator findTruth
-	(const Trk::PrepRawData*,PRD_MultiTruthCollection::const_iterator&);
-      
-      int charge(std::pair<int,const Trk::PrepRawData*>,int&);
+      (const InDet::TrackClusterAssValidation::EventData_t &event_data,const Trk::PrepRawData*,PRD_MultiTruthCollection::const_iterator&) const;
+
+      int charge(const InDet::TrackClusterAssValidation::EventData_t &event_data,std::pair<int,const Trk::PrepRawData*>,int&) const;
 
-      MsgStream&    dumptools(MsgStream&    out) const;
-      MsgStream&    dumpevent(MsgStream&    out) const;
+      MsgStream&    dumptools(MsgStream&    out, MSG::Level level) const;
+      MsgStream&    dumpevent(MsgStream&    out, const InDet::TrackClusterAssValidation::EventData_t &event_data) const;
 
     };
-  MsgStream&    operator << (MsgStream&   ,const TrackClusterAssValidation&);
-  std::ostream& operator << (std::ostream&,const TrackClusterAssValidation&); 
 
 }
 #endif // TrackClusterAssValidation_H
diff --git a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/doc/packagedoc.h b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/doc/packagedoc.h
index 9942291e33b4e00953fa2ee6f5d8c566c5880e34..25a7e459a38491009c4e090c8493e621a8d52f38 100644
--- a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/doc/packagedoc.h
+++ b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/doc/packagedoc.h
@@ -15,7 +15,5 @@ and truth collections and separate truth particles with sufficient number space
 After that algorith compare them with clusters assosiated with tracks. Final product of this stadies
 is two dimension table of probabilities to loss correct cluster and assosiate track with wrong one.
 
-@section InDetTrackClusterAssValidation_TrackClusterAssValidationReq Requirements file
 
 */
-
diff --git a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx
index 4d7054d258da45930c05497b0451b6e0f7519259..8c11c750b41b573402ad7aec479841c517af6382 100755
--- a/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx
+++ b/InnerDetector/InDetValidation/InDetTrackClusterAssValidation/src/TrackClusterAssValidation.cxx
@@ -17,23 +17,21 @@
 ///////////////////////////////////////////////////////////////////
 
 InDet::TrackClusterAssValidation::TrackClusterAssValidation
-(const std::string& name,ISvcLocator* pSvcLocator) : AthAlgorithm(name,pSvcLocator)
+(const std::string& name,ISvcLocator* pSvcLocator)
+  : AthReentrantAlgorithm(name,pSvcLocator),
+    m_truth_locationPixel( "PRD_MultiTruthPixel" ),
+    m_truth_locationSCT(   "PRD_MultiTruthSCT" ),
+    m_truth_locationTRT(   "PRD_MultiTruthTRT" )
 {
 
   // TrackClusterAssValidation steering parameters
   //
   m_spacepointsSCTname     = std::string("SCT_SpacePoints")   ;
   m_spacepointsPixelname   = "PixelSpacePoints"               ;
-  m_spacepointsOverlapname = "OverlapSpacePoints"             ; 
+  m_spacepointsOverlapname = "OverlapSpacePoints"             ;
   m_clustersPixelname      = "PixelClusters"                  ;
   m_clustersSCTname        = std::string("SCT_Clusters")      ;
   m_clustersTRTname        = "TRT_DriftCircles"               ;
-  m_truth_locationPixel    = "PRD_MultiTruthPixel"            ;
-  m_truth_locationSCT      = std::string("PRD_MultiTruthSCT") ;
-  m_truth_locationTRT      = "PRD_MultiTruthTRT"              ;
-  m_spacepointsSCT         = 0                                ;
-  m_spacepointsPixel       = 0                                ;
-  m_spacepointsOverlap     = 0                                ;
   m_ptcut                  = 1000.                            ;
   m_ptcutmax               = 1.e20                            ;
   m_rapcut                 = 2.6                              ;
@@ -47,32 +45,8 @@ InDet::TrackClusterAssValidation::TrackClusterAssValidation
   m_useTRT                 = true                             ;
   m_useOutliers            = false                            ;
   m_pdg                    = 0                                ;
-  m_outputlevel            = 0                                ;
-  m_nprint                 = 0                                ; 
-  m_ncolection             = 0                                ;
-  m_nspacepoints           = 0                                ;
-  m_nclusters              = 0                                ;
-  m_nclustersTRT           = 0                                ;
-  m_nqtracks               = 0                                ;
-  m_events                 = 0                                ; 
-  m_eventsPOS              = 0                                ;
-  m_eventsNEG              = 0                                ;
-  m_nclustersPosBP         = 0                                ;
-  m_nclustersPosBS         = 0                                ;
-  m_nclustersPosEP         = 0                                ;
-  m_nclustersPosES         = 0                                ;
-  m_nclustersNegBP         = 0                                ;
-  m_nclustersNegBS         = 0                                ;
-  m_nclustersNegEP         = 0                                ;
-  m_nclustersNegES         = 0                                ;
   m_tcut                   = 0.                               ;
-  m_pixcontainer           = 0                                ;
-  m_sctcontainer           = 0                                ;
-  m_trtcontainer           = 0                                ;
-  m_truthPIX               = 0                                ;
-  m_truthSCT               = 0                                ;
-  m_truthTRT               = 0                                ;
-  m_particleDataTable      = 0                                ; 
+  m_particleDataTable      = 0                                ;
 
   declareProperty("TracksLocation"        ,m_tracklocation         );
   declareProperty("SpacePointsSCTName"    ,m_spacepointsSCTname    );
@@ -103,10 +77,10 @@ InDet::TrackClusterAssValidation::TrackClusterAssValidation
 // Initialisation
 ///////////////////////////////////////////////////////////////////
 
-StatusCode InDet::TrackClusterAssValidation::initialize() 
+StatusCode InDet::TrackClusterAssValidation::initialize()
 {
-  
-  StatusCode sc; 
+
+  StatusCode sc;
 
   m_rapcut ? m_tcut = 1./tan(2.*atan(exp(-m_rapcut))) : m_tcut = 0.;
 
@@ -117,7 +91,7 @@ StatusCode InDet::TrackClusterAssValidation::initialize()
   if (sc.isFailure()) {
     msg(MSG::FATAL) << " Could not initialize Particle Properties Service" << endmsg;
     return StatusCode::FAILURE;
-  }      
+  }
 
   // Particle Data Table
   //
@@ -127,73 +101,14 @@ StatusCode InDet::TrackClusterAssValidation::initialize()
     return StatusCode::FAILURE;
   }
 
-  // Get output print level
-  //
-  m_outputlevel = msg().level()-MSG::DEBUG;
-
-  if(m_outputlevel <= 0) {
-    m_nprint=0; msg(MSG::DEBUG)<<(*this)<<endmsg;
-  }
-
   // Erase statistic information
   //
-  m_pdg          = fabs(m_pdg)         ;
-  m_events       = 0                   ;
-  m_eventsPOS    = 0                   ;
-  m_eventsNEG    = 0                   ;
-  m_eventsBTE[0] = 0                   ;
-  m_eventsBTE[1] = 0                   ;
-  m_eventsBTE[2] = 0                   ;
-  m_eventsBTE[3] = 0                   ;
-  m_ncolection = m_tracklocation.size();
-
-  for(int nc = 0; nc!=m_ncolection; ++nc) {
-    for(int i=0; i!=6; ++i) m_efficiency   [nc][i] = 0;
-    for(int i=0; i!=6; ++i) m_efficiencyPOS[nc][i] = 0;
-    for(int i=0; i!=6; ++i) m_efficiencyNEG[nc][i] = 0;
-    for(int i=0; i!=6; ++i) {
-      for(int j=0; j!=5; ++j) m_efficiencyN  [nc][i][j]    = 0;
-      for(int j=0; j!=5; ++j) m_efficiencyBTE[nc][i][j][0] = 0;
-      for(int j=0; j!=5; ++j) m_efficiencyBTE[nc][i][j][1] = 0;
-      for(int j=0; j!=5; ++j) m_efficiencyBTE[nc][i][j][2] = 0;
-      for(int j=0; j!=5; ++j) m_efficiencyBTE[nc][i][j][3] = 0;
-    }
+  m_pdg          = std::abs(m_pdg)         ;
 
-    m_ntracksPOSB [nc] = 0; 
-    m_ntracksPOSE [nc] = 0; 
-    m_ntracksNEGB [nc] = 0; 
-    m_ntracksNEGE [nc] = 0;
-    m_ntracksNEGDBM [nc] = 0;
-    m_ntracksPOSDBM [nc] = 0;
- 
-    for(int i=0; i!=50; ++i) {m_total[nc][i] = 0; m_fake[nc][i] =0;}
-  } 
-  m_nclustersPosBP  = 0; // number barrel pixels clusters for positive particles
-  m_nclustersPosBS  = 0; // number barrel  SCT   clusters for positive particles
-  m_nclustersPosEP  = 0; // number endcap pixels clusters for positive particles
-  m_nclustersPosES  = 0; // number endcap  SCT   clusters for positive particles
-  m_nclustersPosDBM = 0;
-  m_nclustersNegBP  = 0; // number barrel pixels clusters for negative particles
-  m_nclustersNegBS  = 0; // number barrel  SCT   clusters for negative particles
-  m_nclustersNegEP  = 0; // number endcap pixels clusters for negative particles
-  m_nclustersNegES  = 0; // number endcap  SCT   clusters for negative particles
-  m_nclustersNegDBM = 0;
-
-  for(int i=0; i!=50; ++i) {
-    m_particleClusters      [i]    = 0;
-    m_particleClustersBTE   [i][0] = 0;
-    m_particleClustersBTE   [i][1] = 0;
-    m_particleClustersBTE   [i][2] = 0;
-    m_particleClustersBTE   [i][3] = 0;
-
-    m_particleSpacePoints   [i]    = 0;
-    m_particleSpacePointsBTE[i][0] = 0;
-    m_particleSpacePointsBTE[i][1] = 0;
-    m_particleSpacePointsBTE[i][2] = 0;
-    m_particleSpacePointsBTE[i][3] = 0;
+  m_trackCollectionStat.resize(m_tracklocation.size());
+  m_eventStat = EventStat_t();
 
-  }
-  if(!m_useTRT) m_clcutTRT = 0; 
+  if(!m_useTRT) m_clcutTRT = 0;
   if(!m_clcutTRT) m_useTRT = false;
 
   // Read Handle Key
@@ -201,6 +116,22 @@ StatusCode InDet::TrackClusterAssValidation::initialize()
   ATH_CHECK(m_clustersSCTname.initialize(m_useSCT));
   ATH_CHECK(m_spacepointsSCTname.initialize(m_useSCT));
 
+  ATH_CHECK( m_clustersPixelname.initialize(m_usePIX));
+  ATH_CHECK( m_spacepointsPixelname.initialize(m_usePIX));
+  ATH_CHECK( m_truth_locationPixel.initialize(m_usePIX));
+
+  ATH_CHECK( m_spacepointsOverlapname.initialize(m_useSCT));
+
+  ATH_CHECK( m_clustersTRTname.initialize(m_useTRT));
+  ATH_CHECK( m_truth_locationTRT.initialize(m_useTRT));
+
+  ATH_CHECK( m_tracklocation.initialize());
+
+  if (msgLvl(MSG::DEBUG)) {
+    dumptools(msg(),MSG::DEBUG);
+    msg() << endmsg;
+  }
+
   return sc;
 }
 
@@ -208,54 +139,64 @@ StatusCode InDet::TrackClusterAssValidation::initialize()
 // Execute
 ///////////////////////////////////////////////////////////////////
 
-StatusCode InDet::TrackClusterAssValidation::execute() 
-{ 
+StatusCode InDet::TrackClusterAssValidation::execute_r(const EventContext& ctx) const
+{
 
   if(!m_usePIX && !m_useSCT) return StatusCode::SUCCESS;;
+  EventData_t event_data(m_tracklocation.size() );
 
-  m_truthPIX  = 0;
-  m_truthSCT  = 0;
-  m_truthTRT  = 0;
-  StatusCode s;
-
+  std::vector<SG::ReadHandle<PRD_MultiTruthCollection> > read_handle;
+  read_handle.reserve(3);
   if(m_usePIX) {
-    s = evtStore()->retrieve(m_truthPIX,m_truth_locationPixel);
-    if (s.isFailure()) {
-      msg(MSG::FATAL)<<"Could not find TruthPixel"<<endmsg;
-      return s;
+    read_handle.push_back(SG::ReadHandle<PRD_MultiTruthCollection>(m_truth_locationPixel,ctx));
+    if (not read_handle.back().isValid()) {
+      ATH_MSG_FATAL( "Could not find TruthPIX" );
+      return StatusCode::FAILURE;
     }
+    event_data.m_truthPIX = &(*read_handle.back());
   }
 
   if(m_useSCT) {
-    SG::ReadHandle<PRD_MultiTruthCollection> truthSCT(m_truth_locationSCT);
-    if (not truthSCT.isValid()) {
-      msg(MSG::FATAL)<<"Could not find TruthSCT"<<endmsg;
-      return s;
+    read_handle.push_back(SG::ReadHandle<PRD_MultiTruthCollection>(m_truth_locationSCT,ctx));
+    if (not read_handle.back().isValid()) {
+      ATH_MSG_FATAL( "Could not find TruthSCT" );
+      return StatusCode::FAILURE;
     }
-    m_truthSCT = truthSCT.cptr();
+    event_data.m_truthSCT = &(*read_handle.back());
   }
 
-  if( m_clcutTRT > 0) {
-    s = evtStore()->retrieve(m_truthTRT,m_truth_locationTRT);
-    if (s.isFailure()) {
-      msg(MSG::FATAL)<<"Could not find TruthTRT"<<endmsg;
-      return s;
+  if(m_clcutTRT > 0) {
+    read_handle.push_back(SG::ReadHandle<PRD_MultiTruthCollection>(m_truth_locationTRT,ctx));
+    if (not read_handle.back().isValid()) {
+      ATH_MSG_FATAL( "Could not find TruthTRT" );
+      return StatusCode::FAILURE;
     }
+    event_data.m_truthTRT = &(*read_handle.back());
   }
 
-  newClustersEvent                   ();
-  newSpacePointsEvent                ();
-  m_nqtracks = QualityTracksSelection();
-  tracksComparison                   ();
-  if(m_particles[0].size() > 0) {
+  newClustersEvent      (ctx,event_data);
+  newSpacePointsEvent   (ctx,event_data);
+  event_data.m_nqtracks = QualityTracksSelection(event_data);
+  tracksComparison      (ctx,event_data);
+  if(event_data.m_particles[0].size() > 0) {
 
-    efficiencyReconstruction(); 
-    if(m_outputlevel<=0) noReconstructedParticles();
+    efficiencyReconstruction(event_data);
+    if(msgLvl(MSG::DEBUG)) noReconstructedParticles(event_data);
 
   }
 
-  if(m_outputlevel< 0) {
-    m_nprint=1; msg(MSG::DEBUG)<<(*this)<<endmsg;
+  {
+    std::lock_guard<std::mutex> lock(m_statMutex);
+    assert( event_data.m_trackCollectionStat.size() == m_trackCollectionStat.size());
+    for (unsigned int i=0; i< m_trackCollectionStat.size(); ++i ) {
+      m_trackCollectionStat[i] += event_data.m_trackCollectionStat[i];
+    }
+    m_eventStat += event_data.m_eventStat;
+  }
+
+  if (msgLvl(MSG::DEBUG)) {
+    dumpevent(msg(),event_data);
+    msg() << endmsg;
   }
   return StatusCode::SUCCESS;
 }
@@ -266,49 +207,49 @@ StatusCode InDet::TrackClusterAssValidation::execute()
 
 StatusCode InDet::TrackClusterAssValidation::finalize() {
 
-  if(m_events<=0) return StatusCode::SUCCESS;
-    
+  if(m_eventStat.m_events<=0) return StatusCode::SUCCESS;
+
   std::cout<<"|-----------------------------------------------------------------------------------|"
 	   <<std::endl;
   std::cout<<"|        TrackClusterAssValidation statistic for charge truth particles with        |"
 	   <<std::endl;
   std::cout<<"|                                                                                   |"
 	   <<std::endl;
-  std::cout<<"|                    pT                      >=" 
+  std::cout<<"|                    pT                      >="
 	   <<std::setw(13)<<std::setprecision(5)<<m_ptcut<<" MeV"
 	   <<"                    |"<<std::endl;
   if(m_ptcutmax < 1000000.) {
-    std::cout<<"|                    pT                      <=" 
+    std::cout<<"|                    pT                      <="
 	     <<std::setw(13)<<std::setprecision(5)<<m_ptcutmax<<" MeV"
 	     <<"                    |"<<std::endl;
   }
-  std::cout<<"|                    |rapidity|              <=" 
+  std::cout<<"|                    |rapidity|              <="
 	   <<std::setw(13)<<std::setprecision(5)<<m_rapcut
 	   <<"                        |"<<std::endl;
-  std::cout<<"|                    max vertex radius       <=" 
-	   <<std::setw(13)<<std::setprecision(5)<<m_rmax<<" mm" 
+  std::cout<<"|                    max vertex radius       <="
+	   <<std::setw(13)<<std::setprecision(5)<<m_rmax<<" mm"
 	   <<"                     |"<<std::endl;
-  std::cout<<"|                    min vertex radius       >=" 
-	   <<std::setw(13)<<std::setprecision(5)<<m_rmin<<" mm" 
+  std::cout<<"|                    min vertex radius       >="
+	   <<std::setw(13)<<std::setprecision(5)<<m_rmin<<" mm"
 	   <<"                     |"<<std::endl;
   std::cout<<"|                    particles pdg            ="
-	   <<std::setw(8)<<m_pdg 
+	   <<std::setw(8)<<m_pdg
 	   <<"                             |"<<std::endl;
- 
+
   std::string YN = "yes"; if(!m_usePIX) YN = "no ";
-  std::cout<<"|                    use Pixels information   " 
+  std::cout<<"|                    use Pixels information   "
 	   <<"       "<<YN
 	   <<"                            |"<<std::endl;
   YN             = "yes"; if(!m_useSCT) YN = "no ";
-  std::cout<<"|                    use SCT    information   " 
+  std::cout<<"|                    use SCT    information   "
 	   <<"       "<<YN
 	   <<"                            |"<<std::endl;
   YN             = "yes"; if(!m_useTRT) YN = "no ";
-  std::cout<<"|                    use TRT    information   " 
+  std::cout<<"|                    use TRT    information   "
 	   <<"       "<<YN
 	   <<"                            |"<<std::endl;
   YN             = "yes"; if(!m_useOutliers) YN = "no ";
-  std::cout<<"|                    take into account outliers" 
+  std::cout<<"|                    take into account outliers"
 	   <<"      "<<YN
 	   <<"                            |"<<std::endl;
 
@@ -316,135 +257,135 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
 	   <<std::endl;
   if(!m_usePIX && !m_useSCT) return StatusCode::SUCCESS;
 
-  
+
   for(int i=48; i>=0; --i) {
-    m_particleClusters      [i]   +=m_particleClusters      [i+1];
-    m_particleClustersBTE   [i][0]+=m_particleClustersBTE   [i+1][0];
-    m_particleClustersBTE   [i][1]+=m_particleClustersBTE   [i+1][1];
-    m_particleClustersBTE   [i][2]+=m_particleClustersBTE   [i+1][2];
-    m_particleClustersBTE   [i][3]+=m_particleClustersBTE   [i+1][3];
-    m_particleSpacePoints   [i]   +=m_particleSpacePoints   [i+1];
-    m_particleSpacePointsBTE[i][0]+=m_particleSpacePointsBTE[i+1][0];
-    m_particleSpacePointsBTE[i][1]+=m_particleSpacePointsBTE[i+1][1];
-    m_particleSpacePointsBTE[i][2]+=m_particleSpacePointsBTE[i+1][2];
-    m_particleSpacePointsBTE[i][3]+=m_particleSpacePointsBTE[i+1][3];
+    m_eventStat.m_particleClusters      [i]   +=m_eventStat.m_particleClusters      [i+1];
+    m_eventStat.m_particleClustersBTE   [i][0]+=m_eventStat.m_particleClustersBTE   [i+1][0];
+    m_eventStat.m_particleClustersBTE   [i][1]+=m_eventStat.m_particleClustersBTE   [i+1][1];
+    m_eventStat.m_particleClustersBTE   [i][2]+=m_eventStat.m_particleClustersBTE   [i+1][2];
+    m_eventStat.m_particleClustersBTE   [i][3]+=m_eventStat.m_particleClustersBTE   [i+1][3];
+    m_eventStat.m_particleSpacePoints   [i]   +=m_eventStat.m_particleSpacePoints   [i+1];
+    m_eventStat.m_particleSpacePointsBTE[i][0]+=m_eventStat.m_particleSpacePointsBTE[i+1][0];
+    m_eventStat.m_particleSpacePointsBTE[i][1]+=m_eventStat.m_particleSpacePointsBTE[i+1][1];
+    m_eventStat.m_particleSpacePointsBTE[i][2]+=m_eventStat.m_particleSpacePointsBTE[i+1][2];
+    m_eventStat.m_particleSpacePointsBTE[i][3]+=m_eventStat.m_particleSpacePointsBTE[i+1][3];
   }
 
-  double pa   =  double(m_particleClusters[0]); if(pa < 1.) pa = 1.;
-  double pc2  = double(m_particleClusters   [ 2])        / pa;
-  double pc3  = double(m_particleClusters   [ 3])        / pa;
-  double pc4  = double(m_particleClusters   [ 4])        / pa;
-  double pc5  = double(m_particleClusters   [ 5])        / pa;
-  double pc6  = double(m_particleClusters   [ 6])        / pa;
-  double pc7  = double(m_particleClusters   [ 7])        / pa;
-  double pc8  = double(m_particleClusters   [ 8])        / pa;
-  double pc9  = double(m_particleClusters   [ 9])        / pa;
-  double pc10 = double(m_particleClusters   [10])        / pa;
-  double pc11 = double(m_particleClusters   [11])        / pa;
-
-  pa           = double(m_particleClustersBTE[0][0]); if(pa < 1.) pa = 1.;
-  double pcB2  = double(m_particleClustersBTE[ 2][0])    / pa;
-  double pcB3  = double(m_particleClustersBTE[ 3][0])    / pa;
-  double pcB4  = double(m_particleClustersBTE[ 4][0])    / pa;
-  double pcB5  = double(m_particleClustersBTE[ 5][0])    / pa;
-  double pcB6  = double(m_particleClustersBTE[ 6][0])    / pa;
-  double pcB7  = double(m_particleClustersBTE[ 7][0])    / pa;
-  double pcB8  = double(m_particleClustersBTE[ 8][0])    / pa;
-  double pcB9  = double(m_particleClustersBTE[ 9][0])    / pa;
-  double pcB10 = double(m_particleClustersBTE[10][0])    / pa;
-  double pcB11 = double(m_particleClustersBTE[11][0])    / pa;
-  pa           = double(m_particleClustersBTE[0][1]); if(pa < 1.) pa = 1.;
-  double pcT2  = double(m_particleClustersBTE[ 2][1])    / pa;
-  double pcT3  = double(m_particleClustersBTE[ 3][1])    / pa;
-  double pcT4  = double(m_particleClustersBTE[ 4][1])    / pa;
-  double pcT5  = double(m_particleClustersBTE[ 5][1])    / pa;
-  double pcT6  = double(m_particleClustersBTE[ 6][1])    / pa;
-  double pcT7  = double(m_particleClustersBTE[ 7][1])    / pa;
-  double pcT8  = double(m_particleClustersBTE[ 8][1])    / pa;
-  double pcT9  = double(m_particleClustersBTE[ 9][1])    / pa;
-  double pcT10 = double(m_particleClustersBTE[10][1])    / pa;
-  double pcT11 = double(m_particleClustersBTE[11][1])    / pa;
-  pa           = double(m_particleClustersBTE[0][2]); if(pa < 1.) pa = 1.;
-  double pcE2  = double(m_particleClustersBTE[ 2][2])    / pa;
-  double pcE3  = double(m_particleClustersBTE[ 3][2])    / pa;
-  double pcE4  = double(m_particleClustersBTE[ 4][2])    / pa;
-  double pcE5  = double(m_particleClustersBTE[ 5][2])    / pa;
-  double pcE6  = double(m_particleClustersBTE[ 6][2])    / pa;
-  double pcE7  = double(m_particleClustersBTE[ 7][2])    / pa;
-  double pcE8  = double(m_particleClustersBTE[ 8][2])    / pa;
-  double pcE9  = double(m_particleClustersBTE[ 9][2])    / pa;
-  double pcE10 = double(m_particleClustersBTE[10][2])    / pa;
-  double pcE11 = double(m_particleClustersBTE[11][2])    / pa;
-
-  pa           = double(m_particleClustersBTE[0][3]); if(pa < 1.) pa = 1.;
-  double pcD2  = double(m_particleClustersBTE[ 2][3])    / pa;
-  double pcD3  = double(m_particleClustersBTE[ 3][3])    / pa;
-  double pcD4  = double(m_particleClustersBTE[ 4][3])    / pa;
-  double pcD5  = double(m_particleClustersBTE[ 5][3])    / pa;
-  double pcD6  = double(m_particleClustersBTE[ 6][3])    / pa;
-  double pcD7  = double(m_particleClustersBTE[ 7][3])    / pa;
-  double pcD8  = double(m_particleClustersBTE[ 8][3])    / pa;
-  double pcD9  = double(m_particleClustersBTE[ 9][3])    / pa;
-  double pcD10 = double(m_particleClustersBTE[10][3])    / pa;
-  double pcD11 = double(m_particleClustersBTE[11][3])    / pa;
-
-
-  pa           = double(m_particleSpacePoints[0]); if(pa < 1.) pa = 1.;
-  double ps2   = double(m_particleSpacePoints[ 2])       / pa;
-  double ps3   = double(m_particleSpacePoints[ 3])       / pa;
-  double ps4   = double(m_particleSpacePoints[ 4])       / pa;
-  double ps5   = double(m_particleSpacePoints[ 5])       / pa;
-  double ps6   = double(m_particleSpacePoints[ 6])       / pa;
-  double ps7   = double(m_particleSpacePoints[ 7])       / pa;
-  double ps8   = double(m_particleSpacePoints[ 8])       / pa;
-  double ps9   = double(m_particleSpacePoints[ 9])       / pa;
-  double ps10  = double(m_particleSpacePoints[10])       / pa;
-  double ps11  = double(m_particleSpacePoints[11])       / pa;
-  pa           = double(m_particleSpacePointsBTE[0][0]); if(pa < 1.) pa = 1.;
-  double psB2  = double(m_particleSpacePointsBTE[ 2][0]) / pa;
-  double psB3  = double(m_particleSpacePointsBTE[ 3][0]) / pa;
-  double psB4  = double(m_particleSpacePointsBTE[ 4][0]) / pa;
-  double psB5  = double(m_particleSpacePointsBTE[ 5][0]) / pa;
-  double psB6  = double(m_particleSpacePointsBTE[ 6][0]) / pa;
-  double psB7  = double(m_particleSpacePointsBTE[ 7][0]) / pa;
-  double psB8  = double(m_particleSpacePointsBTE[ 8][0]) / pa;
-  double psB9  = double(m_particleSpacePointsBTE[ 9][0]) / pa;
-  double psB10 = double(m_particleSpacePointsBTE[10][0]) / pa;
-  double psB11 = double(m_particleSpacePointsBTE[11][0]) / pa;
-  pa           = double(m_particleSpacePointsBTE[0][1]); if(pa < 1.) pa = 1.;
-  double psT2  = double(m_particleSpacePointsBTE[ 2][1]) / pa;
-  double psT3  = double(m_particleSpacePointsBTE[ 3][1]) / pa;
-  double psT4  = double(m_particleSpacePointsBTE[ 4][1]) / pa;
-  double psT5  = double(m_particleSpacePointsBTE[ 5][1]) / pa;
-  double psT6  = double(m_particleSpacePointsBTE[ 6][1]) / pa;
-  double psT7  = double(m_particleSpacePointsBTE[ 7][1]) / pa;
-  double psT8  = double(m_particleSpacePointsBTE[ 8][1]) / pa;
-  double psT9  = double(m_particleSpacePointsBTE[ 9][1]) / pa;
-  double psT10 = double(m_particleSpacePointsBTE[10][1]) / pa;
-  double psT11 = double(m_particleSpacePointsBTE[11][1]) / pa;
-  pa           = double(m_particleSpacePointsBTE[0][2]); if(pa < 1.) pa = 1.; 
-  double psE2  = double(m_particleSpacePointsBTE[ 2][2]) / pa;
-  double psE3  = double(m_particleSpacePointsBTE[ 3][2]) / pa;
-  double psE4  = double(m_particleSpacePointsBTE[ 4][2]) / pa;
-  double psE5  = double(m_particleSpacePointsBTE[ 5][2]) / pa;
-  double psE6  = double(m_particleSpacePointsBTE[ 6][2]) / pa;
-  double psE7  = double(m_particleSpacePointsBTE[ 7][2]) / pa;
-  double psE8  = double(m_particleSpacePointsBTE[ 8][2]) / pa;
-  double psE9  = double(m_particleSpacePointsBTE[ 9][2]) / pa;
-  double psE10 = double(m_particleSpacePointsBTE[10][2]) / pa;
-  double psE11 = double(m_particleSpacePointsBTE[11][2]) / pa;
-
-  pa           = double(m_particleSpacePointsBTE[0][3]); if(pa < 1.) pa = 1.;
-  double psD2  = double(m_particleSpacePointsBTE[ 2][3]) / pa;
-  double psD3  = double(m_particleSpacePointsBTE[ 3][3]) / pa;
-  double psD4  = double(m_particleSpacePointsBTE[ 4][3]) / pa;
-  double psD5  = double(m_particleSpacePointsBTE[ 5][3]) / pa;
-  double psD6  = double(m_particleSpacePointsBTE[ 6][3]) / pa;
-  double psD7  = double(m_particleSpacePointsBTE[ 7][3]) / pa;
-  double psD8  = double(m_particleSpacePointsBTE[ 8][3]) / pa;
-  double psD9  = double(m_particleSpacePointsBTE[ 9][3]) / pa;
-  double psD10 = double(m_particleSpacePointsBTE[10][3]) / pa;
-  double psD11 = double(m_particleSpacePointsBTE[11][3]) / pa;
+  double pa   =  double(m_eventStat.m_particleClusters[0]); if(pa < 1.) pa = 1.;
+  double pc2  = double(m_eventStat.m_particleClusters   [ 2])        / pa;
+  double pc3  = double(m_eventStat.m_particleClusters   [ 3])        / pa;
+  double pc4  = double(m_eventStat.m_particleClusters   [ 4])        / pa;
+  double pc5  = double(m_eventStat.m_particleClusters   [ 5])        / pa;
+  double pc6  = double(m_eventStat.m_particleClusters   [ 6])        / pa;
+  double pc7  = double(m_eventStat.m_particleClusters   [ 7])        / pa;
+  double pc8  = double(m_eventStat.m_particleClusters   [ 8])        / pa;
+  double pc9  = double(m_eventStat.m_particleClusters   [ 9])        / pa;
+  double pc10 = double(m_eventStat.m_particleClusters   [10])        / pa;
+  double pc11 = double(m_eventStat.m_particleClusters   [11])        / pa;
+
+  pa           = double(m_eventStat.m_particleClustersBTE[0][0]); if(pa < 1.) pa = 1.;
+  double pcB2  = double(m_eventStat.m_particleClustersBTE[ 2][0])    / pa;
+  double pcB3  = double(m_eventStat.m_particleClustersBTE[ 3][0])    / pa;
+  double pcB4  = double(m_eventStat.m_particleClustersBTE[ 4][0])    / pa;
+  double pcB5  = double(m_eventStat.m_particleClustersBTE[ 5][0])    / pa;
+  double pcB6  = double(m_eventStat.m_particleClustersBTE[ 6][0])    / pa;
+  double pcB7  = double(m_eventStat.m_particleClustersBTE[ 7][0])    / pa;
+  double pcB8  = double(m_eventStat.m_particleClustersBTE[ 8][0])    / pa;
+  double pcB9  = double(m_eventStat.m_particleClustersBTE[ 9][0])    / pa;
+  double pcB10 = double(m_eventStat.m_particleClustersBTE[10][0])    / pa;
+  double pcB11 = double(m_eventStat.m_particleClustersBTE[11][0])    / pa;
+  pa           = double(m_eventStat.m_particleClustersBTE[0][1]); if(pa < 1.) pa = 1.;
+  double pcT2  = double(m_eventStat.m_particleClustersBTE[ 2][1])    / pa;
+  double pcT3  = double(m_eventStat.m_particleClustersBTE[ 3][1])    / pa;
+  double pcT4  = double(m_eventStat.m_particleClustersBTE[ 4][1])    / pa;
+  double pcT5  = double(m_eventStat.m_particleClustersBTE[ 5][1])    / pa;
+  double pcT6  = double(m_eventStat.m_particleClustersBTE[ 6][1])    / pa;
+  double pcT7  = double(m_eventStat.m_particleClustersBTE[ 7][1])    / pa;
+  double pcT8  = double(m_eventStat.m_particleClustersBTE[ 8][1])    / pa;
+  double pcT9  = double(m_eventStat.m_particleClustersBTE[ 9][1])    / pa;
+  double pcT10 = double(m_eventStat.m_particleClustersBTE[10][1])    / pa;
+  double pcT11 = double(m_eventStat.m_particleClustersBTE[11][1])    / pa;
+  pa           = double(m_eventStat.m_particleClustersBTE[0][2]); if(pa < 1.) pa = 1.;
+  double pcE2  = double(m_eventStat.m_particleClustersBTE[ 2][2])    / pa;
+  double pcE3  = double(m_eventStat.m_particleClustersBTE[ 3][2])    / pa;
+  double pcE4  = double(m_eventStat.m_particleClustersBTE[ 4][2])    / pa;
+  double pcE5  = double(m_eventStat.m_particleClustersBTE[ 5][2])    / pa;
+  double pcE6  = double(m_eventStat.m_particleClustersBTE[ 6][2])    / pa;
+  double pcE7  = double(m_eventStat.m_particleClustersBTE[ 7][2])    / pa;
+  double pcE8  = double(m_eventStat.m_particleClustersBTE[ 8][2])    / pa;
+  double pcE9  = double(m_eventStat.m_particleClustersBTE[ 9][2])    / pa;
+  double pcE10 = double(m_eventStat.m_particleClustersBTE[10][2])    / pa;
+  double pcE11 = double(m_eventStat.m_particleClustersBTE[11][2])    / pa;
+
+  pa           = double(m_eventStat.m_particleClustersBTE[0][3]); if(pa < 1.) pa = 1.;
+  double pcD2  = double(m_eventStat.m_particleClustersBTE[ 2][3])    / pa;
+  double pcD3  = double(m_eventStat.m_particleClustersBTE[ 3][3])    / pa;
+  double pcD4  = double(m_eventStat.m_particleClustersBTE[ 4][3])    / pa;
+  double pcD5  = double(m_eventStat.m_particleClustersBTE[ 5][3])    / pa;
+  double pcD6  = double(m_eventStat.m_particleClustersBTE[ 6][3])    / pa;
+  double pcD7  = double(m_eventStat.m_particleClustersBTE[ 7][3])    / pa;
+  double pcD8  = double(m_eventStat.m_particleClustersBTE[ 8][3])    / pa;
+  double pcD9  = double(m_eventStat.m_particleClustersBTE[ 9][3])    / pa;
+  double pcD10 = double(m_eventStat.m_particleClustersBTE[10][3])    / pa;
+  double pcD11 = double(m_eventStat.m_particleClustersBTE[11][3])    / pa;
+
+
+  pa           = double(m_eventStat.m_particleSpacePoints[0]); if(pa < 1.) pa = 1.;
+  double ps2   = double(m_eventStat.m_particleSpacePoints[ 2])       / pa;
+  double ps3   = double(m_eventStat.m_particleSpacePoints[ 3])       / pa;
+  double ps4   = double(m_eventStat.m_particleSpacePoints[ 4])       / pa;
+  double ps5   = double(m_eventStat.m_particleSpacePoints[ 5])       / pa;
+  double ps6   = double(m_eventStat.m_particleSpacePoints[ 6])       / pa;
+  double ps7   = double(m_eventStat.m_particleSpacePoints[ 7])       / pa;
+  double ps8   = double(m_eventStat.m_particleSpacePoints[ 8])       / pa;
+  double ps9   = double(m_eventStat.m_particleSpacePoints[ 9])       / pa;
+  double ps10  = double(m_eventStat.m_particleSpacePoints[10])       / pa;
+  double ps11  = double(m_eventStat.m_particleSpacePoints[11])       / pa;
+  pa           = double(m_eventStat.m_particleSpacePointsBTE[0][0]); if(pa < 1.) pa = 1.;
+  double psB2  = double(m_eventStat.m_particleSpacePointsBTE[ 2][0]) / pa;
+  double psB3  = double(m_eventStat.m_particleSpacePointsBTE[ 3][0]) / pa;
+  double psB4  = double(m_eventStat.m_particleSpacePointsBTE[ 4][0]) / pa;
+  double psB5  = double(m_eventStat.m_particleSpacePointsBTE[ 5][0]) / pa;
+  double psB6  = double(m_eventStat.m_particleSpacePointsBTE[ 6][0]) / pa;
+  double psB7  = double(m_eventStat.m_particleSpacePointsBTE[ 7][0]) / pa;
+  double psB8  = double(m_eventStat.m_particleSpacePointsBTE[ 8][0]) / pa;
+  double psB9  = double(m_eventStat.m_particleSpacePointsBTE[ 9][0]) / pa;
+  double psB10 = double(m_eventStat.m_particleSpacePointsBTE[10][0]) / pa;
+  double psB11 = double(m_eventStat.m_particleSpacePointsBTE[11][0]) / pa;
+  pa           = double(m_eventStat.m_particleSpacePointsBTE[0][1]); if(pa < 1.) pa = 1.;
+  double psT2  = double(m_eventStat.m_particleSpacePointsBTE[ 2][1]) / pa;
+  double psT3  = double(m_eventStat.m_particleSpacePointsBTE[ 3][1]) / pa;
+  double psT4  = double(m_eventStat.m_particleSpacePointsBTE[ 4][1]) / pa;
+  double psT5  = double(m_eventStat.m_particleSpacePointsBTE[ 5][1]) / pa;
+  double psT6  = double(m_eventStat.m_particleSpacePointsBTE[ 6][1]) / pa;
+  double psT7  = double(m_eventStat.m_particleSpacePointsBTE[ 7][1]) / pa;
+  double psT8  = double(m_eventStat.m_particleSpacePointsBTE[ 8][1]) / pa;
+  double psT9  = double(m_eventStat.m_particleSpacePointsBTE[ 9][1]) / pa;
+  double psT10 = double(m_eventStat.m_particleSpacePointsBTE[10][1]) / pa;
+  double psT11 = double(m_eventStat.m_particleSpacePointsBTE[11][1]) / pa;
+  pa           = double(m_eventStat.m_particleSpacePointsBTE[0][2]); if(pa < 1.) pa = 1.;
+  double psE2  = double(m_eventStat.m_particleSpacePointsBTE[ 2][2]) / pa;
+  double psE3  = double(m_eventStat.m_particleSpacePointsBTE[ 3][2]) / pa;
+  double psE4  = double(m_eventStat.m_particleSpacePointsBTE[ 4][2]) / pa;
+  double psE5  = double(m_eventStat.m_particleSpacePointsBTE[ 5][2]) / pa;
+  double psE6  = double(m_eventStat.m_particleSpacePointsBTE[ 6][2]) / pa;
+  double psE7  = double(m_eventStat.m_particleSpacePointsBTE[ 7][2]) / pa;
+  double psE8  = double(m_eventStat.m_particleSpacePointsBTE[ 8][2]) / pa;
+  double psE9  = double(m_eventStat.m_particleSpacePointsBTE[ 9][2]) / pa;
+  double psE10 = double(m_eventStat.m_particleSpacePointsBTE[10][2]) / pa;
+  double psE11 = double(m_eventStat.m_particleSpacePointsBTE[11][2]) / pa;
+
+  pa           = double(m_eventStat.m_particleSpacePointsBTE[0][3]); if(pa < 1.) pa = 1.;
+  double psD2  = double(m_eventStat.m_particleSpacePointsBTE[ 2][3]) / pa;
+  double psD3  = double(m_eventStat.m_particleSpacePointsBTE[ 3][3]) / pa;
+  double psD4  = double(m_eventStat.m_particleSpacePointsBTE[ 4][3]) / pa;
+  double psD5  = double(m_eventStat.m_particleSpacePointsBTE[ 5][3]) / pa;
+  double psD6  = double(m_eventStat.m_particleSpacePointsBTE[ 6][3]) / pa;
+  double psD7  = double(m_eventStat.m_particleSpacePointsBTE[ 7][3]) / pa;
+  double psD8  = double(m_eventStat.m_particleSpacePointsBTE[ 8][3]) / pa;
+  double psD9  = double(m_eventStat.m_particleSpacePointsBTE[ 9][3]) / pa;
+  double psD10 = double(m_eventStat.m_particleSpacePointsBTE[10][3]) / pa;
+  double psD11 = double(m_eventStat.m_particleSpacePointsBTE[11][3]) / pa;
 
 
   std::cout<<"|         Propability for such charge particles to have some number silicon                          |"
@@ -584,96 +525,96 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
 	   <<std::setw(8)<<std::setprecision(5)<<psD11
 	   <<"       |"
 	   <<std::endl;
-  
+
   std::cout<<"|                                                                                   |"
 	   <<std::endl;
   std::cout<<"|               Additional cuts for truth particles are                             |"
 	   <<std::endl;
 
-  std::cout<<"|                    number silicon clusters >=" 
+  std::cout<<"|                    number silicon clusters >="
 	   <<std::setw(13)<<m_clcut
 	   <<"                        |"<<std::endl;
-  std::cout<<"|                    number   trt   clusters >=" 
+  std::cout<<"|                    number   trt   clusters >="
 	   <<std::setw(13)<<m_clcutTRT
 	   <<"                        |"<<std::endl;
-  std::cout<<"|                    number  space    points >=" 
-	   <<std::setw(13)<<m_spcut 
+  std::cout<<"|                    number  space    points >="
+	   <<std::setw(13)<<m_spcut
 	   <<"                        |"<<std::endl;
 
-  pa  = double(m_particleClusters[0]); if(pa < 1.) pa = 1.;
-  std::cout<<"|           Propability find truth particles with this cuts is "    
-	   <<std::setw(8)<<std::setprecision(5)<<double(m_events)      /pa
+  pa  = double(m_eventStat.m_particleClusters[0]); if(pa < 1.) pa = 1.;
+  std::cout<<"|           Propability find truth particles with this cuts is "
+	   <<std::setw(8)<<std::setprecision(5)<<double(m_eventStat.m_events)      /pa
 	   <<"             |"
  	   <<std::endl;
-  pa  = double(m_particleClustersBTE[0][0]); if(pa < 1.) pa = 1.;
-  std::cout<<"|                                        For barrel     region "    
-	   <<std::setw(8)<<std::setprecision(5)<<double(m_eventsBTE[0])/pa
+  pa  = double(m_eventStat.m_particleClustersBTE[0][0]); if(pa < 1.) pa = 1.;
+  std::cout<<"|                                        For barrel     region "
+	   <<std::setw(8)<<std::setprecision(5)<<double(m_eventStat.m_eventsBTE[0])/pa
 	   <<"             |"
  	   <<std::endl;
-  pa  = double(m_particleClustersBTE[0][1]); if(pa < 1.) pa = 1.;
-  std::cout<<"|                                        For transition region "    
-	   <<std::setw(8)<<std::setprecision(5)<<double(m_eventsBTE[1])/pa
+  pa  = double(m_eventStat.m_particleClustersBTE[0][1]); if(pa < 1.) pa = 1.;
+  std::cout<<"|                                        For transition region "
+	   <<std::setw(8)<<std::setprecision(5)<<double(m_eventStat.m_eventsBTE[1])/pa
 	   <<"             |"
  	   <<std::endl;
-  pa  = double(m_particleClustersBTE[0][2]); if(pa < 1.) pa = 1.; 
-  std::cout<<"|                                        For endcap     region "    
-	   <<std::setw(8)<<std::setprecision(5)<<double(m_eventsBTE[2])/pa
+  pa  = double(m_eventStat.m_particleClustersBTE[0][2]); if(pa < 1.) pa = 1.;
+  std::cout<<"|                                        For endcap     region "
+	   <<std::setw(8)<<std::setprecision(5)<<double(m_eventStat.m_eventsBTE[2])/pa
 	   <<"             |"
  	   <<std::endl;
-  pa  = double(m_particleClustersBTE[0][3]); if(pa < 1.) pa = 1.;
+  pa  = double(m_eventStat.m_particleClustersBTE[0][3]); if(pa < 1.) pa = 1.;
   std::cout<<"|                                        For DBM        region "
-           <<std::setw(8)<<std::setprecision(5)<<double(m_eventsBTE[3])/pa
+           <<std::setw(8)<<std::setprecision(5)<<double(m_eventStat.m_eventsBTE[3])/pa
            <<"             |"
            <<std::endl;
 
   std::cout<<"|                                                                                   |"
 	   <<std::endl;
 
-  pa            = double(m_nclustersNegBP); if(pa < 1.) pa = 1.;
-  double ratio  = double(m_nclustersPosBP)/pa;
+  pa            = double(m_eventStat.m_nclustersNegBP); if(pa < 1.) pa = 1.;
+  double ratio  = double(m_eventStat.m_nclustersPosBP)/pa;
   double eratio = sqrt(ratio*(1.+ratio)/pa);
   std::cout<<"|      Ratio barrel pixels clusters for +/- particles ="
 	   <<std::setw(8)<<std::setprecision(5)<<ratio<<" +-"
 	   <<std::setw(8)<<std::setprecision(5)<<eratio
 	   <<"          |"
 	   <<std::endl;
-  pa            = double(m_nclustersNegEP); if(pa < 1.) pa = 1.;
-  ratio         = double(m_nclustersPosEP)/pa;
+  pa            = double(m_eventStat.m_nclustersNegEP); if(pa < 1.) pa = 1.;
+  ratio         = double(m_eventStat.m_nclustersPosEP)/pa;
   eratio        = sqrt(ratio*(1.+ratio)/pa);
   std::cout<<"|      Ratio endcap pixels clusters for +/- particles ="
 	   <<std::setw(8)<<std::setprecision(5)<<ratio<<" +-"
 	   <<std::setw(8)<<std::setprecision(5)<<eratio
 	   <<"          |"
 	   <<std::endl;
-  pa            = double(m_nclustersNegDBM); if(pa < 1.) pa = 1.;
-  ratio         = double(m_nclustersPosDBM)/pa;
+  pa            = double(m_eventStat.m_nclustersNegDBM); if(pa < 1.) pa = 1.;
+  ratio         = double(m_eventStat.m_nclustersPosDBM)/pa;
   eratio        = sqrt(ratio*(1.+ratio)/pa);
   std::cout<<"|      Ratio  DBM  pixels clusters for +/- particles = "
            <<std::setw(8)<<std::setprecision(5)<<ratio<<" +-"
            <<std::setw(8)<<std::setprecision(5)<<eratio
            <<"          |"
            <<std::endl;
-  pa            = double(m_nclustersNegBS); if(pa < 1.) pa = 1.;
-  ratio         = double(m_nclustersPosBS)/pa;
+  pa            = double(m_eventStat.m_nclustersNegBS); if(pa < 1.) pa = 1.;
+  ratio         = double(m_eventStat.m_nclustersPosBS)/pa;
   eratio        = sqrt(ratio*(1.+ratio)/pa);
   std::cout<<"|      Ratio barrel   SCT  clusters for +/- particles ="
 	   <<std::setw(8)<<std::setprecision(5)<<ratio<<" +-"
 	   <<std::setw(8)<<std::setprecision(5)<<eratio
 	   <<"          |"
 	   <<std::endl;
-  pa            = double(m_nclustersNegES); if(pa < 1.) pa = 1.;
-  ratio         = double(m_nclustersPosES)/pa;
+  pa            = double(m_eventStat.m_nclustersNegES); if(pa < 1.) pa = 1.;
+  ratio         = double(m_eventStat.m_nclustersPosES)/pa;
   eratio        = sqrt(ratio*(1.+ratio)/pa);
   std::cout<<"|      Ratio endcap   SCT  clusters for +/- particles ="
 	   <<std::setw(8)<<std::setprecision(5)<<ratio<<" +-"
 	   <<std::setw(8)<<std::setprecision(5)<<eratio
 	   <<"          |"
 	   <<std::endl;
-  pa            = double(m_eventsNEG);      if(pa < 1.) pa = 1.; 
-  ratio         = double(m_eventsPOS)/pa;
+  pa            = double(m_eventStat.m_eventsNEG);      if(pa < 1.) pa = 1.;
+  ratio         = double(m_eventStat.m_eventsPOS)/pa;
   eratio        = sqrt(ratio*(1.+ratio)/pa);
   std::cout<<"|      Number truth particles and +/- ratio ="
-	   <<std::setw(10)<<m_events
+	   <<std::setw(10)<<m_eventStat.m_events
 	   <<std::setw(8)<<std::setprecision(5)<<ratio<<" +-"
 	   <<std::setw(8)<<std::setprecision(5)<<eratio
 	   <<"          |"
@@ -682,74 +623,74 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
 	   <<std::endl
 	   <<std::endl;
 
-  std::vector<std::string>::const_iterator t=m_tracklocation.begin(),te=m_tracklocation.end();
+  SG::ReadHandleKeyArray<TrackCollection>::const_iterator t=m_tracklocation.begin(),te=m_tracklocation.end();
   int nc = 0;
   for(; t!=te; ++t) {
 
-    int   n     = 47-(*t).size();
+    int   n     = 47-(t->key().size());
     std::string s1; for(int i=0; i<n; ++i) s1.append(" "); s1.append("|");
-    
+
 
     std::cout<<"|-----------------------------------------------------------------------------------|"
 	     <<std::endl;
-    std::cout<<"|                      Statistic for "<<(*t)<<s1<<std::endl;
-    
-    double ne = double(m_events);  if(ne < 1.) ne = 1.;
-    double ef [6]; for(int i=0; i!=6; ++i) ef [i] = double(m_efficiency   [nc][i])   /ne;
-    double ef0[6]; for(int i=0; i!=6; ++i) ef0[i] = double(m_efficiencyN  [nc][i][0])/ne;
-    double ef1[6]; for(int i=0; i!=6; ++i) ef1[i] = double(m_efficiencyN  [nc][i][1])/ne;
-    double ef2[6]; for(int i=0; i!=6; ++i) ef2[i] = double(m_efficiencyN  [nc][i][2])/ne;
+    std::cout<<"|                      Statistic for "<<(t->key())<<s1<<std::endl;
+
+    double ne = double(m_eventStat.m_events);  if(ne < 1.) ne = 1.;
+    double ef [6]; for(int i=0; i!=6; ++i) ef [i] = double(m_trackCollectionStat[nc].m_efficiency   [i])   /ne;
+    double ef0[6]; for(int i=0; i!=6; ++i) ef0[i] = double(m_trackCollectionStat[nc].m_efficiencyN  [i][0])/ne;
+    double ef1[6]; for(int i=0; i!=6; ++i) ef1[i] = double(m_trackCollectionStat[nc].m_efficiencyN  [i][1])/ne;
+    double ef2[6]; for(int i=0; i!=6; ++i) ef2[i] = double(m_trackCollectionStat[nc].m_efficiencyN  [i][2])/ne;
     /*
-    double ef3[6]; for(int i=0; i!=6; ++i) ef3[i] = double(m_efficiencyN  [nc][i][3])/ne;
-    double ef4[6]; for(int i=0; i!=6; ++i) ef4[i] = double(m_efficiencyN  [nc][i][4])/ne;
+    double ef3[6]; for(int i=0; i!=6; ++i) ef3[i] = double(m_trackCollectionStat[nc].m_efficiencyN  [i][3])/ne;
+    double ef4[6]; for(int i=0; i!=6; ++i) ef4[i] = double(m_trackCollectionStat[nc].m_efficiencyN  [i][4])/ne;
     */
-    double neBTE = m_eventsBTE[0]; if(neBTE < 1.) neBTE = 1;   
-    double efB0[6]; for(int i=0; i!=6; ++i) efB0[i] = double(m_efficiencyBTE[nc][i][0][0])/neBTE;
-    double efB1[6]; for(int i=0; i!=6; ++i) efB1[i] = double(m_efficiencyBTE[nc][i][1][0])/neBTE;
-    double efB2[6]; for(int i=0; i!=6; ++i) efB2[i] = double(m_efficiencyBTE[nc][i][2][0])/neBTE;
-    double efB3[6]; for(int i=0; i!=6; ++i) efB3[i] = double(m_efficiencyBTE[nc][i][3][0])/neBTE;
-    double efB4[6]; for(int i=0; i!=6; ++i) efB4[i] = double(m_efficiencyBTE[nc][i][4][0])/neBTE;
-
-    neBTE = m_eventsBTE[1];        if(neBTE < 1.) neBTE = 1;   
-    double efT0[6]; for(int i=0; i!=6; ++i) efT0[i] = double(m_efficiencyBTE[nc][i][0][1])/neBTE;
-    double efT1[6]; for(int i=0; i!=6; ++i) efT1[i] = double(m_efficiencyBTE[nc][i][1][1])/neBTE;
-    double efT2[6]; for(int i=0; i!=6; ++i) efT2[i] = double(m_efficiencyBTE[nc][i][2][1])/neBTE;
-    double efT3[6]; for(int i=0; i!=6; ++i) efT3[i] = double(m_efficiencyBTE[nc][i][3][1])/neBTE;
-    double efT4[6]; for(int i=0; i!=6; ++i) efT4[i] = double(m_efficiencyBTE[nc][i][4][1])/neBTE;
-
-    neBTE = m_eventsBTE[2];        if(neBTE < 1.) neBTE = 1;
-    double efE0[6]; for(int i=0; i!=6; ++i) efE0[i] = double(m_efficiencyBTE[nc][i][0][2])/neBTE;
-    double efE1[6]; for(int i=0; i!=6; ++i) efE1[i] = double(m_efficiencyBTE[nc][i][1][2])/neBTE;
-    double efE2[6]; for(int i=0; i!=6; ++i) efE2[i] = double(m_efficiencyBTE[nc][i][2][2])/neBTE;
-    double efE3[6]; for(int i=0; i!=6; ++i) efE3[i] = double(m_efficiencyBTE[nc][i][3][2])/neBTE;
-    double efE4[6]; for(int i=0; i!=6; ++i) efE4[i] = double(m_efficiencyBTE[nc][i][4][2])/neBTE;
-
-    neBTE = m_eventsBTE[3];        if(neBTE < 1.) neBTE = 1;
-    double efD0[6]; for(int i=0; i!=6; ++i) efD0[i] = double(m_efficiencyBTE[nc][i][0][3])/neBTE;
-    double efD1[6]; for(int i=0; i!=6; ++i) efD1[i] = double(m_efficiencyBTE[nc][i][1][3])/neBTE;
-    double efD2[6]; for(int i=0; i!=6; ++i) efD2[i] = double(m_efficiencyBTE[nc][i][2][3])/neBTE;
-    double efD3[6]; for(int i=0; i!=6; ++i) efD3[i] = double(m_efficiencyBTE[nc][i][3][3])/neBTE;
-    double efD4[6]; for(int i=0; i!=6; ++i) efD4[i] = double(m_efficiencyBTE[nc][i][4][3])/neBTE;
+    double neBTE = m_eventStat.m_eventsBTE[0]; if(neBTE < 1.) neBTE = 1;
+    double efB0[6]; for(int i=0; i!=6; ++i) efB0[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][0][0])/neBTE;
+    double efB1[6]; for(int i=0; i!=6; ++i) efB1[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][1][0])/neBTE;
+    double efB2[6]; for(int i=0; i!=6; ++i) efB2[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][2][0])/neBTE;
+    double efB3[6]; for(int i=0; i!=6; ++i) efB3[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][3][0])/neBTE;
+    double efB4[6]; for(int i=0; i!=6; ++i) efB4[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][4][0])/neBTE;
+
+    neBTE = m_eventStat.m_eventsBTE[1];        if(neBTE < 1.) neBTE = 1;
+    double efT0[6]; for(int i=0; i!=6; ++i) efT0[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][0][1])/neBTE;
+    double efT1[6]; for(int i=0; i!=6; ++i) efT1[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][1][1])/neBTE;
+    double efT2[6]; for(int i=0; i!=6; ++i) efT2[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][2][1])/neBTE;
+    double efT3[6]; for(int i=0; i!=6; ++i) efT3[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][3][1])/neBTE;
+    double efT4[6]; for(int i=0; i!=6; ++i) efT4[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][4][1])/neBTE;
+
+    neBTE = m_eventStat.m_eventsBTE[2];        if(neBTE < 1.) neBTE = 1;
+    double efE0[6]; for(int i=0; i!=6; ++i) efE0[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][0][2])/neBTE;
+    double efE1[6]; for(int i=0; i!=6; ++i) efE1[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][1][2])/neBTE;
+    double efE2[6]; for(int i=0; i!=6; ++i) efE2[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][2][2])/neBTE;
+    double efE3[6]; for(int i=0; i!=6; ++i) efE3[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][3][2])/neBTE;
+    double efE4[6]; for(int i=0; i!=6; ++i) efE4[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][4][2])/neBTE;
+
+    neBTE = m_eventStat.m_eventsBTE[3];        if(neBTE < 1.) neBTE = 1;
+    double efD0[6]; for(int i=0; i!=6; ++i) efD0[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][0][3])/neBTE;
+    double efD1[6]; for(int i=0; i!=6; ++i) efD1[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][1][3])/neBTE;
+    double efD2[6]; for(int i=0; i!=6; ++i) efD2[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][2][3])/neBTE;
+    double efD3[6]; for(int i=0; i!=6; ++i) efD3[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][3][3])/neBTE;
+    double efD4[6]; for(int i=0; i!=6; ++i) efD4[i] = double(m_trackCollectionStat[nc].m_efficiencyBTE[i][4][3])/neBTE;
 
 
     double efrec  = ef0[0]+ef0[1]+ef0[2]+ef1[0]+ef1[1]+ef2[0];
     double efrecB = efB0[0]+efB0[1]+efB0[2]+efB1[0]+efB1[1]+efB2[0];
     double efrecT = efT0[0]+efT0[1]+efT0[2]+efT1[0]+efT1[1]+efT2[0];
     double efrecE = efE0[0]+efE0[1]+efE0[2]+efE1[0]+efE1[1]+efE2[0];
-    double efrecD = efD0[0]+efD0[1]+efD0[2]+efD1[0]+efD1[1]+efD2[0];    
+    double efrecD = efD0[0]+efD0[1]+efD0[2]+efD1[0]+efD1[1]+efD2[0];
 
-    ne        = double(m_eventsPOS); if(ne < 1.) ne = 1.;
-    double efP[6]; for(int i=0; i!=6; ++i) efP[i] = double(m_efficiencyPOS[nc][i])/ne;
-    ne        = double(m_eventsNEG); if(ne < 1.) ne = 1.;
-    double efN[6]; for(int i=0; i!=6; ++i) efN[i] = double(m_efficiencyNEG[nc][i])/ne;
+    ne        = double(m_eventStat.m_eventsPOS); if(ne < 1.) ne = 1.;
+    double efP[6]; for(int i=0; i!=6; ++i) efP[i] = double(m_trackCollectionStat[nc].m_efficiencyPOS[i])/ne;
+    ne        = double(m_eventStat.m_eventsNEG); if(ne < 1.) ne = 1.;
+    double efN[6]; for(int i=0; i!=6; ++i) efN[i] = double(m_trackCollectionStat[nc].m_efficiencyNEG[i])/ne;
 
     std::cout<<"|-----------------------------------------------------------------------------------|"
 	     <<std::endl;
     std::cout<<"| Probability to lose       0        1        2        3        4    >=5 clusters   |"
 	     <<std::endl;
     std::cout<<"|-----------------------------------------------------------------------------------|"
-	     <<std::endl; 
-   
+	     <<std::endl;
+
     std::cout<<"| For all particles   "
 	     <<std::setw(9)<<std::setprecision(5)<<ef[0]
 	     <<std::setw(9)<<std::setprecision(5)<<ef[1]
@@ -776,9 +717,9 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
 	     <<std::endl;
     /*
     std::cout<<"|-----------------------------------------------------------------------------------|"
-	     <<std::endl; 
+	     <<std::endl;
     std::cout<<"| Total                                                                             |"
-	     <<std::endl; 
+	     <<std::endl;
     std::cout<<"|   0 wrong clusters  "
 	     <<std::setw(9)<<std::setprecision(5)<<ef0[0]
 	     <<std::setw(9)<<std::setprecision(5)<<ef0[1]
@@ -823,7 +764,7 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
    std::cout<<"|-----------------------------------------------------------------------------------|"
 	     <<std::endl;
    std::cout<<"| Barrel region                                                                     |"
-	     <<std::endl; 
+	     <<std::endl;
     std::cout<<"|   0 wrong clusters  "
 	     <<std::setw(9)<<std::setprecision(5)<<efB0[0]
 	     <<std::setw(9)<<std::setprecision(5)<<efB0[1]
@@ -867,7 +808,7 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
    std::cout<<"|-----------------------------------------------------------------------------------|"
 	     <<std::endl;
    std::cout<<"| Transition region                                                                 |"
-	     <<std::endl; 
+	     <<std::endl;
     std::cout<<"|   0 wrong clusters  "
 	     <<std::setw(9)<<std::setprecision(5)<<efT0[0]
 	     <<std::setw(9)<<std::setprecision(5)<<efT0[1]
@@ -911,7 +852,7 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
    std::cout<<"|-----------------------------------------------------------------------------------|"
 	     <<std::endl;
    std::cout<<"| Endcap region                                                                     |"
-	     <<std::endl; 
+	     <<std::endl;
     std::cout<<"|   0 wrong clusters  "
 	     <<std::setw(9)<<std::setprecision(5)<<efE0[0]
 	     <<std::setw(9)<<std::setprecision(5)<<efE0[1]
@@ -999,43 +940,43 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
 
    std::cout<<"|-----------------------------------------------------------------------------------|"
 	     <<std::endl;
-   pa  = double(m_particleClusters[0]);       if(pa < 1.) pa = 1.;
+   pa  = double(m_eventStat.m_particleClusters[0]);       if(pa < 1.) pa = 1.;
    std::cout<<"| Efficiency reconstruction (number lose+wrong < 3) = "
 	    <<std::setw(9)<<std::setprecision(5)<<efrec
 	    <<" ("
-	    <<std::setw(9)<<std::setprecision(5)<<efrec*double(m_events)/pa
+	    <<std::setw(9)<<std::setprecision(5)<<efrec*double(m_eventStat.m_events)/pa
 	    <<" ) "
 	    <<"       |"
 	    <<std::endl;
-   pa  = double(m_particleClustersBTE[0][0]); if(pa < 1.) pa = 1.;
+   pa  = double(m_eventStat.m_particleClustersBTE[0][0]); if(pa < 1.) pa = 1.;
    std::cout<<"|                             For barrel     region = "
 	    <<std::setw(9)<<std::setprecision(5)<<efrecB
 	    <<" ("
-	    <<std::setw(9)<<std::setprecision(5)<<efrecB*double(m_eventsBTE[0])/pa
+	    <<std::setw(9)<<std::setprecision(5)<<efrecB*double(m_eventStat.m_eventsBTE[0])/pa
 	    <<" ) "
 	    <<"       |"
 	    <<std::endl;
-   pa  = double(m_particleClustersBTE[0][1]);  if(pa < 1.) pa = 1.;
+   pa  = double(m_eventStat.m_particleClustersBTE[0][1]);  if(pa < 1.) pa = 1.;
    std::cout<<"|                             For transition region = "
 	    <<std::setw(9)<<std::setprecision(5)<<efrecT
 	    <<" ("
-	    <<std::setw(9)<<std::setprecision(5)<<efrecT*double(m_eventsBTE[1])/pa
+	    <<std::setw(9)<<std::setprecision(5)<<efrecT*double(m_eventStat.m_eventsBTE[1])/pa
 	    <<" ) "
 	    <<"       |"
 	    <<std::endl;
-   pa  = double(m_particleClustersBTE[0][2]);  if(pa < 1.) pa = 1.;
+   pa  = double(m_eventStat.m_particleClustersBTE[0][2]);  if(pa < 1.) pa = 1.;
    std::cout<<"|                             For endcap     region = "
 	    <<std::setw(9)<<std::setprecision(5)<<efrecE
 	    <<" ("
-	    <<std::setw(9)<<std::setprecision(5)<<efrecE*double(m_eventsBTE[2])/pa
+	    <<std::setw(9)<<std::setprecision(5)<<efrecE*double(m_eventStat.m_eventsBTE[2])/pa
 	    <<" ) "
 	    <<"       |"
 	    <<std::endl;
-   pa  = double(m_particleClustersBTE[0][3]);  if(pa < 1.) pa = 1.;
+   pa  = double(m_eventStat.m_particleClustersBTE[0][3]);  if(pa < 1.) pa = 1.;
    std::cout<<"|                             For DBM        region = "
             <<std::setw(9)<<std::setprecision(5)<<efrecD
             <<" ("
-            <<std::setw(9)<<std::setprecision(5)<<efrecD*double(m_eventsBTE[3])/pa
+            <<std::setw(9)<<std::setprecision(5)<<efrecD*double(m_eventStat.m_eventsBTE[3])/pa
             <<" ) "
             <<"       |"
             <<std::endl;
@@ -1045,35 +986,35 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
     std::cout<<"| Reconstructed tracks         +          -    +/-ration    error                   |"
 	     <<std::endl;
     std::cout<<"|-----------------------------------------------------------------------------------|"
-	     <<std::endl; 
+	     <<std::endl;
 
-    pa     = double(m_ntracksNEGB[nc]);  if(pa < 1.) pa = 1.;
-    ratio  = double(m_ntracksPOSB[nc])/pa;
+    pa     = double(m_trackCollectionStat[nc].m_ntracksNEGB);  if(pa < 1.) pa = 1.;
+    ratio  = double(m_trackCollectionStat[nc].m_ntracksPOSB)/pa;
     eratio = sqrt(ratio*(1.+ratio)/pa);
-    
+
     std::cout<<"| Barrel               "
-	     <<std::setw(10)<<m_ntracksPOSB[nc] 
-	     <<std::setw(11)<<m_ntracksNEGB[nc] 
+	     <<std::setw(10)<<m_trackCollectionStat[nc].m_ntracksPOSB
+	     <<std::setw(11)<<m_trackCollectionStat[nc].m_ntracksNEGB
 	     <<std::setw(11)<<std::setprecision(5)<<ratio
 	     <<std::setw(11)<<std::setprecision(5)<<eratio<<"                  |"
 	     <<std::endl;
-    pa     = double(m_ntracksNEGE[nc]); if(pa < 1.) pa = 1.;
-    ratio  = double(m_ntracksPOSE[nc])/pa;
+    pa     = double(m_trackCollectionStat[nc].m_ntracksNEGE); if(pa < 1.) pa = 1.;
+    ratio  = double(m_trackCollectionStat[nc].m_ntracksPOSE)/pa;
     eratio = sqrt(ratio*(1.+ratio)/pa);
 
     std::cout<<"| Endcap               "
-	     <<std::setw(10)<<m_ntracksPOSE[nc] 
-	     <<std::setw(11)<<m_ntracksNEGE[nc] 
+	     <<std::setw(10)<<m_trackCollectionStat[nc].m_ntracksPOSE
+	     <<std::setw(11)<<m_trackCollectionStat[nc].m_ntracksNEGE
 	     <<std::setw(11)<<std::setprecision(5)<<ratio
 	     <<std::setw(11)<<std::setprecision(5)<<eratio<<"                  |"
 	     <<std::endl;
-    pa     = double(m_ntracksNEGDBM[nc]); if(pa < 1.) pa = 1.;
-    ratio  = double(m_ntracksPOSDBM[nc])/pa;
+    pa     = double(m_trackCollectionStat[nc].m_ntracksNEGDBM); if(pa < 1.) pa = 1.;
+    ratio  = double(m_trackCollectionStat[nc].m_ntracksPOSDBM)/pa;
     eratio = sqrt(ratio*(1.+ratio)/pa);
 
     std::cout<<"| DBM                  "
-             <<std::setw(10)<<m_ntracksPOSDBM[nc]
-             <<std::setw(11)<<m_ntracksNEGDBM[nc]
+             <<std::setw(10)<<m_trackCollectionStat[nc].m_ntracksPOSDBM
+             <<std::setw(11)<<m_trackCollectionStat[nc].m_ntracksNEGDBM
              <<std::setw(11)<<std::setprecision(5)<<ratio
              <<std::setw(11)<<std::setprecision(5)<<eratio<<"                  |"
              <<std::endl;
@@ -1084,9 +1025,9 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
     int ft=0;
     int kf=0;
     for(int k = 0; k!=50; ++k) {
-      
-      nt+=m_total[nc][k];
-      ft+=m_fake [nc][k];
+
+      nt+=m_trackCollectionStat[nc].m_total[k];
+      ft+=m_trackCollectionStat[nc].m_fake [k];
       if(!kf && nt) kf = k;
     }
 
@@ -1098,17 +1039,17 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
 	       <<std::endl;
       std::cout<<"|-----------------------------------------------------------------------------------|"
 	       <<std::endl;
-      
+
       for(int k = kf; k!=kf+6; ++k) {
 	std::cout<<"|     >= "<<std::setw(2)<<k<<"   ";
       }
       std::cout<<"|"<<std::endl;
-  
+
       for(int k = kf; k!=kf+6; ++k) {
 	double eff = 0.; if(nt>0) eff = double(ft)/double(nt);
 	std::cout<<"|"<<std::setw(12)<<std::setprecision(5)<<eff<<" ";
-	nt-=m_total[nc][k];
-	ft-=m_fake [nc][k];
+	nt-=m_trackCollectionStat[nc].m_total[k];
+	ft-=m_trackCollectionStat[nc].m_fake [k];
       }
       std::cout<<"|"<<std::endl;
       std::cout<<"|-----------------------------------------------------------------------------------|"
@@ -1120,92 +1061,62 @@ StatusCode InDet::TrackClusterAssValidation::finalize() {
    return StatusCode::SUCCESS;
 }
 
-///////////////////////////////////////////////////////////////////
-// Overload of << operator MsgStream
-///////////////////////////////////////////////////////////////////
-
-MsgStream& InDet::operator    << 
-  (MsgStream& sl,const InDet::TrackClusterAssValidation& se)
-{ 
-  return se.dump(sl);
-}
-
-///////////////////////////////////////////////////////////////////
-// Overload of << operator std::ostream
-///////////////////////////////////////////////////////////////////
-
-std::ostream& InDet::operator << 
-  (std::ostream& sl,const InDet::TrackClusterAssValidation& se)
-{
-  return se.dump(sl);
-}   
-
-///////////////////////////////////////////////////////////////////
-// Dumps relevant information into the MsgStream
-///////////////////////////////////////////////////////////////////
-
-MsgStream& InDet::TrackClusterAssValidation::dump( MsgStream& out ) const
-{
-  out<<std::endl;
-  if(m_nprint)  return dumpevent(out);
-  return dumptools(out);
-}
-
 ///////////////////////////////////////////////////////////////////
 // Dumps conditions information into the MsgStream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::TrackClusterAssValidation::dumptools( MsgStream& out ) const
+MsgStream& InDet::TrackClusterAssValidation::dumptools( MsgStream& out, MSG::Level level) const
 {
-  std::vector<std::string>::const_iterator t=m_tracklocation.begin(),te=m_tracklocation.end();
+  SG::ReadHandleKeyArray<TrackCollection>::const_iterator t=m_tracklocation.begin(),te=m_tracklocation.end();
 
   int n;
+  out << level << std::endl;
   out<<"|----------------------------------------------------------------"
      <<"----------------------------------------------------|"
      <<std::endl;
   for(; t!=te; ++t) {
-    n     = 65-(*t).size();
+    n     = 65-t->key().size();
     std::string s1; for(int i=0; i<n; ++i) s1.append(" "); s1.append("|");
 
-    out<<"| Location of input tracks                        | "<<(*t)<<s1
+    out<<"| Location of input tracks                        | "<<t->key()<<s1
        <<std::endl;
   }
-  n     = 65-m_spacepointsPixelname.size();
+  n     = 65-m_spacepointsPixelname.key().size();
   std::string s2; for(int i=0; i<n; ++i) s2.append(" "); s2.append("|");
   n     = 65-m_spacepointsSCTname.key().size();
   std::string s3; for(int i=0; i<n; ++i) s3.append(" "); s3.append("|");
-  n     = 65-m_spacepointsOverlapname.size();
+  n     = 65-m_spacepointsOverlapname.key().size();
   std::string s4; for(int i=0; i<n; ++i) s4.append(" "); s4.append("|");
-  n     = 65-m_clustersPixelname.size();
+  n     = 65-m_clustersPixelname.key().size();
   std::string s5; for(int i=0; i<n; ++i) s5.append(" "); s5.append("|");
   n     = 65-m_clustersSCTname.key().size();
   std::string s6; for(int i=0; i<n; ++i) s6.append(" "); s6.append("|");
-  n     = 65-m_clustersTRTname.size();
+  n     = 65-m_clustersTRTname.key().size();
   std::string s9; for(int i=0; i<n; ++i) s9.append(" "); s9.append("|");
-  n     = 65-m_truth_locationPixel.size();
+  n     = 65-m_truth_locationPixel.key().size();
   std::string s7; for(int i=0; i<n; ++i) s7.append(" "); s7.append("|");
   n     = 65-m_truth_locationSCT.key().size();
   std::string s8; for(int i=0; i<n; ++i) s8.append(" "); s8.append("|");
-  n     = 65-m_truth_locationTRT.size();
+  n     = 65-m_truth_locationTRT.key().size();
   std::string s10; for(int i=0; i<n; ++i) s10.append(" "); s10.append("|");
-  
-  out<<"| Pixel    space points                           | "<<m_spacepointsPixelname  <<s2
+
+  out<<"| Pixel    space points                           | "<<m_spacepointsPixelname.key()  <<s2
      <<std::endl;
-  out<<"| SCT      space points                           | "<<m_spacepointsSCTname.key()<<s3
+  out<<"| SCT      space points                           | "<<m_spacepointsSCTname.key()    <<s3
      <<std::endl;
-  out<<"| Overlap  space points                           | "<<m_spacepointsOverlapname<<s4
+  out<<"| Overlap  space points                           | "<<m_spacepointsOverlapname.key()<<s4
      <<std::endl;
-  out<<"| Pixel    clusters                               | "<<m_clustersPixelname     <<s5
+  out<<"| Pixel    clusters                               | "<<m_clustersPixelname.key()     <<s5
      <<std::endl;
-  out<<"| SCT      clusters                               | "<<m_clustersSCTname.key() <<s6
+  out<<"| SCT      clusters                               | "<<m_clustersSCTname.key()       <<s6
      <<std::endl;
-  out<<"| TRT      clusters                               | "<<m_clustersTRTname       <<s9
+  out<<"| TRT      clusters                               | "<<m_clustersTRTname.key()       <<s9
      <<std::endl;
-  out<<"| Truth location  for pixels                      | "<<m_truth_locationPixel   <<s7
+  out<<"| Truth location  for pixels                      | "<<m_truth_locationPixel.key()   <<s7
      <<std::endl;
-  out<<"| Truth location  for sct                         | "<<m_truth_locationSCT.key()<<s8
+  out<<"| Truth location  for sct                         | "<<m_truth_locationSCT.key()     <<s8
      <<std::endl;
-  out<<"| Truth location  for trt                         | "<<m_truth_locationTRT     <<s10
+  out<<"| Truth location  for trt                         | "<<m_truth_locationTRT.key()     <<s10
      <<std::endl;
   out<<"|         pT cut                                  | "
      <<std::setw(14)<<std::setprecision(5)<<m_ptcut
@@ -1249,256 +1160,225 @@ MsgStream& InDet::TrackClusterAssValidation::dumptools( MsgStream& out ) const
 // Dumps event information into the ostream
 ///////////////////////////////////////////////////////////////////
 
-MsgStream& InDet::TrackClusterAssValidation::dumpevent( MsgStream& out ) const
+MsgStream& InDet::TrackClusterAssValidation::dumpevent( MsgStream& out, const InDet::TrackClusterAssValidation::EventData_t &event_data ) const
 {
+  out << MSG::DEBUG << std::endl;
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
   out<<"| m_nspacepoints          | "
-     <<std::setw(12)<<m_nspacepoints
+     <<std::setw(12)<<event_data.m_nspacepoints
      <<"                              |"<<std::endl;
   out<<"| m_nclusters             | "
-     <<std::setw(12)<<m_nclusters
+     <<std::setw(12)<<event_data.m_nclusters
      <<"                              |"<<std::endl;
   out<<"| Kine-Clusters    size   | "
-     <<std::setw(12)<<m_kinecluster.size()
+     <<std::setw(12)<<event_data.m_kinecluster.size()
      <<"                              |"<<std::endl;
   out<<"| Kine-TRTClusters size   | "
-     <<std::setw(12)<<m_kineclusterTRT.size()
+     <<std::setw(12)<<event_data.m_kineclusterTRT.size()
      <<"                              |"<<std::endl;
   out<<"| Kine-SpacePoints size   | "
-     <<std::setw(12)<<m_kinespacepoint.size()
+     <<std::setw(12)<<event_data.m_kinespacepoint.size()
      <<"                              |"<<std::endl;
   out<<"| Number good kine tracks | "
-     <<std::setw(12)<<m_nqtracks
+     <<std::setw(12)<<event_data.m_nqtracks
      <<"                              |"<<std::endl;
   out<<"|---------------------------------------------------------------------|"
      <<std::endl;
   return out;
 }
 
-///////////////////////////////////////////////////////////////////
-// Dumps relevant information into the ostream
-///////////////////////////////////////////////////////////////////
-
-std::ostream& InDet::TrackClusterAssValidation::dump( std::ostream& out ) const
-{
-  return out;
-}
 
 ///////////////////////////////////////////////////////////////////
-// New event for clusters information 
+// New event for clusters information
 ///////////////////////////////////////////////////////////////////
 
-void InDet::TrackClusterAssValidation::newClustersEvent()
+void InDet::TrackClusterAssValidation::newClustersEvent(const EventContext& ctx,InDet::TrackClusterAssValidation::EventData_t &event_data) const
 {
-
-  m_nclusters    = 0;
-  m_nclustersTRT = 0;
-  m_kinecluster   .erase(m_kinecluster   .begin(),m_kinecluster   .end());
-  m_kineclusterTRT.erase(m_kineclusterTRT.begin(),m_kineclusterTRT.end());
-   
   // Get pixel clusters container
-  // 
-  StatusCode sc;
-  m_pixcontainer = 0;
+  //
+  std::unique_ptr<SG::ReadHandle<SiClusterContainer> >       pixelcontainer;
+  std::unique_ptr<SG::ReadHandle<SiClusterContainer> >       sctcontainer;
+  std::unique_ptr<SG::ReadHandle<TRT_DriftCircleContainer> > trtcontainer;
+
   if(m_usePIX) {
-    sc = evtStore()->retrieve(m_pixcontainer,m_clustersPixelname);
-    if (sc.isFailure()) msg(MSG::DEBUG)<<"Pixel clusters container"<<endmsg;
+    pixelcontainer = std::make_unique<SG::ReadHandle<SiClusterContainer> >(m_clustersPixelname,ctx);
+    if (!pixelcontainer->isValid()) ATH_MSG_DEBUG("Failed to create Pixel clusters container read handle with key " << m_clustersPixelname.key());
   }
 
   // Get sct   clusters container
   //
-  m_sctcontainer = 0; 
   if(m_useSCT) {
-    SG::ReadHandle<SiClusterContainer> sctcontainer(m_clustersSCTname);
-    if (not sctcontainer.isValid()) msg(MSG::DEBUG)<<"SCT clusters container"<<endmsg;
-    m_sctcontainer = sctcontainer.cptr();
-  } 
+    sctcontainer = std::make_unique<SG::ReadHandle<SiClusterContainer> >(m_clustersSCTname,ctx);
+    if (!sctcontainer->isValid()) ATH_MSG_DEBUG("Failed to create SCT clusters container read handle with key " << m_clustersSCTname.key());
+  }
 
   // Get trt   cluster container
   //
-  m_trtcontainer = 0;
   if(m_clcutTRT > 0) {
-    sc            = evtStore()->retrieve(m_trtcontainer,m_clustersTRTname  );
-    if (sc.isFailure()) msg(MSG::DEBUG)<<"TRT drift circles container"<<endmsg;
+    trtcontainer = std::make_unique<SG::ReadHandle<TRT_DriftCircleContainer> >(m_clustersTRTname,ctx);
+    if (!trtcontainer->isValid()) ATH_MSG_DEBUG("Failed to create TRT drift circle container read handle with key " << m_clustersTRTname.key());
   }
 
   int Kine[1000];
 
+  event_data.m_clusterHandles.reserve(3);
   // Loop through all pixel clusters
   //
-  if(m_pixcontainer) {
-
-    InDet::SiClusterContainer::const_iterator w  =  m_pixcontainer->begin();
-    InDet::SiClusterContainer::const_iterator we =  m_pixcontainer->end  ();
+  if(pixelcontainer && pixelcontainer->isValid()) {
+    InDet::SiClusterContainer::const_iterator w  =  (*pixelcontainer)->begin();
+    InDet::SiClusterContainer::const_iterator we =  (*pixelcontainer)->end  ();
 
     for(; w!=we; ++w) {
-      
+
       InDet::SiClusterCollection::const_iterator c  = (*w)->begin();
       InDet::SiClusterCollection::const_iterator ce = (*w)->end  ();
-      
+
       for(; c!=ce; ++c) {
 
-	++m_nclusters;
+	++event_data.m_nclusters;
 
-	int nk = kine((*c),Kine,999);
+	int nk = kine(event_data,(*c),Kine,999);
 	for(int i=0; i!=nk; ++i) {
-	  if(!isTheSameDetElement(Kine[i],(*c))) {
-	    m_kinecluster.insert(std::make_pair(Kine[i],(*c)));  
+	  if(!isTheSameDetElement(event_data,Kine[i],(*c))) {
+	    event_data.m_kinecluster.insert(std::make_pair(Kine[i],(*c)));
 	  }
 	}
       }
     }
+    event_data.m_clusterHandles.push_back(std::move(pixelcontainer));
+
   }
 
   // Loop through all sct clusters
   //
-  if(m_sctcontainer) {
-
-    InDet::SiClusterContainer::const_iterator w  =  m_sctcontainer->begin();
-    InDet::SiClusterContainer::const_iterator we =  m_sctcontainer->end  ();
+  if(sctcontainer && sctcontainer->isValid()) {
+    InDet::SiClusterContainer::const_iterator w  =  (*sctcontainer)->begin();
+    InDet::SiClusterContainer::const_iterator we =  (*sctcontainer)->end  ();
 
     for(; w!=we; ++w) {
-      
+
       InDet::SiClusterCollection::const_iterator c  = (*w)->begin();
       InDet::SiClusterCollection::const_iterator ce = (*w)->end  ();
 
       for(; c!=ce; ++c) {
 
-	++m_nclusters;
-	
-	int nk = kine((*c),Kine,999);
+	++event_data.m_nclusters;
+
+	int nk = kine(event_data,(*c),Kine,999);
 	for(int i=0; i!=nk; ++i) {
-	  if(!isTheSameDetElement(Kine[i],(*c))) m_kinecluster.insert(std::make_pair(Kine[i],(*c)));  
+	  if(!isTheSameDetElement(event_data,Kine[i],(*c))) event_data.m_kinecluster.insert(std::make_pair(Kine[i],(*c)));
 	}
       }
     }
+    event_data.m_clusterHandles.push_back(std::move(sctcontainer));
   }
 
-  if(!m_trtcontainer) return;
-
-  // Loop through all trt clusters
-  //
-  InDet::TRT_DriftCircleContainer::const_iterator  w  = m_trtcontainer->begin();
-  InDet::TRT_DriftCircleContainer::const_iterator  we = m_trtcontainer->end  ();
+  if(trtcontainer && trtcontainer->isValid()) {
+    // Loop through all trt clusters
+    //
+    InDet::TRT_DriftCircleContainer::const_iterator  w  = (*trtcontainer)->begin();
+    InDet::TRT_DriftCircleContainer::const_iterator  we = (*trtcontainer)->end  ();
 
-  for(; w!=we; ++w) {
+    for(; w!=we; ++w) {
 
-    InDet::TRT_DriftCircleCollection::const_iterator c  = (*w)->begin();
-    InDet::TRT_DriftCircleCollection::const_iterator ce = (*w)->end  ();
+      InDet::TRT_DriftCircleCollection::const_iterator c  = (*w)->begin();
+      InDet::TRT_DriftCircleCollection::const_iterator ce = (*w)->end  ();
 
-    for(; c!=ce; ++c) {
+      for(; c!=ce; ++c) {
 
-      ++m_nclustersTRT;
-      int nk = kine((*c),Kine,999);
-      for(int i=0; i!=nk; ++i) m_kineclusterTRT.insert(std::make_pair(Kine[i],(*c)));  
+        ++event_data.m_nclustersTRT;
+        int nk = kine(event_data,(*c),Kine,999);
+        for(int i=0; i!=nk; ++i) event_data.m_kineclusterTRT.insert(std::make_pair(Kine[i],(*c)));
+      }
     }
+    event_data.m_clusterHandles.push_back(std::move(trtcontainer));
   }
 }
 
 ///////////////////////////////////////////////////////////////////
-// New event for space points information 
+// New event for space points information
 ///////////////////////////////////////////////////////////////////
 
-void InDet::TrackClusterAssValidation::newSpacePointsEvent()
+void InDet::TrackClusterAssValidation::newSpacePointsEvent(const EventContext& ctx, InDet::TrackClusterAssValidation::EventData_t &event_data) const
 {
 
-  m_nspacepoints = 0;
-  m_kinespacepoint.erase(m_kinespacepoint.begin(),m_kinespacepoint.end());
-
   int Kine[1000];
 
-  m_spacepointsPixel = 0;
+  if(m_usePIX && !m_spacepointsPixelname.key().empty()) {
+    event_data.m_spacePointContainer.push_back(SG::ReadHandle<SpacePointContainer>(m_spacepointsPixelname,ctx));
+    if (!event_data.m_spacePointContainer.back().isValid()) {
+      ATH_MSG_DEBUG( "Invalid Pixels space points container read handle for key " << m_spacepointsPixelname.key()  );
+    }
+    else  {
+      SpacePointContainer::const_iterator spc  =  event_data.m_spacePointContainer.back()->begin();
+      SpacePointContainer::const_iterator spce =  event_data.m_spacePointContainer.back()->end  ();
+      for(; spc != spce; ++spc) {
+        SpacePointCollection::const_iterator sp  = (*spc)->begin();
+        SpacePointCollection::const_iterator spe = (*spc)->end  ();
+
+        for(; sp != spe; ++sp) {
 
-  if(m_usePIX) {
-    if (evtStore()->contains<SpacePointContainer>(m_spacepointsPixelname))
-    {
-      if (evtStore()->retrieve(m_spacepointsPixel,m_spacepointsPixelname).isFailure())
-        msg(MSG::DEBUG)<<"Pixels space points container"<<endmsg;
-
-      if(m_spacepointsPixel) {
-      
-        SpacePointContainer::const_iterator spc  =  m_spacepointsPixel->begin();
-        SpacePointContainer::const_iterator spce =  m_spacepointsPixel->end  ();
-      
-        for(; spc != spce; ++spc) {
-        
-          SpacePointCollection::const_iterator sp  = (*spc)->begin();
-          SpacePointCollection::const_iterator spe = (*spc)->end  ();
-        
-          for(; sp != spe; ++sp) {
-            
-            ++m_nspacepoints;
-            int nk = kine((*sp)->clusterList().first,Kine,999);
-            for(int i=0; i!=nk; ++i) {
-              
-              if(!isTheSameDetElement(Kine[i],(*sp))) {
-                m_kinespacepoint.insert(std::make_pair(Kine[i],(*sp)));
-              }
+          ++event_data.m_nspacepoints;
+          int nk = kine(event_data,(*sp)->clusterList().first,Kine,999);
+          for(int i=0; i!=nk; ++i) {
+
+            if(!isTheSameDetElement(event_data,Kine[i],(*sp))) {
+              event_data.m_kinespacepoint.insert(std::make_pair(Kine[i],(*sp)));
             }
           }
         }
       }
     }
   }
-  // Get sct space points containers from store gate 
+  // Get sct space points containers from store gate
   //
-  m_spacepointsSCT = 0;
-  if(m_useSCT) {
-    if (evtStore()->contains<SpacePointContainer>(m_spacepointsSCTname.key()))
-    {
-      SG::ReadHandle<SpacePointContainer> spacepointsSCT(m_spacepointsSCTname);
-      if (not spacepointsSCT.isValid())
-          msg(MSG::DEBUG)<<"SCT space points container"<<endmsg;
-      m_spacepointsSCT = spacepointsSCT.cptr();
-
-      if(m_spacepointsSCT) {
-        
-        SpacePointContainer::const_iterator spc  =  m_spacepointsSCT->begin();
-        SpacePointContainer::const_iterator spce =  m_spacepointsSCT->end  ();
-        
-        for(; spc != spce; ++spc) {
-          
-          SpacePointCollection::const_iterator sp  = (*spc)->begin();
-          SpacePointCollection::const_iterator spe = (*spc)->end  ();
-          
-          for(; sp != spe; ++sp) {
-            
-            
-            ++m_nspacepoints;
-            int nk = kine((*sp)->clusterList().first,(*sp)->clusterList().second,Kine,999);
-            for(int i=0; i!=nk; ++i) {
-              if(!isTheSameDetElement(Kine[i],(*sp))) {
-                m_kinespacepoint.insert(std::make_pair(Kine[i],(*sp)));
-              }
+  if(m_useSCT && !m_spacepointsSCTname.key().empty()) {
+    event_data.m_spacePointContainer.push_back(SG::ReadHandle<SpacePointContainer>(m_spacepointsSCTname,ctx));
+    if (!event_data.m_spacePointContainer.back().isValid()) {
+      ATH_MSG_DEBUG( "Invalid SCT space points container read handle for key " << m_spacepointsSCTname.key() );
+    }
+    else  {
+      SpacePointContainer::const_iterator spc  =  event_data.m_spacePointContainer.back()->begin();
+      SpacePointContainer::const_iterator spce =  event_data.m_spacePointContainer.back()->end  ();
+
+      for(; spc != spce; ++spc) {
+
+        SpacePointCollection::const_iterator sp  = (*spc)->begin();
+        SpacePointCollection::const_iterator spe = (*spc)->end  ();
+
+        for(; sp != spe; ++sp) {
+
+
+          ++event_data.m_nspacepoints;
+          int nk = kine(event_data,(*sp)->clusterList().first,(*sp)->clusterList().second,Kine,999);
+          for(int i=0; i!=nk; ++i) {
+            if(!isTheSameDetElement(event_data,Kine[i],(*sp))) {
+              event_data.m_kinespacepoint.insert(std::make_pair(Kine[i],(*sp)));
             }
           }
         }
       }
     }
   }
-  // Get sct overlap space points containers from store gate 
+  // Get sct overlap space points containers from store gate
   //
-  m_spacepointsOverlap = 0;
-  if(m_useSCT) {
-    if (evtStore()->contains<SpacePointContainer>(m_spacepointsOverlapname))
-    {
-      if (evtStore()->retrieve(m_spacepointsOverlap,m_spacepointsOverlapname).isFailure())
-        msg(MSG::DEBUG)<<"SCT overlap space points container"<<endmsg;
-
-      if(m_spacepointsOverlap) {
-        
-        SpacePointOverlapCollection::const_iterator sp  = m_spacepointsOverlap->begin();
-        SpacePointOverlapCollection::const_iterator spe = m_spacepointsOverlap->end  ();
-        
-        for (; sp!=spe; ++sp) {
-          
-          ++m_nspacepoints;
-          int nk = kine((*sp)->clusterList().first,(*sp)->clusterList().second,Kine,999);
-          for(int i=0; i!=nk; ++i) {
-            if(!isTheSameDetElement(Kine[i],(*sp))) {
-              m_kinespacepoint.insert(std::make_pair(Kine[i],(*sp)));
-            }
+  if(m_useSCT && !m_spacepointsOverlapname.key().empty()) {
+    event_data.m_spacepointsOverlap=std::make_unique< SG::ReadHandle<SpacePointOverlapCollection> >(m_spacepointsOverlapname,ctx);
+    if (!event_data.m_spacepointsOverlap->isValid()) {
+      ATH_MSG_DEBUG( "Invalid overlap space points container read handle for key " << m_spacepointsOverlapname.key() );
+    }
+    else  {
+      SpacePointOverlapCollection::const_iterator sp  = (*(event_data.m_spacepointsOverlap))->begin();
+      SpacePointOverlapCollection::const_iterator spe = (*(event_data.m_spacepointsOverlap))->end  ();
+
+      for (; sp!=spe; ++sp) {
+
+        ++event_data.m_nspacepoints;
+        int nk = kine(event_data,(*sp)->clusterList().first,(*sp)->clusterList().second,Kine,999);
+        for(int i=0; i!=nk; ++i) {
+          if(!isTheSameDetElement(event_data,Kine[i],(*sp))) {
+            event_data.m_kinespacepoint.insert(std::make_pair(Kine[i],(*sp)));
           }
         }
       }
@@ -1509,27 +1389,21 @@ void InDet::TrackClusterAssValidation::newSpacePointsEvent()
 // Good kine tracks  selection
 ///////////////////////////////////////////////////////////////////
 
-int InDet::TrackClusterAssValidation::QualityTracksSelection()
+int InDet::TrackClusterAssValidation::QualityTracksSelection(InDet::TrackClusterAssValidation::EventData_t &event_data) const
 {
-  for(int nc = 0; nc!=m_ncolection; ++nc) {
-    m_particles[nc].erase(m_particles[nc].begin(),m_particles[nc].end());
-  }
+  std::multimap<int,const Trk::PrepRawData*>::iterator c = event_data.m_kinecluster   .begin();
+  std::multimap<int,const Trk::PrepRawData*>::iterator u = event_data.m_kineclusterTRT.begin();
+  std::multimap<int,const Trk::SpacePoint*>::iterator  s = event_data.m_kinespacepoint.begin();
 
-  std::multimap<int,const Trk::PrepRawData*>::iterator c = m_kinecluster   .begin();
-  std::multimap<int,const Trk::PrepRawData*>::iterator u = m_kineclusterTRT.begin();
-  std::multimap<int,const Trk::SpacePoint*>::iterator  s = m_kinespacepoint.begin();
-
-  if( c == m_kinecluster   .end()) {
-    m_kinecluster   .erase(m_kinecluster.begin(),m_kinecluster.end());
+  if( c == event_data.m_kinecluster.end()) {
     return 0;
   }
-  if( s == m_kinespacepoint.end()) {
-    m_kinespacepoint.erase(m_kinespacepoint.begin(),m_kinespacepoint.end());
+
+  if( s == event_data.m_kinespacepoint.end()) {
     return 0;
   }
 
-  if( m_clcutTRT > 0 && u == m_kineclusterTRT.end()) {
-    m_kineclusterTRT.erase(m_kineclusterTRT.begin(),m_kineclusterTRT.end());
+  if( m_clcutTRT > 0 && u == event_data.m_kineclusterTRT.end()) {
     return 0;
   }
 
@@ -1538,92 +1412,92 @@ int InDet::TrackClusterAssValidation::QualityTracksSelection()
   int          rp = 0;
   int          t  = 0;
   int          k0 = (*c).first;
-  int          q0 = k0*charge((*c),rp);
+  int          q0 = k0*charge(event_data,(*c),rp);
   unsigned int nc = 1         ;
-     
-  for(++c; c!=m_kinecluster.end(); ++c) {
+
+  for(++c; c!=event_data.m_kinecluster.end(); ++c) {
 
     if((*c).first==k0) {++nc; continue;}
-    q0 = charge((*c),rp)*k0;
+    q0 = charge(event_data,(*c),rp)*k0;
 
-    nc < 50 ?  ++m_particleClusters   [nc]     : ++m_particleClusters   [49];
-    nc < 50 ?  ++m_particleClustersBTE[nc][rp] : ++m_particleClustersBTE[49][rp];
+    nc < 50 ?  ++event_data.m_eventStat.m_particleClusters   [nc]     : ++event_data.m_eventStat.m_particleClusters   [49];
+    nc < 50 ?  ++event_data.m_eventStat.m_particleClustersBTE[nc][rp] : ++event_data.m_eventStat.m_particleClustersBTE[49][rp];
 
-  
-    int ns = m_kinespacepoint.count(k0);
-    ns < 50 ?  ++m_particleSpacePoints   [ns]     : ++m_particleSpacePoints   [49];  
-    ns < 50 ?  ++m_particleSpacePointsBTE[ns][rp] : ++m_particleSpacePointsBTE[49][rp];  
+
+    int ns = event_data.m_kinespacepoint.count(k0);
+    ns < 50 ?  ++event_data.m_eventStat.m_particleSpacePoints   [ns]     : ++event_data.m_eventStat.m_particleSpacePoints   [49];
+    ns < 50 ?  ++event_data.m_eventStat.m_particleSpacePointsBTE[ns][rp] : ++event_data.m_eventStat.m_particleSpacePointsBTE[49][rp];
 
     if     (nc                        < m_clcut   ) worskine.push_back(k0);
-    else if(m_kinespacepoint.count(k0)< m_spcut   ) worskine.push_back(k0);
-    else if(m_kineclusterTRT.count(k0)< m_clcutTRT) worskine.push_back(k0);
+    else if(event_data.m_kinespacepoint.count(k0)< m_spcut   ) worskine.push_back(k0);
+    else if(event_data.m_kineclusterTRT.count(k0)< m_clcutTRT) worskine.push_back(k0);
     else {
-      InDet::Barcode BC(q0,rp); m_particles[0].push_back(BC); ++t;
+      InDet::Barcode BC(q0,rp); event_data.m_particles[0].push_back(BC); ++t;
     }
 
     k0 = (*c).first;
-    q0 =charge((*c),rp)*k0;
+    q0 =charge(event_data,(*c),rp)*k0;
     nc = 1         ;
   }
 
-  nc < 50 ?  ++m_particleClusters   [nc]     : ++m_particleClusters   [49];  
-  nc < 50 ?  ++m_particleClustersBTE[nc][rp] : ++m_particleClustersBTE[49][rp];
-  int ns = m_kinespacepoint.count(k0);
-  ns < 50 ?  ++m_particleSpacePoints   [ns]     : ++m_particleSpacePoints   [49];  
-  ns < 50 ?  ++m_particleSpacePointsBTE[ns][rp] : ++m_particleSpacePointsBTE[49][rp];  
+  nc < 50 ?  ++event_data.m_eventStat.m_particleClusters   [nc]     : ++event_data.m_eventStat.m_particleClusters   [49];
+  nc < 50 ?  ++event_data.m_eventStat.m_particleClustersBTE[nc][rp] : ++event_data.m_eventStat.m_particleClustersBTE[49][rp];
+  int ns = event_data.m_kinespacepoint.count(k0);
+  ns < 50 ?  ++event_data.m_eventStat.m_particleSpacePoints   [ns]     : ++event_data.m_eventStat.m_particleSpacePoints   [49];
+  ns < 50 ?  ++event_data.m_eventStat.m_particleSpacePointsBTE[ns][rp] : ++event_data.m_eventStat.m_particleSpacePointsBTE[49][rp];
 
   if     (nc                        < m_clcut   ) worskine.push_back(k0);
-  else if(m_kinespacepoint.count(k0)< m_spcut   ) worskine.push_back(k0);  
-  else if(m_kineclusterTRT.count(k0)< m_clcutTRT) worskine.push_back(k0);
+  else if(event_data.m_kinespacepoint.count(k0)< m_spcut   ) worskine.push_back(k0);
+  else if(event_data.m_kineclusterTRT.count(k0)< m_clcutTRT) worskine.push_back(k0);
   else {
-    InDet::Barcode BC(q0,rp); m_particles[0].push_back(BC); ++t;
+    InDet::Barcode BC(q0,rp); event_data.m_particles[0].push_back(BC); ++t;
   }
 
 
   std::list<int>::iterator w=worskine.begin(), we=worskine.end();
 
   for(; w!=we; ++w) {
-    m_kinecluster   .erase((*w));
-    m_kineclusterTRT.erase((*w));
-    m_kinespacepoint.erase((*w));
+    event_data.m_kinecluster   .erase((*w));
+    event_data.m_kineclusterTRT.erase((*w));
+    event_data.m_kinespacepoint.erase((*w));
   }
 
-  for(c = m_kinecluster.begin(); c!= m_kinecluster.end(); ++c) {
-    
-    const Trk::PrepRawData* 
+  for(c = event_data.m_kinecluster.begin(); c!= event_data.m_kinecluster.end(); ++c) {
+
+    const Trk::PrepRawData*
       d = (*c).second;
-    const InDetDD::SiDetectorElement* 
+    const InDetDD::SiDetectorElement*
       de= dynamic_cast<const InDetDD::SiDetectorElement*>(d->detectorElement());
-    int q  = charge(*c,rp); 
+    int q  = charge(event_data,*c,rp);
 
     if     (q<0) {
       if (de->isDBM())
-	++m_nclustersNegDBM;
+	++event_data.m_eventStat.m_nclustersNegDBM;
       else if(de->isBarrel()) {
-	de->isPixel() ? ++m_nclustersNegBP : ++m_nclustersNegBS; 
+	de->isPixel() ? ++event_data.m_eventStat.m_nclustersNegBP : ++event_data.m_eventStat.m_nclustersNegBS;
       }
       else                                     {
-	de->isPixel() ? ++m_nclustersNegEP : ++m_nclustersNegES; 
+	de->isPixel() ? ++event_data.m_eventStat.m_nclustersNegEP : ++event_data.m_eventStat.m_nclustersNegES;
       }
 
     }
     else if(q>0) {
       if (de->isDBM())
-	++m_nclustersPosDBM;
+	++event_data.m_eventStat.m_nclustersPosDBM;
       else if(de->isBarrel()) {
-	de->isPixel() ? ++m_nclustersPosBP : ++m_nclustersPosBS; 
+	de->isPixel() ? ++event_data.m_eventStat.m_nclustersPosBP : ++event_data.m_eventStat.m_nclustersPosBS;
       }
       else                                     {
-	de->isPixel() ? ++m_nclustersPosEP : ++m_nclustersPosES; 
+	de->isPixel() ? ++event_data.m_eventStat.m_nclustersPosEP : ++event_data.m_eventStat.m_nclustersPosES;
       }
     }
   }
- 
 
-  std::list<InDet::Barcode>::iterator p = m_particles[0].begin(), pe =m_particles[0].end();
+
+  std::list<InDet::Barcode>::iterator p = event_data.m_particles[0].begin(), pe =event_data.m_particles[0].end();
 
   for(; p!=pe; ++p) {
-    for(int nc=1; nc<m_ncolection; ++nc) m_particles[nc].push_back((*p));
+    for(SG::ReadHandleKeyArray<TrackCollection>::size_type nc=1; nc<m_tracklocation.size(); ++nc) event_data.m_particles[nc].push_back((*p));
   }
   return t;
 }
@@ -1632,48 +1506,48 @@ int InDet::TrackClusterAssValidation::QualityTracksSelection()
 // Recontructed track comparison with kine information
 ///////////////////////////////////////////////////////////////////
 
-void InDet::TrackClusterAssValidation::tracksComparison()
+void InDet::TrackClusterAssValidation::tracksComparison(const EventContext& ctx, InDet::TrackClusterAssValidation::EventData_t &event_data) const
 {
-  if(!m_nqtracks) return;
-
+  if(!event_data.m_nqtracks) return;
 
-  std::vector<std::string>::const_iterator co =m_tracklocation.begin(),coe=m_tracklocation.end();
 
   int nc = -1;
-  for(; co!=coe; ++co) {
+  event_data.m_trackcontainer.reserve(m_tracklocation.size());
+  for(const SG::ReadHandleKey<TrackCollection> &track_key : m_tracklocation ) {
     if(++nc >= 100) return;
-    m_tracks[nc].erase(m_tracks[nc].begin(),m_tracks[nc].end());
+    event_data.m_tracks[nc].clear();
 
-    const TrackCollection*  inputTracks = 0;
-    StatusCode sc	= evtStore()->retrieve(inputTracks, (*co));
-    if (sc.isFailure() || !inputTracks) continue;
+    event_data.m_trackcontainer.push_back( SG::ReadHandle<TrackCollection>(track_key,ctx) );
+    if (!event_data.m_trackcontainer.back().isValid()) {
+      continue;
+    }
 
     // Loop through all found tracks
     //
-    TrackCollection::const_iterator t,te = inputTracks->end();
+    TrackCollection::const_iterator t,te = event_data.m_trackcontainer.back()->end();
 
     int KINE[200],NKINE[200];
-  
-    for (t=inputTracks->begin(); t!=te; ++t) {
 
-      DataVector<const Trk::TrackStateOnSurface>::const_iterator 
+    for (t=event_data.m_trackcontainer.back()->begin(); t!=te; ++t) {
+
+      DataVector<const Trk::TrackStateOnSurface>::const_iterator
 	s  = (*t)->trackStateOnSurfaces()->begin(),
 	se = (*t)->trackStateOnSurfaces()->end  ();
-      
+
       int  NK  = 0;
       int  NC  = 0;
       int  N0  = 0;
       int  nkm = 0;
       bool qp  = false;
-      
+
       const Trk::TrackParameters* tpf = (*s)->trackParameters();  if(!tpf) continue;
       const AmgVector(5)&         Vpf = tpf ->parameters     ();
       double                      pTf = fabs(sin(Vpf[3])/Vpf[4]);
-      bool                        qTf = pTf > m_ptcut;          
+      bool                        qTf = pTf > m_ptcut;
       for(; s!=se; ++s) {
-	
+
 	if(!qp) {
-	  
+
 	  const Trk::TrackParameters* tp = (*s)->trackParameters();
 
 	  if(tp) {
@@ -1682,29 +1556,29 @@ void InDet::TrackClusterAssValidation::tracksComparison()
 	    double pT  = sin(Vp[3])/Vp[4]  ;
 	    double rap = fabs(log(tan(.5*Vp[3])));
 	    if     (pT >  m_ptcut && pT <  m_ptcutmax) {
-	      if     (rap <      1. ) ++m_ntracksPOSB[nc];
-	      else if(rap < 3.0) ++m_ntracksPOSE[nc];
-	      else if(rap < m_rapcut) ++m_ntracksPOSDBM[nc];
+	      if     (rap <      1. ) ++event_data.m_trackCollectionStat[nc].m_ntracksPOSB;
+	      else if(rap < 3.0) ++event_data.m_trackCollectionStat[nc].m_ntracksPOSE;
+	      else if(rap < m_rapcut) ++event_data.m_trackCollectionStat[nc].m_ntracksPOSDBM;
 	    }
 	    else if(pT < -m_ptcut && pT > -m_ptcutmax) {
-	      if     (rap <      1. ) ++m_ntracksNEGB[nc];
-              else if(rap < 3.0) ++m_ntracksNEGE[nc];
-	      else if(rap < m_rapcut) ++m_ntracksNEGDBM[nc];
+	      if     (rap <      1. ) ++event_data.m_trackCollectionStat[nc].m_ntracksNEGB;
+              else if(rap < 3.0) ++event_data.m_trackCollectionStat[nc].m_ntracksNEGE;
+	      else if(rap < m_rapcut) ++event_data.m_trackCollectionStat[nc].m_ntracksNEGDBM;
 	    }
 	  }
 	}
-	 
+
 	if(!m_useOutliers && !(*s)->type(Trk::TrackStateOnSurface::Measurement)) continue;
-	
+
 	const Trk::MeasurementBase* mb = (*s)->measurementOnTrack();
 	if(!mb) continue;
 
 	const Trk::RIO_OnTrack*     ri = dynamic_cast<const Trk::RIO_OnTrack*>(mb);
 	if(!ri) continue;
-	
+
 	const Trk::PrepRawData*     rd = ri->prepRawData();
 	if(!rd) continue;
-      
+
 	const InDet::SiCluster*     si = dynamic_cast<const InDet::SiCluster*>(rd);
 	if(!si) continue;
 
@@ -1712,10 +1586,10 @@ void InDet::TrackClusterAssValidation::tracksComparison()
 	if(!m_useSCT && dynamic_cast<const InDet::SCT_Cluster*> (si)) continue;
 
 
-	int Kine[1000], nk=kine0(rd,Kine,999); ++NC; if(!nk) ++N0;
+	int Kine[1000], nk=kine0(event_data,rd,Kine,999); ++NC; if(!nk) ++N0;
 
 	for(int k = 0; k!=nk; ++k) {
-	  
+
 	  int n = 0;
 	  for(; n!=NK; ++n) {if(Kine[k]==KINE[n]) {++NKINE[n]; break;}}
 	  if(n==NK) {KINE[NK] = Kine[k]; NKINE[NK] = 1; if (NK < 200) ++NK;}
@@ -1727,10 +1601,10 @@ void InDet::TrackClusterAssValidation::tracksComparison()
 	if(NKINE[n]==nkm) {
 	  int NQ = 1000*NKINE[n]+(NC-NKINE[n]);
 
-	  m_tracks[nc].insert(std::make_pair(KINE[n],NQ));
-	  if(qTf) {        
+	  event_data.m_tracks[nc].insert(std::make_pair(KINE[n],NQ));
+	  if(qTf) {
 	    if(NC-N0 > 2) {
-	      ++m_total[nc][NC]; if(NC-NKINE[n] > 2) {++m_fake[nc][NC];}
+	      ++event_data.m_trackCollectionStat[nc].m_total[NC]; if(NC-NKINE[n] > 2) {++event_data.m_trackCollectionStat[nc].m_fake[NC];}
 	    }
 	  }
 	}
@@ -1744,45 +1618,45 @@ void InDet::TrackClusterAssValidation::tracksComparison()
 // Particles and reconstructed tracks comparision
 ///////////////////////////////////////////////////////////////////
 
-void InDet::TrackClusterAssValidation::efficiencyReconstruction()
+void InDet::TrackClusterAssValidation::efficiencyReconstruction(InDet::TrackClusterAssValidation::EventData_t &event_data) const
 {
-  for(int nc = 0; nc!=m_ncolection; ++nc) {
+  for(SG::ReadHandleKeyArray<TrackCollection>::size_type nc = 0; nc!=m_tracklocation.size(); ++nc) {
 
-    m_difference[nc].erase(m_difference[nc].begin(),m_difference[nc].end());
-    std::list<InDet::Barcode>::iterator p = m_particles[nc].begin(), pe =m_particles[nc].end();
+    event_data.m_difference[nc].clear();
+    std::list<InDet::Barcode>::const_iterator p = event_data.m_particles[nc].begin(), pe =event_data.m_particles[nc].end();
     if(p==pe) return;
-    std::multimap<int,int>::iterator t, te = m_tracks[nc].end(); 
-    
+    std::multimap<int,int>::const_iterator t, te = event_data.m_tracks[nc].end();
+
     while (p!=pe) {
-    
+
       int k = (*p).barcode();
-      int n = m_kinecluster.count(k);
+      int n = event_data.m_kinecluster.count(k);
       int m = 0;
       int w = 0;
-      t = m_tracks[nc].find(k);
+      t = event_data.m_tracks[nc].find(k);
       for(; t!=te; ++t) {
-	if((*t).first!=k) break; 
+	if((*t).first!=k) break;
 	int ts = (*t).second/1000;
 	int ws = (*t).second%1000;
 	if     (ts > m         ) {m = ts; w = ws;}
 	else if(ts==m && w > ws) {        w = ws;}
       }
-      int d = n-m; if(d<0) d = 0; else if(d > 5) d=5; if(w>4) w = 4; 
+      int d = n-m; if(d<0) d = 0; else if(d > 5) d=5; if(w>4) w = 4;
       if(m) {
-	++m_efficiency [nc][d];
-	++m_efficiencyN[nc][d][w];
+	++event_data.m_trackCollectionStat[nc].m_efficiency [d];
+	++event_data.m_trackCollectionStat[nc].m_efficiencyN[d][w];
       }
       int ch = (*p).charge();
       if(m) {
-	++m_efficiencyBTE[nc][d][w][(*p).rapidity()];
-	ch > 0 ? ++m_efficiencyPOS[nc][d] : ++m_efficiencyNEG[nc][d];
+	++event_data.m_trackCollectionStat[nc].m_efficiencyBTE[d][w][(*p).rapidity()];
+	ch > 0 ? ++event_data.m_trackCollectionStat[nc].m_efficiencyPOS[d] : ++event_data.m_trackCollectionStat[nc].m_efficiencyNEG[d];
       }
       if(nc==0) {
-	++m_events; ch > 0 ? ++m_eventsPOS : ++m_eventsNEG;
-	++m_eventsBTE[(*p).rapidity()];
+	++event_data.m_eventStat.m_events; ch > 0 ? ++event_data.m_eventStat.m_eventsPOS : ++event_data.m_eventStat.m_eventsNEG;
+	++event_data.m_eventStat.m_eventsBTE[(*p).rapidity()];
       }
-      if(d==0) m_particles[nc].erase(p++); 
-      else {m_difference[nc].push_back(n-m);  ++p;}
+      if(d==0) event_data.m_particles[nc].erase(p++);
+      else {event_data.m_difference[nc].push_back(n-m);  ++p;}
     }
   }
 }
@@ -1792,18 +1666,18 @@ void InDet::TrackClusterAssValidation::efficiencyReconstruction()
 ///////////////////////////////////////////////////////////////////
 
 int InDet::TrackClusterAssValidation::kine
-(const Trk::PrepRawData* d1,const Trk::PrepRawData* d2,int* Kine,int nmax)   
+(const InDet::TrackClusterAssValidation::EventData_t &event_data,const Trk::PrepRawData* d1,const Trk::PrepRawData* d2,int* Kine,int nmax) const
 {
   int nkine = 0;
   int Kine1[1000],Kine2[1000];
-  int n1 = kine(d1,Kine1,nmax); if(!n1) return nkine;
-  int n2 = kine(d2,Kine2,nmax); if(!n2) return nkine;
+  int n1 = kine(event_data,d1,Kine1,nmax); if(!n1) return nkine;
+  int n2 = kine(event_data,d2,Kine2,nmax); if(!n2) return nkine;
 
   for(int i = 0; i!=n1; ++i) {
     for(int j = 0; j!=n2; ++j) {
       if(Kine1[i]==Kine2[j]) {Kine[nkine++] = Kine1[i];  break;}
     }
-  } 
+  }
   return nkine;
 }
 
@@ -1812,11 +1686,11 @@ int InDet::TrackClusterAssValidation::kine
 ///////////////////////////////////////////////////////////////////
 
 int InDet::TrackClusterAssValidation::kine
-(const Trk::PrepRawData* d,int* Kine,int nmax) 
+(const InDet::TrackClusterAssValidation::EventData_t &event_data,const Trk::PrepRawData* d,int* Kine,int nmax) const
 {
 
   PRD_MultiTruthCollection::const_iterator mce;
-  PRD_MultiTruthCollection::const_iterator mc = findTruth(d,mce);
+  PRD_MultiTruthCollection::const_iterator mc = findTruth(event_data,d,mce);
 
   Identifier ID    = d->identify();
   int        nkine = 0;
@@ -1827,7 +1701,7 @@ int InDet::TrackClusterAssValidation::kine
 
     int k = (*mc).second.barcode(); if(k<=0) continue;
 
-    const HepMC::GenParticle* pa = (*mc).second.cptr(); 	
+    const HepMC::GenParticle* pa = (*mc).second.cptr();
     if(!pa || !pa->production_vertex()) continue;
 
     int pdg = abs(pa->pdg_id()); if(m_pdg && m_pdg != pdg ) continue;
@@ -1837,17 +1711,17 @@ int InDet::TrackClusterAssValidation::kine
 
     // pT cut
     //
-    double           px = pa->momentum().px(); 
-    double           py = pa->momentum().py(); 
-    double           pz = pa->momentum().pz(); 
+    double           px = pa->momentum().px();
+    double           py = pa->momentum().py();
+    double           pz = pa->momentum().pz();
     double           pt = sqrt(px*px+py*py);
     if( pt < m_ptcut || pt > m_ptcutmax) continue;
-    
+
     // Rapidity cut
     //
     double           t  = fabs(pz)/pt;
     if( t  > m_tcut ) continue;
-    
+
     // Radius cut
     //
     double           vx = pa->production_vertex()->point3d().x();
@@ -1865,11 +1739,11 @@ int InDet::TrackClusterAssValidation::kine
 ///////////////////////////////////////////////////////////////////
 
 int InDet::TrackClusterAssValidation::kine0
-(const Trk::PrepRawData* d,int* Kine,int nmax) 
+(const InDet::TrackClusterAssValidation::EventData_t &event_data,const Trk::PrepRawData* d,int* Kine,int nmax) const
 {
 
   PRD_MultiTruthCollection::const_iterator mce;
-  PRD_MultiTruthCollection::const_iterator mc = findTruth(d,mce);
+  PRD_MultiTruthCollection::const_iterator mc = findTruth(event_data, d,mce);
 
   Identifier ID    = d->identify();
   int        nkine = 0;
@@ -1889,10 +1763,10 @@ int InDet::TrackClusterAssValidation::kine0
 ///////////////////////////////////////////////////////////////////
 
 bool InDet::TrackClusterAssValidation::isTheSameDetElement
-(int K,const Trk::PrepRawData* d) 
+(const InDet::TrackClusterAssValidation::EventData_t &event_data, int K,const Trk::PrepRawData* d) const
 {
-  std::multimap<int,const Trk::PrepRawData*>::iterator k = m_kinecluster.find(K); 
-  for(; k!=m_kinecluster.end(); ++k) {
+  std::multimap<int,const Trk::PrepRawData*>::const_iterator k = event_data.m_kinecluster.find(K);
+  for(; k!=event_data.m_kinecluster.end(); ++k) {
 
     if((*k).first!= K) return false;
     if(d->detectorElement()==(*k).second->detectorElement()) return true;
@@ -1905,20 +1779,20 @@ bool InDet::TrackClusterAssValidation::isTheSameDetElement
 ///////////////////////////////////////////////////////////////////
 
 bool InDet::TrackClusterAssValidation::isTheSameDetElement
-(int K,const Trk::SpacePoint* sp) 
+(const InDet::TrackClusterAssValidation::EventData_t &event_data, int K,const Trk::SpacePoint* sp) const
 {
-  const Trk::PrepRawData*  p1 = sp->clusterList().first; 
-  const Trk::PrepRawData*  p2 = sp->clusterList().second; 
+  const Trk::PrepRawData*  p1 = sp->clusterList().first;
+  const Trk::PrepRawData*  p2 = sp->clusterList().second;
 
-  std::multimap<int,const Trk::SpacePoint*>::iterator  k = m_kinespacepoint.find(K);
+  std::multimap<int,const Trk::SpacePoint*>::const_iterator  k = event_data.m_kinespacepoint.find(K);
 
   if(!p2) {
-    
-    for(; k!=m_kinespacepoint.end(); ++k) {
+
+    for(; k!=event_data.m_kinespacepoint.end(); ++k) {
       if((*k).first!= K) return false;
 
-      const Trk::PrepRawData*  n1 = (*k).second->clusterList().first ; 
-      const Trk::PrepRawData*  n2 = (*k).second->clusterList().second; 
+      const Trk::PrepRawData*  n1 = (*k).second->clusterList().first ;
+      const Trk::PrepRawData*  n2 = (*k).second->clusterList().second;
 
       if(p1->detectorElement() == n1->detectorElement()) return true;
       if(!n2) continue;
@@ -1927,11 +1801,11 @@ bool InDet::TrackClusterAssValidation::isTheSameDetElement
     return false;
   }
 
-  for(; k!=m_kinespacepoint.end(); ++k) {
+  for(; k!=event_data.m_kinespacepoint.end(); ++k) {
     if((*k).first!= K) return false;
 
-    const Trk::PrepRawData*  n1 = (*k).second->clusterList().first ; 
-    const Trk::PrepRawData*  n2 = (*k).second->clusterList().second; 
+    const Trk::PrepRawData*  n1 = (*k).second->clusterList().first ;
+    const Trk::PrepRawData*  n2 = (*k).second->clusterList().second;
 
     if(p1->detectorElement() == n1->detectorElement()) return true;
     if(p2->detectorElement() == n1->detectorElement()) return true;
@@ -1946,19 +1820,19 @@ bool InDet::TrackClusterAssValidation::isTheSameDetElement
 // Dump information about no recontructed particles
 //////////////recon/////////////////////////////////////////////////////
 
-bool InDet::TrackClusterAssValidation::noReconstructedParticles()
+bool InDet::TrackClusterAssValidation::noReconstructedParticles(const InDet::TrackClusterAssValidation::EventData_t &event_data) const
 {
 
-  for(int nc=0; nc!=m_ncolection; ++nc) {
+  for(SG::ReadHandleKeyArray<TrackCollection>::size_type nc=0; nc!=m_tracklocation.size(); ++nc) {
 
-    std::list<InDet::Barcode>::iterator p = m_particles[nc].begin(), pe =m_particles[nc].end();
+    std::list<InDet::Barcode>::const_iterator p = event_data.m_particles[nc].begin(), pe =event_data.m_particles[nc].end();
     if(p==pe) continue;
 
-    std::list<int>::iterator dif = m_difference[nc].begin();
+    std::list<int>::const_iterator dif = event_data.m_difference[nc].begin();
 
-    std::multimap<int,const Trk::PrepRawData*>::iterator c,ce = m_kinecluster.end(); 
+    std::multimap<int,const Trk::PrepRawData*>::const_iterator c,ce = event_data.m_kinecluster.end();
 
-    int n  = 69-m_tracklocation[nc].size();
+    int n  = 69-m_tracklocation[nc].key().size();
     std::string s1; for(int i=0; i<n; ++i) s1.append(" "); s1.append("|");
 
     std::cout<<"|----------------------------------------------------------------------------------------|"<<std::endl;
@@ -1970,14 +1844,14 @@ bool InDet::TrackClusterAssValidation::noReconstructedParticles()
     std::cout<<"|----------------------------------------------------------------------------------------|"<<std::endl;
     n = 0;
     for(; p!=pe; ++p) {
-      
+
       int k = (*p).barcode();
 
-      c = m_kinecluster.find(k); if(c==ce) continue;
+      c = event_data.m_kinecluster.find(k); if(c==ce) continue;
       const Trk::PrepRawData* d = (*c).second;
 
       PRD_MultiTruthCollection::const_iterator mce;
-      PRD_MultiTruthCollection::const_iterator mc = findTruth(d,mce);
+      PRD_MultiTruthCollection::const_iterator mc = findTruth(event_data,d,mce);
 
       Identifier ID    = d->identify();
       bool Q = false;
@@ -1988,7 +1862,7 @@ bool InDet::TrackClusterAssValidation::noReconstructedParticles()
 
       if(!Q) continue;
 
-      const HepMC::GenParticle* pa = (*mc).second.cptr(); 	
+      const HepMC::GenParticle* pa = (*mc).second.cptr();
 
       double           px =  pa->momentum().px();
       double           py =  pa->momentum().py();
@@ -2003,11 +1877,11 @@ bool InDet::TrackClusterAssValidation::noReconstructedParticles()
       ++n;
       std::cout<<"| "
 	     <<std::setw(4)<<n
-	       <<std::setw(6)<<pa->pdg_id() 
+	       <<std::setw(6)<<pa->pdg_id()
 	       <<std::setw(10)<<pa->barcode()
-	       <<std::setw(4)<<m_kinecluster   .count(k)
-	       <<std::setw(4)<<m_kineclusterTRT.count(k)
-	       <<std::setw(4)<<m_kinespacepoint.count(k)
+	       <<std::setw(4)<<event_data.m_kinecluster   .count(k)
+	       <<std::setw(4)<<event_data.m_kineclusterTRT.count(k)
+	       <<std::setw(4)<<event_data.m_kinespacepoint.count(k)
 	       <<std::setw(4)<<(*dif)
 	       <<std::setw(12)<<std::setprecision(5)<<pt
 	       <<std::setw(12)<<std::setprecision(5)<<ra
@@ -2016,7 +1890,7 @@ bool InDet::TrackClusterAssValidation::noReconstructedParticles()
 	       <<"   |"
 	       <<std::endl;
       ++dif;
-      
+
     }
     std::cout<<"|----------------------------------------------------------------------------------------|"<<std::endl;
   }
@@ -2027,20 +1901,31 @@ bool InDet::TrackClusterAssValidation::noReconstructedParticles()
 // Cluster truth information
 //////////////recon/////////////////////////////////////////////////////
 
-PRD_MultiTruthCollection::const_iterator 
-InDet::TrackClusterAssValidation::findTruth 
-(const Trk::PrepRawData* d,PRD_MultiTruthCollection::const_iterator& mce)
+PRD_MultiTruthCollection::const_iterator
+InDet::TrackClusterAssValidation::findTruth
+(const InDet::TrackClusterAssValidation::EventData_t &event_data,
+ const Trk::PrepRawData* d,
+ PRD_MultiTruthCollection::const_iterator& mce) const
 {
   const InDet::SCT_Cluster    * si = dynamic_cast<const InDet::SCT_Cluster*>    (d);
   const InDet::PixelCluster   * px = dynamic_cast<const InDet::PixelCluster*>   (d);
   const InDet::TRT_DriftCircle* tr = dynamic_cast<const InDet::TRT_DriftCircle*>(d);
-  
+
   PRD_MultiTruthCollection::const_iterator mc;
 
-  if     (px && m_truthPIX) {mc=m_truthPIX->find(d->identify()); mce=m_truthPIX->end();}
-  else if(si && m_truthSCT) {mc=m_truthSCT->find(d->identify()); mce=m_truthSCT->end();}
-  else if(tr && m_truthTRT) {mc=m_truthTRT->find(d->identify()); mce=m_truthTRT->end();}
-  //else        {mc=mce=m_truthPIX->end();}
+  if     (px && event_data.m_truthPIX) {mc=event_data.m_truthPIX->find(d->identify()); mce=event_data.m_truthPIX->end();}
+  else if(si && event_data.m_truthSCT) {mc=event_data.m_truthSCT->find(d->identify()); mce=event_data.m_truthSCT->end();}
+  else if(tr && event_data.m_truthTRT) {mc=event_data.m_truthTRT->find(d->identify()); mce=event_data.m_truthTRT->end();}
+  else {
+    const PRD_MultiTruthCollection *truth[] {event_data. m_truthPIX,event_data.m_truthSCT, event_data.m_truthTRT};
+    for (int i=0; i<3; i++) {
+        if (truth[i]) {
+          mce=truth[i]->end();
+          return truth[i]->end();
+        }
+    }
+    throw std::runtime_error("Neither Pixel, SCT nor TRT truth.");
+  }
   return mc;
 }
 
@@ -2048,18 +1933,18 @@ InDet::TrackClusterAssValidation::findTruth
 // Cluster truth information
 //////////////recon/////////////////////////////////////////////////////
 
-int InDet::TrackClusterAssValidation::charge(std::pair<int,const Trk::PrepRawData*> pa,int& rap)
+int InDet::TrackClusterAssValidation::charge(const InDet::TrackClusterAssValidation::EventData_t &event_data,std::pair<int,const Trk::PrepRawData*> pa,int& rap) const
 {
   int                     k = pa.first;
   const Trk::PrepRawData* d = pa.second;
   PRD_MultiTruthCollection::const_iterator mce;
-  PRD_MultiTruthCollection::const_iterator mc = findTruth(d,mce);
-  
+  PRD_MultiTruthCollection::const_iterator mc = findTruth(event_data,d,mce);
+
   for(; mc!=mce; ++mc) {
     if((*mc).second.cptr()->barcode()==k) {
 
       const HepMC::GenParticle*   pat  = (*mc).second.cptr();
-      
+
       rap       = 0;
       double px =  pat->momentum().px();
       double py =  pat->momentum().py();
@@ -2074,14 +1959,14 @@ int InDet::TrackClusterAssValidation::charge(std::pair<int,const Trk::PrepRawDat
       // other regions
 	ra > 1.6 ? rap = 2 : ra > .8 ?  rap = 1 : rap = 0;
 
-      int                         pdg = pat->pdg_id();  
+      int                         pdg = pat->pdg_id();
       const HepPDT::ParticleData* pd  = m_particleDataTable->particle(abs(pdg));
       if(!pd) return 0;
       double ch = pd->charge(); if(pdg < 0) ch = -ch;
       if(ch >  .5) return  1;
       if(ch < -.5) return -1;
       return 0;
-    } 	
+    }
   }
   return 0;
 }
diff --git a/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/IInDetTrackSplitterTool.h b/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/IInDetTrackSplitterTool.h
index 9ebb26e06dedf8553931801ebf46d37084cfce80..330607c43b6e6639481e8a1dbcbc1323a3a4cf4f 100644
--- a/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/IInDetTrackSplitterTool.h
+++ b/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/IInDetTrackSplitterTool.h
@@ -30,7 +30,7 @@ namespace InDet{
 	
 	Using this method requires track to pass trackIsCandidate 
 	(for the moment this is just a d0 cut requiring the track went through TRT cavity*/
-    virtual void splitTracks(TrackCollection const* inputTracks) = 0;
+    virtual void splitTracks(TrackCollection const* inputTracks) const = 0;
 
     /** Takes a combined ID track and either
 	1) if removeSilicon = true
@@ -42,15 +42,15 @@ namespace InDet{
 	   Then refits the remaining Si hits using the original
 	   pT and phi as constratins on the fit
     */
-    virtual Trk::Track* stripTrack(Trk::Track const& input, bool removeSilicon = true, bool applyConstraint = true) =0;
+    virtual Trk::Track* stripTrack(Trk::Track const& input, bool removeSilicon = true, bool applyConstraint = true) const =0;
     
     /** Splits a single input track into upper and lower parts (based on global y) 
 	returns a pair of track the first being the upper*/
-    virtual std::pair<Trk::Track*, Trk::Track*> splitInUpperLowerTrack(Trk::Track const& input, bool siliconHitsOnly = false) = 0;
+    virtual std::pair<Trk::Track*, Trk::Track*> splitInUpperLowerTrack(Trk::Track const& input, bool siliconHitsOnly = false) const = 0;
     
     /** Splits a single input track into odd and even parts (Not yet implemented)
      */
-    virtual std::pair<Trk::Track*, Trk::Track*> splitInOddEvenHitsTrack(Trk::Track const& input) = 0;
+    virtual std::pair<Trk::Track*, Trk::Track*> splitInOddEvenHitsTrack(Trk::Track const& input) const = 0;
 
     /** Return the names of the track collections stored in storeGate
      */
diff --git a/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/InDetTrackSplitterTool.h b/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/InDetTrackSplitterTool.h
index 07faca7ef9edb5f91a1fde29213a431e43563fc6..a2669a492fb21899ef9e3ae71ef9ec5f28002580 100755
--- a/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/InDetTrackSplitterTool.h
+++ b/InnerDetector/InDetValidation/InDetTrackSplitterTool/InDetTrackSplitterTool/InDetTrackSplitterTool.h
@@ -98,11 +98,11 @@ namespace InDet{
     
    Using this method requires track to pass trackIsCandidate 
    (for the moment this is just a d0 cut requiring the track went through TRT cavity*/
-      virtual void splitTracks(TrackCollection const* inputTracks);
+      virtual void splitTracks(TrackCollection const* inputTracks) const;
       
       /** Splits a single input track into upper and lower parts (based on global y) 
     returns a pair of track the first being the upper*/
-      virtual std::pair<Trk::Track*, Trk::Track*> splitInUpperLowerTrack(Trk::Track const& input, bool siliconHitsOnly = false);
+      virtual std::pair<Trk::Track*, Trk::Track*> splitInUpperLowerTrack(Trk::Track const& input, bool siliconHitsOnly = false) const;
 
       /** Takes a combined ID track and either
     1) if removeSilicon = true
@@ -114,16 +114,16 @@ namespace InDet{
        Then refits the remaining Si hits using the original
        pT and phi as constratins on the fit
        */
-      virtual Trk::Track* stripTrack(Trk::Track const& input, bool removeSilicon = true, bool applyConstraint = true);
+      virtual Trk::Track* stripTrack(Trk::Track const& input, bool removeSilicon = true, bool applyConstraint = true) const;
       
       /** Splits a single input track into odd and even parts (with logic to aviod splitting SCT space points)
        */
-      virtual std::pair<Trk::Track*, Trk::Track*> splitInOddEvenHitsTrack(Trk::Track const& input);
+      virtual std::pair<Trk::Track*, Trk::Track*> splitInOddEvenHitsTrack(Trk::Track const& input) const;
 
       /** Return the names of the track collections stored in storeGate
        */
-      std::string const inline UpperTracksKey() const {return m_outputUpperTracksName;}
-      std::string const inline LowerTracksKey() const {return m_outputLowerTracksName;}
+      std::string const inline UpperTracksKey() const {return m_outputUpperTracksName.key();}
+      std::string const inline LowerTracksKey() const {return m_outputLowerTracksName.key();}
 
     private:
       
@@ -134,11 +134,11 @@ namespace InDet{
       
       /** Return a vector of the SCT hits on track
        */
-      std::vector<Trk::MeasurementBase const*> getSCTHits(Trk::Track const& input);
+      std::vector<Trk::MeasurementBase const*> getSCTHits(Trk::Track const& input) const;
 
       /** Logic to check if there is another SCT hit associated with the input hit, which forms a space point
        */
-      std::vector<Trk::MeasurementBase const*>::iterator findSCTHitsFromSameSpacePoint(Trk::MeasurementBase const* m_sctHit, std::vector<Trk::MeasurementBase const*>& m_listOfSCTHits);
+      std::vector<Trk::MeasurementBase const*>::iterator findSCTHitsFromSameSpacePoint(Trk::MeasurementBase const* sctHit, std::vector<Trk::MeasurementBase const*>& listOfSCTHits) const;
 
       /** Logic to check if the track is constrained given the number of various types of hits
        */
@@ -146,39 +146,35 @@ namespace InDet{
       
       /** Strip the Si hits, fit the remaining with a theta, z0 constraint.
        */
-      Trk::Track* stripSiFromTrack(Trk::Track const& input);
+      Trk::Track* stripSiFromTrack(Trk::Track const& input) const;
       
       /** Make the theta and z0 constraint 
        */
-      Trk::PseudoMeasurementOnTrack const* makeThetaZ0Constraint(Trk::Perigee const* originialPerigee);
+      Trk::PseudoMeasurementOnTrack const* makeThetaZ0Constraint(Trk::Perigee const* originialPerigee) const;
 
       /** Strip the TRT hits, fit the remaining with a qOverP constraint
        */
-      Trk::Track* stripTRTFromTrack(Trk::Track const& input, bool applyConstraint = true);
+      Trk::Track* stripTRTFromTrack(Trk::Track const& input, bool applyConstraint = true) const;
       
       /** Make the qOverP constraint
        */
       Trk::PseudoMeasurementOnTrack const* makePConstraint(Trk::Perigee const* originialPerigee
-                 ,Trk::StraightLineSurface const* trtSurf);
+                 ,Trk::StraightLineSurface const* trtSurf) const;
 
       /** Output track collection names recorded in storgate 
        */
-      std::string m_outputUpperTracksName;
-      std::string m_outputLowerTracksName;
-      
-      /** Do we use the material on the input track
-       */
-      bool m_keepmaterial;
-      
-      /** Upper(Lower) Track Collections */
-      TrackCollection* upperTracks;
-      TrackCollection* lowerTracks;
+      SG::WriteHandleKey<TrackCollection> m_outputUpperTracksName;
+      SG::WriteHandleKey<TrackCollection> m_outputLowerTracksName;
       
       /** Helper Functions */
       ToolHandle<Trk::ITrackFitter>  m_trkfitter;
       TRT_ID const* m_trtid ;
       SCT_ID const* m_sctid ;
       
+      /** Do we use the material on the input track
+       */
+      bool m_keepmaterial;
+      
     };
 }
 
diff --git a/InnerDetector/InDetValidation/InDetTrackSplitterTool/doc/packagedoc.h b/InnerDetector/InDetValidation/InDetTrackSplitterTool/doc/packagedoc.h
index b66f60707c4ea2dd44dc6feb298a2678a873aec5..7d68c299ddba1ea0dff4179ace031c7a8dec2c0d 100644
--- a/InnerDetector/InDetValidation/InDetTrackSplitterTool/doc/packagedoc.h
+++ b/InnerDetector/InDetValidation/InDetTrackSplitterTool/doc/packagedoc.h
@@ -31,6 +31,3 @@ m_trackSplitterTool->splitTracks(inputTracks);
 then retrieve the collection from storeGate with the names m_outputUpperTracksName, m_outputLowerTracksName
 
 */
-
-
-
diff --git a/InnerDetector/InDetValidation/InDetTrackSplitterTool/src/InDetTrackSplitterTool.cxx b/InnerDetector/InDetValidation/InDetTrackSplitterTool/src/InDetTrackSplitterTool.cxx
index 9f26a7f6b16204817beb10cd2a5414b373446dda..3c01198fa95b07263f082d59c774a9fe93fcb270 100644
--- a/InnerDetector/InDetValidation/InDetTrackSplitterTool/src/InDetTrackSplitterTool.cxx
+++ b/InnerDetector/InDetValidation/InDetTrackSplitterTool/src/InDetTrackSplitterTool.cxx
@@ -26,6 +26,7 @@
 
 #include "GeoPrimitives/GeoPrimitives.h" 
 #include "EventPrimitives/EventPrimitives.h"
+#include "GaudiKernel/ThreadLocalContext.h"
 
 /** @class InDetTrackSplitterTool 
     
@@ -79,8 +80,6 @@
 
 InDet::InDetTrackSplitterTool::InDetTrackSplitterTool( std::string const & type, std::string const & name, IInterface const* parent ) :
   AthAlgTool( type, name, parent ),
-  upperTracks(0),
-  lowerTracks(0),
   m_trkfitter("Trk::GlobalChi2Fitter/InDetTrackFitter")
 {
   
@@ -122,6 +121,9 @@ StatusCode InDet::InDetTrackSplitterTool::initialize()
     return StatusCode::SUCCESS;
   } 
 
+  ATH_CHECK( m_outputUpperTracksName.initialize() );
+  ATH_CHECK( m_outputLowerTracksName.initialize() );
+
   msg(MSG::DEBUG) << "InDetTrackSplitterTool initialized" << endmsg;
   return StatusCode::SUCCESS;
 
@@ -138,7 +140,7 @@ StatusCode InDet::InDetTrackSplitterTool::finalize()
     returns a pair of track the first being the upper
 */
 std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInUpperLowerTrack(Trk::Track const& input, 
-                        bool siliconHitsOnly){
+                        bool siliconHitsOnly) const {
   //std::cout << "input: " << input << std::endl;
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " In splitInUpperLowerTrack" <<endmsg;
 
@@ -349,7 +351,7 @@ std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInUpperL
 /** Strips either the Si or the TRT and refits the track using constrants 
  */
 Trk::Track* InDet::InDetTrackSplitterTool::stripTrack(Trk::Track const& input, 
-                  bool removeSilicon, bool applyConstraint ){
+                  bool removeSilicon, bool applyConstraint ) const {
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " In stripTrack" <<endmsg;
 
   /** The returned track */
@@ -370,14 +372,14 @@ Trk::Track* InDet::InDetTrackSplitterTool::stripTrack(Trk::Track const& input,
 
 /** Strip the Si hits, fit the remaining with a theta, z0 constraint.
  */
-Trk::Track* InDet::InDetTrackSplitterTool::stripSiFromTrack(Trk::Track const& input){
+Trk::Track* InDet::InDetTrackSplitterTool::stripSiFromTrack(Trk::Track const& input) const {
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In stripSiFromTrack" <<endmsg;
   
   /** The returned track */
   Trk::Track* outputTrack(0);
 
   /** The measurements */
-  Trk::MeasurementSet m_TRTHits;
+  Trk::MeasurementSet TRTHits;
 
   /** Get the initial perigee parameters */
   Trk::Perigee const* originalPerigee = input.perigeeParameters();
@@ -389,7 +391,7 @@ Trk::Track* InDet::InDetTrackSplitterTool::stripSiFromTrack(Trk::Track const& in
   Trk::PseudoMeasurementOnTrack const* constraint = makeThetaZ0Constraint(originalPerigee);
 
   /** Adding the constraint first */
-  m_TRTHits.push_back(constraint);
+  TRTHits.push_back(constraint);
   
   unsigned int totalNumberTRTHits = 0;
   
@@ -411,7 +413,7 @@ Trk::Track* InDet::InDetTrackSplitterTool::stripSiFromTrack(Trk::Track const& in
     }
     
     ++totalNumberTRTHits;
-    m_TRTHits.push_back(*meas);
+    TRTHits.push_back(*meas);
  
   }
 
@@ -420,7 +422,7 @@ Trk::Track* InDet::InDetTrackSplitterTool::stripSiFromTrack(Trk::Track const& in
   //if(isConstrained(numberUpperPixelHits,numberUpperSCTHits,numberUpperTRTHits,numberUpperPseudoMeas)){
     
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "before calling fit" << endmsg;
-  outputTrack = m_trkfitter->fit(m_TRTHits, *originalPerigee, true, hypo);
+  outputTrack = m_trkfitter->fit(TRTHits, *originalPerigee, true, hypo);
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "after calling fit" << endmsg;
     
   if(!outputTrack){
@@ -437,14 +439,14 @@ Trk::Track* InDet::InDetTrackSplitterTool::stripSiFromTrack(Trk::Track const& in
 
 /** Strip the TRT hits, fit the remaining with a qOverP constraint
  */
-Trk::Track* InDet::InDetTrackSplitterTool::stripTRTFromTrack(Trk::Track const& input, bool applyConstraint){
+Trk::Track* InDet::InDetTrackSplitterTool::stripTRTFromTrack(Trk::Track const& input, bool applyConstraint) const {
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In stripTRTFromTrack" <<endmsg;
 
   /** The returned track */
   Trk::Track* outputTrack(0);
 
   /** The measurements */
-  Trk::MeasurementSet m_SiHits;
+  Trk::MeasurementSet SiHits;
 
   /** Get the initial perigee parameters */
   Trk::Perigee const* originalPerigee = input.perigeeParameters();
@@ -480,7 +482,7 @@ Trk::Track* InDet::InDetTrackSplitterTool::stripTRTFromTrack(Trk::Track const& i
       Trk::PseudoMeasurementOnTrack const* constraint = makePConstraint(originalPerigee,trtSurf);
       
       /** Adding the constraint first */
-      m_SiHits.push_back(constraint);
+      SiHits.push_back(constraint);
       
       /** Only add the constraint once */
       addedConstraint = true;
@@ -492,7 +494,7 @@ Trk::Track* InDet::InDetTrackSplitterTool::stripTRTFromTrack(Trk::Track const& i
     }
     
     ++totalNumberSiHits;
-    m_SiHits.push_back(*meas);
+    SiHits.push_back(*meas);
  
   }
 
@@ -501,7 +503,7 @@ Trk::Track* InDet::InDetTrackSplitterTool::stripTRTFromTrack(Trk::Track const& i
   //if(isConstrained(numberUpperPixelHits,numberUpperSCTHits,numberUpperTRTHits,numberUpperPseudoMeas)){
     
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "before calling fit" << endmsg;
-  outputTrack = m_trkfitter->fit(m_SiHits, *originalPerigee, false, hypo);
+  outputTrack = m_trkfitter->fit(SiHits, *originalPerigee, false, hypo);
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "after calling fit" << endmsg;
     
   if(!outputTrack){
@@ -515,7 +517,7 @@ Trk::Track* InDet::InDetTrackSplitterTool::stripTRTFromTrack(Trk::Track const& i
 
 /** Make the qOverP constraint
  */
-Trk::PseudoMeasurementOnTrack const* InDet::InDetTrackSplitterTool::makePConstraint(Trk::Perigee const* perigee,Trk::StraightLineSurface const* trtSurf){
+Trk::PseudoMeasurementOnTrack const* InDet::InDetTrackSplitterTool::makePConstraint(Trk::Perigee const* perigee,Trk::StraightLineSurface const* trtSurf) const {
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In makePConstraint" <<endmsg;
   
   if( !perigee->covariance() ) return 0;
@@ -543,7 +545,7 @@ Trk::PseudoMeasurementOnTrack const* InDet::InDetTrackSplitterTool::makePConstra
 
 /** Make the theta and z0 constraint 
  */
-Trk::PseudoMeasurementOnTrack const* InDet::InDetTrackSplitterTool::makeThetaZ0Constraint(Trk::Perigee const* perigee){
+Trk::PseudoMeasurementOnTrack const* InDet::InDetTrackSplitterTool::makeThetaZ0Constraint(Trk::Perigee const* perigee) const {
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In makeThetaZ0Constraint" <<endmsg;  
 
   if( !perigee->covariance() ) return 0;
@@ -586,12 +588,12 @@ Trk::PseudoMeasurementOnTrack const* InDet::InDetTrackSplitterTool::makeThetaZ0C
     Splits a single input track into upper and lower parts (based on global y) 
     returns a pair of track the first being the upper
 */
-std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInOddEvenHitsTrack(Trk::Track const& input){
+std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInOddEvenHitsTrack(Trk::Track const& input) const {
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " In splitInOddEvenHitsTrack" <<endmsg;
 
   /** The returned tracks */
-  Trk::Track* m_oddTrack(0);
-  Trk::Track* m_evenTrack(0);
+  Trk::Track* oddTrack(0);
+  Trk::Track* evenTrack(0);
   
   /** Get the initial perigee parameters */
   Trk::Perigee const* originalPerigee = input.perigeeParameters();
@@ -600,8 +602,8 @@ std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInOddEve
   Trk::ParticleHypothesis hypo = input.info().particleHypothesis();
 
   /** Get the  measurements */
-  Trk::MeasurementSet m_oddHits;
-  Trk::MeasurementSet m_evenHits;
+  Trk::MeasurementSet oddHits;
+  Trk::MeasurementSet evenHits;
   
   unsigned int totalNumberPixelHits = 0;
   unsigned int totalNumberSCTHits = 0;
@@ -619,7 +621,7 @@ std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInOddEve
   unsigned int numberEvenPseudoMeas = 0; 
   
   /** Get SCT hits (ordered) */
-  std::vector<Trk::MeasurementBase const*> m_unusedSCTHits = getSCTHits(input);
+  std::vector<Trk::MeasurementBase const*> unusedSCTHits = getSCTHits(input);
   
   DataVector<Trk::MeasurementBase const>::const_iterator meas = input.measurementsOnTrack()->begin();
   DataVector<Trk::MeasurementBase const>::const_iterator measEnd = input.measurementsOnTrack()->end(); 
@@ -640,32 +642,32 @@ std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInOddEve
   
         if(!m_trtid->is_sct(surfaceid)){
           if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "adding odd hit" <<endmsg;
-          m_oddHits.push_back( *meas);
+          oddHits.push_back( *meas);
           ++totalNumberHits;
           }else{
     
             /** protect against breaking up space points
-                find the sct hit in m_unusedSCTHits */
-            std::vector<Trk::MeasurementBase const* >::iterator m_result = find(m_unusedSCTHits.begin(), m_unusedSCTHits.end(),  *meas);
+                find the sct hit in unusedSCTHits */
+            std::vector<Trk::MeasurementBase const* >::iterator result = find(unusedSCTHits.begin(), unusedSCTHits.end(),  *meas);
     
             /** if the SCT hits hasn't been assigned to a tracks */
-            if(m_result != m_unusedSCTHits.end()){
+            if(result != unusedSCTHits.end()){
       
               if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "add the (odd) SCT hit" <<endmsg;
-              m_oddHits.push_back( *meas);
+              oddHits.push_back( *meas);
               ++totalNumberHits;
 
               /** remove hit from unused list */
               if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "removing the SCT hit from unused list" <<endmsg;
-              m_unusedSCTHits.erase(m_result);
+              unusedSCTHits.erase(result);
       
               /** find any other hits with same r phi */
-              m_result = findSCTHitsFromSameSpacePoint( *meas, m_unusedSCTHits);
-              if(m_result != m_unusedSCTHits.end()){
+              result = findSCTHitsFromSameSpacePoint( *meas, unusedSCTHits);
+              if(result != unusedSCTHits.end()){
                 if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "adding the other (odd) SCT hit in the spacepoint" <<endmsg;
-                m_oddHits.push_back( *m_result);
+                oddHits.push_back( *result);
                 if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "removing the SCT hit from unused list" <<endmsg;
-                m_unusedSCTHits.erase(m_result);
+                unusedSCTHits.erase(result);
               }
             }
           }
@@ -679,31 +681,31 @@ std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInOddEve
   
         if(!m_trtid->is_sct(surfaceid)){
           if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "add the (even) hit" <<endmsg;
-          m_evenHits.push_back( *meas);
+          evenHits.push_back( *meas);
           ++totalNumberHits;
         }else{
           /** protect against breaking up space points
-              find the sct hit in m_unusedSCTHits */
-          std::vector<Trk::MeasurementBase const* >::iterator m_result = find(m_unusedSCTHits.begin(), m_unusedSCTHits.end(), *meas);
+              find the sct hit in unusedSCTHits */
+          std::vector<Trk::MeasurementBase const* >::iterator result = find(unusedSCTHits.begin(), unusedSCTHits.end(), *meas);
     
           /** if the SCT hits hasn't been assigned to a tracks */
-          if(m_result != m_unusedSCTHits.end()){
+          if(result != unusedSCTHits.end()){
       
             if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "add the (even) SCT hit" <<endmsg;
-            m_evenHits.push_back( *meas);
+            evenHits.push_back( *meas);
             ++totalNumberHits;
 
             /** remove hit from umused list */
             if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "removing the SCT hit from unused list" <<endmsg;
-            m_unusedSCTHits.erase(m_result);
+            unusedSCTHits.erase(result);
       
             /** find any other hits with same r phi */
-            m_result = findSCTHitsFromSameSpacePoint( *meas, m_unusedSCTHits);
-            if(m_result != m_unusedSCTHits.end()){
+            result = findSCTHitsFromSameSpacePoint( *meas, unusedSCTHits);
+            if(result != unusedSCTHits.end()){
               if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "adding the other (even) SCT hit in the spacepoint" <<endmsg;
-              m_evenHits.push_back( *m_result);
+              evenHits.push_back( *result);
               if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "removing the SCT hit from unused list" <<endmsg;
-              m_unusedSCTHits.erase(m_result);
+              unusedSCTHits.erase(result);
             }
           }
         }
@@ -714,28 +716,28 @@ std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInOddEve
       if(ps){
         if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Adding an odd pseudoMeasurement" <<endmsg; 
         ++numberOddPseudoMeas;
-        m_oddHits.push_back( ps);
+        oddHits.push_back( ps);
 
         if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Adding an even pseudoMeasurement" <<endmsg; 
         ++numberEvenPseudoMeas;
-        m_evenHits.push_back( ps);
+        evenHits.push_back( ps);
       }
     }
   }
 
   /** Sort the hits. */
-  //std::sort(m_oddHits.begin(), m_oddHits.end(), InDetTrackSplitterHelpers::CompareYPosition );
-  //std::sort(m_evenHits.begin(), m_evenHits.end(), InDetTrackSplitterHelpers::CompareYPosition );
+  //std::sort(oddHits.begin(), oddHits.end(), InDetTrackSplitterHelpers::CompareYPosition );
+  //std::sort(evenHits.begin(), evenHits.end(), InDetTrackSplitterHelpers::CompareYPosition );
   
   /** Upper track */
   /** track must be overconstrained */
   if(isConstrained(numberOddPixelHits,numberOddSCTHits,numberOddTRTHits,numberOddPseudoMeas)){  
     
     if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "before calling odd fit" << endmsg;
-    m_oddTrack = m_trkfitter->fit(m_oddHits, *originalPerigee, false, hypo);
+    oddTrack = m_trkfitter->fit(oddHits, *originalPerigee, false, hypo);
     if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "after calling odd fit" << endmsg;
     
-    if(!m_oddTrack){
+    if(!oddTrack){
       if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Odd Fit Failed!" << endmsg ;
       if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "There was: " 
                << numberOddPixelHits << " odd Pixel hits, " 
@@ -758,10 +760,10 @@ std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInOddEve
   if(isConstrained(numberEvenPixelHits,numberEvenSCTHits,numberEvenTRTHits,numberEvenPseudoMeas)){
     
     if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "before calling even fit" << endmsg;
-    m_evenTrack = m_trkfitter->fit(m_evenHits, *originalPerigee, false, hypo);
+    evenTrack = m_trkfitter->fit(evenHits, *originalPerigee, false, hypo);
     if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "after calling even fit" << endmsg;
     
-    if(!m_evenTrack){
+    if(!evenTrack){
       if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Even Fit Failed!" << endmsg ;
       if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "There was: " << numberEvenSCTHits << " even si hits and " 
                << numberEvenTRTHits << "even TRT hits"<< endmsg;
@@ -774,7 +776,7 @@ std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInOddEve
     if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Not enough measurements on even track. Fit fails." << endmsg ;
   
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Leaving splitInOddEvenHitsTrack" <<endmsg;
-  return std::make_pair(m_oddTrack, m_evenTrack);  
+  return std::make_pair(oddTrack, evenTrack);  
 }
   
 /** 
@@ -785,11 +787,19 @@ std::pair<Trk::Track*, Trk::Track*> InDet::InDetTrackSplitterTool::splitInOddEve
     Using this method requires track to pass trackIsCandidate 
     (for the moment this is just a d0 cut requiring the track went through TRT cavity
 */
-void InDet::InDetTrackSplitterTool::splitTracks(TrackCollection const* inputTracks){
+void InDet::InDetTrackSplitterTool::splitTracks(TrackCollection const* inputTracks) const {
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " In splitTracks" <<endmsg;
   
-  upperTracks = new TrackCollection(SG::OWN_ELEMENTS);
-  lowerTracks = new TrackCollection(SG::OWN_ELEMENTS);
+  //  const EventContext& ctx = Gaudi::Hive::currentContext();
+  SG::WriteHandle<TrackCollection> upperTracks(m_outputUpperTracksName);
+  if ( upperTracks.record( std::make_unique<TrackCollection>() ).isFailure() ) {
+     ATH_MSG_FATAL( "Failed to record upper tracks collection " <<  m_outputUpperTracksName.key() );
+  }
+
+  SG::WriteHandle<TrackCollection> lowerTracks(m_outputLowerTracksName);
+  if ( lowerTracks.record( std::make_unique<TrackCollection>() ).isFailure() ) {
+     ATH_MSG_FATAL( "Failed to record upper tracks collection " <<  m_outputLowerTracksName.key() );
+  }
 
   if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "There are: " << inputTracks->size() << " input tracks."<< endmsg;
   
@@ -822,29 +832,7 @@ void InDet::InDetTrackSplitterTool::splitTracks(TrackCollection const* inputTrac
     } else
       if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "Track is NOT a candidate."<< endmsg;
   }
-  
 
-  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "There are  " << upperTracks->size() << " upper tracks. "<< endmsg;
-  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Recording Upper tracks..." << endmsg;
-  
-  StatusCode sc = evtStore()->record(upperTracks,m_outputUpperTracksName,false);
-  if (sc.isFailure()){
-    msg(MSG::FATAL) << "Tracks " << m_outputUpperTracksName << " could not be recorded in StoreGate !"
-  << endmsg;
-  } else {
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Tracks " << m_outputUpperTracksName << " recorded in StoreGate" << endmsg;
-  }
-  
-  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "There are  " << lowerTracks->size() << " lower tracks. "<< endmsg;
-  if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Recording Upper tracks..." << endmsg;
-  
-  sc = evtStore()->record(lowerTracks,m_outputLowerTracksName,false);
-  if (sc.isFailure()){
-    msg(MSG::FATAL) << "Tracks " << m_outputLowerTracksName << " could not be recorded in StoreGate !"<< endmsg;        
-  }else {
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Tracks " << m_outputLowerTracksName << " recorded in StoreGate" << endmsg;
-  }
-  
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Leaving splitTracks" <<endmsg;
   return;
 }
@@ -864,14 +852,14 @@ bool InDet::InDetTrackSplitterTool::trackIsCandidate(Trk::Track const& inputTrac
     }
     
   //Trk::Perigee const* measuredperigee = dynamic_cast<Trk::Perigee const*>( trackPerigee );
-  double const m_d0 = trackPerigee->parameters()[Trk::d0];
+  double const d0 = trackPerigee->parameters()[Trk::d0];
 
-  if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "do is: "<<  m_d0 << endmsg;
+  if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "do is: "<<  d0 << endmsg;
 
   /** This can be fleshed out, to have better track selection */
 
   //width of the cavity in the TRT 
-  if( fabs(m_d0) < 600){
+  if( fabs(d0) < 600){
     if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "is a candidate" << endmsg;
     return true;
   }
@@ -883,64 +871,64 @@ bool InDet::InDetTrackSplitterTool::trackIsCandidate(Trk::Track const& inputTrac
 /** Return a vector of the SCT hits on track 
     (used for not breaking up SCT space points, when splitting Odd/Even)
  */
-std::vector<Trk::MeasurementBase const*> InDet::InDetTrackSplitterTool::getSCTHits(Trk::Track const& input){
+std::vector<Trk::MeasurementBase const*> InDet::InDetTrackSplitterTool::getSCTHits(Trk::Track const& input) const {
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In getSCTHits " << endmsg;
-  std::vector<Trk::MeasurementBase const*> m_SCTHits;
+  std::vector<Trk::MeasurementBase const*> SCTHits;
 
   DataVector<Trk::MeasurementBase const>::const_iterator meas = input.measurementsOnTrack()->begin();
   DataVector<Trk::MeasurementBase const>::const_iterator measEnd = input.measurementsOnTrack()->end(); 
   for(;meas != measEnd; ++meas){
         
-    Trk::RIO_OnTrack const* m_rio = dynamic_cast<Trk::RIO_OnTrack const*>(*meas);
+    Trk::RIO_OnTrack const* rio = dynamic_cast<Trk::RIO_OnTrack const*>(*meas);
     
-    if(m_rio){
-      Identifier const& surfaceid = (m_rio->identify());
+    if(rio){
+      Identifier const& surfaceid = (rio->identify());
       if(m_trtid->is_sct(surfaceid)){
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "we've found an SCT hit " << endmsg;
-  m_SCTHits.push_back(*meas);
+  SCTHits.push_back(*meas);
       }
     }
   }
 
   //if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "sorting the hits " << endmsg;
   /** order the hits in y */
-  //std::sort(m_SCTHits.begin(), m_SCTHits.end(), InDetTrackSplitterHelpers::CompareYPosition );
+  //std::sort(SCTHits.begin(), SCTHits.end(), InDetTrackSplitterHelpers::CompareYPosition );
   
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Leaving getSCTHits " << endmsg;
-  return m_SCTHits;
+  return SCTHits;
 }
 
 /** 
     Logic to check if there is another SCT hit associated with the input hit, which forms a space point
     (used for not breaking up SCT space points, when splitting Odd/Even)
 */
-std::vector<Trk::MeasurementBase const*>::iterator InDet::InDetTrackSplitterTool::findSCTHitsFromSameSpacePoint(Trk::MeasurementBase const* m_sctHit, std::vector<Trk::MeasurementBase const*>& m_listOfSCTHits){
+std::vector<Trk::MeasurementBase const*>::iterator InDet::InDetTrackSplitterTool::findSCTHitsFromSameSpacePoint(Trk::MeasurementBase const* sctHit, std::vector<Trk::MeasurementBase const*>& listOfSCTHits) const {
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in findSCTHitsFromSameSpacePoint " << endmsg;
-  std::vector<Trk::MeasurementBase const*>::iterator m_result = m_listOfSCTHits.end();
+  std::vector<Trk::MeasurementBase const*>::iterator result = listOfSCTHits.end();
   
-  Trk::RIO_OnTrack const* rio = dynamic_cast<Trk::RIO_OnTrack const*>(m_sctHit);
+  Trk::RIO_OnTrack const* rio = dynamic_cast<Trk::RIO_OnTrack const*>(sctHit);
   if(rio){
     Identifier const& surfaceid = (rio->identify());  
     
     int targetEta = m_sctid->eta_module(surfaceid);
     int targetPhi = m_sctid->phi_module(surfaceid);
     
-    std::vector<Trk::MeasurementBase const*>::const_iterator meas = m_listOfSCTHits.begin();
-    std::vector<Trk::MeasurementBase const*>::const_iterator measEnd = m_listOfSCTHits.end(); 
+    std::vector<Trk::MeasurementBase const*>::const_iterator meas = listOfSCTHits.begin();
+    std::vector<Trk::MeasurementBase const*>::const_iterator measEnd = listOfSCTHits.end(); 
     for(;meas != measEnd; ++meas){
-      Trk::RIO_OnTrack const* m_candidateRio = dynamic_cast<Trk::RIO_OnTrack const*>(*meas);
-      if(m_candidateRio){
-  Identifier const& candidateSurfaceid = (m_candidateRio->identify());
+      Trk::RIO_OnTrack const* candidateRio = dynamic_cast<Trk::RIO_OnTrack const*>(*meas);
+      if(candidateRio){
+  Identifier const& candidateSurfaceid = (candidateRio->identify());
   if(m_sctid->eta_module(candidateSurfaceid) == targetEta && m_sctid->phi_module(candidateSurfaceid) == targetPhi){
     if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Found another hit in the SpacePoint " << endmsg;
-    m_result = find(m_listOfSCTHits.begin(), m_listOfSCTHits.end(), *meas);
+    result = find(listOfSCTHits.begin(), listOfSCTHits.end(), *meas);
   }
       }
     }
   }
   
   if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Leaving findSCTHitsFromSameSpacePoint " << endmsg;
-  return m_result;
+  return result;
 }
 
 /** 
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/HoleSearchValidation.h b/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/HoleSearchValidation.h
index 25afc6cb57d26d96a9d8de0b22ab120b4960ff0a..f896325e29e459a686c63266d47a8f4652b0e03b 100755
--- a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/HoleSearchValidation.h
+++ b/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/HoleSearchValidation.h
@@ -10,11 +10,14 @@
 #define TRK_HOLESEARCHVALIDATION_H
 
 // Gaudi includes
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaKernel/IAtRndmGenSvc.h"
 
+#include "TrkTrack/TrackCollection.h"
+#include <mutex>
+
 // forward declarations
 class AtlasDetectorID;
 class PixelID;
@@ -45,24 +48,24 @@ namespace Trk {
 
 namespace InDet {
 
-  class HoleSearchValidation : public AthAlgorithm {
+  class HoleSearchValidation : public AthReentrantAlgorithm {
   public:
     /** Standard Athena-Algorithm Constructor */
     HoleSearchValidation(const std::string& name, ISvcLocator* pSvcLocator);
     /** Default Destructor */
     ~HoleSearchValidation();
-    
+
     /** standard Athena-Algorithm method */
     StatusCode          initialize();
     /** standard Athena-Algorithm method */
-    StatusCode          execute();
+    StatusCode          execute_r(const EventContext& ctx) const;
     /** standard Athena-Algorithm method */
     StatusCode          finalize();
 
   private:
 
-    void printInfoTSoS( const Trk::TrackStateOnSurface* tsos);
-    unsigned int doHoleSearch( const Trk::Track* track);
+    void printInfoTSoS( const Trk::TrackStateOnSurface* tsos) const;
+    unsigned int doHoleSearch( const Trk::Track* track) const;
 
     const AtlasDetectorID*                m_idHelper;
     const PixelID*                        m_pixelID;
@@ -71,29 +74,35 @@ namespace InDet {
     const SiliconID*                      m_siliconID; 
 
     ToolHandle<Trk::ITrackHoleSearchTool>    m_holeSearchTool;
-    std::string         m_trackCollectionName;     //!< jobOption: name of the TrackCollection
+    SG::ReadHandleKey<TrackCollection> m_trackCollectionKey;     //!< jobOption: name of the TrackCollection
+    SG::WriteHandleKey<TrackCollection> m_trackCollectionOutputKey;     //!< jobOption: name of the TrackCollection
     //unsigned int   m_numberHitsToRemove;  //!< jobOption: number of hits to remove from tracks
     //unsigned int   m_numberHitsToKeep;    //!< jobOption: number of hits to remove 
     bool           m_saveNewTracksInSG;   //!< jobOption: save new tracks to SG ?
    
 
-    bool           m_removeSctSide0;
-    bool           m_removeSctSide1;
-
-    bool           m_removePix0;
-    bool           m_removePix1;
-    bool           m_removePix2;
-
-    bool           m_removeSct0;
-    bool           m_removeSct1;
-    bool           m_removeSct2;
-    bool           m_removeSct3;
-    bool           m_removeSct4;
-    bool           m_removeSct5;
-    bool           m_removeSct6;
-    bool           m_removeSct7;
-    bool           m_removeSct8;
-
+    struct Parts {
+      enum EParts {
+        kPix0,
+        kPix1,
+        kPix2,
+
+        kSct0,
+        kSct1,
+        kSct2,
+        kSct3,
+        kSct4,
+        kSct5,
+        kSct6,
+        kSct7,
+        kSct8,
+        kSctSide0,
+        kSctSide1,
+        kNParts
+      };
+    };
+
+    bool m_removeParts[Parts::kNParts];
     bool           m_removeOverlapHitsOnly;
     bool           m_ignoreTrackEnds;
 
@@ -105,7 +114,8 @@ namespace InDet {
     std::string                  m_randomEngineName; //!< Name of the random number stream
 
     // some information for statistics -> printout in finalize
-    std::vector< std::vector< unsigned int > >  m_trackStats; //!< # tracks as function of [#generated holes, #found holes]
+    mutable std::mutex                                  m_trackStatsMutex;
+    mutable std::vector< std::vector< unsigned int > >  m_trackStats; //!< # tracks as function of [#generated holes, #found holes]
 
   }; // end of class
 
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/InDetSplittedTracksCreator.h b/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/InDetSplittedTracksCreator.h
index abc8854d1aa79927ff54af8f8bbb3b3babe85653..1e40a80f9123325f7ea57d963a947027a6224ecf 100644
--- a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/InDetSplittedTracksCreator.h
+++ b/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/InDetSplittedTracksCreator.h
@@ -10,7 +10,7 @@
 #define INDET_INDETSPLITTEDTRACKSCREATOR_H
 
 
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "TrkTrack/TrackCollection.h"
 
@@ -25,7 +25,7 @@ namespace InDet {
 */
   class IInDetTrackSplitterTool;
 
-class InDetSplittedTracksCreator : public AthAlgorithm {
+class InDetSplittedTracksCreator : public AthReentrantAlgorithm {
 public:
     /** Standard Athena-Algorithm Constructor */
     InDetSplittedTracksCreator(const std::string& name, ISvcLocator* pSvcLocator);
@@ -35,15 +35,15 @@ public:
     /** standard Athena-Algorithm method */
     StatusCode          initialize();
     /** standard Athena-Algorithm method */
-    StatusCode          execute();
+    StatusCode execute_r(const EventContext& ctx) const;
     /** standard Athena-Algorithm method */
     StatusCode          finalize();
 
 private:
     /**  holds the name of the track coll to be used*/
-    std::string                            m_TrackCol;
+    SG::ReadHandleKey<TrackCollection>     m_TrackCol;
     /**  holds the names the output track collection written to store gate*/
-    std::string                            m_OutputTrackCol;
+    SG::WriteHandleKey<TrackCollection>    m_OutputTrackCol;
     /** flag for using TRT standalone tracks **/
     //bool                                   m_makeTRTStandaloneTracks;
     /** flag for using si only tracks **/
@@ -55,10 +55,6 @@ private:
     /** instances of IInDet */
     ToolHandle< InDet::IInDetTrackSplitterTool >  m_trackSplitterTool;
 
-    /** member function to copy track collections */
-    void copyTrackCollection(const TrackCollection* inputTrackCol,TrackCollection* outputTrackCol); 
-    void copyTrackCollection(const TrackCollection* inputTrackCol_upper,const TrackCollection* inputTrackCol_lower,TrackCollection* outputTrackCol); 
-
 };
 
 } // close of namespace
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/PixelClusterValidationNtupleWriter.h b/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/PixelClusterValidationNtupleWriter.h
deleted file mode 100755
index a3aa103ded88a75a1245e6af4f328ae78cdb4632..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/PixelClusterValidationNtupleWriter.h
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//////////////////////////////////////////////////////////////////
-// PixelClusterValidationNtupleWriter.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// Aldo.Beati
- 
-#ifndef INDET_PIXELCLUSTERVALIDATIONNTUPLEWRITER_H
-#define INDET_PIXELCLUSTERVALIDATIONNTUPLEWRITER_H
-
-// Gaudi includes
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "InDetPrepRawData/PixelClusterContainer.h" // typedef
-#include "InDetSimEvent/SiHitCollection.h"          // typedef
-#include "InDetRawData/PixelRDO_Container.h"        // typedef
-#include "TrkTrack/TrackCollection.h"
-
-#include <vector>
-#include <string>
-
-// Constants to deal with diffenrent geometries.
-#define GEO_ATLAS 0
-#define GEO_IBL   1
-#define GEO_SLHC  2
-#define GEO_SLHC2  3
-
-#define ATLASPITCHY  0.4
-#define SLHCPITCHY  0.25
-#define IBLPITCHY  0.25
-#define SLHC2_PITCHY_A  0.15
-#define SLHC2_PITCHY_B  0.25
-
-
-
-
-class PixelID;
-class TTree;
-class SiHit;
-class IPixelOfflineCalibSvc;
-class IBeamCondSvc;
-class IGeoModelSvc;
-class IBLParameterSvc;
-
-
-namespace InDet {
-    //class SiHitCollection;
-
-/** @class Pixel_ClusterValidationNtupleWriter
- 
-   Validation Algorithm to retrieve a Pixel_ClusterContainer, loop over the entries and fill
-   the validation ntuple with RIO specific entries.
-   
-   @author Sebastian.Fleischmann@cern.ch
-//Aldo.Beati
-*/
-
-  struct NNinput
-  { 
-    int sizeX;
-    int sizeY;
-    std::vector<std::vector<float> > matrixOfToT;
-    std::vector<float> vectorOfPitchesY;
-    int ClusterPixLayer;
-    int ClusterPixBarrelEC;
-    float phi;
-    float theta;
-    float etaModule;
-    bool useTrackInfo;
-    int columnWeightedPosition;
-    int rowWeightedPosition;
-  };
-  
-  
-  
-class PixelClusterValidationNtupleWriter : public AthAlgorithm {
-public:
-    /** Standard Athena-Algorithm Constructor */
-    PixelClusterValidationNtupleWriter(const std::string& name, ISvcLocator* pSvcLocator);
-    /** Default Destructor */
-    ~PixelClusterValidationNtupleWriter();
-
-    /** standard Athena-Algorithm method */
-    StatusCode          initialize();
-    /** standard Athena-Algorithm method */
-    StatusCode          execute();
-    /** standard Athena-Algorithm method */
-    StatusCode          finalize();
-    
-    const SiHit * 	FindNextHit(const SiHit *, SiHitCollection::const_iterator);
-    int		FindAssociatedParticle(int, int, int);
-    std::vector<int> FindMultipleAssociatedParticle(int, int, int);
-    
-private:
-    //    NNinput*  createInput(const InDet::PixelCluster , HepPoint3D  , double , double , int , int );
-
-    StatusCode fillClusterVector(const InDet::PixelCluster& cluster, IdentifierHash element_hash );
-
-    StatusCode createInput(const InDet::PixelCluster& pCluster,
-                     //    HepPoint3D & beamSpotPosition,
-                           Amg::Vector3D & beamSpotPosition,
-                         double & tanl,
-                         double & pitch_y,
-                         int sizeX=7,
-                         int sizeY=7);
-
-
-    const InDet::PixelClusterContainer*  m_riocontainer; //!< container of RIOs
-    const SiHitCollection* 	 	 m_hitcontainer; //!< container of HITs
-    const PixelRDO_Container* 		 m_rdocontainer; //!< container of RDOs
-    std::string m_jo_riocontainername;   		 //!< jobOption: name of container with RIOs
-    std::string m_jo_hitcontainername;   		 //!< jobOption: name of container with HITs
-    std::string m_jo_rdocontainername;  			 //!< jobOption: name of container with RDOs
-    std::string	m_jo_trackCollectionName;                 //!< jobOption: name of container with Tracks
-    bool m_jo_Hits;					 //!< jobOption: fill Pixel Geant4 hits information
-    bool m_jo_MC;					 //!< jobOption: associate Pixel Geant4 hits to clusters
-    bool m_jo_NotAssociated;				 //!< jobOption: fill not associated Pixel Geant4 hits info
-    bool m_jo_WriteDetailedPixelInformation;              //!< jobOption: fill pixel info: ToT, Charge, eta, phi, LVL1A
-    bool m_jo_NN;			 	   	 //!< jobOption: Write training NN ntuple 
-    bool m_jo_ToT;			 	   	 //!< jobOption: Write ToT instead of charge to the NN training ntuple 
-    bool m_jo_onTrack;                                    //!< jobOption: fill only for cluster on track
-    mutable const TrackCollection*        m_trackCollection;
-    bool                              m_IBLAbsent;
-    ServiceHandle<IBLParameterSvc>    m_IBLParameterSvc; 
-    ServiceHandle<IPixelOfflineCalibSvc> m_pixelCalib;
-    ServiceHandle<IBeamCondSvc> m_iBeamCondSvc;
-
-    std::string m_ntupleFileName;       //!< jobOption: Ntuple file name
-    std::string m_ntupleDirName;        //!< jobOption: Ntuple directory name
-    std::string m_ntupleTreeName;       //!< jobOption: Ntuple tree name
-    std::string m_ntupleNNTreeName;       //!< jobOption: Ntuple tree name
-
-    const PixelID* m_pixelid;           //   Pixel ID helper
-    
-    //! Pointer to the NTuple tree
-    TTree* m_nt;
-    TTree* m_nnt;
-
-    // --- Contans Geometry
-    int m_geoId;    //!< Geometry ID (see defines in header).
-    float m_pitchY; //!< default y pitch.
-    // Number of layers to flip in SLHC 
-    int m_slhc_layer_flip_1;
-    int m_slhc_layer_flip_2;
-    int m_slhc_layer_flip_3;
-
-    // --- ntuple items ---
-    long m_eventNumber;      //!< current event number
-    long m_pixClusNum;       //!< number of pixel clusters per event
-    long m_nRIOs;
-
-    long m_lvl1TriggerType;  //!< Level1 Trigger type (stream) UNIT:8-bit
-
-    /// Access to GeoModelSvc for tags
-    IGeoModelSvc* m_geoModel;   
-    
-    std::vector<float>*   m_PixClusLocX;      //!< Local X coordinate of the cluster (digital position) UNIT:mm
-    std::vector<float>*   m_PixClusLocY;      //!< Local Y coordinate of the cluster (digital position) UNIT:mm
-    std::vector<float>*   m_PixClusLocXcentroid; //!< Local X coordinate of the cluster (centroid) UNIT:mm
-    std::vector<float>*   m_PixClusLocYcentroid; //!< Local Y coordinate of the cluster (centroid) UNIT:mm
-    std::vector<float>*   m_PixClusLocX_LorentzCorrection; //!< Lorentz Correction of the Local X coordinate of the cluster UNIT:mm
-    std::vector<float>*   m_PixClusGloX;      //!< Global X of surface centre of the cluster UNIT:mm
-    std::vector<float>*   m_PixClusGloY;      //!< Global Y of surface centre of the cluster UNIT:mm
-    std::vector<float>*   m_PixClusGloZ;      //!< Global Z of surface centre of the cluster UNIT:mm
-    std::vector<float>*   m_PixClusEta;       //!< Global eta position of the cluster 
-    std::vector<float>*   m_PixClusPhi;       //!< Global phi position of the cluster 
-    std::vector<float>*   m_PixECBarrel;      //!< Barrel/EndCap index (-2 for endcapC, 2 for endcapA, 0 for barrel) UNIT:index
-    std::vector<float>*   m_PixClusLayer;     //!< Layer information (0, 1 or 2) UNIT:index
-    std::vector<float>*   m_PixEtaModule;     //!< Eta index of the module with cluster UNIT:index
-    std::vector<float>*   m_PixPhiModule;     //!< Phi index of the module with cluster UNIT:index
-    std::vector<float>*   m_PixClusGroupsize; //!< Number of pixels in the clusters UNIT:cells
-    std::vector<float>*   m_PixClusRow;       //!< Row index of the first pixel of the cluster UNIT:index 
-    std::vector<float>*   m_PixClusCol;       //!< Cloumn index of the first pixel of the cluster UNIT:index
-    std::vector<int>*     m_PixDeltaRow;      //!< Row width of the cluster UNIT:cells
-    std::vector<int>*     m_PixDeltaCol;      //!< Column width of the cluster UNIT:cells
-    std::vector<float>*   m_PixOmegaPhi;      //!< Charge sharing variable, phi direction 
-    std::vector<float>*   m_PixOmegaEta;      //!< Charge sharing variable, eta direction 
-    std::vector<int>*     m_PixClusToT;       //!< Time over Threshold of the cluster 
-    std::vector<float>*   m_PixClusCharge;    //!< Total charge of the cluster UNIT:electrons
-    std::vector<int>*     m_PixClusLvl1;      //!< Level 1 accept of the cluster 
-    std::vector<int>*     m_PixClusGanged;    //!< If the cluster contains ganged pixels (1:yes)
-    std::vector<int>*     m_PixClusFake;      //!< If the cluster is flagged as fake (1:yes)
-    std::vector<int>*     m_PixClusAmbiguous; //!< If the cluster is ambiguous (1:yes)
-    std::vector<float>*   m_PixClusLocXana;   //!< Local X coordinate of the cluster (analog position) UNIT:mm
-    std::vector<float>*   m_PixClusLocYana;   //!< Local Y coordinate of the cluster (analog position) UNIT:mm
-    std::vector<float>*   m_PixClusErrX;      //!< Precise parameterized error on local X coordinate of the cluster UNIT:mm
-    std::vector<float>*   m_PixClusErrY;      //!< Precise parameterized error on local Y coordinate of the cluster UNIT:mm
-    std::vector<std::vector<int> >* m_PixClusEtaIndex; //!< Individual pixel column index (eta direction) UNIT:index
-    std::vector<std::vector<int> >* m_PixClusPhiIndex; //!< Individual pixel row index (phi direction) UNIT:index
-    std::vector<std::vector<float> >* m_PixClusChargeList; //!< Charge of the pixel UNIT:electrons 
-    std::vector<std::vector<int> >* m_PixClusToTList; //!< Time over Threshold of the pixel
-    std::vector<std::vector<int> >* m_PixClusLVL1AList; //!< Level 1 accept of the pixel
-    std::vector<int>*     m_PixClusIsSplit;   //!< If the cluster is splitted by NN cluster   (1:yes)
-    std::vector<float>*   m_PixClusSplitProb1;//!< Probability of being 1  particle cluster  
-    std::vector<float>*   m_PixClusSplitProb2;//!< Probability of being >1 particle cluster
-
-
-    long m_pixHitsNum;  //!< number of Geant4 hits strings simulated for current event 
-    std::vector<float>*	  m_PixHitXstartpos; 	//!< Local X position of the starting point of the Geant4 hit UNIT:mm
-    std::vector<float>*	  m_PixHitYstartpos; 	//!< Local Y position of the starting point of the Geant4 hit UNIT:mm
-    std::vector<float>*	  m_PixHitZstartpos; 	//!< Local Z position of the starting point of the Geant4 hit UNIT:mm
-    std::vector<float>*	  m_PixHitXendpos;   	//!< Local X position of the ending point of the Geant4 hit UNIT:mm
-    std::vector<float>*	  m_PixHitYendpos;   	//!< Local Y position of the ending point of the Geant4 hit UNIT:mm
-    std::vector<float>*	  m_PixHitZendpos;   	//!< Local Z position of the ending point of the Geant4 hit UNIT:mm
-    std::vector<int>*	  m_PixHitBarrelEndcap; //!< Barrel/EndCap index (-2 for endcapC, 2 for endcapA, 0 for barrel) UNIT:index
-    std::vector<int>*	  m_PixHitLayerDisk; 	//!< Layer information (0, 1 or 2) UNIT:index
-    std::vector<int>*	  m_PixHitEtaModule; 	//!< Eta index of the module with G4 hit UNIT:index
-    std::vector<int>*	  m_PixHitPhiModule; 	//!< Phi index of the module with G4 hit UNIT:index
-    std::vector<int>*     m_PixHitEtaIndex;  	//!< G4 hit position converted into pixel column index (eta direction) UNIT:index
-    std::vector<int>*     m_PixHitPhiIndex;  	//!< G4 hit position converted into pixel row index (phi direction) UNIT:index
-    std::vector<float>*   m_PixHitAngle;     	//!< G4 hit incidence angle in phi direction UNIT:rad
-    std::vector<float>*   m_PixHitAngle2;    	//!< G4 hit incidence angle in eta direction UNIT:rad
-    std::vector<float>*   m_PixHitAngle_Lorcorr;//!< G4 hit corrected incidence angle UNIT:rad
-    std::vector<float>*   m_PixHitEnergyLoss;	//!< G4 hit total energy loss UNIT:GeV
-    std::vector<float>*   m_PixHitTime;      	//!< G4 hit arrival time UNIT:ns
-    std::vector<int>*     m_PixHitPDGParticle; 	//!< G4 hit particle PDG code 
-    std::vector<int>*	  m_PixHitFlag;      	//!< G4 hit flag
-    std::vector<int>*	    m_PixHitBarcode;      	//!< G4 hit flag
-    std::vector<float>*   m_PixHitParticleP;
-//    std::vector<int>*     m_PixHitEtaIndex_delta;
-//    std::vector<int>*     m_PixHitPhiIndex_delta;
-
-    std::vector<float>*   m_MC_Xpos;           //!< G4 hit associated to cluster local X position UNIT:mm
-    std::vector<float>*   m_MC_Ypos;           //!< G4 hit associated to cluster local Y position UNIT:mm
-    std::vector<float>*   m_MC_IncidentAngle;  //!< G4 hit associated to cluster incidence angle in phi direction UNIT:rad
-    std::vector<float>*   m_MC_IncidentAngle2; //!< G4 hit associated to cluster incidence angle in eta direction UNIT:rad
-    std::vector<float>*   m_MC_IncidentAngle_Lorcorr; //!< MC_IncidentAngle corrected for the Lorentz angle UNIT:rad
-    std::vector<float>*   m_MC_EnergyLoss;     //!< G4 hit associated to cluster total energy loss UNIT:GeV
-    std::vector<float>*   m_MC_Time; 	       //!< G4 hit associated to cluster arrival time UNIT:ns
-    std::vector<int>*     m_MC_PDGParticle;    //!< G4 hit associated to cluster particle PDG code 
-    std::vector<int>*     m_MC_Flag; 	       //!< G4 hit associated to cluster flag 
-    std::vector<int>*     m_MC_Barcode;      //!< G4 hit associated to cluster particle PDG code 
-    std::vector<float>*   m_MC_Momentum;      //!< G4 hit associated to cluster particle PDG code 
-
-    std::vector<float>*   m_NotAssociated_Xpos;  	  //!< Local X position of G4 hit not associated to any cluster UNIT:mm
-    std::vector<float>*   m_NotAssociated_Ypos; 	  //!< Local Y position of G4 hit not associated to any cluster UNIT:mm
-    std::vector<int>*     m_NotAssociated_BarrelEndcap;	  //!< Barrel/EndCap index (-2 for endcapC, 2 for endcapA, 0 for barrel) UNIT:index
-    std::vector<int>*     m_NotAssociated_LayerDisk; 	  //!< Layer information (0, 1 or 2) UNIT:index
-    std::vector<int>*     m_NotAssociated_EtaModule; 	  //!< Eta index of the module with not associated G4 hit UNIT:index
-    std::vector<int>*     m_NotAssociated_PhiModule; 	  //!< Phi index of the module with not associated G4 hit UNIT:index
-    std::vector<float>*   m_NotAssociated_IncidentAngle;  //!< Not associated G4 hit incidence angle in phi direction UNIT:rad
-    std::vector<float>*   m_NotAssociated_IncidentAngle2; //!< Not associated G4 hit incidence angle in eta direction UNIT:rad
-    std::vector<float>*   m_NotAssociated_IncidentAngle_Lorcorr; //!< NotAssociated_IncidentAngle corrected for the Lorentz angle UNIT:rad
-    std::vector<float>*	  m_NotAssociated_EnergyLoss; 	  //!< Not associated G4 hit total energy loss UNIT:GeV 
-    std::vector<float>*   m_NotAssociated_Time; 	  //!< Not associated G4 hit arrival time UNIT:ns
-    std::vector<int>*     m_NotAssociated_PDGParticle; 	  //!< Not associated G4 hit particle PDG code  
-    std::vector<int>*     m_NotAssociated_Flag; 	  //!< Not associated G4 hit flag
-
-    std::vector<std::vector<int> >*     m_MultipleAssociated_Index; 	  //!< Not associated G4 hit flag
-
-    //  Variables for NN training
-    
-    std::vector<int>* m_NN_sizeX; //!< Row width of the cluster UNIT:cells
-    std::vector<int>* m_NN_sizeY; //!< Column width of the cluster UNIT:cells
-    //   std::vector<std::vector<std::vector<float> > >* m_NN_matrixOfToT;
-    std::vector<std::vector<float> >* m_NN_matrixOfToT;
-    std::vector<std::vector<float> >* m_NN_vectorOfPitchesY;
-    std::vector<int>* m_NN_ClusterPixLayer;
-    std::vector<int>* m_NN_ClusterPixBarrelEC;
-    std::vector<float>* m_NN_phiBS;
-    std::vector<float>* m_NN_thetaBS;
-    std::vector<float>* m_NN_etaModule;
-    std::vector<bool>* m_NN_useTrackInfo;
-    std::vector<int>* m_NN_columnWeightedPosition;
-    std::vector<int>* m_NN_rowWeightedPosition;
- 
-    std::vector<double>* m_NN_localColumnWeightedPosition;
-    std::vector<double>* m_NN_localRowWeightedPosition;
-
-
-    std::vector<std::vector<float> >* m_NN_positionX;
-    std::vector<std::vector<float> >* m_NN_positionY;
-    std::vector<std::vector<float> >* m_NN_position_idX;
-    std::vector<std::vector<float> >* m_NN_position_idY;
-
-    std::vector<std::vector<float> >* m_NN_theta;
-    std::vector<std::vector<float> >* m_NN_phi;
-    
-    
-    std::vector<std::vector<int> >* m_NN_pdgid;
-    std::vector<std::vector<int> >* m_NN_barcode;
-
-    std::vector<std::vector<float> >* m_NN_momentum;
-    std::vector<std::vector<float> >* m_NN_distanceX;
-    std::vector<std::vector<float> >* m_NN_distanceY;
-
-
-    Amg::Vector2D GetDigitalPosition(const InDet::PixelCluster*& pix,
-			                  const InDetDD::SiDetectorElement*& EL) const;
-
-   			
-};
-
-} // close of namespace
-
-#endif // INDET_PIXELCLUSTERVALIDATIONNTUPLEWRITER_H
-
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/SiResidualValidationNtupleHelper.h b/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/SiResidualValidationNtupleHelper.h
deleted file mode 100755
index 0d091d9bbad9849d205cfd51216e9dc3f2d51b3c..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/SiResidualValidationNtupleHelper.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//////////////////////////////////////////////////////////////////
-// SiResidualValidationNtupleHelper.h
-//   Header file for SiResidualValidationNtupleHelper
-///////////////////////////////////////////////////////////////////
-// (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// Sebastian.Fleischmann@cern.ch
-///////////////////////////////////////////////////////////////////
-
-#ifndef INDET_SIRESIDUALVALIDATIONNTUPLEHELPER_H
-#define INDET_SIRESIDUALVALIDATIONNTUPLEHELPER_H
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "TrkValInterfaces/IValidationNtupleHelperTool.h"
-#include "InDetRawData/PixelRDO_Container.h"        // typedef
-
-class TTree;
-class AtlasDetectorID;
-class PixelID;
-class SCT_ID;
-class ISiliconConditionsSvc;
-template <class Svc> class ServiceHandle;
-namespace InDetDD{
-    class SiDetectorElement;
-}
-namespace Trk{
-    class MeasurementBase;
-}
-
-
-namespace InDet {
-    class PixelCluster;
-
-/** @class SiResidualValidationNtupleHelper
-    This validation helper tool writes Pixel and SCT specific data into the ntuple
-    @author Sebastian.Fleischmann@cern.ch
-*/
-
-class SiResidualValidationNtupleHelper : virtual public Trk::IValidationNtupleHelperTool, public AthAlgTool {
-
-    public:
-        // standard AlgToolmethods
-        SiResidualValidationNtupleHelper(const std::string&,const std::string&,const IInterface*);
-        ~SiResidualValidationNtupleHelper();
-
-        // standard Athena methods
-        StatusCode initialize();
-        StatusCode finalize();
-
-        // fill data
-        virtual StatusCode fillMeasurementData (const Trk::MeasurementBase*,
-                const Trk::TrackParameters*, const int& detectorType,
-                const bool& isOutlier) const;
-        virtual StatusCode fillHoleData (const Trk::TrackStateOnSurface& tsos,
-                const int& detectorType) const;
-
-        // add items to the ntuple and configure the helper tool:
-        // should be called once (per detector type)
-        // by the steering tool (Trk::IValidationNtupleTool)
-        virtual StatusCode addNtupleItems (
-                TTree* tree,
-                const int& detectorType ) const;
-
-        // reset ntuple variables
-        virtual StatusCode resetVariables (const int& detectorType ) const;
-
-    private:
-	// variables
-	const PixelID* m_pixelid;                   //!< pixel id helper
-	const SCT_ID*  m_sctid;                     //!< SCT id helper
-	bool m_WriteDetailedPixelInformation;       //!< jobOption: fill pixel info: ToT, Charge, LVL1A, eta, phi
-	std::string m_rdocontainername;  	    //!< jobOption: name of container with RDOs
-        mutable const PixelRDO_Container* m_rdocontainer;   //!< container of pixel RDO (used by if pixel detailed information is requested)  
-
-
-	ServiceHandle< ISiliconConditionsSvc > m_PixelConditionsSvc; // pixel conditions
-
-        // --- ntuple items. Please document here so they can be automatically parsed for doxygen/wiki tables ---
-	mutable std::vector<int>*   m_PixDetType; //!< Layer information (0, 1, 2 for barrel, 100, 101, 102 for endcap A side, -100, -101, -102 for endcap C side) it is 0 by default 
-	mutable std::vector<int>*   m_PixHasGanged; //!< if the cluster contains ganged pixels UNIT:1:yes
-	mutable std::vector<int>*   m_PixIsFake;   //!< if the cluster is marked as fake UNIT:1:yes
-	mutable std::vector<int>*   m_PixIsSplit;   //!< if the cluster is marked as split UNIT:1:yes
-	mutable std::vector<float>* m_PixSplitProb1;//!< probability to be a single particle cluster
-	mutable std::vector<float>* m_PixSplitProb2;//!< probability to be a double particle cluster
-	mutable std::vector<int>*   m_PixLVL1A;    //!< lower level1 accept among the pixel of the cluster 
-	mutable std::vector<int>*   m_PixToT;      //!< ToTal time over threshold (ToT) of the cluster UNIT:??
-	mutable std::vector<float>* m_PixCharge;   //!< total charge of the cluster UNIT:??
-	mutable std::vector<float>* m_PixTLorPhi;  //!< tangent of the lorentz angle (local x direction) UNIT:1
-	mutable std::vector<float>* m_PixTLorEta;  //!< tangent of the lorentz angle (local y direction - should be 0!) UNIT:1
-	mutable std::vector<float>* m_PixBiasVolt; //!< Bias voltage (from conditions service) UNIT:V ?
-	mutable std::vector<float>* m_PixTemp;     //!< Temperature (from conditions service) UNIT:K ?
-	mutable std::vector<float>* m_PixDepVolt;  //!< Depletion voltage (from conditions service) UNIT:kV?
-	mutable std::vector<float>* m_PixDigResPhi; //!< local phi residual obtained using the cluster digital coordinates UNIT:mm
-	mutable std::vector<float>* m_PixDigResEta; //!< local eta residual obtained from using the cluster digital coords UNIT:mm
-	mutable std::vector<float>* m_PixErrPhi;    //!< PixelCluster position error (local x) UNIT:mm
-	mutable std::vector<float>* m_PixErrEta;    //!< PixelCluster position error (local y) UNIT:mm
-	mutable std::vector<float>* m_PixEta;       //!< pseudorapidity calculated from module position
-	mutable std::vector<float>* m_PixGloX;      //!< global X position of the cluster UNIT:mm
-	mutable std::vector<float>* m_PixGloY;      //!< global Y position of the cluster UNIT:mm
-	mutable std::vector<float>* m_PixGloZ;      //!< global Z position of the cluster UNIT:mm
-	mutable std::vector<float>* m_PixLocX;      //!< local x coordinate of the cluster UNIT:mm
-	mutable std::vector<float>* m_PixLocY;      //!< local y coordinate of the cluster UNIT:mm
-	mutable std::vector<int>*   m_PixEtaModule; //!< eta index of the module associated to the cluster
-	mutable std::vector<int>*   m_PixPhiModule; //!< phi index of the module associated to the cluster
-	mutable std::vector<float>* m_PixFirstRow;  //!< lower row of the pixels contained in the cluster UNIT:index
-	mutable std::vector<float>* m_PixFirstCol;  //!< lower column of the pixels contained in the cluster UNIT:index
-	mutable std::vector<float>* m_PixDeltaPhi;  //!< Pixel cluster size phi, in cell units UNIT:cells
-	mutable std::vector<float>* m_PixDeltaEta;  //!< Pixel cluster size eta, in cell units UNIT:cells
-	mutable std::vector<int>*   m_PixDeltaRow;  //!< Pixel cluster size phi or row UNIT:mm 
-	mutable std::vector<int>*   m_PixDeltaCol;  //!< Pixel cluster size eta or column UNIT:mm
-	mutable std::vector<float>* m_PixOmegaPhi;  //!< Pixel charge sharing variable, phi clustering UNIT:1
-	mutable std::vector<float>* m_PixOmegaEta;  //!< Pixel charge sharing variable, eta clustering UNIT:1
-	mutable std::vector<float>* m_PixTrkAngle;  //!< track incidence angle on the module (rphi plane) in local reference frame UNIT:rad
-	mutable std::vector<float>* m_PixTrkThetaI; //!< track incidence angle on the module (eta-normal plane) in local reference frame UNIT:rad
-	mutable std::vector<float>* m_PixTrkEta;    //!< track incidence pseudorapidity in local module reference frame
-	mutable std::vector<float>* m_PixTrkPt;     //!< track transverse momentum at module
-	mutable std::vector<float>* m_PixTrkQ;      //!< charge of the associated track UNIT:+/-1
-	mutable std::vector<float>* m_PixTrkClusGroupSize;  //!< total size of the cluster UNIT:cells
-	mutable std::vector<std::vector<float> >* m_PixChargeList;//!< Charge of the pixel UNIT:electrons 
-	mutable std::vector<std::vector<int> >*   m_PixToTList; //!< Time over Threshold of the pixel
-	mutable std::vector<std::vector<int> >*   m_PixLVL1AList; //!< Level 1 accept of the pixel
-	mutable std::vector<std::vector<int> >*   m_PixEtaIndex; //!< Cluster position converted into pixel column index (eta direction) UNIT:index
-	mutable std::vector<std::vector<int> >*   m_PixPhiIndex; //!< Cluster position converted into pixel row index (phi direction) UNIT:index
-
-        // --- ntuple items for Pixel Holes - modules with hits not on track ---
-	mutable std::vector<float>*  m_PixHoleGloX;  //!< global X position of the hole UNIT:mm
-	mutable std::vector<float>*  m_PixHoleGloY;  //!< global Y position of the hole UNIT:mm
-	mutable std::vector<float>*  m_PixHoleGloZ;  //!< global Z position of the hole UNIT:mm
-	mutable std::vector<float>*  m_PixHoleLocX;  //!< local x position of the hole on the module UNIT:mm
-	mutable std::vector<float>*  m_PixHoleLocY;  //!< local y position of the hole on the module UNIT:mm
-	mutable std::vector<int>*    m_PixHoleEtaModule;//!< eta index of the module containing the hole
-	mutable std::vector<int>*    m_PixHolePhiModule; //!< phi index of the module containing the hole
-	mutable std::vector<float>*  m_PixHoleLayer; //!< layer index of the module containing the hole
-	mutable std::vector<float>*  m_PixHoleECBarrel;      //!< barrel/endcap flag for the hole
-	mutable std::vector<int>*    m_PixHoleClNearstSize;  //!< total size of the nearest cluster to the hole UNIT:cells
-	mutable std::vector<float>*  m_PixHoleLocXClNearst;  //!< nearest cluster local x UNIT:mm
-	mutable std::vector<float>*  m_PixHoleLocYClNearst;  //!< nearest cluster local x UNIT:mm
-	mutable std::vector<float>*  m_PixHoleClRowClNearst; //!< row index of the nearest cluster
-	mutable std::vector<float>*  m_PixHoleClColClNearst; //!< column index of the nearest cluster
-	mutable std::vector<float>*  m_PixHoleGloZNearst;    //!< global z of the nearest cluster
-	mutable std::vector<float>*  m_PixHoleDeltaRowNearst;//!< nearest cluster size, in cell units UNIT:cells
-	mutable std::vector<float>*  m_PixHoleDeltaColNearst;//!< nearest cluster size, in cell units UNIT:cells
-
-        // --- ntuple items for SCT clusters on track ---
-	mutable std::vector<int>*   m_SctDetType;   //!< detector part (0 for barrel, +/-2 for endcaps)
-	mutable std::vector<int>*   m_SctLayerDisk; //!< index of layer or disk containing the cluster
-	mutable std::vector<int>*   m_SctEtaModule; //!< eta index of module containing the cluster
-	mutable std::vector<int>*   m_SctPhiModule; //!< phi index of module containing the cluster
-	mutable std::vector<int>*   m_SctSide;      //!< side of module containing the cluster
-	mutable std::vector<float>* m_SctTLorPhi;   //!< tangent of the lorentz angle (local x direction) UNIT:1
-	mutable std::vector<float>* m_SctTLorEta;   //!< tangent of the lorentz angle (local y direction, should be 0) UNIT:1
-	mutable std::vector<float>* m_SctEta;       //!< pseudorapidity calculated from module position
-	mutable std::vector<float>* m_SctDeltaPhi;  //!< SCT cluster size in strip units UNIT:strips
-	mutable std::vector<float>* m_SctLocX;      //!< Local X of track
-        mutable std::vector<float>* m_SctLocY;      //!< Local Y of track
-	mutable std::vector<float>* m_SctIncAng;    //!< incidence angle in plane perp. to strip direction
-	mutable std::vector<float>* m_SctTrkAngle;  //!< track incidence angle on the module in local reference frame UNIT:rad
-	mutable std::vector<float>* m_SctTrkQ;      //!< reconstructed track charge
-	mutable std::vector<float>* m_SctErr;       //!< ClusterOnTrack's error in local X coordinate UNIT:mm
-	mutable std::vector<float>* m_SctTrkClusGroupSize; //!< SCT total cluster size
-
-	mutable long m_lvl1TriggerType;  //!< level1 trigger stream type UNIT:8-bit
-
-	// methods
-	double calcPull( const double residual, const double locMesCov,
-			const double locTrkCov ) const;
-
-	Amg::Vector2D GetDigitalPosition(const InDet::PixelCluster*& pix,
-			const InDetDD::SiDetectorElement*& EL) const;
-
-	int findAnglesToWaferSurface ( double (&vec)[3], double &sinAlpha, 
-				       const InDetDD::SiDetectorElement*& element, double &theta, double &phi ) const; 
-
-
-};
-
-
-} // end of namespace
-
-#endif // INDET_SIRESIDUALVALIDATIONNTUPLEHELPER_H
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/TRT_DriftCircleValidationNtupleWriter.h b/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/TRT_DriftCircleValidationNtupleWriter.h
deleted file mode 100755
index c7e292593c0d1c384951ce166b80c5ea49fe1833..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/TRT_DriftCircleValidationNtupleWriter.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//////////////////////////////////////////////////////////////////
-// TRT_DriftCircleValidationNtupleWriter.h, (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-
-#ifndef INDET_TRT_DRIFTCIRCLEVALIDATIONNTUPLEWRITER_H
-#define INDET_TRT_DRIFTCIRCLEVALIDATIONNTUPLEWRITER_H
-
-// Gaudi includes
-#include "AthenaBaseComps/AthAlgorithm.h"
-
-#include <vector>
-#include <string>
-
-#include "InDetPrepRawData/TRT_DriftCircleContainer.h" // typedef
-
-//class AtlasDetectorID;
-class TTree;
-
-namespace InDet {
-
-/** @class TRT_DriftCircleValidationNtupleWriter
- 
-   Validation Algorithm to retrieve a TRT_DriftCircleContainer, loop over the entries and fill
-   the validation ntuple with RIO specific entries.
-   
-   @author Sebastian.Fleischmann@cern.ch
-*/
-
-class TRT_DriftCircleValidationNtupleWriter : public AthAlgorithm {
-public:
-    /** Standard Athena-Algorithm Constructor */
-    TRT_DriftCircleValidationNtupleWriter(const std::string& name, ISvcLocator* pSvcLocator);
-    /** Default Destructor */
-    ~TRT_DriftCircleValidationNtupleWriter();
-
-    /** standard Athena-Algorithm method */
-    StatusCode          initialize();
-    /** standard Athena-Algorithm method */
-    StatusCode          execute();
-    /** standard Athena-Algorithm method */
-    StatusCode          finalize();
-
-private:
-
-    const InDet::TRT_DriftCircleContainer*  m_riocontainer; //!< container of RIOs
-    std::string mjo_riocontainername; //!< jobOption: name of container with RIOs
-    std::string m_ntupleFileName;       //!< jobOption: Ntuple file name
-    std::string m_ntupleDirName;        //!< jobOption: Ntuple directory name
-    std::string m_ntupleTreeName;       //!< jobOption: Ntuple tree name
-
-    // pointer to the NTuple tree
-    TTree* m_nt;
-
-    int                 m_eventNumber; //!< event number
-    int                 m_nRIOs;       //!< number of driftcircles in current event. This variable set the size of the vectors with driftcircle information.
-
-    std::vector<float>* m_rioLoc1;     //!< measured drift radius UNIT:mm
-    std::vector<float>* m_rioSurfaceX; //!< global X coordinate of straw centre position
-    std::vector<float>* m_rioSurfaceY; //!< global Y coordinate of straw centre position
-    std::vector<float>* m_rioSurfaceZ; //!< global Z coordinate of straw centre position
-
-
-};
-
-} // close of namespace
-
-#endif // INDET_TRT_DRIFTCIRCLEVALIDATIONNTUPLEWRITER_H
-
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/TRT_DriftTimeNtupleHelper.h b/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/TRT_DriftTimeNtupleHelper.h
deleted file mode 100755
index 2dc22c9b3feea34ad6932a654b8358239a7071bb..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetValidation/InDetTrackValidation/InDetTrackValidation/TRT_DriftTimeNtupleHelper.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//////////////////////////////////////////////////////////////////
-// TRT_DriftTimeNtupleHelper.h
-//   Header file for TRT_DriftTimeNtupleHelper
-///////////////////////////////////////////////////////////////////
-// (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// John.Alison@cern.ch Sebastian.Fleischmann@cern.ch
-///////////////////////////////////////////////////////////////////
-
-#ifndef INDET_TRT_DRIFTTIMENTUPLEHELPER_H
-#define INDET_TRT_DRIFTTIMENTUPLEHELPER_H
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "TrkValInterfaces/IValidationNtupleHelperTool.h"
-#include "TrkParameters/TrackParameters.h"
-
-class AtlasDetectorID;
-class MeasurementBase;
-class TRT_ID;
-class TTree;
-class ITRT_CalDbSvc;
-class ITRT_StrawNeighbourSvc;
-
-namespace InDet {
-
-
-/** @class TRT_DriftTimeNtupleHelper
-    This validation helper tool writes TRT drift circle data into the ntuple.
-    The ntuple variables contain the drift time, the local hit and track positions,
-    a highlevel indicator and information about the straw hit. This helper tool can be called by
-    the Trk::BasicValidationNtupleTool.
-    @author Sebastian.Fleischmann@cern.ch
-*/
-
-class TRT_DriftTimeNtupleHelper : virtual public Trk::IValidationNtupleHelperTool, public AthAlgTool {
-public:
-
-    // standard AlgToolmethods
-    TRT_DriftTimeNtupleHelper(const std::string&,const std::string&,const IInterface*);
-    ~TRT_DriftTimeNtupleHelper();
-
-    // standard Athena methods
-    StatusCode initialize();
-    StatusCode finalize();
-
-    /** fill drift time data */
-    virtual StatusCode fillMeasurementData (
-        const Trk::MeasurementBase*,
-        const Trk::TrackParameters*,
-        //const NTuple::Item<long>& numberOfHits,
-        //const std::bitset<8>& detectorType
-        const int& detectorType,
-        const bool& isOutlier ) const;
-
-    /** fill special data about holes on track (here: do nothing) */
-    virtual StatusCode fillHoleData (
-        const Trk::TrackStateOnSurface&,
-        const int& ) const;
-
-
-    /** add items to the ntuple and configure the helper tool:
-    should be called once (per detector type) by the steering tool (Trk::IValidationNtupleTool) */
-    virtual StatusCode addNtupleItems (
-        TTree* tree,
-        const int& detectorType ) const;
-
-    /** reset ntuple variables */
-    virtual StatusCode resetVariables (
-        const int& detectorType ) const;
-
-private:
-
-    const TRT_ID* m_trtID; //!< the TRT ID helper
-    
-    ServiceHandle<ITRT_CalDbSvc> m_trtCondDbSvc; //!< the TRT cond DB svc, get the t0.
-    ServiceHandle<ITRT_StrawNeighbourSvc> m_TRTStrawNeighbourSvc; //!< the TRT cond DB svc, get the pad and chip.
-
-    // --- ntuple items. Document here to allow description to enter doxygen and wiki ---
-    mutable std::vector<float>* m_Trt_R;   //!< measured TRT drift radius UNIT:mm
-    mutable std::vector<float>* m_Trt_R_Err;   //!< err TRT drift radius UNIT:mm
-    mutable std::vector<float>* m_Trt_Rtrack; //!< local track position of the track fit in the drift circle's coordinate system UNIT:mm
-    mutable std::vector<float>* m_Trt_Rtrack_Err; //!< Error on the local track position of the track fit in the drift circle's coordinate system UNIT:mm
-    mutable std::vector<float>* m_Trt_DTtrack; //!< Drift time prediction (using r(t) relation) based on local track fit position  UNIT:ns
-    mutable std::vector<float>* m_Trt_t;   //!< TRT raw drift time (value -999.0 if not valid) UNIT:ns
-    mutable std::vector<float>* m_Trt_tot; //!< TRT time over threshold UNIT:ns
-    mutable std::vector<unsigned int>* m_Trt_bitpattern; //<! TRT bitted word from DAW UNIT:32-bit
-    mutable std::vector<int>*   m_Trt_HL;  //!< TRT high-level threshold flag for TR hits UNIT:1:HL, 0:low
-    mutable std::vector<int>*   m_Trt_strawlayer; //!< layer index of the straw, from TRT IdHelper (see also InDetIdentifier documentation)
-    mutable std::vector<int>*   m_Trt_layer; //!< module index of the meas't, from TRT IdHelper
-    mutable std::vector<int>*   m_Trt_straw; //!< straw index inside layer, from TRT IdHelper
-    mutable std::vector<int>*   m_Trt_phi;   //!< phi module index, from TRT IdHelper
-    mutable std::vector<int>*   m_Trt_bec;   //!< pos/neg barrel (+/-1) or pos/neg endcap (+/-2) UNIT:1:bar, 2:ec
-    mutable std::vector<int>*   m_Trt_chip;  //!< the chip on which the hit is 
-    mutable std::vector<int>*   m_Trt_pad;   //!< the HV pad on which the hit is 
-
-};
-
-
-} // end of namespace
-
-#endif // INDET_TRT_DRIFTTIMENTUPLEHELPER_H
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/doc/packagedoc.h b/InnerDetector/InDetValidation/InDetTrackValidation/doc/packagedoc.h
index 4f25cc04afc20e1e1fdc46eed195b383d70ab5a5..6c3f07783c60fe4b61d83009efae58d55ef885ff 100644
--- a/InnerDetector/InDetValidation/InDetTrackValidation/doc/packagedoc.h
+++ b/InnerDetector/InDetValidation/InDetTrackValidation/doc/packagedoc.h
@@ -17,309 +17,8 @@ for the calculation of SCT residuals and pulls.
 @section InDetTrackValidation_InDetTrackValidationOverview Class Overview
   The InDetTrackValidation package contains the following classes:
 
-  - InDet::PixelClusterValidationNtupleWriter : Algorithm to write Pixel cluster (PRD) data to ntuple
   - InDet::SCT_ClusterValidationNtupleWriter : Algorithm to write SCT cluster (PRD) data to ntuple
-  - InDet::TRT_DriftCircleValidationNtupleWriter : Algorithm to write TRT drift circle (PRD) data to ntuple
-  - InDet::SiResidualValidationNtupleHelper: Helper tool for Trk::BasicValidationNtupleTool 
-        which writes measurement data for Pixels and SCT (PRD data, digi, holes, etc)
-  - InDet::TRT_DriftTimeNtupleHelper : Helper tool for Trk::BasicValidationNtupleTool 
-        which writes measurement data for the TRT (i.e. data from InDet::TRT_DriftCircle and
-        InDet::TRT_DriftCircleOnTrack). See the documentation of the TrkValTools package
-        on how to use this helper tool.
-  - InDet::SCT_ResidualPullCalculator : Sub-detector specific tool for the Trk::ResidualPullCalculator.
-        For "artificially" two-dimensional SCT measurements (SCT endcap modules) the coordinates and
-        covariance matrices are rotated to return the residual perpendicular to the strip.
 
-@section InDetTrackValidation_WhichVariablesInDetTrackValidation List of the Ntuple variables
-This paragraph gives a short overview of the ntuple variables provided by the different tools
-
-@subsection PixelClusterWriterVariables Ntuple variables of the InDet::PixelClusterValidationNtupleWriter
-<table>
-<tr><td><b>PixelEventNumber</b></td>
-<td>current event number</td>
-<td><tt>long</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixelClusNum</b></td>
-<td>number of pixel clusters per event</td>
-<td><tt>long</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>LVL1TriggerType</b></td>
-<td>Level1 Trigger type (stream)</td>
-<td><tt>long</tt></td>
-<td>8-bit</td></tr>
-<tr><td><b>PixClusLocX</b></td>
-<td>Local X coordinate of the cluster (digital position)</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixClusLocY</b></td>
-<td>Local Y coordinate of the cluster (digital position)</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixClusGloX</b></td>
-<td>Global X of surface centre of the cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixClusGloY</b></td>
-<td>Global Y of surface centre of the cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixClusGloZ</b></td>
-<td>Global Z of surface centre of the cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixClusEta</b></td>
-<td>Global eta position of the cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixClusPhi</b></td>
-<td>Global phi position of the cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixECBarrel</b></td>
-<td>Barrel/EndCap index (-2 for endcapC, 2 for endcapA, 0 for barrel)</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixClusLayer</b></td>
-<td>Layer information (0, 1 or 2)</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixEtaModule</b></td>
-<td>Eta index of the module with cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixPhiModule</b></td>
-<td>Phi index of the module with cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixClusGroupsize</b></td>
-<td>Number of pixels in the clusters</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>cells</td></tr>
-<tr><td><b>PixClusRow</b></td>
-<td>Row index of the first pixel of the cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixClusCol</b></td>
-<td>Cloumn index of the first pixel of the cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixDeltaRow</b></td>
-<td>Row width of the cluster</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>cells</td></tr>
-<tr><td><b>PixDeltaCol</b></td>
-<td>Column width of the cluster</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>cells</td></tr>
-<tr><td><b>PixOmegaPhi</b></td>
-<td>Charge sharing variable, phi direction</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixOmegaEta</b></td>
-<td>Charge sharing variable, eta direction</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixClusToT</b></td>
-<td>Time over Threshold of the cluster</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixClusCharge</b></td>
-<td>Total charge of the cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>electrons</td></tr>
-<tr><td><b>PixClusLvl1</b></td>
-<td>Level 1 accept of the cluster</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixClusGanged</b></td>
-<td>If the cluster contains ganged pixels (1:yes)</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixClusFake</b></td>
-<td>If the cluster is flagged as fake (1:yes)</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixClusAmbiguous</b></td>
-<td>If the cluster is ambiguous (1:yes)</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixClusLocXana</b></td>
-<td>Local X coordinate of the cluster (analog position)</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixClusLocYana</b></td>
-<td>Local Y coordinate of the cluster (analog position)</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b></b></td>
-<td>Cluster position converted into pixel column index (eta direction)</td>
-<td><tt>std::vector&lt;std::vector<int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b></b></td>
-<td>Cluster position converted into pixel row index (phi direction)</td>
-<td><tt>std::vector&lt;std::vector<int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixelHitsNum</b></td>
-<td>number of Geant4 hits strings simulated for current event</td>
-<td><tt>long</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixHitXstartpos</b></td>
-<td>Local X position of the starting point of the Geant4 hit</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixHitYstartpos</b></td>
-<td>Local Y position of the starting point of the Geant4 hit</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixHitZstartpos</b></td>
-<td>Local Z position of the starting point of the Geant4 hit</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixHitXendpos</b></td>
-<td>Local X position of the ending point of the Geant4 hit</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixHitYendpos</b></td>
-<td>Local Y position of the ending point of the Geant4 hit</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixHitZendpos</b></td>
-<td>Local Z position of the ending point of the Geant4 hit</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>PixHitBarrelEndcap</b></td>
-<td>Barrel/EndCap index (-2 for endcapC, 2 for endcapA, 0 for barrel)</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixHitLayerDisk</b></td>
-<td>Layer information (0, 1 or 2)</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixHitEtaModule</b></td>
-<td>Eta index of the module with G4 hit</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixHitPhiModule</b></td>
-<td>Phi index of the module with G4 hit</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixHitEtaIndex</b></td>
-<td>G4 hit position converted into pixel column index (eta direction)</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixHitPhiIndex</b></td>
-<td>G4 hit position converted into pixel row index (phi direction)</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>PixHitAngle</b></td>
-<td>G4 hit incidence angle in phi direction</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>rad</td></tr>
-<tr><td><b>PixHitAngle2</b></td>
-<td>G4 hit incidence angle in eta direction</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>rad</td></tr>
-<tr><td><b>PixHitEnergyLoss</b></td>
-<td>G4 hit total energy loss</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>GeV</td></tr>
-<tr><td><b>PixHitTime</b></td>
-<td>G4 hit arrival time</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>ns</td></tr>
-<tr><td><b>PixHitPDGParticle</b></td>
-<td>G4 hit particle PDG code</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>PixHitFlag</b></td>
-<td>G4 hit flag</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b></b></td>
-<td>G4 hit corrected incidence angle</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>rad</td></tr>
-<tr><td><b>MC_Xpos</b></td>
-<td>G4 hit associated to cluster local X position</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>MC_Ypos</b></td>
-<td>G4 hit associated to cluster local Y position</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>MC_IncidentAngle</b></td>
-<td>G4 hit associated to cluster incidence angle in phi direction</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>rad</td></tr>
-<tr><td><b>MC_IncidentAngle2</b></td>
-<td>G4 hit associated to cluster incidence angle in eta direction</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>rad</td></tr>
-<tr><td><b>MC_EnergyLoss</b></td>
-<td>G4 hit associated to cluster total energy loss</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>GeV</td></tr>
-<tr><td><b>MC_Time</b></td>
-<td>G4 hit associated to cluster arrival time</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>ns</td></tr>
-<tr><td><b>MC_PDGParticle</b></td>
-<td>G4 hit associated to cluster particle PDG code</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>MC_Flag</b></td>
-<td>G4 hit associated to cluster flag</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>NotAssociated_Xpos</b></td>
-<td>Local X position of G4 hit not associated to any cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>NotAssociated_Ypos</b></td>
-<td>Local Y position of G4 hit not associated to any cluster</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>NotAssociated_BarrelEndcap</b></td>
-<td>Barrel/EndCap index (-2 for endcapC, 2 for endcapA, 0 for barrel)</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>NotAssociated_LayerDisk</b></td>
-<td>Layer information (0, 1 or 2)</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>NotAssociated_EtaModule</b></td>
-<td>Eta index of the module with not associated G4 hit</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>NotAssociated_PhiModule</b></td>
-<td>Phi index of the module with not associated G4 hit</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>index</td></tr>
-<tr><td><b>NotAssociated_IncidentAngle</b></td>
-<td>Not associated G4 hit incidence angle in phi direction</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>rad</td></tr>
-<tr><td><b>NotAssociated_IncidentAngle2</b></td>
-<td>Not associated G4 hit incidence angle in eta direction</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>rad</td></tr>
-<tr><td><b>NotAssociated_EnergyLoss</b></td>
-<td>Not associated G4 hit total energy loss</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>GeV</td></tr>
-<tr><td><b>NotAssociated_Time</b></td>
-<td>Not associated G4 hit arrival time</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>ns</td></tr>
-<tr><td><b>NotAssociated_PDGParticle</b></td>
-<td>Not associated G4 hit particle PDG code</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>NotAssociated_Flag</b></td>
-<td>Not associated G4 hit flag</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-</table>
 
 @subsection SctClusterWriterVariables Ntuple variables of the InDet::SCT_ClusterValidationNtupleWriter
 
@@ -473,179 +172,7 @@ data words that don't match up with any expected pattern</td>
 <td>&nbsp;</td></tr>
 </table>
 
-@subsection TRT_DriftCircleWriterVariables Ntuple variables of the InDet::TRT_DriftCircleValidationNtupleWriter
-
-<table>
-<tr><td><b>EventNumber</b></td>
-<td>event number</td>
-<td><tt>int</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>TRT_nRIOs</b></td>
-<td>number of driftcircles in current event. This variable set the size of the vectors with driftcircle information.</td>
-<td><tt>int</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>TRT_DriftRadius</b></td>
-<td>measured drift radius</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>TRT_SurfaceX</b></td>
-<td>global X coordinate of straw centre position</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>TRT_SurfaceY</b></td>
-<td>global Y coordinate of straw centre position</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>TRT_SurfaceZ</b></td>
-<td>global Z coordinate of straw centre position</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>&nbsp;</td></tr>
-</table>
-
-
-@subsection TRT_DriftTimeNtupleHelperVariables Ntuple variables of the InDet::TRT_DriftTimeNtupleHelper
-<table>
-<tr><td>TRT_R[nTRTHits]</td> <td>drift radii of the TRT measurement</td> <td><tt>vector&lt;float&gt;</tt></td></tr>
-<tr><td>TRT_R_track[nTRTHits]</td> <td>local track position (Trk::locR) of the track</td> <td><tt>vector&lt;float&gt;</tt></td></tr>
-<tr><td>TRT_t[nTRTHits]</td> <td>drift time of the TRT measurement (==-1 if not valid)</td> <td><tt>vector&lt;float&gt;</tt></td></tr>
-<tr><td>TRT_x[nTRTHits]</td> <td>x coordinate of the straw center</td> <td><tt>vector&lt;float&gt;</tt></td></tr>
-<tr><td>TRT_y[nTRTHits]</td> <td>y coordinate of the straw center</td> <td><tt>vector&lt;float&gt;</tt></td></tr>
-<tr><td>TRT_HL[nTRTHits]</td> <td>has the measurement reached the high level threshold?</td> <td><tt>vector&lt;int&gt;</tt></td></tr>
-<tr><td>TRT_strawlayer[nTRTHits]</td> <td>index of the straw layer of the measurement</td> <td><tt>vector&lt;int&gt;</tt></td></tr>
-<tr><td>TRT_layer[nTRTHits]</td> <td>index of the layer of the measurement</td> <td><tt>vector&lt;int&gt;</tt></td></tr>
-<tr><td>TRT_straw[nTRTHits]</td> <td>index of the straw of the measurement</td> <td><tt>vector&lt;int&gt;</tt></td></tr>
-<tr><td>TRT_phi[nTRTHits]</td> <td>phi module index of the measurement</td> <td><tt>vector&lt;int&gt;</tt></td></tr>
-</table>
-              
-@subsection SiCalibrationVariablesForPixel Pixel Ntuple variables of the InDet::SiResidualValidationNtupleHelper
-<table>
-<tr><td>lvl1TriggerType</td><td>   LVL1 trigger type    </td><td><tt>  long</tt></td></tr>
-<tr><td>PixDetType</td><td>  Layer information (0, 1, 2 for barrel,  100, 101, 102 for endcap A side, -100, -101, -102 for endcap C side) it is 0 by default    </td><td><tt> vector&lt;int&gt;</tt></td></tr>
-<tr><td>PixHasGanged</td><td> 1 if the cluster contains ganged pixels     </td><td><tt> vector&lt;int&gt;</tt></td></tr>   
-<tr><td>PixIsFake</td><td> 1 if the cluster is marked as fake     </td><td><tt>vector&lt;int&gt;</tt></td></tr>   
-<tr><td>PixLVL1A</td><td> lower level1 accept among the pixel of the cluster     </td><td><tt>vector&lt;int&gt;</tt></td></tr>   
-<tr><td>PixToT</td><td>  total ToT of the cluster    </td><td><tt>vector&lt;int&gt;</tt></td></tr>   
-<tr><td>PixCharge</td><td>  total charge of the cluster    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixTLorPhi</td><td>  tangent of the lorentz angle (local x direction)    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixTLorEta</td><td>  tangent of the lorentz angle (local y direction - should be 0!)    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixBiasVolt</td><td>  Bias voltage (from conditions service)    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixTemp</td><td> Temperature (from conditions service)     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixDepVolt</td><td>  Depletion voltage (from conditions service)    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixDigResPhi</td><td>  Residuals obtained using the cluster digital coordinates  </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixDigResEta</td><td>  Residuals obtained using the cluster digital coordinates      </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixErrPhi</td><td>  Pixel Cluster position error (local x)    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixErrEta</td><td>  Pixel Cluster position error (local y)    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixEta</td><td> Global position of the cluster     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixGloX</td><td> Global position of the cluster     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixGloY</td><td> Global position of the cluster     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixGloZ</td><td> Global position of the cluster     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixLocX</td><td> Cluster local coordinates     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixLocY</td><td>  Cluster local coordinates    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixEtaModule</td><td> phi indexe of the module     </td><td><tt>vector&lt;int&gt;</tt></td></tr>   
-<tr><td>PixPhiModule</td><td> Eta indexe of the module     </td><td><tt>vector&lt;int&gt;</tt></td></tr>   
-<tr><td>PixFirstRow</td><td> lower row of the pixels contained in the cluster     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixFirstCol</td><td> lower column of the pixels contained in the cluster     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixDeltaPhi</td><td> Pixel Cluster Size, in cell units     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixDeltaEta</td><td> Pixel Cluster Size, in cell units     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixDeltaRow</td><td> Pixel cluster size, in mm     </td><td><tt>vector&lt;int&gt;</tt></td></tr>   
-<tr><td>PixDeltaCol</td><td> Pixel cluster size, in mm     </td><td><tt>vector&lt;int&gt;</tt></td></tr>   
-<tr><td>PixOmegaPhi</td><td> Pixel charge sharing variable     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixOmegaEta</td><td> Pixel charge sharing variable     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixTrkAngle</td><td> Track incidence angle on the module (rphi plane) in local reference frame  </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixTrkThetaI</td><td> Track incidence angle on the module (eta-normal plane) in local reference frame  </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixTrkEta</td><td> Track incidence pseudorapidity in local module reference frame     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixTrkPt</td><td> Track momentum     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixTrkQ</td><td>  charge of the associated track    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-<tr><td>PixTrkClusGroupSize</td><td> total size of the cluster   </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-</table>
-
-@subsection SiCalibrationVariablesForHoles Pixel Holes Ntuple variables of the InDet::SiResidualValidationNtupleHelper
-<table>
- <tr><td>PixHoleGloX</td><td>  Global position of the hole    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleGloY</td><td>  Global position of the hole    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleGloZ</td><td>  Global position of the hole    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleLocX</td><td>  Local position of the hole    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleLocY</td><td>  Local position of the hole    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleEtaModule</td><td> Eta indexes of the module that contains the hole     </td><td><tt>vector&lt;int&gt;</tt></td></tr>   
- <tr><td>PixHolePhiModule </td><td> Phi indexes of the module that contains the hole      </td><td><tt>vector&lt;int&gt;</tt></td></tr>   
- <tr><td>PixHoleLayer</td><td> Layer (0, 1 or 2) of the hole     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleECBarrel </td><td>  -2 for EC, 2 for EA, 0 for barrel    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleClNearstSize</td><td> total size of the nearest cluster to the hole     </td><td><tt>vector&lt;int&gt;</tt></td></tr>   
- <tr><td>PixHoleLocXClNearst </td><td> nearest cluster local X     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleLocYClNearst </td><td>  nearest cluster local Y    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleClRowClNearst  </td><td> row of the nearest cluster     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleClColClNearst </td><td>  Column of the nearest cluster    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleGloZNearst </td><td>  global z of the nearest cluster    </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleDeltaRowNearst </td><td> nearest Cluster Size, in cell units     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
- <tr><td>PixHoleDeltaColNearst </td><td> nearest Cluster Size, in cell units     </td><td><tt>vector&lt;float&gt;</tt></td></tr> 
-</table>
-
-
-@subsection SiCalibrationVariablesForSCT SCT Ntuple variables of the InDet::SiResidualValidationNtupleHelper
-
-<table>
-<tr><td><b>SctDetType</b></td>
-<td>layer information (1 for barrel, 2 for disks)</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>SctLayerDisk</b></td>
-<td>index of layer or disk containing the cluster</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>SctEtaModule</b></td>
-<td>eta index of module containing the cluster</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>SctPhiModule</b></td>
-<td>phi index of module containing the cluster</td>
-<td><tt>std::vector&lt;int&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>SctTLorPhi</b></td>
-<td>tangent of the lorentz angle (local x direction)</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>1</td></tr>
-<tr><td><b>SctTLorEta</b></td>
-<td>tangent of the lorentz angle (local y direction, should be 0)</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>1</td></tr>
-<tr><td><b>SctEta</b></td>
-<td>pseudorapidity calculated from module position</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>SctDeltaPhi</b></td>
-<td>SCT cluster size in strip units</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>strips</td></tr>
-<tr><td><b>SctTrkAngle</b></td>
-<td>track incidence angle on the module in local reference frame</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>rad</td></tr>
-<tr><td><b>SctTrkQ</b></td>
-<td>reconstructed track charge</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>&nbsp;</td></tr>
-<tr><td><b>SctErr</b></td>
-<td>ClusterOnTrack's error in local X coordinate</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>mm</td></tr>
-<tr><td><b>SctTrkClusGroupSize</b></td>
-<td>SCT total cluster size</td>
-<td><tt>std::vector&lt;float&gt;</tt></td>
-<td>&nbsp;</td></tr>
-</table>
-
 
 @section InDetTrackValidation_ExtrasInDetTrackValidation Extra Pages
 
- - @ref UsedInDetTrackValidation
- - @ref requirementsInDetTrackValidation
-*/
-
-/**
-@page UsedInDetTrackValidation Used Packages
 */
-
-/**
-@page requirementsInDetTrackValidation Requirements
-*/
-
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/src/HoleSearchValidation.cxx b/InnerDetector/InDetValidation/InDetTrackValidation/src/HoleSearchValidation.cxx
index 2fdcb796c771cee480c281a9229111466787f0a0..6186436a7cbcd0ff6f02874f34d13e63b9eeabe8 100755
--- a/InnerDetector/InDetValidation/InDetTrackValidation/src/HoleSearchValidation.cxx
+++ b/InnerDetector/InDetValidation/InDetTrackValidation/src/HoleSearchValidation.cxx
@@ -10,7 +10,6 @@
 // Gaudi 
 #include "GaudiKernel/MsgStream.h"
 // Trk
-#include "TrkTrack/TrackCollection.h"
 #include "TrkTrack/Track.h"
 
 #include "TrkToolInterfaces/ITrackHoleSearchTool.h"
@@ -28,29 +27,16 @@
 using namespace InDet;
 
 HoleSearchValidation::HoleSearchValidation(const std::string& name, ISvcLocator* pSvcLocator):
-    AthAlgorithm(name, pSvcLocator),
+    AthReentrantAlgorithm(name, pSvcLocator),
 	m_idHelper(0),
 	m_pixelID(0),
 	m_sctID(0),
 	m_trtID(0),
 	m_siliconID(0),
     m_holeSearchTool("InDet::InDetTrackHoleSearchTool"),
-    m_trackCollectionName("Tracks"),
+    m_trackCollectionKey("Tracks"),
 	m_saveNewTracksInSG(false),
-	m_removeSctSide0(true),
-	m_removeSctSide1(true),
-	m_removePix0(false),
-	m_removePix1(false),
-	m_removePix2(false),
-	m_removeSct0(true),
-	m_removeSct1(true),
-	m_removeSct2(false),
-	m_removeSct3(false),
-	m_removeSct4(false),
-	m_removeSct5(false),
-	m_removeSct6(false),
-	m_removeSct7(false),
-	m_removeSct8(false),
+        m_removeParts {},
 	m_removeOverlapHitsOnly(false),
     m_ignoreTrackEnds(true),
 	m_randomRemovalMode(false),
@@ -61,33 +47,38 @@ HoleSearchValidation::HoleSearchValidation(const std::string& name, ISvcLocator*
 
 {
   declareProperty("HoleSearchTool"          , m_holeSearchTool);
-  declareProperty("TrackCollection"         , m_trackCollectionName, "Name of the reference track collection");
+  declareProperty("TrackCollection"         , m_trackCollectionKey, "Name of the reference track collection");
 
   declareProperty("SaveNewTracksInSG"       , m_saveNewTracksInSG  , "Boolean: save tracks in SG");
-  declareProperty("RemoveSCTSide0"          , m_removeSctSide0     , "Remove SCT hits on side 0");
-  declareProperty("RemoveSCTSide1"          , m_removeSctSide1     , "Remove SCT hits on side 1");
 
-  declareProperty("RemovePIX0"              , m_removePix0         , "Remove hit(s) in PIXEL layer 0");
-  declareProperty("RemovePIX1"              , m_removePix1         , "Remove hit(s) in PIXEL layer 1");
-  declareProperty("RemovePIX2"              , m_removePix2         , "Remove hit(s) in PIXEL layer 2");
+  // for (unsigned int part_i=0; part_i<Parts::kNParts; ++part_i) {
+  //   m_removeParts[part_i]=false;
+  // }
+  declareProperty("RemovePIX0"              , m_removeParts[Parts::kPix0]         , "Remove hit(s) in PIXEL layer 0");
+  declareProperty("RemovePIX1"              , m_removeParts[Parts::kPix1]         , "Remove hit(s) in PIXEL layer 1");
+  declareProperty("RemovePIX2"              , m_removeParts[Parts::kPix2]         , "Remove hit(s) in PIXEL layer 2");
 
-  declareProperty("RemoveSCT0"              , m_removeSct0         , "Remove hit(s) in SCT layer 0");
-  declareProperty("RemoveSCT1"              , m_removeSct1         , "Remove hit(s) in SCT layer 1");
-  declareProperty("RemoveSCT2"              , m_removeSct2         , "Remove hit(s) in SCT layer 2");
-  declareProperty("RemoveSCT3"              , m_removeSct3         , "Remove hit(s) in SCT layer 3");
+  declareProperty("RemoveSCT0"              , m_removeParts[Parts::kSct0]         , "Remove hit(s) in SCT layer 0");
+  declareProperty("RemoveSCT1"              , m_removeParts[Parts::kSct1]         , "Remove hit(s) in SCT layer 1");
+  declareProperty("RemoveSCT2"              , m_removeParts[Parts::kSct2]         , "Remove hit(s) in SCT layer 2");
+  declareProperty("RemoveSCT3"              , m_removeParts[Parts::kSct3]         , "Remove hit(s) in SCT layer 3");
 
-  declareProperty("RemoveSCT4"              , m_removeSct4         , "Remove hit(s) in SCT endcap layer 4");
-  declareProperty("RemoveSCT5"              , m_removeSct5         , "Remove hit(s) in SCT endcap layer 5");
-  declareProperty("RemoveSCT6"              , m_removeSct6         , "Remove hit(s) in SCT endcap layer 6");
-  declareProperty("RemoveSCT7"              , m_removeSct7         , "Remove hit(s) in SCT endcap layer 7");
-  declareProperty("RemoveSCT8"              , m_removeSct8         , "Remove hit(s) in SCT endcap layer 8");
+  declareProperty("RemoveSCT4"              , m_removeParts[Parts::kSct4]         , "Remove hit(s) in SCT endcap layer 4");
+  declareProperty("RemoveSCT5"              , m_removeParts[Parts::kSct5]         , "Remove hit(s) in SCT endcap layer 5");
+  declareProperty("RemoveSCT6"              , m_removeParts[Parts::kSct6]         , "Remove hit(s) in SCT endcap layer 6");
+  declareProperty("RemoveSCT7"              , m_removeParts[Parts::kSct7]         , "Remove hit(s) in SCT endcap layer 7");
+  declareProperty("RemoveSCT8"              , m_removeParts[Parts::kSct8]         , "Remove hit(s) in SCT endcap layer 8");
+
+  declareProperty("RemoveSCTSide0"          , m_removeParts[Parts::kSctSide0]     , "Remove SCT hits on side 0");
+  declareProperty("RemoveSCTSide1"          , m_removeParts[Parts::kSctSide1]     , "Remove SCT hits on side 1");
 
   declareProperty("RemoveOverlapHitsOnly"  , m_removeOverlapHitsOnly, "Only remove overlap track hits");
   declareProperty("IgnoreTrackEnds"        , m_ignoreTrackEnds     , "Ignore hits at the end of the track");
   
   declareProperty("RandomRemovalMode"       , m_randomRemovalMode  , "Randomly remove track hits (overwrites the other flags!)");
   declareProperty("MaximalHoles"            , m_maxNumberOfHoles   , "Number of maximal holes to be created");
-  
+
+  declare( m_trackCollectionOutputKey );
 
   // start with 10x10
   m_trackStats = std::vector< std::vector< unsigned int> >(0, std::vector< unsigned int>(0));
@@ -154,43 +145,37 @@ StatusCode HoleSearchValidation::initialize() {
       return StatusCode::FAILURE;
   }
 
+  ATH_CHECK(m_trackCollectionKey.initialize());
+  if (m_saveNewTracksInSG) {
+    m_trackCollectionOutputKey = m_trackCollectionKey.key() + "_removedHits";
+    ATH_CHECK(m_trackCollectionOutputKey.initialize());
+  }
+
   return StatusCode::SUCCESS;
 }
 
-StatusCode HoleSearchValidation::execute() {
+StatusCode HoleSearchValidation::execute_r(const EventContext& ctx) const {
 
+  std::array<bool,Parts::kNParts> remove_parts;
+  for (unsigned int part_i=0; part_i<Parts::kNParts; ++part_i) {
+    remove_parts[part_i]=( !m_randomRemovalMode ? m_removeParts[part_i] : false );
+  }
   ATH_MSG_VERBOSE( "HoleSearchValidation execute() start" ) ;
 
-  StatusCode sc = StatusCode::SUCCESS;
-  
-  const TrackCollection* tracks = 0;
-  TrackCollection* newTrackCollection = 0;
-  if (m_saveNewTracksInSG) {
-    newTrackCollection = new TrackCollection();
-  }
-  
+  std::unique_ptr<TrackCollection>  newTrackCollection( m_saveNewTracksInSG ? std::make_unique<TrackCollection>() : nullptr );
 
   // get track collection
-  if (m_trackCollectionName != "") {
-    sc = evtStore()->retrieve(tracks, m_trackCollectionName);
-    if (sc.isFailure()) {
-      ATH_MSG_ERROR( "tracks not found:  " << m_trackCollectionName ) ;
-      return StatusCode::FAILURE;
-    } else {
-      ATH_MSG_VERBOSE( "tracks found: " << m_trackCollectionName
-						  << " with size = " << tracks->size() ) ;
-    }
-  }else{
-    ATH_MSG_ERROR( "No track collection name given (empty string)!" );
+  SG::ReadHandle<TrackCollection> tracks(m_trackCollectionKey,ctx);
+  if (!tracks.isValid()) {
+    ATH_MSG_ERROR("Missing input track collection " << m_trackCollectionKey.key());
     return StatusCode::FAILURE;
   }
 
-
   // loop over tracks
   TrackCollection::const_iterator trackIterator = tracks->begin();
   for ( ; trackIterator < tracks->end(); ++trackIterator) {
     if (!((*trackIterator))) {
-      ATH_MSG_WARNING( "TrackCollection " << m_trackCollectionName << "contains empty entries" ) ;
+      ATH_MSG_WARNING( "TrackCollection " << m_trackCollectionKey.key() << "contains empty entries" ) ;
       continue;
     }
 
@@ -198,7 +183,7 @@ StatusCode HoleSearchValidation::execute() {
     const Trk::Track& track = *(*trackIterator);
     const DataVector<const Trk::TrackStateOnSurface>* tsos = track.trackStateOnSurfaces();
     ATH_MSG_DEBUG(  "Perform hole search on unmodified track (" << *trackIterator << ")" 
-		   << " which contains " << tsos->size() <<" track states" ) ;
+                    << " which contains " << tsos->size() <<" track states" ) ;
     // perform hole search
     unsigned int oldHoles = doHoleSearch( *trackIterator );
 
@@ -227,37 +212,37 @@ StatusCode HoleSearchValidation::execute() {
     int maxSctLayerEndcap   = -1;
 
     if (m_ignoreTrackEnds || m_randomRemovalMode){
-        ATH_MSG_VERBOSE(  "Parsing track first to find end layers and maximal numbers" ) ;
-    	for ( ; iTsos != iTsosEnd ; ++iTsos) {
-			// 
-            Identifier plSurfaceID;
-			const Trk::MeasurementBase* plMesb = (*iTsos)->measurementOnTrack();
-	        if (plMesb &&  plMesb->associatedSurface().associatedDetectorElement()){
-            	plSurfaceID = plMesb->associatedSurface().associatedDetectorElement()->identify(); 
-                // to find out whether it is barrel / endcap
-  				// check pixel / sct 
-                if ( m_idHelper->is_pixel( plSurfaceID ) ) {
-	    			int plLayer = abs(m_pixelID->layer_disk( plSurfaceID ));
-                    bool isBarrel = m_pixelID->is_barrel( plSurfaceID );
-                    // set the maximal pixel layer: barrel / ec
-					if ( isBarrel )
-						maxPixelLayerBarrel = plLayer > maxPixelLayerBarrel ? plLayer : maxPixelLayerBarrel;
-                    else 
-						maxPixelLayerEndcap = plLayer > maxPixelLayerEndcap ? plLayer : maxPixelLayerEndcap;
-                } else if (m_idHelper->is_sct( plSurfaceID ) ) {
-				    int plLayer = abs(m_sctID->layer_disk(  plSurfaceID )); 
-                    bool isBarrel = m_sctID->is_barrel( plSurfaceID );
-                    // set the maximal pixel layer: barrel / ec
-					if ( isBarrel )
-						maxSctLayerBarrel = plLayer > maxSctLayerBarrel ? plLayer : maxSctLayerBarrel;
-                    else 
-						maxSctLayerEndcap = plLayer > maxSctLayerEndcap ? plLayer : maxSctLayerEndcap;
-               }
-            }
+      ATH_MSG_VERBOSE(  "Parsing track first to find end layers and maximal numbers" ) ;
+      for ( ; iTsos != iTsosEnd ; ++iTsos) {
+        // 
+        Identifier plSurfaceID;
+        const Trk::MeasurementBase* plMesb = (*iTsos)->measurementOnTrack();
+        if (plMesb &&  plMesb->associatedSurface().associatedDetectorElement()){
+          plSurfaceID = plMesb->associatedSurface().associatedDetectorElement()->identify(); 
+          // to find out whether it is barrel / endcap
+          // check pixel / sct 
+          if ( m_idHelper->is_pixel( plSurfaceID ) ) {
+            int plLayer = abs(m_pixelID->layer_disk( plSurfaceID ));
+            bool isBarrel = m_pixelID->is_barrel( plSurfaceID );
+            // set the maximal pixel layer: barrel / ec
+            if ( isBarrel )
+              maxPixelLayerBarrel = plLayer > maxPixelLayerBarrel ? plLayer : maxPixelLayerBarrel;
+            else 
+              maxPixelLayerEndcap = plLayer > maxPixelLayerEndcap ? plLayer : maxPixelLayerEndcap;
+          } else if (m_idHelper->is_sct( plSurfaceID ) ) {
+            int plLayer = abs(m_sctID->layer_disk(  plSurfaceID )); 
+            bool isBarrel = m_sctID->is_barrel( plSurfaceID );
+            // set the maximal pixel layer: barrel / ec
+            if ( isBarrel )
+              maxSctLayerBarrel = plLayer > maxSctLayerBarrel ? plLayer : maxSctLayerBarrel;
+            else 
+              maxSctLayerEndcap = plLayer > maxSctLayerEndcap ? plLayer : maxSctLayerEndcap;
+          }
         }
-        // sct overrules pixels
-        maxPixelLayerBarrel = maxSctLayerBarrel > 0 ? -1 : maxPixelLayerBarrel;
-        maxPixelLayerEndcap = maxSctLayerEndcap > 0 ? -1 : maxPixelLayerEndcap;
+      }
+      // sct overrules pixels
+      maxPixelLayerBarrel = maxSctLayerBarrel > 0 ? -1 : maxPixelLayerBarrel;
+      maxPixelLayerEndcap = maxSctLayerEndcap > 0 ? -1 : maxPixelLayerEndcap;
       // reset to start the main loop correctly
       iTsos    = tsos->begin();
     }
@@ -270,106 +255,90 @@ StatusCode HoleSearchValidation::execute() {
 	Identifier surfaceID;
 	const Trk::MeasurementBase* mesb = (*iTsos)->measurementOnTrack();
 
-    // also reset the identifiers
-    unsigned int randomHoles = 0;
-    if (m_randomRemovalMode){
-       // ---------------------------------------------------------------------------------------
-       randomHoles = (unsigned int)(m_maxNumberOfHoles*CLHEP::RandFlat::shoot(m_randomEngine));
-       ATH_MSG_VERBOSE("Random mode chosen: will create " << randomHoles << " holes on the track.");
-
-       // reset the all the triggers (they will be set randomly)
-	   m_removeSctSide0 = false;
-	   m_removeSctSide1 = false;
-	   m_removePix0 = false;
-	   m_removePix1 = false;
-	   m_removePix2 = false;
-	   m_removeSct0 = false;
-	   m_removeSct1 = false;
-	   m_removeSct2 = false;
-	   m_removeSct3 = false;
-	   m_removeSct4 = false;
-	   m_removeSct5 = false;
-	   m_removeSct6 = false;
-	   m_removeSct7 = false;
-	   m_removeSct8 = false;
-
-       // max int pixel  
-       unsigned int maxPixel = maxPixelLayerBarrel > maxPixelLayerEndcap 
-                    ? maxPixelLayerBarrel : maxPixelLayerEndcap;
-       // max int sct
-       unsigned int maxSct = maxSctLayerBarrel > maxSctLayerEndcap 
-                    ? maxSctLayerBarrel : maxSctLayerEndcap;
-       // -------------------------------------------------------------------
-       int maxHit 		  = maxPixel + maxSct;
-       int holesTriggered = 0;
-       maxHit -= m_ignoreTrackEnds ? 1 : 0;
-       // make the switch
-       for (unsigned int ihole = 0; ihole < randomHoles && holesTriggered < int(randomHoles); ++ihole){
+        // also reset the identifiers
+        unsigned int randomHoles = 0;
+        if (m_randomRemovalMode){
+          // ---------------------------------------------------------------------------------------
+          randomHoles = (unsigned int)(m_maxNumberOfHoles*CLHEP::RandFlat::shoot(m_randomEngine));
+          ATH_MSG_VERBOSE("Random mode chosen: will create " << randomHoles << " holes on the track.");
+
+          // max int pixel  
+          unsigned int maxPixel = maxPixelLayerBarrel > maxPixelLayerEndcap 
+            ? maxPixelLayerBarrel : maxPixelLayerEndcap;
+          // max int sct
+          unsigned int maxSct = maxSctLayerBarrel > maxSctLayerEndcap 
+            ? maxSctLayerBarrel : maxSctLayerEndcap;
+          // -------------------------------------------------------------------
+          int maxHit 		  = maxPixel + maxSct;
+          int holesTriggered = 0;
+          maxHit -= m_ignoreTrackEnds ? 1 : 0;
+          // make the switch
+          for (unsigned int ihole = 0; ihole < randomHoles && holesTriggered < int(randomHoles); ++ihole){
             // throw the dices
-			unsigned int holeId = (unsigned int)(maxHit*CLHEP::RandFlat::shoot(m_randomEngine));
+            unsigned int holeId = (unsigned int)(maxHit*CLHEP::RandFlat::shoot(m_randomEngine));
             ATH_MSG_VERBOSE( "Random mode : layer identifier " << holeId << " chosen." );
-           {
-			 // now switch between --------
-             switch (holeId) {
-				case 0 : { m_removePix0 = true; ++holesTriggered; }; break;
-				case 1 : { m_removePix1 = true; ++holesTriggered; }; break;
-				case 2 : { m_removePix2 = true; ++holesTriggered; }; break;
-				case 3 : { m_removeSct0 = true; ++holesTriggered; }; break;
-				case 4 : { m_removeSct1 = true; ++holesTriggered; }; break;
-				case 5 : { m_removeSct2 = true; ++holesTriggered; }; break;
-				case 6 : { m_removeSct3 = true; ++holesTriggered; }; break;
-				case 7 : { m_removeSct4 = true; ++holesTriggered; }; break;
-				case 8 : { m_removeSct5 = true; ++holesTriggered; }; break;
-				case 9 : { m_removeSct6 = true; ++holesTriggered; }; break;
-				case 10 : { m_removeSct7 = true; ++holesTriggered; }; break;
-				case 11 : { m_removeSct8 = true; ++holesTriggered; }; break;
-                default : break;
-            }
-            // make the side decision on the side
-	   		if (holeId > 2) {
+            {
+              // now switch between --------
+              switch (holeId) {
+              case 0 : { remove_parts[Parts::kPix0] = true; ++holesTriggered; }; break;
+              case 1 : { remove_parts[Parts::kPix1] = true; ++holesTriggered; }; break;
+              case 2 : { remove_parts[Parts::kPix2] = true; ++holesTriggered; }; break;
+              case 3 : { remove_parts[Parts::kSct0] = true; ++holesTriggered; }; break;
+              case 4 : { remove_parts[Parts::kSct1] = true; ++holesTriggered; }; break;
+              case 5 : { remove_parts[Parts::kSct2] = true; ++holesTriggered; }; break;
+              case 6 : { remove_parts[Parts::kSct3] = true; ++holesTriggered; }; break;
+              case 7 : { remove_parts[Parts::kSct4] = true; ++holesTriggered; }; break;
+              case 8 : { remove_parts[Parts::kSct5] = true; ++holesTriggered; }; break;
+              case 9 : { remove_parts[Parts::kSct6] = true; ++holesTriggered; }; break;
+              case 10 : { remove_parts[Parts::kSct7] = true; ++holesTriggered; }; break;
+              case 11 : { remove_parts[Parts::kSct8] = true; ++holesTriggered; }; break;
+              default : break;
+              }
+              // make the side decision on the side
+              if (holeId > 2) {
                 double sideDecision = CLHEP::RandFlat::shoot(m_randomEngine);
-				if ( sideDecision < 1./3. )
-					m_removeSctSide0 = true;
-				else if ( sideDecision < 2./3. )
-					m_removeSctSide1 = true;
-				else {
-					m_removeSctSide0 = true;
-					m_removeSctSide1 = true;
-                    ++holesTriggered;
+                if ( sideDecision < 1./3. )
+                  remove_parts[Parts::kSctSide0] = true;
+                else if ( sideDecision < 2./3. )
+                  remove_parts[Parts::kSctSide1] = true;
+                else {
+                  remove_parts[Parts::kSctSide0] = true;
+                  remove_parts[Parts::kSctSide1] = true;
+                  ++holesTriggered;
                 }
+              }
             }
-         }
-	   }
-    }
+          }
+        }
 
 	// hits, outliers
 	if (mesb != 0 && mesb->associatedSurface().associatedDetectorElement() != NULL) {
 	  surfaceID = mesb->associatedSurface().associatedDetectorElement()->identify(); 
-      // the pixel case	  
+          // the pixel case	  
 	  if ( m_idHelper->is_pixel( surfaceID ) ) {
 	    int layer = abs(m_pixelID->layer_disk( surfaceID ));
-        // check barrel / ec
-        bool isBarrel = m_pixelID->is_barrel( surfaceID );
-        // indicate how many pixel hits are per layer
+            // check barrel / ec
+            bool isBarrel = m_pixelID->is_barrel( surfaceID );
+            // indicate how many pixel hits are per layer
 	    pixelHitsPerLayer[layer]++;
-        ATH_MSG_VERBOSE(  "Pixel hits on layer " << layer << " : " << pixelHitsPerLayer[layer] ) ;
-        // check for last layer
-        bool isLastLayer = (isBarrel && layer == maxPixelLayerBarrel) || (!isBarrel && layer == maxPixelLayerEndcap);
-		// only in the ignore track case
-        if (m_ignoreTrackEnds && isLastLayer){
-        	ATH_MSG_VERBOSE(  "This pixel hit is not removed, it is at the track end." ) ;
-        } else if ( !m_removeOverlapHitsOnly || pixelHitsPerLayer[layer] > 1) {
-	      if ( !m_ignoreTrackEnds && layer == 0 && m_removePix0 ) {
+            ATH_MSG_VERBOSE(  "Pixel hits on layer " << layer << " : " << pixelHitsPerLayer[layer] ) ;
+            // check for last layer
+            bool isLastLayer = (isBarrel && layer == maxPixelLayerBarrel) || (!isBarrel && layer == maxPixelLayerEndcap);
+            // only in the ignore track case
+            if (m_ignoreTrackEnds && isLastLayer){
+              ATH_MSG_VERBOSE(  "This pixel hit is not removed, it is at the track end." ) ;
+            } else if ( !m_removeOverlapHitsOnly || pixelHitsPerLayer[layer] > 1) {
+              if ( !m_ignoreTrackEnds && layer == 0 && remove_parts[Parts::kPix0] ) {
 		ATH_MSG_DEBUG(  "Removing PIXEL layer 0 hit" ) ;
 		printInfoTSoS( *iTsos );
 		nRemoved++;
 		continue;
-	      } else if( layer == 1 && m_removePix1 ) {
+              } else if( layer == 1 && remove_parts[Parts::kPix1] ) {
 		ATH_MSG_DEBUG(  "Removing PIXEL layer 1 hit" ) ;
 		printInfoTSoS( *iTsos );
 		nRemoved++;
 		continue;
-	      } else if( layer == 2 && m_removePix2 ) {
+              } else if( layer == 2 && remove_parts[Parts::kPix2] ) {
 		ATH_MSG_DEBUG(  "Removing PIXEL layer 2 hit" ) ;
 		printInfoTSoS( *iTsos );
 		nRemoved++;
@@ -377,73 +346,73 @@ StatusCode HoleSearchValidation::execute() {
 	      } 
 	    }
 	  } else if ( m_idHelper->is_sct( surfaceID ) ) {
-        int layer = abs(m_sctID->layer_disk( surfaceID ));
-        // check barrel / ec
-        bool isBarrel = m_sctID->is_barrel( surfaceID );
-        // counter for number of layers
-        sctHitsPerLayer[layer]++;	    
-        ATH_MSG_VERBOSE(  "SCT hits on layer " << layer << " : " << sctHitsPerLayer[layer] ) ;
-        // steer the side to be removed
+            int layer = abs(m_sctID->layer_disk( surfaceID ));
+            // check barrel / ec
+            bool isBarrel = m_sctID->is_barrel( surfaceID );
+            // counter for number of layers
+            sctHitsPerLayer[layer]++;	    
+            ATH_MSG_VERBOSE(  "SCT hits on layer " << layer << " : " << sctHitsPerLayer[layer] ) ;
+            // steer the side to be removed
 	    int side  = m_sctID->side( surfaceID );
-	    bool canRemoveSide = (side == 0) ? m_removeSctSide0 : m_removeSctSide1;
-        // check for last layer
-        bool isLastLayer = (isBarrel && layer == maxSctLayerBarrel) || (!isBarrel && layer == maxSctLayerEndcap);
-		// only in the ignore track case
-        if (m_ignoreTrackEnds && isLastLayer){
-        	ATH_MSG_VERBOSE(  "This SCT hit is not removed, it is at the track end." ) ;
-        } else if ( layer == 0 && m_removeSct0 && canRemoveSide ) {
+	    bool canRemoveSide = (side == 0) ? remove_parts[Parts::kSctSide0] : remove_parts[Parts::kSctSide1];
+            // check for last layer
+            bool isLastLayer = (isBarrel && layer == maxSctLayerBarrel) || (!isBarrel && layer == maxSctLayerEndcap);
+            // only in the ignore track case
+            if (m_ignoreTrackEnds && isLastLayer){
+              ATH_MSG_VERBOSE(  "This SCT hit is not removed, it is at the track end." ) ;
+            } else if ( layer == 0 && remove_parts[Parts::kSct0] && canRemoveSide ) {
 	      ATH_MSG_DEBUG(  "Removing SCT layer 0 hit" ) ;
 	      printInfoTSoS( *iTsos );
 	      nRemoved++;
 	      continue;
-	    } else if ( layer == 1 && m_removeSct1  && canRemoveSide ) {
+            } else if ( layer == 1 && remove_parts[Parts::kSct1]  && canRemoveSide ) {
 	      ATH_MSG_DEBUG(  "Removing SCT layer 1 hit" ) ;
 	      printInfoTSoS( *iTsos );
 	      nRemoved++;
 	      continue;
-	    } else if ( layer == 2 && m_removeSct2  && canRemoveSide ) {
+            } else if ( layer == 2 && remove_parts[Parts::kSct2]  && canRemoveSide ) {
 	      ATH_MSG_DEBUG(  "Removing SCT layer 2 hit" ) ;
 	      printInfoTSoS( *iTsos );
 	      nRemoved++;
 	      continue;
-	    } else if ( layer == 3 && m_removeSct3  && canRemoveSide ) {
+            } else if ( layer == 3 && remove_parts[Parts::kSct3]  && canRemoveSide ) {
 	      ATH_MSG_DEBUG(  "Removing SCT layer 3 hit" ) ;
 	      printInfoTSoS( *iTsos );
 	      nRemoved++;
 	      continue;
-	    } else if ( layer == 4 && m_removeSct4  && canRemoveSide ) {
+            } else if ( layer == 4 && remove_parts[Parts::kSct4]  && canRemoveSide ) {
 	      ATH_MSG_DEBUG(  "Removing SCT endcap layer 4 hit" ) ;
 	      printInfoTSoS( *iTsos );
 	      nRemoved++;
 	      continue;
-	    } else if ( layer == 5 && m_removeSct5  && canRemoveSide ) {
+            } else if ( layer == 5 && remove_parts[Parts::kSct5]  && canRemoveSide ) {
 	      ATH_MSG_DEBUG(  "Removing SCT endcap layer 5 hit" ) ;
 	      printInfoTSoS( *iTsos );
 	      nRemoved++;
 	      continue;
-	    } else if ( layer == 6 && m_removeSct6  && canRemoveSide ) {
+            } else if ( layer == 6 && remove_parts[Parts::kSct6]  && canRemoveSide ) {
 	      ATH_MSG_DEBUG(  "Removing SCT endcap layer 6 hit" ) ;
 	      printInfoTSoS( *iTsos );
 	      nRemoved++;
 	      continue;
-	    } else if ( layer == 7 && m_removeSct7  && canRemoveSide ) {
+            } else if ( layer == 7 && remove_parts[Parts::kSct7]  && canRemoveSide ) {
 	      ATH_MSG_DEBUG(  "Removing SCT endcap layer 7 hit" ) ;
 	      printInfoTSoS( *iTsos );
 	      nRemoved++;
 	      continue;
-	    } else if ( layer == 8 && m_removeSct8  && canRemoveSide ) {
+            } else if ( layer == 8 && remove_parts[Parts::kSct8]  && canRemoveSide ) {
 	      ATH_MSG_DEBUG(  "Removing SCT endcap layer 8 hit" ) ;
 	      printInfoTSoS( *iTsos );
 	      nRemoved++;
 	      continue;
-	    } 
+            }
 
-	  } // end SCT hit
-	 } // end have identifier
-    } // end TSoS is of type measurement
+          } // end SCT hit
+        } // end have identifier
+      } // end TSoS is of type measurement
 
-     const Trk::TrackStateOnSurface* newTsos = new Trk::TrackStateOnSurface(**iTsos);
-     vecTsos->push_back(newTsos);
+      const Trk::TrackStateOnSurface* newTsos = new Trk::TrackStateOnSurface(**iTsos);
+      vecTsos->push_back(newTsos);
     } // end loop over all TSoS
     
     ATH_MSG_DEBUG(  "Removed total of " << nRemoved << " TSoS on track." ) ;
@@ -462,16 +431,18 @@ StatusCode HoleSearchValidation::execute() {
 
     // fill track statistics
     // first, check size of vectors
-     while (m_trackStats.size() < nRemoved+1) {
-       m_trackStats.push_back( std::vector< unsigned int >(0) );
-     }
-     while (m_trackStats[nRemoved].size() < foundHoles+1) {
-       m_trackStats[nRemoved].push_back( 0 );
-     }
-     ATH_MSG_DEBUG(  "m_trackStats.size()= " << m_trackStats.size() );
-//     // increase counter
-     m_trackStats[nRemoved][foundHoles]++;
-
+    {
+      std::lock_guard<std::mutex> lock(m_trackStatsMutex);
+      while (m_trackStats.size() < nRemoved+1) {
+        m_trackStats.push_back( std::vector< unsigned int >(0) );
+      }
+      while (m_trackStats[nRemoved].size() < foundHoles+1) {
+        m_trackStats[nRemoved].push_back( 0 );
+      }
+      ATH_MSG_DEBUG(  "m_trackStats.size()= " << m_trackStats.size() );
+      //     // increase counter
+      m_trackStats[nRemoved][foundHoles]++;
+    }
 
     // posibly save new track into container and SG
     if (m_saveNewTracksInSG) {
@@ -484,12 +455,13 @@ StatusCode HoleSearchValidation::execute() {
   ATH_MSG_DEBUG(  "Finished looping over all input tracks" ) ;
 
   if (m_saveNewTracksInSG) {
-    // save new tracks to SG
-    ATH_MSG_DEBUG(  "Saving new TrackCollection to SG" ) ;
-    evtStore()->record( newTrackCollection, m_trackCollectionName+"_removedHits");
+    SG::WriteHandle<TrackCollection> newTrackCollection_handle(m_trackCollectionOutputKey,ctx);
+    if (newTrackCollection_handle.record( std::move(newTrackCollection) ).isFailure()){
+      ATH_MSG_ERROR("Failed to record output collection " << m_trackCollectionOutputKey.key());
+      return StatusCode::FAILURE;
+    }
   }
-
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 StatusCode HoleSearchValidation::finalize() {
@@ -511,7 +483,7 @@ StatusCode HoleSearchValidation::finalize() {
   return StatusCode::SUCCESS;
 }
 
-unsigned int HoleSearchValidation::doHoleSearch( const Trk::Track* track)
+unsigned int HoleSearchValidation::doHoleSearch( const Trk::Track* track) const
 {
   ATH_MSG_VERBOSE(  "start hole search for track ( " << track << ")" ) ;
   unsigned int nHoles(0);
@@ -540,7 +512,7 @@ unsigned int HoleSearchValidation::doHoleSearch( const Trk::Track* track)
 }
 
 
-void HoleSearchValidation::printInfoTSoS( const Trk::TrackStateOnSurface* tsos)
+void HoleSearchValidation::printInfoTSoS( const Trk::TrackStateOnSurface* tsos) const
 {
 
   ATH_MSG_VERBOSE(  "Position : " << tsos->trackParameters()->position()
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/src/InDetSplittedTracksCreator.cxx b/InnerDetector/InDetValidation/InDetTrackValidation/src/InDetSplittedTracksCreator.cxx
index 6c9ecefab7ef24fbde0af159caef31e7064a8673..4376a4523bb9197cd3f4bf269e6160bbb8ac9fe5 100644
--- a/InnerDetector/InDetValidation/InDetTrackValidation/src/InDetSplittedTracksCreator.cxx
+++ b/InnerDetector/InDetValidation/InDetTrackValidation/src/InDetSplittedTracksCreator.cxx
@@ -13,7 +13,7 @@
 
 /////////////////////////////////////////////////////////////////////////////
 InDet::InDetSplittedTracksCreator::InDetSplittedTracksCreator(const std::string& name, ISvcLocator* pSvcLocator) :
-AthAlgorithm(name, pSvcLocator),
+AthReentrantAlgorithm(name, pSvcLocator),
 // m_sgSvc(0),
 m_TrackCol("Tracks"),
 m_trackSplitterTool()
@@ -42,30 +42,38 @@ StatusCode InDet::InDetSplittedTracksCreator::initialize(){
    } else{ 
       ATH_MSG_VERBOSE ("Retrieved tool InDetTrackSplitterTool");
    }
-
+   ATH_CHECK( m_TrackCol.initialize() );
+   ATH_CHECK( m_OutputTrackCol.initialize() );
    return StatusCode::SUCCESS;
 }   
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-StatusCode InDet::InDetSplittedTracksCreator::execute() {
+StatusCode InDet::InDetSplittedTracksCreator::execute_r(const EventContext& ctx) const {
    ATH_MSG_DEBUG("InDetSplittedTracksCreator execute()");
    ATH_MSG_DEBUG("Input Track Collection: " << m_TrackCol);
 
    //return if no input collection is found
-   const TrackCollection* trks = 0;
-   if ((not evtStore()->contains<TrackCollection>(m_TrackCol)) or
-        (evtStore()->retrieve(trks,m_TrackCol)).isFailure()){
-      ATH_MSG_ERROR(" Could not retrieve the track collection " <<m_TrackCol);
-      return StatusCode::SUCCESS;
+   SG::ReadHandle<TrackCollection> trks(m_TrackCol,ctx);
+   if (!trks.isValid()) {
+       ATH_MSG_ERROR(" Could not retrieve the track collection " <<m_TrackCol.key() );
+       return StatusCode::SUCCESS;
    }
 
-   TrackCollection* splittedTracks=0;
-   if ((not evtStore()->contains<TrackCollection>(m_OutputTrackCol)) or
-       (evtStore()->retrieve(splittedTracks,m_OutputTrackCol)).isFailure()) {
-     splittedTracks = new TrackCollection;
-   } else {
-     ATH_MSG_WARNING("Output split track collection already exists: " << m_OutputTrackCol << ". Quitting.");
-     return StatusCode::SUCCESS;
-   }
+   // @In athenaMT the algorithm should not be scheduled if the splitted tracks exist already or they are overwritten
+   // TrackCollection* splittedTracks=0;
+   // if ((not evtStore()->contains<TrackCollection>(m_OutputTrackCol)) or
+   //     (evtStore()->retrieve(splittedTracks,m_OutputTrackCol)).isFailure()) {
+   //   splittedTracks = new TrackCollection;
+   // } else {
+   //   ATH_MSG_WARNING("Output split track collection already exists: " << m_OutputTrackCol.key() << ". Quitting.");
+   //   return StatusCode::SUCCESS;
+   // }
+
+    SG::WriteHandle<TrackCollection> splittedTracks(m_OutputTrackCol,ctx);
+    if (splittedTracks.record( std::make_unique<TrackCollection>() ).isFailure()){
+      ATH_MSG_ERROR("Failed to record output collection " << m_OutputTrackCol.key());
+      return StatusCode::FAILURE;
+    }
+
 
    //loop over tracks and split them in upper and lower part
    TrackCollection::const_iterator it = trks->begin();
@@ -73,12 +81,7 @@ StatusCode InDet::InDetSplittedTracksCreator::execute() {
    for (; it != itE; ++it){
      ATH_MSG_VERBOSE("Splitting Track");
      std::pair<Trk::Track*, Trk::Track*> splitTracks =  std::pair<Trk::Track*, Trk::Track*> (0,0);
-     if (m_makeSiOnlyTracks){
-       splitTracks = m_trackSplitterTool->splitInUpperLowerTrack(**it,true); //use Si only hits
-     }
-     else {
-       splitTracks = m_trackSplitterTool->splitInUpperLowerTrack(**it);
-     }
+     splitTracks = m_trackSplitterTool->splitInUpperLowerTrack(**it,m_makeSiOnlyTracks);
      //only save them if both track fits succeeded       
      if(splitTracks.first && splitTracks.second){
        if (m_takeUpperSegment) {
@@ -94,51 +97,13 @@ StatusCode InDet::InDetSplittedTracksCreator::execute() {
      }
        
    }
-   ATH_MSG_DEBUG("** InDetSplittedTracksCreator ** SplittedTracks->size() " << splittedTracks->size() << "  stored in " << m_OutputTrackCol );
+   ATH_MSG_DEBUG("** InDetSplittedTracksCreator ** SplittedTracks->size() " << splittedTracks->size() << "  stored in " << m_OutputTrackCol.key() );
    
-   if(evtStore()->record(splittedTracks, m_OutputTrackCol,false).isFailure() ){
-     ATH_MSG_ERROR("Could not save the "<<m_OutputTrackCol);
-   }
 
    return StatusCode::SUCCESS;
 }
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 StatusCode InDet::InDetSplittedTracksCreator::finalize() {
-    ATH_MSG_INFO("InDetSplittedTracksCreator finalize()");
+    ATH_MSG_VERBOSE("InDetSplittedTracksCreator finalize()");
     return StatusCode::SUCCESS;
 }
-
-void InDet::InDetSplittedTracksCreator::copyTrackCollection(const TrackCollection* inputTrackCol,  TrackCollection* outputTrackCol) { 
-  if(inputTrackCol && inputTrackCol->size()) {
-    ATH_MSG_VERBOSE("Size of track collection " << inputTrackCol->size());
-    // loop over tracks
-    TrackCollection::const_iterator rf,rfe=inputTrackCol->end();
-    for(rf=inputTrackCol->begin();rf!=rfe; ++rf){
-      // add track into output
-      Trk::Track* newTrack = new Trk::Track(**rf);
-      outputTrackCol->push_back(newTrack);
-    }
-  }
-}
-
-void InDet::InDetSplittedTracksCreator::copyTrackCollection(const TrackCollection* inputTrackCol_upper,const TrackCollection* inputTrackCol_lower,   TrackCollection* outputTrackCol) { 
-  if(inputTrackCol_upper && inputTrackCol_upper->size() && inputTrackCol_lower && inputTrackCol_lower->size() &&  inputTrackCol_upper->size() == inputTrackCol_lower->size()) {
-    ATH_MSG_VERBOSE ("Size of track collection upper" << inputTrackCol_upper->size());
-    ATH_MSG_VERBOSE ("Size of track collection lower" << inputTrackCol_lower->size());
-    
-    // loop over tracks
-    TrackCollection::const_iterator rfU,rfeU=inputTrackCol_upper->end();
-    TrackCollection::const_iterator rfL;//,rfeL=inputTrackCol_lower->end();
-    
-    for(rfU=inputTrackCol_upper->begin(),rfL=inputTrackCol_lower->begin();rfU!=rfeU; ++rfU,++rfL){
-      
-//     for(rfL=inputTrackCol_lower->begin();rfL!=rfeL; ++rfL){
-      // add track into output
-      Trk::Track* newTrack_U = new Trk::Track(**rfU);
-      Trk::Track* newTrack_L = new Trk::Track(**rfL);
-      outputTrackCol->push_back(newTrack_U);
-      outputTrackCol->push_back(newTrack_L);
-      
-    }
-  }
-}
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/src/PixelClusterValidationNtupleWriter.cxx b/InnerDetector/InDetValidation/InDetTrackValidation/src/PixelClusterValidationNtupleWriter.cxx
deleted file mode 100755
index f7b12603e5f8290c9ef8a36ea66b35285773ce69..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetValidation/InDetTrackValidation/src/PixelClusterValidationNtupleWriter.cxx
+++ /dev/null
@@ -1,2218 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// PixelClusterValidationNtupleWriter.cxx, (c) ATLAS Detector Software
-///////////////////////////////////////////////////////////////////
-//aldo.beati
-
-#include "InDetTrackValidation/PixelClusterValidationNtupleWriter.h"
-// Gaudi
-#include "GaudiKernel/ITHistSvc.h"
-#include "TTree.h"
-
-#include "xAODEventInfo/EventInfo.h"
-
-#include "InDetPrepRawData/PixelCluster.h"
-#include "InDetIdentifier/PixelID.h"
-#include "InDetReadoutGeometry/PixelDetectorManager.h"
-#include "InDetReadoutGeometry/PixelModuleDesign.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiLocalPosition.h"
-#include "InDetReadoutGeometry/SiCellId.h"
-
-#include "GeneratorObjects/HepMcParticleLink.h"
-#include "HepMC/GenParticle.h"
-#include "HepMC/GenEvent.h"
-#include "InDetSimEvent/SiHit.h"
-
-#include "PixelConditionsServices/IPixelOfflineCalibSvc.h"
-#include <cmath>
-#include <TMath.h>
-
-#include "GeoModelInterfaces/IGeoModelSvc.h"
-#include "PixelGeoModel/IBLParameterSvc.h"
-
-#include <string>
-
-//Beam Spot Condition
-#include "InDetBeamSpotService/IBeamCondSvc.h"
-
-#include "EventPrimitives/EventPrimitivesHelpers.h"
-#include "InDetRIO_OnTrack/PixelClusterOnTrack.h"
-
-using CLHEP::GeV;
-
-
-//----------------------------- PixelClusterValidationNtupleWriter ----------------------------
-InDet::PixelClusterValidationNtupleWriter::PixelClusterValidationNtupleWriter(const std::string& name, ISvcLocator* pSvcLocator):
-  AthAlgorithm(name,pSvcLocator),
-  m_riocontainer(0),
-  m_hitcontainer(0),
-  m_rdocontainer(0),
-  m_jo_riocontainername("PixelClusters"),
-  m_jo_hitcontainername("PixelHits"),
-  m_jo_rdocontainername("PixelRDOs"),
-  m_jo_trackCollectionName("CombinedInDetTracks"),
-  m_jo_Hits(false),
-  m_jo_MC(false),
-  m_jo_NotAssociated(false),
-  m_jo_WriteDetailedPixelInformation(false),
-  m_jo_NN(false),
-  m_jo_ToT(false),
-  m_jo_onTrack(false),
-  m_trackCollection(nullptr),
-  m_IBLAbsent(true),
-  m_IBLParameterSvc("IBLParameterSvc",name),
-  m_pixelCalib("PixelOfflineCalibSvc",name),
-  m_iBeamCondSvc("BeamCondSvc",name),
-  m_ntupleFileName("/NTUPLES/FILE1"),
-  m_ntupleDirName("FitterValidation"),
-  m_ntupleTreeName("PixelClu"),
-  m_ntupleNNTreeName("NNinput"),
-  m_pixelid(0),
-  m_nt(0),
-  m_nnt(0),
-  m_geoModel(0),
-  m_PixClusLocX(0),
-  m_PixClusLocY(0),
-  m_PixClusLocXcentroid(0),
-  m_PixClusLocYcentroid(0),
-  m_PixClusLocX_LorentzCorrection(0),
-  m_PixClusGloX(0),
-  m_PixClusGloY(0),
-  m_PixClusGloZ(0),
-  m_PixClusEta(0),
-  m_PixClusPhi(0),
-  m_PixECBarrel(0),
-  m_PixClusLayer (0),
-  m_PixEtaModule(0),
-  m_PixPhiModule(0),
-  m_PixClusGroupsize(0),
-  m_PixClusRow(0),
-  m_PixClusCol(0),
-  m_PixDeltaRow(0),
-  m_PixDeltaCol(0),
-  m_PixOmegaPhi(0),
-  m_PixOmegaEta(0),
-  m_PixClusToT(0),
-  m_PixClusCharge(0),
-  m_PixClusLvl1(0),
-  m_PixClusGanged(0),
-  m_PixClusFake(0),
-  m_PixClusAmbiguous(0),
-  m_PixClusLocXana(0),
-  m_PixClusLocYana(0),
-  m_PixClusErrX(0),
-  m_PixClusErrY(0),
-  m_PixClusEtaIndex(0),
-  m_PixClusPhiIndex(0),
-  m_PixClusChargeList(0),
-  m_PixClusToTList(0),
-  m_PixClusLVL1AList(0),
-  m_PixClusIsSplit(0),
-  m_PixClusSplitProb1(0),
-  m_PixClusSplitProb2(0),
-  m_pixHitsNum(0),
-  m_PixHitXstartpos(0),
-  m_PixHitYstartpos(0),
-  m_PixHitZstartpos(0),
-  m_PixHitXendpos(0),
-  m_PixHitYendpos(0),
-  m_PixHitZendpos(0),
-  m_PixHitBarrelEndcap(0),
-  m_PixHitLayerDisk(0),
-  m_PixHitEtaModule(0),
-  m_PixHitPhiModule(0),
-  m_PixHitEtaIndex(0),
-  m_PixHitPhiIndex(0),
-  m_PixHitAngle(0),
-  m_PixHitAngle2(0),
-  m_PixHitAngle_Lorcorr(0),
-  m_PixHitEnergyLoss(0),
-  m_PixHitTime(0),
-  m_PixHitPDGParticle(0),
-  m_PixHitFlag(0),
-  m_PixHitBarcode(0),
-  m_PixHitParticleP(0),
-  m_MC_Xpos(0),
-  m_MC_Ypos(0),
-  m_MC_IncidentAngle(0),
-  m_MC_IncidentAngle2(0),
-  m_MC_IncidentAngle_Lorcorr(0),
-  m_MC_EnergyLoss(0),
-  m_MC_Time(0),
-  m_MC_PDGParticle(0),
-  m_MC_Flag(0),
-  m_MC_Barcode(0),
-  m_MC_Momentum(0),
-  m_NotAssociated_Xpos(0),
-  m_NotAssociated_Ypos(0),
-  m_NotAssociated_BarrelEndcap(0),
-  m_NotAssociated_LayerDisk(0),
-  m_NotAssociated_EtaModule(0),
-  m_NotAssociated_PhiModule(0),
-  m_NotAssociated_IncidentAngle(0),
-  m_NotAssociated_IncidentAngle2(0),
-  m_NotAssociated_IncidentAngle_Lorcorr(0),
-  m_NotAssociated_EnergyLoss(0),
-  m_NotAssociated_Time(0),
-  m_NotAssociated_PDGParticle(0),
-  m_NotAssociated_Flag(0),
-  m_MultipleAssociated_Index(0),
-  m_NN_sizeX(0), 
-  m_NN_sizeY(0),
-  m_NN_matrixOfToT(0),
-  m_NN_vectorOfPitchesY(0),
-  m_NN_ClusterPixLayer(0),
-  m_NN_ClusterPixBarrelEC(0),
-  m_NN_phiBS(0),
-  m_NN_thetaBS(0),
-  m_NN_etaModule(0),
-  m_NN_useTrackInfo(0),
-  m_NN_columnWeightedPosition(0),
-  m_NN_rowWeightedPosition(0),
-  m_NN_localColumnWeightedPosition(0),
-  m_NN_localRowWeightedPosition(0),
-  m_NN_positionX(0),
-  m_NN_positionY(0),
-  m_NN_position_idX(0),
-  m_NN_position_idY(0),
-  m_NN_theta(0),
-  m_NN_phi(0)
-{
-  declareProperty("PixelClusterContainer", m_jo_riocontainername);
-  declareProperty("SiHitCollection",    m_jo_hitcontainername);
-  declareProperty("PixelRDOCollection", m_jo_rdocontainername);
-  declareProperty("TrackCollection", m_jo_trackCollectionName);
-  declareProperty("DoHits", m_jo_Hits);
-  declareProperty("DoMC", m_jo_MC);
-  declareProperty("WriteNNTraining", m_jo_NN);
-  declareProperty("UseToT", m_jo_ToT);
-  declareProperty("OnlyClusterOnTrack", m_jo_onTrack);
-  declareProperty("NtupleNNTreeName", m_ntupleNNTreeName);
-  declareProperty("WriteDetailedPixelInformation", m_jo_WriteDetailedPixelInformation);
-  declareProperty("FindNotAssociatedParticle", m_jo_NotAssociated);
-  declareProperty("NtupleFileName", m_ntupleFileName);
-  declareProperty("NtupleDirectoryName", m_ntupleDirName);
-  declareProperty("NtupleTreeName", m_ntupleTreeName);
-  declareProperty("PixelOfflineCalibSvc", m_pixelCalib);   
-}
-
-//----------------------------- ~PixelClusterValidationNtupleWriter ---------------------------
-InDet::PixelClusterValidationNtupleWriter::~PixelClusterValidationNtupleWriter() {}
-
-
-//----------------------------- PixelClusterValidationNtupleWriter::initialize ----------------
-StatusCode InDet::PixelClusterValidationNtupleWriter::initialize() {
-  ATH_MSG_INFO( "PixelClusterValidationNtupleWriter initialize()" );
-
-  // ----------------------------
-  // retrive pointer to THistSvc
-  // ----------------------------
-  ITHistSvc *tHistSvc;
-  StatusCode sc =  service("THistSvc", tHistSvc);
-  if ( sc.isFailure() ) {
-      ATH_MSG_ERROR( "Unable to retrieve pointer to THistSvc" );
-      return sc;
-  }
-   
-  if (m_pixelCalib.retrieve().isFailure() ) {
-      ATH_MSG_ERROR( "Failed to retrieve service " << m_pixelCalib );
-      return StatusCode::FAILURE;
-  } else 
-      ATH_MSG_DEBUG( "Retrieved service " << m_pixelCalib );
-     
-  // ----------------------------
-  // create tree and register it to THistSvc
-  // ----------------------------
-  m_nt = new TTree(TString(m_ntupleTreeName), "Clusters");
-  // NB: we must not delete the tree, this is done by THistSvc
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/"+m_ntupleDirName+"/"+m_ntupleTreeName;
-  sc = tHistSvc->regTree(fullNtupleName, m_nt);
-  if (sc.isFailure()) {
-      ATH_MSG_ERROR( "Unable to register TTree: " << fullNtupleName );
-      return sc;
-  }
-
-  
-  if(m_jo_NN){    
-    m_nnt = new TTree(TString(m_ntupleNNTreeName), "NNtraining");
-    // NB: we must not delete the tree, this is done by THistSvc
-    std::string fullNtupleName =  "/"+m_ntupleFileName+"/"+m_ntupleDirName+"/"+m_ntupleNNTreeName;
-    ATH_MSG_INFO( "NNTraining TTree: " << fullNtupleName );
-
-    sc = tHistSvc->regTree(fullNtupleName, m_nnt);
-    if (sc.isFailure()) {
-      ATH_MSG_ERROR( "Unable to register TTree: " << fullNtupleName );
-      return sc;
-    }
-  }
-
-  if (m_iBeamCondSvc.retrieve().isFailure())
-  {
-    msg(MSG::ERROR) << "Could not find BeamCondSvc." << endmsg;
-    return StatusCode::FAILURE;
-  }
-    
-  if (m_IBLParameterSvc.retrieve().isFailure()) {
-    ATH_MSG_WARNING( "Could not retrieve IBLParameterSvc");
-  }
-  else {
-    m_IBLParameterSvc->setBoolParameters(m_IBLAbsent,"IBLAbsent");
-  } 
-    
-    
-  m_slhc_layer_flip_1 = -1;
-  m_slhc_layer_flip_2 = -1;
-  m_slhc_layer_flip_3 = -1;  
-    
-    
-  // ----------------------------
-  // get the geometry
-  // ----------------------------  
-
-  if ( !m_IBLAbsent ) {
-    ATH_MSG_INFO("Found IBL+Atlas"  );
-    m_geoId = GEO_IBL;
-    m_pitchY = ATLASPITCHY; //nb. only the inner layer has a different _pitchY, This case is tested later
-  }
-  //
-  //// Cartigny Layout
-  else if (m_geoModel->atlasVersion().find("ATLAS-SLHC-01-02")!=std::string::npos) {
-    ATH_MSG_INFO("Found ATLAS SLHC Cartigny/LoI Layout: " << m_geoModel->atlasVersion() );
-    m_geoId = GEO_SLHC2;
-    m_pitchY = SLHCPITCHY; // Def to .25, if layer <0 pitch to .15 (see below L1916) 
-    // In ATLAS_SLHC_01-02-01 layers 0, 2 & 4, Odd eta modules are fliped.
-    m_slhc_layer_flip_1 = 0;
-    m_slhc_layer_flip_2 = 2;
-    m_slhc_layer_flip_3 = 4;  
-
-  } else if (m_geoModel->atlasVersion().find("SLHC")!=std::string::npos) {
-    ATH_MSG_INFO("Found SLHC Atlas Version from geomodel: " << m_geoModel->atlasVersion() );
-    m_geoId = GEO_SLHC;
-    m_pitchY = SLHCPITCHY;
-    // In layers 0,1 and 5, Odd eta modules are fliped.
-    m_slhc_layer_flip_1 = 0;
-    m_slhc_layer_flip_2 = 1;
-    m_slhc_layer_flip_3 = 5;  
-  }else {
-    ATH_MSG_INFO("No UPGRADE Geometry Version found from geomodel: " << m_geoModel->atlasVersion() << " Assuming Run1 Geometry" );
-    m_geoId = GEO_ATLAS;
-    m_pitchY = ATLASPITCHY;
-  }
-
-
-
-
-
-  // if you want to write the NN input you also need pixel detailed info 
-  // if(m_jo_NN){   m_jo_Hits = true; m_jo_MC = true;  m_jo_NotAssociated= true; }
-  
-  
-  if (detStore()->retrieve(m_pixelid, "PixelID").isFailure()) {
-    ATH_MSG_FATAL ("Could not get Pixel ID helper");
-    return StatusCode::FAILURE;
-  }
-
-  StatusCode scg = service("GeoModelSvc",m_geoModel);
-  if (scg.isFailure()) {
-    ATH_MSG_FATAL ("GeoModelSvc not found !");
-    return StatusCode::FAILURE;
-  }
-    
-  // ----------------------------
-  // add items
-  // ----------------------------
-  // event info:
-  // ----------------------------
-  // sc = nt->addItem("TRT_RunNumber", m_runNumber) ;       // Run number
-  m_nt->Branch("PixelEventNumber", &m_eventNumber, "event_number/I") ;   // Event number
-  //m_nt->Branch("PixelnRIOs", &m_nRIOs,       "Number_of_RIOs/I") ;   // number of Pixel RIOs
-  m_nt->Branch("PixelClusNum", &m_pixClusNum, "number_cluster_per_event/I") ; // number of clusters per event
-  m_nt->Branch("LVL1TriggerType", &m_lvl1TriggerType, "type_of_trigger/I");
-
-  // ----------------------------
-  // RIO info:
-  // ----------------------------
-  m_PixClusLocX = new std::vector<float>();
-  m_PixClusLocY = new std::vector<float>();
-  m_PixClusLocXcentroid = new std::vector<float>();
-  m_PixClusLocYcentroid = new std::vector<float>();
-  m_PixClusLocX_LorentzCorrection = new std::vector<float>();
-  m_PixClusGloX = new std::vector<float>();
-  m_PixClusGloY = new std::vector<float>();
-  m_PixClusGloZ = new std::vector<float>();
-  m_PixClusEta = new std::vector<float>();
-  m_PixClusPhi = new std::vector<float>();
-  m_PixECBarrel = new std::vector<float>();
-  m_PixClusLayer = new std::vector<float>();
-  m_PixEtaModule = new std::vector<float>();
-  m_PixPhiModule = new std::vector<float>();
-  m_PixClusGroupsize = new std::vector<float>();
-  m_PixClusRow = new std::vector<float>();
-  m_PixClusCol = new std::vector<float>();
-  m_PixDeltaRow = new std::vector<int>();
-  m_PixDeltaCol = new std::vector<int>();
-  m_PixOmegaPhi = new std::vector<float>();
-  m_PixOmegaEta = new std::vector<float>();
-  m_PixClusToT = new std::vector<int>();
-  m_PixClusCharge = new std::vector<float>();
-  m_PixClusLvl1 = new std::vector<int>();
-  m_PixClusGanged = new std::vector<int>();
-  m_PixClusFake = new std::vector<int>();
-  m_PixClusAmbiguous = new std::vector<int>();
-  m_PixClusLocXana = new std::vector<float>();
-  m_PixClusLocYana = new std::vector<float>();
-  m_PixClusErrX = new std::vector<float>();
-  m_PixClusErrY = new std::vector<float>();
-  m_PixClusEtaIndex = new std::vector<std::vector<int> >();
-  m_PixClusPhiIndex = new std::vector<std::vector<int> >();
-  m_PixClusChargeList = new std::vector<std::vector<float> >();
-  m_PixClusToTList = new std::vector<std::vector<int> >();
-  m_PixClusLVL1AList = new std::vector<std::vector<int> >();
-  m_PixClusIsSplit = new std::vector<int>();
-  m_PixClusSplitProb1 = new std::vector<float>();
-  m_PixClusSplitProb2 = new std::vector<float>();
-
-
-  m_nt->Branch("PixClusLocX", &m_PixClusLocX);
-  m_nt->Branch("PixClusLocY", &m_PixClusLocY);
-  m_nt->Branch("PixClusLocXcentroid", &m_PixClusLocXcentroid);
-  m_nt->Branch("PixClusLocYcentroid", &m_PixClusLocYcentroid);
-  m_nt->Branch("PixClusLocX_LorentzCorrection", &m_PixClusLocX_LorentzCorrection);
-  m_nt->Branch("PixClusGloX", &m_PixClusGloX);
-  m_nt->Branch("PixClusGloY", &m_PixClusGloY);
-  m_nt->Branch("PixClusGloZ", &m_PixClusGloZ);
-  m_nt->Branch("PixClusEta", &m_PixClusEta);
-  m_nt->Branch("PixClusPhi", &m_PixClusPhi);
-  m_nt->Branch("PixECBarrel", &m_PixECBarrel);
-  m_nt->Branch("PixClusLayer", &m_PixClusLayer);
-  m_nt->Branch("PixEtaModule", &m_PixEtaModule);
-  m_nt->Branch("PixPhiModule", &m_PixPhiModule);
-  m_nt->Branch("PixClusGroupsize", &m_PixClusGroupsize);
-  m_nt->Branch("PixClusRow", &m_PixClusRow);
-  m_nt->Branch("PixClusCol", &m_PixClusCol);
-  m_nt->Branch("PixDeltaRow", &m_PixDeltaRow);
-  m_nt->Branch("PixDeltaCol", &m_PixDeltaCol);
-  m_nt->Branch("PixOmegaPhi", &m_PixOmegaPhi);
-  m_nt->Branch("PixOmegaEta", &m_PixOmegaEta);
-  m_nt->Branch("PixClusToT", &m_PixClusToT);
-  m_nt->Branch("PixClusCharge", &m_PixClusCharge);
-  m_nt->Branch("PixClusLvl1", &m_PixClusLvl1);
-  m_nt->Branch("PixClusGanged", &m_PixClusGanged);
-  m_nt->Branch("PixClusFake", &m_PixClusFake);
-  m_nt->Branch("PixClusAmbiguous", &m_PixClusAmbiguous);
-  m_nt->Branch("PixClusIsSplit", &m_PixClusIsSplit);
-  m_nt->Branch("PixClusSplitProb1", &m_PixClusSplitProb1);
-  m_nt->Branch("PixClusSplitProb2", &m_PixClusSplitProb2);
-  m_nt->Branch("PixClusErrX", &m_PixClusErrX);
-  m_nt->Branch("PixClusErrY", &m_PixClusErrY);
-
-
-  if ( m_jo_WriteDetailedPixelInformation ){
-    ATH_MSG_INFO("Creating branches for detailed pixel information");
-    m_nt->Branch("PixClusEtaIndex",&m_PixClusEtaIndex) ;
-    m_nt->Branch("PixClusPhiIndex",&m_PixClusPhiIndex) ;
-    m_nt->Branch("PixClusChargeList",&m_PixClusChargeList) ;
-    m_nt->Branch("PixClusToTList",&m_PixClusToTList) ;
-    m_nt->Branch("PixClusLVLAList",&m_PixClusLVL1AList) ;
-  }
-
-  // ----------------------------
-  // Hit info:
-  // ----------------------------
-  m_PixHitXstartpos = new std::vector<float>();
-  m_PixHitYstartpos = new std::vector<float>();
-  m_PixHitZstartpos = new std::vector<float>();
-  m_PixHitXendpos = new std::vector<float>();
-  m_PixHitYendpos = new std::vector<float>();
-  m_PixHitZendpos = new std::vector<float>();
-  m_PixHitBarrelEndcap = new std::vector<int>();
-  m_PixHitLayerDisk = new std::vector<int>();
-  m_PixHitEtaModule = new std::vector<int>();
-  m_PixHitPhiModule = new std::vector<int>();
-  m_PixHitEtaIndex = new std::vector<int>();
-  m_PixHitPhiIndex = new std::vector<int>();
-  m_PixHitAngle = new std::vector<float>();
-  m_PixHitAngle2 = new std::vector<float>();
-  m_PixHitAngle_Lorcorr = new std::vector<float>();
-  m_PixHitEnergyLoss = new std::vector<float>();
-  m_PixHitTime = new std::vector<float>();
-  m_PixHitPDGParticle = new std::vector<int>();
-  m_PixHitFlag = new std::vector<int>();
-  m_PixHitBarcode = new std::vector<int>();
-  m_PixHitParticleP = new std::vector<float>();
-//    m_PixHitEtaIndex_delta = new std::vector<int>();
-//    m_PixHitPhiIndex_delta = new std::vector<int>();
-
-  // ----------------------------
-  // Particle info:
-  // ----------------------------
-  m_MC_Xpos = new std::vector<float>();
-  m_MC_Ypos = new std::vector<float>();
-  m_MC_IncidentAngle = new std::vector<float>();
-  m_MC_IncidentAngle2 = new std::vector<float>();
-  m_MC_IncidentAngle_Lorcorr = new std::vector<float>();
-  m_MC_EnergyLoss = new std::vector<float>();
-  m_MC_Time = new std::vector<float>();
-  m_MC_PDGParticle = new std::vector<int>();
-  m_MC_Flag = new std::vector<int>();
-  m_MC_Barcode = new std::vector<int>();
-  m_MC_Momentum = new std::vector<float>();
-
-  m_MultipleAssociated_Index = new std::vector<std::vector<int> >();
-
-  // ----------------------------
-  // Not Associated Particle info:
-  // ----------------------------
-  m_NotAssociated_Xpos = new std::vector<float>();
-  m_NotAssociated_Ypos = new std::vector<float>();
-  m_NotAssociated_BarrelEndcap = new std::vector<int>();
-  m_NotAssociated_LayerDisk = new std::vector<int>();
-  m_NotAssociated_EtaModule = new std::vector<int>();
-  m_NotAssociated_PhiModule = new std::vector<int>();
-  m_NotAssociated_IncidentAngle = new std::vector<float>();
-  m_NotAssociated_IncidentAngle2 = new std::vector<float>();
-  m_NotAssociated_IncidentAngle_Lorcorr = new std::vector<float>();
-  m_NotAssociated_EnergyLoss = new std::vector<float>();
-  m_NotAssociated_Time = new std::vector<float>();
-  m_NotAssociated_PDGParticle = new std::vector<int>();
-  m_NotAssociated_Flag = new std::vector<int>();
-
-/// ----------------------------------
-/// NN training INFO
-/// ----------------------------------
-
-  m_NN_sizeX = new std::vector<int>(); 
-  m_NN_sizeY = new std::vector<int>() ; 
-  //    m_NN_matrixOfToT = new std::vector<std::vector<std::vector<float> > >();
-  m_NN_matrixOfToT = new std::vector<std::vector<float> > ();
-  m_NN_vectorOfPitchesY= new std::vector<std::vector<float> >();
-  m_NN_ClusterPixLayer= new std::vector<int>();
-  m_NN_ClusterPixBarrelEC= new std::vector<int>();
-  m_NN_phiBS= new std::vector<float>() ;
-  m_NN_thetaBS= new std::vector<float>();
-  m_NN_etaModule= new std::vector<float>();
-  m_NN_useTrackInfo= new std::vector<bool>() ; 
-  m_NN_columnWeightedPosition= new std::vector<int>() ;
-  m_NN_localRowWeightedPosition= new std::vector<double>();
-  m_NN_localColumnWeightedPosition= new std::vector<double>() ;
-  m_NN_rowWeightedPosition= new std::vector<int>();
-  m_NN_positionX = new std::vector<std::vector<float> > ();
-  m_NN_positionY = new std::vector<std::vector<float> > ();
-  m_NN_position_idX = new std::vector<std::vector<float> > ();
-  m_NN_position_idY = new std::vector<std::vector<float> > ();
-  m_NN_theta = new std::vector<std::vector<float> > ();
-  m_NN_phi = new std::vector<std::vector<float> > ();
-  m_NN_pdgid = new std::vector<std::vector<int> > ();
-  m_NN_barcode = new std::vector<std::vector<int> > ();
-  m_NN_momentum = new std::vector<std::vector<float> > ();
-  m_NN_distanceX = new std::vector<std::vector<float> > ();
-  m_NN_distanceY = new std::vector<std::vector<float> > ();
-
-
-  if (m_jo_NN==true) {
-    m_nnt->Branch("NN_sizeX", &m_NN_sizeX);
-    m_nnt->Branch("NN_sizeY", &m_NN_sizeY);
-    m_nnt->Branch("NN_matrixOfToT", &m_NN_matrixOfToT);
-    m_nnt->Branch("NN_vectorOfPitchesY", &m_NN_vectorOfPitchesY);
-    m_nnt->Branch("NN_ClusterPixLayer" ,&m_NN_ClusterPixLayer);
-    m_nnt->Branch("NN_ClusterPixBarrelEC", &m_NN_ClusterPixBarrelEC);
-    m_nnt->Branch("NN_phiBS", &m_NN_phiBS);
-    m_nnt->Branch("NN_thetaBS",&m_NN_thetaBS);
-    m_nnt->Branch("NN_etaModule",&m_NN_etaModule);
-    m_nnt->Branch("NN_useTrackInfo", &m_NN_useTrackInfo);
-    m_nnt->Branch("NN_columnWeightedPosition", &m_NN_columnWeightedPosition);
-    m_nnt->Branch("NN_rowWeightedPosition", &m_NN_rowWeightedPosition);
-    m_nnt->Branch("NN_localColumnWeightedPosition", &m_NN_localColumnWeightedPosition);
-    m_nnt->Branch("NN_localRowWeightedPosition", &m_NN_localRowWeightedPosition);
-
-    m_nnt->Branch("NN_positionX", &m_NN_positionX);
-    m_nnt->Branch("NN_positionY", &m_NN_positionY);
-    m_nnt->Branch("NN_position_idX", &m_NN_position_idX);
-    m_nnt->Branch("NN_position_idY", &m_NN_position_idY);
-    m_nnt->Branch("NN_theta", &m_NN_theta);
-    m_nnt->Branch("NN_phi", &m_NN_phi);
-    
-    
-    m_nnt->Branch("NN_pdgid", &m_NN_pdgid);
-    m_nnt->Branch("NN_barcode", &m_NN_barcode);
-    m_nnt->Branch("NN_momentum", &m_NN_momentum); 
-    m_nnt->Branch("NN_distanceX", &m_NN_distanceX);
-    m_nnt->Branch("NN_distanceY", &m_NN_distanceY);
-    
-
-  }
-    
-  if (m_jo_Hits==true) {
-    m_nt->Branch("PixelHitsNum", &m_pixHitsNum, "number_hits_per_event/I") ; // number of hits per event
-    m_nt->Branch("PixHitXstartpos", &m_PixHitXstartpos);
-    m_nt->Branch("PixHitYstartpos", &m_PixHitYstartpos);
-    m_nt->Branch("PixHitZstartpos", &m_PixHitZstartpos);
-    m_nt->Branch("PixHitXendpos", &m_PixHitXendpos);
-    m_nt->Branch("PixHitYendpos", &m_PixHitYendpos);
-    m_nt->Branch("PixHitZendpos", &m_PixHitZendpos);
-    m_nt->Branch("PixHitBarrelEndcap", &m_PixHitBarrelEndcap);
-    m_nt->Branch("PixHitLayerDisk", &m_PixHitLayerDisk);
-    m_nt->Branch("PixHitEtaModule", &m_PixHitEtaModule);
-    m_nt->Branch("PixHitPhiModule", &m_PixHitPhiModule);
-    m_nt->Branch("PixHitEtaIndex", &m_PixHitEtaIndex);
-    m_nt->Branch("PixHitPhiIndex", &m_PixHitPhiIndex);
-    m_nt->Branch("PixHitAngle", &m_PixHitAngle);
-    m_nt->Branch("PixHitAngle2", &m_PixHitAngle2);
-    m_nt->Branch("PixHitAngle_Lorcorr", &m_PixHitAngle_Lorcorr);
-    m_nt->Branch("PixHitEnergyLoss", &m_PixHitEnergyLoss);
-    m_nt->Branch("PixHitTime", &m_PixHitTime);
-    m_nt->Branch("PixHitPDGParticle", &m_PixHitPDGParticle);
-    m_nt->Branch("PixHitFlag", &m_PixHitFlag);
-    m_nt->Branch("PixHitBarcode", &m_PixHitBarcode);
-    m_nt->Branch("PixHitParticleP", &m_PixHitParticleP);
-  }
-
-  if (m_jo_MC==true) {
-    m_nt->Branch("MC_Xpos", &m_MC_Xpos);
-    m_nt->Branch("MC_Ypos", &m_MC_Ypos);
-    m_nt->Branch("MC_IncidentAngle", &m_MC_IncidentAngle);
-    m_nt->Branch("MC_IncidentAngle2", &m_MC_IncidentAngle2);
-    m_nt->Branch("MC_IncidentAngle_Lorcorr", &m_MC_IncidentAngle_Lorcorr);
-    m_nt->Branch("MC_EnergyLoss", &m_MC_EnergyLoss);
-    m_nt->Branch("MC_Time", &m_MC_Time);
-    m_nt->Branch("MC_PDGParticle", &m_MC_PDGParticle);
-    m_nt->Branch("MC_Flag", &m_MC_Flag);
-    m_nt->Branch("MC_Barcode", &m_MC_Barcode);
-    m_nt->Branch("MC_Momentum", &m_MC_Momentum);
-
-    m_nt->Branch("PixClusLocXana", &m_PixClusLocXana);
-    m_nt->Branch("PixClusLocYana", &m_PixClusLocYana);
-    //      m_nt->Branch("PixClusErrX", &m_PixClusErrX);
-    //  m_nt->Branch("PixClusErrY", &m_PixClusErrY);
-
-    m_nt->Branch("MultipleAssociatedIndex",&m_MultipleAssociated_Index);
-  }
-
-  if (m_jo_NotAssociated==true) {
-    m_nt->Branch("NotAssociated_Xpos", &m_NotAssociated_Xpos);
-    m_nt->Branch("NotAssociated_Ypos", &m_NotAssociated_Ypos);
-    m_nt->Branch("NotAssociated_BarrelEndcap", &m_NotAssociated_BarrelEndcap);
-    m_nt->Branch("NotAssociated_LayerDisk", &m_NotAssociated_LayerDisk);
-    m_nt->Branch("NotAssociated_EtaModule", &m_NotAssociated_EtaModule);
-    m_nt->Branch("NotAssociated_PhiModule", &m_NotAssociated_PhiModule);
-    m_nt->Branch("NotAssociated_IncidentAngle", &m_NotAssociated_IncidentAngle);
-    m_nt->Branch("NotAssociated_IncidentAngle2", &m_NotAssociated_IncidentAngle2);
-    m_nt->Branch("NotAssociated_IncidentAngle_Lorcorr", &m_NotAssociated_IncidentAngle_Lorcorr);
-    m_nt->Branch("NotAssociated_EnergyLoss", &m_NotAssociated_EnergyLoss);
-    m_nt->Branch("NotAssociated_Time", &m_NotAssociated_Time);
-    m_nt->Branch("NotAssociated_PDGParticle", &m_NotAssociated_PDGParticle);
-    m_nt->Branch("NotAssociated_Flag", &m_NotAssociated_Flag);
-  }
-  return sc;
-}
-
-//----------------------------- PixelClusterValidationNtupleWriter::execute -------------------
-StatusCode InDet::PixelClusterValidationNtupleWriter::execute() {
-   
-  // ----------------------------
-  // get the container with Pixel RIOs and HITs
-  // ----------------------------
-  m_riocontainer = 0;
-  StatusCode sc = evtStore()->retrieve(m_riocontainer, m_jo_riocontainername);
-  if (sc.isFailure()) {
-    ATH_MSG_ERROR( "Could not get PrepRawDataContainer" );
-    return StatusCode::FAILURE;
-  }
-
-  m_hitcontainer = 0;
-  if ( m_jo_Hits || m_jo_MC || m_jo_NotAssociated || m_jo_NN) {
-    sc = evtStore()->retrieve(m_hitcontainer, m_jo_hitcontainername);
-    if (sc.isFailure()) {
-      ATH_MSG_ERROR( "Could not get SiHitCollection" );
-      return StatusCode::FAILURE;
-    }
-  }
-
-  if ( m_jo_WriteDetailedPixelInformation ) {
-    sc = evtStore()->retrieve(m_rdocontainer, m_jo_rdocontainername);
-    if ( sc.isFailure() ) {
-      ATH_MSG_WARNING( "Could not find container " << m_jo_rdocontainername <<" : disabling detailed information output" );
-      m_rdocontainer = 0;
-      m_jo_WriteDetailedPixelInformation = false;
-    }
-  }
-  m_trackCollection=0;
-  if( m_jo_onTrack){
-    sc = evtStore()->retrieve(m_trackCollection,m_jo_trackCollectionName);
-    if ( sc.isFailure() ){
-      ATH_MSG_ERROR("Could not retrieve TrackCollection '" << m_jo_trackCollectionName << "'.");
-      return StatusCode::FAILURE;
-    }
-  }
-
-    // ----------------------------
-  // get the event number
-  // ----------------------------
-  const xAOD::EventInfo* eventInfo;
-  sc = evtStore()->retrieve(eventInfo);
-  if (sc.isFailure()) {
-      ATH_MSG_ERROR( "Could not retrieve event info" );
-  }
-  m_eventNumber = eventInfo->eventNumber();
-  m_lvl1TriggerType = eventInfo->level1TriggerType();
-
-  //    int iterator_eventnumber=-1;
-  //    int RIOindex = 0;
-  //    const int maxRIO_size = 1000000;
-  int HITindex = 0;
-  m_nRIOs = 0;
-  m_PixClusLocX->clear();
-  m_PixClusLocY->clear();
-  m_PixClusLocXcentroid->clear();
-  m_PixClusLocYcentroid->clear();
-  m_PixClusLocX_LorentzCorrection->clear();
-  m_PixClusGloX->clear();
-  m_PixClusGloY->clear();
-  m_PixClusGloZ->clear();
-  m_PixClusEta->clear();
-  m_PixClusPhi->clear();
-  m_PixECBarrel->clear();
-  m_PixClusLayer->clear() ;
-  m_PixEtaModule->clear();
-  m_PixPhiModule->clear();
-  m_PixClusGroupsize->clear();
-  m_PixClusRow->clear();
-  m_PixClusCol->clear();
-  m_PixDeltaRow->clear();
-  m_PixDeltaCol->clear();
-  m_PixOmegaPhi->clear();
-  m_PixOmegaEta->clear();
-  m_PixClusToT->clear();
-  m_PixClusCharge->clear();
-  m_PixClusLvl1->clear();
-  m_PixClusGanged->clear();
-  m_PixClusFake->clear();
-  m_PixClusAmbiguous->clear();
-  m_PixClusLocXana->clear();
-  m_PixClusLocYana->clear();
-  m_PixClusErrX->clear();
-  m_PixClusErrY->clear();
-  m_PixClusEtaIndex->clear();
-  m_PixClusPhiIndex->clear();
-  m_PixClusChargeList->clear();
-  m_PixClusToTList->clear();
-  m_PixClusLVL1AList->clear();
-  m_PixClusIsSplit->clear();
-  m_PixClusSplitProb1->clear();
-  m_PixClusSplitProb2->clear();
-  m_PixHitXstartpos->clear();
-  m_PixHitYstartpos->clear();
-  m_PixHitZstartpos->clear();
-  m_PixHitXendpos->clear();
-  m_PixHitYendpos->clear();
-  m_PixHitZendpos->clear();
-  m_PixHitBarrelEndcap->clear();
-  m_PixHitLayerDisk->clear();
-  m_PixHitEtaModule->clear();
-  m_PixHitPhiModule->clear();
-  m_PixHitEtaIndex->clear();
-  m_PixHitPhiIndex->clear();
-  m_PixHitAngle->clear();
-  m_PixHitAngle2->clear();
-  m_PixHitAngle_Lorcorr->clear();
-  m_PixHitEnergyLoss->clear();
-  m_PixHitTime->clear();
-  m_PixHitPDGParticle->clear();
-  m_PixHitFlag->clear();
-  m_PixHitBarcode->clear();
-  m_PixHitParticleP->clear();
-  m_MultipleAssociated_Index->clear();
-//    m_PixHitEtaIndex_delta->clear();
-//    m_PixHitPhiIndex_delta->clear();
-  
-  m_MC_Xpos->clear();
-  m_MC_Ypos->clear();
-  m_MC_IncidentAngle->clear();
-  m_MC_IncidentAngle2->clear();
-  m_MC_IncidentAngle_Lorcorr->clear();
-  m_MC_EnergyLoss->clear();
-  m_MC_Time->clear();
-  m_MC_PDGParticle->clear();
-  m_MC_Flag->clear();
-  m_MC_Barcode->clear();
-  m_MC_Momentum->clear();
-
-  m_NotAssociated_Xpos->clear();
-  m_NotAssociated_Ypos->clear();
-  m_NotAssociated_BarrelEndcap->clear();
-  m_NotAssociated_LayerDisk->clear();
-  m_NotAssociated_EtaModule->clear();
-  m_NotAssociated_PhiModule->clear();
-  m_NotAssociated_IncidentAngle->clear();
-  m_NotAssociated_IncidentAngle2->clear();
-  m_NotAssociated_IncidentAngle_Lorcorr->clear();
-  m_NotAssociated_EnergyLoss->clear();
-  m_NotAssociated_Time->clear();
-  m_NotAssociated_PDGParticle->clear();
-  m_NotAssociated_Flag->clear();
-
-
-  m_NN_sizeX->clear();
-  m_NN_sizeY->clear();
-  m_NN_matrixOfToT->clear();
-  m_NN_vectorOfPitchesY->clear();
-  m_NN_ClusterPixLayer->clear();
-  m_NN_ClusterPixBarrelEC->clear();
-  m_NN_phiBS->clear();
-  m_NN_thetaBS->clear();
-  m_NN_etaModule->clear();
-  m_NN_useTrackInfo->clear();
-  m_NN_columnWeightedPosition->clear();
-  m_NN_rowWeightedPosition->clear();
-  m_NN_localColumnWeightedPosition->clear();
-  m_NN_localRowWeightedPosition->clear();
-
-  m_NN_positionX->clear();
-  m_NN_positionY->clear();
-  m_NN_position_idX->clear();
-  m_NN_position_idY->clear();
-
-  m_NN_theta->clear();
-  m_NN_phi->clear();
-  
-  m_NN_pdgid->clear();
-  m_NN_barcode->clear();
-  m_NN_momentum->clear();
-  m_NN_distanceX->clear();
-  m_NN_distanceY->clear();
-
-  ATH_MSG_DEBUG( "Variables Cleared" );
-
-  //  A vector of NNinput (struct)  one element for each cluster
-  //    std::vector<NNinput*>* input =  new std::vector<NNinput*>();
-  //    NNinput* input;
-
-
-  // ----------------------------
-  // get all the RIO_Collections in the container
-  // ----------------------------
-
-
-  if(!m_jo_onTrack){
-      
-    InDet::PixelClusterContainer::const_iterator containerIterator = m_riocontainer->begin();
-    for ( ; containerIterator != m_riocontainer->end(); containerIterator++) { // loop1
-      ATH_MSG_DEBUG( "There are " << (*containerIterator)->size() << " entries in the PrepRawDataCollection" );
-      const PixelClusterCollection *colNext=(*containerIterator);
-      if (!colNext) {
-        continue;
-      }
-      Identifier colID = colNext->identify();
-      IdentifierHash element_hash = m_pixelid->wafer_hash(colID);
-      DataVector<PixelCluster>::const_iterator p_clus;
-
-      for (p_clus=colNext->begin(); p_clus!=colNext->end(); ++p_clus) {
-        const PixelCluster& cluster = **p_clus;
-        sc = fillClusterVector(cluster, element_hash);
-        if(sc.isFailure()){
-          ATH_MSG_ERROR( "Could not fill cluster vectors" );
-        }
-      }
-    }    
-  }else{
-    TrackCollection::const_iterator tcIter    = m_trackCollection->begin();
-    TrackCollection::const_iterator tcIterEnd = m_trackCollection->end();
-    for ( ; tcIter != tcIterEnd; ++tcIter ){
- 
- 
-      const DataVector<const Trk::MeasurementBase>* measurements = (*tcIter)->measurementsOnTrack();
- 
-      DataVector<const Trk::MeasurementBase>::const_iterator mIter    =  measurements->begin();
-      DataVector<const Trk::MeasurementBase>::const_iterator mIterEnd =  measurements->end();
- 
- 
-      int countMeasurements=0;
- 
-      for ( ; mIter != mIterEnd; ++mIter,++countMeasurements){
-   
-   
-        // cast to Pixel cluster
-        const InDet::PixelClusterOnTrack* pcot = dynamic_cast<const InDet::PixelClusterOnTrack*>(*mIter);
-   
-        if(!pcot)continue;
-   
-        //      for (p_clus=colNext->begin(); p_clus!=colNext->end(); ++p_clus) {
-   
-        const InDet::PixelCluster* pCluster  = pcot->prepRawData();
-        const InDet::PixelCluster cluster = *pCluster;
- 
-        const InDetDD::SiDetectorElement* element = pCluster->detectorElement(); 
-        if(!element) continue;   // return 0;
-        IdentifierHash      element_hash  = element->identifyHash(); 
-
-        sc = fillClusterVector(cluster, element_hash);
-        if(sc.isFailure()){
-          ATH_MSG_ERROR( "Could not fill cluster vectors" );
-        }
-      }
-    }   
-  }
-  m_pixClusNum = m_nRIOs;
-
-  // ----------------------------
-  // get all the SiHITs_Collections in the container
-  // ----------------------------
-  if ( m_jo_Hits || m_jo_MC ||  m_jo_NotAssociated || m_jo_NN ) {
-    SiHitCollection::const_iterator collectionIterator = m_hitcontainer->begin();
-    ATH_MSG_DEBUG( "Found " << m_hitcontainer->size() << " SiHit " );
-    int k=0;
-    for ( ; collectionIterator != m_hitcontainer->end(); collectionIterator++) {
-      k++;
-      ATH_MSG_DEBUG( "There are entries in the SiHitCollection" );
-
-      const SiHit *curHit = &(*collectionIterator);
-
-      const HepMcParticleLink& pLink = (*curHit).particleLink();
-      const HepMC::GenParticle* genP = pLink.cptr();
-        
-      if( genP ) {
-       //if (genP->pdg_id() != 22) std::cout << "Low energy truth particle: "   << genP->barcode() << " "<< genP->pdg_id() << "  with Energy: " << sqrt( pow( genP->momentum().px(), 2 ) + pow( genP->momentum().py(), 2 ) +pow( genP->momentum().pz(), 2 ) ) / GeV << std::endl;
-        //(*curHit).print();
-        //if( genP->momentum().e() < 1 * MeV ) print = true;
-        //std::cout << "Position diff: " << (*curHit).localEndPosition()-(*curHit).localStartPosition() << std::endl;
-        m_PixHitPDGParticle->push_back(genP->pdg_id());
-        m_PixHitBarcode->push_back( genP->barcode()  );
-        m_PixHitParticleP->push_back(  sqrt( pow( genP->momentum().px(), 2 ) + pow( genP->momentum().py(), 2 ) +pow( genP->momentum().pz(), 2 ) ) / GeV );
-      } else {
-        m_PixHitPDGParticle->push_back(0);
-        m_PixHitBarcode->push_back( -1000 );
-        m_PixHitParticleP->push_back(  -1000 );
-      }
-      
-          
-           
-
-      m_PixHitXstartpos->push_back(float((*curHit).localStartPosition().x()));
-      m_PixHitYstartpos->push_back(float((*curHit).localStartPosition().y()));
-      m_PixHitZstartpos->push_back(float((*curHit).localStartPosition().z()));
-
-      double Energy;
-      Energy = (*curHit).energyLoss()/GeV;
-      int flag = 0;
-
-      SiHitCollection::const_iterator compColl = collectionIterator+1; //m_hitcontainer->begin();
-
-      while (fabs((*curHit).localEndPosition().x())<0.124995) {
-        if (FindNextHit(curHit,compColl)!=0) {
-          const SiHit *nextHit = FindNextHit(curHit,compColl);
-
-          double ang=((*curHit).localEndPosition()-(*curHit).localStartPosition()).angle((*nextHit).localEndPosition()-(*nextHit).localStartPosition());
-
-          if (ang < 0.03) {
-            curHit = FindNextHit(curHit,compColl);
-            Energy += (*curHit).energyLoss()/GeV;
-            flag = 1;
-            compColl++;
-          } else {
-            curHit = FindNextHit(curHit,compColl);
-            Energy += (*curHit).energyLoss()/GeV;
-            flag = 10;
-            compColl++;
-          }
-        } else {
-          flag = 2;
-          break;
-        }
-        collectionIterator++;
-      }
-
-      m_PixHitXendpos->push_back(float((*curHit).localEndPosition().x()));
-      m_PixHitYendpos->push_back(float((*curHit).localEndPosition().y()));
-      m_PixHitZendpos->push_back(float((*curHit).localEndPosition().z()));
-
-      if ((*curHit).getBarrelEndcap()==1) m_PixHitBarrelEndcap->push_back(int((*curHit).getBarrelEndcap())*(-2));
-      else m_PixHitBarrelEndcap->push_back(int((*curHit).getBarrelEndcap()));
-      m_PixHitLayerDisk->push_back(int((*curHit).getLayerDisk()));
-      m_PixHitEtaModule->push_back(int((*curHit).getEtaModule()));
-      m_PixHitPhiModule->push_back(int((*curHit).getPhiModule()));
-
-      m_PixHitEnergyLoss->push_back(float(Energy));
-
-      const PixelID* PID = dynamic_cast<const PixelID*>(m_pixelid);
-      Identifier id = PID->wafer_id((*curHit).getBarrelEndcap(), (*curHit).getLayerDisk(),(*curHit).getPhiModule(), (*curHit).getEtaModule());
-      //      Identifier id = PID->wafer_id((*m_PixHitBarrelEndcap)[HITindex], (*m_PixHitLayerDisk)[HITindex],
-      //                    (*m_PixHitPhiModule)[HITindex], (*m_PixHitEtaModule)[HITindex]);
-      StatusCode sc = StatusCode::SUCCESS;
-      const InDetDD::PixelDetectorManager* pixeldetmngr;
-      sc = detStore()->retrieve(pixeldetmngr, "Pixel");
-
-      const InDetDD::SiDetectorElement* sielement=pixeldetmngr->getDetectorElement(id);
-
-      float tanlorentz = sielement->getTanLorentzAnglePhi();
-      int readoutside = sielement->design().readoutSide();
-
-      Amg::Vector2D pos=sielement->hitLocalToLocal(((*m_PixHitZstartpos)[HITindex]+(*m_PixHitZendpos)[HITindex])/2,
-                                                   ((*m_PixHitYstartpos)[HITindex]+(*m_PixHitYendpos)[HITindex])/2);
-      //Amg::Vector2D pos_start=sielement->hitLocalToLocal((*m_PixHitZstartpos)[HITindex],(*m_PixHitYstartpos)[HITindex]);
-      //Amg::Vector2D pos_end=sielement->hitLocalToLocal((*m_PixHitZendpos)[HITindex],(*m_PixHitYendpos)[HITindex]);
-      InDetDD::SiCellId diode=sielement->cellIdOfPosition(pos);
-      //InDetDD::SiCellId diode_start=sielement->cellIdOfPosition(pos_start);
-      //InDetDD::SiCellId diode_end=sielement->cellIdOfPosition(pos_end);
-      m_PixHitEtaIndex->push_back(int(diode.etaIndex()));
-      m_PixHitPhiIndex->push_back(int(diode.phiIndex()));
-      //      m_PixHitEtaIndex_delta->push_back(int(fabs(diode_start.etaIndex()-diode_end.etaIndex())));
-      //      m_PixHitPhiIndex_delta->push_back(int(fabs(diode_start.phiIndex()-diode_end.phiIndex())));
-
-      ////
-      //            if ((*m_PixHitBarrelEndcap)[HITindex]!=0 && ((*m_PixHitPhiModule)[HITindex]%2)==0) {
-      //                (*m_PixHitYstartpos)[HITindex]*=(-1.);
-      //                (*m_PixHitYendpos)[HITindex]*=(-1.);
-      //            }
-      //            if ((*m_PixHitBarrelEndcap)[HITindex]==2 && ((*m_PixHitPhiModule)[HITindex]%2)!=0) {
-      //                (*m_PixHitXstartpos)[HITindex]*=(-1.);
-      //                (*m_PixHitXendpos)[HITindex]*=(-1.);
-      //            }
-      //            if ((*m_PixHitBarrelEndcap)[HITindex]==-2 && ((*m_PixHitPhiModule)[HITindex]%2)==0) {
-      //                (*m_PixHitXstartpos)[HITindex]*=(-1.);
-      //                (*m_PixHitXendpos)[HITindex]*=(-1.);
-      //            }
-      //
-      //            m_PixHitAngle->push_back(float(atan(((*m_PixHitYendpos)[HITindex]-(*m_PixHitYstartpos)[HITindex])/((*m_PixHitXendpos)[HITindex]-(*m_PixHitXstartpos)[HITindex]))));
-      //            m_PixHitAngle2->push_back(float(atan2(((*m_PixHitZendpos)[HITindex]-(*m_PixHitZstartpos)[HITindex]),((*m_PixHitXendpos)[HITindex]-(*m_PixHitXstartpos)[HITindex]))));
-      ////
-
-      //
-      // Geometry transformations 
-      //
-      // SLHC
-      if(m_geoId==GEO_SLHC || m_geoId==GEO_SLHC2){
-        ATH_MSG_DEBUG(" SLHC geo transform.");
-        // Odd eta modules in end caps are flipped.
-        int layer = (*m_PixHitLayerDisk)[HITindex];
-        int etaMod  = (*m_PixHitEtaModule)[HITindex];
-        int ecBarrel = (*m_PixHitBarrelEndcap)[HITindex];
-        if (ecBarrel!=0){
-          // if(layer==0 || layer==1 || layer==5 ){ // SLHC-01-00-00 - UTOPIA
-          // if(layer==0 || layer==2 || layer==4 ){ // SLHC-01-20-01 - Cartigny
-          if(layer==m_slhc_layer_flip_1  || layer==m_slhc_layer_flip_2 || layer==m_slhc_layer_flip_3 ){    
-            if(etaMod%2!=0){
-              (*m_PixHitYstartpos)[HITindex]*=(-1.);
-              (*m_PixHitYendpos)[HITindex]*=(-1.);
-              (*m_PixHitXstartpos)[HITindex]*=(-1.);
-              (*m_PixHitXendpos)[HITindex]*=(-1.);  
-            }
-            // In layers 2,3 and 4, Even eta modules are fliped.
-          } else {
-            if(etaMod%2==0){
-              (*m_PixHitYstartpos)[HITindex]*=(-1.);
-              (*m_PixHitYendpos)[HITindex]*=(-1.);
-              (*m_PixHitXstartpos)[HITindex]*=(-1.);
-              (*m_PixHitXendpos)[HITindex]*=(-1.);
-            }
-          }
-
-          if(ecBarrel==2){
-              (*m_PixHitYstartpos)[HITindex]*=(-1.);
-              (*m_PixHitYendpos)[HITindex]*=(-1.);
-          }
-        }
-      }else {
-        ATH_MSG_DEBUG(" ATLAS/IBL geo transform.");
-        //
-        // ATLAS+IBL 
-        if ((*m_PixHitBarrelEndcap)[HITindex]!=0 && ((*m_PixHitPhiModule)[HITindex]%2)==0) {
-          (*m_PixHitYstartpos)[HITindex]*=(-1.);
-          (*m_PixHitYendpos)[HITindex]*=(-1.);
-        }
-        if ((*m_PixHitBarrelEndcap)[HITindex]==2 && ((*m_PixHitPhiModule)[HITindex]%2)!=0) {
-          (*m_PixHitXstartpos)[HITindex]*=(-1.);
-          (*m_PixHitXendpos)[HITindex]*=(-1.);
-        }
-        if ((*m_PixHitBarrelEndcap)[HITindex]==-2 && ((*m_PixHitPhiModule)[HITindex]%2)==0) {
-          (*m_PixHitXstartpos)[HITindex]*=(-1.);
-          (*m_PixHitXendpos)[HITindex]*=(-1.);
-        }    
-      }
-      // Theta in module coordinates.
-      float angle2=float(atan2(((*m_PixHitZendpos)[HITindex]-(*m_PixHitZstartpos)[HITindex]),
-                               ((*m_PixHitXendpos)[HITindex]-(*m_PixHitXstartpos)[HITindex])));
-      m_PixHitAngle2->push_back(angle2);
-      // Phi in module coordinates.
-      m_PixHitAngle->push_back(float(atan(((*m_PixHitYendpos)[HITindex]-(*m_PixHitYstartpos)[HITindex])/((*m_PixHitXendpos)[HITindex]-(*m_PixHitXstartpos)[HITindex]))));
-
-      double bowphi = atan2(((*m_PixHitYendpos)[HITindex]-(*m_PixHitYstartpos)[HITindex]),((*m_PixHitXendpos)[HITindex]-(*m_PixHitXstartpos)[HITindex]));
-
-      m_PixHitAngle_Lorcorr->push_back(atan(tan(bowphi)-readoutside*tanlorentz));     
-
-      if (flag==10) {
-        if ((*m_PixHitXstartpos)[HITindex]>0.124) flag=11;
-      }
-      if (fabs(((*m_PixHitXstartpos)[HITindex]+(*m_PixHitXendpos)[HITindex])/2)>0.124) flag=14;
-
-      m_PixHitFlag->push_back(flag);
-      m_PixHitTime->push_back(float((*curHit).meanTime()));
-     
-      ATH_MSG_DEBUG( "G4 hit has flag " << (*m_PixHitFlag)[HITindex] << 
-              " and PDG code " << (*m_PixHitPDGParticle)[HITindex] << 
-              " on module is " << (*m_PixHitBarrelEndcap)[HITindex] << " " << (*m_PixHitLayerDisk)[HITindex] << 
-              " " << (*m_PixHitEtaModule)[HITindex] << " " << (*m_PixHitPhiModule)[HITindex] <<
-              " Lorentz angle is " << tanlorentz << 
-              " and readoutside is " << readoutside << 
-              " and bowphi is " << bowphi << 
-              " and angle is " << atan(tan(bowphi)-readoutside*tanlorentz)  );
-
-      HITindex++;
-    }
-
-    m_pixHitsNum = HITindex;
-
-    std::vector<float> Xpos(m_pixHitsNum), Ypos(m_pixHitsNum), Zpos(m_pixHitsNum);
-
-    ATH_MSG_DEBUG( "Found " << m_pixHitsNum << " G4Hits." );
-    for (int i=0; i<m_pixHitsNum; i++) {
-        Xpos[i]=((*m_PixHitXstartpos)[i]+(*m_PixHitXendpos)[i])/2;
-        Ypos[i]=((*m_PixHitYstartpos)[i]+(*m_PixHitYendpos)[i])/2;
-        Zpos[i]=((*m_PixHitZstartpos)[i]+(*m_PixHitZendpos)[i])/2;
-    }
-
-    ATH_MSG_DEBUG( "Found " << m_pixClusNum << " Clusters." );
-
-    for (int i=0; i<m_pixClusNum; i++) {
-   
-      int group = int((*m_PixClusGroupsize)[i]);
-   
-//            int part = FindAssociatedParticle(i, m_pixHitsNum, group);
-
-// find the particles associated to a cluster . Since it can happen that there is more than one particle crossing a cluster
-// the function FindMultipleAssociatedParticle() returns a vector of index  
-// This is backward compatible with the old code (which associate only 1 particle
-// since the m_MC_* variables are also filled in the same way i.e. taking the first
-// element of this vector 
-   
-      std::vector<int> MultiplePart;
-      MultiplePart = FindMultipleAssociatedParticle(i, m_pixHitsNum, group);
-  
-      ATH_MSG_VERBOSE("Particles found: " << MultiplePart.size() );
-
-      if(m_jo_NN){
-
-        // a vector of positions because there is more than one particle, 
-
-        std::vector<float> positionsX;
-        std::vector<float> positionsY;
-
-        // expressed respect with the center of the cluster
-        std::vector<float> positions_idX;
-        std::vector<float> positions_idY;
-
-        std::vector<float> theta;
-        std::vector<float> phi;
-
-        std::vector<int> pdgId;
-        std::vector<int> barcode;
-        std::vector<float> momentum;
-        std::vector<float> distanceX;
-        std::vector<float> distanceY;
-
-        // get pixel identifier
-        const PixelID* PID = dynamic_cast<const PixelID*>(m_pixelid);
-        Identifier id = PID->wafer_id( (*m_PixECBarrel)[i]  , 
-                                      (*m_PixClusLayer)[i] ,
-                                      (*m_PixPhiModule)[i] , 
-                                      (*m_PixEtaModule)[i] );
-     
-
-        const InDetDD::PixelDetectorManager* pixeldetmngr;
-        sc = detStore()->retrieve(pixeldetmngr, "Pixel");
- 
-        const InDetDD::SiDetectorElement* element=pixeldetmngr->getDetectorElement(id);
-
-        const InDetDD::PixelModuleDesign* design(dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design()));
-
-        // lorentz shift correction    
-        double shift = element->getLorentzCorrection();
-
-        for(unsigned int mp=0; mp<MultiplePart.size(); mp++){
-
-          int partIndex = MultiplePart[mp];
-
-          pdgId.push_back( (*m_PixHitPDGParticle)[partIndex] );
-          barcode.push_back( (*m_PixHitBarcode)[partIndex] );
-          momentum.push_back( (*m_PixHitParticleP)[partIndex] );
-          distanceX.push_back( (*m_PixHitYendpos)[partIndex] - (*m_PixHitYstartpos)[partIndex] );
-          distanceY.push_back( (*m_PixHitZendpos)[partIndex] - (*m_PixHitZstartpos)[partIndex] );
-
-          // position lorentz shift corrected
-          float YposC = Ypos[partIndex]-shift;
-
-          if (fabs(YposC)>design->width()/2 && 
-              fabs(Ypos[partIndex])<design->width()/2)
-          {
-//                std::cout << " FOUND ADJUSTMENT" << std::endl;
-            if (YposC>design->width()/2)
-            {
-              YposC=design->width()/2-1e-6;
-            } else if (YposC<-design->width()/2)
-            {
-              YposC=-design->width()/2+1e-6;
-            }
-          }
-              
-          positionsX.push_back(YposC);
-          positionsY.push_back(Zpos[partIndex]);
-
-
-          InDetDD::SiLocalPosition siLocalTruthPosition(Zpos[partIndex],YposC ) ;
-          InDetDD::SiCellId cellIdOfTruthPosition =design->cellIdOfPosition(siLocalTruthPosition);
-
-          int truthEtaIndex =  cellIdOfTruthPosition.etaIndex();
-          int truthPhiIndex =  cellIdOfTruthPosition.phiIndex();
-
-          InDetDD::SiDiodesParameters diodeParameters = design->parameters(cellIdOfTruthPosition);
-          double pitchY = diodeParameters.width().xEta();
-          double pitchX = diodeParameters.width().xPhi();
-
-          // pixel center
-          InDetDD::SiLocalPosition siLocalPositionCenter(design->positionFromColumnRow(truthEtaIndex,truthPhiIndex)); 
-          double pixelCenterY = siLocalPositionCenter.xEta();
-          double pixelCenterX = siLocalPositionCenter.xPhi();
-
-
-          // truth index
-          double truthIndexY =  truthEtaIndex + (Zpos[partIndex] - pixelCenterY)/pitchY;
-          double truthIndexX =  truthPhiIndex + (YposC           - pixelCenterX)/pitchX;
-
-
-          positions_idX.push_back( truthIndexX - (*m_NN_rowWeightedPosition)[i] );
-          positions_idY.push_back( truthIndexY - (*m_NN_columnWeightedPosition)[i]);
-
-       // int ECBarrel = (*m_PixECBarrel)[i];
-       // if(ECBarrel!=0){
-       //  std::cout <<std::dec<< ECBarrel<<" truthPhiIndex " << truthPhiIndex 
-       //     << "\t YposC "<<YposC
-       //     << "\t PixelCenterX "<<pixelCenterX
-       //     << "\t pitchX "<<pitchX  
-       //     << "\t truthIndexX   " << truthIndexX 
-       //     << "\t rowWeightedPosition  " <<(*m_NN_rowWeightedPosition)[i]
-       //     << "\t Position id X "<<truthIndexX - (*m_NN_rowWeightedPosition)[i] 
-       //     <<"   "<<ECBarrel
-       //    // << " Zpos "<< Zpos[partIndex] 
-       //    // << " YposC: " << YposC << " pixelCenterY " << pixelCenterY << " pixelCenterX : " << pixelCenterX 
-       //    // << " pitchY " << pitchY << " pitchX " << pitchX << " length: " << design->length() 
-       //    // << " width: " << design->width() << " with max: " << design->maxWidth() 
-       //     << std::endl;
-       // }
-
-          theta.push_back((*m_PixHitAngle2)[partIndex]);
-          phi.push_back((*m_PixHitAngle_Lorcorr)[partIndex]);
-        }
-     
-     
-        m_NN_positionX->push_back(positionsX);
-        m_NN_positionY->push_back(positionsY);
-
-
-        m_NN_position_idX->push_back(positions_idX);
-        m_NN_position_idY->push_back(positions_idY);
-
-
-        m_NN_theta->push_back(theta);
-        m_NN_phi->push_back(phi);
-
-        m_NN_pdgid->push_back(pdgId);
-        m_NN_barcode->push_back(barcode);
-        m_NN_momentum->push_back(momentum);
-        m_NN_distanceX->push_back(distanceX);
-        m_NN_distanceY->push_back(distanceY);    
-      }
-   
-       
-      m_MultipleAssociated_Index->push_back(MultiplePart);
-   
-      int Npart = MultiplePart.size();
-
-      if (Npart==0) {
-        m_MC_Xpos->push_back(-100);
-        m_MC_Ypos->push_back(-100);
-        m_MC_IncidentAngle->push_back(-100);
-        m_MC_IncidentAngle2->push_back(-100);
-        m_MC_IncidentAngle_Lorcorr->push_back(-100);
-        m_MC_Flag->push_back(-100);
-        m_MC_EnergyLoss->push_back(-100);
-        m_MC_PDGParticle->push_back(-100);
-        m_MC_Time->push_back(-100);
-        m_MC_Barcode->push_back(-100);
-        m_MC_Momentum->push_back(-100);
-        m_PixClusLocXana->push_back(-100);
-        m_PixClusLocYana->push_back(-100);
-        //  m_PixClusErrX->push_back(-100);
-        //              m_PixClusErrY->push_back(-100);
-      } else {
-        int part = MultiplePart[0];
-
-        m_MC_Xpos->push_back(Ypos[part]);
-        m_MC_Ypos->push_back(Zpos[part]);
-        m_MC_IncidentAngle->push_back((*m_PixHitAngle)[part]);
-        m_MC_IncidentAngle2->push_back((*m_PixHitAngle2)[part]);
-        m_MC_IncidentAngle_Lorcorr->push_back((*m_PixHitAngle_Lorcorr)[part]);
-        m_MC_Flag->push_back((*m_PixHitFlag)[part]);
-        m_MC_EnergyLoss->push_back(((*m_PixHitEnergyLoss)[part]));
-        m_MC_PDGParticle->push_back(((*m_PixHitPDGParticle)[part]));
-        m_MC_Time->push_back(((*m_PixHitTime)[part]));
-        m_MC_Barcode->push_back(((*m_PixHitBarcode)[part]));
-        m_MC_Momentum->push_back(((*m_PixHitParticleP)[part]));
-
-        double corrX;
-        double corrY;
-        // double errphi;
-        // double erreta;
-
-        if((*m_PixECBarrel)[i]==0){
-        double angle = (*m_PixHitAngle_Lorcorr)[part]*180/M_PI;
-        //if(angle<0) angle*=-1;
-
-        double theta = (*m_PixHitAngle2)[part];
-        if(theta > M_PI / 2 ) theta -= M_PI;
-        else if(theta < - M_PI / 2 ) theta += M_PI;
-        theta = ( M_PI / 2 ) - theta;
-        double trketa = -log(tan(theta/2));
-
-        corrX = m_pixelCalib->getBarrelDeltaX((*m_PixDeltaRow)[i],angle);
-        corrY = m_pixelCalib->getBarrelDeltaY((*m_PixDeltaCol)[i],trketa);
-
-        // new error code
-        //errphi = m_pixelCalib->getBarrelNewErrorPhi(angle,(*m_PixDeltaRow)[i]);
-        //erreta = m_pixelCalib->getBarrelErrorEta(trketa,(*m_PixDeltaCol)[i],(*m_PixDeltaRow)[i]);
-        // end error code
-      }else{
-        corrX = m_pixelCalib->getEndcapDeltaX();
-        corrY = m_pixelCalib->getEndcapDeltaY();
-        // new error code
-        //errphi = m_pixelCalib->getEndCapErrorPhi((*m_PixDeltaCol)[i],(*m_PixDeltaRow)[i]);
-        //erreta = m_pixelCalib->getEndCapErrorEta((*m_PixDeltaCol)[i],(*m_PixDeltaRow)[i]);
-        // end error code
-      }
-       
-       
-      ATH_MSG_DEBUG( "Cluster " << i << " on module " <<  (*m_PixECBarrel)[i] << " " << (*m_PixClusLayer)[i] 
-                    << " " << (*m_PixEtaModule)[i] << " " << (*m_PixPhiModule)[i] 
-                    << " ClusSize " << (*m_PixDeltaRow)[i] << " " << (*m_PixDeltaCol)[i] 
-                    << " Omega " << (*m_PixOmegaPhi)[i] << " " << (*m_PixOmegaEta)[i] 
-                    << " Angle " << (*m_PixHitAngle_Lorcorr)[part]*180/M_PI << " Eta " << (*m_PixHitAngle2)[part]);
-
-      ATH_MSG_DEBUG( "Correction " << corrX << " " << corrY );
-
-      corrX *=((*m_PixOmegaPhi)[i]-0.5);
-      corrY *=((*m_PixOmegaEta)[i]-0.5);
-
-      ATH_MSG_DEBUG( "Correction " << corrX << " " << corrY );
-
-      m_PixClusLocXana->push_back((*m_PixClusLocXcentroid)[i]+corrX);
-      m_PixClusLocYana->push_back((*m_PixClusLocYcentroid)[i]+corrY);  
-      //       m_PixClusErrX->push_back(errphi);
-      //       m_PixClusErrY->push_back(erreta);  
-
-      ATH_MSG_DEBUG( "So we get in X " << (*m_PixClusLocXcentroid)[i] << " -> " <<  (*m_PixClusLocXcentroid)[i]+corrX );
-      ATH_MSG_DEBUG( "So we get in Y " << (*m_PixClusLocYcentroid)[i] << " -> " <<  (*m_PixClusLocYcentroid)[i]+corrY );
-
-    }
-  }
-  
-    int PartNum = (*m_MC_Xpos).size();
-    for (int i=0; i<m_pixHitsNum; i++) {
-      int m=0;
-      for (m=0; m<PartNum; m++) {
-        if (Ypos[i]==(*m_MC_Xpos)[m] && Zpos[i]==(*m_MC_Ypos)[m]) break;
-      }
-      if (m==PartNum) {
-        m_NotAssociated_Xpos->push_back(Ypos[i]);
-        m_NotAssociated_Ypos->push_back(Zpos[i]);
-        m_NotAssociated_IncidentAngle->push_back((*m_PixHitAngle)[i]);
-        m_NotAssociated_IncidentAngle2->push_back((*m_PixHitAngle2)[i]);
-        m_NotAssociated_Flag->push_back((*m_PixHitFlag)[i]);
-        m_NotAssociated_EnergyLoss->push_back(((*m_PixHitEnergyLoss)[i]));
-        m_NotAssociated_BarrelEndcap->push_back((*m_PixHitBarrelEndcap)[i]);
-        m_NotAssociated_LayerDisk->push_back((*m_PixHitLayerDisk)[i]);
-        m_NotAssociated_EtaModule->push_back((*m_PixHitEtaModule)[i]);
-        m_NotAssociated_PhiModule->push_back((*m_PixHitPhiModule)[i]);
-        m_NotAssociated_PDGParticle->push_back((*m_PixHitPDGParticle)[i]);
-        m_NotAssociated_Time->push_back((*m_PixHitTime)[i]);
-        m_NotAssociated_IncidentAngle_Lorcorr->push_back((*m_PixHitAngle_Lorcorr)[i]);
-      }
-    }
-  }
-    
-    
-  m_nt->Fill();
-   
-  if(m_jo_NN) { m_nnt->Fill(); }
-
-
-  return StatusCode::SUCCESS;
-}
-
-//----------------------------- PixelClusterValidationNtupleWriter::GetDigitalPosition --------
-Amg::Vector2D InDet::PixelClusterValidationNtupleWriter::GetDigitalPosition(
-  const InDet::PixelCluster*& pix,
-  const InDetDD::SiDetectorElement*& EL) const {
- 
-  const InDetDD::PixelModuleDesign* design = dynamic_cast<const InDetDD::PixelModuleDesign*>(&EL->design());
-  std::vector<Identifier> rdos = pix->rdoList();
-  std::vector<Identifier>::const_iterator oneRDO = rdos.begin();
-  int rowmin=9999;
-  int rowmax=-9999;
-  int colmin=9999;
-  int colmax=-9999;
-  for(; oneRDO != rdos.end(); oneRDO++) {
-    int row = m_pixelid->phi_index(*oneRDO);
-    int col = m_pixelid->eta_index(*oneRDO);
-    if(rowmin > row) rowmin = row;
-    if(rowmax < row) rowmax = row;
-    if(colmin > col) colmin = col;
-    if(colmax < col) colmax = col;
-  }
-  //m_PixFirstRow->push_back(rowmin);
-  //m_PixFirstCol->push_back(colmin);
-  InDetDD::SiLocalPosition pos1 = design->positionFromColumnRow(colmin,rowmin);
-  InDetDD::SiLocalPosition pos2 = design->positionFromColumnRow(colmax,rowmin);
-  InDetDD::SiLocalPosition pos3 = design->positionFromColumnRow(colmin,rowmax);
-  InDetDD::SiLocalPosition pos4 = design->positionFromColumnRow(colmax,rowmax);
-  InDetDD::SiLocalPosition centroid = 0.25*(pos1+pos2+pos3+pos4);
-  double shift = EL->getLorentzCorrection();
-  m_PixClusLocX_LorentzCorrection->push_back(shift);
-  Amg::Vector2D position(centroid.xPhi() + shift, centroid.xEta());
-  return position;
-}
-
-//----------------------------- PixelClusterValidationNtupleWriter::FindNextHit ---------------
-const SiHit * InDet::PixelClusterValidationNtupleWriter::FindNextHit(const SiHit *startHit, SiHitCollection::const_iterator Coll) {
-  for (; Coll != m_hitcontainer->end(); Coll++) {
-    const SiHit *compHit = &(*Coll);
-    if (fabs(((*startHit).localEndPosition().x()-(*compHit).localStartPosition().x()))<0.00005 &&
-      fabs(((*startHit).localEndPosition().y()-(*compHit).localStartPosition().y()))<0.00005 &&
-      fabs(((*startHit).localEndPosition().z()-(*compHit).localStartPosition().z()))<0.00005)
-    {
-      return compHit;
-      break;
-    }
-  }
-  if (Coll == m_hitcontainer->end()) return 0;
-  return 0;
-}
-
-//----------------------------- PixelClusterValidationNtupleWriter::FindAssociatedParticle ----
-int InDet::PixelClusterValidationNtupleWriter::FindAssociatedParticle(int cl, int pixHitsNum, int hit) {
-  int ht=-1;
-  for (int i=0; i<pixHitsNum; i++) {
-    if ((*m_PixHitBarrelEndcap)[i]==(*m_PixECBarrel)[cl]&& (*m_PixHitLayerDisk)[i]==(*m_PixClusLayer)[cl] &&
-          (*m_PixHitEtaModule)[i]==(*m_PixEtaModule)[cl] && (*m_PixHitPhiModule)[i]==(*m_PixPhiModule)[cl]) {
-      for (int j=0; j< hit; j++) {
-        if (std::abs((*m_PixClusEtaIndex)[cl][j]-(*m_PixHitEtaIndex)[i])<=1 &&
-            std::abs((*m_PixClusPhiIndex)[cl][j]-(*m_PixHitPhiIndex)[i])<=1 ) {
-//          if(fabs((*m_PixClusEtaIndex)[cl][j]-(*m_PixHitEtaIndex)[i])<=((((*m_PixHitEtaIndex_delta)[i]/2)+2)) &&
-//         fabs((*m_PixClusPhiIndex)[cl][j]-(*m_PixHitPhiIndex)[i])<=((((*m_PixHitPhiIndex_delta)[i]/2)+2))){
-          ht = i;
-          break;
-        }
-      }
-    }
-    if (ht==i)break;
-    //else continue;
-  }
-  return ht;
-}
-
-
-//----------------------------- PixelClusterValidationNtupleWriter::FindMultipleAssociatedParticle ----
-std::vector<int> InDet::PixelClusterValidationNtupleWriter::FindMultipleAssociatedParticle(int cl, int pixHitsNum, int hit) {
-  std::vector<int> ht;
-  
-  for (int i=0; i<pixHitsNum; i++) {
-    if ((*m_PixHitBarrelEndcap)[i]==(*m_PixECBarrel)[cl]&& (*m_PixHitLayerDisk)[i]==(*m_PixClusLayer)[cl] &&
-        (*m_PixHitEtaModule)[i]==(*m_PixEtaModule)[cl] && (*m_PixHitPhiModule)[i]==(*m_PixPhiModule)[cl]) {
-      for (int j=0; j< hit; j++) {
-        if (std::abs((*m_PixClusEtaIndex)[cl][j]-(*m_PixHitEtaIndex)[i])<=1 &&
-            std::abs((*m_PixClusPhiIndex)[cl][j]-(*m_PixHitPhiIndex)[i])<=1 ) {
-
-
-          //          if(fabs((*m_PixClusEtaIndex)[cl][j]-(*m_PixHitEtaIndex)[i])<=((((*m_PixHitEtaIndex_delta)[i]/2)+2)) &&
-          //         fabs((*m_PixClusPhiIndex)[cl][j]-(*m_PixHitPhiIndex)[i])<=((((*m_PixHitPhiIndex_delta)[i]/2)+2))){
-          if ( (*m_PixHitPDGParticle)[i]== 0 ) continue;
-
-          ht.push_back(i);
-          break;
-        }
-      }
-    }
-    //  if (ht==i)break;
-    //else continue;
-  }
-  return ht;
-}
-
-
-
-
-
- StatusCode InDet::PixelClusterValidationNtupleWriter::createInput(const InDet::PixelCluster& pCluster,
-     //    HepPoint3D & beamSpotPosition,
-           Amg::Vector3D& beamSpotPosition,     
-         double & tanl,
-        double & pitch_y,
-        int sizeX,
-        int sizeY)
-{
-
-  //% if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " Starting creating input from cluster " << endmsg;
-  ATH_MSG_VERBOSE( " Starting creating input from cluster "   );
-
-  const InDetDD::SiDetectorElement* element=pCluster.detectorElement();
-  if (element==0) {
-    ATH_MSG_ERROR("Could not get detector element");
-    return  StatusCode::FAILURE;
-  }
-  const AtlasDetectorID* aid = element->getIdHelper();
-  if (aid==0)
-    {
-      ATH_MSG_ERROR("Could not get ATLASDetectorID");
-      return  StatusCode::FAILURE;
-   }
-  const PixelID* pixelIDp=dynamic_cast<const PixelID*>(aid);
-  if (!pixelIDp)
-    {
-      ATH_MSG_ERROR("Could not get PixelID pointer");
-      return StatusCode::FAILURE;
-    } 
-  const PixelID& pixelID = *pixelIDp;
-  
-//  NNinput* input=new NNinput();
-  std::unique_ptr<NNinput> input( new NNinput ); 
-  
-  //Identifier elementID = element->identify();
-  const InDetDD::PixelModuleDesign* design
-    (dynamic_cast<const InDetDD::PixelModuleDesign*>(&element->design()));
-  
-  
-  //  const InDet::PixelCluster* pCluster  = pcot->prepRawData();
-  const std::vector<Identifier>& rdos  = pCluster.rdoList();  
-  
-  //  if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " Number of RDOs: " << rdos.size()  << endmsg;
-  ATH_MSG_VERBOSE( "Number of RDOs: " << rdos.size() );
-  //const std::vector<float>& chList     = pCluster.chargeList();
-  //const std::vector<int>&  totList     = pCluster.totList(); 
-  int chargeSize=pCluster.chargeList().size();
-  int totSize=pCluster.totList().size(); 
-  int rdoSize=rdos.size(); 
-  
-  if(rdoSize!=totSize){
-    ATH_MSG_WARNING(" Cluster size problem"
-      <<"\n Number of charges: " << chargeSize
-      <<"\n Number of ToT    : " << totSize 
-      <<"\n Number of rdos   : " << rdoSize);
-  }
-  std::vector<Identifier>::const_iterator rdosBegin = rdos.begin();
-  std::vector<Identifier>::const_iterator rdosEnd = rdos.end();
-
-  // Set chargeOrToT vecor based on m_jo_ToT flag.
-  // Exit with error if the used vector is empty.
-  std::vector<float> chargeOrToTList;// = pCluster.chargeList();
-  if(m_jo_ToT){
-    const std::vector<int>&  totList = pCluster.totList(); 
-    if(totList.empty()){
-      ATH_MSG_ERROR(" List of cluster ToT is empty. Try using charge -set \"UseToT=false\"-" );
-      return  StatusCode::FAILURE;
-    }
-    // Copy int ToT values to vector.
-    std::vector<int>::const_iterator it;
-    for( it= totList.begin(); it != totList.end(); ++it){
-      float tmp=*it;
-      chargeOrToTList.push_back(tmp);
-    }
-  } else {
-    const std::vector<float>& chList = pCluster.chargeList();
-    if(chList.empty()) {
-      ATH_MSG_ERROR(" List of cluster charge is empty. Try using ToT -set \"UseToT=true\"-" );
-      return  StatusCode::FAILURE;
-    }
-    // Copy charge values to vector.
-    std::vector<float>::const_iterator it;
-    for( it = chList.begin(); it != chList.end(); ++it ){
-      chargeOrToTList.push_back(*it);
-    }
-  }
-  std::vector<float>::const_iterator chargeOrToT= chargeOrToTList.begin();
-  
-  InDetDD::SiLocalPosition sumOfWeightedPositions(0,0,0);
-  double sumOfTot=0;
-
-  int rowMin = 999;
-  int rowMax = -1;
-  int colMin = 999;
-  int colMax = -1;  
-  
-  for (; rdosBegin!= rdosEnd; ++rdosBegin, ++chargeOrToT)
-  {
-    
-    Identifier rId =  *rdosBegin;
-    int row = pixelID.phi_index(rId);
-    int col = pixelID.eta_index(rId);
-    
-    if(msgLvl(MSG::VERBOSE)) { 
-      msg(MSG::VERBOSE) << " Adding pixel row: " << row << " col: " << col 
-       << " Charge/ToT: " << *chargeOrToT <<" ("<<m_jo_ToT<<")"<< endmsg;
-    }
-    InDetDD::SiLocalPosition siLocalPosition
-      (design->positionFromColumnRow(col,row)); 
-    
-    sumOfWeightedPositions += (*chargeOrToT)*siLocalPosition;
-    sumOfTot += (*chargeOrToT);
-    
-    if (row < rowMin){ 
-      rowMin = row; 
-    } 
-    
-    if (row > rowMax){
-      rowMax = row;
-    }
-    
-    if (col < colMin){
-      colMin = col;
-    }
-    
-    if (col > colMax){
-      colMax = col;
-    }
-  }
-  sumOfWeightedPositions /= sumOfTot;
-  
-  // if(msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " Weighted position: (" << sumOfWeightedPositions << ")" << endmsg;
-  // what you want to know is simple:
-  // just the row and column of this average position!
-  
-  InDetDD::SiCellId cellIdWeightedPosition=design->cellIdOfPosition(sumOfWeightedPositions);
-  
-  if (!cellIdWeightedPosition.isValid())
-  {
-    msg(MSG::ERROR) << "Weighted position is on invalid CellID." << endmsg;
-  }
-  
-  int columnWeightedPosition=cellIdWeightedPosition.etaIndex();
-  int rowWeightedPosition=cellIdWeightedPosition.phiIndex();
-
-  ATH_MSG_DEBUG(" weighted pos row: " << rowWeightedPosition << " col: " << columnWeightedPosition ); 
-
-  InDetDD::SiLocalPosition w = design->positionFromColumnRow(columnWeightedPosition,rowWeightedPosition);
-
-  double localColumnWeightedPosition = w.xEta();
-  double localRowWeightedPosition = w.xPhi();
-  
-  int centralIndexX=(sizeX-1)/2;
-  int centralIndexY=(sizeY-1)/2;
-
-  if (abs(rowWeightedPosition-rowMin)>centralIndexX ||
-      abs(rowWeightedPosition-rowMax)>centralIndexX)
-  {
-    ATH_MSG_DEBUG(" Cluster too large rowMin " << rowMin << " rowMax " << rowMax << " centralX " << centralIndexX);
-    return  StatusCode::FAILURE;
-  }
-  
-  if (abs(columnWeightedPosition-colMin)>centralIndexY ||
-      abs(columnWeightedPosition-colMax)>centralIndexY)
-  {
-    ATH_MSG_DEBUG(" Cluster too large colMin" << colMin << " colMax " << colMax << " centralY " << centralIndexY);
-    return  StatusCode::FAILURE;
-  }
-  
-  for (int a=0;a<sizeX;a++) {
-    std::vector<float> Yvector;
-    for (int b=0;b<sizeY;b++) {
-      Yvector.push_back(0);
-    }
-    input->matrixOfToT.push_back(Yvector);
-  }
-
-  // initialize the vector of Y pitches to default values.
-  for (int b=0; b<sizeY;b++) {
-    input->vectorOfPitchesY.push_back(pitch_y);
-  }
-
-  rdosBegin = rdos.begin();
-  chargeOrToT = chargeOrToTList.begin();
-  
-  if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " Putting together the n. " << rdos.size() 
-          << " rdos into a matrix." << endmsg;
-  
-  //  int totIdx=0;
-  for (; rdosBegin!= rdosEnd; ++rdosBegin, ++chargeOrToT)
-  {
-    Identifier rId =  *rdosBegin;
-    int absrow = pixelID.phi_index(rId)-rowWeightedPosition+centralIndexX;
-    int abscol = pixelID.eta_index(rId)-columnWeightedPosition+centralIndexY;
-    
-    if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " phi Index: " << pixelID.phi_index(rId) 
-     << " absrow: " << absrow << " eta Idx: " << pixelID.eta_index(rId) 
-     << " abscol: " << abscol << " tot " << *chargeOrToT << endmsg;
-
-    if (absrow <0 || absrow > sizeX)
-    {
-      ATH_MSG_DEBUG(" problem with index: " << absrow << " min: " << 0 << " max: " << sizeX);
-      //delete input;
-      return  StatusCode::FAILURE;
-    }
-    if (abscol <0 || abscol > sizeY)
-    {
-      ATH_MSG_DEBUG(" problem with index: " << abscol << " min: " << 0 << " max: " << sizeY);
-      //delete input;
-      return  StatusCode::FAILURE;
-    }
-    input->matrixOfToT[absrow][abscol]=*chargeOrToT;
-
-    InDetDD::SiCellId cellId = element->cellIdFromIdentifier(*rdosBegin);
-    InDetDD::SiDiodesParameters diodeParameters = design->parameters(cellId);
-    double pitchY = diodeParameters.width().xEta();
-    // Most pixels have standard size, if different pix found (i.e. ganged) update pitch value.
-    if(input->vectorOfPitchesY[abscol] != pitchY){
-       ATH_MSG_VERBOSE(" Update y pitch size Was  "<<input->vectorOfPitchesY[abscol]<<"  set to  "<<pitchY
-         <<"\n col "<<abscol<<" row "<<absrow<<" ToT "<<*chargeOrToT);
-       input->vectorOfPitchesY[abscol]=pitchY;
-    }
-  }//end iteration on rdos
-  Identifier pixidentif=pCluster.identify();
-  input->etaModule=(int)pixelID.eta_module(pixidentif);
-
-  input->ClusterPixLayer=(int)pixelID.layer_disk(pixidentif);
-  input->ClusterPixBarrelEC=(int)pixelID.barrel_ec(pixidentif);
-  
-  if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " eta module: " << input->etaModule << endmsg;
-  if(msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " Layer number: " << input->ClusterPixLayer 
-          << " Barrel / endcap: " << input->ClusterPixBarrelEC << endmsg;
-
-  ATH_MSG_VERBOSE( " End RDO LOOP " );
-          
-  input->useTrackInfo=false;
-  
-  const Amg::Vector2D& prdLocPos    = pCluster.localPosition();
-  InDetDD::SiLocalPosition centroid(prdLocPos);
-
-  Amg::Vector3D globalPos = element->globalPosition(centroid);
-  Amg::Vector3D my_track = globalPos-beamSpotPosition; 
-
-
-  Amg::Vector3D my_normal = element->normal();
-  Amg::Vector3D my_phiax = element->phiAxis();
-  Amg::Vector3D my_etaax = element->etaAxis();
-
-
-  float trkphicomp = my_track.dot(my_phiax);
-  float trketacomp = my_track.dot(my_etaax);
-  float trknormcomp = my_track.dot(my_normal);
-  double bowphi = atan2(trkphicomp,trknormcomp);
-  double boweta = atan2(trketacomp,trknormcomp);
-  tanl = element->getTanLorentzAnglePhi();
-  if(bowphi > M_PI/2) bowphi -= M_PI;
-  if(bowphi < -M_PI/2) bowphi += M_PI;
-  int readoutside = design->readoutSide();
-  double angle = atan(tan(bowphi)-readoutside*tanl);
-
-  input->phi=angle;
-
-  //  if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << " Angle theta bef corr: " << boweta << endmsg;
-  ATH_MSG_VERBOSE( " Angle theta bef corr: " << boweta );
-  if (boweta>TMath::Pi()/2.) boweta-=TMath::Pi();
-  if (boweta<-TMath::Pi()/2.) boweta+=TMath::Pi();
-
-  input->theta=boweta;
-  
-  ATH_MSG_VERBOSE(" Angle phi: " << angle << " theta: " << boweta );
-  input->rowWeightedPosition=rowWeightedPosition;
-  input->columnWeightedPosition=columnWeightedPosition;
-
-  ATH_MSG_VERBOSE(" RowWeightedPosition: " << rowWeightedPosition << " ColWeightedPosition: " << columnWeightedPosition );
-
-  ATH_MSG_DEBUG( "matrixOfToT converted in a std::vector<float>  " );
-
-  // store the matrixOfToT in a vector  
-  std::vector<float> inputData;
-  for (int u=0;u<sizeX;u++)
-  {
-    for (int s=0;s<sizeY;s++)
-    {
-      inputData.push_back( input->matrixOfToT[u][s]);
-    }
-  }
-  ATH_MSG_VERBOSE( "matrixOfToT converted in a std::vector<float>  " );
-
-  m_NN_matrixOfToT->push_back(inputData);
-   
-  ATH_MSG_VERBOSE( "... and saved  " );
-
-  m_NN_sizeX->push_back(sizeX); 
-  
-  m_NN_sizeY->push_back(sizeY); 
-    
-  m_NN_vectorOfPitchesY->push_back(input->vectorOfPitchesY);
-  
-  m_NN_ClusterPixLayer->push_back(input->ClusterPixLayer);
-  
-  m_NN_ClusterPixBarrelEC->push_back(input->ClusterPixBarrelEC);
-  
-  m_NN_phiBS->push_back(input->phi);
-  
-  m_NN_thetaBS->push_back(input->theta);
-  
-  m_NN_etaModule->push_back(input->etaModule);
-  
-  m_NN_useTrackInfo->push_back(input->useTrackInfo);
-  
-  m_NN_columnWeightedPosition->push_back(columnWeightedPosition);
-  
-  m_NN_rowWeightedPosition->push_back(rowWeightedPosition);
-
-  m_NN_localColumnWeightedPosition->push_back(localColumnWeightedPosition);
-  
-  m_NN_localRowWeightedPosition->push_back(localRowWeightedPosition);
-
-
-  
-  ATH_MSG_VERBOSE( "NN training Written" );
-  
-
-  return StatusCode::SUCCESS;
-
-
-}//end create NNinput function
-
-//----------------------------- PixelClusterValidationNtupleWriter::fillClusterVector ------------------
-StatusCode InDet::PixelClusterValidationNtupleWriter::fillClusterVector( const InDet::PixelCluster& cluster, IdentifierHash element_hash  ) {
-
-
-
-  int RIOindex = 0;
-  const int maxRIO_size = 1000000;
-  Identifier clId = cluster.identify();
-
-  unsigned int GroupSize = cluster.rdoList().size();
-  
-  const std::vector<Identifier>& rdoID = cluster.rdoList();
-  std::vector<int>* eta = new std::vector<int>(GroupSize);
-  std::vector<int>* phi = new std::vector<int>(GroupSize);
-  std::vector<int>* LVL1AList= new std::vector<int>(GroupSize);
-  std::vector<int>* ToTList=   new std::vector<int>(GroupSize);
-  std::vector<float>* ChargeList=new std::vector<float>(GroupSize);
-  for (unsigned int w=0; w<GroupSize; w++) {
-    (*eta)[w] = m_pixelid->eta_index((rdoID)[w]);
-    (*phi)[w] = m_pixelid->phi_index((rdoID)[w]);
-  }
-  
-  
-  if (  m_nRIOs   >= maxRIO_size ) {
-    ATH_MSG_WARNING( "reached max. number of RIO entries in the ntuple" );
-    m_nt->Fill();
-    delete eta;
-    delete phi;
-    delete LVL1AList;
-    delete ToTList;
-    delete ChargeList;
-    return StatusCode::SUCCESS;
-  }
-  else {
-    m_PixClusGloX     ->push_back(float(cluster.globalPosition().x()));
-    m_PixClusGloY     ->push_back(float(cluster.globalPosition().y()));
-    m_PixClusGloZ     ->push_back(float(cluster.globalPosition().z()));
-    m_PixClusEta      ->push_back(float(cluster.globalPosition().eta()));
-    m_PixClusPhi      ->push_back(float(cluster.globalPosition().phi()));
-    m_PixOmegaPhi     ->push_back(float(cluster.omegax()));
-    m_PixOmegaEta     ->push_back(float(cluster.omegay()));
-    
-    const Amg::Vector2D  locPos = cluster.localPosition();
-    m_PixClusLocX     ->push_back(float(locPos[Trk::locX]));
-    m_PixClusLocY     ->push_back(float(locPos[Trk::locY]));
-    
-    const Amg::MatrixX  locErrMat = cluster.localCovariance();
-
-    m_PixClusErrX->push_back( Amg::error(locErrMat,Trk::locX));
-    m_PixClusErrY->push_back( Amg::error(locErrMat,Trk::locY));
-
-
-    
-
-  
-    
-    
-    const InDet::PixelCluster* sc = &cluster;    //= dynamic_cast<const InDet::PixelCluster*>(*p_clus);                
-    const InDetDD::SiDetectorElement* element = sc->detectorElement();   
-    Amg::Vector2D centroid = GetDigitalPosition(sc,element);
-    m_PixClusLocXcentroid ->push_back(float(centroid[Trk::locX]));
-    m_PixClusLocYcentroid ->push_back(float(centroid[Trk::locY]));
-    
-    m_PixClusGroupsize->push_back(float(GroupSize));                   //cluster groupsize
-    m_PixClusLayer    ->push_back(float(m_pixelid->layer_disk(clId))); //cluster layer
-    m_PixEtaModule    ->push_back(float(m_pixelid->eta_module(clId))); //cluster ...
-    m_PixPhiModule    ->push_back(float(m_pixelid->phi_module(clId))); //cluster ...
-    m_PixClusRow      ->push_back(float(m_pixelid->phi_index(clId))) ; //cluster row
-    m_PixClusCol      ->push_back(float(m_pixelid->eta_index(clId))) ; //cluster col
-    m_PixECBarrel     ->push_back(float(m_pixelid->barrel_ec(clId))) ; //endcap or barrel
-    InDet::SiWidth  width = cluster.width();
-    m_PixDeltaRow     ->push_back(int(width.colRow().x()));
-    m_PixDeltaCol     ->push_back(int(width.colRow().y()));
-    m_PixClusToT      ->push_back(int(cluster.totalToT()));
-    m_PixClusCharge   ->push_back(float(cluster.totalCharge()));
-    m_PixClusLvl1     ->push_back(int(cluster.LVL1A()));
-    m_PixClusGanged   ->push_back(cluster.gangedPixel()?1:0);
-    m_PixClusFake     ->push_back(cluster.isFake()?1:0);
-    m_PixClusAmbiguous->push_back(cluster.isAmbiguous()?1:0);
-    
-    m_PixClusIsSplit  ->push_back(cluster.isSplit()?1:0);
-    m_PixClusSplitProb1->push_back(cluster.splitProbability1() );
-    m_PixClusSplitProb2->push_back(cluster.splitProbability2() );
-    
-    m_PixClusEtaIndex->push_back(*eta);
-    m_PixClusPhiIndex->push_back(*phi);
-    
-    if ( m_jo_WriteDetailedPixelInformation ){
-
-      PixelRDO_Container::const_iterator rdo_collection; 
-      if ( m_rdocontainer ) {
-        rdo_collection = m_rdocontainer->indexFind(element_hash);
-      }
-
-      if ( m_rdocontainer && rdo_collection!=m_rdocontainer->end() ) {
-        for (unsigned int w=0; w<GroupSize; w++) {
-          int LVL1L = -1, ToTL=-1;
-          PixelRDO_Collection::const_iterator pRDO    = (*rdo_collection)->begin();
-          PixelRDO_Collection::const_iterator pRDOend = (*rdo_collection)->end();
-          // take into account ganged pixels are not in the RDO collection
-          Identifier rdoID1 = rdoID[w], rdoID2 = rdoID[w]; 
-          if ( cluster.gangedPixel() ) {
-            InDetDD::SiCellId cellID = element->cellIdFromIdentifier (rdoID[w]);
-            if ( element->numberOfConnectedCells (cellID) > 1) {
-              InDetDD::SiCellId gangedCellID = element->connectedCell (cellID,0);
-              if ( gangedCellID==cellID ) gangedCellID = element->connectedCell (cellID,1);
-              rdoID2 = element->identifierFromCellId (gangedCellID);
-              // ATH_MSG_VERBOSE ( "Ganged ID= " << rdoID1 << "," << rdoID2 );
-            } 
-          }
-  
-          while (pRDO!=pRDOend) {
-            Identifier myID = (*pRDO)->identify(); 
-            if ( myID == rdoID1 || myID == rdoID2 ) {
-              LVL1L = (*pRDO)->getLVL1A();
-              ToTL  = (*pRDO)->getToT();
-              break;
-            }
-            pRDO++;
-          }
-          if ( LVL1L==-1 || ToTL==-1 ) 
-            ATH_MSG_DEBUG("Cannot find RDO " << m_pixelid->show_to_string(rdoID1) << " col/row=" << m_pixelid->eta_index(rdoID1) << "," << m_pixelid->phi_index(rdoID1));
-          (*LVL1AList)[w]=LVL1L;
-          (*ToTList)[w]=ToTL;
-        }
-        if ( cluster.chargeList().size()==GroupSize ) {
-          for (unsigned int w=0; w<GroupSize; w++) (*ChargeList)[w]=(cluster.chargeList())[w];
-        } else {
-          for (unsigned int w=0; w<GroupSize; w++) (*ChargeList)[w]=-1.;        
-        }
-        m_PixClusLVL1AList->push_back(*LVL1AList);
-        m_PixClusToTList->push_back(*ToTList);
-        m_PixClusChargeList->push_back(*ChargeList);
-      } 
-    }else{  if ( m_jo_WriteDetailedPixelInformation ) ATH_MSG_DEBUG("Cannot find RDO: Detailed Pixel Information  cannot be written" ); }
-  }
-  
-  
-  // Writing output for NN training
-  
-  if(m_jo_NN){
-    
-    ATH_MSG_DEBUG( "Writing output for NN training" );
-    
-    Trk::RecVertex beamposition(m_iBeamCondSvc->beamVtx()); 
-    
-    Amg::Vector3D BS = beamposition.position();
-         
-    InDet::SiWidth  width = cluster.width();
-    
-    double tanl=0.0;
-    int l_sizeX =7;//width.colRow().x();
-    int l_sizeY =7;//width.colRow().y();
-    //       input = new NNinput();
-    
-    //      ATH_MSG_VERBOSE( "Clustersize is: " << l_sizeX << " and " << l_sizeY   );
-    
-    double pitch_y = m_pitchY;
-    
-    if (m_geoId==GEO_IBL) {
-      if (m_pixelid->barrel_ec(clId) == 0) {
-        if (m_pixelid->layer_disk(clId) == 0) {
-          pitch_y = IBLPITCHY;
-          ATH_MSG_VERBOSE( "USING THE IBL ZERO LAYER." );
-        }
-      }
-    } else if(m_geoId==GEO_SLHC2) {
-      if (m_pixelid->barrel_ec(clId) == 0) {
-        if (m_pixelid->layer_disk(clId) < 2) {
-          pitch_y = SLHC2_PITCHY_A;
-          ATH_MSG_VERBOSE( "USING .15um pitch, Cartigny layout." );
-        }
-      }
-    }
-
-    StatusCode   sc = createInput(cluster,BS,tanl,pitch_y, l_sizeX, l_sizeY);
-    
-    
-    if ( sc.isFailure() ) {
-      ATH_MSG_DEBUG( "Unable to Write  infos for NN training" ); 
-      
-      std::vector<float> inputData; 
-      m_NN_matrixOfToT->push_back(inputData);
-      m_NN_vectorOfPitchesY->push_back(inputData);
-      m_NN_sizeX->push_back(-100); 
-      m_NN_sizeY->push_back(-100); 
-      m_NN_ClusterPixLayer->push_back(-100);
-      m_NN_ClusterPixBarrelEC->push_back(-100);
-      m_NN_phiBS->push_back(-100);
-      m_NN_thetaBS->push_back(-100);
-      m_NN_etaModule->push_back(-100);
-      m_NN_columnWeightedPosition->push_back(-100); 
-      m_NN_rowWeightedPosition->push_back(-100); 
-      m_NN_localColumnWeightedPosition->push_back(-100); 
-      m_NN_localRowWeightedPosition->push_back(-100); 
-      
-    }
-    
-  }
-  
-  
-  RIOindex++;
-  delete eta;
-  delete phi;
-  delete LVL1AList;
-  delete ToTList;
-  delete ChargeList;
-  //  delete input;
-  
-  m_nRIOs++;
-  // m_nRIOs += RIOindex;  //number of clusters per event
-  //   RIOindex;
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-
-//----------------------------- PixelClusterValidationNtupleWriter::finalize ------------------
-StatusCode InDet::PixelClusterValidationNtupleWriter::finalize() {
-    ATH_MSG_INFO( "PixelClusterValidationNtupleWriter finalize()" );
-    delete m_PixClusLocX;
-    delete m_PixClusLocY;
-    delete m_PixClusLocXcentroid;
-    delete m_PixClusLocYcentroid;
-    delete m_PixClusLocX_LorentzCorrection;
-    delete m_PixClusGloX;
-    delete m_PixClusGloY;
-    delete m_PixClusGloZ;
-    delete m_PixClusEta;
-    delete m_PixClusPhi;
-    delete m_PixECBarrel;
-    delete m_PixClusLayer ;
-    delete m_PixEtaModule;
-    delete m_PixPhiModule;
-    delete m_PixClusGroupsize;
-    delete m_PixClusRow;
-    delete m_PixClusCol;
-    delete m_PixDeltaRow;
-    delete m_PixDeltaCol;
-    delete m_PixOmegaPhi;
-    delete m_PixOmegaEta;
-    delete m_PixClusToT;
-    delete m_PixClusCharge;
-    delete m_PixClusLvl1;
-    delete m_PixClusGanged;
-    delete m_PixClusFake;
-    delete m_PixClusAmbiguous;
-    delete m_PixClusLocXana;
-    delete m_PixClusLocYana;
-    delete m_PixClusErrX;
-    delete m_PixClusErrY;
-    delete m_PixClusEtaIndex;
-    delete m_PixClusPhiIndex;
-    delete m_PixClusChargeList;
-    delete m_PixClusToTList;
-    delete m_PixClusLVL1AList;
-    delete m_PixClusIsSplit;
-    delete m_PixClusSplitProb1;
-    delete m_PixClusSplitProb2;
-    delete m_PixHitXstartpos;
-    delete m_PixHitYstartpos;
-    delete m_PixHitZstartpos;
-    delete m_PixHitXendpos;
-    delete m_PixHitYendpos;
-    delete m_PixHitZendpos;
-    delete m_PixHitBarrelEndcap;
-    delete m_PixHitLayerDisk;
-    delete m_PixHitEtaModule;
-    delete m_PixHitPhiModule;
-    delete m_PixHitEtaIndex;
-    delete m_PixHitPhiIndex;
-    delete m_PixHitAngle;
-    delete m_PixHitAngle2;
-    delete m_PixHitAngle_Lorcorr;
-    delete m_PixHitEnergyLoss;
-    delete m_PixHitTime;
-    delete m_PixHitPDGParticle;
-    delete m_PixHitFlag;
-//    delete m_PixHitEtaIndex_delta;
-//    delete m_PixHitPhiIndex_delta;
-    delete m_MC_Xpos;
-    delete m_MC_Ypos;
-    delete m_MC_IncidentAngle;
-    delete m_MC_IncidentAngle2;
-    delete m_MC_IncidentAngle_Lorcorr;
-    delete m_MC_EnergyLoss;
-    delete m_MC_Time;
-    delete m_MC_PDGParticle;
-    delete m_MC_Flag;
-    delete m_NotAssociated_Xpos;
-    delete m_NotAssociated_Ypos;
-    delete m_NotAssociated_BarrelEndcap;
-    delete m_NotAssociated_LayerDisk;
-    delete m_NotAssociated_EtaModule;
-    delete m_NotAssociated_PhiModule;
-    delete m_NotAssociated_IncidentAngle;
-    delete m_NotAssociated_IncidentAngle2;
-    delete m_NotAssociated_IncidentAngle_Lorcorr;
-    delete m_NotAssociated_EnergyLoss;
-    delete m_NotAssociated_Time;
-    delete m_NotAssociated_PDGParticle;
-    delete m_NotAssociated_Flag;
-
-    delete m_NN_sizeX;
-    delete m_NN_sizeY;
-    delete m_NN_matrixOfToT;
-    delete m_NN_vectorOfPitchesY;
-    delete m_NN_ClusterPixLayer;
-    delete m_NN_ClusterPixBarrelEC;
-    delete m_NN_phiBS;
-    delete m_NN_thetaBS;
-    delete m_NN_etaModule;
-    delete m_NN_useTrackInfo;
-    delete m_NN_columnWeightedPosition;
-    delete m_NN_rowWeightedPosition;
-    delete m_NN_positionX;
-    delete m_NN_positionY;
-    delete m_NN_position_idX;
-    delete m_NN_position_idY;
-    delete m_NN_pdgid;
-    delete m_NN_barcode;
-    delete m_NN_momentum;
-    delete m_NN_distanceX;
-    delete m_NN_distanceY;
-
-    delete m_NN_theta;
-    delete m_NN_phi;
-
-    m_PixClusLocX=0;
-    m_PixClusLocY=0;
-    m_PixClusLocXcentroid=0;
-    m_PixClusLocYcentroid=0;
-    m_PixClusLocX_LorentzCorrection=0;
-    m_PixClusGloX=0;
-    m_PixClusGloY=0;
-    m_PixClusGloZ=0;
-    m_PixClusEta=0;
-    m_PixClusPhi=0;
-    m_PixECBarrel=0;
-    m_PixClusLayer=0;
-    m_PixEtaModule=0;
-    m_PixPhiModule=0;
-    m_PixClusGroupsize=0;
-    m_PixClusRow=0;
-    m_PixClusCol=0;
-    m_PixDeltaRow=0;
-    m_PixDeltaCol=0;
-    m_PixOmegaPhi=0;
-    m_PixOmegaEta=0;
-    m_PixClusToT=0;
-    m_PixClusCharge=0;
-    m_PixClusLvl1=0;
-    m_PixClusGanged=0;
-    m_PixClusFake=0;
-    m_PixClusAmbiguous=0;
-    m_PixClusLocXana=0;
-    m_PixClusLocYana=0;
-    m_PixClusErrX=0;
-    m_PixClusErrY=0;
-    m_PixClusEtaIndex=0;
-    m_PixClusPhiIndex=0;
-    m_PixClusChargeList=0;
-    m_PixClusToTList=0;
-    m_PixClusLVL1AList=0;
-    m_PixClusIsSplit=0;
-    m_PixClusSplitProb1=0;
-    m_PixClusSplitProb2=0;
-    m_PixHitXstartpos=0;
-    m_PixHitYstartpos=0;
-    m_PixHitZstartpos=0;
-    m_PixHitXendpos=0;
-    m_PixHitYendpos=0;
-    m_PixHitZendpos=0;
-    m_PixHitBarrelEndcap=0;
-    m_PixHitLayerDisk=0;
-    m_PixHitEtaModule=0;
-    m_PixHitPhiModule=0;
-    m_PixHitEtaIndex=0;
-    m_PixHitPhiIndex=0;
-    m_PixHitAngle=0;
-    m_PixHitAngle2=0;
-    m_PixHitAngle_Lorcorr=0;
-    m_PixHitEnergyLoss=0;
-    m_PixHitTime=0;
-    m_PixHitPDGParticle=0;
-    m_PixHitFlag=0;
-//    m_PixHitEtaIndex_delta=0;
-//    m_PixHitPhiIndex_delta=0;
-    m_MC_Xpos=0;
-    m_MC_Ypos=0;
-    m_MC_IncidentAngle=0;
-    m_MC_IncidentAngle2=0;
-    m_MC_IncidentAngle_Lorcorr=0;
-    m_MC_EnergyLoss=0;
-    m_MC_Time=0;
-    m_MC_PDGParticle=0;
-    m_MC_Flag=0;
-    m_NotAssociated_Xpos=0;
-    m_NotAssociated_Ypos=0;
-    m_NotAssociated_BarrelEndcap=0;
-    m_NotAssociated_LayerDisk=0;
-    m_NotAssociated_EtaModule=0;
-    m_NotAssociated_PhiModule=0;
-    m_NotAssociated_IncidentAngle=0;
-    m_NotAssociated_IncidentAngle2=0;
-    m_NotAssociated_IncidentAngle_Lorcorr=0;
-    m_NotAssociated_EnergyLoss=0;
-    m_NotAssociated_Time=0;
-    m_NotAssociated_PDGParticle=0;
-    m_NotAssociated_Flag=0;
-    
-    m_NN_sizeX=0;
-    m_NN_sizeY=0;
-    m_NN_matrixOfToT=0;
-    m_NN_vectorOfPitchesY=0;
-    m_NN_ClusterPixLayer=0;
-    m_NN_ClusterPixBarrelEC=0;
-    m_NN_phiBS=0;
-    m_NN_thetaBS=0;
-    m_NN_etaModule=0;
-    m_NN_useTrackInfo=0;
-    m_NN_columnWeightedPosition=0;
-    m_NN_rowWeightedPosition=0;
-    m_NN_positionX=0;
-    m_NN_positionY=0;
-    m_NN_position_idX=0;
-    m_NN_position_idY=0;
-    m_NN_theta=0;
-    m_NN_phi=0;
-
-    return StatusCode::SUCCESS;
-}
-
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx b/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx
index bdea88c07e3476b26a8d87574bf5c771bba378bb..99b825737526a7e69b1e8a4f6385aaa499382e17 100755
--- a/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx
+++ b/InnerDetector/InDetValidation/InDetTrackValidation/src/SCT_ClusterValidationNtupleWriter.cxx
@@ -624,11 +624,11 @@ StatusCode InDet::SCT_ClusterValidationNtupleWriter::execute() {
        * At the moment there are 15 different types of BS error.
        */
       for (int type=0; type < SCT_ByteStreamErrors::NUM_ERROR_TYPES; ++type) { 
-	std::set<IdentifierHash>* errorSet = m_byteStreamErrSvc->getErrorSet(type);
+	const std::set<IdentifierHash>* errorSet = m_byteStreamErrSvc->getErrorSet(type);
 	if (errorSet != 0) {
 	  int eta=0,phi=0,bec=0,layer=0,side=0;
-	  std::set<IdentifierHash>::iterator it = errorSet->begin();
-	  std::set<IdentifierHash>::iterator itEnd = errorSet->end();
+	  std::set<IdentifierHash>::const_iterator it = errorSet->begin();
+	  std::set<IdentifierHash>::const_iterator itEnd = errorSet->end();
 	  m_totalNumErrors += errorSet->size();
 	  for (; it != itEnd; ++it) {
 	    Identifier itId = m_sctid->wafer_id(*it);
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/src/SiResidualValidationNtupleHelper.cxx b/InnerDetector/InDetValidation/InDetTrackValidation/src/SiResidualValidationNtupleHelper.cxx
deleted file mode 100755
index a436fa59b3df21009aa4964619307eacbd5e7c2e..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetValidation/InDetTrackValidation/src/SiResidualValidationNtupleHelper.cxx
+++ /dev/null
@@ -1,1200 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//////////////////////////////////////////////////////////////////
-// SiResidualValidationNtupleHelper.cxx
-//   Source file for class SiResidualValidationNtupleHelper
-///////////////////////////////////////////////////////////////////
-// (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// Sebastian.Fleischmann@cern.ch
-///////////////////////////////////////////////////////////////////
-
-#include "TTree.h"
-
-// Trk
-#include "InDetTrackValidation/SiResidualValidationNtupleHelper.h"
-#include "TrkEventPrimitives/TrackStateDefs.h"
-#include "TrkRIO_OnTrack/RIO_OnTrack.h"
-
-//#include "TrkEventPrimitives/LocalParameters.h"
-//#include "TrkEventPrimitives/ErrorMatrix.h"
-//#include "TrkEventPrimitives/CovarianceMatrix.h"
-//#include "TrkParameters/MeasuredTrackParameters.h"
-#include "TrkParameters/TrackParameters.h"
-
-#include "TrkPrepRawData/PrepRawData.h"
-#include "InDetPrepRawData/SiWidth.h"
-#include "TrkSurfaces/Surface.h"
-
-#include "InDetPrepRawData/SiCluster.h"
-#include "InDetPrepRawData/PixelCluster.h"
-#include "InDetPrepRawData/PixelClusterContainer.h"
-#include "InDetReadoutGeometry/SiDetectorElement.h"
-#include "InDetReadoutGeometry/SiDetectorManager.h"
-#include "InDetReadoutGeometry/PixelModuleDesign.h"
-#include "InDetReadoutGeometry/SCT_DetectorManager.h"
-#include "InDetIdentifier/PixelID.h"
-#include "InDetIdentifier/SCT_ID.h"
-//#include "TrkEventPrimitives/LocalPosition.h"
-#include "InDetConditionsSummaryService/ISiliconConditionsSvc.h"
-#include "CLHEP/Vector/TwoVector.h"
-
-#include "TrkTrack/TrackStateOnSurface.h"
-#include "xAODEventInfo/EventInfo.h"
-
-#include "EventPrimitives/EventPrimitivesHelpers.h"
-
-#include <cmath>
-
-//using HepGeom::Vector3D;
-using CLHEP::deg;
-
-// constructor
-InDet::SiResidualValidationNtupleHelper::SiResidualValidationNtupleHelper(
-		const std::string& t, const std::string& n, const IInterface*  p):
-    AthAlgTool(t,n,p),
-    m_pixelid(0),
-    m_WriteDetailedPixelInformation(false),
-    m_rdocontainername("PixelRDOs"),
-    m_rdocontainer(0),
-    m_PixelConditionsSvc("PixelSiliconConditionsSvc",n), 
-    m_PixDetType(0),
-    m_PixHasGanged(0),
-    m_PixIsFake(0),
-    m_PixIsSplit(0),
-    m_PixSplitProb1(0),
-    m_PixSplitProb2(0),
-    m_PixLVL1A(0),
-    m_PixToT(0),
-    m_PixCharge(0),
-    m_PixTLorPhi(0),
-    m_PixTLorEta(0),
-    m_PixBiasVolt(0),
-    m_PixTemp(0),
-    m_PixDepVolt(0),
-    m_PixDigResPhi(0),
-    m_PixDigResEta(0),
-    m_PixErrPhi(0),
-    m_PixErrEta(0),
-    m_PixEta(0),
-    m_PixGloX(0),
-    m_PixGloY(0),
-    m_PixGloZ(0),
-    m_PixLocX(0),
-    m_PixLocY(0),
-    m_PixEtaModule(0),
-    m_PixPhiModule(0),
-    m_PixFirstRow(0),
-    m_PixFirstCol(0),
-    m_PixDeltaPhi(0),
-    m_PixDeltaEta(0),
-    m_PixDeltaRow(0),
-    m_PixDeltaCol(0),
-    m_PixOmegaPhi(0),
-    m_PixOmegaEta(0),
-    m_PixTrkAngle(0),
-    m_PixTrkThetaI(0),
-    m_PixTrkEta(0),
-    m_PixTrkPt(0),
-    m_PixTrkQ(0),
-    m_PixTrkClusGroupSize(0),
-    m_PixChargeList(0),	
-    m_PixToTList(0),
-    m_PixLVL1AList(0),
-    m_PixEtaIndex(0),
-    m_PixPhiIndex(0),
-    m_PixHoleGloX(0),
-    m_PixHoleGloY(0),
-    m_PixHoleGloZ(0),
-    m_PixHoleLocX(0),
-    m_PixHoleLocY(0),
-    m_PixHoleEtaModule(0),
-    m_PixHolePhiModule(0),
-    m_PixHoleLayer(0),
-    m_PixHoleECBarrel(0),
-    m_PixHoleClNearstSize(0),
-    m_PixHoleLocXClNearst(0),
-    m_PixHoleLocYClNearst(0),
-    m_PixHoleClRowClNearst(0),
-    m_PixHoleClColClNearst(0),
-    m_PixHoleGloZNearst(0),
-    m_PixHoleDeltaRowNearst(0),
-    m_PixHoleDeltaColNearst(0),
-    m_SctDetType(0),
-    m_SctLayerDisk(0),
-    m_SctEtaModule(0),
-    m_SctPhiModule(0),
-    m_SctSide(0),
-    m_SctTLorPhi(0),
-    m_SctTLorEta(0),
-    m_SctEta(0),
-    m_SctDeltaPhi(0),
-    m_SctLocX(0),
-    m_SctLocY(0),
-    m_SctIncAng(0),
-    m_SctTrkAngle(0),
-    m_SctTrkQ(0),
-    m_SctErr(0),
-    m_SctTrkClusGroupSize(0),
-    m_lvl1TriggerType(0)
- {
-   declareInterface<IValidationNtupleHelperTool>(this);
-   declareProperty("WriteDetailedPixelInformation",m_WriteDetailedPixelInformation);
-   declareProperty("PixelRDO_Container",m_rdocontainername);
-}
-
-// destructor
-InDet::SiResidualValidationNtupleHelper::~SiResidualValidationNtupleHelper() {}
-
-////////////////////////
-/// initialize
-////////////////////////
-StatusCode InDet::SiResidualValidationNtupleHelper::initialize() {
-
-	
-    // Get the Pixel and SCT helpers
-    if (detStore()->retrieve(m_pixelid, "PixelID").isFailure()) {
-      ATH_MSG_FATAL ("Could not get Pixel ID helper");
-      return StatusCode::FAILURE;
-    }
-    if (detStore()->retrieve(m_sctid, "SCT_ID").isFailure()) {
-      ATH_MSG_FATAL ("Could not get SCT ID helper");
-      return StatusCode::FAILURE;
-    }
-
-    //Get Pixel conditions
-    StatusCode sc= m_PixelConditionsSvc.retrieve();
-    if (sc.isFailure()) {
-      ATH_MSG_FATAL( "PixelSiliconConditionsSvc service not found !" );
-      return sc;
-    }
-	
-    m_PixDetType    = new std::vector<int>();
-    m_PixHasGanged  = new std::vector<int>();
-    m_PixIsFake     = new std::vector<int>();
-    m_PixIsSplit    = new std::vector<int>();
-    m_PixSplitProb1 = new std::vector<float>();
-    m_PixSplitProb2 = new std::vector<float>();
-    m_PixLVL1A      = new std::vector<int>();
-    m_PixToT        = new std::vector<int>();
-    m_PixCharge     = new std::vector<float>();
-    m_PixTLorPhi    = new std::vector<float>();
-    m_PixTLorEta    = new std::vector<float>();
-    m_PixBiasVolt   = new std::vector<float>();
-    m_PixTemp       = new std::vector<float>();
-    m_PixDepVolt    = new std::vector<float>();
-    m_PixLocX       = new std::vector<float>();
-    m_PixLocY       = new std::vector<float>();
-    m_PixEtaModule  = new std::vector<int>();
-    m_PixPhiModule  = new std::vector<int>();
-    m_PixGloX       = new std::vector<float>();
-    m_PixGloY       = new std::vector<float>();
-    m_PixGloZ       = new std::vector<float>();
-    m_PixEta        = new std::vector<float>();
-    m_PixFirstRow   = new std::vector<float>();
-    m_PixFirstCol   = new std::vector<float>();
-    m_PixDigResPhi  = new std::vector<float>();
-    m_PixDigResEta  = new std::vector<float>();
-    m_PixErrPhi     = new std::vector<float>();
-    m_PixErrEta     = new std::vector<float>();
-    m_PixDeltaRow   = new std::vector<int>();
-    m_PixDeltaCol   = new std::vector<int>();
-    m_PixDeltaPhi   = new std::vector<float>();
-    m_PixDeltaEta   = new std::vector<float>();
-    m_PixOmegaPhi   = new std::vector<float>();
-    m_PixOmegaEta   = new std::vector<float>();
-    m_PixChargeList = new std::vector<std::vector<float> >();
-    m_PixToTList    = new std::vector<std::vector<int> >();
-    m_PixLVL1AList  = new std::vector<std::vector<int> >();
-    m_PixEtaIndex   = new std::vector<std::vector<int> >();
-    m_PixPhiIndex   = new std::vector<std::vector<int> >();
-    m_PixTrkAngle   = new std::vector<float>();
-    m_PixTrkThetaI  = new std::vector<float>();
-    m_PixTrkEta     = new std::vector<float>();
-    m_PixTrkPt      = new std::vector<float>();
-    m_PixTrkQ       = new std::vector<float>();
-    m_PixTrkClusGroupSize = new std::vector<float>();
-    m_PixHoleGloX        = new std::vector<float>();
-    m_PixHoleGloY        = new std::vector<float>();
-    m_PixHoleGloZ        = new std::vector<float>();
-    m_PixHoleLocX        = new std::vector<float>();    
-    m_PixHoleLocY        = new std::vector<float>(); 
-    m_PixHoleEtaModule   = new std::vector<int>(); 
-    m_PixHolePhiModule   = new std::vector<int>(); 
-    m_PixHoleLayer       = new std::vector<float>();
-    m_PixHoleECBarrel    = new std::vector<float>();
-    m_PixHoleClNearstSize    = new std::vector<int>();
-    m_PixHoleLocXClNearst    = new std::vector<float>();
-    m_PixHoleLocYClNearst    = new std::vector<float>();
-    m_PixHoleGloZNearst      = new std::vector<float>();
-    m_PixHoleClRowClNearst   = new std::vector<float>();
-    m_PixHoleClColClNearst   = new std::vector<float>();
-    m_PixHoleDeltaRowNearst  = new std::vector<float>();
-    m_PixHoleDeltaColNearst  = new std::vector<float>();
-    m_SctDetType    = new std::vector<int>();
-    m_SctLayerDisk  = new std::vector<int>();
-    m_SctEtaModule  = new std::vector<int>();
-    m_SctPhiModule  = new std::vector<int>(); 
-    m_SctSide       = new std::vector<int>();
-    m_SctTLorPhi    = new std::vector<float>();
-    m_SctTLorEta    = new std::vector<float>();
-    m_SctEta        = new std::vector<float>();
-    m_SctDeltaPhi   = new std::vector<float>();
-    m_SctLocX   = new std::vector<float>();
-    m_SctLocY   = new std::vector<float>();
-    m_SctIncAng   = new std::vector<float>();
-    m_SctTrkAngle   = new std::vector<float>();
-    m_SctTrkQ       = new std::vector<float>();
-    m_SctErr        = new std::vector<float>();
-    m_SctTrkClusGroupSize = new std::vector<float>();
-
-    return sc;
-}
-
-///////////////////////////////////////
-/// finalize
-///////////////////////////////////////
-StatusCode InDet::SiResidualValidationNtupleHelper::finalize() {
-    delete m_PixDetType;
-    delete m_PixHasGanged;
-    delete m_PixIsFake;
-    delete m_PixIsSplit;
-    delete m_PixSplitProb1;
-    delete m_PixSplitProb2;
-    delete m_PixLVL1A;
-    delete m_PixToT;
-    delete m_PixCharge;
-    delete m_PixTLorPhi;
-    delete m_PixTLorEta;
-    delete m_PixBiasVolt;
-    delete m_PixTemp;
-    delete m_PixDepVolt;
-    delete m_PixDigResPhi;
-    delete m_PixDigResEta;
-    delete m_PixErrPhi;
-    delete m_PixErrEta;
-    delete m_PixEta;
-    delete m_PixGloX;
-    delete m_PixGloY;
-    delete m_PixGloZ;
-    delete m_PixLocX;
-    delete m_PixLocY;
-    delete m_PixEtaModule;
-    delete m_PixPhiModule;
-    delete m_PixFirstRow;
-    delete m_PixFirstCol;
-    delete m_PixDeltaPhi;
-    delete m_PixDeltaEta;
-    delete m_PixDeltaRow;
-    delete m_PixDeltaCol;
-    delete m_PixOmegaPhi;
-    delete m_PixOmegaEta;
-    delete m_PixChargeList;
-    delete m_PixToTList;
-    delete m_PixLVL1AList;
-    delete m_PixEtaIndex;
-    delete m_PixPhiIndex;
-    delete m_PixTrkAngle;
-    delete m_PixTrkThetaI;
-    delete m_PixTrkEta;
-    delete m_PixTrkPt;
-    delete m_PixTrkQ;
-    delete m_PixTrkClusGroupSize;
-    delete m_PixHoleGloX;
-    delete m_PixHoleGloY;
-    delete m_PixHoleGloZ;
-    delete m_PixHoleLocX;
-    delete m_PixHoleLocY;
-    delete m_PixHoleEtaModule;
-    delete m_PixHolePhiModule;
-    delete m_PixHoleLayer;
-    delete m_PixHoleECBarrel;
-    delete m_PixHoleClNearstSize;
-    delete m_PixHoleLocXClNearst;
-    delete m_PixHoleLocYClNearst;
-    delete m_PixHoleClRowClNearst;
-    delete m_PixHoleClColClNearst;
-    delete m_PixHoleGloZNearst;
-    delete m_PixHoleDeltaRowNearst;
-    delete m_PixHoleDeltaColNearst;
-    delete m_SctDetType;
-    delete m_SctLayerDisk;
-    delete m_SctEtaModule;
-    delete m_SctPhiModule;
-    delete m_SctSide;
-    delete m_SctTLorPhi;
-    delete m_SctTLorEta;
-    delete m_SctEta;
-    delete m_SctDeltaPhi;
-    delete m_SctLocX;
-    delete m_SctLocY;
-    delete m_SctIncAng;
-    delete m_SctTrkAngle;
-    delete m_SctTrkQ;
-    delete m_SctErr;
-    delete m_SctTrkClusGroupSize;
-    m_PixDetType=0;
-    m_PixHasGanged=0;
-    m_PixIsFake=0;
-    m_PixIsSplit=0;
-    m_PixSplitProb1=0;
-    m_PixSplitProb2=0;
-    m_PixLVL1A=0;
-    m_PixToT=0;
-    m_PixCharge=0;
-    m_PixTLorPhi=0;
-    m_PixTLorEta=0;
-    m_PixBiasVolt=0;
-    m_PixTemp=0;
-    m_PixDepVolt=0;
-    m_PixDigResPhi=0;
-    m_PixDigResEta=0;
-    m_PixErrPhi=0;
-    m_PixErrEta=0;
-    m_PixEta=0;
-    m_PixGloX=0;
-    m_PixGloY=0;
-    m_PixGloZ=0;
-    m_PixLocX=0;
-    m_PixLocY=0;
-    m_PixEtaModule=0;
-    m_PixPhiModule=0;
-    m_PixFirstRow=0;
-    m_PixFirstCol=0;
-    m_PixDeltaPhi=0;
-    m_PixDeltaEta=0;
-    m_PixDeltaRow=0;
-    m_PixDeltaCol=0;
-    m_PixOmegaPhi=0;
-    m_PixOmegaEta=0;
-    m_PixChargeList=0;
-    m_PixToTList=0;
-    m_PixLVL1AList=0;
-    m_PixEtaIndex=0;
-    m_PixPhiIndex=0;
-    m_PixTrkAngle=0;
-    m_PixTrkThetaI=0;
-    m_PixTrkEta=0;
-    m_PixTrkPt=0;
-    m_PixTrkQ=0;
-    m_PixTrkClusGroupSize=0;
-    m_PixHoleGloX=0;
-    m_PixHoleGloY=0;
-    m_PixHoleGloZ=0;
-    m_PixHoleLocX=0;
-    m_PixHoleLocY=0;
-    m_PixHoleEtaModule=0;
-    m_PixHolePhiModule=0;
-    m_PixHoleLayer=0;
-    m_PixHoleECBarrel=0;
-    m_PixHoleClNearstSize=0;
-    m_PixHoleLocXClNearst=0;
-    m_PixHoleLocYClNearst=0;
-    m_PixHoleClRowClNearst=0;
-    m_PixHoleClColClNearst=0;
-    m_PixHoleGloZNearst=0;
-    m_PixHoleDeltaRowNearst=0;
-    m_PixHoleDeltaColNearst=0;
-    m_SctDetType=0;
-    m_SctTLorPhi=0;
-    m_SctTLorEta=0;
-    m_SctEta=0;
-    m_SctDeltaPhi=0;
-    m_SctLocX=0;
-    m_SctLocY=0;
-    m_SctIncAng=0;
-    m_SctTrkAngle=0;
-    m_SctTrkQ=0;
-    m_SctLayerDisk=0;
-    m_SctEtaModule=0;
-    m_SctPhiModule=0;    
-    m_SctSide=0;
-    m_SctErr=0;
-    m_SctTrkClusGroupSize=0;
-    ATH_MSG_INFO( "finalize() successful in " << name() );
-	return StatusCode::SUCCESS;
-}
-
-///////////////////////////////////////
-/// addNtupleItems
-///////////////////////////////////////
-StatusCode InDet::SiResidualValidationNtupleHelper::addNtupleItems(
-        TTree* tree, const int& detectorType) const{
-
-    // -------------------------------------------
-    // add items to the ntuple
-    if (detectorType==Trk::TrackState::Pixel) {
-        
-	    
-	// add items for pixel
-	
-	// Layer information (0, 1, 2 for barrel /
-	// 100, 101, 102 for endcap A side, -100,
-	// -101, -102 for endcap C side) it is 0 by default
-        tree->Branch("PixDetType",      &m_PixDetType);
-	// 1 if the cluster contains ganged pixels 
-        tree->Branch("PixHasGanged",    &m_PixHasGanged);
-	// 1 if the cluster is marked as fake
-        tree->Branch("PixIsFake",       &m_PixIsFake);
-	// 1 if the cluster is marked as split
-        tree->Branch("PixIsSplit",      &m_PixIsSplit);
-	// probability to be a 1-particle cluster
-        tree->Branch("PixSplitProb1",   &m_PixSplitProb1);
-	// probability to be a 2-particle cluster
-        tree->Branch("PixSplitProb2",   &m_PixSplitProb2);
-	// lower level1 accept among the pixel of the cluster
-        tree->Branch("PixLVL1A",        &m_PixLVL1A);
-	// total ToT of the cluster
-        tree->Branch("PixToT",          &m_PixToT);
-	// total charge of the cluster
-        tree->Branch("PixCharge",       &m_PixCharge);
-	// tangent of the lorentz angle (local x direction)
-        tree->Branch("PixTLorPhi",      &m_PixTLorPhi);
-	// tangent of the lorentz angle (local y direction - should be 0!)
-        tree->Branch("PixTLorEta",      &m_PixTLorEta);
-	// Bias voltage (from conditions service)
-        tree->Branch("PixBiasVolt",      &m_PixBiasVolt);
-	// Temperature (from conditions service)
-        tree->Branch("PixTemp",      &m_PixTemp);
-	// Depletion voltage (from conditions service)
-        tree->Branch("PixDepVolt",      &m_PixDepVolt);
-        // Residuals obtained using the following cluster coordinates:
-        // [x(rowmin)+x(rowmax)]/2.
-        // [y(colmin)+y(colmax)]/2
-        // they are useful for the tuning of charge interpolation algorithms
-        tree->Branch("PixDigResPhi",    &m_PixDigResPhi);
-        tree->Branch("PixDigResEta",    &m_PixDigResEta);
-        // Pixel Cluster position error (local x)
-        tree->Branch("PixErrPhi",       &m_PixErrPhi);
-        // Pixel Cluster position error (local y)
-        tree->Branch("PixErrEta",       &m_PixErrEta);
-        // Cluster local coordinates
-        tree->Branch("PixLocX",         &m_PixLocX);
-        tree->Branch("PixLocY",         &m_PixLocY);
-	// Eta and phi indexes of the module
-        tree->Branch("PixEtaModule",    &m_PixEtaModule);
-        tree->Branch("PixPhiModule",    &m_PixPhiModule);
-	// Global position of the cluster
-        tree->Branch("PixGloX",         &m_PixGloX);
-        tree->Branch("PixGloY",         &m_PixGloY);
-        tree->Branch("PixGloZ",         &m_PixGloZ);
-        tree->Branch("PixEta",          &m_PixEta);
-	// lower row of the pixels contained in the cluster
-        tree->Branch("PixFirstRow",     &m_PixFirstRow);
-	// lower column of the pixels contained in the cluster
-        tree->Branch("PixFirstCol",     &m_PixFirstCol);
-        // Pixel Cluster Size, in cell units
-        tree->Branch("PixDeltaRow",     &m_PixDeltaRow);
-        tree->Branch("PixDeltaCol",     &m_PixDeltaCol);
-        // Pixel cluster size, in mm
-        tree->Branch("PixDeltaPhi",     &m_PixDeltaPhi);
-        tree->Branch("PixDeltaEta",     &m_PixDeltaEta);
-        // Pixel charge sharing variable. It is defined as
-        // omega_phi = Q1/(Q+Q2)
-        // where Q1 is the sum of the charges of the pixel cells of the
-        // first row of the cluster, Q2 is the sum of the charges of
-        // pixel cells of the last row of the cluster
-        // For omega_eta the definition is similar, changing row with
-        // columns
-        // It is a data member of PixelCluster.cxx and it is used in
-        // charge interpolation algorithms
-        tree->Branch("PixOmegaPhi",     &m_PixOmegaPhi);
-        tree->Branch("PixOmegaEta",     &m_PixOmegaEta);
-	/// detailed information for Pixel in the Cluster
-	if(m_WriteDetailedPixelInformation==true){
-	  tree->Branch("PixChargeList",&m_PixChargeList) ;
-	  tree->Branch("PixToTList",&m_PixToTList) ;
-	  tree->Branch("PixLVL1AList",&m_PixLVL1AList) ;
-	  tree->Branch("PixEtaIndex", &m_PixEtaIndex);
-	  tree->Branch("PixPhiIndex", &m_PixPhiIndex);
-	}
-        // Track incidence angle on the module (rphi plane) in local reference frame
-        tree->Branch("PixTrkAngle",     &m_PixTrkAngle);
-        // Track incidence angle on the module (eta-normal plane) in local reference frame
-        tree->Branch("PixTrkThetaI",     &m_PixTrkThetaI);
-        // Track pseudorapidity incidence in local module reference frame
-        // i.e. m_log(atan(theta/2)) where theta is the local polar angle
-        tree->Branch("PixTrkEta",       &m_PixTrkEta);
-	// Track momentum
-        tree->Branch("PixTrkPt",        &m_PixTrkPt);
-        // charge of the associated track (this allows to easily
-        // make plots for positive and negative particles using the same
-        // ntuple, for example)
-        tree->Branch("PixTrkQ",         &m_PixTrkQ);
-	// total size of the cluster
-        tree->Branch("PixTrkClusGroupSize", &m_PixTrkClusGroupSize);
-        
-	
-	// informations about holes on tracks
-	// Global position of the hole
-        tree->Branch("PixHoleGloX",       &m_PixHoleGloX);
-        tree->Branch("PixHoleGloY",       &m_PixHoleGloY);
-        tree->Branch("PixHoleGloZ",       &m_PixHoleGloZ);
-	// Local position of the hole
-        tree->Branch("PixHoleLocX",       &m_PixHoleLocX);
-        tree->Branch("PixHoleLocY",       &m_PixHoleLocY);
-	// Eta and phi indexes of the module that contains the hole	
-        tree->Branch("PixHoleEtaModule",  &m_PixHoleEtaModule);
-        tree->Branch("PixHolePhiModule",  &m_PixHolePhiModule);
-	// Layer (0, 1, 2) of the hole
-        tree->Branch("PixHoleLayer",      &m_PixHoleLayer);
-	// -2 for EC, 2 for EA, 0 for barrel
-        tree->Branch("PixHoleECBarrel",   &m_PixHoleECBarrel);
-        // informations about nearest cluster to hole
-	// total size of the nearest cluster
-        tree->Branch("PixHoleClNearstSize",  &m_PixHoleClNearstSize);
-	// nearest cluster local X
-        tree->Branch("PixHoleLocXClNearst",  &m_PixHoleLocXClNearst);
-	// nearest cluster local Y
-        tree->Branch("PixHoleLocYClNearst",  &m_PixHoleLocYClNearst);
-	// Column and row of the nearest cluster
-        tree->Branch("PixHoleClRowClNearst", &m_PixHoleClRowClNearst);
-        tree->Branch("PixHoleClColClNearst", &m_PixHoleClColClNearst);
-	// global z of the nearest cluster
-        tree->Branch("PixHoleGloZNearst",    &m_PixHoleGloZNearst);
-	// nearest Cluster Size, in cell units
-        tree->Branch("PixHoleDeltaRowNearst",&m_PixHoleDeltaRowNearst);
-        tree->Branch("PixHoleDeltaColNearst",&m_PixHoleDeltaColNearst);
-
-
-
-	// LVL1 trigger type
-        tree->Branch("LVL1TriggerType",&m_lvl1TriggerType, "LVL1TriggerType/I");
-    
-    
-    } else if (detectorType==Trk::TrackState::SCT) {
-
-        // 1 for barrel, 2 for disks
-        tree->Branch("SctDetType",      &m_SctDetType);
-        tree->Branch("SctLayerDisk",    &m_SctLayerDisk);
-        tree->Branch("SctEtaModule",    &m_SctEtaModule);
-        tree->Branch("SctPhiModule",    &m_SctPhiModule);        
-	tree->Branch("SctSide",         &m_SctSide);
-        // Lorentz angle in the two projection
-        tree->Branch("SctTLorPhi",      &m_SctTLorPhi);
-        tree->Branch("SctTLorEta",      &m_SctTLorEta);
-        // psudorapidity, cluster size
-        tree->Branch("SctEta",          &m_SctEta);
-        // cluster size
-        tree->Branch("SctDeltaPhi",     &m_SctDeltaPhi);
-	// incidence angle in plane perp. to strip direction
-	tree->Branch("SctIncAng",       &m_SctIncAng); 
-	//Local X and Y
-        tree->Branch("SctLocX",       &m_SctLocX);
-        tree->Branch("SctLocY",       &m_SctLocY);
-        // SCT angle (in rphi plane) in local module reference frame
-        tree->Branch("SctTrkAngle",     &m_SctTrkAngle);
-        // charge of the associated track (convenience)
-        tree->Branch("SctTrkQ",         &m_SctTrkQ);
-        tree->Branch("SctErr",          &m_SctErr);
-        tree->Branch("SctTrkClusGroupSize", &m_SctTrkClusGroupSize);
-    
-    }
-
-    ATH_MSG_DEBUG( "added all items to ntuple" );
-    return StatusCode::SUCCESS;
-}
-
-////////////////////////////////////////
-/// fill silicon data
-////////////////////////////////////////
-StatusCode InDet::SiResidualValidationNtupleHelper::fillMeasurementData (
-		const Trk::MeasurementBase* measurement,
-		const Trk::TrackParameters* trkParameters,
-		const int& detectorType, const bool& isOutlier) const{
-
-
-        const xAOD::EventInfo* eventInfo;
-	StatusCode status = evtStore()->retrieve(eventInfo);
-	if (status.isFailure())
-		ATH_MSG_ERROR( "Could not retrieve event info" );
-
-	m_lvl1TriggerType = eventInfo->level1TriggerType();
-	ATH_MSG_DEBUG(m_lvl1TriggerType );
-
-
-	if (isOutlier) {
-		// outliers usually have no track parameters
-		// and we do not want to have the outliers
-		// in the pull distributions
-		return StatusCode::SUCCESS;
-	}
-	const Trk::RIO_OnTrack *ROT = dynamic_cast<const Trk::RIO_OnTrack*>(measurement);
-	if (ROT && trkParameters){
-
-				
-        if (detectorType==Trk::TrackState::Pixel) {
-			m_PixEta->push_back( measurement->globalPosition().eta() );
-			m_PixGloX->push_back( measurement->globalPosition().x() );
-			m_PixGloY->push_back( measurement->globalPosition().y() );
-			m_PixGloZ->push_back( measurement->globalPosition().z() );
-			m_PixLocX->push_back( measurement->localParameters()[Trk::locX] );
-			m_PixLocY->push_back( measurement->localParameters()[Trk::locY] );
-			    
-			//m_PixErrPhi->push_back(measurement->localErrorMatrix().error(Trk::locX) );
-			//m_PixErrEta->push_back(measurement->localErrorMatrix().error(Trk::locY) );
-
-		       	m_PixErrPhi->push_back(Amg::error(measurement->localCovariance(),Trk::locX) );
-			m_PixErrEta->push_back(Amg::error(measurement->localCovariance(),Trk::locY) );
-
-			// cluster sizes
-			ATH_MSG_DEBUG( "cluster sizes" );
-
-			const Trk::PrepRawData* prd = ROT->prepRawData();
-			float PixDigResPhi  = -1000.;
-			float PixDigResEta  = -1000.;
-			int   PixDeltaRow   = 0;
-			int   PixDeltaCol   = 0;
-			float PixDeltaPhi   = -1000.;
-			float PixDeltaEta   = -1000.;
-			float PixOmegaPhi   = -1000.;
-			float PixOmegaEta   = -1000.;
-			float PixTLorPhi    = -1000.;
-			float PixTLorEta    = -1000.;
-			float PixBiasVolt    = -1000.;
-			float PixTemp    = -1000.;
-			float PixDepVolt    = -1000.;
-			int   PixHasGanged  = 0;
-			int   PixIsFake     = 0;
-			int   PixIsSplit    = 0;
-			int   PixSplitProb1 = 0;
-			int   PixSplitProb2 = 0;
-			int   PixLVL1A      = 0;
-			int   PixToT        = 0;
-			float PixCharge     = 0;
-			int   PixDetType    = 0;
-			float PixTrkAngle   = -1000.;
-			float PixTrkThetaI   = -1000.;
-			float PixTrkEta     = -1000.;
-			float PixTrkPt      = -1000.;
-			float PixTrkQ       = -1000.;
-            		float PixTrkClusGroupSize = -1000.;
-			int PixEtaModule = -1000;
-			int PixPhiModule = -1000;
-			std::vector<float>* PixChargeList = new std::vector<float>();
-			std::vector<int>* PixToTList  = new std::vector<int>();
-			std::vector<int>* PixLVL1AList= new std::vector<int>();
-			std::vector<int>* PixEtaIndex = new std::vector<int>();
-			std::vector<int>* PixPhiIndex = new std::vector<int>();
-
-			if(prd) {
-				const InDet::PixelCluster* sc =
-					dynamic_cast<const InDet::PixelCluster*>(prd);
-				if(sc) {
-					const InDetDD::SiDetectorElement* element =
-						sc->detectorElement(); 
-
-					// digital resolution
-					ATH_MSG_DEBUG( "digital resolution..." );
-					Amg::Vector2D digLocPar = GetDigitalPosition(sc,element);
-					ATH_MSG_DEBUG( "done" );
-					
-					PixDigResPhi = digLocPar[Trk::distPhi] - trkParameters->parameters()[Trk::distPhi];
-					PixDigResEta = digLocPar[Trk::distEta] - trkParameters->parameters()[Trk::distEta];
-					if(sc->gangedPixel()) PixHasGanged = 1;
-					if(sc->isFake()) PixIsFake = 1;
-					if(sc->isSplit()) PixIsSplit = 1;
-					PixSplitProb1=sc->splitProbability1();
-					PixSplitProb2=sc->splitProbability2();
-					PixLVL1A = sc->LVL1A();
-					PixToT = sc->totalToT();
-					PixCharge = sc->totalCharge();
-					PixOmegaPhi = sc->omegax();
-					PixOmegaEta = sc->omegay();
-					
-					InDet::SiWidth width = sc->width();
-					PixDeltaRow = int(width.colRow().x());
-					PixDeltaCol = int(width.colRow().y());
-					PixDeltaPhi = width.phiR();
-					PixDeltaEta = width.z();
-
-					PixTLorPhi  = element->design().readoutSide() * element->getTanLorentzAnglePhi();
-					PixTLorEta  = element->getTanLorentzAngleEta();
-
-					const Identifier element_id = element->identify();
-				
-					PixBiasVolt = m_PixelConditionsSvc->biasVoltage(element_id);
-					PixTemp = m_PixelConditionsSvc->temperature(element_id);
-					PixDepVolt = m_PixelConditionsSvc->depletionVoltage(element_id);
-					
-					PixEtaModule = m_pixelid->eta_module(element_id);
-					PixPhiModule = m_pixelid->phi_module(element_id);
-
-					// use 0, 1, 2 for barrel / 100, 101, 102 for EA / -100, -101, -102 for EC
-					if(m_pixelid->barrel_ec(element_id)==0) PixDetType = m_pixelid->layer_disk(element_id);
-					else if(m_pixelid->barrel_ec(element_id)==-2) PixDetType =-1* (100 + m_pixelid->layer_disk(element_id));
-                        		else if(m_pixelid->barrel_ec(element_id)==2) PixDetType =(100 + m_pixelid->layer_disk(element_id));
-
-//					HepVector3D my_track = trkParameters->momentum();
-//					HepVector3D my_normal = element->normal();
-//					HepVector3D my_phiax = element->phiAxis();
-//					HepVector3D my_etaax = element->etaAxis();
-					
-					Amg::Vector3D my_track = trkParameters->momentum();
-					Amg::Vector3D my_normal = element->normal();
-					Amg::Vector3D my_phiax = element->phiAxis();
-					Amg::Vector3D my_etaax = element->etaAxis();
-
-                                        // track component on etaAxis:
-					float trketacomp = my_track.dot(my_etaax);
-					// track component on phiAxis:
-					float trkphicomp = my_track.dot(my_phiax);
-					// track component on the normal to the module
-					float trknormcomp = my_track.dot(my_normal);
-					// Track angle
-					PixTrkAngle = atan2(trkphicomp,trknormcomp);
-					PixTrkThetaI = atan2(trketacomp,trknormcomp);
-					// reducing the angle in the right quadrant
-					float Theta = PixTrkThetaI;
-					if(Theta > M_PI / 2 ) Theta -= M_PI;
-					else if(Theta < - M_PI / 2 ) Theta += M_PI;
-					Theta = ( M_PI / 2 ) - Theta;
-					PixTrkEta   = - log(tan(Theta/2));
-					PixTrkPt    = trkParameters->pT();
-					PixTrkQ     = trkParameters->charge();
-                    			PixTrkClusGroupSize = sc->rdoList().size(); 
-
-					if(m_WriteDetailedPixelInformation==true){
-					  PixelRDO_Container::const_iterator rdo_collection; 
-					  if ( m_rdocontainer ) 
-					    rdo_collection = 
-					      m_rdocontainer->indexFind(m_pixelid->wafer_hash(element_id));
-
-					  const std::vector<Identifier>& rdoID = sc->rdoList();
-					  for(int w=0; w<PixTrkClusGroupSize; w++) {
-					    PixEtaIndex->push_back(m_pixelid->eta_index((rdoID)[w]));
-					    PixPhiIndex->push_back(m_pixelid->phi_index((rdoID)[w]));
-					    if ( m_rdocontainer && rdo_collection!=m_rdocontainer->end() ) {
-					      int LVL1L = -1, ToTL=-1;
-					      PixelRDO_Collection::const_iterator pRDO    = (*rdo_collection)->begin();
-					      PixelRDO_Collection::const_iterator pRDOend = (*rdo_collection)->end();
-					      // take into account ganged pixels are not in the RDO collection
-					      Identifier rdoID1 = rdoID[w], rdoID2 = rdoID[w]; 
-					      if ( sc->gangedPixel() ) {
-						InDetDD::SiCellId cellID = element->cellIdFromIdentifier (rdoID[w]);
-						if ( element->numberOfConnectedCells (cellID) > 1) {
-						  InDetDD::SiCellId gangedCellID = element->connectedCell (cellID,0);
-						  if ( gangedCellID==cellID ) gangedCellID = element->connectedCell (cellID,1);
-						  rdoID2 = element->identifierFromCellId (gangedCellID);
-						} 
-					      }
-					      while (pRDO!=pRDOend) {
-						Identifier myID = (*pRDO)->identify(); 
-						if ( myID==rdoID1 || myID==rdoID2 ) {
-						  LVL1L = (*pRDO)->getLVL1A();
-						  ToTL  = (*pRDO)->getToT();
-						  break;
-						}
-						pRDO++;
-					      }
-					      PixToTList->push_back(ToTL);
-					      PixLVL1AList->push_back(LVL1L);
-					      if ( (sc->chargeList()).size()==PixTrkClusGroupSize )
-						PixChargeList->push_back((sc->chargeList())[w]);
-					      else 
-						PixChargeList->push_back(-1.);
-					    }
-					  }					
-					}
-					
-				}// end if(pixel cluster)
-			}else{
-				m_PixFirstRow->push_back(0);
-				m_PixFirstCol->push_back(0);
-			}// end if (prd)
-			m_PixEtaModule->push_back(PixEtaModule);
-			m_PixPhiModule->push_back(PixPhiModule);
-			m_PixDigResPhi->push_back(PixDigResPhi);
-			m_PixDigResEta->push_back(PixDigResEta);
-			m_PixDeltaRow->push_back(PixDeltaRow);
-			m_PixDeltaCol->push_back(PixDeltaCol);
-			m_PixDeltaPhi->push_back(PixDeltaPhi);
-			m_PixDeltaEta->push_back(PixDeltaEta);
-			m_PixOmegaPhi->push_back(PixOmegaPhi);
-			m_PixOmegaEta->push_back(PixOmegaEta);
-			m_PixTLorPhi->push_back(PixTLorPhi);
-			m_PixTLorEta->push_back(PixTLorEta);
-			m_PixBiasVolt->push_back(PixBiasVolt);
-			m_PixTemp->push_back(PixTemp);
-			m_PixDepVolt->push_back(PixDepVolt);
-			m_PixHasGanged->push_back(PixHasGanged);
-			m_PixIsFake->push_back(PixIsFake);
-			m_PixIsSplit->push_back(PixIsSplit);
-			m_PixSplitProb1->push_back(PixSplitProb1);
-			m_PixSplitProb2->push_back(PixSplitProb2);
-			m_PixLVL1A->push_back(PixLVL1A);
-			m_PixToT->push_back(PixToT);
-			m_PixCharge->push_back(PixCharge);
-			m_PixDetType->push_back(PixDetType);
-			m_PixTrkAngle->push_back(PixTrkAngle);
-			m_PixTrkThetaI->push_back(PixTrkThetaI);
-			m_PixTrkEta->push_back(PixTrkEta);
-			m_PixTrkPt->push_back(PixTrkPt);
-			m_PixTrkQ->push_back(PixTrkQ);
-            		m_PixTrkClusGroupSize->push_back(PixTrkClusGroupSize);
-			m_PixChargeList->push_back(*PixChargeList);
-			m_PixToTList->push_back(*PixToTList);
-			m_PixLVL1AList->push_back(*PixLVL1AList);
-			m_PixEtaIndex->push_back(*PixEtaIndex);
-			m_PixPhiIndex->push_back(*PixPhiIndex);
-                        delete PixChargeList;
-                        delete PixToTList;
-                        delete PixLVL1AList;
-                        delete PixEtaIndex;
-                        delete PixPhiIndex;
-
-		}else if (detectorType==Trk::TrackState::SCT) {
-			
-			m_SctEta->push_back( measurement->globalPosition().eta() );
-			//m_SctErr->push_back( measurement->localErrorMatrix().error(Trk::locX) );
-
-			m_SctErr->push_back( Amg::error(measurement->localCovariance(),Trk::locX) );
-
-			float SctDeltaPhi   = -1000.;
-			float SctLocX       = -1000.;
-			float SctLocY       = -1000.;
-			float SctIncAng     = -1000.; 
-			float SctTLorPhi    = -1000.;
-			float SctTLorEta    = -1000.;
-			int SctDetType      = 0;
-			float SctTrkAngle   = -1000.;
-			float SctTrkQ       = -1000.;
-			float SctTrkClusGroupSize = -1000.;
-			int SctPhiModule    = 0;
-			int SctSide         = 0;
-			int SctEtaModule    = 0;
-			int SctLayerdisk    = 0;
-            
-			const Trk::PrepRawData* prd = ROT->prepRawData();
-			if(prd) {
-				const InDet::SiCluster* sc = dynamic_cast<const InDet::SiCluster*>(prd);
-				if(sc) {
-					const InDetDD::SiDetectorElement* element = sc->detectorElement();
-                    			const Identifier clId = sc->identify();
-
-					InDet::SiWidth width = sc->width();
-					SctDeltaPhi = width.phiR();
-					SctPhiModule = m_sctid->phi_module(clId);
-					SctSide      = m_sctid->side(clId);
-                    			SctEtaModule = m_sctid->eta_module(clId);
-                    			SctLayerdisk = m_sctid->layer_disk(clId);
-                    			SctDetType  = m_sctid->barrel_ec(clId);
-
-					SctTLorPhi  = element->getTanLorentzAnglePhi();
-					SctTLorEta  = element->getTanLorentzAngleEta();
-
-					// Track angle
-					ATH_MSG_DEBUG( "track angle" );
-					float phi = trkParameters->parameters()[Trk::phi];
-					float trkq = trkParameters->charge();
-					float phis = element->normal().phi();
-					double PI = acos(-1.);
-					if(fabs(phi-phis) < PI) SctTrkAngle = phi-phis;
-					else if(phi-phis>PI) SctTrkAngle = phi-phis-2*PI;
-					else if(phi-phis<-1*PI) SctTrkAngle = 2*PI+phi-phis;
-					
-					//Local X and Y
-					SctLocX=trkParameters->parameters()[Trk::locX];
-					SctLocY=trkParameters->parameters()[Trk::locY];
-					//Incidence angle (for Lorentz angle calculation)
-					double sinAlpha = element->sinStereoLocal(sc->localPosition());
-					double phiToWafer(90.),thetaToWafer(90.);
-					double pTrack[3];
-					pTrack[0] = trkParameters->momentum().x();
-					pTrack[1] = trkParameters->momentum().y();
-					pTrack[2] = trkParameters->momentum().z();
-					int iflag = findAnglesToWaferSurface (pTrack, sinAlpha,  element, thetaToWafer, phiToWafer );
-					if ( iflag < 0) {
-					  ATH_MSG_ERROR(  "Error in finding track angles to wafer surface");
-					  return StatusCode::FAILURE;
-					}
-					SctIncAng = phiToWafer;
-
-					SctTrkQ = trkq;
-                    			SctTrkClusGroupSize=sc->rdoList().size();
-
-				}// end if (silicon cluster)
-			}// end if (prd)
-			m_SctDeltaPhi->push_back( SctDeltaPhi );
-			m_SctLocX->push_back(SctLocX);
-			m_SctLocY->push_back(SctLocY);
-                        m_SctIncAng->push_back( SctIncAng );
-			m_SctTLorPhi->push_back( SctTLorPhi );
-			m_SctTLorEta->push_back( SctTLorEta );
-			m_SctDetType->push_back( SctDetType );
-			m_SctTrkAngle->push_back( SctTrkAngle );
-			m_SctTrkQ->push_back( SctTrkQ );
-		    	m_SctTrkClusGroupSize->push_back( SctTrkClusGroupSize );
-		    	m_SctPhiModule->push_back( SctPhiModule );
-		    	m_SctSide->push_back( SctSide );
-		    	m_SctEtaModule->push_back( SctEtaModule );
-		    	m_SctLayerDisk->push_back( SctLayerdisk );
-
-		} // end detector type
-	}else return StatusCode::FAILURE; // end of if(ROT && trkParameters)
-	
-	ATH_MSG_DEBUG( "that's it folks" );
-	return StatusCode::SUCCESS;
-}
-
-//////////////////////////////////////////////////////////////////////////////////////////////////
-
-Amg::Vector2D InDet::SiResidualValidationNtupleHelper::GetDigitalPosition(
-		const InDet::PixelCluster*& pix,
-		const InDetDD::SiDetectorElement*& EL) const {
-	
-	const InDetDD::PixelModuleDesign* design =
-		dynamic_cast<const InDetDD::PixelModuleDesign*>(&EL->design());
-	std::vector<Identifier> rdos = pix->rdoList();
-	std::vector<Identifier>::const_iterator oneRDO = rdos.begin();
-	int rowmin=9999;
-	int rowmax=-9999;
-	int colmin=9999;
-	int colmax=-9999;
-	for(; oneRDO != rdos.end(); oneRDO++) {
-		int row = m_pixelid->phi_index(*oneRDO);
-		int col = m_pixelid->eta_index(*oneRDO);
-		if(rowmin > row) rowmin = row;
-		if(rowmax < row) rowmax = row;
-		if(colmin > col) colmin = col;
-		if(colmax < col) colmax = col;
-	}
-	m_PixFirstRow->push_back(rowmin);
-	m_PixFirstCol->push_back(colmin);
-	InDetDD::SiLocalPosition pos1 = design->positionFromColumnRow(colmin,rowmin);
-	InDetDD::SiLocalPosition pos2 = design->positionFromColumnRow(colmax,rowmin);
-	InDetDD::SiLocalPosition pos3 = design->positionFromColumnRow(colmin,rowmax);
-	InDetDD::SiLocalPosition pos4 = design->positionFromColumnRow(colmax,rowmax);
-	InDetDD::SiLocalPosition centroid = 0.25*(pos1+pos2+pos3+pos4);
-	double shift = EL->getLorentzCorrection();
-	Amg::Vector2D position =
-	  Amg::Vector2D(centroid.xPhi() + shift, centroid.xEta());
-	return position;
-
-}
-
-
-////////////////////////////////////////
-/// fill holes data
-////////////////////////////////////////
-
-StatusCode InDet::SiResidualValidationNtupleHelper::fillHoleData (
-		const Trk::TrackStateOnSurface& tsos,
-		const int& detectorType ) const{
-
-	if (detectorType==Trk::TrackState::Pixel) {
-		m_PixHoleGloX->push_back(tsos.trackParameters()->position().x());
-		m_PixHoleGloY->push_back(tsos.trackParameters()->position().y());
-		m_PixHoleGloZ->push_back(tsos.trackParameters()->position().z()); 
-		const Trk::TrackParameters *tpmt = tsos.trackParameters();
-		//const Trk::Surface aS = tpmt->associatedSurface();
-		const Amg::Vector2D locPos= tpmt->localPosition();
-		m_PixHoleLocX->push_back(locPos[Trk::locX]);	
-		m_PixHoleLocY->push_back(locPos[Trk::locY]);
-
-		Identifier detHoleId = tpmt->associatedSurface().associatedDetectorElementIdentifier();
-		m_PixHoleEtaModule->push_back(int(m_pixelid->eta_module(detHoleId))); 
-		m_PixHolePhiModule->push_back(int(m_pixelid->phi_module(detHoleId)));
-		m_PixHoleLayer->push_back(float(m_pixelid->layer_disk(detHoleId))); 
-		m_PixHoleECBarrel->push_back(float(m_pixelid->barrel_ec(detHoleId)));
-	
-		//	===   search for nearest cluster   ===	
-		float dist=100, dist2=100;
-		Identifier clNearstId;
-		// default values if nearest cluster not found 
-		int PixDeltaRowNearst = -1;
-		int PixClRowClNearst  = -10;
-		int PixClColClNearst  = -10;
-		int PixDeltaColNearst = -1;
-		int  GroupSizeNearst  = -1; 
-		float   LocXClNearst  = -10;
-		float   LocYClNearst  = -40;
-		float   GloZNearst  = -1000;
-	
-		const InDet::PixelClusterContainer *riocontainer=0;
-		StatusCode sc = evtStore()->retrieve(riocontainer, "PixelClusters");
-		if(sc.isFailure()) {
-			ATH_MSG_WARNING("Could not get PrepRawDataContainer");
-			return sc;
-		}
-		
-
-		InDet::PixelClusterContainer::const_iterator rioItr = riocontainer->begin();
-		for( ; rioItr != riocontainer->end(); rioItr++){ // loop1
-			const PixelClusterCollection *colNext=(*rioItr);
-			if (!colNext) continue;
-			if (detHoleId == colNext->identify()){ // if H==C
-				DataVector<PixelCluster>::const_iterator p_clus = colNext->begin();
-				for(; p_clus!=colNext->end(); ++p_clus) { // loop2
-					const PixelCluster& cluster = **p_clus;
-					const Amg::Vector2D locPos2 = cluster.localPosition();
-					dist2=sqrt( (locPos2[Trk::locX]-locPos[Trk::locX]) *
-							( locPos2[Trk::locX] - locPos[Trk::locX]) +
-							(locPos2[Trk::locY] - locPos[Trk::locY]) *
-							(locPos2[Trk::locY] - locPos[Trk::locY]) );
-					if ( dist2<dist ){
-						dist              = dist2; 
-						InDet::SiWidth width = cluster.width(); 	
-						PixDeltaRowNearst = int(width.colRow().x());
-						PixDeltaColNearst = int(width.colRow().y());
-						GroupSizeNearst   = cluster.rdoList().size();  
-						GloZNearst        = cluster.globalPosition().z(); 
-						clNearstId        = (*p_clus)->identify();
-						PixClRowClNearst  = m_pixelid->phi_index(clNearstId);
-						PixClColClNearst  = m_pixelid->eta_index(clNearstId);
-						LocXClNearst      = locPos2[Trk::locX];
-						LocYClNearst      = locPos2[Trk::locY];
-					}// end if dist2<dist
-				} // end loop2
-			}  // end if H==C
-		}  // end loop1 
-		
-		m_PixHoleClNearstSize   ->push_back(GroupSizeNearst); // nearest cluster size
-		m_PixHoleLocXClNearst   ->push_back(LocXClNearst); // local x of cluster
-		m_PixHoleLocYClNearst   ->push_back(LocYClNearst);
-		m_PixHoleGloZNearst     ->push_back(GloZNearst); 
-		m_PixHoleDeltaRowNearst ->push_back(PixDeltaRowNearst);
-		m_PixHoleDeltaColNearst ->push_back(PixDeltaColNearst);
-		m_PixHoleClRowClNearst  ->push_back(PixClRowClNearst); 
-		m_PixHoleClColClNearst  ->push_back(PixClColClNearst); 
-    }  // end if detectorType==Pixel
-    
-    return StatusCode::SUCCESS;
-} // end fillHoleData ()
-
-////////////////////////////////////////
-/// calculate angle to SCT wafer
-////////////////////////////////////////
-int InDet::SiResidualValidationNtupleHelper::findAnglesToWaferSurface (double (&vec)[3], double &sinAlpha, const InDetDD::SiDetectorElement*& element, double &theta, double &phi ) const {
-
-  int iflag(-1);
-
-  phi   = 90.;
-  theta = 90.;
-
-  double cosAlpha = sqrt(1.-sinAlpha*sinAlpha);
-  double phix =  cosAlpha*element->phiAxis().x() + sinAlpha*element->phiAxis().y();
-  double phiy = -sinAlpha*element->phiAxis().x() + cosAlpha*element->phiAxis().y();
-
-  double pNormal = vec[0]*element->normal().x()  + vec[1]*element->normal().y()  + vec[2]*element->normal().z();
-  double pEta    = vec[0]*element->etaAxis().x() + vec[1]*element->etaAxis().y() + vec[2]*element->etaAxis().z();
-  //  double pPhi    = vec[0]*element->phiAxis().x() + vec[1]*element->phiAxis().y() + vec[2]*element->phiAxis().z();
-  double pPhi    = vec[0]*phix                   + vec[1]*phiy                   + vec[2]*element->phiAxis().z();
-
-  if (pPhi<0.) phi   = -90.;
-  if (pEta<0.) theta = -90.;
-  if (pNormal!=0.) {
-    phi   = atan(pPhi/pNormal)/deg;
-    theta = atan(pEta/pNormal)/deg;
-  }
-
-  iflag = 1;
-
-  return iflag;
-}
-
-
-
-
-
-////////////////////////////////////////
-/// clear variables
-////////////////////////////////////////
-
-StatusCode InDet::SiResidualValidationNtupleHelper::resetVariables (
-		const int& detectorType ) const {
-
-  if (detectorType==Trk::TrackState::Pixel) {
-    if( m_WriteDetailedPixelInformation ){
-      StatusCode sc=evtStore()->retrieve(m_rdocontainer, m_rdocontainername);
-      if ( sc.isFailure() ) {
-	m_rdocontainer=0;
-	ATH_MSG_DEBUG("Container " << m_rdocontainername << " not found");
-      }
-    }
-    m_PixDetType->clear();
-    m_PixHasGanged->clear();
-    m_PixIsFake->clear();
-    m_PixIsSplit->clear();
-    m_PixSplitProb1->clear();
-    m_PixSplitProb2->clear();
-    m_PixLVL1A->clear();
-    m_PixToT->clear();
-    m_PixCharge->clear();
-    m_PixTLorPhi->clear();
-    m_PixTLorEta->clear();
-    m_PixBiasVolt->clear();
-    m_PixTemp->clear();
-    m_PixDepVolt->clear();
-    m_PixDigResPhi->clear();
-    m_PixDigResEta->clear();
-    m_PixErrPhi->clear();
-    m_PixErrEta->clear();
-    m_PixEta->clear();
-    m_PixGloX->clear();
-    m_PixGloY->clear();
-    m_PixGloZ->clear();
-    m_PixLocX->clear();
-    m_PixLocY->clear();
-    m_PixEtaModule->clear();
-    m_PixPhiModule->clear();
-    m_PixFirstRow->clear();
-    m_PixFirstCol->clear();
-    m_PixDeltaPhi->clear();
-    m_PixDeltaEta->clear();
-    m_PixDeltaRow->clear();
-    m_PixDeltaCol->clear();
-    m_PixOmegaPhi->clear();
-    m_PixOmegaEta->clear();
-    m_PixChargeList->clear();
-    m_PixToTList->clear();
-    m_PixLVL1AList->clear();
-    m_PixEtaIndex->clear();
-    m_PixPhiIndex->clear();
-    m_PixTrkAngle->clear();
-    m_PixTrkThetaI->clear();
-    m_PixTrkEta->clear();
-    m_PixTrkPt->clear();
-    m_PixTrkQ->clear();
-    m_PixTrkClusGroupSize->clear();
-    m_PixHoleGloX->clear();
-    m_PixHoleGloY->clear();
-    m_PixHoleGloZ->clear();
-    m_PixHoleLocX->clear();
-    m_PixHoleLocY->clear();
-    m_PixHoleEtaModule->clear();
-    m_PixHolePhiModule->clear();
-    m_PixHoleLayer->clear();
-    m_PixHoleECBarrel->clear();
-    m_PixHoleClNearstSize->clear();
-    m_PixHoleLocXClNearst->clear();
-    m_PixHoleLocYClNearst->clear();
-    m_PixHoleClRowClNearst->clear();
-    m_PixHoleClColClNearst->clear();
-    m_PixHoleGloZNearst->clear();
-    m_PixHoleDeltaRowNearst->clear();
-    m_PixHoleDeltaColNearst->clear();
-  }else if (detectorType==Trk::TrackState::SCT){
-    m_SctDetType->clear();
-    m_SctLayerDisk->clear();
-    m_SctEtaModule->clear();
-    m_SctPhiModule->clear();
-    m_SctTLorPhi->clear();
-    m_SctTLorEta->clear();
-    m_SctEta->clear();
-    m_SctDeltaPhi->clear();
-    m_SctLocX->clear();
-    m_SctLocY->clear();
-    m_SctIncAng->clear();
-    m_SctTrkAngle->clear();
-    m_SctTrkQ->clear();
-    m_SctErr->clear();
-    m_SctTrkClusGroupSize->clear();
-    m_SctSide->clear();
-  }
-	
-  return StatusCode::SUCCESS;
-}
-
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/src/TRT_DriftCircleValidationNtupleWriter.cxx b/InnerDetector/InDetValidation/InDetTrackValidation/src/TRT_DriftCircleValidationNtupleWriter.cxx
deleted file mode 100755
index 99a403e8e73829a87086d3c06ef178f76925a29f..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetValidation/InDetTrackValidation/src/TRT_DriftCircleValidationNtupleWriter.cxx
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-///////////////////////////////////////////////////////////////////
-// TRT_DriftCircleValidationNtupleWriter.cxx, (c) ATLAS Detector Software
-///////////////////////////////////////////////////////////////////
-
-#include "InDetTrackValidation/TRT_DriftCircleValidationNtupleWriter.h"
-// Gaudi
-#include "GaudiKernel/SmartDataPtr.h"
-#include "GaudiKernel/ITHistSvc.h"
-#include "TTree.h"
-
-// Trk
-//#include "TrkEventPrimitives/GlobalPosition.h"
-//#include "TrkEventPrimitives/LocalPosition.h"
-#include "TrkEventPrimitives/ParamDefs.h"
-
-#include "GaudiKernel/ListItem.h"
-
-#include "xAODEventInfo/EventInfo.h"
-
-#include "InDetPrepRawData/TRT_DriftCircle.h"
-
-InDet::TRT_DriftCircleValidationNtupleWriter::TRT_DriftCircleValidationNtupleWriter(const std::string& name, ISvcLocator* pSvcLocator):
-        AthAlgorithm(name,pSvcLocator),
-        m_riocontainer(0),
-        //m_inputTrackCollection("Tracks")
-        //        m_fullNtupleName("/NTUPLES/FILE1/FitterValidation/TrackStatistics"),
-        mjo_riocontainername("TRT_DriftCircles"),
-        m_ntupleFileName("/NTUPLES/FILE1"),
-        m_ntupleDirName("FitterValidation"),
-        m_ntupleTreeName("RIOs"),
-        m_nt(0),
-        m_rioLoc1(0),
-        m_rioSurfaceX(0),
-        m_rioSurfaceY(0),
-        m_rioSurfaceZ(0)
-{
-    declareProperty("TRT_DriftCircleContainer", mjo_riocontainername);
-    declareProperty("NtupleFileName", m_ntupleFileName);
-    declareProperty("NtupleDirectoryName", m_ntupleDirName);
-    declareProperty("NtupleTreeName", m_ntupleTreeName);
-
-}
-
-InDet::TRT_DriftCircleValidationNtupleWriter::~TRT_DriftCircleValidationNtupleWriter() {}
-
-StatusCode InDet::TRT_DriftCircleValidationNtupleWriter::initialize() {
-
-    // ---------------------------
-    // retrive pointer to THistSvc
-    ITHistSvc *tHistSvc;
-    StatusCode sc =  service("THistSvc", tHistSvc);
-    if ( sc.isFailure() ) {
-        ATH_MSG_ERROR( "Unable to retrieve pointer to THistSvc" );
-        return sc;
-    }
-
-    // ---------------------------
-    // create tree and register it to THistSvc
-    m_nt = new TTree(TString(m_ntupleTreeName), "TRT_DriftCircles");
-    // NB: we must not delete the tree, this is done by THistSvc
-    std::string fullNtupleName =  "/"+m_ntupleFileName+"/"+m_ntupleDirName+"/"+m_ntupleTreeName;
-    sc = tHistSvc->regTree(fullNtupleName, m_nt);
-    if (sc.isFailure()) {
-        ATH_MSG_ERROR( "Unable to register TTree : " << fullNtupleName );
-        return sc;
-    }
-    //-----------------
-    // add items
-    // event info:
-    m_nt->Branch("EventNumber",     &m_eventNumber, "event_number/I");      // Event number
-    m_nt->Branch("TRT_nRIOs",       &m_nRIOs,       "Number_of_RIOs/I");    // number of TRT RIOs
-    // RIO info:
-    m_rioLoc1       = new std::vector<float>();
-    m_rioSurfaceX   = new std::vector<float>();
-    m_rioSurfaceY   = new std::vector<float>();
-    m_rioSurfaceZ   = new std::vector<float>();
-    m_nt->Branch("TRT_DriftRadius", &m_rioLoc1); 
-    m_nt->Branch("TRT_SurfaceX",    &m_rioSurfaceX); 
-    m_nt->Branch("TRT_SurfaceY",    &m_rioSurfaceY); 
-    m_nt->Branch("TRT_SurfaceZ",    &m_rioSurfaceZ); 
-
-    return sc;
-}
-
-StatusCode InDet::TRT_DriftCircleValidationNtupleWriter::execute() {
-
-    StatusCode sc = StatusCode::SUCCESS;
-    // -----------
-    // get the container with TRT RIOs
-    m_riocontainer = 0;
-    sc = evtStore()->retrieve(m_riocontainer, mjo_riocontainername);
-    if(sc.isFailure()) {
-        ATH_MSG_ERROR("Could not get PrepRawDataContainer");
-        return StatusCode::FAILURE;
-    }
-
-    //-------------
-    // get the event number    
-    const xAOD::EventInfo* eventInfo;
-    sc = evtStore()->retrieve(eventInfo);
-    if (sc.isFailure()) {
-        ATH_MSG_ERROR( "Could not retrieve event info" );
-    }
-    m_eventNumber = eventInfo->eventNumber();
-    int RIOindex = 0;
-    // reset variables
-    m_nRIOs = 0;
-    m_rioLoc1->clear();
-    m_rioSurfaceX->clear();
-    m_rioSurfaceY->clear();
-    m_rioSurfaceZ->clear();
-     // -----------------------
-    // get all the RIO_Collections in the container
-    InDet::TRT_DriftCircleContainer::const_iterator containerIterator = m_riocontainer->begin();
-    for( ; containerIterator != m_riocontainer->end(); containerIterator++){
-        ATH_MSG_DEBUG( "There are "  << (*containerIterator)->size() << " entries in the PrepRawDataCollection" );
-
-        // ---------------------------------
-        //get all the RIOs in the collection
-        InDet::TRT_DriftCircleCollection::const_iterator rioIterator = (*containerIterator)->begin();
-        for (; rioIterator != (*containerIterator)->end(); rioIterator++) {
-            // get the surface center of the RIO
-            if (!(*rioIterator)) {
-                ATH_MSG_WARNING( "NULL pointer to RIO" );
-                continue;
-            }
-            if (!((*rioIterator)->detectorElement())) {
-                ATH_MSG_WARNING( "in RIO: NULL pointer to detElement" );
-                continue;
-            }
-
-            if (m_nRIOs >=500000) {
-                ATH_MSG_WARNING( "reached max. number of RIO entries in the ntuple" );
-                m_nRIOs = RIOindex;
-                m_nt->Fill();
-                return StatusCode::SUCCESS;
-
-            }
-            const Amg::Vector3D surfaceGlobPos = (*rioIterator)->detectorElement()->center( (*rioIterator)->identify() ) ;
-            // fill surface global position
-            m_rioSurfaceX->push_back(float(surfaceGlobPos.x()));
-            m_rioSurfaceY->push_back(float(surfaceGlobPos.y()));
-            m_rioSurfaceZ->push_back(float(surfaceGlobPos.z()));
-            // get the local position of the RIO
-            const Amg::Vector2D locPos = (*rioIterator)->localPosition();
-            // fill local position
-            m_rioLoc1->push_back(float(locPos[Trk::locX]));
-            // count the RIO
-            RIOindex++;
-        }
-    }
-    m_nRIOs = RIOindex;
-    m_nt->Fill();
-    return StatusCode::SUCCESS;
-}
-
-StatusCode InDet::TRT_DriftCircleValidationNtupleWriter::finalize() {
-    ATH_MSG_INFO( "TRT_DriftCircleValidationNtupleWriter finalize()" );
-    delete m_rioLoc1;
-    delete m_rioSurfaceX;
-    delete m_rioSurfaceY;
-    delete m_rioSurfaceZ;
-    m_rioLoc1       = 0;
-    m_rioSurfaceX   = 0;
-    m_rioSurfaceY   = 0;
-    m_rioSurfaceZ   = 0;
-
-    return StatusCode::SUCCESS;
-}
-
-
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/src/TRT_DriftTimeNtupleHelper.cxx b/InnerDetector/InDetValidation/InDetTrackValidation/src/TRT_DriftTimeNtupleHelper.cxx
deleted file mode 100755
index de1a4deeba0ca1500b0d5143836d5cbec2ed85bd..0000000000000000000000000000000000000000
--- a/InnerDetector/InDetValidation/InDetTrackValidation/src/TRT_DriftTimeNtupleHelper.cxx
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//////////////////////////////////////////////////////////////////
-// TRT_DriftTimeNtupleHelper.cxx
-//   Source file for class TRT_DriftTimeNtupleHelper
-///////////////////////////////////////////////////////////////////
-// (c) ATLAS Detector software
-///////////////////////////////////////////////////////////////////
-// John.Alison@cern.ch Sebastian.Fleischmann@cern.ch
-////////////////////////////////////////////////////////////////////
-
-
-#include "TTree.h"
-
-// Trk
-#include "InDetTrackValidation/TRT_DriftTimeNtupleHelper.h"
-#include "TrkEventPrimitives/TrackStateDefs.h"
-#include "TrkMeasurementBase/MeasurementBase.h"
-
-//#include "TrkEventPrimitives/LocalPosition.h"
-//#include "TrkEventPrimitives/LocalParameters.h"
-//#include "TrkEventPrimitives/ErrorMatrix.h"
-//#include "TrkEventPrimitives/CovarianceMatrix.h"
-//#include "TrkParameters/MeasuredTrackParameters.h"
-#include "InDetReadoutGeometry/TRT_DetectorManager.h"
-
-//#include "TrkParameters/MeasuredAtaStraightLine.h"
-
-
-#include "InDetRIO_OnTrack/TRT_DriftCircleOnTrack.h"
-#include "InDetPrepRawData/TRT_DriftCircle.h"
-
-#include "InDetIdentifier/TRT_ID.h"
-
-// For the t0 and r(t) relations
-#include "TRT_ConditionsServices/ITRT_CalDbSvc.h"
-#include "TRT_ConditionsData/RtRelation.h"
-
-//To get the chip level info
-#include "TRT_ConditionsServices/ITRT_StrawNeighbourSvc.h"
-
- #include "EventPrimitives/EventPrimitivesHelpers.h"
-
-// constructor
-InDet::TRT_DriftTimeNtupleHelper::TRT_DriftTimeNtupleHelper(
-    const std::string& t,
-    const std::string& n,
-    const IInterface*  p )
-        :
-AthAlgTool(t,n,p),
-m_trtID(0),
-m_trtCondDbSvc("TRT_CalDbSvc",n),
-m_TRTStrawNeighbourSvc("TRT_StrawNeighbourSvc", n),
-m_Trt_R(0),
-m_Trt_R_Err(0),
-m_Trt_Rtrack(0),
-m_Trt_Rtrack_Err(0),
-m_Trt_DTtrack(0),
-m_Trt_t(0),
-m_Trt_tot(0),
-m_Trt_bitpattern(0),
-m_Trt_HL(0),
-m_Trt_strawlayer(0),
-m_Trt_layer(0),
-m_Trt_straw(0),
-m_Trt_phi(0),
-m_Trt_bec(0),
-m_Trt_chip(0),
-m_Trt_pad(0) {
-  declareInterface<IValidationNtupleHelperTool>(this);
-  // Declare the properties
-  // declareProperty("BookNewNtuple", m_bookNewNtuple = true);
-  declareProperty("CalDBSvc", m_trtCondDbSvc);  
-  declareProperty("TRT_StrawNeighbourSvc",m_TRTStrawNeighbourSvc);
-}
-
-// destructor
-InDet::TRT_DriftTimeNtupleHelper::~TRT_DriftTimeNtupleHelper() {}
-
-
-
-
-// initialize
-StatusCode InDet::TRT_DriftTimeNtupleHelper::initialize() {
-
-    if (detStore()->retrieve(m_trtID, "TRT_ID").isFailure()) {
-      ATH_MSG_FATAL("Could not get TRT ID helper");
-      return StatusCode::FAILURE;
-    }
-    
-    if(StatusCode::SUCCESS!=m_trtCondDbSvc.retrieve() ) {
-      ATH_MSG_FATAL("Could not get TRTCalDbSvc !");
-      return StatusCode::FAILURE;
-    } 
-
-    if(StatusCode::SUCCESS!=m_TRTStrawNeighbourSvc.retrieve()){
-      ATH_MSG_FATAL("Could not get StrawNeighbourSvc!");
-      return StatusCode::FAILURE;
-    } 
-
-    m_Trt_R         = new std::vector<float>();
-    m_Trt_R_Err         = new std::vector<float>();
-    m_Trt_Rtrack    = new std::vector<float>();
-    m_Trt_Rtrack_Err    = new std::vector<float>();
-    m_Trt_DTtrack    = new std::vector<float>();
-    m_Trt_t         = new std::vector<float>();
-    m_Trt_tot       = new std::vector<float>();
-    m_Trt_bitpattern= new std::vector<unsigned int>();
-    m_Trt_HL        = new std::vector<int>();
-    m_Trt_layer     = new std::vector<int>();
-    m_Trt_straw     = new std::vector<int>();
-    m_Trt_phi       = new std::vector<int>();
-    m_Trt_strawlayer= new std::vector<int>();
-    m_Trt_bec       = new std::vector<int>();
-    m_Trt_chip       = new std::vector<int>();
-    m_Trt_pad       = new std::vector<int>();
-
-    return StatusCode::SUCCESS;
-}
-
-///////////////////////////////////////
-/// addNtupleItems
-///////////////////////////////////////
-StatusCode InDet::TRT_DriftTimeNtupleHelper::addNtupleItems (TTree* tree,
-							     const int& detectorType ) const {
-  // -------------------------------------------
-  // add items to the ntuple
-  if (detectorType==Trk::TrackState::TRT) {
-    // add items
-    tree->Branch("TRT_R",           &m_Trt_R);
-    tree->Branch("TRT_R_Err",           &m_Trt_R_Err);
-    tree->Branch("TRT_R_track",     &m_Trt_Rtrack);
-    tree->Branch("TRT_R_track_Err",     &m_Trt_Rtrack_Err);
-    tree->Branch("TRT_DT_track",    &m_Trt_DTtrack);
-    tree->Branch("TRT_t",           &m_Trt_t);
-    tree->Branch("TRT_tot",         &m_Trt_tot);
-    tree->Branch("TRT_bitpattern",  &m_Trt_bitpattern);
-    tree->Branch("TRT_HL",          &m_Trt_HL);
-    tree->Branch("TRT_strawlayer",  &m_Trt_strawlayer);
-    tree->Branch("TRT_layer",       &m_Trt_layer);
-    tree->Branch("TRT_straw",       &m_Trt_straw);
-    tree->Branch("TRT_phi",         &m_Trt_phi);
-    tree->Branch("TRT_bec",         &m_Trt_bec);
-    tree->Branch("TRT_chip",        &m_Trt_chip);
-    tree->Branch("TRT_pad",         &m_Trt_pad);
-  }
-  ATH_MSG_VERBOSE( "added items to ntuple" );
-  return StatusCode::SUCCESS;
-}
-
-
-///////////////////////////////////////
-/// finalize
-///////////////////////////////////////
-StatusCode InDet::TRT_DriftTimeNtupleHelper::finalize() {
-    // delete all vectors
-    delete m_Trt_R;
-    m_Trt_R = 0;
-    delete m_Trt_R_Err;
-    m_Trt_R_Err = 0;
-    delete m_Trt_Rtrack;
-    m_Trt_Rtrack = 0;
-    delete m_Trt_Rtrack_Err;
-    m_Trt_Rtrack_Err = 0;
-    delete m_Trt_DTtrack;
-    m_Trt_DTtrack = 0;
-    delete m_Trt_t;
-    m_Trt_t = 0;
-    delete m_Trt_tot;
-    m_Trt_tot = 0;
-    delete m_Trt_bitpattern;
-    m_Trt_bitpattern = 0;
-    delete m_Trt_HL;
-    m_Trt_HL = 0;
-    delete m_Trt_layer;
-    m_Trt_layer = 0;
-    delete m_Trt_straw;
-    m_Trt_straw = 0;
-    delete m_Trt_phi;
-    m_Trt_phi = 0;
-    delete m_Trt_strawlayer;
-    m_Trt_strawlayer = 0;
-    delete m_Trt_bec;
-    m_Trt_bec = 0;
-    delete m_Trt_chip;
-    m_Trt_chip = 0;
-    delete m_Trt_pad;
-    m_Trt_pad = 0;
-
-    ATH_MSG_INFO( "finalize() successful in " << name() );
-    return StatusCode::SUCCESS;
-}
-
-/// fill residual data
-StatusCode InDet::TRT_DriftTimeNtupleHelper::fillMeasurementData (const Trk::MeasurementBase* measurement,
-								  const Trk::TrackParameters* trkParameters,
-								  const int&,
-								  const bool& ) const {
-
-    const InDet::TRT_DriftCircleOnTrack* trtcircle = dynamic_cast<const InDet::TRT_DriftCircleOnTrack*> (measurement);
-    
-    if (trtcircle) {
-
-        ATH_MSG_DEBUG("in fillMeasurementData, have drift radius = "<< trtcircle->localParameters()[Trk::driftRadius]);
-        
-	// Get driftradius and drift time
-        m_Trt_R->push_back( trtcircle->localParameters()[Trk::driftRadius] );
-	//m_Trt_R_Err->push_back( trtcircle->localErrorMatrix().error(Trk::driftRadius) );
-
-	m_Trt_R_Err->push_back( Amg::error(trtcircle->localCovariance(),Trk::driftRadius) );
-	//m_Trt_Status->push_back( trtcircle->status() );
-        m_Trt_HL->push_back( trtcircle->highLevel() );
-
-	float tot = trtcircle->timeOverThreshold();
-	m_Trt_tot->push_back( tot );
-	unsigned int bitpattern = trtcircle->prepRawData()->getWord();
-	m_Trt_bitpattern->push_back( bitpattern );
-
-        // Get prepRawData for drifttime
-        const InDet::TRT_DriftCircle *RawDriftCircle=dynamic_cast<const InDet::TRT_DriftCircle*>(trtcircle->prepRawData());
-        // Get Straw identifier
-	Identifier DCId = trtcircle->identify();
-		
-
-	if (RawDriftCircle) {
-            bool isvalid;
-            float dt = RawDriftCircle->driftTime(isvalid);
-	    float t0 =  m_trtCondDbSvc->getT0(DCId);
-	    if (!isvalid) {
-                ATH_MSG_DEBUG( "The retrieved driftTime is not valid" );
-		m_Trt_t->push_back( -999. );
-            } else {
-	      m_Trt_t->push_back( dt - t0 );
-            }
-            
-            
-        } else {
-	  ATH_MSG_WARNING( "prepRawData (TRT_DriftCircle) for TRT_DriftCircleOnTrack == Null" );
-	  m_Trt_t->push_back( -999. );
-	}
-        
-	// Get info in which straw the hit was
-	m_Trt_straw->push_back( m_trtID->straw(DCId) );
-        m_Trt_strawlayer->push_back( m_trtID->straw_layer(DCId) );
-        m_Trt_layer->push_back( m_trtID->layer_or_wheel(DCId) );
-        m_Trt_phi->push_back( m_trtID->phi_module(DCId) );
-        m_Trt_bec->push_back( m_trtID->barrel_ec(DCId) );
-
-	int m_chip;
-	m_TRTStrawNeighbourSvc->getChip(DCId, m_chip);
-	m_Trt_chip->push_back(m_chip);
-
-	int m_pad;
-	m_TRTStrawNeighbourSvc->getPad(DCId, m_pad);
-	m_Trt_pad->push_back(m_pad);
-
-        // Fill local R track prediction and DT drift time prediction
-        if (trkParameters) {
-	  m_Trt_Rtrack->push_back( trkParameters->parameters()[Trk::locR] );
-	  
-	  //Trk::MeasuredTrackParameters const* measParam = dynamic_cast<Trk::MeasuredTrackParameters const*>(trkParameters);
-	  //if(measParam){
-	  //m_Trt_Rtrack_Err->push_back( measParam->localErrorMatrix().error(Trk::locR) );
-	  const AmgSymMatrix(5) * merr = trkParameters->covariance();
-	  if(merr){
-	    m_Trt_Rtrack_Err->push_back( Amg::error(*merr,Trk::locR) );  
-	  }else{
-	    ATH_MSG_INFO( "No measured Parameters");
-	    m_Trt_Rtrack_Err->push_back( -999 );
-	  }
-	  
-	  const TRTCond::RtRelation *rtr = m_trtCondDbSvc->getRtRelation(DCId);
-	  if(rtr) 
-	    m_Trt_DTtrack->push_back( rtr->drifttime( fabs(trkParameters->parameters()[Trk::locR]) ) );
-	  else
-	    m_Trt_DTtrack->push_back( -999.0 );
-
-	} else {
-	  
-	  ATH_MSG_DEBUG("no trkParameters associated to hit ");
-	  m_Trt_Rtrack->push_back( -999.0 );
-	  m_Trt_Rtrack_Err->push_back( -999.0 );
-	  m_Trt_DTtrack->push_back( -999.0 );
-        }
-	
-	
-    } else {
-        return StatusCode::FAILURE;
-    }
-    return StatusCode::SUCCESS;
-}
-
-StatusCode InDet::TRT_DriftTimeNtupleHelper::resetVariables (
-        const int& detectorType ) const {
-    if (detectorType==Trk::TrackState::TRT) {
-        m_Trt_R->clear();
-        m_Trt_R_Err->clear();
-	//m_Trt_Status->clear();
-        m_Trt_Rtrack->clear();
-	m_Trt_Rtrack_Err->clear();
-	m_Trt_DTtrack->clear();
-        m_Trt_t->clear();
-        m_Trt_tot->clear();
-        m_Trt_bitpattern->clear();
-	m_Trt_HL->clear();
-        m_Trt_layer->clear();
-        m_Trt_straw->clear();
-        m_Trt_phi->clear();
-        m_Trt_bec->clear();
-	m_Trt_chip->clear();
-	m_Trt_pad->clear();
-        m_Trt_strawlayer->clear();
-    }
-    return StatusCode::SUCCESS;
-}
-
-StatusCode InDet::TRT_DriftTimeNtupleHelper::fillHoleData (
-        const Trk::TrackStateOnSurface&,
-        const int&) const {
-    // we do nothing with holes
-    return StatusCode::SUCCESS;
-}
diff --git a/InnerDetector/InDetValidation/InDetTrackValidation/src/components/InDetTrackValidation_entries.cxx b/InnerDetector/InDetValidation/InDetTrackValidation/src/components/InDetTrackValidation_entries.cxx
index 11ff2c5c8c5c221174a2f34c060774156f767394..bc84e751e9bae008d8bcbf1f07704b947e496502 100755
--- a/InnerDetector/InDetValidation/InDetTrackValidation/src/components/InDetTrackValidation_entries.cxx
+++ b/InnerDetector/InDetValidation/InDetTrackValidation/src/components/InDetTrackValidation_entries.cxx
@@ -1,30 +1,18 @@
 
-#include "InDetTrackValidation/TRT_DriftTimeNtupleHelper.h"
 #include "InDetTrackValidation/SCT_ClusterValidationNtupleWriter.h"
-#include "InDetTrackValidation/PixelClusterValidationNtupleWriter.h"
-#include "InDetTrackValidation/TRT_DriftCircleValidationNtupleWriter.h"
-#include "InDetTrackValidation/SiResidualValidationNtupleHelper.h"
 #include "InDetTrackValidation/InDetSplittedTracksCreator.h"
 #include "InDetTrackValidation/HoleSearchValidation.h"
 #include "GaudiKernel/DeclareFactoryEntries.h"
 
 //using namespace InDet;
 
-DECLARE_NAMESPACE_TOOL_FACTORY( InDet, TRT_DriftTimeNtupleHelper )
-DECLARE_NAMESPACE_TOOL_FACTORY( InDet, SiResidualValidationNtupleHelper )
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, SCT_ClusterValidationNtupleWriter )
-DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, PixelClusterValidationNtupleWriter )
-DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, TRT_DriftCircleValidationNtupleWriter )
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, InDetSplittedTracksCreator )
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( InDet, HoleSearchValidation )
 
 DECLARE_FACTORY_ENTRIES(InDetTrackValidation)
 { // in this package name these methods are registered 
-    DECLARE_NAMESPACE_TOOL(InDet, TRT_DriftTimeNtupleHelper)
-    DECLARE_NAMESPACE_TOOL(InDet, SiResidualValidationNtupleHelper)
     DECLARE_NAMESPACE_ALGORITHM( InDet, SCT_ClusterValidationNtupleWriter)
-    DECLARE_NAMESPACE_ALGORITHM( InDet, PixelClusterValidationNtupleWriter)    
-    DECLARE_NAMESPACE_ALGORITHM( InDet, TRT_DriftCircleValidationNtupleWriter)
     DECLARE_NAMESPACE_ALGORITHM( InDet, InDetSplittedTracksCreator )
     DECLARE_NAMESPACE_ALGORITHM( InDet, HoleSearchValidation )
 }
diff --git a/InnerDetector/InDetValidation/PixelRTT/doc/packagedoc.h b/InnerDetector/InDetValidation/PixelRTT/doc/packagedoc.h
index 70fa086758b73368585dcf27c660e84cd0883d3b..2642443874fa0eed203bc3de3c6d5b6a26c8852c 100644
--- a/InnerDetector/InDetValidation/PixelRTT/doc/packagedoc.h
+++ b/InnerDetector/InDetValidation/PixelRTT/doc/packagedoc.h
@@ -18,18 +18,6 @@ It also enables the creation of the histograms contained in the PixelMonitoring
 The root macros defined in the package are useful to easily create multiple histograms containing the same quantities for every layer, clustersize, eta and p_t bins of the Pixel detector.
 The macro included create a default set of this kind of histograms and are automatically executed by the RTT.
 
-@ref used_PixelRTT
 
-@ref requirements_PixelRTT
 
 */
-
-/**
-@page used_PixelRTT Used Packages
-*/
-
-/**
-@page requirements_PixelRTT Requirements
-*/
-
-
diff --git a/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_SimulationValidation.py b/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_SimulationValidation.py
index 1a1108d715e6c0e46b43869369a4673099432f1f..391db092dbe37e639c5bf2d03c753ea5345dc214 100644
--- a/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_SimulationValidation.py
+++ b/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_SimulationValidation.py
@@ -1,7 +1,6 @@
 #################################################
 # Script for the PixelSimulation RTT.
-# It runs digitization and builds a customized version of
-# TrackValidation ntuple with truth information for
+# It runs digitization 
 # pixel clusters.
 #################################################
 #
@@ -177,22 +176,6 @@ job += InDet__SiTrackerSpacePointFinder("PixelSpacePoints",
                                         ProcessSCTs = False)
 print job.PixelSpacePoints
 
-#
-# Include PixelValidationNtuple 
-# with some information about Geant4 hits
-#
-from InDetTrackValidation.InDetTrackValidationConf import InDet__PixelClusterValidationNtupleWriter
-job += InDet__PixelClusterValidationNtupleWriter("PixelNtupleWriter",
-                                                 NtupleFileName 	  = 'TRKVAL',
-                                                 NtupleDirectoryName	  = 'Validation',
-                                                 NtupleTreeName 	  = 'PixelRIOs',
-                                                 PixelClusterContainer    = 'PixelClusters',
-                                                 WriteDetailedPixelInformation = True,
-						 DoHits 		  = True,
-						 DoMC			  = True,
-						 FindNotAssociatedParticle= True
-						 )
-print job.PixelNtupleWriter
 
 theApp.HistogramPersistency = 'ROOT'
 if not 'OutputNTpl' in dir():
diff --git a/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_TrackingValidation.py b/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_TrackingValidation.py
index b9bf163cd76cf2be5aa258d29bad4c22d30e2b3d..1e4d53f150282cccceea6b21ae45caee03506bcf 100755
--- a/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_TrackingValidation.py
+++ b/InnerDetector/InDetValidation/PixelRTT/share/PixelRTT_TrackingValidation.py
@@ -66,7 +66,6 @@ InDetFlags.doTruth       = (globalflags.InputFormat() == 'pool')
 # --- activate non default algorithms
 InDetFlags.doTrkNtuple = True
 InDetFlags.doPixelTrkNtuple = True
-InDetFlags.doPixelClusterNtuple = True
 InDetFlags.doMonitoringPixel = True
 InDetFlags.doPrintConfigurables = True
 
diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannel2Ascii.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannel2Ascii.h
index 55e5dc66d70f4e9657c5932b11e8e252bad50051..adb3df7254dcf2c8e95c2fa8696644ce7913cf2d 100644
--- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannel2Ascii.h
+++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannel2Ascii.h
@@ -8,11 +8,12 @@
 #define LArBadChannel2Ascii_H
 
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/ToolHandle.h"
-
+#include "StoreGate/ReadCondHandleKey.h"
+#include "LArRecConditions/LArBadChannelCont.h"
+#include "LArRecConditions/LArOnOffIdMapping.h"
 #include <string>
 
-class LArBadChanTool;
+//class LArBadChanTool;
 class StoreGateSvc;
 class LArCablingService;
 
@@ -29,9 +30,13 @@ public:
 
 private:
 
-  ToolHandle< LArBadChanTool > m_BadChanTool;
-  ToolHandle<LArCablingService> m_larCablingSvc;
-
+  //ToolHandle< LArBadChanTool > m_BadChanTool;
+  //ReadCondHandleKey<LArBadChannelCont> m_BCKey;
+  SG::ReadCondHandleKey<LArBadChannelCont> m_BCKey;
+  SG::ReadCondHandleKey<LArBadFebCont> m_BFKey;
+  //ToolHandle<LArCablingService> m_larCablingSvc;
+  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey;
+  
   std::string                  m_dbFolder;
   std::string                  m_fileName;
   std::string                  m_executiveSummaryFile;
diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..71759d7a9e81d4324f63335554683690fa95d9e3
--- /dev/null
+++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelCondAlg.h
@@ -0,0 +1,39 @@
+//Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARBADCHANNELCONDALG_H
+#define LARBADCHANNELCONDALG_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/WriteCondHandleKey.h"
+#include "GaudiKernel/ICondSvc.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
+#include "LArRecConditions/LArBadChannelCont.h"
+
+//class LArOnlineID;
+//class LArOnline_SuperCellID;
+
+class LArBadChannelCondAlg: public AthAlgorithm {
+ public:
+
+  LArBadChannelCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
+  ~LArBadChannelCondAlg();
+
+  StatusCode initialize();
+  StatusCode execute();
+  StatusCode finalize() {return StatusCode::SUCCESS;}
+
+ private:
+  SG::ReadCondHandleKey<CondAttrListCollection>   m_BCInputKey; 
+  SG::WriteCondHandleKey<LArBadChannelCont>      m_BCOutputKey;
+  ServiceHandle<ICondSvc> m_condSvc;
+  std::string m_inputFileName;
+};
+
+
+
+#endif
diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelState.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelState.h
index 6b4e9d215ef9d7b53bef6dd3a1388011dcaa50f8..0f27fefbd9b7cb7159c84be5fdbd29a3feb65667 100644
--- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelState.h
+++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelState.h
@@ -20,7 +20,7 @@ class LArBadChannelState {
   enum {NCoolChannels=8};
   enum CaloPartEnum {EMB, EMEC, HEC, FCAL};
   enum PosNegEnum { NEG, POS};
-  enum CoolChannelEnum { EMBA, EMBC, EMECA, EMECC, HECA, HECC, FCALA, FCALC};
+  enum CoolChannelEnum { EMBA, EMBC, EMECA, EMECC, HECA, HECC, FCALA, FCALC, MAXCOOLCHAN};
 
   class CoolChannelData {
   public:
diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFeb2Ascii.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFeb2Ascii.h
index f733dbf32f8d146a89181ccf5ae2102ca4f0532a..d4b4588f29bd2cc1f10804b4015b91ae9a7295a4 100644
--- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFeb2Ascii.h
+++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFeb2Ascii.h
@@ -6,11 +6,11 @@
 #define LArBadFeb2Ascii_H
 
 #include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "LArRecConditions/LArBadChannelCont.h"
 
 #include <string>
 
-class LArBadChanTool;
 
 class LArBadFeb2Ascii : public AthAlgorithm 
 {
@@ -23,10 +23,9 @@ public:
   StatusCode finalize();
 
 private:
+  SG::ReadCondHandleKey<LArBadFebCont> m_BFKey;
+  std::string m_fileName;
 
-  ToolHandle< LArBadChanTool > m_BadChanTool;
-  std::string                  m_dbFolder;
-  std::string                  m_fileName;
 };
 
 #endif
diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..5b312f1d460e6950920d2bac1b7349c194f70245
--- /dev/null
+++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadFebCondAlg.h
@@ -0,0 +1,39 @@
+//Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARBADFEBCONDALG_H
+#define LARBADFEBCONDALG_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "StoreGate/WriteCondHandleKey.h"
+#include "GaudiKernel/ICondSvc.h"
+#include "AthenaPoolUtilities/AthenaAttributeList.h"
+#include "LArRecConditions/LArBadChannelCont.h"
+
+//class LArOnlineID;
+//class LArOnline_SuperCellID;
+
+class LArBadFebCondAlg: public AthAlgorithm {
+ public:
+
+  LArBadFebCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
+  ~LArBadFebCondAlg();
+
+  StatusCode initialize();
+  StatusCode execute();
+  StatusCode finalize() {return StatusCode::SUCCESS;}
+
+ private:
+  SG::ReadCondHandleKey<AthenaAttributeList>   m_BCInputKey; 
+  SG::WriteCondHandleKey<LArBadFebCont>      m_BCOutputKey;
+  ServiceHandle<ICondSvc> m_condSvc;
+  std::string m_inputFileName;
+};
+
+
+
+#endif
diff --git a/LArCalorimeter/LArBadChannelTool/python/LArBadChannelAccess.py b/LArCalorimeter/LArBadChannelTool/python/LArBadChannelAccess.py
new file mode 100644
index 0000000000000000000000000000000000000000..e9378bc39addcb2d736fc5ca69a5262131a705ad
--- /dev/null
+++ b/LArCalorimeter/LArBadChannelTool/python/LArBadChannelAccess.py
@@ -0,0 +1,39 @@
+
+
+def LArBadChannelAccess(algname="LArBadChannelCondAlg",dbString=None):
+    from AthenaCommon.AlgSequence import AthSequencer
+    condSeq = AthSequencer("AthCondSeq")
+
+    if hasattr(condSeq,algname):
+        print "Access to bad Feb info already set up"
+        return
+    
+    
+    from IOVDbSvc.CondDB import conddb
+
+    if dbString is not None:
+        foldername=conddb.extractFolder(dbString)
+        conddb.addFolder("",dbString,className="CondAttrListCollection")
+    else:
+        if conddb.isOnline:
+            foldername="/LAR/BadChannels/BadChannels"
+            conddb.addFolder("LAR",foldername,className="CondAttrListCollection")
+        else:
+            foldername="/LAR/BadChannelsOfl/BadChannels"
+            conddb.addFolder("LAR_OFL",foldername,className="CondAttrListCollection")
+            pass
+        pass
+    
+
+    from LArBadChannelTool.LArBadChannelToolConf import LArBadChannelCondAlg
+    theLArBadChannelCondAlg=LArBadChannelCondAlg(algname)
+    theLArBadChannelCondAlg.ReadKey=foldername
+    condSeq+=theLArBadChannelCondAlg
+    return
+
+
+
+    
+
+
+
diff --git a/LArCalorimeter/LArBadChannelTool/python/LArBadFebAccess.py b/LArCalorimeter/LArBadChannelTool/python/LArBadFebAccess.py
new file mode 100644
index 0000000000000000000000000000000000000000..14d4e600a7029702da16999425d001fa0d3a8954
--- /dev/null
+++ b/LArCalorimeter/LArBadChannelTool/python/LArBadFebAccess.py
@@ -0,0 +1,32 @@
+
+
+def LArBadFebAccess(algname="LArBadFebCondAlg", dbString=None):
+    from AthenaCommon.AlgSequence import AthSequencer
+    condSeq = AthSequencer("AthCondSeq")
+
+    if hasattr(condSeq,algname):
+        print "Access to bad Feb info already set up"
+        return
+
+    from IOVDbSvc.CondDB import conddb
+
+    if dbString is not None:
+        foldername=conddb.extractFolder(dbString)
+        conddb.addFolder("",dbString,className='AthenaAttributeList')
+    else:
+        if conddb.isOnline:
+            foldername="/LAR/BadChannels/MissingFEBs"
+            conddb.addFolder("LAR",foldername,className='AthenaAttributeList')
+        else:
+            foldername="/LAR/BadChannelsOfl/MissingFEBs"
+            conddb.addFolder("LAR_OFL",foldername,className='AthenaAttributeList')
+            pass
+        pass
+    
+
+
+    from LArBadChannelTool.LArBadChannelToolConf import LArBadFebCondAlg
+    theLArBadFebCondAlg=LArBadFebCondAlg(algname)
+    theLArBadFebCondAlg.ReadKey=foldername
+    condSeq+=theLArBadFebCondAlg
+    return
diff --git a/LArCalorimeter/LArBadChannelTool/share/LArBadChannel2Ascii.py b/LArCalorimeter/LArBadChannelTool/share/LArBadChannel2Ascii.py
index f3331b1ab41155ad84edfe36cb8a508c4e521843..218ef91814cdd1c28acc92116e07b2ef0d49457c 100644
--- a/LArCalorimeter/LArBadChannelTool/share/LArBadChannel2Ascii.py
+++ b/LArCalorimeter/LArBadChannelTool/share/LArBadChannel2Ascii.py
@@ -23,6 +23,10 @@ if not 'IOVEndLB' in dir():
    IOVEndLB = -1
 
 
+if not 'ExecutiveSummaryFile' in dir():
+    ExecutiveSummaryFile=""
+
+
 import AthenaCommon.AtlasUnixGeneratorJob
 
 from AthenaCommon.GlobalFlags import  globalflags
@@ -31,7 +35,7 @@ globalflags.InputFormat="bytestream"
 globalflags.DatabaseInstance=DBInstance
 	
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-20-00-01"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-03-01-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
@@ -45,10 +49,6 @@ DetFlags.digitize.all_setOff()
 from AtlasGeoModel import SetGeometryVersion
 from AtlasGeoModel import GeoModelInit
 
-#Get identifier mapping
-include( "LArConditionsCommon/LArIdMap_comm_jobOptions.py" )
-include( "LArIdCnv/LArIdCnv_joboptions.py" )
-
 include( "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py" )
 include( "CaloDetMgrDetDescrCnv/CaloDetMgrDetDescrCnv_joboptions.py" )
 
@@ -73,20 +73,33 @@ topSequence = AlgSequence()
 from AthenaCommon.AppMgr import (theApp, ServiceMgr as svcMgr,ToolSvc)
 
 
-conddb.addFolder("","/LAR/BadChannelsOfl/BadChannels"+tagStr+dbStr)
-#conddb.addFolder("LAR_OFL","/LAR/BadChannelsOfl/MissingFEBs")
+from AthenaCommon.AlgSequence import AthSequencer
+condSeq = AthSequencer("AthCondSeq")
 
-svcMgr.IOVDbSvc.GlobalTag="CONDBR2-ES1PA-2014-01" 
+from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
+condSeq+=xAODMaker__EventInfoCnvAlg()
+
+from IOVSvc.IOVSvcConf import CondInputLoader
+theCLI=CondInputLoader( "CondInputLoader")
+condSeq += theCLI 
 
-from LArBadChannelTool.LArBadChannelToolConf import LArBadChanTool
-theLArBadChannelTool=LArBadChanTool()
-theLArBadChannelTool.CoolFolder="/LAR/BadChannelsOfl/BadChannels"
-theLArBadChannelTool.CoolMissingFEBsFolder=""
-ToolSvc+=theLArBadChannelTool
+import StoreGate.StoreGateConf as StoreGateConf
+svcMgr += StoreGateConf.StoreGateSvc("ConditionStore")
+
+include("LArRecUtils/LArOnOffMappingAlg.py")
+
+from LArBadChannelTool.LArBadChannelAccess import LArBadChannelAccess
+LArBadChannelAccess(dbString="/LAR/BadChannelsOfl/BadChannels"+dbStr+tagStr)
+
+if len(ExecutiveSummaryFile):
+    from LArBadChannelTool.LArBadFebAccess import LArBadFebAccess
+    LArBadFebAccess()
 
 from LArBadChannelTool.LArBadChannelToolConf import LArBadChannel2Ascii
-theLArBadChannels2Ascii=LArBadChannel2Ascii()
+theLArBadChannels2Ascii=LArBadChannel2Ascii(SkipDisconnected=True)
 theLArBadChannels2Ascii.FileName=OutputFile
 theLArBadChannels2Ascii.WithMissing=False
-theLArBadChannels2Ascii.ExecutiveSummaryFile=""
+theLArBadChannels2Ascii.ExecutiveSummaryFile=ExecutiveSummaryFile
 topSequence+=theLArBadChannels2Ascii
+
+svcMgr.IOVDbSvc.GlobalTag="CONDBR2-ES1PA-2014-01" 
diff --git a/LArCalorimeter/LArBadChannelTool/share/LArMissingFebs2Ascii.py b/LArCalorimeter/LArBadChannelTool/share/LArMissingFebs2Ascii.py
index 4643018b5c5cd0355f87e9dfce4708b614eab796..3bb5952a731a16701158b2c384aca10dd3b28538 100644
--- a/LArCalorimeter/LArBadChannelTool/share/LArMissingFebs2Ascii.py
+++ b/LArCalorimeter/LArBadChannelTool/share/LArMissingFebs2Ascii.py
@@ -1,6 +1,18 @@
 if 'DBInstance' not in dir():
    DBInstance="CONDBR2"
 
+if 'sqlite' in dir():
+    dbStr="<db>sqlite://;schema="+sqlite+";dbname="+DBInstance+"</db>"
+    if not 'tag' in dir():
+        tag="LARBadChannelsOflMissingFEBs-UPD4-00"
+else:
+    dbStr="<db>COOLOFL_LAR/"+DBInstance+"</db>"
+
+if 'tag' in dir():
+    tagStr="<tag>"+tag+"</tag>"
+else:
+    tagStr=""
+
 if 'OutputFile' not in dir():
     OutputFile="mf_output.txt"
     
@@ -18,7 +30,7 @@ globalflags.DataSource="data"
 globalflags.InputFormat="bytestream"
 	
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-08-00-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-03-01-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
@@ -51,21 +63,23 @@ topSequence = AlgSequence()
 ## get a handle to the ApplicationManager, to the ServiceManager and to the ToolSvc
 from AthenaCommon.AppMgr import (theApp, ServiceMgr as svcMgr,ToolSvc)
 
+from AthenaCommon.AlgSequence import AthSequencer
+condSeq = AthSequencer("AthCondSeq")
 
-if "sqlite" in dir():
-    conddb.addFolder("","/LAR/BadChannelsOfl/MissingFEBs<db>sqlite://;schema="+sqlite+";dbname="+DBInstance+"</db><tag>LARBadChannelsOflMissingFEBs-RUN2-UPD3-01</tag>")
-else:
-    conddb.addFolder("LAR_OFL","/LAR/BadChannelsOfl/MissingFEBs")#<tag>LARBadChannelsMissingFEBs-empty</tag>")
-                 
-svcMgr.IOVDbSvc.GlobalTag="CONDBR2-ES1PA-2014-01" 
+from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
+condSeq+=xAODMaker__EventInfoCnvAlg()
+
+from IOVSvc.IOVSvcConf import CondInputLoader
+theCLI=CondInputLoader( "CondInputLoader")
+condSeq += theCLI 
 
+import StoreGate.StoreGateConf as StoreGateConf
+svcMgr += StoreGateConf.StoreGateSvc("ConditionStore")
 
-from LArBadChannelTool.LArBadChannelToolConf import LArBadChanTool
-theLArBadChannelTool=LArBadChanTool()
-theLArBadChannelTool.CoolFolder=""
-theLArBadChannelTool.CoolMissingFEBsFolder="/LAR/BadChannelsOfl/MissingFEBs"
-ToolSvc+=theLArBadChannelTool
+svcMgr.IOVDbSvc.GlobalTag="CONDBR2-ES1PA-2014-01"
 
+from LArBadChannelTool.LArBadFebAccess import LArBadFebAccess
+LArBadFebAccess(dbString="/LAR/BadChannelsOfl/MissingFEBs"+dbStr+tagStr)
 
 
 from LArBadChannelTool.LArBadChannelToolConf import LArBadFeb2Ascii
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChannel2Ascii.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChannel2Ascii.cxx
index 16bb3d795b2e9b7abfcd2a54efa6f245dc85c5f8..23a6d757c50084f981030a9048581b9644bc534c 100644
--- a/LArCalorimeter/LArBadChannelTool/src/LArBadChannel2Ascii.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadChannel2Ascii.cxx
@@ -3,22 +3,22 @@
 */
 
 #include "LArBadChannelTool/LArBadChannel2Ascii.h"
+#include "LArRecConditions/LArBadFeb.h"
 
-#include "StoreGate/StoreGate.h"
-
-//#include "LArRecConditions/ILArBadChanTool.h"
-#include "LArBadChannelTool/LArBadChanTool.h"
-#include "LArBadChannelTool/LArBadChannelDBTools.h"
 #include "LArIdentifier/LArOnlineID.h"
 #include "LArCabling/LArCablingService.h"
 #include <fstream>
 
 LArBadChannel2Ascii::LArBadChannel2Ascii(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm( name, pSvcLocator),
-  m_BadChanTool("LArBadChanTool"),
-  m_larCablingSvc("LArCablingService")
+  m_BCKey("LArBadChannel"),
+  m_BFKey("LArBadFeb"),
+  m_cablingKey("LArOnOffIdMap")
 {
-  declareProperty("BadChannelTool", m_BadChanTool, "public, shared BadChannelTool");
+  //declareProperty("BadChannelTool", m_BadChanTool, "public, shared BadChannelTool");
+  declareProperty("BCKey",m_BCKey);
+  declareProperty("BFKey",m_BFKey);
+  declareProperty("LArOnOffIdMapKey",m_cablingKey);
   declareProperty("FileName",m_fileName="");
   declareProperty("WithMissing",m_wMissing=false);
   declareProperty("SkipDisconnected",m_skipDisconnected=false);
@@ -31,25 +31,41 @@ LArBadChannel2Ascii::~LArBadChannel2Ascii() {}
 StatusCode LArBadChannel2Ascii::initialize() {
 
   ATH_MSG_INFO ( "initialize()" );
-  ATH_CHECK( m_BadChanTool.retrieve() );
 
-  if (m_skipDisconnected) {
-    if(m_larCablingSvc.retrieve().isFailure()) {
-      ATH_MSG_FATAL  ( "Could not retrieve LAr Cabling tool" );
-      return StatusCode::FAILURE;
-    }
-  }
+  ATH_CHECK(m_BCKey.initialize());
+
+  if (m_executiveSummaryFile.size()) ATH_CHECK(m_BFKey.initialize());
+
+  if (m_skipDisconnected) ATH_CHECK(m_cablingKey.initialize());
 
   return StatusCode::SUCCESS;
 }
 
-StatusCode LArBadChannel2Ascii::execute() 
+StatusCode LArBadChannel2Ascii::stop() 
 {return StatusCode::SUCCESS;}
 
 StatusCode LArBadChannel2Ascii::finalize() 
 {return StatusCode::SUCCESS;}
 
-StatusCode LArBadChannel2Ascii::stop() {
+StatusCode LArBadChannel2Ascii::execute() {
+
+  const bool doExecSummary=(m_executiveSummaryFile.size()!=0);
+
+  SG::ReadCondHandle<LArBadChannelCont> bch{m_BCKey};
+  const LArBadChannelCont* badChannelCont{*bch};
+
+  const LArOnOffIdMapping* cabling=nullptr;
+  if (m_skipDisconnected) {
+    SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
+    cabling=(*cablingHdl);
+  }
+
+  const LArBadFebCont* badFebCont=nullptr;
+  if (doExecSummary) {
+    SG::ReadCondHandle<LArBadFebCont> badFebHdl{m_BFKey};
+    badFebCont=(*badFebHdl);
+  }
+
   const LArOnlineID* larOnlineID;
   ATH_CHECK( detStore()->retrieve(larOnlineID,"LArOnlineID") );
   
@@ -65,8 +81,6 @@ StatusCode LArBadChannel2Ascii::stop() {
       ATH_MSG_ERROR ( "Failed to open file " << m_fileName );
   }
 
-  const bool doExecSummary=(m_executiveSummaryFile.size()!=0);
-
   const LArBadChanBitPacking packing;
 
   //std::vector<std::vector<unsigned> > problemMatrix(nParts,std::vector<unsigned>(nProblemTypes) );
@@ -82,10 +96,11 @@ StatusCode LArBadChannel2Ascii::stop() {
   unsigned count=0,nConnected=0;
   for(;it!=it_e;++it) {  
     const HWIdentifier chid=*it;
-    if (m_skipDisconnected && !m_larCablingSvc->isOnlineConnected(chid)) continue;
+    //if (m_skipDisconnected && !m_larCablingSvc->isOnlineConnected(chid)) continue;
+    if (cabling && !cabling->isOnlineConnected(chid)) continue;
     ++nConnected;
 
-    LArBadChannel bc1 = m_BadChanTool->status(chid);
+    LArBadChannel bc1 = badChannelCont->status(chid);
     LArBadChannelEnum::BitWord bcw=bc1.packedData();
     if (!m_wMissing) bcw&=missingFEBMask; //Supress missingFEB bit
     LArBadChannel bc(bcw);
@@ -100,12 +115,17 @@ StatusCode LArBadChannel2Ascii::stop() {
 	     << "0 "; //Dummy 0 for calib-line
       (*out) << packing.stringStatus(bc);
 
-      (*out) << "  # 0x" << std::hex << chid.get_identifier32().get_compact() << std::dec << std::endl;
-    } //End if channel is good (regular printout)
+      (*out) << "  # 0x" << std::hex << chid.get_identifier32().get_compact();
+      if (cabling) {
+	Identifier offid=cabling->cnvToIdentifier(chid);
+	(*out) << " -> 0x" << offid.get_identifier32().get_compact();
+      }
+      (*out) << std::dec << std::endl;
+    } //End if channel is not good (regular printout)
     
     if (doExecSummary) {
       HWIdentifier fid=larOnlineID->feb_Id(chid);
-      LArBadFeb bf= m_BadChanTool->febStatus(fid);
+      LArBadFeb bf=badFebCont->status(fid);
 
       DetPart dp=EMB;
       if (larOnlineID->isEMECchannel(chid)) 
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b49b7e22f2e99927410294d40b02d8dacdeb0b82
--- /dev/null
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelCondAlg.cxx
@@ -0,0 +1,120 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArBadChannelTool/LArBadChannelCondAlg.h"
+#include "LArBadChannelTool/LArBadChanBlobUtils.h"
+#include "LArIdentifier/LArOnlineID.h"
+#include "LArBadChannelTool/LArBadChannelDecoder.h"
+
+
+LArBadChannelCondAlg::LArBadChannelCondAlg(const std::string& name, ISvcLocator* pSvcLocator) :
+  AthAlgorithm(name, pSvcLocator),
+  m_BCInputKey("/LAR/BadChannelsOfl/BadChannels"),
+  m_BCOutputKey("LArBadChannel","LArBadChannel"),
+  m_condSvc("CondSvc",name)
+{
+  declareProperty("ReadKey",m_BCInputKey);
+  declareProperty("WriteKey",m_BCOutputKey);
+  declareProperty("InputFileName",m_inputFileName="");
+}
+
+LArBadChannelCondAlg::~LArBadChannelCondAlg() {}
+
+
+StatusCode LArBadChannelCondAlg::initialize() {
+
+  // CondSvc
+  ATH_CHECK( m_condSvc.retrieve() );
+  // Read Handles
+  ATH_CHECK( m_BCInputKey.initialize() );
+  ATH_CHECK( m_BCOutputKey.initialize() );
+
+  // Register write handle
+  if (m_condSvc->regHandle(this, m_BCOutputKey, m_BCOutputKey.dbKey()).isFailure()) {
+    ATH_MSG_ERROR("unable to register WriteCondHandle " << m_BCOutputKey.fullKey() << " with CondSvc");
+    return StatusCode::FAILURE;
+  }
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode LArBadChannelCondAlg::execute() {
+    
+  SG::WriteCondHandle<LArBadChannelCont> writeHandle{m_BCOutputKey};
+  
+   if (writeHandle.isValid()) {
+    writeHandle.updateStore();
+    msg(MSG::WARNING) << "Found valid write handle" << endmsg;
+    return StatusCode::SUCCESS;
+  }  
+
+  SG::ReadCondHandle<CondAttrListCollection> readHandle{m_BCInputKey};
+  const CondAttrListCollection* attrListColl{*readHandle};
+
+  if (attrListColl==nullptr) {
+    msg(MSG::ERROR) << "Failed to retrieve CondAttributeListCollection with key " << m_BCInputKey.key() << endmsg;
+    return StatusCode::FAILURE;
+  }
+
+  std::unique_ptr<LArBadChannelCont> badChannelCont(new LArBadChannelCont());
+  
+  //Loop over COOL channels:
+   CondAttrListCollection::const_iterator chanIt=attrListColl->begin();
+   CondAttrListCollection::const_iterator chanIt_e=attrListColl->end();
+   for (;chanIt!=chanIt_e;++chanIt) {
+     
+     const AthenaAttributeList& attrList( chanIt->second);
+     const coral::Blob& blob = attrList["Blob"].data<coral::Blob>();
+     unsigned int chanSize = attrList["ChannelSize"].data<unsigned int>();
+     unsigned int stateSize = attrList["StatusWordSize"].data<unsigned int>();
+     unsigned int endian = attrList["Endianness"].data<unsigned int>();
+     unsigned int version = attrList["Version"].data<unsigned int>();
+    
+     std::vector<std::pair<HWIdentifier,LArBadChannel> > bcVec = 
+       LArBadChanBlobUtils::decodeBlob<LArBadChannel>( &blob, chanSize, stateSize, endian,
+						       version, msg());
+   
+     for (auto& idBC : bcVec) {
+       badChannelCont->add(idBC.first,idBC.second);
+     }
+     
+   }// end loop over COOL channels
+   
+   if (m_inputFileName.size()) {//Read supplemental data from ASCII file (if required)
+     
+     const LArOnlineID* onlineID;
+     ATH_CHECK(detStore()->retrieve(onlineID,"LArOnlineID"));	       
+     LArBadChannelDecoder decoder(&(*onlineID), msg());
+     std::vector<std::pair<HWIdentifier,LArBadChannel> > bcVec = decoder.readASCII(m_inputFileName,LArBadChannelState::MAXCOOLCHAN);
+     for (auto& idBC : bcVec) {
+       badChannelCont->add(idBC.first,idBC.second);
+     }
+   } //end if have ASCII filename
+
+
+
+   size_t nChanBeforeMege=badChannelCont->size();
+   badChannelCont->sort(); //Sorts vector of bad channels and merges duplicate entries
+   
+   ATH_MSG_INFO("Read a total of " << badChannelCont->size() << " problematic channels from database");
+   if (nChanBeforeMege!=badChannelCont->size()) {
+     ATH_MSG_INFO("Merged " << nChanBeforeMege-badChannelCont->size() << " duplicate entries");
+   }
+
+  // Define validity of the output cond object and record it
+  EventIDRange rangeW;
+  if(!readHandle.range(rangeW)) {
+    ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key());
+    return StatusCode::FAILURE;
+  }
+
+  if(writeHandle.record(rangeW,badChannelCont.release()).isFailure()) {
+    ATH_MSG_ERROR("Could not record LArBadChannelCont object with " 
+		  << writeHandle.key() 
+		  << " with EventRange " << rangeW
+		  << " into Conditions Store");
+    return StatusCode::FAILURE;
+  }
+  return StatusCode::SUCCESS;
+}
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx
index 6f8b75cba581e4d5b71d93529b6b1d26e0a7caa2..220fcde3cbca893407a68957c647acae7122cc7b 100644
--- a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx
@@ -95,7 +95,7 @@ HWIdentifier LArBadChannelDecoder::constructChannelId( const std::vector<int>& i
   try {
     HWIdentifier hwid( m_onlineID->channel_Id( intVec[barrel_ec], intVec[pos_neg], intVec[feedthrough],
 					       intVec[slot], intVec[channel]));
-    if (!checkId( hwid, intVec[barrel_ec], intVec[pos_neg], coolChan)) {
+    if (coolChan<LArBadChannelState::MAXCOOLCHAN && !checkId( hwid, intVec[barrel_ec], intVec[pos_neg], coolChan)) {
       log << MSG::WARNING << "Channel "; insertExpandedID( intVec, log);
       log << " does not belong to COOL channel " << State::coolChannelName( coolChan) 
 	  << ". Skipped" <<  endmsg;
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelState.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelState.cxx
index 7260748beb33c744613a11f4dc20a89b2ac233a9..3f6b4e3da29a9ba91248300e7a48a22fbda3e572 100644
--- a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelState.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelState.cxx
@@ -64,6 +64,8 @@ std::string LArBadChannelState::coolChannelName( CoolChannelEnum chan)
   case FCALC:
     return "FCALC";
     break;
+  case MAXCOOLCHAN:
+    break;
   }
   return "Unknown";
 }
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadFeb2Ascii.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadFeb2Ascii.cxx
index b851dc30ccb5757a1b5ebd55beb27989146f1e7a..842483d7179399ea29cd604b398236a9ebe438be 100644
--- a/LArCalorimeter/LArBadChannelTool/src/LArBadFeb2Ascii.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadFeb2Ascii.cxx
@@ -14,9 +14,9 @@
 
 LArBadFeb2Ascii::LArBadFeb2Ascii(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm( name, pSvcLocator),
-  m_BadChanTool("LArBadChanTool")
+  m_BFKey("LArBadFeb")
 {
-  declareProperty("BadChannelTool", m_BadChanTool, "public, shared BadChannelTool");
+  declareProperty("BFKey",m_BFKey);
   declareProperty("FileName",m_fileName="");
 }
 
@@ -26,7 +26,7 @@ LArBadFeb2Ascii::~LArBadFeb2Ascii() {}
 StatusCode LArBadFeb2Ascii::initialize() {
 
   ATH_MSG_INFO ( "initialize()" );
-  ATH_CHECK( m_BadChanTool.retrieve() );
+  ATH_CHECK(m_BFKey.initialize());
   return StatusCode::SUCCESS;
 }
 
@@ -49,6 +49,11 @@ StatusCode LArBadFeb2Ascii::finalize() {
       ATH_MSG_ERROR ( "Failed to open file " << m_fileName );
   }
 
+
+  SG::ReadCondHandle<LArBadFebCont> bfc{m_BFKey};
+  const LArBadFebCont* badfebCont{*bfc};
+
+
   const LArBadFebBitPacking packing;
 
 
@@ -57,7 +62,7 @@ StatusCode LArBadFeb2Ascii::finalize() {
   unsigned count=0;
   for(;it!=it_e;++it) {  
     const HWIdentifier fid=*it;
-    LArBadFeb bf = m_BadChanTool->febStatus(fid);
+    LArBadFeb bf = badfebCont->status(fid);
     if (bf.packedData()) {
       ++count;
       (*out) << larOnlineID->barrel_ec(fid) << " " 
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..fd062101d63caed849291cc90c40c74669102a12
--- /dev/null
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadFebCondAlg.cxx
@@ -0,0 +1,113 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArBadChannelTool/LArBadFebCondAlg.h"
+#include "LArBadChannelTool/LArBadChanBlobUtils.h"
+#include "LArIdentifier/LArOnlineID.h"
+#include "LArBadChannelTool/LArBadChannelDecoder.h"
+
+
+LArBadFebCondAlg::LArBadFebCondAlg(const std::string& name, ISvcLocator* pSvcLocator) :
+  AthAlgorithm(name, pSvcLocator),
+  m_BCInputKey("/LAR/BadFebsOfl/BadFebs"),
+  m_BCOutputKey("LArBadFeb","LArBadFeb"),
+  m_condSvc("CondSvc",name)
+{
+  declareProperty("ReadKey",m_BCInputKey);
+  declareProperty("WriteKey",m_BCOutputKey);
+  declareProperty("InputFileName",m_inputFileName="");
+}
+
+LArBadFebCondAlg::~LArBadFebCondAlg() {}
+
+
+StatusCode LArBadFebCondAlg::initialize() {
+
+  // CondSvc
+  ATH_CHECK( m_condSvc.retrieve() );
+  // Read Handles
+  ATH_CHECK( m_BCInputKey.initialize() );
+  ATH_CHECK( m_BCOutputKey.initialize() );
+
+  // Register write handle
+  if (m_condSvc->regHandle(this, m_BCOutputKey, m_BCOutputKey.dbKey()).isFailure()) {
+    ATH_MSG_ERROR("unable to register WriteCondHandle " << m_BCOutputKey.fullKey() << " with CondSvc");
+    return StatusCode::FAILURE;
+  }
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode LArBadFebCondAlg::execute() {
+    
+  SG::WriteCondHandle<LArBadFebCont> writeHandle{m_BCOutputKey};
+  
+   if (writeHandle.isValid()) {
+    writeHandle.updateStore(); //????
+    msg(MSG::WARNING) << "Found valid write handle" << endmsg;
+    return StatusCode::SUCCESS;
+  }  
+
+  SG::ReadCondHandle<AthenaAttributeList> readHandle{m_BCInputKey};
+  const AthenaAttributeList* attrList{*readHandle};
+
+  if (attrList==nullptr) {
+    msg(MSG::ERROR) << "Failed to retrieve CondAttributeListCollection with key " << m_BCInputKey.key() << endmsg;
+    return StatusCode::FAILURE;
+  }
+
+  std::unique_ptr<LArBadFebCont> badFebCont(new LArBadFebCont());
+  
+  const coral::Blob& blob = (*attrList)["Blob"].data<coral::Blob>();
+  unsigned int chanSize = (*attrList)["ChannelSize"].data<unsigned int>();
+  unsigned int stateSize = (*attrList)["StatusWordSize"].data<unsigned int>();
+  unsigned int endian = (*attrList)["Endianness"].data<unsigned int>();
+  unsigned int version = (*attrList)["Version"].data<unsigned int>();
+    
+  std::vector<std::pair<HWIdentifier,LArBadFeb> > bcVec = 
+    LArBadChanBlobUtils::decodeBlob<LArBadFeb>( &blob, chanSize, stateSize, endian,
+						version, msg());
+   
+  for (auto& idBC : bcVec) {
+    badFebCont->add(idBC.first,idBC.second);
+  }
+     
+   
+  if (m_inputFileName.size()) {//Read supplemental data from ASCII file (if required)
+     
+     const LArOnlineID* onlineID;
+     ATH_CHECK(detStore()->retrieve(onlineID,"LArOnlineID"));	       
+     LArBadChannelDecoder decoder(&(*onlineID), msg());
+     std::vector<std::pair<HWIdentifier,LArBadFeb> > bcVec = decoder.readFebASCII(m_inputFileName);
+     for (auto& idBC : bcVec) {
+       badFebCont->add(idBC.first,idBC.second);
+     }
+   } //end if have ASCII filename
+
+
+
+   size_t nChanBeforeMege=badFebCont->size();
+   badFebCont->sort(); //Sorts vector of bad febs and merges duplicate entries
+   
+   ATH_MSG_INFO("Read a total of " << badFebCont->size() << " problematic febs from database");
+   if (nChanBeforeMege!=badFebCont->size()) {
+     ATH_MSG_INFO("Merged " << nChanBeforeMege-badFebCont->size() << " duplicate entries");
+   }
+
+  // Define validity of the output cond object and record it
+  EventIDRange rangeW;
+  if(!readHandle.range(rangeW)) {
+    ATH_MSG_ERROR("Failed to retrieve validity range for " << readHandle.key());
+    return StatusCode::FAILURE;
+  }
+
+  if(writeHandle.record(rangeW,badFebCont.release()).isFailure()) {
+    ATH_MSG_ERROR("Could not record LArBadFebCont object with " 
+		  << writeHandle.key() 
+		  << " with EventRange " << rangeW
+		  << " into Conditions Store");
+    return StatusCode::FAILURE;
+  }
+  return StatusCode::SUCCESS;
+}
diff --git a/LArCalorimeter/LArBadChannelTool/src/components/LArBadChannelTool_entries.cxx b/LArCalorimeter/LArBadChannelTool/src/components/LArBadChannelTool_entries.cxx
index 76accfdfe154a7298a4729738366ba361a937be6..082107be450dc0d998d374975a3d2a2f0e99da2b 100644
--- a/LArCalorimeter/LArBadChannelTool/src/components/LArBadChannelTool_entries.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/components/LArBadChannelTool_entries.cxx
@@ -8,6 +8,8 @@
 #include "LArBadChannelTool/LArBadChannelTimingAlg.h"
 #include "LArBadChannelTool/LArBadChannel2Ascii.h"
 #include "LArBadChannelTool/LArBadFeb2Ascii.h"
+#include "LArBadChannelTool/LArBadChannelCondAlg.h"
+#include "LArBadChannelTool/LArBadFebCondAlg.h"
 
 DECLARE_TOOL_FACTORY( LArBadChannelMasker )
 DECLARE_TOOL_FACTORY( LArBadChanTool )
@@ -16,14 +18,7 @@ DECLARE_ALGORITHM_FACTORY( LArBadChannelDBAlg )
 DECLARE_ALGORITHM_FACTORY( LArBadChannelTimingAlg )
 DECLARE_ALGORITHM_FACTORY( LArBadChannel2Ascii )
 DECLARE_ALGORITHM_FACTORY( LArBadFeb2Ascii )
+DECLARE_ALGORITHM_FACTORY( LArBadChannelCondAlg )
+DECLARE_ALGORITHM_FACTORY( LArBadFebCondAlg )
 
-DECLARE_FACTORY_ENTRIES(LArBadChannelTool) {
-   DECLARE_TOOL( LArBadChannelMasker )
-   DECLARE_TOOL( LArBadChanTool )
-   DECLARE_ALGORITHM( LArBadChannelToolTest )
-   DECLARE_ALGORITHM( LArBadChannelDBAlg )
-   DECLARE_ALGORITHM( LArBadChannelTimingAlg )
-   DECLARE_ALGORITHM( LArBadChannel2Ascii )
-   DECLARE_ALGORITHM( LArBadFeb2Ascii )
-}
  
diff --git a/LArCalorimeter/LArCafJobs/CMakeLists.txt b/LArCalorimeter/LArCafJobs/CMakeLists.txt
index 5c7530d0648feb6a3395f3dd5e281915aecd9ba4..8eda3109556d6fc6e83b67fc9c971c02d583288b 100644
--- a/LArCalorimeter/LArCafJobs/CMakeLists.txt
+++ b/LArCalorimeter/LArCafJobs/CMakeLists.txt
@@ -15,8 +15,6 @@ atlas_depends_on_subdirs( PUBLIC
                           Calorimeter/CaloDetDescr
                           Calorimeter/CaloInterface
                           DetectorDescription/Identifier
-                          External/AtlasCLHEP
-                          External/AtlasHepMC
                           GaudiKernel
                           LArCalorimeter/LArIdentifier
                           LArCalorimeter/LArRawConditions
diff --git a/LArCalorimeter/LArCalibTools/doc/packagedoc.h b/LArCalorimeter/LArCalibTools/doc/packagedoc.h
index 5801490bd0af4c6b49944bb7f5b4b1fa0ae95f77..c78dd980e8a41b01653a9f80be20e9538711030d 100644
--- a/LArCalorimeter/LArCalibTools/doc/packagedoc.h
+++ b/LArCalorimeter/LArCalibTools/doc/packagedoc.h
@@ -45,17 +45,6 @@ purposes.
    - LArWaves2Ntuple
    - LArWFParams2Ntuple
 
-@ref used_LArCalibTools
 
-@ref requirements_LArCalibTools
 
 */
-
-/**
-@page used_LArCalibTools Used Packages
-*/
-
-/**
-@page requirements_LArCalibTools Requirements
-*/
-
diff --git a/LArCalorimeter/LArCalibUtils/doc/packagedoc.h b/LArCalorimeter/LArCalibUtils/doc/packagedoc.h
index bb5eaf4b9feebfe8b6bbd6686fabd7eee8bb8d78..e3512d0b6bd99a07a8b81968f82a8c5fe7be6a07 100644
--- a/LArCalorimeter/LArCalibUtils/doc/packagedoc.h
+++ b/LArCalorimeter/LArCalibUtils/doc/packagedoc.h
@@ -70,16 +70,6 @@ constants (e.g. ionization pulse, optimal filtering coefficients).
   - LArWFParams2DB
   - LArWFParamTool
 
-@ref used_LArCalibUtils
 
-@ref requirements_LArCalibUtils
 
 */
-
-/**
-@page used_LArCalibUtils Used Packages
-*/
-
-/**
-@page requirements_LArCalibUtils Requirements
-*/
diff --git a/LArCalorimeter/LArCalibUtils/src/LArDigitOscillationCorrTool.cxx b/LArCalorimeter/LArCalibUtils/src/LArDigitOscillationCorrTool.cxx
index 08631c283c467c703e0a506cafd8d64ce53f991c..c2d1df6b80ea7fe279f7ab2b0b439da5d9090343 100755
--- a/LArCalorimeter/LArCalibUtils/src/LArDigitOscillationCorrTool.cxx
+++ b/LArCalorimeter/LArCalibUtils/src/LArDigitOscillationCorrTool.cxx
@@ -141,9 +141,9 @@ StatusCode LArDigitOscillationCorrTool::calculateEventPhase(const LArDigitContai
       for(unsigned int j=0;j<nSamples;j++) {
 	// exclude all samples (and the previous and next sample) which 
 	//have more than nSigma worth of absolute signal 
-	if ( j == 0 || !(fabs(theSamples[i][j] - theSamples[i][0]) > m_nSigma*theRMSValues[i] 
-			 || ( j > 0 && fabs(theSamples[i][j-1] - theSamples[i][0]) > m_nSigma*theRMSValues[i])
-			 || ( j < nSamples-1 && fabs(theSamples[i][j+1] - theSamples[i][0]) > m_nSigma*theRMSValues[i])) ) {
+	if ( j == 0 || !(std::abs(theSamples[i][j] - theSamples[i][0]) > m_nSigma*theRMSValues[i] 
+			 || ( j > 0 && std::abs(theSamples[i][j-1] - theSamples[i][0]) > m_nSigma*theRMSValues[i])
+			 || ( j < nSamples-1 && std::abs(theSamples[i][j+1] - theSamples[i][0]) > m_nSigma*theRMSValues[i])) ) {
 	  
 	  if ( lchimin < 0 )
 	    nTotSamples ++;
diff --git a/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx b/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx
index 39e22400335e4a78d2bc4a5dfce849bef64b9a9f..7b7355531ca169395b2cde9f36c4afb18b5b6234 100755
--- a/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx
+++ b/LArCalorimeter/LArCalibUtils/src/LArRampBuilder.cxx
@@ -583,7 +583,7 @@ StatusCode LArRampBuilder::stop()
            //nIter = 10;
           }
 	  //const LArOFPeakRecoTool::Result &results=m_peakOFTool->peak(ramppoint.Samples,chid,gain,delay,0,kMax,kMax,kMax);
-	  const LArOFPeakRecoTool::Result &results=m_peakOFTool->peak(ramppoint.Samples,chid,gain,delay,0,kMax,kLow,kUp);
+	  const LArOFPeakRecoTool::Result results=m_peakOFTool->peak(ramppoint.Samples,chid,gain,delay,0,kMax,kLow,kUp);
 	  if (results.getValid()) {
 	    adcpeak  = results.getAmplitude();
 	    timepeak = results.getTau();
diff --git a/LArCalorimeter/LArCondUtils/src/LArHVToolMC.cxx b/LArCalorimeter/LArCondUtils/src/LArHVToolMC.cxx
index c994ec35c470541fb3160001bbac0b904c2c3350..10c7697ce8cad6466c71eb7617d114fcfb1de125 100755
--- a/LArCalorimeter/LArCondUtils/src/LArHVToolMC.cxx
+++ b/LArCalorimeter/LArCondUtils/src/LArHVToolMC.cxx
@@ -188,7 +188,6 @@ void LArHVToolMC::InitHV()
     if(!setHandcoded)
     {
      // retrieve the payload data
-     pAccessSvc->connect("LARHV");
      IRDBRecordset_ptr hvGlob = pAccessSvc->getRecordsetPtr("HVBarrelGlob",tagName,nodeName,"LARHV");
 
      if(hvGlob->size()>0)
@@ -236,7 +235,6 @@ void LArHVToolMC::InitHV()
                     << "Eta Reg  = " << nEtaReg << "\n"
                     << "Gap Side = " << nGapSide << "\n";
       }
-      pAccessSvc->disconnect("LARHV");
     }
 
   }
diff --git a/LArCalorimeter/LArDetDescr/cmt/requirements b/LArCalorimeter/LArDetDescr/cmt/requirements
deleted file mode 100755
index 26a18a75f86cb62d0cece556b79d0147b5c791da..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArDetDescr/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-package LArDetDescr
-
-author	  Claire Bourdarios <claire.bourdarios@cern.ch>
-
-use AtlasPolicy	        AtlasPolicy-*
-use Identifier          Identifier-*            DetectorDescription 
-
-use CaloDetDescr        CaloDetDescr-*          Calorimeter       
-use CaloGeoHelpers      CaloGeoHelpers-*        Calorimeter
-use GaudiInterface      GaudiInterface-*        External
-
-use CLIDSvc             CLIDSvc-*               Control
-use AthenaBaseComps     AthenaBaseComps-*       Control
-
-use LArReadoutGeometry  LArReadoutGeometry-*    LArCalorimeter/LArGeoModel
-use GeoModelKernel      GeoModelKernel-*        DetectorDescription/GeoModel
-
-public
-
-branches LArDetDescr src
-
-apply_pattern declare_joboptions files=" *.py"
-
-library LArDetDescr *.cxx -s=components *.cxx
-apply_pattern component_library
-
-private
-use StoreGate           StoreGate-*             Control
-use AtlasCLHEP          AtlasCLHEP-*            External
-
-use CaloIdentifier      CaloIdentifier-*        Calorimeter       
-use GeoModelInterfaces  GeoModelInterfaces-*    DetectorDescription/GeoModel
-use GeoModelUtilities   GeoModelUtilities-*     DetectorDescription/GeoModel
-use RDBAccessSvc        RDBAccessSvc-*          Database/AthenaPOOL
-use GeoPrimitives       GeoPrimitives-* 	DetectorDescription
diff --git a/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx b/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx
index 7985b37f321ca95833730747208e0520dc6b3d7d..62aea79b58c851c2eb1aa60d87f453368a35ef7e 100755
--- a/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx
+++ b/LArCalorimeter/LArDetDescr/src/LArNumberHelper.cxx
@@ -107,8 +107,6 @@ LArNumberHelper::LArNumberHelper(const std::string geometry) :
       {
 	log <<MSG::INFO <<" did access RDBAccessSvc " <<endmsg;
 
-	m_iAccessSvc->connect();
-
 	prepare_arrays();
 	
 	db_nb_em();
@@ -131,8 +129,6 @@ LArNumberHelper::LArNumberHelper(const std::string geometry) :
 	else 
 	  log << MSG::ERROR << "Unable to get LArCellVolumes" << endmsg;
 
-	m_iAccessSvc->disconnect();
-	
       }
 
     // now use all the info to finish up :
@@ -1124,8 +1120,6 @@ LArNumberHelper::sagging_param( std::vector<double>& Rhocen, std::vector<double>
   Rhocen.clear();
   Sag.clear();
 
-  m_iAccessSvc->connect();
-
   m_lar = m_iAccessSvc->getRecordsetPtr("BarrelGeometry",m_tag,m_node);
   
   if (m_lar->size()) {
@@ -1171,8 +1165,6 @@ LArNumberHelper::sagging_param( std::vector<double>& Rhocen, std::vector<double>
 
   }
 
-  m_iAccessSvc->disconnect();  
-
 }
 
 Identifier  
diff --git a/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx b/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx
index 9afa81be63b420563c2fa71053665082f75f35be..ce923217f655b86f7aff3a6086daabf3dcfdeba3 100755
--- a/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx
+++ b/LArCalorimeter/LArDetDescr/src/LArRecoSimpleGeomTool.cxx
@@ -90,8 +90,6 @@ LArRecoSimpleGeomTool::initialize()
   else
     ATH_MSG_INFO (" did access RDBAccessSvc ");
 
-  m_iAccessSvc->connect();
-
   m_recCryoCyl = m_iAccessSvc->getRecordsetPtr("CryoCylinders",m_tag,m_node);
   if (m_recCryoCyl->size()==0)
     m_recCryoCyl = m_iAccessSvc->getRecordsetPtr("CryoCylinders","CryoCylinders-00");
@@ -118,8 +116,6 @@ LArRecoSimpleGeomTool::initialize()
   if (m_HEC->size()==0)
     m_HEC = m_iAccessSvc->getRecordsetPtr("HadronicEndcap","HadronicEndcap-00");
 
-  m_iAccessSvc->disconnect();
-
   ATH_MSG_INFO (" LArRecoSimpleGeomTool successfully initialized ");
   return StatusCode::SUCCESS;
 }
diff --git a/LArCalorimeter/LArDigitization/LArDigitization/LArHitEMap.h b/LArCalorimeter/LArDigitization/LArDigitization/LArHitEMap.h
index 58936aa27f1394b8d22d4ad3ddaa4de8d4449bf0..9df49fb14ba7066c208c62f4df972f3238dc49ad 100755
--- a/LArCalorimeter/LArDigitization/LArDigitization/LArHitEMap.h
+++ b/LArCalorimeter/LArDigitization/LArDigitization/LArHitEMap.h
@@ -27,7 +27,7 @@ class LArHitEMap
 
 public: 
  typedef std::vector<LArHitList*>  EMAP;
- typedef std::vector<LArDigit*> DIGMAP;
+ typedef std::vector<const LArDigit*> DIGMAP;
 
  enum { EMBARREL_INDEX  = 0
        ,EMENDCAP_INDEX  = 1
@@ -67,8 +67,8 @@ public:
   int find(Identifier cellid);
   bool  initialized(); 
   void DigitReset();
-  bool AddDigit(LArDigit* digit);
-  inline LArDigit* GetDigit(unsigned int index) {
+  bool AddDigit(const LArDigit* digit);
+  inline const LArDigit* GetDigit(unsigned int index) {
     if (index<m_digmap.size()) return m_digmap[index];
     else return 0; 
   }
diff --git a/LArCalorimeter/LArDigitization/share/filterLArHit_jobOptions.py b/LArCalorimeter/LArDigitization/share/filterLArHit_jobOptions.py
deleted file mode 100644
index d5afa12d92904515130f857f6132c17c1a2dc013..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArDigitization/share/filterLArHit_jobOptions.py
+++ /dev/null
@@ -1,93 +0,0 @@
-###############################################################
-#
-# Job options file to read hit file and produce output hit file
-#  with filtered LArHits (only hits above some energy are kept)
-#
-#==============================================================
-
-PoolOutputFileName = "filteredMB.pool.root"
-PoolInputCollection = [
-"mc08.105001.pythia_minbias.simul.HITS.e349_s462_tid024528/HITS.024528._00111.pool.root",
-"mc08.105001.pythia_minbias.simul.HITS.e349_s462_tid024528/HITS.024528._00135.pool.root",
-"mc08.105001.pythia_minbias.simul.HITS.e349_s462_tid024528/HITS.024528._00153.pool.root",
-"mc08.105001.pythia_minbias.simul.HITS.e349_s462_tid024528/HITS.024528._00240.pool.root",
-"mc08.105001.pythia_minbias.simul.HITS.e349_s462_tid024528/HITS.024528._00267.pool.root",
-"mc08.105001.pythia_minbias.simul.HITS.e349_s462_tid024528/HITS.024528._00322.pool.root",
-"mc08.105001.pythia_minbias.simul.HITS.e349_s462_tid024528/HITS.024528._00357.pool.root",
-]
-Geometry = "ATLAS-GEO-02-01-00"
-
-from AthenaCommon.DetFlags import DetFlags
-from AthenaCommon.GlobalFlags import GlobalFlags
-GlobalFlags.DetGeo.set_atlas()
-GlobalFlags.Luminosity.set_zero()
-GlobalFlags.DataSource.set_geant4() 
-DetFlags.detdescr.all_setOn()
-
-include( "AthenaPoolCnvSvc/ReadAthenaPool_jobOptions.py" )
-include( "PartPropSvc/PartPropSvc.py" )
-#
-# Pool Converters
-#
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
-include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
-include( "LArAthenaPool/LArAthenaPool_joboptions.py" )
-include( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" )
-
-# Get a handle to the ServiceManager
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-# Get a handle to the ApplicationManager
-from AthenaCommon.AppMgr import theApp
-
-#
-# Pool output
-#
-from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
-Stream1 = AthenaPoolOutputStream( "Stream1" )
-Stream1.OutputFile = "PoolOutputFileName
-Stream1.ItemList=["EventInfo#*",      
-                  "McEventCollection#TruthEvent"] # mc truth (hepmc)
-Stream1.ItemList+=["LArHitContainer#*"]
-Stream1.ForceRead = True
-
-#
-# Pool input
-#
-svcMgr.EventSelector.InputCollections = PoolInputCollection
-
-#
-# the Tile, LAr and Calo detector description package
-#
-from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion=Geometry
-
-from AtlasGeoModel import SetGeometryVersion
-from AtlasGeoModel import GeoModelInit
-
-include( "CaloIdCnv/CaloIdCnv_joboptions.py" )
-include( "TileIdCnv/TileIdCnv_jobOptions.py" )
-include( "LArDetDescr/LArDetDescr_joboptions.py" )
-
-#
-# LarHit filter algorithm
-#
-from LArDigitization.LArDigitizationConf import LArHitFilter
-LArHitFilter = LArHitFilter("LArHitFilter")
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-topSequence += LArHitFilter
-
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-#-------------------------------------------------------------
-svcMgr.MessageSvc.OutputLevel      = INFO
-LArHitFilter.OutputLevel        =  INFO
-
-#--------------------------------------------------------------
-# Event related parameters
-#--------------------------------------------------------------
-# Number of events to be processed (default is 10)
-theApp.EvtMax = -1
-theApp.EvtSel = "EventSelector"
diff --git a/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx b/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx
index 3abceeef3fd8623ba7b36dbd8dc8cdb3f875d7b8..892bb273118126672dd3ca5d46983412a2b934f6 100755
--- a/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx
+++ b/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx
@@ -218,7 +218,7 @@ bool LArHitEMap::AddEnergy(const Identifier & cellid, float energy, float time)
   return true;
 }
 
-bool LArHitEMap::AddDigit(LArDigit* digit)
+bool LArHitEMap::AddDigit(const LArDigit* digit)
 {
  HWIdentifier ch_id = digit->channelID();
  if (m_cablingService->isOnlineConnected(ch_id)) {
diff --git a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
index f1a0c748e31f8c562b57f321fe2e71d62cb213a2..11ed58eb82bf5b68f943e2678541db2262f067af 100755
--- a/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
+++ b/LArCalorimeter/LArDigitization/src/LArPileUpTool.cxx
@@ -849,11 +849,9 @@ StatusCode LArPileUpTool::processAllSubEvents()
       SubEvtTimOffset = time_evt->time();
       ATH_MSG_DEBUG(" Subevt time : " << SubEvtTimOffset);
       const LArDigitContainer& rndm_digit_container =  *(iTzeroDigitCont->second);
-      rndm_digititer_begin=rndm_digit_container.begin() ;
-      rndm_digititer_end=rndm_digit_container.end() ;
       int ndigit=0;
-      for(rndm_digititer=rndm_digititer_begin;rndm_digititer!=rndm_digititer_end;rndm_digititer++) {
-       if (m_hitmap->AddDigit((*rndm_digititer))) ndigit++;
+      for (const LArDigit* digit : rndm_digit_container) {
+       if (m_hitmap->AddDigit(digit)) ndigit++;
       }
       ATH_MSG_INFO(" Number of digits stored for RndmEvt Overlay " << ndigit);
     }
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArAutoCorr.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArAutoCorr.h
index df91fcc9a1932a06fac6737e87cfa611ec23ea3f..a0ad714d951833a1f905f5854a1671343b399fbd 100755
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArAutoCorr.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArAutoCorr.h
@@ -45,4 +45,11 @@ class ILArAutoCorr {
 
 CLASS_DEF( ILArAutoCorr, 8124,1) 
 
+#include "AthenaKernel/CondCont.h"
+CLASS_DEF( CondCont<ILArAutoCorr>,253577051 , 1 )
+#include "SGTools/BaseInfo.h"
+SG_BASE( CondCont<ILArAutoCorr>, CondContBase );
+
+
+
 #endif 
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBias.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBias.h
index 8c71010514ac2b6860022d5851ffff2656df1eca..543e15975c307261d87c083c386af54c32a2e840 100755
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBias.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArMinBias.h
@@ -36,4 +36,11 @@ class ILArMinBias {
 
 CLASS_DEF( ILArMinBias, 197482938 ,1) 
 
+#include "AthenaKernel/CondCont.h"
+CLASS_DEF( CondCont<ILArMinBias>,88954252 , 1 )
+#include "SGTools/BaseInfo.h"
+SG_BASE( CondCont<ILArMinBias>, CondContBase );
+
+
+
 #endif 
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArPedestal.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArPedestal.h
index 0b35c6e345a34db6773923152902e6b50881bb03..be4109259d9b6131280769f9fda336f80df2c787 100755
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArPedestal.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArPedestal.h
@@ -58,5 +58,11 @@ public:
 
 CLASS_DEF( ILArPedestal, 8122,1) 
 
+#include "AthenaKernel/CondCont.h"
+CLASS_DEF( CondCont<ILArPedestal>,161156680 , 1 )
+#include "SGTools/BaseInfo.h"
+SG_BASE( CondCont<ILArPedestal>, CondContBase );
+
+
 
 #endif 
diff --git a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArfSampl.h b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArfSampl.h
index 0388efda38a4e1cafd4a153eff9e9ab9498af48b..47c81250e32a20cb10e43464b6399823d75d371f 100755
--- a/LArCalorimeter/LArElecCalib/LArElecCalib/ILArfSampl.h
+++ b/LArCalorimeter/LArElecCalib/LArElecCalib/ILArfSampl.h
@@ -42,4 +42,12 @@ class ILArfSampl {
 
 CLASS_DEF( ILArfSampl,128126607,1) 
 
+//ConditionsContainer clid for athenaMT
+#include "AthenaKernel/CondCont.h"
+CLASS_DEF( CondCont<ILArfSampl>, 155688745, 1 )
+#include "SGTools/BaseInfo.h"
+SG_BASE( CondCont<ILArfSampl>, CondContBase );
+
+
+
 #endif 
diff --git a/LArCalorimeter/LArElecCalib/doc/packagedoc.h b/LArCalorimeter/LArElecCalib/doc/packagedoc.h
index a672f85c0d3b573a2df7f9cfad1e4b325abd8403..6853b97d1b198c99e9b4819b2904dee3bb0254c4 100644
--- a/LArCalorimeter/LArElecCalib/doc/packagedoc.h
+++ b/LArCalorimeter/LArElecCalib/doc/packagedoc.h
@@ -59,16 +59,6 @@ href="http://isscvs.cern.ch/cgi-bin/viewcvs-all.cgi/offline/LArCalorimeter/LArRa
   - ILAruA2MeV
   - LArPedestalAll
 
-@ref used_LArElecCalib
 
-@ref requirements_LArElecCalib
 
 */
-
-/**
-@page used_LArElecCalib Used Packages
-*/
-
-/**
-@page requirements_LArElecCalib Requirements
-*/
diff --git a/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.cc
index f474b40d36e9410f839cd45728003a3258c5058f..3f5a3ef46c8cd8a06c3bedc367c604d18b943935 100644
--- a/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.cc
+++ b/LArCalorimeter/LArG4/LArG4EC/src/CryostatCalibrationMixedCalculator.cc
@@ -90,7 +90,6 @@ namespace LArG4 {
       std::string detectorKey  = LArVersion.empty() ? AtlasVersion : LArVersion;
       std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
 
-      pAccessSvc->connect();
       // getting HEC table
       IRDBRecordset_ptr hecNominals = pAccessSvc->getRecordsetPtr("HecNominals",detectorKey,detectorNode);
       if (hecNominals->size()==0) {
@@ -124,24 +123,6 @@ namespace LArG4 {
       m_endZFCal3 = m_startZFCal3 + 2.0*m_hdepthFCal3;
       m_z1BeforeFCal = m_zEMECRefPoint + m_LArEMECLArThickness;
       m_z2BeforeFCal = m_endZHec0;
-
-      //       std::cout << "--- GGG CryostatCalibrationMixedCalculator.cc ---" << std::endl
-      //         << "  m_zShift: " << m_zShift << std::endl
-      //         << "  m_zEMECRefPoint: " << m_zEMECRefPoint << std::endl
-      //         << "  m_LArEMECLArThickness: " << m_LArEMECLArThickness  << std::endl
-      //         << "  m_startZFCal1: " << m_startZFCal1  << std::endl
-      //         << "  m_startZFCal2: " << m_startZFCal2  << std::endl
-      //         << "  m_startZFCal3: " << m_startZFCal3  << std::endl
-      //         << "  m_hdepthFCal1: " << m_hdepthFCal1  << std::endl
-      //         << "  m_hdepthFCal2: " << m_hdepthFCal2  << std::endl
-      //         << "  m_hdepthFCal3: " << m_hdepthFCal3  << std::endl
-      //         << "  m_endZFCal3: " << m_endZFCal3  << std::endl
-      //         << "  m_endZHec0: " << m_endZHec0  << std::endl
-      //         << "  m_z1BeforeFCal: " << m_z1BeforeFCal  << std::endl
-      //         << "  m_z2BeforeFCal: " << m_z2BeforeFCal  << std::endl
-      //         << std::endl;
-
-      pAccessSvc->disconnect();
     }
 
     CalibrationMixedCalculator::Parameters::~Parameters()
diff --git a/LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.cc
index 6225e467ee774a7decb6bfdc20ebf1cbd1caa83a..aa8220f0418930bbc956343d9445c88c2ea4584d 100644
--- a/LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.cc
+++ b/LArCalorimeter/LArG4/LArG4EC/src/EMECSupportCalibrationCalculator.cc
@@ -101,7 +101,6 @@ namespace LArG4 {
     const std::string detectorKey  = LArVersion.empty() ? AtlasVersion : LArVersion;
     const std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
 
-    pAccessSvc->connect();
       // getting HEC table
     IRDBRecordset_ptr hecNominals = pAccessSvc->getRecordsetPtr("HecNominals",detectorKey,detectorNode);
     if (hecNominals->size()==0) {
@@ -138,24 +137,6 @@ namespace LArG4 {
     m_z2BeforeFCal = (*hecNominals)[0]->getDouble("OUTDEPTH")*CLHEP::mm + m_zShift;
     m_HECzEnd = (*hecNominals)[7]->getDouble("OUTDEPTH")*CLHEP::mm + m_zShift;
 
-//     std::cout << "--- GGG EMECSupportCalibrationCalculator.cc variables ---" << std::endl
-//         << " m_zShift: " << m_zShift << std::endl
-//         << " m_zEMECRefPoint: " << m_zEMECRefPoint << std::endl
-//         << " m_HECzStart: " << m_HECzStart << std::endl
-//         << " m_zAlignmentSafety: " << m_zAlignmentSafety << std::endl
-//         << " m_zInFrontOfSpanishFan: " << m_zInFrontOfSpanishFan << std::endl
-//         << " m_zBehindOfSpanishFan: " << m_zBehindOfSpanishFan << std::endl
-//         << " m_zInFrontOfHEC: " << m_zInFrontOfHEC << std::endl
-//         << " m_zzInFrontOfPresampler: " << m_zzInFrontOfPresampler << std::endl
-//         << " m_zzInFrontOfStrips: " << m_zzInFrontOfStrips << std::endl
-//         << " m_zzInFrontOfMiddle: " << m_zzInFrontOfMiddle << std::endl
-//         << " m_zzInFrontOfBack: " << m_zzInFrontOfBack << std::endl
-//         << " m_z1BeforeFCal: " << m_z1BeforeFCal << std::endl
-//         << " m_z2BeforeFCal: " << m_z2BeforeFCal << std::endl
-//         << " m_HECzEnd: " << m_HECzEnd << std::endl
-//         << std::endl;
-
-    pAccessSvc->disconnect();
   }
 
   EMECSupportCalibrationCalculator::Parameters::~Parameters()
diff --git a/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.cc b/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.cc
index 99bbdf83d42b5438284e831fc321214b1a2a618b..dcdc53e9d6b10c95b0a24afd67501e4143cf725a 100644
--- a/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.cc
+++ b/LArCalorimeter/LArG4/LArG4EC/src/EnergyCalculator.cc
@@ -440,8 +440,6 @@ StatusCode EnergyCalculator::initialize()
 
   DecodeVersionKey larVersionKey(geoModel, "LAr");
 
-  pAccessSvc->connect();
-
   IRDBRecordset_ptr emecSamplingSep = pAccessSvc->getRecordsetPtr("EmecSamplingSep", larVersionKey.tag(), larVersionKey.node());
   if (emecSamplingSep->size()==0) {
     throw std::runtime_error("Cannot find the EmecSamplingSep Table");
@@ -452,8 +450,6 @@ StatusCode EnergyCalculator::initialize()
     throw std::runtime_error("Cannot find the EmecGeometry Table");
   }
 
-  pAccessSvc->disconnect();
-
   for(int i = 0; i < 7; i ++){
     std::ostringstream A0STR;
     A0STR << "_" << i;
diff --git a/LArCalorimeter/LArG4/LArG4EC/src/PresamplerGeometry.cc b/LArCalorimeter/LArG4/LArG4EC/src/PresamplerGeometry.cc
index 378e5d61b538057515a74a0935d1dfdabf6b9999..f4eab605209932a18d1f88aef48eb40fda1e699e 100644
--- a/LArCalorimeter/LArG4/LArG4EC/src/PresamplerGeometry.cc
+++ b/LArCalorimeter/LArG4/LArG4EC/src/PresamplerGeometry.cc
@@ -84,7 +84,6 @@ namespace LArG4 {
       const std::string detectorKey  = LArVersion.empty() ? AtlasVersion : LArVersion;
       const std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
       
-      pAccessSvc->connect();
       // Note Presampler Lives In DB under "cryostats"..
       IRDBRecordset_ptr presamplerPosition = pAccessSvc->getRecordsetPtr("PresamplerPosition",AtlasVersion,"ATLAS");
       if (presamplerPosition->size()==0) {
@@ -93,8 +92,6 @@ namespace LArG4 {
 	  throw std::runtime_error("Cannot find the PresamplerPosition Table");
 	}
       }
-      pAccessSvc->disconnect();
-      
       
       m_c->rMinEndcap=(*presamplerPosition)[0]->getDouble("RMIN")*CLHEP::cm;
       m_c->rMaxEndcap=(*presamplerPosition)[0]->getDouble("RMAX")*CLHEP::cm;
diff --git a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.cc b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.cc
index e2d70928cbacc4934dcbee6ea22a0b3937f01652..990b9e456267341283de1c681ce5460150731431 100644
--- a/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.cc
+++ b/LArCalorimeter/LArG4/LArG4FCAL/src/LArFCALCalibCalculatorBase.cc
@@ -109,13 +109,11 @@ namespace LArG4 {
       std::string detectorKey  = LArVersion.empty() ? AtlasVersion : LArVersion;
       std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
 
-      pAccessSvc->connect();
       IRDBRecordset_ptr emecGeoPtr = pAccessSvc->getRecordsetPtr("EmecGeometry",detectorKey,detectorNode);
       if (emecGeoPtr->size()==0)
         throw std::runtime_error ("LArFCALCalibCalculatorBase ERROR: Cannot find the EmecGeometry Table");
 
       m_zShift = (*emecGeoPtr)[0]->getDouble("ZSHIFT")*CLHEP::cm;
-      pAccessSvc->disconnect();
       return StatusCode::SUCCESS;
     }
 
diff --git a/LArCalorimeter/LArG4/LArG4FastSimSvc/doc/mainpage.h b/LArCalorimeter/LArG4/LArG4FastSimSvc/doc/mainpage.h
index 5d6ea59078c27b81e873c59c6a0c6b3e282df1a0..918fe26097891ee81ae12c41e94707d0d1eb4aa6 100644
--- a/LArCalorimeter/LArG4/LArG4FastSimSvc/doc/mainpage.h
+++ b/LArCalorimeter/LArG4/LArG4FastSimSvc/doc/mainpage.h
@@ -18,14 +18,3 @@ This package serves as an interface to fast simulation energy and option setting
 @ref requirements_LArG4FastSimSvc
 
 */
-
-/**
-@page used_LArG4FastSimSvc Used Packages
-@htmlinclude used_packages.html
-*/
-
-/**
-@page requirements_LArG4FastSimSvc Requirements
-@include requirements
-*/
-
diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/doc/packagedoc.h b/LArCalorimeter/LArG4/LArG4FastSimulation/doc/packagedoc.h
index f53de9d440308351769b7004bd382610a68b4304..9093f8755381ec8c0161793769131239aadc698b 100644
--- a/LArCalorimeter/LArG4/LArG4FastSimulation/doc/packagedoc.h
+++ b/LArCalorimeter/LArG4/LArG4FastSimulation/doc/packagedoc.h
@@ -44,4 +44,3 @@
 
 
 */
-
diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/share/LArG4FastSimulation_VPTimer_EHist_jobOptions.py b/LArCalorimeter/LArG4/LArG4FastSimulation/share/LArG4FastSimulation_VPTimer_EHist_jobOptions.py
index 9cdf0bb7d4f99525b760c0110f0582aea61d759e..4db2144e9a4f01a9952c50d6c1adb72e8b66e5b8 100755
--- a/LArCalorimeter/LArG4/LArG4FastSimulation/share/LArG4FastSimulation_VPTimer_EHist_jobOptions.py
+++ b/LArCalorimeter/LArG4/LArG4FastSimulation/share/LArG4FastSimulation_VPTimer_EHist_jobOptions.py
@@ -1,25 +1,16 @@
 ##
 ## # $Id: LArG4FastSimulation_VPTimer_EHist_jobOptions.py 708108 2015-11-16 12:34:05Z jchapman $
 ##
-## # jobOptions file for preparing detailed program timer and histogramming of 
+## # jobOptions file for preparing detailed program timer and histogramming of
 ## # MC-level energy by particle and volume
 
-## # must be imported after the command:
-## theApp.initialize()
-
-from G4AtlasApps import PyG4Atlas,AtlasG4Eng
-
 actionProperties={
-## EHist-only options:
-'ROOTFileName':'top_ke_test.root',	# name of .root file output
-'MaxHists':'1000',			# maximum number of histograms to store ( <~10000 for < 2MB of RAM)
-
 ## Depths: level in geometry tree under Atlas::Atlas volume at which to truncate output;
 ## counted Atlas::Atlas level = 0, CALO::CALO level = 1, etc.
-'CaloDepth':'4',	# hadron calorimeter, CALO::CALO
-'BeamPipeDepth':'2',	# beampipe, BeamPipe::BeamPipe
-'InDetDepth':'2',	# inner detector, IDET::IDET
-'MuonDepth':'2',	# muon detector, MUONQ02::MUONQ02
+'CaloDepth':'4',     # hadron calorimeter, CALO::CALO
+'BeamPipeDepth':'2', # beampipe, BeamPipe::BeamPipe
+'InDetDepth':'2',    # inner detector, IDET::IDET
+'MuonDepth':'2',     # muon detector, MUONQ02::MUONQ02
 
 ## Detail depth: output data for a specific volume and its parents; format /Atlas::Atlas/[lvl1Vol]/.../[Volume]
 'DetailDepth':'/Atlas::Atlas/CALO::CALO/LArMgr::LArMgr/LArBarrel/Total LAR Volume/LAr::Barrel::Cryostat::HalfLAr::PosPhysical/LArMgr::LAr::EMB::ECAM'
@@ -27,31 +18,20 @@ actionProperties={
 
 ## # volume/particle timing - prints cpu time spent per particle, per volume to outfile
 ## # DO NOT USE SIMULTANEOUSLY WITH EHistAction!
-try:
-    # Post UserAction Migration (ATLASSIM-1752)
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-    from AthenaCommon.CfgGetter import getPublicTool
-    UAStore.addAction(getPublicTool('TestActionVPTimer'),['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'])
-except:
-    # Pre UserAction Migration
-    TimerAction = PyG4Atlas.UserAction('G4ProfilingTools','TestActionVPTimer',
-                                       ['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'])
-    TimerAction.set_Properties(actionProperties)
-    AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(TimerAction)
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::TestActionVPTimerTool',['Run','Event','Step'])
+for key, value in actionProperties.iteritems():
+    simFlags.UserActionConfig.addConfig('G4UA::TestActionVPTimerTool',key,value)
 print "volume/particle timing ON (see stdout)"
 
 ## # energy histogramming - creates ROOT file with histograms of kinetic energy by particle, by volume
-#try:
-#    # Post UserAction Migration (ATLASSIM-1752)
-#    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-#    from AthenaCommon.CfgGetter import getPublicTool
-#    UAStore.addAction(getPublicTool('TestActionEHist'),['BeginOfRun','EndOfRun','Step'])
-#except:
-#    # Pre UserAction Migration
-#    EHistAction = PyG4Atlas.UserAction('G4ProfilingTools','TestActionEHist',
-#                                       ['BeginOfRun','EndOfRun','Step'])
-#    EHistAction.set_Properties(actionProperties)
-#    AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(EHistAction)
+
+## EHist-only options:
+#simFlags.OptionalUserActionList.addAction('G4UA::TestActionEHistTool',['Run','Tracking','Step'])
+#for key, value in actionProperties.iteritems():
+#    simFlags.UserActionConfig.addConfig('G4UA::TestActionEHistTool',key,value)
+#simFlags.UserActionConfig.addConfig('G4UA::TestActionEHistTool','ROOTFileName','top_ke_test.root') # name of .root file output
+#simFlags.UserActionConfig.addConfig('G4UA::TestActionEHistTool','MaxHists','1000') # maximum number of histograms to store ( <~10000 for < 2MB of RAM)
 #print "energy histogramming ON (outfile:",actionProperties['ROOTFileName'],")"
 
 ## # must be imported prior to the commands:
diff --git a/LArCalorimeter/LArG4/LArG4FastSimulation/share/LArG4FastSimulation_setupTimer_jobOptions.py b/LArCalorimeter/LArG4/LArG4FastSimulation/share/LArG4FastSimulation_setupTimer_jobOptions.py
index 45dea86ac47bb1cf30af91c3a2f42544afd287db..143b004d536cd902dc3e5c5799d58765ffa2d3a3 100755
--- a/LArCalorimeter/LArG4/LArG4FastSimulation/share/LArG4FastSimulation_setupTimer_jobOptions.py
+++ b/LArCalorimeter/LArG4/LArG4FastSimulation/share/LArG4FastSimulation_setupTimer_jobOptions.py
@@ -7,27 +7,8 @@
 #
 # Include this file in your simulation job options to apply the timer
 #
-
-try:
-    if (hasattr(simFlags, 'UseV2UserActions') and simFlags.UseV2UserActions()):
-        # this configures the MT
-        from G4AtlasServices import G4AtlasServicesConfig
-        G4AtlasServicesConfig.addAction('G4UA::TestActionTimerTool',['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'],False)
-    else:
-        # Post UserAction Migration (ATLASSIM-1752)
-        try:
-            from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-        except ImportError:
-            from G4AtlasServices.UserActionStore import UAStore
-            from AthenaCommon.CfgGetter import getPublicTool
-            UAStore.addAction(getPublicTool('TestActionTimer'),['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'])
-except:
-    # Pre UserAction Migration
-    def LArG4Timer_preG4Init():
-        from G4AtlasApps import PyG4Atlas,AtlasG4Eng
-        MyAction = PyG4Atlas.UserAction('G4ProfilingTools','TestActionTimer',['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'])
-        AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(MyAction)
-    simFlags.InitFunctions.add_function("preInitG4", LArG4Timer_preG4Init)
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::TestActionTimerTool',['Run','Event','Step'])
 
 from AthenaCommon.AppMgr import ServiceMgr
 from GaudiSvc.GaudiSvcConf import THistSvc
diff --git a/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLib.h b/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLib.h
index d27644445ae2e086e6f4077f91468854f6e9174c..e295676a72f94b004dc73fbc06a7885fa712ae00 100755
--- a/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLib.h
+++ b/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLib.h
@@ -39,11 +39,9 @@ class G4AffineTransform;
    */
 
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
 
 #include "LArG4Code/ILArCalculatorSvc.h"
 
@@ -53,16 +51,16 @@ namespace G4UA{
   
   
   class TestActionShowerLib:
-  public IBeginEventAction,  public IEndEventAction,  public IBeginRunAction,  public IEndRunAction,  public ISteppingAction
+  public G4UserEventAction, public G4UserRunAction, public G4UserSteppingAction
   {
     
   public:
     TestActionShowerLib();
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void endOfRun(const G4Run*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void EndOfRunAction(const G4Run*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
   private:
     
     typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
diff --git a/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLibTool.h b/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLibTool.h
index 402e1e3bd0f1c890f0f7eb5bbe142101d1aed412..5275b0b91583af20dc8fcd8613225d6c036019ec 100644
--- a/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLibTool.h
+++ b/LArCalorimeter/LArG4/LArG4GenShowerLib/LArG4GenShowerLib/TestActionShowerLibTool.h
@@ -4,11 +4,9 @@
 
 #ifndef LARG4GENSHOWERLIB_G4UA__TESTACTIONSHOWERLIBTOOL_H 
 #define LARG4GENSHOWERLIB_G4UA__TESTACTIONSHOWERLIBTOOL_H 
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "LArG4GenShowerLib/TestActionShowerLib.h"
 namespace G4UA{ 
@@ -22,27 +20,21 @@ namespace G4UA{
   
   class TestActionShowerLibTool: 
   public ActionToolBase<TestActionShowerLib>,
-    public IBeginEventActionTool,  public IEndEventActionTool,  public IBeginRunActionTool,  public IEndRunActionTool,  public ISteppingActionTool
+    public IG4EventActionTool, public IG4RunActionTool, public IG4SteppingActionTool
   {
     
   public:
     /// standard tool ctor
     TestActionShowerLibTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// retrieves the BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// retrieves the EoE action
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
-    /// retrieves the BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
-    /// retrieves the EoR action
-    virtual IEndRunAction* getEndRunAction() override final 
-    { return static_cast<IEndRunAction*>( getAction() ); }
+    /// retrieves the event action
+    virtual G4UserEventAction* getEventAction() override final
+    { return static_cast<G4UserEventAction*>( getAction() ); }
+    /// retrieves the run action
+    virtual G4UserRunAction* getRunAction() override final
+    { return static_cast<G4UserRunAction*>( getAction() ); }
     /// retrieves the stepping action
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     /// Gaudi interface handling
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
diff --git a/LArCalorimeter/LArG4/LArG4GenShowerLib/doc/packagedoc.h b/LArCalorimeter/LArG4/LArG4GenShowerLib/doc/packagedoc.h
index 132104c178caffcf90dc0590aa500e5ea43e63af..51df85bfe6179b447334bc27efeed8fda3722809 100644
--- a/LArCalorimeter/LArG4/LArG4GenShowerLib/doc/packagedoc.h
+++ b/LArCalorimeter/LArG4/LArG4GenShowerLib/doc/packagedoc.h
@@ -55,16 +55,4 @@ shower library using the ShowerLib::ShowerLib class.
 
 @section LArG4GenShowerLib_LArG4GenShowerLib Extra Pages
 
-- @ref used_LArG4GenShowerLib
-- @ref requirements_LArG4GenShowerLib
 */
-
-/**
-   @page used_LArG4GenShowerLib Used Packages
-*/
-
-/**
-   @page requirements_LArG4GenShowerLib Requirements
-*/
-
-
diff --git a/LArCalorimeter/LArG4/LArG4GenShowerLib/share/LArG4GenerateShowerLib.py b/LArCalorimeter/LArG4/LArG4GenShowerLib/share/LArG4GenerateShowerLib.py
index f4f0c39cdfe6391e7c87a49e956ddc3859eba1b7..840d708ad3e905c06e59b786eee9cb54b22815f2 100755
--- a/LArCalorimeter/LArG4/LArG4GenShowerLib/share/LArG4GenerateShowerLib.py
+++ b/LArCalorimeter/LArG4/LArG4GenShowerLib/share/LArG4GenerateShowerLib.py
@@ -79,7 +79,7 @@ simFlags.RandomSeedOffset = randint(1,443921180)
 #add G4 function
 
 from G4AtlasApps.SimFlags import simFlags
-simFlags.OptionalUserActionList.addAction('G4UA::TestActionShowerLibTool',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step'])
+simFlags.OptionalUserActionList.addAction('G4UA::TestActionShowerLibTool',['Event','Run','Step'])
 
 topSeq += PyG4AtlasAlg()
 
diff --git a/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLib.cxx b/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLib.cxx
index 795d42758a0af15466a503a21e4871573481b27a..71be25b436b45002860a9f33ca68b36a47adfe5b 100644
--- a/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLib.cxx
+++ b/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLib.cxx
@@ -53,7 +53,7 @@ namespace G4UA{
   }
   
   
-  void TestActionShowerLib::beginOfEvent(const G4Event*){
+  void TestActionShowerLib::BeginOfEventAction(const G4Event*){
     if (m_current_transform == 0)
       m_current_transform = new G4AffineTransform ();
     
@@ -69,7 +69,7 @@ namespace G4UA{
     
   }
   
-  void TestActionShowerLib::endOfEvent(const G4Event*){
+  void TestActionShowerLib::EndOfEventAction(const G4Event*){
 #ifdef _myDEBUG_
     G4cout << "#########################################" << G4endl
 	   << "##    TestActionShowerLib - EndOfEvent ##" << G4endl
@@ -128,7 +128,7 @@ namespace G4UA{
     
   }
   
-  void TestActionShowerLib::beginOfRun(const G4Run*){
+  void TestActionShowerLib::BeginOfRunAction(const G4Run*){
 #ifdef _myDEBUG_
     G4cout << "#########################################" << G4endl
 	   << "##    TestActionShowerLib - BeginOfRun ##" << G4endl
@@ -166,7 +166,7 @@ namespace G4UA{
   return;
 }
 
-void TestActionShowerLib::endOfRun(const G4Run*){
+void TestActionShowerLib::EndOfRunAction(const G4Run*){
     
 #ifdef _myDEBUG_
     G4cout << "#########################################" << G4endl
@@ -178,7 +178,7 @@ void TestActionShowerLib::endOfRun(const G4Run*){
 }
 
   
-void TestActionShowerLib::processStep(const G4Step* aStep){
+void TestActionShowerLib::UserSteppingAction(const G4Step* aStep){
     
     bool hasCalc=true;
     bool emptydet = (m_eventSteps->detector[0] == '\0'); //empty string. man, i hate pure C!
diff --git a/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLibTool.cxx b/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLibTool.cxx
index ccaac264e3ea69925ec75a3a966e48b783d7078a..ee371e2e8b64f112c90fc386fe4d81a6db411baa 100644
--- a/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLibTool.cxx
+++ b/LArCalorimeter/LArG4/LArG4GenShowerLib/src/TestActionShowerLibTool.cxx
@@ -17,28 +17,18 @@ namespace G4UA{
   }
   StatusCode TestActionShowerLibTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndRunActionTool::interfaceID()) {
-      *ppvIf = (IEndRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.cc
index 36b860e945eb6f49c8877687866f09aee3f09e0b..39b81b0e40712ce800466c78b7d192e1abedc7ea 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.cc
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.cc
@@ -23,7 +23,7 @@ namespace G4UA
     //ATH_MSG_DEBUG ("LArGeoH62004EventAction::LArGeoH62004EventAction constructor");
   }
 
-  void LArGeoH62004EventAction::endOfEvent(const G4Event * /*theEvent*/)
+  void LArGeoH62004EventAction::EndOfEventAction(const G4Event * /*theEvent*/)
   {
 
     //ATH_MSG_DEBUG ("LArGeoH62004EventAction::EndOfEventAction");
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.h
index 7c17d496461306cb26d37926895e3d194e13a1b9..bf11c2e26a0fbccf282c162aef347c0c96886bad 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.h
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventAction.h
@@ -5,7 +5,7 @@
 #ifndef LARG4H6SD_LArGeoH62004EventAction_h
 #define LARG4H6SD_LArGeoH62004EventAction_h 1
 
-#include "G4AtlasInterfaces/IEndEventAction.h"
+#include "G4UserEventAction.hh"
 // For the output write handle
 #include "StoreGate/WriteHandle.h"
 #include "TBEvent/TBEventInfo.h"
@@ -16,7 +16,7 @@ class LArGeoTB2004Options;
 namespace G4UA
 {
   /// @brief NEEDS DOCUMENTATION
-  class LArGeoH62004EventAction final: public IEndEventAction
+  class LArGeoH62004EventAction final: public G4UserEventAction
   {
   public:
     struct Config
@@ -27,7 +27,7 @@ namespace G4UA
 
     LArGeoH62004EventAction(const Config& config);
 
-    virtual void endOfEvent(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
 
   private:
     static int m_evnum;
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.cc
index 583c08f47ec8dfff7fb3f55a9aca67eee8393525..29119334488a941b628a178c46377add17c56b40 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.cc
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.cc
@@ -52,8 +52,8 @@ namespace G4UA
   //---------------------------------------------------------------------------
   StatusCode LArGeoH62004EventActionTool::queryInterface(const InterfaceID& riid, void** ppvIf)
   {
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.h
index 5c0975965fe1fb7d1a924d138ca2b9faea9cc7ec..319dac054a056540836aed11365729a015b484c2 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.h
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004EventActionTool.h
@@ -9,7 +9,7 @@
 #include <string>
 
 // Infrastructure includes
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 
 // Local includes
@@ -26,7 +26,7 @@ namespace G4UA
   /// @author Andrea Di Simone
   ///
   class LArGeoH62004EventActionTool : public ActionToolBase<LArGeoH62004EventAction>,
-                                      public IEndEventActionTool
+                                      public IG4EventActionTool
   {
 
   public:
@@ -39,8 +39,8 @@ namespace G4UA
     StatusCode initialize() override final;
 
     /// Retrieve the event action interface
-    virtual IEndEventAction* getEndEventAction() override final
-    { return static_cast<IEndEventAction*>( getAction() ); }
+    virtual G4UserEventAction* getEventAction() override final
+    { return static_cast<G4UserEventAction*>( getAction() ); }
 
     /// Query interface for gaudi
     virtual StatusCode
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.cc
index cbbc9c3365d6dd28cd6dcee88f7688b3b457ebf7..a97ecadc4173335bf5bc66ea85d7d7bf6ed6364e 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.cc
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.cc
@@ -28,7 +28,7 @@ namespace G4UA
 
   }
 
-  void LArGeoH62004SteppingAction::processStep(const G4Step * theStep)
+  void LArGeoH62004SteppingAction::UserSteppingAction(const G4Step * theStep)
   {
 
     // ADS: why are these static?
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.h
index 8e005a171430414dc7eaa43fa2deace667052d79..f1bad2288731bf52185b0101ddbd4777367b3b83 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.h
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingAction.h
@@ -10,12 +10,12 @@
 #define LARG4H6SD_LArGeoH62004SteppingAction_h 1
 
 
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserSteppingAction.hh"
 
 namespace G4UA
 {
   /// @brief NEEDS DOCUMENTATION
-  class LArGeoH62004SteppingAction final: public ISteppingAction
+  class LArGeoH62004SteppingAction final: public G4UserSteppingAction
   {
   public:
 
@@ -27,7 +27,7 @@ namespace G4UA
     };
 
     LArGeoH62004SteppingAction(const Config& config);
-    virtual void processStep(const G4Step*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
 
   private:
     float m_yTable;
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.cc
index 5228de2537a98887b96aa477477acf1b6e61431c..ef92856147210333f582d3e145a6ae6e26e77fcd 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.cc
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.cc
@@ -52,8 +52,8 @@ namespace G4UA
   //---------------------------------------------------------------------------
   StatusCode LArGeoH62004SteppingActionTool::queryInterface(const InterfaceID& riid, void** ppvIf)
   {
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.h
index 98bcd59f7670e25a9f06f2acac5b3a03aae28fb2..88aec52cb859e112ee573c435cf65c19b42718f2 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.h
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/LArGeoH62004SteppingActionTool.h
@@ -9,7 +9,7 @@
 #include <string>
 
 // Infrastructure includes
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 
 // Local includes
@@ -26,7 +26,7 @@ namespace G4UA
   /// @author Andrea Di Simone
   ///
   class LArGeoH62004SteppingActionTool : public ActionToolBase<LArGeoH62004SteppingAction>,
-                                         public ISteppingActionTool
+                                         public IG4SteppingActionTool
   {
 
   public:
@@ -39,8 +39,8 @@ namespace G4UA
     StatusCode initialize() override final;
 
     /// Retrieve the stepping action interface
-    virtual ISteppingAction* getSteppingAction() override final
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
     /// Query interface for gaudi
     virtual StatusCode
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.cc
index fefec3a820af4b45294e75ca71802fdd567c6f82..af19e279f91d3bc808f0455cda692f20d6197562 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.cc
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.cc
@@ -24,7 +24,7 @@ namespace G4UA
   // ADS why not class members?
   static bool has_cryo, has_em, has_hec, has_fcal;
 
-  void RadLenNtuple::beginOfEvent(const G4Event* /*anEvent*/)
+  void RadLenNtuple::BeginOfEventAction(const G4Event* /*anEvent*/)
   {
     has_cryo = has_em = has_hec = has_fcal = false;
     //   m_tot_x = m_cryo_x = m_em_x = m_hec_x = m_fcal_x = 0.;
@@ -32,7 +32,7 @@ namespace G4UA
     //   m_fcal_y = m_em_y = m_hec_y = m_cryo_y = 0.;
   }
 
-  void RadLenNtuple::endOfEvent(const G4Event* /*anEvent*/)
+  void RadLenNtuple::EndOfEventAction(const G4Event* /*anEvent*/)
   {
 
     m_xcoord = -10000.;
@@ -103,7 +103,7 @@ namespace G4UA
 
 
 
-  void RadLenNtuple::processStep(const G4Step* aStep)
+  void RadLenNtuple::UserSteppingAction(const G4Step* aStep)
   {
 
     G4StepPoint *preStep=aStep->GetPreStepPoint();
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.h b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.h
index 80714119e13b7260c3338e8563c5e52f3ec89ac5..de535781bb3cf2902b2550eb12ce6f323c8595ae 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.h
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtuple.h
@@ -5,9 +5,8 @@
 #ifndef LARG4H6SD_RadLenNtuple_H
 #define LARG4H6SD_RadLenNtuple_H
 
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
+#include "G4UserSteppingAction.hh"
+#include "G4UserEventAction.hh"
 
 #include <string>
 #include "GaudiKernel/NTuple.h"
@@ -21,7 +20,7 @@
 namespace G4UA
 {
   /// @brief NEEDS DOCUMENTATION
-  class RadLenNtuple final: public ISteppingAction, public IBeginEventAction, public IEndEventAction {
+  class RadLenNtuple final: public G4UserSteppingAction, public G4UserEventAction {
 
   public:
 
@@ -32,9 +31,9 @@ namespace G4UA
     };
 
     RadLenNtuple(const Config& config): m_mcEvtColl(config.mcEventCollName), m_verboseLevel(config.verboseLevel) {}
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
 
     virtual StatusCode initialize();
 
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.cc b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.cc
index cc944d647a7207981755767b8c42eb49bad2cca5..15669fa95f5db88ff84a40ed1aa7cc0487f684fb 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.cc
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.cc
@@ -45,20 +45,14 @@ namespace G4UA
   //---------------------------------------------------------------------------
   StatusCode RadLenNtupleTool::queryInterface(const InterfaceID& riid, void** ppvIf)
   {
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
 
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.h b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.h
index c5a7dba58b33cc5dcecd31f6d90004998e56d113..a4bc3c2edccfbcd27f5c6ae926ea8c11d899f8fa 100644
--- a/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.h
+++ b/LArCalorimeter/LArG4/LArG4H6SD/src/RadLenNtupleTool.h
@@ -9,9 +9,8 @@
 #include <string>
 
 // Infrastructure includes
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 
 // Local includes
@@ -27,9 +26,8 @@ namespace G4UA
   /// @author Andrea Di Simone
   ///
   class RadLenNtupleTool : public ActionToolBase<RadLenNtuple>,
-                           public IBeginEventActionTool,
-                           public IEndEventActionTool,
-                           public ISteppingActionTool
+                           public IG4EventActionTool,
+                           public IG4SteppingActionTool
   {
 
   public:
@@ -41,17 +39,13 @@ namespace G4UA
     /// Framework methods
     StatusCode initialize() override final;
 
-    /// Retrieve the begin-event action interface
-    virtual IBeginEventAction* getBeginEventAction() override final
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-
-    /// Retrieve the end-event action interface
-    virtual IEndEventAction* getEndEventAction() override final
-    { return static_cast<IEndEventAction*>( getAction() ); }
+    /// Retrieve the event action interface
+    virtual G4UserEventAction* getEventAction() override final
+    { return static_cast<G4UserEventAction*>( getAction() ); }
 
     /// Retrieve the stepping action interface
-    virtual ISteppingAction* getSteppingAction() override final
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
     /// Query interface for gaudi
     virtual StatusCode
diff --git a/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc b/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc
index cf5a7fd7f81440cef01a06162f6bdfa11fb6a744..1f869be4f32b64b8fc76f35aafc51206faca23aa 100644
--- a/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc
+++ b/LArCalorimeter/LArG4/LArG4HEC/src/LocalGeometry.cc
@@ -129,8 +129,6 @@ namespace LArG4 {
       ATH_CHECK(m_AccessSvc.retrieve());
 
       // Obtain the geometry version information:
-      m_AccessSvc->connect();
-
       std::string AtlasVersion = m_geoModel->atlasVersion();
       std::string LArVersion = m_geoModel->LAr_VersionOverride();
 
@@ -180,8 +178,6 @@ namespace LArG4 {
         }
       m_betweenWheel  = (*hadronicEndcap)[0]->getDouble("GAPWHL")*Units::cm-0.001*Units::cm; //40.5*mm
 
-      m_AccessSvc->shutdown();
-
       return StatusCode::SUCCESS;
     }
 
diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.cc b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.cc
index 7d6642bbae530195cc309b44d814b9359a4ddd5e..99d30ada3babde4e1fd6ce0d6c1049cb6bfcc1ea 100644
--- a/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.cc
+++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/src/MiniFCALAssignIdentifier.cc
@@ -91,12 +91,9 @@ namespace LArG4 {
       std::string detectorKey  = LArVersion.empty() ? AtlasVersion : LArVersion;
       std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
 
-      pAccessSvc->connect();
-
       std::string miniFcalVersion = pAccessSvc->getChildTag("MiniFcal",detectorKey,detectorNode);
       if(miniFcalVersion.empty()) {
         m_initialized = false;
-        pAccessSvc->disconnect();
         return;
       }
 
@@ -129,8 +126,6 @@ namespace LArG4 {
         m_nWafers[(*recRings)[i]->getInt("RINGNUM")] =(*recRings)[i]->getInt("NWAFERS") ;
       }
 
-      pAccessSvc->disconnect();
-
       m_initialized = true;
     }
 
diff --git a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py
index 4d6c37e8067d1b120feb91c0fae5418f87849328..dfcae0fb3abcf5f0259344f399b4204daf4bece0 100644
--- a/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py
+++ b/LArCalorimeter/LArG4/LArG4SD/python/LArG4SDConfig.py
@@ -1,6 +1,10 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
+
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+
+
 def getLArActiveSensitiveDetector(name="LArActiveSensitiveDetector", **kwargs):
     ## Main configuration
     from G4AtlasApps.SimFlags import simFlags
@@ -115,17 +119,29 @@ def getLArDeadSensitiveDetector(name="LArDeadSensitiveDetector", **kwargs):
     return CfgMgr.LArG4__DeadSDTool(name, **kwargs)
 
 def getLArEMBSensitiveDetector(name="LArEMBSensitiveDetector", **kwargs):
+    bare_collection_name = "LArHitEMB"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "LArEMBHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     ## Main configuration
     kwargs.setdefault("StacVolumes",["LArMgr::LAr::EMB::STAC"])
     kwargs.setdefault("PresamplerVolumes",["LArMgr::LAr::Barrel::Presampler::Module"])
     # No effect currently
-    kwargs.setdefault("OutputCollectionNames", ["LArHitEMB"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     # Hook for fast simulation
     from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("UseFrozenShowers", simFlags.LArParameterization()>0)
     return CfgMgr.LArG4__EMBSDTool(name, **kwargs)
 
 def getLArEMECSensitiveDetector(name="LArEMECSensitiveDetector", **kwargs):
+    bare_collection_name = "LArHitEMEC"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "LArEMECHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     from G4AtlasApps.SimFlags import simFlags
     if simFlags.SimLayout.get_Value() not in ["tb_LArH6_2002","tb_LArH6EC_2002"]:
         kwargs.setdefault("NegIWVolumes",["LArMgr::LAr::EMEC::Neg::InnerWheel"])
@@ -136,29 +152,41 @@ def getLArEMECSensitiveDetector(name="LArEMECSensitiveDetector", **kwargs):
         kwargs.setdefault("PosOWVolumes",["LArMgr::LAr::EMEC::Pos::OuterWheel"])
     kwargs.setdefault("PresVolumes", ["LArMgr::LAr::Endcap::Presampler::LiquidArgon"])
     # No effect currently
-    kwargs.setdefault("OutputCollectionNames", ["LArHitEMEC"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     # Hook for fast simulation
     kwargs.setdefault("UseFrozenShowers", simFlags.LArParameterization()>0)
     return CfgMgr.LArG4__EMECSDTool(name, **kwargs)
 
 def getLArFCALSensitiveDetector(name="LArFCALSensitiveDetector", **kwargs):
+    bare_collection_name = "LArHitFCAL"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "LArFCALHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("FCAL1Volumes",["LArMgr::LAr::FCAL::Module1::Gap"])
     kwargs.setdefault("FCAL2Volumes",["LArMgr::LAr::FCAL::Module2::Gap"])
     kwargs.setdefault("FCAL3Volumes",["LArMgr::LAr::FCAL::Module3::Gap"])
     # No effect currently
-    kwargs.setdefault("OutputCollectionNames", ["LArHitFCAL"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     # Hook for fast simulation
     from G4AtlasApps.SimFlags import simFlags
     kwargs.setdefault("UseFrozenShowers", simFlags.LArParameterization()>0)
     return CfgMgr.LArG4__FCALSDTool(name, **kwargs)
 
 def getLArHECSensitiveDetector(name="LArHECSensitiveDetector", **kwargs):
+    bare_collection_name = "LArHitHEC"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "LArHECHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     #kwargs.setdefault("SliceVolumes",["LAr::HEC::Module::Depth::Slice"])
     #kwargs.setdefault("LocalVolumes",["LAr::HEC::Module::Depth::Slice::Local"])
     kwargs.setdefault("WheelVolumes",["LArMgr::LAr::HEC::Module::Depth::Slice"])
     #  You might think this should go here, but we don't think so!  LAr::HEC::Module::Depth::Slice::Wheel"])
     # No effect currently
-    kwargs.setdefault("OutputCollectionNames", ["LArHitHEC"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.LArG4__HECSDTool(name, **kwargs)
 
 def getLArInactiveSensitiveDetector(name="LArInactiveSensitiveDetector", **kwargs):
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.cc
index 2eddb6e3242f8d5d58af75915dbc0f5beddf6ddb..d6aca8b9a912fb9f6e6a937442529b89799841dc 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.cc
+++ b/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.cc
@@ -16,11 +16,9 @@ namespace LArG4
   EMBSDTool::EMBSDTool(const std::string& type, const std::string& name,
                        const IInterface* parent)
     : SimpleSDTool(type, name, parent)
-    , m_hitCollName("LArHitEMB")
     , m_embcalc("EMBCalculator", name)
     , m_pscalc("EMBPresamplerCalculator", name)
   {
-    declareProperty("HitCollectionName", m_hitCollName);
     declareProperty("StacVolumes", m_stacVolumes);
     declareProperty("PresamplerVolumes", m_presVolumes);
 
@@ -45,7 +43,7 @@ namespace LArG4
   G4VSensitiveDetector* EMBSDTool::makeSD()
   {
     // Create the wrapper
-    auto sdWrapper = new SimpleSDWrapper("LArEMBSDWrapper", m_hitCollName);
+    auto sdWrapper = new SimpleSDWrapper("LArEMBSDWrapper", m_outputCollectionNames[0]);
 
     // Add the SDs
     sdWrapper->addSD( makeOneSD("LAr::Barrel::Presampler::Module", &*m_pscalc, m_presVolumes) );
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.h
index a89293715557bf7a52f8ef5b0e8898cf0b62f1ba..c63f4c8fb96c379fa0f4db08dbf5c14ed739a367 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.h
+++ b/LArCalorimeter/LArG4/LArG4SD/src/EMBSDTool.h
@@ -41,9 +41,6 @@ namespace LArG4
       /// @name Configuration
       /// @{
 
-      /// Hit collection name
-      std::string m_hitCollName;
-
       /// List of volumes for the stac SD
       std::vector<std::string> m_stacVolumes;
       /// List of volumes for the presampler SD
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.cc
index 0f55d3e1f2898dc49b9afc79be68ffd469704ccd..ec01f380e27fd3eb0576954c9fd3f3bd3bcec8ff 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.cc
+++ b/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.cc
@@ -14,8 +14,7 @@ namespace LArG4
   //---------------------------------------------------------------------------
   EMECSDTool::EMECSDTool(const std::string& type, const std::string& name,
                                  const IInterface *parent)
-    : SimpleSDTool(type, name, parent),
-      m_hitCollName("LArHitEMEC")
+    : SimpleSDTool(type, name, parent)
     , m_emepiwcalc("EMECPosInnerWheelCalculator", name)
     , m_emeniwcalc("EMECNegInnerWheelCalculator", name)
     , m_emepowcalc("EMECPosOuterWheelCalculator", name)
@@ -23,7 +22,6 @@ namespace LArG4
     , m_emepscalc("EMECPresamplerCalculator", name)
     , m_emeobarcalc("EMECBackOuterBarretteCalculator", name)
   {
-    declareProperty("HitCollectionName", m_hitCollName);
     declareProperty("PosIWVolumes", m_posIWVolumes);
     declareProperty("NegIWVolumes", m_negIWVolumes);
     declareProperty("PosOWVolumes", m_posOWVolumes);
@@ -60,7 +58,7 @@ namespace LArG4
   G4VSensitiveDetector* EMECSDTool::makeSD()
   {
     // Create the wrapper
-    auto sdWrapper = new SimpleSDWrapper("LArEMECSDWrapper", m_hitCollName);
+    auto sdWrapper = new SimpleSDWrapper("LArEMECSDWrapper", m_outputCollectionNames[0]);
 
     // Add the SDs
     sdWrapper->addSD(
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.h
index 730c5e8fdaaa69d1bec3c9ba4bafdc0401b80bfa..82c759463ec18060775ccb13376b8b2a397fd116 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.h
+++ b/LArCalorimeter/LArG4/LArG4SD/src/EMECSDTool.h
@@ -38,9 +38,6 @@ namespace LArG4
       /// Create the SD wrapper for current worker thread
       G4VSensitiveDetector* makeSD() override final;
 
-      /// Hit collection name
-      std::string m_hitCollName;
-
       /// @name List of volumes for each SD and the corresponding SD
       /// @{
       std::vector<std::string> m_posIWVolumes;
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.cc
index 493fba86a9db97982560a9c3687a346c73b70bf4..382b14c5e5253aa1c6f191f6486aebce4b0c560f 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.cc
+++ b/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.cc
@@ -15,12 +15,10 @@ namespace LArG4
   FCALSDTool::FCALSDTool(const std::string& type, const std::string& name,
                          const IInterface* parent)
     : SimpleSDTool(type, name, parent)
-    , m_hitCollName("LArHitFCAL")
     , m_fcal1calc("FCAL1Calculator", name)
     , m_fcal2calc("FCAL2Calculator", name)
     , m_fcal3calc("FCAL3Calculator", name)
   {
-    declareProperty("HitCollectionName", m_hitCollName);
     declareProperty("FCAL1Volumes", m_fcal1Volumes);
     declareProperty("FCAL2Volumes", m_fcal2Volumes);
     declareProperty("FCAL3Volumes", m_fcal3Volumes);
@@ -48,7 +46,7 @@ namespace LArG4
   G4VSensitiveDetector* FCALSDTool::makeSD()
   {
     // Create the wrapper
-    auto sdWrapper = new SimpleSDWrapper("LArFCALSDWrapper", m_hitCollName);
+    auto sdWrapper = new SimpleSDWrapper("LArFCALSDWrapper", m_outputCollectionNames[0]);
 
     // Add the SDs
     sdWrapper->addSD( makeOneSD("LAr::FCAL::Module1::Gap", &*m_fcal1calc, m_fcal1Volumes) );
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.h
index f41499e7c7619c3d6caa0bae88fa982f04f0f989..01a079020c5345d03652729fde81370f8ea123da 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.h
+++ b/LArCalorimeter/LArG4/LArG4SD/src/FCALSDTool.h
@@ -38,9 +38,6 @@ namespace LArG4
       /// Create the SD wrapper for current worker thread
       G4VSensitiveDetector* makeSD() override final;
 
-      /// Hit collection name
-      std::string m_hitCollName;
-
       /// List of volumes for each SD
       /// @{
       std::vector<std::string> m_fcal1Volumes;
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.cc
index 671f46e34ec0858ae91cf85f5e3768cd7479d6c2..272b33264765c13397352e36dafa4111073a8e84 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.cc
+++ b/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.cc
@@ -16,10 +16,8 @@ namespace LArG4
   HECSDTool::HECSDTool(const std::string& type, const std::string& name,
                        const IInterface* parent)
     : SimpleSDTool(type, name, parent)
-    , m_hitCollName("LArHitHEC")
     , m_heccalc("HECWheelCalculator", name)
   {
-    declareProperty("HitCollectionName", m_hitCollName);
     //declareProperty("SliceVolumes", m_sliceVolumes);
     //declareProperty("LocalVolumes", m_localVolumes);
     declareProperty("WheelVolumes", m_wheelVolumes);
@@ -43,7 +41,7 @@ namespace LArG4
   G4VSensitiveDetector* HECSDTool::makeSD()
   {
     // Create the wrapper
-    auto sdWrapper = new SimpleSDWrapper("LArHECSDWrapper", m_hitCollName);
+    auto sdWrapper = new SimpleSDWrapper("LArHECSDWrapper", m_outputCollectionNames[0]);
 
     // Add the SDs
     //sdWrapper->addSD( makeOneSD("LAr::HEC::Module::Depth::Slice",
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.h
index bd0580949d96fe685341366eacd091bbca93bc0c..6d591db248f681131f9057c3ef70a40dd881c4b5 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.h
+++ b/LArCalorimeter/LArG4/LArG4SD/src/HECSDTool.h
@@ -38,9 +38,6 @@ namespace LArG4
      /// Create the SD wrapper for current worker thread
       G4VSensitiveDetector* makeSD() override final;
 
-      /// Hit collection name
-      std::string m_hitCollName;
-
       /// List of volumes for each SD
       /// @{
       std::vector<std::string> m_sliceVolumes;
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.cc b/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.cc
index 40c1dec44d1e36892c31d2b82dea413d853bcfd2..96bc23aa6722d9fad907808e8578814f3ff2cd87 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.cc
+++ b/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.cc
@@ -14,11 +14,9 @@ namespace LArG4
   //---------------------------------------------------------------------------
   MiniFCALSDTool::MiniFCALSDTool(const std::string& type, const std::string& name,
                                  const IInterface* parent)
-    : SimpleSDTool(type, name, parent),
-      m_hitCollName("LArHitMiniFCAL")
+    : SimpleSDTool(type, name, parent)
     , m_calc("MiniFCALCalculator", name)
   {
-    declareProperty("HitCollectionName", m_hitCollName);
     declareProperty("MiniVolumes", m_miniVolumes);
 
     declareProperty("MiniFCALCalculator", m_calc);
@@ -36,7 +34,7 @@ namespace LArG4
   G4VSensitiveDetector* MiniFCALSDTool::makeSD()
   {
     // Create the wrapper
-    auto sdWrapper = new SimpleSDWrapper("LArMiniFCALSDWrapper", m_hitCollName);
+    auto sdWrapper = new SimpleSDWrapper("LArMiniFCALSDWrapper", m_outputCollectionNames[0]);
 
     // Add the SDs
     sdWrapper->addSD( makeOneSD("MiniFCAL::Wafer", &*m_calc, m_miniVolumes) );
diff --git a/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.h b/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.h
index 2fde7470afb8e878eb73ada23d2930044e26c31f..898aa5b390fdc835e44c4deff17c7d769f2180b6 100644
--- a/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.h
+++ b/LArCalorimeter/LArG4/LArG4SD/src/MiniFCALSDTool.h
@@ -38,9 +38,6 @@ namespace LArG4
     /// Create the SD wrapper for current worker thread
     G4VSensitiveDetector* makeSD() override final;
 
-    /// Hit collection name
-    std::string m_hitCollName;
-
     /// The list of volumes
     std::vector<std::string> m_miniVolumes;
 
diff --git a/LArCalorimeter/LArG4/LArG4ShowerLib/doc/packagedoc.h b/LArCalorimeter/LArG4/LArG4ShowerLib/doc/packagedoc.h
index 0ab77b08cd8ac7c45f7e1f463d551f0511088d99..52049bf9707d95b5017c05e97d0826e25d1bca3e 100644
--- a/LArCalorimeter/LArG4/LArG4ShowerLib/doc/packagedoc.h
+++ b/LArCalorimeter/LArG4/LArG4ShowerLib/doc/packagedoc.h
@@ -36,16 +36,4 @@ based shower parametrisation.
 
 @section LArG4ShowerLib_LArG4ShowerLib Extra Pages
 
-- @ref used_LArG4ShowerLib
-- @ref requirements_LArG4ShowerLib
 */
-
-/**
-   @page used_LArG4ShowerLib Used Packages
-*/
-
-/**
-   @page requirements_LArG4ShowerLib Requirements
-*/
-
-
diff --git a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/doc/packagedoc.h b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/doc/packagedoc.h
index 85faa4e5a50f211821d541d6e2cca98c647ff6bc..0dde5243569acf36fe553463b9b4db2d8d3fe489 100644
--- a/LArCalorimeter/LArG4/LArG4ShowerLibSvc/doc/packagedoc.h
+++ b/LArCalorimeter/LArG4/LArG4ShowerLibSvc/doc/packagedoc.h
@@ -46,16 +46,4 @@ need a dedicated sensitive detector to be put back into the simulation.
 
 @section LArG4ShowerLibSvc_LArG4ShowerLibSvc Extra Pages
 
-- @ref used_LArG4ShowerLibSvc
-- @ref requirements_LArG4ShowerLibSvc
 */
-
-/**
-   @page used_LArG4ShowerLibSvc Used Packages
-*/
-
-/**
-   @page requirements_LArG4ShowerLibSvc Requirements
-*/
-
-
diff --git a/LArCalorimeter/LArG4/LArG4Validation/doc/packagedoc.h b/LArCalorimeter/LArG4/LArG4Validation/doc/packagedoc.h
index 42eb22741ae227178891cbe1dd2222810bfb4ed3..16a44f190199c88ba9fd7dac43c5e680834e6f49 100644
--- a/LArCalorimeter/LArG4/LArG4Validation/doc/packagedoc.h
+++ b/LArCalorimeter/LArG4/LArG4Validation/doc/packagedoc.h
@@ -37,9 +37,4 @@
  - For questions or comments: Joe Boudreau 
    boudreau@pitt.edu
 
-@section LArG4Validation_used_packagesTkPara Used Packages
-
-@section LArG4Validation_requirements Requirements
-
 */
-
diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx
index a3e3c7b058fcf4f5a4bc262b7561ba3ebb9ad87e..fa5eb38dddcea76131109f6407779b893887d240 100755
--- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx
+++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelCryostatConstruction.cxx
@@ -996,7 +996,7 @@ GeoFullPhysVol* LArGeo::BarrelCryostatConstruction::GetEnvelope()
 
 
 
-  if(rdbAccess->getChildTag("LArBarrelDM",larVersionKey.tag(),larVersionKey.node(),false)!="" && m_fullGeo) {
+  if(rdbAccess->getChildTag("LArBarrelDM",larVersionKey.tag(),larVersionKey.node())!="" && m_fullGeo) {
     // Dead material in barrel
     BarrelDMConstruction barrelDMConstruction;
     barrelDMConstruction.create (m_cryoMotherPhysical);
diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelDMConstruction.cxx b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelDMConstruction.cxx
index 515840dfe70a7a820c7e53dd0a652de9fd525bdc..40b202a2dd3495a81e0dc24b5fc9bd0ccab16e01 100755
--- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelDMConstruction.cxx
+++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/src/BarrelDMConstruction.cxx
@@ -952,7 +952,7 @@ void LArGeo::BarrelDMConstruction::create(GeoFullPhysVol* envelope)
   //   .... Hope that future tags will be used in a 'normal' way
 
 
-  std::string strDMTopTag = rdbAccess->getChildTag("LArBarrelDM",larVersionKey.tag(),larVersionKey.node(),false);
+  std::string strDMTopTag = rdbAccess->getChildTag("LArBarrelDM",larVersionKey.tag(),larVersionKey.node());
 
   if(strDMTopTag=="")
     throw std::runtime_error("Error in BarrelDMConstruction, empty BarrelDM tag!");
diff --git a/LArCalorimeter/LArGeoModel/LArGeoCode/cmt/requirements b/LArCalorimeter/LArGeoModel/LArGeoCode/cmt/requirements
deleted file mode 100755
index e1e911024127cca0c1ae225137729ce8797efde2..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArGeoModel/LArGeoCode/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package LArGeoCode
-
-author Joe Boudreau <boudreau@pitt.edu>
-author Bill Seligman <seligman@nevis.columbia.edu>
-
-use AtlasPolicy    AtlasPolicy-*
-
-# Build the library (and export the headers)
-library LArGeoCode *.cxx
-apply_pattern installed_library
-
-private
-use AtlasCLHEP     AtlasCLHEP-*        External
-use GaudiInterface GaudiInterface-*    External
-use GeoModelKernel GeoModelKernel-*    DetectorDescription/GeoModel
-use RDBAccessSvc   RDBAccessSvc-*      Database/AthenaPOOL
-use StoreGate      StoreGate-*         Control
-use GeoModelInterfaces    GeoModelInterfaces-*       DetectorDescription/GeoModel
\ No newline at end of file
diff --git a/LArCalorimeter/LArGeoModel/LArGeoCode/src/DatabaseAccessTool.cxx b/LArCalorimeter/LArGeoModel/LArGeoCode/src/DatabaseAccessTool.cxx
index 6230f94ef74cbbc5e9440599b7a2a3a7f5e75929..f07169f1b68ec7bdcd4e0423bac054e3aecfe799 100755
--- a/LArCalorimeter/LArGeoModel/LArGeoCode/src/DatabaseAccessTool.cxx
+++ b/LArCalorimeter/LArGeoModel/LArGeoCode/src/DatabaseAccessTool.cxx
@@ -43,13 +43,10 @@ DatabaseAccessTool::DatabaseAccessTool ()
   m_cw->detectorKey  = LArVersion.empty() ? AtlasVersion : LArVersion;
   m_cw->detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
   
-  m_cw->pAccessSvc->connect();
-
 }
 
 DatabaseAccessTool::~DatabaseAccessTool () 
 {
-  m_cw->pAccessSvc->disconnect();
   delete m_cw;
 }
 
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/cmt/requirements b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/cmt/requirements
deleted file mode 100755
index d5c9b6a91e71ce933308e86f6149432bf654afb3..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-package LArReadoutGeometry
-
-author	  Joe Boudreau <boudreau@pitt.edu>
-
-use AtlasPolicy	       AtlasPolicy-*
-use CLIDSvc            CLIDSvc-*               Control
-use GeoModelKernel     GeoModelKernel-*        DetectorDescription/GeoModel
-use Identifier         Identifier-*            DetectorDescription
-use LArHV              LArHV-*                 LArCalorimeter/LArGeoModel
-use GeoPrimitives      GeoPrimitives-*         DetectorDescription
-public
-
-apply_pattern installed_library 
-library LArReadoutGeometry  *.cxx
-
-macro DOXYGEN_EXAMPLE_PATH     "../doc ../cmt ../share"
-macro DOXYGEN_EXAMPLE_PATTERNS "*.cxx *.html requirements *.py"
-
-private
-use AtlasCLHEP         AtlasCLHEP-*            External
-use AtlasBoost         AtlasBoost-*            External
-use GaudiInterface     GaudiInterface-*        External
-use GeoModelInterfaces GeoModelInterfaces-*    DetectorDescription/GeoModel
-use GeoModelUtilities  GeoModelUtilities-*     DetectorDescription/GeoModel
-use RDBAccessSvc       RDBAccessSvc-*          Database/AthenaPOOL
-use StoreGate          StoreGate-*             Control
-
-#macro LArReadoutGeometry_cppflags  "-g -O0"
-
diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBAccordionDetails.cxx b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBAccordionDetails.cxx
index 2f043344f6509f4d2618dcb3367471a2b184fd10..85098c19b38760d703cdf9b23fc0f162bbfde8ae 100644
--- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBAccordionDetails.cxx
+++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/src/EMBAccordionDetails.cxx
@@ -227,21 +227,16 @@ EMBAccordionDetails::EMBAccordionDetails():m_c(new Clockwork()) {
   std::string detectorKey  = LArVersion.empty() ? AtlasVersion : LArVersion;
   std::string detectorNode = LArVersion.empty() ? "ATLAS" : "LAr";
   
-  pAccessSvc->connect();
-  
   IRDBRecordset_ptr barrelGeometry = pAccessSvc->getRecordsetPtr("BarrelGeometry",detectorKey,detectorNode);
   if (barrelGeometry->size()==0) {
     throw std::runtime_error("Cannot find the BarrelGeometry Table");
   }
   
-
   IRDBRecordset_ptr barrelLongDiv = pAccessSvc->getRecordsetPtr("BarrelLongDiv",detectorKey,detectorNode);
   if (barrelLongDiv->size()==0) {
     throw std::runtime_error("Cannot find the BarrelLongDiv Table");
   }
   
-  pAccessSvc->disconnect();
-  
   // number of straight sections (should be 14)
   m_c->Nbrt = (*barrelGeometry)[0]->getInt("NBRT");
   // Number of ZIGs + 1  i.e.  15 = number of folds
diff --git a/LArCalorimeter/LArIdentifier/doc/packagedoc.h b/LArCalorimeter/LArIdentifier/doc/packagedoc.h
index 2e4011e02e62314fc0eb03e2c865bf377d24f221..febdd2651932ef9407c8af7626753de1d5a70463 100644
--- a/LArCalorimeter/LArIdentifier/doc/packagedoc.h
+++ b/LArCalorimeter/LArIdentifier/doc/packagedoc.h
@@ -55,17 +55,6 @@ of a cell, and two used in the HighVoltage description of a cell.
   - LArHVElectrodeID
   - LArHVSpecialElectrodeID
 
-@ref used_LArIdentifier
 
-@ref requirements_LArIdentifier
 
 */
-
-
-/**
-@page used_LArIdentifier Used Packages
-*/
-
-/**
-@page requirements_LArIdentifier Requirements
-*/
diff --git a/LArCalorimeter/LArMonTools/share/LArMonJobOptionsOnlineCombined.py b/LArCalorimeter/LArMonTools/share/LArMonJobOptionsOnlineCombined.py
deleted file mode 100644
index 899084ffaa827a7247d58e71cfec6e4a1621f4b6..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArMonTools/share/LArMonJobOptionsOnlineCombined.py
+++ /dev/null
@@ -1,29 +0,0 @@
-Oimport os
-import os.path
-
-online = True 
-ReadCOOL=True
-Type='Pedestal'
-
-#
-## What is needed to start
-#
-include("LArMonTools/LArMonCommonHeader_jobOptions.py")
-include("LArMonTools/LArMonManager.py") 
-
-svcMgr.IOVDbSvc.GlobalTag="COMCOND-ES1S-000-00"
-#
-## The tools 
-#
-include("LArMonTools/LArFEBMon_jobOptions.py")
-include("LArMonTools/LArDigitNoiseMonTool_jobOptions.py")
-include("LArMonTools/LArOddCellsMonTool_jobOptions.py")
-
-svcMgr.PoolSvc.ReadCatalog.remove("xmlcatalog_file:/det/lar/project/databases/poolcond/PoolCat_oflcond.xml")
-
-include("LArMonTools/LArMyJob.py")
-
-#
-## To finalise things 
-#
-include("LArMonTools/LArMonCommonTrailer_jobOptions.py")
diff --git a/LArCalorimeter/LArMonTools/src/LArAffectedRegions.cxx b/LArCalorimeter/LArMonTools/src/LArAffectedRegions.cxx
index dc91668763b19fb097b536e7145f892df710e3d3..ea82bd6057e81dc221c8357a1eed13d07cbbea94 100644
--- a/LArCalorimeter/LArMonTools/src/LArAffectedRegions.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArAffectedRegions.cxx
@@ -91,11 +91,11 @@ LArAffectedRegions::~LArAffectedRegions()
 StatusCode 
 LArAffectedRegions::initialize()
 {
-  msg(MSG::INFO) << "Initialize LArAffectedRegions" << endmsg;
+  ATH_MSG_INFO( "Initialize LArAffectedRegions"  );
 
   // End Initialize
   ManagedMonitorToolBase::initialize().ignore();
-  if ( msg().level() <= MSG::DEBUG )  msg(MSG::DEBUG) << "Successful Initialize LArAffectedRegions " << endmsg;
+  ATH_MSG_DEBUG( "Successful Initialize LArAffectedRegions "  );
 
   return StatusCode::SUCCESS;
 }
@@ -104,7 +104,7 @@ LArAffectedRegions::initialize()
 StatusCode 
 LArAffectedRegions::bookHistograms()
 {
-  if ( msg().level() <= MSG::DEBUG ) msg(MSG::DEBUG) << "in bookHists()" << endmsg;
+  ATH_MSG_DEBUG( "in bookHists()"  );
 
   //  if(isNewRun ){ // Commented by B.Trocme to comply with new ManagedMonitorToolBase
   
@@ -214,8 +214,7 @@ LArAffectedRegions::bookHistograms()
 StatusCode 
 LArAffectedRegions::fillHistograms()
 {
-  bool debug = msg().level() <= MSG::DEBUG ; 
-  if (debug)   msg(MSG::DEBUG) << "in fillHists()" << endmsg;
+  ATH_MSG_DEBUG( "in fillHists()"  );
 
   m_eventsCounter++;
 
@@ -226,7 +225,7 @@ LArAffectedRegions::fillHistograms()
     const CaloAffectedRegionInfoVec* affRegVec=0;
     StatusCode sc = detStore()->retrieve(affRegVec, "LArAffectedRegion");
     if (sc.isFailure() || !affRegVec) {
-      msg(MSG::WARNING) << " Cannot find LArAffectedRegion in DetectorStore " << endmsg;
+      ATH_MSG_WARNING( " Cannot find LArAffectedRegion in DetectorStore "  );
       return StatusCode::SUCCESS;
     }
 
@@ -251,13 +250,11 @@ LArAffectedRegions::fillHistograms()
       float etamin=region->get_eta_min();
       float etamax=region->get_eta_max();
      
-      if (debug){
-	msg(MSG::DEBUG) << " Print list of affected regions:" << endmsg;
-	msg(MSG::DEBUG) << region << " " 
+      ATH_MSG_DEBUG( " Print list of affected regions:"  );
+      ATH_MSG_DEBUG( region << " " 
 		      << region->get_eta_min() << " " << region->get_eta_max() << " " 
 		      << region->get_phi_min() << " " << region->get_phi_max() << " "
-		      << region->get_layer_min() << " " << region->get_layer_max() << " " << region->get_problem() << endmsg;
-      }
+		      << region->get_layer_min() << " " << region->get_layer_max() << " " << region->get_problem()  );
       /////////////////////////////////
       // Build Affected Regions maps //
       /////////////////////////////////
@@ -282,15 +279,14 @@ LArAffectedRegions::fillHistograms()
 	    while(phi<phimax){
 	      if(eta>=0){
 		m_hLArAffectedRegionsEMBPS[0]->Fill(eta,phi,problem); 
-		if (debug) msg(MSG::DEBUG) <<  "EMBAPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBAPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      if(eta<0){
 		m_hLArAffectedRegionsEMBPS[1]->Fill(eta,phi,problem); 
-		if (debug)  msg(MSG::DEBUG) <<  "EMBCPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBCPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/32);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	   // phimin > phimax
 	  }else{
@@ -298,29 +294,27 @@ LArAffectedRegions::fillHistograms()
 	    while(phi<TMath::Pi()){
 	      if(eta>=0){
 		m_hLArAffectedRegionsEMBPS[0]->Fill(eta,phi,problem); 
-		if (debug)  msg(MSG::DEBUG) <<  "EMBAPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBAPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      if(eta<0){
 		m_hLArAffectedRegionsEMBPS[1]->Fill(eta,phi,problem); 
-		if (debug)  msg(MSG::DEBUG) <<  "EMBCPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBCPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/32);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	    phi = -TMath::Pi();
 	    while(phi<phimax){
 	      if(eta>=0){
 		m_hLArAffectedRegionsEMBPS[0]->Fill(eta,phi,problem); 
-		if (debug)  msg(MSG::DEBUG) <<  "EMBAPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBAPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      if(eta<0){
 		m_hLArAffectedRegionsEMBPS[1]->Fill(eta,phi,problem); 
-		if (debug)  msg(MSG::DEBUG) <<  "EMBCPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBCPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/32);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	  }
 	  eta+=0.2;
@@ -337,15 +331,14 @@ LArAffectedRegions::fillHistograms()
 	    while(phi<phimax){
 	      if(eta >=0){
 		m_hLArAffectedRegionsEMB[0]->Fill(eta,phi,problem);
-		if (debug)  msg(MSG::DEBUG) <<  "EMBA " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      if(eta <0){
 		m_hLArAffectedRegionsEMB[1]->Fill(eta,phi,problem);
-		if (debug)  msg(MSG::DEBUG) <<  "EMBC " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/128);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	  // phimin > phimax: go over Pi
 	  }else{
@@ -353,29 +346,27 @@ LArAffectedRegions::fillHistograms()
 	    while(phi<TMath::Pi()){
 	      if(eta >=0){
 		m_hLArAffectedRegionsEMB[0]->Fill(eta,phi,problem);
-		if (debug) msg(MSG::DEBUG) <<  "EMBA " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      if(eta <0){
 		m_hLArAffectedRegionsEMB[1]->Fill(eta,phi,problem);
-		if (debug) msg(MSG::DEBUG) <<  "EMBC " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/128);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	    phi = -TMath::Pi();
 	    while(phi<phimax){
 	      if(eta >=0){
 		m_hLArAffectedRegionsEMB[0]->Fill(eta,phi,problem);
-		if (debug) msg(MSG::DEBUG) <<  "EMBA " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      if(eta <0){
 		m_hLArAffectedRegionsEMB[1]->Fill(eta,phi,problem);
-		if (debug) msg(MSG::DEBUG) <<  "EMBC " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMBC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/128);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	  }
 	  eta+=0.2;
@@ -392,15 +383,14 @@ LArAffectedRegions::fillHistograms()
 	    while(phi<phimax){
 	      if(eta>=0){
 		m_hLArAffectedRegionsEMECPS[0]->Fill(eta,phi,problem); 
-		if (debug) msg(MSG::DEBUG) <<  "EMECAPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECAPS " << eta << " " << phi << " " << problem << "  " << layermin << " " << layermax << " " << region  );
 	      }
 	      if(eta<0){
 		m_hLArAffectedRegionsEMECPS[1]->Fill(eta,phi,problem); 
-		if (debug) msg(MSG::DEBUG) <<  "EMECCPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECCPS " << eta << " " << phi << " " << problem << "  " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/64);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	  // phimin > phimax
 	  }else{
@@ -408,29 +398,27 @@ LArAffectedRegions::fillHistograms()
 	    while(phi<TMath::Pi()){
 	      if(eta>=0){
 		m_hLArAffectedRegionsEMECPS[0]->Fill(eta,phi,problem); 
-		if (debug) msg(MSG::DEBUG) <<  "EMECAPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECAPS " << eta << " " << phi << " " << problem << "  " << layermin << " " << layermax << " " << region  );
 	      }
 	      if(eta<0){
 		m_hLArAffectedRegionsEMECPS[1]->Fill(eta,phi,problem); 
-		if (debug) msg(MSG::DEBUG) <<  "EMECCPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECCPS " << eta << " " << phi << " " << problem << "  " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/64);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	    phi = -TMath::Pi();
 	    while(phi<phimax){
 	      if(eta>=0){
 		m_hLArAffectedRegionsEMECPS[0]->Fill(eta,phi,problem); 
-		if (debug) msg(MSG::DEBUG) <<  "EMECAPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECAPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      if(eta<0){
 		m_hLArAffectedRegionsEMECPS[1]->Fill(eta,phi,problem); 
-		if (debug) msg(MSG::DEBUG) <<  "EMECCPS " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECCPS " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/64);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	  }
 	  if(fabs(eta)<2.5)eta+=0.2;
@@ -448,15 +436,14 @@ LArAffectedRegions::fillHistograms()
 	    while(phi<phimax){
 	      if(eta>=0){
 		m_hLArAffectedRegionsEMEC[0]->Fill(eta,phi,problem);
-		if (debug) msg(MSG::DEBUG) <<  "EMECA " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      } 
 	      if(eta<0){
 		m_hLArAffectedRegionsEMEC[1]->Fill(eta,phi,problem); 
-		if (debug) msg(MSG::DEBUG) <<  "EMECC " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/256);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	  // phimin > phimax
 	  }else{
@@ -464,29 +451,27 @@ LArAffectedRegions::fillHistograms()
 	    while(phi<TMath::Pi()){
 	      if(eta>=0){
 		m_hLArAffectedRegionsEMEC[0]->Fill(eta,phi,problem);
-		if (debug) msg(MSG::DEBUG) <<  "EMECA " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      } 
 	      if(eta<0){
 		m_hLArAffectedRegionsEMEC[1]->Fill(eta,phi,problem); 
-		if (debug) msg(MSG::DEBUG) <<  "EMECC " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/256);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	    phi = -TMath::Pi()+0.01;
 	    while(phi<phimax){
 	      if(eta>=0){
 		m_hLArAffectedRegionsEMEC[0]->Fill(eta,phi,problem);
-		if (debug) msg(MSG::DEBUG) <<  "EMECA " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      } 
 	      if(eta<0){
 		m_hLArAffectedRegionsEMEC[1]->Fill(eta,phi,problem); 
-		if (debug) msg(MSG::DEBUG) <<  "EMECC " << eta << " " << phi << " " << problem << " " 
-				<< layermin << " " << layermax << " " << region << endmsg;
+		ATH_MSG_DEBUG(  "EMECC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	      }
 	      phi+=(2*TMath::Pi()/256);
+              if(fabs(phi)<1.e-4) phi=0.;
 	    }
 	  }
 	  if(fabs(eta)>=2.8) eta+=0.4;
@@ -504,15 +489,14 @@ LArAffectedRegions::fillHistograms()
 	  while(phi<phimax){
 	    if(eta>=0){
 	      m_hLArAffectedRegionsHECA[layermin-8]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "HECA " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " " << region << endmsg;
+	      ATH_MSG_DEBUG(  "HECA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    if(eta<0){
 	      m_hLArAffectedRegionsHECC[layermin-8]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "HECC " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " "  << region << endmsg;
+	      ATH_MSG_DEBUG(  "HECC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " "  << region  );
 	    } 
 	    phi+=(2*TMath::Pi()/32);
+            if(fabs(phi)<1.e-4) phi=0.;
 	  }
 	// phimin < phimax
 	}else{
@@ -520,29 +504,27 @@ LArAffectedRegions::fillHistograms()
 	  while(phi<TMath::Pi()){
 	    if(eta>=0){
 	      m_hLArAffectedRegionsHECA[layermin-8]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "HECA " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " " << region << endmsg;
+	      ATH_MSG_DEBUG(  "HECA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    if(eta<0){
 	      m_hLArAffectedRegionsHECC[layermin-8]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "HECC " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " "  << region << endmsg;
+	      ATH_MSG_DEBUG(  "HECC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " "  << region  );
 	    } 
 	    phi+=(2*TMath::Pi()/32);
+            if(fabs(phi)<1.e-4) phi=0.;
 	  }
 	  phi = -TMath::Pi();
 	  while(phi<phimax){
 	    if(eta>=0){
 	      m_hLArAffectedRegionsHECA[layermin-8]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "HECA " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " " << region << endmsg;
+	      ATH_MSG_DEBUG(  "HECA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    if(eta<0){
 	      m_hLArAffectedRegionsHECC[layermin-8]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "HECC " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " "  << region << endmsg;
+	      ATH_MSG_DEBUG(  "HECC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " "  << region  );
 	    } 
 	    phi+=(2*TMath::Pi()/32);
+            if(fabs(phi)<1.e-4) phi=0.;
 	  }
 	}
       }
@@ -556,15 +538,14 @@ LArAffectedRegions::fillHistograms()
 	  while(phi<phimax){
 	    if(eta>=0){
 	      m_hLArAffectedRegionsFCALA[layermin-21]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "FCALA " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " " << region << endmsg;
+	      ATH_MSG_DEBUG(  "FCALA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    if(eta<0){
 	      m_hLArAffectedRegionsFCALC[layermin-21]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "FCALC " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " " << region << endmsg;
+	      ATH_MSG_DEBUG(  "FCALC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    phi+=(2*TMath::Pi()/16);
+            if(fabs(phi)<1.e-4) phi=0.;
 	  }
 	// phimin > phimax
 	}else{
@@ -572,29 +553,27 @@ LArAffectedRegions::fillHistograms()
 	  while(phi<TMath::Pi()){
 	    if(eta>=0){
 	      m_hLArAffectedRegionsFCALA[layermin-21]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "FCALA " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " " << region << endmsg;
+	      ATH_MSG_DEBUG(  "FCALA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    if(eta<0){
 	      m_hLArAffectedRegionsFCALC[layermin-21]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "FCALC " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " " << region << endmsg;
+	      ATH_MSG_DEBUG(  "FCALC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    phi+=(2*TMath::Pi()/16);
+            if(fabs(phi)<1.e-4) phi=0.;
 	  }
 	  phi = -TMath::Pi()+0.1;
 	  while(phi<phimax){
 	    if(eta>=0){
 	      m_hLArAffectedRegionsFCALA[layermin-21]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "FCALA " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " " << region << endmsg;
+	      ATH_MSG_DEBUG(  "FCALA " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    if(eta<0){
 	      m_hLArAffectedRegionsFCALC[layermin-21]->Fill(eta,phi,problem); 
-	      if (debug) msg(MSG::DEBUG) <<  "FCALC " << eta << " " << phi << " " << problem << " " 
-			      << layermin << " " << layermax << " " << region << endmsg;
+	      ATH_MSG_DEBUG(  "FCALC " << eta << " " << phi << " " << problem << " " << layermin << " " << layermax << " " << region  );
 	    } 
 	    phi+=(2*TMath::Pi()/16);
+            if(fabs(phi)<1.e-4) phi=0.;
 	  }
 	}
       }	
@@ -607,7 +586,7 @@ LArAffectedRegions::fillHistograms()
 StatusCode LArAffectedRegions::procHistograms()
 {
 
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In procHistograms " << endmsg;
+  ATH_MSG_DEBUG( "In procHistograms "  );
 
   return StatusCode::SUCCESS;
 }
diff --git a/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx
index 7b31d9b7bf83f9e765013f167ddf70accf71cb6b..2936265cc0a677290b629a32682375a36b530667 100755
--- a/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArCollisionTimeMonTool.cxx
@@ -91,7 +91,7 @@ LArCollisionTimeMonTool::initialize() {
 
   ManagedMonitorToolBase::initialize().ignore();
   CHECK(m_bunchGroupTool.retrieve());
-  msg(MSG::DEBUG) << "Successful Initialize LArCollisionTimeMonTool " << endmsg;
+  ATH_MSG_DEBUG( "Successful Initialize LArCollisionTimeMonTool " );
   return StatusCode::SUCCESS;
 }
 
@@ -220,7 +220,7 @@ LArCollisionTimeMonTool::bookHistograms() {
 StatusCode 
 LArCollisionTimeMonTool::fillHistograms()
 {
-  msg(MSG::DEBUG) << "in fillHists()" << endmsg;
+  ATH_MSG_DEBUG( "in fillHists()" );
   
   // Increment event counter
   m_eventsCounter++;
@@ -231,7 +231,7 @@ LArCollisionTimeMonTool::fillHistograms()
   unsigned lumi_block        = 0;
   //double event_time_minutes = -1;
   if (evtStore()->retrieve( event_info ).isFailure()) {
-    msg(MSG::ERROR) << "Failed to retrieve EventInfo object" << endmsg;
+    ATH_MSG_ERROR( "Failed to retrieve EventInfo object" );
     return StatusCode::FAILURE;
   }
 
@@ -242,8 +242,8 @@ LArCollisionTimeMonTool::fillHistograms()
   lumi_block = event_info->lumiBlock();
     
   if(m_bunchGroupTool->bcType(bunch_crossing_id) == Trig::IBunchCrossingTool::Empty) {
-     //msg(MSG::INFO) <<"BCID: "<<bunch_crossing_id<<" empty, not filling CollTime" <<endmsg;
-     msg(MSG::INFO) <<"BCID: "<<bunch_crossing_id<<" empty ? not filling the coll. time" <<endmsg;
+     //ATH_MSG_INFO("BCID: "<<bunch_crossing_id<<" empty, not filling CollTime" );
+     ATH_MSG_INFO("BCID: "<<bunch_crossing_id<<" empty ? not filling the coll. time" );
      return StatusCode::SUCCESS; // not filling anything in empty bunches
   }
 
@@ -253,10 +253,10 @@ LArCollisionTimeMonTool::fillHistograms()
   const LArCollisionTime * larTime;
   if(evtStore()->retrieve(larTime,m_key).isFailure())
   {
-    msg(MSG::WARNING) << "Unable to retrieve LArCollisionTime event store" << endmsg;
+    ATH_MSG_WARNING( "Unable to retrieve LArCollisionTime event store" );
     return StatusCode::SUCCESS; // Check if failure shd be returned. VB
   } else {
-    msg(MSG::DEBUG) << "LArCollisionTime successfully retrieved from event store" << endmsg;
+    ATH_MSG_DEBUG( "LArCollisionTime successfully retrieved from event store" );
   }
 
   if (larTime and !(event_info->isEventFlagBitSet(xAOD::EventInfo::LAr,3))) {// Do not fill histo if noise burst suspected
@@ -276,7 +276,7 @@ LArCollisionTimeMonTool::fillHistograms()
       if ( fabs(m_ECTimeDiff) < 10 ) m_LArCollTime_lb_timeCut_h[0]->Fill(lumi_block);
       if ( fabs(m_ECTimeDiff) > 20 && fabs(m_ECTimeDiff) < 30 ) m_LArCollTime_lb_singlebeam_timeCut_h[0]->Fill(lumi_block);
       if(m_IsOnline && bcid_distance > m_distance) { // fill histos inside the train
-        msg(MSG::INFO) <<"BCID: "<<bunch_crossing_id<<" distance from Front: "<<bcid_distance<<"Filling in train..."<<endmsg;    
+        ATH_MSG_INFO("BCID: "<<bunch_crossing_id<<" distance from Front: "<<bcid_distance<<"Filling in train...");    
         m_LArCollTime_h[1]->Fill(m_ECTimeDiff,weight);
         m_LArCollTime_lb_h[1]->Fill(m_ECTimeDiff,weight);
         m_LArCollTime_vs_LB_h[1]->Fill(lumi_block, m_ECTimeDiff,weight);
@@ -302,7 +302,7 @@ StatusCode LArCollisionTimeMonTool::procHistograms()
     for(unsigned i=0; i<m_nhist; ++i) m_LArCollTime_lb_h[i]->Reset();
   }
   
-  msg(MSG::DEBUG) << "End of procHistograms " << endmsg;
+  ATH_MSG_DEBUG( "End of procHistograms " );
   return StatusCode::SUCCESS;
 }
 
diff --git a/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx
index aee3be14e8f2a0c684a710bccffc346e37f46cf6..41e1939eee4be53defe74e1cb4b5ae6c70c0fc92 100755
--- a/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArCosmicsMonTool.cxx
@@ -106,19 +106,19 @@ LArCosmicsMonTool::~LArCosmicsMonTool()
 StatusCode 
 LArCosmicsMonTool::initialize()
 {
-  msg(MSG::INFO) << "Initialize LArCosmicsMonTool" << endmsg;
+  ATH_MSG_INFO( "Initialize LArCosmicsMonTool" );
   StatusCode sc;
   
   sc = detStore()->retrieve(m_LArOnlineIDHelper, "LArOnlineID");
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not get LArOnlineIDHelper" << endmsg;
+    ATH_MSG_FATAL( "Could not get LArOnlineIDHelper" );
     return sc;
   }
   
   // Retrieve ID helpers
   sc =  detStore()->retrieve( m_caloIdMgr );
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not get CaloIdMgr" << endmsg;
+    ATH_MSG_FATAL( "Could not get CaloIdMgr" );
     return sc;
   }
   m_LArEM_IDHelper   = m_caloIdMgr->getEM_ID();
@@ -128,7 +128,7 @@ LArCosmicsMonTool::initialize()
   // CaloDetDescrMgr gives "detector description", including real positions of cells
   sc = detStore()->retrieve(m_CaloDetDescrMgr);
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not get CaloDetDescrMgr "<< endmsg;
+    ATH_MSG_FATAL( "Could not get CaloDetDescrMgr ");
     return sc;
   }
   
@@ -136,19 +136,19 @@ LArCosmicsMonTool::initialize()
   // Get LAr Cabling Service
   sc=m_larCablingService.retrieve();
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not retrieve LArCablingService" << endmsg;
+    ATH_MSG_ERROR( "Could not retrieve LArCablingService" );
     return StatusCode::FAILURE;
   }
   
   // initialize monitoring bookkeeping info
   sc = this->initMonInfo();
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not initialize monitoring bookkeeping info" << endmsg;
+    ATH_MSG_ERROR( "Could not initialize monitoring bookkeeping info" );
   }
   
   // End Initialize
   ManagedMonitorToolBase::initialize().ignore();
-  msg(MSG::DEBUG) << "Successful Initialize LArCosmicsMonTool " << endmsg;
+  ATH_MSG_DEBUG( "Successful Initialize LArCosmicsMonTool " );
   return StatusCode::SUCCESS;
 }
 
@@ -156,7 +156,7 @@ LArCosmicsMonTool::initialize()
 StatusCode 
 LArCosmicsMonTool::bookHistograms() {
 
-  msg(MSG::DEBUG) << "in bookHists()" << endmsg;
+  ATH_MSG_DEBUG( "in bookHists()" );
   
   //  if(isNewRun ){// Commented by B.Trocme to comply with new ManagedMonitorToolBase
     m_newrun=true;
@@ -248,7 +248,7 @@ LArCosmicsMonTool::bookHistograms() {
 /*---------------------------------------------------------*/
 StatusCode 
 LArCosmicsMonTool::fillHistograms() {
-  msg(MSG::DEBUG) << "in fillHists()" << endmsg;
+  ATH_MSG_DEBUG( "in fillHists()" );
   StatusCode sc;
   
   // Increment event counter
@@ -265,8 +265,8 @@ LArCosmicsMonTool::fillHistograms() {
   const LArDigitContainer* pLArDigitContainer;
   sc = evtStore()->retrieve(pLArDigitContainer, m_LArDigitContainerKey);
   if (sc.isFailure()) {
-    msg(MSG::WARNING) << "Can\'t retrieve LArDigitContainer with key " 
-		      << m_LArDigitContainerKey << endmsg;
+    ATH_MSG_WARNING( "Can\'t retrieve LArDigitContainer with key " 
+		      << m_LArDigitContainerKey );
     return StatusCode::SUCCESS;
   }
   
@@ -274,7 +274,7 @@ LArCosmicsMonTool::fillHistograms() {
   if(m_newrun) {
     sc=detStore()->retrieve(m_larPedestal,m_larPedestalKey);
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Cannot retrieve pedestal(s) from Conditions Store!" << endmsg;
+      ATH_MSG_ERROR( "Cannot retrieve pedestal(s) from Conditions Store!" );
     }  
     m_newrun=false;
   }
@@ -295,7 +295,7 @@ LArCosmicsMonTool::fillHistograms() {
     float eta = 0; float phi = 0;
     sc = returnEtaPhiCoord(offlineID, eta, phi);
     if(sc.isFailure()) {
-      msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates" << endmsg;
+      ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates" );
       continue;
     } 
     
@@ -426,20 +426,20 @@ LArCosmicsMonTool::fillHistograms() {
 StatusCode LArCosmicsMonTool::procHistograms()
 {
     
-  msg(MSG::DEBUG) << "End of procHistograms " << endmsg;
+  ATH_MSG_DEBUG( "End of procHistograms " );
   return StatusCode::SUCCESS;
 }
 /*---------------------------------------------------------*/
 StatusCode LArCosmicsMonTool::initMonInfo()  
 {
-  msg(MSG::DEBUG) << "in initMonInfo()" << endmsg;
+  ATH_MSG_DEBUG( "in initMonInfo()" );
   
   std::vector<CaloGain::CaloGain> gains;
   gains.push_back(CaloGain::LARHIGHGAIN);
   gains.push_back(CaloGain::LARMEDIUMGAIN);
   gains.push_back(CaloGain::LARLOWGAIN); 
   
-  msg(MSG::DEBUG) << "Init Monitoring ended successfully " << endmsg;
+  ATH_MSG_DEBUG( "Init Monitoring ended successfully " );
   return StatusCode::SUCCESS;
 }
 
diff --git a/LArCalorimeter/LArMonTools/src/LArCoverage.cxx b/LArCalorimeter/LArMonTools/src/LArCoverage.cxx
index 10d9eb0562ccbdb9f451c31306482fdd7df4dfd2..5d6309f4549e67fef96f70f67b13a9fa30096b3a 100755
--- a/LArCalorimeter/LArMonTools/src/LArCoverage.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArCoverage.cxx
@@ -103,19 +103,19 @@ LArCoverage::~LArCoverage()
 StatusCode 
 LArCoverage::initialize()
 {
-  msg(MSG::INFO) << "Initialize LArCoverage" << endmsg;
+  ATH_MSG_INFO( "Initialize LArCoverage" );
   StatusCode sc;
 
   sc = detStore()->retrieve(m_LArOnlineIDHelper, "LArOnlineID");
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not get LArOnlineIDHelper" << endmsg;
+    ATH_MSG_FATAL( "Could not get LArOnlineIDHelper" );
     return sc;
   }
   
   // Retrieve ID helpers
   sc =  detStore()->retrieve( m_caloIdMgr );
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not get CaloIdMgr" << endmsg;
+    ATH_MSG_FATAL( "Could not get CaloIdMgr" );
     return sc;
   }
   m_LArEM_IDHelper   = m_caloIdMgr->getEM_ID();
@@ -125,30 +125,30 @@ LArCoverage::initialize()
   // CaloDetDescrMgr gives "detector description", including real positions of cells
   sc = detStore()->retrieve(m_CaloDetDescrMgr);
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not get CaloDetDescrMgr "<< endmsg;
+    ATH_MSG_FATAL( "Could not get CaloDetDescrMgr ");
     return sc;
   }
 
   // Get BadChannelTool
   sc=m_badChannelTool.retrieve();
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not retrieve LArBadChannelTool " << m_badChannelTool << endmsg;
+    ATH_MSG_ERROR( "Could not retrieve LArBadChannelTool " << m_badChannelTool );
     return StatusCode::FAILURE;
   } else {
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "LArBadChannelTool" << m_badChannelTool << " retrieved" << endmsg;
+    ATH_MSG_DEBUG( "LArBadChannelTool" << m_badChannelTool << " retrieved" );
   }
 
   // Get bad-channel mask
   sc=m_badChannelMask.retrieve();
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not retrieve BadChannelMask" << m_badChannelMask<< endmsg;
+    ATH_MSG_ERROR( "Could not retrieve BadChannelMask" << m_badChannelMask);
     return StatusCode::FAILURE;
   }
    
   // Get LAr Cabling Service
   sc=m_larCablingService.retrieve();
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not retrieve LArCablingService" << endmsg;
+    ATH_MSG_ERROR( "Could not retrieve LArCablingService" );
     return StatusCode::FAILURE;
   }
    
@@ -158,15 +158,15 @@ LArCoverage::initialize()
 
   // Get CaloNoiseTool
   if ( m_caloNoiseTool.retrieve().isFailure() ) {
-    msg(MSG::FATAL) << "Failed to retrieve tool " << m_caloNoiseTool << endmsg;
+    ATH_MSG_FATAL( "Failed to retrieve tool " << m_caloNoiseTool );
     return StatusCode::FAILURE;
   } else {
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Retrieved tool " << m_caloNoiseTool << endmsg;
+    ATH_MSG_DEBUG( "Retrieved tool " << m_caloNoiseTool );
   }
 
   // End Initialize
   ManagedMonitorToolBase::initialize().ignore();
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Successful Initialize LArCoverage " << endmsg;
+  ATH_MSG_DEBUG( "Successful Initialize LArCoverage " );
   return StatusCode::SUCCESS;
 }
 
@@ -174,14 +174,14 @@ LArCoverage::initialize()
 StatusCode 
 LArCoverage::bookHistograms()
 {
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in bookHists()" << endmsg;
+  ATH_MSG_DEBUG( "in bookHists()" );
 
   //  if(isNewRun ){// Commented by B.Trocme to comply with new ManagedMonitorToolBase
 
   const xAOD::EventInfo* thisEventInfo;
     uint32_t lb1 = 0;
     if ((evtStore()->retrieve(thisEventInfo))!=StatusCode::SUCCESS)
-      msg(MSG::WARNING) << "No EventInfo object found! Can't read run number!" << endmsg;
+      ATH_MSG_WARNING( "No EventInfo object found! Can't read run number!" );
     else{
       lb1 = thisEventInfo->lumiBlock();
     }
@@ -294,7 +294,7 @@ LArCoverage::bookHistograms()
       phiEMEndcap[it]= new float[nbinsphiEMEndcap[it]+1];
 
     // Sampling 0 
-    for(int ibin=0;ibin<=64;ibin++) phiEMEndcap[0][ibin] = -TMath::Pi()+ ibin*2*TMath::Pi()/64;
+    for(int ibin=0;ibin<=64;ibin++) phiEMEndcap[0][ibin] = -TMath::Pi()+ ibin*(2*M_PI/64);
     for(int ibin=0;ibin<=12;ibin++) etaEMEndcapA[0][ibin] = 1.5+ibin*0.025; 
     for(int ibin=0;ibin<=12;ibin++) etaEMEndcapC[0][ibin] = -(1.5+ibin*0.025); 
     sort(etaEMEndcapC[0],etaEMEndcapC[0]+nbinsetaEMEndcap[0]+1);
@@ -595,7 +595,7 @@ LArCoverage::bookHistograms()
 StatusCode 
 LArCoverage::fillHistograms()
 {
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in fillHists()" << endmsg;
+  ATH_MSG_DEBUG( "in fillHists()" );
 
   m_eventsCounter++;
 
@@ -605,7 +605,7 @@ LArCoverage::fillHistograms()
   const LArRawChannelContainer* pRawChannelsContainer;
   StatusCode sc = evtStore()->retrieve(pRawChannelsContainer, m_channelKey);
   if(sc.isFailure()) {
-    msg(MSG::WARNING) << "Can\'t retrieve LArRawChannelContainer with key " << m_channelKey <<endmsg;
+    ATH_MSG_WARNING( "Can\'t retrieve LArRawChannelContainer with key " << m_channelKey );
     return StatusCode::SUCCESS;
   }
 
@@ -633,7 +633,7 @@ LArCoverage::fillHistograms()
     float etaChan = 0; float phiChan = 0.;
     const CaloDetDescrElement* caloDetElement = m_CaloDetDescrMgr->get_element(offlineID);
     if(caloDetElement == 0 ){
-      msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg;
+      ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" );
       continue; 
     }else{
       etaChan = caloDetElement->eta_raw();
@@ -823,7 +823,7 @@ LArCoverage::fillHistograms()
 StatusCode LArCoverage::procHistograms()
 {
 
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In procHistograms " << endmsg;
+  ATH_MSG_DEBUG( "In procHistograms " );
 
   return StatusCode::SUCCESS;
 
@@ -905,7 +905,7 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* caloDetDescrMg
           float eta, phi;
 	  const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid);
 	  if(caloDetElement == 0 ){
-	    msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg;
+	    ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" );
 	    continue; 
 	  }else{
 	    eta = caloDetElement->eta_raw();
@@ -937,7 +937,7 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* caloDetDescrMg
           float eta, phi;
 	  const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid);
 	  if(caloDetElement == 0 ){
-	    msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg;
+	    ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" );
 	    continue; 
 	  }else{
 	    eta = caloDetElement->eta_raw();
@@ -974,7 +974,7 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* caloDetDescrMg
 	    float eta, phi;
 	    const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid);
 	    if(caloDetElement == 0 ){
-	      msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg;
+	      ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" );
 	      continue; 
 	    }else{
 	      eta = caloDetElement->eta_raw();
@@ -1006,7 +1006,7 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* caloDetDescrMg
 	    float eta, phi;
 	    const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid);
 	    if(caloDetElement == 0 ){
-	      msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg;
+	      ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" );
 	      continue; 
 	    }else{
 	      eta = caloDetElement->eta_raw();
@@ -1072,7 +1072,7 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* caloDetDescrMg
 	    float eta, phi;
 	    const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid);
 	    if(caloDetElement == 0 ){
-	      msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg;
+	      ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" );
 	      continue; 
 	    }else{
 	      eta = caloDetElement->eta_raw();
@@ -1104,7 +1104,7 @@ void LArCoverage::FillKnownMissingFEBs(const CaloDetDescrManager* caloDetDescrMg
 	    float eta, phi;
 	    const CaloDetDescrElement* caloDetElement = caloDetDescrMgr->get_element(offid);
 	    if(caloDetElement == 0 ){
-	      msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg;
+	      ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" );
 	      continue; 
 	    }else{
 	      eta = caloDetElement->eta_raw();
diff --git a/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx b/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx
index b0c4617bef2acc90cbaa90773c0119361bd2e904..b75ce93be91980597b90bace685f2aaeb0684da3 100755
--- a/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx
@@ -126,7 +126,7 @@ LArDigitMon::~LArDigitMon()
 StatusCode 
 LArDigitMon::finalize()
 {
-  msg(MSG::INFO)<<"Finalize LArDigitMon" << endmsg;
+  ATH_MSG_INFO( "finalHists LArDigitMon" );
   DeleteHist(m_BarrelA);
   DeleteHist(m_BarrelC);
   DeleteHist(m_EmecA);
@@ -145,7 +145,7 @@ StatusCode
 LArDigitMon::initialize()
 {
   
-  msg(MSG::INFO)<<"Initialize LArDigitMon" << endmsg;
+  ATH_MSG_INFO( "Initialize LArDigitMon" );
   
   StatusCode sc;
   
@@ -156,7 +156,7 @@ LArDigitMon::initialize()
     
   } else {
     
-    msg(MSG::FATAL) << "unable to connect non-tool: LArOnlineID" << endmsg;
+    ATH_MSG_FATAL( "unable to connect non-tool: LArOnlineID" );
     return StatusCode::FAILURE;
     
   }
@@ -169,7 +169,7 @@ LArDigitMon::initialize()
     
   } else {
     
-    msg(MSG::FATAL) << "unable to connect non-tool: LArEM_ID" << endmsg;
+    ATH_MSG_FATAL( "unable to connect non-tool: LArEM_ID" );
     return StatusCode::FAILURE;
     
   }
@@ -178,7 +178,7 @@ LArDigitMon::initialize()
   /** Get LAr Calbling Service*/
   sc=m_LArCablingService.retrieve();
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not retrieve LArCablingService" << endmsg;
+    ATH_MSG_ERROR( "Could not retrieve LArCablingService" );
     return StatusCode::FAILURE;
   }
   
@@ -186,7 +186,7 @@ LArDigitMon::initialize()
   if (m_ignoreKnownBadChannels) { 
     sc=m_badChannelMask.retrieve();
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Could not retrieve BadChannelMask" << m_badChannelMask<< endmsg;
+      ATH_MSG_ERROR( "Could not retrieve BadChannelMask" << m_badChannelMask);
       return StatusCode::FAILURE;
     }
   }
@@ -194,7 +194,7 @@ LArDigitMon::initialize()
   /** Retrieve pedestals container*/
   sc =  detStore()->regHandle(m_larPedestal,m_larPedestalKey);
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "could not register handle for pedestal " << endmsg;
+    ATH_MSG_ERROR( "could not register handle for pedestal " );
     return StatusCode::FAILURE;
   }
   
@@ -299,7 +299,7 @@ LArDigitMon::fillHistograms()
   StatusCode sc = evtStore()->retrieve(noisyRO,"LArNoisyROSummary");
   if (sc.isFailure()) 
   {
-    msg(MSG::WARNING) << "Can't retrieve LArNoisyROSummary " <<endmsg;
+    ATH_MSG_WARNING( "Can't retrieve LArNoisyROSummary " );
     return StatusCode::SUCCESS;
   }
   const std::vector<HWIdentifier>& noisyFEB = noisyRO->get_noisy_febs();
@@ -313,7 +313,7 @@ LArDigitMon::fillHistograms()
   //  unsigned long run=0;
   const xAOD::EventInfo* thisEvent;
   if (evtStore()->retrieve(thisEvent).isFailure()) {
-    msg(MSG::ERROR) << "Failed to retrieve EventInfo object" << endmsg;
+    ATH_MSG_ERROR( "Failed to retrieve EventInfo object" );
     return StatusCode::FAILURE;
   }
   
@@ -329,8 +329,8 @@ LArDigitMon::fillHistograms()
   const LArDigitContainer* pLArDigitContainer;
   sc = evtStore()->retrieve(pLArDigitContainer, m_LArDigitContainerKey);
   if (sc.isFailure()) {
-    msg(MSG::WARNING) << "Can\'t retrieve LArDigitContainer with key " 
-		      << m_LArDigitContainerKey << endmsg;
+    ATH_MSG_WARNING( "Can\'t retrieve LArDigitContainer with key " 
+		      << m_LArDigitContainerKey );
     return StatusCode::SUCCESS;
   }
   
diff --git a/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx b/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx
index b04ccd380769c3f7972ae5445da05f847a204c85..6caba898191b6114251ef715a2c7ac612c3661d0 100755
--- a/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArFEBMon.cxx
@@ -135,11 +135,11 @@ LArFEBMon::~LArFEBMon() {
 // ********************************************************************
 StatusCode LArFEBMon::initialize() {
   
-  msg(MSG::INFO) << "Initializing LArFEBMon " << endmsg;
+  ATH_MSG_INFO( "Initializing LArFEBMon " );
   
   StatusCode sc = detStore()->retrieve(m_onlineHelper, "LArOnlineID");
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not get LArOnlineID helper !" << endmsg;
+    ATH_MSG_ERROR( "Could not get LArOnlineID helper !" );
     return StatusCode::FAILURE;
   }
   
@@ -149,10 +149,10 @@ StatusCode LArFEBMon::initialize() {
   // Get BadChannelTool
   sc=m_badChannelTool.retrieve();
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not retrieve LArBadChannelTool " << m_badChannelTool << endmsg;
+    ATH_MSG_ERROR( "Could not retrieve LArBadChannelTool " << m_badChannelTool );
     return StatusCode::FAILURE;
   } else {
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "LArBadChannelTool" << m_badChannelTool << " retrieved" << endmsg;
+    ATH_MSG_DEBUG( "LArBadChannelTool" << m_badChannelTool << " retrieved" );
   }
 
   ManagedMonitorToolBase::initialize().ignore(); 
@@ -332,11 +332,11 @@ StatusCode LArFEBMon::bookHistograms() {
        const Trig::ChainGroup* allL1 = m_trigDec->getChainGroup("L1_.*");
        std::vector<std::string> l1triggers = allL1->getListOfTriggers();
         
-       msg(MSG::INFO ) << "lvl1 item names: [";
+       ATH_MSG_INFO( "lvl1 item names: [" );
        for (unsigned int i=0;i< l1triggers.size();i++) {
-            msg(MSG::INFO) << i << " " << l1triggers.at(i) << " , " << endmsg;
+            ATH_MSG_INFO( i << " " << l1triggers.at(i) << " , " );
        }
-       msg(MSG::INFO)<< "] " << endmsg;
+       ATH_MSG_INFO( "] " );
 
     if (l1triggers.size()>0) {m_trigok=true;} else {m_trigok=false;}
     }
@@ -350,10 +350,10 @@ StatusCode LArFEBMon::bookHistograms() {
     summaryGroup.regTree(m_CorruptTree).ignore();
     //  }
   
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "done with bookHists()" << endmsg;
+  ATH_MSG_DEBUG( "done with bookHists()" );
   
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Bookhists failed" << endmsg;
+    ATH_MSG_ERROR( "Bookhists failed" );
   }
   
   return sc;
@@ -377,7 +377,7 @@ StatusCode LArFEBMon::fillHistograms() {
   const xAOD::EventInfo* thisEvent=0;
 
   if(evtStore()->retrieve(thisEvent).isFailure()) {
-    msg(MSG::ERROR) << "Failed to retrieve EventInfo object" << endmsg;
+    ATH_MSG_WARNING( "Failed to retrieve EventInfo object" );
     return StatusCode::FAILURE;
   }
 
@@ -390,24 +390,24 @@ StatusCode LArFEBMon::fillHistograms() {
   unsigned lumi_block = thisEvent->lumiBlock();
   bool lar_inerror = (thisEvent->errorState(xAOD::EventInfo::LAr)==xAOD::EventInfo::Error) ? true : false;
   
-  //msg(MSG::INFO) << "LArFEBMon Lumi block: "<<lumi_block<<endmsg;
+  //ATH_MSG_INFO( "LArFEBMon Lumi block: "<<lumi_block);
 
   const LArFebHeaderContainer* hdrCont;
   const LArFebErrorSummary* lArFebErrorSummary;
   StatusCode sc = evtStore()->retrieve(hdrCont);
   if (sc.isFailure() || !hdrCont) {
-    msg(MSG::WARNING) << "No LArFebHeaderContainer found in TDS" << endmsg; 
+    ATH_MSG_WARNING( "No LArFebHeaderContainer found in TDS" ); 
     return sc;
   }
   
   if (hdrCont->size()==0) {
-    msg(MSG::ERROR) << "Got empty LArFebHeaderContainer. Do nothing" << std::endl;
+    ATH_MSG_WARNING( "Got empty LArFebHeaderContainer. Do nothing" );
     return StatusCode::FAILURE;
   }
 
   sc=evtStore()->retrieve( lArFebErrorSummary, "LArFebErrorSummary");
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "No LArFebErrorSummary found in TDS" << endmsg;
+    ATH_MSG_WARNING( "No LArFebErrorSummary found in TDS" );
     return StatusCode::FAILURE;
   }
   
@@ -424,8 +424,8 @@ StatusCode LArFEBMon::fillHistograms() {
 	const LArDSPThresholdsComplete* dspThresh=0;
 	sc=detStore()->retrieve(dspThresh,m_keyDSPThresholds);
 	if(!sc.isSuccess()) {
-	  msg(MSG::ERROR) <<" Failed to retrieve LArDSPThresholds with key " << m_keyDSPThresholds 
-			  << ". Will not fill histograms" << endmsg;
+	  ATH_MSG_WARNING(" Failed to retrieve LArDSPThresholds with key " << m_keyDSPThresholds 
+			  << ". Will not fill histograms" );
 	}
 	else {
 	  auto chIt=m_onlineHelper->channel_begin();
@@ -442,14 +442,14 @@ StatusCode LArFEBMon::fillHistograms() {
 	const AthenaAttributeList* dspThrshAttr=0; 
 	sc=detStore()->retrieve(dspThrshAttr,m_keyDSPThresholds);
 	if (sc.isFailure()) {
-	  msg(MSG::ERROR) << "Failed to retrieve AttributeList with key (folder) " << m_keyDSPThresholds 
-			  << ", containing DSP Thresholds. Will not fill histograms." << endmsg;
+	  ATH_MSG_WARNING( "Failed to retrieve AttributeList with key (folder) " << m_keyDSPThresholds 
+			  << ", containing DSP Thresholds. Will not fill histograms." );
 	}
 	else {
 	  const LArDSPThresholdsFlat* dspThreshFlat=new LArDSPThresholdsFlat(dspThrshAttr);
 	  if (!dspThreshFlat->good()) {
-	    msg(MSG::ERROR) << "Failed to initialize LArDSPThresholdFlat from attribute list loaded from " << m_keyDSPThresholds
-			    << ". Will not fill histograms." << endmsg; 
+	    ATH_MSG_WARNING( "Failed to initialize LArDSPThresholdFlat from attribute list loaded from " << m_keyDSPThresholds
+			    << ". Will not fill histograms." ); 
 	  }//end if not good
 	  const IdentifierHash chanMax=m_onlineHelper->channelHashMax();
 	  for (unsigned iChan=0;iChan<chanMax;++iChan) {
@@ -462,7 +462,7 @@ StatusCode LArFEBMon::fillHistograms() {
       }// else run 2
     }// end load DSP thresholds from DB
     else 
-      msg(MSG::WARNING) << "No LArDSPThresholds key specificed. Will not fill these histograms" << endmsg;
+      ATH_MSG_WARNING( "No LArDSPThresholds key specificed. Will not fill these histograms" );
   }//end if eventsCounter==1
 
 
@@ -682,7 +682,7 @@ StatusCode LArFEBMon::fillHistograms() {
   // If the nb of DSP headers is lower than the maximum, this means that there are some missing FEBs, probably
   // due to missing ROS fragment
   // This assumes that the maximum of DSP headers found is the expected one
-  //  msg(MSG::ERROR) << "ICI" << nbOfFeb << " " << m_nbOfFebBlocksTotal->GetBinLowEdge(m_nbOfFebBlocksTotal->GetMaximumBin()) << endmsg;
+  //  ATH_MSG_ERROR( "ICI" << nbOfFeb << " " << m_nbOfFebBlocksTotal->GetBinLowEdge(m_nbOfFebBlocksTotal->GetMaximumBin()) );
   
   if (nbOfFebOK(nbOfFeb,m_nbOfFebBlocksTotal)){
     // The nb of readout FEB is lower than the maximum number of FEBs observed in this run
@@ -913,7 +913,7 @@ void LArFEBMon::fillErrorsSummary(summaryPartition& summ,int partitNb_2,int ft,i
 //********************************************************************
 StatusCode LArFEBMon::bookNewPartitionSumm(summaryPartition& summ,std::string summName)
 {
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In bookNewPartitionSumm ->" << summName << endmsg;
+  ATH_MSG_DEBUG( "In bookNewPartitionSumm ->" << summName );
   
   MonGroup perPartitionGroup( this, "/LAr/FEBMon/perPartition", run, ATTRIB_MANAGED );
   MonGroup perPartitionYieldGroup( this, "/LAr/FEBMon/perPartition", run, ATTRIB_MANAGED, "" , "weightedEff" );
@@ -1093,7 +1093,7 @@ StatusCode LArFEBMon::bookNewPartitionSumm(summaryPartition& summ,std::string su
     sc = sc && perPartitionDataGroup.regHist(summ.m_rejectedLBProfilePart);
     
     if (sc.isFailure()) {
-      msg(MSG::FATAL) << "Unable to book partitions histograms" << endmsg;
+      ATH_MSG_FATAL( "Unable to book partitions histograms" );
     } 
   } 
   return sc;
@@ -1189,7 +1189,7 @@ LArFEBMon::plotMaskedFEB(){
 void 
 LArFEBMon::fillFebInError(const summaryPartition& summ,int errorType,int barrel_ec,int pos_neg,std::string summName)
 {
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In fillFebInError" << endmsg;
+  ATH_MSG_DEBUG( "In fillFebInError" );
   
   //  TH2I* tempHisto = TH2I_LW::create(*summ.parity);
   
@@ -1271,7 +1271,7 @@ LArFEBMon::fillFebInError(const summaryPartition& summ,int errorType,int barrel_
 	  (m_febInError[hashId]->GetYaxis())->SetTitle("Number of errors");
 	  
 	  StatusCode sc = generalGroup.regHist(m_febInError[hashId]);
-	  if (sc.isFailure()) msg(MSG::ERROR) << "Failed to register Feb histogram!" << endmsg;
+	  if (sc.isFailure()) ATH_MSG_ERROR( "Failed to register Feb histogram!" );
 	  else m_bfebIE[hashId] = true;
 	}
 	m_febInError[hashId]->SetBinContent(errorType,binContent);
@@ -1291,7 +1291,7 @@ void LArFEBMon::fillYieldHistos(TH2I_LW* summaryHisto,TH2F_LW* statusHisto)
 // Compute the yield of odd events in error per FEB
 // The number of events in error is stored in summaryHisto and the yield is stored in statusHisto
 {
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in fillYieldHistos() - " << m_eventsCounter << endmsg;
+  ATH_MSG_DEBUG( "in fillYieldHistos() - " << m_eventsCounter );
   
   if (m_eventsCounter != 0){
     for (unsigned int ix=1;ix<=summaryHisto->GetNbinsX();ix++){
diff --git a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx
index 3160a837e56dbe72f7d33c9bf614f64a0d0c1bdd..7781f4885d98bc7d8f80b8da1a6b65c7c1a8a104 100644
--- a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx
@@ -85,33 +85,33 @@ LArHVCorrectionMonTool::~LArHVCorrectionMonTool()
 StatusCode LArHVCorrectionMonTool::initialize()
 {
   
-  msg(MSG::INFO) << "Initialize LArHVCorrectionMonTool" << endmsg;
+  ATH_MSG_INFO( "Initialize LArHVCorrectionMonTool" );
   StatusCode sc;
   
   sc = detStore()->retrieve(m_LArOnlineIDHelper, "LArOnlineID");
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not get LArOnlineIDHelper" << endmsg;
+    ATH_MSG_FATAL( "Could not get LArOnlineIDHelper" );
     return sc;
   }
   
   // Retrieve HVCorrTool 
   sc = m_hvCorrTool.retrieve();
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Unable to find tool for LArHVCorrTool" << endmsg;
+    ATH_MSG_ERROR( "Unable to find tool for LArHVCorrTool" );
     return StatusCode::FAILURE;
   }
   
   // Retrieve HV Correction reference
   sc = detStore()->regHandle(m_dd_HVScaleCorr,m_keyHVScaleCorr);
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Unable to register handle to HVScaleCorr " << endmsg;
+    ATH_MSG_ERROR( "Unable to register handle to HVScaleCorr " );
     return StatusCode::FAILURE;
   }
   
   // Retrieve ID helpers
   sc =  detStore()->retrieve( m_caloIdMgr );
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not get CaloIdMgr" << endmsg;
+    ATH_MSG_FATAL( "Could not get CaloIdMgr" );
     return sc;
   }
   m_LArEM_IDHelper   = m_caloIdMgr->getEM_ID();
@@ -121,14 +121,14 @@ StatusCode LArHVCorrectionMonTool::initialize()
   // CaloDetDescrMgr gives "detector description", including real positions of cells
   sc = detStore()->retrieve(m_CaloDetDescrMgr);
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not get CaloDetDescrMgr "<< endmsg;
+    ATH_MSG_FATAL( "Could not get CaloDetDescrMgr ");
     return sc;
   }
   
   // Get LAr Cabling Service
   sc=m_larCablingService.retrieve();
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not retrieve LArCablingService" << endmsg;
+    ATH_MSG_ERROR( "Could not retrieve LArCablingService" );
     return StatusCode::FAILURE;
   }
   
@@ -138,7 +138,7 @@ StatusCode LArHVCorrectionMonTool::initialize()
   
   // End Initialize
   ManagedMonitorToolBase::initialize().ignore();
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Successful Initialize LArHVCorrection " << endmsg;
+  ATH_MSG_DEBUG( "Successful Initialize LArHVCorrection " );
   return StatusCode::SUCCESS;
 }
 
@@ -146,7 +146,7 @@ StatusCode LArHVCorrectionMonTool::initialize()
 StatusCode 
 LArHVCorrectionMonTool::bookHistograms()
 {
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in bookHists()" << endmsg;
+  ATH_MSG_DEBUG( "in bookHists()" );
   
   //  if(isNewRun){
     
@@ -274,7 +274,7 @@ LArHVCorrectionMonTool::bookHistograms()
 StatusCode 
 LArHVCorrectionMonTool::fillHistograms()
 {
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in fillHists()" << endmsg;
+  ATH_MSG_DEBUG( "in fillHists()" );
   
   m_eventsCounter++;
   
@@ -283,7 +283,7 @@ LArHVCorrectionMonTool::fillHistograms()
     // Retrieve event information
     const xAOD::EventInfo* thisEventInfo;
     if (evtStore()->retrieve(thisEventInfo).isFailure()) {
-      msg(MSG::ERROR) << "Failed to retrieve EventInfo object" << endmsg;
+      ATH_MSG_ERROR( "Failed to retrieve EventInfo object" );
       return StatusCode::FAILURE;
     }
     //const DataHandle<EventInfo> event_info;
@@ -298,7 +298,7 @@ LArHVCorrectionMonTool::fillHistograms()
     const LArRawChannelContainer* pRawChannelsContainer;
     StatusCode sc = evtStore()->retrieve(pRawChannelsContainer, m_channelKey);
     if(sc.isFailure()) {
-      msg(MSG::WARNING) << "Can't retrieve LArRawChannelContainer with key " << m_channelKey <<endmsg;
+      ATH_MSG_WARNING( "Can't retrieve LArRawChannelContainer with key " << m_channelKey );
       return StatusCode::SUCCESS;
     }
     
@@ -320,7 +320,7 @@ LArHVCorrectionMonTool::fillHistograms()
       float etaChan = 0; float phiChan = 0.;
       const CaloDetDescrElement* caloDetElement = m_CaloDetDescrMgr->get_element(offlineID);
       if(caloDetElement == 0 ){
-	msg(MSG::ERROR) << "Cannot retrieve (eta,phi) coordinates for raw channels" << endmsg;
+	ATH_MSG_ERROR( "Cannot retrieve (eta,phi) coordinates for raw channels" );
 	continue; 
       }else{
 	etaChan = caloDetElement->eta_raw();
@@ -333,13 +333,13 @@ LArHVCorrectionMonTool::fillHistograms()
       // Retrieve HV correction info
       float hvdev = 0;
       float hvcorr = m_hvCorrTool->Scale(offlineID);
-      //msg(MSG::VERBOSE) << "hvcorr" << hvcorr << endmsg;
+      //ATH_MSG_VERBOSE( "hvcorr" << hvcorr );
       float hvonline = m_dd_HVScaleCorr->HVScaleCorr(offlineID);
       if (hvonline<=0) continue; //No valid online correction
-      //msg(MSG::VERBOSE) << "hvonline" << hvonline << endmsg;
+      //ATH_MSG_VERBOSE( "hvonline" << hvonline );
       if (hvcorr>hvonline) hvdev = hvonline-hvcorr; //Monitor only channels that get a higher correction from DCS (eg are at a lower voltage). 
 
-      //msg(MSG::VERBOSE) << "hvdev" << hvdev << endmsg;
+      //ATH_MSG_VERBOSE( "hvdev" << hvdev );
       
     if (fabs(hvdev/hvonline)> m_threshold){
 	
@@ -408,7 +408,7 @@ LArHVCorrectionMonTool::fillHistograms()
 StatusCode LArHVCorrectionMonTool::procHistograms()
 {
   
-  if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "In procHistograms " << endmsg;
+  ATH_MSG_DEBUG( "In procHistograms " );
   
 //  //
 //  // Normalize and fix bins only at the end of a block, and only ONCE ! Otherwise it's a mess
diff --git a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx
index df4271fe61b70fe5870a7c0f268b845a0359c7d6..45890961a4427a946733cc49d89be7f9c8d2ef83 100644
--- a/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArNoisyROMon.cxx
@@ -83,7 +83,7 @@ StatusCode LArNoisyROMon::initialize()
 {
   if ( !(detStore()->retrieve(m_LArOnlineIDHelper, "LArOnlineID" ).isSuccess()) )
   {
-    msg(MSG::FATAL) << "unable to retrieve LArOnlineID from detStore" << endmsg;
+    ATH_MSG_FATAL( "unable to retrieve LArOnlineID from detStore" );
     return StatusCode::FAILURE;
   }
   
@@ -96,7 +96,7 @@ StatusCode LArNoisyROMon::initialize()
     StatusCode sc = m_trigDec.retrieve();
     if ( !sc.isSuccess() )
     {
-      msg(MSG::FATAL) << "unable to initialize TrigDecisionTool " << endmsg;
+      ATH_MSG_FATAL( "unable to initialize TrigDecisionTool " );
       return StatusCode::FAILURE;
     }
   }
@@ -249,7 +249,7 @@ StatusCode LArNoisyROMon::fillHistograms()
   sc = evtStore()->retrieve(noisyRO,m_inputKey);
   if (sc.isFailure()) 
   {
-    msg(MSG::WARNING) << "Can't retrieve LArNoisyROSummary " <<endmsg;
+    ATH_MSG_WARNING( "Can't retrieve LArNoisyROSummary " );
     return StatusCode::SUCCESS;
   }
   
@@ -258,7 +258,7 @@ StatusCode LArNoisyROMon::fillHistograms()
   sc = evtStore()->retrieve(eventInfo);
   if (sc.isFailure()) 
   {
-    msg(MSG::WARNING) << "Can't retrieve EventInfo " <<endmsg;
+    ATH_MSG_WARNING( "Can't retrieve EventInfo " );
     return StatusCode::SUCCESS;
   }
   
@@ -1507,7 +1507,7 @@ void LArNoisyROMon::fillTriggerHisto(partitionHistos& partition, uint8_t trigger
 
 StatusCode LArNoisyROMon::finalize()
 {
-  msg(MSG::INFO) << " in LArNoisyROMon::finalize() " << endmsg;
+  ATH_MSG_INFO(  " in LArNoisyROMon::finalHists() " );
   // delete temposary histograms
 
   if ( m_h_LBN ) {
diff --git a/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx
index 66d0d7816b051c8e0d41f651c76235052e2f38a0..bb242766c5c79338ca19737016880a41f781e7d2 100755
--- a/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArRODMonTool.cxx
@@ -182,7 +182,7 @@ LArRODMonTool::initialize() {
 
   StatusCode sc = detStore()->retrieve(m_LArOnlineIDHelper, "LArOnlineID");
   if (sc.isFailure()) {
-    msg(MSG::FATAL) << "Could not get LArOnlineIDHelper" << endmsg;
+    ATH_MSG_FATAL( "Could not get LArOnlineIDHelper" );
     return sc;
   }
 
@@ -192,41 +192,41 @@ LArRODMonTool::initialize() {
 //  if (m_doDspTestDump) {
     sc = detStore()->regHandle(m_dd_ofc,m_keyOFC);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::FATAL) << "Cannot register DataHandle for OFC object with key " << m_keyOFC << endmsg; 
+      ATH_MSG_FATAL( "Cannot register DataHandle for OFC object with key " << m_keyOFC ); 
       return sc;
     }
 
     sc = detStore()->regHandle(m_dd_shape,m_keyShape);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::FATAL) << "Cannot register DataHandle for Shape object with key " << m_keyShape << endmsg; 
+      ATH_MSG_FATAL( "Cannot register DataHandle for Shape object with key " << m_keyShape ); 
       return sc;
     }
 
     sc = detStore()->regHandle(m_dd_HVScaleCorr,"LArHVScaleCorr");
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::FATAL) << "Cannot register DataHandle for HVScaleCorr object with key LArHVScaleCorr" << endmsg; 
+      ATH_MSG_FATAL( "Cannot register DataHandle for HVScaleCorr object with key LArHVScaleCorr" ); 
       return sc;
     }
     // ADC2MeV Tool
     sc = m_adc2mevtool.retrieve();
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Unable to find tool for LArADC2MeV" << endmsg;
+      ATH_MSG_ERROR( "Unable to find tool for LArADC2MeV" );
       return StatusCode::FAILURE;
     }
 
     sc = m_calo_noise_tool.retrieve();
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Unable to find calo noise tool" << endmsg;
+      ATH_MSG_ERROR( "Unable to find calo noise tool" );
       return StatusCode::FAILURE;
     }
     sc = m_cable_service_tool.retrieve();
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Unable to find cabling service tool" << endmsg;
+      ATH_MSG_ERROR( "Unable to find cabling service tool" );
       return StatusCode::FAILURE;
     }
     sc = detStore()->retrieve(m_calo_description_mgr);
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Unable to find CeloDetDescrManager " << endmsg;
+      ATH_MSG_ERROR( "Unable to find CeloDetDescrManager " );
       return StatusCode::FAILURE;
     }
 //  }
@@ -234,14 +234,14 @@ LArRODMonTool::initialize() {
 //  if (m_skipNullPed || m_doDspTestDump) {
     sc=detStore()->retrieve(m_larpedestal,m_larpedestalkey);
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Cannot register DataHandle for Pedestal object with key " << m_larpedestalkey << endmsg;
+      ATH_MSG_ERROR( "Cannot register DataHandle for Pedestal object with key " << m_larpedestalkey );
       return StatusCode::FAILURE;
     }
 //  }
   if (m_skipKnownProblematicChannels) { 
     sc=m_badChannelMask.retrieve();
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Could not retrieve BadChannelMask" << m_badChannelMask<< endmsg;
+      ATH_MSG_ERROR( "Could not retrieve BadChannelMask" << m_badChannelMask);
       return StatusCode::FAILURE;
     }
   
@@ -627,7 +627,7 @@ LArRODMonTool::bookHistograms()
     //  }
 
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Bookhistograms failed" << endmsg;
+    ATH_MSG_ERROR( "Bookhistograms failed" );
   }
 
   return sc;
@@ -639,7 +639,7 @@ bool LArRODMonTool::FebStatus_Check() {
   const LArFebHeaderContainer* febCont=NULL;
   StatusCode sc = evtStore()->retrieve(febCont);
   if (sc.isFailure() || !febCont) {
-    msg(MSG::WARNING) << "No LArFEB container found in TDS" << endmsg; 
+    ATH_MSG_WARNING( "No LArFEB container found in TDS" ); 
     return false;
   }
   LArFebHeaderContainer::const_iterator itFEB = febCont->begin(); 
@@ -669,7 +669,7 @@ StatusCode LArRODMonTool::fillHistograms() {
 
   const xAOD::EventInfo* thisEventInfo;
   if (evtStore()->retrieve(thisEventInfo).isFailure()) {
-    msg(MSG::ERROR) << "No EventInfo object found! Can't read run number!" << endmsg;
+    ATH_MSG_ERROR( "No EventInfo object found! Can't read run number!" );
     return StatusCode::FAILURE;
   }
 
@@ -680,12 +680,12 @@ StatusCode LArRODMonTool::fillHistograms() {
 
   if ( thisEventInfo->isEventFlagBitSet(xAOD::EventInfo::LAr,0) ) {
     isEventFlaggedByLArNoisyROAlg = true;
-    msg(MSG::DEBUG) << " !!! Noisy event found from LArNoisyROAlg !!!" << endmsg;
+    ATH_MSG_DEBUG( " !!! Noisy event found from LArNoisyROAlg !!!" );
   }
 
   if ( thisEventInfo->isEventFlagBitSet(xAOD::EventInfo::LAr,3) ) {
     isEventFlaggedByLArNoisyROAlgInTimeW = true;
-    msg(MSG::DEBUG) << " !!! Noisy event found by LArNoisyROAlg in Time window of 500ms!!!" << endmsg;
+    ATH_MSG_DEBUG( " !!! Noisy event found by LArNoisyROAlg in Time window of 500ms!!!" );
   }
   
   // Noise bursts cleaning (LArNoisyRO_Std or TimeWindowVeto) added by B.Trocme - 19/7/12
@@ -739,7 +739,7 @@ StatusCode LArRODMonTool::fillHistograms() {
   const LArRawChannelContainer* rawColl_fromDigits;
   StatusCode sc = evtStore()->retrieve(rawColl_fromDigits, m_channelKey_fromDigits);
   if(sc.isFailure()) {
-    msg(MSG::WARNING) << "Can\'t retrieve LArRawChannelContainer with key " << m_channelKey_fromDigits <<endmsg;
+    ATH_MSG_WARNING( "Can\'t retrieve LArRawChannelContainer with key " << m_channelKey_fromDigits );
     return StatusCode::FAILURE;
   }
 
@@ -747,7 +747,7 @@ StatusCode LArRODMonTool::fillHistograms() {
   const LArRawChannelContainer* rawColl_fromBytestream;
   sc = evtStore()->retrieve(rawColl_fromBytestream, m_channelKey_fromBytestream);
   if(sc.isFailure()) {
-    msg(MSG::WARNING) << "Can\'t retrieve LArRawChannelContainer with key " << m_channelKey_fromBytestream <<endmsg;
+    ATH_MSG_WARNING( "Can\'t retrieve LArRawChannelContainer with key " << m_channelKey_fromBytestream );
     return StatusCode::FAILURE;
   }
 
@@ -756,7 +756,7 @@ StatusCode LArRODMonTool::fillHistograms() {
 //  if (m_dumpDigits) {
     sc = evtStore()->retrieve(pLArDigitContainer, m_LArDigitContainerKey);
     if (sc.isFailure()) {
-      msg(MSG::WARNING) << "Can't retrieve LArDigitContainer with key " << m_LArDigitContainerKey <<". Turn off digit dump." <<  endmsg;
+      ATH_MSG_WARNING( "Can't retrieve LArDigitContainer with key " << m_LArDigitContainerKey <<". Turn off digit dump." );
       closeDumpfiles();
       m_dumpDigits=false;
       m_doDspTestDump=false;
@@ -788,7 +788,7 @@ StatusCode LArRODMonTool::fillHistograms() {
   LArRawChannelContainer::const_iterator rcBSIt_e=rawColl_fromBytestream->end();
 
   //Loop over indices in LArRawChannelContainer built offline (the small one)
-  msg(MSG::DEBUG) << "Entering the LArRawChannel loop." << endmsg;
+  ATH_MSG_DEBUG( "Entering the LArRawChannel loop." );
 
   for (;rcDigIt!=rcDigIt_e;++rcDigIt) {
     const HWIdentifier idDig=rcDigIt->hardwareID();
@@ -811,11 +811,11 @@ StatusCode LArRODMonTool::fillHistograms() {
     LArRawChannelContainer::const_iterator currIt=rcBSIt; //Remember current position in container
     for (;rcBSIt!=rcBSIt_e && rcBSIt->hardwareID() != idDig; ++rcBSIt);
     if (rcBSIt==rcBSIt_e) {
-      msg(MSG::WARNING) << "LArRawChannelContainer not in the expected order. Change of LArByteStream format?" << endmsg;
+      ATH_MSG_WARNING( "LArRawChannelContainer not in the expected order. Change of LArByteStream format?" );
       //Wrap-around
       for (rcBSIt=rawColl_fromBytestream->begin();rcBSIt!=currIt && rcBSIt->hardwareID() != idDig; ++rcBSIt);
       if (rcBSIt==currIt) {
-	msg(MSG::ERROR) << "Channel " << m_LArOnlineIDHelper->channel_name(idDig) << " not found." << endmsg;
+	ATH_MSG_ERROR( "Channel " << m_LArOnlineIDHelper->channel_name(idDig) << " not found." );
 	return StatusCode::FAILURE;
       }
     }
@@ -827,7 +827,7 @@ StatusCode LArRODMonTool::fillHistograms() {
       const unsigned digContSize=pLArDigitContainer->size();
       for(;index<digContSize && pLArDigitContainer->at(index)->hardwareID()!=idDig;++index);
       if (index==digContSize) {
-	msg(MSG::ERROR) << "Can't find LArDigit corresponding to channel " << m_LArOnlineIDHelper->channel_name(idDig) << ". Turn off digit dump" << endmsg;
+	ATH_MSG_ERROR( "Can't find LArDigit corresponding to channel " << m_LArOnlineIDHelper->channel_name(idDig) << ". Turn off digit dump" );
 	closeDumpfiles();
 	m_dumpDigits=false;
 	m_doDspTestDump=false;
@@ -849,19 +849,19 @@ StatusCode LArRODMonTool::fillHistograms() {
 
     if ((maxSamples-minSamples) > m_adc_th || m_adc_th <= 0) compareChannels(idDig,(*rcDigIt),(*rcBSIt),dig).ignore();
     else {
-      if (dig) msg(MSG::DEBUG) << "Samples : "<< maxSamples << " " << minSamples << endmsg;
+      if (dig) ATH_MSG_DEBUG( "Samples : "<< maxSamples << " " << minSamples );
     }      
 
   }//end loop over rawColl_fromDigits
-  msg(MSG::DEBUG) << "End of rawChannels loop" << endmsg;
+  ATH_MSG_DEBUG( "End of rawChannels loop" );
 
   if(m_IsOnline && m_last_lb < m_curr_lb && (m_curr_lb - m_last_lb) % m_history_granularity == m_history_granularity -1 ) { // if new LB subtract the old for Out_[E,Q,T]_FT_vs_SLOT 
-    msg(MSG::INFO) << " Last LB: "<<m_last_lb<<" curr. LB: "<<m_curr_lb<<" subtracting histos"<<endmsg;
+    ATH_MSG_INFO( " Last LB: "<<m_last_lb<<" curr. LB: "<<m_curr_lb<<" subtracting histos");
     // subtract all previously not done bins....
     int hbin = (m_curr_lb % m_history_size) / m_history_granularity;
     for(int i=0; i<=hbin; ++i) {
       if(!m_hdone[i]) {
-        msg(MSG::INFO) << " Going to subtract and reset the: "<< i << " bin of shadow histo"<<endmsg;
+        ATH_MSG_INFO( " Going to subtract and reset the: "<< i << " bin of shadow histo");
         for(unsigned l=0; l<m_histos.size(); ++l) {// go through all histo groups
            m_histos[l].m_hOut_E_FT_vs_SLOT->Add(m_histos[l].m_hOut_E_FT_vs_SLOT_shadow[i], -1.);
            m_histos[l].m_hOut_E_FT_vs_SLOT_shadow[i]->Reset();
@@ -900,18 +900,18 @@ StatusCode LArRODMonTool::fillHistograms() {
 
 
   if (msgLvl(MSG::VERBOSE)) {
-    msg(MSG::VERBOSE) << "*Number of errors in Energy Computation : " << endmsg;
-    msg(MSG::VERBOSE) << "*     Low Gain : " << MSG::dec << allEC.errors_E[2] << " / " << m_count_gain[2] << endmsg;
-    msg(MSG::VERBOSE) << "*     Medium Gain : " << MSG::dec << allEC.errors_E[1] << " / " << m_count_gain[1] << endmsg;
-    msg(MSG::VERBOSE) << "*     High Gain : " << MSG::dec << allEC.errors_E[0] << " / " << m_count_gain[0] << endmsg;
-    msg(MSG::VERBOSE) << "*Number of errors in Time Computation : " << endmsg;
-    msg(MSG::VERBOSE) << "*     Low Gain : " << MSG::dec << allEC.errors_T[2] << " / " << m_count_gain[2] << endmsg;
-    msg(MSG::VERBOSE) << "*     Medium Gain : " << MSG::dec << allEC.errors_T[1] <<  " / " << m_count_gain[1] << endmsg;
-    msg(MSG::VERBOSE) << "*     High Gain : " << MSG::dec << allEC.errors_T[0] << " / " << m_count_gain[0] <<  endmsg;
-    msg(MSG::VERBOSE) << "*Number of errors in Quality Computation : " << " / " << m_count_gain[2] << endmsg;
-    msg(MSG::VERBOSE) << "*     Low Gain : " << MSG::dec << allEC.errors_Q[2] << " / " << m_count_gain[2] << endmsg;
-    msg(MSG::VERBOSE) << "*     Medium Gain : " << MSG::dec << allEC.errors_Q[1] << " / " << m_count_gain[1] << endmsg;
-    msg(MSG::VERBOSE) << "*     High Gain : " << MSG::dec << allEC.errors_Q[0] << " / " << m_count_gain[0] << endmsg;
+    ATH_MSG_VERBOSE( "*Number of errors in Energy Computation : " );
+    ATH_MSG_VERBOSE( "*     Low Gain : " << MSG::dec << allEC.errors_E[2] << " / " << m_count_gain[2] );
+    ATH_MSG_VERBOSE( "*     Medium Gain : " << MSG::dec << allEC.errors_E[1] << " / " << m_count_gain[1] );
+    ATH_MSG_VERBOSE( "*     High Gain : " << MSG::dec << allEC.errors_E[0] << " / " << m_count_gain[0] );
+    ATH_MSG_VERBOSE( "*Number of errors in Time Computation : " );
+    ATH_MSG_VERBOSE( "*     Low Gain : " << MSG::dec << allEC.errors_T[2] << " / " << m_count_gain[2] );
+    ATH_MSG_VERBOSE( "*     Medium Gain : " << MSG::dec << allEC.errors_T[1] <<  " / " << m_count_gain[1] );
+    ATH_MSG_VERBOSE( "*     High Gain : " << MSG::dec << allEC.errors_T[0] << " / " << m_count_gain[0] );
+    ATH_MSG_VERBOSE( "*Number of errors in Quality Computation : " << " / " << m_count_gain[2] );
+    ATH_MSG_VERBOSE( "*     Low Gain : " << MSG::dec << allEC.errors_Q[2] << " / " << m_count_gain[2] );
+    ATH_MSG_VERBOSE( "*     Medium Gain : " << MSG::dec << allEC.errors_Q[1] << " / " << m_count_gain[1] );
+    ATH_MSG_VERBOSE( "*     High Gain : " << MSG::dec << allEC.errors_Q[0] << " / " << m_count_gain[0] );
   }// end if verbose
   
 
@@ -1069,7 +1069,7 @@ void LArRODMonTool::closeDumpfiles() {
 }
 
 StatusCode LArRODMonTool::compareChannels(const HWIdentifier chid,const LArRawChannel& rcDig, const LArRawChannel& rcBS, const LArDigit* dig) {
-  msg(MSG::DEBUG) << " I am entering compareChannels method" << endmsg;
+  ATH_MSG_DEBUG( " I am entering compareChannels method" );
   const int slot_fD = m_LArOnlineIDHelper->slot(chid);
   const  int feedthrough_fD = m_LArOnlineIDHelper->feedthrough(chid);
   const float timeOffline = rcDig.time()/m_unit_offline - m_timeOffset*m_BC;
@@ -1082,7 +1082,7 @@ StatusCode LArRODMonTool::compareChannels(const HWIdentifier chid,const LArRawCh
   const float abs_en_fB=fabs(en_fB);
 
   if (fabs(timeOffline) > m_peakTime_cut*1000.){
-    msg(MSG::DEBUG) << " timeOffline too large " << timeOffline << endmsg;
+    ATH_MSG_DEBUG( " timeOffline too large " << timeOffline );
     return StatusCode::SUCCESS;
   }
 // Set the cuts corresponding to the range
@@ -1211,62 +1211,67 @@ StatusCode LArRODMonTool::compareChannels(const HWIdentifier chid,const LArRawCh
       if(m_IsOnline && ndump<max_dump) {
          const int channel=m_LArOnlineIDHelper->channel(chid);
          const HWIdentifier febid=m_LArOnlineIDHelper->feb_Id(chid);
-         msg(MSG::INFO) << "Channel: " << channel << " of FEB " << febid << endmsg;
+         ATH_MSG_INFO( "Channel: " << channel << " of FEB " << febid );
          //if(fabs(DiffE) > DECut && hvscale == 1.) { // only for channels without HV corrections
          if(fabs(DiffE) > DECut ) { 
          // absolute cut on energy 1.MeV
          //if(fabs(DiffE) > 1.) {
-             msg(MSG::INFO) << "DSP Energy Error : " << m_LArOnlineIDHelper->channel_name(chid) << endmsg;
-             msg(MSG::INFO)	<< "   Eonl = " << en_fB << " , Eoff = " << rcDig.energy()
-	     		        << " , Eoff - Eonl = " << rcDig.energy() - en_fB << endmsg;
-             msg(MSG::INFO)	<< "   Qonl = " << q_fB << " , Qoff = " << rcDig.quality()
-	     		        << " (Qoff - Qnl)/sqrt(Qoff) = " << (rcDig.quality() - q_fB)/TMath::Sqrt(rcDig.quality())  << endmsg;
+             ATH_MSG_INFO( "DSP Energy Error : " << m_LArOnlineIDHelper->channel_name(chid) );
+             ATH_MSG_INFO( "   Eonl = " << en_fB << " , Eoff = " << rcDig.energy()
+	     		        << " , Eoff - Eonl = " << rcDig.energy() - en_fB );
+             ATH_MSG_INFO( "   Qonl = " << q_fB << " , Qoff = " << rcDig.quality()
+	     		        << " (Qoff - Qnl)/sqrt(Qoff) = " << (rcDig.quality() - q_fB)/TMath::Sqrt(rcDig.quality())  );
          }
          if(keepQ && (fabs(DiffQ) > DQCut)) {
-             msg(MSG::INFO) << "DSP Quality Error : " << m_LArOnlineIDHelper->channel_name(chid) << endmsg;
-             msg(MSG::INFO)	<< "   Qonl = " << q_fB << " , Qoff = " << rcDig.quality()
-	     		        << " (Qoff - Qnl)/sqrt(Qoff) = " << (rcDig.quality() - q_fB)/TMath::Sqrt(rcDig.quality())  << endmsg;
-             msg(MSG::INFO)	<< "   Eonl = " << en_fB << " , Eoff = " << rcDig.energy()
-	     		        << " , Eoff - Eonl = " << rcDig.energy() - en_fB << endmsg;
+             ATH_MSG_INFO( "DSP Quality Error : " << m_LArOnlineIDHelper->channel_name(chid) );
+             ATH_MSG_INFO( "   Qonl = " << q_fB << " , Qoff = " << rcDig.quality()
+	     		        << " (Qoff - Qnl)/sqrt(Qoff) = " << (rcDig.quality() - q_fB)/TMath::Sqrt(rcDig.quality())  );
+             ATH_MSG_INFO( "   Eonl = " << en_fB << " , Eoff = " << rcDig.energy()
+	     		        << " , Eoff - Eonl = " << rcDig.energy() - en_fB );
          }
-         msg(MSG::INFO) << " Tauonl = " << rcBS.time() << " , Tauoff = " << rcDig.time() << endmsg;
+         ATH_MSG_INFO( " Tauonl = " << rcBS.time() << " , Tauoff = " << rcDig.time() );
          const std::vector<short>& samples=dig->samples();
-         msg(MSG::INFO) << "Digits : ";
-         for (unsigned int k = 0; k<samples.size(); k++) {msg(MSG::INFO) << samples.at(k) << " ";}
-         msg(MSG::INFO) << endmsg;
+         std::ostringstream os; 
+         os << "Digits : ";
+         for (unsigned int k = 0; k<samples.size(); k++) {os << samples.at(k) << " ";}
+         ATH_MSG_INFO( os.str() );
          ILArOFC::OFCRef_t this_OFC_a_test = m_dd_ofc->OFC_a(chid,rcDig.gain());
-         msg(MSG::INFO) << "OFCa : ";
-         for (unsigned int k = 0; k<this_OFC_a_test.size(); ++k) {msg(MSG::INFO) << this_OFC_a_test.at(k) << " ";}
-         msg(MSG::INFO) << endmsg;
+         os.clear(); os.seekp(0);
+         os << "OFCa : ";
+         for (unsigned int k = 0; k<this_OFC_a_test.size(); ++k) {os << this_OFC_a_test.at(k) << " ";}
+         ATH_MSG_INFO( os.str() );
          ILArOFC::OFCRef_t this_OFC_b_test = m_dd_ofc->OFC_b(chid,rcDig.gain());
-         msg(MSG::INFO) << "OFCb : ";
-         for (unsigned int k = 0; k<this_OFC_b_test.size(); ++k) {msg(MSG::INFO) << this_OFC_b_test.at(k) << " ";}
-         msg(MSG::INFO) << endmsg;
+         os.clear(); os.seekp(0);
+         os << "OFCb : ";
+         for (unsigned int k = 0; k<this_OFC_b_test.size(); ++k) {os << this_OFC_b_test.at(k) << " ";}
+         ATH_MSG_INFO( os.str() );
          ILArShape::ShapeRef_t this_Shape_test = m_dd_shape->Shape(chid,rcDig.gain());
-         msg(MSG::INFO) << "Shape : ";
-         for (unsigned int k = 0; k<this_Shape_test.size(); ++k) {msg(MSG::INFO) << this_Shape_test.at(k) << " ";}
-         msg(MSG::INFO) << endmsg;
+         os.clear(); os.seekp(0);
+         os << "Shape : ";
+         for (unsigned int k = 0; k<this_Shape_test.size(); ++k) {os << this_Shape_test.at(k) << " ";}
+         ATH_MSG_INFO( os.str() );
          ILArShape::ShapeRef_t this_ShapeDer_test = m_dd_shape->ShapeDer(chid,rcDig.gain());
-         msg(MSG::INFO) << "ShapeDer : ";
-         for (unsigned int k = 0; k<this_ShapeDer_test.size(); ++k) {msg(MSG::INFO) << this_ShapeDer_test.at(k) << " ";}
-         msg(MSG::INFO) << endmsg;
+         os.clear(); os.seekp(0);
+         os << "ShapeDer : ";
+         for (unsigned int k = 0; k<this_ShapeDer_test.size(); ++k) {os << this_ShapeDer_test.at(k) << " ";}
+         ATH_MSG_INFO( os.str() );
          const std::vector<float>& ramp=m_adc2mevtool->ADC2MEV(chid,rcDig.gain());
          const float escale = ramp[1];
          float ramp0 = ramp[0];
          if (q_gain == 0) ramp0 = 0.; // no ramp intercepts in HG
          const float ped = m_larpedestal->pedestal(chid,rcDig.gain());
-         msg(MSG::INFO) << "Escale: "<<escale<<" intercept: "<<ramp0<<" pedestal: "<<ped<<" gain: "<<rcDig.gain() <<endmsg;
+         ATH_MSG_INFO( "Escale: "<<escale<<" intercept: "<<ramp0<<" pedestal: "<<ped<<" gain: "<<rcDig.gain() );
          const Identifier cellid=m_cable_service_tool->cnvToIdentifier(chid);
          const CaloDetDescrElement* cellDDE = m_calo_description_mgr->get_element(cellid); 
          const float noise=m_calo_noise_tool->totalNoiseRMS(cellDDE,rcDig.gain(),20.);
-         msg(MSG::INFO) << "Noise for mu=20: "<<noise<<endmsg;
-         msg(MSG::INFO) << "HVScaleCorr: "<<hvscale<<endmsg;
+         ATH_MSG_INFO( "Noise for mu=20: "<<noise);
+         ATH_MSG_INFO( "HVScaleCorr: "<<hvscale);
          double emon=0.;
 	 const unsigned nOFCSamp=std::min(samples.size(),this_OFC_a_test.size());
          for (unsigned k=0; k<nOFCSamp; ++k) emon += (samples.at(k)-ped)*this_OFC_a_test.at(k);
          emon *= escale;
          emon += ramp0;
-         msg(MSG::INFO) << "intercept + Escale*Sum[(sample-ped)*OFCa] "<<emon<<endmsg;
+         ATH_MSG_INFO( "intercept + Escale*Sum[(sample-ped)*OFCa] "<<emon);
        ++ndump;
       } // DE cut
     } // dumper
@@ -1345,9 +1350,9 @@ StatusCode LArRODMonTool::compareChannels(const HWIdentifier chid,const LArRawCh
 
   if (m_printEnergyErrors && msgLvl(MSG::DEBUG)) {
     if (fabs(rcDig.energy() - en_fB) > DECut) {
-      msg(MSG::DEBUG) << "DSP Energy Error : " << m_LArOnlineIDHelper->channel_name(chid) << endmsg;
-      msg(MSG::DEBUG)	<< "   Eonl = " << en_fB << " , Eoff = " << rcDig.energy()
-			<< " , Eoff - Eonl = " << rcDig.energy() - en_fB << endmsg;
+      ATH_MSG_DEBUG( "DSP Energy Error : " << m_LArOnlineIDHelper->channel_name(chid) );
+      ATH_MSG_DEBUG( "   Eonl = " << en_fB << " , Eoff = " << rcDig.energy()
+			<< " , Eoff - Eonl = " << rcDig.energy() - en_fB );
     }
   }
  
@@ -1384,7 +1389,7 @@ StatusCode LArRODMonTool::compareChannels(const HWIdentifier chid,const LArRawCh
       m_counter++;
     }//end if E,t or Q cut passed
   }//end if dig
-  msg(MSG::DEBUG) << " I am leaving compareChannels method" << endmsg;
+  ATH_MSG_DEBUG( " I am leaving compareChannels method" );
   return StatusCode::SUCCESS;
 }
 
diff --git a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx
index b17e4b256921372bc414bd3ddc595c7e855762ef..5d790ff531709a3c8a15ba6c73274ad17870cc0f 100755
--- a/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArRawChannelMonTool.cxx
@@ -168,7 +168,7 @@ LArRawChannelMonTool::~LArRawChannelMonTool()
 /*----------------------------------------------------------------------------*/
 StatusCode LArRawChannelMonTool::initialize()
 {
-  ATH_MSG(DEBUG) << "===> start " << name() << "::initialize <=== " << endmsg;
+  ATH_MSG_DEBUG( "===> start " << name() << "::initialize <=== " );
 
   m_event_counter = 0;
   m_noise_stream_event_counter = 0;
@@ -178,12 +178,12 @@ StatusCode LArRawChannelMonTool::initialize()
   // --- non-trivial ManagedMonitorToolBase intialize routine ---
   if ( ManagedMonitorToolBase::initialize().isSuccess() ) {
 
-    ATH_MSG(DEBUG) << "initialized ManagedMonitorToolBase" << endmsg;
+    ATH_MSG_DEBUG( "initialized ManagedMonitorToolBase" );
 
   } else {
 
-    msg(MSG::FATAL) << "Unable to initialize ManagedMonitorToolBase"
-		    << endmsg;
+    ATH_MSG_FATAL( "Unable to initialize ManagedMonitorToolBase"
+		    );
     return StatusCode::FAILURE;
 
   }
@@ -191,11 +191,11 @@ StatusCode LArRawChannelMonTool::initialize()
   // --- get LArOnlineID ---
   if ( detStore()->retrieve( m_lar_online_id_ptr, "LArOnlineID" ).isSuccess() ) {
 
-    ATH_MSG(DEBUG) << "connected non-tool: LArOnlineID" << endmsg;
+    ATH_MSG_DEBUG( "connected non-tool: LArOnlineID" );
 
   } else {
 
-    msg(MSG::FATAL) << "unable to connect non-tool: LArOnlineID" << endmsg;
+    ATH_MSG_FATAL( "unable to connect non-tool: LArOnlineID" );
     return StatusCode::FAILURE;
 
   }
@@ -205,12 +205,12 @@ StatusCode LArRawChannelMonTool::initialize()
   // --- get CaloDetDescrManager ---
   if ( detStore()->retrieve( m_calo_description_mgr_ptr ).isSuccess() ) {
 
-    ATH_MSG(DEBUG) << "connected non-tool: CaloDetDescrManager " << endmsg;
+    ATH_MSG_DEBUG( "connected non-tool: CaloDetDescrManager " );
 
   } else {
 
-    msg(MSG::FATAL) << "unable to connect non-tool: CaloDetDescrMgr "
-	<< endmsg;
+    ATH_MSG_FATAL( "unable to connect non-tool: CaloDetDescrMgr "
+	);
     return StatusCode::FAILURE;
 
   }
@@ -218,12 +218,12 @@ StatusCode LArRawChannelMonTool::initialize()
   // --- get CaloIDManager ---
   if ( detStore()->retrieve( m_calo_id_mgr_ptr ).isSuccess() ) {
 
-    ATH_MSG(DEBUG) << "connected non-tool: CaloIdManager" << endmsg;
+    ATH_MSG_DEBUG( "connected non-tool: CaloIdManager" );
 
   } else {
 
-    msg(MSG::FATAL) << "unable to connect non-tool: CaloIdManager "
-	<< endmsg;
+    ATH_MSG_FATAL( "unable to connect non-tool: CaloIdManager "
+	);
     return StatusCode::FAILURE;
 
   }
@@ -297,7 +297,7 @@ StatusCode LArRawChannelMonTool::initialize()
 
     } catch ( std::out_of_range &err ) {
 
-      msg(MSG::WARNING) << "FEB hash out of range" << err.what() << endmsg;
+      ATH_MSG_WARNING( "FEB hash out of range" << err.what() );
 
     }
 
@@ -348,12 +348,11 @@ StatusCode LArRawChannelMonTool::initialize()
   }
 
   if (msgLvl(MSG::DEBUG)) {
-    msg(MSG::DEBUG) << "Number of channels in detectors: " << std::endl;
+    ATH_MSG_DEBUG( "Number of channels in detectors: " );
     typedef std::map<Detector,unsigned int> det_int_map_t;
     foreach( det_int_map_t::value_type i, m_det_to_nchannels){
-      msg(MSG::DEBUG) << detector_str( i.first ) << " has " << i.second << "channels " << std::endl;
+      ATH_MSG_DEBUG( detector_str( i.first ) << " has " << i.second << "channels " );
     }
-    msg(MSG::DEBUG) << endmsg;
   }
 
 
@@ -364,7 +363,7 @@ StatusCode LArRawChannelMonTool::initialize()
 
 
   m_noise_streams_set.insert(m_noise_streams.begin(),m_noise_streams.end());
-  ATH_MSG(DEBUG) << "===> end " << name() << "::initialize <=== " << endmsg;
+  ATH_MSG_DEBUG( "===> end " << name() << "::initialize <=== " );
 
   return StatusCode::SUCCESS;
 
@@ -375,7 +374,7 @@ StatusCode LArRawChannelMonTool::initialize()
 StatusCode LArRawChannelMonTool::bookHistograms()
 {
 
-  ATH_MSG(DEBUG) << "===> start " << name() << "::bookHistograms <=== " << endmsg;
+  ATH_MSG_DEBUG( "===> start " << name() << "::bookHistograms <=== " );
 
   std::deque<Detector> detectors = list_of( EMBA )( EMBC )( EMECA )( EMECC )( HECA )( HECC )( FCALA )( FCALC );
 
@@ -405,8 +404,8 @@ StatusCode LArRawChannelMonTool::bookHistograms()
 //  case file:
 //  case all:
 //  default:
-//    msg(MSG::WARNING) << "given bad interval job-option: " << m_interval_str
-//     << " ... booking histograms per run ..." << endmsg;
+//    ATH_MSG_WARNING( "given bad interval job-option: " << m_interval_str
+//     << " ... booking histograms per run ..." );
 //      is_new_interval = isNewRun;
 //  }
 //
@@ -895,7 +894,7 @@ StatusCode LArRawChannelMonTool::bookHistograms()
 	// --- Book and register per Feedthrough Histograms ---
 	if ( m_monitor_feedthroughs ) {
 
-	  ATH_MSG(DEBUG) << " - Booking per feedthrough histos" << endmsg;
+	  ATH_MSG_DEBUG( " - Booking per feedthrough histos" );
 
 	  // --- Look for existing feedthough histogram ---
 	  bool is_new_ft = false;
@@ -1017,7 +1016,7 @@ StatusCode LArRawChannelMonTool::bookHistograms()
 
       } catch ( std::out_of_range &err ){
 
-	msg(MSG::WARNING) << "FEB hash out of range: " << err.what() << endmsg;
+	ATH_MSG_WARNING( "FEB hash out of range: " << err.what() );
 
       }
 
@@ -1237,7 +1236,7 @@ StatusCode LArRawChannelMonTool::bookHistograms()
 
   } // --- end booking for monitoring interval ---
 
-  ATH_MSG(DEBUG) << "===> end " << name() << "::bookHistograms <=== " << endmsg;
+  ATH_MSG_DEBUG( "===> end " << name() << "::bookHistograms <=== " );
 
   return StatusCode::SUCCESS;
 
@@ -1248,12 +1247,12 @@ StatusCode LArRawChannelMonTool::bookHistograms()
 StatusCode LArRawChannelMonTool::fillHistograms()
 {
 
-  ATH_MSG(DEBUG) << "===> start " << name() << "::fillHistograms boulou <=== " << endmsg;
+  ATH_MSG_DEBUG( "===> start " << name() << "::fillHistograms boulou <=== " );
 
 
   // -- Set ATLAS Ready Filter
   setIsATLASReady();
-  //  ATH_MSG(DEBUG) << "Vikas Says: ATLAS READY Flag is set to " << isATLASReady() << endmsg;
+  //  ATH_MSG_DEBUG( "Vikas Says: ATLAS READY Flag is set to " << isATLASReady() );
 
   // --- check set in bookHistogram ---
   if ( !m_has_lar_raw_channels ) return StatusCode::SUCCESS;
@@ -1262,8 +1261,8 @@ StatusCode LArRawChannelMonTool::fillHistograms()
   const LArRawChannelContainer *raw_channels = 0;
   if ( !evtStore()->retrieve( raw_channels, m_LArRawChannel_container_key ).isSuccess() ) {
 
-    msg(MSG::WARNING) << "Cannot retrieve LArRawChannelContainer with key: "
-	<< m_LArRawChannel_container_key << endmsg;
+    ATH_MSG_WARNING( "Cannot retrieve LArRawChannelContainer with key: "
+	<< m_LArRawChannel_container_key );
     return StatusCode::FAILURE;
 
   }
@@ -1278,24 +1277,24 @@ StatusCode LArRawChannelMonTool::fillHistograms()
   //  double event_time_minutes = -1;
   if ( evtStore()->retrieve( event_info ).isSuccess()) {
    
-    //ATH_MSG(DEBUG) << "event_info->isEventFlagBitSet(xAOD::EventInfo::LAr,0"<<event_info->isEventFlagBitSet(xAOD::EventInfo::LAr,0) << endmsg;
+    //ATH_MSG_DEBUG( "event_info->isEventFlagBitSet(xAOD::EventInfo::LAr,0"<<event_info->isEventFlagBitSet(xAOD::EventInfo::LAr,0) );
     // Check for LArNoisyROAlg event info
     //    if (event_info->errorState(EventInfo::LAr) == EventInfo::Warning) {
     if ( event_info->isEventFlagBitSet(xAOD::EventInfo::LAr,LArEventBitInfo::BADFEBS) ) {
       isEventFlaggedByLArNoisyROAlg = true;
-      ATH_MSG(DEBUG) << " !!! Noisy event found from LArNoisyROAlg !!!" << endmsg;
+      ATH_MSG_DEBUG( " !!! Noisy event found from LArNoisyROAlg !!!" );
     }
 
    
     if ( event_info->isEventFlagBitSet(xAOD::EventInfo::LAr,LArEventBitInfo::BADFEBS_W) ) {
       isEventFlaggedByLArNoisyROAlg_W = true;
-      ATH_MSG(DEBUG) << " !!! Noisy event found from LArNoisyROAlg_W !!!" << endmsg;
+      ATH_MSG_DEBUG( " !!! Noisy event found from LArNoisyROAlg_W !!!" );
     }
    
 
     if ( event_info->isEventFlagBitSet(xAOD::EventInfo::LAr,3) ) {
       isEventFlaggedByLArNoisyROAlgInTimeW = true;
-      ATH_MSG(DEBUG) << " !!! Noisy event found by LArNoisyROAlg in Time window of 500ms!!!" << endmsg;
+      ATH_MSG_DEBUG( " !!! Noisy event found by LArNoisyROAlg in Time window of 500ms!!!" );
     }
 
 
@@ -1331,7 +1330,7 @@ StatusCode LArRawChannelMonTool::fillHistograms()
       std::vector<TriggerInfo::StreamTag> event_stream_tags = trig->streamTags();
       foreach( const std::string & stream_name, m_noise_streams ) {
 	foreach( const TriggerInfo::StreamTag stream_tag, event_stream_tags ) {
-	  ATH_MSG(DEBUG) << "Keeping Stream Tag: " << stream_tag.type() << "_" << stream_tag.name()  << endmsg;
+	  ATH_MSG_DEBUG( "Keeping Stream Tag: " << stream_tag.type() << "_" << stream_tag.name()  );
 	  if( stream_name == stream_tag.name()) {
 	    m_is_noise_event = true;
 	    break;
@@ -1340,7 +1339,7 @@ StatusCode LArRawChannelMonTool::fillHistograms()
       }
     }
     */
-  } else ATH_MSG(DEBUG) << "Cannot retrieve EventInfo" << endmsg;
+  } else ATH_MSG_DEBUG( "Cannot retrieve EventInfo" );
 
 
   ++m_event_counter;
@@ -1532,14 +1531,14 @@ StatusCode LArRawChannelMonTool::fillHistograms()
 
     } catch ( const std::out_of_range &err ) {
 
-      msg(MSG::WARNING) << "FEB hash out of range. Detector undefined"
-	  << err.what() << endmsg;
+      ATH_MSG_WARNING( "FEB hash out of range. Detector undefined"
+	  << err.what() );
       continue; // skip this channel
 
     } catch ( const LArID_Exception& err ) {
 
-      msg(MSG::WARNING) << "channel offline id undefined ... skipping"
-	  << endmsg;
+      ATH_MSG_WARNING( "channel offline id undefined ... skipping"
+	  );
       continue; // skip this channel
 
     }
@@ -1581,11 +1580,11 @@ StatusCode LArRawChannelMonTool::fillHistograms()
 
       } catch ( std::out_of_range &err ) {
 
-	msg(MSG::WARNING) <<"failed per FEB monitoring "<< err.what() << endmsg;
+	ATH_MSG_WARNING("failed per FEB monitoring "<< err.what() );
 
       } catch ( std::bad_cast &err ) {
 
-	msg(MSG::WARNING) <<"failed per FEB monitoring "<< err.what() << endmsg;
+	ATH_MSG_WARNING("failed per FEB monitoring "<< err.what() );
 
       }
 
@@ -1624,8 +1623,8 @@ StatusCode LArRawChannelMonTool::fillHistograms()
 
       } catch ( std::out_of_range &err ) {
 
-	msg(MSG::WARNING) << "failed per feedthrough monitoring " << err.what()
-			  << endmsg;
+	ATH_MSG_WARNING( "failed per feedthrough monitoring " << err.what()
+			  );
 
       }
 
@@ -1731,18 +1730,18 @@ StatusCode LArRawChannelMonTool::fillHistograms()
 	case 7: 
 	  per_detector_total_energy[FCALC] += energy; break;	  
 	default:
-	  msg(MSG::WARNING) << "Something is wrong with choosing of detector partition " << endmsg;	  
+	  ATH_MSG_WARNING( "Something is wrong with choosing of detector partition " );	  
 	}
 
 
 
       } catch ( const std::out_of_range &err ) {
 
-	msg(MSG::WARNING) << "Failed monitoring " << err.what() << endmsg;
+	ATH_MSG_WARNING( "Failed monitoring " << err.what() );
 
       } catch ( const std::bad_cast &err ) {
 
-	msg(MSG::WARNING) << "Failed monitoring " << err.what() << endmsg;
+	ATH_MSG_WARNING( "Failed monitoring " << err.what() );
 
       }
 
@@ -1951,7 +1950,7 @@ StatusCode LArRawChannelMonTool::fillHistograms()
 StatusCode LArRawChannelMonTool::procHistograms()
 {
 
-  ATH_MSG(DEBUG) << "===> start " << name() << "::procHistograms <=== " << endmsg;
+  ATH_MSG_DEBUG( "===> start " << name() << "::procHistograms <=== " );
 
   bool is_new_interval = false;
   switch ( m_interval ) {
@@ -1967,8 +1966,8 @@ StatusCode LArRawChannelMonTool::procHistograms()
     is_new_interval = endOfRunFlag();
     break;
   default:
-    msg(MSG::WARNING) << "given bad interval job-option: " << m_interval_str
-	<< " ... booking histograms per run ..." << endmsg;
+    ATH_MSG_WARNING( "given bad interval job-option: " << m_interval_str
+	<< " ... booking histograms per run ..." );
     is_new_interval = endOfRunFlag();
   }
 
@@ -2043,7 +2042,7 @@ StatusCode LArRawChannelMonTool::procHistograms()
 
   }
 
-  ATH_MSG(DEBUG) << "===> end " << name() << "::procHistograms <=== " << endmsg;
+  ATH_MSG_DEBUG( "===> end " << name() << "::procHistograms <=== " );
 
   return StatusCode::SUCCESS;
 
@@ -2062,8 +2061,8 @@ std::string LArRawChannelMonTool::threshold_histogram_title_snippet( const doubl
 
   } catch ( const bad_lexical_cast& err ) {
 
-    msg(MSG::WARNING) << "Could not include threshold for histogram titles."
-	<< err.what() << endmsg;
+    ATH_MSG_WARNING( "Could not include threshold for histogram titles."
+	<< err.what() );
     return "";
 
   }
@@ -2081,8 +2080,8 @@ std::string LArRawChannelMonTool::threshold_histogram_title_snippet( const int&
 
   } catch ( const bad_lexical_cast& err ) {
 
-    msg(MSG::WARNING) << "Could not include threshold for histogram titles."
-	<< err.what() << endmsg;
+    ATH_MSG_WARNING( "Could not include threshold for histogram titles."
+	<< err.what() );
     return "";
 
   }
@@ -2094,12 +2093,12 @@ bool LArRawChannelMonTool::registerHistogram( LWHist* histo, const std::string&
   MonGroup histGroup(this,dir,m_interval,ATTRIB_MANAGED,"",merge);
   if ( !histGroup.regHist(histo).isSuccess() ) {
 
-    msg(MSG::ERROR) << "Cannot book: " << histo->GetName() << endmsg;
+    ATH_MSG_ERROR( "Cannot book: " << histo->GetName() );
     return false;
 
   } else {
 
-    ATH_MSG(DEBUG) << "Booked: " << histo->GetName() << endmsg;
+    ATH_MSG_DEBUG( "Booked: " << histo->GetName() );
     return true;
 
   }
diff --git a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFCIter.cxx b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFCIter.cxx
index 3634d1484093d0b6737d0bd2e97e1556d6e63404..c2cdb788aeaf4099a90cd2e97181218ddfa6a5bf 100755
--- a/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFCIter.cxx
+++ b/LArCalorimeter/LArROD/src/LArRawChannelBuilderToolOFCIter.cxx
@@ -214,11 +214,11 @@ bool LArRawChannelBuilderToolOFCIter::buildRawChannel(const LArDigit* digit,
 
   float ADCPeak=0;
   float time=0.;
-  const LArOFPeakRecoTool::Result &results = m_peakReco->peak(m_signal, chid, gain, 
-							      m_defaultPhase, 
-							      nIteration,
-							      ipeak,peak_min, peak_max 
-							      );
+  const LArOFPeakRecoTool::Result results = m_peakReco->peak(m_signal, chid, gain, 
+							     m_defaultPhase, 
+							     nIteration,
+							     ipeak,peak_min, peak_max 
+							     );
 
   if (m_larOFIterCont) {
     //the iteration works always on teh same copy of the results object. Need to do a deep-copy in order to publish...
diff --git a/LArCalorimeter/LArRawConditions/doc/packagedoc.h b/LArCalorimeter/LArRawConditions/doc/packagedoc.h
index 9452f1b500c1fff8b01ab721fac86812dfe1a44b..ba0d22cf6e99c2e6c007dc7f3b3520cb4343daf5 100644
--- a/LArCalorimeter/LArRawConditions/doc/packagedoc.h
+++ b/LArCalorimeter/LArRawConditions/doc/packagedoc.h
@@ -140,16 +140,6 @@ href="http://isscvs.cern.ch/cgi-bin/viewcvs-all.cgi/offline/LArCalorimeter/LArEl
   - LArWFParamsDB
   - LArWFParams
 
-@ref used_LArRawConditions
 
-@ref requirements_LArRawConditions
 
 */
-
-/**
-@page used_LArRawConditions Used Packages
-*/
-
-/**
-@page requirements_LArRawConditions Requirements
-*/
diff --git a/LArCalorimeter/LArRecConditions/CMakeLists.txt b/LArCalorimeter/LArRecConditions/CMakeLists.txt
index d7e14a3d60934868b97b0b2c7cdf0b6e87a9d960..c083aa31167e6d8992a8e00937054140069277bb 100644
--- a/LArCalorimeter/LArRecConditions/CMakeLists.txt
+++ b/LArCalorimeter/LArRecConditions/CMakeLists.txt
@@ -30,3 +30,8 @@ atlas_add_dictionary( LArRecConditionsDict
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                       LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier AthenaKernel Identifier GaudiKernel LArRecConditions)
 
+atlas_add_test (test_LArBadChannelCont
+	        SOURCES
+	        test/test_LArBadChannelCont.cxx
+                LINK_LIBRARIES Identifier CxxUtils StoreGateLib LArRecConditions 
+               )
\ No newline at end of file
diff --git a/LArCalorimeter/LArRecConditions/LArRecConditions/BadChanService.h b/LArCalorimeter/LArRecConditions/LArRecConditions/BadChanService.h
deleted file mode 100644
index 4b75e980440e4325b6d91b1fcba075e93ed057b0..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArRecConditions/LArRecConditions/BadChanService.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef BadChanService_H
-#define BadChanService_H
-
-#include "LArRecConditions/LArBadChannel.h"
-#include "LArRecConditions/BadChanContainer.h"
-
-class BadChanService {
-public:
-
-	typedef unsigned int                                    ChannelType;
-	typedef BadChanContainer< ChannelType, LArBadChannel>   BadChanInfo;
-
-  static BadChanInfo& info() {
-    static BadChanInfo* m_info = 0;
-    if (m_info == 0) m_info = new BadChanInfo;
-    return *m_info;
-  }
-
-};
-
-#endif
diff --git a/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadChannel.h b/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadChannel.h
index e3fc679bf40a9fba6546213ac8da8ec2382cf161..882f3c368f8338a07f89c3c0eb784edbecf2b95a 100644
--- a/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadChannel.h
+++ b/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadChannel.h
@@ -65,6 +65,8 @@ class  LArBadChannel : public LArBadChannelEnum {
   bool operator==(BitWord other) {return m_word == other;}
   bool operator==(LArBadChannel other) {return m_word == other.packedData();}
 
+  LArBadChannel& operator|=(LArBadChannel other) {m_word|=other.m_word; return *this;}
+
   BitWord packedData() const {return m_word;}
 
  private:
diff --git a/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadChannelCont.h b/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadChannelCont.h
new file mode 100644
index 0000000000000000000000000000000000000000..713a382af03a903a54bf05427018b3f1749c6616
--- /dev/null
+++ b/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadChannelCont.h
@@ -0,0 +1,110 @@
+//Dear emacs, this is -*-c++-*-
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARRECCONDITIONS_LARBADCHANNELCONT_H
+#define LARRECCONDITIONS_LARBADCHANNELCONT_H
+
+#include <vector>
+#include <algorithm>
+#include "LArRecConditions/LArBadChannel.h"
+#include "LArRecConditions/LArBadFeb.h"
+#include "Identifier/HWIdentifier.h"
+
+/**
+ * @brief Conditions-Data class holding LAr Bad Channel or Bad Feb information
+ *
+ * Uses internally a vector<pair<channelID,LArBadChannel> >
+ * ordered by channel-id to speed up searching 
+ * Possible optimization: use a hash-indexed bitset to tell if the channel 
+ * is on the list. Avoid searching for 'good' channels which are the majority 
+ * Downside: Need acess the LArOnline_ID helper class for channel to hash conversion
+ * and a template specialization for the different hashes of FEBs and channels
+ * Or even keep a hash-indexed vector LArBadChannels for every channel, even good ones
+ */
+
+template<class LArBC_t>
+class LArBadXCont {
+ public:
+  typedef uint32_t ChanId_t;
+  typedef std::pair<ChanId_t,LArBC_t>          BadChanEntry;
+  typedef std::vector<BadChanEntry>            BadChanVec;
+  typedef typename BadChanVec::const_iterator  const_iterator;
+  typedef typename BadChanVec::size_type       size_type;
+
+public:
+
+  /// Default Constructor
+  
+  LArBadXCont() {}
+  
+  /// Constructor with payload
+  LArBadXCont( const BadChanVec& vec);
+
+  /**@brief Add a channel/FEB to the list of bad channels 
+   * @param channel HWIdenifier of the channel in question
+   * @param stat Bad-Channel object describing the disease this channels suffers
+   */
+  void add(const HWIdentifier channel, const LArBC_t stat);
+
+  /**@brief Sort and purge the list of bad channels 
+   * The list of bad channels get sorted by channel-ID
+   * For channels appearing more than once, the bad-channel word 
+   * gets merged by or'ing the problem-bits
+   */
+  void sort(); 
+  
+  /**@brief Query the status of a particular channel or FEB
+   * This is the main client access method
+   * @param HWIdentifer of the channel in question
+   * @return LArBadChannel or LArBadFeb object describing the problem
+   */
+  LArBC_t status(const HWIdentifier channel) const;
+
+
+  ///Access to the begin iterator of the underlying vector
+  const_iterator begin() const {return m_cont.begin();}
+
+  ///Access to the end iterator of the underlying vector
+  const_iterator end() const {return m_cont.end();}
+
+  ///Number of known bad channels 
+  size_type      size() const {return m_cont.size();}
+
+  /// Deletes the contents and sets size to 0 (same as stl::vector<T>::clear())
+  void clear() {m_cont.clear();}
+
+private:
+  ///Comparison functor for sorting and searching
+  struct ChannelLess {
+    bool operator()(const BadChanEntry& a, const BadChanEntry& b) const {
+      return a.first < b.first;
+    }
+  };
+
+  //The vector storing bad-channels
+  BadChanVec m_cont;
+};
+
+#include "LArRecConditions/LArBadChannelCont.icc"
+
+
+
+//Template instantiation for LArBadChannel
+typedef LArBadXCont<LArBadChannel> LArBadChannelCont;
+#include "CLIDSvc/CLASS_DEF.h" 
+CLASS_DEF(LArBadChannelCont,64272230,1)
+#include "AthenaKernel/CondCont.h"
+CLASS_DEF( CondCont<LArBadChannelCont>,144954956 , 1 )
+#include "SGTools/BaseInfo.h"
+SG_BASE( CondCont<LArBadChannelCont>, CondContBase );
+
+//Template instantiation for LArBadFeb
+typedef LArBadXCont<LArBadFeb> LArBadFebCont;
+CLASS_DEF(LArBadFebCont,60500160,1)
+CLASS_DEF(CondCont<LArBadFebCont>,18499682, 1)
+SG_BASE( CondCont<LArBadFebCont>, CondContBase );
+
+
+#endif
diff --git a/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadChannelCont.icc b/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadChannelCont.icc
new file mode 100644
index 0000000000000000000000000000000000000000..ea34d0589c9a47432753b098102214f377121ebe
--- /dev/null
+++ b/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadChannelCont.icc
@@ -0,0 +1,58 @@
+//Dear emacs, this is -*-c++-*-
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArRecConditions/LArBadChannelCont.h"
+
+//Constructor with payload
+template<class LArBC_t>
+LArBadXCont<LArBC_t>::LArBadXCont( const BadChanVec& vec): 
+  m_cont(vec) {
+  sort();
+}
+
+//Add a bad channel to the list of bad channels (no sorting!)
+template<class LArBC_t>
+void LArBadXCont<LArBC_t>::add(const HWIdentifier hwid, const LArBC_t stat) {
+  m_cont.push_back(std::make_pair(hwid.get_identifier32().get_compact(),stat));
+  return;
+}
+
+
+//Sorting method (call before recording!) 
+template<class LArBC_t>
+void LArBadXCont<LArBC_t>::sort() {
+  std::sort(m_cont.begin(), m_cont.end(), ChannelLess());
+
+  //Merge duplicate entries is needed ...
+  if (m_cont.size()>1) { //got at least 2 entries
+    auto it=m_cont.begin();
+    while (it+1!=m_cont.end()) {
+      auto it2=it+1;
+      if (it->first==it2->first) {//Same channel number
+	it2->second|=it->second;  //Merge (logical-or) bad channel status ...
+	it=m_cont.erase(it);   //... and delete first instance
+      }
+      else
+	++it;
+    }
+  }//end if got at least 2 entries
+}  
+
+//Main client acess method: Check the bad-channel status
+template<class LArBC_t>
+LArBC_t LArBadXCont<LArBC_t>::status(const HWIdentifier hwid) const {
+
+  const ChanId_t channel=hwid.get_identifier32().get_compact();
+
+  const_iterator i = 
+    std::lower_bound( m_cont.begin(), m_cont.end(), BadChanEntry( channel,(LArBC_t) 0),
+		      ChannelLess());
+  if (i != m_cont.end() && i->first == channel) {
+    return i->second;
+  }
+  else {
+    return LArBC_t(0);
+  }
+}
diff --git a/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadFeb.h b/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadFeb.h
index dbfde38806c4aa7a0ee7d919c202dba5bfc6aa00..ffe5d99de6fa23a2290a0220b38a699419177792 100644
--- a/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadFeb.h
+++ b/LArCalorimeter/LArRecConditions/LArRecConditions/LArBadFeb.h
@@ -47,6 +47,8 @@ public:
   bool operator==(BitWord other) {return m_word == other;}
   bool operator==(LArBadFeb other) {return m_word == other.packedData();}
 
+  LArBadFeb& operator|=(LArBadFeb other) {m_word|=other.m_word; return *this;}
+
   BitWord packedData() const {return m_word;}
 
 private:
diff --git a/LArCalorimeter/LArRecConditions/share/test_LArBadChannelCont.ref b/LArCalorimeter/LArRecConditions/share/test_LArBadChannelCont.ref
new file mode 100644
index 0000000000000000000000000000000000000000..bb7826bf0cc10b5c53686a2178b62a3b99e331e4
--- /dev/null
+++ b/LArCalorimeter/LArRecConditions/share/test_LArBadChannelCont.ref
@@ -0,0 +1 @@
+Status= highNoiseHG sporadicBurstNoise
diff --git a/LArCalorimeter/LArRecConditions/test/BadChanSvcTest.cpp b/LArCalorimeter/LArRecConditions/test/BadChanSvcTest.cpp
deleted file mode 100644
index 8510538093b6cd4ae8dcec1a6622457347d4b18d..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArRecConditions/test/BadChanSvcTest.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "BadChanService.h"
-#include "LArBadChannelParser.h"
-#include "LArBadChanBitPacking.h"
-#include <iostream>
-#include <cstdlib>
-#include <cmath>
-
-using namespace std;
-
-int main() {
-	
-	typedef BadChanService::BadChanInfo        BadChanInfo;
-	typedef BadChanInfo::BadChanVec            BadChanVec;
-	
-	string name="";
-	cout << "Input filename: " <<endl;
-	cin >> name;
-
-	LArBadChannelParser myParser(name);
-	if(!myParser.fileStatusGood()) cout << "File no good!" << endl;
-	vector<LArBadChannelParser::BadChannelEntry> res = myParser.parseAll();
-	if( res.size()==0) cout << "Empty result!" << endl;
-	
-	BadChanVec bcv;
-	LArBadChanBitPacking packing;
-	for (vector<LArBadChannelParser::BadChannelEntry>::const_iterator i = res.begin();
-		 i != res.end(); ++i) {
-		cout << i->channel << " "
-		<< i->status.packedData() 
-		<< " " << packing.stringStatus( i->status)
-		<< endl;
-		
-		bcv.push_back( BadChanVec::value_type( i->channel, i->status));
-	}
-	
-	BadChanInfo& bci = BadChanService::info();
-	bci.set(bcv);
-
-	cout << endl << "BCI has size " << bci.size() << endl;
-	for (BadChanInfo::const_iterator i=bci.begin(); i!=bci.end(); ++i) {
-		cout << i->first << " " << packing.stringStatus( i->second) << endl;
-	}
-	
-	for (vector<LArBadChannelParser::BadChannelEntry>::const_iterator i = res.begin();
-		 i != res.end(); ++i) {
-		LArBadChannel bc = bci.status(i->channel);
-		cout << i->channel << " "
-		<< bc.packedData() 
-		<< " " << packing.stringStatus( bc)
-		<< endl;
-	}
-
-	
-}
diff --git a/LArCalorimeter/LArRecConditions/test/test_LArBadChannelCont.cxx b/LArCalorimeter/LArRecConditions/test/test_LArBadChannelCont.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..976ca0942cabaf5acb08352c42bbe77d77e93469
--- /dev/null
+++ b/LArCalorimeter/LArRecConditions/test/test_LArBadChannelCont.cxx
@@ -0,0 +1,46 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArRecConditions/LArBadChannelCont.h"
+#include "LArRecConditions/LArBadChannelEnum.h"
+
+
+int main (int /*argc*/, char** /*argv[]*/) {
+
+  LArBadChannelCont cont;
+
+  HWIdentifier id1(0x39569400);
+  LArBadChannel bc1(0x1 << LArBadChannelEnum::sporadicBurstNoiseBit |
+		    0x1 << LArBadChannelEnum::highNoiseHGBit);
+  cont.add(id1,bc1);
+
+  HWIdentifier id2(0x39568f00);
+  LArBadChannel bc2(0x1 << LArBadChannelEnum::deadReadoutBit);
+  cont.add(id2,bc2);
+
+  HWIdentifier id3(0x3956be00);
+  LArBadChannel bc3(0x1 << LArBadChannelEnum::deadPhysBit);
+  cont.add(id3,bc3);
+
+  LArBadChannel bc2a(0x1 << LArBadChannelEnum::deadCalibBit);
+  cont.add(id2,bc2a);
+  
+  
+  cont.sort();
+  
+  const LArBadChanBitPacking packing;
+  std::cout << "Status= " << packing.stringStatus(cont.status(id1)) << std::endl;
+ 
+  if (!(cont.status(id1).sporadicBurstNoise() && cont.status(id1).highNoiseHG())) return 1;
+  if (!(cont.status(id2).deadReadout() && cont.status(id2).deadCalib())) return 1;
+
+  if (!cont.status(id3).deadPhys()) return 1;
+      
+  HWIdentifier id4(0x38c81700);
+  if (!cont.status(id4).good()) return 1;
+
+
+
+ return 0;
+}
diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArFlatConditionSvc.h b/LArCalorimeter/LArRecUtils/LArRecUtils/LArFlatConditionSvc.h
index c2affb9ddd8bd74e4d21f19814372519f296ac3c..83e94605d0f97069058f0eb5d7aee2c3ec4faa17 100644
--- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArFlatConditionSvc.h
+++ b/LArCalorimeter/LArRecUtils/LArRecUtils/LArFlatConditionSvc.h
@@ -59,7 +59,9 @@ class LArFlatConditionSvc : public virtual IAddressProvider,
   { return StatusCode::SUCCESS;}
 
   /// update a transient Address
-  virtual StatusCode updateAddress(StoreID::type, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
 
   ///Incident handle
   virtual void handle( const Incident& incident );
diff --git a/LArCalorimeter/LArRecUtils/LArRecUtils/LArOFPeakRecoTool.h b/LArCalorimeter/LArRecUtils/LArRecUtils/LArOFPeakRecoTool.h
index 0302749f6e0d263caf8481724378d391b59ca7a7..92e9eed547c7b06f2e01a51236fbde51b541b078 100755
--- a/LArCalorimeter/LArRecUtils/LArRecUtils/LArOFPeakRecoTool.h
+++ b/LArCalorimeter/LArRecUtils/LArRecUtils/LArOFPeakRecoTool.h
@@ -56,17 +56,17 @@ class LArOFPeakRecoTool: public AthAlgTool
   // Retrieve interface ID
   static const InterfaceID& interfaceID() { return IID_LArOFPeakRecoTool;}
 
-  const Result& peak (const std::vector<short>& samples, HWIdentifier chID, CaloGain::CaloGain gain, int delay);
-
-  const Result& peak(const std::vector<float>& samples, // raw data after pedestal subtraction
-		     const HWIdentifier chID,           // online channel id
-		     const CaloGain::CaloGain gain,     // gain 
-		     const float delayIn,               // initial delay for Shape and OFC  
-		     const unsigned  nIter=0,		  // number of iteration 
-		     const unsigned npeak=2,            // initial peak position.                  
-		     unsigned peak_low=2,         // lower limit for peak position
-		     unsigned peak_high=2        // upper limit for peak position
-		     );
+  LArOFIterResults peak (const std::vector<short>& samples, HWIdentifier chID, CaloGain::CaloGain gain, int delay) const;
+
+  LArOFIterResults peak(const std::vector<float>& samples, // raw data after pedestal subtraction
+			const HWIdentifier chID,           // online channel id
+			const CaloGain::CaloGain gain,     // gain 
+			const float delayIn,               // initial delay for Shape and OFC  
+			const unsigned  nIter=0,		  // number of iteration 
+			const unsigned npeak=2,            // initial peak position.                  
+			unsigned peak_low=2,         // lower limit for peak position
+			unsigned peak_high=2        // upper limit for peak position
+			) const;
 
   // initialize and finalize methods
   virtual StatusCode initialize();
@@ -87,8 +87,6 @@ class LArOFPeakRecoTool: public AthAlgTool
   int m_delayShift;
   float m_samplingPeriod;
   bool m_forceHighGain;
-  //LArOFIterResults m_result;
-  Result m_result;
 
   const LArOnlineID*        m_lar_on_id; 
 
diff --git a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
index 95f4afb4d77b988f39047b1bf0d337f36c959a09..eae29a841b74ba9bf680d17812681d9a0082ecba 100644
--- a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
+++ b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
@@ -1,30 +1,28 @@
-Fri Feb 17 13:58:26 EST 2017
-WARNING: TCMALLOCDIR not defined, will use libc malloc
+Tue Sep  5 00:34:55 CEST 2017
+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 [AthenaWorkDir-22.0.0] [x86_64-slc6-gcc62-dbg] [atlas-work3/ed8ca9194f] -- built on [2017-09-05T0012]
 Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "LArRecUtils/LArFCalTowerBuilderTool_test.py"
-SetGeometryVersion.py obtained major release version 21
+SetGeometryVersion.py obtained major release version 22
 Py:Athena            INFO including file "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.py"
-Py:ConfigurableDb    INFO Read module info for 4102 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5393 configurables from 60 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
-EventInfoMgtInit: Got release version  sss-rel_0
+EventInfoMgtInit: Got release version  Athena-22.0.0
 Py:IOVDbSvc.CondDB    INFO Setting up conditions DB access to instance OFLP200
-Data source lookup using /home/sss/atlas/DBRelease/dblookup.xml file
 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 "TileIdCnv/TileIdCnv_jobOptions.py"
-# setting LC_ALL to "C"
-ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
+[?1034hApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Fri Feb 17 13:59:22 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
+                                          running on lxplus013.cern.ch on Tue Sep  5 00:35:10 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Successfully loaded modules : AthenaServices
 ApplicationMgr       INFO Application Manager Configured successfully
@@ -34,26 +32,30 @@ Py:Athena            INFO including file "AthenaCommon/runbatch.py"
 StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 13274 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 13161 CLIDRegistry entries for module ALL
 ChronoStatSvc        INFO  Number of skipped events for MemStat-1
 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 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 Read replica configuration from /home/sss/atlas/rootaccess/build/share/dbreplica.config
-DBReplicaSvc         INFO No specific match for domain found - use default fallback
-DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://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/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config
+DBReplicaSvc         INFO Total of 10 servers found for host lxplus013.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
-PoolSvc              INFO Resolved path (via DATAPATH) is /home/sss/atlas/DBRelease/current/poolcond/PoolCat_oflcond.xml
+PoolSvc           WARNING Unable to locate catalog for prfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc           WARNING Unable to locate catalog for apcfile:poolcond/PoolCat_oflcond.xml check your ATLAS_POOLCOND_PATH and DATAPATH variables
+PoolSvc              INFO 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] 
 PoolSvc              INFO Re-initializing PoolSvc
 IOVDbSvc             INFO Opened read transaction for POOL PersistencySvc
 IOVDbSvc             INFO Only 5 POOL conditions files will be open at once
+IOVDbSvc             INFO Cache alignment will be done in 3 slices
 IOVDbSvc             INFO Global tag: OFLCOND-SDR-BS14T-IBL-06 set from joboptions
 IOVDbSvc             INFO Read from meta data only for folder /TagInfo
 IOVDbSvc             INFO Initialised with 3 connections and 7 folders
@@ -67,30 +69,33 @@ RalDatabaseSvc Info Instantiate the RalDatabaseSvc
 CoralApplication Info Create a cool::CoralApplication... DONE
 RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_LAR/OFLP200'
 RalSessionMgr Info Connect to the database server
-CORAL/Services/ConnectionService Info Re-ordering 14 replicas using installed algorithm
-CORAL/Services/ConnectionService Info Sorting algorithm selected 2 replicas
-CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" )' - do NOT retry
+RalSessionMgr Warning Use COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP
+CORAL/Services/ConnectionService Info ConnectionServiceConfiguration::setConnectionTimeOut 0
+CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
+CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
+CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/sqlite200 is not writable" )' - do NOT retry
 CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#3 will be disconnected
-CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" )
-CORAL/Services/ConnectionService Info New connection to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" with connectionID=C#4 has been connected
-CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" for user "" in read-only mode
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/sqlite200 is not writable" )
+CORAL/RelationalPlugins/frontier Info The current compresion level is 5
+CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#4 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#2(C#4.s#1) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode
 RalSessionMgr Info Start a read-only transaction active for the duration of the database connection
 RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_LAR/OFLP200'
-RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.9.4 will be opened using CURRENT client release number 3.1.6
+RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.7.0 will be opened using CURRENT client release number 3.1.8
 IOVSvc               INFO No IOVSvcTool associated with store "StoreGateSvc"
 IOVSvcTool           INFO IOVRanges will be checked at every Event
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_CALO/OFLP200
 RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_CALO/OFLP200'
 RalSessionMgr Info Connect to the database server
-CORAL/Services/ConnectionService Info Re-ordering 14 replicas using installed algorithm
-CORAL/Services/ConnectionService Info Sorting algorithm selected 2 replicas
-CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
+CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
+CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/sqlite200 is not writable" )' - do NOT retry
 CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#5 will be disconnected
-CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" )
-CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" for user "" in read-only mode
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/sqlite200 is not writable" )
+CORAL/Services/ConnectionService Info New user session with sessionID=S#3(C#4.s#2) started on connectionID=C#4 to service "ATLF/()" for user "" in read-only mode
 RalSessionMgr Info Start a read-only transaction active for the duration of the database connection
 RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_CALO/OFLP200'
-RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.9.4 will be opened using CURRENT client release number 3.1.6
+RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.8.4 will be opened using CURRENT client release number 3.1.8
 IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection
 RalSessionMgr Info Disconnect from the database server
@@ -101,7 +106,7 @@ IOVDbSvc             INFO Disconnecting from COOLOFL_CALO/OFLP200
 RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection
 RalSessionMgr Info Disconnect from the database server
 CORAL/Services/ConnectionService Info User session with sessionID=S#3(C#4.s#2) will be ended on connectionID=C#4
-CORAL/Services/ConnectionService Info Connection to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" with connectionID=C#4 will be disconnected
+CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#4 will be disconnected
 RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_CALO/OFLP200'
 RalSessionMgr Info Delete the RalSessionMgr for 'COOLOFL_CALO/OFLP200'
 IOVDbSvc             INFO Added taginfo remove for /LAR/Align
@@ -151,15 +156,19 @@ DetDescrCnvSvc       INFO  filling address for CaloCell_ID with CLID 123500438 a
 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          INFO Retrieved DetectorTools = PrivateToolHandleArray(['LArDetectorToolNV/LArDetectorToolNV','TileDetectorTool/TileDetectorTool'])
 CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
-CORAL/Services/ConnectionService Info Sorting algorithm selected 3 replicas
-CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/geomDB is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
+CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/geomDB is not writable" )' - do NOT retry
 CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#6 will be disconnected
-CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/geomDB is not writable" )
-CORAL/Services/ConnectionService Info New connection to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" with connectionID=C#7 has been connected
-CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" for user "" in read-only mode
-ClassIDSvc           INFO  getRegistryEntries: read 2896 CLIDRegistry entries for module ALL
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/geomDB is not writable" )
+CORAL/RelationalPlugins/frontier Info The current compresion level is 5
+CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#7 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#4(C#7.s#1) started on connectionID=C#7 to service "ATLF/()" for user "" in read-only mode
+GeoModelSvc::RD...WARNING  Getting PixTBMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting PixTBMaterials with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMatComponents with default tag
+GeoModelSvc::RD...WARNING  Getting InDetMaterials with default tag
+ClassIDSvc           INFO  getRegistryEntries: read 3452 CLIDRegistry entries for module ALL
 GeoModelSvc.LAr...   INFO Keys for LAr are ATLAS-R2-2015-03-01-00  ATLAS
 GeoModelSvc.LAr...   INFO Building LAr version LAr-Revised-17-01 while ATLAS version is ATLAS-R2-2015-03-01-00
 GeoModelSvc.LAr...   INFO LAr Geometry Options:
@@ -197,13 +206,13 @@ IdDictDetDescrCnv    INFO Dictionary MuonSpectrometer     version R.02
 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
-ClassIDSvc           INFO  getRegistryEntries: read 111 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 115 CLIDRegistry entries for module ALL
 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= 5840Kb 	 Time = 0.89S
+GeoModelSvc          INFO GeoModelSvc.LArDetectorToolNV	 SZ= 27692Kb 	 Time = 1.95S
 GeoModelSvc.Til...   INFO  Entering TileDetectorTool::create()
 GeoModelSvc.Til...   INFO TileDddbManager: m_tag = ATLAS-R2-2015-03-01-00
 GeoModelSvc.Til...   INFO TileDddbManager: n_tiglob = 5
@@ -214,7 +223,7 @@ GeoModelSvc.Til...   INFO TileDddbManager: n_tilb = 21
 GeoModelSvc.Til...   INFO TileDddbManager: n_tileSwitches = 1
 CaloIDHelper_ID...   INFO in createObj: creating a TileID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-TileNeighbour        INFO Reading file  /home/sss/atlas/rootaccess/build/share/TileNeighbour_reduced.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/TileNeighbour_reduced.txt
 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
@@ -222,9 +231,9 @@ CaloIDHelper_ID...   INFO in createObj: creating a LArHEC_ID helper object in th
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIDHelper_ID...   INFO in createObj: creating a LArFCAL_ID helper object in the detector store
 AtlasDetectorID      INFO initialize_from_dictionary - OK
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal2DNeighbors-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal3DNeighborsNext-April2011.txt
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCal3DNeighborsPrev-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/FCal2DNeighbors-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/FCal3DNeighborsNext-April2011.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-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.
@@ -261,15 +270,13 @@ GeoModelSvc.Til...   INFO  Global positioning of positive ext.barrel with rotati
 GeoModelSvc.Til...   INFO  Global positioning of negative ext.barrel with rotation (0,0,0)) and translation (0,0,1) CLHEP::cm
 GeoModelSvc.Til...   INFO  TileDetDescrManager: entering create_elements() 
 ClassIDSvc           INFO  getRegistryEntries: read 6 CLIDRegistry entries for module ALL
-GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 3832Kb 	 Time = 0.22S
+GeoModelSvc          INFO GeoModelSvc.TileDetectorTool	 SZ= 4900Kb 	 Time = 1.88S
 CORAL/Services/ConnectionService Info User session with sessionID=S#4(C#7.s#1) will be ended on connectionID=C#7
-CORAL/Services/ConnectionService Info Connection to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" with connectionID=C#7 will be disconnected
-ClassIDSvc           INFO  getRegistryEntries: read 63 CLIDRegistry entries for module ALL
+CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#7 will be disconnected
+ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-AthMasterSeq         INFO Member list: AthSequencer/AthAlgSeq, AthSequencer/AthOutSeq, AthSequencer/AthRegSeq
-AthAlgSeq            INFO Member list: LArFCalTowerBuilderToolTestAlg/towertest
 CaloIdMgrDetDes...   INFO in createObj: creating a CaloDescrManager object in the detector store
-ClassIDSvc           INFO  getRegistryEntries: read 395 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 318 CLIDRegistry entries for module ALL
 CaloIDHelper_ID...   INFO in createObj: creating a CaloDM_ID helper object in the detector store
 CaloDM_ID            INFO initialize_from_dictionary
 AtlasDetectorID      INFO initialize_from_dictionary - OK
@@ -286,12 +293,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 /home/sss/atlas/rootaccess/build/share/FCalSuperCells2DNeighborsNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
-LArFCAL_Base_ID      INFO Reading file /home/sss/atlas/rootaccess/build/share/FCalSuperCells3DNeighborsPrevNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/FCalSuperCells2DNeighborsNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/FCalSuperCells3DNeighborsNextNew-April2014.txt
+LArFCAL_Base_ID      INFO Reading file /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-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  /home/sss/atlas/rootaccess/build/share/TileSuperCellNeighbour.txt
+TileNeighbour        INFO Reading file  /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-09-03T2251/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/TileSuperCellNeighbour.txt
 AtlasDetectorID      INFO initialize_from_dictionary - OK
 CaloIdMgrDetDes...   INFO  Finished 
 CaloIdMgrDetDes...   INFO Initializing CaloIdMgr from values in CaloIdMgrDetDescrCnv 
@@ -302,20 +309,21 @@ 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 104 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 114 CLIDRegistry entries for module ALL
 IOVDbSvc             INFO Opening COOL connection for COOLOFL_LAR/OFLP200
 RalSessionMgr Info Instantiate a R/O RalSessionMgr for 'COOLOFL_LAR/OFLP200'
 RalSessionMgr Info Connect to the database server
-CORAL/Services/ConnectionService Info Re-ordering 14 replicas using installed algorithm
-CORAL/Services/ConnectionService Info Sorting algorithm selected 2 replicas
-CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
+CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
+CORAL/Services/ConnectionService Warning Failed to connect to service sqlite200/ALLP200.db (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/sqlite200 is not writable" )' - do NOT retry
 CORAL/Services/ConnectionService Info Connection to service "sqlite200/ALLP200.db" with connectionID=C#8 will be disconnected
-CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/sqlite200 is not writable" )
-CORAL/Services/ConnectionService Info New connection to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" with connectionID=C#9 has been connected
-CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" for user "" in read-only mode
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:sqlite200/ALLP200.db": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/sqlite200 is not writable" )
+CORAL/RelationalPlugins/frontier Info The current compresion level is 5
+CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#9 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#5(C#9.s#1) started on connectionID=C#9 to service "ATLF/()" for user "" in read-only mode
 RalSessionMgr Info Start a read-only transaction active for the duration of the database connection
 RelationalDatabase Info Instantiate a R/O RalDatabase for 'COOLOFL_LAR/OFLP200'
-RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.9.4 will be opened using CURRENT client release number 3.1.6
+RelationalDatabase Info Release number backward compatibility - NO SCHEMA EVOLUTION REQUIRED: database with OLDER release number 2.7.0 will be opened using CURRENT client release number 3.1.8
 IOVDbSvc             INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARAlign-mc11-00 for folder /LAR/Align
 IOVDbSvc             INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LArCellPositionShift-ideal for folder /LAR/LArCellPositionShift
 IOVDbSvc             INFO HVS tag OFLCOND-SDR-BS14T-IBL-06 resolved to LARIdentifierLArTTCellMapAtlas-HadFcalFix2 for folder /LAR/Identifier/LArTTCellMapAtlas
@@ -323,29 +331,40 @@ IOVDbSvc             INFO Disconnecting from COOLOFL_LAR/OFLP200
 RalSessionMgr Info Commit the read-only transaction active for the duration of the database connection
 RalSessionMgr Info Disconnect from the database server
 CORAL/Services/ConnectionService Info User session with sessionID=S#5(C#9.s#1) will be ended on connectionID=C#9
-CORAL/Services/ConnectionService Info Connection to service "/home/sss/atlas/DBRelease/current/sqlite200/ALLP200.db" with connectionID=C#9 will be disconnected
+CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#9 will be disconnected
 RelationalDatabase Info Delete the RalDatabase for 'COOLOFL_LAR/OFLP200'
 RalSessionMgr Info Delete the RalSessionMgr for '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] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
-Domain[ROOT_All] Info                           /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
-RootDatabase.open Info /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
-ClassIDSvc           INFO  getRegistryEntries: read 45 CLIDRegistry entries for module ALL
+Domain[ROOT_All] Info                           /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root
+RootDatabase.open Info /cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root File version:52200
+ClassIDSvc           INFO  getRegistryEntries: read 53 CLIDRegistry entries for module ALL
 CaloMgrDetDescrCnv   INFO in createObj: creating a Calo Detector Manager object in the detector store
 CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
-CORAL/Services/ConnectionService Info Sorting algorithm selected 3 replicas
-CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/geomDB is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
+CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/geomDB is not writable" )' - do NOT retry
 CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#10 will be disconnected
-CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/home/sss/nobackup/atlas/build/../tests/geomDB is not writable" )
-CORAL/Services/ConnectionService Info New connection to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" with connectionID=C#11 has been connected
-CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" for user "" in read-only mode
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/geomDB is not writable" )
+CORAL/RelationalPlugins/frontier Info The current compresion level is 5
+CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#11 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#6(C#11.s#1) started on connectionID=C#11 to service "ATLF/()" for user "" in read-only mode
 CORAL/Services/ConnectionService Info User session with sessionID=S#6(C#11.s#1) will be ended on connectionID=C#11
-CORAL/Services/ConnectionService Info Connection to service "/home/sss/atlas/DBRelease/current/geomDB/geomDB_sqlite" with connectionID=C#11 will be disconnected
-ClassIDSvc           INFO  getRegistryEntries: read 60 CLIDRegistry entries for module ALL
+CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#11 will be disconnected
+CORAL/Services/ConnectionService Info Re-ordering 3 replicas using installed algorithm
+CORAL/Services/ConnectionService Info Sorting algorithm selected 4 replicas
+CORAL/Services/ConnectionService Warning Failed to connect to service geomDB/geomDB_sqlite (coral::Exception): 'CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/geomDB is not writable" )' - do NOT retry
+CORAL/Services/ConnectionService Info Connection to service "geomDB/geomDB_sqlite" with connectionID=C#12 will be disconnected
+CORAL/Services/ConnectionService Warning Failure while attempting to connect to "sqlite_file:geomDB/geomDB_sqlite": CORAL/RelationalPlugins/sqlite ( CORAL : "Connection::connect" from "/afs/cern.ch/work/s/ssnyder/builds/atlas-work3/build-x86_64-slc6-gcc62-dbg/LArCalorimeter/LArRecUtils/unitTestRun/geomDB is not writable" )
+CORAL/RelationalPlugins/frontier Info The current compresion level is 5
+CORAL/Services/ConnectionService Info New connection to service "ATLF/()" with connectionID=C#13 has been connected
+CORAL/Services/ConnectionService Info New user session with sessionID=S#7(C#13.s#1) started on connectionID=C#13 to service "ATLF/()" for user "" in read-only mode
+CORAL/Services/ConnectionService Info User session with sessionID=S#7(C#13.s#1) will be ended on connectionID=C#13
+CORAL/Services/ConnectionService Info Connection to service "ATLF/()" with connectionID=C#13 will be disconnected
+ClassIDSvc           INFO  getRegistryEntries: read 61 CLIDRegistry entries for module ALL
 Domain[ROOT_All] Info ->  Access   DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
-Domain[ROOT_All] Info                           /home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root
-RootDatabase.open Info /home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root File version:52200
+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  <<<===
 test1
 towers
@@ -6750,36 +6769,35 @@ towers
 6398 100 63 0 
 6399 100 64 0 
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #1, run #1 1 events processed so far  <<<===
-/home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root Info Database being retired...
-Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
-/home/sss/atlas/DBRelease/current/poolcond/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root Info Database being retired...
+/cvmfs/atlas-condb.cern.ch/repo/conditions/cond08/cond08_mc.000003.gen.COND/cond08_mc.000003.gen.COND._0064.pool.root Info Database being retired...
 Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 8667C6F2-1559-DE11-A611-000423D9A21A
+/cvmfs/atlas-condb.cern.ch/repo/conditions/cond09/cond09_mc.000029.gen.COND/cond09_mc.000029.gen.COND._0002.pool.root Info Database being retired...
+Domain[ROOT_All] Info ->  Deaccess DbDatabase   READ      [ROOT_All] 06C9EAE8-6F5B-E011-BAAA-003048F0E7AC
+Domain[ROOT_All] Info >   Deaccess DbDomain     READ      [ROOT_All] 
 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...
+IncidentProcAlg1     INFO Finalize
+IncidentProcAlg2     INFO Finalize
 IdDictDetDescrCnv    INFO in finalize
-IOVDbSvc             INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.30 ))s
+IOVDbSvc             INFO Folder /LAR/Align (PoolRef) db-read 1/1 objs/chan/bytes 1/1/170 ((     0.27 ))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/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.00 ))s
-IOVDbSvc             INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 ((     0.02 ))s
+IOVDbSvc             INFO Folder /LAR/LArCellPositionShift (PoolRef) db-read 1/1 objs/chan/bytes 1/1/195 ((     0.05 ))s
+IOVDbSvc             INFO Folder /LAR/Identifier/LArTTCellMapAtlas (PoolRef) db-read 1/0 objs/chan/bytes 1/1/173 ((     0.07 ))s
 IOVDbSvc          WARNING Folder /LAR/Identifier/LArTTCellMapAtlas is requested but no data retrieved
-IOVDbSvc             INFO Total payload read from COOL: 538 bytes in ((      0.32 ))s
+IOVDbSvc             INFO Total payload read from COOL: 538 bytes in ((      0.39 ))s
 IOVDbSvc             INFO Connection sqlite://;schema=mycool.db;dbname=OFLP200 : nConnect: 0 nFolders: 0 ReadTime: ((     0.00 ))s
-IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: ((     0.32 ))s
+IOVDbSvc             INFO Connection COOLOFL_LAR/OFLP200 : nConnect: 2 nFolders: 3 ReadTime: ((     0.39 ))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= 0.51  [s] Ave/Min/Max=0.255(+-0.235)/ 0.02/ 0.49  [s] #=  2
-cObj_ALL             INFO Time User   : Tot= 0.55  [s] Ave/Min/Max=0.275(+-0.235)/ 0.04/ 0.51  [s] #=  2
-ChronoStatSvc        INFO Time User   : Tot= 3.88  [s]                                             #=  1
+cObjR_ALL            INFO Time User   : Tot= 0.89  [s] Ave/Min/Max=0.445(+-0.405)/ 0.04/ 0.85  [s] #=  2
+cObj_ALL             INFO Time User   : Tot= 0.99  [s] Ave/Min/Max=0.495(+-0.415)/ 0.08/ 0.91  [s] #=  2
+ChronoStatSvc        INFO Time User   : Tot= 19.8  [s]                                             #=  1
 *****Chrono*****     INFO ****************************************************************************************************
 ChronoStatSvc.f...   INFO  Service finalized successfully 
 ApplicationMgr       INFO Application Manager Finalized successfully
diff --git a/LArCalorimeter/LArRecUtils/share/LArOnOffMappingAlg.py b/LArCalorimeter/LArRecUtils/share/LArOnOffMappingAlg.py
index c7977df82dfebb8e9541a54bf75a8f2b68b59171..49516f1cf014927fdd4503d7075a0f9a1467621b 100644
--- a/LArCalorimeter/LArRecUtils/share/LArOnOffMappingAlg.py
+++ b/LArCalorimeter/LArRecUtils/share/LArOnOffMappingAlg.py
@@ -1,4 +1,4 @@
-include.block("LArRecConditions/LArOnOffMappingAlg.py")
+include.block("LArRecUtils/LArOnOffMappingAlg.py")
 
 from IOVDbSvc.CondDB import conddb
 conddb.addFolder("LAR","/LAR/Identifier/OnOffIdMap",className="AthenaAttributeList")
diff --git a/LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.cxx b/LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.cxx
index 271718ce583599335c48b81ff4b02db224970fcc..dbc934f8f58cf3cf0b68164a376794dff9830ae1 100644
--- a/LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArFlatConditionSvc.cxx
@@ -218,7 +218,9 @@ StatusCode LArFlatConditionSvc::preLoadAddresses(StoreID::type storeID,tadList&
 }
 
 
-StatusCode LArFlatConditionSvc::updateAddress(StoreID::type, SG::TransientAddress* tad) {
+StatusCode LArFlatConditionSvc::updateAddress(StoreID::type,
+                                              SG::TransientAddress* tad,
+                                              const EventContext& /*ctx*/) {
   // Provide TAD and associated range, actually reading the conditions data
 
 
diff --git a/LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx b/LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx
index c967531dbd6f2f408df59985ac80ea48d4f23f48..dded3d25ed98eb58b688220d40fcf646cc984b81 100755
--- a/LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArOFPeakRecoTool.cxx
@@ -64,9 +64,9 @@ StatusCode LArOFPeakRecoTool::initialize() {
 
 //////////////////////////////////////////////////////////////////////////////////////////////////
 
-const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(const std::vector<short>& samples, HWIdentifier chID,
-							 CaloGain::CaloGain gain, int delay) {
-
+LArOFIterResults LArOFPeakRecoTool::peak(const std::vector<short>& samples, HWIdentifier chID,
+					 CaloGain::CaloGain gain, int delay) const {
+  
   std::vector<float> newsamples;
   for(unsigned int i=0;i<samples.size();i++)
     {
@@ -78,35 +78,35 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(const std::vector<short
 
 
 /////////////////////////////////////////////////////////////////////////////////////////////////
-const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
-			   const std::vector<float>& samples, // raw data after pedestal subtraction
-			   const HWIdentifier chID,           // online channel id
-			   const CaloGain::CaloGain gain,     // gain 
-			   const float delayIn,               // initial delay for Shape and OFC  
-			   const unsigned nIter,		  // number of iteration 
-			   const unsigned npeak,            // initial peak position.                  
-			   unsigned peak_low,         // lower limit for peak position
-			   unsigned peak_high        // upper limit for peak position
-			   ){
-
-  float epsilon=0.001;
+LArOFIterResults LArOFPeakRecoTool::peak(const std::vector<float>& samples, // raw data after pedestal subtraction
+					 const HWIdentifier chID,           // online channel id
+					 const CaloGain::CaloGain gain,     // gain 
+					 const float delayIn,               // initial delay for Shape and OFC  
+					 const unsigned nIter,		  // number of iteration 
+					 const unsigned npeak,            // initial peak position.                  
+					 unsigned peak_low,         // lower limit for peak position
+					 unsigned peak_high        // upper limit for peak position
+					 ) const{
+
+  const float epsilon=0.001;
+  LArOFIterResults result;
 
   //Fill m_result with default/input values, 
   //calculation will be done with this object
-  m_result.m_valid=false;
-  m_result.m_converged=false;
-  m_result.m_amplitude= 0;
-  m_result.m_tau     =  0;
-  m_result.m_quality =  0;
-  m_result.m_delay_final      = delayIn;
-  m_result.m_peakSample_init  =  npeak; 
-  m_result.m_peakSample_final =  npeak; //Assumed index of highest sample (may change in the process)
-  m_result.m_chid = chID;
+  result.m_valid=false;
+  result.m_converged=false;
+  result.m_amplitude= 0;
+  result.m_tau     =  0;
+  result.m_quality =  0;
+  result.m_delay_final      = delayIn;
+  result.m_peakSample_init  =  npeak; 
+  result.m_peakSample_final =  npeak; //Assumed index of highest sample (may change in the process)
+  result.m_chid = chID;
   //Set some reference to improve readablity of the code:
-  unsigned& kMax =  m_result.m_peakSample_final; //Make reference just to have code more readable 
-  float& delay = m_result.m_delay_final;
-  float& q=m_result.m_quality;
-  unsigned& delayIdx=m_result.m_ofcIndex;
+  unsigned& kMax =  result.m_peakSample_final; //Make reference just to have code more readable 
+  float& delay = result.m_delay_final;
+  float& q=result.m_quality;
+  unsigned& delayIdx=result.m_ofcIndex;
   //Quantities used during iteration
   unsigned kIter=0;
   //Computation is done as double
@@ -122,7 +122,7 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
   //if (samples.size()<5){ 
   //  msg() << MSG::WARNING << "Not enough ADC samples (" << nSamples << ") found for channel 0x"  
  //	     << std::hex << chID.get_compact() << std::dec << endmsg;
- //   return m_result;
+ //   return result;
  // }
 
   // force uses of high gain if required for OFC and shape
@@ -150,7 +150,7 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
     timeMax =  (nOFCPhase-1)*timeBinWidth;
     if (timeBinWidth==0.) {
       ATH_MSG_ERROR( "timeBinWidth is zero for channel " << m_lar_on_id->channel_name(chID)  );
-      return m_result;
+      return result;
     }
     //Check if initial delay isn't too big
     if (delay>timeMax) delay=timeMax-epsilon;
@@ -170,14 +170,14 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
   //some sanity check on the OFCs
   if ( ofcSize == 0 || this_OFC_b.size() == 0 ) {
     ATH_MSG_DEBUG("OFC not found for channel " << m_lar_on_id->channel_name(chID));
-    return m_result;
+    return result;
   }
 
   if ( this_OFC_a.size() != this_OFC_b.size() ) {
     ATH_MSG_ERROR( "OFC a (" << this_OFC_a.size() << 
                    ")and b (" << this_OFC_b.size() << ") are not the same size for channel 0x" 
                    << std::hex << chID.get_compact() << std::dec  );
-    return m_result;
+    return result;
   }
 
   //Coerce kmax, peak_high and peak_low to someting that can work
@@ -186,7 +186,7 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
   if (peak_high<peak_low) {
     ATH_MSG_WARNING( "Channel 0x"  << std::hex << chID.get_compact() << std::dec 
                      << "Not enough ADC samples (" << nSamples << ") to apply " << ofcSize << " OFCs."  );
-    return m_result;
+    return result;
   }
   if(kMax<peak_low)  kMax=peak_low; 
   if(kMax>peak_high) kMax=peak_high; 
@@ -218,14 +218,14 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
     if ( this_OFC_a.size() == 0 || this_OFC_b.size() == 0 ) {
       ATH_MSG_DEBUG( "OFC not found for channel 0x"  << std::hex << chID.get_compact() << std::dec  );
       std::cout << "OFC not found for channel 0x"  << std::hex << chID.get_compact() << std::dec << std::endl;
-      return m_result;
+      return result;
     }
 
     if ( this_OFC_a.size() != this_OFC_b.size() ) {
       ATH_MSG_ERROR( "OFC a (" << this_OFC_a.size() << 
 	")and b (" << this_OFC_b.size() << ") are not the same size for channel 0x" 
 	  << std::hex << chID.get_compact() << std::dec  );
-      return m_result;
+      return result;
     }
     */
     
@@ -239,16 +239,16 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
       At += this_OFC_b.at(k) * this_sample ;
     }
     //Validate the result
-    m_result.m_valid = true; //Doesn't mean that the result is really good, but we have something
+    result.m_valid = true; //Doesn't mean that the result is really good, but we have something
     if ( A == 0 ) {
       ATH_MSG_DEBUG("Null amplitude: " << A << "  for channel" << m_lar_on_id->channel_name(chID));
-      m_result.m_amplitude=0;
-      m_result.m_tau=0;
-      return m_result;
+      result.m_amplitude=0;
+      result.m_tau=0;
+      return result;
     }
-    m_result.m_amplitude=A; 
-    m_result.m_tau = At / A ;
-    //std::cout << "Iteration step: " <<  kIter << " Delay=" << delay << " A = " << A << " tau=" << m_result.m_tau << std::endl;
+    result.m_amplitude=A; 
+    result.m_tau = At / A ;
+    //std::cout << "Iteration step: " <<  kIter << " Delay=" << delay << " A = " << A << " tau=" << result.m_tau << std::endl;
 
     //First iteration done, break loop if possible.... 
     if (mynIter<=1) {
@@ -263,8 +263,8 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
     }
 
     // if we are within +-0.5*Dt of time bin, we have converged for sure
-    if (fabs(m_result.m_tau) <= (0.5*timeBinWidth)) { 
-      m_result.m_converged=true;
+    if (fabs(result.m_tau) <= (0.5*timeBinWidth)) { 
+      result.m_converged=true;
      // std::cout << "Converged." << std::endl;
       delay = delayIdx*timeBinWidth;
       break;
@@ -273,33 +273,33 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
     if (kIter>=mynIter) { //Max. number of iterations reached
       //std::cout << "Did not converge after " << nIter << " iterations." << std::endl;
       delay = delayIdx*timeBinWidth;
-      if (m_result.m_converged) {
-        if (fabs(tau_save) < fabs(m_result.m_tau)) {
-            m_result.m_amplitude = amplitude_save;
-            m_result.m_tau       = tau_save;
+      if (result.m_converged) {
+        if (fabs(tau_save) < fabs(result.m_tau)) {
+            result.m_amplitude = amplitude_save;
+            result.m_tau       = tau_save;
             kMax                 = kMax_save;
             delay                = delay_save;
             delayIdx             = delayIdx_save;
         }
       }
-      if (fabs(m_result.m_tau) <= timeBinWidth) m_result.m_converged=true;
+      if (fabs(result.m_tau) <= timeBinWidth) result.m_converged=true;
       break;
     }
 
     // if we are within +-Dt of time bin, we consider that we have converged but we allow for one more
     // iteration to see if we can find a smaller tau, if not we keep the previous one
-    if (fabs(m_result.m_tau) <= timeBinWidth) {
-       m_result.m_converged = true;
+    if (fabs(result.m_tau) <= timeBinWidth) {
+       result.m_converged = true;
        mynIter = kIter+1;    // allow only for more iteration
-       amplitude_save = m_result.m_amplitude;
-       tau_save       = m_result.m_tau;
+       amplitude_save = result.m_amplitude;
+       tau_save       = result.m_tau;
        kMax_save      = kMax;
        delay_save     =  delayIdx*timeBinWidth;
        delayIdx_save  = delayIdx;
     }
 
     //std::cout << "not yet converged" << std::endl ;
-    delay = delay - m_result.m_tau;  // moved this line up so first iteration delay results treated like subsequent
+    delay = delay - result.m_tau;  // moved this line up so first iteration delay results treated like subsequent
 
     if(delay<(-0.5*timeBinWidth)) { 
       if(kMax<peak_high){ 
@@ -341,7 +341,7 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
   // go back to overal time
   delay = delay + timeOffset;  // sign to check
 
-  //std::cout << "Done! A= " << m_result.m_amplitude << " ; tau= " << m_result.m_tau << " kIter=" << kIter << " nIter=" << nIter << std::endl;
+  //std::cout << "Done! A= " << result.m_amplitude << " ; tau= " << result.m_tau << " kIter=" << kIter << " nIter=" << nIter << std::endl;
   // get shape
   if (m_useShape){
     q = 0.; 
@@ -352,9 +352,9 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
       for ( unsigned k=0 ; k<ofcSize ; k++ ) {
 	const float& this_sample = samples[kMax-2+k];
          if (m_useShapeDer && thisShapeDer.size() >= ofcSize) 
-	    q += std::pow((m_result.m_amplitude*(thisShape[k]-m_result.m_tau*thisShapeDer[k]) - this_sample),2); 
+	    q += std::pow((result.m_amplitude*(thisShape[k]-result.m_tau*thisShapeDer[k]) - this_sample),2); 
         else
-            q += std::pow((m_result.m_amplitude*thisShape[k] - this_sample),2);
+            q += std::pow((result.m_amplitude*thisShape[k] - this_sample),2);
       }
     }
     else {
@@ -362,7 +362,7 @@ const LArOFPeakRecoTool::Result& LArOFPeakRecoTool::peak(
     } 
   }
 
-  m_result.m_nIterPerf = kIter;
-  m_result.m_valid    =    true;
-  return m_result;
+  result.m_nIterPerf = kIter;
+  result.m_valid    =    true;
+  return result;
 }
diff --git a/LArCalorimeter/LArRecUtils/src/LArOnOffMappingAlg.cxx b/LArCalorimeter/LArRecUtils/src/LArOnOffMappingAlg.cxx
index a1d3753a5a56de6c4f7c2d64e93e467361e1a3c8..adc2230ab10e2007a4d5992c0c09220f9d1a807c 100644
--- a/LArCalorimeter/LArRecUtils/src/LArOnOffMappingAlg.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArOnOffMappingAlg.cxx
@@ -16,8 +16,8 @@
 
 LArOnOffMappingAlg::LArOnOffMappingAlg(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
-  m_readKey("/LAr/Identifier/LArOnOnffMap"),
-  m_writeKey("LArOnOffMap","LArOnOffMap"),
+  m_readKey("/LAr/Identifier/OnOnffMap"),
+  m_writeKey("LArOnOffIdMap","LArOnOffIdMap"),
   m_condSvc("CondSvc",name),
   m_isSuperCell(false)
 {
diff --git a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
index 769f0a86a2d3e858adc51d17984ff14966138716..6bab8977f8d2fab79ff34b17fdd1d6b11a424ae6 100644
--- a/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
+++ b/LArCalorimeter/LArTest/LArConditionsTest/CMakeLists.txt
@@ -62,7 +62,7 @@ function (larconditions_run_test testName)
                   @ONLY )
   atlas_add_test( ${testName}
                   SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/larconditions_${testName}.sh
-                  ENVIRONMENT ATLAS_REFERENCE_TAG=LArConditionsTest/LArConditionsTest-01-00-01
+                  ENVIRONMENT ATLAS_REFERENCE_TAG=LArConditionsTest/LArConditionsTest-01-00-02
                   PROPERTIES TIMEOUT 1200
                   EXTRA_PATTERNS "Data source lookup|Resolved path|Failed to connect to service|Release number|Sorting algorithm|Failed to connect|Failure while attempting to connect|Reading file|^CORAL/|being retired|^Domain|INFO GeoModelSvc|locate catalog|Cache alignment|COOL_DISABLE|Failed to get ContainerHandle|^RalSessionMgr Info|^RelationalDatabase Info"
                    )
diff --git a/MagneticField/MagFieldServices/MagFieldServices/AtlasFieldSvc.h b/MagneticField/MagFieldServices/MagFieldServices/AtlasFieldSvc.h
index 5860f0725594b5564880788cf4ad2294774eb73c..c1d4cd025e023c5eba56a12d8cc01ad1849607d2 100644
--- a/MagneticField/MagFieldServices/MagFieldServices/AtlasFieldSvc.h
+++ b/MagneticField/MagFieldServices/MagFieldServices/AtlasFieldSvc.h
@@ -50,15 +50,15 @@ namespace MagField {
       virtual ~AtlasFieldSvc();
 
       /** Athena algorithm's interface methods */
-      StatusCode  initialize();
-      StatusCode  finalize();
+      virtual StatusCode  initialize() override;
+      virtual StatusCode  finalize() override;
 
       /** Read **/
-      void handle(const Incident& runIncident);
+      virtual void handle(const Incident& runIncident) override;
 
       /** Query the interfaces **/
-      StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
-
+      virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override;
+     
       /** Call back for possible magnet current update **/
       StatusCode updateCurrent(IOVSVC_CALLBACK_ARGS);
 
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcAth/doc/packagedoc.h b/MuonSpectrometer/Amdcsimrec/AmdcAth/doc/packagedoc.h
index 27a97fd527e794287f5080f5be5d55087290f06d..732b2134b9e0408742d3cf7e4bcee42f851cbdbb 100644
--- a/MuonSpectrometer/Amdcsimrec/AmdcAth/doc/packagedoc.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcAth/doc/packagedoc.h
@@ -21,15 +21,5 @@ The AmdcAth package contains:
 
 @section AmdcAth_ExtrasAmdcAth Extra Pages
 
-  - @ref used_AmdcAth
-  - @ref requirements_AmdcAth
 
 */
-
-/**
-@page used_AmdcAth Used Packages
-*/
-
-/**
-@page requirements_AmdcAth Requirements
-*/
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx b/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx
index c074918e1ad95fa14da8807cbb5a945a9708c2d6..d3938cc2c6af213251791e3c0e12903a09ea68f3 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx
+++ b/MuonSpectrometer/Amdcsimrec/AmdcAth/src/AmdcsimrecAthenaSvc.cxx
@@ -537,8 +537,6 @@ StatusCode AmdcsimrecAthenaSvc::initializeFromOracle()
     return StatusCode::FAILURE;
   }
 
-  pIRDBAccessSvc->connect();
-
   ATH_MSG_DEBUG( "      Keys are  (key) "  << m_detectorKey  
       << " (node) " << m_detectorNode 
       ) ;
@@ -584,8 +582,6 @@ StatusCode AmdcsimrecAthenaSvc::initializeFromOracle()
   }
   ATH_MSG_DEBUG( "      AGDD2GeoSwitches data collected " ) ;
 
-  pIRDBAccessSvc->shutdown();
-
   if (m_CtrlFileOracle==1){
     std::ofstream  GeneratedFile;
     GeneratedFile.open("Generated_amdb_simrec_Oracle");
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcCore/doc/packagedoc.h b/MuonSpectrometer/Amdcsimrec/AmdcCore/doc/packagedoc.h
index 368ece254e494c1526f79af060bc20b0d9f68d24..68cefd4cfcb3b2da863dbee668065c60c888f67f 100644
--- a/MuonSpectrometer/Amdcsimrec/AmdcCore/doc/packagedoc.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcCore/doc/packagedoc.h
@@ -23,15 +23,5 @@ The AmdcCore package contains:
  
 @section AmdcCore_ExtrasAmdcCore Extra Pages
 
-  - @ref used_AmdcCore
-  - @ref requirements_AmdcCore
 
 */
-
-/**
-@page used_AmdcCore Used Packages
-*/
-
-/**
-@page requirements_AmdcCore Requirements
-*/
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcData/doc/packagedoc.h b/MuonSpectrometer/Amdcsimrec/AmdcData/doc/packagedoc.h
index b3b1402f03767fc98619e453bf460dbb65b11ef5..2d656106221741fddaaf839fdf49af2b26bb2edc 100644
--- a/MuonSpectrometer/Amdcsimrec/AmdcData/doc/packagedoc.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcData/doc/packagedoc.h
@@ -16,15 +16,5 @@ the source Ascii files for the Muon Spectrometer geometry description
 
 @section AmdcData_ExtrasAmdcData Extra Pages
 
-  - @ref used_AmdcData
-  - @ref requirements_AmdcData
 
 */
-
-/**
-@page used_AmdcData Used Packages
-*/
-
-/**
-@page requirements_AmdcData Requirements
-*/
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h
index 7c116b9513df5bf499919ee8023e22beb3d4009a..51d4f92e7cbbbcb558551c812e986775080c2aa4 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb.h
@@ -66,7 +66,6 @@ public:
   virtual std::string getChildTag(const std::string& childNode,
 				  const std::string& parentTag,
 				  const std::string& parentNode,
-				  bool fetchData,
 				  const std::string& connName);
   virtual IRDBQuery* getQuery(const std::string& node,
 			      const std::string& tag,
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/doc/packagedoc.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/doc/packagedoc.h
index 333293423c1c496ea4f52e3efc6498e3faaf8467..81985c01d4b299887005e6cf752cf9f890fa56a3 100644
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/doc/packagedoc.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/doc/packagedoc.h
@@ -38,15 +38,5 @@ The AmdcDb package contains:
 
 @section AmdcDb_ExtrasAmdcDb Extra Pages
 
-  - @ref used_AmdcDb
-  - @ref requirements_AmdcDb
 
 */
-
-/**
-@page used_AmdcDb Used Packages
-*/
-
-/**
-@page requirements_AmdcDb Requirements
-*/
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx
index f0787340ca753b92c3960492a157599fc94e76c8..937978b615f410683c219fb2e3a766663f41ce0c 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx
@@ -343,7 +343,6 @@ bool AmdcDb::shutdown  (const std::string& /*connName*/ ) { std::cout << " AmdcD
 std::string AmdcDb::getChildTag(const std::string& /*childNode*/  ,
 			        const std::string& /*parentTag*/  ,
 			        const std::string& /*parentNode*/ ,
-			        bool               /*fetchData*/  ,
 			        const std::string& /*connName*/   )
 { std::cout << " AmdcDb::getChildTag Not implemented " << std::endl ; std::string ToBeReturned = "Not Implemented"; return ToBeReturned; }
 IRDBQuery* AmdcDb::getQuery(const std::string& /*node*/     ,
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx
index 797e3df7afc2bb173e107abe296ee8545f2cca9a..c1ce99fc7d899e346dec99919b445ff82ea0bc88 100755
--- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx
+++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx
@@ -1912,8 +1912,6 @@ void AmdcDbSvcMakerFromRDB::Set(
   m_detectorKey  = detectorKey  ;
   m_detectorNode = detectorNode ;
   
-  pIRDBAccessSvc->connect();
-
   AMDC(pIRDBAccessSvc,pAmdcDbSvc);
   AGDD(pIRDBAccessSvc,pAmdcDbSvc);
   
@@ -1959,8 +1957,6 @@ void AmdcDbSvcMakerFromRDB::Set(
 
   XtomoData(pIRDBAccessSvc,pAmdcDbSvc);
 
-  pIRDBAccessSvc->shutdown();
-
 }
 
 int AmdcDbSvcMakerFromRDB::GetEpsLengthMM(std::string NameOfTheSet){ if (m_Map_Set_EpsLengthMM.find(NameOfTheSet) != m_Map_Set_EpsLengthMM.end()) return m_Map_Set_EpsLengthMM.find(NameOfTheSet)->second ; return m_EpsLengthMM; }
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcMGM/doc/packagedoc.h b/MuonSpectrometer/Amdcsimrec/AmdcMGM/doc/packagedoc.h
index d00c4844597346702751a56fc9cab5c7b6d8067b..e4ba084d14bc8ce37f6855360129b0afc1d36f7a 100644
--- a/MuonSpectrometer/Amdcsimrec/AmdcMGM/doc/packagedoc.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcMGM/doc/packagedoc.h
@@ -27,15 +27,5 @@ The AmdcMGM package contains:
 
 @section AmdcMGM_ExtrasAmdcMGM Extra Pages
 
-  - @ref used_AmdcMGM
-  - @ref requirements_AmdcMGM
 
 */
-
-/**
-@page used_AmdcMGM Used Packages
-*/
-
-/**
-@page requirements_AmdcMGM Requirements
-*/
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcOracle/doc/packagedoc.h b/MuonSpectrometer/Amdcsimrec/AmdcOracle/doc/packagedoc.h
index cd4b8f2b0960f6d0bb7b096c716680b978500842..3d8ae98b4f8176801d64041ce301537d3764f50c 100644
--- a/MuonSpectrometer/Amdcsimrec/AmdcOracle/doc/packagedoc.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcOracle/doc/packagedoc.h
@@ -24,15 +24,5 @@ The AmdcOracle package contains:
 
 @section AmdcOracle_ExtrasAmdcOracle Extra Pages
 
-  - @ref used_AmdcOracle
-  - @ref requirements_AmdcOracle
 
 */
-
-/**
-@page used_AmdcOracle Used Packages
-*/
-
-/**
-@page requirements_AmdcOracle Requirements
-*/
diff --git a/MuonSpectrometer/Amdcsimrec/AmdcStand/doc/packagedoc.h b/MuonSpectrometer/Amdcsimrec/AmdcStand/doc/packagedoc.h
index f6c0dad3fb1c824d8cf1f39babd844d50be0ce0e..461935b15376b4c28c35d2925952e7638a922fee 100644
--- a/MuonSpectrometer/Amdcsimrec/AmdcStand/doc/packagedoc.h
+++ b/MuonSpectrometer/Amdcsimrec/AmdcStand/doc/packagedoc.h
@@ -21,15 +21,5 @@ The AmdcStand package contains:
 
 @section AmdcStand_ExtrasAmdcStand Extra Pages
 
-  - @ref used_AmdcStand
-  - @ref requirements_AmdcStand
 
 */
-
-/**
-@page used_AmdcStand Used Packages
-*/
-
-/**
-@page requirements_AmdcStand Requirements
-*/
diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignEvent/doc/packagedoc.h b/MuonSpectrometer/MuonAlignment/MuonAlignEvent/doc/packagedoc.h
index e680d378f2ceb94dca3bad670bc2fc14745f3963..7e6b23660546f0e7b2bfdf1c28e115dab72da8cb 100644
--- a/MuonSpectrometer/MuonAlignment/MuonAlignEvent/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonAlignment/MuonAlignEvent/doc/packagedoc.h
@@ -15,16 +15,6 @@ This package contains classes to be used for alignment of muon chambers.
 
   - MdtAlignModule: a generalized alignable module, consisting of groups of MDT detectors to be aligned as a single structure.  Inherits from Trk::AlignModule.
 
-@ref used_MuonAlignEvent
 
-@ref requirements_MuonAlignEvent
 
 */
-
-/**
-@page used_MuonAlignEvent Used Packages
-*/
-
-/**
-@page requirements_MuonAlignEvent Requirements
-*/
diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignGenTools/doc/packagedoc.h b/MuonSpectrometer/MuonAlignment/MuonAlignGenTools/doc/packagedoc.h
index 951c96e2cdfc66265d7ddbe5ee67e2c88eb5ccb4..37b2ef88948da64e187dee9a8e20247e43e0f80c 100644
--- a/MuonSpectrometer/MuonAlignment/MuonAlignGenTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonAlignment/MuonAlignGenTools/doc/packagedoc.h
@@ -20,11 +20,3 @@ available tools are:
    ntuple.  Used for validation and testing. 
 
 */
-
-/**
-@page used_MuonGeometryManagerTool Used Packages
-*/
-
-/**
-@page requirements_MuonGeometryManagerTool Requirements
-*/
diff --git a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/doc/packagedoc.h b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/doc/packagedoc.h
index ea0ecab4bc9ae9f421e32ee7f5c56af6b1e868d2..b22bb2378e094ce0ebabb11f5d87b52114ec2649 100644
--- a/MuonSpectrometer/MuonAlignment/MuonAlignmentData/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonAlignment/MuonAlignmentData/doc/packagedoc.h
@@ -23,6 +23,5 @@ the ConditionDB. There are stl maps and other data container.
 	- CorrContainer.h
 	- MuonAlignmentPar.h
 
-@section MuonAlignmentData_MuonAlignmentDataReq Requirements
 
 */
diff --git a/MuonSpectrometer/MuonCablings/CSCcabling/doc/packagedoc.h b/MuonSpectrometer/MuonCablings/CSCcabling/doc/packagedoc.h
index 45b3d18203d07fe9b4e2edc930bf9e03a53630c5..e4b78c1156774dc5856fee95ad06c344f8cd404a 100644
--- a/MuonSpectrometer/MuonCablings/CSCcabling/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCablings/CSCcabling/doc/packagedoc.h
@@ -11,10 +11,4 @@
  - For questions or comments: Ketevi A. Assamagan
    ketevi@bnl.gov
 
-@section CSCcabling_used_packagesTkPara Used Packages
-
-@section CSCcabling_requirements Requirements
-
 */
-
-
diff --git a/MuonSpectrometer/MuonCablings/CSCcabling/src/CSCcablingSvc.cxx b/MuonSpectrometer/MuonCablings/CSCcabling/src/CSCcablingSvc.cxx
index 6858c9f444992acffe543dbfd1a41c153846ef44..eb1d26251801506da6033a87fdae6b29c2cd5b0f 100755
--- a/MuonSpectrometer/MuonCablings/CSCcabling/src/CSCcablingSvc.cxx
+++ b/MuonSpectrometer/MuonCablings/CSCcabling/src/CSCcablingSvc.cxx
@@ -44,11 +44,6 @@ StatusCode CSCcablingSvc::initialize() {
   IRDBAccessSvc* rdbAccess = 0;
   ATH_CHECK( service("RDBAccessSvc",rdbAccess) );
 
-  if(!rdbAccess->connect()) {
-     ATH_MSG_ERROR("Unable to connect to the Geometry DB");
-     return StatusCode::FAILURE;
-  }
-
   const IGeoModelSvc* geoModel = 0;
   StatusCode sc = service("GeoModelSvc", geoModel);
   if (sc.isFailure()) {
@@ -75,11 +70,6 @@ StatusCode CSCcablingSvc::initialize() {
   m_rod  = (m_run1 ? 8 : 16);
   m_max  = m_side * m_rod;
 
-  if(!rdbAccess->disconnect()) {
-     ATH_MSG_ERROR("Unable to disconnectfrom the Geometry DB");
-     return StatusCode::FAILURE;
-  } 
-
   return StatusCode::SUCCESS;
 }
 
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/CMakeLists.txt b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/CMakeLists.txt
index 297f1076baa6de9ab8e3822e60ff19b6cd8e5da9..86710058289aab2e574014033640c0f2ee3d08fa 100644
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/CMakeLists.txt
@@ -22,12 +22,12 @@ atlas_add_library( CscCalibEvent
                    src/*.cxx
                    PUBLIC_HEADERS CscCalibEvent
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES DataModel SGTools Identifier MuonIdHelpersLib
+                   LINK_LIBRARIES DataModel SGTools Identifier MuonIdHelpersLib EventContainers
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_dictionary( CscCalibEventDict
                       CscCalibEvent/CscCalibEventDict.h
                       CscCalibEvent/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel SGTools Identifier MuonIdHelpersLib CscCalibEvent )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel SGTools Identifier MuonIdHelpersLib CscCalibEvent EventContainers )
 
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/CscCalibEvent/CscCalibDataContainer.h b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/CscCalibEvent/CscCalibDataContainer.h
index 6ede252650e491fe2896592ff3fd535e9613c4aa..4c12dc7fe148c63116702f23627fe202a51cf054 100755
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/CscCalibEvent/CscCalibDataContainer.h
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/CscCalibEvent/CscCalibDataContainer.h
@@ -25,7 +25,6 @@ class CscCalibDataContainer : public IdentifiableContainer<CscCalibDataCollectio
  public:  
     
     /** constructor */
-    CscCalibDataContainer();
     CscCalibDataContainer(int maxHash) ;
 
     /** destructor */ 
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/src/CscCalibDataContainer.cxx b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/src/CscCalibDataContainer.cxx
index 397defbe2da7d280e48afe57e13b3f8c53a65861..f400b767d248bdc0427a3db9f6c6ad2115631f2d 100755
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/src/CscCalibDataContainer.cxx
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibEvent/src/CscCalibDataContainer.cxx
@@ -15,11 +15,6 @@ using std::ostream;
  Author: Ketevi A. Assamagan
 *********************************************/
 
-/* Default constructor */
-CscCalibDataContainer::CscCalibDataContainer() 
-	: IdentifiableContainer<CscCalibDataCollection>() 
-{}
-
 CscCalibDataContainer::CscCalibDataContainer(int maxhash) 
 	: IdentifiableContainer<CscCalibDataCollection>(maxhash) {
   //m_hashFunc.setHelper(helper);
diff --git a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/doc/packagedoc.h
index 48f86f3c96692be5afba205562bdb2ee76193144..ad2726cc5b4a44b2a0cfaf390ac9227d5fa7e6a6 100644
--- a/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/CscCalib/CscCalibTools/doc/packagedoc.h
@@ -27,7 +27,4 @@ corrections.
 For questions or comments: Ketevi A. Assamagan
    ketevi@bnl.gov
 
-@section CscCalibTools_used_packagesTkPara Used Packages
-
-@section CscCalibTools_requirements Requirements
 */
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/doc/packagedoc.h
index c8805928aaf7850ba24bfe07f4871b178b2b60ac..9c7ab5bf20df01d3b03e09829205768b975e07ff 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibData/doc/packagedoc.h
@@ -35,16 +35,6 @@ The MdtCalibData package contains the following classes:
 - MuonCalib::RtResolution0: Implementatin of a resolution function
 - MuonCalib::RtResolutionLookUp: Equidistant look up table for resolution tables with the time as key
                                                                                 
-@ref used_MdtCalibData
                                                                                 
-@ref requirements_MdtCalibData
                                                                                 
 */
-                                                                                
-/**
-@page used_MdtCalibData Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibData Requirements
-*/
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/MdtCalibDbAsciiTool/MdtCalibDbAsciiTool.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/MdtCalibDbAsciiTool/MdtCalibDbAsciiTool.h
index 9dcd3a6e6677416366238da653735774cbd02daa..004ba5140269afeacc38536845a260b30a5a227c 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/MdtCalibDbAsciiTool/MdtCalibDbAsciiTool.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/MdtCalibDbAsciiTool/MdtCalibDbAsciiTool.h
@@ -39,7 +39,9 @@ public:
 		const IInterface* parent); 
 
   /** required by the IAddressProvider interface */
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
 
 private: 
 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/doc/packagedoc.h
index b8911a8c88447d1b0c7a2dbfcd9734b3e3590059..2198f8869ddd92228346c57dfbc6531c705bc384 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/doc/packagedoc.h
@@ -51,16 +51,5 @@ do a trial run with few events
 setting the OutputLevel to VERBOSE and look in the output for the string 
 "Adding chamber " followed by "adding tubes at XXX". 
                                                                                 
-@ref used_MdtCalibDbAsciiTool
                                                                                 
-@ref requirements_MdtCalibDbAsciiTool
 */
-                                                                                
-/**
-@page used_MdtCalibDbAsciiTool Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibDbAsciiTool Requirements
-*/
- 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/src/MdtCalibDbAsciiTool.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/src/MdtCalibDbAsciiTool.cxx
index b097d2ca4af0ddc094dcf9a5056723ad0f131580..b7b0161343b99b36da3dcb5070f258db93c5f092 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/src/MdtCalibDbAsciiTool.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbAsciiTool/src/MdtCalibDbAsciiTool.cxx
@@ -104,7 +104,9 @@ MdtCalibDbAsciiTool::MdtCalibDbAsciiTool (const std::string& type,
 
 }
 
-StatusCode MdtCalibDbAsciiTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad) {
+StatusCode MdtCalibDbAsciiTool::updateAddress(StoreID::type /*storeID*/,
+                                              SG::TransientAddress* tad,
+                                              const EventContext& /*ctx*/) {
   CLID clid        = tad->clID();
   std::string key  = tad->name();
   if ( 1221928754== clid && m_tubeDataLocation == key) {
@@ -179,14 +181,8 @@ StatusCode MdtCalibDbAsciiTool::initialize() {
     return StatusCode::FAILURE;
   }
 
-  SG::TransientAddress* tad =  proxy->transientAddress();
-  if (!tad) {
-    *m_log << MSG::ERROR << "Unable to get the tad" << endmsg;
-    return StatusCode::FAILURE;
-  }
-
   IAddressProvider* addp = this;
-  tad->setProvider(addp, StoreID::DETECTOR_STORE);
+  proxy->setProvider(addp, StoreID::DETECTOR_STORE);
   if( m_debug ) *m_log << MSG::DEBUG << "set address provider for MdtTubeCalibContainerCollection" << endmsg;
 
   sc=defaultRt();
@@ -202,14 +198,8 @@ StatusCode MdtCalibDbAsciiTool::initialize() {
     return StatusCode::FAILURE;
   }
 
-  tad =  proxy->transientAddress();
-  if (!tad) {
-    *m_log << MSG::ERROR << "Unable to get the tad" << endmsg;
-    return StatusCode::FAILURE;
-  }
-
   addp = this;
-  tad->setProvider(addp, StoreID::DETECTOR_STORE);
+  proxy->setProvider(addp, StoreID::DETECTOR_STORE);
   if( m_debug ) *m_log << MSG::DEBUG << "set address provider for MdtRtRelationCollection" << endmsg;
 
   return sc;
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/MdtCalibDbCoolStrTool/MdtCalibDbCoolStrTool.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/MdtCalibDbCoolStrTool/MdtCalibDbCoolStrTool.h
index f4a955df4edc6bad2a25e411537ca5806718965f..f340ab04cb913f7ce5610b54909abcd480cb043f 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/MdtCalibDbCoolStrTool/MdtCalibDbCoolStrTool.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/MdtCalibDbCoolStrTool/MdtCalibDbCoolStrTool.h
@@ -47,7 +47,9 @@ class MdtCalibDbCoolStrTool: public AthAlgTool, virtual public IMdtCalibDBTool {
   virtual ~MdtCalibDbCoolStrTool();
 
   /** required by the IAddressProvider interface */
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress *tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress *tad,
+                                   const EventContext& ctx);
 
 private: 
   /** intialization: callbacks to loadTube and loadRt are registered 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/doc/packagedoc.h
index 931f06ae25290c1e440041c32905a2b5b2f458ec..d5aec896be25cc3584a295d9fccb9956898f60d8 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/doc/packagedoc.h
@@ -40,16 +40,5 @@ but be aware that folder name can change frequently
 - RT_InputFiles: RT to be used in absence of DB info. If the list contains more than one file only the first one is used (default value DC2_rt_default.dat)
 - defaultT0: T0 value to be used in absence of DB info  (default value 800 ns)
 
-@ref used_MdtCalibDbCoolStrTool
                                                                                 
-@ref requirements_MdtCalibDbCoolStrTool
 */
-                                                                                
-/**
-@page used_MdtCalibDbCoolStrTool Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibDbCoolStrTool Requirements
-*/
- 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/src/MdtCalibDbCoolStrTool.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/src/MdtCalibDbCoolStrTool.cxx
index 8fca5c3b70aa1d118d5ad5601e75002664fe6d3c..3d609c924d744309985550fbd29d5e76d2c5f8a1 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/src/MdtCalibDbCoolStrTool.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibDbCoolStrTool/src/MdtCalibDbCoolStrTool.cxx
@@ -113,7 +113,9 @@ MdtCalibDbCoolStrTool::~MdtCalibDbCoolStrTool() {
 
 // Check StoreGate ClassID (clid) and key for tube and RT calib data (required by the IAddressProvider interface)
 // (poor name choice, not related to updating address)
-StatusCode MdtCalibDbCoolStrTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress *tad) {
+StatusCode MdtCalibDbCoolStrTool::updateAddress(StoreID::type /*storeID*/,
+                                                SG::TransientAddress *tad,
+                                                const EventContext& /*ctx*/) {
   CLID clid        = tad->clID();
   std::string key  = tad->name();
   if( 1221928754 == clid && m_tubeDataLocation == key) {
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibEventLoop/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibEventLoop/doc/packagedoc.h
index 008469f44ff9f4b90b1b76fea33bcb4fbfed280a..00a62853f6447749956058f1db4d39aad64d3184 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibEventLoop/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibEventLoop/doc/packagedoc.h
@@ -20,16 +20,5 @@ segments and perform calibration (derived from MuonCalib::IMdtCalibration).
 In ATHENA framework it is used by MdtCalibTool but it could
 also be used in a standalone environment.
                                                                                 
-@ref used_MdtCalibEventLoop
                                                                                 
-@ref requirements_MdtCalibEventLoop
 */
-                                                                                
-/**
-@page used_MdtCalibEventLoop Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibEventLoop Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/doc/packagedoc.h
index cdac8381f6b0ace3bd12eebc3ca989ebde346a88..be7d287a807f21c38d9ec8ffa8e1f79c231c6d29 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibFitters/doc/packagedoc.h
@@ -18,16 +18,5 @@ work on segment level.
 - MuonCalib::MuCCaFitter: interface to the straight line fitter for drift circles used by Calib
 - MuonCalib::MuCCaFitterImplementation: the straight line fitter for drift circles used by Calib
                                                                                 
-@ref used_MdtCalibFitters
                                                                                 
-@ref requirements_MdtCalibFitters
 */
-                                                                                
-/**
-@page used_MdtCalibFitters Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibFitters Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibITools/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibITools/doc/packagedoc.h
index 46a08df523b27d0aede4f43602272d477a4c9cfc..d8f1be674de6904ceb403b4fa16f69c2429524e9 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibITools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibITools/doc/packagedoc.h
@@ -17,22 +17,11 @@ The interface classes provided by MdtCalibITools package are:
 - MuonCalib::IMdtSegmentSelectorTool: Interface class for Segment Selector Tools 
 - MuonCalib::IPatternSelectorTool: Interface class for Pattern Selector Tools 
                                                                                 
-@ref used_MdtCalibITools
                                                                                 
-@ref requirements_MdtCalibITools
-*/
-                                                                                
-/**
-@page used_MdtCalibITools Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibITools Requirements
-*/
-
 Interface classes for the various tools implemented in MdtCalibTools package:
 
 IMdtCalibTool : Interface used for Tools that are called by the MuonCalibAlg.
 IPatternSelectorTool : Interface for creator tools that create IPatternSelector implemenatations.
 IMdtSegmentSelectorTool : Interface for creator tools that create IMdtSegmentSelector implemenatations.
 IMdtSegmentFitterTool : Interface for creator tools that create IMdtSegmentFitter implemenatations.
+*/
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibInterfaces/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibInterfaces/doc/packagedoc.h
index 807b478945a3853477bdaa86634386945b9d1dc2..40e11c83b8926a807e9c3a2adfc13bf1fdc83e66 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibInterfaces/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibInterfaces/doc/packagedoc.h
@@ -21,16 +21,5 @@ The MdtCalibInterfaces package provides the following abstract interfaces:
 - MuonCalib::IMdtSegmentSelector: Interface class for MdtSegmentSelectors
 - MuonCalib::IMdtCalibDBTool: interface class for Tools accessing conditions DB 
 
-@ref used_MdtCalibInterfaces
                                                                                 
-@ref requirements_MdtCalibInterfaces
 */
-                                                                                
-/**
-@page used_MdtCalibInterfaces Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibInterfaces Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibRt/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibRt/doc/packagedoc.h
index fa8f5997f7d4f8051f3246564a343f6ec9d0c5c6..4618ee96ba6c6d0eaf385c636d35a9fb8f0f3d4a 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibRt/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibRt/doc/packagedoc.h
@@ -23,16 +23,5 @@ The MdtCalibRt package contains at the moment the following classes:
 
 - MuonCalib::RtHistos: Set of histograms used in an iteration of RtCalibrationClassic
                                                                                 
-@ref used_MdtCalibRt
                                                                                 
-@ref requirements_MdtCalibRt
 */
-                                                                                
-/**
-@page used_MdtCalibRt Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibRt Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationSvcInput.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationSvcInput.h
index 453e5a37a6a77d1a0200a22d12e332e92d5fa9ec..c59abf1e5d1ce7afa67593ceaf4cb1af3af098c9 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationSvcInput.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationSvcInput.h
@@ -24,7 +24,8 @@ namespace Trk {
   are missing one might not get the optimal resolution.
   @author Martin Woudstra, Niels van Eldik
 */
-struct MdtCalibrationSvcInput {
+class MdtCalibrationSvcInput {
+public:
   MdtCalibrationSvcInput() :
     tof(0.),triggerOffset(0.),pointOfClosestApproach(0),trackDirection(0),
     nominalWireSurface(0),wireSurface(0) {
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationSvcSettings.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationSvcSettings.h
index 4c24f61d3dbf675a043613bd482cd6777bd8cfe9..630f8cd302d312dde16396b832e981c3d4d5deb5 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationSvcSettings.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/MdtCalibSvc/MdtCalibrationSvcSettings.h
@@ -18,7 +18,8 @@
   This class is used to select which type of corrections should be applied by the calibration service.
   @author Martin Woudstra, Niels van Eldik
 */
-struct MdtCalibrationSvcSettings {
+class MdtCalibrationSvcSettings {
+public:
   
   static const int dummyTimeWindow = -1000000;
 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/doc/packagedoc.h
index bdaa8184d671a9398697e80665322ccb26083865..854e1f23c8b7a4b5e69bb927511eb7a4b56108f9 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibSvc/doc/packagedoc.h
@@ -76,15 +76,5 @@ List of settable properties:
 - for MdtCalibrationDbSvc:
    - DBTool (a PublicToolHandle, default is 'MuonCalib::MdtCalibDbAsciiTool')
 
-@ref used_MdtCalibSvc
 
-@ref requirements_MdtCalibSvc
 */
-
-/**
-@page used_MdtCalibSvc Used Packages
-*/
-                                                                                 /**
-@page requirements_MdtCalibSvc Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/doc/packagedoc.h
index bd8cdeb46d8d24de32d381bce4e145d69d7433cf..a6f1ae4ddb44c687456648690c740f50ea9df8ee 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibT0/doc/packagedoc.h
@@ -31,16 +31,5 @@ The following classes related to "MT" implementation:
 - MuonCalib::VariableBinwidthHistogram: a histogram where every bin has the same number of entries. The density is represented by the bin width.
 - MuonCalib::VariableBinwidthHistogramBin: a bin of a VariableBinwidthHistogram.
 
-@ref used_MdtCalibT0
                                                                                 
-@ref requirements_MdtCalibT0
 */
-                                                                                
-/**
-@page used_MdtCalibT0 Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibT0 Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/doc/packagedoc.h
index 42db45fd1c5627828656524a8f5682363b103bf4..83eaae904293aaef5d3835ef5b650ffaef35e98f 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibTools/doc/packagedoc.h
@@ -21,16 +21,5 @@ in addition it also contains the following helper Tools:
 - MuonCalib::MuCCaFitterTool: creates an instance of a MuonCalib::IMdtSegmentFitter implementation
 - MuonCalib::DCSLFitterTool: creates an instance of a MuonCalib::IMdtSegmentFitter implementation
                                                                                 
-@ref used_MdtCalibTools
                                                                                 
-@ref requirements_MdtCalibTools
 */
-                                                                                
-/**
-@page used_MdtCalibTools Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibTools Requirements
-*/
- 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/SimplePatternSelector.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/SimplePatternSelector.h
index ceed780e8601eeb9ff3d211688353680b103c29f..12f2f2fb8b475d8e769789e098c270775687e4aa 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/SimplePatternSelector.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/MdtCalibUtils/SimplePatternSelector.h
@@ -50,7 +50,6 @@ namespace MuonCalib {
     /** selection criteria */
     double m_chi2_max;         //!< maximum chi2 of pattern
     unsigned int m_mdtSeg_min; //!< minimum number of mdt segments on pattern
-    unsigned int m_phiSeg_min; //!< minimum number of phi segments on pattern
 
     /** print level */
     int m_printLevel;
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/doc/packagedoc.h
index b2675e832cb97c9f78bc2598b2da6935817e9f1a..dd6b9493dde8cd7fd473b02c4a4e6407614bfef6 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/doc/packagedoc.h
@@ -23,16 +23,5 @@ The MdtCalibUtils package contains the following classes and structures:
 - MuonCalib::TubeDataFromFile: Manage the I/O of MuonCalib::MdtTubeConstants objects
 - MuonCalib::UpdateCalibHit: Provides the operator to update drift radius and error of a given MuonCalib::MdtCalibHit using the pointer to the MuonCalib::IRtRelation passed to the constructor
                                                                                 
-@ref used_MdtCalibUtils
                                                                                 
-@ref requirements_MdtCalibUtils
 */
-                                                                                
-/**
-@page used_MdtCalibUtils Used Packages
-*/
-                                                                                
-/**
-@page requirements_MdtCalibUtils Requirements
-*/
- 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/RtDataFromFile.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/RtDataFromFile.cxx
index 273086411ac08f9352570ee64d47640a244f34a2..bae3f5b5a3ba887237c07d2ea60153af9805c900 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/RtDataFromFile.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/RtDataFromFile.cxx
@@ -18,20 +18,20 @@ namespace MuonCalib {
   std::istream& RtDataFromFile::read( std::istream& is )
   {
     std::string version;
-    std::string m_rts_str;
+    std::string rts_str;
 
     // read number of rts in file
-    is >> version >> m_rts_str;
+    is >> version >> rts_str;
 
     unsigned long int pos = 0; 
-    std::string::size_type start = m_rts_str.find_first_not_of(" ",pos); 
+    std::string::size_type start = rts_str.find_first_not_of(" ",pos); 
     if(start == std::string::npos) { 
       std::cout << "RtDataFromFile::read -- problems extracting m_rts -- crashing." << std::endl; 
       throw;       
     } 
-    std::string::size_type stop = m_rts_str.find_first_of(" ",start+1); 
-    if (stop == std::string::npos) stop = m_rts_str.size(); 
-    m_rts = std::stoi(m_rts_str.substr(start,stop-start),nullptr); 
+    std::string::size_type stop = rts_str.find_first_of(" ",start+1); 
+    if (stop == std::string::npos) stop = rts_str.size(); 
+    m_rts = std::stoi(rts_str.substr(start,stop-start),nullptr); 
 
     m_rts = (m_rts>M_MAX_RTS) ? M_MAX_RTS : m_rts;
     for( unsigned int i=0;i<m_rts;++i){ 
diff --git a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/SimplePatternSelector.cxx b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/SimplePatternSelector.cxx
index beed3ac4844f66762737bee30d1dd8fb4bd9216b..54ff912df8b8ad8247efbe1d139837bfa3734d63 100644
--- a/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/SimplePatternSelector.cxx
+++ b/MuonSpectrometer/MuonCalib/MdtCalib/MdtCalibUtils/src/SimplePatternSelector.cxx
@@ -12,9 +12,9 @@ namespace MuonCalib {
 
   SimplePatternSelector::SimplePatternSelector(double chi2_max, 
 					       unsigned int mdtSeg_min,
-					       unsigned int phiSeg_min)
+					       unsigned int /*phiSeg_min*/)
   
-    : m_chi2_max(chi2_max),m_mdtSeg_min(mdtSeg_min),m_phiSeg_min(phiSeg_min)
+    : m_chi2_max(chi2_max),m_mdtSeg_min(mdtSeg_min)
   {
     m_printLevel = 0;
     if( m_printLevel >= 1 ){
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibAlgs/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibAlgs/doc/packagedoc.h
index 39fdff729e25afd7a79e681ea49d14d421e16777..413586cb30bb3280986fcc424452c82ef63e1c33 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibAlgs/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibAlgs/doc/packagedoc.h
@@ -16,17 +16,6 @@ The MuonCalibAlgs package contains the following class
 
 - MuonCalib::MuonCalibAlg: ATHENA Algorithm retrieving the 'ingredients' to construct a MuonCalibEvent from storegate and passing them to a calibration tool. See the MuonCalibEvent class description for the content of a MuonCalibEvent.
 
-@ref used_MuonCalibAlgs
 
-@ref requirements_MuonCalibAlgs
 
 */
-
-/**
-@page used_MuonCalibAlgs Used Packages
-*/
-
-/**
-@page requirements_MuonCalibAlgs Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibAlgs/src/MuonCalibAlg.cxx b/MuonSpectrometer/MuonCalib/MuonCalibAlgs/src/MuonCalibAlg.cxx
index c486659f516d96c029423051f177eeeffa0c6cf6..ce371c0a814a226c56953d8f046345bb7a76390f 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibAlgs/src/MuonCalibAlg.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibAlgs/src/MuonCalibAlg.cxx
@@ -990,14 +990,14 @@ namespace MuonCalib {
       if (!sc.isFailure()) {
       
 	uint32_t ibit, bit_pos = 0;
-	float m_charge = 0;
+	float charge = 0;
 	// Discriminate the signals
 	TileCellContainer::const_iterator itr = tileCellCnt->begin();
 	TileCellContainer::const_iterator itr_end = tileCellCnt->end();
 	for(; itr != itr_end; ++itr) {
-	  m_charge = (*itr)->energy();
-	  log << MSG::DEBUG << "Energy =" << m_charge << "pC" << endmsg;
-	  if(m_charge > m_mbts_threshold) {
+	  charge = (*itr)->energy();
+	  log << MSG::DEBUG << "Energy =" << charge << "pC" << endmsg;
+	  if(charge > m_mbts_threshold) {
 	    Identifier id=(*itr)->ID();
 	    // cache type, module and channel
 	    // MBTS Id type is  "side"  +/- 1
@@ -1099,50 +1099,50 @@ namespace MuonCalib {
       for( ;seg_it!=seg_it_end;++seg_it ){ 
 	
 	//Filling the mdtMap with the hits
-	MuonCalibSegment::MdtHitCit m_mdt_it = (*seg_it)->mdtHOTBegin();
-	MuonCalibSegment::MdtHitCit m_mdt_it_end = (*seg_it)->mdtHOTEnd();
-	for( ;m_mdt_it!=m_mdt_it_end;++m_mdt_it){ 
-	  std::map<MuonFixedId, int>::iterator position = mdtMap.find( (*m_mdt_it)->identify() );
+	MuonCalibSegment::MdtHitCit mdt_it = (*seg_it)->mdtHOTBegin();
+	MuonCalibSegment::MdtHitCit mdt_it_end = (*seg_it)->mdtHOTEnd();
+	for( ;mdt_it!=mdt_it_end;++mdt_it){ 
+	  std::map<MuonFixedId, int>::iterator position = mdtMap.find( (*mdt_it)->identify() );
 	  if(position == mdtMap.end() ){
-	    mdtMap[ (*m_mdt_it)->identify() ] = 1;
+	    mdtMap[ (*mdt_it)->identify() ] = 1;
 	  } else {
-	    ++mdtMap[ (*m_mdt_it)->identify() ] ; 
+	    ++mdtMap[ (*mdt_it)->identify() ] ; 
 	  }	    
 	}
 	
 	//Filling the rpcMap with the hits
-	MuonCalibSegment::RpcHitCit m_rpc_it = (*seg_it)->rpcHOTBegin();
-	MuonCalibSegment::RpcHitCit m_rpc_it_end = (*seg_it)->rpcHOTEnd();
-	for( ;m_rpc_it!=m_rpc_it_end;++m_rpc_it){ 
-	  std::map<MuonFixedId, int>::iterator position = rpcMap.find( (*m_rpc_it)->identify() );
+	MuonCalibSegment::RpcHitCit rpc_it = (*seg_it)->rpcHOTBegin();
+	MuonCalibSegment::RpcHitCit rpc_it_end = (*seg_it)->rpcHOTEnd();
+	for( ;rpc_it!=rpc_it_end;++rpc_it){ 
+	  std::map<MuonFixedId, int>::iterator position = rpcMap.find( (*rpc_it)->identify() );
 	  if(position == rpcMap.end() ){
-	    rpcMap[ (*m_rpc_it)->identify() ] = 1;
+	    rpcMap[ (*rpc_it)->identify() ] = 1;
 	  } else {
-	    ++rpcMap[ (*m_rpc_it)->identify() ] ; 
+	    ++rpcMap[ (*rpc_it)->identify() ] ; 
 	  }	    
 	}
 	
 	//Filling the tgcMap with the hits
-	MuonCalibSegment::TgcHitCit m_tgc_it = (*seg_it)->tgcHOTBegin();
-	MuonCalibSegment::TgcHitCit m_tgc_it_end = (*seg_it)->tgcHOTEnd();
-	for( ;m_tgc_it!=m_tgc_it_end;++m_tgc_it){
-	  std::map<MuonFixedId, int>::iterator position = tgcMap.find( (*m_tgc_it)->identify() );
+	MuonCalibSegment::TgcHitCit tgc_it = (*seg_it)->tgcHOTBegin();
+	MuonCalibSegment::TgcHitCit tgc_it_end = (*seg_it)->tgcHOTEnd();
+	for( ;tgc_it!=tgc_it_end;++tgc_it){
+	  std::map<MuonFixedId, int>::iterator position = tgcMap.find( (*tgc_it)->identify() );
 	  if(position == tgcMap.end() ){
-	    tgcMap[ (*m_tgc_it)->identify() ] = 1;
+	    tgcMap[ (*tgc_it)->identify() ] = 1;
 	  } else {
-	    ++tgcMap[ (*m_tgc_it)->identify() ] ; 
+	    ++tgcMap[ (*tgc_it)->identify() ] ; 
 	  }	    
 	}
 	
 	//Filling the cscMap with the hits
-	MuonCalibSegment::CscHitCit m_csc_it = (*seg_it)->cscHOTBegin();
-	MuonCalibSegment::CscHitCit m_csc_it_end = (*seg_it)->cscHOTEnd();
-	for( ;m_csc_it!=m_csc_it_end;++m_csc_it){ 
-	  std::map<MuonFixedId, int>::iterator position = cscMap.find( (*m_csc_it)->identify() );
+	MuonCalibSegment::CscHitCit csc_it = (*seg_it)->cscHOTBegin();
+	MuonCalibSegment::CscHitCit csc_it_end = (*seg_it)->cscHOTEnd();
+	for( ;csc_it!=csc_it_end;++csc_it){ 
+	  std::map<MuonFixedId, int>::iterator position = cscMap.find( (*csc_it)->identify() );
 	  if(position == cscMap.end() ){
-	    cscMap[ (*m_csc_it)->identify() ] = 1;
+	    cscMap[ (*csc_it)->identify() ] = 1;
 	  } else {
-	    ++cscMap[ (*m_csc_it)->identify() ] ; 
+	    ++cscMap[ (*csc_it)->identify() ] ; 
 	  }	    
 	}
       }
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibEvent/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibEvent/doc/packagedoc.h
index ceeff46608e3f29b97e1cce564f278071ec4253d..38ebdc8b67eb7d28501654e79205f66134264da9 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibEvent/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibEvent/doc/packagedoc.h
@@ -20,16 +20,6 @@ and a typedef:
 
 - MuonCalibPatternCollection: a DataVector of MuonCalib::MuonCalibPattern objects
 
-@ref used_MuonCalibEvent
                                                                                 
-@ref requirements_MuonCalibEvent
                                                                                 
 */
-                                                                                
-/**
-@page used_MuonCalibEvent Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCalibEvent Requirements
-*/
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibEventBase/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibEventBase/doc/packagedoc.h
index bcb8a2effa90a20440001f95d3c55afc7a9c0e69..04e2563d6341e7e6e81d40d31857dfd49fd5c0c2 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibEventBase/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibEventBase/doc/packagedoc.h
@@ -36,16 +36,6 @@ The MuonCalibEventBase package contains the following classes :
 - MuonCalib::MuonCalibRawTgcHit         : MuonCalib version of TgcPrepData.
 - MuonCalib::MuonCalibRawCscHit         : MuonCalib version of CscPrepData.
 
-@ref used_MuonCalibEventBase 
 
-@ref requirements_MuonCalibEventBase
 
 */
-
-/**
-@page used_MuonCalibEventBase Used Packages
-*/
-
-/**
-@page requirements_MuonCalibEventBase Requirements
-*/
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraNtuple/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraNtuple/doc/packagedoc.h
index 431baf8faa80509857cf22892b5803956e19e898..2c5624e26fa8b71a5ff39e9585197f151aeb80c9 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraNtuple/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraNtuple/doc/packagedoc.h
@@ -27,17 +27,6 @@ And some analysis programmes:
 - MuonCalib::MultipleAnalysis : Analysis program for MuonSegment (MDT or CSC). This analysis routine performs checks for segments and patterns, and using hit truth information. Additional, the programme includes extended pattern recognition.
 
 
-@ref used_MuonCalibExtraNtuple
                                                                                 
-@ref requirements_MuonCalibExtraNtuple
                                                                                 
 */
-                                                                                
-/**
-@page used_MuonCalibExtraNtuple Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCalibExtraNtuple Requirements
-*/
-       
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/doc/packagedoc.h
index 904ed88530dd1a795c0afcfd5d44d50cecae0bf7..26f6514a32a1cd3756a66a4ccf662662a07a9b41 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeAlg/doc/packagedoc.h
@@ -26,17 +26,6 @@ MuonCalibExtraTreeAlgAlg is the package responsible for configuring the filling
 - MuonCalib::MuonCalibTrack_EBranch :Branch storing variables describing Tracks (MuonCalib::MuonCalibTrack_E)
 
 
-@ref used_MuonCalibExtraTreeAlg
                                                                                 
-@ref requirements_MuonCalibExtraTreeAlg
                                                                                 
 */
-                                                                                
-/**
-@page used_MuonCalibExtraTreeAlg Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCalibExtraTreeAlg Requirements
-*/
-       
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeEvent/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeEvent/doc/packagedoc.h
index 6b87cff44841eb9df8390b8e70e66a213b1d502d..5cb624159803bda43ebad789b2742bff814dee8f 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeEvent/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibExtraTree/MuonCalibExtraTreeEvent/doc/packagedoc.h
@@ -22,17 +22,6 @@ MuonCalibExtraTreeEventEvent is the package responsible for configuring the fill
 - MuonCalib::MuonCalibTrack_E
 
 
-@ref used_MuonCalibExtraTreeEvent
                                                                                 
-@ref requirements_MuonCalibExtraTreeEvent
                                                                                 
 */
-                                                                                
-/**
-@page used_MuonCalibExtraTreeEvent Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCalibExtraTreeEvent Requirements
-*/
-       
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibITools/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibITools/doc/packagedoc.h
index e4f98cd24de85016e2e052cc5b1b9a262014b2f7..896663d33327f344b04482089b160cf6d4618721 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibITools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibITools/doc/packagedoc.h
@@ -23,17 +23,6 @@ The MuonCalibITools package contains the following interface classes:
 
 - MuonCalib::IIdToFixedIdTool: base class for Identifier converters
                                                                                 
-@ref used_MuonCalibITools
                                                                                 
-@ref requirements_MuonCalibITools
                                                                                 
 */
-                                                                                
-/**
-@page used_MuonCalibITools Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCalibITools Requirements
-*/
- 
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibIdentifier/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibIdentifier/doc/packagedoc.h
index 57ddb7e074fb6fd9be92d612efd9a0050b92e3fb..cd44275c331b6abdea117f1ddfa4ebe4e13c12a6 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibIdentifier/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibIdentifier/doc/packagedoc.h
@@ -30,16 +30,6 @@ All data members and member functions are static, so no instantiation of an MdtH
 
 and many others used internally to provide the above functionalities (see Class list).
 
-@ref used_MuonCalibIdentifier 
 
-@ref requirements_MuonCalibIdentifier
 
 */
-
-/**
-@page used_MuonCalibIdentifier Used Packages
-*/
-
-/**
-@page requirements_MuonCalibIdentifier Requirements
-*/
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibNtuple/MuonCalibNtuple/MuonCalibRpcSectorLogicBranch.h b/MuonSpectrometer/MuonCalib/MuonCalibNtuple/MuonCalibNtuple/MuonCalibRpcSectorLogicBranch.h
index 653c4bd30d359a033e795d00d611e18fae42626b..597a616528d09c97c1ed637dc8645c382dfb5e0a 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibNtuple/MuonCalibNtuple/MuonCalibRpcSectorLogicBranch.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibNtuple/MuonCalibNtuple/MuonCalibRpcSectorLogicBranch.h
@@ -46,9 +46,6 @@ namespace MuonCalib {
     // vector properties, if value is -99999 it should be ignored
     static const int m_blockSize2 = 100;     //!< quantities stored in the tree 
     int   index2;                            //!< counter keeping track on the number of entries
-    int   slIndex[m_blockSize2];             //!< index of corresponding SL
-    float triggerRates[m_blockSize2];
-    int   counters[m_blockSize2];
     
     // RpcSLTriggerHit properties
     static const int m_blockSize3 = 100;     //!< quantities stored in the tree 
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibNtuple/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibNtuple/doc/packagedoc.h
index 81237036617fa1a6401b59673e4a2a874f839ec9..193018513664349a278b3845e799dd86bad4d0a3 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibNtuple/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibNtuple/doc/packagedoc.h
@@ -21,17 +21,6 @@ The branches are declared in the MuonCalib::MuonCalibBranchNtuple class, steerin
 
 For the content of the CalibrationNtuple, see <a href="https://twiki.cern.ch/twiki/bin/view/Atlas/MuonCalibNuptleContent"><span>Calibration Ntuple wiki</span></a>
 
-@ref used_MuonCalibNtuple
                                                                                 
-@ref requirements_MuonCalibNtuple
                                                                                 
 */
-                                                                                
-/**
-@page used_MuonCalibNtuple Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCalibNtuple Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibPatRec/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibPatRec/doc/packagedoc.h
index bbb829ae3b53b24e6dd2fbf2023ed64347d6023c..58990a1cd3250a07fe760715ce395a3a95357fc8 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibPatRec/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibPatRec/doc/packagedoc.h
@@ -18,17 +18,6 @@ The MuonCalibPatRec package contains the following classes:
  
 - MuonCalib::MooreFillPatterns: fills calibration EDM from Moore
 
-@ref used_MuonCalibPatRec
                                                                                 
-@ref requirements_MuonCalibPatRec
                                                                                 
 */
-                                                                                
-/**
-@page used_MuonCalibPatRec Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCalibPatRec Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleReader/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleReader/doc/packagedoc.h
index 41e421f646dc127f9a1075ffc858e44970bf9df8..cf8efe9fa1800b9e471b5802acb57090b75ec2f0 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleReader/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleReader/doc/packagedoc.h
@@ -19,12 +19,3 @@ This package consists out of two classes:
 
 
 */
-
-
-/**
-@page used_CalibNtupleReader Used Packages
-*/
-
-/**
-@page requirements_CalibNtupleReader Requirements
-*/
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleUtils/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleUtils/doc/packagedoc.h
index 7daccbbb0416ccab32c2ba3fc5db500b07b4c6e4..a54e1250f722495aa72b0745b4164c89ef4cbe35 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleUtils/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibStandAlone/CalibNtupleUtils/doc/packagedoc.h
@@ -23,16 +23,5 @@ This set of classes are usefull whilst analysing/handling CalibrationNtuples. It
 - MuonCalib::TimedMdtCalibHit : class used by the T0Fitter, since each MdtCalibHitBase owns a t0.
 - MuonCalib::TimedSegment : class used by the T0fitter, since each MuonCalibSegment will own a t0.
 
-@ref used_CalibNtupleUtils
 
-@ref requirements_CalibNtupleUtils
-*/
-
-
-/**
-@page used_CalibNtupleUtils Used Packages
-*/
-
-/**
-@page requirements_CalibNtupleUtils Requirements
 */
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibTools/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibTools/doc/packagedoc.h
index f9fd3c07e0a6a2db6553846088cc5ea9184746d4..69dbc7f208bbafac351ae974801ef7909e150dcb 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibTools/doc/packagedoc.h
@@ -19,17 +19,6 @@ This package contains general tools needed by the Muon Calibration Framework
 
 - MuonCalib::IdToFixedIdTool: translates an (ATHENA) Identifier to a (Calib EDM) MuonFixedId. And vice versa.
 
-@ref used_MuonCalibTools
                                                                                 
-@ref requirements_MuonCalibTools
                                                                                 
 */
-                                                                                
-/**
-@page used_MuonCalibTools Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCalibTools Requirements
-*/
-       
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibTools/src/PatternNtupleMaker.cxx b/MuonSpectrometer/MuonCalib/MuonCalibTools/src/PatternNtupleMaker.cxx
index 9673bc6403eeed27b06644e075b7804c5620d0c6..6c502550a8514b5956986716a35d0c0078334cfa 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibTools/src/PatternNtupleMaker.cxx
+++ b/MuonSpectrometer/MuonCalib/MuonCalibTools/src/PatternNtupleMaker.cxx
@@ -101,7 +101,7 @@ namespace MuonCalib {
 //	(*truth_it)->dump(std::cout) ;
 	
 	//Do not store the numerous photons/neutrons on ntuple.
-	if( ( (*truth_it)->PDGCode() == 22) || ( fabs( (*truth_it)->PDGCode()) == 2112) )  continue ;
+	if( ( (*truth_it)->PDGCode() == 22) || ( std::abs( (*truth_it)->PDGCode()) == 2112) )  continue ;
 	else m_ntMaker->fillTruthToTree( **truth_it );
       }
     }  
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibUtils/MuonCalibMath/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibUtils/MuonCalibMath/doc/packagedoc.h
index cc91a621022a7832889264634721a9697fe156a2..538922ad75b472586e11f474db871a5abd6edf81 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibUtils/MuonCalibMath/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibUtils/MuonCalibMath/doc/packagedoc.h
@@ -19,16 +19,5 @@ The MuonCalibMath package contains the following classes:
 - MuonCalib::SamplePoint: This class provides a sample point for the MuonCalib::BaseFunctionFitter
 - MuonCalib::Tschebyscheff_polynomial: This class provides a tschebyscheff polynomial of order k
                                                                                 
-@ref used_MuonCalibMath
                                                                                 
-@ref requirements_MuonCalibMath
 */
-                                                                                
-/**
-@page used_MuonCalibMath Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCalibMath Requirements
-*/
- 
diff --git a/MuonSpectrometer/MuonCalib/MuonCalibUtils/MuonCalibStl/doc/packagedoc.h b/MuonSpectrometer/MuonCalib/MuonCalibUtils/MuonCalibStl/doc/packagedoc.h
index 48fd1a190b2004548eb667e58fd52c737d172335..237def3cd6b80778f26956dbc698799cf8826da4 100644
--- a/MuonSpectrometer/MuonCalib/MuonCalibUtils/MuonCalibStl/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCalib/MuonCalibUtils/MuonCalibStl/doc/packagedoc.h
@@ -15,16 +15,5 @@ The MuonCalibStl package contains the following classes:
 - MuonCalib::DeleteObject: An operator to delete the object pointed by a pointer to a template class
 - MuonCalib::ToString: Operator converting a class T object into a std::string
                                                                                 
-@ref used_MuonCalibStl
                                                                                 
-@ref requirements_MuonCalibStl
 */
-                                                                                
-/**
-@page used_MuonCalibStl Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCalibStl Requirements
-*/
- 
diff --git a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MuonRdoToMuonDigitTool.cxx b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MuonRdoToMuonDigitTool.cxx
index 44fb7892db047a27168f8b6a834ef3aaa213f798..ce65fa6d3c3df45264346df542e457ed9abdfc7d 100644
--- a/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MuonRdoToMuonDigitTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonByteStreamCnvTest/src/MuonRdoToMuonDigitTool.cxx
@@ -508,7 +508,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeMdt( const MdtCsm * rdoColl, MdtDigitCo
 		  ATH_MSG_WARNING( "Couldn't record MdtDigitCollection with key=" << coll_hash 
                                    << " in StoreGate!"  );
 	      } else {  
-		MdtDigitCollection * oldCollection = const_cast<MdtDigitCollection*>( it_coll->cptr() );
+		MdtDigitCollection * oldCollection = const_cast<MdtDigitCollection*>( *it_coll );
 		oldCollection->push_back(newDigit);
 		collection = oldCollection;
 	      }
@@ -600,7 +600,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeCsc( const CscRawDataCollection * rdoCo
 		  ATH_MSG_WARNING( "Couldn't record CscDigitCollection with key=" << coll_hash 
                                    << " in StoreGate!"  );
 	    } else {  
-	      CscDigitCollection * oldCollection = const_cast<CscDigitCollection*>( it_coll->cptr() );
+	      CscDigitCollection * oldCollection = const_cast<CscDigitCollection*>( *it_coll );
 	      oldCollection->push_back(newDigit);
 	      collection = oldCollection;
 	    }
@@ -690,7 +690,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeRpc( const RpcPad * rdoColl, RpcDigitCo
                         }
                         else
                         {
-	                   RpcDigitCollection * oldCollection = const_cast<RpcDigitCollection*>( it_coll->cptr() );
+	                   RpcDigitCollection * oldCollection = const_cast<RpcDigitCollection*>( *it_coll );
 	                   oldCollection->push_back(newDigit);
                            collection = oldCollection;
                         }
@@ -884,7 +884,7 @@ StatusCode MuonRdoToMuonDigitTool::decodeTgc( const TgcRdo *rdoColl,
                   m_acSvc->setStore( &*evtStore() );
                   TgcDigitContainer::const_iterator it_coll = m_tgcContainer->indexFind(coll_hash);
                   if (m_tgcContainer->end() !=  it_coll) {
-                       collection = const_cast<TgcDigitCollection*>( it_coll->cptr() );
+                       collection = const_cast<TgcDigitCollection*>( *it_coll );
 		    }
 		  else
 		    {
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/doc/packagedoc.h b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/doc/packagedoc.h
index 28f669bcffa1b1d50e371eb54691e19383d29247..33f33f1cc23f9a602f115a348050d989d2d26953 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section MuonCSC_CnvTools_MuonCSC_CnvToolsReq Requirements
 
 
 */
diff --git a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataTool.cxx
index 4f1b5a4c72767e806435926a9b80a7849d9f8fa0..05ad94746b82da3db608282bb18d871ca0a3c1d2 100644
--- a/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonCSC_CnvTools/src/CscRdoToCscPrepDataTool.cxx
@@ -298,11 +298,8 @@ StatusCode CscRdoToCscPrepDataTool::decode(const CscRawDataContainer* rdoContain
       } else {  // It won't be needed because we already skipped decoded one (should be checked it's true)
 
 //Hack for transition to athenaMT classes
-#ifdef __IdentifiableContainerMTUSED
 	CscStripPrepDataCollection * oldCollection = const_cast<CscStripPrepDataCollection*>( *it_coll );
-#else
-        CscStripPrepDataCollection * oldCollection = const_cast<CscStripPrepDataCollection*>( it_coll->cptr());
-#endif 
+
 	collection = oldCollection;
 	cscHashId = collection->identifyHash();
       }
@@ -538,12 +535,7 @@ StatusCode CscRdoToCscPrepDataTool::decode(const CscRawDataContainer* rdoContain
 	    
 	  } else {  
 //Hack for transition to athenaMT classes
-#ifdef __IdentifiableContainerMTUSED
             CscStripPrepDataCollection * oldCollection = const_cast<CscStripPrepDataCollection*>( *it_coll );
-#else
-            CscStripPrepDataCollection * oldCollection = const_cast<CscStripPrepDataCollection*>( it_coll->cptr());
-#endif
-
 
 	    collection = oldCollection;
 	    cscHashId = collection->identifyHash();
diff --git a/MuonSpectrometer/MuonCnv/MuonCnvExample/share/MuonReadBS_jobOptions.py b/MuonSpectrometer/MuonCnv/MuonCnvExample/share/MuonReadBS_jobOptions.py
index 90916bae8d3a06caca29bed44f8be446f5cb6a59..5f53b5e96841468bda95336c507dd2c24b42c4ee 100644
--- a/MuonSpectrometer/MuonCnv/MuonCnvExample/share/MuonReadBS_jobOptions.py
+++ b/MuonSpectrometer/MuonCnv/MuonCnvExample/share/MuonReadBS_jobOptions.py
@@ -13,19 +13,20 @@ include.block("MuonCnvExample/MuonReadBS_jobOptions.py")
 
 from AthenaCommon.DetFlags import DetFlags
 from AthenaCommon.CfgGetter import getAlgorithm
+from MuonRecExample.MuonRecFlags import muonRecFlags
 
 # ================= MDT ===========================
-if DetFlags.readRDOBS.MDT_on():
+if DetFlags.readRDOBS.MDT_on() and muonRecFlags.makePRDs():
     topSequence += getAlgorithm("MuonMdtRawDataProvider")
     
 # ================= RPC ===========================
-if DetFlags.readRDOBS.RPC_on():
+if DetFlags.readRDOBS.RPC_on() and muonRecFlags.makePRDs():
     topSequence += getAlgorithm("MuonRpcRawDataProvider")
 
 # ================= TGC ===========================
-if DetFlags.readRDOBS.TGC_on():
+if DetFlags.readRDOBS.TGC_on() and muonRecFlags.makePRDs():
     topSequence += getAlgorithm("MuonTgcRawDataProvider")
 
 # ================= CSC ===========================
-if DetFlags.readRDOBS.CSC_on():
+if DetFlags.readRDOBS.CSC_on() and muonRecFlags.makePRDs():
     topSequence += getAlgorithm("MuonCscRawDataProvider")
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt
index aac5993bd0742c1aef0f7131793ca4f9e1592677..2a3d72b8ef6864b7d44b0c50927e3fe12488c90a 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt
@@ -51,6 +51,7 @@ atlas_add_poolcnv_library( MuonEventAthenaPoolPoolCnv
 # against the PoolCnv library.
 atlas_add_library( MuonEventAthenaPoolTestLib
                    src/*Cnv_p*.cxx
+                   src/CreateTransientTemplates.cxx
                    NO_PUBLIC_HEADERS
                    INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
                    LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaPoolUtilities AtlasSealCLHEP MuonRDO MuonRIO_OnTrack MuonSegment AthAllocators AthContainers SGTools StoreGateLib SGtests AthenaPoolCnvSvcLib Identifier GaudiKernel RPCcablingInterfaceLib CscCalibEvent MuonEventTPCnv MuonReadoutGeometry MuonDigitContainer MuonIdHelpersLib MuonChamberT0s MuonPrepRawData MuonTrigCoinData MuonSimData )
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/CreateTransientTemplates.h b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/CreateTransientTemplates.h
new file mode 100644
index 0000000000000000000000000000000000000000..a92b00acb23f73282219d6737f934f085dea3992
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/MuonEventAthenaPool/CreateTransientTemplates.h
@@ -0,0 +1,26 @@
+#ifndef MUONEVENTATHENAPOOL_CREATETRANSIENTTEMPLATES_H
+#define MUONEVENTATHENAPOOL_CREATETRANSIENTTEMPLATES_H
+
+#include "MuonRDO/RpcPadContainer.h"
+#include "MuonPrepRawData/MuonPrepDataContainer.h"
+#include "MuonTrigCoinData/TgcCoinData.h"
+#include "MuonPrepRawData/CscStripPrepData.h"
+#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h"
+#include "TPTools/TPConverter.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
+namespace TPCnv {
+
+
+  template<> class CreateTransient<RpcPadContainer> {
+    public: static std::unique_ptr<RpcPadContainer> create();
+  };
+
+
+  template<> class CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::TgcCoinData> >> {
+    public: static std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::TgcCoinData> >> create();
+  };
+
+}
+
+#endif
+
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/doc/packagedoc.h b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/doc/packagedoc.h
index 8395e7b284e676ece3b9e9056957954866612c74..148c0241af506d41ad7b20952b8d44dc1c8393ce 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/doc/packagedoc.h
@@ -15,16 +15,6 @@ This package handles the persistency of Muon EDM classes.
 @see https://twiki.cern.ch/twiki/bin/view/Atlas/TransientPersistentSeparation
 
 
-@ref used_MuonEventAthenaPool
 
-@ref requirements_MuonEventAthenaPool
 
 */
-
-/**
-@page used_MuonEventAthenaPool Used Packages
-*/
-
-/**
-@page requirements_MuonEventAthenaPool Requirements
-*/
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CreateTransientTemplates.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CreateTransientTemplates.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..9ea2ad87b86edf0308fee9b1a864e27b34347794
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CreateTransientTemplates.cxx
@@ -0,0 +1,21 @@
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
+#include <iostream>
+#include <signal.h>
+
+using namespace TPCnv;
+
+std::unique_ptr<RpcPadContainer>
+  CreateTransient<RpcPadContainer>::create() { 
+  std::cout << "Override CreateTransient in the calling class MuonEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+return nullptr; }
+
+
+
+std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::TgcCoinData> >>
+  CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::TgcCoinData> >>::create() {
+  std::cout << "Override CreateTransient in the calling class MuonEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+ return nullptr; }
+
+
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscPrepDataContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscPrepDataContainerCnv.cxx
index 1a8f08262b07fa444b25c19e9ff8a3a4ed7f29c5..9d9ff6facef889e9c5774ab0cf47dedd4e87b7ae 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscPrepDataContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscPrepDataContainerCnv.cxx
@@ -17,6 +17,7 @@
 // #include "MuonIdHelpers/CscIdHelper.h"
 #include "MuonPrepRawData/CscPrepDataContainer.h"
 #include "MuonEventTPCnv/CscPrepDataContainerCnv_tlp1.h"
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
 
 // #include "MuonReadoutGeometry/MuonDetectorManager.h"
 // #include "MuonReadoutGeometry/CscReadoutElement.h"
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.cxx
index dc5ebea3e60dd2f7902675bf42d6fa070fa42b43..0ec666cfcf9b7770668fd2728e2b74802df3fb3c 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.cxx
@@ -18,6 +18,8 @@
 #include "MuonPrepRawData/CscStripPrepDataContainer.h"
 // #include "MuonReadoutGeometry/MuonDetectorManager.h"
 // #include "MuonReadoutGeometry/CscReadoutElement.h"
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
+
 
 CscStripPrepDataContainerCnv::CscStripPrepDataContainerCnv(ISvcLocator* svcloc) :
 CscStripPrepDataContainerCnvBase(svcloc),
@@ -82,7 +84,6 @@ Muon::CscStripPrepDataContainer* CscStripPrepDataContainerCnv::createTransient()
     Muon::CscStripPrepDataContainer* p_collection(0);
     if( compareClassGuid(p1_guid) ) {
         log<<MSG::DEBUG<<"createTransient(): T/P version 1 detected"<<endmsg;
-        usingTPCnvForReading( m_TPConverter );
         std::unique_ptr< CscStripPrepDataContainer_PERS >  p_coll( poolReadObject< CscStripPrepDataContainer_PERS >() );
         p_collection = m_TPConverter.createTransient( p_coll.get(), log );
     }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.h b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.h
index 66c93ff2eae023581688e53f639ff4ba4094eef0..06e65088e09e6e45595f650d8fe28bd7b1019098 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/CscStripPrepDataContainerCnv.h
@@ -5,7 +5,6 @@
 #ifndef MUONEVENTATHENAPOOL_CSCSTRIPPREPDATACONTAINERCNV_H
 #define MUONEVENTATHENAPOOL_CSCSTRIPPREPDATACONTAINERCNV_H
 
-//#include "AthenaPoolCnvSvc/T_AthenaPoolCustCnv.h"
 #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
 #include "MuonPrepRawData/CscStripPrepDataCollection.h"
 #include "MuonPrepRawData/CscStripPrepDataContainer.h"
@@ -26,9 +25,7 @@ typedef  T_AthenaPoolCustomCnv<Muon::CscStripPrepDataContainer, CscStripPrepData
  ** Create derived converter to customize the saving of identifiable
  ** container
  **/
-class CscStripPrepDataContainerCnv : 
-    public CscStripPrepDataContainerCnvBase,
-    public AthenaPoolCnvTPExtension 
+class CscStripPrepDataContainerCnv :  public CscStripPrepDataContainerCnvBase
 {
     
     friend class CnvFactory<CscStripPrepDataContainerCnv>;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MdtPrepDataContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MdtPrepDataContainerCnv.cxx
index b3e893b7f781a96e1505bf078971289f8c8afff5..c006b9377faeeb5030f95800cdfe45a74a7493b4 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MdtPrepDataContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MdtPrepDataContainerCnv.cxx
@@ -20,6 +20,8 @@
 #include "MuonPrepRawData/MdtPrepDataContainer.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/MdtReadoutElement.h"
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
+
 
 MdtPrepDataContainerCnv::MdtPrepDataContainerCnv(ISvcLocator* svcloc) :
 MdtPrepDataContainerCnvBase(svcloc)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MmDigitContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MmDigitContainerCnv.cxx
index 3ad7ef762dcb8db945caa26d1ebee6caea80615b..3cf2c1f8c455935ef3b95e129727f39ef27244e2 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MmDigitContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MmDigitContainerCnv.cxx
@@ -13,6 +13,8 @@
 // Athena
 #include "StoreGate/StoreGateSvc.h"
 #include "MuonDigitContainer/MmDigitContainer.h"
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
+
 
 MmDigitContainerCnv::MmDigitContainerCnv(ISvcLocator* svcloc) :
 MmDigitContainerCnvBase(svcloc)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MuonRdoContainerTPCnv.h b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MuonRdoContainerTPCnv.h
index 45a6ed59290ee535b0140c6828d2b1dea6e17903..9f431495098232b2609d1334c67994606455e4f6 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MuonRdoContainerTPCnv.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MuonRdoContainerTPCnv.h
@@ -18,7 +18,7 @@
 #include "AthContainers/DataVector.h"
 
 #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
-
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
 
 template <class T, class P, class CONV>
 class MuonRdoContainerTPCnv
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MuonRdoContainerTPCnv.icc b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MuonRdoContainerTPCnv.icc
index 4fd404fc35dfbaa46a9421ee7635150a1145e82e..e2f26725bb43a64cc4d744f9a1ccb0f6934caf9d 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MuonRdoContainerTPCnv.icc
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/MuonRdoContainerTPCnv.icc
@@ -8,6 +8,7 @@
 #include <memory>
 #include "Identifier/IdentifierHash.h"
 
+
 template <class T, class P, class CONV>
 MuonRdoContainerTPCnv<T,P, CONV >::MuonRdoContainerTPCnv(ISvcLocator* svcloc)
   : T_AthenaPoolCustomCnv<T,P >(svcloc)
@@ -56,7 +57,7 @@ MuonRdoContainerTPCnv<T,P, CONV >
 {
    if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Using old RDO container converter"  << endmsg;
 
-   std::unique_ptr<T> rdoC( new T );
+   std::unique_ptr<T> rdoC( new T(col_vect->size()) );
    //COLL_vector	*col_vect = (COLL_vector*) colV;
    typename COLL_vector::const_iterator it_Coll  = col_vect->begin();
    typename COLL_vector::const_iterator it_CollE = col_vect->end();
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv.h b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv.h
index f68521adca7815f51133343ba7816eee7eaa7b9a..60ac5670bc5e8020160c7f9dd0216f11d1583684 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv.h
@@ -22,7 +22,7 @@
 
 typedef MuonRdoContainerTPCnv<RpcPadContainer, RpcPadContainer_p2, RpcPadContainerCnv_p2 >
 RpcPadContainerCnv;
-
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
 
 template < >
 inline
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.cxx
index 7ad8b3a3ecd2d54c9ed890ba899026400fc870cb..4f5f34682ebb782cca97408ff63855cf414d6634 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.cxx
@@ -28,6 +28,8 @@
 #include "RPCcablingInterface/IRPCcablingServerSvc.h"
 #include "RPCcablingInterface/RpcPadIdHash.h"
 #include "RPCcablingInterface/IRPCcablingSvc.h"
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
+
 
 StatusCode RpcPadContainerCnv_p1::initialize(MsgStream &log,
                                              IRPCcablingSvc* cabling /*= nullptr*/) {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.h b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.h
index 2046a5562d4de7c95b0d69727937abedbe920a1f..219833cdf04823b3c291abfd83c440c2ffc70f99 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p1.h
@@ -26,9 +26,9 @@ public:
     typedef RpcPadContainer_p1 PERS;  
     typedef RpcPadContainer TRANS;
     RpcPadContainerCnv_p1(): m_rpcCabling(0), m_isInitialized(false)/*, m_errorCount(0), m_maxNumberOfErrors(10)*/ {}
-    virtual void persToTrans(const PERS* persCont, TRANS* transCont, MsgStream &log); 
-    virtual void transToPers(const TRANS* transCont, PERS* persCont, MsgStream &log);
-    virtual RpcPadContainer* createTransient(const RpcPadContainer_p1* persObj, MsgStream& log);
+    virtual void persToTrans(const PERS* persCont, TRANS* transCont, MsgStream &log) override; 
+    virtual void transToPers(const TRANS* transCont, PERS* persCont, MsgStream &log) override;
+    virtual RpcPadContainer* createTransient(const RpcPadContainer_p1* persObj, MsgStream& log) override;
     StatusCode initialize(MsgStream &log, IRPCcablingSvc* cabling = nullptr);
 private:
 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.cxx
index 30ea82ef8c48ef07e4453efe51168716667b628d..193c1fc4cf61e37bab513ba53f2e3994494d21fb 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPadContainerCnv_p2.cxx
@@ -28,6 +28,7 @@
 #include "RPCcablingInterface/IRPCcablingServerSvc.h"
 #include "RPCcablingInterface/RpcPadIdHash.h"
 #include "RPCcablingInterface/IRPCcablingSvc.h"
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
 
 StatusCode RpcPadContainerCnv_p2::initialize(MsgStream &log,
                                              IRPCcablingSvc* cabling /*= nullptr*/) {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPrepDataContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPrepDataContainerCnv.cxx
index 4756e8764cb50e1fceeddceaa79f9367e729ca23..3deb9eb1d59bfc5e85cec4ef7d13a05d121ae917 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPrepDataContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/RpcPrepDataContainerCnv.cxx
@@ -18,6 +18,8 @@
 #include "MuonPrepRawData/RpcPrepDataContainer.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/RpcReadoutElement.h"
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
+
 
 RpcPrepDataContainerCnv::RpcPrepDataContainerCnv(ISvcLocator* svcloc) :
 RpcPrepDataContainerCnvBase(svcloc)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/TgcCoinDataContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/TgcCoinDataContainerCnv.cxx
index 04177e27681b18103c09aac8a185cf07f6602c5d..b163652faef9627d2bff7751bd8141f8afe096d6 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/TgcCoinDataContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/TgcCoinDataContainerCnv.cxx
@@ -19,6 +19,8 @@
 #include "MuonTrigCoinData/TgcCoinDataContainer.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonReadoutGeometry/TgcReadoutElement.h"
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
+
 
 TgcCoinDataContainerCnv::TgcCoinDataContainerCnv(ISvcLocator* svcloc) :
 TgcCoinDataContainerCnvBase(svcloc),
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcDigitContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcDigitContainerCnv.cxx
index 1b3feb8fb4267b97332366a3614f6d4447dbfb4f..7c2f1f2addfbabded679a4e411e20dd0af27f5ac 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcDigitContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcDigitContainerCnv.cxx
@@ -13,6 +13,8 @@
 // Athena
 #include "StoreGate/StoreGateSvc.h"
 #include "MuonDigitContainer/sTgcDigitContainer.h"
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
+
 
 sTgcDigitContainerCnv::sTgcDigitContainerCnv(ISvcLocator* svcloc) :
 sTgcDigitContainerCnvBase(svcloc)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcPrepDataContainerCnv.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcPrepDataContainerCnv.cxx
index cf8fd220687c3131d5c35b6c7ee39f5b98ea5936..9477a44f7d53218f2fcfd254a4ce629b42b43d85 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcPrepDataContainerCnv.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/src/sTgcPrepDataContainerCnv.cxx
@@ -16,7 +16,7 @@
 // Id includes
 // #include "MuonIdHelpers/sTgcIdHelper.h"
 #include "MuonPrepRawData/sTgcPrepDataContainer.h"
-
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
 // #include "MuonReadoutGeometry/MuonDetectorManager.h"
 // #include "MuonReadoutGeometry/sTgcReadoutElement.h"
 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/RpcPadContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/RpcPadContainerCnv_p1_test.cxx
index ee5d18970ada7b5646c71ac29dea9c8c2ace49d1..716cc26009a7140a73b86234a7fb1658dc287ca8 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/RpcPadContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/RpcPadContainerCnv_p1_test.cxx
@@ -21,7 +21,7 @@
 #include "TestTools/leakcheck.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
 #include "make_dd.icc"
 
 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/RpcPadContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/RpcPadContainerCnv_p2_test.cxx
index 67888fe9cc295aef28224db89b07b323f8a9e429..c2c3e8261bb83b92e2bd5c149143bc2c27dfb5cd 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/RpcPadContainerCnv_p2_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/RpcPadContainerCnv_p2_test.cxx
@@ -21,7 +21,7 @@
 #include "TestTools/leakcheck.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventAthenaPool/CreateTransientTemplates.h"
 #include "make_dd.icc"
 
 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventCnvTools/doc/packagedoc.h b/MuonSpectrometer/MuonCnv/MuonEventCnvTools/doc/packagedoc.h
index 3d89f869765b743cb7eab1ce6abca0c7c30c215d..25ea48c75b4eabef2fdd873576de5dbcaf42f3a8 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventCnvTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventCnvTools/doc/packagedoc.h
@@ -16,16 +16,6 @@ This package contains a Tools (currently only one in fact), which are used by th
 
   - MuonEventCnvTool which implements the Trk::ITrkEventCnvTool interface.
 
-@ref used_MyPackage
 
-@ref requirements_MyPackage
 
 */
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-*/
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/CreateTransientTemplates.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/CreateTransientTemplates.h
new file mode 100644
index 0000000000000000000000000000000000000000..77f71626f4606b771439ac7e04d1d5498d12f5ae
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/CreateTransientTemplates.h
@@ -0,0 +1,72 @@
+
+#ifndef MUONEVENTTPCNV_CREATETRANSIENT_H
+#define MUONEVENTTPCNV_CREATETRANSIENT_H
+
+#include "AthenaPoolCnvSvc/AthenaPoolTopLevelTPConverter.h"
+#include "TgcCoinDataContainer_tlp3.h"
+#include "TgcCoinDataContainer_tlp2.h"
+#include "TgcCoinDataContainer_tlp1.h"
+#include "MuonTrigCoinData/MuonCoinDataContainer.h"
+#include "MuonPrepRawData/CscStripPrepData.h"
+#include "MuonTrigCoinData/TgcCoinData.h"
+#include "MuonPrepRawData/TgcPrepData.h"
+#include "MuonPrepRawData/MdtPrepData.h"
+#include "MuonPrepRawData/RpcPrepData.h"
+#include "MuonPrepRawData/MMPrepData.h"
+#include "MuonPrepRawData/CscPrepData.h"
+#include "MuonTrigCoinData/RpcCoinData.h"
+#include "MuonPrepRawData/MuonPrepDataContainer.h"
+#include "MuonDigitContainer/MmDigitContainer.h"
+#include "MuonPrepRawData/sTgcPrepData.h"
+#include "MuonDigitContainer/sTgcDigitContainer.h"
+
+//These are to fix a problem with compiling TPConverter using identifiable containers, if the design is changed in the future these can be removed
+
+namespace TPCnv {
+
+
+  template<> class CreateTransient<Muon::MuonCoinDataContainer<Muon::MuonCoinDataCollection<Muon::TgcCoinData> >> {
+    public: static std::unique_ptr<Muon::MuonCoinDataContainer<Muon::MuonCoinDataCollection<Muon::TgcCoinData> >> create();
+  };
+
+  template<> class CreateTransient<Muon::MuonCoinDataContainer<Muon::MuonCoinDataCollection<Muon::RpcCoinData> >> {
+    public: static std::unique_ptr<Muon::MuonCoinDataContainer<Muon::MuonCoinDataCollection<Muon::RpcCoinData> >> create();
+  };
+
+  template<> class CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::TgcPrepData> >> {
+    public: static std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::TgcPrepData> >> create(); };
+
+
+  template<> class CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::CscPrepData> >> {
+    public: static std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::CscPrepData> >> create(); };
+
+  template<> class CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::CscStripPrepData> >> {
+    public: static std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::CscStripPrepData> >> create(); };
+
+  template<> class CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::MdtPrepData> >> {
+    public: static std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::MdtPrepData> >> create(); };
+
+  template<> class CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::RpcPrepData> >> {
+    public: static std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::RpcPrepData> >> create(); };
+
+  template<> class CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::MMPrepData> >> {
+    public: static std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::MMPrepData> >> create(); };
+
+  template<> class CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::RpcCoinData> >> {
+    public: static std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::RpcCoinData> >> create(); };
+
+  template<> class CreateTransient<MmDigitContainer> {
+    public: static std::unique_ptr<MmDigitContainer> create(); };
+
+  template<> class CreateTransient<sTgcDigitContainer> {
+    public: static std::unique_ptr<sTgcDigitContainer> create(); };
+
+  template<> class CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::sTgcPrepData> >> {
+    public: static std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::sTgcPrepData> >> create(); };
+}
+
+
+
+
+#endif
+
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepDataContainerCnv_p1.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepDataContainerCnv_p1.h
index 02a81c18cbcb9a695735264641112d18aaee45f0..90a066e69e8ee3c5f619764e4155bb94361a3e30 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepDataContainerCnv_p1.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepDataContainerCnv_p1.h
@@ -11,7 +11,7 @@
 
 #include "MuonEventTPCnv/MuonPrepRawData/MuonPRD_Container_p2.h"
 
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 #include <iostream>
 
 class StoreGateSvc;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/TgcPrepDataContainerCnv_p2.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/TgcPrepDataContainerCnv_p2.h
index 66f93c3380169f19274efdc858741a94b3690dcd..e6bcc04e9059f09ebbd2ca173c12e8cbfdebcba9 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/TgcPrepDataContainerCnv_p2.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/TgcPrepDataContainerCnv_p2.h
@@ -11,7 +11,7 @@
 
 #include "MuonEventTPCnv/MuonPrepRawData/MuonPRD_Container_p2.h"
 
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 #include <iostream>
 
 class StoreGateSvc;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.h
index 360a4b704e02169658c8188f6657abea21a904d8..ca66090f9c656787968b4912261c35f216581778 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.h
@@ -17,6 +17,7 @@
 #include "MuonTrigCoinData/RpcCoinDataContainer.h"
 #include "MuonEventTPCnv/MuonPrepRawData/MuonPRD_Container_p2.h"
 #include "RpcCoinData_p1.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 namespace MuonGM{ class MuonDetectorManager;}
 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/doc/packagedoc.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/doc/packagedoc.h
index 944da362d51363df732d162d63891d770b684ef3..aa5ba33ff3b8b99000a98d573bdc626b993169f6 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/doc/packagedoc.h
@@ -37,17 +37,6 @@ The ARA convertors are defined in ARA_selection.xml
 @see https://twiki.cern.ch/twiki/bin/view/Atlas/TransientPersistentSeparation
 @see https://twiki.cern.ch/twiki/bin/view/Atlas/WriteReadDataViaPool
 
-@ref used_MuonEventTPCnv
 
-@ref requirements_MuonEventTPCnv
 
 */
-
-/**
-@page used_MuonEventTPCnv Used Packages
-*/
-
-/**
-@page requirements_MuonEventTPCnv Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CreateTransientTemplates.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CreateTransientTemplates.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..767c9929b3a4ebf2cd3925256a23256125211798
--- /dev/null
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CreateTransientTemplates.cxx
@@ -0,0 +1,72 @@
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
+#include <iostream>
+#include <signal.h>
+
+using namespace TPCnv;
+
+std::unique_ptr<Muon::MuonCoinDataContainer<Muon::MuonCoinDataCollection<Muon::TgcCoinData> >>
+  CreateTransient<Muon::MuonCoinDataContainer<Muon::MuonCoinDataCollection<Muon::TgcCoinData> >>::create() {
+  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+ return nullptr; }
+
+std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::TgcPrepData> >>
+  CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::TgcPrepData> >>::create() {
+  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+ return nullptr; }
+
+std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::CscPrepData> >>
+  CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::CscPrepData> >>::create() { 
+  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+return nullptr; }
+
+std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::CscStripPrepData> >>
+  CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::CscStripPrepData> >>::create() {  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+ return nullptr; }
+
+std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::MdtPrepData> >>
+  CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::MdtPrepData> >>::create() {   std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+return nullptr; }
+
+std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::RpcPrepData> >>
+  CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::RpcPrepData> >>::create() {
+  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+ return nullptr; }
+
+std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::MMPrepData> >>
+  CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::MMPrepData> >>::create() {   std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+return nullptr; }
+
+std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::RpcCoinData> >>
+  CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::RpcCoinData> >>::create() {  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+ return nullptr; }
+
+std::unique_ptr<MmDigitContainer>
+  CreateTransient<MmDigitContainer>::create() {  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+ return nullptr; }
+
+std::unique_ptr<sTgcDigitContainer>
+  CreateTransient<sTgcDigitContainer>::create() {   std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+return nullptr; }
+
+std::unique_ptr<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::sTgcPrepData> >>
+  CreateTransient<Muon::MuonPrepDataContainer<Muon::MuonPrepDataCollection<Muon::sTgcPrepData> >>::create() {
+  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+  return nullptr; }
+
+std::unique_ptr<Muon::MuonCoinDataContainer<::Muon::MuonCoinDataCollection<::Muon::RpcCoinData> >>
+  CreateTransient<Muon::MuonCoinDataContainer<::Muon::MuonCoinDataCollection<::Muon::RpcCoinData> >>::create() { 
+  std::cout << "Override CreateTransient in the calling class InDetEventAthenaPool/" << __FILE__ << " " << __LINE__ << std::endl;
+  raise(SIGSEGV);
+  return nullptr; }
+
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CscPrepDataContainerCnv_tlp1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CscPrepDataContainerCnv_tlp1.cxx
index 11b4e0d8a021743474eb980c6c8c42f380684f88..837f54c5770160e78cd127701c05c338d5a70352 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CscPrepDataContainerCnv_tlp1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CscPrepDataContainerCnv_tlp1.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "MuonEventTPCnv/CscPrepDataContainerCnv_tlp1.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 CscPrepDataContainerCnv_tlp1::CscPrepDataContainerCnv_tlp1()
 {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CscStripPrepDataContainerCnv_tlp1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CscStripPrepDataContainerCnv_tlp1.cxx
index 29a384bc4059e64b70a32851fb4d20ab9f4ea664..68dd6e4acd487a1ce25bfd6cbc9cf3eb5ab2f846 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CscStripPrepDataContainerCnv_tlp1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/CscStripPrepDataContainerCnv_tlp1.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "MuonEventTPCnv/CscStripPrepDataContainerCnv_tlp1.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 CscStripPrepDataContainerCnv_tlp1::CscStripPrepDataContainerCnv_tlp1()
 {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MdtPrepDataContainerCnv_tlp1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MdtPrepDataContainerCnv_tlp1.cxx
index c5c90eec2b0722b5c2c3764010893cdc7ac42959..2c24c3c3e019927527050ceb397cfceacfa04c3f 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MdtPrepDataContainerCnv_tlp1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MdtPrepDataContainerCnv_tlp1.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "MuonEventTPCnv/MdtPrepDataContainerCnv_tlp1.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 MdtPrepDataContainerCnv_tlp1::MdtPrepDataContainerCnv_tlp1()
 {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p1.cxx
index 2216f63e967f45f23848e9547dcfe93a68e26eb2..8005bb20f766c3e0bfcd0c4ae605bf913974b003 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p1.cxx
@@ -21,7 +21,7 @@
 // Athena
 #include "StoreGate/StoreGateSvc.h"
 #include <limits>       // std::numeric_limits
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 StatusCode Muon::MM_DigitContainerCnv_p1::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p2.cxx
index 3584693eecd198b5261515902e247faf2e94b11f..0217c616a7f88d8e6ff064a97278832c9cbbbdee 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/MM_DigitContainerCnv_p2.cxx
@@ -21,7 +21,7 @@
 // Athena
 #include "StoreGate/StoreGateSvc.h"
 #include <limits>       // std::numeric_limits
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 StatusCode Muon::MM_DigitContainerCnv_p2::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/STGC_DigitContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/STGC_DigitContainerCnv_p1.cxx
index 65b9e4ce1946578ac8e077e1ae69739267d2ae0e..edbe62acd593f57d0a30430245759822d76a9c5b 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/STGC_DigitContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonDigitContainer/STGC_DigitContainerCnv_p1.cxx
@@ -20,6 +20,8 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
+
 
 /*******************************************************************************/
 StatusCode Muon::STGC_DigitContainerCnv_p1::initialize(MsgStream &log) {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p1.cxx
index 647e69d829f40332a09c6cb8830171cedded3a6e..35847aa123c16d211462a71e91850abc315acf05 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p1.cxx
@@ -27,6 +27,8 @@
 
 
 #include "AthAllocators/DataPool.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
+
 
 StatusCode Muon::CscPrepDataContainerCnv_p1::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p2.cxx
index e2cb4274baeba55f3ba236485c1250b71be1aa1f..601b17c8380e82ee0d4bede4f96612e50d4d9d52 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscPrepDataContainerCnv_p2.cxx
@@ -21,7 +21,7 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 StatusCode Muon::CscPrepDataContainerCnv_p2::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscStripPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscStripPrepDataContainerCnv_p1.cxx
index 057f9ab240f6c3a2495037fc950e088a971e0444..f818c381c16e808722b7e0f9aed8a1c6953386f6 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscStripPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/CscStripPrepDataContainerCnv_p1.cxx
@@ -23,7 +23,7 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 
 #include "AthAllocators/DataPool.h"
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataContainerCnv_p1.cxx
index c3e6753bbd4d0bf35736663102a41c1c11e2f399..982d135245b3f597458f48d3ba86e155dc0238cd 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataContainerCnv_p1.cxx
@@ -21,7 +21,7 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 StatusCode Muon::MMPrepDataContainerCnv_p1::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p1.cxx
index 1f485f5e67719f9c9da733bf303fcd513f1311f1..d339127ea314b4e9361c87af19915233e0f0648e 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p1.cxx
@@ -23,7 +23,7 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 
 #include "AthAllocators/DataPool.h"
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p2.cxx
index 7e2f5ec82145ef8eb97043835ed26fcf5c909f28..980e0c5f5c8cdd91c3100f4b73816a84604b05e5 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MdtPrepDataContainerCnv_p2.cxx
@@ -21,7 +21,7 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 StatusCode Muon::MdtPrepDataContainerCnv_p2::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p1.cxx
index 702617600810be60f093ce7c92b69ce62f75e34c..413647712c6bfb4d7aafbb147e76fbce6edfdf85 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p1.cxx
@@ -26,6 +26,7 @@
 #include "EventPrimitives/EventPrimitives.h"
 #include "GeoPrimitives/GeoPrimitives.h"
 #include "AthAllocators/DataPool.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 StatusCode Muon::RpcPrepDataContainerCnv_p1::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p2.cxx
index e2174de10ff0d964506f72dee5e80bfd45711cd5..86b1f23f61fa8c5e68e8505e3fa999159842126b 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p2.cxx
@@ -22,7 +22,7 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 
 #include "AthAllocators/DataPool.h"
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p3.cxx
index 9d92c19c53f3a2aeee75303831fcf0cec6e5076f..0bcf6a3a2c2f3f7b2e2b792aa2657b0487e4c4b9 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/RpcPrepDataContainerCnv_p3.cxx
@@ -21,7 +21,7 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 StatusCode Muon::RpcPrepDataContainerCnv_p3::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p1.cxx
index acce9d65bf2826556a475061ed8edfcf2488d646..a94435f3117d28e61d892a2cc6ceb76f56d3aaa9 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p1.cxx
@@ -24,7 +24,7 @@
 // Athena
 #include "StoreGate/StoreGateSvc.h"
 
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "AthAllocators/DataPool.h"
 
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p2.cxx
index c52ef2c9dde83b60bc5d0a1e36f35c3f655853e5..9a5414408790879f7753e7bc6662f6a5c65d0101 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p2.cxx
@@ -21,6 +21,8 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
+
 
 StatusCode Muon::TgcPrepDataContainerCnv_p2::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p3.cxx
index a4dc00cf9b45f2a100626bbd3b81522bab3fd8ce..dd081425de4a3361e0739aad050787d6e9f4e2b6 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/TgcPrepDataContainerCnv_p3.cxx
@@ -21,6 +21,7 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 StatusCode Muon::TgcPrepDataContainerCnv_p3::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/sTgcPrepDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/sTgcPrepDataContainerCnv_p1.cxx
index 60c9a13fdec2813736a98703b913ea346524eb56..33ccdc91b0a77703deaa158900ba827654529793 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/sTgcPrepDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/sTgcPrepDataContainerCnv_p1.cxx
@@ -21,7 +21,7 @@
 
 // Athena
 #include "StoreGate/StoreGateSvc.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 StatusCode Muon::sTgcPrepDataContainerCnv_p1::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.cxx
index af5f240c6189bfa09b848f58e680b64c4b5a6775..f154ccd0aba163b1cdf79923f7a84b4d20f295b2 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/RpcCoinDataContainerCnv_p1.cxx
@@ -27,6 +27,8 @@
 // Athena
 #include "StoreGate/StoreGateSvc.h"
 #include "AthAllocators/DataPool.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
+
 
 StatusCode Muon::RpcCoinDataContainerCnv_p1::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p1.cxx
index 09f0de4edee70a1cbe4aa7f9ed17f9ecdc473c8f..e08ec18cfe8e44d234ffd321f6fe0ec1d959d1e1 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p1.cxx
@@ -27,6 +27,8 @@
 
 
 #include "AthAllocators/DataPool.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
+
 
 StatusCode Muon::TgcCoinDataContainerCnv_p1::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p2.cxx
index bd5664d3da56577f3561a692afb462c2ad34f1ea..d6591a4a4a930388e2f3eeab701e92438067c31b 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p2.cxx
@@ -27,6 +27,8 @@
 
 
 #include "AthAllocators/DataPool.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
+
 
 StatusCode Muon::TgcCoinDataContainerCnv_p2::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p3.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p3.cxx
index 3e1b73d9e64ccea6054f855b445f4a2167b62523..1fa4f0dd58d41699977bbfde3e3a4e332ee6d5da 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonTrigCoinData/TgcCoinDataContainerCnv_p3.cxx
@@ -26,6 +26,8 @@
 
 
 #include "AthAllocators/DataPool.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
+
 
 StatusCode Muon::TgcCoinDataContainerCnv_p3::initialize(MsgStream &log) {
    // Do not initialize again:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/RpcPrepDataContainerCnv_tlp1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/RpcPrepDataContainerCnv_tlp1.cxx
index 453534a2af3d08d8494f3a1a88a5d245409f78ed..12c7ad029a71869fa5a9b566aff51718a87b4366 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/RpcPrepDataContainerCnv_tlp1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/RpcPrepDataContainerCnv_tlp1.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "MuonEventTPCnv/RpcPrepDataContainerCnv_tlp1.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 RpcPrepDataContainerCnv_tlp1::RpcPrepDataContainerCnv_tlp1()
 {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp1.cxx
index 2c74763328c5dedb6eba17ff551d18209a239d70..767df1a5cd17009e31bc7a32f9538a6f770a8075 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp1.cxx
@@ -4,7 +4,7 @@
 
 /* Takashi Kubota - June 30, 2008 */
 #include "MuonEventTPCnv/TgcCoinDataContainerCnv_tlp1.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 TgcCoinDataContainerCnv_tlp1::TgcCoinDataContainerCnv_tlp1()
 {
    // Add all converters defined in this top level converter:
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp2.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp2.cxx
index 46ada8da0b51fe95b7c76dfaf4c1c50c00b7f166..b2c5ca1e77832b9034608622a2bf2acddc42b0cb 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp2.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp2.cxx
@@ -4,7 +4,7 @@
 
 /* Takashi Kubota - June 30, 2008 */
 #include "MuonEventTPCnv/TgcCoinDataContainerCnv_tlp2.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 TgcCoinDataContainerCnv_tlp2::TgcCoinDataContainerCnv_tlp2()
 {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp3.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp3.cxx
index f7e01f1a8d6e88c810a13c9600e50996a238b81f..b7cce6cf10f0437a7164e062ead03e172b055357 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp3.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcCoinDataContainerCnv_tlp3.cxx
@@ -3,6 +3,7 @@
 */
 
 #include "MuonEventTPCnv/TgcCoinDataContainerCnv_tlp3.h"
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 
 TgcCoinDataContainerCnv_tlp3::TgcCoinDataContainerCnv_tlp3()
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcPrepDataContainerCnv_tlp1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcPrepDataContainerCnv_tlp1.cxx
index 37878a3e7f6aee231d0f70957c80a6ae03e4ee76..148c020ab9ee7cd22e22d27f2526d28a71c4cad0 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcPrepDataContainerCnv_tlp1.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/TgcPrepDataContainerCnv_tlp1.cxx
@@ -3,7 +3,7 @@
 */
 
 #include "MuonEventTPCnv/TgcPrepDataContainerCnv_tlp1.h"
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 TgcPrepDataContainerCnv_tlp1::TgcPrepDataContainerCnv_tlp1()
 {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataCnv_p1_test.cxx
index 43ad77f0b843ff3d0971f02c517ba65e1b90940f..d7af0bb04eb6746c736100974089c3585041cd5d 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataCnv_p1_test.cxx
@@ -17,7 +17,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 void compare (const Trk::PrepRawData& p1,
               const Trk::PrepRawData& p2)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p1_test.cxx
index 933d90bd06731ef77ef2128b624d9ab889863802..b304668260b53cb91d035d0f48443df82d97a66f 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p1_test.cxx
@@ -19,7 +19,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -65,14 +65,11 @@ void compare (const Muon::CscPrepDataContainer& p1,
   Muon::CscPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::CscPrepDataCollection& coll1 = **it1;
-      const Muon::CscPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::CscPrepDataCollection& coll1 = **it1;
+    const Muon::CscPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p2_test.cxx
index ed9564d8421a3cc490fe0a53ccd7e1e79c2a572f..0b22ac82b65a0758a63e4f4354b5693f96b14e12 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p2_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscPrepDataContainerCnv_p2_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -64,14 +64,11 @@ void compare (const Muon::CscPrepDataContainer& p1,
   Muon::CscPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::CscPrepDataCollection& coll1 = **it1;
-      const Muon::CscPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::CscPrepDataCollection& coll1 = **it1;
+    const Muon::CscPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataCnv_p1_test.cxx
index d263f1e79d5d6cad3826d9637fce99829a676ca0..888773eadef885c881f63702abdecb8aed751a64 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataCnv_p1_test.cxx
@@ -17,7 +17,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 void compare (const Trk::PrepRawData& p1,
               const Trk::PrepRawData& p2)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataContainerCnv_p1_test.cxx
index 1acc34fa52f806f7229249863befd657a1209e33..05c89060d90cb257763e2c39eb17c5c7497352d7 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/CscStripPrepDataContainerCnv_p1_test.cxx
@@ -19,7 +19,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -58,14 +58,11 @@ void compare (const Muon::CscStripPrepDataContainer& p1,
   Muon::CscStripPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::CscStripPrepDataCollection& coll1 = **it1;
-      const Muon::CscStripPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::CscStripPrepDataCollection& coll1 = **it1;
+    const Muon::CscStripPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx
index a7157361660ef62da3114158e056deb044c810d0..005a431e8e55618de30aab11e07edef41f34eaff 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx
@@ -18,6 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 
 #include "make_dd.icc"
@@ -60,14 +61,11 @@ void compare (const Muon::MMPrepDataContainer& p1,
   Muon::MMPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::MMPrepDataCollection& coll1 = **it1;
-      const Muon::MMPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::MMPrepDataCollection& coll1 = **it1;
+    const Muon::MMPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p1_test.cxx
index a786c19227f39557b29fc2972c4d96072cdad358..9bacb40d6885ccbb480519293b967488b2492055 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p1_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -50,17 +50,15 @@ void compare (const MmDigitContainer& p1,
   MmDigitContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const MmDigitCollection& coll1 = **it1;
-      const MmDigitCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const MmDigitCollection& coll1 = **it1;
+    const MmDigitCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
-    ++it1;
-    ++it2;
+  
+  ++it1;
+  ++it2;
   }
   assert (it1 == it1e && it2 == it2e);
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p2_test.cxx
index 22397130521bf7a6432f6a5b043558eb9c0e2e88..74858884ee10763a0fd2dbd998e833a979664601 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p2_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MM_DigitContainerCnv_p2_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -49,14 +49,11 @@ void compare (const MmDigitContainer& p1,
   MmDigitContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const MmDigitCollection& coll1 = **it1;
-      const MmDigitCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const MmDigitCollection& coll1 = **it1;
+    const MmDigitCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataCnv_p1_test.cxx
index b95fa19a4d5c90e52c3bbf797708ffb43cd7d6d7..913d2e5caa86f49ba8f6a29df6ea8ffecb7064f1 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataCnv_p1_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 void compare (const Trk::PrepRawData& p1,
               const Trk::PrepRawData& p2)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataCnv_p2_test.cxx
index 8de4b2a434a3d364efe9ee5ae6612b2cc281e411..fbb283679157bf719bdca559460d0f9eb011947e 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataCnv_p2_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataCnv_p2_test.cxx
@@ -17,7 +17,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 void compare (const Trk::PrepRawData& p1,
               const Trk::PrepRawData& p2)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p1_test.cxx
index 1ff59b65c77fb7451fa096d9b557dbcd4c21703f..82e46c1d306d9a2df17da10e2d3c0b1a4e7bbcea 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p1_test.cxx
@@ -19,7 +19,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -65,14 +65,11 @@ void compare (const Muon::MdtPrepDataContainer& p1,
   Muon::MdtPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::MdtPrepDataCollection& coll1 = **it1;
-      const Muon::MdtPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::MdtPrepDataCollection& coll1 = **it1;
+    const Muon::MdtPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p2_test.cxx
index 441c9ef818d3917f3bcca22a8683983e8336df5c..1eed7ba3fe0e8904f99b843805137cbf6e3c2aac 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p2_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MdtPrepDataContainerCnv_p2_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -64,14 +64,11 @@ void compare (const Muon::MdtPrepDataContainer& p1,
   Muon::MdtPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::MdtPrepDataCollection& coll1 = **it1;
-      const Muon::MdtPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::MdtPrepDataCollection& coll1 = **it1;
+    const Muon::MdtPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcCoinDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcCoinDataContainerCnv_p1_test.cxx
index ff5944b147f6aed1d335de662657eb1c094e10d0..be86093434544efefb740995f84ab3d497644dd8 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcCoinDataContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcCoinDataContainerCnv_p1_test.cxx
@@ -19,7 +19,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -81,14 +81,11 @@ void compare (const Muon::RpcCoinDataContainer& p1,
   Muon::RpcCoinDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::RpcCoinDataCollection& coll1 = **it1;
-      const Muon::RpcCoinDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::RpcCoinDataCollection& coll1 = **it1;
+    const Muon::RpcCoinDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+     compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataCnv_p1_test.cxx
index a3e2b75d55cd656e873f09ce41d559517742c390..a528f8584654c8e5d9c0606b05070caa7cd88050 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataCnv_p1_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 void compare (const Trk::PrepRawData& p1,
               const Trk::PrepRawData& p2)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataCnv_p2_test.cxx
index 78ddfc389e99f06785f0403b85ae4ea37efcdaa5..478c70d1b358811f0c5ea21834888856309522b3 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataCnv_p2_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataCnv_p2_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 void compare (const Trk::PrepRawData& p1,
               const Trk::PrepRawData& p2)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p1_test.cxx
index 468eaaa12023409ff1eb6ffc2c8edb8842e587d7..bfca528db23e0d3efae69e16357f248a5d53415c 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p1_test.cxx
@@ -19,7 +19,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -64,14 +64,11 @@ void compare (const Muon::RpcPrepDataContainer& p1,
   Muon::RpcPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::RpcPrepDataCollection& coll1 = **it1;
-      const Muon::RpcPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::RpcPrepDataCollection& coll1 = **it1;
+    const Muon::RpcPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p2_test.cxx
index 294aa720007112beb61536c55e3a54ff0564e2b2..a148e24191482e0605d91c1df402a1e065b01f50 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p2_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p2_test.cxx
@@ -19,7 +19,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -64,14 +64,11 @@ void compare (const Muon::RpcPrepDataContainer& p1,
   Muon::RpcPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::RpcPrepDataCollection& coll1 = **it1;
-      const Muon::RpcPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::RpcPrepDataCollection& coll1 = **it1;
+    const Muon::RpcPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p3_test.cxx
index e185426140f51c10951fd90e3eac440703b4250c..91972db9631096e278e70c421a31fdfb6852d5a3 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p3_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/RpcPrepDataContainerCnv_p3_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -63,14 +63,11 @@ void compare (const Muon::RpcPrepDataContainer& p1,
   Muon::RpcPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::RpcPrepDataCollection& coll1 = **it1;
-      const Muon::RpcPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::RpcPrepDataCollection& coll1 = **it1;
+    const Muon::RpcPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_DigitContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_DigitContainerCnv_p1_test.cxx
index 1c02d6e52f5d88d907cd09e0ae0197be62863f98..ffe4d45812f9b8acb3ef8d1641b8ff300a921c80 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_DigitContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/STGC_DigitContainerCnv_p1_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -41,14 +41,11 @@ void compare (const sTgcDigitContainer& p1,
   sTgcDigitContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const sTgcDigitCollection& coll1 = **it1;
-      const sTgcDigitCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const sTgcDigitCollection& coll1 = **it1;
+    const sTgcDigitCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p1_test.cxx
index 40f638156991a919c377a62f88b15f4658941442..d392a3fc8e0cbf798aaf0fbf4ff7bc4123f13120 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p1_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 void compare (const Muon::TgcCoinData& p1,
               const Muon::TgcCoinData& p2)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p2_test.cxx
index 1b8d4b85743c3fb0b53e1ed59d8e583099b6d384..609a610e44aded8fe14f16819b2f001f087c7dbe 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p2_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p2_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 void compare (const Muon::TgcCoinData& p1,
               const Muon::TgcCoinData& p2)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p3_test.cxx
index 7c07e7bd54313e4bfd75baaf871bb9b03c75841f..3c48650f185caf6aafd54b52cbea923794518098 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p3_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataCnv_p3_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 void compare (const Muon::TgcCoinData& p1,
               const Muon::TgcCoinData& p2)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p1_test.cxx
index 9e0832b17ad9122d84130930326edf5a50030995..12bc3e07bc01518869f8a5cbdcc31d6788f8ba0d 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p1_test.cxx
@@ -19,7 +19,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -70,14 +70,11 @@ void compare (const Muon::TgcCoinDataContainer& p1,
   Muon::TgcCoinDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::TgcCoinDataCollection& coll1 = **it1;
-      const Muon::TgcCoinDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::TgcCoinDataCollection& coll1 = **it1;
+    const Muon::TgcCoinDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p2_test.cxx
index f06b66a56883642d4b643127eb63097996bd19d1..43f828efae3030bdc1922d37f470346cf029d93a 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p2_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p2_test.cxx
@@ -19,7 +19,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -70,14 +70,11 @@ void compare (const Muon::TgcCoinDataContainer& p1,
   Muon::TgcCoinDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::TgcCoinDataCollection& coll1 = **it1;
-      const Muon::TgcCoinDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::TgcCoinDataCollection& coll1 = **it1;
+    const Muon::TgcCoinDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p3_test.cxx
index 7c14606ec65495954cae9db329d039abeb1bc713..5ab89f9760d59c9c3e108bda111a18031b7870c6 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p3_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcCoinDataContainerCnv_p3_test.cxx
@@ -19,7 +19,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -70,14 +70,11 @@ void compare (const Muon::TgcCoinDataContainer& p1,
   Muon::TgcCoinDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::TgcCoinDataCollection& coll1 = **it1;
-      const Muon::TgcCoinDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::TgcCoinDataCollection& coll1 = **it1;
+    const Muon::TgcCoinDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataCnv_p1_test.cxx
index 6be73fc39b470b60f8d4c20461c0a4a7b5f3dad4..0d7cbc3fb53b701e4cc5b7304f3f10c3bea38c21 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataCnv_p1_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 void compare (const Trk::PrepRawData& p1,
               const Trk::PrepRawData& p2)
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p1_test.cxx
index e006d4e0e2c0965d28476d0e0883fbec9e24571f..43428de3df58d14f61c4492bc355b3ee86595910 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p1_test.cxx
@@ -19,7 +19,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -62,14 +62,11 @@ void compare (const Muon::TgcPrepDataContainer& p1,
   Muon::TgcPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::TgcPrepDataCollection& coll1 = **it1;
-      const Muon::TgcPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::TgcPrepDataCollection& coll1 = **it1;
+    const Muon::TgcPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p2_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p2_test.cxx
index ddecad09c22299593a35da60371ed9f1a4c8b796..a87414f8661bfd781455962a203efeefd7bac18b 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p2_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p2_test.cxx
@@ -61,14 +61,11 @@ void compare (const Muon::TgcPrepDataContainer& p1,
   Muon::TgcPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::TgcPrepDataCollection& coll1 = **it1;
-      const Muon::TgcPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::TgcPrepDataCollection& coll1 = **it1;
+    const Muon::TgcPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p3_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p3_test.cxx
index 95d775abc2934a5ab4d5215d0d6c40caea06b890..6b4553b121e930500fb98eb336e6da41150333a1 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p3_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/TgcPrepDataContainerCnv_p3_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -61,14 +61,11 @@ void compare (const Muon::TgcPrepDataContainer& p1,
   Muon::TgcPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::TgcPrepDataCollection& coll1 = **it1;
-      const Muon::TgcPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::TgcPrepDataCollection& coll1 = **it1;
+    const Muon::TgcPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataCnv_p1_test.cxx
index be70757e678cb50e2249b88924d0f3c07a451546..58735b5accf37126c8cf0687921d4b1da9f6a703 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataCnv_p1_test.cxx
@@ -17,6 +17,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 
 void compare (const Trk::PrepRawData& p1,
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataContainerCnv_p1_test.cxx
index 78f7b70629c792890b7f275e3a4ee640f1cd0b04..db9fa794bd148b8565f982b474ca303b9b887b80 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataContainerCnv_p1_test.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/sTgcPrepDataContainerCnv_p1_test.cxx
@@ -18,7 +18,7 @@
 #include "GaudiKernel/MsgStream.h"
 #include <cassert>
 #include <iostream>
-
+#include "MuonEventTPCnv/CreateTransientTemplates.h"
 
 #include "make_dd.icc"
 
@@ -61,14 +61,11 @@ void compare (const Muon::sTgcPrepDataContainer& p1,
   Muon::sTgcPrepDataContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
-      const Muon::sTgcPrepDataCollection& coll1 = **it1;
-      const Muon::sTgcPrepDataCollection& coll2 = **it2;
-      assert (coll1.size() == coll2.size());
-      for (size_t j = 0; j < coll1.size(); j++) {
-        compare (*coll1[j], *coll2[j]);
-      }
+    const Muon::sTgcPrepDataCollection& coll1 = **it1;
+    const Muon::sTgcPrepDataCollection& coll2 = **it2;
+    assert (coll1.size() == coll2.size());
+    for (size_t j = 0; j < coll1.size(); j++) {
+      compare (*coll1[j], *coll2[j]);
     }
     ++it1;
     ++it2;
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/doc/packagedoc.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/doc/packagedoc.h
deleted file mode 100644
index 17f6a03ce5928f735c1fb3e931d63a9523eb54f8..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/doc/packagedoc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-@page MuonMDT_CnvTools_page MuonMDT_CnvTools Package
-
->> Please enter an overview of the created package here: What does it contain?
-
-@author Edward Moyse <Edward.Moyse@cern.ch>
-
-@section MuonMDT_CnvTools_MuonMDT_CnvToolsIntro Introduction
-
->> Please enter a brief description of the package here.
-
-@section MuonMDT_CnvTools_MuonMDT_CnvToolsReq Requirements
-
-
-*/
diff --git a/MuonSpectrometer/MuonCnv/MuonPrdSelector/doc/packagedoc.h b/MuonSpectrometer/MuonCnv/MuonPrdSelector/doc/packagedoc.h
index 389b7e0d65f8649afcb528f1df6795af0a138dcf..1e0413e3ee75a68d16d7721374e52da59bd1a054 100644
--- a/MuonSpectrometer/MuonCnv/MuonPrdSelector/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCnv/MuonPrdSelector/doc/packagedoc.h
@@ -31,17 +31,6 @@ For most top options this is done in MuonRec_jobOptions.py in MuonRecExample.  A
 
 
 
-@ref used_MuonPrdSelector
                                                                                 
-@ref requirements_MuonPrdSelector
                                                                                 
 */
-                                                                                
-/**
-@page used_MuonPrdSelector Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonPrdSelector Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonIdCutTool.cxx b/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonIdCutTool.cxx
index 47e303552a00dfdd3d9c1f6a9111b2253deac6d8..d97b8255fa2da0f2505c9f7ce54e9559b9430bab 100644
--- a/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonIdCutTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonPrdSelector/src/MuonIdCutTool.cxx
@@ -111,7 +111,7 @@ StatusCode MuonIdCutTool::initialize() {
       ATH_MSG_DEBUG( "EEL eta/phi int: "<< eta << " " << sector  );
 
   
-      if(fabs(eta) > 0 && fabs(eta) < 3 && sector > 0 && sector < 17){
+      if(std::abs(eta) > 0 && std::abs(eta) < 3 && sector > 0 && sector < 17){
 	m_EELeta.push_back(eta);
 	m_EELsector.push_back(sector);
       
diff --git a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/doc/packagedoc.h b/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/doc/packagedoc.h
deleted file mode 100644
index 1728e0c2e5c22c1b0077bb6c2866c9ba3dd17be6..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonCnv/MuonRPC_CnvTools/doc/packagedoc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-@page MuonRPC_CnvTools_page MuonRPC_CnvTools Package
-
->> Please enter an overview of the created package here: What does it contain?
-
-@author Edward Moyse <Edward.Moyse@cern.ch>
-
-@section MuonRPC_CnvTools_MuonRPC_CnvToolsIntro Introduction
-
->> Please enter a brief description of the package here.
-
-@section MuonRPC_CnvTools_MuonRPC_CnvToolsReq Requirements
-
-
-*/
diff --git a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/doc/packagedoc.h b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/doc/packagedoc.h
index 2450e445cc9176fc890fc106fcbb40ab05952648..36e439faddbe862fc66093aef3d2b4ca6afe044b 100644
--- a/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCnv/MuonRdoToPrepData/doc/packagedoc.h
@@ -18,5 +18,3 @@ conversion. The RIO can then be used as input in the reconstruction, and or the
 
  - For questions or comments: Ketevi A. Assamagan
    ketevi@bnl.gov
-
-
diff --git a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/doc/packagedoc.h b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/doc/packagedoc.h
index c2ee183788ac3ad487ba8949227d0107be0d7b86..942e86fcd2d77e9ff678029007d3e98e8b5999ec 100644
--- a/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonCnv/MuonTGC_CnvTools/doc/packagedoc.h
@@ -247,7 +247,6 @@ based on muonRecFlags.doTGC_rawdataROD flag defined in MuonSpectrometer/MuonReco
 
 TGC has 24 (12 sectors x 2 sides) Readout Buffers (ROBs). 
 
-@section MuonTGC_CnvTools_MuonTGC_CnvToolsReq Requirements
 
 
 */
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/MDT_CondCabling/MDT_CondCabling/MDTCablingDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondCabling/MDT_CondCabling/MDT_CondCabling/MDTCablingDbTool.h
index 457bc6ddd4339001bdff3d9b155efc66ac7a3164..3427cd0245957dbdb098b6724995ec6c93168b6c 100755
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/MDT_CondCabling/MDT_CondCabling/MDTCablingDbTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/MDT_CondCabling/MDT_CondCabling/MDTCablingDbTool.h
@@ -32,7 +32,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
   
   virtual StatusCode initialize();
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/MDT_CondCabling/src/MDTCablingDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/MDT_CondCabling/src/MDTCablingDbTool.cxx
index c7cb17df8af17fee5b02f8ebaa727b2f88faaccf..9cc572b2996665c6b5b8a21865368b3634657c0c 100755
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/MDT_CondCabling/src/MDTCablingDbTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/MDT_CondCabling/src/MDTCablingDbTool.cxx
@@ -57,7 +57,9 @@ MDTCablingDbTool::MDTCablingDbTool (const std::string& type,
 }
 
 //StatusCode MDTCablingDbTool::updateAddress(SG::TransientAddress* tad)
-StatusCode MDTCablingDbTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad)
+StatusCode MDTCablingDbTool::updateAddress(StoreID::type /*storeID*/,
+                                           SG::TransientAddress* tad,
+                                           const EventContext& /*ctx*/)
 {
   CLID clid        = tad->clID();
   std::string key  = tad->name();
@@ -108,15 +110,9 @@ StatusCode MDTCablingDbTool::initialize()
 
 
 
-   SG::TransientAddress* tad =  proxy->transientAddress();
-   if (!tad) {
-      ATH_MSG_ERROR( "Unable to get the tad"  );
-      return StatusCode::FAILURE;
-   }else ATH_MSG_INFO( "proxy transient Address found"  );
-
    IAddressProvider* addp = this;
    //   tad->setProvider(addp);
-   tad->setProvider(addp, StoreID::DETECTOR_STORE);
+   proxy->setProvider(addp, StoreID::DETECTOR_STORE);
    ATH_MSG_VERBOSE( "set address provider for CABLING Container"  );
     
    return StatusCode::SUCCESS;
@@ -412,16 +408,9 @@ StatusCode MDTCablingDbTool::loadMDTMap(IOVSVC_CALLBACK_ARGS_P(/*I*/,/*keys*/))
     return StatusCode::FAILURE;
   }
 
-  SG::TransientAddress* tad =  proxy->transientAddress();
-  if (!tad) {
-    ATH_MSG_ERROR( "Unable to get the tad"  );
-    return StatusCode::FAILURE;
-  }
-  
-
   IAddressProvider* addp = this;
   //  tad->setProvider(addp);
-  tad->setProvider(addp, StoreID::DETECTOR_STORE);
+  proxy->setProvider(addp, StoreID::DETECTOR_STORE);
   ATH_MSG_VERBOSE( "set address provider for Cabling Container"  );
  
   //IOVRange range;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCCablingDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCCablingDbTool.h
index 6b647be38af55c524aa5b3d558a4d1c594ec6ef8..bd133768892214051c293e6e28b99506a642c2dd 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCCablingDbTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCCablingDbTool.h
@@ -30,7 +30,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //  virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
   
   virtual StatusCode initialize();
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCTriggerDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCTriggerDbTool.h
index c0560fa5c1cfd89eccf8d96fde66082129fe8777..9e1e8b9773c9a2114b76ebd3d8cac36108803425 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCTriggerDbTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/RPC_CondCabling/RPCTriggerDbTool.h
@@ -30,7 +30,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //  virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
 
   virtual StatusCode initialize();
   
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RPCCablingDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RPCCablingDbTool.cxx
index d76a5ad1a432e44ee2afcb288d7c5ec0e071c0cd..1454a9b3dc941224222741bc029bbe9ad01168ad 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RPCCablingDbTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RPCCablingDbTool.cxx
@@ -57,7 +57,9 @@ RPCCablingDbTool::RPCCablingDbTool (const std::string& type,
 }
 
 //StatusCode RPCCablingDbTool::updateAddress(SG::TransientAddress* /*tad*/)
-StatusCode RPCCablingDbTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* /*tad*/)
+StatusCode RPCCablingDbTool::updateAddress(StoreID::type /*storeID*/,
+                                           SG::TransientAddress* /*tad*/,
+                                           const EventContext& /*ctx*/)
 {
     MsgStream log(msgSvc(), name());
     //CLID clid        = tad->clID();
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RPCTriggerDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RPCTriggerDbTool.cxx
index 20e3761020311b2567159b7bfc7e80c6558d2046..f56d63b31aec9a30d9cab505031d1639c9293794 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RPCTriggerDbTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/RPC_CondCabling/src/RPCTriggerDbTool.cxx
@@ -71,7 +71,9 @@ RPCTriggerDbTool::RPCTriggerDbTool (const std::string& type,
 
 
 //StatusCode RPCTriggerDbTool::updateAddress(SG::TransientAddress* /*tad*/)
-StatusCode RPCTriggerDbTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* /*tad*/)
+StatusCode RPCTriggerDbTool::updateAddress(StoreID::type /*storeID*/,
+                                           SG::TransientAddress* /*tad*/,
+                                           const EventContext& /*ctx*/)
 {
     MsgStream log(msgSvc(), name());
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCCablingDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCCablingDbTool.h
index ffe9183aa314e9d5d2c6e2a2b0065f793f52e36d..28336fc1ace1230c1031bcf801d3dcb87c213047 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCCablingDbTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCCablingDbTool.h
@@ -22,7 +22,9 @@ class TGCCablingDbTool: public AthAlgTool, public ITGCCablingDbTool
   
   /** Required by the IAddressProvider interface */
   //  virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
 
   /** Initilize */
   virtual StatusCode initialize();
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCTriggerDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCTriggerDbTool.h
index a57d177cd87387d41e684154d9e3e360a376a18e..aeffc8fcb2f708b164e2fdb4491d0e29f3f85c97 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCTriggerDbTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/TGC_CondCabling/TGCTriggerDbTool.h
@@ -23,7 +23,9 @@ class TGCTriggerDbTool: public AthAlgTool, public ITGCTriggerDbTool
   
   /** Required by the IAddressProvider interface */
   //  virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
 
   /** Initilize */
   virtual StatusCode initialize();
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/doc/packagedoc.h b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/doc/packagedoc.h
index 7ab9ecc37464ae12864a8bf830566abd05c15b7f..5c48535bfb860806f9d3e8334aa2398ac0265b6c 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/doc/packagedoc.h
@@ -166,5 +166,3 @@ It is better to associate the leaf tag to a global tag and test the database wit
 If there is no problem, then you ask Paul and Richard to associate the leaf tag to other global tags.  
 
 */
-
-
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCCablingDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCCablingDbTool.cxx
index 5758c3a74a3cf9e44fca33bfd17f26bfa78ba08c..f2fad6259eba168be05f81fdd110f7935a8a89ae 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCCablingDbTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCCablingDbTool.cxx
@@ -36,7 +36,9 @@ TGCCablingDbTool::TGCCablingDbTool(const std::string& type,
 
 
 //StatusCode TGCCablingDbTool::updateAddress(SG::TransientAddress* tad) {
-StatusCode TGCCablingDbTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad) {
+StatusCode TGCCablingDbTool::updateAddress(StoreID::type /*storeID*/,
+                                           SG::TransientAddress* tad,
+                                           const EventContext& /*ctx*/) {
   CLID clid = tad->clID();
   std::string key = tad->name();
   // Need to add the CLID comparison 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCTriggerDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCTriggerDbTool.cxx
index 773f2d54786d85486caba842956e3e6baf061e9c..d90e152aa1d41de1277b77a5d32122d201bc0717 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCTriggerDbTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondCabling/TGC_CondCabling/src/TGCTriggerDbTool.cxx
@@ -22,7 +22,9 @@ TGCTriggerDbTool::TGCTriggerDbTool(const std::string& type,
 
 
 //StatusCode TGCCablingDbTool::updateAddress(SG::TransientAddress* tad) {
-StatusCode TGCTriggerDbTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad) {
+StatusCode TGCTriggerDbTool::updateAddress(StoreID::type /*storeID*/,
+                                           SG::TransientAddress* tad,
+                                           const EventContext& /*ctx*/) {
   CLID clid = tad->clID();
   std::string key = tad->name();
   // Need to add the CLID comparison 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/doc/packagedoc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/doc/packagedoc.h
index c01bab2962d03647354ceeac99c034e59a57f0dd..ca83ab1b9d268efbaaf3e239ec2d55d0018dcd15 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondCool/doc/packagedoc.h
@@ -22,17 +22,6 @@ with the flags Read/Write True.
 
                                                             
 
-@ref used_MuonCondCool
                                                                                 
-@ref requirements_MuonCondCool
                                                                                 
 */
-                                                                                
-/**
-@page used_MuonCondCool Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCondCool Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/doc/packagedoc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/doc/packagedoc.h
index 6aeda17552a352c21bb8d5fcdc8568a983b3349a..dac12b0ada2d018b91c47f6edcc68e45d474bbb3 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/doc/packagedoc.h
@@ -14,19 +14,6 @@ This package contains Csc Container
 The MuonCondData package contains the methods
 GetParameter, GetXXX that hold the database parameters
 
-@ref used_MuonCondData
 
-@ref requirements_MuonCondData
 
 */
-
-/**
-@page used_MuonCondData Used Packages
-*/
-
-/**
-@page requirements_MuonCondData Requirements
-*/
-
-
-
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/doc/packagedoc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/doc/packagedoc.h
index 37a9341a50380cdfea1fd0ff74b67965b39d7a65..c6c26b6c1e6e123d2c9fa755d1ffc9e980761b76 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondInterface/doc/packagedoc.h
@@ -16,17 +16,5 @@ The MuonCondInterface package provides the following abstract interfaces:
 - MuonCalib::IMuonAlignmentDbTool:: Interface class for Tools accessing conditions DB for Alignment
 - MuonCalib::IMuonDetectorStatusDbTool:: interface class for Tools accessing conditions DB for Tube Status
 
-@ref used_MuonCondInterface
                                                                                 
-@ref requirements_MuonCondInterface
 */
-                                                                                
-/**
-@page used_MuonCondInterface Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCondInterface Requirements
-*/
-
-
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/doc/packagedoc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/doc/packagedoc.h
index ed139df0d6685b5f9577f127b9255ccf4c0bd568..0b71b7b8dbfb5ec463aab55dc17a7f67ef1131bd 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondSvc/doc/packagedoc.h
@@ -20,14 +20,5 @@ MuonDetectorStatusDbSvc
 - MuonCalib::MuonDetectorStatusDbTool provides access to the CLOBS in COOL for the teube status.
 
 
-@ref used_MuonCondSvc
 
-@ref requirements_MuonCondSvc
-*/
-
-/**
-@page used_MuonCondSvc Used Packages
-*/
-/**
-@page requirements_MuonCondSvc Requirements
 */
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/doc/packagedoc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/doc/packagedoc.h
index d0c13bddfa5ec5695cfdadc7abaf17db243403b8..ffe454cb85e494f9e1741be8bbaf1fa425b3115b 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/doc/packagedoc.h
@@ -17,18 +17,6 @@ The MuonCondTest package contains the following class
 - MuonCalib::MuonCondTest: algorithm used to initialize the service 
 used for the alignment Conditions Access (only test)
 
-@ref used_MuonCondTest
 
-@ref requirements_MuonCondTest
 
 */
-
-/**
-@page used_MuonCondTest Used Packages
-*/
-
-/**
-@page requirements_MuonCondTest Requirements
-*/
-
-
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/share/MuonConditionsSummary_jobOptions_TestNoProd.py b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/share/MuonConditionsSummary_jobOptions_TestNoProd.py
deleted file mode 100644
index dc242c14479291e968736766badc4bfeba6b666f..0000000000000000000000000000000000000000
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTest/share/MuonConditionsSummary_jobOptions_TestNoProd.py
+++ /dev/null
@@ -1,199 +0,0 @@
-from AthenaCommon.GlobalFlags import GlobalFlags
-from AthenaCommon.AppMgr import ToolSvc
-from AthenaCommon.AlgSequence import AlgSequence
-
-import AthenaCommon.AtlasUnixStandardJob
-
-# use auditors
-from AthenaCommon.AppMgr import ServiceMgr
-
-from GaudiSvc.GaudiSvcConf import AuditorSvc
-
-ServiceMgr += AuditorSvc()
-theAuditorSvc = ServiceMgr.AuditorSvc
-theAuditorSvc.Auditors  += [ "ChronoAuditor"]
-#ChronoStatSvc = Service ( "ChronoStatSvc")
-theAuditorSvc.Auditors  += [ "MemStatAuditor" ]
-#MemStatAuditor = theAuditorSvc.auditor( "MemStatAuditor" )
-theApp.AuditAlgorithms=True
-
-GlobalFlags.DetGeo.set_Value_and_Lock()
-#from AthenaCommon.GlobalFlags import GlobalFlags
-# --- default is atlas geometry
-#GlobalFlags.DetGeo.set_atlas()
-# --- set defaults
-GlobalFlags.DataSource.set_geant4()   
-GlobalFlags.InputFormat.set_pool()   
-# --- default is zero luminosity
-GlobalFlags.Luminosity.set_zero()
-GlobalFlags.Print()
-
-
-
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.detdescr.SCT_setOff()
-DetFlags.ID_setOff()
-DetFlags.Calo_setOff()
-DetFlags.Muon_setOn()
-DetFlags.Truth_setOff()
-DetFlags.LVL1_setOff()
-DetFlags.SCT_setOff()
-DetFlags.TRT_setOff()
-
-#import AtlasGeoModel.SetGeometryVersion
-#import AtlasGeoModel.GeoModelInit
-
-#from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
-
-
-from AthenaCommon.JobProperties import jobproperties
-#jobproperties.Global.DetDescrVersion = DetDescrVersion
-
-from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
-from AtlasGeoModel import GeoModelInit
-from AtlasGeoModel import SetGeometryVersion, GeoModelInit
-GeoModelSvc = ServiceMgr.GeoModelSvc
-GeoModelSvc.IgnoreTagDifference = True
-DetDescrVersion = "ATLAS-GEO-08-00-02"
-jobproperties.Global.DetDescrVersion = DetDescrVersion
-#DetDescrVersion = GlobalFlags.DetDescrVersion()
-GeoModelSvc.AtlasVersion = DetDescrVersion
-
-
-from AthenaCommon.AlgSequence import AlgSequence
-
-job = AlgSequence()
-
-
-import AthenaPoolCnvSvc.ReadAthenaPool
-
-ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/testbeam/muontbh8/scratch03/Monica/data10_7TeV.00158116.physics_MinBias.merge.AOD.f271_m533/data10_7TeV.00158116.physics_MinBias.merge.AOD.f271_m533._lb0002-lb0042.1"]
-#ServiceMgr.EventSelector.InputCollections = ["/afs/cern.ch/atlas/testbeam/muontbh8/scratch03/Monica2/data09_cos.00136379.physics_IDCosmic.merge.AOD.f160_m213/data09_cos.00136379.physics_IDCosmic.merge.AOD.f160_m213._0001.1"]
-
-
-
-
-#--------------------------------------------------------------
-# Load IOVDbSvc
-#--------------------------------------------------------------
-IOVDbSvc = Service("IOVDbSvc")
-from IOVDbSvc.IOVDbSvcConf import IOVDbSvc
-from IOVDbSvc.CondDB import conddb
-IOVDbSvc.OutputLevel = 3
-IOVDbSvc.DBInstance="COOLOFL_DCS"
-include("RegistrationServices/IOVRegistrationSvc_jobOptions.py")
-
-##-----------------------------------------------------------------
-## MDT
-#-----------------------------------------------------------------
-# Dead Chambers
-
-from MuonCondSvc.MuonCondSvcConf import MDT_DCSConditionsSvc
-ServiceMgr +=MDT_DCSConditionsSvc()out
-
-from MuonCondTool.MuonCondToolConf import MDT_DCSConditionsTool
-MDT_DCSConditionsTool = MDT_DCSConditionsTool("MDT_DCSConditionsTool")
-MDT_DCSConditionsTool.OutputLevel = VERBOSE 
-#MessageSvc.OutputLevel = DEBUG
-
-MDT_DCSConditionsTool.DropChamberFolder = "/MDT/DCS/DROPPEDCH"
-MDT_DCSConditionsTool.HVFolder = "/MDT/DCS/PSHVMLSTATE"
-MDT_DCSConditionsTool.LVFolder = "/MDT/DCS/PSLVCHSTATE"
-MDT_DCSConditionsTool.JTAGFolder = "/MDT/DCS/JTAGCHSTATE"
-MDT_DCSConditionsTool.SetPointsV0Folder ="/MDT/DCS/PSV0SETPOINTS"
-MDT_DCSConditionsTool.SetPointsV1Folder = "/MDT/DCS/PSV1SETPOINTS"
-
-ToolSvc += MDT_DCSConditionsTool
-
-dbConn="oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_DCS;dbname=COMP200"
-#folder="/MDT/DCS/DROPPEDCH"
-#dbConn="sqlite://;schema=MDT_CHAMBER.db;dbname=OFLP200"
-
-ServiceMgr.IOVDbSvc.dbConnection=dbConn
-ServiceMgr.IOVDbSvc.Folders+=["/MDT/DCS/DROPPEDCH"+" <tag>HEAD</tag> <dbConnection>"+dbConn+"</dbConnection>"]
-ServiceMgr.IOVDbSvc.Folders+=["/MDT/DCS/PSHVMLSTATE"+" <tag>HEAD</tag> <dbConnection>"+dbConn+"</dbConnection>"]
-ServiceMgr.IOVDbSvc.Folders+=["/MDT/DCS/PSLVCHSTATE"+" <tag>HEAD</tag> <dbConnection>"+dbConn+"</dbConnection>"]
-ServiceMgr.IOVDbSvc.Folders+=["/MDT/DCS/JTAGCHSTATE"+" <tag>HEAD</tag> <dbConnection>"+dbConn+"</dbConnection>"]
-ServiceMgr.IOVDbSvc.Folders+=["/MDT/DCS/PSV0SETPOINTS"+" <tag>HEAD</tag> <dbConnection>"+dbConn+"</dbConnection>"]
-ServiceMgr.IOVDbSvc.Folders+=["/MDT/DCS/PSV1SETPOINTS"+" <tag>HEAD</tag> <dbConnection>"+dbConn+"</dbConnection>"]
-
-
-
-from MuonCondSvc.MuonCondSvcConf import MDT_DeadTubeConditionsSvc
-ServiceMgr +=MDT_DeadTubeConditionsSvc()
-
-from MuonCondTool.MuonCondToolConf import MDT_DeadTubeConditionsTool
-MDT_DeadTubeConditionsTool = MDT_DeadTubeConditionsTool("MDT_DeadTubeConditionsTool")
-MDT_DeadTubeConditionsTool.OutputLevel = VERBOSE 
-#MessageSvc.OutputLevel = DEBUG
-MDT_DeadTubeConditionsTool.DeadTubeFolder = "/MDT/TUBE_STATUS/DEAD_TUBE"
-ToolSvc += MDT_DeadTubeConditionsTool
-
-#dbConn_Mdt="oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_MDT;dbname=OFLP200"
-dbConn_Mdt="sqlite://;schema=MDT_DEAD_TUBE_OFL.db;dbname=OFLP200"
-
-ServiceMgr.IOVDbSvc.dbConnection=dbConn_Mdt
-ServiceMgr.IOVDbSvc.Folders+=["/MDT/TUBE_STATUS/DEAD_TUBE"+" <tag>HEAD</tag> <dbConnection>"+dbConn_Mdt+"</dbConnection>"]
-
-
-
-
-from MuonCondSvc.MuonCondSvcConf import MDTCondSummarySvc
-ServiceMgr +=MDTCondSummarySvc()
-
-
-MDTCondSummary=ServiceMgr.MDTCondSummarySvc
-MDTCondSummary.ConditionsServices=["MDT_DCSConditionsSvc","MDT_DeadTubeConditionsSvc"]
-
-
-
-
-
-
-## ##-----------------------------------------------------------------------------
-## ### TGC Staff
-
-## from MuonCondSvc.MuonCondSvcConf import TGC_STATUSConditionsSvc
-## ServiceMgr +=TGC_STATUSConditionsSvc()
-
-## from MuonCondTool.MuonCondToolConf import TGC_STATUSConditionsTool
-## TGC_STATUSConditionsTool = TGC_STATUSConditionsTool("TGC_STATUSConditionsTool")
-## TGC_STATUSConditionsTool.OutputLevel = DEBUG 
-## MessageSvc.OutputLevel = DEBUG
-
-## TGC_STATUSConditionsTool.TgcDqFolder = "/TGC/1/DetectorStatus"
-
-## ToolSvc += TGC_STATUSConditionsTool
-
-## folderTGC="/TGC/1/DetectorStatus"
-## dbConnTGC="oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TGC;dbname=COMP200"#;user=ATLAS_COOL_READER_U"
-
-## ServiceMgr.IOVDbSvc.dbConnection=dbConnTGC
-## #ServiceMgr.IOVDbSvc.DBInstance="COOLONL_TGC"
-## ServiceMgr.IOVDbSvc.Folders+=[folderTGC+" <tag>Tgc1DetectorStatus-V1-0</tag> <dbConnection>"+dbConnTGC+"</dbConnection>"]
-
-## from MuonCondSvc.MuonCondSvcConf import TGCCondSummarySvc
-## ServiceMgr +=TGCCondSummarySvc()
-
-
-## TGCCondSummary=ServiceMgr.TGCCondSummarySvc
-## TGCCondSummary.ConditionsServices=["TGC_STATUSConditionsSvc"]
-
-
-
-
-from MuonCondTest.MuonCondTestConf import MuonConditionsTestAlg
-job+= MuonConditionsTestAlg()
-
-
-#import AthenaCommon.AtlasUnixGeneratorJob
-
-#ServiceMgr.EventSelector.RunNumber  = 138460 #1204110576 seconds epoch
-#import time, calendar
-#time in seconds , now
-#ServiceMgr.EventSelector.InitialTimeStamp  = calendar.timegm(time.gmtime())
-#ServiceMgr.EventSelector.InitialTimeStamp  =  594682#found valid in db browser?
-theApp.EvtMax                   =  2 
-
-ServiceMgr.MessageSvc.Format           = "% F%40W%S%7W%R%T %0W%M"
-ServiceMgr.MessageSvc.OutputLevel = VERBOSE
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/CSC_DCSConditionsTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/CSC_DCSConditionsTool.h
index 95ff0bc75b573a3e7678e16d16c3c6a095b8396c..cc40daaa908bc0457df0690f3416d3b862580680 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/CSC_DCSConditionsTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/CSC_DCSConditionsTool.h
@@ -30,7 +30,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad) override;
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx) override;
   
   virtual StatusCode initialize() override;
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsRun2Tool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsRun2Tool.h
index 129fb297f120689c983aad4349d7d195a0c9271f..8eda58c8ac799ed5a5119d7d1ffa3924b343e497 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsRun2Tool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsRun2Tool.h
@@ -34,7 +34,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad) override;
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx) override;
   
   virtual StatusCode initialize() override;
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsTool.h
index 1640635461ff0dcccb2ab12f3187d692baab1492..d509bf1244ba8c1216d019ba7ba1b6c28efd8ba5 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DCSConditionsTool.h
@@ -34,7 +34,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad) override;
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx) override;
   
   virtual StatusCode initialize() override;
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DQConditionsTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DQConditionsTool.h
index c32e817b16c2460934368d183ec219b0cf753f3a..481631529fbee23ad8ebf7743d0197e3a44cabf4 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DQConditionsTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DQConditionsTool.h
@@ -34,7 +34,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad) override;
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx) override;
   
   virtual StatusCode initialize() override;
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DeadTubeConditionsTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DeadTubeConditionsTool.h
index eae9f14247c78e9186d9563a6c84bc9519628eaf..2d7940fa331ca39b47c68a8d10e876131d8b62c5 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DeadTubeConditionsTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MDT_DeadTubeConditionsTool.h
@@ -37,7 +37,9 @@ public:
 
   /** required by the IAddressProvider interface */
   // virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad) override;
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx) override;
   
   virtual StatusCode initialize() override;
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MultiLevelAlignmentDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MultiLevelAlignmentDbTool.h
index 7f192be52fff4f456e632731f9c7f13d485d0e5c..fed5b82807d3a0c6b79d458589f6abdf231bb169 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MultiLevelAlignmentDbTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MultiLevelAlignmentDbTool.h
@@ -55,7 +55,9 @@ class MultiLevelAlignmentDbTool: virtual public IMultiLevelAlignmentDbTool, publ
 
   /** required by the IAddressProvider interface */
   //virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
   
   std::string aLineDataLocation() {return m_abLineDbTool->aLineDataLocation();}
   std::string bLineDataLocation() {return m_abLineDbTool->bLineDataLocation();}
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentDbTool.h
index 93b1ec879e8ae5b7a80a8ac2eff7f3a5f0fae0cf..4a045f7fc261acb8825cb2b5f3949a2b1632024d 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentDbTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentDbTool.h
@@ -31,7 +31,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
   
   inline std::string aLineFolderName() const;
   inline std::string bLineFolderName() const;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentErrorDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentErrorDbTool.h
index 3e91c5b1708876fcdc03b14cb3c619081cfe70d8..08f6b2afb915665bf2586802963932bb660ac815 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentErrorDbTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonAlignmentErrorDbTool.h
@@ -34,7 +34,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad) override;
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx) override;
   
   virtual StatusCode initialize() override;
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonDetectorStatusDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonDetectorStatusDbTool.h
index e18202dbb08be839116e680df4849a4275b3b4fb..aebac92551c21d6a70b37a1b7544d5e8a3039404 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonDetectorStatusDbTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/MuonDetectorStatusDbTool.h
@@ -31,7 +31,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //  virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
 
 private: 
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/RPC_DCSConditionsTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/RPC_DCSConditionsTool.h
index 4c797a8949abdc9b8fb870f083181788d4c0e926..e5f040d7ec9254706ba3fafde436bf8665756654 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/RPC_DCSConditionsTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/RPC_DCSConditionsTool.h
@@ -34,7 +34,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //  virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad) override;
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx) override;
 
   virtual StatusCode initialize() override;
 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/RpcDetectorStatusDbTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/RpcDetectorStatusDbTool.h
index 81c36eeb95ba5cacb641e64dfce418c51572f5d0..f1b454775e32d64c4a0e048d5e85e745d4319166 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/RpcDetectorStatusDbTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/RpcDetectorStatusDbTool.h
@@ -33,7 +33,9 @@ public:
 
   /** required by the IAddressProvider interface */
   //  virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad) override;
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx) override;
 
 private: 
   bool m_FirstCall ;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/TGC_STATUSConditionsTool.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/TGC_STATUSConditionsTool.h
index 7e814853fe1ca9f2cef9b24effc7d92ef4bc6eb2..e6dd1cfe1bac4bf6df714cd84340ee9928445948 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/TGC_STATUSConditionsTool.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/MuonCondTool/TGC_STATUSConditionsTool.h
@@ -29,7 +29,9 @@ public:
   
   /** required by the IAddressProvider interface */
   //virtual StatusCode updateAddress(SG::TransientAddress* tad);
-  virtual StatusCode updateAddress(StoreID::type storeID, SG::TransientAddress* tad);
+  virtual StatusCode updateAddress(StoreID::type storeID,
+                                   SG::TransientAddress* tad,
+                                   const EventContext& ctx);
 
  private:
   virtual StatusCode initialize();
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/doc/packagedoc.h b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/doc/packagedoc.h
index a2372f27a052fe4c79031aa4e8d7475bbc520d5a..dd2025c26e719521a90610a453d70f9d74029466 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/doc/packagedoc.h
@@ -24,16 +24,5 @@ Both tools register a callback to update in the TDS the data objetcs
   virtual StatusCode loadTubeStatus(IOVSVC_CALLBACK_ARGS);
 
                                                                         
-@ref used_MuonCondTool
                                                                                 
-@ref requirements_MuonCondTool
 */
-                                                                                
-/**
-@page used_MuonCondTool Used Packages
-*/
-                                                                                
-/**
-@page requirements_MuonCondTool Requirements
-*/
- 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/CSC_DCSConditionsTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/CSC_DCSConditionsTool.cxx
index 8e1dfbfde722c6415e6e52fcff4d4478fe1ffddb..33e1a0d06a5ec6f8cf1c3acf86a8d2fb4b76327a 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/CSC_DCSConditionsTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/CSC_DCSConditionsTool.cxx
@@ -56,7 +56,9 @@ CSC_DCSConditionsTool::CSC_DCSConditionsTool (const std::string& type,
 
 
 //StatusCode CSC_DCSConditionsTool::updateAddress(SG::TransientAddress* /*tad*/)
-StatusCode CSC_DCSConditionsTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* /*tad*/)
+StatusCode CSC_DCSConditionsTool::updateAddress(StoreID::type /*storeID*/,
+                                                SG::TransientAddress* /*tad*/,
+                                                const EventContext& /*ctx*/)
 {
   return StatusCode::FAILURE;
 }
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DCSConditionsRun2Tool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DCSConditionsRun2Tool.cxx
index fa9cc7bcb68020651697fbb2879364223f12ef76..83b888f8f2df7b7b84ffd4ea8cc1d5788db32717 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DCSConditionsRun2Tool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DCSConditionsRun2Tool.cxx
@@ -69,7 +69,9 @@ MDT_DCSConditionsRun2Tool::MDT_DCSConditionsRun2Tool (const std::string& type,
 
 
 //StatusCode MDT_DCSConditionsTool::updateAddress(SG::TransientAddress* /*tad*/)
-StatusCode MDT_DCSConditionsRun2Tool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* /*tad*/)
+StatusCode MDT_DCSConditionsRun2Tool::updateAddress(StoreID::type /*storeID*/,
+                                                    SG::TransientAddress* /*tad*/,
+                                                    const EventContext& /*ctx*/)
 {
 //   MsgStream m_log(msgSvc(), name());
 //   CLID clid        = tad->clID();
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DCSConditionsTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DCSConditionsTool.cxx
index 2fde9e229d8b78e2ba7ca6e47f8b197efd02ae40..6868ad9a34a1822342445d864566015858adc487 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DCSConditionsTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DCSConditionsTool.cxx
@@ -76,7 +76,9 @@ MDT_DCSConditionsTool::MDT_DCSConditionsTool (const std::string& type,
 
 
 //StatusCode MDT_DCSConditionsTool::updateAddress(SG::TransientAddress* /*tad*/)
-StatusCode MDT_DCSConditionsTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* /*tad*/)
+StatusCode MDT_DCSConditionsTool::updateAddress(StoreID::type /*storeID*/,
+                                                SG::TransientAddress* /*tad*/,
+                                                const EventContext& /*ctx*/)
 {
 //   MsgStream m_log(msgSvc(), name());
 //   CLID clid        = tad->clID();
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DQConditionsTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DQConditionsTool.cxx
index 8f6a931c76dc4c51cb300b60b74982104d023b59..3959538972bfb04660cf8dbead89221a635df403 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DQConditionsTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DQConditionsTool.cxx
@@ -68,7 +68,9 @@ MDT_DQConditionsTool::MDT_DQConditionsTool (const std::string& type,
 
 
 //StatusCode MDT_DQConditionsTool::updateAddress(SG::TransientAddress* /*tad*/)
-StatusCode MDT_DQConditionsTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* /*tad*/)
+StatusCode MDT_DQConditionsTool::updateAddress(StoreID::type /*storeID*/,
+                                               SG::TransientAddress* /*tad*/,
+                                               const EventContext& /*ctx*/)
 {
 //   MsgStream m_log(msgSvc(), name());
 //   CLID clid        = tad->clID();
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DeadTubeConditionsTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DeadTubeConditionsTool.cxx
index e8974d58184b1f18bd86f8206ed6e8fa33a43dfd..eb42778035568ee619e0199bf42620e496a16db9 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DeadTubeConditionsTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_DeadTubeConditionsTool.cxx
@@ -63,7 +63,9 @@ MDT_DeadTubeConditionsTool::MDT_DeadTubeConditionsTool (const std::string& type,
 
 
 //StatusCode MDT_DeadTubeConditionsTool::updateAddress(SG::TransientAddress* /*tad*/)
-StatusCode MDT_DeadTubeConditionsTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* /*tad*/)
+StatusCode MDT_DeadTubeConditionsTool::updateAddress(StoreID::type /*storeID*/,
+                                                     SG::TransientAddress* /*tad*/,
+                                                     const EventContext& /*ctx*/)
 {
   MsgStream log(msgSvc(), name());
   // CLID clid        = tad->clID();
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_MapConversion.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_MapConversion.cxx
index b2bdd1ac5ebe1f6a90dae562dea7af8298b5f8ae..384ca7c30b21b0d0cad053edba778e79b397eccf 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_MapConversion.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MDT_MapConversion.cxx
@@ -104,7 +104,6 @@ StatusCode MDT_MapConversion::initialize()
  
   IRDBAccessSvc *accessSvc;
   service("RDBAccessSvc",accessSvc);
-  accessSvc->connect();
   
   
 
@@ -145,7 +144,6 @@ StatusCode MDT_MapConversion::initialize()
     
   }
 	
-    accessSvc->disconnect(); 
     log << MSG::INFO << "#### Chamber Map SIZE" << m_Chamber_Map.size()<< endmsg;
   return StatusCode::SUCCESS;
  
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MultiLevelAlignmentDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MultiLevelAlignmentDbTool.cxx
index 2e8f940c874d071e3205f3d62699188a6f21b2e5..fcc94b5c816f878593349ffeff3cf3a634b89a85 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MultiLevelAlignmentDbTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MultiLevelAlignmentDbTool.cxx
@@ -86,10 +86,12 @@ MultiLevelAlignmentDbTool::MultiLevelAlignmentDbTool (const std::string& type,
 
 //________________________________________________________________________
 //StatusCode MultiLevelAlignmentDbTool::updateAddress(SG::TransientAddress* tad)
-StatusCode MultiLevelAlignmentDbTool::updateAddress(StoreID::type storeID, SG::TransientAddress* tad)
+StatusCode MultiLevelAlignmentDbTool::updateAddress(StoreID::type storeID,
+                                                    SG::TransientAddress* tad,
+                                                    const EventContext& ctx)
 {
   //  StatusCode sc=m_abLineDbTool->updateAddress(tad);
-  StatusCode sc=m_abLineDbTool->updateAddress(storeID, tad);
+  StatusCode sc=m_abLineDbTool->updateAddress(storeID, tad, ctx);
   if (sc == StatusCode::FAILURE) return sc;
 
   return StatusCode::FAILURE;
@@ -140,15 +142,8 @@ StatusCode MultiLevelAlignmentDbTool::initialize()
   }
   else ATH_MSG_INFO("proxy for class ALineParContainer found");
   
-  SG::TransientAddress* tad =  proxy->transientAddress();
-  if (!tad) {
-    ATH_MSG_ERROR("Unable to get the tad");
-    return StatusCode::FAILURE;
-  }
-  else ATH_MSG_INFO("proxy transient Address found");
-  
   IAddressProvider* addp = this;
-  tad->setProvider(addp, StoreID::DETECTOR_STORE);
+  proxy->setProvider(addp, StoreID::DETECTOR_STORE);
   //tad->setProvider(addp);
   ATH_MSG_DEBUG("set address provider for ALineParContainer");
   
@@ -160,15 +155,8 @@ StatusCode MultiLevelAlignmentDbTool::initialize()
   }
   else ATH_MSG_INFO("proxy for class BLineParContainer found");
   
-  tad =  proxy->transientAddress();
-  if (!tad) {
-    ATH_MSG_ERROR("Unable to get the tad");
-    return StatusCode::FAILURE;
-  }
-  else ATH_MSG_INFO("proxy transient Address found");
-  
   addp = this;
-  tad->setProvider(addp, StoreID::DETECTOR_STORE);
+  proxy->setProvider(addp, StoreID::DETECTOR_STORE);
   //tad->setProvider(addp);
   ATH_MSG_DEBUG("set address provider for BLineParContainer");
   
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentDbTool.cxx
index 9e469308bef775cd9abe9db1d5fbd7a98d069a63..4abc8115b8c19e89f7c60913132459d3b4d68cbb 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentDbTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentDbTool.cxx
@@ -79,7 +79,9 @@ MuonAlignmentDbTool::MuonAlignmentDbTool (const std::string& type,
 }
 
 //StatusCode MuonAlignmentDbTool::updateAddress(SG::TransientAddress* tad)
-StatusCode MuonAlignmentDbTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad)
+StatusCode MuonAlignmentDbTool::updateAddress(StoreID::type /*storeID*/,
+                                              SG::TransientAddress* tad,
+                                              const EventContext& /*ctx*/)
 {
   m_log.setLevel(msgLevel());
   m_debug = m_log.level() <= MSG::DEBUG;
@@ -215,15 +217,8 @@ StatusCode MuonAlignmentDbTool::initialize()
 
 
 
-   SG::TransientAddress* tad =  proxy->transientAddress();
-   if (!tad) {
-     m_log << MSG::ERROR << "Unable to get the tad" << endmsg;
-      return StatusCode::FAILURE;
-   }
-   else m_log << MSG::INFO << "proxy transient Address found" << endmsg;
-
    IAddressProvider* addp = this;
-   tad->setProvider(addp, StoreID::DETECTOR_STORE);
+   proxy->setProvider(addp, StoreID::DETECTOR_STORE);
    //   tad->setProvider(addp);
    if( m_debug )  m_log << MSG::DEBUG << "set address provider for ALineParContainer" << endmsg;
 
@@ -236,15 +231,8 @@ StatusCode MuonAlignmentDbTool::initialize()
    }
    else m_log << MSG::INFO << "proxy for class BLineParContainer found" << endmsg;
    
-   tad =  proxy->transientAddress();
-   if (!tad) {
-     m_log << MSG::ERROR << "Unable to get the tad" << endmsg;
-     return StatusCode::FAILURE;
-   }
-   else m_log << MSG::INFO << "proxy transient Address found" << endmsg;
-
    addp = this;
-   tad->setProvider(addp, StoreID::DETECTOR_STORE);
+   proxy->setProvider(addp, StoreID::DETECTOR_STORE);
    //tad->setProvider(addp);
    if( m_debug )  m_log << MSG::DEBUG << "set address provider for BLineParContainer" << endmsg;
 
@@ -255,15 +243,8 @@ StatusCode MuonAlignmentDbTool::initialize()
    }
    else m_log << MSG::INFO << "proxy for class CscInternalAlignmentMapContainer found or not needed" << endmsg;
    
-   if( proxy ) tad =  proxy->transientAddress();
-   if (!tad && m_ILinesFromDb) {
-     m_log << MSG::ERROR << "Unable to get the tad" << endmsg;
-     return StatusCode::FAILURE;
-   }
-   else m_log << MSG::INFO << "proxy transient Address found or not needed" << endmsg;
-
    addp = this;
-   if( m_ILinesFromDb ) tad->setProvider(addp, StoreID::DETECTOR_STORE);
+   if( m_ILinesFromDb ) proxy->setProvider(addp, StoreID::DETECTOR_STORE);
    //tad->setProvider(addp);
    if( m_debug )  m_log << MSG::DEBUG << "set address provider for CscInternalAlignmentMapContainer" << endmsg;
 
@@ -275,15 +256,8 @@ StatusCode MuonAlignmentDbTool::initialize()
    }
    else m_log << MSG::INFO << "proxy for class MdtAsBuiltParContainer found" << endmsg;
    
-   tad =  proxy->transientAddress();
-   if (!tad) {
-     m_log << MSG::ERROR << "Unable to get the tad" << endmsg;
-     return StatusCode::FAILURE;
-   }
-   else m_log << MSG::INFO << "proxy transient Address found" << endmsg;
-
    addp = this;
-   tad->setProvider(addp, StoreID::DETECTOR_STORE);
+   proxy->setProvider(addp, StoreID::DETECTOR_STORE);
    //tad->setProvider(addp);
    if( m_debug )  m_log << MSG::DEBUG << "set address provider for MdtAsBuiltParContainer" << endmsg;
 
@@ -869,14 +843,9 @@ StatusCode MuonAlignmentDbTool::loadAlignABLines(std::string folderName)
       log << MSG::ERROR << "Unable to get the proxy for class ALineParContainer" << endmsg;
       return StatusCode::FAILURE;
     }
-    SG::TransientAddress* tad =  proxy->transientAddress();
-    if (!tad) {
-      log << MSG::ERROR << "Unable to get the tad" << endmsg;
-      return StatusCode::FAILURE;
-    }
     IAddressProvider* addp = this;
     //    tad->setProvider(addp);
-    tad->setProvider(addp, StoreID::DETECTOR_STORE);
+    proxy->setProvider(addp, StoreID::DETECTOR_STORE);
     if( m_debug ) log << MSG::DEBUG<< "set address provider for ALineParContainer" << endmsg;
    
    return  sc; 
@@ -1108,14 +1077,9 @@ StatusCode MuonAlignmentDbTool::loadAlignILines(std::string folderName)
       log << MSG::ERROR << "Unable to get the proxy for class ILineParContainer" << endmsg;
       return StatusCode::FAILURE;
     }
-    SG::TransientAddress* tad =  proxy->transientAddress();
-    if (!tad) {
-      log << MSG::ERROR << "Unable to get the tad" << endmsg;
-      return StatusCode::FAILURE;
-    }
     IAddressProvider* addp = this;
     //    tad->setProvider(addp);
-    tad->setProvider(addp, StoreID::DETECTOR_STORE);
+    proxy->setProvider(addp, StoreID::DETECTOR_STORE);
     if( m_debug ) log << MSG::DEBUG<< "set address provider for ILineParContainer" << endmsg;
    
    return  sc; 
@@ -1228,14 +1192,9 @@ StatusCode MuonAlignmentDbTool::loadAlignAsBuilt(std::string folderName)
       ATH_MSG_ERROR( "Unable to get the proxy for class ILineParContainer"  );
       return StatusCode::FAILURE;
     }
-    SG::TransientAddress* tad =  proxy->transientAddress();
-    if (!tad) {
-      m_log << MSG::ERROR << "Unable to get the tad" << endmsg;
-      return StatusCode::FAILURE;
-    }
     IAddressProvider* addp = this;
     //    tad->setProvider(addp);
-    tad->setProvider(addp, StoreID::DETECTOR_STORE);
+    proxy->setProvider(addp, StoreID::DETECTOR_STORE);
     ATH_MSG_DEBUG( "set address provider for MdtAsBuiltParContainer"  );
    
    return  sc; 
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentErrorDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentErrorDbTool.cxx
index bb29307cd8905a4f116680ec6e4f01b5f3c93719..69061708ebbf2232f1f4fd123a064a8439718ef6 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentErrorDbTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonAlignmentErrorDbTool.cxx
@@ -60,7 +60,9 @@ MuonAlignmentErrorDbTool::MuonAlignmentErrorDbTool (const std::string& type,
 
 
 
-StatusCode MuonAlignmentErrorDbTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* /*tad*/)
+StatusCode MuonAlignmentErrorDbTool::updateAddress(StoreID::type /*storeID*/,
+                                                   SG::TransientAddress* /*tad*/,
+                                                   const EventContext& /*ctx*/)
 {
 //   MsgStream m_log(msgSvc(), name());
 //   CLID clid        = tad->clID();
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonDetectorStatusDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonDetectorStatusDbTool.cxx
index 4ae781b50507d9240c8f5704a06ed5fbe6e92a2f..f3926cde29e8a1b2ba4ab536d01c2c65fb339881 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonDetectorStatusDbTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/MuonDetectorStatusDbTool.cxx
@@ -42,7 +42,9 @@ MuonDetectorStatusDbTool::MuonDetectorStatusDbTool (const std::string& type,
 }
 
 //StatusCode MuonDetectorStatusDbTool::updateAddress(SG::TransientAddress* tad)
-StatusCode MuonDetectorStatusDbTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad)
+StatusCode MuonDetectorStatusDbTool::updateAddress(StoreID::type /*storeID*/,
+                                                   SG::TransientAddress* tad,
+                                                   const EventContext& /*ctx*/)
 {
     CLID clid        = tad->clID();
     std::string key  = tad->name();
@@ -79,14 +81,8 @@ StatusCode MuonDetectorStatusDbTool::initialize()
     return StatusCode::FAILURE;
   }
 
-  SG::TransientAddress* tad =  proxy->transientAddress();
-  if (!tad) {
-    ATH_MSG_ERROR( "Unable to get the tad" );
-    return StatusCode::FAILURE;
-  }
-
   IAddressProvider* addp = this;
-  tad->setProvider(addp, StoreID::DETECTOR_STORE);
+  proxy->setProvider(addp, StoreID::DETECTOR_STORE);
   //tad->setProvider(addp);
   ATH_MSG_DEBUG( "set address provider for TubeStatusContainer" );
   
@@ -264,14 +260,8 @@ StatusCode MuonDetectorStatusDbTool::loadTubeStatus(IOVSVC_CALLBACK_ARGS_P(I,key
      return StatusCode::FAILURE;
    }
    
-   SG::TransientAddress* tad =  proxy->transientAddress();
-   if (!tad) {
-     ATH_MSG_ERROR( "Unable to get the tad" );
-     return StatusCode::FAILURE;
-   }
-   
    IAddressProvider* addp = this;
-   tad->setProvider(addp, StoreID::DETECTOR_STORE);
+   proxy->setProvider(addp, StoreID::DETECTOR_STORE);
    //tad->setProvider(addp);
    ATH_MSG_DEBUG( "set address provider for TubeStatusContainer" );
    
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/RPC_DCSConditionsTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/RPC_DCSConditionsTool.cxx
index 2e0fd64f2b154c29a1d4859628516a0f80fa8dee..84e59686a79010971f2b74e8eb0cf1cc92b773c9 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/RPC_DCSConditionsTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/RPC_DCSConditionsTool.cxx
@@ -62,7 +62,9 @@ RPC_DCSConditionsTool::RPC_DCSConditionsTool (const std::string& type,
 
 
 //StatusCode RPC_DCSConditionsTool::updateAddress(SG::TransientAddress* /*tad*/)
-StatusCode RPC_DCSConditionsTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* /*tad*/)
+StatusCode RPC_DCSConditionsTool::updateAddress(StoreID::type /*storeID*/,
+                                                SG::TransientAddress* /*tad*/,
+                                                const EventContext& /*ctx*/)
 {
  
   return StatusCode::FAILURE;
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/RpcDetectorStatusDbTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/RpcDetectorStatusDbTool.cxx
index 8676481ddf7df30fc152655a5d228891efe719e2..717fa6a10adcd224a8cd7b876e2703b6fb54abab 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/RpcDetectorStatusDbTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/RpcDetectorStatusDbTool.cxx
@@ -55,7 +55,9 @@ RpcDetectorStatusDbTool::RpcDetectorStatusDbTool (const std::string& type,
 
 
 //StatusCode RpcDetectorStatusDbTool::updateAddress(SG::TransientAddress* tad)
-StatusCode RpcDetectorStatusDbTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad)
+StatusCode RpcDetectorStatusDbTool::updateAddress(StoreID::type /*storeID*/,
+                                                  SG::TransientAddress* tad,
+                                                  const EventContext& /*ctx*/)
 {
   //MsgStream log(msgSvc(), name());
     // CLID clid        = tad->clID();
diff --git a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/TGC_STATUSConditionsTool.cxx b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/TGC_STATUSConditionsTool.cxx
index ed6506f1f8353d1745c946301e32afdfafd7e6ba..4a8d3a6df494043867f8fb2c42153b4224665788 100644
--- a/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/TGC_STATUSConditionsTool.cxx
+++ b/MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondTool/src/TGC_STATUSConditionsTool.cxx
@@ -52,7 +52,9 @@ TGC_STATUSConditionsTool::TGC_STATUSConditionsTool (const std::string& type,
 
 
 //StatusCode TGC_STATUSConditionsTool::updateAddress(SG::TransientAddress* tad)
-StatusCode TGC_STATUSConditionsTool::updateAddress(StoreID::type /*storeID*/, SG::TransientAddress* tad)
+StatusCode TGC_STATUSConditionsTool::updateAddress(StoreID::type /*storeID*/,
+                                                   SG::TransientAddress* tad,
+                                                   const EventContext& /*ctx*/)
 {
   
   log.setLevel(msgLevel());
diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx
index 50c81ca87534a2912f4a78ff113dd5df21b0d948..79b20e2ab685be24c2331ad636f77058c0bda06a 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx
+++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/src/MuonAGDDToolHelper.cxx
@@ -59,8 +59,6 @@ MuonAGDDToolHelper::MuonAGDDToolHelper()
     {
     	std::cout<<"unable to access RBDAccessSvc "<<std::endl;
     }
-	else
-		p_RDBAccessSvc->connect();
 	tagInfoKey="";
 	result=Gaudi::svcLocator()->service("TagInfoMgr",m_tagInfoMgr);
   	if (result.isFailure()) 
@@ -127,7 +125,6 @@ std::string MuonAGDDToolHelper::GetAGDD(bool dumpIt)
 
    const IRDBRecord *recordAGDD =  (*recordsetAGDD)[0];
    std::string AgddString = recordAGDD->getString("DATA");
-   accessSvc->shutdown();
 
    size_t pos=AgddString.find("AGDD.dtd");
    if (pos!=std::string::npos) AgddString.replace(pos-21,32,"-- Reference to AGDD.dtd automatically removed -->");
diff --git a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/doc/packagedoc.h b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/doc/packagedoc.h
index 0fe59e7738cfdab81529e5239df883509e4d53fa..94b43bf071c49170178bead3c921db6690094f78 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonDetDescr/MuonRegionSelector/doc/packagedoc.h
@@ -50,7 +50,6 @@ The package contains the two tools:
  - MuonRegionSelectorTable_jobOptions.py: Job option fragment for initializing all tools using genConf. 
    Makes use of DetFlags to control which tables will be created.
 
-@section MuonRegionSelector_MuonRegionSelectorReq Requirements
 
 
 */
diff --git a/MuonSpectrometer/MuonDigitContainer/CMakeLists.txt b/MuonSpectrometer/MuonDigitContainer/CMakeLists.txt
index 1c538aad65f7aee121642c9f59f8bb1946ee3325..a087b87f30655d79eeabe799a74ec402ce9e64fb 100644
--- a/MuonSpectrometer/MuonDigitContainer/CMakeLists.txt
+++ b/MuonSpectrometer/MuonDigitContainer/CMakeLists.txt
@@ -24,12 +24,12 @@ atlas_add_library( MuonDigitContainer
                    src/*.cxx
                    PUBLIC_HEADERS MuonDigitContainer
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES DataModel SGTools Identifier MuonIdHelpersLib
+                   LINK_LIBRARIES DataModel SGTools Identifier MuonIdHelpersLib EventContainers
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_dictionary( MuonDigitContainerDict
                       MuonDigitContainer/MuonDigitContainerDict.h
                       MuonDigitContainer/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel SGTools Identifier MuonIdHelpersLib MuonDigitContainer )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel SGTools Identifier MuonIdHelpersLib MuonDigitContainer EventContainers)
 
diff --git a/MuonSpectrometer/MuonDigitContainer/MuonDigitContainer/MmDigitContainer.h b/MuonSpectrometer/MuonDigitContainer/MuonDigitContainer/MmDigitContainer.h
index 5bbe25053c9aa01206341d98f72671f5bfff6900..771108ad5bd0e00dc78e56d5ea59cb9992e6eba3 100755
--- a/MuonSpectrometer/MuonDigitContainer/MuonDigitContainer/MmDigitContainer.h
+++ b/MuonSpectrometer/MuonDigitContainer/MuonDigitContainer/MmDigitContainer.h
@@ -49,7 +49,6 @@ class MmDigitContainer
 :public IdentifiableContainer<MmDigitCollection> 
 {
  public:  
-   MmDigitContainer(); 
    
   MmDigitContainer(unsigned int hash_max) ; 
   ~MmDigitContainer() ; 
diff --git a/MuonSpectrometer/MuonDigitContainer/MuonDigitContainer/sTgcDigitContainer.h b/MuonSpectrometer/MuonDigitContainer/MuonDigitContainer/sTgcDigitContainer.h
index 661981ba2aed6e74c9d5f004226e2ea535d758d2..13a3b5149092c8f6f4f9c563419296997a9b65a2 100755
--- a/MuonSpectrometer/MuonDigitContainer/MuonDigitContainer/sTgcDigitContainer.h
+++ b/MuonSpectrometer/MuonDigitContainer/MuonDigitContainer/sTgcDigitContainer.h
@@ -49,7 +49,7 @@ class sTgcDigitContainer
 :public IdentifiableContainer<sTgcDigitCollection> 
 {
  public:  
-   sTgcDigitContainer(); 
+   sTgcDigitContainer();
    
   sTgcDigitContainer(unsigned int hash_max) ; 
   ~sTgcDigitContainer() ; 
diff --git a/MuonSpectrometer/MuonDigitContainer/src/CscDigit.cxx b/MuonSpectrometer/MuonDigitContainer/src/CscDigit.cxx
index 95b53b7138d0c27d6fd27be1173074ce6bf7c590..a3319b2fe1f6e365fa18447d6927207ae0760fd8 100644
--- a/MuonSpectrometer/MuonDigitContainer/src/CscDigit.cxx
+++ b/MuonSpectrometer/MuonDigitContainer/src/CscDigit.cxx
@@ -5,6 +5,7 @@
 /** CscDigit.cxx */
 
 #include "MuonDigitContainer/CscDigit.h"
+#include <algorithm>
 
 /** Member functions */
 
diff --git a/MuonSpectrometer/MuonDigitContainer/src/MmDigitContainer.cxx b/MuonSpectrometer/MuonDigitContainer/src/MmDigitContainer.cxx
index afb2f8751aa3f41ccbb75746717bd1a84d617e10..77af688b6ae5f35f114e15705f7a998ca4f90b00 100755
--- a/MuonSpectrometer/MuonDigitContainer/src/MmDigitContainer.cxx
+++ b/MuonSpectrometer/MuonDigitContainer/src/MmDigitContainer.cxx
@@ -23,11 +23,6 @@ using std::endl;
 
 // Default constructor.
 
-MmDigitContainer::MmDigitContainer()
-  : IdentifiableContainer<MmDigitCollection>()
-{
-}
-
 
 MmDigitContainer::MmDigitContainer(unsigned int hash_max)
   : IdentifiableContainer<MmDigitCollection>(hash_max) 
diff --git a/MuonSpectrometer/MuonDigitContainer/src/sTgcDigitContainer.cxx b/MuonSpectrometer/MuonDigitContainer/src/sTgcDigitContainer.cxx
index d4b8ac61dadcc7b6214a60c5e11877958d97328e..ac082e33f2a660a9a99f97abfd28143359babfc7 100755
--- a/MuonSpectrometer/MuonDigitContainer/src/sTgcDigitContainer.cxx
+++ b/MuonSpectrometer/MuonDigitContainer/src/sTgcDigitContainer.cxx
@@ -20,13 +20,13 @@ using std::endl;
 //**********************************************************************
 // Member functions.
 //**********************************************************************
-
-// Default constructor.
 sTgcDigitContainer::sTgcDigitContainer()
-  : IdentifiableContainer<sTgcDigitCollection>()
+  : IdentifiableContainer<sTgcDigitCollection>(1578) //Hard coded max size for dictionary generators
 {
+
 }
 
+
 sTgcDigitContainer::sTgcDigitContainer(unsigned int hash_max)
   : IdentifiableContainer<sTgcDigitCollection>(hash_max) 
 {
diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/doc/packagedoc.h b/MuonSpectrometer/MuonDigitization/CSC_Digitization/doc/packagedoc.h
index f5db723a57f9b944f6855ba21f1d37b022b7d83f..52d088d1f31d9808808179e6c65f8bd9fdd5efb2 100644
--- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/doc/packagedoc.h
@@ -26,4 +26,3 @@ CscDigitBuilder.h, the top algorithms that runs the digitization.
    ketevi@bnl.gov
 
 */
-
diff --git a/MuonSpectrometer/MuonDigitization/CSC_Digitization/src/CscDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/CSC_Digitization/src/CscDigitizationTool.cxx
index ce84c145d6e511e112749e8199a12576f70f2cbe..39dd2ed6f58269d1e36efdbcac82f2c74ca269f0 100644
--- a/MuonSpectrometer/MuonDigitization/CSC_Digitization/src/CscDigitizationTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/CSC_Digitization/src/CscDigitizationTool.cxx
@@ -447,8 +447,8 @@ FillCollectionWithNewDigitEDM(csc_newmap& data_SampleMap,
                     );
 
     if (prevId != elementId) {
-      CscDigitContainer::const_iterator it_coll = m_container->indexFind(coll_hash);
-      if (m_container->end() ==  it_coll) {
+      auto  it_coll = m_container->indexFindPtr(coll_hash);
+      if (nullptr ==  it_coll) {
         CscDigitCollection * newCollection = new CscDigitCollection(elementId,coll_hash);
 
         if (phaseToSet) newCollection->set_samplingPhase();
@@ -466,7 +466,7 @@ FillCollectionWithNewDigitEDM(csc_newmap& data_SampleMap,
         collection = newCollection;
 
       } else {  
-        CscDigitCollection * existingCollection = const_cast<CscDigitCollection*>( it_coll->cptr() );
+        CscDigitCollection * existingCollection = const_cast<CscDigitCollection*>( it_coll );
         if (phaseToSet) existingCollection->set_samplingPhase();
         //        const std::vector<float> samplesToPut
         //          = (existingCollection->samplingPhase()) ? samplesOddPhase : samples ;
@@ -573,8 +573,8 @@ FillCollectionWithOldDigitEDM(csc_map& data_map, std::map<IdentifierHash,deposit
     } 
     
     if (prevId != elementId) {
-      CscDigitContainer::const_iterator it_coll = m_container->indexFind(coll_hash);
-      if (m_container->end() ==  it_coll) {
+      auto it_coll = m_container->indexFindPtr(coll_hash);
+      if (nullptr ==  it_coll) {
         CscDigitCollection * newCollection = new CscDigitCollection(elementId,coll_hash);
         newCollection->push_back(newDigit);
         collection = newCollection;
@@ -583,7 +583,7 @@ FillCollectionWithOldDigitEDM(csc_map& data_map, std::map<IdentifierHash,deposit
           ATH_MSG_ERROR ( "Couldn't record CscDigitCollection with key=" << coll_hash 
                           << " in StoreGate!" );
       } else {  
-        CscDigitCollection * existingCollection = const_cast<CscDigitCollection*>( it_coll->cptr() );
+        CscDigitCollection * existingCollection = const_cast<CscDigitCollection*>( it_coll );
         existingCollection->push_back(newDigit);
         collection = existingCollection;
       }
diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/doc/packagedoc.h b/MuonSpectrometer/MuonDigitization/MDT_Digitization/doc/packagedoc.h
index 5bda2568d8e7499d3bbe556d32e759543595df14..e984de7816dd3f46360bba413d62f39d24ee75c7 100644
--- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/doc/packagedoc.h
@@ -76,17 +76,6 @@ jobOptions, setting the property DigitizationTool of the MDT_Digitizer:
 	
 @section MDT_Digitization_ExtrasMDT_Digitization Extra Pages
 
- - @ref UsedMDT_Digitization
- - @ref RequirementsMDT_Digitization
-*/
-
-/**
-@page UsedMDT_Digitization Used Packages
-*/
-
-/**
-@page RequirementsMDT_Digitization Requirements
-
  - For more detailed information, see the note on the Muon Digitization.
 
  - for questions or comments: 
diff --git a/MuonSpectrometer/MuonDigitization/MDT_Digitization/src/MdtDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/MDT_Digitization/src/MdtDigitizationTool.cxx
index fae706412a01319927dfe2644f6bd6b4a58cb179..7f8324750766910004ce15e42f091f233b50ce3f 100644
--- a/MuonSpectrometer/MuonDigitization/MDT_Digitization/src/MdtDigitizationTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/MDT_Digitization/src/MdtDigitizationTool.cxx
@@ -1078,7 +1078,7 @@ MdtDigitCollection* MdtDigitizationTool::getDigitCollection(Identifier elementId
       ATH_MSG_DEBUG ( "New MdtDigitCollection with key=" << coll_hash << " recorded in StoreGate." );
   } 
   else { 
-    digitCollection = const_cast<MdtDigitCollection*>( it_coll->cptr() );
+    digitCollection = const_cast<MdtDigitCollection*>( *it_coll );
   }
   return digitCollection;
 }
diff --git a/MuonSpectrometer/MuonDigitization/MDT_Response/doc/packagedoc.h b/MuonSpectrometer/MuonDigitization/MDT_Response/doc/packagedoc.h
index 7f9dbf41332494c6dae3862f465b0022a8dba847..0fb01143b2da1d96087ed1f98e1685ec67cba6e7 100644
--- a/MuonSpectrometer/MuonDigitization/MDT_Response/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonDigitization/MDT_Response/doc/packagedoc.h
@@ -22,15 +22,4 @@ PhD Thesis, Niels van Eldik
  	
 @section MDT_Response_ExtrasMDT_Response Extra Pages
 
- - @ref UsedMDT_Response
- - @ref RequirementsMDT_Response
-*/
-
-/**
-@page UsedMDT_Response Used Packages
-*/
-
-/**
-@page RequirementsMDT_Response Requirements
-
 */
diff --git a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MmDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MmDigitizationTool.cxx
index 09099020341391b12048ef109b62924cc99d8d20..59afdd28d2de7cb19d7675108613f1001b512f05 100644
--- a/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MmDigitizationTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/MM_Digitization/src/MmDigitizationTool.cxx
@@ -1132,7 +1132,7 @@ StatusCode MmDigitizationTool::doDigitization() {
 	}
       }
       else {
-	digitCollection = const_cast<MmDigitCollection*>( it_coll->cptr() );
+	digitCollection = const_cast<MmDigitCollection*>( *it_coll );
 	digitCollection->push_back(newDigit);
       }
 
diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/doc/packagedoc.h b/MuonSpectrometer/MuonDigitization/RPC_Digitization/doc/packagedoc.h
index 6f7578ff18289730c59635d63a88a16a7d4f54e0..ae5cb0c16cba744133890539098b643320e3bd5d 100644
--- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/doc/packagedoc.h
@@ -63,7 +63,6 @@ Particular attention needs to be paid to the way the additional digits are
 created around the one actually crossed by the muon. The decision of which strip
 to turn on is made according to experimental distributions.
 
-@section RPC_Digitization_Req Requirements
 
 
 */
diff --git a/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx
index c56e0b434edb0c3cc70123902641e2abe638f9bb..bce7780a53c3c5bde7517f818059b1a3a73bfeb4 100644
--- a/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/RPC_Digitization/src/RpcDigitizationTool.cxx
@@ -229,11 +229,6 @@ StatusCode RpcDigitizationTool::initialize() {
     return result; 
   } 
 
-  if(!rdbAccess->connect()) { 
-    ATH_MSG_ERROR("Unable to connect to the Geometry DB"); 
-    return StatusCode::FAILURE; 
-  } 
-
   bool m_run1 = true;
   std::string configVal = "";
   const IGeoModelSvc* geoModel = 0; 
@@ -1013,7 +1008,7 @@ StatusCode RpcDigitizationTool::doDigitization() {
 	      ATH_MSG_DEBUG ( "New RpcHitCollection with key=" << coll_hash << " recorded in StoreGate." );
 	    }
 	  } else {
-	    digitCollection = const_cast<RpcDigitCollection*>( it_coll->cptr() );
+	    digitCollection = const_cast<RpcDigitCollection*>( *it_coll );
 	    digitCollection->push_back(newDigit);
 	  }
 
diff --git a/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.cxx b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.cxx
index db46a292afc6246bb83d1e6af902e98635a69499..f50f063389cda315935dba989743b050deb2e783 100644
--- a/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.cxx
+++ b/MuonSpectrometer/MuonDigitization/TGC_Digitization/src/TgcDigitizationTool.cxx
@@ -103,10 +103,6 @@ StatusCode TgcDigitizationTool::initialize()
 
   IRDBAccessSvc* rdbAccess = nullptr;
   CHECK( service("RDBAccessSvc",rdbAccess) );
-  if(!rdbAccess->connect()) {
-    ATH_MSG_ERROR("Unable to connect to the Geometry DB");
-    return StatusCode::FAILURE;
-  }
 
   IRDBRecordset_ptr atlasCommonRec = rdbAccess->getRecordsetPtr("AtlasCommon",atlasVersion,"ATLAS");
   unsigned int runperiod = 1;
@@ -425,7 +421,7 @@ StatusCode TgcDigitizationTool::digitizeCore() {
 	    ATH_MSG_DEBUG("New TgcHitCollection with key=" << coll_hash << " recorded in StoreGate."); 
 	  }
 	} else {
-	  digitCollection = const_cast<TgcDigitCollection*>(it_coll->cptr());
+	  digitCollection = const_cast<TgcDigitCollection*>(*it_coll);
 
 	  // to avoid to store digits with identical id
 	  TgcDigitCollection::const_iterator it_tgcDigit;
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/doc/packagedoc.h b/MuonSpectrometer/MuonG4/MuonG4SD/doc/packagedoc.h
index 67dceda8aaa77c3530102c94cb794d01db6b1cd5..2ee51225f04f276fb71fa9184aeeb575843b40f4 100644
--- a/MuonSpectrometer/MuonG4/MuonG4SD/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/doc/packagedoc.h
@@ -56,15 +56,4 @@ EndOfEvent()
 
 @section MuonG4SD_ExtrasMuonG4SD Extra Pages
 
- - @ref UsedMuonG4SD
- - @ref RequirementsMuonG4SD
 */
-
-/**
-@page UsedMuonG4SD Used Packages
-*/
-
-/**
-@page RequirementsMuonG4SD Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDConfig.py b/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDConfig.py
index 3839d0e0a8d8923cea329788b08d4e4400df52d6..8951047a9e4644f24c55ef8df7570c4f9b34183e 100644
--- a/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDConfig.py
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/python/MuonG4SDConfig.py
@@ -1,46 +1,118 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
+
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+
+
 def getCSCSensitiveDetectorCosmics(name="CSCSensitiveDetectorCosmics", **kwargs):
+    bare_collection_name = "CSC_Hits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "CSCHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Muon::CscArCO2"])
-    kwargs.setdefault("OutputCollectionNames", ["CSC_Hits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.CSCSensitiveDetectorCosmicsTool(name, **kwargs)
+
+
 def getCSCSensitiveDetector(name="CSCSensitiveDetector", **kwargs):
+    bare_collection_name = "CSC_Hits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "CSCHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Muon::CscArCO2"])
-    kwargs.setdefault("OutputCollectionNames", ["CSC_Hits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.CSCSensitiveDetectorTool(name, **kwargs)
+
+
 def getGenericMuonSensitiveDetector(name="GenericMuonSensitiveDetector", **kwargs):
     kwargs.setdefault("LogicalVolumeNames", ["GenericSenitiveVolume"])
     kwargs.setdefault("OutputCollectionNames", ["GenericMuonSensitiveDetector"])
     return CfgMgr.GenericMuonSensitiveDetectorTool(name, **kwargs)
+
+
 def getMDTSensitiveDetectorCosmics(name="MDTSensitiveDetectorCosmics", **kwargs):
+    bare_collection_name = "MDT_Hits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "MDTHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Muon::SensitiveGas"])
-    kwargs.setdefault("OutputCollectionNames", ["MDT_Hits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.MDTSensitiveDetectorCosmicsTool(name, **kwargs)
+
+
 def getMDTSensitiveDetector(name="MDTSensitiveDetector", **kwargs):
+    bare_collection_name = "MDT_Hits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "MDTHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Muon::SensitiveGas"])
-    kwargs.setdefault("OutputCollectionNames", ["MDT_Hits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.MDTSensitiveDetectorTool(name, **kwargs)
+
+
 def getMicromegasSensitiveDetector(name="MicromegasSensitiveDetector", **kwargs):
     kwargs.setdefault("LogicalVolumeNames", ["Muon::MM_Sensitive"])
     kwargs.setdefault("OutputCollectionNames", ["MicromegasSensitiveDetector"])
     return CfgMgr.MicromegasSensitiveDetectorTool(name, **kwargs)
+
+
 def getRPCSensitiveDetectorCosmics(name="RPCSensitiveDetectorCosmics", **kwargs):
+    bare_collection_name = "RPC_Hits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "RPCHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Muon::gazGap"])
-    kwargs.setdefault("OutputCollectionNames", ["RPC_Hits"])
+    kwargs.setdefault("OutputCollectionNames", [bare_collection_name])
     return CfgMgr.RPCSensitiveDetectorCosmicsTool(name, **kwargs)
+
+
 def getRPCSensitiveDetector(name="RPCSensitiveDetector", **kwargs):
+    bare_collection_name = "RPC_Hits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "RPCHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Muon::gazGap"])
-    kwargs.setdefault("OutputCollectionNames", ["RPC_Hits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.RPCSensitiveDetectorTool(name, **kwargs)
+
+
 def getTGCSensitiveDetectorCosmics(name="TGCSensitiveDetectorCosmics", **kwargs):
+    bare_collection_name = "TGC_Hits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "TGCHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Muon::muo::TGCGas"])
-    kwargs.setdefault("OutputCollectionNames", ["TGC_Hits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.TGCSensitiveDetectorCosmicsTool(name, **kwargs)
+
+
 def getTGCSensitiveDetector(name="TGCSensitiveDetector", **kwargs):
+    bare_collection_name = "TGC_Hits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "TGCHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Muon::muo::TGCGas"])
-    kwargs.setdefault("OutputCollectionNames", ["TGC_Hits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     return CfgMgr.TGCSensitiveDetectorTool(name, **kwargs)
+
+
 def getsTGCSensitiveDetector(name="sTGCSensitiveDetector", **kwargs):
     kwargs.setdefault("LogicalVolumeNames", ["Muon::sTGC_Sensitive"])
     kwargs.setdefault("OutputCollectionNames", ["sTGCSensitiveDetector"])
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetectorCosmicsTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetectorCosmicsTool.cxx
index 2d74e24471049283d200cef0fd74a66582cdf8f4..9bbd3d4ea369a7963ecbb7c6b7575ef6db84f51e 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetectorCosmicsTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetectorCosmicsTool.cxx
@@ -13,6 +13,6 @@ CSCSensitiveDetectorCosmicsTool::CSCSensitiveDetectorCosmicsTool(const std::stri
 
 G4VSensitiveDetector* CSCSensitiveDetectorCosmicsTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new CSCSensitiveDetectorCosmics(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetectorTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetectorTool.cxx
index f7bdb08630e317f24646e33da2749ae75710a4a9..01ea9877a071367da62b094ab4043c62d5892c4d 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetectorTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/CSCSensitiveDetectorTool.cxx
@@ -13,6 +13,6 @@ CSCSensitiveDetectorTool::CSCSensitiveDetectorTool(const std::string& type, cons
 
 G4VSensitiveDetector* CSCSensitiveDetectorTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new CSCSensitiveDetector(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/GenericMuonSensitiveDetectorTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/GenericMuonSensitiveDetectorTool.cxx
index b77fe04b951b8b1de8503e561ab1a73454de2f53..07e9ec9f570147385f6686cd67ef232ab67c7b57 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/GenericMuonSensitiveDetectorTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/GenericMuonSensitiveDetectorTool.cxx
@@ -13,6 +13,6 @@ GenericMuonSensitiveDetectorTool::GenericMuonSensitiveDetectorTool(const std::st
 
 G4VSensitiveDetector* GenericMuonSensitiveDetectorTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new GenericMuonSensitiveDetector(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetectorCosmicsTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetectorCosmicsTool.cxx
index 1d9b11e8bae890b63dc7172f2f4fea6cd9404b34..69a69a5b685cad78359666f9ed1e917109cecdce 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetectorCosmicsTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetectorCosmicsTool.cxx
@@ -13,6 +13,6 @@ MDTSensitiveDetectorCosmicsTool::MDTSensitiveDetectorCosmicsTool(const std::stri
 
 G4VSensitiveDetector* MDTSensitiveDetectorCosmicsTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new MDTSensitiveDetectorCosmics(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetectorTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetectorTool.cxx
index 04c1013f2a5274f11376d773719b13896644c7fa..16a7d9870bdf7014bb5857cf6b562246ede57e03 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetectorTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/MDTSensitiveDetectorTool.cxx
@@ -13,6 +13,6 @@ MDTSensitiveDetectorTool::MDTSensitiveDetectorTool(const std::string& type, cons
 
 G4VSensitiveDetector* MDTSensitiveDetectorTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new MDTSensitiveDetector(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/MicromegasSensitiveDetectorTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/MicromegasSensitiveDetectorTool.cxx
index ebdef82fca1ffde958d9fb70c4d91480eabda8d5..bde08b5406f839ccdd1ff34b1befb4bdf7fe5b34 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/MicromegasSensitiveDetectorTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/MicromegasSensitiveDetectorTool.cxx
@@ -13,6 +13,6 @@ MicromegasSensitiveDetectorTool::MicromegasSensitiveDetectorTool(const std::stri
 
 G4VSensitiveDetector* MicromegasSensitiveDetectorTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new MicromegasSensitiveDetector(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetectorCosmicsTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetectorCosmicsTool.cxx
index 586a59f93629b5391e654bbf540530de1b73c865..585689e5f7c63193a450bc2e3e1b19bbc7a16e6e 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetectorCosmicsTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetectorCosmicsTool.cxx
@@ -13,6 +13,6 @@ RPCSensitiveDetectorCosmicsTool::RPCSensitiveDetectorCosmicsTool(const std::stri
 
 G4VSensitiveDetector* RPCSensitiveDetectorCosmicsTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new RPCSensitiveDetectorCosmics(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetectorTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetectorTool.cxx
index 5a15d4121097b6ecac276121a338969d96676685..c4baf2791e39e90c2d0f5363426c5dae81a36a01 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetectorTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/RPCSensitiveDetectorTool.cxx
@@ -13,6 +13,6 @@ RPCSensitiveDetectorTool::RPCSensitiveDetectorTool(const std::string& type, cons
 
 G4VSensitiveDetector* RPCSensitiveDetectorTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new RPCSensitiveDetector(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/TGCSensitiveDetectorCosmicsTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/TGCSensitiveDetectorCosmicsTool.cxx
index b73d8e14125d6913e8ad52d305741bc78a96dea3..4b2656bd50b18008a9945102dafcc442e13da441 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/TGCSensitiveDetectorCosmicsTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/TGCSensitiveDetectorCosmicsTool.cxx
@@ -13,6 +13,6 @@ TGCSensitiveDetectorCosmicsTool::TGCSensitiveDetectorCosmicsTool(const std::stri
 
 G4VSensitiveDetector* TGCSensitiveDetectorCosmicsTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new TGCSensitiveDetectorCosmics(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/TGCSensitiveDetectorTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/TGCSensitiveDetectorTool.cxx
index d6d79d48e225e18b3f73fda0d3ed0c87aa85da61..36a9ede8e33ec72e7f6304bea5ce29d8c6febefe 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/TGCSensitiveDetectorTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/TGCSensitiveDetectorTool.cxx
@@ -13,6 +13,6 @@ TGCSensitiveDetectorTool::TGCSensitiveDetectorTool(const std::string& type, cons
 
 G4VSensitiveDetector* TGCSensitiveDetectorTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new TGCSensitiveDetector(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonG4/MuonG4SD/src/sTGCSensitiveDetectorTool.cxx b/MuonSpectrometer/MuonG4/MuonG4SD/src/sTGCSensitiveDetectorTool.cxx
index ccbb6e58da6459d14b18d33c3a3df4bde8adec97..3c5ee20eb2b7a90f60ab36bc77ba5f3e54a6e046 100755
--- a/MuonSpectrometer/MuonG4/MuonG4SD/src/sTGCSensitiveDetectorTool.cxx
+++ b/MuonSpectrometer/MuonG4/MuonG4SD/src/sTGCSensitiveDetectorTool.cxx
@@ -13,6 +13,6 @@ sTGCSensitiveDetectorTool::sTGCSensitiveDetectorTool(const std::string& type, co
 
 G4VSensitiveDetector* sTGCSensitiveDetectorTool::makeSD()
 {
-  ATH_MSG_INFO( "Initializing SD" );
+  ATH_MSG_DEBUG( "Initializing SD" );
   return new sTGCSensitiveDetector(name(), m_outputCollectionNames[0]);
 }
diff --git a/MuonSpectrometer/MuonGMdbObjects/doc/packagedoc.h b/MuonSpectrometer/MuonGMdbObjects/doc/packagedoc.h
index 08b42dbd3cf1bf9ae223f1581fee323c683389d5..ae795a7634b37972a386c922561c8691e5ccc062 100644
--- a/MuonSpectrometer/MuonGMdbObjects/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonGMdbObjects/doc/packagedoc.h
@@ -14,17 +14,6 @@ the Combined Test Beam layout, stored only in NOVA and the newest ATLAS layouts
 In order to avoid duplicating the code (and classes) reading the geometry database for the Nova and Oracle case, the classes in this package have been designed 
 following the data structure of the Nova Objects and using templated functions in the reading code (MuonGM::DBReader.h).
 
-@ref used_GMdbObjects
 
-@ref requirements_GMdbObjects
 
 */
-
-/**
-@page used_GMdbObjects Used Packages
-*/
-
-/**
-@page requirements_GMdbObjects Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonGeoModel/doc/packagedoc.h b/MuonSpectrometer/MuonGeoModel/doc/packagedoc.h
index de75286333d871c42d991156515ed90e12d6d860..c87c36349347ae5556d60b8bbe7a2b091df6af12 100644
--- a/MuonSpectrometer/MuonGeoModel/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonGeoModel/doc/packagedoc.h
@@ -52,17 +52,6 @@ Position,  AlignPos, Station,  Technology (+ MDT, RPC, TGC, CSC), MYSQL, etc. Th
 
 Please, refer to the Classes section for more details (especially about the Readout Geometry classes).
 
-@ref used_MuonGeoModel
 
-@ref requirements_MuonGeoModel
 
 */
-
-/**
-@page used_MuonGeoModel Used Packages
-*/
-
-/**
-@page requirements_MuonGeoModel Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonGeoModelTest/doc/packagedoc.h b/MuonSpectrometer/MuonGeoModelTest/doc/packagedoc.h
index b8143e2a5ce739f0e5e56642edd77a130abdf8c2..564b37c1aa51c217b5b9128b50b18639cad421b1 100644
--- a/MuonSpectrometer/MuonGeoModelTest/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonGeoModelTest/doc/packagedoc.h
@@ -29,17 +29,6 @@ MuonHitRelocation - runs on SimHit files; gets the local_position of the hit and
                     Residuals are <0.1microns for samples of geantino's hits generated from a fixed IP.
 
 
-@ref used_MuonGeoModelTest
 
-@ref requirements_MuonGeoModelTest
 
 */
-
-/**
-@page used_MuonGeoModelTest Used Packages
-*/
-
-/**
-@page requirements_MuonGeoModelTest Requirements
-*/
-
diff --git a/MuonSpectrometer/MuonIdHelpersAlgs/doc/packagedoc.h b/MuonSpectrometer/MuonIdHelpersAlgs/doc/packagedoc.h
index 4f91c1459f0fe8e4331a806e2d295504d5b1b7b9..26f43fe18ec19668337ed98e63d26e9947f7cfd9 100644
--- a/MuonSpectrometer/MuonIdHelpersAlgs/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonIdHelpersAlgs/doc/packagedoc.h
@@ -16,10 +16,5 @@ implementation of identifiers.
  - For questions or comments: Ketevi A. Assamagan
    ketevi@bnl.gov
 
-@section MuonIdHelpersAlgs_used_packagesTkPara Used Packages
-
-@section MuonIdHelpersAlgs_requirements Requirements
-
 
 */
-
diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/doc/packagedoc.h b/MuonSpectrometer/MuonOverlay/CscOverlay/doc/packagedoc.h
index 799927822ab7f07d6531072e41476dcd5e16d9e0..27e13e0148168bd6250631d4dd7b32f7076c17d2 100644
--- a/MuonSpectrometer/MuonOverlay/CscOverlay/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonOverlay/CscOverlay/doc/packagedoc.h
@@ -12,10 +12,4 @@
  - For questions or comments: Ketevi A. Assamagan
    ketevi@bnl.gov
 
-@section CscOverlay_used_packagesTkPara Used Packages
-
-@section CscOverlay_requirements Requirements
-
-
 */
-
diff --git a/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx b/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx
index a24cba7d529a4b996de2f642caac7a840f001574..db9168e6dc2911d5d702d72bae336885cf53ba6d 100644
--- a/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx
+++ b/MuonSpectrometer/MuonOverlay/CscOverlay/src/CscOverlay.cxx
@@ -22,7 +22,7 @@
 #include <iostream>
 #include <typeinfo>
 
-const uint16_t MAX_AMPL = 4095; // 12-bit ADC
+constexpr uint16_t MAX_AMPL = 4095; // 12-bit ADC
 
 //================================================================
 CscOverlay::CscOverlay(const std::string &name, ISvcLocator *pSvcLocator) :
@@ -155,13 +155,13 @@ StatusCode CscOverlay::overlayExecute() {
 	  ATH_MSG_WARNING("Could not get real data CSC RDO container \"" << m_mainInputCSC_Name << "\"");
 	  return StatusCode::SUCCESS;
 	}
-      if ((cdata->begin()==cdata->end()) || !(cdata->begin()->cptr())){
+      if ((cdata->begin()==cdata->end()) || !*(cdata->begin())){
 	ATH_MSG_WARNING("Could not get nsamples, cdata empty?");
 	//return StatusCode::SUCCESS;
       }
       else
 	{
-	  numsamples=cdata->begin()->cptr()->numSamples();
+	  numsamples=cdata->begin()->numSamples();
 	}
     }
   else{
@@ -170,14 +170,14 @@ StatusCode CscOverlay::overlayExecute() {
 	ATH_MSG_WARNING("Could not get real data CSC RDO container \"" << m_mainInputCSC_Name << "\"");
 	return StatusCode::SUCCESS;
       }
-    if ((data_input_CSC->begin()==data_input_CSC->end()) || !(data_input_CSC->begin()->cptr()))
+    if ((data_input_CSC->begin()==data_input_CSC->end()) || !*(data_input_CSC->begin()))
       {
 	ATH_MSG_WARNING("Could not get nsamples, data_input_CSC empty?");
 	//return StatusCode::SUCCESS;
       }
     else
       {
-	numsamples=data_input_CSC->begin()->cptr()->numSamples();
+	numsamples=data_input_CSC->begin()->numSamples();
       }
     }
 
@@ -258,8 +258,8 @@ void CscOverlay::overlayContainer(const CscRawDataContainer *main,
   
   for(; p_main != p_main_end; ) {
     
-    /** retrieve the ovl collection by calling cptr() */
-    const CscRawDataCollection *coll_main = p_main->cptr();
+
+    const CscRawDataCollection *coll_main = *p_main;
     if ( outputContainer->addCollection(coll_main, p_main.hashId()).isFailure() ) {
       msg << MSG::WARNING << "addCollection failed for main" << endmsg; 
     }
@@ -275,8 +275,7 @@ void CscOverlay::overlayContainer(const CscRawDataContainer *main,
 
   for(; p_ovl != p_ovl_end; ) {
 
-    /** retrieve the ovl collection by calling cptr() */
-    const CscRawDataCollection *coll_ovl = p_ovl->cptr();
+    const CscRawDataCollection *coll_ovl = *p_ovl;
 
     uint16_t coll_id = (*p_ovl)->identify();
 
@@ -290,7 +289,7 @@ void CscOverlay::overlayContainer(const CscRawDataContainer *main,
       /** Need to merge the collections
           Retrieve q */
 
-      const CscRawDataCollection *coll_data = q->cptr();
+      const CscRawDataCollection *coll_data = *q;
 
       /** copy a few things to the new collection */
       out_coll->set_eventType( coll_data->eventType() );
diff --git a/MuonSpectrometer/MuonRDO/CMakeLists.txt b/MuonSpectrometer/MuonRDO/CMakeLists.txt
index e205ba9a2109368fe0fec7060c1c4c4c0c89c2c4..365ff2cb9c0cca5cf77a2c2fadef2f6811ec9c3b 100644
--- a/MuonSpectrometer/MuonRDO/CMakeLists.txt
+++ b/MuonSpectrometer/MuonRDO/CMakeLists.txt
@@ -27,12 +27,12 @@ atlas_add_library( MuonRDO
                    src/*.cxx
                    PUBLIC_HEADERS MuonRDO
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel SGTools Identifier CSCcablingLib MuonIdHelpersLib StoreGateLib SGtests TGCcablingInterfaceLib
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel SGTools Identifier CSCcablingLib MuonIdHelpersLib StoreGateLib SGtests TGCcablingInterfaceLib EventContainers
                    PRIVATE_LINK_LIBRARIES GaudiKernel )
 
 atlas_add_dictionary( MuonRDODict
                       MuonRDO/MuonRDODict.h
                       MuonRDO/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel SGTools Identifier CSCcablingLib MuonIdHelpersLib StoreGateLib SGtests GaudiKernel TGCcablingInterfaceLib MuonRDO )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} DataModel SGTools Identifier CSCcablingLib MuonIdHelpersLib StoreGateLib SGtests GaudiKernel TGCcablingInterfaceLib MuonRDO EventContainers)
 
diff --git a/MuonSpectrometer/MuonRDO/MuonRDO/CscRawDataContainer.h b/MuonSpectrometer/MuonRDO/MuonRDO/CscRawDataContainer.h
index 0ae5e264a17d988022ec09820a683ddd0da201aa..a1e7f5f0025c20fda901df3df7a9beebce54ce25 100755
--- a/MuonSpectrometer/MuonRDO/MuonRDO/CscRawDataContainer.h
+++ b/MuonSpectrometer/MuonRDO/MuonRDO/CscRawDataContainer.h
@@ -41,7 +41,7 @@ public:
 
 private:
 
-    CscRawDataCollectionIdHash& hashFcn() const;
+    static const CscRawDataCollectionIdHash& hashFcn();
 
 };
 
diff --git a/MuonSpectrometer/MuonRDO/MuonRDO/MdtCsmContainer.h b/MuonSpectrometer/MuonRDO/MuonRDO/MdtCsmContainer.h
index 93b50bc0c7a5263c35c3bb5840afaae23d20e9db..2772f735622c55ae841a490b8925031a406bad18 100755
--- a/MuonSpectrometer/MuonRDO/MuonRDO/MdtCsmContainer.h
+++ b/MuonSpectrometer/MuonRDO/MuonRDO/MdtCsmContainer.h
@@ -43,7 +43,7 @@ public:
   
 private:
 
-    MdtCsmIdHash& hashFcn() const;
+    static const MdtCsmIdHash& hashFcn();
   
 };
 
diff --git a/MuonSpectrometer/MuonRDO/MuonRDO/RpcPadContainer.h b/MuonSpectrometer/MuonRDO/MuonRDO/RpcPadContainer.h
index 7354a8bec34c2e9e8764423833d29422dc157e7a..4feb3dbe7a99da3690329ecb04fe6dc54feb4ea4 100755
--- a/MuonSpectrometer/MuonRDO/MuonRDO/RpcPadContainer.h
+++ b/MuonSpectrometer/MuonRDO/MuonRDO/RpcPadContainer.h
@@ -25,7 +25,6 @@ class RpcPadContainer
    :public IdentifiableContainer<RpcPad> {
 
 public:  
-   RpcPadContainer(); 
    RpcPadContainer(unsigned int hashmax) ; 
   ~RpcPadContainer() ; 
 
diff --git a/MuonSpectrometer/MuonRDO/MuonRDO/TgcRdoContainer.h b/MuonSpectrometer/MuonRDO/MuonRDO/TgcRdoContainer.h
index c676f993a77f80a18ebcd680920526ef5493421e..916f1d2f25ecb67d3ae767cebf7ae5e7292821f8 100755
--- a/MuonSpectrometer/MuonRDO/MuonRDO/TgcRdoContainer.h
+++ b/MuonSpectrometer/MuonRDO/MuonRDO/TgcRdoContainer.h
@@ -43,7 +43,7 @@ public:
 
 private:
 
-    TgcRdoIdHash&  hashFcn() const;
+    static const TgcRdoIdHash&  hashFcn();
 
 };
 
diff --git a/MuonSpectrometer/MuonRDO/doc/packagedoc.h b/MuonSpectrometer/MuonRDO/doc/packagedoc.h
index 3116f1160440351d3cc104934f6d5e8b805f1a13..b1795a38a2af031422d1d3ddccc2055c295786bd 100644
--- a/MuonSpectrometer/MuonRDO/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonRDO/doc/packagedoc.h
@@ -34,8 +34,4 @@ Finally, there are the raw data objects:
 
 @sa The official Muon EDM webpage is https://twiki.cern.ch/twiki/bin/view/Atlas/MuonEventDataModel
 
-@section MuonRDO_used_packagesMuonRDO Used Packages
-
-@section MuonRDO_requirementsMuonRDO Requirements
-
 */
diff --git a/MuonSpectrometer/MuonRDO/src/CscRawDataContainer.cxx b/MuonSpectrometer/MuonRDO/src/CscRawDataContainer.cxx
index 369f7cd031ab51e8f6a9895b5134189ea905f6da..4e5c7e34075a40785a79f585492bf3216a86b1ed 100755
--- a/MuonSpectrometer/MuonRDO/src/CscRawDataContainer.cxx
+++ b/MuonSpectrometer/MuonRDO/src/CscRawDataContainer.cxx
@@ -7,9 +7,8 @@
 
 // Default constructor.
 CscRawDataContainer::CscRawDataContainer()
-  : IdentifiableContainer<CscRawDataCollection>(0) 
+  : IdentifiableContainer<CscRawDataCollection>(hashFcn().max()) 
 {
-    DLV::init(hashFcn().max());	
 }
 
 CscRawDataContainer::CscRawDataContainer(unsigned int hashmax)
@@ -29,8 +28,8 @@ CscRawDataContainer::idToHash(unsigned int id) const
 }
 
 /// Convert identifier to idhash
-CscRawDataCollectionIdHash& 
-CscRawDataContainer::hashFcn() const
+const CscRawDataCollectionIdHash& 
+CscRawDataContainer::hashFcn()
 {
 
     static CscRawDataCollectionIdHash hashFcn;
diff --git a/MuonSpectrometer/MuonRDO/src/MdtCsmContainer.cxx b/MuonSpectrometer/MuonRDO/src/MdtCsmContainer.cxx
index d8bcb4532560a58c1e4f2f31c401e2f13cf8abe9..acca454f25c1e5eebba371811788877c4646b82d 100755
--- a/MuonSpectrometer/MuonRDO/src/MdtCsmContainer.cxx
+++ b/MuonSpectrometer/MuonRDO/src/MdtCsmContainer.cxx
@@ -27,9 +27,8 @@ using std::endl;
 // Default constructor.
 
 MdtCsmContainer::MdtCsmContainer()
-: IdentifiableContainer<MdtCsm>() 
+: IdentifiableContainer<MdtCsm>(hashFcn().max()) 
 {
-    DLV::init(hashFcn().max());	
 }
 
 //**********************************************************************
@@ -56,10 +55,10 @@ MdtCsmContainer::idToHash(unsigned int id) const
 }
 
 //**********************************************************************
-MdtCsmIdHash& 
-MdtCsmContainer::hashFcn() const
+const MdtCsmIdHash& 
+MdtCsmContainer::hashFcn()
 {
-    static MdtCsmIdHash hashFcn;
+    static const MdtCsmIdHash hashFcn;
     return (hashFcn);
 }
 
diff --git a/MuonSpectrometer/MuonRDO/src/RpcPadContainer.cxx b/MuonSpectrometer/MuonRDO/src/RpcPadContainer.cxx
index bd29f4cab9e5236606cd30ca1af13277f6b0f9cf..9ea18fbb527d0422042dab0f721aebb14c77df75 100755
--- a/MuonSpectrometer/MuonRDO/src/RpcPadContainer.cxx
+++ b/MuonSpectrometer/MuonRDO/src/RpcPadContainer.cxx
@@ -27,13 +27,6 @@ using std::endl;
 // Member functions.
 //**********************************************************************
 
-// Default constructor.
-
-RpcPadContainer::RpcPadContainer()
-: IdentifiableContainer<RpcPad>() 
-{
-    //DLV::init(hashFcn().max());	
-}
 
 //**********************************************************************
 
diff --git a/MuonSpectrometer/MuonRDO/src/TgcRdoContainer.cxx b/MuonSpectrometer/MuonRDO/src/TgcRdoContainer.cxx
index 7ccf64331ce8feed1862c4c4383de7fa5b5747ad..fed2bb8a881c023b73413515edf7afcd3c0939b6 100755
--- a/MuonSpectrometer/MuonRDO/src/TgcRdoContainer.cxx
+++ b/MuonSpectrometer/MuonRDO/src/TgcRdoContainer.cxx
@@ -12,9 +12,8 @@
 
 // Default constructor.
 TgcRdoContainer::TgcRdoContainer()
-  : IdentifiableContainer<TgcRdo>() 
+  : IdentifiableContainer<TgcRdo>(hashFcn().max()) 
 {
-    DLV::init(hashFcn().max());	
 }
 
 // Default constructor.
@@ -41,10 +40,10 @@ const CLID& TgcRdoContainer::classID()
   return ClassID_traits<TgcRdoContainer>::ID();       
 }
 
-TgcRdoIdHash&
-TgcRdoContainer::hashFcn() const
+const TgcRdoIdHash&
+TgcRdoContainer::hashFcn()
 {
-    static TgcRdoIdHash hashFcn;
+    static const TgcRdoIdHash hashFcn;
     return(hashFcn);
 }
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/doc/packagedoc.h
index a5411729d36be869e4c7f4693629ca16c84cd383..d2599fcd91e3562284d59165e421bb7998ea3a14 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/doc/packagedoc.h
@@ -53,15 +53,5 @@ have been retained for possible future use.
 
 @section CscClusterization_AdditionalCscClusterization Additional information
 
- - @ref UsedCscClusterization
- - @ref RequirementsCscClusterization
  - <a href=https://twiki.cern.ch/twiki/bin/view/Atlas/CscReconstruction>CSC reconstruction overview</a>
 */
-
-/**
-@page UsedCscClusterization Used packages
-*/
-
-/**
-@page RequirementsCscClusterization Requirements
-*/
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscPeakThresholdClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscPeakThresholdClusterBuilderTool.cxx
index e921664f2962fc39eda0cb490319af238aed3624..a9d6d7707973f0e5a36c251d2ef7fd224f5d1dd7 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscPeakThresholdClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscPeakThresholdClusterBuilderTool.cxx
@@ -230,7 +230,7 @@ StatusCode CscPeakThresholdClusterBuilderTool::getClusters(IdentifierHash givenH
                       << coll_hash );
     return StatusCode::SUCCESS;
   }
-  const CscStripPrepDataCollection * col = it_coll->cptr();
+  const CscStripPrepDataCollection * col = *it_coll;
   
   ATH_MSG_DEBUG ( "Retrieved " << col->size() << " CSC Strip PrepDatas." );
   
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscThresholdClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscThresholdClusterBuilderTool.cxx
index 4e025195d9275bd3d14fb5c5a86973ebce59ad19..3936f4dee846080301a218434858066464cb7179 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscThresholdClusterBuilderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/CscClusterization/src/CscThresholdClusterBuilderTool.cxx
@@ -252,7 +252,7 @@ StatusCode CscThresholdClusterBuilderTool::getClusters(IdentifierHash givenHashI
                       << coll_hash );
     return StatusCode::SUCCESS;
   }
-  const CscStripPrepDataCollection * col = it_coll->cptr();
+  const CscStripPrepDataCollection * col = *it_coll;
   
   ATH_MSG_DEBUG ( "Retrieved " << col->size() << " CSC Strip PrepDatas." );
   
diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonClusterization/MuonClusterization/TgcHitClustering.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonClusterization/MuonClusterization/TgcHitClustering.h
index d758229c7cba7c3f48ef2eca411260d4ce77c4fb..4817d2f12632a780fcfb7f40d2c15f26c3cb17a4 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonClusterization/MuonClusterization/TgcHitClustering.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MuonClusterization/MuonClusterization/TgcHitClustering.h
@@ -16,7 +16,8 @@
 
 namespace Muon {
 
-  struct TgcClusterObj {
+  class TgcClusterObj {
+  public:
     
     typedef std::vector< const TgcPrepData* > HitList;
     typedef HitList::iterator                 HitIt;
@@ -69,7 +70,8 @@ namespace Muon {
     HitList hitList;
   };
 
-  struct TgcClusterObj3D {
+  class TgcClusterObj3D {
+  public:
     TgcClusterObj3D( const TgcClusterObj& etaC, const TgcClusterObj& phiC )  : etaCluster(etaC), phiCluster(phiC) {}
 
     TgcClusterObj etaCluster;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/doc/packagedoc.h
index a3fa4f7f8e1004bdb37775eb4ed7445bd949bdd3..c9d12469b63f9434e6fef189431a112fd2e8e5f2 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonCombinePatternTools/doc/packagedoc.h
@@ -15,16 +15,6 @@ This AlgTool will combine global eta and phi patterns from the HoughPatternTool
 
   - MuonCombinePatternTool: combines eta and phi patterns
 
-@ref used_MuonCombinePatternTools
 
-@ref requirements_MuonCombinePatternTools
 
 */
-
-/**
-@page used_MuonCombinePatternTools Used Packages
-*/
-
-/**
-@page requirements_MuonCombinePatternTools Requirements
-*/
diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h
index 99d8371f9871ddb9d75893cb73f49f9de9f7bed7..7096bfd31213032a9b70851d2d1e554474d88075 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternFinderTool.h
@@ -196,7 +196,7 @@ namespace Muon {
     mutable std::map <const Trk::PrepRawData*, std::set<const Trk::PrepRawData*,Muon::IdentifierPrdLess> >* m_phietahitassociation;
 
     /** histogram file for studies on weighting (only in use, when m_use_histos is true) */
-    TFile* f_file;
+    TFile* m_file;
     /** all hits histograms for studies on weighting (only in use, when m_use_histos is true) */
     TH1F* m_weighthistogram;
     /** mdt histogram */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h
index 8d548f9252fc3d7295ed7d6105aff40e409ed7dd..23df88312e841f1454378d4c2a7eb49ef8bf6d2e 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/MuonHoughPatternTools/MuonHoughPatternTool.h
@@ -153,7 +153,7 @@ class MuonHoughPatternTool : virtual public IMuonHoughPatternTool, public AthAlg
   bool hitThroughCut(MuonHoughHit* hit)const;
 
   /** pointer to the file name for the hough histograms */
-  TFile *f_file;
+  TFile *m_file;
   /** object for use of mathematical formulas for trackmodels */
   MuonHoughMathUtils m_muonhoughmathutils;
 
@@ -170,7 +170,7 @@ class MuonHoughPatternTool : virtual public IMuonHoughPatternTool, public AthAlg
   mutable MuonHoughPatternContainerShip m_houghpattern; 
 
   /** hough histograms for visualisation in root stored per id */
-  mutable std::vector <TH2F*> h_histogram;
+  mutable std::vector <TH2F*> m_h_histogram;
 
   /** output histograms (false) */
   bool m_use_histos;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/doc/packagedoc.h
index dc19801565860e6b433e2a63d9a770a7f631cdd5..ced6b8816def7eb4656e5eb40d24682a47664aa1 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/doc/packagedoc.h
@@ -16,16 +16,6 @@ This AlgTool will make global eta and phi patterns using uncalibrated muon detec
   - MuonHoughPatternFinderTool: AlgTool that steers the patternfinder and has the dependency to StoreGate
   - MuonHoughPatternTool: finds eta and phi patterns using HoughTransforms
 
-@ref used_MuonHoughPatternTools
 
-@ref requirements_MuonHoughPatternTools
 
 */
-
-/**
-@page used_MuonHoughPatternTools Used Packages
-*/
-
-/**
-@page requirements_MuonHoughPatternTools Requirements
-*/
diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx
index 321dadc98b5155f19e1d0a1af584aeec5e1ae198..65293ae0e5767d98f1c0f6bb4287aae779a21f0d 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternFinderTool.cxx
@@ -116,7 +116,7 @@ namespace Muon {
   StatusCode MuonHoughPatternFinderTool::initialize()
   {
     if (m_use_histos == true) {
-      f_file = new TFile("Hough_histos.root","RECREATE");
+      m_file = new TFile("Hough_histos.root","RECREATE");
       m_weighthistogram =  new TH1F("weighthisto","weighthisto",100,-0.5,2);
       m_weighthistogrammdt =  new TH1F("weighthistomdt","weighthistomdt",100,-0.3,2.2);
       m_weighthistogramrpc =  new TH1F("weighthistorpc","weighthistorpc",100,-0.3,2.2);
@@ -271,11 +271,11 @@ namespace Muon {
   StatusCode MuonHoughPatternFinderTool::finalize()
   {
     if (m_use_histos == true) {
-      f_file->Write();
-      f_file->Close();
+      m_file->Write();
+      m_file->Close();
       ATH_MSG_DEBUG ("MuonHoughPatternFinderTool:: delete rootfile");
-      delete f_file;
-      f_file=0;
+      delete m_file;
+      m_file=0;
       ATH_MSG_DEBUG ("MuonHoughPatternFinderTool::delete Histogram: ");
     }
     delete m_phietahitassociation;
@@ -1734,7 +1734,8 @@ namespace Muon {
 	      ATH_MSG_VERBOSE (" Summary nHits " << matchedHits << " nl1 " << matchWithLine.hitsMl1() 
                                << " nl2 " << matchWithLine.hitsMl2());
 	      if (matchedHits > nHits || (matchedHits ==  nHits && psi < angleDif )) {
-		int dnl = abs(matchWithLine.hitsMl1()-matchWithLine.hitsMl2());
+		int dnl = std::abs(static_cast<int>(matchWithLine.hitsMl1())-
+                                   static_cast<int>(matchWithLine.hitsMl2()));
                 ATH_MSG_DEBUG (" matchWithLine.hitsOnTrack() >  nHits old " << nHits << " new: " << matchedHits);
                 ATH_MSG_DEBUG (" dnl " << dnl << " old dnl " << std::abs(nl1-nl2));
                 ATH_MSG_DEBUG (" hit cos phi " << cphi << " line " << coshit << " sin phi " << sphi << " line " << sinhit << " psi " << psi);
diff --git a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternTool.cxx
index 463538ad51610c677a0727bd0704a0f492fafc09..0252b35a82da3eabb7de89f34e1b354e40557ba2 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonPatternFinders/MuonPatternFinderTools/MuonHoughPatternTools/src/MuonHoughPatternTool.cxx
@@ -254,7 +254,7 @@ void MuonHoughPatternTool::makePatterns(int id_number) const
 	  if( m_use_histos && level == 0 && id_number == MuonHough::hough_curved_at_a_cylinder ){
 	    const MuonHoughHisto2DContainer& histos = houghtransform->histos();
 	    TDirectory* dir = gDirectory;
-	    f_file->cd();
+	    m_file->cd();
 	    for( int i=0;i<histos.size();++i ){
 
 	      TString hname = "hough_call_";
@@ -295,7 +295,7 @@ StatusCode MuonHoughPatternTool::initialize()
   if (m_use_histos == true) // debug histos
     {
       TString file = "HoughPattern.root";
-      f_file = new TFile(file,"RECREATE");
+      m_file = new TFile(file,"RECREATE");
     }
 
   ATH_MSG_DEBUG("Use Cosmic Settings: " << m_use_cosmics);
@@ -356,10 +356,10 @@ StatusCode MuonHoughPatternTool::finalize()
 
   if (m_use_histos == true)
     {
-      f_file->Write();
-      f_file->Close();
-      delete f_file;
-      f_file=0;
+      m_file->Write();
+      m_file->Close();
+      delete m_file;
+      m_file=0;
     }
 
   return sc;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/doc/packagedoc.h
index 45245b45c3b5203f17a55ca46315441e6cae211c..119daa43eca44fd2836d920316fdf0640821d648 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MdtDriftCircleOnTrackCreator/doc/packagedoc.h
@@ -20,7 +20,6 @@ track prediction and calibrates its error estimate.
 More general information on RIO_OnTrackCreation and instructions
 how to use these tools can be found under Trk::RIO_OnTrackCreator.
 
-@section MdtDriftCircleOnTrackCreator_MdtDriftCircleOnTrackCreatorDocReq The requirements file
 
 @section MdtDriftCircleOnTrackCreator_MdtDriftCircleOnTrackCreatorDocMgr Package Managers
 The Muon::MdtDriftCircleOnTrackCreator package is currently maintained by Niels van Eldik
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/doc/packagedoc.h
index 6c2f30d2a6ea9c1cc45be45abbec4c564c4059b9..77731701180214f7defc79696455fe5b8d06aed1 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/doc/packagedoc.h
@@ -44,7 +44,6 @@ instance:
 from MuonClusterOnTrackCreator.DefaultMuonClusterOnTrackCreator import theMuonClusterOnTrackCreator
 </pre>
 
-@section MuonClusterOnTrackCreator_MuonClusterOnTrackToolDocReq The requirements file
 
 @section MuonClusterOnTrackCreator_MuonClusterOnTrackToolDocMgr Package Managers
 The MuonClusterOnTrackTool package is currently maintained by
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h
index 9dc2ad350d9a08a6616ed38cc073f272f402b444..9188c2db3c1f505ebff9c4f947d97634121964f7 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonClusterOnTrackCreator/src/MuonClusterOnTrackCreator.h
@@ -86,7 +86,6 @@ namespace Muon {
     // Private data:
     // /////////////////////////////////////////////////////////////////
 
-    const MuonGM::MuonDetectorManager*   m_muonMgr;          // Muon GeoModel
     ToolHandle<Trk::IRIO_OnTrackErrorScalingTool>   m_errorScalingTool;
     ToolHandle<Muon::MuonIdHelperTool>   m_idHelper;
     bool                                 m_scaleCscCov;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonCompetingClustersOnTrackCreator/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonCompetingClustersOnTrackCreator/doc/packagedoc.h
index 13c4af16f388a94ed84ec64fd002b44f00956254..77c134bf8fcbe0befd56301b54df7bf604f51a8c 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonCompetingClustersOnTrackCreator/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRIO_OnTrackCreators/MuonCompetingClustersOnTrackCreator/doc/packagedoc.h
@@ -10,7 +10,6 @@
 
 The package contains several tool to create MuonCompetingClustersOnTrack objects.
 
-@section MuonCompetingClustersOnTrackCreator_MuonCompetingClustersOnTrackCreatorDocReq The requirements file
 
 @section MuonCompetingClustersOnTrackCreator_MuonCompetingClustersOnTrackCreatorDocMgr Package Managers
 The MuonCompetingClustersOnTrackCreator package is currently maintained by Niels van Eldik.
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonCompetingRIOsOnTrack/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonCompetingRIOsOnTrack/doc/packagedoc.h
index d80750cfbfcc226b3da67e63f50be0858d692448..d83b275d987fa16a49660f0bb40c526567d6b4f9 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonCompetingRIOsOnTrack/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonCompetingRIOsOnTrack/doc/packagedoc.h
@@ -21,14 +21,4 @@ localParameters() and localErrorMatrix() return the mean values according to the
 
 @section MuonCompetingRIOsOnTrack_ExtrasMuonCompetingRIOsOnTrack Extra Pages
 
- - @ref UsedMuonCompetingRIOsOnTrack
- - @ref requirementsMuonCompetingRIOsOnTrack
-*/
-
-/**
-@page UsedMuonCompetingRIOsOnTrack Used Packages
-*/
-
-/**
-@page requirementsMuonCompetingRIOsOnTrack Requirements
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonEDM_AssociationObjects/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonEDM_AssociationObjects/doc/packagedoc.h
index 613d4b3fc81c9418f258f8724e5e1291d7835487..efb08febc01302010d54431465df48a1d39056e0 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonEDM_AssociationObjects/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonEDM_AssociationObjects/doc/packagedoc.h
@@ -16,16 +16,6 @@ For more information on how to use these objects, there are some instructions in
 @see Muon::MuonSegPatAssMap
 
 
-@ref used_MyPackage
 
-@ref requirements_MyPackage
 
 */
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-*/
\ No newline at end of file
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformSteering.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformSteering.h
index 92f92ab1a83a570018d7052ee079f7953fb3a7ce..cbeafcc0c33050e90033ff70fcae61a4b76572db 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformSteering.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/MuonHoughPatternEvent/MuonHoughTransformSteering.h
@@ -61,8 +61,6 @@ class MuonHoughTransformSteering
 
   /** maximum residu for hit to be associated to pattern */
   bool m_maximum_residu_mm;
-  /** residu_grad maximum residu for hit to be associated to pattern */
-  bool m_maximum_residu_grad;
 };
 
 #endif // MUONHOUGHPATTERNEVENT_MUONHOUGHTRANSFORMSTEERING_H
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/doc/packagedoc.h
index ae36624e4da6262a9bd8d91989b74f24d5566a1c..0d9f5b572ccddb581ca5f488ac87e2bc6c07f30e 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/doc/packagedoc.h
@@ -28,16 +28,6 @@ This package contains the different HoughTransforms used in the HoughPatternTool
   - MuonHoughTransformer_xyz: base class for HoughTransformers in carthesian coordinates, straight track model
   - MuonHoughTransformer_yz: HoughTransformer in yz plane with straight track model, currently not in use
 
-@ref used_MuonHoughPatternEvent
 
-@ref requirements_MuonHoughPatternEvent
 
 */
-
-/**
-@page used_MuonHoughPatternEvent Used Packages
-*/
-
-/**
-@page requirements_MuonHoughPatternEvent Requirements
-*/
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformSteering.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformSteering.cxx
index fe2c28b8f65347c9e1c5d6188d9fbae26f4126f2..1f12a2627f8fa7749220b96d41a9e4b2b1ef3bb7 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformSteering.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonHoughPatternEvent/src/MuonHoughTransformSteering.cxx
@@ -9,7 +9,6 @@
 MuonHoughTransformSteering::MuonHoughTransformSteering(MuonHoughTransformer* houghtransformer)
 {
   m_houghtransformer=houghtransformer;
-  m_maximum_residu_grad = 0.1;
   m_maximum_residu_mm = 1.;
 }
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPattern/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPattern/doc/packagedoc.h
index 1e186d3879def0432e87ab7d6d6fe8f4fd9b83b2..203c4edadf94b6deabe16c76c64a871f4b7f964d 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPattern/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPattern/doc/packagedoc.h
@@ -30,15 +30,4 @@ The objects can be stored in StoreGate using the following collections:
 	
 @section MuonPattern_ExtrasMuonPattern Extra Pages
 
- - @ref UsedMuonPattern
- - @ref RequirementsMuonPattern
-*/
-
-/**
-@page UsedMuonPattern Used Packages
-*/
-
-/**
-@page RequirementsMuonPattern Requirements
-
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/CMakeLists.txt b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/CMakeLists.txt
index 7b1954213c08308011a6b451a2d80bd3f9f3f285..09978673f3794f89c9e9166d65531717ad54d2b5 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/CMakeLists.txt
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/CMakeLists.txt
@@ -31,12 +31,12 @@ atlas_add_library( MuonPrepRawData
                    PUBLIC_HEADERS MuonPrepRawData
                    INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} AthContainers AthLinks SGTools GeoPrimitives Identifier EventPrimitives MuonReadoutGeometry TrkSurfaces TrkPrepRawData
+                   LINK_LIBRARIES ${EIGEN_LIBRARIES} AthContainers AthLinks SGTools GeoPrimitives Identifier EventPrimitives MuonReadoutGeometry TrkSurfaces TrkPrepRawData EventContainers
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel )
 
 atlas_add_dictionary( MuonPrepRawDataDict
                       MuonPrepRawData/MuonPrepDataDict.h
                       MuonPrepRawData/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthContainers AthLinks SGTools GeoPrimitives Identifier EventPrimitives MuonReadoutGeometry TrkSurfaces TrkPrepRawData GaudiKernel MuonPrepRawData )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} AthContainers AthLinks SGTools GeoPrimitives Identifier EventPrimitives MuonReadoutGeometry TrkSurfaces TrkPrepRawData GaudiKernel MuonPrepRawData EventContainers)
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.h
index 79fddf690c34f2bc2890a2395e87d2a7d8e1c6e8..315065061a9d6435d128d7f596b498c9ee84c069 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.h
@@ -39,9 +39,6 @@ class MuonPrepDataContainer : public IdentifiableContainer<CollectionT> {
   // Public methods:
   ///////////////////////////////////////////////////////////////////
 public:
-
-    //default for POOL
-      MuonPrepDataContainer();
     
   // Constructor with parameters:
   MuonPrepDataContainer(unsigned int max);
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.icc b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.icc
index 7accfdb596154e8cd7dfd177f9b8895bb8ff87bb..1bad1c5c8caa08a4d8b594ad010ad159d3d16a6a 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.icc
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataContainer.icc
@@ -12,11 +12,6 @@
 ///////////////////////////////////////////////////////////////////
 
 
-template< class CollectionT>
-MuonPrepDataContainer< CollectionT>::MuonPrepDataContainer() :
-  IdentifiableContainer<CollectionT>()
-{
-}
 
 template< class CollectionT>
 // Constructor with parameters:
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataDict.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataDict.h
index d78b91c11a1f3f49c269c868b86a4052e61f5598..15d9f0fb09d6ea4de002ed3c934c545c504366ea 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataDict.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonPrepDataDict.h
@@ -63,12 +63,12 @@ struct tmp
    DataVector<Muon::MuonPrepDataCollection<Muon::MMPrepData> >    dummy11;
    std::vector<Muon::MuonPrepDataCollection<Muon::MMPrepData>* >  dummy12;
 
-  EXPAND_DLV(Muon::CscPrepData, csc_prep_data);
-  EXPAND_DLV(Muon::RpcPrepData, rpc_prep_data);
-  EXPAND_DLV(Muon::TgcPrepData, tgc_prep_data);
-  EXPAND_DLV(Muon::sTgcPrepData, stgc_prep_data);
-  EXPAND_DLV(Muon::MMPrepData, mm_prep_data);
-  EXPAND_DLV(Muon::MdtPrepData, mdt_prep_data);
+//  EXPAND_DLV(Muon::CscPrepData, csc_prep_data);
+//  EXPAND_DLV(Muon::RpcPrepData, rpc_prep_data);
+//  EXPAND_DLV(Muon::TgcPrepData, tgc_prep_data);
+//  EXPAND_DLV(Muon::sTgcPrepData, stgc_prep_data);
+//  EXPAND_DLV(Muon::MMPrepData, mm_prep_data);
+//  EXPAND_DLV(Muon::MdtPrepData, mdt_prep_data);
 };
 
 }
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx
index a2dc2f3ec7bd6d4df3eff55e42f6627ab5c91174..aeaa5166e7516af457dda0f94424d0bf270e7d33 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx
@@ -86,14 +86,9 @@ namespace Muon
     stream << MSG::INFO<<"MuonCluster {"<<std::endl;
     Trk::PrepRawData::dump(stream);
     stream << "Global Coordinates (x,y,z) = (";
-    if ( &(this->globalPosition() )!=0 )
-    {
-      stream<<this->globalPosition().x()<<", "
-      <<this->globalPosition().y()<<", "
-      <<this->globalPosition().z()<<")"<<std::endl;
-    } else {
-      stream<<"NULL!), "<<std::endl;
-    }
+    stream<<this->globalPosition().x()<<", "
+          <<this->globalPosition().y()<<", "
+          <<this->globalPosition().z()<<")"<<std::endl;
     stream<<"} End MuonCluster"<<endmsg;
     return stream;
   }
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/doc/packagedoc.h
index aef69f2b0820c5688066c4026f74ee8ce52e3e48..0d1df472df343ddcede0116c874034fff30ae5b2 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/doc/packagedoc.h
@@ -20,15 +20,4 @@ The objects can be stored in StoreGate using the following collections:
 	
 @section MuonSegment_ExtrasMuonSegment Extra Pages
 
- - @ref UsedMuonSegment
- - @ref RequirementsMuonSegment
-*/
-
-/**
-@page UsedMuonSegment Used Packages
-*/
-
-/**
-@page RequirementsMuonSegment Requirements
-
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.h
index 0806492a8987fec293746dbdcdeeb3e60ebc1fb7..4f57e57670ed21f60c9d87e47277a88bd51ebf50 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.h
@@ -37,7 +37,7 @@ class MuonCoinDataContainer : public IdentifiableContainer<CollectionT> {
 public:
 
     //default for POOL
-      MuonCoinDataContainer();
+//      MuonCoinDataContainer();
     
   // Constructor with parameters:
   MuonCoinDataContainer(unsigned int max);
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.icc b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.icc
index 686fff14c230f77aef03f5f8c6b03ada0c389a2f..81678d6b295c98824800adc8bc4245a90d737f29 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.icc
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonTrigCoinData/MuonTrigCoinData/MuonCoinDataContainer.icc
@@ -9,11 +9,6 @@
 // (c) ATLAS Detector software
 ///////////////////////////////////////////////////////////////////
 
-template< class CollectionT>
-MuonCoinDataContainer< CollectionT>::MuonCoinDataContainer() :
-  IdentifiableContainer<CollectionT>()
-{
-}
 
 template< class CollectionT>
 // Constructor with parameters:
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecExample/doc/packagedoc.h
index ee3b26a0fdc14faa52f66a0ba9c8b494a2037da8..8db29f11c4d90b51caa7faa690efc5f909ffcf48 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/doc/packagedoc.h
@@ -104,8 +104,4 @@ because that calls the function @c MuonRecFlags.sync_DetFlags() and you will los
 
 
 
-@section MuonRecExample_MuonRecExampleUsedPack Used packages
-
-@section MuonRecExample_MuonRecExamplerequirements requirements file
-
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py
index 47dae0dac96887650b3dc8fb9b8694e77af0246a..0b328d99825c7eb65ded4a70685e98949aec7052 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/python/MuonRecFlags.py
@@ -361,6 +361,12 @@ class makePRDs(JobProperty):
     allowedTypes=['bool']
     StoredValue=True
 
+# @brief Run the isolation for muons
+class doMuonIso(JobProperty):
+    statusOn=True
+    allowedTypes=['bool']
+    StoredValue=True
+
 
 
 ## The flags to steer muon reconstruction
@@ -390,6 +396,7 @@ class MuonRec(JobPropertyContainer):
         setDefault(self.useAlignmentCorrections,DetFlags.detdescr.Muon_on() and rec.doMuon())
         setDefault(self.writeSDOs, rec.doWriteESD() and globalflags.DataSource != 'data')
         setDefault(self.useTGCPriorNextBC,True)
+        setDefault(self.doMuonIso,False)
 
         if beamFlags.beamType == 'cosmics' or beamFlags.beamType == 'singlebeam':
             setDefault(self.doSegmentT0Fit,True)
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonTrackTruthCreation.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonTrackTruthCreation.py
index 942c0a2e8112d12b1e04b018e990a396bc9f8dc9..e3e67d246ca76783afd567722e4d173f83333525 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonTrackTruthCreation.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonTrackTruthCreation.py
@@ -26,5 +26,4 @@ from TrkTruthTrackAlgs.TrkTruthTrackAlgsConf import Trk__TruthTrackCreation
 topSequence += Trk__TruthTrackCreation("MuonTruthTrackCreation",
                                        PRD_TruthTrajectoryBuilder=ToolSvc.MuonPRD_TruthTrajectoryBuilder,
                                        TruthTrackBuilder = ToolSvc.MuonTruthTrackBuilder,
-                                       OutputTrackCollection = OutputTracks,
-                                       OutputSegmentCollection = OutputSegments )
+                                       OutputTrackCollection = OutputTracks)
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAmbiTrackSelectionTool/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAmbiTrackSelectionTool/doc/packagedoc.h
index 6d36fc468fe75c448373d0ccc817b67d27fb07f2..221a4553d983eec8897cc68757c81f65a8867c78 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAmbiTrackSelectionTool/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAmbiTrackSelectionTool/doc/packagedoc.h
@@ -16,7 +16,6 @@ is used. Some inline methods of the selection tool allow the client to use some
 selection tool.
 
 
-@section MuonAmbiTrackSelectionTool_MuonAmbiTrackSelectionToolReq Requirements
 
 
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAssociationTools/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAssociationTools/doc/packagedoc.h
index d5405e468febed878b68be8bc7784a13726d58de..b9ea34325b17d185baff41f00becd9868431353c 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAssociationTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonAssociationTools/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section MuonAssociationTools_MuonAssociationToolsReq Requirements
 
 
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/doc/packagedoc.h
index 62c2e481ad28ece4fd0a15d7d75c7aae53286639..760878c8ae6125d4b41b7a529212d27d5d634333 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonErrorScalingTools/doc/packagedoc.h
@@ -15,12 +15,3 @@ MuonErrorScalingTools is a package providing tools used to scale errors for muon
 - Muon::MuonRIO_OnTrackErrorScalingTool, used to scale errors for muon hits
 
 */
-
-
-/**
-@page UsedMuonErrorScalingTools Used Packages
-*/
-
-/**
-@page RequirementsMuonErrorScalingTools Requirements
-*/
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecHelperTools/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecHelperTools/doc/packagedoc.h
index 1ad2e152f20ccb87d2c2412ecdee6e94bdd80ecb..9d88be0f1e56e44173ce5f8636fc625e351f883b 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecHelperTools/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecHelperTools/doc/packagedoc.h
@@ -13,15 +13,10 @@ This package contains a set of helper tools for Muon EDM objects and Identifiers
  	
 @section MuonRecHelperTools_ExtrasMuonRecHelperTools Extra Pages
 
- - @ref UsedMuonRecHelperTools
- - @ref RequirementsMuonRecHelperTools
 */
 
-/**
-@page UsedMuonRecHelperTools Used Packages
-*/
+
 
 /**
-@page RequirementsMuonRecHelperTools Requirements
 
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecHelperTools/src/MuonEDMPrinterTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecHelperTools/src/MuonEDMPrinterTool.cxx
index 5d07d444b64c1ab038ddfa01e44050eab0a7cd3b..01679daaf07fce005668f98a0728fd2e45c7aeae 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecHelperTools/src/MuonEDMPrinterTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecHelperTools/src/MuonEDMPrinterTool.cxx
@@ -452,7 +452,7 @@ namespace Muon {
 
     std::vector< const Trk::MeasurementBase* >::const_iterator hit = measurements.begin();
     std::vector< const Trk::MeasurementBase* >::const_iterator hit_end = measurements.end();
-    std::vector< const Trk::MeasurementBase* >::const_iterator hit_last = hit_end;
+    //std::vector< const Trk::MeasurementBase* >::const_iterator hit_last = hit_end;
     for( ;hit!=hit_end;++hit ){
       if(!*hit) {
 	sout << " WARNING, zero pointer detected in MeasurementBase vector!!! " << std::endl;
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonRecoValidationTool.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonRecoValidationTool.h
index 295b372fe8a130e6594cad37e64a3a977be7a9ec..1afbad978f6f172317cb51ace18855d9e6ccd669 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonRecoValidationTool.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/MuonRecToolInterfaces/IMuonRecoValidationTool.h
@@ -26,7 +26,7 @@ namespace Trk {
 namespace Muon {
   
   class MuonSegment;
-  class MuonCandidate;
+  struct MuonCandidate;
 
   /** Interface ID*/  
   static const InterfaceID IID_IMuonRecoValidationTool("Muon::IMuonRecoValidationTool", 1, 0);
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/doc/packagedoc.h
index 537d63d07ceba188665d4eeb6dc82654ae5f088c..bc11f81f5b43273bd39b5abbb67bc01337936129 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonRecToolInterfaces/doc/packagedoc.h
@@ -27,15 +27,4 @@ The following interface are available:
 
 @section MuonRecToolInterfaces_ExtrasMuonRecToolInterfaces Extra Pages
 
- - @ref UsedMuonRecToolInterfaces
- - @ref RequirementsMuonRecToolInterfaces
-*/
-
-
-/**
-@page UsedMuonRecToolInterfaces Used Packages
-*/
-
-/**
-@page RequirementsMuonRecToolInterfaces Requirements
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonResidualPullCalculators/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonResidualPullCalculators/doc/packagedoc.h
index d6aef41e2d812aa2639639b412d9e5585bf242a4..155a856c87263b3cdab3e5bf3d1865dd10fb76fc 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonResidualPullCalculators/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonResidualPullCalculators/doc/packagedoc.h
@@ -35,14 +35,4 @@ configured as
 
 @section MuonResidualPullCalculators_ExtrasMuonResidualPullCalculators Extra Pages
 
- - @ref UsedMuonResidualPullCalculators
- - @ref RequirementsMuonResidualPullCalculators
-*/
-
-/**
-@page UsedMuonResidualPullCalculators Used Packages
-*/
-
-/**
-@page RequirementsMuonResidualPullCalculators Requirements
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/doc/packagedoc.h
index 3d73d6b5cc42a2c1228449a7fe974587ba25f338..e48e635995220fdd0e6cce337e1e472dc5f42596 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecTools/MuonTrackSummaryHelperTool/doc/packagedoc.h
@@ -20,16 +20,6 @@ This tool also makes use of the Muon::MuonHolesOnTrackTool to count the missing
 @see Muon::MuonHolesOnTrackTool
 
 
-@ref used_MuonTrackSummaryHelperTool
 
-@ref requirements_MuonTrackSummaryHelperTool
 
 */
-
-/**
-@page used_MuonTrackSummaryHelperTool Used Packages
-*/
-
-/**
-@page requirements_MuonTrackSummaryHelperTool Requirements
-*/
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonStationIntersectSvc/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonStationIntersectSvc/doc/packagedoc.h
index f273084c89c648f2ec167d697ab4c4cd70a8b186..953fa6671360412ee534ec3dfbfd36ed85bc17ab 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonStationIntersectSvc/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecUtils/MuonStationIntersectSvc/doc/packagedoc.h
@@ -16,15 +16,4 @@ intersected by a give trajectory.
  	
 @section MuonStationIntersectSvc_ExtrasMuonStationIntersectSvc Extra Pages
 
- - @ref UsedMuonStationIntersectSvc
- - @ref RequirementsMuonStationIntersectSvc
-*/
-
-/**
-@page UsedMuonStationIntersectSvc Used Packages
-*/
-
-/**
-@page RequirementsMuonStationIntersectSvc Requirements
-
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/doc/packagedoc.h
index 416afc55f8e7d705cb0a7cf11a95b57384b41fa0..a11ad82bbdb890800ce826e537bb5efdd4982a2e 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MooSegmentCombinationFinder/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section MooSegmentCombinationFinder_MooSegmentCombinationFinderReq Requirements
 
 
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonCurvedSegmentCombiner/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonCurvedSegmentCombiner/doc/packagedoc.h
index c8d669a6edd4ed5546675c1858ba145f8ee5a299..62d89ee5fbc5a6bed0b95d0b6862a6adc5519310 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonCurvedSegmentCombiner/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonCurvedSegmentCombiner/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section MuonCurvedSegmentCombiner_MuonCurvedSegmentCombinerReq Requirements
 
 
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonSegmentCombinerToolInterfaces/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonSegmentCombinerToolInterfaces/doc/packagedoc.h
index 634d0797ab3384ad331fcdda32414b8fe5d6deb8..168d2483374ea70a4fbb97d89fd4de18f748c775 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonSegmentCombinerToolInterfaces/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools/MuonSegmentCombinerToolInterfaces/doc/packagedoc.h
@@ -25,15 +25,4 @@ The following interface are available:
 
 @section MuonSegmentCombinerToolInterfaces_ExtrasMuonRecToolInterfaces Extra Pages
 
- - @ref UsedMuonRecToolInterfaces
- - @ref RequirementsMuonRecToolInterfaces
-*/
-
-
-/**
-@page UsedMuonRecToolInterfaces Used Packages
-*/
-
-/**
-@page RequirementsMuonRecToolInterfaces Requirements
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/doc/packagedoc.h
index b5fe355dc0466364b8843abe434294fa4734750d..18b3c8cf5e1eb76dad316c345426d5f44166e3b0 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerAlgs/CscSegmentMakers/doc/packagedoc.h
@@ -25,15 +25,5 @@ from CscSegmentMakers.Csc4dSegmentMaker import theCsc4dSegmentMaker
 
 @section CscSegmentMakers_AdditionalCscSegmentMakers Additional information
 
- - @ref UsedCscSegmentMakers
- - @ref RequirementsCscSegmentMakers
  - <a href=https://twiki.cern.ch/twiki/bin/view/Atlas/CscReconstruction>CSC reconstruction overview</a>
 */
-
-/**
-@page UsedCscSegmentMakers Used packages
-*/
-
-/**
-@page RequirementsCscSegmentMakers Requirements
-*/
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/doc/packagedoc.h
index a530f24fc6c64bfbe1c700afe3043c06ef7ada9c..40812db12343304e8bb9eebfc4428a28018de421 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/DCMathSegmentMaker/doc/packagedoc.h
@@ -81,14 +81,4 @@ m_mdtSegmentMaker->find( );
 
 @section DCMathSegmentMaker_ExtrasDCMathSegmentMaker Extra Pages
 
- - @ref UsedDCMathSegmentMaker
- - @ref RequirementsDCMathSegmentMaker
-*/
-
-/**
-@page UsedDCMathSegmentMaker Used Packages
-*/
-
-/**
-@page RequirementsDCMathSegmentMaker Requirements
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonClusterSegmentMakerTools/src/MuonClusterSegmentFinder.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonClusterSegmentMakerTools/src/MuonClusterSegmentFinder.cxx
index d5694b1d07cbbba7b1d78fef9a03888b3d97c38c..2a4305f37768f2d05d696da1a4df2a6692703810 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonClusterSegmentMakerTools/src/MuonClusterSegmentFinder.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonClusterSegmentMakerTools/src/MuonClusterSegmentFinder.cxx
@@ -164,7 +164,7 @@ return (fabs(i.z()) < fabs(j.z()));}
     std::vector<const Muon::MuonSegment*>* segs = new std::vector<const Muon::MuonSegment*>;
     
     if (doTGCClust) { 
-      const Muon::TgcPrepDataContainer* tgcPrds = new Muon::TgcPrepDataContainer;
+      const Muon::TgcPrepDataContainer* tgcPrds = new Muon::TgcPrepDataContainer(0); //Isn't this memory leak?
       const std::string keyTgc ("TGC_Measurements");
       if ( evtStore()->contains<Muon::TgcPrepDataContainer>(keyTgc) && evtStore()->retrieve(tgcPrds,keyTgc).isFailure()) {
         ATH_MSG_WARNING("Cannot retrieve TgcPrepDataContainer " << keyTgc);
@@ -186,7 +186,7 @@ return (fabs(i.z()) < fabs(j.z()));}
     }//end if TGC
 
     if (doRPCClust) {
-      const Muon::RpcPrepDataContainer* rpcPrds = new Muon::RpcPrepDataContainer;
+      const Muon::RpcPrepDataContainer* rpcPrds = new Muon::RpcPrepDataContainer(0); //Isn't this memory leak?
       const std::string keyRpc ("RPC_Measurements");
       if ( evtStore()->contains<Muon::RpcPrepDataContainer>(keyRpc) && evtStore()->retrieve(rpcPrds,keyRpc).isFailure()) {
         ATH_MSG_WARNING("Cannot retrieve RpcPrepDataContainer " << keyRpc);
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonPatternSegmentMaker/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonPatternSegmentMaker/doc/packagedoc.h
index d2ccfafe12d3e2ac0e15acb2d62f81c00db51496..9d06a2eb3de854419e986c2eac86510b0f163499 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonPatternSegmentMaker/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonPatternSegmentMaker/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section MuonPatternSegmentMaker_MuonPatternSegmentMakerReq Requirements
 
 
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/doc/packagedoc.h
index be4b3b7f5cc9c507b3f9380d0eec9b22cbd7090f..b05d24df76416aaadf3e10807b9f7f358d54500a 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentCleaner/doc/packagedoc.h
@@ -17,16 +17,6 @@ This package contains tools that clean segments, e.g. outliers, delta electrons,
   - MuonPhiHitSelector: cleans Phi segments from outliers, build rio's, competing rio's (ambiguous hits) and perform clusterization
   - MuonSegmentAmbiCleaner: solves TGC and RPC ambiguities, extrapolating MDT segments
 
-@ref used_MuonSegmentCleaner
 
-@ref requirements_MuonSegmentCleaner
 
 */
-
-/**
-@page used_MuonSegmentCleaner Used Packages
-*/
-
-/**
-@page requirements_MuonSegmentCleaner Requirements
-*/
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMakerToolInterfaces/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMakerToolInterfaces/doc/packagedoc.h
index ba64b2d94c72004edff51fb35a02108561d44df3..4dc6eca02aef81ff399ec02f30097874958a4d69 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMakerToolInterfaces/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMakerToolInterfaces/doc/packagedoc.h
@@ -25,15 +25,4 @@ The following interface are available:
 
 @section MuonSegmentMakerToolInterfaces_ExtrasMuonRecToolInterfaces Extra Pages
 
- - @ref UsedMuonRecToolInterfaces
- - @ref RequirementsMuonRecToolInterfaces
-*/
-
-
-/**
-@page UsedMuonRecToolInterfaces Used Packages
-*/
-
-/**
-@page RequirementsMuonRecToolInterfaces Requirements
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/src/MuonSegmentMatchingTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/src/MuonSegmentMatchingTool.cxx
index e7fcce49523c6b990064b9b2d23a46799c3a8cb6..bda8b6e272dd3997c1d760f5f5fa9e5ae0eb230f 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/src/MuonSegmentMatchingTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMatchingTools/src/MuonSegmentMatchingTool.cxx
@@ -16,22 +16,6 @@
 #include <cmath>
 #include <iostream>
 
-namespace {
-  // limit angle difference to -pi < x <= pi
-  inline double limit_angle_2pi(double x) {
-    while ( x <= -M_PI ) x += 2.0 * M_PI;
-    while ( x >  +M_PI ) x -= 2.0 * M_PI;
-    return x;
-  }
-
-  inline double robust_acos(double x) {
-    if ( x >= +1.0 ) return 0.0;
-    if ( x <= -1.0 ) return M_PI;
-    return std::acos(x);
-  }
-  
-} // unnamed namespace
-
 
 namespace Muon {
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/doc/packagedoc.h
index 4fa8ade499374615973c753bcb3c6304e6e9a2a7..d357957997951465fa320faa996cc0bb70702533 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonSegmentMakers/MuonSegmentMakerTools/MuonSegmentMomentum/doc/packagedoc.h
@@ -16,16 +16,6 @@ This tool fits a momentum to a vector of segments or 2 segments using a curved t
 
   - MuonSegmentMomentum: calculates a momentum estimate for segments, 2 methods, one for 2 segments, one for a vector 
 
-@ref used_MuonSegmentMomentum
 
-@ref requirements_MuonSegmentMomentum
 
 */
-
-/**
-@page used_MuonSegmentMomentum Used Packages
-*/
-
-/**
-@page requirements_MuonSegmentMomentum Requirements
-*/
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/doc/packagedoc.h b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/doc/packagedoc.h
index 8b690893972148f1fca58519996d7135adc468cc..1b6743b5a578c673dc65262366ada06d2a725b89 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/doc/packagedoc.h
@@ -14,15 +14,4 @@ starting from MuonSegmentCombinations. It uses a combination of extrapolation +
  	
 @section MuonSegmentTrackMaker_ExtrasMuonSegmentTrackMaker Extra Pages
 
- - @ref UsedMuonSegmentTrackMaker
- - @ref RequirementsMuonSegmentTrackMaker
-*/
-
-/**
-@page UsedMuonSegmentTrackMaker Used Packages
-*/
-
-/**
-@page RequirementsMuonSegmentTrackMaker Requirements
-
 */
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx
index 199a4aafea8e2a27d37dbe50c7e0d11e51c97666..427462516b82ed4fd45aa2913ebdc852ce3cc6e5 100755
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerTools/MuonTrackFinderTools/src/MuonTrackScoringTool.cxx
@@ -37,8 +37,8 @@ namespace Muon {
     m_summaryTypeScore[Trk::numberOfPixelSharedHits]  = -10;  // a shared hit is only half the weight
     m_summaryTypeScore[Trk::numberOfPixelHoles]	      = -10;  // a hole is bad
 
-    m_summaryTypeScore[Trk::numberOfBLayerHits]	      =  10;  // addition for being b-layer
-    m_summaryTypeScore[Trk::numberOfBLayerSharedHits] =  -5;  // a shared hit is only half the weight
+    m_summaryTypeScore[Trk::numberOfInnermostPixelLayerHits]	      =  10;  // addition for being b-layer
+    m_summaryTypeScore[Trk::numberOfInnermostPixelLayerSharedHits] =  -5;  // a shared hit is only half the weight
 
     m_summaryTypeScore[Trk::numberOfGangedPixels]     =  -5;  // decrease for being ganged
 
diff --git a/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonDetailedTrackTruthMaker.h b/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonDetailedTrackTruthMaker.h
index d89160dc40d450f4b1a937d4e8f604ff1ae86742..32866939b3eeff59e6eaa28231fea3c2e8a3592c 100755
--- a/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonDetailedTrackTruthMaker.h
+++ b/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonDetailedTrackTruthMaker.h
@@ -11,9 +11,15 @@
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
 #include "StoreGate/StoreGateSvc.h"
+#include "StoreGate/WriteHandleKeyArray.h"
+#include "StoreGate/ReadHandleKeyArray.h"
 
 #include "TrkToolInterfaces/IDetailedTrackTruthBuilder.h"
 
+#include "TrkTrack/TrackCollection.h"
+#include "TrkTruthData/PRD_MultiTruthCollection.h"
+#include "TrkTruthData/DetailedTrackTruthCollection.h"
+
 /**
  * This algorithm produces track truth data using Muon PRD truth collections.
  * Calls a DetailedTrackTruthBuilder tool that does the actual job.
@@ -32,13 +38,13 @@ public:
   
 private:
   // PRD truth maps in any order
-  std::vector<std::string> m_PRD_TruthNames;
+  SG::ReadHandleKeyArray<PRD_MultiTruthCollection> m_PRD_TruthNames;
 
   // Track input
-  std::vector<std::string> m_trackCollectionNames;
+  SG::ReadHandleKeyArray<TrackCollection> m_trackCollectionNames;
 
   // DetailedTrackTruthCollection output
-  std::vector<std::string> m_detailedTrackTruthNames;
+  SG::WriteHandleKeyArray<DetailedTrackTruthCollection> m_detailedTrackTruthNames;
 
   // Tool Handle for truth tool
   ToolHandle<Trk::IDetailedTrackTruthBuilder> m_truthTool;
diff --git a/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonPRD_MultiTruthMaker.h b/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonPRD_MultiTruthMaker.h
index f30b8c00787e083e1e98b97236c51afcea16451f..bfeef3cf36c672da5c17a938de0a78f3466e5259 100755
--- a/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonPRD_MultiTruthMaker.h
+++ b/MuonSpectrometer/MuonTruthAlgs/MuonTruthAlgs/MuonPRD_MultiTruthMaker.h
@@ -14,11 +14,16 @@
 
 #include "MuonPrepRawData/MuonPrepDataCollection.h"
 #include "MuonPrepRawData/MuonPrepDataContainer.h"
+#include "MuonPrepRawData/MMPrepDataContainer.h"
+#include "MuonPrepRawData/sTgcPrepDataContainer.h"
 #include "MuonSimData/MuonSimDataCollection.h"
 #include "MuonSimData/MuonSimData.h"
+#include "MuonSimData/CscSimDataCollection.h"
 
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 //#include "InDetTruthInterfaces/IPRD_MultiTruthBuilder.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
 
 class MuonPRD_MultiTruthMaker : public AthAlgorithm  {
   
@@ -31,51 +36,53 @@ public:
   
 private:
 
-  std::string m_MDT_ContainerName;
-  std::string m_CSC_ContainerName;
-  std::string m_RPC_ContainerName;
-  std::string m_TGC_ContainerName;
-  std::string m_STGC_ContainerName;
-  std::string m_MM_ContainerName;
-
-  std::string m_MDT_SimDataMapName;
-  std::string m_CSC_SimDataMapName;
-  std::string m_RPC_SimDataMapName;
-  std::string m_TGC_SimDataMapName;
-  std::string m_STGC_SimDataMapName;
-  std::string m_MM_SimDataMapName;
-
-  std::string m_MDT_PRD_TruthName;
-  std::string m_CSC_PRD_TruthName;
-  std::string m_RPC_PRD_TruthName;
-  std::string m_TGC_PRD_TruthName;
-  std::string m_STGC_PRD_TruthName;
-  std::string m_MM_PRD_TruthName;
+  SG::ReadHandleKey<Muon::MdtPrepDataContainer> m_MDT_ContainerName;
+  SG::ReadHandleKey<Muon::CscPrepDataContainer> m_CSC_ContainerName;
+  SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_RPC_ContainerName;
+  SG::ReadHandleKey<Muon::TgcPrepDataContainer> m_TGC_ContainerName;
+  SG::ReadHandleKey<Muon::sTgcPrepDataContainer> m_STGC_ContainerName;
+  SG::ReadHandleKey<Muon::MMPrepDataContainer> m_MM_ContainerName;
+
+  SG::ReadHandleKey<MuonSimDataCollection> m_MDT_SimDataMapName;
+  SG::ReadHandleKey<CscSimDataCollection> m_CSC_SimDataMapName;
+  SG::ReadHandleKey<MuonSimDataCollection> m_RPC_SimDataMapName;
+  SG::ReadHandleKey<MuonSimDataCollection> m_TGC_SimDataMapName;
+  SG::ReadHandleKey<MuonSimDataCollection> m_STGC_SimDataMapName;
+  SG::ReadHandleKey<MuonSimDataCollection> m_MM_SimDataMapName;
+
+  SG::WriteHandleKey<PRD_MultiTruthCollection> m_MDT_PRD_TruthName;
+  SG::WriteHandleKey<PRD_MultiTruthCollection> m_CSC_PRD_TruthName;
+  SG::WriteHandleKey<PRD_MultiTruthCollection> m_RPC_PRD_TruthName;
+  SG::WriteHandleKey<PRD_MultiTruthCollection> m_TGC_PRD_TruthName;
+  SG::WriteHandleKey<PRD_MultiTruthCollection> m_STGC_PRD_TruthName;
+  SG::WriteHandleKey<PRD_MultiTruthCollection> m_MM_PRD_TruthName;
 
   //ToolHandle<InDet::IPRD_MultiTruthBuilder> m_PRDTruthTool;
 
   //----------------------------------------------------------------
   template < class PrepDataContainer, class SIMDATACOLLECTION > 
-  StatusCode buildPRD_Truth(const std::string& prepDataKey, const std::string& sdoKey, const std::string& outputKey);
+    StatusCode buildPRD_Truth(SG::ReadHandleKey<PrepDataContainer> prepDataKey, 
+			      SG::ReadHandleKey<SIMDATACOLLECTION> sdoKey, 
+			      SG::WriteHandleKey<PRD_MultiTruthCollection> outputKey);
 
   template<class PRD_Container_Iterator, class SIMDATACOLLECTION >
-  void addPRDCollections(PRD_MultiTruthCollection* prdTruth,
-       PRD_Container_Iterator collections_begin,
-       PRD_Container_Iterator collections_end,
-       const SIMDATACOLLECTION* simDataMap);
+    void addPRDCollections(SG::WriteHandle<PRD_MultiTruthCollection> prdTruth,
+			   PRD_Container_Iterator collections_begin,
+			   PRD_Container_Iterator collections_end,
+			   SG::ReadHandle<SIMDATACOLLECTION> simDataMap);
     
   template<class PRD_Collection_Iterator, class SIMDATACOLLECTION >
-  void addPRDRange (PRD_MultiTruthCollection* prdTruth,
-        PRD_Collection_Iterator range_begin,
-        PRD_Collection_Iterator range_end,
-        const SIMDATACOLLECTION* simDataMap);
+    void addPRDRange (SG::WriteHandle<PRD_MultiTruthCollection> prdTruth,
+		      PRD_Collection_Iterator range_begin,
+		      PRD_Collection_Iterator range_end,
+		      SG::ReadHandle<SIMDATACOLLECTION> simDataMap);
 
 
   // An analogue of this comes from a tool in InDet
   template < class SIMDATACOLLECTION >
-  void addPrepRawDatum(PRD_MultiTruthCollection *prdTruth,
-             const Trk::PrepRawData* prd,
-             const SIMDATACOLLECTION* simDataMap);
+    void addPrepRawDatum(SG::WriteHandle<PRD_MultiTruthCollection> prdTruth,
+			 const Trk::PrepRawData* prd,
+			 SG::ReadHandle<SIMDATACOLLECTION> simDataMap);
 
 };
 
diff --git a/MuonSpectrometer/MuonTruthAlgs/doc/packagedoc.h b/MuonSpectrometer/MuonTruthAlgs/doc/packagedoc.h
index 43d306c229574e483d060555e367a3ff90d21516..b88ce1e7fa7e28bb3bb0a4dc353db865edd79568 100644
--- a/MuonSpectrometer/MuonTruthAlgs/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonTruthAlgs/doc/packagedoc.h
@@ -19,16 +19,6 @@ tracking interface Trk::IDetailedTrackTruthBuilder.
   
 @see Trk::IDetailedTrackTruthBuilder
 
-@ref used_MuonTruthAlgs
 
-@ref requirements_MuonTruthAlgs
 
 */
-
-/**
-@page used_MuonTruthAlgs Used Packages
-*/
-
-/**
-@page requirements_MuonTruthAlgs Requirements
-*/
\ No newline at end of file
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonDetailedTrackTruthMaker.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonDetailedTrackTruthMaker.cxx
index 92b3374f5264a47ffc71f9d3d1cc028f3384a6a8..96fd8aee4ce4f8d158000e1ea6f5ba9e5064fcc5 100755
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonDetailedTrackTruthMaker.cxx
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonDetailedTrackTruthMaker.cxx
@@ -6,9 +6,6 @@
 // A. Gaponenko, 2006
 
 #include "MuonTruthAlgs/MuonDetailedTrackTruthMaker.h"
-#include "TrkTruthData/PRD_MultiTruthCollection.h"
-#include "TrkTruthData/DetailedTrackTruthCollection.h"
-#include "TrkTrack/TrackCollection.h"
 #include <iterator>
 
 //================================================================
@@ -21,24 +18,24 @@ MuonDetailedTrackTruthMaker::MuonDetailedTrackTruthMaker(const std::string &name
   // Inputs
   declareProperty("TrackCollectionNames",     m_trackCollectionNames );
   m_trackCollectionNames.reserve(9);
-  m_trackCollectionNames.push_back("MuonSpectrometerTracks");
-  m_trackCollectionNames.push_back("MooreTracks");
-  m_trackCollectionNames.push_back("ConvertedMBoyMuonSpectroOnlyTracks");
-  m_trackCollectionNames.push_back("ConvertedMBoyTracks");
-  m_trackCollectionNames.push_back("MuidExtrapolatedTracks");
-  m_trackCollectionNames.push_back("ExtrapolatedMuonSpectrometerTracks");
-  m_trackCollectionNames.push_back("Combined_Tracks");
-  m_trackCollectionNames.push_back("CombinedFitMuonTracks");
-  m_trackCollectionNames.push_back("ConvertedMuIdCBTracks");
-  m_trackCollectionNames.push_back("ConvertedMuIdExtrTracks");
-  m_trackCollectionNames.push_back("ConvertedStacoTracks");
-  m_trackCollectionNames.push_back("MuGirlRefittedTracks");
+  m_trackCollectionNames.emplace_back("MuonSpectrometerTracks");
+  m_trackCollectionNames.emplace_back("MooreTracks");
+  m_trackCollectionNames.emplace_back("ConvertedMBoyMuonSpectroOnlyTracks");
+  m_trackCollectionNames.emplace_back("ConvertedMBoyTracks");
+  m_trackCollectionNames.emplace_back("MuidExtrapolatedTracks");
+  m_trackCollectionNames.emplace_back("ExtrapolatedMuonSpectrometerTracks");
+  m_trackCollectionNames.emplace_back("Combined_Tracks");
+  m_trackCollectionNames.emplace_back("CombinedFitMuonTracks");
+  m_trackCollectionNames.emplace_back("ConvertedMuIdCBTracks");
+  m_trackCollectionNames.emplace_back("ConvertedMuIdExtrTracks");
+  m_trackCollectionNames.emplace_back("ConvertedStacoTracks");
+  m_trackCollectionNames.emplace_back("MuGirlRefittedTracks");
 
   declareProperty("PRD_TruthNames",          m_PRD_TruthNames);
-  m_PRD_TruthNames.push_back("CSC_TruthMap");
-  m_PRD_TruthNames.push_back("RPC_TruthMap");
-  m_PRD_TruthNames.push_back("TGC_TruthMap");
-  m_PRD_TruthNames.push_back("MDT_TruthMap");
+  m_PRD_TruthNames.emplace_back("CSC_TruthMap");
+  m_PRD_TruthNames.emplace_back("RPC_TruthMap");
+  m_PRD_TruthNames.emplace_back("TGC_TruthMap");
+  m_PRD_TruthNames.emplace_back("MDT_TruthMap");
 
 
   // Output
@@ -60,16 +57,14 @@ StatusCode MuonDetailedTrackTruthMaker::initialize()
   }
 
   m_detailedTrackTruthNames.reserve ( m_trackCollectionNames.size());
-  std::vector<std::string >::const_iterator it = m_trackCollectionNames.begin(), itEnd = m_trackCollectionNames.end();
-  for ( ; it!=itEnd ; ++it)
-    m_detailedTrackTruthNames.push_back(*it+"Truth");
-  
-  msg(MSG::INFO) << " processing: ";
-  std::vector<std::string>::const_iterator ikeyt = m_detailedTrackTruthNames.begin();
-  for(std::vector<std::string>::const_iterator ikey = m_trackCollectionNames.begin(); ikey != m_trackCollectionNames.end(); ikey++,++ikeyt) {
-    msg(MSG::INFO) << "  " << *ikey << "  " << *ikeyt;
+  for(unsigned int i=0;i<m_trackCollectionNames.size();i++){
+    m_detailedTrackTruthNames.emplace_back(m_trackCollectionNames.at(i).key()+"Truth");
+    ATH_MSG_INFO("process "<<m_trackCollectionNames.at(i).key()<<" for detailed truth collection "<<m_detailedTrackTruthNames.at(i).key());
   }
-  msg(MSG::INFO) << endmsg;
+
+  ATH_CHECK(m_trackCollectionNames.initialize());
+  ATH_CHECK(m_PRD_TruthNames.initialize());
+  ATH_CHECK(m_detailedTrackTruthNames.initialize());
   
   //----------------
   return StatusCode::SUCCESS;
@@ -86,49 +81,36 @@ StatusCode MuonDetailedTrackTruthMaker::finalize()
 StatusCode MuonDetailedTrackTruthMaker::execute() {
   ATH_MSG_DEBUG( "MuonDetailedTrackTruthMaker::execute()");
 
-  StatusCode sc;
-
   //----------------------------------------------------------------
   // Retrieve prep raw data truth
   std::vector<const PRD_MultiTruthCollection*> prdCollectionVector;
-  for(std::vector<std::string>::const_iterator ikey = m_PRD_TruthNames.begin(); ikey != m_PRD_TruthNames.end(); ikey++) {
-    prdCollectionVector.push_back(0);
-    sc = evtStore()->retrieve(*prdCollectionVector.rbegin(), *ikey);
-    if (!sc.isSuccess()){
-      ATH_MSG_WARNING(  "PRD_MultiTruthCollection "<<*ikey<<" NOT found");
-    } else {
-      ATH_MSG_DEBUG( "Got PRD_MultiTruthCollection "<<*ikey);
+  for(SG::ReadHandle<PRD_MultiTruthCollection>& col : m_PRD_TruthNames.makeHandles()){
+    if(!col.isPresent()) continue;
+    if(!col.isValid()){
+      ATH_MSG_WARNING("invalid PRD_MultiTruthCollection "<<col.name());
+      return StatusCode::FAILURE;
     }
+    prdCollectionVector.push_back(col.cptr());
   }
 
   //----------------------------------------------------------------
   // Retrieve track collections
-  unsigned int i=0;
-  std::vector<std::string>::const_iterator it = m_trackCollectionNames.begin(), itEnd = m_trackCollectionNames.end();
-  for ( ; it!=itEnd ; ++it, ++i) {
-
-    const TrackCollection *tracks = 0;
-    if (evtStore()->contains<TrackCollection>(*it) && evtStore()->retrieve(tracks, *it).isSuccess()){
-      ATH_MSG_DEBUG( "Got TrackCollection "<<*it );
-    } else {
-      ATH_MSG_VERBOSE( "TrackCollection "<<*it<<" NOT found");
-      continue;
+  int i=0;
+  for(SG::ReadHandle<TrackCollection>& tcol : m_trackCollectionNames.makeHandles()){
+    if(!tcol.isValid()){
+      ATH_MSG_WARNING("invalid TrackCollection "<<tcol.name());
+      return StatusCode::FAILURE;
     }
+    if(!tcol.isPresent()) continue;
 
     //----------------------------------------------------------------
     // Produce and store the output.
 
-    DetailedTrackTruthCollection *dttc = new DetailedTrackTruthCollection(tracks);
-    m_truthTool->buildDetailedTrackTruth(dttc, *tracks, prdCollectionVector);
-
-    sc=evtStore()->record(dttc, m_detailedTrackTruthNames[i], false);
-    if (sc.isFailure()) {
-      ATH_MSG_WARNING( "DetailedTrackTruthCollection '" << m_detailedTrackTruthNames[i] << "' could not be registered in StoreGate !" );
-      return StatusCode::SUCCESS;
-    } else {
-      ATH_MSG_DEBUG("DetailedTrackTruthCollection '" << m_detailedTrackTruthNames[i]
-        << "' is registered in StoreGate, size="<<dttc->size() );
-    }
+    SG::WriteHandle<DetailedTrackTruthCollection> dttc(m_detailedTrackTruthNames.at(i));
+    ATH_CHECK(dttc.record(std::make_unique<DetailedTrackTruthCollection>()));
+    dttc->setTrackCollection(tcol.cptr());
+    m_truthTool->buildDetailedTrackTruth(dttc.ptr(), *(tcol.cptr()), prdCollectionVector);
+    i++;
   }
   return StatusCode::SUCCESS;
 }
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonPRD_MultiTruthMaker.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonPRD_MultiTruthMaker.cxx
index ce3d998b5741759c00d957ad294fd7744e176b7b..5480db5ff2de33e5abbb4291525f481a05e51117 100755
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonPRD_MultiTruthMaker.cxx
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonPRD_MultiTruthMaker.cxx
@@ -6,74 +6,67 @@
 // A. Gaponenko, 2006
 
 #include "MuonTruthAlgs/MuonPRD_MultiTruthMaker.h"
-#include "TrkTruthData/PRD_MultiTruthCollection.h"
 
 #include "Identifier/Identifier.h"
 
-#include "MuonPrepRawData/MuonPrepDataCollection.h"
-#include "MuonPrepRawData/MuonPrepDataContainer.h"
-#include "MuonPrepRawData/MMPrepDataContainer.h"
-#include "MuonPrepRawData/sTgcPrepDataContainer.h"
 #include "MuonReadoutGeometry/MuonDetectorManager.h"
 #include "MuonGeoModel/DetectorElement.h"
-#include "MuonSimData/MuonSimDataCollection.h"
-#include "MuonSimData/CscSimDataCollection.h"
 
 #include <iterator>
 #include <typeinfo>
 
-#include <ext/functional>
+//#include <ext/functional>
 
 //================================================================
 MuonPRD_MultiTruthMaker::MuonPRD_MultiTruthMaker(const std::string &name, ISvcLocator *pSvcLocator) :
-  AthAlgorithm(name,pSvcLocator),
-  m_MDT_ContainerName("MDT_DriftCircles"),
-  m_CSC_ContainerName("CSC_Clusters"),
-  m_RPC_ContainerName("RPC_Measurements"),
-  m_TGC_ContainerName("TGC_Measurements"),
-  m_STGC_ContainerName("STGC_Measurements"),
-  m_MM_ContainerName("MM_Measurements"),
-  m_MDT_SimDataMapName("MDT_SDO"),
-  m_CSC_SimDataMapName("CSC_SDO"),
-  m_RPC_SimDataMapName("RPC_SDO"),
-  m_TGC_SimDataMapName("TGC_SDO"),
-  m_STGC_SimDataMapName("STGC_SDO"),
-  m_MM_SimDataMapName("MM_SDO"),
-  m_MDT_PRD_TruthName("MDT_TruthMap"),
-  m_CSC_PRD_TruthName("CSC_TruthMap"),
-  m_RPC_PRD_TruthName("RPC_TruthMap"),
-  m_TGC_PRD_TruthName("TGC_TruthMap"),
-  m_STGC_PRD_TruthName("STGC_TruthMap"),
-  m_MM_PRD_TruthName("MM_TruthMap")
+  AthAlgorithm(name,pSvcLocator)
 {
   // Input
-    declareProperty("MDT_PrepRawDataContainer",   m_MDT_ContainerName);
-    declareProperty("CSC_PrepRawDataContainer",   m_CSC_ContainerName);
-    declareProperty("RPC_PrepRawDataContainer",   m_RPC_ContainerName);
-    declareProperty("TGC_PrepRawDataContainer",   m_TGC_ContainerName);
-    declareProperty("STGC_PrepRawDataContainer",  m_STGC_ContainerName);
-    declareProperty("MM_PrepRawDataContainer",    m_MM_ContainerName);
-
-    declareProperty("MDT_SDO_Container",          m_MDT_SimDataMapName);
-    declareProperty("CSC_SDO_Container",          m_CSC_SimDataMapName);
-    declareProperty("RPC_SDO_Container",          m_RPC_SimDataMapName);
-    declareProperty("TGC_SDO_Container",          m_TGC_SimDataMapName);
-    declareProperty("STGC_SDO_Container",         m_STGC_SimDataMapName);
-    declareProperty("MM_SDO_Container",           m_MM_SimDataMapName);
+    declareProperty("MDT_PrepRawDataContainer",   m_MDT_ContainerName="MDT_DriftCircles");
+    declareProperty("CSC_PrepRawDataContainer",   m_CSC_ContainerName="CSC_Clusters");
+    declareProperty("RPC_PrepRawDataContainer",   m_RPC_ContainerName="RPC_Measurements");
+    declareProperty("TGC_PrepRawDataContainer",   m_TGC_ContainerName="TGC_Measurements");
+    declareProperty("STGC_PrepRawDataContainer",  m_STGC_ContainerName="STGC_Measurements");
+    declareProperty("MM_PrepRawDataContainer",    m_MM_ContainerName="MM_Measurements");
+
+    declareProperty("MDT_SDO_Container",          m_MDT_SimDataMapName="MDT_SDO");
+    declareProperty("CSC_SDO_Container",          m_CSC_SimDataMapName="CSC_SDO");
+    declareProperty("RPC_SDO_Container",          m_RPC_SimDataMapName="RPC_SDO");
+    declareProperty("TGC_SDO_Container",          m_TGC_SimDataMapName="TGC_SDO");
+    declareProperty("STGC_SDO_Container",         m_STGC_SimDataMapName="STGC_SDO");
+    declareProperty("MM_SDO_Container",           m_MM_SimDataMapName="MM_SDO");
 
   // Output
-    declareProperty("MDT_PRD_TruthContainer",     m_MDT_PRD_TruthName);
-    declareProperty("CSC_PRD_TruthContainer",     m_CSC_PRD_TruthName);
-    declareProperty("RPC_PRD_TruthContainer",     m_RPC_PRD_TruthName);
-    declareProperty("TGC_PRD_TruthContainer",     m_TGC_PRD_TruthName);
-    declareProperty("STGC_PRD_TruthContainer",    m_STGC_PRD_TruthName);
-    declareProperty("MM_PRD_TruthContainer",      m_MM_PRD_TruthName);
+    declareProperty("MDT_PRD_TruthContainer",     m_MDT_PRD_TruthName="MDT_TruthMap");
+    declareProperty("CSC_PRD_TruthContainer",     m_CSC_PRD_TruthName="CSC_TruthMap");
+    declareProperty("RPC_PRD_TruthContainer",     m_RPC_PRD_TruthName="RPC_TruthMap");
+    declareProperty("TGC_PRD_TruthContainer",     m_TGC_PRD_TruthName="TGC_TruthMap");
+    declareProperty("STGC_PRD_TruthContainer",    m_STGC_PRD_TruthName="STGC_TruthMap");
+    declareProperty("MM_PRD_TruthContainer",      m_MM_PRD_TruthName="MM_TruthMap");
 }
 
 //================================================================
 StatusCode MuonPRD_MultiTruthMaker::initialize()
 {
   ATH_MSG_DEBUG( "MuonPRD_MultiTruthMaker::initialize()" );
+  ATH_CHECK(m_MDT_ContainerName.initialize());
+  ATH_CHECK(m_CSC_ContainerName.initialize());
+  ATH_CHECK(m_RPC_ContainerName.initialize());
+  ATH_CHECK(m_TGC_ContainerName.initialize());
+  ATH_CHECK(m_STGC_ContainerName.initialize());
+  ATH_CHECK(m_MM_ContainerName.initialize());
+  ATH_CHECK(m_MDT_SimDataMapName.initialize());
+  ATH_CHECK(m_CSC_SimDataMapName.initialize());
+  ATH_CHECK(m_RPC_SimDataMapName.initialize());
+  ATH_CHECK(m_TGC_SimDataMapName.initialize());
+  ATH_CHECK(m_STGC_SimDataMapName.initialize());
+  ATH_CHECK(m_MM_SimDataMapName.initialize());
+  ATH_CHECK(m_MDT_PRD_TruthName.initialize());
+  ATH_CHECK(m_CSC_PRD_TruthName.initialize());
+  ATH_CHECK(m_RPC_PRD_TruthName.initialize());
+  ATH_CHECK(m_TGC_PRD_TruthName.initialize());
+  ATH_CHECK(m_STGC_PRD_TruthName.initialize());
+  ATH_CHECK(m_MM_PRD_TruthName.initialize());
   return StatusCode::SUCCESS;
 }
 
@@ -106,54 +99,42 @@ StatusCode MuonPRD_MultiTruthMaker::execute() {
 
 //================================================================
 template<class PrepDataContainer, class SIMDATACOLLECTION>
-StatusCode MuonPRD_MultiTruthMaker::buildPRD_Truth(const std::string& prepDataKey, const std::string& sdoKey, const std::string& outputKey) {
-    if(!prepDataKey.empty() && !sdoKey.empty() && !outputKey.empty()) {
+StatusCode MuonPRD_MultiTruthMaker::buildPRD_Truth(SG::ReadHandleKey<PrepDataContainer> prepDataKey, 
+						   SG::ReadHandleKey<SIMDATACOLLECTION> sdoKey, 
+						   SG::WriteHandleKey<PRD_MultiTruthCollection> outputKey) {
       
-      if( !evtStore()->contains<SIMDATACOLLECTION>(sdoKey) ) {
-	ATH_MSG_DEBUG( "SimDataCollection for key="<<sdoKey << " not in storegate, not adding it ");
-	return StatusCode::SUCCESS;
-      }
-        const PrepDataContainer *prdContainer(0);
-
-        if( ! evtStore()->retrieve(prdContainer, prepDataKey).isSuccess() ) {
-             ATH_MSG_DEBUG( "Prep data container NOT found: key="<<prepDataKey<<", type "<<typeid(PrepDataContainer).name());
-        } else{
-             ATH_MSG_DEBUG( "Retrieved prep data container: key="<<prepDataKey<<", type "<<typeid(PrepDataContainer).name());
-
-      // Retrieve SDO map SimDataCollection this event
-            const SIMDATACOLLECTION *simDataMap(0);
-            if(!evtStore()->retrieve(simDataMap, sdoKey).isSuccess()) {
-                 ATH_MSG_DEBUG( "Could NOT find the MuonSimDataMap map key="<<sdoKey);
-            } else {
-                 ATH_MSG_DEBUG( "Retrieved SimDataCollection for key="<<sdoKey);
-
-    // Create and fill the PRD truth structure
-                PRD_MultiTruthCollection *output = new PRD_MultiTruthCollection;
-                addPRDCollections(output, prdContainer->begin(), prdContainer->end(), simDataMap);
-
-    // And register it with the StoreGate
-                bool allow_modifications;
-                if(! evtStore()->record(output, outputKey, allow_modifications=false).isSuccess()) {
-                     ATH_MSG_WARNING( "PRD truth structure '" << outputKey
-                        << "' could not be registered in StoreGate !" );
-                    return StatusCode::SUCCESS;
-                } else {
-                     ATH_MSG_DEBUG( "PRD truth structure '" << outputKey
-                        << "' is registered in StoreGate, size="<<output->size() );
-                }
-            }
-        } 
-    }
-
+  SG::ReadHandle<SIMDATACOLLECTION> simDataMap(sdoKey);
+  if( !simDataMap.isPresent() ) {
+    ATH_MSG_DEBUG( "SimDataCollection for key="<<sdoKey.key() << " not in storegate, not adding it ");
     return StatusCode::SUCCESS;
+  }
+
+  if(!simDataMap.isValid()){
+    ATH_MSG_ERROR("Could not read "<<sdoKey.key());
+    return StatusCode::FAILURE;
+  }
+
+  SG::ReadHandle<PrepDataContainer> prdContainer(prepDataKey);
+  if(!prdContainer.isValid()){
+    ATH_MSG_ERROR("Could not read "<<prepDataKey.key());
+    return StatusCode::FAILURE;
+  }
+
+  // Create and fill the PRD truth structure
+  ATH_MSG_DEBUG("make PRD truth for "<<outputKey.key());
+  SG::WriteHandle<PRD_MultiTruthCollection> output(outputKey);
+  ATH_CHECK(output.record(std::make_unique<PRD_MultiTruthCollection>()));
+  addPRDCollections(output, prdContainer->begin(), prdContainer->end(), simDataMap);
+
+  return StatusCode::SUCCESS;
 }
 
 //================================================================
 template<class PRD_Container_Iterator, class SIMDATACOLLECTION>
-void MuonPRD_MultiTruthMaker::addPRDCollections(PRD_MultiTruthCollection* prdTruth,
-    PRD_Container_Iterator collections_begin,
-    PRD_Container_Iterator collections_end,
-    const SIMDATACOLLECTION* simDataMap)
+void MuonPRD_MultiTruthMaker::addPRDCollections(SG::WriteHandle<PRD_MultiTruthCollection> prdTruth,
+						PRD_Container_Iterator collections_begin,
+						PRD_Container_Iterator collections_end,
+						SG::ReadHandle<SIMDATACOLLECTION> simDataMap)
 {
     for (PRD_Container_Iterator colNext=collections_begin; colNext != collections_end; ++colNext) {
         addPRDRange(prdTruth, (*colNext)->begin(), (*colNext)->end(), simDataMap);
@@ -163,10 +144,10 @@ void MuonPRD_MultiTruthMaker::addPRDCollections(PRD_MultiTruthCollection* prdTru
 //================================================================
 // Adds PRDs in the range to prdTruth.
 template<class PRD_Collection_Iterator, class SIMDATACOLLECTION>
-void MuonPRD_MultiTruthMaker::addPRDRange (PRD_MultiTruthCollection* prdTruth,
-    PRD_Collection_Iterator range_begin,
-    PRD_Collection_Iterator range_end,
-    const SIMDATACOLLECTION* simDataMap) 
+void MuonPRD_MultiTruthMaker::addPRDRange (SG::WriteHandle<PRD_MultiTruthCollection> prdTruth,
+					   PRD_Collection_Iterator range_begin,
+					   PRD_Collection_Iterator range_end,
+					   SG::ReadHandle<SIMDATACOLLECTION> simDataMap) 
 {
     for (PRD_Collection_Iterator nextDatum = range_begin; nextDatum != range_end; nextDatum++){
         addPrepRawDatum(prdTruth, *nextDatum, simDataMap);
@@ -175,14 +156,11 @@ void MuonPRD_MultiTruthMaker::addPRDRange (PRD_MultiTruthCollection* prdTruth,
 
 //================================================================
 template <class SIMDATACOLLECTION>
-void MuonPRD_MultiTruthMaker::addPrepRawDatum(PRD_MultiTruthCollection *prdTruth,
-    const Trk::PrepRawData* prd,
-    const SIMDATACOLLECTION* simDataMap
+void MuonPRD_MultiTruthMaker::addPrepRawDatum(SG::WriteHandle<PRD_MultiTruthCollection> prdTruth,
+					      const Trk::PrepRawData* prd,
+					      SG::ReadHandle<SIMDATACOLLECTION> simDataMap
     )
 {
-    if(!prdTruth || !prd || !simDataMap) {
-        return;
-    }
     ATH_MSG_VERBOSE( "addPrepRawDatum(): new PRD "<<prd<<", id="<<prd->identify()<<", number of RDOs: " << prd->rdoList().size() );
 
     bool gotSDO = false;
@@ -214,14 +192,10 @@ void MuonPRD_MultiTruthMaker::addPrepRawDatum(PRD_MultiTruthCollection *prdTruth
       // But may be not for the typically small RDO/PRD ratio.
                     typedef PRD_MultiTruthCollection::iterator truthiter;
                     std::pair<truthiter, truthiter> r = prdTruth->equal_range(prd->identify());
-      // FIXME: Is it OK to use the gcc (SGI) extensions of the STL?
-                    if(r.second == std::find_if(r.first, r.second, 
-                        __gnu_cxx::compose1(std::bind2nd(std::equal_to<HepMcParticleLink>(), particleLink), 
-                        __gnu_cxx::select2nd<PRD_MultiTruthCollection::value_type>() 
-                        )
-                        )
-                        )
-                    {
+		    if(r.second == std::find_if(r.first, r.second, 
+                          [ particleLink ](const PRD_MultiTruthCollection::value_type &prd_to_truth) {
+                             return prd_to_truth.second == particleLink;
+                          } )) {
                         prdTruth->insert(std::make_pair(prd->identify(), particleLink));
                     }
                 }
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonSegmentTruthAssociationAlg.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonSegmentTruthAssociationAlg.cxx
index d7044ffeea04c8f04988d59ba714385420e5ae00..ebf26623db914a071f147d12653b11a5672a6b3c 100644
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonSegmentTruthAssociationAlg.cxx
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonSegmentTruthAssociationAlg.cxx
@@ -9,12 +9,11 @@
 
 #include "MuonSegmentTruthAssociationAlg.h"
 #include "xAODMuon/MuonSegment.h"
-#include "xAODMuon/MuonSegmentContainer.h"
 #include "xAODMuon/MuonSegmentAuxContainer.h"
 #include "xAODTruth/TruthParticleContainer.h"
 #include "xAODTruth/TruthParticleAuxContainer.h"
 #include "MuonSegment/MuonSegment.h"
-
+#include "StoreGate/WriteDecorHandle.h"
 
 namespace Muon {
 
@@ -25,9 +24,9 @@ namespace Muon {
     m_printer("Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"),
     m_muonTrackTruthTool("Muon::MuonTrackTruthTool/MuonTrackTruthTool")
   {  
-    declareProperty("MuonTruthSegmentName",m_muonTruthSegmentContainerName = "MuonTruthSegments" );
-    declareProperty("MuonSegmentLocation", m_muonSegmentCollectionName = "MuonSegments" );
-    declareProperty("BarcodeOffset",       m_barcodeOffset = 1000000 );
+    declareProperty("MuonTruthSegmentName",m_muonTruthSegmentContainerName = "MuonTruthSegments","muon truth segment container name" );
+    declareProperty("MuonSegmentLocation", m_muonSegmentCollectionName = "MuonSegments" ,"muon segment container name");
+    declareProperty("BarcodeOffset",       m_barcodeOffset = 1000000 ,"barcode offset for matching truth particles");
   }
 
   // Initialize method:
@@ -36,6 +35,10 @@ namespace Muon {
     ATH_CHECK(m_idHelper.retrieve());
     ATH_CHECK(m_printer.retrieve());
     ATH_CHECK(m_muonTrackTruthTool.retrieve());
+    m_muonTruthSegmentContainerName=m_muonTruthSegmentContainerName.key()+".recoSegmentLink";
+    m_muonSegmentCollectionName=m_muonSegmentCollectionName.key()+".truthSegmentLink";
+    ATH_CHECK(m_muonTruthSegmentContainerName.initialize());
+    ATH_CHECK(m_muonSegmentCollectionName.initialize());
     return StatusCode::SUCCESS;
   }
   // Finalize method:
@@ -49,30 +52,45 @@ namespace Muon {
   {
     
     // skip if no input data found
-    if ( !evtStore()->contains<xAOD::MuonSegmentContainer>(m_muonTruthSegmentContainerName) ) return StatusCode::SUCCESS;
-    if ( !evtStore()->contains<xAOD::MuonSegmentContainer>( m_muonSegmentCollectionName ) )   return StatusCode::SUCCESS;
-
-    const xAOD::MuonSegmentContainer* muonTruthSegments = 0;
-    ATH_CHECK(evtStore()->retrieve(muonTruthSegments,m_muonTruthSegmentContainerName ));
-    ATH_MSG_DEBUG("Retrieved SegmentContainer " << m_muonTruthSegmentContainerName << " size " << muonTruthSegments->size());
+    SG::WriteDecorHandle<xAOD::MuonSegmentContainer,ElementLink< xAOD::MuonSegmentContainer > > muonTruthSegments(m_muonTruthSegmentContainerName);
+    SG::WriteDecorHandle<xAOD::MuonSegmentContainer,ElementLink< xAOD::MuonSegmentContainer > > segments(m_muonSegmentCollectionName);
+    if(!muonTruthSegments.isPresent()){
+      ATH_MSG_DEBUG("No muon truth segments");
+      return StatusCode::SUCCESS;
+    }
+    if(!segments.isPresent()){
+      ATH_MSG_DEBUG("No muon segments");
+      return StatusCode::SUCCESS;
+    }
+    if(!muonTruthSegments.isValid()){ 
+      ATH_MSG_WARNING("Muon truth segments not valid");
+      return StatusCode::FAILURE;
+    }
+    if(!segments.isValid()){
+      ATH_MSG_WARNING("Muon segments not valid");
+      return StatusCode::FAILURE;
+    }
 
-    const xAOD::MuonSegmentContainer* segments = 0;
-    ATH_CHECK(evtStore()->retrieve(segments,m_muonSegmentCollectionName));
-    ATH_MSG_DEBUG("Retrieved SegmentContainer " << m_muonSegmentCollectionName << " size " << segments->size() );
+    std::string truthSegmentContainerName=m_muonTruthSegmentContainerName.key();
+    int ppos=truthSegmentContainerName.find(".");
+    truthSegmentContainerName=truthSegmentContainerName.substr(0,ppos);
+    std::string segmentCollectionName=m_muonSegmentCollectionName.key();
+    ppos=segmentCollectionName.find(".");
+    segmentCollectionName=segmentCollectionName.substr(0,ppos);
 
     std::vector<const Muon::MuonSegment*> muonSegments;
     typedef std::map<const Muon::MuonSegment*, ElementLink< xAOD::MuonSegmentContainer > > MuonSegmentLinkMap;
     MuonSegmentLinkMap muonSegmentLinkMap;
     unsigned int segIndex = 0;
     muonSegments.reserve(segments->size());
-    for( auto seg : *segments ){
-      seg->auxdecor< ElementLink< xAOD::MuonSegmentContainer > >("truthSegmentLink") = ElementLink< xAOD::MuonSegmentContainer >();
+    for( const auto seg : *segments ){
+      segments(*seg)=ElementLink< xAOD::MuonSegmentContainer >();
       if( seg->muonSegment().isValid() ) {
         const Muon::MuonSegment* mseg = dynamic_cast<const Muon::MuonSegment*>(*seg->muonSegment());
         if( mseg ) {
           ATH_MSG_DEBUG(" Reco segment " << m_printer->print(*mseg));
           muonSegments.push_back(mseg);
-          muonSegmentLinkMap[mseg] = ElementLink< xAOD::MuonSegmentContainer >(m_muonSegmentCollectionName,segIndex);
+          muonSegmentLinkMap[mseg] = ElementLink< xAOD::MuonSegmentContainer >(segmentCollectionName,segIndex);
         }
       }
       ++segIndex;
@@ -85,8 +103,9 @@ namespace Muon {
     std::map<Muon::MuonStationIndex::ChIndex, std::vector<ElementLink< xAOD::MuonSegmentContainer> > > chamberTruthSegmentLinks;
     segIndex = 0;
     for( auto const& truthSegment : *muonTruthSegments ){
+      muonTruthSegments(*truthSegment)=ElementLink< xAOD::MuonSegmentContainer >();
       std::vector<ElementLink< xAOD::MuonSegmentContainer> >& linkVec = chamberTruthSegmentLinks[truthSegment->chamberIndex()];
-      linkVec.push_back(ElementLink< xAOD::MuonSegmentContainer >(m_muonTruthSegmentContainerName,segIndex));
+      linkVec.push_back(ElementLink< xAOD::MuonSegmentContainer >(truthSegmentContainerName,segIndex));
       ATH_MSG_DEBUG("New truth segment: index " << segIndex << " " << Muon::MuonStationIndex::chName(truthSegment->chamberIndex()) 
                     << " nlinks " << linkVec.size() << " link " << *linkVec.back() );
       ++segIndex;
@@ -173,8 +192,8 @@ namespace Muon {
           ATH_MSG_DEBUG("Matched reconstructed segment: barcode " << barcode << " layer " << Muon::MuonStationIndex::chName(chIndex) );
           recoLink.toPersistent();
           truthLink.toPersistent();
-          truthSegment->auxdecor< ElementLink< xAOD::MuonSegmentContainer > >("recoSegmentLink") = recoLink;
-          recoSegment->auxdecor< ElementLink< xAOD::MuonSegmentContainer > >("truthSegmentLink") = truthSegLink;
+	  muonTruthSegments(*truthSegment)=recoLink;
+	  segments(*recoSegment)=truthSegLink;
         } else { 
           ATH_MSG_DEBUG("barcode mismatch " << barcode << " truthParticle->barcode " << truthParticle->barcode());
         }
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonSegmentTruthAssociationAlg.h b/MuonSpectrometer/MuonTruthAlgs/src/MuonSegmentTruthAssociationAlg.h
index 4720e13c6f54e9a34618f81519560177388930f3..f09d9fe8e8abb944cb210aa4a1382753f262c97f 100644
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonSegmentTruthAssociationAlg.h
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonSegmentTruthAssociationAlg.h
@@ -17,6 +17,9 @@
 #include "MuonRecToolInterfaces/IMuonTrackTruthTool.h"
 #include "MuonRecHelperTools/MuonEDMPrinterTool.h"
 
+#include "xAODMuon/MuonSegmentContainer.h"
+#include "StoreGate/WriteDecorHandleKey.h"
+
 namespace Muon {
 
 class MuonSegmentTruthAssociationAlg : public AthAlgorithm  {
@@ -34,8 +37,8 @@ private:
   ToolHandle<Muon::MuonIdHelperTool>    m_idHelper;
   ToolHandle<Muon::MuonEDMPrinterTool>  m_printer;
   ToolHandle<Muon::IMuonTrackTruthTool> m_muonTrackTruthTool;
-  std::string m_muonTruthSegmentContainerName;
-  std::string m_muonSegmentCollectionName;
+  SG::WriteDecorHandleKey<xAOD::MuonSegmentContainer> m_muonTruthSegmentContainerName;
+  SG::WriteDecorHandleKey<xAOD::MuonSegmentContainer> m_muonSegmentCollectionName;
   int m_barcodeOffset;
 };
 
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.cxx
index 6d61c5b79adc4302c13ce542092d74736703888b..ef816de11ce615b237eebe98e2cc2cffea9635f3 100644
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.cxx
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.cxx
@@ -13,117 +13,106 @@
 #include "TrkMeasurementBase/MeasurementBase.h"
 #include "TrkRIO_OnTrack/RIO_OnTrack.h"
 #include "MuonCompetingRIOsOnTrack/CompetingMuonClustersOnTrack.h"
+#include "StoreGate/WriteDecorHandle.h"
 
 // Constructor with parameters:
 MuonTruthAssociationAlg::MuonTruthAssociationAlg(const std::string &name, ISvcLocator *pSvcLocator) :
   AthAlgorithm(name,pSvcLocator),
   m_idHelper("Muon::MuonIdHelperTool/MuonIdHelperTool")
-{  
-    
-    // Get parameter values from jobOptions file
-    declareProperty("MuonTruthParticleContainerName", m_muonTruthParticleContainerName = "MuonTruthParticles");
-    declareProperty("MuonContainerName"             , m_muonName = "Muons");
-    declareProperty("AssociateWithInDetTP"          , m_associateWithInDetTP = false); // hack: set true for conversion from release 17
-    declareProperty("BarcodeOffset"                 , m_barcodeOffset = 1000000 );
-}
+{}
 
 // Initialize method:
 StatusCode MuonTruthAssociationAlg::initialize()
 {
   ATH_CHECK(m_idHelper.retrieve());
+  m_muonTruthParticleContainerName=m_muonTruthParticleContainerName.key()+".recoMuonLink";
+  ATH_CHECK(m_muonTruthParticleContainerName.initialize());
+  m_muonTruthParticleLink=m_muonName+".truthParticleLink";
+  m_muonTruthParticleType=m_muonName+".truthType";
+  m_muonTruthParticleOrigin=m_muonName+".truthOrigin";
+  m_muonTruthParticleNPrecMatched=m_muonName+".nprecMatchedHitsPerChamberLayer";
+  m_muonTruthParticleNPhiMatched=m_muonName+".nphiMatchedHitsPerChamberLayer";
+  m_muonTruthParticleNTrigEtaMatched=m_muonName+".ntrigEtaMatchedHitsPerChamberLayer";
+  ATH_CHECK(m_muonTruthParticleLink.initialize());
+  ATH_CHECK(m_muonTruthParticleOrigin.initialize());
+  ATH_CHECK(m_muonTruthParticleType.initialize());
+  ATH_CHECK(m_muonTruthParticleNPrecMatched.initialize());
+  ATH_CHECK(m_muonTruthParticleNPhiMatched.initialize());
+  ATH_CHECK(m_muonTruthParticleNTrigEtaMatched.initialize());
   return StatusCode::SUCCESS;
 }
 
 // Execute method:
 StatusCode MuonTruthAssociationAlg::execute() 
 {
-    
-    // skip if no input data found
-    if ( !evtStore()->contains<xAOD::TruthParticleContainer>(m_muonTruthParticleContainerName) ) return StatusCode::SUCCESS;
-    if ( !evtStore()->contains<xAOD::MuonContainer>(m_muonName) ) return StatusCode::SUCCESS;
-
-    // retrieve Truth, exit if fails
-    const xAOD::TruthParticleContainer* truthContainer{0};
-    ATH_CHECK(evtStore()->retrieve(truthContainer,m_muonTruthParticleContainerName ));
 
-    // get muon container
-    const xAOD::MuonContainer* muons = 0;
-    ATH_CHECK(evtStore()->retrieve(muons, m_muonName));
+  SG::WriteDecorHandle<xAOD::TruthParticleContainer,ElementLink< xAOD::MuonContainer > > muonTruthParticleRecoLink(m_muonTruthParticleContainerName);
+  if(!muonTruthParticleRecoLink.isPresent()) return StatusCode::SUCCESS;
+  if(!muonTruthParticleRecoLink.isValid()){
+    ATH_MSG_WARNING("truth particle container not valid");
+    return StatusCode::FAILURE;
+  }
+  SG::WriteDecorHandle<xAOD::MuonContainer,ElementLink<xAOD::TruthParticleContainer> > muonTruthParticleLink(m_muonTruthParticleLink);
+  if(!muonTruthParticleLink.isPresent()) return StatusCode::SUCCESS;
+  if(!muonTruthParticleLink.isValid()){
+    ATH_MSG_WARNING("muon particle container not valid");
+    return StatusCode::FAILURE;
+  }
+  SG::WriteDecorHandle<xAOD::MuonContainer,int > muonTruthParticleType(m_muonTruthParticleType);
+  SG::WriteDecorHandle<xAOD::MuonContainer,int > muonTruthParticleOrigin(m_muonTruthParticleOrigin);
+  SG::WriteDecorHandle<xAOD::MuonContainer,std::vector<unsigned int> > muonTruthParticleNPrecMatched(m_muonTruthParticleNPrecMatched);
+  SG::WriteDecorHandle<xAOD::MuonContainer,std::vector<unsigned int> > muonTruthParticleNPhiMatched(m_muonTruthParticleNPhiMatched);
+  SG::WriteDecorHandle<xAOD::MuonContainer,std::vector<unsigned int> > muonTruthParticleNTrigEtaMatched(m_muonTruthParticleNTrigEtaMatched);
     
-    /////////DEBUG/////////
-    //list all reco muons
-    // ATH_MSG_DEBUG("All reco muons:");
-    // for( const auto & muon : *muons ){
-    //   ATH_MSG_DEBUG(" auth " <<  muon->author() <<" pt " << muon->pt() << " eta " << muon->eta() );
-    //   //xAOD::TrackParticle* tp  = const_cast<xAOD::TrackParticle*>(muon->primaryTrackParticle());
-    //   const xAOD::TrackParticle* tp  = muon->trackParticle(xAOD::Muon_v1::InnerDetectorTrackParticle);
-    //   if( !tp ) continue;
-    //   ATH_MSG_VERBOSE("  trackParticle pt " << tp->pt() << " eta " << tp->eta() );
-    //   if (!tp->isAvailable<ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink")) {
-    //     ATH_MSG_VERBOSE("  truthParticleLink not available for this track particle");
-    //     continue;
-    //   }
-    //   ElementLink<xAOD::TruthParticleContainer> truthLink = tp->auxdata<ElementLink<xAOD::TruthParticleContainer> >("truthParticleLink" );
-    //   if (!truthLink.isValid()) { 
-    //     ATH_MSG_VERBOSE("  Muon track particle has no truth association, skipping");
-    //     continue;
-    //   }
-    //   ATH_MSG_DEBUG("  truthParticleLink status " << (*truthLink)->status() << " barcode " << (*truthLink)->barcode() << " pt "<< (*truthLink)->pt() << " eta "<< (*truthLink)->eta());
-    // }
-    //////////////////////////
-
-
-    // add limk to reco muons and viceversa
-    addMuon(*truthContainer, *muons);
+  // add link to reco muons and viceversa
   
-    return StatusCode::SUCCESS;
-}
-
-void MuonTruthAssociationAlg::addMuon( const xAOD::TruthParticleContainer& truthParticles, const xAOD::MuonContainer& muons ) {
-    
   // loop over muons 
-  for( const auto& muon : muons ){
-    // use primary track particle to get the truth link
-    //xAOD::TrackParticle* tp = const_cast<xAOD::TrackParticle*>(muon->primaryTrackParticle());
-    //// hack: when converting from release 17, these truth links are absent (must fix); use the inDetParticle instead
+  int muonInd=0;
+  for( const auto& muon : *muonTruthParticleLink ){
+    // use primary track particle to get the truth link (except for the case of STACO, where we must use the ID track particle, as the combined is not truth-matched)
     const xAOD::TrackParticle* tp(0);
     if (m_associateWithInDetTP || muon->author()==2) {
-      tp = muon->trackParticle(xAOD::Muon_v1::InnerDetectorTrackParticle);
+      tp = muon->trackParticle(xAOD::Muon::InnerDetectorTrackParticle);
     } 
     else{
-      tp = const_cast<xAOD::TrackParticle*>(muon->primaryTrackParticle());
+      //tp = const_cast<xAOD::TrackParticle*>(muon->primaryTrackParticle());
+      tp=muon->primaryTrackParticle();
     }
     
     if( !tp ){
-      setDummyTruthInfo(*muon);
+      muonTruthParticleLink(*muon)=ElementLink<xAOD::TruthParticleContainer>();
+      muonTruthParticleOrigin(muonInd)=-99999;
+      muonTruthParticleType(muonInd)=-99999;
+      //add these empty vectors
+      std::vector<unsigned int> nprecHitsPerChamberLayer;
+      std::vector<unsigned int> nphiHitsPerChamberLayer;
+      std::vector<unsigned int> ntrigEtaHitsPerChamberLayer;
+      muonTruthParticleNPrecMatched(muonInd)=nprecHitsPerChamberLayer;
+      muonTruthParticleNPhiMatched(muonInd)=nphiHitsPerChamberLayer;
+      muonTruthParticleNTrigEtaMatched(muonInd)=ntrigEtaHitsPerChamberLayer;
       continue;
     }
     
-    // special case for STACO muons where the combined TP is not truth matched
-    if( muon->muonType() == xAOD::Muon::Combined && !tp->track() ){
-      tp = const_cast<xAOD::TrackParticle*>(*muon->inDetTrackParticleLink());
-    }
-      
     // Associate reco with truth muon. Loop over reconstructed muons, get track particle for each one. 
     //Each track particle should carry a link to the corresponding truth particle. Then compare this truth particle link with the given truth muon particle
     try {
       ElementLink< xAOD::TruthParticleContainer > truthLink = tp->auxdata<ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink");
       if( truthLink.isValid() ){
 	// loop over truth particles
-	for( const auto& truthParticle : truthParticles ){
-	  if( truthParticle->status() != 1 ) continue;   
+	for( const auto& truthParticle : *muonTruthParticleRecoLink ){
+	  if( truthParticle->status() != 1 ) continue;
 	  ATH_MSG_DEBUG("Adding recoMuonLink for truth muon with barcode " << truthParticle->barcode() << " pt "<< truthParticle->pt());
 	  ElementLink< xAOD::MuonContainer > muonLink;
 	  
 	  if( ((*truthLink)->barcode())%m_barcodeOffset == truthParticle->barcode() ) {
 	    ATH_MSG_VERBOSE(" Got truth link -> creating link with truth particle " << (*truthLink)->barcode() );
-	    muonLink = ElementLink< xAOD::MuonContainer >(muon,muons);
+	    muonLink = ElementLink< xAOD::MuonContainer >(muon,*muonTruthParticleLink);
 	    // add the link from xAOD::Muon to TruthParticle in m_muonTruthParticleContainerName
-	    ElementLink< xAOD::TruthParticleContainer > muonTruthLink = ElementLink< xAOD::TruthParticleContainer >(truthParticle, truthParticles);
+	    ElementLink< xAOD::TruthParticleContainer > muonTruthLink = ElementLink< xAOD::TruthParticleContainer >(truthParticle, *muonTruthParticleRecoLink);
 	    muonTruthLink.toPersistent();
-	    const_cast<xAOD::Muon&>(*muon).auxdata<ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink") = muonTruthLink;
-	    const_cast<xAOD::Muon&>(*muon).auxdata<int>("truthType") = tp->auxdata<int>("truthType");
-	    const_cast<xAOD::Muon&>(*muon).auxdata<int>("truthOrigin") = tp->auxdata<int>("truthOrigin");
+	    muonTruthParticleLink(*muon)=muonTruthLink;
+	    muonTruthParticleOrigin(muonInd)=tp->auxdata<int>("truthType");
+	    muonTruthParticleType(muonInd)=tp->auxdata<int>("truthOrigin");
 	    if(muon->author()==1 || muon->author()==5 || muon->author()==6){ //only match hits for muons with MS tracks
 	      if(!truthParticle->isAvailable<std::vector<unsigned long long> >("truthMdtHits")){
 		ATH_MSG_DEBUG("muon with author "<<muon->author()<<" has no truth hits vector in the truth association alg");
@@ -283,32 +272,43 @@ void MuonTruthAssociationAlg::addMuon( const xAOD::TruthParticleContainer& truth
 		    }
 		  }
 		}
-		const_cast<xAOD::Muon&>(*muon).auxdata<std::vector<unsigned int> >("nprecMatchedHitsPerChamberLayer")=nprecHitsPerChamberLayer;
-		const_cast<xAOD::Muon&>(*muon).auxdata<std::vector<unsigned int> >("nphiMatchedHitsPerChamberLayer")=nphiHitsPerChamberLayer;
-		const_cast<xAOD::Muon&>(*muon).auxdata<std::vector<unsigned int> >("ntrigEtaMatchedHitsPerChamberLayer")=ntrigEtaHitsPerChamberLayer;
+		muonTruthParticleNPrecMatched(muonInd)=nprecHitsPerChamberLayer;
+		muonTruthParticleNPhiMatched(muonInd)=nphiHitsPerChamberLayer;
+		muonTruthParticleNTrigEtaMatched(muonInd)=ntrigEtaHitsPerChamberLayer;
 	      }
 	    }
 	    muonLink.toPersistent();
-	    truthParticle->auxdecor<ElementLink< xAOD::MuonContainer > >("recoMuonLink") = muonLink;
+	    muonTruthParticleRecoLink(*truthParticle)=muonLink;
 	    break;
 	  }
 	}
       }
       else{ //no truth link, add a dummy
-	setDummyTruthInfo(*muon);
 	ATH_MSG_VERBOSE(" Reco muon has no truth association");
+	muonTruthParticleLink(*muon)=ElementLink<xAOD::TruthParticleContainer>();
+	muonTruthParticleOrigin(muonInd)=-99999;
+	muonTruthParticleType(muonInd)=-99999;
+	//add these empty vectors
+	std::vector<unsigned int> nprecHitsPerChamberLayer;
+	std::vector<unsigned int> nphiHitsPerChamberLayer;
+	std::vector<unsigned int> ntrigEtaHitsPerChamberLayer;
+	muonTruthParticleNPrecMatched(muonInd)=nprecHitsPerChamberLayer;
+	muonTruthParticleNPhiMatched(muonInd)=nphiHitsPerChamberLayer;
+	muonTruthParticleNTrigEtaMatched(muonInd)=ntrigEtaHitsPerChamberLayer;
       }
     }catch ( SG::ExcBadAuxVar& ) {
       ATH_MSG_WARNING("Track particle is missing truthParticleLink variable!");
     }
+    muonInd++;
   }
 
   //one more thing: need to have muonlink set for all truth particles to avoid ELReset errors
-  for( const auto& truthParticle : truthParticles ){
+  for( const auto& truthParticle : *muonTruthParticleRecoLink ){
     if(!truthParticle->isAvailable<ElementLink< xAOD::MuonContainer > >("recoMuonLink")){
-      truthParticle->auxdecor<ElementLink< xAOD::MuonContainer > >("recoMuonLink")=ElementLink< xAOD::MuonContainer > ();
+      muonTruthParticleRecoLink(*truthParticle)=ElementLink< xAOD::MuonContainer > ();
     }
   }
+    return StatusCode::SUCCESS;
 }
 
 // Finalize method:
@@ -317,15 +317,3 @@ StatusCode MuonTruthAssociationAlg::finalize()
     return StatusCode::SUCCESS;
 }
 
-void MuonTruthAssociationAlg::setDummyTruthInfo(const xAOD::Muon& muon){
-  const_cast<xAOD::Muon&>(muon).auxdata<ElementLink<xAOD::TruthParticleContainer> >("truthParticleLink" )=ElementLink<xAOD::TruthParticleContainer>();
-  const_cast<xAOD::Muon&>(muon).auxdata<int>("truthType") = -99999;
-  const_cast<xAOD::Muon&>(muon).auxdata<int>("truthOrigin") = -99999;
-  //add these empty vectors
-  std::vector<unsigned int> nprecHitsPerChamberLayer;
-  std::vector<unsigned int> nphiHitsPerChamberLayer;
-  std::vector<unsigned int> ntrigEtaHitsPerChamberLayer;
-  const_cast<xAOD::Muon&>(muon).auxdata<std::vector<unsigned int> >("nprecMatchedHitsPerChamberLayer")=nprecHitsPerChamberLayer;
-  const_cast<xAOD::Muon&>(muon).auxdata<std::vector<unsigned int> >("nphiMatchedHitsPerChamberLayer")=nphiHitsPerChamberLayer;
-  const_cast<xAOD::Muon&>(muon).auxdata<std::vector<unsigned int> >("ntrigEtaMatchedHitsPerChamberLayer")=ntrigEtaHitsPerChamberLayer;
-}
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.h b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.h
index 4f08442a7a8fd18b52049ca656c3feead4409dae..e77479aa1848e5a11c43720ab9c3c229fd6aa58d 100644
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.h
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthAssociationAlg.h
@@ -15,6 +15,7 @@
 #include "xAODTruth/TruthParticleContainer.h"
 #include "MuonIdHelpers/MuonIdHelperTool.h"
 #include "MuonIdHelpers/MuonStationIndex.h"
+#include "StoreGate/WriteDecorHandleKey.h"
 
 class MuonTruthAssociationAlg : public AthAlgorithm  {
 
@@ -28,15 +29,16 @@ public:
   virtual StatusCode finalize();
 
 private:
-  void addMuon( const xAOD::TruthParticleContainer& truthParticles, const xAOD::MuonContainer& muons );
-
-  void setDummyTruthInfo(const xAOD::Muon& muon);
-
-  std::string m_muonTruthParticleContainerName;
-  std::string m_muonName;
-
-  bool m_associateWithInDetTP;
-  int m_barcodeOffset;
+  Gaudi::Property<SG::WriteDecorHandleKey<xAOD::TruthParticleContainer> >m_muonTruthParticleContainerName{this,"MuonTruthParticleContainerName","MuonTruthParticles","container name for muon truth particles; the full handle name, including the reco muon link auxdata, is set in initialize()"};
+  Gaudi::Property<SG::WriteDecorHandleKey<xAOD::MuonContainer> >m_muonTruthParticleLink{this,"MuonTruthParticleLink","Muons.truthParticleLink","muon truth particle link auxdata name; name will be reset in initialize() based on m_muonName"};
+  Gaudi::Property<SG::WriteDecorHandleKey<xAOD::MuonContainer> >m_muonTruthParticleType{this,"MuonTruthParticleType","Muons.truthType","muon truth type auxdata name; name will be reset in initialize() based on m_muonName"};
+  Gaudi::Property<SG::WriteDecorHandleKey<xAOD::MuonContainer> >m_muonTruthParticleOrigin{this,"MuonTruthParticleOrigin","Muons.truthOrigin","muon truth origin auxdata name; name will be reset in initialize() based on m_muonName"};
+  Gaudi::Property<SG::WriteDecorHandleKey<xAOD::MuonContainer> >m_muonTruthParticleNPrecMatched{this,"MuonTruthParticleNPrecMatched","Muons.nprecMatchedHitsPerChamberLayer","muon vector of number of precision matched hits per chamber layer auxdata name; name will be reset in initialize() based on m_muonName"};
+  Gaudi::Property<SG::WriteDecorHandleKey<xAOD::MuonContainer> >m_muonTruthParticleNPhiMatched{this,"MuonTruthParticleNPhiMatched","Muons.nphiMatchedHitsPerChamberLayer","muon vector of number of phi matched hits per chamber layer auxdata name; name will be reset in initialize() based on m_muonName"};
+  Gaudi::Property<SG::WriteDecorHandleKey<xAOD::MuonContainer> >m_muonTruthParticleNTrigEtaMatched{this,"MuonTruthParticleNTrigEtaMatched","Muons.ntrigEtaMatchedHitsPerChamberLayer","muon vector of number of phi matched hits per chamber layer auxdata name; name will be reset in initialize() based on m_muonName"};
+  Gaudi::Property<std::string> m_muonName{this,"MuonContainerName","muons","muon container name"};
+  Gaudi::Property<bool>m_associateWithInDetTP{this,"AssociateWithInDetTP",false,"force use of ID track particles for association"};
+  Gaudi::Property<int>m_barcodeOffset{this,"BarcodeOffset",1000000 ,"barcode offset for truth particles"};
 
   ToolHandle<Muon::MuonIdHelperTool>    m_idHelper;
 };
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
index c7c6de2e15cd50dfe00c02a6ad882e7281570a35..3d1f3def14723226634aa3ee2d521a0704f8bb2b 100644
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.cxx
@@ -13,7 +13,6 @@
 #include "xAODTruth/TruthParticleContainer.h"
 #include "xAODTruth/TruthParticleAuxContainer.h"
 #include "MCTruthClassifier/IMCTruthClassifier.h"
-#include "GeneratorObjects/xAODTruthParticleLink.h"
 #include "GeneratorObjects/McEventCollection.h"
 #include "MuonSimData/MuonSimDataCollection.h"
 #include "MuonSimData/CscSimDataCollection.h"
@@ -37,33 +36,17 @@ namespace Muon {
     m_muonMgr(0)
   {  
     
-    m_trackRecordCollectionNames.push_back("CaloEntryLayer");
-    m_trackRecordCollectionNames.push_back("MuonEntryLayer");
-    m_trackRecordCollectionNames.push_back("MuonExitLayer");
-
     // Get parameter values from jobOptions file
     declareProperty("TruthParticleContainerName"    , m_truthParticleContainerName = "TruthParticles");
     declareProperty("MuonTruthParticleContainerName", m_muonTruthParticleContainerName = "MuonTruthParticles");
-    declareProperty("TrackRecordCollectionNames"    , m_trackRecordCollectionNames);
-
-    m_PRD_TruthNames.push_back("CSC_TruthMap");
-    m_PRD_TruthNames.push_back("RPC_TruthMap");
-    m_PRD_TruthNames.push_back("TGC_TruthMap");
-    m_PRD_TruthNames.push_back("MDT_TruthMap");
-    m_PRD_TruthNames.push_back("MM_TruthMap");
-    m_PRD_TruthNames.push_back("STGC_TruthMap");
+    declareProperty("MuonTruthSegmentName"          , m_muonTruthSegmentContainerName = "MuonTruthSegments" );
+    declareProperty("TrackRecordCollectionNames"    , m_trackRecordCollectionNames={"CaloEntryLayer","MuonEntryLayer","MuonExitLayer"});
 
-    declareProperty("PRD_TruthMaps",      m_PRD_TruthNames);
+    declareProperty("PRD_TruthMaps",m_PRD_TruthNames={"CSC_TruthMap","RPC_TruthMap","TGC_TruthMap","MDT_TruthMap","MM_TruthMap","STGC_TruthMap"});
 
     m_CSC_SDO_TruthNames = "CSC_SDO";
-    m_SDO_TruthNames.push_back("RPC_SDO");
-    m_SDO_TruthNames.push_back("TGC_SDO");
-    m_SDO_TruthNames.push_back("MDT_SDO");
-    m_SDO_TruthNames.push_back("MM_SDO");
-    m_SDO_TruthNames.push_back("STGC_SDO");
     declareProperty("CSCSDOs",   m_CSC_SDO_TruthNames);
-    declareProperty("SDOs",      m_SDO_TruthNames);
-    std::stable_sort(m_SDO_TruthNames.begin(),m_SDO_TruthNames.end());
+    declareProperty("SDOs",      m_SDO_TruthNames={"RPC_SDO","TGC_SDO","MDT_SDO","MM_SDO","STGC_SDO"});
 
     declareProperty("xAODTruthLinkVector",m_truthLinkVecName="xAODTruthLinks");
 
@@ -72,13 +55,20 @@ namespace Muon {
     declareProperty("MuonEDMPrinterTool",  m_printer);
     declareProperty("Extrapolator",        m_extrapolator);
     declareProperty("CreateTruthSegments", m_createTruthSegment = true );
-    declareProperty("MuonTruthSegmentName",m_muonTruthSegmentContainerName = "MuonTruthSegments" );
     declareProperty("BarcodeOffset",       m_barcodeOffset = 1000000 );
   }
 
   // Initialize method:
   StatusCode MuonTruthDecorationAlg::initialize()
   {
+    ATH_CHECK(m_truthParticleContainerName.initialize());
+    ATH_CHECK(m_muonTruthParticleContainerName.initialize());
+    ATH_CHECK(m_muonTruthSegmentContainerName.initialize());
+    ATH_CHECK(m_trackRecordCollectionNames.initialize());
+    ATH_CHECK(m_PRD_TruthNames.initialize());
+    ATH_CHECK(m_SDO_TruthNames.initialize());
+    ATH_CHECK(m_CSC_SDO_TruthNames.initialize());
+    ATH_CHECK(m_truthLinkVecName.initialize());
     ATH_CHECK(m_idHelper.retrieve());
     ATH_CHECK(m_printer.retrieve());
     ATH_CHECK(m_truthClassifier.retrieve());
@@ -96,96 +86,30 @@ namespace Muon {
   {
     
     // skip if no input data found
-    if ( !evtStore()->contains<xAOD::TruthParticleContainer>(m_truthParticleContainerName) ) return StatusCode::SUCCESS;
-
-    // retrieve Truth, exit if fails
-    const xAOD::TruthParticleContainer* truthContainer{0};
-    ATH_CHECK(evtStore()->retrieve(truthContainer,m_truthParticleContainerName ));
-    ATH_MSG_DEBUG("Retrieved TruthContainer " << m_truthParticleContainerName << " size " << truthContainer->size());
-    // retrieve TrackRecord info
-    std::vector< std::pair<const TrackRecordCollection*,std::string> > trackRecords;
-    for( const auto& name : m_trackRecordCollectionNames ){
-      if ( evtStore()->contains<TrackRecordCollection>(name) ) {
-	const TrackRecordCollection* col = 0;
-	if( evtStore()->retrieve(col,name ).isSuccess() ){
-	  if( col && !col->empty() ) {
-	    ATH_MSG_DEBUG("TrackRecordCollection retrieved at " << name);
-	    trackRecords.push_back( std::make_pair(col,name) );
-	  }
-	}
-      }
-    }
-
-    // retrieve PRD_MultiTruthCollection collections
-    std::vector<const PRD_MultiTruthCollection*> prdCollections;
-    for( const auto& name : m_PRD_TruthNames ){
-      if ( evtStore()->contains<PRD_MultiTruthCollection>(name) ) {
-	const PRD_MultiTruthCollection* col = 0;
-	if( evtStore()->retrieve(col, name).isSuccess()) {
-	  if( col && !col->empty() ) {
-	    ATH_MSG_DEBUG("PRD_MultiTruthCollection retrieved at " << name);
-	    prdCollections.push_back(col);
-	  }
-	}
-      }
+    SG::ReadHandle<xAOD::TruthParticleContainer> truthContainer(m_truthParticleContainerName);
+    if(!truthContainer.isPresent()) return StatusCode::SUCCESS;
+    if(!truthContainer.isValid()){
+      ATH_MSG_WARNING("truth container "<<truthContainer.name()<<" not valid");
+      return StatusCode::FAILURE;
     }
 
     // get truth links
-    const xAODTruthParticleLinkVector* truthParticleLinkVec = 0;
-    if(evtStore()->contains<xAODTruthParticleLinkVector>(m_truthLinkVecName)){
-      ATH_CHECK(evtStore()->retrieve(truthParticleLinkVec, m_truthLinkVecName));
+    SG::ReadHandle<xAODTruthParticleLinkVector> truthParticleLinkVec(m_truthLinkVecName);
+    if(!truthParticleLinkVec.isValid()){
+      ATH_MSG_WARNING("link vec container "<<truthParticleLinkVec.name()<<" not valid");
+      return StatusCode::FAILURE;
     }
 
 
     // create output container
-    xAOD::TruthParticleContainer* muonTruthContainer = new xAOD::TruthParticleContainer();
-    CHECK( evtStore()->record( muonTruthContainer, m_muonTruthParticleContainerName ) );
-    xAOD::TruthParticleAuxContainer* muonTruthAuxContainer = new xAOD::TruthParticleAuxContainer();
-    CHECK( evtStore()->record( muonTruthAuxContainer, m_muonTruthParticleContainerName + "Aux." ) );
-    muonTruthContainer->setStore( muonTruthAuxContainer );
+    SG::WriteHandle<xAOD::TruthParticleContainer> muonTruthContainer(m_muonTruthParticleContainerName);
+    ATH_CHECK(muonTruthContainer.record(std::make_unique<xAOD::TruthParticleContainer>(),std::make_unique<xAOD::TruthParticleAuxContainer>()));
     ATH_MSG_DEBUG( "Recorded TruthParticleContainer with key: " << m_muonTruthParticleContainerName );
 
-    // create segments
-    xAOD::MuonSegmentContainer* muonTruthSegments = 0;
-    std::vector<const MuonSimDataCollection*> sdoCollections(6);
-    const CscSimDataCollection* cscSdoCollection = 0;
-    if( m_createTruthSegment ){
-
-      muonTruthSegments = new xAOD::MuonSegmentContainer();
-      CHECK( evtStore()->record( muonTruthSegments, m_muonTruthSegmentContainerName ) );
-      xAOD::MuonSegmentAuxContainer* muonTruthSegmentAuxContainer = new xAOD::MuonSegmentAuxContainer();
-      CHECK( evtStore()->record( muonTruthSegmentAuxContainer, m_muonTruthSegmentContainerName + "Aux." ) );
-      muonTruthSegments->setStore( muonTruthSegmentAuxContainer );
-      ATH_MSG_DEBUG( "Recorded MuonSegmentContainer with key: " << m_muonTruthSegmentContainerName );
-      
-      // retrieve PRD_MultiTruthCollection collections
-      for( const auto& name : m_SDO_TruthNames ){
-	if ( evtStore()->contains<MuonSimDataCollection>(name) ) {
-	  const MuonSimDataCollection* col = 0;
-	  if( evtStore()->retrieve(col, name).isSuccess()) {
-	    if( col && !col->empty() ) {
-	      Identifier id = col->begin()->first;
-	      int index = m_idHelper->technologyIndex(id);
-              
-	      ATH_MSG_DEBUG("MuonSimDataCollection retrieved at " << name << " index " << index << " size " << col->size() << " tgcIndex " << m_idHelper->tgcIdHelper().technology(id));
-	      if( index >= (int)sdoCollections.size() ){
-		ATH_MSG_WARNING("SDO collection index out of range " << index << "  " << m_idHelper->toStringChamber(id) );
-	      }else{
-		sdoCollections[index] = col;
-	      }
-	    }
-	  }
-	}
-      }
-
-      std::string name = m_CSC_SDO_TruthNames;
-      if ( evtStore()->contains<CscSimDataCollection>(name) ) {
-	if( evtStore()->retrieve(cscSdoCollection, name).isSuccess()) {
-	  if( cscSdoCollection && !cscSdoCollection->empty() ) {
-	    ATH_MSG_DEBUG("CscSimDataCollection retrieved at " << name);
-	  }
-	}
-      }
+    SG::WriteHandle<xAOD::MuonSegmentContainer> segmentContainer(m_muonTruthSegmentContainerName);
+    if(m_createTruthSegment){
+      ATH_CHECK(segmentContainer.record(std::make_unique<xAOD::MuonSegmentContainer>(),std::make_unique<xAOD::MuonSegmentAuxContainer>()));
+      ATH_MSG_DEBUG( "Recorded MuonSegmentContainer with key: " << segmentContainer.name() );
     }
 
     // loop over truth coll
@@ -235,11 +159,11 @@ namespace Muon {
       }
 
       // add track records
-      addTrackRecords(*truthParticle,trackRecords,truth->prodVtx());
+      addTrackRecords(*truthParticle,truth->prodVtx());
       ChamberIdMap ids;
 
       // add hit counts
-      addHitCounts(*truthParticle,prdCollections,&ids);
+      addHitCounts(*truthParticle,&ids);
 
       //add hit ID vectors
       addHitIDVectors(*truthParticle,ids);
@@ -252,24 +176,40 @@ namespace Muon {
 
       // create segments
       if( m_createTruthSegment && goodMuon ){
-	createSegments(truthLink,ids,*muonTruthSegments,sdoCollections,cscSdoCollection);
+	createSegments(truthLink,segmentContainer,ids);
       }
     }
     
     ATH_MSG_DEBUG("Registered " << muonTruthContainer->size() << " truth muons ");
-    if( muonTruthSegments ) ATH_MSG_DEBUG("Registered " << muonTruthSegments->size() << " truth muon segments ");
-
+    if(m_createTruthSegment) ATH_MSG_DEBUG("Registered " << segmentContainer->size() << " truth muon segments ");
     
     return StatusCode::SUCCESS;
   }
   
-  void MuonTruthDecorationAlg::createSegments( const ElementLink< xAOD::TruthParticleContainer >& truthLink,
-                                               const MuonTruthDecorationAlg::ChamberIdMap& ids, 
-					       xAOD::MuonSegmentContainer& segmentContainer,
-					       const std::vector<const MuonSimDataCollection*>& sdoCollections,
-					       const CscSimDataCollection* cscCollection ) const {
-
-    bool useSDO =( !sdoCollections.empty() || cscCollection );
+  void MuonTruthDecorationAlg::createSegments( const ElementLink< xAOD::TruthParticleContainer >& truthLink, SG::WriteHandle<xAOD::MuonSegmentContainer> segmentContainer,
+                                               const MuonTruthDecorationAlg::ChamberIdMap& ids) const {
+
+    std::vector<SG::ReadHandle<MuonSimDataCollection> > sdoCollections(6);
+    for(const SG::ReadHandleKey<MuonSimDataCollection>& k : m_SDO_TruthNames){
+      SG::ReadHandle<MuonSimDataCollection> col(k);
+      if(!col.isPresent()){
+	ATH_MSG_DEBUG("MuonSimDataCollection "<<col.name()<<" not in StoreGate");
+	continue;
+      }
+      if(!col->empty()){
+	Identifier id = col->begin()->first;
+	int index = m_idHelper->technologyIndex(id);
+	if( index >= (int)sdoCollections.size() ){
+	  ATH_MSG_WARNING("SDO collection index out of range " << index << "  " << m_idHelper->toStringChamber(id) );
+	}
+	else{
+	  sdoCollections[index] = col;
+	}
+      }
+    }
+    SG::ReadHandle<CscSimDataCollection> cscCollection(m_CSC_SDO_TruthNames);
+    
+    bool useSDO =( !sdoCollections.empty() || cscCollection->size() );
     std::map<Muon::MuonStationIndex::ChIndex,int> matchMap;
     ATH_MSG_DEBUG(" Creating Truth segments " );
     // loop over chamber layers
@@ -318,7 +258,7 @@ namespace Muon {
 	  bool ok = false;
 	  if( !isCsc ){
 	    int index = m_idHelper->technologyIndex(id);
-	    if( index < (int)sdoCollections.size() && sdoCollections[index] != 0 ) {
+	    if( index < (int)sdoCollections.size() && sdoCollections[index]->size() != 0 ) {
 	      auto pos = sdoCollections[index]->find(id);
 	      if( pos != sdoCollections[index]->end() ) {
 		gpos = pos->second.globalPosition();
@@ -375,7 +315,7 @@ namespace Muon {
 		      << " eta trig layers " << static_cast<int>(ntrigEtaLayers) << " associated reco muon " << index
                       << " barcode " << (*truthLink)->barcode() << " truthLink " << truthLink );
 	xAOD::MuonSegment* segment = new xAOD::MuonSegment();
-	segmentContainer.push_back(segment);
+	segmentContainer->push_back(segment);
 	segment->setNHits(nprecLayers,nphiLayers,ntrigEtaLayers);
 	segment->auxdata< ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink") = truthLink;
 	if( chId.is_valid() ) {
@@ -400,7 +340,6 @@ namespace Muon {
   }
 
   void MuonTruthDecorationAlg::addTrackRecords( xAOD::TruthParticle& truthParticle, 
-                                                std::vector< std::pair<const TrackRecordCollection*,std::string> >& trackRecords,
                                                 const xAOD::TruthVertex* vertex ) const {
     
     // first loop over track records, store parameters at the different positions
@@ -409,8 +348,10 @@ namespace Muon {
     if( vertex ) parameters.push_back( std::make_pair(Amg::Vector3D(vertex->x(),vertex->y(),vertex->z()), 
                                                       Amg::Vector3D(truthParticle.px(),truthParticle.py(),truthParticle.pz())) );
 
-    for( const auto& col : trackRecords ){
-      const std::string name = col.second;
+    int icol=0;
+    for( SG::ReadHandle<TrackRecordCollection>& col : m_trackRecordCollectionNames.makeHandles() ){
+      if(!col.isPresent()) continue;
+      const std::string name = m_trackRecordCollectionNames.at(icol).key();
       float& x   = truthParticle.auxdata<float>(name+"_x");
       float& y   = truthParticle.auxdata<float>(name+"_y");
       float& z   = truthParticle.auxdata<float>(name+"_z");
@@ -440,7 +381,7 @@ namespace Muon {
       epz=-99999.;
       
       // loop over collection and find particle with the same bar code
-      for( const auto& particle : *col.first ){
+      for( const auto& particle : *col ){
       
         if( (particle.GetBarCode())%m_barcodeOffset != barcode ) continue;
         CLHEP::Hep3Vector pos = particle.GetPosition();
@@ -459,7 +400,7 @@ namespace Muon {
     
     // second loop, extrapolate between the points
     if( vertex &&  /// require vertex
-        parameters.size() == trackRecords.size()+1 && // logic assumes there is one more parameter than track records
+        parameters.size() == m_trackRecordCollectionNames.size()+1 && // logic assumes there is one more parameter than track records
         parameters.size() > 1 && // we need at least two parameters
         !m_extrapolator.empty() && m_extrapolator->trackingGeometry() // extrapolation needs to be setup correctly
         ){
@@ -475,7 +416,7 @@ namespace Muon {
         Trk::CurvilinearParameters pars(parameters[i].first,parameters[i].second,(truthParticle.pdgId() < 0) ? 1 : -1, new AmgSymMatrix(5)(cov) );
         // pick destination volume
         std::string vname;
-        std::string name = trackRecords[i].second;
+        std::string name = m_trackRecordCollectionNames.at(i).key();
         if( name == "CaloEntryLayer" )     vname = "InDet::Containers::InnerDetector";
         else if( name == "MuonEntryLayer") vname = "Calo::Container";
         else if( name == "MuonExitLayer")  vname = "Muon::Containers::MuonSystem";
@@ -526,11 +467,17 @@ namespace Muon {
         }
       }
     }
+    std::vector<float> emptyVec;
+    for( unsigned int i=0;i<m_trackRecordCollectionNames.size();i++){
+      const std::string name = m_trackRecordCollectionNames.at(i).key();
+      if(!truthParticle.isAvailable<std::vector<float> >(name+"_cov_extr")){
+	truthParticle.auxdata<std::vector<float> >(name+"_cov_extr")=emptyVec;
+      }
+    }
   }
 
 
   void MuonTruthDecorationAlg::addHitCounts( xAOD::TruthParticle& truthParticle, 
-					     const std::vector<const PRD_MultiTruthCollection*>& collections,
 					     MuonTruthDecorationAlg::ChamberIdMap* ids) const {
 
     int barcode = truthParticle.barcode();
@@ -541,10 +488,14 @@ namespace Muon {
     nphiHitsPerChamberLayer.resize(Muon::MuonStationIndex::PhiIndexMax);
     std::vector<unsigned int> ntrigEtaHitsPerChamberLayer;
     ntrigEtaHitsPerChamberLayer.resize(Muon::MuonStationIndex::PhiIndexMax);
-    ATH_MSG_DEBUG("addHitCounts: barcode " << barcode << " number of collections " << collections.size());
+    ATH_MSG_DEBUG("addHitCounts: barcode " << barcode);
     // loop over detector technologies
-    for( auto col : collections ){
-
+    for( SG::ReadHandle<PRD_MultiTruthCollection>& col : m_PRD_TruthNames.makeHandles() ){
+      if(!col.isPresent()){
+	ATH_MSG_DEBUG("PRD_MultiTruthCollection "<<col.name()<<" not in StoreGate");
+	continue;
+      }
+      else ATH_MSG_DEBUG("PRD_MultiTruthCollection "<<col.name()<<" in StoreGate");
       // loop over trajectories
       for( const auto& trajectory : *col ){
 
diff --git a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h
index cb8e02593c96f5757abcc32994dc2508bb9bb3e3..7dda6393a2d56e6c8e848be217174d1f83e2048a 100755
--- a/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h
+++ b/MuonSpectrometer/MuonTruthAlgs/src/MuonTruthDecorationAlg.h
@@ -29,6 +29,11 @@
 #include "xAODTruth/TruthVertex.h"
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 #include "xAODMuon/MuonSegmentContainer.h"
+#include "GeneratorObjects/xAODTruthParticleLink.h"
+
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+#include "StoreGate/WriteHandleKeyArray.h"
 
 class IMCTruthClassifier;
 class MuonSimDataCollection;
@@ -54,31 +59,26 @@ public:
   virtual StatusCode finalize();
 
 private:
-  void addTrackRecords( xAOD::TruthParticle& truthParticle, std::vector< std::pair<const TrackRecordCollection*,std::string> >& trackRecords,
-                        const xAOD::TruthVertex* vertex ) const;
-  void addHitCounts( xAOD::TruthParticle& truthParticle, const std::vector<const PRD_MultiTruthCollection*>& collections,
-		     ChamberIdMap* ids = 0 ) const;
+  void addTrackRecords( xAOD::TruthParticle& truthParticle, const xAOD::TruthVertex* vertex ) const;
+  void addHitCounts( xAOD::TruthParticle& truthParticle, ChamberIdMap* ids = 0 ) const;
   void addHitIDVectors( xAOD::TruthParticle& truthParticle, const MuonTruthDecorationAlg::ChamberIdMap& ids) const;
-  void createSegments( const ElementLink< xAOD::TruthParticleContainer >& truthLink,
-                       const MuonTruthDecorationAlg::ChamberIdMap& ids, 
-		       xAOD::MuonSegmentContainer& segmentContainer,
-		       const std::vector<const MuonSimDataCollection*>& sdoCollections,
-		       const CscSimDataCollection* cscCollection ) const;
-
-  std::string m_truthParticleContainerName;
-  std::string m_muonTruthParticleContainerName;
-  std::vector<std::string> m_trackRecordCollectionNames;
-  std::vector<std::string> m_PRD_TruthNames;
-  std::vector<std::string> m_SDO_TruthNames;
-  std::string              m_CSC_SDO_TruthNames;
-  std::string m_truthLinkVecName;
+  void createSegments( const ElementLink< xAOD::TruthParticleContainer >& truthLink,SG::WriteHandle<xAOD::MuonSegmentContainer> segmentContainer,
+                       const MuonTruthDecorationAlg::ChamberIdMap& ids) const;
+
+  SG::ReadHandleKey<xAOD::TruthParticleContainer> m_truthParticleContainerName;
+  SG::WriteHandleKey<xAOD::TruthParticleContainer> m_muonTruthParticleContainerName;
+  SG::WriteHandleKey<xAOD::MuonSegmentContainer> m_muonTruthSegmentContainerName;
+  SG::ReadHandleKeyArray<TrackRecordCollection> m_trackRecordCollectionNames;
+  SG::ReadHandleKeyArray<PRD_MultiTruthCollection> m_PRD_TruthNames;
+  SG::ReadHandleKeyArray<MuonSimDataCollection> m_SDO_TruthNames;
+  SG::ReadHandleKey<CscSimDataCollection> m_CSC_SDO_TruthNames;
+  SG::ReadHandleKey<xAODTruthParticleLinkVector> m_truthLinkVecName;
   ToolHandle<Muon::MuonIdHelperTool>    m_idHelper;
   ToolHandle<Muon::MuonEDMPrinterTool>  m_printer;
   ToolHandle<IMCTruthClassifier>        m_truthClassifier;
   ToolHandle<Trk::IExtrapolator>        m_extrapolator;
   const MuonGM::MuonDetectorManager * m_muonMgr;
   bool m_createTruthSegment;
-  std::string m_muonTruthSegmentContainerName;
   int m_barcodeOffset;
 };
 
diff --git a/MuonSpectrometer/MuonValidation/MuonCscValidation/CscClusterPerformance/doc/packagedoc.h b/MuonSpectrometer/MuonValidation/MuonCscValidation/CscClusterPerformance/doc/packagedoc.h
index 4c5c32e7f73e1cc1b778a1a3386e41e2b078288b..48ad6e8ad23be002f49dc228ce195405a04a3c85 100644
--- a/MuonSpectrometer/MuonValidation/MuonCscValidation/CscClusterPerformance/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonValidation/MuonCscValidation/CscClusterPerformance/doc/packagedoc.h
@@ -23,15 +23,5 @@ trees.
 
 @section CscClusterPerformance_AdditionalCscClusterPerformance Additional information
 
- - @ref UsedCscClusterPerformance
- - @ref RequirementsCscClusterPerformance
  - <a href=https://twiki.cern.ch/twiki/bin/view/Atlas/CscReconstruction>CSC reconstruction overview</a>
 */
-
-/**
-@page UsedCscClusterPerformance Used packages
-*/
-
-/**
-@page RequirementsCscClusterPerformance Requirements
-*/
diff --git a/MuonSpectrometer/MuonValidation/MuonCscValidation/CscSegmentPerformance/doc/packagedoc.h b/MuonSpectrometer/MuonValidation/MuonCscValidation/CscSegmentPerformance/doc/packagedoc.h
index 6f2a872dca1a3a21608ade821eaeace8abe18c31..416de64e0fd309f5df8d6a7c4b663b96d0a67ec1 100644
--- a/MuonSpectrometer/MuonValidation/MuonCscValidation/CscSegmentPerformance/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonValidation/MuonCscValidation/CscSegmentPerformance/doc/packagedoc.h
@@ -27,15 +27,5 @@ trees.
 
 @section CscSegmentPerformance_AdditionalCscSegmentPerformance Additional information
 
- - @ref UsedCscSegmentPerformance
- - @ref RequirementsCscSegmentPerformance
  - <a href=https://twiki.cern.ch/twiki/bin/view/Atlas/CscReconstruction>CSC reconstruction overview</a>
 */
-
-/**
-@page UsedCscSegmentPerformance Used packages
-*/
-
-/**
-@page RequirementsCscSegmentPerformance Requirements
-*/
diff --git a/MuonSpectrometer/MuonValidation/MuonCscValidation/CscValidationUtil/doc/packagedoc.h b/MuonSpectrometer/MuonValidation/MuonCscValidation/CscValidationUtil/doc/packagedoc.h
index 5885a72a05d9410017496b699930263a46e604de..84f82c8ccb430e5d4e2e5fd65f649f5cf60cff12 100644
--- a/MuonSpectrometer/MuonValidation/MuonCscValidation/CscValidationUtil/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonValidation/MuonCscValidation/CscValidationUtil/doc/packagedoc.h
@@ -30,16 +30,6 @@ PhysicsAnalysis/MuonID/MuonRootUtils.
 
 The atlas release macro and python accessor are in PhysicsAnalysis/MuonAtlasRelease.
 
- - @ref UsedCscValidationUtil
- - @ref RequirementsCscValidationUtil
  - <a href=https://twiki.cern.ch/twiki/bin/view/Atlas/CscReconstruction>CSC reconstruction overview</a>
  - <a href=https://twiki.cern.ch/twiki/bin/view/Atlas/MuPerf>MuPerf overview</a>
 */
-
-/**
-@page UsedCscValidationUtil Used packages
-*/
-
-/**
-@page RequirementsCscValidationUtil Requirements
-*/
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonPlots.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonPlots.cxx
index 583129a15683327a329b3b22ac6a494f316c61aa..bc100aadc2e2a50407cb9dee743b3f081b43b2c2 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonPlots.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/RecoMuonPlots.cxx
@@ -181,7 +181,7 @@ void RecoMuonPlots::fill(const xAOD::Muon& mu, xAOD::Muon::Quality my_quality){
   if (!mu.summaryValue(hitval_etaLayer3Hits,      xAOD::MuonSummaryType::etaLayer3Hits)) return; 
   if (!mu.summaryValue(hitval_etaLayer4Hits,      xAOD::MuonSummaryType::etaLayer4Hits)) return; 
 
-  if (!mu.summaryValue(hitval_numberOfBLayerHits, xAOD::SummaryType::numberOfBLayerHits)) return;
+  if (!mu.summaryValue(hitval_numberOfBLayerHits, xAOD::SummaryType::numberOfInnermostPixelLayerHits)) return;
   if (!mu.summaryValue(hitval_numberOfPixelHits,  xAOD::SummaryType::numberOfPixelHits))  return;
   if (!mu.summaryValue(hitval_numberOfSCTHits,    xAOD::SummaryType::numberOfSCTHits))    return;
   if (!mu.summaryValue(hitval_numberOfTRTHits,    xAOD::SummaryType::numberOfTRTHits))    return;
diff --git a/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/MuonHistUtils/SlowMuonParamPlots.h b/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/MuonHistUtils/SlowMuonParamPlots.h
index 978d9ed8585c78635f59f590478f200871ba1be8..293475ef58ee9f596cbf991acbafbd394cbe52a2 100644
--- a/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/MuonHistUtils/SlowMuonParamPlots.h
+++ b/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/MuonHistUtils/SlowMuonParamPlots.h
@@ -11,6 +11,26 @@
 
 namespace Muon{
 
+class BetaPlots: public PlotBase {
+ public:
+  BetaPlots(PlotBase *pParent, std::string sDir, std::string sDetType);
+
+  void fill(const xAOD::SlowMuon& smu);
+  
+  TH1* nHits;
+  TH1* avg;
+  TH1* chi2;
+  TH1* ndf;
+  TH1* chi2ndf;
+  TH1* chi2prob;
+  TH1* rms;
+
+ private:
+  std::string m_sDetType;
+  void initializePlots();
+
+};
+  
 class SlowMuonParamPlots: public PlotBase {
   public:
     SlowMuonParamPlots(PlotBase *pParent, std::string sDir);
@@ -18,6 +38,9 @@ class SlowMuonParamPlots: public PlotBase {
     void fill(const xAOD::SlowMuon& smu);
 
     TH1* beta;
+    BetaPlots mdtBeta;
+    BetaPlots rpcBeta;
+    BetaPlots caloBeta;
   
   private:
     void initializePlots();
diff --git a/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/Root/IDHitSummaryPlots.cxx b/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/Root/IDHitSummaryPlots.cxx
index f6d606ab82f4480818edd614f01dd277d7504fc1..8083df63c494dd9f1e50ed3098aa5757dc6ea24b 100644
--- a/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/Root/IDHitSummaryPlots.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/Root/IDHitSummaryPlots.cxx
@@ -42,8 +42,8 @@ void IDHitSummaryPlots::fill(const xAOD::TrackParticle& trk)
   float phi=trk.phi();
   
   uint8_t iBLayerHits(0),bExpectBLayerHit(0);
-  trk.summaryValue(bExpectBLayerHit,xAOD::expectBLayerHit);
-  trk.summaryValue(iBLayerHits,xAOD::numberOfBLayerHits);
+  trk.summaryValue(bExpectBLayerHit,xAOD::expectInnermostPixelLayerHit);
+  trk.summaryValue(iBLayerHits,xAOD::numberOfInnermostPixelLayerHits);
   nBLayerHitsIfExpected.fill(bExpectBLayerHit*iBLayerHits,eta,phi);
 
   uint8_t iPixHits(0),iPixDead(0);
diff --git a/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/Root/SlowMuonParamPlots.cxx b/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/Root/SlowMuonParamPlots.cxx
index 98446f1025ce6efa573d14006d2bb6fe19609029..d49f3886db1a6b9ad426ad000bc66f499a26136f 100644
--- a/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/Root/SlowMuonParamPlots.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonHistogramming/MuonHistUtils/Root/SlowMuonParamPlots.cxx
@@ -3,12 +3,81 @@
 */
 
 #include "MuonHistUtils/SlowMuonParamPlots.h"
+#include "TMath.h"
 
 namespace Muon{
-											   
+
+  BetaPlots::BetaPlots(PlotBase *pParent, std::string sDir, std::string sDetType)
+  :PlotBase(pParent, sDir)
+  , nHits(NULL)
+  , avg(NULL)
+  , chi2(NULL)
+  , ndf(NULL)
+  , chi2ndf(NULL)
+  , chi2prob(NULL)
+  , rms(NULL)
+  , m_sDetType(sDetType)
+{}
+void BetaPlots::initializePlots()
+{
+  nHits = Book1D( m_sDetType+"nHits", "; hits;Entries",20,0,20);
+  avg = Book1D( m_sDetType+"avg", "; avg;Entries",20,0,20);
+  chi2 = Book1D( m_sDetType+"chi2", "; chi2;Entries",20,0,20);
+  ndf = Book1D( m_sDetType+"ndf", "; ndf;Entries",20,0,20);
+  chi2ndf = Book1D( m_sDetType+"chi2ndf", "; chi2/ndf;Entries",20,0,5);
+  chi2prob = Book1D( m_sDetType+"chi2prob", "; chi2 prob;Entries",20,0,1);
+  rms = Book1D( m_sDetType+"rms", "; rms;Entries",20,0,20);  
+}
+
+void BetaPlots::fill(const xAOD::SlowMuon& smu)
+{
+  if (m_sDetType=="rpc" || m_sDetType=="Rpc" || m_sDetType=="RPC") {
+    nHits->Fill( smu.nRpcHits() );
+    ndf->Fill( smu.rpcBetaDof() );
+    if (smu.rpcBetaDof()>0) {
+      avg->Fill( smu.rpcBetaAvg() );
+      rms->Fill( smu.rpcBetaRms() );
+      chi2->Fill( smu.rpcBetaChi2() );
+      ndf->Fill( smu.rpcBetaDof() );
+      chi2ndf->Fill( smu.rpcBetaChi2()/smu.rpcBetaDof() );
+      chi2prob->Fill( TMath::Prob(smu.rpcBetaChi2(), smu.rpcBetaDof()) );
+    }
+  }
+  else if (m_sDetType=="mdt" || m_sDetType=="Mdt" || m_sDetType=="MDT") {
+    //nHits->Fill( smu.nMdtHits() );
+    ndf->Fill( smu.mdtBetaDof() );
+    if (smu.mdtBetaDof()>0) {
+      avg->Fill( smu.mdtBetaAvg() );
+      rms->Fill( smu.mdtBetaRms() );
+      chi2->Fill( smu.mdtBetaChi2() );
+      ndf->Fill( smu.mdtBetaDof() );	    
+      chi2ndf->Fill( smu.mdtBetaChi2()/smu.mdtBetaDof() );
+      chi2prob->Fill( TMath::Prob(smu.mdtBetaChi2(), smu.mdtBetaDof()) );
+    }
+  }
+  else if (m_sDetType=="calo" || m_sDetType=="Calo" || m_sDetType=="CALO") {
+    nHits->Fill( smu.nTileCells() );
+    ndf->Fill( smu.caloBetaDof() );
+    if (smu.caloBetaDof()>0) {
+      avg->Fill( smu.caloBetaAvg() );
+      rms->Fill( smu.caloBetaRms() );
+      chi2->Fill( smu.caloBetaChi2() );
+      ndf->Fill( smu.caloBetaDof() );
+      chi2ndf->Fill( smu.caloBetaChi2()/smu.caloBetaDof() );
+      chi2prob->Fill( TMath::Prob(smu.caloBetaChi2(), smu.caloBetaDof()) );
+    }
+  }
+
+}
+
+/////////////////////////////////
+  
 SlowMuonParamPlots::SlowMuonParamPlots(PlotBase *pParent, std::string sDir)
   :PlotBase(pParent, sDir)
   , beta(NULL)
+  , mdtBeta(this,"","MDT")
+  , rpcBeta(this,"","RPC")
+  , caloBeta(this,"","CALO")
 {}
 
 void SlowMuonParamPlots::initializePlots()
@@ -19,6 +88,10 @@ void SlowMuonParamPlots::initializePlots()
 void SlowMuonParamPlots::fill(const xAOD::SlowMuon& smu)
 {
   beta->Fill( smu.beta() );
+  mdtBeta.fill( smu );
+  rpcBeta.fill( smu );
+  caloBeta.fill( smu );
+  
 }  
 
 } //close namespace Muon
diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MooPerformance/doc/packagedoc.h b/MuonSpectrometer/MuonValidation/MuonRecValidation/MooPerformance/doc/packagedoc.h
index ff0960cb1ad3f50587a3024d3dd3c4a279ce5ee3..c9ec7448699e08aa36a60f70b37299ff065af213 100644
--- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MooPerformance/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MooPerformance/doc/packagedoc.h
@@ -116,15 +116,5 @@ At the moment, we are using matchAlg=1.
 
 @section MooPerformance_ExtrasMooPerformance Extra Pages
 
-  - @ref used_MooPerformance
-  - @ref requirements_MooPerformance
 
 */
-
-/**
-@page used_MooPerformance Used Packages
-*/
-
-/**
-@page requirements_MooPerformance Requirements
-*/
diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/doc/packagedoc.h b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/doc/packagedoc.h
index 6b3f9e3935c50d5aa594c4973ad7fed49b97e886..d4187c07937c45e80563942cb961c808dd7f0e38 100644
--- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/doc/packagedoc.h
@@ -15,15 +15,4 @@ When running on simulated data it can be configured to perform truth matching as
  	
 @section MuonTrackPerformance_ExtrasMuonTrackPerformance Extra Pages
 
- - @ref UsedMuonTrackPerformance
- - @ref RequirementsMuonTrackPerformance
-*/
-
-/**
-@page UsedMuonTrackPerformance Used Packages
-*/
-
-/**
-@page RequirementsMuonTrackPerformance Requirements
-
 */
diff --git a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonPerformanceAlg.cxx b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonPerformanceAlg.cxx
index 2750bdd6d30387a51be42bb6902f3298542598d2..52930ebf929786632530c21fb7bdac34d65a5a0a 100644
--- a/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonPerformanceAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonRecValidation/MuonTrackPerformance/src/MuonPerformanceAlg.cxx
@@ -113,9 +113,9 @@ bool MuonPerformanceAlg::passID(const xAOD::TrackParticle* tp, bool debug) const
   if( tp  ){
       
     // check blayer 
-    tp->summaryValue(eblh,xAOD::expectBLayerHit);
-    tp->summaryValue(nblh,xAOD::numberOfBLayerHits);
-    tp->summaryValue(nblo,xAOD::numberOfBLayerOutliers);
+    tp->summaryValue(eblh,xAOD::expectInnermostPixelLayerHit);
+    tp->summaryValue(nblh,xAOD::numberOfInnermostPixelLayerHits);
+    tp->summaryValue(nblo,xAOD::numberOfInnermostPixelLayerOutliers);
     if( static_cast<int>(eblh) ==0 ||
 	static_cast<int>(nblh) + static_cast<int>(nblo) > 0 )   tightness += 1;
 
diff --git a/MuonSpectrometer/MuonValidation/MuonTrackValidation/doc/packagedoc.h b/MuonSpectrometer/MuonValidation/MuonTrackValidation/doc/packagedoc.h
index 5465faf5a8519448402303c7a25c0c295ac66c9e..5dc8c4f1cfbd6908f63c9cf28bb9b994ca7aa3bb 100644
--- a/MuonSpectrometer/MuonValidation/MuonTrackValidation/doc/packagedoc.h
+++ b/MuonSpectrometer/MuonValidation/MuonTrackValidation/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section MuonTrackValidation_MuonTrackValidationReq Requirements
 
 
 */
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisAssociation/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/AnalysisAssociation/doc/packagedoc.h
index fbda2c3e51be3251a27216573d19a2824f389983..50897ff3b569e6569282248db3ef8d2c569db53f 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisAssociation/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisAssociation/doc/packagedoc.h
@@ -29,18 +29,7 @@ You may also be interested in:
    - AnalysisUtils : IFilterCuts, IFilter<T>, MomentumFilter<T>, IParticleFilter and McVtxFilter
 
 
-@section AnalysisAssociation_AnalysisAssociationReq Requirements
 
-@ref used_AnalysisUtils
 
-@ref requirements_AnalysisAssociation
 
 */
-
-/**
-@page used_AnalysisAssociation Used Packages
-*/
-
-/**
-@page requirements_AnalysisAssociation Requirements
-*/
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/doc/packagedoc.h
index 896b0249234a438b68bf1fe656550d7cda5619df..364a28c8a8aed6b2a5b8eb38480b2e19a6d89111 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/doc/packagedoc.h
@@ -212,10 +212,5 @@ method which does the copy and the filtering in one go.
  - For questions or comments: Ketevi A. Assamagan
    ketevi@bnl.gov
 
-@section AnalysisExamples_used_packagesTkPara Used Packages
-
-@section AnalysisExamples_requirements Requirements
-
 
 */
-
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/JetTagAna.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/JetTagAna.cxx
index c3bbb205801136a832a98b554ae35c411f136fc1..bae4ff909469fda18034d99804a5d5ee42b919d9 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/JetTagAna.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/JetTagAna.cxx
@@ -505,8 +505,8 @@ StatusCode JetTagAna::execute() {
 	if(trackParticle->pt()<1000.) continue; 
         const Trk::TrackSummary* summary = trackParticle->trackSummary();
         if (summary) {
-	  m_h_global_BLayerHits->Fill((float) summary->get(Trk::numberOfBLayerHits));
-	  m_h_global_BLayerSharedHits->Fill((float) summary->get(Trk::numberOfBLayerSharedHits));
+	  m_h_global_BLayerHits->Fill((float) summary->get(Trk::numberOfInnermostPixelLayerHits));
+	  m_h_global_BLayerSharedHits->Fill((float) summary->get(Trk::numberOfInnermostPixelLayerSharedHits));
 	  m_h_global_PixelHits->Fill((float) summary->get(Trk::numberOfPixelHits));
 	  m_h_global_PixelLayers->Fill((float) summary->get(Trk::numberOfContribPixelLayers));
 	  m_h_global_TRTHits->Fill((float) summary->get(Trk::numberOfTRTHits));
@@ -642,7 +642,7 @@ StatusCode JetTagAna::execute() {
 
        const Trk::TrackSummary* summary = aTemp->trackSummary();
        if (summary) {
-         m_h_jet_tracks_BLayerHits->Fill((float) summary->get(Trk::numberOfBLayerHits));
+         m_h_jet_tracks_BLayerHits->Fill((float) summary->get(Trk::numberOfInnermostPixelLayerHits));
          m_h_jet_tracks_PixelHits->Fill((float) summary->get(Trk::numberOfPixelHits));
          m_h_jet_tracks_SCTHits->Fill((float) summary->get(Trk::numberOfSCTHits));
        }
@@ -1532,7 +1532,7 @@ StatusCode JetTagAna::checkTrackqualforSET(Rec::TrackParticleContainer::const_it
   const Trk::TrackSummary* summary = (*trackItr)->trackSummary();
   if (summary) {
     // number of b-layer hits
-    nBL = summary->get(Trk::numberOfBLayerHits);
+    nBL = summary->get(Trk::numberOfInnermostPixelLayerHits);
     // number of pixel hits
     nPix = summary->get(Trk::numberOfPixelHits);
     // number of Si hits
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/TrackExample.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/TrackExample.cxx
index d320b4a8d4b7b2d26659bffaf3d5f4086ff62448..9ee711a23f246862d0cc53133274865017d12b88 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/TrackExample.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisExamples/src/TrackExample.cxx
@@ -172,7 +172,7 @@ StatusCode TrackExample::execute() {
       /// access to TrackSummary information
       ATH_MSG_DEBUG( "Track summary information:" );
       uint8_t ival = 0;
-      if( trackParticle->summaryValue( ival, xAOD::numberOfBLayerHits ) ) {
+      if( trackParticle->summaryValue( ival, xAOD::numberOfInnermostPixelLayerHits ) ) {
          ATH_MSG_DEBUG( " * Number of B layer hits : " << ( int ) ival );
       }
       if( trackParticle->summaryValue( ival, xAOD::numberOfPixelHits ) ) {
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/doc/packagedoc.h
index 23ef6a61bf5f62896f0a300ec7a8e49cfb7de75f..0980d50ba994b963cf77481c5137431fc4a61a68 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTest/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTest/doc/packagedoc.h
@@ -23,16 +23,6 @@ AnalysisTest contains the following algs/files:
 - EventTagTest_topOptions.py : test for TAG collection
 - NavTest_topOptions.py : test for the back-navigation
 
-@ref used_AnalysisTest
 
-@ref requirements_AnalysisTest
 
 */
-
-/**
-@page used_AnalysisTest Used Packages
-*/
-
-/**
-@page requirements_AnalysisTest Requirements
-*/
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTools/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/AnalysisTools/doc/packagedoc.h
index 53ddd52c0d88bb3f04c771753cd3f48e3edbb298..58abfcfc39462b67d792c6c586e5385bb2765331 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTools/doc/packagedoc.h
@@ -13,8 +13,6 @@ AnalysisTools contains the following classes:
 
 - AnalysisTools : provides I/F to analysis tools
 
-@section AnalysisTools_used_packagesAnalysisTools Used packages
 
-@section AnalysisTools_requirementsAnalysisTools Requirements
 
 */
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/doc/packagedoc.h
index af68a8eeef9a2523de9324bd3e222c582696d729..a61fc94f3b3a317dfd9e0e258e624e3b0efff28e 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/doc/packagedoc.h
@@ -93,16 +93,6 @@ You may also be interested in:
 
    - \ref AnalysisExamples to see how these classes may be used : FilterExample
 
-@ref used_AnalysisUtils
 
-@ref requirements_AnalysisUtils
 
 */
-
-/**
-@page used_AnalysisUtils Used Packages
-*/
-
-/**
-@page requirements_AnalysisUtils Requirements
-*/
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/src/ElectronIDSelectorCore.cxx b/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/src/ElectronIDSelectorCore.cxx
index 8c27e4a31c25a28bbf0c7be7d5d62ef1e01b5bd2..04c50490ac042d5e23b19e8a76fd39f81bf764bd 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/src/ElectronIDSelectorCore.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/src/ElectronIDSelectorCore.cxx
@@ -241,8 +241,8 @@ bool ElectronIDSelectorCore::accept( const INavigable4Momentum *part ) const
   // Check for the b-layer requirement if RobusterTight is requested
   if ( m_isEM_NoConvCut != 0 )
     {
-      bool expectBLayerHit = electron->detailValue( egammaParameters::expectHitInBLayer );        
-      if ( expectBLayerHit )
+      bool expectInnermostPixelLayerHit = electron->detailValue( egammaParameters::expectHitInBLayer );
+      if ( expectInnermostPixelLayerHit )
         {
           if ( electron->isem(m_isEM) != 0 )
             {
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/AltMuJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/AltMuJetOverlapTool.cxx
index 4d94b8b86e22ebeb371f363c1bfb0d2e692708c2..3abcb4a9c2a8fb453ba4b027d18fde39cbd61f1d 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/AltMuJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/AltMuJetOverlapTool.cxx
@@ -14,7 +14,6 @@ namespace
 {
   /// Unit conversion constants
   const double GeV = 1e3;
-  const double invGeV = 1e-3;
 }
 
 namespace ORUtils
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaROverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaROverlapTool.cxx
index 4a78166f039fab2dcb03909dddf58d03e5f4ea68..c04cfe124fe6ac78ef4d363d34d645e34d06127d 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaROverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/DeltaROverlapTool.cxx
@@ -4,12 +4,6 @@
 // Framework includes
 #include "CxxUtils/make_unique.h"
 
-namespace
-{
-  /// 1/GeV conversion factor
-  const float invGeV = 0.001;
-}
-
 namespace ORUtils
 {
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx
index f8bcb82f233fd828ed6e80cfb5dfa5c08beeb4b9..54fa5e3ad7dc3bc7aeafb2c4e1659467894c2255 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleEleOverlapTool.cxx
@@ -13,12 +13,6 @@
 // Local includes
 #include "AssociationUtils/EleEleOverlapTool.h"
 
-namespace
-{
-  /// Unit conversion factor
-  const double invGeV = 1e-3;
-}
-
 namespace
 {
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleJetOverlapTool.cxx
index a88c85a1530089a28f421a275e832c0146d5a617..345adb390140010a51a15933c841c0452634de87 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleJetOverlapTool.cxx
@@ -12,7 +12,6 @@ namespace
 {
   /// Unit conversion constants
   const double GeV = 1e3;
-  const double invGeV = 1e-3;
 }
 
 namespace ORUtils
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleMuSharedTrkOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleMuSharedTrkOverlapTool.cxx
index e7a5ea5c7fa071b2d0d990167871c7c82091569d..92d6d47470520d4dab9a586be9ab02f77723750c 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleMuSharedTrkOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/EleMuSharedTrkOverlapTool.cxx
@@ -11,12 +11,6 @@
 // Local includes
 #include "AssociationUtils/EleMuSharedTrkOverlapTool.h"
 
-namespace
-{
-  /// Unit conversion constant
-  const float invGeV = 0.001;
-}
-
 namespace ORUtils
 {
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetOverlapTool.cxx
index e7971db310f47c54b0d7f771f1fb8c74fb86945f..de4de30c60e2e71812416454eaebd52999c4b20f 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/MuJetOverlapTool.cxx
@@ -14,7 +14,6 @@ namespace
 {
   /// Unit conversion constants
   const double GeV = 1e3;
-  const double invGeV = 1e-3;
 }
 
 namespace ORUtils
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauAntiTauJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauAntiTauJetOverlapTool.cxx
index 6621c313cf3c59512e3a6612a3ae65f4ed3ef443..e960be81e63bd926c19786e5557722613205058e 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauAntiTauJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauAntiTauJetOverlapTool.cxx
@@ -9,13 +9,6 @@
 #include "AssociationUtils/TauAntiTauJetOverlapTool.h"
 #include "AssociationUtils/DeltaRMatcher.h"
 
-namespace
-{
-  /// Unit conversion constants
-  const double GeV = 1e3;
-  const double invGeV = 1e-3;
-}
-
 namespace ORUtils
 {
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauJetOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauJetOverlapTool.cxx
index 8da57e66287cbf7bed4b8b50cb58c93f74e021fc..13d00e4e31cc763c37b5a75a2039caaebb15ea68 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauJetOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauJetOverlapTool.cxx
@@ -9,13 +9,6 @@
 #include "AssociationUtils/TauJetOverlapTool.h"
 #include "AssociationUtils/DeltaRMatcher.h"
 
-namespace
-{
-  /// Unit conversion constants
-  const double GeV = 1e3;
-  const double invGeV = 1e-3;
-}
-
 namespace ORUtils
 {
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseEleOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseEleOverlapTool.cxx
index 23e6c43a114d58d27ee4c6d711f4dab45316a661..49e5c026c418f3c7af3e14ce412b7e3174d70469 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseEleOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseEleOverlapTool.cxx
@@ -8,12 +8,6 @@
 // Local includes
 #include "AssociationUtils/TauLooseEleOverlapTool.h"
 
-namespace
-{
-  /// Unit conversion constant
-  const float invGeV = 0.001;
-}
-
 namespace ORUtils
 {
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseMuOverlapTool.cxx b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseMuOverlapTool.cxx
index 0fa4742edc534af9491603c752c4408a5e684ce9..5ef68dd87cf51b18a71c3b73298bdb3e364b048e 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseMuOverlapTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/Root/TauLooseMuOverlapTool.cxx
@@ -12,7 +12,6 @@ namespace
 {
   /// Unit conversion constants
   const float GeV = 1e3;
-  const float invGeV = 1e-3;
 }
 
 namespace ORUtils
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/share/gt_AnaToolHandle_test.ref b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/share/gt_AnaToolHandle_test.ref
new file mode 100644
index 0000000000000000000000000000000000000000..c42fe4de84a6bdacbc6899860e6f908d5c006ef5
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/share/gt_AnaToolHandle_test.ref
@@ -0,0 +1,16 @@
+[==========] Running 4 tests from 1 test case.
+[----------] Global test environment set-up.
+[----------] 4 tests from AnaToolHandleTest
+[ RUN      ] AnaToolHandleTest.OverlapTools
+[       OK ] AnaToolHandleTest.OverlapTools (42 ms)
+[ RUN      ] AnaToolHandleTest.MasterTools
+[       OK ] AnaToolHandleTest.MasterTools (0 ms)
+[ RUN      ] AnaToolHandleTest.ToolAssignment
+[       OK ] AnaToolHandleTest.ToolAssignment (0 ms)
+[ RUN      ] AnaToolHandleTest.ToolAssignment2
+[       OK ] AnaToolHandleTest.ToolAssignment2 (0 ms)
+[----------] 4 tests from AnaToolHandleTest (42 ms total)
+
+[----------] Global test environment tear-down
+[==========] 4 tests from 1 test case ran. (42 ms total)
+[  PASSED  ] 4 tests.
diff --git a/PhysicsAnalysis/AnalysisCommon/CompositeParticleEvent/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/CompositeParticleEvent/doc/packagedoc.h
index 0ae9685a5539ff53dd9be27d6fccf6d022bb8ed2..c55747775250f97dda04744238ce1c55206a4b69 100644
--- a/PhysicsAnalysis/AnalysisCommon/CompositeParticleEvent/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/CompositeParticleEvent/doc/packagedoc.h
@@ -44,8 +44,6 @@ You may also be interested in:
 
    - AnalysisExamples : a set of example Algorithms. See the ttbar algorithm which exercises the composition of jets into a W as well as BJet and W into a top.
 
-@section CompositeParticleEvent_CompositeParticleEventReq Requirements
 
 
 */
-
diff --git a/PhysicsAnalysis/AnalysisCommon/HistogramUtils/share/AthHistogramSequencerExample.py b/PhysicsAnalysis/AnalysisCommon/HistogramUtils/share/AthHistogramSequencerExample.py
index 02257e24ac41f37e452554cd8beda0920e25be31..16d50d358982b3361189589b93e1f329619e2a7c 100644
--- a/PhysicsAnalysis/AnalysisCommon/HistogramUtils/share/AthHistogramSequencerExample.py
+++ b/PhysicsAnalysis/AnalysisCommon/HistogramUtils/share/AthHistogramSequencerExample.py
@@ -17,9 +17,6 @@ rec.doFileMetaData        = False
 # the aruments are: stream name, file name, TTree name in file
 
 myPath = "/afs/cern.ch/atlas/project/PAT/xAODs/r5534/valid2.117050.PowhegPythia_P2011C_ttbar.digit.AOD.e2657_s1933_s1964_r5534/AOD.01482225._000107.pool.root.1"
-from InDetBeamSpotExample import DiskUtils
-inFileList = DiskUtils.filelist( myPath, "" )
-#jp.AthenaCommonFlags.FilesInput = inFileList
 jp.AthenaCommonFlags.FilesInput = [myPath]
 
 #from AthenaCommon.AlgSequence import AlgSequence
diff --git a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/IsolationCloseByCorrectionTool.h b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/IsolationCloseByCorrectionTool.h
index 832646c7e938f7be2f450e13f0c3ce61f6c23589..7aa5f461a302d3e393692b664529806f74390bbc 100644
--- a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/IsolationCloseByCorrectionTool.h
+++ b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/IsolationSelection/IsolationCloseByCorrectionTool.h
@@ -142,7 +142,6 @@ namespace CP {
             float m_ConeSizeVariation; // Extend - shrink the cone size to account for extrapolation effects
 
             bool m_isInitialised;
-            bool m_isCoreSubtracted;
             std::string m_indetTrackParticleLocation;
             std::string m_VertexContainerName;
             std::string m_CaloClusterContainerName;
diff --git a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/Root/IsolationCloseByCorrectionTool.cxx b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/Root/IsolationCloseByCorrectionTool.cxx
index b98a8a447f38bdc1639ca8ad40d42d5c6a761287..5ade1b73dd9ede400f5278448227c7eae0b06514 100644
--- a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/Root/IsolationCloseByCorrectionTool.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/Root/IsolationCloseByCorrectionTool.cxx
@@ -40,7 +40,6 @@ namespace CP {
                 m_maxTopoPolution(1.1),
                 m_ConeSizeVariation(1.2),
                 m_isInitialised(false),
-                m_isCoreSubtracted(false),
                 m_indetTrackParticleLocation("InDetTrackParticles"),
                 m_VertexContainerName("PrimaryVertices"),
                 m_CaloClusterContainerName("CaloCalTopoClusters"),
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleEvent/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/ParticleEvent/doc/packagedoc.h
index 982d3245eacd1149d74f546adee290f1a89e54ab..50bd78b2b9d15aa5796d12e8791d3840da414429 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleEvent/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleEvent/doc/packagedoc.h
@@ -89,7 +89,6 @@ You may also be interested in:
 
    - TruthParticle in TruthParticleID/McParticleEvent
 
-@section ParticleEvent_ParticleEventReq Requirements
 
 
 */
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleEventAthenaPool/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/ParticleEventAthenaPool/doc/packagedoc.h
index 325c26d32ea9f64d4b1fa28c411790d7869976be..354c0c93bcf878c1ba3012e1ba3253b7329c253a 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleEventAthenaPool/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleEventAthenaPool/doc/packagedoc.h
@@ -27,8 +27,6 @@ ParticleEventAthenaPool contains the following topOs and jobOs:
 
 - AODFlags.py : flags for AOD making
 
-@section ParticleEventAthenaPool_used_packagesParticleEventAthenaPool Used packages
 
-@section ParticleEventAthenaPool_requirementsParticleEventAthenaPool Requirements
 
 */
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthParticles.cxx b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthParticles.cxx
index 0fc19caaaaf7c45a68e5fc052cd3a83e50939cf4..c4c5e11e838bc31d1b48cbefdff77b0365b753a0 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthParticles.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/Root/CopyTruthParticles.cxx
@@ -39,7 +39,7 @@ int CopyTruthParticles::execute() const {
   size_t numCopied = 0;
   for (unsigned int ip = 0; ip < evt->nTruthParticles(); ++ip) {
     const xAOD::TruthParticle* tp = evt->truthParticle(ip);
-    if (tp->pt() < m_ptmin)
+    if (!tp || tp->pt() < m_ptmin)
         continue;
 
     if (classify(tp)) {
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/doc/packagedoc.h
index 5c86df737de2f6caaea50fba27aa58dcbaa1475c..38ce6e365c28b9765923dc6e7f32ac7882262cc0 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/doc/packagedoc.h
@@ -34,8 +34,4 @@ For the moment there are following tools (in development):
 Please let me know of any errors, or if anything is unclear.
 Andreas.Wildauer@cern.ch
 
-@section ParticleJetTools_ParticleJetTools_used_packages Used Packages
-
-@section ParticleJetTools_requirements Requirements
 */
-
diff --git a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/TPileupReweighting.cxx b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/TPileupReweighting.cxx
index 15983e5c3ded3c12041568300b60cbc9a4075c1d..abc0560a3f76840cbdbcd2c3d57c44d5d42c48ce 100644
--- a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/TPileupReweighting.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/Root/TPileupReweighting.cxx
@@ -684,7 +684,7 @@ Int_t CP::TPileupReweighting::AddDistribution(TH1* hist,Int_t runNumber, Int_t c
         if(period.first==runNumber) continue; //ok to add to this
         if(period.second->inputHists.find(channelNumber)!=period.second->inputHists.end()) {
           TString myMsg = TString::Format("Attempt to add distribution for channel %d to period %d, but this channels already has period %d defined.\nThis is indicative of use of incompatible PRW config files, please check your config files for multiple periods/runNumbers for the same channel.",channelNumber,runNumber,period.first);
-          Error("AddDistribution",myMsg);
+          Error("AddDistribution","%s",myMsg.Data());
           throw std::runtime_error(myMsg.Data());
         }
       }
diff --git a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/src/checkPRWConfigFile.C b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/src/checkPRWConfigFile.C
index 4d1c6064fa65a9d9e6e220d7897ce7ca3d2ff434..a54e54b52d1d984c342b0efce15cb2dc54e05ee7 100644
--- a/PhysicsAnalysis/AnalysisCommon/PileupReweighting/src/checkPRWConfigFile.C
+++ b/PhysicsAnalysis/AnalysisCommon/PileupReweighting/src/checkPRWConfigFile.C
@@ -9,10 +9,10 @@
 #include "TSystem.h"
 #include "TH1D.h"
 
-using namespace std;
-
 #include <fstream>
 
+using namespace std;
+
 int main ( int argc, char *argv[] )
 {
    if ( argc > 4 || argc < 3 ) { // argc should be 3 or 4 for correct execution
diff --git a/PhysicsAnalysis/AnalysisCommon/SpecialUtils/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/SpecialUtils/doc/packagedoc.h
index 4a87e2146f4eb50596f24f4990e0cc55aaec5a26..5d76aced634b27142849df2f86d572563667932b 100644
--- a/PhysicsAnalysis/AnalysisCommon/SpecialUtils/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/SpecialUtils/doc/packagedoc.h
@@ -20,8 +20,6 @@ the collinear approximation to solve for the neutrinos in the decay X --> a + b
 carry (1-x_a) of that tau's momentum. Both of these 2 utilities return a container of Neutrino Objects. There is 
 a class for the neutrino, Netrino.h, in the package PhyscisAnalysis/AnalysisCommon/ParticleEvent. 
 
-@section SpecialUtils_used_packagesSpecialUtils Used packages
 
-@section SpecialUtils_requirementsSpecialUtils Requirements
 
 */
diff --git a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinGeantTruthAlg.cxx b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinGeantTruthAlg.cxx
index e10b65d89b9cab07fca53f538e9cec9ccd87faea..9b7dbb6ca511eeb85444b141fbbecea9632ce4ae 100644
--- a/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinGeantTruthAlg.cxx
+++ b/PhysicsAnalysis/AnalysisCommon/ThinningUtils/src/ThinGeantTruthAlg.cxx
@@ -147,7 +147,6 @@ StatusCode ThinGeantTruthAlg::execute()
     // Retrieve truth and vertex containers
     const xAOD::TruthParticleContainer* truthParticles(0);
     const xAOD::TruthVertexContainer* truthVertices(0);
-    // TODO: what should the code do when containers aren't there?
     if (evtStore()->contains<xAOD::TruthParticleContainer>(m_truthParticlesKey)) {
         CHECK( evtStore()->retrieve( truthParticles , m_truthParticlesKey ) );
     } else {
@@ -166,39 +165,42 @@ StatusCode ThinGeantTruthAlg::execute()
     if (evtStore()->contains<xAOD::MuonContainer>(m_muonsKey)) {
         CHECK( evtStore()->retrieve( muons , m_muonsKey ) );
     } else {
-        ATH_MSG_FATAL("No muon container with key "+m_muonsKey+" found.");
-        return StatusCode::FAILURE;
+        ATH_MSG_WARNING("No muon container with key "+m_muonsKey+" found.");
     }
     const xAOD::ElectronContainer* electrons(0);
     if (evtStore()->contains<xAOD::ElectronContainer>(m_electronsKey)) {
         CHECK( evtStore()->retrieve( electrons , m_electronsKey ) );
     } else {
-        ATH_MSG_FATAL("No electron container with key "+m_electronsKey+" found.");
-        return StatusCode::FAILURE;
+        ATH_MSG_WARNING("No electron container with key "+m_electronsKey+" found.");
     }
     const xAOD::PhotonContainer* photons(0);
     if (evtStore()->contains<xAOD::PhotonContainer>(m_photonsKey)) {
         CHECK( evtStore()->retrieve( photons , m_photonsKey ) );
     } else {
-        ATH_MSG_FATAL("No photon container with key "+m_photonsKey+" found.");
-        return StatusCode::FAILURE;
+        ATH_MSG_WARNING("No photon container with key "+m_photonsKey+" found.");
     }
    
     // Loop over photons, electrons and muons and get the associated truth particles
     // Retain the associated index number
     std::vector<int> recoParticleTruthIndices;
-    for (auto muon : *muons) {
-        const xAOD::TruthParticle* truthMuon = xAOD::TruthHelpers::getTruthParticle(*muon); 
-        if (truthMuon) recoParticleTruthIndices.push_back(truthMuon->index());
+    if (muons!=nullptr) {
+        for (auto muon : *muons) {
+            const xAOD::TruthParticle* truthMuon = xAOD::TruthHelpers::getTruthParticle(*muon); 
+            if (truthMuon) recoParticleTruthIndices.push_back(truthMuon->index());
+        }
     }
-    for (auto electron : *electrons) {
-        const xAOD::TruthParticle* truthElectron = xAOD::TruthHelpers::getTruthParticle(*electron);
-        if (truthElectron) recoParticleTruthIndices.push_back(truthElectron->index());
+    if (electrons!=nullptr) {
+        for (auto electron : *electrons) {
+            const xAOD::TruthParticle* truthElectron = xAOD::TruthHelpers::getTruthParticle(*electron);
+            if (truthElectron) recoParticleTruthIndices.push_back(truthElectron->index());
+        }
+    }
+    if (photons!=nullptr) {
+        for (auto photon : *photons) {
+            const xAOD::TruthParticle* truthPhoton = xAOD::TruthHelpers::getTruthParticle(*photon);
+            if (truthPhoton) recoParticleTruthIndices.push_back(truthPhoton->index());
+        } 
     }
-    for (auto photon : *photons) {
-        const xAOD::TruthParticle* truthPhoton = xAOD::TruthHelpers::getTruthParticle(*photon);
-        if (truthPhoton) recoParticleTruthIndices.push_back(truthPhoton->index());
-    } 
 
     // Set up masks
     std::vector<bool> particleMask, vertexMask;
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..73c470e5045cc7a48b7c4615ffcdeb2d0b8bd2fe
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/CMakeLists.txt
@@ -0,0 +1,55 @@
+################################################################################
+# Package: TruthWeightTools
+################################################################################
+
+# Declare the package name:
+atlas_subdir( TruthWeightTools )
+
+# Extra dependencies based on the build environment:
+set( extra_deps )
+set( extra_private_deps )
+set( extra_libs )
+set( extra_include_dirs )
+set( extra_link_libraries )
+set( extra_private_link_libraries )
+if( NOT XAOD_STANDALONE )
+    set( extra_deps Control/AthToolSupport/AsgTools Control/AthAnalysisBaseComps )
+    set( extra_private_deps PhysicsAnalysis/POOLRootAccess )
+    set( extra_include_dirs ${HEPPDT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} )
+    set( extra_link_libraries ${HEPPDT_LIBRARIES} ${HEPMC_LIBRARIES} AthAnalysisBaseCompsLib )
+endif()
+
+# Declare the package's dependencies:
+atlas_depends_on_subdirs( PUBLIC
+                          Event/xAOD/xAODTruth
+                          ${extra_deps}
+                          PRIVATE
+                          Event/xAOD/xAODEventInfo
+                          ${extra_private_deps}
+)
+
+# External dependencies:
+if( NOT XAOD_STANDALONE )
+    find_package( HepMC )
+    find_package( HepPDT )
+endif()
+
+# Build a shared library
+atlas_add_library( TruthWeightToolsLib
+                   TruthWeightTools/*.h Root/*.cxx
+                   PUBLIC_HEADERS TruthWeightTools
+                   INCLUDE_DIRS ${extra_include_dirs}
+                   LINK_LIBRARIES AsgTools xAODTruth ${extra_link_libraries}
+                   PRIVATE_LINK_LIBRARIES xAODEventInfo ${extra_private_link_libraries} )
+
+# Component(s) in the package:
+if( NOT XAOD_STANDALONE )
+    atlas_add_component( TruthWeightTools
+                         src/components/*.cxx
+                         LINK_LIBRARIES TruthWeightToolsLib )
+
+    # Could be an atlas_add_test, but currently the default input file does not have weights
+    atlas_add_executable( ath_test_truthWeightTool
+                          SOURCES test/ath_test_truthWeightTool.cxx
+                          LINK_LIBRARIES TruthWeightToolsLib POOLRootAccess )
+endif()
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/README.md b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..cd13c4b4891b003bafff7f5ab8fcc993e5375c35
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/README.md
@@ -0,0 +1 @@
+Migration of [SVN](https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TruthWeightTools) package into athena.
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/HiggsWeightTool.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/HiggsWeightTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..73315e97bce42ac62bb7b387db20b1fa8819cfb7
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/HiggsWeightTool.cxx
@@ -0,0 +1,588 @@
+// $Id$
+
+// Local include(s):
+#include "TruthWeightTools/HiggsWeightTool.h"
+#include "xAODEventInfo/EventInfo.h"
+
+#include "TString.h"
+
+namespace xAOD
+{
+
+  HiggsWeightTool::HiggsWeightTool(const std::string &name)
+    : asg::AsgTool(name), m_init(false), m_Nweights(0), m_mcID(999),
+      //m_weightTool("xAOD::TruthWeightTool/TruthWeightTool"),
+      m_weightTool(nullptr), m_cutOff(false),
+      m_Nnom(0), m_Nws(0), m_sumw_nom(.0), m_sumw2_nom(.0), m_sumw(.0), m_sumw2(.0),
+      m_sumw_nomC(.0), m_sumw2_nomC(.0), m_sumwC(.0), m_sumw2C(.0)
+  {
+
+    // wether to put constraints on the weights
+    declareProperty("RequireFinite", m_requireFinite = false);
+    declareProperty("WeightCutOff", m_weightCutOff = -1.0);
+
+    // Force modes
+    declareProperty("ForceNNLOPS", m_forceNNLOPS = false); // Run2-default Powheg NNLOPS ggF
+    declareProperty("ForceVBF",    m_forceVBF = false);  // Run2-default Powheg VBF
+    declareProperty("ForceVH",     m_forceVH = false);   // Run2-default Powheg VH (WpH, WmH, qq->ZH)
+  }
+
+  StatusCode HiggsWeightTool::initialize()
+  {
+
+    int sum = m_forceNNLOPS + m_forceVBF + m_forceVH;
+
+    if (sum > 1) { throw std::runtime_error("Must not call more than one of ForceNNLOPS, ForceVBF or ForceVH"); }
+
+    if (m_weightCutOff > 0) { m_cutOff = true; m_requireFinite = true; }
+
+    if (sum == 0) {
+      m_mode = AUTO;
+      m_weightTool = new xAOD::TruthWeightTool("TruthWeightTool");
+      ::Info("HiggsWeightTool", "AUTO MODE");
+    } else if (m_forceNNLOPS) {
+      m_mode = FORCE_GGF_NNLOPS;
+      ::Info("HiggsWeightTool", "FORCE_GGF_NNLOPS MODE");
+    } else if (m_forceVBF) {
+      m_mode = FORCE_POWPY8_VBF;
+      ::Info("HiggsWeightTool", "FORCE_POWPY8_VBF MODE");
+    } else if (m_forceVH) {
+      m_mode = FORCE_POWPY8_VH;
+      ::Info("HiggsWeightTool", "FORCE_POWPY8_VH MODE");
+    }
+
+    m_init = true;
+    return StatusCode::SUCCESS;
+  }
+
+  void HiggsWeightTool::setupWeights(size_t Nweights)
+  {
+    static TString name = "HiggsWeightTool::setupWeights";
+    const std::vector<std::string> &wNames = getWeightNames();
+    m_Nweights = wNames.size();
+    ::Info(name, "Setting up weights in %s. %lu weights available in input file, %lu expected.",
+           m_mode == AUTO ? "AUTO mode" : Form("FORCE mode %i", m_mode), Nweights, m_Nweights);
+
+    if (m_Nweights != Nweights)
+      throw std::runtime_error(Form("Current event has %lu weights, while we expect %lu weights from the metadata",
+                                    Nweights, m_Nweights));
+
+    bool isNNLOPS = hasWeight(" nnlops-nominal-pdflhc ");
+
+    // Always use PDF4LHC as central value. For NNLOPS, use PDF4LHC @NNLO (91400), while VBF and VH use PDF4LHC @NLO (90400)
+    m_nom = isNNLOPS ? getWeightIndex(" nnlops-nominal-pdflhc ") : getWeightIndex(" PDF set = 90400 ");
+    ::Info(name, "Nominal weight at index %lu", m_nom);
+
+    // Check if we have the Higgs PDF uncertainty variations are there
+    m_pdfUnc.clear();
+
+    if (hasWeight(" PDF set = 90400 ") && hasWeight(" PDF set = 90430 ")) {
+      for (int id = 90400; id <= 90430; ++id) { m_pdfUnc.push_back(getWeightIndex(Form(" PDF set = %i ", id))); }
+
+      ::Info(name, "PDF4LHC uncertainty variations at positions %lu-%lu",
+             getWeightIndex(" PDF set = 90400 "), getWeightIndex(" PDF set = 90430 "));
+    }
+
+    m_pdfNNPDF30.clear();
+
+    if (hasWeight(" PDF set = 260001 ")) {
+      m_pdfNNPDF30.push_back(isNNLOPS ? getWeightIndex(" PDF set = 260000 ") : 0);
+
+      for (int id = 260001; id <= 260100; ++id) { m_pdfNNPDF30.push_back(getWeightIndex(Form(" PDF set = %i ", id))); }
+
+      ::Info(name, "NNPDF30 NLO uncertainty variations at positions %lu-%lu",
+             getWeightIndex(" PDF set = 260001 "), getWeightIndex(" PDF set = 260100 "));
+    }
+
+    m_aS_up = m_aS_dn = 0;
+
+    if (hasWeight(" PDF set = 90431 ") && hasWeight(" PDF set = 90432 ")) {
+      m_aS_dn = getWeightIndex(" PDF set = 90431 ");
+      m_aS_up = getWeightIndex(" PDF set = 90432 ");
+      ::Info(name, "PDF4LHC alphaS variations identified");
+    }
+
+    m_qcd.clear();
+
+    if (hasWeight(" muR = 0.5, muF = 0.5 ")) {
+      for (TString mur : {"0.5", "1.0", "2.0"})
+
+        for (TString muf : {"0.5", "1.0", "2.0"})
+
+          if (!(mur == "1.0" && muf == "1.0")) {
+            std::string wn = (" muR = " + mur + ", muF = " + muf + " ").Data();
+
+            if (hasWeight(wn)) // for some strange reason, VBF is missing some weights
+            { m_qcd.push_back(getWeightIndex(wn)); }
+          }
+
+      ::Info(name, "Read in %lu standard QCD variations", m_qcd.size());
+    }
+
+    m_tinf = m_bminlo = m_nnlopsNom = 0;
+    m_qcd_nnlops.clear();
+
+    if (isNNLOPS) {
+      // NNLOPS quark mass variations (with NNLO QCD correction)
+      m_tinf       = getWeightIndex(" nnlops-mtinf ");
+      m_bminlo     = getWeightIndex(" nnlops-bminlo ");
+
+      if (hasWeight(" nnlops-nominal "))
+      { m_nnlopsNom  = getWeightIndex(" nnlops-nominal "); }
+
+      // NNLOPS QCD scale variations
+      for (TString nn : {"Dn", "Nom", "Up"})
+
+        for (TString mur : {"Dn", "Nom", "Up"})
+
+          for (TString muf : {"Dn", "Nom", "Up"})
+
+            if (!(mur == "Nom" && muf == "Nom" && nn == "Nom"))
+            { m_qcd_nnlops.push_back(getWeightIndex((" nnlops-nnlo" + nn + "-pwg" + mur + muf + " ").Data())); }
+
+      ::Info(name, "Read in 3 NNLOPS quark mass weights and %lu QCD weights", m_qcd_nnlops.size());
+    }
+
+    // special PDFs
+
+    m_pdf4lhc_nnlo = getIndex(" PDF set = 91400 ");
+    m_pdf4lhc_nlo  = getIndex(" PDF set = 90400 ");
+    m_nnpdf30_nnlo = getIndex(" PDF set = 261000 "); // NNLOPS nominal
+    m_nnpdf30_nlo  = getIndex(" PDF set = 260000 "); // VBF+VH nominal
+    m_ct10nlo      = getIndex(" PDF set = 11000 ");
+    m_ct10nlo_0118 = getIndex(" PDF set = 11068 ");
+    m_ct14nlo      = getIndex(" PDF set = 13100 ");
+    m_ct14nlo_0118 = getIndex(" PDF set = 13165 ");
+    m_mmht2014nlo  = getIndex(" PDF set = 25200 ");
+
+    //for (std::string wn:wNames)
+    // ::Info(name,"\'%s\'",wn.c_str());
+  }
+
+  const std::vector<std::string> &HiggsWeightTool::getWeightNames()
+  {
+    if (!m_init) { initialize(); }
+
+    if (m_mode == AUTO) { return m_weightTool->getWeightNames(); }
+
+    static std::vector<std::string> wNames =
+      m_mode == FORCE_GGF_NNLOPS ? getDefaultNNLOPSweightNames() :
+      m_mode == FORCE_POWPY8_VBF ? getDefaultVBFweightNames() : getDefaultVHweightNames();
+    return wNames;
+  }
+
+  bool HiggsWeightTool::hasWeight(std::string wName)
+  {
+    if (m_mode == AUTO) { return m_weightTool->hasWeight(wName); }
+
+    const std::vector<std::string> &wnames = getWeightNames();
+    return std::find(wnames.begin(), wnames.end(), wName) != wnames.end();
+  }
+
+  size_t HiggsWeightTool::getWeightIndex(std::string wName)
+  {
+    if (m_mode == AUTO) { return m_weightTool->getWeightIndex(wName); }
+
+    if (!hasWeight(wName)) { throw std::runtime_error("Weight " + wName + " doesn't exist."); }
+
+    const std::vector<std::string> &wnames = getWeightNames();
+    return static_cast<size_t>(std::find(wnames.begin(), wnames.end(), wName) - wnames.begin());
+  }
+
+  float HiggsWeightTool::getWeight(std::string wName)
+  {
+    if (m_mode != AUTO) { throw std::runtime_error("getWeight(string) only supported in AUTO mode so far"); }
+
+    return m_weightTool->getWeight(wName);
+  }
+
+  const std::vector<float> &HiggsWeightTool::getMCweights() const
+  {
+    // 1. Check if truth events contain a weight vector. If so, take it.
+    if (evtStore()->contains<xAOD::TruthEventContainer>("TruthEvents")) {
+      const xAOD::TruthEventContainer *truthEvents = nullptr;
+
+      if (evtStore()->retrieve(truthEvents, "TruthEvents").isFailure())
+      { throw std::runtime_error("Cannot access TruthEvents ??"); }
+
+      if (truthEvents->at(0)) { return truthEvents->at(0)->weights(); }
+    }
+
+    // 2. Otherwise use the mcWeights in EventInfo
+    const xAOD::EventInfo *evtInfo = nullptr;
+
+    if (evtStore()->retrieve(evtInfo, "EventInfo").isFailure())
+    { throw std::runtime_error("Cannot access EventInfo (nor TruthEvents) in input file"); }
+
+    return evtInfo->mcEventWeights();
+  }
+
+  /// Access MC weight for uncertainty propagation
+  /// Note: input kinematics should be HTXS_Higgs_pt, HTXS_Njets_pTjet30, and HTXS_Stage1_Category_pTjet30
+  HiggsWeights HiggsWeightTool::getHiggsWeights(int STXS_Njets30, double STXS_pTH, int STXS_Stage1)
+  {
+    HiggsWeights hw = getHiggsWeightsInternal(STXS_Njets30, STXS_pTH, STXS_Stage1);
+
+    if (m_requireFinite) { updateWeights(hw); }
+
+    return hw;
+  }
+
+  void HiggsWeightTool::updateWeights(HiggsWeights &hw)
+  {
+    // first check nominal weight
+    if (!std::isfinite(hw.nominal)) { hw.nominal = m_sumw_nom / m_Nws; }
+
+    // add up stats on nominal weight
+    ++m_Nnom;
+    m_sumw_nom += hw.nominal;
+    m_sumw2_nom += pow(hw.nominal, 2);
+    updateWeight(hw.nominal, hw.nominal);
+    m_sumw_nomC += hw.nominal;
+    m_sumw2_nomC += pow(hw.nominal, 2);
+
+    updateWeights(hw.nominal, hw.weight0, hw.alphaS_up, hw.alphaS_dn);
+    updateWeights(hw.nominal, hw.pdf4lhc_unc);
+    updateWeights(hw.nominal, hw.nnpdf30_unc);
+    updateWeights(hw.nominal, hw.qcd);
+    updateWeights(hw.nominal, hw.qcd_nnlops);
+    updateWeights(hw.nominal, hw.mt_inf, hw.mb_minlo);
+    updateWeights(hw.nominal, hw.nnpdf30_nlo, hw.nnpdf30_nnlo, hw.mmht2014nlo);
+    updateWeights(hw.nominal, hw.pdf4lhc_nlo, hw.pdf4lhc_nnlo);
+    updateWeights(hw.nominal, hw.ct10nlo, hw.ct10nlo_0118);
+    updateWeights(hw.nominal, hw.ct14nlo, hw.ct14nlo_0118);
+    updateWeights(hw.nominal, hw.qcd_wg1_mu, hw.qcd_wg1_res);
+    updateWeights(hw.nominal, hw.qcd_wg1_mig01, hw.qcd_wg1_mig12);
+    updateWeights(hw.nominal, hw.qcd_wg1_pTH, hw.qcd_wg1_qm_b, hw.qcd_wg1_qm_t);
+    updateWeights(hw.nominal, hw.qcd_wg1_vbf2j, hw.qcd_wg1_vbf3j);
+    updateWeights(hw.nominal, hw.qcd_nnlops_nnlo, hw.qcd_nnlops_pow);
+    updateWeights(hw.nominal, hw.ggF_qcd_stxs);
+    updateWeights(hw.nominal, hw.ggF_qcd_2017);
+    updateWeights(hw.nominal, hw.ggF_qcd_jve);
+  }
+
+  void HiggsWeightTool::updateWeight(const double &w_nom, double &w)
+  {
+    if (m_requireFinite && !std::isfinite(w)) { w = w_nom; }
+
+    ++m_Nws;
+    m_sumw += w;
+    m_sumw2 += w * w;
+
+    if (!m_cutOff) { return; }
+
+    if (w > m_weightCutOff) { w = m_weightCutOff; }
+
+    if (w < -m_weightCutOff) { w = -m_weightCutOff; }
+
+    // stats on all weights
+    m_sumwC += w;
+    m_sumw2C += w * w;
+  }
+
+  StatusCode HiggsWeightTool::finalize()
+  {
+    if (m_requireFinite) {
+      printf("\n==============================\n==  HiggsWeightTool SUMMARY ==\n\n");
+      printf("  %5i nominal weights extracted with mean %.2e and RMS %.2e, Neff = %.1f\n",
+             m_Nnom, m_sumw_nom / m_Nnom, sqrt(m_sumw2_nom * m_Nnom - m_sumw_nom * m_sumw_nom) / m_Nnom,
+             m_sumw_nom * m_sumw_nom / m_sumw2_nom);
+
+      if (m_cutOff)
+        printf("  After the weight cutoff of %.1f we get mean %.2e and RMS %.2e, Neff = %.1f\n\n",
+               m_weightCutOff, m_sumw_nomC / m_Nnom, sqrt(m_sumw2_nomC * m_Nnom - m_sumw_nomC * m_sumw_nomC) / m_Nnom,
+               m_sumw_nomC * m_sumw_nomC / m_sumw2_nomC);
+
+      printf("  In total, %5i weights extracted with mean %.2e and RMS %.2e\n",
+             m_Nws, m_sumw / m_Nws, sqrt(m_sumw2 * m_Nws - m_sumw * m_sumw) / m_Nws);
+
+      if (m_cutOff)
+        printf("  After the weight cutoff of %.1f we get mean %.2e and RMS %.2e\n",
+               m_weightCutOff, m_sumwC / m_Nws, sqrt(m_sumw2C * m_Nws - m_sumwC * m_sumwC) / m_Nws);
+
+      printf("\n==============================\n\n");
+    }
+
+    return StatusCode::SUCCESS;
+  }
+
+  /// Access MC weight for uncertainty propagation
+  /// Note: input kinematics should be HTXS_Higgs_pt, HTXS_Njets_pTjet30, and HTXS_Stage1_Category_pTjet30
+  HiggsWeights HiggsWeightTool::getHiggsWeightsInternal(int STXS_Njets30, double STXS_pTH, int STXS_Stage1)
+  {
+    // convert to GeV
+    double pTH = STXS_pTH / 1000;
+    int Njets = STXS_Njets30;
+    const std::vector<float> &weights = getMCweights();
+
+    const xAOD::EventInfo *evtInfo = nullptr;
+
+    if (evtStore()->retrieve(evtInfo, "EventInfo").isFailure())
+    { throw std::runtime_error("Cannot access EventInfo (nor TruthEvents) in input file"); }
+
+    // if needed, setup weight structure
+    if (m_Nweights != weights.size() || evtInfo->mcChannelNumber() != m_mcID)
+    { setupWeights(weights.size()); }
+
+    // update current MC channel number
+    m_mcID = evtInfo->mcChannelNumber();
+
+    HiggsWeights hw;
+    // set kinematics
+    hw.pTH = pTH;
+    hw.Njets30 = Njets;
+    hw.STXS = STXS_Stage1;
+
+    // 1. Nominal weight
+    double w_nom = weights[m_nom];
+    hw.nominal = w_nom;
+    hw.weight0 = weights[0];
+
+    // 2. PDF weights
+    hw.alphaS_up = hw.alphaS_dn = 0;
+
+    if (m_pdfUnc.size() == 31) {
+      double pdf0 = weights[m_pdfUnc[0]];
+
+      // PDF uncertainty. Scale to nominal weight (since PDF0 is relative to Powheg NLO)
+      //   w_PDF[i] = PDF[i] / PDF[0] * w_nominal
+      for (size_t i = 1; i <= 30; ++i)
+      { hw.pdf4lhc_unc.push_back(weights[m_pdfUnc[i]] / pdf0 * w_nom); }
+
+      // 2b. alphaS weights
+      if (m_aS_up && m_aS_dn) {
+        hw.alphaS_up = weights[m_aS_up] / pdf0 * w_nom;
+        hw.alphaS_dn = weights[m_aS_dn] / pdf0 * w_nom;
+      }
+    }
+
+    if (m_pdfNNPDF30.size() == 101) {
+      double pdf0 = weights[m_pdfNNPDF30[0]];
+
+      for (size_t i = 1; i <= 100; ++i)
+      { hw.nnpdf30_unc.push_back(weights[m_pdfNNPDF30[i]] / pdf0 * w_nom); }
+    }
+
+    // Standard QCD uncertainties (which are relative to weight 0)
+    for (auto idx : m_qcd) { hw.qcd.push_back(getWeight(weights, idx)*w_nom / hw.weight0); }
+
+    // NNLOPS QCD uncertainties
+    double nnlo = getWeight(weights, m_nnlopsNom);
+
+    if (!m_nnlopsNom) { nnlo = w_nom; } // fix for rare NNLOPS samples
+
+    for (auto idx : m_qcd_nnlops) { hw.qcd_nnlops.push_back(getWeight(weights, idx)*w_nom / nnlo); }
+
+    // Powheg uncertainty
+    hw.qcd_nnlops_nnlo = hw.qcd_nnlops_pow = w_nom;
+
+    if (m_qcd_nnlops.size() == 26) {
+      hw.qcd_nnlops_nnlo = hw.qcd_nnlops[4]; // nnlops-nnloDn-PowNomNom
+      hw.qcd_nnlops_pow  = hw.qcd_nnlops[9]; // nnlops-nnloNom-PowDnDn
+    }
+
+    // Central values of different PDF sets
+    // for NNLOPS, these are relative to the NLO cross section - need to adjust with k-factor
+    double k = m_nnlopsNom ? nnlo / hw.weight0 : 1.0;
+
+    //hw.nnpdf30_nnlo = m_nnlopsNom ? weights[m_nnlopsNom] : 0; <<<<<
+    hw.nnpdf30_nlo  = getWeight(weights, m_nnpdf30_nlo) * k;
+    hw.nnpdf30_nnlo = getWeight(weights, m_nnpdf30_nnlo) * k;
+    hw.mmht2014nlo  = getWeight(weights, m_mmht2014nlo) * k;
+    hw.pdf4lhc_nlo  = getWeight(weights, m_pdf4lhc_nlo) * k;
+    hw.pdf4lhc_nnlo = getWeight(weights, m_pdf4lhc_nnlo) * k;
+    hw.ct10nlo      = getWeight(weights, m_ct10nlo) * k;
+    hw.ct10nlo_0118 = getWeight(weights, m_ct10nlo_0118) * k;
+    hw.ct14nlo      = getWeight(weights, m_ct14nlo) * k;
+    hw.ct14nlo_0118 = getWeight(weights, m_ct14nlo_0118) * k;
+
+    // special catch
+    if (m_bminlo || m_qcd_nnlops.size()) { // NNLOPS!!
+      hw.nnpdf30_nnlo = hw.weight0 * k;
+      //      hw.pdf4lhc_nnlo = w_nom; // usually close, but can be 4% different...
+      // printf("  %.4f = %.4f\n",hw.nnpdf30_nnlo,nnlo); // should be the same! // works!
+      // printf("PDF4LHC NLO * k_NNLO / NNLO: %.4f\n",getWeight(weights,m_pdf4lhc_nnlo)*k/w_nom);
+    } else if (m_pdfUnc.size() == 31) // should be VBF or VH
+    { hw.nnpdf30_nlo = hw.weight0; } // sf=1 here
+
+
+    // 3. Quark mass variations
+    //m_tinf=m_bminlo=m_nnlopsNom=0;
+    hw.mt_inf   = getWeight(weights, m_tinf) * w_nom / nnlo;
+    hw.mb_minlo = getWeight(weights, m_bminlo) * w_nom / nnlo;
+
+    //TODO - check
+    //       " nnlops-nominal ",
+    // AND NLO quark mass weights: mtmb, mtinf, mtmb-bminlo
+
+    if (Njets < 0) { return hw; }
+
+    /*********
+     *  WG1 proposed ggF QCD uncertainty
+     */
+
+    // Cross sections in the =0, =1, and >=2 jets of Powheg ggH after reweighing scaled to  sigma(N3LO)
+    //static std::vector<double> sig({30.26,13.12,5.14});
+    //static std::vector<double> sig({30.117,12.928,5.475}); // NNLOPS 2M
+    static double sig0 = 30.117, sig1 = 12.928, sig_ge2 = 5.475,
+                  sig_ge1 = sig1 + sig_ge2, sig_tot = sig0 + sig_ge1,
+                  sig_vbfTopo = 0.630, sig_ge2noVBF = sig_ge2 - sig_vbfTopo, sig_ge1noVBF = sig_ge1 - sig_vbfTopo;
+    static std::vector<double> sig({sig0, sig1, sig_ge2noVBF}); // NNLOPS subtracting VBF
+
+    // BLPTW absolute uncertainties in pb
+    static std::vector<double> yieldUnc({ 1.12, 0.66, 0.42});
+    static std::vector<double> resUnc({ 0.03, 0.57, 0.42});
+    static std::vector<double> cut01Unc({-1.22, 1.00, 0.21});
+    static std::vector<double> cut12Unc({    0, -0.86, 0.86});
+
+    // account for missing EW+quark mass effects by scaling BLPTW total cross section to sigma(N3LO)
+    double sf = 48.52 / 47.4;
+
+    int jetBin = (Njets > 1 ? 2 : Njets);
+    hw.qcd_wg1_mu    = (1.0 + yieldUnc[jetBin] / sig[jetBin] * sf) * w_nom;
+    hw.qcd_wg1_res   = (1.0 + resUnc[jetBin] / sig[jetBin] * sf) * w_nom;
+    hw.qcd_wg1_mig01 = (1.0 + cut01Unc[jetBin] / sig[jetBin] * sf) * w_nom;
+    hw.qcd_wg1_mig12 = (1.0 + cut12Unc[jetBin] / sig[jetBin] * sf) * w_nom;
+
+    // High pT uncertainty
+    static double y1_1 = 0.88, y2_1 = 1.16, x2_1 = 150;
+    static double y1_ge2 = 0.88, y2_ge2 = 1.16, x2_ge2 = 225;
+    double pTH_uncSF = 1.0;
+
+    if (Njets == 1) { pTH_uncSF = linInter(pTH, 0, y1_1, x2_1, y2_1); }
+    else if (Njets >= 2) { pTH_uncSF = linInter(pTH, 0, y1_ge2, x2_ge2, y2_ge2); }
+
+    //pTH>x2_ge2?y2_ge2:y1_ge2+(y2_ge2-y1_ge2)*pTH/x2_ge2;
+    //else if (Njets==1) pTH_uncSF = pTH>x2_1?y2_1:y1_1+(y2_1-y1_1)*pTH/x2_1;
+    hw.qcd_wg1_pTH = pTH_uncSF * w_nom;
+
+    double qmSF = 1.0;
+
+    if (Njets == 0) { qmSF = linInter(pTH, 6, 0.92, 24, 1.05); }
+    else if (Njets == 1) { qmSF = linInter(pTH, 35, 0.92, 62.5, 1.05); }
+    else if (Njets >= 2) { qmSF = linInter(pTH, 40, 0.92, 120, 1.05); }
+
+    hw.qcd_wg1_qm_b = w_nom * qmSF;
+    hw.qcd_wg1_qm_t = w_nom * linInter(pTH, 160, 1.0, 500, 1.37);
+
+    hw.qcd_wg1_vbf2j = w_nom;
+    hw.qcd_wg1_vbf3j = w_nom;
+
+    if (STXS_Stage1 == 101) { // GG2H_VBFTOPO_JET3VETO, tot unc 38%
+      hw.qcd_wg1_mu = hw.qcd_wg1_res = hw.qcd_wg1_mig01 = hw.qcd_wg1_mig12 = w_nom;
+      hw.qcd_wg1_vbf2j = w_nom * 1.20;
+      hw.qcd_wg1_vbf3j = w_nom * (1.0 - 0.32);
+    }
+
+    if (STXS_Stage1 == 102) { // GG2H_VBFTOPO_JET3, tot unc 30.4%
+      hw.qcd_wg1_mu = hw.qcd_wg1_res = hw.qcd_wg1_mig01 = hw.qcd_wg1_mig12 = w_nom;
+      hw.qcd_wg1_vbf2j = w_nom * 1.20;
+      hw.qcd_wg1_vbf3j = w_nom * 1.235;
+    }
+
+    // Quark-mass uncdertainty - TODO
+    //if (pTH>500) qm=1.5; else if (pTH>160) qm=1.0+0.5*(pTH-160)/340;
+    //hw.qcd_wg1_qm = w_nom;
+
+
+    /********
+     *  JVE as a cross check
+     */
+    // Central values for eps0 and eps1 from Powheg NNLOPS
+    //   eps0 = 0.617 +- 0.012 <= from Fabrizio and Pier
+    //   eps1 = 0.681 +- 0.057 <= from Fabrizio and Pier
+    // and setting inclusive uncertainty to 3.9% (YR4 for N3LO)
+    static double
+    Dsig_tot = sig_tot * 0.039, D01 = sig_tot * 0.012, D12 = sig_ge1 * 0.057;
+    //Dsig_tot=2.48, D01=1.25, D12=0.88; // For cross check with BLPTW
+
+    hw.ggF_qcd_jve.push_back(w_nom * (1.0 + Dsig_tot / sig_tot)); // incl
+
+    // eps0, i.e. mig 0 -> ge1
+    if (Njets == 0) { hw.ggF_qcd_jve.push_back(w_nom * (1.0 - D01 / sig0)); }
+    else { hw.ggF_qcd_jve.push_back(w_nom * (1.0 + D01 / sig_ge1noVBF)); }
+
+    // eps1, i.e. mig 1 -> ge2
+    if (Njets == 0) { hw.ggF_qcd_jve.push_back(w_nom); }
+    else if (Njets == 1) { hw.ggF_qcd_jve.push_back(w_nom * (1.0 - D12 / sig1)); }
+    else { hw.ggF_qcd_jve.push_back(w_nom * (1.0 + D12 / sig_ge2noVBF)); }
+
+    if (STXS_Stage1 == 101 || STXS_Stage1 == 102)
+    { hw.ggF_qcd_jve[0] = hw.ggF_qcd_jve[1] = hw.ggF_qcd_jve[2] = w_nom; }
+
+    hw.ggF_qcd_jve.push_back(hw.qcd_wg1_vbf2j);
+    hw.ggF_qcd_jve.push_back(hw.qcd_wg1_vbf3j);
+    hw.ggF_qcd_jve.push_back(hw.qcd_wg1_pTH);
+    hw.ggF_qcd_jve.push_back(hw.qcd_wg1_qm_t);
+
+
+
+    /*********
+     *  Tackmann STXS uncertainty scheme
+     */
+
+    // First four sources are the BLPTW ones
+    hw.ggF_qcd_stxs.push_back(hw.qcd_wg1_mu);
+    hw.ggF_qcd_stxs.push_back(hw.qcd_wg1_res);
+    hw.ggF_qcd_stxs.push_back(hw.qcd_wg1_mig01);
+    hw.ggF_qcd_stxs.push_back(hw.qcd_wg1_mig12);
+
+    // Add in the VBF uncertainties here
+    hw.ggF_qcd_stxs.push_back(hw.qcd_wg1_vbf2j);
+    hw.ggF_qcd_stxs.push_back(hw.qcd_wg1_vbf3j);
+
+    // This is followed by Dsig60, Dsig120 and Dsig200
+    // These are extracted from Powheg NNLOPS scale variations (using this tool!)
+    // As the envelope of hw.qcd_nnlops, which gives (all x-sec below have Njets>=1):
+    //   sig(60,200)  = 9.095 +/- 1.445 pb, BLPTW 10.9%
+    //   sig(120,200) = 1.961 +/- 0.401 pb, BLPTW 13.1%
+    //   sig(200,inf) = 0.582 +/- 0.121 pb, BLPTW 15.1%
+    static double sig0_60 = 8.719, sig60_200 = 9.095, sig120_200 = 1.961,
+                  sig0_120 = sig0_60 + sig60_200 - sig120_200, sig200_plus = 0.582; // 0.121 (-) 0.151*0.582
+    // static double Dsig60_200=1.457, Dsig120_200=0.411, Dsig200_plus=0.115; // with 40k events, and no BLPTW subraction
+    static double Dsig60_200 = 1.055, Dsig120_200 = 0.206, Dsig200_plus = 0.0832; // with 2M evts, and subtraction
+    double dsig60 = 0, dsig120 = 0, dsig200 = 0;
+
+    if (Njets >= 1) {
+      if (pTH < 60)  { dsig60 = -Dsig60_200 / sig0_60; } // -17.2%
+      else if (pTH < 200) { dsig60 = Dsig60_200 / sig60_200; } // +16.0%
+
+      if (pTH < 120) { dsig120 = -Dsig120_200 / sig0_120; }    //  -2.6%
+      else if (pTH < 200) { dsig120 =  Dsig120_200 / sig120_200; } // +20.8%
+
+      if (pTH > 200) { dsig200 = Dsig200_plus / sig200_plus; } // +14.3%
+    }
+
+    hw.ggF_qcd_stxs.push_back((1.0 + dsig60)*w_nom);
+    hw.ggF_qcd_stxs.push_back((1.0 + dsig120)*w_nom);
+    hw.ggF_qcd_stxs.push_back((1.0 + dsig200)*w_nom);
+
+
+
+    // First four sources are the BLPTW ones
+    hw.ggF_qcd_2017.push_back(hw.qcd_wg1_mu);
+    hw.ggF_qcd_2017.push_back(hw.qcd_wg1_res);
+    hw.ggF_qcd_2017.push_back(hw.qcd_wg1_mig01);
+    hw.ggF_qcd_2017.push_back(hw.qcd_wg1_mig12);
+
+    // Add in the VBF uncertainties here
+    hw.ggF_qcd_2017.push_back(hw.qcd_wg1_vbf2j);
+    hw.ggF_qcd_2017.push_back(hw.qcd_wg1_vbf3j);
+
+    // Smooth pTH uncertainties
+    double pTH60 = w_nom, pTH120 = w_nom;
+
+    if (Njets == 1) { pTH60 *= linInter(pTH, 20, 0.9, 100, 1.1); }
+    else if (Njets >= 2) { pTH60 *= linInter(pTH, 0, 0.9, 180, 1.10); } // >=2 jets
+
+    if (Njets > 0) { pTH120 *= linInter(pTH, 90, 0.984, 160, 1.14); }
+
+    hw.ggF_qcd_2017.push_back(pTH60);
+    hw.ggF_qcd_2017.push_back(pTH120);
+
+    hw.ggF_qcd_2017.push_back(hw.qcd_wg1_qm_t);
+
+    return hw;
+  }
+
+} // namespace xAOD
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/IndexRetriever.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/IndexRetriever.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..8b2bcef3842daac1653af20c253f073c82a0e889
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/IndexRetriever.cxx
@@ -0,0 +1,33 @@
+#include "TruthWeightTools/IndexRetriever.h"
+
+IndexRetriever::IndexRetriever(std::string weightName):
+  m_WeightName(weightName) {}
+
+void IndexRetriever::update(xAOD::TruthMetaData const *const truthMetaData)
+{
+
+  if (!truthMetaData) {
+    m_isValid = false;
+    return;
+  }
+
+  update(truthMetaData->weightNames());
+}
+
+void IndexRetriever::update(const std::vector<std::string> &weightNameVec)
+{
+
+  if (!weightNameVec.size()) {
+    m_isValid = false;
+    return;
+  }
+
+  auto weightPosItr = std::find(weightNameVec.begin(), weightNameVec.end(), m_WeightName);
+
+  if (weightPosItr != weightNameVec.end()) {
+    m_isValid = true;
+    m_currentIndex = static_cast<size_t>(weightPosItr - weightNameVec.begin());
+  } else {
+    m_isValid = false;
+  }
+}
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/TruthWeightTool.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/TruthWeightTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..74d86b6e82e328af0bf0bcdec228d47bcdbd003c
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/TruthWeightTool.cxx
@@ -0,0 +1,157 @@
+// $Id$
+
+// Local include(s):
+#include "TruthWeightTools/TruthWeightTool.h"
+#include "TString.h"
+
+#ifndef XAOD_STANDALONE
+  #include "AthAnalysisBaseComps/AthAnalysisHelper.h"
+#endif
+
+namespace xAOD
+{
+
+  TruthWeightTool::TruthWeightTool(const std::string &name):
+    asg::AsgMetadataTool(name), m_metaDataContainer(nullptr),
+    m_metaData(nullptr), m_uninitialized(true), m_evtInfo(nullptr)
+  {
+    declareProperty("MetaObjectName", m_metaName = "TruthMetaData");
+  }
+
+  StatusCode TruthWeightTool::initialize()
+  {
+    ATH_MSG_DEBUG("Initialising... ");
+    return StatusCode::SUCCESS;
+  }
+
+  std::shared_ptr<IIndexRetriever> TruthWeightTool::spawnIndexRetriever(std::string weightName)
+  {
+    auto sp = m_indexRetrievers[weightName].lock();
+
+    if (!sp) {
+      m_indexRetrievers[weightName] = sp = std::make_shared<IndexRetriever>(weightName);
+
+      if (!m_metaData) { sp->update(m_poolWeightNames); }
+      else { sp->update(m_metaData); }
+    }
+
+    return sp;
+  }
+
+  size_t TruthWeightTool::getWeightIndex(std::string weightName)
+  {
+    auto sp = spawnIndexRetriever(weightName);
+
+    if (!sp) { ATH_MSG_ERROR("Requested weight \'" + weightName + "\' doesn't exist"); return 0; }
+
+    return sp->getIndex();
+  }
+
+  void TruthWeightTool::onNewMetaData()
+  {
+    ATH_MSG_DEBUG("Updating all spawned index retreivers");
+
+    for (auto &indexRetriever : m_indexRetrievers) {
+      auto sp = indexRetriever.second.lock();
+
+      if (sp) { sp->update(m_metaData); }
+    }
+  }
+
+  StatusCode TruthWeightTool::beginInputFile()
+  {
+    ATH_MSG_DEBUG("Retrieving truth meta data from a new file");
+    m_metaDataContainer = nullptr;
+    m_poolWeightNames.clear();
+
+    if (inputMetaStore()->retrieve(m_metaDataContainer, m_metaName).isFailure()) {
+#ifdef XAOD_STANDALONE
+      // it's all over for eventloop release
+      throw std::runtime_error("Cannot access metadata: " + m_metaName);
+      return StatusCode::FAILURE;
+#else
+      // for athena release, one more try ... the POOL metadata!
+      // See https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AthAnalysisBase#How_to_read_the_truth_weight_nam
+      std::map<std::string, int> weightNamesMap;
+
+      if (AAH::retrieveMetadata("/Generation/Parameters", "HepMCWeightNames", weightNamesMap, inputMetaStore()).isFailure()) {
+        //ok now it really is all over
+        throw std::runtime_error(name() + " : Cannot access metadata: " + m_metaName + " and failed to get names from IOVMetadata");
+        return StatusCode::FAILURE;
+      }
+
+      //convert map into ordered vector
+      m_poolWeightNames.resize(weightNamesMap.size());
+
+      for (auto &w : weightNamesMap) { m_poolWeightNames[w.second] = w.first; }
+
+      //Now weightNames is a vector of weightnames in the correct order. ... we are done here
+      return StatusCode::SUCCESS;
+#endif
+    }
+
+    if (m_metaDataContainer == nullptr) { throw std::runtime_error("Cannot access metadata: " + m_metaName); }
+
+    // Set the current MC channel number to a large number to force updating
+    // the meta data on the first event of the new file
+    m_mcChanNo = 999999999;
+    return StatusCode::SUCCESS;
+  }
+
+  StatusCode TruthWeightTool::beginEvent()
+  {
+    m_evtInfo = nullptr;
+    ATH_CHECK(evtStore()->retrieve(m_evtInfo, "EventInfo"));
+    uint32_t mcChannelNumber = m_evtInfo->mcChannelNumber();
+
+    if (m_poolWeightNames.size()) { m_uninitialized = false; return StatusCode::SUCCESS; }
+
+    if (!m_metaDataContainer) { return StatusCode::FAILURE; }
+
+    if (m_uninitialized || (mcChannelNumber != m_mcChanNo)) {
+
+      for (auto metaData : *m_metaDataContainer) {
+        if (metaData->mcChannelNumber() == mcChannelNumber) {
+          m_uninitialized = false;
+          m_mcChanNo = mcChannelNumber;
+          m_metaData = metaData;
+          this->onNewMetaData();
+          return StatusCode::SUCCESS;
+        }
+      }
+
+      ATH_MSG_ERROR("No matching TruthMetaData found");
+      return StatusCode::FAILURE;
+    }
+
+    return StatusCode::SUCCESS;
+  }
+
+  std::vector<std::string> const &TruthWeightTool::getWeightNames() const
+  {
+    if (m_uninitialized) {
+      ATH_MSG_ERROR("Weight name not found in event, is the meta data already loaded?");
+      throw std::runtime_error("Weight name not found in event, is the meta data already loaded?");
+    }
+
+    if (m_poolWeightNames.size()) { return m_poolWeightNames; }
+
+    return m_metaData->weightNames();
+  }
+
+  bool TruthWeightTool::hasWeight(std::string weightName)
+  {
+    const std::vector<std::string> &wns = getWeightNames();
+    return std::find(wns.begin(), wns.end(), weightName) != wns.end();
+  }
+
+  const std::vector<float> &TruthWeightTool::getWeights() const
+  {
+    if (m_uninitialized || m_evtInfo == nullptr)
+    { throw std::runtime_error("Cannot access MC weights. Tool is not properly initialized."); }
+
+    // TODO: first check truth event. Else take from EventInfo. Check number of weights
+    return m_evtInfo->mcEventWeights();
+  }
+
+} // namespace xAOD
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/ggF_nnlops_weights.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/ggF_nnlops_weights.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..d71aadc95db383a0fc8f1cb849b28208a525f381
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/ggF_nnlops_weights.cxx
@@ -0,0 +1,190 @@
+// $Id$
+
+// Local include(s):
+#include "TruthWeightTools/HiggsWeightTool.h"
+#include <vector>
+#include <string>
+
+const std::vector<std::string> xAOD::HiggsWeightTool::getDefaultNNLOPSweightNames()
+{
+  return {" nominal ",
+          " muR = 0.5, muF = 0.5 ",
+          " muR = 1.0, muF = 0.5 ",
+          " muR = 2.0, muF = 0.5 ",
+          " muR = 0.5, muF = 1.0 ",
+          " muR = 2.0, muF = 1.0 ",
+          " muR = 0.5, muF = 2.0 ",
+          " muR = 1.0, muF = 2.0 ",
+          " muR = 2.0, muF = 2.0 ",
+          " PDF set = 91400 ",
+          " PDF set = 260000 ",
+          " PDF set = 260001 ",
+          " PDF set = 260002 ",
+          " PDF set = 260003 ",
+          " PDF set = 260004 ",
+          " PDF set = 260005 ",
+          " PDF set = 260006 ",
+          " PDF set = 260007 ",
+          " PDF set = 260008 ",
+          " PDF set = 260009 ",
+          " PDF set = 260010 ",
+          " PDF set = 260011 ",
+          " PDF set = 260012 ",
+          " PDF set = 260013 ",
+          " PDF set = 260014 ",
+          " PDF set = 260015 ",
+          " PDF set = 260016 ",
+          " PDF set = 260017 ",
+          " PDF set = 260018 ",
+          " PDF set = 260019 ",
+          " PDF set = 260020 ",
+          " PDF set = 260021 ",
+          " PDF set = 260022 ",
+          " PDF set = 260023 ",
+          " PDF set = 260024 ",
+          " PDF set = 260025 ",
+          " PDF set = 260026 ",
+          " PDF set = 260027 ",
+          " PDF set = 260028 ",
+          " PDF set = 260029 ",
+          " PDF set = 260030 ",
+          " PDF set = 260031 ",
+          " PDF set = 260032 ",
+          " PDF set = 260033 ",
+          " PDF set = 260034 ",
+          " PDF set = 260035 ",
+          " PDF set = 260036 ",
+          " PDF set = 260037 ",
+          " PDF set = 260038 ",
+          " PDF set = 260039 ",
+          " PDF set = 260040 ",
+          " PDF set = 260041 ",
+          " PDF set = 260042 ",
+          " PDF set = 260043 ",
+          " PDF set = 260044 ",
+          " PDF set = 260045 ",
+          " PDF set = 260046 ",
+          " PDF set = 260047 ",
+          " PDF set = 260048 ",
+          " PDF set = 260049 ",
+          " PDF set = 260050 ",
+          " PDF set = 260051 ",
+          " PDF set = 260052 ",
+          " PDF set = 260053 ",
+          " PDF set = 260054 ",
+          " PDF set = 260055 ",
+          " PDF set = 260056 ",
+          " PDF set = 260057 ",
+          " PDF set = 260058 ",
+          " PDF set = 260059 ",
+          " PDF set = 260060 ",
+          " PDF set = 260061 ",
+          " PDF set = 260062 ",
+          " PDF set = 260063 ",
+          " PDF set = 260064 ",
+          " PDF set = 260065 ",
+          " PDF set = 260066 ",
+          " PDF set = 260067 ",
+          " PDF set = 260068 ",
+          " PDF set = 260069 ",
+          " PDF set = 260070 ",
+          " PDF set = 260071 ",
+          " PDF set = 260072 ",
+          " PDF set = 260073 ",
+          " PDF set = 260074 ",
+          " PDF set = 260075 ",
+          " PDF set = 260076 ",
+          " PDF set = 260077 ",
+          " PDF set = 260078 ",
+          " PDF set = 260079 ",
+          " PDF set = 260080 ",
+          " PDF set = 260081 ",
+          " PDF set = 260082 ",
+          " PDF set = 260083 ",
+          " PDF set = 260084 ",
+          " PDF set = 260085 ",
+          " PDF set = 260086 ",
+          " PDF set = 260087 ",
+          " PDF set = 260088 ",
+          " PDF set = 260089 ",
+          " PDF set = 260090 ",
+          " PDF set = 260091 ",
+          " PDF set = 260092 ",
+          " PDF set = 260093 ",
+          " PDF set = 260094 ",
+          " PDF set = 260095 ",
+          " PDF set = 260096 ",
+          " PDF set = 260097 ",
+          " PDF set = 260098 ",
+          " PDF set = 260099 ",
+          " PDF set = 260100 ",
+          " PDF set = 90400 ",
+          " PDF set = 90401 ",
+          " PDF set = 90402 ",
+          " PDF set = 90403 ",
+          " PDF set = 90404 ",
+          " PDF set = 90405 ",
+          " PDF set = 90406 ",
+          " PDF set = 90407 ",
+          " PDF set = 90408 ",
+          " PDF set = 90409 ",
+          " PDF set = 90410 ",
+          " PDF set = 90411 ",
+          " PDF set = 90412 ",
+          " PDF set = 90413 ",
+          " PDF set = 90414 ",
+          " PDF set = 90415 ",
+          " PDF set = 90416 ",
+          " PDF set = 90417 ",
+          " PDF set = 90418 ",
+          " PDF set = 90419 ",
+          " PDF set = 90420 ",
+          " PDF set = 90421 ",
+          " PDF set = 90422 ",
+          " PDF set = 90423 ",
+          " PDF set = 90424 ",
+          " PDF set = 90425 ",
+          " PDF set = 90426 ",
+          " PDF set = 90427 ",
+          " PDF set = 90428 ",
+          " PDF set = 90429 ",
+          " PDF set = 90430 ",
+          " PDF set = 90431 ",
+          " PDF set = 90432 ",
+          " PDF set = 11000 ",
+          " PDF set = 25200 ",
+          " PDF set = 13100 ",
+          " mtmb ",
+          " mtinf ",
+          " mtmb-bminlo ",
+          " nnlops-nominal ",
+          " nnlops-nominal-pdflhc ",
+          " nnlops-mtinf ",
+          " nnlops-bminlo ",
+          " nnlops-nnloNom-pwgDnDn ",
+          " nnlops-nnloNom-pwgDnNom ",
+          " nnlops-nnloNom-pwgDnUp ",
+          " nnlops-nnloNom-pwgNomDn ",
+          " nnlops-nnloNom-pwgNomUp ",
+          " nnlops-nnloNom-pwgUpDn ",
+          " nnlops-nnloNom-pwgUpNom ",
+          " nnlops-nnloNom-pwgUpUp ",
+          " nnlops-nnloDn-pwgNomNom ",
+          " nnlops-nnloDn-pwgDnDn ",
+          " nnlops-nnloDn-pwgDnNom ",
+          " nnlops-nnloDn-pwgDnUp ",
+          " nnlops-nnloDn-pwgNomDn ",
+          " nnlops-nnloDn-pwgNomUp ",
+          " nnlops-nnloDn-pwgUpDn ",
+          " nnlops-nnloDn-pwgUpNom ",
+          " nnlops-nnloDn-pwgUpUp ",
+          " nnlops-nnloUp-pwgNomNom ",
+          " nnlops-nnloUp-pwgDnDn ",
+          " nnlops-nnloUp-pwgDnNom ",
+          " nnlops-nnloUp-pwgDnUp ",
+          " nnlops-nnloUp-pwgNomDn ",
+          " nnlops-nnloUp-pwgNomUp ",
+          " nnlops-nnloUp-pwgUpDn ",
+          " nnlops-nnloUp-pwgUpNom ",
+          " nnlops-nnloUp-pwgUpUp "};
+}
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/run2_vbf_weightStructure.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/run2_vbf_weightStructure.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..00c4d1cdae9965758f7174cc567e47af4cccb4c9
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/run2_vbf_weightStructure.cxx
@@ -0,0 +1,168 @@
+/*
+ * The followin information is extracted using Marjorie's script as expelained at
+ * https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/LHE3EventWeights
+ *
+ * As input, files downloiaded by Jared Vasquez are used
+ * checkMetaSG.py /eos/atlas/user/j/jvasquez/public/mc15_13TeV.345319.PowhegPythia8EvtGen_NNPDF30_AZNLO_ZH125J_Hyy_Zincl_MINLO.merge.DAOD_HIGG1D1.e5743_s2726_r7772_r7676_p3015/DAOD_HIGG1D1.10803453._000002.pool.root.1 | tee metadata_ZH.txt
+ * Exactly the same structre is observed in the W+H and W-H samples (also downloaded by Jared)
+ *
+ * from makeWeightMetaData import *
+ * dsid=0
+ * makeWeightMetaData("metadata_ZH.txt",dsid,"meta_ZH.h")
+ *
+ * Slightly reformatting the output to get a vector of strings
+ * grep var meta_WmH.h | grep inser |grep -v 150\, | cut -f3 -d'(' | cut -f1 -d')' | awk -F'", ' '{print $2"--"$1"\""}' | sort -n
+ *
+ */
+
+// Local include(s):
+#include "TruthWeightTools/HiggsWeightTool.h"
+#include <vector>
+#include <string>
+
+const std::vector<std::string> xAOD::HiggsWeightTool::getDefaultVBFweightNames()
+{
+  return {" nominal ",
+          " muR = 0.5, muF = 0.5 ",
+          " muR = 1.0, muF = 0.5 ",
+          " muR = 2.0, muF = 0.5 ",
+          " muR = 0.5, muF = 2.0 ",
+          " muR = 1.0, muF = 2.0 ",
+          " muR = 2.0, muF = 2.0 ",
+          " PDF set = 260001 ",
+          " PDF set = 260002 ",
+          " PDF set = 260003 ",
+          " PDF set = 260004 ",
+          " PDF set = 260005 ",
+          " PDF set = 260006 ",
+          " PDF set = 260007 ",
+          " PDF set = 260008 ",
+          " PDF set = 260009 ",
+          " PDF set = 260010 ",
+          " PDF set = 260011 ",
+          " PDF set = 260012 ",
+          " PDF set = 260013 ",
+          " PDF set = 260014 ",
+          " PDF set = 260015 ",
+          " PDF set = 260016 ",
+          " PDF set = 260017 ",
+          " PDF set = 260018 ",
+          " PDF set = 260019 ",
+          " PDF set = 260020 ",
+          " PDF set = 260021 ",
+          " PDF set = 260022 ",
+          " PDF set = 260023 ",
+          " PDF set = 260024 ",
+          " PDF set = 260025 ",
+          " PDF set = 260026 ",
+          " PDF set = 260027 ",
+          " PDF set = 260028 ",
+          " PDF set = 260029 ",
+          " PDF set = 260030 ",
+          " PDF set = 260031 ",
+          " PDF set = 260032 ",
+          " PDF set = 260033 ",
+          " PDF set = 260034 ",
+          " PDF set = 260035 ",
+          " PDF set = 260036 ",
+          " PDF set = 260037 ",
+          " PDF set = 260038 ",
+          " PDF set = 260039 ",
+          " PDF set = 260040 ",
+          " PDF set = 260041 ",
+          " PDF set = 260042 ",
+          " PDF set = 260043 ",
+          " PDF set = 260044 ",
+          " PDF set = 260045 ",
+          " PDF set = 260046 ",
+          " PDF set = 260047 ",
+          " PDF set = 260048 ",
+          " PDF set = 260049 ",
+          " PDF set = 260050 ",
+          " PDF set = 260051 ",
+          " PDF set = 260052 ",
+          " PDF set = 260053 ",
+          " PDF set = 260054 ",
+          " PDF set = 260055 ",
+          " PDF set = 260056 ",
+          " PDF set = 260057 ",
+          " PDF set = 260058 ",
+          " PDF set = 260059 ",
+          " PDF set = 260060 ",
+          " PDF set = 260061 ",
+          " PDF set = 260062 ",
+          " PDF set = 260063 ",
+          " PDF set = 260064 ",
+          " PDF set = 260065 ",
+          " PDF set = 260066 ",
+          " PDF set = 260067 ",
+          " PDF set = 260068 ",
+          " PDF set = 260069 ",
+          " PDF set = 260070 ",
+          " PDF set = 260071 ",
+          " PDF set = 260072 ",
+          " PDF set = 260073 ",
+          " PDF set = 260074 ",
+          " PDF set = 260075 ",
+          " PDF set = 260076 ",
+          " PDF set = 260077 ",
+          " PDF set = 260078 ",
+          " PDF set = 260079 ",
+          " PDF set = 260080 ",
+          " PDF set = 260081 ",
+          " PDF set = 260082 ",
+          " PDF set = 260083 ",
+          " PDF set = 260084 ",
+          " PDF set = 260085 ",
+          " PDF set = 260086 ",
+          " PDF set = 260087 ",
+          " PDF set = 260088 ",
+          " PDF set = 260089 ",
+          " PDF set = 260090 ",
+          " PDF set = 260091 ",
+          " PDF set = 260092 ",
+          " PDF set = 260093 ",
+          " PDF set = 260094 ",
+          " PDF set = 260095 ",
+          " PDF set = 260096 ",
+          " PDF set = 260097 ",
+          " PDF set = 260098 ",
+          " PDF set = 260099 ",
+          " PDF set = 260100 ",
+          " PDF set = 90400 ",
+          " PDF set = 90401 ",
+          " PDF set = 90402 ",
+          " PDF set = 90403 ",
+          " PDF set = 90404 ",
+          " PDF set = 90405 ",
+          " PDF set = 90406 ",
+          " PDF set = 90407 ",
+          " PDF set = 90408 ",
+          " PDF set = 90409 ",
+          " PDF set = 90410 ",
+          " PDF set = 90411 ",
+          " PDF set = 90412 ",
+          " PDF set = 90413 ",
+          " PDF set = 90414 ",
+          " PDF set = 90415 ",
+          " PDF set = 90416 ",
+          " PDF set = 90417 ",
+          " PDF set = 90418 ",
+          " PDF set = 90419 ",
+          " PDF set = 90420 ",
+          " PDF set = 90421 ",
+          " PDF set = 90422 ",
+          " PDF set = 90423 ",
+          " PDF set = 90424 ",
+          " PDF set = 90425 ",
+          " PDF set = 90426 ",
+          " PDF set = 90427 ",
+          " PDF set = 90428 ",
+          " PDF set = 90429 ",
+          " PDF set = 90430 ",
+          " PDF set = 90431 ",
+          " PDF set = 90432 ",
+          " PDF set = 11068 ",
+          " PDF set = 25200 ",
+          " PDF set = 13165 "};
+}
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/run2_vh_weightStructure.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/run2_vh_weightStructure.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..7b21878f1744241f5da5da29e677c11188d8afb1
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/Root/run2_vh_weightStructure.cxx
@@ -0,0 +1,168 @@
+/*
+ * The followin information is extracted using Marjorie's script as expelained at
+ * https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/LHE3EventWeights
+ *
+ * As input, files downloiaded by Jared Vasquez are used
+ * checkMetaSG.py /eos/atlas/user/j/jvasquez/public/mc15_13TeV.345319.PowhegPythia8EvtGen_NNPDF30_AZNLO_ZH125J_Hyy_Zincl_MINLO.merge.DAOD_HIGG1D1.e5743_s2726_r7772_r7676_p3015/DAOD_HIGG1D1.10803453._000002.pool.root.1 | tee metadata_ZH.txt
+ * Exactly the same structre is observed in the W+H and W-H samples (also downloaded by Jared)
+ *
+ * from makeWeightMetaData import *
+ * dsid=0
+ * makeWeightMetaData("metadata_ZH.txt",dsid,"meta_ZH.h")
+ *
+ * Slightly reformatting the output to get a vector of strings
+ * grep var meta_WmH.h | grep inser |grep -v 150\, | cut -f3 -d'(' | cut -f1 -d')' | awk -F'", ' '{print $2"--"$1"\""}' | sort -n
+ *
+ */
+
+// Local include(s):
+#include "TruthWeightTools/HiggsWeightTool.h"
+#include <vector>
+#include <string>
+
+const std::vector<std::string> xAOD::HiggsWeightTool::getDefaultVHweightNames()
+{
+  return {"nominal ",
+          " muR = 0.5, muF = 1.0 ",
+          " muR = 2.0, muF = 1.0 ",
+          " muR = 1.0, muF = 0.5 ",
+          " muR = 0.5, muF = 0.5 ",
+          " muR = 2.0, muF = 0.5 ",
+          " muR = 1.0, muF = 2.0 ",
+          " muR = 0.5, muF = 2.0 ",
+          " muR = 2.0, muF = 2.0 ",
+          " PDF set = 260001 ",
+          " PDF set = 260002 ",
+          " PDF set = 260003 ",
+          " PDF set = 260004 ",
+          " PDF set = 260005 ",
+          " PDF set = 260006 ",
+          " PDF set = 260007 ",
+          " PDF set = 260008 ",
+          " PDF set = 260009 ",
+          " PDF set = 260010 ",
+          " PDF set = 260011 ",
+          " PDF set = 260012 ",
+          " PDF set = 260013 ",
+          " PDF set = 260014 ",
+          " PDF set = 260015 ",
+          " PDF set = 260016 ",
+          " PDF set = 260017 ",
+          " PDF set = 260018 ",
+          " PDF set = 260019 ",
+          " PDF set = 260020 ",
+          " PDF set = 260021 ",
+          " PDF set = 260022 ",
+          " PDF set = 260023 ",
+          " PDF set = 260024 ",
+          " PDF set = 260025 ",
+          " PDF set = 260026 ",
+          " PDF set = 260027 ",
+          " PDF set = 260028 ",
+          " PDF set = 260029 ",
+          " PDF set = 260030 ",
+          " PDF set = 260031 ",
+          " PDF set = 260032 ",
+          " PDF set = 260033 ",
+          " PDF set = 260034 ",
+          " PDF set = 260035 ",
+          " PDF set = 260036 ",
+          " PDF set = 260037 ",
+          " PDF set = 260038 ",
+          " PDF set = 260039 ",
+          " PDF set = 260040 ",
+          " PDF set = 260041 ",
+          " PDF set = 260042 ",
+          " PDF set = 260043 ",
+          " PDF set = 260044 ",
+          " PDF set = 260045 ",
+          " PDF set = 260046 ",
+          " PDF set = 260047 ",
+          " PDF set = 260048 ",
+          " PDF set = 260049 ",
+          " PDF set = 260050 ",
+          " PDF set = 260051 ",
+          " PDF set = 260052 ",
+          " PDF set = 260053 ",
+          " PDF set = 260054 ",
+          " PDF set = 260055 ",
+          " PDF set = 260056 ",
+          " PDF set = 260057 ",
+          " PDF set = 260058 ",
+          " PDF set = 260059 ",
+          " PDF set = 260060 ",
+          " PDF set = 260061 ",
+          " PDF set = 260062 ",
+          " PDF set = 260063 ",
+          " PDF set = 260064 ",
+          " PDF set = 260065 ",
+          " PDF set = 260066 ",
+          " PDF set = 260067 ",
+          " PDF set = 260068 ",
+          " PDF set = 260069 ",
+          " PDF set = 260070 ",
+          " PDF set = 260071 ",
+          " PDF set = 260072 ",
+          " PDF set = 260073 ",
+          " PDF set = 260074 ",
+          " PDF set = 260075 ",
+          " PDF set = 260076 ",
+          " PDF set = 260077 ",
+          " PDF set = 260078 ",
+          " PDF set = 260079 ",
+          " PDF set = 260080 ",
+          " PDF set = 260081 ",
+          " PDF set = 260082 ",
+          " PDF set = 260083 ",
+          " PDF set = 260084 ",
+          " PDF set = 260085 ",
+          " PDF set = 260086 ",
+          " PDF set = 260087 ",
+          " PDF set = 260088 ",
+          " PDF set = 260089 ",
+          " PDF set = 260090 ",
+          " PDF set = 260091 ",
+          " PDF set = 260092 ",
+          " PDF set = 260093 ",
+          " PDF set = 260094 ",
+          " PDF set = 260095 ",
+          " PDF set = 260096 ",
+          " PDF set = 260097 ",
+          " PDF set = 260098 ",
+          " PDF set = 260099 ",
+          " PDF set = 260100 ",
+          " PDF set = 90400 ",
+          " PDF set = 90401 ",
+          " PDF set = 90402 ",
+          " PDF set = 90403 ",
+          " PDF set = 90404 ",
+          " PDF set = 90405 ",
+          " PDF set = 90406 ",
+          " PDF set = 90407 ",
+          " PDF set = 90408 ",
+          " PDF set = 90409 ",
+          " PDF set = 90410 ",
+          " PDF set = 90411 ",
+          " PDF set = 90412 ",
+          " PDF set = 90413 ",
+          " PDF set = 90414 ",
+          " PDF set = 90415 ",
+          " PDF set = 90416 ",
+          " PDF set = 90417 ",
+          " PDF set = 90418 ",
+          " PDF set = 90419 ",
+          " PDF set = 90420 ",
+          " PDF set = 90421 ",
+          " PDF set = 90422 ",
+          " PDF set = 90423 ",
+          " PDF set = 90424 ",
+          " PDF set = 90425 ",
+          " PDF set = 90426 ",
+          " PDF set = 90427 ",
+          " PDF set = 90428 ",
+          " PDF set = 90429 ",
+          " PDF set = 90430 ",
+          " PDF set = 90431 ",
+          " PDF set = 90432 "};
+}
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/HiggsWeightTool.h b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/HiggsWeightTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..14b2a5c5860cebc2b857b1fa804a1406a4ca6b3f
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/HiggsWeightTool.h
@@ -0,0 +1,276 @@
+// $Id$
+#ifndef TRUTHWEIGHTTOOLS_HIGGSWEIGHTTOOL_H
+#define TRUTHWEIGHTTOOLS_HIGGSWEIGHTTOOL_H
+
+// Local include(s):
+#include "TruthWeightTools/TruthWeightTool.h"
+#include "xAODTruth/TruthEvent.h"
+
+namespace xAOD
+{
+
+  /// Struct-like class for Higgs weights
+  //// @author Dag Gillberg <dag.gillberg@cern.ch>
+  class HiggsWeights
+  {
+  public:
+    /// Nominal event weight
+    double nominal, weight0;
+
+    /// 30 PDF4LHC uncertainty variations + alphaS up/down
+    std::vector<double> pdf4lhc_unc, nnpdf30_unc;
+    double alphaS_up, alphaS_dn;
+
+    /// Weights to reweigh central to a different PDF set
+    /// If the PDF set is not present in file, this weight will be zero
+    double nnpdf30_nlo, nnpdf30_nnlo, mmht2014nlo, pdf4lhc_nlo, pdf4lhc_nnlo;
+    double ct10nlo, ct10nlo_0118, ct14nlo, ct14nlo_0118;
+
+    /// QCD scale variations (muR,muF)
+    std::vector<double> qcd;
+
+
+    /// Special weights for Powheg ggF NNLOPS
+    /// 1. QCD scale variations 3x(NNLO), 9xPowheg(muR,muF) - 26 variations
+    std::vector<double> qcd_nnlops;
+
+    /// 2. quark mass variations
+    double mt_inf, mb_minlo;
+
+    /// ggF specific uncertainty weights
+    /// various different schemes
+
+    /// WG1 proposed QCD uncertainty scheme
+    double qcd_wg1_mu, qcd_wg1_res, qcd_wg1_mig01, qcd_wg1_mig12;
+    double qcd_wg1_pTH, qcd_wg1_qm_b, qcd_wg1_qm_t, qcd_wg1_vbf2j, qcd_wg1_vbf3j;
+
+    /// WG1 proposed uncertainty scheme
+    std::vector<double> ggF_qcd_wg1()
+    {
+      return {qcd_wg1_mu, qcd_wg1_res, qcd_wg1_mig01, qcd_wg1_mig12,
+              qcd_wg1_vbf2j, qcd_wg1_vbf3j, qcd_wg1_pTH, qcd_wg1_qm_t};
+    }
+
+    /// Tackmann proposed QCD uncertainty scheme
+    std::vector<double> ggF_qcd_stxs;
+
+    /// Merging of STXS and WG1 schemes
+    std::vector<double> ggF_qcd_2017;
+
+    /// Jet veto efficiency method for cross check
+    std::vector<double> ggF_qcd_jve;
+
+    /// Powheg NNLOPS possible scheme
+    double qcd_nnlops_nnlo, qcd_nnlops_pow;
+
+    /// information of the current event kinematiocs
+    double pTH;
+    int Njets30, STXS;
+
+    /// methods to print weights to the screen
+    char *uncStr(double var, double nom) { return var == 0 ? Form("  N/A") : Form("%s%.1f%%", var >= nom ? "+" : "", (var - nom) / nom * 100); }
+    void print()
+    {
+      double n = nominal;
+      printf("\n------\n  Higgs MC weights of current event, pTH = %.1f GeV, Njets = %i\n",
+             pTH, Njets30);
+      printf("    Nominal weight: %.3f\n", nominal);
+      printf("    Weight 0:       %.3f\n", weight0);
+
+      printf("\n   There are %lu PDF4LHC NLO uncertainty variations\n", pdf4lhc_unc.size());
+
+      if (pdf4lhc_unc.size() == 30) {
+        printf("    PDF unc  1-10:");
+
+        for (size_t i = 0; i < 10; ++i) { printf(" %s", uncStr(pdf4lhc_unc[i], n)); }
+
+        printf("\n    PDF unc 11-20:");
+
+        for (size_t i = 10; i < 20; ++i) { printf(" %s", uncStr(pdf4lhc_unc[i], n)); }
+
+        printf("\n    PDF unc 21-30:");
+
+        for (size_t i = 20; i < 30; ++i) { printf(" %s", uncStr(pdf4lhc_unc[i], n)); }
+
+        printf("\n    alphaS up: %s, down: %s\n",
+               uncStr(alphaS_up, n), uncStr(alphaS_dn, n));
+      }
+
+      printf("\n   There are %lu NNPDF 3.0 NLO uncertainty variations\n", nnpdf30_unc.size());
+
+      // NNLOPS Specific stuff
+      if (qcd_nnlops.size()) {
+        printf("\n    ggF Powheg NNLOPS with %lu QCD uncertainty variations\n",
+               qcd_nnlops.size());
+        // for (auto q:qcd_nnlops) printf(" %s",uncStr(q,n)); printf("\n");
+
+        printf("\n    Quark mass variations  (m_top=inf): %s  (m_b minlo): %s\n",
+               uncStr(mt_inf, n), uncStr(mb_minlo, n));
+        printf("\n    WG1 proposed QCD uncertainty scheme\n");
+        printf("      mu: %s,   res: %s,   mig01: %s,   mig12: %s\n",
+               uncStr(qcd_wg1_mu, n), uncStr(qcd_wg1_res, n), uncStr(qcd_wg1_mig01, n), uncStr(qcd_wg1_mig12, n));
+        printf("      pTH: %s,   quark-mass, b: %s, t: %s\n",
+               uncStr(qcd_wg1_pTH, n), uncStr(qcd_wg1_qm_b, n), uncStr(qcd_wg1_qm_b, n));
+
+      }
+
+      if (qcd.size()) {
+        printf("\n    %lu Powheg QCD scale variations\n   ", qcd_nnlops.size());
+
+        for (auto q : qcd) { printf(" %s", uncStr(q, n)); }
+
+        printf("\n");
+      }
+
+      printf("\n   PDF central values\n");
+      printf("     PDF4LHC_nlo:  %s, PDF4LHC_nnlo: %s\n", uncStr(pdf4lhc_nlo, n), uncStr(pdf4lhc_nnlo, n));
+      printf("     NNPDF30_nlo:  %s, NNPDF30_nnlo: %s\n", uncStr(nnpdf30_nlo, n), uncStr(nnpdf30_nnlo, n));
+      printf("     CT10nlo:      %s, CT14nlo:      %s\n", uncStr(ct10nlo, n), uncStr(ct14nlo, n));
+      printf("     CT10nlo_0118: %s, CT14nlo_0118: %s\n", uncStr(ct10nlo_0118, n), uncStr(ct14nlo_0118, n));
+      printf("     MMHT2014nlo:  %s\n", uncStr(mmht2014nlo, n));
+      printf("\n------\n");
+    } // print()
+
+  };
+
+  /// Tool for accessing of MC weights and other weigthts for QCD uncertainty propagation for Higgs analyses
+  ///
+  /// @author Dag Gillberg <dag.gillberg@cern.ch>
+  ///
+  /// $Revision$
+  /// $Date$
+  ///
+  class HiggsWeightTool : public asg::AsgTool
+  {
+  public:
+
+    /// Create a constructor for standalone usage
+    HiggsWeightTool(const std::string &name = "xAOD::TruthWeightTool");
+    virtual ~HiggsWeightTool() {}
+
+    virtual StatusCode initialize();
+
+    virtual StatusCode finalize();
+
+    /// @name Function(s) accessed via the truth weight tool
+    /// @{
+
+    /// Get the MC weight vector
+    const std::vector<float> &getMCweights() const;
+
+    /// Value of MC event weight
+    float getWeight(std::string weightName);
+
+    /// Value of MC event weight
+    bool hasWeight(std::string weightName);
+
+    /// Index of MC event weight
+    size_t getWeightIndex(std::string weightName);
+
+    HiggsWeights getHiggsWeights(int HTXS_Njets30 = -1, double HTXS_pTH = -99.0, int HTXS_cat = -1);
+
+    // returns hardcoded list of weight names matching expecation
+    // of ATLAS-default ggF NNLOPS
+    const std::vector<std::string> getDefaultNNLOPSweightNames();
+    const std::vector<std::string> getDefaultVBFweightNames();
+    const std::vector<std::string> getDefaultVHweightNames();
+
+    /// Weight names in metadata
+    const std::vector<std::string> &getWeightNames();
+
+    /// @}
+
+  private:
+
+    /// linear interpolation
+    double linInter(double x, double x1, double y1, double x2, double y2)
+    {
+      if (x < x1) { return y1; }
+
+      if (x > x2) { return y2; }
+
+      return y1 + (y2 - y1) * (x - x1) / (x2 - x1);
+    }
+
+    /// Access the HiggsWeights
+    HiggsWeights getHiggsWeightsInternal(int HTXS_Njets30 = -1, double HTXS_pTH = -99.0, int HTXS_cat = -1);
+
+    /// Protect against non-finite or outside-reqired-range weights
+    void updateWeights(HiggsWeights &hw);
+    void updateWeight(const double &w_nom, double &w);
+    void updateWeights(const double &w_nom, std::vector<double> &ws) { for (auto &w : ws) updateWeight(w_nom, w); }
+    void updateWeights(const double &w_nom, double &w1, double &w2) { updateWeight(w_nom, w1); updateWeight(w_nom, w2); }
+    void updateWeights(const double &w_nom, double &w1, double &w2, double &w3) { updateWeights(w_nom, w1, w2); updateWeight(w_nom, w3); }
+
+
+    /// Setup weights
+    void setupWeights(size_t Nweights);
+
+    double getWeight(const std::vector<float> &ws, size_t idx)
+    {
+      if (idx == 0) { return 0.0; }
+
+      return ws.at(idx);
+    }
+
+    size_t getIndex(std::string wn)
+    {
+      if (hasWeight(wn)) { return getWeightIndex(wn); }
+
+      return 0;
+    }
+
+    /// Flags
+    bool m_init;
+
+    enum mode { AUTO = 0, FORCE_GGF_NNLOPS = 1, FORCE_POWPY8_VBF = 2, FORCE_POWPY8_VH = 3 };
+    mode m_mode;
+    bool m_forceNNLOPS, m_forceVBF, m_forceVH;
+
+    /// number of expected weights
+    size_t m_Nweights;
+
+    /// Current MC channel number
+    uint32_t m_mcID;
+
+    /// The truth weight tool
+    xAOD::TruthWeightTool *m_weightTool;
+
+    /// getWeight
+    double getWeight(size_t idx);
+
+    /// options
+    bool m_requireFinite;
+    bool m_cutOff;
+    double m_weightCutOff;
+
+    /// For statistics
+    int m_Nnom, m_Nws;
+    double m_sumw_nom, m_sumw2_nom, m_sumw, m_sumw2;
+    double m_sumw_nomC, m_sumw2_nomC, m_sumwC, m_sumw2C;
+
+    /// index of weights
+    size_t m_nom;
+
+    /// weight indices for PDF+alphaS uncertainites
+    std::vector<size_t> m_pdfUnc, m_pdfNNPDF30;
+    size_t m_aS_up, m_aS_dn;
+
+    /// Special PDF sets
+    size_t m_nnpdf30_nlo, m_nnpdf30_nnlo, m_mmht2014nlo, m_pdf4lhc_nlo, m_pdf4lhc_nnlo;
+    size_t m_ct10nlo, m_ct10nlo_0118, m_ct14nlo, m_ct14nlo_0118;
+
+    /// Special weight indices for Powheg NNLOPS
+    size_t m_tinf, m_bminlo, m_nnlopsNom;
+    std::vector<size_t> m_qcd, m_qcd_nnlops;
+
+  protected:
+    /// EventInfo
+    //const xAOD::EventInfo *m_evtInfo;
+    //const xAOD::TruthEvent *m_truthEvt;
+    //const std::vector<float> *m_weights;
+  };
+
+} // namespace xAOD
+
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/ITruthWeightTool.h b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/ITruthWeightTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..2efb82ac599ee23fec264a9f4e6b516d40d7dbe7
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/ITruthWeightTool.h
@@ -0,0 +1,54 @@
+// $Id$
+#ifndef TRUTHWEIGHTTOOLS_ITRUTHWEIGHTTOOL_H
+#define TRUTHWEIGHTTOOLS_ITRUTHWEIGHTTOOL_H
+
+//STL includes
+#include <memory>
+
+// Framework include(s):
+#include "AsgTools/IAsgTool.h"
+
+#include "TruthWeightTools/IndexRetriever.h"
+
+namespace xAOD
+{
+
+  /// Interface for xAOD Truth Weight Tool which retrieves
+  /// Meta Data from a truth record to interface the event
+  /// weights
+  ///
+  /// @author Tobias Bisanz <tobias.bisanz@cern.ch>
+  ///
+  /// $Revision$
+  /// $Date$
+  ///
+  class ITruthWeightTool : public virtual asg::IAsgTool
+  {
+
+    /// Declare the interface that the class provides
+    ASG_TOOL_INTERFACE(xAOD::ITruthWeightTool)
+
+  public:
+    virtual std::shared_ptr<IIndexRetriever> spawnIndexRetriever(std::string weightName) = 0;
+
+    /// Return weight names (descriptions) from meta data
+    virtual std::vector<std::string> const &getWeightNames() const = 0;
+
+    /// check if a weight exist
+    virtual bool hasWeight(std::string weightName) = 0;
+
+    /// return the MC weight vector. Same as accessing it from TruthEvent or EventInfo
+    virtual const std::vector<float> &getWeights() const = 0;
+
+    /// Return weight index
+    virtual size_t getWeightIndex(std::string weightName) = 0;
+
+    // Return the weight. Same as getWeights()[getWeightIndex(weightName)]
+    virtual float getWeight(std::string weightName) = 0;
+
+  }; // class ITruthWeightTool
+
+} // namespace xAOD
+
+#endif
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/IndexRetriever.h b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/IndexRetriever.h
new file mode 100644
index 0000000000000000000000000000000000000000..e86d6f586e36edfb5a1a53019c8e9bd0dbaf5e30
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/IndexRetriever.h
@@ -0,0 +1,43 @@
+#ifndef TRUTHWEIGHTTOOLS_INDEXRECEIVER_H
+#define TRUTHWEIGHTTOOLS_INDEXRECEIVER_H
+
+#include "xAODTruth/TruthMetaData.h"
+#include <stdexcept>
+
+class IIndexRetriever
+{
+
+public:
+  IIndexRetriever(): m_isValid(false) {};
+  virtual ~IIndexRetriever() {};
+  virtual void update(xAOD::TruthMetaData const *const) = 0;
+  virtual void update(const std::vector<std::string> &weightNamesVec) = 0;
+
+  virtual size_t getIndex() = 0;
+  //virtual size_t getIndex() {
+  //  if (!m_isValid) throw std::runtime_error("Weight name not found in event");
+  //  return m_currentIndex;
+  //}
+  virtual bool isValid() { return m_isValid;}
+protected:
+  bool m_isValid;
+  size_t m_currentIndex;
+};
+
+class IndexRetriever : public IIndexRetriever
+{
+public:
+  IndexRetriever(std::string);
+  virtual void update(xAOD::TruthMetaData const *const);
+  virtual void update(const std::vector<std::string> &weightNamesVec);
+  virtual size_t getIndex()
+  {
+    if (!m_isValid) { throw std::runtime_error("Weight \"" + m_WeightName + "\" not found in event"); }
+
+    return m_currentIndex;
+  }
+protected:
+  IndexRetriever();
+  std::string m_WeightName;
+};
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/TruthWeightTool.h b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/TruthWeightTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..74d01425bb8b79a38acc5fed3c4a620efb8e0898
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/TruthWeightTool.h
@@ -0,0 +1,124 @@
+// $Id$
+#ifndef TRUTHWEIGHTTOOLS_TRUTHWEIGHTTOOL_H
+#define TRUTHWEIGHTTOOLS_TRUTHWEIGHTTOOL_H
+
+//STL includes
+#include <memory>
+
+// Framework include(s):
+#include "AsgTools/AsgMetadataTool.h"
+
+// Local include(s):
+#include "TruthWeightTools/ITruthWeightTool.h"
+
+#include "xAODTruth/TruthMetaDataContainer.h"
+#include "xAODTruth/TruthMetaData.h"
+
+#include "xAODEventInfo/EventInfo.h"
+#include "xAODTruth/TruthEventContainer.h"
+
+namespace xAOD
+{
+
+  /// Implementation for the xAOD truth meta data weight tool
+  ///
+  /// @author Tobias Bisanz  <tobias.bisanz@cern.ch>
+  /// @author Dag Gillberg <dag.gillberg@cern.ch>, trivial modifications
+  ///
+  /// $Revision$
+  /// $Date$
+  ///
+  class TruthWeightTool
+    : public virtual ITruthWeightTool,
+      public asg::AsgMetadataTool
+  {
+
+    /// Create a proper constructor for Athena
+    ASG_TOOL_CLASS(TruthWeightTool, xAOD::ITruthWeightTool)
+
+  public:
+    /// Create a constructor for standalone usage
+    TruthWeightTool(const std::string &name = "xAOD::TruthWeightTool");
+
+    /// Default dtor
+    ~TruthWeightTool() = default;
+
+    /// @name Function(s) implementing the asg::IAsgTool interface
+    /// @{
+
+    /// Function initialising the tool
+    virtual StatusCode initialize();
+
+    /// @}
+
+    /// @name Function(s) implementing the ITruthWeightTool interface
+    /// @{
+
+    /// Create an IndexRetriever
+    virtual std::shared_ptr<IIndexRetriever> spawnIndexRetriever(std::string weightName);
+
+    /// Get a vector with all the currently weight names in meta data
+    std::vector<std::string> const &getWeightNames() const;
+
+    /// Whether a weight with the current name exists
+    bool hasWeight(std::string weightName);
+
+    /// Return weight index
+    size_t getWeightIndex(std::string weightName);
+
+    /// Get vector with MC weights. Same as accessing it from TruthEvent or EventInfo
+    const std::vector<float> &getWeights() const;
+
+    /// Returns the weight
+    float getWeight(std::string weightName)
+    {
+      return getWeights().at(getWeightIndex(weightName));
+    }
+
+    /// @}
+
+  protected:
+    /// @name Callback function(s) from AsgMetadataTool
+    /// @{
+
+    /// Function called when a new input file is opened
+    virtual StatusCode beginInputFile();
+
+    /// Function called when a new event is loaded
+    virtual StatusCode beginEvent();
+
+    /// @}
+
+    virtual void onNewMetaData();
+
+    /// Stores the meta data record name
+    std::string m_metaName;
+    /// Ptr to the meta data container
+    xAOD::TruthMetaDataContainer const *m_metaDataContainer;
+    /// Ptr to the currently valid meta data object
+    xAOD::TruthMetaData const *m_metaData;
+
+    /// Vector of all spawned IndexRetrievers
+    std::map<std::string, std::weak_ptr<IIndexRetriever> > m_indexRetrievers;
+
+    /// Previous MC channel number
+    uint32_t m_mcChanNo;
+
+    /// Flag to check if we actaully processed
+    /// a previous event
+    bool m_uninitialized;
+
+    /// Event info
+    const xAOD::EventInfo *m_evtInfo;
+
+    /// TruthEvent
+    const xAOD::TruthEventContainer *m_truthEvents;
+
+    /// weight names from POOL metadata .. a fallback, available to athena only
+    std::vector<std::string> m_poolWeightNames;
+
+  };
+
+} // namespace xAOD
+
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/TruthWeightToolsDict.h b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/TruthWeightToolsDict.h
new file mode 100644
index 0000000000000000000000000000000000000000..2b0f6015946dc15c73b997747252ac87be781817
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/TruthWeightToolsDict.h
@@ -0,0 +1,9 @@
+// $Id$
+#ifndef TRUTHWEIGHTTOOLS_TRUTHTOOLSDICT_H
+#define TRUTHWEIGHTTOOLS_TRUTHTOOLSDICT_H
+
+// Local include(s):
+#include "TruthWeightTools/TruthWeightTool.h"
+
+#endif // TRUTHTOOLS_TRUTHTOOLSDICT_H
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/selection.xml b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/selection.xml
new file mode 100644
index 0000000000000000000000000000000000000000..9dade6ca0ca5770237f176eda5f2b14e458a63ef
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/TruthWeightTools/selection.xml
@@ -0,0 +1,11 @@
+<!-- $Id$ -->
+<lcgdict>
+
+  <!-- The main tool of the package: -->
+  <class name="IIndexRetriever" />
+  <class name="IndexRetriever" />
+  <class name="xAOD::ITruthWeightTool" />
+  <class name="xAOD::TruthWeightTool" />
+
+</lcgdict>
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/evaluateHiggsTheoryUncert.C b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/evaluateHiggsTheoryUncert.C
new file mode 100644
index 0000000000000000000000000000000000000000..802bd1bd1fedbb45e531879102bca50fd5907ce1
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/evaluateHiggsTheoryUncert.C
@@ -0,0 +1,221 @@
+/*
+ *  Macro to evaluate Higgs theory uncertainties produced using the HiggsWeightTool
+ *  Dag Gillberg, March 3, 2017
+ */
+typedef TString Str;
+typedef std::vector<TH1*> HistV;
+typedef std::vector<TString> StrV;
+typedef std::map<TString,HistV> HistMap;
+typedef std::vector<double> NumV;
+void fatal(Str msg) { printf("\n\nFATAL\n  %s\n\n",msg.Data()); abort(); }
+
+// methods to access hists
+TFile *openFile(Str fn);
+TH1 *getHist(TFile *f, Str hn, int rebin=1);
+TH1 *getHist(Str fn, Str hn, int rebin=1) { return getHist(openFile(fn),hn,rebin); }
+
+// methods to draw stuff
+void drawLine(double x1, double y1, double x2, double y2) {
+  static TLine *line = new TLine(); line->DrawLine(x1,y1,x2,y2);
+}
+TH1* drawHist(TH1 *h, Str opt, int col=kBlack, int ls=1, int lw=2) {
+  h->SetStats(0); h->SetLineColor(col); h->SetLineWidth(lw); h->SetLineStyle(ls); h->Draw(opt); return h;
+}
+void drawText(double x, double y, Str txt, int col=kBlack) {
+  static TLatex *t = new TLatex(); t->SetNDC(); t->SetTextFont(42); t->SetTextColor(col); t->DrawLatex(x,y,txt);
+}
+
+// methods to calculate errors
+double addInQuad(const NumV &v, double nom=0) {
+  double V=0; for (auto var:v) V+=pow(var-nom,2); return sqrt(V);
+}
+double addInQuadRel(const NumV &v, double nom) {
+  double V=0; for (auto var:v) V+=pow((var-nom)/nom,2); return sqrt(V);
+}
+double envelopeRel(const NumV &vec, double n, bool ignoreZero=true) {
+  double max=0;
+  for (auto v:vec) {
+    double u=std::abs(v-n)/n; if (u>max&&!(ignoreZero&&v==0)) max=u;
+  } return max;
+}
+// assumes uncorrelated systematic sources (Hessian)
+double getTotUnc(HistV sysVar, int bin) {
+  double nom=sysVar[0]->GetBinContent(bin), V=0;
+  for (int i=1;i<sysVar.size();++i)
+    V+=pow((sysVar[i]->GetBinContent(bin)-nom)/nom,2);
+  return sqrt(V);
+}
+
+void drawRatio(TH1 *h, HistV pdf, HistV aS, HistV qcd, bool qcdEnv=true);
+void addInQuad(TH1 *tot, TH1 *unc);
+
+double hxswg(Str p) {
+  //https://twiki.cern.ch/twiki/bin/view/LHCPhysics/CERNYellowReportPageAt13TeV
+  if (p=="ggF") return 4.858E+01;
+  if (p=="VBF") return 3.782E+00;
+  if (p=="WpH") return 8.400E-01;
+  if (p=="WmH") return 5.328E-01;
+  if (p=="ZH" ) return 8.839E-01-1.227E-01; // sig(qq->ZH) = sig(pp->ZH) - sig(gg->ZH)
+  return 0.0;
+}
+// print relative deviation in percent between var and nom
+char *per(double relDev) { return relDev?Form("%.2f%%",relDev*100):Form("N/A"); }
+char *per(double var, double nom) { return per((var-nom)/nom); }
+void evaluateHiggsTheoryUncert() {
+  StrV prods({"ggF","VBF","WpH","WmH","ZH"});
+  gErrorIgnoreLevel=2001; // turn off those TCanvas print messages
+  std::map<Str,TFile*> files;
+  for (auto p:prods) files[p]=openFile(p+".root");
+  // 0. Check the MC stats (how much is the stats effectively reduced due to nominal weight)
+  printf("\n%8s%12s%12s%12s\n","ProdMode","Nevts","Neff","ratio");
+  for (auto p:prods) {
+    auto h=getHist(files[p],"pTH"); double Neff = h->GetEffectiveEntries();
+    printf("%8s%12.0f%12.1f%12.4f\n",p.Data(),
+	   h->GetEntries(),Neff,Neff/ h->GetEntries());
+  }
+
+  /// 1. Check the inclusive cross section
+  printf("\n%8s%13s%13s%12s\n","ProdMode","sig(MC)","sig(HXSWG)","ratio");
+  for (auto p:prods) {
+    auto h=getHist(files[p],"pTH");
+    // Average weight is the Powheg cross section
+    double sigPow  = h->Integral(0,-1)/h->GetEntries();
+    double sigHXWG = hxswg(p);
+    printf("%8s%10.3f pb%10.3f pb%12.4f\n",p.Data(),sigPow,sigHXWG,sigHXWG/sigPow);
+  }
+
+  /// 2. Check the uncertainty on the inclusive cross section ...
+  printf("\nTotal uncertainties on inclusive predictions\n");
+  printf("%8s%10s%10s%10s%10s%10s%10s%10s\n",
+	 "ProdMode","PDF4LHC","aS(up)","aS(dn)","QCDnlo","QCDnnlo","QCDnnlo2","QCDwg1");
+  for (auto p:prods) {
+    double n=getHist(files[p],"pTH")->Integral(0,-1);
+    double au=getHist(files[p],"pTH_aSup")->Integral(0,-1);
+    double ad=getHist(files[p],"pTH_aSdn")->Integral(0,-1);
+    NumV pdfV, qcd, qcd_nnlo, qcd_nnlo2, qcdWG1;
+    for (int i=1;i<=30;++i)
+      pdfV.push_back(getHist(files[p],Form("pTH_pdf4lhc%i",i))->Integral(0,-1));
+    for (int i=1;i<=8;++i) qcd.push_back(getHist(files[p],Form("pTH_qcd%i",i))->Integral(0,-1));
+    for (int i=1;i<=26;++i) qcd_nnlo.push_back(getHist(files[p],Form("pTH_nnlops_qcd%i",i))->Integral(0,-1));
+    for (int i=1;i<=2;++i) qcd_nnlo2.push_back(getHist(files[p],Form("pTH_nnlo_qcd%i",i))->Integral(0,-1));
+    for (int i=1;i<=6;++i) qcdWG1.push_back(getHist(files[p],Form("pTH_wg1qcd%i",i))->Integral(0,-1));
+    double pdf=addInQuadRel(pdfV,n), nnlops=addInQuadRel(qcd_nnlo2,n), wg1=addInQuadRel(qcdWG1,n);
+    if (p!="ggF") wg1=0;
+    printf("%8s%10s%10s%10s%10s%10s%10s%10s\n",
+	   p.Data(),per(pdf),per(au,n),per(ad,n),
+	   per(envelopeRel(qcd,n)),per(envelopeRel(qcd_nnlo,n)),
+	   per(nnlops),per(wg1));
+  }
+
+  Str pdf("HiggsTheoryUnc.pdf");
+  TCanvas *can = new TCanvas();
+  can->SetMargin(0.12,0.04,0.12,0.04);
+  can->Print(pdf+"[");
+
+  for (auto p:prods) {
+    TFile *f=files[p];
+    for (TString var:{"pTH","Njets30","yH","STXS"}) {
+      auto nom=getHist(f,var);
+      nom->SetName(p+var);
+
+      // Read in histograms with theory variations
+      HistV pdfV, qcd, qcd_nnlo, qcd_nnlo2, qcd_wg1;
+      for (int i=1;i<=30;++i) pdfV.push_back(getHist(f,var+Form("_pdf4lhc%i",i)));
+      HistV aS({getHist(f,var+"_aSup"),getHist(f,var+"_aSdn")});
+      for (int i=1;i<=8;++i) qcd.push_back(getHist(f,var+Form("_qcd%i",i)));
+      for (int i=1;i<=26;++i) qcd_nnlo.push_back(getHist(f,var+Form("_nnlops_qcd%i",i)));
+      for (int i=1;i<=2;++i) qcd_nnlo2.push_back(getHist(f,var+Form("_nnlo_qcd%i",i)));
+      for (int i=1;i<=6;++i) qcd_wg1.push_back(getHist(f,var+Form("_wg1qcd%i",i)));
+
+      // Draw uncertainty variations
+      nom->SetMaximum(1.3*nom->GetMaximum());
+      if (p=="ggF"&&var=="STXS") nom->GetXaxis()->SetRangeUser(0,15);
+      drawHist(nom,""); 
+      if (p=="ggF") for (auto h:qcd_wg1) drawHist(h,"hist same",kRed);
+      else for (auto h:qcd) drawHist(h,"hist same",kRed);
+      for (auto h:pdfV) drawHist(h,"hist same",kGray);
+      for (auto h:aS) drawHist(h,"hist same",kBlue);
+      drawHist(nom,"same");
+      drawText(0.7,0.88,p,kBlack);
+      drawText(0.7,0.83,"PDF variations",kGray);
+      drawText(0.7,0.78,"#it{#alpha}_{s} variations",kBlue);
+      drawText(0.7,0.73,"QCD variations",kRed);
+      can->Print(pdf);
+
+      drawRatio(nom,pdfV,aS,p=="ggF"?qcd_wg1:qcd,false);
+      drawText(0.2,0.88,p,kBlack);
+      drawText(0.2,0.83,"MC stat err.",kBlack);
+      drawText(0.4,0.88,"PDF uncert.",kGray);
+      drawText(0.4,0.83,"#it{#alpha}_{s} variations",kBlue);
+      drawText(0.6,0.88,"QCD uncert.",kRed);
+      can->Print(pdf);
+    }
+    auto w1=getHist(f,"w_nom1");
+    auto w2=getHist(f,"w_nom2");
+    if (w1->GetMean()<10) w2->Draw();
+    else w1->Draw();
+    can->Print(pdf);
+  }
+  
+  can->Print(pdf+"]");
+  printf("\nProduced %s\n\n",pdf.Data());
+}
+
+TH1* drawRatioAxis(TH1 *nom) {
+  TH1D *axis = (TH1D*)nom->Clone();
+  axis->GetYaxis()->SetRangeUser(0.6,1.4);
+  for (int bin=1;bin<=axis->GetNbinsX();++bin) {
+    double y=axis->GetBinContent(bin);
+    axis->SetBinError(bin,std::abs(y)<1e-5?0:axis->GetBinError(bin)/y); axis->SetBinContent(bin,1.0);
+  }
+  axis->SetYTitle("Impact of systematic variation relative to nominal");
+  axis->Draw(); return axis;
+}
+
+void drawRatio(TH1 *nom, HistV pdf, HistV aS, HistV qcd, bool qcdEnv) {
+  drawRatioAxis(nom);
+  TH1D *pdfUnc = (TH1D*)nom->Clone(); pdfUnc->Reset();
+  for (int bin=1;bin<=pdfUnc->GetNbinsX();++bin) pdfUnc->SetBinContent(bin,1.0);
+  TH1D *qcdUnc = (TH1D*)pdfUnc->Clone();
+  for (auto h:pdf) { h->Divide(nom); addInQuad(pdfUnc,h); }
+  for (auto h:qcd) { h->Divide(nom); addInQuad(qcdUnc,h); }
+  qcdUnc->SetFillColor(kRed-9);
+  if (qcdEnv) 
+    for (int bin=1;bin<=qcdUnc->GetNbinsX();++bin) {
+      double max=0;
+      for (auto h:qcd)
+	if (std::abs(h->GetBinContent(bin)-1)>max)
+	  max=std::abs(h->GetBinContent(bin)-1);
+      qcdUnc->SetBinError(bin,max==1?0:max);
+    }
+ 
+  if (Str(nom->GetName()).Contains("ggF")) qcdUnc->Draw("e2 same");
+  pdfUnc->SetFillColor(kGray);
+  pdfUnc->Draw("e2 same");
+  for (auto h:qcd) drawHist(h,"hist same",kRed); 
+  for (auto h:aS) { h->Divide(nom); drawHist(h,"hist same",kBlue); }
+}
+
+
+TFile *openFile(Str fn) {
+  TFile *f=TFile::Open(fn);
+  if (f==nullptr||f->IsZombie()) fatal("Cannot open "+fn);
+  return f;
+}
+
+TH1 *getHist(TFile *f, Str hn, int rebin) {
+  TH1 *h = (TH1*)f->Get(hn);
+  if (h==nullptr) fatal("Cannot access histo "+hn+" in file "+f->GetName());
+  h->Rebin(rebin); return h;
+}
+
+// add uncertainty source unc to total
+// unc is relative to 1
+void addInQuad(TH1 *tot, TH1 *uncVar) {
+  for (int bin=1;bin<=tot->GetNbinsX();++bin) {
+    double err1 = tot->GetBinError(bin);
+    double err2 = uncVar->GetBinContent(bin)-1;
+    if (err2!=-1)
+      tot->SetBinError(bin,sqrt(err1*err1+err2*err2));
+  }
+}
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1100_CM13_PDF4LHC30-APX2-HH.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1100_CM13_PDF4LHC30-APX2-HH.top
new file mode 100644
index 0000000000000000000000000000000000000000..e99e6da092bec593405e23903289e4ecbab2311f
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1100_CM13_PDF4LHC30-APX2-HH.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10340421D-04 0.14623885D-05
+ -.47000000D+01 -.46000000D+01 0.34050419D-03 0.88618982D-05
+ -.46000000D+01 -.45000000D+01 0.20941868D-02 0.28539174D-04
+ -.45000000D+01 -.44000000D+01 0.73270182D-02 0.81671444D-04
+ -.44000000D+01 -.43000000D+01 0.19084739D-01 0.42599258D-03
+ -.43000000D+01 -.42000000D+01 0.43250558D-01 0.44343835D-03
+ -.42000000D+01 -.41000000D+01 0.82179850D-01 0.72437018D-03
+ -.41000000D+01 -.40000000D+01 0.14062544D+00 0.12180055D-02
+ -.40000000D+01 -.39000000D+01 0.22254916D+00 0.17890044D-02
+ -.39000000D+01 -.38000000D+01 0.33366414D+00 0.25845971D-02
+ -.38000000D+01 -.37000000D+01 0.46973769D+00 0.42414954D-02
+ -.37000000D+01 -.36000000D+01 0.64365384D+00 0.45425959D-02
+ -.36000000D+01 -.35000000D+01 0.84612315D+00 0.66059483D-02
+ -.35000000D+01 -.34000000D+01 0.10654451D+01 0.74603941D-02
+ -.34000000D+01 -.33000000D+01 0.13367107D+01 0.85142209D-02
+ -.33000000D+01 -.32000000D+01 0.16212257D+01 0.83634549D-02
+ -.32000000D+01 -.31000000D+01 0.19338290D+01 0.90978999D-02
+ -.31000000D+01 -.30000000D+01 0.22916650D+01 0.12706216D-01
+ -.30000000D+01 -.29000000D+01 0.26919798D+01 0.11870046D-01
+ -.29000000D+01 -.28000000D+01 0.30644889D+01 0.13141643D-01
+ -.28000000D+01 -.27000000D+01 0.35191181D+01 0.14069381D-01
+ -.27000000D+01 -.26000000D+01 0.39383098D+01 0.14407230D-01
+ -.26000000D+01 -.25000000D+01 0.44235150D+01 0.14961310D-01
+ -.25000000D+01 -.24000000D+01 0.49060494D+01 0.19572515D-01
+ -.24000000D+01 -.23000000D+01 0.53826187D+01 0.16181996D-01
+ -.23000000D+01 -.22000000D+01 0.59074714D+01 0.18233918D-01
+ -.22000000D+01 -.21000000D+01 0.64022463D+01 0.20710650D-01
+ -.21000000D+01 -.20000000D+01 0.69479552D+01 0.21979609D-01
+ -.20000000D+01 -.19000000D+01 0.74241686D+01 0.20018137D-01
+ -.19000000D+01 -.18000000D+01 0.79021552D+01 0.22920822D-01
+ -.18000000D+01 -.17000000D+01 0.84247343D+01 0.23449659D-01
+ -.17000000D+01 -.16000000D+01 0.88969405D+01 0.22480574D-01
+ -.16000000D+01 -.15000000D+01 0.93296460D+01 0.23857038D-01
+ -.15000000D+01 -.14000000D+01 0.97577235D+01 0.23969402D-01
+ -.14000000D+01 -.13000000D+01 0.10199389D+02 0.24082079D-01
+ -.13000000D+01 -.12000000D+01 0.10586789D+02 0.27000223D-01
+ -.12000000D+01 -.11000000D+01 0.10955764D+02 0.25833351D-01
+ -.11000000D+01 -.10000000D+01 0.11289815D+02 0.25867233D-01
+ -.10000000D+01 -.90000000D+00 0.11648956D+02 0.26382340D-01
+ -.90000000D+00 -.80000000D+00 0.11886262D+02 0.27384932D-01
+ -.80000000D+00 -.70000000D+00 0.12162262D+02 0.27076279D-01
+ -.70000000D+00 -.60000000D+00 0.12333556D+02 0.26636396D-01
+ -.60000000D+00 -.50000000D+00 0.12596830D+02 0.29636792D-01
+ -.50000000D+00 -.40000000D+00 0.12762771D+02 0.27129491D-01
+ -.40000000D+00 -.30000000D+00 0.12907938D+02 0.30215322D-01
+ -.30000000D+00 -.20000000D+00 0.12967412D+02 0.27579513D-01
+ -.20000000D+00 -.10000000D+00 0.13009150D+02 0.26727203D-01
+ -.10000000D+00 0.18041124D-15 0.13072522D+02 0.25746889D-01
+ 0.70776718D-15 0.10000000D+00 0.13100010D+02 0.26328225D-01
+ 0.10000000D+00 0.20000000D+00 0.13059649D+02 0.26519581D-01
+ 0.20000000D+00 0.30000000D+00 0.12946306D+02 0.30400665D-01
+ 0.30000000D+00 0.40000000D+00 0.12867260D+02 0.30151817D-01
+ 0.40000000D+00 0.50000000D+00 0.12689029D+02 0.30142048D-01
+ 0.50000000D+00 0.60000000D+00 0.12561933D+02 0.27720454D-01
+ 0.60000000D+00 0.70000000D+00 0.12370873D+02 0.26727078D-01
+ 0.70000000D+00 0.80000000D+00 0.12125228D+02 0.25602095D-01
+ 0.80000000D+00 0.90000000D+00 0.11904116D+02 0.26675953D-01
+ 0.90000000D+00 0.10000000D+01 0.11643060D+02 0.27667526D-01
+ 0.10000000D+01 0.11000000D+01 0.11328168D+02 0.25916486D-01
+ 0.11000000D+01 0.12000000D+01 0.10962602D+02 0.24086201D-01
+ 0.12000000D+01 0.13000000D+01 0.10594239D+02 0.25270050D-01
+ 0.13000000D+01 0.14000000D+01 0.10183261D+02 0.26994091D-01
+ 0.14000000D+01 0.15000000D+01 0.97322872D+01 0.22720790D-01
+ 0.15000000D+01 0.16000000D+01 0.93211060D+01 0.25803020D-01
+ 0.16000000D+01 0.17000000D+01 0.88778199D+01 0.22696038D-01
+ 0.17000000D+01 0.18000000D+01 0.84433324D+01 0.23014328D-01
+ 0.18000000D+01 0.19000000D+01 0.79056653D+01 0.21322194D-01
+ 0.19000000D+01 0.20000000D+01 0.73968696D+01 0.21466913D-01
+ 0.20000000D+01 0.21000000D+01 0.68785270D+01 0.19330638D-01
+ 0.21000000D+01 0.22000000D+01 0.63415993D+01 0.72854983D-01
+ 0.22000000D+01 0.23000000D+01 0.59437755D+01 0.71501040D-01
+ 0.23000000D+01 0.24000000D+01 0.54049358D+01 0.16851746D-01
+ 0.24000000D+01 0.25000000D+01 0.48757811D+01 0.16684716D-01
+ 0.25000000D+01 0.26000000D+01 0.44213376D+01 0.16682587D-01
+ 0.26000000D+01 0.27000000D+01 0.39965904D+01 0.34196814D-01
+ 0.27000000D+01 0.28000000D+01 0.34659998D+01 0.34146207D-01
+ 0.28000000D+01 0.29000000D+01 0.30718359D+01 0.14990063D-01
+ 0.29000000D+01 0.30000000D+01 0.26959045D+01 0.13053096D-01
+ 0.30000000D+01 0.31000000D+01 0.22844538D+01 0.15892767D-01
+ 0.31000000D+01 0.32000000D+01 0.19284987D+01 0.15845834D-01
+ 0.32000000D+01 0.33000000D+01 0.16208553D+01 0.92022901D-02
+ 0.33000000D+01 0.34000000D+01 0.13329786D+01 0.81636530D-02
+ 0.34000000D+01 0.35000000D+01 0.10615094D+01 0.84059225D-02
+ 0.35000000D+01 0.36000000D+01 0.84836245D+00 0.74009283D-02
+ 0.36000000D+01 0.37000000D+01 0.64336887D+00 0.46052772D-02
+ 0.37000000D+01 0.38000000D+01 0.47343386D+00 0.36047563D-02
+ 0.38000000D+01 0.39000000D+01 0.33489775D+00 0.29030160D-02
+ 0.39000000D+01 0.40000000D+01 0.22448391D+00 0.19140945D-02
+ 0.40000000D+01 0.41000000D+01 0.14211467D+00 0.13692181D-02
+ 0.41000000D+01 0.42000000D+01 0.81862097D-01 0.73861777D-03
+ 0.42000000D+01 0.43000000D+01 0.42989732D-01 0.45046176D-03
+ 0.43000000D+01 0.44000000D+01 0.19553365D-01 0.19258015D-03
+ 0.44000000D+01 0.45000000D+01 0.73287660D-02 0.79775595D-04
+ 0.45000000D+01 0.46000000D+01 0.20895622D-02 0.28092549D-04
+ 0.46000000D+01 0.47000000D+01 0.34415272D-03 0.90938801D-05
+ 0.47000000D+01 0.48000000D+01 0.10404740D-04 0.14611732D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10153870D-04 0.14623492D-05
+ -.47000000D+01 -.46000000D+01 0.32582705D-03 0.88588754D-05
+ -.46000000D+01 -.45000000D+01 0.19564070D-02 0.28476380D-04
+ -.45000000D+01 -.44000000D+01 0.67102906D-02 0.81514407D-04
+ -.44000000D+01 -.43000000D+01 0.17152268D-01 0.42567332D-03
+ -.43000000D+01 -.42000000D+01 0.38378386D-01 0.44268449D-03
+ -.42000000D+01 -.41000000D+01 0.71768938D-01 0.72176494D-03
+ -.41000000D+01 -.40000000D+01 0.12094393D+00 0.12137851D-02
+ -.40000000D+01 -.39000000D+01 0.18866363D+00 0.17804444D-02
+ -.39000000D+01 -.38000000D+01 0.27916954D+00 0.25708342D-02
+ -.38000000D+01 -.37000000D+01 0.38796226D+00 0.42238029D-02
+ -.37000000D+01 -.36000000D+01 0.52623280D+00 0.45214215D-02
+ -.36000000D+01 -.35000000D+01 0.68436136D+00 0.65720712D-02
+ -.35000000D+01 -.34000000D+01 0.85144991D+00 0.74095863D-02
+ -.34000000D+01 -.33000000D+01 0.10590718D+01 0.84700296D-02
+ -.33000000D+01 -.32000000D+01 0.12720238D+01 0.83346460D-02
+ -.32000000D+01 -.31000000D+01 0.15024374D+01 0.90654967D-02
+ -.31000000D+01 -.30000000D+01 0.17697342D+01 0.12632137D-01
+ -.30000000D+01 -.29000000D+01 0.20679981D+01 0.11770384D-01
+ -.29000000D+01 -.28000000D+01 0.23346331D+01 0.12338435D-01
+ -.28000000D+01 -.27000000D+01 0.26658627D+01 0.13254677D-01
+ -.27000000D+01 -.26000000D+01 0.29622871D+01 0.14245687D-01
+ -.26000000D+01 -.25000000D+01 0.33175791D+01 0.14763553D-01
+ -.25000000D+01 -.24000000D+01 0.36554130D+01 0.19422210D-01
+ -.24000000D+01 -.23000000D+01 0.39932487D+01 0.16105724D-01
+ -.23000000D+01 -.22000000D+01 0.43686390D+01 0.17953727D-01
+ -.22000000D+01 -.21000000D+01 0.47120607D+01 0.20207117D-01
+ -.21000000D+01 -.20000000D+01 0.50993442D+01 0.21636011D-01
+ -.20000000D+01 -.19000000D+01 0.54182880D+01 0.19467200D-01
+ -.19000000D+01 -.18000000D+01 0.57512358D+01 0.22305980D-01
+ -.18000000D+01 -.17000000D+01 0.61164701D+01 0.23183505D-01
+ -.17000000D+01 -.16000000D+01 0.64402243D+01 0.22314302D-01
+ -.16000000D+01 -.15000000D+01 0.67222916D+01 0.23561365D-01
+ -.15000000D+01 -.14000000D+01 0.70141113D+01 0.23718527D-01
+ -.14000000D+01 -.13000000D+01 0.73141906D+01 0.23728723D-01
+ -.13000000D+01 -.12000000D+01 0.75765698D+01 0.26659266D-01
+ -.12000000D+01 -.11000000D+01 0.78184460D+01 0.25673699D-01
+ -.11000000D+01 -.10000000D+01 0.80386867D+01 0.25663616D-01
+ -.10000000D+01 -.90000000D+00 0.82913557D+01 0.26056604D-01
+ -.90000000D+00 -.80000000D+00 0.84278521D+01 0.26980629D-01
+ -.80000000D+00 -.70000000D+00 0.86167277D+01 0.26838031D-01
+ -.70000000D+00 -.60000000D+00 0.87151707D+01 0.26328555D-01
+ -.60000000D+00 -.50000000D+00 0.89074461D+01 0.29414353D-01
+ -.50000000D+00 -.40000000D+00 0.90165856D+01 0.26800325D-01
+ -.40000000D+00 -.30000000D+00 0.91135489D+01 0.29957439D-01
+ -.30000000D+00 -.20000000D+00 0.91430729D+01 0.27386363D-01
+ -.20000000D+00 -.10000000D+00 0.91585322D+01 0.26492475D-01
+ -.10000000D+00 0.18041124D-15 0.92110474D+01 0.25489471D-01
+ 0.70776718D-15 0.10000000D+00 0.92416936D+01 0.26087186D-01
+ 0.10000000D+00 0.20000000D+00 0.92104022D+01 0.26148229D-01
+ 0.20000000D+00 0.30000000D+00 0.91134962D+01 0.29499039D-01
+ 0.30000000D+00 0.40000000D+00 0.90798760D+01 0.29360601D-01
+ 0.40000000D+00 0.50000000D+00 0.89461327D+01 0.29920176D-01
+ 0.50000000D+00 0.60000000D+00 0.88781684D+01 0.27417243D-01
+ 0.60000000D+00 0.70000000D+00 0.87461819D+01 0.26417676D-01
+ 0.70000000D+00 0.80000000D+00 0.85791425D+01 0.25376919D-01
+ 0.80000000D+00 0.90000000D+00 0.84508288D+01 0.26303638D-01
+ 0.90000000D+00 0.10000000D+01 0.82846617D+01 0.27251246D-01
+ 0.10000000D+01 0.11000000D+01 0.80729626D+01 0.25676313D-01
+ 0.11000000D+01 0.12000000D+01 0.78234497D+01 0.23863645D-01
+ 0.12000000D+01 0.13000000D+01 0.75840503D+01 0.24794012D-01
+ 0.13000000D+01 0.14000000D+01 0.73009005D+01 0.26633900D-01
+ 0.14000000D+01 0.15000000D+01 0.69856196D+01 0.22585218D-01
+ 0.15000000D+01 0.16000000D+01 0.67159048D+01 0.25622749D-01
+ 0.16000000D+01 0.17000000D+01 0.64197258D+01 0.22498918D-01
+ 0.17000000D+01 0.18000000D+01 0.61341385D+01 0.22875413D-01
+ 0.18000000D+01 0.19000000D+01 0.57521473D+01 0.21210184D-01
+ 0.19000000D+01 0.20000000D+01 0.53966874D+01 0.21345212D-01
+ 0.20000000D+01 0.21000000D+01 0.50319309D+01 0.19150106D-01
+ 0.21000000D+01 0.22000000D+01 0.47034099D+01 0.28169768D-01
+ 0.22000000D+01 0.23000000D+01 0.43504495D+01 0.24734196D-01
+ 0.23000000D+01 0.24000000D+01 0.40119686D+01 0.16717531D-01
+ 0.24000000D+01 0.25000000D+01 0.36302080D+01 0.16538892D-01
+ 0.25000000D+01 0.26000000D+01 0.33118848D+01 0.16589050D-01
+ 0.26000000D+01 0.27000000D+01 0.30175411D+01 0.32257229D-01
+ 0.27000000D+01 0.28000000D+01 0.26179006D+01 0.32220013D-01
+ 0.28000000D+01 0.29000000D+01 0.23390119D+01 0.14929944D-01
+ 0.29000000D+01 0.30000000D+01 0.20697964D+01 0.12571510D-01
+ 0.30000000D+01 0.31000000D+01 0.17641407D+01 0.15505419D-01
+ 0.31000000D+01 0.32000000D+01 0.14967258D+01 0.15807653D-01
+ 0.32000000D+01 0.33000000D+01 0.12712052D+01 0.91680772D-02
+ 0.33000000D+01 0.34000000D+01 0.10555924D+01 0.81216511D-02
+ 0.34000000D+01 0.35000000D+01 0.84755325D+00 0.79335179D-02
+ 0.35000000D+01 0.36000000D+01 0.68615606D+00 0.68908089D-02
+ 0.36000000D+01 0.37000000D+01 0.52599832D+00 0.45918771D-02
+ 0.37000000D+01 0.38000000D+01 0.39161119D+00 0.35931869D-02
+ 0.38000000D+01 0.39000000D+01 0.28049821D+00 0.28935023D-02
+ 0.39000000D+01 0.40000000D+01 0.19049440D+00 0.19078166D-02
+ 0.40000000D+01 0.41000000D+01 0.12243452D+00 0.13657926D-02
+ 0.41000000D+01 0.42000000D+01 0.71460882D-01 0.73641075D-03
+ 0.42000000D+01 0.43000000D+01 0.38146880D-01 0.44880700D-03
+ 0.43000000D+01 0.44000000D+01 0.17613461D-01 0.19073982D-03
+ 0.44000000D+01 0.45000000D+01 0.67115432D-02 0.79604842D-04
+ 0.45000000D+01 0.46000000D+01 0.19526557D-02 0.28066349D-04
+ 0.46000000D+01 0.47000000D+01 0.32945372D-03 0.90916418D-05
+ 0.47000000D+01 0.48000000D+01 0.10219398D-04 0.14611563D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10242459D-04 0.14623680D-05
+ -.47000000D+01 -.46000000D+01 0.33252381D-03 0.88602966D-05
+ -.46000000D+01 -.45000000D+01 0.20171088D-02 0.28502800D-04
+ -.45000000D+01 -.44000000D+01 0.69739487D-02 0.81584664D-04
+ -.44000000D+01 -.43000000D+01 0.17957776D-01 0.42581442D-03
+ -.43000000D+01 -.42000000D+01 0.40359496D-01 0.44302110D-03
+ -.42000000D+01 -.41000000D+01 0.75905854D-01 0.72277805D-03
+ -.41000000D+01 -.40000000D+01 0.12859854D+00 0.12154816D-02
+ -.40000000D+01 -.39000000D+01 0.20157056D+00 0.17832176D-02
+ -.39000000D+01 -.38000000D+01 0.29949502D+00 0.25757898D-02
+ -.38000000D+01 -.37000000D+01 0.41788089D+00 0.42300693D-02
+ -.37000000D+01 -.36000000D+01 0.56836532D+00 0.45289521D-02
+ -.36000000D+01 -.35000000D+01 0.74134873D+00 0.65791105D-02
+ -.35000000D+01 -.34000000D+01 0.92575494D+00 0.74238514D-02
+ -.34000000D+01 -.33000000D+01 0.11538425D+01 0.84873769D-02
+ -.33000000D+01 -.32000000D+01 0.13895101D+01 0.83449254D-02
+ -.32000000D+01 -.31000000D+01 0.16454897D+01 0.90768136D-02
+ -.31000000D+01 -.30000000D+01 0.19406682D+01 0.12653670D-01
+ -.30000000D+01 -.29000000D+01 0.22696397D+01 0.11801495D-01
+ -.29000000D+01 -.28000000D+01 0.25678335D+01 0.12584799D-01
+ -.28000000D+01 -.27000000D+01 0.29355725D+01 0.13501531D-01
+ -.27000000D+01 -.26000000D+01 0.32678842D+01 0.14282801D-01
+ -.26000000D+01 -.25000000D+01 0.36607394D+01 0.14816749D-01
+ -.25000000D+01 -.24000000D+01 0.40396083D+01 0.19467167D-01
+ -.24000000D+01 -.23000000D+01 0.44169447D+01 0.16131404D-01
+ -.23000000D+01 -.22000000D+01 0.48342310D+01 0.18028854D-01
+ -.22000000D+01 -.21000000D+01 0.52204382D+01 0.20323552D-01
+ -.21000000D+01 -.20000000D+01 0.56506768D+01 0.21710079D-01
+ -.20000000D+01 -.19000000D+01 0.60120699D+01 0.19515248D-01
+ -.19000000D+01 -.18000000D+01 0.63863039D+01 0.22390410D-01
+ -.18000000D+01 -.17000000D+01 0.67932026D+01 0.23268064D-01
+ -.17000000D+01 -.16000000D+01 0.71565563D+01 0.22370568D-01
+ -.16000000D+01 -.15000000D+01 0.74783609D+01 0.23629264D-01
+ -.15000000D+01 -.14000000D+01 0.78070021D+01 0.23780664D-01
+ -.14000000D+01 -.13000000D+01 0.81439494D+01 0.23812265D-01
+ -.13000000D+01 -.12000000D+01 0.84391434D+01 0.26738752D-01
+ -.12000000D+01 -.11000000D+01 0.87140916D+01 0.25723653D-01
+ -.11000000D+01 -.10000000D+01 0.89641493D+01 0.25719496D-01
+ -.10000000D+01 -.90000000D+00 0.92443096D+01 0.26117925D-01
+ -.90000000D+00 -.80000000D+00 0.94063400D+01 0.27047989D-01
+ -.80000000D+00 -.70000000D+00 0.96172305D+01 0.26910781D-01
+ -.70000000D+00 -.60000000D+00 0.97348425D+01 0.26413245D-01
+ -.60000000D+00 -.50000000D+00 0.99453313D+01 0.29478100D-01
+ -.50000000D+00 -.40000000D+00 0.10068251D+02 0.26894485D-01
+ -.40000000D+00 -.30000000D+00 0.10177711D+02 0.30038060D-01
+ -.30000000D+00 -.20000000D+00 0.10214907D+02 0.27439689D-01
+ -.20000000D+00 -.10000000D+00 0.10236810D+02 0.26554851D-01
+ -.10000000D+00 0.18041124D-15 0.10292466D+02 0.25555789D-01
+ 0.70776718D-15 0.10000000D+00 0.10321967D+02 0.26158024D-01
+ 0.10000000D+00 0.20000000D+00 0.10288616D+02 0.26245773D-01
+ 0.20000000D+00 0.30000000D+00 0.10186941D+02 0.29647094D-01
+ 0.30000000D+00 0.40000000D+00 0.10142394D+02 0.29478231D-01
+ 0.40000000D+00 0.50000000D+00 0.99973129D+01 0.29977052D-01
+ 0.50000000D+00 0.60000000D+00 0.99143981D+01 0.27503322D-01
+ 0.60000000D+00 0.70000000D+00 0.97673581D+01 0.26508866D-01
+ 0.70000000D+00 0.80000000D+00 0.95798461D+01 0.25444606D-01
+ 0.80000000D+00 0.90000000D+00 0.94281222D+01 0.26402945D-01
+ 0.90000000D+00 0.10000000D+01 0.92377937D+01 0.27365543D-01
+ 0.10000000D+01 0.11000000D+01 0.89991875D+01 0.25752849D-01
+ 0.11000000D+01 0.12000000D+01 0.87193886D+01 0.23923721D-01
+ 0.12000000D+01 0.13000000D+01 0.84472310D+01 0.24939927D-01
+ 0.13000000D+01 0.14000000D+01 0.81297871D+01 0.26749947D-01
+ 0.14000000D+01 0.15000000D+01 0.77791248D+01 0.22625510D-01
+ 0.15000000D+01 0.16000000D+01 0.74715673D+01 0.25665701D-01
+ 0.16000000D+01 0.17000000D+01 0.71366454D+01 0.22540485D-01
+ 0.17000000D+01 0.18000000D+01 0.68108534D+01 0.22912227D-01
+ 0.18000000D+01 0.19000000D+01 0.63870608D+01 0.21241988D-01
+ 0.19000000D+01 0.20000000D+01 0.59899242D+01 0.21379269D-01
+ 0.20000000D+01 0.21000000D+01 0.55828505D+01 0.19199953D-01
+ 0.21000000D+01 0.22000000D+01 0.52024656D+01 0.34353419D-01
+ 0.22000000D+01 0.23000000D+01 0.48256766D+01 0.31574289D-01
+ 0.23000000D+01 0.24000000D+01 0.44365974D+01 0.16751109D-01
+ 0.24000000D+01 0.25000000D+01 0.40131501D+01 0.16571269D-01
+ 0.25000000D+01 0.26000000D+01 0.36558730D+01 0.16610583D-01
+ 0.26000000D+01 0.27000000D+01 0.33243097D+01 0.33160935D-01
+ 0.27000000D+01 0.28000000D+01 0.28857006D+01 0.33117885D-01
+ 0.28000000D+01 0.29000000D+01 0.25732602D+01 0.14948051D-01
+ 0.29000000D+01 0.30000000D+01 0.22720592D+01 0.12700144D-01
+ 0.30000000D+01 0.31000000D+01 0.19345690D+01 0.15608932D-01
+ 0.31000000D+01 0.32000000D+01 0.16398482D+01 0.15821145D-01
+ 0.32000000D+01 0.33000000D+01 0.13888461D+01 0.91798425D-02
+ 0.33000000D+01 0.34000000D+01 0.11503022D+01 0.81346885D-02
+ 0.34000000D+01 0.35000000D+01 0.92161993D+00 0.81339768D-02
+ 0.35000000D+01 0.36000000D+01 0.74351622D+00 0.71124182D-02
+ 0.36000000D+01 0.37000000D+01 0.56812769D+00 0.45972040D-02
+ 0.37000000D+01 0.38000000D+01 0.42155755D+00 0.35979335D-02
+ 0.38000000D+01 0.39000000D+01 0.30079796D+00 0.28972090D-02
+ 0.39000000D+01 0.40000000D+01 0.20343545D+00 0.19103280D-02
+ 0.40000000D+01 0.41000000D+01 0.13009363D+00 0.13671845D-02
+ 0.41000000D+01 0.42000000D+01 0.75594295D-01 0.73734207D-03
+ 0.42000000D+01 0.43000000D+01 0.40116599D-01 0.44951834D-03
+ 0.43000000D+01 0.44000000D+01 0.18421617D-01 0.19156150D-03
+ 0.44000000D+01 0.45000000D+01 0.69754055D-02 0.79677048D-04
+ 0.45000000D+01 0.46000000D+01 0.20129913D-02 0.28078536D-04
+ 0.46000000D+01 0.47000000D+01 0.33616090D-03 0.90927082D-05
+ 0.47000000D+01 0.48000000D+01 0.10307411D-04 0.14611644D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10291633D-04 0.14623784D-05
+ -.47000000D+01 -.46000000D+01 0.33644043D-03 0.88610959D-05
+ -.46000000D+01 -.45000000D+01 0.20541399D-02 0.28519875D-04
+ -.45000000D+01 -.44000000D+01 0.71402847D-02 0.81626696D-04
+ -.44000000D+01 -.43000000D+01 0.18479638D-01 0.42589871D-03
+ -.43000000D+01 -.42000000D+01 0.41674972D-01 0.44321999D-03
+ -.42000000D+01 -.41000000D+01 0.78712907D-01 0.72346869D-03
+ -.41000000D+01 -.40000000D+01 0.13389428D+00 0.12166074D-02
+ -.40000000D+01 -.39000000D+01 0.21066042D+00 0.17854528D-02
+ -.39000000D+01 -.38000000D+01 0.31406192D+00 0.25794089D-02
+ -.38000000D+01 -.37000000D+01 0.43965392D+00 0.42346230D-02
+ -.37000000D+01 -.36000000D+01 0.59946752D+00 0.45345339D-02
+ -.36000000D+01 -.35000000D+01 0.78398638D+00 0.65861482D-02
+ -.35000000D+01 -.34000000D+01 0.98190546D+00 0.74355539D-02
+ -.34000000D+01 -.33000000D+01 0.12262832D+01 0.84989722D-02
+ -.33000000D+01 -.32000000D+01 0.14801384D+01 0.83523016D-02
+ -.32000000D+01 -.31000000D+01 0.17568647D+01 0.90848129D-02
+ -.31000000D+01 -.30000000D+01 0.20746974D+01 0.12672489D-01
+ -.30000000D+01 -.29000000D+01 0.24290213D+01 0.11827627D-01
+ -.29000000D+01 -.28000000D+01 0.27533031D+01 0.12805601D-01
+ -.28000000D+01 -.27000000D+01 0.31513647D+01 0.13721451D-01
+ -.27000000D+01 -.26000000D+01 0.35135880D+01 0.14316782D-01
+ -.26000000D+01 -.25000000D+01 0.39379549D+01 0.14863788D-01
+ -.25000000D+01 -.24000000D+01 0.43515881D+01 0.19504286D-01
+ -.24000000D+01 -.23000000D+01 0.47622191D+01 0.16150492D-01
+ -.23000000D+01 -.22000000D+01 0.52150892D+01 0.18100380D-01
+ -.22000000D+01 -.21000000D+01 0.56375596D+01 0.20434220D-01
+ -.21000000D+01 -.20000000D+01 0.61046494D+01 0.21776842D-01
+ -.20000000D+01 -.19000000D+01 0.65028285D+01 0.19564834D-01
+ -.19000000D+01 -.18000000D+01 0.69121937D+01 0.22469226D-01
+ -.18000000D+01 -.17000000D+01 0.73551521D+01 0.23333794D-01
+ -.17000000D+01 -.16000000D+01 0.77529851D+01 0.22410690D-01
+ -.16000000D+01 -.15000000D+01 0.81093908D+01 0.23695091D-01
+ -.15000000D+01 -.14000000D+01 0.84698902D+01 0.23838539D-01
+ -.14000000D+01 -.13000000D+01 0.88391699D+01 0.23892387D-01
+ -.13000000D+01 -.12000000D+01 0.91629482D+01 0.26815025D-01
+ -.12000000D+01 -.11000000D+01 0.94670324D+01 0.25762416D-01
+ -.11000000D+01 -.10000000D+01 0.97431320D+01 0.25768730D-01
+ -.10000000D+01 -.90000000D+00 0.10047522D+02 0.26186100D-01
+ -.90000000D+00 -.80000000D+00 0.10232475D+02 0.27122296D-01
+ -.80000000D+00 -.70000000D+00 0.10462609D+02 0.26962393D-01
+ -.70000000D+00 -.60000000D+00 0.10597114D+02 0.26482101D-01
+ -.60000000D+00 -.50000000D+00 0.10823709D+02 0.29528907D-01
+ -.50000000D+00 -.40000000D+00 0.10959093D+02 0.26971779D-01
+ -.40000000D+00 -.30000000D+00 0.11079493D+02 0.30100844D-01
+ -.30000000D+00 -.20000000D+00 0.11123589D+02 0.27484592D-01
+ -.20000000D+00 -.10000000D+00 0.11151145D+02 0.26607881D-01
+ -.10000000D+00 0.18041124D-15 0.11209601D+02 0.25614378D-01
+ 0.70776718D-15 0.10000000D+00 0.11238096D+02 0.26216842D-01
+ 0.10000000D+00 0.20000000D+00 0.11202723D+02 0.26338037D-01
+ 0.20000000D+00 0.30000000D+00 0.11097463D+02 0.29830513D-01
+ 0.30000000D+00 0.40000000D+00 0.11042676D+02 0.29628526D-01
+ 0.40000000D+00 0.50000000D+00 0.10887412D+02 0.30027841D-01
+ 0.50000000D+00 0.60000000D+00 0.10791280D+02 0.27575214D-01
+ 0.60000000D+00 0.70000000D+00 0.10631147D+02 0.26584378D-01
+ 0.70000000D+00 0.80000000D+00 0.10425500D+02 0.25497949D-01
+ 0.80000000D+00 0.90000000D+00 0.10252939D+02 0.26489759D-01
+ 0.90000000D+00 0.10000000D+01 0.10041183D+02 0.27465588D-01
+ 0.10000000D+01 0.11000000D+01 0.97789528D+01 0.25813094D-01
+ 0.11000000D+01 0.12000000D+01 0.94726648D+01 0.23975612D-01
+ 0.12000000D+01 0.13000000D+01 0.91712467D+01 0.25060363D-01
+ 0.13000000D+01 0.14000000D+01 0.88243833D+01 0.26840467D-01
+ 0.14000000D+01 0.15000000D+01 0.84426873D+01 0.22656008D-01
+ 0.15000000D+01 0.16000000D+01 0.81021532D+01 0.25701948D-01
+ 0.16000000D+01 0.17000000D+01 0.77333907D+01 0.22579753D-01
+ 0.17000000D+01 0.18000000D+01 0.73730256D+01 0.22943544D-01
+ 0.18000000D+01 0.19000000D+01 0.69128140D+01 0.21267140D-01
+ 0.19000000D+01 0.20000000D+01 0.64799201D+01 0.21407066D-01
+ 0.20000000D+01 0.21000000D+01 0.60366178D+01 0.19243403D-01
+ 0.21000000D+01 0.22000000D+01 0.56076586D+01 0.43915414D-01
+ 0.22000000D+01 0.23000000D+01 0.52188219D+01 0.41750937D-01
+ 0.23000000D+01 0.24000000D+01 0.47827624D+01 0.16781904D-01
+ 0.24000000D+01 0.25000000D+01 0.43239355D+01 0.16602770D-01
+ 0.25000000D+01 0.26000000D+01 0.39338776D+01 0.16629304D-01
+ 0.26000000D+01 0.27000000D+01 0.35707995D+01 0.33672091D-01
+ 0.27000000D+01 0.28000000D+01 0.31001641D+01 0.33626454D-01
+ 0.28000000D+01 0.29000000D+01 0.27595255D+01 0.14962618D-01
+ 0.29000000D+01 0.30000000D+01 0.24319858D+01 0.12813925D-01
+ 0.30000000D+01 0.31000000D+01 0.20681939D+01 0.15700419D-01
+ 0.31000000D+01 0.32000000D+01 0.17512921D+01 0.15830920D-01
+ 0.32000000D+01 0.33000000D+01 0.14796028D+01 0.91884030D-02
+ 0.33000000D+01 0.34000000D+01 0.12226734D+01 0.81454138D-02
+ 0.34000000D+01 0.35000000D+01 0.97773299D+00 0.82618390D-02
+ 0.35000000D+01 0.36000000D+01 0.78630606D+00 0.72504673D-02
+ 0.36000000D+01 0.37000000D+01 0.59922385D+00 0.46005858D-02
+ 0.37000000D+01 0.38000000D+01 0.44333924D+00 0.36009912D-02
+ 0.38000000D+01 0.39000000D+01 0.31534032D+00 0.28997128D-02
+ 0.39000000D+01 0.40000000D+01 0.21255350D+00 0.19119980D-02
+ 0.40000000D+01 0.41000000D+01 0.13538944D+00 0.13680948D-02
+ 0.41000000D+01 0.42000000D+01 0.78398907D-01 0.73793276D-03
+ 0.42000000D+01 0.43000000D+01 0.41424034D-01 0.44996301D-03
+ 0.43000000D+01 0.44000000D+01 0.18945458D-01 0.19205472D-03
+ 0.44000000D+01 0.45000000D+01 0.71418752D-02 0.79722918D-04
+ 0.45000000D+01 0.46000000D+01 0.20497836D-02 0.28085471D-04
+ 0.46000000D+01 0.47000000D+01 0.34008325D-03 0.90932965D-05
+ 0.47000000D+01 0.48000000D+01 0.10356267D-04 0.14611689D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10315332D-04 0.14623833D-05
+ -.47000000D+01 -.46000000D+01 0.33838988D-03 0.88614843D-05
+ -.46000000D+01 -.45000000D+01 0.20731129D-02 0.28528915D-04
+ -.45000000D+01 -.44000000D+01 0.72276878D-02 0.81647995D-04
+ -.44000000D+01 -.43000000D+01 0.18759743D-01 0.42594233D-03
+ -.43000000D+01 -.42000000D+01 0.42395778D-01 0.44332212D-03
+ -.42000000D+01 -.41000000D+01 0.80280621D-01 0.72386676D-03
+ -.41000000D+01 -.40000000D+01 0.13690376D+00 0.12172362D-02
+ -.40000000D+01 -.39000000D+01 0.21591363D+00 0.17869209D-02
+ -.39000000D+01 -.38000000D+01 0.32262011D+00 0.25816202D-02
+ -.38000000D+01 -.37000000D+01 0.45263764D+00 0.42374750D-02
+ -.37000000D+01 -.36000000D+01 0.61829281D+00 0.45379698D-02
+ -.36000000D+01 -.35000000D+01 0.81014918D+00 0.65924129D-02
+ -.35000000D+01 -.34000000D+01 0.10167222D+01 0.74442321D-02
+ -.34000000D+01 -.33000000D+01 0.12717576D+01 0.85055262D-02
+ -.33000000D+01 -.32000000D+01 0.15376116D+01 0.83568433D-02
+ -.32000000D+01 -.31000000D+01 0.18281973D+01 0.90898930D-02
+ -.31000000D+01 -.30000000D+01 0.21612692D+01 0.12685563D-01
+ -.30000000D+01 -.29000000D+01 0.25328799D+01 0.11844958D-01
+ -.29000000D+01 -.28000000D+01 0.28750520D+01 0.12948891D-01
+ -.28000000D+01 -.27000000D+01 0.32939787D+01 0.13865251D-01
+ -.27000000D+01 -.26000000D+01 0.36769635D+01 0.14344185D-01
+ -.26000000D+01 -.25000000D+01 0.41232849D+01 0.14898257D-01
+ -.25000000D+01 -.24000000D+01 0.45614490D+01 0.19529484D-01
+ -.24000000D+01 -.23000000D+01 0.49954694D+01 0.16162713D-01
+ -.23000000D+01 -.22000000D+01 0.54736121D+01 0.18151774D-01
+ -.22000000D+01 -.21000000D+01 0.59216411D+01 0.20522323D-01
+ -.21000000D+01 -.20000000D+01 0.64153379D+01 0.21832760D-01
+ -.20000000D+01 -.19000000D+01 0.68401262D+01 0.19618322D-01
+ -.19000000D+01 -.18000000D+01 0.72742520D+01 0.22538700D-01
+ -.18000000D+01 -.17000000D+01 0.77435220D+01 0.23376746D-01
+ -.17000000D+01 -.16000000D+01 0.81664643D+01 0.22435998D-01
+ -.16000000D+01 -.15000000D+01 0.85481507D+01 0.23748120D-01
+ -.15000000D+01 -.14000000D+01 0.89317293D+01 0.23883676D-01
+ -.14000000D+01 -.13000000D+01 0.93248036D+01 0.23956888D-01
+ -.13000000D+01 -.12000000D+01 0.96695464D+01 0.26876690D-01
+ -.12000000D+01 -.11000000D+01 0.99951251D+01 0.25788045D-01
+ -.11000000D+01 -.10000000D+01 0.10290310D+02 0.25804126D-01
+ -.10000000D+01 -.90000000D+00 0.10612624D+02 0.26248204D-01
+ -.90000000D+00 -.80000000D+00 0.10814808D+02 0.27193097D-01
+ -.80000000D+00 -.70000000D+00 0.11059240D+02 0.26998195D-01
+ -.70000000D+00 -.60000000D+00 0.11206130D+02 0.26532688D-01
+ -.60000000D+00 -.50000000D+00 0.11444673D+02 0.29563857D-01
+ -.50000000D+00 -.40000000D+00 0.11589605D+02 0.27025805D-01
+ -.40000000D+00 -.30000000D+00 0.11718051D+02 0.30143406D-01
+ -.30000000D+00 -.20000000D+00 0.11767338D+02 0.27516975D-01
+ -.20000000D+00 -.10000000D+00 0.11799110D+02 0.26647617D-01
+ -.10000000D+00 0.18041124D-15 0.11859580D+02 0.25658761D-01
+ 0.70776718D-15 0.10000000D+00 0.11887439D+02 0.26257336D-01
+ 0.10000000D+00 0.20000000D+00 0.11850426D+02 0.26405014D-01
+ 0.20000000D+00 0.30000000D+00 0.11742786D+02 0.30005911D-01
+ 0.30000000D+00 0.40000000D+00 0.11680120D+02 0.29781557D-01
+ 0.40000000D+00 0.50000000D+00 0.11517201D+02 0.30066391D-01
+ 0.50000000D+00 0.60000000D+00 0.11411211D+02 0.27625568D-01
+ 0.60000000D+00 0.70000000D+00 0.11241349D+02 0.26636132D-01
+ 0.70000000D+00 0.80000000D+00 0.11022345D+02 0.25534774D-01
+ 0.80000000D+00 0.90000000D+00 0.10834181D+02 0.26555200D-01
+ 0.90000000D+00 0.10000000D+01 0.10606486D+02 0.27538998D-01
+ 0.10000000D+01 0.11000000D+01 0.10326803D+02 0.25852326D-01
+ 0.11000000D+01 0.12000000D+01 0.10001072D+02 0.24013238D-01
+ 0.12000000D+01 0.13000000D+01 0.96777826D+01 0.25141702D-01
+ 0.13000000D+01 0.14000000D+01 0.93096024D+01 0.26899596D-01
+ 0.14000000D+01 0.15000000D+01 0.89050584D+01 0.22676693D-01
+ 0.15000000D+01 0.16000000D+01 0.85405841D+01 0.25730871D-01
+ 0.16000000D+01 0.17000000D+01 0.81469810D+01 0.22613708D-01
+ 0.17000000D+01 0.18000000D+01 0.77616824D+01 0.22966933D-01
+ 0.18000000D+01 0.19000000D+01 0.72750154D+01 0.21285323D-01
+ 0.19000000D+01 0.20000000D+01 0.68163380D+01 0.21426723D-01
+ 0.20000000D+01 0.21000000D+01 0.63471262D+01 0.19274494D-01
+ 0.21000000D+01 0.22000000D+01 0.58810588D+01 0.53393653D-01
+ 0.22000000D+01 0.23000000D+01 0.54884172D+01 0.51603219D-01
+ 0.23000000D+01 0.24000000D+01 0.50166940D+01 0.16806045D-01
+ 0.24000000D+01 0.25000000D+01 0.45328765D+01 0.16629389D-01
+ 0.25000000D+01 0.26000000D+01 0.41198301D+01 0.16644856D-01
+ 0.26000000D+01 0.27000000D+01 0.37346316D+01 0.33922521D-01
+ 0.27000000D+01 0.28000000D+01 0.32419964D+01 0.33875511D-01
+ 0.28000000D+01 0.29000000D+01 0.28817484D+01 0.14972831D-01
+ 0.29000000D+01 0.30000000D+01 0.25362276D+01 0.12900513D-01
+ 0.30000000D+01 0.31000000D+01 0.21544840D+01 0.15770024D-01
+ 0.31000000D+01 0.32000000D+01 0.18226921D+01 0.15836977D-01
+ 0.32000000D+01 0.33000000D+01 0.15371509D+01 0.91938125D-02
+ 0.33000000D+01 0.34000000D+01 0.12680952D+01 0.81526202D-02
+ 0.34000000D+01 0.35000000D+01 0.10126041D+01 0.83291049D-02
+ 0.35000000D+01 0.36000000D+01 0.81248705D+00 0.73215206D-02
+ 0.36000000D+01 0.37000000D+01 0.61804043D+00 0.46025053D-02
+ 0.37000000D+01 0.38000000D+01 0.45632560D+00 0.36026722D-02
+ 0.38000000D+01 0.39000000D+01 0.32388112D+00 0.29011526D-02
+ 0.39000000D+01 0.40000000D+01 0.21782463D+00 0.19129359D-02
+ 0.40000000D+01 0.41000000D+01 0.13839732D+00 0.13685995D-02
+ 0.41000000D+01 0.42000000D+01 0.79965091D-01 0.73824874D-03
+ 0.42000000D+01 0.43000000D+01 0.42140332D-01 0.45019621D-03
+ 0.43000000D+01 0.44000000D+01 0.19226764D-01 0.19230462D-03
+ 0.44000000D+01 0.45000000D+01 0.72293503D-02 0.79747383D-04
+ 0.45000000D+01 0.46000000D+01 0.20686305D-02 0.28088879D-04
+ 0.46000000D+01 0.47000000D+01 0.34203547D-03 0.90935798D-05
+ 0.47000000D+01 0.48000000D+01 0.10379813D-04 0.14611710D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.99698539D-05 0.14623493D-05
+ -.47000000D+01 -.46000000D+01 0.30992693D-03 0.88598546D-05
+ -.46000000D+01 -.45000000D+01 0.18061509D-02 0.28483826D-04
+ -.45000000D+01 -.44000000D+01 0.60425121D-02 0.81580823D-04
+ -.44000000D+01 -.43000000D+01 0.15096797D-01 0.42577873D-03
+ -.43000000D+01 -.42000000D+01 0.33296637D-01 0.44318645D-03
+ -.42000000D+01 -.41000000D+01 0.61141964D-01 0.72261593D-03
+ -.41000000D+01 -.40000000D+01 0.10123721D+00 0.12160846D-02
+ -.40000000D+01 -.39000000D+01 0.15549049D+00 0.17831517D-02
+ -.39000000D+01 -.38000000D+01 0.22710438D+00 0.25749158D-02
+ -.38000000D+01 -.37000000D+01 0.31119208D+00 0.42390503D-02
+ -.37000000D+01 -.36000000D+01 0.41883560D+00 0.45296787D-02
+ -.36000000D+01 -.35000000D+01 0.53945557D+00 0.65776617D-02
+ -.35000000D+01 -.34000000D+01 0.66249145D+00 0.74147242D-02
+ -.34000000D+01 -.33000000D+01 0.81921672D+00 0.84989700D-02
+ -.33000000D+01 -.32000000D+01 0.97556560D+00 0.83498528D-02
+ -.32000000D+01 -.31000000D+01 0.11421378D+01 0.90812096D-02
+ -.31000000D+01 -.30000000D+01 0.13403524D+01 0.12642044D-01
+ -.30000000D+01 -.29000000D+01 0.15630231D+01 0.11777810D-01
+ -.29000000D+01 -.28000000D+01 0.17503860D+01 0.12241134D-01
+ -.28000000D+01 -.27000000D+01 0.19950171D+01 0.13169418D-01
+ -.27000000D+01 -.26000000D+01 0.22034354D+01 0.14260849D-01
+ -.26000000D+01 -.25000000D+01 0.24656477D+01 0.14776801D-01
+ -.25000000D+01 -.24000000D+01 0.27064015D+01 0.19434416D-01
+ -.24000000D+01 -.23000000D+01 0.29457942D+01 0.16137079D-01
+ -.23000000D+01 -.22000000D+01 0.32214780D+01 0.17962457D-01
+ -.22000000D+01 -.21000000D+01 0.34624058D+01 0.20197435D-01
+ -.21000000D+01 -.20000000D+01 0.37470858D+01 0.21645467D-01
+ -.20000000D+01 -.19000000D+01 0.39649745D+01 0.19488852D-01
+ -.19000000D+01 -.18000000D+01 0.41986238D+01 0.22310396D-01
+ -.18000000D+01 -.17000000D+01 0.44645529D+01 0.23205343D-01
+ -.17000000D+01 -.16000000D+01 0.46924661D+01 0.22346089D-01
+ -.16000000D+01 -.15000000D+01 0.48815369D+01 0.23584940D-01
+ -.15000000D+01 -.14000000D+01 0.50842631D+01 0.23749785D-01
+ -.14000000D+01 -.13000000D+01 0.52982647D+01 0.23741703D-01
+ -.13000000D+01 -.12000000D+01 0.54801978D+01 0.26686274D-01
+ -.12000000D+01 -.11000000D+01 0.56452078D+01 0.25707964D-01
+ -.11000000D+01 -.10000000D+01 0.57949908D+01 0.25680863D-01
+ -.10000000D+01 -.90000000D+00 0.59824554D+01 0.26066915D-01
+ -.90000000D+00 -.80000000D+00 0.60588380D+01 0.27005188D-01
+ -.80000000D+00 -.70000000D+00 0.61953353D+01 0.26869687D-01
+ -.70000000D+00 -.60000000D+00 0.62471838D+01 0.26351649D-01
+ -.60000000D+00 -.50000000D+00 0.63981267D+01 0.29433798D-01
+ -.50000000D+00 -.40000000D+00 0.64729506D+01 0.26799818D-01
+ -.40000000D+00 -.30000000D+00 0.65423162D+01 0.29977796D-01
+ -.30000000D+00 -.20000000D+00 0.65512026D+01 0.27426772D-01
+ -.20000000D+00 -.10000000D+00 0.65531850D+01 0.26519737D-01
+ -.10000000D+00 0.18041124D-15 0.65985554D+01 0.25512237D-01
+ 0.70776718D-15 0.10000000D+00 0.66298048D+01 0.26113556D-01
+ 0.10000000D+00 0.20000000D+00 0.66057992D+01 0.26148280D-01
+ 0.20000000D+00 0.30000000D+00 0.65206779D+01 0.29494029D-01
+ 0.30000000D+00 0.40000000D+00 0.65091498D+01 0.29364494D-01
+ 0.40000000D+00 0.50000000D+00 0.64019276D+01 0.29947895D-01
+ 0.50000000D+00 0.60000000D+00 0.63692782D+01 0.27426735D-01
+ 0.60000000D+00 0.70000000D+00 0.62772539D+01 0.26427770D-01
+ 0.70000000D+00 0.80000000D+00 0.61567291D+01 0.25408311D-01
+ 0.80000000D+00 0.90000000D+00 0.60833134D+01 0.26314067D-01
+ 0.90000000D+00 0.10000000D+01 0.59756603D+01 0.27238725D-01
+ 0.10000000D+01 0.11000000D+01 0.58293573D+01 0.25692532D-01
+ 0.11000000D+01 0.12000000D+01 0.56507733D+01 0.23883590D-01
+ 0.12000000D+01 0.13000000D+01 0.54873196D+01 0.24775009D-01
+ 0.13000000D+01 0.14000000D+01 0.52852264D+01 0.26635225D-01
+ 0.14000000D+01 0.15000000D+01 0.50547187D+01 0.22622416D-01
+ 0.15000000D+01 0.16000000D+01 0.48756223D+01 0.25636946D-01
+ 0.16000000D+01 0.17000000D+01 0.46723142D+01 0.22519967D-01
+ 0.17000000D+01 0.18000000D+01 0.44826639D+01 0.22907299D-01
+ 0.18000000D+01 0.19000000D+01 0.41988048D+01 0.21243150D-01
+ 0.19000000D+01 0.20000000D+01 0.39430254D+01 0.21370220D-01
+ 0.20000000D+01 0.21000000D+01 0.36797738D+01 0.19174929D-01
+ 0.21000000D+01 0.22000000D+01 0.34608580D+01 0.25185696D-01
+ 0.22000000D+01 0.23000000D+01 0.31965971D+01 0.21267077D-01
+ 0.23000000D+01 0.24000000D+01 0.29653751D+01 0.16738775D-01
+ 0.24000000D+01 0.25000000D+01 0.26820722D+01 0.16557536D-01
+ 0.25000000D+01 0.26000000D+01 0.24594350D+01 0.16607153D-01
+ 0.26000000D+01 0.27000000D+01 0.22576495D+01 0.32028731D-01
+ 0.27000000D+01 0.28000000D+01 0.19484162D+01 0.31985495D-01
+ 0.28000000D+01 0.29000000D+01 0.17535926D+01 0.14954610D-01
+ 0.29000000D+01 0.30000000D+01 0.15644404D+01 0.12544504D-01
+ 0.30000000D+01 0.31000000D+01 0.13343734D+01 0.15480282D-01
+ 0.31000000D+01 0.32000000D+01 0.11365893D+01 0.15816324D-01
+ 0.32000000D+01 0.33000000D+01 0.97425045D+00 0.91825885D-02
+ 0.33000000D+01 0.34000000D+01 0.81590333D+00 0.81318594D-02
+ 0.34000000D+01 0.35000000D+01 0.65868916D+00 0.78668603D-02
+ 0.35000000D+01 0.36000000D+01 0.54110033D+00 0.68129297D-02
+ 0.36000000D+01 0.37000000D+01 0.41848458D+00 0.46000642D-02
+ 0.37000000D+01 0.38000000D+01 0.31502103D+00 0.36027137D-02
+ 0.38000000D+01 0.39000000D+01 0.22857036D+00 0.28979460D-02
+ 0.39000000D+01 0.40000000D+01 0.15724433D+00 0.19098021D-02
+ 0.40000000D+01 0.41000000D+01 0.10275089D+00 0.13672725D-02
+ 0.41000000D+01 0.42000000D+01 0.60842471D-01 0.73719619D-03
+ 0.42000000D+01 0.43000000D+01 0.33078794D-01 0.44915182D-03
+ 0.43000000D+01 0.44000000D+01 0.15549006D-01 0.19074548D-03
+ 0.44000000D+01 0.45000000D+01 0.60442533D-02 0.79655109D-04
+ 0.45000000D+01 0.46000000D+01 0.18025024D-02 0.28078917D-04
+ 0.46000000D+01 0.47000000D+01 0.31359715D-03 0.90925120D-05
+ 0.47000000D+01 0.48000000D+01 0.10036493D-04 0.14611590D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10238193D-04 0.14623784D-05
+ -.47000000D+01 -.46000000D+01 0.33122826D-03 0.88613707D-05
+ -.46000000D+01 -.45000000D+01 0.20003372D-02 0.28520480D-04
+ -.45000000D+01 -.44000000D+01 0.68845754D-02 0.81644397D-04
+ -.44000000D+01 -.43000000D+01 0.17650910D-01 0.42592938D-03
+ -.43000000D+01 -.42000000D+01 0.39532818D-01 0.44340264D-03
+ -.42000000D+01 -.41000000D+01 0.74063495D-01 0.72361060D-03
+ -.41000000D+01 -.40000000D+01 0.12497851D+00 0.12171995D-02
+ -.40000000D+01 -.39000000D+01 0.19517115D+00 0.17857052D-02
+ -.39000000D+01 -.38000000D+01 0.28905336D+00 0.25799873D-02
+ -.38000000D+01 -.37000000D+01 0.40188673D+00 0.42382408D-02
+ -.37000000D+01 -.36000000D+01 0.54530087D+00 0.45360753D-02
+ -.36000000D+01 -.35000000D+01 0.70934244D+00 0.65835899D-02
+ -.35000000D+01 -.34000000D+01 0.88287756D+00 0.74335787D-02
+ -.34000000D+01 -.33000000D+01 0.10983995D+01 0.85068295D-02
+ -.33000000D+01 -.32000000D+01 0.13196497D+01 0.83555846D-02
+ -.32000000D+01 -.31000000D+01 0.15591992D+01 0.90880226D-02
+ -.31000000D+01 -.30000000D+01 0.18362832D+01 0.12669297D-01
+ -.30000000D+01 -.29000000D+01 0.21453834D+01 0.11821645D-01
+ -.29000000D+01 -.28000000D+01 0.24221045D+01 0.12708939D-01
+ -.28000000D+01 -.27000000D+01 0.27674570D+01 0.13628667D-01
+ -.27000000D+01 -.26000000D+01 0.30757848D+01 0.14308643D-01
+ -.26000000D+01 -.25000000D+01 0.34431364D+01 0.14851755D-01
+ -.25000000D+01 -.24000000D+01 0.37960866D+01 0.19497180D-01
+ -.24000000D+01 -.23000000D+01 0.41458729D+01 0.16156856D-01
+ -.23000000D+01 -.22000000D+01 0.45359424D+01 0.18077648D-01
+ -.22000000D+01 -.21000000D+01 0.48945492D+01 0.20385063D-01
+ -.21000000D+01 -.20000000D+01 0.52963129D+01 0.21753638D-01
+ -.20000000D+01 -.19000000D+01 0.56297985D+01 0.19544372D-01
+ -.19000000D+01 -.18000000D+01 0.59764808D+01 0.22435822D-01
+ -.18000000D+01 -.17000000D+01 0.63554950D+01 0.23324883D-01
+ -.17000000D+01 -.16000000D+01 0.66915673D+01 0.22414843D-01
+ -.16000000D+01 -.15000000D+01 0.69874678D+01 0.23673649D-01
+ -.15000000D+01 -.14000000D+01 0.72906365D+01 0.23826439D-01
+ -.14000000D+01 -.13000000D+01 0.76035895D+01 0.23860421D-01
+ -.13000000D+01 -.12000000D+01 0.78755078D+01 0.26790183D-01
+ -.12000000D+01 -.11000000D+01 0.81287839D+01 0.25763087D-01
+ -.11000000D+01 -.10000000D+01 0.83586565D+01 0.25757370D-01
+ -.10000000D+01 -.90000000D+00 0.86203957D+01 0.26148799D-01
+ -.90000000D+00 -.80000000D+00 0.87649367D+01 0.27088899D-01
+ -.80000000D+00 -.70000000D+00 0.89604687D+01 0.26965599D-01
+ -.70000000D+00 -.60000000D+00 0.90646982D+01 0.26467816D-01
+ -.60000000D+00 -.50000000D+00 0.92637420D+01 0.29524008D-01
+ -.50000000D+00 -.40000000D+00 0.93760615D+01 0.26945732D-01
+ -.40000000D+00 -.30000000D+00 0.94780672D+01 0.30091887D-01
+ -.30000000D+00 -.20000000D+00 0.95086658D+01 0.27487390D-01
+ -.20000000D+00 -.10000000D+00 0.95273515D+01 0.26599901D-01
+ -.10000000D+00 0.18041124D-15 0.95808263D+01 0.25598722D-01
+ 0.70776718D-15 0.10000000D+00 0.96098535D+01 0.26207093D-01
+ 0.10000000D+00 0.20000000D+00 0.95796031D+01 0.26302086D-01
+ 0.20000000D+00 0.30000000D+00 0.94812326D+01 0.29715452D-01
+ 0.30000000D+00 0.40000000D+00 0.94422031D+01 0.29529305D-01
+ 0.40000000D+00 0.50000000D+00 0.93046345D+01 0.30017047D-01
+ 0.50000000D+00 0.60000000D+00 0.92320071D+01 0.27555009D-01
+ 0.60000000D+00 0.70000000D+00 0.90976073D+01 0.26563683D-01
+ 0.70000000D+00 0.80000000D+00 0.89230826D+01 0.25492164D-01
+ 0.80000000D+00 0.90000000D+00 0.87867576D+01 0.26458608D-01
+ 0.90000000D+00 0.10000000D+01 0.86137893D+01 0.27423582D-01
+ 0.10000000D+01 0.11000000D+01 0.83942372D+01 0.25803641D-01
+ 0.11000000D+01 0.12000000D+01 0.81345709D+01 0.23964053D-01
+ 0.12000000D+01 0.13000000D+01 0.78837704D+01 0.25020265D-01
+ 0.13000000D+01 0.14000000D+01 0.75889688D+01 0.26821418D-01
+ 0.14000000D+01 0.15000000D+01 0.72625416D+01 0.22662861D-01
+ 0.15000000D+01 0.16000000D+01 0.69806249D+01 0.25694874D-01
+ 0.16000000D+01 0.17000000D+01 0.66723246D+01 0.22569865D-01
+ 0.17000000D+01 0.18000000D+01 0.63731628D+01 0.22944614D-01
+ 0.18000000D+01 0.19000000D+01 0.59767149D+01 0.21270592D-01
+ 0.19000000D+01 0.20000000D+01 0.56074374D+01 0.21406861D-01
+ 0.20000000D+01 0.21000000D+01 0.52284507D+01 0.19236690D-01
+ 0.21000000D+01 0.22000000D+01 0.48759085D+01 0.34976740D-01
+ 0.22000000D+01 0.23000000D+01 0.45284604D+01 0.32203538D-01
+ 0.23000000D+01 0.24000000D+01 0.41664298D+01 0.16776700D-01
+ 0.24000000D+01 0.25000000D+01 0.37694960D+01 0.16593209D-01
+ 0.25000000D+01 0.26000000D+01 0.34384735D+01 0.16628456D-01
+ 0.26000000D+01 0.27000000D+01 0.31323496D+01 0.33604276D-01
+ 0.27000000D+01 0.28000000D+01 0.27169160D+01 0.33556573D-01
+ 0.28000000D+01 0.29000000D+01 0.24275482D+01 0.14966345D-01
+ 0.29000000D+01 0.30000000D+01 0.21479638D+01 0.12762378D-01
+ 0.30000000D+01 0.31000000D+01 0.18297756D+01 0.15657406D-01
+ 0.31000000D+01 0.32000000D+01 0.15535372D+01 0.15832387D-01
+ 0.32000000D+01 0.33000000D+01 0.13188739D+01 0.91912350D-02
+ 0.33000000D+01 0.34000000D+01 0.10948890D+01 0.81460417D-02
+ 0.34000000D+01 0.35000000D+01 0.87861298D+00 0.82351862D-02
+ 0.35000000D+01 0.36000000D+01 0.71172373D+00 0.72217751D-02
+ 0.36000000D+01 0.37000000D+01 0.54502869D+00 0.46029756D-02
+ 0.37000000D+01 0.38000000D+01 0.40560530D+00 0.36044279D-02
+ 0.38000000D+01 0.39000000D+01 0.29039680D+00 0.29009166D-02
+ 0.39000000D+01 0.40000000D+01 0.19702004D+00 0.19124205D-02
+ 0.40000000D+01 0.41000000D+01 0.12648388D+00 0.13684087D-02
+ 0.41000000D+01 0.42000000D+01 0.73754488D-01 0.73813079D-03
+ 0.42000000D+01 0.43000000D+01 0.39289192D-01 0.45004287D-03
+ 0.43000000D+01 0.44000000D+01 0.18113359D-01 0.19204350D-03
+ 0.44000000D+01 0.45000000D+01 0.68862353D-02 0.79732801D-04
+ 0.45000000D+01 0.46000000D+01 0.19959987D-02 0.28089486D-04
+ 0.46000000D+01 0.47000000D+01 0.33488386D-03 0.90935325D-05
+ 0.47000000D+01 0.48000000D+01 0.10303154D-04 0.14611695D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10293821D-04 0.14623840D-05
+ -.47000000D+01 -.46000000D+01 0.33614855D-03 0.88616628D-05
+ -.46000000D+01 -.45000000D+01 0.20489493D-02 0.28530244D-04
+ -.45000000D+01 -.44000000D+01 0.71087332D-02 0.81658789D-04
+ -.44000000D+01 -.43000000D+01 0.18363126D-01 0.42596160D-03
+ -.43000000D+01 -.42000000D+01 0.41344078D-01 0.44342918D-03
+ -.42000000D+01 -.41000000D+01 0.77946791D-01 0.72395356D-03
+ -.41000000D+01 -.40000000D+01 0.13233293D+00 0.12175689D-02
+ -.40000000D+01 -.39000000D+01 0.20781038D+00 0.17870484D-02
+ -.39000000D+01 -.38000000D+01 0.30929612D+00 0.25819691D-02
+ -.38000000D+01 -.37000000D+01 0.43217120D+00 0.42391505D-02
+ -.37000000D+01 -.36000000D+01 0.58843505D+00 0.45388444D-02
+ -.36000000D+01 -.35000000D+01 0.76837129D+00 0.65893300D-02
+ -.35000000D+01 -.34000000D+01 0.96055275D+00 0.74422388D-02
+ -.34000000D+01 -.33000000D+01 0.11982856D+01 0.85095419D-02
+ -.33000000D+01 -.32000000D+01 0.14443118D+01 0.83583634D-02
+ -.32000000D+01 -.31000000D+01 0.17121039D+01 0.90911420D-02
+ -.31000000D+01 -.30000000D+01 0.20198274D+01 0.12683461D-01
+ -.30000000D+01 -.29000000D+01 0.23630961D+01 0.11841726D-01
+ -.29000000D+01 -.28000000D+01 0.26751654D+01 0.12910424D-01
+ -.28000000D+01 -.27000000D+01 0.30606377D+01 0.13826680D-01
+ -.27000000D+01 -.26000000D+01 0.34089907D+01 0.14335210D-01
+ -.26000000D+01 -.25000000D+01 0.38186415D+01 0.14888877D-01
+ -.25000000D+01 -.24000000D+01 0.42173716D+01 0.19524620D-01
+ -.24000000D+01 -.23000000D+01 0.46118518D+01 0.16166246D-01
+ -.23000000D+01 -.22000000D+01 0.50487243D+01 0.18140377D-01
+ -.22000000D+01 -.21000000D+01 0.54551244D+01 0.20484096D-01
+ -.21000000D+01 -.20000000D+01 0.59053640D+01 0.21808394D-01
+ -.20000000D+01 -.19000000D+01 0.62871157D+01 0.19582957D-01
+ -.19000000D+01 -.18000000D+01 0.66801842D+01 0.22499485D-01
+ -.18000000D+01 -.17000000D+01 0.71064298D+01 0.23369862D-01
+ -.17000000D+01 -.16000000D+01 0.74880022D+01 0.22438178D-01
+ -.16000000D+01 -.15000000D+01 0.78288278D+01 0.23729313D-01
+ -.15000000D+01 -.14000000D+01 0.81739945D+01 0.23872761D-01
+ -.14000000D+01 -.13000000D+01 0.85288546D+01 0.23931438D-01
+ -.13000000D+01 -.12000000D+01 0.88384978D+01 0.26855181D-01
+ -.12000000D+01 -.11000000D+01 0.91295494D+01 0.25787268D-01
+ -.11000000D+01 -.10000000D+01 0.93933389D+01 0.25797465D-01
+ -.10000000D+01 -.90000000D+00 0.96866034D+01 0.26214068D-01
+ -.90000000D+00 -.80000000D+00 0.98610485D+01 0.27155447D-01
+ -.80000000D+00 -.70000000D+00 0.10081562D+02 0.26996879D-01
+ -.70000000D+00 -.60000000D+00 0.10207980D+02 0.26519819D-01
+ -.60000000D+00 -.50000000D+00 0.10427706D+02 0.29560161D-01
+ -.50000000D+00 -.40000000D+00 0.10556513D+02 0.27008401D-01
+ -.40000000D+00 -.30000000D+00 0.10672302D+02 0.30136658D-01
+ -.30000000D+00 -.20000000D+00 0.10712466D+02 0.27516743D-01
+ -.20000000D+00 -.10000000D+00 0.10738055D+02 0.26639367D-01
+ -.10000000D+00 0.18041124D-15 0.10795208D+02 0.25645057D-01
+ 0.70776718D-15 0.10000000D+00 0.10823269D+02 0.26250641D-01
+ 0.10000000D+00 0.20000000D+00 0.10789894D+02 0.26385009D-01
+ 0.20000000D+00 0.30000000D+00 0.10686965D+02 0.29903030D-01
+ 0.30000000D+00 0.40000000D+00 0.10635148D+02 0.29684318D-01
+ 0.40000000D+00 0.50000000D+00 0.10484367D+02 0.30056495D-01
+ 0.50000000D+00 0.60000000D+00 0.10394576D+02 0.27611610D-01
+ 0.60000000D+00 0.70000000D+00 0.10242447D+02 0.26622239D-01
+ 0.70000000D+00 0.80000000D+00 0.10044616D+02 0.25529781D-01
+ 0.80000000D+00 0.90000000D+00 0.98813345D+01 0.26531651D-01
+ 0.90000000D+00 0.10000000D+01 0.96802084D+01 0.27510656D-01
+ 0.10000000D+01 0.11000000D+01 0.94295351D+01 0.25847183D-01
+ 0.11000000D+01 0.12000000D+01 0.91355093D+01 0.24004840D-01
+ 0.12000000D+01 0.13000000D+01 0.88468404D+01 0.25120441D-01
+ 0.13000000D+01 0.14000000D+01 0.85137520D+01 0.26889667D-01
+ 0.14000000D+01 0.15000000D+01 0.81467330D+01 0.22679208D-01
+ 0.15000000D+01 0.16000000D+01 0.78214868D+01 0.25721715D-01
+ 0.16000000D+01 0.17000000D+01 0.74687412D+01 0.22601105D-01
+ 0.17000000D+01 0.18000000D+01 0.71243222D+01 0.22965114D-01
+ 0.18000000D+01 0.19000000D+01 0.66803485D+01 0.21284545D-01
+ 0.19000000D+01 0.20000000D+01 0.62641189D+01 0.21424797D-01
+ 0.20000000D+01 0.21000000D+01 0.58374428D+01 0.19269821D-01
+ 0.21000000D+01 0.22000000D+01 0.54226788D+01 0.46080273D-01
+ 0.22000000D+01 0.23000000D+01 0.50552613D+01 0.43966714D-01
+ 0.23000000D+01 0.24000000D+01 0.46330094D+01 0.16800171D-01
+ 0.24000000D+01 0.25000000D+01 0.41895411D+01 0.16618929D-01
+ 0.25000000D+01 0.26000000D+01 0.38147710D+01 0.16641315D-01
+ 0.26000000D+01 0.27000000D+01 0.34662983D+01 0.33923107D-01
+ 0.27000000D+01 0.28000000D+01 0.30089325D+01 0.33875719D-01
+ 0.28000000D+01 0.29000000D+01 0.26814399D+01 0.14973979D-01
+ 0.29000000D+01 0.30000000D+01 0.23662211D+01 0.12864802D-01
+ 0.30000000D+01 0.31000000D+01 0.20130551D+01 0.15740265D-01
+ 0.31000000D+01 0.32000000D+01 0.17064732D+01 0.15837974D-01
+ 0.32000000D+01 0.33000000D+01 0.14437327D+01 0.91951542D-02
+ 0.33000000D+01 0.34000000D+01 0.11946858D+01 0.81529052D-02
+ 0.34000000D+01 0.35000000D+01 0.95634566D+00 0.83250384D-02
+ 0.35000000D+01 0.36000000D+01 0.77080425D+00 0.73173025D-02
+ 0.36000000D+01 0.37000000D+01 0.58817476D+00 0.46037379D-02
+ 0.37000000D+01 0.38000000D+01 0.43586428D+00 0.36045399D-02
+ 0.38000000D+01 0.39000000D+01 0.31059152D+00 0.29018482D-02
+ 0.39000000D+01 0.40000000D+01 0.20969879D+00 0.19132247D-02
+ 0.40000000D+01 0.41000000D+01 0.13383214D+00 0.13687787D-02
+ 0.41000000D+01 0.42000000D+01 0.77633959D-01 0.73837532D-03
+ 0.42000000D+01 0.43000000D+01 0.41092276D-01 0.45026061D-03
+ 0.43000000D+01 0.44000000D+01 0.18828559D-01 0.19233162D-03
+ 0.44000000D+01 0.45000000D+01 0.71104135D-02 0.79754457D-04
+ 0.45000000D+01 0.46000000D+01 0.20444539D-02 0.28091250D-04
+ 0.46000000D+01 0.47000000D+01 0.33980037D-03 0.90937246D-05
+ 0.47000000D+01 0.48000000D+01 0.10358433D-04 0.14611715D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10313934D-04 0.14623860D-05
+ -.47000000D+01 -.46000000D+01 0.33799581D-03 0.88617657D-05
+ -.46000000D+01 -.45000000D+01 0.20678123D-02 0.28534014D-04
+ -.45000000D+01 -.44000000D+01 0.71982637D-02 0.81664172D-04
+ -.44000000D+01 -.43000000D+01 0.18654572D-01 0.42597408D-03
+ -.43000000D+01 -.42000000D+01 0.42102202D-01 0.44343482D-03
+ -.42000000D+01 -.41000000D+01 0.79605017D-01 0.72411257D-03
+ -.41000000D+01 -.40000000D+01 0.13553242D+00 0.12177378D-02
+ -.40000000D+01 -.39000000D+01 0.21340886D+00 0.17877564D-02
+ -.39000000D+01 -.38000000D+01 0.31841155D+00 0.25829404D-02
+ -.38000000D+01 -.37000000D+01 0.44601301D+00 0.42398671D-02
+ -.37000000D+01 -.36000000D+01 0.60845260D+00 0.45402233D-02
+ -.36000000D+01 -.35000000D+01 0.79613358D+00 0.65937895D-02
+ -.35000000D+01 -.34000000D+01 0.99748128D+00 0.74475807D-02
+ -.34000000D+01 -.33000000D+01 0.12463193D+01 0.85109564D-02
+ -.33000000D+01 -.32000000D+01 0.15048572D+01 0.83599322D-02
+ -.32000000D+01 -.31000000D+01 0.17870247D+01 0.90930632D-02
+ -.31000000D+01 -.30000000D+01 0.21105007D+01 0.12691031D-01
+ -.30000000D+01 -.29000000D+01 0.24714835D+01 0.11851756D-01
+ -.29000000D+01 -.28000000D+01 0.28019921D+01 0.13001138D-01
+ -.28000000D+01 -.27000000D+01 0.32084430D+01 0.13917300D-01
+ -.27000000D+01 -.26000000D+01 0.35779375D+01 0.14352764D-01
+ -.26000000D+01 -.25000000D+01 0.40099077D+01 0.14910281D-01
+ -.25000000D+01 -.24000000D+01 0.44331020D+01 0.19539152D-01
+ -.24000000D+01 -.23000000D+01 0.48513528D+01 0.16171367D-01
+ -.23000000D+01 -.22000000D+01 0.53134055D+01 0.18172909D-01
+ -.22000000D+01 -.21000000D+01 0.57452446D+01 0.20544740D-01
+ -.21000000D+01 -.20000000D+01 0.62219163D+01 0.21846225D-01
+ -.20000000D+01 -.19000000D+01 0.66299270D+01 0.19616709D-01
+ -.19000000D+01 -.18000000D+01 0.70477646D+01 0.22542997D-01
+ -.18000000D+01 -.17000000D+01 0.74999505D+01 0.23392882D-01
+ -.17000000D+01 -.16000000D+01 0.79064385D+01 0.22450127D-01
+ -.16000000D+01 -.15000000D+01 0.82719704D+01 0.23764983D-01
+ -.15000000D+01 -.14000000D+01 0.86400588D+01 0.23901940D-01
+ -.14000000D+01 -.13000000D+01 0.90180756D+01 0.23976210D-01
+ -.13000000D+01 -.12000000D+01 0.93484994D+01 0.26896791D-01
+ -.12000000D+01 -.11000000D+01 0.96604908D+01 0.25800255D-01
+ -.11000000D+01 -.10000000D+01 0.99429838D+01 0.25819517D-01
+ -.10000000D+01 -.90000000D+00 0.10253717D+02 0.26260776D-01
+ -.90000000D+00 -.80000000D+00 0.10444998D+02 0.27207056D-01
+ -.80000000D+00 -.70000000D+00 0.10679482D+02 0.27016020D-01
+ -.70000000D+00 -.60000000D+00 0.10818055D+02 0.26551193D-01
+ -.60000000D+00 -.50000000D+00 0.11049286D+02 0.29579563D-01
+ -.50000000D+00 -.40000000D+00 0.11187531D+02 0.27042595D-01
+ -.40000000D+00 -.30000000D+00 0.11310940D+02 0.30161046D-01
+ -.30000000D+00 -.20000000D+00 0.11356457D+02 0.27533909D-01
+ -.20000000D+00 -.10000000D+00 0.11385900D+02 0.26663524D-01
+ -.10000000D+00 0.18041124D-15 0.11445075D+02 0.25673461D-01
+ 0.70776718D-15 0.10000000D+00 0.11472700D+02 0.26274157D-01
+ 0.10000000D+00 0.20000000D+00 0.11437451D+02 0.26428670D-01
+ 0.20000000D+00 0.30000000D+00 0.11332149D+02 0.30039054D-01
+ 0.30000000D+00 0.40000000D+00 0.11273051D+02 0.29806013D-01
+ 0.40000000D+00 0.50000000D+00 0.11114855D+02 0.30080728D-01
+ 0.50000000D+00 0.60000000D+00 0.11015456D+02 0.27642500D-01
+ 0.60000000D+00 0.70000000D+00 0.10853419D+02 0.26653448D-01
+ 0.70000000D+00 0.80000000D+00 0.10642713D+02 0.25550775D-01
+ 0.80000000D+00 0.90000000D+00 0.10464358D+02 0.26575603D-01
+ 0.90000000D+00 0.10000000D+01 0.10247535D+02 0.27560038D-01
+ 0.10000000D+01 0.11000000D+01 0.99795965D+01 0.25869007D-01
+ 0.11000000D+01 0.12000000D+01 0.96665970D+01 0.24027778D-01
+ 0.12000000D+01 0.13000000D+01 0.93567545D+01 0.25171302D-01
+ 0.13000000D+01 0.14000000D+01 0.90027377D+01 0.26923786D-01
+ 0.14000000D+01 0.15000000D+01 0.86132711D+01 0.22688571D-01
+ 0.15000000D+01 0.16000000D+01 0.82643850D+01 0.25739826D-01
+ 0.16000000D+01 0.17000000D+01 0.78870848D+01 0.22623765D-01
+ 0.17000000D+01 0.18000000D+01 0.75180895D+01 0.22978091D-01
+ 0.18000000D+01 0.19000000D+01 0.70480870D+01 0.21293758D-01
+ 0.19000000D+01 0.20000000D+01 0.66062954D+01 0.21435324D-01
+ 0.20000000D+01 0.21000000D+01 0.61538686D+01 0.19288359D-01
+ 0.21000000D+01 0.22000000D+01 0.57038509D+01 0.54063689D-01
+ 0.22000000D+01 0.23000000D+01 0.53291360D+01 0.52251570D-01
+ 0.23000000D+01 0.24000000D+01 0.48728999D+01 0.16815259D-01
+ 0.24000000D+01 0.25000000D+01 0.44045313D+01 0.16637115D-01
+ 0.25000000D+01 0.26000000D+01 0.40065166D+01 0.16650891D-01
+ 0.26000000D+01 0.27000000D+01 0.36355894D+01 0.34038689D-01
+ 0.27000000D+01 0.28000000D+01 0.31562366D+01 0.33991098D-01
+ 0.28000000D+01 0.29000000D+01 0.28086481D+01 0.14978813D-01
+ 0.29000000D+01 0.30000000D+01 0.24748990D+01 0.12925391D-01
+ 0.30000000D+01 0.31000000D+01 0.21035708D+01 0.15789276D-01
+ 0.31000000D+01 0.32000000D+01 0.17814512D+01 0.15840713D-01
+ 0.32000000D+01 0.33000000D+01 0.15043616D+01 0.91973594D-02
+ 0.33000000D+01 0.34000000D+01 0.12426727D+01 0.81565243D-02
+ 0.34000000D+01 0.35000000D+01 0.99335101D+00 0.83591569D-02
+ 0.35000000D+01 0.36000000D+01 0.79853458D+00 0.73528336D-02
+ 0.36000000D+01 0.37000000D+01 0.60819101D+00 0.46041512D-02
+ 0.37000000D+01 0.38000000D+01 0.44970071D+00 0.36045891D-02
+ 0.38000000D+01 0.39000000D+01 0.31968446D+00 0.29022775D-02
+ 0.39000000D+01 0.40000000D+01 0.21531550D+00 0.19135708D-02
+ 0.40000000D+01 0.41000000D+01 0.13702811D+00 0.13689470D-02
+ 0.41000000D+01 0.42000000D+01 0.79290338D-01 0.73847406D-03
+ 0.42000000D+01 0.43000000D+01 0.41846830D-01 0.45034476D-03
+ 0.43000000D+01 0.44000000D+01 0.19121266D-01 0.19243800D-03
+ 0.44000000D+01 0.45000000D+01 0.71999631D-02 0.79763198D-04
+ 0.45000000D+01 0.46000000D+01 0.20632605D-02 0.28091834D-04
+ 0.46000000D+01 0.47000000D+01 0.34164622D-03 0.90937924D-05
+ 0.47000000D+01 0.48000000D+01 0.10378419D-04 0.14611723D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10163663D-04 0.14623507D-05
+ -.47000000D+01 -.46000000D+01 0.32685926D-03 0.88594279D-05
+ -.46000000D+01 -.45000000D+01 0.19671580D-02 0.28482375D-04
+ -.45000000D+01 -.44000000D+01 0.67626197D-02 0.81537712D-04
+ -.44000000D+01 -.43000000D+01 0.17322520D-01 0.42573007D-03
+ -.43000000D+01 -.42000000D+01 0.38811938D-01 0.44288488D-03
+ -.42000000D+01 -.41000000D+01 0.72726359D-01 0.72208935D-03
+ -.41000000D+01 -.40000000D+01 0.12275289D+00 0.12141096D-02
+ -.40000000D+01 -.39000000D+01 0.19179660D+00 0.17813986D-02
+ -.39000000D+01 -.38000000D+01 0.28421900D+00 0.25725696D-02
+ -.38000000D+01 -.37000000D+01 0.39539746D+00 0.42305410D-02
+ -.37000000D+01 -.36000000D+01 0.53702522D+00 0.45257653D-02
+ -.36000000D+01 -.35000000D+01 0.69913403D+00 0.65742693D-02
+ -.35000000D+01 -.34000000D+01 0.87079275D+00 0.74127615D-02
+ -.34000000D+01 -.33000000D+01 0.10840882D+01 0.84835955D-02
+ -.33000000D+01 -.32000000D+01 0.13033401D+01 0.83410828D-02
+ -.32000000D+01 -.31000000D+01 0.15405694D+01 0.90710639D-02
+ -.31000000D+01 -.30000000D+01 0.18157047D+01 0.12638314D-01
+ -.30000000D+01 -.29000000D+01 0.21220797D+01 0.11778642D-01
+ -.29000000D+01 -.28000000D+01 0.23981548D+01 0.12348999D-01
+ -.28000000D+01 -.27000000D+01 0.27385239D+01 0.13268193D-01
+ -.27000000D+01 -.26000000D+01 0.30457805D+01 0.14256205D-01
+ -.26000000D+01 -.25000000D+01 0.34110991D+01 0.14777795D-01
+ -.25000000D+01 -.24000000D+01 0.37600465D+01 0.19431523D-01
+ -.24000000D+01 -.23000000D+01 0.41087204D+01 0.16120583D-01
+ -.23000000D+01 -.22000000D+01 0.44961762D+01 0.17967450D-01
+ -.22000000D+01 -.21000000D+01 0.48516497D+01 0.20216319D-01
+ -.21000000D+01 -.20000000D+01 0.52502307D+01 0.21644175D-01
+ -.20000000D+01 -.19000000D+01 0.55814419D+01 0.19482141D-01
+ -.19000000D+01 -.18000000D+01 0.59259991D+01 0.22325730D-01
+ -.18000000D+01 -.17000000D+01 0.63018910D+01 0.23210453D-01
+ -.17000000D+01 -.16000000D+01 0.66363105D+01 0.22330605D-01
+ -.16000000D+01 -.15000000D+01 0.69297644D+01 0.23586997D-01
+ -.15000000D+01 -.14000000D+01 0.72320756D+01 0.23741578D-01
+ -.14000000D+01 -.13000000D+01 0.75416572D+01 0.23745209D-01
+ -.13000000D+01 -.12000000D+01 0.78131238D+01 0.26676273D-01
+ -.12000000D+01 -.11000000D+01 0.80639907D+01 0.25689504D-01
+ -.11000000D+01 -.10000000D+01 0.82922424D+01 0.25682460D-01
+ -.10000000D+01 -.90000000D+00 0.85521912D+01 0.26073239D-01
+ -.90000000D+00 -.80000000D+00 0.86950536D+01 0.27001196D-01
+ -.80000000D+00 -.70000000D+00 0.88901939D+01 0.26861746D-01
+ -.70000000D+00 -.60000000D+00 0.89935476D+01 0.26356575D-01
+ -.60000000D+00 -.50000000D+00 0.91911755D+01 0.29440009D-01
+ -.50000000D+00 -.40000000D+00 0.93034437D+01 0.26808870D-01
+ -.40000000D+00 -.30000000D+00 0.94038126D+01 0.29984543D-01
+ -.30000000D+00 -.20000000D+00 0.94355281D+01 0.27410039D-01
+ -.20000000D+00 -.10000000D+00 0.94529459D+01 0.26515473D-01
+ -.10000000D+00 0.18041124D-15 0.95055403D+01 0.25509864D-01
+ 0.70776718D-15 0.10000000D+00 0.95360929D+01 0.26115578D-01
+ 0.10000000D+00 0.20000000D+00 0.95043179D+01 0.26163625D-01
+ 0.20000000D+00 0.30000000D+00 0.94058000D+01 0.29530293D-01
+ 0.30000000D+00 0.40000000D+00 0.93699783D+01 0.29372397D-01
+ 0.40000000D+00 0.50000000D+00 0.92329718D+01 0.29941887D-01
+ 0.50000000D+00 0.60000000D+00 0.91618147D+01 0.27438734D-01
+ 0.60000000D+00 0.70000000D+00 0.90248781D+01 0.26438543D-01
+ 0.70000000D+00 0.80000000D+00 0.88518795D+01 0.25397741D-01
+ 0.80000000D+00 0.90000000D+00 0.87181721D+01 0.26317658D-01
+ 0.90000000D+00 0.10000000D+01 0.85452204D+01 0.27270334D-01
+ 0.10000000D+01 0.11000000D+01 0.83265619D+01 0.25698241D-01
+ 0.11000000D+01 0.12000000D+01 0.80686933D+01 0.23884672D-01
+ 0.12000000D+01 0.13000000D+01 0.78206309D+01 0.24818431D-01
+ 0.13000000D+01 0.14000000D+01 0.75281083D+01 0.26645795D-01
+ 0.14000000D+01 0.15000000D+01 0.72030163D+01 0.22604447D-01
+ 0.15000000D+01 0.16000000D+01 0.69232570D+01 0.25635935D-01
+ 0.16000000D+01 0.17000000D+01 0.66164477D+01 0.22519132D-01
+ 0.17000000D+01 0.18000000D+01 0.63197804D+01 0.22891953D-01
+ 0.18000000D+01 0.19000000D+01 0.59263875D+01 0.21230517D-01
+ 0.19000000D+01 0.20000000D+01 0.55594480D+01 0.21366523D-01
+ 0.20000000D+01 0.21000000D+01 0.51827527D+01 0.19164813D-01
+ 0.21000000D+01 0.22000000D+01 0.48429442D+01 0.28182753D-01
+ 0.22000000D+01 0.23000000D+01 0.44777949D+01 0.24724695D-01
+ 0.23000000D+01 0.24000000D+01 0.41282000D+01 0.16731388D-01
+ 0.24000000D+01 0.25000000D+01 0.37347616D+01 0.16550394D-01
+ 0.25000000D+01 0.26000000D+01 0.34057032D+01 0.16597115D-01
+ 0.26000000D+01 0.27000000D+01 0.31009778D+01 0.32263743D-01
+ 0.27000000D+01 0.28000000D+01 0.26909824D+01 0.32224890D-01
+ 0.28000000D+01 0.29000000D+01 0.24021735D+01 0.14941779D-01
+ 0.29000000D+01 0.30000000D+01 0.21239779D+01 0.12581618D-01
+ 0.30000000D+01 0.31000000D+01 0.18098852D+01 0.15512707D-01
+ 0.31000000D+01 0.32000000D+01 0.15348945D+01 0.15815169D-01
+ 0.32000000D+01 0.33000000D+01 0.13024316D+01 0.91732320D-02
+ 0.33000000D+01 0.34000000D+01 0.10805391D+01 0.81261905D-02
+ 0.34000000D+01 0.35000000D+01 0.86702048D+00 0.79374905D-02
+ 0.35000000D+01 0.36000000D+01 0.70092323D+00 0.68930061D-02
+ 0.36000000D+01 0.37000000D+01 0.53675034D+00 0.45947046D-02
+ 0.37000000D+01 0.38000000D+01 0.39914700D+00 0.35957843D-02
+ 0.38000000D+01 0.39000000D+01 0.28551772D+00 0.28950672D-02
+ 0.39000000D+01 0.40000000D+01 0.19362526D+00 0.19088482D-02
+ 0.40000000D+01 0.41000000D+01 0.12424710D+00 0.13662963D-02
+ 0.41000000D+01 0.42000000D+01 0.72404026D-01 0.73686359D-03
+ 0.42000000D+01 0.43000000D+01 0.38583989D-01 0.44897114D-03
+ 0.43000000D+01 0.44000000D+01 0.17784662D-01 0.19086010D-03
+ 0.44000000D+01 0.45000000D+01 0.67645397D-02 0.79625701D-04
+ 0.45000000D+01 0.46000000D+01 0.19636088D-02 0.28071136D-04
+ 0.46000000D+01 0.47000000D+01 0.33047548D-03 0.90920013D-05
+ 0.47000000D+01 0.48000000D+01 0.10229316D-04 0.14611578D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10247030D-04 0.14623688D-05
+ -.47000000D+01 -.46000000D+01 0.33302205D-03 0.88605964D-05
+ -.46000000D+01 -.45000000D+01 0.20224800D-02 0.28506037D-04
+ -.45000000D+01 -.44000000D+01 0.70011482D-02 0.81597004D-04
+ -.44000000D+01 -.43000000D+01 0.18049120D-01 0.42584601D-03
+ -.43000000D+01 -.42000000D+01 0.40598472D-01 0.44314165D-03
+ -.42000000D+01 -.41000000D+01 0.76451126D-01 0.72297018D-03
+ -.41000000D+01 -.40000000D+01 0.12965308D+00 0.12155750D-02
+ -.40000000D+01 -.39000000D+01 0.20343339D+00 0.17837971D-02
+ -.39000000D+01 -.38000000D+01 0.30256563D+00 0.25768178D-02
+ -.38000000D+01 -.37000000D+01 0.42249849D+00 0.42338237D-02
+ -.37000000D+01 -.36000000D+01 0.57517072D+00 0.45314730D-02
+ -.36000000D+01 -.35000000D+01 0.75080068D+00 0.65801569D-02
+ -.35000000D+01 -.34000000D+01 0.93830533D+00 0.74256452D-02
+ -.34000000D+01 -.33000000D+01 0.11703061D+01 0.84950855D-02
+ -.33000000D+01 -.32000000D+01 0.14103223D+01 0.83488302D-02
+ -.32000000D+01 -.31000000D+01 0.16711444D+01 0.90802305D-02
+ -.31000000D+01 -.30000000D+01 0.19718553D+01 0.12657229D-01
+ -.30000000D+01 -.29000000D+01 0.23066824D+01 0.11806210D-01
+ -.29000000D+01 -.28000000D+01 0.26116883D+01 0.12590826D-01
+ -.28000000D+01 -.27000000D+01 0.29860910D+01 0.13509962D-01
+ -.27000000D+01 -.26000000D+01 0.33262801D+01 0.14289990D-01
+ -.26000000D+01 -.25000000D+01 0.37266163D+01 0.14825426D-01
+ -.25000000D+01 -.24000000D+01 0.41136842D+01 0.19473010D-01
+ -.24000000D+01 -.23000000D+01 0.44990660D+01 0.16140216D-01
+ -.23000000D+01 -.22000000D+01 0.49252580D+01 0.18037995D-01
+ -.22000000D+01 -.21000000D+01 0.53205687D+01 0.20328827D-01
+ -.21000000D+01 -.20000000D+01 0.57592429D+01 0.21714343D-01
+ -.20000000D+01 -.19000000D+01 0.61298914D+01 0.19524836D-01
+ -.19000000D+01 -.18000000D+01 0.65130026D+01 0.22402776D-01
+ -.18000000D+01 -.17000000D+01 0.69280138D+01 0.23283096D-01
+ -.17000000D+01 -.16000000D+01 0.72994621D+01 0.22380516D-01
+ -.16000000D+01 -.15000000D+01 0.76299959D+01 0.23646823D-01
+ -.15000000D+01 -.14000000D+01 0.79665915D+01 0.23794665D-01
+ -.14000000D+01 -.13000000D+01 0.83108874D+01 0.23822341D-01
+ -.13000000D+01 -.12000000D+01 0.86131806D+01 0.26747472D-01
+ -.12000000D+01 -.11000000D+01 0.88950213D+01 0.25733752D-01
+ -.11000000D+01 -.10000000D+01 0.91511408D+01 0.25731541D-01
+ -.10000000D+01 -.90000000D+00 0.94370077D+01 0.26128362D-01
+ -.90000000D+00 -.80000000D+00 0.96039877D+01 0.27060291D-01
+ -.80000000D+00 -.70000000D+00 0.98197205D+01 0.26925601D-01
+ -.70000000D+00 -.60000000D+00 0.99411217D+01 0.26433057D-01
+ -.60000000D+00 -.50000000D+00 0.10155809D+02 0.29495235D-01
+ -.50000000D+00 -.40000000D+00 0.10281126D+02 0.26898032D-01
+ -.40000000D+00 -.30000000D+00 0.10393204D+02 0.30054120D-01
+ -.30000000D+00 -.20000000D+00 0.10432143D+02 0.27454996D-01
+ -.20000000D+00 -.10000000D+00 0.10455674D+02 0.26568853D-01
+ -.10000000D+00 0.18041124D-15 0.10511265D+02 0.25568408D-01
+ 0.70776718D-15 0.10000000D+00 0.10540716D+02 0.26175676D-01
+ 0.10000000D+00 0.20000000D+00 0.10507127D+02 0.26254997D-01
+ 0.20000000D+00 0.30000000D+00 0.10404088D+02 0.29667527D-01
+ 0.30000000D+00 0.40000000D+00 0.10357889D+02 0.29483783D-01
+ 0.40000000D+00 0.50000000D+00 0.10210134D+02 0.29990104D-01
+ 0.50000000D+00 0.60000000D+00 0.10124833D+02 0.27515512D-01
+ 0.60000000D+00 0.70000000D+00 0.99739193D+01 0.26520809D-01
+ 0.70000000D+00 0.80000000D+00 0.97819138D+01 0.25457185D-01
+ 0.80000000D+00 0.90000000D+00 0.96258367D+01 0.26409388D-01
+ 0.90000000D+00 0.10000000D+01 0.94302569D+01 0.27376330D-01
+ 0.10000000D+01 0.11000000D+01 0.91862974D+01 0.25767693D-01
+ 0.11000000D+01 0.12000000D+01 0.89001597D+01 0.23937515D-01
+ 0.12000000D+01 0.13000000D+01 0.86211953D+01 0.24955681D-01
+ 0.13000000D+01 0.14000000D+01 0.82965360D+01 0.26757537D-01
+ 0.14000000D+01 0.15000000D+01 0.79383261D+01 0.22635961D-01
+ 0.15000000D+01 0.16000000D+01 0.76230353D+01 0.25674082D-01
+ 0.16000000D+01 0.17000000D+01 0.72801226D+01 0.22554865D-01
+ 0.17000000D+01 0.18000000D+01 0.69457639D+01 0.22922277D-01
+ 0.18000000D+01 0.19000000D+01 0.65133370D+01 0.21255386D-01
+ 0.19000000D+01 0.20000000D+01 0.61076186D+01 0.21392767D-01
+ 0.20000000D+01 0.21000000D+01 0.56914612D+01 0.19208659D-01
+ 0.21000000D+01 0.22000000D+01 0.53025410D+01 0.34360704D-01
+ 0.22000000D+01 0.23000000D+01 0.49167042D+01 0.31550039D-01
+ 0.23000000D+01 0.24000000D+01 0.45192394D+01 0.16760086D-01
+ 0.24000000D+01 0.25000000D+01 0.40872004D+01 0.16577724D-01
+ 0.25000000D+01 0.26000000D+01 0.37219234D+01 0.16615409D-01
+ 0.26000000D+01 0.27000000D+01 0.33826844D+01 0.33164741D-01
+ 0.27000000D+01 0.28000000D+01 0.29365153D+01 0.33120846D-01
+ 0.28000000D+01 0.29000000D+01 0.26168394D+01 0.14955103D-01
+ 0.29000000D+01 0.30000000D+01 0.23091704D+01 0.12706626D-01
+ 0.30000000D+01 0.31000000D+01 0.19656352D+01 0.15613533D-01
+ 0.31000000D+01 0.32000000D+01 0.16655020D+01 0.15826054D-01
+ 0.32000000D+01 0.33000000D+01 0.14096227D+01 0.91831490D-02
+ 0.33000000D+01 0.34000000D+01 0.11667028D+01 0.81376402D-02
+ 0.34000000D+01 0.35000000D+01 0.93427172D+00 0.81366090D-02
+ 0.35000000D+01 0.36000000D+01 0.75296246D+00 0.71136055D-02
+ 0.36000000D+01 0.37000000D+01 0.57491042D+00 0.45990079D-02
+ 0.37000000D+01 0.38000000D+01 0.42622108D+00 0.35994376D-02
+ 0.38000000D+01 0.39000000D+01 0.30384771D+00 0.28981136D-02
+ 0.39000000D+01 0.40000000D+01 0.20529359D+00 0.19108942D-02
+ 0.40000000D+01 0.41000000D+01 0.13114816D+00 0.13674776D-02
+ 0.41000000D+01 0.42000000D+01 0.76129667D-01 0.73760573D-03
+ 0.42000000D+01 0.43000000D+01 0.40358283D-01 0.44961091D-03
+ 0.43000000D+01 0.44000000D+01 0.18513815D-01 0.19163047D-03
+ 0.44000000D+01 0.45000000D+01 0.70029872D-02 0.79688181D-04
+ 0.45000000D+01 0.46000000D+01 0.20184753D-02 0.28081220D-04
+ 0.46000000D+01 0.47000000D+01 0.33665256D-03 0.90929002D-05
+ 0.47000000D+01 0.48000000D+01 0.10312061D-04 0.14611652D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10293690D-04 0.14623788D-05
+ -.47000000D+01 -.46000000D+01 0.33666367D-03 0.88612482D-05
+ -.46000000D+01 -.45000000D+01 0.20565718D-02 0.28521507D-04
+ -.45000000D+01 -.44000000D+01 0.71529294D-02 0.81632801D-04
+ -.44000000D+01 -.43000000D+01 0.18523169D-01 0.42591495D-03
+ -.43000000D+01 -.42000000D+01 0.41791280D-01 0.44328771D-03
+ -.42000000D+01 -.41000000D+01 0.78987299D-01 0.72357247D-03
+ -.41000000D+01 -.40000000D+01 0.13443741D+00 0.12166131D-02
+ -.40000000D+01 -.39000000D+01 0.21164064D+00 0.17857871D-02
+ -.39000000D+01 -.38000000D+01 0.31571692D+00 0.25799709D-02
+ -.38000000D+01 -.37000000D+01 0.44220092D+00 0.42365467D-02
+ -.37000000D+01 -.36000000D+01 0.60329229D+00 0.45358537D-02
+ -.36000000D+01 -.35000000D+01 0.78939100D+00 0.65865454D-02
+ -.35000000D+01 -.34000000D+01 0.98920828D+00 0.74364782D-02
+ -.34000000D+01 -.33000000D+01 0.12360309D+01 0.85029884D-02
+ -.33000000D+01 -.32000000D+01 0.14926296D+01 0.83545001D-02
+ -.32000000D+01 -.31000000D+01 0.17725112D+01 0.90867826D-02
+ -.31000000D+01 -.30000000D+01 0.20939295D+01 0.12674357D-01
+ -.30000000D+01 -.29000000D+01 0.24521547D+01 0.11830035D-01
+ -.29000000D+01 -.28000000D+01 0.27809875D+01 0.12808842D-01
+ -.28000000D+01 -.27000000D+01 0.31835742D+01 0.13726404D-01
+ -.27000000D+01 -.26000000D+01 0.35511453D+01 0.14321339D-01
+ -.26000000D+01 -.25000000D+01 0.39807064D+01 0.14868433D-01
+ -.25000000D+01 -.24000000D+01 0.44000279D+01 0.19507714D-01
+ -.24000000D+01 -.23000000D+01 0.48162814D+01 0.16155372D-01
+ -.23000000D+01 -.22000000D+01 0.52753312D+01 0.18106602D-01
+ -.22000000D+01 -.21000000D+01 0.57042876D+01 0.20437160D-01
+ -.21000000D+01 -.20000000D+01 0.61773452D+01 0.21778997D-01
+ -.20000000D+01 -.19000000D+01 0.65821049D+01 0.19570596D-01
+ -.19000000D+01 -.18000000D+01 0.69979062D+01 0.22476229D-01
+ -.18000000D+01 -.17000000D+01 0.74467730D+01 0.23341453D-01
+ -.17000000D+01 -.16000000D+01 0.78504902D+01 0.22416392D-01
+ -.16000000D+01 -.15000000D+01 0.82132206D+01 0.23706544D-01
+ -.15000000D+01 -.14000000D+01 0.85794712D+01 0.23846258D-01
+ -.14000000D+01 -.13000000D+01 0.89541633D+01 0.23898608D-01
+ -.13000000D+01 -.12000000D+01 0.92832449D+01 0.26818839D-01
+ -.12000000D+01 -.11000000D+01 0.95923727D+01 0.25768596D-01
+ -.11000000D+01 -.10000000D+01 0.98728813D+01 0.25776195D-01
+ -.10000000D+01 -.90000000D+00 0.10181536D+02 0.26192298D-01
+ -.90000000D+00 -.80000000D+00 0.10370215D+02 0.27129105D-01
+ -.80000000D+00 -.70000000D+00 0.10603946D+02 0.26971426D-01
+ -.70000000D+00 -.60000000D+00 0.10741277D+02 0.26495516D-01
+ -.60000000D+00 -.50000000D+00 0.10970996D+02 0.29540068D-01
+ -.50000000D+00 -.40000000D+00 0.11108180D+02 0.26972918D-01
+ -.40000000D+00 -.30000000D+00 0.11230471D+02 0.30109343D-01
+ -.30000000D+00 -.20000000D+00 0.11275956D+02 0.27494018D-01
+ -.20000000D+00 -.10000000D+00 0.11304746D+02 0.26616061D-01
+ -.10000000D+00 0.18041124D-15 0.11363129D+02 0.25621648D-01
+ 0.70776718D-15 0.10000000D+00 0.11391587D+02 0.26226940D-01
+ 0.10000000D+00 0.20000000D+00 0.11356095D+02 0.26343232D-01
+ 0.20000000D+00 0.30000000D+00 0.11249758D+02 0.29842884D-01
+ 0.30000000D+00 0.40000000D+00 0.11193759D+02 0.29630837D-01
+ 0.40000000D+00 0.50000000D+00 0.11036435D+02 0.30035428D-01
+ 0.50000000D+00 0.60000000D+00 0.10938544D+02 0.27581613D-01
+ 0.60000000D+00 0.70000000D+00 0.10775504D+02 0.26590441D-01
+ 0.70000000D+00 0.80000000D+00 0.10566615D+02 0.25505511D-01
+ 0.80000000D+00 0.90000000D+00 0.10390719D+02 0.26492303D-01
+ 0.90000000D+00 0.10000000D+01 0.10175060D+02 0.27471057D-01
+ 0.10000000D+01 0.11000000D+01 0.99088310D+01 0.25822723D-01
+ 0.11000000D+01 0.12000000D+01 0.95979297D+01 0.23984370D-01
+ 0.12000000D+01 0.13000000D+01 0.92914342D+01 0.25069668D-01
+ 0.13000000D+01 0.14000000D+01 0.89392465D+01 0.26844673D-01
+ 0.14000000D+01 0.15000000D+01 0.85520061D+01 0.22661041D-01
+ 0.15000000D+01 0.16000000D+01 0.82058243D+01 0.25707170D-01
+ 0.16000000D+01 0.17000000D+01 0.78313002D+01 0.22589636D-01
+ 0.17000000D+01 0.18000000D+01 0.74646502D+01 0.22949061D-01
+ 0.18000000D+01 0.19000000D+01 0.69982627D+01 0.21275376D-01
+ 0.19000000D+01 0.20000000D+01 0.65592374D+01 0.21415065D-01
+ 0.20000000D+01 0.21000000D+01 0.61094056D+01 0.19248632D-01
+ 0.21000000D+01 0.22000000D+01 0.56743307D+01 0.43919090D-01
+ 0.22000000D+01 0.23000000D+01 0.52791525D+01 0.41719337D-01
+ 0.23000000D+01 0.24000000D+01 0.48371477D+01 0.16787353D-01
+ 0.24000000D+01 0.25000000D+01 0.43723718D+01 0.16606075D-01
+ 0.25000000D+01 0.26000000D+01 0.39767332D+01 0.16632104D-01
+ 0.26000000D+01 0.27000000D+01 0.36083479D+01 0.33674237D-01
+ 0.27000000D+01 0.28000000D+01 0.31325617D+01 0.33628136D-01
+ 0.28000000D+01 0.29000000D+01 0.27870109D+01 0.14966525D-01
+ 0.29000000D+01 0.30000000D+01 0.24551558D+01 0.12817920D-01
+ 0.30000000D+01 0.31000000D+01 0.20873622D+01 0.15703155D-01
+ 0.31000000D+01 0.32000000D+01 0.17669144D+01 0.15833867D-01
+ 0.32000000D+01 0.33000000D+01 0.14920834D+01 0.91903534D-02
+ 0.33000000D+01 0.34000000D+01 0.12323807D+01 0.81471307D-02
+ 0.34000000D+01 0.35000000D+01 0.98510642D+00 0.82635200D-02
+ 0.35000000D+01 0.36000000D+01 0.79170649D+00 0.72510878D-02
+ 0.36000000D+01 0.37000000D+01 0.60303770D+00 0.46016290D-02
+ 0.37000000D+01 0.38000000D+01 0.44590316D+00 0.36018076D-02
+ 0.38000000D+01 0.39000000D+01 0.31698260D+00 0.29002101D-02
+ 0.39000000D+01 0.40000000D+01 0.21352899D+00 0.19122919D-02
+ 0.40000000D+01 0.41000000D+01 0.13593131D+00 0.13682538D-02
+ 0.41000000D+01 0.42000000D+01 0.78667301D-01 0.73807503D-03
+ 0.42000000D+01 0.43000000D+01 0.41542318D-01 0.45001159D-03
+ 0.43000000D+01 0.44000000D+01 0.18989553D-01 0.19209120D-03
+ 0.44000000D+01 0.45000000D+01 0.71547182D-02 0.79728460D-04
+ 0.45000000D+01 0.46000000D+01 0.20522729D-02 0.28086873D-04
+ 0.46000000D+01 0.47000000D+01 0.34030287D-03 0.90933932D-05
+ 0.47000000D+01 0.48000000D+01 0.10358367D-04 0.14611692D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.10316319D-04 0.14623835D-05
+ -.47000000D+01 -.46000000D+01 0.33849448D-03 0.88615635D-05
+ -.46000000D+01 -.45000000D+01 0.20742405D-02 0.28529757D-04
+ -.45000000D+01 -.44000000D+01 0.72335989D-02 0.81651104D-04
+ -.44000000D+01 -.43000000D+01 0.18780319D-01 0.42595076D-03
+ -.43000000D+01 -.42000000D+01 0.42451267D-01 0.44335987D-03
+ -.42000000D+01 -.41000000D+01 0.80414925D-01 0.72392234D-03
+ -.41000000D+01 -.40000000D+01 0.13717406D+00 0.12172238D-02
+ -.40000000D+01 -.39000000D+01 0.21640976D+00 0.17871159D-02
+ -.39000000D+01 -.38000000D+01 0.32347466D+00 0.25819273D-02
+ -.38000000D+01 -.37000000D+01 0.45397810D+00 0.42384729D-02
+ -.37000000D+01 -.36000000D+01 0.62034231D+00 0.45386514D-02
+ -.36000000D+01 -.35000000D+01 0.81309266D+00 0.65925343D-02
+ -.35000000D+01 -.34000000D+01 0.10207681D+01 0.74447138D-02
+ -.34000000D+01 -.33000000D+01 0.12772537D+01 0.85076434D-02
+ -.33000000D+01 -.32000000D+01 0.15447602D+01 0.83580666D-02
+ -.32000000D+01 -.31000000D+01 0.18373046D+01 0.90910199D-02
+ -.31000000D+01 -.30000000D+01 0.21726005D+01 0.12686537D-01
+ -.30000000D+01 -.29000000D+01 0.25466978D+01 0.11846120D-01
+ -.29000000D+01 -.28000000D+01 0.28917930D+01 0.12950716D-01
+ -.28000000D+01 -.27000000D+01 0.33136813D+01 0.13868172D-01
+ -.27000000D+01 -.26000000D+01 0.37001802D+01 0.14346955D-01
+ -.26000000D+01 -.25000000D+01 0.41499718D+01 0.14900522D-01
+ -.25000000D+01 -.24000000D+01 0.45919748D+01 0.19531481D-01
+ -.24000000D+01 -.23000000D+01 0.50298138D+01 0.16165381D-01
+ -.23000000D+01 -.22000000D+01 0.55121358D+01 0.18156037D-01
+ -.22000000D+01 -.21000000D+01 0.59646601D+01 0.20524001D-01
+ -.21000000D+01 -.20000000D+01 0.64624976D+01 0.21833995D-01
+ -.20000000D+01 -.19000000D+01 0.68918458D+01 0.19621659D-01
+ -.19000000D+01 -.18000000D+01 0.73305277D+01 0.22542573D-01
+ -.18000000D+01 -.17000000D+01 0.78040222D+01 0.23380613D-01
+ -.17000000D+01 -.16000000D+01 0.82311849D+01 0.22439154D-01
+ -.16000000D+01 -.15000000D+01 0.86173449D+01 0.23755521D-01
+ -.15000000D+01 -.14000000D+01 0.90050249D+01 0.23887822D-01
+ -.14000000D+01 -.13000000D+01 0.94020014D+01 0.23960880D-01
+ -.13000000D+01 -.12000000D+01 0.97506337D+01 0.26878059D-01
+ -.12000000D+01 -.11000000D+01 0.10079862D+02 0.25791803D-01
+ -.11000000D+01 -.10000000D+01 0.10378233D+02 0.25808975D-01
+ -.10000000D+01 -.90000000D+00 0.10703678D+02 0.26251898D-01
+ -.90000000D+00 -.80000000D+00 0.10908646D+02 0.27196819D-01
+ -.80000000D+00 -.70000000D+00 0.11155711D+02 0.27003770D-01
+ -.70000000D+00 -.60000000D+00 0.11304698D+02 0.26541563D-01
+ -.60000000D+00 -.50000000D+00 0.11545503D+02 0.29571149D-01
+ -.50000000D+00 -.40000000D+00 0.11691807D+02 0.27026077D-01
+ -.40000000D+00 -.30000000D+00 0.11821591D+02 0.30147738D-01
+ -.30000000D+00 -.20000000D+00 0.11871975D+02 0.27522730D-01
+ -.20000000D+00 -.10000000D+00 0.11904645D+02 0.26652509D-01
+ -.10000000D+00 0.18041124D-15 0.11965088D+02 0.25662868D-01
+ 0.70776718D-15 0.10000000D+00 0.11992916D+02 0.26263129D-01
+ 0.10000000D+00 0.20000000D+00 0.11955813D+02 0.26407844D-01
+ 0.20000000D+00 0.30000000D+00 0.11847348D+02 0.30013351D-01
+ 0.30000000D+00 0.40000000D+00 0.11783803D+02 0.29782796D-01
+ 0.40000000D+00 0.50000000D+00 0.11619340D+02 0.30071028D-01
+ 0.50000000D+00 0.60000000D+00 0.11512046D+02 0.27629018D-01
+ 0.60000000D+00 0.70000000D+00 0.11340018D+02 0.26639084D-01
+ 0.70000000D+00 0.80000000D+00 0.11118691D+02 0.25539536D-01
+ 0.80000000D+00 0.90000000D+00 0.10928041D+02 0.26556234D-01
+ 0.90000000D+00 0.10000000D+01 0.10697489D+02 0.27541560D-01
+ 0.10000000D+01 0.11000000D+01 0.10414823D+02 0.25858454D-01
+ 0.11000000D+01 0.12000000D+01 0.10085760D+02 0.24018697D-01
+ 0.12000000D+01 0.13000000D+01 0.97587726D+01 0.25146885D-01
+ 0.13000000D+01 0.14000000D+01 0.93867219D+01 0.26901648D-01
+ 0.14000000D+01 0.15000000D+01 0.89781740D+01 0.22679076D-01
+ 0.15000000D+01 0.16000000D+01 0.86096534D+01 0.25734152D-01
+ 0.16000000D+01 0.17000000D+01 0.82119426D+01 0.22620198D-01
+ 0.17000000D+01 0.18000000D+01 0.78221453D+01 0.22969836D-01
+ 0.18000000D+01 0.19000000D+01 0.73311535D+01 0.21290185D-01
+ 0.19000000D+01 0.20000000D+01 0.68681565D+01 0.21431485D-01
+ 0.20000000D+01 0.21000000D+01 0.63943752D+01 0.19277882D-01
+ 0.21000000D+01 0.22000000D+01 0.59240346D+01 0.53395508D-01
+ 0.22000000D+01 0.23000000D+01 0.55270403D+01 0.51574508D-01
+ 0.23000000D+01 0.24000000D+01 0.50512398D+01 0.16809295D-01
+ 0.24000000D+01 0.25000000D+01 0.45633996D+01 0.16631104D-01
+ 0.25000000D+01 0.26000000D+01 0.41465872D+01 0.16646542D-01
+ 0.26000000D+01 0.27000000D+01 0.37578408D+01 0.33923740D-01
+ 0.27000000D+01 0.28000000D+01 0.32618118D+01 0.33876455D-01
+ 0.28000000D+01 0.29000000D+01 0.28983540D+01 0.14974988D-01
+ 0.29000000D+01 0.30000000D+01 0.25500628D+01 0.12902955D-01
+ 0.30000000D+01 0.31000000D+01 0.21657783D+01 0.15771620D-01
+ 0.31000000D+01 0.32000000D+01 0.18317694D+01 0.15838696D-01
+ 0.32000000D+01 0.33000000D+01 0.15442973D+01 0.91949473D-02
+ 0.33000000D+01 0.34000000D+01 0.12735712D+01 0.81535697D-02
+ 0.34000000D+01 0.35000000D+01 0.10166943D+01 0.83301424D-02
+ 0.35000000D+01 0.36000000D+01 0.81542887D+00 0.73218572D-02
+ 0.36000000D+01 0.37000000D+01 0.62008497D+00 0.46030871D-02
+ 0.37000000D+01 0.38000000D+01 0.45767208D+00 0.36031214D-02
+ 0.38000000D+01 0.39000000D+01 0.32472822D+00 0.29014284D-02
+ 0.39000000D+01 0.40000000D+01 0.21831719D+00 0.19130921D-02
+ 0.40000000D+01 0.41000000D+01 0.13866637D+00 0.13686861D-02
+ 0.41000000D+01 0.42000000D+01 0.80095936D-01 0.73832561D-03
+ 0.42000000D+01 0.43000000D+01 0.42197130D-01 0.45022193D-03
+ 0.43000000D+01 0.44000000D+01 0.19247672D-01 0.19232400D-03
+ 0.44000000D+01 0.45000000D+01 0.72353641D-02 0.79750219D-04
+ 0.45000000D+01 0.46000000D+01 0.20697876D-02 0.28089620D-04
+ 0.46000000D+01 0.47000000D+01 0.34213811D-03 0.90936299D-05
+ 0.47000000D+01 0.48000000D+01 0.10380823D-04 0.14611712D-05
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 -.23769076D+01 0.63018233D-02
+ 0.30000000D+01 0.60000000D+01 0.10175065D+01 0.32599002D-02
+ 0.60000000D+01 0.90000000D+01 0.25101095D+01 0.26338848D-02
+ 0.90000000D+01 0.12000000D+02 0.21938407D+01 0.20787102D-02
+ 0.12000000D+02 0.15000000D+02 0.18048925D+01 0.19109355D-02
+ 0.15000000D+02 0.18000000D+02 0.14933602D+01 0.17114389D-02
+ 0.18000000D+02 0.21000000D+02 0.12479494D+01 0.14467457D-02
+ 0.21000000D+02 0.24000000D+02 0.10615194D+01 0.11488349D-02
+ 0.24000000D+02 0.27000000D+02 0.90887898D+00 0.11245353D-02
+ 0.27000000D+02 0.30000000D+02 0.79143725D+00 0.11348582D-02
+ 0.30000000D+02 0.33000000D+02 0.69046500D+00 0.11459461D-02
+ 0.33000000D+02 0.36000000D+02 0.61059249D+00 0.11167063D-02
+ 0.36000000D+02 0.39000000D+02 0.54319696D+00 0.10164120D-02
+ 0.39000000D+02 0.42000000D+02 0.48423814D+00 0.10048818D-02
+ 0.42000000D+02 0.45000000D+02 0.43208032D+00 0.99354667D-03
+ 0.45000000D+02 0.48000000D+02 0.39317531D+00 0.89446688D-03
+ 0.48000000D+02 0.51000000D+02 0.35297761D+00 0.79126289D-03
+ 0.51000000D+02 0.54000000D+02 0.31980370D+00 0.64469291D-03
+ 0.54000000D+02 0.57000000D+02 0.29271336D+00 0.62871618D-03
+ 0.57000000D+02 0.60000000D+02 0.26551888D+00 0.63911028D-03
+ 0.60000000D+02 0.63000000D+02 0.24257682D+00 0.60604814D-03
+ 0.63000000D+02 0.66000000D+02 0.22283536D+00 0.58191858D-03
+ 0.66000000D+02 0.69000000D+02 0.20352885D+00 0.68367207D-03
+ 0.69000000D+02 0.72000000D+02 0.18896949D+00 0.63230284D-03
+ 0.72000000D+02 0.75000000D+02 0.17216977D+00 0.55227294D-03
+ 0.75000000D+02 0.78000000D+02 0.16039051D+00 0.53028948D-03
+ 0.78000000D+02 0.81000000D+02 0.14653376D+00 0.51410028D-03
+ 0.81000000D+02 0.84000000D+02 0.13777611D+00 0.52046203D-03
+ 0.84000000D+02 0.87000000D+02 0.12543343D+00 0.48240915D-03
+ 0.87000000D+02 0.90000000D+02 0.11651557D+00 0.55407017D-03
+ 0.90000000D+02 0.93000000D+02 0.10920949D+00 0.70582289D-03
+ 0.93000000D+02 0.96000000D+02 0.10164113D+00 0.93849799D-03
+ 0.96000000D+02 0.99000000D+02 0.93204635D-01 0.80297557D-03
+ 0.99000000D+02 0.10200000D+03 0.89959920D-01 0.23203718D-02
+ 0.10200000D+03 0.10500000D+03 0.79093328D-01 0.23176929D-02
+ 0.10500000D+03 0.10800000D+03 0.76370524D-01 0.32700644D-03
+ 0.10800000D+03 0.11100000D+03 0.70703663D-01 0.34019212D-03
+ 0.11100000D+03 0.11400000D+03 0.66434469D-01 0.32450898D-03
+ 0.11400000D+03 0.11700000D+03 0.62407274D-01 0.25254782D-03
+ 0.11700000D+03 0.12000000D+03 0.59018909D-01 0.45737607D-03
+ 0.12000000D+03 0.12300000D+03 0.54141318D-01 0.47496570D-03
+ 0.12300000D+03 0.12600000D+03 0.51068266D-01 0.26156898D-03
+ 0.12600000D+03 0.12900000D+03 0.48059858D-01 0.27994717D-03
+ 0.12900000D+03 0.13200000D+03 0.44983930D-01 0.28039897D-03
+ 0.13200000D+03 0.13500000D+03 0.42861574D-01 0.23308038D-03
+ 0.13500000D+03 0.13800000D+03 0.39745082D-01 0.25665119D-03
+ 0.13800000D+03 0.14100000D+03 0.37525923D-01 0.29428451D-03
+ 0.14100000D+03 0.14400000D+03 0.35392769D-01 0.31999573D-03
+ 0.14400000D+03 0.14700000D+03 0.33132418D-01 0.26852615D-03
+ 0.14700000D+03 0.15000000D+03 0.32417052D-01 0.51814094D-03
+ 0.15000000D+03 0.15300000D+03 0.29618994D-01 0.53809341D-03
+ 0.15300000D+03 0.15600000D+03 0.27428203D-01 0.24571712D-03
+ 0.15600000D+03 0.15900000D+03 0.26799674D-01 0.33935023D-03
+ 0.15900000D+03 0.16200000D+03 0.25278788D-01 0.33658505D-03
+ 0.16200000D+03 0.16500000D+03 0.24024916D-01 0.21144671D-03
+ 0.16500000D+03 0.16800000D+03 0.21803206D-01 0.20593563D-03
+ 0.16800000D+03 0.17100000D+03 0.21331475D-01 0.16997318D-03
+ 0.17100000D+03 0.17400000D+03 0.20204183D-01 0.16534613D-03
+ 0.17400000D+03 0.17700000D+03 0.18893197D-01 0.15890126D-03
+ 0.17700000D+03 0.18000000D+03 0.17643625D-01 0.28906507D-03
+ 0.18000000D+03 0.18300000D+03 0.17165996D-01 0.31031596D-03
+ 0.18300000D+03 0.18600000D+03 0.16464479D-01 0.24564308D-03
+ 0.18600000D+03 0.18900000D+03 0.14936832D-01 0.26908716D-03
+ 0.18900000D+03 0.19200000D+03 0.14702091D-01 0.22527815D-03
+ 0.19200000D+03 0.19500000D+03 0.14248844D-01 0.50782448D-03
+ 0.19500000D+03 0.19800000D+03 0.12308182D-01 0.51108759D-03
+ 0.19800000D+03 0.20100000D+03 0.12409652D-01 0.20017174D-03
+ 0.20100000D+03 0.20400000D+03 0.10987557D-01 0.72740675D-03
+ 0.20400000D+03 0.20700000D+03 0.12077930D-01 0.71826843D-03
+ 0.20700000D+03 0.21000000D+03 0.10652757D-01 0.16505281D-03
+ 0.21000000D+03 0.21300000D+03 0.99998450D-02 0.21663847D-03
+ 0.21300000D+03 0.21600000D+03 0.95205435D-02 0.18732335D-03
+ 0.21600000D+03 0.21900000D+03 0.91854157D-02 0.38622131D-03
+ 0.21900000D+03 0.22200000D+03 0.82495562D-02 0.38438113D-03
+ 0.22200000D+03 0.22500000D+03 0.80212881D-02 0.13498299D-03
+ 0.22500000D+03 0.22800000D+03 0.80707007D-02 0.18480605D-03
+ 0.22800000D+03 0.23100000D+03 0.75276039D-02 0.20641673D-03
+ 0.23100000D+03 0.23400000D+03 0.70881244D-02 0.41407598D-03
+ 0.23400000D+03 0.23700000D+03 0.63173106D-02 0.39539684D-03
+ 0.23700000D+03 0.24000000D+03 0.63582671D-02 0.11408588D-03
+ 0.24000000D+03 0.24300000D+03 0.62128744D-02 0.13786580D-03
+ 0.24300000D+03 0.24600000D+03 0.56200936D-02 0.11740437D-03
+ 0.24600000D+03 0.24900000D+03 0.56542402D-02 0.89725090D-04
+ 0.24900000D+03 0.25200000D+03 0.49253502D-02 0.87115627D-04
+ 0.25200000D+03 0.25500000D+03 0.50673140D-02 0.90988094D-04
+ 0.25500000D+03 0.25800000D+03 0.46399136D-02 0.10097285D-03
+ 0.25800000D+03 0.26100000D+03 0.45886978D-02 0.98359718D-04
+ 0.26100000D+03 0.26400000D+03 0.40217481D-02 0.27927945D-03
+ 0.26400000D+03 0.26700000D+03 0.31808906D-02 0.99733052D-03
+ 0.26700000D+03 0.27000000D+03 0.50200042D-02 0.96487830D-03
+ 0.27000000D+03 0.27300000D+03 0.36138402D-02 0.11898353D-03
+ 0.27300000D+03 0.27600000D+03 0.33802084D-02 0.20210106D-03
+ 0.27600000D+03 0.27900000D+03 0.35632352D-02 0.19484869D-03
+ 0.27900000D+03 0.28200000D+03 0.30217960D-02 0.10287053D-03
+ 0.28200000D+03 0.28500000D+03 0.30486765D-02 0.10482005D-03
+ 0.28500000D+03 0.28800000D+03 0.29730904D-02 0.67559349D-04
+ 0.28800000D+03 0.29100000D+03 0.27828759D-02 0.60248005D-04
+ 0.29100000D+03 0.29400000D+03 0.24796522D-02 0.81932206D-04
+ 0.29400000D+03 0.29700000D+03 0.27078024D-02 0.10481158D-03
+ 0.29700000D+03 0.30000000D+03 0.24057062D-02 0.94280767D-04
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 -.23729739D+01 0.63006822D-02
+ 0.30000000D+01 0.60000000D+01 0.10149049D+01 0.32543005D-02
+ 0.60000000D+01 0.90000000D+01 0.24983853D+01 0.26227858D-02
+ 0.90000000D+01 0.12000000D+02 0.21740857D+01 0.20598149D-02
+ 0.12000000D+02 0.15000000D+02 0.17782044D+01 0.18830877D-02
+ 0.15000000D+02 0.18000000D+02 0.14606030D+01 0.16738760D-02
+ 0.18000000D+02 0.21000000D+02 0.12100327D+01 0.14045306D-02
+ 0.21000000D+02 0.24000000D+02 0.10189869D+01 0.11029099D-02
+ 0.24000000D+02 0.27000000D+02 0.86261153D+00 0.10669961D-02
+ 0.27000000D+02 0.30000000D+02 0.74173021D+00 0.10631500D-02
+ 0.30000000D+02 0.33000000D+02 0.63820901D+00 0.10590001D-02
+ 0.33000000D+02 0.36000000D+02 0.55599428D+00 0.10171966D-02
+ 0.36000000D+02 0.39000000D+02 0.48670294D+00 0.91166136D-03
+ 0.39000000D+02 0.42000000D+02 0.42648199D+00 0.88374121D-03
+ 0.42000000D+02 0.45000000D+02 0.37370602D+00 0.86068838D-03
+ 0.45000000D+02 0.48000000D+02 0.33362099D+00 0.75864015D-03
+ 0.48000000D+02 0.51000000D+02 0.29357157D+00 0.66011082D-03
+ 0.51000000D+02 0.54000000D+02 0.26051291D+00 0.52520783D-03
+ 0.54000000D+02 0.57000000D+02 0.23335314D+00 0.50141382D-03
+ 0.57000000D+02 0.60000000D+02 0.20700615D+00 0.49767053D-03
+ 0.60000000D+02 0.63000000D+02 0.18484233D+00 0.46285925D-03
+ 0.63000000D+02 0.66000000D+02 0.16585140D+00 0.43237186D-03
+ 0.66000000D+02 0.69000000D+02 0.14788332D+00 0.49555994D-03
+ 0.69000000D+02 0.72000000D+02 0.13397577D+00 0.45037882D-03
+ 0.72000000D+02 0.75000000D+02 0.11904971D+00 0.38090409D-03
+ 0.75000000D+02 0.78000000D+02 0.10812452D+00 0.35872872D-03
+ 0.78000000D+02 0.81000000D+02 0.96275656D-01 0.33677483D-03
+ 0.81000000D+02 0.84000000D+02 0.88187710D-01 0.33387587D-03
+ 0.84000000D+02 0.87000000D+02 0.78199328D-01 0.30064791D-03
+ 0.87000000D+02 0.90000000D+02 0.70749952D-01 0.33545935D-03
+ 0.90000000D+02 0.93000000D+02 0.64563939D-01 0.41608739D-03
+ 0.93000000D+02 0.96000000D+02 0.58483318D-01 0.53776002D-03
+ 0.96000000D+02 0.99000000D+02 0.52202188D-01 0.45456836D-03
+ 0.99000000D+02 0.10200000D+03 0.49023910D-01 0.12481548D-02
+ 0.10200000D+03 0.10500000D+03 0.41943385D-01 0.12453845D-02
+ 0.10500000D+03 0.10800000D+03 0.39425985D-01 0.16892866D-03
+ 0.10800000D+03 0.11100000D+03 0.35520955D-01 0.17047196D-03
+ 0.11100000D+03 0.11400000D+03 0.32479729D-01 0.15923649D-03
+ 0.11400000D+03 0.11700000D+03 0.29689333D-01 0.12039496D-03
+ 0.11700000D+03 0.12000000D+03 0.27318006D-01 0.20957422D-03
+ 0.12000000D+03 0.12300000D+03 0.24389236D-01 0.21576937D-03
+ 0.12300000D+03 0.12600000D+03 0.22390561D-01 0.11509086D-03
+ 0.12600000D+03 0.12900000D+03 0.20510725D-01 0.11891200D-03
+ 0.12900000D+03 0.13200000D+03 0.18687933D-01 0.11699637D-03
+ 0.13200000D+03 0.13500000D+03 0.17334729D-01 0.94239552D-04
+ 0.13500000D+03 0.13800000D+03 0.15650461D-01 0.10085678D-03
+ 0.13800000D+03 0.14100000D+03 0.14390239D-01 0.11264435D-03
+ 0.14100000D+03 0.14400000D+03 0.13217156D-01 0.11944565D-03
+ 0.14400000D+03 0.14700000D+03 0.12053514D-01 0.98253211D-04
+ 0.14700000D+03 0.15000000D+03 0.11485789D-01 0.18156177D-03
+ 0.15000000D+03 0.15300000D+03 0.10221984D-01 0.18749591D-03
+ 0.15300000D+03 0.15600000D+03 0.92275102D-02 0.83060647D-04
+ 0.15600000D+03 0.15900000D+03 0.87891258D-02 0.11034051D-03
+ 0.15900000D+03 0.16200000D+03 0.80794885D-02 0.10849127D-03
+ 0.16200000D+03 0.16500000D+03 0.74846862D-02 0.65779938D-04
+ 0.16500000D+03 0.16800000D+03 0.66248106D-02 0.62739451D-04
+ 0.16800000D+03 0.17100000D+03 0.63234623D-02 0.50467906D-04
+ 0.17100000D+03 0.17400000D+03 0.58410145D-02 0.47759792D-04
+ 0.17400000D+03 0.17700000D+03 0.53287597D-02 0.44917774D-04
+ 0.17700000D+03 0.18000000D+03 0.48574260D-02 0.78862447D-04
+ 0.18000000D+03 0.18300000D+03 0.46129016D-02 0.83887890D-04
+ 0.18300000D+03 0.18600000D+03 0.43181028D-02 0.64259259D-04
+ 0.18600000D+03 0.18900000D+03 0.38251260D-02 0.68931367D-04
+ 0.18900000D+03 0.19200000D+03 0.36771783D-02 0.56609580D-04
+ 0.19200000D+03 0.19500000D+03 0.34786189D-02 0.12285103D-03
+ 0.19500000D+03 0.19800000D+03 0.29360806D-02 0.12317519D-03
+ 0.19800000D+03 0.20100000D+03 0.28944862D-02 0.46605188D-04
+ 0.20100000D+03 0.20400000D+03 0.25066959D-02 0.16401682D-03
+ 0.20400000D+03 0.20700000D+03 0.26921376D-02 0.16174702D-03
+ 0.20700000D+03 0.21000000D+03 0.23188877D-02 0.35743499D-04
+ 0.21000000D+03 0.21300000D+03 0.21284240D-02 0.46068286D-04
+ 0.21300000D+03 0.21600000D+03 0.19820842D-02 0.39235958D-04
+ 0.21600000D+03 0.21900000D+03 0.18703974D-02 0.77910442D-04
+ 0.21900000D+03 0.22200000D+03 0.16436905D-02 0.77360672D-04
+ 0.22200000D+03 0.22500000D+03 0.15650301D-02 0.26238507D-04
+ 0.22500000D+03 0.22800000D+03 0.15406098D-02 0.35159309D-04
+ 0.22800000D+03 0.23100000D+03 0.14058888D-02 0.38592432D-04
+ 0.23100000D+03 0.23400000D+03 0.12955131D-02 0.75134507D-04
+ 0.23400000D+03 0.23700000D+03 0.11309828D-02 0.71499596D-04
+ 0.23700000D+03 0.24000000D+03 0.11156757D-02 0.19958687D-04
+ 0.24000000D+03 0.24300000D+03 0.10674634D-02 0.23656204D-04
+ 0.24300000D+03 0.24600000D+03 0.94601442D-03 0.19880558D-04
+ 0.24600000D+03 0.24900000D+03 0.93234660D-03 0.14760820D-04
+ 0.24900000D+03 0.25200000D+03 0.79609994D-03 0.14133412D-04
+ 0.25200000D+03 0.25500000D+03 0.80317864D-03 0.14362440D-04
+ 0.25500000D+03 0.25800000D+03 0.72111492D-03 0.15707365D-04
+ 0.25800000D+03 0.26100000D+03 0.69900912D-03 0.14970725D-04
+ 0.26100000D+03 0.26400000D+03 0.60099869D-03 0.41373980D-04
+ 0.26400000D+03 0.26700000D+03 0.46784043D-03 0.14492664D-03
+ 0.26700000D+03 0.27000000D+03 0.72286444D-03 0.13996765D-03
+ 0.27000000D+03 0.27300000D+03 0.50962466D-03 0.16828058D-04
+ 0.27300000D+03 0.27600000D+03 0.46784396D-03 0.27764422D-04
+ 0.27600000D+03 0.27900000D+03 0.48392142D-03 0.26681440D-04
+ 0.27900000D+03 0.28200000D+03 0.40270376D-03 0.13634508D-04
+ 0.28200000D+03 0.28500000D+03 0.39904688D-03 0.13789327D-04
+ 0.28500000D+03 0.28800000D+03 0.38208577D-03 0.86801516D-05
+ 0.28800000D+03 0.29100000D+03 0.35109614D-03 0.76191123D-05
+ 0.29100000D+03 0.29400000D+03 0.30730625D-03 0.10104123D-04
+ 0.29400000D+03 0.29700000D+03 0.32952546D-03 0.12752851D-04
+ 0.29700000D+03 0.30000000D+03 0.28739872D-03 0.11299118D-04
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.52897366D+01 0.96569026D-03
+ 0.11000000D+03 0.11500000D+03 -.14695023D+02 0.43017012D-02
+ 0.11500000D+03 0.12000000D+03 0.50746616D+01 0.31925808D-02
+ 0.12000000D+03 0.12500000D+03 0.31378403D+01 0.26861444D-02
+ 0.12500000D+03 0.13000000D+03 0.21074998D+01 0.30481487D-02
+ 0.13000000D+03 0.13500000D+03 0.15220993D+01 0.26261473D-02
+ 0.13500000D+03 0.14000000D+03 0.11529613D+01 0.16074846D-02
+ 0.14000000D+03 0.14500000D+03 0.91076772D+00 0.14712806D-02
+ 0.14500000D+03 0.15000000D+03 0.73512829D+00 0.14719052D-02
+ 0.15000000D+03 0.15500000D+03 0.61105715D+00 0.14489568D-02
+ 0.15500000D+03 0.16000000D+03 0.51312705D+00 0.11396854D-02
+ 0.16000000D+03 0.16500000D+03 0.43800941D+00 0.10064439D-02
+ 0.16500000D+03 0.17000000D+03 0.37966783D+00 0.91259166D-03
+ 0.17000000D+03 0.17500000D+03 0.32813683D+00 0.85343027D-03
+ 0.17500000D+03 0.18000000D+03 0.29019754D+00 0.87587703D-03
+ 0.18000000D+03 0.18500000D+03 0.25540036D+00 0.87595942D-03
+ 0.18500000D+03 0.19000000D+03 0.22755155D+00 0.95183057D-03
+ 0.19000000D+03 0.19500000D+03 0.20333182D+00 0.10892268D-02
+ 0.19500000D+03 0.20000000D+03 0.18489087D+00 0.95382998D-03
+ 0.20000000D+03 0.20500000D+03 0.16561497D+00 0.58829955D-03
+ 0.20500000D+03 0.21000000D+03 0.14905637D+00 0.70547080D-03
+ 0.21000000D+03 0.21500000D+03 0.13654745D+00 0.12390904D-02
+ 0.21500000D+03 0.22000000D+03 0.12562165D+00 0.11566746D-02
+ 0.22000000D+03 0.22500000D+03 0.11347688D+00 0.62387818D-03
+ 0.22500000D+03 0.23000000D+03 0.10574496D+00 0.58813761D-03
+ 0.23000000D+03 0.23500000D+03 0.96683783D-01 0.47976968D-03
+ 0.23500000D+03 0.24000000D+03 0.88411523D-01 0.50199646D-03
+ 0.24000000D+03 0.24500000D+03 0.83162849D-01 0.47280657D-03
+ 0.24500000D+03 0.25000000D+03 0.75866536D-01 0.45226305D-03
+ 0.25000000D+03 0.25500000D+03 0.71639213D-01 0.42579955D-03
+ 0.25500000D+03 0.26000000D+03 0.65154447D-01 0.42847890D-03
+ 0.26000000D+03 0.26500000D+03 0.60826428D-01 0.52272233D-03
+ 0.26500000D+03 0.27000000D+03 0.57424681D-01 0.52418434D-03
+ 0.27000000D+03 0.27500000D+03 0.53589948D-01 0.53824773D-03
+ 0.27500000D+03 0.28000000D+03 0.50467179D-01 0.47692952D-03
+ 0.28000000D+03 0.28500000D+03 0.46599535D-01 0.29979255D-03
+ 0.28500000D+03 0.29000000D+03 0.43435620D-01 0.45372373D-03
+ 0.29000000D+03 0.29500000D+03 0.40519410D-01 0.78152469D-03
+ 0.29500000D+03 0.30000000D+03 0.39867297D-01 0.70936283D-03
+ 0.30000000D+03 0.30500000D+03 0.35898286D-01 0.45726975D-03
+ 0.30500000D+03 0.31000000D+03 0.34847748D-01 0.50277820D-03
+ 0.31000000D+03 0.31500000D+03 0.32537459D-01 0.41921068D-03
+ 0.31500000D+03 0.32000000D+03 0.30187327D-01 0.64843834D-03
+ 0.32000000D+03 0.32500000D+03 0.29390231D-01 0.62691814D-03
+ 0.32500000D+03 0.33000000D+03 0.26921581D-01 0.69326547D-03
+ 0.33000000D+03 0.33500000D+03 0.25802954D-01 0.80375912D-03
+ 0.33500000D+03 0.34000000D+03 0.25406742D-01 0.50697907D-03
+ 0.34000000D+03 0.34500000D+03 0.23134695D-01 0.25762587D-03
+ 0.34500000D+03 0.35000000D+03 0.22397562D-01 0.23356475D-03
+ 0.35000000D+03 0.35500000D+03 0.20959519D-01 0.22437525D-03
+ 0.35500000D+03 0.36000000D+03 0.20102913D-01 0.21322005D-03
+ 0.36000000D+03 0.36500000D+03 0.18898904D-01 0.20328215D-03
+ 0.36500000D+03 0.37000000D+03 0.17559447D-01 0.34241134D-03
+ 0.37000000D+03 0.37500000D+03 0.17472985D-01 0.37728016D-03
+ 0.37500000D+03 0.38000000D+03 0.16153403D-01 0.33021810D-03
+ 0.38000000D+03 0.38500000D+03 0.16230119D-01 0.27456402D-03
+ 0.38500000D+03 0.39000000D+03 0.14363211D-01 0.29295393D-03
+ 0.39000000D+03 0.39500000D+03 0.14059899D-01 0.35359717D-03
+ 0.39500000D+03 0.40000000D+03 0.13921213D-01 0.25891469D-03
+ 0.40000000D+03 0.40500000D+03 0.12632339D-01 0.22923861D-03
+ 0.40500000D+03 0.41000000D+03 0.12623375D-01 0.21191125D-03
+ 0.41000000D+03 0.41500000D+03 0.11562554D-01 0.15719737D-03
+ 0.41500000D+03 0.42000000D+03 0.11493302D-01 0.15131987D-03
+ 0.42000000D+03 0.42500000D+03 0.10096123D-01 0.26537964D-03
+ 0.42500000D+03 0.43000000D+03 0.10541781D-01 0.29486587D-03
+ 0.43000000D+03 0.43500000D+03 0.10005541D-01 0.19701692D-03
+ 0.43500000D+03 0.44000000D+03 0.93559355D-02 0.15024353D-03
+ 0.44000000D+03 0.44500000D+03 0.90522215D-02 0.15680209D-03
+ 0.44500000D+03 0.45000000D+03 0.85002822D-02 0.23133323D-03
+ 0.45000000D+03 0.45500000D+03 0.84235278D-02 0.21583703D-03
+ 0.45500000D+03 0.46000000D+03 0.77268640D-02 0.16511584D-03
+ 0.46000000D+03 0.46500000D+03 0.76972531D-02 0.16704922D-03
+ 0.46500000D+03 0.47000000D+03 0.74299940D-02 0.13500886D-03
+ 0.47000000D+03 0.47500000D+03 0.68693737D-02 0.19184278D-03
+ 0.47500000D+03 0.48000000D+03 0.66327350D-02 0.20039572D-03
+ 0.48000000D+03 0.48500000D+03 0.63857209D-02 0.15961315D-03
+ 0.48500000D+03 0.49000000D+03 0.63262898D-02 0.14864522D-03
+ 0.49000000D+03 0.49500000D+03 0.58699349D-02 0.12606347D-03
+ 0.49500000D+03 0.50000000D+03 0.57732827D-02 0.13273942D-03
+ 0.50000000D+03 0.50500000D+03 0.52551572D-02 0.19441077D-03
+ 0.50500000D+03 0.51000000D+03 0.54454169D-02 0.18403274D-03
+ 0.51000000D+03 0.51500000D+03 0.50130239D-02 0.95715460D-04
+ 0.51500000D+03 0.52000000D+03 0.48862253D-02 0.10625284D-03
+ 0.52000000D+03 0.52500000D+03 0.46240353D-02 0.11710000D-03
+ 0.52500000D+03 0.53000000D+03 0.44933286D-02 0.12109596D-03
+ 0.53000000D+03 0.53500000D+03 0.44110849D-02 0.10065803D-03
+ 0.53500000D+03 0.54000000D+03 0.40570672D-02 0.87047321D-04
+ 0.54000000D+03 0.54500000D+03 0.38164399D-02 0.20525726D-03
+ 0.54500000D+03 0.55000000D+03 0.38877638D-02 0.26372659D-03
+ 0.55000000D+03 0.55500000D+03 0.39467551D-02 0.18908454D-03
+ 0.55500000D+03 0.56000000D+03 0.34109175D-02 0.16001472D-03
+ 0.56000000D+03 0.56500000D+03 0.36519091D-02 0.15684284D-03
+ 0.56500000D+03 0.57000000D+03 0.30827288D-02 0.11797269D-03
+ 0.57000000D+03 0.57500000D+03 0.31567782D-02 0.27194629D-03
+ 0.57500000D+03 0.58000000D+03 0.32671651D-02 0.25460239D-03
+ 0.58000000D+03 0.58500000D+03 0.31365318D-02 0.63557275D-04
+ 0.58500000D+03 0.59000000D+03 0.26795950D-02 0.71356629D-04
+ 0.59000000D+03 0.59500000D+03 0.27114029D-02 0.84054917D-04
+ 0.59500000D+03 0.60000000D+03 0.28982329D-02 0.78675257D-04
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.52897366D+01 0.96569026D-03
+ 0.11000000D+03 0.11500000D+03 -.14695914D+02 0.42985057D-02
+ 0.11500000D+03 0.12000000D+03 0.50515894D+01 0.31787714D-02
+ 0.12000000D+03 0.12500000D+03 0.30984961D+01 0.26508993D-02
+ 0.12500000D+03 0.13000000D+03 0.20560367D+01 0.29668632D-02
+ 0.13000000D+03 0.13500000D+03 0.14613994D+01 0.25338922D-02
+ 0.13500000D+03 0.14000000D+03 0.10854789D+01 0.15121111D-02
+ 0.14000000D+03 0.14500000D+03 0.83793137D+00 0.13566854D-02
+ 0.14500000D+03 0.15000000D+03 0.65882848D+00 0.13140248D-02
+ 0.15000000D+03 0.15500000D+03 0.53188442D+00 0.12655389D-02
+ 0.15500000D+03 0.16000000D+03 0.43263481D+00 0.96378773D-03
+ 0.16000000D+03 0.16500000D+03 0.35686985D+00 0.81959279D-03
+ 0.16500000D+03 0.17000000D+03 0.29827942D+00 0.71998634D-03
+ 0.17000000D+03 0.17500000D+03 0.24812780D+00 0.64341835D-03
+ 0.17500000D+03 0.18000000D+03 0.21088255D+00 0.63765178D-03
+ 0.18000000D+03 0.18500000D+03 0.17810518D+00 0.60954661D-03
+ 0.18500000D+03 0.19000000D+03 0.15211991D+00 0.63542850D-03
+ 0.19000000D+03 0.19500000D+03 0.13019775D+00 0.69427428D-03
+ 0.19500000D+03 0.20000000D+03 0.11327870D+00 0.59189137D-03
+ 0.20000000D+03 0.20500000D+03 0.97040067D-01 0.34515927D-03
+ 0.20500000D+03 0.21000000D+03 0.83506791D-01 0.39222031D-03
+ 0.21000000D+03 0.21500000D+03 0.73121161D-01 0.65514218D-03
+ 0.21500000D+03 0.22000000D+03 0.64282795D-01 0.60223931D-03
+ 0.22000000D+03 0.22500000D+03 0.55490066D-01 0.30348883D-03
+ 0.22500000D+03 0.23000000D+03 0.49416739D-01 0.27716558D-03
+ 0.23000000D+03 0.23500000D+03 0.43170048D-01 0.21376979D-03
+ 0.23500000D+03 0.24000000D+03 0.37742064D-01 0.21432792D-03
+ 0.24000000D+03 0.24500000D+03 0.33945349D-01 0.19361886D-03
+ 0.24500000D+03 0.25000000D+03 0.29612738D-01 0.17623684D-03
+ 0.25000000D+03 0.25500000D+03 0.26748624D-01 0.15994029D-03
+ 0.25500000D+03 0.26000000D+03 0.23286955D-01 0.15235666D-03
+ 0.26000000D+03 0.26500000D+03 0.20824325D-01 0.17841336D-03
+ 0.26500000D+03 0.27000000D+03 0.18835944D-01 0.17242559D-03
+ 0.27000000D+03 0.27500000D+03 0.16845260D-01 0.16850083D-03
+ 0.27500000D+03 0.28000000D+03 0.15207061D-01 0.14546914D-03
+ 0.28000000D+03 0.28500000D+03 0.13469293D-01 0.86758901D-04
+ 0.28500000D+03 0.29000000D+03 0.12054017D-01 0.12446473D-03
+ 0.29000000D+03 0.29500000D+03 0.10806049D-01 0.20646272D-03
+ 0.29500000D+03 0.30000000D+03 0.10212585D-01 0.18436720D-03
+ 0.30000000D+03 0.30500000D+03 0.88402228D-02 0.11161867D-03
+ 0.30500000D+03 0.31000000D+03 0.82566287D-02 0.11956041D-03
+ 0.31000000D+03 0.31500000D+03 0.74139567D-02 0.95751493D-04
+ 0.31500000D+03 0.32000000D+03 0.66248989D-02 0.14068242D-03
+ 0.32000000D+03 0.32500000D+03 0.62140721D-02 0.13434946D-03
+ 0.32500000D+03 0.33000000D+03 0.54868594D-02 0.13919940D-03
+ 0.33000000D+03 0.33500000D+03 0.50727501D-02 0.15877070D-03
+ 0.33500000D+03 0.34000000D+03 0.48162680D-02 0.97243074D-04
+ 0.34000000D+03 0.34500000D+03 0.42312914D-02 0.47268889D-04
+ 0.34500000D+03 0.35000000D+03 0.39565184D-02 0.41276319D-04
+ 0.35000000D+03 0.35500000D+03 0.35767779D-02 0.38326002D-04
+ 0.35500000D+03 0.36000000D+03 0.33157136D-02 0.35201663D-04
+ 0.36000000D+03 0.36500000D+03 0.30144203D-02 0.32471387D-04
+ 0.36500000D+03 0.37000000D+03 0.27111157D-02 0.52278329D-04
+ 0.37000000D+03 0.37500000D+03 0.26115981D-02 0.56694264D-04
+ 0.37500000D+03 0.38000000D+03 0.23376640D-02 0.47650425D-04
+ 0.38000000D+03 0.38500000D+03 0.22743779D-02 0.38887876D-04
+ 0.38500000D+03 0.39000000D+03 0.19502984D-02 0.39348432D-04
+ 0.39000000D+03 0.39500000D+03 0.18521012D-02 0.46691242D-04
+ 0.39500000D+03 0.40000000D+03 0.17779452D-02 0.33323956D-04
+ 0.40000000D+03 0.40500000D+03 0.15651329D-02 0.28250659D-04
+ 0.40500000D+03 0.41000000D+03 0.15181756D-02 0.25718793D-04
+ 0.41000000D+03 0.41500000D+03 0.13499129D-02 0.18291648D-04
+ 0.41500000D+03 0.42000000D+03 0.13034699D-02 0.17256743D-04
+ 0.42000000D+03 0.42500000D+03 0.11132045D-02 0.28937172D-04
+ 0.42500000D+03 0.43000000D+03 0.11305178D-02 0.31794622D-04
+ 0.43000000D+03 0.43500000D+03 0.10428585D-02 0.20595338D-04
+ 0.43500000D+03 0.44000000D+03 0.94826015D-03 0.15300956D-04
+ 0.44000000D+03 0.44500000D+03 0.89285399D-03 0.15379657D-04
+ 0.44500000D+03 0.45000000D+03 0.81658522D-03 0.22124022D-04
+ 0.45000000D+03 0.45500000D+03 0.78766107D-03 0.20324955D-04
+ 0.45500000D+03 0.46000000D+03 0.70380266D-03 0.15002038D-04
+ 0.46000000D+03 0.46500000D+03 0.68331505D-03 0.14855845D-04
+ 0.46500000D+03 0.47000000D+03 0.64244925D-03 0.11714691D-04
+ 0.47000000D+03 0.47500000D+03 0.57899009D-03 0.16060485D-04
+ 0.47500000D+03 0.48000000D+03 0.54527264D-03 0.16562370D-04
+ 0.48000000D+03 0.48500000D+03 0.51222169D-03 0.12775152D-04
+ 0.48500000D+03 0.49000000D+03 0.49512174D-03 0.11682147D-04
+ 0.49000000D+03 0.49500000D+03 0.44830385D-03 0.96220297D-05
+ 0.49500000D+03 0.50000000D+03 0.43040841D-03 0.98990877D-05
+ 0.50000000D+03 0.50500000D+03 0.38276890D-03 0.14076193D-04
+ 0.50500000D+03 0.51000000D+03 0.38735836D-03 0.13199401D-04
+ 0.51000000D+03 0.51500000D+03 0.34818871D-03 0.66542133D-05
+ 0.51500000D+03 0.52000000D+03 0.33181567D-03 0.72028240D-05
+ 0.52000000D+03 0.52500000D+03 0.30690456D-03 0.77701794D-05
+ 0.52500000D+03 0.53000000D+03 0.29170041D-03 0.78602802D-05
+ 0.53000000D+03 0.53500000D+03 0.27984653D-03 0.64213740D-05
+ 0.53500000D+03 0.54000000D+03 0.25184081D-03 0.53879004D-05
+ 0.54000000D+03 0.54500000D+03 0.23203230D-03 0.12367460D-04
+ 0.54500000D+03 0.55000000D+03 0.23133942D-03 0.15695790D-04
+ 0.55000000D+03 0.55500000D+03 0.22978432D-03 0.11094857D-04
+ 0.55500000D+03 0.56000000D+03 0.19435691D-03 0.90509362D-05
+ 0.56000000D+03 0.56500000D+03 0.20369327D-03 0.88234017D-05
+ 0.56500000D+03 0.57000000D+03 0.16844594D-03 0.64084696D-05
+ 0.57000000D+03 0.57500000D+03 0.16918964D-03 0.14461781D-04
+ 0.57500000D+03 0.58000000D+03 0.17144478D-03 0.13479009D-04
+ 0.58000000D+03 0.58500000D+03 0.16113850D-03 0.32683853D-05
+ 0.58500000D+03 0.59000000D+03 0.13496139D-03 0.35879193D-05
+ 0.59000000D+03 0.59500000D+03 0.13395424D-03 0.41508023D-05
+ 0.59500000D+03 0.60000000D+03 0.14039375D-03 0.38184510D-05
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 -.19054903D+00 0.64074001D-02
+ 0.30000000D+01 0.60000000D+01 0.39301371D+00 0.35069037D-02
+ 0.60000000D+01 0.90000000D+01 0.22186774D+01 0.29322292D-02
+ 0.90000000D+01 0.12000000D+02 0.20027961D+01 0.23272128D-02
+ 0.12000000D+02 0.15000000D+02 0.16730820D+01 0.20868921D-02
+ 0.15000000D+02 0.18000000D+02 0.13901327D+01 0.33082491D-02
+ 0.18000000D+02 0.21000000D+02 0.11662692D+01 0.32023199D-02
+ 0.21000000D+02 0.24000000D+02 0.99129456D+00 0.15767515D-02
+ 0.24000000D+02 0.27000000D+02 0.85197594D+00 0.16934327D-02
+ 0.27000000D+02 0.30000000D+02 0.74293862D+00 0.17660649D-02
+ 0.30000000D+02 0.33000000D+02 0.64912660D+00 0.15382741D-02
+ 0.33000000D+02 0.36000000D+02 0.56999625D+00 0.16062711D-02
+ 0.36000000D+02 0.39000000D+02 0.50758883D+00 0.15768159D-02
+ 0.39000000D+02 0.42000000D+02 0.45396590D+00 0.13529437D-02
+ 0.42000000D+02 0.45000000D+02 0.40796907D+00 0.14225858D-02
+ 0.45000000D+02 0.48000000D+02 0.36516659D+00 0.25784892D-02
+ 0.48000000D+02 0.51000000D+02 0.32764021D+00 0.26215956D-02
+ 0.51000000D+02 0.54000000D+02 0.30047981D+00 0.13684659D-02
+ 0.54000000D+02 0.57000000D+02 0.27036600D+00 0.10927876D-02
+ 0.57000000D+02 0.60000000D+02 0.24743418D+00 0.10716865D-02
+ 0.60000000D+02 0.63000000D+02 0.22674461D+00 0.10271707D-02
+ 0.63000000D+02 0.66000000D+02 0.20629682D+00 0.92184715D-03
+ 0.66000000D+02 0.69000000D+02 0.19062351D+00 0.12143070D-02
+ 0.69000000D+02 0.72000000D+02 0.17435618D+00 0.17841304D-02
+ 0.72000000D+02 0.75000000D+02 0.15863370D+00 0.15445745D-02
+ 0.75000000D+02 0.78000000D+02 0.14724381D+00 0.10838571D-02
+ 0.78000000D+02 0.81000000D+02 0.13607245D+00 0.10405510D-02
+ 0.81000000D+02 0.84000000D+02 0.12458306D+00 0.83148038D-03
+ 0.84000000D+02 0.87000000D+02 0.11702461D+00 0.81491507D-03
+ 0.87000000D+02 0.90000000D+02 0.10741303D+00 0.77985440D-03
+ 0.90000000D+02 0.93000000D+02 0.98740882D-01 0.91493413D-03
+ 0.93000000D+02 0.96000000D+02 0.92845097D-01 0.10737896D-02
+ 0.96000000D+02 0.99000000D+02 0.86074178D-01 0.96188384D-03
+ 0.99000000D+02 0.10200000D+03 0.81160183D-01 0.77574332D-03
+ 0.10200000D+03 0.10500000D+03 0.74856193D-01 0.93518437D-03
+ 0.10500000D+03 0.10800000D+03 0.68226976D-01 0.83642275D-03
+ 0.10800000D+03 0.11100000D+03 0.66558581D-01 0.76047308D-03
+ 0.11100000D+03 0.11400000D+03 0.59610968D-01 0.72534730D-03
+ 0.11400000D+03 0.11700000D+03 0.57461894D-01 0.72343200D-03
+ 0.11700000D+03 0.12000000D+03 0.51817293D-01 0.86011781D-03
+ 0.12000000D+03 0.12300000D+03 0.50167426D-01 0.74705099D-03
+ 0.12300000D+03 0.12600000D+03 0.46445106D-01 0.58720204D-03
+ 0.12600000D+03 0.12900000D+03 0.43453791D-01 0.45298220D-03
+ 0.12900000D+03 0.13200000D+03 0.41779515D-01 0.44937708D-03
+ 0.13200000D+03 0.13500000D+03 0.37546972D-01 0.46292132D-03
+ 0.13500000D+03 0.13800000D+03 0.37602574D-01 0.68643930D-03
+ 0.13800000D+03 0.14100000D+03 0.33745354D-01 0.71278719D-03
+ 0.14100000D+03 0.14400000D+03 0.31700151D-01 0.50480684D-03
+ 0.14400000D+03 0.14700000D+03 0.30361433D-01 0.42115678D-03
+ 0.14700000D+03 0.15000000D+03 0.28001568D-01 0.65279760D-03
+ 0.15000000D+03 0.15300000D+03 0.27517255D-01 0.75782480D-03
+ 0.15300000D+03 0.15600000D+03 0.25258226D-01 0.52371272D-03
+ 0.15600000D+03 0.15900000D+03 0.24602928D-01 0.47321059D-03
+ 0.15900000D+03 0.16200000D+03 0.22237536D-01 0.44616783D-03
+ 0.16200000D+03 0.16500000D+03 0.21551343D-01 0.36857600D-03
+ 0.16500000D+03 0.16800000D+03 0.20714968D-01 0.43557212D-03
+ 0.16800000D+03 0.17100000D+03 0.18437296D-01 0.41356574D-03
+ 0.17100000D+03 0.17400000D+03 0.18218235D-01 0.39460897D-03
+ 0.17400000D+03 0.17700000D+03 0.17112361D-01 0.36212907D-03
+ 0.17700000D+03 0.18000000D+03 0.16900489D-01 0.36691327D-03
+ 0.18000000D+03 0.18300000D+03 0.14852414D-01 0.38828772D-03
+ 0.18300000D+03 0.18600000D+03 0.14380752D-01 0.32756771D-03
+ 0.18600000D+03 0.18900000D+03 0.13999287D-01 0.33424062D-03
+ 0.18900000D+03 0.19200000D+03 0.12871691D-01 0.33125382D-03
+ 0.19200000D+03 0.19500000D+03 0.12160053D-01 0.28105023D-03
+ 0.19500000D+03 0.19800000D+03 0.11865472D-01 0.27058156D-03
+ 0.19800000D+03 0.20100000D+03 0.10892681D-01 0.29548553D-03
+ 0.20100000D+03 0.20400000D+03 0.10687395D-01 0.40168295D-03
+ 0.20400000D+03 0.20700000D+03 0.10044008D-01 0.37713178D-03
+ 0.20700000D+03 0.21000000D+03 0.93444352D-02 0.43594980D-03
+ 0.21000000D+03 0.21300000D+03 0.87484201D-02 0.44675846D-03
+ 0.21300000D+03 0.21600000D+03 0.88070146D-02 0.28435339D-03
+ 0.21600000D+03 0.21900000D+03 0.78346924D-02 0.38583098D-03
+ 0.21900000D+03 0.22200000D+03 0.80621908D-02 0.34401725D-03
+ 0.22200000D+03 0.22500000D+03 0.80375182D-02 0.44685414D-03
+ 0.22500000D+03 0.22800000D+03 0.59150383D-02 0.45788534D-03
+ 0.22800000D+03 0.23100000D+03 0.66394491D-02 0.21395948D-03
+ 0.23100000D+03 0.23400000D+03 0.61209228D-02 0.28558287D-03
+ 0.23400000D+03 0.23700000D+03 0.61122561D-02 0.26228981D-03
+ 0.23700000D+03 0.24000000D+03 0.58239693D-02 0.22918214D-03
+ 0.24000000D+03 0.24300000D+03 0.50055188D-02 0.24996129D-03
+ 0.24300000D+03 0.24600000D+03 0.50601481D-02 0.16140795D-03
+ 0.24600000D+03 0.24900000D+03 0.48734651D-02 0.13019543D-03
+ 0.24900000D+03 0.25200000D+03 0.46180589D-02 0.13803156D-03
+ 0.25200000D+03 0.25500000D+03 0.44253266D-02 0.14755598D-03
+ 0.25500000D+03 0.25800000D+03 0.41224344D-02 0.15235830D-03
+ 0.25800000D+03 0.26100000D+03 0.37085304D-02 0.14616486D-03
+ 0.26100000D+03 0.26400000D+03 0.37943114D-02 0.27089774D-03
+ 0.26400000D+03 0.26700000D+03 0.44782650D-02 0.76824602D-03
+ 0.26700000D+03 0.27000000D+03 0.24414988D-02 0.73375529D-03
+ 0.27000000D+03 0.27300000D+03 0.33201965D-02 0.14003475D-03
+ 0.27300000D+03 0.27600000D+03 0.31964793D-02 0.17897079D-03
+ 0.27600000D+03 0.27900000D+03 0.26670938D-02 0.18242540D-03
+ 0.27900000D+03 0.28200000D+03 0.29453641D-02 0.14392202D-03
+ 0.28200000D+03 0.28500000D+03 0.26880751D-02 0.23386976D-03
+ 0.28500000D+03 0.28800000D+03 0.21557364D-02 0.24550508D-03
+ 0.28800000D+03 0.29100000D+03 0.24237144D-02 0.14452055D-03
+ 0.29100000D+03 0.29400000D+03 0.25447760D-02 0.11124235D-03
+ 0.29400000D+03 0.29700000D+03 0.19370468D-02 0.11181573D-03
+ 0.29700000D+03 0.30000000D+03 0.20126239D-02 0.10344427D-03
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 -.18589221D+00 0.64062872D-02
+ 0.30000000D+01 0.60000000D+01 0.39136933D+00 0.35008927D-02
+ 0.60000000D+01 0.90000000D+01 0.22082624D+01 0.29194102D-02
+ 0.90000000D+01 0.12000000D+02 0.19847343D+01 0.23068494D-02
+ 0.12000000D+02 0.15000000D+02 0.16483249D+01 0.20557788D-02
+ 0.15000000D+02 0.18000000D+02 0.13596110D+01 0.32270543D-02
+ 0.18000000D+02 0.21000000D+02 0.11307958D+01 0.31146843D-02
+ 0.21000000D+02 0.24000000D+02 0.95154900D+00 0.15144223D-02
+ 0.24000000D+02 0.27000000D+02 0.80860122D+00 0.16045352D-02
+ 0.27000000D+02 0.30000000D+02 0.69627736D+00 0.16563870D-02
+ 0.30000000D+02 0.33000000D+02 0.59999087D+00 0.14226396D-02
+ 0.33000000D+02 0.36000000D+02 0.51900793D+00 0.14604434D-02
+ 0.36000000D+02 0.39000000D+02 0.45482223D+00 0.14151686D-02
+ 0.39000000D+02 0.42000000D+02 0.39984217D+00 0.11918328D-02
+ 0.42000000D+02 0.45000000D+02 0.35284132D+00 0.12286807D-02
+ 0.45000000D+02 0.48000000D+02 0.30983374D+00 0.21736764D-02
+ 0.48000000D+02 0.51000000D+02 0.27251088D+00 0.21934212D-02
+ 0.51000000D+02 0.54000000D+02 0.24478133D+00 0.11197075D-02
+ 0.54000000D+02 0.57000000D+02 0.21555011D+00 0.87012795D-03
+ 0.57000000D+02 0.60000000D+02 0.19292810D+00 0.83681084D-03
+ 0.60000000D+02 0.63000000D+02 0.17277739D+00 0.78189928D-03
+ 0.63000000D+02 0.66000000D+02 0.15354464D+00 0.68878390D-03
+ 0.66000000D+02 0.69000000D+02 0.13850262D+00 0.87552954D-03
+ 0.69000000D+02 0.72000000D+02 0.12358827D+00 0.12609650D-02
+ 0.72000000D+02 0.75000000D+02 0.10967438D+00 0.10767455D-02
+ 0.75000000D+02 0.78000000D+02 0.99258833D-01 0.72756283D-03
+ 0.78000000D+02 0.81000000D+02 0.89392333D-01 0.68759834D-03
+ 0.81000000D+02 0.84000000D+02 0.79749419D-01 0.53118396D-03
+ 0.84000000D+02 0.87000000D+02 0.72960925D-01 0.50921045D-03
+ 0.87000000D+02 0.90000000D+02 0.65209610D-01 0.47278144D-03
+ 0.90000000D+02 0.93000000D+02 0.58372953D-01 0.53951934D-03
+ 0.93000000D+02 0.96000000D+02 0.53440731D-01 0.61673116D-03
+ 0.96000000D+02 0.99000000D+02 0.48219789D-01 0.54182775D-03
+ 0.99000000D+02 0.10200000D+03 0.44241938D-01 0.42219458D-03
+ 0.10200000D+03 0.10500000D+03 0.39702728D-01 0.49444614D-03
+ 0.10500000D+03 0.10800000D+03 0.35222063D-01 0.43488214D-03
+ 0.10800000D+03 0.11100000D+03 0.33432363D-01 0.37972362D-03
+ 0.11100000D+03 0.11400000D+03 0.29133988D-01 0.35720537D-03
+ 0.11400000D+03 0.11700000D+03 0.27330342D-01 0.34150368D-03
+ 0.11700000D+03 0.12000000D+03 0.23986707D-01 0.39872932D-03
+ 0.12000000D+03 0.12300000D+03 0.22601684D-01 0.33744636D-03
+ 0.12300000D+03 0.12600000D+03 0.20368159D-01 0.25855200D-03
+ 0.12600000D+03 0.12900000D+03 0.18550178D-01 0.19381113D-03
+ 0.12900000D+03 0.13200000D+03 0.17358710D-01 0.18626657D-03
+ 0.13200000D+03 0.13500000D+03 0.15190013D-01 0.18756286D-03
+ 0.13500000D+03 0.13800000D+03 0.14805926D-01 0.26810933D-03
+ 0.13800000D+03 0.14100000D+03 0.12933375D-01 0.27513645D-03
+ 0.14100000D+03 0.14400000D+03 0.11837474D-01 0.18846742D-03
+ 0.14400000D+03 0.14700000D+03 0.11045704D-01 0.15403413D-03
+ 0.14700000D+03 0.15000000D+03 0.99256349D-02 0.22902779D-03
+ 0.15000000D+03 0.15300000D+03 0.95030109D-02 0.26265784D-03
+ 0.15300000D+03 0.15600000D+03 0.84993336D-02 0.17725472D-03
+ 0.15600000D+03 0.15900000D+03 0.80673105D-02 0.15445992D-03
+ 0.15900000D+03 0.16200000D+03 0.71073610D-02 0.14352973D-03
+ 0.16200000D+03 0.16500000D+03 0.67175164D-02 0.11442983D-03
+ 0.16500000D+03 0.16800000D+03 0.62932176D-02 0.13224994D-03
+ 0.16800000D+03 0.17100000D+03 0.54639613D-02 0.12289263D-03
+ 0.17100000D+03 0.17400000D+03 0.52692125D-02 0.11390456D-03
+ 0.17400000D+03 0.17700000D+03 0.48282710D-02 0.10258218D-03
+ 0.17700000D+03 0.18000000D+03 0.46517091D-02 0.10056241D-03
+ 0.18000000D+03 0.18300000D+03 0.39891470D-02 0.10459739D-03
+ 0.18300000D+03 0.18600000D+03 0.37718673D-02 0.86000299D-04
+ 0.18600000D+03 0.18900000D+03 0.35846482D-02 0.85461928D-04
+ 0.18900000D+03 0.19200000D+03 0.32180893D-02 0.83006754D-04
+ 0.19200000D+03 0.19500000D+03 0.29712888D-02 0.68759537D-04
+ 0.19500000D+03 0.19800000D+03 0.28317006D-02 0.64496473D-04
+ 0.19800000D+03 0.20100000D+03 0.25401633D-02 0.68835341D-04
+ 0.20100000D+03 0.20400000D+03 0.24354063D-02 0.91116764D-04
+ 0.20400000D+03 0.20700000D+03 0.22366473D-02 0.84556687D-04
+ 0.20700000D+03 0.21000000D+03 0.20350372D-02 0.94192004D-04
+ 0.21000000D+03 0.21300000D+03 0.18639946D-02 0.95783227D-04
+ 0.21300000D+03 0.21600000D+03 0.18343147D-02 0.59194952D-04
+ 0.21600000D+03 0.21900000D+03 0.15961791D-02 0.78226982D-04
+ 0.21900000D+03 0.22200000D+03 0.16066673D-02 0.69125156D-04
+ 0.22200000D+03 0.22500000D+03 0.15653358D-02 0.86332765D-04
+ 0.22500000D+03 0.22800000D+03 0.11273442D-02 0.88101499D-04
+ 0.22800000D+03 0.23100000D+03 0.12405109D-02 0.39973731D-04
+ 0.23100000D+03 0.23400000D+03 0.11199379D-02 0.51980745D-04
+ 0.23400000D+03 0.23700000D+03 0.10950129D-02 0.47302215D-04
+ 0.23700000D+03 0.24000000D+03 0.10208998D-02 0.39939395D-04
+ 0.24000000D+03 0.24300000D+03 0.85977156D-03 0.43113348D-04
+ 0.24300000D+03 0.24600000D+03 0.85171934D-03 0.27297964D-04
+ 0.24600000D+03 0.24900000D+03 0.80428217D-03 0.21441689D-04
+ 0.24900000D+03 0.25200000D+03 0.74664365D-03 0.22325580D-04
+ 0.25200000D+03 0.25500000D+03 0.70089117D-03 0.23347350D-04
+ 0.25500000D+03 0.25800000D+03 0.63981382D-03 0.23685714D-04
+ 0.25800000D+03 0.26100000D+03 0.56493623D-03 0.22269208D-04
+ 0.26100000D+03 0.26400000D+03 0.56709183D-03 0.40205512D-04
+ 0.26400000D+03 0.26700000D+03 0.65507877D-03 0.11173186D-03
+ 0.26700000D+03 0.27000000D+03 0.35007874D-03 0.10641913D-03
+ 0.27000000D+03 0.27300000D+03 0.46816390D-03 0.19770544D-04
+ 0.27300000D+03 0.27600000D+03 0.44219544D-03 0.24656564D-04
+ 0.27600000D+03 0.27900000D+03 0.36215623D-03 0.24865734D-04
+ 0.27900000D+03 0.28200000D+03 0.39265469D-03 0.19185226D-04
+ 0.28200000D+03 0.28500000D+03 0.35149863D-03 0.30434368D-04
+ 0.28500000D+03 0.28800000D+03 0.27693327D-03 0.31676010D-04
+ 0.28800000D+03 0.29100000D+03 0.30609016D-03 0.18319804D-04
+ 0.29100000D+03 0.29400000D+03 0.31537934D-03 0.13769841D-04
+ 0.29400000D+03 0.29700000D+03 0.23569843D-03 0.13630698D-04
+ 0.29700000D+03 0.30000000D+03 0.24086038D-03 0.12358310D-04
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.19487225D+02 0.62195287D-02
+ 0.30000000D+01 0.60000000D+01 0.19118025D+02 0.96358313D-03
+ 0.60000000D+01 0.90000000D+01 0.69465910D+01 0.39722894D-03
+ 0.90000000D+01 0.12000000D+02 0.35423566D+01 0.22602132D-03
+ 0.12000000D+02 0.15000000D+02 0.21171118D+01 0.14552454D-03
+ 0.15000000D+02 0.18000000D+02 0.13898562D+01 0.10217671D-03
+ 0.18000000D+02 0.21000000D+02 0.97116613D+00 0.78237397D-04
+ 0.21000000D+02 0.24000000D+02 0.70965226D+00 0.61491747D-04
+ 0.24000000D+02 0.27000000D+02 0.53626934D+00 0.48361017D-04
+ 0.27000000D+02 0.30000000D+02 0.41608144D+00 0.39885602D-04
+ 0.30000000D+02 0.33000000D+02 0.32970471D+00 0.33100852D-04
+ 0.33000000D+02 0.36000000D+02 0.26594672D+00 0.27650919D-04
+ 0.36000000D+02 0.39000000D+02 0.21760311D+00 0.23562793D-04
+ 0.39000000D+02 0.42000000D+02 0.18030179D+00 0.20537362D-04
+ 0.42000000D+02 0.45000000D+02 0.15100332D+00 0.17635485D-04
+ 0.45000000D+02 0.48000000D+02 0.12767204D+00 0.15636292D-04
+ 0.48000000D+02 0.51000000D+02 0.10888107D+00 0.14076237D-04
+ 0.51000000D+02 0.54000000D+02 0.93515916D-01 0.12263035D-04
+ 0.54000000D+02 0.57000000D+02 0.80887243D-01 0.10796120D-04
+ 0.57000000D+02 0.60000000D+02 0.70344756D-01 0.98046296D-05
+ 0.60000000D+02 0.63000000D+02 0.61527554D-01 0.89360692D-05
+ 0.63000000D+02 0.66000000D+02 0.54079640D-01 0.80777147D-05
+ 0.66000000D+02 0.69000000D+02 0.47756974D-01 0.71834901D-05
+ 0.69000000D+02 0.72000000D+02 0.42360338D-01 0.66634671D-05
+ 0.72000000D+02 0.75000000D+02 0.37714463D-01 0.60928142D-05
+ 0.75000000D+02 0.78000000D+02 0.33693569D-01 0.55510850D-05
+ 0.78000000D+02 0.81000000D+02 0.30207357D-01 0.51499495D-05
+ 0.81000000D+02 0.84000000D+02 0.27171941D-01 0.46359057D-05
+ 0.84000000D+02 0.87000000D+02 0.24505006D-01 0.43375843D-05
+ 0.87000000D+02 0.90000000D+02 0.22169846D-01 0.40485939D-05
+ 0.90000000D+02 0.93000000D+02 0.20101347D-01 0.36582302D-05
+ 0.93000000D+02 0.96000000D+02 0.18273868D-01 0.34282853D-05
+ 0.96000000D+02 0.99000000D+02 0.16645584D-01 0.31903569D-05
+ 0.99000000D+02 0.10200000D+03 0.15205815D-01 0.29791092D-05
+ 0.10200000D+03 0.10500000D+03 0.13912170D-01 0.28378855D-05
+ 0.10500000D+03 0.10800000D+03 0.12749723D-01 0.26169853D-05
+ 0.10800000D+03 0.11100000D+03 0.11714062D-01 0.24197873D-05
+ 0.11100000D+03 0.11400000D+03 0.10782275D-01 0.23220429D-05
+ 0.11400000D+03 0.11700000D+03 0.99398860D-02 0.22072660D-05
+ 0.11700000D+03 0.12000000D+03 0.91774753D-02 0.20239067D-05
+ 0.12000000D+03 0.12300000D+03 0.84877313D-02 0.19014428D-05
+ 0.12300000D+03 0.12600000D+03 0.78529538D-02 0.18084184D-05
+ 0.12600000D+03 0.12900000D+03 0.72865524D-02 0.17036328D-05
+ 0.12900000D+03 0.13200000D+03 0.67643248D-02 0.16360356D-05
+ 0.13200000D+03 0.13500000D+03 0.62915129D-02 0.15360164D-05
+ 0.13500000D+03 0.13800000D+03 0.58553430D-02 0.14283981D-05
+ 0.13800000D+03 0.14100000D+03 0.54599025D-02 0.13589537D-05
+ 0.14100000D+03 0.14400000D+03 0.50963313D-02 0.12727218D-05
+ 0.14400000D+03 0.14700000D+03 0.47586104D-02 0.12250696D-05
+ 0.14700000D+03 0.15000000D+03 0.44514806D-02 0.11781029D-05
+ 0.15000000D+03 0.15300000D+03 0.41672826D-02 0.11098414D-05
+ 0.15300000D+03 0.15600000D+03 0.39048331D-02 0.10363374D-05
+ 0.15600000D+03 0.15900000D+03 0.36623485D-02 0.98327475D-06
+ 0.15900000D+03 0.16200000D+03 0.34390297D-02 0.94588178D-06
+ 0.16200000D+03 0.16500000D+03 0.32305381D-02 0.91521781D-06
+ 0.16500000D+03 0.16800000D+03 0.30392182D-02 0.84748299D-06
+ 0.16800000D+03 0.17100000D+03 0.28616600D-02 0.84268227D-06
+ 0.17100000D+03 0.17400000D+03 0.26949803D-02 0.78766950D-06
+ 0.17400000D+03 0.17700000D+03 0.25410861D-02 0.75312026D-06
+ 0.17700000D+03 0.18000000D+03 0.23978781D-02 0.73303513D-06
+ 0.18000000D+03 0.18300000D+03 0.22643520D-02 0.69532818D-06
+ 0.18300000D+03 0.18600000D+03 0.21397631D-02 0.66229505D-06
+ 0.18600000D+03 0.18900000D+03 0.20227427D-02 0.63436664D-06
+ 0.18900000D+03 0.19200000D+03 0.19150958D-02 0.60871653D-06
+ 0.19200000D+03 0.19500000D+03 0.18129902D-02 0.58634759D-06
+ 0.19500000D+03 0.19800000D+03 0.17180777D-02 0.58724727D-06
+ 0.19800000D+03 0.20100000D+03 0.16292381D-02 0.57035327D-06
+ 0.20100000D+03 0.20400000D+03 0.15451901D-02 0.54179674D-06
+ 0.20400000D+03 0.20700000D+03 0.14665810D-02 0.51990082D-06
+ 0.20700000D+03 0.21000000D+03 0.13924364D-02 0.46827539D-06
+ 0.21000000D+03 0.21300000D+03 0.13233406D-02 0.46521281D-06
+ 0.21300000D+03 0.21600000D+03 0.12576506D-02 0.43649483D-06
+ 0.21600000D+03 0.21900000D+03 0.11965800D-02 0.42407436D-06
+ 0.21900000D+03 0.22200000D+03 0.11391975D-02 0.52211052D-06
+ 0.22200000D+03 0.22500000D+03 0.10843573D-02 0.39364257D-06
+ 0.22500000D+03 0.22800000D+03 0.10340466D-02 0.38519495D-06
+ 0.22800000D+03 0.23100000D+03 0.98511430D-03 0.36672649D-06
+ 0.23100000D+03 0.23400000D+03 0.93911730D-03 0.35188704D-06
+ 0.23400000D+03 0.23700000D+03 0.89664684D-03 0.34167443D-06
+ 0.23700000D+03 0.24000000D+03 0.85547236D-03 0.32652267D-06
+ 0.24000000D+03 0.24300000D+03 0.81715602D-03 0.31493364D-06
+ 0.24300000D+03 0.24600000D+03 0.78009182D-03 0.30316308D-06
+ 0.24600000D+03 0.24900000D+03 0.74610727D-03 0.29856934D-06
+ 0.24900000D+03 0.25200000D+03 0.71314673D-03 0.28354478D-06
+ 0.25200000D+03 0.25500000D+03 0.68228526D-03 0.27267157D-06
+ 0.25500000D+03 0.25800000D+03 0.65261706D-03 0.26279084D-06
+ 0.25800000D+03 0.26100000D+03 0.62501269D-03 0.25623993D-06
+ 0.26100000D+03 0.26400000D+03 0.59825156D-03 0.25128906D-06
+ 0.26400000D+03 0.26700000D+03 0.57328070D-03 0.23475446D-06
+ 0.26700000D+03 0.27000000D+03 0.54941332D-03 0.23214575D-06
+ 0.27000000D+03 0.27300000D+03 0.52664857D-03 0.22508972D-06
+ 0.27300000D+03 0.27600000D+03 0.50543593D-03 0.22187032D-06
+ 0.27600000D+03 0.27900000D+03 0.48460818D-03 0.21637172D-06
+ 0.27900000D+03 0.28200000D+03 0.46484880D-03 0.20294622D-06
+ 0.28200000D+03 0.28500000D+03 0.44629280D-03 0.20029947D-06
+ 0.28500000D+03 0.28800000D+03 0.42853449D-03 0.19117720D-06
+ 0.28800000D+03 0.29100000D+03 0.41193685D-03 0.18930366D-06
+ 0.29100000D+03 0.29400000D+03 0.39558182D-03 0.18140432D-06
+ 0.29400000D+03 0.29700000D+03 0.38012428D-03 0.17623970D-06
+ 0.29700000D+03 0.30000000D+03 0.36577072D-03 0.16862551D-06
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX0-HH.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX0-HH.top
new file mode 100644
index 0000000000000000000000000000000000000000..5e40a1e1c65a0ae357a103c76fcda2db29a56a75
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX0-HH.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18382869D-05 0.53893007D-06
+ -.46000000D+01 -.45000000D+01 -.95804008D-04 0.35523986D-05
+ -.45000000D+01 -.44000000D+01 -.14124050D-03 0.73964222D-05
+ -.44000000D+01 -.43000000D+01 0.13641247D-02 0.25869503D-04
+ -.43000000D+01 -.42000000D+01 0.73786990D-02 0.83008636D-04
+ -.42000000D+01 -.41000000D+01 0.22712785D-01 0.21003390D-03
+ -.41000000D+01 -.40000000D+01 0.51971797D-01 0.45643350D-03
+ -.40000000D+01 -.39000000D+01 0.98867562D-01 0.86394980D-03
+ -.39000000D+01 -.38000000D+01 0.16164113D+00 0.14568444D-02
+ -.38000000D+01 -.37000000D+01 0.24334914D+00 0.20318661D-02
+ -.37000000D+01 -.36000000D+01 0.35525189D+00 0.28995392D-02
+ -.36000000D+01 -.35000000D+01 0.48630731D+00 0.33188235D-02
+ -.35000000D+01 -.34000000D+01 0.64764700D+00 0.40928402D-02
+ -.34000000D+01 -.33000000D+01 0.83268496D+00 0.67230801D-02
+ -.33000000D+01 -.32000000D+01 0.10323920D+01 0.61485543D-02
+ -.32000000D+01 -.31000000D+01 0.12674399D+01 0.64497616D-02
+ -.31000000D+01 -.30000000D+01 0.15368539D+01 0.75805231D-02
+ -.30000000D+01 -.29000000D+01 0.18516183D+01 0.82690834D-02
+ -.29000000D+01 -.28000000D+01 0.21513258D+01 0.11996209D-01
+ -.28000000D+01 -.27000000D+01 0.24862153D+01 0.10296470D-01
+ -.27000000D+01 -.26000000D+01 0.28501085D+01 0.11193468D-01
+ -.26000000D+01 -.25000000D+01 0.32406053D+01 0.14208859D-01
+ -.25000000D+01 -.24000000D+01 0.36541558D+01 0.11638175D-01
+ -.24000000D+01 -.23000000D+01 0.40757158D+01 0.25538377D-01
+ -.23000000D+01 -.22000000D+01 0.44535311D+01 0.13734049D-01
+ -.22000000D+01 -.21000000D+01 0.49079081D+01 0.16570661D-01
+ -.21000000D+01 -.20000000D+01 0.53659453D+01 0.15213068D-01
+ -.20000000D+01 -.19000000D+01 0.58220104D+01 0.17969613D-01
+ -.19000000D+01 -.18000000D+01 0.62125572D+01 0.17486875D-01
+ -.18000000D+01 -.17000000D+01 0.66391845D+01 0.21156631D-01
+ -.17000000D+01 -.16000000D+01 0.70748323D+01 0.19352979D-01
+ -.16000000D+01 -.15000000D+01 0.74090187D+01 0.20632179D-01
+ -.15000000D+01 -.14000000D+01 0.78394037D+01 0.27382991D-01
+ -.14000000D+01 -.13000000D+01 0.81844246D+01 0.18885103D-01
+ -.13000000D+01 -.12000000D+01 0.85273466D+01 0.25675416D-01
+ -.12000000D+01 -.11000000D+01 0.88540054D+01 0.19140285D-01
+ -.11000000D+01 -.10000000D+01 0.91404988D+01 0.20750379D-01
+ -.10000000D+01 -.90000000D+00 0.94032254D+01 0.21388206D-01
+ -.90000000D+00 -.80000000D+00 0.96264706D+01 0.20636419D-01
+ -.80000000D+00 -.70000000D+00 0.98911030D+01 0.21650393D-01
+ -.70000000D+00 -.60000000D+00 0.10041138D+02 0.22123078D-01
+ -.60000000D+00 -.50000000D+00 0.10219353D+02 0.23359880D-01
+ -.50000000D+00 -.40000000D+00 0.10364532D+02 0.20380195D-01
+ -.40000000D+00 -.30000000D+00 0.10471418D+02 0.22998007D-01
+ -.30000000D+00 -.20000000D+00 0.10572769D+02 0.22037583D-01
+ -.20000000D+00 -.10000000D+00 0.10599216D+02 0.21706309D-01
+ -.10000000D+00 0.18041124D-15 0.10642458D+02 0.21420248D-01
+ 0.70776718D-15 0.10000000D+00 0.10654483D+02 0.26402646D-01
+ 0.10000000D+00 0.20000000D+00 0.10608346D+02 0.21691819D-01
+ 0.20000000D+00 0.30000000D+00 0.10554739D+02 0.21345886D-01
+ 0.30000000D+00 0.40000000D+00 0.10481463D+02 0.22086707D-01
+ 0.40000000D+00 0.50000000D+00 0.10354597D+02 0.21382250D-01
+ 0.50000000D+00 0.60000000D+00 0.10237264D+02 0.21930869D-01
+ 0.60000000D+00 0.70000000D+00 0.10072814D+02 0.22378395D-01
+ 0.70000000D+00 0.80000000D+00 0.98481669D+01 0.22739042D-01
+ 0.80000000D+00 0.90000000D+00 0.96366292D+01 0.20630300D-01
+ 0.90000000D+00 0.10000000D+01 0.93925878D+01 0.20424880D-01
+ 0.10000000D+01 0.11000000D+01 0.91091224D+01 0.20478456D-01
+ 0.11000000D+01 0.12000000D+01 0.88077804D+01 0.19296636D-01
+ 0.12000000D+01 0.13000000D+01 0.85406280D+01 0.26088063D-01
+ 0.13000000D+01 0.14000000D+01 0.81475043D+01 0.20618655D-01
+ 0.14000000D+01 0.15000000D+01 0.77819376D+01 0.21356207D-01
+ 0.15000000D+01 0.16000000D+01 0.74237713D+01 0.19520739D-01
+ 0.16000000D+01 0.17000000D+01 0.70753063D+01 0.19847947D-01
+ 0.17000000D+01 0.18000000D+01 0.66128786D+01 0.17176636D-01
+ 0.18000000D+01 0.19000000D+01 0.62244199D+01 0.18154203D-01
+ 0.19000000D+01 0.20000000D+01 0.58018441D+01 0.15410751D-01
+ 0.20000000D+01 0.21000000D+01 0.53415342D+01 0.15210714D-01
+ 0.21000000D+01 0.22000000D+01 0.49339935D+01 0.15915280D-01
+ 0.22000000D+01 0.23000000D+01 0.44745011D+01 0.15221891D-01
+ 0.23000000D+01 0.24000000D+01 0.40477856D+01 0.14038711D-01
+ 0.24000000D+01 0.25000000D+01 0.36440198D+01 0.12990863D-01
+ 0.25000000D+01 0.26000000D+01 0.32645032D+01 0.12014985D-01
+ 0.26000000D+01 0.27000000D+01 0.28524200D+01 0.15203469D-01
+ 0.27000000D+01 0.28000000D+01 0.24903503D+01 0.98937660D-02
+ 0.28000000D+01 0.29000000D+01 0.21488698D+01 0.89959780D-02
+ 0.29000000D+01 0.30000000D+01 0.18267285D+01 0.85356555D-02
+ 0.30000000D+01 0.31000000D+01 0.15340793D+01 0.78459235D-02
+ 0.31000000D+01 0.32000000D+01 0.12693064D+01 0.67375982D-02
+ 0.32000000D+01 0.33000000D+01 0.10450786D+01 0.68904878D-02
+ 0.33000000D+01 0.34000000D+01 0.83109495D+00 0.52742026D-02
+ 0.34000000D+01 0.35000000D+01 0.64105411D+00 0.46291092D-02
+ 0.35000000D+01 0.36000000D+01 0.48287511D+00 0.34437799D-02
+ 0.36000000D+01 0.37000000D+01 0.35473277D+00 0.26417566D-02
+ 0.37000000D+01 0.38000000D+01 0.25009465D+00 0.20290455D-02
+ 0.38000000D+01 0.39000000D+01 0.16171140D+00 0.13800589D-02
+ 0.39000000D+01 0.40000000D+01 0.96765370D-01 0.89413458D-03
+ 0.40000000D+01 0.41000000D+01 0.51431947D-01 0.47097837D-03
+ 0.41000000D+01 0.42000000D+01 0.22401857D-01 0.20524729D-03
+ 0.42000000D+01 0.43000000D+01 0.74795274D-02 0.79167103D-04
+ 0.43000000D+01 0.44000000D+01 0.13704854D-02 0.28790839D-04
+ 0.44000000D+01 0.45000000D+01 -.13862004D-03 0.73827616D-05
+ 0.45000000D+01 0.46000000D+01 -.97279843D-04 0.35236119D-05
+ 0.46000000D+01 0.47000000D+01 -.18256443D-05 0.53753993D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18209400D-05 0.53892842D-06
+ -.46000000D+01 -.45000000D+01 -.92811795D-04 0.35520709D-05
+ -.45000000D+01 -.44000000D+01 -.13266834D-03 0.73952597D-05
+ -.44000000D+01 -.43000000D+01 0.12852048D-02 0.25854569D-04
+ -.43000000D+01 -.42000000D+01 0.68121205D-02 0.82896168D-04
+ -.42000000D+01 -.41000000D+01 0.20657002D-01 0.20953547D-03
+ -.41000000D+01 -.40000000D+01 0.46561046D-01 0.45532384D-03
+ -.40000000D+01 -.39000000D+01 0.87279615D-01 0.86187366D-03
+ -.39000000D+01 -.38000000D+01 0.14019858D+00 0.14520591D-02
+ -.38000000D+01 -.37000000D+01 0.20744861D+00 0.20226531D-02
+ -.37000000D+01 -.36000000D+01 0.29996960D+00 0.28922084D-02
+ -.36000000D+01 -.35000000D+01 0.40540925D+00 0.33057829D-02
+ -.35000000D+01 -.34000000D+01 0.53470536D+00 0.40745269D-02
+ -.34000000D+01 -.33000000D+01 0.68089190D+00 0.66760557D-02
+ -.33000000D+01 -.32000000D+01 0.83592239D+00 0.60933061D-02
+ -.32000000D+01 -.31000000D+01 0.10168701D+01 0.64218757D-02
+ -.31000000D+01 -.30000000D+01 0.12244000D+01 0.75554186D-02
+ -.30000000D+01 -.29000000D+01 0.14701525D+01 0.82191668D-02
+ -.29000000D+01 -.28000000D+01 0.16932902D+01 0.11950679D-01
+ -.28000000D+01 -.27000000D+01 0.19443489D+01 0.10239247D-01
+ -.27000000D+01 -.26000000D+01 0.22168810D+01 0.11124897D-01
+ -.26000000D+01 -.25000000D+01 0.25092807D+01 0.14100177D-01
+ -.25000000D+01 -.24000000D+01 0.28212437D+01 0.11545246D-01
+ -.24000000D+01 -.23000000D+01 0.31318420D+01 0.25478237D-01
+ -.23000000D+01 -.22000000D+01 0.33970557D+01 0.13600385D-01
+ -.22000000D+01 -.21000000D+01 0.37342147D+01 0.16475625D-01
+ -.21000000D+01 -.20000000D+01 0.40725819D+01 0.15115906D-01
+ -.20000000D+01 -.19000000D+01 0.44105623D+01 0.17722636D-01
+ -.19000000D+01 -.18000000D+01 0.46749676D+01 0.17172775D-01
+ -.18000000D+01 -.17000000D+01 0.49818174D+01 0.21023398D-01
+ -.17000000D+01 -.16000000D+01 0.53017761D+01 0.19283673D-01
+ -.16000000D+01 -.15000000D+01 0.55181666D+01 0.18895950D-01
+ -.15000000D+01 -.14000000D+01 0.58320926D+01 0.26092857D-01
+ -.14000000D+01 -.13000000D+01 0.60682220D+01 0.18787282D-01
+ -.13000000D+01 -.12000000D+01 0.63101437D+01 0.25569875D-01
+ -.12000000D+01 -.11000000D+01 0.65348415D+01 0.18963490D-01
+ -.11000000D+01 -.10000000D+01 0.67309919D+01 0.20588362D-01
+ -.10000000D+01 -.90000000D+00 0.69094299D+01 0.21262971D-01
+ -.90000000D+00 -.80000000D+00 0.70495233D+01 0.20421849D-01
+ -.80000000D+00 -.70000000D+00 0.72481258D+01 0.21425416D-01
+ -.70000000D+00 -.60000000D+00 0.73369402D+01 0.21934811D-01
+ -.60000000D+00 -.50000000D+00 0.74576533D+01 0.23120060D-01
+ -.50000000D+00 -.40000000D+00 0.75608386D+01 0.20098114D-01
+ -.40000000D+00 -.30000000D+00 0.76293647D+01 0.22913039D-01
+ -.30000000D+00 -.20000000D+00 0.77026247D+01 0.21920724D-01
+ -.20000000D+00 -.10000000D+00 0.77112710D+01 0.21589708D-01
+ -.10000000D+00 0.18041124D-15 0.77513662D+01 0.21088749D-01
+ 0.70776718D-15 0.10000000D+00 0.77519207D+01 0.26045151D-01
+ 0.10000000D+00 0.20000000D+00 0.77212283D+01 0.21516306D-01
+ 0.20000000D+00 0.30000000D+00 0.76852982D+01 0.21201979D-01
+ 0.30000000D+00 0.40000000D+00 0.76384418D+01 0.21993232D-01
+ 0.40000000D+00 0.50000000D+00 0.75517226D+01 0.21270834D-01
+ 0.50000000D+00 0.60000000D+00 0.74761571D+01 0.21808898D-01
+ 0.60000000D+00 0.70000000D+00 0.73596884D+01 0.21170417D-01
+ 0.70000000D+00 0.80000000D+00 0.72095670D+01 0.21665976D-01
+ 0.80000000D+00 0.90000000D+00 0.70640193D+01 0.20383230D-01
+ 0.90000000D+00 0.10000000D+01 0.68969191D+01 0.20188298D-01
+ 0.10000000D+01 0.11000000D+01 0.66976951D+01 0.20151051D-01
+ 0.11000000D+01 0.12000000D+01 0.64909939D+01 0.19082041D-01
+ 0.12000000D+01 0.13000000D+01 0.63224141D+01 0.26032298D-01
+ 0.13000000D+01 0.14000000D+01 0.60323368D+01 0.20461237D-01
+ 0.14000000D+01 0.15000000D+01 0.57774494D+01 0.21170481D-01
+ 0.15000000D+01 0.16000000D+01 0.55350890D+01 0.18654777D-01
+ 0.16000000D+01 0.17000000D+01 0.52952239D+01 0.18884469D-01
+ 0.17000000D+01 0.18000000D+01 0.49577719D+01 0.16960651D-01
+ 0.18000000D+01 0.19000000D+01 0.46885035D+01 0.18058862D-01
+ 0.19000000D+01 0.20000000D+01 0.43865989D+01 0.15293091D-01
+ 0.20000000D+01 0.21000000D+01 0.40496260D+01 0.14934357D-01
+ 0.21000000D+01 0.22000000D+01 0.37599271D+01 0.15729803D-01
+ 0.22000000D+01 0.23000000D+01 0.34187937D+01 0.14968319D-01
+ 0.23000000D+01 0.24000000D+01 0.31039438D+01 0.13760639D-01
+ 0.24000000D+01 0.25000000D+01 0.28072829D+01 0.12688650D-01
+ 0.25000000D+01 0.26000000D+01 0.25367692D+01 0.11678910D-01
+ 0.26000000D+01 0.27000000D+01 0.22177572D+01 0.15109656D-01
+ 0.27000000D+01 0.28000000D+01 0.19488726D+01 0.97837825D-02
+ 0.28000000D+01 0.29000000D+01 0.16901531D+01 0.89226590D-02
+ 0.29000000D+01 0.30000000D+01 0.14458518D+01 0.84811464D-02
+ 0.30000000D+01 0.31000000D+01 0.12217329D+01 0.78106026D-02
+ 0.31000000D+01 0.32000000D+01 0.10182118D+01 0.67065947D-02
+ 0.32000000D+01 0.33000000D+01 0.84784749D+00 0.68715301D-02
+ 0.33000000D+01 0.34000000D+01 0.67994495D+00 0.52601218D-02
+ 0.34000000D+01 0.35000000D+01 0.52830656D+00 0.46158566D-02
+ 0.35000000D+01 0.36000000D+01 0.40216672D+00 0.34320893D-02
+ 0.36000000D+01 0.37000000D+01 0.29931079D+00 0.26279428D-02
+ 0.37000000D+01 0.38000000D+01 0.21427978D+00 0.20195554D-02
+ 0.38000000D+01 0.39000000D+01 0.14025576D+00 0.13763779D-02
+ 0.39000000D+01 0.40000000D+01 0.85199574D-01 0.89219401D-03
+ 0.40000000D+01 0.41000000D+01 0.46020988D-01 0.46994739D-03
+ 0.41000000D+01 0.42000000D+01 0.20349586D-01 0.20479258D-03
+ 0.42000000D+01 0.43000000D+01 0.69133016D-02 0.79054599D-04
+ 0.43000000D+01 0.44000000D+01 0.12915981D-02 0.28774158D-04
+ 0.44000000D+01 0.45000000D+01 -.13013117D-03 0.73814949D-05
+ 0.45000000D+01 0.46000000D+01 -.94273561D-04 0.35232489D-05
+ 0.46000000D+01 0.47000000D+01 -.18084433D-05 0.53753827D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18292647D-05 0.53892922D-06
+ -.46000000D+01 -.45000000D+01 -.94186579D-04 0.35522258D-05
+ -.45000000D+01 -.44000000D+01 -.13628556D-03 0.73957704D-05
+ -.44000000D+01 -.43000000D+01 0.13209601D-02 0.25861498D-04
+ -.43000000D+01 -.42000000D+01 0.70570792D-02 0.82947787D-04
+ -.42000000D+01 -.41000000D+01 0.21520384D-01 0.20975056D-03
+ -.41000000D+01 -.40000000D+01 0.48775103D-01 0.45581630D-03
+ -.40000000D+01 -.39000000D+01 0.91902154D-01 0.86273736D-03
+ -.39000000D+01 -.38000000D+01 0.14855434D+00 0.14538805D-02
+ -.38000000D+01 -.37000000D+01 0.22110784D+00 0.20265944D-02
+ -.37000000D+01 -.36000000D+01 0.32056993D+00 0.28948382D-02
+ -.36000000D+01 -.35000000D+01 0.43490590D+00 0.33104155D-02
+ -.35000000D+01 -.34000000D+01 0.57512693D+00 0.40806067D-02
+ -.34000000D+01 -.33000000D+01 0.73419241D+00 0.66844007D-02
+ -.33000000D+01 -.32000000D+01 0.90407429D+00 0.61046255D-02
+ -.32000000D+01 -.31000000D+01 0.11023524D+01 0.64307297D-02
+ -.31000000D+01 -.30000000D+01 0.13295540D+01 0.75633529D-02
+ -.30000000D+01 -.29000000D+01 0.15968370D+01 0.82374457D-02
+ -.29000000D+01 -.28000000D+01 0.18435560D+01 0.11966824D-01
+ -.28000000D+01 -.27000000D+01 0.21201433D+01 0.10257242D-01
+ -.27000000D+01 -.26000000D+01 0.24202147D+01 0.11147003D-01
+ -.26000000D+01 -.25000000D+01 0.27416940D+01 0.14141313D-01
+ -.25000000D+01 -.24000000D+01 0.30838013D+01 0.11577865D-01
+ -.24000000D+01 -.23000000D+01 0.34261702D+01 0.25498229D-01
+ -.23000000D+01 -.22000000D+01 0.37240053D+01 0.13642923D-01
+ -.22000000D+01 -.21000000D+01 0.40947198D+01 0.16506757D-01
+ -.21000000D+01 -.20000000D+01 0.44668939D+01 0.15144055D-01
+ -.20000000D+01 -.19000000D+01 0.48381359D+01 0.17764876D-01
+ -.19000000D+01 -.18000000D+01 0.51369410D+01 0.17244629D-01
+ -.18000000D+01 -.17000000D+01 0.54768937D+01 0.21072810D-01
+ -.17000000D+01 -.16000000D+01 0.58284164D+01 0.19305762D-01
+ -.16000000D+01 -.15000000D+01 0.60766395D+01 0.19109289D-01
+ -.15000000D+01 -.14000000D+01 0.64209148D+01 0.26252339D-01
+ -.14000000D+01 -.13000000D+01 0.66863766D+01 0.18817105D-01
+ -.13000000D+01 -.12000000D+01 0.69552206D+01 0.25608756D-01
+ -.12000000D+01 -.11000000D+01 0.72060775D+01 0.19015174D-01
+ -.11000000D+01 -.10000000D+01 0.74259630D+01 0.20631615D-01
+ -.10000000D+01 -.90000000D+00 0.76263321D+01 0.21296233D-01
+ -.90000000D+00 -.80000000D+00 0.77873267D+01 0.20466511D-01
+ -.80000000D+00 -.70000000D+00 0.80031636D+01 0.21468658D-01
+ -.70000000D+00 -.60000000D+00 0.81076878D+01 0.21980125D-01
+ -.60000000D+00 -.50000000D+00 0.82428427D+01 0.23172540D-01
+ -.50000000D+00 -.40000000D+00 0.83564186D+01 0.20159957D-01
+ -.40000000D+00 -.30000000D+00 0.84349279D+01 0.22941577D-01
+ -.30000000D+00 -.20000000D+00 0.85153311D+01 0.21957546D-01
+ -.20000000D+00 -.10000000D+00 0.85281803D+01 0.21629447D-01
+ -.10000000D+00 0.18041124D-15 0.85694600D+01 0.21150706D-01
+ 0.70776718D-15 0.10000000D+00 0.85722002D+01 0.26115452D-01
+ 0.10000000D+00 0.20000000D+00 0.85385240D+01 0.21554620D-01
+ 0.20000000D+00 0.30000000D+00 0.84973030D+01 0.21234697D-01
+ 0.30000000D+00 0.40000000D+00 0.84441254D+01 0.22022608D-01
+ 0.40000000D+00 0.50000000D+00 0.83470672D+01 0.21309488D-01
+ 0.50000000D+00 0.60000000D+00 0.82614812D+01 0.21848079D-01
+ 0.60000000D+00 0.70000000D+00 0.81319209D+01 0.21301795D-01
+ 0.70000000D+00 0.80000000D+00 0.79637492D+01 0.21772007D-01
+ 0.80000000D+00 0.90000000D+00 0.78010066D+01 0.20423357D-01
+ 0.90000000D+00 0.10000000D+01 0.76143714D+01 0.20226476D-01
+ 0.10000000D+01 0.11000000D+01 0.73936111D+01 0.20229387D-01
+ 0.11000000D+01 0.12000000D+01 0.71615165D+01 0.19123273D-01
+ 0.12000000D+01 0.13000000D+01 0.69675673D+01 0.26051792D-01
+ 0.13000000D+01 0.14000000D+01 0.66502550D+01 0.20495630D-01
+ 0.14000000D+01 0.15000000D+01 0.63660385D+01 0.21216228D-01
+ 0.15000000D+01 0.16000000D+01 0.60925908D+01 0.18901147D-01
+ 0.16000000D+01 0.17000000D+01 0.58233476D+01 0.19169875D-01
+ 0.17000000D+01 0.18000000D+01 0.54524687D+01 0.17025596D-01
+ 0.18000000D+01 0.19000000D+01 0.51503045D+01 0.18083559D-01
+ 0.19000000D+01 0.20000000D+01 0.48150095D+01 0.15319930D-01
+ 0.20000000D+01 0.21000000D+01 0.44438370D+01 0.15000985D-01
+ 0.21000000D+01 0.22000000D+01 0.41203011D+01 0.15779187D-01
+ 0.22000000D+01 0.23000000D+01 0.37453968D+01 0.15036980D-01
+ 0.23000000D+01 0.24000000D+01 0.33985622D+01 0.13837820D-01
+ 0.24000000D+01 0.25000000D+01 0.30705419D+01 0.12727851D-01
+ 0.25000000D+01 0.26000000D+01 0.27684307D+01 0.11722888D-01
+ 0.26000000D+01 0.27000000D+01 0.24213744D+01 0.15140873D-01
+ 0.27000000D+01 0.28000000D+01 0.21245559D+01 0.98240384D-02
+ 0.28000000D+01 0.29000000D+01 0.18406322D+01 0.89394383D-02
+ 0.29000000D+01 0.30000000D+01 0.15724125D+01 0.84940066D-02
+ 0.30000000D+01 0.31000000D+01 0.13268357D+01 0.78229849D-02
+ 0.31000000D+01 0.32000000D+01 0.11038547D+01 0.67173973D-02
+ 0.32000000D+01 0.33000000D+01 0.91615762D+00 0.68785560D-02
+ 0.33000000D+01 0.34000000D+01 0.73311497D+00 0.52653020D-02
+ 0.34000000D+01 0.35000000D+01 0.56863763D+00 0.46206071D-02
+ 0.35000000D+01 0.36000000D+01 0.43162881D+00 0.34362993D-02
+ 0.36000000D+01 0.37000000D+01 0.31995031D+00 0.26330023D-02
+ 0.37000000D+01 0.38000000D+01 0.22790472D+00 0.20232975D-02
+ 0.38000000D+01 0.39000000D+01 0.14861003D+00 0.13779324D-02
+ 0.39000000D+01 0.40000000D+01 0.89817622D-01 0.89304364D-03
+ 0.40000000D+01 0.41000000D+01 0.48234758D-01 0.47039833D-03
+ 0.41000000D+01 0.42000000D+01 0.21211488D-01 0.20499243D-03
+ 0.42000000D+01 0.43000000D+01 0.71581628D-02 0.79106912D-04
+ 0.43000000D+01 0.44000000D+01 0.13273302D-02 0.28781942D-04
+ 0.44000000D+01 0.45000000D+01 -.13371149D-03 0.73820545D-05
+ 0.45000000D+01 0.46000000D+01 -.95654336D-04 0.35234185D-05
+ 0.46000000D+01 0.47000000D+01 -.18166978D-05 0.53753908D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18338186D-05 0.53892965D-06
+ -.46000000D+01 -.45000000D+01 -.94983496D-04 0.35523122D-05
+ -.45000000D+01 -.44000000D+01 -.13860523D-03 0.73960823D-05
+ -.44000000D+01 -.43000000D+01 0.13421193D-02 0.25865456D-04
+ -.43000000D+01 -.42000000D+01 0.72098367D-02 0.82977655D-04
+ -.42000000D+01 -.41000000D+01 0.22075486D-01 0.20988418D-03
+ -.41000000D+01 -.40000000D+01 0.50236012D-01 0.45611223D-03
+ -.40000000D+01 -.39000000D+01 0.95026512D-01 0.86329279D-03
+ -.39000000D+01 -.38000000D+01 0.15432217D+00 0.14551534D-02
+ -.38000000D+01 -.37000000D+01 0.23073150D+00 0.20290560D-02
+ -.37000000D+01 -.36000000D+01 0.33533454D+00 0.28966432D-02
+ -.36000000D+01 -.35000000D+01 0.45639120D+00 0.33137310D-02
+ -.35000000D+01 -.34000000D+01 0.60497777D+00 0.40852566D-02
+ -.34000000D+01 -.33000000D+01 0.77407726D+00 0.66932876D-02
+ -.33000000D+01 -.32000000D+01 0.95547761D+00 0.61155324D-02
+ -.32000000D+01 -.31000000D+01 0.11675260D+01 0.64376192D-02
+ -.31000000D+01 -.30000000D+01 0.14103966D+01 0.75695645D-02
+ -.30000000D+01 -.29000000D+01 0.16949811D+01 0.82502153D-02
+ -.29000000D+01 -.28000000D+01 0.19607946D+01 0.11978397D-01
+ -.28000000D+01 -.27000000D+01 0.22581265D+01 0.10271721D-01
+ -.27000000D+01 -.26000000D+01 0.25806829D+01 0.11164363D-01
+ -.26000000D+01 -.25000000D+01 0.29260968D+01 0.14170197D-01
+ -.25000000D+01 -.24000000D+01 0.32929591D+01 0.11600836D-01
+ -.24000000D+01 -.23000000D+01 0.36619023D+01 0.25513465D-01
+ -.23000000D+01 -.22000000D+01 0.39868541D+01 0.13675135D-01
+ -.22000000D+01 -.21000000D+01 0.43855236D+01 0.16528882D-01
+ -.21000000D+01 -.20000000D+01 0.47860408D+01 0.15166689D-01
+ -.20000000D+01 -.19000000D+01 0.51851567D+01 0.17815301D-01
+ -.19000000D+01 -.18000000D+01 0.55135299D+01 0.17313827D-01
+ -.18000000D+01 -.17000000D+01 0.58814121D+01 0.21106976D-01
+ -.17000000D+01 -.16000000D+01 0.62597239D+01 0.19322275D-01
+ -.16000000D+01 -.15000000D+01 0.65351625D+01 0.19445298D-01
+ -.15000000D+01 -.14000000D+01 0.69058989D+01 0.26500246D-01
+ -.14000000D+01 -.13000000D+01 0.71963829D+01 0.18839936D-01
+ -.13000000D+01 -.12000000D+01 0.74882890D+01 0.25633817D-01
+ -.12000000D+01 -.11000000D+01 0.77620154D+01 0.19054952D-01
+ -.11000000D+01 -.10000000D+01 0.80023851D+01 0.20668891D-01
+ -.10000000D+01 -.90000000D+00 0.82217797D+01 0.21323365D-01
+ -.90000000D+00 -.80000000D+00 0.84011661D+01 0.20509864D-01
+ -.80000000D+00 -.70000000D+00 0.86318662D+01 0.21513343D-01
+ -.70000000D+00 -.60000000D+00 0.87499871D+01 0.22020211D-01
+ -.60000000D+00 -.50000000D+00 0.88980462D+01 0.23228900D-01
+ -.50000000D+00 -.40000000D+00 0.90205721D+01 0.20224599D-01
+ -.40000000D+00 -.30000000D+00 0.91078675D+01 0.22962668D-01
+ -.30000000D+00 -.20000000D+00 0.91944574D+01 0.21985441D-01
+ -.20000000D+00 -.10000000D+00 0.92111653D+01 0.21658091D-01
+ -.10000000D+00 0.18041124D-15 0.92531560D+01 0.21220968D-01
+ 0.70776718D-15 0.10000000D+00 0.92583446D+01 0.26192630D-01
+ 0.10000000D+00 0.20000000D+00 0.92216326D+01 0.21587192D-01
+ 0.20000000D+00 0.30000000D+00 0.91759206D+01 0.21261049D-01
+ 0.30000000D+00 0.40000000D+00 0.91172286D+01 0.22044096D-01
+ 0.40000000D+00 0.50000000D+00 0.90112357D+01 0.21337094D-01
+ 0.50000000D+00 0.60000000D+00 0.89165273D+01 0.21877100D-01
+ 0.60000000D+00 0.70000000D+00 0.87761466D+01 0.21506381D-01
+ 0.70000000D+00 0.80000000D+00 0.85913730D+01 0.21945310D-01
+ 0.80000000D+00 0.90000000D+00 0.84140485D+01 0.20463289D-01
+ 0.90000000D+00 0.10000000D+01 0.82102282D+01 0.20266327D-01
+ 0.10000000D+01 0.11000000D+01 0.79707877D+01 0.20300683D-01
+ 0.11000000D+01 0.12000000D+01 0.77167131D+01 0.19161782D-01
+ 0.12000000D+01 0.13000000D+01 0.75008042D+01 0.26065608D-01
+ 0.13000000D+01 0.14000000D+01 0.71600386D+01 0.20529024D-01
+ 0.14000000D+01 0.15000000D+01 0.68505530D+01 0.21256875D-01
+ 0.15000000D+01 0.16000000D+01 0.65504230D+01 0.19133104D-01
+ 0.16000000D+01 0.17000000D+01 0.62562492D+01 0.19429299D-01
+ 0.17000000D+01 0.18000000D+01 0.58564839D+01 0.17078478D-01
+ 0.18000000D+01 0.19000000D+01 0.55265050D+01 0.18105818D-01
+ 0.19000000D+01 0.20000000D+01 0.51629130D+01 0.15346222D-01
+ 0.20000000D+01 0.21000000D+01 0.47627886D+01 0.15060682D-01
+ 0.21000000D+01 0.22000000D+01 0.44110620D+01 0.15818521D-01
+ 0.22000000D+01 0.23000000D+01 0.40079885D+01 0.15098698D-01
+ 0.23000000D+01 0.24000000D+01 0.36344050D+01 0.13905421D-01
+ 0.24000000D+01 0.25000000D+01 0.32805768D+01 0.12783043D-01
+ 0.25000000D+01 0.26000000D+01 0.29519817D+01 0.11784167D-01
+ 0.26000000D+01 0.27000000D+01 0.25821731D+01 0.15164591D-01
+ 0.27000000D+01 0.28000000D+01 0.22624538D+01 0.98526323D-02
+ 0.28000000D+01 0.29000000D+01 0.19580389D+01 0.89550811D-02
+ 0.29000000D+01 0.30000000D+01 0.16704288D+01 0.85056754D-02
+ 0.30000000D+01 0.31000000D+01 0.14076406D+01 0.78321618D-02
+ 0.31000000D+01 0.32000000D+01 0.11691549D+01 0.67256024D-02
+ 0.32000000D+01 0.33000000D+01 0.96774174D+00 0.68835041D-02
+ 0.33000000D+01 0.34000000D+01 0.77285662D+00 0.52689245D-02
+ 0.34000000D+01 0.35000000D+01 0.59843620D+00 0.46240311D-02
+ 0.35000000D+01 0.36000000D+01 0.45307444D+00 0.34393318D-02
+ 0.36000000D+01 0.37000000D+01 0.33474571D+00 0.26366647D-02
+ 0.37000000D+01 0.38000000D+01 0.23750593D+00 0.20258829D-02
+ 0.38000000D+01 0.39000000D+01 0.15438089D+00 0.13789162D-02
+ 0.39000000D+01 0.40000000D+01 0.92935966D-01 0.89356529D-03
+ 0.40000000D+01 0.41000000D+01 0.49695751D-01 0.47067465D-03
+ 0.41000000D+01 0.42000000D+01 0.21765619D-01 0.20511423D-03
+ 0.42000000D+01 0.43000000D+01 0.73108191D-02 0.79136676D-04
+ 0.43000000D+01 0.44000000D+01 0.13484818D-02 0.28786359D-04
+ 0.44000000D+01 0.45000000D+01 -.13600856D-03 0.73823941D-05
+ 0.45000000D+01 0.46000000D+01 -.96455074D-04 0.35235146D-05
+ 0.46000000D+01 0.47000000D+01 -.18212135D-05 0.53753951D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18359954D-05 0.53892985D-06
+ -.46000000D+01 -.45000000D+01 -.95377967D-04 0.35523541D-05
+ -.45000000D+01 -.44000000D+01 -.13983531D-03 0.73962429D-05
+ -.44000000D+01 -.43000000D+01 0.13526846D-02 0.25867404D-04
+ -.43000000D+01 -.42000000D+01 0.72893082D-02 0.82992503D-04
+ -.42000000D+01 -.41000000D+01 0.22371541D-01 0.20995415D-03
+ -.41000000D+01 -.40000000D+01 0.51032443D-01 0.45626385D-03
+ -.40000000D+01 -.39000000D+01 0.96766300D-01 0.86359362D-03
+ -.39000000D+01 -.38000000D+01 0.15759590D+00 0.14558946D-02
+ -.38000000D+01 -.37000000D+01 0.23630016D+00 0.20303582D-02
+ -.37000000D+01 -.36000000D+01 0.34401866D+00 0.28977525D-02
+ -.36000000D+01 -.35000000D+01 0.46924664D+00 0.33157728D-02
+ -.35000000D+01 -.34000000D+01 0.62309154D+00 0.40882853D-02
+ -.34000000D+01 -.33000000D+01 0.79862560D+00 0.67018631D-02
+ -.33000000D+01 -.32000000D+01 0.98739139D+00 0.61252906D-02
+ -.32000000D+01 -.31000000D+01 0.12084751D+01 0.64422250D-02
+ -.31000000D+01 -.30000000D+01 0.14616689D+01 0.75737172D-02
+ -.30000000D+01 -.29000000D+01 0.17577977D+01 0.82579212D-02
+ -.29000000D+01 -.28000000D+01 0.20364365D+01 0.11985595D-01
+ -.28000000D+01 -.27000000D+01 0.23478018D+01 0.10281451D-01
+ -.27000000D+01 -.26000000D+01 0.26856511D+01 0.11175729D-01
+ -.26000000D+01 -.25000000D+01 0.30475055D+01 0.14186913D-01
+ -.25000000D+01 -.24000000D+01 0.34313451D+01 0.11615021D-01
+ -.24000000D+01 -.23000000D+01 0.38188884D+01 0.25523109D-01
+ -.23000000D+01 -.22000000D+01 0.41626677D+01 0.13696520D-01
+ -.22000000D+01 -.21000000D+01 0.45808854D+01 0.16543424D-01
+ -.21000000D+01 -.20000000D+01 0.50013479D+01 0.15182744D-01
+ -.20000000D+01 -.19000000D+01 0.54200854D+01 0.17863477D-01
+ -.19000000D+01 -.18000000D+01 0.57697065D+01 0.17371570D-01
+ -.18000000D+01 -.17000000D+01 0.61574125D+01 0.21127080D-01
+ -.17000000D+01 -.16000000D+01 0.65548921D+01 0.19333094D-01
+ -.16000000D+01 -.15000000D+01 0.68498689D+01 0.19803471D-01
+ -.15000000D+01 -.14000000D+01 0.72400860D+01 0.26764861D-01
+ -.14000000D+01 -.13000000D+01 0.75485242D+01 0.18855505D-01
+ -.13000000D+01 -.12000000D+01 0.78570918D+01 0.25649099D-01
+ -.12000000D+01 -.11000000D+01 0.81476867D+01 0.19082871D-01
+ -.11000000D+01 -.10000000D+01 0.84029831D+01 0.20696432D-01
+ -.10000000D+01 -.90000000D+00 0.86362588D+01 0.21343140D-01
+ -.90000000D+00 -.80000000D+00 0.88293363D+01 0.20546104D-01
+ -.80000000D+00 -.70000000D+00 0.90708740D+01 0.21552647D-01
+ -.70000000D+00 -.60000000D+00 0.91989893D+01 0.22051798D-01
+ -.60000000D+00 -.50000000D+00 0.93566592D+01 0.23275218D-01
+ -.50000000D+00 -.40000000D+00 0.94858740D+01 0.20277712D-01
+ -.40000000D+00 -.30000000D+00 0.95795907D+01 0.22976022D-01
+ -.30000000D+00 -.20000000D+00 0.96707300D+01 0.22003927D-01
+ -.20000000D+00 -.10000000D+00 0.96904216D+01 0.21675836D-01
+ -.10000000D+00 0.18041124D-15 0.97327477D+01 0.21283293D-01
+ 0.70776718D-15 0.10000000D+00 0.97400554D+01 0.26259466D-01
+ 0.10000000D+00 0.20000000D+00 0.97008036D+01 0.21611221D-01
+ 0.20000000D+00 0.30000000D+00 0.96519642D+01 0.21279712D-01
+ 0.30000000D+00 0.40000000D+00 0.95891210D+01 0.22058348D-01
+ 0.40000000D+00 0.50000000D+00 0.94765782D+01 0.21354108D-01
+ 0.50000000D+00 0.60000000D+00 0.93748988D+01 0.21896183D-01
+ 0.60000000D+00 0.70000000D+00 0.92269378D+01 0.21743221D-01
+ 0.70000000D+00 0.80000000D+00 0.90294196D+01 0.22153788D-01
+ 0.80000000D+00 0.90000000D+00 0.88415719D+01 0.20501439D-01
+ 0.90000000D+00 0.10000000D+01 0.86249746D+01 0.20304763D-01
+ 0.10000000D+01 0.11000000D+01 0.83717758D+01 0.20352278D-01
+ 0.11000000D+01 0.12000000D+01 0.81018678D+01 0.19192152D-01
+ 0.12000000D+01 0.13000000D+01 0.78697852D+01 0.26074109D-01
+ 0.13000000D+01 0.14000000D+01 0.75120169D+01 0.20557327D-01
+ 0.14000000D+01 0.15000000D+01 0.71841662D+01 0.21288762D-01
+ 0.15000000D+01 0.16000000D+01 0.68648053D+01 0.19290410D-01
+ 0.16000000D+01 0.17000000D+01 0.65527222D+01 0.19601668D-01
+ 0.17000000D+01 0.18000000D+01 0.61320223D+01 0.17114635D-01
+ 0.18000000D+01 0.19000000D+01 0.57822816D+01 0.18122604D-01
+ 0.19000000D+01 0.20000000D+01 0.53985626D+01 0.15367902D-01
+ 0.20000000D+01 0.21000000D+01 0.49778578D+01 0.15107535D-01
+ 0.21000000D+01 0.22000000D+01 0.46064785D+01 0.15847519D-01
+ 0.22000000D+01 0.23000000D+01 0.41836693D+01 0.15143945D-01
+ 0.23000000D+01 0.24000000D+01 0.37913734D+01 0.13954301D-01
+ 0.24000000D+01 0.25000000D+01 0.34197198D+01 0.12842630D-01
+ 0.25000000D+01 0.26000000D+01 0.30726778D+01 0.11850404D-01
+ 0.26000000D+01 0.27000000D+01 0.26874204D+01 0.15179877D-01
+ 0.27000000D+01 0.28000000D+01 0.23520658D+01 0.98695745D-02
+ 0.28000000D+01 0.29000000D+01 0.20338011D+01 0.89682017D-02
+ 0.29000000D+01 0.30000000D+01 0.17331305D+01 0.85153687D-02
+ 0.30000000D+01 0.31000000D+01 0.14588978D+01 0.78378421D-02
+ 0.31000000D+01 0.32000000D+01 0.12101909D+01 0.67306670D-02
+ 0.32000000D+01 0.33000000D+01 0.99980531D+00 0.68864812D-02
+ 0.33000000D+01 0.34000000D+01 0.79728239D+00 0.52711184D-02
+ 0.34000000D+01 0.35000000D+01 0.61652445D+00 0.46261250D-02
+ 0.35000000D+01 0.36000000D+01 0.46589292D+00 0.34411945D-02
+ 0.36000000D+01 0.37000000D+01 0.34345297D+00 0.26388509D-02
+ 0.37000000D+01 0.38000000D+01 0.24306198D+00 0.20273254D-02
+ 0.38000000D+01 0.39000000D+01 0.15765855D+00 0.13794422D-02
+ 0.39000000D+01 0.40000000D+01 0.94671142D-01 0.89383424D-03
+ 0.40000000D+01 0.41000000D+01 0.50492334D-01 0.47081756D-03
+ 0.41000000D+01 0.42000000D+01 0.22061164D-01 0.20517700D-03
+ 0.42000000D+01 0.43000000D+01 0.73902240D-02 0.79151311D-04
+ 0.43000000D+01 0.44000000D+01 0.13590454D-02 0.28788520D-04
+ 0.44000000D+01 0.45000000D+01 -.13722723D-03 0.73825680D-05
+ 0.45000000D+01 0.46000000D+01 -.96851548D-04 0.35235616D-05
+ 0.46000000D+01 0.47000000D+01 -.18233720D-05 0.53753972D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18077991D-05 0.53892844D-06
+ -.46000000D+01 -.45000000D+01 -.90318119D-04 0.35521403D-05
+ -.45000000D+01 -.44000000D+01 -.12909489D-03 0.73956605D-05
+ -.44000000D+01 -.43000000D+01 0.11839860D-02 0.25861758D-04
+ -.43000000D+01 -.42000000D+01 0.61898868D-02 0.82953002D-04
+ -.42000000D+01 -.41000000D+01 0.18525645D-01 0.20968444D-03
+ -.41000000D+01 -.40000000D+01 0.41151908D-01 0.45585257D-03
+ -.40000000D+01 -.39000000D+01 0.76010087D-01 0.86281936D-03
+ -.39000000D+01 -.38000000D+01 0.11980306D+00 0.14537046D-02
+ -.38000000D+01 -.37000000D+01 0.17414231D+00 0.20332993D-02
+ -.37000000D+01 -.36000000D+01 0.24969613D+00 0.28959656D-02
+ -.36000000D+01 -.35000000D+01 0.33371298D+00 0.33110179D-02
+ -.35000000D+01 -.34000000D+01 0.43695367D+00 0.40806148D-02
+ -.34000000D+01 -.33000000D+01 0.55166433D+00 0.66836044D-02
+ -.33000000D+01 -.32000000D+01 0.67088308D+00 0.60998493D-02
+ -.32000000D+01 -.31000000D+01 0.81048920D+00 0.64342012D-02
+ -.31000000D+01 -.30000000D+01 0.97179625D+00 0.75703449D-02
+ -.30000000D+01 -.29000000D+01 0.11668688D+01 0.82295740D-02
+ -.29000000D+01 -.28000000D+01 0.13339190D+01 0.11960800D-01
+ -.28000000D+01 -.27000000D+01 0.15250411D+01 0.10258875D-01
+ -.27000000D+01 -.26000000D+01 0.17336525D+01 0.11139283D-01
+ -.26000000D+01 -.25000000D+01 0.19577229D+01 0.14137506D-01
+ -.25000000D+01 -.24000000D+01 0.21990630D+01 0.11558643D-01
+ -.24000000D+01 -.23000000D+01 0.24363173D+01 0.25487949D-01
+ -.23000000D+01 -.22000000D+01 0.26259066D+01 0.13614781D-01
+ -.22000000D+01 -.21000000D+01 0.28857531D+01 0.16488924D-01
+ -.21000000D+01 -.20000000D+01 0.31460795D+01 0.15133102D-01
+ -.20000000D+01 -.19000000D+01 0.34072044D+01 0.17731874D-01
+ -.19000000D+01 -.18000000D+01 0.35936655D+01 0.17169784D-01
+ -.18000000D+01 -.17000000D+01 0.38246811D+01 0.21027219D-01
+ -.17000000D+01 -.16000000D+01 0.40722010D+01 0.19302246D-01
+ -.16000000D+01 -.15000000D+01 0.42148749D+01 0.18833623D-01
+ -.15000000D+01 -.14000000D+01 0.44601575D+01 0.26048776D-01
+ -.14000000D+01 -.13000000D+01 0.46298978D+01 0.18810063D-01
+ -.13000000D+01 -.12000000D+01 0.48090491D+01 0.25632669D-01
+ -.12000000D+01 -.11000000D+01 0.49750429D+01 0.18980953D-01
+ -.11000000D+01 -.10000000D+01 0.51161321D+01 0.20601752D-01
+ -.10000000D+01 -.90000000D+00 0.52440682D+01 0.21288364D-01
+ -.90000000D+00 -.80000000D+00 0.53378637D+01 0.20451479D-01
+ -.80000000D+00 -.70000000D+00 0.54955155D+01 0.21440387D-01
+ -.70000000D+00 -.60000000D+00 0.55478077D+01 0.21956116D-01
+ -.60000000D+00 -.50000000D+00 0.56366470D+01 0.23107919D-01
+ -.50000000D+00 -.40000000D+00 0.57145886D+01 0.20109645D-01
+ -.40000000D+00 -.30000000D+00 0.57615277D+01 0.22931253D-01
+ -.30000000D+00 -.20000000D+00 0.58194149D+01 0.21942773D-01
+ -.20000000D+00 -.10000000D+00 0.58169338D+01 0.21609472D-01
+ -.10000000D+00 0.18041124D-15 0.58527869D+01 0.21100439D-01
+ 0.70776718D-15 0.10000000D+00 0.58521421D+01 0.26039851D-01
+ 0.10000000D+00 0.20000000D+00 0.58268044D+01 0.21534551D-01
+ 0.20000000D+00 0.30000000D+00 0.58014935D+01 0.21223497D-01
+ 0.30000000D+00 0.40000000D+00 0.57702412D+01 0.22012787D-01
+ 0.40000000D+00 0.50000000D+00 0.57047929D+01 0.21297754D-01
+ 0.50000000D+00 0.60000000D+00 0.56554802D+01 0.21832313D-01
+ 0.60000000D+00 0.70000000D+00 0.55692283D+01 0.21147078D-01
+ 0.70000000D+00 0.80000000D+00 0.54573324D+01 0.21651758D-01
+ 0.80000000D+00 0.90000000D+00 0.53524513D+01 0.20413873D-01
+ 0.90000000D+00 0.10000000D+01 0.52312631D+01 0.20204046D-01
+ 0.10000000D+01 0.11000000D+01 0.50829611D+01 0.20141120D-01
+ 0.11000000D+01 0.12000000D+01 0.49308939D+01 0.19111036D-01
+ 0.12000000D+01 0.13000000D+01 0.48215293D+01 0.26046057D-01
+ 0.13000000D+01 0.14000000D+01 0.45941311D+01 0.20476647D-01
+ 0.14000000D+01 0.15000000D+01 0.44046340D+01 0.21193612D-01
+ 0.15000000D+01 0.16000000D+01 0.42331963D+01 0.18575114D-01
+ 0.16000000D+01 0.17000000D+01 0.40629276D+01 0.18774660D-01
+ 0.17000000D+01 0.18000000D+01 0.38003924D+01 0.16972456D-01
+ 0.18000000D+01 0.19000000D+01 0.36075434D+01 0.18081411D-01
+ 0.19000000D+01 0.20000000D+01 0.33825640D+01 0.15314446D-01
+ 0.20000000D+01 0.21000000D+01 0.31237835D+01 0.14932877D-01
+ 0.21000000D+01 0.22000000D+01 0.29121465D+01 0.15740644D-01
+ 0.22000000D+01 0.23000000D+01 0.26477024D+01 0.14964732D-01
+ 0.23000000D+01 0.24000000D+01 0.24083489D+01 0.13757858D-01
+ 0.24000000D+01 0.25000000D+01 0.21849168D+01 0.12694120D-01
+ 0.25000000D+01 0.26000000D+01 0.19863227D+01 0.11687907D-01
+ 0.26000000D+01 0.27000000D+01 0.17339754D+01 0.15113840D-01
+ 0.27000000D+01 0.28000000D+01 0.15294227D+01 0.97889131D-02
+ 0.28000000D+01 0.29000000D+01 0.13306927D+01 0.89321905D-02
+ 0.29000000D+01 0.30000000D+01 0.11423049D+01 0.84912043D-02
+ 0.30000000D+01 0.31000000D+01 0.96934461D+00 0.78206084D-02
+ 0.31000000D+01 0.32000000D+01 0.81191127D+00 0.67155516D-02
+ 0.32000000D+01 0.33000000D+01 0.68281976D+00 0.68802144D-02
+ 0.33000000D+01 0.34000000D+01 0.55091776D+00 0.52666890D-02
+ 0.34000000D+01 0.35000000D+01 0.43045915D+00 0.46212043D-02
+ 0.35000000D+01 0.36000000D+01 0.33052235D+00 0.34379036D-02
+ 0.36000000D+01 0.37000000D+01 0.24901252D+00 0.26310122D-02
+ 0.37000000D+01 0.38000000D+01 0.18103761D+00 0.20213326D-02
+ 0.38000000D+01 0.39000000D+01 0.11985630D+00 0.13780430D-02
+ 0.39000000D+01 0.40000000D+01 0.73912688D-01 0.89304928D-03
+ 0.40000000D+01 0.41000000D+01 0.40601825D-01 0.47064822D-03
+ 0.41000000D+01 0.42000000D+01 0.18216083D-01 0.20497351D-03
+ 0.42000000D+01 0.43000000D+01 0.62886341D-02 0.79143530D-04
+ 0.43000000D+01 0.44000000D+01 0.11904489D-02 0.28783304D-04
+ 0.44000000D+01 0.45000000D+01 -.12654432D-03 0.73819128D-05
+ 0.45000000D+01 0.46000000D+01 -.91767147D-04 0.35232951D-05
+ 0.46000000D+01 0.47000000D+01 -.17953880D-05 0.53753833D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18301799D-05 0.53892966D-06
+ -.46000000D+01 -.45000000D+01 -.94183214D-04 0.35523311D-05
+ -.45000000D+01 -.44000000D+01 -.13695356D-03 0.73962000D-05
+ -.44000000D+01 -.43000000D+01 0.13075524D-02 0.25867522D-04
+ -.43000000D+01 -.42000000D+01 0.69766638D-02 0.82993905D-04
+ -.42000000D+01 -.41000000D+01 0.21227575D-01 0.20992274D-03
+ -.41000000D+01 -.40000000D+01 0.47979990D-01 0.45625874D-03
+ -.40000000D+01 -.39000000D+01 0.90117151D-01 0.86354782D-03
+ -.39000000D+01 -.38000000D+01 0.14510247D+00 0.14554531D-02
+ -.38000000D+01 -.37000000D+01 0.21512913D+00 0.20320294D-02
+ -.37000000D+01 -.36000000D+01 0.31108072D+00 0.28975598D-02
+ -.36000000D+01 -.35000000D+01 0.42083095D+00 0.33148212D-02
+ -.35000000D+01 -.34000000D+01 0.55536886D+00 0.40857655D-02
+ -.34000000D+01 -.33000000D+01 0.70717661D+00 0.66909389D-02
+ -.33000000D+01 -.32000000D+01 0.86878466D+00 0.61120788D-02
+ -.32000000D+01 -.31000000D+01 0.10573280D+01 0.64389852D-02
+ -.31000000D+01 -.30000000D+01 0.12736707D+01 0.75730368D-02
+ -.30000000D+01 -.29000000D+01 0.15287323D+01 0.82515747D-02
+ -.29000000D+01 -.28000000D+01 0.17617025D+01 0.11979611D-01
+ -.28000000D+01 -.27000000D+01 0.20235472D+01 0.10274304D-01
+ -.27000000D+01 -.26000000D+01 0.23079307D+01 0.11163920D-01
+ -.26000000D+01 -.25000000D+01 0.26123133D+01 0.14186033D-01
+ -.25000000D+01 -.24000000D+01 0.29366667D+01 0.11600282D-01
+ -.24000000D+01 -.23000000D+01 0.32603125D+01 0.25514336D-01
+ -.23000000D+01 -.22000000D+01 0.35392654D+01 0.13674164D-01
+ -.22000000D+01 -.21000000D+01 0.38902864D+01 0.16528162D-01
+ -.21000000D+01 -.20000000D+01 0.42424994D+01 0.15165280D-01
+ -.20000000D+01 -.19000000D+01 0.45939681D+01 0.17786527D-01
+ -.19000000D+01 -.18000000D+01 0.48725481D+01 0.17280645D-01
+ -.18000000D+01 -.17000000D+01 0.51929232D+01 0.21105263D-01
+ -.17000000D+01 -.16000000D+01 0.55252565D+01 0.19324685D-01
+ -.16000000D+01 -.15000000D+01 0.57541064D+01 0.19168956D-01
+ -.15000000D+01 -.14000000D+01 0.60800582D+01 0.26300630D-01
+ -.14000000D+01 -.13000000D+01 0.63281238D+01 0.18841103D-01
+ -.13000000D+01 -.12000000D+01 0.65800173D+01 0.25650644D-01
+ -.12000000D+01 -.11000000D+01 0.68152623D+01 0.19051742D-01
+ -.11000000D+01 -.10000000D+01 0.70202271D+01 0.20658918D-01
+ -.10000000D+01 -.90000000D+00 0.72067602D+01 0.21324250D-01
+ -.90000000D+00 -.80000000D+00 0.73554761D+01 0.20499151D-01
+ -.80000000D+00 -.70000000D+00 0.75597748D+01 0.21493825D-01
+ -.70000000D+00 -.60000000D+00 0.76540359D+01 0.22012509D-01
+ -.60000000D+00 -.50000000D+00 0.77807878D+01 0.23192504D-01
+ -.50000000D+00 -.40000000D+00 0.78869214D+01 0.20198289D-01
+ -.40000000D+00 -.30000000D+00 0.79599217D+01 0.22963548D-01
+ -.30000000D+00 -.20000000D+00 0.80364152D+01 0.21987427D-01
+ -.20000000D+00 -.10000000D+00 0.80456503D+01 0.21657313D-01
+ -.10000000D+00 0.18041124D-15 0.80855200D+01 0.21185993D-01
+ 0.70776718D-15 0.10000000D+00 0.80888854D+01 0.26148173D-01
+ 0.10000000D+00 0.20000000D+00 0.80564164D+01 0.21581200D-01
+ 0.20000000D+00 0.30000000D+00 0.80176464D+01 0.21260089D-01
+ 0.30000000D+00 0.40000000D+00 0.79689960D+01 0.22043310D-01
+ 0.40000000D+00 0.50000000D+00 0.78770958D+01 0.21343263D-01
+ 0.50000000D+00 0.60000000D+00 0.77998218D+01 0.21878432D-01
+ 0.60000000D+00 0.70000000D+00 0.76784464D+01 0.21333228D-01
+ 0.70000000D+00 0.80000000D+00 0.75201571D+01 0.21799658D-01
+ 0.80000000D+00 0.90000000D+00 0.73685593D+01 0.20454748D-01
+ 0.90000000D+00 0.10000000D+01 0.71949745D+01 0.20247752D-01
+ 0.10000000D+01 0.11000000D+01 0.69884178D+01 0.20268532D-01
+ 0.11000000D+01 0.12000000D+01 0.67700735D+01 0.19157806D-01
+ 0.12000000D+01 0.13000000D+01 0.65923205D+01 0.26069226D-01
+ 0.13000000D+01 0.14000000D+01 0.62918636D+01 0.20518442D-01
+ 0.14000000D+01 0.15000000D+01 0.60248353D+01 0.21250919D-01
+ 0.15000000D+01 0.16000000D+01 0.57699580D+01 0.19028562D-01
+ 0.16000000D+01 0.17000000D+01 0.55197512D+01 0.19308268D-01
+ 0.17000000D+01 0.18000000D+01 0.51681629D+01 0.17067205D-01
+ 0.18000000D+01 0.19000000D+01 0.48861490D+01 0.18105240D-01
+ 0.19000000D+01 0.20000000D+01 0.45708611D+01 0.15340959D-01
+ 0.20000000D+01 0.21000000D+01 0.42197586D+01 0.15035346D-01
+ 0.21000000D+01 0.22000000D+01 0.39159638D+01 0.15811472D-01
+ 0.22000000D+01 0.23000000D+01 0.35603025D+01 0.15076994D-01
+ 0.23000000D+01 0.24000000D+01 0.32330864D+01 0.13879596D-01
+ 0.24000000D+01 0.25000000D+01 0.29235971D+01 0.12744094D-01
+ 0.25000000D+01 0.26000000D+01 0.26391112D+01 0.11744111D-01
+ 0.26000000D+01 0.27000000D+01 0.23089599D+01 0.15160974D-01
+ 0.27000000D+01 0.28000000D+01 0.20278528D+01 0.98501150D-02
+ 0.28000000D+01 0.29000000D+01 0.17588267D+01 0.89515271D-02
+ 0.29000000D+01 0.30000000D+01 0.15041316D+01 0.85046199D-02
+ 0.30000000D+01 0.31000000D+01 0.12709824D+01 0.78329392D-02
+ 0.31000000D+01 0.32000000D+01 0.10589190D+01 0.67263757D-02
+ 0.32000000D+01 0.33000000D+01 0.88095969D+00 0.68855386D-02
+ 0.33000000D+01 0.34000000D+01 0.70613917D+00 0.52699628D-02
+ 0.34000000D+01 0.35000000D+01 0.54882785D+00 0.46251484D-02
+ 0.35000000D+01 0.36000000D+01 0.41759230D+00 0.34406100D-02
+ 0.36000000D+01 0.37000000D+01 0.31046277D+00 0.26369938D-02
+ 0.37000000D+01 0.38000000D+01 0.22193232D+00 0.20260816D-02
+ 0.38000000D+01 0.39000000D+01 0.14514605D+00 0.13792769D-02
+ 0.39000000D+01 0.40000000D+01 0.88022698D-01 0.89377787D-03
+ 0.40000000D+01 0.41000000D+01 0.47434488D-01 0.47089266D-03
+ 0.41000000D+01 0.42000000D+01 0.20917358D-01 0.20516368D-03
+ 0.42000000D+01 0.43000000D+01 0.70768030D-02 0.79160844D-04
+ 0.43000000D+01 0.44000000D+01 0.13139658D-02 0.28789035D-04
+ 0.44000000D+01 0.45000000D+01 -.13434838D-03 0.73825036D-05
+ 0.45000000D+01 0.46000000D+01 -.95650787D-04 0.35235262D-05
+ 0.46000000D+01 0.47000000D+01 -.18175968D-05 0.53753952D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18346309D-05 0.53892988D-06
+ -.46000000D+01 -.45000000D+01 -.95050652D-04 0.35523684D-05
+ -.45000000D+01 -.44000000D+01 -.13913065D-03 0.73963204D-05
+ -.44000000D+01 -.43000000D+01 0.13372645D-02 0.25868613D-04
+ -.43000000D+01 -.42000000D+01 0.71819819D-02 0.83001919D-04
+ -.42000000D+01 -.41000000D+01 0.21970201D-01 0.20998047D-03
+ -.41000000D+01 -.40000000D+01 0.49937171D-01 0.45634867D-03
+ -.40000000D+01 -.39000000D+01 0.94321418D-01 0.86374617D-03
+ -.39000000D+01 -.38000000D+01 0.15289632D+00 0.14560805D-02
+ -.38000000D+01 -.37000000D+01 0.22816446D+00 0.20318781D-02
+ -.37000000D+01 -.36000000D+01 0.33111537D+00 0.28981852D-02
+ -.36000000D+01 -.35000000D+01 0.44995185D+00 0.33163478D-02
+ -.35000000D+01 -.34000000D+01 0.59573061D+00 0.40883749D-02
+ -.34000000D+01 -.33000000D+01 0.76115001D+00 0.66978848D-02
+ -.33000000D+01 -.32000000D+01 0.93823061D+00 0.61207514D-02
+ -.32000000D+01 -.31000000D+01 0.11452053D+01 0.64424129D-02
+ -.31000000D+01 -.30000000D+01 0.13823283D+01 0.75756014D-02
+ -.30000000D+01 -.29000000D+01 0.16603276D+01 0.82587331D-02
+ -.29000000D+01 -.28000000D+01 0.19186686D+01 0.11986227D-01
+ -.28000000D+01 -.27000000D+01 0.22079001D+01 0.10282254D-01
+ -.27000000D+01 -.26000000D+01 0.25217955D+01 0.11174990D-01
+ -.26000000D+01 -.25000000D+01 0.28576795D+01 0.14197072D-01
+ -.25000000D+01 -.24000000D+01 0.32145600D+01 0.11614330D-01
+ -.24000000D+01 -.23000000D+01 0.35729010D+01 0.25524162D-01
+ -.23000000D+01 -.22000000D+01 0.38872275D+01 0.13695578D-01
+ -.22000000D+01 -.21000000D+01 0.42746029D+01 0.16542070D-01
+ -.21000000D+01 -.20000000D+01 0.46636862D+01 0.15180196D-01
+ -.20000000D+01 -.19000000D+01 0.50513329D+01 0.17836658D-01
+ -.19000000D+01 -.18000000D+01 0.53681897D+01 0.17344256D-01
+ -.18000000D+01 -.17000000D+01 0.57246399D+01 0.21127914D-01
+ -.17000000D+01 -.16000000D+01 0.60915459D+01 0.19333869D-01
+ -.16000000D+01 -.15000000D+01 0.63557157D+01 0.19554190D-01
+ -.15000000D+01 -.14000000D+01 0.67156839D+01 0.26583735D-01
+ -.14000000D+01 -.13000000D+01 0.69958560D+01 0.18854629D-01
+ -.13000000D+01 -.12000000D+01 0.72776851D+01 0.25655709D-01
+ -.12000000D+01 -.11000000D+01 0.75421252D+01 0.19078732D-01
+ -.11000000D+01 -.10000000D+01 0.77736193D+01 0.20687773D-01
+ -.10000000D+01 -.90000000D+00 0.79847205D+01 0.21342091D-01
+ -.90000000D+00 -.80000000D+00 0.81568160D+01 0.20533668D-01
+ -.80000000D+00 -.70000000D+00 0.83804787D+01 0.21533099D-01
+ -.70000000D+00 -.60000000D+00 0.84923361D+01 0.22042093D-01
+ -.60000000D+00 -.50000000D+00 0.86354980D+01 0.23250107D-01
+ -.50000000D+00 -.40000000D+00 0.87533017D+01 0.20258545D-01
+ -.40000000D+00 -.30000000D+00 0.88374005D+01 0.22976690D-01
+ -.30000000D+00 -.20000000D+00 0.89216697D+01 0.22003977D-01
+ -.20000000D+00 -.10000000D+00 0.89361417D+01 0.21675131D-01
+ -.10000000D+00 0.18041124D-15 0.89771275D+01 0.21253863D-01
+ 0.70776718D-15 0.10000000D+00 0.89830517D+01 0.26223892D-01
+ 0.10000000D+00 0.20000000D+00 0.89469484D+01 0.21605008D-01
+ 0.20000000D+00 0.30000000D+00 0.89026091D+01 0.21277545D-01
+ 0.30000000D+00 0.40000000D+00 0.88467438D+01 0.22056323D-01
+ 0.40000000D+00 0.50000000D+00 0.87438246D+01 0.21358503D-01
+ 0.50000000D+00 0.60000000D+00 0.86542048D+01 0.21895730D-01
+ 0.60000000D+00 0.70000000D+00 0.85189782D+01 0.21559346D-01
+ 0.70000000D+00 0.80000000D+00 0.83396670D+01 0.21992449D-01
+ 0.80000000D+00 0.90000000D+00 0.81692279D+01 0.20484536D-01
+ 0.90000000D+00 0.10000000D+01 0.79733075D+01 0.20281474D-01
+ 0.10000000D+01 0.11000000D+01 0.77424322D+01 0.20332849D-01
+ 0.11000000D+01 0.12000000D+01 0.74963685D+01 0.19185564D-01
+ 0.12000000D+01 0.13000000D+01 0.72901559D+01 0.26076971D-01
+ 0.13000000D+01 0.14000000D+01 0.69594126D+01 0.20545981D-01
+ 0.14000000D+01 0.15000000D+01 0.66601331D+01 0.21280709D-01
+ 0.15000000D+01 0.16000000D+01 0.63708144D+01 0.19243367D-01
+ 0.16000000D+01 0.17000000D+01 0.60880563D+01 0.19548799D-01
+ 0.17000000D+01 0.18000000D+01 0.56993928D+01 0.17107429D-01
+ 0.18000000D+01 0.19000000D+01 0.53812036D+01 0.18120873D-01
+ 0.19000000D+01 0.20000000D+01 0.50292226D+01 0.15361556D-01
+ 0.20000000D+01 0.21000000D+01 0.46406159D+01 0.15087333D-01
+ 0.21000000D+01 0.22000000D+01 0.43001922D+01 0.15840002D-01
+ 0.22000000D+01 0.23000000D+01 0.39080724D+01 0.15130236D-01
+ 0.23000000D+01 0.24000000D+01 0.35456667D+01 0.13937702D-01
+ 0.24000000D+01 0.25000000D+01 0.32023986D+01 0.12802088D-01
+ 0.25000000D+01 0.26000000D+01 0.28834340D+01 0.11807897D-01
+ 0.26000000D+01 0.27000000D+01 0.25232448D+01 0.15177992D-01
+ 0.27000000D+01 0.28000000D+01 0.22121703D+01 0.98690809D-02
+ 0.28000000D+01 0.29000000D+01 0.19159492D+01 0.89635324D-02
+ 0.29000000D+01 0.30000000D+01 0.16356459D+01 0.85130385D-02
+ 0.30000000D+01 0.31000000D+01 0.13795722D+01 0.78381987D-02
+ 0.31000000D+01 0.32000000D+01 0.11468743D+01 0.67312569D-02
+ 0.32000000D+01 0.33000000D+01 0.95058406D+00 0.68876002D-02
+ 0.33000000D+01 0.34000000D+01 0.75993527D+00 0.52715468D-02
+ 0.34000000D+01 0.35000000D+01 0.58916847D+00 0.46267232D-02
+ 0.35000000D+01 0.36000000D+01 0.44665596D+00 0.34418451D-02
+ 0.36000000D+01 0.37000000D+01 0.33052682D+00 0.26391238D-02
+ 0.37000000D+01 0.38000000D+01 0.23494160D+00 0.20275483D-02
+ 0.38000000D+01 0.39000000D+01 0.15294871D+00 0.13796499D-02
+ 0.39000000D+01 0.40000000D+01 0.92224605D-01 0.89395974D-03
+ 0.40000000D+01 0.41000000D+01 0.49394197D-01 0.47093995D-03
+ 0.41000000D+01 0.42000000D+01 0.21659638D-01 0.20520810D-03
+ 0.42000000D+01 0.43000000D+01 0.72824700D-02 0.79164242D-04
+ 0.43000000D+01 0.44000000D+01 0.13436544D-02 0.28790048D-04
+ 0.44000000D+01 0.45000000D+01 -.13651629D-03 0.73826403D-05
+ 0.45000000D+01 0.46000000D+01 -.96522656D-04 0.35235731D-05
+ 0.46000000D+01 0.47000000D+01 -.18220147D-05 0.53753975D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18362187D-05 0.53892997D-06
+ -.46000000D+01 -.45000000D+01 -.95372410D-04 0.35523816D-05
+ -.45000000D+01 -.44000000D+01 -.14000296D-03 0.73963644D-05
+ -.44000000D+01 -.43000000D+01 0.13485676D-02 0.25868999D-04
+ -.43000000D+01 -.42000000D+01 0.72631338D-02 0.83004815D-04
+ -.42000000D+01 -.41000000D+01 0.22271670D-01 0.21000275D-03
+ -.41000000D+01 -.40000000D+01 0.50750410D-01 0.45638361D-03
+ -.40000000D+01 -.39000000D+01 0.96108683D-01 0.86382788D-03
+ -.39000000D+01 -.38000000D+01 0.15627806D+00 0.14563707D-02
+ -.38000000D+01 -.37000000D+01 0.23393642D+00 0.20318554D-02
+ -.37000000D+01 -.36000000D+01 0.34014076D+00 0.28985529D-02
+ -.36000000D+01 -.35000000D+01 0.46330345D+00 0.33171444D-02
+ -.35000000D+01 -.34000000D+01 0.61449895D+00 0.40898484D-02
+ -.34000000D+01 -.33000000D+01 0.78659199D+00 0.67039057D-02
+ -.33000000D+01 -.32000000D+01 0.97126675D+00 0.61275536D-02
+ -.32000000D+01 -.31000000D+01 0.11874722D+01 0.64445597D-02
+ -.31000000D+01 -.30000000D+01 0.14350530D+01 0.75772004D-02
+ -.30000000D+01 -.29000000D+01 0.17247369D+01 0.82622225D-02
+ -.29000000D+01 -.28000000D+01 0.19960581D+01 0.11989573D-01
+ -.28000000D+01 -.27000000D+01 0.22994039D+01 0.10286792D-01
+ -.27000000D+01 -.26000000D+01 0.26285773D+01 0.11180884D-01
+ -.26000000D+01 -.25000000D+01 0.29808936D+01 0.14201562D-01
+ -.25000000D+01 -.24000000D+01 0.33547318D+01 0.11621452D-01
+ -.24000000D+01 -.23000000D+01 0.37314854D+01 0.25528826D-01
+ -.23000000D+01 -.22000000D+01 0.40643923D+01 0.13706924D-01
+ -.22000000D+01 -.21000000D+01 0.44710500D+01 0.16549885D-01
+ -.21000000D+01 -.20000000D+01 0.48797590D+01 0.15189217D-01
+ -.20000000D+01 -.19000000D+01 0.52866811D+01 0.17873812D-01
+ -.19000000D+01 -.18000000D+01 0.56242616D+01 0.17386284D-01
+ -.18000000D+01 -.17000000D+01 0.60000586D+01 0.21137747D-01
+ -.17000000D+01 -.16000000D+01 0.63856870D+01 0.19338939D-01
+ -.16000000D+01 -.15000000D+01 0.66689176D+01 0.19851185D-01
+ -.15000000D+01 -.14000000D+01 0.70477346D+01 0.26802573D-01
+ -.14000000D+01 -.13000000D+01 0.73452696D+01 0.18862620D-01
+ -.13000000D+01 -.12000000D+01 0.76433911D+01 0.25659691D-01
+ -.12000000D+01 -.11000000D+01 0.79239983D+01 0.19094407D-01
+ -.11000000D+01 -.10000000D+01 0.81700152D+01 0.20704990D-01
+ -.10000000D+01 -.90000000D+00 0.83946058D+01 0.21353033D-01
+ -.90000000D+00 -.80000000D+00 0.85797393D+01 0.20557299D-01
+ -.80000000D+00 -.70000000D+00 0.88140430D+01 0.21560944D-01
+ -.70000000D+00 -.60000000D+00 0.89356425D+01 0.22061528D-01
+ -.60000000D+00 -.50000000D+00 0.90879126D+01 0.23284865D-01
+ -.50000000D+00 -.40000000D+00 0.92123014D+01 0.20295626D-01
+ -.40000000D+00 -.30000000D+00 0.93024679D+01 0.22983336D-01
+ -.30000000D+00 -.20000000D+00 0.93910252D+01 0.22012918D-01
+ -.20000000D+00 -.10000000D+00 0.94085074D+01 0.21684057D-01
+ -.10000000D+00 0.18041124D-15 0.94499717D+01 0.21299342D-01
+ 0.70776718D-15 0.10000000D+00 0.94575277D+01 0.26273366D-01
+ 0.10000000D+00 0.20000000D+00 0.94191906D+01 0.21619261D-01
+ 0.20000000D+00 0.30000000D+00 0.93718992D+01 0.21287698D-01
+ 0.30000000D+00 0.40000000D+00 0.93119871D+01 0.22064004D-01
+ 0.40000000D+00 0.50000000D+00 0.92029833D+01 0.21365709D-01
+ 0.50000000D+00 0.60000000D+00 0.91063452D+01 0.21905146D-01
+ 0.60000000D+00 0.70000000D+00 0.89637626D+01 0.21758014D-01
+ 0.70000000D+00 0.80000000D+00 0.87724240D+01 0.22167827D-01
+ 0.80000000D+00 0.90000000D+00 0.85917689D+01 0.20509508D-01
+ 0.90000000D+00 0.10000000D+01 0.83833666D+01 0.20308894D-01
+ 0.10000000D+01 0.11000000D+01 0.81390700D+01 0.20366985D-01
+ 0.11000000D+01 0.12000000D+01 0.78779617D+01 0.19202939D-01
+ 0.12000000D+01 0.13000000D+01 0.76560128D+01 0.26080456D-01
+ 0.13000000D+01 0.14000000D+01 0.73087420D+01 0.20565328D-01
+ 0.14000000D+01 0.15000000D+01 0.69917703D+01 0.21300374D-01
+ 0.15000000D+01 0.16000000D+01 0.66837897D+01 0.19344909D-01
+ 0.16000000D+01 0.17000000D+01 0.63833631D+01 0.19660597D-01
+ 0.17000000D+01 0.18000000D+01 0.59744837D+01 0.17128843D-01
+ 0.18000000D+01 0.19000000D+01 0.56368757D+01 0.18130446D-01
+ 0.19000000D+01 0.20000000D+01 0.52651785D+01 0.15375671D-01
+ 0.20000000D+01 0.21000000D+01 0.48564429D+01 0.15119581D-01
+ 0.21000000D+01 0.22000000D+01 0.44966761D+01 0.15857610D-01
+ 0.22000000D+01 0.23000000D+01 0.40851941D+01 0.15159851D-01
+ 0.23000000D+01 0.24000000D+01 0.37041587D+01 0.13970010D-01
+ 0.24000000D+01 0.25000000D+01 0.33431543D+01 0.12850339D-01
+ 0.25000000D+01 0.26000000D+01 0.30060351D+01 0.11861042D-01
+ 0.26000000D+01 0.27000000D+01 0.26302796D+01 0.15186538D-01
+ 0.27000000D+01 0.28000000D+01 0.23036431D+01 0.98776089D-02
+ 0.28000000D+01 0.29000000D+01 0.19934326D+01 0.89721557D-02
+ 0.29000000D+01 0.30000000D+01 0.16999904D+01 0.85191374D-02
+ 0.30000000D+01 0.31000000D+01 0.14322795D+01 0.78408843D-02
+ 0.31000000D+01 0.32000000D+01 0.11891929D+01 0.67336108D-02
+ 0.32000000D+01 0.33000000D+01 0.98372823D+00 0.68886553D-02
+ 0.33000000D+01 0.34000000D+01 0.78526539D+00 0.52724276D-02
+ 0.34000000D+01 0.35000000D+01 0.60792478D+00 0.46275224D-02
+ 0.35000000D+01 0.36000000D+01 0.45996761D+00 0.34425099D-02
+ 0.36000000D+01 0.37000000D+01 0.33957180D+00 0.26401041D-02
+ 0.37000000D+01 0.38000000D+01 0.24070185D+00 0.20281578D-02
+ 0.38000000D+01 0.39000000D+01 0.15633656D+00 0.13798112D-02
+ 0.39000000D+01 0.40000000D+01 0.94010210D-01 0.89403156D-03
+ 0.40000000D+01 0.41000000D+01 0.50208651D-01 0.47095674D-03
+ 0.41000000D+01 0.42000000D+01 0.21960953D-01 0.20522482D-03
+ 0.42000000D+01 0.43000000D+01 0.73637610D-02 0.79165481D-04
+ 0.43000000D+01 0.44000000D+01 0.13549463D-02 0.28790396D-04
+ 0.44000000D+01 0.45000000D+01 -.13738577D-03 0.73826918D-05
+ 0.45000000D+01 0.46000000D+01 -.96846058D-04 0.35235899D-05
+ 0.46000000D+01 0.47000000D+01 -.18235909D-05 0.53753983D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18218362D-05 0.53892846D-06
+ -.46000000D+01 -.45000000D+01 -.93053773D-04 0.35521097D-05
+ -.45000000D+01 -.44000000D+01 -.13397847D-03 0.73954473D-05
+ -.44000000D+01 -.43000000D+01 0.12884136D-02 0.25856874D-04
+ -.43000000D+01 -.42000000D+01 0.68511918D-02 0.82912286D-04
+ -.42000000D+01 -.41000000D+01 0.20819011D-01 0.20957677D-03
+ -.41000000D+01 -.40000000D+01 0.47013288D-01 0.45554434D-03
+ -.40000000D+01 -.39000000D+01 0.88270760D-01 0.86221710D-03
+ -.39000000D+01 -.38000000D+01 0.14206960D+00 0.14526547D-02
+ -.38000000D+01 -.37000000D+01 0.21059554D+00 0.20270467D-02
+ -.37000000D+01 -.36000000D+01 0.30487388D+00 0.28936614D-02
+ -.36000000D+01 -.35000000D+01 0.41254700D+00 0.33081850D-02
+ -.35000000D+01 -.34000000D+01 0.54473696D+00 0.40778114D-02
+ -.34000000D+01 -.33000000D+01 0.69397877D+00 0.66806762D-02
+ -.33000000D+01 -.32000000D+01 0.85302824D+00 0.60972401D-02
+ -.32000000D+01 -.31000000D+01 0.10383606D+01 0.64271843D-02
+ -.31000000D+01 -.30000000D+01 0.12510536D+01 0.75602570D-02
+ -.30000000D+01 -.29000000D+01 0.15026307D+01 0.82232377D-02
+ -.29000000D+01 -.28000000D+01 0.17318890D+01 0.11955783D-01
+ -.28000000D+01 -.27000000D+01 0.19896746D+01 0.10246633D-01
+ -.27000000D+01 -.26000000D+01 0.22696137D+01 0.11132113D-01
+ -.26000000D+01 -.25000000D+01 0.25695530D+01 0.14129389D-01
+ -.25000000D+01 -.24000000D+01 0.28893910D+01 0.11552480D-01
+ -.24000000D+01 -.23000000D+01 0.32086205D+01 0.25483744D-01
+ -.23000000D+01 -.22000000D+01 0.34825450D+01 0.13610581D-01
+ -.22000000D+01 -.21000000D+01 0.38282072D+01 0.16484895D-01
+ -.21000000D+01 -.20000000D+01 0.41757595D+01 0.15125778D-01
+ -.20000000D+01 -.19000000D+01 0.45231359D+01 0.17731890D-01
+ -.19000000D+01 -.18000000D+01 0.47963539D+01 0.17183362D-01
+ -.18000000D+01 -.17000000D+01 0.51121446D+01 0.21036616D-01
+ -.17000000D+01 -.16000000D+01 0.54410792D+01 0.19294224D-01
+ -.16000000D+01 -.15000000D+01 0.56652794D+01 0.18907888D-01
+ -.15000000D+01 -.14000000D+01 0.59872080D+01 0.26100813D-01
+ -.14000000D+01 -.13000000D+01 0.62311350D+01 0.18800694D-01
+ -.13000000D+01 -.12000000D+01 0.64803488D+01 0.25594135D-01
+ -.12000000D+01 -.11000000D+01 0.67115955D+01 0.18977357D-01
+ -.11000000D+01 -.10000000D+01 0.69140740D+01 0.20596034D-01
+ -.10000000D+01 -.90000000D+00 0.70981007D+01 0.21276520D-01
+ -.90000000D+00 -.80000000D+00 0.72434841D+01 0.20446818D-01
+ -.80000000D+00 -.70000000D+00 0.74466358D+01 0.21433759D-01
+ -.70000000D+00 -.60000000D+00 0.75392220D+01 0.21954782D-01
+ -.60000000D+00 -.50000000D+00 0.76635963D+01 0.23122996D-01
+ -.50000000D+00 -.40000000D+00 0.77703445D+01 0.20118500D-01
+ -.40000000D+00 -.30000000D+00 0.78407901D+01 0.22929843D-01
+ -.30000000D+00 -.20000000D+00 0.79161769D+01 0.21940581D-01
+ -.20000000D+00 -.10000000D+00 0.79257528D+01 0.21601459D-01
+ -.10000000D+00 0.18041124D-15 0.79663777D+01 0.21103507D-01
+ 0.70776718D-15 0.10000000D+00 0.79670655D+01 0.26061655D-01
+ 0.10000000D+00 0.20000000D+00 0.79357835D+01 0.21532085D-01
+ 0.20000000D+00 0.30000000D+00 0.78984294D+01 0.21215080D-01
+ 0.30000000D+00 0.40000000D+00 0.78499519D+01 0.22007063D-01
+ 0.40000000D+00 0.50000000D+00 0.77605344D+01 0.21291021D-01
+ 0.50000000D+00 0.60000000D+00 0.76823663D+01 0.21826949D-01
+ 0.60000000D+00 0.70000000D+00 0.75620152D+01 0.21190796D-01
+ 0.70000000D+00 0.80000000D+00 0.74082896D+01 0.21678719D-01
+ 0.80000000D+00 0.90000000D+00 0.72572719D+01 0.20404619D-01
+ 0.90000000D+00 0.10000000D+01 0.70855309D+01 0.20201787D-01
+ 0.10000000D+01 0.11000000D+01 0.68815038D+01 0.20166036D-01
+ 0.11000000D+01 0.12000000D+01 0.66675802D+01 0.19094079D-01
+ 0.12000000D+01 0.13000000D+01 0.64924233D+01 0.26044722D-01
+ 0.13000000D+01 0.14000000D+01 0.61949611D+01 0.20473069D-01
+ 0.14000000D+01 0.15000000D+01 0.59322831D+01 0.21190844D-01
+ 0.15000000D+01 0.16000000D+01 0.56823649D+01 0.18664680D-01
+ 0.16000000D+01 0.17000000D+01 0.54336579D+01 0.18892438D-01
+ 0.17000000D+01 0.18000000D+01 0.50876334D+01 0.16974351D-01
+ 0.18000000D+01 0.19000000D+01 0.48100285D+01 0.18071170D-01
+ 0.19000000D+01 0.20000000D+01 0.44991787D+01 0.15306715D-01
+ 0.20000000D+01 0.21000000D+01 0.41531880D+01 0.14943481D-01
+ 0.21000000D+01 0.22000000D+01 0.38541551D+01 0.15742847D-01
+ 0.22000000D+01 0.23000000D+01 0.35042534D+01 0.14978567D-01
+ 0.23000000D+01 0.24000000D+01 0.31806973D+01 0.13771375D-01
+ 0.24000000D+01 0.25000000D+01 0.28757452D+01 0.12697353D-01
+ 0.25000000D+01 0.26000000D+01 0.25970952D+01 0.11687741D-01
+ 0.26000000D+01 0.27000000D+01 0.22702365D+01 0.15116440D-01
+ 0.27000000D+01 0.28000000D+01 0.19941948D+01 0.97905429D-02
+ 0.28000000D+01 0.29000000D+01 0.17287584D+01 0.89274733D-02
+ 0.29000000D+01 0.30000000D+01 0.14781001D+01 0.84852513D-02
+ 0.30000000D+01 0.31000000D+01 0.12485097D+01 0.78156031D-02
+ 0.31000000D+01 0.32000000D+01 0.10397962D+01 0.67094010D-02
+ 0.32000000D+01 0.33000000D+01 0.86500638D+00 0.68748640D-02
+ 0.33000000D+01 0.34000000D+01 0.69310785D+00 0.52616178D-02
+ 0.34000000D+01 0.35000000D+01 0.53817601D+00 0.46172487D-02
+ 0.35000000D+01 0.36000000D+01 0.40934185D+00 0.34339858D-02
+ 0.36000000D+01 0.37000000D+01 0.30416896D+00 0.26297268D-02
+ 0.37000000D+01 0.38000000D+01 0.21743397D+00 0.20206834D-02
+ 0.38000000D+01 0.39000000D+01 0.14213382D+00 0.13769476D-02
+ 0.39000000D+01 0.40000000D+01 0.86185219D-01 0.89256945D-03
+ 0.40000000D+01 0.41000000D+01 0.46467024D-01 0.47022354D-03
+ 0.41000000D+01 0.42000000D+01 0.20512611D-01 0.20488762D-03
+ 0.42000000D+01 0.43000000D+01 0.69514863D-02 0.79089685D-04
+ 0.43000000D+01 0.44000000D+01 0.12949620D-02 0.28778364D-04
+ 0.44000000D+01 0.45000000D+01 -.13141775D-03 0.73816463D-05
+ 0.45000000D+01 0.46000000D+01 -.94510172D-04 0.35232741D-05
+ 0.46000000D+01 0.47000000D+01 -.18093382D-05 0.53753834D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18297067D-05 0.53892924D-06
+ -.46000000D+01 -.45000000D+01 -.94311739D-04 0.35522473D-05
+ -.45000000D+01 -.44000000D+01 -.13707585D-03 0.73958854D-05
+ -.44000000D+01 -.43000000D+01 0.13219023D-02 0.25862793D-04
+ -.43000000D+01 -.42000000D+01 0.70757951D-02 0.82956498D-04
+ -.42000000D+01 -.41000000D+01 0.21604678D-01 0.20977608D-03
+ -.41000000D+01 -.40000000D+01 0.49022266D-01 0.45594051D-03
+ -.40000000D+01 -.39000000D+01 0.92462657D-01 0.86293206D-03
+ -.39000000D+01 -.38000000D+01 0.14964684D+00 0.14542262D-02
+ -.38000000D+01 -.37000000D+01 0.22299032D+00 0.20290214D-02
+ -.37000000D+01 -.36000000D+01 0.32357987D+00 0.28957344D-02
+ -.36000000D+01 -.35000000D+01 0.43936198D+00 0.33118484D-02
+ -.35000000D+01 -.34000000D+01 0.58150729D+00 0.40825089D-02
+ -.34000000D+01 -.33000000D+01 0.74263163D+00 0.66871776D-02
+ -.33000000D+01 -.32000000D+01 0.91526759D+00 0.61068197D-02
+ -.32000000D+01 -.31000000D+01 0.11165783D+01 0.64340500D-02
+ -.31000000D+01 -.30000000D+01 0.13473854D+01 0.75662972D-02
+ -.30000000D+01 -.29000000D+01 0.16187545D+01 0.82399117D-02
+ -.29000000D+01 -.28000000D+01 0.18698370D+01 0.11970023D-01
+ -.28000000D+01 -.27000000D+01 0.21512372D+01 0.10261348D-01
+ -.27000000D+01 -.26000000D+01 0.24566462D+01 0.11151016D-01
+ -.26000000D+01 -.25000000D+01 0.27835951D+01 0.14161942D-01
+ -.25000000D+01 -.24000000D+01 0.31314440D+01 0.11582546D-01
+ -.24000000D+01 -.23000000D+01 0.34800957D+01 0.25501163D-01
+ -.23000000D+01 -.22000000D+01 0.37844298D+01 0.13649118D-01
+ -.22000000D+01 -.21000000D+01 0.41614222D+01 0.16512234D-01
+ -.21000000D+01 -.20000000D+01 0.45404118D+01 0.15150184D-01
+ -.20000000D+01 -.19000000D+01 0.49186750D+01 0.17770079D-01
+ -.19000000D+01 -.18000000D+01 0.52241053D+01 0.17250897D-01
+ -.18000000D+01 -.17000000D+01 0.55708156D+01 0.21081873D-01
+ -.17000000D+01 -.16000000D+01 0.59290478D+01 0.19311065D-01
+ -.16000000D+01 -.15000000D+01 0.61833693D+01 0.19116227D-01
+ -.15000000D+01 -.14000000D+01 0.65336848D+01 0.26257045D-01
+ -.14000000D+01 -.13000000D+01 0.68050354D+01 0.18824899D-01
+ -.13000000D+01 -.12000000D+01 0.70794010D+01 0.25620330D-01
+ -.12000000D+01 -.11000000D+01 0.73353871D+01 0.19024075D-01
+ -.11000000D+01 -.10000000D+01 0.75601748D+01 0.20635999D-01
+ -.10000000D+01 -.90000000D+00 0.77648332D+01 0.21305216D-01
+ -.90000000D+00 -.80000000D+00 0.79299033D+01 0.20483026D-01
+ -.80000000D+00 -.70000000D+00 0.81492587D+01 0.21472518D-01
+ -.70000000D+00 -.60000000D+00 0.82566289D+01 0.21992921D-01
+ -.60000000D+00 -.50000000D+00 0.83946807D+01 0.23173397D-01
+ -.50000000D+00 -.40000000D+00 0.85109439D+01 0.20172576D-01
+ -.40000000D+00 -.30000000D+00 0.85909229D+01 0.22951302D-01
+ -.30000000D+00 -.20000000D+00 0.86730152D+01 0.21969393D-01
+ -.20000000D+00 -.10000000D+00 0.86865460D+01 0.21635120D-01
+ -.10000000D+00 0.18041124D-15 0.87283112D+01 0.21159104D-01
+ 0.70776718D-15 0.10000000D+00 0.87311170D+01 0.26125040D-01
+ 0.10000000D+00 0.20000000D+00 0.86969936D+01 0.21564326D-01
+ 0.20000000D+00 0.30000000D+00 0.86546960D+01 0.21241220D-01
+ 0.30000000D+00 0.40000000D+00 0.86003194D+01 0.22030674D-01
+ 0.40000000D+00 0.50000000D+00 0.85010998D+01 0.21323256D-01
+ 0.50000000D+00 0.60000000D+00 0.84135276D+01 0.21858333D-01
+ 0.60000000D+00 0.70000000D+00 0.82809518D+01 0.21313990D-01
+ 0.70000000D+00 0.80000000D+00 0.81099805D+01 0.21779449D-01
+ 0.80000000D+00 0.90000000D+00 0.79430268D+01 0.20436874D-01
+ 0.90000000D+00 0.10000000D+01 0.77528212D+01 0.20234024D-01
+ 0.10000000D+01 0.11000000D+01 0.75283323D+01 0.20237902D-01
+ 0.11000000D+01 0.12000000D+01 0.72906980D+01 0.19129927D-01
+ 0.12000000D+01 0.13000000D+01 0.70916319D+01 0.26058924D-01
+ 0.13000000D+01 0.14000000D+01 0.67687201D+01 0.20503153D-01
+ 0.14000000D+01 0.15000000D+01 0.64785510D+01 0.21229974D-01
+ 0.15000000D+01 0.16000000D+01 0.61994369D+01 0.18906783D-01
+ 0.16000000D+01 0.17000000D+01 0.59233981D+01 0.19173272D-01
+ 0.17000000D+01 0.18000000D+01 0.55460166D+01 0.17033857D-01
+ 0.18000000D+01 0.19000000D+01 0.52375744D+01 0.18090778D-01
+ 0.19000000D+01 0.20000000D+01 0.48955332D+01 0.15328172D-01
+ 0.20000000D+01 0.21000000D+01 0.45176523D+01 0.15005966D-01
+ 0.21000000D+01 0.22000000D+01 0.41871615D+01 0.15786627D-01
+ 0.22000000D+01 0.23000000D+01 0.38057614D+01 0.15043697D-01
+ 0.23000000D+01 0.24000000D+01 0.34525372D+01 0.13843055D-01
+ 0.24000000D+01 0.25000000D+01 0.31184434D+01 0.12733454D-01
+ 0.25000000D+01 0.26000000D+01 0.28103838D+01 0.11728207D-01
+ 0.26000000D+01 0.27000000D+01 0.24576285D+01 0.15144878D-01
+ 0.27000000D+01 0.28000000D+01 0.21556622D+01 0.98282014D-02
+ 0.28000000D+01 0.29000000D+01 0.18668958D+01 0.89422033D-02
+ 0.29000000D+01 0.30000000D+01 0.15941626D+01 0.84962951D-02
+ 0.30000000D+01 0.31000000D+01 0.13447342D+01 0.78259509D-02
+ 0.31000000D+01 0.32000000D+01 0.11181185D+01 0.67189616D-02
+ 0.32000000D+01 0.33000000D+01 0.92738552D+00 0.68805624D-02
+ 0.33000000D+01 0.34000000D+01 0.74161062D+00 0.52660779D-02
+ 0.34000000D+01 0.35000000D+01 0.57492158D+00 0.46213136D-02
+ 0.35000000D+01 0.36000000D+01 0.43611686D+00 0.34374155D-02
+ 0.36000000D+01 0.37000000D+01 0.32292264D+00 0.26341268D-02
+ 0.37000000D+01 0.38000000D+01 0.22979342D+00 0.20239550D-02
+ 0.38000000D+01 0.39000000D+01 0.14970493D+00 0.13782282D-02
+ 0.39000000D+01 0.40000000D+01 0.90374833D-01 0.89325071D-03
+ 0.40000000D+01 0.41000000D+01 0.48477973D-01 0.47055993D-03
+ 0.41000000D+01 0.42000000D+01 0.21296530D-01 0.20504640D-03
+ 0.42000000D+01 0.43000000D+01 0.71763894D-02 0.79125990D-04
+ 0.43000000D+01 0.44000000D+01 0.13283672D-02 0.28784248D-04
+ 0.44000000D+01 0.45000000D+01 -.13448821D-03 0.73821419D-05
+ 0.45000000D+01 0.46000000D+01 -.95776631D-04 0.35234319D-05
+ 0.46000000D+01 0.47000000D+01 -.18171393D-05 0.53753911D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18340291D-05 0.53892966D-06
+ -.46000000D+01 -.45000000D+01 -.95044127D-04 0.35523233D-05
+ -.45000000D+01 -.44000000D+01 -.13903412D-03 0.73961460D-05
+ -.44000000D+01 -.43000000D+01 0.13421897D-02 0.25866127D-04
+ -.43000000D+01 -.42000000D+01 0.72176209D-02 0.82982095D-04
+ -.42000000D+01 -.41000000D+01 0.22114085D-01 0.20989868D-03
+ -.41000000D+01 -.40000000D+01 0.50355128D-01 0.45617787D-03
+ -.40000000D+01 -.39000000D+01 0.95306145D-01 0.86339383D-03
+ -.39000000D+01 -.38000000D+01 0.15488543D+00 0.14553392D-02
+ -.38000000D+01 -.37000000D+01 0.23172814D+00 0.20302995D-02
+ -.37000000D+01 -.36000000D+01 0.33697520D+00 0.28971470D-02
+ -.36000000D+01 -.35000000D+01 0.45886793D+00 0.33145416D-02
+ -.35000000D+01 -.34000000D+01 0.60860524D+00 0.40862511D-02
+ -.34000000D+01 -.33000000D+01 0.77895819D+00 0.66947784D-02
+ -.33000000D+01 -.32000000D+01 0.96206679D+00 0.61166410D-02
+ -.32000000D+01 -.31000000D+01 0.11760320D+01 0.64395531D-02
+ -.31000000D+01 -.30000000D+01 0.14212093D+01 0.75712084D-02
+ -.30000000D+01 -.29000000D+01 0.17084239D+01 0.82516219D-02
+ -.29000000D+01 -.28000000D+01 0.19771045D+01 0.11980235D-01
+ -.28000000D+01 -.27000000D+01 0.22776258D+01 0.10273646D-01
+ -.27000000D+01 -.26000000D+01 0.26037527D+01 0.11166336D-01
+ -.26000000D+01 -.25000000D+01 0.29528652D+01 0.14182944D-01
+ -.25000000D+01 -.24000000D+01 0.33236461D+01 0.11603650D-01
+ -.24000000D+01 -.23000000D+01 0.36968565D+01 0.25514834D-01
+ -.23000000D+01 -.22000000D+01 0.40263474D+01 0.13678640D-01
+ -.22000000D+01 -.21000000D+01 0.44293872D+01 0.16532123D-01
+ -.21000000D+01 -.20000000D+01 0.48346622D+01 0.15170141D-01
+ -.20000000D+01 -.19000000D+01 0.52387156D+01 0.17818025D-01
+ -.19000000D+01 -.18000000D+01 0.55718130D+01 0.17317403D-01
+ -.18000000D+01 -.17000000D+01 0.59445214D+01 0.21112799D-01
+ -.17000000D+01 -.16000000D+01 0.63275953D+01 0.19324324D-01
+ -.16000000D+01 -.15000000D+01 0.66075351D+01 0.19448798D-01
+ -.15000000D+01 -.14000000D+01 0.69826260D+01 0.26503137D-01
+ -.14000000D+01 -.13000000D+01 0.72773405D+01 0.18844192D-01
+ -.13000000D+01 -.12000000D+01 0.75732675D+01 0.25638079D-01
+ -.12000000D+01 -.11000000D+01 0.78508110D+01 0.19060225D-01
+ -.11000000D+01 -.10000000D+01 0.80947943D+01 0.20671539D-01
+ -.10000000D+01 -.90000000D+00 0.83173471D+01 0.21329339D-01
+ -.90000000D+00 -.80000000D+00 0.84997482D+01 0.20520084D-01
+ -.80000000D+00 -.70000000D+00 0.87330666D+01 0.21515671D-01
+ -.70000000D+00 -.60000000D+00 0.88532612D+01 0.22027864D-01
+ -.60000000D+00 -.50000000D+00 0.90034866D+01 0.23228852D-01
+ -.50000000D+00 -.40000000D+00 0.91279630D+01 0.20231891D-01
+ -.40000000D+00 -.30000000D+00 0.92163431D+01 0.22968138D-01
+ -.30000000D+00 -.20000000D+00 0.93042245D+01 0.21991621D-01
+ -.20000000D+00 -.10000000D+00 0.93214095D+01 0.21660530D-01
+ -.10000000D+00 0.18041124D-15 0.93638134D+01 0.21225029D-01
+ 0.70776718D-15 0.10000000D+00 0.93690338D+01 0.26197776D-01
+ 0.10000000D+00 0.20000000D+00 0.93319827D+01 0.21592708D-01
+ 0.20000000D+00 0.30000000D+00 0.92855043D+01 0.21263594D-01
+ 0.30000000D+00 0.40000000D+00 0.92259469D+01 0.22048431D-01
+ 0.40000000D+00 0.50000000D+00 0.91183035D+01 0.21345932D-01
+ 0.50000000D+00 0.60000000D+00 0.90221468D+01 0.21882042D-01
+ 0.60000000D+00 0.70000000D+00 0.88795180D+01 0.21512642D-01
+ 0.70000000D+00 0.80000000D+00 0.86926149D+01 0.21949307D-01
+ 0.80000000D+00 0.90000000D+00 0.85122439D+01 0.20471378D-01
+ 0.90000000D+00 0.10000000D+01 0.83057531D+01 0.20269989D-01
+ 0.10000000D+01 0.11000000D+01 0.80635203D+01 0.20305333D-01
+ 0.11000000D+01 0.12000000D+01 0.78054319D+01 0.19165332D-01
+ 0.12000000D+01 0.13000000D+01 0.75856984D+01 0.26069509D-01
+ 0.13000000D+01 0.14000000D+01 0.72409017D+01 0.20533682D-01
+ 0.14000000D+01 0.15000000D+01 0.69270848D+01 0.21265016D-01
+ 0.15000000D+01 0.16000000D+01 0.66228797D+01 0.19136168D-01
+ 0.16000000D+01 0.17000000D+01 0.63237669D+01 0.19430598D-01
+ 0.17000000D+01 0.18000000D+01 0.59193268D+01 0.17082996D-01
+ 0.18000000D+01 0.19000000D+01 0.55848508D+01 0.18109750D-01
+ 0.19000000D+01 0.20000000D+01 0.52164564D+01 0.15350975D-01
+ 0.20000000D+01 0.21000000D+01 0.48116304D+01 0.15063152D-01
+ 0.21000000D+01 0.22000000D+01 0.44550294D+01 0.15822306D-01
+ 0.22000000D+01 0.23000000D+01 0.40474197D+01 0.15102850D-01
+ 0.23000000D+01 0.24000000D+01 0.36694355D+01 0.13907898D-01
+ 0.24000000D+01 0.25000000D+01 0.33114426D+01 0.12786574D-01
+ 0.25000000D+01 0.26000000D+01 0.29787892D+01 0.11787165D-01
+ 0.26000000D+01 0.27000000D+01 0.26051274D+01 0.15166724D-01
+ 0.27000000D+01 0.28000000D+01 0.22819656D+01 0.98549756D-02
+ 0.28000000D+01 0.29000000D+01 0.19743287D+01 0.89564951D-02
+ 0.29000000D+01 0.30000000D+01 0.16837644D+01 0.85068661D-02
+ 0.30000000D+01 0.31000000D+01 0.14184761D+01 0.78337527D-02
+ 0.31000000D+01 0.32000000D+01 0.11776663D+01 0.67264513D-02
+ 0.32000000D+01 0.33000000D+01 0.97435169D+00 0.68846335D-02
+ 0.33000000D+01 0.34000000D+01 0.77777429D+00 0.52693052D-02
+ 0.34000000D+01 0.35000000D+01 0.60201196D+00 0.46243608D-02
+ 0.35000000D+01 0.36000000D+01 0.45557381D+00 0.34399450D-02
+ 0.36000000D+01 0.37000000D+01 0.33635926D+00 0.26373276D-02
+ 0.37000000D+01 0.38000000D+01 0.23850726D+00 0.20262303D-02
+ 0.38000000D+01 0.39000000D+01 0.15494501D+00 0.13790616D-02
+ 0.39000000D+01 0.40000000D+01 0.93213991D-01 0.89367107D-03
+ 0.40000000D+01 0.41000000D+01 0.49812640D-01 0.47076119D-03
+ 0.41000000D+01 0.42000000D+01 0.21804670D-01 0.20514273D-03
+ 0.42000000D+01 0.43000000D+01 0.73183513D-02 0.79146421D-04
+ 0.43000000D+01 0.44000000D+01 0.13486037D-02 0.28787536D-04
+ 0.44000000D+01 0.45000000D+01 -.13643031D-03 0.73824404D-05
+ 0.45000000D+01 0.46000000D+01 -.96514281D-04 0.35235214D-05
+ 0.46000000D+01 0.47000000D+01 -.18214237D-05 0.53753953D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18361009D-05 0.53892986D-06
+ -.46000000D+01 -.45000000D+01 -.95408375D-04 0.35523599D-05
+ -.45000000D+01 -.44000000D+01 -.14006567D-03 0.73962776D-05
+ -.44000000D+01 -.43000000D+01 0.13525596D-02 0.25867756D-04
+ -.43000000D+01 -.42000000D+01 0.72925174D-02 0.82994818D-04
+ -.42000000D+01 -.41000000D+01 0.22389030D-01 0.20996222D-03
+ -.41000000D+01 -.40000000D+01 0.51088745D-01 0.45629895D-03
+ -.40000000D+01 -.39000000D+01 0.96901995D-01 0.86364625D-03
+ -.39000000D+01 -.38000000D+01 0.15787639D+00 0.14559943D-02
+ -.38000000D+01 -.37000000D+01 0.23680730D+00 0.20310058D-02
+ -.37000000D+01 -.36000000D+01 0.34487514D+00 0.28980299D-02
+ -.36000000D+01 -.35000000D+01 0.47056208D+00 0.33162367D-02
+ -.35000000D+01 -.34000000D+01 0.62506049D+00 0.40888004D-02
+ -.34000000D+01 -.33000000D+01 0.80131860D+00 0.67026470D-02
+ -.33000000D+01 -.32000000D+01 0.99109046D+00 0.61258506D-02
+ -.32000000D+01 -.31000000D+01 0.12133302D+01 0.64433264D-02
+ -.31000000D+01 -.30000000D+01 0.14679348D+01 0.75746710D-02
+ -.30000000D+01 -.29000000D+01 0.17656865D+01 0.82587236D-02
+ -.29000000D+01 -.28000000D+01 0.20461330D+01 0.11986621D-01
+ -.28000000D+01 -.27000000D+01 0.23595281D+01 0.10282280D-01
+ -.27000000D+01 -.26000000D+01 0.26996833D+01 0.11176662D-01
+ -.26000000D+01 -.25000000D+01 0.30639552D+01 0.14194493D-01
+ -.25000000D+01 -.24000000D+01 0.34503843D+01 0.11616695D-01
+ -.24000000D+01 -.23000000D+01 0.38407429D+01 0.25523720D-01
+ -.23000000D+01 -.22000000D+01 0.41875837D+01 0.13698492D-01
+ -.22000000D+01 -.21000000D+01 0.46087737D+01 0.16545437D-01
+ -.21000000D+01 -.20000000D+01 0.50324703D+01 0.15184644D-01
+ -.20000000D+01 -.19000000D+01 0.54545885D+01 0.17864955D-01
+ -.19000000D+01 -.18000000D+01 0.58074990D+01 0.17373643D-01
+ -.18000000D+01 -.17000000D+01 0.61985743D+01 0.21130720D-01
+ -.17000000D+01 -.16000000D+01 0.65993738D+01 0.19333720D-01
+ -.16000000D+01 -.15000000D+01 0.68975772D+01 0.19805173D-01
+ -.15000000D+01 -.14000000D+01 0.72908794D+01 0.26766775D-01
+ -.14000000D+01 -.13000000D+01 0.76023130D+01 0.18857919D-01
+ -.13000000D+01 -.12000000D+01 0.79137818D+01 0.25650161D-01
+ -.12000000D+01 -.11000000D+01 0.82071494D+01 0.19085909D-01
+ -.11000000D+01 -.10000000D+01 0.84650570D+01 0.20698092D-01
+ -.10000000D+01 -.90000000D+00 0.87006328D+01 0.21347222D-01
+ -.90000000D+00 -.80000000D+00 0.88959154D+01 0.20552291D-01
+ -.80000000D+00 -.70000000D+00 0.91393835D+01 0.21554977D-01
+ -.70000000D+00 -.60000000D+00 0.92690063D+01 0.22056326D-01
+ -.60000000D+00 -.50000000D+00 0.94282506D+01 0.23275000D-01
+ -.50000000D+00 -.40000000D+00 0.95588786D+01 0.20281981D-01
+ -.40000000D+00 -.30000000D+00 0.96533897D+01 0.22979322D-01
+ -.30000000D+00 -.20000000D+00 0.97454970D+01 0.22006907D-01
+ -.20000000D+00 -.10000000D+00 0.97655238D+01 0.21677023D-01
+ -.10000000D+00 0.18041124D-15 0.98081867D+01 0.21284999D-01
+ 0.70776718D-15 0.10000000D+00 0.98155161D+01 0.26262234D-01
+ 0.10000000D+00 0.20000000D+00 0.97759946D+01 0.21614338D-01
+ 0.20000000D+00 0.30000000D+00 0.97266121D+01 0.21280461D-01
+ 0.30000000D+00 0.40000000D+00 0.96631359D+01 0.22060724D-01
+ 0.40000000D+00 0.50000000D+00 0.95493722D+01 0.21359636D-01
+ 0.50000000D+00 0.60000000D+00 0.94466381D+01 0.21898273D-01
+ 0.60000000D+00 0.70000000D+00 0.92970295D+01 0.21746159D-01
+ 0.70000000D+00 0.80000000D+00 0.90978983D+01 0.22155969D-01
+ 0.80000000D+00 0.90000000D+00 0.89078944D+01 0.20506328D-01
+ 0.90000000D+00 0.10000000D+01 0.86893152D+01 0.20306481D-01
+ 0.10000000D+01 0.11000000D+01 0.84340481D+01 0.20354909D-01
+ 0.11000000D+01 0.12000000D+01 0.81612904D+01 0.19194197D-01
+ 0.12000000D+01 0.13000000D+01 0.79264093D+01 0.26076234D-01
+ 0.13000000D+01 0.14000000D+01 0.75657751D+01 0.20560280D-01
+ 0.14000000D+01 0.15000000D+01 0.72348296D+01 0.21293311D-01
+ 0.15000000D+01 0.16000000D+01 0.69125784D+01 0.19292052D-01
+ 0.16000000D+01 0.17000000D+01 0.65969953D+01 0.19602277D-01
+ 0.17000000D+01 0.18000000D+01 0.61730073D+01 0.17117098D-01
+ 0.18000000D+01 0.19000000D+01 0.58201072D+01 0.18124749D-01
+ 0.19000000D+01 0.20000000D+01 0.54330584D+01 0.15370684D-01
+ 0.20000000D+01 0.21000000D+01 0.50091354D+01 0.15108745D-01
+ 0.21000000D+01 0.22000000D+01 0.46344323D+01 0.15849428D-01
+ 0.22000000D+01 0.23000000D+01 0.42085375D+01 0.15146481D-01
+ 0.23000000D+01 0.24000000D+01 0.38132947D+01 0.13955614D-01
+ 0.24000000D+01 0.25000000D+01 0.34388745D+01 0.12844893D-01
+ 0.25000000D+01 0.26000000D+01 0.30891544D+01 0.11852085D-01
+ 0.26000000D+01 0.27000000D+01 0.27013790D+01 0.15180983D-01
+ 0.27000000D+01 0.28000000D+01 0.23638041D+01 0.98708549D-02
+ 0.28000000D+01 0.29000000D+01 0.20434815D+01 0.89689069D-02
+ 0.29000000D+01 0.30000000D+01 0.17409542D+01 0.85159927D-02
+ 0.30000000D+01 0.31000000D+01 0.14651658D+01 0.78386891D-02
+ 0.31000000D+01 0.32000000D+01 0.12150396D+01 0.67311479D-02
+ 0.32000000D+01 0.33000000D+01 0.10035171D+01 0.68871181D-02
+ 0.33000000D+01 0.34000000D+01 0.79999805D+00 0.52713124D-02
+ 0.34000000D+01 0.35000000D+01 0.61846554D+00 0.46262815D-02
+ 0.35000000D+01 0.36000000D+01 0.46722279D+00 0.34415314D-02
+ 0.36000000D+01 0.37000000D+01 0.34429172D+00 0.26392350D-02
+ 0.37000000D+01 0.38000000D+01 0.24357229D+00 0.20275079D-02
+ 0.38000000D+01 0.39000000D+01 0.15793949D+00 0.13795168D-02
+ 0.39000000D+01 0.40000000D+01 0.94806098D-01 0.89388928D-03
+ 0.40000000D+01 0.41000000D+01 0.50547411D-01 0.47086383D-03
+ 0.41000000D+01 0.42000000D+01 0.22078908D-01 0.20519216D-03
+ 0.42000000D+01 0.43000000D+01 0.73933005D-02 0.79156398D-04
+ 0.43000000D+01 0.44000000D+01 0.13589481D-02 0.28789133D-04
+ 0.44000000D+01 0.45000000D+01 -.13745384D-03 0.73825927D-05
+ 0.45000000D+01 0.46000000D+01 -.96881227D-04 0.35235651D-05
+ 0.46000000D+01 0.47000000D+01 -.18234773D-05 0.53753973D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 -.22214327D+01 0.50255198D-02
+ 0.30000000D+01 0.60000000D+01 0.95058094D+00 0.25394370D-02
+ 0.60000000D+01 0.90000000D+01 0.20283166D+01 0.20979038D-02
+ 0.90000000D+01 0.12000000D+02 0.17525962D+01 0.15804891D-02
+ 0.12000000D+02 0.15000000D+02 0.14292175D+01 0.13755035D-02
+ 0.15000000D+02 0.18000000D+02 0.11790011D+01 0.12070544D-02
+ 0.18000000D+02 0.21000000D+02 0.98248300D+00 0.12501149D-02
+ 0.21000000D+02 0.24000000D+02 0.84004483D+00 0.93053435D-02
+ 0.24000000D+02 0.27000000D+02 0.70277386D+00 0.92821996D-02
+ 0.27000000D+02 0.30000000D+02 0.61787369D+00 0.10430140D-02
+ 0.30000000D+02 0.33000000D+02 0.54164356D+00 0.17523986D-02
+ 0.33000000D+02 0.36000000D+02 0.47202225D+00 0.17277466D-02
+ 0.36000000D+02 0.39000000D+02 0.42035182D+00 0.93327974D-03
+ 0.39000000D+02 0.42000000D+02 0.37699731D+00 0.74759138D-03
+ 0.42000000D+02 0.45000000D+02 0.33746983D+00 0.72284612D-03
+ 0.45000000D+02 0.48000000D+02 0.30389891D+00 0.66532006D-03
+ 0.48000000D+02 0.51000000D+02 0.27541549D+00 0.65911827D-03
+ 0.51000000D+02 0.54000000D+02 0.25021358D+00 0.71642111D-03
+ 0.54000000D+02 0.57000000D+02 0.22689125D+00 0.74438612D-03
+ 0.57000000D+02 0.60000000D+02 0.20840042D+00 0.70848293D-03
+ 0.60000000D+02 0.63000000D+02 0.19102660D+00 0.63268206D-03
+ 0.63000000D+02 0.66000000D+02 0.17352324D+00 0.70444011D-03
+ 0.66000000D+02 0.69000000D+02 0.16181178D+00 0.81102401D-03
+ 0.69000000D+02 0.72000000D+02 0.14881060D+00 0.89705304D-03
+ 0.72000000D+02 0.75000000D+02 0.13607715D+00 0.70363446D-03
+ 0.75000000D+02 0.78000000D+02 0.12664806D+00 0.39303534D-03
+ 0.78000000D+02 0.81000000D+02 0.11691562D+00 0.51008283D-03
+ 0.81000000D+02 0.84000000D+02 0.10996965D+00 0.47206881D-03
+ 0.84000000D+02 0.87000000D+02 0.10078277D+00 0.37186348D-03
+ 0.87000000D+02 0.90000000D+02 0.94127310D-01 0.58604106D-03
+ 0.90000000D+02 0.93000000D+02 0.87463420D-01 0.57551458D-03
+ 0.93000000D+02 0.96000000D+02 0.81597865D-01 0.54816630D-03
+ 0.96000000D+02 0.99000000D+02 0.76375874D-01 0.55236057D-03
+ 0.99000000D+02 0.10200000D+03 0.71216691D-01 0.31844065D-03
+ 0.10200000D+03 0.10500000D+03 0.66731666D-01 0.30581170D-03
+ 0.10500000D+03 0.10800000D+03 0.62500816D-01 0.33348981D-03
+ 0.10800000D+03 0.11100000D+03 0.58346950D-01 0.31466504D-03
+ 0.11100000D+03 0.11400000D+03 0.54634037D-01 0.27140804D-03
+ 0.11400000D+03 0.11700000D+03 0.51438331D-01 0.22612260D-03
+ 0.11700000D+03 0.12000000D+03 0.48543779D-01 0.33538095D-03
+ 0.12000000D+03 0.12300000D+03 0.45229986D-01 0.35267793D-03
+ 0.12300000D+03 0.12600000D+03 0.42854531D-01 0.23578981D-03
+ 0.12600000D+03 0.12900000D+03 0.39377987D-01 0.48934192D-03
+ 0.12900000D+03 0.13200000D+03 0.38366648D-01 0.49336757D-03
+ 0.13200000D+03 0.13500000D+03 0.35626020D-01 0.18882563D-03
+ 0.13500000D+03 0.13800000D+03 0.34183549D-01 0.17051876D-03
+ 0.13800000D+03 0.14100000D+03 0.31527177D-01 0.20752718D-03
+ 0.14100000D+03 0.14400000D+03 0.30276726D-01 0.37298686D-03
+ 0.14400000D+03 0.14700000D+03 0.27142165D-01 0.94556503D-03
+ 0.14700000D+03 0.15000000D+03 0.27877912D-01 0.89015965D-03
+ 0.15000000D+03 0.15300000D+03 0.25527323D-01 0.15320670D-03
+ 0.15300000D+03 0.15600000D+03 0.23493481D-01 0.40913638D-03
+ 0.15600000D+03 0.15900000D+03 0.23165684D-01 0.42459336D-03
+ 0.15900000D+03 0.16200000D+03 0.21641717D-01 0.17849228D-03
+ 0.16200000D+03 0.16500000D+03 0.20455926D-01 0.13317897D-03
+ 0.16500000D+03 0.16800000D+03 0.19341537D-01 0.14442093D-03
+ 0.16800000D+03 0.17100000D+03 0.18575591D-01 0.15054151D-03
+ 0.17100000D+03 0.17400000D+03 0.17663996D-01 0.18102597D-03
+ 0.17400000D+03 0.17700000D+03 0.16650664D-01 0.20470180D-03
+ 0.17700000D+03 0.18000000D+03 0.15808694D-01 0.18035724D-03
+ 0.18000000D+03 0.18300000D+03 0.14109307D-01 0.65790419D-03
+ 0.18300000D+03 0.18600000D+03 0.15322344D-01 0.65530881D-03
+ 0.18600000D+03 0.18900000D+03 0.13456125D-01 0.12982707D-03
+ 0.18900000D+03 0.19200000D+03 0.13216857D-01 0.17449648D-03
+ 0.19200000D+03 0.19500000D+03 0.12331300D-01 0.16463807D-03
+ 0.19500000D+03 0.19800000D+03 0.11742537D-01 0.13072631D-03
+ 0.19800000D+03 0.20100000D+03 0.11252042D-01 0.14050849D-03
+ 0.20100000D+03 0.20400000D+03 0.10847731D-01 0.14688857D-03
+ 0.20400000D+03 0.20700000D+03 0.98922461D-02 0.17292662D-03
+ 0.20700000D+03 0.21000000D+03 0.10000173D-01 0.17047761D-03
+ 0.21000000D+03 0.21300000D+03 0.93668710D-02 0.12796562D-03
+ 0.21300000D+03 0.21600000D+03 0.88176986D-02 0.97874112D-04
+ 0.21600000D+03 0.21900000D+03 0.88467317D-02 0.26475593D-03
+ 0.21900000D+03 0.22200000D+03 0.78195277D-02 0.26453138D-03
+ 0.22200000D+03 0.22500000D+03 0.77389186D-02 0.11622148D-03
+ 0.22500000D+03 0.22800000D+03 0.75986125D-02 0.16515288D-03
+ 0.22800000D+03 0.23100000D+03 0.72679086D-02 0.14928557D-03
+ 0.23100000D+03 0.23400000D+03 0.67431791D-02 0.98971738D-04
+ 0.23400000D+03 0.23700000D+03 0.65730284D-02 0.90354229D-04
+ 0.23700000D+03 0.24000000D+03 0.61842263D-02 0.79691751D-04
+ 0.24000000D+03 0.24300000D+03 0.59584005D-02 0.82991592D-04
+ 0.24300000D+03 0.24600000D+03 0.60896151D-02 0.15909412D-03
+ 0.24600000D+03 0.24900000D+03 0.52502731D-02 0.15177247D-03
+ 0.24900000D+03 0.25200000D+03 0.54476931D-02 0.69282923D-04
+ 0.25200000D+03 0.25500000D+03 0.49120439D-02 0.90113242D-04
+ 0.25500000D+03 0.25800000D+03 0.48912433D-02 0.78873978D-04
+ 0.25800000D+03 0.26100000D+03 0.46627394D-02 0.54875670D-04
+ 0.26100000D+03 0.26400000D+03 0.44570836D-02 0.61089016D-04
+ 0.26400000D+03 0.26700000D+03 0.44749432D-02 0.88791809D-04
+ 0.26700000D+03 0.27000000D+03 0.40875288D-02 0.93415658D-04
+ 0.27000000D+03 0.27300000D+03 0.39665783D-02 0.71789992D-04
+ 0.27300000D+03 0.27600000D+03 0.37051964D-02 0.89573856D-04
+ 0.27600000D+03 0.27900000D+03 0.36783498D-02 0.14928736D-03
+ 0.27900000D+03 0.28200000D+03 0.37090595D-02 0.14498768D-03
+ 0.28200000D+03 0.28500000D+03 0.33735692D-02 0.77667666D-04
+ 0.28500000D+03 0.28800000D+03 0.32466873D-02 0.58091196D-04
+ 0.28800000D+03 0.29100000D+03 0.31958516D-02 0.57135154D-04
+ 0.29100000D+03 0.29400000D+03 0.30305841D-02 0.55257029D-04
+ 0.29400000D+03 0.29700000D+03 0.29543289D-02 0.55066983D-04
+ 0.29700000D+03 0.30000000D+03 0.29252016D-02 0.18772996D-03
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 -.22191658D+01 0.50248820D-02
+ 0.30000000D+01 0.60000000D+01 0.94881771D+00 0.25359571D-02
+ 0.60000000D+01 0.90000000D+01 0.20209757D+01 0.20910930D-02
+ 0.90000000D+01 0.12000000D+02 0.17403419D+01 0.15695775D-02
+ 0.12000000D+02 0.15000000D+02 0.14127897D+01 0.13599987D-02
+ 0.15000000D+02 0.18000000D+02 0.11588733D+01 0.11865753D-02
+ 0.18000000D+02 0.21000000D+02 0.95919973D+00 0.12196373D-02
+ 0.21000000D+02 0.24000000D+02 0.81370292D+00 0.89752724D-02
+ 0.24000000D+02 0.27000000D+02 0.67471043D+00 0.89517810D-02
+ 0.27000000D+02 0.30000000D+02 0.58738817D+00 0.99029027D-03
+ 0.30000000D+02 0.33000000D+02 0.50932144D+00 0.16422884D-02
+ 0.33000000D+02 0.36000000D+02 0.43862993D+00 0.16115401D-02
+ 0.36000000D+02 0.39000000D+02 0.38568122D+00 0.85767662D-03
+ 0.39000000D+02 0.42000000D+02 0.34121844D+00 0.67704743D-03
+ 0.42000000D+02 0.45000000D+02 0.30103791D+00 0.64508059D-03
+ 0.45000000D+02 0.48000000D+02 0.26697866D+00 0.58548095D-03
+ 0.48000000D+02 0.51000000D+02 0.23810282D+00 0.56872031D-03
+ 0.51000000D+02 0.54000000D+02 0.21271296D+00 0.60914313D-03
+ 0.54000000D+02 0.57000000D+02 0.18954820D+00 0.62116925D-03
+ 0.57000000D+02 0.60000000D+02 0.17097673D+00 0.58246333D-03
+ 0.60000000D+02 0.63000000D+02 0.15380949D+00 0.50905879D-03
+ 0.63000000D+02 0.66000000D+02 0.13705349D+00 0.55579582D-03
+ 0.66000000D+02 0.69000000D+02 0.12530121D+00 0.62711606D-03
+ 0.69000000D+02 0.72000000D+02 0.11290947D+00 0.67989671D-03
+ 0.72000000D+02 0.75000000D+02 0.10113104D+00 0.52721925D-03
+ 0.75000000D+02 0.78000000D+02 0.92156044D-01 0.28493083D-03
+ 0.78000000D+02 0.81000000D+02 0.83261710D-01 0.36242654D-03
+ 0.81000000D+02 0.84000000D+02 0.76617408D-01 0.33019087D-03
+ 0.84000000D+02 0.87000000D+02 0.68666713D-01 0.25333726D-03
+ 0.87000000D+02 0.90000000D+02 0.62706552D-01 0.38785181D-03
+ 0.90000000D+02 0.93000000D+02 0.56955315D-01 0.37748780D-03
+ 0.93000000D+02 0.96000000D+02 0.51931400D-01 0.34654918D-03
+ 0.96000000D+02 0.99000000D+02 0.47493949D-01 0.34572761D-03
+ 0.99000000D+02 0.10200000D+03 0.43262533D-01 0.19408915D-03
+ 0.10200000D+03 0.10500000D+03 0.39595124D-01 0.18096327D-03
+ 0.10500000D+03 0.10800000D+03 0.36217341D-01 0.19330288D-03
+ 0.10800000D+03 0.11100000D+03 0.33014787D-01 0.17818439D-03
+ 0.11100000D+03 0.11400000D+03 0.30187691D-01 0.15035545D-03
+ 0.11400000D+03 0.11700000D+03 0.27751003D-01 0.12211421D-03
+ 0.11700000D+03 0.12000000D+03 0.25570181D-01 0.17544857D-03
+ 0.12000000D+03 0.12300000D+03 0.23257902D-01 0.18227851D-03
+ 0.12300000D+03 0.12600000D+03 0.21514635D-01 0.11875703D-03
+ 0.12600000D+03 0.12900000D+03 0.19303506D-01 0.23746967D-03
+ 0.12900000D+03 0.13200000D+03 0.18364750D-01 0.23834879D-03
+ 0.13200000D+03 0.13500000D+03 0.16646026D-01 0.88582990D-04
+ 0.13500000D+03 0.13800000D+03 0.15592995D-01 0.77595582D-04
+ 0.13800000D+03 0.14100000D+03 0.14041714D-01 0.92227546D-04
+ 0.14100000D+03 0.14400000D+03 0.13166292D-01 0.16098132D-03
+ 0.14400000D+03 0.14700000D+03 0.11531067D-01 0.39804308D-03
+ 0.14700000D+03 0.15000000D+03 0.11567152D-01 0.37341707D-03
+ 0.15000000D+03 0.15300000D+03 0.10339101D-01 0.62055322D-04
+ 0.15300000D+03 0.15600000D+03 0.92966912D-02 0.16040336D-03
+ 0.15600000D+03 0.15900000D+03 0.89559217D-02 0.16548801D-03
+ 0.15900000D+03 0.16200000D+03 0.81719788D-02 0.67832574D-04
+ 0.16200000D+03 0.16500000D+03 0.75463621D-02 0.48986512D-04
+ 0.16500000D+03 0.16800000D+03 0.69730546D-02 0.52109514D-04
+ 0.16800000D+03 0.17100000D+03 0.65452940D-02 0.52956053D-04
+ 0.17100000D+03 0.17400000D+03 0.60827689D-02 0.62196201D-04
+ 0.17400000D+03 0.17700000D+03 0.56038354D-02 0.68840533D-04
+ 0.17700000D+03 0.18000000D+03 0.52021525D-02 0.59567741D-04
+ 0.18000000D+03 0.18300000D+03 0.45428798D-02 0.20941878D-03
+ 0.18300000D+03 0.18600000D+03 0.48237984D-02 0.20840231D-03
+ 0.18600000D+03 0.18900000D+03 0.41405838D-02 0.39884992D-04
+ 0.18900000D+03 0.19200000D+03 0.39783597D-02 0.52316461D-04
+ 0.19200000D+03 0.19500000D+03 0.36304240D-02 0.48756081D-04
+ 0.19500000D+03 0.19800000D+03 0.33823688D-02 0.37556531D-04
+ 0.19800000D+03 0.20100000D+03 0.31718748D-02 0.39656875D-04
+ 0.20100000D+03 0.20400000D+03 0.29930683D-02 0.40464285D-04
+ 0.20400000D+03 0.20700000D+03 0.26718659D-02 0.46627043D-04
+ 0.20700000D+03 0.21000000D+03 0.26446739D-02 0.45174137D-04
+ 0.21000000D+03 0.21300000D+03 0.24251612D-02 0.33259443D-04
+ 0.21300000D+03 0.21600000D+03 0.22355578D-02 0.24832463D-04
+ 0.21600000D+03 0.21900000D+03 0.21961519D-02 0.65158907D-04
+ 0.21900000D+03 0.22200000D+03 0.19012573D-02 0.64927535D-04
+ 0.22200000D+03 0.22500000D+03 0.18443704D-02 0.27578706D-04
+ 0.22500000D+03 0.22800000D+03 0.17745330D-02 0.38463211D-04
+ 0.22800000D+03 0.23100000D+03 0.16626120D-02 0.34337472D-04
+ 0.23100000D+03 0.23400000D+03 0.15120059D-02 0.22210652D-04
+ 0.23400000D+03 0.23700000D+03 0.14446780D-02 0.19881381D-04
+ 0.23700000D+03 0.24000000D+03 0.13327404D-02 0.17200528D-04
+ 0.24000000D+03 0.24300000D+03 0.12591795D-02 0.17502330D-04
+ 0.24300000D+03 0.24600000D+03 0.12616672D-02 0.32759805D-04
+ 0.24600000D+03 0.24900000D+03 0.10665458D-02 0.31099431D-04
+ 0.24900000D+03 0.25200000D+03 0.10861121D-02 0.13770786D-04
+ 0.25200000D+03 0.25500000D+03 0.96063100D-03 0.17589327D-04
+ 0.25500000D+03 0.25800000D+03 0.93879737D-03 0.15222740D-04
+ 0.25800000D+03 0.26100000D+03 0.87826119D-03 0.10313361D-04
+ 0.26100000D+03 0.26400000D+03 0.82416457D-03 0.11292882D-04
+ 0.26400000D+03 0.26700000D+03 0.81216974D-03 0.16037296D-04
+ 0.26700000D+03 0.27000000D+03 0.72807218D-03 0.16700358D-04
+ 0.27000000D+03 0.27300000D+03 0.69381115D-03 0.12563980D-04
+ 0.27300000D+03 0.27600000D+03 0.63665482D-03 0.15330797D-04
+ 0.27600000D+03 0.27900000D+03 0.62092375D-03 0.25071944D-04
+ 0.27900000D+03 0.28200000D+03 0.61477491D-03 0.24151866D-04
+ 0.28200000D+03 0.28500000D+03 0.54904396D-03 0.12694558D-04
+ 0.28500000D+03 0.28800000D+03 0.51930772D-03 0.92885398D-05
+ 0.28800000D+03 0.29100000D+03 0.50223851D-03 0.89823720D-05
+ 0.29100000D+03 0.29400000D+03 0.46806820D-03 0.85314968D-05
+ 0.29400000D+03 0.29700000D+03 0.44840526D-03 0.83612804D-05
+ 0.29700000D+03 0.30000000D+03 0.43620043D-03 0.27790804D-04
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.38883520D+01 0.75858050D-03
+ 0.12500000D+03 0.13000000D+03 -.11287528D+02 0.36106921D-02
+ 0.13000000D+03 0.13500000D+03 0.39899965D+01 0.28860892D-02
+ 0.13500000D+03 0.14000000D+03 0.24747587D+01 0.21636876D-02
+ 0.14000000D+03 0.14500000D+03 0.16574449D+01 0.16008869D-02
+ 0.14500000D+03 0.15000000D+03 0.11915428D+01 0.14394032D-02
+ 0.15000000D+03 0.15500000D+03 0.90613136D+00 0.12164909D-02
+ 0.15500000D+03 0.16000000D+03 0.71080883D+00 0.10667297D-02
+ 0.16000000D+03 0.16500000D+03 0.57389568D+00 0.10325259D-02
+ 0.16500000D+03 0.17000000D+03 0.47509391D+00 0.96829650D-03
+ 0.17000000D+03 0.17500000D+03 0.39675813D+00 0.12495774D-02
+ 0.17500000D+03 0.18000000D+03 0.34265328D+00 0.14046411D-02
+ 0.18000000D+03 0.18500000D+03 0.29196459D+00 0.11332625D-02
+ 0.18500000D+03 0.19000000D+03 0.25648943D+00 0.90817276D-03
+ 0.19000000D+03 0.19500000D+03 0.22445965D+00 0.90797228D-03
+ 0.19500000D+03 0.20000000D+03 0.19935963D+00 0.92044341D-03
+ 0.20000000D+03 0.20500000D+03 0.17791208D+00 0.73305765D-03
+ 0.20500000D+03 0.21000000D+03 0.15777872D+00 0.59677173D-03
+ 0.21000000D+03 0.21500000D+03 0.14284112D+00 0.67727385D-03
+ 0.21500000D+03 0.22000000D+03 0.12823135D+00 0.12187787D-02
+ 0.22000000D+03 0.22500000D+03 0.11845754D+00 0.11717274D-02
+ 0.22500000D+03 0.23000000D+03 0.10613395D+00 0.52891816D-03
+ 0.23000000D+03 0.23500000D+03 0.97292876D-01 0.55535350D-03
+ 0.23500000D+03 0.24000000D+03 0.90297681D-01 0.51373758D-03
+ 0.24000000D+03 0.24500000D+03 0.81665721D-01 0.52327300D-03
+ 0.24500000D+03 0.25000000D+03 0.76051332D-01 0.48735761D-03
+ 0.25000000D+03 0.25500000D+03 0.69225055D-01 0.41804270D-03
+ 0.25500000D+03 0.26000000D+03 0.64121939D-01 0.74875514D-03
+ 0.26000000D+03 0.26500000D+03 0.61853608D-01 0.70756232D-03
+ 0.26500000D+03 0.27000000D+03 0.55710049D-01 0.32864445D-03
+ 0.27000000D+03 0.27500000D+03 0.51598164D-01 0.36336548D-03
+ 0.27500000D+03 0.28000000D+03 0.48433796D-01 0.66952620D-03
+ 0.28000000D+03 0.28500000D+03 0.45426932D-01 0.68040352D-03
+ 0.28500000D+03 0.29000000D+03 0.42057338D-01 0.43580127D-03
+ 0.29000000D+03 0.29500000D+03 0.40201748D-01 0.38152029D-03
+ 0.29500000D+03 0.30000000D+03 0.37478051D-01 0.28021093D-03
+ 0.30000000D+03 0.30500000D+03 0.34886147D-01 0.25787850D-03
+ 0.30500000D+03 0.31000000D+03 0.33088260D-01 0.26053494D-03
+ 0.31000000D+03 0.31500000D+03 0.30760912D-01 0.28565745D-03
+ 0.31500000D+03 0.32000000D+03 0.28960966D-01 0.27638136D-03
+ 0.32000000D+03 0.32500000D+03 0.27715791D-01 0.24767412D-03
+ 0.32500000D+03 0.33000000D+03 0.26051510D-01 0.29069869D-03
+ 0.33000000D+03 0.33500000D+03 0.24620691D-01 0.27579260D-03
+ 0.33500000D+03 0.34000000D+03 0.23371269D-01 0.19982858D-03
+ 0.34000000D+03 0.34500000D+03 0.22225430D-01 0.21534924D-03
+ 0.34500000D+03 0.35000000D+03 0.20768141D-01 0.25730961D-03
+ 0.35000000D+03 0.35500000D+03 0.19824171D-01 0.23699757D-03
+ 0.35500000D+03 0.36000000D+03 0.18840190D-01 0.27560580D-03
+ 0.36000000D+03 0.36500000D+03 0.18046328D-01 0.28269542D-03
+ 0.36500000D+03 0.37000000D+03 0.17155536D-01 0.18456530D-03
+ 0.37000000D+03 0.37500000D+03 0.15828883D-01 0.23978508D-03
+ 0.37500000D+03 0.38000000D+03 0.15389023D-01 0.31384092D-03
+ 0.38000000D+03 0.38500000D+03 0.15047625D-01 0.26357996D-03
+ 0.38500000D+03 0.39000000D+03 0.14020618D-01 0.16258619D-03
+ 0.39000000D+03 0.39500000D+03 0.12741013D-01 0.50149137D-03
+ 0.39500000D+03 0.40000000D+03 0.13196086D-01 0.51013510D-03
+ 0.40000000D+03 0.40500000D+03 0.12240784D-01 0.23480910D-03
+ 0.40500000D+03 0.41000000D+03 0.11791540D-01 0.20663417D-03
+ 0.41000000D+03 0.41500000D+03 0.11025064D-01 0.15773117D-03
+ 0.41500000D+03 0.42000000D+03 0.10900138D-01 0.15585997D-03
+ 0.42000000D+03 0.42500000D+03 0.98252393D-02 0.26521036D-03
+ 0.42500000D+03 0.43000000D+03 0.99619692D-02 0.27167073D-03
+ 0.43000000D+03 0.43500000D+03 0.91916099D-02 0.34839879D-03
+ 0.43500000D+03 0.44000000D+03 0.94578948D-02 0.33713687D-03
+ 0.44000000D+03 0.44500000D+03 0.84076007D-02 0.13865533D-03
+ 0.44500000D+03 0.45000000D+03 0.81132930D-02 0.19324578D-03
+ 0.45000000D+03 0.45500000D+03 0.80412174D-02 0.17654924D-03
+ 0.45500000D+03 0.46000000D+03 0.76985784D-02 0.11107831D-03
+ 0.46000000D+03 0.46500000D+03 0.72904670D-02 0.11028617D-03
+ 0.46500000D+03 0.47000000D+03 0.68592862D-02 0.13431466D-03
+ 0.47000000D+03 0.47500000D+03 0.68679455D-02 0.14038696D-03
+ 0.47500000D+03 0.48000000D+03 0.63617445D-02 0.22541539D-03
+ 0.48000000D+03 0.48500000D+03 0.64365770D-02 0.21633071D-03
+ 0.48500000D+03 0.49000000D+03 0.60828726D-02 0.94883002D-04
+ 0.49000000D+03 0.49500000D+03 0.57905526D-02 0.10440155D-03
+ 0.49500000D+03 0.50000000D+03 0.56323339D-02 0.10235213D-03
+ 0.50000000D+03 0.50500000D+03 0.52338936D-02 0.97930535D-04
+ 0.50500000D+03 0.51000000D+03 0.52468169D-02 0.97399438D-04
+ 0.51000000D+03 0.51500000D+03 0.50284297D-02 0.80656217D-04
+ 0.51500000D+03 0.52000000D+03 0.46879073D-02 0.87498521D-04
+ 0.52000000D+03 0.52500000D+03 0.45110962D-02 0.12919387D-03
+ 0.52500000D+03 0.53000000D+03 0.46805058D-02 0.12769737D-03
+ 0.53000000D+03 0.53500000D+03 0.43119401D-02 0.12177931D-03
+ 0.53500000D+03 0.54000000D+03 0.41924463D-02 0.12206969D-03
+ 0.54000000D+03 0.54500000D+03 0.41083559D-02 0.93400970D-04
+ 0.54500000D+03 0.55000000D+03 0.38830797D-02 0.91318809D-04
+ 0.55000000D+03 0.55500000D+03 0.36117285D-02 0.98443712D-04
+ 0.55500000D+03 0.56000000D+03 0.33733502D-02 0.29184222D-03
+ 0.56000000D+03 0.56500000D+03 0.38437090D-02 0.28687361D-03
+ 0.56500000D+03 0.57000000D+03 0.33265909D-02 0.11029240D-03
+ 0.57000000D+03 0.57500000D+03 0.33008997D-02 0.12712087D-03
+ 0.57500000D+03 0.58000000D+03 0.32498452D-02 0.99852127D-04
+ 0.58000000D+03 0.58500000D+03 0.31271024D-02 0.77739934D-04
+ 0.58500000D+03 0.59000000D+03 0.29169595D-02 0.94839467D-04
+ 0.59000000D+03 0.59500000D+03 0.29449849D-02 0.90064743D-04
+ 0.59500000D+03 0.60000000D+03 0.26683036D-02 0.77764504D-04
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.38883520D+01 0.75858050D-03
+ 0.12500000D+03 0.13000000D+03 -.11288137D+02 0.36083102D-02
+ 0.13000000D+03 0.13500000D+03 0.39759476D+01 0.28763090D-02
+ 0.13500000D+03 0.14000000D+03 0.24506650D+01 0.21444612D-02
+ 0.14000000D+03 0.14500000D+03 0.16259140D+01 0.15706832D-02
+ 0.14500000D+03 0.15000000D+03 0.11544186D+01 0.13947352D-02
+ 0.15000000D+03 0.15500000D+03 0.86451246D+00 0.11623125D-02
+ 0.15500000D+03 0.16000000D+03 0.66595735D+00 0.99899458D-03
+ 0.16000000D+03 0.16500000D+03 0.52664355D+00 0.94762749D-03
+ 0.16500000D+03 0.17000000D+03 0.42597845D+00 0.86870371D-03
+ 0.17000000D+03 0.17500000D+03 0.34681002D+00 0.10851842D-02
+ 0.17500000D+03 0.18000000D+03 0.29137328D+00 0.11966938D-02
+ 0.18000000D+03 0.18500000D+03 0.24105677D+00 0.93942318D-03
+ 0.18500000D+03 0.19000000D+03 0.20528182D+00 0.72780425D-03
+ 0.19000000D+03 0.19500000D+03 0.17385477D+00 0.70164423D-03
+ 0.19500000D+03 0.20000000D+03 0.14923598D+00 0.68992727D-03
+ 0.20000000D+03 0.20500000D+03 0.12854981D+00 0.53365152D-03
+ 0.20500000D+03 0.21000000D+03 0.10994166D+00 0.41458047D-03
+ 0.21000000D+03 0.21500000D+03 0.95898272D-01 0.45400949D-03
+ 0.21500000D+03 0.22000000D+03 0.82901052D-01 0.77777534D-03
+ 0.22000000D+03 0.22500000D+03 0.73683696D-01 0.73935488D-03
+ 0.22500000D+03 0.23000000D+03 0.63480583D-01 0.31631592D-03
+ 0.23000000D+03 0.23500000D+03 0.55958618D-01 0.31878110D-03
+ 0.23500000D+03 0.24000000D+03 0.49905264D-01 0.28536118D-03
+ 0.24000000D+03 0.24500000D+03 0.43367716D-01 0.27634890D-03
+ 0.24500000D+03 0.25000000D+03 0.38806684D-01 0.25100001D-03
+ 0.25000000D+03 0.25500000D+03 0.33940984D-01 0.20385105D-03
+ 0.25500000D+03 0.26000000D+03 0.30220094D-01 0.34855735D-03
+ 0.26000000D+03 0.26500000D+03 0.28001503D-01 0.32517472D-03
+ 0.26500000D+03 0.27000000D+03 0.24225977D-01 0.14299132D-03
+ 0.27000000D+03 0.27500000D+03 0.21570612D-01 0.15141139D-03
+ 0.27500000D+03 0.28000000D+03 0.19470649D-01 0.26571230D-03
+ 0.28000000D+03 0.28500000D+03 0.17561187D-01 0.26606744D-03
+ 0.28500000D+03 0.29000000D+03 0.15640785D-01 0.16192745D-03
+ 0.29000000D+03 0.29500000D+03 0.14383639D-01 0.13750336D-03
+ 0.29500000D+03 0.30000000D+03 0.12904474D-01 0.96725335D-04
+ 0.30000000D+03 0.30500000D+03 0.11564761D-01 0.85601237D-04
+ 0.30500000D+03 0.31000000D+03 0.10564206D-01 0.83069691D-04
+ 0.31000000D+03 0.31500000D+03 0.94630427D-02 0.87800117D-04
+ 0.31500000D+03 0.32000000D+03 0.85911153D-02 0.82215645D-04
+ 0.32000000D+03 0.32500000D+03 0.79290205D-02 0.70858522D-04
+ 0.32500000D+03 0.33000000D+03 0.71884323D-02 0.79863762D-04
+ 0.33000000D+03 0.33500000D+03 0.65569911D-02 0.73963596D-04
+ 0.33500000D+03 0.34000000D+03 0.60075306D-02 0.51507409D-04
+ 0.34000000D+03 0.34500000D+03 0.55177206D-02 0.53246209D-04
+ 0.34500000D+03 0.35000000D+03 0.49817023D-02 0.61627478D-04
+ 0.35000000D+03 0.35500000D+03 0.45970485D-02 0.55278673D-04
+ 0.35500000D+03 0.36000000D+03 0.42249758D-02 0.61234522D-04
+ 0.36000000D+03 0.36500000D+03 0.39146025D-02 0.61840963D-04
+ 0.36500000D+03 0.37000000D+03 0.36006531D-02 0.38805747D-04
+ 0.37000000D+03 0.37500000D+03 0.32175463D-02 0.48399096D-04
+ 0.37500000D+03 0.38000000D+03 0.30305228D-02 0.61627558D-04
+ 0.38000000D+03 0.38500000D+03 0.28707806D-02 0.50771232D-04
+ 0.38500000D+03 0.39000000D+03 0.25913068D-02 0.30045971D-04
+ 0.39000000D+03 0.39500000D+03 0.22850748D-02 0.88677221D-04
+ 0.39500000D+03 0.40000000D+03 0.22961923D-02 0.89816142D-04
+ 0.40000000D+03 0.40500000D+03 0.20653367D-02 0.39490188D-04
+ 0.40500000D+03 0.41000000D+03 0.19308832D-02 0.34095706D-04
+ 0.41000000D+03 0.41500000D+03 0.17531782D-02 0.25003969D-04
+ 0.41500000D+03 0.42000000D+03 0.16836346D-02 0.24148598D-04
+ 0.42000000D+03 0.42500000D+03 0.14747232D-02 0.39386313D-04
+ 0.42500000D+03 0.43000000D+03 0.14533005D-02 0.39985908D-04
+ 0.43000000D+03 0.43500000D+03 0.13041076D-02 0.48876569D-04
+ 0.43500000D+03 0.44000000D+03 0.13046621D-02 0.47089044D-04
+ 0.44000000D+03 0.44500000D+03 0.11278027D-02 0.18500815D-04
+ 0.44500000D+03 0.45000000D+03 0.10597335D-02 0.25155790D-04
+ 0.45000000D+03 0.45500000D+03 0.10228628D-02 0.22596902D-04
+ 0.45500000D+03 0.46000000D+03 0.95302478D-03 0.13800775D-04
+ 0.46000000D+03 0.46500000D+03 0.87919889D-03 0.13260322D-04
+ 0.46500000D+03 0.47000000D+03 0.80641413D-03 0.15758322D-04
+ 0.47000000D+03 0.47500000D+03 0.78675712D-03 0.16103838D-04
+ 0.47500000D+03 0.48000000D+03 0.71069765D-03 0.24987893D-04
+ 0.48000000D+03 0.48500000D+03 0.70130692D-03 0.23796729D-04
+ 0.48500000D+03 0.49000000D+03 0.64624573D-03 0.10096113D-04
+ 0.49000000D+03 0.49500000D+03 0.60021598D-03 0.10792791D-04
+ 0.49500000D+03 0.50000000D+03 0.56991425D-03 0.10400078D-04
+ 0.50000000D+03 0.50500000D+03 0.51700405D-03 0.96523481D-05
+ 0.50500000D+03 0.51000000D+03 0.50617751D-03 0.94245280D-05
+ 0.51000000D+03 0.51500000D+03 0.47371252D-03 0.76115451D-05
+ 0.51500000D+03 0.52000000D+03 0.43158382D-03 0.80340322D-05
+ 0.52000000D+03 0.52500000D+03 0.40605440D-03 0.11573539D-04
+ 0.52500000D+03 0.53000000D+03 0.41185956D-03 0.11287469D-04
+ 0.53000000D+03 0.53500000D+03 0.37061949D-03 0.10429820D-04
+ 0.53500000D+03 0.54000000D+03 0.35244837D-03 0.10316973D-04
+ 0.54000000D+03 0.54500000D+03 0.33789475D-03 0.76802143D-05
+ 0.54500000D+03 0.55000000D+03 0.31239441D-03 0.73590622D-05
+ 0.55000000D+03 0.55500000D+03 0.28442071D-03 0.77361508D-05
+ 0.55500000D+03 0.56000000D+03 0.26033135D-03 0.22297115D-04
+ 0.56000000D+03 0.56500000D+03 0.29029681D-03 0.21863527D-04
+ 0.56500000D+03 0.57000000D+03 0.24586272D-03 0.81100385D-05
+ 0.57000000D+03 0.57500000D+03 0.23896310D-03 0.92125024D-05
+ 0.57500000D+03 0.58000000D+03 0.23041141D-03 0.71130075D-05
+ 0.58000000D+03 0.58500000D+03 0.21718850D-03 0.53927124D-05
+ 0.58500000D+03 0.59000000D+03 0.19852744D-03 0.64386077D-05
+ 0.59000000D+03 0.59500000D+03 0.19649732D-03 0.60293752D-05
+ 0.59500000D+03 0.60000000D+03 0.17453059D-03 0.50798510D-05
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 -.55991614D+00 0.51493287D-02
+ 0.30000000D+01 0.60000000D+01 0.48207918D+00 0.27634353D-02
+ 0.60000000D+01 0.90000000D+01 0.18066061D+01 0.22052488D-02
+ 0.90000000D+01 0.12000000D+02 0.16103635D+01 0.17822896D-02
+ 0.12000000D+02 0.15000000D+02 0.13307883D+01 0.16732182D-02
+ 0.15000000D+02 0.18000000D+02 0.11003246D+01 0.16004115D-02
+ 0.18000000D+02 0.21000000D+02 0.92068573D+00 0.24743966D-02
+ 0.21000000D+02 0.24000000D+02 0.77368618D+00 0.56125292D-02
+ 0.24000000D+02 0.27000000D+02 0.67505080D+00 0.52216069D-02
+ 0.27000000D+02 0.30000000D+02 0.57689304D+00 0.12285403D-02
+ 0.30000000D+02 0.33000000D+02 0.50451671D+00 0.18311464D-02
+ 0.33000000D+02 0.36000000D+02 0.44949613D+00 0.20999953D-02
+ 0.36000000D+02 0.39000000D+02 0.39549906D+00 0.15722216D-02
+ 0.39000000D+02 0.42000000D+02 0.35309083D+00 0.13655189D-02
+ 0.42000000D+02 0.45000000D+02 0.31601557D+00 0.13011538D-02
+ 0.45000000D+02 0.48000000D+02 0.28415364D+00 0.91099949D-03
+ 0.48000000D+02 0.51000000D+02 0.25875491D+00 0.89951346D-03
+ 0.51000000D+02 0.54000000D+02 0.23440143D+00 0.92791048D-03
+ 0.54000000D+02 0.57000000D+02 0.21094483D+00 0.99876024D-03
+ 0.57000000D+02 0.60000000D+02 0.19523387D+00 0.87079932D-03
+ 0.60000000D+02 0.63000000D+02 0.17610546D+00 0.77000514D-03
+ 0.63000000D+02 0.66000000D+02 0.16306543D+00 0.80560370D-03
+ 0.66000000D+02 0.69000000D+02 0.15110120D+00 0.11985102D-02
+ 0.69000000D+02 0.72000000D+02 0.13552799D+00 0.12763615D-02
+ 0.72000000D+02 0.75000000D+02 0.12762673D+00 0.88190281D-03
+ 0.75000000D+02 0.78000000D+02 0.11704370D+00 0.99964208D-03
+ 0.78000000D+02 0.81000000D+02 0.10900940D+00 0.99985382D-03
+ 0.81000000D+02 0.84000000D+02 0.99341267D-01 0.70416939D-03
+ 0.84000000D+02 0.87000000D+02 0.93088747D-01 0.12814759D-02
+ 0.87000000D+02 0.90000000D+02 0.87520198D-01 0.13722778D-02
+ 0.90000000D+02 0.93000000D+02 0.80489126D-01 0.79362090D-03
+ 0.93000000D+02 0.96000000D+02 0.74537717D-01 0.64062421D-03
+ 0.96000000D+02 0.99000000D+02 0.70326078D-01 0.61943218D-03
+ 0.99000000D+02 0.10200000D+03 0.65689774D-01 0.62203045D-03
+ 0.10200000D+03 0.10500000D+03 0.60650797D-01 0.63907727D-03
+ 0.10500000D+03 0.10800000D+03 0.58003891D-01 0.70380207D-03
+ 0.10800000D+03 0.11100000D+03 0.52880854D-01 0.80061352D-03
+ 0.11100000D+03 0.11400000D+03 0.50363080D-01 0.68060133D-03
+ 0.11400000D+03 0.11700000D+03 0.46852280D-01 0.51768617D-03
+ 0.11700000D+03 0.12000000D+03 0.43922998D-01 0.41021142D-03
+ 0.12000000D+03 0.12300000D+03 0.41682993D-01 0.46736615D-03
+ 0.12300000D+03 0.12600000D+03 0.38489797D-01 0.51921568D-03
+ 0.12600000D+03 0.12900000D+03 0.37158814D-01 0.66680477D-03
+ 0.12900000D+03 0.13200000D+03 0.34442044D-01 0.59328889D-03
+ 0.13200000D+03 0.13500000D+03 0.32519759D-01 0.32988663D-03
+ 0.13500000D+03 0.13800000D+03 0.30858471D-01 0.32341244D-03
+ 0.13800000D+03 0.14100000D+03 0.28262670D-01 0.35668954D-03
+ 0.14100000D+03 0.14400000D+03 0.27833397D-01 0.50676824D-03
+ 0.14400000D+03 0.14700000D+03 0.26411354D-01 0.90296175D-03
+ 0.14700000D+03 0.15000000D+03 0.24006205D-01 0.82651598D-03
+ 0.15000000D+03 0.15300000D+03 0.22601940D-01 0.35780972D-03
+ 0.15300000D+03 0.15600000D+03 0.22711694D-01 0.69486183D-03
+ 0.15600000D+03 0.15900000D+03 0.19439363D-01 0.72419209D-03
+ 0.15900000D+03 0.16200000D+03 0.19866460D-01 0.39140562D-03
+ 0.16200000D+03 0.16500000D+03 0.18536053D-01 0.27283805D-03
+ 0.16500000D+03 0.16800000D+03 0.17754373D-01 0.26278342D-03
+ 0.16800000D+03 0.17100000D+03 0.16280915D-01 0.33762575D-03
+ 0.17100000D+03 0.17400000D+03 0.16159803D-01 0.34124606D-03
+ 0.17400000D+03 0.17700000D+03 0.15282387D-01 0.21869107D-03
+ 0.17700000D+03 0.18000000D+03 0.13993965D-01 0.22058006D-03
+ 0.18000000D+03 0.18300000D+03 0.14026683D-01 0.68908781D-03
+ 0.18300000D+03 0.18600000D+03 0.12724532D-01 0.68262112D-03
+ 0.18600000D+03 0.18900000D+03 0.12308592D-01 0.19272405D-03
+ 0.18900000D+03 0.19200000D+03 0.11525772D-01 0.23463826D-03
+ 0.19200000D+03 0.19500000D+03 0.10474477D-01 0.69169624D-03
+ 0.19500000D+03 0.19800000D+03 0.11497000D-01 0.67550875D-03
+ 0.19800000D+03 0.20100000D+03 0.10135484D-01 0.22785214D-03
+ 0.20100000D+03 0.20400000D+03 0.95312413D-02 0.23612682D-03
+ 0.20400000D+03 0.20700000D+03 0.95770949D-02 0.25855634D-03
+ 0.20700000D+03 0.21000000D+03 0.86345295D-02 0.25650064D-03
+ 0.21000000D+03 0.21300000D+03 0.85870595D-02 0.17246715D-03
+ 0.21300000D+03 0.21600000D+03 0.82867329D-02 0.36676272D-03
+ 0.21600000D+03 0.21900000D+03 0.73133908D-02 0.41082122D-03
+ 0.21900000D+03 0.22200000D+03 0.75083948D-02 0.24872288D-03
+ 0.22200000D+03 0.22500000D+03 0.68514702D-02 0.17975475D-03
+ 0.22500000D+03 0.22800000D+03 0.65153698D-02 0.27343409D-03
+ 0.22800000D+03 0.23100000D+03 0.63710708D-02 0.31727793D-03
+ 0.23100000D+03 0.23400000D+03 0.63398692D-02 0.30635010D-03
+ 0.23400000D+03 0.23700000D+03 0.57097595D-02 0.25022048D-03
+ 0.23700000D+03 0.24000000D+03 0.58255755D-02 0.12937602D-03
+ 0.24000000D+03 0.24300000D+03 0.53374724D-02 0.13113979D-03
+ 0.24300000D+03 0.24600000D+03 0.51838803D-02 0.15642918D-03
+ 0.24600000D+03 0.24900000D+03 0.51550403D-02 0.14270631D-03
+ 0.24900000D+03 0.25200000D+03 0.43389359D-02 0.13825210D-03
+ 0.25200000D+03 0.25500000D+03 0.49058822D-02 0.13785512D-03
+ 0.25500000D+03 0.25800000D+03 0.43274715D-02 0.98800525D-04
+ 0.25800000D+03 0.26100000D+03 0.43280855D-02 0.12058703D-03
+ 0.26100000D+03 0.26400000D+03 0.39457471D-02 0.12388277D-03
+ 0.26400000D+03 0.26700000D+03 0.36836509D-02 0.11406884D-03
+ 0.26700000D+03 0.27000000D+03 0.35339807D-02 0.16416524D-03
+ 0.27000000D+03 0.27300000D+03 0.38352160D-02 0.16033790D-03
+ 0.27300000D+03 0.27600000D+03 0.33681083D-02 0.12663777D-03
+ 0.27600000D+03 0.27900000D+03 0.35761024D-02 0.16027576D-03
+ 0.27900000D+03 0.28200000D+03 0.29958071D-02 0.15276821D-03
+ 0.28200000D+03 0.28500000D+03 0.29157368D-02 0.10213663D-03
+ 0.28500000D+03 0.28800000D+03 0.29723156D-02 0.97284086D-04
+ 0.28800000D+03 0.29100000D+03 0.27927104D-02 0.99662153D-04
+ 0.29100000D+03 0.29400000D+03 0.28821265D-02 0.91679478D-04
+ 0.29400000D+03 0.29700000D+03 0.25070079D-02 0.96387301D-04
+ 0.29700000D+03 0.30000000D+03 0.23714773D-02 0.18298727D-03
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 -.55722586D+00 0.51486660D-02
+ 0.30000000D+01 0.60000000D+01 0.48087926D+00 0.27597149D-02
+ 0.60000000D+01 0.90000000D+01 0.18000524D+01 0.21981500D-02
+ 0.90000000D+01 0.12000000D+02 0.15991091D+01 0.17695669D-02
+ 0.12000000D+02 0.15000000D+02 0.13154966D+01 0.16543018D-02
+ 0.15000000D+02 0.18000000D+02 0.10815341D+01 0.15725737D-02
+ 0.18000000D+02 0.21000000D+02 0.89886070D+00 0.24102217D-02
+ 0.21000000D+02 0.24000000D+02 0.74946889D+00 0.54200463D-02
+ 0.24000000D+02 0.27000000D+02 0.64814500D+00 0.50347962D-02
+ 0.27000000D+02 0.30000000D+02 0.54843155D+00 0.11671282D-02
+ 0.30000000D+02 0.33000000D+02 0.47445284D+00 0.17167633D-02
+ 0.33000000D+02 0.36000000D+02 0.41772924D+00 0.19528349D-02
+ 0.36000000D+02 0.39000000D+02 0.36287827D+00 0.14474742D-02
+ 0.39000000D+02 0.42000000D+02 0.31957346D+00 0.12322088D-02
+ 0.42000000D+02 0.45000000D+02 0.28191032D+00 0.11652161D-02
+ 0.45000000D+02 0.48000000D+02 0.24964826D+00 0.79973696D-03
+ 0.48000000D+02 0.51000000D+02 0.22371036D+00 0.77826804D-03
+ 0.51000000D+02 0.54000000D+02 0.19926847D+00 0.78752835D-03
+ 0.54000000D+02 0.57000000D+02 0.17622615D+00 0.83447404D-03
+ 0.57000000D+02 0.60000000D+02 0.16017575D+00 0.71602693D-03
+ 0.60000000D+02 0.63000000D+02 0.14180442D+00 0.61965039D-03
+ 0.63000000D+02 0.66000000D+02 0.12880476D+00 0.63611819D-03
+ 0.66000000D+02 0.69000000D+02 0.11699611D+00 0.92301797D-03
+ 0.69000000D+02 0.72000000D+02 0.10282677D+00 0.97178536D-03
+ 0.72000000D+02 0.75000000D+02 0.94851804D-01 0.65796135D-03
+ 0.75000000D+02 0.78000000D+02 0.85167259D-01 0.72327008D-03
+ 0.78000000D+02 0.81000000D+02 0.77623185D-01 0.71599514D-03
+ 0.81000000D+02 0.84000000D+02 0.69207871D-01 0.49029228D-03
+ 0.84000000D+02 0.87000000D+02 0.63442857D-01 0.86645889D-03
+ 0.87000000D+02 0.90000000D+02 0.58317528D-01 0.91911892D-03
+ 0.90000000D+02 0.93000000D+02 0.52421297D-01 0.52009341D-03
+ 0.93000000D+02 0.96000000D+02 0.47445490D-01 0.40622643D-03
+ 0.96000000D+02 0.99000000D+02 0.43739905D-01 0.38697651D-03
+ 0.99000000D+02 0.10200000D+03 0.39909163D-01 0.37599882D-03
+ 0.10200000D+03 0.10500000D+03 0.35992666D-01 0.38080708D-03
+ 0.10500000D+03 0.10800000D+03 0.33613942D-01 0.40545606D-03
+ 0.10800000D+03 0.11100000D+03 0.29925465D-01 0.45386746D-03
+ 0.11100000D+03 0.11400000D+03 0.27832849D-01 0.37684410D-03
+ 0.11400000D+03 0.11700000D+03 0.25279566D-01 0.28068112D-03
+ 0.11700000D+03 0.12000000D+03 0.23138072D-01 0.21585189D-03
+ 0.12000000D+03 0.12300000D+03 0.21439411D-01 0.23991566D-03
+ 0.12300000D+03 0.12600000D+03 0.19328753D-01 0.26046956D-03
+ 0.12600000D+03 0.12900000D+03 0.18217474D-01 0.32551871D-03
+ 0.12900000D+03 0.13200000D+03 0.16482245D-01 0.28624255D-03
+ 0.13200000D+03 0.13500000D+03 0.15195494D-01 0.15404121D-03
+ 0.13500000D+03 0.13800000D+03 0.14074586D-01 0.14770026D-03
+ 0.13800000D+03 0.14100000D+03 0.12588382D-01 0.15838059D-03
+ 0.14100000D+03 0.14400000D+03 0.12107621D-01 0.21942512D-03
+ 0.14400000D+03 0.14700000D+03 0.11212313D-01 0.38095892D-03
+ 0.14700000D+03 0.15000000D+03 0.99512670D-02 0.34632988D-03
+ 0.15000000D+03 0.15300000D+03 0.91555602D-02 0.14436957D-03
+ 0.15300000D+03 0.15600000D+03 0.89833993D-02 0.27291545D-03
+ 0.15600000D+03 0.15900000D+03 0.75109127D-02 0.28156286D-03
+ 0.15900000D+03 0.16200000D+03 0.75039322D-02 0.14887979D-03
+ 0.16200000D+03 0.16500000D+03 0.68408475D-02 0.10038686D-03
+ 0.16500000D+03 0.16800000D+03 0.64015604D-02 0.95067775D-04
+ 0.16800000D+03 0.17100000D+03 0.57375081D-02 0.11815453D-03
+ 0.17100000D+03 0.17400000D+03 0.55661438D-02 0.11823724D-03
+ 0.17400000D+03 0.17700000D+03 0.51443870D-02 0.73731347D-04
+ 0.17700000D+03 0.18000000D+03 0.46047768D-02 0.72484491D-04
+ 0.18000000D+03 0.18300000D+03 0.45121695D-02 0.21951419D-03
+ 0.18300000D+03 0.18600000D+03 0.40026506D-02 0.21697019D-03
+ 0.18600000D+03 0.18900000D+03 0.37873533D-02 0.59364298D-04
+ 0.18900000D+03 0.19200000D+03 0.34696524D-02 0.70364944D-04
+ 0.19200000D+03 0.19500000D+03 0.30882396D-02 0.20187095D-03
+ 0.19500000D+03 0.19800000D+03 0.33155684D-02 0.19656768D-03
+ 0.19800000D+03 0.20100000D+03 0.28581138D-02 0.64013796D-04
+ 0.20100000D+03 0.20400000D+03 0.26301716D-02 0.65325170D-04
+ 0.20400000D+03 0.20700000D+03 0.25871900D-02 0.69565663D-04
+ 0.20700000D+03 0.21000000D+03 0.22832678D-02 0.68102146D-04
+ 0.21000000D+03 0.21300000D+03 0.22225531D-02 0.44773099D-04
+ 0.21300000D+03 0.21600000D+03 0.20996153D-02 0.92171317D-04
+ 0.21600000D+03 0.21900000D+03 0.18147692D-02 0.10249658D-03
+ 0.21900000D+03 0.22200000D+03 0.18258482D-02 0.60782824D-04
+ 0.22200000D+03 0.22500000D+03 0.16321803D-02 0.42833219D-04
+ 0.22500000D+03 0.22800000D+03 0.15214408D-02 0.63484500D-04
+ 0.22800000D+03 0.23100000D+03 0.14587432D-02 0.72723643D-04
+ 0.23100000D+03 0.23400000D+03 0.14220590D-02 0.68624918D-04
+ 0.23400000D+03 0.23700000D+03 0.12555390D-02 0.55358074D-04
+ 0.23700000D+03 0.24000000D+03 0.12557727D-02 0.27933615D-04
+ 0.24000000D+03 0.24300000D+03 0.11281624D-02 0.27656522D-04
+ 0.24300000D+03 0.24600000D+03 0.10745075D-02 0.32372439D-04
+ 0.24600000D+03 0.24900000D+03 0.10475986D-02 0.29106714D-04
+ 0.24900000D+03 0.25200000D+03 0.86494521D-03 0.27483976D-04
+ 0.25200000D+03 0.25500000D+03 0.95990147D-03 0.27054076D-04
+ 0.25500000D+03 0.25800000D+03 0.83048286D-03 0.19002931D-04
+ 0.25800000D+03 0.26100000D+03 0.81514488D-03 0.22615802D-04
+ 0.26100000D+03 0.26400000D+03 0.72890141D-03 0.22991916D-04
+ 0.26400000D+03 0.26700000D+03 0.66825952D-03 0.20642012D-04
+ 0.26700000D+03 0.27000000D+03 0.63003568D-03 0.29145276D-04
+ 0.27000000D+03 0.27300000D+03 0.67126969D-03 0.28156271D-04
+ 0.27300000D+03 0.27600000D+03 0.57866690D-03 0.21732851D-04
+ 0.27600000D+03 0.27900000D+03 0.60309580D-03 0.26958366D-04
+ 0.27900000D+03 0.28200000D+03 0.49600770D-03 0.25424528D-04
+ 0.28200000D+03 0.28500000D+03 0.47484282D-03 0.16659148D-04
+ 0.28500000D+03 0.28800000D+03 0.47554032D-03 0.15544903D-04
+ 0.28800000D+03 0.29100000D+03 0.43917069D-03 0.15672720D-04
+ 0.29100000D+03 0.29400000D+03 0.44516614D-03 0.14168739D-04
+ 0.29400000D+03 0.29700000D+03 0.38051730D-03 0.14607078D-04
+ 0.29700000D+03 0.30000000D+03 0.35421595D-03 0.27147843D-04
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.15013132D+02 0.49860269D-02
+ 0.30000000D+01 0.60000000D+01 0.14819810D+02 0.76475906D-03
+ 0.60000000D+01 0.90000000D+01 0.54063399D+01 0.33644726D-03
+ 0.90000000D+01 0.12000000D+02 0.27634869D+01 0.18627479D-03
+ 0.12000000D+02 0.15000000D+02 0.16551885D+01 0.11961432D-03
+ 0.15000000D+02 0.18000000D+02 0.10883994D+01 0.84614249D-04
+ 0.18000000D+02 0.21000000D+02 0.76193668D+00 0.69178315D-04
+ 0.21000000D+02 0.24000000D+02 0.55769515D+00 0.48846041D-04
+ 0.24000000D+02 0.27000000D+02 0.42219483D+00 0.38377241D-04
+ 0.27000000D+02 0.30000000D+02 0.32803756D+00 0.32079601D-04
+ 0.30000000D+02 0.33000000D+02 0.26043710D+00 0.26583466D-04
+ 0.33000000D+02 0.36000000D+02 0.21036903D+00 0.22655275D-04
+ 0.36000000D+02 0.39000000D+02 0.17239955D+00 0.19780058D-04
+ 0.39000000D+02 0.42000000D+02 0.14304095D+00 0.16835855D-04
+ 0.42000000D+02 0.45000000D+02 0.11996225D+00 0.14394721D-04
+ 0.45000000D+02 0.48000000D+02 0.10159827D+00 0.13121515D-04
+ 0.48000000D+02 0.51000000D+02 0.86717971D-01 0.11640213D-04
+ 0.51000000D+02 0.54000000D+02 0.74580499D-01 0.10137584D-04
+ 0.54000000D+02 0.57000000D+02 0.64548579D-01 0.91721961D-05
+ 0.57000000D+02 0.60000000D+02 0.56226199D-01 0.81332191D-05
+ 0.60000000D+02 0.63000000D+02 0.49243984D-01 0.72327289D-05
+ 0.63000000D+02 0.66000000D+02 0.43338429D-01 0.65826028D-05
+ 0.66000000D+02 0.69000000D+02 0.38286185D-01 0.59154184D-05
+ 0.69000000D+02 0.72000000D+02 0.33994508D-01 0.55185854D-05
+ 0.72000000D+02 0.75000000D+02 0.30276351D-01 0.51285649D-05
+ 0.75000000D+02 0.78000000D+02 0.27080176D-01 0.45529232D-05
+ 0.78000000D+02 0.81000000D+02 0.24297634D-01 0.40805653D-05
+ 0.81000000D+02 0.84000000D+02 0.21865730D-01 0.40029715D-05
+ 0.84000000D+02 0.87000000D+02 0.19730443D-01 0.36268622D-05
+ 0.87000000D+02 0.90000000D+02 0.17858359D-01 0.33152213D-05
+ 0.90000000D+02 0.93000000D+02 0.16201982D-01 0.30420983D-05
+ 0.93000000D+02 0.96000000D+02 0.14738574D-01 0.30002371D-05
+ 0.96000000D+02 0.99000000D+02 0.13427403D-01 0.26352525D-05
+ 0.99000000D+02 0.10200000D+03 0.12271373D-01 0.24840885D-05
+ 0.10200000D+03 0.10500000D+03 0.11234550D-01 0.23064990D-05
+ 0.10500000D+03 0.10800000D+03 0.10305988D-01 0.21772055D-05
+ 0.10800000D+03 0.11100000D+03 0.94680357D-02 0.20447669D-05
+ 0.11100000D+03 0.11400000D+03 0.87194434D-02 0.19317608D-05
+ 0.11400000D+03 0.11700000D+03 0.80381174D-02 0.17952663D-05
+ 0.11700000D+03 0.12000000D+03 0.74216478D-02 0.17128400D-05
+ 0.12000000D+03 0.12300000D+03 0.68649171D-02 0.16168208D-05
+ 0.12300000D+03 0.12600000D+03 0.63622944D-02 0.14685539D-05
+ 0.12600000D+03 0.12900000D+03 0.58994948D-02 0.13975514D-05
+ 0.12900000D+03 0.13200000D+03 0.54805098D-02 0.13358381D-05
+ 0.13200000D+03 0.13500000D+03 0.50960105D-02 0.13332044D-05
+ 0.13500000D+03 0.13800000D+03 0.47445548D-02 0.11867950D-05
+ 0.13800000D+03 0.14100000D+03 0.44255484D-02 0.11595107D-05
+ 0.14100000D+03 0.14400000D+03 0.41292470D-02 0.10646368D-05
+ 0.14400000D+03 0.14700000D+03 0.38576094D-02 0.10227686D-05
+ 0.14700000D+03 0.15000000D+03 0.36069591D-02 0.96303234D-06
+ 0.15000000D+03 0.15300000D+03 0.33784263D-02 0.92986556D-06
+ 0.15300000D+03 0.15600000D+03 0.31649523D-02 0.87121122D-06
+ 0.15600000D+03 0.15900000D+03 0.29718513D-02 0.84069013D-06
+ 0.15900000D+03 0.16200000D+03 0.27890376D-02 0.80658960D-06
+ 0.16200000D+03 0.16500000D+03 0.26213434D-02 0.76295112D-06
+ 0.16500000D+03 0.16800000D+03 0.24663488D-02 0.72809559D-06
+ 0.16800000D+03 0.17100000D+03 0.23217973D-02 0.71436907D-06
+ 0.17100000D+03 0.17400000D+03 0.21864822D-02 0.67786353D-06
+ 0.17400000D+03 0.17700000D+03 0.20625364D-02 0.62491327D-06
+ 0.17700000D+03 0.18000000D+03 0.19451445D-02 0.60628591D-06
+ 0.18000000D+03 0.18300000D+03 0.18370168D-02 0.57881193D-06
+ 0.18300000D+03 0.18600000D+03 0.17372898D-02 0.55057605D-06
+ 0.18600000D+03 0.18900000D+03 0.16425598D-02 0.53408383D-06
+ 0.18900000D+03 0.19200000D+03 0.15535240D-02 0.50794359D-06
+ 0.19200000D+03 0.19500000D+03 0.14702719D-02 0.47927441D-06
+ 0.19500000D+03 0.19800000D+03 0.13937025D-02 0.47351951D-06
+ 0.19800000D+03 0.20100000D+03 0.13214056D-02 0.44269837D-06
+ 0.20100000D+03 0.20400000D+03 0.12539753D-02 0.43680546D-06
+ 0.20400000D+03 0.20700000D+03 0.11898742D-02 0.41341437D-06
+ 0.20700000D+03 0.21000000D+03 0.11302921D-02 0.39616307D-06
+ 0.21000000D+03 0.21300000D+03 0.10736708D-02 0.37359701D-06
+ 0.21300000D+03 0.21600000D+03 0.10207055D-02 0.36867179D-06
+ 0.21600000D+03 0.21900000D+03 0.97094712D-03 0.35326984D-06
+ 0.21900000D+03 0.22200000D+03 0.92498124D-03 0.35569163D-06
+ 0.22200000D+03 0.22500000D+03 0.88100907D-03 0.32596436D-06
+ 0.22500000D+03 0.22800000D+03 0.83880883D-03 0.31268048D-06
+ 0.22800000D+03 0.23100000D+03 0.79982738D-03 0.30081337D-06
+ 0.23100000D+03 0.23400000D+03 0.76172487D-03 0.29045343D-06
+ 0.23400000D+03 0.23700000D+03 0.72746622D-03 0.27932902D-06
+ 0.23700000D+03 0.24000000D+03 0.69460169D-03 0.28817273D-06
+ 0.24000000D+03 0.24300000D+03 0.66307531D-03 0.26641608D-06
+ 0.24300000D+03 0.24600000D+03 0.63362606D-03 0.26159527D-06
+ 0.24600000D+03 0.24900000D+03 0.60535391D-03 0.25105286D-06
+ 0.24900000D+03 0.25200000D+03 0.57884634D-03 0.23779027D-06
+ 0.25200000D+03 0.25500000D+03 0.55383488D-03 0.22803767D-06
+ 0.25500000D+03 0.25800000D+03 0.52974365D-03 0.21936701D-06
+ 0.25800000D+03 0.26100000D+03 0.50696095D-03 0.21959318D-06
+ 0.26100000D+03 0.26400000D+03 0.48567397D-03 0.20829072D-06
+ 0.26400000D+03 0.26700000D+03 0.46506887D-03 0.19800480D-06
+ 0.26700000D+03 0.27000000D+03 0.44602201D-03 0.19607641D-06
+ 0.27000000D+03 0.27300000D+03 0.42730334D-03 0.18996063D-06
+ 0.27300000D+03 0.27600000D+03 0.40996005D-03 0.18184235D-06
+ 0.27600000D+03 0.27900000D+03 0.39313304D-03 0.17363120D-06
+ 0.27900000D+03 0.28200000D+03 0.37702728D-03 0.16952739D-06
+ 0.28200000D+03 0.28500000D+03 0.36221276D-03 0.16550089D-06
+ 0.28500000D+03 0.28800000D+03 0.34806531D-03 0.16183619D-06
+ 0.28800000D+03 0.29100000D+03 0.33404499D-03 0.15319231D-06
+ 0.29100000D+03 0.29400000D+03 0.32109499D-03 0.14918177D-06
+ 0.29400000D+03 0.29700000D+03 0.30842401D-03 0.14423637D-06
+ 0.29700000D+03 0.30000000D+03 0.29695214D-03 0.14397149D-06
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX1-HH.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX1-HH.top
new file mode 100644
index 0000000000000000000000000000000000000000..87f10a326db8c6d637827cd9646f236134566444
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX1-HH.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.20010129D-05 0.55715080D-06
+ -.46000000D+01 -.45000000D+01 -.10290611D-03 0.36620292D-05
+ -.45000000D+01 -.44000000D+01 -.15461343D-03 0.77192147D-05
+ -.44000000D+01 -.43000000D+01 0.14387591D-02 0.26850717D-04
+ -.43000000D+01 -.42000000D+01 0.80236169D-02 0.88738148D-04
+ -.42000000D+01 -.41000000D+01 0.24374881D-01 0.21989962D-03
+ -.41000000D+01 -.40000000D+01 0.54599630D-01 0.53916531D-03
+ -.40000000D+01 -.39000000D+01 0.10536674D+00 0.97993061D-03
+ -.39000000D+01 -.38000000D+01 0.17280133D+00 0.13713343D-02
+ -.38000000D+01 -.37000000D+01 0.26105427D+00 0.21412314D-02
+ -.37000000D+01 -.36000000D+01 0.37655450D+00 0.27858848D-02
+ -.36000000D+01 -.35000000D+01 0.52124741D+00 0.41396368D-02
+ -.35000000D+01 -.34000000D+01 0.69337755D+00 0.78866509D-02
+ -.34000000D+01 -.33000000D+01 0.86785996D+00 0.57166748D-02
+ -.33000000D+01 -.32000000D+01 0.11083624D+01 0.62187500D-02
+ -.32000000D+01 -.31000000D+01 0.13583896D+01 0.97306445D-02
+ -.31000000D+01 -.30000000D+01 0.16161990D+01 0.10189730D-01
+ -.30000000D+01 -.29000000D+01 0.19742477D+01 0.31138851D-01
+ -.29000000D+01 -.28000000D+01 0.22759459D+01 0.11973750D-01
+ -.28000000D+01 -.27000000D+01 0.26563951D+01 0.11617856D-01
+ -.27000000D+01 -.26000000D+01 0.30253045D+01 0.10914080D-01
+ -.26000000D+01 -.25000000D+01 0.34678848D+01 0.21243202D-01
+ -.25000000D+01 -.24000000D+01 0.38669021D+01 0.13293726D-01
+ -.24000000D+01 -.23000000D+01 0.43349881D+01 0.15610316D-01
+ -.23000000D+01 -.22000000D+01 0.47410066D+01 0.16627872D-01
+ -.22000000D+01 -.21000000D+01 0.52579462D+01 0.23949369D-01
+ -.21000000D+01 -.20000000D+01 0.57101846D+01 0.17182611D-01
+ -.20000000D+01 -.19000000D+01 0.61278711D+01 0.17543682D-01
+ -.19000000D+01 -.18000000D+01 0.65946441D+01 0.17271762D-01
+ -.18000000D+01 -.17000000D+01 0.70450500D+01 0.21860842D-01
+ -.17000000D+01 -.16000000D+01 0.74400775D+01 0.23659623D-01
+ -.16000000D+01 -.15000000D+01 0.78787758D+01 0.21383714D-01
+ -.15000000D+01 -.14000000D+01 0.83164741D+01 0.37022007D-01
+ -.14000000D+01 -.13000000D+01 0.86619985D+01 0.24892159D-01
+ -.13000000D+01 -.12000000D+01 0.90711054D+01 0.23603624D-01
+ -.12000000D+01 -.11000000D+01 0.93848395D+01 0.21333089D-01
+ -.11000000D+01 -.10000000D+01 0.96708480D+01 0.23173291D-01
+ -.10000000D+01 -.90000000D+00 0.99115381D+01 0.25619635D-01
+ -.90000000D+00 -.80000000D+00 0.10176488D+02 0.22756869D-01
+ -.80000000D+00 -.70000000D+00 0.10493887D+02 0.48666219D-01
+ -.70000000D+00 -.60000000D+00 0.10672887D+02 0.23846881D-01
+ -.60000000D+00 -.50000000D+00 0.10783876D+02 0.27020144D-01
+ -.50000000D+00 -.40000000D+00 0.10996795D+02 0.25355465D-01
+ -.40000000D+00 -.30000000D+00 0.11128075D+02 0.48598444D-01
+ -.30000000D+00 -.20000000D+00 0.11176389D+02 0.41553574D-01
+ -.20000000D+00 -.10000000D+00 0.11205046D+02 0.24502708D-01
+ -.10000000D+00 0.18041124D-15 0.11233476D+02 0.22438425D-01
+ 0.70776718D-15 0.10000000D+00 0.11253914D+02 0.27949740D-01
+ 0.10000000D+00 0.20000000D+00 0.11250717D+02 0.25434801D-01
+ 0.20000000D+00 0.30000000D+00 0.11153914D+02 0.27302206D-01
+ 0.30000000D+00 0.40000000D+00 0.11042256D+02 0.53623523D-01
+ 0.40000000D+00 0.50000000D+00 0.10910161D+02 0.24595177D-01
+ 0.50000000D+00 0.60000000D+00 0.10833849D+02 0.39045708D-01
+ 0.60000000D+00 0.70000000D+00 0.10652417D+02 0.23812625D-01
+ 0.70000000D+00 0.80000000D+00 0.10398492D+02 0.42172970D-01
+ 0.80000000D+00 0.90000000D+00 0.10216395D+02 0.24972464D-01
+ 0.90000000D+00 0.10000000D+01 0.99176890D+01 0.22335372D-01
+ 0.10000000D+01 0.11000000D+01 0.96411136D+01 0.38507665D-01
+ 0.11000000D+01 0.12000000D+01 0.93627001D+01 0.30355407D-01
+ 0.12000000D+01 0.13000000D+01 0.90014511D+01 0.23597240D-01
+ 0.13000000D+01 0.14000000D+01 0.86818516D+01 0.22589352D-01
+ 0.14000000D+01 0.15000000D+01 0.82742412D+01 0.22842261D-01
+ 0.15000000D+01 0.16000000D+01 0.78626431D+01 0.21240545D-01
+ 0.16000000D+01 0.17000000D+01 0.74624119D+01 0.23428632D-01
+ 0.17000000D+01 0.18000000D+01 0.70482375D+01 0.17961814D-01
+ 0.18000000D+01 0.19000000D+01 0.65705791D+01 0.18350530D-01
+ 0.19000000D+01 0.20000000D+01 0.61174300D+01 0.17442085D-01
+ 0.20000000D+01 0.21000000D+01 0.56982994D+01 0.17733130D-01
+ 0.21000000D+01 0.22000000D+01 0.52452718D+01 0.16795100D-01
+ 0.22000000D+01 0.23000000D+01 0.43828561D+01 0.37127270D+00
+ 0.23000000D+01 0.24000000D+01 0.43398590D+01 0.18040210D-01
+ 0.24000000D+01 0.25000000D+01 0.38492088D+01 0.15703684D-01
+ 0.25000000D+01 0.26000000D+01 0.34263611D+01 0.14446637D-01
+ 0.26000000D+01 0.27000000D+01 0.30400193D+01 0.11709292D-01
+ 0.27000000D+01 0.28000000D+01 0.26522462D+01 0.13857485D-01
+ 0.28000000D+01 0.29000000D+01 0.22893318D+01 0.14299843D-01
+ 0.29000000D+01 0.30000000D+01 0.19396462D+01 0.10596095D-01
+ 0.30000000D+01 0.31000000D+01 0.16347593D+01 0.77953251D-02
+ 0.31000000D+01 0.32000000D+01 0.13577272D+01 0.15224941D-01
+ 0.32000000D+01 0.33000000D+01 0.10913673D+01 0.67681443D-02
+ 0.33000000D+01 0.34000000D+01 0.87756071D+00 0.86309618D-02
+ 0.34000000D+01 0.35000000D+01 0.67394215D+00 0.73310883D-02
+ 0.35000000D+01 0.36000000D+01 0.51282642D+00 0.39380354D-02
+ 0.36000000D+01 0.37000000D+01 0.37301428D+00 0.27965818D-02
+ 0.37000000D+01 0.38000000D+01 0.25829403D+00 0.22454759D-02
+ 0.38000000D+01 0.39000000D+01 0.17189211D+00 0.17563365D-02
+ 0.39000000D+01 0.40000000D+01 0.10256787D+00 0.86513791D-03
+ 0.40000000D+01 0.41000000D+01 0.54535533D-01 0.47614967D-03
+ 0.41000000D+01 0.42000000D+01 0.24399612D-01 0.23883086D-03
+ 0.42000000D+01 0.43000000D+01 0.80017368D-02 0.17108762D-03
+ 0.43000000D+01 0.44000000D+01 0.14413623D-02 0.26560851D-04
+ 0.44000000D+01 0.45000000D+01 -.15318836D-03 0.75930414D-05
+ 0.45000000D+01 0.46000000D+01 -.10477377D-03 0.36740398D-05
+ 0.46000000D+01 0.47000000D+01 -.19398652D-05 0.55585806D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19824164D-05 0.55714942D-06
+ -.46000000D+01 -.45000000D+01 -.99686606D-04 0.36616576D-05
+ -.45000000D+01 -.44000000D+01 -.14494658D-03 0.77180310D-05
+ -.44000000D+01 -.43000000D+01 0.13575389D-02 0.26819007D-04
+ -.43000000D+01 -.42000000D+01 0.74296739D-02 0.88637790D-04
+ -.42000000D+01 -.41000000D+01 0.22218163D-01 0.21963352D-03
+ -.41000000D+01 -.40000000D+01 0.48919208D-01 0.53833521D-03
+ -.40000000D+01 -.39000000D+01 0.93180554D-01 0.97790423D-03
+ -.39000000D+01 -.38000000D+01 0.15021074D+00 0.13671544D-02
+ -.38000000D+01 -.37000000D+01 0.22333114D+00 0.21268193D-02
+ -.37000000D+01 -.36000000D+01 0.31816084D+00 0.27776651D-02
+ -.36000000D+01 -.35000000D+01 0.43629375D+00 0.41273915D-02
+ -.35000000D+01 -.34000000D+01 0.57504044D+00 0.78714564D-02
+ -.34000000D+01 -.33000000D+01 0.70873009D+00 0.56807664D-02
+ -.33000000D+01 -.32000000D+01 0.90182021D+00 0.61702857D-02
+ -.32000000D+01 -.31000000D+01 0.10950973D+01 0.96915736D-02
+ -.31000000D+01 -.30000000D+01 0.12905293D+01 0.10027297D-01
+ -.30000000D+01 -.29000000D+01 0.15744356D+01 0.31071176D-01
+ -.29000000D+01 -.28000000D+01 0.17969071D+01 0.11922168D-01
+ -.28000000D+01 -.27000000D+01 0.20874342D+01 0.11491487D-01
+ -.27000000D+01 -.26000000D+01 0.23647936D+01 0.10758399D-01
+ -.26000000D+01 -.25000000D+01 0.27047823D+01 0.21208549D-01
+ -.25000000D+01 -.24000000D+01 0.29955756D+01 0.12927752D-01
+ -.24000000D+01 -.23000000D+01 0.33516224D+01 0.15289005D-01
+ -.23000000D+01 -.22000000D+01 0.36405359D+01 0.16523504D-01
+ -.22000000D+01 -.21000000D+01 0.40336934D+01 0.23866347D-01
+ -.21000000D+01 -.20000000D+01 0.43637039D+01 0.17068675D-01
+ -.20000000D+01 -.19000000D+01 0.46569688D+01 0.17313880D-01
+ -.19000000D+01 -.18000000D+01 0.49958983D+01 0.17136390D-01
+ -.18000000D+01 -.17000000D+01 0.53226089D+01 0.21734308D-01
+ -.17000000D+01 -.16000000D+01 0.55942024D+01 0.23479255D-01
+ -.16000000D+01 -.15000000D+01 0.59158510D+01 0.21053361D-01
+ -.15000000D+01 -.14000000D+01 0.62320860D+01 0.36977070D-01
+ -.14000000D+01 -.13000000D+01 0.64657962D+01 0.24702817D-01
+ -.13000000D+01 -.12000000D+01 0.67675025D+01 0.22689281D-01
+ -.12000000D+01 -.11000000D+01 0.69859013D+01 0.21183617D-01
+ -.11000000D+01 -.10000000D+01 0.71731109D+01 0.23054506D-01
+ -.10000000D+01 -.90000000D+00 0.73222870D+01 0.25022049D-01
+ -.90000000D+00 -.80000000D+00 0.75127524D+01 0.21986334D-01
+ -.80000000D+00 -.70000000D+00 0.77605293D+01 0.48612885D-01
+ -.70000000D+00 -.60000000D+00 0.78708314D+01 0.23798336D-01
+ -.60000000D+00 -.50000000D+00 0.79291338D+01 0.26735876D-01
+ -.50000000D+00 -.40000000D+00 0.80985268D+01 0.25240214D-01
+ -.40000000D+00 -.30000000D+00 0.81882754D+01 0.48460981D-01
+ -.30000000D+00 -.20000000D+00 0.82078894D+01 0.41459996D-01
+ -.20000000D+00 -.10000000D+00 0.82191861D+01 0.24314904D-01
+ -.10000000D+00 0.18041124D-15 0.82380848D+01 0.22320516D-01
+ 0.70776718D-15 0.10000000D+00 0.82604083D+01 0.28231819D-01
+ 0.10000000D+00 0.20000000D+00 0.82635521D+01 0.25238805D-01
+ 0.20000000D+00 0.30000000D+00 0.81901970D+01 0.27020001D-01
+ 0.30000000D+00 0.40000000D+00 0.81010290D+01 0.53520178D-01
+ 0.40000000D+00 0.50000000D+00 0.80110489D+01 0.24360878D-01
+ 0.50000000D+00 0.60000000D+00 0.79786987D+01 0.38974050D-01
+ 0.60000000D+00 0.70000000D+00 0.78507058D+01 0.23636446D-01
+ 0.70000000D+00 0.80000000D+00 0.76610392D+01 0.42069164D-01
+ 0.80000000D+00 0.90000000D+00 0.75540021D+01 0.24874205D-01
+ 0.90000000D+00 0.10000000D+01 0.73313562D+01 0.22207154D-01
+ 0.10000000D+01 0.11000000D+01 0.71429268D+01 0.38373337D-01
+ 0.11000000D+01 0.12000000D+01 0.69624943D+01 0.30146030D-01
+ 0.12000000D+01 0.13000000D+01 0.67009282D+01 0.23454383D-01
+ 0.13000000D+01 0.14000000D+01 0.64878421D+01 0.22414138D-01
+ 0.14000000D+01 0.15000000D+01 0.61885596D+01 0.22803934D-01
+ 0.15000000D+01 0.16000000D+01 0.58986274D+01 0.21001046D-01
+ 0.16000000D+01 0.17000000D+01 0.56159804D+01 0.23358019D-01
+ 0.17000000D+01 0.18000000D+01 0.53250866D+01 0.17803300D-01
+ 0.18000000D+01 0.19000000D+01 0.49757968D+01 0.18183743D-01
+ 0.19000000D+01 0.20000000D+01 0.46446108D+01 0.17357767D-01
+ 0.20000000D+01 0.21000000D+01 0.43520485D+01 0.17624990D-01
+ 0.21000000D+01 0.22000000D+01 0.40214615D+01 0.16722579D-01
+ 0.22000000D+01 0.23000000D+01 0.32815647D+01 0.37120301D+00
+ 0.23000000D+01 0.24000000D+01 0.33549931D+01 0.17966517D-01
+ 0.24000000D+01 0.25000000D+01 0.29792588D+01 0.15646597D-01
+ 0.25000000D+01 0.26000000D+01 0.26640669D+01 0.14271712D-01
+ 0.26000000D+01 0.27000000D+01 0.23773645D+01 0.11507201D-01
+ 0.27000000D+01 0.28000000D+01 0.20835077D+01 0.13812416D-01
+ 0.28000000D+01 0.29000000D+01 0.18100749D+01 0.14250468D-01
+ 0.29000000D+01 0.30000000D+01 0.15407129D+01 0.10549351D-01
+ 0.30000000D+01 0.31000000D+01 0.13077807D+01 0.77685956D-02
+ 0.31000000D+01 0.32000000D+01 0.10948994D+01 0.15206600D-01
+ 0.32000000D+01 0.33000000D+01 0.88441607D+00 0.67348822D-02
+ 0.33000000D+01 0.34000000D+01 0.71878348D+00 0.86182415D-02
+ 0.34000000D+01 0.35000000D+01 0.55540974D+00 0.73210371D-02
+ 0.35000000D+01 0.36000000D+01 0.42748670D+00 0.38954603D-02
+ 0.36000000D+01 0.37000000D+01 0.31513849D+00 0.27464305D-02
+ 0.37000000D+01 0.38000000D+01 0.22050931D+00 0.22375200D-02
+ 0.38000000D+01 0.39000000D+01 0.14936494D+00 0.17506524D-02
+ 0.39000000D+01 0.40000000D+01 0.90400174D-01 0.86248620D-03
+ 0.40000000D+01 0.41000000D+01 0.48856065D-01 0.47473389D-03
+ 0.41000000D+01 0.42000000D+01 0.22241819D-01 0.23844934D-03
+ 0.42000000D+01 0.43000000D+01 0.74059435D-02 0.17100361D-03
+ 0.43000000D+01 0.44000000D+01 0.13598625D-02 0.26544220D-04
+ 0.44000000D+01 0.45000000D+01 -.14360356D-03 0.75921545D-05
+ 0.45000000D+01 0.46000000D+01 -.10155493D-03 0.36736635D-05
+ 0.46000000D+01 0.47000000D+01 -.19215137D-05 0.55585462D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19913398D-05 0.55715009D-06
+ -.46000000D+01 -.45000000D+01 -.10116518D-03 0.36618326D-05
+ -.45000000D+01 -.44000000D+01 -.14902547D-03 0.77185775D-05
+ -.44000000D+01 -.43000000D+01 0.13944998D-02 0.26832632D-04
+ -.43000000D+01 -.42000000D+01 0.76871050D-02 0.88683076D-04
+ -.42000000D+01 -.41000000D+01 0.23125923D-01 0.21975621D-03
+ -.41000000D+01 -.40000000D+01 0.51249141D-01 0.53870258D-03
+ -.40000000D+01 -.39000000D+01 0.98053557D-01 0.97877666D-03
+ -.39000000D+01 -.38000000D+01 0.15903181D+00 0.13688280D-02
+ -.38000000D+01 -.37000000D+01 0.23774099D+00 0.21333208D-02
+ -.37000000D+01 -.36000000D+01 0.33998762D+00 0.27810076D-02
+ -.36000000D+01 -.35000000D+01 0.46740542D+00 0.41325591D-02
+ -.35000000D+01 -.34000000D+01 0.61759604D+00 0.78771499D-02
+ -.34000000D+01 -.33000000D+01 0.76505600D+00 0.56948968D-02
+ -.33000000D+01 -.32000000D+01 0.97372451D+00 0.61875482D-02
+ -.32000000D+01 -.31000000D+01 0.11854806D+01 0.97090495D-02
+ -.31000000D+01 -.30000000D+01 0.14009439D+01 0.10061204D-01
+ -.30000000D+01 -.29000000D+01 0.17082285D+01 0.31087493D-01
+ -.29000000D+01 -.28000000D+01 0.19554772D+01 0.11944638D-01
+ -.28000000D+01 -.27000000D+01 0.22733444D+01 0.11515091D-01
+ -.27000000D+01 -.26000000D+01 0.25793133D+01 0.10788271D-01
+ -.26000000D+01 -.25000000D+01 0.29499187D+01 0.21224113D-01
+ -.25000000D+01 -.24000000D+01 0.32729347D+01 0.12983582D-01
+ -.24000000D+01 -.23000000D+01 0.36626126D+01 0.15338900D-01
+ -.23000000D+01 -.22000000D+01 0.39856080D+01 0.16550293D-01
+ -.22000000D+01 -.21000000D+01 0.44146433D+01 0.23884285D-01
+ -.21000000D+01 -.20000000D+01 0.47801204D+01 0.17096866D-01
+ -.20000000D+01 -.19000000D+01 0.51092497D+01 0.17358301D-01
+ -.19000000D+01 -.18000000D+01 0.54836882D+01 0.17159882D-01
+ -.18000000D+01 -.17000000D+01 0.58453146D+01 0.21787089D-01
+ -.17000000D+01 -.16000000D+01 0.61515508D+01 0.23546516D-01
+ -.16000000D+01 -.15000000D+01 0.65060142D+01 0.21120804D-01
+ -.15000000D+01 -.14000000D+01 0.68551140D+01 0.36971603D-01
+ -.14000000D+01 -.13000000D+01 0.71190926D+01 0.24748506D-01
+ -.13000000D+01 -.12000000D+01 0.74508459D+01 0.23023005D-01
+ -.12000000D+01 -.11000000D+01 0.76947090D+01 0.21223033D-01
+ -.11000000D+01 -.10000000D+01 0.79083574D+01 0.23092620D-01
+ -.10000000D+01 -.90000000D+00 0.80817654D+01 0.25135437D-01
+ -.90000000D+00 -.80000000D+00 0.82924651D+01 0.22125182D-01
+ -.80000000D+00 -.70000000D+00 0.85583515D+01 0.48631926D-01
+ -.70000000D+00 -.60000000D+00 0.86869754D+01 0.23841380D-01
+ -.60000000D+00 -.50000000D+00 0.87590058D+01 0.26835145D-01
+ -.50000000D+00 -.40000000D+00 0.89400636D+01 0.25273593D-01
+ -.40000000D+00 -.30000000D+00 0.90406210D+01 0.48526114D-01
+ -.30000000D+00 -.20000000D+00 0.90676099D+01 0.41490103D-01
+ -.20000000D+00 -.10000000D+00 0.90837636D+01 0.24365714D-01
+ -.10000000D+00 0.18041124D-15 0.91046826D+01 0.22361458D-01
+ 0.70776718D-15 0.10000000D+00 0.91269647D+01 0.28201980D-01
+ 0.10000000D+00 0.20000000D+00 0.91280747D+01 0.25288088D-01
+ 0.20000000D+00 0.30000000D+00 0.90493797D+01 0.27124480D-01
+ 0.30000000D+00 0.40000000D+00 0.89532382D+01 0.53555053D-01
+ 0.40000000D+00 0.50000000D+00 0.88524172D+01 0.24403945D-01
+ 0.50000000D+00 0.60000000D+00 0.88088351D+01 0.38997832D-01
+ 0.60000000D+00 0.70000000D+00 0.86666896D+01 0.23675634D-01
+ 0.70000000D+00 0.80000000D+00 0.84601747D+01 0.42091224D-01
+ 0.80000000D+00 0.90000000D+00 0.83330759D+01 0.24900726D-01
+ 0.90000000D+00 0.10000000D+01 0.80902059D+01 0.22244634D-01
+ 0.10000000D+01 0.11000000D+01 0.78781090D+01 0.38416080D-01
+ 0.11000000D+01 0.12000000D+01 0.76717299D+01 0.30199342D-01
+ 0.12000000D+01 0.13000000D+01 0.73829805D+01 0.23489930D-01
+ 0.13000000D+01 0.14000000D+01 0.71410160D+01 0.22473841D-01
+ 0.14000000D+01 0.15000000D+01 0.68116575D+01 0.22816041D-01
+ 0.15000000D+01 0.16000000D+01 0.64887683D+01 0.21071348D-01
+ 0.16000000D+01 0.17000000D+01 0.61733191D+01 0.23382252D-01
+ 0.17000000D+01 0.18000000D+01 0.58482331D+01 0.17855281D-01
+ 0.18000000D+01 0.19000000D+01 0.54627085D+01 0.18235745D-01
+ 0.19000000D+01 0.20000000D+01 0.50973152D+01 0.17388979D-01
+ 0.20000000D+01 0.21000000D+01 0.47683025D+01 0.17663457D-01
+ 0.21000000D+01 0.22000000D+01 0.44023976D+01 0.16743446D-01
+ 0.22000000D+01 0.23000000D+01 0.36265629D+01 0.37123594D+00
+ 0.23000000D+01 0.24000000D+01 0.36662122D+01 0.17990920D-01
+ 0.24000000D+01 0.25000000D+01 0.32564413D+01 0.15665227D-01
+ 0.25000000D+01 0.26000000D+01 0.29092276D+01 0.14299863D-01
+ 0.26000000D+01 0.27000000D+01 0.25920130D+01 0.11538897D-01
+ 0.27000000D+01 0.28000000D+01 0.22696553D+01 0.13825024D-01
+ 0.28000000D+01 0.29000000D+01 0.19686730D+01 0.14265201D-01
+ 0.29000000D+01 0.30000000D+01 0.16742949D+01 0.10564002D-01
+ 0.30000000D+01 0.31000000D+01 0.14186309D+01 0.77787589D-02
+ 0.31000000D+01 0.32000000D+01 0.11850658D+01 0.15212690D-01
+ 0.32000000D+01 0.33000000D+01 0.95656510D+00 0.67460595D-02
+ 0.33000000D+01 0.34000000D+01 0.77495120D+00 0.86232401D-02
+ 0.34000000D+01 0.35000000D+01 0.59803364D+00 0.73252362D-02
+ 0.35000000D+01 0.36000000D+01 0.45874894D+00 0.39111514D-02
+ 0.36000000D+01 0.37000000D+01 0.33677158D+00 0.27644225D-02
+ 0.37000000D+01 0.38000000D+01 0.23493589D+00 0.22406503D-02
+ 0.38000000D+01 0.39000000D+01 0.15816058D+00 0.17530672D-02
+ 0.39000000D+01 0.40000000D+01 0.95267743D-01 0.86353989D-03
+ 0.40000000D+01 0.41000000D+01 0.51184314D-01 0.47537772D-03
+ 0.41000000D+01 0.42000000D+01 0.23149768D-01 0.23861903D-03
+ 0.42000000D+01 0.43000000D+01 0.76641560D-02 0.17104315D-03
+ 0.43000000D+01 0.44000000D+01 0.13969483D-02 0.26551923D-04
+ 0.44000000D+01 0.45000000D+01 -.14764841D-03 0.75925607D-05
+ 0.45000000D+01 0.46000000D+01 -.10303330D-03 0.36738407D-05
+ 0.46000000D+01 0.47000000D+01 -.19303188D-05 0.55585629D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19962220D-05 0.55715045D-06
+ -.46000000D+01 -.45000000D+01 -.10202275D-03 0.36619307D-05
+ -.45000000D+01 -.44000000D+01 -.15164174D-03 0.77188916D-05
+ -.44000000D+01 -.43000000D+01 0.14162646D-02 0.26841208D-04
+ -.43000000D+01 -.42000000D+01 0.78472103D-02 0.88709805D-04
+ -.42000000D+01 -.41000000D+01 0.23708258D-01 0.21982669D-03
+ -.41000000D+01 -.40000000D+01 0.52783004D-01 0.53892428D-03
+ -.40000000D+01 -.39000000D+01 0.10134017D+00 0.97931646D-03
+ -.39000000D+01 -.38000000D+01 0.16511087D+00 0.13699386D-02
+ -.38000000D+01 -.37000000D+01 0.24785982D+00 0.21371492D-02
+ -.37000000D+01 -.36000000D+01 0.35559291D+00 0.27831972D-02
+ -.36000000D+01 -.35000000D+01 0.49000146D+00 0.41358157D-02
+ -.35000000D+01 -.34000000D+01 0.64892817D+00 0.78811700D-02
+ -.34000000D+01 -.33000000D+01 0.80698066D+00 0.57046968D-02
+ -.33000000D+01 -.32000000D+01 0.10278611D+01 0.62004330D-02
+ -.32000000D+01 -.31000000D+01 0.12541609D+01 0.97191902D-02
+ -.31000000D+01 -.30000000D+01 0.14854513D+01 0.10100414D-01
+ -.30000000D+01 -.29000000D+01 0.18115287D+01 0.31104047D-01
+ -.29000000D+01 -.28000000D+01 0.20786641D+01 0.11958164D-01
+ -.28000000D+01 -.27000000D+01 0.24188005D+01 0.11535545D-01
+ -.27000000D+01 -.26000000D+01 0.27478086D+01 0.10815193D-01
+ -.26000000D+01 -.25000000D+01 0.31435793D+01 0.21232691D-01
+ -.25000000D+01 -.24000000D+01 0.34931753D+01 0.13055616D-01
+ -.24000000D+01 -.23000000D+01 0.39102964D+01 0.15402125D-01
+ -.23000000D+01 -.22000000D+01 0.42617040D+01 0.16573557D-01
+ -.22000000D+01 -.21000000D+01 0.47207026D+01 0.23902297D-01
+ -.21000000D+01 -.20000000D+01 0.51156743D+01 0.17122887D-01
+ -.20000000D+01 -.19000000D+01 0.54747517D+01 0.17400924D-01
+ -.19000000D+01 -.18000000D+01 0.58794754D+01 0.17181451D-01
+ -.18000000D+01 -.17000000D+01 0.62705496D+01 0.21822510D-01
+ -.17000000D+01 -.16000000D+01 0.66060669D+01 0.23590146D-01
+ -.16000000D+01 -.15000000D+01 0.69883263D+01 0.21183683D-01
+ -.15000000D+01 -.14000000D+01 0.73657289D+01 0.36968899D-01
+ -.14000000D+01 -.13000000D+01 0.76556957D+01 0.24782295D-01
+ -.13000000D+01 -.12000000D+01 0.80130083D+01 0.23254173D-01
+ -.12000000D+01 -.11000000D+01 0.82788318D+01 0.21255394D-01
+ -.11000000D+01 -.10000000D+01 0.85154113D+01 0.23120973D-01
+ -.10000000D+01 -.90000000D+00 0.87100531D+01 0.25274208D-01
+ -.90000000D+00 -.80000000D+00 0.89379165D+01 0.22301285D-01
+ -.80000000D+00 -.70000000D+00 0.92196921D+01 0.48647857D-01
+ -.70000000D+00 -.60000000D+00 0.93641831D+01 0.23864303D-01
+ -.60000000D+00 -.50000000D+00 0.94483155D+01 0.26908084D-01
+ -.50000000D+00 -.40000000D+00 0.96393760D+01 0.25300898D-01
+ -.40000000D+00 -.30000000D+00 0.97495234D+01 0.48560697D-01
+ -.30000000D+00 -.20000000D+00 0.97829664D+01 0.41510053D-01
+ -.20000000D+00 -.10000000D+00 0.98031701D+01 0.24411081D-01
+ -.10000000D+00 0.18041124D-15 0.98260907D+01 0.22391582D-01
+ 0.70776718D-15 0.10000000D+00 0.98482297D+01 0.28147857D-01
+ 0.10000000D+00 0.20000000D+00 0.98476958D+01 0.25332240D-01
+ 0.20000000D+00 0.30000000D+00 0.97638630D+01 0.27198528D-01
+ 0.30000000D+00 0.40000000D+00 0.96621528D+01 0.53583289D-01
+ 0.40000000D+00 0.50000000D+00 0.95517524D+01 0.24454545D-01
+ 0.50000000D+00 0.60000000D+00 0.94983245D+01 0.39016065D-01
+ 0.60000000D+00 0.70000000D+00 0.93438734D+01 0.23711127D-01
+ 0.70000000D+00 0.80000000D+00 0.91226180D+01 0.42112195D-01
+ 0.80000000D+00 0.90000000D+00 0.89781394D+01 0.24922196D-01
+ 0.90000000D+00 0.10000000D+01 0.87178062D+01 0.22274235D-01
+ 0.10000000D+01 0.11000000D+01 0.84851501D+01 0.38448343D-01
+ 0.11000000D+01 0.12000000D+01 0.82562449D+01 0.30244943D-01
+ 0.12000000D+01 0.13000000D+01 0.79442189D+01 0.23520325D-01
+ 0.13000000D+01 0.14000000D+01 0.76773502D+01 0.22512909D-01
+ 0.14000000D+01 0.15000000D+01 0.73225023D+01 0.22822191D-01
+ 0.15000000D+01 0.16000000D+01 0.69712007D+01 0.21129143D-01
+ 0.16000000D+01 0.17000000D+01 0.66279195D+01 0.23399216D-01
+ 0.17000000D+01 0.18000000D+01 0.62737369D+01 0.17896100D-01
+ 0.18000000D+01 0.19000000D+01 0.58576490D+01 0.18278555D-01
+ 0.19000000D+01 0.20000000D+01 0.54632192D+01 0.17410580D-01
+ 0.20000000D+01 0.21000000D+01 0.51037107D+01 0.17691800D-01
+ 0.21000000D+01 0.22000000D+01 0.47084329D+01 0.16759864D-01
+ 0.22000000D+01 0.23000000D+01 0.39027331D+01 0.37125405D+00
+ 0.23000000D+01 0.24000000D+01 0.39142489D+01 0.18009560D-01
+ 0.24000000D+01 0.25000000D+01 0.34763594D+01 0.15679690D-01
+ 0.25000000D+01 0.26000000D+01 0.31027297D+01 0.14332617D-01
+ 0.26000000D+01 0.27000000D+01 0.27608525D+01 0.11576846D-01
+ 0.27000000D+01 0.28000000D+01 0.24152349D+01 0.13835574D-01
+ 0.28000000D+01 0.29000000D+01 0.20918866D+01 0.14277459D-01
+ 0.29000000D+01 0.30000000D+01 0.17773542D+01 0.10575681D-01
+ 0.30000000D+01 0.31000000D+01 0.15035117D+01 0.77857131D-02
+ 0.31000000D+01 0.32000000D+01 0.12535974D+01 0.15217270D-01
+ 0.32000000D+01 0.33000000D+01 0.10108357D+01 0.67544688D-02
+ 0.33000000D+01 0.34000000D+01 0.81678137D+00 0.86265190D-02
+ 0.34000000D+01 0.35000000D+01 0.62941480D+00 0.73278636D-02
+ 0.35000000D+01 0.36000000D+01 0.48145189D+00 0.39227905D-02
+ 0.36000000D+01 0.37000000D+01 0.35223401D+00 0.27782435D-02
+ 0.37000000D+01 0.38000000D+01 0.24507173D+00 0.22427450D-02
+ 0.38000000D+01 0.39000000D+01 0.16422226D+00 0.17546030D-02
+ 0.39000000D+01 0.40000000D+01 0.98549398D-01 0.86424467D-03
+ 0.40000000D+01 0.41000000D+01 0.52717860D-01 0.47575485D-03
+ 0.41000000D+01 0.42000000D+01 0.23732389D-01 0.23872068D-03
+ 0.42000000D+01 0.43000000D+01 0.78247628D-02 0.17106527D-03
+ 0.43000000D+01 0.44000000D+01 0.14187885D-02 0.26556323D-04
+ 0.44000000D+01 0.45000000D+01 -.15024240D-03 0.75927958D-05
+ 0.45000000D+01 0.46000000D+01 -.10389068D-03 0.36739400D-05
+ 0.46000000D+01 0.47000000D+01 -.19351369D-05 0.55585719D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19985559D-05 0.55715063D-06
+ -.46000000D+01 -.45000000D+01 -.10244738D-03 0.36619784D-05
+ -.45000000D+01 -.44000000D+01 -.15302897D-03 0.77190469D-05
+ -.44000000D+01 -.43000000D+01 0.14270875D-02 0.26845684D-04
+ -.43000000D+01 -.42000000D+01 0.79303261D-02 0.88723291D-04
+ -.42000000D+01 -.41000000D+01 0.24018258D-01 0.21986163D-03
+ -.41000000D+01 -.40000000D+01 0.53617530D-01 0.53903804D-03
+ -.40000000D+01 -.39000000D+01 0.10316654D+00 0.97960124D-03
+ -.39000000D+01 -.38000000D+01 0.16855553D+00 0.13705620D-02
+ -.38000000D+01 -.37000000D+01 0.25369650D+00 0.21390822D-02
+ -.37000000D+01 -.36000000D+01 0.36474956D+00 0.27844061D-02
+ -.36000000D+01 -.35000000D+01 0.50347447D+00 0.41375617D-02
+ -.35000000D+01 -.34000000D+01 0.66787032D+00 0.78835449D-02
+ -.34000000D+01 -.33000000D+01 0.83263068D+00 0.57101375D-02
+ -.33000000D+01 -.32000000D+01 0.10613910D+01 0.62082408D-02
+ -.32000000D+01 -.31000000D+01 0.12971273D+01 0.97244169D-02
+ -.31000000D+01 -.30000000D+01 0.15387917D+01 0.10133133D-01
+ -.30000000D+01 -.29000000D+01 0.18773079D+01 0.31117033D-01
+ -.29000000D+01 -.28000000D+01 0.21577012D+01 0.11965226D-01
+ -.28000000D+01 -.27000000D+01 0.25129404D+01 0.11553590D-01
+ -.27000000D+01 -.26000000D+01 0.28572722D+01 0.10838523D-01
+ -.26000000D+01 -.25000000D+01 0.32703018D+01 0.21237176D-01
+ -.25000000D+01 -.24000000D+01 0.36381507D+01 0.13127627D-01
+ -.24000000D+01 -.23000000D+01 0.40739550D+01 0.15464887D-01
+ -.23000000D+01 -.22000000D+01 0.44451313D+01 0.16591456D-01
+ -.22000000D+01 -.21000000D+01 0.49250156D+01 0.23917538D-01
+ -.21000000D+01 -.20000000D+01 0.53405093D+01 0.17142755D-01
+ -.20000000D+01 -.19000000D+01 0.57204571D+01 0.17437781D-01
+ -.19000000D+01 -.18000000D+01 0.61468418D+01 0.17201273D-01
+ -.18000000D+01 -.17000000D+01 0.65586914D+01 0.21841895D-01
+ -.17000000D+01 -.16000000D+01 0.69149660D+01 0.23616155D-01
+ -.16000000D+01 -.15000000D+01 0.73169124D+01 0.21238305D-01
+ -.15000000D+01 -.14000000D+01 0.77148179D+01 0.36975321D-01
+ -.14000000D+01 -.13000000D+01 0.80235466D+01 0.24805286D-01
+ -.13000000D+01 -.12000000D+01 0.83990604D+01 0.23385318D-01
+ -.12000000D+01 -.11000000D+01 0.86808506D+01 0.21279018D-01
+ -.11000000D+01 -.10000000D+01 0.89340891D+01 0.23139469D-01
+ -.10000000D+01 -.90000000D+00 0.91442739D+01 0.25395871D-01
+ -.90000000D+00 -.80000000D+00 0.93845142D+01 0.22458453D-01
+ -.80000000D+00 -.70000000D+00 0.96780240D+01 0.48657864D-01
+ -.70000000D+00 -.60000000D+00 0.98340789D+01 0.23869321D-01
+ -.60000000D+00 -.50000000D+00 0.99271035D+01 0.26954801D-01
+ -.50000000D+00 -.40000000D+00 0.10125462D+02 0.25319623D-01
+ -.40000000D+00 -.30000000D+00 0.10242685D+02 0.48577571D-01
+ -.30000000D+00 -.20000000D+00 0.10280932D+02 0.41522216D-01
+ -.20000000D+00 -.10000000D+00 0.10304006D+02 0.24443564D-01
+ -.10000000D+00 0.18041124D-15 0.10328555D+02 0.22410503D-01
+ 0.70776718D-15 0.10000000D+00 0.10350433D+02 0.28088381D-01
+ 0.10000000D+00 0.20000000D+00 0.10348828D+02 0.25365750D-01
+ 0.20000000D+00 0.30000000D+00 0.10260898D+02 0.27242744D-01
+ 0.30000000D+00 0.40000000D+00 0.10155512D+02 0.53601602D-01
+ 0.40000000D+00 0.50000000D+00 0.10038012D+02 0.24498781D-01
+ 0.50000000D+00 0.60000000D+00 0.99772116D+01 0.39028807D-01
+ 0.60000000D+00 0.70000000D+00 0.98137930D+01 0.23741002D-01
+ 0.70000000D+00 0.80000000D+00 0.95816439D+01 0.42130267D-01
+ 0.80000000D+00 0.90000000D+00 0.94245399D+01 0.24938418D-01
+ 0.90000000D+00 0.10000000D+01 0.91514697D+01 0.22294746D-01
+ 0.10000000D+01 0.11000000D+01 0.89038844D+01 0.38469413D-01
+ 0.11000000D+01 0.12000000D+01 0.86585038D+01 0.30279640D-01
+ 0.12000000D+01 0.13000000D+01 0.83297386D+01 0.23543417D-01
+ 0.13000000D+01 0.14000000D+01 0.80448706D+01 0.22537115D-01
+ 0.14000000D+01 0.15000000D+01 0.76718655D+01 0.22826007D-01
+ 0.15000000D+01 0.16000000D+01 0.73000040D+01 0.21169925D-01
+ 0.16000000D+01 0.17000000D+01 0.69369360D+01 0.23409770D-01
+ 0.17000000D+01 0.18000000D+01 0.65619828D+01 0.17921802D-01
+ 0.18000000D+01 0.19000000D+01 0.61243260D+01 0.18306479D-01
+ 0.19000000D+01 0.20000000D+01 0.57092790D+01 0.17423169D-01
+ 0.20000000D+01 0.21000000D+01 0.53284705D+01 0.17709102D-01
+ 0.21000000D+01 0.22000000D+01 0.49126811D+01 0.16771385D-01
+ 0.22000000D+01 0.23000000D+01 0.40863222D+01 0.37126283D+00
+ 0.23000000D+01 0.24000000D+01 0.40782371D+01 0.18021510D-01
+ 0.24000000D+01 0.25000000D+01 0.36210135D+01 0.15689168D-01
+ 0.25000000D+01 0.26000000D+01 0.32292402D+01 0.14365414D-01
+ 0.26000000D+01 0.27000000D+01 0.28707520D+01 0.11615214D-01
+ 0.27000000D+01 0.28000000D+01 0.25093454D+01 0.13843334D-01
+ 0.28000000D+01 0.29000000D+01 0.21709460D+01 0.14285987D-01
+ 0.29000000D+01 0.30000000D+01 0.18429612D+01 0.10583508D-01
+ 0.30000000D+01 0.31000000D+01 0.15570853D+01 0.77897636D-02
+ 0.31000000D+01 0.32000000D+01 0.12964931D+01 0.15220257D-01
+ 0.32000000D+01 0.33000000D+01 0.10444107D+01 0.67598422D-02
+ 0.33000000D+01 0.34000000D+01 0.84238540D+00 0.86284025D-02
+ 0.34000000D+01 0.35000000D+01 0.64838799D+00 0.73292829D-02
+ 0.35000000D+01 0.36000000D+01 0.49498424D+00 0.39295847D-02
+ 0.36000000D+01 0.37000000D+01 0.36130858D+00 0.27864093D-02
+ 0.37000000D+01 0.38000000D+01 0.25092003D+00 0.22439395D-02
+ 0.38000000D+01 0.39000000D+01 0.16765738D+00 0.17554148D-02
+ 0.39000000D+01 0.40000000D+01 0.10037242D+00 0.86464336D-03
+ 0.40000000D+01 0.41000000D+01 0.53552623D-01 0.47594349D-03
+ 0.41000000D+01 0.42000000D+01 0.24042622D-01 0.23877272D-03
+ 0.42000000D+01 0.43000000D+01 0.79081434D-02 0.17107606D-03
+ 0.43000000D+01 0.44000000D+01 0.14296495D-02 0.26558496D-04
+ 0.44000000D+01 0.45000000D+01 -.15161769D-03 0.75929131D-05
+ 0.45000000D+01 0.46000000D+01 -.10431519D-03 0.36739883D-05
+ 0.46000000D+01 0.47000000D+01 -.19374402D-05 0.55585761D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19683656D-05 0.55714956D-06
+ -.46000000D+01 -.45000000D+01 -.97006640D-04 0.36617390D-05
+ -.45000000D+01 -.44000000D+01 -.14099442D-03 0.77183620D-05
+ -.44000000D+01 -.43000000D+01 0.12502043D-02 0.26823759D-04
+ -.43000000D+01 -.42000000D+01 0.67675001D-02 0.88690279D-04
+ -.42000000D+01 -.41000000D+01 0.19945395D-01 0.21994303D-03
+ -.41000000D+01 -.40000000D+01 0.43168960D-01 0.53890328D-03
+ -.40000000D+01 -.39000000D+01 0.81196640D-01 0.97898740D-03
+ -.39000000D+01 -.38000000D+01 0.12852527D+00 0.13691029D-02
+ -.38000000D+01 -.37000000D+01 0.18798547D+00 0.21289576D-02
+ -.37000000D+01 -.36000000D+01 0.26472720D+00 0.27819513D-02
+ -.36000000D+01 -.35000000D+01 0.36009054D+00 0.41323361D-02
+ -.35000000D+01 -.34000000D+01 0.47099115D+00 0.78739375D-02
+ -.34000000D+01 -.33000000D+01 0.57151680D+00 0.56866199D-02
+ -.33000000D+01 -.32000000D+01 0.72635399D+00 0.61738358D-02
+ -.32000000D+01 -.31000000D+01 0.87565234D+00 0.97071310D-02
+ -.31000000D+01 -.30000000D+01 0.10226791D+01 0.10024771D-01
+ -.30000000D+01 -.29000000D+01 0.12514769D+01 0.31071012D-01
+ -.29000000D+01 -.28000000D+01 0.14151207D+01 0.11972460D-01
+ -.28000000D+01 -.27000000D+01 0.16414436D+01 0.11494494D-01
+ -.27000000D+01 -.26000000D+01 0.18505516D+01 0.10769428D-01
+ -.26000000D+01 -.25000000D+01 0.21187836D+01 0.21254793D-01
+ -.25000000D+01 -.24000000D+01 0.23340690D+01 0.12936810D-01
+ -.24000000D+01 -.23000000D+01 0.26124422D+01 0.15297672D-01
+ -.23000000D+01 -.22000000D+01 0.28209310D+01 0.16550772D-01
+ -.22000000D+01 -.21000000D+01 0.31321708D+01 0.23878582D-01
+ -.21000000D+01 -.20000000D+01 0.33790741D+01 0.17085301D-01
+ -.20000000D+01 -.19000000D+01 0.35892097D+01 0.17341252D-01
+ -.19000000D+01 -.18000000D+01 0.38464876D+01 0.17154271D-01
+ -.18000000D+01 -.17000000D+01 0.40922310D+01 0.21794194D-01
+ -.17000000D+01 -.16000000D+01 0.42853644D+01 0.23741317D-01
+ -.16000000D+01 -.15000000D+01 0.45308586D+01 0.21076544D-01
+ -.15000000D+01 -.14000000D+01 0.47734274D+01 0.37070038D-01
+ -.14000000D+01 -.13000000D+01 0.49358964D+01 0.24747995D-01
+ -.13000000D+01 -.12000000D+01 0.51707240D+01 0.22593158D-01
+ -.12000000D+01 -.11000000D+01 0.53275056D+01 0.21208861D-01
+ -.11000000D+01 -.10000000D+01 0.54554221D+01 0.23082663D-01
+ -.10000000D+01 -.90000000D+00 0.55501497D+01 0.24999170D-01
+ -.90000000D+00 -.80000000D+00 0.56929067D+01 0.21956388D-01
+ -.80000000D+00 -.70000000D+00 0.58973067D+01 0.48679431D-01
+ -.70000000D+00 -.60000000D+00 0.59680850D+01 0.23818283D-01
+ -.60000000D+00 -.50000000D+00 0.59929020D+01 0.26695550D-01
+ -.50000000D+00 -.40000000D+00 0.61346927D+01 0.25264391D-01
+ -.40000000D+00 -.30000000D+00 0.62016450D+01 0.48504734D-01
+ -.30000000D+00 -.20000000D+00 0.62049503D+01 0.41514428D-01
+ -.20000000D+00 -.10000000D+00 0.62043791D+01 0.24338628D-01
+ -.10000000D+00 0.18041124D-15 0.62174767D+01 0.22348863D-01
+ 0.70776718D-15 0.10000000D+00 0.62400727D+01 0.28325799D-01
+ 0.10000000D+00 0.20000000D+00 0.62488399D+01 0.25247877D-01
+ 0.20000000D+00 0.30000000D+00 0.61872905D+01 0.27041754D-01
+ 0.30000000D+00 0.40000000D+00 0.61141109D+01 0.53500805D-01
+ 0.40000000D+00 0.50000000D+00 0.60452372D+01 0.24426793D-01
+ 0.50000000D+00 0.60000000D+00 0.60419317D+01 0.38985789D-01
+ 0.60000000D+00 0.70000000D+00 0.59478968D+01 0.23649605D-01
+ 0.70000000D+00 0.80000000D+00 0.57962861D+01 0.42084003D-01
+ 0.80000000D+00 0.90000000D+00 0.57339898D+01 0.24941294D-01
+ 0.90000000D+00 0.10000000D+01 0.55593184D+01 0.22215728D-01
+ 0.10000000D+01 0.11000000D+01 0.54247925D+01 0.38399896D-01
+ 0.11000000D+01 0.12000000D+01 0.53034504D+01 0.30163582D-01
+ 0.12000000D+01 0.13000000D+01 0.51040914D+01 0.23492582D-01
+ 0.13000000D+01 0.14000000D+01 0.49580418D+01 0.22453338D-01
+ 0.14000000D+01 0.15000000D+01 0.47288265D+01 0.22830503D-01
+ 0.15000000D+01 0.16000000D+01 0.45132770D+01 0.21043504D-01
+ 0.16000000D+01 0.17000000D+01 0.43072816D+01 0.23382902D-01
+ 0.17000000D+01 0.18000000D+01 0.40949793D+01 0.17823563D-01
+ 0.18000000D+01 0.19000000D+01 0.38267084D+01 0.18196476D-01
+ 0.19000000D+01 0.20000000D+01 0.35764825D+01 0.17392560D-01
+ 0.20000000D+01 0.21000000D+01 0.33674721D+01 0.17656854D-01
+ 0.21000000D+01 0.22000000D+01 0.31202122D+01 0.16745455D-01
+ 0.22000000D+01 0.23000000D+01 0.24621119D+01 0.37120012D+00
+ 0.23000000D+01 0.24000000D+01 0.26155155D+01 0.17985013D-01
+ 0.24000000D+01 0.25000000D+01 0.23181372D+01 0.15663754D-01
+ 0.25000000D+01 0.26000000D+01 0.20780453D+01 0.14278973D-01
+ 0.26000000D+01 0.27000000D+01 0.18629860D+01 0.11517029D-01
+ 0.27000000D+01 0.28000000D+01 0.16373352D+01 0.13822235D-01
+ 0.28000000D+01 0.29000000D+01 0.14280809D+01 0.14252758D-01
+ 0.29000000D+01 0.30000000D+01 0.12179102D+01 0.10561175D-01
+ 0.30000000D+01 0.31000000D+01 0.10393349D+01 0.77788098D-02
+ 0.31000000D+01 0.32000000D+01 0.87569718D+00 0.15210463D-01
+ 0.32000000D+01 0.33000000D+01 0.70898300D+00 0.67417044D-02
+ 0.33000000D+01 0.34000000D+01 0.58173184D+00 0.86238397D-02
+ 0.34000000D+01 0.35000000D+01 0.45131495D+00 0.73225210D-02
+ 0.35000000D+01 0.36000000D+01 0.35116380D+00 0.38964356D-02
+ 0.36000000D+01 0.37000000D+01 0.26184663D+00 0.27444863D-02
+ 0.37000000D+01 0.38000000D+01 0.18513763D+00 0.22397761D-02
+ 0.38000000D+01 0.39000000D+01 0.12767322D+00 0.17515662D-02
+ 0.39000000D+01 0.40000000D+01 0.78397661D-01 0.86357575D-03
+ 0.40000000D+01 0.41000000D+01 0.43087132D-01 0.47640279D-03
+ 0.41000000D+01 0.42000000D+01 0.19974584D-01 0.23867530D-03
+ 0.42000000D+01 0.43000000D+01 0.67441920D-02 0.17104844D-03
+ 0.43000000D+01 0.44000000D+01 0.12527628D-02 0.26553233D-04
+ 0.44000000D+01 0.45000000D+01 -.13968489D-03 0.75929154D-05
+ 0.45000000D+01 0.46000000D+01 -.98884262D-04 0.36737251D-05
+ 0.46000000D+01 0.47000000D+01 -.19076004D-05 0.55585467D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19923326D-05 0.55715049D-06
+ -.46000000D+01 -.45000000D+01 -.10116291D-03 0.36619535D-05
+ -.45000000D+01 -.44000000D+01 -.14982283D-03 0.77189770D-05
+ -.44000000D+01 -.43000000D+01 0.13797240D-02 0.26841898D-04
+ -.43000000D+01 -.42000000D+01 0.75994197D-02 0.88724344D-04
+ -.42000000D+01 -.41000000D+01 0.22806578D-01 0.21992024D-03
+ -.41000000D+01 -.40000000D+01 0.50387702D-01 0.53909991D-03
+ -.40000000D+01 -.39000000D+01 0.96132260D-01 0.97963858D-03
+ -.39000000D+01 -.38000000D+01 0.15531503D+00 0.13703915D-02
+ -.38000000D+01 -.37000000D+01 0.23134498D+00 0.21377736D-02
+ -.37000000D+01 -.36000000D+01 0.32986581D+00 0.27841556D-02
+ -.36000000D+01 -.35000000D+01 0.45232812D+00 0.41370865D-02
+ -.35000000D+01 -.34000000D+01 0.59632864D+00 0.78809275D-02
+ -.34000000D+01 -.33000000D+01 0.73626752D+00 0.57059675D-02
+ -.33000000D+01 -.32000000D+01 0.93585737D+00 0.61989278D-02
+ -.32000000D+01 -.31000000D+01 0.11373672D+01 0.97242239D-02
+ -.31000000D+01 -.30000000D+01 0.13410729D+01 0.10077848D-01
+ -.30000000D+01 -.29000000D+01 0.16351398D+01 0.31096514D-01
+ -.29000000D+01 -.28000000D+01 0.18679590D+01 0.11974054D-01
+ -.28000000D+01 -.27000000D+01 0.21701072D+01 0.11527072D-01
+ -.27000000D+01 -.26000000D+01 0.24591312D+01 0.10806704D-01
+ -.26000000D+01 -.25000000D+01 0.28116609D+01 0.21253625D-01
+ -.25000000D+01 -.24000000D+01 0.31155778D+01 0.13012521D-01
+ -.24000000D+01 -.23000000D+01 0.34860512D+01 0.15364062D-01
+ -.23000000D+01 -.22000000D+01 0.37882405D+01 0.16576395D-01
+ -.22000000D+01 -.21000000D+01 0.41966339D+01 0.23897875D-01
+ -.21000000D+01 -.20000000D+01 0.45408315D+01 0.17120160D-01
+ -.20000000D+01 -.19000000D+01 0.48485722D+01 0.17393153D-01
+ -.19000000D+01 -.18000000D+01 0.52016316D+01 0.17178419D-01
+ -.18000000D+01 -.17000000D+01 0.55421244D+01 0.21835523D-01
+ -.17000000D+01 -.16000000D+01 0.58281693D+01 0.23648460D-01
+ -.16000000D+01 -.15000000D+01 0.61623441D+01 0.21168329D-01
+ -.15000000D+01 -.14000000D+01 0.64920609D+01 0.37006613D-01
+ -.14000000D+01 -.13000000D+01 0.67365465D+01 0.24815867D-01
+ -.13000000D+01 -.12000000D+01 0.70513798D+01 0.23205810D-01
+ -.12000000D+01 -.11000000D+01 0.72778240D+01 0.21254457D-01
+ -.11000000D+01 -.10000000D+01 0.74758375D+01 0.23129275D-01
+ -.10000000D+01 -.90000000D+00 0.76347975D+01 0.25181343D-01
+ -.90000000D+00 -.80000000D+00 0.78320330D+01 0.22184797D-01
+ -.80000000D+00 -.70000000D+00 0.80856413D+01 0.48682349D-01
+ -.70000000D+00 -.60000000D+00 0.82040515D+01 0.23872160D-01
+ -.60000000D+00 -.50000000D+00 0.82667714D+01 0.26867606D-01
+ -.50000000D+00 -.40000000D+00 0.84396513D+01 0.25311820D-01
+ -.40000000D+00 -.30000000D+00 0.85347761D+01 0.48583223D-01
+ -.30000000D+00 -.20000000D+00 0.85574137D+01 0.41535759D-01
+ -.20000000D+00 -.10000000D+00 0.85700824D+01 0.24407919D-01
+ -.10000000D+00 0.18041124D-15 0.85888787D+01 0.22394197D-01
+ 0.70776718D-15 0.10000000D+00 0.86112276D+01 0.28130604D-01
+ 0.10000000D+00 0.20000000D+00 0.86141524D+01 0.25321508D-01
+ 0.20000000D+00 0.30000000D+00 0.85387414D+01 0.27194792D-01
+ 0.30000000D+00 0.40000000D+00 0.84468453D+01 0.53563021D-01
+ 0.40000000D+00 0.50000000D+00 0.83501441D+01 0.24553366D-01
+ 0.50000000D+00 0.60000000D+00 0.83163313D+01 0.39009334D-01
+ 0.60000000D+00 0.70000000D+00 0.81837303D+01 0.23702884D-01
+ 0.70000000D+00 0.80000000D+00 0.79878699D+01 0.42106070D-01
+ 0.80000000D+00 0.90000000D+00 0.78723208D+01 0.24938241D-01
+ 0.90000000D+00 0.10000000D+01 0.76430011D+01 0.22266400D-01
+ 0.10000000D+01 0.11000000D+01 0.74452245D+01 0.38447794D-01
+ 0.11000000D+01 0.12000000D+01 0.72546375D+01 0.30215176D-01
+ 0.12000000D+01 0.13000000D+01 0.69826593D+01 0.23521778D-01
+ 0.13000000D+01 0.14000000D+01 0.67588126D+01 0.22526773D-01
+ 0.14000000D+01 0.15000000D+01 0.64482892D+01 0.22829557D-01
+ 0.15000000D+01 0.16000000D+01 0.61449699D+01 0.21118518D-01
+ 0.16000000D+01 0.17000000D+01 0.58497584D+01 0.23402979D-01
+ 0.17000000D+01 0.18000000D+01 0.55454215D+01 0.17894476D-01
+ 0.18000000D+01 0.19000000D+01 0.51803549D+01 0.18271430D-01
+ 0.19000000D+01 0.20000000D+01 0.48366521D+01 0.17416058D-01
+ 0.20000000D+01 0.21000000D+01 0.45290007D+01 0.17704549D-01
+ 0.21000000D+01 0.22000000D+01 0.41846975D+01 0.16762723D-01
+ 0.22000000D+01 0.23000000D+01 0.34291343D+01 0.37125296D+00
+ 0.23000000D+01 0.24000000D+01 0.34895708D+01 0.18011450D-01
+ 0.24000000D+01 0.25000000D+01 0.30992556D+01 0.15681237D-01
+ 0.25000000D+01 0.26000000D+01 0.27710002D+01 0.14314645D-01
+ 0.26000000D+01 0.27000000D+01 0.24716658D+01 0.11555240D-01
+ 0.27000000D+01 0.28000000D+01 0.21665483D+01 0.13835052D-01
+ 0.28000000D+01 0.29000000D+01 0.18812272D+01 0.14270468D-01
+ 0.29000000D+01 0.30000000D+01 0.16012114D+01 0.10576439D-01
+ 0.30000000D+01 0.31000000D+01 0.13587450D+01 0.77875459D-02
+ 0.31000000D+01 0.32000000D+01 0.11368358D+01 0.15217360D-01
+ 0.32000000D+01 0.33000000D+01 0.91885546D+00 0.67551121D-02
+ 0.33000000D+01 0.34000000D+01 0.74618054D+00 0.86283557D-02
+ 0.34000000D+01 0.35000000D+01 0.57677091D+00 0.73262272D-02
+ 0.35000000D+01 0.36000000D+01 0.44372950D+00 0.39210508D-02
+ 0.36000000D+01 0.37000000D+01 0.32657728D+00 0.27750464D-02
+ 0.37000000D+01 0.38000000D+01 0.22852828D+00 0.22429555D-02
+ 0.38000000D+01 0.39000000D+01 0.15442627D+00 0.17547370D-02
+ 0.39000000D+01 0.40000000D+01 0.93334983D-01 0.86448868D-03
+ 0.40000000D+01 0.41000000D+01 0.50316410D-01 0.47623550D-03
+ 0.41000000D+01 0.42000000D+01 0.22832099D-01 0.23878272D-03
+ 0.42000000D+01 0.43000000D+01 0.75771643D-02 0.17107883D-03
+ 0.43000000D+01 0.44000000D+01 0.13823278D-02 0.26558835D-04
+ 0.44000000D+01 0.45000000D+01 -.14843678D-03 0.75930427D-05
+ 0.45000000D+01 0.46000000D+01 -.10303340D-03 0.36739562D-05
+ 0.46000000D+01 0.47000000D+01 -.19312818D-05 0.55585720D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19970985D-05 0.55715067D-06
+ -.46000000D+01 -.45000000D+01 -.10209593D-03 0.36619953D-05
+ -.45000000D+01 -.44000000D+01 -.15225867D-03 0.77191059D-05
+ -.44000000D+01 -.43000000D+01 0.14107575D-02 0.26846549D-04
+ -.43000000D+01 -.42000000D+01 0.78161529D-02 0.88731697D-04
+ -.42000000D+01 -.41000000D+01 0.23591241D-01 0.21990989D-03
+ -.41000000D+01 -.40000000D+01 0.52453781D-01 0.53913649D-03
+ -.40000000D+01 -.39000000D+01 0.10057358D+00 0.97978930D-03
+ -.39000000D+01 -.38000000D+01 0.16356095D+00 0.13708141D-02
+ -.38000000D+01 -.37000000D+01 0.24508865D+00 0.21396382D-02
+ -.37000000D+01 -.36000000D+01 0.35107041D+00 0.27849204D-02
+ -.36000000D+01 -.35000000D+01 0.48305913D+00 0.41382996D-02
+ -.35000000D+01 -.34000000D+01 0.63889788D+00 0.78834875D-02
+ -.34000000D+01 -.33000000D+01 0.79310902D+00 0.57113976D-02
+ -.33000000D+01 -.32000000D+01 0.10092654D+01 0.62078737D-02
+ -.32000000D+01 -.31000000D+01 0.12302022D+01 0.97274176D-02
+ -.31000000D+01 -.30000000D+01 0.14551430D+01 0.10118145D-01
+ -.30000000D+01 -.29000000D+01 0.17741610D+01 0.31112318D-01
+ -.29000000D+01 -.28000000D+01 0.20333826D+01 0.11974063D-01
+ -.28000000D+01 -.27000000D+01 0.23649449D+01 0.11542962D-01
+ -.27000000D+01 -.26000000D+01 0.26845513D+01 0.10826959D-01
+ -.26000000D+01 -.25000000D+01 0.30701880D+01 0.21249721D-01
+ -.25000000D+01 -.24000000D+01 0.34090954D+01 0.13085882D-01
+ -.24000000D+01 -.23000000D+01 0.38153237D+01 0.15427912D-01
+ -.23000000D+01 -.22000000D+01 0.41549019D+01 0.16591081D-01
+ -.22000000D+01 -.21000000D+01 0.46021881D+01 0.23912965D-01
+ -.21000000D+01 -.20000000D+01 0.49849906D+01 0.17139498D-01
+ -.20000000D+01 -.19000000D+01 0.53317399D+01 0.17425060D-01
+ -.19000000D+01 -.18000000D+01 0.57241502D+01 0.17193417D-01
+ -.18000000D+01 -.17000000D+01 0.61029195D+01 0.21850225D-01
+ -.17000000D+01 -.16000000D+01 0.64266184D+01 0.23638439D-01
+ -.16000000D+01 -.15000000D+01 0.67969168D+01 0.21216375D-01
+ -.15000000D+01 -.14000000D+01 0.71629269D+01 0.36988841D-01
+ -.14000000D+01 -.13000000D+01 0.74413859D+01 0.24824081D-01
+ -.13000000D+01 -.12000000D+01 0.77888014D+01 0.23374726D-01
+ -.12000000D+01 -.11000000D+01 0.80441430D+01 0.21276598D-01
+ -.11000000D+01 -.10000000D+01 0.82715294D+01 0.23145526D-01
+ -.10000000D+01 -.90000000D+00 0.84577699D+01 0.25329967D-01
+ -.90000000D+00 -.80000000D+00 0.86772419D+01 0.22374849D-01
+ -.80000000D+00 -.70000000D+00 0.89516138D+01 0.48682250D-01
+ -.70000000D+00 -.60000000D+00 0.90900545D+01 0.23882140D-01
+ -.60000000D+00 -.50000000D+00 0.91686906D+01 0.26931253D-01
+ -.50000000D+00 -.40000000D+00 0.93546417D+01 0.25326321D-01
+ -.40000000D+00 -.30000000D+00 0.94617578D+01 0.48593442D-01
+ -.30000000D+00 -.20000000D+00 0.94925776D+01 0.41538496D-01
+ -.20000000D+00 -.10000000D+00 0.95105466D+01 0.24442125D-01
+ -.10000000D+00 0.18041124D-15 0.95321855D+01 0.22411325D-01
+ 0.70776718D-15 0.10000000D+00 0.95542912D+01 0.28021851D-01
+ 0.10000000D+00 0.20000000D+00 0.95549782D+01 0.25358119D-01
+ 0.20000000D+00 0.30000000D+00 0.94729723D+01 0.27245064D-01
+ 0.30000000D+00 0.40000000D+00 0.93739515D+01 0.53591952D-01
+ 0.40000000D+00 0.50000000D+00 0.92658948D+01 0.24569891D-01
+ 0.50000000D+00 0.60000000D+00 0.92185887D+01 0.39023406D-01
+ 0.60000000D+00 0.70000000D+00 0.90697920D+01 0.23729994D-01
+ 0.70000000D+00 0.80000000D+00 0.88549832D+01 0.42122253D-01
+ 0.80000000D+00 0.90000000D+00 0.87173322D+01 0.24943775D-01
+ 0.90000000D+00 0.10000000D+01 0.84652121D+01 0.22288119D-01
+ 0.10000000D+01 0.11000000D+01 0.82409861D+01 0.38474941D-01
+ 0.11000000D+01 0.12000000D+01 0.80214515D+01 0.30252269D-01
+ 0.12000000D+01 0.13000000D+01 0.77194467D+01 0.23541070D-01
+ 0.13000000D+01 0.14000000D+01 0.74632691D+01 0.22545242D-01
+ 0.14000000D+01 0.15000000D+01 0.71196919D+01 0.22827271D-01
+ 0.15000000D+01 0.16000000D+01 0.67798033D+01 0.21160621D-01
+ 0.16000000D+01 0.17000000D+01 0.64483420D+01 0.23410171D-01
+ 0.17000000D+01 0.18000000D+01 0.61063275D+01 0.17921864D-01
+ 0.18000000D+01 0.19000000D+01 0.57020934D+01 0.18303449D-01
+ 0.19000000D+01 0.20000000D+01 0.53202155D+01 0.17424965D-01
+ 0.20000000D+01 0.21000000D+01 0.49730196D+01 0.17717487D-01
+ 0.21000000D+01 0.22000000D+01 0.45901513D+01 0.16772014D-01
+ 0.22000000D+01 0.23000000D+01 0.37959036D+01 0.37126339D+00
+ 0.23000000D+01 0.24000000D+01 0.38192699D+01 0.18022214D-01
+ 0.24000000D+01 0.25000000D+01 0.33923121D+01 0.15689545D-01
+ 0.25000000D+01 0.26000000D+01 0.30293087D+01 0.14345529D-01
+ 0.26000000D+01 0.27000000D+01 0.26975215D+01 0.11591685D-01
+ 0.27000000D+01 0.28000000D+01 0.23614939D+01 0.13842110D-01
+ 0.28000000D+01 0.29000000D+01 0.20466867D+01 0.14281278D-01
+ 0.29000000D+01 0.30000000D+01 0.17399710D+01 0.10583724D-01
+ 0.30000000D+01 0.31000000D+01 0.14732400D+01 0.77908347D-02
+ 0.31000000D+01 0.32000000D+01 0.12295414D+01 0.15220166D-01
+ 0.32000000D+01 0.33000000D+01 0.99232501D+00 0.67601230D-02
+ 0.33000000D+01 0.34000000D+01 0.80293080D+00 0.86295755D-02
+ 0.34000000D+01 0.35000000D+01 0.61938714D+00 0.73277875D-02
+ 0.35000000D+01 0.36000000D+01 0.47455253D+00 0.39293145D-02
+ 0.36000000D+01 0.37000000D+01 0.34765242D+00 0.27856267D-02
+ 0.37000000D+01 0.38000000D+01 0.24229572D+00 0.22440250D-02
+ 0.38000000D+01 0.39000000D+01 0.16266213D+00 0.17555619D-02
+ 0.39000000D+01 0.40000000D+01 0.97775725D-01 0.86479037D-03
+ 0.40000000D+01 0.41000000D+01 0.52385831D-01 0.47619042D-03
+ 0.41000000D+01 0.42000000D+01 0.23616222D-01 0.23880784D-03
+ 0.42000000D+01 0.43000000D+01 0.77941104D-02 0.17108377D-03
+ 0.43000000D+01 0.44000000D+01 0.14133611D-02 0.26559925D-04
+ 0.44000000D+01 0.45000000D+01 -.15085243D-03 0.75930453D-05
+ 0.45000000D+01 0.46000000D+01 -.10396485D-03 0.36740021D-05
+ 0.46000000D+01 0.47000000D+01 -.19359939D-05 0.55585767D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19987985D-05 0.55715073D-06
+ -.46000000D+01 -.45000000D+01 -.10244198D-03 0.36620101D-05
+ -.45000000D+01 -.44000000D+01 -.15323297D-03 0.77191528D-05
+ -.44000000D+01 -.43000000D+01 0.14225472D-02 0.26848319D-04
+ -.43000000D+01 -.42000000D+01 0.79017596D-02 0.88734447D-04
+ -.42000000D+01 -.41000000D+01 0.23909494D-01 0.21990562D-03
+ -.41000000D+01 -.40000000D+01 0.53311723D-01 0.53914909D-03
+ -.40000000D+01 -.39000000D+01 0.10245933D+00 0.97984775D-03
+ -.39000000D+01 -.38000000D+01 0.16713659D+00 0.13710099D-02
+ -.38000000D+01 -.37000000D+01 0.25116418D+00 0.21403226D-02
+ -.37000000D+01 -.36000000D+01 0.36060958D+00 0.27852744D-02
+ -.36000000D+01 -.35000000D+01 0.49711472D+00 0.41388135D-02
+ -.35000000D+01 -.34000000D+01 0.65864026D+00 0.78846736D-02
+ -.34000000D+01 -.33000000D+01 0.81979464D+00 0.57135292D-02
+ -.33000000D+01 -.32000000D+01 0.10441335D+01 0.62119646D-02
+ -.32000000D+01 -.31000000D+01 0.12747187D+01 0.97286676D-02
+ -.31000000D+01 -.30000000D+01 0.15103316D+01 0.10142341D-01
+ -.30000000D+01 -.29000000D+01 0.18419507D+01 0.31121439D-01
+ -.29000000D+01 -.28000000D+01 0.21146322D+01 0.11973842D-01
+ -.28000000D+01 -.27000000D+01 0.24613687D+01 0.11555008D-01
+ -.27000000D+01 -.26000000D+01 0.27965107D+01 0.10842073D-01
+ -.26000000D+01 -.25000000D+01 0.31994326D+01 0.21247550D-01
+ -.25000000D+01 -.24000000D+01 0.35566083D+01 0.13142006D-01
+ -.24000000D+01 -.23000000D+01 0.39813678D+01 0.15476865D-01
+ -.23000000D+01 -.22000000D+01 0.43406780D+01 0.16600731D-01
+ -.22000000D+01 -.21000000D+01 0.48085408D+01 0.23922968D-01
+ -.21000000D+01 -.20000000D+01 0.52116811D+01 0.17151110D-01
+ -.20000000D+01 -.19000000D+01 0.55790399D+01 0.17448066D-01
+ -.19000000D+01 -.18000000D+01 0.59927144D+01 0.17205791D-01
+ -.18000000D+01 -.17000000D+01 0.63919006D+01 0.21856628D-01
+ -.17000000D+01 -.16000000D+01 0.67358268D+01 0.23639417D-01
+ -.16000000D+01 -.15000000D+01 0.71254736D+01 0.21252462D-01
+ -.15000000D+01 -.14000000D+01 0.75113432D+01 0.36988675D-01
+ -.14000000D+01 -.13000000D+01 0.78082835D+01 0.24826855D-01
+ -.13000000D+01 -.12000000D+01 0.81732314D+01 0.23443285D-01
+ -.12000000D+01 -.11000000D+01 0.84443727D+01 0.21289747D-01
+ -.11000000D+01 -.10000000D+01 0.86878222D+01 0.23153525D-01
+ -.10000000D+01 -.90000000D+00 0.88890398D+01 0.25423984D-01
+ -.90000000D+00 -.80000000D+00 0.91207058D+01 0.22496098D-01
+ -.80000000D+00 -.70000000D+00 0.94065614D+01 0.48680968D-01
+ -.70000000D+00 -.60000000D+00 0.95560221D+01 0.23880363D-01
+ -.60000000D+00 -.50000000D+00 0.96433591D+01 0.26964435D-01
+ -.50000000D+00 -.40000000D+00 0.98365624D+01 0.25333298D-01
+ -.40000000D+00 -.30000000D+00 0.99502802D+01 0.48596342D-01
+ -.30000000D+00 -.20000000D+00 0.99856694D+01 0.41538654D-01
+ -.20000000D+00 -.10000000D+00 0.10006512D+02 0.24460358D-01
+ -.10000000D+00 0.18041124D-15 0.10029838D+02 0.22420273D-01
+ 0.70776718D-15 0.10000000D+00 0.10051714D+02 0.27971928D-01
+ 0.10000000D+00 0.20000000D+00 0.10051251D+02 0.25379552D-01
+ 0.20000000D+00 0.30000000D+00 0.99653698D+01 0.27268071D-01
+ 0.30000000D+00 0.40000000D+00 0.98627274D+01 0.53606242D-01
+ 0.40000000D+00 0.50000000D+00 0.97483746D+01 0.24572439D-01
+ 0.50000000D+00 0.60000000D+00 0.96934245D+01 0.39032139D-01
+ 0.60000000D+00 0.70000000D+00 0.95357988D+01 0.23749443D-01
+ 0.70000000D+00 0.80000000D+00 0.93104033D+01 0.42134436D-01
+ 0.80000000D+00 0.90000000D+00 0.91607010D+01 0.24949891D-01
+ 0.90000000D+00 0.10000000D+01 0.88960529D+01 0.22300586D-01
+ 0.10000000D+01 0.11000000D+01 0.86573859D+01 0.38490704D-01
+ 0.11000000D+01 0.12000000D+01 0.84219234D+01 0.30277062D-01
+ 0.12000000D+01 0.13000000D+01 0.81036141D+01 0.23553871D-01
+ 0.13000000D+01 0.14000000D+01 0.78298159D+01 0.22554537D-01
+ 0.14000000D+01 0.15000000D+01 0.74684247D+01 0.22827196D-01
+ 0.15000000D+01 0.16000000D+01 0.71085922D+01 0.21185318D-01
+ 0.16000000D+01 0.17000000D+01 0.67576777D+01 0.23414520D-01
+ 0.17000000D+01 0.18000000D+01 0.63953241D+01 0.17934767D-01
+ 0.18000000D+01 0.19000000D+01 0.59701522D+01 0.18318942D-01
+ 0.19000000D+01 0.20000000D+01 0.55677986D+01 0.17429770D-01
+ 0.20000000D+01 0.21000000D+01 0.51996515D+01 0.17723247D-01
+ 0.21000000D+01 0.22000000D+01 0.47963774D+01 0.16777729D-01
+ 0.22000000D+01 0.23000000D+01 0.39818324D+01 0.37126712D+00
+ 0.23000000D+01 0.24000000D+01 0.39856068D+01 0.18027830D-01
+ 0.24000000D+01 0.25000000D+01 0.35395058D+01 0.15694137D-01
+ 0.25000000D+01 0.26000000D+01 0.31583667D+01 0.14370674D-01
+ 0.26000000D+01 0.27000000D+01 0.28098787D+01 0.11621405D-01
+ 0.27000000D+01 0.28000000D+01 0.24578708D+01 0.13846561D-01
+ 0.28000000D+01 0.29000000D+01 0.21279344D+01 0.14287421D-01
+ 0.29000000D+01 0.30000000D+01 0.18076227D+01 0.10587653D-01
+ 0.30000000D+01 0.31000000D+01 0.15286211D+01 0.77924153D-02
+ 0.31000000D+01 0.32000000D+01 0.12740263D+01 0.15221694D-01
+ 0.32000000D+01 0.33000000D+01 0.10271954D+01 0.67627068D-02
+ 0.33000000D+01 0.34000000D+01 0.82957487D+00 0.86300983D-02
+ 0.34000000D+01 0.35000000D+01 0.63915495D+00 0.73287726D-02
+ 0.35000000D+01 0.36000000D+01 0.48864389D+00 0.39328141D-02
+ 0.36000000D+01 0.37000000D+01 0.35713960D+00 0.27900739D-02
+ 0.37000000D+01 0.38000000D+01 0.24838331D+00 0.22445460D-02
+ 0.38000000D+01 0.39000000D+01 0.16623363D+00 0.17558859D-02
+ 0.39000000D+01 0.40000000D+01 0.99661127D-01 0.86492568D-03
+ 0.40000000D+01 0.41000000D+01 0.53245260D-01 0.47617335D-03
+ 0.41000000D+01 0.42000000D+01 0.23934338D-01 0.23881754D-03
+ 0.42000000D+01 0.43000000D+01 0.78797909D-02 0.17108546D-03
+ 0.43000000D+01 0.44000000D+01 0.14251501D-02 0.26560322D-04
+ 0.44000000D+01 0.45000000D+01 -.15181885D-03 0.75930443D-05
+ 0.45000000D+01 0.46000000D+01 -.10431035D-03 0.36740185D-05
+ 0.46000000D+01 0.47000000D+01 -.19376750D-05 0.55585784D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19833037D-05 0.55714944D-06
+ -.46000000D+01 -.45000000D+01 -.99942271D-04 0.36616999D-05
+ -.45000000D+01 -.44000000D+01 -.14630544D-03 0.77179667D-05
+ -.44000000D+01 -.43000000D+01 0.13611381D-02 0.26821898D-04
+ -.43000000D+01 -.42000000D+01 0.74712072D-02 0.88653407D-04
+ -.42000000D+01 -.41000000D+01 0.22389840D-01 0.21962221D-03
+ -.41000000D+01 -.40000000D+01 0.49399066D-01 0.53850666D-03
+ -.40000000D+01 -.39000000D+01 0.94239131D-01 0.97827367D-03
+ -.39000000D+01 -.38000000D+01 0.15219368D+00 0.13681173D-02
+ -.38000000D+01 -.37000000D+01 0.22670335D+00 0.21280213D-02
+ -.37000000D+01 -.36000000D+01 0.32343125D+00 0.27794268D-02
+ -.36000000D+01 -.35000000D+01 0.44390107D+00 0.41308346D-02
+ -.35000000D+01 -.34000000D+01 0.58561595D+00 0.78753353D-02
+ -.34000000D+01 -.33000000D+01 0.72279187D+00 0.56830426D-02
+ -.33000000D+01 -.32000000D+01 0.92002813D+00 0.61732511D-02
+ -.32000000D+01 -.31000000D+01 0.11180295D+01 0.96960766D-02
+ -.31000000D+01 -.30000000D+01 0.13190801D+01 0.10032670D-01
+ -.30000000D+01 -.29000000D+01 0.16088381D+01 0.31074979D-01
+ -.29000000D+01 -.28000000D+01 0.18379593D+01 0.11941328D-01
+ -.28000000D+01 -.27000000D+01 0.21358100D+01 0.11497712D-01
+ -.27000000D+01 -.26000000D+01 0.24207827D+01 0.10768775D-01
+ -.26000000D+01 -.25000000D+01 0.27690037D+01 0.21211138D-01
+ -.25000000D+01 -.24000000D+01 0.30683009D+01 0.12937864D-01
+ -.24000000D+01 -.23000000D+01 0.34337456D+01 0.15296843D-01
+ -.23000000D+01 -.22000000D+01 0.37314761D+01 0.16544938D-01
+ -.22000000D+01 -.21000000D+01 0.41343119D+01 0.23864173D-01
+ -.21000000D+01 -.20000000D+01 0.44736622D+01 0.17086302D-01
+ -.20000000D+01 -.19000000D+01 0.47767007D+01 0.17326456D-01
+ -.19000000D+01 -.18000000D+01 0.51251370D+01 0.17141967D-01
+ -.18000000D+01 -.17000000D+01 0.54608997D+01 0.21764036D-01
+ -.17000000D+01 -.16000000D+01 0.57419279D+01 0.23607342D-01
+ -.16000000D+01 -.15000000D+01 0.60727419D+01 0.21078101D-01
+ -.15000000D+01 -.14000000D+01 0.63976140D+01 0.36984611D-01
+ -.14000000D+01 -.13000000D+01 0.66395308D+01 0.24731103D-01
+ -.13000000D+01 -.12000000D+01 0.69485258D+01 0.22698605D-01
+ -.12000000D+01 -.11000000D+01 0.71742862D+01 0.21201994D-01
+ -.11000000D+01 -.10000000D+01 0.73681169D+01 0.23073034D-01
+ -.10000000D+01 -.90000000D+00 0.75240561D+01 0.25035606D-01
+ -.90000000D+00 -.80000000D+00 0.77196466D+01 0.21996174D-01
+ -.80000000D+00 -.70000000D+00 0.79722141D+01 0.48663755D-01
+ -.70000000D+00 -.60000000D+00 0.80867336D+01 0.23815654D-01
+ -.60000000D+00 -.50000000D+00 0.81489571D+01 0.26760704D-01
+ -.50000000D+00 -.40000000D+00 0.83210696D+01 0.25254851D-01
+ -.40000000D+00 -.30000000D+00 0.84136395D+01 0.48479164D-01
+ -.30000000D+00 -.20000000D+00 0.84357837D+01 0.41471449D-01
+ -.20000000D+00 -.10000000D+00 0.84476554D+01 0.24326704D-01
+ -.10000000D+00 0.18041124D-15 0.84674814D+01 0.22333163D-01
+ 0.70776718D-15 0.10000000D+00 0.84890630D+01 0.28181019D-01
+ 0.10000000D+00 0.20000000D+00 0.84918415D+01 0.25246519D-01
+ 0.20000000D+00 0.30000000D+00 0.84175877D+01 0.27043825D-01
+ 0.30000000D+00 0.40000000D+00 0.83262394D+01 0.53540532D-01
+ 0.40000000D+00 0.50000000D+00 0.82325491D+01 0.24403440D-01
+ 0.50000000D+00 0.60000000D+00 0.81983740D+01 0.38977347D-01
+ 0.60000000D+00 0.70000000D+00 0.80666869D+01 0.23661269D-01
+ 0.70000000D+00 0.80000000D+00 0.78726291D+01 0.42084016D-01
+ 0.80000000D+00 0.90000000D+00 0.77602716D+01 0.24891736D-01
+ 0.90000000D+00 0.10000000D+01 0.75324673D+01 0.22221606D-01
+ 0.10000000D+01 0.11000000D+01 0.73377404D+01 0.38433155D-01
+ 0.11000000D+01 0.12000000D+01 0.71509283D+01 0.30186023D-01
+ 0.12000000D+01 0.13000000D+01 0.68816340D+01 0.23483587D-01
+ 0.13000000D+01 0.14000000D+01 0.66615279D+01 0.22424805D-01
+ 0.14000000D+01 0.15000000D+01 0.63538251D+01 0.22805314D-01
+ 0.15000000D+01 0.16000000D+01 0.60551970D+01 0.21029683D-01
+ 0.16000000D+01 0.17000000D+01 0.57639776D+01 0.23370096D-01
+ 0.17000000D+01 0.18000000D+01 0.54637953D+01 0.17827192D-01
+ 0.18000000D+01 0.19000000D+01 0.51048746D+01 0.18193120D-01
+ 0.19000000D+01 0.20000000D+01 0.47641644D+01 0.17367079D-01
+ 0.20000000D+01 0.21000000D+01 0.44620036D+01 0.17646277D-01
+ 0.21000000D+01 0.22000000D+01 0.41223110D+01 0.16731709D-01
+ 0.22000000D+01 0.23000000D+01 0.33724325D+01 0.37120332D+00
+ 0.23000000D+01 0.24000000D+01 0.34366923D+01 0.17975149D-01
+ 0.24000000D+01 0.25000000D+01 0.30520144D+01 0.15651590D-01
+ 0.25000000D+01 0.26000000D+01 0.27283353D+01 0.14279367D-01
+ 0.26000000D+01 0.27000000D+01 0.24332777D+01 0.11515036D-01
+ 0.27000000D+01 0.28000000D+01 0.21318185D+01 0.13818608D-01
+ 0.28000000D+01 0.29000000D+01 0.18512085D+01 0.14252763D-01
+ 0.29000000D+01 0.30000000D+01 0.15749904D+01 0.10555996D-01
+ 0.30000000D+01 0.31000000D+01 0.13362778D+01 0.77728180D-02
+ 0.31000000D+01 0.32000000D+01 0.11177516D+01 0.15208043D-01
+ 0.32000000D+01 0.33000000D+01 0.90263414D+00 0.67366429D-02
+ 0.33000000D+01 0.34000000D+01 0.73292950D+00 0.86208073D-02
+ 0.34000000D+01 0.35000000D+01 0.56596348D+00 0.73202363D-02
+ 0.35000000D+01 0.36000000D+01 0.43508361D+00 0.38980670D-02
+ 0.36000000D+01 0.37000000D+01 0.32040879D+00 0.27484874D-02
+ 0.37000000D+01 0.38000000D+01 0.22386049D+00 0.22381288D-02
+ 0.38000000D+01 0.39000000D+01 0.15133969D+00 0.17511133D-02
+ 0.39000000D+01 0.40000000D+01 0.91448962D-01 0.86286382D-03
+ 0.40000000D+01 0.41000000D+01 0.49330609D-01 0.47520119D-03
+ 0.41000000D+01 0.42000000D+01 0.22413930D-01 0.23853085D-03
+ 0.42000000D+01 0.43000000D+01 0.74478126D-02 0.17101932D-03
+ 0.43000000D+01 0.44000000D+01 0.13635606D-02 0.26546948D-04
+ 0.44000000D+01 0.45000000D+01 -.14498734D-03 0.75921096D-05
+ 0.45000000D+01 0.46000000D+01 -.10181360D-03 0.36737007D-05
+ 0.46000000D+01 0.47000000D+01 -.19224748D-05 0.55585479D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19917762D-05 0.55715010D-06
+ -.46000000D+01 -.45000000D+01 -.10129751D-03 0.36618553D-05
+ -.45000000D+01 -.44000000D+01 -.14984610D-03 0.77185423D-05
+ -.44000000D+01 -.43000000D+01 0.13956139D-02 0.26834141D-04
+ -.43000000D+01 -.42000000D+01 0.77069975D-02 0.88691944D-04
+ -.42000000D+01 -.41000000D+01 0.23215266D-01 0.21975382D-03
+ -.41000000D+01 -.40000000D+01 0.51510835D-01 0.53880243D-03
+ -.40000000D+01 -.39000000D+01 0.98652448D-01 0.97897747D-03
+ -.39000000D+01 -.38000000D+01 0.16018928D+00 0.13694169D-02
+ -.38000000D+01 -.37000000D+01 0.23975696D+00 0.21340143D-02
+ -.37000000D+01 -.36000000D+01 0.34321968D+00 0.27820040D-02
+ -.36000000D+01 -.35000000D+01 0.47215835D+00 0.41346854D-02
+ -.35000000D+01 -.34000000D+01 0.62433295D+00 0.78797003D-02
+ -.34000000D+01 -.33000000D+01 0.77413099D+00 0.56960343D-02
+ -.33000000D+01 -.32000000D+01 0.98563622D+00 0.61896941D-02
+ -.32000000D+01 -.31000000D+01 0.12006642D+01 0.97114501D-02
+ -.31000000D+01 -.30000000D+01 0.14200369D+01 0.10064540D-01
+ -.30000000D+01 -.29000000D+01 0.17314187D+01 0.31090155D-01
+ -.29000000D+01 -.28000000D+01 0.19833814D+01 0.11954874D-01
+ -.28000000D+01 -.27000000D+01 0.23065343D+01 0.11518621D-01
+ -.27000000D+01 -.26000000D+01 0.26180052D+01 0.10794150D-01
+ -.26000000D+01 -.25000000D+01 0.29945801D+01 0.21225776D-01
+ -.25000000D+01 -.24000000D+01 0.33237391D+01 0.12989930D-01
+ -.24000000D+01 -.23000000D+01 0.37203259D+01 0.15343911D-01
+ -.23000000D+01 -.22000000D+01 0.40498673D+01 0.16564006D-01
+ -.22000000D+01 -.21000000D+01 0.44860291D+01 0.23882058D-01
+ -.21000000D+01 -.20000000D+01 0.48584672D+01 0.17108696D-01
+ -.20000000D+01 -.19000000D+01 0.51949071D+01 0.17366265D-01
+ -.19000000D+01 -.18000000D+01 0.55765374D+01 0.17162870D-01
+ -.18000000D+01 -.17000000D+01 0.59450553D+01 0.21801545D-01
+ -.17000000D+01 -.16000000D+01 0.62583629D+01 0.23614859D-01
+ -.16000000D+01 -.15000000D+01 0.66197800D+01 0.21139586D-01
+ -.15000000D+01 -.14000000D+01 0.69753578D+01 0.36974185D-01
+ -.14000000D+01 -.13000000D+01 0.72456041D+01 0.24768306D-01
+ -.13000000D+01 -.12000000D+01 0.75829910D+01 0.23026404D-01
+ -.12000000D+01 -.11000000D+01 0.78325007D+01 0.21234883D-01
+ -.11000000D+01 -.10000000D+01 0.80512229D+01 0.23104524D-01
+ -.10000000D+01 -.90000000D+00 0.82298561D+01 0.25143170D-01
+ -.90000000D+00 -.80000000D+00 0.84445009D+01 0.22133429D-01
+ -.80000000D+00 -.70000000D+00 0.87141522D+01 0.48665423D-01
+ -.70000000D+00 -.60000000D+00 0.88459485D+01 0.23851713D-01
+ -.60000000D+00 -.50000000D+00 0.89210778D+01 0.26852822D-01
+ -.50000000D+00 -.40000000D+00 0.91041569D+01 0.25286172D-01
+ -.40000000D+00 -.30000000D+00 0.92070496D+01 0.48533550D-01
+ -.30000000D+00 -.20000000D+00 0.92359314D+01 0.41496522D-01
+ -.20000000D+00 -.10000000D+00 0.92525078D+01 0.24371598D-01
+ -.10000000D+00 0.18041124D-15 0.92741042D+01 0.22367564D-01
+ 0.70776718D-15 0.10000000D+00 0.92957954D+01 0.28115187D-01
+ 0.10000000D+00 0.20000000D+00 0.92966483D+01 0.25293047D-01
+ 0.20000000D+00 0.30000000D+00 0.92172749D+01 0.27137258D-01
+ 0.30000000D+00 0.40000000D+00 0.91195350D+01 0.53571410D-01
+ 0.40000000D+00 0.50000000D+00 0.90155988D+01 0.24469771D-01
+ 0.50000000D+00 0.60000000D+00 0.89708334D+01 0.38998679D-01
+ 0.60000000D+00 0.70000000D+00 0.88257585D+01 0.23691203D-01
+ 0.70000000D+00 0.80000000D+00 0.86159315D+01 0.42102361D-01
+ 0.80000000D+00 0.90000000D+00 0.84847198D+01 0.24911941D-01
+ 0.90000000D+00 0.10000000D+01 0.82378502D+01 0.22253645D-01
+ 0.10000000D+01 0.11000000D+01 0.80208489D+01 0.38458073D-01
+ 0.11000000D+01 0.12000000D+01 0.78095673D+01 0.30223044D-01
+ 0.12000000D+01 0.13000000D+01 0.75149296D+01 0.23507144D-01
+ 0.13000000D+01 0.14000000D+01 0.72674964D+01 0.22480054D-01
+ 0.14000000D+01 0.15000000D+01 0.69318290D+01 0.22812729D-01
+ 0.15000000D+01 0.16000000D+01 0.66022878D+01 0.21085043D-01
+ 0.16000000D+01 0.17000000D+01 0.62803378D+01 0.23389679D-01
+ 0.17000000D+01 0.18000000D+01 0.59481958D+01 0.17870369D-01
+ 0.18000000D+01 0.19000000D+01 0.55554871D+01 0.18241731D-01
+ 0.19000000D+01 0.20000000D+01 0.51828503D+01 0.17392709D-01
+ 0.20000000D+01 0.21000000D+01 0.48467080D+01 0.17679023D-01
+ 0.21000000D+01 0.22000000D+01 0.44739902D+01 0.16748997D-01
+ 0.22000000D+01 0.23000000D+01 0.36907899D+01 0.37123639D+00
+ 0.23000000D+01 0.24000000D+01 0.37236105D+01 0.17996378D-01
+ 0.24000000D+01 0.25000000D+01 0.33072610D+01 0.15668825D-01
+ 0.25000000D+01 0.26000000D+01 0.29538478D+01 0.14304605D-01
+ 0.26000000D+01 0.27000000D+01 0.26306411D+01 0.11543525D-01
+ 0.27000000D+01 0.28000000D+01 0.23028029D+01 0.13828531D-01
+ 0.28000000D+01 0.29000000D+01 0.19966671D+01 0.14266179D-01
+ 0.29000000D+01 0.30000000D+01 0.16974273D+01 0.10568530D-01
+ 0.30000000D+01 0.31000000D+01 0.14376841D+01 0.77808658D-02
+ 0.31000000D+01 0.32000000D+01 0.12001685D+01 0.15213496D-01
+ 0.32000000D+01 0.33000000D+01 0.96846293D+00 0.67466865D-02
+ 0.33000000D+01 0.34000000D+01 0.78408259D+00 0.86248619D-02
+ 0.34000000D+01 0.35000000D+01 0.60474002D+00 0.73238428D-02
+ 0.35000000D+01 0.36000000D+01 0.46350185D+00 0.39127916D-02
+ 0.36000000D+01 0.37000000D+01 0.34000093D+00 0.27656710D-02
+ 0.37000000D+01 0.38000000D+01 0.23693587D+00 0.22409316D-02
+ 0.38000000D+01 0.39000000D+01 0.15931124D+00 0.17533168D-02
+ 0.39000000D+01 0.40000000D+01 0.95861990D-01 0.86375315D-03
+ 0.40000000D+01 0.41000000D+01 0.51443678D-01 0.47562265D-03
+ 0.41000000D+01 0.42000000D+01 0.23239544D-01 0.23866514D-03
+ 0.42000000D+01 0.43000000D+01 0.76842401D-02 0.17105172D-03
+ 0.43000000D+01 0.44000000D+01 0.13981242D-02 0.26553480D-04
+ 0.44000000D+01 0.45000000D+01 -.14848383D-03 0.75925229D-05
+ 0.45000000D+01 0.46000000D+01 -.10316748D-03 0.36738617D-05
+ 0.46000000D+01 0.47000000D+01 -.19307931D-05 0.55585638D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19964293D-05 0.55715046D-06
+ -.46000000D+01 -.45000000D+01 -.10208689D-03 0.36619422D-05
+ -.45000000D+01 -.44000000D+01 -.15208737D-03 0.77188738D-05
+ -.44000000D+01 -.43000000D+01 0.14164003D-02 0.26841950D-04
+ -.43000000D+01 -.42000000D+01 0.78554812D-02 0.88714474D-04
+ -.42000000D+01 -.41000000D+01 0.23749174D-01 0.21982675D-03
+ -.41000000D+01 -.40000000D+01 0.52908869D-01 0.53897755D-03
+ -.40000000D+01 -.39000000D+01 0.10163918D+00 0.97941883D-03
+ -.39000000D+01 -.38000000D+01 0.16570782D+00 0.13702787D-02
+ -.38000000D+01 -.37000000D+01 0.24892674D+00 0.21375279D-02
+ -.37000000D+01 -.36000000D+01 0.35735215D+00 0.27837244D-02
+ -.36000000D+01 -.35000000D+01 0.49264481D+00 0.41370223D-02
+ -.35000000D+01 -.34000000D+01 0.65275977D+00 0.78826726D-02
+ -.34000000D+01 -.33000000D+01 0.81223233D+00 0.57051683D-02
+ -.33000000D+01 -.32000000D+01 0.10348749D+01 0.62018354D-02
+ -.32000000D+01 -.31000000D+01 0.12632381D+01 0.97203497D-02
+ -.31000000D+01 -.30000000D+01 0.14970235D+01 0.10102287D-01
+ -.30000000D+01 -.29000000D+01 0.18257346D+01 0.31105808D-01
+ -.29000000D+01 -.28000000D+01 0.20959459D+01 0.11963587D-01
+ -.28000000D+01 -.27000000D+01 0.24396226D+01 0.11537470D-01
+ -.27000000D+01 -.26000000D+01 0.27723123D+01 0.10818141D-01
+ -.26000000D+01 -.25000000D+01 0.31721130D+01 0.21233959D-01
+ -.25000000D+01 -.24000000D+01 0.35258653D+01 0.13059502D-01
+ -.24000000D+01 -.23000000D+01 0.39477262D+01 0.15405326D-01
+ -.23000000D+01 -.22000000D+01 0.43036985D+01 0.16581413D-01
+ -.22000000D+01 -.21000000D+01 0.47676225D+01 0.23900478D-01
+ -.21000000D+01 -.20000000D+01 0.51675027D+01 0.17130158D-01
+ -.20000000D+01 -.19000000D+01 0.55317281D+01 0.17405598D-01
+ -.19000000D+01 -.18000000D+01 0.59415901D+01 0.17182958D-01
+ -.18000000D+01 -.17000000D+01 0.63376216D+01 0.21827973D-01
+ -.17000000D+01 -.16000000D+01 0.66781523D+01 0.23624583D-01
+ -.16000000D+01 -.15000000D+01 0.70654165D+01 0.21197107D-01
+ -.15000000D+01 -.14000000D+01 0.74474770D+01 0.36969189D-01
+ -.14000000D+01 -.13000000D+01 0.77420178D+01 0.24793818D-01
+ -.13000000D+01 -.12000000D+01 0.81034659D+01 0.23255092D-01
+ -.12000000D+01 -.11000000D+01 0.83734413D+01 0.21262583D-01
+ -.11000000D+01 -.10000000D+01 0.86137297D+01 0.23128501D-01
+ -.10000000D+01 -.90000000D+00 0.88122229D+01 0.25278068D-01
+ -.90000000D+00 -.80000000D+00 0.90429978D+01 0.22307920D-01
+ -.80000000D+00 -.70000000D+00 0.93275979D+01 0.48666523D-01
+ -.70000000D+00 -.60000000D+00 0.94743946D+01 0.23870874D-01
+ -.60000000D+00 -.50000000D+00 0.95608345D+01 0.26920754D-01
+ -.50000000D+00 -.40000000D+00 0.97534092D+01 0.25309537D-01
+ -.40000000D+00 -.30000000D+00 0.98653667D+01 0.48563208D-01
+ -.30000000D+00 -.20000000D+00 0.99001651D+01 0.41514147D-01
+ -.20000000D+00 -.10000000D+00 0.99206946D+01 0.24414292D-01
+ -.10000000D+00 0.18041124D-15 0.99440731D+01 0.22393982D-01
+ 0.70776718D-15 0.10000000D+00 0.99657508D+01 0.28042765D-01
+ 0.10000000D+00 0.20000000D+00 0.99650759D+01 0.25335564D-01
+ 0.20000000D+00 0.30000000D+00 0.98807248D+01 0.27204605D-01
+ 0.30000000D+00 0.40000000D+00 0.97778792D+01 0.53595258D-01
+ 0.40000000D+00 0.50000000D+00 0.96651773D+01 0.24518173D-01
+ 0.50000000D+00 0.60000000D+00 0.96108537D+01 0.39016239D-01
+ 0.60000000D+00 0.70000000D+00 0.94541694D+01 0.23719860D-01
+ 0.70000000D+00 0.80000000D+00 0.92304950D+01 0.42120100D-01
+ 0.80000000D+00 0.90000000D+00 0.90830074D+01 0.24928486D-01
+ 0.90000000D+00 0.10000000D+01 0.88196681D+01 0.22279494D-01
+ 0.10000000D+01 0.11000000D+01 0.85833949D+01 0.38479601D-01
+ 0.11000000D+01 0.12000000D+01 0.83508865D+01 0.30258687D-01
+ 0.12000000D+01 0.13000000D+01 0.80345731D+01 0.23530010D-01
+ 0.13000000D+01 0.14000000D+01 0.77636317D+01 0.22516700D-01
+ 0.14000000D+01 0.15000000D+01 0.74042803D+01 0.22817519D-01
+ 0.15000000D+01 0.16000000D+01 0.70481262D+01 0.21134633D-01
+ 0.16000000D+01 0.17000000D+01 0.67001559D+01 0.23404129D-01
+ 0.17000000D+01 0.18000000D+01 0.63409005D+01 0.17904964D-01
+ 0.18000000D+01 0.19000000D+01 0.59197477D+01 0.18282198D-01
+ 0.19000000D+01 0.20000000D+01 0.55201230D+01 0.17411259D-01
+ 0.20000000D+01 0.21000000D+01 0.51556167D+01 0.17701538D-01
+ 0.21000000D+01 0.22000000D+01 0.47555079D+01 0.16763142D-01
+ 0.22000000D+01 0.23000000D+01 0.39447171D+01 0.37125443D+00
+ 0.23000000D+01 0.24000000D+01 0.39514587D+01 0.18012533D-01
+ 0.24000000D+01 0.25000000D+01 0.35090512D+01 0.15682037D-01
+ 0.25000000D+01 0.26000000D+01 0.31312025D+01 0.14335346D-01
+ 0.26000000D+01 0.27000000D+01 0.27853098D+01 0.11579327D-01
+ 0.27000000D+01 0.28000000D+01 0.24360297D+01 0.13837400D-01
+ 0.28000000D+01 0.29000000D+01 0.21092525D+01 0.14277931D-01
+ 0.29000000D+01 0.30000000D+01 0.17915432D+01 0.10578557D-01
+ 0.30000000D+01 0.31000000D+01 0.15150521D+01 0.77866241D-02
+ 0.31000000D+01 0.32000000D+01 0.12626144D+01 0.15217708D-01
+ 0.32000000D+01 0.33000000D+01 0.10178283D+01 0.67545796D-02
+ 0.33000000D+01 0.34000000D+01 0.82206699D+00 0.86274572D-02
+ 0.34000000D+01 0.35000000D+01 0.63321855D+00 0.73264570D-02
+ 0.35000000D+01 0.36000000D+01 0.48409942D+00 0.39237638D-02
+ 0.36000000D+01 0.37000000D+01 0.35399050D+00 0.27789552D-02
+ 0.37000000D+01 0.38000000D+01 0.24612782D+00 0.22428465D-02
+ 0.38000000D+01 0.39000000D+01 0.16481462D+00 0.17547286D-02
+ 0.39000000D+01 0.40000000D+01 0.98846566D-01 0.86435694D-03
+ 0.40000000D+01 0.41000000D+01 0.52842833D-01 0.47587535D-03
+ 0.41000000D+01 0.42000000D+01 0.23773606D-01 0.23874490D-03
+ 0.42000000D+01 0.43000000D+01 0.78331350D-02 0.17106964D-03
+ 0.43000000D+01 0.44000000D+01 0.14189570D-02 0.26557140D-04
+ 0.44000000D+01 0.45000000D+01 -.15069583D-03 0.75927717D-05
+ 0.45000000D+01 0.46000000D+01 -.10395583D-03 0.36739510D-05
+ 0.46000000D+01 0.47000000D+01 -.19353628D-05 0.55585724D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.19986596D-05 0.55715063D-06
+ -.46000000D+01 -.45000000D+01 -.10247957D-03 0.36619843D-05
+ -.45000000D+01 -.44000000D+01 -.15326838D-03 0.77190376D-05
+ -.44000000D+01 -.43000000D+01 0.14269874D-02 0.26846061D-04
+ -.43000000D+01 -.42000000D+01 0.79337333D-02 0.88725765D-04
+ -.42000000D+01 -.41000000D+01 0.24036795D-01 0.21986201D-03
+ -.41000000D+01 -.40000000D+01 0.53676915D-01 0.53906635D-03
+ -.40000000D+01 -.39000000D+01 0.10331180D+00 0.97965466D-03
+ -.39000000D+01 -.38000000D+01 0.16885296D+00 0.13707568D-02
+ -.38000000D+01 -.37000000D+01 0.25423950D+00 0.21392916D-02
+ -.37000000D+01 -.36000000D+01 0.36566667D+00 0.27846882D-02
+ -.36000000D+01 -.35000000D+01 0.50487890D+00 0.41382330D-02
+ -.35000000D+01 -.34000000D+01 0.66994841D+00 0.78844005D-02
+ -.34000000D+01 -.33000000D+01 0.83552928D+00 0.57103159D-02
+ -.33000000D+01 -.32000000D+01 0.10653307D+01 0.62091036D-02
+ -.32000000D+01 -.31000000D+01 0.13023065D+01 0.97249754D-02
+ -.31000000D+01 -.30000000D+01 0.15454959D+01 0.10134162D-01
+ -.30000000D+01 -.29000000D+01 0.18856350D+01 0.31118185D-01
+ -.29000000D+01 -.28000000D+01 0.21679531D+01 0.11968226D-01
+ -.28000000D+01 -.27000000D+01 0.25254718D+01 0.11554657D-01
+ -.27000000D+01 -.26000000D+01 0.28721747D+01 0.10839938D-01
+ -.26000000D+01 -.25000000D+01 0.32878323D+01 0.21238178D-01
+ -.25000000D+01 -.24000000D+01 0.36584165D+01 0.13129961D-01
+ -.24000000D+01 -.23000000D+01 0.40973611D+01 0.15466973D-01
+ -.23000000D+01 -.22000000D+01 0.44716286D+01 0.16595755D-01
+ -.22000000D+01 -.21000000D+01 0.49548306D+01 0.23916169D-01
+ -.21000000D+01 -.20000000D+01 0.53736920D+01 0.17147128D-01
+ -.20000000D+01 -.19000000D+01 0.57571819D+01 0.17440502D-01
+ -.19000000D+01 -.18000000D+01 0.61871372D+01 0.17202167D-01
+ -.18000000D+01 -.17000000D+01 0.66024642D+01 0.21843088D-01
+ -.17000000D+01 -.16000000D+01 0.69622274D+01 0.23634187D-01
+ -.16000000D+01 -.15000000D+01 0.73676921D+01 0.21247638D-01
+ -.15000000D+01 -.14000000D+01 0.77689088D+01 0.36974808D-01
+ -.14000000D+01 -.13000000D+01 0.80809182D+01 0.24811385D-01
+ -.13000000D+01 -.12000000D+01 0.84594011D+01 0.23385695D-01
+ -.12000000D+01 -.11000000D+01 0.87442028D+01 0.21283410D-01
+ -.11000000D+01 -.10000000D+01 0.90001126D+01 0.23144384D-01
+ -.10000000D+01 -.90000000D+00 0.92130906D+01 0.25397689D-01
+ -.90000000D+00 -.80000000D+00 0.94554554D+01 0.22463405D-01
+ -.80000000D+00 -.70000000D+00 0.97510433D+01 0.48667566D-01
+ -.70000000D+00 -.60000000D+00 0.99087749D+01 0.23874187D-01
+ -.60000000D+00 -.50000000D+00 0.10003472D+02 0.26964424D-01
+ -.50000000D+00 -.40000000D+00 0.10202987D+02 0.25324713D-01
+ -.40000000D+00 -.30000000D+00 0.10321564D+02 0.48578317D-01
+ -.30000000D+00 -.20000000D+00 0.10360773D+02 0.41525758D-01
+ -.20000000D+00 -.10000000D+00 0.10384106D+02 0.24445944D-01
+ -.10000000D+00 0.18041124D-15 0.10408963D+02 0.22411391D-01
+ 0.70776718D-15 0.10000000D+00 0.10430496D+02 0.27991947D-01
+ 0.10000000D+00 0.20000000D+00 0.10428823D+02 0.25368197D-01
+ 0.20000000D+00 0.30000000D+00 0.10340491D+02 0.27245692D-01
+ 0.30000000D+00 0.40000000D+00 0.10234289D+02 0.53609874D-01
+ 0.40000000D+00 0.50000000D+00 0.10115196D+02 0.24545262D-01
+ 0.50000000D+00 0.60000000D+00 0.10053634D+02 0.39028720D-01
+ 0.60000000D+00 0.70000000D+00 0.98885545D+01 0.23745653D-01
+ 0.70000000D+00 0.80000000D+00 0.96546328D+01 0.42135470D-01
+ 0.80000000D+00 0.90000000D+00 0.94953700D+01 0.24941632D-01
+ 0.90000000D+00 0.10000000D+01 0.92200730D+01 0.22297785D-01
+ 0.10000000D+01 0.11000000D+01 0.89698688D+01 0.38494685D-01
+ 0.11000000D+01 0.12000000D+01 0.87218797D+01 0.30288050D-01
+ 0.12000000D+01 0.13000000D+01 0.83900332D+01 0.23548985D-01
+ 0.13000000D+01 0.14000000D+01 0.81021902D+01 0.22539634D-01
+ 0.14000000D+01 0.15000000D+01 0.77260081D+01 0.22821941D-01
+ 0.15000000D+01 0.16000000D+01 0.73506851D+01 0.21171815D-01
+ 0.16000000D+01 0.17000000D+01 0.69842976D+01 0.23413310D-01
+ 0.17000000D+01 0.18000000D+01 0.66057831D+01 0.17926990D-01
+ 0.18000000D+01 0.19000000D+01 0.61646273D+01 0.18308613D-01
+ 0.19000000D+01 0.20000000D+01 0.57459588D+01 0.17422806D-01
+ 0.20000000D+01 0.21000000D+01 0.53617226D+01 0.17714789D-01
+ 0.21000000D+01 0.22000000D+01 0.49425975D+01 0.16773373D-01
+ 0.22000000D+01 0.23000000D+01 0.41128219D+01 0.37126308D+00
+ 0.23000000D+01 0.24000000D+01 0.41015022D+01 0.18023015D-01
+ 0.24000000D+01 0.25000000D+01 0.36412731D+01 0.15690602D-01
+ 0.25000000D+01 0.26000000D+01 0.32467243D+01 0.14366969D-01
+ 0.26000000D+01 0.27000000D+01 0.28856212D+01 0.11616446D-01
+ 0.27000000D+01 0.28000000D+01 0.25218584D+01 0.13844294D-01
+ 0.28000000D+01 0.29000000D+01 0.21812658D+01 0.14286270D-01
+ 0.29000000D+01 0.30000000D+01 0.18512874D+01 0.10585261D-01
+ 0.30000000D+01 0.31000000D+01 0.15637660D+01 0.77901562D-02
+ 0.31000000D+01 0.32000000D+01 0.13016345D+01 0.15220499D-01
+ 0.32000000D+01 0.33000000D+01 0.10483317D+01 0.67598120D-02
+ 0.33000000D+01 0.34000000D+01 0.84530370D+00 0.86289310D-02
+ 0.34000000D+01 0.35000000D+01 0.65044560D+00 0.73282023D-02
+ 0.35000000D+01 0.36000000D+01 0.49639304D+00 0.39301633D-02
+ 0.36000000D+01 0.37000000D+01 0.36222365D+00 0.27868150D-02
+ 0.37000000D+01 0.38000000D+01 0.25145626D+00 0.22439714D-02
+ 0.38000000D+01 0.39000000D+01 0.16795202D+00 0.17554792D-02
+ 0.39000000D+01 0.40000000D+01 0.10051696D+00 0.86470309D-03
+ 0.40000000D+01 0.41000000D+01 0.53611647D-01 0.47600491D-03
+ 0.41000000D+01 0.42000000D+01 0.24061341D-01 0.23878554D-03
+ 0.42000000D+01 0.43000000D+01 0.79116050D-02 0.17107833D-03
+ 0.43000000D+01 0.44000000D+01 0.14295662D-02 0.26558928D-04
+ 0.44000000D+01 0.45000000D+01 -.15186120D-03 0.75928992D-05
+ 0.45000000D+01 0.46000000D+01 -.10434792D-03 0.36739941D-05
+ 0.46000000D+01 0.47000000D+01 -.19375534D-05 0.55585764D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 -.23406336D+01 0.14054817D-01
+ 0.30000000D+01 0.60000000D+01 0.10101696D+01 0.29393436D-02
+ 0.60000000D+01 0.90000000D+01 0.21605252D+01 0.22475597D-02
+ 0.90000000D+01 0.12000000D+02 0.18672992D+01 0.18009514D-02
+ 0.12000000D+02 0.15000000D+02 0.15260698D+01 0.15158778D-02
+ 0.15000000D+02 0.18000000D+02 0.12569012D+01 0.17359415D-02
+ 0.18000000D+02 0.21000000D+02 0.10433395D+01 0.16000870D-02
+ 0.21000000D+02 0.24000000D+02 0.88673620D+00 0.11975290D-02
+ 0.24000000D+02 0.27000000D+02 0.75642000D+00 0.11571194D-02
+ 0.27000000D+02 0.30000000D+02 0.65581860D+00 0.97992072D-03
+ 0.30000000D+02 0.33000000D+02 0.57376987D+00 0.92957357D-03
+ 0.33000000D+02 0.36000000D+02 0.50585815D+00 0.17296960D-02
+ 0.36000000D+02 0.39000000D+02 0.44671968D+00 0.17337717D-02
+ 0.39000000D+02 0.42000000D+02 0.39919211D+00 0.85894150D-03
+ 0.42000000D+02 0.45000000D+02 0.35966981D+00 0.73542279D-03
+ 0.45000000D+02 0.48000000D+02 0.32269996D+00 0.61342450D-03
+ 0.48000000D+02 0.51000000D+02 0.29230280D+00 0.69680043D-03
+ 0.51000000D+02 0.54000000D+02 0.26475074D+00 0.67945444D-03
+ 0.54000000D+02 0.57000000D+02 0.24249726D+00 0.57079378D-03
+ 0.57000000D+02 0.60000000D+02 0.22093479D+00 0.64490142D-03
+ 0.60000000D+02 0.63000000D+02 0.20111085D+00 0.71455106D-03
+ 0.63000000D+02 0.66000000D+02 0.18544986D+00 0.62789831D-03
+ 0.66000000D+02 0.69000000D+02 0.17019444D+00 0.59332765D-03
+ 0.69000000D+02 0.72000000D+02 0.15682862D+00 0.52005535D-03
+ 0.72000000D+02 0.75000000D+02 0.14411602D+00 0.46949357D-03
+ 0.75000000D+02 0.78000000D+02 0.13443646D+00 0.65134808D-03
+ 0.78000000D+02 0.81000000D+02 0.12322608D+00 0.97028348D-03
+ 0.81000000D+02 0.84000000D+02 0.11531706D+00 0.90627052D-03
+ 0.84000000D+02 0.87000000D+02 0.10675378D+00 0.50249062D-03
+ 0.87000000D+02 0.90000000D+02 0.99442088D-01 0.33346588D-03
+ 0.90000000D+02 0.93000000D+02 0.92753532D-01 0.36724884D-03
+ 0.93000000D+02 0.96000000D+02 0.85357592D-01 0.38450622D-03
+ 0.96000000D+02 0.99000000D+02 0.80282098D-01 0.32837707D-03
+ 0.99000000D+02 0.10200000D+03 0.75163446D-01 0.26429505D-03
+ 0.10200000D+03 0.10500000D+03 0.70215661D-01 0.34354173D-03
+ 0.10500000D+03 0.10800000D+03 0.65086693D-01 0.39505094D-03
+ 0.10800000D+03 0.11100000D+03 0.61455629D-01 0.38169474D-03
+ 0.11100000D+03 0.11400000D+03 0.57373417D-01 0.31170032D-03
+ 0.11400000D+03 0.11700000D+03 0.53317263D-01 0.73963845D-03
+ 0.11700000D+03 0.12000000D+03 0.50924121D-01 0.73409649D-03
+ 0.12000000D+03 0.12300000D+03 0.47722437D-01 0.24629330D-03
+ 0.12300000D+03 0.12600000D+03 0.44895885D-01 0.25867021D-03
+ 0.12600000D+03 0.12900000D+03 0.41702114D-01 0.24461179D-03
+ 0.12900000D+03 0.13200000D+03 0.39305089D-01 0.23243594D-03
+ 0.13200000D+03 0.13500000D+03 0.37389991D-01 0.25257406D-03
+ 0.13500000D+03 0.13800000D+03 0.34719956D-01 0.29835142D-03
+ 0.13800000D+03 0.14100000D+03 0.33662826D-01 0.27003423D-03
+ 0.14100000D+03 0.14400000D+03 0.31178404D-01 0.20978763D-03
+ 0.14400000D+03 0.14700000D+03 0.29633481D-01 0.23899411D-03
+ 0.14700000D+03 0.15000000D+03 0.27822798D-01 0.29302741D-03
+ 0.15000000D+03 0.15300000D+03 0.27159735D-01 0.64621682D-03
+ 0.15300000D+03 0.15600000D+03 0.24092505D-01 0.65500547D-03
+ 0.15600000D+03 0.15900000D+03 0.24331447D-01 0.36722668D-03
+ 0.15900000D+03 0.16200000D+03 0.22152922D-01 0.28492058D-03
+ 0.16200000D+03 0.16500000D+03 0.21105259D-01 0.16029484D-03
+ 0.16500000D+03 0.16800000D+03 0.19978384D-01 0.15953340D-03
+ 0.16800000D+03 0.17100000D+03 0.19017542D-01 0.15219944D-03
+ 0.17100000D+03 0.17400000D+03 0.18215168D-01 0.20074418D-03
+ 0.17400000D+03 0.17700000D+03 0.17170117D-01 0.20582314D-03
+ 0.17700000D+03 0.18000000D+03 0.15943602D-01 0.17842237D-03
+ 0.18000000D+03 0.18300000D+03 0.15460261D-01 0.13423586D-03
+ 0.18300000D+03 0.18600000D+03 0.12894678D-01 0.16376565D-02
+ 0.18600000D+03 0.18900000D+03 0.15306207D-01 0.16368147D-02
+ 0.18900000D+03 0.19200000D+03 0.13256086D-01 0.11271860D-03
+ 0.19200000D+03 0.19500000D+03 0.12304640D-01 0.12762087D-03
+ 0.19500000D+03 0.19800000D+03 0.11927878D-01 0.12126256D-03
+ 0.19800000D+03 0.20100000D+03 0.11461913D-01 0.27228322D-03
+ 0.20100000D+03 0.20400000D+03 0.10368659D-01 0.27849003D-03
+ 0.20400000D+03 0.20700000D+03 0.10118295D-01 0.12263470D-03
+ 0.20700000D+03 0.21000000D+03 0.97850102D-02 0.11267444D-03
+ 0.21000000D+03 0.21300000D+03 0.91901668D-02 0.12920778D-03
+ 0.21300000D+03 0.21600000D+03 0.87300282D-02 0.13312035D-03
+ 0.21600000D+03 0.21900000D+03 0.83114677D-02 0.10053528D-03
+ 0.21900000D+03 0.22200000D+03 0.78526545D-02 0.10552016D-03
+ 0.22200000D+03 0.22500000D+03 0.74979172D-02 0.10857172D-03
+ 0.22500000D+03 0.22800000D+03 0.70131028D-02 0.15150289D-03
+ 0.22800000D+03 0.23100000D+03 0.69102793D-02 0.14799139D-03
+ 0.23100000D+03 0.23400000D+03 0.64805343D-02 0.78523772D-04
+ 0.23400000D+03 0.23700000D+03 0.61909960D-02 0.80543831D-04
+ 0.23700000D+03 0.24000000D+03 0.57896012D-02 0.97050856D-04
+ 0.24000000D+03 0.24300000D+03 0.56253814D-02 0.92795947D-04
+ 0.24300000D+03 0.24600000D+03 0.52951863D-02 0.74172203D-04
+ 0.24600000D+03 0.24900000D+03 0.51528301D-02 0.10977636D-03
+ 0.24900000D+03 0.25200000D+03 0.47600842D-02 0.12615002D-03
+ 0.25200000D+03 0.25500000D+03 0.44831733D-02 0.10450946D-03
+ 0.25500000D+03 0.25800000D+03 0.44653611D-02 0.78413635D-04
+ 0.25800000D+03 0.26100000D+03 0.40928867D-02 0.93662247D-04
+ 0.26100000D+03 0.26400000D+03 0.40518625D-02 0.96715770D-04
+ 0.26400000D+03 0.26700000D+03 0.36509014D-02 0.16391230D-03
+ 0.26700000D+03 0.27000000D+03 0.37901452D-02 0.16265476D-03
+ 0.27000000D+03 0.27300000D+03 0.34567517D-02 0.63240549D-04
+ 0.27300000D+03 0.27600000D+03 0.33648522D-02 0.78105884D-04
+ 0.27600000D+03 0.27900000D+03 0.30112220D-02 0.11529017D-03
+ 0.27900000D+03 0.28200000D+03 0.31193118D-02 0.10529575D-03
+ 0.28200000D+03 0.28500000D+03 0.28186410D-02 0.63750579D-04
+ 0.28500000D+03 0.28800000D+03 0.27414085D-02 0.64703172D-04
+ 0.28800000D+03 0.29100000D+03 0.25946277D-02 0.65107963D-04
+ 0.29100000D+03 0.29400000D+03 0.24414172D-02 0.65902971D-04
+ 0.29400000D+03 0.29700000D+03 0.24264787D-02 0.12570713D-03
+ 0.29700000D+03 0.30000000D+03 0.22942062D-02 0.12489776D-03
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 -.23382184D+01 0.14053960D-01
+ 0.30000000D+01 0.60000000D+01 0.10082951D+01 0.29355616D-02
+ 0.60000000D+01 0.90000000D+01 0.21527107D+01 0.22398787D-02
+ 0.90000000D+01 0.12000000D+02 0.18542505D+01 0.17888572D-02
+ 0.12000000D+02 0.15000000D+02 0.15085314D+01 0.14984396D-02
+ 0.15000000D+02 0.18000000D+02 0.12354312D+01 0.17044613D-02
+ 0.18000000D+02 0.21000000D+02 0.10186099D+01 0.15648708D-02
+ 0.21000000D+02 0.24000000D+02 0.85896823D+00 0.11590258D-02
+ 0.24000000D+02 0.27000000D+02 0.72625385D+00 0.11122395D-02
+ 0.27000000D+02 0.30000000D+02 0.62346911D+00 0.93102583D-03
+ 0.30000000D+02 0.33000000D+02 0.53956494D+00 0.87508916D-03
+ 0.33000000D+02 0.36000000D+02 0.47009251D+00 0.15996790D-02
+ 0.36000000D+02 0.39000000D+02 0.40987573D+00 0.15981709D-02
+ 0.39000000D+02 0.42000000D+02 0.36132278D+00 0.77783514D-03
+ 0.42000000D+02 0.45000000D+02 0.32086094D+00 0.65719311D-03
+ 0.45000000D+02 0.48000000D+02 0.28350774D+00 0.53896165D-03
+ 0.48000000D+02 0.51000000D+02 0.25271217D+00 0.60118161D-03
+ 0.51000000D+02 0.54000000D+02 0.22508585D+00 0.57888740D-03
+ 0.54000000D+02 0.57000000D+02 0.20259351D+00 0.47712858D-03
+ 0.57000000D+02 0.60000000D+02 0.18125565D+00 0.52752505D-03
+ 0.60000000D+02 0.63000000D+02 0.16194186D+00 0.57260381D-03
+ 0.63000000D+02 0.66000000D+02 0.14646980D+00 0.49552080D-03
+ 0.66000000D+02 0.69000000D+02 0.13178505D+00 0.46027209D-03
+ 0.69000000D+02 0.72000000D+02 0.11899370D+00 0.39476309D-03
+ 0.72000000D+02 0.75000000D+02 0.10710691D+00 0.34942223D-03
+ 0.75000000D+02 0.78000000D+02 0.97822713D-01 0.47103507D-03
+ 0.78000000D+02 0.81000000D+02 0.87756810D-01 0.68854505D-03
+ 0.81000000D+02 0.84000000D+02 0.80346670D-01 0.63471868D-03
+ 0.84000000D+02 0.87000000D+02 0.72742597D-01 0.34470043D-03
+ 0.87000000D+02 0.90000000D+02 0.66249702D-01 0.22178963D-03
+ 0.90000000D+02 0.93000000D+02 0.60398116D-01 0.23889570D-03
+ 0.93000000D+02 0.96000000D+02 0.54322074D-01 0.24463555D-03
+ 0.96000000D+02 0.99000000D+02 0.49923553D-01 0.20509490D-03
+ 0.99000000D+02 0.10200000D+03 0.45660071D-01 0.16037169D-03
+ 0.10200000D+03 0.10500000D+03 0.41657287D-01 0.20298258D-03
+ 0.10500000D+03 0.10800000D+03 0.37714032D-01 0.22892941D-03
+ 0.10800000D+03 0.11100000D+03 0.34776114D-01 0.21616715D-03
+ 0.11100000D+03 0.11400000D+03 0.31701882D-01 0.17296883D-03
+ 0.11400000D+03 0.11700000D+03 0.28767826D-01 0.39481965D-03
+ 0.11700000D+03 0.12000000D+03 0.26828775D-01 0.39084128D-03
+ 0.12000000D+03 0.12300000D+03 0.24542599D-01 0.12639255D-03
+ 0.12300000D+03 0.12600000D+03 0.22539758D-01 0.12999022D-03
+ 0.12600000D+03 0.12900000D+03 0.20439496D-01 0.11994741D-03
+ 0.12900000D+03 0.13200000D+03 0.18808860D-01 0.11127849D-03
+ 0.13200000D+03 0.13500000D+03 0.17471319D-01 0.11774718D-03
+ 0.13500000D+03 0.13800000D+03 0.15842659D-01 0.13584729D-03
+ 0.13800000D+03 0.14100000D+03 0.14996149D-01 0.12086794D-03
+ 0.14100000D+03 0.14400000D+03 0.13560459D-01 0.91197797D-04
+ 0.14400000D+03 0.14700000D+03 0.12585945D-01 0.10126529D-03
+ 0.14700000D+03 0.15000000D+03 0.11541006D-01 0.12127443D-03
+ 0.15000000D+03 0.15300000D+03 0.11000301D-01 0.25944798D-03
+ 0.15300000D+03 0.15600000D+03 0.95319829D-02 0.26130271D-03
+ 0.15600000D+03 0.15900000D+03 0.94047613D-02 0.14178454D-03
+ 0.15900000D+03 0.16200000D+03 0.83643517D-02 0.10857341D-03
+ 0.16200000D+03 0.16500000D+03 0.77869518D-02 0.58871758D-04
+ 0.16500000D+03 0.16800000D+03 0.72032981D-02 0.57771695D-04
+ 0.16800000D+03 0.17100000D+03 0.67009365D-02 0.53413511D-04
+ 0.17100000D+03 0.17400000D+03 0.62721044D-02 0.68943168D-04
+ 0.17400000D+03 0.17700000D+03 0.57786286D-02 0.69411283D-04
+ 0.17700000D+03 0.18000000D+03 0.52466645D-02 0.58682234D-04
+ 0.18000000D+03 0.18300000D+03 0.49742519D-02 0.43376866D-04
+ 0.18300000D+03 0.18600000D+03 0.40626727D-02 0.50955725D-03
+ 0.18600000D+03 0.18900000D+03 0.47160802D-02 0.50921773D-03
+ 0.18900000D+03 0.19200000D+03 0.39901696D-02 0.33907768D-04
+ 0.19200000D+03 0.19500000D+03 0.36237597D-02 0.37519412D-04
+ 0.19500000D+03 0.19800000D+03 0.34368775D-02 0.35032784D-04
+ 0.19800000D+03 0.20100000D+03 0.32315523D-02 0.76076878D-04
+ 0.20100000D+03 0.20400000D+03 0.28608059D-02 0.77480893D-04
+ 0.20400000D+03 0.20700000D+03 0.27336995D-02 0.33155496D-04
+ 0.20700000D+03 0.21000000D+03 0.25874786D-02 0.29814776D-04
+ 0.21000000D+03 0.21300000D+03 0.23793144D-02 0.33353595D-04
+ 0.21300000D+03 0.21600000D+03 0.22131455D-02 0.33842522D-04
+ 0.21600000D+03 0.21900000D+03 0.20636737D-02 0.25012600D-04
+ 0.21900000D+03 0.22200000D+03 0.19095290D-02 0.25563167D-04
+ 0.22200000D+03 0.22500000D+03 0.17866591D-02 0.25952743D-04
+ 0.22500000D+03 0.22800000D+03 0.16377780D-02 0.35143517D-04
+ 0.22800000D+03 0.23100000D+03 0.15812246D-02 0.34101464D-04
+ 0.23100000D+03 0.23400000D+03 0.14532470D-02 0.17605647D-04
+ 0.23400000D+03 0.23700000D+03 0.13608408D-02 0.17705153D-04
+ 0.23700000D+03 0.24000000D+03 0.12474984D-02 0.20857007D-04
+ 0.24000000D+03 0.24300000D+03 0.11888274D-02 0.19684136D-04
+ 0.24300000D+03 0.24600000D+03 0.10973715D-02 0.15356823D-04
+ 0.24600000D+03 0.24900000D+03 0.10472787D-02 0.22201362D-04
+ 0.24900000D+03 0.25200000D+03 0.94884737D-03 0.25187492D-04
+ 0.25200000D+03 0.25500000D+03 0.87701978D-03 0.20485936D-04
+ 0.25500000D+03 0.25800000D+03 0.85702087D-03 0.15097972D-04
+ 0.25800000D+03 0.26100000D+03 0.77129350D-03 0.17553210D-04
+ 0.26100000D+03 0.26400000D+03 0.74933064D-03 0.17950829D-04
+ 0.26400000D+03 0.26700000D+03 0.66283269D-03 0.29524067D-04
+ 0.26700000D+03 0.27000000D+03 0.67570410D-03 0.29194685D-04
+ 0.27000000D+03 0.27300000D+03 0.60470636D-03 0.11080082D-04
+ 0.27300000D+03 0.27600000D+03 0.57776986D-03 0.13360375D-04
+ 0.27600000D+03 0.27900000D+03 0.50803482D-03 0.19391315D-04
+ 0.27900000D+03 0.28200000D+03 0.51681014D-03 0.17543079D-04
+ 0.28200000D+03 0.28500000D+03 0.45871547D-03 0.10373363D-04
+ 0.28500000D+03 0.28800000D+03 0.43832719D-03 0.10348817D-04
+ 0.28800000D+03 0.29100000D+03 0.40767685D-03 0.10231527D-04
+ 0.29100000D+03 0.29400000D+03 0.37703672D-03 0.10178444D-04
+ 0.29400000D+03 0.29700000D+03 0.36832217D-03 0.18961807D-04
+ 0.29700000D+03 0.30000000D+03 0.34227683D-03 0.18753804D-04
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.41504698D+01 0.84020882D-03
+ 0.12500000D+03 0.13000000D+03 -.12019249D+02 0.88661305D-02
+ 0.13000000D+03 0.13500000D+03 0.42564004D+01 0.28238674D-02
+ 0.13500000D+03 0.14000000D+03 0.26310830D+01 0.22010206D-02
+ 0.14000000D+03 0.14500000D+03 0.17659218D+01 0.18088145D-02
+ 0.14500000D+03 0.15000000D+03 0.12677902D+01 0.16782257D-02
+ 0.15000000D+03 0.15500000D+03 0.96616616D+00 0.15571804D-02
+ 0.15500000D+03 0.16000000D+03 0.75440723D+00 0.12504976D-02
+ 0.16000000D+03 0.16500000D+03 0.61307291D+00 0.11792890D-02
+ 0.16500000D+03 0.17000000D+03 0.50485036D+00 0.10691516D-02
+ 0.17000000D+03 0.17500000D+03 0.42500418D+00 0.98324018D-03
+ 0.17500000D+03 0.18000000D+03 0.36221075D+00 0.84045117D-03
+ 0.18000000D+03 0.18500000D+03 0.31046681D+00 0.89851002D-03
+ 0.18500000D+03 0.19000000D+03 0.27227263D+00 0.86756011D-03
+ 0.19000000D+03 0.19500000D+03 0.23701716D+00 0.10630508D-02
+ 0.19500000D+03 0.20000000D+03 0.21157241D+00 0.13035081D-02
+ 0.20000000D+03 0.20500000D+03 0.18790988D+00 0.97617133D-03
+ 0.20500000D+03 0.21000000D+03 0.16747600D+00 0.17371711D-02
+ 0.21000000D+03 0.21500000D+03 0.15345154D+00 0.10853623D-02
+ 0.21500000D+03 0.22000000D+03 0.13668538D+00 0.57567499D-03
+ 0.22000000D+03 0.22500000D+03 0.12375847D+00 0.66237772D-03
+ 0.22500000D+03 0.23000000D+03 0.11234359D+00 0.86455709D-03
+ 0.23000000D+03 0.23500000D+03 0.10378788D+00 0.83438194D-03
+ 0.23500000D+03 0.24000000D+03 0.93782797D-01 0.82883161D-03
+ 0.24000000D+03 0.24500000D+03 0.87662305D-01 0.82108069D-03
+ 0.24500000D+03 0.25000000D+03 0.80667647D-01 0.53284085D-03
+ 0.25000000D+03 0.25500000D+03 0.73878075D-01 0.41818160D-03
+ 0.25500000D+03 0.26000000D+03 0.68178357D-01 0.46503738D-03
+ 0.26000000D+03 0.26500000D+03 0.63129558D-01 0.45404202D-03
+ 0.26500000D+03 0.27000000D+03 0.59707968D-01 0.37364823D-03
+ 0.27000000D+03 0.27500000D+03 0.54214105D-01 0.37625520D-03
+ 0.27500000D+03 0.28000000D+03 0.51250339D-01 0.41147212D-03
+ 0.28000000D+03 0.28500000D+03 0.47968122D-01 0.36502148D-03
+ 0.28500000D+03 0.29000000D+03 0.44440118D-01 0.34988758D-03
+ 0.29000000D+03 0.29500000D+03 0.41819895D-01 0.34170876D-03
+ 0.29500000D+03 0.30000000D+03 0.39988136D-01 0.25109321D-03
+ 0.30000000D+03 0.30500000D+03 0.36145577D-01 0.24667481D-03
+ 0.30500000D+03 0.31000000D+03 0.34026890D-01 0.37255573D-03
+ 0.31000000D+03 0.31500000D+03 0.32828158D-01 0.38539541D-03
+ 0.31500000D+03 0.32000000D+03 0.31282138D-01 0.29193117D-03
+ 0.32000000D+03 0.32500000D+03 0.28834411D-01 0.27636505D-03
+ 0.32500000D+03 0.33000000D+03 0.26956014D-01 0.29372596D-03
+ 0.33000000D+03 0.33500000D+03 0.26330093D-01 0.24658668D-03
+ 0.33500000D+03 0.34000000D+03 0.23784998D-01 0.25417910D-03
+ 0.34000000D+03 0.34500000D+03 0.23590400D-01 0.27251619D-03
+ 0.34500000D+03 0.35000000D+03 0.21805039D-01 0.26675669D-03
+ 0.35000000D+03 0.35500000D+03 0.21096393D-01 0.24537807D-03
+ 0.35500000D+03 0.36000000D+03 0.19835939D-01 0.18115197D-03
+ 0.36000000D+03 0.36500000D+03 0.18784652D-01 0.18559341D-03
+ 0.36500000D+03 0.37000000D+03 0.17175047D-01 0.24156836D-03
+ 0.37000000D+03 0.37500000D+03 0.16412192D-01 0.76746858D-03
+ 0.37500000D+03 0.38000000D+03 0.17073106D-01 0.75794490D-03
+ 0.38000000D+03 0.38500000D+03 0.15139099D-01 0.23613542D-03
+ 0.38500000D+03 0.39000000D+03 0.14467455D-01 0.22839419D-03
+ 0.39000000D+03 0.39500000D+03 0.13765905D-01 0.25683711D-03
+ 0.39500000D+03 0.40000000D+03 0.13449582D-01 0.25578968D-03
+ 0.40000000D+03 0.40500000D+03 0.12398117D-01 0.20878306D-03
+ 0.40500000D+03 0.41000000D+03 0.12124199D-01 0.22998146D-03
+ 0.41000000D+03 0.41500000D+03 0.11416079D-01 0.30330328D-03
+ 0.41500000D+03 0.42000000D+03 0.11192063D-01 0.28310533D-03
+ 0.42000000D+03 0.42500000D+03 0.10532031D-01 0.17953306D-03
+ 0.42500000D+03 0.43000000D+03 0.99591739D-02 0.20846370D-03
+ 0.43000000D+03 0.43500000D+03 0.95629540D-02 0.21288769D-03
+ 0.43500000D+03 0.44000000D+03 0.93334654D-02 0.16772801D-03
+ 0.44000000D+03 0.44500000D+03 0.84346721D-02 0.25574862D-03
+ 0.44500000D+03 0.45000000D+03 0.86448383D-02 0.25976296D-03
+ 0.45000000D+03 0.45500000D+03 0.79907004D-02 0.13657077D-03
+ 0.45500000D+03 0.46000000D+03 0.78983731D-02 0.11298570D-03
+ 0.46000000D+03 0.46500000D+03 0.72656946D-02 0.11463832D-03
+ 0.46500000D+03 0.47000000D+03 0.70693917D-02 0.12384317D-03
+ 0.47000000D+03 0.47500000D+03 0.67411540D-02 0.12094884D-03
+ 0.47500000D+03 0.48000000D+03 0.62419883D-02 0.21409000D-03
+ 0.48000000D+03 0.48500000D+03 0.63861343D-02 0.26916853D-03
+ 0.48500000D+03 0.49000000D+03 0.61595404D-02 0.20634876D-03
+ 0.49000000D+03 0.49500000D+03 0.54939005D-02 0.14460147D-03
+ 0.49500000D+03 0.50000000D+03 0.52636211D-02 0.32383135D-03
+ 0.50000000D+03 0.50500000D+03 0.55016919D-02 0.36879368D-03
+ 0.50500000D+03 0.51000000D+03 0.53426304D-02 0.22335769D-03
+ 0.51000000D+03 0.51500000D+03 0.49407896D-02 0.10197155D-03
+ 0.51500000D+03 0.52000000D+03 0.45807248D-02 0.10036275D-03
+ 0.52000000D+03 0.52500000D+03 0.45786222D-02 0.93068691D-04
+ 0.52500000D+03 0.53000000D+03 0.41947310D-02 0.10856400D-03
+ 0.53000000D+03 0.53500000D+03 0.43444733D-02 0.10269371D-03
+ 0.53500000D+03 0.54000000D+03 0.39424349D-02 0.93292426D-04
+ 0.54000000D+03 0.54500000D+03 0.38186801D-02 0.10809118D-03
+ 0.54500000D+03 0.55000000D+03 0.38069274D-02 0.95965397D-04
+ 0.55000000D+03 0.55500000D+03 0.34506128D-02 0.11108758D-03
+ 0.55500000D+03 0.56000000D+03 0.34031471D-02 0.13312442D-03
+ 0.56000000D+03 0.56500000D+03 0.34315635D-02 0.12086427D-03
+ 0.56500000D+03 0.57000000D+03 0.32249338D-02 0.91355039D-04
+ 0.57000000D+03 0.57500000D+03 0.31379751D-02 0.94210436D-04
+ 0.57500000D+03 0.58000000D+03 0.28724206D-02 0.12781355D-03
+ 0.58000000D+03 0.58500000D+03 0.28584836D-02 0.12962215D-03
+ 0.58500000D+03 0.59000000D+03 0.25614309D-02 0.18996551D-03
+ 0.59000000D+03 0.59500000D+03 0.29404227D-02 0.18052234D-03
+ 0.59500000D+03 0.60000000D+03 0.25813716D-02 0.81702765D-04
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.41504698D+01 0.84020882D-03
+ 0.12500000D+03 0.13000000D+03 -.12019902D+02 0.88644869D-02
+ 0.13000000D+03 0.13500000D+03 0.42413892D+01 0.28148838D-02
+ 0.13500000D+03 0.14000000D+03 0.26054448D+01 0.21792376D-02
+ 0.14000000D+03 0.14500000D+03 0.17323184D+01 0.17763015D-02
+ 0.14500000D+03 0.15000000D+03 0.12282950D+01 0.16225134D-02
+ 0.15000000D+03 0.15500000D+03 0.92179482D+00 0.14898646D-02
+ 0.15500000D+03 0.16000000D+03 0.70682268D+00 0.11704415D-02
+ 0.16000000D+03 0.16500000D+03 0.56260837D+00 0.10841710D-02
+ 0.16500000D+03 0.17000000D+03 0.45266704D+00 0.95827688D-03
+ 0.17000000D+03 0.17500000D+03 0.37147820D+00 0.86125654D-03
+ 0.17500000D+03 0.18000000D+03 0.30797785D+00 0.71542648D-03
+ 0.18000000D+03 0.18500000D+03 0.25632381D+00 0.73901394D-03
+ 0.18500000D+03 0.19000000D+03 0.21789510D+00 0.69761826D-03
+ 0.19000000D+03 0.19500000D+03 0.18359240D+00 0.81581005D-03
+ 0.19500000D+03 0.20000000D+03 0.15840279D+00 0.97687227D-03
+ 0.20000000D+03 0.20500000D+03 0.13578281D+00 0.70476659D-03
+ 0.20500000D+03 0.21000000D+03 0.11673769D+00 0.12158917D-02
+ 0.21000000D+03 0.21500000D+03 0.10304527D+00 0.73853775D-03
+ 0.21500000D+03 0.22000000D+03 0.88346293D-01 0.37146165D-03
+ 0.22000000D+03 0.22500000D+03 0.76975117D-01 0.41063138D-03
+ 0.22500000D+03 0.23000000D+03 0.67212625D-01 0.51390401D-03
+ 0.23000000D+03 0.23500000D+03 0.59696787D-01 0.48375557D-03
+ 0.23500000D+03 0.24000000D+03 0.51849253D-01 0.45432006D-03
+ 0.24000000D+03 0.24500000D+03 0.46565781D-01 0.43947503D-03
+ 0.24500000D+03 0.25000000D+03 0.41166647D-01 0.27403555D-03
+ 0.25000000D+03 0.25500000D+03 0.36218105D-01 0.20484894D-03
+ 0.25500000D+03 0.26000000D+03 0.32114262D-01 0.21838026D-03
+ 0.26000000D+03 0.26500000D+03 0.28577719D-01 0.20624546D-03
+ 0.26500000D+03 0.27000000D+03 0.25970160D-01 0.16327274D-03
+ 0.27000000D+03 0.27500000D+03 0.22663393D-01 0.15651921D-03
+ 0.27500000D+03 0.28000000D+03 0.20602322D-01 0.16559089D-03
+ 0.28000000D+03 0.28500000D+03 0.18539467D-01 0.14172908D-03
+ 0.28500000D+03 0.29000000D+03 0.16521485D-01 0.12970486D-03
+ 0.29000000D+03 0.29500000D+03 0.14963644D-01 0.12283082D-03
+ 0.29500000D+03 0.30000000D+03 0.13766154D-01 0.87076387D-04
+ 0.30000000D+03 0.30500000D+03 0.11980879D-01 0.81306619D-04
+ 0.30500000D+03 0.31000000D+03 0.10868832D-01 0.11815712D-03
+ 0.31000000D+03 0.31500000D+03 0.10107546D-01 0.11927063D-03
+ 0.31500000D+03 0.32000000D+03 0.92799382D-02 0.86901122D-04
+ 0.32000000D+03 0.32500000D+03 0.82460432D-02 0.78882304D-04
+ 0.32500000D+03 0.33000000D+03 0.74390218D-02 0.81090493D-04
+ 0.33000000D+03 0.33500000D+03 0.70111906D-02 0.66111781D-04
+ 0.33500000D+03 0.34000000D+03 0.61151714D-02 0.64876433D-04
+ 0.34000000D+03 0.34500000D+03 0.58594138D-02 0.67957782D-04
+ 0.34500000D+03 0.35000000D+03 0.52318415D-02 0.63788595D-04
+ 0.35000000D+03 0.35500000D+03 0.48913073D-02 0.57337109D-04
+ 0.35500000D+03 0.36000000D+03 0.44469190D-02 0.40668844D-04
+ 0.36000000D+03 0.36500000D+03 0.40734471D-02 0.40207658D-04
+ 0.36500000D+03 0.37000000D+03 0.36060333D-02 0.50441352D-04
+ 0.37000000D+03 0.37500000D+03 0.33391554D-02 0.15393208D-03
+ 0.37500000D+03 0.38000000D+03 0.33628111D-02 0.15106300D-03
+ 0.38000000D+03 0.38500000D+03 0.28870696D-02 0.44905235D-04
+ 0.38500000D+03 0.39000000D+03 0.26747695D-02 0.42406493D-04
+ 0.39000000D+03 0.39500000D+03 0.24684368D-02 0.45747752D-04
+ 0.39500000D+03 0.40000000D+03 0.23385739D-02 0.44745563D-04
+ 0.40000000D+03 0.40500000D+03 0.20920317D-02 0.35153491D-04
+ 0.40500000D+03 0.41000000D+03 0.19860795D-02 0.37633550D-04
+ 0.41000000D+03 0.41500000D+03 0.18159117D-02 0.47953044D-04
+ 0.41500000D+03 0.42000000D+03 0.17291320D-02 0.44103146D-04
+ 0.42000000D+03 0.42500000D+03 0.15807973D-02 0.26949053D-04
+ 0.42500000D+03 0.43000000D+03 0.14525793D-02 0.30284396D-04
+ 0.43000000D+03 0.43500000D+03 0.13565826D-02 0.30282810D-04
+ 0.43500000D+03 0.44000000D+03 0.12870128D-02 0.23226341D-04
+ 0.44000000D+03 0.44500000D+03 0.11322914D-02 0.34094894D-04
+ 0.44500000D+03 0.45000000D+03 0.11296142D-02 0.34190663D-04
+ 0.45000000D+03 0.45500000D+03 0.10162126D-02 0.17419767D-04
+ 0.45500000D+03 0.46000000D+03 0.97787858D-03 0.14015580D-04
+ 0.46000000D+03 0.46500000D+03 0.87606052D-03 0.13800418D-04
+ 0.46500000D+03 0.47000000D+03 0.83076122D-03 0.14551356D-04
+ 0.47000000D+03 0.47500000D+03 0.77203654D-03 0.13871556D-04
+ 0.47500000D+03 0.48000000D+03 0.69728467D-03 0.23707561D-04
+ 0.48000000D+03 0.48500000D+03 0.69609904D-03 0.29354903D-04
+ 0.48500000D+03 0.49000000D+03 0.65445262D-03 0.22087831D-04
+ 0.49000000D+03 0.49500000D+03 0.56974875D-03 0.14974227D-04
+ 0.49500000D+03 0.50000000D+03 0.53314676D-03 0.32473709D-04
+ 0.50000000D+03 0.50500000D+03 0.54410219D-03 0.36605021D-04
+ 0.50500000D+03 0.51000000D+03 0.51559686D-03 0.21751995D-04
+ 0.51000000D+03 0.51500000D+03 0.46540930D-03 0.96134897D-05
+ 0.51500000D+03 0.52000000D+03 0.42168487D-03 0.92465140D-05
+ 0.52000000D+03 0.52500000D+03 0.41197015D-03 0.83890067D-05
+ 0.52500000D+03 0.53000000D+03 0.36885067D-03 0.95108201D-05
+ 0.53000000D+03 0.53500000D+03 0.37362321D-03 0.88816463D-05
+ 0.53500000D+03 0.54000000D+03 0.33141800D-03 0.78146093D-05
+ 0.54000000D+03 0.54500000D+03 0.31409212D-03 0.88988615D-05
+ 0.54500000D+03 0.55000000D+03 0.30634711D-03 0.77342866D-05
+ 0.55000000D+03 0.55500000D+03 0.27177959D-03 0.87138555D-05
+ 0.55500000D+03 0.56000000D+03 0.26245023D-03 0.10260496D-04
+ 0.56000000D+03 0.56500000D+03 0.25900433D-03 0.91464966D-05
+ 0.56500000D+03 0.57000000D+03 0.23834019D-03 0.67702529D-05
+ 0.57000000D+03 0.57500000D+03 0.22705097D-03 0.67945164D-05
+ 0.57500000D+03 0.58000000D+03 0.20363471D-03 0.90392929D-05
+ 0.58000000D+03 0.58500000D+03 0.19859538D-03 0.90266581D-05
+ 0.58500000D+03 0.59000000D+03 0.17453959D-03 0.12850831D-04
+ 0.59000000D+03 0.59500000D+03 0.19630471D-03 0.12141618D-04
+ 0.59500000D+03 0.60000000D+03 0.16890451D-03 0.53387347D-05
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 -.56666033D+00 0.14053794D-01
+ 0.30000000D+01 0.60000000D+01 0.51043796D+00 0.33887117D-02
+ 0.60000000D+01 0.90000000D+01 0.19279517D+01 0.23937189D-02
+ 0.90000000D+01 0.12000000D+02 0.17102820D+01 0.21259967D-02
+ 0.12000000D+02 0.15000000D+02 0.14176635D+01 0.17542849D-02
+ 0.15000000D+02 0.18000000D+02 0.11693093D+01 0.17753059D-02
+ 0.18000000D+02 0.21000000D+02 0.98123849D+00 0.17391490D-02
+ 0.21000000D+02 0.24000000D+02 0.83002946D+00 0.15651149D-02
+ 0.24000000D+02 0.27000000D+02 0.71476874D+00 0.14958603D-02
+ 0.27000000D+02 0.30000000D+02 0.61513816D+00 0.16018069D-02
+ 0.30000000D+02 0.33000000D+02 0.53875898D+00 0.14220941D-02
+ 0.33000000D+02 0.36000000D+02 0.47481179D+00 0.13419848D-02
+ 0.36000000D+02 0.39000000D+02 0.42019631D+00 0.13423097D-02
+ 0.39000000D+02 0.42000000D+02 0.37611681D+00 0.14587265D-02
+ 0.42000000D+02 0.45000000D+02 0.33439408D+00 0.14537493D-02
+ 0.45000000D+02 0.48000000D+02 0.30303902D+00 0.91854207D-03
+ 0.48000000D+02 0.51000000D+02 0.27245122D+00 0.10417796D-02
+ 0.51000000D+02 0.54000000D+02 0.24907242D+00 0.11025157D-02
+ 0.54000000D+02 0.57000000D+02 0.22507021D+00 0.87396949D-03
+ 0.57000000D+02 0.60000000D+02 0.20674337D+00 0.18638309D-02
+ 0.60000000D+02 0.63000000D+02 0.18415916D+00 0.28820230D-02
+ 0.63000000D+02 0.66000000D+02 0.17445689D+00 0.22833445D-02
+ 0.66000000D+02 0.69000000D+02 0.15865738D+00 0.70514449D-03
+ 0.69000000D+02 0.72000000D+02 0.14562192D+00 0.82648098D-03
+ 0.72000000D+02 0.75000000D+02 0.13484458D+00 0.94693407D-03
+ 0.75000000D+02 0.78000000D+02 0.12288069D+00 0.80186278D-03
+ 0.78000000D+02 0.81000000D+02 0.11467410D+00 0.66385466D-03
+ 0.81000000D+02 0.84000000D+02 0.10639516D+00 0.76015147D-03
+ 0.84000000D+02 0.87000000D+02 0.97800235D-01 0.79238125D-03
+ 0.87000000D+02 0.90000000D+02 0.92685487D-01 0.10293692D-02
+ 0.90000000D+02 0.93000000D+02 0.82244249D-01 0.96248344D-03
+ 0.93000000D+02 0.96000000D+02 0.80040018D-01 0.69341584D-03
+ 0.96000000D+02 0.99000000D+02 0.73260414D-01 0.72981773D-03
+ 0.99000000D+02 0.10200000D+03 0.69119044D-01 0.95250589D-03
+ 0.10200000D+03 0.10500000D+03 0.63556382D-01 0.90096742D-03
+ 0.10500000D+03 0.10800000D+03 0.60957314D-01 0.92607657D-03
+ 0.10800000D+03 0.11100000D+03 0.54882495D-01 0.92964333D-03
+ 0.11100000D+03 0.11400000D+03 0.53473687D-01 0.10629021D-02
+ 0.11400000D+03 0.11700000D+03 0.48012520D-01 0.12075367D-02
+ 0.11700000D+03 0.12000000D+03 0.46460939D-01 0.81330557D-03
+ 0.12000000D+03 0.12300000D+03 0.42891072D-01 0.52182795D-03
+ 0.12300000D+03 0.12600000D+03 0.39718035D-01 0.66650384D-03
+ 0.12600000D+03 0.12900000D+03 0.39722616D-01 0.69275305D-03
+ 0.12900000D+03 0.13200000D+03 0.35575680D-01 0.41022420D-03
+ 0.13200000D+03 0.13500000D+03 0.33520430D-01 0.38258747D-03
+ 0.13500000D+03 0.13800000D+03 0.31963978D-01 0.64127149D-03
+ 0.13800000D+03 0.14100000D+03 0.30380418D-01 0.61140045D-03
+ 0.14100000D+03 0.14400000D+03 0.28774394D-01 0.32482549D-03
+ 0.14400000D+03 0.14700000D+03 0.26212821D-01 0.41502043D-03
+ 0.14700000D+03 0.15000000D+03 0.25091618D-01 0.49417987D-03
+ 0.15000000D+03 0.15300000D+03 0.24337737D-01 0.94037016D-03
+ 0.15300000D+03 0.15600000D+03 0.22965988D-01 0.90573474D-03
+ 0.15600000D+03 0.15900000D+03 0.20704685D-01 0.41037298D-03
+ 0.15900000D+03 0.16200000D+03 0.20385491D-01 0.51337610D-03
+ 0.16200000D+03 0.16500000D+03 0.19386272D-01 0.67894361D-03
+ 0.16500000D+03 0.16800000D+03 0.18032414D-01 0.55589759D-03
+ 0.16800000D+03 0.17100000D+03 0.16975444D-01 0.21591023D-03
+ 0.17100000D+03 0.17400000D+03 0.16067376D-01 0.25009865D-03
+ 0.17400000D+03 0.17700000D+03 0.15637186D-01 0.23064013D-03
+ 0.17700000D+03 0.18000000D+03 0.14773176D-01 0.24714041D-03
+ 0.18000000D+03 0.18300000D+03 0.13754758D-01 0.27664657D-03
+ 0.18300000D+03 0.18600000D+03 0.14577928D-01 0.16239086D-02
+ 0.18600000D+03 0.18900000D+03 0.10651986D-01 0.16177108D-02
+ 0.18900000D+03 0.19200000D+03 0.12004927D-01 0.23497264D-03
+ 0.19200000D+03 0.19500000D+03 0.11030024D-01 0.24094553D-03
+ 0.19500000D+03 0.19800000D+03 0.10764215D-01 0.25379219D-03
+ 0.19800000D+03 0.20100000D+03 0.97731922D-02 0.32426845D-03
+ 0.20100000D+03 0.20400000D+03 0.99519480D-02 0.42727556D-03
+ 0.20400000D+03 0.20700000D+03 0.88251634D-02 0.36297929D-03
+ 0.20700000D+03 0.21000000D+03 0.84534007D-02 0.17058953D-03
+ 0.21000000D+03 0.21300000D+03 0.85675150D-02 0.20913958D-03
+ 0.21300000D+03 0.21600000D+03 0.74043070D-02 0.21555037D-03
+ 0.21600000D+03 0.21900000D+03 0.63623525D-02 0.11103721D-02
+ 0.21900000D+03 0.22200000D+03 0.79313991D-02 0.11105843D-02
+ 0.22200000D+03 0.22500000D+03 0.67731043D-02 0.20364972D-03
+ 0.22500000D+03 0.22800000D+03 0.63940228D-02 0.18553774D-03
+ 0.22800000D+03 0.23100000D+03 0.59653262D-02 0.16586903D-03
+ 0.23100000D+03 0.23400000D+03 0.58484993D-02 0.16514946D-03
+ 0.23400000D+03 0.23700000D+03 0.53610652D-02 0.42812489D-03
+ 0.23700000D+03 0.24000000D+03 0.54072723D-02 0.41807727D-03
+ 0.24000000D+03 0.24300000D+03 0.48058218D-02 0.14126489D-03
+ 0.24300000D+03 0.24600000D+03 0.47513859D-02 0.21217725D-03
+ 0.24600000D+03 0.24900000D+03 0.40182730D-02 0.39539953D-03
+ 0.24900000D+03 0.25200000D+03 0.47718358D-02 0.37026789D-03
+ 0.25200000D+03 0.25500000D+03 0.38906296D-02 0.13188382D-03
+ 0.25500000D+03 0.25800000D+03 0.37901757D-02 0.11522055D-03
+ 0.25800000D+03 0.26100000D+03 0.36931583D-02 0.12643068D-03
+ 0.26100000D+03 0.26400000D+03 0.33865713D-02 0.17475867D-03
+ 0.26400000D+03 0.26700000D+03 0.36505219D-02 0.19658390D-03
+ 0.26700000D+03 0.27000000D+03 0.29772347D-02 0.18340820D-03
+ 0.27000000D+03 0.27300000D+03 0.31336469D-02 0.18545558D-03
+ 0.27300000D+03 0.27600000D+03 0.25572549D-02 0.16159645D-03
+ 0.27600000D+03 0.27900000D+03 0.28460874D-02 0.15419189D-03
+ 0.27900000D+03 0.28200000D+03 0.27604151D-02 0.18082053D-03
+ 0.28200000D+03 0.28500000D+03 0.22358607D-02 0.16455209D-03
+ 0.28500000D+03 0.28800000D+03 0.30809712D-02 0.44304264D-03
+ 0.28800000D+03 0.29100000D+03 0.99198844D-03 0.67298112D-03
+ 0.29100000D+03 0.29400000D+03 0.27886293D-02 0.52898681D-03
+ 0.29400000D+03 0.29700000D+03 0.21843961D-02 0.15326213D-03
+ 0.29700000D+03 0.30000000D+03 0.16754518D-02 0.25295929D-03
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 -.56379517D+00 0.14052934D-01
+ 0.30000000D+01 0.60000000D+01 0.50915949D+00 0.33849667D-02
+ 0.60000000D+01 0.90000000D+01 0.19209489D+01 0.23848420D-02
+ 0.90000000D+01 0.12000000D+02 0.16983219D+01 0.21119119D-02
+ 0.12000000D+02 0.15000000D+02 0.14013750D+01 0.17342043D-02
+ 0.15000000D+02 0.18000000D+02 0.11493562D+01 0.17442585D-02
+ 0.18000000D+02 0.21000000D+02 0.95800034D+00 0.16984738D-02
+ 0.21000000D+02 0.24000000D+02 0.80404913D+00 0.15163315D-02
+ 0.24000000D+02 0.27000000D+02 0.68626750D+00 0.14359463D-02
+ 0.27000000D+02 0.30000000D+02 0.58478266D+00 0.15211786D-02
+ 0.30000000D+02 0.33000000D+02 0.50662678D+00 0.13407067D-02
+ 0.33000000D+02 0.36000000D+02 0.44124610D+00 0.12437989D-02
+ 0.36000000D+02 0.39000000D+02 0.38554239D+00 0.12341757D-02
+ 0.39000000D+02 0.42000000D+02 0.34041532D+00 0.13158014D-02
+ 0.42000000D+02 0.45000000D+02 0.29830425D+00 0.13013304D-02
+ 0.45000000D+02 0.48000000D+02 0.26623895D+00 0.80847850D-03
+ 0.48000000D+02 0.51000000D+02 0.23555844D+00 0.89756743D-03
+ 0.51000000D+02 0.54000000D+02 0.21175897D+00 0.93921195D-03
+ 0.54000000D+02 0.57000000D+02 0.18803163D+00 0.73133107D-03
+ 0.57000000D+02 0.60000000D+02 0.16961011D+00 0.15173574D-02
+ 0.60000000D+02 0.63000000D+02 0.14828151D+00 0.23268374D-02
+ 0.63000000D+02 0.66000000D+02 0.13781181D+00 0.18149025D-02
+ 0.66000000D+02 0.69000000D+02 0.12285526D+00 0.54612634D-03
+ 0.69000000D+02 0.72000000D+02 0.11049334D+00 0.62503205D-03
+ 0.72000000D+02 0.75000000D+02 0.10020570D+00 0.70359673D-03
+ 0.75000000D+02 0.78000000D+02 0.89399778D-01 0.58583942D-03
+ 0.78000000D+02 0.81000000D+02 0.81657009D-01 0.47200843D-03
+ 0.81000000D+02 0.84000000D+02 0.74115298D-01 0.52878838D-03
+ 0.84000000D+02 0.87000000D+02 0.66632915D-01 0.54031591D-03
+ 0.87000000D+02 0.90000000D+02 0.61734146D-01 0.68229621D-03
+ 0.90000000D+02 0.93000000D+02 0.53553760D-01 0.63131383D-03
+ 0.93000000D+02 0.96000000D+02 0.50942265D-01 0.43964989D-03
+ 0.96000000D+02 0.99000000D+02 0.45553215D-01 0.45483714D-03
+ 0.99000000D+02 0.10200000D+03 0.41985747D-01 0.57495107D-03
+ 0.10200000D+03 0.10500000D+03 0.37709358D-01 0.53894970D-03
+ 0.10500000D+03 0.10800000D+03 0.35317346D-01 0.53205389D-03
+ 0.10800000D+03 0.11100000D+03 0.31051608D-01 0.53043083D-03
+ 0.11100000D+03 0.11400000D+03 0.29541170D-01 0.58182308D-03
+ 0.11400000D+03 0.11700000D+03 0.25899744D-01 0.65444093D-03
+ 0.11700000D+03 0.12000000D+03 0.24473208D-01 0.43038385D-03
+ 0.12000000D+03 0.12300000D+03 0.22057238D-01 0.26997090D-03
+ 0.12300000D+03 0.12600000D+03 0.19948568D-01 0.33187469D-03
+ 0.12600000D+03 0.12900000D+03 0.19474355D-01 0.34186054D-03
+ 0.12900000D+03 0.13200000D+03 0.17022348D-01 0.19672740D-03
+ 0.13200000D+03 0.13500000D+03 0.15661938D-01 0.17861396D-03
+ 0.13500000D+03 0.13800000D+03 0.14581647D-01 0.29039311D-03
+ 0.13800000D+03 0.14100000D+03 0.13532372D-01 0.27471248D-03
+ 0.14100000D+03 0.14400000D+03 0.12511750D-01 0.14104221D-03
+ 0.14400000D+03 0.14700000D+03 0.11130628D-01 0.17563985D-03
+ 0.14700000D+03 0.15000000D+03 0.10409449D-01 0.20474569D-03
+ 0.15000000D+03 0.15300000D+03 0.98609205D-02 0.37781190D-03
+ 0.15300000D+03 0.15600000D+03 0.90846162D-02 0.36170081D-03
+ 0.15600000D+03 0.15900000D+03 0.80023145D-02 0.15833199D-03
+ 0.15900000D+03 0.16200000D+03 0.76984470D-02 0.19324626D-03
+ 0.16200000D+03 0.16500000D+03 0.71514907D-02 0.24968659D-03
+ 0.16500000D+03 0.16800000D+03 0.64987978D-02 0.20239587D-03
+ 0.16800000D+03 0.17100000D+03 0.59800811D-02 0.75813462D-04
+ 0.17100000D+03 0.17400000D+03 0.55337248D-02 0.86114089D-04
+ 0.17400000D+03 0.17700000D+03 0.52636476D-02 0.77785563D-04
+ 0.17700000D+03 0.18000000D+03 0.48602049D-02 0.81040068D-04
+ 0.18000000D+03 0.18300000D+03 0.44238500D-02 0.89047126D-04
+ 0.18300000D+03 0.18600000D+03 0.45796316D-02 0.50543596D-03
+ 0.18600000D+03 0.18900000D+03 0.32719768D-02 0.50322684D-03
+ 0.18900000D+03 0.19200000D+03 0.36136406D-02 0.70479326D-04
+ 0.19200000D+03 0.19500000D+03 0.32479421D-02 0.71165200D-04
+ 0.19500000D+03 0.19800000D+03 0.31006762D-02 0.72858231D-04
+ 0.19800000D+03 0.20100000D+03 0.27545982D-02 0.91254304D-04
+ 0.20100000D+03 0.20400000D+03 0.27457265D-02 0.11752385D-03
+ 0.20400000D+03 0.20700000D+03 0.23827737D-02 0.98623964D-04
+ 0.20700000D+03 0.21000000D+03 0.22358246D-02 0.45046214D-04
+ 0.21000000D+03 0.21300000D+03 0.22180245D-02 0.54012246D-04
+ 0.21300000D+03 0.21600000D+03 0.18766930D-02 0.54724700D-04
+ 0.21600000D+03 0.21900000D+03 0.15828575D-02 0.27294555D-03
+ 0.21900000D+03 0.22200000D+03 0.19329674D-02 0.27280817D-03
+ 0.22200000D+03 0.22500000D+03 0.16145257D-02 0.48536652D-04
+ 0.22500000D+03 0.22800000D+03 0.14929361D-02 0.43413210D-04
+ 0.22800000D+03 0.23100000D+03 0.13653264D-02 0.37966042D-04
+ 0.23100000D+03 0.23400000D+03 0.13115003D-02 0.37015830D-04
+ 0.23400000D+03 0.23700000D+03 0.11783816D-02 0.93342275D-04
+ 0.23700000D+03 0.24000000D+03 0.11655483D-02 0.90923470D-04
+ 0.24000000D+03 0.24300000D+03 0.10150775D-02 0.29726517D-04
+ 0.24300000D+03 0.24600000D+03 0.98428157D-03 0.43820660D-04
+ 0.24600000D+03 0.24900000D+03 0.81722746D-03 0.79897616D-04
+ 0.24900000D+03 0.25200000D+03 0.95180585D-03 0.74410170D-04
+ 0.25200000D+03 0.25500000D+03 0.76090918D-03 0.25869965D-04
+ 0.25500000D+03 0.25800000D+03 0.72769852D-03 0.22102106D-04
+ 0.25800000D+03 0.26100000D+03 0.69534167D-03 0.23790429D-04
+ 0.26100000D+03 0.26400000D+03 0.62620456D-03 0.32194275D-04
+ 0.26400000D+03 0.26700000D+03 0.66219664D-03 0.35691465D-04
+ 0.26700000D+03 0.27000000D+03 0.52963212D-03 0.32690493D-04
+ 0.27000000D+03 0.27300000D+03 0.54775968D-03 0.32414506D-04
+ 0.27300000D+03 0.27600000D+03 0.43953162D-03 0.27861582D-04
+ 0.27600000D+03 0.27900000D+03 0.48031070D-03 0.25924693D-04
+ 0.27900000D+03 0.28200000D+03 0.45736491D-03 0.29967598D-04
+ 0.28200000D+03 0.28500000D+03 0.36383894D-03 0.26818979D-04
+ 0.28500000D+03 0.28800000D+03 0.49215314D-03 0.70304903D-04
+ 0.28800000D+03 0.29100000D+03 0.15609242D-03 0.10559824D-03
+ 0.29100000D+03 0.29400000D+03 0.43163336D-03 0.82332784D-04
+ 0.29400000D+03 0.29700000D+03 0.33145306D-03 0.23279853D-04
+ 0.29700000D+03 0.30000000D+03 0.24990672D-03 0.37527801D-04
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.16107635D+02 0.14160139D-01
+ 0.30000000D+01 0.60000000D+01 0.15794214D+02 0.96576623D-03
+ 0.60000000D+01 0.90000000D+01 0.57625852D+01 0.36779274D-03
+ 0.90000000D+01 0.12000000D+02 0.29453631D+01 0.22024877D-03
+ 0.12000000D+02 0.15000000D+02 0.17641253D+01 0.13858309D-03
+ 0.15000000D+02 0.18000000D+02 0.11600585D+01 0.97855523D-04
+ 0.18000000D+02 0.21000000D+02 0.81191835D+00 0.81439223D-04
+ 0.21000000D+02 0.24000000D+02 0.59435275D+00 0.59375945D-04
+ 0.24000000D+02 0.27000000D+02 0.45004484D+00 0.93781439D-04
+ 0.27000000D+02 0.30000000D+02 0.34967424D+00 0.45133002D-04
+ 0.30000000D+02 0.33000000D+02 0.27763085D+00 0.36773347D-04
+ 0.33000000D+02 0.36000000D+02 0.22419467D+00 0.36095694D-04
+ 0.36000000D+02 0.39000000D+02 0.18372118D+00 0.23309699D-04
+ 0.39000000D+02 0.42000000D+02 0.15245397D+00 0.19305672D-04
+ 0.42000000D+02 0.45000000D+02 0.12792225D+00 0.72882820D-04
+ 0.45000000D+02 0.48000000D+02 0.10827068D+00 0.13906195D-04
+ 0.48000000D+02 0.51000000D+02 0.92444688D-01 0.13674097D-04
+ 0.51000000D+02 0.54000000D+02 0.79504847D-01 0.11299793D-04
+ 0.54000000D+02 0.57000000D+02 0.68824036D-01 0.10063859D-04
+ 0.57000000D+02 0.60000000D+02 0.59962783D-01 0.28398603D-04
+ 0.60000000D+02 0.63000000D+02 0.52481159D-01 0.83676724D-05
+ 0.63000000D+02 0.66000000D+02 0.46166129D-01 0.76212822D-05
+ 0.66000000D+02 0.69000000D+02 0.40813384D-01 0.67119564D-05
+ 0.69000000D+02 0.72000000D+02 0.36226211D-01 0.75094622D-05
+ 0.72000000D+02 0.75000000D+02 0.32279731D-01 0.61080996D-05
+ 0.75000000D+02 0.78000000D+02 0.28855398D-01 0.51907974D-05
+ 0.78000000D+02 0.81000000D+02 0.25892447D-01 0.47633610D-05
+ 0.81000000D+02 0.84000000D+02 0.23299289D-01 0.44666994D-05
+ 0.84000000D+02 0.87000000D+02 0.21032930D-01 0.50957593D-05
+ 0.87000000D+02 0.90000000D+02 0.19031964D-01 0.38116429D-05
+ 0.90000000D+02 0.93000000D+02 0.17268180D-01 0.38855382D-05
+ 0.93000000D+02 0.96000000D+02 0.15707358D-01 0.32025323D-05
+ 0.96000000D+02 0.99000000D+02 0.14314044D-01 0.30282005D-05
+ 0.99000000D+02 0.10200000D+03 0.13086052D-01 0.27999964D-05
+ 0.10200000D+03 0.10500000D+03 0.11976390D-01 0.25578969D-05
+ 0.10500000D+03 0.10800000D+03 0.10983423D-01 0.24783887D-05
+ 0.10800000D+03 0.11100000D+03 0.10092241D-01 0.23508590D-05
+ 0.11100000D+03 0.11400000D+03 0.92871170D-02 0.21729458D-05
+ 0.11400000D+03 0.11700000D+03 0.85687587D-02 0.21007148D-05
+ 0.11700000D+03 0.12000000D+03 0.79120767D-02 0.20436230D-05
+ 0.12000000D+03 0.12300000D+03 0.73176878D-02 0.19525873D-05
+ 0.12300000D+03 0.12600000D+03 0.67773051D-02 0.17211333D-05
+ 0.12600000D+03 0.12900000D+03 0.62882996D-02 0.25231171D-05
+ 0.12900000D+03 0.13200000D+03 0.58393213D-02 0.15027039D-05
+ 0.13200000D+03 0.13500000D+03 0.54318627D-02 0.15809168D-05
+ 0.13500000D+03 0.13800000D+03 0.50582460D-02 0.13070822D-05
+ 0.13800000D+03 0.14100000D+03 0.47119103D-02 0.12943137D-05
+ 0.14100000D+03 0.14400000D+03 0.44012961D-02 0.25277959D-05
+ 0.14400000D+03 0.14700000D+03 0.41109632D-02 0.11305589D-05
+ 0.14700000D+03 0.15000000D+03 0.38437390D-02 0.10519322D-05
+ 0.15000000D+03 0.15300000D+03 0.36003189D-02 0.10840894D-05
+ 0.15300000D+03 0.15600000D+03 0.33732710D-02 0.98220951D-06
+ 0.15600000D+03 0.15900000D+03 0.31642012D-02 0.92069514D-06
+ 0.15900000D+03 0.16200000D+03 0.29713685D-02 0.87867910D-06
+ 0.16200000D+03 0.16500000D+03 0.27947635D-02 0.85028510D-06
+ 0.16500000D+03 0.16800000D+03 0.26283699D-02 0.81551103D-06
+ 0.16800000D+03 0.17100000D+03 0.24735487D-02 0.77723052D-06
+ 0.17100000D+03 0.17400000D+03 0.23306163D-02 0.84035893D-06
+ 0.17400000D+03 0.17700000D+03 0.21973274D-02 0.69911845D-06
+ 0.17700000D+03 0.18000000D+03 0.20732764D-02 0.68320659D-06
+ 0.18000000D+03 0.18300000D+03 0.19602176D-02 0.69096749D-06
+ 0.18300000D+03 0.18600000D+03 0.18514505D-02 0.24818162D-05
+ 0.18600000D+03 0.18900000D+03 0.17504764D-02 0.61305993D-06
+ 0.18900000D+03 0.19200000D+03 0.16567212D-02 0.59941482D-06
+ 0.19200000D+03 0.19500000D+03 0.15672766D-02 0.53475498D-06
+ 0.19500000D+03 0.19800000D+03 0.14856405D-02 0.53396331D-06
+ 0.19800000D+03 0.20100000D+03 0.14085549D-02 0.65791495D-06
+ 0.20100000D+03 0.20400000D+03 0.13360122D-02 0.48829379D-06
+ 0.20400000D+03 0.20700000D+03 0.12682267D-02 0.46374447D-06
+ 0.20700000D+03 0.21000000D+03 0.12052540D-02 0.46530377D-06
+ 0.21000000D+03 0.21300000D+03 0.11445292D-02 0.43481676D-06
+ 0.21300000D+03 0.21600000D+03 0.10879386D-02 0.41533484D-06
+ 0.21600000D+03 0.21900000D+03 0.10349581D-02 0.46748332D-06
+ 0.21900000D+03 0.22200000D+03 0.98568019D-03 0.38283145D-06
+ 0.22200000D+03 0.22500000D+03 0.93786884D-03 0.36508092D-06
+ 0.22500000D+03 0.22800000D+03 0.89430173D-03 0.35185373D-06
+ 0.22800000D+03 0.23100000D+03 0.85240017D-03 0.34011130D-06
+ 0.23100000D+03 0.23400000D+03 0.81258823D-03 0.33039082D-06
+ 0.23400000D+03 0.23700000D+03 0.77542765D-03 0.31361261D-06
+ 0.23700000D+03 0.24000000D+03 0.74046883D-03 0.29890166D-06
+ 0.24000000D+03 0.24300000D+03 0.70682791D-03 0.29158179D-06
+ 0.24300000D+03 0.24600000D+03 0.67539084D-03 0.26940854D-06
+ 0.24600000D+03 0.24900000D+03 0.64507159D-03 0.26824809D-06
+ 0.24900000D+03 0.25200000D+03 0.61705373D-03 0.26379114D-06
+ 0.25200000D+03 0.25500000D+03 0.59075339D-03 0.27403641D-06
+ 0.25500000D+03 0.25800000D+03 0.56497246D-03 0.24527828D-06
+ 0.25800000D+03 0.26100000D+03 0.54068448D-03 0.22930236D-06
+ 0.26100000D+03 0.26400000D+03 0.51717011D-03 0.22581808D-06
+ 0.26400000D+03 0.26700000D+03 0.49580707D-03 0.22760602D-06
+ 0.26700000D+03 0.27000000D+03 0.47515270D-03 0.21328766D-06
+ 0.27000000D+03 0.27300000D+03 0.45543983D-03 0.22751980D-06
+ 0.27300000D+03 0.27600000D+03 0.43721853D-03 0.30938924D-06
+ 0.27600000D+03 0.27900000D+03 0.41921232D-03 0.18905365D-06
+ 0.27900000D+03 0.28200000D+03 0.40193969D-03 0.18966454D-06
+ 0.28200000D+03 0.28500000D+03 0.38607536D-03 0.19777937D-06
+ 0.28500000D+03 0.28800000D+03 0.37064776D-03 0.17374591D-06
+ 0.28800000D+03 0.29100000D+03 0.35594611D-03 0.16569280D-06
+ 0.29100000D+03 0.29400000D+03 0.34229335D-03 0.17748727D-06
+ 0.29400000D+03 0.29700000D+03 0.32873577D-03 0.15746046D-06
+ 0.29700000D+03 0.30000000D+03 0.31622613D-03 0.15495425D-06
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX2-11.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX2-11.top
new file mode 100644
index 0000000000000000000000000000000000000000..2d5d7c64c77753c7711c4f26139542332727c2b0
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX2-11.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12436644D-05 0.51988425D-06
+ -.46000000D+01 -.45000000D+01 -.73006426D-04 0.32025144D-05
+ -.45000000D+01 -.44000000D+01 -.94114373D-04 0.55971111D-05
+ -.44000000D+01 -.43000000D+01 0.12102082D-02 0.21794951D-04
+ -.43000000D+01 -.42000000D+01 0.66595167D-02 0.60183031D-04
+ -.42000000D+01 -.41000000D+01 0.19765510D-01 0.14619988D-03
+ -.41000000D+01 -.40000000D+01 0.45945415D-01 0.30598113D-03
+ -.40000000D+01 -.39000000D+01 0.87374971D-01 0.71872481D-03
+ -.39000000D+01 -.38000000D+01 0.14527989D+00 0.82324488D-03
+ -.38000000D+01 -.37000000D+01 0.22202484D+00 0.13282327D-02
+ -.37000000D+01 -.36000000D+01 0.32216884D+00 0.19315347D-02
+ -.36000000D+01 -.35000000D+01 0.44276001D+00 0.23277361D-02
+ -.35000000D+01 -.34000000D+01 0.57971236D+00 0.33577922D-02
+ -.34000000D+01 -.33000000D+01 0.75672792D+00 0.39867817D-02
+ -.33000000D+01 -.32000000D+01 0.95100900D+00 0.39976700D-02
+ -.32000000D+01 -.31000000D+01 0.11719290D+01 0.45663637D-02
+ -.31000000D+01 -.30000000D+01 0.14167464D+01 0.57085484D-02
+ -.30000000D+01 -.29000000D+01 0.16857920D+01 0.60709119D-02
+ -.29000000D+01 -.28000000D+01 0.19582176D+01 0.70329806D-02
+ -.28000000D+01 -.27000000D+01 0.22891452D+01 0.71348989D-02
+ -.27000000D+01 -.26000000D+01 0.26277501D+01 0.82333968D-02
+ -.26000000D+01 -.25000000D+01 0.29751126D+01 0.10098264D-01
+ -.25000000D+01 -.24000000D+01 0.33505577D+01 0.10644914D-01
+ -.24000000D+01 -.23000000D+01 0.37369231D+01 0.93246932D-02
+ -.23000000D+01 -.22000000D+01 0.41202298D+01 0.10817901D-01
+ -.22000000D+01 -.21000000D+01 0.45172614D+01 0.10154247D-01
+ -.21000000D+01 -.20000000D+01 0.49508189D+01 0.11393762D-01
+ -.20000000D+01 -.19000000D+01 0.53093772D+01 0.11726215D-01
+ -.19000000D+01 -.18000000D+01 0.57040898D+01 0.12255138D-01
+ -.18000000D+01 -.17000000D+01 0.60989945D+01 0.13243736D-01
+ -.17000000D+01 -.16000000D+01 0.64685987D+01 0.13803490D-01
+ -.16000000D+01 -.15000000D+01 0.68393885D+01 0.15313155D-01
+ -.15000000D+01 -.14000000D+01 0.72055876D+01 0.15112586D-01
+ -.14000000D+01 -.13000000D+01 0.74990398D+01 0.13346836D-01
+ -.13000000D+01 -.12000000D+01 0.78572540D+01 0.14386152D-01
+ -.12000000D+01 -.11000000D+01 0.81409895D+01 0.16150734D-01
+ -.11000000D+01 -.10000000D+01 0.84114347D+01 0.15498346D-01
+ -.10000000D+01 -.90000000D+00 0.86732637D+01 0.16213751D-01
+ -.90000000D+00 -.80000000D+00 0.88945361D+01 0.21302878D-01
+ -.80000000D+00 -.70000000D+00 0.90796880D+01 0.17966564D-01
+ -.70000000D+00 -.60000000D+00 0.92365023D+01 0.19147646D-01
+ -.60000000D+00 -.50000000D+00 0.94109900D+01 0.15675437D-01
+ -.50000000D+00 -.40000000D+00 0.95307850D+01 0.17034960D-01
+ -.40000000D+00 -.30000000D+00 0.96182615D+01 0.16013192D-01
+ -.30000000D+00 -.20000000D+00 0.97441865D+01 0.17559837D-01
+ -.20000000D+00 -.10000000D+00 0.97614948D+01 0.18580561D-01
+ -.10000000D+00 0.18041124D-15 0.97946433D+01 0.17976847D-01
+ 0.70776718D-15 0.10000000D+00 0.97976387D+01 0.17250336D-01
+ 0.10000000D+00 0.20000000D+00 0.97831344D+01 0.15514392D-01
+ 0.20000000D+00 0.30000000D+00 0.97223367D+01 0.16792224D-01
+ 0.30000000D+00 0.40000000D+00 0.96417650D+01 0.16217877D-01
+ 0.40000000D+00 0.50000000D+00 0.95421773D+01 0.20086448D-01
+ 0.50000000D+00 0.60000000D+00 0.94313471D+01 0.16211776D-01
+ 0.60000000D+00 0.70000000D+00 0.92722004D+01 0.15778937D-01
+ 0.70000000D+00 0.80000000D+00 0.90626587D+01 0.15224478D-01
+ 0.80000000D+00 0.90000000D+00 0.88985602D+01 0.15428225D-01
+ 0.90000000D+00 0.10000000D+01 0.86601004D+01 0.14920866D-01
+ 0.10000000D+01 0.11000000D+01 0.83905684D+01 0.16205927D-01
+ 0.11000000D+01 0.12000000D+01 0.81295418D+01 0.16362456D-01
+ 0.12000000D+01 0.13000000D+01 0.78544494D+01 0.15212644D-01
+ 0.13000000D+01 0.14000000D+01 0.75014743D+01 0.14097961D-01
+ 0.14000000D+01 0.15000000D+01 0.71929726D+01 0.13538215D-01
+ 0.15000000D+01 0.16000000D+01 0.68344259D+01 0.12802014D-01
+ 0.16000000D+01 0.17000000D+01 0.64913958D+01 0.15144182D-01
+ 0.17000000D+01 0.18000000D+01 0.61234841D+01 0.24829540D-01
+ 0.18000000D+01 0.19000000D+01 0.56943375D+01 0.14409584D-01
+ 0.19000000D+01 0.20000000D+01 0.53186864D+01 0.12408398D-01
+ 0.20000000D+01 0.21000000D+01 0.49444617D+01 0.11382230D-01
+ 0.21000000D+01 0.22000000D+01 0.45326116D+01 0.11027370D-01
+ 0.22000000D+01 0.23000000D+01 0.41256782D+01 0.98646206D-02
+ 0.23000000D+01 0.24000000D+01 0.37261026D+01 0.10339082D-01
+ 0.24000000D+01 0.25000000D+01 0.33419393D+01 0.96346413D-02
+ 0.25000000D+01 0.26000000D+01 0.29798365D+01 0.12145594D-01
+ 0.26000000D+01 0.27000000D+01 0.26231375D+01 0.81594465D-02
+ 0.27000000D+01 0.28000000D+01 0.22937653D+01 0.73118119D-02
+ 0.28000000D+01 0.29000000D+01 0.19703722D+01 0.67956372D-02
+ 0.29000000D+01 0.30000000D+01 0.16733432D+01 0.97857708D-02
+ 0.30000000D+01 0.31000000D+01 0.14178655D+01 0.53737577D-02
+ 0.31000000D+01 0.32000000D+01 0.11623373D+01 0.48332426D-02
+ 0.32000000D+01 0.33000000D+01 0.94265095D+00 0.49672459D-02
+ 0.33000000D+01 0.34000000D+01 0.75391292D+00 0.40576457D-02
+ 0.34000000D+01 0.35000000D+01 0.58322762D+00 0.32335333D-02
+ 0.35000000D+01 0.36000000D+01 0.44320921D+00 0.22803330D-02
+ 0.36000000D+01 0.37000000D+01 0.32134274D+00 0.19643940D-02
+ 0.37000000D+01 0.38000000D+01 0.22328069D+00 0.14135241D-02
+ 0.38000000D+01 0.39000000D+01 0.14587781D+00 0.82755779D-03
+ 0.39000000D+01 0.40000000D+01 0.87126541D-01 0.58088715D-03
+ 0.40000000D+01 0.41000000D+01 0.46054546D-01 0.30790348D-03
+ 0.41000000D+01 0.42000000D+01 0.19945754D-01 0.18766469D-03
+ 0.42000000D+01 0.43000000D+01 0.65960769D-02 0.60694601D-04
+ 0.43000000D+01 0.44000000D+01 0.12132465D-02 0.22332153D-04
+ 0.44000000D+01 0.45000000D+01 -.95202760D-04 0.55855540D-05
+ 0.45000000D+01 0.46000000D+01 -.72532915D-04 0.32031793D-05
+ 0.46000000D+01 0.47000000D+01 -.12395624D-05 0.51933092D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12360952D-05 0.51988401D-06
+ -.46000000D+01 -.45000000D+01 -.71443434D-04 0.32024310D-05
+ -.45000000D+01 -.44000000D+01 -.91311714D-04 0.55961242D-05
+ -.44000000D+01 -.43000000D+01 0.11434087D-02 0.21785494D-04
+ -.43000000D+01 -.42000000D+01 0.62193643D-02 0.60111820D-04
+ -.42000000D+01 -.41000000D+01 0.18186155D-01 0.14599905D-03
+ -.41000000D+01 -.40000000D+01 0.41746552D-01 0.30540712D-03
+ -.40000000D+01 -.39000000D+01 0.78266792D-01 0.71549714D-03
+ -.39000000D+01 -.38000000D+01 0.12824489D+00 0.81519227D-03
+ -.38000000D+01 -.37000000D+01 0.19304382D+00 0.13200111D-02
+ -.37000000D+01 -.36000000D+01 0.27716185D+00 0.19265390D-02
+ -.36000000D+01 -.35000000D+01 0.37633058D+00 0.23117340D-02
+ -.35000000D+01 -.34000000D+01 0.48665694D+00 0.33432341D-02
+ -.34000000D+01 -.33000000D+01 0.63094729D+00 0.39749080D-02
+ -.33000000D+01 -.32000000D+01 0.78632259D+00 0.39776971D-02
+ -.32000000D+01 -.31000000D+01 0.96193520D+00 0.45443101D-02
+ -.31000000D+01 -.30000000D+01 0.11538857D+01 0.56855521D-02
+ -.30000000D+01 -.29000000D+01 0.13645293D+01 0.60532883D-02
+ -.29000000D+01 -.28000000D+01 0.15718337D+01 0.70087232D-02
+ -.28000000D+01 -.27000000D+01 0.18304336D+01 0.71045985D-02
+ -.27000000D+01 -.26000000D+01 0.20919380D+01 0.81135241D-02
+ -.26000000D+01 -.25000000D+01 0.23545231D+01 0.10004933D-01
+ -.25000000D+01 -.24000000D+01 0.26418192D+01 0.10595843D-01
+ -.24000000D+01 -.23000000D+01 0.29354099D+01 0.92817922D-02
+ -.23000000D+01 -.22000000D+01 0.32213529D+01 0.10761797D-01
+ -.22000000D+01 -.21000000D+01 0.35180281D+01 0.10088957D-01
+ -.21000000D+01 -.20000000D+01 0.38488024D+01 0.11333717D-01
+ -.20000000D+01 -.19000000D+01 0.41039137D+01 0.11517154D-01
+ -.19000000D+01 -.18000000D+01 0.43932267D+01 0.12079590D-01
+ -.18000000D+01 -.17000000D+01 0.46845393D+01 0.13071014D-01
+ -.17000000D+01 -.16000000D+01 0.49516599D+01 0.13589771D-01
+ -.16000000D+01 -.15000000D+01 0.52211155D+01 0.15272613D-01
+ -.15000000D+01 -.14000000D+01 0.54893155D+01 0.15031767D-01
+ -.14000000D+01 -.13000000D+01 0.56907804D+01 0.13288097D-01
+ -.13000000D+01 -.12000000D+01 0.59577881D+01 0.14266042D-01
+ -.12000000D+01 -.11000000D+01 0.61543891D+01 0.15941314D-01
+ -.11000000D+01 -.10000000D+01 0.63473022D+01 0.15316380D-01
+ -.10000000D+01 -.90000000D+00 0.65353805D+01 0.15825094D-01
+ -.90000000D+00 -.80000000D+00 0.66869150D+01 0.21032027D-01
+ -.80000000D+00 -.70000000D+00 0.68110712D+01 0.17905541D-01
+ -.70000000D+00 -.60000000D+00 0.69143107D+01 0.19089253D-01
+ -.60000000D+00 -.50000000D+00 0.70431742D+01 0.15346886D-01
+ -.50000000D+00 -.40000000D+00 0.71190204D+01 0.16601878D-01
+ -.40000000D+00 -.30000000D+00 0.71830285D+01 0.15260130D-01
+ -.30000000D+00 -.20000000D+00 0.72770269D+01 0.17001587D-01
+ -.20000000D+00 -.10000000D+00 0.72859757D+01 0.18029568D-01
+ -.10000000D+00 0.18041124D-15 0.73038785D+01 0.17401558D-01
+ 0.70776718D-15 0.10000000D+00 0.73091409D+01 0.17111851D-01
+ 0.10000000D+00 0.20000000D+00 0.73028793D+01 0.15344393D-01
+ 0.20000000D+00 0.30000000D+00 0.72581411D+01 0.16680301D-01
+ 0.30000000D+00 0.40000000D+00 0.72022290D+01 0.16089383D-01
+ 0.40000000D+00 0.50000000D+00 0.71335933D+01 0.20041270D-01
+ 0.50000000D+00 0.60000000D+00 0.70632515D+01 0.16097771D-01
+ 0.60000000D+00 0.70000000D+00 0.69477209D+01 0.15631131D-01
+ 0.70000000D+00 0.80000000D+00 0.67952662D+01 0.15120566D-01
+ 0.80000000D+00 0.90000000D+00 0.66915564D+01 0.15321021D-01
+ 0.90000000D+00 0.10000000D+01 0.65206581D+01 0.14829707D-01
+ 0.10000000D+01 0.11000000D+01 0.63255803D+01 0.16132097D-01
+ 0.11000000D+01 0.12000000D+01 0.61453159D+01 0.16284509D-01
+ 0.12000000D+01 0.13000000D+01 0.59543056D+01 0.15140007D-01
+ 0.13000000D+01 0.14000000D+01 0.56915056D+01 0.14000778D-01
+ 0.14000000D+01 0.15000000D+01 0.54792128D+01 0.13434860D-01
+ 0.15000000D+01 0.16000000D+01 0.52162576D+01 0.12730757D-01
+ 0.16000000D+01 0.17000000D+01 0.49738315D+01 0.15012599D-01
+ 0.17000000D+01 0.18000000D+01 0.47096814D+01 0.24758273D-01
+ 0.18000000D+01 0.19000000D+01 0.43843667D+01 0.14342954D-01
+ 0.19000000D+01 0.20000000D+01 0.41115299D+01 0.12340249D-01
+ 0.20000000D+01 0.21000000D+01 0.38411059D+01 0.11316101D-01
+ 0.21000000D+01 0.22000000D+01 0.35335285D+01 0.10936199D-01
+ 0.22000000D+01 0.23000000D+01 0.32275398D+01 0.97882994D-02
+ 0.23000000D+01 0.24000000D+01 0.29239030D+01 0.10307735D-01
+ 0.24000000D+01 0.25000000D+01 0.26325609D+01 0.95312327D-02
+ 0.25000000D+01 0.26000000D+01 0.23608632D+01 0.12079121D-01
+ 0.26000000D+01 0.27000000D+01 0.20867320D+01 0.81104450D-02
+ 0.27000000D+01 0.28000000D+01 0.18353749D+01 0.72743519D-02
+ 0.28000000D+01 0.29000000D+01 0.15831234D+01 0.67636295D-02
+ 0.29000000D+01 0.30000000D+01 0.13519257D+01 0.97516351D-02
+ 0.30000000D+01 0.31000000D+01 0.11554302D+01 0.53160552D-02
+ 0.31000000D+01 0.32000000D+01 0.95198977D+00 0.48100766D-02
+ 0.32000000D+01 0.33000000D+01 0.77811962D+00 0.49478003D-02
+ 0.33000000D+01 0.34000000D+01 0.62813236D+00 0.40424827D-02
+ 0.34000000D+01 0.35000000D+01 0.49015237D+00 0.32223829D-02
+ 0.35000000D+01 0.36000000D+01 0.37685611D+00 0.22734066D-02
+ 0.36000000D+01 0.37000000D+01 0.27613137D+00 0.19541945D-02
+ 0.37000000D+01 0.38000000D+01 0.19441988D+00 0.14030685D-02
+ 0.38000000D+01 0.39000000D+01 0.12879407D+00 0.82453139D-03
+ 0.39000000D+01 0.40000000D+01 0.78051107D-01 0.57908321D-03
+ 0.40000000D+01 0.41000000D+01 0.41863674D-01 0.30743041D-03
+ 0.41000000D+01 0.42000000D+01 0.18363347D-01 0.18753825D-03
+ 0.42000000D+01 0.43000000D+01 0.61559722D-02 0.60596739D-04
+ 0.43000000D+01 0.44000000D+01 0.11464633D-02 0.22323688D-04
+ 0.44000000D+01 0.45000000D+01 -.92431526D-04 0.55848888D-05
+ 0.45000000D+01 0.46000000D+01 -.70979630D-04 0.32030855D-05
+ 0.46000000D+01 0.47000000D+01 -.12319649D-05 0.51933063D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12397323D-05 0.51988412D-06
+ -.46000000D+01 -.45000000D+01 -.72162767D-04 0.32024701D-05
+ -.45000000D+01 -.44000000D+01 -.92439249D-04 0.55965412D-05
+ -.44000000D+01 -.43000000D+01 0.11734523D-02 0.21789846D-04
+ -.43000000D+01 -.42000000D+01 0.64097955D-02 0.60144228D-04
+ -.42000000D+01 -.41000000D+01 0.18850687D-01 0.14609158D-03
+ -.41000000D+01 -.40000000D+01 0.43468802D-01 0.30565947D-03
+ -.40000000D+01 -.39000000D+01 0.81916735D-01 0.71693591D-03
+ -.39000000D+01 -.38000000D+01 0.13491613D+00 0.81791596D-03
+ -.38000000D+01 -.37000000D+01 0.20412407D+00 0.13226138D-02
+ -.37000000D+01 -.36000000D+01 0.29401320D+00 0.19284861D-02
+ -.36000000D+01 -.35000000D+01 0.40073386D+00 0.23172746D-02
+ -.35000000D+01 -.34000000D+01 0.52019274D+00 0.33483621D-02
+ -.34000000D+01 -.33000000D+01 0.67550633D+00 0.39790723D-02
+ -.33000000D+01 -.32000000D+01 0.84378524D+00 0.39848803D-02
+ -.32000000D+01 -.31000000D+01 0.10341681D+01 0.45510090D-02
+ -.31000000D+01 -.30000000D+01 0.12429526D+01 0.56925167D-02
+ -.30000000D+01 -.29000000D+01 0.14721010D+01 0.60597826D-02
+ -.29000000D+01 -.28000000D+01 0.16997483D+01 0.70185114D-02
+ -.28000000D+01 -.27000000D+01 0.19806156D+01 0.71154995D-02
+ -.27000000D+01 -.26000000D+01 0.22655634D+01 0.81406691D-02
+ -.26000000D+01 -.25000000D+01 0.25536684D+01 0.10026169D-01
+ -.25000000D+01 -.24000000D+01 0.28672452D+01 0.10610801D-01
+ -.24000000D+01 -.23000000D+01 0.31881872D+01 0.92944042D-02
+ -.23000000D+01 -.22000000D+01 0.35025500D+01 0.10782286D-01
+ -.22000000D+01 -.21000000D+01 0.38283126D+01 0.10109473D-01
+ -.21000000D+01 -.20000000D+01 0.41886158D+01 0.11353010D-01
+ -.20000000D+01 -.19000000D+01 0.44733439D+01 0.11543119D-01
+ -.19000000D+01 -.18000000D+01 0.47920544D+01 0.12100370D-01
+ -.18000000D+01 -.17000000D+01 0.51123475D+01 0.13127028D-01
+ -.17000000D+01 -.16000000D+01 0.54080273D+01 0.13657038D-01
+ -.16000000D+01 -.15000000D+01 0.57052453D+01 0.15287961D-01
+ -.15000000D+01 -.14000000D+01 0.60004341D+01 0.15053915D-01
+ -.14000000D+01 -.13000000D+01 0.62266848D+01 0.13303902D-01
+ -.13000000D+01 -.12000000D+01 0.65184133D+01 0.14299309D-01
+ -.12000000D+01 -.11000000D+01 0.67382323D+01 0.15990572D-01
+ -.11000000D+01 -.10000000D+01 0.69520659D+01 0.15359558D-01
+ -.10000000D+01 -.90000000D+00 0.71598280D+01 0.15881065D-01
+ -.90000000D+00 -.80000000D+00 0.73293717D+01 0.21070096D-01
+ -.80000000D+00 -.70000000D+00 0.74696338D+01 0.17923763D-01
+ -.70000000D+00 -.60000000D+00 0.75871096D+01 0.19108172D-01
+ -.60000000D+00 -.50000000D+00 0.77276453D+01 0.15465866D-01
+ -.50000000D+00 -.40000000D+00 0.78150996D+01 0.16730988D-01
+ -.40000000D+00 -.30000000D+00 0.78850649D+01 0.15493700D-01
+ -.30000000D+00 -.20000000D+00 0.79877817D+01 0.17194554D-01
+ -.20000000D+00 -.10000000D+00 0.79990162D+01 0.18087688D-01
+ -.10000000D+00 0.18041124D-15 0.80201252D+01 0.17457786D-01
+ 0.70776718D-15 0.10000000D+00 0.80251439D+01 0.17139653D-01
+ 0.10000000D+00 0.20000000D+00 0.80168511D+01 0.15382851D-01
+ 0.20000000D+00 0.30000000D+00 0.79678995D+01 0.16709953D-01
+ 0.30000000D+00 0.40000000D+00 0.79054502D+01 0.16120614D-01
+ 0.40000000D+00 0.50000000D+00 0.78289772D+01 0.20050963D-01
+ 0.50000000D+00 0.60000000D+00 0.77479790D+01 0.16133301D-01
+ 0.60000000D+00 0.70000000D+00 0.76210452D+01 0.15672561D-01
+ 0.70000000D+00 0.80000000D+00 0.74536404D+01 0.15146316D-01
+ 0.80000000D+00 0.90000000D+00 0.73340039D+01 0.15351064D-01
+ 0.90000000D+00 0.10000000D+01 0.71453356D+01 0.14856905D-01
+ 0.10000000D+01 0.11000000D+01 0.69305587D+01 0.16154047D-01
+ 0.11000000D+01 0.12000000D+01 0.67285459D+01 0.16310531D-01
+ 0.12000000D+01 0.13000000D+01 0.65151034D+01 0.15162746D-01
+ 0.13000000D+01 0.14000000D+01 0.62277716D+01 0.14025569D-01
+ 0.14000000D+01 0.15000000D+01 0.59895769D+01 0.13459008D-01
+ 0.15000000D+01 0.16000000D+01 0.57002701D+01 0.12754007D-01
+ 0.16000000D+01 0.17000000D+01 0.54303680D+01 0.15055342D-01
+ 0.17000000D+01 0.18000000D+01 0.51373172D+01 0.24781590D-01
+ 0.18000000D+01 0.19000000D+01 0.47831925D+01 0.14363495D-01
+ 0.19000000D+01 0.20000000D+01 0.44812692D+01 0.12361906D-01
+ 0.20000000D+01 0.21000000D+01 0.41813984D+01 0.11336992D-01
+ 0.21000000D+01 0.22000000D+01 0.38436968D+01 0.10958250D-01
+ 0.22000000D+01 0.23000000D+01 0.35085567D+01 0.98080816D-02
+ 0.23000000D+01 0.24000000D+01 0.31767656D+01 0.10319674D-01
+ 0.24000000D+01 0.25000000D+01 0.28581623D+01 0.95586357D-02
+ 0.25000000D+01 0.26000000D+01 0.25595343D+01 0.12096111D-01
+ 0.26000000D+01 0.27000000D+01 0.22604913D+01 0.81251414D-02
+ 0.27000000D+01 0.28000000D+01 0.19853914D+01 0.72865540D-02
+ 0.28000000D+01 0.29000000D+01 0.17112805D+01 0.67733870D-02
+ 0.29000000D+01 0.30000000D+01 0.14595745D+01 0.97604708D-02
+ 0.30000000D+01 0.31000000D+01 0.12444570D+01 0.53322973D-02
+ 0.31000000D+01 0.32000000D+01 0.10243120D+01 0.48175277D-02
+ 0.32000000D+01 0.33000000D+01 0.83552073D+00 0.49545495D-02
+ 0.33000000D+01 0.34000000D+01 0.67267786D+00 0.40478605D-02
+ 0.34000000D+01 0.35000000D+01 0.52370711D+00 0.32266565D-02
+ 0.35000000D+01 0.36000000D+01 0.40121890D+00 0.22762230D-02
+ 0.36000000D+01 0.37000000D+01 0.29306629D+00 0.19583604D-02
+ 0.37000000D+01 0.38000000D+01 0.20545630D+00 0.14074954D-02
+ 0.38000000D+01 0.39000000D+01 0.13547931D+00 0.82579920D-03
+ 0.39000000D+01 0.40000000D+01 0.81688388D-01 0.57976177D-03
+ 0.40000000D+01 0.41000000D+01 0.43582680D-01 0.30764592D-03
+ 0.41000000D+01 0.42000000D+01 0.19029287D-01 0.18759778D-03
+ 0.42000000D+01 0.43000000D+01 0.63462536D-02 0.60634083D-04
+ 0.43000000D+01 0.44000000D+01 0.11764985D-02 0.22327672D-04
+ 0.44000000D+01 0.45000000D+01 -.93545766D-04 0.55851870D-05
+ 0.45000000D+01 0.46000000D+01 -.71694409D-04 0.32031300D-05
+ 0.46000000D+01 0.47000000D+01 -.12356157D-05 0.51933077D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12417184D-05 0.51988419D-06
+ -.46000000D+01 -.45000000D+01 -.72578808D-04 0.32024921D-05
+ -.45000000D+01 -.44000000D+01 -.93202803D-04 0.55968085D-05
+ -.44000000D+01 -.43000000D+01 0.11913710D-02 0.21792356D-04
+ -.43000000D+01 -.42000000D+01 0.65284173D-02 0.60163183D-04
+ -.42000000D+01 -.41000000D+01 0.19276968D-01 0.14614470D-03
+ -.41000000D+01 -.40000000D+01 0.44602015D-01 0.30581229D-03
+ -.40000000D+01 -.39000000D+01 0.84371873D-01 0.71779692D-03
+ -.39000000D+01 -.38000000D+01 0.13949780D+00 0.82002805D-03
+ -.38000000D+01 -.37000000D+01 0.21189365D+00 0.13247825D-02
+ -.37000000D+01 -.36000000D+01 0.30602962D+00 0.19298061D-02
+ -.36000000D+01 -.35000000D+01 0.41839505D+00 0.23216232D-02
+ -.35000000D+01 -.34000000D+01 0.54480885D+00 0.33522644D-02
+ -.34000000D+01 -.33000000D+01 0.70861008D+00 0.39821086D-02
+ -.33000000D+01 -.32000000D+01 0.88690929D+00 0.39900526D-02
+ -.32000000D+01 -.31000000D+01 0.10888850D+01 0.45562921D-02
+ -.31000000D+01 -.30000000D+01 0.13110656D+01 0.56980419D-02
+ -.30000000D+01 -.29000000D+01 0.15549487D+01 0.60641829D-02
+ -.29000000D+01 -.28000000D+01 0.17989082D+01 0.70248636D-02
+ -.28000000D+01 -.27000000D+01 0.20977893D+01 0.71233882D-02
+ -.27000000D+01 -.26000000D+01 0.24017415D+01 0.81692102D-02
+ -.26000000D+01 -.25000000D+01 0.27107432D+01 0.10048030D-01
+ -.25000000D+01 -.24000000D+01 0.30458526D+01 0.10622758D-01
+ -.24000000D+01 -.23000000D+01 0.33893287D+01 0.93048333D-02
+ -.23000000D+01 -.22000000D+01 0.37272400D+01 0.10797201D-01
+ -.22000000D+01 -.21000000D+01 0.40771682D+01 0.10125954D-01
+ -.21000000D+01 -.20000000D+01 0.44620145D+01 0.11368215D-01
+ -.20000000D+01 -.19000000D+01 0.47715246D+01 0.11569368D-01
+ -.19000000D+01 -.18000000D+01 0.51150734D+01 0.12121196D-01
+ -.18000000D+01 -.17000000D+01 0.54598173D+01 0.13173759D-01
+ -.17000000D+01 -.16000000D+01 0.57796241D+01 0.13714095D-01
+ -.16000000D+01 -.15000000D+01 0.61005345D+01 0.15298324D-01
+ -.15000000D+01 -.14000000D+01 0.64186184D+01 0.15072876D-01
+ -.14000000D+01 -.13000000D+01 0.66660348D+01 0.13316638D-01
+ -.13000000D+01 -.12000000D+01 0.69789002D+01 0.14328909D-01
+ -.12000000D+01 -.11000000D+01 0.72187768D+01 0.16039755D-01
+ -.11000000D+01 -.10000000D+01 0.74505717D+01 0.15402709D-01
+ -.10000000D+01 -.90000000D+00 0.76750882D+01 0.15947314D-01
+ -.90000000D+00 -.80000000D+00 0.78604662D+01 0.21113119D-01
+ -.80000000D+00 -.70000000D+00 0.80146688D+01 0.17936399D-01
+ -.70000000D+00 -.60000000D+00 0.81443698D+01 0.19121515D-01
+ -.60000000D+00 -.50000000D+00 0.82951071D+01 0.15554801D-01
+ -.50000000D+00 -.40000000D+00 0.83926974D+01 0.16838901D-01
+ -.40000000D+00 -.30000000D+00 0.84677681D+01 0.15690804D-01
+ -.30000000D+00 -.20000000D+00 0.85779282D+01 0.17345890D-01
+ -.20000000D+00 -.10000000D+00 0.85910447D+01 0.18173844D-01
+ -.10000000D+00 0.18041124D-15 0.86154050D+01 0.17547182D-01
+ 0.70776718D-15 0.10000000D+00 0.86200257D+01 0.17169181D-01
+ 0.10000000D+00 0.20000000D+00 0.86098947D+01 0.15420624D-01
+ 0.20000000D+00 0.30000000D+00 0.85572756D+01 0.16734504D-01
+ 0.30000000D+00 0.40000000D+00 0.84892421D+01 0.16148850D-01
+ 0.40000000D+00 0.50000000D+00 0.84058834D+01 0.20059835D-01
+ 0.50000000D+00 0.60000000D+00 0.83155816D+01 0.16159107D-01
+ 0.60000000D+00 0.70000000D+00 0.81788539D+01 0.15703170D-01
+ 0.70000000D+00 0.80000000D+00 0.79983385D+01 0.15166254D-01
+ 0.80000000D+00 0.90000000D+00 0.78650386D+01 0.15375069D-01
+ 0.90000000D+00 0.10000000D+01 0.76609703D+01 0.14878100D-01
+ 0.10000000D+01 0.11000000D+01 0.74291560D+01 0.16171081D-01
+ 0.11000000D+01 0.12000000D+01 0.72085644D+01 0.16329682D-01
+ 0.12000000D+01 0.13000000D+01 0.69757839D+01 0.15180174D-01
+ 0.13000000D+01 0.14000000D+01 0.66675040D+01 0.14045629D-01
+ 0.14000000D+01 0.15000000D+01 0.64071107D+01 0.13479023D-01
+ 0.15000000D+01 0.16000000D+01 0.60954994D+01 0.12771287D-01
+ 0.16000000D+01 0.17000000D+01 0.58021017D+01 0.15089663D-01
+ 0.17000000D+01 0.18000000D+01 0.54846321D+01 0.24800052D-01
+ 0.18000000D+01 0.19000000D+01 0.51061030D+01 0.14379980D-01
+ 0.19000000D+01 0.20000000D+01 0.47797596D+01 0.12379293D-01
+ 0.20000000D+01 0.21000000D+01 0.44552129D+01 0.11353356D-01
+ 0.21000000D+01 0.22000000D+01 0.40924953D+01 0.10978969D-01
+ 0.22000000D+01 0.23000000D+01 0.37330713D+01 0.98256707D-02
+ 0.23000000D+01 0.24000000D+01 0.33780230D+01 0.10327752D-01
+ 0.24000000D+01 0.25000000D+01 0.30369675D+01 0.95845883D-02
+ 0.25000000D+01 0.26000000D+01 0.27161874D+01 0.12112941D-01
+ 0.26000000D+01 0.27000000D+01 0.23968381D+01 0.81369237D-02
+ 0.27000000D+01 0.28000000D+01 0.21024498D+01 0.72959576D-02
+ 0.28000000D+01 0.29000000D+01 0.18106608D+01 0.67809641D-02
+ 0.29000000D+01 0.30000000D+01 0.15424678D+01 0.97687925D-02
+ 0.30000000D+01 0.31000000D+01 0.13124698D+01 0.53469332D-02
+ 0.31000000D+01 0.32000000D+01 0.10791160D+01 0.48235088D-02
+ 0.32000000D+01 0.33000000D+01 0.87860465D+00 0.49596419D-02
+ 0.33000000D+01 0.34000000D+01 0.70577977D+00 0.40517979D-02
+ 0.34000000D+01 0.35000000D+01 0.54833103D+00 0.32296070D-02
+ 0.35000000D+01 0.36000000D+01 0.41885826D+00 0.22780529D-02
+ 0.36000000D+01 0.37000000D+01 0.30513965D+00 0.19610886D-02
+ 0.37000000D+01 0.38000000D+01 0.21319288D+00 0.14103298D-02
+ 0.38000000D+01 0.39000000D+01 0.14007372D+00 0.82660118D-03
+ 0.39000000D+01 0.40000000D+01 0.84134641D-01 0.58023935D-03
+ 0.40000000D+01 0.41000000D+01 0.44713747D-01 0.30777114D-03
+ 0.41000000D+01 0.42000000D+01 0.19456383D-01 0.18763047D-03
+ 0.42000000D+01 0.43000000D+01 0.64648617D-02 0.60659888D-04
+ 0.43000000D+01 0.44000000D+01 0.11944143D-02 0.22329905D-04
+ 0.44000000D+01 0.45000000D+01 -.94300882D-04 0.55853649D-05
+ 0.45000000D+01 0.46000000D+01 -.72107872D-04 0.32031547D-05
+ 0.46000000D+01 0.47000000D+01 -.12376092D-05 0.51933085D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12426667D-05 0.51988422D-06
+ -.46000000D+01 -.45000000D+01 -.72784487D-04 0.32025029D-05
+ -.45000000D+01 -.44000000D+01 -.93622138D-04 0.55969500D-05
+ -.44000000D+01 -.43000000D+01 0.12003812D-02 0.21793600D-04
+ -.43000000D+01 -.42000000D+01 0.65901123D-02 0.60172668D-04
+ -.42000000D+01 -.41000000D+01 0.19504028D-01 0.14617109D-03
+ -.41000000D+01 -.40000000D+01 0.45218811D-01 0.30589140D-03
+ -.40000000D+01 -.39000000D+01 0.85734434D-01 0.71823578D-03
+ -.39000000D+01 -.38000000D+01 0.14208908D+00 0.82137586D-03
+ -.38000000D+01 -.37000000D+01 0.21637394D+00 0.13262157D-02
+ -.37000000D+01 -.36000000D+01 0.31307590D+00 0.19305668D-02
+ -.36000000D+01 -.35000000D+01 0.42890559D+00 0.23242881D-02
+ -.35000000D+01 -.34000000D+01 0.55967571D+00 0.33546465D-02
+ -.34000000D+01 -.33000000D+01 0.72886120D+00 0.39840090D-02
+ -.33000000D+01 -.32000000D+01 0.91358500D+00 0.39932195D-02
+ -.32000000D+01 -.31000000D+01 0.11230797D+01 0.45600112D-02
+ -.31000000D+01 -.30000000D+01 0.13540880D+01 0.57019112D-02
+ -.30000000D+01 -.29000000D+01 0.16077035D+01 0.60668513D-02
+ -.29000000D+01 -.28000000D+01 0.18625341D+01 0.70283891D-02
+ -.28000000D+01 -.27000000D+01 0.21735278D+01 0.71281984D-02
+ -.27000000D+01 -.26000000D+01 0.24903613D+01 0.81922976D-02
+ -.26000000D+01 -.25000000D+01 0.28135898D+01 0.10065850D-01
+ -.25000000D+01 -.24000000D+01 0.31634504D+01 0.10631029D-01
+ -.24000000D+01 -.23000000D+01 0.35224566D+01 0.93121373D-02
+ -.23000000D+01 -.22000000D+01 0.38766933D+01 0.10806098D-01
+ -.22000000D+01 -.21000000D+01 0.42434216D+01 0.10136877D-01
+ -.21000000D+01 -.20000000D+01 0.46454336D+01 0.11378237D-01
+ -.20000000D+01 -.19000000D+01 0.49722778D+01 0.11598080D-01
+ -.19000000D+01 -.18000000D+01 0.53334741D+01 0.12144413D-01
+ -.18000000D+01 -.17000000D+01 0.56955446D+01 0.13203326D-01
+ -.17000000D+01 -.16000000D+01 0.60324702D+01 0.13751079D-01
+ -.16000000D+01 -.15000000D+01 0.63703649D+01 0.15304339D-01
+ -.15000000D+01 -.14000000D+01 0.67047808D+01 0.15086677D-01
+ -.14000000D+01 -.13000000D+01 0.69675130D+01 0.13326097D-01
+ -.13000000D+01 -.12000000D+01 0.72955850D+01 0.14350112D-01
+ -.12000000D+01 -.11000000D+01 0.75500213D+01 0.16078211D-01
+ -.11000000D+01 -.10000000D+01 0.77947899D+01 0.15436344D-01
+ -.10000000D+01 -.90000000D+00 0.80314097D+01 0.16015012D-01
+ -.90000000D+00 -.80000000D+00 0.82285537D+01 0.21157970D-01
+ -.80000000D+00 -.70000000D+00 0.83928893D+01 0.17944411D-01
+ -.70000000D+00 -.60000000D+00 0.85314593D+01 0.19130018D-01
+ -.60000000D+00 -.50000000D+00 0.86897565D+01 0.15607381D-01
+ -.50000000D+00 -.40000000D+00 0.87947476D+01 0.16912589D-01
+ -.40000000D+00 -.30000000D+00 0.88736051D+01 0.15820234D-01
+ -.30000000D+00 -.20000000D+00 0.89890783D+01 0.17437013D-01
+ -.20000000D+00 -.10000000D+00 0.90035237D+01 0.18277446D-01
+ -.10000000D+00 0.18041124D-15 0.90305961D+01 0.17656167D-01
+ 0.70776718D-15 0.10000000D+00 0.90347817D+01 0.17194973D-01
+ 0.10000000D+00 0.20000000D+00 0.90232467D+01 0.15451331D-01
+ 0.20000000D+00 0.30000000D+00 0.89679434D+01 0.16752800D-01
+ 0.30000000D+00 0.40000000D+00 0.88958734D+01 0.16171404D-01
+ 0.40000000D+00 0.50000000D+00 0.88073822D+01 0.20067940D-01
+ 0.50000000D+00 0.60000000D+00 0.87102582D+01 0.16176508D-01
+ 0.60000000D+00 0.70000000D+00 0.85663974D+01 0.15724051D-01
+ 0.70000000D+00 0.80000000D+00 0.83762276D+01 0.15180378D-01
+ 0.80000000D+00 0.90000000D+00 0.82330068D+01 0.15391725D-01
+ 0.90000000D+00 0.10000000D+01 0.80176740D+01 0.14892267D-01
+ 0.10000000D+01 0.11000000D+01 0.77734194D+01 0.16182676D-01
+ 0.11000000D+01 0.12000000D+01 0.75394419D+01 0.16341944D-01
+ 0.12000000D+01 0.13000000D+01 0.72926074D+01 0.15192159D-01
+ 0.13000000D+01 0.14000000D+01 0.69692820D+01 0.14060791D-01
+ 0.14000000D+01 0.15000000D+01 0.66928396D+01 0.13494961D-01
+ 0.15000000D+01 0.16000000D+01 0.63653273D+01 0.12782439D-01
+ 0.16000000D+01 0.17000000D+01 0.60550429D+01 0.15111618D-01
+ 0.17000000D+01 0.18000000D+01 0.57202435D+01 0.24811791D-01
+ 0.18000000D+01 0.19000000D+01 0.53243405D+01 0.14391106D-01
+ 0.19000000D+01 0.20000000D+01 0.49807854D+01 0.12390987D-01
+ 0.20000000D+01 0.21000000D+01 0.46388884D+01 0.11364143D-01
+ 0.21000000D+01 0.22000000D+01 0.42587420D+01 0.10995096D-01
+ 0.22000000D+01 0.23000000D+01 0.38823860D+01 0.98391745D-02
+ 0.23000000D+01 0.24000000D+01 0.35112754D+01 0.10332341D-01
+ 0.24000000D+01 0.25000000D+01 0.31547058D+01 0.96035405D-02
+ 0.25000000D+01 0.26000000D+01 0.28187551D+01 0.12125550D-01
+ 0.26000000D+01 0.27000000D+01 0.24855760D+01 0.81449187D-02
+ 0.27000000D+01 0.28000000D+01 0.21781358D+01 0.73021066D-02
+ 0.28000000D+01 0.29000000D+01 0.18744431D+01 0.67862169D-02
+ 0.29000000D+01 0.30000000D+01 0.15952427D+01 0.97750946D-02
+ 0.30000000D+01 0.31000000D+01 0.13553939D+01 0.53574297D-02
+ 0.31000000D+01 0.32000000D+01 0.11133755D+01 0.48274277D-02
+ 0.32000000D+01 0.33000000D+01 0.90525908D+00 0.49628247D-02
+ 0.33000000D+01 0.34000000D+01 0.72603443D+00 0.40542245D-02
+ 0.34000000D+01 0.35000000D+01 0.56319766D+00 0.32313182D-02
+ 0.35000000D+01 0.36000000D+01 0.42936005D+00 0.22790690D-02
+ 0.36000000D+01 0.37000000D+01 0.31221652D+00 0.19625809D-02
+ 0.37000000D+01 0.38000000D+01 0.21765372D+00 0.14118227D-02
+ 0.38000000D+01 0.39000000D+01 0.14267391D+00 0.82703623D-03
+ 0.39000000D+01 0.40000000D+01 0.85492140D-01 0.58052165D-03
+ 0.40000000D+01 0.41000000D+01 0.45329362D-01 0.30783399D-03
+ 0.41000000D+01 0.42000000D+01 0.19683843D-01 0.18764665D-03
+ 0.42000000D+01 0.43000000D+01 0.65265891D-02 0.60675052D-04
+ 0.43000000D+01 0.44000000D+01 0.12034228D-02 0.22330992D-04
+ 0.44000000D+01 0.45000000D+01 -.94715716D-04 0.55854549D-05
+ 0.45000000D+01 0.46000000D+01 -.72312301D-04 0.32031666D-05
+ 0.46000000D+01 0.47000000D+01 -.12385611D-05 0.51933088D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12321881D-05 0.51988402D-06
+ -.46000000D+01 -.45000000D+01 -.70579408D-04 0.32024458D-05
+ -.45000000D+01 -.44000000D+01 -.92922067D-04 0.55962418D-05
+ -.44000000D+01 -.43000000D+01 0.10740253D-02 0.21790047D-04
+ -.43000000D+01 -.42000000D+01 0.58273901D-02 0.60141657D-04
+ -.42000000D+01 -.41000000D+01 0.16857012D-01 0.14614209D-03
+ -.41000000D+01 -.40000000D+01 0.38339907D-01 0.30577427D-03
+ -.40000000D+01 -.39000000D+01 0.71070099D-01 0.71573862D-03
+ -.39000000D+01 -.38000000D+01 0.11502659D+00 0.81588840D-03
+ -.38000000D+01 -.37000000D+01 0.17107012D+00 0.13214615D-02
+ -.37000000D+01 -.36000000D+01 0.24355091D+00 0.19292143D-02
+ -.36000000D+01 -.35000000D+01 0.32762987D+00 0.23144585D-02
+ -.35000000D+01 -.34000000D+01 0.41958694D+00 0.33464532D-02
+ -.34000000D+01 -.33000000D+01 0.54183898D+00 0.39776668D-02
+ -.33000000D+01 -.32000000D+01 0.67140536D+00 0.39829908D-02
+ -.32000000D+01 -.31000000D+01 0.81745573D+00 0.45503062D-02
+ -.31000000D+01 -.30000000D+01 0.97596659D+00 0.56903800D-02
+ -.30000000D+01 -.29000000D+01 0.11495160D+01 0.60602066D-02
+ -.29000000D+01 -.28000000D+01 0.13163721D+01 0.70185439D-02
+ -.28000000D+01 -.27000000D+01 0.15310917D+01 0.71170080D-02
+ -.27000000D+01 -.26000000D+01 0.17459736D+01 0.81136338D-02
+ -.26000000D+01 -.25000000D+01 0.19587475D+01 0.10009652D-01
+ -.25000000D+01 -.24000000D+01 0.21941788D+01 0.10608173D-01
+ -.24000000D+01 -.23000000D+01 0.24338163D+01 0.92972809D-02
+ -.23000000D+01 -.22000000D+01 0.26642672D+01 0.10770964D-01
+ -.22000000D+01 -.21000000D+01 0.29041292D+01 0.10105487D-01
+ -.21000000D+01 -.20000000D+01 0.31773741D+01 0.11341572D-01
+ -.20000000D+01 -.19000000D+01 0.33744180D+01 0.11529471D-01
+ -.19000000D+01 -.18000000D+01 0.36062193D+01 0.12093564D-01
+ -.18000000D+01 -.17000000D+01 0.38410955D+01 0.13063439D-01
+ -.17000000D+01 -.16000000D+01 0.40525842D+01 0.13580414D-01
+ -.16000000D+01 -.15000000D+01 0.42682286D+01 0.15281347D-01
+ -.15000000D+01 -.14000000D+01 0.44837373D+01 0.15050207D-01
+ -.14000000D+01 -.13000000D+01 0.46355238D+01 0.13293265D-01
+ -.13000000D+01 -.12000000D+01 0.48550609D+01 0.14279540D-01
+ -.12000000D+01 -.11000000D+01 0.50064791D+01 0.15936027D-01
+ -.11000000D+01 -.10000000D+01 0.51584821D+01 0.15326101D-01
+ -.10000000D+01 -.90000000D+00 0.53074569D+01 0.15819373D-01
+ -.90000000D+00 -.80000000D+00 0.54242263D+01 0.21043239D-01
+ -.80000000D+00 -.70000000D+00 0.55167476D+01 0.17927489D-01
+ -.70000000D+00 -.60000000D+00 0.55921250D+01 0.19108902D-01
+ -.60000000D+00 -.50000000D+00 0.56969435D+01 0.15325615D-01
+ -.50000000D+00 -.40000000D+00 0.57520144D+01 0.16573336D-01
+ -.40000000D+00 -.30000000D+00 0.58009819D+01 0.15175132D-01
+ -.30000000D+00 -.20000000D+00 0.58819239D+01 0.16932184D-01
+ -.20000000D+00 -.10000000D+00 0.58834543D+01 0.18040953D-01
+ -.10000000D+00 0.18041124D-15 0.58966821D+01 0.17407163D-01
+ 0.70776718D-15 0.10000000D+00 0.59020595D+01 0.17123712D-01
+ 0.10000000D+00 0.20000000D+00 0.59002677D+01 0.15354664D-01
+ 0.20000000D+00 0.30000000D+00 0.58634705D+01 0.16697211D-01
+ 0.30000000D+00 0.40000000D+00 0.58195785D+01 0.16101727D-01
+ 0.40000000D+00 0.50000000D+00 0.57670488D+01 0.20059359D-01
+ 0.50000000D+00 0.60000000D+00 0.57168691D+01 0.16108719D-01
+ 0.60000000D+00 0.70000000D+00 0.56252997D+01 0.15637774D-01
+ 0.70000000D+00 0.80000000D+00 0.55007709D+01 0.15135942D-01
+ 0.80000000D+00 0.90000000D+00 0.54289893D+01 0.15343317D-01
+ 0.90000000D+00 0.10000000D+01 0.52929046D+01 0.14849222D-01
+ 0.10000000D+01 0.11000000D+01 0.51359077D+01 0.16161734D-01
+ 0.11000000D+01 0.12000000D+01 0.49978968D+01 0.16302168D-01
+ 0.12000000D+01 0.13000000D+01 0.48514408D+01 0.15155582D-01
+ 0.13000000D+01 0.14000000D+01 0.46357594D+01 0.14016616D-01
+ 0.14000000D+01 0.15000000D+01 0.44743059D+01 0.13450396D-01
+ 0.15000000D+01 0.16000000D+01 0.42630337D+01 0.12748226D-01
+ 0.16000000D+01 0.17000000D+01 0.40746548D+01 0.15012442D-01
+ 0.17000000D+01 0.18000000D+01 0.38661574D+01 0.24754688D-01
+ 0.18000000D+01 0.19000000D+01 0.35974238D+01 0.14353800D-01
+ 0.19000000D+01 0.20000000D+01 0.33821036D+01 0.12345971D-01
+ 0.20000000D+01 0.21000000D+01 0.31694515D+01 0.11324890D-01
+ 0.21000000D+01 0.22000000D+01 0.29197468D+01 0.10939355D-01
+ 0.22000000D+01 0.23000000D+01 0.26707448D+01 0.98003056D-02
+ 0.23000000D+01 0.24000000D+01 0.24225173D+01 0.10323675D-01
+ 0.24000000D+01 0.25000000D+01 0.21848774D+01 0.95356536D-02
+ 0.25000000D+01 0.26000000D+01 0.19654170D+01 0.12083862D-01
+ 0.26000000D+01 0.27000000D+01 0.17408349D+01 0.81152066D-02
+ 0.27000000D+01 0.28000000D+01 0.15362185D+01 0.72831935D-02
+ 0.28000000D+01 0.29000000D+01 0.13276923D+01 0.67701644D-02
+ 0.29000000D+01 0.30000000D+01 0.11369290D+01 0.97548355D-02
+ 0.30000000D+01 0.31000000D+01 0.97758066D+00 0.53181213D-02
+ 0.31000000D+01 0.32000000D+01 0.80746290D+00 0.48148088D-02
+ 0.32000000D+01 0.33000000D+01 0.66313274D+00 0.49540245D-02
+ 0.33000000D+01 0.34000000D+01 0.53891638D+00 0.40467918D-02
+ 0.34000000D+01 0.35000000D+01 0.42311929D+00 0.32256200D-02
+ 0.35000000D+01 0.36000000D+01 0.32817756D+00 0.22786666D-02
+ 0.36000000D+01 0.37000000D+01 0.24250956D+00 0.19551082D-02
+ 0.37000000D+01 0.38000000D+01 0.17249950D+00 0.14033631D-02
+ 0.38000000D+01 0.39000000D+01 0.11555382D+00 0.82551764D-03
+ 0.39000000D+01 0.40000000D+01 0.70851626D-01 0.57951772D-03
+ 0.40000000D+01 0.41000000D+01 0.38459178D-01 0.30785942D-03
+ 0.41000000D+01 0.42000000D+01 0.17033583D-01 0.18770106D-03
+ 0.42000000D+01 0.43000000D+01 0.57634521D-02 0.60625445D-04
+ 0.43000000D+01 0.44000000D+01 0.10771001D-02 0.22327428D-04
+ 0.44000000D+01 0.45000000D+01 -.94034143D-04 0.55851168D-05
+ 0.45000000D+01 0.46000000D+01 -.70113108D-04 0.32031007D-05
+ 0.46000000D+01 0.47000000D+01 -.12280453D-05 0.51933063D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12406505D-05 0.51988419D-06
+ -.46000000D+01 -.45000000D+01 -.72304598D-04 0.32024964D-05
+ -.45000000D+01 -.44000000D+01 -.93584390D-04 0.55968139D-05
+ -.44000000D+01 -.43000000D+01 0.11671719D-02 0.21793779D-04
+ -.43000000D+01 -.42000000D+01 0.63808177D-02 0.60171228D-04
+ -.42000000D+01 -.41000000D+01 0.18747795D-01 0.14619025D-03
+ -.41000000D+01 -.40000000D+01 0.43179197D-01 0.30591023D-03
+ -.40000000D+01 -.39000000D+01 0.81237924D-01 0.71783686D-03
+ -.39000000D+01 -.38000000D+01 0.13352021D+00 0.81969398D-03
+ -.38000000D+01 -.37000000D+01 0.20158776D+00 0.13246429D-02
+ -.37000000D+01 -.36000000D+01 0.28977989D+00 0.19302956D-02
+ -.36000000D+01 -.35000000D+01 0.39422591D+00 0.23215726D-02
+ -.35000000D+01 -.34000000D+01 0.51071227D+00 0.33525587D-02
+ -.34000000D+01 -.33000000D+01 0.66236387D+00 0.39822251D-02
+ -.33000000D+01 -.32000000D+01 0.82620139D+00 0.39906249D-02
+ -.32000000D+01 -.31000000D+01 0.10113376D+01 0.45561285D-02
+ -.31000000D+01 -.30000000D+01 0.12140824D+01 0.56978073D-02
+ -.30000000D+01 -.29000000D+01 0.14363525D+01 0.60653187D-02
+ -.29000000D+01 -.28000000D+01 0.16563925D+01 0.70272559D-02
+ -.28000000D+01 -.27000000D+01 0.19290840D+01 0.71257549D-02
+ -.27000000D+01 -.26000000D+01 0.22049424D+01 0.81549352D-02
+ -.26000000D+01 -.25000000D+01 0.24835934D+01 0.10038570D-01
+ -.25000000D+01 -.24000000D+01 0.27869710D+01 0.10622225D-01
+ -.24000000D+01 -.23000000D+01 0.30972426D+01 0.93070726D-02
+ -.23000000D+01 -.22000000D+01 0.34006777D+01 0.10797127D-01
+ -.22000000D+01 -.21000000D+01 0.37151686D+01 0.10127594D-01
+ -.21000000D+01 -.20000000D+01 0.40639456D+01 0.11365798D-01
+ -.20000000D+01 -.19000000D+01 0.43369662D+01 0.11559201D-01
+ -.19000000D+01 -.18000000D+01 0.46437542D+01 0.12116063D-01
+ -.18000000D+01 -.17000000D+01 0.49523767D+01 0.13159002D-01
+ -.17000000D+01 -.16000000D+01 0.52366722D+01 0.13694679D-01
+ -.16000000D+01 -.15000000D+01 0.55225750D+01 0.15298786D-01
+ -.15000000D+01 -.14000000D+01 0.58067935D+01 0.15072261D-01
+ -.14000000D+01 -.13000000D+01 0.60218616D+01 0.13304769D-01
+ -.13000000D+01 -.12000000D+01 0.63039928D+01 0.14324253D-01
+ -.12000000D+01 -.11000000D+01 0.65140950D+01 0.16015094D-01
+ -.11000000D+01 -.10000000D+01 0.67191478D+01 0.15387692D-01
+ -.10000000D+01 -.90000000D+00 0.69181901D+01 0.15905273D-01
+ -.90000000D+00 -.80000000D+00 0.70800064D+01 0.21093899D-01
+ -.80000000D+00 -.70000000D+00 0.72133930D+01 0.17940830D-01
+ -.70000000D+00 -.60000000D+00 0.73248125D+01 0.19125646D-01
+ -.60000000D+00 -.50000000D+00 0.74595877D+01 0.15535573D-01
+ -.50000000D+00 -.40000000D+00 0.75432401D+01 0.16798573D-01
+ -.40000000D+00 -.30000000D+00 0.76086960D+01 0.15610624D-01
+ -.30000000D+00 -.20000000D+00 0.77098110D+01 0.17293198D-01
+ -.20000000D+00 -.10000000D+00 0.77185458D+01 0.18110526D-01
+ -.10000000D+00 0.18041124D-15 0.77389962D+01 0.17478061D-01
+ 0.70776718D-15 0.10000000D+00 0.77438086D+01 0.17159957D-01
+ 0.10000000D+00 0.20000000D+00 0.77368176D+01 0.15407928D-01
+ 0.20000000D+00 0.30000000D+00 0.76894651D+01 0.16732256D-01
+ 0.30000000D+00 0.40000000D+00 0.76294772D+01 0.16140424D-01
+ 0.40000000D+00 0.50000000D+00 0.75568240D+01 0.20061564D-01
+ 0.50000000D+00 0.60000000D+00 0.74800969D+01 0.16158771D-01
+ 0.60000000D+00 0.70000000D+00 0.73589117D+01 0.15698218D-01
+ 0.70000000D+00 0.80000000D+00 0.71973436D+01 0.15165855D-01
+ 0.80000000D+00 0.90000000D+00 0.70847657D+01 0.15375859D-01
+ 0.90000000D+00 0.10000000D+01 0.69038987D+01 0.14877913D-01
+ 0.10000000D+01 0.11000000D+01 0.66973506D+01 0.16179369D-01
+ 0.11000000D+01 0.12000000D+01 0.65042259D+01 0.16331255D-01
+ 0.12000000D+01 0.13000000D+01 0.63006374D+01 0.15179043D-01
+ 0.13000000D+01 0.14000000D+01 0.60230454D+01 0.14044587D-01
+ 0.14000000D+01 0.15000000D+01 0.57957111D+01 0.13476148D-01
+ 0.15000000D+01 0.16000000D+01 0.55172796D+01 0.12772319D-01
+ 0.16000000D+01 0.17000000D+01 0.52589259D+01 0.15081593D-01
+ 0.17000000D+01 0.18000000D+01 0.49771927D+01 0.24794007D-01
+ 0.18000000D+01 0.19000000D+01 0.46349918D+01 0.14380458D-01
+ 0.19000000D+01 0.20000000D+01 0.43450161D+01 0.12375502D-01
+ 0.20000000D+01 0.21000000D+01 0.40569752D+01 0.11351124D-01
+ 0.21000000D+01 0.22000000D+01 0.37305010D+01 0.10970256D-01
+ 0.22000000D+01 0.23000000D+01 0.34067750D+01 0.98222562D-02
+ 0.23000000D+01 0.24000000D+01 0.30858816D+01 0.10332600D-01
+ 0.24000000D+01 0.25000000D+01 0.27780093D+01 0.95753900D-02
+ 0.25000000D+01 0.26000000D+01 0.24893275D+01 0.12107146D-01
+ 0.26000000D+01 0.27000000D+01 0.22000225D+01 0.81352626D-02
+ 0.27000000D+01 0.28000000D+01 0.19338361D+01 0.72966907D-02
+ 0.28000000D+01 0.29000000D+01 0.16681525D+01 0.67808178D-02
+ 0.29000000D+01 0.30000000D+01 0.14238942D+01 0.97663184D-02
+ 0.30000000D+01 0.31000000D+01 0.12156072D+01 0.53422159D-02
+ 0.31000000D+01 0.32000000D+01 0.10015246D+01 0.48234452D-02
+ 0.32000000D+01 0.33000000D+01 0.81788196D+00 0.49603168D-02
+ 0.33000000D+01 0.34000000D+01 0.65948169D+00 0.40520829D-02
+ 0.34000000D+01 0.35000000D+01 0.51425719D+00 0.32300165D-02
+ 0.35000000D+01 0.36000000D+01 0.39469893D+00 0.22796796D-02
+ 0.36000000D+01 0.37000000D+01 0.28888647D+00 0.19610939D-02
+ 0.37000000D+01 0.38000000D+01 0.20291440D+00 0.14102878D-02
+ 0.38000000D+01 0.39000000D+01 0.13407872D+00 0.82682111D-03
+ 0.39000000D+01 0.40000000D+01 0.80999161D-01 0.58029147D-03
+ 0.40000000D+01 0.41000000D+01 0.43291954D-01 0.30790750D-03
+ 0.41000000D+01 0.42000000D+01 0.18926780D-01 0.18768640D-03
+ 0.42000000D+01 0.43000000D+01 0.63170177D-02 0.60663604D-04
+ 0.43000000D+01 0.44000000D+01 0.11702231D-02 0.22330936D-04
+ 0.44000000D+01 0.45000000D+01 -.94681538D-04 0.55854274D-05
+ 0.45000000D+01 0.46000000D+01 -.71832946D-04 0.32031586D-05
+ 0.46000000D+01 0.47000000D+01 -.12365373D-05 0.51933085D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12423102D-05 0.51988422D-06
+ -.46000000D+01 -.45000000D+01 -.72682788D-04 0.32025063D-05
+ -.45000000D+01 -.44000000D+01 -.93844933D-04 0.55969680D-05
+ -.44000000D+01 -.43000000D+01 0.11896962D-02 0.21794449D-04
+ -.43000000D+01 -.42000000D+01 0.65236571D-02 0.60177523D-04
+ -.42000000D+01 -.41000000D+01 0.19259760D-01 0.14619641D-03
+ -.41000000D+01 -.40000000D+01 0.44545232D-01 0.30594533D-03
+ -.40000000D+01 -.39000000D+01 0.84214091D-01 0.71830376D-03
+ -.39000000D+01 -.38000000D+01 0.13911791D+00 0.82123691D-03
+ -.38000000D+01 -.37000000D+01 0.21113064D+00 0.13261798D-02
+ -.37000000D+01 -.36000000D+01 0.30462501D+00 0.19307952D-02
+ -.36000000D+01 -.35000000D+01 0.41609959D+00 0.23244525D-02
+ -.35000000D+01 -.34000000D+01 0.54127887D+00 0.33549619D-02
+ -.34000000D+01 -.33000000D+01 0.70350929D+00 0.39840387D-02
+ -.33000000D+01 -.32000000D+01 0.87982772D+00 0.39935034D-02
+ -.32000000D+01 -.31000000D+01 0.10794037D+01 0.45594194D-02
+ -.31000000D+01 -.30000000D+01 0.12987949D+01 0.57014363D-02
+ -.30000000D+01 -.29000000D+01 0.15393969D+01 0.60672990D-02
+ -.29000000D+01 -.28000000D+01 0.17796747D+01 0.70297591D-02
+ -.28000000D+01 -.27000000D+01 0.20746134D+01 0.71294001D-02
+ -.27000000D+01 -.26000000D+01 0.23739769D+01 0.81824524D-02
+ -.26000000D+01 -.25000000D+01 0.26783515D+01 0.10058715D-01
+ -.25000000D+01 -.24000000D+01 0.30082632D+01 0.10629734D-01
+ -.24000000D+01 -.23000000D+01 0.33463250D+01 0.93127593D-02
+ -.23000000D+01 -.22000000D+01 0.36786428D+01 0.10806633D-01
+ -.22000000D+01 -.21000000D+01 0.40227631D+01 0.10137826D-01
+ -.21000000D+01 -.20000000D+01 0.44015762D+01 0.11376762D-01
+ -.20000000D+01 -.19000000D+01 0.47050209D+01 0.11579222D-01
+ -.19000000D+01 -.18000000D+01 0.50422717D+01 0.12131052D-01
+ -.18000000D+01 -.17000000D+01 0.53808085D+01 0.13198035D-01
+ -.17000000D+01 -.16000000D+01 0.56945763D+01 0.13742972D-01
+ -.16000000D+01 -.15000000D+01 0.60094247D+01 0.15304749D-01
+ -.15000000D+01 -.14000000D+01 0.63216336D+01 0.15085048D-01
+ -.14000000D+01 -.13000000D+01 0.65627925D+01 0.13315979D-01
+ -.13000000D+01 -.12000000D+01 0.68705777D+01 0.14347052D-01
+ -.12000000D+01 -.11000000D+01 0.71052026D+01 0.16061503D-01
+ -.11000000D+01 -.10000000D+01 0.73321779D+01 0.15425990D-01
+ -.10000000D+01 -.90000000D+00 0.75518071D+01 0.15970590D-01
+ -.90000000D+00 -.80000000D+00 0.77329067D+01 0.21131765D-01
+ -.80000000D+00 -.70000000D+00 0.78833713D+01 0.17945833D-01
+ -.70000000D+00 -.60000000D+00 0.80096996D+01 0.19131218D-01
+ -.60000000D+00 -.50000000D+00 0.81571635D+01 0.15603614D-01
+ -.50000000D+00 -.40000000D+00 0.82528526D+01 0.16889740D-01
+ -.40000000D+00 -.30000000D+00 0.83250876D+01 0.15782794D-01
+ -.30000000D+00 -.20000000D+00 0.84345846D+01 0.17418430D-01
+ -.20000000D+00 -.10000000D+00 0.84461021D+01 0.18199053D-01
+ -.10000000D+00 0.18041124D-15 0.84703154D+01 0.17573837D-01
+ 0.70776718D-15 0.10000000D+00 0.84747166D+01 0.17185363D-01
+ 0.10000000D+00 0.20000000D+00 0.84653430D+01 0.15440262D-01
+ 0.20000000D+00 0.30000000D+00 0.84135961D+01 0.16749101D-01
+ 0.30000000D+00 0.40000000D+00 0.83469285D+01 0.16162659D-01
+ 0.40000000D+00 0.50000000D+00 0.82657187D+01 0.20066370D-01
+ 0.50000000D+00 0.60000000D+00 0.81777341D+01 0.16175664D-01
+ 0.60000000D+00 0.70000000D+00 0.80443371D+01 0.15719049D-01
+ 0.70000000D+00 0.80000000D+00 0.78669307D+01 0.15178146D-01
+ 0.80000000D+00 0.90000000D+00 0.77375593D+01 0.15390123D-01
+ 0.90000000D+00 0.10000000D+01 0.75378645D+01 0.14891127D-01
+ 0.10000000D+01 0.11000000D+01 0.73105594D+01 0.16186658D-01
+ 0.11000000D+01 0.12000000D+01 0.70948134D+01 0.16342448D-01
+ 0.12000000D+01 0.13000000D+01 0.68674612D+01 0.15189959D-01
+ 0.13000000D+01 0.14000000D+01 0.65644133D+01 0.14057768D-01
+ 0.14000000D+01 0.15000000D+01 0.63098941D+01 0.13489185D-01
+ 0.15000000D+01 0.16000000D+01 0.60041651D+01 0.12782354D-01
+ 0.16000000D+01 0.17000000D+01 0.57169814D+01 0.15108150D-01
+ 0.17000000D+01 0.18000000D+01 0.54055022D+01 0.24808906D-01
+ 0.18000000D+01 0.19000000D+01 0.50333426D+01 0.14391765D-01
+ 0.19000000D+01 0.20000000D+01 0.47133293D+01 0.12388902D-01
+ 0.20000000D+01 0.21000000D+01 0.43950176D+01 0.11362515D-01
+ 0.21000000D+01 0.22000000D+01 0.40380643D+01 0.10988060D-01
+ 0.22000000D+01 0.23000000D+01 0.36845035D+01 0.98354678D-02
+ 0.23000000D+01 0.24000000D+01 0.33350227D+01 0.10335227D-01
+ 0.24000000D+01 0.25000000D+01 0.29994999D+01 0.95980493D-02
+ 0.25000000D+01 0.26000000D+01 0.26836570D+01 0.12121878D-01
+ 0.26000000D+01 0.27000000D+01 0.23692301D+01 0.81438382D-02
+ 0.27000000D+01 0.28000000D+01 0.20792487D+01 0.73024592D-02
+ 0.28000000D+01 0.29000000D+01 0.17916001D+01 0.67856750D-02
+ 0.29000000D+01 0.30000000D+01 0.15269702D+01 0.97733458D-02
+ 0.30000000D+01 0.31000000D+01 0.13001860D+01 0.53547536D-02
+ 0.31000000D+01 0.32000000D+01 0.10696797D+01 0.48274797D-02
+ 0.32000000D+01 0.33000000D+01 0.87149690D+00 0.49631846D-02
+ 0.33000000D+01 0.34000000D+01 0.70065168D+00 0.40543079D-02
+ 0.34000000D+01 0.35000000D+01 0.54481641D+00 0.32315739D-02
+ 0.35000000D+01 0.36000000D+01 0.41655615D+00 0.22799799D-02
+ 0.36000000D+01 0.37000000D+01 0.30377039D+00 0.19627141D-02
+ 0.37000000D+01 0.38000000D+01 0.21242299D+00 0.14119953D-02
+ 0.38000000D+01 0.39000000D+01 0.13969295D+00 0.82717215D-03
+ 0.39000000D+01 0.40000000D+01 0.83970417D-01 0.58056090D-03
+ 0.40000000D+01 0.41000000D+01 0.44656207D-01 0.30790741D-03
+ 0.41000000D+01 0.42000000D+01 0.19439383D-01 0.18767530D-03
+ 0.42000000D+01 0.43000000D+01 0.64600080D-02 0.60677454D-04
+ 0.43000000D+01 0.44000000D+01 0.11927431D-02 0.22331601D-04
+ 0.44000000D+01 0.45000000D+01 -.94937738D-04 0.55854955D-05
+ 0.45000000D+01 0.46000000D+01 -.72210096D-04 0.32031700D-05
+ 0.46000000D+01 0.47000000D+01 -.12382031D-05 0.51933089D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12428995D-05 0.51988423D-06
+ -.46000000D+01 -.45000000D+01 -.72821725D-04 0.32025099D-05
+ -.45000000D+01 -.44000000D+01 -.93956301D-04 0.55970281D-05
+ -.44000000D+01 -.43000000D+01 0.11983051D-02 0.21794675D-04
+ -.43000000D+01 -.42000000D+01 0.65798549D-02 0.60179868D-04
+ -.42000000D+01 -.41000000D+01 0.19466065D-01 0.14619814D-03
+ -.41000000D+01 -.40000000D+01 0.45108215D-01 0.30595988D-03
+ -.40000000D+01 -.39000000D+01 0.85466439D-01 0.71848072D-03
+ -.39000000D+01 -.38000000D+01 0.14152161D+00 0.82198772D-03
+ -.38000000D+01 -.37000000D+01 0.21531153D+00 0.13269495D-02
+ -.37000000D+01 -.36000000D+01 0.31124763D+00 0.19310604D-02
+ -.36000000D+01 -.35000000D+01 0.42600978D+00 0.23257496D-02
+ -.35000000D+01 -.34000000D+01 0.55533908D+00 0.33560586D-02
+ -.34000000D+01 -.33000000D+01 0.72268488D+00 0.39849718D-02
+ -.33000000D+01 -.32000000D+01 0.90510796D+00 0.39949530D-02
+ -.32000000D+01 -.31000000D+01 0.11118220D+01 0.45615167D-02
+ -.31000000D+01 -.30000000D+01 0.13395577D+01 0.57036153D-02
+ -.30000000D+01 -.29000000D+01 0.15893777D+01 0.60683999D-02
+ -.29000000D+01 -.28000000D+01 0.18399201D+01 0.70308934D-02
+ -.28000000D+01 -.27000000D+01 0.21462167D+01 0.71312649D-02
+ -.27000000D+01 -.26000000D+01 0.24577089D+01 0.81989592D-02
+ -.26000000D+01 -.25000000D+01 0.27753538D+01 0.10071249D-01
+ -.25000000D+01 -.24000000D+01 0.31190734D+01 0.10634287D-01
+ -.24000000D+01 -.23000000D+01 0.34716469D+01 0.93162457D-02
+ -.23000000D+01 -.22000000D+01 0.38191362D+01 0.10810941D-01
+ -.22000000D+01 -.21000000D+01 0.41788538D+01 0.10143213D-01
+ -.21000000D+01 -.20000000D+01 0.45735900D+01 0.11382549D-01
+ -.20000000D+01 -.19000000D+01 0.48931120D+01 0.11598826D-01
+ -.19000000D+01 -.18000000D+01 0.52467169D+01 0.12146370D-01
+ -.18000000D+01 -.17000000D+01 0.56012797D+01 0.13215544D-01
+ -.17000000D+01 -.16000000D+01 0.59308251D+01 0.13765467D-01
+ -.16000000D+01 -.15000000D+01 0.62613396D+01 0.15307555D-01
+ -.15000000D+01 -.14000000D+01 0.65886097D+01 0.15092842D-01
+ -.14000000D+01 -.13000000D+01 0.68440361D+01 0.13323905D-01
+ -.13000000D+01 -.12000000D+01 0.71657004D+01 0.14359428D-01
+ -.12000000D+01 -.11000000D+01 0.74137079D+01 0.16088446D-01
+ -.11000000D+01 -.10000000D+01 0.76526215D+01 0.15448181D-01
+ -.10000000D+01 -.90000000D+00 0.78834635D+01 0.16022346D-01
+ -.90000000D+00 -.80000000D+00 0.80753707D+01 0.21164305D-01
+ -.80000000D+00 -.70000000D+00 0.82351525D+01 0.17948879D-01
+ -.70000000D+00 -.60000000D+00 0.83696165D+01 0.19134515D-01
+ -.60000000D+00 -.50000000D+00 0.85241435D+01 0.15632405D-01
+ -.50000000D+00 -.40000000D+00 0.86264266D+01 0.16936655D-01
+ -.40000000D+00 -.30000000D+00 0.87024485D+01 0.15864991D-01
+ -.30000000D+00 -.20000000D+00 0.88164670D+01 0.17471899D-01
+ -.20000000D+00 -.10000000D+00 0.88294660D+01 0.18283792D-01
+ -.10000000D+00 0.18041124D-15 0.88560096D+01 0.17664098D-01
+ 0.70776718D-15 0.10000000D+00 0.88600941D+01 0.17202980D-01
+ 0.10000000D+00 0.20000000D+00 0.88493449D+01 0.15460861D-01
+ 0.20000000D+00 0.30000000D+00 0.87951912D+01 0.16759793D-01
+ 0.30000000D+00 0.40000000D+00 0.87248678D+01 0.16177587D-01
+ 0.40000000D+00 0.50000000D+00 0.86388882D+01 0.20071302D-01
+ 0.50000000D+00 0.60000000D+00 0.85446834D+01 0.16184935D-01
+ 0.60000000D+00 0.70000000D+00 0.84046061D+01 0.15730759D-01
+ 0.70000000D+00 0.80000000D+00 0.82184210D+01 0.15185611D-01
+ 0.80000000D+00 0.90000000D+00 0.80798876D+01 0.15398546D-01
+ 0.90000000D+00 0.10000000D+01 0.78698067D+01 0.14898428D-01
+ 0.10000000D+01 0.11000000D+01 0.76310901D+01 0.16191120D-01
+ 0.11000000D+01 0.12000000D+01 0.74030674D+01 0.16348405D-01
+ 0.12000000D+01 0.13000000D+01 0.71627127D+01 0.15196665D-01
+ 0.13000000D+01 0.14000000D+01 0.68458779D+01 0.14066413D-01
+ 0.14000000D+01 0.15000000D+01 0.65765557D+01 0.13498656D-01
+ 0.15000000D+01 0.16000000D+01 0.62561443D+01 0.12787853D-01
+ 0.16000000D+01 0.17000000D+01 0.59533286D+01 0.15120747D-01
+ 0.17000000D+01 0.18000000D+01 0.56259027D+01 0.24815959D-01
+ 0.18000000D+01 0.19000000D+01 0.52376260D+01 0.14397491D-01
+ 0.19000000D+01 0.20000000D+01 0.49016109D+01 0.12395896D-01
+ 0.20000000D+01 0.21000000D+01 0.45671987D+01 0.11368516D-01
+ 0.21000000D+01 0.22000000D+01 0.41941665D+01 0.10998993D-01
+ 0.22000000D+01 0.23000000D+01 0.38248589D+01 0.98439304D-02
+ 0.23000000D+01 0.24000000D+01 0.34604291D+01 0.10336371D-01
+ 0.24000000D+01 0.25000000D+01 0.31104025D+01 0.96103099D-02
+ 0.25000000D+01 0.26000000D+01 0.27804596D+01 0.12130095D-01
+ 0.26000000D+01 0.27000000D+01 0.24530300D+01 0.81483834D-02
+ 0.27000000D+01 0.28000000D+01 0.21508142D+01 0.73054989D-02
+ 0.28000000D+01 0.29000000D+01 0.18519273D+01 0.67885463D-02
+ 0.29000000D+01 0.30000000D+01 0.15769545D+01 0.97774307D-02
+ 0.30000000D+01 0.31000000D+01 0.13408639D+01 0.53614805D-02
+ 0.31000000D+01 0.32000000D+01 0.11021438D+01 0.48295215D-02
+ 0.32000000D+01 0.33000000D+01 0.89677123D+00 0.49646423D-02
+ 0.33000000D+01 0.34000000D+01 0.71984168D+00 0.40554558D-02
+ 0.34000000D+01 0.35000000D+01 0.55886980D+00 0.32323024D-02
+ 0.35000000D+01 0.36000000D+01 0.42646173D+00 0.22801179D-02
+ 0.36000000D+01 0.37000000D+01 0.31040690D+00 0.19633786D-02
+ 0.37000000D+01 0.38000000D+01 0.21658918D+00 0.14126418D-02
+ 0.38000000D+01 0.39000000D+01 0.14210510D+00 0.82732296D-03
+ 0.39000000D+01 0.40000000D+01 0.85220836D-01 0.58068556D-03
+ 0.40000000D+01 0.41000000D+01 0.45218455D-01 0.30790616D-03
+ 0.41000000D+01 0.42000000D+01 0.19645942D-01 0.18767078D-03
+ 0.42000000D+01 0.43000000D+01 0.65162844D-02 0.60683999D-04
+ 0.43000000D+01 0.44000000D+01 0.12013491D-02 0.22331839D-04
+ 0.44000000D+01 0.45000000D+01 -.95047319D-04 0.55855206D-05
+ 0.45000000D+01 0.46000000D+01 -.72348671D-04 0.32031741D-05
+ 0.46000000D+01 0.47000000D+01 -.12387947D-05 0.51933090D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12364045D-05 0.51988402D-06
+ -.46000000D+01 -.45000000D+01 -.71539670D-04 0.32024389D-05
+ -.45000000D+01 -.44000000D+01 -.91724236D-04 0.55961773D-05
+ -.44000000D+01 -.43000000D+01 0.11463593D-02 0.21788301D-04
+ -.43000000D+01 -.42000000D+01 0.62439352D-02 0.60122305D-04
+ -.42000000D+01 -.41000000D+01 0.18282953D-01 0.14601837D-03
+ -.41000000D+01 -.40000000D+01 0.42017731D-01 0.30554193D-03
+ -.40000000D+01 -.39000000D+01 0.78876855D-01 0.71569930D-03
+ -.39000000D+01 -.38000000D+01 0.12941202D+00 0.81567138D-03
+ -.38000000D+01 -.37000000D+01 0.19502654D+00 0.13206416D-02
+ -.37000000D+01 -.36000000D+01 0.28027739D+00 0.19275488D-02
+ -.36000000D+01 -.35000000D+01 0.38094723D+00 0.23135319D-02
+ -.35000000D+01 -.34000000D+01 0.49319856D+00 0.33439167D-02
+ -.34000000D+01 -.33000000D+01 0.63975963D+00 0.39757939D-02
+ -.33000000D+01 -.32000000D+01 0.79778516D+00 0.39810070D-02
+ -.32000000D+01 -.31000000D+01 0.97636709D+00 0.45465644D-02
+ -.31000000D+01 -.30000000D+01 0.11719321D+01 0.56876324D-02
+ -.30000000D+01 -.29000000D+01 0.13864013D+01 0.60561860D-02
+ -.29000000D+01 -.28000000D+01 0.15979968D+01 0.70122672D-02
+ -.28000000D+01 -.27000000D+01 0.18612847D+01 0.71073239D-02
+ -.27000000D+01 -.26000000D+01 0.21279520D+01 0.81186889D-02
+ -.26000000D+01 -.25000000D+01 0.23958800D+01 0.10009632D-01
+ -.25000000D+01 -.24000000D+01 0.26889685D+01 0.10602051D-01
+ -.24000000D+01 -.23000000D+01 0.29883210D+01 0.92899380D-02
+ -.23000000D+01 -.22000000D+01 0.32803333D+01 0.10767314D-01
+ -.22000000D+01 -.21000000D+01 0.35835470D+01 0.10097802D-01
+ -.21000000D+01 -.20000000D+01 0.39206623D+01 0.11337446D-01
+ -.20000000D+01 -.19000000D+01 0.41821612D+01 0.11524053D-01
+ -.19000000D+01 -.18000000D+01 0.44778841D+01 0.12085599D-01
+ -.18000000D+01 -.17000000D+01 0.47755194D+01 0.13076344D-01
+ -.17000000D+01 -.16000000D+01 0.50486880D+01 0.13596602D-01
+ -.16000000D+01 -.15000000D+01 0.53244659D+01 0.15279781D-01
+ -.15000000D+01 -.14000000D+01 0.55981705D+01 0.15037015D-01
+ -.14000000D+01 -.13000000D+01 0.58049878D+01 0.13284535D-01
+ -.13000000D+01 -.12000000D+01 0.60774508D+01 0.14279535D-01
+ -.12000000D+01 -.11000000D+01 0.62789615D+01 0.15947617D-01
+ -.11000000D+01 -.10000000D+01 0.64767339D+01 0.15330942D-01
+ -.10000000D+01 -.90000000D+00 0.66688065D+01 0.15836117D-01
+ -.90000000D+00 -.80000000D+00 0.68240734D+01 0.21036302D-01
+ -.80000000D+00 -.70000000D+00 0.69520026D+01 0.17920077D-01
+ -.70000000D+00 -.60000000D+00 0.70581970D+01 0.19095415D-01
+ -.60000000D+00 -.50000000D+00 0.71895118D+01 0.15364781D-01
+ -.50000000D+00 -.40000000D+00 0.72676874D+01 0.16615745D-01
+ -.40000000D+00 -.30000000D+00 0.73331742D+01 0.15272508D-01
+ -.30000000D+00 -.20000000D+00 0.74286459D+01 0.17008536D-01
+ -.20000000D+00 -.10000000D+00 0.74385779D+01 0.18042227D-01
+ -.10000000D+00 0.18041124D-15 0.74565469D+01 0.17410003D-01
+ 0.70776718D-15 0.10000000D+00 0.74621275D+01 0.17115895D-01
+ 0.10000000D+00 0.20000000D+00 0.74555676D+01 0.15356534D-01
+ 0.20000000D+00 0.30000000D+00 0.74099091D+01 0.16692019D-01
+ 0.30000000D+00 0.40000000D+00 0.73524429D+01 0.16102954D-01
+ 0.40000000D+00 0.50000000D+00 0.72821137D+01 0.20057169D-01
+ 0.50000000D+00 0.60000000D+00 0.72093149D+01 0.16107648D-01
+ 0.60000000D+00 0.70000000D+00 0.70914326D+01 0.15641786D-01
+ 0.70000000D+00 0.80000000D+00 0.69358599D+01 0.15128447D-01
+ 0.80000000D+00 0.90000000D+00 0.68288030D+01 0.15339326D-01
+ 0.90000000D+00 0.10000000D+01 0.66540256D+01 0.14844801D-01
+ 0.10000000D+01 0.11000000D+01 0.64548035D+01 0.16137609D-01
+ 0.11000000D+01 0.12000000D+01 0.62699286D+01 0.16297761D-01
+ 0.12000000D+01 0.13000000D+01 0.60738083D+01 0.15147194D-01
+ 0.13000000D+01 0.14000000D+01 0.58057943D+01 0.14012853D-01
+ 0.14000000D+01 0.15000000D+01 0.55878806D+01 0.13445174D-01
+ 0.15000000D+01 0.16000000D+01 0.53193532D+01 0.12737513D-01
+ 0.16000000D+01 0.17000000D+01 0.50707634D+01 0.15020504D-01
+ 0.17000000D+01 0.18000000D+01 0.48004067D+01 0.24764054D-01
+ 0.18000000D+01 0.19000000D+01 0.44689848D+01 0.14351109D-01
+ 0.19000000D+01 0.20000000D+01 0.41896595D+01 0.12345316D-01
+ 0.20000000D+01 0.21000000D+01 0.39130015D+01 0.11327091D-01
+ 0.21000000D+01 0.22000000D+01 0.35990816D+01 0.10938680D-01
+ 0.22000000D+01 0.23000000D+01 0.32868343D+01 0.97946995D-02
+ 0.23000000D+01 0.24000000D+01 0.29769842D+01 0.10316471D-01
+ 0.24000000D+01 0.25000000D+01 0.26795565D+01 0.95393504D-02
+ 0.25000000D+01 0.26000000D+01 0.24021357D+01 0.12083570D-01
+ 0.26000000D+01 0.27000000D+01 0.21228896D+01 0.81159175D-02
+ 0.27000000D+01 0.28000000D+01 0.18663241D+01 0.72801504D-02
+ 0.28000000D+01 0.29000000D+01 0.16094779D+01 0.67676655D-02
+ 0.29000000D+01 0.30000000D+01 0.13738718D+01 0.97537961D-02
+ 0.30000000D+01 0.31000000D+01 0.11734761D+01 0.53192649D-02
+ 0.31000000D+01 0.32000000D+01 0.96647015D+00 0.48125376D-02
+ 0.32000000D+01 0.33000000D+01 0.78948725D+00 0.49509052D-02
+ 0.33000000D+01 0.34000000D+01 0.63686696D+00 0.40448225D-02
+ 0.34000000D+01 0.35000000D+01 0.49661488D+00 0.32233913D-02
+ 0.35000000D+01 0.36000000D+01 0.38147983D+00 0.22753783D-02
+ 0.36000000D+01 0.37000000D+01 0.27929595D+00 0.19548596D-02
+ 0.37000000D+01 0.38000000D+01 0.19642374D+00 0.14036339D-02
+ 0.38000000D+01 0.39000000D+01 0.12995814D+00 0.82488773D-03
+ 0.39000000D+01 0.40000000D+01 0.78660538D-01 0.57924381D-03
+ 0.40000000D+01 0.41000000D+01 0.42132428D-01 0.30763402D-03
+ 0.41000000D+01 0.42000000D+01 0.18462821D-01 0.18748055D-03
+ 0.42000000D+01 0.43000000D+01 0.61805216D-02 0.60609866D-04
+ 0.43000000D+01 0.44000000D+01 0.11493564D-02 0.22324531D-04
+ 0.44000000D+01 0.45000000D+01 -.92838323D-04 0.55849715D-05
+ 0.45000000D+01 0.46000000D+01 -.71073643D-04 0.32030919D-05
+ 0.46000000D+01 0.47000000D+01 -.12322779D-05 0.51933064D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12398883D-05 0.51988413D-06
+ -.46000000D+01 -.45000000D+01 -.72213803D-04 0.32024744D-05
+ -.45000000D+01 -.44000000D+01 -.92713030D-04 0.55965707D-05
+ -.44000000D+01 -.43000000D+01 0.11746229D-02 0.21791449D-04
+ -.43000000D+01 -.42000000D+01 0.64218348D-02 0.60149814D-04
+ -.42000000D+01 -.41000000D+01 0.18901417D-01 0.14610262D-03
+ -.41000000D+01 -.40000000D+01 0.43616980D-01 0.30573562D-03
+ -.40000000D+01 -.39000000D+01 0.82262011D-01 0.71705252D-03
+ -.39000000D+01 -.38000000D+01 0.13559575D+00 0.81819931D-03
+ -.38000000D+01 -.37000000D+01 0.20530386D+00 0.13229778D-02
+ -.37000000D+01 -.36000000D+01 0.29591503D+00 0.19290347D-02
+ -.36000000D+01 -.35000000D+01 0.40359972D+00 0.23183152D-02
+ -.35000000D+01 -.34000000D+01 0.52433081D+00 0.33488248D-02
+ -.34000000D+01 -.33000000D+01 0.68117108D+00 0.39796082D-02
+ -.33000000D+01 -.32000000D+01 0.85122409D+00 0.39868533D-02
+ -.32000000D+01 -.31000000D+01 0.10436548D+01 0.45522732D-02
+ -.31000000D+01 -.30000000D+01 0.12549323D+01 0.56938389D-02
+ -.30000000D+01 -.29000000D+01 0.14867787D+01 0.60616041D-02
+ -.29000000D+01 -.28000000D+01 0.17174313D+01 0.70205352D-02
+ -.28000000D+01 -.27000000D+01 0.20016659D+01 0.71166192D-02
+ -.27000000D+01 -.26000000D+01 0.22902715D+01 0.81439448D-02
+ -.26000000D+01 -.25000000D+01 0.25822460D+01 0.10028807D-01
+ -.25000000D+01 -.24000000D+01 0.28999717D+01 0.10614519D-01
+ -.24000000D+01 -.23000000D+01 0.32251567D+01 0.92993504D-02
+ -.23000000D+01 -.22000000D+01 0.35439322D+01 0.10785313D-01
+ -.22000000D+01 -.21000000D+01 0.38745184D+01 0.10115181D-01
+ -.21000000D+01 -.20000000D+01 0.42394880D+01 0.11355338D-01
+ -.20000000D+01 -.19000000D+01 0.45289301D+01 0.11546779D-01
+ -.19000000D+01 -.18000000D+01 0.48524203D+01 0.12103815D-01
+ -.18000000D+01 -.17000000D+01 0.51774591D+01 0.13129736D-01
+ -.17000000D+01 -.16000000D+01 0.54776629D+01 0.13660995D-01
+ -.16000000D+01 -.15000000D+01 0.57796128D+01 0.15291970D-01
+ -.15000000D+01 -.14000000D+01 0.60790171D+01 0.15056238D-01
+ -.14000000D+01 -.13000000D+01 0.63092372D+01 0.13298042D-01
+ -.13000000D+01 -.12000000D+01 0.66051889D+01 0.14309106D-01
+ -.12000000D+01 -.11000000D+01 0.68287324D+01 0.15994876D-01
+ -.11000000D+01 -.10000000D+01 0.70462860D+01 0.15368864D-01
+ -.10000000D+01 -.90000000D+00 0.72570214D+01 0.15886967D-01
+ -.90000000D+00 -.80000000D+00 0.74294110D+01 0.21073385D-01
+ -.80000000D+00 -.70000000D+00 0.75724852D+01 0.17931723D-01
+ -.70000000D+00 -.60000000D+00 0.76923103D+01 0.19111706D-01
+ -.60000000D+00 -.50000000D+00 0.78347130D+01 0.15476855D-01
+ -.50000000D+00 -.40000000D+00 0.79239882D+01 0.16739452D-01
+ -.40000000D+00 -.30000000D+00 0.79950866D+01 0.15501175D-01
+ -.30000000D+00 -.20000000D+00 0.80989228D+01 0.17198881D-01
+ -.20000000D+00 -.10000000D+00 0.81109246D+01 0.18094900D-01
+ -.10000000D+00 0.18041124D-15 0.81321053D+01 0.17462684D-01
+ 0.70776718D-15 0.10000000D+00 0.81373099D+01 0.17140951D-01
+ 0.10000000D+00 0.20000000D+00 0.81288154D+01 0.15390790D-01
+ 0.20000000D+00 0.30000000D+00 0.80791364D+01 0.16716701D-01
+ 0.30000000D+00 0.40000000D+00 0.80155180D+01 0.16128845D-01
+ 0.40000000D+00 0.50000000D+00 0.79377012D+01 0.20061987D-01
+ 0.50000000D+00 0.60000000D+00 0.78548199D+01 0.16139560D-01
+ 0.60000000D+00 0.70000000D+00 0.77261601D+01 0.15678864D-01
+ 0.70000000D+00 0.80000000D+00 0.75563033D+01 0.15150948D-01
+ 0.80000000D+00 0.90000000D+00 0.74341058D+01 0.15363312D-01
+ 0.90000000D+00 0.10000000D+01 0.72425243D+01 0.14865492D-01
+ 0.10000000D+01 0.11000000D+01 0.70246010D+01 0.16156099D-01
+ 0.11000000D+01 0.12000000D+01 0.68190586D+01 0.16318617D-01
+ 0.12000000D+01 0.13000000D+01 0.66017311D+01 0.15166184D-01
+ 0.13000000D+01 0.14000000D+01 0.63104425D+01 0.14032803D-01
+ 0.14000000D+01 0.15000000D+01 0.60680081D+01 0.13465053D-01
+ 0.15000000D+01 0.16000000D+01 0.57744604D+01 0.12757112D-01
+ 0.16000000D+01 0.17000000D+01 0.54999274D+01 0.15059613D-01
+ 0.17000000D+01 0.18000000D+01 0.52022259D+01 0.24785252D-01
+ 0.18000000D+01 0.19000000D+01 0.48435543D+01 0.14368909D-01
+ 0.19000000D+01 0.20000000D+01 0.45367786D+01 0.12364703D-01
+ 0.20000000D+01 0.21000000D+01 0.42323015D+01 0.11343803D-01
+ 0.21000000D+01 0.22000000D+01 0.38899418D+01 0.10959316D-01
+ 0.22000000D+01 0.23000000D+01 0.35502316D+01 0.98121353D-02
+ 0.23000000D+01 0.24000000D+01 0.32138388D+01 0.10325584D-01
+ 0.24000000D+01 0.25000000D+01 0.28907859D+01 0.95637091D-02
+ 0.25000000D+01 0.26000000D+01 0.25880502D+01 0.12098834D-01
+ 0.26000000D+01 0.27000000D+01 0.22853141D+01 0.81289031D-02
+ 0.27000000D+01 0.28000000D+01 0.20064881D+01 0.72901751D-02
+ 0.28000000D+01 0.29000000D+01 0.17291111D+01 0.67758555D-02
+ 0.29000000D+01 0.30000000D+01 0.14742925D+01 0.97618023D-02
+ 0.30000000D+01 0.31000000D+01 0.12564427D+01 0.53341590D-02
+ 0.31000000D+01 0.32000000D+01 0.10338426D+01 0.48189986D-02
+ 0.32000000D+01 0.33000000D+01 0.84291156D+00 0.49563117D-02
+ 0.33000000D+01 0.34000000D+01 0.67828269D+00 0.40492884D-02
+ 0.34000000D+01 0.35000000D+01 0.52779427D+00 0.32272049D-02
+ 0.35000000D+01 0.36000000D+01 0.40409440D+00 0.22774279D-02
+ 0.36000000D+01 0.37000000D+01 0.29499690D+00 0.19587204D-02
+ 0.37000000D+01 0.38000000D+01 0.20665258D+00 0.14078422D-02
+ 0.38000000D+01 0.39000000D+01 0.13615712D+00 0.82600356D-03
+ 0.39000000D+01 0.40000000D+01 0.82032662D-01 0.57985277D-03
+ 0.40000000D+01 0.41000000D+01 0.43729539D-01 0.30776585D-03
+ 0.41000000D+01 0.42000000D+01 0.19081615D-01 0.18755812D-03
+ 0.42000000D+01 0.43000000D+01 0.63582805D-02 0.60641277D-04
+ 0.43000000D+01 0.44000000D+01 0.11776435D-02 0.22328140D-04
+ 0.44000000D+01 0.45000000D+01 -.93816469D-04 0.55852336D-05
+ 0.45000000D+01 0.46000000D+01 -.71744241D-04 0.32031334D-05
+ 0.46000000D+01 0.47000000D+01 -.12357732D-05 0.51933078D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12417939D-05 0.51988419D-06
+ -.46000000D+01 -.45000000D+01 -.72604160D-04 0.32024944D-05
+ -.45000000D+01 -.44000000D+01 -.93362689D-04 0.55968237D-05
+ -.44000000D+01 -.43000000D+01 0.11917335D-02 0.21793204D-04
+ -.43000000D+01 -.42000000D+01 0.65335964D-02 0.60165966D-04
+ -.42000000D+01 -.41000000D+01 0.19300477D-01 0.14615075D-03
+ -.41000000D+01 -.40000000D+01 0.44673665D-01 0.30585217D-03
+ -.40000000D+01 -.39000000D+01 0.84544976D-01 0.71785897D-03
+ -.39000000D+01 -.38000000D+01 0.13984861D+00 0.82018309D-03
+ -.38000000D+01 -.37000000D+01 0.21251679D+00 0.13249812D-02
+ -.37000000D+01 -.36000000D+01 0.30706270D+00 0.19300690D-02
+ -.36000000D+01 -.35000000D+01 0.41998230D+00 0.23221732D-02
+ -.35000000D+01 -.34000000D+01 0.54715288D+00 0.33525398D-02
+ -.34000000D+01 -.33000000D+01 0.71187973D+00 0.39824200D-02
+ -.33000000D+01 -.32000000D+01 0.89125877D+00 0.39911194D-02
+ -.32000000D+01 -.31000000D+01 0.10945206D+01 0.45569672D-02
+ -.31000000D+01 -.30000000D+01 0.13182727D+01 0.56988640D-02
+ -.30000000D+01 -.29000000D+01 0.15639030D+01 0.60652411D-02
+ -.29000000D+01 -.28000000D+01 0.18098095D+01 0.70259810D-02
+ -.28000000D+01 -.27000000D+01 0.21109148D+01 0.71237323D-02
+ -.27000000D+01 -.26000000D+01 0.24172758D+01 0.81711532D-02
+ -.26000000D+01 -.25000000D+01 0.27288893D+01 0.10049411D-01
+ -.25000000D+01 -.24000000D+01 0.30667702D+01 0.10624973D-01
+ -.24000000D+01 -.23000000D+01 0.34131662D+01 0.93074773D-02
+ -.23000000D+01 -.22000000D+01 0.37540860D+01 0.10798786D-01
+ -.22000000D+01 -.21000000D+01 0.41073394D+01 0.10129517D-01
+ -.21000000D+01 -.20000000D+01 0.44954276D+01 0.11369741D-01
+ -.20000000D+01 -.19000000D+01 0.48082220D+01 0.11570926D-01
+ -.19000000D+01 -.18000000D+01 0.51551239D+01 0.12123184D-01
+ -.18000000D+01 -.17000000D+01 0.55032399D+01 0.13175036D-01
+ -.17000000D+01 -.16000000D+01 0.58262473D+01 0.13716201D-01
+ -.16000000D+01 -.15000000D+01 0.61505060D+01 0.15300516D-01
+ -.15000000D+01 -.14000000D+01 0.64716632D+01 0.15073831D-01
+ -.14000000D+01 -.13000000D+01 0.67218966D+01 0.13311520D-01
+ -.13000000D+01 -.12000000D+01 0.70378445D+01 0.14335303D-01
+ -.12000000D+01 -.11000000D+01 0.72804257D+01 0.16042751D-01
+ -.11000000D+01 -.10000000D+01 0.75149213D+01 0.15408352D-01
+ -.10000000D+01 -.90000000D+00 0.77415821D+01 0.15950251D-01
+ -.90000000D+00 -.80000000D+00 0.79290208D+01 0.21115335D-01
+ -.80000000D+00 -.70000000D+00 0.80852430D+01 0.17940276D-01
+ -.70000000D+00 -.60000000D+00 0.82167149D+01 0.19123236D-01
+ -.60000000D+00 -.50000000D+00 0.83688166D+01 0.15561178D-01
+ -.50000000D+00 -.40000000D+00 0.84677615D+01 0.16843959D-01
+ -.40000000D+00 -.30000000D+00 0.85436648D+01 0.15695251D-01
+ -.30000000D+00 -.20000000D+00 0.86546387D+01 0.17348710D-01
+ -.20000000D+00 -.10000000D+00 0.86683342D+01 0.18177134D-01
+ -.10000000D+00 0.18041124D-15 0.86927634D+01 0.17550149D-01
+ 0.70776718D-15 0.10000000D+00 0.86974711D+01 0.17169637D-01
+ 0.10000000D+00 0.20000000D+00 0.86872067D+01 0.15425386D-01
+ 0.20000000D+00 0.30000000D+00 0.86340428D+01 0.16737942D-01
+ 0.30000000D+00 0.40000000D+00 0.85651693D+01 0.16153541D-01
+ 0.40000000D+00 0.50000000D+00 0.84807833D+01 0.20066719D-01
+ 0.50000000D+00 0.60000000D+00 0.83891147D+01 0.16163057D-01
+ 0.60000000D+00 0.70000000D+00 0.82511610D+01 0.15706383D-01
+ 0.70000000D+00 0.80000000D+00 0.80687991D+01 0.15168555D-01
+ 0.80000000D+00 0.90000000D+00 0.79336242D+01 0.15382572D-01
+ 0.90000000D+00 0.10000000D+01 0.77274822D+01 0.14882563D-01
+ 0.10000000D+01 0.11000000D+01 0.74933626D+01 0.16171506D-01
+ 0.11000000D+01 0.12000000D+01 0.72701882D+01 0.16334234D-01
+ 0.12000000D+01 0.13000000D+01 0.70346191D+01 0.15181498D-01
+ 0.13000000D+01 0.14000000D+01 0.67234797D+01 0.14049581D-01
+ 0.14000000D+01 0.15000000D+01 0.64600479D+01 0.13482248D-01
+ 0.15000000D+01 0.16000000D+01 0.61453569D+01 0.12772406D-01
+ 0.16000000D+01 0.17000000D+01 0.58486692D+01 0.15091708D-01
+ 0.17000000D+01 0.18000000D+01 0.55279019D+01 0.24802259D-01
+ 0.18000000D+01 0.19000000D+01 0.51461635D+01 0.14383382D-01
+ 0.19000000D+01 0.20000000D+01 0.48164093D+01 0.12380783D-01
+ 0.20000000D+01 0.21000000D+01 0.44886565D+01 0.11357371D-01
+ 0.21000000D+01 0.22000000D+01 0.41226977D+01 0.10979443D-01
+ 0.22000000D+01 0.23000000D+01 0.37601463D+01 0.98281653D-02
+ 0.23000000D+01 0.24000000D+01 0.34019217D+01 0.10331513D-01
+ 0.24000000D+01 0.25000000D+01 0.30578104D+01 0.95875732D-02
+ 0.25000000D+01 0.26000000D+01 0.27342896D+01 0.12114385D-01
+ 0.26000000D+01 0.27000000D+01 0.24124542D+01 0.81393308D-02
+ 0.27000000D+01 0.28000000D+01 0.21155988D+01 0.72980773D-02
+ 0.28000000D+01 0.29000000D+01 0.18216591D+01 0.67823926D-02
+ 0.29000000D+01 0.30000000D+01 0.15514412D+01 0.97695838D-02
+ 0.30000000D+01 0.31000000D+01 0.13196868D+01 0.53478872D-02
+ 0.31000000D+01 0.32000000D+01 0.10847859D+01 0.48243445D-02
+ 0.32000000D+01 0.33000000D+01 0.88293320D+00 0.49605455D-02
+ 0.33000000D+01 0.34000000D+01 0.70900788D+00 0.40525967D-02
+ 0.34000000D+01 0.35000000D+01 0.55064387D+00 0.32298869D-02
+ 0.35000000D+01 0.36000000D+01 0.42045434D+00 0.22787410D-02
+ 0.36000000D+01 0.37000000D+01 0.30618798D+00 0.19612729D-02
+ 0.37000000D+01 0.38000000D+01 0.21382693D+00 0.14105261D-02
+ 0.38000000D+01 0.39000000D+01 0.14042369D+00 0.82671098D-03
+ 0.39000000D+01 0.40000000D+01 0.84307016D-01 0.58028774D-03
+ 0.40000000D+01 0.41000000D+01 0.44784764D-01 0.30783580D-03
+ 0.41000000D+01 0.42000000D+01 0.19480753D-01 0.18760767D-03
+ 0.42000000D+01 0.43000000D+01 0.64700349D-02 0.60663547D-04
+ 0.43000000D+01 0.44000000D+01 0.11947662D-02 0.22330148D-04
+ 0.44000000D+01 0.45000000D+01 -.94459215D-04 0.55853893D-05
+ 0.45000000D+01 0.46000000D+01 -.72132610D-04 0.32031564D-05
+ 0.46000000D+01 0.47000000D+01 -.12376854D-05 0.51933085D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.12427050D-05 0.51988422D-06
+ -.46000000D+01 -.45000000D+01 -.72797448D-04 0.32025041D-05
+ -.45000000D+01 -.44000000D+01 -.93712331D-04 0.55969580D-05
+ -.44000000D+01 -.43000000D+01 0.12004736D-02 0.21794053D-04
+ -.43000000D+01 -.42000000D+01 0.65923367D-02 0.60174095D-04
+ -.42000000D+01 -.41000000D+01 0.19514836D-01 0.14617441D-03
+ -.41000000D+01 -.40000000D+01 0.45252895D-01 0.30591251D-03
+ -.40000000D+01 -.39000000D+01 0.85819168D-01 0.71826903D-03
+ -.39000000D+01 -.38000000D+01 0.14226475D+00 0.82146039D-03
+ -.38000000D+01 -.37000000D+01 0.21669161D+00 0.13263259D-02
+ -.37000000D+01 -.36000000D+01 0.31361523D+00 0.19306928D-02
+ -.36000000D+01 -.35000000D+01 0.42974872D+00 0.23245790D-02
+ -.35000000D+01 -.34000000D+01 0.56094736D+00 0.33548018D-02
+ -.34000000D+01 -.33000000D+01 0.73066607D+00 0.39841868D-02
+ -.33000000D+01 -.32000000D+01 0.91601858D+00 0.39937874D-02
+ -.32000000D+01 -.31000000D+01 0.11262839D+01 0.45603870D-02
+ -.31000000D+01 -.30000000D+01 0.13582400D+01 0.57024323D-02
+ -.30000000D+01 -.29000000D+01 0.16129380D+01 0.60674564D-02
+ -.29000000D+01 -.28000000D+01 0.18689834D+01 0.70290380D-02
+ -.28000000D+01 -.27000000D+01 0.21813846D+01 0.71282686D-02
+ -.27000000D+01 -.26000000D+01 0.24997519D+01 0.81934313D-02
+ -.26000000D+01 -.25000000D+01 0.28246835D+01 0.10066577D-01
+ -.25000000D+01 -.24000000D+01 0.31763445D+01 0.10632405D-01
+ -.24000000D+01 -.23000000D+01 0.35372903D+01 0.93134981D-02
+ -.23000000D+01 -.22000000D+01 0.38935230D+01 0.10807003D-01
+ -.22000000D+01 -.21000000D+01 0.42624780D+01 0.10139139D-01
+ -.21000000D+01 -.20000000D+01 0.46666890D+01 0.11379231D-01
+ -.20000000D+01 -.19000000D+01 0.49957683D+01 0.11598591D-01
+ -.19000000D+01 -.18000000D+01 0.53592579D+01 0.12145671D-01
+ -.18000000D+01 -.17000000D+01 0.57236707D+01 0.13203963D-01
+ -.17000000D+01 -.16000000D+01 0.60628119D+01 0.13752172D-01
+ -.16000000D+01 -.15000000D+01 0.64030282D+01 0.15305591D-01
+ -.15000000D+01 -.14000000D+01 0.67396366D+01 0.15087169D-01
+ -.14000000D+01 -.13000000D+01 0.70043460D+01 0.13322773D-01
+ -.13000000D+01 -.12000000D+01 0.73346050D+01 0.14353997D-01
+ -.12000000D+01 -.11000000D+01 0.75909731D+01 0.16080241D-01
+ -.11000000D+01 -.10000000D+01 0.78376643D+01 0.15439738D-01
+ -.10000000D+01 -.90000000D+00 0.80758253D+01 0.16016503D-01
+ -.90000000D+00 -.80000000D+00 0.82744419D+01 0.21159374D-01
+ -.80000000D+00 -.70000000D+00 0.84402281D+01 0.17946283D-01
+ -.70000000D+00 -.60000000D+00 0.85800899D+01 0.19130804D-01
+ -.60000000D+00 -.50000000D+00 0.87393815D+01 0.15611140D-01
+ -.50000000D+00 -.40000000D+00 0.88453611D+01 0.16915742D-01
+ -.40000000D+00 -.30000000D+00 0.89248210D+01 0.15822962D-01
+ -.30000000D+00 -.20000000D+00 0.90408808D+01 0.17438905D-01
+ -.20000000D+00 -.10000000D+00 0.90557554D+01 0.18278543D-01
+ -.10000000D+00 0.18041124D-15 0.90828897D+01 0.17658158D-01
+ 0.70776718D-15 0.10000000D+00 0.90871095D+01 0.17195433D-01
+ 0.10000000D+00 0.20000000D+00 0.90754761D+01 0.15454173D-01
+ 0.20000000D+00 0.30000000D+00 0.90197768D+01 0.16754433D-01
+ 0.30000000D+00 0.40000000D+00 0.89471104D+01 0.16174090D-01
+ 0.40000000D+00 0.50000000D+00 0.88578487D+01 0.20072058D-01
+ 0.50000000D+00 0.60000000D+00 0.87597494D+01 0.16179012D-01
+ 0.60000000D+00 0.70000000D+00 0.86150137D+01 0.15725559D-01
+ 0.70000000D+00 0.80000000D+00 0.84234846D+01 0.15181435D-01
+ 0.80000000D+00 0.90000000D+00 0.82789060D+01 0.15396248D-01
+ 0.90000000D+00 0.10000000D+01 0.80621138D+01 0.14894596D-01
+ 0.10000000D+01 0.11000000D+01 0.78161890D+01 0.16182570D-01
+ 0.11000000D+01 0.12000000D+01 0.75803543D+01 0.16344537D-01
+ 0.12000000D+01 0.13000000D+01 0.73315581D+01 0.15192541D-01
+ 0.13000000D+01 0.14000000D+01 0.70062034D+01 0.14062946D-01
+ 0.14000000D+01 0.15000000D+01 0.67276182D+01 0.13496706D-01
+ 0.15000000D+01 0.16000000D+01 0.63979185D+01 0.12782842D-01
+ 0.16000000D+01 0.17000000D+01 0.60853420D+01 0.15112581D-01
+ 0.17000000D+01 0.18000000D+01 0.57482590D+01 0.24813115D-01
+ 0.18000000D+01 0.19000000D+01 0.53501333D+01 0.14393169D-01
+ 0.19000000D+01 0.20000000D+01 0.50042466D+01 0.12391805D-01
+ 0.20000000D+01 0.21000000D+01 0.46601693D+01 0.11366523D-01
+ 0.21000000D+01 0.22000000D+01 0.42778183D+01 0.10995369D-01
+ 0.22000000D+01 0.23000000D+01 0.38993761D+01 0.98406897D-02
+ 0.23000000D+01 0.24000000D+01 0.35261467D+01 0.10334704D-01
+ 0.24000000D+01 0.25000000D+01 0.31675422D+01 0.96052865D-02
+ 0.25000000D+01 0.26000000D+01 0.28298190D+01 0.12126273D-01
+ 0.26000000D+01 0.27000000D+01 0.24950226D+01 0.81464072D-02
+ 0.27000000D+01 0.28000000D+01 0.21860075D+01 0.73033510D-02
+ 0.28000000D+01 0.29000000D+01 0.18809523D+01 0.67870604D-02
+ 0.29000000D+01 0.30000000D+01 0.16004859D+01 0.97755651D-02
+ 0.30000000D+01 0.31000000D+01 0.13595564D+01 0.53578876D-02
+ 0.31000000D+01 0.32000000D+01 0.11166033D+01 0.48279095D-02
+ 0.32000000D+01 0.33000000D+01 0.90768378D+00 0.49632855D-02
+ 0.33000000D+01 0.34000000D+01 0.72781244D+00 0.40546671D-02
+ 0.34000000D+01 0.35000000D+01 0.56445063D+00 0.32314644D-02
+ 0.35000000D+01 0.36000000D+01 0.43020961D+00 0.22794600D-02
+ 0.36000000D+01 0.37000000D+01 0.31276395D+00 0.19626775D-02
+ 0.37000000D+01 0.38000000D+01 0.21797804D+00 0.14119328D-02
+ 0.38000000D+01 0.39000000D+01 0.14284922D+00 0.82709569D-03
+ 0.39000000D+01 0.40000000D+01 0.85576462D-01 0.58054753D-03
+ 0.40000000D+01 0.41000000D+01 0.45363139D-01 0.30786875D-03
+ 0.41000000D+01 0.42000000D+01 0.19695112D-01 0.18763411D-03
+ 0.42000000D+01 0.43000000D+01 0.65288108D-02 0.60676951D-04
+ 0.43000000D+01 0.44000000D+01 0.12035103D-02 0.22331119D-04
+ 0.44000000D+01 0.45000000D+01 -.94805113D-04 0.55854678D-05
+ 0.45000000D+01 0.46000000D+01 -.72324941D-04 0.32031675D-05
+ 0.46000000D+01 0.47000000D+01 -.12385997D-05 0.51933089D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 -.26613089D+01 0.38675195D-02
+ 0.30000000D+01 0.60000000D+01 0.19375624D+01 0.19868801D-02
+ 0.60000000D+01 0.90000000D+01 0.20606035D+01 0.14254146D-02
+ 0.90000000D+01 0.12000000D+02 0.16318618D+01 0.11616642D-02
+ 0.12000000D+02 0.15000000D+02 0.12888478D+01 0.10718350D-02
+ 0.15000000D+02 0.18000000D+02 0.10414716D+01 0.99568467D-03
+ 0.18000000D+02 0.21000000D+02 0.85874127D+00 0.90138159D-03
+ 0.21000000D+02 0.24000000D+02 0.72283671D+00 0.88585352D-03
+ 0.24000000D+02 0.27000000D+02 0.61553995D+00 0.87349403D-03
+ 0.27000000D+02 0.30000000D+02 0.53255779D+00 0.81449077D-03
+ 0.30000000D+02 0.33000000D+02 0.46213235D+00 0.65048812D-03
+ 0.33000000D+02 0.36000000D+02 0.41022916D+00 0.75422326D-03
+ 0.36000000D+02 0.39000000D+02 0.36078532D+00 0.68516996D-03
+ 0.39000000D+02 0.42000000D+02 0.32317374D+00 0.63028068D-03
+ 0.42000000D+02 0.45000000D+02 0.29003489D+00 0.64697501D-03
+ 0.45000000D+02 0.48000000D+02 0.26093256D+00 0.54993113D-03
+ 0.48000000D+02 0.51000000D+02 0.23552027D+00 0.49878788D-03
+ 0.51000000D+02 0.54000000D+02 0.21412770D+00 0.42318147D-03
+ 0.54000000D+02 0.57000000D+02 0.19571376D+00 0.46422358D-03
+ 0.57000000D+02 0.60000000D+02 0.17897602D+00 0.49140524D-03
+ 0.60000000D+02 0.63000000D+02 0.16269282D+00 0.48671828D-03
+ 0.63000000D+02 0.66000000D+02 0.15008809D+00 0.53158423D-03
+ 0.66000000D+02 0.69000000D+02 0.13787404D+00 0.48938167D-03
+ 0.69000000D+02 0.72000000D+02 0.12783480D+00 0.32187924D-03
+ 0.72000000D+02 0.75000000D+02 0.11646526D+00 0.63256847D-03
+ 0.75000000D+02 0.78000000D+02 0.10875903D+00 0.67251481D-03
+ 0.78000000D+02 0.81000000D+02 0.10133494D+00 0.35214519D-03
+ 0.81000000D+02 0.84000000D+02 0.93363031D-01 0.38434814D-03
+ 0.84000000D+02 0.87000000D+02 0.86762292D-01 0.37939177D-03
+ 0.87000000D+02 0.90000000D+02 0.80331344D-01 0.23135142D-03
+ 0.90000000D+02 0.93000000D+02 0.75221288D-01 0.23695307D-03
+ 0.93000000D+02 0.96000000D+02 0.69783402D-01 0.24792184D-03
+ 0.96000000D+02 0.99000000D+02 0.65301704D-01 0.24346594D-03
+ 0.99000000D+02 0.10200000D+03 0.61250456D-01 0.32845621D-03
+ 0.10200000D+03 0.10500000D+03 0.56910683D-01 0.33145725D-03
+ 0.10500000D+03 0.10800000D+03 0.53467858D-01 0.22904543D-03
+ 0.10800000D+03 0.11100000D+03 0.49881606D-01 0.19914573D-03
+ 0.11100000D+03 0.11400000D+03 0.47017009D-01 0.23310084D-03
+ 0.11400000D+03 0.11700000D+03 0.43997669D-01 0.25070056D-03
+ 0.11700000D+03 0.12000000D+03 0.41633626D-01 0.24193928D-03
+ 0.12000000D+03 0.12300000D+03 0.38555087D-01 0.26543135D-03
+ 0.12300000D+03 0.12600000D+03 0.36470285D-01 0.24355687D-03
+ 0.12600000D+03 0.12900000D+03 0.34425163D-01 0.19289944D-03
+ 0.12900000D+03 0.13200000D+03 0.32476845D-01 0.18863498D-03
+ 0.13200000D+03 0.13500000D+03 0.30258313D-01 0.16631616D-03
+ 0.13500000D+03 0.13800000D+03 0.28948141D-01 0.13130487D-03
+ 0.13800000D+03 0.14100000D+03 0.27465612D-01 0.16070077D-03
+ 0.14100000D+03 0.14400000D+03 0.25355350D-01 0.21555988D-03
+ 0.14400000D+03 0.14700000D+03 0.24225049D-01 0.19276302D-03
+ 0.14700000D+03 0.15000000D+03 0.23048202D-01 0.25636721D-03
+ 0.15000000D+03 0.15300000D+03 0.21888802D-01 0.25332772D-03
+ 0.15300000D+03 0.15600000D+03 0.20611182D-01 0.13815556D-03
+ 0.15600000D+03 0.15900000D+03 0.19465216D-01 0.15733963D-03
+ 0.15900000D+03 0.16200000D+03 0.18783223D-01 0.19474041D-03
+ 0.16200000D+03 0.16500000D+03 0.17178175D-01 0.17057271D-03
+ 0.16500000D+03 0.16800000D+03 0.16690349D-01 0.14697528D-03
+ 0.16800000D+03 0.17100000D+03 0.15529335D-01 0.15331822D-03
+ 0.17100000D+03 0.17400000D+03 0.14925524D-01 0.18502601D-03
+ 0.17400000D+03 0.17700000D+03 0.14110996D-01 0.18474470D-03
+ 0.17700000D+03 0.18000000D+03 0.13477083D-01 0.85427997D-04
+ 0.18000000D+03 0.18300000D+03 0.12816802D-01 0.66968801D-04
+ 0.18300000D+03 0.18600000D+03 0.12055805D-01 0.70081646D-04
+ 0.18600000D+03 0.18900000D+03 0.11520150D-01 0.83631670D-04
+ 0.18900000D+03 0.19200000D+03 0.10841632D-01 0.93860299D-04
+ 0.19200000D+03 0.19500000D+03 0.10375820D-01 0.12015986D-03
+ 0.19500000D+03 0.19800000D+03 0.10066235D-01 0.13503184D-03
+ 0.19800000D+03 0.20100000D+03 0.93948300D-02 0.13332470D-03
+ 0.20100000D+03 0.20400000D+03 0.88176492D-02 0.11271329D-03
+ 0.20400000D+03 0.20700000D+03 0.85760123D-02 0.74140184D-04
+ 0.20700000D+03 0.21000000D+03 0.79905787D-02 0.78365193D-04
+ 0.21000000D+03 0.21300000D+03 0.77715248D-02 0.81145658D-04
+ 0.21300000D+03 0.21600000D+03 0.74172895D-02 0.71287330D-04
+ 0.21600000D+03 0.21900000D+03 0.70043575D-02 0.57487722D-04
+ 0.21900000D+03 0.22200000D+03 0.66640495D-02 0.62144623D-04
+ 0.22200000D+03 0.22500000D+03 0.62860085D-02 0.85630480D-04
+ 0.22500000D+03 0.22800000D+03 0.62022851D-02 0.80228117D-04
+ 0.22800000D+03 0.23100000D+03 0.60268088D-02 0.19742963D-03
+ 0.23100000D+03 0.23400000D+03 0.52801401D-02 0.19945040D-03
+ 0.23400000D+03 0.23700000D+03 0.51869664D-02 0.88554118D-04
+ 0.23700000D+03 0.24000000D+03 0.50788689D-02 0.93626041D-04
+ 0.24000000D+03 0.24300000D+03 0.47412551D-02 0.85576845D-04
+ 0.24300000D+03 0.24600000D+03 0.48385688D-02 0.21329851D-03
+ 0.24600000D+03 0.24900000D+03 0.42164977D-02 0.20977269D-03
+ 0.24900000D+03 0.25200000D+03 0.42050189D-02 0.62321460D-04
+ 0.25200000D+03 0.25500000D+03 0.38862522D-02 0.60780037D-04
+ 0.25500000D+03 0.25800000D+03 0.38957694D-02 0.55610395D-04
+ 0.25800000D+03 0.26100000D+03 0.37304291D-02 0.55455260D-04
+ 0.26100000D+03 0.26400000D+03 0.33611391D-02 0.55932874D-04
+ 0.26400000D+03 0.26700000D+03 0.33770130D-02 0.50048793D-04
+ 0.26700000D+03 0.27000000D+03 0.31595347D-02 0.55378075D-04
+ 0.27000000D+03 0.27300000D+03 0.30620864D-02 0.48367707D-04
+ 0.27300000D+03 0.27600000D+03 0.29642377D-02 0.54330373D-04
+ 0.27600000D+03 0.27900000D+03 0.27086671D-02 0.62344534D-04
+ 0.27900000D+03 0.28200000D+03 0.27517394D-02 0.62788981D-04
+ 0.28200000D+03 0.28500000D+03 0.25109648D-02 0.56102035D-04
+ 0.28500000D+03 0.28800000D+03 0.25118798D-02 0.45399560D-04
+ 0.28800000D+03 0.29100000D+03 0.23549574D-02 0.64002237D-04
+ 0.29100000D+03 0.29400000D+03 0.21832301D-02 0.62087496D-04
+ 0.29400000D+03 0.29700000D+03 0.20969927D-02 0.54437876D-04
+ 0.29700000D+03 0.30000000D+03 0.21075334D-02 0.53450981D-04
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 -.26602794D+01 0.38669714D-02
+ 0.30000000D+01 0.60000000D+01 0.19347778D+01 0.19845947D-02
+ 0.60000000D+01 0.90000000D+01 0.20532197D+01 0.14204795D-02
+ 0.90000000D+01 0.12000000D+02 0.16204814D+01 0.11539041D-02
+ 0.12000000D+02 0.15000000D+02 0.12740460D+01 0.10590062D-02
+ 0.15000000D+02 0.18000000D+02 0.10236925D+01 0.97940325D-03
+ 0.18000000D+02 0.21000000D+02 0.83839430D+00 0.87940364D-03
+ 0.21000000D+02 0.24000000D+02 0.70020349D+00 0.85856746D-03
+ 0.24000000D+02 0.27000000D+02 0.59099194D+00 0.83779879D-03
+ 0.27000000D+02 0.30000000D+02 0.50627836D+00 0.77564657D-03
+ 0.30000000D+02 0.33000000D+02 0.43457501D+00 0.61152742D-03
+ 0.33000000D+02 0.36000000D+02 0.38122515D+00 0.69970221D-03
+ 0.36000000D+02 0.39000000D+02 0.33102265D+00 0.63075718D-03
+ 0.39000000D+02 0.42000000D+02 0.29250003D+00 0.56851071D-03
+ 0.42000000D+02 0.45000000D+02 0.25872701D+00 0.57866248D-03
+ 0.45000000D+02 0.48000000D+02 0.22923144D+00 0.48246768D-03
+ 0.48000000D+02 0.51000000D+02 0.20361222D+00 0.43257000D-03
+ 0.51000000D+02 0.54000000D+02 0.18204648D+00 0.35937480D-03
+ 0.54000000D+02 0.57000000D+02 0.16350619D+00 0.38748743D-03
+ 0.57000000D+02 0.60000000D+02 0.14683265D+00 0.40283498D-03
+ 0.60000000D+02 0.63000000D+02 0.13099862D+00 0.39225376D-03
+ 0.63000000D+02 0.66000000D+02 0.11854497D+00 0.41889624D-03
+ 0.66000000D+02 0.69000000D+02 0.10676415D+00 0.38059843D-03
+ 0.69000000D+02 0.72000000D+02 0.96997576D-01 0.24476099D-03
+ 0.72000000D+02 0.75000000D+02 0.86557273D-01 0.46619647D-03
+ 0.75000000D+02 0.78000000D+02 0.79145435D-01 0.49230743D-03
+ 0.78000000D+02 0.81000000D+02 0.72162933D-01 0.25204419D-03
+ 0.81000000D+02 0.84000000D+02 0.65040554D-01 0.26613475D-03
+ 0.84000000D+02 0.87000000D+02 0.59114682D-01 0.26017253D-03
+ 0.87000000D+02 0.90000000D+02 0.53515316D-01 0.15420021D-03
+ 0.90000000D+02 0.93000000D+02 0.48984217D-01 0.15415334D-03
+ 0.93000000D+02 0.96000000D+02 0.44410942D-01 0.15773744D-03
+ 0.96000000D+02 0.99000000D+02 0.40607593D-01 0.15145455D-03
+ 0.99000000D+02 0.10200000D+03 0.37206757D-01 0.19842496D-03
+ 0.10200000D+03 0.10500000D+03 0.33766830D-01 0.19768315D-03
+ 0.10500000D+03 0.10800000D+03 0.30983907D-01 0.13297305D-03
+ 0.10800000D+03 0.11100000D+03 0.28227960D-01 0.11283012D-03
+ 0.11100000D+03 0.11400000D+03 0.25980337D-01 0.12823511D-03
+ 0.11400000D+03 0.11700000D+03 0.23736579D-01 0.13557201D-03
+ 0.11700000D+03 0.12000000D+03 0.21928149D-01 0.12724175D-03
+ 0.12000000D+03 0.12300000D+03 0.19825604D-01 0.13639204D-03
+ 0.12300000D+03 0.12600000D+03 0.18312225D-01 0.12271251D-03
+ 0.12600000D+03 0.12900000D+03 0.16874556D-01 0.94683502D-04
+ 0.12900000D+03 0.13200000D+03 0.15541613D-01 0.90173466D-04
+ 0.13200000D+03 0.13500000D+03 0.14137380D-01 0.78059666D-04
+ 0.13500000D+03 0.13800000D+03 0.13206647D-01 0.59883146D-04
+ 0.13800000D+03 0.14100000D+03 0.12233569D-01 0.71295831D-04
+ 0.14100000D+03 0.14400000D+03 0.11027830D-01 0.93471122D-04
+ 0.14400000D+03 0.14700000D+03 0.10290671D-01 0.82401053D-04
+ 0.14700000D+03 0.15000000D+03 0.95614945D-02 0.10539206D-03
+ 0.15000000D+03 0.15300000D+03 0.88674046D-02 0.10358528D-03
+ 0.15300000D+03 0.15600000D+03 0.81552264D-02 0.54451966D-04
+ 0.15600000D+03 0.15900000D+03 0.75231919D-02 0.60828080D-04
+ 0.15900000D+03 0.16200000D+03 0.70914200D-02 0.73216616D-04
+ 0.16200000D+03 0.16500000D+03 0.63362140D-02 0.63481873D-04
+ 0.16500000D+03 0.16800000D+03 0.60163864D-02 0.52557083D-04
+ 0.16800000D+03 0.17100000D+03 0.54712524D-02 0.54364425D-04
+ 0.17100000D+03 0.17400000D+03 0.51401332D-02 0.63199923D-04
+ 0.17400000D+03 0.17700000D+03 0.47501387D-02 0.62672672D-04
+ 0.17700000D+03 0.18000000D+03 0.44353752D-02 0.28239376D-04
+ 0.18000000D+03 0.18300000D+03 0.41235303D-02 0.21535192D-04
+ 0.18300000D+03 0.18600000D+03 0.37929494D-02 0.22043304D-04
+ 0.18600000D+03 0.18900000D+03 0.35450833D-02 0.25661775D-04
+ 0.18900000D+03 0.19200000D+03 0.32636359D-02 0.28263850D-04
+ 0.19200000D+03 0.19500000D+03 0.30557400D-02 0.35224022D-04
+ 0.19500000D+03 0.19800000D+03 0.29002105D-02 0.38959649D-04
+ 0.19800000D+03 0.20100000D+03 0.26483814D-02 0.37541182D-04
+ 0.20100000D+03 0.20400000D+03 0.24331041D-02 0.31290581D-04
+ 0.20400000D+03 0.20700000D+03 0.23164917D-02 0.20027270D-04
+ 0.20700000D+03 0.21000000D+03 0.21131494D-02 0.20695950D-04
+ 0.21000000D+03 0.21300000D+03 0.20123672D-02 0.21019962D-04
+ 0.21300000D+03 0.21600000D+03 0.18806910D-02 0.18122467D-04
+ 0.21600000D+03 0.21900000D+03 0.17392499D-02 0.14299845D-04
+ 0.21900000D+03 0.22200000D+03 0.16209021D-02 0.15069583D-04
+ 0.22200000D+03 0.22500000D+03 0.14981415D-02 0.20337787D-04
+ 0.22500000D+03 0.22800000D+03 0.14483048D-02 0.18823873D-04
+ 0.22800000D+03 0.23100000D+03 0.13783513D-02 0.44764510D-04
+ 0.23100000D+03 0.23400000D+03 0.11835477D-02 0.45125664D-04
+ 0.23400000D+03 0.23700000D+03 0.11403677D-02 0.19380471D-04
+ 0.23700000D+03 0.24000000D+03 0.10946989D-02 0.20236969D-04
+ 0.24000000D+03 0.24300000D+03 0.10021140D-02 0.18061164D-04
+ 0.24300000D+03 0.24600000D+03 0.10024737D-02 0.43864647D-04
+ 0.24600000D+03 0.24900000D+03 0.85655853D-03 0.42991755D-04
+ 0.24900000D+03 0.25200000D+03 0.83820866D-03 0.12465076D-04
+ 0.25200000D+03 0.25500000D+03 0.76030622D-03 0.11851318D-04
+ 0.25500000D+03 0.25800000D+03 0.74779359D-03 0.10730834D-04
+ 0.25800000D+03 0.26100000D+03 0.70244742D-03 0.10388653D-04
+ 0.26100000D+03 0.26400000D+03 0.62119890D-03 0.10391617D-04
+ 0.26400000D+03 0.26700000D+03 0.61273961D-03 0.90436402D-05
+ 0.26700000D+03 0.27000000D+03 0.56283771D-03 0.98815211D-05
+ 0.27000000D+03 0.27300000D+03 0.53563795D-03 0.84681290D-05
+ 0.27300000D+03 0.27600000D+03 0.50914509D-03 0.93084419D-05
+ 0.27600000D+03 0.27900000D+03 0.45696559D-03 0.10515816D-04
+ 0.27900000D+03 0.28200000D+03 0.45598900D-03 0.10403478D-04
+ 0.28200000D+03 0.28500000D+03 0.40872051D-03 0.91516792D-05
+ 0.28500000D+03 0.28800000D+03 0.40165425D-03 0.72684631D-05
+ 0.28800000D+03 0.29100000D+03 0.36999906D-03 0.10008237D-04
+ 0.29100000D+03 0.29400000D+03 0.33716552D-03 0.96437361D-05
+ 0.29400000D+03 0.29700000D+03 0.31845964D-03 0.82242700D-05
+ 0.29700000D+03 0.30000000D+03 0.31460906D-03 0.80147259D-05
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.14441105D+01 0.58285299D-03
+ 0.12500000D+03 0.13000000D+03 -.68250963D+01 0.25753246D-02
+ 0.13000000D+03 0.13500000D+03 0.35018275D+01 0.18515204D-02
+ 0.13500000D+03 0.14000000D+03 0.20662937D+01 0.16062213D-02
+ 0.14000000D+03 0.14500000D+03 0.13655226D+01 0.13498708D-02
+ 0.14500000D+03 0.15000000D+03 0.97723481D+00 0.10668652D-02
+ 0.15000000D+03 0.15500000D+03 0.73866821D+00 0.94665591D-03
+ 0.15500000D+03 0.16000000D+03 0.57957862D+00 0.94860388D-03
+ 0.16000000D+03 0.16500000D+03 0.46834729D+00 0.90585630D-03
+ 0.16500000D+03 0.17000000D+03 0.38683151D+00 0.80970840D-03
+ 0.17000000D+03 0.17500000D+03 0.32429870D+00 0.77363983D-03
+ 0.17500000D+03 0.18000000D+03 0.27809771D+00 0.61715883D-03
+ 0.18000000D+03 0.18500000D+03 0.23824270D+00 0.59217474D-03
+ 0.18500000D+03 0.19000000D+03 0.20875100D+00 0.54949547D-03
+ 0.19000000D+03 0.19500000D+03 0.18282839D+00 0.49618594D-03
+ 0.19500000D+03 0.20000000D+03 0.16136774D+00 0.50474764D-03
+ 0.20000000D+03 0.20500000D+03 0.14390779D+00 0.48377506D-03
+ 0.20500000D+03 0.21000000D+03 0.12923320D+00 0.43731605D-03
+ 0.21000000D+03 0.21500000D+03 0.11633889D+00 0.38171902D-03
+ 0.21500000D+03 0.22000000D+03 0.10466463D+00 0.33996341D-03
+ 0.22000000D+03 0.22500000D+03 0.94887619D-01 0.47193116D-03
+ 0.22500000D+03 0.23000000D+03 0.86765872D-01 0.45352787D-03
+ 0.23000000D+03 0.23500000D+03 0.78747103D-01 0.62457119D-03
+ 0.23500000D+03 0.24000000D+03 0.72665066D-01 0.62056398D-03
+ 0.24000000D+03 0.24500000D+03 0.66070598D-01 0.83285046D-03
+ 0.24500000D+03 0.25000000D+03 0.61732182D-01 0.82637840D-03
+ 0.25000000D+03 0.25500000D+03 0.56175695D-01 0.38947489D-03
+ 0.25500000D+03 0.26000000D+03 0.52974970D-01 0.38567811D-03
+ 0.26000000D+03 0.26500000D+03 0.48380385D-01 0.27200938D-03
+ 0.26500000D+03 0.27000000D+03 0.45018673D-01 0.27869985D-03
+ 0.27000000D+03 0.27500000D+03 0.40860801D-01 0.56274876D-03
+ 0.27500000D+03 0.28000000D+03 0.39783372D-01 0.56491294D-03
+ 0.28000000D+03 0.28500000D+03 0.36705412D-01 0.25041484D-03
+ 0.28500000D+03 0.29000000D+03 0.34090626D-01 0.21389468D-03
+ 0.29000000D+03 0.29500000D+03 0.32075702D-01 0.20303354D-03
+ 0.29500000D+03 0.30000000D+03 0.29752992D-01 0.21714583D-03
+ 0.30000000D+03 0.30500000D+03 0.28283099D-01 0.20518707D-03
+ 0.30500000D+03 0.31000000D+03 0.26226322D-01 0.19577104D-03
+ 0.31000000D+03 0.31500000D+03 0.24802108D-01 0.26219969D-03
+ 0.31500000D+03 0.32000000D+03 0.23808723D-01 0.24538503D-03
+ 0.32000000D+03 0.32500000D+03 0.21947078D-01 0.17866540D-03
+ 0.32500000D+03 0.33000000D+03 0.20681338D-01 0.23880937D-03
+ 0.33000000D+03 0.33500000D+03 0.19616340D-01 0.25523074D-03
+ 0.33500000D+03 0.34000000D+03 0.18969390D-01 0.19043717D-03
+ 0.34000000D+03 0.34500000D+03 0.17378965D-01 0.24816280D-03
+ 0.34500000D+03 0.35000000D+03 0.16807205D-01 0.29897083D-03
+ 0.35000000D+03 0.35500000D+03 0.15849392D-01 0.31114697D-03
+ 0.35500000D+03 0.36000000D+03 0.15143653D-01 0.26776509D-03
+ 0.36000000D+03 0.36500000D+03 0.14466517D-01 0.13601270D-03
+ 0.36500000D+03 0.37000000D+03 0.13382831D-01 0.12026212D-03
+ 0.37000000D+03 0.37500000D+03 0.12778927D-01 0.16852911D-03
+ 0.37500000D+03 0.38000000D+03 0.12373681D-01 0.16462335D-03
+ 0.38000000D+03 0.38500000D+03 0.11771252D-01 0.11608611D-03
+ 0.38500000D+03 0.39000000D+03 0.11008079D-01 0.11726641D-03
+ 0.39000000D+03 0.39500000D+03 0.10476625D-01 0.12125589D-03
+ 0.39500000D+03 0.40000000D+03 0.10280256D-01 0.11066052D-03
+ 0.40000000D+03 0.40500000D+03 0.93987285D-02 0.12069616D-03
+ 0.40500000D+03 0.41000000D+03 0.92574801D-02 0.12545139D-03
+ 0.41000000D+03 0.41500000D+03 0.87310201D-02 0.12527496D-03
+ 0.41500000D+03 0.42000000D+03 0.84217135D-02 0.12005446D-03
+ 0.42000000D+03 0.42500000D+03 0.80519791D-02 0.94990671D-04
+ 0.42500000D+03 0.43000000D+03 0.75589146D-02 0.90383412D-04
+ 0.43000000D+03 0.43500000D+03 0.72572281D-02 0.93977964D-04
+ 0.43500000D+03 0.44000000D+03 0.69224293D-02 0.10881064D-03
+ 0.44000000D+03 0.44500000D+03 0.67881378D-02 0.11303905D-03
+ 0.44500000D+03 0.45000000D+03 0.63640251D-02 0.10535071D-03
+ 0.45000000D+03 0.45500000D+03 0.59880601D-02 0.24328171D-03
+ 0.45500000D+03 0.46000000D+03 0.59954685D-02 0.23920358D-03
+ 0.46000000D+03 0.46500000D+03 0.55460606D-02 0.11701215D-03
+ 0.46500000D+03 0.47000000D+03 0.54541324D-02 0.11713755D-03
+ 0.47000000D+03 0.47500000D+03 0.51934558D-02 0.86023665D-04
+ 0.47500000D+03 0.48000000D+03 0.48444090D-02 0.90428661D-04
+ 0.48000000D+03 0.48500000D+03 0.46769391D-02 0.14865655D-03
+ 0.48500000D+03 0.49000000D+03 0.45110162D-02 0.16833932D-03
+ 0.49000000D+03 0.49500000D+03 0.46112634D-02 0.11229252D-03
+ 0.49500000D+03 0.50000000D+03 0.42349754D-02 0.56488383D-04
+ 0.50000000D+03 0.50500000D+03 0.39798544D-02 0.65240348D-04
+ 0.50500000D+03 0.51000000D+03 0.39605409D-02 0.66184779D-04
+ 0.51000000D+03 0.51500000D+03 0.37290161D-02 0.60934851D-04
+ 0.51500000D+03 0.52000000D+03 0.35437944D-02 0.63829995D-04
+ 0.52000000D+03 0.52500000D+03 0.34134883D-02 0.66996916D-04
+ 0.52500000D+03 0.53000000D+03 0.33518928D-02 0.95233763D-04
+ 0.53000000D+03 0.53500000D+03 0.31898917D-02 0.92598408D-04
+ 0.53500000D+03 0.54000000D+03 0.28827394D-02 0.18260722D-03
+ 0.54000000D+03 0.54500000D+03 0.32172829D-02 0.18099729D-03
+ 0.54500000D+03 0.55000000D+03 0.26866923D-02 0.14451256D-03
+ 0.55000000D+03 0.55500000D+03 0.28080670D-02 0.14962923D-03
+ 0.55500000D+03 0.56000000D+03 0.25930430D-02 0.81692616D-04
+ 0.56000000D+03 0.56500000D+03 0.26567536D-02 0.73209424D-04
+ 0.56500000D+03 0.57000000D+03 0.24289262D-02 0.56540195D-04
+ 0.57000000D+03 0.57500000D+03 0.24480917D-02 0.60375566D-04
+ 0.57500000D+03 0.58000000D+03 0.22281895D-02 0.53738645D-04
+ 0.58000000D+03 0.58500000D+03 0.21254728D-02 0.11098502D-03
+ 0.58500000D+03 0.59000000D+03 0.22515942D-02 0.11284827D-03
+ 0.59000000D+03 0.59500000D+03 0.20688803D-02 0.41743131D-04
+ 0.59500000D+03 0.60000000D+03 0.19615020D-02 0.46429768D-04
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.14441105D+01 0.58285299D-03
+ 0.12500000D+03 0.13000000D+03 -.68264843D+01 0.25739749D-02
+ 0.13000000D+03 0.13500000D+03 0.34895999D+01 0.18450835D-02
+ 0.13500000D+03 0.14000000D+03 0.20461966D+01 0.15901819D-02
+ 0.14000000D+03 0.14500000D+03 0.13395634D+01 0.13257896D-02
+ 0.14500000D+03 0.15000000D+03 0.94680169D+00 0.10335247D-02
+ 0.15000000D+03 0.15500000D+03 0.70475399D+00 0.90406476D-03
+ 0.15500000D+03 0.16000000D+03 0.54303401D+00 0.88681846D-03
+ 0.16000000D+03 0.16500000D+03 0.42979708D+00 0.83360956D-03
+ 0.16500000D+03 0.17000000D+03 0.34684778D+00 0.72450062D-03
+ 0.17000000D+03 0.17500000D+03 0.28347389D+00 0.67827312D-03
+ 0.17500000D+03 0.18000000D+03 0.23647415D+00 0.52558480D-03
+ 0.18000000D+03 0.18500000D+03 0.19669395D+00 0.48838660D-03
+ 0.18500000D+03 0.19000000D+03 0.16704890D+00 0.44130993D-03
+ 0.19000000D+03 0.19500000D+03 0.14159299D+00 0.38375525D-03
+ 0.19500000D+03 0.20000000D+03 0.12078769D+00 0.37768780D-03
+ 0.20000000D+03 0.20500000D+03 0.10398795D+00 0.35023349D-03
+ 0.20500000D+03 0.21000000D+03 0.90050929D-01 0.30507964D-03
+ 0.21000000D+03 0.21500000D+03 0.78100943D-01 0.25732983D-03
+ 0.21500000D+03 0.22000000D+03 0.67645503D-01 0.21946383D-03
+ 0.22000000D+03 0.22500000D+03 0.59011933D-01 0.29097335D-03
+ 0.22500000D+03 0.23000000D+03 0.51895770D-01 0.27402268D-03
+ 0.23000000D+03 0.23500000D+03 0.45280450D-01 0.35382930D-03
+ 0.23500000D+03 0.24000000D+03 0.40154278D-01 0.34822965D-03
+ 0.24000000D+03 0.24500000D+03 0.35092023D-01 0.43460676D-03
+ 0.24500000D+03 0.25000000D+03 0.31502002D-01 0.42881846D-03
+ 0.25000000D+03 0.25500000D+03 0.27538648D-01 0.18888783D-03
+ 0.25500000D+03 0.26000000D+03 0.24951295D-01 0.18378980D-03
+ 0.26000000D+03 0.26500000D+03 0.21893100D-01 0.12273116D-03
+ 0.26500000D+03 0.27000000D+03 0.19579582D-01 0.12157771D-03
+ 0.27000000D+03 0.27500000D+03 0.17090844D-01 0.23177295D-03
+ 0.27500000D+03 0.28000000D+03 0.15999432D-01 0.23044387D-03
+ 0.28000000D+03 0.28500000D+03 0.14190371D-01 0.97102802D-04
+ 0.28500000D+03 0.29000000D+03 0.12675383D-01 0.79777225D-04
+ 0.29000000D+03 0.29500000D+03 0.11475640D-01 0.72565191D-04
+ 0.29500000D+03 0.30000000D+03 0.10246480D-01 0.74675522D-04
+ 0.30000000D+03 0.30500000D+03 0.93781491D-02 0.68260295D-04
+ 0.30500000D+03 0.31000000D+03 0.83777122D-02 0.62421360D-04
+ 0.31000000D+03 0.31500000D+03 0.76348640D-02 0.80161019D-04
+ 0.31500000D+03 0.32000000D+03 0.70632321D-02 0.73533450D-04
+ 0.32000000D+03 0.32500000D+03 0.62771942D-02 0.50953601D-04
+ 0.32500000D+03 0.33000000D+03 0.57078717D-02 0.65509362D-04
+ 0.33000000D+03 0.33500000D+03 0.52260223D-02 0.68204665D-04
+ 0.33500000D+03 0.34000000D+03 0.48775701D-02 0.49350972D-04
+ 0.34000000D+03 0.34500000D+03 0.43165957D-02 0.60922952D-04
+ 0.34500000D+03 0.35000000D+03 0.40339308D-02 0.71918966D-04
+ 0.35000000D+03 0.35500000D+03 0.36768957D-02 0.71910024D-04
+ 0.35500000D+03 0.36000000D+03 0.33971987D-02 0.60699879D-04
+ 0.36000000D+03 0.36500000D+03 0.31378622D-02 0.29691962D-04
+ 0.36500000D+03 0.37000000D+03 0.28091437D-02 0.25183315D-04
+ 0.37000000D+03 0.37500000D+03 0.25978849D-02 0.34044046D-04
+ 0.37500000D+03 0.38000000D+03 0.24359378D-02 0.32638149D-04
+ 0.38000000D+03 0.38500000D+03 0.22450621D-02 0.22158029D-04
+ 0.38500000D+03 0.39000000D+03 0.20349035D-02 0.21627244D-04
+ 0.39000000D+03 0.39500000D+03 0.18779483D-02 0.21744272D-04
+ 0.39500000D+03 0.40000000D+03 0.17871029D-02 0.19284707D-04
+ 0.40000000D+03 0.40500000D+03 0.15856148D-02 0.20277224D-04
+ 0.40500000D+03 0.41000000D+03 0.15161897D-02 0.20603078D-04
+ 0.41000000D+03 0.41500000D+03 0.13882111D-02 0.19866001D-04
+ 0.41500000D+03 0.42000000D+03 0.13006226D-02 0.18616760D-04
+ 0.42000000D+03 0.42500000D+03 0.12079215D-02 0.14295586D-04
+ 0.42500000D+03 0.43000000D+03 0.11024200D-02 0.13169573D-04
+ 0.43000000D+03 0.43500000D+03 0.10292055D-02 0.13332946D-04
+ 0.43500000D+03 0.44000000D+03 0.95511246D-03 0.14956801D-04
+ 0.44000000D+03 0.44500000D+03 0.91115870D-03 0.15215309D-04
+ 0.44500000D+03 0.45000000D+03 0.83110541D-03 0.13752210D-04
+ 0.45000000D+03 0.45500000D+03 0.76170365D-03 0.30611774D-04
+ 0.45500000D+03 0.46000000D+03 0.74259307D-03 0.29956947D-04
+ 0.46000000D+03 0.46500000D+03 0.66908790D-03 0.14042182D-04
+ 0.46500000D+03 0.47000000D+03 0.64120979D-03 0.13842195D-04
+ 0.47000000D+03 0.47500000D+03 0.59496025D-03 0.98731542D-05
+ 0.47500000D+03 0.48000000D+03 0.54114213D-03 0.10080060D-04
+ 0.48000000D+03 0.48500000D+03 0.50981432D-03 0.16085393D-04
+ 0.48500000D+03 0.49000000D+03 0.47977775D-03 0.17940349D-04
+ 0.49000000D+03 0.49500000D+03 0.47836296D-03 0.11747790D-04
+ 0.49500000D+03 0.50000000D+03 0.42848307D-03 0.57134312D-05
+ 0.50000000D+03 0.50500000D+03 0.39319464D-03 0.64338590D-05
+ 0.50500000D+03 0.51000000D+03 0.38208508D-03 0.64049456D-05
+ 0.51000000D+03 0.51500000D+03 0.35132271D-03 0.57442677D-05
+ 0.51500000D+03 0.52000000D+03 0.32626271D-03 0.58713898D-05
+ 0.52000000D+03 0.52500000D+03 0.30719711D-03 0.60299450D-05
+ 0.52500000D+03 0.53000000D+03 0.29487662D-03 0.83317337D-05
+ 0.53000000D+03 0.53500000D+03 0.27435602D-03 0.80176206D-05
+ 0.53500000D+03 0.54000000D+03 0.24260636D-03 0.15207442D-04
+ 0.54000000D+03 0.54500000D+03 0.26480891D-03 0.15042999D-04
+ 0.54500000D+03 0.55000000D+03 0.21627306D-03 0.11519232D-04
+ 0.55000000D+03 0.55500000D+03 0.22129714D-03 0.11883821D-04
+ 0.55500000D+03 0.56000000D+03 0.20002987D-03 0.62830400D-05
+ 0.56000000D+03 0.56500000D+03 0.20058663D-03 0.55556926D-05
+ 0.56500000D+03 0.57000000D+03 0.17950629D-03 0.41697015D-05
+ 0.57000000D+03 0.57500000D+03 0.17715652D-03 0.43734191D-05
+ 0.57500000D+03 0.58000000D+03 0.15794161D-03 0.38174754D-05
+ 0.58000000D+03 0.58500000D+03 0.14775824D-03 0.76441366D-05
+ 0.58500000D+03 0.59000000D+03 0.15327050D-03 0.77473314D-05
+ 0.59000000D+03 0.59500000D+03 0.13798588D-03 0.27878329D-05
+ 0.59500000D+03 0.60000000D+03 0.12831149D-03 0.30293862D-05
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 -.14497690D+01 0.38828626D-02
+ 0.30000000D+01 0.60000000D+01 0.15935457D+01 0.20750337D-02
+ 0.60000000D+01 0.90000000D+01 0.18964615D+01 0.16378278D-02
+ 0.90000000D+01 0.12000000D+02 0.15232947D+01 0.13076796D-02
+ 0.12000000D+02 0.15000000D+02 0.12151786D+01 0.12133346D-02
+ 0.15000000D+02 0.18000000D+02 0.98449956D+00 0.11915157D-02
+ 0.18000000D+02 0.21000000D+02 0.81346672D+00 0.11044932D-02
+ 0.21000000D+02 0.24000000D+02 0.68546175D+00 0.11951491D-02
+ 0.24000000D+02 0.27000000D+02 0.58238953D+00 0.11952397D-02
+ 0.27000000D+02 0.30000000D+02 0.50465739D+00 0.10266535D-02
+ 0.30000000D+02 0.33000000D+02 0.44181051D+00 0.84175171D-03
+ 0.33000000D+02 0.36000000D+02 0.38579749D+00 0.89011831D-03
+ 0.36000000D+02 0.39000000D+02 0.34497180D+00 0.83744834D-03
+ 0.39000000D+02 0.42000000D+02 0.30548238D+00 0.63772156D-03
+ 0.42000000D+02 0.45000000D+02 0.27339745D+00 0.72745383D-03
+ 0.45000000D+02 0.48000000D+02 0.24838687D+00 0.73464106D-03
+ 0.48000000D+02 0.51000000D+02 0.22216045D+00 0.18555428D-02
+ 0.51000000D+02 0.54000000D+02 0.20479371D+00 0.18499319D-02
+ 0.54000000D+02 0.57000000D+02 0.18414675D+00 0.60906208D-03
+ 0.57000000D+02 0.60000000D+02 0.16820999D+00 0.81827153D-03
+ 0.60000000D+02 0.63000000D+02 0.15442527D+00 0.12302121D-02
+ 0.63000000D+02 0.66000000D+02 0.14041145D+00 0.10765934D-02
+ 0.66000000D+02 0.69000000D+02 0.13080927D+00 0.56294325D-03
+ 0.69000000D+02 0.72000000D+02 0.11920149D+00 0.49278615D-03
+ 0.72000000D+02 0.75000000D+02 0.11077924D+00 0.72407479D-03
+ 0.75000000D+02 0.78000000D+02 0.10151651D+00 0.72282555D-03
+ 0.78000000D+02 0.81000000D+02 0.94776070D-01 0.45380387D-03
+ 0.81000000D+02 0.84000000D+02 0.86301238D-01 0.48111221D-03
+ 0.84000000D+02 0.87000000D+02 0.81454313D-01 0.42573938D-03
+ 0.87000000D+02 0.90000000D+02 0.75884748D-01 0.40200786D-03
+ 0.90000000D+02 0.93000000D+02 0.69840280D-01 0.42506535D-03
+ 0.93000000D+02 0.96000000D+02 0.65770268D-01 0.38492911D-03
+ 0.96000000D+02 0.99000000D+02 0.61187993D-01 0.38954519D-03
+ 0.99000000D+02 0.10200000D+03 0.56158050D-01 0.42280394D-03
+ 0.10200000D+03 0.10500000D+03 0.53366315D-01 0.46997837D-03
+ 0.10500000D+03 0.10800000D+03 0.49910311D-01 0.40008580D-03
+ 0.10800000D+03 0.11100000D+03 0.46739360D-01 0.28774129D-03
+ 0.11100000D+03 0.11400000D+03 0.43576948D-01 0.30901804D-03
+ 0.11400000D+03 0.11700000D+03 0.40741613D-01 0.33677511D-03
+ 0.11700000D+03 0.12000000D+03 0.38366662D-01 0.29914946D-03
+ 0.12000000D+03 0.12300000D+03 0.36493506D-01 0.28362032D-03
+ 0.12300000D+03 0.12600000D+03 0.34059428D-01 0.31086888D-03
+ 0.12600000D+03 0.12900000D+03 0.31668376D-01 0.26049881D-03
+ 0.12900000D+03 0.13200000D+03 0.29853160D-01 0.29887294D-03
+ 0.13200000D+03 0.13500000D+03 0.29049558D-01 0.36373508D-03
+ 0.13500000D+03 0.13800000D+03 0.25419258D-01 0.54084248D-03
+ 0.13800000D+03 0.14100000D+03 0.25832554D-01 0.50150562D-03
+ 0.14100000D+03 0.14400000D+03 0.24027009D-01 0.23667961D-03
+ 0.14400000D+03 0.14700000D+03 0.22466262D-01 0.22500565D-03
+ 0.14700000D+03 0.15000000D+03 0.21320940D-01 0.28745916D-03
+ 0.15000000D+03 0.15300000D+03 0.19991326D-01 0.31345530D-03
+ 0.15300000D+03 0.15600000D+03 0.19134639D-01 0.35519161D-03
+ 0.15600000D+03 0.15900000D+03 0.17749816D-01 0.34012843D-03
+ 0.15900000D+03 0.16200000D+03 0.17058389D-01 0.26158978D-03
+ 0.16200000D+03 0.16500000D+03 0.16582753D-01 0.25742201D-03
+ 0.16500000D+03 0.16800000D+03 0.15073697D-01 0.21893757D-03
+ 0.16800000D+03 0.17100000D+03 0.14719242D-01 0.18373754D-03
+ 0.17100000D+03 0.17400000D+03 0.13742990D-01 0.18549578D-03
+ 0.17400000D+03 0.17700000D+03 0.12837700D-01 0.21139621D-03
+ 0.17700000D+03 0.18000000D+03 0.12232944D-01 0.31612137D-03
+ 0.18000000D+03 0.18300000D+03 0.11441147D-01 0.68452469D-03
+ 0.18300000D+03 0.18600000D+03 0.11903838D-01 0.64431595D-03
+ 0.18600000D+03 0.18900000D+03 0.10525248D-01 0.20894061D-03
+ 0.18900000D+03 0.19200000D+03 0.10194195D-01 0.23689193D-03
+ 0.19200000D+03 0.19500000D+03 0.95179317D-02 0.21642003D-03
+ 0.19500000D+03 0.19800000D+03 0.87578303D-02 0.20556965D-03
+ 0.19800000D+03 0.20100000D+03 0.88524853D-02 0.22044449D-03
+ 0.20100000D+03 0.20400000D+03 0.82428991D-02 0.18706563D-03
+ 0.20400000D+03 0.20700000D+03 0.80058769D-02 0.18815631D-03
+ 0.20700000D+03 0.21000000D+03 0.73934383D-02 0.19564374D-03
+ 0.21000000D+03 0.21300000D+03 0.71736209D-02 0.19218203D-03
+ 0.21300000D+03 0.21600000D+03 0.66888830D-02 0.13122759D-03
+ 0.21600000D+03 0.21900000D+03 0.64493529D-02 0.88585719D-04
+ 0.21900000D+03 0.22200000D+03 0.62625494D-02 0.92324556D-04
+ 0.22200000D+03 0.22500000D+03 0.57922079D-02 0.10111444D-03
+ 0.22500000D+03 0.22800000D+03 0.53804164D-02 0.10586474D-03
+ 0.22800000D+03 0.23100000D+03 0.53573515D-02 0.12123518D-03
+ 0.23100000D+03 0.23400000D+03 0.51222039D-02 0.11914271D-03
+ 0.23400000D+03 0.23700000D+03 0.50272610D-02 0.12518387D-03
+ 0.23700000D+03 0.24000000D+03 0.44623251D-02 0.12075898D-03
+ 0.24000000D+03 0.24300000D+03 0.44514140D-02 0.10316737D-03
+ 0.24300000D+03 0.24600000D+03 0.41835518D-02 0.10852810D-03
+ 0.24600000D+03 0.24900000D+03 0.40276381D-02 0.98410488D-04
+ 0.24900000D+03 0.25200000D+03 0.37933294D-02 0.89397877D-04
+ 0.25200000D+03 0.25500000D+03 0.35719182D-02 0.11679411D-03
+ 0.25500000D+03 0.25800000D+03 0.34931550D-02 0.13074564D-03
+ 0.25800000D+03 0.26100000D+03 0.33332320D-02 0.10831896D-03
+ 0.26100000D+03 0.26400000D+03 0.32183079D-02 0.90717582D-04
+ 0.26400000D+03 0.26700000D+03 0.30319531D-02 0.84082372D-04
+ 0.26700000D+03 0.27000000D+03 0.29335104D-02 0.10903151D-03
+ 0.27000000D+03 0.27300000D+03 0.28309851D-02 0.10780735D-03
+ 0.27300000D+03 0.27600000D+03 0.24026858D-02 0.20151850D-03
+ 0.27600000D+03 0.27900000D+03 0.26938173D-02 0.21813038D-03
+ 0.27900000D+03 0.28200000D+03 0.22230897D-02 0.17997374D-03
+ 0.28200000D+03 0.28500000D+03 0.26428984D-02 0.15673392D-03
+ 0.28500000D+03 0.28800000D+03 0.22083650D-02 0.70433038D-04
+ 0.28800000D+03 0.29100000D+03 0.20994530D-02 0.85351949D-04
+ 0.29100000D+03 0.29400000D+03 0.20305159D-02 0.78117593D-04
+ 0.29400000D+03 0.29700000D+03 0.21006275D-02 0.76111131D-04
+ 0.29700000D+03 0.30000000D+03 0.17087146D-02 0.95882978D-04
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 -.14484340D+01 0.38823372D-02
+ 0.30000000D+01 0.60000000D+01 0.15911673D+01 0.20724281D-02
+ 0.60000000D+01 0.90000000D+01 0.18896527D+01 0.16322824D-02
+ 0.90000000D+01 0.12000000D+02 0.15126735D+01 0.12988505D-02
+ 0.12000000D+02 0.15000000D+02 0.12012328D+01 0.11989287D-02
+ 0.15000000D+02 0.18000000D+02 0.96769749D+00 0.11714790D-02
+ 0.18000000D+02 0.21000000D+02 0.79419537D+00 0.10780676D-02
+ 0.21000000D+02 0.24000000D+02 0.66399496D+00 0.11568593D-02
+ 0.24000000D+02 0.27000000D+02 0.55916605D+00 0.11481279D-02
+ 0.27000000D+02 0.30000000D+02 0.47977154D+00 0.97666426D-03
+ 0.30000000D+02 0.33000000D+02 0.41546999D+00 0.79243137D-03
+ 0.33000000D+02 0.36000000D+02 0.35852867D+00 0.82552427D-03
+ 0.36000000D+02 0.39000000D+02 0.31652316D+00 0.77061909D-03
+ 0.39000000D+02 0.42000000D+02 0.27649300D+00 0.57681818D-03
+ 0.42000000D+02 0.45000000D+02 0.24390092D+00 0.64800916D-03
+ 0.45000000D+02 0.48000000D+02 0.21822814D+00 0.64602842D-03
+ 0.48000000D+02 0.51000000D+02 0.19208005D+00 0.15925665D-02
+ 0.51000000D+02 0.54000000D+02 0.17410755D+00 0.15842684D-02
+ 0.54000000D+02 0.57000000D+02 0.15383502D+00 0.50953289D-03
+ 0.57000000D+02 0.60000000D+02 0.13800071D+00 0.66792554D-03
+ 0.60000000D+02 0.63000000D+02 0.12434169D+00 0.98734090D-03
+ 0.63000000D+02 0.66000000D+02 0.11090246D+00 0.85626287D-03
+ 0.66000000D+02 0.69000000D+02 0.10128918D+00 0.43592926D-03
+ 0.69000000D+02 0.72000000D+02 0.90441558D-01 0.37487410D-03
+ 0.72000000D+02 0.75000000D+02 0.82324480D-01 0.53455795D-03
+ 0.75000000D+02 0.78000000D+02 0.73858417D-01 0.52944736D-03
+ 0.78000000D+02 0.81000000D+02 0.67484045D-01 0.32275365D-03
+ 0.81000000D+02 0.84000000D+02 0.60124364D-01 0.33516187D-03
+ 0.84000000D+02 0.87000000D+02 0.55503505D-01 0.29119626D-03
+ 0.87000000D+02 0.90000000D+02 0.50556075D-01 0.26709383D-03
+ 0.90000000D+02 0.93000000D+02 0.45481286D-01 0.27712633D-03
+ 0.93000000D+02 0.96000000D+02 0.41856516D-01 0.24516578D-03
+ 0.96000000D+02 0.99000000D+02 0.38043473D-01 0.24199667D-03
+ 0.99000000D+02 0.10200000D+03 0.34113776D-01 0.25654457D-03
+ 0.10200000D+03 0.10500000D+03 0.31668755D-01 0.27850929D-03
+ 0.10500000D+03 0.10800000D+03 0.28922962D-01 0.23332734D-03
+ 0.10800000D+03 0.11100000D+03 0.26446138D-01 0.16262123D-03
+ 0.11100000D+03 0.11400000D+03 0.24076537D-01 0.17067740D-03
+ 0.11400000D+03 0.11700000D+03 0.21979739D-01 0.18141148D-03
+ 0.11700000D+03 0.12000000D+03 0.20209802D-01 0.15836024D-03
+ 0.12000000D+03 0.12300000D+03 0.18765777D-01 0.14522527D-03
+ 0.12300000D+03 0.12600000D+03 0.17093531D-01 0.15629858D-03
+ 0.12600000D+03 0.12900000D+03 0.15519068D-01 0.12805465D-03
+ 0.12900000D+03 0.13200000D+03 0.14285357D-01 0.14236592D-03
+ 0.13200000D+03 0.13500000D+03 0.13568771D-01 0.16981558D-03
+ 0.13500000D+03 0.13800000D+03 0.11595206D-01 0.24521939D-03
+ 0.13800000D+03 0.14100000D+03 0.11507981D-01 0.22545492D-03
+ 0.14100000D+03 0.14400000D+03 0.10448136D-01 0.10286730D-03
+ 0.14400000D+03 0.14700000D+03 0.95385917D-02 0.95761318D-04
+ 0.14700000D+03 0.15000000D+03 0.88411951D-02 0.11852575D-03
+ 0.15000000D+03 0.15300000D+03 0.80978380D-02 0.12738348D-03
+ 0.15300000D+03 0.15600000D+03 0.75704844D-02 0.13984386D-03
+ 0.15600000D+03 0.15900000D+03 0.68611941D-02 0.13227464D-03
+ 0.15900000D+03 0.16200000D+03 0.64425581D-02 0.98533262D-04
+ 0.16200000D+03 0.16500000D+03 0.61177633D-02 0.95208658D-04
+ 0.16500000D+03 0.16800000D+03 0.54331242D-02 0.78962374D-04
+ 0.16800000D+03 0.17100000D+03 0.51848764D-02 0.65008662D-04
+ 0.17100000D+03 0.17400000D+03 0.47312075D-02 0.63582055D-04
+ 0.17400000D+03 0.17700000D+03 0.43214244D-02 0.71220493D-04
+ 0.17700000D+03 0.18000000D+03 0.40268245D-02 0.10334429D-03
+ 0.18000000D+03 0.18300000D+03 0.36845552D-02 0.21861820D-03
+ 0.18300000D+03 0.18600000D+03 0.37471350D-02 0.20470088D-03
+ 0.18600000D+03 0.18900000D+03 0.32381507D-02 0.64455649D-04
+ 0.18900000D+03 0.19200000D+03 0.30674977D-02 0.70997867D-04
+ 0.19200000D+03 0.19500000D+03 0.28021336D-02 0.64191133D-04
+ 0.19500000D+03 0.19800000D+03 0.25239709D-02 0.58826951D-04
+ 0.19800000D+03 0.20100000D+03 0.24970290D-02 0.62442795D-04
+ 0.20100000D+03 0.20400000D+03 0.22749734D-02 0.51499481D-04
+ 0.20400000D+03 0.20700000D+03 0.21624218D-02 0.50921717D-04
+ 0.20700000D+03 0.21000000D+03 0.19546749D-02 0.51584217D-04
+ 0.21000000D+03 0.21300000D+03 0.18571043D-02 0.49926647D-04
+ 0.21300000D+03 0.21600000D+03 0.16955676D-02 0.33423252D-04
+ 0.21600000D+03 0.21900000D+03 0.16014687D-02 0.22043575D-04
+ 0.21900000D+03 0.22200000D+03 0.15230186D-02 0.22399894D-04
+ 0.22200000D+03 0.22500000D+03 0.13799244D-02 0.24112303D-04
+ 0.22500000D+03 0.22800000D+03 0.12564585D-02 0.24682567D-04
+ 0.22800000D+03 0.23100000D+03 0.12262109D-02 0.27706088D-04
+ 0.23100000D+03 0.23400000D+03 0.11488205D-02 0.26753617D-04
+ 0.23400000D+03 0.23700000D+03 0.11047618D-02 0.27454184D-04
+ 0.23700000D+03 0.24000000D+03 0.96135853D-03 0.26108582D-04
+ 0.24000000D+03 0.24300000D+03 0.94055235D-03 0.21785903D-04
+ 0.24300000D+03 0.24600000D+03 0.86677630D-03 0.22491214D-04
+ 0.24600000D+03 0.24900000D+03 0.81851929D-03 0.20035823D-04
+ 0.24900000D+03 0.25200000D+03 0.75623284D-03 0.17815339D-04
+ 0.25200000D+03 0.25500000D+03 0.69851552D-03 0.22761904D-04
+ 0.25500000D+03 0.25800000D+03 0.67062666D-03 0.25118875D-04
+ 0.25800000D+03 0.26100000D+03 0.62797733D-03 0.20459659D-04
+ 0.26100000D+03 0.26400000D+03 0.59505677D-03 0.16766888D-04
+ 0.26400000D+03 0.26700000D+03 0.55041253D-03 0.15283812D-04
+ 0.26700000D+03 0.27000000D+03 0.52262051D-03 0.19331730D-04
+ 0.27000000D+03 0.27300000D+03 0.49508766D-03 0.18954069D-04
+ 0.27300000D+03 0.27600000D+03 0.41293265D-03 0.34340113D-04
+ 0.27600000D+03 0.27900000D+03 0.45489990D-03 0.36991974D-04
+ 0.27900000D+03 0.28200000D+03 0.36880298D-03 0.29719259D-04
+ 0.28200000D+03 0.28500000D+03 0.43051011D-03 0.25702448D-04
+ 0.28500000D+03 0.28800000D+03 0.35323246D-03 0.11239108D-04
+ 0.28800000D+03 0.29100000D+03 0.32993804D-03 0.13390868D-04
+ 0.29100000D+03 0.29400000D+03 0.31362004D-03 0.12101655D-04
+ 0.29400000D+03 0.29700000D+03 0.31878984D-03 0.11524108D-04
+ 0.29700000D+03 0.30000000D+03 0.25501307D-03 0.14286483D-04
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.70721908D+01 0.37063861D-02
+ 0.30000000D+01 0.60000000D+01 0.10380121D+02 0.54818132D-03
+ 0.60000000D+01 0.90000000D+01 0.37523243D+01 0.22967173D-03
+ 0.90000000D+01 0.12000000D+02 0.19052663D+01 0.12971426D-03
+ 0.12000000D+02 0.15000000D+02 0.11348358D+01 0.84571690D-04
+ 0.15000000D+02 0.18000000D+02 0.74278527D+00 0.60038037D-04
+ 0.18000000D+02 0.21000000D+02 0.51779584D+00 0.44882554D-04
+ 0.21000000D+02 0.24000000D+02 0.37751876D+00 0.35169305D-04
+ 0.24000000D+02 0.27000000D+02 0.28480435D+00 0.27784812D-04
+ 0.27000000D+02 0.30000000D+02 0.22059482D+00 0.21959560D-04
+ 0.30000000D+02 0.33000000D+02 0.17457162D+00 0.19013806D-04
+ 0.33000000D+02 0.36000000D+02 0.14059713D+00 0.16166684D-04
+ 0.36000000D+02 0.39000000D+02 0.11489736D+00 0.13570888D-04
+ 0.39000000D+02 0.42000000D+02 0.95088157D-01 0.11494842D-04
+ 0.42000000D+02 0.45000000D+02 0.79564634D-01 0.98290240D-05
+ 0.45000000D+02 0.48000000D+02 0.67216785D-01 0.87910271D-05
+ 0.48000000D+02 0.51000000D+02 0.57233523D-01 0.77934173D-05
+ 0.51000000D+02 0.54000000D+02 0.49120621D-01 0.69771982D-05
+ 0.54000000D+02 0.57000000D+02 0.42423429D-01 0.64259796D-05
+ 0.57000000D+02 0.60000000D+02 0.36886672D-01 0.55827373D-05
+ 0.60000000D+02 0.63000000D+02 0.32239731D-01 0.50254914D-05
+ 0.63000000D+02 0.66000000D+02 0.28307758D-01 0.45316055D-05
+ 0.66000000D+02 0.69000000D+02 0.24970871D-01 0.41302477D-05
+ 0.69000000D+02 0.72000000D+02 0.22125097D-01 0.38042836D-05
+ 0.72000000D+02 0.75000000D+02 0.19680496D-01 0.35577530D-05
+ 0.75000000D+02 0.78000000D+02 0.17570716D-01 0.31398160D-05
+ 0.78000000D+02 0.81000000D+02 0.15742088D-01 0.28528200D-05
+ 0.81000000D+02 0.84000000D+02 0.14143004D-01 0.27447090D-05
+ 0.84000000D+02 0.87000000D+02 0.12741514D-01 0.24360208D-05
+ 0.87000000D+02 0.90000000D+02 0.11517483D-01 0.22522843D-05
+ 0.90000000D+02 0.93000000D+02 0.10434966D-01 0.20456773D-05
+ 0.93000000D+02 0.96000000D+02 0.94759149D-02 0.19673910D-05
+ 0.96000000D+02 0.99000000D+02 0.86255568D-02 0.17886941D-05
+ 0.99000000D+02 0.10200000D+03 0.78692835D-02 0.16873088D-05
+ 0.10200000D+03 0.10500000D+03 0.71912851D-02 0.15782501D-05
+ 0.10500000D+03 0.10800000D+03 0.65926164D-02 0.15636421D-05
+ 0.10800000D+03 0.11100000D+03 0.60454401D-02 0.13761007D-05
+ 0.11100000D+03 0.11400000D+03 0.55599980D-02 0.12947341D-05
+ 0.11400000D+03 0.11700000D+03 0.51214063D-02 0.12309537D-05
+ 0.11700000D+03 0.12000000D+03 0.47250492D-02 0.11342559D-05
+ 0.12000000D+03 0.12300000D+03 0.43632537D-02 0.10809856D-05
+ 0.12300000D+03 0.12600000D+03 0.40379047D-02 0.10487668D-05
+ 0.12600000D+03 0.12900000D+03 0.37424266D-02 0.99195743D-06
+ 0.12900000D+03 0.13200000D+03 0.34706394D-02 0.93085778D-06
+ 0.13200000D+03 0.13500000D+03 0.32244936D-02 0.84857907D-06
+ 0.13500000D+03 0.13800000D+03 0.29992125D-02 0.79453568D-06
+ 0.13800000D+03 0.14100000D+03 0.27942304D-02 0.77565123D-06
+ 0.14100000D+03 0.14400000D+03 0.26042417D-02 0.72692932D-06
+ 0.14400000D+03 0.14700000D+03 0.24300068D-02 0.68091146D-06
+ 0.14700000D+03 0.15000000D+03 0.22714870D-02 0.65163441D-06
+ 0.15000000D+03 0.15300000D+03 0.21248937D-02 0.60838301D-06
+ 0.15300000D+03 0.15600000D+03 0.19885271D-02 0.58460431D-06
+ 0.15600000D+03 0.15900000D+03 0.18655546D-02 0.57085366D-06
+ 0.15900000D+03 0.16200000D+03 0.17485584D-02 0.53517371D-06
+ 0.16200000D+03 0.16500000D+03 0.16427022D-02 0.52595110D-06
+ 0.16500000D+03 0.16800000D+03 0.15441607D-02 0.48380074D-06
+ 0.16800000D+03 0.17100000D+03 0.14521673D-02 0.47775966D-06
+ 0.17100000D+03 0.17400000D+03 0.13665493D-02 0.43509635D-06
+ 0.17400000D+03 0.17700000D+03 0.12880065D-02 0.41860808D-06
+ 0.17700000D+03 0.18000000D+03 0.12139157D-02 0.39459383D-06
+ 0.18000000D+03 0.18300000D+03 0.11457215D-02 0.38568276D-06
+ 0.18300000D+03 0.18600000D+03 0.10822049D-02 0.36527284D-06
+ 0.18600000D+03 0.18900000D+03 0.10228416D-02 0.35103719D-06
+ 0.18900000D+03 0.19200000D+03 0.96689306D-03 0.32820191D-06
+ 0.19200000D+03 0.19500000D+03 0.91488729D-03 0.32616971D-06
+ 0.19500000D+03 0.19800000D+03 0.86550067D-03 0.31927211D-06
+ 0.19800000D+03 0.20100000D+03 0.82056166D-03 0.29409112D-06
+ 0.20100000D+03 0.20400000D+03 0.77827800D-03 0.29038858D-06
+ 0.20400000D+03 0.20700000D+03 0.73752904D-03 0.26915234D-06
+ 0.20700000D+03 0.21000000D+03 0.70025261D-03 0.26176003D-06
+ 0.21000000D+03 0.21300000D+03 0.66436230D-03 0.25183078D-06
+ 0.21300000D+03 0.21600000D+03 0.63153513D-03 0.23920758D-06
+ 0.21600000D+03 0.21900000D+03 0.60063376D-03 0.23394366D-06
+ 0.21900000D+03 0.22200000D+03 0.57129515D-03 0.22384875D-06
+ 0.22200000D+03 0.22500000D+03 0.54347598D-03 0.22355318D-06
+ 0.22500000D+03 0.22800000D+03 0.51774335D-03 0.20483414D-06
+ 0.22800000D+03 0.23100000D+03 0.49274697D-03 0.19862283D-06
+ 0.23100000D+03 0.23400000D+03 0.46945752D-03 0.19214958D-06
+ 0.23400000D+03 0.23700000D+03 0.44819532D-03 0.18951868D-06
+ 0.23700000D+03 0.24000000D+03 0.42716902D-03 0.17516775D-06
+ 0.24000000D+03 0.24300000D+03 0.40792668D-03 0.18517567D-06
+ 0.24300000D+03 0.24600000D+03 0.38883536D-03 0.16948837D-06
+ 0.24600000D+03 0.24900000D+03 0.37178773D-03 0.16236386D-06
+ 0.24900000D+03 0.25200000D+03 0.35515223D-03 0.15713938D-06
+ 0.25200000D+03 0.25500000D+03 0.33974188D-03 0.14893607D-06
+ 0.25500000D+03 0.25800000D+03 0.32480226D-03 0.14549073D-06
+ 0.25800000D+03 0.26100000D+03 0.31060738D-03 0.13845957D-06
+ 0.26100000D+03 0.26400000D+03 0.29743910D-03 0.13696654D-06
+ 0.26400000D+03 0.26700000D+03 0.28504974D-03 0.12784663D-06
+ 0.26700000D+03 0.27000000D+03 0.27282276D-03 0.12722012D-06
+ 0.27000000D+03 0.27300000D+03 0.26121870D-03 0.12292017D-06
+ 0.27300000D+03 0.27600000D+03 0.25043830D-03 0.11898651D-06
+ 0.27600000D+03 0.27900000D+03 0.24021015D-03 0.11756233D-06
+ 0.27900000D+03 0.28200000D+03 0.23003873D-03 0.11020411D-06
+ 0.28200000D+03 0.28500000D+03 0.22083978D-03 0.10909010D-06
+ 0.28500000D+03 0.28800000D+03 0.21197281D-03 0.10472337D-06
+ 0.28800000D+03 0.29100000D+03 0.20353439D-03 0.99020953D-07
+ 0.29100000D+03 0.29400000D+03 0.19559109D-03 0.96551193D-07
+ 0.29400000D+03 0.29700000D+03 0.18771219D-03 0.92483266D-07
+ 0.29700000D+03 0.30000000D+03 0.18052439D-03 0.93229358D-07
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX2-HH.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX2-HH.top
new file mode 100644
index 0000000000000000000000000000000000000000..4d5158ba1a3aed9ab68115e01755a939c380c4a3
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX2-HH.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18268163D-05 0.52222236D-06
+ -.46000000D+01 -.45000000D+01 -.95352035D-04 0.34946946D-05
+ -.45000000D+01 -.44000000D+01 -.13733935D-03 0.74014461D-05
+ -.44000000D+01 -.43000000D+01 0.13058625D-02 0.29188510D-04
+ -.43000000D+01 -.42000000D+01 0.75174489D-02 0.85621016D-04
+ -.42000000D+01 -.41000000D+01 0.22808844D-01 0.21783186D-03
+ -.41000000D+01 -.40000000D+01 0.50616270D-01 0.47045020D-03
+ -.40000000D+01 -.39000000D+01 0.96183774D-01 0.11082033D-02
+ -.39000000D+01 -.38000000D+01 0.16074447D+00 0.13770781D-02
+ -.38000000D+01 -.37000000D+01 0.24492374D+00 0.18937254D-02
+ -.37000000D+01 -.36000000D+01 0.35809813D+00 0.31129220D-02
+ -.36000000D+01 -.35000000D+01 0.48490131D+00 0.39972622D-02
+ -.35000000D+01 -.34000000D+01 0.64696418D+00 0.48482207D-02
+ -.34000000D+01 -.33000000D+01 0.83220368D+00 0.67956777D-02
+ -.33000000D+01 -.32000000D+01 0.10496213D+01 0.65253891D-02
+ -.32000000D+01 -.31000000D+01 0.12849719D+01 0.80386448D-02
+ -.31000000D+01 -.30000000D+01 0.15642942D+01 0.85796865D-02
+ -.30000000D+01 -.29000000D+01 0.18408373D+01 0.87705580D-02
+ -.29000000D+01 -.28000000D+01 0.21729539D+01 0.10308630D-01
+ -.28000000D+01 -.27000000D+01 0.25253742D+01 0.12002723D-01
+ -.27000000D+01 -.26000000D+01 0.29058773D+01 0.11338852D-01
+ -.26000000D+01 -.25000000D+01 0.32554219D+01 0.12150122D-01
+ -.25000000D+01 -.24000000D+01 0.37043052D+01 0.14079366D-01
+ -.24000000D+01 -.23000000D+01 0.40933268D+01 0.15105725D-01
+ -.23000000D+01 -.22000000D+01 0.45465278D+01 0.14507928D-01
+ -.22000000D+01 -.21000000D+01 0.49886184D+01 0.16031317D-01
+ -.21000000D+01 -.20000000D+01 0.54131298D+01 0.16061465D-01
+ -.20000000D+01 -.19000000D+01 0.58728043D+01 0.18170277D-01
+ -.19000000D+01 -.18000000D+01 0.62750187D+01 0.26015294D-01
+ -.18000000D+01 -.17000000D+01 0.67011399D+01 0.23894940D-01
+ -.17000000D+01 -.16000000D+01 0.71379727D+01 0.22372760D-01
+ -.16000000D+01 -.15000000D+01 0.75253497D+01 0.19303117D-01
+ -.15000000D+01 -.14000000D+01 0.79182459D+01 0.23208887D-01
+ -.14000000D+01 -.13000000D+01 0.82933687D+01 0.26462030D-01
+ -.13000000D+01 -.12000000D+01 0.86212579D+01 0.23790454D-01
+ -.12000000D+01 -.11000000D+01 0.89390653D+01 0.24870004D-01
+ -.11000000D+01 -.10000000D+01 0.92477136D+01 0.22216568D-01
+ -.10000000D+01 -.90000000D+00 0.94882401D+01 0.23469481D-01
+ -.90000000D+00 -.80000000D+00 0.97495376D+01 0.25139653D-01
+ -.80000000D+00 -.70000000D+00 0.99290367D+01 0.22802802D-01
+ -.70000000D+00 -.60000000D+00 0.10177826D+02 0.23418992D-01
+ -.60000000D+00 -.50000000D+00 0.10300150D+02 0.22491503D-01
+ -.50000000D+00 -.40000000D+00 0.10446681D+02 0.23510292D-01
+ -.40000000D+00 -.30000000D+00 0.10572578D+02 0.25117086D-01
+ -.30000000D+00 -.20000000D+00 0.10693773D+02 0.23984896D-01
+ -.20000000D+00 -.10000000D+00 0.10717434D+02 0.23805127D-01
+ -.10000000D+00 0.18041124D-15 0.10741111D+02 0.22855155D-01
+ 0.70776718D-15 0.10000000D+00 0.10806266D+02 0.29902717D-01
+ 0.10000000D+00 0.20000000D+00 0.10701130D+02 0.23547847D-01
+ 0.20000000D+00 0.30000000D+00 0.10690247D+02 0.22623971D-01
+ 0.30000000D+00 0.40000000D+00 0.10583123D+02 0.23604793D-01
+ 0.40000000D+00 0.50000000D+00 0.10514955D+02 0.25453365D-01
+ 0.50000000D+00 0.60000000D+00 0.10317369D+02 0.24377379D-01
+ 0.60000000D+00 0.70000000D+00 0.10171887D+02 0.22891309D-01
+ 0.70000000D+00 0.80000000D+00 0.10013179D+02 0.25573296D-01
+ 0.80000000D+00 0.90000000D+00 0.97450163D+01 0.23591103D-01
+ 0.90000000D+00 0.10000000D+01 0.95362232D+01 0.21116928D-01
+ 0.10000000D+01 0.11000000D+01 0.92283811D+01 0.22521719D-01
+ 0.11000000D+01 0.12000000D+01 0.89387233D+01 0.24237941D-01
+ 0.12000000D+01 0.13000000D+01 0.86199282D+01 0.20889365D-01
+ 0.13000000D+01 0.14000000D+01 0.82572857D+01 0.21122539D-01
+ 0.14000000D+01 0.15000000D+01 0.78880638D+01 0.22453105D-01
+ 0.15000000D+01 0.16000000D+01 0.75204332D+01 0.27175775D-01
+ 0.16000000D+01 0.17000000D+01 0.71355706D+01 0.20725380D-01
+ 0.17000000D+01 0.18000000D+01 0.67193735D+01 0.19379241D-01
+ 0.18000000D+01 0.19000000D+01 0.62786958D+01 0.18678691D-01
+ 0.19000000D+01 0.20000000D+01 0.58701325D+01 0.20146575D-01
+ 0.20000000D+01 0.21000000D+01 0.54193709D+01 0.17249612D-01
+ 0.21000000D+01 0.22000000D+01 0.49770023D+01 0.15600410D-01
+ 0.22000000D+01 0.23000000D+01 0.45218203D+01 0.14802279D-01
+ 0.23000000D+01 0.24000000D+01 0.40909475D+01 0.13842939D-01
+ 0.24000000D+01 0.25000000D+01 0.36872259D+01 0.13230665D-01
+ 0.25000000D+01 0.26000000D+01 0.32694313D+01 0.13318095D-01
+ 0.26000000D+01 0.27000000D+01 0.29018490D+01 0.11232440D-01
+ 0.27000000D+01 0.28000000D+01 0.25251087D+01 0.10653702D-01
+ 0.28000000D+01 0.29000000D+01 0.21677640D+01 0.11902347D-01
+ 0.29000000D+01 0.30000000D+01 0.18478945D+01 0.93971397D-02
+ 0.30000000D+01 0.31000000D+01 0.15520201D+01 0.86705459D-02
+ 0.31000000D+01 0.32000000D+01 0.12887387D+01 0.74857766D-02
+ 0.32000000D+01 0.33000000D+01 0.10502165D+01 0.60177924D-02
+ 0.33000000D+01 0.34000000D+01 0.83504201D+00 0.61836188D-02
+ 0.34000000D+01 0.35000000D+01 0.64004228D+00 0.51348094D-02
+ 0.35000000D+01 0.36000000D+01 0.48488119D+00 0.35381182D-02
+ 0.36000000D+01 0.37000000D+01 0.35108678D+00 0.35339151D-02
+ 0.37000000D+01 0.38000000D+01 0.24652841D+00 0.20715692D-02
+ 0.38000000D+01 0.39000000D+01 0.16441675D+00 0.16297990D-02
+ 0.39000000D+01 0.40000000D+01 0.97265890D-01 0.92805251D-03
+ 0.40000000D+01 0.41000000D+01 0.52257847D-01 0.51772977D-03
+ 0.41000000D+01 0.42000000D+01 0.22616440D-01 0.21956526D-03
+ 0.42000000D+01 0.43000000D+01 0.73857033D-02 0.85809151D-04
+ 0.43000000D+01 0.44000000D+01 0.13110336D-02 0.32729587D-04
+ 0.44000000D+01 0.45000000D+01 -.13326956D-03 0.79305922D-05
+ 0.45000000D+01 0.46000000D+01 -.95147719D-04 0.34488902D-05
+ 0.46000000D+01 0.47000000D+01 -.18420798D-05 0.52057807D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18090218D-05 0.52222088D-06
+ -.46000000D+01 -.45000000D+01 -.92235831D-04 0.34942465D-05
+ -.45000000D+01 -.44000000D+01 -.12815567D-03 0.73999533D-05
+ -.44000000D+01 -.43000000D+01 0.12261859D-02 0.29168882D-04
+ -.43000000D+01 -.42000000D+01 0.69360418D-02 0.85481454D-04
+ -.42000000D+01 -.41000000D+01 0.20687007D-01 0.21731477D-03
+ -.41000000D+01 -.40000000D+01 0.45038881D-01 0.46944223D-03
+ -.40000000D+01 -.39000000D+01 0.84196994D-01 0.11058989D-02
+ -.39000000D+01 -.38000000D+01 0.13854120D+00 0.13729483D-02
+ -.38000000D+01 -.37000000D+01 0.20773658D+00 0.18847157D-02
+ -.37000000D+01 -.36000000D+01 0.30037492D+00 0.30989046D-02
+ -.36000000D+01 -.35000000D+01 0.40110561D+00 0.39822936D-02
+ -.35000000D+01 -.34000000D+01 0.52997128D+00 0.48171936D-02
+ -.34000000D+01 -.33000000D+01 0.67520111D+00 0.67714453D-02
+ -.33000000D+01 -.32000000D+01 0.84508851D+00 0.65013966D-02
+ -.32000000D+01 -.31000000D+01 0.10245031D+01 0.80173795D-02
+ -.31000000D+01 -.30000000D+01 0.12402137D+01 0.85512545D-02
+ -.30000000D+01 -.29000000D+01 0.14448911D+01 0.86982978D-02
+ -.29000000D+01 -.28000000D+01 0.16973670D+01 0.10248712D-01
+ -.28000000D+01 -.27000000D+01 0.19630716D+01 0.11966392D-01
+ -.27000000D+01 -.26000000D+01 0.22496390D+01 0.11285259D-01
+ -.26000000D+01 -.25000000D+01 0.24987346D+01 0.12042059D-01
+ -.25000000D+01 -.24000000D+01 0.28394007D+01 0.13991000D-01
+ -.24000000D+01 -.23000000D+01 0.31138075D+01 0.14845183D-01
+ -.23000000D+01 -.22000000D+01 0.34542046D+01 0.14231919D-01
+ -.22000000D+01 -.21000000D+01 0.37740274D+01 0.15955559D-01
+ -.21000000D+01 -.20000000D+01 0.40728366D+01 0.15944857D-01
+ -.20000000D+01 -.19000000D+01 0.44090760D+01 0.18058662D-01
+ -.19000000D+01 -.18000000D+01 0.46831583D+01 0.25432528D-01
+ -.18000000D+01 -.17000000D+01 0.49920940D+01 0.23243809D-01
+ -.17000000D+01 -.16000000D+01 0.53048708D+01 0.22294469D-01
+ -.16000000D+01 -.15000000D+01 0.55734793D+01 0.18671754D-01
+ -.15000000D+01 -.14000000D+01 0.58442991D+01 0.22645898D-01
+ -.14000000D+01 -.13000000D+01 0.61120775D+01 0.26231461D-01
+ -.13000000D+01 -.12000000D+01 0.63294681D+01 0.23540367D-01
+ -.12000000D+01 -.11000000D+01 0.65505614D+01 0.24630110D-01
+ -.11000000D+01 -.10000000D+01 0.67609918D+01 0.21950552D-01
+ -.10000000D+01 -.90000000D+00 0.69164403D+01 0.23291266D-01
+ -.90000000D+00 -.80000000D+00 0.70971712D+01 0.24966715D-01
+ -.80000000D+00 -.70000000D+00 0.72051566D+01 0.22675310D-01
+ -.70000000D+00 -.60000000D+00 0.73906364D+01 0.23290324D-01
+ -.60000000D+00 -.50000000D+00 0.74559666D+01 0.22297207D-01
+ -.50000000D+00 -.40000000D+00 0.75605148D+01 0.23287837D-01
+ -.40000000D+00 -.30000000D+00 0.76475846D+01 0.24965148D-01
+ -.30000000D+00 -.20000000D+00 0.77390638D+01 0.23839056D-01
+ -.20000000D+00 -.10000000D+00 0.77464853D+01 0.23628972D-01
+ -.10000000D+00 0.18041124D-15 0.77562167D+01 0.22680598D-01
+ 0.70776718D-15 0.10000000D+00 0.78241166D+01 0.29740520D-01
+ 0.10000000D+00 0.20000000D+00 0.77290475D+01 0.23428171D-01
+ 0.20000000D+00 0.30000000D+00 0.77377504D+01 0.22492091D-01
+ 0.30000000D+00 0.40000000D+00 0.76562762D+01 0.23449655D-01
+ 0.40000000D+00 0.50000000D+00 0.76246103D+01 0.24476835D-01
+ 0.50000000D+00 0.60000000D+00 0.74781179D+01 0.23406492D-01
+ 0.60000000D+00 0.70000000D+00 0.73856438D+01 0.22716005D-01
+ 0.70000000D+00 0.80000000D+00 0.72843352D+01 0.25345665D-01
+ 0.80000000D+00 0.90000000D+00 0.70947208D+01 0.23335323D-01
+ 0.90000000D+00 0.10000000D+01 0.69654895D+01 0.20913342D-01
+ 0.10000000D+01 0.11000000D+01 0.67415292D+01 0.22371540D-01
+ 0.11000000D+01 0.12000000D+01 0.65500946D+01 0.23790277D-01
+ 0.12000000D+01 0.13000000D+01 0.63279679D+01 0.20394418D-01
+ 0.13000000D+01 0.14000000D+01 0.60759449D+01 0.21034896D-01
+ 0.14000000D+01 0.15000000D+01 0.58161376D+01 0.22362065D-01
+ 0.15000000D+01 0.16000000D+01 0.55650934D+01 0.26394241D-01
+ 0.16000000D+01 0.17000000D+01 0.53026001D+01 0.19741471D-01
+ 0.17000000D+01 0.18000000D+01 0.50077755D+01 0.19157212D-01
+ 0.18000000D+01 0.19000000D+01 0.46891658D+01 0.18469646D-01
+ 0.19000000D+01 0.20000000D+01 0.44071769D+01 0.20073664D-01
+ 0.20000000D+01 0.21000000D+01 0.40805148D+01 0.17173656D-01
+ 0.21000000D+01 0.22000000D+01 0.37609894D+01 0.15490916D-01
+ 0.22000000D+01 0.23000000D+01 0.34275172D+01 0.14667963D-01
+ 0.23000000D+01 0.24000000D+01 0.31143871D+01 0.13733586D-01
+ 0.24000000D+01 0.25000000D+01 0.28220324D+01 0.13144279D-01
+ 0.25000000D+01 0.26000000D+01 0.25121636D+01 0.13262425D-01
+ 0.26000000D+01 0.27000000D+01 0.22450062D+01 0.11184159D-01
+ 0.27000000D+01 0.28000000D+01 0.19634702D+01 0.10591644D-01
+ 0.28000000D+01 0.29000000D+01 0.16923167D+01 0.11850317D-01
+ 0.29000000D+01 0.30000000D+01 0.14519427D+01 0.93688100D-02
+ 0.30000000D+01 0.31000000D+01 0.12278712D+01 0.86293024D-02
+ 0.31000000D+01 0.32000000D+01 0.10278318D+01 0.74445833D-02
+ 0.32000000D+01 0.33000000D+01 0.84542025D+00 0.59790808D-02
+ 0.33000000D+01 0.34000000D+01 0.67779437D+00 0.61467944D-02
+ 0.34000000D+01 0.35000000D+01 0.52353410D+00 0.50864530D-02
+ 0.35000000D+01 0.36000000D+01 0.40087979D+00 0.35237301D-02
+ 0.36000000D+01 0.37000000D+01 0.29364610D+00 0.35259275D-02
+ 0.37000000D+01 0.38000000D+01 0.20937996D+00 0.20656954D-02
+ 0.38000000D+01 0.39000000D+01 0.14215162D+00 0.16260648D-02
+ 0.39000000D+01 0.40000000D+01 0.85311376D-01 0.92594590D-03
+ 0.40000000D+01 0.41000000D+01 0.46679060D-01 0.51695725D-03
+ 0.41000000D+01 0.42000000D+01 0.20507707D-01 0.21911723D-03
+ 0.42000000D+01 0.43000000D+01 0.68035324D-02 0.85637839D-04
+ 0.43000000D+01 0.44000000D+01 0.12310286D-02 0.32706619D-04
+ 0.44000000D+01 0.45000000D+01 -.12415261D-03 0.79237349D-05
+ 0.45000000D+01 0.46000000D+01 -.92036721D-04 0.34484563D-05
+ 0.46000000D+01 0.47000000D+01 -.18241408D-05 0.52057644D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18175604D-05 0.52222160D-06
+ -.46000000D+01 -.45000000D+01 -.93666247D-04 0.34944543D-05
+ -.45000000D+01 -.44000000D+01 -.13201937D-03 0.74006249D-05
+ -.44000000D+01 -.43000000D+01 0.12623906D-02 0.29177955D-04
+ -.43000000D+01 -.42000000D+01 0.71877133D-02 0.85544534D-04
+ -.42000000D+01 -.41000000D+01 0.21577430D-01 0.21755391D-03
+ -.41000000D+01 -.40000000D+01 0.47319151D-01 0.46989217D-03
+ -.40000000D+01 -.39000000D+01 0.88971296D-01 0.11067031D-02
+ -.39000000D+01 -.38000000D+01 0.14717968D+00 0.13745067D-02
+ -.38000000D+01 -.37000000D+01 0.22187784D+00 0.18875100D-02
+ -.37000000D+01 -.36000000D+01 0.32182570D+00 0.31043181D-02
+ -.36000000D+01 -.35000000D+01 0.43160225D+00 0.39878282D-02
+ -.35000000D+01 -.34000000D+01 0.57184558D+00 0.48269018D-02
+ -.34000000D+01 -.33000000D+01 0.73037634D+00 0.67800418D-02
+ -.33000000D+01 -.32000000D+01 0.91587884D+00 0.65103967D-02
+ -.32000000D+01 -.31000000D+01 0.11132725D+01 0.80252675D-02
+ -.31000000D+01 -.30000000D+01 0.13491914D+01 0.85618818D-02
+ -.30000000D+01 -.29000000D+01 0.15764243D+01 0.87183649D-02
+ -.29000000D+01 -.28000000D+01 0.18535837D+01 0.10265381D-01
+ -.28000000D+01 -.27000000D+01 0.21457664D+01 0.11979456D-01
+ -.27000000D+01 -.26000000D+01 0.24607137D+01 0.11304167D-01
+ -.26000000D+01 -.25000000D+01 0.27400775D+01 0.12072329D-01
+ -.25000000D+01 -.24000000D+01 0.31124427D+01 0.14012512D-01
+ -.24000000D+01 -.23000000D+01 0.34204713D+01 0.14889330D-01
+ -.23000000D+01 -.22000000D+01 0.37937662D+01 0.14281392D-01
+ -.22000000D+01 -.21000000D+01 0.41487922D+01 0.15979984D-01
+ -.21000000D+01 -.20000000D+01 0.44834123D+01 0.15975103D-01
+ -.20000000D+01 -.19000000D+01 0.48550321D+01 0.18087490D-01
+ -.19000000D+01 -.18000000D+01 0.51643327D+01 0.25518742D-01
+ -.18000000D+01 -.17000000D+01 0.55064976D+01 0.23340852D-01
+ -.17000000D+01 -.16000000D+01 0.58533217D+01 0.22320411D-01
+ -.16000000D+01 -.15000000D+01 0.61546922D+01 0.18756969D-01
+ -.15000000D+01 -.14000000D+01 0.64580893D+01 0.22720228D-01
+ -.14000000D+01 -.13000000D+01 0.67553713D+01 0.26311698D-01
+ -.13000000D+01 -.12000000D+01 0.70021312D+01 0.23628606D-01
+ -.12000000D+01 -.11000000D+01 0.72496778D+01 0.24700822D-01
+ -.11000000D+01 -.10000000D+01 0.74854026D+01 0.22020164D-01
+ -.10000000D+01 -.90000000D+00 0.76636436D+01 0.23329589D-01
+ -.90000000D+00 -.80000000D+00 0.78658505D+01 0.25000199D-01
+ -.80000000D+00 -.70000000D+00 0.79925706D+01 0.22708998D-01
+ -.70000000D+00 -.60000000D+00 0.81944991D+01 0.23328246D-01
+ -.60000000D+00 -.50000000D+00 0.82743524D+01 0.22337088D-01
+ -.50000000D+00 -.40000000D+00 0.83902241D+01 0.23333554D-01
+ -.40000000D+00 -.30000000D+00 0.84869005D+01 0.25003676D-01
+ -.30000000D+00 -.20000000D+00 0.85866445D+01 0.23888716D-01
+ -.20000000D+00 -.10000000D+00 0.85980031D+01 0.23680346D-01
+ -.10000000D+00 0.18041124D-15 0.86114236D+01 0.22725202D-01
+ 0.70776718D-15 0.10000000D+00 0.86783595D+01 0.29785433D-01
+ 0.10000000D+00 0.20000000D+00 0.85810094D+01 0.23463361D-01
+ 0.20000000D+00 0.30000000D+00 0.85844747D+01 0.22525630D-01
+ 0.30000000D+00 0.40000000D+00 0.84960949D+01 0.23487053D-01
+ 0.40000000D+00 0.50000000D+00 0.84557110D+01 0.24726377D-01
+ 0.50000000D+00 0.60000000D+00 0.82953773D+01 0.23663505D-01
+ 0.60000000D+00 0.70000000D+00 0.81893802D+01 0.22759849D-01
+ 0.70000000D+00 0.80000000D+00 0.80723482D+01 0.25384573D-01
+ 0.80000000D+00 0.90000000D+00 0.78629834D+01 0.23379848D-01
+ 0.90000000D+00 0.10000000D+01 0.77128501D+01 0.20963011D-01
+ 0.10000000D+01 0.11000000D+01 0.74661345D+01 0.22411814D-01
+ 0.11000000D+01 0.12000000D+01 0.72486643D+01 0.23938163D-01
+ 0.12000000D+01 0.13000000D+01 0.70011797D+01 0.20557610D-01
+ 0.13000000D+01 0.14000000D+01 0.67192936D+01 0.21060764D-01
+ 0.14000000D+01 0.15000000D+01 0.64292644D+01 0.22393211D-01
+ 0.15000000D+01 0.16000000D+01 0.61467934D+01 0.26436119D-01
+ 0.16000000D+01 0.17000000D+01 0.58511743D+01 0.19801545D-01
+ 0.17000000D+01 0.18000000D+01 0.55228868D+01 0.19215397D-01
+ 0.18000000D+01 0.19000000D+01 0.51698755D+01 0.18524864D-01
+ 0.19000000D+01 0.20000000D+01 0.48528146D+01 0.20091500D-01
+ 0.20000000D+01 0.21000000D+01 0.44906094D+01 0.17195813D-01
+ 0.21000000D+01 0.22000000D+01 0.41359994D+01 0.15517845D-01
+ 0.22000000D+01 0.23000000D+01 0.37676599D+01 0.14701322D-01
+ 0.23000000D+01 0.24000000D+01 0.34203653D+01 0.13768987D-01
+ 0.24000000D+01 0.25000000D+01 0.30952087D+01 0.13168426D-01
+ 0.25000000D+01 0.26000000D+01 0.27534997D+01 0.13280755D-01
+ 0.26000000D+01 0.27000000D+01 0.24562535D+01 0.11199017D-01
+ 0.27000000D+01 0.28000000D+01 0.21459559D+01 0.10611738D-01
+ 0.28000000D+01 0.29000000D+01 0.18485340D+01 0.11867738D-01
+ 0.29000000D+01 0.30000000D+01 0.15834954D+01 0.93770968D-02
+ 0.30000000D+01 0.31000000D+01 0.13368750D+01 0.86419070D-02
+ 0.31000000D+01 0.32000000D+01 0.11167526D+01 0.74563407D-02
+ 0.32000000D+01 0.33000000D+01 0.91632071D+00 0.59905345D-02
+ 0.33000000D+01 0.34000000D+01 0.73305628D+00 0.61593229D-02
+ 0.34000000D+01 0.35000000D+01 0.56520357D+00 0.51028400D-02
+ 0.35000000D+01 0.36000000D+01 0.43146653D+00 0.35293859D-02
+ 0.36000000D+01 0.37000000D+01 0.31500117D+00 0.35291364D-02
+ 0.37000000D+01 0.38000000D+01 0.22349427D+00 0.20680389D-02
+ 0.38000000D+01 0.39000000D+01 0.15081011D+00 0.16275588D-02
+ 0.39000000D+01 0.40000000D+01 0.90075805D-01 0.92682880D-03
+ 0.40000000D+01 0.41000000D+01 0.48959047D-01 0.51731592D-03
+ 0.41000000D+01 0.42000000D+01 0.21393378D-01 0.21930653D-03
+ 0.42000000D+01 0.43000000D+01 0.70555929D-02 0.85712192D-04
+ 0.43000000D+01 0.44000000D+01 0.12673544D-02 0.32716910D-04
+ 0.44000000D+01 0.45000000D+01 -.12798130D-03 0.79269070D-05
+ 0.45000000D+01 0.46000000D+01 -.93463748D-04 0.34486562D-05
+ 0.46000000D+01 0.47000000D+01 -.18327492D-05 0.52057723D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18222320D-05 0.52222199D-06
+ -.46000000D+01 -.45000000D+01 -.94496408D-04 0.34945731D-05
+ -.45000000D+01 -.44000000D+01 -.13450587D-03 0.74010235D-05
+ -.44000000D+01 -.43000000D+01 0.12837503D-02 0.29183157D-04
+ -.43000000D+01 -.42000000D+01 0.73444994D-02 0.85581777D-04
+ -.42000000D+01 -.41000000D+01 0.22150562D-01 0.21769106D-03
+ -.41000000D+01 -.40000000D+01 0.48825606D-01 0.47016037D-03
+ -.40000000D+01 -.39000000D+01 0.92204648D-01 0.11072961D-02
+ -.39000000D+01 -.38000000D+01 0.15315479D+00 0.13755687D-02
+ -.38000000D+01 -.37000000D+01 0.23185758D+00 0.18896271D-02
+ -.37000000D+01 -.36000000D+01 0.33724446D+00 0.31079587D-02
+ -.36000000D+01 -.35000000D+01 0.45388200D+00 0.39916354D-02
+ -.35000000D+01 -.34000000D+01 0.60282046D+00 0.48349367D-02
+ -.34000000D+01 -.33000000D+01 0.77170341D+00 0.67864372D-02
+ -.33000000D+01 -.32000000D+01 0.96945100D+00 0.65166306D-02
+ -.32000000D+01 -.31000000D+01 0.11811528D+01 0.80306976D-02
+ -.31000000D+01 -.30000000D+01 0.14332150D+01 0.85693131D-02
+ -.30000000D+01 -.29000000D+01 0.16786105D+01 0.87361208D-02
+ -.29000000D+01 -.28000000D+01 0.19757074D+01 0.10279788D-01
+ -.28000000D+01 -.27000000D+01 0.22895298D+01 0.11988954D-01
+ -.27000000D+01 -.26000000D+01 0.26277128D+01 0.11317884D-01
+ -.26000000D+01 -.25000000D+01 0.29319036D+01 0.12096065D-01
+ -.25000000D+01 -.24000000D+01 0.33306486D+01 0.14030757D-01
+ -.24000000D+01 -.23000000D+01 0.36667367D+01 0.14945915D-01
+ -.23000000D+01 -.22000000D+01 0.40672677D+01 0.14341547D-01
+ -.22000000D+01 -.21000000D+01 0.44519073D+01 0.15998533D-01
+ -.21000000D+01 -.20000000D+01 0.48166641D+01 0.16000177D-01
+ -.20000000D+01 -.19000000D+01 0.52179774D+01 0.18112659D-01
+ -.19000000D+01 -.18000000D+01 0.55577003D+01 0.25634817D-01
+ -.18000000D+01 -.17000000D+01 0.59276395D+01 0.23471145D-01
+ -.17000000D+01 -.16000000D+01 0.63038443D+01 0.22340537D-01
+ -.16000000D+01 -.15000000D+01 0.66330983D+01 0.18876270D-01
+ -.15000000D+01 -.14000000D+01 0.69649377D+01 0.22823385D-01
+ -.14000000D+01 -.13000000D+01 0.72874001D+01 0.26367225D-01
+ -.13000000D+01 -.12000000D+01 0.75598476D+01 0.23689546D-01
+ -.12000000D+01 -.11000000D+01 0.78300074D+01 0.24761606D-01
+ -.11000000D+01 -.10000000D+01 0.80881416D+01 0.22084633D-01
+ -.10000000D+01 -.90000000D+00 0.82860280D+01 0.23360890D-01
+ -.90000000D+00 -.80000000D+00 0.85069032D+01 0.25028345D-01
+ -.80000000D+00 -.70000000D+00 0.86501490D+01 0.22735996D-01
+ -.70000000D+00 -.60000000D+00 0.88664988D+01 0.23358086D-01
+ -.60000000D+00 -.50000000D+00 0.89592673D+01 0.22370505D-01
+ -.50000000D+00 -.40000000D+00 0.90849031D+01 0.23372816D-01
+ -.40000000D+00 -.30000000D+00 0.91903180D+01 0.25037436D-01
+ -.30000000D+00 -.20000000D+00 0.92969892D+01 0.23924324D-01
+ -.20000000D+00 -.10000000D+00 0.93119462D+01 0.23720936D-01
+ -.10000000D+00 0.18041124D-15 0.93286503D+01 0.22764193D-01
+ 0.70776718D-15 0.10000000D+00 0.93947690D+01 0.29824367D-01
+ 0.10000000D+00 0.20000000D+00 0.92952541D+01 0.23491737D-01
+ 0.20000000D+00 0.30000000D+00 0.92941774D+01 0.22554092D-01
+ 0.30000000D+00 0.40000000D+00 0.91998504D+01 0.23517612D-01
+ 0.40000000D+00 0.50000000D+00 0.91513899D+01 0.24969614D-01
+ 0.50000000D+00 0.60000000D+00 0.89792763D+01 0.23908872D-01
+ 0.60000000D+00 0.70000000D+00 0.88611876D+01 0.22798362D-01
+ 0.70000000D+00 0.80000000D+00 0.87306337D+01 0.25418380D-01
+ 0.80000000D+00 0.90000000D+00 0.85037832D+01 0.23415951D-01
+ 0.90000000D+00 0.10000000D+01 0.83352308D+01 0.21003958D-01
+ 0.10000000D+01 0.11000000D+01 0.80689514D+01 0.22446118D-01
+ 0.11000000D+01 0.12000000D+01 0.78288280D+01 0.24056325D-01
+ 0.12000000D+01 0.13000000D+01 0.75590926D+01 0.20688245D-01
+ 0.13000000D+01 0.14000000D+01 0.72513857D+01 0.21081162D-01
+ 0.14000000D+01 0.15000000D+01 0.69355942D+01 0.22416858D-01
+ 0.15000000D+01 0.16000000D+01 0.66258298D+01 0.26489641D-01
+ 0.16000000D+01 0.17000000D+01 0.63017425D+01 0.19873730D-01
+ 0.17000000D+01 0.18000000D+01 0.59447378D+01 0.19267709D-01
+ 0.18000000D+01 0.19000000D+01 0.55625540D+01 0.18574196D-01
+ 0.19000000D+01 0.20000000D+01 0.52155977D+01 0.20105931D-01
+ 0.20000000D+01 0.21000000D+01 0.48234843D+01 0.17212144D-01
+ 0.21000000D+01 0.22000000D+01 0.44394097D+01 0.15541677D-01
+ 0.22000000D+01 0.23000000D+01 0.40417290D+01 0.14730594D-01
+ 0.23000000D+01 0.24000000D+01 0.36658605D+01 0.13796433D-01
+ 0.24000000D+01 0.25000000D+01 0.33135352D+01 0.13188930D-01
+ 0.25000000D+01 0.26000000D+01 0.29454239D+01 0.13294139D-01
+ 0.26000000D+01 0.27000000D+01 0.26234140D+01 0.11210399D-01
+ 0.27000000D+01 0.28000000D+01 0.22895032D+01 0.10627593D-01
+ 0.28000000D+01 0.29000000D+01 0.19706665D+01 0.11880986D-01
+ 0.29000000D+01 0.30000000D+01 0.16856524D+01 0.93834667D-02
+ 0.30000000D+01 0.31000000D+01 0.14209130D+01 0.86520952D-02
+ 0.31000000D+01 0.32000000D+01 0.11847471D+01 0.74657509D-02
+ 0.32000000D+01 0.33000000D+01 0.96997000D+00 0.59994940D-02
+ 0.33000000D+01 0.34000000D+01 0.77445491D+00 0.61692838D-02
+ 0.34000000D+01 0.35000000D+01 0.59603957D+00 0.51159319D-02
+ 0.35000000D+01 0.36000000D+01 0.45380565D+00 0.35332056D-02
+ 0.36000000D+01 0.37000000D+01 0.33034658D+00 0.35312552D-02
+ 0.37000000D+01 0.38000000D+01 0.23345819D+00 0.20695845D-02
+ 0.38000000D+01 0.39000000D+01 0.15680260D+00 0.16285571D-02
+ 0.39000000D+01 0.40000000D+01 0.93300694D-01 0.92738778D-03
+ 0.40000000D+01 0.41000000D+01 0.50465866D-01 0.51751952D-03
+ 0.41000000D+01 0.42000000D+01 0.21962987D-01 0.21942404D-03
+ 0.42000000D+01 0.43000000D+01 0.72125911D-02 0.85758318D-04
+ 0.43000000D+01 0.44000000D+01 0.12888034D-02 0.32723020D-04
+ 0.44000000D+01 0.45000000D+01 -.13045054D-03 0.79287307D-05
+ 0.45000000D+01 0.46000000D+01 -.94292690D-04 0.34487715D-05
+ 0.46000000D+01 0.47000000D+01 -.18374587D-05 0.52057766D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18244653D-05 0.52222217D-06
+ -.46000000D+01 -.45000000D+01 -.94907642D-04 0.34946316D-05
+ -.45000000D+01 -.44000000D+01 -.13582729D-03 0.74012247D-05
+ -.44000000D+01 -.43000000D+01 0.12943843D-02 0.29185728D-04
+ -.43000000D+01 -.42000000D+01 0.74259638D-02 0.85600503D-04
+ -.42000000D+01 -.41000000D+01 0.22456364D-01 0.21775876D-03
+ -.41000000D+01 -.40000000D+01 0.49647242D-01 0.47029719D-03
+ -.40000000D+01 -.39000000D+01 0.94006829D-01 0.11076718D-02
+ -.39000000D+01 -.38000000D+01 0.15654945D+00 0.13762047D-02
+ -.38000000D+01 -.37000000D+01 0.23763146D+00 0.18910867D-02
+ -.37000000D+01 -.36000000D+01 0.34633032D+00 0.31100580D-02
+ -.36000000D+01 -.35000000D+01 0.46722428D+00 0.39939411D-02
+ -.35000000D+01 -.34000000D+01 0.62160511D+00 0.48402663D-02
+ -.34000000D+01 -.33000000D+01 0.79711304D+00 0.67903427D-02
+ -.33000000D+01 -.32000000D+01 0.10027593D+01 0.65203434D-02
+ -.32000000D+01 -.31000000D+01 0.12238212D+01 0.80339725D-02
+ -.31000000D+01 -.30000000D+01 0.14865310D+01 0.85736903D-02
+ -.30000000D+01 -.29000000D+01 0.17439981D+01 0.87488436D-02
+ -.29000000D+01 -.28000000D+01 0.20544453D+01 0.10290204D-01
+ -.28000000D+01 -.27000000D+01 0.23828875D+01 0.11994767D-01
+ -.27000000D+01 -.26000000D+01 0.27368807D+01 0.11326376D-01
+ -.26000000D+01 -.25000000D+01 0.30579738D+01 0.12113211D-01
+ -.25000000D+01 -.24000000D+01 0.34750024D+01 0.14045264D-01
+ -.24000000D+01 -.23000000D+01 0.38305074D+01 0.14999199D-01
+ -.23000000D+01 -.22000000D+01 0.42499262D+01 0.14396934D-01
+ -.22000000D+01 -.21000000D+01 0.46552693D+01 0.16010875D-01
+ -.21000000D+01 -.20000000D+01 0.50412145D+01 0.16018274D-01
+ -.20000000D+01 -.19000000D+01 0.54633340D+01 0.18131207D-01
+ -.19000000D+01 -.18000000D+01 0.58249191D+01 0.25752275D-01
+ -.18000000D+01 -.17000000D+01 0.62143755D+01 0.23602405D-01
+ -.17000000D+01 -.16000000D+01 0.66117069D+01 0.22353593D-01
+ -.16000000D+01 -.15000000D+01 0.69608987D+01 0.18999807D-01
+ -.15000000D+01 -.14000000D+01 0.73134440D+01 0.22931292D-01
+ -.14000000D+01 -.13000000D+01 0.76539628D+01 0.26402443D-01
+ -.13000000D+01 -.12000000D+01 0.79451810D+01 0.23727554D-01
+ -.12000000D+01 -.11000000D+01 0.82315475D+01 0.24803059D-01
+ -.11000000D+01 -.10000000D+01 0.85063844D+01 0.22131562D-01
+ -.10000000D+01 -.90000000D+00 0.87184888D+01 0.23385631D-01
+ -.90000000D+00 -.80000000D+00 0.89530002D+01 0.25051552D-01
+ -.80000000D+00 -.70000000D+00 0.91084004D+01 0.22755731D-01
+ -.70000000D+00 -.60000000D+00 0.93353859D+01 0.23379183D-01
+ -.60000000D+00 -.50000000D+00 0.94378387D+01 0.22398125D-01
+ -.50000000D+00 -.40000000D+00 0.95705157D+01 0.23404967D-01
+ -.40000000D+00 -.30000000D+00 0.96825576D+01 0.25062845D-01
+ -.30000000D+00 -.20000000D+00 0.97941623D+01 0.23946479D-01
+ -.20000000D+00 -.10000000D+00 0.98118375D+01 0.23749186D-01
+ -.10000000D+00 0.18041124D-15 0.98309693D+01 0.22793282D-01
+ 0.70776718D-15 0.10000000D+00 0.98965799D+01 0.29852177D-01
+ 0.10000000D+00 0.20000000D+00 0.97953259D+01 0.23511720D-01
+ 0.20000000D+00 0.30000000D+00 0.97909728D+01 0.22575933D-01
+ 0.30000000D+00 0.40000000D+00 0.96923416D+01 0.23541108D-01
+ 0.40000000D+00 0.50000000D+00 0.96376170D+01 0.25146381D-01
+ 0.50000000D+00 0.60000000D+00 0.94569983D+01 0.24084130D-01
+ 0.60000000D+00 0.70000000D+00 0.93299047D+01 0.22827636D-01
+ 0.70000000D+00 0.80000000D+00 0.91896116D+01 0.25446017D-01
+ 0.80000000D+00 0.90000000D+00 0.89496671D+01 0.23444398D-01
+ 0.90000000D+00 0.10000000D+01 0.87675724D+01 0.21034138D-01
+ 0.10000000D+01 0.11000000D+01 0.84871791D+01 0.22471431D-01
+ 0.11000000D+01 0.12000000D+01 0.82304956D+01 0.24130177D-01
+ 0.12000000D+01 0.13000000D+01 0.79443804D+01 0.20769720D-01
+ 0.13000000D+01 0.14000000D+01 0.76179656D+01 0.21095267D-01
+ 0.14000000D+01 0.15000000D+01 0.72838043D+01 0.22431735D-01
+ 0.15000000D+01 0.16000000D+01 0.69541899D+01 0.26556143D-01
+ 0.16000000D+01 0.17000000D+01 0.66096158D+01 0.19958122D-01
+ 0.17000000D+01 0.18000000D+01 0.62319529D+01 0.19306294D-01
+ 0.18000000D+01 0.19000000D+01 0.58291855D+01 0.18610182D-01
+ 0.19000000D+01 0.20000000D+01 0.54609003D+01 0.20116938D-01
+ 0.20000000D+01 0.21000000D+01 0.50478090D+01 0.17223154D-01
+ 0.21000000D+01 0.22000000D+01 0.46430515D+01 0.15560522D-01
+ 0.22000000D+01 0.23000000D+01 0.42247683D+01 0.14753424D-01
+ 0.23000000D+01 0.24000000D+01 0.38290217D+01 0.13814202D-01
+ 0.24000000D+01 0.25000000D+01 0.34579569D+01 0.13203616D-01
+ 0.25000000D+01 0.26000000D+01 0.30716425D+01 0.13302624D-01
+ 0.26000000D+01 0.27000000D+01 0.27326866D+01 0.11218011D-01
+ 0.27000000D+01 0.28000000D+01 0.23827274D+01 0.10637900D-01
+ 0.28000000D+01 0.29000000D+01 0.20493907D+01 0.11889333D-01
+ 0.29000000D+01 0.30000000D+01 0.17510121D+01 0.93880229D-02
+ 0.30000000D+01 0.31000000D+01 0.14742354D+01 0.86590947D-02
+ 0.31000000D+01 0.32000000D+01 0.12274902D+01 0.74726414D-02
+ 0.32000000D+01 0.33000000D+01 0.10033157D+01 0.60058982D-02
+ 0.33000000D+01 0.34000000D+01 0.79990798D+00 0.61754192D-02
+ 0.34000000D+01 0.35000000D+01 0.61475181D+00 0.51240315D-02
+ 0.35000000D+01 0.36000000D+01 0.46717763D+00 0.35353772D-02
+ 0.36000000D+01 0.37000000D+01 0.33938590D+00 0.35324423D-02
+ 0.37000000D+01 0.38000000D+01 0.23922780D+00 0.20704603D-02
+ 0.38000000D+01 0.39000000D+01 0.16020818D+00 0.16291164D-02
+ 0.39000000D+01 0.40000000D+01 0.95097172D-01 0.92769062D-03
+ 0.40000000D+01 0.41000000D+01 0.51287974D-01 0.51762001D-03
+ 0.41000000D+01 0.42000000D+01 0.22266677D-01 0.21948772D-03
+ 0.42000000D+01 0.43000000D+01 0.72941469D-02 0.85782258D-04
+ 0.43000000D+01 0.44000000D+01 0.12994899D-02 0.32726128D-04
+ 0.44000000D+01 0.45000000D+01 -.13176453D-03 0.79296280D-05
+ 0.45000000D+01 0.46000000D+01 -.94703549D-04 0.34488286D-05
+ 0.46000000D+01 0.47000000D+01 -.18397100D-05 0.52057786D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.17950354D-05 0.52222096D-06
+ -.46000000D+01 -.45000000D+01 -.89571867D-04 0.34943118D-05
+ -.45000000D+01 -.44000000D+01 -.12427490D-03 0.74004139D-05
+ -.44000000D+01 -.43000000D+01 0.11192805D-02 0.29174093D-04
+ -.43000000D+01 -.42000000D+01 0.62750748D-02 0.85571495D-04
+ -.42000000D+01 -.41000000D+01 0.18424019D-01 0.21751244D-03
+ -.41000000D+01 -.40000000D+01 0.39291517D-01 0.46997211D-03
+ -.40000000D+01 -.39000000D+01 0.72219535D-01 0.11074312D-02
+ -.39000000D+01 -.38000000D+01 0.11691430D+00 0.13751641D-02
+ -.38000000D+01 -.37000000D+01 0.17240827D+00 0.18884205D-02
+ -.37000000D+01 -.36000000D+01 0.24705500D+00 0.31015475D-02
+ -.36000000D+01 -.35000000D+01 0.32510689D+00 0.39875882D-02
+ -.35000000D+01 -.34000000D+01 0.42609128D+00 0.48200004D-02
+ -.34000000D+01 -.33000000D+01 0.53831052D+00 0.67753841D-02
+ -.33000000D+01 -.32000000D+01 0.66986143D+00 0.65103756D-02
+ -.32000000D+01 -.31000000D+01 0.80560455D+00 0.80241683D-02
+ -.31000000D+01 -.30000000D+01 0.97234045D+00 0.85626903D-02
+ -.30000000D+01 -.29000000D+01 0.11227403D+01 0.87071995D-02
+ -.29000000D+01 -.28000000D+01 0.13161016D+01 0.10256954D-01
+ -.28000000D+01 -.27000000D+01 0.15178950D+01 0.11980449D-01
+ -.27000000D+01 -.26000000D+01 0.17360207D+01 0.11303676D-01
+ -.26000000D+01 -.25000000D+01 0.19136619D+01 0.12054085D-01
+ -.25000000D+01 -.24000000D+01 0.21794647D+01 0.14011233D-01
+ -.24000000D+01 -.23000000D+01 0.23749212D+01 0.14857828D-01
+ -.23000000D+01 -.22000000D+01 0.26360615D+01 0.14231391D-01
+ -.22000000D+01 -.21000000D+01 0.28734346D+01 0.15978888D-01
+ -.21000000D+01 -.20000000D+01 0.30891390D+01 0.15969566D-01
+ -.20000000D+01 -.19000000D+01 0.33426001D+01 0.18077954D-01
+ -.19000000D+01 -.18000000D+01 0.35346135D+01 0.25421847D-01
+ -.18000000D+01 -.17000000D+01 0.37645568D+01 0.23229938D-01
+ -.17000000D+01 -.16000000D+01 0.39976244D+01 0.22311976D-01
+ -.16000000D+01 -.15000000D+01 0.41902842D+01 0.18680901D-01
+ -.15000000D+01 -.14000000D+01 0.43868691D+01 0.22658017D-01
+ -.14000000D+01 -.13000000D+01 0.45844618D+01 0.26252576D-01
+ -.13000000D+01 -.12000000D+01 0.47350973D+01 0.23546225D-01
+ -.12000000D+01 -.11000000D+01 0.48936283D+01 0.24645290D-01
+ -.11000000D+01 -.10000000D+01 0.50458299D+01 0.21960968D-01
+ -.10000000D+01 -.90000000D+00 0.51476607D+01 0.23307023D-01
+ -.90000000D+00 -.80000000D+00 0.52793930D+01 0.24991253D-01
+ -.80000000D+00 -.70000000D+00 0.53435130D+01 0.22699900D-01
+ -.70000000D+00 -.60000000D+00 0.54898770D+01 0.23321127D-01
+ -.60000000D+00 -.50000000D+00 0.55227253D+01 0.22326150D-01
+ -.50000000D+00 -.40000000D+00 0.55992504D+01 0.23311754D-01
+ -.40000000D+00 -.30000000D+00 0.56634376D+01 0.24980908D-01
+ -.30000000D+00 -.20000000D+00 0.57385143D+01 0.23859703D-01
+ -.20000000D+00 -.10000000D+00 0.57344343D+01 0.23652859D-01
+ -.10000000D+00 0.18041124D-15 0.57384300D+01 0.22709477D-01
+ 0.70776718D-15 0.10000000D+00 0.58066679D+01 0.29750508D-01
+ 0.10000000D+00 0.20000000D+00 0.57173184D+01 0.23457560D-01
+ 0.20000000D+00 0.30000000D+00 0.57373062D+01 0.22518925D-01
+ 0.30000000D+00 0.40000000D+00 0.56722328D+01 0.23473627D-01
+ 0.40000000D+00 0.50000000D+00 0.56629450D+01 0.24395073D-01
+ 0.50000000D+00 0.60000000D+00 0.55444549D+01 0.23330551D-01
+ 0.60000000D+00 0.70000000D+00 0.54853988D+01 0.22744126D-01
+ 0.70000000D+00 0.80000000D+00 0.54226840D+01 0.25366537D-01
+ 0.80000000D+00 0.90000000D+00 0.52768822D+01 0.23353950D-01
+ 0.90000000D+00 0.10000000D+01 0.51968640D+01 0.20937307D-01
+ 0.10000000D+01 0.11000000D+01 0.50261570D+01 0.22400401D-01
+ 0.11000000D+01 0.12000000D+01 0.48935131D+01 0.23757056D-01
+ 0.12000000D+01 0.13000000D+01 0.47330343D+01 0.20351899D-01
+ 0.13000000D+01 0.14000000D+01 0.45484283D+01 0.21061505D-01
+ 0.14000000D+01 0.15000000D+01 0.43584515D+01 0.22381257D-01
+ 0.15000000D+01 0.16000000D+01 0.41818150D+01 0.26399159D-01
+ 0.16000000D+01 0.17000000D+01 0.39951971D+01 0.19755527D-01
+ 0.17000000D+01 0.18000000D+01 0.37793273D+01 0.19164930D-01
+ 0.18000000D+01 0.19000000D+01 0.35418641D+01 0.18476346D-01
+ 0.19000000D+01 0.20000000D+01 0.33413715D+01 0.20095090D-01
+ 0.20000000D+01 0.21000000D+01 0.30972722D+01 0.17189167D-01
+ 0.21000000D+01 0.22000000D+01 0.28606501D+01 0.15504179D-01
+ 0.22000000D+01 0.23000000D+01 0.26090228D+01 0.14677988D-01
+ 0.23000000D+01 0.24000000D+01 0.23761113D+01 0.13742276D-01
+ 0.24000000D+01 0.25000000D+01 0.21613853D+01 0.13156411D-01
+ 0.25000000D+01 0.26000000D+01 0.19267784D+01 0.13279197D-01
+ 0.26000000D+01 0.27000000D+01 0.17315006D+01 0.11203139D-01
+ 0.27000000D+01 0.28000000D+01 0.15183589D+01 0.10608798D-01
+ 0.28000000D+01 0.29000000D+01 0.13105992D+01 0.11856667D-01
+ 0.29000000D+01 0.30000000D+01 0.11298185D+01 0.93792025D-02
+ 0.30000000D+01 0.31000000D+01 0.95977319D+00 0.86587423D-02
+ 0.31000000D+01 0.32000000D+01 0.80885789D+00 0.74508294D-02
+ 0.32000000D+01 0.33000000D+01 0.67024066D+00 0.59924609D-02
+ 0.33000000D+01 0.34000000D+01 0.54074851D+00 0.61513985D-02
+ 0.34000000D+01 0.35000000D+01 0.41968674D+00 0.50858784D-02
+ 0.35000000D+01 0.36000000D+01 0.32469526D+00 0.35301652D-02
+ 0.36000000D+01 0.37000000D+01 0.24036073D+00 0.35297350D-02
+ 0.37000000D+01 0.38000000D+01 0.17409217D+00 0.20689961D-02
+ 0.38000000D+01 0.39000000D+01 0.12048803D+00 0.16274534D-02
+ 0.39000000D+01 0.40000000D+01 0.73351849D-01 0.92692075D-03
+ 0.40000000D+01 0.41000000D+01 0.40943442D-01 0.51761251D-03
+ 0.41000000D+01 0.42000000D+01 0.18245697D-01 0.21932011D-03
+ 0.42000000D+01 0.43000000D+01 0.61427901D-02 0.85691529D-04
+ 0.43000000D+01 0.44000000D+01 0.11239061D-02 0.32711934D-04
+ 0.44000000D+01 0.45000000D+01 -.12030492D-03 0.79233902D-05
+ 0.45000000D+01 0.46000000D+01 -.89367467D-04 0.34485410D-05
+ 0.46000000D+01 0.47000000D+01 -.18103215D-05 0.52057653D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18183572D-05 0.52222201D-06
+ -.46000000D+01 -.45000000D+01 -.93641083D-04 0.34945884D-05
+ -.45000000D+01 -.44000000D+01 -.13270871D-03 0.74011668D-05
+ -.44000000D+01 -.43000000D+01 0.12473113D-02 0.29184733D-04
+ -.43000000D+01 -.42000000D+01 0.70971857D-02 0.85608746D-04
+ -.42000000D+01 -.41000000D+01 0.21251176D-01 0.21775137D-03
+ -.41000000D+01 -.40000000D+01 0.46429940D-01 0.47031266D-03
+ -.40000000D+01 -.39000000D+01 0.86990709D-01 0.11076399D-02
+ -.39000000D+01 -.38000000D+01 0.14337720D+00 0.13760672D-02
+ -.38000000D+01 -.37000000D+01 0.21533109D+00 0.18901455D-02
+ -.37000000D+01 -.36000000D+01 0.31151841D+00 0.31081910D-02
+ -.36000000D+01 -.35000000D+01 0.41624702D+00 0.39928155D-02
+ -.35000000D+01 -.34000000D+01 0.55021965D+00 0.48332439D-02
+ -.34000000D+01 -.33000000D+01 0.70100796D+00 0.67862022D-02
+ -.33000000D+01 -.32000000D+01 0.87741062D+00 0.65179783D-02
+ -.32000000D+01 -.31000000D+01 0.10643408D+01 0.80305287D-02
+ -.31000000D+01 -.30000000D+01 0.12884014D+01 0.85713679D-02
+ -.30000000D+01 -.29000000D+01 0.15022707D+01 0.87332268D-02
+ -.29000000D+01 -.28000000D+01 0.17648332D+01 0.10277446D-01
+ -.28000000D+01 -.27000000D+01 0.20409708D+01 0.11991435D-01
+ -.27000000D+01 -.26000000D+01 0.23384550D+01 0.11320973D-01
+ -.26000000D+01 -.25000000D+01 0.25998879D+01 0.12093093D-01
+ -.25000000D+01 -.24000000D+01 0.29530989D+01 0.14029887D-01
+ -.24000000D+01 -.23000000D+01 0.32410957D+01 0.14914630D-01
+ -.23000000D+01 -.22000000D+01 0.35933948D+01 0.14304305D-01
+ -.22000000D+01 -.21000000D+01 0.39273363D+01 0.16000861D-01
+ -.21000000D+01 -.20000000D+01 0.42405125D+01 0.16002712D-01
+ -.20000000D+01 -.19000000D+01 0.45906441D+01 0.18109752D-01
+ -.19000000D+01 -.18000000D+01 0.48780220D+01 0.25549172D-01
+ -.18000000D+01 -.17000000D+01 0.51990540D+01 0.23376874D-01
+ -.17000000D+01 -.16000000D+01 0.55245410D+01 0.22339367D-01
+ -.16000000D+01 -.15000000D+01 0.58058002D+01 0.18799169D-01
+ -.15000000D+01 -.14000000D+01 0.60895920D+01 0.22753492D-01
+ -.14000000D+01 -.13000000D+01 0.63676681D+01 0.26366690D-01
+ -.13000000D+01 -.12000000D+01 0.65965150D+01 0.23679357D-01
+ -.12000000D+01 -.11000000D+01 0.68268812D+01 0.24746797D-01
+ -.11000000D+01 -.10000000D+01 0.70466258D+01 0.22062772D-01
+ -.10000000D+01 -.90000000D+00 0.72099647D+01 0.23357839D-01
+ -.90000000D+00 -.80000000D+00 0.73988472D+01 0.25029176D-01
+ -.80000000D+00 -.70000000D+00 0.75136338D+01 0.22734225D-01
+ -.70000000D+00 -.60000000D+00 0.77044379D+01 0.23358601D-01
+ -.60000000D+00 -.50000000D+00 0.77752267D+01 0.22369573D-01
+ -.50000000D+00 -.40000000D+00 0.78830514D+01 0.23367655D-01
+ -.40000000D+00 -.30000000D+00 0.79731960D+01 0.25028840D-01
+ -.30000000D+00 -.20000000D+00 0.80691781D+01 0.23926630D-01
+ -.20000000D+00 -.10000000D+00 0.80767254D+01 0.23717968D-01
+ -.10000000D+00 0.18041124D-15 0.80894197D+01 0.22758111D-01
+ 0.70776718D-15 0.10000000D+00 0.81556014D+01 0.29815468D-01
+ 0.10000000D+00 0.20000000D+00 0.80600051D+01 0.23494972D-01
+ 0.20000000D+00 0.30000000D+00 0.80664951D+01 0.22551384D-01
+ 0.30000000D+00 0.40000000D+00 0.79826703D+01 0.23517894D-01
+ 0.40000000D+00 0.50000000D+00 0.79492661D+01 0.24850104D-01
+ 0.50000000D+00 0.60000000D+00 0.77955998D+01 0.23798070D-01
+ 0.60000000D+00 0.70000000D+00 0.76993716D+01 0.22792301D-01
+ 0.70000000D+00 0.80000000D+00 0.75934499D+01 0.25412587D-01
+ 0.80000000D+00 0.90000000D+00 0.73959199D+01 0.23410675D-01
+ 0.90000000D+00 0.10000000D+01 0.72592936D+01 0.20998526D-01
+ 0.10000000D+01 0.11000000D+01 0.70271767D+01 0.22441872D-01
+ 0.11000000D+01 0.12000000D+01 0.68254692D+01 0.24022545D-01
+ 0.12000000D+01 0.13000000D+01 0.65957191D+01 0.20646213D-01
+ 0.13000000D+01 0.14000000D+01 0.63315399D+01 0.21086447D-01
+ 0.14000000D+01 0.15000000D+01 0.60601562D+01 0.22420294D-01
+ 0.15000000D+01 0.16000000D+01 0.57980588D+01 0.26456453D-01
+ 0.16000000D+01 0.17000000D+01 0.55223428D+01 0.19833240D-01
+ 0.17000000D+01 0.18000000D+01 0.52155420D+01 0.19249004D-01
+ 0.18000000D+01 0.19000000D+01 0.48841691D+01 0.18559346D-01
+ 0.19000000D+01 0.20000000D+01 0.45885414D+01 0.20108034D-01
+ 0.20000000D+01 0.21000000D+01 0.42476636D+01 0.17213430D-01
+ 0.21000000D+01 0.22000000D+01 0.39146342D+01 0.15534506D-01
+ 0.22000000D+01 0.23000000D+01 0.35675420D+01 0.14721418D-01
+ 0.23000000D+01 0.24000000D+01 0.32407976D+01 0.13790667D-01
+ 0.24000000D+01 0.25000000D+01 0.29355803D+01 0.13186049D-01
+ 0.25000000D+01 0.26000000D+01 0.26131395D+01 0.13295714D-01
+ 0.26000000D+01 0.27000000D+01 0.23341517D+01 0.11214674D-01
+ 0.27000000D+01 0.28000000D+01 0.20410163D+01 0.10629323D-01
+ 0.28000000D+01 0.29000000D+01 0.17596425D+01 0.11878236D-01
+ 0.29000000D+01 0.30000000D+01 0.15093501D+01 0.93834918D-02
+ 0.30000000D+01 0.31000000D+01 0.12759573D+01 0.86591999D-02
+ 0.31000000D+01 0.32000000D+01 0.10679153D+01 0.74648650D-02
+ 0.32000000D+01 0.33000000D+01 0.87796460D+00 0.60011191D-02
+ 0.33000000D+01 0.34000000D+01 0.70367589D+00 0.61685694D-02
+ 0.34000000D+01 0.35000000D+01 0.54347455D+00 0.51127196D-02
+ 0.35000000D+01 0.36000000D+01 0.41609597D+00 0.35347086D-02
+ 0.36000000D+01 0.37000000D+01 0.30464438D+00 0.35321369D-02
+ 0.37000000D+01 0.38000000D+01 0.21694499D+00 0.20703774D-02
+ 0.38000000D+01 0.39000000D+01 0.14700678D+00 0.16288093D-02
+ 0.39000000D+01 0.40000000D+01 0.88093370D-01 0.92765320D-03
+ 0.40000000D+01 0.41000000D+01 0.48074605D-01 0.51773067D-03
+ 0.41000000D+01 0.42000000D+01 0.21064937D-01 0.21947497D-03
+ 0.42000000D+01 0.43000000D+01 0.69655253D-02 0.85771317D-04
+ 0.43000000D+01 0.44000000D+01 0.12522875D-02 0.32724279D-04
+ 0.44000000D+01 0.45000000D+01 -.12866559D-03 0.79286325D-05
+ 0.45000000D+01 0.46000000D+01 -.93435447D-04 0.34487909D-05
+ 0.46000000D+01 0.47000000D+01 -.18336299D-05 0.52057768D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18230006D-05 0.52222220D-06
+ -.46000000D+01 -.45000000D+01 -.94556361D-04 0.34946462D-05
+ -.45000000D+01 -.44000000D+01 -.13505796D-03 0.74013197D-05
+ -.44000000D+01 -.43000000D+01 0.12780710D-02 0.29186810D-04
+ -.43000000D+01 -.42000000D+01 0.73118061D-02 0.85615635D-04
+ -.42000000D+01 -.41000000D+01 0.22029668D-01 0.21779638D-03
+ -.41000000D+01 -.40000000D+01 0.48481155D-01 0.47038470D-03
+ -.40000000D+01 -.39000000D+01 0.91405470D-01 0.11078320D-02
+ -.39000000D+01 -.38000000D+01 0.15155576D+00 0.13764463D-02
+ -.38000000D+01 -.37000000D+01 0.22900884D+00 0.18911367D-02
+ -.37000000D+01 -.36000000D+01 0.33262389D+00 0.31102306D-02
+ -.36000000D+01 -.35000000D+01 0.44679443D+00 0.39945508D-02
+ -.35000000D+01 -.34000000D+01 0.59259788D+00 0.48394579D-02
+ -.34000000D+01 -.33000000D+01 0.75751756D+00 0.67904371D-02
+ -.33000000D+01 -.32000000D+01 0.95052519D+00 0.65210325D-02
+ -.32000000D+01 -.31000000D+01 0.11567519D+01 0.80336842D-02
+ -.31000000D+01 -.30000000D+01 0.14025065D+01 0.85747229D-02
+ -.30000000D+01 -.29000000D+01 0.16406896D+01 0.87468758D-02
+ -.29000000D+01 -.28000000D+01 0.19298222D+01 0.10288143D-01
+ -.28000000D+01 -.27000000D+01 0.22348648D+01 0.11996021D-01
+ -.27000000D+01 -.26000000D+01 0.25633383D+01 0.11328047D-01
+ -.26000000D+01 -.25000000D+01 0.28575427D+01 0.12109185D-01
+ -.25000000D+01 -.24000000D+01 0.32455544D+01 0.14041545D-01
+ -.24000000D+01 -.23000000D+01 0.35704710D+01 0.14972283D-01
+ -.23000000D+01 -.22000000D+01 0.39588518D+01 0.14367068D-01
+ -.22000000D+01 -.21000000D+01 0.43316561D+01 0.16011348D-01
+ -.21000000D+01 -.20000000D+01 0.46841396D+01 0.16018517D-01
+ -.20000000D+01 -.19000000D+01 0.50730855D+01 0.18127480D-01
+ -.19000000D+01 -.18000000D+01 0.54002619D+01 0.25674537D-01
+ -.18000000D+01 -.17000000D+01 0.57576195D+01 0.23518152D-01
+ -.17000000D+01 -.16000000D+01 0.61215405D+01 0.22352488D-01
+ -.16000000D+01 -.15000000D+01 0.64389463D+01 0.18925103D-01
+ -.15000000D+01 -.14000000D+01 0.67594919D+01 0.22861680D-01
+ -.14000000D+01 -.13000000D+01 0.70705363D+01 0.26401730D-01
+ -.13000000D+01 -.12000000D+01 0.73325084D+01 0.23721957D-01
+ -.12000000D+01 -.11000000D+01 0.75922896D+01 0.24793917D-01
+ -.11000000D+01 -.10000000D+01 0.78410664D+01 0.22117135D-01
+ -.10000000D+01 -.90000000D+00 0.80299660D+01 0.23379334D-01
+ -.90000000D+00 -.80000000D+00 0.82428664D+01 0.25047745D-01
+ -.80000000D+00 -.70000000D+00 0.83791428D+01 0.22751932D-01
+ -.70000000D+00 -.60000000D+00 0.85887928D+01 0.23376637D-01
+ -.60000000D+00 -.50000000D+00 0.86760723D+01 0.22391407D-01
+ -.50000000D+00 -.40000000D+00 0.87967803D+01 0.23395253D-01
+ -.40000000D+00 -.30000000D+00 0.88984619D+01 0.25055223D-01
+ -.30000000D+00 -.20000000D+00 0.90027874D+01 0.23948207D-01
+ -.20000000D+00 -.10000000D+00 0.90154007D+01 0.23745139D-01
+ -.10000000D+00 0.18041124D-15 0.90318143D+01 0.22786573D-01
+ 0.70776718D-15 0.10000000D+00 0.90973376D+01 0.29846594D-01
+ 0.10000000D+00 0.20000000D+00 0.89988453D+01 0.23512783D-01
+ 0.20000000D+00 0.30000000D+00 0.89996374D+01 0.22570598D-01
+ 0.30000000D+00 0.40000000D+00 0.89080672D+01 0.23537159D-01
+ 0.40000000D+00 0.50000000D+00 0.88637656D+01 0.25080600D-01
+ 0.50000000D+00 0.60000000D+00 0.86957071D+01 0.24025854D-01
+ 0.60000000D+00 0.70000000D+00 0.85834374D+01 0.22820125D-01
+ 0.70000000D+00 0.80000000D+00 0.84596056D+01 0.25436820D-01
+ 0.80000000D+00 0.90000000D+00 0.82398112D+01 0.23436066D-01
+ 0.90000000D+00 0.10000000D+01 0.80792622D+01 0.21027179D-01
+ 0.10000000D+01 0.11000000D+01 0.78217191D+01 0.22465242D-01
+ 0.11000000D+01 0.12000000D+01 0.75909346D+01 0.24117940D-01
+ 0.12000000D+01 0.13000000D+01 0.73317503D+01 0.20753121D-01
+ 0.13000000D+01 0.14000000D+01 0.70344815D+01 0.21098804D-01
+ 0.14000000D+01 0.15000000D+01 0.67297093D+01 0.22435524D-01
+ 0.15000000D+01 0.16000000D+01 0.64318555D+01 0.26504450D-01
+ 0.16000000D+01 0.17000000D+01 0.61193917D+01 0.19896332D-01
+ 0.17000000D+01 0.18000000D+01 0.57749639D+01 0.19292498D-01
+ 0.18000000D+01 0.19000000D+01 0.54053473D+01 0.18599498D-01
+ 0.19000000D+01 0.20000000D+01 0.50707816D+01 0.20115928D-01
+ 0.20000000D+01 0.21000000D+01 0.46908681D+01 0.17223308D-01
+ 0.21000000D+01 0.22000000D+01 0.43191711D+01 0.15553226D-01
+ 0.22000000D+01 0.23000000D+01 0.39335819D+01 0.14744890D-01
+ 0.23000000D+01 0.24000000D+01 0.35693077D+01 0.13810659D-01
+ 0.24000000D+01 0.25000000D+01 0.32282865D+01 0.13201223D-01
+ 0.25000000D+01 0.26000000D+01 0.28710082D+01 0.13303024D-01
+ 0.26000000D+01 0.27000000D+01 0.25591493D+01 0.11220246D-01
+ 0.27000000D+01 0.28000000D+01 0.22347050D+01 0.10638624D-01
+ 0.28000000D+01 0.29000000D+01 0.19247286D+01 0.11887573D-01
+ 0.29000000D+01 0.30000000D+01 0.16477083D+01 0.93871782D-02
+ 0.30000000D+01 0.31000000D+01 0.13901125D+01 0.86619844D-02
+ 0.31000000D+01 0.32000000D+01 0.11604202D+01 0.74714267D-02
+ 0.32000000D+01 0.33000000D+01 0.95113160D+00 0.60058523D-02
+ 0.33000000D+01 0.34000000D+01 0.76026911D+00 0.61754298D-02
+ 0.34000000D+01 0.35000000D+01 0.58574951D+00 0.51229681D-02
+ 0.35000000D+01 0.36000000D+01 0.44671736D+00 0.35362474D-02
+ 0.36000000D+01 0.37000000D+01 0.32568731D+00 0.35329360D-02
+ 0.37000000D+01 0.38000000D+01 0.23060554D+00 0.20708763D-02
+ 0.38000000D+01 0.39000000D+01 0.15520705D+00 0.16292714D-02
+ 0.39000000D+01 0.40000000D+01 0.92498729D-01 0.92784647D-03
+ 0.40000000D+01 0.41000000D+01 0.50124244D-01 0.51773357D-03
+ 0.41000000D+01 0.42000000D+01 0.21840551D-01 0.21951655D-03
+ 0.42000000D+01 0.43000000D+01 0.71801619D-02 0.85791145D-04
+ 0.43000000D+01 0.44000000D+01 0.12831464D-02 0.32727066D-04
+ 0.44000000D+01 0.45000000D+01 -.13100039D-03 0.79297071D-05
+ 0.45000000D+01 0.46000000D+01 -.94351326D-04 0.34488446D-05
+ 0.46000000D+01 0.47000000D+01 -.18382685D-05 0.52057790D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18246575D-05 0.52222227D-06
+ -.46000000D+01 -.45000000D+01 -.94896096D-04 0.34946671D-05
+ -.45000000D+01 -.44000000D+01 -.13600066D-03 0.74013745D-05
+ -.44000000D+01 -.43000000D+01 0.12897673D-02 0.29187547D-04
+ -.43000000D+01 -.42000000D+01 0.73966346D-02 0.85618017D-04
+ -.42000000D+01 -.41000000D+01 0.22345888D-01 0.21781209D-03
+ -.41000000D+01 -.40000000D+01 0.49334188D-01 0.47041202D-03
+ -.40000000D+01 -.39000000D+01 0.93283595D-01 0.11079550D-02
+ -.39000000D+01 -.38000000D+01 0.15510802D+00 0.13766597D-02
+ -.38000000D+01 -.37000000D+01 0.23506340D+00 0.18918211D-02
+ -.37000000D+01 -.36000000D+01 0.34214392D+00 0.31111713D-02
+ -.36000000D+01 -.35000000D+01 0.46080017D+00 0.39954489D-02
+ -.35000000D+01 -.34000000D+01 0.61228628D+00 0.48425596D-02
+ -.34000000D+01 -.33000000D+01 0.78412755D+00 0.67923652D-02
+ -.33000000D+01 -.32000000D+01 0.98533511D+00 0.65225897D-02
+ -.32000000D+01 -.31000000D+01 0.12011942D+01 0.80353833D-02
+ -.31000000D+01 -.30000000D+01 0.14578667D+01 0.85763835D-02
+ -.30000000D+01 -.29000000D+01 0.17083867D+01 0.87544357D-02
+ -.29000000D+01 -.28000000D+01 0.20110848D+01 0.10294359D-01
+ -.28000000D+01 -.27000000D+01 0.23309718D+01 0.11998361D-01
+ -.27000000D+01 -.26000000D+01 0.26754867D+01 0.11331687D-01
+ -.26000000D+01 -.25000000D+01 0.29866563D+01 0.12119120D-01
+ -.25000000D+01 -.24000000D+01 0.33929608D+01 0.14050166D-01
+ -.24000000D+01 -.23000000D+01 0.37372204D+01 0.15013047D-01
+ -.23000000D+01 -.22000000D+01 0.41446246D+01 0.14409991D-01
+ -.22000000D+01 -.21000000D+01 0.45379389D+01 0.16017471D-01
+ -.21000000D+01 -.20000000D+01 0.49113476D+01 0.16027757D-01
+ -.20000000D+01 -.19000000D+01 0.53208864D+01 0.18138098D-01
+ -.19000000D+01 -.18000000D+01 0.56695988D+01 0.25769693D-01
+ -.18000000D+01 -.17000000D+01 0.60463276D+01 0.23624324D-01
+ -.17000000D+01 -.16000000D+01 0.64310376D+01 0.22359498D-01
+ -.16000000D+01 -.15000000D+01 0.67679635D+01 0.19022533D-01
+ -.15000000D+01 -.14000000D+01 0.71085698D+01 0.22947265D-01
+ -.14000000D+01 -.13000000D+01 0.74374621D+01 0.26419683D-01
+ -.13000000D+01 -.12000000D+01 0.77176227D+01 0.23743265D-01
+ -.12000000D+01 -.11000000D+01 0.79933275D+01 0.24818490D-01
+ -.11000000D+01 -.10000000D+01 0.82582988D+01 0.22146880D-01
+ -.10000000D+01 -.90000000D+00 0.84611460D+01 0.23393795D-01
+ -.90000000D+00 -.80000000D+00 0.86872696D+01 0.25060707D-01
+ -.80000000D+00 -.70000000D+00 0.88353469D+01 0.22763322D-01
+ -.70000000D+00 -.60000000D+00 0.90554155D+01 0.23388107D-01
+ -.60000000D+00 -.50000000D+00 0.91520098D+01 0.22407334D-01
+ -.50000000D+00 -.40000000D+00 0.92797168D+01 0.23414197D-01
+ -.40000000D+00 -.30000000D+00 0.93878553D+01 0.25071232D-01
+ -.30000000D+00 -.20000000D+00 0.94967356D+01 0.23958462D-01
+ -.20000000D+00 -.10000000D+00 0.95121541D+01 0.23760909D-01
+ -.10000000D+00 0.18041124D-15 0.95306451D+01 0.22804105D-01
+ 0.70776718D-15 0.10000000D+00 0.95959152D+01 0.29863453D-01
+ 0.10000000D+00 0.20000000D+00 0.94957086D+01 0.23523168D-01
+ 0.20000000D+00 0.30000000D+00 0.94933768D+01 0.22583714D-01
+ 0.30000000D+00 0.40000000D+00 0.93975936D+01 0.23550011D-01
+ 0.40000000D+00 0.50000000D+00 0.93470514D+01 0.25200078D-01
+ 0.50000000D+00 0.60000000D+00 0.91710774D+01 0.24141751D-01
+ 0.60000000D+00 0.70000000D+00 0.90499187D+01 0.22837916D-01
+ 0.70000000D+00 0.80000000D+00 0.89163637D+01 0.25452995D-01
+ 0.80000000D+00 0.90000000D+00 0.86840681D+01 0.23452646D-01
+ 0.90000000D+00 0.10000000D+01 0.85103573D+01 0.21044877D-01
+ 0.10000000D+01 0.11000000D+01 0.82389872D+01 0.22479769D-01
+ 0.11000000D+01 0.12000000D+01 0.79922005D+01 0.24160643D-01
+ 0.12000000D+01 0.13000000D+01 0.77167721D+01 0.20801170D-01
+ 0.13000000D+01 0.14000000D+01 0.74014223D+01 0.21105839D-01
+ 0.14000000D+01 0.15000000D+01 0.70786855D+01 0.22442670D-01
+ 0.15000000D+01 0.16000000D+01 0.67612776D+01 0.26548250D-01
+ 0.16000000D+01 0.17000000D+01 0.64289290D+01 0.19951326D-01
+ 0.17000000D+01 0.18000000D+01 0.60640416D+01 0.19317659D-01
+ 0.18000000D+01 0.19000000D+01 0.56740582D+01 0.18622017D-01
+ 0.19000000D+01 0.20000000D+01 0.53185198D+01 0.20121587D-01
+ 0.20000000D+01 0.21000000D+01 0.49178894D+01 0.17228834D-01
+ 0.21000000D+01 0.22000000D+01 0.45256701D+01 0.15565849D-01
+ 0.22000000D+01 0.23000000D+01 0.41196214D+01 0.14760037D-01
+ 0.23000000D+01 0.24000000D+01 0.37355837D+01 0.13820871D-01
+ 0.24000000D+01 0.25000000D+01 0.33758076D+01 0.13209815D-01
+ 0.25000000D+01 0.26000000D+01 0.30002888D+01 0.13307066D-01
+ 0.26000000D+01 0.27000000D+01 0.26713471D+01 0.11223389D-01
+ 0.27000000D+01 0.28000000D+01 0.23307352D+01 0.10643554D-01
+ 0.28000000D+01 0.29000000D+01 0.20060097D+01 0.11892278D-01
+ 0.29000000D+01 0.30000000D+01 0.17153761D+01 0.93897453D-02
+ 0.30000000D+01 0.31000000D+01 0.14455037D+01 0.86642705D-02
+ 0.31000000D+01 0.32000000D+01 0.12049058D+01 0.74754957D-02
+ 0.32000000D+01 0.33000000D+01 0.98594908D+00 0.60090884D-02
+ 0.33000000D+01 0.34000000D+01 0.78691701D+00 0.61785195D-02
+ 0.34000000D+01 0.35000000D+01 0.60540003D+00 0.51275486D-02
+ 0.35000000D+01 0.36000000D+01 0.46075025D+00 0.35369566D-02
+ 0.36000000D+01 0.37000000D+01 0.33517890D+00 0.35333074D-02
+ 0.37000000D+01 0.38000000D+01 0.23665745D+00 0.20711253D-02
+ 0.38000000D+01 0.39000000D+01 0.15876833D+00 0.16294773D-02
+ 0.39000000D+01 0.40000000D+01 0.94372649D-01 0.92792839D-03
+ 0.40000000D+01 0.41000000D+01 0.50976670D-01 0.51773239D-03
+ 0.41000000D+01 0.42000000D+01 0.22155476D-01 0.21953512D-03
+ 0.42000000D+01 0.43000000D+01 0.72649664D-02 0.85798745D-04
+ 0.43000000D+01 0.44000000D+01 0.12948822D-02 0.32728126D-04
+ 0.44000000D+01 0.45000000D+01 -.13193785D-03 0.79300918D-05
+ 0.45000000D+01 0.46000000D+01 -.94691351D-04 0.34488642D-05
+ 0.46000000D+01 0.47000000D+01 -.18399236D-05 0.52057798D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18099299D-05 0.52222093D-06
+ -.46000000D+01 -.45000000D+01 -.92491605D-04 0.34942845D-05
+ -.45000000D+01 -.44000000D+01 -.12950636D-03 0.74001542D-05
+ -.44000000D+01 -.43000000D+01 0.12296123D-02 0.29171593D-04
+ -.43000000D+01 -.42000000D+01 0.69775441D-02 0.85523043D-04
+ -.42000000D+01 -.41000000D+01 0.20857647D-01 0.21738404D-03
+ -.41000000D+01 -.40000000D+01 0.45507224D-01 0.46958683D-03
+ -.40000000D+01 -.39000000D+01 0.85248588D-01 0.11060207D-02
+ -.39000000D+01 -.38000000D+01 0.14054403D+00 0.13735720D-02
+ -.38000000D+01 -.37000000D+01 0.21111505D+00 0.18863308D-02
+ -.37000000D+01 -.36000000D+01 0.30563487D+00 0.31003970D-02
+ -.36000000D+01 -.35000000D+01 0.40866746D+00 0.39836386D-02
+ -.35000000D+01 -.34000000D+01 0.54054584D+00 0.48199833D-02
+ -.34000000D+01 -.33000000D+01 0.68923486D+00 0.67739704D-02
+ -.33000000D+01 -.32000000D+01 0.86333483D+00 0.65061740D-02
+ -.32000000D+01 -.31000000D+01 0.10475495D+01 0.80187874D-02
+ -.31000000D+01 -.30000000D+01 0.12685597D+01 0.85561076D-02
+ -.30000000D+01 -.29000000D+01 0.14792544D+01 0.87030661D-02
+ -.29000000D+01 -.28000000D+01 0.17386769D+01 0.10253032D-01
+ -.28000000D+01 -.27000000D+01 0.20113662D+01 0.11973005D-01
+ -.27000000D+01 -.26000000D+01 0.23056596D+01 0.11296065D-01
+ -.26000000D+01 -.25000000D+01 0.25628888D+01 0.12049935D-01
+ -.25000000D+01 -.24000000D+01 0.29123117D+01 0.14003020D-01
+ -.24000000D+01 -.23000000D+01 0.31957173D+01 0.14856226D-01
+ -.23000000D+01 -.22000000D+01 0.35452690D+01 0.14242026D-01
+ -.22000000D+01 -.21000000D+01 0.38746046D+01 0.15968461D-01
+ -.21000000D+01 -.20000000D+01 0.41828869D+01 0.15958566D-01
+ -.20000000D+01 -.19000000D+01 0.45287013D+01 0.18070606D-01
+ -.19000000D+01 -.18000000D+01 0.48121761D+01 0.25443782D-01
+ -.18000000D+01 -.17000000D+01 0.51310428D+01 0.23253830D-01
+ -.17000000D+01 -.16000000D+01 0.54526143D+01 0.22313380D-01
+ -.16000000D+01 -.15000000D+01 0.57300828D+01 0.18688782D-01
+ -.15000000D+01 -.14000000D+01 0.60094567D+01 0.22663271D-01
+ -.14000000D+01 -.13000000D+01 0.62854387D+01 0.26249972D-01
+ -.13000000D+01 -.12000000D+01 0.65108199D+01 0.23551619D-01
+ -.12000000D+01 -.11000000D+01 0.67388139D+01 0.24657295D-01
+ -.11000000D+01 -.10000000D+01 0.69564464D+01 0.21965220D-01
+ -.10000000D+01 -.90000000D+00 0.71177448D+01 0.23311142D-01
+ -.90000000D+00 -.80000000D+00 0.73040356D+01 0.24985800D-01
+ -.80000000D+00 -.70000000D+00 0.74172837D+01 0.22688925D-01
+ -.70000000D+00 -.60000000D+00 0.76066686D+01 0.23316325D-01
+ -.60000000D+00 -.50000000D+00 0.76756960D+01 0.22316430D-01
+ -.50000000D+00 -.40000000D+00 0.77833052D+01 0.23308261D-01
+ -.40000000D+00 -.30000000D+00 0.78726990D+01 0.24981128D-01
+ -.30000000D+00 -.20000000D+00 0.79666981D+01 0.23855785D-01
+ -.20000000D+00 -.10000000D+00 0.79752495D+01 0.23646272D-01
+ -.10000000D+00 0.18041124D-15 0.79857089D+01 0.22695516D-01
+ 0.70776718D-15 0.10000000D+00 0.80534484D+01 0.29755910D-01
+ 0.10000000D+00 0.20000000D+00 0.79575635D+01 0.23445612D-01
+ 0.20000000D+00 0.30000000D+00 0.79650367D+01 0.22516626D-01
+ 0.30000000D+00 0.40000000D+00 0.78818025D+01 0.23467250D-01
+ 0.40000000D+00 0.50000000D+00 0.78481593D+01 0.24491080D-01
+ 0.50000000D+00 0.60000000D+00 0.76980811D+01 0.23425018D-01
+ 0.60000000D+00 0.70000000D+00 0.76017503D+01 0.22739625D-01
+ 0.70000000D+00 0.80000000D+00 0.74959459D+01 0.25355255D-01
+ 0.80000000D+00 0.90000000D+00 0.73014654D+01 0.23353092D-01
+ 0.90000000D+00 0.10000000D+01 0.71663554D+01 0.20929144D-01
+ 0.10000000D+01 0.11000000D+01 0.69363204D+01 0.22383175D-01
+ 0.11000000D+01 0.12000000D+01 0.67384432D+01 0.23803265D-01
+ 0.12000000D+01 0.13000000D+01 0.65092821D+01 0.20405245D-01
+ 0.13000000D+01 0.14000000D+01 0.62491712D+01 0.21045294D-01
+ 0.14000000D+01 0.15000000D+01 0.59811334D+01 0.22377365D-01
+ 0.15000000D+01 0.16000000D+01 0.57217275D+01 0.26402280D-01
+ 0.16000000D+01 0.17000000D+01 0.54500547D+01 0.19753928D-01
+ 0.17000000D+01 0.18000000D+01 0.51463667D+01 0.19169082D-01
+ 0.18000000D+01 0.19000000D+01 0.48186866D+01 0.18483231D-01
+ 0.19000000D+01 0.20000000D+01 0.45269640D+01 0.20084880D-01
+ 0.20000000D+01 0.21000000D+01 0.41907269D+01 0.17181997D-01
+ 0.21000000D+01 0.22000000D+01 0.38614756D+01 0.15499981D-01
+ 0.22000000D+01 0.23000000D+01 0.35186735D+01 0.14678783D-01
+ 0.23000000D+01 0.24000000D+01 0.31959293D+01 0.13741901D-01
+ 0.24000000D+01 0.25000000D+01 0.28949497D+01 0.13153593D-01
+ 0.25000000D+01 0.26000000D+01 0.25762719D+01 0.13274535D-01
+ 0.26000000D+01 0.27000000D+01 0.23009154D+01 0.11190632D-01
+ 0.27000000D+01 0.28000000D+01 0.20117005D+01 0.10599655D-01
+ 0.28000000D+01 0.29000000D+01 0.17334124D+01 0.11854571D-01
+ 0.29000000D+01 0.30000000D+01 0.14865738D+01 0.93706305D-02
+ 0.30000000D+01 0.31000000D+01 0.12560956D+01 0.86310292D-02
+ 0.31000000D+01 0.32000000D+01 0.10509062D+01 0.74498474D-02
+ 0.32000000D+01 0.33000000D+01 0.86353982D+00 0.59859746D-02
+ 0.33000000D+01 0.34000000D+01 0.69177912D+00 0.61480096D-02
+ 0.34000000D+01 0.35000000D+01 0.53405664D+00 0.50895132D-02
+ 0.35000000D+01 0.36000000D+01 0.40844972D+00 0.35271242D-02
+ 0.36000000D+01 0.37000000D+01 0.29887569D+00 0.35279629D-02
+ 0.37000000D+01 0.38000000D+01 0.21273567D+00 0.20667336D-02
+ 0.38000000D+01 0.39000000D+01 0.14414767D+00 0.16273412D-02
+ 0.39000000D+01 0.40000000D+01 0.86353966D-01 0.92631896D-03
+ 0.40000000D+01 0.41000000D+01 0.47154915D-01 0.51724381D-03
+ 0.41000000D+01 0.42000000D+01 0.20679302D-01 0.21921471D-03
+ 0.42000000D+01 0.43000000D+01 0.68455002D-02 0.85661689D-04
+ 0.43000000D+01 0.44000000D+01 0.12347079D-02 0.32712391D-04
+ 0.44000000D+01 0.45000000D+01 -.12554462D-03 0.79238346D-05
+ 0.45000000D+01 0.46000000D+01 -.92288763D-04 0.34485033D-05
+ 0.46000000D+01 0.47000000D+01 -.18251349D-05 0.52057652D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18180066D-05 0.52222162D-06
+ -.46000000D+01 -.45000000D+01 -.93798468D-04 0.34944748D-05
+ -.45000000D+01 -.44000000D+01 -.13283265D-03 0.74007483D-05
+ -.44000000D+01 -.43000000D+01 0.12634020D-02 0.29179365D-04
+ -.43000000D+01 -.42000000D+01 0.72076293D-02 0.85568491D-04
+ -.42000000D+01 -.41000000D+01 0.21666238D-01 0.21759426D-03
+ -.41000000D+01 -.40000000D+01 0.47574030D-01 0.46997658D-03
+ -.40000000D+01 -.39000000D+01 0.89565216D-01 0.11067669D-02
+ -.39000000D+01 -.38000000D+01 0.14834707D+00 0.13748509D-02
+ -.38000000D+01 -.37000000D+01 0.22390011D+00 0.18884355D-02
+ -.37000000D+01 -.36000000D+01 0.32505358D+00 0.31051571D-02
+ -.36000000D+01 -.35000000D+01 0.43632663D+00 0.39885907D-02
+ -.35000000D+01 -.34000000D+01 0.57856671D+00 0.48284380D-02
+ -.34000000D+01 -.33000000D+01 0.73942624D+00 0.67814206D-02
+ -.33000000D+01 -.32000000D+01 0.92781169D+00 0.65130245D-02
+ -.32000000D+01 -.31000000D+01 0.11285153D+01 0.80257433D-02
+ -.31000000D+01 -.30000000D+01 0.13681758D+01 0.85648220D-02
+ -.30000000D+01 -.29000000D+01 0.15996084D+01 0.87216355D-02
+ -.29000000D+01 -.28000000D+01 0.18817104D+01 0.10267677D-01
+ -.28000000D+01 -.27000000D+01 0.21789301D+01 0.11983536D-01
+ -.27000000D+01 -.26000000D+01 0.24993888D+01 0.11310736D-01
+ -.26000000D+01 -.25000000D+01 0.27846934D+01 0.12077025D-01
+ -.25000000D+01 -.24000000D+01 0.31634116D+01 0.14019827D-01
+ -.24000000D+01 -.23000000D+01 0.34780616D+01 0.14896089D-01
+ -.23000000D+01 -.22000000D+01 0.38580492D+01 0.14287433D-01
+ -.22000000D+01 -.21000000D+01 0.42201655D+01 0.15987820D-01
+ -.21000000D+01 -.20000000D+01 0.45617990D+01 0.15983801D-01
+ -.20000000D+01 -.19000000D+01 0.49405680D+01 0.18095303D-01
+ -.19000000D+01 -.18000000D+01 0.52569847D+01 0.25525919D-01
+ -.18000000D+01 -.17000000D+01 0.56065631D+01 0.23346763D-01
+ -.17000000D+01 -.16000000D+01 0.59601897D+01 0.22332694D-01
+ -.16000000D+01 -.15000000D+01 0.62682339D+01 0.18767752D-01
+ -.15000000D+01 -.14000000D+01 0.65781500D+01 0.22730591D-01
+ -.14000000D+01 -.13000000D+01 0.68817171D+01 0.26324580D-01
+ -.13000000D+01 -.12000000D+01 0.71345562D+01 0.23635070D-01
+ -.12000000D+01 -.11000000D+01 0.73873601D+01 0.24717421D-01
+ -.11000000D+01 -.10000000D+01 0.76286163D+01 0.22028875D-01
+ -.10000000D+01 -.90000000D+00 0.78113643D+01 0.23341969D-01
+ -.90000000D+00 -.80000000D+00 0.80178441D+01 0.25012541D-01
+ -.80000000D+00 -.70000000D+00 0.81486914D+01 0.22717684D-01
+ -.70000000D+00 -.60000000D+00 0.83536602D+01 0.23342424D-01
+ -.60000000D+00 -.50000000D+00 0.84362934D+01 0.22349189D-01
+ -.50000000D+00 -.40000000D+00 0.85545092D+01 0.23346494D-01
+ -.40000000D+00 -.30000000D+00 0.86531055D+01 0.25014151D-01
+ -.30000000D+00 -.20000000D+00 0.87546872D+01 0.23899089D-01
+ -.20000000D+00 -.10000000D+00 0.87670084D+01 0.23691581D-01
+ -.10000000D+00 0.18041124D-15 0.87810452D+01 0.22732389D-01
+ 0.70776718D-15 0.10000000D+00 0.88477555D+01 0.29795253D-01
+ 0.10000000D+00 0.20000000D+00 0.87497934D+01 0.23474632D-01
+ 0.20000000D+00 0.30000000D+00 0.87523454D+01 0.22541376D-01
+ 0.30000000D+00 0.40000000D+00 0.86625705D+01 0.23498677D-01
+ 0.40000000D+00 0.50000000D+00 0.86205457D+01 0.24734955D-01
+ 0.50000000D+00 0.60000000D+00 0.84575875D+01 0.23674770D-01
+ 0.60000000D+00 0.70000000D+00 0.83485733D+01 0.22776534D-01
+ 0.70000000D+00 0.80000000D+00 0.82280723D+01 0.25389516D-01
+ 0.80000000D+00 0.90000000D+00 0.80148878D+01 0.23391212D-01
+ 0.90000000D+00 0.10000000D+01 0.78602958D+01 0.20972360D-01
+ 0.10000000D+01 0.11000000D+01 0.76088667D+01 0.22417278D-01
+ 0.11000000D+01 0.12000000D+01 0.73864507D+01 0.23947147D-01
+ 0.12000000D+01 0.13000000D+01 0.71335857D+01 0.20563675D-01
+ 0.13000000D+01 0.14000000D+01 0.68454609D+01 0.21066302D-01
+ 0.14000000D+01 0.15000000D+01 0.65491956D+01 0.22403484D-01
+ 0.15000000D+01 0.16000000D+01 0.62603338D+01 0.26440744D-01
+ 0.16000000D+01 0.17000000D+01 0.59577458D+01 0.19808342D-01
+ 0.17000000D+01 0.18000000D+01 0.56227646D+01 0.19221463D-01
+ 0.18000000D+01 0.19000000D+01 0.52629020D+01 0.18533043D-01
+ 0.19000000D+01 0.20000000D+01 0.49385568D+01 0.20098086D-01
+ 0.20000000D+01 0.21000000D+01 0.45691586D+01 0.17200848D-01
+ 0.21000000D+01 0.22000000D+01 0.42072757D+01 0.15523131D-01
+ 0.22000000D+01 0.23000000D+01 0.38320686D+01 0.14706809D-01
+ 0.23000000D+01 0.24000000D+01 0.34776860D+01 0.13773340D-01
+ 0.24000000D+01 0.25000000D+01 0.31461818D+01 0.13174315D-01
+ 0.25000000D+01 0.26000000D+01 0.27980808D+01 0.13288111D-01
+ 0.26000000D+01 0.27000000D+01 0.24948863D+01 0.11202698D-01
+ 0.27000000D+01 0.28000000D+01 0.21790343D+01 0.10616744D-01
+ 0.28000000D+01 0.29000000D+01 0.18765097D+01 0.11869892D-01
+ 0.29000000D+01 0.30000000D+01 0.16068614D+01 0.93775065D-02
+ 0.30000000D+01 0.31000000D+01 0.13557382D+01 0.86428915D-02
+ 0.31000000D+01 0.32000000D+01 0.11320318D+01 0.74595318D-02
+ 0.32000000D+01 0.33000000D+01 0.92816495D+00 0.59946910D-02
+ 0.33000000D+01 0.34000000D+01 0.74207446D+00 0.61599027D-02
+ 0.34000000D+01 0.35000000D+01 0.57189703D+00 0.51044835D-02
+ 0.35000000D+01 0.36000000D+01 0.43619641D+00 0.35313727D-02
+ 0.36000000D+01 0.37000000D+01 0.31821178D+00 0.35303539D-02
+ 0.37000000D+01 0.38000000D+01 0.22550522D+00 0.20686228D-02
+ 0.38000000D+01 0.39000000D+01 0.15197508D+00 0.16283544D-02
+ 0.39000000D+01 0.40000000D+01 0.90664823D-01 0.92703293D-03
+ 0.40000000D+01 0.41000000D+01 0.49218712D-01 0.51748834D-03
+ 0.41000000D+01 0.42000000D+01 0.21482736D-01 0.21936097D-03
+ 0.42000000D+01 0.43000000D+01 0.70757749D-02 0.85725341D-04
+ 0.43000000D+01 0.44000000D+01 0.12685209D-02 0.32720156D-04
+ 0.44000000D+01 0.45000000D+01 -.12882038D-03 0.79269658D-05
+ 0.45000000D+01 0.46000000D+01 -.93594108D-04 0.34486802D-05
+ 0.46000000D+01 0.47000000D+01 -.18332404D-05 0.52057727D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18224438D-05 0.52222200D-06
+ -.46000000D+01 -.45000000D+01 -.94560429D-04 0.34945835D-05
+ -.45000000D+01 -.44000000D+01 -.13494645D-03 0.74010920D-05
+ -.44000000D+01 -.43000000D+01 0.12838302D-02 0.29183847D-04
+ -.43000000D+01 -.42000000D+01 0.73527988D-02 0.85594441D-04
+ -.42000000D+01 -.41000000D+01 0.22191211D-01 0.21771279D-03
+ -.41000000D+01 -.40000000D+01 0.48947799D-01 0.47020580D-03
+ -.40000000D+01 -.39000000D+01 0.92500493D-01 0.11073281D-02
+ -.39000000D+01 -.38000000D+01 0.15375627D+00 0.13757465D-02
+ -.38000000D+01 -.37000000D+01 0.23292909D+00 0.18901113D-02
+ -.37000000D+01 -.36000000D+01 0.33900336D+00 0.31083840D-02
+ -.36000000D+01 -.35000000D+01 0.45651054D+00 0.39920370D-02
+ -.35000000D+01 -.34000000D+01 0.60663804D+00 0.48357273D-02
+ -.34000000D+01 -.33000000D+01 0.77693412D+00 0.67871911D-02
+ -.33000000D+01 -.32000000D+01 0.97647479D+00 0.65179255D-02
+ -.32000000D+01 -.31000000D+01 0.11902570D+01 0.80308278D-02
+ -.31000000D+01 -.30000000D+01 0.14447392D+01 0.85709551D-02
+ -.30000000D+01 -.29000000D+01 0.16928218D+01 0.87383008D-02
+ -.29000000D+01 -.28000000D+01 0.19931647D+01 0.10280831D-01
+ -.28000000D+01 -.27000000D+01 0.23103415D+01 0.11991257D-01
+ -.27000000D+01 -.26000000D+01 0.26521832D+01 0.11321585D-01
+ -.26000000D+01 -.25000000D+01 0.29604168D+01 0.12098623D-01
+ -.25000000D+01 -.24000000D+01 0.33634596D+01 0.14034793D-01
+ -.24000000D+01 -.23000000D+01 0.37041113D+01 0.14949687D-01
+ -.23000000D+01 -.22000000D+01 0.41092329D+01 0.14344905D-01
+ -.22000000D+01 -.21000000D+01 0.44988509D+01 0.16003040D-01
+ -.21000000D+01 -.20000000D+01 0.48684953D+01 0.16005365D-01
+ -.20000000D+01 -.19000000D+01 0.52748568D+01 0.18117503D-01
+ -.19000000D+01 -.18000000D+01 0.56196546D+01 0.25638860D-01
+ -.18000000D+01 -.17000000D+01 0.59948232D+01 0.23474290D-01
+ -.17000000D+01 -.16000000D+01 0.63759976D+01 0.22347951D-01
+ -.16000000D+01 -.15000000D+01 0.67100571D+01 0.18882463D-01
+ -.15000000D+01 -.14000000D+01 0.70466172D+01 0.22829761D-01
+ -.14000000D+01 -.13000000D+01 0.73736670D+01 0.26375494D-01
+ -.13000000D+01 -.12000000D+01 0.76505170D+01 0.23692907D-01
+ -.12000000D+01 -.11000000D+01 0.79245157D+01 0.24770569D-01
+ -.11000000D+01 -.10000000D+01 0.81867074D+01 0.22089307D-01
+ -.10000000D+01 -.90000000D+00 0.83879185D+01 0.23368215D-01
+ -.90000000D+00 -.80000000D+00 0.86119488D+01 0.25035856D-01
+ -.80000000D+00 -.70000000D+00 0.87582577D+01 0.22741591D-01
+ -.70000000D+00 -.60000000D+00 0.89769049D+01 0.23364687D-01
+ -.60000000D+00 -.50000000D+00 0.90717007D+01 0.22377929D-01
+ -.50000000D+00 -.40000000D+00 0.91990592D+01 0.23380427D-01
+ -.40000000D+00 -.30000000D+00 0.93060106D+01 0.25044267D-01
+ -.30000000D+00 -.20000000D+00 0.94139420D+01 0.23930508D-01
+ -.20000000D+00 -.10000000D+00 0.94296299D+01 0.23727781D-01
+ -.10000000D+00 0.18041124D-15 0.94468297D+01 0.22767277D-01
+ 0.70776718D-15 0.10000000D+00 0.95127477D+01 0.29830447D-01
+ 0.10000000D+00 0.20000000D+00 0.94127984D+01 0.23498794D-01
+ 0.20000000D+00 0.30000000D+00 0.94110648D+01 0.22563611D-01
+ 0.30000000D+00 0.40000000D+00 0.93156739D+01 0.23524743D-01
+ 0.40000000D+00 0.50000000D+00 0.92659063D+01 0.24974709D-01
+ 0.50000000D+00 0.60000000D+00 0.90919534D+01 0.23915557D-01
+ 0.60000000D+00 0.70000000D+00 0.89716141D+01 0.22809609D-01
+ 0.70000000D+00 0.80000000D+00 0.88384789D+01 0.25420652D-01
+ 0.80000000D+00 0.90000000D+00 0.86087382D+01 0.23422937D-01
+ 0.90000000D+00 0.10000000D+01 0.84369839D+01 0.21009210D-01
+ 0.10000000D+01 0.11000000D+01 0.81672025D+01 0.22448217D-01
+ 0.11000000D+01 0.12000000D+01 0.79234170D+01 0.24062373D-01
+ 0.12000000D+01 0.13000000D+01 0.76497488D+01 0.20691454D-01
+ 0.13000000D+01 0.14000000D+01 0.73374745D+01 0.21084132D-01
+ 0.14000000D+01 0.15000000D+01 0.70171747D+01 0.22423456D-01
+ 0.15000000D+01 0.16000000D+01 0.67027687D+01 0.26492234D-01
+ 0.16000000D+01 0.17000000D+01 0.63736702D+01 0.19877198D-01
+ 0.17000000D+01 0.18000000D+01 0.60118590D+01 0.19270571D-01
+ 0.18000000D+01 0.19000000D+01 0.56247584D+01 0.18578570D-01
+ 0.19000000D+01 0.20000000D+01 0.52726698D+01 0.20109637D-01
+ 0.20000000D+01 0.21000000D+01 0.48754325D+01 0.17215033D-01
+ 0.21000000D+01 0.22000000D+01 0.44862475D+01 0.15544613D-01
+ 0.22000000D+01 0.23000000D+01 0.40838069D+01 0.14732950D-01
+ 0.23000000D+01 0.24000000D+01 0.37030600D+01 0.13798498D-01
+ 0.24000000D+01 0.25000000D+01 0.33463525D+01 0.13192472D-01
+ 0.25000000D+01 0.26000000D+01 0.29739177D+01 0.13298245D-01
+ 0.26000000D+01 0.27000000D+01 0.26478765D+01 0.11212377D-01
+ 0.27000000D+01 0.28000000D+01 0.23102434D+01 0.10630514D-01
+ 0.28000000D+01 0.29000000D+01 0.19880306D+01 0.11881815D-01
+ 0.29000000D+01 0.30000000D+01 0.16999807D+01 0.93833116D-02
+ 0.30000000D+01 0.31000000D+01 0.14323333D+01 0.86526038D-02
+ 0.31000000D+01 0.32000000D+01 0.11938805D+01 0.74676096D-02
+ 0.32000000D+01 0.33000000D+01 0.97693592D+00 0.60017655D-02
+ 0.33000000D+01 0.34000000D+01 0.77966676D+00 0.61695305D-02
+ 0.34000000D+01 0.35000000D+01 0.59984296D+00 0.51167846D-02
+ 0.35000000D+01 0.36000000D+01 0.45643796D+00 0.35342749D-02
+ 0.36000000D+01 0.37000000D+01 0.33209593D+00 0.35319248D-02
+ 0.37000000D+01 0.38000000D+01 0.23452520D+00 0.20698825D-02
+ 0.38000000D+01 0.39000000D+01 0.15740322D+00 0.16289977D-02
+ 0.39000000D+01 0.40000000D+01 0.93594152D-01 0.92749138D-03
+ 0.40000000D+01 0.41000000D+01 0.50590818D-01 0.51761562D-03
+ 0.41000000D+01 0.42000000D+01 0.22003921D-01 0.21945231D-03
+ 0.42000000D+01 0.43000000D+01 0.72210303D-02 0.85765064D-04
+ 0.43000000D+01 0.44000000D+01 0.12889693D-02 0.32724702D-04
+ 0.44000000D+01 0.45000000D+01 -.13090555D-03 0.79287630D-05
+ 0.45000000D+01 0.46000000D+01 -.94355831D-04 0.34487831D-05
+ 0.46000000D+01 0.47000000D+01 -.18376929D-05 0.52057768D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.18245712D-05 0.52222217D-06
+ -.46000000D+01 -.45000000D+01 -.94939738D-04 0.34946370D-05
+ -.45000000D+01 -.44000000D+01 -.13606364D-03 0.74012622D-05
+ -.44000000D+01 -.43000000D+01 0.12942541D-02 0.29186076D-04
+ -.43000000D+01 -.42000000D+01 0.74293911D-02 0.85607225D-04
+ -.42000000D+01 -.41000000D+01 0.22474763D-01 0.21777051D-03
+ -.41000000D+01 -.40000000D+01 0.49704653D-01 0.47032163D-03
+ -.40000000D+01 -.39000000D+01 0.94150141D-01 0.11076885D-02
+ -.39000000D+01 -.38000000D+01 0.15684909D+00 0.13762981D-02
+ -.38000000D+01 -.37000000D+01 0.23817742D+00 0.18913399D-02
+ -.37000000D+01 -.36000000D+01 0.34724833D+00 0.31102735D-02
+ -.36000000D+01 -.35000000D+01 0.46862164D+00 0.39941530D-02
+ -.35000000D+01 -.34000000D+01 0.62367457D+00 0.48406698D-02
+ -.34000000D+01 -.33000000D+01 0.79999607D+00 0.67907739D-02
+ -.33000000D+01 -.32000000D+01 0.10067035D+01 0.65209792D-02
+ -.32000000D+01 -.31000000D+01 0.12290126D+01 0.80340136D-02
+ -.31000000D+01 -.30000000D+01 0.14932144D+01 0.85746018D-02
+ -.30000000D+01 -.29000000D+01 0.17523292D+01 0.87502432D-02
+ -.29000000D+01 -.28000000D+01 0.20648235D+01 0.10290646D-01
+ -.28000000D+01 -.27000000D+01 0.23954112D+01 0.11996042D-01
+ -.27000000D+01 -.26000000D+01 0.27517531D+01 0.11328434D-01
+ -.26000000D+01 -.25000000D+01 0.30754991D+01 0.12114586D-01
+ -.25000000D+01 -.24000000D+01 0.34953441D+01 0.14047440D-01
+ -.24000000D+01 -.23000000D+01 0.38538968D+01 0.15001293D-01
+ -.23000000D+01 -.22000000D+01 0.42763861D+01 0.14398799D-01
+ -.22000000D+01 -.21000000D+01 0.46851212D+01 0.16013514D-01
+ -.21000000D+01 -.20000000D+01 0.50743915D+01 0.16021340D-01
+ -.20000000D+01 -.19000000D+01 0.54999928D+01 0.18134168D-01
+ -.19000000D+01 -.18000000D+01 0.58650940D+01 0.25754342D-01
+ -.18000000D+01 -.17000000D+01 0.62581656D+01 0.23604083D-01
+ -.17000000D+01 -.16000000D+01 0.66590194D+01 0.22357928D-01
+ -.16000000D+01 -.15000000D+01 0.70116163D+01 0.19003253D-01
+ -.15000000D+01 -.14000000D+01 0.73675183D+01 0.22935706D-01
+ -.14000000D+01 -.13000000D+01 0.77113213D+01 0.26407564D-01
+ -.13000000D+01 -.12000000D+01 0.80056774D+01 0.23729296D-01
+ -.12000000D+01 -.11000000D+01 0.82948114D+01 0.24807726D-01
+ -.11000000D+01 -.10000000D+01 0.85725697D+01 0.22133947D-01
+ -.10000000D+01 -.90000000D+00 0.87871017D+01 0.23390028D-01
+ -.90000000D+00 -.80000000D+00 0.90239201D+01 0.25056009D-01
+ -.80000000D+00 -.70000000D+00 0.91815336D+01 0.22759504D-01
+ -.70000000D+00 -.60000000D+00 0.94102417D+01 0.23382113D-01
+ -.60000000D+00 -.50000000D+00 0.95141729D+01 0.22402685D-01
+ -.50000000D+00 -.40000000D+00 0.96481097D+01 0.23409344D-01
+ -.40000000D+00 -.30000000D+00 0.97613457D+01 0.25067350D-01
+ -.30000000D+00 -.20000000D+00 0.98738163D+01 0.23950211D-01
+ -.20000000D+00 -.10000000D+00 0.98920174D+01 0.23753377D-01
+ -.10000000D+00 0.18041124D-15 0.99115272D+01 0.22794711D-01
+ 0.70776718D-15 0.10000000D+00 0.99770007D+01 0.29855924D-01
+ 0.10000000D+00 0.20000000D+00 0.98754370D+01 0.23516193D-01
+ 0.20000000D+00 0.30000000D+00 0.98706026D+01 0.22581618D-01
+ 0.30000000D+00 0.40000000D+00 0.97711717D+01 0.23545393D-01
+ 0.40000000D+00 0.50000000D+00 0.97154441D+01 0.25149410D-01
+ 0.50000000D+00 0.60000000D+00 0.95335293D+01 0.24088091D-01
+ 0.60000000D+00 0.70000000D+00 0.94047851D+01 0.22834983D-01
+ 0.70000000D+00 0.80000000D+00 0.92625878D+01 0.25446985D-01
+ 0.80000000D+00 0.90000000D+00 0.90204914D+01 0.23448691D-01
+ 0.90000000D+00 0.10000000D+01 0.88361266D+01 0.21037206D-01
+ 0.10000000D+01 0.11000000D+01 0.85531714D+01 0.22472099D-01
+ 0.11000000D+01 0.12000000D+01 0.82938159D+01 0.24134180D-01
+ 0.12000000D+01 0.13000000D+01 0.80048656D+01 0.20771436D-01
+ 0.13000000D+01 0.14000000D+01 0.76751745D+01 0.21097171D-01
+ 0.14000000D+01 0.15000000D+01 0.73378086D+01 0.22436054D-01
+ 0.15000000D+01 0.16000000D+01 0.70048882D+01 0.26557720D-01
+ 0.16000000D+01 0.17000000D+01 0.66567911D+01 0.19960001D-01
+ 0.17000000D+01 0.18000000D+01 0.62757426D+01 0.19307815D-01
+ 0.18000000D+01 0.19000000D+01 0.58695203D+01 0.18612380D-01
+ 0.19000000D+01 0.20000000D+01 0.54977063D+01 0.20119040D-01
+ 0.20000000D+01 0.21000000D+01 0.50810530D+01 0.17224858D-01
+ 0.21000000D+01 0.22000000D+01 0.46728082D+01 0.15562200D-01
+ 0.22000000D+01 0.23000000D+01 0.42513059D+01 0.14754366D-01
+ 0.23000000D+01 0.24000000D+01 0.38523070D+01 0.13815158D-01
+ 0.24000000D+01 0.25000000D+01 0.34783098D+01 0.13205703D-01
+ 0.25000000D+01 0.26000000D+01 0.30891588D+01 0.13304927D-01
+ 0.26000000D+01 0.27000000D+01 0.27475601D+01 0.11219098D-01
+ 0.27000000D+01 0.28000000D+01 0.23952034D+01 0.10639607D-01
+ 0.28000000D+01 0.29000000D+01 0.20597150D+01 0.11889574D-01
+ 0.29000000D+01 0.30000000D+01 0.17594187D+01 0.93877530D-02
+ 0.30000000D+01 0.31000000D+01 0.14808420D+01 0.86593647D-02
+ 0.31000000D+01 0.32000000D+01 0.12327007D+01 0.74737239D-02
+ 0.32000000D+01 0.33000000D+01 0.10072235D+01 0.60071235D-02
+ 0.33000000D+01 0.34000000D+01 0.80278082D+00 0.61755240D-02
+ 0.34000000D+01 0.35000000D+01 0.61681386D+00 0.51244950D-02
+ 0.35000000D+01 0.36000000D+01 0.46857760D+00 0.35359533D-02
+ 0.36000000D+01 0.37000000D+01 0.34029843D+00 0.35328082D-02
+ 0.37000000D+01 0.38000000D+01 0.23977200D+00 0.20706123D-02
+ 0.38000000D+01 0.39000000D+01 0.16050740D+00 0.16293548D-02
+ 0.39000000D+01 0.40000000D+01 0.95239344D-01 0.92774410D-03
+ 0.40000000D+01 0.41000000D+01 0.51346932D-01 0.51767310D-03
+ 0.41000000D+01 0.42000000D+01 0.22285222D-01 0.21950262D-03
+ 0.42000000D+01 0.43000000D+01 0.72976480D-02 0.85785779D-04
+ 0.43000000D+01 0.44000000D+01 0.12994065D-02 0.32727010D-04
+ 0.44000000D+01 0.45000000D+01 -.13200878D-03 0.79296456D-05
+ 0.45000000D+01 0.46000000D+01 -.94735209D-04 0.34488344D-05
+ 0.46000000D+01 0.47000000D+01 -.18398274D-05 0.52057787D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 -.17366688D+01 0.55819395D-02
+ 0.30000000D+01 0.60000000D+01 0.43970263D+00 0.30331178D-02
+ 0.60000000D+01 0.90000000D+01 0.18944295D+01 0.20363681D-02
+ 0.90000000D+01 0.12000000D+02 0.17113499D+01 0.18266869D-02
+ 0.12000000D+02 0.15000000D+02 0.14260054D+01 0.22163794D-02
+ 0.15000000D+02 0.18000000D+02 0.11884028D+01 0.20378955D-02
+ 0.18000000D+02 0.21000000D+02 0.99894877D+00 0.12030410D-02
+ 0.21000000D+02 0.24000000D+02 0.84977930D+00 0.10885020D-02
+ 0.24000000D+02 0.27000000D+02 0.73304233D+00 0.10716722D-02
+ 0.27000000D+02 0.30000000D+02 0.63818438D+00 0.98360601D-03
+ 0.30000000D+02 0.33000000D+02 0.55807340D+00 0.99387801D-03
+ 0.33000000D+02 0.36000000D+02 0.49495616D+00 0.10036858D-02
+ 0.36000000D+02 0.39000000D+02 0.43961340D+00 0.88441699D-03
+ 0.39000000D+02 0.42000000D+02 0.39510773D+00 0.79366641D-03
+ 0.42000000D+02 0.45000000D+02 0.35253875D+00 0.16255838D-02
+ 0.45000000D+02 0.48000000D+02 0.32216758D+00 0.16123828D-02
+ 0.48000000D+02 0.51000000D+02 0.29046310D+00 0.62571412D-03
+ 0.51000000D+02 0.54000000D+02 0.26510106D+00 0.72574029D-03
+ 0.54000000D+02 0.57000000D+02 0.24037161D+00 0.70602354D-03
+ 0.57000000D+02 0.60000000D+02 0.22042135D+00 0.68961295D-03
+ 0.60000000D+02 0.63000000D+02 0.20232491D+00 0.71240512D-03
+ 0.63000000D+02 0.66000000D+02 0.18625742D+00 0.81008720D-03
+ 0.66000000D+02 0.69000000D+02 0.17037625D+00 0.80555427D-03
+ 0.69000000D+02 0.72000000D+02 0.15919880D+00 0.58419500D-03
+ 0.72000000D+02 0.75000000D+02 0.14466989D+00 0.59530558D-03
+ 0.75000000D+02 0.78000000D+02 0.13543241D+00 0.58255040D-03
+ 0.78000000D+02 0.81000000D+02 0.12496809D+00 0.50327424D-03
+ 0.81000000D+02 0.84000000D+02 0.11616672D+00 0.45698440D-03
+ 0.84000000D+02 0.87000000D+02 0.10717274D+00 0.47255304D-03
+ 0.87000000D+02 0.90000000D+02 0.10166655D+00 0.55652517D-03
+ 0.90000000D+02 0.93000000D+02 0.93080981D-01 0.47546847D-03
+ 0.93000000D+02 0.96000000D+02 0.86945262D-01 0.38117155D-03
+ 0.96000000D+02 0.99000000D+02 0.81482793D-01 0.34423169D-03
+ 0.99000000D+02 0.10200000D+03 0.75174172D-01 0.34857355D-03
+ 0.10200000D+03 0.10500000D+03 0.72129253D-01 0.37130366D-03
+ 0.10500000D+03 0.10800000D+03 0.66047461D-01 0.36618145D-03
+ 0.10800000D+03 0.11100000D+03 0.62032265D-01 0.34796452D-03
+ 0.11100000D+03 0.11400000D+03 0.58468424D-01 0.41653932D-03
+ 0.11400000D+03 0.11700000D+03 0.55103087D-01 0.43342894D-03
+ 0.11700000D+03 0.12000000D+03 0.51041135D-01 0.42545537D-03
+ 0.12000000D+03 0.12300000D+03 0.48381315D-01 0.37654292D-03
+ 0.12300000D+03 0.12600000D+03 0.46943088D-01 0.10050625D-02
+ 0.12600000D+03 0.12900000D+03 0.41152303D-01 0.10183625D-02
+ 0.12900000D+03 0.13200000D+03 0.40270066D-01 0.26807279D-03
+ 0.13200000D+03 0.13500000D+03 0.38018117D-01 0.19766601D-03
+ 0.13500000D+03 0.13800000D+03 0.35896000D-01 0.21696153D-03
+ 0.13800000D+03 0.14100000D+03 0.33668503D-01 0.25801706D-03
+ 0.14100000D+03 0.14400000D+03 0.31665753D-01 0.25163379D-03
+ 0.14400000D+03 0.14700000D+03 0.30386956D-01 0.22045224D-03
+ 0.14700000D+03 0.15000000D+03 0.28591236D-01 0.24362863D-03
+ 0.15000000D+03 0.15300000D+03 0.26573882D-01 0.20850314D-03
+ 0.15300000D+03 0.15600000D+03 0.25572816D-01 0.16264467D-03
+ 0.15600000D+03 0.15900000D+03 0.23953476D-01 0.23735429D-03
+ 0.15900000D+03 0.16200000D+03 0.22631811D-01 0.29034732D-03
+ 0.16200000D+03 0.16500000D+03 0.21589176D-01 0.24525373D-03
+ 0.16500000D+03 0.16800000D+03 0.20480416D-01 0.18086790D-03
+ 0.16800000D+03 0.17100000D+03 0.19533620D-01 0.19262519D-03
+ 0.17100000D+03 0.17400000D+03 0.18225795D-01 0.17519480D-03
+ 0.17400000D+03 0.17700000D+03 0.17376742D-01 0.15512016D-03
+ 0.17700000D+03 0.18000000D+03 0.16651650D-01 0.13847736D-03
+ 0.18000000D+03 0.18300000D+03 0.15416677D-01 0.10872629D-03
+ 0.18300000D+03 0.18600000D+03 0.14847037D-01 0.11021423D-03
+ 0.18600000D+03 0.18900000D+03 0.14118721D-01 0.15194355D-03
+ 0.18900000D+03 0.19200000D+03 0.13486026D-01 0.15956086D-03
+ 0.19200000D+03 0.19500000D+03 0.12322337D-01 0.16186814D-03
+ 0.19500000D+03 0.19800000D+03 0.12293886D-01 0.14757811D-03
+ 0.19800000D+03 0.20100000D+03 0.11328526D-01 0.10682539D-03
+ 0.20100000D+03 0.20400000D+03 0.10977366D-01 0.11695835D-03
+ 0.20400000D+03 0.20700000D+03 0.10298971D-01 0.13134691D-03
+ 0.20700000D+03 0.21000000D+03 0.10145784D-01 0.29945525D-03
+ 0.21000000D+03 0.21300000D+03 0.89616777D-02 0.28837762D-03
+ 0.21300000D+03 0.21600000D+03 0.92433643D-02 0.43779291D-03
+ 0.21600000D+03 0.21900000D+03 0.79212565D-02 0.44049113D-03
+ 0.21900000D+03 0.22200000D+03 0.81099435D-02 0.14452091D-03
+ 0.22200000D+03 0.22500000D+03 0.77080264D-02 0.14077971D-03
+ 0.22500000D+03 0.22800000D+03 0.71610148D-02 0.93304002D-04
+ 0.22800000D+03 0.23100000D+03 0.70365374D-02 0.96719115D-04
+ 0.23100000D+03 0.23400000D+03 0.65321466D-02 0.10251145D-03
+ 0.23400000D+03 0.23700000D+03 0.61876251D-02 0.14617242D-03
+ 0.23700000D+03 0.24000000D+03 0.60584535D-02 0.16698162D-03
+ 0.24000000D+03 0.24300000D+03 0.57531100D-02 0.12157670D-03
+ 0.24300000D+03 0.24600000D+03 0.53362513D-02 0.67715651D-04
+ 0.24600000D+03 0.24900000D+03 0.51663819D-02 0.69543110D-04
+ 0.24900000D+03 0.25200000D+03 0.48815140D-02 0.68578177D-04
+ 0.25200000D+03 0.25500000D+03 0.46640480D-02 0.12312644D-03
+ 0.25500000D+03 0.25800000D+03 0.45378597D-02 0.12640236D-03
+ 0.25800000D+03 0.26100000D+03 0.41856461D-02 0.85490088D-04
+ 0.26100000D+03 0.26400000D+03 0.41453759D-02 0.90929098D-04
+ 0.26400000D+03 0.26700000D+03 0.37177459D-02 0.81693262D-04
+ 0.26700000D+03 0.27000000D+03 0.36237448D-02 0.15628572D-03
+ 0.27000000D+03 0.27300000D+03 0.37427189D-02 0.19970086D-03
+ 0.27300000D+03 0.27600000D+03 0.33807226D-02 0.17639876D-03
+ 0.27600000D+03 0.27900000D+03 0.30955561D-02 0.12546013D-03
+ 0.27900000D+03 0.28200000D+03 0.29561092D-02 0.69162646D-04
+ 0.28200000D+03 0.28500000D+03 0.28027226D-02 0.15281568D-03
+ 0.28500000D+03 0.28800000D+03 0.30226635D-02 0.15572233D-03
+ 0.28800000D+03 0.29100000D+03 0.24666885D-02 0.80164528D-04
+ 0.29100000D+03 0.29400000D+03 0.26134579D-02 0.77562646D-04
+ 0.29400000D+03 0.29700000D+03 0.24912075D-02 0.64702710D-04
+ 0.29700000D+03 0.30000000D+03 0.22286275D-02 0.61914708D-04
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 -.17339753D+01 0.55810218D-02
+ 0.30000000D+01 0.60000000D+01 0.43851523D+00 0.30299176D-02
+ 0.60000000D+01 0.90000000D+01 0.18875401D+01 0.20293122D-02
+ 0.90000000D+01 0.12000000D+02 0.16993779D+01 0.18135762D-02
+ 0.12000000D+02 0.15000000D+02 0.14096199D+01 0.21888439D-02
+ 0.15000000D+02 0.18000000D+02 0.11681135D+01 0.20063527D-02
+ 0.18000000D+02 0.21000000D+02 0.97527743D+00 0.11749561D-02
+ 0.21000000D+02 0.24000000D+02 0.82316918D+00 0.10545387D-02
+ 0.24000000D+02 0.27000000D+02 0.70380872D+00 0.10285079D-02
+ 0.27000000D+02 0.30000000D+02 0.60669483D+00 0.93609643D-03
+ 0.30000000D+02 0.33000000D+02 0.52478995D+00 0.93296593D-03
+ 0.33000000D+02 0.36000000D+02 0.45995863D+00 0.93402928D-03
+ 0.36000000D+02 0.39000000D+02 0.40335784D+00 0.81114928D-03
+ 0.39000000D+02 0.42000000D+02 0.35761127D+00 0.71963517D-03
+ 0.42000000D+02 0.45000000D+02 0.31450125D+00 0.14409397D-02
+ 0.45000000D+02 0.48000000D+02 0.28304612D+00 0.14257376D-02
+ 0.48000000D+02 0.51000000D+02 0.25111854D+00 0.54091239D-03
+ 0.51000000D+02 0.54000000D+02 0.22537308D+00 0.61561862D-03
+ 0.54000000D+02 0.57000000D+02 0.20080906D+00 0.59122851D-03
+ 0.57000000D+02 0.60000000D+02 0.18084596D+00 0.56444873D-03
+ 0.60000000D+02 0.63000000D+02 0.16291948D+00 0.57434835D-03
+ 0.63000000D+02 0.66000000D+02 0.14711227D+00 0.63766422D-03
+ 0.66000000D+02 0.69000000D+02 0.13193195D+00 0.62593669D-03
+ 0.69000000D+02 0.72000000D+02 0.12079486D+00 0.44427306D-03
+ 0.72000000D+02 0.75000000D+02 0.10751491D+00 0.44116182D-03
+ 0.75000000D+02 0.78000000D+02 0.98548208D-01 0.42535958D-03
+ 0.78000000D+02 0.81000000D+02 0.88991550D-01 0.35795808D-03
+ 0.81000000D+02 0.84000000D+02 0.80933436D-01 0.31985048D-03
+ 0.84000000D+02 0.87000000D+02 0.73034100D-01 0.32030746D-03
+ 0.87000000D+02 0.90000000D+02 0.67735651D-01 0.37088790D-03
+ 0.90000000D+02 0.93000000D+02 0.60614169D-01 0.31074134D-03
+ 0.93000000D+02 0.96000000D+02 0.55334006D-01 0.24274871D-03
+ 0.96000000D+02 0.99000000D+02 0.50670873D-01 0.21440381D-03
+ 0.99000000D+02 0.10200000D+03 0.45671371D-01 0.21130023D-03
+ 0.10200000D+03 0.10500000D+03 0.42801292D-01 0.22041450D-03
+ 0.10500000D+03 0.10800000D+03 0.38273018D-01 0.21216619D-03
+ 0.10800000D+03 0.11100000D+03 0.35106123D-01 0.19716135D-03
+ 0.11100000D+03 0.11400000D+03 0.32310656D-01 0.22908536D-03
+ 0.11400000D+03 0.11700000D+03 0.29728607D-01 0.23461138D-03
+ 0.11700000D+03 0.12000000D+03 0.26885762D-01 0.22348353D-03
+ 0.12000000D+03 0.12300000D+03 0.24883768D-01 0.19498030D-03
+ 0.12300000D+03 0.12600000D+03 0.23563094D-01 0.49890917D-03
+ 0.12600000D+03 0.12900000D+03 0.20163829D-01 0.50447875D-03
+ 0.12900000D+03 0.13200000D+03 0.19273311D-01 0.12905520D-03
+ 0.13200000D+03 0.13500000D+03 0.17763588D-01 0.92237666D-04
+ 0.13500000D+03 0.13800000D+03 0.16373517D-01 0.98852663D-04
+ 0.13800000D+03 0.14100000D+03 0.14995671D-01 0.11461454D-03
+ 0.14100000D+03 0.14400000D+03 0.13773263D-01 0.10978102D-03
+ 0.14400000D+03 0.14700000D+03 0.12905515D-01 0.93586343D-04
+ 0.14700000D+03 0.15000000D+03 0.11856833D-01 0.10087636D-03
+ 0.15000000D+03 0.15300000D+03 0.10764176D-01 0.85013441D-04
+ 0.15300000D+03 0.15600000D+03 0.10118282D-01 0.64138913D-04
+ 0.15600000D+03 0.15900000D+03 0.92576968D-02 0.91325682D-04
+ 0.15900000D+03 0.16200000D+03 0.85476406D-02 0.10953737D-03
+ 0.16200000D+03 0.16500000D+03 0.79669858D-02 0.91005454D-04
+ 0.16500000D+03 0.16800000D+03 0.73841961D-02 0.65151696D-04
+ 0.16800000D+03 0.17100000D+03 0.68822694D-02 0.67811479D-04
+ 0.17100000D+03 0.17400000D+03 0.62752612D-02 0.60525841D-04
+ 0.17400000D+03 0.17700000D+03 0.58495632D-02 0.52149229D-04
+ 0.17700000D+03 0.18000000D+03 0.54788911D-02 0.45762258D-04
+ 0.18000000D+03 0.18300000D+03 0.49600085D-02 0.34990484D-04
+ 0.18300000D+03 0.18600000D+03 0.46717923D-02 0.34653115D-04
+ 0.18600000D+03 0.18900000D+03 0.43449745D-02 0.46530950D-04
+ 0.18900000D+03 0.19200000D+03 0.40589284D-02 0.48180762D-04
+ 0.19200000D+03 0.19500000D+03 0.36290292D-02 0.47526320D-04
+ 0.19500000D+03 0.19800000D+03 0.35427121D-02 0.42708179D-04
+ 0.19800000D+03 0.20100000D+03 0.31941637D-02 0.30064655D-04
+ 0.20100000D+03 0.20400000D+03 0.30291518D-02 0.32271627D-04
+ 0.20400000D+03 0.20700000D+03 0.27815564D-02 0.35401256D-04
+ 0.20700000D+03 0.21000000D+03 0.26818578D-02 0.78534562D-04
+ 0.21000000D+03 0.21300000D+03 0.23194243D-02 0.75382355D-04
+ 0.21300000D+03 0.21600000D+03 0.23427370D-02 0.10990726D-03
+ 0.21600000D+03 0.21900000D+03 0.19664228D-02 0.11043073D-03
+ 0.21900000D+03 0.22200000D+03 0.19730898D-02 0.34953414D-04
+ 0.22200000D+03 0.22500000D+03 0.18368722D-02 0.33756003D-04
+ 0.22500000D+03 0.22800000D+03 0.16719613D-02 0.21755187D-04
+ 0.22800000D+03 0.23100000D+03 0.16099478D-02 0.22134846D-04
+ 0.23100000D+03 0.23400000D+03 0.14644695D-02 0.22960728D-04
+ 0.23400000D+03 0.23700000D+03 0.13602671D-02 0.31999579D-04
+ 0.23700000D+03 0.24000000D+03 0.13059776D-02 0.36014609D-04
+ 0.24000000D+03 0.24300000D+03 0.12157947D-02 0.25858918D-04
+ 0.24300000D+03 0.24600000D+03 0.11057187D-02 0.14012517D-04
+ 0.24600000D+03 0.24900000D+03 0.10499559D-02 0.14150098D-04
+ 0.24900000D+03 0.25200000D+03 0.97325426D-03 0.13663624D-04
+ 0.25200000D+03 0.25500000D+03 0.91229909D-03 0.23931556D-04
+ 0.25500000D+03 0.25800000D+03 0.87088389D-03 0.24393041D-04
+ 0.25800000D+03 0.26100000D+03 0.78830084D-03 0.16083211D-04
+ 0.26100000D+03 0.26400000D+03 0.76607709D-03 0.16812361D-04
+ 0.26400000D+03 0.26700000D+03 0.67456363D-03 0.14845534D-04
+ 0.26700000D+03 0.27000000D+03 0.64580890D-03 0.27643799D-04
+ 0.27000000D+03 0.27300000D+03 0.65469593D-03 0.34954641D-04
+ 0.27300000D+03 0.27600000D+03 0.58033467D-03 0.30344035D-04
+ 0.27600000D+03 0.27900000D+03 0.52197304D-03 0.21290312D-04
+ 0.27900000D+03 0.28200000D+03 0.48981166D-03 0.11465980D-04
+ 0.28200000D+03 0.28500000D+03 0.45645574D-03 0.24700673D-04
+ 0.28500000D+03 0.28800000D+03 0.48357761D-03 0.25068966D-04
+ 0.28800000D+03 0.29100000D+03 0.38758111D-03 0.12588665D-04
+ 0.29100000D+03 0.29400000D+03 0.40374463D-03 0.11992359D-04
+ 0.29400000D+03 0.29700000D+03 0.37801101D-03 0.98383616D-05
+ 0.29700000D+03 0.30000000D+03 0.33242909D-03 0.92324110D-05
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.48149681D+01 0.80561169D-03
+ 0.12500000D+03 0.13000000D+03 -.12572742D+02 0.36756987D-02
+ 0.13000000D+03 0.13500000D+03 0.39804428D+01 0.27035013D-02
+ 0.13500000D+03 0.14000000D+03 0.25167109D+01 0.22416871D-02
+ 0.14000000D+03 0.14500000D+03 0.17029037D+01 0.18593209D-02
+ 0.14500000D+03 0.15000000D+03 0.12370936D+01 0.14765547D-02
+ 0.15000000D+03 0.15500000D+03 0.94133775D+00 0.13378571D-02
+ 0.15500000D+03 0.16000000D+03 0.73978421D+00 0.14405822D-02
+ 0.16000000D+03 0.16500000D+03 0.60436218D+00 0.13445421D-02
+ 0.16500000D+03 0.17000000D+03 0.49760764D+00 0.10736502D-02
+ 0.17000000D+03 0.17500000D+03 0.42088064D+00 0.10061802D-02
+ 0.17500000D+03 0.18000000D+03 0.35920803D+00 0.92990925D-03
+ 0.18000000D+03 0.18500000D+03 0.31080050D+00 0.87075054D-03
+ 0.18500000D+03 0.19000000D+03 0.27023597D+00 0.96608093D-03
+ 0.19000000D+03 0.19500000D+03 0.23923831D+00 0.89992223D-03
+ 0.19500000D+03 0.20000000D+03 0.21109539D+00 0.70460860D-03
+ 0.20000000D+03 0.20500000D+03 0.18919102D+00 0.67407925D-03
+ 0.20500000D+03 0.21000000D+03 0.16737056D+00 0.65666547D-03
+ 0.21000000D+03 0.21500000D+03 0.15255596D+00 0.65400535D-03
+ 0.21500000D+03 0.22000000D+03 0.13765925D+00 0.53892497D-03
+ 0.22000000D+03 0.22500000D+03 0.12446403D+00 0.59566836D-03
+ 0.22500000D+03 0.23000000D+03 0.11375653D+00 0.62288461D-03
+ 0.23000000D+03 0.23500000D+03 0.10376668D+00 0.61312772D-03
+ 0.23500000D+03 0.24000000D+03 0.95758678D-01 0.63204857D-03
+ 0.24000000D+03 0.24500000D+03 0.87631656D-01 0.59367753D-03
+ 0.24500000D+03 0.25000000D+03 0.80542796D-01 0.61434610D-03
+ 0.25000000D+03 0.25500000D+03 0.75618233D-01 0.61508872D-03
+ 0.25500000D+03 0.26000000D+03 0.68487769D-01 0.52111517D-03
+ 0.26000000D+03 0.26500000D+03 0.63974396D-01 0.56499103D-03
+ 0.26500000D+03 0.27000000D+03 0.59015208D-01 0.59902743D-03
+ 0.27000000D+03 0.27500000D+03 0.55824113D-01 0.55239425D-03
+ 0.27500000D+03 0.28000000D+03 0.50472685D-01 0.10790718D-02
+ 0.28000000D+03 0.28500000D+03 0.49053466D-01 0.10862059D-02
+ 0.28500000D+03 0.29000000D+03 0.45629937D-01 0.47280572D-03
+ 0.29000000D+03 0.29500000D+03 0.42608856D-01 0.30061707D-03
+ 0.29500000D+03 0.30000000D+03 0.39429304D-01 0.29600707D-03
+ 0.30000000D+03 0.30500000D+03 0.36837312D-01 0.37106833D-03
+ 0.30500000D+03 0.31000000D+03 0.35702529D-01 0.36760002D-03
+ 0.31000000D+03 0.31500000D+03 0.32584922D-01 0.29875125D-03
+ 0.31500000D+03 0.32000000D+03 0.31009878D-01 0.27701534D-03
+ 0.32000000D+03 0.32500000D+03 0.29469482D-01 0.25820351D-03
+ 0.32500000D+03 0.33000000D+03 0.27217039D-01 0.36810436D-03
+ 0.33000000D+03 0.33500000D+03 0.26778811D-01 0.35351629D-03
+ 0.33500000D+03 0.34000000D+03 0.24414849D-01 0.26146671D-03
+ 0.34000000D+03 0.34500000D+03 0.23622676D-01 0.28558404D-03
+ 0.34500000D+03 0.35000000D+03 0.22191734D-01 0.25079805D-03
+ 0.35000000D+03 0.35500000D+03 0.21003273D-01 0.22199409D-03
+ 0.35500000D+03 0.36000000D+03 0.19901271D-01 0.20993958D-03
+ 0.36000000D+03 0.36500000D+03 0.18783393D-01 0.25367619D-03
+ 0.36500000D+03 0.37000000D+03 0.18234710D-01 0.26657830D-03
+ 0.37000000D+03 0.37500000D+03 0.17259934D-01 0.20895262D-03
+ 0.37500000D+03 0.38000000D+03 0.16306925D-01 0.19919439D-03
+ 0.38000000D+03 0.38500000D+03 0.15499330D-01 0.19998485D-03
+ 0.38500000D+03 0.39000000D+03 0.14622170D-01 0.18390542D-03
+ 0.39000000D+03 0.39500000D+03 0.14278274D-01 0.16610801D-03
+ 0.39500000D+03 0.40000000D+03 0.13001177D-01 0.22240867D-03
+ 0.40000000D+03 0.40500000D+03 0.13103117D-01 0.22329858D-03
+ 0.40500000D+03 0.41000000D+03 0.12267645D-01 0.13822898D-03
+ 0.41000000D+03 0.41500000D+03 0.11294249D-01 0.15818761D-03
+ 0.41500000D+03 0.42000000D+03 0.11393536D-01 0.16239677D-03
+ 0.42000000D+03 0.42500000D+03 0.10562496D-01 0.14261313D-03
+ 0.42500000D+03 0.43000000D+03 0.99173948D-02 0.14533101D-03
+ 0.43000000D+03 0.43500000D+03 0.96893791D-02 0.16184147D-03
+ 0.43500000D+03 0.44000000D+03 0.93569733D-02 0.16986193D-03
+ 0.44000000D+03 0.44500000D+03 0.87487208D-02 0.23777553D-03
+ 0.44500000D+03 0.45000000D+03 0.85738155D-02 0.24440282D-03
+ 0.45000000D+03 0.45500000D+03 0.77918046D-02 0.28884417D-03
+ 0.45500000D+03 0.46000000D+03 0.81798581D-02 0.28180894D-03
+ 0.46000000D+03 0.46500000D+03 0.73570600D-02 0.15430762D-03
+ 0.46500000D+03 0.47000000D+03 0.71786468D-02 0.13820918D-03
+ 0.47000000D+03 0.47500000D+03 0.68351204D-02 0.13365963D-03
+ 0.47500000D+03 0.48000000D+03 0.55584322D-02 0.97491280D-03
+ 0.48000000D+03 0.48500000D+03 0.72780444D-02 0.97702576D-03
+ 0.48500000D+03 0.49000000D+03 0.59018583D-02 0.17215035D-03
+ 0.49000000D+03 0.49500000D+03 0.60825920D-02 0.14132089D-03
+ 0.49500000D+03 0.50000000D+03 0.55417766D-02 0.99936990D-04
+ 0.50000000D+03 0.50500000D+03 0.51380002D-02 0.13537527D-03
+ 0.50500000D+03 0.51000000D+03 0.52938383D-02 0.13527292D-03
+ 0.51000000D+03 0.51500000D+03 0.50460157D-02 0.86732524D-04
+ 0.51500000D+03 0.52000000D+03 0.45115686D-02 0.11112638D-03
+ 0.52000000D+03 0.52500000D+03 0.43936508D-02 0.26735221D-03
+ 0.52500000D+03 0.53000000D+03 0.45763344D-02 0.27540781D-03
+ 0.53000000D+03 0.53500000D+03 0.44304439D-02 0.12776976D-03
+ 0.53500000D+03 0.54000000D+03 0.38628729D-02 0.10722234D-03
+ 0.54000000D+03 0.54500000D+03 0.39652608D-02 0.11341371D-03
+ 0.54500000D+03 0.55000000D+03 0.36388442D-02 0.12091006D-03
+ 0.55000000D+03 0.55500000D+03 0.36117871D-02 0.16437379D-03
+ 0.55500000D+03 0.56000000D+03 0.35528612D-02 0.16131310D-03
+ 0.56000000D+03 0.56500000D+03 0.35338556D-02 0.11414042D-03
+ 0.56500000D+03 0.57000000D+03 0.32312015D-02 0.79053260D-04
+ 0.57000000D+03 0.57500000D+03 0.30588168D-02 0.87525064D-04
+ 0.57500000D+03 0.58000000D+03 0.30432588D-02 0.94482346D-04
+ 0.58000000D+03 0.58500000D+03 0.29391604D-02 0.83779487D-04
+ 0.58500000D+03 0.59000000D+03 0.28103935D-02 0.69806585D-04
+ 0.59000000D+03 0.59500000D+03 0.26903750D-02 0.61855285D-04
+ 0.59500000D+03 0.60000000D+03 0.25991735D-02 0.69686864D-04
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.48149681D+01 0.80561169D-03
+ 0.12500000D+03 0.13000000D+03 -.12572976D+02 0.36736328D-02
+ 0.13000000D+03 0.13500000D+03 0.39663494D+01 0.26942679D-02
+ 0.13500000D+03 0.14000000D+03 0.24921772D+01 0.22196031D-02
+ 0.14000000D+03 0.14500000D+03 0.16705158D+01 0.18258499D-02
+ 0.14500000D+03 0.15000000D+03 0.11985532D+01 0.14312135D-02
+ 0.15000000D+03 0.15500000D+03 0.89809426D+00 0.12760587D-02
+ 0.15500000D+03 0.16000000D+03 0.69312703D+00 0.13468944D-02
+ 0.16000000D+03 0.16500000D+03 0.55460965D+00 0.12376603D-02
+ 0.16500000D+03 0.17000000D+03 0.44616909D+00 0.96278641D-03
+ 0.17000000D+03 0.17500000D+03 0.36787968D+00 0.87998550D-03
+ 0.17500000D+03 0.18000000D+03 0.30543222D+00 0.79135596D-03
+ 0.18000000D+03 0.18500000D+03 0.25659975D+00 0.71967908D-03
+ 0.18500000D+03 0.19000000D+03 0.21626862D+00 0.76950180D-03
+ 0.19000000D+03 0.19500000D+03 0.18528512D+00 0.70216118D-03
+ 0.19500000D+03 0.20000000D+03 0.15800353D+00 0.52602915D-03
+ 0.20000000D+03 0.20500000D+03 0.13669644D+00 0.48904226D-03
+ 0.20500000D+03 0.21000000D+03 0.11661731D+00 0.45561011D-03
+ 0.21000000D+03 0.21500000D+03 0.10242792D+00 0.44107263D-03
+ 0.21500000D+03 0.22000000D+03 0.88977695D-01 0.34880498D-03
+ 0.22000000D+03 0.22500000D+03 0.77410109D-01 0.36894307D-03
+ 0.22500000D+03 0.23000000D+03 0.68050292D-01 0.37339806D-03
+ 0.23000000D+03 0.23500000D+03 0.59668045D-01 0.35193984D-03
+ 0.23500000D+03 0.24000000D+03 0.52922182D-01 0.34957734D-03
+ 0.24000000D+03 0.24500000D+03 0.46538277D-01 0.31594938D-03
+ 0.24500000D+03 0.25000000D+03 0.41101594D-01 0.31258735D-03
+ 0.25000000D+03 0.25500000D+03 0.37069502D-01 0.30225208D-03
+ 0.25500000D+03 0.26000000D+03 0.32250792D-01 0.24653080D-03
+ 0.26000000D+03 0.26500000D+03 0.28953369D-01 0.25404169D-03
+ 0.26500000D+03 0.27000000D+03 0.25674701D-01 0.26155741D-03
+ 0.27000000D+03 0.27500000D+03 0.23343043D-01 0.23077323D-03
+ 0.27500000D+03 0.28000000D+03 0.20296623D-01 0.42760822D-03
+ 0.28000000D+03 0.28500000D+03 0.18972338D-01 0.42574095D-03
+ 0.28500000D+03 0.29000000D+03 0.16970729D-01 0.17766574D-03
+ 0.29000000D+03 0.29500000D+03 0.15243287D-01 0.10779064D-03
+ 0.29500000D+03 0.30000000D+03 0.13575692D-01 0.10176592D-03
+ 0.30000000D+03 0.30500000D+03 0.12214913D-01 0.12218624D-03
+ 0.30500000D+03 0.31000000D+03 0.11403249D-01 0.11816044D-03
+ 0.31000000D+03 0.31500000D+03 0.10025827D-01 0.91900303D-04
+ 0.31500000D+03 0.32000000D+03 0.91989386D-02 0.82478821D-04
+ 0.32000000D+03 0.32500000D+03 0.84296383D-02 0.73739251D-04
+ 0.32500000D+03 0.33000000D+03 0.75119186D-02 0.10074383D-03
+ 0.33000000D+03 0.33500000D+03 0.71313594D-02 0.95149626D-04
+ 0.33500000D+03 0.34000000D+03 0.62766075D-02 0.66917254D-04
+ 0.34000000D+03 0.34500000D+03 0.58659043D-02 0.70994043D-04
+ 0.34500000D+03 0.35000000D+03 0.53236980D-02 0.60402617D-04
+ 0.35000000D+03 0.35500000D+03 0.48700437D-02 0.51520034D-04
+ 0.35500000D+03 0.36000000D+03 0.44628717D-02 0.47158189D-04
+ 0.36000000D+03 0.36500000D+03 0.40757079D-02 0.54717873D-04
+ 0.36500000D+03 0.37000000D+03 0.38289806D-02 0.56225885D-04
+ 0.37000000D+03 0.37500000D+03 0.35080484D-02 0.42624099D-04
+ 0.37500000D+03 0.38000000D+03 0.32093286D-02 0.39116089D-04
+ 0.38000000D+03 0.38500000D+03 0.29550084D-02 0.38237447D-04
+ 0.38500000D+03 0.39000000D+03 0.27026968D-02 0.33994824D-04
+ 0.39000000D+03 0.39500000D+03 0.25584989D-02 0.29895336D-04
+ 0.39500000D+03 0.40000000D+03 0.22603980D-02 0.38341927D-04
+ 0.40000000D+03 0.40500000D+03 0.22103472D-02 0.37985507D-04
+ 0.40500000D+03 0.41000000D+03 0.20076103D-02 0.22689609D-04
+ 0.41000000D+03 0.41500000D+03 0.17953950D-02 0.25021096D-04
+ 0.41500000D+03 0.42000000D+03 0.17591099D-02 0.25184326D-04
+ 0.42000000D+03 0.42500000D+03 0.15842395D-02 0.21396817D-04
+ 0.42500000D+03 0.43000000D+03 0.14459794D-02 0.21218170D-04
+ 0.43000000D+03 0.43500000D+03 0.13739662D-02 0.22875638D-04
+ 0.43500000D+03 0.44000000D+03 0.12908494D-02 0.23461297D-04
+ 0.44000000D+03 0.44500000D+03 0.11741379D-02 0.31665033D-04
+ 0.44500000D+03 0.45000000D+03 0.11200442D-02 0.32130923D-04
+ 0.45000000D+03 0.45500000D+03 0.99114167D-03 0.36429971D-04
+ 0.45500000D+03 0.46000000D+03 0.10134060D-02 0.35220605D-04
+ 0.46000000D+03 0.46500000D+03 0.88713273D-03 0.18607624D-04
+ 0.46500000D+03 0.47000000D+03 0.84364488D-03 0.16307325D-04
+ 0.47000000D+03 0.47500000D+03 0.78299559D-03 0.15269161D-04
+ 0.47500000D+03 0.48000000D+03 0.62238080D-03 0.10757558D-03
+ 0.48000000D+03 0.48500000D+03 0.79414108D-03 0.10772906D-03
+ 0.48500000D+03 0.49000000D+03 0.62733082D-03 0.18296426D-04
+ 0.49000000D+03 0.49500000D+03 0.63081634D-03 0.14739745D-04
+ 0.49500000D+03 0.50000000D+03 0.56060525D-03 0.10119792D-04
+ 0.50000000D+03 0.50500000D+03 0.50763925D-03 0.13310735D-04
+ 0.50500000D+03 0.51000000D+03 0.51106154D-03 0.13119604D-04
+ 0.51000000D+03 0.51500000D+03 0.47535577D-03 0.82000451D-05
+ 0.51500000D+03 0.52000000D+03 0.41544728D-03 0.10172818D-04
+ 0.52000000D+03 0.52500000D+03 0.39579134D-03 0.23862817D-04
+ 0.52500000D+03 0.53000000D+03 0.40284125D-03 0.24392273D-04
+ 0.53000000D+03 0.53500000D+03 0.38087809D-03 0.11075490D-04
+ 0.53500000D+03 0.54000000D+03 0.32486235D-03 0.89635874D-05
+ 0.54000000D+03 0.54500000D+03 0.32622077D-03 0.93748740D-05
+ 0.54500000D+03 0.55000000D+03 0.29295661D-03 0.96796404D-05
+ 0.55000000D+03 0.55500000D+03 0.28467282D-03 0.12920942D-04
+ 0.55500000D+03 0.56000000D+03 0.27405273D-03 0.12469552D-04
+ 0.56000000D+03 0.56500000D+03 0.26671045D-03 0.86585012D-05
+ 0.56500000D+03 0.57000000D+03 0.23861964D-03 0.58446538D-05
+ 0.57000000D+03 0.57500000D+03 0.22137234D-03 0.63208410D-05
+ 0.57500000D+03 0.58000000D+03 0.21571295D-03 0.67050833D-05
+ 0.58000000D+03 0.58500000D+03 0.20408943D-03 0.58316786D-05
+ 0.58500000D+03 0.59000000D+03 0.19117011D-03 0.47601619D-05
+ 0.59000000D+03 0.59500000D+03 0.17941282D-03 0.41298943D-05
+ 0.59500000D+03 0.60000000D+03 0.16987877D-03 0.45484743D-05
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 0.29907072D-01 0.56003725D-02
+ 0.30000000D+01 0.60000000D+01 -.56182902D-01 0.30708589D-02
+ 0.60000000D+01 0.90000000D+01 0.16628169D+01 0.22930198D-02
+ 0.90000000D+01 0.12000000D+02 0.15601738D+01 0.20634572D-02
+ 0.12000000D+02 0.15000000D+02 0.13185915D+01 0.21447350D-02
+ 0.15000000D+02 0.18000000D+02 0.11030329D+01 0.19716213D-02
+ 0.18000000D+02 0.21000000D+02 0.93015639D+00 0.16667862D-02
+ 0.21000000D+02 0.24000000D+02 0.79746674D+00 0.16593550D-02
+ 0.24000000D+02 0.27000000D+02 0.68672218D+00 0.14788963D-02
+ 0.27000000D+02 0.30000000D+02 0.59705581D+00 0.16905386D-02
+ 0.30000000D+02 0.33000000D+02 0.52478769D+00 0.16977320D-02
+ 0.33000000D+02 0.36000000D+02 0.46462943D+00 0.12152143D-02
+ 0.36000000D+02 0.39000000D+02 0.41190535D+00 0.10434824D-02
+ 0.39000000D+02 0.42000000D+02 0.37017918D+00 0.11188197D-02
+ 0.42000000D+02 0.45000000D+02 0.33278993D+00 0.17969370D-02
+ 0.45000000D+02 0.48000000D+02 0.29886152D+00 0.17453706D-02
+ 0.48000000D+02 0.51000000D+02 0.27224101D+00 0.10019304D-02
+ 0.51000000D+02 0.54000000D+02 0.24536481D+00 0.93896842D-03
+ 0.54000000D+02 0.57000000D+02 0.22558094D+00 0.10305512D-02
+ 0.57000000D+02 0.60000000D+02 0.20601602D+00 0.10568172D-02
+ 0.60000000D+02 0.63000000D+02 0.18762032D+00 0.90607049D-03
+ 0.63000000D+02 0.66000000D+02 0.17280586D+00 0.93814712D-03
+ 0.66000000D+02 0.69000000D+02 0.15995151D+00 0.90569087D-03
+ 0.69000000D+02 0.72000000D+02 0.14560774D+00 0.75769662D-03
+ 0.72000000D+02 0.75000000D+02 0.13608515D+00 0.81843744D-03
+ 0.75000000D+02 0.78000000D+02 0.12333599D+00 0.89885136D-03
+ 0.78000000D+02 0.81000000D+02 0.11755074D+00 0.88972533D-03
+ 0.81000000D+02 0.84000000D+02 0.10712474D+00 0.77846100D-03
+ 0.84000000D+02 0.87000000D+02 0.98765655D-01 0.88033999D-03
+ 0.87000000D+02 0.90000000D+02 0.93028042D-01 0.11334677D-02
+ 0.90000000D+02 0.93000000D+02 0.84801507D-01 0.99597535D-03
+ 0.93000000D+02 0.96000000D+02 0.81649482D-01 0.81467848D-03
+ 0.96000000D+02 0.99000000D+02 0.73651194D-01 0.84073513D-03
+ 0.99000000D+02 0.10200000D+03 0.70259527D-01 0.64114190D-03
+ 0.10200000D+03 0.10500000D+03 0.64772988D-01 0.51542456D-03
+ 0.10500000D+03 0.10800000D+03 0.60205938D-01 0.47038644D-03
+ 0.10800000D+03 0.11100000D+03 0.57674689D-01 0.69860426D-03
+ 0.11100000D+03 0.11400000D+03 0.52997181D-01 0.74460141D-03
+ 0.11400000D+03 0.11700000D+03 0.49721478D-01 0.52282385D-03
+ 0.11700000D+03 0.12000000D+03 0.47676214D-01 0.43721643D-03
+ 0.12000000D+03 0.12300000D+03 0.43719818D-01 0.48859714D-03
+ 0.12300000D+03 0.12600000D+03 0.39917497D-01 0.10609718D-02
+ 0.12600000D+03 0.12900000D+03 0.40651440D-01 0.10951810D-02
+ 0.12900000D+03 0.13200000D+03 0.36614840D-01 0.54733698D-03
+ 0.13200000D+03 0.13500000D+03 0.33967290D-01 0.36182647D-03
+ 0.13500000D+03 0.13800000D+03 0.32384451D-01 0.39522507D-03
+ 0.13800000D+03 0.14100000D+03 0.30567070D-01 0.41718296D-03
+ 0.14100000D+03 0.14400000D+03 0.30203507D-01 0.48388517D-03
+ 0.14400000D+03 0.14700000D+03 0.26605915D-01 0.50901484D-03
+ 0.14700000D+03 0.15000000D+03 0.24938209D-01 0.45833394D-03
+ 0.15000000D+03 0.15300000D+03 0.24996682D-01 0.36541303D-03
+ 0.15300000D+03 0.15600000D+03 0.23013447D-01 0.28076029D-03
+ 0.15600000D+03 0.15900000D+03 0.22155694D-01 0.31979682D-03
+ 0.15900000D+03 0.16200000D+03 0.20144308D-01 0.58149039D-03
+ 0.16200000D+03 0.16500000D+03 0.19661446D-01 0.56882698D-03
+ 0.16500000D+03 0.16800000D+03 0.18827827D-01 0.39149788D-03
+ 0.16800000D+03 0.17100000D+03 0.17143221D-01 0.39214651D-03
+ 0.17100000D+03 0.17400000D+03 0.16764011D-01 0.28082549D-03
+ 0.17400000D+03 0.17700000D+03 0.15634248D-01 0.25349007D-03
+ 0.17700000D+03 0.18000000D+03 0.14479759D-01 0.26658860D-03
+ 0.18000000D+03 0.18300000D+03 0.14417206D-01 0.29006962D-03
+ 0.18300000D+03 0.18600000D+03 0.13392867D-01 0.26424577D-03
+ 0.18600000D+03 0.18900000D+03 0.12464383D-01 0.20806448D-03
+ 0.18900000D+03 0.19200000D+03 0.11332081D-01 0.68994949D-03
+ 0.19200000D+03 0.19500000D+03 0.11598211D-01 0.74960763D-03
+ 0.19500000D+03 0.19800000D+03 0.11101297D-01 0.37630304D-03
+ 0.19800000D+03 0.20100000D+03 0.10657865D-01 0.23118438D-03
+ 0.20100000D+03 0.20400000D+03 0.94393473D-02 0.18505268D-03
+ 0.20400000D+03 0.20700000D+03 0.94819452D-02 0.34100083D-03
+ 0.20700000D+03 0.21000000D+03 0.80035850D-02 0.44207309D-03
+ 0.21000000D+03 0.21300000D+03 0.87861293D-02 0.33311206D-03
+ 0.21300000D+03 0.21600000D+03 0.79882988D-02 0.40737859D-03
+ 0.21600000D+03 0.21900000D+03 0.75650098D-02 0.39283876D-03
+ 0.21900000D+03 0.22200000D+03 0.73432333D-02 0.21489202D-03
+ 0.22200000D+03 0.22500000D+03 0.64903920D-02 0.21452301D-03
+ 0.22500000D+03 0.22800000D+03 0.62776058D-02 0.16100127D-03
+ 0.22800000D+03 0.23100000D+03 0.64220649D-02 0.15231722D-03
+ 0.23100000D+03 0.23400000D+03 0.60119640D-02 0.35081801D-03
+ 0.23400000D+03 0.23700000D+03 0.53782621D-02 0.38513311D-03
+ 0.23700000D+03 0.24000000D+03 0.54008726D-02 0.20829106D-03
+ 0.24000000D+03 0.24300000D+03 0.47446603D-02 0.18468091D-03
+ 0.24300000D+03 0.24600000D+03 0.49167085D-02 0.25006774D-03
+ 0.24600000D+03 0.24900000D+03 0.47621156D-02 0.20870012D-03
+ 0.24900000D+03 0.25200000D+03 0.41324468D-02 0.24611760D-03
+ 0.25200000D+03 0.25500000D+03 0.43545209D-02 0.28816157D-03
+ 0.25500000D+03 0.25800000D+03 0.37706957D-02 0.18387223D-03
+ 0.25800000D+03 0.26100000D+03 0.37524976D-02 0.24275595D-03
+ 0.26100000D+03 0.26400000D+03 0.32682149D-02 0.33515560D-03
+ 0.26400000D+03 0.26700000D+03 0.38003743D-02 0.26926058D-03
+ 0.26700000D+03 0.27000000D+03 0.30583548D-02 0.25499648D-03
+ 0.27000000D+03 0.27300000D+03 0.30166745D-02 0.26015294D-03
+ 0.27300000D+03 0.27600000D+03 0.30468525D-02 0.17500647D-03
+ 0.27600000D+03 0.27900000D+03 0.27588058D-02 0.13709666D-03
+ 0.27900000D+03 0.28200000D+03 0.25929581D-02 0.14062663D-03
+ 0.28200000D+03 0.28500000D+03 0.26524136D-02 0.13674886D-03
+ 0.28500000D+03 0.28800000D+03 0.22247221D-02 0.10977132D-03
+ 0.28800000D+03 0.29100000D+03 0.24970442D-02 0.11920900D-03
+ 0.29100000D+03 0.29400000D+03 0.20461782D-02 0.11381199D-03
+ 0.29400000D+03 0.29700000D+03 0.20554385D-02 0.10819293D-03
+ 0.29700000D+03 0.30000000D+03 0.20847232D-02 0.11006823D-03
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 0.33054084D-01 0.55995155D-02
+ 0.30000000D+01 0.60000000D+01 -.56770965D-01 0.30672444D-02
+ 0.60000000D+01 0.90000000D+01 0.16567436D+01 0.22851943D-02
+ 0.90000000D+01 0.12000000D+02 0.15492487D+01 0.20486155D-02
+ 0.12000000D+02 0.15000000D+02 0.13034255D+01 0.21194739D-02
+ 0.15000000D+02 0.18000000D+02 0.10841896D+01 0.19393717D-02
+ 0.18000000D+02 0.21000000D+02 0.90811201D+00 0.16267282D-02
+ 0.21000000D+02 0.24000000D+02 0.77249155D+00 0.16074562D-02
+ 0.24000000D+02 0.27000000D+02 0.65932621D+00 0.14211094D-02
+ 0.27000000D+02 0.30000000D+02 0.56758785D+00 0.16033721D-02
+ 0.30000000D+02 0.33000000D+02 0.49348674D+00 0.15997689D-02
+ 0.33000000D+02 0.36000000D+02 0.43177402D+00 0.11305322D-02
+ 0.36000000D+02 0.39000000D+02 0.37792674D+00 0.95772996D-03
+ 0.39000000D+02 0.42000000D+02 0.33504089D+00 0.10111922D-02
+ 0.42000000D+02 0.45000000D+02 0.29685917D+00 0.15963271D-02
+ 0.45000000D+02 0.48000000D+02 0.26255263D+00 0.15406255D-02
+ 0.48000000D+02 0.51000000D+02 0.23535582D+00 0.86713235D-03
+ 0.51000000D+02 0.54000000D+02 0.20859644D+00 0.79798012D-03
+ 0.54000000D+02 0.57000000D+02 0.18846157D+00 0.85974574D-03
+ 0.57000000D+02 0.60000000D+02 0.16901573D+00 0.86766736D-03
+ 0.60000000D+02 0.63000000D+02 0.15107214D+00 0.73100052D-03
+ 0.63000000D+02 0.66000000D+02 0.13649288D+00 0.73888350D-03
+ 0.66000000D+02 0.69000000D+02 0.12385376D+00 0.70400813D-03
+ 0.69000000D+02 0.72000000D+02 0.11047947D+00 0.57410989D-03
+ 0.72000000D+02 0.75000000D+02 0.10113535D+00 0.60795288D-03
+ 0.75000000D+02 0.78000000D+02 0.89744838D-01 0.65317580D-03
+ 0.78000000D+02 0.81000000D+02 0.83712032D-01 0.63463653D-03
+ 0.81000000D+02 0.84000000D+02 0.74617373D-01 0.54289143D-03
+ 0.84000000D+02 0.87000000D+02 0.67286385D-01 0.59771830D-03
+ 0.87000000D+02 0.90000000D+02 0.61968000D-01 0.75324237D-03
+ 0.90000000D+02 0.93000000D+02 0.55221653D-01 0.65278573D-03
+ 0.93000000D+02 0.96000000D+02 0.51957406D-01 0.51623499D-03
+ 0.96000000D+02 0.99000000D+02 0.45790718D-01 0.52447467D-03
+ 0.99000000D+02 0.10200000D+03 0.42677671D-01 0.39044671D-03
+ 0.10200000D+03 0.10500000D+03 0.38426477D-01 0.30642569D-03
+ 0.10500000D+03 0.10800000D+03 0.34888625D-01 0.27256378D-03
+ 0.10800000D+03 0.11100000D+03 0.32637546D-01 0.39270984D-03
+ 0.11100000D+03 0.11400000D+03 0.29281361D-01 0.41324729D-03
+ 0.11400000D+03 0.11700000D+03 0.26828708D-01 0.28295331D-03
+ 0.11700000D+03 0.12000000D+03 0.25112813D-01 0.23045067D-03
+ 0.12000000D+03 0.12300000D+03 0.22480396D-01 0.25051065D-03
+ 0.12300000D+03 0.12600000D+03 0.20046036D-01 0.52806242D-03
+ 0.12600000D+03 0.12900000D+03 0.19930832D-01 0.54064501D-03
+ 0.12900000D+03 0.13200000D+03 0.17517119D-01 0.26367921D-03
+ 0.13200000D+03 0.13500000D+03 0.15867060D-01 0.16901416D-03
+ 0.13500000D+03 0.13800000D+03 0.14776116D-01 0.17996773D-03
+ 0.13800000D+03 0.14100000D+03 0.13617467D-01 0.18586482D-03
+ 0.14100000D+03 0.14400000D+03 0.13131878D-01 0.20980196D-03
+ 0.14400000D+03 0.14700000D+03 0.11292559D-01 0.21651342D-03
+ 0.14700000D+03 0.15000000D+03 0.10343890D-01 0.19025906D-03
+ 0.15000000D+03 0.15300000D+03 0.10128932D-01 0.14879600D-03
+ 0.15300000D+03 0.15600000D+03 0.91070125D-02 0.11100602D-03
+ 0.15600000D+03 0.15900000D+03 0.85629280D-02 0.12335353D-03
+ 0.15900000D+03 0.16200000D+03 0.76050717D-02 0.21795331D-03
+ 0.16200000D+03 0.16500000D+03 0.72537093D-02 0.21155376D-03
+ 0.16500000D+03 0.16800000D+03 0.67863975D-02 0.14054541D-03
+ 0.16800000D+03 0.17100000D+03 0.60371626D-02 0.13873425D-03
+ 0.17100000D+03 0.17400000D+03 0.57716545D-02 0.96976868D-04
+ 0.17400000D+03 0.17700000D+03 0.52605393D-02 0.85238307D-04
+ 0.17700000D+03 0.18000000D+03 0.47647955D-02 0.87717884D-04
+ 0.18000000D+03 0.18300000D+03 0.46388332D-02 0.93164110D-04
+ 0.18300000D+03 0.18600000D+03 0.42127985D-02 0.83526123D-04
+ 0.18600000D+03 0.18900000D+03 0.38347890D-02 0.63983697D-04
+ 0.18900000D+03 0.19200000D+03 0.34129883D-02 0.20565106D-03
+ 0.19200000D+03 0.19500000D+03 0.34184201D-02 0.22210548D-03
+ 0.19500000D+03 0.19800000D+03 0.31995669D-02 0.10909109D-03
+ 0.19800000D+03 0.20100000D+03 0.30039858D-02 0.65260676D-04
+ 0.20100000D+03 0.20400000D+03 0.26035534D-02 0.51248406D-04
+ 0.20400000D+03 0.20700000D+03 0.25601926D-02 0.91325294D-04
+ 0.20700000D+03 0.21000000D+03 0.21171341D-02 0.11698403D-03
+ 0.21000000D+03 0.21300000D+03 0.22763218D-02 0.86807094D-04
+ 0.21300000D+03 0.21600000D+03 0.20255825D-02 0.10250304D-03
+ 0.21600000D+03 0.21900000D+03 0.18777559D-02 0.98310933D-04
+ 0.21900000D+03 0.22200000D+03 0.17852597D-02 0.51973647D-04
+ 0.22200000D+03 0.22500000D+03 0.15463073D-02 0.51410356D-04
+ 0.22500000D+03 0.22800000D+03 0.14669142D-02 0.37522059D-04
+ 0.22800000D+03 0.23100000D+03 0.14704466D-02 0.34975413D-04
+ 0.23100000D+03 0.23400000D+03 0.13487617D-02 0.78034770D-04
+ 0.23400000D+03 0.23700000D+03 0.11822727D-02 0.85092041D-04
+ 0.23700000D+03 0.24000000D+03 0.11640049D-02 0.45136851D-04
+ 0.24000000D+03 0.24300000D+03 0.10027600D-02 0.38858952D-04
+ 0.24300000D+03 0.24600000D+03 0.10195411D-02 0.51708896D-04
+ 0.24600000D+03 0.24900000D+03 0.96808145D-03 0.42717741D-04
+ 0.24900000D+03 0.25200000D+03 0.82399087D-03 0.48696383D-04
+ 0.25200000D+03 0.25500000D+03 0.85194065D-03 0.56545548D-04
+ 0.25500000D+03 0.25800000D+03 0.72341005D-03 0.35509396D-04
+ 0.25800000D+03 0.26100000D+03 0.70685166D-03 0.45380830D-04
+ 0.26100000D+03 0.26400000D+03 0.60494637D-03 0.61924339D-04
+ 0.26400000D+03 0.26700000D+03 0.68984978D-03 0.49125646D-04
+ 0.26700000D+03 0.27000000D+03 0.54476426D-03 0.45217650D-04
+ 0.27000000D+03 0.27300000D+03 0.52791818D-03 0.45702131D-04
+ 0.27300000D+03 0.27600000D+03 0.52357494D-03 0.30100002D-04
+ 0.27600000D+03 0.27900000D+03 0.46536461D-03 0.23194884D-04
+ 0.27900000D+03 0.28200000D+03 0.42973891D-03 0.23228945D-04
+ 0.28200000D+03 0.28500000D+03 0.43186266D-03 0.22344517D-04
+ 0.28500000D+03 0.28800000D+03 0.35576472D-03 0.17541887D-04
+ 0.28800000D+03 0.29100000D+03 0.39247389D-03 0.18723669D-04
+ 0.29100000D+03 0.29400000D+03 0.31599288D-03 0.17606524D-04
+ 0.29400000D+03 0.29700000D+03 0.31222778D-03 0.16409764D-04
+ 0.29700000D+03 0.30000000D+03 0.31118675D-03 0.16433889D-04
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.16802134D+02 0.53622740D-02
+ 0.30000000D+01 0.60000000D+01 0.15796329D+02 0.83804023D-03
+ 0.60000000D+01 0.90000000D+01 0.57626896D+01 0.35494171D-03
+ 0.90000000D+01 0.12000000D+02 0.29454393D+01 0.19779816D-03
+ 0.12000000D+02 0.15000000D+02 0.17640210D+01 0.12963564D-03
+ 0.15000000D+02 0.18000000D+02 0.11600559D+01 0.93277719D-04
+ 0.18000000D+02 0.21000000D+02 0.81193378D+00 0.67080544D-04
+ 0.21000000D+02 0.24000000D+02 0.59445749D+00 0.52984907D-04
+ 0.24000000D+02 0.27000000D+02 0.44993434D+00 0.41645317D-04
+ 0.27000000D+02 0.30000000D+02 0.34963938D+00 0.34356176D-04
+ 0.30000000D+02 0.33000000D+02 0.27759474D+00 0.29039448D-04
+ 0.33000000D+02 0.36000000D+02 0.22420257D+00 0.24560685D-04
+ 0.36000000D+02 0.39000000D+02 0.18374758D+00 0.21784699D-04
+ 0.39000000D+02 0.42000000D+02 0.15248105D+00 0.18264307D-04
+ 0.42000000D+02 0.45000000D+02 0.12787218D+00 0.15346090D-04
+ 0.45000000D+02 0.48000000D+02 0.10827229D+00 0.13677206D-04
+ 0.48000000D+02 0.51000000D+02 0.92457689D-01 0.12080701D-04
+ 0.51000000D+02 0.54000000D+02 0.79515664D-01 0.11108158D-04
+ 0.54000000D+02 0.57000000D+02 0.68822142D-01 0.99046061D-05
+ 0.57000000D+02 0.60000000D+02 0.59936896D-01 0.88061203D-05
+ 0.60000000D+02 0.63000000D+02 0.52477445D-01 0.77303762D-05
+ 0.63000000D+02 0.66000000D+02 0.46175342D-01 0.70645083D-05
+ 0.66000000D+02 0.69000000D+02 0.40816419D-01 0.64391606D-05
+ 0.69000000D+02 0.72000000D+02 0.36217398D-01 0.59720458D-05
+ 0.72000000D+02 0.75000000D+02 0.32279960D-01 0.53501169D-05
+ 0.75000000D+02 0.78000000D+02 0.28864954D-01 0.49465259D-05
+ 0.78000000D+02 0.81000000D+02 0.25893905D-01 0.46927367D-05
+ 0.81000000D+02 0.84000000D+02 0.23303494D-01 0.41715450D-05
+ 0.84000000D+02 0.87000000D+02 0.21036229D-01 0.38544300D-05
+ 0.87000000D+02 0.90000000D+02 0.19031620D-01 0.35366569D-05
+ 0.90000000D+02 0.93000000D+02 0.17271664D-01 0.33893753D-05
+ 0.93000000D+02 0.96000000D+02 0.15711507D-01 0.30310702D-05
+ 0.96000000D+02 0.99000000D+02 0.14316024D-01 0.28944963D-05
+ 0.99000000D+02 0.10200000D+03 0.13080066D-01 0.26960882D-05
+ 0.10200000D+03 0.10500000D+03 0.11972526D-01 0.24614641D-05
+ 0.10500000D+03 0.10800000D+03 0.10981045D-01 0.23884099D-05
+ 0.10800000D+03 0.11100000D+03 0.10092772D-01 0.22320771D-05
+ 0.11100000D+03 0.11400000D+03 0.92929524D-02 0.20546716D-05
+ 0.11400000D+03 0.11700000D+03 0.85639261D-02 0.19472028D-05
+ 0.11700000D+03 0.12000000D+03 0.79120989D-02 0.17826622D-05
+ 0.12000000D+03 0.12300000D+03 0.73159301D-02 0.17040937D-05
+ 0.12300000D+03 0.12600000D+03 0.67774841D-02 0.16021865D-05
+ 0.12600000D+03 0.12900000D+03 0.62866849D-02 0.15491659D-05
+ 0.12900000D+03 0.13200000D+03 0.58392001D-02 0.14124400D-05
+ 0.13200000D+03 0.13500000D+03 0.54308796D-02 0.13257765D-05
+ 0.13500000D+03 0.13800000D+03 0.50558019D-02 0.13308718D-05
+ 0.13800000D+03 0.14100000D+03 0.47131249D-02 0.12155866D-05
+ 0.14100000D+03 0.14400000D+03 0.44002206D-02 0.11737182D-05
+ 0.14400000D+03 0.14700000D+03 0.41142018D-02 0.10839048D-05
+ 0.14700000D+03 0.15000000D+03 0.38456343D-02 0.10360613D-05
+ 0.15000000D+03 0.15300000D+03 0.36011763D-02 0.10071509D-05
+ 0.15300000D+03 0.15600000D+03 0.33742838D-02 0.93217165D-06
+ 0.15600000D+03 0.15900000D+03 0.31675916D-02 0.91319026D-06
+ 0.15900000D+03 0.16200000D+03 0.29738141D-02 0.90365987D-06
+ 0.16200000D+03 0.16500000D+03 0.27928887D-02 0.81667337D-06
+ 0.16500000D+03 0.16800000D+03 0.26263738D-02 0.77874604D-06
+ 0.16800000D+03 0.17100000D+03 0.24731589D-02 0.72279255D-06
+ 0.17100000D+03 0.17400000D+03 0.23311423D-02 0.71102441D-06
+ 0.17400000D+03 0.17700000D+03 0.21967532D-02 0.67691301D-06
+ 0.17700000D+03 0.18000000D+03 0.20741538D-02 0.64469641D-06
+ 0.18000000D+03 0.18300000D+03 0.19572303D-02 0.60842201D-06
+ 0.18300000D+03 0.18600000D+03 0.18501772D-02 0.59609439D-06
+ 0.18600000D+03 0.18900000D+03 0.17494888D-02 0.56441099D-06
+ 0.18900000D+03 0.19200000D+03 0.16558239D-02 0.54983013D-06
+ 0.19200000D+03 0.19500000D+03 0.15685296D-02 0.52187990D-06
+ 0.19500000D+03 0.19800000D+03 0.14859543D-02 0.48687883D-06
+ 0.19800000D+03 0.20100000D+03 0.14083480D-02 0.48253300D-06
+ 0.20100000D+03 0.20400000D+03 0.13362999D-02 0.46221460D-06
+ 0.20400000D+03 0.20700000D+03 0.12682748D-02 0.44999064D-06
+ 0.20700000D+03 0.21000000D+03 0.12047975D-02 0.42494660D-06
+ 0.21000000D+03 0.21300000D+03 0.11447559D-02 0.41023650D-06
+ 0.21300000D+03 0.21600000D+03 0.10877935D-02 0.39099640D-06
+ 0.21600000D+03 0.21900000D+03 0.10353776D-02 0.37845123D-06
+ 0.21900000D+03 0.22200000D+03 0.98538831D-03 0.36694543D-06
+ 0.22200000D+03 0.22500000D+03 0.93878174D-03 0.36128252D-06
+ 0.22500000D+03 0.22800000D+03 0.89385054D-03 0.33861876D-06
+ 0.22800000D+03 0.23100000D+03 0.85180998D-03 0.32893970D-06
+ 0.23100000D+03 0.23400000D+03 0.81305023D-03 0.31809385D-06
+ 0.23400000D+03 0.23700000D+03 0.77595138D-03 0.30742492D-06
+ 0.23700000D+03 0.24000000D+03 0.74041471D-03 0.30736802D-06
+ 0.24000000D+03 0.24300000D+03 0.70670169D-03 0.28373288D-06
+ 0.24300000D+03 0.24600000D+03 0.67562141D-03 0.28139848D-06
+ 0.24600000D+03 0.24900000D+03 0.64526085D-03 0.26039622D-06
+ 0.24900000D+03 0.25200000D+03 0.61688139D-03 0.25769199D-06
+ 0.25200000D+03 0.25500000D+03 0.59004188D-03 0.24734218D-06
+ 0.25500000D+03 0.25800000D+03 0.56440197D-03 0.23552942D-06
+ 0.25800000D+03 0.26100000D+03 0.54047753D-03 0.22851854D-06
+ 0.26100000D+03 0.26400000D+03 0.51764998D-03 0.22473904D-06
+ 0.26400000D+03 0.26700000D+03 0.49597657D-03 0.21306028D-06
+ 0.26700000D+03 0.27000000D+03 0.47506269D-03 0.20390856D-06
+ 0.27000000D+03 0.27300000D+03 0.45563535D-03 0.20451805D-06
+ 0.27300000D+03 0.27600000D+03 0.43701356D-03 0.18911039D-06
+ 0.27600000D+03 0.27900000D+03 0.41915841D-03 0.18657154D-06
+ 0.27900000D+03 0.28200000D+03 0.40220863D-03 0.18110395D-06
+ 0.28200000D+03 0.28500000D+03 0.38645248D-03 0.17808511D-06
+ 0.28500000D+03 0.28800000D+03 0.37058531D-03 0.17127742D-06
+ 0.28800000D+03 0.29100000D+03 0.35624669D-03 0.16508623D-06
+ 0.29100000D+03 0.29400000D+03 0.34205842D-03 0.16729593D-06
+ 0.29400000D+03 0.29700000D+03 0.32891048D-03 0.15237817D-06
+ 0.29700000D+03 0.30000000D+03 0.31595751D-03 0.15653828D-06
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX2-QQ.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX2-QQ.top
new file mode 100644
index 0000000000000000000000000000000000000000..94b766972f670728c1bd9950b62986021b2c0021
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250-CM13-NNPDF3-APX2-QQ.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22976699D-05 0.97666268D-06
+ -.46000000D+01 -.45000000D+01 -.10367712D-03 0.51865666D-05
+ -.45000000D+01 -.44000000D+01 -.17839304D-03 0.11271933D-04
+ -.44000000D+01 -.43000000D+01 0.14463601D-02 0.39105235D-04
+ -.43000000D+01 -.42000000D+01 0.81833556D-02 0.13527064D-03
+ -.42000000D+01 -.41000000D+01 0.24098982D-01 0.42115292D-03
+ -.41000000D+01 -.40000000D+01 0.55824262D-01 0.82332814D-03
+ -.40000000D+01 -.39000000D+01 0.10684000D+00 0.16117780D-02
+ -.39000000D+01 -.38000000D+01 0.18073879D+00 0.24989850D-02
+ -.38000000D+01 -.37000000D+01 0.26781139D+00 0.32847853D-02
+ -.37000000D+01 -.36000000D+01 0.39180639D+00 0.45800395D-02
+ -.36000000D+01 -.35000000D+01 0.52859395D+00 0.58487393D-02
+ -.35000000D+01 -.34000000D+01 0.69784786D+00 0.83313534D-02
+ -.34000000D+01 -.33000000D+01 0.86744298D+00 0.34636013D-01
+ -.33000000D+01 -.32000000D+01 0.12133270D+01 0.46759517D-01
+ -.32000000D+01 -.31000000D+01 0.13950734D+01 0.11973850D-01
+ -.31000000D+01 -.30000000D+01 0.16904753D+01 0.13045731D-01
+ -.30000000D+01 -.29000000D+01 0.20258503D+01 0.13670425D-01
+ -.29000000D+01 -.28000000D+01 0.23776049D+01 0.15205341D-01
+ -.28000000D+01 -.27000000D+01 0.27576696D+01 0.15616267D-01
+ -.27000000D+01 -.26000000D+01 0.31538332D+01 0.18822533D-01
+ -.26000000D+01 -.25000000D+01 0.35297015D+01 0.30020315D-01
+ -.25000000D+01 -.24000000D+01 0.40269015D+01 0.20085983D-01
+ -.24000000D+01 -.23000000D+01 0.44680473D+01 0.24386890D-01
+ -.23000000D+01 -.22000000D+01 0.49152513D+01 0.24557041D-01
+ -.22000000D+01 -.21000000D+01 0.54322485D+01 0.26056373D-01
+ -.21000000D+01 -.20000000D+01 0.59398207D+01 0.26612712D-01
+ -.20000000D+01 -.19000000D+01 0.63959997D+01 0.28473900D-01
+ -.19000000D+01 -.18000000D+01 0.68983571D+01 0.39539137D-01
+ -.18000000D+01 -.17000000D+01 0.73678701D+01 0.28957386D-01
+ -.17000000D+01 -.16000000D+01 0.77700656D+01 0.28651039D-01
+ -.16000000D+01 -.15000000D+01 0.82671678D+01 0.46824306D-01
+ -.15000000D+01 -.14000000D+01 0.86132880D+01 0.39266669D-01
+ -.14000000D+01 -.13000000D+01 0.90200612D+01 0.31920630D-01
+ -.13000000D+01 -.12000000D+01 0.93717437D+01 0.31889601D-01
+ -.12000000D+01 -.11000000D+01 0.97623325D+01 0.33290226D-01
+ -.11000000D+01 -.10000000D+01 0.10139573D+02 0.33372521D-01
+ -.10000000D+01 -.90000000D+00 0.10298181D+02 0.37026766D-01
+ -.90000000D+00 -.80000000D+00 0.10628074D+02 0.32834591D-01
+ -.80000000D+00 -.70000000D+00 0.10895444D+02 0.32984198D-01
+ -.70000000D+00 -.60000000D+00 0.11105437D+02 0.44022881D-01
+ -.60000000D+00 -.50000000D+00 0.11232769D+02 0.43854824D-01
+ -.50000000D+00 -.40000000D+00 0.11402895D+02 0.39631393D-01
+ -.40000000D+00 -.30000000D+00 0.11564841D+02 0.38189802D-01
+ -.30000000D+00 -.20000000D+00 0.11676451D+02 0.39580126D-01
+ -.20000000D+00 -.10000000D+00 0.11717091D+02 0.37122362D-01
+ -.10000000D+00 0.18041124D-15 0.11642605D+02 0.50746346D-01
+ 0.70776718D-15 0.10000000D+00 0.11737166D+02 0.49306199D-01
+ 0.10000000D+00 0.20000000D+00 0.11707503D+02 0.35412853D-01
+ 0.20000000D+00 0.30000000D+00 0.11610949D+02 0.36524771D-01
+ 0.30000000D+00 0.40000000D+00 0.11529959D+02 0.37170189D-01
+ 0.40000000D+00 0.50000000D+00 0.11403878D+02 0.35787656D-01
+ 0.50000000D+00 0.60000000D+00 0.11262005D+02 0.37131223D-01
+ 0.60000000D+00 0.70000000D+00 0.11060195D+02 0.33504326D-01
+ 0.70000000D+00 0.80000000D+00 0.10863523D+02 0.34048707D-01
+ 0.80000000D+00 0.90000000D+00 0.10614569D+02 0.35781215D-01
+ 0.90000000D+00 0.10000000D+01 0.10354888D+02 0.38925878D-01
+ 0.10000000D+01 0.11000000D+01 0.10102377D+02 0.34021260D-01
+ 0.11000000D+01 0.12000000D+01 0.97067194D+01 0.32670264D-01
+ 0.12000000D+01 0.13000000D+01 0.94165947D+01 0.32832722D-01
+ 0.13000000D+01 0.14000000D+01 0.90509013D+01 0.30895129D-01
+ 0.14000000D+01 0.15000000D+01 0.86233018D+01 0.32623263D-01
+ 0.15000000D+01 0.16000000D+01 0.82068418D+01 0.29190650D-01
+ 0.16000000D+01 0.17000000D+01 0.77456430D+01 0.32463803D-01
+ 0.17000000D+01 0.18000000D+01 0.73393983D+01 0.27860119D-01
+ 0.18000000D+01 0.19000000D+01 0.68569109D+01 0.29906562D-01
+ 0.19000000D+01 0.20000000D+01 0.64132638D+01 0.30654485D-01
+ 0.20000000D+01 0.21000000D+01 0.59405351D+01 0.33957173D-01
+ 0.21000000D+01 0.22000000D+01 0.54171090D+01 0.24818759D-01
+ 0.22000000D+01 0.23000000D+01 0.49782580D+01 0.22994546D-01
+ 0.23000000D+01 0.24000000D+01 0.44862443D+01 0.23236856D-01
+ 0.24000000D+01 0.25000000D+01 0.40136397D+01 0.20536578D-01
+ 0.25000000D+01 0.26000000D+01 0.36077721D+01 0.19495636D-01
+ 0.26000000D+01 0.27000000D+01 0.31729836D+01 0.17515814D-01
+ 0.27000000D+01 0.28000000D+01 0.27209673D+01 0.18969099D-01
+ 0.28000000D+01 0.29000000D+01 0.23598485D+01 0.16824510D-01
+ 0.29000000D+01 0.30000000D+01 0.20152220D+01 0.14879459D-01
+ 0.30000000D+01 0.31000000D+01 0.17006776D+01 0.13519191D-01
+ 0.31000000D+01 0.32000000D+01 0.14069829D+01 0.11179880D-01
+ 0.32000000D+01 0.33000000D+01 0.11389272D+01 0.10335349D-01
+ 0.33000000D+01 0.34000000D+01 0.91202195D+00 0.88717060D-02
+ 0.34000000D+01 0.35000000D+01 0.69521032D+00 0.89912508D-02
+ 0.35000000D+01 0.36000000D+01 0.53115595D+00 0.60435078D-02
+ 0.36000000D+01 0.37000000D+01 0.37928992D+00 0.49577890D-02
+ 0.37000000D+01 0.38000000D+01 0.26997791D+00 0.33088292D-02
+ 0.38000000D+01 0.39000000D+01 0.17376435D+00 0.24762957D-02
+ 0.39000000D+01 0.40000000D+01 0.10940397D+00 0.31223883D-02
+ 0.40000000D+01 0.41000000D+01 0.54867504D-01 0.90500716D-03
+ 0.41000000D+01 0.42000000D+01 0.24589936D-01 0.42766452D-03
+ 0.42000000D+01 0.43000000D+01 0.79549392D-02 0.16705890D-03
+ 0.43000000D+01 0.44000000D+01 0.14409734D-02 0.39972071D-04
+ 0.44000000D+01 0.45000000D+01 -.15993823D-03 0.11248070D-04
+ 0.45000000D+01 0.46000000D+01 -.10915408D-03 0.51709877D-05
+ 0.46000000D+01 0.47000000D+01 -.23872038D-05 0.97528785D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22592440D-05 0.97665596D-06
+ -.46000000D+01 -.45000000D+01 -.98240587D-04 0.51849885D-05
+ -.45000000D+01 -.44000000D+01 -.16066466D-03 0.11264325D-04
+ -.44000000D+01 -.43000000D+01 0.13506949D-02 0.39074435D-04
+ -.43000000D+01 -.42000000D+01 0.74311296D-02 0.13501426D-03
+ -.42000000D+01 -.41000000D+01 0.21365441D-01 0.42038373D-03
+ -.41000000D+01 -.40000000D+01 0.48717835D-01 0.82060882D-03
+ -.40000000D+01 -.39000000D+01 0.91664961D-01 0.16074542D-02
+ -.39000000D+01 -.38000000D+01 0.15285485D+00 0.24939319D-02
+ -.38000000D+01 -.37000000D+01 0.22160032D+00 0.32762315D-02
+ -.37000000D+01 -.36000000D+01 0.32081872D+00 0.45651474D-02
+ -.36000000D+01 -.35000000D+01 0.42556671D+00 0.58312010D-02
+ -.35000000D+01 -.34000000D+01 0.55499857D+00 0.83088136D-02
+ -.34000000D+01 -.33000000D+01 0.68284294D+00 0.28557214D-01
+ -.33000000D+01 -.32000000D+01 0.95881891D+00 0.42453858D-01
+ -.32000000D+01 -.31000000D+01 0.10822188D+01 0.11610137D-01
+ -.31000000D+01 -.30000000D+01 0.12978962D+01 0.12712403D-01
+ -.30000000D+01 -.29000000D+01 0.15490444D+01 0.13563541D-01
+ -.29000000D+01 -.28000000D+01 0.18069753D+01 0.15082011D-01
+ -.28000000D+01 -.27000000D+01 0.20828324D+01 0.15515700D-01
+ -.27000000D+01 -.26000000D+01 0.23659906D+01 0.18749925D-01
+ -.26000000D+01 -.25000000D+01 0.26242131D+01 0.29960915D-01
+ -.25000000D+01 -.24000000D+01 0.29907392D+01 0.19831645D-01
+ -.24000000D+01 -.23000000D+01 0.33003315D+01 0.24101941D-01
+ -.23000000D+01 -.22000000D+01 0.36121434D+01 0.24446051D-01
+ -.22000000D+01 -.21000000D+01 0.39874863D+01 0.25951249D-01
+ -.21000000D+01 -.20000000D+01 0.43441641D+01 0.26490272D-01
+ -.20000000D+01 -.19000000D+01 0.46539144D+01 0.28330200D-01
+ -.19000000D+01 -.18000000D+01 0.50140756D+01 0.39436764D-01
+ -.18000000D+01 -.17000000D+01 0.53321818D+01 0.28758717D-01
+ -.17000000D+01 -.16000000D+01 0.55958562D+01 0.28324117D-01
+ -.16000000D+01 -.15000000D+01 0.59439709D+01 0.45813944D-01
+ -.15000000D+01 -.14000000D+01 0.61722900D+01 0.38086787D-01
+ -.14000000D+01 -.13000000D+01 0.64342265D+01 0.31492816D-01
+ -.13000000D+01 -.12000000D+01 0.66709555D+01 0.31502896D-01
+ -.12000000D+01 -.11000000D+01 0.69416706D+01 0.33055457D-01
+ -.11000000D+01 -.10000000D+01 0.72054440D+01 0.33197404D-01
+ -.10000000D+01 -.90000000D+00 0.72661578D+01 0.36704978D-01
+ -.90000000D+00 -.80000000D+00 0.75035339D+01 0.32477320D-01
+ -.80000000D+00 -.70000000D+00 0.76890211D+01 0.32712163D-01
+ -.70000000D+00 -.60000000D+00 0.78262691D+01 0.43450199D-01
+ -.60000000D+00 -.50000000D+00 0.78849679D+01 0.43256363D-01
+ -.50000000D+00 -.40000000D+00 0.80025103D+01 0.39542281D-01
+ -.40000000D+00 -.30000000D+00 0.81217050D+01 0.37963037D-01
+ -.30000000D+00 -.20000000D+00 0.81956961D+01 0.37264827D-01
+ -.20000000D+00 -.10000000D+00 0.82250466D+01 0.34153321D-01
+ -.10000000D+00 0.18041124D-15 0.81754171D+01 0.38568766D-01
+ 0.70776718D-15 0.10000000D+00 0.81985597D+01 0.37417426D-01
+ 0.10000000D+00 0.20000000D+00 0.82100309D+01 0.35178581D-01
+ 0.20000000D+00 0.30000000D+00 0.81297364D+01 0.33473319D-01
+ 0.30000000D+00 0.40000000D+00 0.81007113D+01 0.34302803D-01
+ 0.40000000D+00 0.50000000D+00 0.80095702D+01 0.35580494D-01
+ 0.50000000D+00 0.60000000D+00 0.79153670D+01 0.36902855D-01
+ 0.60000000D+00 0.70000000D+00 0.77787683D+01 0.33257933D-01
+ 0.70000000D+00 0.80000000D+00 0.76587569D+01 0.33403093D-01
+ 0.80000000D+00 0.90000000D+00 0.74882160D+01 0.34984033D-01
+ 0.90000000D+00 0.10000000D+01 0.73190142D+01 0.38548618D-01
+ 0.10000000D+01 0.11000000D+01 0.71699114D+01 0.33823431D-01
+ 0.11000000D+01 0.12000000D+01 0.68866398D+01 0.32394550D-01
+ 0.12000000D+01 0.13000000D+01 0.67109552D+01 0.32539402D-01
+ 0.13000000D+01 0.14000000D+01 0.64675347D+01 0.30439868D-01
+ 0.14000000D+01 0.15000000D+01 0.61684249D+01 0.32251469D-01
+ 0.15000000D+01 0.16000000D+01 0.58939623D+01 0.28964342D-01
+ 0.16000000D+01 0.17000000D+01 0.55674069D+01 0.32348103D-01
+ 0.17000000D+01 0.18000000D+01 0.53107113D+01 0.27546065D-01
+ 0.18000000D+01 0.19000000D+01 0.49702869D+01 0.29656835D-01
+ 0.19000000D+01 0.20000000D+01 0.46686635D+01 0.30326980D-01
+ 0.20000000D+01 0.21000000D+01 0.43520069D+01 0.33653517D-01
+ 0.21000000D+01 0.22000000D+01 0.39678966D+01 0.24612235D-01
+ 0.22000000D+01 0.23000000D+01 0.36718357D+01 0.22869776D-01
+ 0.23000000D+01 0.24000000D+01 0.33188541D+01 0.23095431D-01
+ 0.24000000D+01 0.25000000D+01 0.29796449D+01 0.20374607D-01
+ 0.25000000D+01 0.26000000D+01 0.27007939D+01 0.19381000D-01
+ 0.26000000D+01 0.27000000D+01 0.23864270D+01 0.17444395D-01
+ 0.27000000D+01 0.28000000D+01 0.20462912D+01 0.18908524D-01
+ 0.28000000D+01 0.29000000D+01 0.17886091D+01 0.16758848D-01
+ 0.29000000D+01 0.30000000D+01 0.15364882D+01 0.14643946D-01
+ 0.30000000D+01 0.31000000D+01 0.13122314D+01 0.13290004D-01
+ 0.31000000D+01 0.32000000D+01 0.10918602D+01 0.11141058D-01
+ 0.32000000D+01 0.33000000D+01 0.89045711D+00 0.10301670D-01
+ 0.33000000D+01 0.34000000D+01 0.72223236D+00 0.85328766D-02
+ 0.34000000D+01 0.35000000D+01 0.55194504D+00 0.85686970D-02
+ 0.35000000D+01 0.36000000D+01 0.42744443D+00 0.58712764D-02
+ 0.36000000D+01 0.37000000D+01 0.30839062D+00 0.49445038D-02
+ 0.37000000D+01 0.38000000D+01 0.22376723D+00 0.32971178D-02
+ 0.38000000D+01 0.39000000D+01 0.14587969D+00 0.24657998D-02
+ 0.39000000D+01 0.40000000D+01 0.94212635D-01 0.31191104D-02
+ 0.40000000D+01 0.41000000D+01 0.47710271D-01 0.90294224D-03
+ 0.41000000D+01 0.42000000D+01 0.21852237D-01 0.42701097D-03
+ 0.42000000D+01 0.43000000D+01 0.72055588D-02 0.16686413D-03
+ 0.43000000D+01 0.44000000D+01 0.13443533D-02 0.39924887D-04
+ 0.44000000D+01 0.45000000D+01 -.14209604D-03 0.11244535D-04
+ 0.45000000D+01 0.46000000D+01 -.10371237D-03 0.51691082D-05
+ 0.46000000D+01 0.47000000D+01 -.23484919D-05 0.97528148D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22776559D-05 0.97665921D-06
+ -.46000000D+01 -.45000000D+01 -.10072779D-03 0.51857222D-05
+ -.45000000D+01 -.44000000D+01 -.16817224D-03 0.11267811D-04
+ -.44000000D+01 -.43000000D+01 0.13944635D-02 0.39088717D-04
+ -.43000000D+01 -.42000000D+01 0.77558176D-02 0.13512929D-03
+ -.42000000D+01 -.41000000D+01 0.22507794D-01 0.42072434D-03
+ -.41000000D+01 -.40000000D+01 0.51608693D-01 0.82173754D-03
+ -.40000000D+01 -.39000000D+01 0.97678454D-01 0.16092688D-02
+ -.39000000D+01 -.38000000D+01 0.16362752D+00 0.24960636D-02
+ -.38000000D+01 -.37000000D+01 0.23902862D+00 0.32797385D-02
+ -.37000000D+01 -.36000000D+01 0.34702915D+00 0.45709983D-02
+ -.36000000D+01 -.35000000D+01 0.46276927D+00 0.58380757D-02
+ -.35000000D+01 -.34000000D+01 0.60573041D+00 0.83160629D-02
+ -.34000000D+01 -.33000000D+01 0.74667333D+00 0.31206503D-01
+ -.33000000D+01 -.32000000D+01 0.10468674D+01 0.44278209D-01
+ -.32000000D+01 -.31000000D+01 0.11882988D+01 0.11677427D-01
+ -.31000000D+01 -.30000000D+01 0.14290302D+01 0.12774804D-01
+ -.30000000D+01 -.29000000D+01 0.17065395D+01 0.13603248D-01
+ -.29000000D+01 -.28000000D+01 0.19932000D+01 0.15122407D-01
+ -.28000000D+01 -.27000000D+01 0.23009011D+01 0.15547261D-01
+ -.27000000D+01 -.26000000D+01 0.26181504D+01 0.18772868D-01
+ -.26000000D+01 -.25000000D+01 0.29114874D+01 0.29978852D-01
+ -.25000000D+01 -.24000000D+01 0.33167197D+01 0.19897663D-01
+ -.24000000D+01 -.23000000D+01 0.36643513D+01 0.24175760D-01
+ -.23000000D+01 -.22000000D+01 0.40159468D+01 0.24475280D-01
+ -.22000000D+01 -.21000000D+01 0.44321061D+01 0.25981770D-01
+ -.21000000D+01 -.20000000D+01 0.48317290D+01 0.26525204D-01
+ -.20000000D+01 -.19000000D+01 0.51832279D+01 0.28371184D-01
+ -.19000000D+01 -.18000000D+01 0.55833171D+01 0.39474406D-01
+ -.18000000D+01 -.17000000D+01 0.59436537D+01 0.28808377D-01
+ -.17000000D+01 -.16000000D+01 0.62463337D+01 0.28404373D-01
+ -.16000000D+01 -.15000000D+01 0.66351178D+01 0.46130421D-01
+ -.15000000D+01 -.14000000D+01 0.68953269D+01 0.38474399D-01
+ -.14000000D+01 -.13000000D+01 0.71970326D+01 0.31588667D-01
+ -.13000000D+01 -.12000000D+01 0.74649057D+01 0.31590593D-01
+ -.12000000D+01 -.11000000D+01 0.77676813D+01 0.33110690D-01
+ -.11000000D+01 -.10000000D+01 0.80621949D+01 0.33240714D-01
+ -.10000000D+01 -.90000000D+00 0.81492951D+01 0.36779867D-01
+ -.90000000D+00 -.80000000D+00 0.84106052D+01 0.32563689D-01
+ -.80000000D+00 -.70000000D+00 0.86183183D+01 0.32775867D-01
+ -.70000000D+00 -.60000000D+00 0.87749049D+01 0.43540110D-01
+ -.60000000D+00 -.50000000D+00 0.88507652D+01 0.43354660D-01
+ -.50000000D+00 -.40000000D+00 0.89827075D+01 0.39577384D-01
+ -.40000000D+00 -.30000000D+00 0.91133609D+01 0.38020360D-01
+ -.30000000D+00 -.20000000D+00 0.91943077D+01 0.37318046D-01
+ -.20000000D+00 -.10000000D+00 0.92313194D+01 0.34263230D-01
+ -.10000000D+00 0.18041124D-15 0.91798674D+01 0.38834409D-01
+ 0.70776718D-15 0.10000000D+00 0.92086355D+01 0.37658692D-01
+ 0.10000000D+00 0.20000000D+00 0.92158197D+01 0.35240303D-01
+ 0.20000000D+00 0.30000000D+00 0.91300669D+01 0.33708505D-01
+ 0.30000000D+00 0.40000000D+00 0.90895878D+01 0.34521642D-01
+ 0.40000000D+00 0.50000000D+00 0.89887078D+01 0.35643259D-01
+ 0.50000000D+00 0.60000000D+00 0.88806151D+01 0.36971014D-01
+ 0.60000000D+00 0.70000000D+00 0.87278049D+01 0.33331235D-01
+ 0.70000000D+00 0.80000000D+00 0.85884300D+01 0.33457338D-01
+ 0.80000000D+00 0.90000000D+00 0.83950981D+01 0.35077875D-01
+ 0.90000000D+00 0.10000000D+01 0.82025351D+01 0.38636375D-01
+ 0.10000000D+01 0.11000000D+01 0.80261600D+01 0.33880364D-01
+ 0.11000000D+01 0.12000000D+01 0.77129974D+01 0.32461884D-01
+ 0.12000000D+01 0.13000000D+01 0.75064792D+01 0.32594832D-01
+ 0.13000000D+01 0.14000000D+01 0.72289366D+01 0.30558584D-01
+ 0.14000000D+01 0.15000000D+01 0.68954753D+01 0.32363903D-01
+ 0.15000000D+01 0.16000000D+01 0.65823738D+01 0.29027488D-01
+ 0.16000000D+01 0.17000000D+01 0.62181597D+01 0.32390337D-01
+ 0.17000000D+01 0.18000000D+01 0.59206464D+01 0.27642178D-01
+ 0.18000000D+01 0.19000000D+01 0.55403715D+01 0.29726687D-01
+ 0.19000000D+01 0.20000000D+01 0.51984932D+01 0.30430274D-01
+ 0.20000000D+01 0.21000000D+01 0.48382305D+01 0.33738574D-01
+ 0.21000000D+01 0.22000000D+01 0.44133719D+01 0.24655051D-01
+ 0.22000000D+01 0.23000000D+01 0.40763101D+01 0.22907141D-01
+ 0.23000000D+01 0.24000000D+01 0.36831628D+01 0.23131285D-01
+ 0.24000000D+01 0.25000000D+01 0.33049780D+01 0.20413974D-01
+ 0.25000000D+01 0.26000000D+01 0.29886183D+01 0.19415191D-01
+ 0.26000000D+01 0.27000000D+01 0.26379907D+01 0.17469862D-01
+ 0.27000000D+01 0.28000000D+01 0.22643829D+01 0.18929274D-01
+ 0.28000000D+01 0.29000000D+01 0.19750688D+01 0.16781501D-01
+ 0.29000000D+01 0.30000000D+01 0.16943631D+01 0.14691095D-01
+ 0.30000000D+01 0.31000000D+01 0.14421690D+01 0.13332502D-01
+ 0.31000000D+01 0.32000000D+01 0.11985768D+01 0.11155419D-01
+ 0.32000000D+01 0.33000000D+01 0.97583877D+00 0.10314536D-01
+ 0.33000000D+01 0.34000000D+01 0.78857760D+00 0.86025911D-02
+ 0.34000000D+01 0.35000000D+01 0.60273763D+00 0.86563676D-02
+ 0.35000000D+01 0.36000000D+01 0.46488187D+00 0.59117870D-02
+ 0.36000000D+01 0.37000000D+01 0.33453133D+00 0.49497701D-02
+ 0.37000000D+01 0.38000000D+01 0.24120693D+00 0.33019408D-02
+ 0.38000000D+01 0.39000000D+01 0.15665397D+00 0.24702103D-02
+ 0.39000000D+01 0.40000000D+01 0.10023140D+00 0.31204202D-02
+ 0.40000000D+01 0.41000000D+01 0.50620779D-01 0.90386792D-03
+ 0.41000000D+01 0.42000000D+01 0.22995883D-01 0.42730674D-03
+ 0.42000000D+01 0.43000000D+01 0.75291102D-02 0.16695200D-03
+ 0.43000000D+01 0.44000000D+01 0.13885038D-02 0.39945633D-04
+ 0.44000000D+01 0.45000000D+01 -.14965998D-03 0.11246155D-04
+ 0.45000000D+01 0.46000000D+01 -.10620284D-03 0.51699900D-05
+ 0.46000000D+01 0.47000000D+01 -.23670365D-05 0.97528457D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22877501D-05 0.97666097D-06
+ -.46000000D+01 -.45000000D+01 -.10217776D-03 0.51861402D-05
+ -.45000000D+01 -.44000000D+01 -.17297102D-03 0.11269834D-04
+ -.44000000D+01 -.43000000D+01 0.14201009D-02 0.39096844D-04
+ -.43000000D+01 -.42000000D+01 0.79588599D-02 0.13519775D-03
+ -.42000000D+01 -.41000000D+01 0.23247014D-01 0.42092797D-03
+ -.41000000D+01 -.40000000D+01 0.53530620D-01 0.82247315D-03
+ -.40000000D+01 -.39000000D+01 0.10177812D+00 0.16104286D-02
+ -.39000000D+01 -.38000000D+01 0.17114329D+00 0.24973975D-02
+ -.38000000D+01 -.37000000D+01 0.25144470D+00 0.32820044D-02
+ -.37000000D+01 -.36000000D+01 0.36603101D+00 0.45749229D-02
+ -.36000000D+01 -.35000000D+01 0.49021220D+00 0.58427204D-02
+ -.35000000D+01 -.34000000D+01 0.64363173D+00 0.83216956D-02
+ -.34000000D+01 -.33000000D+01 0.79535141D+00 0.32855618D-01
+ -.33000000D+01 -.32000000D+01 0.11137685D+01 0.45455599D-01
+ -.32000000D+01 -.31000000D+01 0.12700716D+01 0.11762631D-01
+ -.31000000D+01 -.30000000D+01 0.15312043D+01 0.12852579D-01
+ -.30000000D+01 -.29000000D+01 0.18300664D+01 0.13631492D-01
+ -.29000000D+01 -.28000000D+01 0.21403253D+01 0.15154387D-01
+ -.28000000D+01 -.27000000D+01 0.24741892D+01 0.15572390D-01
+ -.27000000D+01 -.26000000D+01 0.28196849D+01 0.18790474D-01
+ -.26000000D+01 -.25000000D+01 0.31421996D+01 0.29992960D-01
+ -.25000000D+01 -.24000000D+01 0.35798315D+01 0.19962931D-01
+ -.24000000D+01 -.23000000D+01 0.39595391D+01 0.24244760D-01
+ -.23000000D+01 -.22000000D+01 0.43446104D+01 0.24498401D-01
+ -.22000000D+01 -.21000000D+01 0.47953004D+01 0.26004938D-01
+ -.21000000D+01 -.20000000D+01 0.52315660D+01 0.26551975D-01
+ -.20000000D+01 -.19000000D+01 0.56187041D+01 0.28403344D-01
+ -.19000000D+01 -.18000000D+01 0.60529661D+01 0.39502096D-01
+ -.18000000D+01 -.17000000D+01 0.64500125D+01 0.28852674D-01
+ -.17000000D+01 -.16000000D+01 0.67858725D+01 0.28473933D-01
+ -.16000000D+01 -.15000000D+01 0.72103447D+01 0.46400003D-01
+ -.15000000D+01 -.14000000D+01 0.74983863D+01 0.38796759D-01
+ -.14000000D+01 -.13000000D+01 0.78349123D+01 0.31686384D-01
+ -.13000000D+01 -.12000000D+01 0.81298097D+01 0.31678354D-01
+ -.12000000D+01 -.11000000D+01 0.84609980D+01 0.33156772D-01
+ -.11000000D+01 -.10000000D+01 0.87825258D+01 0.33275776D-01
+ -.10000000D+01 -.90000000D+00 0.88928740D+01 0.36847449D-01
+ -.90000000D+00 -.80000000D+00 0.91755298D+01 0.32639573D-01
+ -.80000000D+00 -.70000000D+00 0.94028242D+01 0.32831616D-01
+ -.70000000D+00 -.60000000D+00 0.95763011D+01 0.43652590D-01
+ -.60000000D+00 -.50000000D+00 0.96683082D+01 0.43477207D-01
+ -.50000000D+00 -.40000000D+00 0.98126631D+01 0.39598877D-01
+ -.40000000D+00 -.30000000D+00 0.99533140D+01 0.38070272D-01
+ -.30000000D+00 -.20000000D+00 0.10041004D+02 0.37374223D-01
+ -.20000000D+00 -.10000000D+00 0.10084686D+02 0.34402086D-01
+ -.10000000D+00 0.18041124D-15 0.10029492D+02 0.39434360D-01
+ 0.70776718D-15 0.10000000D+00 0.10066749D+02 0.38189874D-01
+ 0.10000000D+00 0.20000000D+00 0.10068700D+02 0.35291029D-01
+ 0.20000000D+00 0.30000000D+00 0.99786197D+01 0.34138847D-01
+ 0.30000000D+00 0.40000000D+00 0.99265632D+01 0.34918579D-01
+ 0.40000000D+00 0.50000000D+00 0.98175291D+01 0.35690034D-01
+ 0.50000000D+00 0.60000000D+00 0.96973530D+01 0.37021974D-01
+ 0.60000000D+00 0.70000000D+00 0.95300134D+01 0.33387079D-01
+ 0.70000000D+00 0.80000000D+00 0.93730198D+01 0.33516599D-01
+ 0.80000000D+00 0.90000000D+00 0.91599495D+01 0.35171029D-01
+ 0.90000000D+00 0.10000000D+01 0.89467702D+01 0.38713588D-01
+ 0.10000000D+01 0.11000000D+01 0.87459275D+01 0.33928555D-01
+ 0.11000000D+01 0.12000000D+01 0.84063916D+01 0.32520614D-01
+ 0.12000000D+01 0.13000000D+01 0.81727534D+01 0.32647667D-01
+ 0.13000000D+01 0.14000000D+01 0.78657456D+01 0.30664112D-01
+ 0.14000000D+01 0.15000000D+01 0.75020451D+01 0.32459050D-01
+ 0.15000000D+01 0.16000000D+01 0.71551210D+01 0.29078989D-01
+ 0.16000000D+01 0.17000000D+01 0.67584699D+01 0.32421801D-01
+ 0.17000000D+01 0.18000000D+01 0.64252810D+01 0.27721476D-01
+ 0.18000000D+01 0.19000000D+01 0.60108676D+01 0.29784805D-01
+ 0.19000000D+01 0.20000000D+01 0.56344066D+01 0.30510494D-01
+ 0.20000000D+01 0.21000000D+01 0.52366003D+01 0.33809509D-01
+ 0.21000000D+01 0.22000000D+01 0.47775181D+01 0.24696336D-01
+ 0.22000000D+01 0.23000000D+01 0.44056049D+01 0.22937448D-01
+ 0.23000000D+01 0.24000000D+01 0.39784809D+01 0.23161996D-01
+ 0.24000000D+01 0.25000000D+01 0.35674696D+01 0.20449193D-01
+ 0.25000000D+01 0.26000000D+01 0.32198141D+01 0.19443112D-01
+ 0.26000000D+01 0.27000000D+01 0.28390645D+01 0.17488120D-01
+ 0.27000000D+01 0.28000000D+01 0.24376813D+01 0.18944912D-01
+ 0.28000000D+01 0.29000000D+01 0.21223607D+01 0.16797935D-01
+ 0.29000000D+01 0.30000000D+01 0.18183707D+01 0.14745456D-01
+ 0.30000000D+01 0.31000000D+01 0.15432141D+01 0.13384686D-01
+ 0.31000000D+01 0.32000000D+01 0.12809650D+01 0.11165543D-01
+ 0.32000000D+01 0.33000000D+01 0.10411073D+01 0.10323336D-01
+ 0.33000000D+01 0.34000000D+01 0.83866607D+00 0.86869767D-02
+ 0.34000000D+01 0.35000000D+01 0.64073595D+00 0.87626101D-02
+ 0.35000000D+01 0.36000000D+01 0.49251855D+00 0.59561017D-02
+ 0.36000000D+01 0.37000000D+01 0.35350549D+00 0.49532647D-02
+ 0.37000000D+01 0.38000000D+01 0.25362386D+00 0.33050594D-02
+ 0.38000000D+01 0.39000000D+01 0.16416920D+00 0.24730380D-02
+ 0.39000000D+01 0.40000000D+01 0.10433565D+00 0.31213066D-02
+ 0.40000000D+01 0.41000000D+01 0.52556517D-01 0.90441776D-03
+ 0.41000000D+01 0.42000000D+01 0.23736239D-01 0.42748007D-03
+ 0.42000000D+01 0.43000000D+01 0.77313782D-02 0.16700364D-03
+ 0.43000000D+01 0.44000000D+01 0.14144010D-02 0.39958172D-04
+ 0.44000000D+01 0.45000000D+01 -.15448897D-03 0.11247097D-04
+ 0.45000000D+01 0.46000000D+01 -.10765398D-03 0.51704870D-05
+ 0.46000000D+01 0.47000000D+01 -.23772065D-05 0.97528623D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22925808D-05 0.97666181D-06
+ -.46000000D+01 -.45000000D+01 -.10289777D-03 0.51863456D-05
+ -.45000000D+01 -.44000000D+01 -.17550670D-03 0.11270840D-04
+ -.44000000D+01 -.43000000D+01 0.14327766D-02 0.39100863D-04
+ -.43000000D+01 -.42000000D+01 0.80645445D-02 0.13523241D-03
+ -.42000000D+01 -.41000000D+01 0.23642460D-01 0.42103308D-03
+ -.41000000D+01 -.40000000D+01 0.54582090D-01 0.82286915D-03
+ -.40000000D+01 -.39000000D+01 0.10406956D+00 0.16110509D-02
+ -.39000000D+01 -.38000000D+01 0.17543103D+00 0.24981175D-02
+ -.38000000D+01 -.37000000D+01 0.25866487D+00 0.32832524D-02
+ -.37000000D+01 -.36000000D+01 0.37726541D+00 0.45771670D-02
+ -.36000000D+01 -.35000000D+01 0.50671907D+00 0.58453641D-02
+ -.35000000D+01 -.34000000D+01 0.66671505D+00 0.83254654D-02
+ -.34000000D+01 -.33000000D+01 0.82558109D+00 0.33701395D-01
+ -.33000000D+01 -.32000000D+01 0.11553302D+01 0.46070953D-01
+ -.32000000D+01 -.31000000D+01 0.13216047D+01 0.11837732D-01
+ -.31000000D+01 -.30000000D+01 0.15962680D+01 0.12921074D-01
+ -.30000000D+01 -.29000000D+01 0.19093464D+01 0.13647983D-01
+ -.29000000D+01 -.28000000D+01 0.22355393D+01 0.15174848D-01
+ -.28000000D+01 -.27000000D+01 0.25870915D+01 0.15589260D-01
+ -.27000000D+01 -.26000000D+01 0.29518246D+01 0.18802206D-01
+ -.26000000D+01 -.25000000D+01 0.32943622D+01 0.30002790D-01
+ -.25000000D+01 -.24000000D+01 0.37543150D+01 0.20010855D-01
+ -.24000000D+01 -.23000000D+01 0.41564780D+01 0.24294778D-01
+ -.23000000D+01 -.22000000D+01 0.45647200D+01 0.24514874D-01
+ -.22000000D+01 -.21000000D+01 0.50396168D+01 0.26021341D-01
+ -.21000000D+01 -.20000000D+01 0.55017503D+01 0.26570937D-01
+ -.20000000D+01 -.19000000D+01 0.59140177D+01 0.28425470D-01
+ -.19000000D+01 -.18000000D+01 0.63726422D+01 0.39519027D-01
+ -.18000000D+01 -.17000000D+01 0.67959219D+01 0.28887273D-01
+ -.17000000D+01 -.16000000D+01 0.71553205D+01 0.28528342D-01
+ -.16000000D+01 -.15000000D+01 0.76057131D+01 0.46572657D-01
+ -.15000000D+01 -.14000000D+01 0.79139762D+01 0.38997383D-01
+ -.14000000D+01 -.13000000D+01 0.82756420D+01 0.31765508D-01
+ -.13000000D+01 -.12000000D+01 0.85902131D+01 0.31749159D-01
+ -.12000000D+01 -.11000000D+01 0.89423077D+01 0.33192665D-01
+ -.11000000D+01 -.10000000D+01 0.92834562D+01 0.33302536D-01
+ -.10000000D+01 -.90000000D+00 0.94108524D+01 0.36899368D-01
+ -.90000000D+00 -.80000000D+00 0.97094081D+01 0.32696007D-01
+ -.80000000D+00 -.70000000D+00 0.99510460D+01 0.32873609D-01
+ -.70000000D+00 -.60000000D+00 0.10136863D+02 0.43762239D-01
+ -.60000000D+00 -.50000000D+00 0.10241267D+02 0.43595035D-01
+ -.50000000D+00 -.40000000D+00 0.10394594D+02 0.39610376D-01
+ -.40000000D+00 -.30000000D+00 0.10542599D+02 0.38108468D-01
+ -.30000000D+00 -.20000000D+00 0.10635845D+02 0.37452579D-01
+ -.20000000D+00 -.10000000D+00 0.10683861D+02 0.34571064D-01
+ -.10000000D+00 0.18041124D-15 0.10623803D+02 0.40606954D-01
+ 0.70776718D-15 0.10000000D+00 0.10671758D+02 0.39278383D-01
+ 0.10000000D+00 0.20000000D+00 0.10667626D+02 0.35328422D-01
+ 0.20000000D+00 0.30000000D+00 0.10574901D+02 0.34708063D-01
+ 0.30000000D+00 0.40000000D+00 0.10513208D+02 0.35448501D-01
+ 0.40000000D+00 0.50000000D+00 0.10398566D+02 0.35720206D-01
+ 0.50000000D+00 0.60000000D+00 0.10269690D+02 0.37054973D-01
+ 0.60000000D+00 0.70000000D+00 0.10091316D+02 0.33425390D-01
+ 0.70000000D+00 0.80000000D+00 0.99209704D+01 0.33589017D-01
+ 0.80000000D+00 0.90000000D+00 0.96940077D+01 0.35272189D-01
+ 0.90000000D+00 0.10000000D+01 0.94654778D+01 0.38777333D-01
+ 0.10000000D+01 0.11000000D+01 0.92464440D+01 0.33961700D-01
+ 0.11000000D+01 0.12000000D+01 0.88875396D+01 0.32566153D-01
+ 0.12000000D+01 0.13000000D+01 0.86340561D+01 0.32694176D-01
+ 0.13000000D+01 0.14000000D+01 0.83060348D+01 0.30740083D-01
+ 0.14000000D+01 0.15000000D+01 0.79200614D+01 0.32522652D-01
+ 0.15000000D+01 0.16000000D+01 0.75486338D+01 0.29116159D-01
+ 0.16000000D+01 0.17000000D+01 0.71288103D+01 0.32441451D-01
+ 0.17000000D+01 0.18000000D+01 0.67698035D+01 0.27774805D-01
+ 0.18000000D+01 0.19000000D+01 0.63310678D+01 0.29825348D-01
+ 0.19000000D+01 0.20000000D+01 0.59301159D+01 0.30561121D-01
+ 0.20000000D+01 0.21000000D+01 0.55054981D+01 0.33858908D-01
+ 0.21000000D+01 0.22000000D+01 0.50226653D+01 0.24732363D-01
+ 0.22000000D+01 0.23000000D+01 0.46262536D+01 0.22958748D-01
+ 0.23000000D+01 0.24000000D+01 0.41753736D+01 0.23185708D-01
+ 0.24000000D+01 0.25000000D+01 0.37415124D+01 0.20476965D-01
+ 0.25000000D+01 0.26000000D+01 0.33722772D+01 0.19462483D-01
+ 0.26000000D+01 0.27000000D+01 0.29709761D+01 0.17499297D-01
+ 0.27000000D+01 0.28000000D+01 0.25505592D+01 0.18954741D-01
+ 0.28000000D+01 0.29000000D+01 0.22176697D+01 0.16808364D-01
+ 0.29000000D+01 0.30000000D+01 0.18980487D+01 0.14792482D-01
+ 0.30000000D+01 0.31000000D+01 0.16075040D+01 0.13431329D-01
+ 0.31000000D+01 0.32000000D+01 0.13329250D+01 0.11171608D-01
+ 0.32000000D+01 0.33000000D+01 0.10818411D+01 0.10328460D-01
+ 0.33000000D+01 0.34000000D+01 0.86954116D+00 0.87564357D-02
+ 0.34000000D+01 0.35000000D+01 0.66390891D+00 0.88493085D-02
+ 0.35000000D+01 0.36000000D+01 0.50914205D+00 0.59901710D-02
+ 0.36000000D+01 0.37000000D+01 0.36473629D+00 0.49552503D-02
+ 0.37000000D+01 0.38000000D+01 0.26084071D+00 0.33067689D-02
+ 0.38000000D+01 0.39000000D+01 0.16845630D+00 0.24745538D-02
+ 0.39000000D+01 0.40000000D+01 0.10662992D+00 0.31217991D-02
+ 0.40000000D+01 0.41000000D+01 0.53615812D-01 0.90469698D-03
+ 0.41000000D+01 0.42000000D+01 0.24132425D-01 0.42756757D-03
+ 0.42000000D+01 0.43000000D+01 0.78366346D-02 0.16702981D-03
+ 0.43000000D+01 0.44000000D+01 0.14272202D-02 0.39964676D-04
+ 0.44000000D+01 0.45000000D+01 -.15703839D-03 0.11247565D-04
+ 0.45000000D+01 0.46000000D+01 -.10837440D-03 0.51707292D-05
+ 0.46000000D+01 0.47000000D+01 -.23820745D-05 0.97528702D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22066589D-05 0.97665650D-06
+ -.46000000D+01 -.45000000D+01 -.90002291D-04 0.51855595D-05
+ -.45000000D+01 -.44000000D+01 -.13801173D-03 0.11265394D-04
+ -.44000000D+01 -.43000000D+01 0.11745852D-02 0.39093627D-04
+ -.43000000D+01 -.42000000D+01 0.62192192D-02 0.13514783D-03
+ -.42000000D+01 -.41000000D+01 0.17200504D-01 0.42091231D-03
+ -.41000000D+01 -.40000000D+01 0.38318117D-01 0.82154518D-03
+ -.40000000D+01 -.39000000D+01 0.70402826D-01 0.16093623D-02
+ -.39000000D+01 -.38000000D+01 0.11525271D+00 0.24982672D-02
+ -.38000000D+01 -.37000000D+01 0.16159887D+00 0.32822531D-02
+ -.37000000D+01 -.36000000D+01 0.23150885D+00 0.45723072D-02
+ -.36000000D+01 -.35000000D+01 0.30006526D+00 0.58432866D-02
+ -.35000000D+01 -.34000000D+01 0.38578111D+00 0.83207942D-02
+ -.34000000D+01 -.33000000D+01 0.46349400D+00 0.27392899D-01
+ -.33000000D+01 -.32000000D+01 0.67740368D+00 0.41676662D-01
+ -.32000000D+01 -.31000000D+01 0.73524270D+00 0.11599838D-01
+ -.31000000D+01 -.30000000D+01 0.87473304D+00 0.12709076D-01
+ -.30000000D+01 -.29000000D+01 0.10433135D+01 0.13569518D-01
+ -.29000000D+01 -.28000000D+01 0.12111743D+01 0.15100574D-01
+ -.28000000D+01 -.27000000D+01 0.13898573D+01 0.15539544D-01
+ -.27000000D+01 -.26000000D+01 0.15699507D+01 0.18772491D-01
+ -.26000000D+01 -.25000000D+01 0.17195925D+01 0.29978361D-01
+ -.25000000D+01 -.24000000D+01 0.19720892D+01 0.19847773D-01
+ -.24000000D+01 -.23000000D+01 0.21642458D+01 0.24111403D-01
+ -.23000000D+01 -.22000000D+01 0.23570120D+01 0.24485988D-01
+ -.22000000D+01 -.21000000D+01 0.26096557D+01 0.25978194D-01
+ -.21000000D+01 -.20000000D+01 0.28421222D+01 0.26538319D-01
+ -.20000000D+01 -.19000000D+01 0.30289051D+01 0.28362341D-01
+ -.19000000D+01 -.18000000D+01 0.32695849D+01 0.39474852D-01
+ -.18000000D+01 -.17000000D+01 0.34677921D+01 0.28800937D-01
+ -.17000000D+01 -.16000000D+01 0.36167602D+01 0.28351028D-01
+ -.16000000D+01 -.15000000D+01 0.38509692D+01 0.45710354D-01
+ -.15000000D+01 -.14000000D+01 0.39748519D+01 0.37952415D-01
+ -.14000000D+01 -.13000000D+01 0.41314281D+01 0.31524407D-01
+ -.13000000D+01 -.12000000D+01 0.42741642D+01 0.31510644D-01
+ -.12000000D+01 -.11000000D+01 0.44525988D+01 0.33106602D-01
+ -.11000000D+01 -.10000000D+01 0.46318763D+01 0.33241293D-01
+ -.10000000D+01 -.90000000D+00 0.46158734D+01 0.36728271D-01
+ -.90000000D+00 -.80000000D+00 0.47839766D+01 0.32495259D-01
+ -.80000000D+00 -.70000000D+00 0.49065383D+01 0.32746061D-01
+ -.70000000D+00 -.60000000D+00 0.49893040D+01 0.43456145D-01
+ -.60000000D+00 -.50000000D+00 0.49999354D+01 0.43263108D-01
+ -.50000000D+00 -.40000000D+00 0.50772795D+01 0.39558141D-01
+ -.40000000D+00 -.30000000D+00 0.51648660D+01 0.38000554D-01
+ -.30000000D+00 -.20000000D+00 0.52147804D+01 0.37324900D-01
+ -.20000000D+00 -.10000000D+00 0.52283704D+01 0.34179647D-01
+ -.10000000D+00 0.18041124D-15 0.51721019D+01 0.38538406D-01
+ 0.70776718D-15 0.10000000D+00 0.51923684D+01 0.37395044D-01
+ 0.10000000D+00 0.20000000D+00 0.52121449D+01 0.35199731D-01
+ 0.20000000D+00 0.30000000D+00 0.51481223D+01 0.33443495D-01
+ 0.30000000D+00 0.40000000D+00 0.51453085D+01 0.34282066D-01
+ 0.40000000D+00 0.50000000D+00 0.50845476D+01 0.35645091D-01
+ 0.50000000D+00 0.60000000D+00 0.50293712D+01 0.36928201D-01
+ 0.60000000D+00 0.70000000D+00 0.49406757D+01 0.33309269D-01
+ 0.70000000D+00 0.80000000D+00 0.48757718D+01 0.33421390D-01
+ 0.80000000D+00 0.90000000D+00 0.47679587D+01 0.35005203D-01
+ 0.90000000D+00 0.10000000D+01 0.46688040D+01 0.38562027D-01
+ 0.10000000D+01 0.11000000D+01 0.45971941D+01 0.33855724D-01
+ 0.11000000D+01 0.12000000D+01 0.43978740D+01 0.32429567D-01
+ 0.12000000D+01 0.13000000D+01 0.43125542D+01 0.32572687D-01
+ 0.13000000D+01 0.14000000D+01 0.41660374D+01 0.30478817D-01
+ 0.14000000D+01 0.15000000D+01 0.39692493D+01 0.32251419D-01
+ 0.15000000D+01 0.16000000D+01 0.38031178D+01 0.28987629D-01
+ 0.16000000D+01 0.17000000D+01 0.35876587D+01 0.32380776D-01
+ 0.17000000D+01 0.18000000D+01 0.34466735D+01 0.27546800D-01
+ 0.18000000D+01 0.19000000D+01 0.32255839D+01 0.29672810D-01
+ 0.19000000D+01 0.20000000D+01 0.30436100D+01 0.30317869D-01
+ 0.20000000D+01 0.21000000D+01 0.28507641D+01 0.33658978D-01
+ 0.21000000D+01 0.22000000D+01 0.25895510D+01 0.24648361D-01
+ 0.22000000D+01 0.23000000D+01 0.24160508D+01 0.22909156D-01
+ 0.23000000D+01 0.24000000D+01 0.21835164D+01 0.23114071D-01
+ 0.24000000D+01 0.25000000D+01 0.19614782D+01 0.20390750D-01
+ 0.25000000D+01 0.26000000D+01 0.17960148D+01 0.19407517D-01
+ 0.26000000D+01 0.27000000D+01 0.15903474D+01 0.17478877D-01
+ 0.27000000D+01 0.28000000D+01 0.13527937D+01 0.18930150D-01
+ 0.28000000D+01 0.29000000D+01 0.11924147D+01 0.16790497D-01
+ 0.29000000D+01 0.30000000D+01 0.10304056D+01 0.14660983D-01
+ 0.30000000D+01 0.31000000D+01 0.88984480D+00 0.13298554D-01
+ 0.31000000D+01 0.32000000D+01 0.74456558D+00 0.11158849D-01
+ 0.32000000D+01 0.33000000D+01 0.61029454D+00 0.10320908D-01
+ 0.33000000D+01 0.34000000D+01 0.50165151D+00 0.85190365D-02
+ 0.34000000D+01 0.35000000D+01 0.38254023D+00 0.85400409D-02
+ 0.35000000D+01 0.36000000D+01 0.30164983D+00 0.58654296D-02
+ 0.36000000D+01 0.37000000D+01 0.21900578D+00 0.49523368D-02
+ 0.37000000D+01 0.38000000D+01 0.16365287D+00 0.33043459D-02
+ 0.38000000D+01 0.39000000D+01 0.10824167D+00 0.24694982D-02
+ 0.39000000D+01 0.40000000D+01 0.72970664D-01 0.31199784D-02
+ 0.40000000D+01 0.41000000D+01 0.37280762D-01 0.90418671D-03
+ 0.41000000D+01 0.42000000D+01 0.17690597D-01 0.42742326D-03
+ 0.42000000D+01 0.43000000D+01 0.59934887D-02 0.16698527D-03
+ 0.43000000D+01 0.44000000D+01 0.11679051D-02 0.39962983D-04
+ 0.44000000D+01 0.45000000D+01 -.11934974D-03 0.11246452D-04
+ 0.45000000D+01 0.46000000D+01 -.95472823D-04 0.51697977D-05
+ 0.46000000D+01 0.47000000D+01 -.22962593D-05 0.97528221D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22730087D-05 0.97666111D-06
+ -.46000000D+01 -.45000000D+01 -.99498178D-04 0.51862923D-05
+ -.45000000D+01 -.44000000D+01 -.16379689D-03 0.11270172D-04
+ -.44000000D+01 -.43000000D+01 0.13622886D-02 0.39102387D-04
+ -.43000000D+01 -.42000000D+01 0.75075021D-02 0.13523571D-03
+ -.42000000D+01 -.41000000D+01 0.21594208D-01 0.42107865D-03
+ -.41000000D+01 -.40000000D+01 0.49194905D-01 0.82267285D-03
+ -.40000000D+01 -.39000000D+01 0.92520881D-01 0.16110384D-02
+ -.39000000D+01 -.38000000D+01 0.15413966D+00 0.24987369D-02
+ -.38000000D+01 -.37000000D+01 0.22334558D+00 0.32838388D-02
+ -.37000000D+01 -.36000000D+01 0.32300149D+00 0.45767348D-02
+ -.36000000D+01 -.35000000D+01 0.42813567D+00 0.58460618D-02
+ -.35000000D+01 -.34000000D+01 0.55815543D+00 0.83239838D-02
+ -.34000000D+01 -.33000000D+01 0.68231027D+00 0.32440807D-01
+ -.33000000D+01 -.32000000D+01 0.96692281D+00 0.45154074D-01
+ -.32000000D+01 -.31000000D+01 0.10862717D+01 0.11706528D-01
+ -.31000000D+01 -.30000000D+01 0.13039662D+01 0.12804034D-01
+ -.30000000D+01 -.29000000D+01 0.15554908D+01 0.13629260D-01
+ -.29000000D+01 -.28000000D+01 0.18134990D+01 0.15161864D-01
+ -.28000000D+01 -.27000000D+01 0.20908439D+01 0.15574165D-01
+ -.27000000D+01 -.26000000D+01 0.23755075D+01 0.18792358D-01
+ -.26000000D+01 -.25000000D+01 0.26340463D+01 0.29995854D-01
+ -.25000000D+01 -.24000000D+01 0.30035761D+01 0.19942215D-01
+ -.24000000D+01 -.23000000D+01 0.33127271D+01 0.24221881D-01
+ -.23000000D+01 -.22000000D+01 0.36259581D+01 0.24506522D-01
+ -.22000000D+01 -.21000000D+01 0.40023740D+01 0.26008250D-01
+ -.21000000D+01 -.20000000D+01 0.43624890D+01 0.26561696D-01
+ -.20000000D+01 -.19000000D+01 0.46742515D+01 0.28406901D-01
+ -.19000000D+01 -.18000000D+01 0.50347665D+01 0.39510722D-01
+ -.18000000D+01 -.17000000D+01 0.53566785D+01 0.28849382D-01
+ -.17000000D+01 -.16000000D+01 0.56216974D+01 0.28456120D-01
+ -.16000000D+01 -.15000000D+01 0.59736213D+01 0.46296805D-01
+ -.15000000D+01 -.14000000D+01 0.61967942D+01 0.38676795D-01
+ -.14000000D+01 -.13000000D+01 0.64658523D+01 0.31648131D-01
+ -.13000000D+01 -.12000000D+01 0.67011850D+01 0.31644665D-01
+ -.12000000D+01 -.11000000D+01 0.69735018D+01 0.33163147D-01
+ -.11000000D+01 -.10000000D+01 0.72408929D+01 0.33280875D-01
+ -.10000000D+01 -.90000000D+00 0.73021765D+01 0.36826904D-01
+ -.90000000D+00 -.80000000D+00 0.75398191D+01 0.32618428D-01
+ -.80000000D+00 -.70000000D+00 0.77266113D+01 0.32819407D-01
+ -.70000000D+00 -.60000000D+00 0.78649611D+01 0.43578631D-01
+ -.60000000D+00 -.50000000D+00 0.79247462D+01 0.43403771D-01
+ -.50000000D+00 -.40000000D+00 0.80434931D+01 0.39608615D-01
+ -.40000000D+00 -.30000000D+00 0.81637545D+01 0.38063256D-01
+ -.30000000D+00 -.20000000D+00 0.82353312D+01 0.37370334D-01
+ -.20000000D+00 -.10000000D+00 0.82687017D+01 0.34322312D-01
+ -.10000000D+00 0.18041124D-15 0.82137359D+01 0.38828867D-01
+ 0.70776718D-15 0.10000000D+00 0.82417706D+01 0.37666404D-01
+ 0.10000000D+00 0.20000000D+00 0.82522034D+01 0.35280260D-01
+ 0.20000000D+00 0.30000000D+00 0.81715471D+01 0.33748986D-01
+ 0.30000000D+00 0.40000000D+00 0.81394866D+01 0.34561106D-01
+ 0.40000000D+00 0.50000000D+00 0.80489008D+01 0.35703441D-01
+ 0.50000000D+00 0.60000000D+00 0.79537791D+01 0.37015353D-01
+ 0.60000000D+00 0.70000000D+00 0.78176192D+01 0.33392633D-01
+ 0.70000000D+00 0.80000000D+00 0.76971029D+01 0.33486871D-01
+ 0.80000000D+00 0.90000000D+00 0.75238336D+01 0.35129541D-01
+ 0.90000000D+00 0.10000000D+01 0.73551797D+01 0.38683302D-01
+ 0.10000000D+01 0.11000000D+01 0.72049055D+01 0.33925499D-01
+ 0.11000000D+01 0.12000000D+01 0.69192302D+01 0.32510326D-01
+ 0.12000000D+01 0.13000000D+01 0.67432269D+01 0.32634096D-01
+ 0.13000000D+01 0.14000000D+01 0.64973148D+01 0.30640752D-01
+ 0.14000000D+01 0.15000000D+01 0.61987638D+01 0.32430832D-01
+ 0.15000000D+01 0.16000000D+01 0.59205577D+01 0.29068496D-01
+ 0.16000000D+01 0.17000000D+01 0.55930169D+01 0.32425003D-01
+ 0.17000000D+01 0.18000000D+01 0.53328931D+01 0.27698332D-01
+ 0.18000000D+01 0.19000000D+01 0.49921769D+01 0.29771890D-01
+ 0.19000000D+01 0.20000000D+01 0.46897821D+01 0.30489340D-01
+ 0.20000000D+01 0.21000000D+01 0.43688613D+01 0.33793360D-01
+ 0.21000000D+01 0.22000000D+01 0.39840158D+01 0.24686336D-01
+ 0.22000000D+01 0.23000000D+01 0.36862758D+01 0.22941017D-01
+ 0.23000000D+01 0.24000000D+01 0.33321760D+01 0.23154781D-01
+ 0.24000000D+01 0.25000000D+01 0.29914483D+01 0.20438828D-01
+ 0.25000000D+01 0.26000000D+01 0.27113098D+01 0.19444080D-01
+ 0.26000000D+01 0.27000000D+01 0.23949795D+01 0.17496180D-01
+ 0.27000000D+01 0.28000000D+01 0.20540324D+01 0.18948835D-01
+ 0.28000000D+01 0.29000000D+01 0.17954905D+01 0.16804370D-01
+ 0.29000000D+01 0.30000000D+01 0.15434378D+01 0.14720969D-01
+ 0.30000000D+01 0.31000000D+01 0.13166734D+01 0.13356201D-01
+ 0.31000000D+01 0.32000000D+01 0.10968002D+01 0.11169225D-01
+ 0.32000000D+01 0.33000000D+01 0.89465847D+00 0.10328975D-01
+ 0.33000000D+01 0.34000000D+01 0.72528292D+00 0.86364451D-02
+ 0.34000000D+01 0.35000000D+01 0.55515501D+00 0.86947513D-02
+ 0.35000000D+01 0.36000000D+01 0.43030197D+00 0.59319323D-02
+ 0.36000000D+01 0.37000000D+01 0.31040915D+00 0.49555435D-02
+ 0.37000000D+01 0.38000000D+01 0.22548105D+00 0.33070018D-02
+ 0.38000000D+01 0.39000000D+01 0.14714472D+00 0.24740470D-02
+ 0.39000000D+01 0.40000000D+01 0.95086257D-01 0.31214333D-02
+ 0.40000000D+01 0.41000000D+01 0.48206913D-01 0.90474298D-03
+ 0.41000000D+01 0.42000000D+01 0.22084241D-01 0.42760235D-03
+ 0.42000000D+01 0.43000000D+01 0.72801203D-02 0.16703878D-03
+ 0.43000000D+01 0.44000000D+01 0.13564376D-02 0.39967950D-04
+ 0.44000000D+01 0.45000000D+01 -.14527697D-03 0.11247780D-04
+ 0.45000000D+01 0.46000000D+01 -.10497372D-03 0.51707048D-05
+ 0.46000000D+01 0.47000000D+01 -.23625590D-05 0.97528642D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22864862D-05 0.97666198D-06
+ -.46000000D+01 -.45000000D+01 -.10171150D-03 0.51864418D-05
+ -.45000000D+01 -.44000000D+01 -.17110868D-03 0.11271138D-04
+ -.44000000D+01 -.43000000D+01 0.14068690D-02 0.39103963D-04
+ -.43000000D+01 -.42000000D+01 0.78505951D-02 0.13525463D-03
+ -.42000000D+01 -.41000000D+01 0.22834038D-01 0.42111421D-03
+ -.41000000D+01 -.40000000D+01 0.52404568D-01 0.82299881D-03
+ -.40000000D+01 -.39000000D+01 0.99307783D-01 0.16114301D-02
+ -.39000000D+01 -.38000000D+01 0.16648605D+00 0.24988274D-02
+ -.38000000D+01 -.37000000D+01 0.24356148D+00 0.32842244D-02
+ -.37000000D+01 -.36000000D+01 0.35370598D+00 0.45782030D-02
+ -.36000000D+01 -.35000000D+01 0.47212592D+00 0.58471954D-02
+ -.35000000D+01 -.34000000D+01 0.61838142D+00 0.83264519D-02
+ -.34000000D+01 -.33000000D+01 0.76062387D+00 0.33620116D-01
+ -.33000000D+01 -.32000000D+01 0.10703263D+01 0.46010226D-01
+ -.32000000D+01 -.31000000D+01 0.12138383D+01 0.11798496D-01
+ -.31000000D+01 -.30000000D+01 0.14618663D+01 0.12886422D-01
+ -.30000000D+01 -.29000000D+01 0.17454857D+01 0.13647876D-01
+ -.29000000D+01 -.28000000D+01 0.20388819D+01 0.15182096D-01
+ -.28000000D+01 -.27000000D+01 0.23548905D+01 0.15589838D-01
+ -.27000000D+01 -.26000000D+01 0.26809869D+01 0.18802644D-01
+ -.26000000D+01 -.25000000D+01 0.29826847D+01 0.30003779D-01
+ -.25000000D+01 -.24000000D+01 0.33990734D+01 0.19999211D-01
+ -.24000000D+01 -.23000000D+01 0.37554374D+01 0.24280962D-01
+ -.23000000D+01 -.22000000D+01 0.41172390D+01 0.24517534D-01
+ -.22000000D+01 -.21000000D+01 0.45438052D+01 0.26020824D-01
+ -.21000000D+01 -.20000000D+01 0.49560917D+01 0.26573424D-01
+ -.20000000D+01 -.19000000D+01 0.53189548D+01 0.28425796D-01
+ -.19000000D+01 -.18000000D+01 0.57286213D+01 0.39523808D-01
+ -.18000000D+01 -.17000000D+01 0.61023010D+01 0.28879735D-01
+ -.17000000D+01 -.16000000D+01 0.64146120D+01 0.28509020D-01
+ -.16000000D+01 -.15000000D+01 0.68163826D+01 0.46529575D-01
+ -.15000000D+01 -.14000000D+01 0.70810123D+01 0.38953270D-01
+ -.14000000D+01 -.13000000D+01 0.73976115D+01 0.31735146D-01
+ -.13000000D+01 -.12000000D+01 0.76716649D+01 0.31724153D-01
+ -.12000000D+01 -.11000000D+01 0.79839903D+01 0.33190085D-01
+ -.11000000D+01 -.10000000D+01 0.82886019D+01 0.33300980D-01
+ -.10000000D+01 -.90000000D+00 0.83826487D+01 0.36880876D-01
+ -.90000000D+00 -.80000000D+00 0.86503206D+01 0.32678380D-01
+ -.80000000D+00 -.70000000D+00 0.88643740D+01 0.32861291D-01
+ -.70000000D+00 -.60000000D+00 0.90261722D+01 0.43694872D-01
+ -.60000000D+00 -.50000000D+00 0.91083646D+01 0.43529368D-01
+ -.50000000D+00 -.40000000D+00 0.92442779D+01 0.39620344D-01
+ -.40000000D+00 -.30000000D+00 0.93782914D+01 0.38097477D-01
+ -.30000000D+00 -.20000000D+00 0.94599238D+01 0.37400962D-01
+ -.20000000D+00 -.10000000D+00 0.95018179D+01 0.34446206D-01
+ -.10000000D+00 0.18041124D-15 0.94440970D+01 0.39366572D-01
+ 0.70776718D-15 0.10000000D+00 0.94805179D+01 0.38124034D-01
+ 0.10000000D+00 0.20000000D+00 0.94850232D+01 0.35317525D-01
+ 0.20000000D+00 0.30000000D+00 0.93981021D+01 0.34226603D-01
+ 0.30000000D+00 0.40000000D+00 0.93509819D+01 0.34999571D-01
+ 0.40000000D+00 0.50000000D+00 0.92486300D+01 0.35728705D-01
+ 0.50000000D+00 0.60000000D+00 0.91366988D+01 0.37048957D-01
+ 0.60000000D+00 0.70000000D+00 0.89800290D+01 0.33426179D-01
+ 0.70000000D+00 0.80000000D+00 0.88350136D+01 0.33534129D-01
+ 0.80000000D+00 0.90000000D+00 0.86342530D+01 0.35204960D-01
+ 0.90000000D+00 0.10000000D+01 0.84364787D+01 0.38746956D-01
+ 0.10000000D+01 0.11000000D+01 0.82519168D+01 0.33959234D-01
+ 0.11000000D+01 0.12000000D+01 0.79295619D+01 0.32554062D-01
+ 0.12000000D+01 0.13000000D+01 0.77151004D+01 0.32675559D-01
+ 0.13000000D+01 0.14000000D+01 0.74280122D+01 0.30722744D-01
+ 0.14000000D+01 0.15000000D+01 0.70862000D+01 0.32508736D-01
+ 0.15000000D+01 0.16000000D+01 0.67607743D+01 0.29105679D-01
+ 0.16000000D+01 0.17000000D+01 0.63869622D+01 0.32443316D-01
+ 0.17000000D+01 0.18000000D+01 0.60768131D+01 0.27762072D-01
+ 0.18000000D+01 0.19000000D+01 0.56869330D+01 0.29816575D-01
+ 0.19000000D+01 0.20000000D+01 0.53347410D+01 0.30550976D-01
+ 0.20000000D+01 0.21000000D+01 0.49609166D+01 0.33848575D-01
+ 0.21000000D+01 0.22000000D+01 0.45263608D+01 0.24717661D-01
+ 0.22000000D+01 0.23000000D+01 0.41782259D+01 0.22958252D-01
+ 0.23000000D+01 0.24000000D+01 0.37747997D+01 0.23177112D-01
+ 0.24000000D+01 0.25000000D+01 0.33862907D+01 0.20466218D-01
+ 0.25000000D+01 0.26000000D+01 0.30604344D+01 0.19461967D-01
+ 0.26000000D+01 0.27000000D+01 0.27000936D+01 0.17503426D-01
+ 0.27000000D+01 0.28000000D+01 0.23181696D+01 0.18957123D-01
+ 0.28000000D+01 0.29000000D+01 0.20210361D+01 0.16810811D-01
+ 0.29000000D+01 0.30000000D+01 0.17340049D+01 0.14772947D-01
+ 0.30000000D+01 0.31000000D+01 0.14734140D+01 0.13408969D-01
+ 0.31000000D+01 0.32000000D+01 0.12249675D+01 0.11173677D-01
+ 0.32000000D+01 0.33000000D+01 0.99690943D+00 0.10331617D-01
+ 0.33000000D+01 0.34000000D+01 0.80453715D+00 0.87255472D-02
+ 0.34000000D+01 0.35000000D+01 0.61552520D+00 0.88088996D-02
+ 0.35000000D+01 0.36000000D+01 0.47449354D+00 0.59763369D-02
+ 0.36000000D+01 0.37000000D+01 0.34112996D+00 0.49565176D-02
+ 0.37000000D+01 0.38000000D+01 0.24571749D+00 0.33078318D-02
+ 0.38000000D+01 0.39000000D+01 0.15949851D+00 0.24752243D-02
+ 0.39000000D+01 0.40000000D+01 0.10187195D+00 0.31218962D-02
+ 0.40000000D+01 0.41000000D+01 0.51432088D-01 0.90487434D-03
+ 0.41000000D+01 0.42000000D+01 0.23324526D-01 0.42763586D-03
+ 0.42000000D+01 0.43000000D+01 0.76227299D-02 0.16704961D-03
+ 0.43000000D+01 0.44000000D+01 0.14012574D-02 0.39969824D-04
+ 0.44000000D+01 0.45000000D+01 -.15262276D-03 0.11247968D-04
+ 0.45000000D+01 0.46000000D+01 -.10718779D-03 0.51708647D-05
+ 0.46000000D+01 0.47000000D+01 -.23760274D-05 0.97528721D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22913277D-05 0.97666229D-06
+ -.46000000D+01 -.45000000D+01 -.10254464D-03 0.51864958D-05
+ -.45000000D+01 -.44000000D+01 -.17408317D-03 0.11271483D-04
+ -.44000000D+01 -.43000000D+01 0.14236273D-02 0.39104519D-04
+ -.43000000D+01 -.42000000D+01 0.79872773D-02 0.13526152D-03
+ -.42000000D+01 -.41000000D+01 0.23343554D-01 0.42112927D-03
+ -.41000000D+01 -.40000000D+01 0.53757695D-01 0.82313250D-03
+ -.40000000D+01 -.39000000D+01 0.10223606D+00 0.16115782D-02
+ -.39000000D+01 -.38000000D+01 0.17192866D+00 0.24988770D-02
+ -.38000000D+01 -.37000000D+01 0.25265465D+00 0.32844122D-02
+ -.37000000D+01 -.36000000D+01 0.36775266D+00 0.45788866D-02
+ -.36000000D+01 -.35000000D+01 0.49258539D+00 0.58477518D-02
+ -.35000000D+01 -.34000000D+01 0.64674364D+00 0.83280011D-02
+ -.34000000D+01 -.33000000D+01 0.79808783D+00 0.34056039D-01
+ -.33000000D+01 -.32000000D+01 0.11199839D+01 0.46330486D-01
+ -.32000000D+01 -.31000000D+01 0.12758340D+01 0.11856364D-01
+ -.31000000D+01 -.30000000D+01 0.15392178D+01 0.12938667D-01
+ -.30000000D+01 -.29000000D+01 0.18392477D+01 0.13656024D-01
+ -.29000000D+01 -.28000000D+01 0.21509092D+01 0.15190509D-01
+ -.28000000D+01 -.27000000D+01 0.24868543D+01 0.15598300D-01
+ -.27000000D+01 -.26000000D+01 0.28344924D+01 0.18808481D-01
+ -.26000000D+01 -.25000000D+01 0.31587352D+01 0.30008396D-01
+ -.25000000D+01 -.24000000D+01 0.35996400D+01 0.20029688D-01
+ -.24000000D+01 -.23000000D+01 0.39810917D+01 0.24312359D-01
+ -.23000000D+01 -.22000000D+01 0.43684541D+01 0.24524617D-01
+ -.22000000D+01 -.21000000D+01 0.48216487D+01 0.26028999D-01
+ -.21000000D+01 -.20000000D+01 0.52617797D+01 0.26581492D-01
+ -.20000000D+01 -.19000000D+01 0.56519152D+01 0.28436530D-01
+ -.19000000D+01 -.18000000D+01 0.60881028D+01 0.39530364D-01
+ -.18000000D+01 -.17000000D+01 0.64896351D+01 0.28900531D-01
+ -.17000000D+01 -.16000000D+01 0.68273699D+01 0.28543739D-01
+ -.16000000D+01 -.15000000D+01 0.72564051D+01 0.46635240D-01
+ -.15000000D+01 -.14000000D+01 0.75436392D+01 0.39074266D-01
+ -.14000000D+01 -.13000000D+01 0.78860761D+01 0.31789631D-01
+ -.13000000D+01 -.12000000D+01 0.81814236D+01 0.31772438D-01
+ -.12000000D+01 -.11000000D+01 0.85157915D+01 0.33208493D-01
+ -.11000000D+01 -.10000000D+01 0.88407094D+01 0.33314956D-01
+ -.10000000D+01 -.90000000D+00 0.89528153D+01 0.36913894D-01
+ -.90000000D+00 -.80000000D+00 0.92372249D+01 0.32713170D-01
+ -.80000000D+00 -.70000000D+00 0.94663080D+01 0.32887115D-01
+ -.70000000D+00 -.60000000D+00 0.96410242D+01 0.43781325D-01
+ -.60000000D+00 -.50000000D+00 0.97359260D+01 0.43620484D-01
+ -.50000000D+00 -.40000000D+00 0.98812028D+01 0.39623836D-01
+ -.40000000D+00 -.30000000D+00 0.10022850D+02 0.38119982D-01
+ -.30000000D+00 -.20000000D+00 0.10110378D+02 0.37439126D-01
+ -.20000000D+00 -.10000000D+00 0.10156695D+02 0.34557382D-01
+ -.10000000D+00 0.18041124D-15 0.10095627D+02 0.40192177D-01
+ 0.70776718D-15 0.10000000D+00 0.10140383D+02 0.38875680D-01
+ 0.10000000D+00 0.20000000D+00 0.10139714D+02 0.35340196D-01
+ 0.20000000D+00 0.30000000D+00 0.10049879D+02 0.34708401D-01
+ 0.30000000D+00 0.40000000D+00 0.99933988D+01 0.35448490D-01
+ 0.40000000D+00 0.50000000D+00 0.98849704D+01 0.35742821D-01
+ 0.50000000D+00 0.60000000D+00 0.97638753D+01 0.37066661D-01
+ 0.60000000D+00 0.70000000D+00 0.95955767D+01 0.33445645D-01
+ 0.70000000D+00 0.80000000D+00 0.94366930D+01 0.33583092D-01
+ 0.80000000D+00 0.90000000D+00 0.92213294D+01 0.35274589D-01
+ 0.90000000D+00 0.10000000D+01 0.90073266D+01 0.38791191D-01
+ 0.10000000D+01 0.11000000D+01 0.88036696D+01 0.33977247D-01
+ 0.11000000D+01 0.12000000D+01 0.84611245D+01 0.32581934D-01
+ 0.12000000D+01 0.13000000D+01 0.82255172D+01 0.32706386D-01
+ 0.13000000D+01 0.14000000D+01 0.79162022D+01 0.30768211D-01
+ 0.14000000D+01 0.15000000D+01 0.75504553D+01 0.32547074D-01
+ 0.15000000D+01 0.16000000D+01 0.71993237D+01 0.29127992D-01
+ 0.16000000D+01 0.17000000D+01 0.68005534D+01 0.32452622D-01
+ 0.17000000D+01 0.18000000D+01 0.64631686D+01 0.27794745D-01
+ 0.18000000D+01 0.19000000D+01 0.60468090D+01 0.29840687D-01
+ 0.19000000D+01 0.20000000D+01 0.56679425D+01 0.30579788D-01
+ 0.20000000D+01 0.21000000D+01 0.52655813D+01 0.33878014D-01
+ 0.21000000D+01 0.22000000D+01 0.48047946D+01 0.24741678D-01
+ 0.22000000D+01 0.23000000D+01 0.44298830D+01 0.22969022D-01
+ 0.23000000D+01 0.24000000D+01 0.40002948D+01 0.23192012D-01
+ 0.24000000D+01 0.25000000D+01 0.35865538D+01 0.20484364D-01
+ 0.25000000D+01 0.26000000D+01 0.32367228D+01 0.19472264D-01
+ 0.26000000D+01 0.27000000D+01 0.28534865D+01 0.17507324D-01
+ 0.27000000D+01 0.28000000D+01 0.24501638D+01 0.18961246D-01
+ 0.28000000D+01 0.29000000D+01 0.21331022D+01 0.16814784D-01
+ 0.29000000D+01 0.30000000D+01 0.18280807D+01 0.14806777D-01
+ 0.30000000D+01 0.31000000D+01 0.15502132D+01 0.13443893D-01
+ 0.31000000D+01 0.32000000D+01 0.12872615D+01 0.11175947D-01
+ 0.32000000D+01 0.33000000D+01 0.10461487D+01 0.10332865D-01
+ 0.33000000D+01 0.34000000D+01 0.84231019D+00 0.87767642D-02
+ 0.34000000D+01 0.35000000D+01 0.64396520D+00 0.88734651D-02
+ 0.35000000D+01 0.36000000D+01 0.49503415D+00 0.60005094D-02
+ 0.36000000D+01 0.37000000D+01 0.35519405D+00 0.49569745D-02
+ 0.37000000D+01 0.38000000D+01 0.25481741D+00 0.33082136D-02
+ 0.38000000D+01 0.39000000D+01 0.16494521D+00 0.24756854D-02
+ 0.39000000D+01 0.40000000D+01 0.10479992D+00 0.31220934D-02
+ 0.40000000D+01 0.41000000D+01 0.52791652D-01 0.90492789D-03
+ 0.41000000D+01 0.42000000D+01 0.23834251D-01 0.42764817D-03
+ 0.42000000D+01 0.43000000D+01 0.77592008D-02 0.16705360D-03
+ 0.43000000D+01 0.44000000D+01 0.14181101D-02 0.39970694D-04
+ 0.44000000D+01 0.45000000D+01 -.15561027D-03 0.11248020D-04
+ 0.45000000D+01 0.46000000D+01 -.10802120D-03 0.51709192D-05
+ 0.46000000D+01 0.47000000D+01 -.23808657D-05 0.97528749D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22622978D-05 0.97665630D-06
+ -.46000000D+01 -.45000000D+01 -.98975994D-04 0.51852916D-05
+ -.45000000D+01 -.44000000D+01 -.16480723D-03 0.11264552D-04
+ -.44000000D+01 -.43000000D+01 0.13543231D-02 0.39080758D-04
+ -.43000000D+01 -.42000000D+01 0.75081431D-02 0.13505578D-03
+ -.42000000D+01 -.41000000D+01 0.21687350D-01 0.42054031D-03
+ -.41000000D+01 -.40000000D+01 0.49618493D-01 0.82101990D-03
+ -.40000000D+01 -.39000000D+01 0.93618873D-01 0.16082841D-02
+ -.39000000D+01 -.38000000D+01 0.15650155D+00 0.24947353D-02
+ -.38000000D+01 -.37000000D+01 0.22769017D+00 0.32781156D-02
+ -.37000000D+01 -.36000000D+01 0.33000668D+00 0.45682910D-02
+ -.36000000D+01 -.35000000D+01 0.43866114D+00 0.58357656D-02
+ -.35000000D+01 -.34000000D+01 0.57297610D+00 0.83134865D-02
+ -.34000000D+01 -.33000000D+01 0.70663642D+00 0.28558652D-01
+ -.33000000D+01 -.32000000D+01 0.98949793D+00 0.42472799D-01
+ -.32000000D+01 -.31000000D+01 0.11205429D+01 0.11614619D-01
+ -.31000000D+01 -.30000000D+01 0.13447567D+01 0.12718777D-01
+ -.30000000D+01 -.29000000D+01 0.16056137D+01 0.13572440D-01
+ -.29000000D+01 -.28000000D+01 0.18739770D+01 0.15094561D-01
+ -.28000000D+01 -.27000000D+01 0.21612263D+01 0.15530496D-01
+ -.27000000D+01 -.26000000D+01 0.24568915D+01 0.18763058D-01
+ -.26000000D+01 -.25000000D+01 0.27278706D+01 0.29972224D-01
+ -.25000000D+01 -.24000000D+01 0.31084260D+01 0.19846111D-01
+ -.24000000D+01 -.23000000D+01 0.34312606D+01 0.24117907D-01
+ -.23000000D+01 -.22000000D+01 0.37582256D+01 0.24461562D-01
+ -.22000000D+01 -.21000000D+01 0.41480333D+01 0.25967363D-01
+ -.21000000D+01 -.20000000D+01 0.45196641D+01 0.26514441D-01
+ -.20000000D+01 -.19000000D+01 0.48445484D+01 0.28348087D-01
+ -.19000000D+01 -.18000000D+01 0.52195565D+01 0.39461179D-01
+ -.18000000D+01 -.17000000D+01 0.55524546D+01 0.28784033D-01
+ -.17000000D+01 -.16000000D+01 0.58300876D+01 0.28360551D-01
+ -.16000000D+01 -.15000000D+01 0.61914186D+01 0.45827225D-01
+ -.15000000D+01 -.14000000D+01 0.64327171D+01 0.38112503D-01
+ -.14000000D+01 -.13000000D+01 0.67065981D+01 0.31527996D-01
+ -.13000000D+01 -.12000000D+01 0.69548964D+01 0.31522715D-01
+ -.12000000D+01 -.11000000D+01 0.72371323D+01 0.33080015D-01
+ -.11000000D+01 -.10000000D+01 0.75101453D+01 0.33225759D-01
+ -.10000000D+01 -.90000000D+00 0.75805257D+01 0.36722614D-01
+ -.90000000D+00 -.80000000D+00 0.78258703D+01 0.32505995D-01
+ -.80000000D+00 -.70000000D+00 0.80190709D+01 0.32733017D-01
+ -.70000000D+00 -.60000000D+00 0.81619839D+01 0.43468418D-01
+ -.60000000D+00 -.50000000D+00 0.82255822D+01 0.43275064D-01
+ -.50000000D+00 -.40000000D+00 0.83488992D+01 0.39559127D-01
+ -.40000000D+00 -.30000000D+00 0.84714625D+01 0.37984017D-01
+ -.30000000D+00 -.20000000D+00 0.85476145D+01 0.37293150D-01
+ -.20000000D+00 -.10000000D+00 0.85803247D+01 0.34184276D-01
+ -.10000000D+00 0.18041124D-15 0.85300389D+01 0.38598248D-01
+ 0.70776718D-15 0.10000000D+00 0.85539722D+01 0.37452492D-01
+ 0.10000000D+00 0.20000000D+00 0.85646098D+01 0.35197728D-01
+ 0.20000000D+00 0.30000000D+00 0.84817354D+01 0.33498573D-01
+ 0.30000000D+00 0.40000000D+00 0.84499923D+01 0.34335685D-01
+ 0.40000000D+00 0.50000000D+00 0.83551581D+01 0.35609173D-01
+ 0.50000000D+00 0.60000000D+00 0.82560940D+01 0.36927712D-01
+ 0.60000000D+00 0.70000000D+00 0.81148993D+01 0.33283320D-01
+ 0.70000000D+00 0.80000000D+00 0.79880815D+01 0.33413569D-01
+ 0.80000000D+00 0.90000000D+00 0.78103974D+01 0.35011508D-01
+ 0.90000000D+00 0.10000000D+01 0.76332309D+01 0.38561903D-01
+ 0.10000000D+01 0.11000000D+01 0.74750550D+01 0.33844187D-01
+ 0.11000000D+01 0.12000000D+01 0.71823573D+01 0.32420214D-01
+ 0.12000000D+01 0.13000000D+01 0.69952206D+01 0.32559193D-01
+ 0.13000000D+01 0.14000000D+01 0.67402515D+01 0.30477515D-01
+ 0.14000000D+01 0.15000000D+01 0.64291526D+01 0.32266230D-01
+ 0.15000000D+01 0.16000000D+01 0.61419491D+01 0.28983847D-01
+ 0.16000000D+01 0.17000000D+01 0.58016058D+01 0.32363450D-01
+ 0.17000000D+01 0.18000000D+01 0.55307285D+01 0.27567329D-01
+ 0.18000000D+01 0.19000000D+01 0.51762412D+01 0.29674864D-01
+ 0.19000000D+01 0.20000000D+01 0.48597465D+01 0.30348089D-01
+ 0.20000000D+01 0.21000000D+01 0.45272710D+01 0.33674371D-01
+ 0.21000000D+01 0.22000000D+01 0.41283165D+01 0.24635349D-01
+ 0.22000000D+01 0.23000000D+01 0.38177297D+01 0.22895060D-01
+ 0.23000000D+01 0.24000000D+01 0.34502354D+01 0.23108679D-01
+ 0.24000000D+01 0.25000000D+01 0.30969283D+01 0.20389903D-01
+ 0.25000000D+01 0.26000000D+01 0.28048522D+01 0.19397130D-01
+ 0.26000000D+01 0.27000000D+01 0.24770387D+01 0.17458622D-01
+ 0.27000000D+01 0.28000000D+01 0.21245702D+01 0.18926167D-01
+ 0.28000000D+01 0.29000000D+01 0.18557385D+01 0.16775123D-01
+ 0.29000000D+01 0.30000000D+01 0.15929152D+01 0.14655026D-01
+ 0.30000000D+01 0.31000000D+01 0.13592470D+01 0.13297557D-01
+ 0.31000000D+01 0.32000000D+01 0.11299546D+01 0.11147070D-01
+ 0.32000000D+01 0.33000000D+01 0.92088906D+00 0.10309410D-01
+ 0.33000000D+01 0.34000000D+01 0.74605376D+00 0.85384170D-02
+ 0.34000000D+01 0.35000000D+01 0.56994321D+00 0.85743167D-02
+ 0.35000000D+01 0.36000000D+01 0.44057092D+00 0.58760384D-02
+ 0.36000000D+01 0.37000000D+01 0.31751338D+00 0.49469175D-02
+ 0.37000000D+01 0.38000000D+01 0.22977173D+00 0.32998221D-02
+ 0.38000000D+01 0.39000000D+01 0.14957484D+00 0.24674700D-02
+ 0.39000000D+01 0.40000000D+01 0.96165573D-01 0.31194902D-02
+ 0.40000000D+01 0.41000000D+01 0.48607963D-01 0.90355035D-03
+ 0.41000000D+01 0.42000000D+01 0.22179625D-01 0.42713025D-03
+ 0.42000000D+01 0.43000000D+01 0.72827042D-02 0.16689265D-03
+ 0.43000000D+01 0.44000000D+01 0.13480453D-02 0.39939034D-04
+ 0.44000000D+01 0.45000000D+01 -.14621179D-03 0.11245380D-04
+ 0.45000000D+01 0.46000000D+01 -.10442386D-03 0.51693902D-05
+ 0.46000000D+01 0.47000000D+01 -.23517510D-05 0.97528210D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22791203D-05 0.97665939D-06
+ -.46000000D+01 -.45000000D+01 -.10109962D-03 0.51858872D-05
+ -.45000000D+01 -.44000000D+01 -.17055469D-03 0.11267945D-04
+ -.44000000D+01 -.43000000D+01 0.13946289D-02 0.39092205D-04
+ -.43000000D+01 -.42000000D+01 0.77917968D-02 0.13515030D-03
+ -.42000000D+01 -.41000000D+01 0.22673490D-01 0.42080730D-03
+ -.41000000D+01 -.40000000D+01 0.52098799D-01 0.82196291D-03
+ -.40000000D+01 -.39000000D+01 0.98780784D-01 0.16097640D-02
+ -.39000000D+01 -.38000000D+01 0.16576067D+00 0.24965477D-02
+ -.38000000D+01 -.37000000D+01 0.24268715D+00 0.32808854D-02
+ -.37000000D+01 -.36000000D+01 0.35269585D+00 0.45728850D-02
+ -.36000000D+01 -.35000000D+01 0.47099125D+00 0.58407947D-02
+ -.35000000D+01 -.34000000D+01 0.61722606D+00 0.83189690D-02
+ -.34000000D+01 -.33000000D+01 0.76216118D+00 0.31207105D-01
+ -.33000000D+01 -.32000000D+01 0.10670935D+01 0.44290407D-01
+ -.32000000D+01 -.31000000D+01 0.12138465D+01 0.11679844D-01
+ -.31000000D+01 -.30000000D+01 0.14606350D+01 0.12778070D-01
+ -.30000000D+01 -.29000000D+01 0.17450615D+01 0.13608400D-01
+ -.29000000D+01 -.28000000D+01 0.20391514D+01 0.15132766D-01
+ -.28000000D+01 -.27000000D+01 0.23551035D+01 0.15556975D-01
+ -.27000000D+01 -.26000000D+01 0.26814347D+01 0.18781012D-01
+ -.26000000D+01 -.25000000D+01 0.29841239D+01 0.29986789D-01
+ -.25000000D+01 -.24000000D+01 0.33996523D+01 0.19907013D-01
+ -.24000000D+01 -.23000000D+01 0.37572716D+01 0.24185138D-01
+ -.23000000D+01 -.22000000D+01 0.41199501D+01 0.24484682D-01
+ -.22000000D+01 -.21000000D+01 0.45470074D+01 0.25991745D-01
+ -.21000000D+01 -.20000000D+01 0.49578497D+01 0.26539468D-01
+ -.20000000D+01 -.19000000D+01 0.53208119D+01 0.28382912D-01
+ -.19000000D+01 -.18000000D+01 0.57321363D+01 0.39489017D-01
+ -.18000000D+01 -.17000000D+01 0.61038268D+01 0.28823636D-01
+ -.17000000D+01 -.16000000D+01 0.64171105D+01 0.28426286D-01
+ -.16000000D+01 -.15000000D+01 0.68160234D+01 0.46140093D-01
+ -.15000000D+01 -.14000000D+01 0.70863435D+01 0.38488786D-01
+ -.14000000D+01 -.13000000D+01 0.73972258D+01 0.31611138D-01
+ -.13000000D+01 -.12000000D+01 0.76739465D+01 0.31603498D-01
+ -.12000000D+01 -.11000000D+01 0.79857535D+01 0.33124972D-01
+ -.11000000D+01 -.10000000D+01 0.82874805D+01 0.33259120D-01
+ -.10000000D+01 -.90000000D+00 0.83821549D+01 0.36790228D-01
+ -.90000000D+00 -.80000000D+00 0.86496593D+01 0.32581790D-01
+ -.80000000D+00 -.70000000D+00 0.88633570D+01 0.32787830D-01
+ -.70000000D+00 -.60000000D+00 0.90244030D+01 0.43550963D-01
+ -.60000000D+00 -.50000000D+00 0.91042798D+01 0.43366934D-01
+ -.50000000D+00 -.40000000D+00 0.92404996D+01 0.39585390D-01
+ -.40000000D+00 -.30000000D+00 0.93738871D+01 0.38034096D-01
+ -.30000000D+00 -.20000000D+00 0.94565371D+01 0.37337866D-01
+ -.20000000D+00 -.10000000D+00 0.94962467D+01 0.34281012D-01
+ -.10000000D+00 0.18041124D-15 0.94442952D+01 0.38853340D-01
+ 0.70776718D-15 0.10000000D+00 0.94735872D+01 0.37681223D-01
+ 0.10000000D+00 0.20000000D+00 0.94800603D+01 0.35250914D-01
+ 0.20000000D+00 0.30000000D+00 0.93922809D+01 0.33724937D-01
+ 0.30000000D+00 0.40000000D+00 0.93497923D+01 0.34541743D-01
+ 0.40000000D+00 0.50000000D+00 0.92460155D+01 0.35660083D-01
+ 0.50000000D+00 0.60000000D+00 0.91341270D+01 0.36983956D-01
+ 0.60000000D+00 0.70000000D+00 0.89778560D+01 0.33345750D-01
+ 0.70000000D+00 0.80000000D+00 0.88330106D+01 0.33463128D-01
+ 0.80000000D+00 0.90000000D+00 0.86340559D+01 0.35094530D-01
+ 0.90000000D+00 0.10000000D+01 0.84353653D+01 0.38642915D-01
+ 0.10000000D+01 0.11000000D+01 0.82518404D+01 0.33894577D-01
+ 0.11000000D+01 0.12000000D+01 0.79310519D+01 0.32477255D-01
+ 0.12000000D+01 0.13000000D+01 0.77158070D+01 0.32606723D-01
+ 0.13000000D+01 0.14000000D+01 0.74294058D+01 0.30581113D-01
+ 0.14000000D+01 0.15000000D+01 0.70867531D+01 0.32372752D-01
+ 0.15000000D+01 0.16000000D+01 0.67638198D+01 0.29040234D-01
+ 0.16000000D+01 0.17000000D+01 0.63889131D+01 0.32397604D-01
+ 0.17000000D+01 0.18000000D+01 0.60806203D+01 0.27655844D-01
+ 0.18000000D+01 0.19000000D+01 0.56895472D+01 0.29736836D-01
+ 0.19000000D+01 0.20000000D+01 0.53363544D+01 0.30442167D-01
+ 0.20000000D+01 0.21000000D+01 0.49642019D+01 0.33751857D-01
+ 0.21000000D+01 0.22000000D+01 0.45281864D+01 0.24668507D-01
+ 0.22000000D+01 0.23000000D+01 0.41802146D+01 0.22922805D-01
+ 0.23000000D+01 0.24000000D+01 0.37763202D+01 0.23141377D-01
+ 0.24000000D+01 0.25000000D+01 0.33875855D+01 0.20423409D-01
+ 0.25000000D+01 0.26000000D+01 0.30615278D+01 0.19425531D-01
+ 0.26000000D+01 0.27000000D+01 0.27010880D+01 0.17478099D-01
+ 0.27000000D+01 0.28000000D+01 0.23184543D+01 0.18941549D-01
+ 0.28000000D+01 0.29000000D+01 0.20211306D+01 0.16790963D-01
+ 0.29000000D+01 0.30000000D+01 0.17328221D+01 0.14697979D-01
+ 0.30000000D+01 0.31000000D+01 0.14738978D+01 0.13336790D-01
+ 0.31000000D+01 0.32000000D+01 0.12239872D+01 0.11159000D-01
+ 0.32000000D+01 0.33000000D+01 0.99588151D+00 0.10319001D-01
+ 0.33000000D+01 0.34000000D+01 0.80404532D+00 0.86061495D-02
+ 0.34000000D+01 0.35000000D+01 0.61425919D+00 0.86596619D-02
+ 0.35000000D+01 0.36000000D+01 0.47313302D+00 0.59141491D-02
+ 0.36000000D+01 0.37000000D+01 0.34014838D+00 0.49512019D-02
+ 0.37000000D+01 0.38000000D+01 0.24481519D+00 0.33035603D-02
+ 0.38000000D+01 0.39000000D+01 0.15881847D+00 0.24711940D-02
+ 0.39000000D+01 0.40000000D+01 0.10133390D+00 0.31206367D-02
+ 0.40000000D+01 0.41000000D+01 0.51108066D-01 0.90419770D-03
+ 0.41000000D+01 0.42000000D+01 0.23164999D-01 0.42737163D-03
+ 0.42000000D+01 0.43000000D+01 0.75651296D-02 0.16696863D-03
+ 0.43000000D+01 0.44000000D+01 0.13886916D-02 0.39953354D-04
+ 0.44000000D+01 0.45000000D+01 -.15202683D-03 0.11246661D-04
+ 0.45000000D+01 0.46000000D+01 -.10656130D-03 0.51701515D-05
+ 0.46000000D+01 0.47000000D+01 -.23686097D-05 0.97528489D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22884305D-05 0.97666106D-06
+ -.46000000D+01 -.45000000D+01 -.10235340D-03 0.51862239D-05
+ -.45000000D+01 -.44000000D+01 -.17420647D-03 0.11269909D-04
+ -.44000000D+01 -.43000000D+01 0.14193173D-02 0.39098655D-04
+ -.43000000D+01 -.42000000D+01 0.79732313D-02 0.13520780D-03
+ -.42000000D+01 -.41000000D+01 0.23321433D-01 0.42096905D-03
+ -.41000000D+01 -.40000000D+01 0.53764419D-01 0.82258663D-03
+ -.40000000D+01 -.39000000D+01 0.10232382D+00 0.16107008D-02
+ -.39000000D+01 -.38000000D+01 0.17224067D+00 0.24976663D-02
+ -.38000000D+01 -.37000000D+01 0.25338295D+00 0.32826392D-02
+ -.37000000D+01 -.36000000D+01 0.36912398D+00 0.45759695D-02
+ -.36000000D+01 -.35000000D+01 0.49479741D+00 0.58442353D-02
+ -.35000000D+01 -.34000000D+01 0.65018481D+00 0.83233798D-02
+ -.34000000D+01 -.33000000D+01 0.80437364D+00 0.32855830D-01
+ -.33000000D+01 -.32000000D+01 0.11257448D+01 0.45462554D-01
+ -.32000000D+01 -.31000000D+01 0.12854420D+01 0.11763823D-01
+ -.31000000D+01 -.30000000D+01 0.15505089D+01 0.12854176D-01
+ -.30000000D+01 -.29000000D+01 0.18538926D+01 0.13634187D-01
+ -.29000000D+01 -.28000000D+01 0.21690482D+01 0.15161892D-01
+ -.28000000D+01 -.27000000D+01 0.25084617D+01 0.15578222D-01
+ -.27000000D+01 -.26000000D+01 0.28600768D+01 0.18795174D-01
+ -.26000000D+01 -.25000000D+01 0.31889723D+01 0.29998044D-01
+ -.25000000D+01 -.24000000D+01 0.36336775D+01 0.19968507D-01
+ -.24000000D+01 -.23000000D+01 0.40204364D+01 0.24249708D-01
+ -.23000000D+01 -.22000000D+01 0.44131253D+01 0.24503637D-01
+ -.22000000D+01 -.21000000D+01 0.48715620D+01 0.26010560D-01
+ -.21000000D+01 -.20000000D+01 0.53157593D+01 0.26559675D-01
+ -.20000000D+01 -.19000000D+01 0.57110946D+01 0.28410519D-01
+ -.19000000D+01 -.18000000D+01 0.61533921D+01 0.39509832D-01
+ -.18000000D+01 -.17000000D+01 0.65586895D+01 0.28860968D-01
+ -.17000000D+01 -.16000000D+01 0.69022205D+01 0.28486189D-01
+ -.16000000D+01 -.15000000D+01 0.73341063D+01 0.46406455D-01
+ -.15000000D+01 -.14000000D+01 0.76296339D+01 0.38804189D-01
+ -.14000000D+01 -.13000000D+01 0.79729092D+01 0.31699927D-01
+ -.13000000D+01 -.12000000D+01 0.82743247D+01 0.31686084D-01
+ -.12000000D+01 -.11000000D+01 0.86122385D+01 0.33164733D-01
+ -.11000000D+01 -.10000000D+01 0.89391830D+01 0.33287539D-01
+ -.10000000D+01 -.90000000D+00 0.90551645D+01 0.36853652D-01
+ -.90000000D+00 -.80000000D+00 0.93424784D+01 0.32650329D-01
+ -.80000000D+00 -.70000000D+00 0.95742357D+01 0.32838535D-01
+ -.70000000D+00 -.60000000D+00 0.97511593D+01 0.43659016D-01
+ -.60000000D+00 -.50000000D+00 0.98462619D+01 0.43484370D-01
+ -.50000000D+00 -.40000000D+00 0.99936835D+01 0.39601233D-01
+ -.40000000D+00 -.30000000D+00 0.10136505D+02 0.38079437D-01
+ -.30000000D+00 -.20000000D+00 0.10225530D+02 0.37387211D-01
+ -.20000000D+00 -.10000000D+00 0.10271173D+02 0.34411392D-01
+ -.10000000D+00 0.18041124D-15 0.10215701D+02 0.39445229D-01
+ 0.70776718D-15 0.10000000D+00 0.10253274D+02 0.38203795D-01
+ 0.10000000D+00 0.20000000D+00 0.10254648D+02 0.35296375D-01
+ 0.20000000D+00 0.30000000D+00 0.10163025D+02 0.34148577D-01
+ 0.30000000D+00 0.40000000D+00 0.10109544D+02 0.34929699D-01
+ 0.40000000D+00 0.50000000D+00 0.99983214D+01 0.35700642D-01
+ 0.50000000D+00 0.60000000D+00 0.98753089D+01 0.37027614D-01
+ 0.60000000D+00 0.70000000D+00 0.97053940D+01 0.33394692D-01
+ 0.70000000D+00 0.80000000D+00 0.95442073D+01 0.33519697D-01
+ 0.80000000D+00 0.90000000D+00 0.93268594D+01 0.35180792D-01
+ 0.90000000D+00 0.10000000D+01 0.91091500D+01 0.38716615D-01
+ 0.10000000D+01 0.11000000D+01 0.89028986D+01 0.33937460D-01
+ 0.11000000D+01 0.12000000D+01 0.85574792D+01 0.32529853D-01
+ 0.12000000D+01 0.13000000D+01 0.83174697D+01 0.32654700D-01
+ 0.13000000D+01 0.14000000D+01 0.80039509D+01 0.30676457D-01
+ 0.14000000D+01 0.15000000D+01 0.76335155D+01 0.32464316D-01
+ 0.15000000D+01 0.16000000D+01 0.72792945D+01 0.29086821D-01
+ 0.16000000D+01 0.17000000D+01 0.68748048D+01 0.32424544D-01
+ 0.17000000D+01 0.18000000D+01 0.65338268D+01 0.27729470D-01
+ 0.18000000D+01 0.19000000D+01 0.61115300D+01 0.29790277D-01
+ 0.19000000D+01 0.20000000D+01 0.57269312D+01 0.30516699D-01
+ 0.20000000D+01 0.21000000D+01 0.53206925D+01 0.33817454D-01
+ 0.21000000D+01 0.22000000D+01 0.48536923D+01 0.24703969D-01
+ 0.22000000D+01 0.23000000D+01 0.44740883D+01 0.22946001D-01
+ 0.23000000D+01 0.24000000D+01 0.40395115D+01 0.23169656D-01
+ 0.24000000D+01 0.25000000D+01 0.36210650D+01 0.20454743D-01
+ 0.25000000D+01 0.26000000D+01 0.32667547D+01 0.19449377D-01
+ 0.26000000D+01 0.27000000D+01 0.28793332D+01 0.17492647D-01
+ 0.27000000D+01 0.28000000D+01 0.24718202D+01 0.18952670D-01
+ 0.28000000D+01 0.29000000D+01 0.21511576D+01 0.16803051D-01
+ 0.29000000D+01 0.30000000D+01 0.18421979D+01 0.14749516D-01
+ 0.30000000D+01 0.31000000D+01 0.15626080D+01 0.13386866D-01
+ 0.31000000D+01 0.32000000D+01 0.12962566D+01 0.11167551D-01
+ 0.32000000D+01 0.33000000D+01 0.10529686D+01 0.10325730D-01
+ 0.33000000D+01 0.34000000D+01 0.84765699D+00 0.86890891D-02
+ 0.34000000D+01 0.35000000D+01 0.64731347D+00 0.87643206D-02
+ 0.35000000D+01 0.36000000D+01 0.49712549D+00 0.59570746D-02
+ 0.36000000D+01 0.37000000D+01 0.35656379D+00 0.49540627D-02
+ 0.37000000D+01 0.38000000D+01 0.25553543D+00 0.33059411D-02
+ 0.38000000D+01 0.39000000D+01 0.16528470D+00 0.24735685D-02
+ 0.39000000D+01 0.40000000D+01 0.10488172D+00 0.31214191D-02
+ 0.40000000D+01 0.41000000D+01 0.52788293D-01 0.90458390D-03
+ 0.41000000D+01 0.42000000D+01 0.23812592D-01 0.42751310D-03
+ 0.42000000D+01 0.43000000D+01 0.77457672D-02 0.16701260D-03
+ 0.43000000D+01 0.44000000D+01 0.14136240D-02 0.39962132D-04
+ 0.44000000D+01 0.45000000D+01 -.15571573D-03 0.11247373D-04
+ 0.45000000D+01 0.46000000D+01 -.10782276D-03 0.51705720D-05
+ 0.46000000D+01 0.47000000D+01 -.23779416D-05 0.97528639D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 -.22929162D-05 0.97666185D-06
+ -.46000000D+01 -.45000000D+01 -.10298403D-03 0.51863890D-05
+ -.45000000D+01 -.44000000D+01 -.17614687D-03 0.11270881D-04
+ -.44000000D+01 -.43000000D+01 0.14320471D-02 0.39101820D-04
+ -.43000000D+01 -.42000000D+01 0.80701614D-02 0.13523744D-03
+ -.42000000D+01 -.41000000D+01 0.23675322D-01 0.42105402D-03
+ -.41000000D+01 -.40000000D+01 0.54690923D-01 0.82292708D-03
+ -.40000000D+01 -.39000000D+01 0.10433097D+00 0.16111998D-02
+ -.39000000D+01 -.38000000D+01 0.17597373D+00 0.24982651D-02
+ -.38000000D+01 -.37000000D+01 0.25964718D+00 0.32835971D-02
+ -.37000000D+01 -.36000000D+01 0.37887429D+00 0.45777420D-02
+ -.36000000D+01 -.35000000D+01 0.50915185D+00 0.58462124D-02
+ -.35000000D+01 -.34000000D+01 0.67026472D+00 0.83264309D-02
+ -.34000000D+01 -.33000000D+01 0.83057416D+00 0.33701467D-01
+ -.33000000D+01 -.32000000D+01 0.11620722D+01 0.46074815D-01
+ -.32000000D+01 -.31000000D+01 0.13304095D+01 0.11838351D-01
+ -.31000000D+01 -.30000000D+01 0.16075082D+01 0.12921888D-01
+ -.30000000D+01 -.29000000D+01 0.19234108D+01 0.13649369D-01
+ -.29000000D+01 -.28000000D+01 0.22527084D+01 0.15179626D-01
+ -.28000000D+01 -.27000000D+01 0.26078464D+01 0.15592635D-01
+ -.27000000D+01 -.26000000D+01 0.29765522D+01 0.18804887D-01
+ -.26000000D+01 -.25000000D+01 0.33232904D+01 0.30005852D-01
+ -.25000000D+01 -.24000000D+01 0.37879513D+01 0.20014143D-01
+ -.24000000D+01 -.23000000D+01 0.41949158D+01 0.24297285D-01
+ -.23000000D+01 -.22000000D+01 0.46082655D+01 0.24517724D-01
+ -.22000000D+01 -.21000000D+01 0.50885129D+01 0.26024397D-01
+ -.21000000D+01 -.20000000D+01 0.55561004D+01 0.26574937D-01
+ -.20000000D+01 -.19000000D+01 0.59740882D+01 0.28429761D-01
+ -.19000000D+01 -.18000000D+01 0.64383191D+01 0.39522947D-01
+ -.18000000D+01 -.17000000D+01 0.68674421D+01 0.28891626D-01
+ -.17000000D+01 -.16000000D+01 0.72322887D+01 0.28535155D-01
+ -.16000000D+01 -.15000000D+01 0.76880149D+01 0.46576820D-01
+ -.15000000D+01 -.14000000D+01 0.80016859D+01 0.39001233D-01
+ -.14000000D+01 -.13000000D+01 0.83682433D+01 0.31773710D-01
+ -.13000000D+01 -.12000000D+01 0.86875630D+01 0.31753524D-01
+ -.12000000D+01 -.11000000D+01 0.90445692D+01 0.33197245D-01
+ -.11000000D+01 -.10000000D+01 0.93897289D+01 0.33310281D-01
+ -.10000000D+01 -.90000000D+00 0.95212371D+01 0.36903370D-01
+ -.90000000D+00 -.80000000D+00 0.98232693D+01 0.32702342D-01
+ -.80000000D+00 -.70000000D+00 0.10068207D+02 0.32877787D-01
+ -.70000000D+00 -.60000000D+00 0.10256665D+02 0.43766428D-01
+ -.60000000D+00 -.50000000D+00 0.10363391D+02 0.43598736D-01
+ -.50000000D+00 -.40000000D+00 0.10518940D+02 0.39610176D-01
+ -.40000000D+00 -.30000000D+00 0.10668634D+02 0.38114723D-01
+ -.30000000D+00 -.20000000D+00 0.10762925D+02 0.37460605D-01
+ -.20000000D+00 -.10000000D+00 0.10812309D+02 0.34575884D-01
+ -.10000000D+00 0.18041124D-15 0.10752141D+02 0.40612905D-01
+ 0.70776718D-15 0.10000000D+00 0.10800281D+02 0.39287265D-01
+ 0.10000000D+00 0.20000000D+00 0.10795702D+02 0.35331135D-01
+ 0.20000000D+00 0.30000000D+00 0.10701821D+02 0.34713468D-01
+ 0.30000000D+00 0.40000000D+00 0.10639087D+02 0.35454414D-01
+ 0.40000000D+00 0.50000000D+00 0.10522825D+02 0.35728262D-01
+ 0.50000000D+00 0.60000000D+00 0.10391844D+02 0.37057119D-01
+ 0.60000000D+00 0.70000000D+00 0.10211518D+02 0.33429368D-01
+ 0.70000000D+00 0.80000000D+00 0.10038041D+02 0.33590587D-01
+ 0.80000000D+00 0.90000000D+00 0.98078716D+01 0.35277922D-01
+ 0.90000000D+00 0.10000000D+01 0.95760067D+01 0.38778826D-01
+ 0.10000000D+01 0.11000000D+01 0.93529500D+01 0.33967149D-01
+ 0.11000000D+01 0.12000000D+01 0.89896350D+01 0.32571895D-01
+ 0.12000000D+01 0.13000000D+01 0.87315404D+01 0.32698490D-01
+ 0.13000000D+01 0.14000000D+01 0.83987864D+01 0.30747021D-01
+ 0.14000000D+01 0.15000000D+01 0.80079498D+01 0.32525996D-01
+ 0.15000000D+01 0.16000000D+01 0.76312025D+01 0.29120807D-01
+ 0.16000000D+01 0.17000000D+01 0.72057747D+01 0.32442092D-01
+ 0.17000000D+01 0.18000000D+01 0.68412503D+01 0.27779273D-01
+ 0.18000000D+01 0.19000000D+01 0.63968887D+01 0.29828505D-01
+ 0.19000000D+01 0.20000000D+01 0.59902373D+01 0.30564535D-01
+ 0.20000000D+01 0.21000000D+01 0.55597779D+01 0.33863696D-01
+ 0.21000000D+01 0.22000000D+01 0.50714651D+01 0.24736851D-01
+ 0.22000000D+01 0.23000000D+01 0.46698010D+01 0.22963134D-01
+ 0.23000000D+01 0.24000000D+01 0.42138996D+01 0.23191061D-01
+ 0.24000000D+01 0.25000000D+01 0.37749625D+01 0.20480285D-01
+ 0.25000000D+01 0.26000000D+01 0.34013079D+01 0.19466245D-01
+ 0.26000000D+01 0.27000000D+01 0.29956214D+01 0.17501862D-01
+ 0.27000000D+01 0.28000000D+01 0.25712006D+01 0.18959487D-01
+ 0.28000000D+01 0.29000000D+01 0.22348780D+01 0.16811164D-01
+ 0.29000000D+01 0.30000000D+01 0.19121394D+01 0.14794851D-01
+ 0.30000000D+01 0.31000000D+01 0.16188010D+01 0.13432417D-01
+ 0.31000000D+01 0.32000000D+01 0.13416831D+01 0.11172768D-01
+ 0.32000000D+01 0.33000000D+01 0.10885153D+01 0.10329751D-01
+ 0.33000000D+01 0.34000000D+01 0.87450964D+00 0.87576605D-02
+ 0.34000000D+01 0.35000000D+01 0.66747798D+00 0.88501917D-02
+ 0.35000000D+01 0.36000000D+01 0.51158914D+00 0.59905591D-02
+ 0.36000000D+01 0.37000000D+01 0.36632273D+00 0.49556927D-02
+ 0.37000000D+01 0.38000000D+01 0.26180935D+00 0.33072458D-02
+ 0.38000000D+01 0.39000000D+01 0.16900914D+00 0.24748401D-02
+ 0.39000000D+01 0.40000000D+01 0.10689159D+00 0.31218580D-02
+ 0.40000000D+01 0.41000000D+01 0.53723373D-01 0.90478247D-03
+ 0.41000000D+01 0.42000000D+01 0.24166363D-01 0.42758480D-03
+ 0.42000000D+01 0.43000000D+01 0.78422643D-02 0.16703464D-03
+ 0.43000000D+01 0.44000000D+01 0.14264927D-02 0.39966752D-04
+ 0.44000000D+01 0.45000000D+01 -.15767372D-03 0.11247714D-04
+ 0.45000000D+01 0.46000000D+01 -.10845708D-03 0.51707742D-05
+ 0.46000000D+01 0.47000000D+01 -.23824381D-05 0.97528710D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 0.15399351D+01 0.11971111D-01
+ 0.30000000D+01 0.60000000D+01 -.28201647D+01 0.95492532D-02
+ 0.60000000D+01 0.90000000D+01 0.12401014D+01 0.32739749D-02
+ 0.90000000D+01 0.12000000D+02 0.15950192D+01 0.27154952D-02
+ 0.12000000D+02 0.15000000D+02 0.14861865D+01 0.24880127D-02
+ 0.15000000D+02 0.18000000D+02 0.13036983D+01 0.21451249D-02
+ 0.18000000D+02 0.21000000D+02 0.11306564D+01 0.20387069D-02
+ 0.21000000D+02 0.24000000D+02 0.97806437D+00 0.18713097D-02
+ 0.24000000D+02 0.27000000D+02 0.85687793D+00 0.16670972D-02
+ 0.27000000D+02 0.30000000D+02 0.75677085D+00 0.15791143D-02
+ 0.30000000D+02 0.33000000D+02 0.66828557D+00 0.15035750D-02
+ 0.33000000D+02 0.36000000D+02 0.59653471D+00 0.14524657D-02
+ 0.36000000D+02 0.39000000D+02 0.53305306D+00 0.18360301D-02
+ 0.39000000D+02 0.42000000D+02 0.47841037D+00 0.17666000D-02
+ 0.42000000D+02 0.45000000D+02 0.43441834D+00 0.10903232D-02
+ 0.45000000D+02 0.48000000D+02 0.39158142D+00 0.11580290D-02
+ 0.48000000D+02 0.51000000D+02 0.35704879D+00 0.11553199D-02
+ 0.51000000D+02 0.54000000D+02 0.32623903D+00 0.10703118D-02
+ 0.54000000D+02 0.57000000D+02 0.29777963D+00 0.99146327D-03
+ 0.57000000D+02 0.60000000D+02 0.27207820D+00 0.99039114D-03
+ 0.60000000D+02 0.63000000D+02 0.25319937D+00 0.14020592D-02
+ 0.63000000D+02 0.66000000D+02 0.22873052D+00 0.12857924D-02
+ 0.66000000D+02 0.69000000D+02 0.21198253D+00 0.77768666D-03
+ 0.69000000D+02 0.72000000D+02 0.19682149D+00 0.75340351D-03
+ 0.72000000D+02 0.75000000D+02 0.18215394D+00 0.16647829D-02
+ 0.75000000D+02 0.78000000D+02 0.16674520D+00 0.17235816D-02
+ 0.78000000D+02 0.81000000D+02 0.15670434D+00 0.90430079D-03
+ 0.81000000D+02 0.84000000D+02 0.14328294D+00 0.87424157D-03
+ 0.84000000D+02 0.87000000D+02 0.13550165D+00 0.10275513D-02
+ 0.87000000D+02 0.90000000D+02 0.12484814D+00 0.10377856D-02
+ 0.90000000D+02 0.93000000D+02 0.11498270D+00 0.78768102D-03
+ 0.93000000D+02 0.96000000D+02 0.10791851D+00 0.48732021D-03
+ 0.96000000D+02 0.99000000D+02 0.10230041D+00 0.56830635D-03
+ 0.99000000D+02 0.10200000D+03 0.93010240D-01 0.10935976D-02
+ 0.10200000D+03 0.10500000D+03 0.87824491D-01 0.10570445D-02
+ 0.10500000D+03 0.10800000D+03 0.82724259D-01 0.94565914D-03
+ 0.10800000D+03 0.11100000D+03 0.77325537D-01 0.93974076D-03
+ 0.11100000D+03 0.11400000D+03 0.72605947D-01 0.57302517D-03
+ 0.11400000D+03 0.11700000D+03 0.67495461D-01 0.72983046D-03
+ 0.11700000D+03 0.12000000D+03 0.63389298D-01 0.67506700D-03
+ 0.12000000D+03 0.12300000D+03 0.59689291D-01 0.73631878D-03
+ 0.12300000D+03 0.12600000D+03 0.55217383D-01 0.67872651D-03
+ 0.12600000D+03 0.12900000D+03 0.52588178D-01 0.40249100D-03
+ 0.12900000D+03 0.13200000D+03 0.50381569D-01 0.43583078D-03
+ 0.13200000D+03 0.13500000D+03 0.46151463D-01 0.37741254D-03
+ 0.13500000D+03 0.13800000D+03 0.43907279D-01 0.35651998D-03
+ 0.13800000D+03 0.14100000D+03 0.41255991D-01 0.46011070D-03
+ 0.14100000D+03 0.14400000D+03 0.39087407D-01 0.41525044D-03
+ 0.14400000D+03 0.14700000D+03 0.36723981D-01 0.26810540D-03
+ 0.14700000D+03 0.15000000D+03 0.34699216D-01 0.28957964D-03
+ 0.15000000D+03 0.15300000D+03 0.32356194D-01 0.27945314D-03
+ 0.15300000D+03 0.15600000D+03 0.32442916D-01 0.15349286D-02
+ 0.15600000D+03 0.15900000D+03 0.30964336D-01 0.34515265D-02
+ 0.15900000D+03 0.16200000D+03 0.23827030D-01 0.31047125D-02
+ 0.16200000D+03 0.16500000D+03 0.26168194D-01 0.31156955D-03
+ 0.16500000D+03 0.16800000D+03 0.24357198D-01 0.37624710D-03
+ 0.16800000D+03 0.17100000D+03 0.23747990D-01 0.33635215D-03
+ 0.17100000D+03 0.17400000D+03 0.21985347D-01 0.26964801D-03
+ 0.17400000D+03 0.17700000D+03 0.20654975D-01 0.26796876D-03
+ 0.17700000D+03 0.18000000D+03 0.19683326D-01 0.20308457D-03
+ 0.18000000D+03 0.18300000D+03 0.18155060D-01 0.28620644D-03
+ 0.18300000D+03 0.18600000D+03 0.16729888D-01 0.12209653D-02
+ 0.18600000D+03 0.18900000D+03 0.17898146D-01 0.12120873D-02
+ 0.18900000D+03 0.19200000D+03 0.15445357D-01 0.39838072D-03
+ 0.19200000D+03 0.19500000D+03 0.15307164D-01 0.40376890D-03
+ 0.19500000D+03 0.19800000D+03 0.13667019D-01 0.27769223D-03
+ 0.19800000D+03 0.20100000D+03 0.13500179D-01 0.21670556D-03
+ 0.20100000D+03 0.20400000D+03 0.12945789D-01 0.16942031D-03
+ 0.20400000D+03 0.20700000D+03 0.11686733D-01 0.16283205D-03
+ 0.20700000D+03 0.21000000D+03 0.11353930D-01 0.15017881D-03
+ 0.21000000D+03 0.21300000D+03 0.10960825D-01 0.17810868D-03
+ 0.21300000D+03 0.21600000D+03 0.98421346D-02 0.21087296D-03
+ 0.21600000D+03 0.21900000D+03 0.97723364D-02 0.18566309D-03
+ 0.21900000D+03 0.22200000D+03 0.88137663D-02 0.25837855D-03
+ 0.22200000D+03 0.22500000D+03 0.88389860D-02 0.27882472D-03
+ 0.22500000D+03 0.22800000D+03 0.84755174D-02 0.46339351D-03
+ 0.22800000D+03 0.23100000D+03 0.72863763D-02 0.47218340D-03
+ 0.23100000D+03 0.23400000D+03 0.71349658D-02 0.34702831D-03
+ 0.23400000D+03 0.23700000D+03 0.72640913D-02 0.33068804D-03
+ 0.23700000D+03 0.24000000D+03 0.62829164D-02 0.18857076D-03
+ 0.24000000D+03 0.24300000D+03 0.64685185D-02 0.15996347D-03
+ 0.24300000D+03 0.24600000D+03 0.56689207D-02 0.14080085D-03
+ 0.24600000D+03 0.24900000D+03 0.56097132D-02 0.14761566D-03
+ 0.24900000D+03 0.25200000D+03 0.51809433D-02 0.25926700D-03
+ 0.25200000D+03 0.25500000D+03 0.50555967D-02 0.26791786D-03
+ 0.25500000D+03 0.25800000D+03 0.49512929D-02 0.21963732D-03
+ 0.25800000D+03 0.26100000D+03 0.43538603D-02 0.19615264D-03
+ 0.26100000D+03 0.26400000D+03 0.42729383D-02 0.11960844D-03
+ 0.26400000D+03 0.26700000D+03 0.39146649D-02 0.15601266D-03
+ 0.26700000D+03 0.27000000D+03 0.37169929D-02 0.15456072D-03
+ 0.27000000D+03 0.27300000D+03 0.34222310D-02 0.24631321D-03
+ 0.27300000D+03 0.27600000D+03 0.35827025D-02 0.24593915D-03
+ 0.27600000D+03 0.27900000D+03 0.33153285D-02 0.12558130D-03
+ 0.27900000D+03 0.28200000D+03 0.28572672D-02 0.13778738D-03
+ 0.28200000D+03 0.28500000D+03 0.27455309D-02 0.12422185D-03
+ 0.28500000D+03 0.28800000D+03 0.28078926D-02 0.10433318D-03
+ 0.28800000D+03 0.29100000D+03 0.24487589D-02 0.22152038D-03
+ 0.29100000D+03 0.29400000D+03 0.25340904D-02 0.22572969D-03
+ 0.29400000D+03 0.29700000D+03 0.22717565D-02 0.14152940D-03
+ 0.29700000D+03 0.30000000D+03 0.21782692D-02 0.13284141D-03
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 0.15457115D+01 0.11966893D-01
+ 0.30000000D+01 0.60000000D+01 -.28177452D+01 0.95424104D-02
+ 0.60000000D+01 0.90000000D+01 0.12353628D+01 0.32630804D-02
+ 0.90000000D+01 0.12000000D+02 0.15837830D+01 0.26963557D-02
+ 0.12000000D+02 0.15000000D+02 0.14690781D+01 0.24597067D-02
+ 0.15000000D+02 0.18000000D+02 0.12814104D+01 0.21092756D-02
+ 0.18000000D+02 0.21000000D+02 0.11038208D+01 0.19894375D-02
+ 0.21000000D+02 0.24000000D+02 0.94740564D+00 0.18146025D-02
+ 0.24000000D+02 0.27000000D+02 0.82270146D+00 0.15997163D-02
+ 0.27000000D+02 0.30000000D+02 0.71942514D+00 0.15022699D-02
+ 0.30000000D+02 0.33000000D+02 0.62842495D+00 0.14132229D-02
+ 0.33000000D+02 0.36000000D+02 0.55435111D+00 0.13506965D-02
+ 0.36000000D+02 0.39000000D+02 0.48908225D+00 0.16791879D-02
+ 0.39000000D+02 0.42000000D+02 0.43300712D+00 0.16049168D-02
+ 0.42000000D+02 0.45000000D+02 0.38753274D+00 0.97359499D-03
+ 0.45000000D+02 0.48000000D+02 0.34402639D+00 0.10150455D-02
+ 0.48000000D+02 0.51000000D+02 0.30869418D+00 0.10009694D-02
+ 0.51000000D+02 0.54000000D+02 0.27736121D+00 0.90847472D-03
+ 0.54000000D+02 0.57000000D+02 0.24877973D+00 0.83079193D-03
+ 0.57000000D+02 0.60000000D+02 0.22323377D+00 0.80981389D-03
+ 0.60000000D+02 0.63000000D+02 0.20387904D+00 0.11254031D-02
+ 0.63000000D+02 0.66000000D+02 0.18065298D+00 0.10209887D-02
+ 0.66000000D+02 0.69000000D+02 0.16415359D+00 0.60337775D-03
+ 0.69000000D+02 0.72000000D+02 0.14935187D+00 0.57059233D-03
+ 0.72000000D+02 0.75000000D+02 0.13537003D+00 0.12271975D-02
+ 0.75000000D+02 0.78000000D+02 0.12132253D+00 0.12626636D-02
+ 0.78000000D+02 0.81000000D+02 0.11158857D+00 0.64573487D-03
+ 0.81000000D+02 0.84000000D+02 0.99822846D-01 0.60760709D-03
+ 0.84000000D+02 0.87000000D+02 0.92316940D-01 0.69935020D-03
+ 0.87000000D+02 0.90000000D+02 0.83158726D-01 0.69192153D-03
+ 0.90000000D+02 0.93000000D+02 0.74868178D-01 0.51629354D-03
+ 0.93000000D+02 0.96000000D+02 0.68685987D-01 0.31045582D-03
+ 0.96000000D+02 0.99000000D+02 0.63607763D-01 0.35222329D-03
+ 0.99000000D+02 0.10200000D+03 0.56498739D-01 0.65909180D-03
+ 0.10200000D+03 0.10500000D+03 0.52113938D-01 0.63300111D-03
+ 0.10500000D+03 0.10800000D+03 0.47944349D-01 0.54315736D-03
+ 0.10800000D+03 0.11100000D+03 0.43757160D-01 0.53662785D-03
+ 0.11100000D+03 0.11400000D+03 0.40119042D-01 0.31511367D-03
+ 0.11400000D+03 0.11700000D+03 0.36411509D-01 0.39316738D-03
+ 0.11700000D+03 0.12000000D+03 0.33389674D-01 0.35696877D-03
+ 0.12000000D+03 0.12300000D+03 0.30691906D-01 0.37670078D-03
+ 0.12300000D+03 0.12600000D+03 0.27723581D-01 0.34357467D-03
+ 0.12600000D+03 0.12900000D+03 0.25782328D-01 0.19693856D-03
+ 0.12900000D+03 0.13200000D+03 0.24110937D-01 0.20850045D-03
+ 0.13200000D+03 0.13500000D+03 0.21560171D-01 0.17711495D-03
+ 0.13500000D+03 0.13800000D+03 0.20026924D-01 0.16207362D-03
+ 0.13800000D+03 0.14100000D+03 0.18374753D-01 0.20433737D-03
+ 0.14100000D+03 0.14400000D+03 0.16998597D-01 0.18174143D-03
+ 0.14400000D+03 0.14700000D+03 0.15594295D-01 0.11395410D-03
+ 0.14700000D+03 0.15000000D+03 0.14389186D-01 0.11982822D-03
+ 0.15000000D+03 0.15300000D+03 0.13106444D-01 0.11358128D-03
+ 0.15300000D+03 0.15600000D+03 0.12831326D-01 0.60050900D-03
+ 0.15600000D+03 0.15900000D+03 0.11947471D-01 0.13243934D-02
+ 0.15900000D+03 0.16200000D+03 0.89849181D-02 0.11857222D-02
+ 0.16200000D+03 0.16500000D+03 0.96569320D-02 0.11488113D-03
+ 0.16500000D+03 0.16800000D+03 0.87834701D-02 0.13519789D-03
+ 0.16800000D+03 0.17100000D+03 0.83686035D-02 0.11930190D-03
+ 0.17100000D+03 0.17400000D+03 0.75707474D-02 0.92452932D-04
+ 0.17400000D+03 0.17700000D+03 0.69523778D-02 0.90599933D-04
+ 0.17700000D+03 0.18000000D+03 0.64776080D-02 0.66861885D-04
+ 0.18000000D+03 0.18300000D+03 0.58426035D-02 0.91546587D-04
+ 0.18300000D+03 0.18600000D+03 0.52698894D-02 0.38023439D-03
+ 0.18600000D+03 0.18900000D+03 0.55117320D-02 0.37688184D-03
+ 0.18900000D+03 0.19200000D+03 0.46494894D-02 0.11926076D-03
+ 0.19200000D+03 0.19500000D+03 0.45074216D-02 0.11947896D-03
+ 0.19500000D+03 0.19800000D+03 0.39381759D-02 0.80132663D-04
+ 0.19800000D+03 0.20100000D+03 0.38074272D-02 0.61340493D-04
+ 0.20100000D+03 0.20400000D+03 0.35715035D-02 0.46753466D-04
+ 0.20400000D+03 0.20700000D+03 0.31555975D-02 0.44010564D-04
+ 0.20700000D+03 0.21000000D+03 0.30025038D-02 0.39759557D-04
+ 0.21000000D+03 0.21300000D+03 0.28373841D-02 0.45939251D-04
+ 0.21300000D+03 0.21600000D+03 0.24952515D-02 0.53454897D-04
+ 0.21600000D+03 0.21900000D+03 0.24267869D-02 0.46237169D-04
+ 0.21900000D+03 0.22200000D+03 0.21442200D-02 0.62454109D-04
+ 0.22200000D+03 0.22500000D+03 0.21067034D-02 0.66705009D-04
+ 0.22500000D+03 0.22800000D+03 0.19776447D-02 0.10733569D-03
+ 0.22800000D+03 0.23100000D+03 0.16665563D-02 0.10885119D-03
+ 0.23100000D+03 0.23400000D+03 0.16008666D-02 0.77464345D-04
+ 0.23400000D+03 0.23700000D+03 0.15972610D-02 0.73134723D-04
+ 0.23700000D+03 0.24000000D+03 0.13542046D-02 0.40735848D-04
+ 0.24000000D+03 0.24300000D+03 0.13671545D-02 0.33828641D-04
+ 0.24300000D+03 0.24600000D+03 0.11749879D-02 0.29236326D-04
+ 0.24600000D+03 0.24900000D+03 0.11405313D-02 0.29920640D-04
+ 0.24900000D+03 0.25200000D+03 0.10332387D-02 0.51397078D-04
+ 0.25200000D+03 0.25500000D+03 0.98944493D-03 0.52655081D-04
+ 0.25500000D+03 0.25800000D+03 0.95023071D-03 0.42075986D-04
+ 0.25800000D+03 0.26100000D+03 0.81988623D-03 0.37132379D-04
+ 0.26100000D+03 0.26400000D+03 0.78966277D-03 0.22143813D-04
+ 0.26400000D+03 0.26700000D+03 0.71017788D-03 0.28180166D-04
+ 0.26700000D+03 0.27000000D+03 0.66232666D-03 0.27665287D-04
+ 0.27000000D+03 0.27300000D+03 0.59900321D-03 0.42763892D-04
+ 0.27300000D+03 0.27600000D+03 0.61578872D-03 0.42558585D-04
+ 0.27600000D+03 0.27900000D+03 0.55905936D-03 0.21130408D-04
+ 0.27900000D+03 0.28200000D+03 0.47335728D-03 0.22845079D-04
+ 0.28200000D+03 0.28500000D+03 0.44718047D-03 0.20239308D-04
+ 0.28500000D+03 0.28800000D+03 0.44915323D-03 0.16728023D-04
+ 0.28800000D+03 0.29100000D+03 0.38494435D-03 0.34554673D-04
+ 0.29100000D+03 0.29400000D+03 0.39143668D-03 0.35104790D-04
+ 0.29400000D+03 0.29700000D+03 0.34470940D-03 0.21387182D-04
+ 0.29700000D+03 0.30000000D+03 0.32479736D-03 0.19938930D-04
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.11408570D+02 0.12241218D-02
+ 0.12500000D+03 0.13000000D+03 -.22358521D+02 0.60832309D-02
+ 0.13000000D+03 0.13500000D+03 0.43327443D+01 0.54545363D-02
+ 0.13500000D+03 0.14000000D+03 0.30644502D+01 0.48573935D-02
+ 0.14000000D+03 0.14500000D+03 0.21430000D+01 0.28075622D-02
+ 0.14500000D+03 0.15000000D+03 0.15757270D+01 0.30179474D-02
+ 0.15000000D+03 0.15500000D+03 0.12175448D+01 0.28861226D-02
+ 0.15500000D+03 0.16000000D+03 0.96865064D+00 0.23670322D-02
+ 0.16000000D+03 0.16500000D+03 0.78650271D+00 0.21433245D-02
+ 0.16500000D+03 0.17000000D+03 0.65748614D+00 0.17468608D-02
+ 0.17000000D+03 0.17500000D+03 0.55445817D+00 0.23642007D-02
+ 0.17500000D+03 0.18000000D+03 0.47589097D+00 0.22906836D-02
+ 0.18000000D+03 0.18500000D+03 0.41162514D+00 0.13665875D-02
+ 0.18500000D+03 0.19000000D+03 0.36018639D+00 0.12297202D-02
+ 0.19000000D+03 0.19500000D+03 0.31754877D+00 0.13000234D-02
+ 0.19500000D+03 0.20000000D+03 0.28149641D+00 0.11943867D-02
+ 0.20000000D+03 0.20500000D+03 0.25246220D+00 0.11096493D-02
+ 0.20500000D+03 0.21000000D+03 0.22597887D+00 0.12163158D-02
+ 0.21000000D+03 0.21500000D+03 0.20346663D+00 0.11319322D-02
+ 0.21500000D+03 0.22000000D+03 0.18287493D+00 0.11288090D-02
+ 0.22000000D+03 0.22500000D+03 0.16946163D+00 0.11069390D-02
+ 0.22500000D+03 0.23000000D+03 0.15117853D+00 0.10682075D-02
+ 0.23000000D+03 0.23500000D+03 0.13959734D+00 0.10833919D-02
+ 0.23500000D+03 0.24000000D+03 0.13054165D+00 0.82615016D-03
+ 0.24000000D+03 0.24500000D+03 0.11645810D+00 0.87597125D-03
+ 0.24500000D+03 0.25000000D+03 0.10846829D+00 0.93683097D-03
+ 0.25000000D+03 0.25500000D+03 0.10103798D+00 0.85561449D-03
+ 0.25500000D+03 0.26000000D+03 0.84504183D-01 0.79672343D-02
+ 0.26000000D+03 0.26500000D+03 0.94410314D-01 0.79691253D-02
+ 0.26500000D+03 0.27000000D+03 0.81735978D-01 0.81876100D-03
+ 0.27000000D+03 0.27500000D+03 0.73347029D-01 0.78735190D-03
+ 0.27500000D+03 0.28000000D+03 0.71599626D-01 0.71727029D-03
+ 0.28000000D+03 0.28500000D+03 0.64432560D-01 0.49925228D-03
+ 0.28500000D+03 0.29000000D+03 0.61274075D-01 0.50118853D-03
+ 0.29000000D+03 0.29500000D+03 0.57150416D-01 0.48664115D-03
+ 0.29500000D+03 0.30000000D+03 0.53625776D-01 0.61302301D-03
+ 0.30000000D+03 0.30500000D+03 0.51082282D-01 0.57250326D-03
+ 0.30500000D+03 0.31000000D+03 0.46746353D-01 0.44731164D-03
+ 0.31000000D+03 0.31500000D+03 0.43927928D-01 0.54089144D-03
+ 0.31500000D+03 0.32000000D+03 0.42130668D-01 0.53728328D-03
+ 0.32000000D+03 0.32500000D+03 0.40328789D-01 0.48242535D-03
+ 0.32500000D+03 0.33000000D+03 0.37103655D-01 0.47235725D-03
+ 0.33000000D+03 0.33500000D+03 0.35278447D-01 0.64974358D-03
+ 0.33500000D+03 0.34000000D+03 0.33932073D-01 0.61210880D-03
+ 0.34000000D+03 0.34500000D+03 0.30995821D-01 0.49270089D-03
+ 0.34500000D+03 0.35000000D+03 0.30310517D-01 0.52412284D-03
+ 0.35000000D+03 0.35500000D+03 0.28508699D-01 0.56838079D-03
+ 0.35500000D+03 0.36000000D+03 0.27480778D-01 0.52730610D-03
+ 0.36000000D+03 0.36500000D+03 0.25379991D-01 0.32451637D-03
+ 0.36500000D+03 0.37000000D+03 0.24527990D-01 0.45623445D-03
+ 0.37000000D+03 0.37500000D+03 0.22197958D-01 0.87262785D-03
+ 0.37500000D+03 0.38000000D+03 0.23040923D-01 0.80641140D-03
+ 0.38000000D+03 0.38500000D+03 0.20500089D-01 0.41608562D-03
+ 0.38500000D+03 0.39000000D+03 0.20197927D-01 0.42440130D-03
+ 0.39000000D+03 0.39500000D+03 0.18584597D-01 0.37171685D-03
+ 0.39500000D+03 0.40000000D+03 0.18648541D-01 0.33372414D-03
+ 0.40000000D+03 0.40500000D+03 0.16989587D-01 0.34187257D-03
+ 0.40500000D+03 0.41000000D+03 0.16900996D-01 0.33776123D-03
+ 0.41000000D+03 0.41500000D+03 0.15787622D-01 0.19534714D-03
+ 0.41500000D+03 0.42000000D+03 0.14446098D-01 0.23024161D-03
+ 0.42000000D+03 0.42500000D+03 0.14285128D-01 0.38826470D-03
+ 0.42500000D+03 0.43000000D+03 0.13338236D-01 0.55385770D-03
+ 0.43000000D+03 0.43500000D+03 0.12984716D-01 0.60360530D-03
+ 0.43500000D+03 0.44000000D+03 0.12792989D-01 0.52301677D-03
+ 0.44000000D+03 0.44500000D+03 0.11500997D-01 0.44986406D-03
+ 0.44500000D+03 0.45000000D+03 0.11913327D-01 0.37795921D-03
+ 0.45000000D+03 0.45500000D+03 0.10763502D-01 0.34650097D-03
+ 0.45500000D+03 0.46000000D+03 0.10757721D-01 0.31561379D-03
+ 0.46000000D+03 0.46500000D+03 0.97476504D-02 0.25186747D-03
+ 0.46500000D+03 0.47000000D+03 0.96467907D-02 0.26265544D-03
+ 0.47000000D+03 0.47500000D+03 0.94429070D-02 0.23436794D-03
+ 0.47500000D+03 0.48000000D+03 0.87217867D-02 0.21485322D-03
+ 0.48000000D+03 0.48500000D+03 0.81153410D-02 0.25400701D-03
+ 0.48500000D+03 0.49000000D+03 0.82145666D-02 0.31537772D-03
+ 0.49000000D+03 0.49500000D+03 0.75322085D-02 0.39238562D-03
+ 0.49500000D+03 0.50000000D+03 0.77739837D-02 0.35672094D-03
+ 0.50000000D+03 0.50500000D+03 0.72083029D-02 0.20296174D-03
+ 0.50500000D+03 0.51000000D+03 0.67837459D-02 0.16543510D-03
+ 0.51000000D+03 0.51500000D+03 0.64834597D-02 0.16994708D-03
+ 0.51500000D+03 0.52000000D+03 0.64208276D-02 0.16767277D-03
+ 0.52000000D+03 0.52500000D+03 0.60613604D-02 0.16115882D-03
+ 0.52500000D+03 0.53000000D+03 0.57646774D-02 0.20884299D-03
+ 0.53000000D+03 0.53500000D+03 0.56694322D-02 0.23242819D-03
+ 0.53500000D+03 0.54000000D+03 0.53311175D-02 0.20640458D-03
+ 0.54000000D+03 0.54500000D+03 0.52880493D-02 0.18852998D-03
+ 0.54500000D+03 0.55000000D+03 0.49769189D-02 0.17810356D-03
+ 0.55000000D+03 0.55500000D+03 0.47962180D-02 0.15114019D-03
+ 0.55500000D+03 0.56000000D+03 0.44827938D-02 0.15895235D-03
+ 0.56000000D+03 0.56500000D+03 0.44457462D-02 0.17316157D-03
+ 0.56500000D+03 0.57000000D+03 0.42958987D-02 0.17225074D-03
+ 0.57000000D+03 0.57500000D+03 0.41924952D-02 0.19119531D-03
+ 0.57500000D+03 0.58000000D+03 0.38371134D-02 0.17201668D-03
+ 0.58000000D+03 0.58500000D+03 0.37526207D-02 0.14208900D-03
+ 0.58500000D+03 0.59000000D+03 0.35932539D-02 0.18096780D-03
+ 0.59000000D+03 0.59500000D+03 0.33422034D-02 0.42546828D-03
+ 0.59500000D+03 0.60000000D+03 0.35313364D-02 0.44209342D-03
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.11408570D+02 0.12241218D-02
+ 0.12500000D+03 0.13000000D+03 -.22356255D+02 0.60794831D-02
+ 0.13000000D+03 0.13500000D+03 0.43170524D+01 0.54305069D-02
+ 0.13500000D+03 0.14000000D+03 0.30344945D+01 0.48190926D-02
+ 0.14000000D+03 0.14500000D+03 0.21021766D+01 0.27550698D-02
+ 0.14500000D+03 0.15000000D+03 0.15266163D+01 0.29171322D-02
+ 0.15000000D+03 0.15500000D+03 0.11616386D+01 0.27600424D-02
+ 0.15500000D+03 0.16000000D+03 0.90754690D+00 0.22153273D-02
+ 0.16000000D+03 0.16500000D+03 0.72175287D+00 0.19722174D-02
+ 0.16500000D+03 0.17000000D+03 0.58951165D+00 0.15665740D-02
+ 0.17000000D+03 0.17500000D+03 0.48463071D+00 0.20526968D-02
+ 0.17500000D+03 0.18000000D+03 0.40464876D+00 0.19627846D-02
+ 0.18000000D+03 0.18500000D+03 0.33983332D+00 0.11311887D-02
+ 0.18500000D+03 0.19000000D+03 0.28824383D+00 0.98346005D-03
+ 0.19000000D+03 0.19500000D+03 0.24594147D+00 0.10052593D-02
+ 0.19500000D+03 0.20000000D+03 0.21070446D+00 0.89764783D-03
+ 0.20000000D+03 0.20500000D+03 0.18241258D+00 0.79928429D-03
+ 0.20500000D+03 0.21000000D+03 0.15745313D+00 0.84699604D-03
+ 0.21000000D+03 0.21500000D+03 0.13658475D+00 0.76233461D-03
+ 0.21500000D+03 0.22000000D+03 0.11821307D+00 0.72685168D-03
+ 0.22000000D+03 0.22500000D+03 0.10538962D+00 0.69129690D-03
+ 0.22500000D+03 0.23000000D+03 0.90427635D-01 0.63615593D-03
+ 0.23000000D+03 0.23500000D+03 0.80291384D-01 0.62531901D-03
+ 0.23500000D+03 0.24000000D+03 0.72142113D-01 0.45990220D-03
+ 0.24000000D+03 0.24500000D+03 0.61834413D-01 0.46116360D-03
+ 0.24500000D+03 0.25000000D+03 0.55354165D-01 0.48031156D-03
+ 0.25000000D+03 0.25500000D+03 0.49536831D-01 0.41836347D-03
+ 0.25500000D+03 0.26000000D+03 0.39888527D-01 0.36787138D-02
+ 0.26000000D+03 0.26500000D+03 0.42819056D-01 0.36774494D-02
+ 0.26500000D+03 0.27000000D+03 0.35559556D-01 0.35859834D-03
+ 0.27000000D+03 0.27500000D+03 0.30666641D-01 0.32723796D-03
+ 0.27500000D+03 0.28000000D+03 0.28782514D-01 0.29141623D-03
+ 0.28000000D+03 0.28500000D+03 0.24900741D-01 0.19273363D-03
+ 0.28500000D+03 0.29000000D+03 0.22779679D-01 0.18667373D-03
+ 0.29000000D+03 0.29500000D+03 0.20444113D-01 0.17397018D-03
+ 0.29500000D+03 0.30000000D+03 0.18463203D-01 0.20983625D-03
+ 0.30000000D+03 0.30500000D+03 0.16933012D-01 0.19171072D-03
+ 0.30500000D+03 0.31000000D+03 0.14925706D-01 0.14231765D-03
+ 0.31000000D+03 0.31500000D+03 0.13517397D-01 0.16600509D-03
+ 0.31500000D+03 0.32000000D+03 0.12500013D-01 0.15990613D-03
+ 0.32000000D+03 0.32500000D+03 0.11534884D-01 0.13807613D-03
+ 0.32500000D+03 0.33000000D+03 0.10235946D-01 0.13044221D-03
+ 0.33000000D+03 0.33500000D+03 0.93967857D-02 0.17159555D-03
+ 0.33500000D+03 0.34000000D+03 0.87238378D-02 0.15923511D-03
+ 0.34000000D+03 0.34500000D+03 0.76978673D-02 0.12132541D-03
+ 0.34500000D+03 0.35000000D+03 0.72740641D-02 0.12648497D-03
+ 0.35000000D+03 0.35500000D+03 0.66120241D-02 0.13089219D-03
+ 0.35500000D+03 0.36000000D+03 0.61618301D-02 0.11951759D-03
+ 0.36000000D+03 0.36500000D+03 0.55046109D-02 0.70354529D-04
+ 0.36500000D+03 0.37000000D+03 0.51479929D-02 0.95064690D-04
+ 0.37000000D+03 0.37500000D+03 0.45142146D-02 0.17569651D-03
+ 0.37500000D+03 0.38000000D+03 0.45381082D-02 0.16090895D-03
+ 0.38000000D+03 0.38500000D+03 0.39101738D-02 0.78752363D-04
+ 0.38500000D+03 0.39000000D+03 0.37340077D-02 0.78991093D-04
+ 0.39000000D+03 0.39500000D+03 0.33320856D-02 0.66391474D-04
+ 0.39500000D+03 0.40000000D+03 0.32417543D-02 0.58493974D-04
+ 0.40000000D+03 0.40500000D+03 0.28646428D-02 0.57165240D-04
+ 0.40500000D+03 0.41000000D+03 0.27661173D-02 0.55810921D-04
+ 0.41000000D+03 0.41500000D+03 0.25081379D-02 0.31099828D-04
+ 0.41500000D+03 0.42000000D+03 0.22293856D-02 0.35394069D-04
+ 0.42000000D+03 0.42500000D+03 0.21437357D-02 0.57840910D-04
+ 0.42500000D+03 0.43000000D+03 0.19458553D-02 0.80505048D-04
+ 0.43000000D+03 0.43500000D+03 0.18430113D-02 0.85677056D-04
+ 0.43500000D+03 0.44000000D+03 0.17656380D-02 0.72392798D-04
+ 0.44000000D+03 0.44500000D+03 0.15449573D-02 0.60396133D-04
+ 0.44500000D+03 0.45000000D+03 0.15570460D-02 0.49613837D-04
+ 0.45000000D+03 0.45500000D+03 0.13689220D-02 0.43880723D-04
+ 0.45500000D+03 0.46000000D+03 0.13325119D-02 0.39379051D-04
+ 0.46000000D+03 0.46500000D+03 0.11756943D-02 0.30270223D-04
+ 0.46500000D+03 0.47000000D+03 0.11340351D-02 0.30957295D-04
+ 0.47000000D+03 0.47500000D+03 0.10816870D-02 0.26854029D-04
+ 0.47500000D+03 0.48000000D+03 0.97369723D-03 0.24056643D-04
+ 0.48000000D+03 0.48500000D+03 0.88414923D-03 0.27531662D-04
+ 0.48500000D+03 0.49000000D+03 0.87335804D-03 0.33486702D-04
+ 0.49000000D+03 0.49500000D+03 0.78143749D-03 0.40589684D-04
+ 0.49500000D+03 0.50000000D+03 0.78713126D-03 0.36352378D-04
+ 0.50000000D+03 0.50500000D+03 0.71217707D-03 0.20113419D-04
+ 0.50500000D+03 0.51000000D+03 0.65414473D-03 0.15981548D-04
+ 0.51000000D+03 0.51500000D+03 0.61100639D-03 0.15993555D-04
+ 0.51500000D+03 0.52000000D+03 0.59130515D-03 0.15477442D-04
+ 0.52000000D+03 0.52500000D+03 0.54535269D-03 0.14480279D-04
+ 0.52500000D+03 0.53000000D+03 0.50693255D-03 0.18305467D-04
+ 0.53000000D+03 0.53500000D+03 0.48763556D-03 0.20004995D-04
+ 0.53500000D+03 0.54000000D+03 0.44844716D-03 0.17395812D-04
+ 0.54000000D+03 0.54500000D+03 0.43497545D-03 0.15506265D-04
+ 0.54500000D+03 0.55000000D+03 0.40052576D-03 0.14355397D-04
+ 0.55000000D+03 0.55500000D+03 0.37763484D-03 0.11926263D-04
+ 0.55500000D+03 0.56000000D+03 0.34546719D-03 0.12223374D-04
+ 0.56000000D+03 0.56500000D+03 0.33550572D-03 0.13078475D-04
+ 0.56500000D+03 0.57000000D+03 0.31758130D-03 0.12722135D-04
+ 0.57000000D+03 0.57500000D+03 0.30343890D-03 0.13815508D-04
+ 0.57500000D+03 0.58000000D+03 0.27194057D-03 0.12250777D-04
+ 0.58000000D+03 0.58500000D+03 0.26075182D-03 0.98567015D-05
+ 0.58500000D+03 0.59000000D+03 0.24480529D-03 0.12285167D-04
+ 0.59000000D+03 0.59500000D+03 0.22333871D-03 0.28179698D-04
+ 0.59500000D+03 0.60000000D+03 0.23127279D-03 0.29094033D-04
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 0.41908371D+01 0.11796951D-01
+ 0.30000000D+01 0.60000000D+01 -.35384744D+01 0.88845045D-02
+ 0.60000000D+01 0.90000000D+01 0.89089710D+00 0.36222339D-02
+ 0.90000000D+01 0.12000000D+02 0.13764711D+01 0.31501007D-02
+ 0.12000000D+02 0.15000000D+02 0.13181354D+01 0.28444935D-02
+ 0.15000000D+02 0.18000000D+02 0.11774334D+01 0.26721985D-02
+ 0.18000000D+02 0.21000000D+02 0.10254001D+01 0.24840548D-02
+ 0.21000000D+02 0.24000000D+02 0.90340504D+00 0.23065362D-02
+ 0.24000000D+02 0.27000000D+02 0.78735580D+00 0.22089988D-02
+ 0.27000000D+02 0.30000000D+02 0.69670741D+00 0.20444936D-02
+ 0.30000000D+02 0.33000000D+02 0.61631048D+00 0.18657252D-02
+ 0.33000000D+02 0.36000000D+02 0.54763051D+00 0.18063451D-02
+ 0.36000000D+02 0.39000000D+02 0.49448423D+00 0.26687952D-02
+ 0.39000000D+02 0.42000000D+02 0.44372892D+00 0.31379969D-02
+ 0.42000000D+02 0.45000000D+02 0.39830235D+00 0.22963079D-02
+ 0.45000000D+02 0.48000000D+02 0.36242260D+00 0.15428672D-02
+ 0.48000000D+02 0.51000000D+02 0.32701111D+00 0.15334756D-02
+ 0.51000000D+02 0.54000000D+02 0.29918314D+00 0.13186703D-02
+ 0.54000000D+02 0.57000000D+02 0.27193608D+00 0.14417446D-02
+ 0.57000000D+02 0.60000000D+02 0.25218375D+00 0.15621472D-02
+ 0.60000000D+02 0.63000000D+02 0.22829511D+00 0.15409780D-02
+ 0.63000000D+02 0.66000000D+02 0.21044620D+00 0.13709196D-02
+ 0.66000000D+02 0.69000000D+02 0.19388455D+00 0.11344283D-02
+ 0.69000000D+02 0.72000000D+02 0.17820827D+00 0.11290370D-02
+ 0.72000000D+02 0.75000000D+02 0.16333771D+00 0.12310132D-02
+ 0.75000000D+02 0.78000000D+02 0.15102172D+00 0.13166931D-02
+ 0.78000000D+02 0.81000000D+02 0.14120269D+00 0.19982539D-02
+ 0.81000000D+02 0.84000000D+02 0.13139269D+00 0.18567748D-02
+ 0.84000000D+02 0.87000000D+02 0.12139287D+00 0.13015895D-02
+ 0.87000000D+02 0.90000000D+02 0.11177286D+00 0.15594754D-02
+ 0.90000000D+02 0.93000000D+02 0.10338927D+00 0.12652514D-02
+ 0.93000000D+02 0.96000000D+02 0.99498142D-01 0.99908450D-03
+ 0.96000000D+02 0.99000000D+02 0.89600260D-01 0.88854916D-03
+ 0.99000000D+02 0.10200000D+03 0.82500000D-01 0.20925443D-02
+ 0.10200000D+03 0.10500000D+03 0.81520469D-01 0.21680646D-02
+ 0.10500000D+03 0.10800000D+03 0.71517676D-01 0.12577540D-02
+ 0.10800000D+03 0.11100000D+03 0.69386665D-01 0.13438804D-02
+ 0.11100000D+03 0.11400000D+03 0.63660558D-01 0.12313832D-02
+ 0.11400000D+03 0.11700000D+03 0.60475029D-01 0.10888660D-02
+ 0.11700000D+03 0.12000000D+03 0.56991120D-01 0.84000820D-03
+ 0.12000000D+03 0.12300000D+03 0.52332724D-01 0.82025664D-03
+ 0.12300000D+03 0.12600000D+03 0.50201089D-01 0.91919667D-03
+ 0.12600000D+03 0.12900000D+03 0.46024781D-01 0.74228207D-03
+ 0.12900000D+03 0.13200000D+03 0.43405088D-01 0.74447784D-03
+ 0.13200000D+03 0.13500000D+03 0.41084454D-01 0.72854664D-03
+ 0.13500000D+03 0.13800000D+03 0.38142176D-01 0.59275514D-03
+ 0.13800000D+03 0.14100000D+03 0.36682976D-01 0.89359834D-03
+ 0.14100000D+03 0.14400000D+03 0.33636320D-01 0.86232760D-03
+ 0.14400000D+03 0.14700000D+03 0.32638923D-01 0.52353894D-03
+ 0.14700000D+03 0.15000000D+03 0.30086268D-01 0.50129947D-03
+ 0.15000000D+03 0.15300000D+03 0.28091740D-01 0.60991282D-03
+ 0.15300000D+03 0.15600000D+03 0.26873964D-01 0.59213545D-03
+ 0.15600000D+03 0.15900000D+03 0.23146271D-01 0.30059888D-02
+ 0.15900000D+03 0.16200000D+03 0.27085720D-01 0.30187227D-02
+ 0.16200000D+03 0.16500000D+03 0.22707190D-01 0.53366658D-03
+ 0.16500000D+03 0.16800000D+03 0.21495279D-01 0.48041138D-03
+ 0.16800000D+03 0.17100000D+03 0.19299327D-01 0.59053024D-03
+ 0.17100000D+03 0.17400000D+03 0.17061211D-01 0.15767711D-02
+ 0.17400000D+03 0.17700000D+03 0.20226986D-01 0.15432699D-02
+ 0.17700000D+03 0.18000000D+03 0.16754879D-01 0.40692977D-03
+ 0.18000000D+03 0.18300000D+03 0.16054305D-01 0.53753632D-03
+ 0.18300000D+03 0.18600000D+03 0.17159099D-01 0.15532327D-02
+ 0.18600000D+03 0.18900000D+03 0.12900706D-01 0.15108903D-02
+ 0.18900000D+03 0.19200000D+03 0.13285444D-01 0.50808237D-03
+ 0.19200000D+03 0.19500000D+03 0.12275753D-01 0.47916587D-03
+ 0.19500000D+03 0.19800000D+03 0.12198315D-01 0.35243734D-03
+ 0.19800000D+03 0.20100000D+03 0.11719685D-01 0.35366296D-03
+ 0.20100000D+03 0.20400000D+03 0.99540005D-02 0.39385889D-03
+ 0.20400000D+03 0.20700000D+03 0.10769064D-01 0.35689621D-03
+ 0.20700000D+03 0.21000000D+03 0.91633510D-02 0.29135133D-03
+ 0.21000000D+03 0.21300000D+03 0.90714095D-02 0.73016844D-03
+ 0.21300000D+03 0.21600000D+03 0.91232660D-02 0.74153579D-03
+ 0.21600000D+03 0.21900000D+03 0.74348218D-02 0.42303927D-03
+ 0.21900000D+03 0.22200000D+03 0.81274748D-02 0.46757302D-03
+ 0.22200000D+03 0.22500000D+03 0.65377316D-02 0.41206973D-03
+ 0.22500000D+03 0.22800000D+03 0.70964193D-02 0.68374248D-03
+ 0.22800000D+03 0.23100000D+03 0.74514181D-02 0.10019995D-02
+ 0.23100000D+03 0.23400000D+03 0.53061186D-02 0.90838225D-03
+ 0.23400000D+03 0.23700000D+03 0.57509163D-02 0.48560733D-03
+ 0.23700000D+03 0.24000000D+03 0.53601993D-02 0.26374473D-03
+ 0.24000000D+03 0.24300000D+03 0.46490890D-02 0.28823349D-03
+ 0.24300000D+03 0.24600000D+03 0.51424562D-02 0.33955120D-03
+ 0.24600000D+03 0.24900000D+03 0.47171550D-02 0.31792714D-03
+ 0.24900000D+03 0.25200000D+03 0.44598835D-02 0.27657709D-03
+ 0.25200000D+03 0.25500000D+03 0.33347844D-02 0.36278068D-03
+ 0.25500000D+03 0.25800000D+03 0.41519504D-02 0.33820460D-03
+ 0.25800000D+03 0.26100000D+03 0.36418226D-02 0.23131125D-03
+ 0.26100000D+03 0.26400000D+03 0.31132560D-02 0.20446889D-03
+ 0.26400000D+03 0.26700000D+03 0.34836580D-02 0.20802994D-03
+ 0.26700000D+03 0.27000000D+03 0.29454122D-02 0.24104748D-03
+ 0.27000000D+03 0.27300000D+03 0.29806522D-02 0.27877325D-03
+ 0.27300000D+03 0.27600000D+03 0.26519501D-02 0.34958006D-03
+ 0.27600000D+03 0.27900000D+03 0.21204543D-02 0.46175370D-03
+ 0.27900000D+03 0.28200000D+03 0.24817054D-02 0.38917757D-03
+ 0.28200000D+03 0.28500000D+03 0.24782434D-02 0.24696401D-03
+ 0.28500000D+03 0.28800000D+03 0.23177447D-02 0.40398824D-03
+ 0.28800000D+03 0.29100000D+03 0.15118852D-02 0.41158989D-03
+ 0.29100000D+03 0.29400000D+03 0.15915328D-02 0.25895344D-03
+ 0.29400000D+03 0.29700000D+03 0.18635136D-02 0.24748985D-03
+ 0.29700000D+03 0.30000000D+03 0.15825875D-02 0.23777854D-03
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 0.41973077D+01 0.11793110D-01
+ 0.30000000D+01 0.60000000D+01 -.35351871D+01 0.88779937D-02
+ 0.60000000D+01 0.90000000D+01 0.88738305D+00 0.36090608D-02
+ 0.90000000D+01 0.12000000D+02 0.13667343D+01 0.31289581D-02
+ 0.12000000D+02 0.15000000D+02 0.13029287D+01 0.28112102D-02
+ 0.15000000D+02 0.18000000D+02 0.11572939D+01 0.26272156D-02
+ 0.18000000D+02 0.21000000D+02 0.10010909D+01 0.24249661D-02
+ 0.21000000D+02 0.24000000D+02 0.87510183D+00 0.22349388D-02
+ 0.24000000D+02 0.27000000D+02 0.75593466D+00 0.21202905D-02
+ 0.27000000D+02 0.30000000D+02 0.66232217D+00 0.19448848D-02
+ 0.30000000D+02 0.33000000D+02 0.57955408D+00 0.17544741D-02
+ 0.33000000D+02 0.36000000D+02 0.50892495D+00 0.16785923D-02
+ 0.36000000D+02 0.39000000D+02 0.45370170D+00 0.24393753D-02
+ 0.39000000D+02 0.42000000D+02 0.40160317D+00 0.28421023D-02
+ 0.42000000D+02 0.45000000D+02 0.35530503D+00 0.20579796D-02
+ 0.45000000D+02 0.48000000D+02 0.31839010D+00 0.13530088D-02
+ 0.48000000D+02 0.51000000D+02 0.28271109D+00 0.13279460D-02
+ 0.51000000D+02 0.54000000D+02 0.25434728D+00 0.11213485D-02
+ 0.54000000D+02 0.57000000D+02 0.22719648D+00 0.12023766D-02
+ 0.57000000D+02 0.60000000D+02 0.20690225D+00 0.12814773D-02
+ 0.60000000D+02 0.63000000D+02 0.18380536D+00 0.12410418D-02
+ 0.63000000D+02 0.66000000D+02 0.16620514D+00 0.10850406D-02
+ 0.66000000D+02 0.69000000D+02 0.15012030D+00 0.87931601D-03
+ 0.69000000D+02 0.72000000D+02 0.13519998D+00 0.85582741D-03
+ 0.72000000D+02 0.75000000D+02 0.12138422D+00 0.91397199D-03
+ 0.75000000D+02 0.78000000D+02 0.10989658D+00 0.95771662D-03
+ 0.78000000D+02 0.81000000D+02 0.10056397D+00 0.14142330D-02
+ 0.81000000D+02 0.84000000D+02 0.91538472D-01 0.13049342D-02
+ 0.84000000D+02 0.87000000D+02 0.82711423D-01 0.88083657D-03
+ 0.87000000D+02 0.90000000D+02 0.74460660D-01 0.10401909D-02
+ 0.90000000D+02 0.93000000D+02 0.67338096D-01 0.82698569D-03
+ 0.93000000D+02 0.96000000D+02 0.63320301D-01 0.63639623D-03
+ 0.96000000D+02 0.99000000D+02 0.55706766D-01 0.55355471D-03
+ 0.99000000D+02 0.10200000D+03 0.50120515D-01 0.12586414D-02
+ 0.10200000D+03 0.10500000D+03 0.48379906D-01 0.12974239D-02
+ 0.10500000D+03 0.10800000D+03 0.41440381D-01 0.72687940D-03
+ 0.10800000D+03 0.11100000D+03 0.39270108D-01 0.76106271D-03
+ 0.11100000D+03 0.11400000D+03 0.35177505D-01 0.68124809D-03
+ 0.11400000D+03 0.11700000D+03 0.32631821D-01 0.58850178D-03
+ 0.11700000D+03 0.12000000D+03 0.30016125D-01 0.44461524D-03
+ 0.12000000D+03 0.12300000D+03 0.26913320D-01 0.41990864D-03
+ 0.12300000D+03 0.12600000D+03 0.25200581D-01 0.46189913D-03
+ 0.12600000D+03 0.12900000D+03 0.22553973D-01 0.36550810D-03
+ 0.12900000D+03 0.13200000D+03 0.20768484D-01 0.35463235D-03
+ 0.13200000D+03 0.13500000D+03 0.19193475D-01 0.34211722D-03
+ 0.13500000D+03 0.13800000D+03 0.17400089D-01 0.26994820D-03
+ 0.13800000D+03 0.14100000D+03 0.16335799D-01 0.39566006D-03
+ 0.14100000D+03 0.14400000D+03 0.14628460D-01 0.37767387D-03
+ 0.14400000D+03 0.14700000D+03 0.13863035D-01 0.22257449D-03
+ 0.14700000D+03 0.15000000D+03 0.12478451D-01 0.20789925D-03
+ 0.15000000D+03 0.15300000D+03 0.11382053D-01 0.24618242D-03
+ 0.15300000D+03 0.15600000D+03 0.10637853D-01 0.23534323D-03
+ 0.15600000D+03 0.15900000D+03 0.89617275D-02 0.11485387D-02
+ 0.15900000D+03 0.16200000D+03 0.10239715D-01 0.11523187D-02
+ 0.16200000D+03 0.16500000D+03 0.83764704D-02 0.19751482D-03
+ 0.16500000D+03 0.16800000D+03 0.77473326D-02 0.17300270D-03
+ 0.16800000D+03 0.17100000D+03 0.67993458D-02 0.20743722D-03
+ 0.17100000D+03 0.17400000D+03 0.58856943D-02 0.53795056D-03
+ 0.17400000D+03 0.17700000D+03 0.68177171D-02 0.52474010D-03
+ 0.17700000D+03 0.18000000D+03 0.55138153D-02 0.13446118D-03
+ 0.18000000D+03 0.18300000D+03 0.51670611D-02 0.17172654D-03
+ 0.18300000D+03 0.18600000D+03 0.53928087D-02 0.48433015D-03
+ 0.18600000D+03 0.18900000D+03 0.39629773D-02 0.46959580D-03
+ 0.18900000D+03 0.19200000D+03 0.39961849D-02 0.15264201D-03
+ 0.19200000D+03 0.19500000D+03 0.36151571D-02 0.14161350D-03
+ 0.19500000D+03 0.19800000D+03 0.35148773D-02 0.10175948D-03
+ 0.19800000D+03 0.20100000D+03 0.33028787D-02 0.99475340D-04
+ 0.20100000D+03 0.20400000D+03 0.27478870D-02 0.10865516D-03
+ 0.20400000D+03 0.20700000D+03 0.29102397D-02 0.96637408D-04
+ 0.20700000D+03 0.21000000D+03 0.24226778D-02 0.77158162D-04
+ 0.21000000D+03 0.21300000D+03 0.23499111D-02 0.18737923D-03
+ 0.21300000D+03 0.21600000D+03 0.23124517D-02 0.18953967D-03
+ 0.21600000D+03 0.21900000D+03 0.18461055D-02 0.10450117D-03
+ 0.21900000D+03 0.22200000D+03 0.19769417D-02 0.11398111D-03
+ 0.22200000D+03 0.22500000D+03 0.15581805D-02 0.98219663D-04
+ 0.22500000D+03 0.22800000D+03 0.16588974D-02 0.15862080D-03
+ 0.22800000D+03 0.23100000D+03 0.17037627D-02 0.22876175D-03
+ 0.23100000D+03 0.23400000D+03 0.11878550D-02 0.20467631D-03
+ 0.23400000D+03 0.23700000D+03 0.12639332D-02 0.10751841D-03
+ 0.23700000D+03 0.24000000D+03 0.11553152D-02 0.56773596D-04
+ 0.24000000D+03 0.24300000D+03 0.98305159D-03 0.60875583D-04
+ 0.24300000D+03 0.24600000D+03 0.10665927D-02 0.70189506D-04
+ 0.24600000D+03 0.24900000D+03 0.95847534D-03 0.64886143D-04
+ 0.24900000D+03 0.25200000D+03 0.88856869D-03 0.55019413D-04
+ 0.25200000D+03 0.25500000D+03 0.65267051D-03 0.70787958D-04
+ 0.25500000D+03 0.25800000D+03 0.79773884D-03 0.65217782D-04
+ 0.25800000D+03 0.26100000D+03 0.68585272D-03 0.43582666D-04
+ 0.26100000D+03 0.26400000D+03 0.57602854D-03 0.37871161D-04
+ 0.26400000D+03 0.26700000D+03 0.63232647D-03 0.37661771D-04
+ 0.26700000D+03 0.27000000D+03 0.52451832D-03 0.42920553D-04
+ 0.27000000D+03 0.27300000D+03 0.52143070D-03 0.48673140D-04
+ 0.27300000D+03 0.27600000D+03 0.45520574D-03 0.59916589D-04
+ 0.27600000D+03 0.27900000D+03 0.35775926D-03 0.77706475D-04
+ 0.27900000D+03 0.28200000D+03 0.41159141D-03 0.64935169D-04
+ 0.28200000D+03 0.28500000D+03 0.40321704D-03 0.40016326D-04
+ 0.28500000D+03 0.28800000D+03 0.36994191D-03 0.64365196D-04
+ 0.28800000D+03 0.29100000D+03 0.23713457D-03 0.64895758D-04
+ 0.29100000D+03 0.29400000D+03 0.24598323D-03 0.40192350D-04
+ 0.29400000D+03 0.29700000D+03 0.28324411D-03 0.37403816D-04
+ 0.29700000D+03 0.30000000D+03 0.23635060D-03 0.35668646D-04
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.34513531D+02 0.85682404D-02
+ 0.30000000D+01 0.60000000D+01 0.24968414D+02 0.13039345D-02
+ 0.60000000D+01 0.90000000D+01 0.92104408D+01 0.54547752D-03
+ 0.90000000D+01 0.12000000D+02 0.47463135D+01 0.31282575D-03
+ 0.12000000D+02 0.15000000D+02 0.28615730D+01 0.20448953D-03
+ 0.15000000D+02 0.18000000D+02 0.18930170D+01 0.14906273D-03
+ 0.18000000D+02 0.21000000D+02 0.13319413D+01 0.10891312D-03
+ 0.21000000D+02 0.24000000D+02 0.97938318D+00 0.84220723D-04
+ 0.24000000D+02 0.27000000D+02 0.74450360D+00 0.67012119D-04
+ 0.27000000D+02 0.30000000D+02 0.58082578D+00 0.54585441D-04
+ 0.30000000D+02 0.33000000D+02 0.46271384D+00 0.46323868D-04
+ 0.33000000D+02 0.36000000D+02 0.37505797D+00 0.39113168D-04
+ 0.36000000D+02 0.39000000D+02 0.30836219D+00 0.33511489D-04
+ 0.39000000D+02 0.42000000D+02 0.25668941D+00 0.28701112D-04
+ 0.42000000D+02 0.45000000D+02 0.21602628D+00 0.25510097D-04
+ 0.45000000D+02 0.48000000D+02 0.18343588D+00 0.22868955D-04
+ 0.48000000D+02 0.51000000D+02 0.15698392D+00 0.20237215D-04
+ 0.51000000D+02 0.54000000D+02 0.13537221D+00 0.17352981D-04
+ 0.54000000D+02 0.57000000D+02 0.11748334D+00 0.15344933D-04
+ 0.57000000D+02 0.60000000D+02 0.10255735D+00 0.13948922D-04
+ 0.60000000D+02 0.63000000D+02 0.90023387D-01 0.12709173D-04
+ 0.63000000D+02 0.66000000D+02 0.79374887D-01 0.11906343D-04
+ 0.66000000D+02 0.69000000D+02 0.70310094D-01 0.10785865D-04
+ 0.69000000D+02 0.72000000D+02 0.62525957D-01 0.96301544D-05
+ 0.72000000D+02 0.75000000D+02 0.55849075D-01 0.90278288D-05
+ 0.75000000D+02 0.78000000D+02 0.50023486D-01 0.81703734D-05
+ 0.78000000D+02 0.81000000D+02 0.44975016D-01 0.75686009D-05
+ 0.81000000D+02 0.84000000D+02 0.40554956D-01 0.69121423D-05
+ 0.84000000D+02 0.87000000D+02 0.36675805D-01 0.63266273D-05
+ 0.87000000D+02 0.90000000D+02 0.33241923D-01 0.58437534D-05
+ 0.90000000D+02 0.93000000D+02 0.30220759D-01 0.54677778D-05
+ 0.93000000D+02 0.96000000D+02 0.27525629D-01 0.50864880D-05
+ 0.96000000D+02 0.99000000D+02 0.25138500D-01 0.47841764D-05
+ 0.99000000D+02 0.10200000D+03 0.23000596D-01 0.46188698D-05
+ 0.10200000D+03 0.10500000D+03 0.21092164D-01 0.42734098D-05
+ 0.10500000D+03 0.10800000D+03 0.19381214D-01 0.39356587D-05
+ 0.10800000D+03 0.11100000D+03 0.17833746D-01 0.36667253D-05
+ 0.11100000D+03 0.11400000D+03 0.16433118D-01 0.34528029D-05
+ 0.11400000D+03 0.11700000D+03 0.15177772D-01 0.32273206D-05
+ 0.11700000D+03 0.12000000D+03 0.14037405D-01 0.30748736D-05
+ 0.12000000D+03 0.12300000D+03 0.12998563D-01 0.28848887D-05
+ 0.12300000D+03 0.12600000D+03 0.12059415D-01 0.27800975D-05
+ 0.12600000D+03 0.12900000D+03 0.11205338D-01 0.25468789D-05
+ 0.12900000D+03 0.13200000D+03 0.10416693D-01 0.23618002D-05
+ 0.13200000D+03 0.13500000D+03 0.96958219D-02 0.22522221D-05
+ 0.13500000D+03 0.13800000D+03 0.90431787D-02 0.21698512D-05
+ 0.13800000D+03 0.14100000D+03 0.84447243D-02 0.20472875D-05
+ 0.14100000D+03 0.14400000D+03 0.78884834D-02 0.18881075D-05
+ 0.14400000D+03 0.14700000D+03 0.73805630D-02 0.19967870D-05
+ 0.14700000D+03 0.15000000D+03 0.69091793D-02 0.17980494D-05
+ 0.15000000D+03 0.15300000D+03 0.64768257D-02 0.16661538D-05
+ 0.15300000D+03 0.15600000D+03 0.60789272D-02 0.16034450D-05
+ 0.15600000D+03 0.15900000D+03 0.57085483D-02 0.15089874D-05
+ 0.15900000D+03 0.16200000D+03 0.53689626D-02 0.14600411D-05
+ 0.16200000D+03 0.16500000D+03 0.50499529D-02 0.14111807D-05
+ 0.16500000D+03 0.16800000D+03 0.47532641D-02 0.13408787D-05
+ 0.16800000D+03 0.17100000D+03 0.44784472D-02 0.12918633D-05
+ 0.17100000D+03 0.17400000D+03 0.42223179D-02 0.11912485D-05
+ 0.17400000D+03 0.17700000D+03 0.39873028D-02 0.11485775D-05
+ 0.17700000D+03 0.18000000D+03 0.37677993D-02 0.10972286D-05
+ 0.18000000D+03 0.18300000D+03 0.35591048D-02 0.10855145D-05
+ 0.18300000D+03 0.18600000D+03 0.33677587D-02 0.10108771D-05
+ 0.18600000D+03 0.18900000D+03 0.31875737D-02 0.98395191D-06
+ 0.18900000D+03 0.19200000D+03 0.30192322D-02 0.94998872D-06
+ 0.19200000D+03 0.19500000D+03 0.28606455D-02 0.90085900D-06
+ 0.19500000D+03 0.19800000D+03 0.27131969D-02 0.84262181D-06
+ 0.19800000D+03 0.20100000D+03 0.25754034D-02 0.84179403D-06
+ 0.20100000D+03 0.20400000D+03 0.24455746D-02 0.79194096D-06
+ 0.20400000D+03 0.20700000D+03 0.23250564D-02 0.76811377D-06
+ 0.20700000D+03 0.21000000D+03 0.22077902D-02 0.71091463D-06
+ 0.21000000D+03 0.21300000D+03 0.21007214D-02 0.71007395D-06
+ 0.21300000D+03 0.21600000D+03 0.19980612D-02 0.66062056D-06
+ 0.21600000D+03 0.21900000D+03 0.19012793D-02 0.66892351D-06
+ 0.21900000D+03 0.22200000D+03 0.18118489D-02 0.64811606D-06
+ 0.22200000D+03 0.22500000D+03 0.17269137D-02 0.60356163D-06
+ 0.22500000D+03 0.22800000D+03 0.16467181D-02 0.58267351D-06
+ 0.22800000D+03 0.23100000D+03 0.15717322D-02 0.56481016D-06
+ 0.23100000D+03 0.23400000D+03 0.14994725D-02 0.56893668D-06
+ 0.23400000D+03 0.23700000D+03 0.14318511D-02 0.52515560D-06
+ 0.23700000D+03 0.24000000D+03 0.13671093D-02 0.51830498D-06
+ 0.24000000D+03 0.24300000D+03 0.13063264D-02 0.47460983D-06
+ 0.24300000D+03 0.24600000D+03 0.12501011D-02 0.46377626D-06
+ 0.24600000D+03 0.24900000D+03 0.11948988D-02 0.46384853D-06
+ 0.24900000D+03 0.25200000D+03 0.11440169D-02 0.44234311D-06
+ 0.25200000D+03 0.25500000D+03 0.10939164D-02 0.42362815D-06
+ 0.25500000D+03 0.25800000D+03 0.10475027D-02 0.41225546D-06
+ 0.25800000D+03 0.26100000D+03 0.10040284D-02 0.40521610D-06
+ 0.26100000D+03 0.26400000D+03 0.96137393D-03 0.37832966D-06
+ 0.26400000D+03 0.26700000D+03 0.92191227D-03 0.37425442D-06
+ 0.26700000D+03 0.27000000D+03 0.88436820D-03 0.36731158D-06
+ 0.27000000D+03 0.27300000D+03 0.84782924D-03 0.34892983D-06
+ 0.27300000D+03 0.27600000D+03 0.81401199D-03 0.33676744D-06
+ 0.27600000D+03 0.27900000D+03 0.78199299D-03 0.33329195D-06
+ 0.27900000D+03 0.28200000D+03 0.75054496D-03 0.32059017D-06
+ 0.28200000D+03 0.28500000D+03 0.72048586D-03 0.30490723D-06
+ 0.28500000D+03 0.28800000D+03 0.69324249D-03 0.29428311D-06
+ 0.28800000D+03 0.29100000D+03 0.66557807D-03 0.29069687D-06
+ 0.29100000D+03 0.29400000D+03 0.63959016D-03 0.28272167D-06
+ 0.29400000D+03 0.29700000D+03 0.61532013D-03 0.27248096D-06
+ 0.29700000D+03 0.30000000D+03 0.59180113D-03 0.26598706D-06
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX0-11.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX0-11.top
new file mode 100644
index 0000000000000000000000000000000000000000..2a1df31acb33f7a9fdce6e76b8d05d3e98b6c14e
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX0-11.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77998183D-06 0.48269461D-06
+ -.46000000D+01 -.45000000D+01 0.11549684D-03 0.50719509D-05
+ -.45000000D+01 -.44000000D+01 0.10004550D-02 0.15795609D-04
+ -.44000000D+01 -.43000000D+01 0.40332505D-02 0.38014484D-04
+ -.43000000D+01 -.42000000D+01 0.11467122D-01 0.81724152D-04
+ -.42000000D+01 -.41000000D+01 0.26682619D-01 0.17983223D-03
+ -.41000000D+01 -.40000000D+01 0.53270458D-01 0.32699031D-03
+ -.40000000D+01 -.39000000D+01 0.94585898D-01 0.55927517D-03
+ -.39000000D+01 -.38000000D+01 0.15452639D+00 0.10903115D-02
+ -.38000000D+01 -.37000000D+01 0.23454171D+00 0.17107752D-02
+ -.37000000D+01 -.36000000D+01 0.33692066D+00 0.20846162D-02
+ -.36000000D+01 -.35000000D+01 0.46405995D+00 0.33165867D-02
+ -.35000000D+01 -.34000000D+01 0.60843137D+00 0.36684556D-02
+ -.34000000D+01 -.33000000D+01 0.78399863D+00 0.36977006D-02
+ -.33000000D+01 -.32000000D+01 0.98572319D+00 0.38859017D-02
+ -.32000000D+01 -.31000000D+01 0.12011066D+01 0.43043982D-02
+ -.31000000D+01 -.30000000D+01 0.14345604D+01 0.60150786D-02
+ -.30000000D+01 -.29000000D+01 0.17207388D+01 0.57734490D-02
+ -.29000000D+01 -.28000000D+01 0.19937895D+01 0.64666955D-02
+ -.28000000D+01 -.27000000D+01 0.22939888D+01 0.87359900D-02
+ -.27000000D+01 -.26000000D+01 0.26377093D+01 0.73030235D-02
+ -.26000000D+01 -.25000000D+01 0.29642950D+01 0.74799297D-02
+ -.25000000D+01 -.24000000D+01 0.33198468D+01 0.79577599D-02
+ -.24000000D+01 -.23000000D+01 0.36746166D+01 0.85906615D-02
+ -.23000000D+01 -.22000000D+01 0.40480078D+01 0.90690152D-02
+ -.22000000D+01 -.21000000D+01 0.44494312D+01 0.98391861D-02
+ -.21000000D+01 -.20000000D+01 0.48533032D+01 0.97636856D-02
+ -.20000000D+01 -.19000000D+01 0.52225413D+01 0.11426825D-01
+ -.19000000D+01 -.18000000D+01 0.55918524D+01 0.10682861D-01
+ -.18000000D+01 -.17000000D+01 0.59731590D+01 0.14029047D-01
+ -.17000000D+01 -.16000000D+01 0.63327242D+01 0.13640738D-01
+ -.16000000D+01 -.15000000D+01 0.67002770D+01 0.11881642D-01
+ -.15000000D+01 -.14000000D+01 0.70534117D+01 0.11676140D-01
+ -.14000000D+01 -.13000000D+01 0.73921577D+01 0.22098281D-01
+ -.13000000D+01 -.12000000D+01 0.77028763D+01 0.13782607D-01
+ -.12000000D+01 -.11000000D+01 0.79896416D+01 0.16670567D-01
+ -.11000000D+01 -.10000000D+01 0.82680785D+01 0.16660765D-01
+ -.10000000D+01 -.90000000D+00 0.85038988D+01 0.13867629D-01
+ -.90000000D+00 -.80000000D+00 0.87165511D+01 0.14149086D-01
+ -.80000000D+00 -.70000000D+00 0.89175607D+01 0.16100708D-01
+ -.70000000D+00 -.60000000D+00 0.91003928D+01 0.13858496D-01
+ -.60000000D+00 -.50000000D+00 0.92736701D+01 0.14914883D-01
+ -.50000000D+00 -.40000000D+00 0.94168088D+01 0.14840660D-01
+ -.40000000D+00 -.30000000D+00 0.94999682D+01 0.18819482D-01
+ -.30000000D+00 -.20000000D+00 0.95607553D+01 0.14379990D-01
+ -.20000000D+00 -.10000000D+00 0.96241732D+01 0.16089703D-01
+ -.10000000D+00 0.18041124D-15 0.96755642D+01 0.14653990D-01
+ 0.70776718D-15 0.10000000D+00 0.96759560D+01 0.15442578D-01
+ 0.10000000D+00 0.20000000D+00 0.96441092D+01 0.15525663D-01
+ 0.20000000D+00 0.30000000D+00 0.95961606D+01 0.14053073D-01
+ 0.30000000D+00 0.40000000D+00 0.94947364D+01 0.15556923D-01
+ 0.40000000D+00 0.50000000D+00 0.93856396D+01 0.15389876D-01
+ 0.50000000D+00 0.60000000D+00 0.92438463D+01 0.14300811D-01
+ 0.60000000D+00 0.70000000D+00 0.90962309D+01 0.14068010D-01
+ 0.70000000D+00 0.80000000D+00 0.89335644D+01 0.13671251D-01
+ 0.80000000D+00 0.90000000D+00 0.87226970D+01 0.13615119D-01
+ 0.90000000D+00 0.10000000D+01 0.85049994D+01 0.15200462D-01
+ 0.10000000D+01 0.11000000D+01 0.82840754D+01 0.13821276D-01
+ 0.11000000D+01 0.12000000D+01 0.79953562D+01 0.12949387D-01
+ 0.12000000D+01 0.13000000D+01 0.76806398D+01 0.12512021D-01
+ 0.13000000D+01 0.14000000D+01 0.73733387D+01 0.12637315D-01
+ 0.14000000D+01 0.15000000D+01 0.70460452D+01 0.12787795D-01
+ 0.15000000D+01 0.16000000D+01 0.66953061D+01 0.19204789D-01
+ 0.16000000D+01 0.17000000D+01 0.63424452D+01 0.11773069D-01
+ 0.17000000D+01 0.18000000D+01 0.59846215D+01 0.11307112D-01
+ 0.18000000D+01 0.19000000D+01 0.56055892D+01 0.11478931D-01
+ 0.19000000D+01 0.20000000D+01 0.52485426D+01 0.11750037D-01
+ 0.20000000D+01 0.21000000D+01 0.48655049D+01 0.10129618D-01
+ 0.21000000D+01 0.22000000D+01 0.44582600D+01 0.92471829D-02
+ 0.22000000D+01 0.23000000D+01 0.40801925D+01 0.11420521D-01
+ 0.23000000D+01 0.24000000D+01 0.36825216D+01 0.97382471D-02
+ 0.24000000D+01 0.25000000D+01 0.33163549D+01 0.81033308D-02
+ 0.25000000D+01 0.26000000D+01 0.29635503D+01 0.91333201D-02
+ 0.26000000D+01 0.27000000D+01 0.26370981D+01 0.72949584D-02
+ 0.27000000D+01 0.28000000D+01 0.23077289D+01 0.64640196D-02
+ 0.28000000D+01 0.29000000D+01 0.19901287D+01 0.84876735D-02
+ 0.29000000D+01 0.30000000D+01 0.17019370D+01 0.75303420D-02
+ 0.30000000D+01 0.31000000D+01 0.14467305D+01 0.56387349D-02
+ 0.31000000D+01 0.32000000D+01 0.12032729D+01 0.44841529D-02
+ 0.32000000D+01 0.33000000D+01 0.97944793D+00 0.46852397D-02
+ 0.33000000D+01 0.34000000D+01 0.78688822D+00 0.32015687D-02
+ 0.34000000D+01 0.35000000D+01 0.60884451D+00 0.26780239D-02
+ 0.35000000D+01 0.36000000D+01 0.46843621D+00 0.41232297D-02
+ 0.36000000D+01 0.37000000D+01 0.33129087D+00 0.19387700D-02
+ 0.37000000D+01 0.38000000D+01 0.23405963D+00 0.12700211D-02
+ 0.38000000D+01 0.39000000D+01 0.15615978D+00 0.84845757D-03
+ 0.39000000D+01 0.40000000D+01 0.94797802D-01 0.52981048D-03
+ 0.40000000D+01 0.41000000D+01 0.53018947D-01 0.37221229D-03
+ 0.41000000D+01 0.42000000D+01 0.26709487D-01 0.17331498D-03
+ 0.42000000D+01 0.43000000D+01 0.11458132D-01 0.95139523D-04
+ 0.43000000D+01 0.44000000D+01 0.40415396D-02 0.37612065D-04
+ 0.44000000D+01 0.45000000D+01 0.97998336D-03 0.18127448D-04
+ 0.45000000D+01 0.46000000D+01 0.11721306D-03 0.50594872D-05
+ 0.46000000D+01 0.47000000D+01 0.78794690D-06 0.48318332D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77573915D-06 0.48269449D-06
+ -.46000000D+01 -.45000000D+01 0.11273291D-03 0.50718328D-05
+ -.45000000D+01 -.44000000D+01 0.95938992D-03 0.15793030D-04
+ -.44000000D+01 -.43000000D+01 0.38046515D-02 0.37975315D-04
+ -.43000000D+01 -.42000000D+01 0.10659762D-01 0.81597452D-04
+ -.42000000D+01 -.41000000D+01 0.24476750D-01 0.17951442D-03
+ -.41000000D+01 -.40000000D+01 0.48263723D-01 0.32632107D-03
+ -.40000000D+01 -.39000000D+01 0.84647361D-01 0.55806300D-03
+ -.39000000D+01 -.38000000D+01 0.13672099D+00 0.10882571D-02
+ -.38000000D+01 -.37000000D+01 0.20569666D+00 0.13692160D-02
+ -.37000000D+01 -.36000000D+01 0.29094945D+00 0.18071668D-02
+ -.36000000D+01 -.35000000D+01 0.39751599D+00 0.31618776D-02
+ -.35000000D+01 -.34000000D+01 0.51567357D+00 0.35249713D-02
+ -.34000000D+01 -.33000000D+01 0.65856116D+00 0.36826685D-02
+ -.33000000D+01 -.32000000D+01 0.82171095D+00 0.38716149D-02
+ -.32000000D+01 -.31000000D+01 0.99241282D+00 0.42815278D-02
+ -.31000000D+01 -.30000000D+01 0.11747988D+01 0.59916659D-02
+ -.30000000D+01 -.29000000D+01 0.14029837D+01 0.57098614D-02
+ -.29000000D+01 -.28000000D+01 0.16141667D+01 0.63870126D-02
+ -.28000000D+01 -.27000000D+01 0.18436446D+01 0.86905698D-02
+ -.27000000D+01 -.26000000D+01 0.21124120D+01 0.72630227D-02
+ -.26000000D+01 -.25000000D+01 0.23602677D+01 0.74259429D-02
+ -.25000000D+01 -.24000000D+01 0.26312360D+01 0.79083347D-02
+ -.24000000D+01 -.23000000D+01 0.28976211D+01 0.85506991D-02
+ -.23000000D+01 -.22000000D+01 0.31790858D+01 0.90230736D-02
+ -.22000000D+01 -.21000000D+01 0.34852705D+01 0.97848665D-02
+ -.21000000D+01 -.20000000D+01 0.37918736D+01 0.97122801D-02
+ -.20000000D+01 -.19000000D+01 0.40608858D+01 0.11296246D-01
+ -.19000000D+01 -.18000000D+01 0.43356007D+01 0.10537972D-01
+ -.18000000D+01 -.17000000D+01 0.46158109D+01 0.13962708D-01
+ -.17000000D+01 -.16000000D+01 0.48783403D+01 0.13579040D-01
+ -.16000000D+01 -.15000000D+01 0.51494483D+01 0.11793189D-01
+ -.15000000D+01 -.14000000D+01 0.54066661D+01 0.11379135D-01
+ -.14000000D+01 -.13000000D+01 0.56611761D+01 0.21984050D-01
+ -.13000000D+01 -.12000000D+01 0.58811901D+01 0.13702365D-01
+ -.12000000D+01 -.11000000D+01 0.60868192D+01 0.16611330D-01
+ -.11000000D+01 -.10000000D+01 0.62844638D+01 0.16588223D-01
+ -.10000000D+01 -.90000000D+00 0.64525145D+01 0.13783722D-01
+ -.90000000D+00 -.80000000D+00 0.65978549D+01 0.14085001D-01
+ -.80000000D+00 -.70000000D+00 0.67385883D+01 0.16048167D-01
+ -.70000000D+00 -.60000000D+00 0.68684626D+01 0.13762231D-01
+ -.60000000D+00 -.50000000D+00 0.69969566D+01 0.14829296D-01
+ -.50000000D+00 -.40000000D+00 0.70993635D+01 0.14743172D-01
+ -.40000000D+00 -.30000000D+00 0.71525682D+01 0.18738095D-01
+ -.30000000D+00 -.20000000D+00 0.71888144D+01 0.14302714D-01
+ -.20000000D+00 -.10000000D+00 0.72379707D+01 0.16000506D-01
+ -.10000000D+00 0.18041124D-15 0.72784783D+01 0.14506518D-01
+ 0.70776718D-15 0.10000000D+00 0.72819009D+01 0.15317776D-01
+ 0.10000000D+00 0.20000000D+00 0.72572874D+01 0.15437235D-01
+ 0.20000000D+00 0.30000000D+00 0.72241668D+01 0.13960005D-01
+ 0.30000000D+00 0.40000000D+00 0.71482869D+01 0.15434955D-01
+ 0.40000000D+00 0.50000000D+00 0.70685590D+01 0.15278681D-01
+ 0.50000000D+00 0.60000000D+00 0.69653889D+01 0.14206393D-01
+ 0.60000000D+00 0.70000000D+00 0.68646060D+01 0.13889881D-01
+ 0.70000000D+00 0.80000000D+00 0.67547330D+01 0.13429629D-01
+ 0.80000000D+00 0.90000000D+00 0.66016909D+01 0.13418532D-01
+ 0.90000000D+00 0.10000000D+01 0.64535740D+01 0.15073112D-01
+ 0.10000000D+01 0.11000000D+01 0.63027146D+01 0.13759440D-01
+ 0.11000000D+01 0.12000000D+01 0.60916133D+01 0.12882477D-01
+ 0.12000000D+01 0.13000000D+01 0.58593821D+01 0.12426976D-01
+ 0.13000000D+01 0.14000000D+01 0.56384039D+01 0.12521492D-01
+ 0.14000000D+01 0.15000000D+01 0.54025185D+01 0.12707291D-01
+ 0.15000000D+01 0.16000000D+01 0.51444890D+01 0.19173089D-01
+ 0.16000000D+01 0.17000000D+01 0.48870619D+01 0.11686505D-01
+ 0.17000000D+01 0.18000000D+01 0.46273833D+01 0.11251819D-01
+ 0.18000000D+01 0.19000000D+01 0.43476047D+01 0.11428817D-01
+ 0.19000000D+01 0.20000000D+01 0.40888683D+01 0.11701029D-01
+ 0.20000000D+01 0.21000000D+01 0.38037424D+01 0.10076765D-01
+ 0.21000000D+01 0.22000000D+01 0.34950035D+01 0.91868783D-02
+ 0.22000000D+01 0.23000000D+01 0.32111058D+01 0.11365836D-01
+ 0.23000000D+01 0.24000000D+01 0.29044897D+01 0.96824303D-02
+ 0.24000000D+01 0.25000000D+01 0.26279683D+01 0.80419667D-02
+ 0.25000000D+01 0.26000000D+01 0.23588191D+01 0.91007282D-02
+ 0.26000000D+01 0.27000000D+01 0.21120708D+01 0.72476611D-02
+ 0.27000000D+01 0.28000000D+01 0.18587687D+01 0.63446309D-02
+ 0.28000000D+01 0.29000000D+01 0.16088858D+01 0.84169651D-02
+ 0.29000000D+01 0.30000000D+01 0.13845965D+01 0.75080951D-02
+ 0.30000000D+01 0.31000000D+01 0.11864738D+01 0.56176702D-02
+ 0.31000000D+01 0.32000000D+01 0.99449942D+00 0.44682619D-02
+ 0.32000000D+01 0.33000000D+01 0.81543719D+00 0.46766444D-02
+ 0.33000000D+01 0.34000000D+01 0.66148454D+00 0.31870345D-02
+ 0.34000000D+01 0.35000000D+01 0.51605366D+00 0.26675342D-02
+ 0.35000000D+01 0.36000000D+01 0.40195582D+00 0.41198333D-02
+ 0.36000000D+01 0.37000000D+01 0.28590843D+00 0.19337083D-02
+ 0.37000000D+01 0.38000000D+01 0.20464647D+00 0.12656722D-02
+ 0.38000000D+01 0.39000000D+01 0.13834300D+00 0.84591645D-03
+ 0.39000000D+01 0.40000000D+01 0.84865682D-01 0.52833379D-03
+ 0.40000000D+01 0.41000000D+01 0.48020000D-01 0.37152637D-03
+ 0.41000000D+01 0.42000000D+01 0.24507012D-01 0.17292183D-03
+ 0.42000000D+01 0.43000000D+01 0.10649595D-01 0.95016613D-04
+ 0.43000000D+01 0.44000000D+01 0.38129833D-02 0.37585723D-04
+ 0.44000000D+01 0.45000000D+01 0.93928039D-03 0.18118893D-04
+ 0.45000000D+01 0.46000000D+01 0.11445435D-03 0.50592951D-05
+ 0.46000000D+01 0.47000000D+01 0.78377532D-06 0.48318321D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77779066D-06 0.48269455D-06
+ -.46000000D+01 -.45000000D+01 0.11401212D-03 0.50718884D-05
+ -.45000000D+01 -.44000000D+01 0.97777102D-03 0.15794251D-04
+ -.44000000D+01 -.43000000D+01 0.39039435D-02 0.37993330D-04
+ -.43000000D+01 -.42000000D+01 0.11001613D-01 0.81653790D-04
+ -.42000000D+01 -.41000000D+01 0.25389120D-01 0.17965267D-03
+ -.41000000D+01 -.40000000D+01 0.50289473D-01 0.32661823D-03
+ -.40000000D+01 -.39000000D+01 0.88585893D-01 0.55858176D-03
+ -.39000000D+01 -.38000000D+01 0.14363483D+00 0.10891293D-02
+ -.38000000D+01 -.37000000D+01 0.21669663D+00 0.14755590D-02
+ -.37000000D+01 -.36000000D+01 0.30811849D+00 0.18916597D-02
+ -.36000000D+01 -.35000000D+01 0.42195096D+00 0.32332216D-02
+ -.35000000D+01 -.34000000D+01 0.54910185D+00 0.35898971D-02
+ -.34000000D+01 -.33000000D+01 0.70302357D+00 0.36878528D-02
+ -.33000000D+01 -.32000000D+01 0.87896730D+00 0.38769697D-02
+ -.32000000D+01 -.31000000D+01 0.10641646D+01 0.42895874D-02
+ -.31000000D+01 -.30000000D+01 0.12628826D+01 0.59997153D-02
+ -.30000000D+01 -.29000000D+01 0.15092847D+01 0.57292378D-02
+ -.29000000D+01 -.28000000D+01 0.17396859D+01 0.64048926D-02
+ -.28000000D+01 -.27000000D+01 0.19906223D+01 0.87010846D-02
+ -.27000000D+01 -.26000000D+01 0.22820542D+01 0.72749270D-02
+ -.26000000D+01 -.25000000D+01 0.25533719D+01 0.74395415D-02
+ -.25000000D+01 -.24000000D+01 0.28491915D+01 0.79220945D-02
+ -.24000000D+01 -.23000000D+01 0.31412824D+01 0.85666549D-02
+ -.23000000D+01 -.22000000D+01 0.34493332D+01 0.90371074D-02
+ -.22000000D+01 -.21000000D+01 0.37826903D+01 0.98044296D-02
+ -.21000000D+01 -.20000000D+01 0.41168254D+01 0.97312750D-02
+ -.20000000D+01 -.19000000D+01 0.44138527D+01 0.11312429D-01
+ -.19000000D+01 -.18000000D+01 0.47156578D+01 0.10560430D-01
+ -.18000000D+01 -.17000000D+01 0.50231331D+01 0.13984237D-01
+ -.17000000D+01 -.16000000D+01 0.53124039D+01 0.13593530D-01
+ -.16000000D+01 -.15000000D+01 0.56094726D+01 0.11816451D-01
+ -.15000000D+01 -.14000000D+01 0.58927231D+01 0.11440966D-01
+ -.14000000D+01 -.13000000D+01 0.61701090D+01 0.22003651D-01
+ -.13000000D+01 -.12000000D+01 0.64139588D+01 0.13726495D-01
+ -.12000000D+01 -.11000000D+01 0.66412358D+01 0.16630419D-01
+ -.11000000D+01 -.10000000D+01 0.68602548D+01 0.16611838D-01
+ -.10000000D+01 -.90000000D+00 0.70460456D+01 0.13810534D-01
+ -.90000000D+00 -.80000000D+00 0.72088260D+01 0.14103302D-01
+ -.80000000D+00 -.70000000D+00 0.73652840D+01 0.16065640D-01
+ -.70000000D+00 -.60000000D+00 0.75088806D+01 0.13786800D-01
+ -.60000000D+00 -.50000000D+00 0.76489985D+01 0.14852226D-01
+ -.50000000D+00 -.40000000D+00 0.77618298D+01 0.14768345D-01
+ -.40000000D+00 -.30000000D+00 0.78226582D+01 0.18762851D-01
+ -.30000000D+00 -.20000000D+00 0.78653709D+01 0.14324564D-01
+ -.20000000D+00 -.10000000D+00 0.79180951D+01 0.16023487D-01
+ -.10000000D+00 0.18041124D-15 0.79612226D+01 0.14536410D-01
+ 0.70776718D-15 0.10000000D+00 0.79642434D+01 0.15346045D-01
+ 0.10000000D+00 0.20000000D+00 0.79375733D+01 0.15464000D-01
+ 0.20000000D+00 0.30000000D+00 0.79008718D+01 0.13991904D-01
+ 0.30000000D+00 0.40000000D+00 0.78182368D+01 0.15469454D-01
+ 0.40000000D+00 0.50000000D+00 0.77309663D+01 0.15312052D-01
+ 0.50000000D+00 0.60000000D+00 0.76177938D+01 0.14232935D-01
+ 0.60000000D+00 0.70000000D+00 0.75050151D+01 0.13941146D-01
+ 0.70000000D+00 0.80000000D+00 0.73813068D+01 0.13502400D-01
+ 0.80000000D+00 0.90000000D+00 0.72134618D+01 0.13468004D-01
+ 0.90000000D+00 0.10000000D+01 0.70470247D+01 0.15103920D-01
+ 0.10000000D+01 0.11000000D+01 0.68777958D+01 0.13780248D-01
+ 0.11000000D+01 0.12000000D+01 0.66462529D+01 0.12905083D-01
+ 0.12000000D+01 0.13000000D+01 0.63922235D+01 0.12452835D-01
+ 0.13000000D+01 0.14000000D+01 0.61481151D+01 0.12554994D-01
+ 0.14000000D+01 0.15000000D+01 0.58878410D+01 0.12732532D-01
+ 0.15000000D+01 0.16000000D+01 0.56046021D+01 0.19181230D-01
+ 0.16000000D+01 0.17000000D+01 0.53212310D+01 0.11706440D-01
+ 0.17000000D+01 0.18000000D+01 0.50348156D+01 0.11267463D-01
+ 0.18000000D+01 0.19000000D+01 0.47276916D+01 0.11445151D-01
+ 0.19000000D+01 0.20000000D+01 0.44415645D+01 0.11715941D-01
+ 0.20000000D+01 0.21000000D+01 0.41289564D+01 0.10093415D-01
+ 0.21000000D+01 0.22000000D+01 0.37921720D+01 0.92028347D-02
+ 0.22000000D+01 0.23000000D+01 0.34813324D+01 0.11376243D-01
+ 0.23000000D+01 0.24000000D+01 0.31484652D+01 0.96944532D-02
+ 0.24000000D+01 0.25000000D+01 0.28459318D+01 0.80588654D-02
+ 0.25000000D+01 0.26000000D+01 0.25519816D+01 0.91114019D-02
+ 0.26000000D+01 0.27000000D+01 0.22816401D+01 0.72623549D-02
+ 0.27000000D+01 0.28000000D+01 0.20053526D+01 0.63861314D-02
+ 0.28000000D+01 0.29000000D+01 0.17348908D+01 0.84417088D-02
+ 0.29000000D+01 0.30000000D+01 0.14907754D+01 0.75161297D-02
+ 0.30000000D+01 0.31000000D+01 0.12746795D+01 0.56256040D-02
+ 0.31000000D+01 0.32000000D+01 0.10662677D+01 0.44740003D-02
+ 0.32000000D+01 0.33000000D+01 0.87266974D+00 0.46797087D-02
+ 0.33000000D+01 0.34000000D+01 0.70596616D+00 0.31922918D-02
+ 0.34000000D+01 0.35000000D+01 0.54951668D+00 0.26714051D-02
+ 0.35000000D+01 0.36000000D+01 0.42634749D+00 0.41207205D-02
+ 0.36000000D+01 0.37000000D+01 0.30284966D+00 0.19355964D-02
+ 0.37000000D+01 0.38000000D+01 0.21584867D+00 0.12673982D-02
+ 0.38000000D+01 0.39000000D+01 0.14526223D+00 0.84693880D-03
+ 0.39000000D+01 0.40000000D+01 0.88802676D-01 0.52894631D-03
+ 0.40000000D+01 0.41000000D+01 0.50042303D-01 0.37182039D-03
+ 0.41000000D+01 0.42000000D+01 0.25418468D-01 0.17308035D-03
+ 0.42000000D+01 0.43000000D+01 0.10991930D-01 0.95070833D-04
+ 0.43000000D+01 0.44000000D+01 0.39122508D-02 0.37597641D-04
+ 0.44000000D+01 0.45000000D+01 0.95754930D-03 0.18121548D-04
+ 0.45000000D+01 0.46000000D+01 0.11573099D-03 0.50593861D-05
+ 0.46000000D+01 0.47000000D+01 0.78579308D-06 0.48318326D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77890112D-06 0.48269458D-06
+ -.46000000D+01 -.45000000D+01 0.11474675D-03 0.50719196D-05
+ -.45000000D+01 -.44000000D+01 0.98877270D-03 0.15794929D-04
+ -.44000000D+01 -.43000000D+01 0.39654596D-02 0.38003692D-04
+ -.43000000D+01 -.42000000D+01 0.11219290D-01 0.81687548D-04
+ -.42000000D+01 -.41000000D+01 0.25984059D-01 0.17973794D-03
+ -.41000000D+01 -.40000000D+01 0.51638764D-01 0.32679642D-03
+ -.40000000D+01 -.39000000D+01 0.91259591D-01 0.55890656D-03
+ -.39000000D+01 -.38000000D+01 0.14841310D+00 0.10896806D-02
+ -.38000000D+01 -.37000000D+01 0.22440698D+00 0.15706871D-02
+ -.37000000D+01 -.36000000D+01 0.32037568D+00 0.19686979D-02
+ -.36000000D+01 -.35000000D+01 0.43960705D+00 0.32744412D-02
+ -.35000000D+01 -.34000000D+01 0.57360130D+00 0.36280685D-02
+ -.34000000D+01 -.33000000D+01 0.73598133D+00 0.36917669D-02
+ -.33000000D+01 -.32000000D+01 0.92184531D+00 0.38806522D-02
+ -.32000000D+01 -.31000000D+01 0.11184304D+01 0.42953056D-02
+ -.31000000D+01 -.30000000D+01 0.13300638D+01 0.60056318D-02
+ -.30000000D+01 -.29000000D+01 0.15910257D+01 0.57460808D-02
+ -.29000000D+01 -.28000000D+01 0.18368323D+01 0.64220019D-02
+ -.28000000D+01 -.27000000D+01 0.21052189D+01 0.87100334D-02
+ -.27000000D+01 -.26000000D+01 0.24150556D+01 0.72843559D-02
+ -.26000000D+01 -.25000000D+01 0.27055164D+01 0.74520679D-02
+ -.25000000D+01 -.24000000D+01 0.30218212D+01 0.79341969D-02
+ -.24000000D+01 -.23000000D+01 0.33351329D+01 0.85775833D-02
+ -.23000000D+01 -.22000000D+01 0.36651780D+01 0.90473017D-02
+ -.22000000D+01 -.21000000D+01 0.40211150D+01 0.98176425D-02
+ -.21000000D+01 -.20000000D+01 0.43781814D+01 0.97447679D-02
+ -.20000000D+01 -.19000000D+01 0.46986202D+01 0.11325958D-01
+ -.19000000D+01 -.18000000D+01 0.50230014D+01 0.10579029D-01
+ -.18000000D+01 -.17000000D+01 0.53536344D+01 0.13999911D-01
+ -.17000000D+01 -.16000000D+01 0.56654591D+01 0.13606290D-01
+ -.16000000D+01 -.15000000D+01 0.59845749D+01 0.11836591D-01
+ -.15000000D+01 -.14000000D+01 0.62899262D+01 0.11510889D-01
+ -.14000000D+01 -.13000000D+01 0.65864835D+01 0.22028735D-01
+ -.13000000D+01 -.12000000D+01 0.68508501D+01 0.13746202D-01
+ -.12000000D+01 -.11000000D+01 0.70965671D+01 0.16645337D-01
+ -.11000000D+01 -.10000000D+01 0.73338803D+01 0.16630207D-01
+ -.10000000D+01 -.90000000D+00 0.75348709D+01 0.13830869D-01
+ -.90000000D+00 -.80000000D+00 0.77126321D+01 0.14117284D-01
+ -.80000000D+00 -.70000000D+00 0.78826784D+01 0.16078174D-01
+ -.70000000D+00 -.60000000D+00 0.80380105D+01 0.13807912D-01
+ -.60000000D+00 -.50000000D+00 0.81881541D+01 0.14871997D-01
+ -.50000000D+00 -.40000000D+00 0.83099840D+01 0.14788832D-01
+ -.40000000D+00 -.30000000D+00 0.83774437D+01 0.18781623D-01
+ -.30000000D+00 -.20000000D+00 0.84256823D+01 0.14341788D-01
+ -.20000000D+00 -.10000000D+00 0.84814761D+01 0.16042941D-01
+ -.10000000D+00 0.18041124D-15 0.85270128D+01 0.14565523D-01
+ 0.70776718D-15 0.10000000D+00 0.85294445D+01 0.15371109D-01
+ 0.10000000D+00 0.20000000D+00 0.85010891D+01 0.15485780D-01
+ 0.20000000D+00 0.30000000D+00 0.84612233D+01 0.14015762D-01
+ 0.30000000D+00 0.40000000D+00 0.83728513D+01 0.15497955D-01
+ 0.40000000D+00 0.50000000D+00 0.82790844D+01 0.15338188D-01
+ 0.50000000D+00 0.60000000D+00 0.81573197D+01 0.14255141D-01
+ 0.60000000D+00 0.70000000D+00 0.80341407D+01 0.13981740D-01
+ 0.70000000D+00 0.80000000D+00 0.78985174D+01 0.13563353D-01
+ 0.80000000D+00 0.90000000D+00 0.77179804D+01 0.13515709D-01
+ 0.90000000D+00 0.10000000D+01 0.75357437D+01 0.15132245D-01
+ 0.10000000D+01 0.11000000D+01 0.73508317D+01 0.13795303D-01
+ 0.11000000D+01 0.12000000D+01 0.71017630D+01 0.12922213D-01
+ 0.12000000D+01 0.13000000D+01 0.68291515D+01 0.12472854D-01
+ 0.13000000D+01 0.14000000D+01 0.65653766D+01 0.12581895D-01
+ 0.14000000D+01 0.15000000D+01 0.62842921D+01 0.12751459D-01
+ 0.15000000D+01 0.16000000D+01 0.59797290D+01 0.19187902D-01
+ 0.16000000D+01 0.17000000D+01 0.56743938D+01 0.11724033D-01
+ 0.17000000D+01 0.18000000D+01 0.53653809D+01 0.11279931D-01
+ 0.18000000D+01 0.19000000D+01 0.50351596D+01 0.11457517D-01
+ 0.19000000D+01 0.20000000D+01 0.47260684D+01 0.11727454D-01
+ 0.20000000D+01 0.21000000D+01 0.43904822D+01 0.10105694D-01
+ 0.21000000D+01 0.22000000D+01 0.40303863D+01 0.92156424D-02
+ 0.22000000D+01 0.23000000D+01 0.36971848D+01 0.11385428D-01
+ 0.23000000D+01 0.24000000D+01 0.33425974D+01 0.97043415D-02
+ 0.24000000D+01 0.25000000D+01 0.30185264D+01 0.80730790D-02
+ 0.25000000D+01 0.26000000D+01 0.27042481D+01 0.91188490D-02
+ 0.26000000D+01 0.27000000D+01 0.24145958D+01 0.72740416D-02
+ 0.27000000D+01 0.28000000D+01 0.21195932D+01 0.64177873D-02
+ 0.28000000D+01 0.29000000D+01 0.18324529D+01 0.84605592D-02
+ 0.29000000D+01 0.30000000D+01 0.15723982D+01 0.75218873D-02
+ 0.30000000D+01 0.31000000D+01 0.13419748D+01 0.56310548D-02
+ 0.31000000D+01 0.32000000D+01 0.11205514D+01 0.44780664D-02
+ 0.32000000D+01 0.33000000D+01 0.91554288D+00 0.46818828D-02
+ 0.33000000D+01 0.34000000D+01 0.73892209D+00 0.31960552D-02
+ 0.34000000D+01 0.35000000D+01 0.57402210D+00 0.26741410D-02
+ 0.35000000D+01 0.36000000D+01 0.44398985D+00 0.41215539D-02
+ 0.36000000D+01 0.37000000D+01 0.31493968D+00 0.19368445D-02
+ 0.37000000D+01 0.38000000D+01 0.22371708D+00 0.12685465D-02
+ 0.38000000D+01 0.39000000D+01 0.15004359D+00 0.84760504D-03
+ 0.39000000D+01 0.40000000D+01 0.91474562D-01 0.52934036D-03
+ 0.40000000D+01 0.41000000D+01 0.51389449D-01 0.37200262D-03
+ 0.41000000D+01 0.42000000D+01 0.26012488D-01 0.17318403D-03
+ 0.42000000D+01 0.43000000D+01 0.11209928D-01 0.95103723D-04
+ 0.43000000D+01 0.44000000D+01 0.39737533D-02 0.37604605D-04
+ 0.44000000D+01 0.45000000D+01 0.96845339D-03 0.18123726D-04
+ 0.45000000D+01 0.46000000D+01 0.11646426D-03 0.50594368D-05
+ 0.46000000D+01 0.47000000D+01 0.78688480D-06 0.48318329D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77942875D-06 0.48269459D-06
+ -.46000000D+01 -.45000000D+01 0.11510823D-03 0.50719348D-05
+ -.45000000D+01 -.44000000D+01 0.99433780D-03 0.15795258D-04
+ -.44000000D+01 -.43000000D+01 0.39973756D-02 0.38008845D-04
+ -.43000000D+01 -.42000000D+01 0.11334693D-01 0.81704822D-04
+ -.42000000D+01 -.41000000D+01 0.26305784D-01 0.17978226D-03
+ -.41000000D+01 -.40000000D+01 0.52382012D-01 0.32688779D-03
+ -.40000000D+01 -.39000000D+01 0.92757998D-01 0.55907801D-03
+ -.39000000D+01 -.38000000D+01 0.15113583D+00 0.10899731D-02
+ -.38000000D+01 -.37000000D+01 0.22886749D+00 0.16315129D-02
+ -.37000000D+01 -.36000000D+01 0.32757801D+00 0.20186795D-02
+ -.36000000D+01 -.35000000D+01 0.45012443D+00 0.32947391D-02
+ -.35000000D+01 -.34000000D+01 0.58840147D+00 0.36472378D-02
+ -.34000000D+01 -.33000000D+01 0.75614162D+00 0.36942348D-02
+ -.33000000D+01 -.32000000D+01 0.94836551D+00 0.38828428D-02
+ -.32000000D+01 -.31000000D+01 0.11523631D+01 0.42988679D-02
+ -.31000000D+01 -.30000000D+01 0.13724757D+01 0.60093278D-02
+ -.30000000D+01 -.29000000D+01 0.16431089D+01 0.57573693D-02
+ -.29000000D+01 -.28000000D+01 0.18992148D+01 0.64359623D-02
+ -.28000000D+01 -.27000000D+01 0.21794406D+01 0.87174249D-02
+ -.27000000D+01 -.26000000D+01 0.25017715D+01 0.72909215D-02
+ -.26000000D+01 -.25000000D+01 0.28053342D+01 0.74618110D-02
+ -.25000000D+01 -.24000000D+01 0.31357729D+01 0.79430480D-02
+ -.24000000D+01 -.23000000D+01 0.34637973D+01 0.85836289D-02
+ -.23000000D+01 -.22000000D+01 0.38091275D+01 0.90541900D-02
+ -.22000000D+01 -.21000000D+01 0.41808825D+01 0.98254780D-02
+ -.21000000D+01 -.20000000D+01 0.45540388D+01 0.97528321D-02
+ -.20000000D+01 -.19000000D+01 0.48910141D+01 0.11337897D-01
+ -.19000000D+01 -.18000000D+01 0.52311670D+01 0.10593962D-01
+ -.18000000D+01 -.17000000D+01 0.55784695D+01 0.14010055D-01
+ -.17000000D+01 -.16000000D+01 0.59063186D+01 0.13616474D-01
+ -.16000000D+01 -.15000000D+01 0.62412931D+01 0.11851773D-01
+ -.15000000D+01 -.14000000D+01 0.65624589D+01 0.11569430D-01
+ -.14000000D+01 -.13000000D+01 0.68727116D+01 0.22051828D-01
+ -.13000000D+01 -.12000000D+01 0.71520031D+01 0.13759771D-01
+ -.12000000D+01 -.11000000D+01 0.74110331D+01 0.16655030D-01
+ -.11000000D+01 -.10000000D+01 0.76615785D+01 0.16642008D-01
+ -.10000000D+01 -.90000000D+00 0.78736244D+01 0.13844083D-01
+ -.90000000D+00 -.80000000D+00 0.80623254D+01 0.14127237D-01
+ -.80000000D+00 -.70000000D+00 0.82422696D+01 0.16086219D-01
+ -.70000000D+00 -.60000000D+00 0.84061860D+01 0.13823956D-01
+ -.60000000D+00 -.50000000D+00 0.85636220D+01 0.14886963D-01
+ -.50000000D+00 -.40000000D+00 0.86920785D+01 0.14803937D-01
+ -.40000000D+00 -.30000000D+00 0.87644098D+01 0.18794396D-01
+ -.30000000D+00 -.20000000D+00 0.88166431D+01 0.14354017D-01
+ -.20000000D+00 -.10000000D+00 0.88747055D+01 0.16057601D-01
+ -.10000000D+00 0.18041124D-15 0.89221061D+01 0.14591529D-01
+ 0.70776718D-15 0.10000000D+00 0.89239431D+01 0.15392150D-01
+ 0.10000000D+00 0.20000000D+00 0.88944264D+01 0.15500570D-01
+ 0.20000000D+00 0.30000000D+00 0.88521663D+01 0.14030688D-01
+ 0.30000000D+00 0.40000000D+00 0.87596496D+01 0.15518182D-01
+ 0.40000000D+00 0.50000000D+00 0.86611515D+01 0.15355939D-01
+ 0.50000000D+00 0.60000000D+00 0.85330983D+01 0.14270948D-01
+ 0.60000000D+00 0.70000000D+00 0.84022808D+01 0.14009176D-01
+ 0.70000000D+00 0.80000000D+00 0.82580054D+01 0.13603639D-01
+ 0.80000000D+00 0.90000000D+00 0.80681363D+01 0.13551700D-01
+ 0.90000000D+00 0.10000000D+01 0.78744346D+01 0.15154739D-01
+ 0.10000000D+01 0.11000000D+01 0.76781435D+01 0.13804938D-01
+ 0.11000000D+01 0.12000000D+01 0.74163533D+01 0.12933283D-01
+ 0.12000000D+01 0.13000000D+01 0.71302820D+01 0.12486402D-01
+ 0.13000000D+01 0.14000000D+01 0.68523496D+01 0.12600527D-01
+ 0.14000000D+01 0.15000000D+01 0.65562442D+01 0.12764055D-01
+ 0.15000000D+01 0.16000000D+01 0.62364237D+01 0.19192987D-01
+ 0.16000000D+01 0.17000000D+01 0.59153898D+01 0.11738401D-01
+ 0.17000000D+01 0.18000000D+01 0.55902033D+01 0.11288731D-01
+ 0.18000000D+01 0.19000000D+01 0.52435366D+01 0.11465670D-01
+ 0.19000000D+01 0.20000000D+01 0.49182138D+01 0.11735347D-01
+ 0.20000000D+01 0.21000000D+01 0.45664154D+01 0.10113802D-01
+ 0.21000000D+01 0.22000000D+01 0.41899918D+01 0.92251321D-02
+ 0.22000000D+01 0.23000000D+01 0.38411688D+01 0.11393700D-01
+ 0.23000000D+01 0.24000000D+01 0.34714519D+01 0.97128253D-02
+ 0.24000000D+01 0.25000000D+01 0.31324347D+01 0.80832305D-02
+ 0.25000000D+01 0.26000000D+01 0.28041983D+01 0.91234518D-02
+ 0.26000000D+01 0.27000000D+01 0.25012768D+01 0.72819191D-02
+ 0.27000000D+01 0.28000000D+01 0.21935588D+01 0.64371540D-02
+ 0.28000000D+01 0.29000000D+01 0.18951200D+01 0.84720290D-02
+ 0.29000000D+01 0.30000000D+01 0.16244010D+01 0.75253813D-02
+ 0.30000000D+01 0.31000000D+01 0.13844780D+01 0.56342676D-02
+ 0.31000000D+01 0.32000000D+01 0.11544979D+01 0.44805531D-02
+ 0.32000000D+01 0.33000000D+01 0.94206930D+00 0.46832441D-02
+ 0.33000000D+01 0.34000000D+01 0.75906915D+00 0.31983588D-02
+ 0.34000000D+01 0.35000000D+01 0.58882027D+00 0.26757871D-02
+ 0.35000000D+01 0.36000000D+01 0.45450404D+00 0.41221731D-02
+ 0.36000000D+01 0.37000000D+01 0.32204904D+00 0.19375856D-02
+ 0.37000000D+01 0.38000000D+01 0.22827102D+00 0.12691969D-02
+ 0.38000000D+01 0.39000000D+01 0.15276780D+00 0.84798036D-03
+ 0.39000000D+01 0.40000000D+01 0.92971697D-01 0.52955490D-03
+ 0.40000000D+01 0.41000000D+01 0.52131622D-01 0.37209927D-03
+ 0.41000000D+01 0.42000000D+01 0.26333567D-01 0.17324225D-03
+ 0.42000000D+01 0.43000000D+01 0.11325504D-01 0.95120627D-04
+ 0.43000000D+01 0.44000000D+01 0.40056652D-02 0.37608127D-04
+ 0.44000000D+01 0.45000000D+01 0.97395438D-03 0.18125221D-04
+ 0.45000000D+01 0.46000000D+01 0.11682510D-03 0.50594612D-05
+ 0.46000000D+01 0.47000000D+01 0.78740338D-06 0.48318331D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77309588D-06 0.48269449D-06
+ -.46000000D+01 -.45000000D+01 0.11067582D-03 0.50718586D-05
+ -.45000000D+01 -.44000000D+01 0.92725612D-03 0.15794601D-04
+ -.44000000D+01 -.43000000D+01 0.36238570D-02 0.37983720D-04
+ -.43000000D+01 -.42000000D+01 0.10020339D-01 0.81656472D-04
+ -.42000000D+01 -.41000000D+01 0.22754193D-01 0.17967015D-03
+ -.41000000D+01 -.40000000D+01 0.44403138D-01 0.32665875D-03
+ -.40000000D+01 -.39000000D+01 0.77075745D-01 0.55885696D-03
+ -.39000000D+01 -.38000000D+01 0.12334294D+00 0.10892142D-02
+ -.38000000D+01 -.37000000D+01 0.18414586D+00 0.13150814D-02
+ -.37000000D+01 -.36000000D+01 0.25784125D+00 0.17674439D-02
+ -.36000000D+01 -.35000000D+01 0.35002679D+00 0.31427051D-02
+ -.35000000D+01 -.34000000D+01 0.45026935D+00 0.35093428D-02
+ -.34000000D+01 -.33000000D+01 0.57157225D+00 0.36864672D-02
+ -.33000000D+01 -.32000000D+01 0.70966852D+00 0.38773300D-02
+ -.32000000D+01 -.31000000D+01 0.85180000D+00 0.42872160D-02
+ -.31000000D+01 -.30000000D+01 0.10022170D+01 0.59960739D-02
+ -.30000000D+01 -.29000000D+01 0.11948401D+01 0.57144098D-02
+ -.29000000D+01 -.28000000D+01 0.13680548D+01 0.63912048D-02
+ -.28000000D+01 -.27000000D+01 0.15561327D+01 0.86966999D-02
+ -.27000000D+01 -.26000000D+01 0.17811516D+01 0.72704493D-02
+ -.26000000D+01 -.25000000D+01 0.19828384D+01 0.74327297D-02
+ -.25000000D+01 -.24000000D+01 0.22052994D+01 0.79172933D-02
+ -.24000000D+01 -.23000000D+01 0.24216808D+01 0.85646797D-02
+ -.23000000D+01 -.22000000D+01 0.26521715D+01 0.90400437D-02
+ -.22000000D+01 -.21000000D+01 0.29060147D+01 0.97988975D-02
+ -.21000000D+01 -.20000000D+01 0.31590327D+01 0.97256836D-02
+ -.20000000D+01 -.19000000D+01 0.33745609D+01 0.11310353D-01
+ -.19000000D+01 -.18000000D+01 0.35967716D+01 0.10547109D-01
+ -.18000000D+01 -.17000000D+01 0.38244979D+01 0.13980397D-01
+ -.17000000D+01 -.16000000D+01 0.40357473D+01 0.13584931D-01
+ -.16000000D+01 -.15000000D+01 0.42565816D+01 0.11804690D-01
+ -.15000000D+01 -.14000000D+01 0.44649563D+01 0.11370430D-01
+ -.14000000D+01 -.13000000D+01 0.46735677D+01 0.21988585D-01
+ -.13000000D+01 -.12000000D+01 0.48488151D+01 0.13717006D-01
+ -.12000000D+01 -.11000000D+01 0.50120371D+01 0.16627327D-01
+ -.11000000D+01 -.10000000D+01 0.51698810D+01 0.16595251D-01
+ -.10000000D+01 -.90000000D+00 0.53026932D+01 0.13796747D-01
+ -.90000000D+00 -.80000000D+00 0.54144959D+01 0.14105394D-01
+ -.80000000D+00 -.70000000D+00 0.55251041D+01 0.16059383D-01
+ -.70000000D+00 -.60000000D+00 0.56281568D+01 0.13785032D-01
+ -.60000000D+00 -.50000000D+00 0.57340342D+01 0.14838995D-01
+ -.50000000D+00 -.40000000D+00 0.58172770D+01 0.14758940D-01
+ -.40000000D+00 -.30000000D+00 0.58553546D+01 0.18749439D-01
+ -.30000000D+00 -.20000000D+00 0.58793203D+01 0.14315765D-01
+ -.20000000D+00 -.10000000D+00 0.59211494D+01 0.16012195D-01
+ -.10000000D+00 0.18041124D-15 0.59574111D+01 0.14517675D-01
+ 0.70776718D-15 0.10000000D+00 0.59610809D+01 0.15335416D-01
+ 0.10000000D+00 0.20000000D+00 0.59401866D+01 0.15442375D-01
+ 0.20000000D+00 0.30000000D+00 0.59149017D+01 0.13976110D-01
+ 0.30000000D+00 0.40000000D+00 0.58510976D+01 0.15442926D-01
+ 0.40000000D+00 0.50000000D+00 0.57863550D+01 0.15286936D-01
+ 0.50000000D+00 0.60000000D+00 0.57024847D+01 0.14217802D-01
+ 0.60000000D+00 0.70000000D+00 0.56243927D+01 0.13896302D-01
+ 0.70000000D+00 0.80000000D+00 0.55414439D+01 0.13426474D-01
+ 0.80000000D+00 0.90000000D+00 0.54180594D+01 0.13424239D-01
+ 0.90000000D+00 0.10000000D+01 0.53032490D+01 0.15097347D-01
+ 0.10000000D+01 0.11000000D+01 0.51881110D+01 0.13775608D-01
+ 0.11000000D+01 0.12000000D+01 0.50164499D+01 0.12901914D-01
+ 0.12000000D+01 0.13000000D+01 0.48267703D+01 0.12442580D-01
+ 0.13000000D+01 0.14000000D+01 0.46500612D+01 0.12522879D-01
+ 0.14000000D+01 0.15000000D+01 0.44613853D+01 0.12720596D-01
+ 0.15000000D+01 0.16000000D+01 0.42515894D+01 0.19195799D-01
+ 0.16000000D+01 0.17000000D+01 0.40441772D+01 0.11698869D-01
+ 0.17000000D+01 0.18000000D+01 0.38363257D+01 0.11263348D-01
+ 0.18000000D+01 0.19000000D+01 0.36086110D+01 0.11445161D-01
+ 0.19000000D+01 0.20000000D+01 0.34029824D+01 0.11713806D-01
+ 0.20000000D+01 0.21000000D+01 0.31712443D+01 0.10087302D-01
+ 0.21000000D+01 0.22000000D+01 0.29157528D+01 0.91971068D-02
+ 0.22000000D+01 0.23000000D+01 0.26844397D+01 0.11374948D-01
+ 0.23000000D+01 0.24000000D+01 0.24282913D+01 0.96949386D-02
+ 0.24000000D+01 0.25000000D+01 0.22022193D+01 0.80537622D-02
+ 0.25000000D+01 0.26000000D+01 0.19812565D+01 0.91227674D-02
+ 0.26000000D+01 0.27000000D+01 0.17804542D+01 0.72549642D-02
+ 0.27000000D+01 0.28000000D+01 0.15713516D+01 0.63376714D-02
+ 0.28000000D+01 0.29000000D+01 0.13624555D+01 0.84141647D-02
+ 0.29000000D+01 0.30000000D+01 0.11765445D+01 0.75138572D-02
+ 0.30000000D+01 0.31000000D+01 0.10139597D+01 0.56233109D-02
+ 0.31000000D+01 0.32000000D+01 0.85384579D+00 0.44743435D-02
+ 0.32000000D+01 0.33000000D+01 0.70342462D+00 0.46823299D-02
+ 0.33000000D+01 0.34000000D+01 0.57458521D+00 0.31912851D-02
+ 0.34000000D+01 0.35000000D+01 0.45064988D+00 0.26710936D-02
+ 0.35000000D+01 0.36000000D+01 0.35444291D+00 0.41219379D-02
+ 0.36000000D+01 0.37000000D+01 0.25292717D+00 0.19367699D-02
+ 0.37000000D+01 0.38000000D+01 0.18294788D+00 0.12671037D-02
+ 0.38000000D+01 0.39000000D+01 0.12498880D+00 0.84712775D-03
+ 0.39000000D+01 0.40000000D+01 0.77293986D-01 0.52911100D-03
+ 0.40000000D+01 0.41000000D+01 0.44157681D-01 0.37183705D-03
+ 0.41000000D+01 0.42000000D+01 0.22782383D-01 0.17313684D-03
+ 0.42000000D+01 0.43000000D+01 0.10010173D-01 0.95047838D-04
+ 0.43000000D+01 0.44000000D+01 0.36321499D-02 0.37595748D-04
+ 0.44000000D+01 0.45000000D+01 0.90723760D-03 0.18119633D-04
+ 0.45000000D+01 0.46000000D+01 0.11239719D-03 0.50593351D-05
+ 0.46000000D+01 0.47000000D+01 0.78114125D-06 0.48318322D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77818785D-06 0.48269458D-06
+ -.46000000D+01 -.45000000D+01 0.11410056D-03 0.50719261D-05
+ -.45000000D+01 -.44000000D+01 0.97768696D-03 0.15795401D-04
+ -.44000000D+01 -.43000000D+01 0.38983589D-02 0.38005856D-04
+ -.43000000D+01 -.42000000D+01 0.10968166D-01 0.81704787D-04
+ -.42000000D+01 -.41000000D+01 0.25275223D-01 0.17977929D-03
+ -.41000000D+01 -.40000000D+01 0.49983893D-01 0.32689219D-03
+ -.40000000D+01 -.39000000D+01 0.87895399D-01 0.55912920D-03
+ -.39000000D+01 -.38000000D+01 0.14227122D+00 0.10899679D-02
+ -.38000000D+01 -.37000000D+01 0.21422661D+00 0.15240314D-02
+ -.37000000D+01 -.36000000D+01 0.30427754D+00 0.19315243D-02
+ -.36000000D+01 -.35000000D+01 0.41595887D+00 0.32686691D-02
+ -.35000000D+01 -.34000000D+01 0.54028132D+00 0.36227388D-02
+ -.34000000D+01 -.33000000D+01 0.69079637D+00 0.36920836D-02
+ -.33000000D+01 -.32000000D+01 0.86256740D+00 0.38820440D-02
+ -.32000000D+01 -.31000000D+01 0.10428163D+01 0.42956850D-02
+ -.31000000D+01 -.30000000D+01 0.12359147D+01 0.60058970D-02
+ -.30000000D+01 -.29000000D+01 0.14758964D+01 0.57426849D-02
+ -.29000000D+01 -.28000000D+01 0.16991847D+01 0.64160129D-02
+ -.28000000D+01 -.27000000D+01 0.19424631D+01 0.87094953D-02
+ -.27000000D+01 -.26000000D+01 0.22257626D+01 0.72835392D-02
+ -.26000000D+01 -.25000000D+01 0.24881310D+01 0.74497258D-02
+ -.25000000D+01 -.24000000D+01 0.27744569D+01 0.79322968D-02
+ -.24000000D+01 -.23000000D+01 0.30567471D+01 0.85802306D-02
+ -.23000000D+01 -.22000000D+01 0.33548805D+01 0.90508294D-02
+ -.22000000D+01 -.21000000D+01 0.36778888D+01 0.98210586D-02
+ -.21000000D+01 -.20000000D+01 0.40013679D+01 0.97460913D-02
+ -.20000000D+01 -.19000000D+01 0.42878148D+01 0.11325563D-01
+ -.19000000D+01 -.18000000D+01 0.45790298D+01 0.10577054D-01
+ -.18000000D+01 -.17000000D+01 0.48757226D+01 0.14003423D-01
+ -.17000000D+01 -.16000000D+01 0.51545297D+01 0.13601086D-01
+ -.16000000D+01 -.15000000D+01 0.54411040D+01 0.11834023D-01
+ -.15000000D+01 -.14000000D+01 0.57147964D+01 0.11467132D-01
+ -.14000000D+01 -.13000000D+01 0.59820713D+01 0.22014334D-01
+ -.13000000D+01 -.12000000D+01 0.62169578D+01 0.13744869D-01
+ -.12000000D+01 -.11000000D+01 0.64350776D+01 0.16646845D-01
+ -.11000000D+01 -.10000000D+01 0.66461775D+01 0.16627512D-01
+ -.10000000D+01 -.90000000D+00 0.68241581D+01 0.13829789D-01
+ -.90000000D+00 -.80000000D+00 0.69798057D+01 0.14119844D-01
+ -.80000000D+00 -.70000000D+00 0.71299558D+01 0.16080239D-01
+ -.70000000D+00 -.60000000D+00 0.72677451D+01 0.13807503D-01
+ -.60000000D+00 -.50000000D+00 0.74028699D+01 0.14866224D-01
+ -.50000000D+00 -.40000000D+00 0.75118424D+01 0.14787460D-01
+ -.40000000D+00 -.30000000D+00 0.75692597D+01 0.18780508D-01
+ -.30000000D+00 -.20000000D+00 0.76095894D+01 0.14339478D-01
+ -.20000000D+00 -.10000000D+00 0.76603829D+01 0.16040236D-01
+ -.10000000D+00 0.18041124D-15 0.77027973D+01 0.14554236D-01
+ 0.70776718D-15 0.10000000D+00 0.77058403D+01 0.15366970D-01
+ 0.10000000D+00 0.20000000D+00 0.76798751D+01 0.15480124D-01
+ 0.20000000D+00 0.30000000D+00 0.76451701D+01 0.14017206D-01
+ 0.30000000D+00 0.40000000D+00 0.75647286D+01 0.15493676D-01
+ 0.40000000D+00 0.50000000D+00 0.74809129D+01 0.15333173D-01
+ 0.50000000D+00 0.60000000D+00 0.73717737D+01 0.14250817D-01
+ 0.60000000D+00 0.70000000D+00 0.72637442D+01 0.13974455D-01
+ 0.70000000D+00 0.80000000D+00 0.71459528D+01 0.13546874D-01
+ 0.80000000D+00 0.90000000D+00 0.69848088D+01 0.13496672D-01
+ 0.90000000D+00 0.10000000D+01 0.68248407D+01 0.15128465D-01
+ 0.10000000D+01 0.11000000D+01 0.66632801D+01 0.13798404D-01
+ 0.11000000D+01 0.12000000D+01 0.64400474D+01 0.12925051D-01
+ 0.12000000D+01 0.13000000D+01 0.61951588D+01 0.12473273D-01
+ 0.13000000D+01 0.14000000D+01 0.59601940D+01 0.12573751D-01
+ 0.14000000D+01 0.15000000D+01 0.57098063D+01 0.12751705D-01
+ 0.15000000D+01 0.16000000D+01 0.54364106D+01 0.19195875D-01
+ 0.16000000D+01 0.17000000D+01 0.51633635D+01 0.11719722D-01
+ 0.17000000D+01 0.18000000D+01 0.48876176D+01 0.11279011D-01
+ 0.18000000D+01 0.19000000D+01 0.45909791D+01 0.11460572D-01
+ 0.19000000D+01 0.20000000D+01 0.43156134D+01 0.11728677D-01
+ 0.20000000D+01 0.21000000D+01 0.40138279D+01 0.10105663D-01
+ 0.21000000D+01 0.22000000D+01 0.36873283D+01 0.92152472D-02
+ 0.22000000D+01 0.23000000D+01 0.33869146D+01 0.11384028D-01
+ 0.23000000D+01 0.24000000D+01 0.30640274D+01 0.97047270D-02
+ 0.24000000D+01 0.25000000D+01 0.27712902D+01 0.80717417D-02
+ 0.25000000D+01 0.26000000D+01 0.24866617D+01 0.91256337D-02
+ 0.26000000D+01 0.27000000D+01 0.22251786D+01 0.72730156D-02
+ 0.27000000D+01 0.28000000D+01 0.19570444D+01 0.64086996D-02
+ 0.28000000D+01 0.29000000D+01 0.16945587D+01 0.84557070D-02
+ 0.29000000D+01 0.30000000D+01 0.14573790D+01 0.75228077D-02
+ 0.30000000D+01 0.31000000D+01 0.12477755D+01 0.56319383D-02
+ 0.31000000D+01 0.32000000D+01 0.10449231D+01 0.44787294D-02
+ 0.32000000D+01 0.33000000D+01 0.85625939D+00 0.46827540D-02
+ 0.33000000D+01 0.34000000D+01 0.69375958D+00 0.31964414D-02
+ 0.34000000D+01 0.35000000D+01 0.54071974D+00 0.26745295D-02
+ 0.35000000D+01 0.36000000D+01 0.42031065D+00 0.41218106D-02
+ 0.36000000D+01 0.37000000D+01 0.29890533D+00 0.19376418D-02
+ 0.37000000D+01 0.38000000D+01 0.21345443D+00 0.12688654D-02
+ 0.38000000D+01 0.39000000D+01 0.14391113D+00 0.84792332D-03
+ 0.39000000D+01 0.40000000D+01 0.88111461D-01 0.52954963D-03
+ 0.40000000D+01 0.41000000D+01 0.49734097D-01 0.37208465D-03
+ 0.41000000D+01 0.42000000D+01 0.25303643D-01 0.17324413D-03
+ 0.42000000D+01 0.43000000D+01 0.10958737D-01 0.95111717D-04
+ 0.43000000D+01 0.44000000D+01 0.39066352D-02 0.37607694D-04
+ 0.44000000D+01 0.45000000D+01 0.95743587D-03 0.18123229D-04
+ 0.45000000D+01 0.46000000D+01 0.11581780D-03 0.50594480D-05
+ 0.46000000D+01 0.47000000D+01 0.78617358D-06 0.48318329D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77917680D-06 0.48269460D-06
+ -.46000000D+01 -.45000000D+01 0.11485147D-03 0.50719397D-05
+ -.45000000D+01 -.44000000D+01 0.98967468D-03 0.15795522D-04
+ -.44000000D+01 -.43000000D+01 0.39679392D-02 0.38010465D-04
+ -.43000000D+01 -.42000000D+01 0.11220724D-01 0.81715060D-04
+ -.42000000D+01 -.41000000D+01 0.25974987D-01 0.17980658D-03
+ -.41000000D+01 -.40000000D+01 0.51589737D-01 0.32694273D-03
+ -.40000000D+01 -.39000000D+01 0.91108844D-01 0.55919865D-03
+ -.39000000D+01 -.38000000D+01 0.14805835D+00 0.10901480D-02
+ -.38000000D+01 -.37000000D+01 0.22365098D+00 0.16129495D-02
+ -.37000000D+01 -.36000000D+01 0.31919886D+00 0.20037113D-02
+ -.36000000D+01 -.35000000D+01 0.43757456D+00 0.32948447D-02
+ -.35000000D+01 -.34000000D+01 0.57041329D+00 0.36471250D-02
+ -.34000000D+01 -.33000000D+01 0.73137013D+00 0.36944343D-02
+ -.33000000D+01 -.32000000D+01 0.91540583D+00 0.38836481D-02
+ -.32000000D+01 -.31000000D+01 0.11097559D+01 0.42988734D-02
+ -.31000000D+01 -.30000000D+01 0.13187910D+01 0.60094353D-02
+ -.30000000D+01 -.29000000D+01 0.15767280D+01 0.57561127D-02
+ -.29000000D+01 -.28000000D+01 0.18190514D+01 0.64306059D-02
+ -.28000000D+01 -.27000000D+01 0.20837239D+01 0.87158434D-02
+ -.27000000D+01 -.26000000D+01 0.23895541D+01 0.72899055D-02
+ -.26000000D+01 -.25000000D+01 0.26754631D+01 0.74596972D-02
+ -.25000000D+01 -.24000000D+01 0.29869602D+01 0.79414440D-02
+ -.24000000D+01 -.23000000D+01 0.32952317D+01 0.85857633D-02
+ -.23000000D+01 -.22000000D+01 0.36201586D+01 0.90551440D-02
+ -.22000000D+01 -.21000000D+01 0.39706801D+01 0.98272558D-02
+ -.21000000D+01 -.20000000D+01 0.43221804D+01 0.97536532D-02
+ -.20000000D+01 -.19000000D+01 0.46370363D+01 0.11333328D-01
+ -.19000000D+01 -.18000000D+01 0.49558239D+01 0.10589818D-01
+ -.18000000D+01 -.17000000D+01 0.52806750D+01 0.14011908D-01
+ -.17000000D+01 -.16000000D+01 0.55869097D+01 0.13611447D-01
+ -.16000000D+01 -.15000000D+01 0.59003177D+01 0.11849007D-01
+ -.15000000D+01 -.14000000D+01 0.62006422D+01 0.11538971D-01
+ -.14000000D+01 -.13000000D+01 0.64914836D+01 0.22040269D-01
+ -.13000000D+01 -.12000000D+01 0.67511148D+01 0.13758455D-01
+ -.12000000D+01 -.11000000D+01 0.69917683D+01 0.16655991D-01
+ -.11000000D+01 -.10000000D+01 0.72248290D+01 0.16640706D-01
+ -.10000000D+01 -.90000000D+00 0.74214267D+01 0.13843033D-01
+ -.90000000D+00 -.80000000D+00 0.75952512D+01 0.14127098D-01
+ -.80000000D+00 -.70000000D+00 0.77618788D+01 0.16087464D-01
+ -.70000000D+00 -.60000000D+00 0.79139492D+01 0.13821137D-01
+ -.60000000D+00 -.50000000D+00 0.80612900D+01 0.14881372D-01
+ -.50000000D+00 -.40000000D+00 0.81809957D+01 0.14800980D-01
+ -.40000000D+00 -.30000000D+00 0.82465533D+01 0.18792789D-01
+ -.30000000D+00 -.20000000D+00 0.82935552D+01 0.14350705D-01
+ -.20000000D+00 -.10000000D+00 0.83481305D+01 0.16054239D-01
+ -.10000000D+00 0.18041124D-15 0.83933718D+01 0.14578744D-01
+ 0.70776718D-15 0.10000000D+00 0.83957471D+01 0.15385024D-01
+ 0.10000000D+00 0.20000000D+00 0.83677799D+01 0.15496683D-01
+ 0.20000000D+00 0.30000000D+00 0.83290937D+01 0.14032234D-01
+ 0.30000000D+00 0.40000000D+00 0.82418831D+01 0.15515132D-01
+ 0.40000000D+00 0.50000000D+00 0.81500598D+01 0.15352051D-01
+ 0.50000000D+00 0.60000000D+00 0.80305470D+01 0.14267320D-01
+ 0.60000000D+00 0.70000000D+00 0.79099297D+01 0.14005234D-01
+ 0.70000000D+00 0.80000000D+00 0.77776336D+01 0.13596754D-01
+ 0.80000000D+00 0.90000000D+00 0.76009022D+01 0.13538809D-01
+ 0.90000000D+00 0.10000000D+01 0.74220710D+01 0.15149494D-01
+ 0.10000000D+01 0.11000000D+01 0.72414525D+01 0.13806647D-01
+ 0.11000000D+01 0.12000000D+01 0.69969207D+01 0.12934901D-01
+ 0.12000000D+01 0.13000000D+01 0.67293814D+01 0.12486060D-01
+ 0.13000000D+01 0.14000000D+01 0.64705739D+01 0.12594436D-01
+ 0.14000000D+01 0.15000000D+01 0.61948639D+01 0.12763361D-01
+ 0.15000000D+01 0.16000000D+01 0.58956255D+01 0.19196428D-01
+ 0.16000000D+01 0.17000000D+01 0.55958634D+01 0.11732539D-01
+ 0.17000000D+01 0.18000000D+01 0.52925609D+01 0.11286359D-01
+ 0.18000000D+01 0.19000000D+01 0.49679276D+01 0.11467274D-01
+ 0.19000000D+01 0.20000000D+01 0.46645420D+01 0.11735529D-01
+ 0.20000000D+01 0.21000000D+01 0.43347005D+01 0.10112912D-01
+ 0.21000000D+01 0.22000000D+01 0.39799542D+01 0.92234586D-02
+ 0.22000000D+01 0.23000000D+01 0.36521641D+01 0.11390097D-01
+ 0.23000000D+01 0.24000000D+01 0.33028121D+01 0.97104047D-02
+ 0.24000000D+01 0.25000000D+01 0.29837122D+01 0.80815117D-02
+ 0.25000000D+01 0.26000000D+01 0.26741670D+01 0.91266952D-02
+ 0.26000000D+01 0.27000000D+01 0.23890104D+01 0.72809031D-02
+ 0.27000000D+01 0.28000000D+01 0.20979832D+01 0.64334216D-02
+ 0.28000000D+01 0.29000000D+01 0.18148303D+01 0.84701910D-02
+ 0.29000000D+01 0.30000000D+01 0.15580786D+01 0.75259657D-02
+ 0.30000000D+01 0.31000000D+01 0.13307427D+01 0.56348487D-02
+ 0.31000000D+01 0.32000000D+01 0.11118876D+01 0.44807254D-02
+ 0.32000000D+01 0.33000000D+01 0.90909621D+00 0.46834721D-02
+ 0.33000000D+01 0.34000000D+01 0.73430931D+00 0.31985108D-02
+ 0.34000000D+01 0.35000000D+01 0.57084143D+00 0.26759673D-02
+ 0.35000000D+01 0.36000000D+01 0.44193478D+00 0.41222462D-02
+ 0.36000000D+01 0.37000000D+01 0.31368502D+00 0.19379461D-02
+ 0.37000000D+01 0.38000000D+01 0.22302304D+00 0.12693964D-02
+ 0.38000000D+01 0.39000000D+01 0.14969537D+00 0.84815301D-03
+ 0.39000000D+01 0.40000000D+01 0.91323301D-01 0.52967531D-03
+ 0.40000000D+01 0.41000000D+01 0.51338937D-01 0.37214738D-03
+ 0.41000000D+01 0.42000000D+01 0.26002846D-01 0.17327532D-03
+ 0.42000000D+01 0.43000000D+01 0.11211522D-01 0.95126482D-04
+ 0.43000000D+01 0.44000000D+01 0.39762204D-02 0.37610030D-04
+ 0.44000000D+01 0.45000000D+01 0.96932434D-03 0.18124933D-04
+ 0.45000000D+01 0.46000000D+01 0.11656810D-03 0.50594697D-05
+ 0.46000000D+01 0.47000000D+01 0.78715109D-06 0.48318331D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77952728D-06 0.48269460D-06
+ -.46000000D+01 -.45000000D+01 0.11512789D-03 0.50719446D-05
+ -.45000000D+01 -.44000000D+01 0.99422478D-03 0.15795561D-04
+ -.44000000D+01 -.43000000D+01 0.39951004D-02 0.38012170D-04
+ -.43000000D+01 -.42000000D+01 0.11321744D-01 0.81718906D-04
+ -.42000000D+01 -.41000000D+01 0.26261057D-01 0.17981730D-03
+ -.41000000D+01 -.40000000D+01 0.52259668D-01 0.32696245D-03
+ -.40000000D+01 -.39000000D+01 0.92475097D-01 0.55922849D-03
+ -.39000000D+01 -.38000000D+01 0.15056326D+00 0.10902164D-02
+ -.38000000D+01 -.37000000D+01 0.22780264D+00 0.16521744D-02
+ -.37000000D+01 -.36000000D+01 0.32586648D+00 0.20359718D-02
+ -.36000000D+01 -.35000000D+01 0.44738389D+00 0.33042576D-02
+ -.35000000D+01 -.34000000D+01 0.58428187D+00 0.36561501D-02
+ -.34000000D+01 -.33000000D+01 0.75028400D+00 0.36956113D-02
+ -.33000000D+01 -.32000000D+01 0.94031966D+00 0.38844318D-02
+ -.32000000D+01 -.31000000D+01 0.11416646D+01 0.43005736D-02
+ -.31000000D+01 -.30000000D+01 0.13586722D+01 0.60112129D-02
+ -.30000000D+01 -.29000000D+01 0.16256901D+01 0.57626710D-02
+ -.29000000D+01 -.28000000D+01 0.18777077D+01 0.64399889D-02
+ -.28000000D+01 -.27000000D+01 0.21534156D+01 0.87203495D-02
+ -.27000000D+01 -.26000000D+01 0.24708704D+01 0.72936476D-02
+ -.26000000D+01 -.25000000D+01 0.27690183D+01 0.74658557D-02
+ -.25000000D+01 -.24000000D+01 0.30936859D+01 0.79468091D-02
+ -.24000000D+01 -.23000000D+01 0.34156141D+01 0.85880135D-02
+ -.23000000D+01 -.22000000D+01 0.37546623D+01 0.90580028D-02
+ -.22000000D+01 -.21000000D+01 0.41197918D+01 0.98302249D-02
+ -.21000000D+01 -.20000000D+01 0.44861589D+01 0.97573946D-02
+ -.20000000D+01 -.19000000D+01 0.48162044D+01 0.11339770D-01
+ -.19000000D+01 -.18000000D+01 0.51495786D+01 0.10598236D-01
+ -.18000000D+01 -.17000000D+01 0.54897292D+01 0.14016323D-01
+ -.17000000D+01 -.16000000D+01 0.58106897D+01 0.13618452D-01
+ -.16000000D+01 -.15000000D+01 0.61386614D+01 0.11858139D-01
+ -.15000000D+01 -.14000000D+01 0.64533474D+01 0.11583129D-01
+ -.14000000D+01 -.13000000D+01 0.67569330D+01 0.22057699D-01
+ -.13000000D+01 -.12000000D+01 0.70300968D+01 0.13765995D-01
+ -.12000000D+01 -.11000000D+01 0.72830181D+01 0.16660673D-01
+ -.11000000D+01 -.10000000D+01 0.75280527D+01 0.16647121D-01
+ -.10000000D+01 -.90000000D+00 0.77348494D+01 0.13849974D-01
+ -.90000000D+00 -.80000000D+00 0.79186596D+01 0.14131923D-01
+ -.80000000D+00 -.70000000D+00 0.80943049D+01 0.16091092D-01
+ -.70000000D+00 -.60000000D+00 0.82542495D+01 0.13830229D-01
+ -.60000000D+00 -.50000000D+00 0.84082803D+01 0.14891075D-01
+ -.50000000D+00 -.40000000D+00 0.85339409D+01 0.14809442D-01
+ -.40000000D+00 -.30000000D+00 0.86039862D+01 0.18799728D-01
+ -.30000000D+00 -.20000000D+00 0.86545944D+01 0.14357624D-01
+ -.20000000D+00 -.10000000D+00 0.87113078D+01 0.16063062D-01
+ -.10000000D+00 0.18041124D-15 0.87581813D+01 0.14597302D-01
+ 0.70776718D-15 0.10000000D+00 0.87600471D+01 0.15398578D-01
+ 0.10000000D+00 0.20000000D+00 0.87310398D+01 0.15505467D-01
+ 0.20000000D+00 0.30000000D+00 0.86901053D+01 0.14039505D-01
+ 0.30000000D+00 0.40000000D+00 0.85992067D+01 0.15526968D-01
+ 0.40000000D+00 0.50000000D+00 0.85030009D+01 0.15362447D-01
+ 0.50000000D+00 0.60000000D+00 0.83777724D+01 0.14276812D-01
+ 0.60000000D+00 0.70000000D+00 0.82502216D+01 0.14020945D-01
+ 0.70000000D+00 0.80000000D+00 0.81099738D+01 0.13620608D-01
+ 0.80000000D+00 0.90000000D+00 0.79246189D+01 0.13562844D-01
+ 0.90000000D+00 0.10000000D+01 0.77354874D+01 0.15163377D-01
+ 0.10000000D+01 0.11000000D+01 0.75444445D+01 0.13810908D-01
+ 0.11000000D+01 0.12000000D+01 0.72882735D+01 0.12940128D-01
+ 0.12000000D+01 0.13000000D+01 0.70083652D+01 0.12493116D-01
+ 0.13000000D+01 0.14000000D+01 0.67366078D+01 0.12605755D-01
+ 0.14000000D+01 0.15000000D+01 0.64471214D+01 0.12769792D-01
+ 0.15000000D+01 0.16000000D+01 0.61339200D+01 0.19197599D-01
+ 0.16000000D+01 0.17000000D+01 0.58197449D+01 0.11741727D-01
+ 0.17000000D+01 0.18000000D+01 0.55015588D+01 0.11290879D-01
+ 0.18000000D+01 0.19000000D+01 0.51618512D+01 0.11470994D-01
+ 0.19000000D+01 0.20000000D+01 0.48435018D+01 0.11739529D-01
+ 0.20000000D+01 0.21000000D+01 0.44986842D+01 0.10117026D-01
+ 0.21000000D+01 0.22000000D+01 0.41289467D+01 0.92287242D-02
+ 0.22000000D+01 0.23000000D+01 0.37866893D+01 0.11395293D-01
+ 0.23000000D+01 0.24000000D+01 0.34233335D+01 0.97153356D-02
+ 0.24000000D+01 0.25000000D+01 0.30903858D+01 0.80872770D-02
+ 0.25000000D+01 0.26000000D+01 0.27678453D+01 0.91275196D-02
+ 0.26000000D+01 0.27000000D+01 0.24703316D+01 0.72852467D-02
+ 0.27000000D+01 0.28000000D+01 0.21674902D+01 0.64446594D-02
+ 0.28000000D+01 0.29000000D+01 0.18736897D+01 0.84766813D-02
+ 0.29000000D+01 0.30000000D+01 0.16069758D+01 0.75274729D-02
+ 0.30000000D+01 0.31000000D+01 0.13706872D+01 0.56362124D-02
+ 0.31000000D+01 0.32000000D+01 0.11438070D+01 0.44818310D-02
+ 0.32000000D+01 0.33000000D+01 0.93401805D+00 0.46840057D-02
+ 0.33000000D+01 0.34000000D+01 0.75320702D+00 0.31995747D-02
+ 0.34000000D+01 0.35000000D+01 0.58470405D+00 0.26767027D-02
+ 0.35000000D+01 0.36000000D+01 0.45175062D+00 0.41225443D-02
+ 0.36000000D+01 0.37000000D+01 0.32029902D+00 0.19381400D-02
+ 0.37000000D+01 0.38000000D+01 0.22723463D+00 0.12696339D-02
+ 0.38000000D+01 0.39000000D+01 0.15219886D+00 0.84826255D-03
+ 0.39000000D+01 0.40000000D+01 0.92688669D-01 0.52972928D-03
+ 0.40000000D+01 0.41000000D+01 0.52008533D-01 0.37217330D-03
+ 0.41000000D+01 0.42000000D+01 0.26288568D-01 0.17329003D-03
+ 0.42000000D+01 0.43000000D+01 0.11312631D-01 0.95132038D-04
+ 0.43000000D+01 0.44000000D+01 0.40033845D-02 0.37610888D-04
+ 0.44000000D+01 0.45000000D+01 0.97382778D-03 0.18125838D-04
+ 0.45000000D+01 0.46000000D+01 0.11684434D-03 0.50594774D-05
+ 0.46000000D+01 0.47000000D+01 0.78749754D-06 0.48318331D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77586269D-06 0.48269450D-06
+ -.46000000D+01 -.45000000D+01 0.11286616D-03 0.50718435D-05
+ -.45000000D+01 -.44000000D+01 0.96168117D-03 0.15792777D-04
+ -.44000000D+01 -.43000000D+01 0.38181303D-02 0.37979570D-04
+ -.43000000D+01 -.42000000D+01 0.10708903D-01 0.81617981D-04
+ -.42000000D+01 -.41000000D+01 0.24619298D-01 0.17956846D-03
+ -.41000000D+01 -.40000000D+01 0.48592524D-01 0.32644578D-03
+ -.40000000D+01 -.39000000D+01 0.85308028D-01 0.55805886D-03
+ -.39000000D+01 -.38000000D+01 0.13792219D+00 0.10886516D-02
+ -.38000000D+01 -.37000000D+01 0.20769521D+00 0.13697350D-02
+ -.37000000D+01 -.36000000D+01 0.29407203D+00 0.18086844D-02
+ -.36000000D+01 -.35000000D+01 0.40207425D+00 0.31623035D-02
+ -.35000000D+01 -.34000000D+01 0.52200806D+00 0.35258158D-02
+ -.34000000D+01 -.33000000D+01 0.66711309D+00 0.36847376D-02
+ -.33000000D+01 -.32000000D+01 0.83285384D+00 0.38740826D-02
+ -.32000000D+01 -.31000000D+01 0.10064983D+01 0.42834216D-02
+ -.31000000D+01 -.30000000D+01 0.11922819D+01 0.59932890D-02
+ -.30000000D+01 -.29000000D+01 0.14240900D+01 0.57141558D-02
+ -.29000000D+01 -.28000000D+01 0.16394689D+01 0.63921495D-02
+ -.28000000D+01 -.27000000D+01 0.18735093D+01 0.86932440D-02
+ -.27000000D+01 -.26000000D+01 0.21469768D+01 0.72671143D-02
+ -.26000000D+01 -.25000000D+01 0.23998409D+01 0.74284037D-02
+ -.25000000D+01 -.24000000D+01 0.26759154D+01 0.79146543D-02
+ -.24000000D+01 -.23000000D+01 0.29475358D+01 0.85575257D-02
+ -.23000000D+01 -.22000000D+01 0.32347264D+01 0.90309299D-02
+ -.22000000D+01 -.21000000D+01 0.35466696D+01 0.97944564D-02
+ -.21000000D+01 -.20000000D+01 0.38591827D+01 0.97183364D-02
+ -.20000000D+01 -.19000000D+01 0.41340423D+01 0.11303688D-01
+ -.19000000D+01 -.18000000D+01 0.44145112D+01 0.10547482D-01
+ -.18000000D+01 -.17000000D+01 0.47004757D+01 0.13968206D-01
+ -.17000000D+01 -.16000000D+01 0.49689638D+01 0.13581262D-01
+ -.16000000D+01 -.15000000D+01 0.52454128D+01 0.11801773D-01
+ -.15000000D+01 -.14000000D+01 0.55080099D+01 0.11387181D-01
+ -.14000000D+01 -.13000000D+01 0.57673728D+01 0.21989146D-01
+ -.13000000D+01 -.12000000D+01 0.59925681D+01 0.13708705D-01
+ -.12000000D+01 -.11000000D+01 0.62028252D+01 0.16620557D-01
+ -.11000000D+01 -.10000000D+01 0.64045500D+01 0.16596936D-01
+ -.10000000D+01 -.90000000D+00 0.65768891D+01 0.13795787D-01
+ -.90000000D+00 -.80000000D+00 0.67259871D+01 0.14094162D-01
+ -.80000000D+00 -.70000000D+00 0.68696482D+01 0.16056164D-01
+ -.70000000D+00 -.60000000D+00 0.70024133D+01 0.13777871D-01
+ -.60000000D+00 -.50000000D+00 0.71333508D+01 0.14836806D-01
+ -.50000000D+00 -.40000000D+00 0.72380432D+01 0.14756135D-01
+ -.40000000D+00 -.30000000D+00 0.72929350D+01 0.18746763D-01
+ -.30000000D+00 -.20000000D+00 0.73303965D+01 0.14310592D-01
+ -.20000000D+00 -.10000000D+00 0.73801974D+01 0.16007754D-01
+ -.10000000D+00 0.18041124D-15 0.74213096D+01 0.14516095D-01
+ 0.70776718D-15 0.10000000D+00 0.74247601D+01 0.15330376D-01
+ 0.10000000D+00 0.20000000D+00 0.73995947D+01 0.15447382D-01
+ 0.20000000D+00 0.30000000D+00 0.73659014D+01 0.13969218D-01
+ 0.30000000D+00 0.40000000D+00 0.72888635D+01 0.15444890D-01
+ 0.40000000D+00 0.50000000D+00 0.72073455D+01 0.15286013D-01
+ 0.50000000D+00 0.60000000D+00 0.71018365D+01 0.14218076D-01
+ 0.60000000D+00 0.70000000D+00 0.69984736D+01 0.13901263D-01
+ 0.70000000D+00 0.80000000D+00 0.68861582D+01 0.13441889D-01
+ 0.80000000D+00 0.90000000D+00 0.67295322D+01 0.13431074D-01
+ 0.90000000D+00 0.10000000D+01 0.65778123D+01 0.15088361D-01
+ 0.10000000D+01 0.11000000D+01 0.64226759D+01 0.13772690D-01
+ 0.11000000D+01 0.12000000D+01 0.62075250D+01 0.12896021D-01
+ 0.12000000D+01 0.13000000D+01 0.59707307D+01 0.12436273D-01
+ 0.13000000D+01 0.14000000D+01 0.57449175D+01 0.12529412D-01
+ 0.14000000D+01 0.15000000D+01 0.55039383D+01 0.12716605D-01
+ 0.15000000D+01 0.16000000D+01 0.52406280D+01 0.19190678D-01
+ 0.16000000D+01 0.17000000D+01 0.49773591D+01 0.11694811D-01
+ 0.17000000D+01 0.18000000D+01 0.47121519D+01 0.11257124D-01
+ 0.18000000D+01 0.19000000D+01 0.44264905D+01 0.11435398D-01
+ 0.19000000D+01 0.20000000D+01 0.41621551D+01 0.11707393D-01
+ 0.20000000D+01 0.21000000D+01 0.38712832D+01 0.10083678D-01
+ 0.21000000D+01 0.22000000D+01 0.35564288D+01 0.91924742D-02
+ 0.22000000D+01 0.23000000D+01 0.32669019D+01 0.11364871D-01
+ 0.23000000D+01 0.24000000D+01 0.29545636D+01 0.96889962D-02
+ 0.24000000D+01 0.25000000D+01 0.26725871D+01 0.80469419D-02
+ 0.25000000D+01 0.26000000D+01 0.23982931D+01 0.91086735D-02
+ 0.26000000D+01 0.27000000D+01 0.21464174D+01 0.72525492D-02
+ 0.27000000D+01 0.28000000D+01 0.18885241D+01 0.63491548D-02
+ 0.28000000D+01 0.29000000D+01 0.16342235D+01 0.84193705D-02
+ 0.29000000D+01 0.30000000D+01 0.14058202D+01 0.75115451D-02
+ 0.30000000D+01 0.31000000D+01 0.12039898D+01 0.56207683D-02
+ 0.31000000D+01 0.32000000D+01 0.10085718D+01 0.44716428D-02
+ 0.32000000D+01 0.33000000D+01 0.82657207D+00 0.46779485D-02
+ 0.33000000D+01 0.34000000D+01 0.67000036D+00 0.31887659D-02
+ 0.34000000D+01 0.35000000D+01 0.52240577D+00 0.26695213D-02
+ 0.35000000D+01 0.36000000D+01 0.40650700D+00 0.41208561D-02
+ 0.36000000D+01 0.37000000D+01 0.28898946D+00 0.19348258D-02
+ 0.37000000D+01 0.38000000D+01 0.20665121D+00 0.12662708D-02
+ 0.38000000D+01 0.39000000D+01 0.13954797D+00 0.84635182D-03
+ 0.39000000D+01 0.40000000D+01 0.85529265D-01 0.52866128D-03
+ 0.40000000D+01 0.41000000D+01 0.48351759D-01 0.37166788D-03
+ 0.41000000D+01 0.42000000D+01 0.24649654D-01 0.17297198D-03
+ 0.42000000D+01 0.43000000D+01 0.10699787D-01 0.95027550D-04
+ 0.43000000D+01 0.44000000D+01 0.38266023D-02 0.37591423D-04
+ 0.44000000D+01 0.45000000D+01 0.94154426D-03 0.18119474D-04
+ 0.45000000D+01 0.46000000D+01 0.11458556D-03 0.50593134D-05
+ 0.46000000D+01 0.47000000D+01 0.78389395D-06 0.48318322D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77784939D-06 0.48269455D-06
+ -.46000000D+01 -.45000000D+01 0.11407711D-03 0.50718941D-05
+ -.45000000D+01 -.44000000D+01 0.97892663D-03 0.15794096D-04
+ -.44000000D+01 -.43000000D+01 0.39109483D-02 0.37995610D-04
+ -.43000000D+01 -.42000000D+01 0.11027829D-01 0.81665573D-04
+ -.42000000D+01 -.41000000D+01 0.25467870D-01 0.17968221D-03
+ -.41000000D+01 -.40000000D+01 0.50475126D-01 0.32668995D-03
+ -.40000000D+01 -.39000000D+01 0.88967763D-01 0.55857604D-03
+ -.39000000D+01 -.38000000D+01 0.14434432D+00 0.10893704D-02
+ -.38000000D+01 -.37000000D+01 0.21790100D+00 0.14758456D-02
+ -.37000000D+01 -.36000000D+01 0.31003498D+00 0.18927293D-02
+ -.36000000D+01 -.35000000D+01 0.42480047D+00 0.32334312D-02
+ -.35000000D+01 -.34000000D+01 0.55311519D+00 0.35903319D-02
+ -.34000000D+01 -.33000000D+01 0.70852098D+00 0.36890666D-02
+ -.33000000D+01 -.32000000D+01 0.88621458D+00 0.38784564D-02
+ -.32000000D+01 -.31000000D+01 0.10734453D+01 0.42905549D-02
+ -.31000000D+01 -.30000000D+01 0.12745203D+01 0.60007517D-02
+ -.30000000D+01 -.29000000D+01 0.15234560D+01 0.57320588D-02
+ -.29000000D+01 -.28000000D+01 0.17568360D+01 0.64082652D-02
+ -.28000000D+01 -.27000000D+01 0.20110048D+01 0.87028136D-02
+ -.27000000D+01 -.26000000D+01 0.23058272D+01 0.72774540D-02
+ -.26000000D+01 -.25000000D+01 0.25807676D+01 0.74410061D-02
+ -.25000000D+01 -.24000000D+01 0.28802844D+01 0.79260627D-02
+ -.24000000D+01 -.23000000D+01 0.31762287D+01 0.85706111D-02
+ -.23000000D+01 -.22000000D+01 0.34884824D+01 0.90418325D-02
+ -.22000000D+01 -.21000000D+01 0.38260549D+01 0.98103652D-02
+ -.21000000D+01 -.20000000D+01 0.41645815D+01 0.97345894D-02
+ -.20000000D+01 -.19000000D+01 0.44659247D+01 0.11316807D-01
+ -.19000000D+01 -.18000000D+01 0.47719935D+01 0.10566065D-01
+ -.18000000D+01 -.17000000D+01 0.50837785D+01 0.13988098D-01
+ -.17000000D+01 -.16000000D+01 0.53775032D+01 0.13593809D-01
+ -.16000000D+01 -.15000000D+01 0.56785905D+01 0.11821986D-01
+ -.15000000D+01 -.14000000D+01 0.59658972D+01 0.11444766D-01
+ -.14000000D+01 -.13000000D+01 0.62469799D+01 0.22007088D-01
+ -.13000000D+01 -.12000000D+01 0.64947315D+01 0.13729851D-01
+ -.12000000D+01 -.11000000D+01 0.67255079D+01 0.16636282D-01
+ -.11000000D+01 -.10000000D+01 0.69476412D+01 0.16617363D-01
+ -.10000000D+01 -.90000000D+00 0.71366580D+01 0.13817986D-01
+ -.90000000D+00 -.80000000D+00 0.73022912D+01 0.14108523D-01
+ -.80000000D+00 -.70000000D+00 0.74610048D+01 0.16070264D-01
+ -.70000000D+00 -.60000000D+00 0.76068498D+01 0.13796284D-01
+ -.60000000D+00 -.50000000D+00 0.77487385D+01 0.14856534D-01
+ -.50000000D+00 -.40000000D+00 0.78633699D+01 0.14776473D-01
+ -.40000000D+00 -.30000000D+00 0.79255083D+01 0.18767862D-01
+ -.30000000D+00 -.20000000D+00 0.79691449D+01 0.14329273D-01
+ -.20000000D+00 -.10000000D+00 0.80223382D+01 0.16027804D-01
+ -.10000000D+00 0.18041124D-15 0.80659385D+01 0.14541995D-01
+ 0.70776718D-15 0.10000000D+00 0.80689557D+01 0.15353920D-01
+ 0.10000000D+00 0.20000000D+00 0.80418510D+01 0.15470025D-01
+ 0.20000000D+00 0.30000000D+00 0.80047055D+01 0.13997914D-01
+ 0.30000000D+00 0.40000000D+00 0.79211985D+01 0.15476889D-01
+ 0.40000000D+00 0.50000000D+00 0.78325587D+01 0.15315781D-01
+ 0.50000000D+00 0.60000000D+00 0.77176208D+01 0.14240253D-01
+ 0.60000000D+00 0.70000000D+00 0.76028552D+01 0.13948814D-01
+ 0.70000000D+00 0.80000000D+00 0.74773051D+01 0.13510244D-01
+ 0.80000000D+00 0.90000000D+00 0.73067032D+01 0.13475175D-01
+ 0.90000000D+00 0.10000000D+01 0.71375474D+01 0.15112230D-01
+ 0.10000000D+01 0.11000000D+01 0.69650907D+01 0.13788744D-01
+ 0.11000000D+01 0.12000000D+01 0.67304477D+01 0.12913078D-01
+ 0.12000000D+01 0.13000000D+01 0.64729603D+01 0.12458330D-01
+ 0.13000000D+01 0.14000000D+01 0.62251782D+01 0.12559784D-01
+ 0.14000000D+01 0.15000000D+01 0.59610961D+01 0.12738269D-01
+ 0.15000000D+01 0.16000000D+01 0.56738528D+01 0.19192176D-01
+ 0.16000000D+01 0.17000000D+01 0.53861167D+01 0.11711485D-01
+ 0.17000000D+01 0.18000000D+01 0.50955242D+01 0.11270350D-01
+ 0.18000000D+01 0.19000000D+01 0.47840467D+01 0.11449398D-01
+ 0.19000000D+01 0.20000000D+01 0.44937111D+01 0.11719857D-01
+ 0.20000000D+01 0.21000000D+01 0.41768666D+01 0.10097404D-01
+ 0.21000000D+01 0.22000000D+01 0.38355947D+01 0.92061917D-02
+ 0.22000000D+01 0.23000000D+01 0.35205764D+01 0.11375698D-01
+ 0.23000000D+01 0.24000000D+01 0.31835375D+01 0.96986024D-02
+ 0.24000000D+01 0.25000000D+01 0.28769701D+01 0.80616244D-02
+ 0.25000000D+01 0.26000000D+01 0.25793005D+01 0.91156569D-02
+ 0.26000000D+01 0.27000000D+01 0.23052508D+01 0.72654762D-02
+ 0.27000000D+01 0.28000000D+01 0.20256794D+01 0.63886687D-02
+ 0.28000000D+01 0.29000000D+01 0.17520652D+01 0.84430264D-02
+ 0.29000000D+01 0.30000000D+01 0.15050473D+01 0.75180915D-02
+ 0.30000000D+01 0.31000000D+01 0.12863318D+01 0.56274496D-02
+ 0.31000000D+01 0.32000000D+01 0.10755542D+01 0.44759913D-02
+ 0.32000000D+01 0.33000000D+01 0.87991258D+00 0.46803941D-02
+ 0.33000000D+01 0.34000000D+01 0.71143780D+00 0.31933084D-02
+ 0.34000000D+01 0.35000000D+01 0.55354802D+00 0.26725683D-02
+ 0.35000000D+01 0.36000000D+01 0.42918496D+00 0.41213642D-02
+ 0.36000000D+01 0.37000000D+01 0.30474394D+00 0.19362036D-02
+ 0.37000000D+01 0.38000000D+01 0.21705680D+00 0.12677549D-02
+ 0.38000000D+01 0.39000000D+01 0.14597317D+00 0.84718207D-03
+ 0.39000000D+01 0.40000000D+01 0.89186338D-01 0.52913578D-03
+ 0.40000000D+01 0.41000000D+01 0.50230294D-01 0.37190307D-03
+ 0.41000000D+01 0.42000000D+01 0.25497317D-01 0.17311082D-03
+ 0.42000000D+01 0.43000000D+01 0.11018793D-01 0.95076982D-04
+ 0.43000000D+01 0.44000000D+01 0.39193262D-02 0.37600807D-04
+ 0.44000000D+01 0.45000000D+01 0.95868808D-03 0.18121872D-04
+ 0.45000000D+01 0.46000000D+01 0.11579479D-03 0.50593959D-05
+ 0.46000000D+01 0.47000000D+01 0.78584916D-06 0.48318327D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77892840D-06 0.48269458D-06
+ -.46000000D+01 -.45000000D+01 0.11477661D-03 0.50719225D-05
+ -.45000000D+01 -.44000000D+01 0.98930890D-03 0.15794845D-04
+ -.44000000D+01 -.43000000D+01 0.39687553D-02 0.38004839D-04
+ -.43000000D+01 -.42000000D+01 0.11231835D-01 0.81693805D-04
+ -.42000000D+01 -.41000000D+01 0.26022914D-01 0.17975274D-03
+ -.41000000D+01 -.40000000D+01 0.51732175D-01 0.32683457D-03
+ -.40000000D+01 -.39000000D+01 0.91455930D-01 0.55890163D-03
+ -.39000000D+01 -.38000000D+01 0.14878597D+00 0.10898162D-02
+ -.38000000D+01 -.37000000D+01 0.22505389D+00 0.15708380D-02
+ -.37000000D+01 -.36000000D+01 0.32142581D+00 0.19693546D-02
+ -.36000000D+01 -.35000000D+01 0.44120072D+00 0.32745377D-02
+ -.35000000D+01 -.34000000D+01 0.57588039D+00 0.36282730D-02
+ -.34000000D+01 -.33000000D+01 0.73915905D+00 0.36924265D-02
+ -.33000000D+01 -.32000000D+01 0.92609711D+00 0.38815020D-02
+ -.32000000D+01 -.31000000D+01 0.11239614D+01 0.42957462D-02
+ -.31000000D+01 -.30000000D+01 0.13370911D+01 0.60062215D-02
+ -.30000000D+01 -.29000000D+01 0.15996826D+01 0.57478028D-02
+ -.29000000D+01 -.28000000D+01 0.18474297D+01 0.64240899D-02
+ -.28000000D+01 -.27000000D+01 0.21179383D+01 0.87111850D-02
+ -.27000000D+01 -.26000000D+01 0.24300453D+01 0.72858592D-02
+ -.26000000D+01 -.25000000D+01 0.27229479D+01 0.74529829D-02
+ -.25000000D+01 -.24000000D+01 0.30417522D+01 0.79365381D-02
+ -.24000000D+01 -.23000000D+01 0.33577065D+01 0.85797586D-02
+ -.23000000D+01 -.22000000D+01 0.36906528D+01 0.90499229D-02
+ -.22000000D+01 -.21000000D+01 0.40494941D+01 0.98210173D-02
+ -.21000000D+01 -.20000000D+01 0.44096251D+01 0.97463916D-02
+ -.20000000D+01 -.19000000D+01 0.47330756D+01 0.11328147D-01
+ -.19000000D+01 -.18000000D+01 0.50604452D+01 0.10582083D-01
+ -.18000000D+01 -.17000000D+01 0.53941272D+01 0.14002516D-01
+ -.17000000D+01 -.16000000D+01 0.57090965D+01 0.13605805D-01
+ -.16000000D+01 -.15000000D+01 0.60310923D+01 0.11839981D-01
+ -.15000000D+01 -.14000000D+01 0.63393380D+01 0.11512194D-01
+ -.14000000D+01 -.13000000D+01 0.66385920D+01 0.22030994D-01
+ -.13000000D+01 -.12000000D+01 0.69057575D+01 0.13747838D-01
+ -.12000000D+01 -.11000000D+01 0.71539831D+01 0.16648762D-01
+ -.11000000D+01 -.10000000D+01 0.73935708D+01 0.16633453D-01
+ -.10000000D+01 -.90000000D+00 0.75968570D+01 0.13835037D-01
+ -.90000000D+00 -.80000000D+00 0.77767044D+01 0.14119980D-01
+ -.80000000D+00 -.70000000D+00 0.79484017D+01 0.16080653D-01
+ -.70000000D+00 -.60000000D+00 0.81053953D+01 0.13812945D-01
+ -.60000000D+00 -.50000000D+00 0.82567876D+01 0.14874343D-01
+ -.50000000D+00 -.40000000D+00 0.83799464D+01 0.14793502D-01
+ -.40000000D+00 -.30000000D+00 0.84483919D+01 0.18784680D-01
+ -.30000000D+00 -.20000000D+00 0.84972962D+01 0.14344401D-01
+ -.20000000D+00 -.10000000D+00 0.85534332D+01 0.16045350D-01
+ -.10000000D+00 0.18041124D-15 0.85993035D+01 0.14568809D-01
+ 0.70776718D-15 0.10000000D+00 0.86017412D+01 0.15375810D-01
+ 0.10000000D+00 0.20000000D+00 0.85730485D+01 0.15488989D-01
+ 0.20000000D+00 0.30000000D+00 0.85328417D+01 0.14019608D-01
+ 0.30000000D+00 0.40000000D+00 0.84438378D+01 0.15503296D-01
+ 0.40000000D+00 0.50000000D+00 0.83490791D+01 0.15339912D-01
+ 0.50000000D+00 0.60000000D+00 0.82260372D+01 0.14259377D-01
+ 0.60000000D+00 0.70000000D+00 0.81014015D+01 0.13986879D-01
+ 0.70000000D+00 0.80000000D+00 0.79644308D+01 0.13568140D-01
+ 0.80000000D+00 0.90000000D+00 0.77818829D+01 0.13519509D-01
+ 0.90000000D+00 0.10000000D+01 0.75976861D+01 0.15136196D-01
+ 0.10000000D+01 0.11000000D+01 0.74104388D+01 0.13800394D-01
+ 0.11000000D+01 0.12000000D+01 0.71591185D+01 0.12926714D-01
+ 0.12000000D+01 0.13000000D+01 0.68840016D+01 0.12475939D-01
+ 0.13000000D+01 0.14000000D+01 0.66175786D+01 0.12584506D-01
+ 0.14000000D+01 0.15000000D+01 0.63337791D+01 0.12754742D-01
+ 0.15000000D+01 0.16000000D+01 0.60263410D+01 0.19193794D-01
+ 0.16000000D+01 0.17000000D+01 0.57179168D+01 0.11726912D-01
+ 0.17000000D+01 0.18000000D+01 0.54059019D+01 0.11281112D-01
+ 0.18000000D+01 0.19000000D+01 0.50726376D+01 0.11460225D-01
+ 0.19000000D+01 0.20000000D+01 0.47605524D+01 0.11729753D-01
+ 0.20000000D+01 0.21000000D+01 0.44220136D+01 0.10107848D-01
+ 0.21000000D+01 0.22000000D+01 0.40588314D+01 0.92175206D-02
+ 0.22000000D+01 0.23000000D+01 0.37227137D+01 0.11385160D-01
+ 0.23000000D+01 0.24000000D+01 0.33652693D+01 0.97067409D-02
+ 0.24000000D+01 0.25000000D+01 0.30384095D+01 0.80745367D-02
+ 0.25000000D+01 0.26000000D+01 0.27216207D+01 0.91207311D-02
+ 0.26000000D+01 0.27000000D+01 0.24294748D+01 0.72758903D-02
+ 0.27000000D+01 0.28000000D+01 0.21322891D+01 0.64191163D-02
+ 0.28000000D+01 0.29000000D+01 0.18430719D+01 0.84612358D-02
+ 0.29000000D+01 0.30000000D+01 0.15811324D+01 0.75228696D-02
+ 0.30000000D+01 0.31000000D+01 0.13490045D+01 0.56320715D-02
+ 0.31000000D+01 0.32000000D+01 0.11260948D+01 0.44791570D-02
+ 0.32000000D+01 0.33000000D+01 0.91979200D+00 0.46821869D-02
+ 0.33000000D+01 0.34000000D+01 0.74208231D+00 0.31966036D-02
+ 0.34000000D+01 0.35000000D+01 0.57631661D+00 0.26747760D-02
+ 0.35000000D+01 0.36000000D+01 0.44557234D+00 0.41219234D-02
+ 0.36000000D+01 0.37000000D+01 0.31597849D+00 0.19371500D-02
+ 0.37000000D+01 0.38000000D+01 0.22436525D+00 0.12687456D-02
+ 0.38000000D+01 0.39000000D+01 0.15041674D+00 0.84772897D-03
+ 0.39000000D+01 0.40000000D+01 0.91671906D-01 0.52944248D-03
+ 0.40000000D+01 0.41000000D+01 0.51484307D-01 0.37204712D-03
+ 0.41000000D+01 0.42000000D+01 0.26051432D-01 0.17320115D-03
+ 0.42000000D+01 0.43000000D+01 0.11222838D-01 0.95106989D-04
+ 0.43000000D+01 0.44000000D+01 0.39770850D-02 0.37606244D-04
+ 0.44000000D+01 0.45000000D+01 0.96898030D-03 0.18123893D-04
+ 0.45000000D+01 0.46000000D+01 0.11649349D-03 0.50594417D-05
+ 0.46000000D+01 0.47000000D+01 0.78691073D-06 0.48318329D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.77944222D-06 0.48269459D-06
+ -.46000000D+01 -.45000000D+01 0.11512263D-03 0.50719362D-05
+ -.45000000D+01 -.44000000D+01 0.99459458D-03 0.15795213D-04
+ -.44000000D+01 -.43000000D+01 0.39989504D-02 0.38009437D-04
+ -.43000000D+01 -.42000000D+01 0.11340707D-01 0.81708162D-04
+ -.42000000D+01 -.41000000D+01 0.26324775D-01 0.17978980D-03
+ -.41000000D+01 -.40000000D+01 0.52428187D-01 0.32690817D-03
+ -.40000000D+01 -.39000000D+01 0.92856464D-01 0.55907450D-03
+ -.39000000D+01 -.38000000D+01 0.15132593D+00 0.10900485D-02
+ -.38000000D+01 -.37000000D+01 0.22920309D+00 0.16315941D-02
+ -.37000000D+01 -.36000000D+01 0.32813219D+00 0.20190557D-02
+ -.36000000D+01 -.35000000D+01 0.45098015D+00 0.32947863D-02
+ -.35000000D+01 -.34000000D+01 0.58964186D+00 0.36473379D-02
+ -.34000000D+01 -.33000000D+01 0.75790082D+00 0.36945896D-02
+ -.33000000D+01 -.32000000D+01 0.95075466D+00 0.38833333D-02
+ -.32000000D+01 -.31000000D+01 0.11555188D+01 0.42990609D-02
+ -.31000000D+01 -.30000000D+01 0.13765410D+01 0.60096466D-02
+ -.30000000D+01 -.29000000D+01 0.16481793D+01 0.57583926D-02
+ -.29000000D+01 -.28000000D+01 0.19054950D+01 0.64372301D-02
+ -.28000000D+01 -.27000000D+01 0.21870647D+01 0.87181846D-02
+ -.27000000D+01 -.26000000D+01 0.25108590D+01 0.72918389D-02
+ -.26000000D+01 -.25000000D+01 0.28160143D+01 0.74624075D-02
+ -.25000000D+01 -.24000000D+01 0.31480909D+01 0.79444289D-02
+ -.24000000D+01 -.23000000D+01 0.34778648D+01 0.85848740D-02
+ -.23000000D+01 -.22000000D+01 0.38251431D+01 0.90556521D-02
+ -.22000000D+01 -.21000000D+01 0.41988486D+01 0.98273728D-02
+ -.21000000D+01 -.20000000D+01 0.45740873D+01 0.97536034D-02
+ -.20000000D+01 -.19000000D+01 0.49131200D+01 0.11338894D-01
+ -.19000000D+01 -.18000000D+01 0.52553227D+01 0.10595591D-01
+ -.18000000D+01 -.17000000D+01 0.56047339D+01 0.14011719D-01
+ -.17000000D+01 -.16000000D+01 0.59347584D+01 0.13615920D-01
+ -.16000000D+01 -.15000000D+01 0.62717563D+01 0.11853810D-01
+ -.15000000D+01 -.14000000D+01 0.65949468D+01 0.11569771D-01
+ -.14000000D+01 -.13000000D+01 0.69071294D+01 0.22053372D-01
+ -.13000000D+01 -.12000000D+01 0.71884002D+01 0.13760573D-01
+ -.12000000D+01 -.11000000D+01 0.74491909D+01 0.16656986D-01
+ -.11000000D+01 -.10000000D+01 0.77013764D+01 0.16643835D-01
+ -.10000000D+01 -.90000000D+00 0.79150313D+01 0.13846365D-01
+ -.90000000D+00 -.80000000D+00 0.81052361D+01 0.14128553D-01
+ -.80000000D+00 -.70000000D+00 0.82863752D+01 0.16087507D-01
+ -.70000000D+00 -.60000000D+00 0.84514910D+01 0.13826480D-01
+ -.60000000D+00 -.50000000D+00 0.86098182D+01 0.14888330D-01
+ -.50000000D+00 -.40000000D+00 0.87392221D+01 0.14806524D-01
+ -.40000000D+00 -.30000000D+00 0.88122880D+01 0.18796414D-01
+ -.30000000D+00 -.20000000D+00 0.88649923D+01 0.14355428D-01
+ -.20000000D+00 -.10000000D+00 0.89233157D+01 0.16058933D-01
+ -.10000000D+00 0.18041124D-15 0.89709390D+01 0.14593638D-01
+ 0.70776718D-15 0.10000000D+00 0.89727969D+01 0.15394954D-01
+ 0.10000000D+00 0.20000000D+00 0.89430265D+01 0.15502099D-01
+ 0.20000000D+00 0.30000000D+00 0.89005032D+01 0.14033185D-01
+ 0.30000000D+00 0.40000000D+00 0.88075286D+01 0.15521894D-01
+ 0.40000000D+00 0.50000000D+00 0.87083220D+01 0.15356791D-01
+ 0.50000000D+00 0.60000000D+00 0.85793580D+01 0.14273382D-01
+ 0.60000000D+00 0.70000000D+00 0.84474923D+01 0.14012665D-01
+ 0.70000000D+00 0.80000000D+00 0.83022300D+01 0.13606591D-01
+ 0.80000000D+00 0.90000000D+00 0.81109216D+01 0.13553705D-01
+ 0.90000000D+00 0.10000000D+01 0.79158278D+01 0.15156438D-01
+ 0.10000000D+01 0.11000000D+01 0.77178681D+01 0.13807925D-01
+ 0.11000000D+01 0.12000000D+01 0.74544717D+01 0.12935926D-01
+ 0.12000000D+01 0.13000000D+01 0.71666129D+01 0.12488173D-01
+ 0.13000000D+01 0.14000000D+01 0.68868068D+01 0.12601864D-01
+ 0.14000000D+01 0.15000000D+01 0.65887934D+01 0.12765915D-01
+ 0.15000000D+01 0.16000000D+01 0.62669493D+01 0.19195933D-01
+ 0.16000000D+01 0.17000000D+01 0.59437729D+01 0.11740036D-01
+ 0.17000000D+01 0.18000000D+01 0.56164738D+01 0.11288982D-01
+ 0.18000000D+01 0.19000000D+01 0.52677217D+01 0.11467440D-01
+ 0.19000000D+01 0.20000000D+01 0.49403238D+01 0.11736697D-01
+ 0.20000000D+01 0.21000000D+01 0.45865107D+01 0.10114980D-01
+ 0.21000000D+01 0.22000000D+01 0.42080169D+01 0.92262054D-02
+ 0.22000000D+01 0.23000000D+01 0.38572171D+01 0.11393569D-01
+ 0.23000000D+01 0.24000000D+01 0.34855933D+01 0.97141949D-02
+ 0.24000000D+01 0.25000000D+01 0.31447128D+01 0.80840379D-02
+ 0.25000000D+01 0.26000000D+01 0.28148339D+01 0.91242171D-02
+ 0.26000000D+01 0.27000000D+01 0.25102933D+01 0.72829963D-02
+ 0.27000000D+01 0.28000000D+01 0.22011726D+01 0.64378652D-02
+ 0.28000000D+01 0.29000000D+01 0.19014196D+01 0.84723766D-02
+ 0.29000000D+01 0.30000000D+01 0.16295267D+01 0.75258551D-02
+ 0.30000000D+01 0.31000000D+01 0.13885404D+01 0.56348224D-02
+ 0.31000000D+01 0.32000000D+01 0.11576654D+01 0.44811514D-02
+ 0.32000000D+01 0.33000000D+01 0.94445678D+00 0.46833773D-02
+ 0.33000000D+01 0.34000000D+01 0.76081708D+00 0.31986514D-02
+ 0.34000000D+01 0.35000000D+01 0.59007204D+00 0.26761365D-02
+ 0.35000000D+01 0.36000000D+01 0.45535182D+00 0.41223817D-02
+ 0.36000000D+01 0.37000000D+01 0.32259709D+00 0.19377421D-02
+ 0.37000000D+01 0.38000000D+01 0.22860679D+00 0.12693084D-02
+ 0.38000000D+01 0.39000000D+01 0.15295778D+00 0.84804397D-03
+ 0.39000000D+01 0.40000000D+01 0.93070702D-01 0.52961022D-03
+ 0.40000000D+01 0.41000000D+01 0.52178622D-01 0.37212320D-03
+ 0.41000000D+01 0.42000000D+01 0.26352624D-01 0.17325174D-03
+ 0.42000000D+01 0.43000000D+01 0.11331721D-01 0.95122387D-04
+ 0.43000000D+01 0.44000000D+01 0.40072590D-02 0.37608987D-04
+ 0.44000000D+01 0.45000000D+01 0.97420610D-03 0.18125308D-04
+ 0.45000000D+01 0.46000000D+01 0.11683917D-03 0.50594638D-05
+ 0.46000000D+01 0.47000000D+01 0.78741616D-06 0.48318331D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 -.27822649D+01 0.34354234D-02
+ 0.30000000D+01 0.60000000D+01 0.22020003D+01 0.17782789D-02
+ 0.60000000D+01 0.90000000D+01 0.21079481D+01 0.12505959D-02
+ 0.90000000D+01 0.12000000D+02 0.16301078D+01 0.11371472D-02
+ 0.12000000D+02 0.15000000D+02 0.12720974D+01 0.11828956D-02
+ 0.15000000D+02 0.18000000D+02 0.10232449D+01 0.10387054D-02
+ 0.18000000D+02 0.21000000D+02 0.83693575D+00 0.82577881D-03
+ 0.21000000D+02 0.24000000D+02 0.70052223D+00 0.75872623D-03
+ 0.24000000D+02 0.27000000D+02 0.59346153D+00 0.77555914D-03
+ 0.27000000D+02 0.30000000D+02 0.51136929D+00 0.72252537D-03
+ 0.30000000D+02 0.33000000D+02 0.44494556D+00 0.54806059D-03
+ 0.33000000D+02 0.36000000D+02 0.38962450D+00 0.51845041D-03
+ 0.36000000D+02 0.39000000D+02 0.34493884D+00 0.48955749D-03
+ 0.39000000D+02 0.42000000D+02 0.30656158D+00 0.40900614D-03
+ 0.42000000D+02 0.45000000D+02 0.27486281D+00 0.43558806D-03
+ 0.45000000D+02 0.48000000D+02 0.24643447D+00 0.46787689D-03
+ 0.48000000D+02 0.51000000D+02 0.22302574D+00 0.43321761D-03
+ 0.51000000D+02 0.54000000D+02 0.20277452D+00 0.40237410D-03
+ 0.54000000D+02 0.57000000D+02 0.18345667D+00 0.39487174D-03
+ 0.57000000D+02 0.60000000D+02 0.16753317D+00 0.40967006D-03
+ 0.60000000D+02 0.63000000D+02 0.15378330D+00 0.39535951D-03
+ 0.63000000D+02 0.66000000D+02 0.14066758D+00 0.36502797D-03
+ 0.66000000D+02 0.69000000D+02 0.12873846D+00 0.15442414D-02
+ 0.69000000D+02 0.72000000D+02 0.12002002D+00 0.15696341D-02
+ 0.72000000D+02 0.75000000D+02 0.11038609D+00 0.57567054D-03
+ 0.75000000D+02 0.78000000D+02 0.10215385D+00 0.49335213D-03
+ 0.78000000D+02 0.81000000D+02 0.93865836D-01 0.35550838D-03
+ 0.81000000D+02 0.84000000D+02 0.87505835D-01 0.35576636D-03
+ 0.84000000D+02 0.87000000D+02 0.81490772D-01 0.30588432D-03
+ 0.87000000D+02 0.90000000D+02 0.75229071D-01 0.24817752D-03
+ 0.90000000D+02 0.93000000D+02 0.70240380D-01 0.21011059D-03
+ 0.93000000D+02 0.96000000D+02 0.65973856D-01 0.21026635D-03
+ 0.96000000D+02 0.99000000D+02 0.61045092D-01 0.24843348D-03
+ 0.99000000D+02 0.10200000D+03 0.57285074D-01 0.26417064D-03
+ 0.10200000D+03 0.10500000D+03 0.53425586D-01 0.21462410D-03
+ 0.10500000D+03 0.10800000D+03 0.49966366D-01 0.18298725D-03
+ 0.10800000D+03 0.11100000D+03 0.46742208D-01 0.24303718D-03
+ 0.11100000D+03 0.11400000D+03 0.44382713D-01 0.23809027D-03
+ 0.11400000D+03 0.11700000D+03 0.41229597D-01 0.19838659D-03
+ 0.11700000D+03 0.12000000D+03 0.38671246D-01 0.19470852D-03
+ 0.12000000D+03 0.12300000D+03 0.36727748D-01 0.20754969D-03
+ 0.12300000D+03 0.12600000D+03 0.34420823D-01 0.35763220D-03
+ 0.12600000D+03 0.12900000D+03 0.31902269D-01 0.35091757D-03
+ 0.12900000D+03 0.13200000D+03 0.30705039D-01 0.17518517D-03
+ 0.13200000D+03 0.13500000D+03 0.28558772D-01 0.28231956D-03
+ 0.13500000D+03 0.13800000D+03 0.27304514D-01 0.31491746D-03
+ 0.13800000D+03 0.14100000D+03 0.25652264D-01 0.18626693D-03
+ 0.14100000D+03 0.14400000D+03 0.23876314D-01 0.44589076D-03
+ 0.14400000D+03 0.14700000D+03 0.23341519D-01 0.44957555D-03
+ 0.14700000D+03 0.15000000D+03 0.21831042D-01 0.12461004D-03
+ 0.15000000D+03 0.15300000D+03 0.20392622D-01 0.12665572D-03
+ 0.15300000D+03 0.15600000D+03 0.19507349D-01 0.11409223D-03
+ 0.15600000D+03 0.15900000D+03 0.18377893D-01 0.10122542D-03
+ 0.15900000D+03 0.16200000D+03 0.17486200D-01 0.11597810D-03
+ 0.16200000D+03 0.16500000D+03 0.16617517D-01 0.12757696D-03
+ 0.16500000D+03 0.16800000D+03 0.15743306D-01 0.10623331D-03
+ 0.16800000D+03 0.17100000D+03 0.15152230D-01 0.13110477D-03
+ 0.17100000D+03 0.17400000D+03 0.14157684D-01 0.13765801D-03
+ 0.17400000D+03 0.17700000D+03 0.13528396D-01 0.96298645D-04
+ 0.17700000D+03 0.18000000D+03 0.12833025D-01 0.13530965D-03
+ 0.18000000D+03 0.18300000D+03 0.12269603D-01 0.13046550D-03
+ 0.18300000D+03 0.18600000D+03 0.11658817D-01 0.11383119D-03
+ 0.18600000D+03 0.18900000D+03 0.11048874D-01 0.11179341D-03
+ 0.18900000D+03 0.19200000D+03 0.10656168D-01 0.10165883D-03
+ 0.19200000D+03 0.19500000D+03 0.99492036D-02 0.17619072D-03
+ 0.19500000D+03 0.19800000D+03 0.98658167D-02 0.16861372D-03
+ 0.19800000D+03 0.20100000D+03 0.92586020D-02 0.97781194D-04
+ 0.20100000D+03 0.20400000D+03 0.85862850D-02 0.12138173D-03
+ 0.20400000D+03 0.20700000D+03 0.84550259D-02 0.11355387D-03
+ 0.20700000D+03 0.21000000D+03 0.81083042D-02 0.61181837D-04
+ 0.21000000D+03 0.21300000D+03 0.75642090D-02 0.65635464D-04
+ 0.21300000D+03 0.21600000D+03 0.73003705D-02 0.73265658D-04
+ 0.21600000D+03 0.21900000D+03 0.71254026D-02 0.72358448D-04
+ 0.21900000D+03 0.22200000D+03 0.67371008D-02 0.62658951D-04
+ 0.22200000D+03 0.22500000D+03 0.63642136D-02 0.69743111D-04
+ 0.22500000D+03 0.22800000D+03 0.61801830D-02 0.76215536D-04
+ 0.22800000D+03 0.23100000D+03 0.58426401D-02 0.76161255D-04
+ 0.23100000D+03 0.23400000D+03 0.57407732D-02 0.73642772D-04
+ 0.23400000D+03 0.23700000D+03 0.54409960D-02 0.62906290D-04
+ 0.23700000D+03 0.24000000D+03 0.55325211D-02 0.33757608D-03
+ 0.24000000D+03 0.24300000D+03 0.53528577D-02 0.75621895D-03
+ 0.24300000D+03 0.24600000D+03 0.39945926D-02 0.68325753D-03
+ 0.24600000D+03 0.24900000D+03 0.47801303D-02 0.16432877D-03
+ 0.24900000D+03 0.25200000D+03 0.42721273D-02 0.14736064D-03
+ 0.25200000D+03 0.25500000D+03 0.42979041D-02 0.57989638D-04
+ 0.25500000D+03 0.25800000D+03 0.40306382D-02 0.55712182D-04
+ 0.25800000D+03 0.26100000D+03 0.39709122D-02 0.47882464D-04
+ 0.26100000D+03 0.26400000D+03 0.37526411D-02 0.41890682D-04
+ 0.26400000D+03 0.26700000D+03 0.35283544D-02 0.40555285D-04
+ 0.26700000D+03 0.27000000D+03 0.35252434D-02 0.38759828D-04
+ 0.27000000D+03 0.27300000D+03 0.33741181D-02 0.40165004D-04
+ 0.27300000D+03 0.27600000D+03 0.31965850D-02 0.40114572D-04
+ 0.27600000D+03 0.27900000D+03 0.30175833D-02 0.63419470D-04
+ 0.27900000D+03 0.28200000D+03 0.30726349D-02 0.62397926D-04
+ 0.28200000D+03 0.28500000D+03 0.28589363D-02 0.39748332D-04
+ 0.28500000D+03 0.28800000D+03 0.27993954D-02 0.40007926D-04
+ 0.28800000D+03 0.29100000D+03 0.28678130D-02 0.20526737D-03
+ 0.29100000D+03 0.29400000D+03 0.23737639D-02 0.20639491D-03
+ 0.29400000D+03 0.29700000D+03 0.24621236D-02 0.46714381D-04
+ 0.29700000D+03 0.30000000D+03 0.24133470D-02 0.40317591D-04
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 -.27814925D+01 0.34349191D-02
+ 0.30000000D+01 0.60000000D+01 0.21989226D+01 0.17763041D-02
+ 0.60000000D+01 0.90000000D+01 0.21004090D+01 0.12462682D-02
+ 0.90000000D+01 0.12000000D+02 0.16187469D+01 0.11288895D-02
+ 0.12000000D+02 0.15000000D+02 0.12575019D+01 0.11690712D-02
+ 0.15000000D+02 0.18000000D+02 0.10057887D+01 0.10217779D-02
+ 0.18000000D+02 0.21000000D+02 0.81711063D+00 0.80629364D-03
+ 0.21000000D+02 0.24000000D+02 0.67858924D+00 0.73510207D-03
+ 0.24000000D+02 0.27000000D+02 0.56979981D+00 0.74403423D-03
+ 0.27000000D+02 0.30000000D+02 0.48614629D+00 0.68780088D-03
+ 0.30000000D+02 0.33000000D+02 0.41841606D+00 0.51582954D-03
+ 0.33000000D+02 0.36000000D+02 0.36207795D+00 0.48143406D-03
+ 0.36000000D+02 0.39000000D+02 0.31648810D+00 0.44980250D-03
+ 0.39000000D+02 0.42000000D+02 0.27746556D+00 0.37034935D-03
+ 0.42000000D+02 0.45000000D+02 0.24519337D+00 0.38793736D-03
+ 0.45000000D+02 0.48000000D+02 0.21649928D+00 0.41115271D-03
+ 0.48000000D+02 0.51000000D+02 0.19281527D+00 0.37490800D-03
+ 0.51000000D+02 0.54000000D+02 0.17238548D+00 0.34185229D-03
+ 0.54000000D+02 0.57000000D+02 0.15326069D+00 0.33007430D-03
+ 0.57000000D+02 0.60000000D+02 0.13745358D+00 0.33559406D-03
+ 0.60000000D+02 0.63000000D+02 0.12383143D+00 0.31902550D-03
+ 0.63000000D+02 0.66000000D+02 0.11110769D+00 0.28809667D-03
+ 0.66000000D+02 0.69000000D+02 0.99699517D-01 0.11842837D-02
+ 0.69000000D+02 0.72000000D+02 0.91082087D-01 0.12016162D-02
+ 0.72000000D+02 0.75000000D+02 0.82043590D-01 0.42724916D-03
+ 0.75000000D+02 0.78000000D+02 0.74329243D-01 0.36089425D-03
+ 0.78000000D+02 0.81000000D+02 0.66842613D-01 0.25290184D-03
+ 0.81000000D+02 0.84000000D+02 0.60964758D-01 0.24812080D-03
+ 0.84000000D+02 0.87000000D+02 0.55524366D-01 0.20883440D-03
+ 0.87000000D+02 0.90000000D+02 0.50119663D-01 0.16571647D-03
+ 0.90000000D+02 0.93000000D+02 0.45745336D-01 0.13696102D-03
+ 0.93000000D+02 0.96000000D+02 0.41987752D-01 0.13363257D-03
+ 0.96000000D+02 0.99000000D+02 0.37958569D-01 0.15412156D-03
+ 0.99000000D+02 0.10200000D+03 0.34798553D-01 0.16055227D-03
+ 0.10200000D+03 0.10500000D+03 0.31698444D-01 0.12797010D-03
+ 0.10500000D+03 0.10800000D+03 0.28954580D-01 0.10576271D-03
+ 0.10800000D+03 0.11100000D+03 0.26452988D-01 0.13699461D-03
+ 0.11100000D+03 0.11400000D+03 0.24525090D-01 0.13214461D-03
+ 0.11400000D+03 0.11700000D+03 0.22242581D-01 0.10691807D-03
+ 0.11700000D+03 0.12000000D+03 0.20370942D-01 0.10272936D-03
+ 0.12000000D+03 0.12300000D+03 0.18887844D-01 0.10643539D-03
+ 0.12300000D+03 0.12600000D+03 0.17280012D-01 0.17833581D-03
+ 0.12600000D+03 0.12900000D+03 0.15637639D-01 0.17337809D-03
+ 0.12900000D+03 0.13200000D+03 0.14695351D-01 0.84045454D-04
+ 0.13200000D+03 0.13500000D+03 0.13344651D-01 0.13078055D-03
+ 0.13500000D+03 0.13800000D+03 0.12457132D-01 0.14430630D-03
+ 0.13800000D+03 0.14100000D+03 0.11426052D-01 0.83695685D-04
+ 0.14100000D+03 0.14400000D+03 0.10386980D-01 0.19171809D-03
+ 0.14400000D+03 0.14700000D+03 0.99156937D-02 0.19302883D-03
+ 0.14700000D+03 0.15000000D+03 0.90546205D-02 0.51645029D-04
+ 0.15000000D+03 0.15300000D+03 0.82597638D-02 0.51318091D-04
+ 0.15300000D+03 0.15600000D+03 0.77179669D-02 0.45243477D-04
+ 0.15600000D+03 0.15900000D+03 0.71028234D-02 0.39135141D-04
+ 0.15900000D+03 0.16200000D+03 0.66028870D-02 0.43661302D-04
+ 0.16200000D+03 0.16500000D+03 0.61308568D-02 0.47089601D-04
+ 0.16500000D+03 0.16800000D+03 0.56762495D-02 0.38480701D-04
+ 0.16800000D+03 0.17100000D+03 0.53379580D-02 0.45867836D-04
+ 0.17100000D+03 0.17400000D+03 0.48744621D-02 0.47651616D-04
+ 0.17400000D+03 0.17700000D+03 0.45531216D-02 0.32437930D-04
+ 0.17700000D+03 0.18000000D+03 0.42229314D-02 0.44264184D-04
+ 0.18000000D+03 0.18300000D+03 0.39476405D-02 0.42276869D-04
+ 0.18300000D+03 0.18600000D+03 0.36684230D-02 0.35610457D-04
+ 0.18600000D+03 0.18900000D+03 0.34001151D-02 0.34622478D-04
+ 0.18900000D+03 0.19200000D+03 0.32079301D-02 0.30430022D-04
+ 0.19200000D+03 0.19500000D+03 0.29301586D-02 0.51607015D-04
+ 0.19500000D+03 0.19800000D+03 0.28429241D-02 0.48902028D-04
+ 0.19800000D+03 0.20100000D+03 0.26099080D-02 0.27595184D-04
+ 0.20100000D+03 0.20400000D+03 0.23694567D-02 0.33347276D-04
+ 0.20400000D+03 0.20700000D+03 0.22841789D-02 0.30886437D-04
+ 0.20700000D+03 0.21000000D+03 0.21442301D-02 0.16173785D-04
+ 0.21000000D+03 0.21300000D+03 0.19586084D-02 0.16970449D-04
+ 0.21300000D+03 0.21600000D+03 0.18514160D-02 0.18552387D-04
+ 0.21600000D+03 0.21900000D+03 0.17696169D-02 0.17993695D-04
+ 0.21900000D+03 0.22200000D+03 0.16385786D-02 0.15261614D-04
+ 0.22200000D+03 0.22500000D+03 0.15166472D-02 0.16572973D-04
+ 0.22500000D+03 0.22800000D+03 0.14431905D-02 0.17806670D-04
+ 0.22800000D+03 0.23100000D+03 0.13370927D-02 0.17413385D-04
+ 0.23100000D+03 0.23400000D+03 0.12875154D-02 0.16542920D-04
+ 0.23400000D+03 0.23700000D+03 0.11960041D-02 0.13847514D-04
+ 0.23700000D+03 0.24000000D+03 0.11916181D-02 0.72075600D-04
+ 0.24000000D+03 0.24300000D+03 0.11290047D-02 0.15886937D-03
+ 0.24300000D+03 0.24600000D+03 0.82644996D-03 0.14291825D-03
+ 0.24600000D+03 0.24900000D+03 0.97141122D-03 0.33244148D-04
+ 0.24900000D+03 0.25200000D+03 0.85160133D-03 0.29616926D-04
+ 0.25200000D+03 0.25500000D+03 0.84068387D-03 0.11339492D-04
+ 0.25500000D+03 0.25800000D+03 0.77352353D-03 0.10707252D-04
+ 0.25800000D+03 0.26100000D+03 0.74782516D-03 0.90316299D-05
+ 0.26100000D+03 0.26400000D+03 0.69357687D-03 0.77487924D-05
+ 0.26400000D+03 0.26700000D+03 0.64031250D-03 0.73591606D-05
+ 0.26700000D+03 0.27000000D+03 0.62810238D-03 0.69082886D-05
+ 0.27000000D+03 0.27300000D+03 0.59016473D-03 0.70165291D-05
+ 0.27300000D+03 0.27600000D+03 0.54902443D-03 0.68970348D-05
+ 0.27600000D+03 0.27900000D+03 0.50919940D-03 0.10636375D-04
+ 0.27900000D+03 0.28200000D+03 0.50922004D-03 0.10403337D-04
+ 0.28200000D+03 0.28500000D+03 0.46543168D-03 0.64539718D-05
+ 0.28500000D+03 0.28800000D+03 0.44772809D-03 0.64142028D-05
+ 0.28800000D+03 0.29100000D+03 0.45036109D-03 0.31983311D-04
+ 0.29100000D+03 0.29400000D+03 0.36631197D-03 0.32129895D-04
+ 0.29400000D+03 0.29700000D+03 0.37375872D-03 0.70845188D-05
+ 0.29700000D+03 0.30000000D+03 0.36010919D-03 0.60372291D-05
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.92216012D+00 0.57052613D-03
+ 0.12500000D+03 0.13000000D+03 -.59615257D+01 0.22646214D-02
+ 0.13000000D+03 0.13500000D+03 0.34599695D+01 0.16755222D-02
+ 0.13500000D+03 0.14000000D+03 0.20123361D+01 0.13972412D-02
+ 0.14000000D+03 0.14500000D+03 0.13198406D+01 0.14294835D-02
+ 0.14500000D+03 0.15000000D+03 0.94062555D+00 0.12529540D-02
+ 0.15000000D+03 0.15500000D+03 0.70670047D+00 0.80703128D-03
+ 0.15500000D+03 0.16000000D+03 0.55208430D+00 0.82968467D-03
+ 0.16000000D+03 0.16500000D+03 0.44660468D+00 0.78793842D-03
+ 0.16500000D+03 0.17000000D+03 0.36557897D+00 0.73694583D-03
+ 0.17000000D+03 0.17500000D+03 0.30720995D+00 0.91258185D-03
+ 0.17500000D+03 0.18000000D+03 0.26223651D+00 0.77513629D-03
+ 0.18000000D+03 0.18500000D+03 0.22460404D+00 0.54993466D-03
+ 0.18500000D+03 0.19000000D+03 0.19702408D+00 0.50107358D-03
+ 0.19000000D+03 0.19500000D+03 0.17057556D+00 0.49005362D-03
+ 0.19500000D+03 0.20000000D+03 0.15227819D+00 0.61832029D-03
+ 0.20000000D+03 0.20500000D+03 0.13606204D+00 0.52591681D-03
+ 0.20500000D+03 0.21000000D+03 0.11999457D+00 0.37858206D-03
+ 0.21000000D+03 0.21500000D+03 0.10832943D+00 0.91276260D-03
+ 0.21500000D+03 0.22000000D+03 0.99218484D-01 0.89592976D-03
+ 0.22000000D+03 0.22500000D+03 0.89031998D-01 0.33530080D-03
+ 0.22500000D+03 0.23000000D+03 0.80753576D-01 0.39289277D-03
+ 0.23000000D+03 0.23500000D+03 0.73619084D-01 0.99643270D-03
+ 0.23500000D+03 0.24000000D+03 0.68717599D-01 0.97545572D-03
+ 0.24000000D+03 0.24500000D+03 0.62835803D-01 0.29821374D-03
+ 0.24500000D+03 0.25000000D+03 0.57260322D-01 0.29942950D-03
+ 0.25000000D+03 0.25500000D+03 0.52855818D-01 0.29633174D-03
+ 0.25500000D+03 0.26000000D+03 0.48810995D-01 0.27006285D-03
+ 0.26000000D+03 0.26500000D+03 0.45311998D-01 0.32858262D-03
+ 0.26500000D+03 0.27000000D+03 0.42263235D-01 0.34937650D-03
+ 0.27000000D+03 0.27500000D+03 0.39585252D-01 0.30407303D-03
+ 0.27500000D+03 0.28000000D+03 0.36752873D-01 0.26610507D-03
+ 0.28000000D+03 0.28500000D+03 0.34278513D-01 0.29062617D-03
+ 0.28500000D+03 0.29000000D+03 0.31985878D-01 0.27052721D-03
+ 0.29000000D+03 0.29500000D+03 0.30152444D-01 0.18587979D-03
+ 0.29500000D+03 0.30000000D+03 0.28036539D-01 0.17951251D-03
+ 0.30000000D+03 0.30500000D+03 0.26505696D-01 0.23201985D-03
+ 0.30500000D+03 0.31000000D+03 0.24766887D-01 0.21955437D-03
+ 0.31000000D+03 0.31500000D+03 0.23418898D-01 0.15123514D-03
+ 0.31500000D+03 0.32000000D+03 0.22040963D-01 0.17549534D-03
+ 0.32000000D+03 0.32500000D+03 0.20787500D-01 0.18208178D-03
+ 0.32500000D+03 0.33000000D+03 0.19640416D-01 0.15702554D-03
+ 0.33000000D+03 0.33500000D+03 0.18667369D-01 0.13688951D-03
+ 0.33500000D+03 0.34000000D+03 0.16970282D-01 0.28296410D-03
+ 0.34000000D+03 0.34500000D+03 0.16828318D-01 0.34827061D-03
+ 0.34500000D+03 0.35000000D+03 0.16173991D-01 0.23595904D-03
+ 0.35000000D+03 0.35500000D+03 0.14669508D-01 0.12825400D-03
+ 0.35500000D+03 0.36000000D+03 0.14346228D-01 0.13709356D-03
+ 0.36000000D+03 0.36500000D+03 0.13364165D-01 0.13289623D-03
+ 0.36500000D+03 0.37000000D+03 0.12920654D-01 0.13511036D-03
+ 0.37000000D+03 0.37500000D+03 0.12181256D-01 0.13335451D-03
+ 0.37500000D+03 0.38000000D+03 0.11287427D-01 0.24206641D-03
+ 0.38000000D+03 0.38500000D+03 0.11554562D-01 0.23478051D-03
+ 0.38500000D+03 0.39000000D+03 0.10450096D-01 0.10667614D-03
+ 0.39000000D+03 0.39500000D+03 0.99705693D-02 0.15163338D-03
+ 0.39500000D+03 0.40000000D+03 0.95153071D-02 0.19995773D-03
+ 0.40000000D+03 0.40500000D+03 0.93213875D-02 0.17965469D-03
+ 0.40500000D+03 0.41000000D+03 0.88415021D-02 0.11713056D-03
+ 0.41000000D+03 0.41500000D+03 0.84916972D-02 0.94976344D-04
+ 0.41500000D+03 0.42000000D+03 0.77677368D-02 0.17298564D-03
+ 0.42000000D+03 0.42500000D+03 0.78124620D-02 0.18253822D-03
+ 0.42500000D+03 0.43000000D+03 0.73877115D-02 0.11234652D-03
+ 0.43000000D+03 0.43500000D+03 0.71092741D-02 0.10067659D-03
+ 0.43500000D+03 0.44000000D+03 0.64608618D-02 0.29346055D-03
+ 0.44000000D+03 0.44500000D+03 0.67098950D-02 0.29334822D-03
+ 0.44500000D+03 0.45000000D+03 0.63386799D-02 0.93901877D-04
+ 0.45000000D+03 0.45500000D+03 0.59017363D-02 0.86044815D-04
+ 0.45500000D+03 0.46000000D+03 0.57218556D-02 0.77713737D-04
+ 0.46000000D+03 0.46500000D+03 0.54574638D-02 0.97984524D-04
+ 0.46500000D+03 0.47000000D+03 0.53418197D-02 0.11362546D-03
+ 0.47000000D+03 0.47500000D+03 0.51266017D-02 0.87580614D-04
+ 0.47500000D+03 0.48000000D+03 0.49415932D-02 0.59545975D-04
+ 0.48000000D+03 0.48500000D+03 0.46438891D-02 0.57474204D-04
+ 0.48500000D+03 0.49000000D+03 0.45278080D-02 0.57438350D-04
+ 0.49000000D+03 0.49500000D+03 0.42286223D-02 0.89339462D-04
+ 0.49500000D+03 0.50000000D+03 0.43224792D-02 0.98204394D-04
+ 0.50000000D+03 0.50500000D+03 0.41076209D-02 0.72031004D-04
+ 0.50500000D+03 0.51000000D+03 0.38453405D-02 0.63806602D-04
+ 0.51000000D+03 0.51500000D+03 0.37798119D-02 0.59699452D-04
+ 0.51500000D+03 0.52000000D+03 0.36061090D-02 0.54999909D-04
+ 0.52000000D+03 0.52500000D+03 0.34859889D-02 0.57172703D-04
+ 0.52500000D+03 0.53000000D+03 0.34410702D-02 0.53935167D-04
+ 0.53000000D+03 0.53500000D+03 0.31935177D-02 0.52963550D-04
+ 0.53500000D+03 0.54000000D+03 0.31564856D-02 0.60194805D-04
+ 0.54000000D+03 0.54500000D+03 0.30195682D-02 0.59141430D-04
+ 0.54500000D+03 0.55000000D+03 0.30397223D-02 0.50735519D-04
+ 0.55000000D+03 0.55500000D+03 0.27660695D-02 0.47037979D-04
+ 0.55500000D+03 0.56000000D+03 0.27018273D-02 0.58050540D-04
+ 0.56000000D+03 0.56500000D+03 0.26975943D-02 0.74600716D-04
+ 0.56500000D+03 0.57000000D+03 0.25831858D-02 0.67183942D-04
+ 0.57000000D+03 0.57500000D+03 0.24647547D-02 0.58894962D-04
+ 0.57500000D+03 0.58000000D+03 0.24483268D-02 0.61548215D-04
+ 0.58000000D+03 0.58500000D+03 0.23162921D-02 0.48188912D-04
+ 0.58500000D+03 0.59000000D+03 0.22102651D-02 0.40549395D-04
+ 0.59000000D+03 0.59500000D+03 0.22332044D-02 0.35554293D-04
+ 0.59500000D+03 0.60000000D+03 0.20355614D-02 0.37810091D-04
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.92216012D+00 0.57052613D-03
+ 0.12500000D+03 0.13000000D+03 -.59631108D+01 0.22633801D-02
+ 0.13000000D+03 0.13500000D+03 0.34479190D+01 0.16697442D-02
+ 0.13500000D+03 0.14000000D+03 0.19927765D+01 0.13834793D-02
+ 0.14000000D+03 0.14500000D+03 0.12947565D+01 0.14003145D-02
+ 0.14500000D+03 0.15000000D+03 0.91132192D+00 0.12174345D-02
+ 0.15000000D+03 0.15500000D+03 0.67424231D+00 0.77098648D-03
+ 0.15500000D+03 0.16000000D+03 0.51726044D+00 0.77517266D-03
+ 0.16000000D+03 0.16500000D+03 0.40983115D+00 0.72569176D-03
+ 0.16500000D+03 0.17000000D+03 0.32777932D+00 0.65809521D-03
+ 0.17000000D+03 0.17500000D+03 0.26852627D+00 0.79582406D-03
+ 0.17500000D+03 0.18000000D+03 0.22297824D+00 0.66400640D-03
+ 0.18000000D+03 0.18500000D+03 0.18543652D+00 0.45316272D-03
+ 0.18500000D+03 0.19000000D+03 0.15766570D+00 0.40304545D-03
+ 0.19000000D+03 0.19500000D+03 0.13210987D+00 0.37735934D-03
+ 0.19500000D+03 0.20000000D+03 0.11399456D+00 0.46159250D-03
+ 0.20000000D+03 0.20500000D+03 0.98311812D-01 0.38374242D-03
+ 0.20500000D+03 0.21000000D+03 0.83612178D-01 0.26291802D-03
+ 0.21000000D+03 0.21500000D+03 0.72748740D-01 0.60353767D-03
+ 0.21500000D+03 0.22000000D+03 0.64143528D-01 0.58855755D-03
+ 0.22000000D+03 0.22500000D+03 0.55372329D-01 0.20827635D-03
+ 0.22500000D+03 0.23000000D+03 0.48306161D-01 0.23398056D-03
+ 0.23000000D+03 0.23500000D+03 0.42348195D-01 0.56377093D-03
+ 0.23500000D+03 0.24000000D+03 0.37987061D-01 0.54849695D-03
+ 0.24000000D+03 0.24500000D+03 0.33364792D-01 0.15899860D-03
+ 0.24500000D+03 0.25000000D+03 0.29210375D-01 0.15222602D-03
+ 0.25000000D+03 0.25500000D+03 0.25906752D-01 0.14580279D-03
+ 0.25500000D+03 0.26000000D+03 0.22991428D-01 0.12715906D-03
+ 0.26000000D+03 0.26500000D+03 0.20510877D-01 0.14786383D-03
+ 0.26500000D+03 0.27000000D+03 0.18387868D-01 0.15246794D-03
+ 0.27000000D+03 0.27500000D+03 0.16552714D-01 0.12742872D-03
+ 0.27500000D+03 0.28000000D+03 0.14774188D-01 0.10733199D-03
+ 0.28000000D+03 0.28500000D+03 0.13250143D-01 0.11172575D-03
+ 0.28500000D+03 0.29000000D+03 0.11893104D-01 0.10143264D-03
+ 0.29000000D+03 0.29500000D+03 0.10786170D-01 0.66566825D-04
+ 0.29500000D+03 0.30000000D+03 0.96533872D-02 0.61856926D-04
+ 0.30000000D+03 0.30500000D+03 0.87869411D-02 0.76334600D-04
+ 0.30500000D+03 0.31000000D+03 0.79084195D-02 0.70875060D-04
+ 0.31000000D+03 0.31500000D+03 0.72064474D-02 0.46462820D-04
+ 0.31500000D+03 0.32000000D+03 0.65370097D-02 0.51898127D-04
+ 0.32000000D+03 0.32500000D+03 0.59454399D-02 0.52210782D-04
+ 0.32500000D+03 0.33000000D+03 0.54184261D-02 0.43465865D-04
+ 0.33000000D+03 0.33500000D+03 0.49694305D-02 0.36516695D-04
+ 0.33500000D+03 0.34000000D+03 0.43643936D-02 0.71767306D-04
+ 0.34000000D+03 0.34500000D+03 0.41811062D-02 0.86768611D-04
+ 0.34500000D+03 0.35000000D+03 0.38810668D-02 0.57347282D-04
+ 0.35000000D+03 0.35500000D+03 0.34016207D-02 0.29631426D-04
+ 0.35500000D+03 0.36000000D+03 0.32174375D-02 0.30781240D-04
+ 0.36000000D+03 0.36500000D+03 0.28995175D-02 0.28820322D-04
+ 0.36500000D+03 0.37000000D+03 0.27126944D-02 0.28361050D-04
+ 0.37000000D+03 0.37500000D+03 0.24760643D-02 0.27136700D-04
+ 0.37500000D+03 0.38000000D+03 0.22230263D-02 0.47114555D-04
+ 0.38000000D+03 0.38500000D+03 0.22046202D-02 0.45359502D-04
+ 0.38500000D+03 0.39000000D+03 0.19313700D-02 0.19666875D-04
+ 0.39000000D+03 0.39500000D+03 0.17873019D-02 0.27016968D-04
+ 0.39500000D+03 0.40000000D+03 0.16550637D-02 0.34670796D-04
+ 0.40000000D+03 0.40500000D+03 0.15732226D-02 0.30519040D-04
+ 0.40500000D+03 0.41000000D+03 0.14479598D-02 0.19257400D-04
+ 0.41000000D+03 0.41500000D+03 0.13499027D-02 0.15119213D-04
+ 0.41500000D+03 0.42000000D+03 0.11997490D-02 0.26450484D-04
+ 0.42000000D+03 0.42500000D+03 0.11726498D-02 0.27591512D-04
+ 0.42500000D+03 0.43000000D+03 0.10776839D-02 0.16436461D-04
+ 0.43000000D+03 0.43500000D+03 0.10081323D-02 0.14277994D-04
+ 0.43500000D+03 0.44000000D+03 0.89155600D-03 0.40001364D-04
+ 0.44000000D+03 0.44500000D+03 0.90102590D-03 0.39843017D-04
+ 0.44500000D+03 0.45000000D+03 0.82780762D-03 0.12292538D-04
+ 0.45000000D+03 0.45500000D+03 0.75025248D-03 0.10940734D-04
+ 0.45500000D+03 0.46000000D+03 0.70840844D-03 0.96539611D-05
+ 0.46000000D+03 0.46500000D+03 0.65853390D-03 0.11747441D-04
+ 0.46500000D+03 0.47000000D+03 0.62811031D-03 0.13380874D-04
+ 0.47000000D+03 0.47500000D+03 0.58730283D-03 0.10092065D-04
+ 0.47500000D+03 0.48000000D+03 0.55175648D-03 0.66638684D-05
+ 0.48000000D+03 0.48500000D+03 0.50580957D-03 0.62575257D-05
+ 0.48500000D+03 0.49000000D+03 0.48110933D-03 0.61112592D-05
+ 0.49000000D+03 0.49500000D+03 0.43858806D-03 0.91963753D-05
+ 0.49500000D+03 0.50000000D+03 0.43760005D-03 0.99815225D-05
+ 0.50000000D+03 0.50500000D+03 0.40583754D-03 0.71338859D-05
+ 0.50500000D+03 0.51000000D+03 0.37091868D-03 0.61563621D-05
+ 0.51000000D+03 0.51500000D+03 0.35619173D-03 0.56363892D-05
+ 0.51500000D+03 0.52000000D+03 0.33191644D-03 0.50647890D-05
+ 0.52000000D+03 0.52500000D+03 0.31368084D-03 0.51409023D-05
+ 0.52500000D+03 0.53000000D+03 0.30267378D-03 0.47577115D-05
+ 0.53000000D+03 0.53500000D+03 0.27455010D-03 0.45461188D-05
+ 0.53500000D+03 0.54000000D+03 0.26546158D-03 0.50602721D-05
+ 0.54000000D+03 0.54500000D+03 0.24843040D-03 0.48715289D-05
+ 0.54500000D+03 0.55000000D+03 0.24459073D-03 0.40923397D-05
+ 0.55000000D+03 0.55500000D+03 0.21778238D-03 0.37027034D-05
+ 0.55500000D+03 0.56000000D+03 0.20826223D-03 0.44650692D-05
+ 0.56000000D+03 0.56500000D+03 0.20360460D-03 0.56200506D-05
+ 0.56500000D+03 0.57000000D+03 0.19088427D-03 0.49894690D-05
+ 0.57000000D+03 0.57500000D+03 0.17838794D-03 0.42491869D-05
+ 0.57500000D+03 0.58000000D+03 0.17352999D-03 0.43742568D-05
+ 0.58000000D+03 0.58500000D+03 0.16086548D-03 0.33565434D-05
+ 0.58500000D+03 0.59000000D+03 0.15046440D-03 0.27622885D-05
+ 0.59000000D+03 0.59500000D+03 0.14892662D-03 0.23776003D-05
+ 0.59500000D+03 0.60000000D+03 0.13308159D-03 0.24655447D-05
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 -.16514391D+01 0.36207637D-02
+ 0.30000000D+01 0.60000000D+01 0.18803550D+01 0.20542442D-02
+ 0.60000000D+01 0.90000000D+01 0.19547716D+01 0.14165907D-02
+ 0.90000000D+01 0.12000000D+02 0.15317161D+01 0.12714709D-02
+ 0.12000000D+02 0.15000000D+02 0.12064479D+01 0.13007257D-02
+ 0.15000000D+02 0.18000000D+02 0.96573979D+00 0.12048631D-02
+ 0.18000000D+02 0.21000000D+02 0.79374791D+00 0.98596025D-03
+ 0.21000000D+02 0.24000000D+02 0.66475945D+00 0.87791938D-03
+ 0.24000000D+02 0.27000000D+02 0.56504844D+00 0.85807826D-03
+ 0.27000000D+02 0.30000000D+02 0.48605816D+00 0.76373663D-03
+ 0.30000000D+02 0.33000000D+02 0.42202407D+00 0.71669382D-03
+ 0.33000000D+02 0.36000000D+02 0.37078493D+00 0.68572583D-03
+ 0.36000000D+02 0.39000000D+02 0.32700564D+00 0.91633901D-03
+ 0.39000000D+02 0.42000000D+02 0.29201866D+00 0.91715856D-03
+ 0.42000000D+02 0.45000000D+02 0.25990181D+00 0.63378699D-03
+ 0.45000000D+02 0.48000000D+02 0.23377505D+00 0.75200009D-03
+ 0.48000000D+02 0.51000000D+02 0.21156029D+00 0.80728146D-03
+ 0.51000000D+02 0.54000000D+02 0.19109493D+00 0.71542730D-03
+ 0.54000000D+02 0.57000000D+02 0.17400944D+00 0.57126459D-03
+ 0.57000000D+02 0.60000000D+02 0.15843597D+00 0.53639876D-03
+ 0.60000000D+02 0.63000000D+02 0.14470089D+00 0.65140633D-03
+ 0.63000000D+02 0.66000000D+02 0.13275865D+00 0.56136785D-03
+ 0.66000000D+02 0.69000000D+02 0.12816460D+00 0.70236002D-02
+ 0.69000000D+02 0.72000000D+02 0.10616068D+00 0.70255280D-02
+ 0.72000000D+02 0.75000000D+02 0.10298880D+00 0.46195044D-03
+ 0.75000000D+02 0.78000000D+02 0.95634288D-01 0.39248917D-03
+ 0.78000000D+02 0.81000000D+02 0.88053686D-01 0.38016200D-03
+ 0.81000000D+02 0.84000000D+02 0.82568805D-01 0.37832848D-03
+ 0.84000000D+02 0.87000000D+02 0.74879685D-01 0.69426085D-03
+ 0.87000000D+02 0.90000000D+02 0.71668942D-01 0.68354186D-03
+ 0.90000000D+02 0.93000000D+02 0.65548483D-01 0.36931846D-03
+ 0.93000000D+02 0.96000000D+02 0.61000319D-01 0.48278432D-03
+ 0.96000000D+02 0.99000000D+02 0.57445603D-01 0.48219236D-03
+ 0.99000000D+02 0.10200000D+03 0.53237191D-01 0.36855892D-03
+ 0.10200000D+03 0.10500000D+03 0.49709880D-01 0.30310591D-03
+ 0.10500000D+03 0.10800000D+03 0.47323527D-01 0.42816545D-03
+ 0.10800000D+03 0.11100000D+03 0.44060651D-01 0.59653522D-03
+ 0.11100000D+03 0.11400000D+03 0.40085316D-01 0.55427181D-03
+ 0.11400000D+03 0.11700000D+03 0.38809033D-01 0.45323985D-03
+ 0.11700000D+03 0.12000000D+03 0.35896963D-01 0.36804672D-03
+ 0.12000000D+03 0.12300000D+03 0.33195636D-01 0.41667442D-03
+ 0.12300000D+03 0.12600000D+03 0.32519834D-01 0.45432986D-03
+ 0.12600000D+03 0.12900000D+03 0.29708698D-01 0.32044271D-03
+ 0.12900000D+03 0.13200000D+03 0.28434777D-01 0.27082732D-03
+ 0.13200000D+03 0.13500000D+03 0.27174290D-01 0.33355965D-03
+ 0.13500000D+03 0.13800000D+03 0.24908903D-01 0.35482072D-03
+ 0.13800000D+03 0.14100000D+03 0.23802840D-01 0.28696097D-03
+ 0.14100000D+03 0.14400000D+03 0.23190655D-01 0.58337269D-03
+ 0.14400000D+03 0.14700000D+03 0.20407412D-01 0.57597830D-03
+ 0.14700000D+03 0.15000000D+03 0.20123309D-01 0.33699636D-03
+ 0.15000000D+03 0.15300000D+03 0.19443036D-01 0.36255661D-03
+ 0.15300000D+03 0.15600000D+03 0.18610028D-01 0.68831785D-03
+ 0.15600000D+03 0.15900000D+03 0.16314999D-01 0.70003495D-03
+ 0.15900000D+03 0.16200000D+03 0.16282989D-01 0.28587266D-03
+ 0.16200000D+03 0.16500000D+03 0.15138506D-01 0.18051727D-03
+ 0.16500000D+03 0.16800000D+03 0.14770033D-01 0.28766840D-03
+ 0.16800000D+03 0.17100000D+03 0.13446392D-01 0.32013558D-03
+ 0.17100000D+03 0.17400000D+03 0.13443363D-01 0.20940022D-03
+ 0.17400000D+03 0.17700000D+03 0.12311435D-01 0.17312992D-03
+ 0.17700000D+03 0.18000000D+03 0.11643466D-01 0.48202473D-03
+ 0.18000000D+03 0.18300000D+03 0.11702774D-01 0.48071883D-03
+ 0.18300000D+03 0.18600000D+03 0.11022791D-01 0.18416156D-03
+ 0.18600000D+03 0.18900000D+03 0.10129899D-01 0.17462676D-03
+ 0.18900000D+03 0.19200000D+03 0.99658428D-02 0.15405603D-03
+ 0.19200000D+03 0.19500000D+03 0.92256126D-02 0.17957685D-03
+ 0.19500000D+03 0.19800000D+03 0.89464491D-02 0.16248606D-03
+ 0.19800000D+03 0.20100000D+03 0.87470688D-02 0.21779776D-03
+ 0.20100000D+03 0.20400000D+03 0.79333230D-02 0.23388727D-03
+ 0.20400000D+03 0.20700000D+03 0.77282701D-02 0.17471689D-03
+ 0.20700000D+03 0.21000000D+03 0.74159434D-02 0.14381483D-03
+ 0.21000000D+03 0.21300000D+03 0.71603685D-02 0.10483299D-03
+ 0.21300000D+03 0.21600000D+03 0.68001899D-02 0.11440288D-03
+ 0.21600000D+03 0.21900000D+03 0.64013163D-02 0.12038129D-03
+ 0.21900000D+03 0.22200000D+03 0.63333519D-02 0.12162062D-03
+ 0.22200000D+03 0.22500000D+03 0.58107318D-02 0.13329557D-03
+ 0.22500000D+03 0.22800000D+03 0.55489125D-02 0.27134150D-03
+ 0.22800000D+03 0.23100000D+03 0.59665376D-02 0.27960847D-03
+ 0.23100000D+03 0.23400000D+03 0.49080350D-02 0.13571719D-03
+ 0.23400000D+03 0.23700000D+03 0.50224254D-02 0.76482790D-04
+ 0.23700000D+03 0.24000000D+03 0.46722995D-02 0.29491243D-03
+ 0.24000000D+03 0.24300000D+03 0.40472901D-02 0.67764442D-03
+ 0.24300000D+03 0.24600000D+03 0.51581811D-02 0.62269060D-03
+ 0.24600000D+03 0.24900000D+03 0.41538536D-02 0.18641236D-03
+ 0.24900000D+03 0.25200000D+03 0.41573983D-02 0.15370923D-03
+ 0.25200000D+03 0.25500000D+03 0.38845638D-02 0.71192661D-04
+ 0.25500000D+03 0.25800000D+03 0.38783029D-02 0.80719454D-04
+ 0.25800000D+03 0.26100000D+03 0.34859890D-02 0.14266976D-03
+ 0.26100000D+03 0.26400000D+03 0.35580016D-02 0.14145039D-03
+ 0.26400000D+03 0.26700000D+03 0.33823300D-02 0.72834260D-04
+ 0.26700000D+03 0.27000000D+03 0.31871639D-02 0.12154174D-03
+ 0.27000000D+03 0.27300000D+03 0.30622018D-02 0.12505788D-03
+ 0.27300000D+03 0.27600000D+03 0.29666987D-02 0.77684904D-04
+ 0.27600000D+03 0.27900000D+03 0.29345041D-02 0.80100725D-04
+ 0.27900000D+03 0.28200000D+03 0.27775883D-02 0.78546187D-04
+ 0.28200000D+03 0.28500000D+03 0.26448516D-02 0.65102546D-04
+ 0.28500000D+03 0.28800000D+03 0.25792486D-02 0.99358796D-04
+ 0.28800000D+03 0.29100000D+03 0.22973106D-02 0.16122871D-03
+ 0.29100000D+03 0.29400000D+03 0.25256151D-02 0.13864825D-03
+ 0.29400000D+03 0.29700000D+03 0.22661904D-02 0.66994043D-04
+ 0.29700000D+03 0.30000000D+03 0.21306956D-02 0.79551204D-04
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 -.16503792D+01 0.36201400D-02
+ 0.30000000D+01 0.60000000D+01 0.18776608D+01 0.20520470D-02
+ 0.60000000D+01 0.90000000D+01 0.19477724D+01 0.14117170D-02
+ 0.90000000D+01 0.12000000D+02 0.15210432D+01 0.12623571D-02
+ 0.12000000D+02 0.15000000D+02 0.11925992D+01 0.12854079D-02
+ 0.15000000D+02 0.18000000D+02 0.94925613D+00 0.11848449D-02
+ 0.18000000D+02 0.21000000D+02 0.77494852D+00 0.96302912D-03
+ 0.21000000D+02 0.24000000D+02 0.64395366D+00 0.85034840D-03
+ 0.24000000D+02 0.27000000D+02 0.54252429D+00 0.82390012D-03
+ 0.27000000D+02 0.30000000D+02 0.46208186D+00 0.72650648D-03
+ 0.30000000D+02 0.33000000D+02 0.39686491D+00 0.67366120D-03
+ 0.33000000D+02 0.36000000D+02 0.34457833D+00 0.63778381D-03
+ 0.36000000D+02 0.39000000D+02 0.30003976D+00 0.83764840D-03
+ 0.39000000D+02 0.42000000D+02 0.26430523D+00 0.83305157D-03
+ 0.42000000D+02 0.45000000D+02 0.23185252D+00 0.56522257D-03
+ 0.45000000D+02 0.48000000D+02 0.20538165D+00 0.65912384D-03
+ 0.48000000D+02 0.51000000D+02 0.18290420D+00 0.69851918D-03
+ 0.51000000D+02 0.54000000D+02 0.16245883D+00 0.60867980D-03
+ 0.54000000D+02 0.57000000D+02 0.14537160D+00 0.47888974D-03
+ 0.57000000D+02 0.60000000D+02 0.12998143D+00 0.43860190D-03
+ 0.60000000D+02 0.63000000D+02 0.11651629D+00 0.52415716D-03
+ 0.63000000D+02 0.66000000D+02 0.10485733D+00 0.44523485D-03
+ 0.66000000D+02 0.69000000D+02 0.99191714D-01 0.53835355D-02
+ 0.69000000D+02 0.72000000D+02 0.80498374D-01 0.53844804D-02
+ 0.72000000D+02 0.75000000D+02 0.76537171D-01 0.34397964D-03
+ 0.75000000D+02 0.78000000D+02 0.69583488D-01 0.28594236D-03
+ 0.78000000D+02 0.81000000D+02 0.62704849D-01 0.27051270D-03
+ 0.81000000D+02 0.84000000D+02 0.57525737D-01 0.26376891D-03
+ 0.84000000D+02 0.87000000D+02 0.51025166D-01 0.46920974D-03
+ 0.87000000D+02 0.90000000D+02 0.47748900D-01 0.45927897D-03
+ 0.90000000D+02 0.93000000D+02 0.42685142D-01 0.23990292D-03
+ 0.93000000D+02 0.96000000D+02 0.38824273D-01 0.30625372D-03
+ 0.96000000D+02 0.99000000D+02 0.35721471D-01 0.30080301D-03
+ 0.99000000D+02 0.10200000D+03 0.32338805D-01 0.22448728D-03
+ 0.10200000D+03 0.10500000D+03 0.29497357D-01 0.18012432D-03
+ 0.10500000D+03 0.10800000D+03 0.27421655D-01 0.24642806D-03
+ 0.10800000D+03 0.11100000D+03 0.24924865D-01 0.33677683D-03
+ 0.11100000D+03 0.11400000D+03 0.22144348D-01 0.30760769D-03
+ 0.11400000D+03 0.11700000D+03 0.20936866D-01 0.24429144D-03
+ 0.11700000D+03 0.12000000D+03 0.18906004D-01 0.19533155D-03
+ 0.12000000D+03 0.12300000D+03 0.17074067D-01 0.21245459D-03
+ 0.12300000D+03 0.12600000D+03 0.16331037D-01 0.22925806D-03
+ 0.12600000D+03 0.12900000D+03 0.14564825D-01 0.15730593D-03
+ 0.12900000D+03 0.13200000D+03 0.13610560D-01 0.12986990D-03
+ 0.13200000D+03 0.13500000D+03 0.12695701D-01 0.15502222D-03
+ 0.13500000D+03 0.13800000D+03 0.11361344D-01 0.16238735D-03
+ 0.13800000D+03 0.14100000D+03 0.10603442D-01 0.12799394D-03
+ 0.14100000D+03 0.14400000D+03 0.10082309D-01 0.25137339D-03
+ 0.14400000D+03 0.14700000D+03 0.86648642D-02 0.24702413D-03
+ 0.14700000D+03 0.15000000D+03 0.83473883D-02 0.13893075D-03
+ 0.15000000D+03 0.15300000D+03 0.78761774D-02 0.14739081D-03
+ 0.15300000D+03 0.15600000D+03 0.73588016D-02 0.26973686D-03
+ 0.15600000D+03 0.15900000D+03 0.63021892D-02 0.27295614D-03
+ 0.15900000D+03 0.16200000D+03 0.61477856D-02 0.10849478D-03
+ 0.16200000D+03 0.16500000D+03 0.55847469D-02 0.66890755D-04
+ 0.16500000D+03 0.16800000D+03 0.53237410D-02 0.10280270D-03
+ 0.16800000D+03 0.17100000D+03 0.47379584D-02 0.11329625D-03
+ 0.17100000D+03 0.17400000D+03 0.46300676D-02 0.72403641D-04
+ 0.17400000D+03 0.17700000D+03 0.41449384D-02 0.58235350D-04
+ 0.17700000D+03 0.18000000D+03 0.38342830D-02 0.15707173D-03
+ 0.18000000D+03 0.18300000D+03 0.37678348D-02 0.15619019D-03
+ 0.18300000D+03 0.18600000D+03 0.34687201D-02 0.57849187D-04
+ 0.18600000D+03 0.18900000D+03 0.31173176D-02 0.53896795D-04
+ 0.18900000D+03 0.19200000D+03 0.29997633D-02 0.46334668D-04
+ 0.19200000D+03 0.19500000D+03 0.27170064D-02 0.52774292D-04
+ 0.19500000D+03 0.19800000D+03 0.25779992D-02 0.47049280D-04
+ 0.19800000D+03 0.20100000D+03 0.24658350D-02 0.60935660D-04
+ 0.20100000D+03 0.20400000D+03 0.21883692D-02 0.64861657D-04
+ 0.20400000D+03 0.20700000D+03 0.20875991D-02 0.47172954D-04
+ 0.20700000D+03 0.21000000D+03 0.19612280D-02 0.38233639D-04
+ 0.21000000D+03 0.21300000D+03 0.18539631D-02 0.27121688D-04
+ 0.21300000D+03 0.21600000D+03 0.17240990D-02 0.28989277D-04
+ 0.21600000D+03 0.21900000D+03 0.15896611D-02 0.29873217D-04
+ 0.21900000D+03 0.22200000D+03 0.15405163D-02 0.29589858D-04
+ 0.22200000D+03 0.22500000D+03 0.13848411D-02 0.31699828D-04
+ 0.22500000D+03 0.22800000D+03 0.12963394D-02 0.62900786D-04
+ 0.22800000D+03 0.23100000D+03 0.13651133D-02 0.64369706D-04
+ 0.23100000D+03 0.23400000D+03 0.11001417D-02 0.30635702D-04
+ 0.23400000D+03 0.23700000D+03 0.11043123D-02 0.16825707D-04
+ 0.23700000D+03 0.24000000D+03 0.10072915D-02 0.62983183D-04
+ 0.24000000D+03 0.24300000D+03 0.85689777D-03 0.14230439D-03
+ 0.24300000D+03 0.24600000D+03 0.10704424D-02 0.13014995D-03
+ 0.24600000D+03 0.24900000D+03 0.84457952D-03 0.37793140D-04
+ 0.24900000D+03 0.25200000D+03 0.82919743D-03 0.30883731D-04
+ 0.25200000D+03 0.25500000D+03 0.75984874D-03 0.13888650D-04
+ 0.25500000D+03 0.25800000D+03 0.74444058D-03 0.15495106D-04
+ 0.25800000D+03 0.26100000D+03 0.65662063D-03 0.26707264D-04
+ 0.26100000D+03 0.26400000D+03 0.65778488D-03 0.26314765D-04
+ 0.26400000D+03 0.26700000D+03 0.61348501D-03 0.13222971D-04
+ 0.26700000D+03 0.27000000D+03 0.56770770D-03 0.21522088D-04
+ 0.27000000D+03 0.27300000D+03 0.53557095D-03 0.21988358D-04
+ 0.27300000D+03 0.27600000D+03 0.50968650D-03 0.13355546D-04
+ 0.27600000D+03 0.27900000D+03 0.49490033D-03 0.13494443D-04
+ 0.27900000D+03 0.28200000D+03 0.46020103D-03 0.13037985D-04
+ 0.28200000D+03 0.28500000D+03 0.43033995D-03 0.10615732D-04
+ 0.28500000D+03 0.28800000D+03 0.41228332D-03 0.15797490D-04
+ 0.28800000D+03 0.29100000D+03 0.36105376D-03 0.25257364D-04
+ 0.29100000D+03 0.29400000D+03 0.39019265D-03 0.21550370D-04
+ 0.29400000D+03 0.29700000D+03 0.34389234D-03 0.10142518D-04
+ 0.29700000D+03 0.30000000D+03 0.31796498D-03 0.11863432D-04
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.59745858D+01 0.33469436D-02
+ 0.30000000D+01 0.60000000D+01 0.97241593D+01 0.51147804D-03
+ 0.60000000D+01 0.90000000D+01 0.35174994D+01 0.21116917D-03
+ 0.90000000D+01 0.12000000D+02 0.17867562D+01 0.11721242D-03
+ 0.12000000D+02 0.15000000D+02 0.10644273D+01 0.74980118D-04
+ 0.15000000D+02 0.18000000D+02 0.69694205D+00 0.53888227D-04
+ 0.18000000D+02 0.21000000D+02 0.48593048D+00 0.41542204D-04
+ 0.21000000D+02 0.24000000D+02 0.35442341D+00 0.32057617D-04
+ 0.24000000D+02 0.27000000D+02 0.26742276D+00 0.25805881D-04
+ 0.27000000D+02 0.30000000D+02 0.20716333D+00 0.20874549D-04
+ 0.30000000D+02 0.33000000D+02 0.16400365D+00 0.17108803D-04
+ 0.33000000D+02 0.36000000D+02 0.13211790D+00 0.14687784D-04
+ 0.36000000D+02 0.39000000D+02 0.10798838D+00 0.12386150D-04
+ 0.39000000D+02 0.42000000D+02 0.89381163D-01 0.10836214D-04
+ 0.42000000D+02 0.45000000D+02 0.74810686D-01 0.95511267D-05
+ 0.45000000D+02 0.48000000D+02 0.63207237D-01 0.81446844D-05
+ 0.48000000D+02 0.51000000D+02 0.53838702D-01 0.73549564D-05
+ 0.51000000D+02 0.54000000D+02 0.46222500D-01 0.65078876D-05
+ 0.54000000D+02 0.57000000D+02 0.39949232D-01 0.58451570D-05
+ 0.57000000D+02 0.60000000D+02 0.34711827D-01 0.51180996D-05
+ 0.60000000D+02 0.63000000D+02 0.30338428D-01 0.45572079D-05
+ 0.63000000D+02 0.66000000D+02 0.26644892D-01 0.42056135D-05
+ 0.66000000D+02 0.69000000D+02 0.23515555D-01 0.40164768D-05
+ 0.69000000D+02 0.72000000D+02 0.20840395D-01 0.34531969D-05
+ 0.72000000D+02 0.75000000D+02 0.18542193D-01 0.31841375D-05
+ 0.75000000D+02 0.78000000D+02 0.16551371D-01 0.29442677D-05
+ 0.78000000D+02 0.81000000D+02 0.14825074D-01 0.27818869D-05
+ 0.81000000D+02 0.84000000D+02 0.13327263D-01 0.24347468D-05
+ 0.84000000D+02 0.87000000D+02 0.12009855D-01 0.23973808D-05
+ 0.87000000D+02 0.90000000D+02 0.10852484D-01 0.21132504D-05
+ 0.90000000D+02 0.93000000D+02 0.98347247D-02 0.19770266D-05
+ 0.93000000D+02 0.96000000D+02 0.89337335D-02 0.18261065D-05
+ 0.96000000D+02 0.99000000D+02 0.81375887D-02 0.16239455D-05
+ 0.99000000D+02 0.10200000D+03 0.74228176D-02 0.15929700D-05
+ 0.10200000D+03 0.10500000D+03 0.67878181D-02 0.14692171D-05
+ 0.10500000D+03 0.10800000D+03 0.62189198D-02 0.13347009D-05
+ 0.10800000D+03 0.11100000D+03 0.57085932D-02 0.12907869D-05
+ 0.11100000D+03 0.11400000D+03 0.52488971D-02 0.12381523D-05
+ 0.11400000D+03 0.11700000D+03 0.48338348D-02 0.11208370D-05
+ 0.11700000D+03 0.12000000D+03 0.44611021D-02 0.10701672D-05
+ 0.12000000D+03 0.12300000D+03 0.41210051D-02 0.10074400D-05
+ 0.12300000D+03 0.12600000D+03 0.38141405D-02 0.93510529D-06
+ 0.12600000D+03 0.12900000D+03 0.35337528D-02 0.88549644D-06
+ 0.12900000D+03 0.13200000D+03 0.32803973D-02 0.83747586D-06
+ 0.13200000D+03 0.13500000D+03 0.30462567D-02 0.79986027D-06
+ 0.13500000D+03 0.13800000D+03 0.28343927D-02 0.78129231D-06
+ 0.13800000D+03 0.14100000D+03 0.26409737D-02 0.69667901D-06
+ 0.14100000D+03 0.14400000D+03 0.24615604D-02 0.67813336D-06
+ 0.14400000D+03 0.14700000D+03 0.22987699D-02 0.64616124D-06
+ 0.14700000D+03 0.15000000D+03 0.21478715D-02 0.61071026D-06
+ 0.15000000D+03 0.15300000D+03 0.20098600D-02 0.58239867D-06
+ 0.15300000D+03 0.15600000D+03 0.18831245D-02 0.54958286D-06
+ 0.15600000D+03 0.15900000D+03 0.17645303D-02 0.56463759D-06
+ 0.15900000D+03 0.16200000D+03 0.16551498D-02 0.50064264D-06
+ 0.16200000D+03 0.16500000D+03 0.15538791D-02 0.48030181D-06
+ 0.16500000D+03 0.16800000D+03 0.14610375D-02 0.44767189D-06
+ 0.16800000D+03 0.17100000D+03 0.13748638D-02 0.42328381D-06
+ 0.17100000D+03 0.17400000D+03 0.12945754D-02 0.41043310D-06
+ 0.17400000D+03 0.17700000D+03 0.12196071D-02 0.38920617D-06
+ 0.17700000D+03 0.18000000D+03 0.11496701D-02 0.38107179D-06
+ 0.18000000D+03 0.18300000D+03 0.10852948D-02 0.35441016D-06
+ 0.18300000D+03 0.18600000D+03 0.10247184D-02 0.33706966D-06
+ 0.18600000D+03 0.18900000D+03 0.96809564D-03 0.32114849D-06
+ 0.18900000D+03 0.19200000D+03 0.91564981D-03 0.31770602D-06
+ 0.19200000D+03 0.19500000D+03 0.86717616D-03 0.30369644D-06
+ 0.19500000D+03 0.19800000D+03 0.82103273D-03 0.29108218D-06
+ 0.19800000D+03 0.20100000D+03 0.77751446D-03 0.27221327D-06
+ 0.20100000D+03 0.20400000D+03 0.73788286D-03 0.27218955D-06
+ 0.20400000D+03 0.20700000D+03 0.69903269D-03 0.26256764D-06
+ 0.20700000D+03 0.21000000D+03 0.66391820D-03 0.24777156D-06
+ 0.21000000D+03 0.21300000D+03 0.63060395D-03 0.26512941D-06
+ 0.21300000D+03 0.21600000D+03 0.59897685D-03 0.22124388D-06
+ 0.21600000D+03 0.21900000D+03 0.56935070D-03 0.21576913D-06
+ 0.21900000D+03 0.22200000D+03 0.54177883D-03 0.20502955D-06
+ 0.22200000D+03 0.22500000D+03 0.51539511D-03 0.20145966D-06
+ 0.22500000D+03 0.22800000D+03 0.49114400D-03 0.19535202D-06
+ 0.22800000D+03 0.23100000D+03 0.46739796D-03 0.18860996D-06
+ 0.23100000D+03 0.23400000D+03 0.44597688D-03 0.17659180D-06
+ 0.23400000D+03 0.23700000D+03 0.42549797D-03 0.17216050D-06
+ 0.23700000D+03 0.24000000D+03 0.40574215D-03 0.16656145D-06
+ 0.24000000D+03 0.24300000D+03 0.38742930D-03 0.16249953D-06
+ 0.24300000D+03 0.24600000D+03 0.36958938D-03 0.18141464D-06
+ 0.24600000D+03 0.24900000D+03 0.35315529D-03 0.14977692D-06
+ 0.24900000D+03 0.25200000D+03 0.33752418D-03 0.14125488D-06
+ 0.25200000D+03 0.25500000D+03 0.32286140D-03 0.15866827D-06
+ 0.25500000D+03 0.25800000D+03 0.30865502D-03 0.13253387D-06
+ 0.25800000D+03 0.26100000D+03 0.29528757D-03 0.12804513D-06
+ 0.26100000D+03 0.26400000D+03 0.28281046D-03 0.13043954D-06
+ 0.26400000D+03 0.26700000D+03 0.27060819D-03 0.12001065D-06
+ 0.26700000D+03 0.27000000D+03 0.25946859D-03 0.11778089D-06
+ 0.27000000D+03 0.27300000D+03 0.24850511D-03 0.12609670D-06
+ 0.27300000D+03 0.27600000D+03 0.23814186D-03 0.11078990D-06
+ 0.27600000D+03 0.27900000D+03 0.22832008D-03 0.10732260D-06
+ 0.27900000D+03 0.28200000D+03 0.21905232D-03 0.10178797D-06
+ 0.28200000D+03 0.28500000D+03 0.21019917D-03 0.99163824D-07
+ 0.28500000D+03 0.28800000D+03 0.20173380D-03 0.98204409D-07
+ 0.28800000D+03 0.29100000D+03 0.19357836D-03 0.92720663D-07
+ 0.29100000D+03 0.29400000D+03 0.18594147D-03 0.88370612D-07
+ 0.29400000D+03 0.29700000D+03 0.17874004D-03 0.92652612D-07
+ 0.29700000D+03 0.30000000D+03 0.17175366D-03 0.84654311D-07
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-11.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-11.top
new file mode 100644
index 0000000000000000000000000000000000000000..bd78b4a8a8273088a20c4962ef0c459acdf95195
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-11.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79778277D-06 0.48389946D-06
+ -.46000000D+01 -.45000000D+01 0.11635512D-03 0.50774953D-05
+ -.45000000D+01 -.44000000D+01 0.99719140D-03 0.15746080D-04
+ -.44000000D+01 -.43000000D+01 0.39774935D-02 0.39426964D-04
+ -.43000000D+01 -.42000000D+01 0.11609279D-01 0.91745208D-04
+ -.42000000D+01 -.41000000D+01 0.26618963D-01 0.18389794D-03
+ -.41000000D+01 -.40000000D+01 0.53369134D-01 0.37775008D-03
+ -.40000000D+01 -.39000000D+01 0.94112467D-01 0.68564284D-03
+ -.39000000D+01 -.38000000D+01 0.15594306D+00 0.94095464D-03
+ -.38000000D+01 -.37000000D+01 0.23300230D+00 0.14259367D-02
+ -.37000000D+01 -.36000000D+01 0.33897740D+00 0.18746892D-02
+ -.36000000D+01 -.35000000D+01 0.45898649D+00 0.29011661D-02
+ -.35000000D+01 -.34000000D+01 0.61602942D+00 0.30073237D-02
+ -.34000000D+01 -.33000000D+01 0.79023630D+00 0.41686233D-02
+ -.33000000D+01 -.32000000D+01 0.98620944D+00 0.42359176D-02
+ -.32000000D+01 -.31000000D+01 0.12071986D+01 0.51130248D-02
+ -.31000000D+01 -.30000000D+01 0.14554727D+01 0.64060939D-02
+ -.30000000D+01 -.29000000D+01 0.17348352D+01 0.70456806D-02
+ -.29000000D+01 -.28000000D+01 0.20050858D+01 0.11138627D-01
+ -.28000000D+01 -.27000000D+01 0.23021795D+01 0.96654365D-02
+ -.27000000D+01 -.26000000D+01 0.26542996D+01 0.79567616D-02
+ -.26000000D+01 -.25000000D+01 0.29915010D+01 0.89687538D-02
+ -.25000000D+01 -.24000000D+01 0.33622413D+01 0.14660783D-01
+ -.24000000D+01 -.23000000D+01 0.37296154D+01 0.10386069D-01
+ -.23000000D+01 -.22000000D+01 0.40941181D+01 0.10304699D-01
+ -.22000000D+01 -.21000000D+01 0.44917946D+01 0.11565809D-01
+ -.21000000D+01 -.20000000D+01 0.48704875D+01 0.11081641D-01
+ -.20000000D+01 -.19000000D+01 0.52850207D+01 0.12194359D-01
+ -.19000000D+01 -.18000000D+01 0.56688161D+01 0.12781548D-01
+ -.18000000D+01 -.17000000D+01 0.60445212D+01 0.12216583D-01
+ -.17000000D+01 -.16000000D+01 0.64087130D+01 0.13501936D-01
+ -.16000000D+01 -.15000000D+01 0.67651037D+01 0.13791293D-01
+ -.15000000D+01 -.14000000D+01 0.71133746D+01 0.16758092D-01
+ -.14000000D+01 -.13000000D+01 0.74784988D+01 0.15057032D-01
+ -.13000000D+01 -.12000000D+01 0.77803787D+01 0.15026293D-01
+ -.12000000D+01 -.11000000D+01 0.80909318D+01 0.14997955D-01
+ -.11000000D+01 -.10000000D+01 0.83434609D+01 0.15476710D-01
+ -.10000000D+01 -.90000000D+00 0.85971102D+01 0.15580443D-01
+ -.90000000D+00 -.80000000D+00 0.88319337D+01 0.15781055D-01
+ -.80000000D+00 -.70000000D+00 0.90302208D+01 0.15047280D-01
+ -.70000000D+00 -.60000000D+00 0.91940925D+01 0.16104950D-01
+ -.60000000D+00 -.50000000D+00 0.93475694D+01 0.15825267D-01
+ -.50000000D+00 -.40000000D+00 0.95258932D+01 0.16412179D-01
+ -.40000000D+00 -.30000000D+00 0.96158301D+01 0.26733274D-01
+ -.30000000D+00 -.20000000D+00 0.96711362D+01 0.17756107D-01
+ -.20000000D+00 -.10000000D+00 0.97335793D+01 0.16473311D-01
+ -.10000000D+00 0.18041124D-15 0.97731158D+01 0.14946122D-01
+ 0.70776718D-15 0.10000000D+00 0.97763804D+01 0.26560677D-01
+ 0.10000000D+00 0.20000000D+00 0.97392215D+01 0.15898351D-01
+ 0.20000000D+00 0.30000000D+00 0.96607477D+01 0.17583059D-01
+ 0.30000000D+00 0.40000000D+00 0.96008250D+01 0.16575655D-01
+ 0.40000000D+00 0.50000000D+00 0.95061176D+01 0.16279605D-01
+ 0.50000000D+00 0.60000000D+00 0.93749494D+01 0.20897872D-01
+ 0.60000000D+00 0.70000000D+00 0.91831886D+01 0.20077780D-01
+ 0.70000000D+00 0.80000000D+00 0.90215422D+01 0.17557639D-01
+ 0.80000000D+00 0.90000000D+00 0.88309245D+01 0.17064020D-01
+ 0.90000000D+00 0.10000000D+01 0.85985660D+01 0.18809989D-01
+ 0.10000000D+01 0.11000000D+01 0.83292652D+01 0.15499093D-01
+ 0.11000000D+01 0.12000000D+01 0.80660785D+01 0.15352684D-01
+ 0.12000000D+01 0.13000000D+01 0.77586446D+01 0.14258560D-01
+ 0.13000000D+01 0.14000000D+01 0.74234492D+01 0.14766708D-01
+ 0.14000000D+01 0.15000000D+01 0.71059634D+01 0.14468939D-01
+ 0.15000000D+01 0.16000000D+01 0.67971302D+01 0.16820246D-01
+ 0.16000000D+01 0.17000000D+01 0.64026424D+01 0.13768669D-01
+ 0.17000000D+01 0.18000000D+01 0.60370836D+01 0.13669306D-01
+ 0.18000000D+01 0.19000000D+01 0.56500764D+01 0.11974847D-01
+ 0.19000000D+01 0.20000000D+01 0.53018319D+01 0.12601485D-01
+ 0.20000000D+01 0.21000000D+01 0.48823075D+01 0.11603229D-01
+ 0.21000000D+01 0.22000000D+01 0.44887757D+01 0.10696835D-01
+ 0.22000000D+01 0.23000000D+01 0.40999901D+01 0.12705775D-01
+ 0.23000000D+01 0.24000000D+01 0.37121193D+01 0.10911346D-01
+ 0.24000000D+01 0.25000000D+01 0.33559970D+01 0.14245636D-01
+ 0.25000000D+01 0.26000000D+01 0.30234391D+01 0.10565532D-01
+ 0.26000000D+01 0.27000000D+01 0.26390276D+01 0.77827229D-02
+ 0.27000000D+01 0.28000000D+01 0.23373689D+01 0.69310376D-02
+ 0.28000000D+01 0.29000000D+01 0.20250585D+01 0.82127533D-02
+ 0.29000000D+01 0.30000000D+01 0.17144421D+01 0.67094217D-02
+ 0.30000000D+01 0.31000000D+01 0.14491235D+01 0.60531120D-02
+ 0.31000000D+01 0.32000000D+01 0.12197537D+01 0.54733785D-02
+ 0.32000000D+01 0.33000000D+01 0.98543206D+00 0.48739370D-02
+ 0.33000000D+01 0.34000000D+01 0.79589816D+00 0.38877733D-02
+ 0.34000000D+01 0.35000000D+01 0.60577324D+00 0.32885093D-02
+ 0.35000000D+01 0.36000000D+01 0.46417099D+00 0.24572215D-02
+ 0.36000000D+01 0.37000000D+01 0.34022181D+00 0.20770143D-02
+ 0.37000000D+01 0.38000000D+01 0.23699901D+00 0.17770844D-02
+ 0.38000000D+01 0.39000000D+01 0.15383965D+00 0.90864287D-03
+ 0.39000000D+01 0.40000000D+01 0.94932595D-01 0.62216254D-03
+ 0.40000000D+01 0.41000000D+01 0.53480874D-01 0.34986316D-03
+ 0.41000000D+01 0.42000000D+01 0.26793550D-01 0.30506380D-03
+ 0.42000000D+01 0.43000000D+01 0.11342106D-01 0.99729290D-04
+ 0.43000000D+01 0.44000000D+01 0.40105466D-02 0.37940398D-04
+ 0.44000000D+01 0.45000000D+01 0.10051852D-02 0.15437851D-04
+ 0.45000000D+01 0.46000000D+01 0.11461615D-03 0.50701305D-05
+ 0.46000000D+01 0.47000000D+01 0.78284174D-06 0.48331451D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79339017D-06 0.48389892D-06
+ -.46000000D+01 -.45000000D+01 0.11349417D-03 0.50773437D-05
+ -.45000000D+01 -.44000000D+01 0.95448817D-03 0.15741666D-04
+ -.44000000D+01 -.43000000D+01 0.37406398D-02 0.39392180D-04
+ -.43000000D+01 -.42000000D+01 0.10770590D-01 0.91629722D-04
+ -.42000000D+01 -.41000000D+01 0.24332601D-01 0.18353032D-03
+ -.41000000D+01 -.40000000D+01 0.48170238D-01 0.37699853D-03
+ -.40000000D+01 -.39000000D+01 0.83762193D-01 0.68358596D-03
+ -.39000000D+01 -.38000000D+01 0.13716848D+00 0.88228531D-03
+ -.38000000D+01 -.37000000D+01 0.20265022D+00 0.13899899D-02
+ -.37000000D+01 -.36000000D+01 0.29175904D+00 0.18693060D-02
+ -.36000000D+01 -.35000000D+01 0.38983089D+00 0.28922596D-02
+ -.35000000D+01 -.34000000D+01 0.51919216D+00 0.29909923D-02
+ -.34000000D+01 -.33000000D+01 0.65945907D+00 0.41524543D-02
+ -.33000000D+01 -.32000000D+01 0.81537217D+00 0.42056303D-02
+ -.32000000D+01 -.31000000D+01 0.99008372D+00 0.50810612D-02
+ -.31000000D+01 -.30000000D+01 0.11846623D+01 0.63787041D-02
+ -.30000000D+01 -.29000000D+01 0.14043320D+01 0.70128419D-02
+ -.29000000D+01 -.28000000D+01 0.16083935D+01 0.11118898D-01
+ -.28000000D+01 -.27000000D+01 0.18337704D+01 0.96235936D-02
+ -.27000000D+01 -.26000000D+01 0.21073091D+01 0.78960493D-02
+ -.26000000D+01 -.25000000D+01 0.23623641D+01 0.89230814D-02
+ -.25000000D+01 -.24000000D+01 0.26479634D+01 0.14247277D-01
+ -.24000000D+01 -.23000000D+01 0.29196428D+01 0.98279920D-02
+ -.23000000D+01 -.22000000D+01 0.31902396D+01 0.10212284D-01
+ -.22000000D+01 -.21000000D+01 0.34903106D+01 0.11520367D-01
+ -.21000000D+01 -.20000000D+01 0.37667654D+01 0.11020552D-01
+ -.20000000D+01 -.19000000D+01 0.40801946D+01 0.12133985D-01
+ -.19000000D+01 -.18000000D+01 0.43613852D+01 0.12727866D-01
+ -.18000000D+01 -.17000000D+01 0.46362797D+01 0.12145786D-01
+ -.17000000D+01 -.16000000D+01 0.48986789D+01 0.13446536D-01
+ -.16000000D+01 -.15000000D+01 0.51547446D+01 0.13725936D-01
+ -.15000000D+01 -.14000000D+01 0.54090907D+01 0.16706349D-01
+ -.14000000D+01 -.13000000D+01 0.56784879D+01 0.14882854D-01
+ -.13000000D+01 -.12000000D+01 0.58929519D+01 0.14840881D-01
+ -.12000000D+01 -.11000000D+01 0.61181077D+01 0.14880195D-01
+ -.11000000D+01 -.10000000D+01 0.62914763D+01 0.15377320D-01
+ -.10000000D+01 -.90000000D+00 0.64705046D+01 0.15484047D-01
+ -.90000000D+00 -.80000000D+00 0.66371419D+01 0.15638955D-01
+ -.80000000D+00 -.70000000D+00 0.67734259D+01 0.14894740D-01
+ -.70000000D+00 -.60000000D+00 0.68853406D+01 0.15998621D-01
+ -.60000000D+00 -.50000000D+00 0.69900785D+01 0.15409563D-01
+ -.50000000D+00 -.40000000D+00 0.71262758D+01 0.16006372D-01
+ -.40000000D+00 -.30000000D+00 0.71895394D+01 0.26235965D-01
+ -.30000000D+00 -.20000000D+00 0.72153620D+01 0.16966108D-01
+ -.20000000D+00 -.10000000D+00 0.72634829D+01 0.16339037D-01
+ -.10000000D+00 0.18041124D-15 0.72933598D+01 0.14847246D-01
+ 0.70776718D-15 0.10000000D+00 0.72990566D+01 0.26504044D-01
+ 0.10000000D+00 0.20000000D+00 0.72689334D+01 0.15788144D-01
+ 0.20000000D+00 0.30000000D+00 0.72071266D+01 0.17486369D-01
+ 0.30000000D+00 0.40000000D+00 0.71678707D+01 0.16147062D-01
+ 0.40000000D+00 0.50000000D+00 0.71125437D+01 0.15814199D-01
+ 0.50000000D+00 0.60000000D+00 0.70166681D+01 0.20772660D-01
+ 0.60000000D+00 0.70000000D+00 0.68735882D+01 0.19955358D-01
+ 0.70000000D+00 0.80000000D+00 0.67639008D+01 0.17442021D-01
+ 0.80000000D+00 0.90000000D+00 0.66358613D+01 0.16966919D-01
+ 0.90000000D+00 0.10000000D+01 0.64719090D+01 0.18739818D-01
+ 0.10000000D+01 0.11000000D+01 0.62764659D+01 0.15412973D-01
+ 0.11000000D+01 0.12000000D+01 0.60929536D+01 0.15275816D-01
+ 0.12000000D+01 0.13000000D+01 0.58707993D+01 0.14177241D-01
+ 0.13000000D+01 0.14000000D+01 0.56245453D+01 0.14689292D-01
+ 0.14000000D+01 0.15000000D+01 0.54009023D+01 0.14382851D-01
+ 0.15000000D+01 0.16000000D+01 0.51873115D+01 0.16745330D-01
+ 0.16000000D+01 0.17000000D+01 0.48931832D+01 0.13682736D-01
+ 0.17000000D+01 0.18000000D+01 0.46280485D+01 0.13592937D-01
+ 0.18000000D+01 0.19000000D+01 0.43421419D+01 0.11930784D-01
+ 0.19000000D+01 0.20000000D+01 0.40963895D+01 0.12549838D-01
+ 0.20000000D+01 0.21000000D+01 0.37800274D+01 0.11555203D-01
+ 0.21000000D+01 0.22000000D+01 0.34871839D+01 0.10639896D-01
+ 0.22000000D+01 0.23000000D+01 0.31958853D+01 0.12685547D-01
+ 0.23000000D+01 0.24000000D+01 0.29028015D+01 0.10837868D-01
+ 0.24000000D+01 0.25000000D+01 0.26399831D+01 0.14184830D-01
+ 0.25000000D+01 0.26000000D+01 0.23945067D+01 0.10516062D-01
+ 0.26000000D+01 0.27000000D+01 0.20929124D+01 0.77227393D-02
+ 0.27000000D+01 0.28000000D+01 0.18682169D+01 0.68831451D-02
+ 0.28000000D+01 0.29000000D+01 0.16288582D+01 0.81399770D-02
+ 0.29000000D+01 0.30000000D+01 0.13835004D+01 0.66741464D-02
+ 0.30000000D+01 0.31000000D+01 0.11785694D+01 0.60324518D-02
+ 0.31000000D+01 0.32000000D+01 0.10014873D+01 0.53946854D-02
+ 0.32000000D+01 0.33000000D+01 0.81528764D+00 0.47930836D-02
+ 0.33000000D+01 0.34000000D+01 0.66506158D+00 0.38633937D-02
+ 0.34000000D+01 0.35000000D+01 0.50907109D+00 0.32728069D-02
+ 0.35000000D+01 0.36000000D+01 0.39517562D+00 0.24385003D-02
+ 0.36000000D+01 0.37000000D+01 0.29278729D+00 0.20598265D-02
+ 0.37000000D+01 0.38000000D+01 0.20642514D+00 0.17735494D-02
+ 0.38000000D+01 0.39000000D+01 0.13534306D+00 0.90546491D-03
+ 0.39000000D+01 0.40000000D+01 0.84571066D-01 0.62064736D-03
+ 0.40000000D+01 0.41000000D+01 0.48282555D-01 0.34910563D-03
+ 0.41000000D+01 0.42000000D+01 0.24506213D-01 0.30477090D-03
+ 0.42000000D+01 0.43000000D+01 0.10502403D-01 0.99625336D-04
+ 0.43000000D+01 0.44000000D+01 0.37734541D-02 0.37909199D-04
+ 0.44000000D+01 0.45000000D+01 0.96243359D-03 0.15426582D-04
+ 0.45000000D+01 0.46000000D+01 0.11175685D-03 0.50700081D-05
+ 0.46000000D+01 0.47000000D+01 0.77849850D-06 0.48331438D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79551509D-06 0.48389919D-06
+ -.46000000D+01 -.45000000D+01 0.11481814D-03 0.50774157D-05
+ -.45000000D+01 -.44000000D+01 0.97359149D-03 0.15743726D-04
+ -.44000000D+01 -.43000000D+01 0.38434519D-02 0.39408186D-04
+ -.43000000D+01 -.42000000D+01 0.11125377D-01 0.91681036D-04
+ -.42000000D+01 -.41000000D+01 0.25277360D-01 0.18368985D-03
+ -.41000000D+01 -.40000000D+01 0.50270908D-01 0.37732288D-03
+ -.40000000D+01 -.39000000D+01 0.87856689D-01 0.68449207D-03
+ -.39000000D+01 -.38000000D+01 0.14440317D+00 0.88987588D-03
+ -.38000000D+01 -.37000000D+01 0.21423310D+00 0.13945788D-02
+ -.37000000D+01 -.36000000D+01 0.30937260D+00 0.18715354D-02
+ -.36000000D+01 -.35000000D+01 0.41517219D+00 0.28957118D-02
+ -.35000000D+01 -.34000000D+01 0.55407098D+00 0.29970889D-02
+ -.34000000D+01 -.33000000D+01 0.70576759D+00 0.41588444D-02
+ -.33000000D+01 -.32000000D+01 0.87491609D+00 0.42142506D-02
+ -.32000000D+01 -.31000000D+01 0.10647804D+01 0.50914541D-02
+ -.31000000D+01 -.30000000D+01 0.12764122D+01 0.63894538D-02
+ -.30000000D+01 -.29000000D+01 0.15149513D+01 0.70253163D-02
+ -.29000000D+01 -.28000000D+01 0.17395240D+01 0.11126133D-01
+ -.28000000D+01 -.27000000D+01 0.19867951D+01 0.96390900D-02
+ -.27000000D+01 -.26000000D+01 0.22842431D+01 0.79168767D-02
+ -.26000000D+01 -.25000000D+01 0.25637789D+01 0.89377940D-02
+ -.25000000D+01 -.24000000D+01 0.28746857D+01 0.14329768D-01
+ -.24000000D+01 -.23000000D+01 0.31743108D+01 0.99274884D-02
+ -.23000000D+01 -.22000000D+01 0.34720047D+01 0.10241023D-01
+ -.22000000D+01 -.21000000D+01 0.38002828D+01 0.11534065D-01
+ -.21000000D+01 -.20000000D+01 0.41060763D+01 0.11037760D-01
+ -.20000000D+01 -.19000000D+01 0.44483619D+01 0.12150139D-01
+ -.19000000D+01 -.18000000D+01 0.47582125D+01 0.12744179D-01
+ -.18000000D+01 -.17000000D+01 0.50612218D+01 0.12167038D-01
+ -.17000000D+01 -.16000000D+01 0.53518682D+01 0.13462184D-01
+ -.16000000D+01 -.15000000D+01 0.56353524D+01 0.13745916D-01
+ -.15000000D+01 -.14000000D+01 0.59157637D+01 0.16722541D-01
+ -.14000000D+01 -.13000000D+01 0.62108808D+01 0.14920013D-01
+ -.13000000D+01 -.12000000D+01 0.64491545D+01 0.14873222D-01
+ -.12000000D+01 -.11000000D+01 0.66975771D+01 0.14905406D-01
+ -.11000000D+01 -.10000000D+01 0.68921366D+01 0.15408356D-01
+ -.10000000D+01 -.90000000D+00 0.70907314D+01 0.15516795D-01
+ -.90000000D+00 -.80000000D+00 0.72753784D+01 0.15680646D-01
+ -.80000000D+00 -.70000000D+00 0.74284126D+01 0.14938852D-01
+ -.70000000D+00 -.60000000D+00 0.75542865D+01 0.16026382D-01
+ -.60000000D+00 -.50000000D+00 0.76711437D+01 0.15513517D-01
+ -.50000000D+00 -.40000000D+00 0.78189376D+01 0.16109525D-01
+ -.40000000D+00 -.30000000D+00 0.78887489D+01 0.26376588D-01
+ -.30000000D+00 -.20000000D+00 0.79227685D+01 0.17191800D-01
+ -.20000000D+00 -.10000000D+00 0.79746616D+01 0.16377022D-01
+ -.10000000D+00 0.18041124D-15 0.80067340D+01 0.14877519D-01
+ 0.70776718D-15 0.10000000D+00 0.80119553D+01 0.26521430D-01
+ 0.10000000D+00 0.20000000D+00 0.79800834D+01 0.15819009D-01
+ 0.20000000D+00 0.30000000D+00 0.79137790D+01 0.17515689D-01
+ 0.30000000D+00 0.40000000D+00 0.78686638D+01 0.16190168D-01
+ 0.40000000D+00 0.50000000D+00 0.78036833D+01 0.15877569D-01
+ 0.50000000D+00 0.60000000D+00 0.76984040D+01 0.20815534D-01
+ 0.60000000D+00 0.70000000D+00 0.75423999D+01 0.19996354D-01
+ 0.70000000D+00 0.80000000D+00 0.74193148D+01 0.17469650D-01
+ 0.80000000D+00 0.90000000D+00 0.72743573D+01 0.16991230D-01
+ 0.90000000D+00 0.10000000D+01 0.70921402D+01 0.18759228D-01
+ 0.10000000D+01 0.11000000D+01 0.68771297D+01 0.15439603D-01
+ 0.11000000D+01 0.12000000D+01 0.66724128D+01 0.15296674D-01
+ 0.12000000D+01 0.13000000D+01 0.64273620D+01 0.14200651D-01
+ 0.13000000D+01 0.14000000D+01 0.61564884D+01 0.14712991D-01
+ 0.14000000D+01 0.15000000D+01 0.59077185D+01 0.14407806D-01
+ 0.15000000D+01 0.16000000D+01 0.56679306D+01 0.16760942D-01
+ 0.16000000D+01 0.17000000D+01 0.53462958D+01 0.13705998D-01
+ 0.17000000D+01 0.18000000D+01 0.50532419D+01 0.13615250D-01
+ 0.18000000D+01 0.19000000D+01 0.47390708D+01 0.11943465D-01
+ 0.19000000D+01 0.20000000D+01 0.44645992D+01 0.12567113D-01
+ 0.20000000D+01 0.21000000D+01 0.41190744D+01 0.11572490D-01
+ 0.21000000D+01 0.22000000D+01 0.37972700D+01 0.10658248D-01
+ 0.22000000D+01 0.23000000D+01 0.34778032D+01 0.12695519D-01
+ 0.23000000D+01 0.24000000D+01 0.31572859D+01 0.10860633D-01
+ 0.24000000D+01 0.25000000D+01 0.28671141D+01 0.14203151D-01
+ 0.25000000D+01 0.26000000D+01 0.25957762D+01 0.10533802D-01
+ 0.26000000D+01 0.27000000D+01 0.22695468D+01 0.77429932D-02
+ 0.27000000D+01 0.28000000D+01 0.20214729D+01 0.68961720D-02
+ 0.28000000D+01 0.29000000D+01 0.17599063D+01 0.81593341D-02
+ 0.29000000D+01 0.30000000D+01 0.14942205D+01 0.66844339D-02
+ 0.30000000D+01 0.31000000D+01 0.12702932D+01 0.60402987D-02
+ 0.31000000D+01 0.32000000D+01 0.10764395D+01 0.54124053D-02
+ 0.32000000D+01 0.33000000D+01 0.87467831D+00 0.48104662D-02
+ 0.33000000D+01 0.34000000D+01 0.71140391D+00 0.38708461D-02
+ 0.34000000D+01 0.35000000D+01 0.54389052D+00 0.32774242D-02
+ 0.35000000D+01 0.36000000D+01 0.42046868D+00 0.24435771D-02
+ 0.36000000D+01 0.37000000D+01 0.31047121D+00 0.20640414D-02
+ 0.37000000D+01 0.38000000D+01 0.21804998D+00 0.17750011D-02
+ 0.38000000D+01 0.39000000D+01 0.14251434D+00 0.90668061D-03
+ 0.39000000D+01 0.40000000D+01 0.88671677D-01 0.62129308D-03
+ 0.40000000D+01 0.41000000D+01 0.50383390D-01 0.34944593D-03
+ 0.41000000D+01 0.42000000D+01 0.25451348D-01 0.30489682D-03
+ 0.42000000D+01 0.43000000D+01 0.10857474D-01 0.99672607D-04
+ 0.43000000D+01 0.44000000D+01 0.38763383D-02 0.37923339D-04
+ 0.44000000D+01 0.45000000D+01 0.98155311D-03 0.15431201D-04
+ 0.45000000D+01 0.46000000D+01 0.11307972D-03 0.50700670D-05
+ 0.46000000D+01 0.47000000D+01 0.78059952D-06 0.48331444D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79666460D-06 0.48389933D-06
+ -.46000000D+01 -.45000000D+01 0.11557860D-03 0.50774556D-05
+ -.45000000D+01 -.44000000D+01 0.98503416D-03 0.15744896D-04
+ -.44000000D+01 -.43000000D+01 0.39072020D-02 0.39417441D-04
+ -.43000000D+01 -.42000000D+01 0.11351550D-01 0.91711795D-04
+ -.42000000D+01 -.41000000D+01 0.25894150D-01 0.18378801D-03
+ -.41000000D+01 -.40000000D+01 0.51672311D-01 0.37752395D-03
+ -.40000000D+01 -.39000000D+01 0.90642345D-01 0.68503993D-03
+ -.39000000D+01 -.38000000D+01 0.14943639D+00 0.90171350D-03
+ -.38000000D+01 -.37000000D+01 0.22236257D+00 0.14016781D-02
+ -.37000000D+01 -.36000000D+01 0.32196085D+00 0.18729648D-02
+ -.36000000D+01 -.35000000D+01 0.43353577D+00 0.28980667D-02
+ -.35000000D+01 -.34000000D+01 0.57966637D+00 0.30014593D-02
+ -.34000000D+01 -.33000000D+01 0.74016450D+00 0.41631887D-02
+ -.33000000D+01 -.32000000D+01 0.91962144D+00 0.42207704D-02
+ -.32000000D+01 -.31000000D+01 0.11213509D+01 0.50988223D-02
+ -.31000000D+01 -.30000000D+01 0.13465714D+01 0.63967195D-02
+ -.30000000D+01 -.29000000D+01 0.16001596D+01 0.70339038D-02
+ -.29000000D+01 -.28000000D+01 0.18412882D+01 0.11131224D-01
+ -.28000000D+01 -.27000000D+01 0.21063448D+01 0.96499209D-02
+ -.27000000D+01 -.26000000D+01 0.24232181D+01 0.79324097D-02
+ -.26000000D+01 -.25000000D+01 0.27228790D+01 0.89492948D-02
+ -.25000000D+01 -.24000000D+01 0.30544705D+01 0.14429505D-01
+ -.24000000D+01 -.23000000D+01 0.33774473D+01 0.10059028D-01
+ -.23000000D+01 -.22000000D+01 0.36976293D+01 0.10263687D-01
+ -.22000000D+01 -.21000000D+01 0.40493348D+01 0.11544651D-01
+ -.21000000D+01 -.20000000D+01 0.43796007D+01 0.11051083D-01
+ -.20000000D+01 -.19000000D+01 0.47459645D+01 0.12163560D-01
+ -.19000000D+01 -.18000000D+01 0.50800742D+01 0.12756931D-01
+ -.18000000D+01 -.17000000D+01 0.54067814D+01 0.12183887D-01
+ -.17000000D+01 -.16000000D+01 0.57213999D+01 0.13474368D-01
+ -.16000000D+01 -.15000000D+01 0.60281969D+01 0.13761419D-01
+ -.15000000D+01 -.14000000D+01 0.63306384D+01 0.16734793D-01
+ -.14000000D+01 -.13000000D+01 0.66478168D+01 0.14956191D-01
+ -.13000000D+01 -.12000000D+01 0.69063898D+01 0.14908488D-01
+ -.12000000D+01 -.11000000D+01 0.71745759D+01 0.14928826D-01
+ -.11000000D+01 -.10000000D+01 0.73873439D+01 0.15433021D-01
+ -.10000000D+01 -.90000000D+00 0.76029754D+01 0.15541378D-01
+ -.90000000D+00 -.80000000D+00 0.78031696D+01 0.15716426D-01
+ -.80000000D+00 -.70000000D+00 0.79705387D+01 0.14976773D-01
+ -.70000000D+00 -.60000000D+00 0.81083338D+01 0.16048181D-01
+ -.60000000D+00 -.50000000D+00 0.82359291D+01 0.15618964D-01
+ -.50000000D+00 -.40000000D+00 0.83936607D+01 0.16214187D-01
+ -.40000000D+00 -.30000000D+00 0.84692200D+01 0.26512769D-01
+ -.30000000D+00 -.20000000D+00 0.85102130D+01 0.17405576D-01
+ -.20000000D+00 -.10000000D+00 0.85653249D+01 0.16409068D-01
+ -.10000000D+00 0.18041124D-15 0.85994175D+01 0.14900989D-01
+ 0.70776718D-15 0.10000000D+00 0.86042185D+01 0.26533827D-01
+ 0.10000000D+00 0.20000000D+00 0.85707133D+01 0.15844570D-01
+ 0.20000000D+00 0.30000000D+00 0.85006447D+01 0.17538453D-01
+ 0.30000000D+00 0.40000000D+00 0.84506286D+01 0.16247807D-01
+ 0.40000000D+00 0.50000000D+00 0.83769446D+01 0.15947803D-01
+ 0.50000000D+00 0.60000000D+00 0.82636267D+01 0.20847503D-01
+ 0.60000000D+00 0.70000000D+00 0.80964549D+01 0.20026137D-01
+ 0.70000000D+00 0.80000000D+00 0.79617776D+01 0.17496065D-01
+ 0.80000000D+00 0.90000000D+00 0.78022595D+01 0.17013135D-01
+ 0.90000000D+00 0.10000000D+01 0.76043662D+01 0.18775088D-01
+ 0.10000000D+01 0.11000000D+01 0.73724924D+01 0.15459997D-01
+ 0.11000000D+01 0.12000000D+01 0.71494415D+01 0.15313136D-01
+ 0.12000000D+01 0.13000000D+01 0.68848129D+01 0.14219577D-01
+ 0.13000000D+01 0.14000000D+01 0.65931030D+01 0.14730615D-01
+ 0.14000000D+01 0.15000000D+01 0.63227156D+01 0.14426858D-01
+ 0.15000000D+01 0.16000000D+01 0.60607378D+01 0.16775177D-01
+ 0.16000000D+01 0.17000000D+01 0.57157195D+01 0.13725837D-01
+ 0.17000000D+01 0.18000000D+01 0.53990030D+01 0.13632754D-01
+ 0.18000000D+01 0.19000000D+01 0.50610279D+01 0.11953084D-01
+ 0.19000000D+01 0.20000000D+01 0.47622917D+01 0.12579899D-01
+ 0.20000000D+01 0.21000000D+01 0.43922726D+01 0.11584810D-01
+ 0.21000000D+01 0.22000000D+01 0.40463902D+01 0.10672133D-01
+ 0.22000000D+01 0.23000000D+01 0.37035221D+01 0.12701168D-01
+ 0.23000000D+01 0.24000000D+01 0.33601854D+01 0.10879799D-01
+ 0.24000000D+01 0.25000000D+01 0.30473669D+01 0.14218960D-01
+ 0.25000000D+01 0.26000000D+01 0.27547903D+01 0.10546905D-01
+ 0.26000000D+01 0.27000000D+01 0.24083111D+01 0.77583888D-02
+ 0.27000000D+01 0.28000000D+01 0.21412149D+01 0.69071517D-02
+ 0.28000000D+01 0.29000000D+01 0.18615412D+01 0.81768855D-02
+ 0.29000000D+01 0.30000000D+01 0.15795388D+01 0.66931181D-02
+ 0.30000000D+01 0.31000000D+01 0.13403949D+01 0.60458145D-02
+ 0.31000000D+01 0.32000000D+01 0.11332842D+01 0.54319646D-02
+ 0.32000000D+01 0.33000000D+01 0.91920810D+00 0.48304021D-02
+ 0.33000000D+01 0.34000000D+01 0.74582883D+00 0.38771675D-02
+ 0.34000000D+01 0.35000000D+01 0.56944835D+00 0.32814237D-02
+ 0.35000000D+01 0.36000000D+01 0.43878798D+00 0.24482794D-02
+ 0.36000000D+01 0.37000000D+01 0.32311889D+00 0.20683039D-02
+ 0.37000000D+01 0.38000000D+01 0.22623145D+00 0.17759449D-02
+ 0.38000000D+01 0.39000000D+01 0.14747940D+00 0.90753927D-03
+ 0.39000000D+01 0.40000000D+01 0.91460102D-01 0.62169852D-03
+ 0.40000000D+01 0.41000000D+01 0.51784659D-01 0.34964849D-03
+ 0.41000000D+01 0.42000000D+01 0.26068392D-01 0.30497485D-03
+ 0.42000000D+01 0.43000000D+01 0.11083923D-01 0.99700271D-04
+ 0.43000000D+01 0.44000000D+01 0.39401562D-02 0.37931648D-04
+ 0.44000000D+01 0.45000000D+01 0.99300952D-03 0.15434279D-04
+ 0.45000000D+01 0.46000000D+01 0.11383979D-03 0.50700991D-05
+ 0.46000000D+01 0.47000000D+01 0.78173611D-06 0.48331448D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79721058D-06 0.48389939D-06
+ -.46000000D+01 -.45000000D+01 0.11595280D-03 0.50774749D-05
+ -.45000000D+01 -.44000000D+01 0.99082472D-03 0.15745468D-04
+ -.44000000D+01 -.43000000D+01 0.39402912D-02 0.39422020D-04
+ -.43000000D+01 -.42000000D+01 0.11471534D-01 0.91727561D-04
+ -.42000000D+01 -.41000000D+01 0.26227899D-01 0.18383931D-03
+ -.41000000D+01 -.40000000D+01 0.52444976D-01 0.37762933D-03
+ -.40000000D+01 -.39000000D+01 0.92205220D-01 0.68532219D-03
+ -.39000000D+01 -.38000000D+01 0.15232274D+00 0.91409293D-03
+ -.38000000D+01 -.37000000D+01 0.22705749D+00 0.14092112D-02
+ -.37000000D+01 -.36000000D+01 0.32936514D+00 0.18737424D-02
+ -.36000000D+01 -.35000000D+01 0.44448688D+00 0.28994206D-02
+ -.35000000D+01 -.34000000D+01 0.59513232D+00 0.30040228D-02
+ -.34000000D+01 -.33000000D+01 0.76121337D+00 0.41656176D-02
+ -.33000000D+01 -.32000000D+01 0.94729825D+00 0.42254938D-02
+ -.32000000D+01 -.31000000D+01 0.11566973D+01 0.51036742D-02
+ -.31000000D+01 -.30000000D+01 0.13908878D+01 0.64008472D-02
+ -.30000000D+01 -.29000000D+01 0.16544297D+01 0.70389244D-02
+ -.29000000D+01 -.28000000D+01 0.19066517D+01 0.11134291D-01
+ -.28000000D+01 -.27000000D+01 0.21837305D+01 0.96563393D-02
+ -.27000000D+01 -.26000000D+01 0.25137600D+01 0.79420688D-02
+ -.26000000D+01 -.25000000D+01 0.28272146D+01 0.89568580D-02
+ -.25000000D+01 -.24000000D+01 0.31730022D+01 0.14514066D-01
+ -.24000000D+01 -.23000000D+01 0.35121655D+01 0.10175339D-01
+ -.23000000D+01 -.22000000D+01 0.38480275D+01 0.10278680D-01
+ -.22000000D+01 -.21000000D+01 0.42160690D+01 0.11551811D-01
+ -.21000000D+01 -.20000000D+01 0.45634364D+01 0.11060591D-01
+ -.20000000D+01 -.19000000D+01 0.49466722D+01 0.12173582D-01
+ -.19000000D+01 -.18000000D+01 0.52980026D+01 0.12765832D-01
+ -.18000000D+01 -.17000000D+01 0.56415307D+01 0.12195623D-01
+ -.17000000D+01 -.16000000D+01 0.59732082D+01 0.13483010D-01
+ -.16000000D+01 -.15000000D+01 0.62967138D+01 0.13771610D-01
+ -.15000000D+01 -.14000000D+01 0.66148201D+01 0.16743122D-01
+ -.14000000D+01 -.13000000D+01 0.69479632D+01 0.14986438D-01
+ -.13000000D+01 -.12000000D+01 0.72211275D+01 0.14941301D-01
+ -.12000000D+01 -.11000000D+01 0.75034434D+01 0.14948899D-01
+ -.11000000D+01 -.10000000D+01 0.77294276D+01 0.15449283D-01
+ -.10000000D+01 -.90000000D+00 0.79575590D+01 0.15556766D-01
+ -.90000000D+00 -.80000000D+00 0.81690431D+01 0.15740963D-01
+ -.80000000D+00 -.70000000D+00 0.83467712D+01 0.15002813D-01
+ -.70000000D+00 -.60000000D+00 0.84931535D+01 0.16064793D-01
+ -.60000000D+00 -.50000000D+00 0.86288655D+01 0.15697524D-01
+ -.50000000D+00 -.40000000D+00 0.87936421D+01 0.16291319D-01
+ -.40000000D+00 -.30000000D+00 0.88735873D+01 0.26605945D-01
+ -.30000000D+00 -.20000000D+00 0.89194837D+01 0.17550644D-01
+ -.20000000D+00 -.10000000D+00 0.89769705D+01 0.16431824D-01
+ -.10000000D+00 0.18041124D-15 0.90126328D+01 0.14916751D-01
+ 0.70776718D-15 0.10000000D+00 0.90171195D+01 0.26542021D-01
+ 0.10000000D+00 0.20000000D+00 0.89823403D+01 0.15862904D-01
+ 0.20000000D+00 0.30000000D+00 0.89095851D+01 0.17554119D-01
+ 0.30000000D+00 0.40000000D+00 0.88561857D+01 0.16318757D-01
+ 0.40000000D+00 0.50000000D+00 0.87758002D+01 0.16023525D-01
+ 0.50000000D+00 0.60000000D+00 0.86567098D+01 0.20867243D-01
+ 0.60000000D+00 0.70000000D+00 0.84814057D+01 0.20045048D-01
+ 0.70000000D+00 0.80000000D+00 0.83381696D+01 0.17516750D-01
+ 0.80000000D+00 0.90000000D+00 0.81681676D+01 0.17030106D-01
+ 0.90000000D+00 0.10000000D+01 0.79589376D+01 0.18786810D-01
+ 0.10000000D+01 0.11000000D+01 0.77147746D+01 0.15473962D-01
+ 0.11000000D+01 0.12000000D+01 0.74783745D+01 0.15325109D-01
+ 0.12000000D+01 0.13000000D+01 0.71995939D+01 0.14232747D-01
+ 0.13000000D+01 0.14000000D+01 0.68930755D+01 0.14742191D-01
+ 0.14000000D+01 0.15000000D+01 0.66069954D+01 0.14439925D-01
+ 0.15000000D+01 0.16000000D+01 0.63291851D+01 0.16786930D-01
+ 0.16000000D+01 0.17000000D+01 0.59674312D+01 0.13740124D-01
+ 0.17000000D+01 0.18000000D+01 0.56338715D+01 0.13644900D-01
+ 0.18000000D+01 0.19000000D+01 0.52790426D+01 0.11960077D-01
+ 0.19000000D+01 0.20000000D+01 0.49631141D+01 0.12588064D-01
+ 0.20000000D+01 0.21000000D+01 0.45758324D+01 0.11592200D-01
+ 0.21000000D+01 0.22000000D+01 0.42131338D+01 0.10681238D-01
+ 0.22000000D+01 0.23000000D+01 0.38539692D+01 0.12703612D-01
+ 0.23000000D+01 0.24000000D+01 0.34947304D+01 0.10892567D-01
+ 0.24000000D+01 0.25000000D+01 0.31662596D+01 0.14229664D-01
+ 0.25000000D+01 0.26000000D+01 0.28590975D+01 0.10554682D-01
+ 0.26000000D+01 0.27000000D+01 0.24987176D+01 0.77680962D-02
+ 0.27000000D+01 0.28000000D+01 0.22187321D+01 0.69154483D-02
+ 0.28000000D+01 0.29000000D+01 0.19267927D+01 0.81901256D-02
+ 0.29000000D+01 0.30000000D+01 0.16338978D+01 0.66993487D-02
+ 0.30000000D+01 0.31000000D+01 0.13846540D+01 0.60490228D-02
+ 0.31000000D+01 0.32000000D+01 0.11688496D+01 0.54475852D-02
+ 0.32000000D+01 0.33000000D+01 0.94674693D+00 0.48466733D-02
+ 0.33000000D+01 0.34000000D+01 0.76688898D+00 0.38814654D-02
+ 0.34000000D+01 0.35000000D+01 0.58489540D+00 0.32842297D-02
+ 0.35000000D+01 0.36000000D+01 0.44970951D+00 0.24517442D-02
+ 0.36000000D+01 0.37000000D+01 0.33056116D+00 0.20716068D-02
+ 0.37000000D+01 0.38000000D+01 0.23097169D+00 0.17764608D-02
+ 0.38000000D+01 0.39000000D+01 0.15031144D+00 0.90803333D-03
+ 0.39000000D+01 0.40000000D+01 0.93024102D-01 0.62191348D-03
+ 0.40000000D+01 0.41000000D+01 0.52557122D-01 0.34975079D-03
+ 0.41000000D+01 0.42000000D+01 0.26402292D-01 0.30501611D-03
+ 0.42000000D+01 0.43000000D+01 0.11204095D-01 0.99714133D-04
+ 0.43000000D+01 0.44000000D+01 0.39732887D-02 0.37935823D-04
+ 0.44000000D+01 0.45000000D+01 0.99880835D-03 0.15435940D-04
+ 0.45000000D+01 0.46000000D+01 0.11421389D-03 0.50701144D-05
+ 0.46000000D+01 0.47000000D+01 0.78227597D-06 0.48331449D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79059825D-06 0.48389893D-06
+ -.46000000D+01 -.45000000D+01 0.11131645D-03 0.50773803D-05
+ -.45000000D+01 -.44000000D+01 0.92041127D-03 0.15742940D-04
+ -.44000000D+01 -.43000000D+01 0.35486560D-02 0.39409368D-04
+ -.43000000D+01 -.42000000D+01 0.10094921D-01 0.91677040D-04
+ -.42000000D+01 -.41000000D+01 0.22505587D-01 0.18370999D-03
+ -.41000000D+01 -.40000000D+01 0.44070029D-01 0.37731686D-03
+ -.40000000D+01 -.39000000D+01 0.75716870D-01 0.68497063D-03
+ -.39000000D+01 -.38000000D+01 0.12297788D+00 0.88105117D-03
+ -.38000000D+01 -.37000000D+01 0.17967271D+00 0.13911662D-02
+ -.37000000D+01 -.36000000D+01 0.25674745D+00 0.18723293D-02
+ -.36000000D+01 -.35000000D+01 0.33943845D+00 0.28956764D-02
+ -.35000000D+01 -.34000000D+01 0.44978728D+00 0.29930788D-02
+ -.34000000D+01 -.33000000D+01 0.56719880D+00 0.41562085D-02
+ -.33000000D+01 -.32000000D+01 0.69654894D+00 0.42099161D-02
+ -.32000000D+01 -.31000000D+01 0.84095762D+00 0.50869073D-02
+ -.31000000D+01 -.30000000D+01 0.10015210D+01 0.63840582D-02
+ -.30000000D+01 -.29000000D+01 0.11835768D+01 0.70205684D-02
+ -.29000000D+01 -.28000000D+01 0.13470723D+01 0.11123690D-01
+ -.28000000D+01 -.27000000D+01 0.15285975D+01 0.96283508D-02
+ -.27000000D+01 -.26000000D+01 0.17556959D+01 0.79006542D-02
+ -.26000000D+01 -.25000000D+01 0.19615750D+01 0.89298470D-02
+ -.25000000D+01 -.24000000D+01 0.21962530D+01 0.14221114D-01
+ -.24000000D+01 -.23000000D+01 0.24141702D+01 0.98026285D-02
+ -.23000000D+01 -.22000000D+01 0.26308967D+01 0.10222361D-01
+ -.22000000D+01 -.21000000D+01 0.28754363D+01 0.11531129D-01
+ -.21000000D+01 -.20000000D+01 0.30951445D+01 0.11034250D-01
+ -.20000000D+01 -.19000000D+01 0.33516299D+01 0.12149353D-01
+ -.19000000D+01 -.18000000D+01 0.35767014D+01 0.12741068D-01
+ -.18000000D+01 -.17000000D+01 0.37962238D+01 0.12162124D-01
+ -.17000000D+01 -.16000000D+01 0.40037517D+01 0.13461729D-01
+ -.16000000D+01 -.15000000D+01 0.42066943D+01 0.13743198D-01
+ -.15000000D+01 -.14000000D+01 0.44093569D+01 0.16720984D-01
+ -.14000000D+01 -.13000000D+01 0.46292102D+01 0.14883660D-01
+ -.13000000D+01 -.12000000D+01 0.47965716D+01 0.14858630D-01
+ -.12000000D+01 -.11000000D+01 0.49771233D+01 0.14894299D-01
+ -.11000000D+01 -.10000000D+01 0.51087629D+01 0.15395474D-01
+ -.10000000D+01 -.90000000D+00 0.52496424D+01 0.15498761D-01
+ -.90000000D+00 -.80000000D+00 0.53809621D+01 0.15654237D-01
+ -.80000000D+00 -.70000000D+00 0.54848208D+01 0.14897433D-01
+ -.70000000D+00 -.60000000D+00 0.55688541D+01 0.16023070D-01
+ -.60000000D+00 -.50000000D+00 0.56494527D+01 0.15389529D-01
+ -.50000000D+00 -.40000000D+00 0.57644822D+01 0.15984368D-01
+ -.40000000D+00 -.30000000D+00 0.58122253D+01 0.26186693D-01
+ -.30000000D+00 -.20000000D+00 0.58246377D+01 0.16882951D-01
+ -.20000000D+00 -.10000000D+00 0.58648118D+01 0.16347641D-01
+ -.10000000D+00 0.18041124D-15 0.58903846D+01 0.14865737D-01
+ 0.70776718D-15 0.10000000D+00 0.58965270D+01 0.26520535D-01
+ 0.10000000D+00 0.20000000D+00 0.58704090D+01 0.15802062D-01
+ 0.20000000D+00 0.30000000D+00 0.58172707D+01 0.17501919D-01
+ 0.30000000D+00 0.40000000D+00 0.57899755D+01 0.16151291D-01
+ 0.40000000D+00 0.50000000D+00 0.57515278D+01 0.15824996D-01
+ 0.50000000D+00 0.60000000D+00 0.56754922D+01 0.20773086D-01
+ 0.60000000D+00 0.70000000D+00 0.55568407D+01 0.19972264D-01
+ 0.70000000D+00 0.80000000D+00 0.54756587D+01 0.17454940D-01
+ 0.80000000D+00 0.90000000D+00 0.53791314D+01 0.16982579D-01
+ 0.90000000D+00 0.10000000D+01 0.52505278D+01 0.18748521D-01
+ 0.10000000D+01 0.11000000D+01 0.50938828D+01 0.15435328D-01
+ 0.11000000D+01 0.12000000D+01 0.49519828D+01 0.15293962D-01
+ 0.12000000D+01 0.13000000D+01 0.47739497D+01 0.14188926D-01
+ 0.13000000D+01 0.14000000D+01 0.45755203D+01 0.14707422D-01
+ 0.14000000D+01 0.15000000D+01 0.44012864D+01 0.14398570D-01
+ 0.15000000D+01 0.16000000D+01 0.42399665D+01 0.16756057D-01
+ 0.16000000D+01 0.17000000D+01 0.39986078D+01 0.13693125D-01
+ 0.17000000D+01 0.18000000D+01 0.37879985D+01 0.13601224D-01
+ 0.18000000D+01 0.19000000D+01 0.35579854D+01 0.11949942D-01
+ 0.19000000D+01 0.20000000D+01 0.33681456D+01 0.12563668D-01
+ 0.20000000D+01 0.21000000D+01 0.31086098D+01 0.11568426D-01
+ 0.21000000D+01 0.22000000D+01 0.28723692D+01 0.10657490D-01
+ 0.22000000D+01 0.23000000D+01 0.26368532D+01 0.12696345D-01
+ 0.23000000D+01 0.24000000D+01 0.23978551D+01 0.10844567D-01
+ 0.24000000D+01 0.25000000D+01 0.21883958D+01 0.14198259D-01
+ 0.25000000D+01 0.26000000D+01 0.19935896D+01 0.10512728D-01
+ 0.26000000D+01 0.27000000D+01 0.17410340D+01 0.77317901D-02
+ 0.27000000D+01 0.28000000D+01 0.15629791D+01 0.68944172D-02
+ 0.28000000D+01 0.29000000D+01 0.13674378D+01 0.81463504D-02
+ 0.29000000D+01 0.30000000D+01 0.11626486D+01 0.66834055D-02
+ 0.30000000D+01 0.31000000D+01 0.99548914D+00 0.60400600D-02
+ 0.31000000D+01 0.32000000D+01 0.85207397D+00 0.53949697D-02
+ 0.32000000D+01 0.33000000D+01 0.69654066D+00 0.47909999D-02
+ 0.33000000D+01 0.34000000D+01 0.57279248D+00 0.38670741D-02
+ 0.34000000D+01 0.35000000D+01 0.43967382D+00 0.32764910D-02
+ 0.35000000D+01 0.36000000D+01 0.34475736D+00 0.24415337D-02
+ 0.36000000D+01 0.37000000D+01 0.25775981D+00 0.20613311D-02
+ 0.37000000D+01 0.38000000D+01 0.18344205D+00 0.17744241D-02
+ 0.38000000D+01 0.39000000D+01 0.12118643D+00 0.90665219D-03
+ 0.39000000D+01 0.40000000D+01 0.76530163D-01 0.62134002D-03
+ 0.40000000D+01 0.41000000D+01 0.44182135D-01 0.34947691D-03
+ 0.41000000D+01 0.42000000D+01 0.22678939D-01 0.30489501D-03
+ 0.42000000D+01 0.43000000D+01 0.98248133D-02 0.99682572D-04
+ 0.43000000D+01 0.44000000D+01 0.35816318D-02 0.37918484D-04
+ 0.44000000D+01 0.45000000D+01 0.92834654D-03 0.15428010D-04
+ 0.45000000D+01 0.46000000D+01 0.10956547D-03 0.50700591D-05
+ 0.46000000D+01 0.47000000D+01 0.77569883D-06 0.48331438D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79591108D-06 0.48389933D-06
+ -.46000000D+01 -.45000000D+01 0.11489485D-03 0.50774649D-05
+ -.45000000D+01 -.44000000D+01 0.97328058D-03 0.15745271D-04
+ -.44000000D+01 -.43000000D+01 0.38359953D-02 0.39423105D-04
+ -.43000000D+01 -.42000000D+01 0.11086304D-01 0.91724712D-04
+ -.42000000D+01 -.41000000D+01 0.25143050D-01 0.18383922D-03
+ -.41000000D+01 -.40000000D+01 0.49914842D-01 0.37761277D-03
+ -.40000000D+01 -.39000000D+01 0.87071146D-01 0.68546539D-03
+ -.39000000D+01 -.38000000D+01 0.14289033D+00 0.89247455D-03
+ -.38000000D+01 -.37000000D+01 0.21153754D+00 0.13967454D-02
+ -.37000000D+01 -.36000000D+01 0.30495693D+00 0.18738455D-02
+ -.36000000D+01 -.35000000D+01 0.40845910D+00 0.28989164D-02
+ -.35000000D+01 -.34000000D+01 0.54435429D+00 0.30011812D-02
+ -.34000000D+01 -.33000000D+01 0.69226108D+00 0.41640050D-02
+ -.33000000D+01 -.32000000D+01 0.85682848D+00 0.42204310D-02
+ -.32000000D+01 -.31000000D+01 0.10413144D+01 0.50992983D-02
+ -.31000000D+01 -.30000000D+01 0.12467470D+01 0.63974727D-02
+ -.30000000D+01 -.29000000D+01 0.14783412D+01 0.70349839D-02
+ -.29000000D+01 -.28000000D+01 0.16953073D+01 0.11132055D-01
+ -.28000000D+01 -.27000000D+01 0.19340268D+01 0.96505124D-02
+ -.27000000D+01 -.26000000D+01 0.22227141D+01 0.79306991D-02
+ -.26000000D+01 -.25000000D+01 0.24923563D+01 0.89483839D-02
+ -.25000000D+01 -.24000000D+01 0.27928288D+01 0.14367361D-01
+ -.24000000D+01 -.23000000D+01 0.30821898D+01 0.99691149D-02
+ -.23000000D+01 -.22000000D+01 0.33687954D+01 0.10260811D-01
+ -.22000000D+01 -.21000000D+01 0.36857800D+01 0.11543888D-01
+ -.21000000D+01 -.20000000D+01 0.39803862D+01 0.11052042D-01
+ -.20000000D+01 -.19000000D+01 0.43110243D+01 0.12165088D-01
+ -.19000000D+01 -.18000000D+01 0.46091424D+01 0.12758637D-01
+ -.18000000D+01 -.17000000D+01 0.49005839D+01 0.12183432D-01
+ -.17000000D+01 -.16000000D+01 0.51798559D+01 0.13475183D-01
+ -.16000000D+01 -.15000000D+01 0.54524046D+01 0.13762481D-01
+ -.15000000D+01 -.14000000D+01 0.57216231D+01 0.16736400D-01
+ -.14000000D+01 -.13000000D+01 0.60063775D+01 0.14938774D-01
+ -.13000000D+01 -.12000000D+01 0.62345172D+01 0.14895963D-01
+ -.12000000D+01 -.11000000D+01 0.64737591D+01 0.14923988D-01
+ -.11000000D+01 -.10000000D+01 0.66592619D+01 0.15433001D-01
+ -.10000000D+01 -.90000000D+00 0.68496081D+01 0.15542579D-01
+ -.90000000D+00 -.80000000D+00 0.70263709D+01 0.15711369D-01
+ -.80000000D+00 -.70000000D+00 0.71725859D+01 0.14965274D-01
+ -.70000000D+00 -.60000000D+00 0.72922950D+01 0.16053781D-01
+ -.60000000D+00 -.50000000D+00 0.74036575D+01 0.15567630D-01
+ -.50000000D+00 -.40000000D+00 0.75474264D+01 0.16160554D-01
+ -.40000000D+00 -.30000000D+00 0.76127673D+01 0.26449273D-01
+ -.30000000D+00 -.20000000D+00 0.76448115D+01 0.17304321D-01
+ -.20000000D+00 -.10000000D+00 0.76948855D+01 0.16400009D-01
+ -.10000000D+00 0.18041124D-15 0.77258319D+01 0.14901156D-01
+ 0.70776718D-15 0.10000000D+00 0.77309376D+01 0.26538474D-01
+ 0.10000000D+00 0.20000000D+00 0.77003379D+01 0.15841726D-01
+ 0.20000000D+00 0.30000000D+00 0.76358118D+01 0.17535379D-01
+ 0.30000000D+00 0.40000000D+00 0.75931768D+01 0.16206636D-01
+ 0.40000000D+00 0.50000000D+00 0.75316810D+01 0.15914698D-01
+ 0.50000000D+00 0.60000000D+00 0.74309579D+01 0.20841028D-01
+ 0.60000000D+00 0.70000000D+00 0.72801361D+01 0.20026596D-01
+ 0.70000000D+00 0.80000000D+00 0.71638962D+01 0.17489723D-01
+ 0.80000000D+00 0.90000000D+00 0.70252987D+01 0.17011888D-01
+ 0.90000000D+00 0.10000000D+01 0.68507506D+01 0.18772451D-01
+ 0.10000000D+01 0.11000000D+01 0.66442834D+01 0.15464450D-01
+ 0.11000000D+01 0.12000000D+01 0.64485315D+01 0.15315044D-01
+ 0.12000000D+01 0.13000000D+01 0.62127901D+01 0.14218134D-01
+ 0.13000000D+01 0.14000000D+01 0.59517374D+01 0.14732051D-01
+ 0.14000000D+01 0.15000000D+01 0.57137082D+01 0.14427090D-01
+ 0.15000000D+01 0.16000000D+01 0.54852203D+01 0.16772413D-01
+ 0.16000000D+01 0.17000000D+01 0.51744461D+01 0.13723429D-01
+ 0.17000000D+01 0.18000000D+01 0.48926987D+01 0.13629579D-01
+ 0.18000000D+01 0.19000000D+01 0.45903012D+01 0.11956918D-01
+ 0.19000000D+01 0.20000000D+01 0.43273312D+01 0.12580466D-01
+ 0.20000000D+01 0.21000000D+01 0.39933702D+01 0.11585849D-01
+ 0.21000000D+01 0.22000000D+01 0.36829538D+01 0.10675446D-01
+ 0.22000000D+01 0.23000000D+01 0.33747378D+01 0.12705559D-01
+ 0.23000000D+01 0.24000000D+01 0.30652493D+01 0.10876499D-01
+ 0.24000000D+01 0.25000000D+01 0.27855350D+01 0.14217155D-01
+ 0.25000000D+01 0.26000000D+01 0.25242080D+01 0.10542004D-01
+ 0.26000000D+01 0.27000000D+01 0.22077264D+01 0.77579315D-02
+ 0.27000000D+01 0.28000000D+01 0.19687567D+01 0.69075608D-02
+ 0.28000000D+01 0.29000000D+01 0.17155437D+01 0.81720423D-02
+ 0.29000000D+01 0.30000000D+01 0.14576195D+01 0.66933831D-02
+ 0.30000000D+01 0.31000000D+01 0.12406468D+01 0.60474686D-02
+ 0.31000000D+01 0.32000000D+01 0.10529610D+01 0.54219956D-02
+ 0.32000000D+01 0.33000000D+01 0.85652293D+00 0.48187992D-02
+ 0.33000000D+01 0.34000000D+01 0.69793605D+00 0.38762978D-02
+ 0.34000000D+01 0.35000000D+01 0.53414554D+00 0.32812481D-02
+ 0.35000000D+01 0.36000000D+01 0.41372072D+00 0.24472960D-02
+ 0.36000000D+01 0.37000000D+01 0.30609570D+00 0.20668255D-02
+ 0.37000000D+01 0.38000000D+01 0.21537198D+00 0.17762795D-02
+ 0.38000000D+01 0.39000000D+01 0.14098110D+00 0.90778887D-03
+ 0.39000000D+01 0.40000000D+01 0.87890582D-01 0.62189433D-03
+ 0.40000000D+01 0.41000000D+01 0.50027551D-01 0.34975754D-03
+ 0.41000000D+01 0.42000000D+01 0.25316702D-01 0.30500666D-03
+ 0.42000000D+01 0.43000000D+01 0.10817809D-01 0.99718264D-04
+ 0.43000000D+01 0.44000000D+01 0.38689428D-02 0.37934088D-04
+ 0.44000000D+01 0.45000000D+01 0.98125138D-03 0.15434355D-04
+ 0.45000000D+01 0.46000000D+01 0.11315188D-03 0.50701132D-05
+ 0.46000000D+01 0.47000000D+01 0.78098002D-06 0.48331448D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79694285D-06 0.48389940D-06
+ -.46000000D+01 -.45000000D+01 0.11568003D-03 0.50774816D-05
+ -.45000000D+01 -.44000000D+01 0.98586561D-03 0.15745719D-04
+ -.44000000D+01 -.43000000D+01 0.39089544D-02 0.39425368D-04
+ -.43000000D+01 -.42000000D+01 0.11350881D-01 0.91735462D-04
+ -.42000000D+01 -.41000000D+01 0.25876517D-01 0.18386947D-03
+ -.41000000D+01 -.40000000D+01 0.51601278D-01 0.37768348D-03
+ -.40000000D+01 -.39000000D+01 0.90451946D-01 0.68555360D-03
+ -.39000000D+01 -.38000000D+01 0.14902945D+00 0.90601409D-03
+ -.38000000D+01 -.37000000D+01 0.22152214D+00 0.14045552D-02
+ -.37000000D+01 -.36000000D+01 0.32048666D+00 0.18742389D-02
+ -.36000000D+01 -.35000000D+01 0.43116297D+00 0.28999363D-02
+ -.35000000D+01 -.34000000D+01 0.57605463D+00 0.30039392D-02
+ -.34000000D+01 -.33000000D+01 0.73493835D+00 0.41662799D-02
+ -.33000000D+01 -.32000000D+01 0.91236123D+00 0.42246034D-02
+ -.32000000D+01 -.31000000D+01 0.11116268D+01 0.51035192D-02
+ -.31000000D+01 -.30000000D+01 0.13339701D+01 0.64015021D-02
+ -.30000000D+01 -.29000000D+01 0.15842548D+01 0.70397442D-02
+ -.29000000D+01 -.28000000D+01 0.18217152D+01 0.11134826D-01
+ -.28000000D+01 -.27000000D+01 0.20825439D+01 0.96570348D-02
+ -.27000000D+01 -.26000000D+01 0.23950774D+01 0.79417063D-02
+ -.26000000D+01 -.25000000D+01 0.26897256D+01 0.89563774D-02
+ -.25000000D+01 -.24000000D+01 0.30158421D+01 0.14474302D-01
+ -.24000000D+01 -.23000000D+01 0.33337967D+01 0.10114239D-01
+ -.23000000D+01 -.22000000D+01 0.36481464D+01 0.10276596D-01
+ -.22000000D+01 -.21000000D+01 0.39939417D+01 0.11550452D-01
+ -.21000000D+01 -.20000000D+01 0.43184153D+01 0.11059925D-01
+ -.20000000D+01 -.19000000D+01 0.46786278D+01 0.12173298D-01
+ -.19000000D+01 -.18000000D+01 0.50065335D+01 0.12766346D-01
+ -.18000000D+01 -.17000000D+01 0.53270305D+01 0.12194317D-01
+ -.17000000D+01 -.16000000D+01 0.56355973D+01 0.13482274D-01
+ -.16000000D+01 -.15000000D+01 0.59365860D+01 0.13771462D-01
+ -.15000000D+01 -.14000000D+01 0.62328841D+01 0.16743503D-01
+ -.14000000D+01 -.13000000D+01 0.65444892D+01 0.14971699D-01
+ -.13000000D+01 -.12000000D+01 0.67975286D+01 0.14926442D-01
+ -.12000000D+01 -.11000000D+01 0.70607301D+01 0.14941715D-01
+ -.11000000D+01 -.10000000D+01 0.72685555D+01 0.15448862D-01
+ -.10000000D+01 -.90000000D+00 0.74797261D+01 0.15557852D-01
+ -.90000000D+00 -.80000000D+00 0.76755055D+01 0.15738624D-01
+ -.80000000D+00 -.70000000D+00 0.78391526D+01 0.14996041D-01
+ -.70000000D+00 -.60000000D+00 0.79734963D+01 0.16068142D-01
+ -.60000000D+00 -.50000000D+00 0.80980871D+01 0.15669519D-01
+ -.50000000D+00 -.40000000D+00 0.82537622D+01 0.16262303D-01
+ -.40000000D+00 -.30000000D+00 0.83265678D+01 0.26578778D-01
+ -.30000000D+00 -.20000000D+00 0.83666630D+01 0.17506398D-01
+ -.20000000D+00 -.10000000D+00 0.84207099D+01 0.16425389D-01
+ -.10000000D+00 0.18041124D-15 0.84541536D+01 0.14916276D-01
+ 0.70776718D-15 0.10000000D+00 0.84588724D+01 0.26543827D-01
+ 0.10000000D+00 0.20000000D+00 0.84261517D+01 0.15859570D-01
+ 0.20000000D+00 0.30000000D+00 0.83570501D+01 0.17551037D-01
+ 0.30000000D+00 0.40000000D+00 0.83083738D+01 0.16262127D-01
+ 0.40000000D+00 0.50000000D+00 0.82365625D+01 0.15975883D-01
+ 0.50000000D+00 0.60000000D+00 0.81257751D+01 0.20864472D-01
+ 0.60000000D+00 0.70000000D+00 0.79614803D+01 0.20044962D-01
+ 0.70000000D+00 0.80000000D+00 0.78306962D+01 0.17510864D-01
+ 0.80000000D+00 0.90000000D+00 0.76745876D+01 0.17028064D-01
+ 0.90000000D+00 0.10000000D+01 0.74809495D+01 0.18784124D-01
+ 0.10000000D+01 0.11000000D+01 0.72537659D+01 0.15476226D-01
+ 0.11000000D+01 0.12000000D+01 0.70355483D+01 0.15324464D-01
+ 0.12000000D+01 0.13000000D+01 0.67760189D+01 0.14231120D-01
+ 0.13000000D+01 0.14000000D+01 0.64895769D+01 0.14742123D-01
+ 0.14000000D+01 0.15000000D+01 0.62250401D+01 0.14439386D-01
+ 0.15000000D+01 0.16000000D+01 0.59692231D+01 0.16782991D-01
+ 0.16000000D+01 0.17000000D+01 0.56300094D+01 0.13738711D-01
+ 0.17000000D+01 0.18000000D+01 0.53193208D+01 0.13642137D-01
+ 0.18000000D+01 0.19000000D+01 0.49876713D+01 0.11961033D-01
+ 0.19000000D+01 0.20000000D+01 0.46950014D+01 0.12587795D-01
+ 0.20000000D+01 0.21000000D+01 0.43310301D+01 0.11592539D-01
+ 0.21000000D+01 0.22000000D+01 0.39911202D+01 0.10682748D-01
+ 0.22000000D+01 0.23000000D+01 0.36540935D+01 0.12706726D-01
+ 0.23000000D+01 0.24000000D+01 0.33165069D+01 0.10891176D-01
+ 0.24000000D+01 0.25000000D+01 0.30090000D+01 0.14228410D-01
+ 0.25000000D+01 0.26000000D+01 0.27215394D+01 0.10552297D-01
+ 0.26000000D+01 0.27000000D+01 0.23799925D+01 0.77680534D-02
+ 0.27000000D+01 0.28000000D+01 0.21174469D+01 0.69146890D-02
+ 0.28000000D+01 0.29000000D+01 0.18418357D+01 0.81862763D-02
+ 0.29000000D+01 0.30000000D+01 0.15636600D+01 0.66991807D-02
+ 0.30000000D+01 0.31000000D+01 0.13277879D+01 0.60500679D-02
+ 0.31000000D+01 0.32000000D+01 0.11235967D+01 0.54413823D-02
+ 0.32000000D+01 0.33000000D+01 0.91187676D+00 0.48393507D-02
+ 0.33000000D+01 0.34000000D+01 0.74063498D+00 0.38809952D-02
+ 0.34000000D+01 0.35000000D+01 0.56582259D+00 0.32840359D-02
+ 0.35000000D+01 0.36000000D+01 0.43639260D+00 0.24510122D-02
+ 0.36000000D+01 0.37000000D+01 0.32167629D+00 0.20706017D-02
+ 0.37000000D+01 0.38000000D+01 0.22541083D+00 0.17767045D-02
+ 0.38000000D+01 0.39000000D+01 0.14704859D+00 0.90819262D-03
+ 0.39000000D+01 0.40000000D+01 0.91271845D-01 0.62203152D-03
+ 0.40000000D+01 0.41000000D+01 0.51713718D-01 0.34981380D-03
+ 0.41000000D+01 0.42000000D+01 0.26050538D-01 0.30503566D-03
+ 0.42000000D+01 0.43000000D+01 0.11083011D-01 0.99724352D-04
+ 0.43000000D+01 0.44000000D+01 0.39419464D-02 0.37937465D-04
+ 0.44000000D+01 0.45000000D+01 0.99384881D-03 0.15436163D-04
+ 0.45000000D+01 0.46000000D+01 0.11393914D-03 0.50701229D-05
+ 0.46000000D+01 0.47000000D+01 0.78200619D-06 0.48331449D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79730851D-06 0.48389943D-06
+ -.46000000D+01 -.45000000D+01 0.11596914D-03 0.50774876D-05
+ -.45000000D+01 -.44000000D+01 0.99064478D-03 0.15745876D-04
+ -.44000000D+01 -.43000000D+01 0.39374502D-02 0.39426097D-04
+ -.43000000D+01 -.42000000D+01 0.11456777D-01 0.91739553D-04
+ -.42000000D+01 -.41000000D+01 0.26176557D-01 0.18388125D-03
+ -.41000000D+01 -.40000000D+01 0.52305561D-01 0.37771120D-03
+ -.40000000D+01 -.39000000D+01 0.91890126D-01 0.68558789D-03
+ -.39000000D+01 -.38000000D+01 0.15169962D+00 0.91622109D-03
+ -.38000000D+01 -.37000000D+01 0.22590871D+00 0.14106731D-02
+ -.37000000D+01 -.36000000D+01 0.32743712D+00 0.18744076D-02
+ -.36000000D+01 -.35000000D+01 0.44147140D+00 0.29003961D-02
+ -.35000000D+01 -.34000000D+01 0.59064693D+00 0.30051952D-02
+ -.34000000D+01 -.33000000D+01 0.75483433D+00 0.41672102D-02
+ -.33000000D+01 -.32000000D+01 0.93855429D+00 0.42272786D-02
+ -.32000000D+01 -.31000000D+01 0.11451062D+01 0.51059413D-02
+ -.31000000D+01 -.30000000D+01 0.13759396D+01 0.64032659D-02
+ -.30000000D+01 -.29000000D+01 0.16356336D+01 0.70419480D-02
+ -.29000000D+01 -.28000000D+01 0.18835365D+01 0.11136149D-01
+ -.28000000D+01 -.27000000D+01 0.21557192D+01 0.96599392D-02
+ -.27000000D+01 -.26000000D+01 0.24805408D+01 0.79468879D-02
+ -.26000000D+01 -.25000000D+01 0.27881825D+01 0.89605339D-02
+ -.25000000D+01 -.24000000D+01 0.31276893D+01 0.14538080D-01
+ -.24000000D+01 -.23000000D+01 0.34606097D+01 0.10204047D-01
+ -.23000000D+01 -.22000000D+01 0.37896209D+01 0.10284829D-01
+ -.22000000D+01 -.21000000D+01 0.41506443D+01 0.11554308D-01
+ -.21000000D+01 -.20000000D+01 0.44909118D+01 0.11064854D-01
+ -.20000000D+01 -.19000000D+01 0.48667976D+01 0.12178618D-01
+ -.19000000D+01 -.18000000D+01 0.52106787D+01 0.12770878D-01
+ -.18000000D+01 -.17000000D+01 0.55467608D+01 0.12200816D-01
+ -.17000000D+01 -.16000000D+01 0.58710693D+01 0.13486851D-01
+ -.16000000D+01 -.15000000D+01 0.61874119D+01 0.13776309D-01
+ -.15000000D+01 -.14000000D+01 0.64982749D+01 0.16747594D-01
+ -.14000000D+01 -.13000000D+01 0.68245240D+01 0.14993029D-01
+ -.13000000D+01 -.12000000D+01 0.70910655D+01 0.14949256D-01
+ -.12000000D+01 -.11000000D+01 0.73671797D+01 0.14954773D-01
+ -.11000000D+01 -.10000000D+01 0.75872041D+01 0.15457192D-01
+ -.10000000D+01 -.90000000D+00 0.78098571D+01 0.15565205D-01
+ -.90000000D+00 -.80000000D+00 0.80160467D+01 0.15752715D-01
+ -.80000000D+00 -.70000000D+00 0.81891876D+01 0.15011933D-01
+ -.70000000D+00 -.60000000D+00 0.83314655D+01 0.16077622D-01
+ -.60000000D+00 -.50000000D+00 0.84635474D+01 0.15723462D-01
+ -.50000000D+00 -.40000000D+00 0.86255557D+01 0.16315393D-01
+ -.40000000D+00 -.30000000D+00 0.87026543D+01 0.26639791D-01
+ -.30000000D+00 -.20000000D+00 0.87470027D+01 0.17601540D-01
+ -.20000000D+00 -.10000000D+00 0.88032594D+01 0.16439609D-01
+ -.10000000D+00 0.18041124D-15 0.88381529D+01 0.14924536D-01
+ 0.70776718D-15 0.10000000D+00 0.88426752D+01 0.26546933D-01
+ 0.10000000D+00 0.20000000D+00 0.88086909D+01 0.15869995D-01
+ 0.20000000D+00 0.30000000D+00 0.87371307D+01 0.17560223D-01
+ 0.30000000D+00 0.40000000D+00 0.86853398D+01 0.16318242D-01
+ 0.40000000D+00 0.50000000D+00 0.86075086D+01 0.16031572D-01
+ 0.50000000D+00 0.60000000D+00 0.84913317D+01 0.20875450D-01
+ 0.60000000D+00 0.70000000D+00 0.83196231D+01 0.20054233D-01
+ 0.70000000D+00 0.80000000D+00 0.81807894D+01 0.17523906D-01
+ 0.80000000D+00 0.90000000D+00 0.80151775D+01 0.17038056D-01
+ 0.90000000D+00 0.10000000D+01 0.78111220D+01 0.18791257D-01
+ 0.10000000D+01 0.11000000D+01 0.75725880D+01 0.15482981D-01
+ 0.11000000D+01 0.12000000D+01 0.73420730D+01 0.15330500D-01
+ 0.12000000D+01 0.13000000D+01 0.70695696D+01 0.14238441D-01
+ 0.13000000D+01 0.14000000D+01 0.67695228D+01 0.14747693D-01
+ 0.14000000D+01 0.15000000D+01 0.64904796D+01 0.14446449D-01
+ 0.15000000D+01 0.16000000D+01 0.62199511D+01 0.16790392D-01
+ 0.16000000D+01 0.17000000D+01 0.58653689D+01 0.13747279D-01
+ 0.17000000D+01 0.18000000D+01 0.55391261D+01 0.13649226D-01
+ 0.18000000D+01 0.19000000D+01 0.51918270D+01 0.11964173D-01
+ 0.19000000D+01 0.20000000D+01 0.48832569D+01 0.12591829D-01
+ 0.20000000D+01 0.21000000D+01 0.45032990D+01 0.11595813D-01
+ 0.21000000D+01 0.22000000D+01 0.41477857D+01 0.10686790D-01
+ 0.22000000D+01 0.23000000D+01 0.37955838D+01 0.12706577D-01
+ 0.23000000D+01 0.24000000D+01 0.34431563D+01 0.10898475D-01
+ 0.24000000D+01 0.25000000D+01 0.31210947D+01 0.14234337D-01
+ 0.25000000D+01 0.26000000D+01 0.28199982D+01 0.10556866D-01
+ 0.26000000D+01 0.27000000D+01 0.24653998D+01 0.77730283D-02
+ 0.27000000D+01 0.28000000D+01 0.21907201D+01 0.69193712D-02
+ 0.28000000D+01 0.29000000D+01 0.19035910D+01 0.81948445D-02
+ 0.29000000D+01 0.30000000D+01 0.16151129D+01 0.67026192D-02
+ 0.30000000D+01 0.31000000D+01 0.13697074D+01 0.60512469D-02
+ 0.31000000D+01 0.32000000D+01 0.11572604D+01 0.54525283D-02
+ 0.32000000D+01 0.33000000D+01 0.93797128D+00 0.48513133D-02
+ 0.33000000D+01 0.34000000D+01 0.76053144D+00 0.38834393D-02
+ 0.34000000D+01 0.35000000D+01 0.58040571D+00 0.32855835D-02
+ 0.35000000D+01 0.36000000D+01 0.44668422D+00 0.24531502D-02
+ 0.36000000D+01 0.37000000D+01 0.32864945D+00 0.20728060D-02
+ 0.37000000D+01 0.38000000D+01 0.22983213D+00 0.17768646D-02
+ 0.38000000D+01 0.39000000D+01 0.14967728D+00 0.90837052D-03
+ 0.39000000D+01 0.40000000D+01 0.92710086D-01 0.62208567D-03
+ 0.40000000D+01 0.41000000D+01 0.52417792D-01 0.34983450D-03
+ 0.41000000D+01 0.42000000D+01 0.26350784D-01 0.30504731D-03
+ 0.42000000D+01 0.43000000D+01 0.11189184D-01 0.99726475D-04
+ 0.43000000D+01 0.44000000D+01 0.39704654D-02 0.37938715D-04
+ 0.44000000D+01 0.45000000D+01 0.99863267D-03 0.15436872D-04
+ 0.45000000D+01 0.46000000D+01 0.11422906D-03 0.50701262D-05
+ 0.46000000D+01 0.47000000D+01 0.78236993D-06 0.48331450D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79353865D-06 0.48389893D-06
+ -.46000000D+01 -.45000000D+01 0.11363906D-03 0.50773551D-05
+ -.45000000D+01 -.44000000D+01 0.95692292D-03 0.15742139D-04
+ -.44000000D+01 -.43000000D+01 0.37548837D-02 0.39398609D-04
+ -.43000000D+01 -.42000000D+01 0.10823900D-01 0.91642167D-04
+ -.42000000D+01 -.41000000D+01 0.24483677D-01 0.18359873D-03
+ -.41000000D+01 -.40000000D+01 0.48518548D-01 0.37711705D-03
+ -.40000000D+01 -.39000000D+01 0.84467573D-01 0.68358296D-03
+ -.39000000D+01 -.38000000D+01 0.13845360D+00 0.88291254D-03
+ -.38000000D+01 -.37000000D+01 0.20479351D+00 0.13895330D-02
+ -.37000000D+01 -.36000000D+01 0.29501603D+00 0.18705985D-02
+ -.36000000D+01 -.35000000D+01 0.39469195D+00 0.28943283D-02
+ -.35000000D+01 -.34000000D+01 0.52600344D+00 0.29940363D-02
+ -.34000000D+01 -.33000000D+01 0.66857946D+00 0.41546524D-02
+ -.33000000D+01 -.32000000D+01 0.82725060D+00 0.42068060D-02
+ -.32000000D+01 -.31000000D+01 0.10051142D+01 0.50842364D-02
+ -.31000000D+01 -.30000000D+01 0.12032407D+01 0.63829041D-02
+ -.30000000D+01 -.29000000D+01 0.14268502D+01 0.70172559D-02
+ -.29000000D+01 -.28000000D+01 0.16353488D+01 0.11122982D-01
+ -.28000000D+01 -.27000000D+01 0.18653904D+01 0.96276321D-02
+ -.27000000D+01 -.26000000D+01 0.21441503D+01 0.78983886D-02
+ -.26000000D+01 -.25000000D+01 0.24044390D+01 0.89276804D-02
+ -.25000000D+01 -.24000000D+01 0.26953415D+01 0.14251698D-01
+ -.24000000D+01 -.23000000D+01 0.29731716D+01 0.98350035D-02
+ -.23000000D+01 -.22000000D+01 0.32495872D+01 0.10220047D-01
+ -.22000000D+01 -.21000000D+01 0.35557803D+01 0.11526436D-01
+ -.21000000D+01 -.20000000D+01 0.38385265D+01 0.11024963D-01
+ -.20000000D+01 -.19000000D+01 0.41581302D+01 0.12144213D-01
+ -.19000000D+01 -.18000000D+01 0.44455351D+01 0.12730194D-01
+ -.18000000D+01 -.17000000D+01 0.47264351D+01 0.12153275D-01
+ -.17000000D+01 -.16000000D+01 0.49949614D+01 0.13458459D-01
+ -.16000000D+01 -.15000000D+01 0.52570617D+01 0.13733132D-01
+ -.15000000D+01 -.14000000D+01 0.55169348D+01 0.16709944D-01
+ -.14000000D+01 -.13000000D+01 0.57918586D+01 0.14889626D-01
+ -.13000000D+01 -.12000000D+01 0.60117440D+01 0.14856173D-01
+ -.12000000D+01 -.11000000D+01 0.62416510D+01 0.14889150D-01
+ -.11000000D+01 -.10000000D+01 0.64198145D+01 0.15399009D-01
+ -.10000000D+01 -.90000000D+00 0.66030638D+01 0.15493908D-01
+ -.90000000D+00 -.80000000D+00 0.67735655D+01 0.15651995D-01
+ -.80000000D+00 -.70000000D+00 0.69134489D+01 0.14903551D-01
+ -.70000000D+00 -.60000000D+00 0.70282061D+01 0.16014630D-01
+ -.60000000D+00 -.50000000D+00 0.71358272D+01 0.15425280D-01
+ -.50000000D+00 -.40000000D+00 0.72741385D+01 0.16018374D-01
+ -.40000000D+00 -.30000000D+00 0.73390870D+01 0.26243026D-01
+ -.30000000D+00 -.20000000D+00 0.73664123D+01 0.16974800D-01
+ -.20000000D+00 -.10000000D+00 0.74154755D+01 0.16341276D-01
+ -.10000000D+00 0.18041124D-15 0.74454847D+01 0.14859671D-01
+ 0.70776718D-15 0.10000000D+00 0.74510463D+01 0.26511240D-01
+ 0.10000000D+00 0.20000000D+00 0.74207309D+01 0.15795959D-01
+ 0.20000000D+00 0.30000000D+00 0.73580624D+01 0.17495772D-01
+ 0.30000000D+00 0.40000000D+00 0.73174482D+01 0.16158810D-01
+ 0.40000000D+00 0.50000000D+00 0.72601111D+01 0.15829457D-01
+ 0.50000000D+00 0.60000000D+00 0.71617944D+01 0.20780957D-01
+ 0.60000000D+00 0.70000000D+00 0.70163906D+01 0.19973709D-01
+ 0.70000000D+00 0.80000000D+00 0.69041331D+01 0.17453982D-01
+ 0.80000000D+00 0.90000000D+00 0.67722438D+01 0.16974741D-01
+ 0.90000000D+00 0.10000000D+01 0.66043503D+01 0.18747922D-01
+ 0.10000000D+01 0.11000000D+01 0.64048243D+01 0.15424453D-01
+ 0.11000000D+01 0.12000000D+01 0.62168091D+01 0.15286241D-01
+ 0.12000000D+01 0.13000000D+01 0.59893547D+01 0.14187461D-01
+ 0.13000000D+01 0.14000000D+01 0.57377986D+01 0.14697293D-01
+ 0.14000000D+01 0.15000000D+01 0.55089111D+01 0.14395384D-01
+ 0.15000000D+01 0.16000000D+01 0.52898538D+01 0.16752225D-01
+ 0.16000000D+01 0.17000000D+01 0.49899072D+01 0.13692885D-01
+ 0.17000000D+01 0.18000000D+01 0.47183076D+01 0.13598294D-01
+ 0.18000000D+01 0.19000000D+01 0.44264062D+01 0.11936531D-01
+ 0.19000000D+01 0.20000000D+01 0.41743033D+01 0.12557474D-01
+ 0.20000000D+01 0.21000000D+01 0.38516892D+01 0.11560478D-01
+ 0.21000000D+01 0.22000000D+01 0.35527023D+01 0.10653798D-01
+ 0.22000000D+01 0.23000000D+01 0.32553266D+01 0.12691973D-01
+ 0.23000000D+01 0.24000000D+01 0.29563489D+01 0.10843750D-01
+ 0.24000000D+01 0.25000000D+01 0.26876976D+01 0.14189561D-01
+ 0.25000000D+01 0.26000000D+01 0.24364211D+01 0.10522638D-01
+ 0.26000000D+01 0.27000000D+01 0.21293741D+01 0.77284425D-02
+ 0.27000000D+01 0.28000000D+01 0.18999109D+01 0.68879199D-02
+ 0.28000000D+01 0.29000000D+01 0.16558326D+01 0.81486526D-02
+ 0.29000000D+01 0.30000000D+01 0.14061315D+01 0.66796360D-02
+ 0.30000000D+01 0.31000000D+01 0.11972345D+01 0.60354499D-02
+ 0.31000000D+01 0.32000000D+01 0.10163847D+01 0.53971617D-02
+ 0.32000000D+01 0.33000000D+01 0.82711114D+00 0.47947952D-02
+ 0.33000000D+01 0.34000000D+01 0.67414652D+00 0.38652168D-02
+ 0.34000000D+01 0.35000000D+01 0.51582684D+00 0.32732383D-02
+ 0.35000000D+01 0.36000000D+01 0.39999943D+00 0.24398887D-02
+ 0.36000000D+01 0.37000000D+01 0.29604417D+00 0.20608457D-02
+ 0.37000000D+01 0.38000000D+01 0.20856085D+00 0.17732625D-02
+ 0.38000000D+01 0.39000000D+01 0.13662208D+00 0.90590522D-03
+ 0.39000000D+01 0.40000000D+01 0.85280318D-01 0.62081342D-03
+ 0.40000000D+01 0.41000000D+01 0.48634300D-01 0.34924950D-03
+ 0.41000000D+01 0.42000000D+01 0.24657266D-01 0.30480103D-03
+ 0.42000000D+01 0.43000000D+01 0.10556354D-01 0.99643890D-04
+ 0.43000000D+01 0.44000000D+01 0.37881096D-02 0.37912732D-04
+ 0.44000000D+01 0.45000000D+01 0.96487074D-03 0.15427588D-04
+ 0.45000000D+01 0.46000000D+01 0.11189796D-03 0.50700321D-05
+ 0.46000000D+01 0.47000000D+01 0.77864330D-06 0.48331439D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79558653D-06 0.48389919D-06
+ -.46000000D+01 -.45000000D+01 0.11488898D-03 0.50774215D-05
+ -.45000000D+01 -.44000000D+01 0.97481712D-03 0.15743982D-04
+ -.44000000D+01 -.43000000D+01 0.38508435D-02 0.39411819D-04
+ -.43000000D+01 -.42000000D+01 0.11153911D-01 0.91687539D-04
+ -.42000000D+01 -.41000000D+01 0.25360750D-01 0.18372997D-03
+ -.41000000D+01 -.40000000D+01 0.50467473D-01 0.37739194D-03
+ -.40000000D+01 -.39000000D+01 0.88265032D-01 0.68447793D-03
+ -.39000000D+01 -.38000000D+01 0.14516258D+00 0.89025756D-03
+ -.38000000D+01 -.37000000D+01 0.21552664D+00 0.13943917D-02
+ -.37000000D+01 -.36000000D+01 0.31136861D+00 0.18723687D-02
+ -.36000000D+01 -.35000000D+01 0.41820452D+00 0.28969926D-02
+ -.35000000D+01 -.34000000D+01 0.55838592D+00 0.29988222D-02
+ -.34000000D+01 -.33000000D+01 0.71163779D+00 0.41602719D-02
+ -.33000000D+01 -.32000000D+01 0.88265127D+00 0.42148144D-02
+ -.32000000D+01 -.31000000D+01 0.10746671D+01 0.50933104D-02
+ -.31000000D+01 -.30000000D+01 0.12887739D+01 0.63919423D-02
+ -.30000000D+01 -.29000000D+01 0.15300811D+01 0.70279840D-02
+ -.29000000D+01 -.28000000D+01 0.17578105D+01 0.11128906D-01
+ -.28000000D+01 -.27000000D+01 0.20083906D+01 0.96415824D-02
+ -.27000000D+01 -.26000000D+01 0.23095734D+01 0.79184348D-02
+ -.26000000D+01 -.25000000D+01 0.25928872D+01 0.89406614D-02
+ -.25000000D+01 -.24000000D+01 0.29076506D+01 0.14332758D-01
+ -.24000000D+01 -.23000000D+01 0.32117764D+01 0.99320696D-02
+ -.23000000D+01 -.22000000D+01 0.35137393D+01 0.10245314D-01
+ -.22000000D+01 -.21000000D+01 0.38465206D+01 0.11537636D-01
+ -.21000000D+01 -.20000000D+01 0.41569806D+01 0.11040924D-01
+ -.20000000D+01 -.19000000D+01 0.45038129D+01 0.12156971D-01
+ -.19000000D+01 -.18000000D+01 0.48183274D+01 0.12745720D-01
+ -.18000000D+01 -.17000000D+01 0.51258723D+01 0.12171007D-01
+ -.17000000D+01 -.16000000D+01 0.54210468D+01 0.13469726D-01
+ -.16000000D+01 -.15000000D+01 0.57090767D+01 0.13750168D-01
+ -.15000000D+01 -.14000000D+01 0.59936068D+01 0.16724473D-01
+ -.14000000D+01 -.13000000D+01 0.62928816D+01 0.14923574D-01
+ -.13000000D+01 -.12000000D+01 0.65352846D+01 0.14882667D-01
+ -.12000000D+01 -.11000000D+01 0.67873204D+01 0.14910542D-01
+ -.11000000D+01 -.10000000D+01 0.69854742D+01 0.15422553D-01
+ -.10000000D+01 -.90000000D+00 0.71873290D+01 0.15522981D-01
+ -.90000000D+00 -.80000000D+00 0.73748341D+01 0.15688103D-01
+ -.80000000D+00 -.70000000D+00 0.75306581D+01 0.14943668D-01
+ -.70000000D+00 -.60000000D+00 0.76586919D+01 0.16037880D-01
+ -.60000000D+00 -.50000000D+00 0.77778337D+01 0.15522804D-01
+ -.50000000D+00 -.40000000D+00 0.79272008D+01 0.16116597D-01
+ -.40000000D+00 -.30000000D+00 0.79982744D+01 0.26381004D-01
+ -.30000000D+00 -.20000000D+00 0.80334133D+01 0.17196270D-01
+ -.20000000D+00 -.10000000D+00 0.80860684D+01 0.16377282D-01
+ -.10000000D+00 0.18041124D-15 0.81182676D+01 0.14884962D-01
+ 0.70776718D-15 0.10000000D+00 0.81233843D+01 0.26526181D-01
+ 0.10000000D+00 0.20000000D+00 0.80913688D+01 0.15823822D-01
+ 0.20000000D+00 0.30000000D+00 0.80243816D+01 0.17521017D-01
+ 0.30000000D+00 0.40000000D+00 0.79782062D+01 0.16198592D-01
+ 0.40000000D+00 0.50000000D+00 0.79117566D+01 0.15886982D-01
+ 0.50000000D+00 0.60000000D+00 0.78045269D+01 0.20820341D-01
+ 0.60000000D+00 0.70000000D+00 0.76467556D+01 0.20009310D-01
+ 0.70000000D+00 0.80000000D+00 0.75217137D+01 0.17477053D-01
+ 0.80000000D+00 0.90000000D+00 0.73738343D+01 0.16995982D-01
+ 0.90000000D+00 0.10000000D+01 0.71886668D+01 0.18764411D-01
+ 0.10000000D+01 0.11000000D+01 0.69705750D+01 0.15447214D-01
+ 0.11000000D+01 0.12000000D+01 0.67623340D+01 0.15303290D-01
+ 0.12000000D+01 0.13000000D+01 0.65133021D+01 0.14207335D-01
+ 0.13000000D+01 0.14000000D+01 0.62384271D+01 0.14717387D-01
+ 0.14000000D+01 0.15000000D+01 0.59856722D+01 0.14415462D-01
+ 0.15000000D+01 0.16000000D+01 0.57417997D+01 0.16764819D-01
+ 0.16000000D+01 0.17000000D+01 0.54157829D+01 0.13711987D-01
+ 0.17000000D+01 0.18000000D+01 0.51178801D+01 0.13618352D-01
+ 0.18000000D+01 0.19000000D+01 0.47992434D+01 0.11946532D-01
+ 0.19000000D+01 0.20000000D+01 0.45200384D+01 0.12571760D-01
+ 0.20000000D+01 0.21000000D+01 0.41698929D+01 0.11575245D-01
+ 0.21000000D+01 0.22000000D+01 0.38435611D+01 0.10667585D-01
+ 0.22000000D+01 0.23000000D+01 0.35195747D+01 0.12699374D-01
+ 0.23000000D+01 0.24000000D+01 0.31947643D+01 0.10863942D-01
+ 0.24000000D+01 0.25000000D+01 0.29003409D+01 0.14205195D-01
+ 0.25000000D+01 0.26000000D+01 0.26247909D+01 0.10537153D-01
+ 0.26000000D+01 0.27000000D+01 0.22946170D+01 0.77460342D-02
+ 0.27000000D+01 0.28000000D+01 0.20431081D+01 0.68991187D-02
+ 0.28000000D+01 0.29000000D+01 0.17781695D+01 0.81658406D-02
+ 0.29000000D+01 0.30000000D+01 0.15094229D+01 0.66879556D-02
+ 0.30000000D+01 0.31000000D+01 0.12827124D+01 0.60419720D-02
+ 0.31000000D+01 0.32000000D+01 0.10862358D+01 0.54138997D-02
+ 0.32000000D+01 0.33000000D+01 0.88237696D+00 0.48113968D-02
+ 0.33000000D+01 0.34000000D+01 0.71723528D+00 0.38719800D-02
+ 0.34000000D+01 0.35000000D+01 0.54817279D+00 0.32776408D-02
+ 0.35000000D+01 0.36000000D+01 0.42347976D+00 0.24443998D-02
+ 0.36000000D+01 0.37000000D+01 0.31246618D+00 0.20646473D-02
+ 0.37000000D+01 0.38000000D+01 0.21933928D+00 0.17748216D-02
+ 0.38000000D+01 0.39000000D+01 0.14327045D+00 0.90693071D-03
+ 0.39000000D+01 0.40000000D+01 0.89082054D-01 0.62138733D-03
+ 0.40000000D+01 0.41000000D+01 0.50581995D-01 0.34952288D-03
+ 0.41000000D+01 0.42000000D+01 0.25534405D-01 0.30491252D-03
+ 0.42000000D+01 0.43000000D+01 0.10886414D-01 0.99683497D-04
+ 0.43000000D+01 0.44000000D+01 0.38839792D-02 0.37925254D-04
+ 0.44000000D+01 0.45000000D+01 0.98278158D-03 0.15431739D-04
+ 0.45000000D+01 0.46000000D+01 0.11314860D-03 0.50700801D-05
+ 0.46000000D+01 0.47000000D+01 0.78066888D-06 0.48331445D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79669808D-06 0.48389933D-06
+ -.46000000D+01 -.45000000D+01 0.11561123D-03 0.50774584D-05
+ -.45000000D+01 -.44000000D+01 0.98560154D-03 0.15745026D-04
+ -.44000000D+01 -.43000000D+01 0.39106752D-02 0.39419320D-04
+ -.43000000D+01 -.42000000D+01 0.11365252D-01 0.91715020D-04
+ -.42000000D+01 -.41000000D+01 0.25935275D-01 0.18380961D-03
+ -.41000000D+01 -.40000000D+01 0.51771082D-01 0.37756142D-03
+ -.40000000D+01 -.39000000D+01 0.90852690D-01 0.68502538D-03
+ -.39000000D+01 -.38000000D+01 0.14983582D+00 0.90192324D-03
+ -.38000000D+01 -.37000000D+01 0.22305821D+00 0.14016111D-02
+ -.37000000D+01 -.36000000D+01 0.32305244D+00 0.18734597D-02
+ -.36000000D+01 -.35000000D+01 0.43522647D+00 0.28988000D-02
+ -.35000000D+01 -.34000000D+01 0.58211555D+00 0.30023372D-02
+ -.34000000D+01 -.33000000D+01 0.74356318D+00 0.41640440D-02
+ -.33000000D+01 -.32000000D+01 0.92416094D+00 0.42210427D-02
+ -.32000000D+01 -.31000000D+01 0.11272304D+01 0.50998482D-02
+ -.31000000D+01 -.30000000D+01 0.13540321D+01 0.63980518D-02
+ -.30000000D+01 -.29000000D+01 0.16094067D+01 0.70354546D-02
+ -.29000000D+01 -.28000000D+01 0.18526040D+01 0.11132949D-01
+ -.28000000D+01 -.27000000D+01 0.21198309D+01 0.96513025D-02
+ -.27000000D+01 -.26000000D+01 0.24391849D+01 0.79334864D-02
+ -.26000000D+01 -.25000000D+01 0.27413892D+01 0.89510749D-02
+ -.25000000D+01 -.24000000D+01 0.30756015D+01 0.14431356D-01
+ -.24000000D+01 -.23000000D+01 0.34016456D+01 0.10061798D-01
+ -.23000000D+01 -.22000000D+01 0.37247762D+01 0.10265613D-01
+ -.22000000D+01 -.21000000D+01 0.40795989D+01 0.11546573D-01
+ -.21000000D+01 -.20000000D+01 0.44131189D+01 0.11053159D-01
+ -.20000000D+01 -.19000000D+01 0.47826482D+01 0.12167654D-01
+ -.19000000D+01 -.18000000D+01 0.51200609D+01 0.12757929D-01
+ -.18000000D+01 -.17000000D+01 0.54499979D+01 0.12185985D-01
+ -.17000000D+01 -.16000000D+01 0.57677831D+01 0.13478955D-01
+ -.16000000D+01 -.15000000D+01 0.60778397D+01 0.13763598D-01
+ -.15000000D+01 -.14000000D+01 0.63831914D+01 0.16735858D-01
+ -.14000000D+01 -.13000000D+01 0.67033480D+01 0.14958067D-01
+ -.13000000D+01 -.12000000D+01 0.69649130D+01 0.14913817D-01
+ -.12000000D+01 -.11000000D+01 0.72357192D+01 0.14931548D-01
+ -.11000000D+01 -.10000000D+01 0.74510522D+01 0.15441011D-01
+ -.10000000D+01 -.90000000D+00 0.76690801D+01 0.15544935D-01
+ -.90000000D+00 -.80000000D+00 0.78712930D+01 0.15720506D-01
+ -.80000000D+00 -.70000000D+00 0.80407145D+01 0.14979121D-01
+ -.70000000D+00 -.60000000D+00 0.81800803D+01 0.16057144D-01
+ -.60000000D+00 -.50000000D+00 0.83093965D+01 0.15624327D-01
+ -.50000000D+00 -.40000000D+00 0.84682711D+01 0.16218074D-01
+ -.40000000D+00 -.30000000D+00 0.85447318D+01 0.26515323D-01
+ -.30000000D+00 -.20000000D+00 0.85865218D+01 0.17407808D-01
+ -.20000000D+00 -.10000000D+00 0.86422028D+01 0.16408822D-01
+ -.10000000D+00 0.18041124D-15 0.86764258D+01 0.14905257D-01
+ 0.70776718D-15 0.10000000D+00 0.86811590D+01 0.26536665D-01
+ 0.10000000D+00 0.20000000D+00 0.86475469D+01 0.15847284D-01
+ 0.20000000D+00 0.30000000D+00 0.85769467D+01 0.17541336D-01
+ 0.30000000D+00 0.40000000D+00 0.85261660D+01 0.16253625D-01
+ 0.40000000D+00 0.50000000D+00 0.84514245D+01 0.15953210D-01
+ 0.50000000D+00 0.60000000D+00 0.83366420D+01 0.20850098D-01
+ 0.60000000D+00 0.70000000D+00 0.81681606D+01 0.20034801D-01
+ 0.70000000D+00 0.80000000D+00 0.80320624D+01 0.17500162D-01
+ 0.80000000D+00 0.90000000D+00 0.78704398D+01 0.17015810D-01
+ 0.90000000D+00 0.10000000D+01 0.76704410D+01 0.18778143D-01
+ 0.10000000D+01 0.11000000D+01 0.74363372D+01 0.15464741D-01
+ 0.11000000D+01 0.12000000D+01 0.72106542D+01 0.15317010D-01
+ 0.12000000D+01 0.13000000D+01 0.69431933D+01 0.14223631D-01
+ 0.13000000D+01 0.14000000D+01 0.66486094D+01 0.14732799D-01
+ 0.14000000D+01 0.15000000D+01 0.63753447D+01 0.14431151D-01
+ 0.15000000D+01 0.16000000D+01 0.61104542D+01 0.16777153D-01
+ 0.16000000D+01 0.17000000D+01 0.57623039D+01 0.13729258D-01
+ 0.17000000D+01 0.18000000D+01 0.54421620D+01 0.13634422D-01
+ 0.18000000D+01 0.19000000D+01 0.51010369D+01 0.11954687D-01
+ 0.19000000D+01 0.20000000D+01 0.47989748D+01 0.12582397D-01
+ 0.20000000D+01 0.21000000D+01 0.44257300D+01 0.11586064D-01
+ 0.21000000D+01 0.22000000D+01 0.40766955D+01 0.10677832D-01
+ 0.22000000D+01 0.23000000D+01 0.37306788D+01 0.12703347D-01
+ 0.23000000D+01 0.24000000D+01 0.33843982D+01 0.10881536D-01
+ 0.24000000D+01 0.25000000D+01 0.30686806D+01 0.14219684D-01
+ 0.25000000D+01 0.26000000D+01 0.27732443D+01 0.10548242D-01
+ 0.26000000D+01 0.27000000D+01 0.24241108D+01 0.77599941D-02
+ 0.27000000D+01 0.28000000D+01 0.21547170D+01 0.69088621D-02
+ 0.28000000D+01 0.29000000D+01 0.18728189D+01 0.81812655D-02
+ 0.29000000D+01 0.30000000D+01 0.15888310D+01 0.66952218D-02
+ 0.30000000D+01 0.31000000D+01 0.13478897D+01 0.60466409D-02
+ 0.31000000D+01 0.32000000D+01 0.11391100D+01 0.54328123D-02
+ 0.32000000D+01 0.33000000D+01 0.92372765D+00 0.48308919D-02
+ 0.33000000D+01 0.34000000D+01 0.74919302D+00 0.38778418D-02
+ 0.34000000D+01 0.35000000D+01 0.57188034D+00 0.32815144D-02
+ 0.35000000D+01 0.36000000D+01 0.44046838D+00 0.24487271D-02
+ 0.36000000D+01 0.37000000D+01 0.32420940D+00 0.20686418D-02
+ 0.37000000D+01 0.38000000D+01 0.22692509D+00 0.17758428D-02
+ 0.38000000D+01 0.39000000D+01 0.14787713D+00 0.90766776D-03
+ 0.39000000D+01 0.40000000D+01 0.91671485D-01 0.62174845D-03
+ 0.40000000D+01 0.41000000D+01 0.51884557D-01 0.34968542D-03
+ 0.41000000D+01 0.42000000D+01 0.26109176D-01 0.30498268D-03
+ 0.42000000D+01 0.43000000D+01 0.11097862D-01 0.99706147D-04
+ 0.43000000D+01 0.44000000D+01 0.39437660D-02 0.37932617D-04
+ 0.44000000D+01 0.45000000D+01 0.99357938D-03 0.15434550D-04
+ 0.45000000D+01 0.46000000D+01 0.11387146D-03 0.50701058D-05
+ 0.46000000D+01 0.47000000D+01 0.78176851D-06 0.48331448D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.79722721D-06 0.48389939D-06
+ -.46000000D+01 -.45000000D+01 0.11596858D-03 0.50774763D-05
+ -.45000000D+01 -.44000000D+01 0.99109591D-03 0.15745535D-04
+ -.44000000D+01 -.43000000D+01 0.39419488D-02 0.39422999D-04
+ -.43000000D+01 -.42000000D+01 0.11478125D-01 0.91729215D-04
+ -.42000000D+01 -.41000000D+01 0.26247995D-01 0.18385093D-03
+ -.41000000D+01 -.40000000D+01 0.52493722D-01 0.37764975D-03
+ -.40000000D+01 -.39000000D+01 0.92310894D-01 0.68531159D-03
+ -.39000000D+01 -.38000000D+01 0.15252653D+00 0.91420576D-03
+ -.38000000D+01 -.37000000D+01 0.22741876D+00 0.14091881D-02
+ -.37000000D+01 -.36000000D+01 0.32993980D+00 0.18740297D-02
+ -.36000000D+01 -.35000000D+01 0.44539186D+00 0.28998373D-02
+ -.35000000D+01 -.34000000D+01 0.59646461D+00 0.30044614D-02
+ -.34000000D+01 -.33000000D+01 0.76309815D+00 0.41661182D-02
+ -.33000000D+01 -.32000000D+01 0.94984772D+00 0.42256486D-02
+ -.32000000D+01 -.31000000D+01 0.11600450D+01 0.51042502D-02
+ -.31000000D+01 -.30000000D+01 0.13952014D+01 0.64015445D-02
+ -.30000000D+01 -.29000000D+01 0.16598467D+01 0.70398392D-02
+ -.29000000D+01 -.28000000D+01 0.19133686D+01 0.11135316D-01
+ -.28000000D+01 -.27000000D+01 0.21918191D+01 0.96570598D-02
+ -.27000000D+01 -.26000000D+01 0.25234401D+01 0.79427980D-02
+ -.26000000D+01 -.25000000D+01 0.28385493D+01 0.89580098D-02
+ -.25000000D+01 -.24000000D+01 0.31860637D+01 0.14515189D-01
+ -.24000000D+01 -.23000000D+01 0.35272491D+01 0.10176991D-01
+ -.23000000D+01 -.22000000D+01 0.38650927D+01 0.10279407D-01
+ -.22000000D+01 -.21000000D+01 0.42352359D+01 0.11552844D-01
+ -.21000000D+01 -.20000000D+01 0.45848163D+01 0.11061917D-01
+ -.20000000D+01 -.19000000D+01 0.49702074D+01 0.12175915D-01
+ -.19000000D+01 -.18000000D+01 0.53238172D+01 0.12766474D-01
+ -.18000000D+01 -.17000000D+01 0.56695832D+01 0.12196853D-01
+ -.17000000D+01 -.16000000D+01 0.60034433D+01 0.13485845D-01
+ -.16000000D+01 -.15000000D+01 0.63292385D+01 0.13772610D-01
+ -.15000000D+01 -.14000000D+01 0.66493692D+01 0.16743750D-01
+ -.14000000D+01 -.13000000D+01 0.69846075D+01 0.14987494D-01
+ -.13000000D+01 -.12000000D+01 0.72599001D+01 0.14944189D-01
+ -.12000000D+01 -.11000000D+01 0.75440820D+01 0.14950328D-01
+ -.11000000D+01 -.10000000D+01 0.77718732D+01 0.15453522D-01
+ -.10000000D+01 -.90000000D+00 0.80017314D+01 0.15558764D-01
+ -.90000000D+00 -.80000000D+00 0.82146391D+01 0.15743267D-01
+ -.80000000D+00 -.70000000D+00 0.83938474D+01 0.15003880D-01
+ -.70000000D+00 -.60000000D+00 0.85413471D+01 0.16072091D-01
+ -.60000000D+00 -.50000000D+00 0.86783327D+01 0.15700804D-01
+ -.50000000D+00 -.40000000D+00 0.88439372D+01 0.16293398D-01
+ -.40000000D+00 -.30000000D+00 0.89245196D+01 0.26607367D-01
+ -.30000000D+00 -.20000000D+00 0.89709813D+01 0.17551912D-01
+ -.20000000D+00 -.10000000D+00 0.90288767D+01 0.16431600D-01
+ -.10000000D+00 0.18041124D-15 0.90646584D+01 0.14919281D-01
+ 0.70776718D-15 0.10000000D+00 0.90691087D+01 0.26543594D-01
+ 0.10000000D+00 0.20000000D+00 0.90342537D+01 0.15864347D-01
+ 0.20000000D+00 0.30000000D+00 0.89610778D+01 0.17555722D-01
+ 0.30000000D+00 0.40000000D+00 0.89071554D+01 0.16322707D-01
+ 0.40000000D+00 0.50000000D+00 0.88259958D+01 0.16026602D-01
+ 0.50000000D+00 0.60000000D+00 0.87058452D+01 0.20868715D-01
+ 0.60000000D+00 0.70000000D+00 0.85295719D+01 0.20050583D-01
+ 0.70000000D+00 0.80000000D+00 0.83853111D+01 0.17518881D-01
+ 0.80000000D+00 0.90000000D+00 0.82138203D+01 0.17031561D-01
+ 0.90000000D+00 0.10000000D+01 0.80031052D+01 0.18788491D-01
+ 0.10000000D+01 0.11000000D+01 0.77573504D+01 0.15476861D-01
+ 0.11000000D+01 0.12000000D+01 0.75190284D+01 0.15327314D-01
+ 0.12000000D+01 0.13000000D+01 0.72382681D+01 0.14235188D-01
+ 0.13000000D+01 0.14000000D+01 0.69297162D+01 0.14743273D-01
+ 0.14000000D+01 0.15000000D+01 0.66415975D+01 0.14442262D-01
+ 0.15000000D+01 0.16000000D+01 0.63617379D+01 0.16787877D-01
+ 0.16000000D+01 0.17000000D+01 0.59977890D+01 0.13742203D-01
+ 0.17000000D+01 0.18000000D+01 0.56618692D+01 0.13645766D-01
+ 0.18000000D+01 0.19000000D+01 0.53048639D+01 0.11960964D-01
+ 0.19000000D+01 0.20000000D+01 0.49866529D+01 0.12589322D-01
+ 0.20000000D+01 0.21000000D+01 0.45971700D+01 0.11592759D-01
+ 0.21000000D+01 0.22000000D+01 0.42323296D+01 0.10684561D-01
+ 0.22000000D+01 0.23000000D+01 0.38710342D+01 0.12704821D-01
+ 0.23000000D+01 0.24000000D+01 0.35098299D+01 0.10893501D-01
+ 0.24000000D+01 0.25000000D+01 0.31794379D+01 0.14229861D-01
+ 0.25000000D+01 0.26000000D+01 0.28703957D+01 0.10555108D-01
+ 0.26000000D+01 0.27000000D+01 0.25082912D+01 0.77690241D-02
+ 0.27000000D+01 0.28000000D+01 0.22268246D+01 0.69164349D-02
+ 0.28000000D+01 0.29000000D+01 0.19334749D+01 0.81928414D-02
+ 0.29000000D+01 0.30000000D+01 0.16393427D+01 0.67005877D-02
+ 0.30000000D+01 0.31000000D+01 0.13889875D+01 0.60494244D-02
+ 0.31000000D+01 0.32000000D+01 0.11721675D+01 0.54480708D-02
+ 0.32000000D+01 0.33000000D+01 0.94928695D+00 0.48469453D-02
+ 0.33000000D+01 0.34000000D+01 0.76874780D+00 0.38818615D-02
+ 0.34000000D+01 0.35000000D+01 0.58621904D+00 0.32842585D-02
+ 0.35000000D+01 0.36000000D+01 0.45060961D+00 0.24519840D-02
+ 0.36000000D+01 0.37000000D+01 0.33113485D+00 0.20717967D-02
+ 0.37000000D+01 0.38000000D+01 0.23133202D+00 0.17764038D-02
+ 0.38000000D+01 0.39000000D+01 0.15051428D+00 0.90809887D-03
+ 0.39000000D+01 0.40000000D+01 0.93130330D-01 0.62194028D-03
+ 0.40000000D+01 0.41000000D+01 0.52606500D-01 0.34976866D-03
+ 0.41000000D+01 0.42000000D+01 0.26422143D-01 0.30502016D-03
+ 0.42000000D+01 0.43000000D+01 0.11210822D-01 0.99717295D-04
+ 0.43000000D+01 0.44000000D+01 0.39750205D-02 0.37936322D-04
+ 0.44000000D+01 0.45000000D+01 0.99908124D-03 0.15436079D-04
+ 0.45000000D+01 0.46000000D+01 0.11422917D-03 0.50701179D-05
+ 0.46000000D+01 0.47000000D+01 0.78229203D-06 0.48331449D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 -.26385831D+01 0.42246259D-02
+ 0.30000000D+01 0.60000000D+01 0.19151085D+01 0.25416078D-02
+ 0.60000000D+01 0.90000000D+01 0.20471750D+01 0.14120409D-02
+ 0.90000000D+01 0.12000000D+02 0.16225730D+01 0.11390746D-02
+ 0.12000000D+02 0.15000000D+02 0.12834905D+01 0.97357213D-03
+ 0.15000000D+02 0.18000000D+02 0.10377607D+01 0.91559815D-03
+ 0.18000000D+02 0.21000000D+02 0.85617621D+00 0.93320537D-03
+ 0.21000000D+02 0.24000000D+02 0.71859190D+00 0.95827563D-03
+ 0.24000000D+02 0.27000000D+02 0.61367914D+00 0.88614211D-03
+ 0.27000000D+02 0.30000000D+02 0.53093224D+00 0.77668056D-03
+ 0.30000000D+02 0.33000000D+02 0.46282594D+00 0.66417112D-03
+ 0.33000000D+02 0.36000000D+02 0.40709213D+00 0.69120977D-03
+ 0.36000000D+02 0.39000000D+02 0.36083452D+00 0.79900754D-03
+ 0.39000000D+02 0.42000000D+02 0.32195565D+00 0.69336493D-03
+ 0.42000000D+02 0.45000000D+02 0.28870606D+00 0.54040242D-03
+ 0.45000000D+02 0.48000000D+02 0.26036559D+00 0.49897966D-03
+ 0.48000000D+02 0.51000000D+02 0.23530663D+00 0.65923773D-03
+ 0.51000000D+02 0.54000000D+02 0.21463831D+00 0.75404275D-03
+ 0.54000000D+02 0.57000000D+02 0.19471130D+00 0.60125003D-03
+ 0.57000000D+02 0.60000000D+02 0.17746298D+00 0.44051408D-03
+ 0.60000000D+02 0.63000000D+02 0.16328843D+00 0.35499829D-03
+ 0.63000000D+02 0.66000000D+02 0.14977319D+00 0.38363140D-03
+ 0.66000000D+02 0.69000000D+02 0.13729175D+00 0.38364370D-03
+ 0.69000000D+02 0.72000000D+02 0.12712960D+00 0.38056482D-03
+ 0.72000000D+02 0.75000000D+02 0.11681986D+00 0.51313506D-03
+ 0.75000000D+02 0.78000000D+02 0.10937719D+00 0.46958398D-03
+ 0.78000000D+02 0.81000000D+02 0.10042141D+00 0.28079721D-03
+ 0.81000000D+02 0.84000000D+02 0.93279467D-01 0.36389471D-03
+ 0.84000000D+02 0.87000000D+02 0.86343129D-01 0.36811999D-03
+ 0.87000000D+02 0.90000000D+02 0.80913169D-01 0.63605207D-03
+ 0.90000000D+02 0.93000000D+02 0.74313313D-01 0.62899101D-03
+ 0.93000000D+02 0.96000000D+02 0.69927533D-01 0.23921378D-03
+ 0.96000000D+02 0.99000000D+02 0.65464300D-01 0.28833386D-03
+ 0.99000000D+02 0.10200000D+03 0.61064577D-01 0.27803530D-03
+ 0.10200000D+03 0.10500000D+03 0.56985844D-01 0.23639632D-03
+ 0.10500000D+03 0.10800000D+03 0.53556790D-01 0.27249306D-03
+ 0.10800000D+03 0.11100000D+03 0.49683833D-01 0.25298038D-03
+ 0.11100000D+03 0.11400000D+03 0.47002045D-01 0.19736972D-03
+ 0.11400000D+03 0.11700000D+03 0.43832266D-01 0.27888400D-03
+ 0.11700000D+03 0.12000000D+03 0.41286634D-01 0.27291351D-03
+ 0.12000000D+03 0.12300000D+03 0.38729928D-01 0.17064288D-03
+ 0.12300000D+03 0.12600000D+03 0.36796285D-01 0.14484908D-03
+ 0.12600000D+03 0.12900000D+03 0.34506531D-01 0.17817609D-03
+ 0.12900000D+03 0.13200000D+03 0.31965227D-01 0.18441835D-03
+ 0.13200000D+03 0.13500000D+03 0.30667397D-01 0.15793418D-03
+ 0.13500000D+03 0.13800000D+03 0.28765476D-01 0.13841616D-03
+ 0.13800000D+03 0.14100000D+03 0.27371760D-01 0.17907345D-03
+ 0.14100000D+03 0.14400000D+03 0.25774507D-01 0.20539405D-03
+ 0.14400000D+03 0.14700000D+03 0.24360294D-01 0.22822592D-03
+ 0.14700000D+03 0.15000000D+03 0.22844482D-01 0.21374446D-03
+ 0.15000000D+03 0.15300000D+03 0.21525808D-01 0.14267017D-03
+ 0.15300000D+03 0.15600000D+03 0.21001061D-01 0.36432175D-03
+ 0.15600000D+03 0.15900000D+03 0.19329779D-01 0.35978483D-03
+ 0.15900000D+03 0.16200000D+03 0.17876436D-01 0.40393883D-03
+ 0.16200000D+03 0.16500000D+03 0.17970430D-01 0.40340584D-03
+ 0.16500000D+03 0.16800000D+03 0.16400466D-01 0.18503796D-03
+ 0.16800000D+03 0.17100000D+03 0.15549894D-01 0.23415542D-03
+ 0.17100000D+03 0.17400000D+03 0.15403690D-01 0.20689244D-03
+ 0.17400000D+03 0.17700000D+03 0.13900056D-01 0.38445717D-03
+ 0.17700000D+03 0.18000000D+03 0.13692531D-01 0.37166625D-03
+ 0.18000000D+03 0.18300000D+03 0.12624918D-01 0.11219093D-03
+ 0.18300000D+03 0.18600000D+03 0.12108309D-01 0.10918943D-03
+ 0.18600000D+03 0.18900000D+03 0.11506828D-01 0.84033575D-04
+ 0.18900000D+03 0.19200000D+03 0.10939757D-01 0.77233452D-04
+ 0.19200000D+03 0.19500000D+03 0.10328065D-01 0.85377290D-04
+ 0.19500000D+03 0.19800000D+03 0.10011548D-01 0.95177694D-04
+ 0.19800000D+03 0.20100000D+03 0.95040217D-02 0.13857278D-03
+ 0.20100000D+03 0.20400000D+03 0.88596580D-02 0.12595543D-03
+ 0.20400000D+03 0.20700000D+03 0.85002185D-02 0.65083595D-04
+ 0.20700000D+03 0.21000000D+03 0.82962309D-02 0.10939047D-03
+ 0.21000000D+03 0.21300000D+03 0.75065216D-02 0.14304377D-03
+ 0.21300000D+03 0.21600000D+03 0.73843816D-02 0.12225035D-03
+ 0.21600000D+03 0.21900000D+03 0.71371154D-02 0.78196966D-04
+ 0.21900000D+03 0.22200000D+03 0.70506849D-02 0.32549955D-03
+ 0.22200000D+03 0.22500000D+03 0.59895597D-02 0.32484401D-03
+ 0.22500000D+03 0.22800000D+03 0.60329445D-02 0.61625497D-04
+ 0.22800000D+03 0.23100000D+03 0.58499571D-02 0.69723972D-04
+ 0.23100000D+03 0.23400000D+03 0.55856018D-02 0.66825225D-04
+ 0.23400000D+03 0.23700000D+03 0.51701849D-02 0.65298563D-04
+ 0.23700000D+03 0.24000000D+03 0.51172679D-02 0.61896973D-04
+ 0.24000000D+03 0.24300000D+03 0.47632468D-02 0.48016590D-04
+ 0.24300000D+03 0.24600000D+03 0.44910097D-02 0.79628993D-04
+ 0.24600000D+03 0.24900000D+03 0.45922961D-02 0.81264231D-04
+ 0.24900000D+03 0.25200000D+03 0.41347058D-02 0.49656412D-04
+ 0.25200000D+03 0.25500000D+03 0.39767838D-02 0.48207039D-04
+ 0.25500000D+03 0.25800000D+03 0.38156239D-02 0.40788635D-04
+ 0.25800000D+03 0.26100000D+03 0.36327693D-02 0.42590187D-04
+ 0.26100000D+03 0.26400000D+03 0.34707252D-02 0.71686761D-04
+ 0.26400000D+03 0.26700000D+03 0.34826099D-02 0.69213048D-04
+ 0.26700000D+03 0.27000000D+03 0.32036412D-02 0.46474559D-04
+ 0.27000000D+03 0.27300000D+03 0.30123122D-02 0.70941615D-04
+ 0.27300000D+03 0.27600000D+03 0.29133226D-02 0.68052465D-04
+ 0.27600000D+03 0.27900000D+03 0.27715059D-02 0.60364511D-04
+ 0.27900000D+03 0.28200000D+03 0.30548526D-02 0.30086088D-03
+ 0.28200000D+03 0.28500000D+03 0.23137341D-02 0.29789152D-03
+ 0.28500000D+03 0.28800000D+03 0.23520440D-02 0.64894221D-04
+ 0.28800000D+03 0.29100000D+03 0.24624611D-02 0.65226698D-04
+ 0.29100000D+03 0.29400000D+03 0.22992850D-02 0.39031663D-04
+ 0.29400000D+03 0.29700000D+03 0.21298726D-02 0.48513008D-04
+ 0.29700000D+03 0.30000000D+03 0.20293395D-02 0.48814320D-04
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 -.26375477D+01 0.42238190D-02
+ 0.30000000D+01 0.60000000D+01 0.19123525D+01 0.25392782D-02
+ 0.60000000D+01 0.90000000D+01 0.20398404D+01 0.14071717D-02
+ 0.90000000D+01 0.12000000D+02 0.16112614D+01 0.11313809D-02
+ 0.12000000D+02 0.15000000D+02 0.12687553D+01 0.96241457D-03
+ 0.15000000D+02 0.18000000D+02 0.10200466D+01 0.89986322D-03
+ 0.18000000D+02 0.21000000D+02 0.83588901D+00 0.91066231D-03
+ 0.21000000D+02 0.24000000D+02 0.69609186D+00 0.92817930D-03
+ 0.24000000D+02 0.27000000D+02 0.58921489D+00 0.85119812D-03
+ 0.27000000D+02 0.30000000D+02 0.50474117D+00 0.73873420D-03
+ 0.30000000D+02 0.33000000D+02 0.43522415D+00 0.62509432D-03
+ 0.33000000D+02 0.36000000D+02 0.37830475D+00 0.64127290D-03
+ 0.36000000D+02 0.39000000D+02 0.33106794D+00 0.73260376D-03
+ 0.39000000D+02 0.42000000D+02 0.29139445D+00 0.62932049D-03
+ 0.42000000D+02 0.45000000D+02 0.25754330D+00 0.48199177D-03
+ 0.45000000D+02 0.48000000D+02 0.22873553D+00 0.43882894D-03
+ 0.48000000D+02 0.51000000D+02 0.20343256D+00 0.56749139D-03
+ 0.51000000D+02 0.54000000D+02 0.18246968D+00 0.64184747D-03
+ 0.54000000D+02 0.57000000D+02 0.16265758D+00 0.50361257D-03
+ 0.57000000D+02 0.60000000D+02 0.14559305D+00 0.36240838D-03
+ 0.60000000D+02 0.63000000D+02 0.13148358D+00 0.28601798D-03
+ 0.63000000D+02 0.66000000D+02 0.11829450D+00 0.30241182D-03
+ 0.66000000D+02 0.69000000D+02 0.10631374D+00 0.29757500D-03
+ 0.69000000D+02 0.72000000D+02 0.96467413D-01 0.28817897D-03
+ 0.72000000D+02 0.75000000D+02 0.86827278D-01 0.38003690D-03
+ 0.75000000D+02 0.78000000D+02 0.79588582D-01 0.34370401D-03
+ 0.78000000D+02 0.81000000D+02 0.71508927D-01 0.20041042D-03
+ 0.81000000D+02 0.84000000D+02 0.64981676D-01 0.25199897D-03
+ 0.84000000D+02 0.87000000D+02 0.58829283D-01 0.25220501D-03
+ 0.87000000D+02 0.90000000D+02 0.53903200D-01 0.41967103D-03
+ 0.90000000D+02 0.93000000D+02 0.48393652D-01 0.41366737D-03
+ 0.93000000D+02 0.96000000D+02 0.44506685D-01 0.15192851D-03
+ 0.96000000D+02 0.99000000D+02 0.40709375D-01 0.17884971D-03
+ 0.99000000D+02 0.10200000D+03 0.37094073D-01 0.16945851D-03
+ 0.10200000D+03 0.10500000D+03 0.33812976D-01 0.14022200D-03
+ 0.10500000D+03 0.10800000D+03 0.31033216D-01 0.15747624D-03
+ 0.10800000D+03 0.11100000D+03 0.28113884D-01 0.14387374D-03
+ 0.11100000D+03 0.11400000D+03 0.25971192D-01 0.10893952D-03
+ 0.11400000D+03 0.11700000D+03 0.23647124D-01 0.14964094D-03
+ 0.11700000D+03 0.12000000D+03 0.21747479D-01 0.14464030D-03
+ 0.12000000D+03 0.12300000D+03 0.19917879D-01 0.87921050D-04
+ 0.12300000D+03 0.12600000D+03 0.18474565D-01 0.72813873D-04
+ 0.12600000D+03 0.12900000D+03 0.16911930D-01 0.86906189D-04
+ 0.12900000D+03 0.13200000D+03 0.15296768D-01 0.88587289D-04
+ 0.13200000D+03 0.13500000D+03 0.14329765D-01 0.73733485D-04
+ 0.13500000D+03 0.13800000D+03 0.13122412D-01 0.63433125D-04
+ 0.13800000D+03 0.14100000D+03 0.12191097D-01 0.79159321D-04
+ 0.14100000D+03 0.14400000D+03 0.11208789D-01 0.89585653D-04
+ 0.14400000D+03 0.14700000D+03 0.10343731D-01 0.96479812D-04
+ 0.14700000D+03 0.15000000D+03 0.94736688D-02 0.89276007D-04
+ 0.15000000D+03 0.15300000D+03 0.87201130D-02 0.57742954D-04
+ 0.15300000D+03 0.15600000D+03 0.83091451D-02 0.14273554D-03
+ 0.15600000D+03 0.15900000D+03 0.74696726D-02 0.14048879D-03
+ 0.15900000D+03 0.16200000D+03 0.67517930D-02 0.15092793D-03
+ 0.16200000D+03 0.16500000D+03 0.66319294D-02 0.15038437D-03
+ 0.16500000D+03 0.16800000D+03 0.59133486D-02 0.66240379D-04
+ 0.16800000D+03 0.17100000D+03 0.54807467D-02 0.82490999D-04
+ 0.17100000D+03 0.17400000D+03 0.53045879D-02 0.71477964D-04
+ 0.17400000D+03 0.17700000D+03 0.46787672D-02 0.12823730D-03
+ 0.17700000D+03 0.18000000D+03 0.45060279D-02 0.12357113D-03
+ 0.18000000D+03 0.18300000D+03 0.40616452D-02 0.36046880D-04
+ 0.18300000D+03 0.18600000D+03 0.38097746D-02 0.34424304D-04
+ 0.18600000D+03 0.18900000D+03 0.35408598D-02 0.25961913D-04
+ 0.18900000D+03 0.19200000D+03 0.32930561D-02 0.23186156D-04
+ 0.19200000D+03 0.19500000D+03 0.30417609D-02 0.25144854D-04
+ 0.19500000D+03 0.19800000D+03 0.28848019D-02 0.27369861D-04
+ 0.19800000D+03 0.20100000D+03 0.26792763D-02 0.38876406D-04
+ 0.20100000D+03 0.20400000D+03 0.24444003D-02 0.35021939D-04
+ 0.20400000D+03 0.20700000D+03 0.22960640D-02 0.17582553D-04
+ 0.20700000D+03 0.21000000D+03 0.21934859D-02 0.28731208D-04
+ 0.21000000D+03 0.21300000D+03 0.19431660D-02 0.37029241D-04
+ 0.21300000D+03 0.21600000D+03 0.18727575D-02 0.31120324D-04
+ 0.21600000D+03 0.21900000D+03 0.17725304D-02 0.19497105D-04
+ 0.21900000D+03 0.22200000D+03 0.17138863D-02 0.78384714D-04
+ 0.22200000D+03 0.22500000D+03 0.14262560D-02 0.78175977D-04
+ 0.22500000D+03 0.22800000D+03 0.14086583D-02 0.14355772D-04
+ 0.22800000D+03 0.23100000D+03 0.13386426D-02 0.15947857D-04
+ 0.23100000D+03 0.23400000D+03 0.12526801D-02 0.15006720D-04
+ 0.23400000D+03 0.23700000D+03 0.11366312D-02 0.14339663D-04
+ 0.23700000D+03 0.24000000D+03 0.11027763D-02 0.13369077D-04
+ 0.24000000D+03 0.24300000D+03 0.10066004D-02 0.10170300D-04
+ 0.24300000D+03 0.24600000D+03 0.93090865D-03 0.16387110D-04
+ 0.24600000D+03 0.24900000D+03 0.93350526D-03 0.16620430D-04
+ 0.24900000D+03 0.25200000D+03 0.82426075D-03 0.98939276D-05
+ 0.25200000D+03 0.25500000D+03 0.77794615D-03 0.94422535D-05
+ 0.25500000D+03 0.25800000D+03 0.73242082D-03 0.78433311D-05
+ 0.25800000D+03 0.26100000D+03 0.68440702D-03 0.80000611D-05
+ 0.26100000D+03 0.26400000D+03 0.64194794D-03 0.13193364D-04
+ 0.26400000D+03 0.26700000D+03 0.63203111D-03 0.12625866D-04
+ 0.26700000D+03 0.27000000D+03 0.57045632D-03 0.82669436D-05
+ 0.27000000D+03 0.27300000D+03 0.52687242D-03 0.12352757D-04
+ 0.27300000D+03 0.27600000D+03 0.50046864D-03 0.11756420D-04
+ 0.27600000D+03 0.27900000D+03 0.46765657D-03 0.10133071D-04
+ 0.27900000D+03 0.28200000D+03 0.50582565D-03 0.49434391D-04
+ 0.28200000D+03 0.28500000D+03 0.37615109D-03 0.48908922D-04
+ 0.28500000D+03 0.28800000D+03 0.37623133D-03 0.10331243D-04
+ 0.28800000D+03 0.29100000D+03 0.38705292D-03 0.10293501D-04
+ 0.29100000D+03 0.29400000D+03 0.35500081D-03 0.60465045D-05
+ 0.29400000D+03 0.29700000D+03 0.32321729D-03 0.73278084D-05
+ 0.29700000D+03 0.30000000D+03 0.30282797D-03 0.73194406D-05
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.14567934D+01 0.56493686D-03
+ 0.12500000D+03 0.13000000D+03 -.68219645D+01 0.26499117D-02
+ 0.13000000D+03 0.13500000D+03 0.34816280D+01 0.19680088D-02
+ 0.13500000D+03 0.14000000D+03 0.20575733D+01 0.16663156D-02
+ 0.14000000D+03 0.14500000D+03 0.13613689D+01 0.14649260D-02
+ 0.14500000D+03 0.15000000D+03 0.97494814D+00 0.12595148D-02
+ 0.15000000D+03 0.15500000D+03 0.73574950D+00 0.10580887D-02
+ 0.15500000D+03 0.16000000D+03 0.57798137D+00 0.96410004D-03
+ 0.16000000D+03 0.16500000D+03 0.46714713D+00 0.94299141D-03
+ 0.16500000D+03 0.17000000D+03 0.38605746D+00 0.85222224D-03
+ 0.17000000D+03 0.17500000D+03 0.32304184D+00 0.70409975D-03
+ 0.17500000D+03 0.18000000D+03 0.27651439D+00 0.74333983D-03
+ 0.18000000D+03 0.18500000D+03 0.23943330D+00 0.62581564D-03
+ 0.18500000D+03 0.19000000D+03 0.20684054D+00 0.70596748D-03
+ 0.19000000D+03 0.19500000D+03 0.18204911D+00 0.81627776D-03
+ 0.19500000D+03 0.20000000D+03 0.16269464D+00 0.61213114D-03
+ 0.20000000D+03 0.20500000D+03 0.14289136D+00 0.45385167D-03
+ 0.20500000D+03 0.21000000D+03 0.12870929D+00 0.59333131D-03
+ 0.21000000D+03 0.21500000D+03 0.11573612D+00 0.85467738D-03
+ 0.21500000D+03 0.22000000D+03 0.10543342D+00 0.75005397D-03
+ 0.22000000D+03 0.22500000D+03 0.95551082D-01 0.33832333D-03
+ 0.22500000D+03 0.23000000D+03 0.85686822D-01 0.31842596D-03
+ 0.23000000D+03 0.23500000D+03 0.79774882D-01 0.28750621D-03
+ 0.23500000D+03 0.24000000D+03 0.71564038D-01 0.29154591D-03
+ 0.24000000D+03 0.24500000D+03 0.66067318D-01 0.37333985D-03
+ 0.24500000D+03 0.25000000D+03 0.61940332D-01 0.34419069D-03
+ 0.25000000D+03 0.25500000D+03 0.56153641D-01 0.35063321D-03
+ 0.25500000D+03 0.26000000D+03 0.52513452D-01 0.34740628D-03
+ 0.26000000D+03 0.26500000D+03 0.48344305D-01 0.22926351D-03
+ 0.26500000D+03 0.27000000D+03 0.44962002D-01 0.24189532D-03
+ 0.27000000D+03 0.27500000D+03 0.41619570D-01 0.29407341D-03
+ 0.27500000D+03 0.28000000D+03 0.39243156D-01 0.30217138D-03
+ 0.28000000D+03 0.28500000D+03 0.36625507D-01 0.27774464D-03
+ 0.28500000D+03 0.29000000D+03 0.33717997D-01 0.41449526D-03
+ 0.29000000D+03 0.29500000D+03 0.32210151D-01 0.40468531D-03
+ 0.29500000D+03 0.30000000D+03 0.30106877D-01 0.24109627D-03
+ 0.30000000D+03 0.30500000D+03 0.27985935D-01 0.23311917D-03
+ 0.30500000D+03 0.31000000D+03 0.26554508D-01 0.24238647D-03
+ 0.31000000D+03 0.31500000D+03 0.24937861D-01 0.22114850D-03
+ 0.31500000D+03 0.32000000D+03 0.23135213D-01 0.21420661D-03
+ 0.32000000D+03 0.32500000D+03 0.22100394D-01 0.23897487D-03
+ 0.32500000D+03 0.33000000D+03 0.20616768D-01 0.25219061D-03
+ 0.33000000D+03 0.33500000D+03 0.20101105D-01 0.24633063D-03
+ 0.33500000D+03 0.34000000D+03 0.18447924D-01 0.27040403D-03
+ 0.34000000D+03 0.34500000D+03 0.17822677D-01 0.27300188D-03
+ 0.34500000D+03 0.35000000D+03 0.16416490D-01 0.34684988D-03
+ 0.35000000D+03 0.35500000D+03 0.16271065D-01 0.33406675D-03
+ 0.35500000D+03 0.36000000D+03 0.14994602D-01 0.16912772D-03
+ 0.36000000D+03 0.36500000D+03 0.14295457D-01 0.18337722D-03
+ 0.36500000D+03 0.37000000D+03 0.13540994D-01 0.22243174D-03
+ 0.37000000D+03 0.37500000D+03 0.12873714D-01 0.19588062D-03
+ 0.37500000D+03 0.38000000D+03 0.12363719D-01 0.14720744D-03
+ 0.38000000D+03 0.38500000D+03 0.11504409D-01 0.12452209D-03
+ 0.38500000D+03 0.39000000D+03 0.11184207D-01 0.14596354D-03
+ 0.39000000D+03 0.39500000D+03 0.10630741D-01 0.13821623D-03
+ 0.39500000D+03 0.40000000D+03 0.10106416D-01 0.10437020D-03
+ 0.40000000D+03 0.40500000D+03 0.97190227D-02 0.95001588D-04
+ 0.40500000D+03 0.41000000D+03 0.89136153D-02 0.10214693D-03
+ 0.41000000D+03 0.41500000D+03 0.87215954D-02 0.11914801D-03
+ 0.41500000D+03 0.42000000D+03 0.84208109D-02 0.16450277D-03
+ 0.42000000D+03 0.42500000D+03 0.81611506D-02 0.15646667D-03
+ 0.42500000D+03 0.43000000D+03 0.75940454D-02 0.91861250D-04
+ 0.43000000D+03 0.43500000D+03 0.71606847D-02 0.12517247D-03
+ 0.43500000D+03 0.44000000D+03 0.61947273D-02 0.95138272D-03
+ 0.44000000D+03 0.44500000D+03 0.75744242D-02 0.94798611D-03
+ 0.44500000D+03 0.45000000D+03 0.65330258D-02 0.95137914D-04
+ 0.45000000D+03 0.45500000D+03 0.60167781D-02 0.12160327D-03
+ 0.45500000D+03 0.46000000D+03 0.58647196D-02 0.13877912D-03
+ 0.46000000D+03 0.46500000D+03 0.55613249D-02 0.20840563D-03
+ 0.46500000D+03 0.47000000D+03 0.55119916D-02 0.19703806D-03
+ 0.47000000D+03 0.47500000D+03 0.50460610D-02 0.12911194D-03
+ 0.47500000D+03 0.48000000D+03 0.50220496D-02 0.15797729D-03
+ 0.48000000D+03 0.48500000D+03 0.47326148D-02 0.17980291D-03
+ 0.48500000D+03 0.49000000D+03 0.44646588D-02 0.28654696D-03
+ 0.49000000D+03 0.49500000D+03 0.46076798D-02 0.25162444D-03
+ 0.49500000D+03 0.50000000D+03 0.42084410D-02 0.67688921D-04
+ 0.50000000D+03 0.50500000D+03 0.39581943D-02 0.79698429D-04
+ 0.50500000D+03 0.51000000D+03 0.40356434D-02 0.77344015D-04
+ 0.51000000D+03 0.51500000D+03 0.37178123D-02 0.11819772D-03
+ 0.51500000D+03 0.52000000D+03 0.34073382D-02 0.17557712D-03
+ 0.52000000D+03 0.52500000D+03 0.35632464D-02 0.15164494D-03
+ 0.52500000D+03 0.53000000D+03 0.34369826D-02 0.72882139D-04
+ 0.53000000D+03 0.53500000D+03 0.31002477D-02 0.13186475D-03
+ 0.53500000D+03 0.54000000D+03 0.31627979D-02 0.13173303D-03
+ 0.54000000D+03 0.54500000D+03 0.30637244D-02 0.54224799D-04
+ 0.54500000D+03 0.55000000D+03 0.27245302D-02 0.10224713D-03
+ 0.55000000D+03 0.55500000D+03 0.27810740D-02 0.11296437D-03
+ 0.55500000D+03 0.56000000D+03 0.26686864D-02 0.71118789D-04
+ 0.56000000D+03 0.56500000D+03 0.25007658D-02 0.10502560D-03
+ 0.56500000D+03 0.57000000D+03 0.25059285D-02 0.10532005D-03
+ 0.57000000D+03 0.57500000D+03 0.23624937D-02 0.67355021D-04
+ 0.57500000D+03 0.58000000D+03 0.22888734D-02 0.75963116D-04
+ 0.58000000D+03 0.58500000D+03 0.23069496D-02 0.60295195D-04
+ 0.58500000D+03 0.59000000D+03 0.21184766D-02 0.49921813D-04
+ 0.59000000D+03 0.59500000D+03 0.20978822D-02 0.49105478D-04
+ 0.59500000D+03 0.60000000D+03 0.18886591D-02 0.97776483D-04
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.14567934D+01 0.56493686D-03
+ 0.12500000D+03 0.13000000D+03 -.68233355D+01 0.26484890D-02
+ 0.13000000D+03 0.13500000D+03 0.34694748D+01 0.19608915D-02
+ 0.13500000D+03 0.14000000D+03 0.20375723D+01 0.16503116D-02
+ 0.14000000D+03 0.14500000D+03 0.13355013D+01 0.14367777D-02
+ 0.14500000D+03 0.15000000D+03 0.94458136D+00 0.12219116D-02
+ 0.15000000D+03 0.15500000D+03 0.70197110D+00 0.10093627D-02
+ 0.15500000D+03 0.16000000D+03 0.54153839D+00 0.90427377D-03
+ 0.16000000D+03 0.16500000D+03 0.42870133D+00 0.86367855D-03
+ 0.16500000D+03 0.17000000D+03 0.34615337D+00 0.76747482D-03
+ 0.17000000D+03 0.17500000D+03 0.28236622D+00 0.61412613D-03
+ 0.17500000D+03 0.18000000D+03 0.23513713D+00 0.63187880D-03
+ 0.18000000D+03 0.18500000D+03 0.19768605D+00 0.51949013D-03
+ 0.18500000D+03 0.19000000D+03 0.16552955D+00 0.56021276D-03
+ 0.19000000D+03 0.19500000D+03 0.14101769D+00 0.63335102D-03
+ 0.19500000D+03 0.20000000D+03 0.12178839D+00 0.46209175D-03
+ 0.20000000D+03 0.20500000D+03 0.10325448D+00 0.32729219D-03
+ 0.20500000D+03 0.21000000D+03 0.89698091D-01 0.41063404D-03
+ 0.21000000D+03 0.21500000D+03 0.77716706D-01 0.56981428D-03
+ 0.21500000D+03 0.22000000D+03 0.68159818D-01 0.49186961D-03
+ 0.22000000D+03 0.22500000D+03 0.59420633D-01 0.21097839D-03
+ 0.22500000D+03 0.23000000D+03 0.51245456D-01 0.19030764D-03
+ 0.23000000D+03 0.23500000D+03 0.45864455D-01 0.16614516D-03
+ 0.23500000D+03 0.24000000D+03 0.39542437D-01 0.16025077D-03
+ 0.24000000D+03 0.24500000D+03 0.35089941D-01 0.19739386D-03
+ 0.24500000D+03 0.25000000D+03 0.31606578D-01 0.17719139D-03
+ 0.25000000D+03 0.25500000D+03 0.27525724D-01 0.17027875D-03
+ 0.25500000D+03 0.26000000D+03 0.24732704D-01 0.16531214D-03
+ 0.26000000D+03 0.26500000D+03 0.21878629D-01 0.10400521D-03
+ 0.26500000D+03 0.27000000D+03 0.19557128D-01 0.10479774D-03
+ 0.27000000D+03 0.27500000D+03 0.17402167D-01 0.12250091D-03
+ 0.27500000D+03 0.28000000D+03 0.15776449D-01 0.12178337D-03
+ 0.28000000D+03 0.28500000D+03 0.14158097D-01 0.10741005D-03
+ 0.28500000D+03 0.29000000D+03 0.12540433D-01 0.15250809D-03
+ 0.29000000D+03 0.29500000D+03 0.11527933D-01 0.14643201D-03
+ 0.29500000D+03 0.30000000D+03 0.10369407D-01 0.83052300D-04
+ 0.30000000D+03 0.30500000D+03 0.92797475D-02 0.77372672D-04
+ 0.30500000D+03 0.31000000D+03 0.84811617D-02 0.77269427D-04
+ 0.31000000D+03 0.31500000D+03 0.76735612D-02 0.68483833D-04
+ 0.31500000D+03 0.32000000D+03 0.68628359D-02 0.63228164D-04
+ 0.32000000D+03 0.32500000D+03 0.63235675D-02 0.68402998D-04
+ 0.32500000D+03 0.33000000D+03 0.56907112D-02 0.69443203D-04
+ 0.33000000D+03 0.33500000D+03 0.53542119D-02 0.65814052D-04
+ 0.33500000D+03 0.34000000D+03 0.47439807D-02 0.69135019D-04
+ 0.34000000D+03 0.34500000D+03 0.44264596D-02 0.68174875D-04
+ 0.34500000D+03 0.35000000D+03 0.39407391D-02 0.82453728D-04
+ 0.35000000D+03 0.35500000D+03 0.37747153D-02 0.78345998D-04
+ 0.35500000D+03 0.36000000D+03 0.33627292D-02 0.38110767D-04
+ 0.36000000D+03 0.36500000D+03 0.31013080D-02 0.39548984D-04
+ 0.36500000D+03 0.37000000D+03 0.28428142D-02 0.46668490D-04
+ 0.37000000D+03 0.37500000D+03 0.26170418D-02 0.40038008D-04
+ 0.37500000D+03 0.38000000D+03 0.24340128D-02 0.29074168D-04
+ 0.38000000D+03 0.38500000D+03 0.21943091D-02 0.23796083D-04
+ 0.38500000D+03 0.39000000D+03 0.20679458D-02 0.26869538D-04
+ 0.39000000D+03 0.39500000D+03 0.19053727D-02 0.24929894D-04
+ 0.39500000D+03 0.40000000D+03 0.17568226D-02 0.18147882D-04
+ 0.40000000D+03 0.40500000D+03 0.16389249D-02 0.16069256D-04
+ 0.40500000D+03 0.41000000D+03 0.14592564D-02 0.16655373D-04
+ 0.41000000D+03 0.41500000D+03 0.13873477D-02 0.18942985D-04
+ 0.41500000D+03 0.42000000D+03 0.13010798D-02 0.25242316D-04
+ 0.42000000D+03 0.42500000D+03 0.12246929D-02 0.23684775D-04
+ 0.42500000D+03 0.43000000D+03 0.11075322D-02 0.13415475D-04
+ 0.43000000D+03 0.43500000D+03 0.10155972D-02 0.17629417D-04
+ 0.43500000D+03 0.44000000D+03 0.85657530D-03 0.12948033D-03
+ 0.44000000D+03 0.44500000D+03 0.10184285D-02 0.12894561D-03
+ 0.44500000D+03 0.45000000D+03 0.85318953D-03 0.12469101D-04
+ 0.45000000D+03 0.45500000D+03 0.76511484D-03 0.15356360D-04
+ 0.45500000D+03 0.46000000D+03 0.72634562D-03 0.17233129D-04
+ 0.46000000D+03 0.46500000D+03 0.67109584D-03 0.24936585D-04
+ 0.46500000D+03 0.47000000D+03 0.64796422D-03 0.23413800D-04
+ 0.47000000D+03 0.47500000D+03 0.57832161D-03 0.14683356D-04
+ 0.47500000D+03 0.48000000D+03 0.56121325D-03 0.17660985D-04
+ 0.48000000D+03 0.48500000D+03 0.51576918D-03 0.19526213D-04
+ 0.48500000D+03 0.49000000D+03 0.47489283D-03 0.30275913D-04
+ 0.49000000D+03 0.49500000D+03 0.47806650D-03 0.26390182D-04
+ 0.49500000D+03 0.50000000D+03 0.42591658D-03 0.68377353D-05
+ 0.50000000D+03 0.50500000D+03 0.39113141D-03 0.78641121D-05
+ 0.50500000D+03 0.51000000D+03 0.38946044D-03 0.74820557D-05
+ 0.51000000D+03 0.51500000D+03 0.35036571D-03 0.11056064D-04
+ 0.51500000D+03 0.52000000D+03 0.31390784D-03 0.16123105D-04
+ 0.52000000D+03 0.52500000D+03 0.32088180D-03 0.13753452D-04
+ 0.52500000D+03 0.53000000D+03 0.30226917D-03 0.64393836D-05
+ 0.53000000D+03 0.53500000D+03 0.26658107D-03 0.11238751D-04
+ 0.53500000D+03 0.54000000D+03 0.26605249D-03 0.11179927D-04
+ 0.54000000D+03 0.54500000D+03 0.25193400D-03 0.44651380D-05
+ 0.54500000D+03 0.55000000D+03 0.21925063D-03 0.81637357D-05
+ 0.55000000D+03 0.55500000D+03 0.21909308D-03 0.89394963D-05
+ 0.55500000D+03 0.56000000D+03 0.20566674D-03 0.55156018D-05
+ 0.56000000D+03 0.56500000D+03 0.18872372D-03 0.78657637D-05
+ 0.56500000D+03 0.57000000D+03 0.18523243D-03 0.78436965D-05
+ 0.57000000D+03 0.57500000D+03 0.17103150D-03 0.48569504D-05
+ 0.57500000D+03 0.58000000D+03 0.16235587D-03 0.53912351D-05
+ 0.58000000D+03 0.58500000D+03 0.16027833D-03 0.42076509D-05
+ 0.58500000D+03 0.59000000D+03 0.14420996D-03 0.33921557D-05
+ 0.59000000D+03 0.59500000D+03 0.13999081D-03 0.32846969D-05
+ 0.59500000D+03 0.60000000D+03 0.12355859D-03 0.63463476D-05
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 -.14316913D+01 0.42633817D-02
+ 0.30000000D+01 0.60000000D+01 0.15732652D+01 0.24547521D-02
+ 0.60000000D+01 0.90000000D+01 0.18840545D+01 0.17825676D-02
+ 0.90000000D+01 0.12000000D+02 0.15168869D+01 0.15960232D-02
+ 0.12000000D+02 0.15000000D+02 0.12081335D+01 0.11441405D-02
+ 0.15000000D+02 0.18000000D+02 0.97819178D+00 0.11082514D-02
+ 0.18000000D+02 0.21000000D+02 0.81033721D+00 0.12625292D-02
+ 0.21000000D+02 0.24000000D+02 0.68387976D+00 0.11596617D-02
+ 0.24000000D+02 0.27000000D+02 0.58374194D+00 0.93667404D-03
+ 0.27000000D+02 0.30000000D+02 0.50087800D+00 0.10207381D-02
+ 0.30000000D+02 0.33000000D+02 0.43942153D+00 0.13265181D-02
+ 0.33000000D+02 0.36000000D+02 0.38712383D+00 0.12860387D-02
+ 0.36000000D+02 0.39000000D+02 0.34146945D+00 0.94415718D-03
+ 0.39000000D+02 0.42000000D+02 0.30620236D+00 0.91904487D-03
+ 0.42000000D+02 0.45000000D+02 0.27340391D+00 0.80256731D-03
+ 0.45000000D+02 0.48000000D+02 0.24623860D+00 0.91710866D-03
+ 0.48000000D+02 0.51000000D+02 0.22197571D+00 0.99909488D-03
+ 0.51000000D+02 0.54000000D+02 0.20274612D+00 0.81897767D-03
+ 0.54000000D+02 0.57000000D+02 0.18391907D+00 0.69729708D-03
+ 0.57000000D+02 0.60000000D+02 0.16874718D+00 0.60107851D-03
+ 0.60000000D+02 0.63000000D+02 0.15308091D+00 0.65178642D-03
+ 0.63000000D+02 0.66000000D+02 0.14154393D+00 0.63590587D-03
+ 0.66000000D+02 0.69000000D+02 0.13058732D+00 0.59512440D-03
+ 0.69000000D+02 0.72000000D+02 0.11889648D+00 0.63201043D-03
+ 0.72000000D+02 0.75000000D+02 0.11013661D+00 0.64451847D-03
+ 0.75000000D+02 0.78000000D+02 0.10155006D+00 0.59565045D-03
+ 0.78000000D+02 0.81000000D+02 0.94265924D-01 0.47279128D-03
+ 0.81000000D+02 0.84000000D+02 0.87013692D-01 0.43198198D-03
+ 0.84000000D+02 0.87000000D+02 0.81769083D-01 0.38471246D-03
+ 0.87000000D+02 0.90000000D+02 0.75141611D-01 0.84262144D-03
+ 0.90000000D+02 0.93000000D+02 0.70100298D-01 0.84038118D-03
+ 0.93000000D+02 0.96000000D+02 0.65247565D-01 0.35282055D-03
+ 0.96000000D+02 0.99000000D+02 0.61231103D-01 0.49496992D-03
+ 0.99000000D+02 0.10200000D+03 0.56236881D-01 0.48442255D-03
+ 0.10200000D+03 0.10500000D+03 0.53291352D-01 0.32050113D-03
+ 0.10500000D+03 0.10800000D+03 0.49085529D-01 0.39357125D-03
+ 0.10800000D+03 0.11100000D+03 0.47227115D-01 0.39248619D-03
+ 0.11100000D+03 0.11400000D+03 0.43363197D-01 0.32151110D-03
+ 0.11400000D+03 0.11700000D+03 0.40993167D-01 0.34492408D-03
+ 0.11700000D+03 0.12000000D+03 0.37899509D-01 0.68595728D-03
+ 0.12000000D+03 0.12300000D+03 0.36708024D-01 0.65680948D-03
+ 0.12300000D+03 0.12600000D+03 0.33983859D-01 0.23683427D-03
+ 0.12600000D+03 0.12900000D+03 0.31559036D-01 0.23343569D-03
+ 0.12900000D+03 0.13200000D+03 0.30397199D-01 0.25127865D-03
+ 0.13200000D+03 0.13500000D+03 0.28225629D-01 0.25418414D-03
+ 0.13500000D+03 0.13800000D+03 0.26966018D-01 0.19685280D-03
+ 0.13800000D+03 0.14100000D+03 0.24366040D-01 0.46439091D-03
+ 0.14100000D+03 0.14400000D+03 0.24092609D-01 0.47553576D-03
+ 0.14400000D+03 0.14700000D+03 0.22584300D-01 0.27556094D-03
+ 0.14700000D+03 0.15000000D+03 0.22075707D-01 0.37763660D-03
+ 0.15000000D+03 0.15300000D+03 0.19389118D-01 0.62040126D-03
+ 0.15300000D+03 0.15600000D+03 0.19361440D-01 0.61206747D-03
+ 0.15600000D+03 0.15900000D+03 0.18195173D-01 0.32438882D-03
+ 0.15900000D+03 0.16200000D+03 0.17351414D-01 0.23152927D-03
+ 0.16200000D+03 0.16500000D+03 0.15561369D-01 0.22374487D-03
+ 0.16500000D+03 0.16800000D+03 0.15664486D-01 0.20329153D-03
+ 0.16800000D+03 0.17100000D+03 0.14452663D-01 0.20333561D-03
+ 0.17100000D+03 0.17400000D+03 0.13691598D-01 0.20943632D-03
+ 0.17400000D+03 0.17700000D+03 0.13297101D-01 0.41525617D-03
+ 0.17700000D+03 0.18000000D+03 0.12020112D-01 0.42855407D-03
+ 0.18000000D+03 0.18300000D+03 0.12405549D-01 0.40619268D-03
+ 0.18300000D+03 0.18600000D+03 0.10827784D-01 0.37839072D-03
+ 0.18600000D+03 0.18900000D+03 0.10400762D-01 0.26723803D-03
+ 0.18900000D+03 0.19200000D+03 0.10320703D-01 0.26982205D-03
+ 0.19200000D+03 0.19500000D+03 0.97899495D-02 0.17298413D-03
+ 0.19500000D+03 0.19800000D+03 0.90845857D-02 0.17824418D-03
+ 0.19800000D+03 0.20100000D+03 0.83204382D-02 0.16864252D-03
+ 0.20100000D+03 0.20400000D+03 0.85887872D-02 0.15974790D-03
+ 0.20400000D+03 0.20700000D+03 0.81535926D-02 0.35925445D-03
+ 0.20700000D+03 0.21000000D+03 0.70358087D-02 0.36504569D-03
+ 0.21000000D+03 0.21300000D+03 0.72920568D-02 0.15624549D-03
+ 0.21300000D+03 0.21600000D+03 0.69387996D-02 0.15448994D-03
+ 0.21600000D+03 0.21900000D+03 0.61416718D-02 0.12560347D-03
+ 0.21900000D+03 0.22200000D+03 0.58439409D-02 0.25717987D-03
+ 0.22200000D+03 0.22500000D+03 0.61708361D-02 0.25798562D-03
+ 0.22500000D+03 0.22800000D+03 0.57921384D-02 0.98899567D-04
+ 0.22800000D+03 0.23100000D+03 0.52413203D-02 0.97858996D-04
+ 0.23100000D+03 0.23400000D+03 0.48816245D-02 0.14916508D-03
+ 0.23400000D+03 0.23700000D+03 0.48522183D-02 0.15610411D-03
+ 0.23700000D+03 0.24000000D+03 0.48649553D-02 0.10903156D-03
+ 0.24000000D+03 0.24300000D+03 0.42630559D-02 0.94915602D-04
+ 0.24300000D+03 0.24600000D+03 0.44244298D-02 0.10401751D-03
+ 0.24600000D+03 0.24900000D+03 0.38301297D-02 0.10729954D-03
+ 0.24900000D+03 0.25200000D+03 0.38685989D-02 0.89593935D-04
+ 0.25200000D+03 0.25500000D+03 0.36524992D-02 0.71152512D-04
+ 0.25500000D+03 0.25800000D+03 0.35449950D-02 0.63692816D-04
+ 0.25800000D+03 0.26100000D+03 0.32665642D-02 0.72650790D-04
+ 0.26100000D+03 0.26400000D+03 0.33077815D-02 0.95738065D-04
+ 0.26400000D+03 0.26700000D+03 0.29472146D-02 0.10174795D-03
+ 0.26700000D+03 0.27000000D+03 0.30502620D-02 0.86946304D-04
+ 0.27000000D+03 0.27300000D+03 0.26942207D-02 0.92765835D-04
+ 0.27300000D+03 0.27600000D+03 0.26813853D-02 0.82920630D-04
+ 0.27600000D+03 0.27900000D+03 0.27493755D-02 0.11504210D-03
+ 0.27900000D+03 0.28200000D+03 0.20468920D-02 0.24705952D-03
+ 0.28200000D+03 0.28500000D+03 0.25979772D-02 0.22695386D-03
+ 0.28500000D+03 0.28800000D+03 0.18857937D-02 0.38735802D-03
+ 0.28800000D+03 0.29100000D+03 0.24279688D-02 0.38618631D-03
+ 0.29100000D+03 0.29400000D+03 0.20239367D-02 0.59773816D-04
+ 0.29400000D+03 0.29700000D+03 0.20023830D-02 0.64542664D-04
+ 0.29700000D+03 0.30000000D+03 0.19905618D-02 0.61397676D-04
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 -.14303512D+01 0.42626034D-02
+ 0.30000000D+01 0.60000000D+01 0.15709126D+01 0.24522861D-02
+ 0.60000000D+01 0.90000000D+01 0.18772880D+01 0.17756699D-02
+ 0.90000000D+01 0.12000000D+02 0.15063056D+01 0.15858007D-02
+ 0.12000000D+02 0.15000000D+02 0.11942619D+01 0.11313769D-02
+ 0.15000000D+02 0.18000000D+02 0.96150292D+00 0.10886412D-02
+ 0.18000000D+02 0.21000000D+02 0.79115118D+00 0.12318355D-02
+ 0.21000000D+02 0.24000000D+02 0.66247555D+00 0.11246662D-02
+ 0.24000000D+02 0.27000000D+02 0.56045779D+00 0.89922029D-03
+ 0.27000000D+02 0.30000000D+02 0.47616554D+00 0.96941210D-03
+ 0.30000000D+02 0.33000000D+02 0.41322622D+00 0.12450043D-02
+ 0.33000000D+02 0.36000000D+02 0.35975804D+00 0.11979293D-02
+ 0.36000000D+02 0.39000000D+02 0.31330555D+00 0.86642297D-03
+ 0.39000000D+02 0.42000000D+02 0.27713875D+00 0.83179856D-03
+ 0.42000000D+02 0.45000000D+02 0.24388785D+00 0.71745693D-03
+ 0.45000000D+02 0.48000000D+02 0.21633013D+00 0.80262547D-03
+ 0.48000000D+02 0.51000000D+02 0.19191320D+00 0.86531445D-03
+ 0.51000000D+02 0.54000000D+02 0.17237590D+00 0.69692065D-03
+ 0.54000000D+02 0.57000000D+02 0.15366141D+00 0.58353524D-03
+ 0.57000000D+02 0.60000000D+02 0.13845173D+00 0.49341195D-03
+ 0.60000000D+02 0.63000000D+02 0.12326845D+00 0.52364280D-03
+ 0.63000000D+02 0.66000000D+02 0.11180430D+00 0.50361555D-03
+ 0.66000000D+02 0.69000000D+02 0.10111515D+00 0.45992654D-03
+ 0.69000000D+02 0.72000000D+02 0.90209893D-01 0.47973330D-03
+ 0.72000000D+02 0.75000000D+02 0.81849983D-01 0.47860065D-03
+ 0.75000000D+02 0.78000000D+02 0.73890465D-01 0.43468944D-03
+ 0.78000000D+02 0.81000000D+02 0.67127910D-01 0.33707507D-03
+ 0.81000000D+02 0.84000000D+02 0.60623583D-01 0.30109667D-03
+ 0.84000000D+02 0.87000000D+02 0.55715061D-01 0.26254890D-03
+ 0.87000000D+02 0.90000000D+02 0.50052918D-01 0.55604125D-03
+ 0.90000000D+02 0.93000000D+02 0.45646167D-01 0.55233058D-03
+ 0.93000000D+02 0.96000000D+02 0.41522017D-01 0.22437209D-03
+ 0.96000000D+02 0.99000000D+02 0.38069576D-01 0.30606487D-03
+ 0.99000000D+02 0.10200000D+03 0.34158300D-01 0.29603149D-03
+ 0.10200000D+03 0.10500000D+03 0.31618674D-01 0.19035590D-03
+ 0.10500000D+03 0.10800000D+03 0.28447591D-01 0.22701572D-03
+ 0.10800000D+03 0.11100000D+03 0.26728146D-01 0.22319723D-03
+ 0.11100000D+03 0.11400000D+03 0.23960806D-01 0.17735193D-03
+ 0.11400000D+03 0.11700000D+03 0.22118486D-01 0.18600526D-03
+ 0.11700000D+03 0.12000000D+03 0.19968832D-01 0.35817255D-03
+ 0.12000000D+03 0.12300000D+03 0.18882687D-01 0.34134142D-03
+ 0.12300000D+03 0.12600000D+03 0.17060641D-01 0.11873747D-03
+ 0.12600000D+03 0.12900000D+03 0.15468979D-01 0.11462949D-03
+ 0.12900000D+03 0.13200000D+03 0.14547428D-01 0.11986554D-03
+ 0.13200000D+03 0.13500000D+03 0.13186566D-01 0.11906968D-03
+ 0.13500000D+03 0.13800000D+03 0.12300334D-01 0.90097410D-04
+ 0.13800000D+03 0.14100000D+03 0.10856466D-01 0.20470426D-03
+ 0.14100000D+03 0.14400000D+03 0.10482724D-01 0.20873812D-03
+ 0.14400000D+03 0.14700000D+03 0.95956153D-02 0.11654185D-03
+ 0.14700000D+03 0.15000000D+03 0.91556553D-02 0.15611459D-03
+ 0.15000000D+03 0.15300000D+03 0.78545209D-02 0.24979109D-03
+ 0.15300000D+03 0.15600000D+03 0.76626340D-02 0.24376329D-03
+ 0.15600000D+03 0.15900000D+03 0.70325192D-02 0.12613271D-03
+ 0.15900000D+03 0.16200000D+03 0.65500562D-02 0.87394557D-04
+ 0.16200000D+03 0.16500000D+03 0.57405900D-02 0.82674091D-04
+ 0.16500000D+03 0.16800000D+03 0.56479768D-02 0.73329260D-04
+ 0.16800000D+03 0.17100000D+03 0.50909444D-02 0.71597713D-04
+ 0.17100000D+03 0.17400000D+03 0.47156500D-02 0.72189198D-04
+ 0.17400000D+03 0.17700000D+03 0.44758012D-02 0.13855842D-03
+ 0.17700000D+03 0.18000000D+03 0.39555106D-02 0.14207223D-03
+ 0.18000000D+03 0.18300000D+03 0.39908691D-02 0.12976262D-03
+ 0.18300000D+03 0.18600000D+03 0.34054223D-02 0.12013918D-03
+ 0.18600000D+03 0.18900000D+03 0.32015281D-02 0.81567361D-04
+ 0.18900000D+03 0.19200000D+03 0.31071282D-02 0.81849992D-04
+ 0.19200000D+03 0.19500000D+03 0.28820310D-02 0.50783549D-04
+ 0.19500000D+03 0.19800000D+03 0.26162211D-02 0.51469128D-04
+ 0.19800000D+03 0.20100000D+03 0.23460679D-02 0.47474318D-04
+ 0.20100000D+03 0.20400000D+03 0.23704656D-02 0.44200757D-04
+ 0.20400000D+03 0.20700000D+03 0.22009778D-02 0.96148465D-04
+ 0.20700000D+03 0.21000000D+03 0.18595842D-02 0.97341342D-04
+ 0.21000000D+03 0.21300000D+03 0.18881921D-02 0.40448998D-04
+ 0.21300000D+03 0.21600000D+03 0.17582237D-02 0.39196186D-04
+ 0.21600000D+03 0.21900000D+03 0.15242283D-02 0.31316379D-04
+ 0.21900000D+03 0.22200000D+03 0.14225557D-02 0.62003582D-04
+ 0.22200000D+03 0.22500000D+03 0.14714288D-02 0.62001404D-04
+ 0.22500000D+03 0.22800000D+03 0.13522555D-02 0.23111541D-04
+ 0.22800000D+03 0.23100000D+03 0.11988377D-02 0.22376712D-04
+ 0.23100000D+03 0.23400000D+03 0.10946989D-02 0.33275272D-04
+ 0.23400000D+03 0.23700000D+03 0.10671831D-02 0.34450641D-04
+ 0.23700000D+03 0.24000000D+03 0.10487284D-02 0.23544771D-04
+ 0.24000000D+03 0.24300000D+03 0.90064190D-03 0.20069481D-04
+ 0.24300000D+03 0.24600000D+03 0.91684812D-03 0.21515687D-04
+ 0.24600000D+03 0.24900000D+03 0.77831512D-03 0.21836553D-04
+ 0.24900000D+03 0.25200000D+03 0.77123975D-03 0.17902329D-04
+ 0.25200000D+03 0.25500000D+03 0.71446693D-03 0.13941103D-04
+ 0.25500000D+03 0.25800000D+03 0.68047255D-03 0.12225335D-04
+ 0.25800000D+03 0.26100000D+03 0.61540058D-03 0.13659405D-04
+ 0.26100000D+03 0.26400000D+03 0.61145506D-03 0.17661119D-04
+ 0.26400000D+03 0.26700000D+03 0.53472018D-03 0.18487074D-04
+ 0.26700000D+03 0.27000000D+03 0.54346930D-03 0.15511883D-04
+ 0.27000000D+03 0.27300000D+03 0.47115663D-03 0.16189224D-04
+ 0.27300000D+03 0.27600000D+03 0.46065671D-03 0.14312674D-04
+ 0.27600000D+03 0.27900000D+03 0.46370852D-03 0.19273802D-04
+ 0.27900000D+03 0.28200000D+03 0.33929538D-03 0.40709765D-04
+ 0.28200000D+03 0.28500000D+03 0.42326757D-03 0.37239820D-04
+ 0.28500000D+03 0.28800000D+03 0.30205289D-03 0.61420730D-04
+ 0.28800000D+03 0.29100000D+03 0.38206996D-03 0.61207881D-04
+ 0.29100000D+03 0.29400000D+03 0.31270549D-03 0.92105408D-05
+ 0.29400000D+03 0.29700000D+03 0.30399481D-03 0.98022506D-05
+ 0.29700000D+03 0.30000000D+03 0.29685893D-03 0.91621357D-05
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.71058015D+01 0.38794655D-02
+ 0.30000000D+01 0.60000000D+01 0.10363945D+02 0.56216700D-03
+ 0.60000000D+01 0.90000000D+01 0.37486661D+01 0.22753522D-03
+ 0.90000000D+01 0.12000000D+02 0.19041311D+01 0.13218393D-03
+ 0.12000000D+02 0.15000000D+02 0.11345784D+01 0.87110159D-04
+ 0.15000000D+02 0.18000000D+02 0.74282959D+00 0.60733924D-04
+ 0.18000000D+02 0.21000000D+02 0.51792059D+00 0.45424016D-04
+ 0.21000000D+02 0.24000000D+02 0.37773400D+00 0.35912263D-04
+ 0.24000000D+02 0.27000000D+02 0.28504885D+00 0.28090990D-04
+ 0.27000000D+02 0.30000000D+02 0.22080372D+00 0.23945457D-04
+ 0.30000000D+02 0.33000000D+02 0.17478358D+00 0.19371619D-04
+ 0.33000000D+02 0.36000000D+02 0.14078839D+00 0.16317600D-04
+ 0.36000000D+02 0.39000000D+02 0.11507552D+00 0.13768138D-04
+ 0.39000000D+02 0.42000000D+02 0.95289439D-01 0.12233994D-04
+ 0.42000000D+02 0.45000000D+02 0.79735152D-01 0.10544463D-04
+ 0.45000000D+02 0.48000000D+02 0.67369588D-01 0.90611482D-05
+ 0.48000000D+02 0.51000000D+02 0.57403690D-01 0.81392164D-05
+ 0.51000000D+02 0.54000000D+02 0.49262559D-01 0.73575966D-05
+ 0.54000000D+02 0.57000000D+02 0.42564537D-01 0.62451888D-05
+ 0.57000000D+02 0.60000000D+02 0.36996957D-01 0.56045448D-05
+ 0.60000000D+02 0.63000000D+02 0.32340060D-01 0.50454670D-05
+ 0.63000000D+02 0.66000000D+02 0.28405529D-01 0.46045230D-05
+ 0.66000000D+02 0.69000000D+02 0.25065393D-01 0.42350815D-05
+ 0.69000000D+02 0.72000000D+02 0.22215263D-01 0.38645817D-05
+ 0.72000000D+02 0.75000000D+02 0.19757154D-01 0.35429621D-05
+ 0.75000000D+02 0.78000000D+02 0.17639628D-01 0.31752684D-05
+ 0.78000000D+02 0.81000000D+02 0.15800538D-01 0.30106240D-05
+ 0.81000000D+02 0.84000000D+02 0.14202284D-01 0.28358684D-05
+ 0.84000000D+02 0.87000000D+02 0.12802777D-01 0.25999681D-05
+ 0.87000000D+02 0.90000000D+02 0.11564660D-01 0.23522312D-05
+ 0.90000000D+02 0.93000000D+02 0.10483164D-01 0.21454791D-05
+ 0.93000000D+02 0.96000000D+02 0.95173902D-02 0.19504136D-05
+ 0.96000000D+02 0.99000000D+02 0.86728066D-02 0.18460989D-05
+ 0.99000000D+02 0.10200000D+03 0.79108693D-02 0.17284807D-05
+ 0.10200000D+03 0.10500000D+03 0.72374042D-02 0.15735825D-05
+ 0.10500000D+03 0.10800000D+03 0.66304759D-02 0.15842343D-05
+ 0.10800000D+03 0.11100000D+03 0.60836210D-02 0.14545068D-05
+ 0.11100000D+03 0.11400000D+03 0.55964740D-02 0.13346886D-05
+ 0.11400000D+03 0.11700000D+03 0.51514018D-02 0.12282690D-05
+ 0.11700000D+03 0.12000000D+03 0.47532470D-02 0.11506428D-05
+ 0.12000000D+03 0.12300000D+03 0.43914887D-02 0.10846996D-05
+ 0.12300000D+03 0.12600000D+03 0.40648900D-02 0.10436045D-05
+ 0.12600000D+03 0.12900000D+03 0.37674363D-02 0.10664652D-05
+ 0.12900000D+03 0.13200000D+03 0.34976377D-02 0.91280022D-06
+ 0.13200000D+03 0.13500000D+03 0.32478761D-02 0.84757601D-06
+ 0.13500000D+03 0.13800000D+03 0.30206383D-02 0.80633706D-06
+ 0.13800000D+03 0.14100000D+03 0.28146157D-02 0.78753526D-06
+ 0.14100000D+03 0.14400000D+03 0.26241654D-02 0.75254728D-06
+ 0.14400000D+03 0.14700000D+03 0.24506954D-02 0.72049439D-06
+ 0.14700000D+03 0.15000000D+03 0.22899519D-02 0.66943171D-06
+ 0.15000000D+03 0.15300000D+03 0.21420929D-02 0.64589154D-06
+ 0.15300000D+03 0.15600000D+03 0.20059392D-02 0.61091462D-06
+ 0.15600000D+03 0.15900000D+03 0.18808403D-02 0.57790977D-06
+ 0.15900000D+03 0.16200000D+03 0.17650665D-02 0.58044577D-06
+ 0.16200000D+03 0.16500000D+03 0.16570836D-02 0.52434517D-06
+ 0.16500000D+03 0.16800000D+03 0.15579407D-02 0.49108250D-06
+ 0.16800000D+03 0.17100000D+03 0.14652055D-02 0.47270029D-06
+ 0.17100000D+03 0.17400000D+03 0.13796449D-02 0.45050904D-06
+ 0.17400000D+03 0.17700000D+03 0.13001186D-02 0.41438237D-06
+ 0.17700000D+03 0.18000000D+03 0.12255149D-02 0.40279781D-06
+ 0.18000000D+03 0.18300000D+03 0.11564559D-02 0.39950589D-06
+ 0.18300000D+03 0.18600000D+03 0.10918950D-02 0.37584804D-06
+ 0.18600000D+03 0.18900000D+03 0.10326267D-02 0.35550204D-06
+ 0.18900000D+03 0.19200000D+03 0.97666357D-03 0.35236546D-06
+ 0.19200000D+03 0.19500000D+03 0.92385409D-03 0.32773008D-06
+ 0.19500000D+03 0.19800000D+03 0.87480964D-03 0.32313658D-06
+ 0.19800000D+03 0.20100000D+03 0.82860553D-03 0.30650414D-06
+ 0.20100000D+03 0.20400000D+03 0.78554718D-03 0.29327757D-06
+ 0.20400000D+03 0.20700000D+03 0.74522861D-03 0.27449053D-06
+ 0.20700000D+03 0.21000000D+03 0.70765478D-03 0.28401241D-06
+ 0.21000000D+03 0.21300000D+03 0.67225268D-03 0.25842402D-06
+ 0.21300000D+03 0.21600000D+03 0.63832848D-03 0.24667646D-06
+ 0.21600000D+03 0.21900000D+03 0.60726266D-03 0.23725304D-06
+ 0.21900000D+03 0.22200000D+03 0.57719762D-03 0.23604296D-06
+ 0.22200000D+03 0.22500000D+03 0.54931218D-03 0.22728254D-06
+ 0.22500000D+03 0.22800000D+03 0.52335781D-03 0.20984809D-06
+ 0.22800000D+03 0.23100000D+03 0.49847772D-03 0.20198067D-06
+ 0.23100000D+03 0.23400000D+03 0.47513728D-03 0.19569916D-06
+ 0.23400000D+03 0.23700000D+03 0.45316894D-03 0.19324624D-06
+ 0.23700000D+03 0.24000000D+03 0.43223568D-03 0.18440179D-06
+ 0.24000000D+03 0.24300000D+03 0.41269996D-03 0.18107345D-06
+ 0.24300000D+03 0.24600000D+03 0.39409063D-03 0.16939323D-06
+ 0.24600000D+03 0.24900000D+03 0.37643397D-03 0.16313936D-06
+ 0.24900000D+03 0.25200000D+03 0.35968782D-03 0.16081461D-06
+ 0.25200000D+03 0.25500000D+03 0.34375052D-03 0.15706164D-06
+ 0.25500000D+03 0.25800000D+03 0.32909978D-03 0.15336354D-06
+ 0.25800000D+03 0.26100000D+03 0.31473650D-03 0.14196413D-06
+ 0.26100000D+03 0.26400000D+03 0.30144309D-03 0.14128220D-06
+ 0.26400000D+03 0.26700000D+03 0.28857687D-03 0.13654028D-06
+ 0.26700000D+03 0.27000000D+03 0.27657636D-03 0.14218353D-06
+ 0.27000000D+03 0.27300000D+03 0.26460930D-03 0.12475143D-06
+ 0.27300000D+03 0.27600000D+03 0.25398685D-03 0.12493527D-06
+ 0.27600000D+03 0.27900000D+03 0.24325774D-03 0.11978969D-06
+ 0.27900000D+03 0.28200000D+03 0.23340701D-03 0.11393268D-06
+ 0.28200000D+03 0.28500000D+03 0.22393567D-03 0.10949271D-06
+ 0.28500000D+03 0.28800000D+03 0.21505118D-03 0.10658542D-06
+ 0.28800000D+03 0.29100000D+03 0.20643351D-03 0.10114037D-06
+ 0.29100000D+03 0.29400000D+03 0.19826377D-03 0.11671798D-06
+ 0.29400000D+03 0.29700000D+03 0.19038091D-03 0.95962701D-07
+ 0.29700000D+03 0.30000000D+03 0.18306841D-03 0.95230202D-07
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-22.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-22.top
new file mode 100644
index 0000000000000000000000000000000000000000..215062e714a18e07d700e23ba20f6ec47130d1fc
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-22.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51723654D-06 0.44066948D-06
+ -.46000000D+01 -.45000000D+01 0.89147512D-04 0.46816067D-05
+ -.45000000D+01 -.44000000D+01 0.81462338D-03 0.14403180D-04
+ -.44000000D+01 -.43000000D+01 0.34085698D-02 0.31714497D-04
+ -.43000000D+01 -.42000000D+01 0.98587876D-02 0.65174475D-04
+ -.42000000D+01 -.41000000D+01 0.23214000D-01 0.13439166D-03
+ -.41000000D+01 -.40000000D+01 0.47056970D-01 0.22597700D-03
+ -.40000000D+01 -.39000000D+01 0.83607970D-01 0.39058141D-03
+ -.39000000D+01 -.38000000D+01 0.13849412D+00 0.95005848D-03
+ -.38000000D+01 -.37000000D+01 0.20791277D+00 0.89646056D-03
+ -.37000000D+01 -.36000000D+01 0.30233345D+00 0.12129449D-02
+ -.36000000D+01 -.35000000D+01 0.41796529D+00 0.17544011D-02
+ -.35000000D+01 -.34000000D+01 0.54968089D+00 0.18938446D-02
+ -.34000000D+01 -.33000000D+01 0.71307013D+00 0.25034242D-02
+ -.33000000D+01 -.32000000D+01 0.89504492D+00 0.28742471D-02
+ -.32000000D+01 -.31000000D+01 0.10914245D+01 0.34130560D-02
+ -.31000000D+01 -.30000000D+01 0.13184046D+01 0.39655257D-02
+ -.30000000D+01 -.29000000D+01 0.15498186D+01 0.42117879D-02
+ -.29000000D+01 -.28000000D+01 0.18217727D+01 0.53206869D-02
+ -.28000000D+01 -.27000000D+01 0.20927833D+01 0.46795869D-02
+ -.27000000D+01 -.26000000D+01 0.24104449D+01 0.56338153D-02
+ -.26000000D+01 -.25000000D+01 0.27130794D+01 0.53465286D-02
+ -.25000000D+01 -.24000000D+01 0.30417459D+01 0.66658265D-02
+ -.24000000D+01 -.23000000D+01 0.33720628D+01 0.71583175D-02
+ -.23000000D+01 -.22000000D+01 0.37065783D+01 0.63150904D-02
+ -.22000000D+01 -.21000000D+01 0.40774870D+01 0.78874244D-02
+ -.21000000D+01 -.20000000D+01 0.44430581D+01 0.76630356D-02
+ -.20000000D+01 -.19000000D+01 0.47934760D+01 0.12759583D-01
+ -.19000000D+01 -.18000000D+01 0.51375831D+01 0.87708364D-02
+ -.18000000D+01 -.17000000D+01 0.54942358D+01 0.85715219D-02
+ -.17000000D+01 -.16000000D+01 0.58090494D+01 0.84464124D-02
+ -.16000000D+01 -.15000000D+01 0.61594769D+01 0.91285958D-02
+ -.15000000D+01 -.14000000D+01 0.64635351D+01 0.99554583D-02
+ -.14000000D+01 -.13000000D+01 0.67690581D+01 0.92817834D-02
+ -.13000000D+01 -.12000000D+01 0.70557208D+01 0.92471128D-02
+ -.12000000D+01 -.11000000D+01 0.73574671D+01 0.10273496D-01
+ -.11000000D+01 -.10000000D+01 0.75978833D+01 0.10176926D-01
+ -.10000000D+01 -.90000000D+00 0.78239603D+01 0.10103673D-01
+ -.90000000D+00 -.80000000D+00 0.80182091D+01 0.99542835D-02
+ -.80000000D+00 -.70000000D+00 0.82199775D+01 0.10348550D-01
+ -.70000000D+00 -.60000000D+00 0.83863207D+01 0.10312613D-01
+ -.60000000D+00 -.50000000D+00 0.85177026D+01 0.10654876D-01
+ -.50000000D+00 -.40000000D+00 0.86626082D+01 0.11004191D-01
+ -.40000000D+00 -.30000000D+00 0.87457903D+01 0.12962346D-01
+ -.30000000D+00 -.20000000D+00 0.88148314D+01 0.10416861D-01
+ -.20000000D+00 -.10000000D+00 0.88594594D+01 0.10842256D-01
+ -.10000000D+00 0.18041124D-15 0.88903968D+01 0.11583361D-01
+ 0.70776718D-15 0.10000000D+00 0.88979756D+01 0.12173402D-01
+ 0.10000000D+00 0.20000000D+00 0.88974341D+01 0.11450182D-01
+ 0.20000000D+00 0.30000000D+00 0.88320704D+01 0.10773020D-01
+ 0.30000000D+00 0.40000000D+00 0.87479307D+01 0.11942600D-01
+ 0.40000000D+00 0.50000000D+00 0.86585797D+01 0.13077482D-01
+ 0.50000000D+00 0.60000000D+00 0.85374021D+01 0.11019679D-01
+ 0.60000000D+00 0.70000000D+00 0.83733892D+01 0.11151763D-01
+ 0.70000000D+00 0.80000000D+00 0.82229961D+01 0.10334139D-01
+ 0.80000000D+00 0.90000000D+00 0.80325418D+01 0.10455128D-01
+ 0.90000000D+00 0.10000000D+01 0.78162400D+01 0.98260793D-02
+ 0.10000000D+01 0.11000000D+01 0.75966741D+01 0.99394755D-02
+ 0.11000000D+01 0.12000000D+01 0.73434992D+01 0.98727085D-02
+ 0.12000000D+01 0.13000000D+01 0.70706420D+01 0.10103420D-01
+ 0.13000000D+01 0.14000000D+01 0.67705292D+01 0.90925863D-02
+ 0.14000000D+01 0.15000000D+01 0.64688463D+01 0.91399940D-02
+ 0.15000000D+01 0.16000000D+01 0.61530896D+01 0.90713902D-02
+ 0.16000000D+01 0.17000000D+01 0.58271773D+01 0.87481110D-02
+ 0.17000000D+01 0.18000000D+01 0.54830106D+01 0.82070818D-02
+ 0.18000000D+01 0.19000000D+01 0.51361749D+01 0.83002937D-02
+ 0.19000000D+01 0.20000000D+01 0.47880313D+01 0.78696955D-02
+ 0.20000000D+01 0.21000000D+01 0.44429197D+01 0.77712845D-02
+ 0.21000000D+01 0.22000000D+01 0.40849017D+01 0.73059328D-02
+ 0.22000000D+01 0.23000000D+01 0.37148970D+01 0.66630278D-02
+ 0.23000000D+01 0.24000000D+01 0.33649550D+01 0.61865676D-02
+ 0.24000000D+01 0.25000000D+01 0.30451228D+01 0.10952371D-01
+ 0.25000000D+01 0.26000000D+01 0.27335473D+01 0.98951988D-02
+ 0.26000000D+01 0.27000000D+01 0.24069036D+01 0.53554824D-02
+ 0.27000000D+01 0.28000000D+01 0.20949848D+01 0.48353595D-02
+ 0.28000000D+01 0.29000000D+01 0.18263714D+01 0.47072924D-02
+ 0.29000000D+01 0.30000000D+01 0.15559433D+01 0.43081178D-02
+ 0.30000000D+01 0.31000000D+01 0.13152752D+01 0.41046513D-02
+ 0.31000000D+01 0.32000000D+01 0.10911028D+01 0.33065900D-02
+ 0.32000000D+01 0.33000000D+01 0.89268629D+00 0.32337909D-02
+ 0.33000000D+01 0.34000000D+01 0.71033295D+00 0.26774638D-02
+ 0.34000000D+01 0.35000000D+01 0.55247873D+00 0.19702648D-02
+ 0.35000000D+01 0.36000000D+01 0.41777488D+00 0.17211759D-02
+ 0.36000000D+01 0.37000000D+01 0.30001440D+00 0.14199631D-02
+ 0.37000000D+01 0.38000000D+01 0.20841563D+00 0.10734542D-02
+ 0.38000000D+01 0.39000000D+01 0.13729682D+00 0.60030089D-03
+ 0.39000000D+01 0.40000000D+01 0.83545234D-01 0.41205297D-03
+ 0.40000000D+01 0.41000000D+01 0.46853470D-01 0.22973157D-03
+ 0.41000000D+01 0.42000000D+01 0.23112586D-01 0.13371126D-03
+ 0.42000000D+01 0.43000000D+01 0.97900372D-02 0.71953862D-04
+ 0.43000000D+01 0.44000000D+01 0.33734781D-02 0.33150664D-04
+ 0.44000000D+01 0.45000000D+01 0.81742276D-03 0.13922326D-04
+ 0.45000000D+01 0.46000000D+01 0.89877514D-04 0.46832015D-05
+ 0.46000000D+01 0.47000000D+01 0.51983749D-06 0.44150911D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51520949D-06 0.44066945D-06
+ -.46000000D+01 -.45000000D+01 0.87426053D-04 0.46815610D-05
+ -.45000000D+01 -.44000000D+01 0.78663941D-03 0.14401210D-04
+ -.44000000D+01 -.43000000D+01 0.32449592D-02 0.31702811D-04
+ -.43000000D+01 -.42000000D+01 0.92598623D-02 0.65125426D-04
+ -.42000000D+01 -.41000000D+01 0.21546284D-01 0.13426279D-03
+ -.41000000D+01 -.40000000D+01 0.43182120D-01 0.22390261D-03
+ -.40000000D+01 -.39000000D+01 0.75821018D-01 0.38876179D-03
+ -.39000000D+01 -.38000000D+01 0.12435543D+00 0.94879829D-03
+ -.38000000D+01 -.37000000D+01 0.18439434D+00 0.89435768D-03
+ -.37000000D+01 -.36000000D+01 0.26567128D+00 0.12085310D-02
+ -.36000000D+01 -.35000000D+01 0.36382557D+00 0.17490294D-02
+ -.35000000D+01 -.34000000D+01 0.47346382D+00 0.18848559D-02
+ -.34000000D+01 -.33000000D+01 0.60953060D+00 0.24933598D-02
+ -.33000000D+01 -.32000000D+01 0.75925115D+00 0.28623176D-02
+ -.32000000D+01 -.31000000D+01 0.91735501D+00 0.33994620D-02
+ -.31000000D+01 -.30000000D+01 0.11008518D+01 0.39467991D-02
+ -.30000000D+01 -.29000000D+01 0.12837217D+01 0.41890719D-02
+ -.29000000D+01 -.28000000D+01 0.15011380D+01 0.52980766D-02
+ -.28000000D+01 -.27000000D+01 0.17139017D+01 0.46484620D-02
+ -.27000000D+01 -.26000000D+01 0.19671366D+01 0.56114799D-02
+ -.26000000D+01 -.25000000D+01 0.22019457D+01 0.53102503D-02
+ -.25000000D+01 -.24000000D+01 0.24579791D+01 0.66292900D-02
+ -.24000000D+01 -.23000000D+01 0.27123093D+01 0.71204083D-02
+ -.23000000D+01 -.22000000D+01 0.29689119D+01 0.62866015D-02
+ -.22000000D+01 -.21000000D+01 0.32576710D+01 0.78497119D-02
+ -.21000000D+01 -.20000000D+01 0.35404444D+01 0.76140662D-02
+ -.20000000D+01 -.19000000D+01 0.38061460D+01 0.12739463D-01
+ -.19000000D+01 -.18000000D+01 0.40652627D+01 0.87387194D-02
+ -.18000000D+01 -.17000000D+01 0.43371317D+01 0.85292461D-02
+ -.17000000D+01 -.16000000D+01 0.45680972D+01 0.84025921D-02
+ -.16000000D+01 -.15000000D+01 0.48356387D+01 0.90754476D-02
+ -.15000000D+01 -.14000000D+01 0.50591667D+01 0.98612771D-02
+ -.14000000D+01 -.13000000D+01 0.52879677D+01 0.91725387D-02
+ -.13000000D+01 -.12000000D+01 0.54990362D+01 0.91876349D-02
+ -.12000000D+01 -.11000000D+01 0.57292892D+01 0.10225687D-01
+ -.11000000D+01 -.10000000D+01 0.59027454D+01 0.10111500D-01
+ -.10000000D+01 -.90000000D+00 0.60673750D+01 0.10033835D-01
+ -.90000000D+00 -.80000000D+00 0.62044093D+01 0.98948186D-02
+ -.80000000D+00 -.70000000D+00 0.63543622D+01 0.10293048D-01
+ -.70000000D+00 -.60000000D+00 0.64761641D+01 0.10257392D-01
+ -.60000000D+00 -.50000000D+00 0.65660932D+01 0.10594277D-01
+ -.50000000D+00 -.40000000D+00 0.66778116D+01 0.10928259D-01
+ -.40000000D+00 -.30000000D+00 0.67345898D+01 0.12924801D-01
+ -.30000000D+00 -.20000000D+00 0.67823863D+01 0.10335613D-01
+ -.20000000D+00 -.10000000D+00 0.68133926D+01 0.10744031D-01
+ -.10000000D+00 0.18041124D-15 0.68410055D+01 0.11020052D-01
+ 0.70776718D-15 0.10000000D+00 0.68435129D+01 0.11574596D-01
+ 0.10000000D+00 0.20000000D+00 0.68514245D+01 0.11359431D-01
+ 0.20000000D+00 0.30000000D+00 0.67995538D+01 0.10519281D-01
+ 0.30000000D+00 0.40000000D+00 0.67379253D+01 0.11620911D-01
+ 0.40000000D+00 0.50000000D+00 0.66709666D+01 0.12606698D-01
+ 0.50000000D+00 0.60000000D+00 0.65875999D+01 0.10536421D-01
+ 0.60000000D+00 0.70000000D+00 0.64620778D+01 0.11092390D-01
+ 0.70000000D+00 0.80000000D+00 0.63571387D+01 0.10283818D-01
+ 0.80000000D+00 0.90000000D+00 0.62190890D+01 0.10358890D-01
+ 0.90000000D+00 0.10000000D+01 0.60592277D+01 0.97286568D-02
+ 0.10000000D+01 0.11000000D+01 0.59022507D+01 0.98768255D-02
+ 0.11000000D+01 0.12000000D+01 0.57153216D+01 0.98173911D-02
+ 0.12000000D+01 0.13000000D+01 0.55140873D+01 0.10037053D-01
+ 0.13000000D+01 0.14000000D+01 0.52890902D+01 0.90344356D-02
+ 0.14000000D+01 0.15000000D+01 0.50646199D+01 0.90758310D-02
+ 0.15000000D+01 0.16000000D+01 0.48304392D+01 0.89410292D-02
+ 0.16000000D+01 0.17000000D+01 0.45851163D+01 0.86593497D-02
+ 0.17000000D+01 0.18000000D+01 0.43255567D+01 0.81648383D-02
+ 0.18000000D+01 0.19000000D+01 0.40641529D+01 0.82496924D-02
+ 0.19000000D+01 0.20000000D+01 0.38003708D+01 0.77974737D-02
+ 0.20000000D+01 0.21000000D+01 0.35388481D+01 0.76031973D-02
+ 0.21000000D+01 0.22000000D+01 0.32668755D+01 0.71573000D-02
+ 0.22000000D+01 0.23000000D+01 0.29768107D+01 0.66211050D-02
+ 0.23000000D+01 0.24000000D+01 0.27051635D+01 0.60973968D-02
+ 0.24000000D+01 0.25000000D+01 0.24657732D+01 0.87083373D-02
+ 0.25000000D+01 0.26000000D+01 0.22180835D+01 0.73802577D-02
+ 0.26000000D+01 0.27000000D+01 0.19629625D+01 0.53236078D-02
+ 0.27000000D+01 0.28000000D+01 0.17161108D+01 0.47599131D-02
+ 0.28000000D+01 0.29000000D+01 0.15060382D+01 0.46461873D-02
+ 0.29000000D+01 0.30000000D+01 0.12898555D+01 0.42881847D-02
+ 0.30000000D+01 0.31000000D+01 0.10978960D+01 0.40711930D-02
+ 0.31000000D+01 0.32000000D+01 0.91704388D+00 0.32671243D-02
+ 0.32000000D+01 0.33000000D+01 0.75674283D+00 0.32132585D-02
+ 0.33000000D+01 0.34000000D+01 0.60683353D+00 0.26694124D-02
+ 0.34000000D+01 0.35000000D+01 0.47614060D+00 0.19632591D-02
+ 0.35000000D+01 0.36000000D+01 0.36370406D+00 0.17161214D-02
+ 0.36000000D+01 0.37000000D+01 0.26329032D+00 0.14143602D-02
+ 0.37000000D+01 0.38000000D+01 0.18481943D+00 0.10706207D-02
+ 0.38000000D+01 0.39000000D+01 0.12318710D+00 0.59856858D-03
+ 0.39000000D+01 0.40000000D+01 0.75766189D-01 0.41118999D-03
+ 0.40000000D+01 0.41000000D+01 0.42985832D-01 0.22932010D-03
+ 0.41000000D+01 0.42000000D+01 0.21445191D-01 0.13347956D-03
+ 0.42000000D+01 0.43000000D+01 0.91911076D-02 0.71819042D-04
+ 0.43000000D+01 0.44000000D+01 0.32099625D-02 0.33138266D-04
+ 0.44000000D+01 0.45000000D+01 0.78948054D-03 0.13920880D-04
+ 0.45000000D+01 0.46000000D+01 0.88152116D-04 0.46831588D-05
+ 0.46000000D+01 0.47000000D+01 0.51781201D-06 0.44150908D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51619229D-06 0.44066947D-06
+ -.46000000D+01 -.45000000D+01 0.88224204D-04 0.46815824D-05
+ -.45000000D+01 -.44000000D+01 0.79919306D-03 0.14402120D-04
+ -.44000000D+01 -.43000000D+01 0.33162531D-02 0.31708151D-04
+ -.43000000D+01 -.42000000D+01 0.95142642D-02 0.65147715D-04
+ -.42000000D+01 -.41000000D+01 0.22238588D-01 0.13432237D-03
+ -.41000000D+01 -.40000000D+01 0.44755448D-01 0.22460160D-03
+ -.40000000D+01 -.39000000D+01 0.78919916D-01 0.38943775D-03
+ -.39000000D+01 -.38000000D+01 0.12986962D+00 0.94935567D-03
+ -.38000000D+01 -.37000000D+01 0.19339029D+00 0.89525931D-03
+ -.37000000D+01 -.36000000D+01 0.27944638D+00 0.12103109D-02
+ -.36000000D+01 -.35000000D+01 0.38379490D+00 0.17512531D-02
+ -.35000000D+01 -.34000000D+01 0.50111708D+00 0.18883547D-02
+ -.34000000D+01 -.33000000D+01 0.64647429D+00 0.24971802D-02
+ -.33000000D+01 -.32000000D+01 0.80701274D+00 0.28664094D-02
+ -.32000000D+01 -.31000000D+01 0.97760136D+00 0.34045416D-02
+ -.31000000D+01 -.30000000D+01 0.11751747D+01 0.39544149D-02
+ -.30000000D+01 -.29000000D+01 0.13734330D+01 0.41974584D-02
+ -.29000000D+01 -.28000000D+01 0.16079325D+01 0.53057579D-02
+ -.28000000D+01 -.27000000D+01 0.18387155D+01 0.46590835D-02
+ -.27000000D+01 -.26000000D+01 0.21116707D+01 0.56182084D-02
+ -.26000000D+01 -.25000000D+01 0.23668062D+01 0.53194858D-02
+ -.25000000D+01 -.24000000D+01 0.26445279D+01 0.66418615D-02
+ -.24000000D+01 -.23000000D+01 0.29213766D+01 0.71324558D-02
+ -.23000000D+01 -.22000000D+01 0.32006944D+01 0.62963741D-02
+ -.22000000D+01 -.21000000D+01 0.35132173D+01 0.78612298D-02
+ -.21000000D+01 -.20000000D+01 0.38200046D+01 0.76280015D-02
+ -.20000000D+01 -.19000000D+01 0.41099627D+01 0.12747012D-01
+ -.19000000D+01 -.18000000D+01 0.43931041D+01 0.87492558D-02
+ -.18000000D+01 -.17000000D+01 0.46888429D+01 0.85434446D-02
+ -.17000000D+01 -.16000000D+01 0.49430931D+01 0.84163825D-02
+ -.16000000D+01 -.15000000D+01 0.52337761D+01 0.90921263D-02
+ -.15000000D+01 -.14000000D+01 0.54793751D+01 0.98948093D-02
+ -.14000000D+01 -.13000000D+01 0.57292137D+01 0.92099311D-02
+ -.13000000D+01 -.12000000D+01 0.59610194D+01 0.92043109D-02
+ -.12000000D+01 -.11000000D+01 0.62105402D+01 0.10240777D-01
+ -.11000000D+01 -.10000000D+01 0.64022309D+01 0.10130634D-01
+ -.10000000D+01 -.90000000D+00 0.65833585D+01 0.10055097D-01
+ -.90000000D+00 -.80000000D+00 0.67355737D+01 0.99139068D-02
+ -.80000000D+00 -.70000000D+00 0.68993753D+01 0.10309673D-01
+ -.70000000D+00 -.60000000D+00 0.70330959D+01 0.10275371D-01
+ -.60000000D+00 -.50000000D+00 0.71339666D+01 0.10614580D-01
+ -.50000000D+00 -.40000000D+00 0.72544527D+01 0.10945683D-01
+ -.40000000D+00 -.30000000D+00 0.73183222D+01 0.12936218D-01
+ -.30000000D+00 -.20000000D+00 0.73716869D+01 0.10359068D-01
+ -.20000000D+00 -.10000000D+00 0.74061910D+01 0.10773921D-01
+ -.10000000D+00 0.18041124D-15 0.74346913D+01 0.11193867D-01
+ 0.70776718D-15 0.10000000D+00 0.74387185D+01 0.11766384D-01
+ 0.10000000D+00 0.20000000D+00 0.74443039D+01 0.11392690D-01
+ 0.20000000D+00 0.30000000D+00 0.73890488D+01 0.10608463D-01
+ 0.30000000D+00 0.40000000D+00 0.73211133D+01 0.11717481D-01
+ 0.40000000D+00 0.50000000D+00 0.72485204D+01 0.12720299D-01
+ 0.50000000D+00 0.60000000D+00 0.71549868D+01 0.10659217D-01
+ 0.60000000D+00 0.70000000D+00 0.70192975D+01 0.11111035D-01
+ 0.70000000D+00 0.80000000D+00 0.69023673D+01 0.10299952D-01
+ 0.80000000D+00 0.90000000D+00 0.67502605D+01 0.10386749D-01
+ 0.90000000D+00 0.10000000D+01 0.65751702D+01 0.97553622D-02
+ 0.10000000D+01 0.11000000D+01 0.64015390D+01 0.98943678D-02
+ 0.11000000D+01 0.12000000D+01 0.61967114D+01 0.98341497D-02
+ 0.12000000D+01 0.13000000D+01 0.59759424D+01 0.10055393D-01
+ 0.13000000D+01 0.14000000D+01 0.57305126D+01 0.90504216D-02
+ 0.14000000D+01 0.15000000D+01 0.54848748D+01 0.90935206D-02
+ 0.15000000D+01 0.16000000D+01 0.52282157D+01 0.89629067D-02
+ 0.16000000D+01 0.17000000D+01 0.49603488D+01 0.86721619D-02
+ 0.17000000D+01 0.18000000D+01 0.46773084D+01 0.81765341D-02
+ 0.18000000D+01 0.19000000D+01 0.43918452D+01 0.82645079D-02
+ 0.19000000D+01 0.20000000D+01 0.41042606D+01 0.78187981D-02
+ 0.20000000D+01 0.21000000D+01 0.38186523D+01 0.76258684D-02
+ 0.21000000D+01 0.22000000D+01 0.35221749D+01 0.71718894D-02
+ 0.22000000D+01 0.23000000D+01 0.32087124D+01 0.66354772D-02
+ 0.23000000D+01 0.24000000D+01 0.29141132D+01 0.61219837D-02
+ 0.24000000D+01 0.25000000D+01 0.26509767D+01 0.94282094D-02
+ 0.25000000D+01 0.26000000D+01 0.23843975D+01 0.82087443D-02
+ 0.26000000D+01 0.27000000D+01 0.21075411D+01 0.53312075D-02
+ 0.27000000D+01 0.28000000D+01 0.18409081D+01 0.47855573D-02
+ 0.28000000D+01 0.29000000D+01 0.16128008D+01 0.46699471D-02
+ 0.29000000D+01 0.30000000D+01 0.13795747D+01 0.42959082D-02
+ 0.30000000D+01 0.31000000D+01 0.11721421D+01 0.40833595D-02
+ 0.31000000D+01 0.32000000D+01 0.97726080D+00 0.32796371D-02
+ 0.32000000D+01 0.33000000D+01 0.80456578D+00 0.32189506D-02
+ 0.33000000D+01 0.34000000D+01 0.64378518D+00 0.26724320D-02
+ 0.34000000D+01 0.35000000D+01 0.50381875D+00 0.19661175D-02
+ 0.35000000D+01 0.36000000D+01 0.38365274D+00 0.17181219D-02
+ 0.36000000D+01 0.37000000D+01 0.27707708D+00 0.14159447D-02
+ 0.37000000D+01 0.38000000D+01 0.19384377D+00 0.10716845D-02
+ 0.38000000D+01 0.39000000D+01 0.12868872D+00 0.59925585D-03
+ 0.39000000D+01 0.40000000D+01 0.78861372D-01 0.41154546D-03
+ 0.40000000D+01 0.41000000D+01 0.44556842D-01 0.22950110D-03
+ 0.41000000D+01 0.42000000D+01 0.22137198D-01 0.13358072D-03
+ 0.42000000D+01 0.43000000D+01 0.94455309D-02 0.71882217D-04
+ 0.43000000D+01 0.44000000D+01 0.32812093D-02 0.33143863D-04
+ 0.44000000D+01 0.45000000D+01 0.80201581D-03 0.13921546D-04
+ 0.45000000D+01 0.46000000D+01 0.88951928D-04 0.46831790D-05
+ 0.46000000D+01 0.47000000D+01 0.51879396D-06 0.44150909D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51672227D-06 0.44066947D-06
+ -.46000000D+01 -.45000000D+01 0.88681503D-04 0.46815945D-05
+ -.45000000D+01 -.44000000D+01 0.80668637D-03 0.14402643D-04
+ -.44000000D+01 -.43000000D+01 0.33602591D-02 0.31711256D-04
+ -.43000000D+01 -.42000000D+01 0.96756862D-02 0.65160742D-04
+ -.42000000D+01 -.41000000D+01 0.22688268D-01 0.13435655D-03
+ -.41000000D+01 -.40000000D+01 0.45799658D-01 0.22517191D-03
+ -.40000000D+01 -.39000000D+01 0.81014753D-01 0.38993440D-03
+ -.39000000D+01 -.38000000D+01 0.13366473D+00 0.94969243D-03
+ -.38000000D+01 -.37000000D+01 0.19968357D+00 0.89581702D-03
+ -.37000000D+01 -.36000000D+01 0.28922317D+00 0.12114877D-02
+ -.36000000D+01 -.35000000D+01 0.39817192D+00 0.17526728D-02
+ -.35000000D+01 -.34000000D+01 0.52126967D+00 0.18907451D-02
+ -.34000000D+01 -.33000000D+01 0.67372076D+00 0.24998309D-02
+ -.33000000D+01 -.32000000D+01 0.84258363D+00 0.28693835D-02
+ -.32000000D+01 -.31000000D+01 0.10229466D+01 0.34080117D-02
+ -.31000000D+01 -.30000000D+01 0.12315781D+01 0.39592829D-02
+ -.30000000D+01 -.29000000D+01 0.14420647D+01 0.42032573D-02
+ -.29000000D+01 -.28000000D+01 0.16902227D+01 0.53116142D-02
+ -.28000000D+01 -.27000000D+01 0.19354787D+01 0.46672498D-02
+ -.27000000D+01 -.26000000D+01 0.22243744D+01 0.56232367D-02
+ -.26000000D+01 -.25000000D+01 0.24960823D+01 0.53274211D-02
+ -.25000000D+01 -.24000000D+01 0.27915488D+01 0.66510109D-02
+ -.24000000D+01 -.23000000D+01 0.30868380D+01 0.71418800D-02
+ -.23000000D+01 -.22000000D+01 0.33849075D+01 0.63036074D-02
+ -.22000000D+01 -.21000000D+01 0.37171070D+01 0.78698796D-02
+ -.21000000D+01 -.20000000D+01 0.40436966D+01 0.76398571D-02
+ -.20000000D+01 -.19000000D+01 0.43537995D+01 0.12752328D-01
+ -.19000000D+01 -.18000000D+01 0.46570461D+01 0.87572259D-02
+ -.18000000D+01 -.17000000D+01 0.49727415D+01 0.85537609D-02
+ -.17000000D+01 -.16000000D+01 0.52466174D+01 0.84270953D-02
+ -.16000000D+01 -.15000000D+01 0.55567158D+01 0.91047094D-02
+ -.15000000D+01 -.14000000D+01 0.58209682D+01 0.99191234D-02
+ -.14000000D+01 -.13000000D+01 0.60886082D+01 0.92386713D-02
+ -.13000000D+01 -.12000000D+01 0.63378985D+01 0.92185495D-02
+ -.12000000D+01 -.11000000D+01 0.66038555D+01 0.10252638D-01
+ -.11000000D+01 -.10000000D+01 0.68109755D+01 0.10146806D-01
+ -.10000000D+01 -.90000000D+00 0.70061717D+01 0.10072634D-01
+ -.90000000D+00 -.80000000D+00 0.71714458D+01 0.99287059D-02
+ -.80000000D+00 -.70000000D+00 0.73470323D+01 0.10322811D-01
+ -.70000000D+00 -.60000000D+00 0.74909214D+01 0.10288860D-01
+ -.60000000D+00 -.50000000D+00 0.76011967D+01 0.10629679D-01
+ -.50000000D+00 -.40000000D+00 0.77291189D+01 0.10960186D-01
+ -.40000000D+00 -.30000000D+00 0.77991410D+01 0.12942651D-01
+ -.30000000D+00 -.20000000D+00 0.78572361D+01 0.10377593D-01
+ -.20000000D+00 -.10000000D+00 0.78948261D+01 0.10797567D-01
+ -.10000000D+00 0.18041124D-15 0.79240427D+01 0.11347187D-01
+ 0.70776718D-15 0.10000000D+00 0.79293253D+01 0.11928367D-01
+ 0.10000000D+00 0.20000000D+00 0.79329423D+01 0.11414793D-01
+ 0.20000000D+00 0.30000000D+00 0.78746785D+01 0.10677518D-01
+ 0.30000000D+00 0.40000000D+00 0.78014765D+01 0.11802196D-01
+ 0.40000000D+00 0.50000000D+00 0.77240725D+01 0.12843121D-01
+ 0.50000000D+00 0.60000000D+00 0.76217238D+01 0.10786787D-01
+ 0.60000000D+00 0.70000000D+00 0.74773653D+01 0.11126238D-01
+ 0.70000000D+00 0.80000000D+00 0.73501572D+01 0.10311986D-01
+ 0.80000000D+00 0.90000000D+00 0.71860567D+01 0.10410182D-01
+ 0.90000000D+00 0.10000000D+01 0.69980378D+01 0.97788390D-02
+ 0.10000000D+01 0.11000000D+01 0.68101088D+01 0.99086156D-02
+ 0.11000000D+01 0.12000000D+01 0.65900723D+01 0.98472846D-02
+ 0.12000000D+01 0.13000000D+01 0.63527523D+01 0.10070772D-01
+ 0.13000000D+01 0.14000000D+01 0.60900136D+01 0.90633980D-02
+ 0.14000000D+01 0.15000000D+01 0.58265268D+01 0.91090721D-02
+ 0.15000000D+01 0.16000000D+01 0.55508143D+01 0.89864070D-02
+ 0.16000000D+01 0.17000000D+01 0.52640989D+01 0.86854974D-02
+ 0.17000000D+01 0.18000000D+01 0.49613029D+01 0.81861267D-02
+ 0.18000000D+01 0.19000000D+01 0.46556641D+01 0.82764785D-02
+ 0.19000000D+01 0.20000000D+01 0.43481765D+01 0.78360717D-02
+ 0.20000000D+01 0.21000000D+01 0.40425810D+01 0.76470826D-02
+ 0.21000000D+01 0.22000000D+01 0.37257644D+01 0.71869022D-02
+ 0.22000000D+01 0.23000000D+01 0.33930376D+01 0.66459683D-02
+ 0.23000000D+01 0.24000000D+01 0.30795501D+01 0.61444856D-02
+ 0.24000000D+01 0.25000000D+01 0.27968338D+01 0.10046870D-01
+ 0.25000000D+01 0.26000000D+01 0.25148530D+01 0.89032478D-02
+ 0.26000000D+01 0.27000000D+01 0.22203602D+01 0.53380390D-02
+ 0.27000000D+01 0.28000000D+01 0.19376654D+01 0.48044335D-02
+ 0.28000000D+01 0.29000000D+01 0.16950252D+01 0.46863644D-02
+ 0.29000000D+01 0.30000000D+01 0.14482135D+01 0.43011927D-02
+ 0.30000000D+01 0.31000000D+01 0.12284896D+01 0.40922992D-02
+ 0.31000000D+01 0.32000000D+01 0.10225859D+01 0.32890678D-02
+ 0.32000000D+01 0.33000000D+01 0.84019581D+00 0.32232042D-02
+ 0.33000000D+01 0.34000000D+01 0.67102677D+00 0.26745312D-02
+ 0.34000000D+01 0.35000000D+01 0.52400145D+00 0.19679718D-02
+ 0.35000000D+01 0.36000000D+01 0.39801244D+00 0.17194590D-02
+ 0.36000000D+01 0.37000000D+01 0.28686973D+00 0.14173407D-02
+ 0.37000000D+01 0.38000000D+01 0.20015831D+00 0.10724409D-02
+ 0.38000000D+01 0.39000000D+01 0.13247541D+00 0.59971038D-03
+ 0.39000000D+01 0.40000000D+01 0.80954277D-01 0.41177371D-03
+ 0.40000000D+01 0.41000000D+01 0.45599031D-01 0.22961114D-03
+ 0.41000000D+01 0.42000000D+01 0.22586814D-01 0.13364253D-03
+ 0.42000000D+01 0.43000000D+01 0.96069521D-02 0.71917844D-04
+ 0.43000000D+01 0.44000000D+01 0.33251917D-02 0.33147168D-04
+ 0.44000000D+01 0.45000000D+01 0.80949782D-03 0.13921930D-04
+ 0.45000000D+01 0.46000000D+01 0.89410303D-04 0.46831903D-05
+ 0.46000000D+01 0.47000000D+01 0.51932354D-06 0.44150910D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51697354D-06 0.44066948D-06
+ -.46000000D+01 -.45000000D+01 0.88906198D-04 0.46816004D-05
+ -.45000000D+01 -.44000000D+01 0.81047012D-03 0.14402901D-04
+ -.44000000D+01 -.43000000D+01 0.33830311D-02 0.31712806D-04
+ -.43000000D+01 -.42000000D+01 0.97610501D-02 0.65167283D-04
+ -.42000000D+01 -.41000000D+01 0.22930749D-01 0.13437341D-03
+ -.41000000D+01 -.40000000D+01 0.46373264D-01 0.22552442D-03
+ -.40000000D+01 -.39000000D+01 0.82185018D-01 0.39022416D-03
+ -.39000000D+01 -.38000000D+01 0.13582009D+00 0.94986529D-03
+ -.38000000D+01 -.37000000D+01 0.20331442D+00 0.89611282D-03
+ -.37000000D+01 -.36000000D+01 0.29494447D+00 0.12121430D-02
+ -.36000000D+01 -.35000000D+01 0.40670777D+00 0.17534471D-02
+ -.35000000D+01 -.34000000D+01 0.53338656D+00 0.18921126D-02
+ -.34000000D+01 -.33000000D+01 0.69031065D+00 0.25013801D-02
+ -.33000000D+01 -.32000000D+01 0.86447023D+00 0.28712815D-02
+ -.32000000D+01 -.31000000D+01 0.10511759D+01 0.34100777D-02
+ -.31000000D+01 -.30000000D+01 0.12670145D+01 0.39619834D-02
+ -.30000000D+01 -.29000000D+01 0.14855789D+01 0.42067302D-02
+ -.29000000D+01 -.28000000D+01 0.17428266D+01 0.53153235D-02
+ -.28000000D+01 -.27000000D+01 0.19977897D+01 0.46723839D-02
+ -.27000000D+01 -.26000000D+01 0.22974353D+01 0.56267545D-02
+ -.26000000D+01 -.25000000D+01 0.25804711D+01 0.53336267D-02
+ -.25000000D+01 -.24000000D+01 0.28880786D+01 0.66568936D-02
+ -.24000000D+01 -.23000000D+01 0.31960303D+01 0.71481176D-02
+ -.23000000D+01 -.22000000D+01 0.35071008D+01 0.63082043D-02
+ -.22000000D+01 -.21000000D+01 0.38529984D+01 0.78758158D-02
+ -.21000000D+01 -.20000000D+01 0.41933411D+01 0.76484255D-02
+ -.20000000D+01 -.19000000D+01 0.45175258D+01 0.12755490D-01
+ -.19000000D+01 -.18000000D+01 0.48349271D+01 0.87624350D-02
+ -.18000000D+01 -.17000000D+01 0.51646986D+01 0.85604037D-02
+ -.17000000D+01 -.16000000D+01 0.54525173D+01 0.84342873D-02
+ -.16000000D+01 -.15000000D+01 0.57763583D+01 0.91130892D-02
+ -.15000000D+01 -.14000000D+01 0.60539409D+01 0.99336836D-02
+ -.14000000D+01 -.13000000D+01 0.63343091D+01 0.92564362D-02
+ -.13000000D+01 -.12000000D+01 0.65960760D+01 0.92287777D-02
+ -.12000000D+01 -.11000000D+01 0.68738792D+01 0.10260561D-01
+ -.11000000D+01 -.10000000D+01 0.70920421D+01 0.10158112D-01
+ -.10000000D+01 -.90000000D+00 0.72974048D+01 0.10084493D-01
+ -.90000000D+00 -.80000000D+00 0.74721548D+01 0.99382590D-02
+ -.80000000D+00 -.70000000D+00 0.76562553D+01 0.10331756D-01
+ -.70000000D+00 -.60000000D+00 0.78074863D+01 0.10297652D-01
+ -.60000000D+00 -.50000000D+00 0.79246087D+01 0.10639360D-01
+ -.50000000D+00 -.40000000D+00 0.80579071D+01 0.10970821D-01
+ -.40000000D+00 -.30000000D+00 0.81324173D+01 0.12946089D-01
+ -.30000000D+00 -.20000000D+00 0.81939268D+01 0.10390093D-01
+ -.20000000D+00 -.10000000D+00 0.82338088D+01 0.10813210D-01
+ -.10000000D+00 0.18041124D-15 0.82635398D+01 0.11446702D-01
+ 0.70776718D-15 0.10000000D+00 0.82696692D+01 0.12031584D-01
+ 0.10000000D+00 0.20000000D+00 0.82718899D+01 0.11427926D-01
+ 0.20000000D+00 0.30000000D+00 0.82113759D+01 0.10718876D-01
+ 0.30000000D+00 0.40000000D+00 0.81344814D+01 0.11859055D-01
+ 0.40000000D+00 0.50000000D+00 0.80534624D+01 0.12935633D-01
+ 0.50000000D+00 0.60000000D+00 0.79447876D+01 0.10879965D-01
+ 0.60000000D+00 0.70000000D+00 0.77941148D+01 0.11136314D-01
+ 0.70000000D+00 0.80000000D+00 0.76594299D+01 0.10319938D-01
+ 0.80000000D+00 0.90000000D+00 0.74866711D+01 0.10426625D-01
+ 0.90000000D+00 0.10000000D+01 0.72893562D+01 0.97958735D-02
+ 0.10000000D+01 0.11000000D+01 0.70910561D+01 0.99186639D-02
+ 0.11000000D+01 0.12000000D+01 0.68600826D+01 0.98561594D-02
+ 0.12000000D+01 0.13000000D+01 0.66109076D+01 0.10081787D-01
+ 0.13000000D+01 0.14000000D+01 0.63357593D+01 0.90726066D-02
+ 0.14000000D+01 0.15000000D+01 0.60595204D+01 0.91204537D-02
+ 0.15000000D+01 0.16000000D+01 0.57702186D+01 0.90086754D-02
+ 0.16000000D+01 0.17000000D+01 0.54701892D+01 0.86995249D-02
+ 0.17000000D+01 0.18000000D+01 0.51533509D+01 0.81930832D-02
+ 0.18000000D+01 0.19000000D+01 0.48334782D+01 0.82847937D-02
+ 0.19000000D+01 0.20000000D+01 0.45119659D+01 0.78479544D-02
+ 0.20000000D+01 0.21000000D+01 0.41924527D+01 0.76686992D-02
+ 0.21000000D+01 0.22000000D+01 0.38613498D+01 0.72047946D-02
+ 0.22000000D+01 0.23000000D+01 0.35153100D+01 0.66525844D-02
+ 0.23000000D+01 0.24000000D+01 0.31887733D+01 0.61606848D-02
+ 0.24000000D+01 0.25000000D+01 0.28925861D+01 0.10436093D-01
+ 0.25000000D+01 0.26000000D+01 0.25999763D+01 0.93329988D-02
+ 0.26000000D+01 0.27000000D+01 0.22935563D+01 0.53436781D-02
+ 0.27000000D+01 0.28000000D+01 0.19999738D+01 0.48165072D-02
+ 0.28000000D+01 0.29000000D+01 0.17475641D+01 0.46956337D-02
+ 0.29000000D+01 0.30000000D+01 0.14917306D+01 0.43042071D-02
+ 0.30000000D+01 0.31000000D+01 0.12638967D+01 0.40975986D-02
+ 0.31000000D+01 0.32000000D+01 0.10508063D+01 0.32949140D-02
+ 0.32000000D+01 0.33000000D+01 0.86212041D+00 0.32260141D-02
+ 0.33000000D+01 0.34000000D+01 0.68760501D+00 0.26757777D-02
+ 0.34000000D+01 0.35000000D+01 0.53614276D+00 0.19689971D-02
+ 0.35000000D+01 0.36000000D+01 0.40653640D+00 0.17202183D-02
+ 0.36000000D+01 0.37000000D+01 0.29260409D+00 0.14183567D-02
+ 0.37000000D+01 0.38000000D+01 0.20380170D+00 0.10728846D-02
+ 0.38000000D+01 0.39000000D+01 0.13462658D+00 0.59996894D-03
+ 0.39000000D+01 0.40000000D+01 0.82123579D-01 0.41189934D-03
+ 0.40000000D+01 0.41000000D+01 0.46171375D-01 0.22966791D-03
+ 0.41000000D+01 0.42000000D+01 0.22829300D-01 0.13367469D-03
+ 0.42000000D+01 0.43000000D+01 0.96923105D-02 0.71935237D-04
+ 0.43000000D+01 0.44000000D+01 0.33479523D-02 0.33148834D-04
+ 0.44000000D+01 0.45000000D+01 0.81327582D-03 0.13922120D-04
+ 0.45000000D+01 0.46000000D+01 0.89635564D-04 0.46831957D-05
+ 0.46000000D+01 0.47000000D+01 0.51957465D-06 0.44150910D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51415444D-06 0.44066945D-06
+ -.46000000D+01 -.45000000D+01 0.86361776D-04 0.46815656D-05
+ -.45000000D+01 -.44000000D+01 0.76829574D-03 0.14401608D-04
+ -.44000000D+01 -.43000000D+01 0.31356997D-02 0.31706969D-04
+ -.43000000D+01 -.42000000D+01 0.88593619D-02 0.65142982D-04
+ -.42000000D+01 -.41000000D+01 0.20435924D-01 0.13433302D-03
+ -.41000000D+01 -.40000000D+01 0.40634596D-01 0.22381420D-03
+ -.40000000D+01 -.39000000D+01 0.70737932D-01 0.38897768D-03
+ -.39000000D+01 -.38000000D+01 0.11524553D+00 0.94931162D-03
+ -.38000000D+01 -.37000000D+01 0.16942799D+00 0.89534526D-03
+ -.37000000D+01 -.36000000D+01 0.24265193D+00 0.12097995D-02
+ -.36000000D+01 -.35000000D+01 0.33030726D+00 0.17508876D-02
+ -.35000000D+01 -.34000000D+01 0.42685002D+00 0.18874275D-02
+ -.34000000D+01 -.33000000D+01 0.54708181D+00 0.24963660D-02
+ -.33000000D+01 -.32000000D+01 0.67837813D+00 0.28660982D-02
+ -.32000000D+01 -.31000000D+01 0.81515443D+00 0.34035655D-02
+ -.31000000D+01 -.30000000D+01 0.97470480D+00 0.39506816D-02
+ -.30000000D+01 -.29000000D+01 0.11311799D+01 0.41927726D-02
+ -.29000000D+01 -.28000000D+01 0.13194507D+01 0.53035902D-02
+ -.28000000D+01 -.27000000D+01 0.15012654D+01 0.46525567D-02
+ -.27000000D+01 -.26000000D+01 0.17212829D+01 0.56186716D-02
+ -.26000000D+01 -.25000000D+01 0.19210039D+01 0.53174000D-02
+ -.25000000D+01 -.24000000D+01 0.21401961D+01 0.66314036D-02
+ -.24000000D+01 -.23000000D+01 0.23564446D+01 0.71258520D-02
+ -.23000000D+01 -.22000000D+01 0.25741218D+01 0.62956123D-02
+ -.22000000D+01 -.21000000D+01 0.28227072D+01 0.78574312D-02
+ -.21000000D+01 -.20000000D+01 0.30648720D+01 0.76217355D-02
+ -.20000000D+01 -.19000000D+01 0.32894166D+01 0.12743853D-01
+ -.19000000D+01 -.18000000D+01 0.35078453D+01 0.87471040D-02
+ -.18000000D+01 -.17000000D+01 0.37394922D+01 0.85469696D-02
+ -.17000000D+01 -.16000000D+01 0.39308714D+01 0.84095798D-02
+ -.16000000D+01 -.15000000D+01 0.41595348D+01 0.90886575D-02
+ -.15000000D+01 -.14000000D+01 0.43456491D+01 0.98640036D-02
+ -.14000000D+01 -.13000000D+01 0.45383888D+01 0.91698774D-02
+ -.13000000D+01 -.12000000D+01 0.47145421D+01 0.91981978D-02
+ -.12000000D+01 -.11000000D+01 0.49122296D+01 0.10235756D-01
+ -.11000000D+01 -.10000000D+01 0.50550279D+01 0.10120741D-01
+ -.10000000D+01 -.90000000D+00 0.51913360D+01 0.10039198D-01
+ -.90000000D+00 -.80000000D+00 0.53023878D+01 0.99096332D-02
+ -.80000000D+00 -.70000000D+00 0.54290156D+01 0.10301750D-01
+ -.70000000D+00 -.60000000D+00 0.55302766D+01 0.10268954D-01
+ -.60000000D+00 -.50000000D+00 0.56018503D+01 0.10606931D-01
+ -.50000000D+00 -.40000000D+00 0.56986894D+01 0.10938505D-01
+ -.40000000D+00 -.30000000D+00 0.57434031D+01 0.12948853D-01
+ -.30000000D+00 -.20000000D+00 0.57819697D+01 0.10342110D-01
+ -.20000000D+00 -.10000000D+00 0.58069729D+01 0.10749801D-01
+ -.10000000D+00 0.18041124D-15 0.58322647D+01 0.10956291D-01
+ 0.70776718D-15 0.10000000D+00 0.58333140D+01 0.11501456D-01
+ 0.10000000D+00 0.20000000D+00 0.58448500D+01 0.11366136D-01
+ 0.20000000D+00 0.30000000D+00 0.57991585D+01 0.10495037D-01
+ 0.30000000D+00 0.40000000D+00 0.57470772D+01 0.11592055D-01
+ 0.40000000D+00 0.50000000D+00 0.56915579D+01 0.12569745D-01
+ 0.50000000D+00 0.60000000D+00 0.56239178D+01 0.10494502D-01
+ 0.60000000D+00 0.70000000D+00 0.55158713D+01 0.11103724D-01
+ 0.70000000D+00 0.80000000D+00 0.54316608D+01 0.10294514D-01
+ 0.80000000D+00 0.90000000D+00 0.53171456D+01 0.10363443D-01
+ 0.90000000D+00 0.10000000D+01 0.51832987D+01 0.97344066D-02
+ 0.10000000D+01 0.11000000D+01 0.50545287D+01 0.98859997D-02
+ 0.11000000D+01 0.12000000D+01 0.48981870D+01 0.98292586D-02
+ 0.12000000D+01 0.13000000D+01 0.47298366D+01 0.10043874D-01
+ 0.13000000D+01 0.14000000D+01 0.45392717D+01 0.90455512D-02
+ 0.14000000D+01 0.15000000D+01 0.43507140D+01 0.90867775D-02
+ 0.15000000D+01 0.16000000D+01 0.41545586D+01 0.89447564D-02
+ 0.16000000D+01 0.17000000D+01 0.39476721D+01 0.86691640D-02
+ 0.17000000D+01 0.18000000D+01 0.37280077D+01 0.81740348D-02
+ 0.18000000D+01 0.19000000D+01 0.35068152D+01 0.82558289D-02
+ 0.19000000D+01 0.20000000D+01 0.32833952D+01 0.78020557D-02
+ 0.20000000D+01 0.21000000D+01 0.30630318D+01 0.76171579D-02
+ 0.21000000D+01 0.22000000D+01 0.28322390D+01 0.71640403D-02
+ 0.22000000D+01 0.23000000D+01 0.25821549D+01 0.66287286D-02
+ 0.23000000D+01 0.24000000D+01 0.23493670D+01 0.60985384D-02
+ 0.24000000D+01 0.25000000D+01 0.21487946D+01 0.83329088D-02
+ 0.25000000D+01 0.26000000D+01 0.19361499D+01 0.69393517D-02
+ 0.26000000D+01 0.27000000D+01 0.17170221D+01 0.53308681D-02
+ 0.27000000D+01 0.28000000D+01 0.15034970D+01 0.47587297D-02
+ 0.28000000D+01 0.29000000D+01 0.13243365D+01 0.46431811D-02
+ 0.29000000D+01 0.30000000D+01 0.11372515D+01 0.42925259D-02
+ 0.30000000D+01 0.31000000D+01 0.97179388D+00 0.40709558D-02
+ 0.31000000D+01 0.32000000D+01 0.81485814D+00 0.32668157D-02
+ 0.32000000D+01 0.33000000D+01 0.67583322D+00 0.32145300D-02
+ 0.33000000D+01 0.34000000D+01 0.54441409D+00 0.26712196D-02
+ 0.34000000D+01 0.35000000D+01 0.42952265D+00 0.19658377D-02
+ 0.35000000D+01 0.36000000D+01 0.33020649D+00 0.17178589D-02
+ 0.36000000D+01 0.37000000D+01 0.24023766D+00 0.14157104D-02
+ 0.37000000D+01 0.38000000D+01 0.16982836D+00 0.10713107D-02
+ 0.38000000D+01 0.39000000D+01 0.11409465D+00 0.59924120D-03
+ 0.39000000D+01 0.40000000D+01 0.70680852D-01 0.41155858D-03
+ 0.40000000D+01 0.41000000D+01 0.40437781D-01 0.22951270D-03
+ 0.41000000D+01 0.42000000D+01 0.20332970D-01 0.13353762D-03
+ 0.42000000D+01 0.43000000D+01 0.87902994D-02 0.71830364D-04
+ 0.43000000D+01 0.44000000D+01 0.31009424D-02 0.33141403D-04
+ 0.44000000D+01 0.45000000D+01 0.77117088D-03 0.13921278D-04
+ 0.45000000D+01 0.46000000D+01 0.87086187D-04 0.46831636D-05
+ 0.46000000D+01 0.47000000D+01 0.51676379D-06 0.44150908D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51644025D-06 0.44066947D-06
+ -.46000000D+01 -.45000000D+01 0.88349135D-04 0.46815956D-05
+ -.45000000D+01 -.44000000D+01 0.80039938D-03 0.14402742D-04
+ -.44000000D+01 -.43000000D+01 0.33199172D-02 0.31712384D-04
+ -.43000000D+01 -.42000000D+01 0.95189778D-02 0.65166139D-04
+ -.42000000D+01 -.41000000D+01 0.22232146D-01 0.13437773D-03
+ -.41000000D+01 -.40000000D+01 0.44708564D-01 0.22500364D-03
+ -.40000000D+01 -.39000000D+01 0.78757467D-01 0.38992013D-03
+ -.39000000D+01 -.38000000D+01 0.12948023D+00 0.94984902D-03
+ -.38000000D+01 -.37000000D+01 0.19258913D+00 0.89610817D-03
+ -.37000000D+01 -.36000000D+01 0.27802155D+00 0.12117601D-02
+ -.36000000D+01 -.35000000D+01 0.38142378D+00 0.17532058D-02
+ -.35000000D+01 -.34000000D+01 0.49746626D+00 0.18912577D-02
+ -.34000000D+01 -.33000000D+01 0.64113516D+00 0.25003730D-02
+ -.33000000D+01 -.32000000D+01 0.79961798D+00 0.28699863D-02
+ -.32000000D+01 -.31000000D+01 0.96767289D+00 0.34088587D-02
+ -.31000000D+01 -.30000000D+01 0.11623285D+01 0.39598780D-02
+ -.30000000D+01 -.29000000D+01 0.13571756D+01 0.42034583D-02
+ -.29000000D+01 -.28000000D+01 0.15878463D+01 0.53122296D-02
+ -.28000000D+01 -.27000000D+01 0.18143497D+01 0.46665328D-02
+ -.27000000D+01 -.26000000D+01 0.20828741D+01 0.56244274D-02
+ -.26000000D+01 -.25000000D+01 0.23329051D+01 0.53269589D-02
+ -.25000000D+01 -.24000000D+01 0.26053927D+01 0.66499329D-02
+ -.24000000D+01 -.23000000D+01 0.28768663D+01 0.71404095D-02
+ -.23000000D+01 -.22000000D+01 0.31503042D+01 0.63049268D-02
+ -.22000000D+01 -.21000000D+01 0.34569755D+01 0.78700755D-02
+ -.21000000D+01 -.20000000D+01 0.37577754D+01 0.76378195D-02
+ -.20000000D+01 -.19000000D+01 0.40415844D+01 0.12752844D-01
+ -.19000000D+01 -.18000000D+01 0.43185526D+01 0.87577554D-02
+ -.18000000D+01 -.17000000D+01 0.46081798D+01 0.85592470D-02
+ -.17000000D+01 -.16000000D+01 0.48562378D+01 0.84264950D-02
+ -.16000000D+01 -.15000000D+01 0.51409718D+01 0.91064706D-02
+ -.15000000D+01 -.14000000D+01 0.53806299D+01 0.99165306D-02
+ -.14000000D+01 -.13000000D+01 0.56246919D+01 0.92315866D-02
+ -.13000000D+01 -.12000000D+01 0.58510781D+01 0.92174866D-02
+ -.12000000D+01 -.11000000D+01 0.60953315D+01 0.10252924D-01
+ -.11000000D+01 -.10000000D+01 0.62822708D+01 0.10143971D-01
+ -.10000000D+01 -.90000000D+00 0.64586392D+01 0.10068931D-01
+ -.90000000D+00 -.80000000D+00 0.66065343D+01 0.99300975D-02
+ -.80000000D+00 -.70000000D+00 0.67665568D+01 0.10321122D-01
+ -.70000000D+00 -.60000000D+00 0.68967961D+01 0.10290507D-01
+ -.60000000D+00 -.50000000D+00 0.69947252D+01 0.10630721D-01
+ -.50000000D+00 -.40000000D+00 0.71127692D+01 0.10957581D-01
+ -.40000000D+00 -.30000000D+00 0.71745514D+01 0.12951556D-01
+ -.30000000D+00 -.20000000D+00 0.72265648D+01 0.10374366D-01
+ -.20000000D+00 -.10000000D+00 0.72599605D+01 0.10794190D-01
+ -.10000000D+00 0.18041124D-15 0.72877358D+01 0.11282875D-01
+ 0.70776718D-15 0.10000000D+00 0.72921003D+01 0.11861535D-01
+ 0.10000000D+00 0.20000000D+00 0.72981790D+01 0.11413791D-01
+ 0.20000000D+00 0.30000000D+00 0.72441382D+01 0.10656649D-01
+ 0.30000000D+00 0.40000000D+00 0.71771253D+01 0.11767692D-01
+ 0.40000000D+00 0.50000000D+00 0.71072879D+01 0.12774991D-01
+ 0.50000000D+00 0.60000000D+00 0.70156893D+01 0.10718420D-01
+ 0.60000000D+00 0.70000000D+00 0.68830075D+01 0.11126047D-01
+ 0.70000000D+00 0.80000000D+00 0.67696434D+01 0.10313176D-01
+ 0.80000000D+00 0.90000000D+00 0.66212647D+01 0.10403368D-01
+ 0.90000000D+00 0.10000000D+01 0.64504495D+01 0.97713481D-02
+ 0.10000000D+01 0.11000000D+01 0.62814525D+01 0.99079187D-02
+ 0.11000000D+01 0.12000000D+01 0.60816418D+01 0.98481740D-02
+ 0.12000000D+01 0.13000000D+01 0.58659509D+01 0.10068444D-01
+ 0.13000000D+01 0.14000000D+01 0.56260271D+01 0.90626518D-02
+ 0.14000000D+01 0.15000000D+01 0.53860645D+01 0.91078254D-02
+ 0.15000000D+01 0.16000000D+01 0.51352488D+01 0.89743574D-02
+ 0.16000000D+01 0.17000000D+01 0.48734410D+01 0.86805293D-02
+ 0.17000000D+01 0.18000000D+01 0.45966967D+01 0.81866743D-02
+ 0.18000000D+01 0.19000000D+01 0.43172400D+01 0.82750451D-02
+ 0.19000000D+01 0.20000000D+01 0.40358568D+01 0.78324296D-02
+ 0.20000000D+01 0.21000000D+01 0.37564206D+01 0.76434275D-02
+ 0.21000000D+01 0.22000000D+01 0.34659727D+01 0.71805872D-02
+ 0.22000000D+01 0.23000000D+01 0.31584259D+01 0.66461208D-02
+ 0.23000000D+01 0.24000000D+01 0.28694999D+01 0.61367575D-02
+ 0.24000000D+01 0.25000000D+01 0.26113290D+01 0.97547325D-02
+ 0.25000000D+01 0.26000000D+01 0.23509979D+01 0.85794766D-02
+ 0.26000000D+01 0.27000000D+01 0.20787224D+01 0.53377108D-02
+ 0.27000000D+01 0.28000000D+01 0.18165510D+01 0.48001499D-02
+ 0.28000000D+01 0.29000000D+01 0.15927070D+01 0.46834532D-02
+ 0.29000000D+01 0.30000000D+01 0.13632769D+01 0.43017972D-02
+ 0.30000000D+01 0.31000000D+01 0.11592786D+01 0.40905367D-02
+ 0.31000000D+01 0.32000000D+01 0.96731951D+00 0.32870975D-02
+ 0.32000000D+01 0.33000000D+01 0.79720782D+00 0.32222899D-02
+ 0.33000000D+01 0.34000000D+01 0.63846787D+00 0.26747273D-02
+ 0.34000000D+01 0.35000000D+01 0.50016939D+00 0.19685154D-02
+ 0.35000000D+01 0.36000000D+01 0.38128127D+00 0.17197081D-02
+ 0.36000000D+01 0.37000000D+01 0.27562928D+00 0.14173293D-02
+ 0.37000000D+01 0.38000000D+01 0.19305481D+00 0.10725048D-02
+ 0.38000000D+01 0.39000000D+01 0.12829488D+00 0.59985701D-03
+ 0.39000000D+01 0.40000000D+01 0.78694730D-01 0.41186845D-03
+ 0.40000000D+01 0.41000000D+01 0.44508120D-01 0.22966119D-03
+ 0.41000000D+01 0.42000000D+01 0.22130244D-01 0.13365978D-03
+ 0.42000000D+01 0.43000000D+01 0.94500960D-02 0.71921487D-04
+ 0.43000000D+01 0.44000000D+01 0.32849468D-02 0.33147977D-04
+ 0.44000000D+01 0.45000000D+01 0.80321790D-03 0.13922043D-04
+ 0.45000000D+01 0.46000000D+01 0.89077410D-04 0.46831914D-05
+ 0.46000000D+01 0.47000000D+01 0.51904311D-06 0.44150910D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51687997D-06 0.44066948D-06
+ -.46000000D+01 -.45000000D+01 0.88779805D-04 0.46816017D-05
+ -.45000000D+01 -.44000000D+01 0.80792247D-03 0.14402979D-04
+ -.44000000D+01 -.43000000D+01 0.33659050D-02 0.31713517D-04
+ -.43000000D+01 -.42000000D+01 0.96920617D-02 0.65170688D-04
+ -.42000000D+01 -.41000000D+01 0.22723594D-01 0.13438586D-03
+ -.41000000D+01 -.40000000D+01 0.45864453D-01 0.22546877D-03
+ -.40000000D+01 -.39000000D+01 0.81105369D-01 0.39024427D-03
+ -.39000000D+01 -.38000000D+01 0.13377242D+00 0.94996434D-03
+ -.38000000D+01 -.37000000D+01 0.19976412D+00 0.89628483D-03
+ -.37000000D+01 -.36000000D+01 0.28922917D+00 0.12123306D-02
+ -.36000000D+01 -.35000000D+01 0.39799441D+00 0.17537806D-02
+ -.35000000D+01 -.34000000D+01 0.52078822D+00 0.18924515D-02
+ -.34000000D+01 -.33000000D+01 0.67277627D+00 0.25016779D-02
+ -.33000000D+01 -.32000000D+01 0.84101129D+00 0.28715145D-02
+ -.32000000D+01 -.31000000D+01 0.10205583D+01 0.34105349D-02
+ -.31000000D+01 -.30000000D+01 0.12281854D+01 0.39623850D-02
+ -.30000000D+01 -.29000000D+01 0.14374196D+01 0.42069330D-02
+ -.29000000D+01 -.28000000D+01 0.16841338D+01 0.53157306D-02
+ -.28000000D+01 -.27000000D+01 0.19276633D+01 0.46721161D-02
+ -.27000000D+01 -.26000000D+01 0.22148279D+01 0.56269176D-02
+ -.26000000D+01 -.25000000D+01 0.24843740D+01 0.53324688D-02
+ -.25000000D+01 -.24000000D+01 0.27776600D+01 0.66563022D-02
+ -.24000000D+01 -.23000000D+01 0.30706834D+01 0.71467316D-02
+ -.23000000D+01 -.22000000D+01 0.33661419D+01 0.63089070D-02
+ -.22000000D+01 -.21000000D+01 0.36958088D+01 0.78751916D-02
+ -.21000000D+01 -.20000000D+01 0.40197191D+01 0.76464493D-02
+ -.20000000D+01 -.19000000D+01 0.43270787D+01 0.12755933D-01
+ -.19000000D+01 -.18000000D+01 0.46275577D+01 0.87625839D-02
+ -.18000000D+01 -.17000000D+01 0.49404511D+01 0.85630612D-02
+ -.17000000D+01 -.16000000D+01 0.52114557D+01 0.84337931D-02
+ -.16000000D+01 -.15000000D+01 0.55188099D+01 0.91139180D-02
+ -.15000000D+01 -.14000000D+01 0.57802687D+01 0.99332564D-02
+ -.14000000D+01 -.13000000D+01 0.60451728D+01 0.92538214D-02
+ -.13000000D+01 -.12000000D+01 0.62919244D+01 0.92276528D-02
+ -.12000000D+01 -.11000000D+01 0.65553831D+01 0.10260321D-01
+ -.11000000D+01 -.10000000D+01 0.67602589D+01 0.10155961D-01
+ -.10000000D+01 -.90000000D+00 0.69531236D+01 0.10082533D-01
+ -.90000000D+00 -.80000000D+00 0.71163421D+01 0.99389331D-02
+ -.80000000D+00 -.70000000D+00 0.72900747D+01 0.10330191D-01
+ -.70000000D+00 -.60000000D+00 0.74322387D+01 0.10298522D-01
+ -.60000000D+00 -.50000000D+00 0.75411196D+01 0.10639861D-01
+ -.50000000D+00 -.40000000D+00 0.76678211D+01 0.10967991D-01
+ -.40000000D+00 -.30000000D+00 0.77368114D+01 0.12950066D-01
+ -.30000000D+00 -.20000000D+00 0.77942953D+01 0.10387921D-01
+ -.20000000D+00 -.10000000D+00 0.78313193D+01 0.10811765D-01
+ -.10000000D+00 0.18041124D-15 0.78600641D+01 0.11420677D-01
+ 0.70776718D-15 0.10000000D+00 0.78656891D+01 0.12004351D-01
+ 0.10000000D+00 0.20000000D+00 0.78695297D+01 0.11427615D-01
+ 0.20000000D+00 0.30000000D+00 0.78118869D+01 0.10712062D-01
+ 0.30000000D+00 0.40000000D+00 0.77389565D+01 0.11842916D-01
+ 0.40000000D+00 0.50000000D+00 0.76631621D+01 0.12900010D-01
+ 0.50000000D+00 0.60000000D+00 0.75615190D+01 0.10845823D-01
+ 0.60000000D+00 0.70000000D+00 0.74187064D+01 0.11136313D-01
+ 0.70000000D+00 0.80000000D+00 0.72932793D+01 0.10320716D-01
+ 0.80000000D+00 0.90000000D+00 0.71309328D+01 0.10421428D-01
+ 0.90000000D+00 0.10000000D+01 0.69449945D+01 0.97906385D-02
+ 0.10000000D+01 0.11000000D+01 0.67593058D+01 0.99175798D-02
+ 0.11000000D+01 0.12000000D+01 0.65416791D+01 0.98561277D-02
+ 0.12000000D+01 0.13000000D+01 0.63067090D+01 0.10080148D-01
+ 0.13000000D+01 0.14000000D+01 0.60466142D+01 0.90712006D-02
+ 0.14000000D+01 0.15000000D+01 0.57858364D+01 0.91194347D-02
+ 0.15000000D+01 0.16000000D+01 0.55127540D+01 0.89955621D-02
+ 0.16000000D+01 0.17000000D+01 0.52289063D+01 0.86907776D-02
+ 0.17000000D+01 0.18000000D+01 0.49290575D+01 0.81925435D-02
+ 0.18000000D+01 0.19000000D+01 0.46261300D+01 0.82834567D-02
+ 0.19000000D+01 0.20000000D+01 0.43214661D+01 0.78455368D-02
+ 0.20000000D+01 0.21000000D+01 0.40186035D+01 0.76578411D-02
+ 0.21000000D+01 0.22000000D+01 0.37044768D+01 0.71915639D-02
+ 0.22000000D+01 0.23000000D+01 0.33743475D+01 0.66524467D-02
+ 0.23000000D+01 0.24000000D+01 0.30633361D+01 0.61561295D-02
+ 0.24000000D+01 0.25000000D+01 0.27824926D+01 0.10319422D-01
+ 0.25000000D+01 0.26000000D+01 0.25035714D+01 0.92066453D-02
+ 0.26000000D+01 0.27000000D+01 0.22108240D+01 0.53423797D-02
+ 0.27000000D+01 0.28000000D+01 0.19298565D+01 0.48140801D-02
+ 0.28000000D+01 0.29000000D+01 0.16889193D+01 0.46950456D-02
+ 0.29000000D+01 0.30000000D+01 0.14435430D+01 0.43047232D-02
+ 0.30000000D+01 0.31000000D+01 0.12250813D+01 0.40970556D-02
+ 0.31000000D+01 0.32000000D+01 0.10201863D+01 0.32939939D-02
+ 0.32000000D+01 0.33000000D+01 0.83866195D+00 0.32252575D-02
+ 0.33000000D+01 0.34000000D+01 0.67009067D+00 0.26759218D-02
+ 0.34000000D+01 0.35000000D+01 0.52352595D+00 0.19693283D-02
+ 0.35000000D+01 0.36000000D+01 0.39783354D+00 0.17203546D-02
+ 0.36000000D+01 0.37000000D+01 0.28686419D+00 0.14182941D-02
+ 0.37000000D+01 0.38000000D+01 0.20024878D+00 0.10729333D-02
+ 0.38000000D+01 0.39000000D+01 0.13257899D+00 0.60004926D-03
+ 0.39000000D+01 0.40000000D+01 0.81042642D-01 0.41195349D-03
+ 0.40000000D+01 0.41000000D+01 0.45662540D-01 0.22969708D-03
+ 0.41000000D+01 0.42000000D+01 0.22621998D-01 0.13368697D-03
+ 0.42000000D+01 0.43000000D+01 0.96232459D-02 0.71939317D-04
+ 0.43000000D+01 0.44000000D+01 0.33308738D-02 0.33149414D-04
+ 0.44000000D+01 0.45000000D+01 0.81073032D-03 0.13922198D-04
+ 0.45000000D+01 0.46000000D+01 0.89509010D-04 0.46831970D-05
+ 0.46000000D+01 0.47000000D+01 0.51948174D-06 0.44150910D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51703537D-06 0.44066948D-06
+ -.46000000D+01 -.45000000D+01 0.88937644D-04 0.46816039D-05
+ -.45000000D+01 -.44000000D+01 0.81076037D-03 0.14403066D-04
+ -.44000000D+01 -.43000000D+01 0.33837259D-02 0.31713936D-04
+ -.43000000D+01 -.42000000D+01 0.97607597D-02 0.65172323D-04
+ -.42000000D+01 -.41000000D+01 0.22922944D-01 0.13438857D-03
+ -.41000000D+01 -.40000000D+01 0.46342755D-01 0.22567246D-03
+ -.40000000D+01 -.39000000D+01 0.82095308D-01 0.39038150D-03
+ -.39000000D+01 -.38000000D+01 0.13561446D+00 0.95000604D-03
+ -.38000000D+01 -.37000000D+01 0.20289701D+00 0.89635491D-03
+ -.37000000D+01 -.36000000D+01 0.29419752D+00 0.12125738D-02
+ -.36000000D+01 -.35000000D+01 0.40545447D+00 0.17540185D-02
+ -.35000000D+01 -.34000000D+01 0.53142887D+00 0.18929823D-02
+ -.34000000D+01 -.33000000D+01 0.68740393D+00 0.25022970D-02
+ -.33000000D+01 -.32000000D+01 0.86036078D+00 0.28723621D-02
+ -.32000000D+01 -.31000000D+01 0.10455726D+01 0.34113584D-02
+ -.31000000D+01 -.30000000D+01 0.12596291D+01 0.39635081D-02
+ -.30000000D+01 -.29000000D+01 0.14760832D+01 0.42085860D-02
+ -.29000000D+01 -.28000000D+01 0.17309080D+01 0.53174637D-02
+ -.28000000D+01 -.27000000D+01 0.19831219D+01 0.46748101D-02
+ -.27000000D+01 -.26000000D+01 0.22798281D+01 0.56285705D-02
+ -.26000000D+01 -.25000000D+01 0.25594974D+01 0.53361825D-02
+ -.25000000D+01 -.24000000D+01 0.28635738D+01 0.66595691D-02
+ -.24000000D+01 -.23000000D+01 0.31678151D+01 0.71502360D-02
+ -.23000000D+01 -.22000000D+01 0.34748491D+01 0.63110118D-02
+ -.22000000D+01 -.21000000D+01 0.38166372D+01 0.78782774D-02
+ -.21000000D+01 -.20000000D+01 0.41527205D+01 0.76516437D-02
+ -.20000000D+01 -.19000000D+01 0.44725333D+01 0.12757359D-01
+ -.19000000D+01 -.18000000D+01 0.47855269D+01 0.87651938D-02
+ -.18000000D+01 -.17000000D+01 0.51108411D+01 0.85652927D-02
+ -.17000000D+01 -.16000000D+01 0.53941670D+01 0.84377483D-02
+ -.16000000D+01 -.15000000D+01 0.57136287D+01 0.91180266D-02
+ -.15000000D+01 -.14000000D+01 0.59868614D+01 0.99407501D-02
+ -.14000000D+01 -.13000000D+01 0.62630115D+01 0.92639522D-02
+ -.13000000D+01 -.12000000D+01 0.65207364D+01 0.92335089D-02
+ -.12000000D+01 -.11000000D+01 0.67946429D+01 0.10264358D-01
+ -.11000000D+01 -.10000000D+01 0.70092055D+01 0.10162649D-01
+ -.10000000D+01 -.90000000D+00 0.72110731D+01 0.10089591D-01
+ -.90000000D+00 -.80000000D+00 0.73826592D+01 0.99435163D-02
+ -.80000000D+00 -.70000000D+00 0.75638735D+01 0.10335236D-01
+ -.70000000D+00 -.60000000D+00 0.77125285D+01 0.10302671D-01
+ -.60000000D+00 -.50000000D+00 0.78274192D+01 0.10644542D-01
+ -.50000000D+00 -.40000000D+00 0.79588367D+01 0.10974388D-01
+ -.40000000D+00 -.30000000D+00 0.80318076D+01 0.12949293D-01
+ -.30000000D+00 -.20000000D+00 0.80922520D+01 0.10395082D-01
+ -.20000000D+00 -.10000000D+00 0.81313130D+01 0.10820519D-01
+ -.10000000D+00 0.18041124D-15 0.81605893D+01 0.11483264D-01
+ 0.70776718D-15 0.10000000D+00 0.81668372D+01 0.12068784D-01
+ 0.10000000D+00 0.20000000D+00 0.81694741D+01 0.11434192D-01
+ 0.20000000D+00 0.30000000D+00 0.81098113D+01 0.10735805D-01
+ 0.30000000D+00 0.40000000D+00 0.80337683D+01 0.11879228D-01
+ 0.40000000D+00 0.50000000D+00 0.79545812D+01 0.12965331D-01
+ 0.50000000D+00 0.60000000D+00 0.78475413D+01 0.10910311D-01
+ 0.60000000D+00 0.70000000D+00 0.76991408D+01 0.11141571D-01
+ 0.70000000D+00 0.80000000D+00 0.75671045D+01 0.10324727D-01
+ 0.80000000D+00 0.90000000D+00 0.73971506D+01 0.10431397D-01
+ 0.90000000D+00 0.10000000D+01 0.72030077D+01 0.98015616D-02
+ 0.10000000D+01 0.11000000D+01 0.70081860D+01 0.99230259D-02
+ 0.11000000D+01 0.12000000D+01 0.67808945D+01 0.98605207D-02
+ 0.12000000D+01 0.13000000D+01 0.65355153D+01 0.10086741D-01
+ 0.13000000D+01 0.14000000D+01 0.62644838D+01 0.90762682D-02
+ 0.14000000D+01 0.15000000D+01 0.59924585D+01 0.91261088D-02
+ 0.15000000D+01 0.16000000D+01 0.57074127D+01 0.90117468D-02
+ 0.16000000D+01 0.17000000D+01 0.54117861D+01 0.87006591D-02
+ 0.17000000D+01 0.18000000D+01 0.50995151D+01 0.81961839D-02
+ 0.18000000D+01 0.19000000D+01 0.47840546D+01 0.82881897D-02
+ 0.19000000D+01 0.20000000D+01 0.44669815D+01 0.78525779D-02
+ 0.20000000D+01 0.21000000D+01 0.41517836D+01 0.76714268D-02
+ 0.21000000D+01 0.22000000D+01 0.38250533D+01 0.72035286D-02
+ 0.22000000D+01 0.23000000D+01 0.34831014D+01 0.66557240D-02
+ 0.23000000D+01 0.24000000D+01 0.31605171D+01 0.61665733D-02
+ 0.24000000D+01 0.25000000D+01 0.28678701D+01 0.10567102D-01
+ 0.25000000D+01 0.26000000D+01 0.25791910D+01 0.94778434D-02
+ 0.26000000D+01 0.27000000D+01 0.22759417D+01 0.53458668D-02
+ 0.27000000D+01 0.28000000D+01 0.19853089D+01 0.48211652D-02
+ 0.28000000D+01 0.29000000D+01 0.17356421D+01 0.46998421D-02
+ 0.29000000D+01 0.30000000D+01 0.14822183D+01 0.43059986D-02
+ 0.30000000D+01 0.31000000D+01 0.12565032D+01 0.40999116D-02
+ 0.31000000D+01 0.32000000D+01 0.10451927D+01 0.32971579D-02
+ 0.32000000D+01 0.33000000D+01 0.85803756D+00 0.32268227D-02
+ 0.33000000D+01 0.34000000D+01 0.68470341D+00 0.26764842D-02
+ 0.34000000D+01 0.35000000D+01 0.53418682D+00 0.19696853D-02
+ 0.35000000D+01 0.36000000D+01 0.40528377D+00 0.17206589D-02
+ 0.36000000D+01 0.37000000D+01 0.29184854D+00 0.14188624D-02
+ 0.37000000D+01 0.38000000D+01 0.20338930D+00 0.10731304D-02
+ 0.38000000D+01 0.39000000D+01 0.13441869D+00 0.60014067D-03
+ 0.39000000D+01 0.40000000D+01 0.82032670D-01 0.41199137D-03
+ 0.40000000D+01 0.41000000D+01 0.46140204D-01 0.22971134D-03
+ 0.41000000D+01 0.42000000D+01 0.22821443D-01 0.13369723D-03
+ 0.42000000D+01 0.43000000D+01 0.96919706D-02 0.71945644D-04
+ 0.43000000D+01 0.44000000D+01 0.33486699D-02 0.33149947D-04
+ 0.44000000D+01 0.45000000D+01 0.81356452D-03 0.13922254D-04
+ 0.45000000D+01 0.46000000D+01 0.89667193D-04 0.46831990D-05
+ 0.46000000D+01 0.47000000D+01 0.51963678D-06 0.44150910D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51525902D-06 0.44066945D-06
+ -.46000000D+01 -.45000000D+01 0.87493880D-04 0.46815639D-05
+ -.45000000D+01 -.44000000D+01 0.78788250D-03 0.14401361D-04
+ -.44000000D+01 -.43000000D+01 0.32528835D-02 0.31704428D-04
+ -.43000000D+01 -.42000000D+01 0.92900530D-02 0.65129784D-04
+ -.42000000D+01 -.41000000D+01 0.21634506D-01 0.13428553D-03
+ -.41000000D+01 -.40000000D+01 0.43388573D-01 0.22398352D-03
+ -.40000000D+01 -.39000000D+01 0.76246799D-01 0.38894414D-03
+ -.39000000D+01 -.38000000D+01 0.12513778D+00 0.94899159D-03
+ -.38000000D+01 -.37000000D+01 0.18570282D+00 0.89446970D-03
+ -.37000000D+01 -.36000000D+01 0.26773031D+00 0.12090061D-02
+ -.36000000D+01 -.35000000D+01 0.36687177D+00 0.17499627D-02
+ -.35000000D+01 -.34000000D+01 0.47778133D+00 0.18861832D-02
+ -.34000000D+01 -.33000000D+01 0.61536915D+00 0.24950086D-02
+ -.33000000D+01 -.32000000D+01 0.76692256D+00 0.28640296D-02
+ -.32000000D+01 -.31000000D+01 0.92712750D+00 0.34016239D-02
+ -.31000000D+01 -.30000000D+01 0.11130990D+01 0.39483436D-02
+ -.30000000D+01 -.29000000D+01 0.12986245D+01 0.41913667D-02
+ -.29000000D+01 -.28000000D+01 0.15189252D+01 0.53009296D-02
+ -.28000000D+01 -.27000000D+01 0.17349351D+01 0.46502716D-02
+ -.27000000D+01 -.26000000D+01 0.19916484D+01 0.56129778D-02
+ -.26000000D+01 -.25000000D+01 0.22299714D+01 0.53147421D-02
+ -.25000000D+01 -.24000000D+01 0.24898919D+01 0.66413632D-02
+ -.24000000D+01 -.23000000D+01 0.27480564D+01 0.71249977D-02
+ -.23000000D+01 -.22000000D+01 0.30087631D+01 0.62941029D-02
+ -.22000000D+01 -.21000000D+01 0.33017117D+01 0.78554665D-02
+ -.21000000D+01 -.20000000D+01 0.35887728D+01 0.76168947D-02
+ -.20000000D+01 -.19000000D+01 0.38588360D+01 0.12742713D-01
+ -.19000000D+01 -.18000000D+01 0.41221793D+01 0.87430598D-02
+ -.18000000D+01 -.17000000D+01 0.43985906D+01 0.85399306D-02
+ -.17000000D+01 -.16000000D+01 0.46336354D+01 0.84056690D-02
+ -.16000000D+01 -.15000000D+01 0.49050268D+01 0.90808411D-02
+ -.15000000D+01 -.14000000D+01 0.51327124D+01 0.98676951D-02
+ -.14000000D+01 -.13000000D+01 0.53653342D+01 0.91780210D-02
+ -.13000000D+01 -.12000000D+01 0.55800078D+01 0.91930443D-02
+ -.12000000D+01 -.11000000D+01 0.58136016D+01 0.10231540D-01
+ -.11000000D+01 -.10000000D+01 0.59903654D+01 0.10120139D-01
+ -.10000000D+01 -.90000000D+00 0.61580457D+01 0.10041177D-01
+ -.90000000D+00 -.80000000D+00 0.62978256D+01 0.99012512D-02
+ -.80000000D+00 -.70000000D+00 0.64502778D+01 0.10299244D-01
+ -.70000000D+00 -.60000000D+00 0.65739990D+01 0.10264630D-01
+ -.60000000D+00 -.50000000D+00 0.66658691D+01 0.10602506D-01
+ -.50000000D+00 -.40000000D+00 0.67794134D+01 0.10933350D-01
+ -.40000000D+00 -.30000000D+00 0.68373317D+01 0.12944214D-01
+ -.30000000D+00 -.20000000D+00 0.68863172D+01 0.10346979D-01
+ -.20000000D+00 -.10000000D+00 0.69178145D+01 0.10752862D-01
+ -.10000000D+00 0.18041124D-15 0.69455447D+01 0.11027591D-01
+ 0.70776718D-15 0.10000000D+00 0.69481814D+01 0.11582563D-01
+ 0.10000000D+00 0.20000000D+00 0.69558004D+01 0.11367798D-01
+ 0.20000000D+00 0.30000000D+00 0.69032374D+01 0.10527765D-01
+ 0.30000000D+00 0.40000000D+00 0.68405862D+01 0.11627873D-01
+ 0.40000000D+00 0.50000000D+00 0.67726572D+01 0.12615348D-01
+ 0.50000000D+00 0.60000000D+00 0.66875709D+01 0.10543079D-01
+ 0.60000000D+00 0.70000000D+00 0.65599488D+01 0.11099527D-01
+ 0.70000000D+00 0.80000000D+00 0.64530966D+01 0.10289557D-01
+ 0.80000000D+00 0.90000000D+00 0.63124816D+01 0.10368571D-01
+ 0.90000000D+00 0.10000000D+01 0.61497339D+01 0.97353549D-02
+ 0.10000000D+01 0.11000000D+01 0.59899733D+01 0.98818912D-02
+ 0.11000000D+01 0.12000000D+01 0.57997778D+01 0.98246946D-02
+ 0.12000000D+01 0.13000000D+01 0.55950056D+01 0.10043060D-01
+ 0.13000000D+01 0.14000000D+01 0.53664442D+01 0.90418211D-02
+ 0.14000000D+01 0.15000000D+01 0.51379205D+01 0.90819508D-02
+ 0.15000000D+01 0.16000000D+01 0.48998755D+01 0.89478467D-02
+ 0.16000000D+01 0.17000000D+01 0.46505205D+01 0.86629390D-02
+ 0.17000000D+01 0.18000000D+01 0.43868623D+01 0.81701477D-02
+ 0.18000000D+01 0.19000000D+01 0.41212264D+01 0.82541955D-02
+ 0.19000000D+01 0.20000000D+01 0.38529146D+01 0.78017614D-02
+ 0.20000000D+01 0.21000000D+01 0.35871541D+01 0.76144184D-02
+ 0.21000000D+01 0.22000000D+01 0.33109770D+01 0.71613074D-02
+ 0.22000000D+01 0.23000000D+01 0.30167240D+01 0.66256705D-02
+ 0.23000000D+01 0.24000000D+01 0.27410585D+01 0.60997838D-02
+ 0.24000000D+01 0.25000000D+01 0.24976289D+01 0.87107651D-02
+ 0.25000000D+01 0.26000000D+01 0.22461226D+01 0.73837142D-02
+ 0.26000000D+01 0.27000000D+01 0.19874666D+01 0.53273187D-02
+ 0.27000000D+01 0.28000000D+01 0.17371288D+01 0.47634768D-02
+ 0.28000000D+01 0.29000000D+01 0.15238619D+01 0.46487392D-02
+ 0.29000000D+01 0.30000000D+01 0.13047241D+01 0.42906282D-02
+ 0.30000000D+01 0.31000000D+01 0.11101326D+01 0.40737280D-02
+ 0.31000000D+01 0.32000000D+01 0.92686777D+00 0.32682004D-02
+ 0.32000000D+01 0.33000000D+01 0.76443457D+00 0.32140639D-02
+ 0.33000000D+01 0.34000000D+01 0.61268153D+00 0.26702165D-02
+ 0.34000000D+01 0.35000000D+01 0.48045901D+00 0.19645485D-02
+ 0.35000000D+01 0.36000000D+01 0.36678269D+00 0.17169865D-02
+ 0.36000000D+01 0.37000000D+01 0.26539857D+00 0.14167300D-02
+ 0.37000000D+01 0.38000000D+01 0.18614432D+00 0.10708816D-02
+ 0.38000000D+01 0.39000000D+01 0.12397461D+00 0.59876750D-03
+ 0.39000000D+01 0.40000000D+01 0.76196326D-01 0.41136248D-03
+ 0.40000000D+01 0.41000000D+01 0.43194727D-01 0.22937183D-03
+ 0.41000000D+01 0.42000000D+01 0.21533207D-01 0.13350400D-03
+ 0.42000000D+01 0.43000000D+01 0.92219039D-02 0.71824674D-04
+ 0.43000000D+01 0.44000000D+01 0.32179376D-02 0.33139477D-04
+ 0.44000000D+01 0.45000000D+01 0.79073986D-03 0.13921084D-04
+ 0.45000000D+01 0.46000000D+01 0.88220385D-04 0.46831609D-05
+ 0.46000000D+01 0.47000000D+01 0.51786261D-06 0.44150908D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51621596D-06 0.44066947D-06
+ -.46000000D+01 -.45000000D+01 0.88257438D-04 0.46815840D-05
+ -.45000000D+01 -.44000000D+01 0.79981961D-03 0.14402202D-04
+ -.44000000D+01 -.43000000D+01 0.33203765D-02 0.31709055D-04
+ -.43000000D+01 -.42000000D+01 0.95304328D-02 0.65150033D-04
+ -.42000000D+01 -.41000000D+01 0.22287104D-01 0.13433537D-03
+ -.41000000D+01 -.40000000D+01 0.44871817D-01 0.22464719D-03
+ -.40000000D+01 -.39000000D+01 0.79165567D-01 0.38954717D-03
+ -.39000000D+01 -.38000000D+01 0.13033092D+00 0.94947196D-03
+ -.38000000D+01 -.37000000D+01 0.19417476D+00 0.89534489D-03
+ -.37000000D+01 -.36000000D+01 0.28070496D+00 0.12105935D-02
+ -.36000000D+01 -.35000000D+01 0.38568682D+00 0.17518196D-02
+ -.35000000D+01 -.34000000D+01 0.50384028D+00 0.18891479D-02
+ -.34000000D+01 -.33000000D+01 0.65020509D+00 0.24981893D-02
+ -.33000000D+01 -.32000000D+01 0.81198557D+00 0.28674721D-02
+ -.32000000D+01 -.31000000D+01 0.98400468D+00 0.34058323D-02
+ -.31000000D+01 -.30000000D+01 0.11832788D+01 0.39552120D-02
+ -.30000000D+01 -.29000000D+01 0.13834040D+01 0.41987837D-02
+ -.29000000D+01 -.28000000D+01 0.16199181D+01 0.53075850D-02
+ -.28000000D+01 -.27000000D+01 0.18529876D+01 0.46600492D-02
+ -.27000000D+01 -.26000000D+01 0.21284172D+01 0.56187936D-02
+ -.26000000D+01 -.25000000D+01 0.23860980D+01 0.53223329D-02
+ -.25000000D+01 -.24000000D+01 0.26666112D+01 0.66482059D-02
+ -.24000000D+01 -.23000000D+01 0.29462628D+01 0.71350791D-02
+ -.23000000D+01 -.22000000D+01 0.32285695D+01 0.63015960D-02
+ -.22000000D+01 -.21000000D+01 0.35441485D+01 0.78648969D-02
+ -.21000000D+01 -.20000000D+01 0.38540727D+01 0.76294074D-02
+ -.20000000D+01 -.19000000D+01 0.41472641D+01 0.12749086D-01
+ -.19000000D+01 -.18000000D+01 0.44335235D+01 0.87516452D-02
+ -.18000000D+01 -.17000000D+01 0.47325643D+01 0.85502234D-02
+ -.17000000D+01 -.16000000D+01 0.49899188D+01 0.84181689D-02
+ -.16000000D+01 -.15000000D+01 0.52834457D+01 0.90949911D-02
+ -.15000000D+01 -.14000000D+01 0.55321598D+01 0.98982544D-02
+ -.14000000D+01 -.13000000D+01 0.57848745D+01 0.92132911D-02
+ -.13000000D+01 -.12000000D+01 0.60193737D+01 0.92074141D-02
+ -.12000000D+01 -.11000000D+01 0.62714472D+01 0.10244416D-01
+ -.11000000D+01 -.10000000D+01 0.64655871D+01 0.10136106D-01
+ -.10000000D+01 -.90000000D+00 0.66490207D+01 0.10059789D-01
+ -.90000000D+00 -.80000000D+00 0.68033184D+01 0.99178857D-02
+ -.80000000D+00 -.70000000D+00 0.69689922D+01 0.10313302D-01
+ -.70000000D+00 -.60000000D+00 0.71041774D+01 0.10279998D-01
+ -.60000000D+00 -.50000000D+00 0.72065666D+01 0.10619607D-01
+ -.50000000D+00 -.40000000D+00 0.73283896D+01 0.10948528D-01
+ -.40000000D+00 -.30000000D+00 0.73930962D+01 0.12945140D-01
+ -.30000000D+00 -.20000000D+00 0.74473709D+01 0.10365939D-01
+ -.20000000D+00 -.10000000D+00 0.74822625D+01 0.10779523D-01
+ -.10000000D+00 0.18041124D-15 0.75108481D+01 0.11198512D-01
+ 0.70776718D-15 0.10000000D+00 0.75149863D+01 0.11771483D-01
+ 0.10000000D+00 0.20000000D+00 0.75203703D+01 0.11397731D-01
+ 0.20000000D+00 0.30000000D+00 0.74645695D+01 0.10613760D-01
+ 0.30000000D+00 0.40000000D+00 0.73958518D+01 0.11721932D-01
+ 0.40000000D+00 0.50000000D+00 0.73225131D+01 0.12726371D-01
+ 0.50000000D+00 0.60000000D+00 0.72276894D+01 0.10663502D-01
+ 0.60000000D+00 0.70000000D+00 0.70904096D+01 0.11115187D-01
+ 0.70000000D+00 0.80000000D+00 0.69720135D+01 0.10303181D-01
+ 0.80000000D+00 0.90000000D+00 0.68179779D+01 0.10392128D-01
+ 0.90000000D+00 0.10000000D+01 0.66407162D+01 0.97591112D-02
+ 0.10000000D+01 0.11000000D+01 0.64649844D+01 0.98974995D-02
+ 0.11000000D+01 0.12000000D+01 0.62576917D+01 0.98383284D-02
+ 0.12000000D+01 0.13000000D+01 0.60342517D+01 0.10059469D-01
+ 0.13000000D+01 0.14000000D+01 0.57861739D+01 0.90549421D-02
+ 0.14000000D+01 0.15000000D+01 0.55375140D+01 0.90970465D-02
+ 0.15000000D+01 0.16000000D+01 0.52779337D+01 0.89668677D-02
+ 0.16000000D+01 0.17000000D+01 0.50070483D+01 0.86741101D-02
+ 0.17000000D+01 0.18000000D+01 0.47209672D+01 0.81799915D-02
+ 0.18000000D+01 0.19000000D+01 0.44323839D+01 0.82672817D-02
+ 0.19000000D+01 0.20000000D+01 0.41414524D+01 0.78214120D-02
+ 0.20000000D+01 0.21000000D+01 0.38527216D+01 0.76332500D-02
+ 0.21000000D+01 0.22000000D+01 0.35531503D+01 0.71740100D-02
+ 0.22000000D+01 0.23000000D+01 0.32366146D+01 0.66380903D-02
+ 0.23000000D+01 0.24000000D+01 0.29390786D+01 0.61232293D-02
+ 0.24000000D+01 0.25000000D+01 0.26730088D+01 0.94293520D-02
+ 0.25000000D+01 0.26000000D+01 0.24036915D+01 0.82107907D-02
+ 0.26000000D+01 0.27000000D+01 0.21243054D+01 0.53334440D-02
+ 0.27000000D+01 0.28000000D+01 0.18551785D+01 0.47876411D-02
+ 0.28000000D+01 0.29000000D+01 0.16248163D+01 0.46715029D-02
+ 0.29000000D+01 0.30000000D+01 0.13895091D+01 0.42972189D-02
+ 0.30000000D+01 0.31000000D+01 0.11802463D+01 0.40847671D-02
+ 0.31000000D+01 0.32000000D+01 0.98369073D+00 0.32801600D-02
+ 0.32000000D+01 0.33000000D+01 0.80954752D+00 0.32192598D-02
+ 0.33000000D+01 0.34000000D+01 0.64752309D+00 0.26729305D-02
+ 0.34000000D+01 0.35000000D+01 0.50654398D+00 0.19668571D-02
+ 0.35000000D+01 0.36000000D+01 0.38556800D+00 0.17185964D-02
+ 0.36000000D+01 0.37000000D+01 0.27838018D+00 0.14184090D-02
+ 0.37000000D+01 0.38000000D+01 0.19464079D+00 0.10718255D-02
+ 0.38000000D+01 0.39000000D+01 0.12915265D+00 0.59936996D-03
+ 0.39000000D+01 0.40000000D+01 0.79109310D-01 0.41164636D-03
+ 0.40000000D+01 0.41000000D+01 0.44674605D-01 0.22952891D-03
+ 0.41000000D+01 0.42000000D+01 0.22185692D-01 0.13359391D-03
+ 0.42000000D+01 0.43000000D+01 0.94620493D-02 0.71885434D-04
+ 0.43000000D+01 0.44000000D+01 0.32853655D-02 0.33144513D-04
+ 0.44000000D+01 0.45000000D+01 0.80265108D-03 0.13921660D-04
+ 0.45000000D+01 0.46000000D+01 0.88985419D-04 0.46831801D-05
+ 0.46000000D+01 0.47000000D+01 0.51881808D-06 0.44150909D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51673332D-06 0.44066947D-06
+ -.46000000D+01 -.45000000D+01 0.88696872D-04 0.46815953D-05
+ -.45000000D+01 -.44000000D+01 0.80697772D-03 0.14402685D-04
+ -.44000000D+01 -.43000000D+01 0.33622094D-02 0.31711726D-04
+ -.43000000D+01 -.42000000D+01 0.96834793D-02 0.65161908D-04
+ -.42000000D+01 -.41000000D+01 0.22712169D-01 0.13436357D-03
+ -.41000000D+01 -.40000000D+01 0.45858230D-01 0.22519583D-03
+ -.40000000D+01 -.39000000D+01 0.81141180D-01 0.38999443D-03
+ -.39000000D+01 -.38000000D+01 0.13390732D+00 0.94975670D-03
+ -.38000000D+01 -.37000000D+01 0.20010343D+00 0.89587057D-03
+ -.37000000D+01 -.36000000D+01 0.28991064D+00 0.12116458D-02
+ -.36000000D+01 -.35000000D+01 0.39922468D+00 0.17529953D-02
+ -.35000000D+01 -.34000000D+01 0.52281181D+00 0.18911799D-02
+ -.34000000D+01 -.33000000D+01 0.67586617D+00 0.25003956D-02
+ -.33000000D+01 -.32000000D+01 0.84549076D+00 0.28699853D-02
+ -.32000000D+01 -.31000000D+01 0.10267439D+01 0.34087125D-02
+ -.31000000D+01 -.30000000D+01 0.12364454D+01 0.39596532D-02
+ -.30000000D+01 -.29000000D+01 0.14481332D+01 0.42039777D-02
+ -.29000000D+01 -.28000000D+01 0.16975894D+01 0.53126940D-02
+ -.28000000D+01 -.27000000D+01 0.19443336D+01 0.46677399D-02
+ -.27000000D+01 -.26000000D+01 0.22348628D+01 0.56233771D-02
+ -.26000000D+01 -.25000000D+01 0.25082832D+01 0.53290795D-02
+ -.25000000D+01 -.24000000D+01 0.28056204D+01 0.66541607D-02
+ -.24000000D+01 -.23000000D+01 0.31028236D+01 0.71431879D-02
+ -.23000000D+01 -.22000000D+01 0.34029352D+01 0.63069533D-02
+ -.22000000D+01 -.21000000D+01 0.37372278D+01 0.78720624D-02
+ -.21000000D+01 -.20000000D+01 0.40659741D+01 0.76404002D-02
+ -.20000000D+01 -.19000000D+01 0.43783318D+01 0.12753488D-01
+ -.19000000D+01 -.18000000D+01 0.46837497D+01 0.87584591D-02
+ -.18000000D+01 -.17000000D+01 0.50017193D+01 0.85576421D-02
+ -.17000000D+01 -.16000000D+01 0.52778126D+01 0.84280634D-02
+ -.16000000D+01 -.15000000D+01 0.55899073D+01 0.91061077D-02
+ -.15000000D+01 -.14000000D+01 0.58563859D+01 0.99207373D-02
+ -.14000000D+01 -.13000000D+01 0.61260685D+01 0.92406183D-02
+ -.13000000D+01 -.12000000D+01 0.63772720D+01 0.92202495D-02
+ -.12000000D+01 -.11000000D+01 0.66450843D+01 0.10254660D-01
+ -.11000000D+01 -.10000000D+01 0.68539334D+01 0.10150097D-01
+ -.10000000D+01 -.90000000D+00 0.70507859D+01 0.10075482D-01
+ -.90000000D+00 -.80000000D+00 0.72175741D+01 0.99310131D-02
+ -.80000000D+00 -.70000000D+00 0.73944915D+01 0.10324793D-01
+ -.70000000D+00 -.60000000D+00 0.75394520D+01 0.10291598D-01
+ -.60000000D+00 -.50000000D+00 0.76508453D+01 0.10632411D-01
+ -.50000000D+00 -.40000000D+00 0.77797114D+01 0.10961634D-01
+ -.40000000D+00 -.30000000D+00 0.78503216D+01 0.12945578D-01
+ -.30000000D+00 -.20000000D+00 0.79090846D+01 0.10381418D-01
+ -.20000000D+00 -.10000000D+00 0.79469580D+01 0.10800945D-01
+ -.10000000D+00 0.18041124D-15 0.79762438D+01 0.11349844D-01
+ 0.70776718D-15 0.10000000D+00 0.79816078D+01 0.11931463D-01
+ 0.10000000D+00 0.20000000D+00 0.79850839D+01 0.11417762D-01
+ 0.20000000D+00 0.30000000D+00 0.79264358D+01 0.10680651D-01
+ 0.30000000D+00 0.40000000D+00 0.78526515D+01 0.11804774D-01
+ 0.40000000D+00 0.50000000D+00 0.77746863D+01 0.12847211D-01
+ 0.50000000D+00 0.60000000D+00 0.76714236D+01 0.10789434D-01
+ 0.60000000D+00 0.70000000D+00 0.75259198D+01 0.11128395D-01
+ 0.70000000D+00 0.80000000D+00 0.73976333D+01 0.10313827D-01
+ 0.80000000D+00 0.90000000D+00 0.72321510D+01 0.10412691D-01
+ 0.90000000D+00 0.10000000D+01 0.70425742D+01 0.97807000D-02
+ 0.10000000D+01 0.11000000D+01 0.68531315D+01 0.99103862D-02
+ 0.11000000D+01 0.12000000D+01 0.66313284D+01 0.98494313D-02
+ 0.12000000D+01 0.13000000D+01 0.63920954D+01 0.10073472D-01
+ 0.13000000D+01 0.14000000D+01 0.61274765D+01 0.90659637D-02
+ 0.14000000D+01 0.15000000D+01 0.58618588D+01 0.91109043D-02
+ 0.15000000D+01 0.16000000D+01 0.55840538D+01 0.89885044D-02
+ 0.16000000D+01 0.17000000D+01 0.52951994D+01 0.86864435D-02
+ 0.17000000D+01 0.18000000D+01 0.49902603D+01 0.81881984D-02
+ 0.18000000D+01 0.19000000D+01 0.46824551D+01 0.82781003D-02
+ 0.19000000D+01 0.20000000D+01 0.43726365D+01 0.78375828D-02
+ 0.20000000D+01 0.21000000D+01 0.40648724D+01 0.76516939D-02
+ 0.21000000D+01 0.22000000D+01 0.37459159D+01 0.71878863D-02
+ 0.22000000D+01 0.23000000D+01 0.34110675D+01 0.66473377D-02
+ 0.23000000D+01 0.24000000D+01 0.30955716D+01 0.61450706D-02
+ 0.24000000D+01 0.25000000D+01 0.28108668D+01 0.10047357D-01
+ 0.25000000D+01 0.26000000D+01 0.25270511D+01 0.89043400D-02
+ 0.26000000D+01 0.27000000D+01 0.22308730D+01 0.53392807D-02
+ 0.27000000D+01 0.28000000D+01 0.19465265D+01 0.48055727D-02
+ 0.28000000D+01 0.29000000D+01 0.17024095D+01 0.46872554D-02
+ 0.29000000D+01 0.30000000D+01 0.14542506D+01 0.43018252D-02
+ 0.30000000D+01 0.31000000D+01 0.12333581D+01 0.40930042D-02
+ 0.31000000D+01 0.32000000D+01 0.10263935D+01 0.32892925D-02
+ 0.32000000D+01 0.33000000D+01 0.84310639D+00 0.32232706D-02
+ 0.33000000D+01 0.34000000D+01 0.67317601D+00 0.26748308D-02
+ 0.34000000D+01 0.35000000D+01 0.52554558D+00 0.19683660D-02
+ 0.35000000D+01 0.36000000D+01 0.39907959D+00 0.17197078D-02
+ 0.36000000D+01 0.37000000D+01 0.28758997D+00 0.14193627D-02
+ 0.37000000D+01 0.38000000D+01 0.20058612D+00 0.10725103D-02
+ 0.38000000D+01 0.39000000D+01 0.13271911D+00 0.59977127D-03
+ 0.39000000D+01 0.40000000D+01 0.81081808D-01 0.41182769D-03
+ 0.40000000D+01 0.41000000D+01 0.45658335D-01 0.22962484D-03
+ 0.41000000D+01 0.42000000D+01 0.22610745D-01 0.13364913D-03
+ 0.42000000D+01 0.43000000D+01 0.96149335D-02 0.71919528D-04
+ 0.43000000D+01 0.44000000D+01 0.33271608D-02 0.33147493D-04
+ 0.44000000D+01 0.45000000D+01 0.80979358D-03 0.13921990D-04
+ 0.45000000D+01 0.46000000D+01 0.89425809D-04 0.46831908D-05
+ 0.46000000D+01 0.47000000D+01 0.51933479D-06 0.44150910D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.51697902D-06 0.44066948D-06
+ -.46000000D+01 -.45000000D+01 0.88913658D-04 0.46816008D-05
+ -.45000000D+01 -.44000000D+01 0.81061015D-03 0.14402923D-04
+ -.44000000D+01 -.43000000D+01 0.33839700D-02 0.31713053D-04
+ -.43000000D+01 -.42000000D+01 0.97648221D-02 0.65167885D-04
+ -.42000000D+01 -.41000000D+01 0.22942453D-01 0.13437726D-03
+ -.41000000D+01 -.40000000D+01 0.46402304D-01 0.22553714D-03
+ -.40000000D+01 -.39000000D+01 0.82248662D-01 0.39025682D-03
+ -.39000000D+01 -.38000000D+01 0.13594416D+00 0.94990044D-03
+ -.38000000D+01 -.37000000D+01 0.20353207D+00 0.89614364D-03
+ -.37000000D+01 -.36000000D+01 0.29530682D+00 0.12122312D-02
+ -.36000000D+01 -.35000000D+01 0.40727188D+00 0.17536310D-02
+ -.35000000D+01 -.34000000D+01 0.53422584D+00 0.18923491D-02
+ -.34000000D+01 -.33000000D+01 0.69149468D+00 0.25016891D-02
+ -.33000000D+01 -.32000000D+01 0.86609976D+00 0.28716148D-02
+ -.32000000D+01 -.31000000D+01 0.10533359D+01 0.34104555D-02
+ -.31000000D+01 -.30000000D+01 0.12698205D+01 0.39621550D-02
+ -.30000000D+01 -.29000000D+01 0.14891233D+01 0.42071281D-02
+ -.29000000D+01 -.28000000D+01 0.17471765D+01 0.53159421D-02
+ -.28000000D+01 -.27000000D+01 0.20030735D+01 0.46726422D-02
+ -.27000000D+01 -.26000000D+01 0.23037597D+01 0.56267432D-02
+ -.26000000D+01 -.25000000D+01 0.25879065D+01 0.53345638D-02
+ -.25000000D+01 -.24000000D+01 0.28967293D+01 0.66584873D-02
+ -.24000000D+01 -.23000000D+01 0.32059464D+01 0.71487448D-02
+ -.23000000D+01 -.22000000D+01 0.35183743D+01 0.63102431D-02
+ -.22000000D+01 -.21000000D+01 0.38656689D+01 0.78770988D-02
+ -.21000000D+01 -.20000000D+01 0.42074568D+01 0.76486000D-02
+ -.20000000D+01 -.19000000D+01 0.45331717D+01 0.12756096D-01
+ -.19000000D+01 -.18000000D+01 0.48520537D+01 0.87630718D-02
+ -.18000000D+01 -.17000000D+01 0.51833668D+01 0.85625850D-02
+ -.17000000D+01 -.16000000D+01 0.54727246D+01 0.84348060D-02
+ -.16000000D+01 -.15000000D+01 0.57979411D+01 0.91138137D-02
+ -.15000000D+01 -.14000000D+01 0.60770896D+01 0.99344258D-02
+ -.14000000D+01 -.13000000D+01 0.63588791D+01 0.92575747D-02
+ -.13000000D+01 -.12000000D+01 0.66219796D+01 0.92297617D-02
+ -.12000000D+01 -.11000000D+01 0.69011042D+01 0.10261647D-01
+ -.11000000D+01 -.10000000D+01 0.71204752D+01 0.10160092D-01
+ -.10000000D+01 -.90000000D+00 0.73270094D+01 0.10086248D-01
+ -.90000000D+00 -.80000000D+00 0.75028453D+01 0.99395932D-02
+ -.80000000D+00 -.70000000D+00 0.76878819D+01 0.10332814D-01
+ -.70000000D+00 -.60000000D+00 0.78398810D+01 0.10299212D-01
+ -.60000000D+00 -.50000000D+00 0.79578039D+01 0.10640759D-01
+ -.50000000D+00 -.40000000D+00 0.80917682D+01 0.10971555D-01
+ -.40000000D+00 -.30000000D+00 0.81666914D+01 0.12946407D-01
+ -.30000000D+00 -.20000000D+00 0.82286851D+01 0.10392285D-01
+ -.20000000D+00 -.10000000D+00 0.82687667D+01 0.10815236D-01
+ -.10000000D+00 0.18041124D-15 0.82985579D+01 0.11448163D-01
+ 0.70776718D-15 0.10000000D+00 0.83047393D+01 0.12033446D-01
+ 0.10000000D+00 0.20000000D+00 0.83068609D+01 0.11429764D-01
+ 0.20000000D+00 0.30000000D+00 0.82460840D+01 0.10720714D-01
+ 0.30000000D+00 0.40000000D+00 0.81687638D+01 0.11860509D-01
+ 0.40000000D+00 0.50000000D+00 0.80873229D+01 0.12938320D-01
+ 0.50000000D+00 0.60000000D+00 0.79780132D+01 0.10881566D-01
+ 0.60000000D+00 0.70000000D+00 0.78265243D+01 0.11137426D-01
+ 0.70000000D+00 0.80000000D+00 0.76910598D+01 0.10321115D-01
+ 0.80000000D+00 0.90000000D+00 0.75173242D+01 0.10427640D-01
+ 0.90000000D+00 0.10000000D+01 0.73189089D+01 0.97967688D-02
+ 0.10000000D+01 0.11000000D+01 0.71195323D+01 0.99196104D-02
+ 0.11000000D+01 0.12000000D+01 0.68873165D+01 0.98572209D-02
+ 0.12000000D+01 0.13000000D+01 0.66368001D+01 0.10083573D-01
+ 0.13000000D+01 0.14000000D+01 0.63603255D+01 0.90740401D-02
+ 0.14000000D+01 0.15000000D+01 0.60826151D+01 0.91213986D-02
+ 0.15000000D+01 0.16000000D+01 0.57918455D+01 0.90097745D-02
+ 0.16000000D+01 0.17000000D+01 0.54903342D+01 0.86999420D-02
+ 0.17000000D+01 0.18000000D+01 0.51720124D+01 0.81942993D-02
+ 0.18000000D+01 0.19000000D+01 0.48506677D+01 0.82857599D-02
+ 0.19000000D+01 0.20000000D+01 0.45275691D+01 0.78488282D-02
+ 0.20000000D+01 0.21000000D+01 0.42065859D+01 0.76716787D-02
+ 0.21000000D+01 0.22000000D+01 0.38740420D+01 0.72052377D-02
+ 0.22000000D+01 0.23000000D+01 0.35265746D+01 0.66532845D-02
+ 0.23000000D+01 0.24000000D+01 0.31987058D+01 0.61609351D-02
+ 0.24000000D+01 0.25000000D+01 0.29012106D+01 0.10436322D-01
+ 0.25000000D+01 0.26000000D+01 0.26074082D+01 0.93335678D-02
+ 0.26000000D+01 0.27000000D+01 0.22999012D+01 0.53443573D-02
+ 0.27000000D+01 0.28000000D+01 0.20052660D+01 0.48171380D-02
+ 0.28000000D+01 0.29000000D+01 0.17519224D+01 0.46961338D-02
+ 0.29000000D+01 0.30000000D+01 0.14952522D+01 0.43045122D-02
+ 0.30000000D+01 0.31000000D+01 0.12667021D+01 0.40979474D-02
+ 0.31000000D+01 0.32000000D+01 0.10529693D+01 0.32950132D-02
+ 0.32000000D+01 0.33000000D+01 0.86375154D+00 0.32260012D-02
+ 0.33000000D+01 0.34000000D+01 0.68879102D+00 0.26759570D-02
+ 0.34000000D+01 0.35000000D+01 0.53698352D+00 0.19692087D-02
+ 0.35000000D+01 0.36000000D+01 0.40710878D+00 0.17203527D-02
+ 0.36000000D+01 0.37000000D+01 0.29298740D+00 0.14197345D-02
+ 0.37000000D+01 0.38000000D+01 0.20402398D+00 0.10729191D-02
+ 0.38000000D+01 0.39000000D+01 0.13475111D+00 0.60000144D-03
+ 0.39000000D+01 0.40000000D+01 0.82187779D-01 0.41192819D-03
+ 0.40000000D+01 0.41000000D+01 0.46200802D-01 0.22967480D-03
+ 0.41000000D+01 0.42000000D+01 0.22841032D-01 0.13367805D-03
+ 0.42000000D+01 0.43000000D+01 0.96961844D-02 0.71936120D-04
+ 0.43000000D+01 0.44000000D+01 0.33489016D-02 0.33149000D-04
+ 0.44000000D+01 0.45000000D+01 0.81341815D-03 0.13922152D-04
+ 0.45000000D+01 0.46000000D+01 0.89643097D-04 0.46831960D-05
+ 0.46000000D+01 0.47000000D+01 0.51958022D-06 0.44150910D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 -.25039111D+01 0.24271052D-02
+ 0.30000000D+01 0.60000000D+01 0.25148015D+01 0.12671998D-02
+ 0.60000000D+01 0.90000000D+01 0.19834843D+01 0.95474691D-03
+ 0.90000000D+01 0.12000000D+02 0.14670773D+01 0.77026619D-03
+ 0.12000000D+02 0.15000000D+02 0.11257336D+01 0.68098716D-03
+ 0.15000000D+02 0.18000000D+02 0.89329392D+00 0.56615116D-03
+ 0.18000000D+02 0.21000000D+02 0.72794173D+00 0.51394573D-03
+ 0.21000000D+02 0.24000000D+02 0.60573990D+00 0.50506705D-03
+ 0.24000000D+02 0.27000000D+02 0.51246675D+00 0.57642357D-03
+ 0.27000000D+02 0.30000000D+02 0.44027282D+00 0.58746692D-03
+ 0.30000000D+02 0.33000000D+02 0.38362565D+00 0.47399038D-03
+ 0.33000000D+02 0.36000000D+02 0.33557798D+00 0.49499280D-03
+ 0.36000000D+02 0.39000000D+02 0.29697000D+00 0.44303836D-03
+ 0.39000000D+02 0.42000000D+02 0.26424941D+00 0.35474220D-03
+ 0.42000000D+02 0.45000000D+02 0.23583495D+00 0.38243467D-03
+ 0.45000000D+02 0.48000000D+02 0.21296662D+00 0.35245103D-03
+ 0.48000000D+02 0.51000000D+02 0.19186846D+00 0.29311020D-03
+ 0.51000000D+02 0.54000000D+02 0.17403377D+00 0.27485428D-03
+ 0.54000000D+02 0.57000000D+02 0.15822188D+00 0.25316192D-03
+ 0.57000000D+02 0.60000000D+02 0.14460439D+00 0.25730690D-03
+ 0.60000000D+02 0.63000000D+02 0.13216449D+00 0.25019737D-03
+ 0.63000000D+02 0.66000000D+02 0.12133137D+00 0.24590488D-03
+ 0.66000000D+02 0.69000000D+02 0.11147657D+00 0.23789548D-03
+ 0.69000000D+02 0.72000000D+02 0.10255536D+00 0.23972280D-03
+ 0.72000000D+02 0.75000000D+02 0.95151338D-01 0.22165583D-03
+ 0.75000000D+02 0.78000000D+02 0.87441996D-01 0.25791366D-03
+ 0.78000000D+02 0.81000000D+02 0.81352157D-01 0.29383844D-03
+ 0.81000000D+02 0.84000000D+02 0.74964941D-01 0.23001627D-03
+ 0.84000000D+02 0.87000000D+02 0.69805749D-01 0.20093139D-03
+ 0.87000000D+02 0.90000000D+02 0.64888156D-01 0.24162890D-03
+ 0.90000000D+02 0.93000000D+02 0.60184683D-01 0.28330592D-03
+ 0.93000000D+02 0.96000000D+02 0.56125590D-01 0.27973754D-03
+ 0.96000000D+02 0.99000000D+02 0.52692917D-01 0.20799382D-03
+ 0.99000000D+02 0.10200000D+03 0.49234226D-01 0.15543657D-03
+ 0.10200000D+03 0.10500000D+03 0.45905043D-01 0.14187553D-03
+ 0.10500000D+03 0.10800000D+03 0.42814479D-01 0.14896239D-03
+ 0.10800000D+03 0.11100000D+03 0.40145741D-01 0.14149795D-03
+ 0.11100000D+03 0.11400000D+03 0.37763467D-01 0.12862369D-03
+ 0.11400000D+03 0.11700000D+03 0.35262962D-01 0.12434008D-03
+ 0.11700000D+03 0.12000000D+03 0.33244849D-01 0.12466156D-03
+ 0.12000000D+03 0.12300000D+03 0.31346973D-01 0.14728261D-03
+ 0.12300000D+03 0.12600000D+03 0.29316012D-01 0.13337518D-03
+ 0.12600000D+03 0.12900000D+03 0.27771038D-01 0.10982683D-03
+ 0.12900000D+03 0.13200000D+03 0.26028312D-01 0.11177489D-03
+ 0.13200000D+03 0.13500000D+03 0.24619918D-01 0.10030180D-03
+ 0.13500000D+03 0.13800000D+03 0.23115115D-01 0.10215368D-03
+ 0.13800000D+03 0.14100000D+03 0.21933555D-01 0.13374881D-03
+ 0.14100000D+03 0.14400000D+03 0.20479142D-01 0.14720930D-03
+ 0.14400000D+03 0.14700000D+03 0.19479439D-01 0.12036872D-03
+ 0.14700000D+03 0.15000000D+03 0.18643127D-01 0.10493153D-03
+ 0.15000000D+03 0.15300000D+03 0.17544269D-01 0.81707201D-04
+ 0.15300000D+03 0.15600000D+03 0.16567702D-01 0.70988033D-04
+ 0.15600000D+03 0.15900000D+03 0.15685990D-01 0.87211337D-04
+ 0.15900000D+03 0.16200000D+03 0.14921348D-01 0.87317242D-04
+ 0.16200000D+03 0.16500000D+03 0.14013583D-01 0.73420344D-04
+ 0.16500000D+03 0.16800000D+03 0.13298696D-01 0.72722934D-04
+ 0.16800000D+03 0.17100000D+03 0.12718594D-01 0.64953422D-04
+ 0.17100000D+03 0.17400000D+03 0.12052382D-01 0.66074677D-04
+ 0.17400000D+03 0.17700000D+03 0.11347499D-01 0.60442532D-04
+ 0.17700000D+03 0.18000000D+03 0.10867619D-01 0.46735148D-04
+ 0.18000000D+03 0.18300000D+03 0.10290153D-01 0.47937760D-04
+ 0.18300000D+03 0.18600000D+03 0.97968456D-02 0.61363586D-04
+ 0.18600000D+03 0.18900000D+03 0.94101371D-02 0.67801631D-04
+ 0.18900000D+03 0.19200000D+03 0.88521087D-02 0.17754313D-03
+ 0.19200000D+03 0.19500000D+03 0.82747536D-02 0.17651763D-03
+ 0.19500000D+03 0.19800000D+03 0.81440477D-02 0.66435012D-04
+ 0.19800000D+03 0.20100000D+03 0.75141703D-02 0.67414087D-04
+ 0.20100000D+03 0.20400000D+03 0.72890779D-02 0.58400669D-04
+ 0.20400000D+03 0.20700000D+03 0.69185917D-02 0.54498852D-04
+ 0.20700000D+03 0.21000000D+03 0.66470456D-02 0.52335296D-04
+ 0.21000000D+03 0.21300000D+03 0.62001747D-02 0.73720779D-04
+ 0.21300000D+03 0.21600000D+03 0.60680483D-02 0.69874354D-04
+ 0.21600000D+03 0.21900000D+03 0.57246508D-02 0.77912707D-04
+ 0.21900000D+03 0.22200000D+03 0.53600773D-02 0.85492397D-04
+ 0.22200000D+03 0.22500000D+03 0.51632091D-02 0.54999611D-04
+ 0.22500000D+03 0.22800000D+03 0.50327961D-02 0.73030501D-04
+ 0.22800000D+03 0.23100000D+03 0.47352732D-02 0.71341344D-04
+ 0.23100000D+03 0.23400000D+03 0.45571376D-02 0.34445118D-04
+ 0.23400000D+03 0.23700000D+03 0.44022081D-02 0.99178004D-04
+ 0.23700000D+03 0.24000000D+03 0.40790462D-02 0.10159299D-03
+ 0.24000000D+03 0.24300000D+03 0.38716938D-02 0.47907783D-04
+ 0.24300000D+03 0.24600000D+03 0.38377987D-02 0.62653711D-04
+ 0.24600000D+03 0.24900000D+03 0.36662904D-02 0.88361014D-04
+ 0.24900000D+03 0.25200000D+03 0.33622185D-02 0.76126631D-04
+ 0.25200000D+03 0.25500000D+03 0.33394950D-02 0.31820884D-04
+ 0.25500000D+03 0.25800000D+03 0.31281574D-02 0.33619246D-04
+ 0.25800000D+03 0.26100000D+03 0.30484833D-02 0.35948743D-04
+ 0.26100000D+03 0.26400000D+03 0.28391779D-02 0.32213789D-04
+ 0.26400000D+03 0.26700000D+03 0.28344853D-02 0.26582286D-04
+ 0.26700000D+03 0.27000000D+03 0.26346433D-02 0.26650916D-04
+ 0.27000000D+03 0.27300000D+03 0.26012640D-02 0.49653498D-04
+ 0.27300000D+03 0.27600000D+03 0.24114160D-02 0.47934867D-04
+ 0.27600000D+03 0.27900000D+03 0.23267701D-02 0.25015091D-04
+ 0.27900000D+03 0.28200000D+03 0.22601733D-02 0.33846758D-04
+ 0.28200000D+03 0.28500000D+03 0.21704449D-02 0.45423217D-04
+ 0.28500000D+03 0.28800000D+03 0.19924837D-02 0.40289333D-04
+ 0.28800000D+03 0.29100000D+03 0.20337650D-02 0.52725182D-04
+ 0.29100000D+03 0.29400000D+03 0.18821155D-02 0.52087166D-04
+ 0.29400000D+03 0.29700000D+03 0.18029666D-02 0.31076139D-04
+ 0.29700000D+03 0.30000000D+03 0.17751099D-02 0.29203467D-04
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 -.25037661D+01 0.24267829D-02
+ 0.30000000D+01 0.60000000D+01 0.25114523D+01 0.12656054D-02
+ 0.60000000D+01 0.90000000D+01 0.19764234D+01 0.95148706D-03
+ 0.90000000D+01 0.12000000D+02 0.14568699D+01 0.76493939D-03
+ 0.12000000D+02 0.15000000D+02 0.11128226D+01 0.67326582D-03
+ 0.15000000D+02 0.18000000D+02 0.87805379D+00 0.55683978D-03
+ 0.18000000D+02 0.21000000D+02 0.71069674D+00 0.50147756D-03
+ 0.21000000D+02 0.24000000D+02 0.58677142D+00 0.48942689D-03
+ 0.24000000D+02 0.27000000D+02 0.49203079D+00 0.55244994D-03
+ 0.27000000D+02 0.30000000D+02 0.41855879D+00 0.55927578D-03
+ 0.30000000D+02 0.33000000D+02 0.36075584D+00 0.44568349D-03
+ 0.33000000D+02 0.36000000D+02 0.31185512D+00 0.45957672D-03
+ 0.36000000D+02 0.39000000D+02 0.27247717D+00 0.40750903D-03
+ 0.39000000D+02 0.42000000D+02 0.23916948D+00 0.32084119D-03
+ 0.42000000D+02 0.45000000D+02 0.21038297D+00 0.34087873D-03
+ 0.45000000D+02 0.48000000D+02 0.18710020D+00 0.31030644D-03
+ 0.48000000D+02 0.51000000D+02 0.16587682D+00 0.25340400D-03
+ 0.51000000D+02 0.54000000D+02 0.14795470D+00 0.23384345D-03
+ 0.54000000D+02 0.57000000D+02 0.13218527D+00 0.21151056D-03
+ 0.57000000D+02 0.60000000D+02 0.11864007D+00 0.21105568D-03
+ 0.60000000D+02 0.63000000D+02 0.10642214D+00 0.20155348D-03
+ 0.63000000D+02 0.66000000D+02 0.95834204D-01 0.19417992D-03
+ 0.66000000D+02 0.69000000D+02 0.86320264D-01 0.18438929D-03
+ 0.69000000D+02 0.72000000D+02 0.77818019D-01 0.18165039D-03
+ 0.72000000D+02 0.75000000D+02 0.70713761D-01 0.16521358D-03
+ 0.75000000D+02 0.78000000D+02 0.63621770D-01 0.18666454D-03
+ 0.78000000D+02 0.81000000D+02 0.57927056D-01 0.20954811D-03
+ 0.81000000D+02 0.84000000D+02 0.52223601D-01 0.16098496D-03
+ 0.84000000D+02 0.87000000D+02 0.47561309D-01 0.13650875D-03
+ 0.87000000D+02 0.90000000D+02 0.43227418D-01 0.16072554D-03
+ 0.90000000D+02 0.93000000D+02 0.39193897D-01 0.18405969D-03
+ 0.93000000D+02 0.96000000D+02 0.35722842D-01 0.17850247D-03
+ 0.96000000D+02 0.99000000D+02 0.32769375D-01 0.12987620D-03
+ 0.99000000D+02 0.10200000D+03 0.29909238D-01 0.94657892D-04
+ 0.10200000D+03 0.10500000D+03 0.27237348D-01 0.83997943D-04
+ 0.10500000D+03 0.10800000D+03 0.24810541D-01 0.86378386D-04
+ 0.10800000D+03 0.11100000D+03 0.22719543D-01 0.80089688D-04
+ 0.11100000D+03 0.11400000D+03 0.20867352D-01 0.71235791D-04
+ 0.11400000D+03 0.11700000D+03 0.19026121D-01 0.66962222D-04
+ 0.11700000D+03 0.12000000D+03 0.17512928D-01 0.65722977D-04
+ 0.12000000D+03 0.12300000D+03 0.16121776D-01 0.75439267D-04
+ 0.12300000D+03 0.12600000D+03 0.14718748D-01 0.67475307D-04
+ 0.12600000D+03 0.12900000D+03 0.13612351D-01 0.53524007D-04
+ 0.12900000D+03 0.13200000D+03 0.12454842D-01 0.53777491D-04
+ 0.13200000D+03 0.13500000D+03 0.11502217D-01 0.46684728D-04
+ 0.13500000D+03 0.13800000D+03 0.10543556D-01 0.46754621D-04
+ 0.13800000D+03 0.14100000D+03 0.97680408D-02 0.59159359D-04
+ 0.14100000D+03 0.14400000D+03 0.89060589D-02 0.64251290D-04
+ 0.14400000D+03 0.14700000D+03 0.82740174D-02 0.51142131D-04
+ 0.14700000D+03 0.15000000D+03 0.77331743D-02 0.43661732D-04
+ 0.15000000D+03 0.15300000D+03 0.71067878D-02 0.33173108D-04
+ 0.15300000D+03 0.15600000D+03 0.65552072D-02 0.28105774D-04
+ 0.15600000D+03 0.15900000D+03 0.60624209D-02 0.33554186D-04
+ 0.15900000D+03 0.16200000D+03 0.56337288D-02 0.33114048D-04
+ 0.16200000D+03 0.16500000D+03 0.51695824D-02 0.27057055D-04
+ 0.16500000D+03 0.16800000D+03 0.47940370D-02 0.26256682D-04
+ 0.16800000D+03 0.17100000D+03 0.44811014D-02 0.22904464D-04
+ 0.17100000D+03 0.17400000D+03 0.41501021D-02 0.22720176D-04
+ 0.17400000D+03 0.17700000D+03 0.38196225D-02 0.20419288D-04
+ 0.17700000D+03 0.18000000D+03 0.35760800D-02 0.15395485D-04
+ 0.18000000D+03 0.18300000D+03 0.33109349D-02 0.15404482D-04
+ 0.18300000D+03 0.18600000D+03 0.30825982D-02 0.19244456D-04
+ 0.18600000D+03 0.18900000D+03 0.28955357D-02 0.20889694D-04
+ 0.18900000D+03 0.19200000D+03 0.26641305D-02 0.52926906D-04
+ 0.19200000D+03 0.19500000D+03 0.24364207D-02 0.52487070D-04
+ 0.19500000D+03 0.19800000D+03 0.23463032D-02 0.19091240D-04
+ 0.19800000D+03 0.20100000D+03 0.21183635D-02 0.19046986D-04
+ 0.20100000D+03 0.20400000D+03 0.20114446D-02 0.16121066D-04
+ 0.20400000D+03 0.20700000D+03 0.18688112D-02 0.14731278D-04
+ 0.20700000D+03 0.21000000D+03 0.17575374D-02 0.13834174D-04
+ 0.21000000D+03 0.21300000D+03 0.16053326D-02 0.18987528D-04
+ 0.21300000D+03 0.21600000D+03 0.15386870D-02 0.17839044D-04
+ 0.21600000D+03 0.21900000D+03 0.14213243D-02 0.19197460D-04
+ 0.21900000D+03 0.22200000D+03 0.13037983D-02 0.20888021D-04
+ 0.22200000D+03 0.22500000D+03 0.12306861D-02 0.13152005D-04
+ 0.22500000D+03 0.22800000D+03 0.11753420D-02 0.16941094D-04
+ 0.22800000D+03 0.23100000D+03 0.10835042D-02 0.16437938D-04
+ 0.23100000D+03 0.23400000D+03 0.10219887D-02 0.77410852D-05
+ 0.23400000D+03 0.23700000D+03 0.96753528D-03 0.21604841D-04
+ 0.23700000D+03 0.24000000D+03 0.87893595D-03 0.22072530D-04
+ 0.24000000D+03 0.24300000D+03 0.81815367D-03 0.10100283D-04
+ 0.24300000D+03 0.24600000D+03 0.79535279D-03 0.12951621D-04
+ 0.24600000D+03 0.24900000D+03 0.74497970D-03 0.17896876D-04
+ 0.24900000D+03 0.25200000D+03 0.67018082D-03 0.15298248D-04
+ 0.25200000D+03 0.25500000D+03 0.65317529D-03 0.62247593D-05
+ 0.25500000D+03 0.25800000D+03 0.60035661D-03 0.64474721D-05
+ 0.25800000D+03 0.26100000D+03 0.57413549D-03 0.67668419D-05
+ 0.26100000D+03 0.26400000D+03 0.52488508D-03 0.59710589D-05
+ 0.26400000D+03 0.26700000D+03 0.51439644D-03 0.48244878D-05
+ 0.26700000D+03 0.27000000D+03 0.46928765D-03 0.47451056D-05
+ 0.27000000D+03 0.27300000D+03 0.45493605D-03 0.86303914D-05
+ 0.27300000D+03 0.27600000D+03 0.41410067D-03 0.82853107D-05
+ 0.27600000D+03 0.27900000D+03 0.39248356D-03 0.42055305D-05
+ 0.27900000D+03 0.28200000D+03 0.37447373D-03 0.55966349D-05
+ 0.28200000D+03 0.28500000D+03 0.35318548D-03 0.73740086D-05
+ 0.28500000D+03 0.28800000D+03 0.31863647D-03 0.64773922D-05
+ 0.28800000D+03 0.29100000D+03 0.31966499D-03 0.82303533D-05
+ 0.29100000D+03 0.29400000D+03 0.29060069D-03 0.81008792D-05
+ 0.29400000D+03 0.29700000D+03 0.27368059D-03 0.46973576D-05
+ 0.29700000D+03 0.30000000D+03 0.26485385D-03 0.43826395D-05
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 -.20696656D+00 0.41442640D-03
+ 0.12500000D+03 0.13000000D+03 -.33872655D+01 0.17215032D-02
+ 0.13000000D+03 0.13500000D+03 0.30008463D+01 0.17660534D-02
+ 0.13500000D+03 0.14000000D+03 0.16968581D+01 0.15765425D-02
+ 0.14000000D+03 0.14500000D+03 0.10992344D+01 0.82830069D-03
+ 0.14500000D+03 0.15000000D+03 0.77988649D+00 0.71270416D-03
+ 0.15000000D+03 0.15500000D+03 0.58575059D+00 0.70980499D-03
+ 0.15500000D+03 0.16000000D+03 0.45609097D+00 0.73596599D-03
+ 0.16000000D+03 0.16500000D+03 0.36916812D+00 0.91544576D-03
+ 0.16500000D+03 0.17000000D+03 0.30398548D+00 0.83800640D-03
+ 0.17000000D+03 0.17500000D+03 0.25404602D+00 0.54239961D-03
+ 0.17500000D+03 0.18000000D+03 0.21719327D+00 0.46783203D-03
+ 0.18000000D+03 0.18500000D+03 0.18648196D+00 0.37520693D-03
+ 0.18500000D+03 0.19000000D+03 0.16243074D+00 0.32943377D-03
+ 0.19000000D+03 0.19500000D+03 0.14174900D+00 0.36511181D-03
+ 0.19500000D+03 0.20000000D+03 0.12659094D+00 0.33279578D-03
+ 0.20000000D+03 0.20500000D+03 0.11167885D+00 0.25695940D-03
+ 0.20500000D+03 0.21000000D+03 0.99938484D-01 0.29886937D-03
+ 0.21000000D+03 0.21500000D+03 0.89804384D-01 0.32051232D-03
+ 0.21500000D+03 0.22000000D+03 0.81580322D-01 0.26271142D-03
+ 0.22000000D+03 0.22500000D+03 0.73335951D-01 0.25676967D-03
+ 0.22500000D+03 0.23000000D+03 0.66851747D-01 0.26451035D-03
+ 0.23000000D+03 0.23500000D+03 0.60834505D-01 0.30581561D-03
+ 0.23500000D+03 0.24000000D+03 0.56371208D-01 0.31015728D-03
+ 0.24000000D+03 0.24500000D+03 0.51380893D-01 0.23175280D-03
+ 0.24500000D+03 0.25000000D+03 0.47395268D-01 0.24800869D-03
+ 0.25000000D+03 0.25500000D+03 0.43582740D-01 0.26830251D-03
+ 0.25500000D+03 0.26000000D+03 0.40434036D-01 0.23896310D-03
+ 0.26000000D+03 0.26500000D+03 0.37135294D-01 0.27096490D-03
+ 0.26500000D+03 0.27000000D+03 0.34997910D-01 0.25230647D-03
+ 0.27000000D+03 0.27500000D+03 0.32405865D-01 0.16073867D-03
+ 0.27500000D+03 0.28000000D+03 0.29690550D-01 0.18477473D-03
+ 0.28000000D+03 0.28500000D+03 0.28249981D-01 0.18944194D-03
+ 0.28500000D+03 0.29000000D+03 0.26234056D-01 0.16527015D-03
+ 0.29000000D+03 0.29500000D+03 0.24481360D-01 0.15683978D-03
+ 0.29500000D+03 0.30000000D+03 0.22934496D-01 0.18143520D-03
+ 0.30000000D+03 0.30500000D+03 0.21774889D-01 0.17173231D-03
+ 0.30500000D+03 0.31000000D+03 0.20289625D-01 0.15213675D-03
+ 0.31000000D+03 0.31500000D+03 0.19060157D-01 0.15357803D-03
+ 0.31500000D+03 0.32000000D+03 0.18019586D-01 0.12456923D-03
+ 0.32000000D+03 0.32500000D+03 0.17007085D-01 0.10179296D-03
+ 0.32500000D+03 0.33000000D+03 0.16099966D-01 0.10349032D-03
+ 0.33000000D+03 0.33500000D+03 0.15003976D-01 0.10384880D-03
+ 0.33500000D+03 0.34000000D+03 0.14244901D-01 0.10311875D-03
+ 0.34000000D+03 0.34500000D+03 0.13578054D-01 0.98038436D-04
+ 0.34500000D+03 0.35000000D+03 0.12792956D-01 0.98170002D-04
+ 0.35000000D+03 0.35500000D+03 0.12146869D-01 0.10145559D-03
+ 0.35500000D+03 0.36000000D+03 0.11532264D-01 0.10220537D-03
+ 0.36000000D+03 0.36500000D+03 0.10876978D-01 0.10006487D-03
+ 0.36500000D+03 0.37000000D+03 0.10375796D-01 0.89478859D-04
+ 0.37000000D+03 0.37500000D+03 0.99657361D-02 0.78859053D-04
+ 0.37500000D+03 0.38000000D+03 0.88469002D-02 0.30944046D-03
+ 0.38000000D+03 0.38500000D+03 0.94309164D-02 0.30922093D-03
+ 0.38500000D+03 0.39000000D+03 0.85031417D-02 0.78842480D-04
+ 0.39000000D+03 0.39500000D+03 0.79429398D-02 0.11676652D-03
+ 0.39500000D+03 0.40000000D+03 0.77855413D-02 0.11502015D-03
+ 0.40000000D+03 0.40500000D+03 0.74284914D-02 0.75170979D-04
+ 0.40500000D+03 0.41000000D+03 0.68756860D-02 0.83753250D-04
+ 0.41000000D+03 0.41500000D+03 0.68055676D-02 0.79518173D-04
+ 0.41500000D+03 0.42000000D+03 0.63095080D-02 0.75836099D-04
+ 0.42000000D+03 0.42500000D+03 0.61147527D-02 0.91648573D-04
+ 0.42500000D+03 0.43000000D+03 0.57854429D-02 0.81489281D-04
+ 0.43000000D+03 0.43500000D+03 0.56827206D-02 0.73718121D-04
+ 0.43500000D+03 0.44000000D+03 0.52377944D-02 0.83352298D-04
+ 0.44000000D+03 0.44500000D+03 0.50647827D-02 0.10247786D-03
+ 0.44500000D+03 0.45000000D+03 0.50320414D-02 0.86380248D-04
+ 0.45000000D+03 0.45500000D+03 0.46994033D-02 0.48975955D-04
+ 0.45500000D+03 0.46000000D+03 0.44148187D-02 0.70743777D-04
+ 0.46000000D+03 0.46500000D+03 0.43316026D-02 0.72906202D-04
+ 0.46500000D+03 0.47000000D+03 0.41257795D-02 0.53002707D-04
+ 0.47000000D+03 0.47500000D+03 0.39588359D-02 0.47643352D-04
+ 0.47500000D+03 0.48000000D+03 0.37835787D-02 0.44803155D-04
+ 0.48000000D+03 0.48500000D+03 0.36042401D-02 0.70129850D-04
+ 0.48500000D+03 0.49000000D+03 0.34681346D-02 0.71300932D-04
+ 0.49000000D+03 0.49500000D+03 0.31950809D-02 0.21006672D-03
+ 0.49500000D+03 0.50000000D+03 0.34201675D-02 0.20855139D-03
+ 0.50000000D+03 0.50500000D+03 0.30385096D-02 0.10757360D-03
+ 0.50500000D+03 0.51000000D+03 0.30492148D-02 0.10891220D-03
+ 0.51000000D+03 0.51500000D+03 0.28965603D-02 0.38484992D-04
+ 0.51500000D+03 0.52000000D+03 0.27283870D-02 0.28525251D-04
+ 0.52000000D+03 0.52500000D+03 0.22019803D-02 0.36864804D-03
+ 0.52500000D+03 0.53000000D+03 0.29606833D-02 0.36899468D-03
+ 0.53000000D+03 0.53500000D+03 0.24332049D-02 0.37234368D-04
+ 0.53500000D+03 0.54000000D+03 0.24072326D-02 0.32194209D-04
+ 0.54000000D+03 0.54500000D+03 0.19512046D-02 0.27927124D-03
+ 0.54500000D+03 0.55000000D+03 0.24884952D-02 0.27937243D-03
+ 0.55000000D+03 0.55500000D+03 0.21157344D-02 0.34295231D-04
+ 0.55500000D+03 0.56000000D+03 0.20015134D-02 0.32655983D-04
+ 0.56000000D+03 0.56500000D+03 0.20416367D-02 0.31970539D-04
+ 0.56500000D+03 0.57000000D+03 0.18543114D-02 0.32808049D-04
+ 0.57000000D+03 0.57500000D+03 0.17551464D-02 0.36534759D-04
+ 0.57500000D+03 0.58000000D+03 0.16796842D-02 0.63492500D-04
+ 0.58000000D+03 0.58500000D+03 0.18143434D-02 0.64504434D-04
+ 0.58500000D+03 0.59000000D+03 0.16447245D-02 0.38106073D-04
+ 0.59000000D+03 0.59500000D+03 0.16143585D-02 0.27943887D-04
+ 0.59500000D+03 0.60000000D+03 0.14941873D-02 0.38170365D-04
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 -.20696656D+00 0.41442640D-03
+ 0.12500000D+03 0.13000000D+03 -.33891013D+01 0.17204253D-02
+ 0.13000000D+03 0.13500000D+03 0.29904741D+01 0.17576717D-02
+ 0.13500000D+03 0.14000000D+03 0.16803907D+01 0.15644409D-02
+ 0.14000000D+03 0.14500000D+03 0.10783452D+01 0.81305360D-03
+ 0.14500000D+03 0.15000000D+03 0.75559476D+00 0.69032191D-03
+ 0.15000000D+03 0.15500000D+03 0.55885256D+00 0.67670688D-03
+ 0.15500000D+03 0.16000000D+03 0.42733298D+00 0.68880800D-03
+ 0.16000000D+03 0.16500000D+03 0.33879689D+00 0.83685673D-03
+ 0.16500000D+03 0.17000000D+03 0.27257065D+00 0.75615190D-03
+ 0.17000000D+03 0.17500000D+03 0.22206386D+00 0.47439892D-03
+ 0.17500000D+03 0.18000000D+03 0.18468258D+00 0.39903097D-03
+ 0.18000000D+03 0.18500000D+03 0.15395978D+00 0.31065382D-03
+ 0.18500000D+03 0.19000000D+03 0.12998284D+00 0.26356925D-03
+ 0.19000000D+03 0.19500000D+03 0.10978434D+00 0.28184518D-03
+ 0.19500000D+03 0.20000000D+03 0.94756737D-01 0.25079160D-03
+ 0.20000000D+03 0.20500000D+03 0.80690067D-01 0.18560620D-03
+ 0.20500000D+03 0.21000000D+03 0.69632275D-01 0.20725334D-03
+ 0.21000000D+03 0.21500000D+03 0.60293433D-01 0.21552311D-03
+ 0.21500000D+03 0.22000000D+03 0.52728387D-01 0.17089217D-03
+ 0.22000000D+03 0.22500000D+03 0.45607787D-01 0.15869195D-03
+ 0.22500000D+03 0.23000000D+03 0.39991235D-01 0.15894023D-03
+ 0.23000000D+03 0.23500000D+03 0.34988008D-01 0.17432798D-03
+ 0.23500000D+03 0.24000000D+03 0.31158895D-01 0.17277038D-03
+ 0.24000000D+03 0.24500000D+03 0.27286910D-01 0.12323280D-03
+ 0.24500000D+03 0.25000000D+03 0.24183587D-01 0.12604570D-03
+ 0.25000000D+03 0.25500000D+03 0.21365475D-01 0.13161326D-03
+ 0.25500000D+03 0.26000000D+03 0.19045176D-01 0.11310708D-03
+ 0.26000000D+03 0.26500000D+03 0.16808831D-01 0.12173746D-03
+ 0.26500000D+03 0.27000000D+03 0.15224223D-01 0.11100190D-03
+ 0.27000000D+03 0.27500000D+03 0.13546884D-01 0.67184504D-04
+ 0.27500000D+03 0.28000000D+03 0.11935164D-01 0.73953625D-04
+ 0.28000000D+03 0.28500000D+03 0.10921706D-01 0.73457877D-04
+ 0.28500000D+03 0.29000000D+03 0.97556607D-02 0.61585603D-04
+ 0.29000000D+03 0.29500000D+03 0.87594170D-02 0.56102836D-04
+ 0.29500000D+03 0.30000000D+03 0.78998774D-02 0.62224953D-04
+ 0.30000000D+03 0.30500000D+03 0.72215313D-02 0.57348098D-04
+ 0.30500000D+03 0.31000000D+03 0.64797551D-02 0.48437880D-04
+ 0.31000000D+03 0.31500000D+03 0.58656224D-02 0.47413746D-04
+ 0.31500000D+03 0.32000000D+03 0.53450756D-02 0.37163529D-04
+ 0.32000000D+03 0.32500000D+03 0.48644714D-02 0.29180524D-04
+ 0.32500000D+03 0.33000000D+03 0.44417913D-02 0.28483146D-04
+ 0.33000000D+03 0.33500000D+03 0.39945438D-02 0.27737683D-04
+ 0.33500000D+03 0.34000000D+03 0.36618581D-02 0.26462584D-04
+ 0.34000000D+03 0.34500000D+03 0.33714010D-02 0.24439246D-04
+ 0.34500000D+03 0.35000000D+03 0.30692017D-02 0.23480022D-04
+ 0.35000000D+03 0.35500000D+03 0.28167290D-02 0.23585324D-04
+ 0.35500000D+03 0.36000000D+03 0.25860277D-02 0.22873168D-04
+ 0.36000000D+03 0.36500000D+03 0.23593422D-02 0.21780752D-04
+ 0.36500000D+03 0.37000000D+03 0.21784959D-02 0.18792968D-04
+ 0.37000000D+03 0.37500000D+03 0.20252207D-02 0.16099154D-04
+ 0.37500000D+03 0.38000000D+03 0.17428471D-02 0.60090206D-04
+ 0.38000000D+03 0.38500000D+03 0.17997920D-02 0.59800474D-04
+ 0.38500000D+03 0.39000000D+03 0.15715619D-02 0.14502770D-04
+ 0.39000000D+03 0.39500000D+03 0.14236665D-02 0.20809528D-04
+ 0.39500000D+03 0.40000000D+03 0.13537864D-02 0.20130374D-04
+ 0.40000000D+03 0.40500000D+03 0.12530870D-02 0.12741364D-04
+ 0.40500000D+03 0.41000000D+03 0.11257279D-02 0.13627343D-04
+ 0.41000000D+03 0.41500000D+03 0.10819537D-02 0.12752433D-04
+ 0.41500000D+03 0.42000000D+03 0.97419362D-03 0.11614771D-04
+ 0.42000000D+03 0.42500000D+03 0.91766080D-03 0.13775250D-04
+ 0.42500000D+03 0.43000000D+03 0.84399517D-03 0.11910672D-04
+ 0.43000000D+03 0.43500000D+03 0.80593779D-03 0.10464171D-04
+ 0.43500000D+03 0.44000000D+03 0.72250748D-03 0.11456975D-04
+ 0.44000000D+03 0.44500000D+03 0.67999646D-03 0.13726232D-04
+ 0.44500000D+03 0.45000000D+03 0.65730946D-03 0.11377026D-04
+ 0.45000000D+03 0.45500000D+03 0.59743200D-03 0.62431092D-05
+ 0.45500000D+03 0.46000000D+03 0.54669233D-03 0.86921963D-05
+ 0.46000000D+03 0.46500000D+03 0.52237908D-03 0.88550747D-05
+ 0.46500000D+03 0.47000000D+03 0.48486878D-03 0.62243148D-05
+ 0.47000000D+03 0.47500000D+03 0.45353029D-03 0.54792288D-05
+ 0.47500000D+03 0.48000000D+03 0.42245217D-03 0.49940256D-05
+ 0.48000000D+03 0.48500000D+03 0.39258694D-03 0.75905873D-05
+ 0.48500000D+03 0.49000000D+03 0.36869633D-03 0.76216918D-05
+ 0.49000000D+03 0.49500000D+03 0.33162619D-03 0.21535871D-04
+ 0.49500000D+03 0.50000000D+03 0.34633812D-03 0.21356028D-04
+ 0.50000000D+03 0.50500000D+03 0.30027493D-03 0.10521555D-04
+ 0.50500000D+03 0.51000000D+03 0.29422571D-03 0.10611488D-04
+ 0.51000000D+03 0.51500000D+03 0.27289166D-03 0.36468171D-05
+ 0.51500000D+03 0.52000000D+03 0.25112335D-03 0.26253446D-05
+ 0.52000000D+03 0.52500000D+03 0.19849546D-03 0.32801629D-04
+ 0.52500000D+03 0.53000000D+03 0.26077704D-03 0.32819439D-04
+ 0.53000000D+03 0.53500000D+03 0.20922132D-03 0.32075994D-05
+ 0.53500000D+03 0.54000000D+03 0.20241389D-03 0.27115619D-05
+ 0.54000000D+03 0.54500000D+03 0.16073145D-03 0.22727488D-04
+ 0.54500000D+03 0.55000000D+03 0.20052592D-03 0.22728180D-04
+ 0.55000000D+03 0.55500000D+03 0.16661830D-03 0.27032964D-05
+ 0.55500000D+03 0.56000000D+03 0.15428173D-03 0.25196492D-05
+ 0.56000000D+03 0.56500000D+03 0.15401592D-03 0.24119409D-05
+ 0.56500000D+03 0.57000000D+03 0.13695350D-03 0.24241799D-05
+ 0.57000000D+03 0.57500000D+03 0.12704876D-03 0.26401004D-05
+ 0.57500000D+03 0.58000000D+03 0.11914971D-03 0.44761376D-05
+ 0.58000000D+03 0.58500000D+03 0.12609272D-03 0.45063036D-05
+ 0.58500000D+03 0.59000000D+03 0.11196529D-03 0.26020628D-05
+ 0.59000000D+03 0.59500000D+03 0.10769649D-03 0.18704492D-05
+ 0.59500000D+03 0.60000000D+03 0.97714011D-04 0.24823786D-05
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 -.16590648D+01 0.25440178D-02
+ 0.30000000D+01 0.60000000D+01 0.22720942D+01 0.13361405D-02
+ 0.60000000D+01 0.90000000D+01 0.18676388D+01 0.10597871D-02
+ 0.90000000D+01 0.12000000D+02 0.13955426D+01 0.15589982D-02
+ 0.12000000D+02 0.15000000D+02 0.10710862D+01 0.15333702D-02
+ 0.15000000D+02 0.18000000D+02 0.85237969D+00 0.72811369D-03
+ 0.18000000D+02 0.21000000D+02 0.69524534D+00 0.64795323D-03
+ 0.21000000D+02 0.24000000D+02 0.57873570D+00 0.65714975D-03
+ 0.24000000D+02 0.27000000D+02 0.49301740D+00 0.68833834D-03
+ 0.27000000D+02 0.30000000D+02 0.42165767D+00 0.63954986D-03
+ 0.30000000D+02 0.33000000D+02 0.36496550D+00 0.67734914D-03
+ 0.33000000D+02 0.36000000D+02 0.32150202D+00 0.74265569D-03
+ 0.36000000D+02 0.39000000D+02 0.28391061D+00 0.59869543D-03
+ 0.39000000D+02 0.42000000D+02 0.25218292D+00 0.48807868D-03
+ 0.42000000D+02 0.45000000D+02 0.22646489D+00 0.52779978D-03
+ 0.45000000D+02 0.48000000D+02 0.20228009D+00 0.50384191D-03
+ 0.48000000D+02 0.51000000D+02 0.18344477D+00 0.40424180D-03
+ 0.51000000D+02 0.54000000D+02 0.16640021D+00 0.39949420D-03
+ 0.54000000D+02 0.57000000D+02 0.15070547D+00 0.43490048D-03
+ 0.57000000D+02 0.60000000D+02 0.13828811D+00 0.47521484D-03
+ 0.60000000D+02 0.63000000D+02 0.12498418D+00 0.39366029D-03
+ 0.63000000D+02 0.66000000D+02 0.11502124D+00 0.35171331D-03
+ 0.66000000D+02 0.69000000D+02 0.10654486D+00 0.32733825D-03
+ 0.69000000D+02 0.72000000D+02 0.97290978D-01 0.32883741D-03
+ 0.72000000D+02 0.75000000D+02 0.89848203D-01 0.35396833D-03
+ 0.75000000D+02 0.78000000D+02 0.83182306D-01 0.38326028D-03
+ 0.78000000D+02 0.81000000D+02 0.76538434D-01 0.38322240D-03
+ 0.81000000D+02 0.84000000D+02 0.71080136D-01 0.31844491D-03
+ 0.84000000D+02 0.87000000D+02 0.66087698D-01 0.30410303D-03
+ 0.87000000D+02 0.90000000D+02 0.62235344D-01 0.46721359D-03
+ 0.90000000D+02 0.93000000D+02 0.56407690D-01 0.45876392D-03
+ 0.93000000D+02 0.96000000D+02 0.53365693D-01 0.26419720D-03
+ 0.96000000D+02 0.99000000D+02 0.49302111D-01 0.22834152D-03
+ 0.99000000D+02 0.10200000D+03 0.46231493D-01 0.24450991D-03
+ 0.10200000D+03 0.10500000D+03 0.43149791D-01 0.26443831D-03
+ 0.10500000D+03 0.10800000D+03 0.40694306D-01 0.20145827D-03
+ 0.10800000D+03 0.11100000D+03 0.37677717D-01 0.30498342D-03
+ 0.11100000D+03 0.11400000D+03 0.36267109D-01 0.34993105D-03
+ 0.11400000D+03 0.11700000D+03 0.33175394D-01 0.31446809D-03
+ 0.11700000D+03 0.12000000D+03 0.30599902D-01 0.28902939D-03
+ 0.12000000D+03 0.12300000D+03 0.29414640D-01 0.20257406D-03
+ 0.12300000D+03 0.12600000D+03 0.27863621D-01 0.22490582D-03
+ 0.12600000D+03 0.12900000D+03 0.25797559D-01 0.21698481D-03
+ 0.12900000D+03 0.13200000D+03 0.24613944D-01 0.20936301D-03
+ 0.13200000D+03 0.13500000D+03 0.23082851D-01 0.20835125D-03
+ 0.13500000D+03 0.13800000D+03 0.21773141D-01 0.15940395D-03
+ 0.13800000D+03 0.14100000D+03 0.20505986D-01 0.17840245D-03
+ 0.14100000D+03 0.14400000D+03 0.19501773D-01 0.21063079D-03
+ 0.14400000D+03 0.14700000D+03 0.18494566D-01 0.19277281D-03
+ 0.14700000D+03 0.15000000D+03 0.17217562D-01 0.19462063D-03
+ 0.15000000D+03 0.15300000D+03 0.16325238D-01 0.22012322D-03
+ 0.15300000D+03 0.15600000D+03 0.15839556D-01 0.17032109D-03
+ 0.15600000D+03 0.15900000D+03 0.14585849D-01 0.92014807D-04
+ 0.15900000D+03 0.16200000D+03 0.13930120D-01 0.10487710D-03
+ 0.16200000D+03 0.16500000D+03 0.13100868D-01 0.25631168D-03
+ 0.16500000D+03 0.16800000D+03 0.12749755D-01 0.25793800D-03
+ 0.16800000D+03 0.17100000D+03 0.12122143D-01 0.23974500D-03
+ 0.17100000D+03 0.17400000D+03 0.11018340D-01 0.23551426D-03
+ 0.17400000D+03 0.17700000D+03 0.10555419D-01 0.13979061D-03
+ 0.17700000D+03 0.18000000D+03 0.10577152D-01 0.15634436D-03
+ 0.18000000D+03 0.18300000D+03 0.94174964D-02 0.11549518D-03
+ 0.18300000D+03 0.18600000D+03 0.91950030D-02 0.10361265D-03
+ 0.18600000D+03 0.18900000D+03 0.87213327D-02 0.10389653D-03
+ 0.18900000D+03 0.19200000D+03 0.81663815D-02 0.16636154D-03
+ 0.19200000D+03 0.19500000D+03 0.80203935D-02 0.17213068D-03
+ 0.19500000D+03 0.19800000D+03 0.75475548D-02 0.95181596D-04
+ 0.19800000D+03 0.20100000D+03 0.71836933D-02 0.85734480D-04
+ 0.20100000D+03 0.20400000D+03 0.68110875D-02 0.97841599D-04
+ 0.20400000D+03 0.20700000D+03 0.65254970D-02 0.86541597D-04
+ 0.20700000D+03 0.21000000D+03 0.60437763D-02 0.10671788D-03
+ 0.21000000D+03 0.21300000D+03 0.59346318D-02 0.15254298D-03
+ 0.21300000D+03 0.21600000D+03 0.56794068D-02 0.12292456D-03
+ 0.21600000D+03 0.21900000D+03 0.52733187D-02 0.88271221D-04
+ 0.21900000D+03 0.22200000D+03 0.51285416D-02 0.95584125D-04
+ 0.22200000D+03 0.22500000D+03 0.48716354D-02 0.67341184D-04
+ 0.22500000D+03 0.22800000D+03 0.46196160D-02 0.84560949D-04
+ 0.22800000D+03 0.23100000D+03 0.44832637D-02 0.87617800D-04
+ 0.23100000D+03 0.23400000D+03 0.41621493D-02 0.63108230D-04
+ 0.23400000D+03 0.23700000D+03 0.40303775D-02 0.10612688D-03
+ 0.23700000D+03 0.24000000D+03 0.38473754D-02 0.11045840D-03
+ 0.24000000D+03 0.24300000D+03 0.36589386D-02 0.12752415D-03
+ 0.24300000D+03 0.24600000D+03 0.37596479D-02 0.14186338D-03
+ 0.24600000D+03 0.24900000D+03 0.32882125D-02 0.11161622D-03
+ 0.24900000D+03 0.25200000D+03 0.31625396D-02 0.10367521D-03
+ 0.25200000D+03 0.25500000D+03 0.30560097D-02 0.81472202D-04
+ 0.25500000D+03 0.25800000D+03 0.30006847D-02 0.67076528D-04
+ 0.25800000D+03 0.26100000D+03 0.28100786D-02 0.62424116D-04
+ 0.26100000D+03 0.26400000D+03 0.28977594D-02 0.11757776D-03
+ 0.26400000D+03 0.26700000D+03 0.24480416D-02 0.13293893D-03
+ 0.26700000D+03 0.27000000D+03 0.24748780D-02 0.84937212D-04
+ 0.27000000D+03 0.27300000D+03 0.23772699D-02 0.53076724D-04
+ 0.27300000D+03 0.27600000D+03 0.22425641D-02 0.45398734D-04
+ 0.27600000D+03 0.27900000D+03 0.21842438D-02 0.47578554D-04
+ 0.27900000D+03 0.28200000D+03 0.21797229D-02 0.89127724D-04
+ 0.28200000D+03 0.28500000D+03 0.19023769D-02 0.87442436D-04
+ 0.28500000D+03 0.28800000D+03 0.19499752D-02 0.37861275D-04
+ 0.28800000D+03 0.29100000D+03 0.18080486D-02 0.39133771D-04
+ 0.29100000D+03 0.29400000D+03 0.17195180D-02 0.61323431D-04
+ 0.29400000D+03 0.29700000D+03 0.17582385D-02 0.61896118D-04
+ 0.29700000D+03 0.30000000D+03 0.16207388D-02 0.48521576D-04
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 -.16587062D+01 0.25436681D-02
+ 0.30000000D+01 0.60000000D+01 0.22690335D+01 0.13344600D-02
+ 0.60000000D+01 0.90000000D+01 0.18609862D+01 0.10561714D-02
+ 0.90000000D+01 0.12000000D+02 0.13858276D+01 0.15458693D-02
+ 0.12000000D+02 0.15000000D+02 0.10587978D+01 0.15181627D-02
+ 0.15000000D+02 0.18000000D+02 0.83783981D+00 0.71624581D-03
+ 0.18000000D+02 0.21000000D+02 0.67877722D+00 0.63212355D-03
+ 0.21000000D+02 0.24000000D+02 0.56062237D+00 0.63681242D-03
+ 0.24000000D+02 0.27000000D+02 0.47335916D+00 0.66018004D-03
+ 0.27000000D+02 0.30000000D+02 0.40084778D+00 0.60899155D-03
+ 0.30000000D+02 0.33000000D+02 0.34320424D+00 0.63530651D-03
+ 0.33000000D+02 0.36000000D+02 0.29877846D+00 0.69090625D-03
+ 0.36000000D+02 0.39000000D+02 0.26049698D+00 0.54991349D-03
+ 0.39000000D+02 0.42000000D+02 0.22825188D+00 0.44228221D-03
+ 0.42000000D+02 0.45000000D+02 0.20202483D+00 0.46966989D-03
+ 0.45000000D+02 0.48000000D+02 0.17771079D+00 0.44407286D-03
+ 0.48000000D+02 0.51000000D+02 0.15860135D+00 0.34911160D-03
+ 0.51000000D+02 0.54000000D+02 0.14146743D+00 0.34000818D-03
+ 0.54000000D+02 0.57000000D+02 0.12590291D+00 0.36231026D-03
+ 0.57000000D+02 0.60000000D+02 0.11345085D+00 0.39022544D-03
+ 0.60000000D+02 0.63000000D+02 0.10063601D+00 0.31785504D-03
+ 0.63000000D+02 0.66000000D+02 0.90849381D-01 0.27741507D-03
+ 0.66000000D+02 0.69000000D+02 0.82502827D-01 0.25427928D-03
+ 0.69000000D+02 0.72000000D+02 0.73819092D-01 0.24859307D-03
+ 0.72000000D+02 0.75000000D+02 0.66773324D-01 0.26349213D-03
+ 0.75000000D+02 0.78000000D+02 0.60523333D-01 0.27794249D-03
+ 0.78000000D+02 0.81000000D+02 0.54503675D-01 0.27374975D-03
+ 0.81000000D+02 0.84000000D+02 0.49521824D-01 0.22183096D-03
+ 0.84000000D+02 0.87000000D+02 0.45032677D-01 0.20747856D-03
+ 0.87000000D+02 0.90000000D+02 0.41456127D-01 0.30903947D-03
+ 0.90000000D+02 0.93000000D+02 0.36725741D-01 0.30101206D-03
+ 0.93000000D+02 0.96000000D+02 0.33960011D-01 0.16815342D-03
+ 0.96000000D+02 0.99000000D+02 0.30655597D-01 0.14252341D-03
+ 0.99000000D+02 0.10200000D+03 0.28083873D-01 0.14781524D-03
+ 0.10200000D+03 0.10500000D+03 0.25604460D-01 0.15727763D-03
+ 0.10500000D+03 0.10800000D+03 0.23582579D-01 0.11718522D-03
+ 0.10800000D+03 0.11100000D+03 0.21321073D-01 0.17116969D-03
+ 0.11100000D+03 0.11400000D+03 0.20037174D-01 0.19396456D-03
+ 0.11400000D+03 0.11700000D+03 0.17891567D-01 0.16927859D-03
+ 0.11700000D+03 0.12000000D+03 0.16116936D-01 0.15314342D-03
+ 0.12000000D+03 0.12300000D+03 0.15127820D-01 0.10419509D-03
+ 0.12300000D+03 0.12600000D+03 0.13990234D-01 0.11263533D-03
+ 0.12600000D+03 0.12900000D+03 0.12644887D-01 0.10670241D-03
+ 0.12900000D+03 0.13200000D+03 0.11780168D-01 0.99884015D-04
+ 0.13200000D+03 0.13500000D+03 0.10784419D-01 0.97680902D-04
+ 0.13500000D+03 0.13800000D+03 0.99322209D-02 0.72904987D-04
+ 0.13800000D+03 0.14100000D+03 0.91347975D-02 0.79112379D-04
+ 0.14100000D+03 0.14400000D+03 0.84832299D-02 0.91589963D-04
+ 0.14400000D+03 0.14700000D+03 0.78544671D-02 0.82083266D-04
+ 0.14700000D+03 0.15000000D+03 0.71407906D-02 0.80494399D-04
+ 0.15000000D+03 0.15300000D+03 0.66143657D-02 0.89137142D-04
+ 0.15300000D+03 0.15600000D+03 0.62675049D-02 0.67961344D-04
+ 0.15600000D+03 0.15900000D+03 0.56377549D-02 0.35540010D-04
+ 0.15900000D+03 0.16200000D+03 0.52604525D-02 0.39526973D-04
+ 0.16200000D+03 0.16500000D+03 0.48342098D-02 0.93685380D-04
+ 0.16500000D+03 0.16800000D+03 0.45977230D-02 0.93819986D-04
+ 0.16800000D+03 0.17100000D+03 0.42698542D-02 0.83755509D-04
+ 0.17100000D+03 0.17400000D+03 0.37932069D-02 0.81825685D-04
+ 0.17400000D+03 0.17700000D+03 0.35534596D-02 0.46803951D-04
+ 0.17700000D+03 0.18000000D+03 0.34808055D-02 0.51565687D-04
+ 0.18000000D+03 0.18300000D+03 0.30296680D-02 0.37351236D-04
+ 0.18300000D+03 0.18600000D+03 0.28936149D-02 0.32488413D-04
+ 0.18600000D+03 0.18900000D+03 0.26839216D-02 0.32088130D-04
+ 0.18900000D+03 0.19200000D+03 0.24584695D-02 0.49673759D-04
+ 0.19200000D+03 0.19500000D+03 0.23628058D-02 0.51032667D-04
+ 0.19500000D+03 0.19800000D+03 0.21750025D-02 0.27487605D-04
+ 0.19800000D+03 0.20100000D+03 0.20254659D-02 0.24159836D-04
+ 0.20100000D+03 0.20400000D+03 0.18792689D-02 0.26948273D-04
+ 0.20400000D+03 0.20700000D+03 0.17623522D-02 0.23499521D-04
+ 0.20700000D+03 0.21000000D+03 0.15981595D-02 0.28018550D-04
+ 0.21000000D+03 0.21300000D+03 0.15368159D-02 0.39419590D-04
+ 0.21300000D+03 0.21600000D+03 0.14397343D-02 0.31434746D-04
+ 0.21600000D+03 0.21900000D+03 0.13094103D-02 0.21774745D-04
+ 0.21900000D+03 0.22200000D+03 0.12474731D-02 0.23345063D-04
+ 0.22200000D+03 0.22500000D+03 0.11609944D-02 0.16082713D-04
+ 0.22500000D+03 0.22800000D+03 0.10786977D-02 0.19646795D-04
+ 0.22800000D+03 0.23100000D+03 0.10259883D-02 0.20117755D-04
+ 0.23100000D+03 0.23400000D+03 0.93346527D-03 0.14177862D-04
+ 0.23400000D+03 0.23700000D+03 0.88622629D-03 0.23164184D-04
+ 0.23700000D+03 0.24000000D+03 0.82939334D-03 0.23942571D-04
+ 0.24000000D+03 0.24300000D+03 0.77363588D-03 0.26767555D-04
+ 0.24300000D+03 0.24600000D+03 0.77918149D-03 0.29506297D-04
+ 0.24600000D+03 0.24900000D+03 0.66809851D-03 0.22682960D-04
+ 0.24900000D+03 0.25200000D+03 0.63073272D-03 0.20702008D-04
+ 0.25200000D+03 0.25500000D+03 0.59800450D-03 0.15991752D-04
+ 0.25500000D+03 0.25800000D+03 0.57610218D-03 0.12866009D-04
+ 0.25800000D+03 0.26100000D+03 0.52941196D-03 0.11780761D-04
+ 0.26100000D+03 0.26400000D+03 0.53546864D-03 0.21576270D-04
+ 0.26400000D+03 0.26700000D+03 0.44392650D-03 0.24209604D-04
+ 0.26700000D+03 0.27000000D+03 0.44092097D-03 0.15198084D-04
+ 0.27000000D+03 0.27300000D+03 0.41579082D-03 0.93133093D-05
+ 0.27300000D+03 0.27600000D+03 0.38519496D-03 0.77929360D-05
+ 0.27600000D+03 0.27900000D+03 0.36846017D-03 0.80250027D-05
+ 0.27900000D+03 0.28200000D+03 0.36107094D-03 0.14674592D-04
+ 0.28200000D+03 0.28500000D+03 0.30957765D-03 0.14330401D-04
+ 0.28500000D+03 0.28800000D+03 0.31184618D-03 0.60634154D-05
+ 0.28800000D+03 0.29100000D+03 0.28408669D-03 0.61376708D-05
+ 0.29100000D+03 0.29400000D+03 0.26569791D-03 0.94291338D-05
+ 0.29400000D+03 0.29700000D+03 0.26700389D-03 0.94341423D-05
+ 0.29700000D+03 0.30000000D+03 0.24187662D-03 0.72309863D-05
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.16221797D+01 0.24338681D-02
+ 0.30000000D+01 0.60000000D+01 0.70416395D+01 0.36572513D-03
+ 0.60000000D+01 0.90000000D+01 0.25277236D+01 0.14647373D-03
+ 0.90000000D+01 0.12000000D+02 0.12767822D+01 0.84072463D-04
+ 0.12000000D+02 0.15000000D+02 0.75716876D+00 0.54952265D-04
+ 0.15000000D+02 0.18000000D+02 0.49381812D+00 0.38986870D-04
+ 0.18000000D+02 0.21000000D+02 0.34309615D+00 0.29036570D-04
+ 0.21000000D+02 0.24000000D+02 0.24942111D+00 0.22350124D-04
+ 0.24000000D+02 0.27000000D+02 0.18762762D+00 0.17831750D-04
+ 0.27000000D+02 0.30000000D+02 0.14497566D+00 0.14304508D-04
+ 0.30000000D+02 0.33000000D+02 0.11443800D+00 0.12092307D-04
+ 0.33000000D+02 0.36000000D+02 0.91966740D-01 0.10272607D-04
+ 0.36000000D+02 0.39000000D+02 0.75014697D-01 0.87473271D-05
+ 0.39000000D+02 0.42000000D+02 0.61964070D-01 0.74751028D-05
+ 0.42000000D+02 0.45000000D+02 0.51750284D-01 0.65695642D-05
+ 0.45000000D+02 0.48000000D+02 0.43622556D-01 0.56626071D-05
+ 0.48000000D+02 0.51000000D+02 0.37088446D-01 0.49661311D-05
+ 0.51000000D+02 0.54000000D+02 0.31783247D-01 0.45710494D-05
+ 0.54000000D+02 0.57000000D+02 0.27402293D-01 0.40442376D-05
+ 0.57000000D+02 0.60000000D+02 0.23779050D-01 0.35433156D-05
+ 0.60000000D+02 0.63000000D+02 0.20750051D-01 0.32271093D-05
+ 0.63000000D+02 0.66000000D+02 0.18201112D-01 0.28828847D-05
+ 0.66000000D+02 0.69000000D+02 0.16031296D-01 0.25869139D-05
+ 0.69000000D+02 0.72000000D+02 0.14186273D-01 0.23575098D-05
+ 0.72000000D+02 0.75000000D+02 0.12598919D-01 0.22161026D-05
+ 0.75000000D+02 0.78000000D+02 0.11233605D-01 0.19829942D-05
+ 0.78000000D+02 0.81000000D+02 0.10050948D-01 0.18316315D-05
+ 0.81000000D+02 0.84000000D+02 0.90228892D-02 0.16762850D-05
+ 0.84000000D+02 0.87000000D+02 0.81194881D-02 0.15371137D-05
+ 0.87000000D+02 0.90000000D+02 0.73264953D-02 0.14557347D-05
+ 0.90000000D+02 0.93000000D+02 0.66315506D-02 0.12942649D-05
+ 0.93000000D+02 0.96000000D+02 0.60176523D-02 0.12327359D-05
+ 0.96000000D+02 0.99000000D+02 0.54720131D-02 0.11462172D-05
+ 0.99000000D+02 0.10200000D+03 0.49863950D-02 0.10776351D-05
+ 0.10200000D+03 0.10500000D+03 0.45552864D-02 0.10099644D-05
+ 0.10500000D+03 0.10800000D+03 0.41704723D-02 0.94999049D-06
+ 0.10800000D+03 0.11100000D+03 0.38210128D-02 0.87699265D-06
+ 0.11100000D+03 0.11400000D+03 0.35121918D-02 0.83269486D-06
+ 0.11400000D+03 0.11700000D+03 0.32287376D-02 0.76205722D-06
+ 0.11700000D+03 0.12000000D+03 0.29777613D-02 0.72485726D-06
+ 0.12000000D+03 0.12300000D+03 0.27489377D-02 0.67615843D-06
+ 0.12300000D+03 0.12600000D+03 0.25409554D-02 0.62620303D-06
+ 0.12600000D+03 0.12900000D+03 0.23515785D-02 0.60219277D-06
+ 0.12900000D+03 0.13200000D+03 0.21817253D-02 0.57040344D-06
+ 0.13200000D+03 0.13500000D+03 0.20246531D-02 0.53087520D-06
+ 0.13500000D+03 0.13800000D+03 0.18807435D-02 0.49341721D-06
+ 0.13800000D+03 0.14100000D+03 0.17506829D-02 0.46469236D-06
+ 0.14100000D+03 0.14400000D+03 0.16308538D-02 0.44657312D-06
+ 0.14400000D+03 0.14700000D+03 0.15224740D-02 0.42899345D-06
+ 0.14700000D+03 0.15000000D+03 0.14210879D-02 0.40188999D-06
+ 0.15000000D+03 0.15300000D+03 0.13280792D-02 0.38659906D-06
+ 0.15300000D+03 0.15600000D+03 0.12426328D-02 0.36794912D-06
+ 0.15600000D+03 0.15900000D+03 0.11639114D-02 0.34855962D-06
+ 0.15900000D+03 0.16200000D+03 0.10920573D-02 0.33091159D-06
+ 0.16200000D+03 0.16500000D+03 0.10238633D-02 0.31068138D-06
+ 0.16500000D+03 0.16800000D+03 0.96212513D-03 0.29999504D-06
+ 0.16800000D+03 0.17100000D+03 0.90479071D-03 0.28969741D-06
+ 0.17100000D+03 0.17400000D+03 0.85087197D-03 0.26923090D-06
+ 0.17400000D+03 0.17700000D+03 0.80095167D-03 0.25802751D-06
+ 0.17700000D+03 0.18000000D+03 0.75490347D-03 0.25280950D-06
+ 0.18000000D+03 0.18300000D+03 0.71183216D-03 0.24272600D-06
+ 0.18300000D+03 0.18600000D+03 0.67170175D-03 0.23752630D-06
+ 0.18600000D+03 0.18900000D+03 0.63456270D-03 0.22189307D-06
+ 0.18900000D+03 0.19200000D+03 0.59948434D-03 0.20854067D-06
+ 0.19200000D+03 0.19500000D+03 0.56689443D-03 0.20041029D-06
+ 0.19500000D+03 0.19800000D+03 0.53636095D-03 0.19096457D-06
+ 0.19800000D+03 0.20100000D+03 0.50825366D-03 0.18293841D-06
+ 0.20100000D+03 0.20400000D+03 0.48144876D-03 0.17552654D-06
+ 0.20400000D+03 0.20700000D+03 0.45620219D-03 0.16826532D-06
+ 0.20700000D+03 0.21000000D+03 0.43337176D-03 0.16012434D-06
+ 0.21000000D+03 0.21300000D+03 0.41106666D-03 0.15681190D-06
+ 0.21300000D+03 0.21600000D+03 0.39009272D-03 0.15059908D-06
+ 0.21600000D+03 0.21900000D+03 0.37091523D-03 0.14456206D-06
+ 0.21900000D+03 0.22200000D+03 0.35250413D-03 0.13945815D-06
+ 0.22200000D+03 0.22500000D+03 0.33532450D-03 0.13406613D-06
+ 0.22500000D+03 0.22800000D+03 0.31896856D-03 0.12609008D-06
+ 0.22800000D+03 0.23100000D+03 0.30390444D-03 0.12319203D-06
+ 0.23100000D+03 0.23400000D+03 0.28948750D-03 0.11908677D-06
+ 0.23400000D+03 0.23700000D+03 0.27569215D-03 0.11236293D-06
+ 0.23700000D+03 0.24000000D+03 0.26313544D-03 0.10916899D-06
+ 0.24000000D+03 0.24300000D+03 0.25069447D-03 0.10267262D-06
+ 0.24300000D+03 0.24600000D+03 0.23937556D-03 0.10196519D-06
+ 0.24600000D+03 0.24900000D+03 0.22863967D-03 0.99526324D-07
+ 0.24900000D+03 0.25200000D+03 0.21834603D-03 0.96693954D-07
+ 0.25200000D+03 0.25500000D+03 0.20875679D-03 0.91040378D-07
+ 0.25500000D+03 0.25800000D+03 0.19961123D-03 0.89775950D-07
+ 0.25800000D+03 0.26100000D+03 0.19065218D-03 0.85249850D-07
+ 0.26100000D+03 0.26400000D+03 0.18248518D-03 0.82631237D-07
+ 0.26400000D+03 0.26700000D+03 0.17477656D-03 0.83341790D-07
+ 0.26700000D+03 0.27000000D+03 0.16721322D-03 0.77729953D-07
+ 0.27000000D+03 0.27300000D+03 0.16013821D-03 0.75576836D-07
+ 0.27300000D+03 0.27600000D+03 0.15333384D-03 0.71631172D-07
+ 0.27600000D+03 0.27900000D+03 0.14714479D-03 0.70326901D-07
+ 0.27900000D+03 0.28200000D+03 0.14100930D-03 0.67261129D-07
+ 0.28200000D+03 0.28500000D+03 0.13522048D-03 0.66823417D-07
+ 0.28500000D+03 0.28800000D+03 0.12976707D-03 0.63973480D-07
+ 0.28800000D+03 0.29100000D+03 0.12445633D-03 0.60602934D-07
+ 0.29100000D+03 0.29400000D+03 0.11958529D-03 0.59378372D-07
+ 0.29400000D+03 0.29700000D+03 0.11475593D-03 0.58831865D-07
+ 0.29700000D+03 0.30000000D+03 0.11031544D-03 0.56883006D-07
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-HH.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-HH.top
new file mode 100644
index 0000000000000000000000000000000000000000..3dfdf798bcb113229e4e1db6ab4dedefbd395e02
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-HH.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11331763D-05 0.49306930D-06
+ -.46000000D+01 -.45000000D+01 0.14102696D-03 0.53906931D-05
+ -.45000000D+01 -.44000000D+01 0.11764102D-02 0.18636216D-04
+ -.44000000D+01 -.43000000D+01 0.46264007D-02 0.67846583D-04
+ -.43000000D+01 -.42000000D+01 0.13392240D-01 0.13549116D-03
+ -.42000000D+01 -.41000000D+01 0.29907013D-01 0.44622640D-03
+ -.41000000D+01 -.40000000D+01 0.60419231D-01 0.66211433D-03
+ -.40000000D+01 -.39000000D+01 0.11675804D+00 0.10711732D-01
+ -.39000000D+01 -.38000000D+01 0.17357524D+00 0.19738969D-02
+ -.38000000D+01 -.37000000D+01 0.25918079D+00 0.20200693D-02
+ -.37000000D+01 -.36000000D+01 0.37202832D+00 0.32192720D-02
+ -.36000000D+01 -.35000000D+01 0.51209409D+00 0.37823703D-02
+ -.35000000D+01 -.34000000D+01 0.67570208D+00 0.43811553D-02
+ -.34000000D+01 -.33000000D+01 0.87518267D+00 0.66386094D-02
+ -.33000000D+01 -.32000000D+01 0.10906795D+01 0.71011058D-02
+ -.32000000D+01 -.31000000D+01 0.13280878D+01 0.73988372D-02
+ -.31000000D+01 -.30000000D+01 0.16090165D+01 0.81704331D-02
+ -.30000000D+01 -.29000000D+01 0.19056959D+01 0.10252856D-01
+ -.29000000D+01 -.28000000D+01 0.22412670D+01 0.10704862D-01
+ -.28000000D+01 -.27000000D+01 0.25496124D+01 0.11048829D-01
+ -.27000000D+01 -.26000000D+01 0.29195128D+01 0.18364140D-01
+ -.26000000D+01 -.25000000D+01 0.32871401D+01 0.13841086D-01
+ -.25000000D+01 -.24000000D+01 0.36833882D+01 0.13195227D-01
+ -.24000000D+01 -.23000000D+01 0.40873556D+01 0.16518014D-01
+ -.23000000D+01 -.22000000D+01 0.45297708D+01 0.20078583D-01
+ -.22000000D+01 -.21000000D+01 0.49363191D+01 0.16952091D-01
+ -.21000000D+01 -.20000000D+01 0.53640588D+01 0.16931865D-01
+ -.20000000D+01 -.19000000D+01 0.58323812D+01 0.17658851D-01
+ -.19000000D+01 -.18000000D+01 0.62447595D+01 0.17411936D-01
+ -.18000000D+01 -.17000000D+01 0.66127469D+01 0.20622683D-01
+ -.17000000D+01 -.16000000D+01 0.70397346D+01 0.20705784D-01
+ -.16000000D+01 -.15000000D+01 0.74273801D+01 0.19351574D-01
+ -.15000000D+01 -.14000000D+01 0.78009111D+01 0.21010401D-01
+ -.14000000D+01 -.13000000D+01 0.82093489D+01 0.19712638D-01
+ -.13000000D+01 -.12000000D+01 0.85783717D+01 0.26460868D-01
+ -.12000000D+01 -.11000000D+01 0.88523624D+01 0.22567952D-01
+ -.11000000D+01 -.10000000D+01 0.91401510D+01 0.29654014D-01
+ -.10000000D+01 -.90000000D+00 0.94390845D+01 0.22963022D-01
+ -.90000000D+00 -.80000000D+00 0.96584128D+01 0.23518673D-01
+ -.80000000D+00 -.70000000D+00 0.99227141D+01 0.24616519D-01
+ -.70000000D+00 -.60000000D+00 0.10089602D+02 0.22640515D-01
+ -.60000000D+00 -.50000000D+00 0.10263934D+02 0.22969697D-01
+ -.50000000D+00 -.40000000D+00 0.10439470D+02 0.25048210D-01
+ -.40000000D+00 -.30000000D+00 0.10540422D+02 0.23637144D-01
+ -.30000000D+00 -.20000000D+00 0.10622973D+02 0.23912450D-01
+ -.20000000D+00 -.10000000D+00 0.10698332D+02 0.22948014D-01
+ -.10000000D+00 0.18041124D-15 0.10753507D+02 0.25362214D-01
+ 0.70776718D-15 0.10000000D+00 0.10788198D+02 0.48521493D-01
+ 0.10000000D+00 0.20000000D+00 0.10718951D+02 0.43112200D-01
+ 0.20000000D+00 0.30000000D+00 0.10587627D+02 0.52298125D-01
+ 0.30000000D+00 0.40000000D+00 0.10558136D+02 0.26167765D-01
+ 0.40000000D+00 0.50000000D+00 0.10394284D+02 0.27776166D-01
+ 0.50000000D+00 0.60000000D+00 0.10281563D+02 0.24280698D-01
+ 0.60000000D+00 0.70000000D+00 0.10110272D+02 0.23773347D-01
+ 0.70000000D+00 0.80000000D+00 0.98942009D+01 0.23030298D-01
+ 0.80000000D+00 0.90000000D+00 0.96879176D+01 0.22803563D-01
+ 0.90000000D+00 0.10000000D+01 0.94151899D+01 0.29832331D-01
+ 0.10000000D+01 0.11000000D+01 0.91773294D+01 0.20965083D-01
+ 0.11000000D+01 0.12000000D+01 0.88810572D+01 0.23479190D-01
+ 0.12000000D+01 0.13000000D+01 0.85441752D+01 0.21575159D-01
+ 0.13000000D+01 0.14000000D+01 0.81508145D+01 0.21255788D-01
+ 0.14000000D+01 0.15000000D+01 0.78349797D+01 0.21640262D-01
+ 0.15000000D+01 0.16000000D+01 0.74418189D+01 0.20852673D-01
+ 0.16000000D+01 0.17000000D+01 0.70199316D+01 0.22161452D-01
+ 0.17000000D+01 0.18000000D+01 0.66362940D+01 0.19880538D-01
+ 0.18000000D+01 0.19000000D+01 0.62036709D+01 0.18753803D-01
+ 0.19000000D+01 0.20000000D+01 0.58007867D+01 0.18907473D-01
+ 0.20000000D+01 0.21000000D+01 0.53432994D+01 0.16253012D-01
+ 0.21000000D+01 0.22000000D+01 0.49460248D+01 0.17013763D-01
+ 0.22000000D+01 0.23000000D+01 0.45064979D+01 0.16391545D-01
+ 0.23000000D+01 0.24000000D+01 0.41391336D+01 0.15086791D-01
+ 0.24000000D+01 0.25000000D+01 0.36844456D+01 0.13906895D-01
+ 0.25000000D+01 0.26000000D+01 0.32853021D+01 0.16314652D-01
+ 0.26000000D+01 0.27000000D+01 0.29068778D+01 0.11596757D-01
+ 0.27000000D+01 0.28000000D+01 0.25527623D+01 0.10745187D-01
+ 0.28000000D+01 0.29000000D+01 0.22352166D+01 0.97994542D-02
+ 0.29000000D+01 0.30000000D+01 0.18930944D+01 0.10849318D-01
+ 0.30000000D+01 0.31000000D+01 0.16064710D+01 0.88968041D-02
+ 0.31000000D+01 0.32000000D+01 0.13313760D+01 0.76854741D-02
+ 0.32000000D+01 0.33000000D+01 0.10943794D+01 0.84139884D-02
+ 0.33000000D+01 0.34000000D+01 0.87567162D+00 0.58977046D-02
+ 0.34000000D+01 0.35000000D+01 0.66942681D+00 0.49680547D-02
+ 0.35000000D+01 0.36000000D+01 0.50933646D+00 0.60963186D-02
+ 0.36000000D+01 0.37000000D+01 0.36933303D+00 0.33273048D-02
+ 0.37000000D+01 0.38000000D+01 0.25554798D+00 0.65175735D-02
+ 0.38000000D+01 0.39000000D+01 0.17281889D+00 0.14561991D-02
+ 0.39000000D+01 0.40000000D+01 0.10737344D+00 0.16809402D-02
+ 0.40000000D+01 0.41000000D+01 0.59645478D-01 0.57930208D-03
+ 0.41000000D+01 0.42000000D+01 0.30470634D-01 0.28525327D-03
+ 0.42000000D+01 0.43000000D+01 0.13004735D-01 0.15933619D-03
+ 0.43000000D+01 0.44000000D+01 0.46016259D-02 0.55200481D-04
+ 0.44000000D+01 0.45000000D+01 0.11762055D-02 0.19376280D-04
+ 0.45000000D+01 0.46000000D+01 0.14122002D-03 0.54363351D-05
+ 0.46000000D+01 0.47000000D+01 0.11247236D-05 0.49411447D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11233388D-05 0.49306830D-06
+ -.46000000D+01 -.45000000D+01 0.13627045D-03 0.53899874D-05
+ -.45000000D+01 -.44000000D+01 0.11117547D-02 0.18623893D-04
+ -.44000000D+01 -.43000000D+01 0.42839932D-02 0.67741262D-04
+ -.43000000D+01 -.42000000D+01 0.12222393D-01 0.13524016D-03
+ -.42000000D+01 -.41000000D+01 0.26791164D-01 0.44538112D-03
+ -.41000000D+01 -.40000000D+01 0.53446325D-01 0.66063615D-03
+ -.40000000D+01 -.39000000D+01 0.10311914D+00 0.10709643D-01
+ -.39000000D+01 -.38000000D+01 0.14948742D+00 0.19705445D-02
+ -.38000000D+01 -.37000000D+01 0.21974118D+00 0.20116444D-02
+ -.37000000D+01 -.36000000D+01 0.31157542D+00 0.32102171D-02
+ -.36000000D+01 -.35000000D+01 0.42481814D+00 0.37419578D-02
+ -.35000000D+01 -.34000000D+01 0.55345318D+00 0.43528597D-02
+ -.34000000D+01 -.33000000D+01 0.71190161D+00 0.66226317D-02
+ -.33000000D+01 -.32000000D+01 0.87801046D+00 0.70788450D-02
+ -.32000000D+01 -.31000000D+01 0.10580647D+01 0.73742916D-02
+ -.31000000D+01 -.30000000D+01 0.12742046D+01 0.81222885D-02
+ -.30000000D+01 -.29000000D+01 0.14985922D+01 0.10194262D-01
+ -.29000000D+01 -.28000000D+01 0.17542299D+01 0.10529100D-01
+ -.28000000D+01 -.27000000D+01 0.19745023D+01 0.10882936D-01
+ -.27000000D+01 -.26000000D+01 0.22512577D+01 0.18336240D-01
+ -.26000000D+01 -.25000000D+01 0.25183300D+01 0.13756166D-01
+ -.25000000D+01 -.24000000D+01 0.28098151D+01 0.13065177D-01
+ -.24000000D+01 -.23000000D+01 0.31023655D+01 0.16435284D-01
+ -.23000000D+01 -.22000000D+01 0.34324535D+01 0.20010599D-01
+ -.22000000D+01 -.21000000D+01 0.37192571D+01 0.16895654D-01
+ -.21000000D+01 -.20000000D+01 0.40291987D+01 0.16760792D-01
+ -.20000000D+01 -.19000000D+01 0.43688579D+01 0.17503290D-01
+ -.19000000D+01 -.18000000D+01 0.46642029D+01 0.17286567D-01
+ -.18000000D+01 -.17000000D+01 0.49074452D+01 0.20452377D-01
+ -.17000000D+01 -.16000000D+01 0.52171175D+01 0.20520773D-01
+ -.16000000D+01 -.15000000D+01 0.54839159D+01 0.19024013D-01
+ -.15000000D+01 -.14000000D+01 0.57449469D+01 0.20768703D-01
+ -.14000000D+01 -.13000000D+01 0.60433213D+01 0.19607331D-01
+ -.13000000D+01 -.12000000D+01 0.63052827D+01 0.26392942D-01
+ -.12000000D+01 -.11000000D+01 0.64730023D+01 0.22348106D-01
+ -.11000000D+01 -.10000000D+01 0.66761486D+01 0.29439614D-01
+ -.10000000D+01 -.90000000D+00 0.68852876D+01 0.22820239D-01
+ -.90000000D+00 -.80000000D+00 0.70241793D+01 0.23362039D-01
+ -.80000000D+00 -.70000000D+00 0.72099241D+01 0.24411971D-01
+ -.70000000D+00 -.60000000D+00 0.73168883D+01 0.22126507D-01
+ -.60000000D+00 -.50000000D+00 0.74388691D+01 0.22660234D-01
+ -.50000000D+00 -.40000000D+00 0.75630805D+01 0.24911991D-01
+ -.40000000D+00 -.30000000D+00 0.76330774D+01 0.23435584D-01
+ -.30000000D+00 -.20000000D+00 0.76824003D+01 0.23716686D-01
+ -.20000000D+00 -.10000000D+00 0.77369436D+01 0.22753623D-01
+ -.10000000D+00 0.18041124D-15 0.77821520D+01 0.24874684D-01
+ 0.70776718D-15 0.10000000D+00 0.78206331D+01 0.48295607D-01
+ 0.10000000D+00 0.20000000D+00 0.77284973D+01 0.24558144D-01
+ 0.20000000D+00 0.30000000D+00 0.76771891D+01 0.38012796D-01
+ 0.30000000D+00 0.40000000D+00 0.76458115D+01 0.26029547D-01
+ 0.40000000D+00 0.50000000D+00 0.75222944D+01 0.27575534D-01
+ 0.50000000D+00 0.60000000D+00 0.74527032D+01 0.24082159D-01
+ 0.60000000D+00 0.70000000D+00 0.73380681D+01 0.23625859D-01
+ 0.70000000D+00 0.80000000D+00 0.71836446D+01 0.22858226D-01
+ 0.80000000D+00 0.90000000D+00 0.70538809D+01 0.22704132D-01
+ 0.90000000D+00 0.10000000D+01 0.68602945D+01 0.29710260D-01
+ 0.10000000D+01 0.11000000D+01 0.67086121D+01 0.20831669D-01
+ 0.11000000D+01 0.12000000D+01 0.65035369D+01 0.23282797D-01
+ 0.12000000D+01 0.13000000D+01 0.62727469D+01 0.21387732D-01
+ 0.13000000D+01 0.14000000D+01 0.59819886D+01 0.21028174D-01
+ 0.14000000D+01 0.15000000D+01 0.57798661D+01 0.21499023D-01
+ 0.15000000D+01 0.16000000D+01 0.55007764D+01 0.20751360D-01
+ 0.16000000D+01 0.17000000D+01 0.51943829D+01 0.22040898D-01
+ 0.17000000D+01 0.18000000D+01 0.49351722D+01 0.19475095D-01
+ 0.18000000D+01 0.19000000D+01 0.46186911D+01 0.18356744D-01
+ 0.19000000D+01 0.20000000D+01 0.43401821D+01 0.18814642D-01
+ 0.20000000D+01 0.21000000D+01 0.40058720D+01 0.16162656D-01
+ 0.21000000D+01 0.22000000D+01 0.37294482D+01 0.16896859D-01
+ 0.22000000D+01 0.23000000D+01 0.34081674D+01 0.16300426D-01
+ 0.23000000D+01 0.24000000D+01 0.31545978D+01 0.15038354D-01
+ 0.24000000D+01 0.25000000D+01 0.28103609D+01 0.13851723D-01
+ 0.25000000D+01 0.26000000D+01 0.25174024D+01 0.16274386D-01
+ 0.26000000D+01 0.27000000D+01 0.22381265D+01 0.11538221D-01
+ 0.27000000D+01 0.28000000D+01 0.19773504D+01 0.10646157D-01
+ 0.28000000D+01 0.29000000D+01 0.17492005D+01 0.97221309D-02
+ 0.29000000D+01 0.30000000D+01 0.14850284D+01 0.10816065D-01
+ 0.30000000D+01 0.31000000D+01 0.12720406D+01 0.88601172D-02
+ 0.31000000D+01 0.32000000D+01 0.10617900D+01 0.76561957D-02
+ 0.32000000D+01 0.33000000D+01 0.88155057D+00 0.83914384D-02
+ 0.33000000D+01 0.34000000D+01 0.71170681D+00 0.57599849D-02
+ 0.34000000D+01 0.35000000D+01 0.54745055D+00 0.47799237D-02
+ 0.35000000D+01 0.36000000D+01 0.42218732D+00 0.60610826D-02
+ 0.36000000D+01 0.37000000D+01 0.30899195D+00 0.33197094D-02
+ 0.37000000D+01 0.38000000D+01 0.21623220D+00 0.65138805D-02
+ 0.38000000D+01 0.39000000D+01 0.14866784D+00 0.14525202D-02
+ 0.39000000D+01 0.40000000D+01 0.93776403D-01 0.16796689D-02
+ 0.40000000D+01 0.41000000D+01 0.52692508D-01 0.57719868D-03
+ 0.41000000D+01 0.42000000D+01 0.27356509D-01 0.28469288D-03
+ 0.42000000D+01 0.43000000D+01 0.11836931D-01 0.15911219D-03
+ 0.43000000D+01 0.44000000D+01 0.42618705D-02 0.55078508D-04
+ 0.44000000D+01 0.45000000D+01 0.11108727D-02 0.19280173D-04
+ 0.45000000D+01 0.46000000D+01 0.13646256D-03 0.54356545D-05
+ 0.46000000D+01 0.47000000D+01 0.11149246D-05 0.49411336D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11280840D-05 0.49306878D-06
+ -.46000000D+01 -.45000000D+01 0.13846626D-03 0.53903170D-05
+ -.45000000D+01 -.44000000D+01 0.11405791D-02 0.18629551D-04
+ -.44000000D+01 -.43000000D+01 0.44319389D-02 0.67789087D-04
+ -.43000000D+01 -.42000000D+01 0.12714753D-01 0.13535383D-03
+ -.42000000D+01 -.41000000D+01 0.28071241D-01 0.44573062D-03
+ -.41000000D+01 -.40000000D+01 0.56246669D-01 0.66125690D-03
+ -.40000000D+01 -.39000000D+01 0.10848135D+00 0.10710622D-01
+ -.39000000D+01 -.38000000D+01 0.15877428D+00 0.19719113D-02
+ -.38000000D+01 -.37000000D+01 0.23462474D+00 0.20149947D-02
+ -.37000000D+01 -.36000000D+01 0.33397038D+00 0.32136147D-02
+ -.36000000D+01 -.35000000D+01 0.45658625D+00 0.37521439D-02
+ -.35000000D+01 -.34000000D+01 0.59710398D+00 0.43599135D-02
+ -.34000000D+01 -.33000000D+01 0.76929736D+00 0.66285428D-02
+ -.33000000D+01 -.32000000D+01 0.95158495D+00 0.70869819D-02
+ -.32000000D+01 -.31000000D+01 0.11500693D+01 0.73825675D-02
+ -.31000000D+01 -.30000000D+01 0.13868185D+01 0.81376743D-02
+ -.30000000D+01 -.29000000D+01 0.16337575D+01 0.10212674D-01
+ -.29000000D+01 -.28000000D+01 0.19138228D+01 0.10594505D-01
+ -.28000000D+01 -.27000000D+01 0.21610809D+01 0.10945277D-01
+ -.27000000D+01 -.26000000D+01 0.24656978D+01 0.18345327D-01
+ -.26000000D+01 -.25000000D+01 0.27627137D+01 0.13780915D-01
+ -.25000000D+01 -.24000000D+01 0.30849899D+01 0.13102122D-01
+ -.24000000D+01 -.23000000D+01 0.34098530D+01 0.16462200D-01
+ -.23000000D+01 -.22000000D+01 0.37724022D+01 0.20031599D-01
+ -.22000000D+01 -.21000000D+01 0.40935323D+01 0.16912318D-01
+ -.21000000D+01 -.20000000D+01 0.44374044D+01 0.16787910D-01
+ -.20000000D+01 -.19000000D+01 0.48127269D+01 0.17532512D-01
+ -.19000000D+01 -.18000000D+01 0.51410562D+01 0.17325458D-01
+ -.18000000D+01 -.17000000D+01 0.54190467D+01 0.20509936D-01
+ -.17000000D+01 -.16000000D+01 0.57611218D+01 0.20580571D-01
+ -.16000000D+01 -.15000000D+01 0.60604667D+01 0.19073269D-01
+ -.15000000D+01 -.14000000D+01 0.63531997D+01 0.20806095D-01
+ -.14000000D+01 -.13000000D+01 0.66808360D+01 0.19641528D-01
+ -.13000000D+01 -.12000000D+01 0.69716128D+01 0.26416022D-01
+ -.12000000D+01 -.11000000D+01 0.71674665D+01 0.22384605D-01
+ -.11000000D+01 -.10000000D+01 0.73944977D+01 0.29473101D-01
+ -.10000000D+01 -.90000000D+00 0.76268608D+01 0.22860018D-01
+ -.90000000D+00 -.80000000D+00 0.77868674D+01 0.23410629D-01
+ -.80000000D+00 -.70000000D+00 0.79931302D+01 0.24450082D-01
+ -.70000000D+00 -.60000000D+00 0.81162601D+01 0.22194648D-01
+ -.60000000D+00 -.50000000D+00 0.82521989D+01 0.22705472D-01
+ -.50000000D+00 -.40000000D+00 0.83894569D+01 0.24952792D-01
+ -.40000000D+00 -.30000000D+00 0.84683370D+01 0.23488143D-01
+ -.30000000D+00 -.20000000D+00 0.85253449D+01 0.23768049D-01
+ -.20000000D+00 -.10000000D+00 0.85856845D+01 0.22803713D-01
+ -.10000000D+00 0.18041124D-15 0.86331501D+01 0.24987433D-01
+ 0.70776718D-15 0.10000000D+00 0.86710226D+01 0.48341075D-01
+ 0.10000000D+00 0.20000000D+00 0.85794762D+01 0.25181861D-01
+ 0.20000000D+00 0.30000000D+00 0.85182217D+01 0.38464519D-01
+ 0.30000000D+00 0.40000000D+00 0.84816121D+01 0.26072678D-01
+ 0.40000000D+00 0.50000000D+00 0.83476765D+01 0.27621589D-01
+ 0.50000000D+00 0.60000000D+00 0.82666783D+01 0.24127129D-01
+ 0.60000000D+00 0.70000000D+00 0.81375257D+01 0.23671889D-01
+ 0.70000000D+00 0.80000000D+00 0.79665923D+01 0.22907071D-01
+ 0.80000000D+00 0.90000000D+00 0.78169367D+01 0.22734498D-01
+ 0.90000000D+00 0.10000000D+01 0.76022821D+01 0.29739586D-01
+ 0.10000000D+01 0.11000000D+01 0.74273634D+01 0.20866365D-01
+ 0.11000000D+01 0.12000000D+01 0.71976029D+01 0.23312917D-01
+ 0.12000000D+01 0.13000000D+01 0.69389342D+01 0.21424463D-01
+ 0.13000000D+01 0.14000000D+01 0.66201816D+01 0.21075768D-01
+ 0.14000000D+01 0.15000000D+01 0.63875821D+01 0.21519917D-01
+ 0.15000000D+01 0.16000000D+01 0.60770910D+01 0.20786659D-01
+ 0.16000000D+01 0.17000000D+01 0.57391456D+01 0.22078556D-01
+ 0.17000000D+01 0.18000000D+01 0.54458461D+01 0.19558907D-01
+ 0.18000000D+01 0.19000000D+01 0.50965171D+01 0.18437031D-01
+ 0.19000000D+01 0.20000000D+01 0.47836354D+01 0.18841065D-01
+ 0.20000000D+01 0.21000000D+01 0.44144643D+01 0.16189395D-01
+ 0.21000000D+01 0.22000000D+01 0.41035061D+01 0.16928823D-01
+ 0.22000000D+01 0.23000000D+01 0.37484458D+01 0.16329553D-01
+ 0.23000000D+01 0.24000000D+01 0.34621214D+01 0.15054524D-01
+ 0.24000000D+01 0.25000000D+01 0.30857152D+01 0.13871034D-01
+ 0.25000000D+01 0.26000000D+01 0.27614477D+01 0.16289430D-01
+ 0.26000000D+01 0.27000000D+01 0.24526673D+01 0.11556865D-01
+ 0.27000000D+01 0.28000000D+01 0.21637979D+01 0.10667794D-01
+ 0.28000000D+01 0.29000000D+01 0.19087955D+01 0.97374085D-02
+ 0.29000000D+01 0.30000000D+01 0.16203811D+01 0.10826290D-01
+ 0.30000000D+01 0.31000000D+01 0.13846109D+01 0.88717242D-02
+ 0.31000000D+01 0.32000000D+01 0.11537279D+01 0.76648852D-02
+ 0.32000000D+01 0.33000000D+01 0.95513659D+00 0.83989663D-02
+ 0.33000000D+01 0.34000000D+01 0.76939585D+00 0.58149098D-02
+ 0.34000000D+01 0.35000000D+01 0.59090064D+00 0.48440743D-02
+ 0.35000000D+01 0.36000000D+01 0.45394271D+00 0.60652266D-02
+ 0.36000000D+01 0.37000000D+01 0.33133500D+00 0.33227978D-02
+ 0.37000000D+01 0.38000000D+01 0.23107111D+00 0.65155153D-02
+ 0.38000000D+01 0.39000000D+01 0.15797143D+00 0.14541400D-02
+ 0.39000000D+01 0.40000000D+01 0.99127141D-01 0.16802518D-02
+ 0.40000000D+01 0.41000000D+01 0.55483779D-01 0.57791231D-03
+ 0.41000000D+01 0.42000000D+01 0.28636048D-01 0.28494248D-03
+ 0.42000000D+01 0.43000000D+01 0.12328444D-01 0.15920670D-03
+ 0.43000000D+01 0.44000000D+01 0.44086884D-02 0.55132814D-04
+ 0.44000000D+01 0.45000000D+01 0.11400015D-02 0.19323388D-04
+ 0.45000000D+01 0.46000000D+01 0.13865878D-03 0.54359786D-05
+ 0.46000000D+01 0.47000000D+01 0.11196517D-05 0.49411390D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11306614D-05 0.49306904D-06
+ -.46000000D+01 -.45000000D+01 0.13973156D-03 0.53905039D-05
+ -.45000000D+01 -.44000000D+01 0.11579187D-02 0.18632825D-04
+ -.44000000D+01 -.43000000D+01 0.45241856D-02 0.67817161D-04
+ -.43000000D+01 -.42000000D+01 0.13030493D-01 0.13542059D-03
+ -.42000000D+01 -.41000000D+01 0.28912435D-01 0.44596062D-03
+ -.41000000D+01 -.40000000D+01 0.58127648D-01 0.66165187D-03
+ -.40000000D+01 -.39000000D+01 0.11215421D+00 0.10711171D-01
+ -.39000000D+01 -.38000000D+01 0.16524588D+00 0.19727940D-02
+ -.38000000D+01 -.37000000D+01 0.24518348D+00 0.20172515D-02
+ -.37000000D+01 -.36000000D+01 0.35009713D+00 0.32159512D-02
+ -.36000000D+01 -.35000000D+01 0.47977091D+00 0.37620185D-02
+ -.35000000D+01 -.34000000D+01 0.62942810D+00 0.43666429D-02
+ -.34000000D+01 -.33000000D+01 0.81226856D+00 0.66327146D-02
+ -.33000000D+01 -.32000000D+01 0.10072763D+01 0.70927711D-02
+ -.32000000D+01 -.31000000D+01 0.12204116D+01 0.73888300D-02
+ -.31000000D+01 -.30000000D+01 0.14736254D+01 0.81496587D-02
+ -.30000000D+01 -.29000000D+01 0.17387642D+01 0.10227335D-01
+ -.29000000D+01 -.28000000D+01 0.20388480D+01 0.10640730D-01
+ -.28000000D+01 -.27000000D+01 0.23080215D+01 0.10989050D-01
+ -.27000000D+01 -.26000000D+01 0.26356140D+01 0.18352174D-01
+ -.26000000D+01 -.25000000D+01 0.29574033D+01 0.13802196D-01
+ -.25000000D+01 -.24000000D+01 0.33052507D+01 0.13135149D-01
+ -.24000000D+01 -.23000000D+01 0.36571347D+01 0.16483718D-01
+ -.23000000D+01 -.22000000D+01 0.40468917D+01 0.20048752D-01
+ -.22000000D+01 -.21000000D+01 0.43968740D+01 0.16924658D-01
+ -.21000000D+01 -.20000000D+01 0.47690976D+01 0.16815661D-01
+ -.20000000D+01 -.19000000D+01 0.51749560D+01 0.17559335D-01
+ -.19000000D+01 -.18000000D+01 0.55311554D+01 0.17356622D-01
+ -.18000000D+01 -.17000000D+01 0.58388378D+01 0.20553923D-01
+ -.17000000D+01 -.16000000D+01 0.62084880D+01 0.20627668D-01
+ -.16000000D+01 -.15000000D+01 0.65360463D+01 0.19124621D-01
+ -.15000000D+01 -.14000000D+01 0.68555506D+01 0.20842378D-01
+ -.14000000D+01 -.13000000D+01 0.72086793D+01 0.19666850D-01
+ -.13000000D+01 -.12000000D+01 0.75243735D+01 0.26432280D-01
+ -.12000000D+01 -.11000000D+01 0.77447594D+01 0.22417881D-01
+ -.11000000D+01 -.10000000D+01 0.79920412D+01 0.29506911D-01
+ -.10000000D+01 -.90000000D+00 0.82446867D+01 0.22891600D-01
+ -.90000000D+00 -.80000000D+00 0.84232544D+01 0.23449779D-01
+ -.80000000D+00 -.70000000D+00 0.86474376D+01 0.24482539D-01
+ -.70000000D+00 -.60000000D+00 0.87847456D+01 0.22275857D-01
+ -.60000000D+00 -.50000000D+00 0.89326178D+01 0.22760921D-01
+ -.50000000D+00 -.40000000D+00 0.90815998D+01 0.24984319D-01
+ -.40000000D+00 -.30000000D+00 0.91677579D+01 0.23533306D-01
+ -.30000000D+00 -.20000000D+00 0.92320077D+01 0.23812766D-01
+ -.20000000D+00 -.10000000D+00 0.92972491D+01 0.22848020D-01
+ -.10000000D+00 0.18041124D-15 0.93470722D+01 0.25095549D-01
+ 0.70776718D-15 0.10000000D+00 0.93838264D+01 0.48384732D-01
+ 0.10000000D+00 0.20000000D+00 0.92952874D+01 0.26785382D-01
+ 0.20000000D+00 0.30000000D+00 0.92208969D+01 0.39601935D-01
+ 0.30000000D+00 0.40000000D+00 0.91818763D+01 0.26106133D-01
+ 0.40000000D+00 0.50000000D+00 0.90387094D+01 0.27665660D-01
+ 0.50000000D+00 0.60000000D+00 0.89479948D+01 0.24169079D-01
+ 0.60000000D+00 0.70000000D+00 0.88057614D+01 0.23706619D-01
+ 0.70000000D+00 0.80000000D+00 0.86206884D+01 0.22945476D-01
+ 0.80000000D+00 0.90000000D+00 0.84534385D+01 0.22757365D-01
+ 0.90000000D+00 0.10000000D+01 0.82205198D+01 0.29764468D-01
+ 0.10000000D+01 0.11000000D+01 0.80255160D+01 0.20894427D-01
+ 0.11000000D+01 0.12000000D+01 0.77745797D+01 0.23343838D-01
+ 0.12000000D+01 0.13000000D+01 0.74913753D+01 0.21456969D-01
+ 0.13000000D+01 0.14000000D+01 0.71487072D+01 0.21121066D-01
+ 0.14000000D+01 0.15000000D+01 0.68895529D+01 0.21543012D-01
+ 0.15000000D+01 0.16000000D+01 0.65522777D+01 0.20812326D-01
+ 0.16000000D+01 0.17000000D+01 0.61872674D+01 0.22108419D-01
+ 0.17000000D+01 0.18000000D+01 0.58645006D+01 0.19654502D-01
+ 0.18000000D+01 0.19000000D+01 0.54877187D+01 0.18528542D-01
+ 0.19000000D+01 0.20000000D+01 0.51452785D+01 0.18862003D-01
+ 0.20000000D+01 0.21000000D+01 0.47467055D+01 0.16209923D-01
+ 0.21000000D+01 0.22000000D+01 0.44066744D+01 0.16956147D-01
+ 0.22000000D+01 0.23000000D+01 0.40231826D+01 0.16352828D-01
+ 0.23000000D+01 0.24000000D+01 0.37093833D+01 0.15066502D-01
+ 0.24000000D+01 0.25000000D+01 0.33061103D+01 0.13884651D-01
+ 0.25000000D+01 0.26000000D+01 0.29558672D+01 0.16299607D-01
+ 0.26000000D+01 0.27000000D+01 0.26227166D+01 0.11571206D-01
+ 0.27000000D+01 0.28000000D+01 0.23107335D+01 0.10686273D-01
+ 0.28000000D+01 0.29000000D+01 0.20336416D+01 0.97496305D-02
+ 0.29000000D+01 0.30000000D+01 0.17256081D+01 0.10833710D-01
+ 0.30000000D+01 0.31000000D+01 0.14713569D+01 0.88804980D-02
+ 0.31000000D+01 0.32000000D+01 0.12239712D+01 0.76715527D-02
+ 0.32000000D+01 0.33000000D+01 0.10108531D+01 0.84044096D-02
+ 0.33000000D+01 0.34000000D+01 0.81255802D+00 0.58526089D-02
+ 0.34000000D+01 0.35000000D+01 0.62312157D+00 0.48909191D-02
+ 0.35000000D+01 0.36000000D+01 0.47711723D+00 0.60708286D-02
+ 0.36000000D+01 0.37000000D+01 0.34742992D+00 0.33248140D-02
+ 0.37000000D+01 0.38000000D+01 0.24159736D+00 0.65164886D-02
+ 0.38000000D+01 0.39000000D+01 0.16445872D+00 0.14551240D-02
+ 0.39000000D+01 0.40000000D+01 0.10278903D+00 0.16805884D-02
+ 0.40000000D+01 0.41000000D+01 0.57358838D-01 0.57844346D-03
+ 0.41000000D+01 0.42000000D+01 0.29476753D-01 0.28509165D-03
+ 0.42000000D+01 0.43000000D+01 0.12643619D-01 0.15926656D-03
+ 0.43000000D+01 0.44000000D+01 0.45002179D-02 0.55165571D-04
+ 0.44000000D+01 0.45000000D+01 0.11575229D-02 0.19349232D-04
+ 0.45000000D+01 0.46000000D+01 0.13992431D-03 0.54361576D-05
+ 0.46000000D+01 0.47000000D+01 0.11222189D-05 0.49411419D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11318884D-05 0.49306917D-06
+ -.46000000D+01 -.45000000D+01 0.14035537D-03 0.53905953D-05
+ -.45000000D+01 -.44000000D+01 0.11667168D-02 0.18634451D-04
+ -.44000000D+01 -.43000000D+01 0.45722332D-02 0.67831217D-04
+ -.43000000D+01 -.42000000D+01 0.13198627D-01 0.13545418D-03
+ -.42000000D+01 -.41000000D+01 0.29369547D-01 0.44608407D-03
+ -.41000000D+01 -.40000000D+01 0.59169197D-01 0.66186439D-03
+ -.40000000D+01 -.39000000D+01 0.11422370D+00 0.10711440D-01
+ -.39000000D+01 -.38000000D+01 0.16895044D+00 0.19732839D-02
+ -.38000000D+01 -.37000000D+01 0.25133187D+00 0.20185157D-02
+ -.37000000D+01 -.36000000D+01 0.35962474D+00 0.32173446D-02
+ -.36000000D+01 -.35000000D+01 0.49365578D+00 0.37696350D-02
+ -.35000000D+01 -.34000000D+01 0.64906854D+00 0.43719506D-02
+ -.34000000D+01 -.33000000D+01 0.83868429D+00 0.66352208D-02
+ -.33000000D+01 -.32000000D+01 0.10419105D+01 0.70962602D-02
+ -.32000000D+01 -.31000000D+01 0.12646353D+01 0.73928648D-02
+ -.31000000D+01 -.30000000D+01 0.15286955D+01 0.81575412D-02
+ -.30000000D+01 -.29000000D+01 0.18059804D+01 0.10237120D-01
+ -.29000000D+01 -.28000000D+01 0.21195832D+01 0.10667989D-01
+ -.28000000D+01 -.27000000D+01 0.24035427D+01 0.11014641D-01
+ -.27000000D+01 -.26000000D+01 0.27468607D+01 0.18356702D-01
+ -.26000000D+01 -.25000000D+01 0.30856410D+01 0.13816935D-01
+ -.25000000D+01 -.24000000D+01 0.34511681D+01 0.13158502D-01
+ -.24000000D+01 -.23000000D+01 0.38218759D+01 0.16497800D-01
+ -.23000000D+01 -.22000000D+01 0.42306215D+01 0.20060581D-01
+ -.22000000D+01 -.21000000D+01 0.46008152D+01 0.16933232D-01
+ -.21000000D+01 -.20000000D+01 0.49928347D+01 0.16843281D-01
+ -.20000000D+01 -.19000000D+01 0.54205332D+01 0.17583800D-01
+ -.19000000D+01 -.18000000D+01 0.57964271D+01 0.17377540D-01
+ -.18000000D+01 -.17000000D+01 0.61252332D+01 0.20581407D-01
+ -.17000000D+01 -.16000000D+01 0.65146158D+01 0.20658051D-01
+ -.16000000D+01 -.15000000D+01 0.68626480D+01 0.19177351D-01
+ -.15000000D+01 -.14000000D+01 0.72010003D+01 0.20879249D-01
+ -.14000000D+01 -.13000000D+01 0.75727945D+01 0.19683410D-01
+ -.13000000D+01 -.12000000D+01 0.79065375D+01 0.26442843D-01
+ -.12000000D+01 -.11000000D+01 0.81448923D+01 0.22448858D-01
+ -.11000000D+01 -.10000000D+01 0.84064257D+01 0.29539391D-01
+ -.10000000D+01 -.90000000D+00 0.86741331D+01 0.22914584D-01
+ -.90000000D+00 -.80000000D+00 0.88663568D+01 0.23475955D-01
+ -.80000000D+00 -.70000000D+00 0.91036488D+01 0.24507550D-01
+ -.70000000D+00 -.60000000D+00 0.92513539D+01 0.22358949D-01
+ -.60000000D+00 -.50000000D+00 0.94078140D+01 0.22819100D-01
+ -.50000000D+00 -.40000000D+00 0.95656175D+01 0.25005920D-01
+ -.40000000D+00 -.30000000D+00 0.96568103D+01 0.23566965D-01
+ -.30000000D+00 -.20000000D+00 0.97267961D+01 0.23845220D-01
+ -.20000000D+00 -.10000000D+00 0.97954974D+01 0.22881630D-01
+ -.10000000D+00 0.18041124D-15 0.98471717D+01 0.25184078D-01
+ 0.70776718D-15 0.10000000D+00 0.98828900D+01 0.48421384D-01
+ 0.10000000D+00 0.20000000D+00 0.97989386D+01 0.29595343D-01
+ 0.20000000D+00 0.30000000D+00 0.97103162D+01 0.41632253D-01
+ 0.30000000D+00 0.40000000D+00 0.96718326D+01 0.26128364D-01
+ 0.40000000D+00 0.50000000D+00 0.95218147D+01 0.27701473D-01
+ 0.50000000D+00 0.60000000D+00 0.94240645D+01 0.24203543D-01
+ 0.60000000D+00 0.70000000D+00 0.92720181D+01 0.23729496D-01
+ 0.70000000D+00 0.80000000D+00 0.90766975D+01 0.22972292D-01
+ 0.80000000D+00 0.90000000D+00 0.88964417D+01 0.22772850D-01
+ 0.90000000D+00 0.10000000D+01 0.86502150D+01 0.29784007D-01
+ 0.10000000D+01 0.11000000D+01 0.84406755D+01 0.20915375D-01
+ 0.11000000D+01 0.12000000D+01 0.81744751D+01 0.23374854D-01
+ 0.12000000D+01 0.13000000D+01 0.78731533D+01 0.21485888D-01
+ 0.13000000D+01 0.14000000D+01 0.75133679D+01 0.21160507D-01
+ 0.14000000D+01 0.15000000D+01 0.72348556D+01 0.21567152D-01
+ 0.15000000D+01 0.16000000D+01 0.68784282D+01 0.20828397D-01
+ 0.16000000D+01 0.17000000D+01 0.64939334D+01 0.22128433D-01
+ 0.17000000D+01 0.18000000D+01 0.61500075D+01 0.19735123D-01
+ 0.18000000D+01 0.19000000D+01 0.57538700D+01 0.18606809D-01
+ 0.19000000D+01 0.20000000D+01 0.53902791D+01 0.18876629D-01
+ 0.20000000D+01 0.21000000D+01 0.49709587D+01 0.16224148D-01
+ 0.21000000D+01 0.22000000D+01 0.46105299D+01 0.16976092D-01
+ 0.22000000D+01 0.23000000D+01 0.42070703D+01 0.16368115D-01
+ 0.23000000D+01 0.24000000D+01 0.38740405D+01 0.15074320D-01
+ 0.24000000D+01 0.25000000D+01 0.34521107D+01 0.13893072D-01
+ 0.25000000D+01 0.26000000D+01 0.30839493D+01 0.16305545D-01
+ 0.26000000D+01 0.27000000D+01 0.27340669D+01 0.11580719D-01
+ 0.27000000D+01 0.28000000D+01 0.24063314D+01 0.10701361D-01
+ 0.28000000D+01 0.29000000D+01 0.21141465D+01 0.97601490D-02
+ 0.29000000D+01 0.30000000D+01 0.17930109D+01 0.10838679D-01
+ 0.30000000D+01 0.31000000D+01 0.15263592D+01 0.88864183D-02
+ 0.31000000D+01 0.32000000D+01 0.12681028D+01 0.76763036D-02
+ 0.32000000D+01 0.33000000D+01 0.10455211D+01 0.84079239D-02
+ 0.33000000D+01 0.34000000D+01 0.83907234D+00 0.58732910D-02
+ 0.34000000D+01 0.35000000D+01 0.64273734D+00 0.49204369D-02
+ 0.35000000D+01 0.36000000D+01 0.49098080D+00 0.60773939D-02
+ 0.36000000D+01 0.37000000D+01 0.35694246D+00 0.33259300D-02
+ 0.37000000D+01 0.38000000D+01 0.24772610D+00 0.65169912D-02
+ 0.38000000D+01 0.39000000D+01 0.16817479D+00 0.14556302D-02
+ 0.39000000D+01 0.40000000D+01 0.10485080D+00 0.16807556D-02
+ 0.40000000D+01 0.41000000D+01 0.58397594D-01 0.57878639D-03
+ 0.41000000D+01 0.42000000D+01 0.29933557D-01 0.28516791D-03
+ 0.42000000D+01 0.43000000D+01 0.12811453D-01 0.15929865D-03
+ 0.43000000D+01 0.44000000D+01 0.45478877D-02 0.55182193D-04
+ 0.44000000D+01 0.45000000D+01 0.11664124D-02 0.19362190D-04
+ 0.45000000D+01 0.46000000D+01 0.14054826D-03 0.54362438D-05
+ 0.46000000D+01 0.47000000D+01 0.11234409D-05 0.49411433D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11148426D-05 0.49306834D-06
+ -.46000000D+01 -.45000000D+01 0.13138214D-03 0.53901450D-05
+ -.45000000D+01 -.44000000D+01 0.10432727D-02 0.18628495D-04
+ -.44000000D+01 -.43000000D+01 0.39242632D-02 0.67761386D-04
+ -.43000000D+01 -.42000000D+01 0.11006000D-01 0.13534325D-03
+ -.42000000D+01 -.41000000D+01 0.23604330D-01 0.44563778D-03
+ -.41000000D+01 -.40000000D+01 0.46486900D-01 0.66148054D-03
+ -.40000000D+01 -.39000000D+01 0.89756564D-01 0.10709669D-01
+ -.39000000D+01 -.38000000D+01 0.12630261D+00 0.19722998D-02
+ -.38000000D+01 -.37000000D+01 0.18271705D+00 0.20147344D-02
+ -.37000000D+01 -.36000000D+01 0.25606599D+00 0.32137656D-02
+ -.36000000D+01 -.35000000D+01 0.34579755D+00 0.37450297D-02
+ -.35000000D+01 -.34000000D+01 0.44561528D+00 0.43598941D-02
+ -.34000000D+01 -.33000000D+01 0.56996325D+00 0.66295809D-02
+ -.33000000D+01 -.32000000D+01 0.69639081D+00 0.70885856D-02
+ -.32000000D+01 -.31000000D+01 0.83158886D+00 0.73859379D-02
+ -.31000000D+01 -.30000000D+01 0.99799476D+00 0.81326718D-02
+ -.30000000D+01 -.29000000D+01 0.11678910D+01 0.10199538D-01
+ -.29000000D+01 -.28000000D+01 0.13636778D+01 0.10520870D-01
+ -.28000000D+01 -.27000000D+01 0.15204141D+01 0.10873452D-01
+ -.27000000D+01 -.26000000D+01 0.17297149D+01 0.18349741D-01
+ -.26000000D+01 -.25000000D+01 0.19257756D+01 0.13768779D-01
+ -.25000000D+01 -.24000000D+01 0.21436653D+01 0.13072855D-01
+ -.24000000D+01 -.23000000D+01 0.23596745D+01 0.16455484D-01
+ -.23000000D+01 -.22000000D+01 0.26121133D+01 0.20024737D-01
+ -.22000000D+01 -.21000000D+01 0.28191682D+01 0.16902374D-01
+ -.21000000D+01 -.20000000D+01 0.30485328D+01 0.16790728D-01
+ -.20000000D+01 -.19000000D+01 0.33066497D+01 0.17523502D-01
+ -.19000000D+01 -.18000000D+01 0.35226170D+01 0.17298054D-01
+ -.18000000D+01 -.17000000D+01 0.36862821D+01 0.20454824D-01
+ -.17000000D+01 -.16000000D+01 0.39186084D+01 0.20522642D-01
+ -.16000000D+01 -.15000000D+01 0.41102030D+01 0.19035149D-01
+ -.15000000D+01 -.14000000D+01 0.42984981D+01 0.20794460D-01
+ -.14000000D+01 -.13000000D+01 0.45264232D+01 0.19630719D-01
+ -.13000000D+01 -.12000000D+01 0.47217774D+01 0.26430916D-01
+ -.12000000D+01 -.11000000D+01 0.48269505D+01 0.22378160D-01
+ -.11000000D+01 -.10000000D+01 0.49726530D+01 0.29450842D-01
+ -.10000000D+01 -.90000000D+00 0.51276055D+01 0.22857561D-01
+ -.90000000D+00 -.80000000D+00 0.52168044D+01 0.23390700D-01
+ -.80000000D+00 -.70000000D+00 0.53582585D+01 0.24428986D-01
+ -.70000000D+00 -.60000000D+00 0.54256780D+01 0.22141853D-01
+ -.60000000D+00 -.50000000D+00 0.55148103D+01 0.22678611D-01
+ -.50000000D+00 -.40000000D+00 0.56104300D+01 0.24942923D-01
+ -.40000000D+00 -.30000000D+00 0.56576135D+01 0.23449963D-01
+ -.30000000D+00 -.20000000D+00 0.56894997D+01 0.23735889D-01
+ -.20000000D+00 -.10000000D+00 0.57314866D+01 0.22789836D-01
+ -.10000000D+00 0.18041124D-15 0.57713432D+01 0.24877394D-01
+ 0.70776718D-15 0.10000000D+00 0.58101092D+01 0.48300269D-01
+ 0.10000000D+00 0.20000000D+00 0.57219183D+01 0.24368092D-01
+ 0.20000000D+00 0.30000000D+00 0.56854318D+01 0.37864457D-01
+ 0.30000000D+00 0.40000000D+00 0.56700376D+01 0.26052146D-01
+ 0.40000000D+00 0.50000000D+00 0.55686251D+01 0.27593617D-01
+ 0.50000000D+00 0.60000000D+00 0.55278535D+01 0.24101866D-01
+ 0.60000000D+00 0.70000000D+00 0.54479668D+01 0.23649510D-01
+ 0.70000000D+00 0.80000000D+00 0.53312302D+01 0.22879291D-01
+ 0.80000000D+00 0.90000000D+00 0.52465712D+01 0.22733569D-01
+ 0.90000000D+00 0.10000000D+01 0.51023716D+01 0.29728689D-01
+ 0.10000000D+01 0.11000000D+01 0.50042564D+01 0.20854264D-01
+ 0.11000000D+01 0.12000000D+01 0.48574257D+01 0.23318399D-01
+ 0.12000000D+01 0.13000000D+01 0.46904221D+01 0.21406068D-01
+ 0.13000000D+01 0.14000000D+01 0.44646905D+01 0.21043410D-01
+ 0.14000000D+01 0.15000000D+01 0.43336054D+01 0.21531899D-01
+ 0.15000000D+01 0.16000000D+01 0.41271655D+01 0.20772975D-01
+ 0.16000000D+01 0.17000000D+01 0.38963446D+01 0.22069775D-01
+ 0.17000000D+01 0.18000000D+01 0.37146705D+01 0.19462291D-01
+ 0.18000000D+01 0.19000000D+01 0.34759691D+01 0.18360448D-01
+ 0.19000000D+01 0.20000000D+01 0.32782549D+01 0.18838873D-01
+ 0.20000000D+01 0.21000000D+01 0.30248992D+01 0.16186726D-01
+ 0.21000000D+01 0.22000000D+01 0.28299298D+01 0.16910670D-01
+ 0.22000000D+01 0.23000000D+01 0.25872051D+01 0.16333003D-01
+ 0.23000000D+01 0.24000000D+01 0.24122802D+01 0.15050416D-01
+ 0.24000000D+01 0.25000000D+01 0.21445986D+01 0.13868029D-01
+ 0.25000000D+01 0.26000000D+01 0.19254788D+01 0.16293442D-01
+ 0.26000000D+01 0.27000000D+01 0.17168072D+01 0.11554735D-01
+ 0.27000000D+01 0.28000000D+01 0.15233236D+01 0.10657445D-01
+ 0.28000000D+01 0.29000000D+01 0.13588753D+01 0.97388836D-02
+ 0.29000000D+01 0.30000000D+01 0.11538081D+01 0.10828078D-01
+ 0.30000000D+01 0.31000000D+01 0.99593113D+00 0.88738561D-02
+ 0.31000000D+01 0.32000000D+01 0.83555614D+00 0.76696185D-02
+ 0.32000000D+01 0.33000000D+01 0.70008029D+00 0.84022943D-02
+ 0.33000000D+01 0.34000000D+01 0.56946921D+00 0.57494089D-02
+ 0.34000000D+01 0.35000000D+01 0.43947241D+00 0.47602469D-02
+ 0.35000000D+01 0.36000000D+01 0.34309324D+00 0.60675949D-02
+ 0.36000000D+01 0.37000000D+01 0.25341846D+00 0.33238624D-02
+ 0.37000000D+01 0.38000000D+01 0.17915181D+00 0.65161798D-02
+ 0.38000000D+01 0.39000000D+01 0.12549299D+00 0.14547868D-02
+ 0.39000000D+01 0.40000000D+01 0.80419424D-01 0.16804951D-02
+ 0.40000000D+01 0.41000000D+01 0.45735766D-01 0.57776138D-03
+ 0.41000000D+01 0.42000000D+01 0.24174502D-01 0.28506175D-03
+ 0.42000000D+01 0.43000000D+01 0.10621011D-01 0.15922814D-03
+ 0.43000000D+01 0.44000000D+01 0.39024129D-02 0.55103914D-04
+ 0.44000000D+01 0.45000000D+01 0.10422003D-02 0.19269806D-04
+ 0.45000000D+01 0.46000000D+01 0.13158193D-03 0.54358091D-05
+ 0.46000000D+01 0.47000000D+01 0.11064796D-05 0.49411341D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11283423D-05 0.49306905D-06
+ -.46000000D+01 -.45000000D+01 0.13818451D-03 0.53905457D-05
+ -.45000000D+01 -.44000000D+01 0.11341220D-02 0.18634022D-04
+ -.44000000D+01 -.43000000D+01 0.43899225D-02 0.67821356D-04
+ -.43000000D+01 -.42000000D+01 0.12550593D-01 0.13544915D-03
+ -.42000000D+01 -.41000000D+01 0.27596998D-01 0.44602531D-03
+ -.41000000D+01 -.40000000D+01 0.55142420D-01 0.66187747D-03
+ -.40000000D+01 -.39000000D+01 0.10621529D+00 0.10711186D-01
+ -.39000000D+01 -.38000000D+01 0.15462225D+00 0.19733232D-02
+ -.38000000D+01 -.37000000D+01 0.22770110D+00 0.20178734D-02
+ -.37000000D+01 -.36000000D+01 0.32321193D+00 0.32166170D-02
+ -.36000000D+01 -.35000000D+01 0.44061161D+00 0.37584959D-02
+ -.35000000D+01 -.34000000D+01 0.57474328D+00 0.43663840D-02
+ -.34000000D+01 -.33000000D+01 0.73898846D+00 0.66339138D-02
+ -.33000000D+01 -.32000000D+01 0.91187302D+00 0.70947435D-02
+ -.32000000D+01 -.31000000D+01 0.10995975D+01 0.73906029D-02
+ -.31000000D+01 -.30000000D+01 0.13242406D+01 0.81496691D-02
+ -.30000000D+01 -.29000000D+01 0.15575793D+01 0.10224655D-01
+ -.29000000D+01 -.28000000D+01 0.18224597D+01 0.10630859D-01
+ -.28000000D+01 -.27000000D+01 0.20539707D+01 0.10979900D-01
+ -.27000000D+01 -.26000000D+01 0.23412290D+01 0.18355215D-01
+ -.26000000D+01 -.25000000D+01 0.26200591D+01 0.13798493D-01
+ -.25000000D+01 -.24000000D+01 0.29232808D+01 0.13125364D-01
+ -.24000000D+01 -.23000000D+01 0.32282527D+01 0.16485050D-01
+ -.23000000D+01 -.22000000D+01 0.35703390D+01 0.20047447D-01
+ -.22000000D+01 -.21000000D+01 0.38708673D+01 0.16920001D-01
+ -.21000000D+01 -.20000000D+01 0.41936323D+01 0.16811956D-01
+ -.20000000D+01 -.19000000D+01 0.45479573D+01 0.17554593D-01
+ -.19000000D+01 -.18000000D+01 0.48547073D+01 0.17350493D-01
+ -.18000000D+01 -.17000000D+01 0.51120380D+01 0.20544220D-01
+ -.17000000D+01 -.16000000D+01 0.54330434D+01 0.20617132D-01
+ -.16000000D+01 -.15000000D+01 0.57123285D+01 0.19096276D-01
+ -.15000000D+01 -.14000000D+01 0.59859654D+01 0.20832782D-01
+ -.14000000D+01 -.13000000D+01 0.62939284D+01 0.19669086D-01
+ -.13000000D+01 -.12000000D+01 0.65669680D+01 0.26443108D-01
+ -.12000000D+01 -.11000000D+01 0.67464565D+01 0.22414084D-01
+ -.11000000D+01 -.10000000D+01 0.69575681D+01 0.29495041D-01
+ -.10000000D+01 -.90000000D+00 0.71748003D+01 0.22895632D-01
+ -.90000000D+00 -.80000000D+00 0.73211179D+01 0.23448720D-01
+ -.80000000D+00 -.70000000D+00 0.75161610D+01 0.24477519D-01
+ -.70000000D+00 -.60000000D+00 0.76278468D+01 0.22230972D-01
+ -.60000000D+00 -.50000000D+00 0.77546656D+01 0.22734110D-01
+ -.50000000D+00 -.40000000D+00 0.78843231D+01 0.24987794D-01
+ -.40000000D+00 -.30000000D+00 0.79565900D+01 0.23525862D-01
+ -.30000000D+00 -.20000000D+00 0.80087413D+01 0.23803619D-01
+ -.20000000D+00 -.10000000D+00 0.80660541D+01 0.22848145D-01
+ -.10000000D+00 0.18041124D-15 0.81117476D+01 0.25053156D-01
+ 0.70776718D-15 0.10000000D+00 0.81497660D+01 0.48365083D-01
+ 0.10000000D+00 0.20000000D+00 0.80590158D+01 0.25048395D-01
+ 0.20000000D+00 0.30000000D+00 0.80025939D+01 0.38369854D-01
+ 0.30000000D+00 0.40000000D+00 0.79697774D+01 0.26104492D-01
+ 0.40000000D+00 0.50000000D+00 0.78417006D+01 0.27652196D-01
+ 0.50000000D+00 0.60000000D+00 0.77691674D+01 0.24157150D-01
+ 0.60000000D+00 0.70000000D+00 0.76498214D+01 0.23703507D-01
+ 0.70000000D+00 0.80000000D+00 0.74891735D+01 0.22940112D-01
+ 0.80000000D+00 0.90000000D+00 0.73514182D+01 0.22760403D-01
+ 0.90000000D+00 0.10000000D+01 0.71504597D+01 0.29762364D-01
+ 0.10000000D+01 0.11000000D+01 0.69900740D+01 0.20893741D-01
+ 0.11000000D+01 0.12000000D+01 0.67764023D+01 0.23340590D-01
+ 0.12000000D+01 0.13000000D+01 0.65347985D+01 0.21449400D-01
+ 0.13000000D+01 0.14000000D+01 0.62335053D+01 0.21101635D-01
+ 0.14000000D+01 0.15000000D+01 0.60200956D+01 0.21539584D-01
+ 0.15000000D+01 0.16000000D+01 0.57288398D+01 0.20813871D-01
+ 0.16000000D+01 0.17000000D+01 0.54116149D+01 0.22114450D-01
+ 0.17000000D+01 0.18000000D+01 0.51387421D+01 0.19595986D-01
+ 0.18000000D+01 0.19000000D+01 0.48100607D+01 0.18481997D-01
+ 0.19000000D+01 0.20000000D+01 0.45188536D+01 0.18864747D-01
+ 0.20000000D+01 0.21000000D+01 0.41706693D+01 0.16212237D-01
+ 0.21000000D+01 0.22000000D+01 0.38809709D+01 0.16951899D-01
+ 0.22000000D+01 0.23000000D+01 0.35461813D+01 0.16357494D-01
+ 0.23000000D+01 0.24000000D+01 0.32807608D+01 0.15068462D-01
+ 0.24000000D+01 0.25000000D+01 0.29242030D+01 0.13886068D-01
+ 0.25000000D+01 0.26000000D+01 0.26188185D+01 0.16304472D-01
+ 0.26000000D+01 0.27000000D+01 0.23282266D+01 0.11572956D-01
+ 0.27000000D+01 0.28000000D+01 0.20565944D+01 0.10681591D-01
+ 0.28000000D+01 0.29000000D+01 0.18176567D+01 0.97511099D-02
+ 0.29000000D+01 0.30000000D+01 0.15441943D+01 0.10835550D-01
+ 0.30000000D+01 0.31000000D+01 0.13220778D+01 0.88834099D-02
+ 0.31000000D+01 0.32000000D+01 0.11032856D+01 0.76742439D-02
+ 0.32000000D+01 0.33000000D+01 0.91549175D+00 0.84069107D-02
+ 0.33000000D+01 0.34000000D+01 0.73913752D+00 0.58460353D-02
+ 0.34000000D+01 0.35000000D+01 0.56836524D+00 0.48766134D-02
+ 0.35000000D+01 0.36000000D+01 0.43797393D+00 0.60684620D-02
+ 0.36000000D+01 0.37000000D+01 0.32050970D+00 0.33262291D-02
+ 0.37000000D+01 0.38000000D+01 0.22410406D+00 0.65171689D-02
+ 0.38000000D+01 0.39000000D+01 0.15383035D+00 0.14558592D-02
+ 0.39000000D+01 0.40000000D+01 0.96858605D-01 0.16808731D-02
+ 0.40000000D+01 0.41000000D+01 0.54372982D-01 0.57846587D-03
+ 0.41000000D+01 0.42000000D+01 0.28164292D-01 0.28519762D-03
+ 0.42000000D+01 0.43000000D+01 0.12164085D-01 0.15929648D-03
+ 0.43000000D+01 0.44000000D+01 0.43659894D-02 0.55172106D-04
+ 0.44000000D+01 0.45000000D+01 0.11336624D-02 0.19345605D-04
+ 0.45000000D+01 0.46000000D+01 0.13837859D-03 0.54361988D-05
+ 0.46000000D+01 0.47000000D+01 0.11199133D-05 0.49411420D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11310001D-05 0.49306919D-06
+ -.46000000D+01 -.45000000D+01 0.13970531D-03 0.53906266D-05
+ -.45000000D+01 -.44000000D+01 0.11562257D-02 0.18635202D-04
+ -.44000000D+01 -.43000000D+01 0.45108492D-02 0.67834809D-04
+ -.43000000D+01 -.42000000D+01 0.12972442D-01 0.13547162D-03
+ -.42000000D+01 -.41000000D+01 0.28733387D-01 0.44612780D-03
+ -.41000000D+01 -.40000000D+01 0.57692636D-01 0.66199131D-03
+ -.40000000D+01 -.39000000D+01 0.11122136D+00 0.10711491D-01
+ -.39000000D+01 -.38000000D+01 0.16347234D+00 0.19735862D-02
+ -.38000000D+01 -.37000000D+01 0.24213891D+00 0.20189052D-02
+ -.37000000D+01 -.36000000D+01 0.34524394D+00 0.32176480D-02
+ -.36000000D+01 -.35000000D+01 0.47235918D+00 0.37671347D-02
+ -.35000000D+01 -.34000000D+01 0.61886152D+00 0.43712912D-02
+ -.34000000D+01 -.33000000D+01 0.79764122D+00 0.66358224D-02
+ -.33000000D+01 -.32000000D+01 0.98777087D+00 0.70973178D-02
+ -.32000000D+01 -.31000000D+01 0.11952735D+01 0.73935630D-02
+ -.31000000D+01 -.30000000D+01 0.14420097D+01 0.81571560D-02
+ -.30000000D+01 -.29000000D+01 0.16997364D+01 0.10235509D-01
+ -.29000000D+01 -.28000000D+01 0.19915838D+01 0.10664437D-01
+ -.28000000D+01 -.27000000D+01 0.22520438D+01 0.11011788D-01
+ -.27000000D+01 -.26000000D+01 0.25699537D+01 0.18358002D-01
+ -.26000000D+01 -.25000000D+01 0.28815753D+01 0.13814473D-01
+ -.25000000D+01 -.24000000D+01 0.32186424D+01 0.13152638D-01
+ -.24000000D+01 -.23000000D+01 0.35592424D+01 0.16498520D-01
+ -.23000000D+01 -.22000000D+01 0.39373218D+01 0.20058840D-01
+ -.22000000D+01 -.21000000D+01 0.42755232D+01 0.16928690D-01
+ -.21000000D+01 -.20000000D+01 0.46355392D+01 0.16831366D-01
+ -.20000000D+01 -.19000000D+01 0.50294786D+01 0.17574006D-01
+ -.19000000D+01 -.18000000D+01 0.53729984D+01 0.17373680D-01
+ -.18000000D+01 -.17000000D+01 0.56688177D+01 0.20576701D-01
+ -.17000000D+01 -.16000000D+01 0.60260366D+01 0.20653379D-01
+ -.16000000D+01 -.15000000D+01 0.63419544D+01 0.19140477D-01
+ -.15000000D+01 -.14000000D+01 0.66502194D+01 0.20859667D-01
+ -.14000000D+01 -.13000000D+01 0.69917763D+01 0.19683924D-01
+ -.13000000D+01 -.12000000D+01 0.72970377D+01 0.26448101D-01
+ -.12000000D+01 -.11000000D+01 0.75078751D+01 0.22436156D-01
+ -.11000000D+01 -.10000000D+01 0.77455798D+01 0.29523703D-01
+ -.10000000D+01 -.90000000D+00 0.79891332D+01 0.22913352D-01
+ -.90000000D+00 -.80000000D+00 0.81596307D+01 0.23475139D-01
+ -.80000000D+00 -.70000000D+00 0.83772528D+01 0.24500456D-01
+ -.70000000D+00 -.60000000D+00 0.85077526D+01 0.22308028D-01
+ -.60000000D+00 -.50000000D+00 0.86499991D+01 0.22786578D-01
+ -.50000000D+00 -.40000000D+00 0.87945913D+01 0.25006976D-01
+ -.40000000D+00 -.30000000D+00 0.88766043D+01 0.23561277D-01
+ -.30000000D+00 -.20000000D+00 0.89381507D+01 0.23838425D-01
+ -.20000000D+00 -.10000000D+00 0.90015945D+01 0.22879141D-01
+ -.10000000D+00 0.18041124D-15 0.90504064D+01 0.25149667D-01
+ 0.70776718D-15 0.10000000D+00 0.90870734D+01 0.48404250D-01
+ 0.10000000D+00 0.20000000D+00 0.89991907D+01 0.26681976D-01
+ 0.20000000D+00 0.30000000D+00 0.89274895D+01 0.39529677D-01
+ 0.30000000D+00 0.40000000D+00 0.88907576D+01 0.26125893D-01
+ 0.40000000D+00 0.50000000D+00 0.87511452D+01 0.27688695D-01
+ 0.50000000D+00 0.60000000D+00 0.86656216D+01 0.24190644D-01
+ 0.60000000D+00 0.70000000D+00 0.85290723D+01 0.23725717D-01
+ 0.70000000D+00 0.80000000D+00 0.83502693D+01 0.22966595D-01
+ 0.80000000D+00 0.90000000D+00 0.81899390D+01 0.22773067D-01
+ 0.90000000D+00 0.10000000D+01 0.79652033D+01 0.29779335D-01
+ 0.10000000D+01 0.11000000D+01 0.77788175D+01 0.20911979D-01
+ 0.11000000D+01 0.12000000D+01 0.75375639D+01 0.23361507D-01
+ 0.12000000D+01 0.13000000D+01 0.72642351D+01 0.21473244D-01
+ 0.13000000D+01 0.14000000D+01 0.69320211D+01 0.21140630D-01
+ 0.14000000D+01 0.15000000D+01 0.66840036D+01 0.21555989D-01
+ 0.15000000D+01 0.16000000D+01 0.63580362D+01 0.20829312D-01
+ 0.16000000D+01 0.17000000D+01 0.60052167D+01 0.22132249D-01
+ 0.17000000D+01 0.18000000D+01 0.56942217D+01 0.19694808D-01
+ 0.18000000D+01 0.19000000D+01 0.53296806D+01 0.18572505D-01
+ 0.19000000D+01 0.20000000D+01 0.49997241D+01 0.18876620D-01
+ 0.20000000D+01 0.21000000D+01 0.46132249D+01 0.16223861D-01
+ 0.21000000D+01 0.22000000D+01 0.42853496D+01 0.16971685D-01
+ 0.22000000D+01 0.23000000D+01 0.39134553D+01 0.16369983D-01
+ 0.23000000D+01 0.24000000D+01 0.36116384D+01 0.15075725D-01
+ 0.24000000D+01 0.25000000D+01 0.32195967D+01 0.13893170D-01
+ 0.25000000D+01 0.26000000D+01 0.28799745D+01 0.16308173D-01
+ 0.26000000D+01 0.27000000D+01 0.25570629D+01 0.11581138D-01
+ 0.27000000D+01 0.28000000D+01 0.22546956D+01 0.10694543D-01
+ 0.28000000D+01 0.29000000D+01 0.19864719D+01 0.97573289D-02
+ 0.29000000D+01 0.30000000D+01 0.16866488D+01 0.10839168D-01
+ 0.30000000D+01 0.31000000D+01 0.14397630D+01 0.88875719D-02
+ 0.31000000D+01 0.32000000D+01 0.11988044D+01 0.76772086D-02
+ 0.32000000D+01 0.33000000D+01 0.99139606D+00 0.84089079D-02
+ 0.33000000D+01 0.34000000D+01 0.79796233D+00 0.58727448D-02
+ 0.34000000D+01 0.35000000D+01 0.61246772D+00 0.49128310D-02
+ 0.35000000D+01 0.36000000D+01 0.46972251D+00 0.60730509D-02
+ 0.36000000D+01 0.37000000D+01 0.34253761D+00 0.33267651D-02
+ 0.37000000D+01 0.38000000D+01 0.23852972D+00 0.65173676D-02
+ 0.38000000D+01 0.39000000D+01 0.16269226D+00 0.14560596D-02
+ 0.39000000D+01 0.40000000D+01 0.10185318D+00 0.16809207D-02
+ 0.40000000D+01 0.41000000D+01 0.56919502D-01 0.57877683D-03
+ 0.41000000D+01 0.42000000D+01 0.29299040D-01 0.28522615D-03
+ 0.42000000D+01 0.43000000D+01 0.12585400D-01 0.15931572D-03
+ 0.43000000D+01 0.44000000D+01 0.44864549D-02 0.55187382D-04
+ 0.44000000D+01 0.45000000D+01 0.11559044D-02 0.19362259D-04
+ 0.45000000D+01 0.46000000D+01 0.13989865D-03 0.54362740D-05
+ 0.46000000D+01 0.47000000D+01 0.11225580D-05 0.49411435D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11319459D-05 0.49306923D-06
+ -.46000000D+01 -.45000000D+01 0.14026929D-03 0.53906555D-05
+ -.45000000D+01 -.44000000D+01 0.11646988D-02 0.18635637D-04
+ -.44000000D+01 -.43000000D+01 0.45585821D-02 0.67839824D-04
+ -.43000000D+01 -.42000000D+01 0.13143216D-01 0.13547995D-03
+ -.42000000D+01 -.41000000D+01 0.29203787D-01 0.44616839D-03
+ -.41000000D+01 -.40000000D+01 0.58769663D-01 0.66203998D-03
+ -.40000000D+01 -.39000000D+01 0.11337622D+00 0.10711598D-01
+ -.39000000D+01 -.38000000D+01 0.16734758D+00 0.19737022D-02
+ -.38000000D+01 -.37000000D+01 0.24857309D+00 0.20193573D-02
+ -.37000000D+01 -.36000000D+01 0.35521014D+00 0.32181879D-02
+ -.36000000D+01 -.35000000D+01 0.48692555D+00 0.37722539D-02
+ -.35000000D+01 -.34000000D+01 0.63938847D+00 0.43744574D-02
+ -.34000000D+01 -.33000000D+01 0.82525171D+00 0.66368004D-02
+ -.33000000D+01 -.32000000D+01 0.10239030D+01 0.70986308D-02
+ -.32000000D+01 -.31000000D+01 0.12412830D+01 0.73953046D-02
+ -.31000000D+01 -.30000000D+01 0.14991426D+01 0.81612091D-02
+ -.30000000D+01 -.29000000D+01 0.17693047D+01 0.10241194D-01
+ -.29000000D+01 -.28000000D+01 0.20749739D+01 0.10679416D-01
+ -.28000000D+01 -.27000000D+01 0.23503387D+01 0.11025771D-01
+ -.27000000D+01 -.26000000D+01 0.26841832D+01 0.18359743D-01
+ -.26000000D+01 -.25000000D+01 0.30128927D+01 0.13823093D-01
+ -.25000000D+01 -.24000000D+01 0.33677164D+01 0.13167241D-01
+ -.24000000D+01 -.23000000D+01 0.37271299D+01 0.16505513D-01
+ -.23000000D+01 -.22000000D+01 0.41242209D+01 0.20065530D-01
+ -.22000000D+01 -.21000000D+01 0.44824104D+01 0.16934135D-01
+ -.21000000D+01 -.20000000D+01 0.48621339D+01 0.16849335D-01
+ -.20000000D+01 -.19000000D+01 0.52774301D+01 0.17589897D-01
+ -.19000000D+01 -.18000000D+01 0.56406031D+01 0.17385892D-01
+ -.18000000D+01 -.17000000D+01 0.59570765D+01 0.20592224D-01
+ -.17000000D+01 -.16000000D+01 0.63338519D+01 0.20670943D-01
+ -.16000000D+01 -.15000000D+01 0.66697708D+01 0.19179499D-01
+ -.15000000D+01 -.14000000D+01 0.69964684D+01 0.20884886D-01
+ -.14000000D+01 -.13000000D+01 0.73564895D+01 0.19692053D-01
+ -.13000000D+01 -.12000000D+01 0.76793008D+01 0.26451442D-01
+ -.12000000D+01 -.11000000D+01 0.79074030D+01 0.22455033D-01
+ -.11000000D+01 -.10000000D+01 0.81592607D+01 0.29546003D-01
+ -.10000000D+01 -.90000000D+00 0.84175079D+01 0.22925081D-01
+ -.90000000D+00 -.80000000D+00 0.86013331D+01 0.23489237D-01
+ -.80000000D+00 -.70000000D+00 0.88313474D+01 0.24514643D-01
+ -.70000000D+00 -.60000000D+00 0.89722300D+01 0.22370290D-01
+ -.60000000D+00 -.50000000D+00 0.91228433D+01 0.22830929D-01
+ -.50000000D+00 -.40000000D+00 0.92758411D+01 0.25017909D-01
+ -.40000000D+00 -.30000000D+00 0.93629820D+01 0.23581534D-01
+ -.30000000D+00 -.20000000D+00 0.94300082D+01 0.23857942D-01
+ -.20000000D+00 -.10000000D+00 0.94967170D+01 0.22898273D-01
+ -.10000000D+00 0.18041124D-15 0.95473302D+01 0.25211323D-01
+ 0.70776718D-15 0.10000000D+00 0.95830984D+01 0.48430528D-01
+ 0.10000000D+00 0.20000000D+00 0.94989013D+01 0.28934537D-01
+ 0.20000000D+00 0.30000000D+00 0.94147424D+01 0.41149756D-01
+ 0.30000000D+00 0.40000000D+00 0.93778951D+01 0.26137387D-01
+ 0.40000000D+00 0.50000000D+00 0.92318139D+01 0.27712624D-01
+ 0.50000000D+00 0.60000000D+00 0.91392182D+01 0.24213574D-01
+ 0.60000000D+00 0.70000000D+00 0.89930603D+01 0.23737986D-01
+ 0.70000000D+00 0.80000000D+00 0.88043040D+01 0.22982083D-01
+ 0.80000000D+00 0.90000000D+00 0.86315200D+01 0.22780745D-01
+ 0.90000000D+00 0.10000000D+01 0.83937411D+01 0.29790781D-01
+ 0.10000000D+01 0.11000000D+01 0.81931916D+01 0.20923653D-01
+ 0.11000000D+01 0.12000000D+01 0.79369316D+01 0.23381362D-01
+ 0.12000000D+01 0.13000000D+01 0.76460490D+01 0.21492007D-01
+ 0.13000000D+01 0.14000000D+01 0.72971395D+01 0.21169007D-01
+ 0.14000000D+01 0.15000000D+01 0.70301753D+01 0.21572445D-01
+ 0.15000000D+01 0.16000000D+01 0.66854956D+01 0.20837289D-01
+ 0.16000000D+01 0.17000000D+01 0.63133697D+01 0.22141482D-01
+ 0.17000000D+01 0.18000000D+01 0.59817545D+01 0.19755444D-01
+ 0.18000000D+01 0.19000000D+01 0.55980471D+01 0.18629406D-01
+ 0.19000000D+01 0.20000000D+01 0.52471933D+01 0.18883728D-01
+ 0.20000000D+01 0.21000000D+01 0.48402576D+01 0.16230957D-01
+ 0.21000000D+01 0.22000000D+01 0.44921431D+01 0.16983409D-01
+ 0.22000000D+01 0.23000000D+01 0.41005221D+01 0.16377014D-01
+ 0.23000000D+01 0.24000000D+01 0.37793996D+01 0.15079524D-01
+ 0.24000000D+01 0.25000000D+01 0.33687003D+01 0.13897085D-01
+ 0.25000000D+01 0.26000000D+01 0.30111504D+01 0.16309977D-01
+ 0.26000000D+01 0.27000000D+01 0.26713733D+01 0.11585804D-01
+ 0.27000000D+01 0.28000000D+01 0.23530678D+01 0.10703977D-01
+ 0.28000000D+01 0.29000000D+01 0.20696251D+01 0.97629705D-02
+ 0.29000000D+01 0.30000000D+01 0.17563733D+01 0.10841425D-01
+ 0.30000000D+01 0.31000000D+01 0.14968307D+01 0.88901266D-02
+ 0.31000000D+01 0.32000000D+01 0.12447302D+01 0.76792778D-02
+ 0.32000000D+01 0.33000000D+01 0.10275458D+01 0.84101774D-02
+ 0.33000000D+01 0.34000000D+01 0.82564031D+00 0.58831882D-02
+ 0.34000000D+01 0.35000000D+01 0.63301392D+00 0.49305317D-02
+ 0.35000000D+01 0.36000000D+01 0.48426751D+00 0.60780852D-02
+ 0.36000000D+01 0.37000000D+01 0.35250560D+00 0.33269791D-02
+ 0.37000000D+01 0.38000000D+01 0.24495688D+00 0.65174457D-02
+ 0.38000000D+01 0.39000000D+01 0.16657486D+00 0.14561252D-02
+ 0.39000000D+01 0.40000000D+01 0.10400211D+00 0.16809314D-02
+ 0.40000000D+01 0.41000000D+01 0.57995708D-01 0.57895041D-03
+ 0.41000000D+01 0.42000000D+01 0.29768658D-01 0.28523723D-03
+ 0.42000000D+01 0.43000000D+01 0.12755966D-01 0.15932389D-03
+ 0.43000000D+01 0.44000000D+01 0.45340217D-02 0.55193009D-04
+ 0.44000000D+01 0.45000000D+01 0.11644279D-02 0.19368315D-04
+ 0.45000000D+01 0.46000000D+01 0.14046246D-03 0.54363006D-05
+ 0.46000000D+01 0.47000000D+01 0.11234992D-05 0.49411440D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11237347D-05 0.49306834D-06
+ -.46000000D+01 -.45000000D+01 0.13658904D-03 0.53900683D-05
+ -.45000000D+01 -.44000000D+01 0.11167815D-02 0.18625987D-04
+ -.44000000D+01 -.43000000D+01 0.43121016D-02 0.67750706D-04
+ -.43000000D+01 -.42000000D+01 0.12322342D-01 0.13528831D-03
+ -.42000000D+01 -.41000000D+01 0.27065387D-01 0.44616635D-03
+ -.41000000D+01 -.40000000D+01 0.54074338D-01 0.66106308D-03
+ -.40000000D+01 -.39000000D+01 0.10435526D+00 0.10709879D-01
+ -.39000000D+01 -.38000000D+01 0.15168387D+00 0.19710406D-02
+ -.38000000D+01 -.37000000D+01 0.22334298D+00 0.20128682D-02
+ -.37000000D+01 -.36000000D+01 0.31710834D+00 0.32117948D-02
+ -.36000000D+01 -.35000000D+01 0.43273889D+00 0.37443508D-02
+ -.35000000D+01 -.34000000D+01 0.56460420D+00 0.43575624D-02
+ -.34000000D+01 -.33000000D+01 0.72658172D+00 0.66260952D-02
+ -.33000000D+01 -.32000000D+01 0.89695234D+00 0.70832302D-02
+ -.32000000D+01 -.31000000D+01 0.10821315D+01 0.73776847D-02
+ -.31000000D+01 -.30000000D+01 0.13036548D+01 0.81295909D-02
+ -.30000000D+01 -.29000000D+01 0.15342230D+01 0.10195946D-01
+ -.29000000D+01 -.28000000D+01 0.17964261D+01 0.10536060D-01
+ -.28000000D+01 -.27000000D+01 0.20239107D+01 0.10888092D-01
+ -.27000000D+01 -.26000000D+01 0.23083551D+01 0.18341691D-01
+ -.26000000D+01 -.25000000D+01 0.25834382D+01 0.13765136D-01
+ -.25000000D+01 -.24000000D+01 0.28833121D+01 0.13075329D-01
+ -.24000000D+01 -.23000000D+01 0.31848401D+01 0.16448198D-01
+ -.23000000D+01 -.22000000D+01 0.35236595D+01 0.20019979D-01
+ -.22000000D+01 -.21000000D+01 0.38194333D+01 0.16895312D-01
+ -.21000000D+01 -.20000000D+01 0.41391221D+01 0.16779499D-01
+ -.20000000D+01 -.19000000D+01 0.44880734D+01 0.17517149D-01
+ -.19000000D+01 -.18000000D+01 0.47926226D+01 0.17299777D-01
+ -.18000000D+01 -.17000000D+01 0.50449774D+01 0.20462051D-01
+ -.17000000D+01 -.16000000D+01 0.53637316D+01 0.20533172D-01
+ -.16000000D+01 -.15000000D+01 0.56392258D+01 0.19040451D-01
+ -.15000000D+01 -.14000000D+01 0.59089350D+01 0.20783654D-01
+ -.14000000D+01 -.13000000D+01 0.62146909D+01 0.19623831D-01
+ -.13000000D+01 -.12000000D+01 0.64849004D+01 0.26404699D-01
+ -.12000000D+01 -.11000000D+01 0.66597961D+01 0.22361036D-01
+ -.11000000D+01 -.10000000D+01 0.68693239D+01 0.29448875D-01
+ -.10000000D+01 -.90000000D+00 0.70847937D+01 0.22838124D-01
+ -.90000000D+00 -.80000000D+00 0.72291002D+01 0.23386769D-01
+ -.80000000D+00 -.70000000D+00 0.74206133D+01 0.24425502D-01
+ -.70000000D+00 -.60000000D+00 0.75312140D+01 0.22143774D-01
+ -.60000000D+00 -.50000000D+00 0.76571350D+01 0.22681918D-01
+ -.50000000D+00 -.40000000D+00 0.77848075D+01 0.24928894D-01
+ -.40000000D+00 -.30000000D+00 0.78575665D+01 0.23454319D-01
+ -.30000000D+00 -.20000000D+00 0.79087982D+01 0.23730934D-01
+ -.20000000D+00 -.10000000D+00 0.79641766D+01 0.22769204D-01
+ -.10000000D+00 0.18041124D-15 0.80100449D+01 0.24891559D-01
+ 0.70776718D-15 0.10000000D+00 0.80484678D+01 0.48309701D-01
+ 0.10000000D+00 0.20000000D+00 0.79558428D+01 0.24568270D-01
+ 0.20000000D+00 0.30000000D+00 0.79034614D+01 0.38022829D-01
+ 0.30000000D+00 0.40000000D+00 0.78701634D+01 0.26041031D-01
+ 0.40000000D+00 0.50000000D+00 0.77436815D+01 0.27589210D-01
+ 0.50000000D+00 0.60000000D+00 0.76709089D+01 0.24096486D-01
+ 0.60000000D+00 0.70000000D+00 0.75527206D+01 0.23642737D-01
+ 0.70000000D+00 0.80000000D+00 0.73936231D+01 0.22875049D-01
+ 0.80000000D+00 0.90000000D+00 0.72587690D+01 0.22719690D-01
+ 0.90000000D+00 0.10000000D+01 0.70596926D+01 0.29726119D-01
+ 0.10000000D+01 0.11000000D+01 0.69020932D+01 0.20850385D-01
+ 0.11000000D+01 0.12000000D+01 0.66901715D+01 0.23301556D-01
+ 0.12000000D+01 0.13000000D+01 0.64526027D+01 0.21408473D-01
+ 0.13000000D+01 0.14000000D+01 0.61536469D+01 0.21041229D-01
+ 0.14000000D+01 0.15000000D+01 0.59432202D+01 0.21509349D-01
+ 0.15000000D+01 0.16000000D+01 0.56558502D+01 0.20760931D-01
+ 0.16000000D+01 0.17000000D+01 0.53412092D+01 0.22061841D-01
+ 0.17000000D+01 0.18000000D+01 0.50730889D+01 0.19483701D-01
+ 0.18000000D+01 0.19000000D+01 0.47470776D+01 0.18377009D-01
+ 0.19000000D+01 0.20000000D+01 0.44595200D+01 0.18830202D-01
+ 0.20000000D+01 0.21000000D+01 0.41158335D+01 0.16175133D-01
+ 0.21000000D+01 0.22000000D+01 0.38301036D+01 0.16906871D-01
+ 0.22000000D+01 0.23000000D+01 0.34989944D+01 0.16316715D-01
+ 0.23000000D+01 0.24000000D+01 0.32369460D+01 0.15049211D-01
+ 0.24000000D+01 0.25000000D+01 0.28840951D+01 0.13859651D-01
+ 0.25000000D+01 0.26000000D+01 0.25825783D+01 0.16281542D-01
+ 0.26000000D+01 0.27000000D+01 0.22951584D+01 0.11549462D-01
+ 0.27000000D+01 0.28000000D+01 0.20266565D+01 0.10650325D-01
+ 0.28000000D+01 0.29000000D+01 0.17914477D+01 0.97296146D-02
+ 0.29000000D+01 0.30000000D+01 0.15205332D+01 0.10819714D-01
+ 0.30000000D+01 0.31000000D+01 0.13015684D+01 0.88680813D-02
+ 0.31000000D+01 0.32000000D+01 0.10857159D+01 0.76611349D-02
+ 0.32000000D+01 0.33000000D+01 0.90061506D+00 0.83939751D-02
+ 0.33000000D+01 0.34000000D+01 0.72646109D+00 0.57627214D-02
+ 0.34000000D+01 0.35000000D+01 0.55850456D+00 0.47833766D-02
+ 0.35000000D+01 0.36000000D+01 0.43014830D+00 0.60627942D-02
+ 0.36000000D+01 0.37000000D+01 0.31450661D+00 0.33217490D-02
+ 0.37000000D+01 0.38000000D+01 0.21978632D+00 0.65147124D-02
+ 0.38000000D+01 0.39000000D+01 0.15086458D+00 0.14533506D-02
+ 0.39000000D+01 0.40000000D+01 0.95001973D-01 0.16799264D-02
+ 0.40000000D+01 0.41000000D+01 0.53316014D-01 0.57748895D-03
+ 0.41000000D+01 0.42000000D+01 0.27632716D-01 0.28480904D-03
+ 0.42000000D+01 0.43000000D+01 0.11938195D-01 0.15916875D-03
+ 0.43000000D+01 0.44000000D+01 0.42901054D-02 0.55091780D-04
+ 0.44000000D+01 0.45000000D+01 0.11158414D-02 0.19281067D-04
+ 0.45000000D+01 0.46000000D+01 0.13677986D-03 0.54358107D-05
+ 0.46000000D+01 0.47000000D+01 0.11153756D-05 0.49411341D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11282709D-05 0.49306880D-06
+ -.46000000D+01 -.45000000D+01 0.13862020D-03 0.53903605D-05
+ -.45000000D+01 -.44000000D+01 0.11430991D-02 0.18630676D-04
+ -.44000000D+01 -.43000000D+01 0.44465305D-02 0.67794497D-04
+ -.43000000D+01 -.42000000D+01 0.12768291D-01 0.13538160D-03
+ -.42000000D+01 -.41000000D+01 0.28222544D-01 0.44621976D-03
+ -.41000000D+01 -.40000000D+01 0.56602184D-01 0.66150334D-03
+ -.40000000D+01 -.39000000D+01 0.10919851D+00 0.10710763D-01
+ -.39000000D+01 -.38000000D+01 0.16007715D+00 0.19722168D-02
+ -.38000000D+01 -.37000000D+01 0.23680181D+00 0.20157475D-02
+ -.37000000D+01 -.36000000D+01 0.33738382D+00 0.32145003D-02
+ -.36000000D+01 -.35000000D+01 0.46155078D+00 0.37535728D-02
+ -.35000000D+01 -.34000000D+01 0.60421712D+00 0.43631323D-02
+ -.34000000D+01 -.33000000D+01 0.77878496D+00 0.66303977D-02
+ -.33000000D+01 -.32000000D+01 0.96400151D+00 0.70898277D-02
+ -.32000000D+01 -.31000000D+01 0.11660370D+01 0.73845108D-02
+ -.31000000D+01 -.30000000D+01 0.14065410D+01 0.81419380D-02
+ -.30000000D+01 -.29000000D+01 0.16578148D+01 0.10213684D-01
+ -.29000000D+01 -.28000000D+01 0.19426221D+01 0.10598608D-01
+ -.28000000D+01 -.27000000D+01 0.21950097D+01 0.10948142D-01
+ -.27000000D+01 -.26000000D+01 0.25052200D+01 0.18348877D-01
+ -.26000000D+01 -.25000000D+01 0.28080822D+01 0.13786037D-01
+ -.25000000D+01 -.24000000D+01 0.31364753D+01 0.13108160D-01
+ -.24000000D+01 -.23000000D+01 0.34679487D+01 0.16469494D-01
+ -.23000000D+01 -.22000000D+01 0.38369749D+01 0.20037183D-01
+ -.22000000D+01 -.21000000D+01 0.41647796D+01 0.16910628D-01
+ -.21000000D+01 -.20000000D+01 0.45158609D+01 0.16800369D-01
+ -.20000000D+01 -.19000000D+01 0.48981327D+01 0.17540223D-01
+ -.19000000D+01 -.18000000D+01 0.52334057D+01 0.17333614D-01
+ -.18000000D+01 -.17000000D+01 0.55183109D+01 0.20514755D-01
+ -.17000000D+01 -.16000000D+01 0.58671679D+01 0.20588220D-01
+ -.16000000D+01 -.15000000D+01 0.61731569D+01 0.19083330D-01
+ -.15000000D+01 -.14000000D+01 0.64724407D+01 0.20816276D-01
+ -.14000000D+01 -.13000000D+01 0.68057240D+01 0.19650735D-01
+ -.13000000D+01 -.12000000D+01 0.71028375D+01 0.26421390D-01
+ -.12000000D+01 -.11000000D+01 0.73041275D+01 0.22392413D-01
+ -.11000000D+01 -.10000000D+01 0.75360981D+01 0.29479477D-01
+ -.10000000D+01 -.90000000D+00 0.77731973D+01 0.22870721D-01
+ -.90000000D+00 -.80000000D+00 0.79374127D+01 0.23425583D-01
+ -.80000000D+00 -.70000000D+00 0.81481116D+01 0.24458512D-01
+ -.70000000D+00 -.60000000D+00 0.82741078D+01 0.22205433D-01
+ -.60000000D+00 -.50000000D+00 0.84130977D+01 0.22719988D-01
+ -.50000000D+00 -.40000000D+00 0.85530072D+01 0.24962828D-01
+ -.40000000D+00 -.30000000D+00 0.86339171D+01 0.23501268D-01
+ -.30000000D+00 -.20000000D+00 0.86925363D+01 0.23776470D-01
+ -.20000000D+00 -.10000000D+00 0.87534685D+01 0.22813173D-01
+ -.10000000D+00 0.18041124D-15 0.88014234D+01 0.24999135D-01
+ 0.70776718D-15 0.10000000D+00 0.88393397D+01 0.48350127D-01
+ 0.10000000D+00 0.20000000D+00 0.87473920D+01 0.25187326D-01
+ 0.20000000D+00 0.30000000D+00 0.86852549D+01 0.38470119D-01
+ 0.30000000D+00 0.40000000D+00 0.86471998D+01 0.26079409D-01
+ 0.40000000D+00 0.50000000D+00 0.85109966D+01 0.27630517D-01
+ 0.50000000D+00 0.60000000D+00 0.84275247D+01 0.24135191D-01
+ 0.60000000D+00 0.70000000D+00 0.82956337D+01 0.23680196D-01
+ 0.70000000D+00 0.80000000D+00 0.81210893D+01 0.22916915D-01
+ 0.80000000D+00 0.90000000D+00 0.79674313D+01 0.22743027D-01
+ 0.90000000D+00 0.10000000D+01 0.77485767D+01 0.29749123D-01
+ 0.10000000D+01 0.11000000D+01 0.75691891D+01 0.20878354D-01
+ 0.11000000D+01 0.12000000D+01 0.73342341D+01 0.23324735D-01
+ 0.12000000D+01 0.13000000D+01 0.70702340D+01 0.21436791D-01
+ 0.13000000D+01 0.14000000D+01 0.67453500D+01 0.21082727D-01
+ 0.14000000D+01 0.15000000D+01 0.65063679D+01 0.21524343D-01
+ 0.15000000D+01 0.16000000D+01 0.61896013D+01 0.20791104D-01
+ 0.16000000D+01 0.17000000D+01 0.58453722D+01 0.22093180D-01
+ 0.17000000D+01 0.18000000D+01 0.55453799D+01 0.19563922D-01
+ 0.18000000D+01 0.19000000D+01 0.51887312D+01 0.18450863D-01
+ 0.19000000D+01 0.20000000D+01 0.48692206D+01 0.18851087D-01
+ 0.20000000D+01 0.21000000D+01 0.44930163D+01 0.16197077D-01
+ 0.21000000D+01 0.22000000D+01 0.41750827D+01 0.16935889D-01
+ 0.22000000D+01 0.23000000D+01 0.38127418D+01 0.16340234D-01
+ 0.23000000D+01 0.24000000D+01 0.35201444D+01 0.15061548D-01
+ 0.24000000D+01 0.25000000D+01 0.31373844D+01 0.13875112D-01
+ 0.25000000D+01 0.26000000D+01 0.28068468D+01 0.16293469D-01
+ 0.26000000D+01 0.27000000D+01 0.24921337D+01 0.11564311D-01
+ 0.27000000D+01 0.28000000D+01 0.21976826D+01 0.10669809D-01
+ 0.28000000D+01 0.29000000D+01 0.19376374D+01 0.97419127D-02
+ 0.29000000D+01 0.30000000D+01 0.16443906D+01 0.10828328D-01
+ 0.30000000D+01 0.31000000D+01 0.14043935D+01 0.88767934D-02
+ 0.31000000D+01 0.32000000D+01 0.11695849D+01 0.76678548D-02
+ 0.32000000D+01 0.33000000D+01 0.96762370D+00 0.84005826D-02
+ 0.33000000D+01 0.34000000D+01 0.77891755D+00 0.58166875D-02
+ 0.34000000D+01 0.35000000D+01 0.59795680D+00 0.48461886D-02
+ 0.35000000D+01 0.36000000D+01 0.45894718D+00 0.60660615D-02
+ 0.36000000D+01 0.37000000D+01 0.33473794D+00 0.33240682D-02
+ 0.37000000D+01 0.38000000D+01 0.23322272D+00 0.65160016D-02
+ 0.38000000D+01 0.39000000D+01 0.15927290D+00 0.14546296D-02
+ 0.39000000D+01 0.40000000D+01 0.99837100D-01 0.16804223D-02
+ 0.40000000D+01 0.41000000D+01 0.55837174D-01 0.57808695D-03
+ 0.41000000D+01 0.42000000D+01 0.28788876D-01 0.28500280D-03
+ 0.42000000D+01 0.43000000D+01 0.12382735D-01 0.15923942D-03
+ 0.43000000D+01 0.44000000D+01 0.44233706D-02 0.55140139D-04
+ 0.44000000D+01 0.45000000D+01 0.11424899D-02 0.19323798D-04
+ 0.45000000D+01 0.46000000D+01 0.13881196D-03 0.54360609D-05
+ 0.46000000D+01 0.47000000D+01 0.11198676D-05 0.49411393D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11307476D-05 0.49306905D-06
+ -.46000000D+01 -.45000000D+01 0.13980146D-03 0.53905260D-05
+ -.45000000D+01 -.44000000D+01 0.11590760D-02 0.18633391D-04
+ -.44000000D+01 -.43000000D+01 0.45310142D-02 0.67820029D-04
+ -.43000000D+01 -.42000000D+01 0.13056119D-01 0.13543541D-03
+ -.42000000D+01 -.41000000D+01 0.28986693D-01 0.44623031D-03
+ -.41000000D+01 -.40000000D+01 0.58306325D-01 0.66178297D-03
+ -.40000000D+01 -.39000000D+01 0.11252319D+00 0.10711247D-01
+ -.39000000D+01 -.38000000D+01 0.16593168D+00 0.19729680D-02
+ -.38000000D+01 -.37000000D+01 0.24635269D+00 0.20176863D-02
+ -.37000000D+01 -.36000000D+01 0.35197255D+00 0.32164010D-02
+ -.36000000D+01 -.35000000D+01 0.48254897D+00 0.37628024D-02
+ -.35000000D+01 -.34000000D+01 0.63348713D+00 0.43685778D-02
+ -.34000000D+01 -.33000000D+01 0.81777370D+00 0.66335983D-02
+ -.33000000D+01 -.32000000D+01 0.10146068D+01 0.70945292D-02
+ -.32000000D+01 -.31000000D+01 0.12299903D+01 0.73898666D-02
+ -.31000000D+01 -.30000000D+01 0.14855987D+01 0.81519397D-02
+ -.30000000D+01 -.29000000D+01 0.17535342D+01 0.10227903D-01
+ -.29000000D+01 -.28000000D+01 0.20567672D+01 0.10642937D-01
+ -.28000000D+01 -.27000000D+01 0.23293300D+01 0.10990485D-01
+ -.27000000D+01 -.26000000D+01 0.26606978D+01 0.18354314D-01
+ -.26000000D+01 -.25000000D+01 0.29864753D+01 0.13804986D-01
+ -.25000000D+01 -.24000000D+01 0.33384810D+01 0.13138459D-01
+ -.24000000D+01 -.23000000D+01 0.36949302D+01 0.16487392D-01
+ -.23000000D+01 -.22000000D+01 0.40891948D+01 0.20051880D-01
+ -.22000000D+01 -.21000000D+01 0.44438441D+01 0.16923128D-01
+ -.21000000D+01 -.20000000D+01 0.48210972D+01 0.16823283D-01
+ -.20000000D+01 -.19000000D+01 0.52318759D+01 0.17563217D-01
+ -.19000000D+01 -.18000000D+01 0.55930018D+01 0.17361233D-01
+ -.18000000D+01 -.17000000D+01 0.59056576D+01 0.20556121D-01
+ -.17000000D+01 -.16000000D+01 0.62801160D+01 0.20632332D-01
+ -.16000000D+01 -.15000000D+01 0.66125120D+01 0.19130230D-01
+ -.15000000D+01 -.14000000D+01 0.69367348D+01 0.20849057D-01
+ -.14000000D+01 -.13000000D+01 0.72939684D+01 0.19671408D-01
+ -.13000000D+01 -.12000000D+01 0.76142747D+01 0.26434028D-01
+ -.12000000D+01 -.11000000D+01 0.78386311D+01 0.22422377D-01
+ -.11000000D+01 -.10000000D+01 0.80895474D+01 0.29511205D-01
+ -.10000000D+01 -.90000000D+00 0.83455927D+01 0.22897501D-01
+ -.90000000D+00 -.80000000D+00 0.85272890D+01 0.23458402D-01
+ -.80000000D+00 -.70000000D+00 0.87547163D+01 0.24487250D-01
+ -.70000000D+00 -.60000000D+00 0.88942160D+01 0.22282314D-01
+ -.60000000D+00 -.50000000D+00 0.90443184D+01 0.22769799D-01
+ -.50000000D+00 -.40000000D+00 0.91952733D+01 0.24990317D-01
+ -.40000000D+00 -.30000000D+00 0.92828610D+01 0.23542192D-01
+ -.30000000D+00 -.20000000D+00 0.93484139D+01 0.23817787D-01
+ -.20000000D+00 -.10000000D+00 0.94140611D+01 0.22853634D-01
+ -.10000000D+00 0.18041124D-15 0.94642062D+01 0.25103065D-01
+ 0.70776718D-15 0.10000000D+00 0.95010820D+01 0.48390376D-01
+ 0.10000000D+00 0.20000000D+00 0.94121776D+01 0.26788063D-01
+ 0.20000000D+00 0.30000000D+00 0.93371031D+01 0.39604764D-01
+ 0.30000000D+00 0.40000000D+00 0.92970638D+01 0.26109807D-01
+ 0.40000000D+00 0.50000000D+00 0.91522573D+01 0.27671334D-01
+ 0.50000000D+00 0.60000000D+00 0.90596696D+01 0.24173430D-01
+ 0.60000000D+00 0.70000000D+00 0.89154185D+01 0.23709895D-01
+ 0.70000000D+00 0.80000000D+00 0.87276591D+01 0.22951143D-01
+ 0.80000000D+00 0.90000000D+00 0.85574343D+01 0.22761813D-01
+ 0.90000000D+00 0.10000000D+01 0.83214125D+01 0.29769821D-01
+ 0.10000000D+01 0.11000000D+01 0.81231599D+01 0.20901769D-01
+ 0.11000000D+01 0.12000000D+01 0.78684398D+01 0.23351021D-01
+ 0.12000000D+01 0.13000000D+01 0.75812713D+01 0.21463701D-01
+ 0.13000000D+01 0.14000000D+01 0.72342310D+01 0.21124888D-01
+ 0.14000000D+01 0.15000000D+01 0.69704182D+01 0.21544234D-01
+ 0.15000000D+01 0.16000000D+01 0.66286176D+01 0.20813923D-01
+ 0.16000000D+01 0.17000000D+01 0.62590419D+01 0.22117722D-01
+ 0.17000000D+01 0.18000000D+01 0.59314916D+01 0.19657143D-01
+ 0.18000000D+01 0.19000000D+01 0.55494199D+01 0.18537298D-01
+ 0.19000000D+01 0.20000000D+01 0.52023626D+01 0.18867816D-01
+ 0.20000000D+01 0.21000000D+01 0.47988124D+01 0.16214707D-01
+ 0.21000000D+01 0.22000000D+01 0.44538556D+01 0.16960587D-01
+ 0.22000000D+01 0.23000000D+01 0.40653076D+01 0.16358967D-01
+ 0.23000000D+01 0.24000000D+01 0.37471361D+01 0.15070731D-01
+ 0.24000000D+01 0.25000000D+01 0.33394773D+01 0.13886589D-01
+ 0.25000000D+01 0.26000000D+01 0.29849220D+01 0.16301728D-01
+ 0.26000000D+01 0.27000000D+01 0.26477514D+01 0.11575768D-01
+ 0.27000000D+01 0.28000000D+01 0.23320317D+01 0.10687101D-01
+ 0.28000000D+01 0.29000000D+01 0.20515981D+01 0.97521227D-02
+ 0.29000000D+01 0.30000000D+01 0.17403723D+01 0.10834841D-01
+ 0.30000000D+01 0.31000000D+01 0.14833742D+01 0.88834566D-02
+ 0.31000000D+01 0.32000000D+01 0.12334677D+01 0.76732648D-02
+ 0.32000000D+01 0.33000000D+01 0.10182233D+01 0.84053891D-02
+ 0.33000000D+01 0.34000000D+01 0.81807065D+00 0.58537259D-02
+ 0.34000000D+01 0.35000000D+01 0.62715491D+00 0.48921423D-02
+ 0.35000000D+01 0.36000000D+01 0.47992660D+00 0.60711353D-02
+ 0.36000000D+01 0.37000000D+01 0.34929933D+00 0.33255330D-02
+ 0.37000000D+01 0.38000000D+01 0.24275433D+00 0.65167532D-02
+ 0.38000000D+01 0.39000000D+01 0.16514255D+00 0.14553931D-02
+ 0.39000000D+01 0.40000000D+01 0.10315383D+00 0.16806921D-02
+ 0.40000000D+01 0.41000000D+01 0.57536591D-01 0.57853881D-03
+ 0.41000000D+01 0.42000000D+01 0.29552038D-01 0.28512059D-03
+ 0.42000000D+01 0.43000000D+01 0.12669634D-01 0.15928394D-03
+ 0.43000000D+01 0.44000000D+01 0.45070985D-02 0.55169316D-04
+ 0.44000000D+01 0.45000000D+01 0.11586647D-02 0.19349419D-04
+ 0.45000000D+01 0.46000000D+01 0.13999380D-03 0.54361988D-05
+ 0.46000000D+01 0.47000000D+01 0.11223195D-05 0.49411420D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.11319307D-05 0.49306917D-06
+ -.46000000D+01 -.45000000D+01 0.14038873D-03 0.53906068D-05
+ -.45000000D+01 -.44000000D+01 0.11672648D-02 0.18634744D-04
+ -.44000000D+01 -.43000000D+01 0.45754691D-02 0.67832742D-04
+ -.43000000D+01 -.42000000D+01 0.13210871D-01 0.13546212D-03
+ -.42000000D+01 -.41000000D+01 0.29405522D-01 0.44623005D-03
+ -.41000000D+01 -.40000000D+01 0.59257105D-01 0.66193424D-03
+ -.40000000D+01 -.39000000D+01 0.11440816D+00 0.10711481D-01
+ -.39000000D+01 -.38000000D+01 0.16929925D+00 0.19733816D-02
+ -.38000000D+01 -.37000000D+01 0.25193607D+00 0.20187644D-02
+ -.37000000D+01 -.36000000D+01 0.36061327D+00 0.32175701D-02
+ -.36000000D+01 -.35000000D+01 0.49514367D+00 0.37700594D-02
+ -.35000000D+01 -.34000000D+01 0.65128148D+00 0.43730590D-02
+ -.34000000D+01 -.33000000D+01 0.84173546D+00 0.66356346D-02
+ -.33000000D+01 -.32000000D+01 0.10460424D+01 0.70973431D-02
+ -.32000000D+01 -.31000000D+01 0.12701258D+01 0.73934325D-02
+ -.31000000D+01 -.30000000D+01 0.15356442D+01 0.81587533D-02
+ -.30000000D+01 -.29000000D+01 0.18146599D+01 0.10237445D-01
+ -.29000000D+01 -.28000000D+01 0.21302608D+01 0.10669157D-01
+ -.28000000D+01 -.27000000D+01 0.24163835D+01 0.11015340D-01
+ -.27000000D+01 -.26000000D+01 0.27621493D+01 0.18357965D-01
+ -.26000000D+01 -.25000000D+01 0.31035633D+01 0.13818487D-01
+ -.25000000D+01 -.24000000D+01 0.34718259D+01 0.13160337D-01
+ -.24000000D+01 -.23000000D+01 0.38455944D+01 0.16499594D-01
+ -.23000000D+01 -.22000000D+01 0.42573820D+01 0.20062399D-01
+ -.22000000D+01 -.21000000D+01 0.46307474D+01 0.16932296D-01
+ -.21000000D+01 -.20000000D+01 0.50261986D+01 0.16847746D-01
+ -.20000000D+01 -.19000000D+01 0.54573009D+01 0.17585785D-01
+ -.19000000D+01 -.18000000D+01 0.58365933D+01 0.17380024D-01
+ -.18000000D+01 -.17000000D+01 0.61689013D+01 0.20582476D-01
+ -.17000000D+01 -.16000000D+01 0.65616282D+01 0.20661028D-01
+ -.16000000D+01 -.15000000D+01 0.69131174D+01 0.19180406D-01
+ -.15000000D+01 -.14000000D+01 0.72548150D+01 0.20883636D-01
+ -.14000000D+01 -.13000000D+01 0.76295414D+01 0.19685515D-01
+ -.13000000D+01 -.12000000D+01 0.79665639D+01 0.26443065D-01
+ -.12000000D+01 -.11000000D+01 0.82077905D+01 0.22451373D-01
+ -.11000000D+01 -.10000000D+01 0.84719484D+01 0.29542289D-01
+ -.10000000D+01 -.90000000D+00 0.87420760D+01 0.22917845D-01
+ -.90000000D+00 -.80000000D+00 0.89365917D+01 0.23481156D-01
+ -.80000000D+00 -.70000000D+00 0.91762190D+01 0.24510211D-01
+ -.70000000D+00 -.60000000D+00 0.93255766D+01 0.22362749D-01
+ -.60000000D+00 -.50000000D+00 0.94836372D+01 0.22824279D-01
+ -.50000000D+00 -.40000000D+00 0.96429014D+01 0.25009989D-01
+ -.40000000D+00 -.30000000D+00 0.97350954D+01 0.23572734D-01
+ -.30000000D+00 -.20000000D+00 0.98060882D+01 0.23848472D-01
+ -.20000000D+00 -.10000000D+00 0.98750889D+01 0.22885008D-01
+ -.10000000D+00 0.18041124D-15 0.99269620D+01 0.25188495D-01
+ 0.70776718D-15 0.10000000D+00 0.99628272D+01 0.48424983D-01
+ 0.10000000D+00 0.20000000D+00 0.98785458D+01 0.29596679D-01
+ 0.20000000D+00 0.30000000D+00 0.97894183D+01 0.41633619D-01
+ 0.30000000D+00 0.40000000D+00 0.97502138D+01 0.26130288D-01
+ 0.40000000D+00 0.50000000D+00 0.95990284D+01 0.27705032D-01
+ 0.50000000D+00 0.60000000D+00 0.94998831D+01 0.24206015D-01
+ 0.60000000D+00 0.70000000D+00 0.93463575D+01 0.23730484D-01
+ 0.70000000D+00 0.80000000D+00 0.91490663D+01 0.22975739D-01
+ 0.80000000D+00 0.90000000D+00 0.89666564D+01 0.22775307D-01
+ 0.90000000D+00 0.10000000D+01 0.87181532D+01 0.29787026D-01
+ 0.10000000D+01 0.11000000D+01 0.85062685D+01 0.20919858D-01
+ 0.11000000D+01 0.12000000D+01 0.82373457D+01 0.23379260D-01
+ 0.12000000D+01 0.13000000D+01 0.79331540D+01 0.21489451D-01
+ 0.13000000D+01 0.14000000D+01 0.75702839D+01 0.21162846D-01
+ 0.14000000D+01 0.15000000D+01 0.72884456D+01 0.21567089D-01
+ 0.15000000D+01 0.16000000D+01 0.69288120D+01 0.20828862D-01
+ 0.16000000D+01 0.17000000D+01 0.65410625D+01 0.22134082D-01
+ 0.17000000D+01 0.18000000D+01 0.61937780D+01 0.19736516D-01
+ 0.18000000D+01 0.19000000D+01 0.57939326D+01 0.18612133D-01
+ 0.19000000D+01 0.20000000D+01 0.54271651D+01 0.18879834D-01
+ 0.20000000D+01 0.21000000D+01 0.50044108D+01 0.16227230D-01
+ 0.21000000D+01 0.22000000D+01 0.46406006D+01 0.16978685D-01
+ 0.22000000D+01 0.23000000D+01 0.42337262D+01 0.16371496D-01
+ 0.23000000D+01 0.24000000D+01 0.38977258D+01 0.15076835D-01
+ 0.24000000D+01 0.25000000D+01 0.34728699D+01 0.13894044D-01
+ 0.25000000D+01 0.26000000D+01 0.31018307D+01 0.16306688D-01
+ 0.26000000D+01 0.27000000D+01 0.27493212D+01 0.11583473D-01
+ 0.27000000D+01 0.28000000D+01 0.24191717D+01 0.10701689D-01
+ 0.28000000D+01 0.29000000D+01 0.21248540D+01 0.97614956D-02
+ 0.29000000D+01 0.30000000D+01 0.18016989D+01 0.10839328D-01
+ 0.30000000D+01 0.31000000D+01 0.15333386D+01 0.88880998D-02
+ 0.31000000D+01 0.32000000D+01 0.12735362D+01 0.76772856D-02
+ 0.32000000D+01 0.33000000D+01 0.10496758D+01 0.84085225D-02
+ 0.33000000D+01 0.34000000D+01 0.84212001D+00 0.58739946D-02
+ 0.34000000D+01 0.35000000D+01 0.64494099D+00 0.49211556D-02
+ 0.35000000D+01 0.36000000D+01 0.49249024D+00 0.60774794D-02
+ 0.36000000D+01 0.37000000D+01 0.35792737D+00 0.33263287D-02
+ 0.37000000D+01 0.38000000D+01 0.24832445D+00 0.65171354D-02
+ 0.38000000D+01 0.39000000D+01 0.16852192D+00 0.14557785D-02
+ 0.39000000D+01 0.40000000D+01 0.10503295D+00 0.16808161D-02
+ 0.40000000D+01 0.41000000D+01 0.58485071D-01 0.57883776D-03
+ 0.41000000D+01 0.42000000D+01 0.29970168D-01 0.28518225D-03
+ 0.42000000D+01 0.43000000D+01 0.12823898D-01 0.15930789D-03
+ 0.43000000D+01 0.44000000D+01 0.45511517D-02 0.55184140D-04
+ 0.44000000D+01 0.45000000D+01 0.11669527D-02 0.19362282D-04
+ 0.45000000D+01 0.46000000D+01 0.14058140D-03 0.54362650D-05
+ 0.46000000D+01 0.47000000D+01 0.11234907D-05 0.49411433D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 -.17087794D+01 0.58503009D-02
+ 0.30000000D+01 0.60000000D+01 0.41808205D+00 0.28610582D-02
+ 0.60000000D+01 0.90000000D+01 0.18821792D+01 0.21275584D-02
+ 0.90000000D+01 0.12000000D+02 0.17015003D+01 0.16101622D-02
+ 0.12000000D+02 0.15000000D+02 0.14175126D+01 0.15909255D-02
+ 0.15000000D+02 0.18000000D+02 0.11822904D+01 0.15591334D-02
+ 0.18000000D+02 0.21000000D+02 0.99180073D+00 0.14188082D-02
+ 0.21000000D+02 0.24000000D+02 0.84882318D+00 0.13845095D-02
+ 0.24000000D+02 0.27000000D+02 0.72819099D+00 0.14777486D-02
+ 0.27000000D+02 0.30000000D+02 0.63611568D+00 0.13708239D-02
+ 0.30000000D+02 0.33000000D+02 0.55671635D+00 0.97135508D-03
+ 0.33000000D+02 0.36000000D+02 0.49379125D+00 0.91113681D-03
+ 0.36000000D+02 0.39000000D+02 0.43807486D+00 0.10498038D-02
+ 0.39000000D+02 0.42000000D+02 0.39352148D+00 0.10564187D-02
+ 0.42000000D+02 0.45000000D+02 0.35296733D+00 0.10154178D-02
+ 0.45000000D+02 0.48000000D+02 0.31891173D+00 0.96469367D-03
+ 0.48000000D+02 0.51000000D+02 0.28915453D+00 0.65531216D-03
+ 0.51000000D+02 0.54000000D+02 0.26405283D+00 0.58949914D-03
+ 0.54000000D+02 0.57000000D+02 0.24030371D+00 0.71871701D-03
+ 0.57000000D+02 0.60000000D+02 0.22003838D+00 0.88169945D-03
+ 0.60000000D+02 0.63000000D+02 0.20147625D+00 0.81072362D-03
+ 0.63000000D+02 0.66000000D+02 0.18540609D+00 0.58154927D-03
+ 0.66000000D+02 0.69000000D+02 0.17274388D+00 0.12890303D-02
+ 0.69000000D+02 0.72000000D+02 0.15560191D+00 0.12655724D-02
+ 0.72000000D+02 0.75000000D+02 0.14579140D+00 0.53030778D-03
+ 0.75000000D+02 0.78000000D+02 0.13482411D+00 0.51444157D-03
+ 0.78000000D+02 0.81000000D+02 0.12506630D+00 0.67657329D-03
+ 0.81000000D+02 0.84000000D+02 0.11535959D+00 0.70464371D-03
+ 0.84000000D+02 0.87000000D+02 0.10761133D+00 0.45115037D-03
+ 0.87000000D+02 0.90000000D+02 0.10026882D+00 0.56060389D-03
+ 0.90000000D+02 0.93000000D+02 0.93459453D-01 0.54799881D-03
+ 0.93000000D+02 0.96000000D+02 0.87053539D-01 0.34368053D-03
+ 0.96000000D+02 0.99000000D+02 0.80957754D-01 0.34485386D-03
+ 0.99000000D+02 0.10200000D+03 0.75773471D-01 0.37751412D-03
+ 0.10200000D+03 0.10500000D+03 0.71159073D-01 0.51151355D-03
+ 0.10500000D+03 0.10800000D+03 0.66349409D-01 0.47880728D-03
+ 0.10800000D+03 0.11100000D+03 0.62494112D-01 0.33692305D-03
+ 0.11100000D+03 0.11400000D+03 0.57853276D-01 0.31509350D-03
+ 0.11400000D+03 0.11700000D+03 0.54735117D-01 0.37998142D-03
+ 0.11700000D+03 0.12000000D+03 0.50919811D-01 0.45718887D-03
+ 0.12000000D+03 0.12300000D+03 0.48146238D-01 0.32609959D-03
+ 0.12300000D+03 0.12600000D+03 0.45686603D-01 0.33707419D-03
+ 0.12600000D+03 0.12900000D+03 0.42372072D-01 0.36046452D-03
+ 0.12900000D+03 0.13200000D+03 0.40570180D-01 0.33842795D-03
+ 0.13200000D+03 0.13500000D+03 0.38041409D-01 0.30885934D-03
+ 0.13500000D+03 0.13800000D+03 0.35571762D-01 0.33052017D-03
+ 0.13800000D+03 0.14100000D+03 0.33929980D-01 0.32044407D-03
+ 0.14100000D+03 0.14400000D+03 0.31945601D-01 0.17003231D-03
+ 0.14400000D+03 0.14700000D+03 0.29718504D-01 0.20986228D-03
+ 0.14700000D+03 0.15000000D+03 0.28701340D-01 0.23629589D-03
+ 0.15000000D+03 0.15300000D+03 0.26727139D-01 0.22572540D-03
+ 0.15300000D+03 0.15600000D+03 0.25148352D-01 0.35985152D-03
+ 0.15600000D+03 0.15900000D+03 0.24513189D-01 0.33936719D-03
+ 0.15900000D+03 0.16200000D+03 0.23206466D-01 0.24498101D-03
+ 0.16200000D+03 0.16500000D+03 0.21073005D-01 0.28137551D-03
+ 0.16500000D+03 0.16800000D+03 0.20395010D-01 0.23264966D-03
+ 0.16800000D+03 0.17100000D+03 0.19492658D-01 0.27332323D-03
+ 0.17100000D+03 0.17400000D+03 0.18787310D-01 0.55301104D-03
+ 0.17400000D+03 0.17700000D+03 0.16695558D-01 0.51791296D-03
+ 0.17700000D+03 0.18000000D+03 0.16690043D-01 0.19797326D-03
+ 0.18000000D+03 0.18300000D+03 0.14914074D-01 0.46416724D-03
+ 0.18300000D+03 0.18600000D+03 0.15507385D-01 0.44446096D-03
+ 0.18600000D+03 0.18900000D+03 0.14079896D-01 0.19755406D-03
+ 0.18900000D+03 0.19200000D+03 0.13193346D-01 0.18918316D-03
+ 0.19200000D+03 0.19500000D+03 0.12828272D-01 0.12792181D-03
+ 0.19500000D+03 0.19800000D+03 0.11724956D-01 0.24566543D-03
+ 0.19800000D+03 0.20100000D+03 0.11691476D-01 0.24715860D-03
+ 0.20100000D+03 0.20400000D+03 0.10836512D-01 0.15177276D-03
+ 0.20400000D+03 0.20700000D+03 0.10325332D-01 0.14115142D-03
+ 0.20700000D+03 0.21000000D+03 0.99907740D-02 0.14398794D-03
+ 0.21000000D+03 0.21300000D+03 0.92648154D-02 0.13993169D-03
+ 0.21300000D+03 0.21600000D+03 0.89740263D-02 0.12757365D-03
+ 0.21600000D+03 0.21900000D+03 0.84050224D-02 0.12091498D-03
+ 0.21900000D+03 0.22200000D+03 0.80448102D-02 0.10906312D-03
+ 0.22200000D+03 0.22500000D+03 0.79205711D-02 0.18763509D-03
+ 0.22500000D+03 0.22800000D+03 0.71173302D-02 0.30361072D-03
+ 0.22800000D+03 0.23100000D+03 0.68342214D-02 0.26071984D-03
+ 0.23100000D+03 0.23400000D+03 0.66678949D-02 0.94542585D-04
+ 0.23400000D+03 0.23700000D+03 0.61186169D-02 0.10855397D-03
+ 0.23700000D+03 0.24000000D+03 0.63113201D-02 0.27140799D-03
+ 0.24000000D+03 0.24300000D+03 0.53817605D-02 0.27235668D-03
+ 0.24300000D+03 0.24600000D+03 0.54994862D-02 0.99865703D-04
+ 0.24600000D+03 0.24900000D+03 0.49994527D-02 0.94977591D-04
+ 0.24900000D+03 0.25200000D+03 0.51172041D-02 0.11215360D-03
+ 0.25200000D+03 0.25500000D+03 0.46227865D-02 0.92731999D-04
+ 0.25500000D+03 0.25800000D+03 0.46858352D-02 0.15647682D-03
+ 0.25800000D+03 0.26100000D+03 0.39348408D-02 0.18905291D-03
+ 0.26100000D+03 0.26400000D+03 0.44010171D-02 0.19256116D-03
+ 0.26400000D+03 0.26700000D+03 0.36226892D-02 0.17553473D-03
+ 0.26700000D+03 0.27000000D+03 0.36734441D-02 0.10450886D-03
+ 0.27000000D+03 0.27300000D+03 0.35750963D-02 0.80040565D-04
+ 0.27300000D+03 0.27600000D+03 0.32711844D-02 0.22327385D-03
+ 0.27600000D+03 0.27900000D+03 0.32324154D-02 0.21898538D-03
+ 0.27900000D+03 0.28200000D+03 0.31156992D-02 0.60886211D-04
+ 0.28200000D+03 0.28500000D+03 0.29023247D-02 0.72451742D-04
+ 0.28500000D+03 0.28800000D+03 0.28323707D-02 0.83441358D-04
+ 0.28800000D+03 0.29100000D+03 0.26860212D-02 0.64416561D-04
+ 0.29100000D+03 0.29400000D+03 0.24496189D-02 0.52730397D-04
+ 0.29400000D+03 0.29700000D+03 0.25748914D-02 0.66042273D-04
+ 0.29700000D+03 0.30000000D+03 0.21056468D-02 0.89077093D-04
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 -.17060866D+01 0.58495069D-02
+ 0.30000000D+01 0.60000000D+01 0.41692587D+00 0.28576266D-02
+ 0.60000000D+01 0.90000000D+01 0.18753357D+01 0.21204914D-02
+ 0.90000000D+01 0.12000000D+02 0.16895956D+01 0.15993565D-02
+ 0.12000000D+02 0.15000000D+02 0.14012191D+01 0.15714998D-02
+ 0.15000000D+02 0.18000000D+02 0.11621025D+01 0.15334544D-02
+ 0.18000000D+02 0.21000000D+02 0.96830041D+00 0.13844513D-02
+ 0.21000000D+02 0.24000000D+02 0.82224493D+00 0.13417722D-02
+ 0.24000000D+02 0.27000000D+02 0.69915382D+00 0.14168654D-02
+ 0.27000000D+02 0.30000000D+02 0.60473116D+00 0.13060073D-02
+ 0.30000000D+02 0.33000000D+02 0.52351349D+00 0.91365169D-03
+ 0.33000000D+02 0.36000000D+02 0.45887508D+00 0.84684020D-03
+ 0.36000000D+02 0.39000000D+02 0.40193605D+00 0.96131389D-03
+ 0.39000000D+02 0.42000000D+02 0.35616373D+00 0.95769293D-03
+ 0.42000000D+02 0.45000000D+02 0.31486399D+00 0.90444130D-03
+ 0.45000000D+02 0.48000000D+02 0.28017146D+00 0.84974317D-03
+ 0.48000000D+02 0.51000000D+02 0.24998834D+00 0.56806562D-03
+ 0.51000000D+02 0.54000000D+02 0.22448544D+00 0.50024753D-03
+ 0.54000000D+02 0.57000000D+02 0.20075556D+00 0.59934168D-03
+ 0.57000000D+02 0.60000000D+02 0.18052830D+00 0.72181733D-03
+ 0.60000000D+02 0.63000000D+02 0.16223274D+00 0.65545675D-03
+ 0.63000000D+02 0.66000000D+02 0.14644494D+00 0.45959630D-03
+ 0.66000000D+02 0.69000000D+02 0.13375247D+00 0.99015596D-03
+ 0.69000000D+02 0.72000000D+02 0.11805612D+00 0.96866848D-03
+ 0.72000000D+02 0.75000000D+02 0.10835103D+00 0.39253598D-03
+ 0.75000000D+02 0.78000000D+02 0.98098916D-01 0.37610838D-03
+ 0.78000000D+02 0.81000000D+02 0.89058437D-01 0.47813504D-03
+ 0.81000000D+02 0.84000000D+02 0.80365429D-01 0.49383051D-03
+ 0.84000000D+02 0.87000000D+02 0.73325535D-01 0.30763154D-03
+ 0.87000000D+02 0.90000000D+02 0.66802154D-01 0.37174103D-03
+ 0.90000000D+02 0.93000000D+02 0.60861994D-01 0.35850546D-03
+ 0.93000000D+02 0.96000000D+02 0.55401047D-01 0.21957722D-03
+ 0.96000000D+02 0.99000000D+02 0.50341053D-01 0.21352240D-03
+ 0.99000000D+02 0.10200000D+03 0.46031715D-01 0.22974021D-03
+ 0.10200000D+03 0.10500000D+03 0.42222189D-01 0.30162240D-03
+ 0.10500000D+03 0.10800000D+03 0.38447785D-01 0.27971678D-03
+ 0.10800000D+03 0.11100000D+03 0.35360619D-01 0.18981080D-03
+ 0.11100000D+03 0.11400000D+03 0.31964682D-01 0.17525602D-03
+ 0.11400000D+03 0.11700000D+03 0.29528851D-01 0.20326053D-03
+ 0.11700000D+03 0.12000000D+03 0.26822491D-01 0.24135709D-03
+ 0.12000000D+03 0.12300000D+03 0.24762636D-01 0.16879536D-03
+ 0.12300000D+03 0.12600000D+03 0.22940601D-01 0.16806252D-03
+ 0.12600000D+03 0.12900000D+03 0.20773053D-01 0.17746707D-03
+ 0.12900000D+03 0.13200000D+03 0.19417785D-01 0.16137374D-03
+ 0.13200000D+03 0.13500000D+03 0.17773974D-01 0.14521804D-03
+ 0.13500000D+03 0.13800000D+03 0.16226846D-01 0.14976321D-03
+ 0.13800000D+03 0.14100000D+03 0.15112004D-01 0.14391710D-03
+ 0.14100000D+03 0.14400000D+03 0.13891229D-01 0.73948475D-04
+ 0.14400000D+03 0.14700000D+03 0.12621651D-01 0.88775793D-04
+ 0.14700000D+03 0.15000000D+03 0.11904879D-01 0.98082659D-04
+ 0.15000000D+03 0.15300000D+03 0.10827156D-01 0.91463243D-04
+ 0.15300000D+03 0.15600000D+03 0.99524647D-02 0.14135045D-03
+ 0.15600000D+03 0.15900000D+03 0.94766103D-02 0.13241693D-03
+ 0.15900000D+03 0.16200000D+03 0.87603074D-02 0.91832611D-04
+ 0.16200000D+03 0.16500000D+03 0.77732621D-02 0.10410194D-03
+ 0.16500000D+03 0.16800000D+03 0.73524920D-02 0.83944127D-04
+ 0.16800000D+03 0.17100000D+03 0.68666484D-02 0.95930900D-04
+ 0.17100000D+03 0.17400000D+03 0.64664251D-02 0.18897356D-03
+ 0.17400000D+03 0.17700000D+03 0.56184350D-02 0.17611567D-03
+ 0.17700000D+03 0.18000000D+03 0.54923195D-02 0.64813036D-04
+ 0.18000000D+03 0.18300000D+03 0.48004803D-02 0.14811795D-03
+ 0.18300000D+03 0.18600000D+03 0.48809931D-02 0.14121228D-03
+ 0.18600000D+03 0.18900000D+03 0.43320664D-02 0.60447939D-04
+ 0.18900000D+03 0.19200000D+03 0.39709386D-02 0.57340521D-04
+ 0.19200000D+03 0.19500000D+03 0.37775178D-02 0.37552713D-04
+ 0.19500000D+03 0.19800000D+03 0.33789923D-02 0.70283015D-04
+ 0.19800000D+03 0.20100000D+03 0.32970649D-02 0.70160707D-04
+ 0.20100000D+03 0.20400000D+03 0.29904362D-02 0.41866917D-04
+ 0.20400000D+03 0.20700000D+03 0.27895313D-02 0.38210164D-04
+ 0.20700000D+03 0.21000000D+03 0.26419647D-02 0.37975442D-04
+ 0.21000000D+03 0.21300000D+03 0.23985771D-02 0.36339892D-04
+ 0.21300000D+03 0.21600000D+03 0.22749382D-02 0.32288723D-04
+ 0.21600000D+03 0.21900000D+03 0.20870051D-02 0.30108874D-04
+ 0.21900000D+03 0.22200000D+03 0.19570091D-02 0.26491341D-04
+ 0.22200000D+03 0.22500000D+03 0.18868244D-02 0.44436821D-04
+ 0.22500000D+03 0.22800000D+03 0.16607293D-02 0.70609426D-04
+ 0.22800000D+03 0.23100000D+03 0.15633284D-02 0.60184203D-04
+ 0.23100000D+03 0.23400000D+03 0.14951306D-02 0.21174321D-04
+ 0.23400000D+03 0.23700000D+03 0.13450600D-02 0.23827562D-04
+ 0.23700000D+03 0.24000000D+03 0.13597277D-02 0.58021806D-04
+ 0.24000000D+03 0.24300000D+03 0.11368060D-02 0.58005765D-04
+ 0.24300000D+03 0.24600000D+03 0.11393681D-02 0.20768511D-04
+ 0.24600000D+03 0.24900000D+03 0.10163486D-02 0.19247416D-04
+ 0.24900000D+03 0.25200000D+03 0.10204029D-02 0.22350075D-04
+ 0.25200000D+03 0.25500000D+03 0.90408740D-03 0.18229530D-04
+ 0.25500000D+03 0.25800000D+03 0.89911616D-03 0.29796163D-04
+ 0.25800000D+03 0.26100000D+03 0.74103917D-03 0.35693029D-04
+ 0.26100000D+03 0.26400000D+03 0.81343754D-03 0.35501178D-04
+ 0.26400000D+03 0.26700000D+03 0.65713619D-03 0.32010678D-04
+ 0.26700000D+03 0.27000000D+03 0.65452240D-03 0.18640988D-04
+ 0.27000000D+03 0.27300000D+03 0.62550308D-03 0.13962211D-04
+ 0.27300000D+03 0.27600000D+03 0.56210840D-03 0.38067731D-04
+ 0.27600000D+03 0.27900000D+03 0.54544296D-03 0.37237085D-04
+ 0.27900000D+03 0.28200000D+03 0.51638583D-03 0.10113699D-04
+ 0.28200000D+03 0.28500000D+03 0.47251629D-03 0.11742712D-04
+ 0.28500000D+03 0.28800000D+03 0.45293072D-03 0.13363035D-04
+ 0.28800000D+03 0.29100000D+03 0.42207141D-03 0.10158460D-04
+ 0.29100000D+03 0.29400000D+03 0.37836839D-03 0.81348292D-05
+ 0.29400000D+03 0.29700000D+03 0.39071264D-03 0.10000566D-04
+ 0.29700000D+03 0.30000000D+03 0.31421874D-03 0.13258011D-04
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.48165879D+01 0.84035272D-03
+ 0.12500000D+03 0.13000000D+03 -.12541957D+02 0.39108197D-02
+ 0.13000000D+03 0.13500000D+03 0.39573993D+01 0.27367360D-02
+ 0.13500000D+03 0.14000000D+03 0.25022479D+01 0.22640739D-02
+ 0.14000000D+03 0.14500000D+03 0.16972753D+01 0.20370571D-02
+ 0.14500000D+03 0.15000000D+03 0.12302253D+01 0.15177375D-02
+ 0.15000000D+03 0.15500000D+03 0.93606684D+00 0.14487105D-02
+ 0.15500000D+03 0.16000000D+03 0.73974843D+00 0.13063534D-02
+ 0.16000000D+03 0.16500000D+03 0.59974352D+00 0.11806515D-02
+ 0.16500000D+03 0.17000000D+03 0.49707226D+00 0.11848567D-02
+ 0.17000000D+03 0.17500000D+03 0.42057446D+00 0.10044809D-02
+ 0.17500000D+03 0.18000000D+03 0.35732229D+00 0.84155141D-03
+ 0.18000000D+03 0.18500000D+03 0.31100410D+00 0.79118177D-03
+ 0.18500000D+03 0.19000000D+03 0.26743211D+00 0.11931778D-02
+ 0.19000000D+03 0.19500000D+03 0.23842276D+00 0.12557606D-02
+ 0.19500000D+03 0.20000000D+03 0.21180841D+00 0.75358912D-03
+ 0.20000000D+03 0.20500000D+03 0.18822525D+00 0.58761129D-03
+ 0.20500000D+03 0.21000000D+03 0.16791602D+00 0.66940253D-03
+ 0.21000000D+03 0.21500000D+03 0.15202212D+00 0.66973905D-03
+ 0.21500000D+03 0.22000000D+03 0.13631405D+00 0.62054316D-03
+ 0.22000000D+03 0.22500000D+03 0.12574056D+00 0.56531898D-03
+ 0.22500000D+03 0.23000000D+03 0.11182987D+00 0.73900028D-03
+ 0.23000000D+03 0.23500000D+03 0.10384026D+00 0.89650756D-03
+ 0.23500000D+03 0.24000000D+03 0.95567652D-01 0.68995142D-03
+ 0.24000000D+03 0.24500000D+03 0.85732487D-01 0.89972519D-03
+ 0.24500000D+03 0.25000000D+03 0.82016691D-01 0.12818049D-02
+ 0.25000000D+03 0.25500000D+03 0.74571047D-01 0.10211836D-02
+ 0.25500000D+03 0.26000000D+03 0.69502144D-01 0.45248154D-03
+ 0.26000000D+03 0.26500000D+03 0.62821205D-01 0.58374621D-03
+ 0.26500000D+03 0.27000000D+03 0.60286508D-01 0.56410117D-03
+ 0.27000000D+03 0.27500000D+03 0.55741014D-01 0.39022922D-03
+ 0.27500000D+03 0.28000000D+03 0.51639189D-01 0.33507809D-03
+ 0.28000000D+03 0.28500000D+03 0.47992296D-01 0.31740062D-03
+ 0.28500000D+03 0.29000000D+03 0.44960303D-01 0.34667493D-03
+ 0.29000000D+03 0.29500000D+03 0.42271802D-01 0.35521598D-03
+ 0.29500000D+03 0.30000000D+03 0.39276262D-01 0.36624797D-03
+ 0.30000000D+03 0.30500000D+03 0.37256505D-01 0.45432112D-03
+ 0.30500000D+03 0.31000000D+03 0.35422213D-01 0.39889154D-03
+ 0.31000000D+03 0.31500000D+03 0.32692474D-01 0.26865569D-03
+ 0.31500000D+03 0.32000000D+03 0.30690537D-01 0.46185938D-03
+ 0.32000000D+03 0.32500000D+03 0.29749867D-01 0.46966079D-03
+ 0.32500000D+03 0.33000000D+03 0.27417803D-01 0.32426135D-03
+ 0.33000000D+03 0.33500000D+03 0.26345888D-01 0.29501411D-03
+ 0.33500000D+03 0.34000000D+03 0.24779676D-01 0.22593184D-03
+ 0.34000000D+03 0.34500000D+03 0.23284033D-01 0.23717849D-03
+ 0.34500000D+03 0.35000000D+03 0.21660174D-01 0.39715661D-03
+ 0.35000000D+03 0.35500000D+03 0.21249144D-01 0.58372351D-03
+ 0.35500000D+03 0.36000000D+03 0.20411942D-01 0.48895238D-03
+ 0.36000000D+03 0.36500000D+03 0.18738229D-01 0.30247732D-03
+ 0.36500000D+03 0.37000000D+03 0.18149567D-01 0.34191032D-03
+ 0.37000000D+03 0.37500000D+03 0.16916464D-01 0.36145396D-03
+ 0.37500000D+03 0.38000000D+03 0.16685266D-01 0.30678276D-03
+ 0.38000000D+03 0.38500000D+03 0.15191103D-01 0.25557571D-03
+ 0.38500000D+03 0.39000000D+03 0.14544870D-01 0.42006612D-03
+ 0.39000000D+03 0.39500000D+03 0.13115374D-01 0.13090377D-02
+ 0.39500000D+03 0.40000000D+03 0.14358294D-01 0.12742027D-02
+ 0.40000000D+03 0.40500000D+03 0.12875395D-01 0.27703979D-03
+ 0.40500000D+03 0.41000000D+03 0.12242246D-01 0.34134897D-03
+ 0.41000000D+03 0.41500000D+03 0.11899374D-01 0.29043989D-03
+ 0.41500000D+03 0.42000000D+03 0.10918093D-01 0.14045379D-03
+ 0.42000000D+03 0.42500000D+03 0.10697773D-01 0.16071602D-03
+ 0.42500000D+03 0.43000000D+03 0.98949920D-02 0.32749343D-03
+ 0.43000000D+03 0.43500000D+03 0.99951702D-02 0.38126427D-03
+ 0.43500000D+03 0.44000000D+03 0.92183665D-02 0.26543026D-03
+ 0.44000000D+03 0.44500000D+03 0.87110000D-02 0.23666600D-03
+ 0.44500000D+03 0.45000000D+03 0.85119630D-02 0.26324504D-03
+ 0.45000000D+03 0.45500000D+03 0.82933062D-02 0.20596641D-03
+ 0.45500000D+03 0.46000000D+03 0.79347869D-02 0.14489191D-03
+ 0.46000000D+03 0.46500000D+03 0.70841042D-02 0.22876559D-03
+ 0.46500000D+03 0.47000000D+03 0.74065225D-02 0.23343365D-03
+ 0.47000000D+03 0.47500000D+03 0.64311455D-02 0.43030464D-03
+ 0.47500000D+03 0.48000000D+03 0.69634229D-02 0.42996321D-03
+ 0.48000000D+03 0.48500000D+03 0.60781486D-02 0.21322185D-03
+ 0.48500000D+03 0.49000000D+03 0.62594188D-02 0.20964731D-03
+ 0.49000000D+03 0.49500000D+03 0.58350544D-02 0.14374602D-03
+ 0.49500000D+03 0.50000000D+03 0.57862797D-02 0.11618251D-03
+ 0.50000000D+03 0.50500000D+03 0.51832297D-02 0.10894038D-03
+ 0.50500000D+03 0.51000000D+03 0.53092683D-02 0.10560568D-03
+ 0.51000000D+03 0.51500000D+03 0.49480007D-02 0.85247490D-04
+ 0.51500000D+03 0.52000000D+03 0.44393000D-02 0.15188593D-03
+ 0.52000000D+03 0.52500000D+03 0.48408772D-02 0.15326295D-03
+ 0.52500000D+03 0.53000000D+03 0.43399665D-02 0.10395727D-03
+ 0.53000000D+03 0.53500000D+03 0.41695689D-02 0.11392313D-03
+ 0.53500000D+03 0.54000000D+03 0.41540881D-02 0.10119871D-03
+ 0.54000000D+03 0.54500000D+03 0.39500083D-02 0.83754728D-04
+ 0.54500000D+03 0.55000000D+03 0.34493129D-02 0.21996310D-03
+ 0.55000000D+03 0.55500000D+03 0.39556671D-02 0.22054481D-03
+ 0.55500000D+03 0.56000000D+03 0.30630152D-02 0.31459067D-03
+ 0.56000000D+03 0.56500000D+03 0.36484968D-02 0.32143310D-03
+ 0.56500000D+03 0.57000000D+03 0.33648920D-02 0.10846297D-03
+ 0.57000000D+03 0.57500000D+03 0.30789246D-02 0.97238280D-04
+ 0.57500000D+03 0.58000000D+03 0.30603505D-02 0.11073764D-03
+ 0.58000000D+03 0.58500000D+03 0.29464830D-02 0.10798396D-03
+ 0.58500000D+03 0.59000000D+03 0.27939407D-02 0.89704739D-04
+ 0.59000000D+03 0.59500000D+03 0.28054874D-02 0.63721059D-04
+ 0.59500000D+03 0.60000000D+03 0.25882373D-02 0.56978916D-04
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.48165879D+01 0.84035272D-03
+ 0.12500000D+03 0.13000000D+03 -.12542175D+02 0.39087471D-02
+ 0.13000000D+03 0.13500000D+03 0.39433833D+01 0.27281005D-02
+ 0.13500000D+03 0.14000000D+03 0.24778500D+01 0.22401552D-02
+ 0.14000000D+03 0.14500000D+03 0.16649792D+01 0.20011833D-02
+ 0.14500000D+03 0.15000000D+03 0.11918836D+01 0.14707011D-02
+ 0.15000000D+03 0.15500000D+03 0.89306841D+00 0.13812756D-02
+ 0.15500000D+03 0.16000000D+03 0.69308970D+00 0.12260591D-02
+ 0.16000000D+03 0.16500000D+03 0.55037222D+00 0.10823929D-02
+ 0.16500000D+03 0.17000000D+03 0.44569013D+00 0.10623289D-02
+ 0.17000000D+03 0.17500000D+03 0.36760138D+00 0.88164065D-03
+ 0.17500000D+03 0.18000000D+03 0.30381547D+00 0.71452860D-03
+ 0.18000000D+03 0.18500000D+03 0.25674126D+00 0.65530822D-03
+ 0.18500000D+03 0.19000000D+03 0.21400856D+00 0.94451431D-03
+ 0.19000000D+03 0.19500000D+03 0.18467723D+00 0.98037166D-03
+ 0.19500000D+03 0.20000000D+03 0.15853847D+00 0.56764479D-03
+ 0.20000000D+03 0.20500000D+03 0.13598650D+00 0.42445418D-03
+ 0.20500000D+03 0.21000000D+03 0.11698408D+00 0.46438938D-03
+ 0.21000000D+03 0.21500000D+03 0.10204006D+00 0.45135281D-03
+ 0.21500000D+03 0.22000000D+03 0.88102327D-01 0.40042912D-03
+ 0.22000000D+03 0.22500000D+03 0.78187285D-01 0.35341553D-03
+ 0.22500000D+03 0.23000000D+03 0.66879501D-01 0.43715981D-03
+ 0.23000000D+03 0.23500000D+03 0.59722531D-01 0.51608428D-03
+ 0.23500000D+03 0.24000000D+03 0.52822101D-01 0.38551832D-03
+ 0.24000000D+03 0.24500000D+03 0.45547353D-01 0.47076292D-03
+ 0.24500000D+03 0.25000000D+03 0.41868069D-01 0.65215942D-03
+ 0.25000000D+03 0.25500000D+03 0.36562723D-01 0.50837368D-03
+ 0.25500000D+03 0.26000000D+03 0.32736206D-01 0.21310292D-03
+ 0.26000000D+03 0.26500000D+03 0.28436939D-01 0.26216853D-03
+ 0.26500000D+03 0.27000000D+03 0.26226488D-01 0.24782729D-03
+ 0.27000000D+03 0.27500000D+03 0.23300638D-01 0.16329507D-03
+ 0.27500000D+03 0.28000000D+03 0.20747992D-01 0.13532441D-03
+ 0.28000000D+03 0.28500000D+03 0.18547068D-01 0.12246422D-03
+ 0.28500000D+03 0.29000000D+03 0.16716076D-01 0.12876918D-03
+ 0.29000000D+03 0.29500000D+03 0.15121902D-01 0.12717881D-03
+ 0.29500000D+03 0.30000000D+03 0.13526574D-01 0.12587858D-03
+ 0.30000000D+03 0.30500000D+03 0.12357536D-01 0.14997782D-03
+ 0.30500000D+03 0.31000000D+03 0.11313126D-01 0.12880118D-03
+ 0.31000000D+03 0.31500000D+03 0.10058066D-01 0.82573928D-04
+ 0.31500000D+03 0.32000000D+03 0.91055734D-02 0.13544713D-03
+ 0.32000000D+03 0.32500000D+03 0.85120504D-02 0.13575684D-03
+ 0.32500000D+03 0.33000000D+03 0.75669409D-02 0.89301218D-04
+ 0.33000000D+03 0.33500000D+03 0.70169925D-02 0.79072746D-04
+ 0.33500000D+03 0.34000000D+03 0.63703030D-02 0.58175743D-04
+ 0.34000000D+03 0.34500000D+03 0.57822464D-02 0.58753898D-04
+ 0.34500000D+03 0.35000000D+03 0.51997454D-02 0.94338552D-04
+ 0.35000000D+03 0.35500000D+03 0.49312972D-02 0.13481565D-03
+ 0.35500000D+03 0.36000000D+03 0.45787742D-02 0.11107445D-03
+ 0.36000000D+03 0.36500000D+03 0.40653282D-02 0.65211238D-04
+ 0.36500000D+03 0.37000000D+03 0.38105951D-02 0.71944480D-04
+ 0.37000000D+03 0.37500000D+03 0.34391632D-02 0.73204326D-04
+ 0.37500000D+03 0.38000000D+03 0.32843989D-02 0.61072838D-04
+ 0.38000000D+03 0.38500000D+03 0.28968450D-02 0.48317418D-04
+ 0.38500000D+03 0.39000000D+03 0.26901034D-02 0.77176513D-04
+ 0.39000000D+03 0.39500000D+03 0.23547087D-02 0.23157237D-03
+ 0.39500000D+03 0.40000000D+03 0.25002004D-02 0.22474791D-03
+ 0.40000000D+03 0.40500000D+03 0.21732370D-02 0.46702662D-04
+ 0.40500000D+03 0.41000000D+03 0.20051349D-02 0.55637433D-04
+ 0.41000000D+03 0.41500000D+03 0.18918406D-02 0.46722774D-04
+ 0.41500000D+03 0.42000000D+03 0.16859238D-02 0.21637546D-04
+ 0.42000000D+03 0.42500000D+03 0.16054473D-02 0.24085328D-04
+ 0.42500000D+03 0.43000000D+03 0.14439199D-02 0.47278651D-04
+ 0.43000000D+03 0.43500000D+03 0.14182166D-02 0.54283054D-04
+ 0.43500000D+03 0.44000000D+03 0.12716828D-02 0.36861788D-04
+ 0.44000000D+03 0.44500000D+03 0.11697001D-02 0.31621959D-04
+ 0.44500000D+03 0.45000000D+03 0.11122379D-02 0.34423963D-04
+ 0.45000000D+03 0.45500000D+03 0.10547089D-02 0.26373126D-04
+ 0.45500000D+03 0.46000000D+03 0.98240041D-03 0.17941286D-04
+ 0.46000000D+03 0.46500000D+03 0.85485823D-03 0.27385480D-04
+ 0.46500000D+03 0.47000000D+03 0.87093074D-03 0.27629790D-04
+ 0.47000000D+03 0.47500000D+03 0.73740077D-03 0.48769070D-04
+ 0.47500000D+03 0.48000000D+03 0.77861145D-03 0.48500035D-04
+ 0.48000000D+03 0.48500000D+03 0.66246462D-03 0.23101672D-04
+ 0.48500000D+03 0.49000000D+03 0.66562929D-03 0.22417135D-04
+ 0.49000000D+03 0.49500000D+03 0.60516532D-03 0.14922975D-04
+ 0.49500000D+03 0.50000000D+03 0.58562344D-03 0.11813133D-04
+ 0.50000000D+03 0.50500000D+03 0.51214295D-03 0.10720616D-04
+ 0.50500000D+03 0.51000000D+03 0.51210072D-03 0.10248350D-04
+ 0.51000000D+03 0.51500000D+03 0.46601773D-03 0.80154207D-05
+ 0.51500000D+03 0.52000000D+03 0.40877694D-03 0.13889655D-04
+ 0.52000000D+03 0.52500000D+03 0.43576758D-03 0.13872880D-04
+ 0.52500000D+03 0.53000000D+03 0.38171855D-03 0.91396208D-05
+ 0.53000000D+03 0.53500000D+03 0.35860661D-03 0.97866799D-05
+ 0.53500000D+03 0.54000000D+03 0.34928103D-03 0.85513216D-05
+ 0.54000000D+03 0.54500000D+03 0.32477238D-03 0.68825811D-05
+ 0.54500000D+03 0.55000000D+03 0.27780211D-03 0.17548412D-04
+ 0.55000000D+03 0.55500000D+03 0.31176266D-03 0.17524800D-04
+ 0.55500000D+03 0.56000000D+03 0.23634347D-03 0.24019039D-04
+ 0.56000000D+03 0.56500000D+03 0.27554694D-03 0.24474120D-04
+ 0.56500000D+03 0.57000000D+03 0.24867066D-03 0.80485389D-05
+ 0.57000000D+03 0.57500000D+03 0.22281463D-03 0.70191171D-05
+ 0.57500000D+03 0.58000000D+03 0.21695215D-03 0.78510348D-05
+ 0.58000000D+03 0.58500000D+03 0.20461503D-03 0.75044450D-05
+ 0.58500000D+03 0.59000000D+03 0.19012250D-03 0.61261307D-05
+ 0.59000000D+03 0.59500000D+03 0.18705551D-03 0.42652040D-05
+ 0.59500000D+03 0.60000000D+03 0.16912930D-03 0.37210221D-05
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 0.49511328D-01 0.59511333D-02
+ 0.30000000D+01 0.60000000D+01 -.71959354D-01 0.29818228D-02
+ 0.60000000D+01 0.90000000D+01 0.16500096D+01 0.22374975D-02
+ 0.90000000D+01 0.12000000D+02 0.15481357D+01 0.19032754D-02
+ 0.12000000D+02 0.15000000D+02 0.13096881D+01 0.19501335D-02
+ 0.15000000D+02 0.18000000D+02 0.10975650D+01 0.20716641D-02
+ 0.18000000D+02 0.21000000D+02 0.93079527D+00 0.20867247D-02
+ 0.21000000D+02 0.24000000D+02 0.78960577D+00 0.17731544D-02
+ 0.24000000D+02 0.27000000D+02 0.68507921D+00 0.18324947D-02
+ 0.27000000D+02 0.30000000D+02 0.59479783D+00 0.17918819D-02
+ 0.30000000D+02 0.33000000D+02 0.52229810D+00 0.12951786D-02
+ 0.33000000D+02 0.36000000D+02 0.46075060D+00 0.11963529D-02
+ 0.36000000D+02 0.39000000D+02 0.41248332D+00 0.11217342D-02
+ 0.39000000D+02 0.42000000D+02 0.36827812D+00 0.10059017D-02
+ 0.42000000D+02 0.45000000D+02 0.33153714D+00 0.11457423D-02
+ 0.45000000D+02 0.48000000D+02 0.29951945D+00 0.14791261D-02
+ 0.48000000D+02 0.51000000D+02 0.27053970D+00 0.13256992D-02
+ 0.51000000D+02 0.54000000D+02 0.24492386D+00 0.91708053D-03
+ 0.54000000D+02 0.57000000D+02 0.22626512D+00 0.89129996D-03
+ 0.57000000D+02 0.60000000D+02 0.20460046D+00 0.10155136D-02
+ 0.60000000D+02 0.63000000D+02 0.18746600D+00 0.10160368D-02
+ 0.63000000D+02 0.66000000D+02 0.17210005D+00 0.90009010D-03
+ 0.66000000D+02 0.69000000D+02 0.15854941D+00 0.94063587D-03
+ 0.69000000D+02 0.72000000D+02 0.14699445D+00 0.96231699D-03
+ 0.72000000D+02 0.75000000D+02 0.13443989D+00 0.91498916D-03
+ 0.75000000D+02 0.78000000D+02 0.12380317D+00 0.80653961D-03
+ 0.78000000D+02 0.81000000D+02 0.11497163D+00 0.80849133D-03
+ 0.81000000D+02 0.84000000D+02 0.10794259D+00 0.85304253D-03
+ 0.84000000D+02 0.87000000D+02 0.10363664D+00 0.31588886D-02
+ 0.87000000D+02 0.90000000D+02 0.88015270D-01 0.31378055D-02
+ 0.90000000D+02 0.93000000D+02 0.85329793D-01 0.66547821D-03
+ 0.93000000D+02 0.96000000D+02 0.80348414D-01 0.68220892D-03
+ 0.96000000D+02 0.99000000D+02 0.75182277D-01 0.65058157D-03
+ 0.99000000D+02 0.10200000D+03 0.68322602D-01 0.65124917D-03
+ 0.10200000D+03 0.10500000D+03 0.65105265D-01 0.77685950D-03
+ 0.10500000D+03 0.10800000D+03 0.61836267D-01 0.64885206D-03
+ 0.10800000D+03 0.11100000D+03 0.55846301D-01 0.54852986D-03
+ 0.11100000D+03 0.11400000D+03 0.53691907D-01 0.55964479D-03
+ 0.11400000D+03 0.11700000D+03 0.49941484D-01 0.46597916D-03
+ 0.11700000D+03 0.12000000D+03 0.47771258D-01 0.11668652D-02
+ 0.12000000D+03 0.12300000D+03 0.43838399D-01 0.11467876D-02
+ 0.12300000D+03 0.12600000D+03 0.41377550D-01 0.47612326D-03
+ 0.12600000D+03 0.12900000D+03 0.39080637D-01 0.49110546D-03
+ 0.12900000D+03 0.13200000D+03 0.35645159D-01 0.78584033D-03
+ 0.13200000D+03 0.13500000D+03 0.34755861D-01 0.79373074D-03
+ 0.13500000D+03 0.13800000D+03 0.33317368D-01 0.71895169D-03
+ 0.13800000D+03 0.14100000D+03 0.30230904D-01 0.68487636D-03
+ 0.14100000D+03 0.14400000D+03 0.28479494D-01 0.36382871D-03
+ 0.14400000D+03 0.14700000D+03 0.27713957D-01 0.51063075D-03
+ 0.14700000D+03 0.15000000D+03 0.25452101D-01 0.51355817D-03
+ 0.15000000D+03 0.15300000D+03 0.24113167D-01 0.48504020D-03
+ 0.15300000D+03 0.15600000D+03 0.23930853D-01 0.55189674D-03
+ 0.15600000D+03 0.15900000D+03 0.20739288D-01 0.69002560D-03
+ 0.15900000D+03 0.16200000D+03 0.19500587D-01 0.11242804D-02
+ 0.16200000D+03 0.16500000D+03 0.21223373D-01 0.10016891D-02
+ 0.16500000D+03 0.16800000D+03 0.18102508D-01 0.39935657D-03
+ 0.16800000D+03 0.17100000D+03 0.17880743D-01 0.44824519D-03
+ 0.17100000D+03 0.17400000D+03 0.15751029D-01 0.39633403D-03
+ 0.17400000D+03 0.17700000D+03 0.16758885D-01 0.36247690D-03
+ 0.17700000D+03 0.18000000D+03 0.13920629D-01 0.82252254D-03
+ 0.18000000D+03 0.18300000D+03 0.14990404D-01 0.85271713D-03
+ 0.18300000D+03 0.18600000D+03 0.13191817D-01 0.37780642D-03
+ 0.18600000D+03 0.18900000D+03 0.12560000D-01 0.26382407D-03
+ 0.18900000D+03 0.19200000D+03 0.12104594D-01 0.24131654D-03
+ 0.19200000D+03 0.19500000D+03 0.11317873D-01 0.22604529D-03
+ 0.19500000D+03 0.19800000D+03 0.10685900D-01 0.38457759D-03
+ 0.19800000D+03 0.20100000D+03 0.10377302D-01 0.37901670D-03
+ 0.20100000D+03 0.20400000D+03 0.99765834D-02 0.18169346D-03
+ 0.20400000D+03 0.20700000D+03 0.91574311D-02 0.18549404D-03
+ 0.20700000D+03 0.21000000D+03 0.90698794D-02 0.24074018D-03
+ 0.21000000D+03 0.21300000D+03 0.83335913D-02 0.29381666D-03
+ 0.21300000D+03 0.21600000D+03 0.75147802D-02 0.25000769D-03
+ 0.21600000D+03 0.21900000D+03 0.76251886D-02 0.18095892D-03
+ 0.21900000D+03 0.22200000D+03 0.71864210D-02 0.17108649D-03
+ 0.22200000D+03 0.22500000D+03 0.66056632D-02 0.19767548D-03
+ 0.22500000D+03 0.22800000D+03 0.66791903D-02 0.26934533D-03
+ 0.22800000D+03 0.23100000D+03 0.62346161D-02 0.23820461D-03
+ 0.23100000D+03 0.23400000D+03 0.60265473D-02 0.14284538D-03
+ 0.23400000D+03 0.23700000D+03 0.53758336D-02 0.15177835D-03
+ 0.23700000D+03 0.24000000D+03 0.52996497D-02 0.22135090D-03
+ 0.24000000D+03 0.24300000D+03 0.63000335D-02 0.12005499D-02
+ 0.24300000D+03 0.24600000D+03 0.35624745D-02 0.11916866D-02
+ 0.24600000D+03 0.24900000D+03 0.47251205D-02 0.16436822D-03
+ 0.24900000D+03 0.25200000D+03 0.43487845D-02 0.15534889D-03
+ 0.25200000D+03 0.25500000D+03 0.41245386D-02 0.16288329D-03
+ 0.25500000D+03 0.25800000D+03 0.37247220D-02 0.13926329D-03
+ 0.25800000D+03 0.26100000D+03 0.38143236D-02 0.16904555D-03
+ 0.26100000D+03 0.26400000D+03 0.36274847D-02 0.23534041D-03
+ 0.26400000D+03 0.26700000D+03 0.34877915D-02 0.22705616D-03
+ 0.26700000D+03 0.27000000D+03 0.29619320D-02 0.18430930D-03
+ 0.27000000D+03 0.27300000D+03 0.40542145D-02 0.76321698D-03
+ 0.27300000D+03 0.27600000D+03 0.17265763D-02 0.82365096D-03
+ 0.27600000D+03 0.27900000D+03 0.33124905D-02 0.34443339D-03
+ 0.27900000D+03 0.28200000D+03 0.21687873D-02 0.33841578D-03
+ 0.28200000D+03 0.28500000D+03 0.30270816D-02 0.33992052D-03
+ 0.28500000D+03 0.28800000D+03 0.23681562D-02 0.10328164D-03
+ 0.28800000D+03 0.29100000D+03 0.21471149D-02 0.90646524D-04
+ 0.29100000D+03 0.29400000D+03 0.24903534D-02 0.12836713D-03
+ 0.29400000D+03 0.29700000D+03 0.19737481D-02 0.14704635D-03
+ 0.29700000D+03 0.30000000D+03 0.19313666D-02 0.13667084D-03
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 0.52656149D-01 0.59503277D-02
+ 0.30000000D+01 0.60000000D+01 -.72526785D-01 0.29783185D-02
+ 0.60000000D+01 0.90000000D+01 0.16439794D+01 0.22299414D-02
+ 0.90000000D+01 0.12000000D+02 0.15372942D+01 0.18897037D-02
+ 0.12000000D+02 0.15000000D+02 0.12946278D+01 0.19272839D-02
+ 0.15000000D+02 0.18000000D+02 0.10788223D+01 0.20353407D-02
+ 0.18000000D+02 0.21000000D+02 0.90873201D+00 0.20375077D-02
+ 0.21000000D+02 0.24000000D+02 0.76487083D+00 0.17191356D-02
+ 0.24000000D+02 0.27000000D+02 0.65775003D+00 0.17567156D-02
+ 0.27000000D+02 0.30000000D+02 0.56544259D+00 0.17062145D-02
+ 0.30000000D+02 0.33000000D+02 0.49114968D+00 0.12193725D-02
+ 0.33000000D+02 0.36000000D+02 0.42817845D+00 0.11109325D-02
+ 0.36000000D+02 0.39000000D+02 0.37847070D+00 0.10307841D-02
+ 0.39000000D+02 0.42000000D+02 0.33332816D+00 0.90978729D-03
+ 0.42000000D+02 0.45000000D+02 0.29575680D+00 0.10206293D-02
+ 0.45000000D+02 0.48000000D+02 0.26313624D+00 0.12965410D-02
+ 0.48000000D+02 0.51000000D+02 0.23388972D+00 0.11508359D-02
+ 0.51000000D+02 0.54000000D+02 0.20823285D+00 0.77912583D-03
+ 0.54000000D+02 0.57000000D+02 0.18903119D+00 0.74542612D-03
+ 0.57000000D+02 0.60000000D+02 0.16785091D+00 0.83045146D-03
+ 0.60000000D+02 0.63000000D+02 0.15094950D+00 0.82066630D-03
+ 0.63000000D+02 0.66000000D+02 0.13593325D+00 0.70962066D-03
+ 0.66000000D+02 0.69000000D+02 0.12277610D+00 0.72890827D-03
+ 0.69000000D+02 0.72000000D+02 0.11153352D+00 0.72906686D-03
+ 0.72000000D+02 0.75000000D+02 0.99911652D-01 0.68148225D-03
+ 0.75000000D+02 0.78000000D+02 0.90087726D-01 0.58700401D-03
+ 0.78000000D+02 0.81000000D+02 0.81885017D-01 0.57556097D-03
+ 0.81000000D+02 0.84000000D+02 0.75214668D-01 0.59350409D-03
+ 0.84000000D+02 0.87000000D+02 0.70585587D-01 0.21302300D-02
+ 0.87000000D+02 0.90000000D+02 0.58607207D-01 0.21123100D-02
+ 0.90000000D+02 0.93000000D+02 0.55571659D-01 0.43415517D-03
+ 0.93000000D+02 0.96000000D+02 0.51139073D-01 0.43310060D-03
+ 0.96000000D+02 0.99000000D+02 0.46749239D-01 0.40603264D-03
+ 0.99000000D+02 0.10200000D+03 0.41508306D-01 0.39412792D-03
+ 0.10200000D+03 0.10500000D+03 0.38641230D-01 0.46059550D-03
+ 0.10500000D+03 0.10800000D+03 0.35833752D-01 0.37827149D-03
+ 0.10800000D+03 0.11100000D+03 0.31605849D-01 0.30914852D-03
+ 0.11100000D+03 0.11400000D+03 0.29674175D-01 0.31030347D-03
+ 0.11400000D+03 0.11700000D+03 0.26950570D-01 0.25143097D-03
+ 0.11700000D+03 0.12000000D+03 0.25165148D-01 0.60839545D-03
+ 0.12000000D+03 0.12300000D+03 0.22541609D-01 0.59616470D-03
+ 0.12300000D+03 0.12600000D+03 0.20771798D-01 0.23755540D-03
+ 0.12600000D+03 0.12900000D+03 0.19150828D-01 0.24196620D-03
+ 0.12900000D+03 0.13200000D+03 0.17056948D-01 0.37254255D-03
+ 0.13200000D+03 0.13500000D+03 0.16241028D-01 0.37410829D-03
+ 0.13500000D+03 0.13800000D+03 0.15197504D-01 0.32529063D-03
+ 0.13800000D+03 0.14100000D+03 0.13461799D-01 0.30805922D-03
+ 0.14100000D+03 0.14400000D+03 0.12387532D-01 0.15759504D-03
+ 0.14400000D+03 0.14700000D+03 0.11769750D-01 0.21604857D-03
+ 0.14700000D+03 0.15000000D+03 0.10556605D-01 0.21375867D-03
+ 0.15000000D+03 0.15300000D+03 0.97705895D-02 0.19599801D-03
+ 0.15300000D+03 0.15600000D+03 0.94691578D-02 0.21818515D-03
+ 0.15600000D+03 0.15900000D+03 0.80157618D-02 0.26583436D-03
+ 0.15900000D+03 0.16200000D+03 0.73738067D-02 0.42197341D-03
+ 0.16200000D+03 0.16500000D+03 0.78357538D-02 0.37343000D-03
+ 0.16500000D+03 0.16800000D+03 0.65278172D-02 0.14320126D-03
+ 0.16800000D+03 0.17100000D+03 0.63008844D-02 0.15820086D-03
+ 0.17100000D+03 0.17400000D+03 0.54263842D-02 0.13657313D-03
+ 0.17400000D+03 0.17700000D+03 0.56416600D-02 0.12216634D-03
+ 0.17700000D+03 0.18000000D+03 0.45826459D-02 0.26814769D-03
+ 0.18000000D+03 0.18300000D+03 0.48245335D-02 0.27656346D-03
+ 0.18300000D+03 0.18600000D+03 0.41496728D-02 0.11944697D-03
+ 0.18600000D+03 0.18900000D+03 0.38656086D-02 0.81322686D-04
+ 0.18900000D+03 0.19200000D+03 0.36439066D-02 0.72635373D-04
+ 0.19200000D+03 0.19500000D+03 0.33330199D-02 0.66644029D-04
+ 0.19500000D+03 0.19800000D+03 0.30800274D-02 0.11001072D-03
+ 0.19800000D+03 0.20100000D+03 0.29272372D-02 0.10773662D-03
+ 0.20100000D+03 0.20400000D+03 0.27535297D-02 0.50131086D-04
+ 0.20400000D+03 0.20700000D+03 0.24731101D-02 0.50084439D-04
+ 0.20700000D+03 0.21000000D+03 0.23974629D-02 0.63420360D-04
+ 0.21000000D+03 0.21300000D+03 0.21562906D-02 0.75983033D-04
+ 0.21300000D+03 0.21600000D+03 0.19052762D-02 0.63709871D-04
+ 0.21600000D+03 0.21900000D+03 0.18943077D-02 0.44943837D-04
+ 0.21900000D+03 0.22200000D+03 0.17481830D-02 0.41668901D-04
+ 0.22200000D+03 0.22500000D+03 0.15747288D-02 0.46943413D-04
+ 0.22500000D+03 0.22800000D+03 0.15603002D-02 0.62694177D-04
+ 0.22800000D+03 0.23100000D+03 0.14269743D-02 0.54855377D-04
+ 0.23100000D+03 0.23400000D+03 0.13510542D-02 0.32012008D-04
+ 0.23400000D+03 0.23700000D+03 0.11815363D-02 0.33345205D-04
+ 0.23700000D+03 0.24000000D+03 0.11423753D-02 0.47475448D-04
+ 0.24000000D+03 0.24300000D+03 0.13287610D-02 0.25137874D-03
+ 0.24300000D+03 0.24600000D+03 0.73634311D-03 0.24926810D-03
+ 0.24600000D+03 0.24900000D+03 0.96010666D-03 0.33507926D-04
+ 0.24900000D+03 0.25200000D+03 0.86663837D-03 0.30909150D-04
+ 0.25200000D+03 0.25500000D+03 0.80643033D-03 0.31894168D-04
+ 0.25500000D+03 0.25800000D+03 0.71447845D-03 0.26777809D-04
+ 0.25800000D+03 0.26100000D+03 0.71848524D-03 0.31709332D-04
+ 0.26100000D+03 0.26400000D+03 0.67058660D-03 0.43408399D-04
+ 0.26400000D+03 0.26700000D+03 0.63280131D-03 0.41406692D-04
+ 0.26700000D+03 0.27000000D+03 0.52777686D-03 0.32808054D-04
+ 0.27000000D+03 0.27300000D+03 0.70808106D-03 0.13235033D-03
+ 0.27300000D+03 0.27600000D+03 0.29585822D-03 0.14231257D-03
+ 0.27600000D+03 0.27900000D+03 0.55934701D-03 0.58571054D-04
+ 0.27900000D+03 0.28200000D+03 0.35980642D-03 0.55626076D-04
+ 0.28200000D+03 0.28500000D+03 0.49310002D-03 0.55763327D-04
+ 0.28500000D+03 0.28800000D+03 0.37873135D-03 0.16553376D-04
+ 0.28800000D+03 0.29100000D+03 0.33747881D-03 0.14244965D-04
+ 0.29100000D+03 0.29400000D+03 0.38455077D-03 0.19746685D-04
+ 0.29400000D+03 0.29700000D+03 0.29946138D-03 0.22346292D-04
+ 0.29700000D+03 0.30000000D+03 0.28815391D-03 0.20388274D-04
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.16807846D+02 0.57003081D-02
+ 0.30000000D+01 0.60000000D+01 0.15758119D+02 0.85828952D-03
+ 0.60000000D+01 0.90000000D+01 0.57508083D+01 0.35633619D-03
+ 0.90000000D+01 0.12000000D+02 0.29409166D+01 0.20723750D-03
+ 0.12000000D+02 0.15000000D+02 0.17618780D+01 0.13184663D-03
+ 0.15000000D+02 0.18000000D+02 0.11590490D+01 0.92838307D-04
+ 0.18000000D+02 0.21000000D+02 0.81142977D+00 0.72434257D-04
+ 0.21000000D+02 0.24000000D+02 0.59412729D+00 0.53229436D-04
+ 0.24000000D+02 0.27000000D+02 0.44985493D+00 0.43255196D-04
+ 0.27000000D+02 0.30000000D+02 0.34961598D+00 0.34912022D-04
+ 0.30000000D+02 0.33000000D+02 0.27760278D+00 0.29022635D-04
+ 0.33000000D+02 0.36000000D+02 0.22425510D+00 0.24320722D-04
+ 0.36000000D+02 0.39000000D+02 0.18384954D+00 0.21219564D-04
+ 0.39000000D+02 0.42000000D+02 0.15260542D+00 0.18294036D-04
+ 0.42000000D+02 0.45000000D+02 0.12800818D+00 0.16185131D-04
+ 0.45000000D+02 0.48000000D+02 0.10842776D+00 0.13727144D-04
+ 0.48000000D+02 0.51000000D+02 0.92569396D-01 0.12328772D-04
+ 0.51000000D+02 0.54000000D+02 0.79628299D-01 0.10642762D-04
+ 0.54000000D+02 0.57000000D+02 0.68952400D-01 0.97534331D-05
+ 0.57000000D+02 0.60000000D+02 0.60066067D-01 0.89831400D-05
+ 0.60000000D+02 0.63000000D+02 0.52595198D-01 0.79052037D-05
+ 0.63000000D+02 0.66000000D+02 0.46284200D-01 0.72138930D-05
+ 0.66000000D+02 0.69000000D+02 0.40916620D-01 0.66064495D-05
+ 0.69000000D+02 0.72000000D+02 0.36317265D-01 0.61356775D-05
+ 0.72000000D+02 0.75000000D+02 0.32372032D-01 0.53587359D-05
+ 0.75000000D+02 0.78000000D+02 0.28946838D-01 0.51034596D-05
+ 0.78000000D+02 0.81000000D+02 0.25975872D-01 0.47270441D-05
+ 0.81000000D+02 0.84000000D+02 0.23383102D-01 0.42070704D-05
+ 0.84000000D+02 0.87000000D+02 0.21108608D-01 0.39993459D-05
+ 0.87000000D+02 0.90000000D+02 0.19110186D-01 0.35761499D-05
+ 0.90000000D+02 0.93000000D+02 0.17338283D-01 0.32997343D-05
+ 0.93000000D+02 0.96000000D+02 0.15773451D-01 0.32061498D-05
+ 0.96000000D+02 0.99000000D+02 0.14375916D-01 0.28838452D-05
+ 0.99000000D+02 0.10200000D+03 0.13137055D-01 0.27330328D-05
+ 0.10200000D+03 0.10500000D+03 0.12031392D-01 0.24522948D-05
+ 0.10500000D+03 0.10800000D+03 0.11036414D-01 0.24269731D-05
+ 0.10800000D+03 0.11100000D+03 0.10140524D-01 0.22530487D-05
+ 0.11100000D+03 0.11400000D+03 0.93386300D-02 0.20978594D-05
+ 0.11400000D+03 0.11700000D+03 0.86112833D-02 0.19772507D-05
+ 0.11700000D+03 0.12000000D+03 0.79530989D-02 0.18045394D-05
+ 0.12000000D+03 0.12300000D+03 0.73560782D-02 0.17707873D-05
+ 0.12300000D+03 0.12600000D+03 0.68156328D-02 0.16119789D-05
+ 0.12600000D+03 0.12900000D+03 0.63226632D-02 0.15118207D-05
+ 0.12900000D+03 0.13200000D+03 0.58746365D-02 0.14894207D-05
+ 0.13200000D+03 0.13500000D+03 0.54662340D-02 0.13951396D-05
+ 0.13500000D+03 0.13800000D+03 0.50908161D-02 0.13024074D-05
+ 0.13800000D+03 0.14100000D+03 0.47459461D-02 0.12525386D-05
+ 0.14100000D+03 0.14400000D+03 0.44310842D-02 0.12246718D-05
+ 0.14400000D+03 0.14700000D+03 0.41391515D-02 0.11290886D-05
+ 0.14700000D+03 0.15000000D+03 0.38726175D-02 0.10583222D-05
+ 0.15000000D+03 0.15300000D+03 0.36271385D-02 0.10218890D-05
+ 0.15300000D+03 0.15600000D+03 0.34011957D-02 0.10258949D-05
+ 0.15600000D+03 0.15900000D+03 0.31890145D-02 0.92663034D-06
+ 0.15900000D+03 0.16200000D+03 0.29961271D-02 0.89913471D-06
+ 0.16200000D+03 0.16500000D+03 0.28158136D-02 0.83206737D-06
+ 0.16500000D+03 0.16800000D+03 0.26495338D-02 0.80369881D-06
+ 0.16800000D+03 0.17100000D+03 0.24939455D-02 0.77405541D-06
+ 0.17100000D+03 0.17400000D+03 0.23498779D-02 0.71513322D-06
+ 0.17400000D+03 0.17700000D+03 0.22166351D-02 0.69901200D-06
+ 0.17700000D+03 0.18000000D+03 0.20918985D-02 0.65764881D-06
+ 0.18000000D+03 0.18300000D+03 0.19762351D-02 0.64089040D-06
+ 0.18300000D+03 0.18600000D+03 0.18669669D-02 0.61391921D-06
+ 0.18600000D+03 0.18900000D+03 0.17659284D-02 0.57367452D-06
+ 0.18900000D+03 0.19200000D+03 0.16715732D-02 0.55858441D-06
+ 0.19200000D+03 0.19500000D+03 0.15827870D-02 0.53076030D-06
+ 0.19500000D+03 0.19800000D+03 0.15002736D-02 0.50337336D-06
+ 0.19800000D+03 0.20100000D+03 0.14210424D-02 0.49080259D-06
+ 0.20100000D+03 0.20400000D+03 0.13478803D-02 0.47591111D-06
+ 0.20400000D+03 0.20700000D+03 0.12814135D-02 0.47346605D-06
+ 0.20700000D+03 0.21000000D+03 0.12162680D-02 0.43230947D-06
+ 0.21000000D+03 0.21300000D+03 0.11560249D-02 0.41728637D-06
+ 0.21300000D+03 0.21600000D+03 0.10996448D-02 0.40009404D-06
+ 0.21600000D+03 0.21900000D+03 0.10463632D-02 0.38097963D-06
+ 0.21900000D+03 0.22200000D+03 0.99585950D-03 0.36732975D-06
+ 0.22200000D+03 0.22500000D+03 0.94768672D-03 0.35809639D-06
+ 0.22500000D+03 0.22800000D+03 0.90343801D-03 0.34030294D-06
+ 0.22800000D+03 0.23100000D+03 0.86150443D-03 0.32865379D-06
+ 0.23100000D+03 0.23400000D+03 0.82171838D-03 0.33293750D-06
+ 0.23400000D+03 0.23700000D+03 0.78404084D-03 0.30856133D-06
+ 0.23700000D+03 0.24000000D+03 0.74868424D-03 0.29084958D-06
+ 0.24000000D+03 0.24300000D+03 0.71451191D-03 0.29372436D-06
+ 0.24300000D+03 0.24600000D+03 0.68303770D-03 0.28165503D-06
+ 0.24600000D+03 0.24900000D+03 0.65219823D-03 0.27138192D-06
+ 0.24900000D+03 0.25200000D+03 0.62448822D-03 0.25941065D-06
+ 0.25200000D+03 0.25500000D+03 0.59771983D-03 0.25481135D-06
+ 0.25500000D+03 0.25800000D+03 0.57116011D-03 0.23862152D-06
+ 0.25800000D+03 0.26100000D+03 0.54740929D-03 0.24301272D-06
+ 0.26100000D+03 0.26400000D+03 0.52400508D-03 0.22583630D-06
+ 0.26400000D+03 0.26700000D+03 0.50220412D-03 0.21993327D-06
+ 0.26700000D+03 0.27000000D+03 0.48114649D-03 0.21012364D-06
+ 0.27000000D+03 0.27300000D+03 0.46140772D-03 0.20612832D-06
+ 0.27300000D+03 0.27600000D+03 0.44262374D-03 0.20638494D-06
+ 0.27600000D+03 0.27900000D+03 0.42434347D-03 0.20873206D-06
+ 0.27900000D+03 0.28200000D+03 0.40771005D-03 0.18204284D-06
+ 0.28200000D+03 0.28500000D+03 0.39112400D-03 0.18237483D-06
+ 0.28500000D+03 0.28800000D+03 0.37590293D-03 0.17019631D-06
+ 0.28800000D+03 0.29100000D+03 0.36085060D-03 0.17311431D-06
+ 0.29100000D+03 0.29400000D+03 0.34654597D-03 0.16133923D-06
+ 0.29400000D+03 0.29700000D+03 0.33363910D-03 0.17206319D-06
+ 0.29700000D+03 0.30000000D+03 0.32050024D-03 0.15193849D-06
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-QQ.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-QQ.top
new file mode 100644
index 0000000000000000000000000000000000000000..17a70afd896aabefd3765c1e2b084976df484755
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1250_CM13_PDF4LHC30-APX2-QQ.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13549630D-05 0.83398609D-06
+ -.46000000D+01 -.45000000D+01 0.14940580D-03 0.70923821D-05
+ -.45000000D+01 -.44000000D+01 0.13497306D-02 0.51914797D-04
+ -.44000000D+01 -.43000000D+01 0.51944113D-02 0.94489947D-04
+ -.43000000D+01 -.42000000D+01 0.14310785D-01 0.26478365D-03
+ -.42000000D+01 -.41000000D+01 0.33033116D-01 0.61475627D-03
+ -.41000000D+01 -.40000000D+01 0.65913850D-01 0.99595445D-03
+ -.40000000D+01 -.39000000D+01 0.11592948D+00 0.18255827D-02
+ -.39000000D+01 -.38000000D+01 0.18787697D+00 0.25662586D-02
+ -.38000000D+01 -.37000000D+01 0.29028652D+00 0.32951275D-02
+ -.37000000D+01 -.36000000D+01 0.40956093D+00 0.77522931D-02
+ -.36000000D+01 -.35000000D+01 0.55029683D+00 0.72175274D-02
+ -.35000000D+01 -.34000000D+01 0.76729682D+00 0.17422275D-01
+ -.34000000D+01 -.33000000D+01 0.93439861D+00 0.17970572D-01
+ -.33000000D+01 -.32000000D+01 0.11984449D+01 0.10656473D-01
+ -.32000000D+01 -.31000000D+01 0.14763513D+01 0.15515020D-01
+ -.31000000D+01 -.30000000D+01 0.17399015D+01 0.13815400D-01
+ -.30000000D+01 -.29000000D+01 0.20878376D+01 0.14874577D-01
+ -.29000000D+01 -.28000000D+01 0.24272557D+01 0.15529237D-01
+ -.28000000D+01 -.27000000D+01 0.28144078D+01 0.17756082D-01
+ -.27000000D+01 -.26000000D+01 0.32284689D+01 0.20248663D-01
+ -.26000000D+01 -.25000000D+01 0.35853599D+01 0.21283102D-01
+ -.25000000D+01 -.24000000D+01 0.40382574D+01 0.19469206D-01
+ -.24000000D+01 -.23000000D+01 0.44483858D+01 0.21509218D-01
+ -.23000000D+01 -.22000000D+01 0.48973919D+01 0.26317536D-01
+ -.22000000D+01 -.21000000D+01 0.54012597D+01 0.32680913D-01
+ -.21000000D+01 -.20000000D+01 0.58423525D+01 0.30382561D-01
+ -.20000000D+01 -.19000000D+01 0.63215428D+01 0.27591667D-01
+ -.19000000D+01 -.18000000D+01 0.68063374D+01 0.27795705D-01
+ -.18000000D+01 -.17000000D+01 0.72593883D+01 0.27368061D-01
+ -.17000000D+01 -.16000000D+01 0.76573883D+01 0.29193867D-01
+ -.16000000D+01 -.15000000D+01 0.80489342D+01 0.30309411D-01
+ -.15000000D+01 -.14000000D+01 0.85368501D+01 0.30186782D-01
+ -.14000000D+01 -.13000000D+01 0.89297019D+01 0.32911871D-01
+ -.13000000D+01 -.12000000D+01 0.93269264D+01 0.31789275D-01
+ -.12000000D+01 -.11000000D+01 0.97415364D+01 0.35623527D-01
+ -.11000000D+01 -.10000000D+01 0.99404530D+01 0.32678195D-01
+ -.10000000D+01 -.90000000D+00 0.10268244D+02 0.38597175D-01
+ -.90000000D+00 -.80000000D+00 0.10658302D+02 0.35092791D-01
+ -.80000000D+00 -.70000000D+00 0.10794627D+02 0.38306097D-01
+ -.70000000D+00 -.60000000D+00 0.11038600D+02 0.39869751D-01
+ -.60000000D+00 -.50000000D+00 0.11317435D+02 0.63961300D-01
+ -.50000000D+00 -.40000000D+00 0.11385870D+02 0.37199891D-01
+ -.40000000D+00 -.30000000D+00 0.11568472D+02 0.39299471D-01
+ -.30000000D+00 -.20000000D+00 0.11550560D+02 0.39900173D-01
+ -.20000000D+00 -.10000000D+00 0.11609891D+02 0.34827847D-01
+ -.10000000D+00 0.18041124D-15 0.11670547D+02 0.36981120D-01
+ 0.70776718D-15 0.10000000D+00 0.11739801D+02 0.38754656D-01
+ 0.10000000D+00 0.20000000D+00 0.11691440D+02 0.40538813D-01
+ 0.20000000D+00 0.30000000D+00 0.11603937D+02 0.37897121D-01
+ 0.30000000D+00 0.40000000D+00 0.11539031D+02 0.46139786D-01
+ 0.40000000D+00 0.50000000D+00 0.11321313D+02 0.40860830D-01
+ 0.50000000D+00 0.60000000D+00 0.11194317D+02 0.36851237D-01
+ 0.60000000D+00 0.70000000D+00 0.11041276D+02 0.37908871D-01
+ 0.70000000D+00 0.80000000D+00 0.10843511D+02 0.42721293D-01
+ 0.80000000D+00 0.90000000D+00 0.10587753D+02 0.38523984D-01
+ 0.90000000D+00 0.10000000D+01 0.10308373D+02 0.36365302D-01
+ 0.10000000D+01 0.11000000D+01 0.10016385D+02 0.41507714D-01
+ 0.11000000D+01 0.12000000D+01 0.96435287D+01 0.32622075D-01
+ 0.12000000D+01 0.13000000D+01 0.92802517D+01 0.34215267D-01
+ 0.13000000D+01 0.14000000D+01 0.89287213D+01 0.36337558D-01
+ 0.14000000D+01 0.15000000D+01 0.84744348D+01 0.33704812D-01
+ 0.15000000D+01 0.16000000D+01 0.80882842D+01 0.33453272D-01
+ 0.16000000D+01 0.17000000D+01 0.76951549D+01 0.30303107D-01
+ 0.17000000D+01 0.18000000D+01 0.72502912D+01 0.31066588D-01
+ 0.18000000D+01 0.19000000D+01 0.67756767D+01 0.31580106D-01
+ 0.19000000D+01 0.20000000D+01 0.63308708D+01 0.25593070D-01
+ 0.20000000D+01 0.21000000D+01 0.58491326D+01 0.27637197D-01
+ 0.21000000D+01 0.22000000D+01 0.53494545D+01 0.26587052D-01
+ 0.22000000D+01 0.23000000D+01 0.48920385D+01 0.23546253D-01
+ 0.23000000D+01 0.24000000D+01 0.44902655D+01 0.22491899D-01
+ 0.24000000D+01 0.25000000D+01 0.40089638D+01 0.21390904D-01
+ 0.25000000D+01 0.26000000D+01 0.35845742D+01 0.19760053D-01
+ 0.26000000D+01 0.27000000D+01 0.31926356D+01 0.19738108D-01
+ 0.27000000D+01 0.28000000D+01 0.27814567D+01 0.18700911D-01
+ 0.28000000D+01 0.29000000D+01 0.23907900D+01 0.21450642D-01
+ 0.29000000D+01 0.30000000D+01 0.20775457D+01 0.15218240D-01
+ 0.30000000D+01 0.31000000D+01 0.17800379D+01 0.13029004D-01
+ 0.31000000D+01 0.32000000D+01 0.14436580D+01 0.11903707D-01
+ 0.32000000D+01 0.33000000D+01 0.11503930D+01 0.13669707D-01
+ 0.33000000D+01 0.34000000D+01 0.94302937D+00 0.12388373D-01
+ 0.34000000D+01 0.35000000D+01 0.74261412D+00 0.88190645D-02
+ 0.35000000D+01 0.36000000D+01 0.55869307D+00 0.63683528D-02
+ 0.36000000D+01 0.37000000D+01 0.42240682D+00 0.66311474D-02
+ 0.37000000D+01 0.38000000D+01 0.28676794D+00 0.36111772D-02
+ 0.38000000D+01 0.39000000D+01 0.18779738D+00 0.24151324D-02
+ 0.39000000D+01 0.40000000D+01 0.11563194D+00 0.15775263D-02
+ 0.40000000D+01 0.41000000D+01 0.64482139D-01 0.99042090D-03
+ 0.41000000D+01 0.42000000D+01 0.32959735D-01 0.52625293D-03
+ 0.42000000D+01 0.43000000D+01 0.13062539D-01 0.83716699D-03
+ 0.43000000D+01 0.44000000D+01 0.50239423D-02 0.98514036D-04
+ 0.44000000D+01 0.45000000D+01 0.13067774D-02 0.33272582D-04
+ 0.45000000D+01 0.46000000D+01 0.16854800D-03 0.70819264D-05
+ 0.46000000D+01 0.47000000D+01 0.14263433D-05 0.83243735D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13338600D-05 0.83398114D-06
+ -.46000000D+01 -.45000000D+01 0.14194092D-03 0.70899700D-05
+ -.45000000D+01 -.44000000D+01 0.12570865D-02 0.51889683D-04
+ -.44000000D+01 -.43000000D+01 0.47301819D-02 0.94332316D-04
+ -.43000000D+01 -.42000000D+01 0.12765875D-01 0.26435247D-03
+ -.42000000D+01 -.41000000D+01 0.29001376D-01 0.61381532D-03
+ -.41000000D+01 -.40000000D+01 0.57017659D-01 0.99322507D-03
+ -.40000000D+01 -.39000000D+01 0.98723233D-01 0.18197172D-02
+ -.39000000D+01 -.38000000D+01 0.15769068D+00 0.25603701D-02
+ -.38000000D+01 -.37000000D+01 0.24134093D+00 0.32825551D-02
+ -.37000000D+01 -.36000000D+01 0.33492798D+00 0.77447094D-02
+ -.36000000D+01 -.35000000D+01 0.44301128D+00 0.72010709D-02
+ -.35000000D+01 -.34000000D+01 0.61098083D+00 0.11471358D-01
+ -.34000000D+01 -.33000000D+01 0.74306152D+00 0.12292497D-01
+ -.33000000D+01 -.32000000D+01 0.93996803D+00 0.10577231D-01
+ -.32000000D+01 -.31000000D+01 0.11501649D+01 0.15441421D-01
+ -.31000000D+01 -.30000000D+01 0.13362351D+01 0.13764543D-01
+ -.30000000D+01 -.29000000D+01 0.15978325D+01 0.14782025D-01
+ -.29000000D+01 -.28000000D+01 0.18420450D+01 0.15428714D-01
+ -.28000000D+01 -.27000000D+01 0.21225529D+01 0.17677967D-01
+ -.27000000D+01 -.26000000D+01 0.24306959D+01 0.20092389D-01
+ -.26000000D+01 -.25000000D+01 0.26637606D+01 0.21122289D-01
+ -.25000000D+01 -.24000000D+01 0.29963227D+01 0.19245618D-01
+ -.24000000D+01 -.23000000D+01 0.32738648D+01 0.21370478D-01
+ -.23000000D+01 -.22000000D+01 0.35916588D+01 0.25822914D-01
+ -.22000000D+01 -.21000000D+01 0.39495618D+01 0.31374062D-01
+ -.21000000D+01 -.20000000D+01 0.42524586D+01 0.29155714D-01
+ -.20000000D+01 -.19000000D+01 0.45877842D+01 0.27305299D-01
+ -.19000000D+01 -.18000000D+01 0.49290206D+01 0.27615574D-01
+ -.18000000D+01 -.17000000D+01 0.52382234D+01 0.27188865D-01
+ -.17000000D+01 -.16000000D+01 0.54943120D+01 0.29084971D-01
+ -.16000000D+01 -.15000000D+01 0.57509215D+01 0.30162368D-01
+ -.15000000D+01 -.14000000D+01 0.61031403D+01 0.30059653D-01
+ -.14000000D+01 -.13000000D+01 0.63656370D+01 0.32776563D-01
+ -.13000000D+01 -.12000000D+01 0.66456160D+01 0.31542284D-01
+ -.12000000D+01 -.11000000D+01 0.69401506D+01 0.35340640D-01
+ -.11000000D+01 -.10000000D+01 0.70317196D+01 0.32406088D-01
+ -.10000000D+01 -.90000000D+00 0.72489117D+01 0.38382439D-01
+ -.90000000D+00 -.80000000D+00 0.75524338D+01 0.34880680D-01
+ -.80000000D+00 -.70000000D+00 0.76083985D+01 0.38091412D-01
+ -.70000000D+00 -.60000000D+00 0.77773686D+01 0.39635196D-01
+ -.60000000D+00 -.50000000D+00 0.79841205D+01 0.63746820D-01
+ -.50000000D+00 -.40000000D+00 0.80086607D+01 0.36864791D-01
+ -.40000000D+00 -.30000000D+00 0.81421384D+01 0.38865475D-01
+ -.30000000D+00 -.20000000D+00 0.80910430D+01 0.39531640D-01
+ -.20000000D+00 -.10000000D+00 0.81339734D+01 0.34488803D-01
+ -.10000000D+00 0.18041124D-15 0.81737096D+01 0.36195755D-01
+ 0.70776718D-15 0.10000000D+00 0.82498316D+01 0.38045455D-01
+ 0.10000000D+00 0.20000000D+00 0.82157183D+01 0.39029147D-01
+ 0.20000000D+00 0.30000000D+00 0.81417482D+01 0.36208631D-01
+ 0.30000000D+00 0.40000000D+00 0.81155313D+01 0.45887125D-01
+ 0.40000000D+00 0.50000000D+00 0.79371833D+01 0.40426048D-01
+ 0.50000000D+00 0.60000000D+00 0.78686336D+01 0.36389071D-01
+ 0.60000000D+00 0.70000000D+00 0.77738175D+01 0.37572676D-01
+ 0.70000000D+00 0.80000000D+00 0.76594173D+01 0.42498405D-01
+ 0.80000000D+00 0.90000000D+00 0.74826483D+01 0.38143671D-01
+ 0.90000000D+00 0.10000000D+01 0.72945623D+01 0.35892916D-01
+ 0.10000000D+01 0.11000000D+01 0.71053076D+01 0.41287558D-01
+ 0.11000000D+01 0.12000000D+01 0.68448972D+01 0.32432257D-01
+ 0.12000000D+01 0.13000000D+01 0.65917440D+01 0.33988671D-01
+ 0.13000000D+01 0.14000000D+01 0.63709608D+01 0.36084944D-01
+ 0.14000000D+01 0.15000000D+01 0.60505915D+01 0.31181499D-01
+ 0.15000000D+01 0.16000000D+01 0.57797992D+01 0.30945249D-01
+ 0.16000000D+01 0.17000000D+01 0.55340320D+01 0.30105147D-01
+ 0.17000000D+01 0.18000000D+01 0.52321314D+01 0.30934249D-01
+ 0.18000000D+01 0.19000000D+01 0.48940758D+01 0.31412122D-01
+ 0.19000000D+01 0.20000000D+01 0.45990571D+01 0.25358413D-01
+ 0.20000000D+01 0.21000000D+01 0.42576278D+01 0.27458381D-01
+ 0.21000000D+01 0.22000000D+01 0.39030867D+01 0.26416573D-01
+ 0.22000000D+01 0.23000000D+01 0.35798802D+01 0.23428319D-01
+ 0.23000000D+01 0.24000000D+01 0.33172124D+01 0.22247614D-01
+ 0.24000000D+01 0.25000000D+01 0.29646581D+01 0.21158222D-01
+ 0.25000000D+01 0.26000000D+01 0.26656860D+01 0.19625999D-01
+ 0.26000000D+01 0.27000000D+01 0.23919133D+01 0.19547750D-01
+ 0.27000000D+01 0.28000000D+01 0.20934382D+01 0.18621074D-01
+ 0.28000000D+01 0.29000000D+01 0.18050608D+01 0.21367566D-01
+ 0.29000000D+01 0.30000000D+01 0.15867660D+01 0.15148450D-01
+ 0.30000000D+01 0.31000000D+01 0.13768825D+01 0.12935674D-01
+ 0.31000000D+01 0.32000000D+01 0.11162930D+01 0.11836910D-01
+ 0.32000000D+01 0.33000000D+01 0.89261539D+00 0.13644647D-01
+ 0.33000000D+01 0.34000000D+01 0.74385238D+00 0.12361976D-01
+ 0.34000000D+01 0.35000000D+01 0.59379062D+00 0.87937342D-02
+ 0.35000000D+01 0.36000000D+01 0.45118730D+00 0.63467287D-02
+ 0.36000000D+01 0.37000000D+01 0.34799434D+00 0.66205091D-02
+ 0.37000000D+01 0.38000000D+01 0.23781209D+00 0.36014430D-02
+ 0.38000000D+01 0.39000000D+01 0.15763712D+00 0.24081658D-02
+ 0.39000000D+01 0.40000000D+01 0.98381386D-01 0.15725439D-02
+ 0.40000000D+01 0.41000000D+01 0.55576103D-01 0.98840323D-03
+ 0.41000000D+01 0.42000000D+01 0.28911761D-01 0.52498806D-03
+ 0.42000000D+01 0.43000000D+01 0.11511519D-01 0.83689597D-03
+ 0.43000000D+01 0.44000000D+01 0.45619689D-02 0.98368732D-04
+ 0.44000000D+01 0.45000000D+01 0.12140180D-02 0.33240522D-04
+ 0.45000000D+01 0.46000000D+01 0.16109470D-03 0.70786447D-05
+ 0.46000000D+01 0.47000000D+01 0.14056103D-05 0.83243244D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13440085D-05 0.83398354D-06
+ -.46000000D+01 -.45000000D+01 0.14537645D-03 0.70911140D-05
+ -.45000000D+01 -.44000000D+01 0.12982114D-02 0.51901372D-04
+ -.44000000D+01 -.43000000D+01 0.49298590D-02 0.94404477D-04
+ -.43000000D+01 -.42000000D+01 0.13412468D-01 0.26454628D-03
+ -.42000000D+01 -.41000000D+01 0.30649411D-01 0.61422371D-03
+ -.41000000D+01 -.40000000D+01 0.60570685D-01 0.99442747D-03
+ -.40000000D+01 -.39000000D+01 0.10544952D+00 0.18222178D-02
+ -.39000000D+01 -.38000000D+01 0.16924387D+00 0.25627671D-02
+ -.38000000D+01 -.37000000D+01 0.25969823D+00 0.32875730D-02
+ -.37000000D+01 -.36000000D+01 0.36235553D+00 0.77479189D-02
+ -.36000000D+01 -.35000000D+01 0.48174203D+00 0.72071797D-02
+ -.35000000D+01 -.34000000D+01 0.66635633D+00 0.13356484D-01
+ -.34000000D+01 -.33000000D+01 0.80992961D+00 0.14066460D-01
+ -.33000000D+01 -.32000000D+01 0.10287897D+01 0.10596501D-01
+ -.32000000D+01 -.31000000D+01 0.12605961D+01 0.15460374D-01
+ -.31000000D+01 -.30000000D+01 0.14711612D+01 0.13783070D-01
+ -.30000000D+01 -.29000000D+01 0.17594589D+01 0.14809667D-01
+ -.29000000D+01 -.28000000D+01 0.20328637D+01 0.15457721D-01
+ -.28000000D+01 -.27000000D+01 0.23453004D+01 0.17696744D-01
+ -.27000000D+01 -.26000000D+01 0.26858683D+01 0.20128050D-01
+ -.26000000D+01 -.25000000D+01 0.29549266D+01 0.21147990D-01
+ -.25000000D+01 -.24000000D+01 0.33236274D+01 0.19282656D-01
+ -.24000000D+01 -.23000000D+01 0.36392095D+01 0.21412790D-01
+ -.23000000D+01 -.22000000D+01 0.39948361D+01 0.26032681D-01
+ -.22000000D+01 -.21000000D+01 0.43950046D+01 0.31981409D-01
+ -.21000000D+01 -.20000000D+01 0.47369124D+01 0.29663493D-01
+ -.20000000D+01 -.19000000D+01 0.51128815D+01 0.27391286D-01
+ -.19000000D+01 -.18000000D+01 0.54945871D+01 0.27662278D-01
+ -.18000000D+01 -.17000000D+01 0.58438938D+01 0.27235056D-01
+ -.17000000D+01 -.16000000D+01 0.61394039D+01 0.29117939D-01
+ -.16000000D+01 -.15000000D+01 0.64329532D+01 0.30205642D-01
+ -.15000000D+01 -.14000000D+01 0.68226270D+01 0.30096568D-01
+ -.14000000D+01 -.13000000D+01 0.71205650D+01 0.32820029D-01
+ -.13000000D+01 -.12000000D+01 0.74333514D+01 0.31608865D-01
+ -.12000000D+01 -.11000000D+01 0.77592133D+01 0.35419244D-01
+ -.11000000D+01 -.10000000D+01 0.78802345D+01 0.32478382D-01
+ -.10000000D+01 -.90000000D+00 0.81263939D+01 0.38434297D-01
+ -.90000000D+00 -.80000000D+00 0.84539868D+01 0.34936028D-01
+ -.80000000D+00 -.70000000D+00 0.85314044D+01 0.38147318D-01
+ -.70000000D+00 -.60000000D+00 0.87201684D+01 0.39696848D-01
+ -.60000000D+00 -.50000000D+00 0.89455277D+01 0.63795557D-01
+ -.50000000D+00 -.40000000D+00 0.89825059D+01 0.36939172D-01
+ -.40000000D+00 -.30000000D+00 0.91289689D+01 0.39000529D-01
+ -.30000000D+00 -.20000000D+00 0.90860005D+01 0.39650676D-01
+ -.20000000D+00 -.10000000D+00 0.91334929D+01 0.34568303D-01
+ -.10000000D+00 0.18041124D-15 0.91787779D+01 0.36369891D-01
+ 0.70776718D-15 0.10000000D+00 0.92531658D+01 0.38198107D-01
+ 0.10000000D+00 0.20000000D+00 0.92158457D+01 0.39233020D-01
+ 0.20000000D+00 0.30000000D+00 0.91369791D+01 0.36433069D-01
+ 0.30000000D+00 0.40000000D+00 0.91013550D+01 0.45966644D-01
+ 0.40000000D+00 0.50000000D+00 0.89121823D+01 0.40538363D-01
+ 0.50000000D+00 0.60000000D+00 0.88285697D+01 0.36477919D-01
+ 0.60000000D+00 0.70000000D+00 0.87180829D+01 0.37639456D-01
+ 0.70000000D+00 0.80000000D+00 0.85819675D+01 0.42550204D-01
+ 0.80000000D+00 0.90000000D+00 0.83833754D+01 0.38223881D-01
+ 0.90000000D+00 0.10000000D+01 0.81708238D+01 0.35978822D-01
+ 0.10000000D+01 0.11000000D+01 0.79544460D+01 0.41339715D-01
+ 0.11000000D+01 0.12000000D+01 0.76637796D+01 0.32487573D-01
+ 0.12000000D+01 0.13000000D+01 0.73804847D+01 0.34033947D-01
+ 0.13000000D+01 0.14000000D+01 0.71244845D+01 0.36139513D-01
+ 0.14000000D+01 0.15000000D+01 0.67687493D+01 0.31346210D-01
+ 0.15000000D+01 0.16000000D+01 0.64633243D+01 0.31086932D-01
+ 0.16000000D+01 0.17000000D+01 0.61782231D+01 0.30151428D-01
+ 0.17000000D+01 0.18000000D+01 0.58372364D+01 0.30966031D-01
+ 0.18000000D+01 0.19000000D+01 0.54606622D+01 0.31450890D-01
+ 0.19000000D+01 0.20000000D+01 0.51241154D+01 0.25407353D-01
+ 0.20000000D+01 0.21000000D+01 0.47422907D+01 0.27506783D-01
+ 0.21000000D+01 0.22000000D+01 0.43469960D+01 0.26464094D-01
+ 0.22000000D+01 0.23000000D+01 0.39845356D+01 0.23460225D-01
+ 0.23000000D+01 0.24000000D+01 0.36829303D+01 0.22297272D-01
+ 0.24000000D+01 0.25000000D+01 0.32917006D+01 0.21202273D-01
+ 0.25000000D+01 0.26000000D+01 0.29562104D+01 0.19660499D-01
+ 0.26000000D+01 0.27000000D+01 0.26474648D+01 0.19603899D-01
+ 0.27000000D+01 0.28000000D+01 0.23155710D+01 0.18648803D-01
+ 0.28000000D+01 0.29000000D+01 0.19959770D+01 0.21397827D-01
+ 0.29000000D+01 0.30000000D+01 0.17487462D+01 0.15171177D-01
+ 0.30000000D+01 0.31000000D+01 0.15116177D+01 0.12962042D-01
+ 0.31000000D+01 0.32000000D+01 0.12270759D+01 0.11852176D-01
+ 0.32000000D+01 0.33000000D+01 0.98124256D+00 0.13653193D-01
+ 0.33000000D+01 0.34000000D+01 0.81334071D+00 0.12371552D-01
+ 0.34000000D+01 0.35000000D+01 0.64661174D+00 0.88034422D-02
+ 0.35000000D+01 0.36000000D+01 0.48998574D+00 0.63549721D-02
+ 0.36000000D+01 0.37000000D+01 0.37535597D+00 0.66246830D-02
+ 0.37000000D+01 0.38000000D+01 0.25617337D+00 0.36050883D-02
+ 0.38000000D+01 0.39000000D+01 0.16918117D+00 0.24108397D-02
+ 0.39000000D+01 0.40000000D+01 0.10512145D+00 0.15745248D-02
+ 0.40000000D+01 0.41000000D+01 0.59135296D-01 0.98925445D-03
+ 0.41000000D+01 0.42000000D+01 0.30566229D-01 0.52553351D-03
+ 0.42000000D+01 0.43000000D+01 0.12160058D-01 0.83701942D-03
+ 0.43000000D+01 0.44000000D+01 0.47606596D-02 0.98434488D-04
+ 0.44000000D+01 0.45000000D+01 0.12551807D-02 0.33255431D-04
+ 0.45000000D+01 0.46000000D+01 0.16452624D-03 0.70802130D-05
+ 0.46000000D+01 0.47000000D+01 0.14155831D-05 0.83243483D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13495442D-05 0.83398483D-06
+ -.46000000D+01 -.45000000D+01 0.14736425D-03 0.70917495D-05
+ -.45000000D+01 -.44000000D+01 0.13230883D-02 0.51908008D-04
+ -.44000000D+01 -.43000000D+01 0.50550778D-02 0.94446339D-04
+ -.43000000D+01 -.42000000D+01 0.13830002D-01 0.26466108D-03
+ -.42000000D+01 -.41000000D+01 0.31739471D-01 0.61447389D-03
+ -.41000000D+01 -.40000000D+01 0.62974088D-01 0.99515464D-03
+ -.40000000D+01 -.39000000D+01 0.11009039D+00 0.18237911D-02
+ -.39000000D+01 -.38000000D+01 0.17736713D+00 0.25643198D-02
+ -.38000000D+01 -.37000000D+01 0.27282909D+00 0.32909222D-02
+ -.37000000D+01 -.36000000D+01 0.38230353D+00 0.77499499D-02
+ -.36000000D+01 -.35000000D+01 0.51030055D+00 0.72114436D-02
+ -.35000000D+01 -.34000000D+01 0.70788314D+00 0.15011992D-01
+ -.34000000D+01 -.33000000D+01 0.86031033D+00 0.15645945D-01
+ -.33000000D+01 -.32000000D+01 0.10966849D+01 0.10614985D-01
+ -.32000000D+01 -.31000000D+01 0.13458522D+01 0.15477983D-01
+ -.31000000D+01 -.30000000D+01 0.15762003D+01 0.13796147D-01
+ -.30000000D+01 -.29000000D+01 0.18863305D+01 0.14832579D-01
+ -.29000000D+01 -.28000000D+01 0.21837399D+01 0.15482694D-01
+ -.28000000D+01 -.27000000D+01 0.25227021D+01 0.17711569D-01
+ -.27000000D+01 -.26000000D+01 0.28899984D+01 0.20160039D-01
+ -.26000000D+01 -.25000000D+01 0.31894362D+01 0.21173379D-01
+ -.25000000D+01 -.24000000D+01 0.35881196D+01 0.19321336D-01
+ -.24000000D+01 -.23000000D+01 0.39360414D+01 0.21447911D-01
+ -.23000000D+01 -.22000000D+01 0.43237749D+01 0.26163425D-01
+ -.22000000D+01 -.21000000D+01 0.47594284D+01 0.32343061D-01
+ -.21000000D+01 -.20000000D+01 0.51349878D+01 0.29988859D-01
+ -.20000000D+01 -.19000000D+01 0.55457678D+01 0.27460802D-01
+ -.19000000D+01 -.18000000D+01 0.59621322D+01 0.27704337D-01
+ -.18000000D+01 -.17000000D+01 0.63460284D+01 0.27275924D-01
+ -.17000000D+01 -.16000000D+01 0.66755258D+01 0.29142670D-01
+ -.16000000D+01 -.15000000D+01 0.70012809D+01 0.30238599D-01
+ -.15000000D+01 -.14000000D+01 0.74235330D+01 0.30125058D-01
+ -.14000000D+01 -.13000000D+01 0.77523918D+01 0.32853314D-01
+ -.13000000D+01 -.12000000D+01 0.80934880D+01 0.31661782D-01
+ -.12000000D+01 -.11000000D+01 0.84471005D+01 0.35482843D-01
+ -.11000000D+01 -.10000000D+01 0.85940116D+01 0.32539302D-01
+ -.10000000D+01 -.90000000D+00 0.88659381D+01 0.38480683D-01
+ -.90000000D+00 -.80000000D+00 0.92143045D+01 0.34983948D-01
+ -.80000000D+00 -.70000000D+00 0.93107328D+01 0.38192945D-01
+ -.70000000D+00 -.60000000D+00 0.95170851D+01 0.39747788D-01
+ -.60000000D+00 -.50000000D+00 0.97591201D+01 0.63840656D-01
+ -.50000000D+00 -.40000000D+00 0.98068103D+01 0.37011192D-01
+ -.40000000D+00 -.30000000D+00 0.99648682D+01 0.39106680D-01
+ -.30000000D+00 -.20000000D+00 0.99292254D+01 0.39741441D-01
+ -.20000000D+00 -.10000000D+00 0.99808239D+01 0.34644340D-01
+ -.10000000D+00 0.18041124D-15 0.10031150D+02 0.36556529D-01
+ 0.70776718D-15 0.10000000D+00 0.10103767D+02 0.38367150D-01
+ 0.10000000D+00 0.20000000D+00 0.10063268D+02 0.39505546D-01
+ 0.20000000D+00 0.30000000D+00 0.99808565D+01 0.36741390D-01
+ 0.30000000D+00 0.40000000D+00 0.99363713D+01 0.46029533D-01
+ 0.40000000D+00 0.50000000D+00 0.97379059D+01 0.40639020D-01
+ 0.50000000D+00 0.60000000D+00 0.96407001D+01 0.36574102D-01
+ 0.60000000D+00 0.70000000D+00 0.95163157D+01 0.37708792D-01
+ 0.70000000D+00 0.80000000D+00 0.93607977D+01 0.42596890D-01
+ 0.80000000D+00 0.90000000D+00 0.91433578D+01 0.38304805D-01
+ 0.90000000D+00 0.10000000D+01 0.89090683D+01 0.36071568D-01
+ 0.10000000D+01 0.11000000D+01 0.86686492D+01 0.41384461D-01
+ 0.11000000D+01 0.12000000D+01 0.83513658D+01 0.32531181D-01
+ 0.12000000D+01 0.13000000D+01 0.80419274D+01 0.34073390D-01
+ 0.13000000D+01 0.14000000D+01 0.77548250D+01 0.36190455D-01
+ 0.14000000D+01 0.15000000D+01 0.73677971D+01 0.31626951D-01
+ 0.15000000D+01 0.16000000D+01 0.70336293D+01 0.31355401D-01
+ 0.16000000D+01 0.17000000D+01 0.67137394D+01 0.30187728D-01
+ 0.17000000D+01 0.18000000D+01 0.63387732D+01 0.30988478D-01
+ 0.18000000D+01 0.19000000D+01 0.59292274D+01 0.31485641D-01
+ 0.19000000D+01 0.20000000D+01 0.55565913D+01 0.25453624D-01
+ 0.20000000D+01 0.21000000D+01 0.51405657D+01 0.27547476D-01
+ 0.21000000D+01 0.22000000D+01 0.47104342D+01 0.26503142D-01
+ 0.22000000D+01 0.23000000D+01 0.43147350D+01 0.23486220D-01
+ 0.23000000D+01 0.24000000D+01 0.39799150D+01 0.22339032D-01
+ 0.24000000D+01 0.25000000D+01 0.35562576D+01 0.21241752D-01
+ 0.25000000D+01 0.26000000D+01 0.31900862D+01 0.19689369D-01
+ 0.26000000D+01 0.27000000D+01 0.28520733D+01 0.19653461D-01
+ 0.27000000D+01 0.28000000D+01 0.24922460D+01 0.18668985D-01
+ 0.28000000D+01 0.29000000D+01 0.21469456D+01 0.21418797D-01
+ 0.29000000D+01 0.30000000D+01 0.18758622D+01 0.15187949D-01
+ 0.30000000D+01 0.31000000D+01 0.16165097D+01 0.12984412D-01
+ 0.31000000D+01 0.32000000D+01 0.13126444D+01 0.11867604D-01
+ 0.32000000D+01 0.33000000D+01 0.10489626D+01 0.13659352D-01
+ 0.33000000D+01 0.34000000D+01 0.86588653D+00 0.12378187D-01
+ 0.34000000D+01 0.35000000D+01 0.68606950D+00 0.88101311D-02
+ 0.35000000D+01 0.36000000D+01 0.51860154D+00 0.63607572D-02
+ 0.36000000D+01 0.37000000D+01 0.39524667D+00 0.66275026D-02
+ 0.37000000D+01 0.38000000D+01 0.26930563D+00 0.36076090D-02
+ 0.38000000D+01 0.39000000D+01 0.17729657D+00 0.24126960D-02
+ 0.39000000D+01 0.40000000D+01 0.10977414D+00 0.15758446D-02
+ 0.40000000D+01 0.41000000D+01 0.61541435D-01 0.98979152D-03
+ 0.41000000D+01 0.42000000D+01 0.31660522D-01 0.52586899D-03
+ 0.42000000D+01 0.43000000D+01 0.12579253D-01 0.83708993D-03
+ 0.43000000D+01 0.44000000D+01 0.48852740D-02 0.98473181D-04
+ 0.44000000D+01 0.45000000D+01 0.12800899D-02 0.33263927D-04
+ 0.45000000D+01 0.46000000D+01 0.16651071D-03 0.70810753D-05
+ 0.46000000D+01 0.47000000D+01 0.14210212D-05 0.83243611D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13521857D-05 0.83398545D-06
+ -.46000000D+01 -.45000000D+01 0.14834653D-03 0.70920564D-05
+ -.45000000D+01 -.44000000D+01 0.13357501D-02 0.51911272D-04
+ -.44000000D+01 -.43000000D+01 0.51205017D-02 0.94467203D-04
+ -.43000000D+01 -.42000000D+01 0.14053175D-01 0.26471925D-03
+ -.42000000D+01 -.41000000D+01 0.32333611D-01 0.61460516D-03
+ -.41000000D+01 -.40000000D+01 0.64309310D-01 0.99552980D-03
+ -.40000000D+01 -.39000000D+01 0.11271386D+00 0.18246220D-02
+ -.39000000D+01 -.38000000D+01 0.18203745D+00 0.25651845D-02
+ -.38000000D+01 -.37000000D+01 0.28050048D+00 0.32927975D-02
+ -.37000000D+01 -.36000000D+01 0.39414315D+00 0.77510358D-02
+ -.36000000D+01 -.35000000D+01 0.52748457D+00 0.72139967D-02
+ -.35000000D+01 -.34000000D+01 0.73319192D+00 0.16061181D-01
+ -.34000000D+01 -.33000000D+01 0.89140850D+00 0.16654741D-01
+ -.33000000D+01 -.32000000D+01 0.11390596D+01 0.10629788D-01
+ -.32000000D+01 -.31000000D+01 0.13996321D+01 0.15491523D-01
+ -.31000000D+01 -.30000000D+01 0.16430674D+01 0.13804069D-01
+ -.30000000D+01 -.29000000D+01 0.19678367D+01 0.14848681D-01
+ -.29000000D+01 -.28000000D+01 0.22814433D+01 0.15500503D-01
+ -.28000000D+01 -.27000000D+01 0.26385572D+01 0.17722758D-01
+ -.27000000D+01 -.26000000D+01 0.30239267D+01 0.20185533D-01
+ -.26000000D+01 -.25000000D+01 0.33445402D+01 0.21198736D-01
+ -.25000000D+01 -.24000000D+01 0.37636865D+01 0.19358427D-01
+ -.24000000D+01 -.23000000D+01 0.41343719D+01 0.21471648D-01
+ -.23000000D+01 -.22000000D+01 0.45445818D+01 0.26232590D-01
+ -.22000000D+01 -.21000000D+01 0.50050607D+01 0.32517628D-01
+ -.21000000D+01 -.20000000D+01 0.54044625D+01 0.30164572D-01
+ -.20000000D+01 -.19000000D+01 0.58399633D+01 0.27508766D-01
+ -.19000000D+01 -.18000000D+01 0.62809040D+01 0.27736310D-01
+ -.18000000D+01 -.17000000D+01 0.66895893D+01 0.27306513D-01
+ -.17000000D+01 -.16000000D+01 0.70434121D+01 0.29159665D-01
+ -.16000000D+01 -.15000000D+01 0.73924470D+01 0.30261619D-01
+ -.15000000D+01 -.14000000D+01 0.78381658D+01 0.30145013D-01
+ -.14000000D+01 -.13000000D+01 0.81894620D+01 0.32875464D-01
+ -.13000000D+01 -.12000000D+01 0.85507977D+01 0.31697868D-01
+ -.12000000D+01 -.11000000D+01 0.89250417D+01 0.35525950D-01
+ -.11000000D+01 -.10000000D+01 0.90907370D+01 0.32582757D-01
+ -.10000000D+01 -.90000000D+00 0.93816798D+01 0.38516268D-01
+ -.90000000D+00 -.80000000D+00 0.97449885D+01 0.35019974D-01
+ -.80000000D+00 -.70000000D+00 0.98554299D+01 0.38226625D-01
+ -.70000000D+00 -.60000000D+00 0.10074791D+02 0.39784887D-01
+ -.60000000D+00 -.50000000D+00 0.10329313D+02 0.63877472D-01
+ -.50000000D+00 -.40000000D+00 0.10384669D+02 0.37070284D-01
+ -.40000000D+00 -.30000000D+00 0.10551284D+02 0.39176313D-01
+ -.30000000D+00 -.20000000D+00 0.10521233D+02 0.39799280D-01
+ -.20000000D+00 -.10000000D+00 0.10575863D+02 0.34703017D-01
+ -.10000000D+00 0.18041124D-15 0.10629838D+02 0.36707493D-01
+ 0.70776718D-15 0.10000000D+00 0.10701190D+02 0.38506484D-01
+ 0.10000000D+00 0.20000000D+00 0.10658074D+02 0.39798665D-01
+ 0.20000000D+00 0.30000000D+00 0.10573615D+02 0.37072401D-01
+ 0.30000000D+00 0.40000000D+00 0.10522213D+02 0.46070679D-01
+ 0.40000000D+00 0.50000000D+00 0.10317027D+02 0.40716247D-01
+ 0.50000000D+00 0.60000000D+00 0.10209624D+02 0.36660584D-01
+ 0.60000000D+00 0.70000000D+00 0.10075048D+02 0.37770265D-01
+ 0.70000000D+00 0.80000000D+00 0.99050633D+01 0.42634928D-01
+ 0.80000000D+00 0.90000000D+00 0.96740605D+01 0.38374644D-01
+ 0.90000000D+00 0.10000000D+01 0.94238480D+01 0.36158146D-01
+ 0.10000000D+01 0.11000000D+01 0.91656049D+01 0.41420110D-01
+ 0.11000000D+01 0.12000000D+01 0.88288789D+01 0.32561365D-01
+ 0.12000000D+01 0.13000000D+01 0.85005397D+01 0.34108393D-01
+ 0.13000000D+01 0.14000000D+01 0.81906885D+01 0.36233631D-01
+ 0.14000000D+01 0.15000000D+01 0.77804978D+01 0.32029521D-01
+ 0.15000000D+01 0.16000000D+01 0.74268165D+01 0.31757095D-01
+ 0.16000000D+01 0.17000000D+01 0.70813286D+01 0.30215731D-01
+ 0.17000000D+01 0.18000000D+01 0.66817900D+01 0.31004991D-01
+ 0.18000000D+01 0.19000000D+01 0.62488303D+01 0.31514265D-01
+ 0.19000000D+01 0.20000000D+01 0.58502495D+01 0.25494115D-01
+ 0.20000000D+01 0.21000000D+01 0.54102890D+01 0.27577025D-01
+ 0.21000000D+01 0.22000000D+01 0.49554067D+01 0.26529850D-01
+ 0.22000000D+01 0.23000000D+01 0.45365266D+01 0.23504529D-01
+ 0.23000000D+01 0.24000000D+01 0.41781601D+01 0.22368832D-01
+ 0.24000000D+01 0.25000000D+01 0.37321190D+01 0.21272342D-01
+ 0.25000000D+01 0.26000000D+01 0.33446880D+01 0.19710994D-01
+ 0.26000000D+01 0.27000000D+01 0.29865076D+01 0.19687265D-01
+ 0.27000000D+01 0.28000000D+01 0.26074175D+01 0.18681638D-01
+ 0.28000000D+01 0.29000000D+01 0.22447429D+01 0.21431481D-01
+ 0.29000000D+01 0.30000000D+01 0.19574922D+01 0.15199049D-01
+ 0.30000000D+01 0.31000000D+01 0.16832876D+01 0.13000834D-01
+ 0.31000000D+01 0.32000000D+01 0.13666393D+01 0.11880285D-01
+ 0.32000000D+01 0.33000000D+01 0.10912119D+01 0.13663310D-01
+ 0.33000000D+01 0.34000000D+01 0.89832292D+00 0.12382228D-01
+ 0.34000000D+01 0.35000000D+01 0.71011491D+00 0.88140161D-02
+ 0.35000000D+01 0.36000000D+01 0.53582449D+00 0.63641210D-02
+ 0.36000000D+01 0.37000000D+01 0.40704766D+00 0.66291181D-02
+ 0.37000000D+01 0.38000000D+01 0.27697800D+00 0.36091246D-02
+ 0.38000000D+01 0.39000000D+01 0.18196232D+00 0.24137727D-02
+ 0.39000000D+01 0.40000000D+01 0.11240540D+00 0.15765924D-02
+ 0.40000000D+01 0.41000000D+01 0.62877478D-01 0.99008005D-03
+ 0.41000000D+01 0.42000000D+01 0.32257065D-01 0.52604611D-03
+ 0.42000000D+01 0.43000000D+01 0.12803495D-01 0.83712580D-03
+ 0.43000000D+01 0.44000000D+01 0.49503846D-02 0.98492651D-04
+ 0.44000000D+01 0.45000000D+01 0.12927716D-02 0.33268098D-04
+ 0.45000000D+01 0.46000000D+01 0.16749105D-03 0.70814892D-05
+ 0.46000000D+01 0.47000000D+01 0.14236157D-05 0.83243672D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13039185D-05 0.83398231D-06
+ -.46000000D+01 -.45000000D+01 0.12977407D-03 0.70907205D-05
+ -.45000000D+01 -.44000000D+01 0.11067038D-02 0.51897790D-04
+ -.44000000D+01 -.43000000D+01 0.39974186D-02 0.94428764D-04
+ -.43000000D+01 -.42000000D+01 0.10405410D-01 0.26459293D-03
+ -.42000000D+01 -.41000000D+01 0.23059085D-01 0.61443414D-03
+ -.41000000D+01 -.40000000D+01 0.44361136D-01 0.99469601D-03
+ -.40000000D+01 -.39000000D+01 0.75036886D-01 0.18256771D-02
+ -.39000000D+01 -.38000000D+01 0.11747858D+00 0.25651637D-02
+ -.38000000D+01 -.37000000D+01 0.17822121D+00 0.32889329D-02
+ -.37000000D+01 -.36000000D+01 0.24186787D+00 0.77503793D-02
+ -.36000000D+01 -.35000000D+01 0.31221521D+00 0.72094916D-02
+ -.35000000D+01 -.34000000D+01 0.43297124D+00 0.10412591D-01
+ -.34000000D+01 -.33000000D+01 0.51512666D+00 0.11320826D-01
+ -.33000000D+01 -.32000000D+01 0.64866906D+00 0.10594427D-01
+ -.32000000D+01 -.31000000D+01 0.79030552D+00 0.15452737D-01
+ -.31000000D+01 -.30000000D+01 0.90022932D+00 0.13785502D-01
+ -.30000000D+01 -.29000000D+01 0.10780789D+01 0.14800295D-01
+ -.29000000D+01 -.28000000D+01 0.12324042D+01 0.15460556D-01
+ -.28000000D+01 -.27000000D+01 0.14164746D+01 0.17704221D-01
+ -.27000000D+01 -.26000000D+01 0.16233730D+01 0.20113275D-01
+ -.26000000D+01 -.25000000D+01 0.17496897D+01 0.21157046D-01
+ -.25000000D+01 -.24000000D+01 0.19715493D+01 0.19273538D-01
+ -.24000000D+01 -.23000000D+01 0.21343954D+01 0.21405779D-01
+ -.23000000D+01 -.22000000D+01 0.23360669D+01 0.25790631D-01
+ -.22000000D+01 -.21000000D+01 0.25752493D+01 0.31192313D-01
+ -.21000000D+01 -.20000000D+01 0.27592239D+01 0.29014317D-01
+ -.20000000D+01 -.19000000D+01 0.29738707D+01 0.27326409D-01
+ -.19000000D+01 -.18000000D+01 0.31969880D+01 0.27653175D-01
+ -.18000000D+01 -.17000000D+01 0.33903529D+01 0.27228206D-01
+ -.17000000D+01 -.16000000D+01 0.35311671D+01 0.29125467D-01
+ -.16000000D+01 -.15000000D+01 0.36781791D+01 0.30208334D-01
+ -.15000000D+01 -.14000000D+01 0.39239708D+01 0.30103572D-01
+ -.14000000D+01 -.13000000D+01 0.40844059D+01 0.32822506D-01
+ -.13000000D+01 -.12000000D+01 0.42683306D+01 0.31579844D-01
+ -.12000000D+01 -.11000000D+01 0.44724550D+01 0.35372448D-01
+ -.11000000D+01 -.10000000D+01 0.44801699D+01 0.32431542D-01
+ -.10000000D+01 -.90000000D+00 0.46174492D+01 0.38403805D-01
+ -.90000000D+00 -.80000000D+00 0.48508957D+01 0.34918290D-01
+ -.80000000D+00 -.70000000D+00 0.48422411D+01 0.38137480D-01
+ -.70000000D+00 -.60000000D+00 0.49558073D+01 0.39669642D-01
+ -.60000000D+00 -.50000000D+00 0.51139158D+01 0.63761427D-01
+ -.50000000D+00 -.40000000D+00 0.50981510D+01 0.36886113D-01
+ -.40000000D+00 -.30000000D+00 0.51981589D+01 0.38879686D-01
+ -.30000000D+00 -.20000000D+00 0.51231476D+01 0.39554376D-01
+ -.20000000D+00 -.10000000D+00 0.51502641D+01 0.34507656D-01
+ -.10000000D+00 0.18041124D-15 0.51802362D+01 0.36178173D-01
+ 0.70776718D-15 0.10000000D+00 0.52569185D+01 0.38031727D-01
+ 0.10000000D+00 0.20000000D+00 0.52314501D+01 0.38998207D-01
+ 0.20000000D+00 0.30000000D+00 0.51733819D+01 0.36178211D-01
+ 0.30000000D+00 0.40000000D+00 0.51711205D+01 0.45902359D-01
+ 0.40000000D+00 0.50000000D+00 0.50263882D+01 0.40443608D-01
+ 0.50000000D+00 0.60000000D+00 0.49972614D+01 0.36413070D-01
+ 0.60000000D+00 0.70000000D+00 0.49513050D+01 0.37604094D-01
+ 0.70000000D+00 0.80000000D+00 0.48941895D+01 0.42532005D-01
+ 0.80000000D+00 0.90000000D+00 0.47800829D+01 0.38157677D-01
+ 0.90000000D+00 0.10000000D+01 0.46626987D+01 0.35914209D-01
+ 0.10000000D+01 0.11000000D+01 0.45519392D+01 0.41326777D-01
+ 0.11000000D+01 0.12000000D+01 0.43757176D+01 0.32487032D-01
+ 0.12000000D+01 0.13000000D+01 0.42129754D+01 0.34026308D-01
+ 0.13000000D+01 0.14000000D+01 0.40902127D+01 0.36108657D-01
+ 0.14000000D+01 0.15000000D+01 0.38719093D+01 0.31176572D-01
+ 0.15000000D+01 0.16000000D+01 0.37061350D+01 0.30946243D-01
+ 0.16000000D+01 0.17000000D+01 0.35713174D+01 0.30144787D-01
+ 0.17000000D+01 0.18000000D+01 0.33833884D+01 0.30995303D-01
+ 0.18000000D+01 0.19000000D+01 0.31615387D+01 0.31438089D-01
+ 0.19000000D+01 0.20000000D+01 0.29861570D+01 0.25388216D-01
+ 0.20000000D+01 0.21000000D+01 0.27640045D+01 0.27489052D-01
+ 0.21000000D+01 0.22000000D+01 0.25289362D+01 0.26442223D-01
+ 0.22000000D+01 0.23000000D+01 0.23242488D+01 0.23462753D-01
+ 0.23000000D+01 0.24000000D+01 0.21783603D+01 0.22267240D-01
+ 0.24000000D+01 0.25000000D+01 0.19403340D+01 0.21182311D-01
+ 0.25000000D+01 0.26000000D+01 0.17512639D+01 0.19646024D-01
+ 0.26000000D+01 0.27000000D+01 0.15831383D+01 0.19812676D-01
+ 0.27000000D+01 0.28000000D+01 0.13876049D+01 0.18644419D-01
+ 0.28000000D+01 0.29000000D+01 0.11948675D+01 0.21368724D-01
+ 0.29000000D+01 0.30000000D+01 0.10671070D+01 0.15169395D-01
+ 0.30000000D+01 0.31000000D+01 0.94044998D+00 0.12953018D-01
+ 0.31000000D+01 0.32000000D+01 0.75614692D+00 0.11857885D-01
+ 0.32000000D+01 0.33000000D+01 0.60149646D+00 0.13657219D-01
+ 0.33000000D+01 0.34000000D+01 0.51427529D+00 0.12372666D-01
+ 0.34000000D+01 0.35000000D+01 0.41767256D+00 0.88024072D-02
+ 0.35000000D+01 0.36000000D+01 0.32027618D+00 0.63555571D-02
+ 0.36000000D+01 0.37000000D+01 0.25479377D+00 0.66281850D-02
+ 0.37000000D+01 0.38000000D+01 0.17482895D+00 0.36068286D-02
+ 0.38000000D+01 0.39000000D+01 0.11744976D+00 0.24122730D-02
+ 0.39000000D+01 0.40000000D+01 0.74679947D-01 0.15753821D-02
+ 0.40000000D+01 0.41000000D+01 0.42938110D-01 0.98969228D-03
+ 0.41000000D+01 0.42000000D+01 0.22975987D-01 0.52551237D-03
+ 0.42000000D+01 0.43000000D+01 0.91514747D-02 0.83695232D-03
+ 0.43000000D+01 0.44000000D+01 0.38289628D-02 0.98430316D-04
+ 0.44000000D+01 0.45000000D+01 0.10631746D-02 0.33253209D-04
+ 0.45000000D+01 0.46000000D+01 0.14893406D-03 0.70792825D-05
+ 0.46000000D+01 0.47000000D+01 0.13758292D-05 0.83243275D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13412648D-05 0.83398513D-06
+ -.46000000D+01 -.45000000D+01 0.14347463D-03 0.70919605D-05
+ -.45000000D+01 -.44000000D+01 0.12702867D-02 0.51910230D-04
+ -.44000000D+01 -.43000000D+01 0.47792231D-02 0.94476829D-04
+ -.43000000D+01 -.42000000D+01 0.12893114D-01 0.26473202D-03
+ -.42000000D+01 -.41000000D+01 0.29276755D-01 0.61465593D-03
+ -.41000000D+01 -.40000000D+01 0.57525781D-01 0.99556035D-03
+ -.40000000D+01 -.39000000D+01 0.99551874D-01 0.18259510D-02
+ -.39000000D+01 -.38000000D+01 0.15892883D+00 0.25658161D-02
+ -.38000000D+01 -.37000000D+01 0.24306139D+00 0.32923221D-02
+ -.37000000D+01 -.36000000D+01 0.33728617D+00 0.77517638D-02
+ -.36000000D+01 -.35000000D+01 0.44559931D+00 0.72132601D-02
+ -.35000000D+01 -.34000000D+01 0.61776228D+00 0.14148660D-01
+ -.34000000D+01 -.33000000D+01 0.74334817D+00 0.14825691D-01
+ -.33000000D+01 -.32000000D+01 0.94446533D+00 0.10611564D-01
+ -.32000000D+01 -.31000000D+01 0.11550643D+01 0.15474785D-01
+ -.31000000D+01 -.30000000D+01 0.13418778D+01 0.13800623D-01
+ -.30000000D+01 -.29000000D+01 0.16037270D+01 0.14831623D-01
+ -.29000000D+01 -.28000000D+01 0.18488522D+01 0.15486467D-01
+ -.28000000D+01 -.27000000D+01 0.21308302D+01 0.17713478D-01
+ -.27000000D+01 -.26000000D+01 0.24388134D+01 0.20152093D-01
+ -.26000000D+01 -.25000000D+01 0.26740096D+01 0.21172175D-01
+ -.25000000D+01 -.24000000D+01 0.30067843D+01 0.19309844D-01
+ -.24000000D+01 -.23000000D+01 0.32852369D+01 0.21452261D-01
+ -.23000000D+01 -.22000000D+01 0.36026791D+01 0.26150403D-01
+ -.22000000D+01 -.21000000D+01 0.39658396D+01 0.32291865D-01
+ -.21000000D+01 -.20000000D+01 0.42684415D+01 0.29921474D-01
+ -.20000000D+01 -.19000000D+01 0.46052028D+01 0.27448538D-01
+ -.19000000D+01 -.18000000D+01 0.49483918D+01 0.27696625D-01
+ -.18000000D+01 -.17000000D+01 0.52599903D+01 0.27275126D-01
+ -.17000000D+01 -.16000000D+01 0.55178273D+01 0.29150926D-01
+ -.16000000D+01 -.15000000D+01 0.57748052D+01 0.30245483D-01
+ -.15000000D+01 -.14000000D+01 0.61299788D+01 0.30131187D-01
+ -.14000000D+01 -.13000000D+01 0.63941721D+01 0.32862228D-01
+ -.13000000D+01 -.12000000D+01 0.66752509D+01 0.31661224D-01
+ -.12000000D+01 -.11000000D+01 0.69708825D+01 0.35479802D-01
+ -.11000000D+01 -.10000000D+01 0.70642668D+01 0.32527194D-01
+ -.10000000D+01 -.90000000D+00 0.72844811D+01 0.38465189D-01
+ -.90000000D+00 -.80000000D+00 0.75887312D+01 0.34981255D-01
+ -.80000000D+00 -.70000000D+00 0.76441930D+01 0.38195838D-01
+ -.70000000D+00 -.60000000D+00 0.78144903D+01 0.39742751D-01
+ -.60000000D+00 -.50000000D+00 0.80245466D+01 0.63830515D-01
+ -.50000000D+00 -.40000000D+00 0.80469443D+01 0.36987179D-01
+ -.40000000D+00 -.30000000D+00 0.81832299D+01 0.39083201D-01
+ -.30000000D+00 -.20000000D+00 0.81321218D+01 0.39728825D-01
+ -.20000000D+00 -.10000000D+00 0.81734828D+01 0.34616311D-01
+ -.10000000D+00 0.18041124D-15 0.82166111D+01 0.36461801D-01
+ 0.70776718D-15 0.10000000D+00 0.82901897D+01 0.38270125D-01
+ 0.10000000D+00 0.20000000D+00 0.82561573D+01 0.39303525D-01
+ 0.20000000D+00 0.30000000D+00 0.81824791D+01 0.36508453D-01
+ 0.30000000D+00 0.40000000D+00 0.81546544D+01 0.46016375D-01
+ 0.40000000D+00 0.50000000D+00 0.79771926D+01 0.40611186D-01
+ 0.50000000D+00 0.60000000D+00 0.79061275D+01 0.36527657D-01
+ 0.60000000D+00 0.70000000D+00 0.78126240D+01 0.37684650D-01
+ 0.70000000D+00 0.80000000D+00 0.76949475D+01 0.42590135D-01
+ 0.80000000D+00 0.90000000D+00 0.75172526D+01 0.38267924D-01
+ 0.90000000D+00 0.10000000D+01 0.73282236D+01 0.36024104D-01
+ 0.10000000D+01 0.11000000D+01 0.71382172D+01 0.41381514D-01
+ 0.11000000D+01 0.12000000D+01 0.68746510D+01 0.32542737D-01
+ 0.12000000D+01 0.13000000D+01 0.66222478D+01 0.34069742D-01
+ 0.13000000D+01 0.14000000D+01 0.63976606D+01 0.36179485D-01
+ 0.14000000D+01 0.15000000D+01 0.60758437D+01 0.31391417D-01
+ 0.15000000D+01 0.16000000D+01 0.58052530D+01 0.31120606D-01
+ 0.16000000D+01 0.17000000D+01 0.55562735D+01 0.30188646D-01
+ 0.17000000D+01 0.18000000D+01 0.52526891D+01 0.31003778D-01
+ 0.18000000D+01 0.19000000D+01 0.49146233D+01 0.31479371D-01
+ 0.19000000D+01 0.20000000D+01 0.46169766D+01 0.25442647D-01
+ 0.20000000D+01 0.21000000D+01 0.42736498D+01 0.27544005D-01
+ 0.21000000D+01 0.22000000D+01 0.39170766D+01 0.26500444D-01
+ 0.22000000D+01 0.23000000D+01 0.35929669D+01 0.23491746D-01
+ 0.23000000D+01 0.24000000D+01 0.33294891D+01 0.22332520D-01
+ 0.24000000D+01 0.25000000D+01 0.29747596D+01 0.21234952D-01
+ 0.25000000D+01 0.26000000D+01 0.26745304D+01 0.19686210D-01
+ 0.26000000D+01 0.27000000D+01 0.23993805D+01 0.19842148D-01
+ 0.27000000D+01 0.28000000D+01 0.21009514D+01 0.18672703D-01
+ 0.28000000D+01 0.29000000D+01 0.18117335D+01 0.21417227D-01
+ 0.29000000D+01 0.30000000D+01 0.15934311D+01 0.15190954D-01
+ 0.30000000D+01 0.31000000D+01 0.13821400D+01 0.12982431D-01
+ 0.31000000D+01 0.32000000D+01 0.11216366D+01 0.11864852D-01
+ 0.32000000D+01 0.33000000D+01 0.89686645D+00 0.13662117D-01
+ 0.33000000D+01 0.34000000D+01 0.74782431D+00 0.12381072D-01
+ 0.34000000D+01 0.35000000D+01 0.59720157D+00 0.88116418D-02
+ 0.35000000D+01 0.36000000D+01 0.45384478D+00 0.63623631D-02
+ 0.36000000D+01 0.37000000D+01 0.35017406D+00 0.66295973D-02
+ 0.37000000D+01 0.38000000D+01 0.23959276D+00 0.36085585D-02
+ 0.38000000D+01 0.39000000D+01 0.15885787D+00 0.24136852D-02
+ 0.39000000D+01 0.40000000D+01 0.99219429D-01 0.15765509D-02
+ 0.40000000D+01 0.41000000D+01 0.56103549D-01 0.99014909D-03
+ 0.41000000D+01 0.42000000D+01 0.29199703D-01 0.52599904D-03
+ 0.42000000D+01 0.43000000D+01 0.11642068D-01 0.83710365D-03
+ 0.43000000D+01 0.44000000D+01 0.46093378D-02 0.98489500D-04
+ 0.44000000D+01 0.45000000D+01 0.12271336D-02 0.33267357D-04
+ 0.45000000D+01 0.46000000D+01 0.16262397D-03 0.70812480D-05
+ 0.46000000D+01 0.47000000D+01 0.14127805D-05 0.83243619D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13487655D-05 0.83398566D-06
+ -.46000000D+01 -.45000000D+01 0.14662384D-03 0.70921948D-05
+ -.45000000D+01 -.44000000D+01 0.13113820D-02 0.51912706D-04
+ -.44000000D+01 -.43000000D+01 0.49889330D-02 0.94484556D-04
+ -.43000000D+01 -.42000000D+01 0.13594186D-01 0.26476028D-03
+ -.42000000D+01 -.41000000D+01 0.31099052D-01 0.61470617D-03
+ -.41000000D+01 -.40000000D+01 0.61520340D-01 0.99575592D-03
+ -.40000000D+01 -.39000000D+01 0.10721292D+00 0.18257798D-02
+ -.39000000D+01 -.38000000D+01 0.17223812D+00 0.25659952D-02
+ -.38000000D+01 -.37000000D+01 0.26439951D+00 0.32935218D-02
+ -.37000000D+01 -.36000000D+01 0.36939800D+00 0.77520778D-02
+ -.36000000D+01 -.35000000D+01 0.49136704D+00 0.72149192D-02
+ -.35000000D+01 -.34000000D+01 0.68237457D+00 0.15709536D-01
+ -.34000000D+01 -.33000000D+01 0.82415142D+00 0.16319219D-01
+ -.33000000D+01 -.32000000D+01 0.10507850D+01 0.10625800D-01
+ -.32000000D+01 -.31000000D+01 0.12877728D+01 0.15488544D-01
+ -.31000000D+01 -.30000000D+01 0.15043174D+01 0.13806449D-01
+ -.30000000D+01 -.29000000D+01 0.17989871D+01 0.14847358D-01
+ -.29000000D+01 -.28000000D+01 0.20797595D+01 0.15501685D-01
+ -.28000000D+01 -.27000000D+01 0.24006512D+01 0.17720847D-01
+ -.27000000D+01 -.26000000D+01 0.27484729D+01 0.20175999D-01
+ -.26000000D+01 -.25000000D+01 0.30276849D+01 0.21188220D-01
+ -.25000000D+01 -.24000000D+01 0.34045631D+01 0.19339838D-01
+ -.24000000D+01 -.23000000D+01 0.37300776D+01 0.21474923D-01
+ -.23000000D+01 -.22000000D+01 0.40945442D+01 0.26234961D-01
+ -.22000000D+01 -.21000000D+01 0.45076142D+01 0.32529141D-01
+ -.21000000D+01 -.20000000D+01 0.48591875D+01 0.30148887D-01
+ -.20000000D+01 -.19000000D+01 0.52460621D+01 0.27498682D-01
+ -.19000000D+01 -.18000000D+01 0.56386706D+01 0.27727966D-01
+ -.18000000D+01 -.17000000D+01 0.59992376D+01 0.27303858D-01
+ -.17000000D+01 -.16000000D+01 0.63055067D+01 0.29162897D-01
+ -.16000000D+01 -.15000000D+01 0.66084938D+01 0.30262151D-01
+ -.15000000D+01 -.14000000D+01 0.70093416D+01 0.30145957D-01
+ -.14000000D+01 -.13000000D+01 0.73171575D+01 0.32880474D-01
+ -.13000000D+01 -.12000000D+01 0.76384096D+01 0.31695566D-01
+ -.12000000D+01 -.11000000D+01 0.79731023D+01 0.35523731D-01
+ -.11000000D+01 -.10000000D+01 0.81027848D+01 0.32573381D-01
+ -.10000000D+01 -.90000000D+00 0.83585312D+01 0.38503007D-01
+ -.90000000D+00 -.80000000D+00 0.86920955D+01 0.35015831D-01
+ -.80000000D+00 -.70000000D+00 0.87748322D+01 0.38224360D-01
+ -.70000000D+00 -.60000000D+00 0.89695133D+01 0.39777304D-01
+ -.60000000D+00 -.50000000D+00 0.92021086D+01 0.63867242D-01
+ -.50000000D+00 -.40000000D+00 0.92402788D+01 0.37048504D-01
+ -.40000000D+00 -.30000000D+00 0.93922182D+01 0.39161776D-01
+ -.30000000D+00 -.20000000D+00 0.93513287D+01 0.39792675D-01
+ -.20000000D+00 -.10000000D+00 0.93989740D+01 0.34682028D-01
+ -.10000000D+00 0.18041124D-15 0.94481007D+01 0.36646077D-01
+ 0.70776718D-15 0.10000000D+00 0.95200083D+01 0.38440819D-01
+ 0.10000000D+00 0.20000000D+00 0.94815491D+01 0.39594048D-01
+ 0.20000000D+00 0.30000000D+00 0.94026844D+01 0.36839789D-01
+ 0.30000000D+00 0.40000000D+00 0.93629975D+01 0.46062748D-01
+ 0.40000000D+00 0.50000000D+00 0.91720440D+01 0.40693812D-01
+ 0.50000000D+00 0.60000000D+00 0.90826322D+01 0.36615816D-01
+ 0.60000000D+00 0.70000000D+00 0.89688747D+01 0.37745157D-01
+ 0.70000000D+00 0.80000000D+00 0.88248849D+01 0.42625298D-01
+ 0.80000000D+00 0.90000000D+00 0.86208134D+01 0.38342578D-01
+ 0.90000000D+00 0.10000000D+01 0.84011922D+01 0.36109991D-01
+ 0.10000000D+01 0.11000000D+01 0.81773037D+01 0.41411595D-01
+ 0.11000000D+01 0.12000000D+01 0.78768465D+01 0.32566583D-01
+ 0.12000000D+01 0.13000000D+01 0.75870827D+01 0.34096177D-01
+ 0.13000000D+01 0.14000000D+01 0.73191409D+01 0.36219145D-01
+ 0.14000000D+01 0.15000000D+01 0.69532428D+01 0.31676489D-01
+ 0.15000000D+01 0.16000000D+01 0.66410938D+01 0.31398454D-01
+ 0.16000000D+01 0.17000000D+01 0.63434261D+01 0.30209960D-01
+ 0.17000000D+01 0.18000000D+01 0.59915250D+01 0.31009448D-01
+ 0.18000000D+01 0.19000000D+01 0.56059231D+01 0.31504896D-01
+ 0.19000000D+01 0.20000000D+01 0.52570158D+01 0.25478130D-01
+ 0.20000000D+01 0.21000000D+01 0.48646689D+01 0.27572176D-01
+ 0.21000000D+01 0.22000000D+01 0.44582488D+01 0.26527197D-01
+ 0.22000000D+01 0.23000000D+01 0.40858472D+01 0.23506301D-01
+ 0.23000000D+01 0.24000000D+01 0.37742430D+01 0.22363119D-01
+ 0.24000000D+01 0.25000000D+01 0.33726789D+01 0.21264551D-01
+ 0.25000000D+01 0.26000000D+01 0.30277133D+01 0.19706425D-01
+ 0.26000000D+01 0.27000000D+01 0.27099357D+01 0.19800663D-01
+ 0.27000000D+01 0.28000000D+01 0.23700700D+01 0.18683638D-01
+ 0.28000000D+01 0.29000000D+01 0.20428434D+01 0.21430943D-01
+ 0.29000000D+01 0.30000000D+01 0.17888096D+01 0.15199477D-01
+ 0.30000000D+01 0.31000000D+01 0.15445361D+01 0.12998235D-01
+ 0.31000000D+01 0.32000000D+01 0.12546601D+01 0.11876515D-01
+ 0.32000000D+01 0.33000000D+01 0.10030046D+01 0.13664499D-01
+ 0.33000000D+01 0.34000000D+01 0.83063047D+00 0.12383888D-01
+ 0.34000000D+01 0.35000000D+01 0.65983697D+00 0.88149784D-02
+ 0.35000000D+01 0.36000000D+01 0.49968234D+00 0.63650657D-02
+ 0.36000000D+01 0.37000000D+01 0.38227071D+00 0.66302256D-02
+ 0.37000000D+01 0.38000000D+01 0.26090484D+00 0.36095200D-02
+ 0.38000000D+01 0.39000000D+01 0.17215896D+00 0.24142760D-02
+ 0.39000000D+01 0.40000000D+01 0.10689525D+00 0.15769663D-02
+ 0.40000000D+01 0.41000000D+01 0.60094219D-01 0.99027667D-03
+ 0.41000000D+01 0.42000000D+01 0.31023573D-01 0.52612418D-03
+ 0.42000000D+01 0.43000000D+01 0.12344457D-01 0.83713572D-03
+ 0.43000000D+01 0.44000000D+01 0.48187340D-02 0.98502457D-04
+ 0.44000000D+01 0.45000000D+01 0.12683282D-02 0.33270209D-04
+ 0.45000000D+01 0.46000000D+01 0.16576963D-03 0.70816230D-05
+ 0.46000000D+01 0.47000000D+01 0.14202063D-05 0.83243683D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13514516D-05 0.83398585D-06
+ -.46000000D+01 -.45000000D+01 0.14780437D-03 0.70922768D-05
+ -.45000000D+01 -.44000000D+01 0.13273545D-02 0.51913606D-04
+ -.44000000D+01 -.43000000D+01 0.50730017D-02 0.94487024D-04
+ -.43000000D+01 -.42000000D+01 0.13882564D-01 0.26477051D-03
+ -.42000000D+01 -.41000000D+01 0.31865341D-01 0.61472652D-03
+ -.41000000D+01 -.40000000D+01 0.63234480D-01 0.99583497D-03
+ -.40000000D+01 -.39000000D+01 0.11056175D+00 0.18256985D-02
+ -.39000000D+01 -.38000000D+01 0.17815623D+00 0.25660876D-02
+ -.38000000D+01 -.37000000D+01 0.27404517D+00 0.32941018D-02
+ -.37000000D+01 -.36000000D+01 0.38413529D+00 0.77521846D-02
+ -.36000000D+01 -.35000000D+01 0.51266369D+00 0.72158000D-02
+ -.35000000D+01 -.34000000D+01 0.71272835D+00 0.16396371D-01
+ -.34000000D+01 -.33000000D+01 0.86275611D+00 0.16980040D-01
+ -.33000000D+01 -.32000000D+01 0.11019707D+01 0.10635353D-01
+ -.32000000D+01 -.31000000D+01 0.13522735D+01 0.15497032D-01
+ -.31000000D+01 -.30000000D+01 0.15839423D+01 0.13809437D-01
+ -.30000000D+01 -.29000000D+01 0.18954547D+01 0.14856298D-01
+ -.29000000D+01 -.28000000D+01 0.21946026D+01 0.15510574D-01
+ -.28000000D+01 -.27000000D+01 0.25358044D+01 0.17726649D-01
+ -.27000000D+01 -.26000000D+01 0.29042139D+01 0.20192271D-01
+ -.26000000D+01 -.25000000D+01 0.32067090D+01 0.21204287D-01
+ -.25000000D+01 -.24000000D+01 0.36065772D+01 0.19364984D-01
+ -.24000000D+01 -.23000000D+01 0.39571580D+01 0.21486596D-01
+ -.23000000D+01 -.22000000D+01 0.43465726D+01 0.26267623D-01
+ -.22000000D+01 -.21000000D+01 0.47862062D+01 0.32608028D-01
+ -.21000000D+01 -.20000000D+01 0.51639511D+01 0.30239963D-01
+ -.20000000D+01 -.19000000D+01 0.55776656D+01 0.27526161D-01
+ -.19000000D+01 -.18000000D+01 0.59967801D+01 0.27747809D-01
+ -.18000000D+01 -.17000000D+01 0.63838754D+01 0.27321265D-01
+ -.17000000D+01 -.16000000D+01 0.67162629D+01 0.29170392D-01
+ -.16000000D+01 -.15000000D+01 0.70442840D+01 0.30272877D-01
+ -.15000000D+01 -.14000000D+01 0.74699350D+01 0.30155500D-01
+ -.14000000D+01 -.13000000D+01 0.78015798D+01 0.32890428D-01
+ -.13000000D+01 -.12000000D+01 0.81445057D+01 0.31713965D-01
+ -.12000000D+01 -.11000000D+01 0.85009238D+01 0.35546408D-01
+ -.11000000D+01 -.10000000D+01 0.86504331D+01 0.32599335D-01
+ -.10000000D+01 -.90000000D+00 0.89257956D+01 0.38526549D-01
+ -.90000000D+00 -.80000000D+00 0.92753023D+01 0.35037219D-01
+ -.80000000D+00 -.70000000D+00 0.93730525D+01 0.38242327D-01
+ -.70000000D+00 -.60000000D+00 0.95812638D+01 0.39798386D-01
+ -.60000000D+00 -.50000000D+00 0.98264772D+01 0.63891133D-01
+ -.50000000D+00 -.40000000D+00 0.98732265D+01 0.37088262D-01
+ -.40000000D+00 -.30000000D+00 0.10033759D+02 0.39201547D-01
+ -.30000000D+00 -.20000000D+00 0.99986725D+01 0.39823784D-01
+ -.20000000D+00 -.10000000D+00 0.10049822D+02 0.34720870D-01
+ -.10000000D+00 0.18041124D-15 0.10102225D+02 0.36754380D-01
+ 0.70776718D-15 0.10000000D+00 0.10173266D+02 0.38543829D-01
+ 0.10000000D+00 0.20000000D+00 0.10132084D+02 0.39833824D-01
+ 0.20000000D+00 0.30000000D+00 0.10050830D+02 0.37110925D-01
+ 0.30000000D+00 0.40000000D+00 0.10004254D+02 0.46086361D-01
+ 0.40000000D+00 0.50000000D+00 0.98059262D+01 0.40744005D-01
+ 0.50000000D+00 0.60000000D+00 0.97062500D+01 0.36679204D-01
+ 0.60000000D+00 0.70000000D+00 0.95813893D+01 0.37788518D-01
+ 0.70000000D+00 0.80000000D+00 0.94226659D+01 0.42649508D-01
+ 0.80000000D+00 0.90000000D+00 0.92042497D+01 0.38393260D-01
+ 0.90000000D+00 0.10000000D+01 0.89678638D+01 0.36174629D-01
+ 0.10000000D+01 0.11000000D+01 0.87251392D+01 0.41432886D-01
+ 0.11000000D+01 0.12000000D+01 0.84044771D+01 0.32580230D-01
+ 0.12000000D+01 0.13000000D+01 0.80942976D+01 0.34118070D-01
+ 0.13000000D+01 0.14000000D+01 0.78026226D+01 0.36247283D-01
+ 0.14000000D+01 0.15000000D+01 0.74122660D+01 0.32001991D-01
+ 0.15000000D+01 0.16000000D+01 0.70785741D+01 0.31725770D-01
+ 0.16000000D+01 0.17000000D+01 0.67540070D+01 0.30225056D-01
+ 0.17000000D+01 0.18000000D+01 0.63758402D+01 0.31015146D-01
+ 0.18000000D+01 0.19000000D+01 0.59647071D+01 0.31523285D-01
+ 0.19000000D+01 0.20000000D+01 0.55880204D+01 0.25505263D-01
+ 0.20000000D+01 0.21000000D+01 0.51696862D+01 0.27589069D-01
+ 0.21000000D+01 0.22000000D+01 0.47364698D+01 0.26541508D-01
+ 0.22000000D+01 0.23000000D+01 0.43385436D+01 0.23514948D-01
+ 0.23000000D+01 0.24000000D+01 0.40011523D+01 0.22380185D-01
+ 0.24000000D+01 0.25000000D+01 0.35749500D+01 0.21283215D-01
+ 0.25000000D+01 0.26000000D+01 0.32064587D+01 0.19719012D-01
+ 0.26000000D+01 0.27000000D+01 0.28663200D+01 0.19776300D-01
+ 0.27000000D+01 0.28000000D+01 0.25046960D+01 0.18689292D-01
+ 0.28000000D+01 0.29000000D+01 0.21578163D+01 0.21437317D-01
+ 0.29000000D+01 0.30000000D+01 0.18852833D+01 0.15204596D-01
+ 0.30000000D+01 0.31000000D+01 0.16241240D+01 0.13007951D-01
+ 0.31000000D+01 0.32000000D+01 0.13193239D+01 0.11884749D-01
+ 0.32000000D+01 0.33000000D+01 0.10540978D+01 0.13665989D-01
+ 0.33000000D+01 0.34000000D+01 0.87010214D+00 0.12385285D-01
+ 0.34000000D+01 0.35000000D+01 0.68933355D+00 0.88165250D-02
+ 0.35000000D+01 0.36000000D+01 0.52101148D+00 0.63663295D-02
+ 0.36000000D+01 0.37000000D+01 0.39699950D+00 0.66305525D-02
+ 0.37000000D+01 0.38000000D+01 0.27053955D+00 0.36100798D-02
+ 0.38000000D+01 0.39000000D+01 0.17807548D+00 0.24145834D-02
+ 0.39000000D+01 0.40000000D+01 0.11025160D+00 0.15771716D-02
+ 0.40000000D+01 0.41000000D+01 0.61806216D-01 0.99033216D-03
+ 0.41000000D+01 0.42000000D+01 0.31790586D-01 0.52617586D-03
+ 0.42000000D+01 0.43000000D+01 0.12633429D-01 0.83714856D-03
+ 0.43000000D+01 0.44000000D+01 0.49026845D-02 0.98507344D-04
+ 0.44000000D+01 0.45000000D+01 0.12843413D-02 0.33271236D-04
+ 0.45000000D+01 0.46000000D+01 0.16694871D-03 0.70817553D-05
+ 0.46000000D+01 0.47000000D+01 0.14228659D-05 0.83243706D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13352213D-05 0.83398174D-06
+ -.46000000D+01 -.45000000D+01 0.14275433D-03 0.70903394D-05
+ -.45000000D+01 -.44000000D+01 0.12684294D-02 0.51893157D-04
+ -.44000000D+01 -.43000000D+01 0.47900253D-02 0.94366441D-04
+ -.43000000D+01 -.42000000D+01 0.12968331D-01 0.26445229D-03
+ -.42000000D+01 -.41000000D+01 0.29536312D-01 0.61406132D-03
+ -.41000000D+01 -.40000000D+01 0.58192904D-01 0.99356932D-03
+ -.40000000D+01 -.39000000D+01 0.10099193D+00 0.18224352D-02
+ -.39000000D+01 -.38000000D+01 0.16172307D+00 0.25611111D-02
+ -.38000000D+01 -.37000000D+01 0.24772784D+00 0.32849162D-02
+ -.37000000D+01 -.36000000D+01 0.34466062D+00 0.77463470D-02
+ -.36000000D+01 -.35000000D+01 0.45683044D+00 0.72043352D-02
+ -.35000000D+01 -.34000000D+01 0.62984972D+00 0.11471851D-01
+ -.34000000D+01 -.33000000D+01 0.76791993D+00 0.12296849D-01
+ -.33000000D+01 -.32000000D+01 0.97195579D+00 0.10587348D-01
+ -.32000000D+01 -.31000000D+01 0.11899826D+01 0.15448347D-01
+ -.31000000D+01 -.30000000D+01 0.13851179D+01 0.13769502D-01
+ -.30000000D+01 -.29000000D+01 0.16561502D+01 0.14790189D-01
+ -.29000000D+01 -.28000000D+01 0.19108913D+01 0.15441831D-01
+ -.28000000D+01 -.27000000D+01 0.22028483D+01 0.17688871D-01
+ -.27000000D+01 -.26000000D+01 0.25228449D+01 0.20108307D-01
+ -.26000000D+01 -.25000000D+01 0.27690016D+01 0.21140554D-01
+ -.25000000D+01 -.24000000D+01 0.31148017D+01 0.19258010D-01
+ -.24000000D+01 -.23000000D+01 0.34055790D+01 0.21392358D-01
+ -.23000000D+01 -.22000000D+01 0.37369139D+01 0.25830230D-01
+ -.22000000D+01 -.21000000D+01 0.41099493D+01 0.31387860D-01
+ -.21000000D+01 -.20000000D+01 0.44271765D+01 0.29174141D-01
+ -.20000000D+01 -.19000000D+01 0.47767104D+01 0.27329874D-01
+ -.19000000D+01 -.18000000D+01 0.51322728D+01 0.27636584D-01
+ -.18000000D+01 -.17000000D+01 0.54565901D+01 0.27209158D-01
+ -.17000000D+01 -.16000000D+01 0.57256264D+01 0.29101652D-01
+ -.16000000D+01 -.15000000D+01 0.59954924D+01 0.30180394D-01
+ -.15000000D+01 -.14000000D+01 0.63606028D+01 0.30083009D-01
+ -.14000000D+01 -.13000000D+01 0.66348210D+01 0.32799099D-01
+ -.13000000D+01 -.12000000D+01 0.69266256D+01 0.31562087D-01
+ -.12000000D+01 -.11000000D+01 0.72324511D+01 0.35377976D-01
+ -.11000000D+01 -.10000000D+01 0.73334046D+01 0.32431970D-01
+ -.10000000D+01 -.90000000D+00 0.75597918D+01 0.38390311D-01
+ -.90000000D+00 -.80000000D+00 0.78726432D+01 0.34900920D-01
+ -.80000000D+00 -.70000000D+00 0.79353860D+01 0.38123390D-01
+ -.70000000D+00 -.60000000D+00 0.81106079D+01 0.39655751D-01
+ -.60000000D+00 -.50000000D+00 0.83232210D+01 0.63765166D-01
+ -.50000000D+00 -.40000000D+00 0.83520859D+01 0.36885661D-01
+ -.40000000D+00 -.30000000D+00 0.84900776D+01 0.38901022D-01
+ -.30000000D+00 -.20000000D+00 0.84416674D+01 0.39574449D-01
+ -.20000000D+00 -.10000000D+00 0.84865117D+01 0.34518848D-01
+ -.10000000D+00 0.18041124D-15 0.85270850D+01 0.36240676D-01
+ 0.70776718D-15 0.10000000D+00 0.86029689D+01 0.38072203D-01
+ 0.10000000D+00 0.20000000D+00 0.85677058D+01 0.39069652D-01
+ 0.20000000D+00 0.30000000D+00 0.84920125D+01 0.36228008D-01
+ 0.30000000D+00 0.40000000D+00 0.84624404D+01 0.45911039D-01
+ 0.40000000D+00 0.50000000D+00 0.82811080D+01 0.40459130D-01
+ 0.50000000D+00 0.60000000D+00 0.82071095D+01 0.36415820D-01
+ 0.60000000D+00 0.70000000D+00 0.81069401D+01 0.37596288D-01
+ 0.70000000D+00 0.80000000D+00 0.79855678D+01 0.42516941D-01
+ 0.80000000D+00 0.90000000D+00 0.78012114D+01 0.38166785D-01
+ 0.90000000D+00 0.10000000D+01 0.76047223D+01 0.35925888D-01
+ 0.10000000D+01 0.11000000D+01 0.74071122D+01 0.41302803D-01
+ 0.11000000D+01 0.12000000D+01 0.71363928D+01 0.32463649D-01
+ 0.12000000D+01 0.13000000D+01 0.68721228D+01 0.34008514D-01
+ 0.13000000D+01 0.14000000D+01 0.66405138D+01 0.36099909D-01
+ 0.14000000D+01 0.15000000D+01 0.63078839D+01 0.31201481D-01
+ 0.15000000D+01 0.16000000D+01 0.60240254D+01 0.30964671D-01
+ 0.16000000D+01 0.17000000D+01 0.57649521D+01 0.30130634D-01
+ 0.17000000D+01 0.18000000D+01 0.54493720D+01 0.30961798D-01
+ 0.18000000D+01 0.19000000D+01 0.50977405D+01 0.31428812D-01
+ 0.19000000D+01 0.20000000D+01 0.47886443D+01 0.25393063D-01
+ 0.20000000D+01 0.21000000D+01 0.44322431D+01 0.27487409D-01
+ 0.21000000D+01 0.22000000D+01 0.40630450D+01 0.26430281D-01
+ 0.22000000D+01 0.23000000D+01 0.37257004D+01 0.23441434D-01
+ 0.23000000D+01 0.24000000D+01 0.34488867D+01 0.22261110D-01
+ 0.24000000D+01 0.25000000D+01 0.30828186D+01 0.21175034D-01
+ 0.25000000D+01 0.26000000D+01 0.27705182D+01 0.19638692D-01
+ 0.26000000D+01 0.27000000D+01 0.24834098D+01 0.19665353D-01
+ 0.27000000D+01 0.28000000D+01 0.21736718D+01 0.18635365D-01
+ 0.28000000D+01 0.29000000D+01 0.18738744D+01 0.21401563D-01
+ 0.29000000D+01 0.30000000D+01 0.16452081D+01 0.15160241D-01
+ 0.30000000D+01 0.31000000D+01 0.14256453D+01 0.12944519D-01
+ 0.31000000D+01 0.32000000D+01 0.11558783D+01 0.11832876D-01
+ 0.32000000D+01 0.33000000D+01 0.92432744D+00 0.13647341D-01
+ 0.33000000D+01 0.34000000D+01 0.76878623D+00 0.12365242D-01
+ 0.34000000D+01 0.35000000D+01 0.61277270D+00 0.87970688D-02
+ 0.35000000D+01 0.36000000D+01 0.46496559D+00 0.63518122D-02
+ 0.36000000D+01 0.37000000D+01 0.35765962D+00 0.66230772D-02
+ 0.37000000D+01 0.38000000D+01 0.24421706D+00 0.36032609D-02
+ 0.38000000D+01 0.39000000D+01 0.16161668D+00 0.24098379D-02
+ 0.39000000D+01 0.40000000D+01 0.10067405D+00 0.15734863D-02
+ 0.40000000D+01 0.41000000D+01 0.56767255D-01 0.98884350D-03
+ 0.41000000D+01 0.42000000D+01 0.29454947D-01 0.52517938D-03
+ 0.42000000D+01 0.43000000D+01 0.11715131D-01 0.83691105D-03
+ 0.43000000D+01 0.44000000D+01 0.46218026D-02 0.98385776D-04
+ 0.44000000D+01 0.45000000D+01 0.12256724D-02 0.33245691D-04
+ 0.45000000D+01 0.46000000D+01 0.16191578D-03 0.70790114D-05
+ 0.46000000D+01 0.47000000D+01 0.14071765D-05 0.83243271D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13446429D-05 0.83398385D-06
+ -.46000000D+01 -.45000000D+01 0.14576609D-03 0.70913142D-05
+ -.45000000D+01 -.44000000D+01 0.13038570D-02 0.51903296D-04
+ -.44000000D+01 -.43000000D+01 0.49608917D-02 0.94423885D-04
+ -.43000000D+01 -.42000000D+01 0.13520964D-01 0.26460404D-03
+ -.42000000D+01 -.41000000D+01 0.30944743D-01 0.61436307D-03
+ -.41000000D+01 -.40000000D+01 0.61236107D-01 0.99459767D-03
+ -.40000000D+01 -.39000000D+01 0.10676760D+00 0.18238936D-02
+ -.39000000D+01 -.38000000D+01 0.17164826D+00 0.25633218D-02
+ -.38000000D+01 -.37000000D+01 0.26358093D+00 0.32889992D-02
+ -.37000000D+01 -.36000000D+01 0.36840018D+00 0.77488461D-02
+ -.36000000D+01 -.35000000D+01 0.49046775D+00 0.72090662D-02
+ -.35000000D+01 -.34000000D+01 0.67845796D+00 0.13355388D-01
+ -.34000000D+01 -.33000000D+01 0.82611143D+00 0.14068620D-01
+ -.33000000D+01 -.32000000D+01 0.10499076D+01 0.10602762D-01
+ -.32000000D+01 -.31000000D+01 0.12872211D+01 0.15464751D-01
+ -.31000000D+01 -.30000000D+01 0.15041408D+01 0.13786138D-01
+ -.30000000D+01 -.29000000D+01 0.17991799D+01 0.14814952D-01
+ -.29000000D+01 -.28000000D+01 0.20801924D+01 0.15466325D-01
+ -.28000000D+01 -.27000000D+01 0.24009475D+01 0.17702913D-01
+ -.27000000D+01 -.26000000D+01 0.27502033D+01 0.20137975D-01
+ -.26000000D+01 -.25000000D+01 0.30289362D+01 0.21159259D-01
+ -.25000000D+01 -.24000000D+01 0.34073135D+01 0.19289470D-01
+ -.24000000D+01 -.23000000D+01 0.37328319D+01 0.21426890D-01
+ -.23000000D+01 -.22000000D+01 0.40985570D+01 0.26036857D-01
+ -.22000000D+01 -.21000000D+01 0.45100163D+01 0.31989687D-01
+ -.21000000D+01 -.20000000D+01 0.48626376D+01 0.29674435D-01
+ -.20000000D+01 -.19000000D+01 0.52494515D+01 0.27405450D-01
+ -.19000000D+01 -.18000000D+01 0.56420337D+01 0.27674162D-01
+ -.18000000D+01 -.17000000D+01 0.60028519D+01 0.27250207D-01
+ -.17000000D+01 -.16000000D+01 0.63082402D+01 0.29127785D-01
+ -.16000000D+01 -.15000000D+01 0.66119444D+01 0.30215907D-01
+ -.15000000D+01 -.14000000D+01 0.70115062D+01 0.30111040D-01
+ -.14000000D+01 -.13000000D+01 0.73184549D+01 0.32834188D-01
+ -.13000000D+01 -.12000000D+01 0.76402833D+01 0.31617382D-01
+ -.12000000D+01 -.11000000D+01 0.79749192D+01 0.35443675D-01
+ -.11000000D+01 -.10000000D+01 0.81033447D+01 0.32494521D-01
+ -.10000000D+01 -.90000000D+00 0.83565339D+01 0.38436587D-01
+ -.90000000D+00 -.80000000D+00 0.86913049D+01 0.34949307D-01
+ -.80000000D+00 -.70000000D+00 0.87741233D+01 0.38166761D-01
+ -.70000000D+00 -.60000000D+00 0.89677689D+01 0.39708830D-01
+ -.60000000D+00 -.50000000D+00 0.91976654D+01 0.63807204D-01
+ -.50000000D+00 -.40000000D+00 0.92379360D+01 0.36952108D-01
+ -.40000000D+00 -.30000000D+00 0.93880508D+01 0.39020175D-01
+ -.30000000D+00 -.20000000D+00 0.93472090D+01 0.39676949D-01
+ -.20000000D+00 -.10000000D+00 0.93961771D+01 0.34589193D-01
+ -.10000000D+00 0.18041124D-15 0.94420171D+01 0.36398461D-01
+ 0.70776718D-15 0.10000000D+00 0.95162586D+01 0.38212808D-01
+ 0.10000000D+00 0.20000000D+00 0.94781042D+01 0.39255927D-01
+ 0.20000000D+00 0.30000000D+00 0.93978687D+01 0.36444678D-01
+ 0.30000000D+00 0.40000000D+00 0.93597496D+01 0.45980320D-01
+ 0.40000000D+00 0.50000000D+00 0.91682210D+01 0.40559371D-01
+ 0.50000000D+00 0.60000000D+00 0.90803313D+01 0.36493544D-01
+ 0.60000000D+00 0.70000000D+00 0.89655136D+01 0.37654271D-01
+ 0.70000000D+00 0.80000000D+00 0.88240620D+01 0.42561399D-01
+ 0.80000000D+00 0.90000000D+00 0.86196269D+01 0.38238504D-01
+ 0.90000000D+00 0.10000000D+01 0.84006555D+01 0.35999668D-01
+ 0.10000000D+01 0.11000000D+01 0.81776364D+01 0.41349405D-01
+ 0.11000000D+01 0.12000000D+01 0.78787909D+01 0.32507098D-01
+ 0.12000000D+01 0.13000000D+01 0.75871529D+01 0.34043821D-01
+ 0.13000000D+01 0.14000000D+01 0.73226747D+01 0.36149747D-01
+ 0.14000000D+01 0.15000000D+01 0.69575032D+01 0.31357529D-01
+ 0.15000000D+01 0.16000000D+01 0.66421320D+01 0.31100642D-01
+ 0.16000000D+01 0.17000000D+01 0.63467525D+01 0.30164716D-01
+ 0.17000000D+01 0.18000000D+01 0.59952926D+01 0.30981186D-01
+ 0.18000000D+01 0.19000000D+01 0.56084154D+01 0.31458508D-01
+ 0.19000000D+01 0.20000000D+01 0.52611688D+01 0.25429120D-01
+ 0.20000000D+01 0.21000000D+01 0.48679448D+01 0.27525919D-01
+ 0.21000000D+01 0.22000000D+01 0.44618194D+01 0.26471661D-01
+ 0.22000000D+01 0.23000000D+01 0.40885903D+01 0.23468286D-01
+ 0.23000000D+01 0.24000000D+01 0.37764394D+01 0.22304829D-01
+ 0.24000000D+01 0.25000000D+01 0.33752654D+01 0.21212504D-01
+ 0.25000000D+01 0.26000000D+01 0.30297834D+01 0.19668083D-01
+ 0.26000000D+01 0.27000000D+01 0.27112278D+01 0.19705492D-01
+ 0.27000000D+01 0.28000000D+01 0.23711741D+01 0.18657766D-01
+ 0.28000000D+01 0.29000000D+01 0.20432807D+01 0.21417911D-01
+ 0.29000000D+01 0.30000000D+01 0.17885913D+01 0.15178115D-01
+ 0.30000000D+01 0.31000000D+01 0.15445180D+01 0.12967040D-01
+ 0.31000000D+01 0.32000000D+01 0.12535117D+01 0.11849661D-01
+ 0.32000000D+01 0.33000000D+01 0.10021610D+01 0.13654485D-01
+ 0.33000000D+01 0.34000000D+01 0.82956599D+00 0.12373405D-01
+ 0.34000000D+01 0.35000000D+01 0.65881244D+00 0.88049231D-02
+ 0.35000000D+01 0.36000000D+01 0.49869237D+00 0.63580634D-02
+ 0.36000000D+01 0.37000000D+01 0.38135586D+00 0.66261637D-02
+ 0.37000000D+01 0.38000000D+01 0.26007208D+00 0.36060162D-02
+ 0.38000000D+01 0.39000000D+01 0.17154790D+00 0.24118243D-02
+ 0.39000000D+01 0.40000000D+01 0.10645288D+00 0.15750838D-02
+ 0.40000000D+01 0.41000000D+01 0.59812432D-01 0.98951257D-03
+ 0.41000000D+01 0.42000000D+01 0.30866482D-01 0.52563759D-03
+ 0.42000000D+01 0.43000000D+01 0.12269205D-01 0.83702448D-03
+ 0.43000000D+01 0.44000000D+01 0.47916151D-02 0.98443777D-04
+ 0.44000000D+01 0.45000000D+01 0.12610160D-02 0.33258264D-04
+ 0.45000000D+01 0.46000000D+01 0.16492075D-03 0.70804083D-05
+ 0.46000000D+01 0.47000000D+01 0.14163244D-05 0.83243497D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13498327D-05 0.83398499D-06
+ -.46000000D+01 -.45000000D+01 0.14753891D-03 0.70918513D-05
+ -.45000000D+01 -.44000000D+01 0.13256468D-02 0.51909001D-04
+ -.44000000D+01 -.43000000D+01 0.50694986D-02 0.94456588D-04
+ -.43000000D+01 -.42000000D+01 0.13881682D-01 0.26469224D-03
+ -.42000000D+01 -.41000000D+01 0.31883711D-01 0.61454711D-03
+ -.41000000D+01 -.40000000D+01 0.63306807D-01 0.99523373D-03
+ -.40000000D+01 -.39000000D+01 0.11076652D+00 0.18247134D-02
+ -.39000000D+01 -.38000000D+01 0.17863524D+00 0.25646987D-02
+ -.38000000D+01 -.37000000D+01 0.27492035D+00 0.32917025D-02
+ -.37000000D+01 -.36000000D+01 0.38563814D+00 0.77504457D-02
+ -.36000000D+01 -.35000000D+01 0.51520863D+00 0.72124507D-02
+ -.35000000D+01 -.34000000D+01 0.71481842D+00 0.15010772D-01
+ -.34000000D+01 -.33000000D+01 0.86975946D+00 0.15646951D-01
+ -.33000000D+01 -.32000000D+01 0.11092294D+01 0.10618597D-01
+ -.32000000D+01 -.31000000D+01 0.13619301D+01 0.15480541D-01
+ -.31000000D+01 -.30000000D+01 0.15963621D+01 0.13797842D-01
+ -.30000000D+01 -.29000000D+01 0.19109293D+01 0.14835864D-01
+ -.29000000D+01 -.28000000D+01 0.22134209D+01 0.15487928D-01
+ -.28000000D+01 -.27000000D+01 0.25579673D+01 0.17714688D-01
+ -.27000000D+01 -.26000000D+01 0.29311907D+01 0.20165940D-01
+ -.26000000D+01 -.25000000D+01 0.32372946D+01 0.21179676D-01
+ -.25000000D+01 -.24000000D+01 0.36426018D+01 0.19324633D-01
+ -.24000000D+01 -.23000000D+01 0.39975151D+01 0.21456413D-01
+ -.23000000D+01 -.22000000D+01 0.43923482D+01 0.26166019D-01
+ -.22000000D+01 -.21000000D+01 0.48359244D+01 0.32347926D-01
+ -.21000000D+01 -.20000000D+01 0.52190676D+01 0.29994717D-01
+ -.20000000D+01 -.19000000D+01 0.56376826D+01 0.27468025D-01
+ -.19000000D+01 -.18000000D+01 0.60618558D+01 0.27710580D-01
+ -.18000000D+01 -.17000000D+01 0.64540618D+01 0.27287489D-01
+ -.17000000D+01 -.16000000D+01 0.67907594D+01 0.29148025D-01
+ -.16000000D+01 -.15000000D+01 0.71238837D+01 0.30243745D-01
+ -.15000000D+01 -.14000000D+01 0.75533734D+01 0.30133454D-01
+ -.14000000D+01 -.13000000D+01 0.78888802D+01 0.32861839D-01
+ -.13000000D+01 -.12000000D+01 0.82365777D+01 0.31664106D-01
+ -.12000000D+01 -.11000000D+01 0.85967203D+01 0.35497662D-01
+ -.11000000D+01 -.10000000D+01 0.87492527D+01 0.32548882D-01
+ -.10000000D+01 -.90000000D+00 0.90262611D+01 0.38480740D-01
+ -.90000000D+00 -.80000000D+00 0.93798962D+01 0.34991785D-01
+ -.80000000D+00 -.70000000D+00 0.94805128D+01 0.38204203D-01
+ -.70000000D+00 -.60000000D+00 0.96905398D+01 0.39754133D-01
+ -.60000000D+00 -.50000000D+00 0.99359454D+01 0.63847525D-01
+ -.50000000D+00 -.40000000D+00 0.99860734D+01 0.37018750D-01
+ -.40000000D+00 -.30000000D+00 0.10146955D+02 0.39116441D-01
+ -.30000000D+00 -.20000000D+00 0.10112898D+02 0.39756107D-01
+ -.20000000D+00 -.10000000D+00 0.10165617D+02 0.34658398D-01
+ -.10000000D+00 0.18041124D-15 0.10216310D+02 0.36573318D-01
+ 0.70776718D-15 0.10000000D+00 0.10288873D+02 0.38374415D-01
+ 0.10000000D+00 0.20000000D+00 0.10247761D+02 0.39517304D-01
+ 0.20000000D+00 0.30000000D+00 0.10164295D+02 0.36747843D-01
+ 0.30000000D+00 0.40000000D+00 0.10118079D+02 0.46037130D-01
+ 0.40000000D+00 0.50000000D+00 0.99177404D+01 0.40651468D-01
+ 0.50000000D+00 0.60000000D+00 0.98173377D+01 0.36582360D-01
+ 0.60000000D+00 0.70000000D+00 0.96896129D+01 0.37717339D-01
+ 0.70000000D+00 0.80000000D+00 0.95301290D+01 0.42603546D-01
+ 0.80000000D+00 0.90000000D+00 0.93083970D+01 0.38313763D-01
+ 0.90000000D+00 0.10000000D+01 0.90694037D+01 0.36084050D-01
+ 0.10000000D+01 0.11000000D+01 0.88239013D+01 0.41390355D-01
+ 0.11000000D+01 0.12000000D+01 0.85004258D+01 0.32542731D-01
+ 0.12000000D+01 0.13000000D+01 0.81850057D+01 0.34077381D-01
+ 0.13000000D+01 0.14000000D+01 0.78915181D+01 0.36197271D-01
+ 0.14000000D+01 0.15000000D+01 0.74975670D+01 0.31632808D-01
+ 0.15000000D+01 0.16000000D+01 0.71561817D+01 0.31364722D-01
+ 0.16000000D+01 0.17000000D+01 0.68287489D+01 0.30193800D-01
+ 0.17000000D+01 0.18000000D+01 0.64461139D+01 0.30996082D-01
+ 0.18000000D+01 0.19000000D+01 0.60291680D+01 0.31487726D-01
+ 0.19000000D+01 0.20000000D+01 0.56488151D+01 0.25466142D-01
+ 0.20000000D+01 0.21000000D+01 0.52246227D+01 0.27559407D-01
+ 0.21000000D+01 0.22000000D+01 0.47868965D+01 0.26507006D-01
+ 0.22000000D+01 0.23000000D+01 0.43834853D+01 0.23490894D-01
+ 0.23000000D+01 0.24000000D+01 0.40412743D+01 0.22342784D-01
+ 0.24000000D+01 0.25000000D+01 0.36107369D+01 0.21247347D-01
+ 0.25000000D+01 0.26000000D+01 0.32375598D+01 0.19693622D-01
+ 0.26000000D+01 0.27000000D+01 0.28928617D+01 0.19724552D-01
+ 0.27000000D+01 0.28000000D+01 0.25274953D+01 0.18674263D-01
+ 0.28000000D+01 0.29000000D+01 0.21766169D+01 0.21429837D-01
+ 0.29000000D+01 0.30000000D+01 0.19005558D+01 0.15191588D-01
+ 0.30000000D+01 0.31000000D+01 0.16366146D+01 0.12987031D-01
+ 0.31000000D+01 0.32000000D+01 0.13285781D+01 0.11866165D-01
+ 0.32000000D+01 0.33000000D+01 0.10613745D+01 0.13659948D-01
+ 0.33000000D+01 0.34000000D+01 0.87535275D+00 0.12379217D-01
+ 0.34000000D+01 0.35000000D+01 0.69307544D+00 0.88107254D-02
+ 0.35000000D+01 0.36000000D+01 0.52350280D+00 0.63624331D-02
+ 0.36000000D+01 0.37000000D+01 0.39855521D+00 0.66282658D-02
+ 0.37000000D+01 0.38000000D+01 0.27140755D+00 0.36080351D-02
+ 0.38000000D+01 0.39000000D+01 0.17854148D+00 0.24132193D-02
+ 0.39000000D+01 0.40000000D+01 0.11045726D+00 0.15761488D-02
+ 0.40000000D+01 0.41000000D+01 0.61881554D-01 0.98993113D-03
+ 0.41000000D+01 0.42000000D+01 0.31807448D-01 0.52592151D-03
+ 0.42000000D+01 0.43000000D+01 0.12631238D-01 0.83709164D-03
+ 0.43000000D+01 0.44000000D+01 0.48996211D-02 0.98477906D-04
+ 0.44000000D+01 0.45000000D+01 0.12827512D-02 0.33265379D-04
+ 0.45000000D+01 0.46000000D+01 0.16668808D-03 0.70811731D-05
+ 0.46000000D+01 0.47000000D+01 0.14213628D-05 0.83243618D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.13523261D-05 0.83398553D-06
+ -.46000000D+01 -.45000000D+01 0.14842885D-03 0.70921093D-05
+ -.45000000D+01 -.44000000D+01 0.13369428D-02 0.51911792D-04
+ -.44000000D+01 -.43000000D+01 0.51272589D-02 0.94472651D-04
+ -.43000000D+01 -.42000000D+01 0.14077629D-01 0.26473614D-03
+ -.42000000D+01 -.41000000D+01 0.32402790D-01 0.61464399D-03
+ -.41000000D+01 -.40000000D+01 0.64471264D-01 0.99556838D-03
+ -.40000000D+01 -.39000000D+01 0.11304906D+00 0.18251220D-02
+ -.39000000D+01 -.38000000D+01 0.18268063D+00 0.25654228D-02
+ -.38000000D+01 -.37000000D+01 0.28157939D+00 0.32932180D-02
+ -.37000000D+01 -.36000000D+01 0.39590005D+00 0.77513036D-02
+ -.36000000D+01 -.35000000D+01 0.53011582D+00 0.72145360D-02
+ -.35000000D+01 -.34000000D+01 0.73697677D+00 0.16060320D-01
+ -.34000000D+01 -.33000000D+01 0.89666244D+00 0.16655232D-01
+ -.33000000D+01 -.32000000D+01 0.11461549D+01 0.10631877D-01
+ -.32000000D+01 -.31000000D+01 0.14088792D+01 0.15493008D-01
+ -.31000000D+01 -.30000000D+01 0.16548265D+01 0.13804989D-01
+ -.30000000D+01 -.29000000D+01 0.19823880D+01 0.14850687D-01
+ -.29000000D+01 -.28000000D+01 0.22992477D+01 0.15503563D-01
+ -.28000000D+01 -.27000000D+01 0.26599579D+01 0.17724283D-01
+ -.27000000D+01 -.26000000D+01 0.30492197D+01 0.20189049D-01
+ -.26000000D+01 -.25000000D+01 0.33742649D+01 0.21202179D-01
+ -.25000000D+01 -.24000000D+01 0.37978111D+01 0.19359967D-01
+ -.24000000D+01 -.23000000D+01 0.41732518D+01 0.21476689D-01
+ -.23000000D+01 -.22000000D+01 0.45883263D+01 0.26234367D-01
+ -.22000000D+01 -.21000000D+01 0.50542077D+01 0.32520652D-01
+ -.21000000D+01 -.20000000D+01 0.54588666D+01 0.30167647D-01
+ -.20000000D+01 -.19000000D+01 0.58998702D+01 0.27512230D-01
+ -.19000000D+01 -.18000000D+01 0.63462830D+01 0.27739609D-01
+ -.18000000D+01 -.17000000D+01 0.67608214D+01 0.27315099D-01
+ -.17000000D+01 -.16000000D+01 0.71198085D+01 0.29162563D-01
+ -.16000000D+01 -.15000000D+01 0.74740864D+01 0.30263990D-01
+ -.15000000D+01 -.14000000D+01 0.79250160D+01 0.30149898D-01
+ -.14000000D+01 -.13000000D+01 0.82811408D+01 0.32880582D-01
+ -.13000000D+01 -.12000000D+01 0.86472279D+01 0.31697974D-01
+ -.12000000D+01 -.11000000D+01 0.90262679D+01 0.35534891D-01
+ -.11000000D+01 -.10000000D+01 0.91961559D+01 0.32588602D-01
+ -.10000000D+01 -.90000000D+00 0.94907114D+01 0.38515652D-01
+ -.90000000D+00 -.80000000D+00 0.98578443D+01 0.35024369D-01
+ -.80000000D+00 -.70000000D+00 0.99714921D+01 0.38233129D-01
+ -.70000000D+00 -.60000000D+00 0.10193579D+02 0.39788177D-01
+ -.60000000D+00 -.50000000D+00 0.10450585D+02 0.63881413D-01
+ -.50000000D+00 -.40000000D+00 0.10507750D+02 0.37074599D-01
+ -.40000000D+00 -.30000000D+00 0.10676475D+02 0.39181395D-01
+ -.30000000D+00 -.20000000D+00 0.10647603D+02 0.39807372D-01
+ -.20000000D+00 -.10000000D+00 0.10703087D+02 0.34712496D-01
+ -.10000000D+00 0.18041124D-15 0.10757336D+02 0.36717182D-01
+ 0.70776718D-15 0.10000000D+00 0.10828665D+02 0.38510180D-01
+ 0.10000000D+00 0.20000000D+00 0.10785083D+02 0.39804808D-01
+ 0.20000000D+00 0.30000000D+00 0.10699823D+02 0.37075939D-01
+ 0.30000000D+00 0.40000000D+00 0.10647234D+02 0.46075198D-01
+ 0.40000000D+00 0.50000000D+00 0.10440556D+02 0.40723648D-01
+ 0.50000000D+00 0.60000000D+00 0.10330816D+02 0.36664938D-01
+ 0.60000000D+00 0.70000000D+00 0.10193720D+02 0.37775008D-01
+ 0.70000000D+00 0.80000000D+00 0.10020784D+02 0.42639071D-01
+ 0.80000000D+00 0.90000000D+00 0.97866884D+01 0.38380150D-01
+ 0.90000000D+00 0.10000000D+01 0.95330510D+01 0.36165522D-01
+ 0.10000000D+01 0.11000000D+01 0.92709802D+01 0.41423636D-01
+ 0.11000000D+01 0.12000000D+01 0.89296716D+01 0.32568268D-01
+ 0.12000000D+01 0.13000000D+01 0.85970652D+01 0.34109697D-01
+ 0.13000000D+01 0.14000000D+01 0.82824904D+01 0.36238181D-01
+ 0.14000000D+01 0.15000000D+01 0.78673243D+01 0.32032481D-01
+ 0.15000000D+01 0.16000000D+01 0.75084776D+01 0.31762973D-01
+ 0.16000000D+01 0.17000000D+01 0.71575757D+01 0.30218342D-01
+ 0.17000000D+01 0.18000000D+01 0.67525395D+01 0.31008811D-01
+ 0.18000000D+01 0.19000000D+01 0.63143688D+01 0.31514043D-01
+ 0.19000000D+01 0.20000000D+01 0.59103412D+01 0.25501075D-01
+ 0.20000000D+01 0.21000000D+01 0.54647035D+01 0.27584380D-01
+ 0.21000000D+01 0.22000000D+01 0.50045836D+01 0.26531817D-01
+ 0.22000000D+01 0.23000000D+01 0.45803623D+01 0.23507195D-01
+ 0.23000000D+01 0.24000000D+01 0.42169548D+01 0.22370627D-01
+ 0.24000000D+01 0.25000000D+01 0.37662826D+01 0.21275212D-01
+ 0.25000000D+01 0.26000000D+01 0.33741195D+01 0.19713407D-01
+ 0.26000000D+01 0.27000000D+01 0.30115470D+01 0.19731316D-01
+ 0.27000000D+01 0.28000000D+01 0.26288195D+01 0.18684801D-01
+ 0.28000000D+01 0.29000000D+01 0.22625439D+01 0.21437503D-01
+ 0.29000000D+01 0.30000000D+01 0.19721021D+01 0.15200894D-01
+ 0.30000000D+01 0.31000000D+01 0.16950024D+01 0.13002241D-01
+ 0.31000000D+01 0.32000000D+01 0.13757875D+01 0.11879486D-01
+ 0.32000000D+01 0.33000000D+01 0.10982219D+01 0.13663615D-01
+ 0.33000000D+01 0.34000000D+01 0.90358000D+00 0.12382807D-01
+ 0.34000000D+01 0.35000000D+01 0.71394454D+00 0.88142817D-02
+ 0.35000000D+01 0.36000000D+01 0.53845451D+00 0.63650024D-02
+ 0.36000000D+01 0.37000000D+01 0.40878977D+00 0.66295023D-02
+ 0.37000000D+01 0.38000000D+01 0.27806303D+00 0.36093258D-02
+ 0.38000000D+01 0.39000000D+01 0.18259211D+00 0.24140488D-02
+ 0.39000000D+01 0.40000000D+01 0.11274441D+00 0.15767571D-02
+ 0.40000000D+01 0.41000000D+01 0.63043768D-01 0.99015537D-03
+ 0.41000000D+01 0.42000000D+01 0.32327703D-01 0.52607312D-03
+ 0.42000000D+01 0.43000000D+01 0.12828090D-01 0.83712660D-03
+ 0.43000000D+01 0.44000000D+01 0.49570899D-02 0.98495105D-04
+ 0.44000000D+01 0.45000000D+01 0.12940193D-02 0.33268857D-04
+ 0.45000000D+01 0.46000000D+01 0.16757485D-03 0.70815396D-05
+ 0.46000000D+01 0.47000000D+01 0.14237833D-05 0.83243675D-06
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 0.15563750D+01 0.87885382D-02
+ 0.30000000D+01 0.60000000D+01 -.28139371D+01 0.42496285D-02
+ 0.60000000D+01 0.90000000D+01 0.12244263D+01 0.33098569D-02
+ 0.90000000D+01 0.12000000D+02 0.15904521D+01 0.27507027D-02
+ 0.12000000D+02 0.15000000D+02 0.14694209D+01 0.23601664D-02
+ 0.15000000D+02 0.18000000D+02 0.12933812D+01 0.23083224D-02
+ 0.18000000D+02 0.21000000D+02 0.11246002D+01 0.19829441D-02
+ 0.21000000D+02 0.24000000D+02 0.97730151D+00 0.16566582D-02
+ 0.24000000D+02 0.27000000D+02 0.85239690D+00 0.14900338D-02
+ 0.27000000D+02 0.30000000D+02 0.75161710D+00 0.14742237D-02
+ 0.30000000D+02 0.33000000D+02 0.66785755D+00 0.15775698D-02
+ 0.33000000D+02 0.36000000D+02 0.59290793D+00 0.15634321D-02
+ 0.36000000D+02 0.39000000D+02 0.53033740D+00 0.14408695D-02
+ 0.39000000D+02 0.42000000D+02 0.47847541D+00 0.15401269D-02
+ 0.42000000D+02 0.45000000D+02 0.43181194D+00 0.15625855D-02
+ 0.45000000D+02 0.48000000D+02 0.39048019D+00 0.13891382D-02
+ 0.48000000D+02 0.51000000D+02 0.35734916D+00 0.13284700D-02
+ 0.51000000D+02 0.54000000D+02 0.32417330D+00 0.12305432D-02
+ 0.54000000D+02 0.57000000D+02 0.29778726D+00 0.10168970D-02
+ 0.57000000D+02 0.60000000D+02 0.27204978D+00 0.10682802D-02
+ 0.60000000D+02 0.63000000D+02 0.24739495D+00 0.13040619D-02
+ 0.63000000D+02 0.66000000D+02 0.23091822D+00 0.10774874D-02
+ 0.66000000D+02 0.69000000D+02 0.21091298D+00 0.97708837D-03
+ 0.69000000D+02 0.72000000D+02 0.19569962D+00 0.98590156D-03
+ 0.72000000D+02 0.75000000D+02 0.18258193D+00 0.69713074D-03
+ 0.75000000D+02 0.78000000D+02 0.16625984D+00 0.80813409D-03
+ 0.78000000D+02 0.81000000D+02 0.15512544D+00 0.76725630D-03
+ 0.81000000D+02 0.84000000D+02 0.14400537D+00 0.80846078D-03
+ 0.84000000D+02 0.87000000D+02 0.13384159D+00 0.84539025D-03
+ 0.87000000D+02 0.90000000D+02 0.12396984D+00 0.62972881D-03
+ 0.90000000D+02 0.93000000D+02 0.11774978D+00 0.83579152D-03
+ 0.93000000D+02 0.96000000D+02 0.10652008D+00 0.81206834D-03
+ 0.96000000D+02 0.99000000D+02 0.10138705D+00 0.56618378D-03
+ 0.99000000D+02 0.10200000D+03 0.93239145D-01 0.67701014D-03
+ 0.10200000D+03 0.10500000D+03 0.87781370D-01 0.64364342D-03
+ 0.10500000D+03 0.10800000D+03 0.82803806D-01 0.52551609D-03
+ 0.10800000D+03 0.11100000D+03 0.76417942D-01 0.56038045D-03
+ 0.11100000D+03 0.11400000D+03 0.71974112D-01 0.50239289D-03
+ 0.11400000D+03 0.11700000D+03 0.68561901D-01 0.91094065D-03
+ 0.11700000D+03 0.12000000D+03 0.62894130D-01 0.92668960D-03
+ 0.12000000D+03 0.12300000D+03 0.59588683D-01 0.47008746D-03
+ 0.12300000D+03 0.12600000D+03 0.56619321D-01 0.12449220D-02
+ 0.12600000D+03 0.12900000D+03 0.52313630D-01 0.12455335D-02
+ 0.12900000D+03 0.13200000D+03 0.49253540D-01 0.43967521D-03
+ 0.13200000D+03 0.13500000D+03 0.46138272D-01 0.43474654D-03
+ 0.13500000D+03 0.13800000D+03 0.44911095D-01 0.61452845D-03
+ 0.13800000D+03 0.14100000D+03 0.40297370D-01 0.57436375D-03
+ 0.14100000D+03 0.14400000D+03 0.39536994D-01 0.45598784D-03
+ 0.14400000D+03 0.14700000D+03 0.35380173D-01 0.82091942D-03
+ 0.14700000D+03 0.15000000D+03 0.35494676D-01 0.76071642D-03
+ 0.15000000D+03 0.15300000D+03 0.32499504D-01 0.38349401D-03
+ 0.15300000D+03 0.15600000D+03 0.30737306D-01 0.38420510D-03
+ 0.15600000D+03 0.15900000D+03 0.29505800D-01 0.31000404D-03
+ 0.15900000D+03 0.16200000D+03 0.27446475D-01 0.29493006D-03
+ 0.16200000D+03 0.16500000D+03 0.26267394D-01 0.38336207D-03
+ 0.16500000D+03 0.16800000D+03 0.24185364D-01 0.38715435D-03
+ 0.16800000D+03 0.17100000D+03 0.23538956D-01 0.26484012D-03
+ 0.17100000D+03 0.17400000D+03 0.21724075D-01 0.25639596D-03
+ 0.17400000D+03 0.17700000D+03 0.21216436D-01 0.28304402D-03
+ 0.17700000D+03 0.18000000D+03 0.19389627D-01 0.26617650D-03
+ 0.18000000D+03 0.18300000D+03 0.19065883D-01 0.29699836D-03
+ 0.18300000D+03 0.18600000D+03 0.17394284D-01 0.33930882D-03
+ 0.18600000D+03 0.18900000D+03 0.16016302D-01 0.32599672D-03
+ 0.18900000D+03 0.19200000D+03 0.15925290D-01 0.29146582D-03
+ 0.19200000D+03 0.19500000D+03 0.15359542D-01 0.38582629D-03
+ 0.19500000D+03 0.19800000D+03 0.13980739D-01 0.36729635D-03
+ 0.19800000D+03 0.20100000D+03 0.13668497D-01 0.36790309D-03
+ 0.20100000D+03 0.20400000D+03 0.12315836D-01 0.44514667D-03
+ 0.20400000D+03 0.20700000D+03 0.11659455D-01 0.32810047D-03
+ 0.20700000D+03 0.21000000D+03 0.11669175D-01 0.22445131D-03
+ 0.21000000D+03 0.21300000D+03 0.10599462D-01 0.23203681D-03
+ 0.21300000D+03 0.21600000D+03 0.99994265D-02 0.22835367D-03
+ 0.21600000D+03 0.21900000D+03 0.94097521D-02 0.52062635D-03
+ 0.21900000D+03 0.22200000D+03 0.95454848D-02 0.50317907D-03
+ 0.22200000D+03 0.22500000D+03 0.86241212D-02 0.15474607D-03
+ 0.22500000D+03 0.22800000D+03 0.82129251D-02 0.16948972D-03
+ 0.22800000D+03 0.23100000D+03 0.79880776D-02 0.16422324D-03
+ 0.23100000D+03 0.23400000D+03 0.69221428D-02 0.15345625D-03
+ 0.23400000D+03 0.23700000D+03 0.70938955D-02 0.15627461D-03
+ 0.23700000D+03 0.24000000D+03 0.64739008D-02 0.16167955D-03
+ 0.24000000D+03 0.24300000D+03 0.60001883D-02 0.19552250D-03
+ 0.24300000D+03 0.24600000D+03 0.58631702D-02 0.34329434D-03
+ 0.24600000D+03 0.24900000D+03 0.57634286D-02 0.34592818D-03
+ 0.24900000D+03 0.25200000D+03 0.57696880D-02 0.39885347D-03
+ 0.25200000D+03 0.25500000D+03 0.45176050D-02 0.40897311D-03
+ 0.25500000D+03 0.25800000D+03 0.49247791D-02 0.19348948D-03
+ 0.25800000D+03 0.26100000D+03 0.44460565D-02 0.10687289D-03
+ 0.26100000D+03 0.26400000D+03 0.42220949D-02 0.11953029D-03
+ 0.26400000D+03 0.26700000D+03 0.36142181D-02 0.31209235D-03
+ 0.26700000D+03 0.27000000D+03 0.42484060D-02 0.32203529D-03
+ 0.27000000D+03 0.27300000D+03 0.35495146D-02 0.16845912D-03
+ 0.27300000D+03 0.27600000D+03 0.37194828D-02 0.13987508D-03
+ 0.27600000D+03 0.27900000D+03 0.28879042D-02 0.11140508D-03
+ 0.27900000D+03 0.28200000D+03 0.30602065D-02 0.16384821D-03
+ 0.28200000D+03 0.28500000D+03 0.28997241D-02 0.16949653D-03
+ 0.28500000D+03 0.28800000D+03 0.26867268D-02 0.10789682D-03
+ 0.28800000D+03 0.29100000D+03 0.26740161D-02 0.18277500D-03
+ 0.29100000D+03 0.29400000D+03 0.24235354D-02 0.19250437D-03
+ 0.29400000D+03 0.29700000D+03 0.23192663D-02 0.10446237D-03
+ 0.29700000D+03 0.30000000D+03 0.22446926D-02 0.15875770D-03
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 0.15621390D+01 0.87873574D-02
+ 0.30000000D+01 0.60000000D+01 -.28115157D+01 0.42443722D-02
+ 0.60000000D+01 0.90000000D+01 0.12197469D+01 0.32983792D-02
+ 0.90000000D+01 0.12000000D+02 0.15792364D+01 0.27321797D-02
+ 0.12000000D+02 0.15000000D+02 0.14524889D+01 0.23328396D-02
+ 0.15000000D+02 0.18000000D+02 0.12712770D+01 0.22688157D-02
+ 0.18000000D+02 0.21000000D+02 0.10979339D+01 0.19375434D-02
+ 0.21000000D+02 0.24000000D+02 0.94668088D+00 0.16048721D-02
+ 0.24000000D+02 0.27000000D+02 0.81839648D+00 0.14315301D-02
+ 0.27000000D+02 0.30000000D+02 0.71453375D+00 0.13999603D-02
+ 0.30000000D+02 0.33000000D+02 0.62803180D+00 0.14834920D-02
+ 0.33000000D+02 0.36000000D+02 0.55098028D+00 0.14526954D-02
+ 0.36000000D+02 0.39000000D+02 0.48659771D+00 0.13231161D-02
+ 0.39000000D+02 0.42000000D+02 0.43306807D+00 0.13910457D-02
+ 0.42000000D+02 0.45000000D+02 0.38520713D+00 0.13960709D-02
+ 0.45000000D+02 0.48000000D+02 0.34305333D+00 0.12202353D-02
+ 0.48000000D+02 0.51000000D+02 0.30894560D+00 0.11491101D-02
+ 0.51000000D+02 0.54000000D+02 0.27559447D+00 0.10465727D-02
+ 0.54000000D+02 0.57000000D+02 0.24877352D+00 0.85212271D-03
+ 0.57000000D+02 0.60000000D+02 0.22318547D+00 0.87311642D-03
+ 0.60000000D+02 0.63000000D+02 0.19920753D+00 0.10494855D-02
+ 0.63000000D+02 0.66000000D+02 0.18239684D+00 0.85530758D-03
+ 0.66000000D+02 0.69000000D+02 0.16332415D+00 0.75322110D-03
+ 0.69000000D+02 0.72000000D+02 0.14850371D+00 0.75102386D-03
+ 0.72000000D+02 0.75000000D+02 0.13568679D+00 0.51921623D-03
+ 0.75000000D+02 0.78000000D+02 0.12097052D+00 0.58541878D-03
+ 0.78000000D+02 0.81000000D+02 0.11046576D+00 0.54950240D-03
+ 0.81000000D+02 0.84000000D+02 0.10032602D+00 0.55971241D-03
+ 0.84000000D+02 0.87000000D+02 0.91200638D-01 0.57888252D-03
+ 0.87000000D+02 0.90000000D+02 0.82592520D-01 0.41939698D-03
+ 0.90000000D+02 0.93000000D+02 0.76676970D-01 0.54165186D-03
+ 0.93000000D+02 0.96000000D+02 0.67781796D-01 0.51974054D-03
+ 0.96000000D+02 0.99000000D+02 0.63047504D-01 0.35218774D-03
+ 0.99000000D+02 0.10200000D+03 0.56637571D-01 0.40984349D-03
+ 0.10200000D+03 0.10500000D+03 0.52092859D-01 0.38378523D-03
+ 0.10500000D+03 0.10800000D+03 0.47988153D-01 0.30393563D-03
+ 0.10800000D+03 0.11100000D+03 0.43247599D-01 0.31721966D-03
+ 0.11100000D+03 0.11400000D+03 0.39779277D-01 0.27827106D-03
+ 0.11400000D+03 0.11700000D+03 0.36993892D-01 0.48724722D-03
+ 0.11700000D+03 0.12000000D+03 0.33128216D-01 0.49219145D-03
+ 0.12000000D+03 0.12300000D+03 0.30647167D-01 0.24223602D-03
+ 0.12300000D+03 0.12600000D+03 0.28424452D-01 0.61851766D-03
+ 0.12600000D+03 0.12900000D+03 0.25638680D-01 0.61688916D-03
+ 0.12900000D+03 0.13200000D+03 0.23567921D-01 0.21026701D-03
+ 0.13200000D+03 0.13500000D+03 0.21557152D-01 0.20340501D-03
+ 0.13500000D+03 0.13800000D+03 0.20483415D-01 0.27853096D-03
+ 0.13800000D+03 0.14100000D+03 0.17945328D-01 0.25794026D-03
+ 0.14100000D+03 0.14400000D+03 0.17192988D-01 0.19707288D-03
+ 0.14400000D+03 0.14700000D+03 0.15027003D-01 0.34645842D-03
+ 0.14700000D+03 0.15000000D+03 0.14724177D-01 0.31832183D-03
+ 0.15000000D+03 0.15300000D+03 0.13165546D-01 0.15488302D-03
+ 0.15300000D+03 0.15600000D+03 0.12162828D-01 0.15243539D-03
+ 0.15600000D+03 0.15900000D+03 0.11405282D-01 0.12000422D-03
+ 0.15900000D+03 0.16200000D+03 0.10362602D-01 0.11130076D-03
+ 0.16200000D+03 0.16500000D+03 0.96904285D-02 0.14081495D-03
+ 0.16500000D+03 0.16800000D+03 0.87192928D-02 0.14012227D-03
+ 0.16800000D+03 0.17100000D+03 0.82939528D-02 0.93722844D-04
+ 0.17100000D+03 0.17400000D+03 0.74803063D-02 0.87942729D-04
+ 0.17400000D+03 0.17700000D+03 0.71400576D-02 0.95398544D-04
+ 0.17700000D+03 0.18000000D+03 0.63800699D-02 0.87595980D-04
+ 0.18000000D+03 0.18300000D+03 0.61336165D-02 0.95344662D-04
+ 0.18300000D+03 0.18600000D+03 0.54705896D-02 0.10669757D-03
+ 0.18600000D+03 0.18900000D+03 0.49291214D-02 0.10046535D-03
+ 0.18900000D+03 0.19200000D+03 0.47950702D-02 0.87787496D-04
+ 0.19200000D+03 0.19500000D+03 0.45222584D-02 0.11302875D-03
+ 0.19500000D+03 0.19800000D+03 0.40263249D-02 0.10654378D-03
+ 0.19800000D+03 0.20100000D+03 0.38518274D-02 0.10303902D-03
+ 0.20100000D+03 0.20400000D+03 0.33964715D-02 0.12296761D-03
+ 0.20400000D+03 0.20700000D+03 0.31489572D-02 0.89212657D-04
+ 0.20700000D+03 0.21000000D+03 0.30856173D-02 0.59204333D-04
+ 0.21000000D+03 0.21300000D+03 0.27431545D-02 0.60161388D-04
+ 0.21300000D+03 0.21600000D+03 0.25350412D-02 0.57853680D-04
+ 0.21600000D+03 0.21900000D+03 0.23380865D-02 0.12822218D-03
+ 0.21900000D+03 0.22200000D+03 0.23226476D-02 0.12351265D-03
+ 0.22200000D+03 0.22500000D+03 0.20549191D-02 0.36854882D-04
+ 0.22500000D+03 0.22800000D+03 0.19172709D-02 0.39532116D-04
+ 0.22800000D+03 0.23100000D+03 0.18269732D-02 0.37644761D-04
+ 0.23100000D+03 0.23400000D+03 0.15521299D-02 0.34381442D-04
+ 0.23400000D+03 0.23700000D+03 0.15593806D-02 0.34379545D-04
+ 0.23700000D+03 0.24000000D+03 0.13952285D-02 0.34813142D-04
+ 0.24000000D+03 0.24300000D+03 0.12683509D-02 0.41231800D-04
+ 0.24300000D+03 0.24600000D+03 0.12159037D-02 0.70726196D-04
+ 0.24600000D+03 0.24900000D+03 0.11724322D-02 0.70701117D-04
+ 0.24900000D+03 0.25200000D+03 0.11499853D-02 0.78995037D-04
+ 0.25200000D+03 0.25500000D+03 0.88352534D-03 0.80415574D-04
+ 0.25500000D+03 0.25800000D+03 0.94558173D-03 0.37389962D-04
+ 0.25800000D+03 0.26100000D+03 0.83727538D-03 0.20105555D-04
+ 0.26100000D+03 0.26400000D+03 0.78060234D-03 0.22079164D-04
+ 0.26400000D+03 0.26700000D+03 0.65667138D-03 0.56201542D-04
+ 0.26700000D+03 0.27000000D+03 0.75749938D-03 0.57733878D-04
+ 0.27000000D+03 0.27300000D+03 0.62102863D-03 0.29496678D-04
+ 0.27300000D+03 0.27600000D+03 0.63876398D-03 0.24084345D-04
+ 0.27600000D+03 0.27900000D+03 0.48699870D-03 0.18821489D-04
+ 0.27900000D+03 0.28200000D+03 0.50724878D-03 0.27011539D-04
+ 0.28200000D+03 0.28500000D+03 0.47206811D-03 0.27709505D-04
+ 0.28500000D+03 0.28800000D+03 0.42948877D-03 0.17290873D-04
+ 0.28800000D+03 0.29100000D+03 0.42002372D-03 0.28544564D-04
+ 0.29100000D+03 0.29400000D+03 0.37408848D-03 0.29869817D-04
+ 0.29400000D+03 0.29700000D+03 0.35174402D-03 0.15918538D-04
+ 0.29700000D+03 0.30000000D+03 0.33457496D-03 0.23545026D-04
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.11374291D+02 0.12857192D-02
+ 0.12500000D+03 0.13000000D+03 -.22271141D+02 0.61309224D-02
+ 0.13000000D+03 0.13500000D+03 0.43101568D+01 0.47643102D-02
+ 0.13500000D+03 0.14000000D+03 0.30452790D+01 0.38773563D-02
+ 0.14000000D+03 0.14500000D+03 0.21382218D+01 0.30212997D-02
+ 0.14500000D+03 0.15000000D+03 0.15687538D+01 0.22285910D-02
+ 0.15000000D+03 0.15500000D+03 0.12068449D+01 0.24826565D-02
+ 0.15500000D+03 0.16000000D+03 0.96330620D+00 0.23213957D-02
+ 0.16000000D+03 0.16500000D+03 0.78658065D+00 0.17580167D-02
+ 0.16500000D+03 0.17000000D+03 0.65267500D+00 0.16559889D-02
+ 0.17000000D+03 0.17500000D+03 0.55229390D+00 0.14826962D-02
+ 0.17500000D+03 0.18000000D+03 0.47455807D+00 0.13656357D-02
+ 0.18000000D+03 0.18500000D+03 0.41075853D+00 0.12943519D-02
+ 0.18500000D+03 0.19000000D+03 0.35890074D+00 0.11971278D-02
+ 0.19000000D+03 0.19500000D+03 0.31396920D+00 0.12100276D-02
+ 0.19500000D+03 0.20000000D+03 0.27986186D+00 0.33726449D-02
+ 0.20000000D+03 0.20500000D+03 0.25217351D+00 0.34395274D-02
+ 0.20500000D+03 0.21000000D+03 0.22347183D+00 0.22035606D-02
+ 0.21000000D+03 0.21500000D+03 0.20553306D+00 0.19757826D-02
+ 0.21500000D+03 0.22000000D+03 0.18378734D+00 0.81972050D-03
+ 0.22000000D+03 0.22500000D+03 0.16474383D+00 0.18837193D-02
+ 0.22500000D+03 0.23000000D+03 0.15514661D+00 0.18643602D-02
+ 0.23000000D+03 0.23500000D+03 0.13771136D+00 0.89089329D-03
+ 0.23500000D+03 0.24000000D+03 0.12907456D+00 0.94633920D-03
+ 0.24000000D+03 0.24500000D+03 0.11766973D+00 0.72735263D-03
+ 0.24500000D+03 0.25000000D+03 0.10828461D+00 0.77984797D-03
+ 0.25000000D+03 0.25500000D+03 0.10058541D+00 0.79594635D-03
+ 0.25500000D+03 0.26000000D+03 0.92937056D-01 0.68584103D-03
+ 0.26000000D+03 0.26500000D+03 0.85891634D-01 0.69133959D-03
+ 0.26500000D+03 0.27000000D+03 0.79075990D-01 0.10902927D-02
+ 0.27000000D+03 0.27500000D+03 0.76196713D-01 0.10896760D-02
+ 0.27500000D+03 0.28000000D+03 0.69487500D-01 0.61797741D-03
+ 0.28000000D+03 0.28500000D+03 0.64339712D-01 0.64790624D-03
+ 0.28500000D+03 0.29000000D+03 0.60757772D-01 0.85237638D-03
+ 0.29000000D+03 0.29500000D+03 0.58316879D-01 0.72710323D-03
+ 0.29500000D+03 0.30000000D+03 0.53141553D-01 0.43991383D-03
+ 0.30000000D+03 0.30500000D+03 0.49797286D-01 0.57549545D-03
+ 0.30500000D+03 0.31000000D+03 0.44206886D-01 0.27360963D-02
+ 0.31000000D+03 0.31500000D+03 0.47879966D-01 0.27267450D-02
+ 0.31500000D+03 0.32000000D+03 0.42429245D-01 0.53662776D-03
+ 0.32000000D+03 0.32500000D+03 0.39256433D-01 0.47474534D-03
+ 0.32500000D+03 0.33000000D+03 0.37000981D-01 0.53422872D-03
+ 0.33000000D+03 0.33500000D+03 0.36183254D-01 0.48951126D-03
+ 0.33500000D+03 0.34000000D+03 0.32397510D-01 0.80780852D-03
+ 0.34000000D+03 0.34500000D+03 0.32299756D-01 0.81640425D-03
+ 0.34500000D+03 0.35000000D+03 0.29875212D-01 0.43247571D-03
+ 0.35000000D+03 0.35500000D+03 0.28801149D-01 0.48375854D-03
+ 0.35500000D+03 0.36000000D+03 0.26366215D-01 0.67101522D-03
+ 0.36000000D+03 0.36500000D+03 0.25387295D-01 0.10043667D-02
+ 0.36500000D+03 0.37000000D+03 0.24646812D-01 0.10149946D-02
+ 0.37000000D+03 0.37500000D+03 0.23369798D-01 0.65716584D-03
+ 0.37500000D+03 0.38000000D+03 0.22130780D-01 0.44121970D-03
+ 0.38000000D+03 0.38500000D+03 0.21020568D-01 0.35332092D-03
+ 0.38500000D+03 0.39000000D+03 0.20279576D-01 0.26077005D-03
+ 0.39000000D+03 0.39500000D+03 0.18917518D-01 0.27656201D-03
+ 0.39500000D+03 0.40000000D+03 0.18057367D-01 0.31658011D-03
+ 0.40000000D+03 0.40500000D+03 0.16821197D-01 0.32799978D-03
+ 0.40500000D+03 0.41000000D+03 0.16614450D-01 0.29242886D-03
+ 0.41000000D+03 0.41500000D+03 0.14927896D-01 0.73047701D-03
+ 0.41500000D+03 0.42000000D+03 0.15012363D-01 0.10764360D-02
+ 0.42000000D+03 0.42500000D+03 0.15114694D-01 0.83223872D-03
+ 0.42500000D+03 0.43000000D+03 0.13821658D-01 0.27266733D-03
+ 0.43000000D+03 0.43500000D+03 0.13054848D-01 0.25532245D-03
+ 0.43500000D+03 0.44000000D+03 0.11974798D-01 0.67386350D-03
+ 0.44000000D+03 0.44500000D+03 0.11944641D-01 0.78784874D-03
+ 0.44500000D+03 0.45000000D+03 0.11656568D-01 0.47763992D-03
+ 0.45000000D+03 0.45500000D+03 0.11183344D-01 0.26381499D-03
+ 0.45500000D+03 0.46000000D+03 0.10398006D-01 0.22553224D-03
+ 0.46000000D+03 0.46500000D+03 0.10171681D-01 0.20614997D-03
+ 0.46500000D+03 0.47000000D+03 0.95125487D-02 0.19611863D-03
+ 0.47000000D+03 0.47500000D+03 0.91301161D-02 0.19715797D-03
+ 0.47500000D+03 0.48000000D+03 0.87921290D-02 0.22158840D-03
+ 0.48000000D+03 0.48500000D+03 0.85979374D-02 0.22097486D-03
+ 0.48500000D+03 0.49000000D+03 0.80438396D-02 0.18116530D-03
+ 0.49000000D+03 0.49500000D+03 0.77803062D-02 0.16939545D-03
+ 0.49500000D+03 0.50000000D+03 0.74551163D-02 0.16139285D-03
+ 0.50000000D+03 0.50500000D+03 0.69638109D-02 0.18016517D-03
+ 0.50500000D+03 0.51000000D+03 0.70800412D-02 0.18144133D-03
+ 0.51000000D+03 0.51500000D+03 0.65336924D-02 0.15552441D-03
+ 0.51500000D+03 0.52000000D+03 0.62325348D-02 0.18146632D-03
+ 0.52000000D+03 0.52500000D+03 0.59505075D-02 0.22432066D-03
+ 0.52500000D+03 0.53000000D+03 0.59691914D-02 0.29477161D-03
+ 0.53000000D+03 0.53500000D+03 0.55827896D-02 0.26458467D-03
+ 0.53500000D+03 0.54000000D+03 0.50207981D-02 0.27730528D-03
+ 0.54000000D+03 0.54500000D+03 0.56346703D-02 0.26686987D-03
+ 0.54500000D+03 0.55000000D+03 0.49699236D-02 0.13520521D-03
+ 0.55000000D+03 0.55500000D+03 0.47031440D-02 0.17813840D-03
+ 0.55500000D+03 0.56000000D+03 0.47676971D-02 0.18008533D-03
+ 0.56000000D+03 0.56500000D+03 0.41398502D-02 0.14852975D-03
+ 0.56500000D+03 0.57000000D+03 0.44118413D-02 0.14489905D-03
+ 0.57000000D+03 0.57500000D+03 0.42168943D-02 0.13608468D-03
+ 0.57500000D+03 0.58000000D+03 0.37074762D-02 0.25545259D-03
+ 0.58000000D+03 0.58500000D+03 0.40381764D-02 0.26367905D-03
+ 0.58500000D+03 0.59000000D+03 0.36590731D-02 0.15781485D-03
+ 0.59000000D+03 0.59500000D+03 0.35039208D-02 0.18887475D-03
+ 0.59500000D+03 0.60000000D+03 0.28112736D-02 0.80608564D-03
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.11374291D+02 0.12857192D-02
+ 0.12500000D+03 0.13000000D+03 -.22268858D+02 0.61270242D-02
+ 0.13000000D+03 0.13500000D+03 0.42945600D+01 0.47479052D-02
+ 0.13500000D+03 0.14000000D+03 0.30155115D+01 0.38401474D-02
+ 0.14000000D+03 0.14500000D+03 0.20974694D+01 0.29684871D-02
+ 0.14500000D+03 0.15000000D+03 0.15197891D+01 0.21593357D-02
+ 0.15000000D+03 0.15500000D+03 0.11513803D+01 0.23623539D-02
+ 0.15500000D+03 0.16000000D+03 0.90253063D+00 0.21829955D-02
+ 0.16000000D+03 0.16500000D+03 0.72180357D+00 0.16116727D-02
+ 0.16500000D+03 0.17000000D+03 0.58517561D+00 0.14872757D-02
+ 0.17000000D+03 0.17500000D+03 0.48272936D+00 0.12961611D-02
+ 0.17500000D+03 0.18000000D+03 0.40348796D+00 0.11628857D-02
+ 0.18000000D+03 0.18500000D+03 0.33908983D+00 0.10675524D-02
+ 0.18500000D+03 0.19000000D+03 0.28716542D+00 0.96101162D-03
+ 0.19000000D+03 0.19500000D+03 0.24314699D+00 0.93349913D-03
+ 0.19500000D+03 0.20000000D+03 0.20949030D+00 0.24880115D-02
+ 0.20000000D+03 0.20500000D+03 0.18223637D+00 0.25187616D-02
+ 0.20500000D+03 0.21000000D+03 0.15574450D+00 0.15228473D-02
+ 0.21000000D+03 0.21500000D+03 0.13799892D+00 0.13459961D-02
+ 0.21500000D+03 0.22000000D+03 0.11877998D+00 0.53141266D-03
+ 0.22000000D+03 0.22500000D+03 0.10246503D+00 0.11524258D-02
+ 0.22500000D+03 0.23000000D+03 0.92806384D-01 0.11341764D-02
+ 0.23000000D+03 0.23500000D+03 0.79179474D-01 0.50750615D-03
+ 0.23500000D+03 0.24000000D+03 0.71329859D-01 0.52632293D-03
+ 0.24000000D+03 0.24500000D+03 0.62481252D-01 0.38740377D-03
+ 0.24500000D+03 0.25000000D+03 0.55245677D-01 0.39589799D-03
+ 0.25000000D+03 0.25500000D+03 0.49302498D-01 0.39175521D-03
+ 0.25500000D+03 0.26000000D+03 0.43766098D-01 0.32362249D-03
+ 0.26000000D+03 0.26500000D+03 0.38867397D-01 0.31246583D-03
+ 0.26500000D+03 0.27000000D+03 0.34400333D-01 0.46881101D-03
+ 0.27000000D+03 0.27500000D+03 0.31861573D-01 0.46091213D-03
+ 0.27500000D+03 0.28000000D+03 0.27923421D-01 0.24961897D-03
+ 0.28000000D+03 0.28500000D+03 0.24872268D-01 0.24890794D-03
+ 0.28500000D+03 0.29000000D+03 0.22598245D-01 0.31566623D-03
+ 0.29000000D+03 0.29500000D+03 0.20862024D-01 0.26332367D-03
+ 0.29500000D+03 0.30000000D+03 0.18291524D-01 0.15144285D-03
+ 0.30000000D+03 0.30500000D+03 0.16513011D-01 0.18950787D-03
+ 0.30500000D+03 0.31000000D+03 0.14143513D-01 0.85869111D-03
+ 0.31000000D+03 0.31500000D+03 0.14753719D-01 0.85382801D-03
+ 0.31500000D+03 0.32000000D+03 0.12586297D-01 0.16023185D-03
+ 0.32000000D+03 0.32500000D+03 0.11228731D-01 0.13546139D-03
+ 0.32500000D+03 0.33000000D+03 0.10211802D-01 0.14719014D-03
+ 0.33000000D+03 0.33500000D+03 0.96362001D-02 0.13112285D-03
+ 0.33500000D+03 0.34000000D+03 0.83314716D-02 0.20503268D-03
+ 0.34000000D+03 0.34500000D+03 0.80243453D-02 0.20518782D-03
+ 0.34500000D+03 0.35000000D+03 0.71689557D-02 0.10371669D-03
+ 0.35000000D+03 0.35500000D+03 0.66785317D-02 0.11185867D-03
+ 0.35500000D+03 0.36000000D+03 0.59152147D-02 0.14957400D-03
+ 0.36000000D+03 0.36500000D+03 0.55128686D-02 0.21661938D-03
+ 0.36500000D+03 0.37000000D+03 0.51790768D-02 0.21435616D-03
+ 0.37000000D+03 0.37500000D+03 0.47528845D-02 0.13470109D-03
+ 0.37500000D+03 0.38000000D+03 0.43576747D-02 0.86963522D-04
+ 0.38000000D+03 0.38500000D+03 0.40099459D-02 0.67874979D-04
+ 0.38500000D+03 0.39000000D+03 0.37476432D-02 0.48184687D-04
+ 0.39000000D+03 0.39500000D+03 0.33891931D-02 0.49545524D-04
+ 0.39500000D+03 0.40000000D+03 0.31385060D-02 0.54901281D-04
+ 0.40000000D+03 0.40500000D+03 0.28372805D-02 0.55413739D-04
+ 0.40500000D+03 0.41000000D+03 0.27208429D-02 0.47994032D-04
+ 0.41000000D+03 0.41500000D+03 0.23749425D-02 0.11471999D-03
+ 0.41500000D+03 0.42000000D+03 0.23220437D-02 0.16593135D-03
+ 0.42000000D+03 0.42500000D+03 0.22697002D-02 0.12652060D-03
+ 0.42500000D+03 0.43000000D+03 0.20154917D-02 0.39652113D-04
+ 0.43000000D+03 0.43500000D+03 0.18507536D-02 0.36401551D-04
+ 0.43500000D+03 0.44000000D+03 0.16517389D-02 0.91831374D-04
+ 0.44000000D+03 0.44500000D+03 0.16038215D-02 0.10632870D-03
+ 0.44500000D+03 0.45000000D+03 0.15231126D-02 0.62919543D-04
+ 0.45000000D+03 0.45500000D+03 0.14221617D-02 0.33639601D-04
+ 0.45500000D+03 0.46000000D+03 0.12869919D-02 0.27992504D-04
+ 0.46000000D+03 0.46500000D+03 0.12264333D-02 0.24895821D-04
+ 0.46500000D+03 0.47000000D+03 0.11175308D-02 0.23067938D-04
+ 0.47000000D+03 0.47500000D+03 0.10454760D-02 0.22582050D-04
+ 0.47500000D+03 0.48000000D+03 0.98191943D-03 0.24693114D-04
+ 0.48000000D+03 0.48500000D+03 0.93619246D-03 0.24146368D-04
+ 0.48500000D+03 0.49000000D+03 0.85419113D-03 0.19281749D-04
+ 0.49000000D+03 0.49500000D+03 0.80646494D-03 0.17570764D-04
+ 0.49500000D+03 0.50000000D+03 0.75409971D-03 0.16352483D-04
+ 0.50000000D+03 0.50500000D+03 0.68788724D-03 0.17753514D-04
+ 0.50500000D+03 0.51000000D+03 0.68309860D-03 0.17551239D-04
+ 0.51000000D+03 0.51500000D+03 0.61568136D-03 0.14668834D-04
+ 0.51500000D+03 0.52000000D+03 0.57396049D-03 0.16661008D-04
+ 0.52000000D+03 0.52500000D+03 0.53561693D-03 0.20154665D-04
+ 0.52500000D+03 0.53000000D+03 0.52505662D-03 0.25840401D-04
+ 0.53000000D+03 0.53500000D+03 0.48016276D-03 0.22916363D-04
+ 0.53500000D+03 0.54000000D+03 0.42266257D-03 0.23158775D-04
+ 0.54000000D+03 0.54500000D+03 0.46386588D-03 0.22146709D-04
+ 0.54500000D+03 0.55000000D+03 0.39985977D-03 0.10862705D-04
+ 0.55000000D+03 0.55500000D+03 0.37031520D-03 0.13983026D-04
+ 0.55500000D+03 0.56000000D+03 0.36756312D-03 0.13920072D-04
+ 0.56000000D+03 0.56500000D+03 0.31252325D-03 0.11218931D-04
+ 0.56500000D+03 0.57000000D+03 0.32610037D-03 0.10704947D-04
+ 0.57000000D+03 0.57500000D+03 0.30506679D-03 0.98652802D-05
+ 0.57500000D+03 0.58000000D+03 0.26297596D-03 0.17974716D-04
+ 0.58000000D+03 0.58500000D+03 0.28066656D-03 0.18441518D-04
+ 0.58500000D+03 0.59000000D+03 0.24903132D-03 0.10733694D-04
+ 0.59000000D+03 0.59500000D+03 0.23378482D-03 0.12568863D-04
+ 0.59500000D+03 0.60000000D+03 0.18421762D-03 0.52244174D-04
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 0.42150966D+01 0.88866626D-02
+ 0.30000000D+01 0.60000000D+01 -.35557011D+01 0.46215122D-02
+ 0.60000000D+01 0.90000000D+01 0.87914569D+00 0.37794994D-02
+ 0.90000000D+01 0.12000000D+02 0.13643046D+01 0.31631956D-02
+ 0.12000000D+02 0.15000000D+02 0.13181268D+01 0.27993174D-02
+ 0.15000000D+02 0.18000000D+02 0.11740987D+01 0.31304580D-02
+ 0.18000000D+02 0.21000000D+02 0.10152529D+01 0.29251674D-02
+ 0.21000000D+02 0.24000000D+02 0.89571939D+00 0.23575153D-02
+ 0.24000000D+02 0.27000000D+02 0.78571879D+00 0.22125142D-02
+ 0.27000000D+02 0.30000000D+02 0.69625689D+00 0.23600383D-02
+ 0.30000000D+02 0.33000000D+02 0.60851596D+00 0.25794495D-02
+ 0.33000000D+02 0.36000000D+02 0.54721896D+00 0.22001305D-02
+ 0.36000000D+02 0.39000000D+02 0.49371554D+00 0.19303380D-02
+ 0.39000000D+02 0.42000000D+02 0.44035574D+00 0.19785563D-02
+ 0.42000000D+02 0.45000000D+02 0.39706318D+00 0.19487162D-02
+ 0.45000000D+02 0.48000000D+02 0.36241164D+00 0.18852114D-02
+ 0.48000000D+02 0.51000000D+02 0.32715330D+00 0.22920060D-02
+ 0.51000000D+02 0.54000000D+02 0.29493545D+00 0.31763422D-02
+ 0.54000000D+02 0.57000000D+02 0.27366960D+00 0.28133815D-02
+ 0.57000000D+02 0.60000000D+02 0.24700064D+00 0.15712419D-02
+ 0.60000000D+02 0.63000000D+02 0.23004155D+00 0.14929842D-02
+ 0.63000000D+02 0.66000000D+02 0.20899630D+00 0.12566520D-02
+ 0.66000000D+02 0.69000000D+02 0.19627106D+00 0.17338535D-02
+ 0.69000000D+02 0.72000000D+02 0.17540197D+00 0.19940884D-02
+ 0.72000000D+02 0.75000000D+02 0.16483694D+00 0.20374485D-02
+ 0.75000000D+02 0.78000000D+02 0.15158310D+00 0.18756159D-02
+ 0.78000000D+02 0.81000000D+02 0.14078383D+00 0.11501738D-02
+ 0.81000000D+02 0.84000000D+02 0.13102954D+00 0.10546131D-02
+ 0.84000000D+02 0.87000000D+02 0.11977556D+00 0.13560804D-02
+ 0.87000000D+02 0.90000000D+02 0.11186941D+00 0.12529484D-02
+ 0.90000000D+02 0.93000000D+02 0.10286540D+00 0.98275929D-03
+ 0.93000000D+02 0.96000000D+02 0.97851927D-01 0.10817372D-02
+ 0.96000000D+02 0.99000000D+02 0.90713788D-01 0.94196099D-03
+ 0.99000000D+02 0.10200000D+03 0.84073478D-01 0.82224358D-03
+ 0.10200000D+03 0.10500000D+03 0.80508973D-01 0.12346120D-02
+ 0.10500000D+03 0.10800000D+03 0.70911754D-01 0.11954737D-02
+ 0.10800000D+03 0.11100000D+03 0.70125409D-01 0.76278816D-03
+ 0.11100000D+03 0.11400000D+03 0.63524015D-01 0.81510250D-03
+ 0.11400000D+03 0.11700000D+03 0.59137226D-01 0.10423782D-02
+ 0.11700000D+03 0.12000000D+03 0.57843449D-01 0.10464362D-02
+ 0.12000000D+03 0.12300000D+03 0.51012914D-01 0.84864109D-03
+ 0.12300000D+03 0.12600000D+03 0.49942718D-01 0.73387940D-03
+ 0.12600000D+03 0.12900000D+03 0.46487909D-01 0.63072832D-03
+ 0.12900000D+03 0.13200000D+03 0.42450734D-01 0.69235750D-03
+ 0.13200000D+03 0.13500000D+03 0.42464503D-01 0.67225141D-03
+ 0.13500000D+03 0.13800000D+03 0.37477177D-01 0.65715957D-03
+ 0.13800000D+03 0.14100000D+03 0.36872983D-01 0.67479980D-03
+ 0.14100000D+03 0.14400000D+03 0.34397354D-01 0.64316317D-03
+ 0.14400000D+03 0.14700000D+03 0.31740482D-01 0.81295242D-03
+ 0.14700000D+03 0.15000000D+03 0.30703245D-01 0.71374612D-03
+ 0.15000000D+03 0.15300000D+03 0.28823240D-01 0.51750898D-03
+ 0.15300000D+03 0.15600000D+03 0.26918193D-01 0.64563103D-03
+ 0.15600000D+03 0.15900000D+03 0.25487578D-01 0.59868892D-03
+ 0.15900000D+03 0.16200000D+03 0.23828439D-01 0.54875088D-03
+ 0.16200000D+03 0.16500000D+03 0.22784449D-01 0.65331556D-03
+ 0.16500000D+03 0.16800000D+03 0.21805738D-01 0.63126217D-03
+ 0.16800000D+03 0.17100000D+03 0.19036450D-01 0.81183440D-03
+ 0.17100000D+03 0.17400000D+03 0.20106479D-01 0.77251725D-03
+ 0.17400000D+03 0.17700000D+03 0.18055230D-01 0.61602243D-03
+ 0.17700000D+03 0.18000000D+03 0.16769538D-01 0.72673949D-03
+ 0.18000000D+03 0.18300000D+03 0.15559597D-01 0.57420319D-03
+ 0.18300000D+03 0.18600000D+03 0.15394076D-01 0.47944496D-03
+ 0.18600000D+03 0.18900000D+03 0.14920899D-01 0.61857821D-03
+ 0.18900000D+03 0.19200000D+03 0.13386144D-01 0.54722828D-03
+ 0.19200000D+03 0.19500000D+03 0.13441765D-01 0.96356300D-03
+ 0.19500000D+03 0.19800000D+03 0.11543228D-01 0.12270780D-02
+ 0.19800000D+03 0.20100000D+03 0.11123069D-01 0.91664193D-03
+ 0.20100000D+03 0.20400000D+03 0.10506549D-01 0.53922516D-03
+ 0.20400000D+03 0.20700000D+03 0.10492201D-01 0.45244841D-03
+ 0.20700000D+03 0.21000000D+03 0.90749891D-02 0.39058659D-03
+ 0.21000000D+03 0.21300000D+03 0.93651381D-02 0.28972035D-03
+ 0.21300000D+03 0.21600000D+03 0.83744384D-02 0.29358836D-03
+ 0.21600000D+03 0.21900000D+03 0.83938185D-02 0.52883942D-03
+ 0.21900000D+03 0.22200000D+03 0.84124372D-02 0.86622294D-03
+ 0.22200000D+03 0.22500000D+03 0.62243034D-02 0.79017481D-03
+ 0.22500000D+03 0.22800000D+03 0.70250661D-02 0.40116808D-03
+ 0.22800000D+03 0.23100000D+03 0.60297654D-02 0.30320839D-03
+ 0.23100000D+03 0.23400000D+03 0.65055647D-02 0.24939449D-03
+ 0.23400000D+03 0.23700000D+03 0.59204995D-02 0.25267441D-03
+ 0.23700000D+03 0.24000000D+03 0.52141904D-02 0.24062968D-03
+ 0.24000000D+03 0.24300000D+03 0.53193740D-02 0.26053533D-03
+ 0.24300000D+03 0.24600000D+03 0.48235450D-02 0.36899543D-03
+ 0.24600000D+03 0.24900000D+03 0.52420398D-02 0.65531763D-03
+ 0.24900000D+03 0.25200000D+03 0.36785457D-02 0.74720201D-03
+ 0.25200000D+03 0.25500000D+03 0.36805748D-02 0.50450296D-03
+ 0.25500000D+03 0.25800000D+03 0.40055447D-02 0.23408071D-03
+ 0.25800000D+03 0.26100000D+03 0.37525378D-02 0.19038683D-03
+ 0.26100000D+03 0.26400000D+03 0.34701334D-02 0.17079249D-03
+ 0.26400000D+03 0.26700000D+03 0.34197273D-02 0.33806100D-03
+ 0.26700000D+03 0.27000000D+03 0.28651380D-02 0.36546853D-03
+ 0.27000000D+03 0.27300000D+03 0.24557674D-02 0.25314440D-03
+ 0.27300000D+03 0.27600000D+03 0.24971297D-02 0.21579740D-03
+ 0.27600000D+03 0.27900000D+03 0.27576548D-02 0.27349298D-03
+ 0.27900000D+03 0.28200000D+03 0.25808986D-02 0.30074094D-03
+ 0.28200000D+03 0.28500000D+03 0.23887048D-02 0.24087457D-03
+ 0.28500000D+03 0.28800000D+03 0.93974852D-03 0.96232027D-03
+ 0.28800000D+03 0.29100000D+03 0.26218642D-02 0.97639751D-03
+ 0.29100000D+03 0.29400000D+03 0.10908445D-02 0.90241573D-03
+ 0.29400000D+03 0.29700000D+03 0.26642606D-02 0.87420532D-03
+ 0.29700000D+03 0.30000000D+03 0.14667362D-02 0.15163746D-03
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 0.42215381D+01 0.88855212D-02
+ 0.30000000D+01 0.60000000D+01 -.35523923D+01 0.46155864D-02
+ 0.60000000D+01 0.90000000D+01 0.87568600D+00 0.37665518D-02
+ 0.90000000D+01 0.12000000D+02 0.13546686D+01 0.31414990D-02
+ 0.12000000D+02 0.15000000D+02 0.13029217D+01 0.27672704D-02
+ 0.15000000D+02 0.18000000D+02 0.11539917D+01 0.30739472D-02
+ 0.18000000D+02 0.21000000D+02 0.99115647D+00 0.28599498D-02
+ 0.21000000D+02 0.24000000D+02 0.86765870D+00 0.22819084D-02
+ 0.24000000D+02 0.27000000D+02 0.75437088D+00 0.21268704D-02
+ 0.27000000D+02 0.30000000D+02 0.66188157D+00 0.22388188D-02
+ 0.30000000D+02 0.33000000D+02 0.57222131D+00 0.24273088D-02
+ 0.33000000D+02 0.36000000D+02 0.50855711D+00 0.20464989D-02
+ 0.36000000D+02 0.39000000D+02 0.45299923D+00 0.17717413D-02
+ 0.39000000D+02 0.42000000D+02 0.39855095D+00 0.17887659D-02
+ 0.42000000D+02 0.45000000D+02 0.35420402D+00 0.17403386D-02
+ 0.45000000D+02 0.48000000D+02 0.31838419D+00 0.16544914D-02
+ 0.48000000D+02 0.51000000D+02 0.28281708D+00 0.19772776D-02
+ 0.51000000D+02 0.54000000D+02 0.25073759D+00 0.26921202D-02
+ 0.54000000D+02 0.57000000D+02 0.22863700D+00 0.23647043D-02
+ 0.57000000D+02 0.60000000D+02 0.20264847D+00 0.12887690D-02
+ 0.60000000D+02 0.63000000D+02 0.18525064D+00 0.12040606D-02
+ 0.63000000D+02 0.66000000D+02 0.16508454D+00 0.99379781D-03
+ 0.66000000D+02 0.69000000D+02 0.15196982D+00 0.13349654D-02
+ 0.69000000D+02 0.72000000D+02 0.13307479D+00 0.15161835D-02
+ 0.72000000D+02 0.75000000D+02 0.12250794D+00 0.15099846D-02
+ 0.75000000D+02 0.78000000D+02 0.11028321D+00 0.13716634D-02
+ 0.78000000D+02 0.81000000D+02 0.10024596D+00 0.82220195D-03
+ 0.81000000D+02 0.84000000D+02 0.91272186D-01 0.73283307D-03
+ 0.84000000D+02 0.87000000D+02 0.81591506D-01 0.92137794D-03
+ 0.87000000D+02 0.90000000D+02 0.74523602D-01 0.83906615D-03
+ 0.90000000D+02 0.93000000D+02 0.66992130D-01 0.63893050D-03
+ 0.93000000D+02 0.96000000D+02 0.62286870D-01 0.68775496D-03
+ 0.96000000D+02 0.99000000D+02 0.56406855D-01 0.58873898D-03
+ 0.99000000D+02 0.10200000D+03 0.51079976D-01 0.49819814D-03
+ 0.10200000D+03 0.10500000D+03 0.47762195D-01 0.72862380D-03
+ 0.10500000D+03 0.10800000D+03 0.41085917D-01 0.69716791D-03
+ 0.10800000D+03 0.11100000D+03 0.39681015D-01 0.43236543D-03
+ 0.11100000D+03 0.11400000D+03 0.35092719D-01 0.44918679D-03
+ 0.11400000D+03 0.11700000D+03 0.31905804D-01 0.56072879D-03
+ 0.11700000D+03 0.12000000D+03 0.30469420D-01 0.55276085D-03
+ 0.12000000D+03 0.12300000D+03 0.26230126D-01 0.43713671D-03
+ 0.12300000D+03 0.12600000D+03 0.25079759D-01 0.36910773D-03
+ 0.12600000D+03 0.12900000D+03 0.22787303D-01 0.30978471D-03
+ 0.12900000D+03 0.13200000D+03 0.20321712D-01 0.33002786D-03
+ 0.13200000D+03 0.13500000D+03 0.19845972D-01 0.31570562D-03
+ 0.13500000D+03 0.13800000D+03 0.17099657D-01 0.29836776D-03
+ 0.13800000D+03 0.14100000D+03 0.16428134D-01 0.30161683D-03
+ 0.14100000D+03 0.14400000D+03 0.14961614D-01 0.27877039D-03
+ 0.14400000D+03 0.14700000D+03 0.13484531D-01 0.34455673D-03
+ 0.14700000D+03 0.15000000D+03 0.12738463D-01 0.29782386D-03
+ 0.15000000D+03 0.15300000D+03 0.11677415D-01 0.20938826D-03
+ 0.15300000D+03 0.15600000D+03 0.10651730D-01 0.25459642D-03
+ 0.15600000D+03 0.15900000D+03 0.98525136D-02 0.23266344D-03
+ 0.15900000D+03 0.16200000D+03 0.90011731D-02 0.20635195D-03
+ 0.16200000D+03 0.16500000D+03 0.84078058D-02 0.24094798D-03
+ 0.16500000D+03 0.16800000D+03 0.78603339D-02 0.22787107D-03
+ 0.16800000D+03 0.17100000D+03 0.67088080D-02 0.28452952D-03
+ 0.17100000D+03 0.17400000D+03 0.69261985D-02 0.26784220D-03
+ 0.17400000D+03 0.17700000D+03 0.60763348D-02 0.20646888D-03
+ 0.17700000D+03 0.18000000D+03 0.55164940D-02 0.23915343D-03
+ 0.18000000D+03 0.18300000D+03 0.50057144D-02 0.18599818D-03
+ 0.18300000D+03 0.18600000D+03 0.48446480D-02 0.15015443D-03
+ 0.18600000D+03 0.18900000D+03 0.45888636D-02 0.19002031D-03
+ 0.18900000D+03 0.19200000D+03 0.40260385D-02 0.16556207D-03
+ 0.19200000D+03 0.19500000D+03 0.39537255D-02 0.28116977D-03
+ 0.19500000D+03 0.19800000D+03 0.33213885D-02 0.35406595D-03
+ 0.19800000D+03 0.20100000D+03 0.31334032D-02 0.25996742D-03
+ 0.20100000D+03 0.20400000D+03 0.28981353D-02 0.14928097D-03
+ 0.20400000D+03 0.20700000D+03 0.28332198D-02 0.12216006D-03
+ 0.20700000D+03 0.21000000D+03 0.23994242D-02 0.10367031D-03
+ 0.21000000D+03 0.21300000D+03 0.24262855D-02 0.75167380D-04
+ 0.21300000D+03 0.21600000D+03 0.21247988D-02 0.74327673D-04
+ 0.21600000D+03 0.21900000D+03 0.20843404D-02 0.13049163D-03
+ 0.21900000D+03 0.22200000D+03 0.20437422D-02 0.20989697D-03
+ 0.22200000D+03 0.22500000D+03 0.14813330D-02 0.18950006D-03
+ 0.22500000D+03 0.22800000D+03 0.16407614D-02 0.93941598D-04
+ 0.22800000D+03 0.23100000D+03 0.13805973D-02 0.69535052D-04
+ 0.23100000D+03 0.23400000D+03 0.14598872D-02 0.55981819D-04
+ 0.23400000D+03 0.23700000D+03 0.13013295D-02 0.55486677D-04
+ 0.23700000D+03 0.24000000D+03 0.11236642D-02 0.51983620D-04
+ 0.24000000D+03 0.24300000D+03 0.11244129D-02 0.54888456D-04
+ 0.24300000D+03 0.24600000D+03 0.99976177D-03 0.76245699D-04
+ 0.24600000D+03 0.24900000D+03 0.10637086D-02 0.13245566D-03
+ 0.24900000D+03 0.25200000D+03 0.73170171D-03 0.14927166D-03
+ 0.25200000D+03 0.25500000D+03 0.71998122D-03 0.99350511D-04
+ 0.25500000D+03 0.25800000D+03 0.76915871D-03 0.45043721D-04
+ 0.25800000D+03 0.26100000D+03 0.70673707D-03 0.35885738D-04
+ 0.26100000D+03 0.26400000D+03 0.64110124D-03 0.31616106D-04
+ 0.26400000D+03 0.26700000D+03 0.61984499D-03 0.60914882D-04
+ 0.26700000D+03 0.27000000D+03 0.50940659D-03 0.65403146D-04
+ 0.27000000D+03 0.27300000D+03 0.42911813D-03 0.44282523D-04
+ 0.27300000D+03 0.27600000D+03 0.42918383D-03 0.37160541D-04
+ 0.27600000D+03 0.27900000D+03 0.46569292D-03 0.45899907D-04
+ 0.27900000D+03 0.28200000D+03 0.42736547D-03 0.49968251D-04
+ 0.28200000D+03 0.28500000D+03 0.38800403D-03 0.39232012D-04
+ 0.28500000D+03 0.28800000D+03 0.15129837D-03 0.15262566D-03
+ 0.28800000D+03 0.29100000D+03 0.41367453D-03 0.15462121D-03
+ 0.29100000D+03 0.29400000D+03 0.16989887D-03 0.13834138D-03
+ 0.29400000D+03 0.29700000D+03 0.40566216D-03 0.13380548D-03
+ 0.29700000D+03 0.30000000D+03 0.21884584D-03 0.22595066D-04
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.34430174D+02 0.87786884D-02
+ 0.30000000D+01 0.60000000D+01 0.24880676D+02 0.13853576D-02
+ 0.60000000D+01 0.90000000D+01 0.91818024D+01 0.56539257D-03
+ 0.90000000D+01 0.12000000D+02 0.47340483D+01 0.32884029D-03
+ 0.12000000D+02 0.15000000D+02 0.28543661D+01 0.21021409D-03
+ 0.15000000D+02 0.18000000D+02 0.18887069D+01 0.15189244D-03
+ 0.18000000D+02 0.21000000D+02 0.13290890D+01 0.11041686D-03
+ 0.21000000D+02 0.24000000D+02 0.97751620D+00 0.84300364D-04
+ 0.24000000D+02 0.27000000D+02 0.74332719D+00 0.68577954D-04
+ 0.27000000D+02 0.30000000D+02 0.58012603D+00 0.59093574D-04
+ 0.30000000D+02 0.33000000D+02 0.46225928D+00 0.48973899D-04
+ 0.33000000D+02 0.36000000D+02 0.37471620D+00 0.39653739D-04
+ 0.36000000D+02 0.39000000D+02 0.30818304D+00 0.33787661D-04
+ 0.39000000D+02 0.42000000D+02 0.25655021D+00 0.29318044D-04
+ 0.42000000D+02 0.45000000D+02 0.21587158D+00 0.25643740D-04
+ 0.45000000D+02 0.48000000D+02 0.18334696D+00 0.22873153D-04
+ 0.48000000D+02 0.51000000D+02 0.15701965D+00 0.20171753D-04
+ 0.51000000D+02 0.54000000D+02 0.13541604D+00 0.17791118D-04
+ 0.54000000D+02 0.57000000D+02 0.11755573D+00 0.15929141D-04
+ 0.57000000D+02 0.60000000D+02 0.10259138D+00 0.14783681D-04
+ 0.60000000D+02 0.63000000D+02 0.90082569D-01 0.13082054D-04
+ 0.63000000D+02 0.66000000D+02 0.79463525D-01 0.12084380D-04
+ 0.66000000D+02 0.69000000D+02 0.70394078D-01 0.10712310D-04
+ 0.69000000D+02 0.72000000D+02 0.62622257D-01 0.97693183D-05
+ 0.72000000D+02 0.75000000D+02 0.55919591D-01 0.92224707D-05
+ 0.75000000D+02 0.78000000D+02 0.50127211D-01 0.81201409D-05
+ 0.78000000D+02 0.81000000D+02 0.45059073D-01 0.75221281D-05
+ 0.81000000D+02 0.84000000D+02 0.40634888D-01 0.70009993D-05
+ 0.84000000D+02 0.87000000D+02 0.36758356D-01 0.64494283D-05
+ 0.87000000D+02 0.90000000D+02 0.33335626D-01 0.59525042D-05
+ 0.90000000D+02 0.93000000D+02 0.30299862D-01 0.55522642D-05
+ 0.93000000D+02 0.96000000D+02 0.27611530D-01 0.51529061D-05
+ 0.96000000D+02 0.99000000D+02 0.25212871D-01 0.48954188D-05
+ 0.99000000D+02 0.10200000D+03 0.23068169D-01 0.44620215D-05
+ 0.10200000D+03 0.10500000D+03 0.21160456D-01 0.44003284D-05
+ 0.10500000D+03 0.10800000D+03 0.19443346D-01 0.38876764D-05
+ 0.10800000D+03 0.11100000D+03 0.17892501D-01 0.39118335D-05
+ 0.11100000D+03 0.11400000D+03 0.16500832D-01 0.35069949D-05
+ 0.11400000D+03 0.11700000D+03 0.15244767D-01 0.33347110D-05
+ 0.11700000D+03 0.12000000D+03 0.14093672D-01 0.30878275D-05
+ 0.12000000D+03 0.12300000D+03 0.13058979D-01 0.28580454D-05
+ 0.12300000D+03 0.12600000D+03 0.12114476D-01 0.27457607D-05
+ 0.12600000D+03 0.12900000D+03 0.11257147D-01 0.26381211D-05
+ 0.12900000D+03 0.13200000D+03 0.10465338D-01 0.24398705D-05
+ 0.13200000D+03 0.13500000D+03 0.97466236D-02 0.22801716D-05
+ 0.13500000D+03 0.13800000D+03 0.90923351D-02 0.22657550D-05
+ 0.13800000D+03 0.14100000D+03 0.84848507D-02 0.21594577D-05
+ 0.14100000D+03 0.14400000D+03 0.79291929D-02 0.19437809D-05
+ 0.14400000D+03 0.14700000D+03 0.74217162D-02 0.18823044D-05
+ 0.14700000D+03 0.15000000D+03 0.69508938D-02 0.18466700D-05
+ 0.15000000D+03 0.15300000D+03 0.65175645D-02 0.16995853D-05
+ 0.15300000D+03 0.15600000D+03 0.61162279D-02 0.16587527D-05
+ 0.15600000D+03 0.15900000D+03 0.57430562D-02 0.15312980D-05
+ 0.15900000D+03 0.16200000D+03 0.53983527D-02 0.14770769D-05
+ 0.16200000D+03 0.16500000D+03 0.50815535D-02 0.14357682D-05
+ 0.16500000D+03 0.16800000D+03 0.47877164D-02 0.13377353D-05
+ 0.16800000D+03 0.17100000D+03 0.45096624D-02 0.13114346D-05
+ 0.17100000D+03 0.17400000D+03 0.42564753D-02 0.12334959D-05
+ 0.17400000D+03 0.17700000D+03 0.40147298D-02 0.11730584D-05
+ 0.17700000D+03 0.18000000D+03 0.37940986D-02 0.11052509D-05
+ 0.18000000D+03 0.18300000D+03 0.35879039D-02 0.10754305D-05
+ 0.18300000D+03 0.18600000D+03 0.33924781D-02 0.10172426D-05
+ 0.18600000D+03 0.18900000D+03 0.32117796D-02 0.97607163D-06
+ 0.18900000D+03 0.19200000D+03 0.30447131D-02 0.93016392D-06
+ 0.19200000D+03 0.19500000D+03 0.28857337D-02 0.91581097D-06
+ 0.19500000D+03 0.19800000D+03 0.27359321D-02 0.85291030D-06
+ 0.19800000D+03 0.20100000D+03 0.25966055D-02 0.81881605D-06
+ 0.20100000D+03 0.20400000D+03 0.24662303D-02 0.80797637D-06
+ 0.20400000D+03 0.20700000D+03 0.23432462D-02 0.76845740D-06
+ 0.20700000D+03 0.21000000D+03 0.22279211D-02 0.74698860D-06
+ 0.21000000D+03 0.21300000D+03 0.21183639D-02 0.72353069D-06
+ 0.21300000D+03 0.21600000D+03 0.20160912D-02 0.68243643D-06
+ 0.21600000D+03 0.21900000D+03 0.19197925D-02 0.66711055D-06
+ 0.21900000D+03 0.22200000D+03 0.18293357D-02 0.63065048D-06
+ 0.22200000D+03 0.22500000D+03 0.17430694D-02 0.61803532D-06
+ 0.22500000D+03 0.22800000D+03 0.16628226D-02 0.59050283D-06
+ 0.22800000D+03 0.23100000D+03 0.15870539D-02 0.56862480D-06
+ 0.23100000D+03 0.23400000D+03 0.15151640D-02 0.56100280D-06
+ 0.23400000D+03 0.23700000D+03 0.14467020D-02 0.53137861D-06
+ 0.23700000D+03 0.24000000D+03 0.13816357D-02 0.51424132D-06
+ 0.24000000D+03 0.24300000D+03 0.13195594D-02 0.48556940D-06
+ 0.24300000D+03 0.24600000D+03 0.12620257D-02 0.47477812D-06
+ 0.24600000D+03 0.24900000D+03 0.12075107D-02 0.46298489D-06
+ 0.24900000D+03 0.25200000D+03 0.11558747D-02 0.45150965D-06
+ 0.25200000D+03 0.25500000D+03 0.11062352D-02 0.43710691D-06
+ 0.25500000D+03 0.25800000D+03 0.10594851D-02 0.40895467D-06
+ 0.25800000D+03 0.26100000D+03 0.10146062D-02 0.39745623D-06
+ 0.26100000D+03 0.26400000D+03 0.97295644D-03 0.39793527D-06
+ 0.26400000D+03 0.26700000D+03 0.93298272D-03 0.37676612D-06
+ 0.26700000D+03 0.27000000D+03 0.89380004D-03 0.37902640D-06
+ 0.27000000D+03 0.27300000D+03 0.85822650D-03 0.36519653D-06
+ 0.27300000D+03 0.27600000D+03 0.82437785D-03 0.34445109D-06
+ 0.27600000D+03 0.27900000D+03 0.79081660D-03 0.32906461D-06
+ 0.27900000D+03 0.28200000D+03 0.75972735D-03 0.32054179D-06
+ 0.28200000D+03 0.28500000D+03 0.72968889D-03 0.30907723D-06
+ 0.28500000D+03 0.28800000D+03 0.70135335D-03 0.30542078D-06
+ 0.28800000D+03 0.29100000D+03 0.67407030D-03 0.29871470D-06
+ 0.29100000D+03 0.29400000D+03 0.64771609D-03 0.27963887D-06
+ 0.29400000D+03 0.29700000D+03 0.62351491D-03 0.28172602D-06
+ 0.29700000D+03 0.30000000D+03 0.59938930D-03 0.26938976D-06
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1400_CM13_PDF4LHC30-APX2-HH.top b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1400_CM13_PDF4LHC30-APX2-HH.top
new file mode 100644
index 0000000000000000000000000000000000000000..60e3f147188861b696755f17651a8fc9dc83b928
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/H1400_CM13_PDF4LHC30-APX2-HH.top
@@ -0,0 +1,2060 @@
+# yh index   0
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16833552D-06 0.20083738D-06
+ -.45000000D+01 -.44000000D+01 0.82225133D-04 0.40250659D-05
+ -.44000000D+01 -.43000000D+01 0.80727890D-03 0.15503762D-04
+ -.43000000D+01 -.42000000D+01 0.34407014D-02 0.44007692D-04
+ -.42000000D+01 -.41000000D+01 0.10241605D-01 0.11849734D-03
+ -.41000000D+01 -.40000000D+01 0.23803291D-01 0.23229188D-03
+ -.40000000D+01 -.39000000D+01 0.49122173D-01 0.48636727D-03
+ -.39000000D+01 -.38000000D+01 0.87428455D-01 0.10735927D-02
+ -.38000000D+01 -.37000000D+01 0.14313049D+00 0.13018901D-02
+ -.37000000D+01 -.36000000D+01 0.21827094D+00 0.18051223D-02
+ -.36000000D+01 -.35000000D+01 0.31468907D+00 0.23208425D-02
+ -.35000000D+01 -.34000000D+01 0.43007584D+00 0.33276228D-02
+ -.34000000D+01 -.33000000D+01 0.58230834D+00 0.39964382D-02
+ -.33000000D+01 -.32000000D+01 0.74320164D+00 0.46801302D-02
+ -.32000000D+01 -.31000000D+01 0.93180651D+00 0.64890145D-02
+ -.31000000D+01 -.30000000D+01 0.11492330D+01 0.67355052D-02
+ -.30000000D+01 -.29000000D+01 0.13852306D+01 0.73537146D-02
+ -.29000000D+01 -.28000000D+01 0.16611097D+01 0.80743142D-02
+ -.28000000D+01 -.27000000D+01 0.19183196D+01 0.10025256D-01
+ -.27000000D+01 -.26000000D+01 0.22221587D+01 0.98307213D-02
+ -.26000000D+01 -.25000000D+01 0.25244466D+01 0.11766085D-01
+ -.25000000D+01 -.24000000D+01 0.28662535D+01 0.11950380D-01
+ -.24000000D+01 -.23000000D+01 0.31809283D+01 0.11173204D-01
+ -.23000000D+01 -.22000000D+01 0.35244797D+01 0.13775099D-01
+ -.22000000D+01 -.21000000D+01 0.38941688D+01 0.16937335D-01
+ -.21000000D+01 -.20000000D+01 0.42905506D+01 0.13534490D-01
+ -.20000000D+01 -.19000000D+01 0.46439236D+01 0.16056077D-01
+ -.19000000D+01 -.18000000D+01 0.50280064D+01 0.14365182D-01
+ -.18000000D+01 -.17000000D+01 0.53544503D+01 0.16123571D-01
+ -.17000000D+01 -.16000000D+01 0.57037671D+01 0.16897045D-01
+ -.16000000D+01 -.15000000D+01 0.60391757D+01 0.17545788D-01
+ -.15000000D+01 -.14000000D+01 0.64101861D+01 0.19202853D-01
+ -.14000000D+01 -.13000000D+01 0.67088311D+01 0.17401810D-01
+ -.13000000D+01 -.12000000D+01 0.70276145D+01 0.17915924D-01
+ -.12000000D+01 -.11000000D+01 0.73294675D+01 0.17668274D-01
+ -.11000000D+01 -.10000000D+01 0.75716256D+01 0.19721027D-01
+ -.10000000D+01 -.90000000D+00 0.78544255D+01 0.21883572D-01
+ -.90000000D+00 -.80000000D+00 0.80939931D+01 0.21028323D-01
+ -.80000000D+00 -.70000000D+00 0.82041760D+01 0.21145221D-01
+ -.70000000D+00 -.60000000D+00 0.83862108D+01 0.77998562D-01
+ -.60000000D+00 -.50000000D+00 0.85892936D+01 0.21358382D-01
+ -.50000000D+00 -.40000000D+00 0.87341881D+01 0.22687458D-01
+ -.40000000D+00 -.30000000D+00 0.87879349D+01 0.21560550D-01
+ -.30000000D+00 -.20000000D+00 0.89168349D+01 0.23842994D-01
+ -.20000000D+00 -.10000000D+00 0.89717580D+01 0.20879895D-01
+ -.10000000D+00 0.18041124D-15 0.89833702D+01 0.20475521D-01
+ 0.70776718D-15 0.10000000D+00 0.89992176D+01 0.23338616D-01
+ 0.10000000D+00 0.20000000D+00 0.89627519D+01 0.20425240D-01
+ 0.20000000D+00 0.30000000D+00 0.88759601D+01 0.21361383D-01
+ 0.30000000D+00 0.40000000D+00 0.88084117D+01 0.22750280D-01
+ 0.40000000D+00 0.50000000D+00 0.86771273D+01 0.23042921D-01
+ 0.50000000D+00 0.60000000D+00 0.85754092D+01 0.22475045D-01
+ 0.60000000D+00 0.70000000D+00 0.84334855D+01 0.19596726D-01
+ 0.70000000D+00 0.80000000D+00 0.82528804D+01 0.20558102D-01
+ 0.80000000D+00 0.90000000D+00 0.80835536D+01 0.20479932D-01
+ 0.90000000D+00 0.10000000D+01 0.78330048D+01 0.21579550D-01
+ 0.10000000D+01 0.11000000D+01 0.76154531D+01 0.21673481D-01
+ 0.11000000D+01 0.12000000D+01 0.73522356D+01 0.19099096D-01
+ 0.12000000D+01 0.13000000D+01 0.70299677D+01 0.22148590D-01
+ 0.13000000D+01 0.14000000D+01 0.67342710D+01 0.17646441D-01
+ 0.14000000D+01 0.15000000D+01 0.63887925D+01 0.16974483D-01
+ 0.15000000D+01 0.16000000D+01 0.60346493D+01 0.16883525D-01
+ 0.16000000D+01 0.17000000D+01 0.57006970D+01 0.16668409D-01
+ 0.17000000D+01 0.18000000D+01 0.53760137D+01 0.16499211D-01
+ 0.18000000D+01 0.19000000D+01 0.49842437D+01 0.16381104D-01
+ 0.19000000D+01 0.20000000D+01 0.46324972D+01 0.15936141D-01
+ 0.20000000D+01 0.21000000D+01 0.42775454D+01 0.13965032D-01
+ 0.21000000D+01 0.22000000D+01 0.38664156D+01 0.13057171D-01
+ 0.22000000D+01 0.23000000D+01 0.35432572D+01 0.14831385D-01
+ 0.23000000D+01 0.24000000D+01 0.31853267D+01 0.11976619D-01
+ 0.24000000D+01 0.25000000D+01 0.28536919D+01 0.14354817D-01
+ 0.25000000D+01 0.26000000D+01 0.25280273D+01 0.98435129D-02
+ 0.26000000D+01 0.27000000D+01 0.22054928D+01 0.93307685D-02
+ 0.27000000D+01 0.28000000D+01 0.19298517D+01 0.24423642D-01
+ 0.28000000D+01 0.29000000D+01 0.16409544D+01 0.12835797D-01
+ 0.29000000D+01 0.30000000D+01 0.13931349D+01 0.70666068D-02
+ 0.30000000D+01 0.31000000D+01 0.11398626D+01 0.78376392D-02
+ 0.31000000D+01 0.32000000D+01 0.93724232D+00 0.57523727D-02
+ 0.32000000D+01 0.33000000D+01 0.74922499D+00 0.47545405D-02
+ 0.33000000D+01 0.34000000D+01 0.58047524D+00 0.40843388D-02
+ 0.34000000D+01 0.35000000D+01 0.43669444D+00 0.34204762D-02
+ 0.35000000D+01 0.36000000D+01 0.31717081D+00 0.24128565D-02
+ 0.36000000D+01 0.37000000D+01 0.22128462D+00 0.17763841D-02
+ 0.37000000D+01 0.38000000D+01 0.14374171D+00 0.12599744D-02
+ 0.38000000D+01 0.39000000D+01 0.88745955D-01 0.89411256D-03
+ 0.39000000D+01 0.40000000D+01 0.49686689D-01 0.12967841D-02
+ 0.40000000D+01 0.41000000D+01 0.23557614D-01 0.22716999D-03
+ 0.41000000D+01 0.42000000D+01 0.10024818D-01 0.10686172D-03
+ 0.42000000D+01 0.43000000D+01 0.34426713D-02 0.41004119D-04
+ 0.43000000D+01 0.44000000D+01 0.81762867D-03 0.15626544D-04
+ 0.44000000D+01 0.45000000D+01 0.81378563D-04 0.40339479D-05
+ 0.45000000D+01 0.46000000D+01 0.16392236D-06 0.20236007D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-1 index   1
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16784538D-06 0.20083732D-06
+ -.45000000D+01 -.44000000D+01 0.79884956D-04 0.40248048D-05
+ -.44000000D+01 -.43000000D+01 0.76715922D-03 0.15496996D-04
+ -.43000000D+01 -.42000000D+01 0.32081813D-02 0.43967377D-04
+ -.42000000D+01 -.41000000D+01 0.94060663D-02 0.11832111D-03
+ -.41000000D+01 -.40000000D+01 0.21492738D-01 0.23159440D-03
+ -.40000000D+01 -.39000000D+01 0.43860865D-01 0.48540984D-03
+ -.39000000D+01 -.38000000D+01 0.76934481D-01 0.10722361D-02
+ -.38000000D+01 -.37000000D+01 0.12429188D+00 0.13006993D-02
+ -.37000000D+01 -.36000000D+01 0.18718144D+00 0.18017537D-02
+ -.36000000D+01 -.35000000D+01 0.26668156D+00 0.23151406D-02
+ -.35000000D+01 -.34000000D+01 0.35996364D+00 0.33196274D-02
+ -.34000000D+01 -.33000000D+01 0.48428614D+00 0.39787000D-02
+ -.33000000D+01 -.32000000D+01 0.61063028D+00 0.46603597D-02
+ -.32000000D+01 -.31000000D+01 0.75899057D+00 0.64776981D-02
+ -.31000000D+01 -.30000000D+01 0.92993584D+00 0.67201111D-02
+ -.30000000D+01 -.29000000D+01 0.11117372D+01 0.73055708D-02
+ -.29000000D+01 -.28000000D+01 0.13277639D+01 0.80242004D-02
+ -.28000000D+01 -.27000000D+01 0.15188872D+01 0.10000261D-01
+ -.27000000D+01 -.26000000D+01 0.17521881D+01 0.97868702D-02
+ -.26000000D+01 -.25000000D+01 0.19757815D+01 0.11730597D-01
+ -.25000000D+01 -.24000000D+01 0.22355538D+01 0.11876966D-01
+ -.24000000D+01 -.23000000D+01 0.24638895D+01 0.11096670D-01
+ -.23000000D+01 -.22000000D+01 0.27168214D+01 0.13711593D-01
+ -.22000000D+01 -.21000000D+01 0.29935131D+01 0.16905176D-01
+ -.21000000D+01 -.20000000D+01 0.32934814D+01 0.13475051D-01
+ -.20000000D+01 -.19000000D+01 0.35473993D+01 0.15983264D-01
+ -.19000000D+01 -.18000000D+01 0.38334664D+01 0.14288047D-01
+ -.18000000D+01 -.17000000D+01 0.40588393D+01 0.16072975D-01
+ -.17000000D+01 -.16000000D+01 0.43111924D+01 0.16805551D-01
+ -.16000000D+01 -.15000000D+01 0.45518225D+01 0.17432460D-01
+ -.15000000D+01 -.14000000D+01 0.48262552D+01 0.19073589D-01
+ -.14000000D+01 -.13000000D+01 0.50332810D+01 0.17259332D-01
+ -.13000000D+01 -.12000000D+01 0.52643640D+01 0.17775686D-01
+ -.12000000D+01 -.11000000D+01 0.54827569D+01 0.17556929D-01
+ -.11000000D+01 -.10000000D+01 0.56458218D+01 0.19627922D-01
+ -.10000000D+01 -.90000000D+00 0.58566902D+01 0.21791437D-01
+ -.90000000D+00 -.80000000D+00 0.60258971D+01 0.20932655D-01
+ -.80000000D+00 -.70000000D+00 0.60799577D+01 0.20997329D-01
+ -.70000000D+00 -.60000000D+00 0.62009811D+01 0.77906105D-01
+ -.60000000D+00 -.50000000D+00 0.63646084D+01 0.21199470D-01
+ -.50000000D+00 -.40000000D+00 0.64675196D+01 0.22557836D-01
+ -.40000000D+00 -.30000000D+00 0.64936206D+01 0.20880541D-01
+ -.30000000D+00 -.20000000D+00 0.65904355D+01 0.23267747D-01
+ -.20000000D+00 -.10000000D+00 0.66300619D+01 0.20676565D-01
+ -.10000000D+00 0.18041124D-15 0.66384071D+01 0.20279406D-01
+ 0.70776718D-15 0.10000000D+00 0.66523648D+01 0.23230990D-01
+ 0.10000000D+00 0.20000000D+00 0.66239548D+01 0.20330554D-01
+ 0.20000000D+00 0.30000000D+00 0.65548154D+01 0.21218115D-01
+ 0.30000000D+00 0.40000000D+00 0.65094924D+01 0.22493627D-01
+ 0.40000000D+00 0.50000000D+00 0.64111388D+01 0.22826703D-01
+ 0.50000000D+00 0.60000000D+00 0.63480785D+01 0.22247146D-01
+ 0.60000000D+00 0.70000000D+00 0.62529116D+01 0.19459919D-01
+ 0.70000000D+00 0.80000000D+00 0.61231641D+01 0.20468277D-01
+ 0.80000000D+00 0.90000000D+00 0.60192927D+01 0.20383131D-01
+ 0.90000000D+00 0.10000000D+01 0.58350739D+01 0.21477154D-01
+ 0.10000000D+01 0.11000000D+01 0.56879703D+01 0.21598972D-01
+ 0.11000000D+01 0.12000000D+01 0.55062379D+01 0.18971310D-01
+ 0.12000000D+01 0.13000000D+01 0.52678706D+01 0.22051818D-01
+ 0.13000000D+01 0.14000000D+01 0.50584559D+01 0.17560470D-01
+ 0.14000000D+01 0.15000000D+01 0.48041672D+01 0.16893906D-01
+ 0.15000000D+01 0.16000000D+01 0.45438452D+01 0.16811602D-01
+ 0.16000000D+01 0.17000000D+01 0.43082562D+01 0.16575148D-01
+ 0.17000000D+01 0.18000000D+01 0.40826429D+01 0.16433320D-01
+ 0.18000000D+01 0.19000000D+01 0.37890693D+01 0.16332208D-01
+ 0.19000000D+01 0.20000000D+01 0.35391291D+01 0.15732326D-01
+ 0.20000000D+01 0.21000000D+01 0.32789574D+01 0.13746882D-01
+ 0.21000000D+01 0.22000000D+01 0.29639171D+01 0.13013512D-01
+ 0.22000000D+01 0.23000000D+01 0.27364454D+01 0.14782816D-01
+ 0.23000000D+01 0.24000000D+01 0.24685633D+01 0.11926982D-01
+ 0.24000000D+01 0.25000000D+01 0.22226302D+01 0.14318668D-01
+ 0.25000000D+01 0.26000000D+01 0.19812291D+01 0.97641976D-02
+ 0.26000000D+01 0.27000000D+01 0.17340757D+01 0.92528701D-02
+ 0.27000000D+01 0.28000000D+01 0.15303907D+01 0.24407545D-01
+ 0.28000000D+01 0.29000000D+01 0.13087492D+01 0.12770239D-01
+ 0.29000000D+01 0.30000000D+01 0.11185843D+01 0.68971098D-02
+ 0.30000000D+01 0.31000000D+01 0.91985832D+00 0.77800657D-02
+ 0.31000000D+01 0.32000000D+01 0.76451721D+00 0.57370783D-02
+ 0.32000000D+01 0.33000000D+01 0.61662926D+00 0.47398084D-02
+ 0.33000000D+01 0.34000000D+01 0.48234554D+00 0.40750679D-02
+ 0.34000000D+01 0.35000000D+01 0.36655637D+00 0.34123030D-02
+ 0.35000000D+01 0.36000000D+01 0.26901217D+00 0.24060404D-02
+ 0.36000000D+01 0.37000000D+01 0.19023342D+00 0.17702578D-02
+ 0.37000000D+01 0.38000000D+01 0.12494130D+00 0.12574411D-02
+ 0.38000000D+01 0.39000000D+01 0.78242818D-01 0.89251229D-03
+ 0.39000000D+01 0.40000000D+01 0.44445811D-01 0.12962976D-02
+ 0.40000000D+01 0.41000000D+01 0.21258989D-01 0.22676191D-03
+ 0.41000000D+01 0.42000000D+01 0.91909667D-02 0.10651112D-03
+ 0.42000000D+01 0.43000000D+01 0.32074606D-02 0.40367111D-04
+ 0.43000000D+01 0.44000000D+01 0.77739694D-03 0.15619357D-04
+ 0.44000000D+01 0.45000000D+01 0.79037554D-04 0.40336972D-05
+ 0.45000000D+01 0.46000000D+01 0.16345559D-06 0.20235999D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-2 index   2
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16808704D-06 0.20083735D-06
+ -.45000000D+01 -.44000000D+01 0.80971523D-04 0.40249279D-05
+ -.44000000D+01 -.43000000D+01 0.78515731D-03 0.15500146D-04
+ -.43000000D+01 -.42000000D+01 0.33092704D-02 0.43985854D-04
+ -.42000000D+01 -.41000000D+01 0.97600197D-02 0.11839639D-03
+ -.41000000D+01 -.40000000D+01 0.22447606D-01 0.23187197D-03
+ -.40000000D+01 -.39000000D+01 0.45990235D-01 0.48581551D-03
+ -.39000000D+01 -.38000000D+01 0.81091273D-01 0.10728209D-02
+ -.38000000D+01 -.37000000D+01 0.13160415D+00 0.13013349D-02
+ -.37000000D+01 -.36000000D+01 0.19900800D+00 0.18031124D-02
+ -.36000000D+01 -.35000000D+01 0.28461172D+00 0.23173912D-02
+ -.35000000D+01 -.34000000D+01 0.38570460D+00 0.33228067D-02
+ -.34000000D+01 -.33000000D+01 0.51965585D+00 0.39838516D-02
+ -.33000000D+01 -.32000000D+01 0.65767165D+00 0.46665433D-02
+ -.32000000D+01 -.31000000D+01 0.81934854D+00 0.64821561D-02
+ -.31000000D+01 -.30000000D+01 0.10054986D+01 0.67261323D-02
+ -.30000000D+01 -.29000000D+01 0.12047892D+01 0.73193334D-02
+ -.29000000D+01 -.28000000D+01 0.14396631D+01 0.80399236D-02
+ -.28000000D+01 -.27000000D+01 0.16513679D+01 0.10008736D-01
+ -.27000000D+01 -.26000000D+01 0.19064907D+01 0.97999349D-02
+ -.26000000D+01 -.25000000D+01 0.21539977D+01 0.11743154D-01
+ -.25000000D+01 -.24000000D+01 0.24385636D+01 0.11898469D-01
+ -.24000000D+01 -.23000000D+01 0.26926187D+01 0.11118157D-01
+ -.23000000D+01 -.22000000D+01 0.29724749D+01 0.13732366D-01
+ -.22000000D+01 -.21000000D+01 0.32762988D+01 0.16915185D-01
+ -.21000000D+01 -.20000000D+01 0.36045414D+01 0.13492349D-01
+ -.20000000D+01 -.19000000D+01 0.38871744D+01 0.16007415D-01
+ -.19000000D+01 -.18000000D+01 0.42014876D+01 0.14312221D-01
+ -.18000000D+01 -.17000000D+01 0.44555605D+01 0.16089196D-01
+ -.17000000D+01 -.16000000D+01 0.47352667D+01 0.16834116D-01
+ -.16000000D+01 -.15000000D+01 0.50027410D+01 0.17470669D-01
+ -.15000000D+01 -.14000000D+01 0.53041628D+01 0.19114520D-01
+ -.14000000D+01 -.13000000D+01 0.55368385D+01 0.17284303D-01
+ -.13000000D+01 -.12000000D+01 0.57919095D+01 0.17806658D-01
+ -.12000000D+01 -.11000000D+01 0.60332818D+01 0.17593196D-01
+ -.11000000D+01 -.10000000D+01 0.62182595D+01 0.19656824D-01
+ -.10000000D+01 -.90000000D+00 0.64489478D+01 0.21817140D-01
+ -.90000000D+00 -.80000000D+00 0.66369080D+01 0.20963160D-01
+ -.80000000D+00 -.70000000D+00 0.67064883D+01 0.21045246D-01
+ -.70000000D+00 -.60000000D+00 0.68436765D+01 0.77933032D-01
+ -.60000000D+00 -.50000000D+00 0.70184046D+01 0.21229502D-01
+ -.50000000D+00 -.40000000D+00 0.71325170D+01 0.22592694D-01
+ -.40000000D+00 -.30000000D+00 0.71657135D+01 0.21096381D-01
+ -.30000000D+00 -.20000000D+00 0.72714358D+01 0.23451755D-01
+ -.20000000D+00 -.10000000D+00 0.73148680D+01 0.20715506D-01
+ -.10000000D+00 0.18041124D-15 0.73248346D+01 0.20307835D-01
+ 0.70776718D-15 0.10000000D+00 0.73386377D+01 0.23260863D-01
+ 0.10000000D+00 0.20000000D+00 0.73083281D+01 0.20359832D-01
+ 0.20000000D+00 0.30000000D+00 0.72345583D+01 0.21252836D-01
+ 0.30000000D+00 0.40000000D+00 0.71829291D+01 0.22555644D-01
+ 0.40000000D+00 0.50000000D+00 0.70759521D+01 0.22876350D-01
+ 0.50000000D+00 0.60000000D+00 0.70025193D+01 0.22292186D-01
+ 0.60000000D+00 0.70000000D+00 0.68945298D+01 0.19492123D-01
+ 0.70000000D+00 0.80000000D+00 0.67511402D+01 0.20493807D-01
+ 0.80000000D+00 0.90000000D+00 0.66296604D+01 0.20410393D-01
+ 0.90000000D+00 0.10000000D+01 0.64270716D+01 0.21505168D-01
+ 0.10000000D+01 0.11000000D+01 0.62606652D+01 0.21621803D-01
+ 0.11000000D+01 0.12000000D+01 0.60568526D+01 0.18997931D-01
+ 0.12000000D+01 0.13000000D+01 0.57953972D+01 0.22069717D-01
+ 0.13000000D+01 0.14000000D+01 0.55618534D+01 0.17589407D-01
+ 0.14000000D+01 0.15000000D+01 0.52823258D+01 0.16921190D-01
+ 0.15000000D+01 0.16000000D+01 0.49955506D+01 0.16832732D-01
+ 0.16000000D+01 0.17000000D+01 0.47323585D+01 0.16604272D-01
+ 0.17000000D+01 0.18000000D+01 0.44788940D+01 0.16454718D-01
+ 0.18000000D+01 0.19000000D+01 0.41572059D+01 0.16347251D-01
+ 0.19000000D+01 0.20000000D+01 0.38780810D+01 0.15789893D-01
+ 0.20000000D+01 0.21000000D+01 0.35902546D+01 0.13808922D-01
+ 0.21000000D+01 0.22000000D+01 0.32472610D+01 0.13027222D-01
+ 0.22000000D+01 0.23000000D+01 0.29917965D+01 0.14798100D-01
+ 0.23000000D+01 0.24000000D+01 0.26972619D+01 0.11942576D-01
+ 0.24000000D+01 0.25000000D+01 0.24255958D+01 0.14331605D-01
+ 0.25000000D+01 0.26000000D+01 0.21589100D+01 0.97892522D-02
+ 0.26000000D+01 0.27000000D+01 0.18888122D+01 0.92759527D-02
+ 0.27000000D+01 0.28000000D+01 0.16629370D+01 0.24413348D-01
+ 0.28000000D+01 0.29000000D+01 0.14205080D+01 0.12781702D-01
+ 0.29000000D+01 0.30000000D+01 0.12117280D+01 0.69356886D-02
+ 0.30000000D+01 0.31000000D+01 0.99559842D+00 0.78019589D-02
+ 0.31000000D+01 0.32000000D+01 0.82488859D+00 0.57429680D-02
+ 0.32000000D+01 0.33000000D+01 0.66366289D+00 0.47453315D-02
+ 0.33000000D+01 0.34000000D+01 0.51776045D+00 0.40787173D-02
+ 0.34000000D+01 0.35000000D+01 0.39227501D+00 0.34156347D-02
+ 0.35000000D+01 0.36000000D+01 0.28699592D+00 0.24086674D-02
+ 0.36000000D+01 0.37000000D+01 0.20206162D+00 0.17724739D-02
+ 0.37000000D+01 0.38000000D+01 0.13223985D+00 0.12585339D-02
+ 0.38000000D+01 0.39000000D+01 0.82405109D-01 0.89322128D-03
+ 0.39000000D+01 0.40000000D+01 0.46566982D-01 0.12965136D-02
+ 0.40000000D+01 0.41000000D+01 0.22209727D-01 0.22692725D-03
+ 0.41000000D+01 0.42000000D+01 0.95441230D-02 0.10664403D-03
+ 0.42000000D+01 0.43000000D+01 0.33095583D-02 0.40581392D-04
+ 0.43000000D+01 0.44000000D+01 0.79544615D-03 0.15622727D-04
+ 0.44000000D+01 0.45000000D+01 0.80124777D-04 0.40338168D-05
+ 0.45000000D+01 0.46000000D+01 0.16368648D-06 0.20236003D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-3 index   3
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16821426D-06 0.20083736D-06
+ -.45000000D+01 -.44000000D+01 0.81592985D-04 0.40249969D-05
+ -.44000000D+01 -.43000000D+01 0.79590312D-03 0.15501941D-04
+ -.43000000D+01 -.42000000D+01 0.33718647D-02 0.43996579D-04
+ -.42000000D+01 -.41000000D+01 0.99854114D-02 0.11844379D-03
+ -.41000000D+01 -.40000000D+01 0.23071328D-01 0.23206043D-03
+ -.40000000D+01 -.39000000D+01 0.47409606D-01 0.48606983D-03
+ -.39000000D+01 -.38000000D+01 0.83918187D-01 0.10731807D-02
+ -.38000000D+01 -.37000000D+01 0.13666764D+00 0.13016431D-02
+ -.37000000D+01 -.36000000D+01 0.20733923D+00 0.18040019D-02
+ -.36000000D+01 -.35000000D+01 0.29743253D+00 0.23188803D-02
+ -.35000000D+01 -.34000000D+01 0.40436066D+00 0.33249008D-02
+ -.34000000D+01 -.33000000D+01 0.54562241D+00 0.39882761D-02
+ -.33000000D+01 -.32000000D+01 0.69263616D+00 0.46715124D-02
+ -.32000000D+01 -.31000000D+01 0.86470822D+00 0.64850426D-02
+ -.31000000D+01 -.30000000D+01 0.10628045D+01 0.67301484D-02
+ -.30000000D+01 -.29000000D+01 0.12759535D+01 0.73311090D-02
+ -.29000000D+01 -.28000000D+01 0.15259401D+01 0.80524817D-02
+ -.28000000D+01 -.27000000D+01 0.17542769D+01 0.10015016D-01
+ -.27000000D+01 -.26000000D+01 0.20270670D+01 0.98102095D-02
+ -.26000000D+01 -.25000000D+01 0.22941323D+01 0.11752018D-01
+ -.25000000D+01 -.24000000D+01 0.25989996D+01 0.11917480D-01
+ -.24000000D+01 -.23000000D+01 0.28742946D+01 0.11137687D-01
+ -.23000000D+01 -.22000000D+01 0.31763643D+01 0.13748517D-01
+ -.22000000D+01 -.21000000D+01 0.35028045D+01 0.16922540D-01
+ -.21000000D+01 -.20000000D+01 0.38545014D+01 0.13505281D-01
+ -.20000000D+01 -.19000000D+01 0.41612010D+01 0.16025982D-01
+ -.19000000D+01 -.18000000D+01 0.44991171D+01 0.14331236D-01
+ -.18000000D+01 -.17000000D+01 0.47774324D+01 0.16102117D-01
+ -.17000000D+01 -.16000000D+01 0.50802984D+01 0.16855644D-01
+ -.16000000D+01 -.15000000D+01 0.53704556D+01 0.17499713D-01
+ -.15000000D+01 -.14000000D+01 0.56948011D+01 0.19145119D-01
+ -.14000000D+01 -.13000000D+01 0.59492307D+01 0.17308613D-01
+ -.13000000D+01 -.12000000D+01 0.62248971D+01 0.17834025D-01
+ -.12000000D+01 -.11000000D+01 0.64859768D+01 0.17621126D-01
+ -.11000000D+01 -.10000000D+01 0.66896037D+01 0.19680254D-01
+ -.10000000D+01 -.90000000D+00 0.69372597D+01 0.21838045D-01
+ -.90000000D+00 -.80000000D+00 0.71414753D+01 0.20985444D-01
+ -.80000000D+00 -.70000000D+00 0.72243756D+01 0.21082004D-01
+ -.70000000D+00 -.60000000D+00 0.73756721D+01 0.77953764D-01
+ -.60000000D+00 -.50000000D+00 0.75597565D+01 0.21259982D-01
+ -.50000000D+00 -.40000000D+00 0.76835765D+01 0.22623926D-01
+ -.40000000D+00 -.30000000D+00 0.77230812D+01 0.21282250D-01
+ -.30000000D+00 -.20000000D+00 0.78364134D+01 0.23609197D-01
+ -.20000000D+00 -.10000000D+00 0.78832139D+01 0.20752614D-01
+ -.10000000D+00 0.18041124D-15 0.78943430D+01 0.20339317D-01
+ 0.70776718D-15 0.10000000D+00 0.79082651D+01 0.23284774D-01
+ 0.10000000D+00 0.20000000D+00 0.78761870D+01 0.20382367D-01
+ 0.20000000D+00 0.30000000D+00 0.77983868D+01 0.21282505D-01
+ 0.30000000D+00 0.40000000D+00 0.77414002D+01 0.22613323D-01
+ 0.40000000D+00 0.50000000D+00 0.76268234D+01 0.22924884D-01
+ 0.50000000D+00 0.60000000D+00 0.75445585D+01 0.22338625D-01
+ 0.60000000D+00 0.70000000D+00 0.74253941D+01 0.19521110D-01
+ 0.70000000D+00 0.80000000D+00 0.72703123D+01 0.20512782D-01
+ 0.80000000D+00 0.90000000D+00 0.71335256D+01 0.20432155D-01
+ 0.90000000D+00 0.10000000D+01 0.69152657D+01 0.21528702D-01
+ 0.10000000D+01 0.11000000D+01 0.67322665D+01 0.21639956D-01
+ 0.11000000D+01 0.12000000D+01 0.65094653D+01 0.19021304D-01
+ 0.12000000D+01 0.13000000D+01 0.62282662D+01 0.22086776D-01
+ 0.13000000D+01 0.14000000D+01 0.59741765D+01 0.17611451D-01
+ 0.14000000D+01 0.15000000D+01 0.56731364D+01 0.16941390D-01
+ 0.15000000D+01 0.16000000D+01 0.53640143D+01 0.16849978D-01
+ 0.16000000D+01 0.17000000D+01 0.50773994D+01 0.16626951D-01
+ 0.17000000D+01 0.18000000D+01 0.48002852D+01 0.16470915D-01
+ 0.18000000D+01 0.19000000D+01 0.44549798D+01 0.16358311D-01
+ 0.19000000D+01 0.20000000D+01 0.41513500D+01 0.15843116D-01
+ 0.20000000D+01 0.21000000D+01 0.38405187D+01 0.13867051D-01
+ 0.21000000D+01 0.22000000D+01 0.34742388D+01 0.13037578D-01
+ 0.22000000D+01 0.23000000D+01 0.31954893D+01 0.14810109D-01
+ 0.23000000D+01 0.24000000D+01 0.28788711D+01 0.11954512D-01
+ 0.24000000D+01 0.25000000D+01 0.25860856D+01 0.14340824D-01
+ 0.25000000D+01 0.26000000D+01 0.22985873D+01 0.98101723D-02
+ 0.26000000D+01 0.27000000D+01 0.20097411D+01 0.92964136D-02
+ 0.27000000D+01 0.28000000D+01 0.17658774D+01 0.24417352D-01
+ 0.28000000D+01 0.29000000D+01 0.15065552D+01 0.12795023D-01
+ 0.29000000D+01 0.30000000D+01 0.12830865D+01 0.69739106D-02
+ 0.30000000D+01 0.31000000D+01 0.10530778D+01 0.78174716D-02
+ 0.31000000D+01 0.32000000D+01 0.87023155D+00 0.57469250D-02
+ 0.32000000D+01 0.33000000D+01 0.69863000D+00 0.47491183D-02
+ 0.33000000D+01 0.34000000D+01 0.54375983D+00 0.40811330D-02
+ 0.34000000D+01 0.35000000D+01 0.41093261D+00 0.34177937D-02
+ 0.35000000D+01 0.36000000D+01 0.29985822D+00 0.24104095D-02
+ 0.36000000D+01 0.37000000D+01 0.21038459D+00 0.17740108D-02
+ 0.37000000D+01 0.38000000D+01 0.13729305D+00 0.12592056D-02
+ 0.38000000D+01 0.39000000D+01 0.85234680D-01 0.89364794D-03
+ 0.39000000D+01 0.40000000D+01 0.47980751D-01 0.12966437D-02
+ 0.40000000D+01 0.41000000D+01 0.22830165D-01 0.22703488D-03
+ 0.41000000D+01 0.42000000D+01 0.97690625D-02 0.10673984D-03
+ 0.42000000D+01 0.43000000D+01 0.33728980D-02 0.40758708D-04
+ 0.43000000D+01 0.44000000D+01 0.80622188D-03 0.15624628D-04
+ 0.44000000D+01 0.45000000D+01 0.80746413D-04 0.40338827D-05
+ 0.45000000D+01 0.46000000D+01 0.16380746D-06 0.20236005D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-pth-4 index   4
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16827378D-06 0.20083737D-06
+ -.45000000D+01 -.44000000D+01 0.81897954D-04 0.40250303D-05
+ -.44000000D+01 -.43000000D+01 0.80132763D-03 0.15502820D-04
+ -.43000000D+01 -.42000000D+01 0.34043009D-02 0.44001910D-04
+ -.42000000D+01 -.41000000D+01 0.10104801D-01 0.11846881D-03
+ -.41000000D+01 -.40000000D+01 0.23408631D-01 0.23216553D-03
+ -.40000000D+01 -.39000000D+01 0.48190684D-01 0.48620597D-03
+ -.39000000D+01 -.38000000D+01 0.85501662D-01 0.10733710D-02
+ -.38000000D+01 -.37000000D+01 0.13955117D+00 0.13017727D-02
+ -.37000000D+01 -.36000000D+01 0.21216095D+00 0.18044996D-02
+ -.36000000D+01 -.35000000D+01 0.30496114D+00 0.23197293D-02
+ -.35000000D+01 -.34000000D+01 0.41546182D+00 0.33260828D-02
+ -.34000000D+01 -.33000000D+01 0.56128061D+00 0.39914407D-02
+ -.33000000D+01 -.32000000D+01 0.71398562D+00 0.46749171D-02
+ -.32000000D+01 -.31000000D+01 0.89272981D+00 0.64867095D-02
+ -.31000000D+01 -.30000000D+01 0.10985544D+01 0.67324657D-02
+ -.30000000D+01 -.29000000D+01 0.13207415D+01 0.73394016D-02
+ -.29000000D+01 -.28000000D+01 0.15807652D+01 0.80608057D-02
+ -.28000000D+01 -.27000000D+01 0.18202052D+01 0.10019078D-01
+ -.27000000D+01 -.26000000D+01 0.21048416D+01 0.98174579D-02
+ -.26000000D+01 -.25000000D+01 0.23851755D+01 0.11757473D-01
+ -.25000000D+01 -.24000000D+01 0.27038411D+01 0.11930726D-01
+ -.24000000D+01 -.23000000D+01 0.29937169D+01 0.11151615D-01
+ -.23000000D+01 -.22000000D+01 0.33110370D+01 0.13759059D-01
+ -.22000000D+01 -.21000000D+01 0.36531924D+01 0.16927530D-01
+ -.21000000D+01 -.20000000D+01 0.40211150D+01 0.13514450D-01
+ -.20000000D+01 -.19000000D+01 0.43446133D+01 0.16037810D-01
+ -.19000000D+01 -.18000000D+01 0.46990277D+01 0.14343817D-01
+ -.18000000D+01 -.17000000D+01 0.49944303D+01 0.16110598D-01
+ -.17000000D+01 -.16000000D+01 0.53136715D+01 0.16869980D-01
+ -.16000000D+01 -.15000000D+01 0.56198468D+01 0.17518254D-01
+ -.15000000D+01 -.14000000D+01 0.59604845D+01 0.19165465D-01
+ -.14000000D+01 -.13000000D+01 0.62303407D+01 0.17331390D-01
+ -.13000000D+01 -.12000000D+01 0.65208778D+01 0.17856476D-01
+ -.12000000D+01 -.11000000D+01 0.67960678D+01 0.17638963D-01
+ -.11000000D+01 -.10000000D+01 0.70129889D+01 0.19695791D-01
+ -.10000000D+01 -.90000000D+00 0.72728194D+01 0.21853254D-01
+ -.90000000D+00 -.80000000D+00 0.74888961D+01 0.20999881D-01
+ -.80000000D+00 -.70000000D+00 0.75813215D+01 0.21105506D-01
+ -.70000000D+00 -.60000000D+00 0.77429515D+01 0.77968549D-01
+ -.60000000D+00 -.50000000D+00 0.79336399D+01 0.21287310D-01
+ -.50000000D+00 -.40000000D+00 0.80645370D+01 0.22646816D-01
+ -.40000000D+00 -.30000000D+00 0.81087646D+01 0.21400986D-01
+ -.30000000D+00 -.20000000D+00 0.82274935D+01 0.23709209D-01
+ -.20000000D+00 -.10000000D+00 0.82768778D+01 0.20785175D-01
+ -.10000000D+00 0.18041124D-15 0.82885624D+01 0.20371495D-01
+ 0.70776718D-15 0.10000000D+00 0.83028475D+01 0.23302191D-01
+ 0.10000000D+00 0.20000000D+00 0.82693343D+01 0.20397625D-01
+ 0.20000000D+00 0.30000000D+00 0.81885969D+01 0.21305523D-01
+ 0.30000000D+00 0.40000000D+00 0.81278714D+01 0.22657546D-01
+ 0.40000000D+00 0.50000000D+00 0.80076322D+01 0.22964749D-01
+ 0.50000000D+00 0.60000000D+00 0.79189821D+01 0.22379277D-01
+ 0.60000000D+00 0.70000000D+00 0.77917631D+01 0.19543787D-01
+ 0.70000000D+00 0.80000000D+00 0.76282218D+01 0.20526397D-01
+ 0.80000000D+00 0.90000000D+00 0.74803082D+01 0.20447373D-01
+ 0.90000000D+00 0.10000000D+01 0.72508399D+01 0.21545599D-01
+ 0.10000000D+01 0.11000000D+01 0.70559045D+01 0.21652277D-01
+ 0.11000000D+01 0.12000000D+01 0.68194118D+01 0.19041756D-01
+ 0.12000000D+01 0.13000000D+01 0.65240100D+01 0.22102763D-01
+ 0.13000000D+01 0.14000000D+01 0.62553418D+01 0.17625541D-01
+ 0.14000000D+01 0.15000000D+01 0.59389175D+01 0.16954094D-01
+ 0.15000000D+01 0.16000000D+01 0.56139871D+01 0.16862071D-01
+ 0.16000000D+01 0.17000000D+01 0.53107627D+01 0.16642249D-01
+ 0.17000000D+01 0.18000000D+01 0.50168837D+01 0.16481611D-01
+ 0.18000000D+01 0.19000000D+01 0.46550193D+01 0.16365777D-01
+ 0.19000000D+01 0.20000000D+01 0.43342272D+01 0.15879658D-01
+ 0.20000000D+01 0.21000000D+01 0.40074000D+01 0.13906838D-01
+ 0.21000000D+01 0.22000000D+01 0.36249396D+01 0.13044563D-01
+ 0.22000000D+01 0.23000000D+01 0.33300476D+01 0.14818129D-01
+ 0.23000000D+01 0.24000000D+01 0.29982265D+01 0.11962527D-01
+ 0.24000000D+01 0.25000000D+01 0.26910257D+01 0.14346455D-01
+ 0.25000000D+01 0.26000000D+01 0.23893060D+01 0.98238491D-02
+ 0.26000000D+01 0.27000000D+01 0.20877574D+01 0.93102313D-02
+ 0.27000000D+01 0.28000000D+01 0.18318044D+01 0.24419819D-01
+ 0.28000000D+01 0.29000000D+01 0.15611411D+01 0.12807759D-01
+ 0.29000000D+01 0.30000000D+01 0.13281001D+01 0.70054690D-02
+ 0.30000000D+01 0.31000000D+01 0.10889577D+01 0.78263552D-02
+ 0.31000000D+01 0.32000000D+01 0.89822784D+00 0.57492488D-02
+ 0.32000000D+01 0.33000000D+01 0.71998688D+00 0.47513759D-02
+ 0.33000000D+01 0.34000000D+01 0.55943534D+00 0.40825153D-02
+ 0.34000000D+01 0.35000000D+01 0.42204588D+00 0.34189896D-02
+ 0.35000000D+01 0.36000000D+01 0.30741205D+00 0.24114321D-02
+ 0.36000000D+01 0.37000000D+01 0.21519609D+00 0.17749639D-02
+ 0.37000000D+01 0.38000000D+01 0.14017031D+00 0.12595594D-02
+ 0.38000000D+01 0.39000000D+01 0.86819027D-01 0.89386662D-03
+ 0.39000000D+01 0.40000000D+01 0.48758785D-01 0.12967102D-02
+ 0.40000000D+01 0.41000000D+01 0.23165478D-01 0.22709519D-03
+ 0.41000000D+01 0.42000000D+01 0.98882367D-02 0.10679485D-03
+ 0.42000000D+01 0.43000000D+01 0.34057601D-02 0.40867222D-04
+ 0.43000000D+01 0.44000000D+01 0.81166127D-03 0.15625554D-04
+ 0.44000000D+01 0.45000000D+01 0.81051406D-04 0.40339144D-05
+ 0.45000000D+01 0.46000000D+01 0.16386392D-06 0.20236006D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-1 index   5
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16748926D-06 0.20083732D-06
+ -.45000000D+01 -.44000000D+01 0.77575637D-04 0.40248548D-05
+ -.44000000D+01 -.43000000D+01 0.72600540D-03 0.15499542D-04
+ -.43000000D+01 -.42000000D+01 0.29696707D-02 0.43983757D-04
+ -.42000000D+01 -.41000000D+01 0.85574372D-02 0.11838215D-03
+ -.41000000D+01 -.40000000D+01 0.19192933D-01 0.23186202D-03
+ -.40000000D+01 -.39000000D+01 0.38703980D-01 0.48588902D-03
+ -.39000000D+01 -.38000000D+01 0.66846735D-01 0.10729923D-02
+ -.38000000D+01 -.37000000D+01 0.10654080D+00 0.13031921D-02
+ -.37000000D+01 -.36000000D+01 0.15844708D+00 0.18042514D-02
+ -.36000000D+01 -.35000000D+01 0.22316080D+00 0.23194959D-02
+ -.35000000D+01 -.34000000D+01 0.29760998D+00 0.33232222D-02
+ -.34000000D+01 -.33000000D+01 0.39875664D+00 0.39855248D-02
+ -.33000000D+01 -.32000000D+01 0.49718997D+00 0.46660224D-02
+ -.32000000D+01 -.31000000D+01 0.61335412D+00 0.64867007D-02
+ -.31000000D+01 -.30000000D+01 0.74798933D+00 0.67299587D-02
+ -.30000000D+01 -.29000000D+01 0.88889703D+00 0.73164316D-02
+ -.29000000D+01 -.28000000D+01 0.10601162D+01 0.80334444D-02
+ -.28000000D+01 -.27000000D+01 0.12025208D+01 0.10012006D-01
+ -.27000000D+01 -.26000000D+01 0.13840131D+01 0.98004599D-02
+ -.26000000D+01 -.25000000D+01 0.15521970D+01 0.11745517D-01
+ -.25000000D+01 -.24000000D+01 0.17542627D+01 0.11886186D-01
+ -.24000000D+01 -.23000000D+01 0.19223275D+01 0.11107081D-01
+ -.23000000D+01 -.22000000D+01 0.21129402D+01 0.13724456D-01
+ -.22000000D+01 -.21000000D+01 0.23259521D+01 0.16919157D-01
+ -.21000000D+01 -.20000000D+01 0.25612698D+01 0.13493191D-01
+ -.20000000D+01 -.19000000D+01 0.27493647D+01 0.15995143D-01
+ -.19000000D+01 -.18000000D+01 0.29697467D+01 0.14302480D-01
+ -.18000000D+01 -.17000000D+01 0.31301855D+01 0.16085950D-01
+ -.17000000D+01 -.16000000D+01 0.33191982D+01 0.16835870D-01
+ -.16000000D+01 -.15000000D+01 0.34976675D+01 0.17445157D-01
+ -.15000000D+01 -.14000000D+01 0.37109204D+01 0.19083032D-01
+ -.14000000D+01 -.13000000D+01 0.38602157D+01 0.17284759D-01
+ -.13000000D+01 -.12000000D+01 0.40358177D+01 0.17793920D-01
+ -.12000000D+01 -.11000000D+01 0.42017274D+01 0.17577498D-01
+ -.11000000D+01 -.10000000D+01 0.43153480D+01 0.19647537D-01
+ -.10000000D+01 -.90000000D+00 0.44815347D+01 0.21815884D-01
+ -.90000000D+00 -.80000000D+00 0.46080588D+01 0.20944503D-01
+ -.80000000D+00 -.70000000D+00 0.46257404D+01 0.21007305D-01
+ -.70000000D+00 -.60000000D+00 0.47124518D+01 0.77964970D-01
+ -.60000000D+00 -.50000000D+00 0.48484800D+01 0.21243632D-01
+ -.50000000D+00 -.40000000D+00 0.49269407D+01 0.22574660D-01
+ -.40000000D+00 -.30000000D+00 0.49342745D+01 0.20816456D-01
+ -.30000000D+00 -.20000000D+00 0.50144167D+01 0.23207551D-01
+ -.20000000D+00 -.10000000D+00 0.50451464D+01 0.20688035D-01
+ -.10000000D+00 0.18041124D-15 0.50489516D+01 0.20304399D-01
+ 0.70776718D-15 0.10000000D+00 0.50628204D+01 0.23240726D-01
+ 0.10000000D+00 0.20000000D+00 0.50393666D+01 0.20346246D-01
+ 0.20000000D+00 0.30000000D+00 0.49800664D+01 0.21237462D-01
+ 0.30000000D+00 0.40000000D+00 0.49494175D+01 0.22491382D-01
+ 0.40000000D+00 0.50000000D+00 0.48694481D+01 0.22842449D-01
+ 0.50000000D+00 0.60000000D+00 0.48313762D+01 0.22246669D-01
+ 0.60000000D+00 0.70000000D+00 0.47652129D+01 0.19487635D-01
+ 0.70000000D+00 0.80000000D+00 0.46679351D+01 0.20492746D-01
+ 0.80000000D+00 0.90000000D+00 0.46021388D+01 0.20393352D-01
+ 0.90000000D+00 0.10000000D+01 0.44596785D+01 0.21494049D-01
+ 0.10000000D+01 0.11000000D+01 0.43580441D+01 0.21617114D-01
+ 0.11000000D+01 0.12000000D+01 0.42254493D+01 0.18992343D-01
+ 0.12000000D+01 0.13000000D+01 0.40394553D+01 0.22081442D-01
+ 0.13000000D+01 0.14000000D+01 0.38853944D+01 0.17575039D-01
+ 0.14000000D+01 0.15000000D+01 0.36892084D+01 0.16904911D-01
+ 0.15000000D+01 0.16000000D+01 0.34890209D+01 0.16834085D-01
+ 0.16000000D+01 0.17000000D+01 0.33161333D+01 0.16590601D-01
+ 0.17000000D+01 0.18000000D+01 0.31541877D+01 0.16459592D-01
+ 0.18000000D+01 0.19000000D+01 0.29252133D+01 0.16345513D-01
+ 0.19000000D+01 0.20000000D+01 0.27414940D+01 0.15726142D-01
+ 0.20000000D+01 0.21000000D+01 0.25463234D+01 0.13741505D-01
+ 0.21000000D+01 0.22000000D+01 0.22960322D+01 0.13031536D-01
+ 0.22000000D+01 0.23000000D+01 0.21322870D+01 0.14794086D-01
+ 0.23000000D+01 0.24000000D+01 0.19269526D+01 0.11945298D-01
+ 0.24000000D+01 0.25000000D+01 0.17409301D+01 0.14329510D-01
+ 0.25000000D+01 0.26000000D+01 0.15575266D+01 0.97769935D-02
+ 0.26000000D+01 0.27000000D+01 0.13656000D+01 0.92629953D-02
+ 0.27000000D+01 0.28000000D+01 0.12139352D+01 0.24412471D-01
+ 0.28000000D+01 0.29000000D+01 0.10411221D+01 0.12775603D-01
+ 0.29000000D+01 0.30000000D+01 0.89560082D+00 0.68908570D-02
+ 0.30000000D+01 0.31000000D+01 0.73783763D+00 0.77833238D-02
+ 0.31000000D+01 0.32000000D+01 0.61896221D+00 0.57467393D-02
+ 0.32000000D+01 0.33000000D+01 0.50323890D+00 0.47458817D-02
+ 0.33000000D+01 0.34000000D+01 0.39674928D+00 0.40805726D-02
+ 0.34000000D+01 0.35000000D+01 0.30409928D+00 0.34167000D-02
+ 0.35000000D+01 0.36000000D+01 0.22548851D+00 0.24091827D-02
+ 0.36000000D+01 0.37000000D+01 0.16151549D+00 0.17730232D-02
+ 0.37000000D+01 0.38000000D+01 0.10720424D+00 0.12587871D-02
+ 0.38000000D+01 0.39000000D+01 0.68145978D-01 0.89338908D-03
+ 0.39000000D+01 0.40000000D+01 0.39277804D-01 0.12964246D-02
+ 0.40000000D+01 0.41000000D+01 0.18961192D-01 0.22704265D-03
+ 0.41000000D+01 0.42000000D+01 0.83409675D-02 0.10659220D-03
+ 0.42000000D+01 0.43000000D+01 0.29676383D-02 0.40293170D-04
+ 0.43000000D+01 0.44000000D+01 0.73625873D-03 0.15621786D-04
+ 0.44000000D+01 0.45000000D+01 0.76737738D-04 0.40337699D-05
+ 0.45000000D+01 0.46000000D+01 0.16311371D-06 0.20235999D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-2 index   6
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16812691D-06 0.20083736D-06
+ -.45000000D+01 -.44000000D+01 0.80876667D-04 0.40250090D-05
+ -.44000000D+01 -.43000000D+01 0.78186088D-03 0.15502666D-04
+ -.43000000D+01 -.42000000D+01 0.32842088D-02 0.43999686D-04
+ -.42000000D+01 -.41000000D+01 0.96554688D-02 0.11845817D-03
+ -.41000000D+01 -.40000000D+01 0.22134321D-01 0.23213129D-03
+ -.40000000D+01 -.39000000D+01 0.45226784D-01 0.48619530D-03
+ -.39000000D+01 -.38000000D+01 0.79495336D-01 0.10734108D-02
+ -.38000000D+01 -.37000000D+01 0.12862833D+00 0.13025669D-02
+ -.37000000D+01 -.36000000D+01 0.19394291D+00 0.18046444D-02
+ -.36000000D+01 -.35000000D+01 0.27660712D+00 0.23202580D-02
+ -.35000000D+01 -.34000000D+01 0.37383400D+00 0.33256683D-02
+ -.34000000D+01 -.33000000D+01 0.50281995D+00 0.39888515D-02
+ -.33000000D+01 -.32000000D+01 0.63477006D+00 0.46717694D-02
+ -.32000000D+01 -.31000000D+01 0.78911183D+00 0.64873177D-02
+ -.31000000D+01 -.30000000D+01 0.96688034D+00 0.67325455D-02
+ -.30000000D+01 -.29000000D+01 0.11567815D+01 0.73301814D-02
+ -.29000000D+01 -.28000000D+01 0.13809511D+01 0.80521741D-02
+ -.28000000D+01 -.27000000D+01 0.15809660D+01 0.10016535D-01
+ -.27000000D+01 -.26000000D+01 0.18234528D+01 0.98116912D-02
+ -.26000000D+01 -.25000000D+01 0.20575849D+01 0.11756420D-01
+ -.25000000D+01 -.24000000D+01 0.23280669D+01 0.11914672D-01
+ -.24000000D+01 -.23000000D+01 0.25670474D+01 0.11134055D-01
+ -.23000000D+01 -.22000000D+01 0.28316185D+01 0.13748758D-01
+ -.22000000D+01 -.21000000D+01 0.31192275D+01 0.16925278D-01
+ -.21000000D+01 -.20000000D+01 0.34314883D+01 0.13507534D-01
+ -.20000000D+01 -.19000000D+01 0.36978342D+01 0.16025564D-01
+ -.19000000D+01 -.18000000D+01 0.39954576D+01 0.14331349D-01
+ -.18000000D+01 -.17000000D+01 0.42332343D+01 0.16099927D-01
+ -.17000000D+01 -.16000000D+01 0.44966569D+01 0.16861390D-01
+ -.16000000D+01 -.15000000D+01 0.47480384D+01 0.17497034D-01
+ -.15000000D+01 -.14000000D+01 0.50340663D+01 0.19139838D-01
+ -.14000000D+01 -.13000000D+01 0.52520165D+01 0.17307338D-01
+ -.13000000D+01 -.12000000D+01 0.54925993D+01 0.17829757D-01
+ -.12000000D+01 -.11000000D+01 0.57204255D+01 0.17621767D-01
+ -.11000000D+01 -.10000000D+01 0.58929254D+01 0.19681617D-01
+ -.10000000D+01 -.90000000D+00 0.61118435D+01 0.21839311D-01
+ -.90000000D+00 -.80000000D+00 0.62887971D+01 0.20984915D-01
+ -.80000000D+00 -.70000000D+00 0.63485675D+01 0.21075755D-01
+ -.70000000D+00 -.60000000D+00 0.64774660D+01 0.77966626D-01
+ -.60000000D+00 -.50000000D+00 0.66443488D+01 0.21261655D-01
+ -.50000000D+00 -.40000000D+00 0.67523159D+01 0.22618030D-01
+ -.40000000D+00 -.30000000D+00 0.67797674D+01 0.21213762D-01
+ -.30000000D+00 -.20000000D+00 0.68823935D+01 0.23547931D-01
+ -.20000000D+00 -.10000000D+00 0.69231518D+01 0.20740802D-01
+ -.10000000D+00 0.18041124D-15 0.69317954D+01 0.20329966D-01
+ 0.70776718D-15 0.10000000D+00 0.69452848D+01 0.23280283D-01
+ 0.10000000D+00 0.20000000D+00 0.69165500D+01 0.20381530D-01
+ 0.20000000D+00 0.30000000D+00 0.68451976D+01 0.21279835D-01
+ 0.30000000D+00 0.40000000D+00 0.67974121D+01 0.22590186D-01
+ 0.40000000D+00 0.50000000D+00 0.66952321D+01 0.22911217D-01
+ 0.50000000D+00 0.60000000D+00 0.66285522D+01 0.22312876D-01
+ 0.60000000D+00 0.70000000D+00 0.65281577D+01 0.19520369D-01
+ 0.70000000D+00 0.80000000D+00 0.63935779D+01 0.20517734D-01
+ 0.80000000D+00 0.90000000D+00 0.62815135D+01 0.20427450D-01
+ 0.90000000D+00 0.10000000D+01 0.60897338D+01 0.21523884D-01
+ 0.10000000D+01 0.11000000D+01 0.59355381D+01 0.21640754D-01
+ 0.11000000D+01 0.12000000D+01 0.57442009D+01 0.19019748D-01
+ 0.12000000D+01 0.13000000D+01 0.54961431D+01 0.22083714D-01
+ 0.13000000D+01 0.14000000D+01 0.52769606D+01 0.17611466D-01
+ 0.14000000D+01 0.15000000D+01 0.50125625D+01 0.16939031D-01
+ 0.15000000D+01 0.16000000D+01 0.47410849D+01 0.16852598D-01
+ 0.16000000D+01 0.17000000D+01 0.44937463D+01 0.16625443D-01
+ 0.17000000D+01 0.18000000D+01 0.42563783D+01 0.16476813D-01
+ 0.18000000D+01 0.19000000D+01 0.39511008D+01 0.16360169D-01
+ 0.19000000D+01 0.20000000D+01 0.36883482D+01 0.15822847D-01
+ 0.20000000D+01 0.21000000D+01 0.34171167D+01 0.13844163D-01
+ 0.21000000D+01 0.22000000D+01 0.30904371D+01 0.13039662D-01
+ 0.22000000D+01 0.23000000D+01 0.28506181D+01 0.14810091D-01
+ 0.23000000D+01 0.24000000D+01 0.25717271D+01 0.11957792D-01
+ 0.24000000D+01 0.25000000D+01 0.23147508D+01 0.14342335D-01
+ 0.25000000D+01 0.26000000D+01 0.20618958D+01 0.98143026D-02
+ 0.26000000D+01 0.27000000D+01 0.18059452D+01 0.92929980D-02
+ 0.27000000D+01 0.28000000D+01 0.15926214D+01 0.24418194D-01
+ 0.28000000D+01 0.29000000D+01 0.13618668D+01 0.12788165D-01
+ 0.29000000D+01 0.30000000D+01 0.11637070D+01 0.69537131D-02
+ 0.30000000D+01 0.31000000D+01 0.95704532D+00 0.78171396D-02
+ 0.31000000D+01 0.32000000D+01 0.79467284D+00 0.57493994D-02
+ 0.32000000D+01 0.33000000D+01 0.64071848D+00 0.47502729D-02
+ 0.33000000D+01 0.34000000D+01 0.50094986D+00 0.40824133D-02
+ 0.34000000D+01 0.35000000D+01 0.38032318D+00 0.34189183D-02
+ 0.35000000D+01 0.36000000D+01 0.27903426D+00 0.24112064D-02
+ 0.36000000D+01 0.37000000D+01 0.19701030D+00 0.17746041D-02
+ 0.37000000D+01 0.38000000D+01 0.12926315D+00 0.12595965D-02
+ 0.38000000D+01 0.39000000D+01 0.80805901D-01 0.89391322D-03
+ 0.39000000D+01 0.40000000D+01 0.45794475D-01 0.12967028D-02
+ 0.40000000D+01 0.41000000D+01 0.21895041D-01 0.22711291D-03
+ 0.41000000D+01 0.42000000D+01 0.94386677D-02 0.10674960D-03
+ 0.42000000D+01 0.43000000D+01 0.32847151D-02 0.40692751D-04
+ 0.43000000D+01 0.44000000D+01 0.79217992D-03 0.15625314D-04
+ 0.44000000D+01 0.45000000D+01 0.80032811D-04 0.40339035D-05
+ 0.45000000D+01 0.46000000D+01 0.16372394D-06 0.20236005D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-3 index   7
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16824323D-06 0.20083737D-06
+ -.45000000D+01 -.44000000D+01 0.81601462D-04 0.40250401D-05
+ -.44000000D+01 -.43000000D+01 0.79521734D-03 0.15503275D-04
+ -.43000000D+01 -.42000000D+01 0.33646756D-02 0.44003772D-04
+ -.42000000D+01 -.41000000D+01 0.99509585D-02 0.11847837D-03
+ -.41000000D+01 -.40000000D+01 0.22960300D-01 0.23220981D-03
+ -.40000000D+01 -.39000000D+01 0.47121608D-01 0.48627617D-03
+ -.39000000D+01 -.38000000D+01 0.83288639D-01 0.10735052D-02
+ -.38000000D+01 -.37000000D+01 0.13544561D+00 0.13022537D-02
+ -.37000000D+01 -.36000000D+01 0.20518839D+00 0.18048340D-02
+ -.36000000D+01 -.35000000D+01 0.29392879D+00 0.23204799D-02
+ -.35000000D+01 -.34000000D+01 0.39902947D+00 0.33264928D-02
+ -.34000000D+01 -.33000000D+01 0.53787345D+00 0.39915722D-02
+ -.33000000D+01 -.32000000D+01 0.68190378D+00 0.46748785D-02
+ -.32000000D+01 -.31000000D+01 0.85025445D+00 0.64877217D-02
+ -.31000000D+01 -.30000000D+01 0.10440184D+01 0.67336309D-02
+ -.30000000D+01 -.29000000D+01 0.12522825D+01 0.73381673D-02
+ -.29000000D+01 -.28000000D+01 0.14965745D+01 0.80605011D-02
+ -.28000000D+01 -.27000000D+01 0.17186835D+01 0.10019406D-01
+ -.27000000D+01 -.26000000D+01 0.19846004D+01 0.98172915D-02
+ -.26000000D+01 -.25000000D+01 0.22444278D+01 0.11759778D-01
+ -.25000000D+01 -.24000000D+01 0.25415441D+01 0.11929317D-01
+ -.24000000D+01 -.23000000D+01 0.28084700D+01 0.11149601D-01
+ -.23000000D+01 -.22000000D+01 0.31020739D+01 0.13759114D-01
+ -.22000000D+01 -.21000000D+01 0.34194099D+01 0.16928449D-01
+ -.21000000D+01 -.20000000D+01 0.37621263D+01 0.13514181D-01
+ -.20000000D+01 -.19000000D+01 0.40597459D+01 0.16037950D-01
+ -.19000000D+01 -.18000000D+01 0.43881601D+01 0.14343400D-01
+ -.18000000D+01 -.17000000D+01 0.46572589D+01 0.16108385D-01
+ -.17000000D+01 -.16000000D+01 0.49508529D+01 0.16871672D-01
+ -.16000000D+01 -.15000000D+01 0.52317413D+01 0.17517373D-01
+ -.15000000D+01 -.14000000D+01 0.55473440D+01 0.19161405D-01
+ -.14000000D+01 -.13000000D+01 0.57932330D+01 0.17323774D-01
+ -.13000000D+01 -.12000000D+01 0.60605579D+01 0.17849277D-01
+ -.12000000D+01 -.11000000D+01 0.63138750D+01 0.17639775D-01
+ -.11000000D+01 -.10000000D+01 0.65102850D+01 0.19696891D-01
+ -.10000000D+01 -.90000000D+00 0.67510261D+01 0.21851869D-01
+ -.90000000D+00 -.80000000D+00 0.69489315D+01 0.20999202D-01
+ -.80000000D+00 -.70000000D+00 0.70260429D+01 0.21102133D-01
+ -.70000000D+00 -.60000000D+00 0.71726873D+01 0.77973508D-01
+ -.60000000D+00 -.50000000D+00 0.73520493D+01 0.21281884D-01
+ -.50000000D+00 -.40000000D+00 0.74722838D+01 0.22642295D-01
+ -.40000000D+00 -.30000000D+00 0.75083714D+01 0.21375776D-01
+ -.30000000D+00 -.20000000D+00 0.76201012D+01 0.23685598D-01
+ -.20000000D+00 -.10000000D+00 0.76652467D+01 0.20770141D-01
+ -.10000000D+00 0.18041124D-15 0.76755796D+01 0.20354619D-01
+ 0.70776718D-15 0.10000000D+00 0.76892845D+01 0.23297784D-01
+ 0.10000000D+00 0.20000000D+00 0.76581803D+01 0.20396583D-01
+ 0.20000000D+00 0.30000000D+00 0.75818076D+01 0.21299848D-01
+ 0.30000000D+00 0.40000000D+00 0.75270120D+01 0.22641046D-01
+ 0.40000000D+00 0.50000000D+00 0.74152506D+01 0.22952115D-01
+ 0.50000000D+00 0.60000000D+00 0.73369956D+01 0.22357556D-01
+ 0.60000000D+00 0.70000000D+00 0.72221613D+01 0.19540764D-01
+ 0.70000000D+00 0.80000000D+00 0.70723018D+01 0.20527186D-01
+ 0.80000000D+00 0.90000000D+00 0.69408904D+01 0.20443549D-01
+ 0.90000000D+00 0.10000000D+01 0.67289072D+01 0.21540994D-01
+ 0.10000000D+01 0.11000000D+01 0.65530265D+01 0.21651504D-01
+ 0.11000000D+01 0.12000000D+01 0.63374209D+01 0.19035363D-01
+ 0.12000000D+01 0.13000000D+01 0.60639709D+01 0.22093291D-01
+ 0.13000000D+01 0.14000000D+01 0.58181444D+01 0.17625959D-01
+ 0.14000000D+01 0.15000000D+01 0.55258621D+01 0.16952452D-01
+ 0.15000000D+01 0.16000000D+01 0.52255215D+01 0.16862423D-01
+ 0.16000000D+01 0.17000000D+01 0.49479491D+01 0.16640830D-01
+ 0.17000000D+01 0.18000000D+01 0.46799653D+01 0.16484271D-01
+ 0.18000000D+01 0.19000000D+01 0.43439923D+01 0.16366087D-01
+ 0.19000000D+01 0.20000000D+01 0.40495500D+01 0.15870160D-01
+ 0.20000000D+01 0.21000000D+01 0.37481358D+01 0.13896599D-01
+ 0.21000000D+01 0.22000000D+01 0.33910644D+01 0.13044269D-01
+ 0.22000000D+01 0.23000000D+01 0.31210066D+01 0.14817822D-01
+ 0.23000000D+01 0.24000000D+01 0.28130818D+01 0.11963797D-01
+ 0.24000000D+01 0.25000000D+01 0.25284285D+01 0.14347272D-01
+ 0.25000000D+01 0.26000000D+01 0.22483385D+01 0.98305544D-02
+ 0.26000000D+01 0.27000000D+01 0.19674168D+01 0.93086809D-02
+ 0.27000000D+01 0.28000000D+01 0.17303524D+01 0.24420181D-01
+ 0.28000000D+01 0.29000000D+01 0.14772217D+01 0.12800879D-01
+ 0.29000000D+01 0.30000000D+01 0.12594596D+01 0.69897551D-02
+ 0.30000000D+01 0.31000000D+01 0.10343588D+01 0.78270940D-02
+ 0.31000000D+01 0.32000000D+01 0.85577795D+00 0.57504654D-02
+ 0.32000000D+01 0.33000000D+01 0.68786123D+00 0.47519309D-02
+ 0.33000000D+01 0.34000000D+01 0.53603483D+00 0.40831767D-02
+ 0.34000000D+01 0.35000000D+01 0.40555989D+00 0.34195971D-02
+ 0.35000000D+01 0.36000000D+01 0.29638640D+00 0.24118450D-02
+ 0.36000000D+01 0.37000000D+01 0.20823891D+00 0.17752313D-02
+ 0.37000000D+01 0.38000000D+01 0.13607009D+00 0.12597796D-02
+ 0.38000000D+01 0.39000000D+01 0.84602866D-01 0.89401708D-03
+ 0.39000000D+01 0.40000000D+01 0.47687828D-01 0.12967503D-02
+ 0.40000000D+01 0.41000000D+01 0.22717988D-01 0.22713645D-03
+ 0.41000000D+01 0.42000000D+01 0.97341446D-02 0.10680469D-03
+ 0.42000000D+01 0.43000000D+01 0.33659301D-02 0.40844780D-04
+ 0.43000000D+01 0.44000000D+01 0.80555252D-03 0.15625990D-04
+ 0.44000000D+01 0.45000000D+01 0.80756144D-04 0.40339282D-05
+ 0.45000000D+01 0.46000000D+01 0.16383467D-06 0.20236006D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-HT-4 index   8
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16828371D-06 0.20083738D-06
+ -.45000000D+01 -.44000000D+01 0.81868466D-04 0.40250513D-05
+ -.44000000D+01 -.43000000D+01 0.80030039D-03 0.15503489D-04
+ -.43000000D+01 -.42000000D+01 0.33962147D-02 0.44005396D-04
+ -.42000000D+01 -.41000000D+01 0.10069731D-01 0.11848631D-03
+ -.41000000D+01 -.40000000D+01 0.23299827D-01 0.23224274D-03
+ -.40000000D+01 -.39000000D+01 0.47915995D-01 0.48631119D-03
+ -.39000000D+01 -.38000000D+01 0.84909149D-01 0.10735418D-02
+ -.38000000D+01 -.37000000D+01 0.13841031D+00 0.13021098D-02
+ -.37000000D+01 -.36000000D+01 0.21016146D+00 0.18049352D-02
+ -.36000000D+01 -.35000000D+01 0.30170678D+00 0.23205949D-02
+ -.35000000D+01 -.34000000D+01 0.41049826D+00 0.33268914D-02
+ -.34000000D+01 -.33000000D+01 0.55404876D+00 0.39932260D-02
+ -.33000000D+01 -.32000000D+01 0.70391514D+00 0.46766585D-02
+ -.32000000D+01 -.31000000D+01 0.87913615D+00 0.64880512D-02
+ -.31000000D+01 -.30000000D+01 0.10808130D+01 0.67342336D-02
+ -.30000000D+01 -.29000000D+01 0.12982249D+01 0.73428180D-02
+ -.29000000D+01 -.28000000D+01 0.15527100D+01 0.80648840D-02
+ -.28000000D+01 -.27000000D+01 0.17860423D+01 0.10021167D-01
+ -.27000000D+01 -.26000000D+01 0.20639250D+01 0.98209030D-02
+ -.26000000D+01 -.25000000D+01 0.23370007D+01 0.11761512D-01
+ -.25000000D+01 -.24000000D+01 0.26478750D+01 0.11936952D-01
+ -.24000000D+01 -.23000000D+01 0.29293677D+01 0.11157971D-01
+ -.23000000D+01 -.22000000D+01 0.32380829D+01 0.13764536D-01
+ -.22000000D+01 -.21000000D+01 0.35710699D+01 0.16930547D-01
+ -.21000000D+01 -.20000000D+01 0.39297628D+01 0.13518748D-01
+ -.20000000D+01 -.19000000D+01 0.42438668D+01 0.16044057D-01
+ -.19000000D+01 -.18000000D+01 0.45885724D+01 0.14349846D-01
+ -.18000000D+01 -.17000000D+01 0.48743538D+01 0.16113167D-01
+ -.17000000D+01 -.16000000D+01 0.51840409D+01 0.16877857D-01
+ -.16000000D+01 -.15000000D+01 0.54806793D+01 0.17527466D-01
+ -.15000000D+01 -.14000000D+01 0.58121177D+01 0.19173005D-01
+ -.14000000D+01 -.13000000D+01 0.60729874D+01 0.17337945D-01
+ -.13000000D+01 -.12000000D+01 0.63548412D+01 0.17863058D-01
+ -.12000000D+01 -.11000000D+01 0.66218854D+01 0.17648591D-01
+ -.11000000D+01 -.10000000D+01 0.68311355D+01 0.19704609D-01
+ -.10000000D+01 -.90000000D+00 0.70837158D+01 0.21859942D-01
+ -.90000000D+00 -.80000000D+00 0.72930709D+01 0.21006651D-01
+ -.80000000D+00 -.70000000D+00 0.73795427D+01 0.21115262D-01
+ -.70000000D+00 -.60000000D+00 0.75359356D+01 0.77978922D-01
+ -.60000000D+00 -.50000000D+00 0.77219537D+01 0.21298358D-01
+ -.50000000D+00 -.40000000D+00 0.78489201D+01 0.22656165D-01
+ -.40000000D+00 -.30000000D+00 0.78898038D+01 0.21448209D-01
+ -.30000000D+00 -.20000000D+00 0.80063906D+01 0.23747150D-01
+ -.20000000D+00 -.10000000D+00 0.80540834D+01 0.20791628D-01
+ -.10000000D+00 0.18041124D-15 0.80650811D+01 0.20376704D-01
+ 0.70776718D-15 0.10000000D+00 0.80791503D+01 0.23308344D-01
+ 0.10000000D+00 0.20000000D+00 0.80466063D+01 0.20405005D-01
+ 0.20000000D+00 0.30000000D+00 0.79674847D+01 0.21313060D-01
+ 0.30000000D+00 0.40000000D+00 0.79090121D+01 0.22670498D-01
+ 0.40000000D+00 0.50000000D+00 0.77918676D+01 0.22978681D-01
+ 0.50000000D+00 0.60000000D+00 0.77073275D+01 0.22388078D-01
+ 0.60000000D+00 0.70000000D+00 0.75846704D+01 0.19554078D-01
+ 0.70000000D+00 0.80000000D+00 0.74265182D+01 0.20533524D-01
+ 0.80000000D+00 0.90000000D+00 0.72845315D+01 0.20452729D-01
+ 0.90000000D+00 0.10000000D+01 0.70616502D+01 0.21551213D-01
+ 0.10000000D+01 0.11000000D+01 0.68740402D+01 0.21657786D-01
+ 0.11000000D+01 0.12000000D+01 0.66452675D+01 0.19048081D-01
+ 0.12000000D+01 0.13000000D+01 0.63580526D+01 0.22103846D-01
+ 0.13000000D+01 0.14000000D+01 0.60979707D+01 0.17633232D-01
+ 0.14000000D+01 0.15000000D+01 0.57906411D+01 0.16959241D-01
+ 0.15000000D+01 0.16000000D+01 0.54748792D+01 0.16868411D-01
+ 0.16000000D+01 0.17000000D+01 0.51811285D+01 0.16649291D-01
+ 0.17000000D+01 0.18000000D+01 0.48967784D+01 0.16488656D-01
+ 0.18000000D+01 0.19000000D+01 0.45445321D+01 0.16369600D-01
+ 0.19000000D+01 0.20000000D+01 0.42333230D+01 0.15893193D-01
+ 0.20000000D+01 0.21000000D+01 0.39159997D+01 0.13922054D-01
+ 0.21000000D+01 0.22000000D+01 0.35429293D+01 0.13047427D-01
+ 0.22000000D+01 0.23000000D+01 0.32569847D+01 0.14822047D-01
+ 0.23000000D+01 0.24000000D+01 0.29339191D+01 0.11967361D-01
+ 0.24000000D+01 0.25000000D+01 0.26349207D+01 0.14349726D-01
+ 0.25000000D+01 0.26000000D+01 0.23407504D+01 0.98366731D-02
+ 0.26000000D+01 0.27000000D+01 0.20469047D+01 0.93165313D-02
+ 0.27000000D+01 0.28000000D+01 0.17976897D+01 0.24421237D-01
+ 0.28000000D+01 0.29000000D+01 0.15331433D+01 0.12810576D-01
+ 0.29000000D+01 0.30000000D+01 0.13055986D+01 0.70128677D-02
+ 0.30000000D+01 0.31000000D+01 0.10712483D+01 0.78312223D-02
+ 0.31000000D+01 0.32000000D+01 0.88463419D+00 0.57510927D-02
+ 0.32000000D+01 0.33000000D+01 0.70988960D+00 0.47527970D-02
+ 0.33000000D+01 0.34000000D+01 0.55221869D+00 0.40835738D-02
+ 0.34000000D+01 0.35000000D+01 0.41705686D+00 0.34199127D-02
+ 0.35000000D+01 0.36000000D+01 0.30417621D+00 0.24121757D-02
+ 0.36000000D+01 0.37000000D+01 0.21320038D+00 0.17755962D-02
+ 0.37000000D+01 0.38000000D+01 0.13902980D+00 0.12598552D-02
+ 0.38000000D+01 0.39000000D+01 0.86224805D-01 0.89405614D-03
+ 0.39000000D+01 0.40000000D+01 0.48481600D-01 0.12967657D-02
+ 0.40000000D+01 0.41000000D+01 0.23056176D-01 0.22714852D-03
+ 0.41000000D+01 0.42000000D+01 0.98529239D-02 0.10682794D-03
+ 0.42000000D+01 0.43000000D+01 0.33977668D-02 0.40909574D-04
+ 0.43000000D+01 0.44000000D+01 0.81064177D-03 0.15626231D-04
+ 0.44000000D+01 0.45000000D+01 0.81022610D-04 0.40339368D-05
+ 0.45000000D+01 0.46000000D+01 0.16387315D-06 0.20236006D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-1 index   9
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16785415D-06 0.20083732D-06
+ -.45000000D+01 -.44000000D+01 0.80042580D-04 0.40248473D-05
+ -.44000000D+01 -.43000000D+01 0.77016624D-03 0.15498009D-04
+ -.43000000D+01 -.42000000D+01 0.32274180D-02 0.43972348D-04
+ -.42000000D+01 -.41000000D+01 0.94774427D-02 0.11834575D-03
+ -.41000000D+01 -.40000000D+01 0.21693577D-01 0.23170523D-03
+ -.40000000D+01 -.39000000D+01 0.44334037D-01 0.48562513D-03
+ -.39000000D+01 -.38000000D+01 0.77871600D-01 0.10725545D-02
+ -.38000000D+01 -.37000000D+01 0.12599222D+00 0.13015083D-02
+ -.37000000D+01 -.36000000D+01 0.18999138D+00 0.18023630D-02
+ -.36000000D+01 -.35000000D+01 0.27101910D+00 0.23165103D-02
+ -.35000000D+01 -.34000000D+01 0.36630947D+00 0.33211327D-02
+ -.34000000D+01 -.33000000D+01 0.49308727D+00 0.39813502D-02
+ -.33000000D+01 -.32000000D+01 0.62245054D+00 0.46630500D-02
+ -.32000000D+01 -.31000000D+01 0.77427836D+00 0.64805778D-02
+ -.31000000D+01 -.30000000D+01 0.94919117D+00 0.67243466D-02
+ -.30000000D+01 -.29000000D+01 0.11356404D+01 0.73093047D-02
+ -.29000000D+01 -.28000000D+01 0.13566191D+01 0.80302589D-02
+ -.28000000D+01 -.27000000D+01 0.15532348D+01 0.10003613D-01
+ -.27000000D+01 -.26000000D+01 0.17924813D+01 0.97944423D-02
+ -.26000000D+01 -.25000000D+01 0.20222233D+01 0.11737445D-01
+ -.25000000D+01 -.24000000D+01 0.22888906D+01 0.11882087D-01
+ -.24000000D+01 -.23000000D+01 0.25239126D+01 0.11103210D-01
+ -.23000000D+01 -.22000000D+01 0.27840666D+01 0.13722816D-01
+ -.22000000D+01 -.21000000D+01 0.30679035D+01 0.16910935D-01
+ -.21000000D+01 -.20000000D+01 0.33756209D+01 0.13484351D-01
+ -.20000000D+01 -.19000000D+01 0.36369897D+01 0.15992344D-01
+ -.19000000D+01 -.18000000D+01 0.39307602D+01 0.14295605D-01
+ -.18000000D+01 -.17000000D+01 0.41637606D+01 0.16083981D-01
+ -.17000000D+01 -.16000000D+01 0.44235454D+01 0.16817333D-01
+ -.16000000D+01 -.15000000D+01 0.46713019D+01 0.17443359D-01
+ -.15000000D+01 -.14000000D+01 0.49527549D+01 0.19080670D-01
+ -.14000000D+01 -.13000000D+01 0.51669213D+01 0.17271399D-01
+ -.13000000D+01 -.12000000D+01 0.54040622D+01 0.17790447D-01
+ -.12000000D+01 -.11000000D+01 0.56283048D+01 0.17571385D-01
+ -.11000000D+01 -.10000000D+01 0.57972099D+01 0.19637914D-01
+ -.10000000D+01 -.90000000D+00 0.60135735D+01 0.21802091D-01
+ -.90000000D+00 -.80000000D+00 0.61873487D+01 0.20940749D-01
+ -.80000000D+00 -.70000000D+00 0.62460087D+01 0.21005632D-01
+ -.70000000D+00 -.60000000D+00 0.63704267D+01 0.77932237D-01
+ -.60000000D+00 -.50000000D+00 0.65376328D+01 0.21213939D-01
+ -.50000000D+00 -.40000000D+00 0.66432335D+01 0.22569497D-01
+ -.40000000D+00 -.30000000D+00 0.66715675D+01 0.20895805D-01
+ -.30000000D+00 -.20000000D+00 0.67699761D+01 0.23284420D-01
+ -.20000000D+00 -.10000000D+00 0.68107137D+01 0.20687006D-01
+ -.10000000D+00 0.18041124D-15 0.68198140D+01 0.20289910D-01
+ 0.70776718D-15 0.10000000D+00 0.68334505D+01 0.23244725D-01
+ 0.10000000D+00 0.20000000D+00 0.68044509D+01 0.20342508D-01
+ 0.20000000D+00 0.30000000D+00 0.67342173D+01 0.21233083D-01
+ 0.30000000D+00 0.40000000D+00 0.66873501D+01 0.22504840D-01
+ 0.40000000D+00 0.50000000D+00 0.65863917D+01 0.22838315D-01
+ 0.50000000D+00 0.60000000D+00 0.65209804D+01 0.22246629D-01
+ 0.60000000D+00 0.70000000D+00 0.64226247D+01 0.19477057D-01
+ 0.70000000D+00 0.80000000D+00 0.62889068D+01 0.20480384D-01
+ 0.80000000D+00 0.90000000D+00 0.61809527D+01 0.20392324D-01
+ 0.90000000D+00 0.10000000D+01 0.59916017D+01 0.21484616D-01
+ 0.10000000D+01 0.11000000D+01 0.58396153D+01 0.21611641D-01
+ 0.11000000D+01 0.12000000D+01 0.56520233D+01 0.18986522D-01
+ 0.12000000D+01 0.13000000D+01 0.54073917D+01 0.22065521D-01
+ 0.13000000D+01 0.14000000D+01 0.51919975D+01 0.17571589D-01
+ 0.14000000D+01 0.15000000D+01 0.49309733D+01 0.16904727D-01
+ 0.15000000D+01 0.16000000D+01 0.46635437D+01 0.16824903D-01
+ 0.16000000D+01 0.17000000D+01 0.44205982D+01 0.16586911D-01
+ 0.17000000D+01 0.18000000D+01 0.41872950D+01 0.16443040D-01
+ 0.18000000D+01 0.19000000D+01 0.38862318D+01 0.16337808D-01
+ 0.19000000D+01 0.20000000D+01 0.36287227D+01 0.15738018D-01
+ 0.20000000D+01 0.21000000D+01 0.33608254D+01 0.13756517D-01
+ 0.21000000D+01 0.22000000D+01 0.30384499D+01 0.13021120D-01
+ 0.22000000D+01 0.23000000D+01 0.28034256D+01 0.14789247D-01
+ 0.23000000D+01 0.24000000D+01 0.25286615D+01 0.11934213D-01
+ 0.24000000D+01 0.25000000D+01 0.22758789D+01 0.14324717D-01
+ 0.25000000D+01 0.26000000D+01 0.20275663D+01 0.97728061D-02
+ 0.26000000D+01 0.27000000D+01 0.17743384D+01 0.92598712D-02
+ 0.27000000D+01 0.28000000D+01 0.15648001D+01 0.24409716D-01
+ 0.28000000D+01 0.29000000D+01 0.13378055D+01 0.12774036D-01
+ 0.29000000D+01 0.30000000D+01 0.11424808D+01 0.69015116D-02
+ 0.30000000D+01 0.31000000D+01 0.93923937D+00 0.77858074D-02
+ 0.31000000D+01 0.32000000D+01 0.77985664D+00 0.57382030D-02
+ 0.32000000D+01 0.33000000D+01 0.62843502D+00 0.47415419D-02
+ 0.33000000D+01 0.34000000D+01 0.49119161D+00 0.40764318D-02
+ 0.34000000D+01 0.35000000D+01 0.37286123D+00 0.34143186D-02
+ 0.35000000D+01 0.36000000D+01 0.27337391D+00 0.24072449D-02
+ 0.36000000D+01 0.37000000D+01 0.19307767D+00 0.17716642D-02
+ 0.37000000D+01 0.38000000D+01 0.12663948D+00 0.12579588D-02
+ 0.38000000D+01 0.39000000D+01 0.79182964D-01 0.89286432D-03
+ 0.39000000D+01 0.40000000D+01 0.44909932D-01 0.12963531D-02
+ 0.40000000D+01 0.41000000D+01 0.21461224D-01 0.22678151D-03
+ 0.41000000D+01 0.42000000D+01 0.92622840D-02 0.10655292D-03
+ 0.42000000D+01 0.43000000D+01 0.32266642D-02 0.40371957D-04
+ 0.43000000D+01 0.44000000D+01 0.78052697D-03 0.15621035D-04
+ 0.44000000D+01 0.45000000D+01 0.79191830D-04 0.40337222D-05
+ 0.45000000D+01 0.46000000D+01 0.16346399D-06 0.20235999D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-2 index  10
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16809111D-06 0.20083735D-06
+ -.45000000D+01 -.44000000D+01 0.81048512D-04 0.40249505D-05
+ -.44000000D+01 -.43000000D+01 0.78666512D-03 0.15500696D-04
+ -.43000000D+01 -.42000000D+01 0.33193169D-02 0.43988277D-04
+ -.42000000D+01 -.41000000D+01 0.97983912D-02 0.11840971D-03
+ -.41000000D+01 -.40000000D+01 0.22558353D-01 0.23193792D-03
+ -.40000000D+01 -.39000000D+01 0.46258790D-01 0.48594402D-03
+ -.39000000D+01 -.38000000D+01 0.81634678D-01 0.10730174D-02
+ -.38000000D+01 -.37000000D+01 0.13261187D+00 0.13018095D-02
+ -.37000000D+01 -.36000000D+01 0.20070741D+00 0.18034824D-02
+ -.36000000D+01 -.35000000D+01 0.28728291D+00 0.23182630D-02
+ -.35000000D+01 -.34000000D+01 0.38967843D+00 0.33236643D-02
+ -.34000000D+01 -.33000000D+01 0.52525130D+00 0.39856680D-02
+ -.33000000D+01 -.32000000D+01 0.66529736D+00 0.46681512D-02
+ -.32000000D+01 -.31000000D+01 0.82934624D+00 0.64837548D-02
+ -.31000000D+01 -.30000000D+01 0.10182329D+01 0.67287844D-02
+ -.30000000D+01 -.29000000D+01 0.12207407D+01 0.73213392D-02
+ -.29000000D+01 -.28000000D+01 0.14591072D+01 0.80434352D-02
+ -.28000000D+01 -.27000000D+01 0.16747116D+01 0.10010585D-01
+ -.27000000D+01 -.26000000D+01 0.19341035D+01 0.98045663D-02
+ -.26000000D+01 -.25000000D+01 0.21860291D+01 0.11747689D-01
+ -.25000000D+01 -.24000000D+01 0.24755806D+01 0.11901649D-01
+ -.24000000D+01 -.23000000D+01 0.27345388D+01 0.11122084D-01
+ -.23000000D+01 -.22000000D+01 0.30196842D+01 0.13740280D-01
+ -.22000000D+01 -.21000000D+01 0.33287733D+01 0.16918571D-01
+ -.21000000D+01 -.20000000D+01 0.36627137D+01 0.13497466D-01
+ -.20000000D+01 -.19000000D+01 0.39509059D+01 0.16013098D-01
+ -.19000000D+01 -.18000000D+01 0.42709433D+01 0.14317128D-01
+ -.18000000D+01 -.17000000D+01 0.45307109D+01 0.16095377D-01
+ -.17000000D+01 -.16000000D+01 0.48159730D+01 0.16841453D-01
+ -.16000000D+01 -.15000000D+01 0.50888369D+01 0.17476509D-01
+ -.15000000D+01 -.14000000D+01 0.53955605D+01 0.19119129D-01
+ -.14000000D+01 -.13000000D+01 0.56335622D+01 0.17291893D-01
+ -.13000000D+01 -.12000000D+01 0.58932908D+01 0.17816035D-01
+ -.12000000D+01 -.11000000D+01 0.61390858D+01 0.17602089D-01
+ -.11000000D+01 -.10000000D+01 0.63285319D+01 0.19662196D-01
+ -.10000000D+01 -.90000000D+00 0.65633324D+01 0.21823690D-01
+ -.90000000D+00 -.80000000D+00 0.67548566D+01 0.20967775D-01
+ -.80000000D+00 -.70000000D+00 0.68278357D+01 0.21049076D-01
+ -.70000000D+00 -.60000000D+00 0.69676884D+01 0.77949492D-01
+ -.60000000D+00 -.50000000D+00 0.71451841D+01 0.21239335D-01
+ -.50000000D+00 -.40000000D+00 0.72613047D+01 0.22600620D-01
+ -.40000000D+00 -.30000000D+00 0.72962437D+01 0.21104930D-01
+ -.30000000D+00 -.20000000D+00 0.74032232D+01 0.23461556D-01
+ -.20000000D+00 -.10000000D+00 0.74474749D+01 0.20721928D-01
+ -.10000000D+00 0.18041124D-15 0.74580030D+01 0.20314228D-01
+ 0.70776718D-15 0.10000000D+00 0.74715484D+01 0.23269041D-01
+ 0.10000000D+00 0.20000000D+00 0.74408116D+01 0.20367050D-01
+ 0.20000000D+00 0.30000000D+00 0.73662433D+01 0.21262499D-01
+ 0.30000000D+00 0.40000000D+00 0.73133741D+01 0.22562594D-01
+ 0.40000000D+00 0.50000000D+00 0.72044945D+01 0.22884157D-01
+ 0.50000000D+00 0.60000000D+00 0.71291538D+01 0.22291046D-01
+ 0.60000000D+00 0.70000000D+00 0.70187085D+01 0.19503453D-01
+ 0.70000000D+00 0.80000000D+00 0.68723686D+01 0.20501624D-01
+ 0.80000000D+00 0.90000000D+00 0.67477017D+01 0.20415800D-01
+ 0.90000000D+00 0.10000000D+01 0.65412384D+01 0.21507959D-01
+ 0.10000000D+01 0.11000000D+01 0.63710710D+01 0.21629925D-01
+ 0.11000000D+01 0.12000000D+01 0.61628613D+01 0.19007536D-01
+ 0.12000000D+01 0.13000000D+01 0.58965739D+01 0.22081650D-01
+ 0.13000000D+01 0.14000000D+01 0.56585096D+01 0.17596983D-01
+ 0.14000000D+01 0.15000000D+01 0.53739164D+01 0.16927518D-01
+ 0.15000000D+01 0.16000000D+01 0.50818293D+01 0.16840296D-01
+ 0.16000000D+01 0.17000000D+01 0.48130949D+01 0.16611119D-01
+ 0.17000000D+01 0.18000000D+01 0.45538480D+01 0.16460443D-01
+ 0.18000000D+01 0.19000000D+01 0.42265575D+01 0.16350105D-01
+ 0.19000000D+01 0.20000000D+01 0.39417992D+01 0.15792776D-01
+ 0.20000000D+01 0.21000000D+01 0.36482469D+01 0.13814956D-01
+ 0.21000000D+01 0.22000000D+01 0.32998305D+01 0.13032034D-01
+ 0.22000000D+01 0.23000000D+01 0.30388289D+01 0.14801873D-01
+ 0.23000000D+01 0.24000000D+01 0.27392454D+01 0.11946916D-01
+ 0.24000000D+01 0.25000000D+01 0.24625494D+01 0.14335414D-01
+ 0.25000000D+01 0.26000000D+01 0.21908493D+01 0.97950249D-02
+ 0.26000000D+01 0.27000000D+01 0.19164120D+01 0.92803292D-02
+ 0.27000000D+01 0.28000000D+01 0.16863501D+01 0.24414537D-01
+ 0.28000000D+01 0.29000000D+01 0.14400926D+01 0.12783973D-01
+ 0.29000000D+01 0.30000000D+01 0.12276895D+01 0.69384085D-02
+ 0.30000000D+01 0.31000000D+01 0.10084078D+01 0.78057322D-02
+ 0.31000000D+01 0.32000000D+01 0.83491347D+00 0.57431755D-02
+ 0.32000000D+01 0.33000000D+01 0.67127260D+00 0.47461707D-02
+ 0.33000000D+01 0.34000000D+01 0.52339247D+00 0.40794557D-02
+ 0.34000000D+01 0.35000000D+01 0.39622064D+00 0.34168705D-02
+ 0.35000000D+01 0.36000000D+01 0.28968547D+00 0.24093636D-02
+ 0.36000000D+01 0.37000000D+01 0.20378217D+00 0.17733052D-02
+ 0.37000000D+01 0.38000000D+01 0.13324553D+00 0.12588426D-02
+ 0.38000000D+01 0.39000000D+01 0.82949509D-01 0.89343384D-03
+ 0.39000000D+01 0.40000000D+01 0.46829756D-01 0.12965447D-02
+ 0.40000000D+01 0.41000000D+01 0.22321504D-01 0.22693959D-03
+ 0.41000000D+01 0.42000000D+01 0.95825306D-02 0.10666710D-03
+ 0.42000000D+01 0.43000000D+01 0.33195692D-02 0.40583344D-04
+ 0.43000000D+01 0.44000000D+01 0.79702319D-03 0.15623632D-04
+ 0.44000000D+01 0.45000000D+01 0.80199887D-04 0.40338302D-05
+ 0.45000000D+01 0.46000000D+01 0.16369037D-06 0.20236003D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-3 index  11
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16821618D-06 0.20083736D-06
+ -.45000000D+01 -.44000000D+01 0.81628523D-04 0.40250082D-05
+ -.44000000D+01 -.43000000D+01 0.79659993D-03 0.15502221D-04
+ -.43000000D+01 -.42000000D+01 0.33766233D-02 0.43997692D-04
+ -.42000000D+01 -.41000000D+01 0.10003937D-01 0.11845041D-03
+ -.41000000D+01 -.40000000D+01 0.23125882D-01 0.23209587D-03
+ -.40000000D+01 -.39000000D+01 0.47545387D-01 0.48613989D-03
+ -.39000000D+01 -.38000000D+01 0.84198627D-01 0.10732924D-02
+ -.38000000D+01 -.37000000D+01 0.13719923D+00 0.13018966D-02
+ -.37000000D+01 -.36000000D+01 0.20825498D+00 0.18042097D-02
+ -.36000000D+01 -.35000000D+01 0.29890056D+00 0.23193856D-02
+ -.35000000D+01 -.34000000D+01 0.40658662D+00 0.33253483D-02
+ -.34000000D+01 -.33000000D+01 0.54881172D+00 0.39894338D-02
+ -.33000000D+01 -.32000000D+01 0.69705964D+00 0.46724198D-02
+ -.32000000D+01 -.31000000D+01 0.87060430D+00 0.64858255D-02
+ -.31000000D+01 -.30000000D+01 0.10704208D+01 0.67316649D-02
+ -.30000000D+01 -.29000000D+01 0.12856123D+01 0.73321256D-02
+ -.29000000D+01 -.28000000D+01 0.15378561D+01 0.80543954D-02
+ -.28000000D+01 -.27000000D+01 0.17687545D+01 0.10016009D-01
+ -.27000000D+01 -.26000000D+01 0.20443749D+01 0.98128027D-02
+ -.26000000D+01 -.25000000D+01 0.23144025D+01 0.11754701D-01
+ -.25000000D+01 -.24000000D+01 0.26226203D+01 0.11919291D-01
+ -.24000000D+01 -.23000000D+01 0.29012656D+01 0.11139886D-01
+ -.23000000D+01 -.22000000D+01 0.32069635D+01 0.13753637D-01
+ -.22000000D+01 -.21000000D+01 0.35370627D+01 0.16924437D-01
+ -.21000000D+01 -.20000000D+01 0.38926965D+01 0.13507881D-01
+ -.20000000D+01 -.19000000D+01 0.42033012D+01 0.16029309D-01
+ -.19000000D+01 -.18000000D+01 0.45452247D+01 0.14334287D-01
+ -.18000000D+01 -.17000000D+01 0.48275523D+01 0.16105305D-01
+ -.17000000D+01 -.16000000D+01 0.51343586D+01 0.16859877D-01
+ -.16000000D+01 -.15000000D+01 0.54283747D+01 0.17502717D-01
+ -.15000000D+01 -.14000000D+01 0.57565297D+01 0.19147947D-01
+ -.14000000D+01 -.13000000D+01 0.60147185D+01 0.17312787D-01
+ -.13000000D+01 -.12000000D+01 0.62937952D+01 0.17839525D-01
+ -.12000000D+01 -.11000000D+01 0.65580799D+01 0.17626180D-01
+ -.11000000D+01 -.10000000D+01 0.67649510D+01 0.19682705D-01
+ -.10000000D+01 -.90000000D+00 0.70155253D+01 0.21841690D-01
+ -.90000000D+00 -.80000000D+00 0.72224014D+01 0.20987991D-01
+ -.80000000D+00 -.70000000D+00 0.73077124D+01 0.21083736D-01
+ -.70000000D+00 -.60000000D+00 0.74609976D+01 0.77964107D-01
+ -.60000000D+00 -.50000000D+00 0.76471210D+01 0.21265974D-01
+ -.50000000D+00 -.40000000D+00 0.77723973D+01 0.22629048D-01
+ -.40000000D+00 -.30000000D+00 0.78131837D+01 0.21286512D-01
+ -.30000000D+00 -.20000000D+00 0.79274595D+01 0.23614449D-01
+ -.20000000D+00 -.10000000D+00 0.79748533D+01 0.20755968D-01
+ -.10000000D+00 0.18041124D-15 0.79863850D+01 0.20343214D-01
+ 0.70776718D-15 0.10000000D+00 0.80001100D+01 0.23289429D-01
+ 0.10000000D+00 0.20000000D+00 0.79677329D+01 0.20386429D-01
+ 0.20000000D+00 0.30000000D+00 0.78893948D+01 0.21288399D-01
+ 0.30000000D+00 0.40000000D+00 0.78314400D+01 0.22617455D-01
+ 0.40000000D+00 0.50000000D+00 0.77155272D+01 0.22929963D-01
+ 0.50000000D+00 0.60000000D+00 0.76317998D+01 0.22338021D-01
+ 0.60000000D+00 0.70000000D+00 0.75108199D+01 0.19528321D-01
+ 0.70000000D+00 0.80000000D+00 0.73536357D+01 0.20517432D-01
+ 0.80000000D+00 0.90000000D+00 0.72144849D+01 0.20435169D-01
+ 0.90000000D+00 0.10000000D+01 0.69934289D+01 0.21529250D-01
+ 0.10000000D+01 0.11000000D+01 0.68076569D+01 0.21644500D-01
+ 0.11000000D+01 0.12000000D+01 0.65817216D+01 0.19027149D-01
+ 0.12000000D+01 0.13000000D+01 0.62969962D+01 0.22096341D-01
+ 0.13000000D+01 0.14000000D+01 0.60396250D+01 0.17616390D-01
+ 0.14000000D+01 0.15000000D+01 0.57349636D+01 0.16944686D-01
+ 0.15000000D+01 0.16000000D+01 0.54220523D+01 0.16853789D-01
+ 0.16000000D+01 0.17000000D+01 0.51315006D+01 0.16630575D-01
+ 0.17000000D+01 0.18000000D+01 0.48502854D+01 0.16474008D-01
+ 0.18000000D+01 0.19000000D+01 0.45010161D+01 0.16359596D-01
+ 0.19000000D+01 0.20000000D+01 0.41934257D+01 0.15844331D-01
+ 0.20000000D+01 0.21000000D+01 0.38785988D+01 0.13870725D-01
+ 0.21000000D+01 0.22000000D+01 0.35085512D+01 0.13040391D-01
+ 0.22000000D+01 0.23000000D+01 0.32259916D+01 0.14812092D-01
+ 0.23000000D+01 0.24000000D+01 0.29058954D+01 0.11956985D-01
+ 0.24000000D+01 0.25000000D+01 0.26096657D+01 0.14343039D-01
+ 0.25000000D+01 0.26000000D+01 0.23187676D+01 0.98141597D-02
+ 0.26000000D+01 0.27000000D+01 0.20270533D+01 0.92989878D-02
+ 0.27000000D+01 0.28000000D+01 0.17804133D+01 0.24417921D-01
+ 0.28000000D+01 0.29000000D+01 0.15185635D+01 0.12796282D-01
+ 0.29000000D+01 0.30000000D+01 0.12927627D+01 0.69754316D-02
+ 0.30000000D+01 0.31000000D+01 0.10607387D+01 0.78197387D-02
+ 0.31000000D+01 0.32000000D+01 0.87613735D+00 0.57468700D-02
+ 0.32000000D+01 0.33000000D+01 0.70304161D+00 0.47494692D-02
+ 0.33000000D+01 0.34000000D+01 0.54697633D+00 0.40815206D-02
+ 0.34000000D+01 0.35000000D+01 0.41314206D+00 0.34184914D-02
+ 0.35000000D+01 0.36000000D+01 0.30133897D+00 0.24107902D-02
+ 0.36000000D+01 0.37000000D+01 0.21131188D+00 0.17744579D-02
+ 0.37000000D+01 0.38000000D+01 0.13782319D+00 0.12593756D-02
+ 0.38000000D+01 0.39000000D+01 0.85515198D-01 0.89376593D-03
+ 0.39000000D+01 0.40000000D+01 0.48113313D-01 0.12966595D-02
+ 0.40000000D+01 0.41000000D+01 0.22885373D-01 0.22704201D-03
+ 0.41000000D+01 0.42000000D+01 0.97876382D-02 0.10675176D-03
+ 0.42000000D+01 0.43000000D+01 0.33776320D-02 0.40759385D-04
+ 0.43000000D+01 0.44000000D+01 0.80695466D-03 0.15625085D-04
+ 0.44000000D+01 0.45000000D+01 0.80780972D-04 0.40338895D-05
+ 0.45000000D+01 0.46000000D+01 0.16380930D-06 0.20236005D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# yh-ptj1-4 index  12
+ -.50000000D+01 -.49000000D+01 0.00000000D+00 0.00000000D+00
+ -.49000000D+01 -.48000000D+01 0.00000000D+00 0.00000000D+00
+ -.48000000D+01 -.47000000D+01 0.00000000D+00 0.00000000D+00
+ -.47000000D+01 -.46000000D+01 0.00000000D+00 0.00000000D+00
+ -.46000000D+01 -.45000000D+01 0.16827475D-06 0.20083737D-06
+ -.45000000D+01 -.44000000D+01 0.81915190D-04 0.40250361D-05
+ -.44000000D+01 -.43000000D+01 0.80166073D-03 0.15502966D-04
+ -.43000000D+01 -.42000000D+01 0.34065911D-02 0.44002449D-04
+ -.42000000D+01 -.41000000D+01 0.10113764D-01 0.11847216D-03
+ -.41000000D+01 -.40000000D+01 0.23435274D-01 0.23218442D-03
+ -.40000000D+01 -.39000000D+01 0.48258124D-01 0.48624387D-03
+ -.39000000D+01 -.38000000D+01 0.85642835D-01 0.10734332D-02
+ -.38000000D+01 -.37000000D+01 0.13982318D+00 0.13019071D-02
+ -.37000000D+01 -.36000000D+01 0.21263747D+00 0.18046155D-02
+ -.36000000D+01 -.35000000D+01 0.30573746D+00 0.23200144D-02
+ -.35000000D+01 -.34000000D+01 0.41665891D+00 0.33263164D-02
+ -.34000000D+01 -.33000000D+01 0.56302285D+00 0.39921475D-02
+ -.33000000D+01 -.32000000D+01 0.71644199D+00 0.46754250D-02
+ -.32000000D+01 -.31000000D+01 0.89605740D+00 0.64870747D-02
+ -.31000000D+01 -.30000000D+01 0.11029141D+01 0.67333049D-02
+ -.30000000D+01 -.29000000D+01 0.13263442D+01 0.73399339D-02
+ -.29000000D+01 -.28000000D+01 0.15877610D+01 0.80618771D-02
+ -.28000000D+01 -.27000000D+01 0.18288215D+01 0.10019629D-01
+ -.27000000D+01 -.26000000D+01 0.21152600D+01 0.98188704D-02
+ -.26000000D+01 -.25000000D+01 0.23975134D+01 0.11758989D-01
+ -.25000000D+01 -.24000000D+01 0.27183554D+01 0.11931721D-01
+ -.24000000D+01 -.23000000D+01 0.30104426D+01 0.11152868D-01
+ -.23000000D+01 -.22000000D+01 0.33301774D+01 0.13762212D-01
+ -.22000000D+01 -.21000000D+01 0.36748093D+01 0.16928633D-01
+ -.21000000D+01 -.20000000D+01 0.40453826D+01 0.13515817D-01
+ -.20000000D+01 -.19000000D+01 0.43715500D+01 0.16039738D-01
+ -.19000000D+01 -.18000000D+01 0.47287016D+01 0.14345717D-01
+ -.18000000D+01 -.17000000D+01 0.50268677D+01 0.16112276D-01
+ -.17000000D+01 -.16000000D+01 0.53488475D+01 0.16872434D-01
+ -.16000000D+01 -.15000000D+01 0.56577238D+01 0.17519909D-01
+ -.15000000D+01 -.14000000D+01 0.60010408D+01 0.19167089D-01
+ -.14000000D+01 -.13000000D+01 0.62735104D+01 0.17333625D-01
+ -.13000000D+01 -.12000000D+01 0.65664924D+01 0.17859598D-01
+ -.12000000D+01 -.11000000D+01 0.68439709D+01 0.17641823D-01
+ -.11000000D+01 -.10000000D+01 0.70632066D+01 0.19696759D-01
+ -.10000000D+01 -.90000000D+00 0.73250798D+01 0.21855164D-01
+ -.90000000D+00 -.80000000D+00 0.75430962D+01 0.21001307D-01
+ -.80000000D+00 -.70000000D+00 0.76372336D+01 0.21106461D-01
+ -.70000000D+00 -.60000000D+00 0.78003195D+01 0.77974979D-01
+ -.60000000D+00 -.50000000D+00 0.79924763D+01 0.21290731D-01
+ -.50000000D+00 -.40000000D+00 0.81244343D+01 0.22650045D-01
+ -.40000000D+00 -.30000000D+00 0.81695783D+01 0.21403048D-01
+ -.30000000D+00 -.20000000D+00 0.82889969D+01 0.23711958D-01
+ -.20000000D+00 -.10000000D+00 0.83388170D+01 0.20786805D-01
+ -.10000000D+00 0.18041124D-15 0.83507903D+01 0.20373963D-01
+ 0.70776718D-15 0.10000000D+00 0.83649308D+01 0.23304798D-01
+ 0.10000000D+00 0.20000000D+00 0.83312047D+01 0.20399943D-01
+ 0.20000000D+00 0.30000000D+00 0.82501108D+01 0.21309123D-01
+ 0.30000000D+00 0.40000000D+00 0.81886426D+01 0.22660027D-01
+ 0.40000000D+00 0.50000000D+00 0.80674689D+01 0.22968064D-01
+ 0.50000000D+00 0.60000000D+00 0.79777306D+01 0.22379236D-01
+ 0.60000000D+00 0.70000000D+00 0.78491909D+01 0.19548478D-01
+ 0.70000000D+00 0.80000000D+00 0.76841502D+01 0.20529074D-01
+ 0.80000000D+00 0.90000000D+00 0.75345211D+01 0.20449041D-01
+ 0.90000000D+00 0.10000000D+01 0.73030655D+01 0.21545428D-01
+ 0.10000000D+01 0.11000000D+01 0.71061233D+01 0.21654703D-01
+ 0.11000000D+01 0.12000000D+01 0.68674199D+01 0.19045404D-01
+ 0.12000000D+01 0.13000000D+01 0.65695109D+01 0.22109419D-01
+ 0.13000000D+01 0.14000000D+01 0.62984921D+01 0.17628775D-01
+ 0.14000000D+01 0.15000000D+01 0.59795235D+01 0.16955733D-01
+ 0.15000000D+01 0.16000000D+01 0.56519359D+01 0.16863912D-01
+ 0.16000000D+01 0.17000000D+01 0.53459770D+01 0.16644056D-01
+ 0.17000000D+01 0.18000000D+01 0.50492535D+01 0.16483267D-01
+ 0.18000000D+01 0.19000000D+01 0.46846492D+01 0.16366365D-01
+ 0.19000000D+01 0.20000000D+01 0.43611389D+01 0.15880131D-01
+ 0.20000000D+01 0.21000000D+01 0.40315913D+01 0.13909123D-01
+ 0.21000000D+01 0.22000000D+01 0.36465858D+01 0.13046159D-01
+ 0.22000000D+01 0.23000000D+01 0.33491410D+01 0.14819119D-01
+ 0.23000000D+01 0.24000000D+01 0.30149948D+01 0.11963957D-01
+ 0.24000000D+01 0.25000000D+01 0.27055168D+01 0.14347706D-01
+ 0.25000000D+01 0.26000000D+01 0.24015675D+01 0.98266229D-02
+ 0.26000000D+01 0.27000000D+01 0.20981869D+01 0.93117586D-02
+ 0.27000000D+01 0.28000000D+01 0.18404608D+01 0.24420081D-01
+ 0.28000000D+01 0.29000000D+01 0.15681990D+01 0.12808457D-01
+ 0.29000000D+01 0.30000000D+01 0.13337186D+01 0.70062987D-02
+ 0.30000000D+01 0.31000000D+01 0.10933444D+01 0.78276846D-02
+ 0.31000000D+01 0.32000000D+01 0.90155618D+00 0.57491782D-02
+ 0.32000000D+01 0.33000000D+01 0.72243697D+00 0.47515126D-02
+ 0.33000000D+01 0.34000000D+01 0.56119585D+00 0.40827305D-02
+ 0.34000000D+01 0.35000000D+01 0.42323386D+00 0.34193787D-02
+ 0.35000000D+01 0.36000000D+01 0.30819655D+00 0.24116405D-02
+ 0.36000000D+01 0.37000000D+01 0.21567875D+00 0.17752035D-02
+ 0.37000000D+01 0.38000000D+01 0.14044139D+00 0.12596528D-02
+ 0.38000000D+01 0.39000000D+01 0.86960054D-01 0.89393132D-03
+ 0.39000000D+01 0.40000000D+01 0.48824492D-01 0.12967182D-02
+ 0.40000000D+01 0.41000000D+01 0.23192510D-01 0.22709916D-03
+ 0.41000000D+01 0.42000000D+01 0.98972368D-02 0.10680112D-03
+ 0.42000000D+01 0.43000000D+01 0.34080356D-02 0.40867467D-04
+ 0.43000000D+01 0.44000000D+01 0.81201328D-03 0.15625791D-04
+ 0.44000000D+01 0.45000000D+01 0.81068128D-04 0.40339179D-05
+ 0.45000000D+01 0.46000000D+01 0.16386484D-06 0.20236006D-06
+ 0.46000000D+01 0.47000000D+01 0.00000000D+00 0.00000000D+00
+ 0.47000000D+01 0.48000000D+01 0.00000000D+00 0.00000000D+00
+ 0.48000000D+01 0.49000000D+01 0.00000000D+00 0.00000000D+00
+ 0.49000000D+01 0.50000000D+01 0.00000000D+00 0.00000000D+00
+
+
+# pth index  13
+ 0.00000000D+00 0.30000000D+01 -.12430860D+01 0.56222686D-02
+ 0.30000000D+01 0.60000000D+01 0.55747318D-01 0.23673983D-02
+ 0.60000000D+01 0.90000000D+01 0.14400487D+01 0.20506319D-02
+ 0.90000000D+01 0.12000000D+02 0.13501517D+01 0.19752978D-02
+ 0.12000000D+02 0.15000000D+02 0.11419853D+01 0.17555340D-02
+ 0.15000000D+02 0.18000000D+02 0.95896961D+00 0.13389654D-02
+ 0.18000000D+02 0.21000000D+02 0.81290019D+00 0.16469573D-02
+ 0.21000000D+02 0.24000000D+02 0.68828175D+00 0.16659391D-02
+ 0.24000000D+02 0.27000000D+02 0.59907581D+00 0.11165343D-02
+ 0.27000000D+02 0.30000000D+02 0.52240643D+00 0.97539521D-03
+ 0.30000000D+02 0.33000000D+02 0.45823709D+00 0.86934529D-03
+ 0.33000000D+02 0.36000000D+02 0.40680730D+00 0.79589732D-03
+ 0.36000000D+02 0.39000000D+02 0.36266988D+00 0.63377700D-03
+ 0.39000000D+02 0.42000000D+02 0.32585436D+00 0.65879813D-03
+ 0.42000000D+02 0.45000000D+02 0.29398857D+00 0.65378206D-03
+ 0.45000000D+02 0.48000000D+02 0.26608904D+00 0.10776633D-02
+ 0.48000000D+02 0.51000000D+02 0.24045428D+00 0.11182241D-02
+ 0.51000000D+02 0.54000000D+02 0.22204763D+00 0.71720893D-03
+ 0.54000000D+02 0.57000000D+02 0.20161773D+00 0.63380194D-03
+ 0.57000000D+02 0.60000000D+02 0.18393211D+00 0.50969644D-03
+ 0.60000000D+02 0.63000000D+02 0.17066005D+00 0.48202873D-03
+ 0.63000000D+02 0.66000000D+02 0.15673667D+00 0.48102750D-03
+ 0.66000000D+02 0.69000000D+02 0.14481241D+00 0.62118072D-03
+ 0.69000000D+02 0.72000000D+02 0.13399641D+00 0.62505535D-03
+ 0.72000000D+02 0.75000000D+02 0.12360498D+00 0.48166907D-03
+ 0.75000000D+02 0.78000000D+02 0.11539021D+00 0.42972884D-03
+ 0.78000000D+02 0.81000000D+02 0.10731897D+00 0.35805308D-03
+ 0.81000000D+02 0.84000000D+02 0.99254431D-01 0.37575046D-03
+ 0.84000000D+02 0.87000000D+02 0.93096788D-01 0.36937523D-03
+ 0.87000000D+02 0.90000000D+02 0.86163680D-01 0.32596866D-03
+ 0.90000000D+02 0.93000000D+02 0.80896780D-01 0.38287381D-03
+ 0.93000000D+02 0.96000000D+02 0.75423455D-01 0.38477844D-03
+ 0.96000000D+02 0.99000000D+02 0.70676464D-01 0.32679960D-03
+ 0.99000000D+02 0.10200000D+03 0.66285406D-01 0.32461768D-03
+ 0.10200000D+03 0.10500000D+03 0.62125424D-01 0.27718164D-03
+ 0.10500000D+03 0.10800000D+03 0.58276190D-01 0.38093821D-03
+ 0.10800000D+03 0.11100000D+03 0.54647008D-01 0.37019134D-03
+ 0.11100000D+03 0.11400000D+03 0.51294731D-01 0.24000917D-03
+ 0.11400000D+03 0.11700000D+03 0.47889314D-01 0.42537249D-03
+ 0.11700000D+03 0.12000000D+03 0.46100245D-01 0.44240005D-03
+ 0.12000000D+03 0.12300000D+03 0.42845665D-01 0.35869431D-03
+ 0.12300000D+03 0.12600000D+03 0.40627865D-01 0.33096855D-03
+ 0.12600000D+03 0.12900000D+03 0.37941292D-01 0.22893913D-03
+ 0.12900000D+03 0.13200000D+03 0.36031497D-01 0.26881424D-03
+ 0.13200000D+03 0.13500000D+03 0.33885521D-01 0.28748683D-03
+ 0.13500000D+03 0.13800000D+03 0.32054394D-01 0.23439367D-03
+ 0.13800000D+03 0.14100000D+03 0.29932880D-01 0.29170349D-03
+ 0.14100000D+03 0.14400000D+03 0.28527101D-01 0.75456827D-03
+ 0.14400000D+03 0.14700000D+03 0.27647377D-01 0.73902526D-03
+ 0.14700000D+03 0.15000000D+03 0.25419642D-01 0.44831067D-03
+ 0.15000000D+03 0.15300000D+03 0.24622881D-01 0.42903594D-03
+ 0.15300000D+03 0.15600000D+03 0.23561392D-01 0.23461043D-03
+ 0.15600000D+03 0.15900000D+03 0.21682916D-01 0.25832213D-03
+ 0.15900000D+03 0.16200000D+03 0.20570633D-01 0.22818777D-03
+ 0.16200000D+03 0.16500000D+03 0.19763979D-01 0.15439785D-03
+ 0.16500000D+03 0.16800000D+03 0.19198434D-01 0.47473408D-03
+ 0.16800000D+03 0.17100000D+03 0.17169712D-01 0.47956272D-03
+ 0.17100000D+03 0.17400000D+03 0.16551891D-01 0.25120850D-03
+ 0.17400000D+03 0.17700000D+03 0.15897815D-01 0.26674456D-03
+ 0.17700000D+03 0.18000000D+03 0.15323508D-01 0.17060548D-03
+ 0.18000000D+03 0.18300000D+03 0.14277250D-01 0.16264254D-03
+ 0.18300000D+03 0.18600000D+03 0.13905951D-01 0.16240612D-03
+ 0.18600000D+03 0.18900000D+03 0.12779729D-01 0.14445252D-03
+ 0.18900000D+03 0.19200000D+03 0.12620051D-01 0.13814976D-03
+ 0.19200000D+03 0.19500000D+03 0.11477694D-01 0.11507953D-03
+ 0.19500000D+03 0.19800000D+03 0.11238726D-01 0.12449944D-03
+ 0.19800000D+03 0.20100000D+03 0.10694537D-01 0.12252970D-03
+ 0.20100000D+03 0.20400000D+03 0.95527666D-02 0.57617247D-03
+ 0.20400000D+03 0.20700000D+03 0.10148277D-01 0.57597164D-03
+ 0.20700000D+03 0.21000000D+03 0.92064044D-02 0.11430615D-03
+ 0.21000000D+03 0.21300000D+03 0.86103522D-02 0.17022332D-03
+ 0.21300000D+03 0.21600000D+03 0.82671911D-02 0.15651562D-03
+ 0.21600000D+03 0.21900000D+03 0.75549707D-02 0.37786227D-03
+ 0.21900000D+03 0.22200000D+03 0.79596920D-02 0.37875855D-03
+ 0.22200000D+03 0.22500000D+03 0.69049370D-02 0.12598548D-03
+ 0.22500000D+03 0.22800000D+03 0.69057689D-02 0.12461359D-03
+ 0.22800000D+03 0.23100000D+03 0.66471572D-02 0.12670375D-03
+ 0.23100000D+03 0.23400000D+03 0.62159312D-02 0.19221298D-03
+ 0.23400000D+03 0.23700000D+03 0.59277648D-02 0.17684942D-03
+ 0.23700000D+03 0.24000000D+03 0.55134232D-02 0.96187543D-04
+ 0.24000000D+03 0.24300000D+03 0.54265565D-02 0.77096951D-04
+ 0.24300000D+03 0.24600000D+03 0.50497196D-02 0.88410819D-04
+ 0.24600000D+03 0.24900000D+03 0.48604634D-02 0.93632372D-04
+ 0.24900000D+03 0.25200000D+03 0.46422630D-02 0.81554012D-04
+ 0.25200000D+03 0.25500000D+03 0.44684470D-02 0.77882983D-04
+ 0.25500000D+03 0.25800000D+03 0.42934592D-02 0.90187388D-04
+ 0.25800000D+03 0.26100000D+03 0.40170279D-02 0.77746254D-04
+ 0.26100000D+03 0.26400000D+03 0.40660588D-02 0.11603945D-03
+ 0.26400000D+03 0.26700000D+03 0.35551628D-02 0.13542000D-03
+ 0.26700000D+03 0.27000000D+03 0.33409126D-02 0.10998304D-03
+ 0.27000000D+03 0.27300000D+03 0.34734650D-02 0.10588882D-03
+ 0.27300000D+03 0.27600000D+03 0.31790024D-02 0.12263628D-03
+ 0.27600000D+03 0.27900000D+03 0.31150050D-02 0.10383121D-03
+ 0.27900000D+03 0.28200000D+03 0.29756164D-02 0.66374449D-04
+ 0.28200000D+03 0.28500000D+03 0.28502138D-02 0.83275680D-04
+ 0.28500000D+03 0.28800000D+03 0.26006261D-02 0.71129475D-04
+ 0.28800000D+03 0.29100000D+03 0.25651632D-02 0.47545133D-04
+ 0.29100000D+03 0.29400000D+03 0.24333653D-02 0.47533889D-04
+ 0.29400000D+03 0.29700000D+03 0.23096694D-02 0.46241812D-04
+ 0.29700000D+03 0.30000000D+03 0.22235879D-02 0.51499120D-04
+
+
+# pth-hfact-3 index  14
+ 0.00000000D+00 0.30000000D+01 -.12411769D+01 0.56216525D-02
+ 0.30000000D+01 0.60000000D+01 0.55257584D-01 0.23649837D-02
+ 0.60000000D+01 0.90000000D+01 0.14358517D+01 0.20445585D-02
+ 0.90000000D+01 0.12000000D+02 0.13426057D+01 0.19642125D-02
+ 0.12000000D+02 0.15000000D+02 0.11314978D+01 0.17399012D-02
+ 0.15000000D+02 0.18000000D+02 0.94587138D+00 0.13216395D-02
+ 0.18000000D+02 0.21000000D+02 0.79746145D+00 0.16127972D-02
+ 0.21000000D+02 0.24000000D+02 0.67098433D+00 0.16267273D-02
+ 0.24000000D+02 0.27000000D+02 0.57987899D+00 0.10806957D-02
+ 0.27000000D+02 0.30000000D+02 0.50165203D+00 0.93758462D-03
+ 0.30000000D+02 0.33000000D+02 0.43618547D+00 0.82697782D-03
+ 0.33000000D+02 0.36000000D+02 0.38354835D+00 0.75144933D-03
+ 0.36000000D+02 0.39000000D+02 0.33841943D+00 0.59144263D-03
+ 0.39000000D+02 0.42000000D+02 0.30071972D+00 0.60751171D-03
+ 0.42000000D+02 0.45000000D+02 0.26812736D+00 0.59664986D-03
+ 0.45000000D+02 0.48000000D+02 0.23967158D+00 0.96632096D-03
+ 0.48000000D+02 0.51000000D+02 0.21375784D+00 0.99766014D-03
+ 0.51000000D+02 0.54000000D+02 0.19469208D+00 0.62896921D-03
+ 0.54000000D+02 0.57000000D+02 0.17424738D+00 0.54861520D-03
+ 0.57000000D+02 0.60000000D+02 0.15660583D+00 0.43450152D-03
+ 0.60000000D+02 0.63000000D+02 0.14307445D+00 0.40384712D-03
+ 0.63000000D+02 0.66000000D+02 0.12930532D+00 0.39704595D-03
+ 0.66000000D+02 0.69000000D+02 0.11751158D+00 0.50211618D-03
+ 0.69000000D+02 0.72000000D+02 0.10689964D+00 0.50053710D-03
+ 0.72000000D+02 0.75000000D+02 0.96908987D-01 0.37729231D-03
+ 0.75000000D+02 0.78000000D+02 0.88867530D-01 0.33204928D-03
+ 0.78000000D+02 0.81000000D+02 0.81156553D-01 0.27052614D-03
+ 0.81000000D+02 0.84000000D+02 0.73676841D-01 0.27886666D-03
+ 0.84000000D+02 0.87000000D+02 0.67810985D-01 0.26924352D-03
+ 0.87000000D+02 0.90000000D+02 0.61567223D-01 0.23327323D-03
+ 0.90000000D+02 0.93000000D+02 0.56688353D-01 0.26723430D-03
+ 0.93000000D+02 0.96000000D+02 0.51820337D-01 0.26533276D-03
+ 0.96000000D+02 0.99000000D+02 0.47599828D-01 0.21977355D-03
+ 0.99000000D+02 0.10200000D+03 0.43747811D-01 0.21455316D-03
+ 0.10200000D+03 0.10500000D+03 0.40172496D-01 0.17949241D-03
+ 0.10500000D+03 0.10800000D+03 0.36916972D-01 0.23999146D-03
+ 0.10800000D+03 0.11100000D+03 0.33910056D-01 0.23118271D-03
+ 0.11100000D+03 0.11400000D+03 0.31171645D-01 0.14568476D-03
+ 0.11400000D+03 0.11700000D+03 0.28501769D-01 0.25143720D-03
+ 0.11700000D+03 0.12000000D+03 0.26863510D-01 0.25917807D-03
+ 0.12000000D+03 0.12300000D+03 0.24441532D-01 0.20402146D-03
+ 0.12300000D+03 0.12600000D+03 0.22687279D-01 0.18577981D-03
+ 0.12600000D+03 0.12900000D+03 0.20739881D-01 0.12526046D-03
+ 0.12900000D+03 0.13200000D+03 0.19279585D-01 0.14332276D-03
+ 0.13200000D+03 0.13500000D+03 0.17748457D-01 0.15086184D-03
+ 0.13500000D+03 0.13800000D+03 0.16434447D-01 0.12049349D-03
+ 0.13800000D+03 0.14100000D+03 0.15024695D-01 0.14557234D-03
+ 0.14100000D+03 0.14400000D+03 0.14018344D-01 0.36757814D-03
+ 0.14400000D+03 0.14700000D+03 0.13297384D-01 0.35853267D-03
+ 0.14700000D+03 0.15000000D+03 0.11965803D-01 0.20966609D-03
+ 0.15000000D+03 0.15300000D+03 0.11346088D-01 0.19915338D-03
+ 0.15300000D+03 0.15600000D+03 0.10624592D-01 0.10564161D-03
+ 0.15600000D+03 0.15900000D+03 0.95704564D-02 0.11397017D-03
+ 0.15900000D+03 0.16200000D+03 0.88898855D-02 0.98999874D-04
+ 0.16200000D+03 0.16500000D+03 0.83618457D-02 0.65590076D-04
+ 0.16500000D+03 0.16800000D+03 0.79498005D-02 0.19471254D-03
+ 0.16800000D+03 0.17100000D+03 0.69614597D-02 0.19632334D-03
+ 0.17100000D+03 0.17400000D+03 0.65738690D-02 0.99065532D-04
+ 0.17400000D+03 0.17700000D+03 0.61850021D-02 0.10424540D-03
+ 0.17700000D+03 0.18000000D+03 0.58379798D-02 0.65179906D-04
+ 0.18000000D+03 0.18300000D+03 0.53271986D-02 0.60515891D-04
+ 0.18300000D+03 0.18600000D+03 0.50820240D-02 0.59528764D-04
+ 0.18600000D+03 0.18900000D+03 0.45749440D-02 0.51648927D-04
+ 0.18900000D+03 0.19200000D+03 0.44261096D-02 0.48562295D-04
+ 0.19200000D+03 0.19500000D+03 0.39435226D-02 0.39579787D-04
+ 0.19500000D+03 0.19800000D+03 0.37844220D-02 0.41831140D-04
+ 0.19800000D+03 0.20100000D+03 0.35289817D-02 0.40534290D-04
+ 0.20100000D+03 0.20400000D+03 0.30910890D-02 0.18456743D-03
+ 0.20400000D+03 0.20700000D+03 0.32183345D-02 0.18432770D-03
+ 0.20700000D+03 0.21000000D+03 0.28604381D-02 0.35416512D-04
+ 0.21000000D+03 0.21300000D+03 0.26230386D-02 0.51659671D-04
+ 0.21300000D+03 0.21600000D+03 0.24697006D-02 0.47058937D-04
+ 0.21600000D+03 0.21900000D+03 0.22142849D-02 0.10970144D-03
+ 0.21900000D+03 0.22200000D+03 0.22875078D-02 0.10981436D-03
+ 0.22200000D+03 0.22500000D+03 0.19461369D-02 0.35348431D-04
+ 0.22500000D+03 0.22800000D+03 0.19097579D-02 0.34606142D-04
+ 0.22800000D+03 0.23100000D+03 0.18028391D-02 0.34202343D-04
+ 0.23100000D+03 0.23400000D+03 0.16536767D-02 0.50980939D-04
+ 0.23400000D+03 0.23700000D+03 0.15473265D-02 0.46436586D-04
+ 0.23700000D+03 0.24000000D+03 0.14125111D-02 0.24745535D-04
+ 0.24000000D+03 0.24300000D+03 0.13647510D-02 0.19371687D-04
+ 0.24300000D+03 0.24600000D+03 0.12468639D-02 0.21795977D-04
+ 0.24600000D+03 0.24900000D+03 0.11783559D-02 0.22700210D-04
+ 0.24900000D+03 0.25200000D+03 0.11050642D-02 0.19462566D-04
+ 0.25200000D+03 0.25500000D+03 0.10446302D-02 0.18168280D-04
+ 0.25500000D+03 0.25800000D+03 0.98560042D-03 0.20684955D-04
+ 0.25800000D+03 0.26100000D+03 0.90566268D-03 0.17603935D-04
+ 0.26100000D+03 0.26400000D+03 0.90001947D-03 0.25515948D-04
+ 0.26400000D+03 0.26700000D+03 0.77290065D-03 0.29544156D-04
+ 0.26700000D+03 0.27000000D+03 0.71416966D-03 0.23518878D-04
+ 0.27000000D+03 0.27300000D+03 0.72987195D-03 0.22244099D-04
+ 0.27300000D+03 0.27600000D+03 0.65645734D-03 0.25257249D-04
+ 0.27600000D+03 0.27900000D+03 0.63219625D-03 0.21202270D-04
+ 0.27900000D+03 0.28200000D+03 0.59335379D-03 0.13188730D-04
+ 0.28200000D+03 0.28500000D+03 0.55864334D-03 0.16312346D-04
+ 0.28500000D+03 0.28800000D+03 0.50118316D-03 0.13769754D-04
+ 0.28800000D+03 0.29100000D+03 0.48623043D-03 0.90204168D-05
+ 0.29100000D+03 0.29400000D+03 0.45358110D-03 0.88536752D-05
+ 0.29400000D+03 0.29700000D+03 0.42340636D-03 0.84883456D-05
+ 0.29700000D+03 0.30000000D+03 0.40097545D-03 0.92623086D-05
+
+
+# HT index  15
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.00000000D+00 0.00000000D+00
+ 0.12500000D+03 0.13000000D+03 0.00000000D+00 0.00000000D+00
+ 0.13000000D+03 0.13500000D+03 0.00000000D+00 0.00000000D+00
+ 0.13500000D+03 0.14000000D+03 0.33476501D+01 0.71480840D-03
+ 0.14000000D+03 0.14500000D+03 -.98043658D+01 0.37185536D-02
+ 0.14500000D+03 0.15000000D+03 0.31521526D+01 0.23111569D-02
+ 0.15000000D+03 0.15500000D+03 0.20422137D+01 0.17301753D-02
+ 0.15500000D+03 0.16000000D+03 0.13941054D+01 0.15629302D-02
+ 0.16000000D+03 0.16500000D+03 0.10187627D+01 0.13260549D-02
+ 0.16500000D+03 0.17000000D+03 0.77488583D+00 0.12629657D-02
+ 0.17000000D+03 0.17500000D+03 0.61517948D+00 0.11983339D-02
+ 0.17500000D+03 0.18000000D+03 0.49794157D+00 0.10655400D-02
+ 0.18000000D+03 0.18500000D+03 0.41585425D+00 0.98172321D-03
+ 0.18500000D+03 0.19000000D+03 0.34959486D+00 0.86108551D-03
+ 0.19000000D+03 0.19500000D+03 0.29919079D+00 0.90990612D-03
+ 0.19500000D+03 0.20000000D+03 0.25924263D+00 0.86520969D-03
+ 0.20000000D+03 0.20500000D+03 0.22580233D+00 0.80103136D-03
+ 0.20500000D+03 0.21000000D+03 0.19997169D+00 0.76289866D-03
+ 0.21000000D+03 0.21500000D+03 0.17666144D+00 0.65712212D-03
+ 0.21500000D+03 0.22000000D+03 0.15794774D+00 0.56922800D-03
+ 0.22000000D+03 0.22500000D+03 0.14041332D+00 0.66099610D-03
+ 0.22500000D+03 0.23000000D+03 0.12862051D+00 0.63244048D-03
+ 0.23000000D+03 0.23500000D+03 0.11495058D+00 0.61272711D-03
+ 0.23500000D+03 0.24000000D+03 0.10639264D+00 0.57864983D-03
+ 0.24000000D+03 0.24500000D+03 0.95337634D-01 0.41392920D-03
+ 0.24500000D+03 0.25000000D+03 0.87897473D-01 0.45647337D-03
+ 0.25000000D+03 0.25500000D+03 0.81131630D-01 0.41316032D-03
+ 0.25500000D+03 0.26000000D+03 0.73781205D-01 0.37616852D-03
+ 0.26000000D+03 0.26500000D+03 0.68769422D-01 0.37391508D-03
+ 0.26500000D+03 0.27000000D+03 0.63027768D-01 0.36966332D-03
+ 0.27000000D+03 0.27500000D+03 0.59258079D-01 0.36370382D-03
+ 0.27500000D+03 0.28000000D+03 0.54270830D-01 0.30825659D-03
+ 0.28000000D+03 0.28500000D+03 0.50532185D-01 0.36147630D-03
+ 0.28500000D+03 0.29000000D+03 0.46937237D-01 0.41826566D-03
+ 0.29000000D+03 0.29500000D+03 0.43851794D-01 0.58997446D-03
+ 0.29500000D+03 0.30000000D+03 0.41991351D-01 0.62567119D-03
+ 0.30000000D+03 0.30500000D+03 0.39007033D-01 0.44274205D-03
+ 0.30500000D+03 0.31000000D+03 0.36232908D-01 0.32170588D-03
+ 0.31000000D+03 0.31500000D+03 0.33573379D-01 0.32782572D-03
+ 0.31500000D+03 0.32000000D+03 0.32284760D-01 0.32197318D-03
+ 0.32000000D+03 0.32500000D+03 0.29937558D-01 0.32343020D-03
+ 0.32500000D+03 0.33000000D+03 0.28611926D-01 0.32140229D-03
+ 0.33000000D+03 0.33500000D+03 0.26955297D-01 0.24189529D-03
+ 0.33500000D+03 0.34000000D+03 0.25271226D-01 0.20986046D-03
+ 0.34000000D+03 0.34500000D+03 0.23878421D-01 0.19596412D-03
+ 0.34500000D+03 0.35000000D+03 0.22302858D-01 0.22888693D-03
+ 0.35000000D+03 0.35500000D+03 0.20990663D-01 0.36666709D-03
+ 0.35500000D+03 0.36000000D+03 0.20891751D-01 0.34756406D-03
+ 0.36000000D+03 0.36500000D+03 0.19320655D-01 0.20116029D-03
+ 0.36500000D+03 0.37000000D+03 0.17954277D-01 0.22496690D-03
+ 0.37000000D+03 0.37500000D+03 0.17560672D-01 0.21636168D-03
+ 0.37500000D+03 0.38000000D+03 0.16539735D-01 0.16577909D-03
+ 0.38000000D+03 0.38500000D+03 0.15343753D-01 0.21287143D-03
+ 0.38500000D+03 0.39000000D+03 0.14997483D-01 0.23337675D-03
+ 0.39000000D+03 0.39500000D+03 0.13584781D-01 0.40946750D-03
+ 0.39500000D+03 0.40000000D+03 0.14010859D-01 0.40802984D-03
+ 0.40000000D+03 0.40500000D+03 0.12858741D-01 0.18457328D-03
+ 0.40500000D+03 0.41000000D+03 0.12300901D-01 0.16251289D-03
+ 0.41000000D+03 0.41500000D+03 0.11377871D-01 0.31421475D-03
+ 0.41500000D+03 0.42000000D+03 0.11300621D-01 0.35574756D-03
+ 0.42000000D+03 0.42500000D+03 0.10697188D-01 0.25105718D-03
+ 0.42500000D+03 0.43000000D+03 0.10270367D-01 0.17369333D-03
+ 0.43000000D+03 0.43500000D+03 0.91713537D-02 0.30387876D-03
+ 0.43500000D+03 0.44000000D+03 0.96279586D-02 0.31666554D-03
+ 0.44000000D+03 0.44500000D+03 0.87888349D-02 0.17025777D-03
+ 0.44500000D+03 0.45000000D+03 0.81678017D-02 0.34244427D-03
+ 0.45000000D+03 0.45500000D+03 0.86012302D-02 0.33080640D-03
+ 0.45500000D+03 0.46000000D+03 0.76666731D-02 0.11681013D-03
+ 0.46000000D+03 0.46500000D+03 0.74498664D-02 0.17872520D-03
+ 0.46500000D+03 0.47000000D+03 0.70237818D-02 0.18819442D-03
+ 0.47000000D+03 0.47500000D+03 0.69926287D-02 0.13090764D-03
+ 0.47500000D+03 0.48000000D+03 0.64390848D-02 0.11646802D-03
+ 0.48000000D+03 0.48500000D+03 0.62116029D-02 0.12227131D-03
+ 0.48500000D+03 0.49000000D+03 0.60201939D-02 0.13498701D-03
+ 0.49000000D+03 0.49500000D+03 0.58113104D-02 0.13487247D-03
+ 0.49500000D+03 0.50000000D+03 0.54816014D-02 0.13232420D-03
+ 0.50000000D+03 0.50500000D+03 0.53532535D-02 0.16459368D-03
+ 0.50500000D+03 0.51000000D+03 0.52532113D-02 0.13807943D-03
+ 0.51000000D+03 0.51500000D+03 0.47176685D-02 0.11754151D-03
+ 0.51500000D+03 0.52000000D+03 0.47551411D-02 0.13057056D-03
+ 0.52000000D+03 0.52500000D+03 0.44791386D-02 0.12303940D-03
+ 0.52500000D+03 0.53000000D+03 0.44179273D-02 0.13361087D-03
+ 0.53000000D+03 0.53500000D+03 0.43204572D-02 0.10550443D-03
+ 0.53500000D+03 0.54000000D+03 0.38606707D-02 0.85009491D-04
+ 0.54000000D+03 0.54500000D+03 0.39838813D-02 0.10386868D-03
+ 0.54500000D+03 0.55000000D+03 0.37963288D-02 0.88304649D-04
+ 0.55000000D+03 0.55500000D+03 0.34653902D-02 0.75288512D-04
+ 0.55500000D+03 0.56000000D+03 0.34054808D-02 0.15519280D-03
+ 0.56000000D+03 0.56500000D+03 0.33327418D-02 0.15201242D-03
+ 0.56500000D+03 0.57000000D+03 0.33412497D-02 0.74990350D-04
+ 0.57000000D+03 0.57500000D+03 0.30329816D-02 0.76052448D-04
+ 0.57500000D+03 0.58000000D+03 0.20965121D-02 0.89177605D-03
+ 0.58000000D+03 0.58500000D+03 0.37888865D-02 0.89077881D-03
+ 0.58500000D+03 0.59000000D+03 0.26781499D-02 0.97799382D-04
+ 0.59000000D+03 0.59500000D+03 0.27774822D-02 0.95690950D-04
+ 0.59500000D+03 0.60000000D+03 0.25787340D-02 0.59085987D-04
+
+
+# HT-hfact-2 index  16
+ 0.10000000D+03 0.10500000D+03 0.00000000D+00 0.00000000D+00
+ 0.10500000D+03 0.11000000D+03 0.00000000D+00 0.00000000D+00
+ 0.11000000D+03 0.11500000D+03 0.00000000D+00 0.00000000D+00
+ 0.11500000D+03 0.12000000D+03 0.00000000D+00 0.00000000D+00
+ 0.12000000D+03 0.12500000D+03 0.00000000D+00 0.00000000D+00
+ 0.12500000D+03 0.13000000D+03 0.00000000D+00 0.00000000D+00
+ 0.13000000D+03 0.13500000D+03 0.00000000D+00 0.00000000D+00
+ 0.13500000D+03 0.14000000D+03 0.33476501D+01 0.71480840D-03
+ 0.14000000D+03 0.14500000D+03 -.98043113D+01 0.37173020D-02
+ 0.14500000D+03 0.15000000D+03 0.31432020D+01 0.23052335D-02
+ 0.15000000D+03 0.15500000D+03 0.20262927D+01 0.17170457D-02
+ 0.15500000D+03 0.16000000D+03 0.13728753D+01 0.15384758D-02
+ 0.16000000D+03 0.16500000D+03 0.99328665D+00 0.12947181D-02
+ 0.16500000D+03 0.17000000D+03 0.74624014D+00 0.12138989D-02
+ 0.17000000D+03 0.17500000D+03 0.58384708D+00 0.11398197D-02
+ 0.17500000D+03 0.18000000D+03 0.46471550D+00 0.99298718D-03
+ 0.18000000D+03 0.18500000D+03 0.38086036D+00 0.90129233D-03
+ 0.18500000D+03 0.19000000D+03 0.31357389D+00 0.77162223D-03
+ 0.19000000D+03 0.19500000D+03 0.26237053D+00 0.79729168D-03
+ 0.19500000D+03 0.20000000D+03 0.22187293D+00 0.74162472D-03
+ 0.20000000D+03 0.20500000D+03 0.18832223D+00 0.66769593D-03
+ 0.20500000D+03 0.21000000D+03 0.16229034D+00 0.62002882D-03
+ 0.21000000D+03 0.21500000D+03 0.13933183D+00 0.51979110D-03
+ 0.21500000D+03 0.22000000D+03 0.12091651D+00 0.43607330D-03
+ 0.22000000D+03 0.22500000D+03 0.10425177D+00 0.48835854D-03
+ 0.22500000D+03 0.23000000D+03 0.92520348D-01 0.45798276D-03
+ 0.23000000D+03 0.23500000D+03 0.80039982D-01 0.42391549D-03
+ 0.23500000D+03 0.24000000D+03 0.71662751D-01 0.39315546D-03
+ 0.24000000D+03 0.24500000D+03 0.62077685D-01 0.26908315D-03
+ 0.24500000D+03 0.25000000D+03 0.55310475D-01 0.28686115D-03
+ 0.25000000D+03 0.25500000D+03 0.49301898D-01 0.25244662D-03
+ 0.25500000D+03 0.26000000D+03 0.43292963D-01 0.22000758D-03
+ 0.26000000D+03 0.26500000D+03 0.38953145D-01 0.21271693D-03
+ 0.26500000D+03 0.27000000D+03 0.34459259D-01 0.20129177D-03
+ 0.27000000D+03 0.27500000D+03 0.31261744D-01 0.19279914D-03
+ 0.27500000D+03 0.28000000D+03 0.27625816D-01 0.15700071D-03
+ 0.28000000D+03 0.28500000D+03 0.24825201D-01 0.17661386D-03
+ 0.28500000D+03 0.29000000D+03 0.22251095D-01 0.19828534D-03
+ 0.29000000D+03 0.29500000D+03 0.20068789D-01 0.26752195D-03
+ 0.29500000D+03 0.30000000D+03 0.18542779D-01 0.27778009D-03
+ 0.30000000D+03 0.30500000D+03 0.16620569D-01 0.18980157D-03
+ 0.30500000D+03 0.31000000D+03 0.14900486D-01 0.13293019D-03
+ 0.31000000D+03 0.31500000D+03 0.13335007D-01 0.12959261D-03
+ 0.31500000D+03 0.32000000D+03 0.12378896D-01 0.12445508D-03
+ 0.32000000D+03 0.32500000D+03 0.11093289D-01 0.11911195D-03
+ 0.32500000D+03 0.33000000D+03 0.10243134D-01 0.11580251D-03
+ 0.33000000D+03 0.33500000D+03 0.93249950D-02 0.83892691D-04
+ 0.33500000D+03 0.34000000D+03 0.84498535D-02 0.70367733D-04
+ 0.34000000D+03 0.34500000D+03 0.77219592D-02 0.63379781D-04
+ 0.34500000D+03 0.35000000D+03 0.69770825D-02 0.71306143D-04
+ 0.35000000D+03 0.35500000D+03 0.63576212D-02 0.11011014D-03
+ 0.35500000D+03 0.36000000D+03 0.61236298D-02 0.10291228D-03
+ 0.36000000D+03 0.36500000D+03 0.54796136D-02 0.57110085D-04
+ 0.36500000D+03 0.37000000D+03 0.49324020D-02 0.61588916D-04
+ 0.37000000D+03 0.37500000D+03 0.46723394D-02 0.57876947D-04
+ 0.37500000D+03 0.38000000D+03 0.42644404D-02 0.42866432D-04
+ 0.38000000D+03 0.38500000D+03 0.38361954D-02 0.52822676D-04
+ 0.38500000D+03 0.39000000D+03 0.36356756D-02 0.56798301D-04
+ 0.39000000D+03 0.39500000D+03 0.31970853D-02 0.95203766D-04
+ 0.39500000D+03 0.40000000D+03 0.31987643D-02 0.94147984D-04
+ 0.40000000D+03 0.40500000D+03 0.28480650D-02 0.41014874D-04
+ 0.40500000D+03 0.41000000D+03 0.26445012D-02 0.34962719D-04
+ 0.41000000D+03 0.41500000D+03 0.23770884D-02 0.64924426D-04
+ 0.41500000D+03 0.42000000D+03 0.22935998D-02 0.72562046D-04
+ 0.42000000D+03 0.42500000D+03 0.21095391D-02 0.49684775D-04
+ 0.42500000D+03 0.43000000D+03 0.19684624D-02 0.33535752D-04
+ 0.43000000D+03 0.43500000D+03 0.17105087D-02 0.55992131D-04
+ 0.43500000D+03 0.44000000D+03 0.17469365D-02 0.57979078D-04
+ 0.44000000D+03 0.44500000D+03 0.15508370D-02 0.30053763D-04
+ 0.44500000D+03 0.45000000D+03 0.14036460D-02 0.58234681D-04
+ 0.45000000D+03 0.45500000D+03 0.14380764D-02 0.55926454D-04
+ 0.45500000D+03 0.46000000D+03 0.12480632D-02 0.18986405D-04
+ 0.46000000D+03 0.46500000D+03 0.11813820D-02 0.28150013D-04
+ 0.46500000D+03 0.47000000D+03 0.10851913D-02 0.29223213D-04
+ 0.47000000D+03 0.47500000D+03 0.10529665D-02 0.19800050D-04
+ 0.47500000D+03 0.48000000D+03 0.94526599D-03 0.17070605D-04
+ 0.48000000D+03 0.48500000D+03 0.88955744D-03 0.17522032D-04
+ 0.48500000D+03 0.49000000D+03 0.84076914D-03 0.18800912D-04
+ 0.49000000D+03 0.49500000D+03 0.79190729D-03 0.18428658D-04
+ 0.49500000D+03 0.50000000D+03 0.72885906D-03 0.17552551D-04
+ 0.50000000D+03 0.50500000D+03 0.69490683D-03 0.21311189D-04
+ 0.50500000D+03 0.51000000D+03 0.66559411D-03 0.17647096D-04
+ 0.51000000D+03 0.51500000D+03 0.58376335D-03 0.14443981D-04
+ 0.51500000D+03 0.52000000D+03 0.57512465D-03 0.15846359D-04
+ 0.52000000D+03 0.52500000D+03 0.52924765D-03 0.14500696D-04
+ 0.52500000D+03 0.53000000D+03 0.51008278D-03 0.15433864D-04
+ 0.53000000D+03 0.53500000D+03 0.48749801D-03 0.11975963D-04
+ 0.53500000D+03 0.54000000D+03 0.42601246D-03 0.93565768D-05
+ 0.54000000D+03 0.54500000D+03 0.42987914D-03 0.11196633D-04
+ 0.54500000D+03 0.55000000D+03 0.40056038D-03 0.93787870D-05
+ 0.55000000D+03 0.55500000D+03 0.35789849D-03 0.77426113D-05
+ 0.55500000D+03 0.56000000D+03 0.34426531D-03 0.15576796D-04
+ 0.56000000D+03 0.56500000D+03 0.32982772D-03 0.15159169D-04
+ 0.56500000D+03 0.57000000D+03 0.32358590D-03 0.72661165D-05
+ 0.57000000D+03 0.57500000D+03 0.28757630D-03 0.72089386D-05
+ 0.57500000D+03 0.58000000D+03 0.19553610D-03 0.82030136D-04
+ 0.58000000D+03 0.58500000D+03 0.34545449D-03 0.81884299D-04
+ 0.58500000D+03 0.59000000D+03 0.23874194D-03 0.86750939D-05
+ 0.59000000D+03 0.59500000D+03 0.24263745D-03 0.84119340D-05
+ 0.59500000D+03 0.60000000D+03 0.22066095D-03 0.50516561D-05
+
+
+# ptj1 index  17
+ 0.00000000D+00 0.30000000D+01 0.21714802D+00 0.56601447D-02
+ 0.30000000D+01 0.60000000D+01 -.35662951D+00 0.25541069D-02
+ 0.60000000D+01 0.90000000D+01 0.12550641D+01 0.21528355D-02
+ 0.90000000D+01 0.12000000D+02 0.12269732D+01 0.19516187D-02
+ 0.12000000D+02 0.15000000D+02 0.10534549D+01 0.17354576D-02
+ 0.15000000D+02 0.18000000D+02 0.88858028D+00 0.14098701D-02
+ 0.18000000D+02 0.21000000D+02 0.75408310D+00 0.18834848D-02
+ 0.21000000D+02 0.24000000D+02 0.64844641D+00 0.19562021D-02
+ 0.24000000D+02 0.27000000D+02 0.56018929D+00 0.13340239D-02
+ 0.27000000D+02 0.30000000D+02 0.48761909D+00 0.11332305D-02
+ 0.30000000D+02 0.33000000D+02 0.43224207D+00 0.10567884D-02
+ 0.33000000D+02 0.36000000D+02 0.38084494D+00 0.10174551D-02
+ 0.36000000D+02 0.39000000D+02 0.33980362D+00 0.83719633D-03
+ 0.39000000D+02 0.42000000D+02 0.30580992D+00 0.82874724D-03
+ 0.42000000D+02 0.45000000D+02 0.27466049D+00 0.83467430D-03
+ 0.45000000D+02 0.48000000D+02 0.25009518D+00 0.11045454D-02
+ 0.48000000D+02 0.51000000D+02 0.22707336D+00 0.11155390D-02
+ 0.51000000D+02 0.54000000D+02 0.20567517D+00 0.10087397D-02
+ 0.54000000D+02 0.57000000D+02 0.18749860D+00 0.10585578D-02
+ 0.57000000D+02 0.60000000D+02 0.17388239D+00 0.94072264D-03
+ 0.60000000D+02 0.63000000D+02 0.15789468D+00 0.81492156D-03
+ 0.63000000D+02 0.66000000D+02 0.14634945D+00 0.71509071D-03
+ 0.66000000D+02 0.69000000D+02 0.13391281D+00 0.73999602D-03
+ 0.69000000D+02 0.72000000D+02 0.12432775D+00 0.87945356D-03
+ 0.72000000D+02 0.75000000D+02 0.11649191D+00 0.83012734D-03
+ 0.75000000D+02 0.78000000D+02 0.10617415D+00 0.62381440D-03
+ 0.78000000D+02 0.81000000D+02 0.97931636D-01 0.72886569D-03
+ 0.81000000D+02 0.84000000D+02 0.93060735D-01 0.70270382D-03
+ 0.84000000D+02 0.87000000D+02 0.85094119D-01 0.52644394D-03
+ 0.87000000D+02 0.90000000D+02 0.81146227D-01 0.51351762D-03
+ 0.90000000D+02 0.93000000D+02 0.74539042D-01 0.52738387D-03
+ 0.93000000D+02 0.96000000D+02 0.69284661D-01 0.53530624D-03
+ 0.96000000D+02 0.99000000D+02 0.65501761D-01 0.51038090D-03
+ 0.99000000D+02 0.10200000D+03 0.60253799D-01 0.54756266D-03
+ 0.10200000D+03 0.10500000D+03 0.56808327D-01 0.49158077D-03
+ 0.10500000D+03 0.10800000D+03 0.54301951D-01 0.39082079D-03
+ 0.10800000D+03 0.11100000D+03 0.49665611D-01 0.51081765D-03
+ 0.11100000D+03 0.11400000D+03 0.47851014D-01 0.47324647D-03
+ 0.11400000D+03 0.11700000D+03 0.44108324D-01 0.38175812D-03
+ 0.11700000D+03 0.12000000D+03 0.41410316D-01 0.39964284D-03
+ 0.12000000D+03 0.12300000D+03 0.39219308D-01 0.39913031D-03
+ 0.12300000D+03 0.12600000D+03 0.36583469D-01 0.38881835D-03
+ 0.12600000D+03 0.12900000D+03 0.34950463D-01 0.32233357D-03
+ 0.12900000D+03 0.13200000D+03 0.32837749D-01 0.31957217D-03
+ 0.13200000D+03 0.13500000D+03 0.30217163D-01 0.56997624D-03
+ 0.13500000D+03 0.13800000D+03 0.30115321D-01 0.55946930D-03
+ 0.13800000D+03 0.14100000D+03 0.27867391D-01 0.28528855D-03
+ 0.14100000D+03 0.14400000D+03 0.26757039D-01 0.72866641D-03
+ 0.14400000D+03 0.14700000D+03 0.23917812D-01 0.74027560D-03
+ 0.14700000D+03 0.15000000D+03 0.23631657D-01 0.36618271D-03
+ 0.15000000D+03 0.15300000D+03 0.21611225D-01 0.35260838D-03
+ 0.15300000D+03 0.15600000D+03 0.21052219D-01 0.27807661D-03
+ 0.15600000D+03 0.15900000D+03 0.20756383D-01 0.59028324D-03
+ 0.15900000D+03 0.16200000D+03 0.18002251D-01 0.58392593D-03
+ 0.16200000D+03 0.16500000D+03 0.17864069D-01 0.22671146D-03
+ 0.16500000D+03 0.16800000D+03 0.16550612D-01 0.47202378D-03
+ 0.16800000D+03 0.17100000D+03 0.16397368D-01 0.48498765D-03
+ 0.17100000D+03 0.17400000D+03 0.15349424D-01 0.38166434D-03
+ 0.17400000D+03 0.17700000D+03 0.14161136D-01 0.47630731D-03
+ 0.17700000D+03 0.18000000D+03 0.13854705D-01 0.37196235D-03
+ 0.18000000D+03 0.18300000D+03 0.13056993D-01 0.21358608D-03
+ 0.18300000D+03 0.18600000D+03 0.11935128D-01 0.20199474D-03
+ 0.18600000D+03 0.18900000D+03 0.11888489D-01 0.19685194D-03
+ 0.18900000D+03 0.19200000D+03 0.10691090D-01 0.22405828D-03
+ 0.19200000D+03 0.19500000D+03 0.10968041D-01 0.20927665D-03
+ 0.19500000D+03 0.19800000D+03 0.99917880D-02 0.20091131D-03
+ 0.19800000D+03 0.20100000D+03 0.94063818D-02 0.18531092D-03
+ 0.20100000D+03 0.20400000D+03 0.93270058D-02 0.30874321D-03
+ 0.20400000D+03 0.20700000D+03 0.86781576D-02 0.33899712D-03
+ 0.20700000D+03 0.21000000D+03 0.77164389D-02 0.32605195D-03
+ 0.21000000D+03 0.21300000D+03 0.82402258D-02 0.35432910D-03
+ 0.21300000D+03 0.21600000D+03 0.73042087D-02 0.27314512D-03
+ 0.21600000D+03 0.21900000D+03 0.71152154D-02 0.20434107D-03
+ 0.21900000D+03 0.22200000D+03 0.63782395D-02 0.19400453D-03
+ 0.22200000D+03 0.22500000D+03 0.65882609D-02 0.21863446D-03
+ 0.22500000D+03 0.22800000D+03 0.61602169D-02 0.19014629D-03
+ 0.22800000D+03 0.23100000D+03 0.51305572D-02 0.68790049D-03
+ 0.23100000D+03 0.23400000D+03 0.60087738D-02 0.70047363D-03
+ 0.23400000D+03 0.23700000D+03 0.51993557D-02 0.18327953D-03
+ 0.23700000D+03 0.24000000D+03 0.51110572D-02 0.13129151D-03
+ 0.24000000D+03 0.24300000D+03 0.45890879D-02 0.15258007D-03
+ 0.24300000D+03 0.24600000D+03 0.46278731D-02 0.18926916D-03
+ 0.24600000D+03 0.24900000D+03 0.44347252D-02 0.23811987D-03
+ 0.24900000D+03 0.25200000D+03 0.41054486D-02 0.21015900D-03
+ 0.25200000D+03 0.25500000D+03 0.39620885D-02 0.14104100D-03
+ 0.25500000D+03 0.25800000D+03 0.36403235D-02 0.15192226D-03
+ 0.25800000D+03 0.26100000D+03 0.36429419D-02 0.12319154D-03
+ 0.26100000D+03 0.26400000D+03 0.32869095D-02 0.14074225D-03
+ 0.26400000D+03 0.26700000D+03 0.32986774D-02 0.14836243D-03
+ 0.26700000D+03 0.27000000D+03 0.31588984D-02 0.12730401D-03
+ 0.27000000D+03 0.27300000D+03 0.29545269D-02 0.12597617D-03
+ 0.27300000D+03 0.27600000D+03 0.27804036D-02 0.11248165D-03
+ 0.27600000D+03 0.27900000D+03 0.26004356D-02 0.11155472D-03
+ 0.27900000D+03 0.28200000D+03 0.26832057D-02 0.12971499D-03
+ 0.28200000D+03 0.28500000D+03 0.24295855D-02 0.13100251D-03
+ 0.28500000D+03 0.28800000D+03 0.23899512D-02 0.10316564D-03
+ 0.28800000D+03 0.29100000D+03 0.18081990D-02 0.37663832D-03
+ 0.29100000D+03 0.29400000D+03 0.25837515D-02 0.38570179D-03
+ 0.29400000D+03 0.29700000D+03 0.18933137D-02 0.13957421D-03
+ 0.29700000D+03 0.30000000D+03 0.19090389D-02 0.11819677D-03
+
+
+# ptj1-hfact-3 index  18
+ 0.00000000D+00 0.30000000D+01 0.21934800D+00 0.56596531D-02
+ 0.30000000D+01 0.60000000D+01 -.35672528D+00 0.25514781D-02
+ 0.60000000D+01 0.90000000D+01 0.12513886D+01 0.21467646D-02
+ 0.90000000D+01 0.12000000D+02 0.12201060D+01 0.19407037D-02
+ 0.12000000D+02 0.15000000D+02 0.10437681D+01 0.17198687D-02
+ 0.15000000D+02 0.18000000D+02 0.87643509D+00 0.13912587D-02
+ 0.18000000D+02 0.21000000D+02 0.73976577D+00 0.18442707D-02
+ 0.21000000D+02 0.24000000D+02 0.63214876D+00 0.19099105D-02
+ 0.24000000D+02 0.27000000D+02 0.54222432D+00 0.12913559D-02
+ 0.27000000D+02 0.30000000D+02 0.46823876D+00 0.10894389D-02
+ 0.30000000D+02 0.33000000D+02 0.41143573D+00 0.10048509D-02
+ 0.33000000D+02 0.36000000D+02 0.35905366D+00 0.96059477D-03
+ 0.36000000D+02 0.39000000D+02 0.31707797D+00 0.78123510D-03
+ 0.39000000D+02 0.42000000D+02 0.28221345D+00 0.76466138D-03
+ 0.42000000D+02 0.45000000D+02 0.25050089D+00 0.76117320D-03
+ 0.45000000D+02 0.48000000D+02 0.22526446D+00 0.99207051D-03
+ 0.48000000D+02 0.51000000D+02 0.20185155D+00 0.99421927D-03
+ 0.51000000D+02 0.54000000D+02 0.18032544D+00 0.88261893D-03
+ 0.54000000D+02 0.57000000D+02 0.16204883D+00 0.91590511D-03
+ 0.57000000D+02 0.60000000D+02 0.14805144D+00 0.80121192D-03
+ 0.60000000D+02 0.63000000D+02 0.13235960D+00 0.68447241D-03
+ 0.63000000D+02 0.66000000D+02 0.12073548D+00 0.58973798D-03
+ 0.66000000D+02 0.69000000D+02 0.10866588D+00 0.60029099D-03
+ 0.69000000D+02 0.72000000D+02 0.99194677D-01 0.70000864D-03
+ 0.72000000D+02 0.75000000D+02 0.91328972D-01 0.65302017D-03
+ 0.75000000D+02 0.78000000D+02 0.81767060D-01 0.48065885D-03
+ 0.78000000D+02 0.81000000D+02 0.74070464D-01 0.54956853D-03
+ 0.81000000D+02 0.84000000D+02 0.69091083D-01 0.52361865D-03
+ 0.84000000D+02 0.87000000D+02 0.61993556D-01 0.38359406D-03
+ 0.87000000D+02 0.90000000D+02 0.57987606D-01 0.36705934D-03
+ 0.90000000D+02 0.93000000D+02 0.52233168D-01 0.36923609D-03
+ 0.93000000D+02 0.96000000D+02 0.47603592D-01 0.36787007D-03
+ 0.96000000D+02 0.99000000D+02 0.44112015D-01 0.34394091D-03
+ 0.99000000D+02 0.10200000D+03 0.39769747D-01 0.36072608D-03
+ 0.10200000D+03 0.10500000D+03 0.36745023D-01 0.31927163D-03
+ 0.10500000D+03 0.10800000D+03 0.34402844D-01 0.24731826D-03
+ 0.10800000D+03 0.11100000D+03 0.30815827D-01 0.31588565D-03
+ 0.11100000D+03 0.11400000D+03 0.29079849D-01 0.28914207D-03
+ 0.11400000D+03 0.11700000D+03 0.26244398D-01 0.22655293D-03
+ 0.11700000D+03 0.12000000D+03 0.24126761D-01 0.23325468D-03
+ 0.12000000D+03 0.12300000D+03 0.22371851D-01 0.22727600D-03
+ 0.12300000D+03 0.12600000D+03 0.20432478D-01 0.21766109D-03
+ 0.12600000D+03 0.12900000D+03 0.19108727D-01 0.17650994D-03
+ 0.12900000D+03 0.13200000D+03 0.17574632D-01 0.17076672D-03
+ 0.13200000D+03 0.13500000D+03 0.15834535D-01 0.29653191D-03
+ 0.13500000D+03 0.13800000D+03 0.15444885D-01 0.28899231D-03
+ 0.13800000D+03 0.14100000D+03 0.13982862D-01 0.14332147D-03
+ 0.14100000D+03 0.14400000D+03 0.13137751D-01 0.35463570D-03
+ 0.14400000D+03 0.14700000D+03 0.11494798D-01 0.35897870D-03
+ 0.14700000D+03 0.15000000D+03 0.11120913D-01 0.17197547D-03
+ 0.15000000D+03 0.15300000D+03 0.99561709D-02 0.16291034D-03
+ 0.15300000D+03 0.15600000D+03 0.94949405D-02 0.12559645D-03
+ 0.15600000D+03 0.15900000D+03 0.91595552D-02 0.25832782D-03
+ 0.15900000D+03 0.16200000D+03 0.77762194D-02 0.25457279D-03
+ 0.16200000D+03 0.16500000D+03 0.75581865D-02 0.96014310D-04
+ 0.16500000D+03 0.16800000D+03 0.68569786D-02 0.19391198D-03
+ 0.16800000D+03 0.17100000D+03 0.66507798D-02 0.19806245D-03
+ 0.17100000D+03 0.17400000D+03 0.60953613D-02 0.15081369D-03
+ 0.17400000D+03 0.17700000D+03 0.55057466D-02 0.18516397D-03
+ 0.17700000D+03 0.18000000D+03 0.52759706D-02 0.14270912D-03
+ 0.18000000D+03 0.18300000D+03 0.48694270D-02 0.79572883D-04
+ 0.18300000D+03 0.18600000D+03 0.43608365D-02 0.74038539D-04
+ 0.18600000D+03 0.18900000D+03 0.42560907D-02 0.70297442D-04
+ 0.18900000D+03 0.19200000D+03 0.37499956D-02 0.78548071D-04
+ 0.19200000D+03 0.19500000D+03 0.37709135D-02 0.72062805D-04
+ 0.19500000D+03 0.19800000D+03 0.33646715D-02 0.67560646D-04
+ 0.19800000D+03 0.20100000D+03 0.31040427D-02 0.61345537D-04
+ 0.20100000D+03 0.20400000D+03 0.30162074D-02 0.99192692D-04
+ 0.20400000D+03 0.20700000D+03 0.27503617D-02 0.10793357D-03
+ 0.20700000D+03 0.21000000D+03 0.23986378D-02 0.10093209D-03
+ 0.21000000D+03 0.21300000D+03 0.25112543D-02 0.10816034D-03
+ 0.21300000D+03 0.21600000D+03 0.21813486D-02 0.81900311D-04
+ 0.21600000D+03 0.21900000D+03 0.20838307D-02 0.59926976D-04
+ 0.21900000D+03 0.22200000D+03 0.18330627D-02 0.55723890D-04
+ 0.22200000D+03 0.22500000D+03 0.18569151D-02 0.61511521D-04
+ 0.22500000D+03 0.22800000D+03 0.17026908D-02 0.52851575D-04
+ 0.22800000D+03 0.23100000D+03 0.13927409D-02 0.18486966D-03
+ 0.23100000D+03 0.23400000D+03 0.16007549D-02 0.18799059D-03
+ 0.23400000D+03 0.23700000D+03 0.13582191D-02 0.48049460D-04
+ 0.23700000D+03 0.24000000D+03 0.13104516D-02 0.33686231D-04
+ 0.24000000D+03 0.24300000D+03 0.11548685D-02 0.38259756D-04
+ 0.24300000D+03 0.24600000D+03 0.11433151D-02 0.46699181D-04
+ 0.24600000D+03 0.24900000D+03 0.10751517D-02 0.57553903D-04
+ 0.24900000D+03 0.25200000D+03 0.97735240D-03 0.50339481D-04
+ 0.25200000D+03 0.25500000D+03 0.92591698D-03 0.32854776D-04
+ 0.25500000D+03 0.25800000D+03 0.83551731D-03 0.34934360D-04
+ 0.25800000D+03 0.26100000D+03 0.82149041D-03 0.27836329D-04
+ 0.26100000D+03 0.26400000D+03 0.72828940D-03 0.31054700D-04
+ 0.26400000D+03 0.26700000D+03 0.71806771D-03 0.32354374D-04
+ 0.26700000D+03 0.27000000D+03 0.67556097D-03 0.27191453D-04
+ 0.27000000D+03 0.27300000D+03 0.62070714D-03 0.26478667D-04
+ 0.27300000D+03 0.27600000D+03 0.57383735D-03 0.23255797D-04
+ 0.27600000D+03 0.27900000D+03 0.52776349D-03 0.22604190D-04
+ 0.27900000D+03 0.28200000D+03 0.53541951D-03 0.25841696D-04
+ 0.28200000D+03 0.28500000D+03 0.47636576D-03 0.25708236D-04
+ 0.28500000D+03 0.28800000D+03 0.46057273D-03 0.19946350D-04
+ 0.28800000D+03 0.29100000D+03 0.34318405D-03 0.70842758D-04
+ 0.29100000D+03 0.29400000D+03 0.48192180D-03 0.72395953D-04
+ 0.29400000D+03 0.29700000D+03 0.34706381D-03 0.25604861D-04
+ 0.29700000D+03 0.30000000D+03 0.34441558D-03 0.21364453D-04
+
+
+# ptj2 index  19
+ 0.00000000D+00 0.30000000D+01 -.14665232D+02 0.56711199D-02
+ 0.30000000D+01 0.60000000D+01 0.13244406D+02 0.75386884D-03
+ 0.60000000D+01 0.90000000D+01 0.48531420D+01 0.29920913D-03
+ 0.90000000D+01 0.12000000D+02 0.24885939D+01 0.17863155D-03
+ 0.12000000D+02 0.15000000D+02 0.14939279D+01 0.11338653D-03
+ 0.15000000D+02 0.18000000D+02 0.98465184D+00 0.85177809D-04
+ 0.18000000D+02 0.21000000D+02 0.69056729D+00 0.60953816D-04
+ 0.21000000D+02 0.24000000D+02 0.50649991D+00 0.55817807D-04
+ 0.24000000D+02 0.27000000D+02 0.38410022D+00 0.37062758D-04
+ 0.27000000D+02 0.30000000D+02 0.29902545D+00 0.30356223D-04
+ 0.30000000D+02 0.33000000D+02 0.23780379D+00 0.25718113D-04
+ 0.33000000D+02 0.36000000D+02 0.19244373D+00 0.21993106D-04
+ 0.36000000D+02 0.39000000D+02 0.15794313D+00 0.18764917D-04
+ 0.39000000D+02 0.42000000D+02 0.13133224D+00 0.16072061D-04
+ 0.42000000D+02 0.45000000D+02 0.11031003D+00 0.13732494D-04
+ 0.45000000D+02 0.48000000D+02 0.93537386D-01 0.12345160D-04
+ 0.48000000D+02 0.51000000D+02 0.79995439D-01 0.10729306D-04
+ 0.51000000D+02 0.54000000D+02 0.68888002D-01 0.98749604D-05
+ 0.54000000D+02 0.57000000D+02 0.59733143D-01 0.88394716D-05
+ 0.57000000D+02 0.60000000D+02 0.52086215D-01 0.79091817D-05
+ 0.60000000D+02 0.63000000D+02 0.45656093D-01 0.70533640D-05
+ 0.63000000D+02 0.66000000D+02 0.40243662D-01 0.65983108D-05
+ 0.66000000D+02 0.69000000D+02 0.35602208D-01 0.58365188D-05
+ 0.69000000D+02 0.72000000D+02 0.31634922D-01 0.54188760D-05
+ 0.72000000D+02 0.75000000D+02 0.28216891D-01 0.47255100D-05
+ 0.75000000D+02 0.78000000D+02 0.25256663D-01 0.46634865D-05
+ 0.78000000D+02 0.81000000D+02 0.22686400D-01 0.40128111D-05
+ 0.81000000D+02 0.84000000D+02 0.20435231D-01 0.36936499D-05
+ 0.84000000D+02 0.87000000D+02 0.18464535D-01 0.34238294D-05
+ 0.87000000D+02 0.90000000D+02 0.16725829D-01 0.31797768D-05
+ 0.90000000D+02 0.93000000D+02 0.15186450D-01 0.30848672D-05
+ 0.93000000D+02 0.96000000D+02 0.13823380D-01 0.27858320D-05
+ 0.96000000D+02 0.99000000D+02 0.12614890D-01 0.25918826D-05
+ 0.99000000D+02 0.10200000D+03 0.11526332D-01 0.23426732D-05
+ 0.10200000D+03 0.10500000D+03 0.10561654D-01 0.22467023D-05
+ 0.10500000D+03 0.10800000D+03 0.96975263D-02 0.20531525D-05
+ 0.10800000D+03 0.11100000D+03 0.89139216D-02 0.21451132D-05
+ 0.11100000D+03 0.11400000D+03 0.82102903D-02 0.18438695D-05
+ 0.11400000D+03 0.11700000D+03 0.75760271D-02 0.17486252D-05
+ 0.11700000D+03 0.12000000D+03 0.70036917D-02 0.17723668D-05
+ 0.12000000D+03 0.12300000D+03 0.64787751D-02 0.15635801D-05
+ 0.12300000D+03 0.12600000D+03 0.60071937D-02 0.14613975D-05
+ 0.12600000D+03 0.12900000D+03 0.55728970D-02 0.13645093D-05
+ 0.12900000D+03 0.13200000D+03 0.51800305D-02 0.12972121D-05
+ 0.13200000D+03 0.13500000D+03 0.48190314D-02 0.12444811D-05
+ 0.13500000D+03 0.13800000D+03 0.44921412D-02 0.11960317D-05
+ 0.13800000D+03 0.14100000D+03 0.41896871D-02 0.11151388D-05
+ 0.14100000D+03 0.14400000D+03 0.39100219D-02 0.10729587D-05
+ 0.14400000D+03 0.14700000D+03 0.36551458D-02 0.98726256D-06
+ 0.14700000D+03 0.15000000D+03 0.34223867D-02 0.93381122D-06
+ 0.15000000D+03 0.15300000D+03 0.32057180D-02 0.89346331D-06
+ 0.15300000D+03 0.15600000D+03 0.30048699D-02 0.86240231D-06
+ 0.15600000D+03 0.15900000D+03 0.28214926D-02 0.81463592D-06
+ 0.15900000D+03 0.16200000D+03 0.26505060D-02 0.77317103D-06
+ 0.16200000D+03 0.16500000D+03 0.24910592D-02 0.72539729D-06
+ 0.16500000D+03 0.16800000D+03 0.23439323D-02 0.73412420D-06
+ 0.16800000D+03 0.17100000D+03 0.22074528D-02 0.67407586D-06
+ 0.17100000D+03 0.17400000D+03 0.20797242D-02 0.62455081D-06
+ 0.17400000D+03 0.17700000D+03 0.19633817D-02 0.64318406D-06
+ 0.17700000D+03 0.18000000D+03 0.18531115D-02 0.59367188D-06
+ 0.18000000D+03 0.18300000D+03 0.17505580D-02 0.56102784D-06
+ 0.18300000D+03 0.18600000D+03 0.16546429D-02 0.54115800D-06
+ 0.18600000D+03 0.18900000D+03 0.15651834D-02 0.52791753D-06
+ 0.18900000D+03 0.19200000D+03 0.14823764D-02 0.49261076D-06
+ 0.19200000D+03 0.19500000D+03 0.14031725D-02 0.47649374D-06
+ 0.19500000D+03 0.19800000D+03 0.13311222D-02 0.44460185D-06
+ 0.19800000D+03 0.20100000D+03 0.12606738D-02 0.44024119D-06
+ 0.20100000D+03 0.20400000D+03 0.11970326D-02 0.42252183D-06
+ 0.20400000D+03 0.20700000D+03 0.11366198D-02 0.39879770D-06
+ 0.20700000D+03 0.21000000D+03 0.10799922D-02 0.39302579D-06
+ 0.21000000D+03 0.21300000D+03 0.10260702D-02 0.36826345D-06
+ 0.21300000D+03 0.21600000D+03 0.97634371D-03 0.36652594D-06
+ 0.21600000D+03 0.21900000D+03 0.92858284D-03 0.34663455D-06
+ 0.21900000D+03 0.22200000D+03 0.88391597D-03 0.33460787D-06
+ 0.22200000D+03 0.22500000D+03 0.84163353D-03 0.32156743D-06
+ 0.22500000D+03 0.22800000D+03 0.80270612D-03 0.30858474D-06
+ 0.22800000D+03 0.23100000D+03 0.76552351D-03 0.31003767D-06
+ 0.23100000D+03 0.23400000D+03 0.73070297D-03 0.28662900D-06
+ 0.23400000D+03 0.23700000D+03 0.69661766D-03 0.27713621D-06
+ 0.23700000D+03 0.24000000D+03 0.66525015D-03 0.26368159D-06
+ 0.24000000D+03 0.24300000D+03 0.63533917D-03 0.26089046D-06
+ 0.24300000D+03 0.24600000D+03 0.60719444D-03 0.24769160D-06
+ 0.24600000D+03 0.24900000D+03 0.58082520D-03 0.24221273D-06
+ 0.24900000D+03 0.25200000D+03 0.55503100D-03 0.24181796D-06
+ 0.25200000D+03 0.25500000D+03 0.53088937D-03 0.23039369D-06
+ 0.25500000D+03 0.25800000D+03 0.50843740D-03 0.22808416D-06
+ 0.25800000D+03 0.26100000D+03 0.48683971D-03 0.20726681D-06
+ 0.26100000D+03 0.26400000D+03 0.46641635D-03 0.20293286D-06
+ 0.26400000D+03 0.26700000D+03 0.44706984D-03 0.19287312D-06
+ 0.26700000D+03 0.27000000D+03 0.42804724D-03 0.18892292D-06
+ 0.27000000D+03 0.27300000D+03 0.41055740D-03 0.19058631D-06
+ 0.27300000D+03 0.27600000D+03 0.39395391D-03 0.17768786D-06
+ 0.27600000D+03 0.27900000D+03 0.37764670D-03 0.17043502D-06
+ 0.27900000D+03 0.28200000D+03 0.36272736D-03 0.18994525D-06
+ 0.28200000D+03 0.28500000D+03 0.34797682D-03 0.16298220D-06
+ 0.28500000D+03 0.28800000D+03 0.33451007D-03 0.15761605D-06
+ 0.28800000D+03 0.29100000D+03 0.32138671D-03 0.15498755D-06
+ 0.29100000D+03 0.29400000D+03 0.30911906D-03 0.14796463D-06
+ 0.29400000D+03 0.29700000D+03 0.29686250D-03 0.14310385D-06
+ 0.29700000D+03 0.30000000D+03 0.28521028D-03 0.13963829D-06
+
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/analyze_HNNLO_templates.C b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/analyze_HNNLO_templates.C
new file mode 100644
index 0000000000000000000000000000000000000000..0964cc0c252103438e5ded35c88edae8f6b9857e
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/analyze_HNNLO_templates.C
@@ -0,0 +1,123 @@
+/***
+ *
+ *  ROOT6 macro to 1) analyze HNNLO input templates from NNLOPS
+ *  and 2) correct for statistical fluctuations by using symmetry
+ *  of Higgs rapidity spectrum in pp collisions (TODO?)
+ *
+ *  Dag Gillberg, March 4, 2017
+ *
+ */
+
+typedef TString Str;
+typedef std::vector<TString> StrV;
+typedef std::vector<double> NumV;
+template <typename T> void add(vector<T> &v, T a) { v.push_back(a); }
+
+// splits string into string vector
+StrV vectorize(Str str, Str sep=" ");
+NumV vectorizeD(Str str, Str sep=" ");
+StrV readFile(TString fileName);
+void fatal(Str msg) {
+  printf("FATAL:\n\n  %s\n\n",msg.Data()); abort();
+}
+
+void analyze(NumV bins, NumV y, NumV err, Str title);
+
+void analyze_HNNLO_templates(Str fileName="H1250-CM13-NNPDF3-APX2-HH.top") {
+
+  // Prepare a pdf output file
+  Str pdf="plots_"+Str(fileName).ReplaceAll("top","pdf");
+  TCanvas *can = new TCanvas();
+  can->Print(pdf+"[");
+
+  // Read in those lines
+  StrV lines=readFile(fileName);
+  
+  NumV bins, y, err; Str title;
+  for (Str line:lines) {
+    if (line[0]=='#') {
+      title=line; continue;
+    }
+    if (line.Sizeof()<=2) {
+      if (bins.size()) {
+	cout << "Done reading " << title << endl;
+	analyze(bins,y,err,title);
+	can->Print(pdf);
+	//can->Print(pdf+"]"); fatal("stop"); // for debugging E->D
+      }
+      bins.clear(); y.clear(); err.clear();
+      continue;
+    }
+
+    // GAH! stupid fortran code use D instead of E for exponent
+    NumV nums=vectorizeD(line.ReplaceAll("D","E"));
+    if (nums.size()!=4) fatal("Cannot intepret line \""+line+"\"");
+    if (bins.size()==0) add(bins,nums[0]);
+    add(bins,nums[1]); add(y,nums[2]); add(err,nums[3]);
+  }
+  can->Print(pdf+"]");
+  printf("\nProduced %s\n\n",pdf.Data());
+}
+
+void analyze(NumV bins, NumV y, NumV err, Str title) {
+  TH1D *h = new TH1D("",title+";"+title,-1+bins.size(),&bins[0]);
+  //printf("%lu bins\n",bins.size());
+  if (bins.size()!=y.size()+1||bins.size()!=err.size()+1) fatal("Bad input");
+  for (size_t bin=1;bin<=y.size();++bin) {
+    //printf("bin %3lu %.2f\n",bin,bins[bin-1]);
+    h->SetBinContent(bin,y[bin-1]); h->SetBinError(bin,err[bin-1]);
+  }
+  h->Draw();
+  if (title.Contains("yh index")) {
+    TH1D *sym = (TH1D*)h->Clone();
+    sym->SetLineColor(kRed);
+    double chi2=0; int ndof=0;
+    for (size_t i=0;i<50;++i) {
+      double y1=y[i], y2=y[99-i], e1=err[i], e2=err[99-i];
+      if (y1==0||y2==0) continue;
+      double w1=1.0/e1/e1, w2=1.0/e2/e2, wsum=w1+w2, e=1/sqrt(wsum), c=(w1*y1+w2*y2)/wsum;
+      printf("%6.2e +/-%.2e\n",y1,e1); printf("%6.2e +/-%.2e\n",y2,e2);
+      printf("%6.2e +/-%.2e\n",c,e); printf("%2lu %6.2f\n",i,pow(y1-c,2)*w1+pow(y2-c,2)*w2);
+      printf("\n");
+      chi2+=pow(y1-c,2)*w1+pow(y2-c,2)*w2;
+      ++ndof;
+      sym->SetBinContent(i+1,c); sym->SetBinContent(100-i,c);
+      sym->SetBinError(i+1,e); sym->SetBinError(100-i,e);
+    }
+    printf("chi2/ndof = %.2f / %i\n",chi2,ndof);
+    sym->Draw("same");
+    TLatex *tex = new TLatex();
+    tex->SetNDC(); tex->SetTextFont(42); tex->DrawLatex(0.15,0.85,Form("#chi^{2} / #it{n}_{dof} = %.1f / %i",chi2,ndof));
+  }
+}
+
+
+StrV vectorize(Str str, Str sep) {
+  StrV result; TObjArray *strings = str.Tokenize(sep.Data());
+  if (strings->GetEntries()==0) return result;
+  TIter istr(strings);
+  while (TObjString* os=(TObjString*)istr())
+    if (os->GetString()[0]!='#') result.push_back(os->GetString());
+    else break;
+  return result;
+}
+
+NumV vectorizeD(Str str, Str sep) {
+  NumV result; StrV vecS = vectorize(str,sep);
+  for (auto s:vecS) {
+    add(result,stod(s.Data()));
+  }
+  return result;
+}
+
+StrV readFile(TString fileName) {
+  StrV lines;
+  ifstream file(fileName.Data());
+  string line;
+  while (getline(file,line)) {
+    lines.push_back(line);
+  }
+  printf("Read %lu lines from file %s\n",lines.size(),fileName.Data());
+  return lines;
+}
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/run_all.src b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/run_all.src
new file mode 100644
index 0000000000000000000000000000000000000000..019c49dd734df044f2fd69324a2ba7a56be8c134
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/hnnlo/run_all.src
@@ -0,0 +1,10 @@
+# Templates for central NNLO values: APX2-HH
+root -b -q -l 'analyze_HNNLO_templates.C("H1250-CM13-NNPDF3-APX2-HH.top")'
+root -b -q -l 'analyze_HNNLO_templates.C("H1250_CM13_PDF4LHC30-APX2-HH.top")'
+# Templates for QCD down and up
+root -b -q -l 'analyze_HNNLO_templates.C("H1250-CM13-NNPDF3-APX2-QQ.top")'
+root -b -q -l 'analyze_HNNLO_templates.C("H1250-CM13-NNPDF3-APX2-11.top")'
+# Templates for quark mass variations
+root -b -q -l 'analyze_HNNLO_templates.C("H1250-CM13-NNPDF3-APX0-HH.top")'
+root -b -q -l 'analyze_HNNLO_templates.C("H1250-CM13-NNPDF3-APX1-HH.top")'
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/run_higgs_tests.src b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/run_higgs_tests.src
new file mode 100644
index 0000000000000000000000000000000000000000..b60500e45c8f7cf9955c17e73eb3528d76073b31
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/run_higgs_tests.src
@@ -0,0 +1,10 @@
+# -*- sh -*-
+
+# Run over Jared's five test files (three different VH ones)
+source testHiggsWeightTool_forceNNLOPS.src
+source testHiggsWeightTool_forceVBF.src
+source testHiggsWeightTool_forceVH.src
+
+# summarize the results of the five root files produced from the above
+# produces a PDF and prints tables to the screen
+root -b -q evaluateHiggsTheoryUncert.C
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool.src b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool.src
new file mode 100644
index 0000000000000000000000000000000000000000..092c9c75840a06b6718d5ad726e1745c9ddcde45
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool.src
@@ -0,0 +1 @@
+HiggsWeightTest /eos/atlas/user/w/wangjin/higgs/DAOD_ggH_NNLOPS_massVariation/DAOD_TRUTH4.ggH125_345888_massVariation_4.truth.root
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool_forceNNLOPS.src b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool_forceNNLOPS.src
new file mode 100644
index 0000000000000000000000000000000000000000..3b9ab50e2c54c11de101ef913c90c283cf71ed6f
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool_forceNNLOPS.src
@@ -0,0 +1 @@
+HiggsWeightTest --output ggF.root --weightCutOff 100 --forceNNLOPS /eos/atlas/user/j/jvasquez/public/mc15_13TeV.343981.PowhegPythia8EvtGen_NNLOPS_nnlo_30_ggH125_gamgam.merge.DAOD_HIGG1D1.e5607_s2726_r7772_r7676_p3015/DAOD_HIGG1D1.10654168._000034.pool.root.1
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool_forceVBF.src b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool_forceVBF.src
new file mode 100644
index 0000000000000000000000000000000000000000..3f149fe7a8eefb043705e84be5c89e7e9617d149
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool_forceVBF.src
@@ -0,0 +1 @@
+HiggsWeightTest --output VBF.root --forceVBF /eos/atlas/user/j/jvasquez/public/mc15_13TeV.345041.PowhegPythia8EvtGen_NNPDF30_AZNLOCTEQ6L1_VBFH125_gamgam.merge.DAOD_HIGG1D1.e5720_s2726_r7772_r7676_p3015/DAOD_HIGG1D1.10692228._000001.pool.root.1
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool_forceVH.src b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool_forceVH.src
new file mode 100644
index 0000000000000000000000000000000000000000..affd06f461ea188c7871a00e8ed3b0297e762d13
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testHiggsWeightTool_forceVH.src
@@ -0,0 +1,3 @@
+HiggsWeightTest --output WmH.root --weightCutOff 2 --forceVH /eos/atlas/user/j/jvasquez/public/mc15_13TeV.345317.PowhegPythia8EvtGen_NNPDF30_AZNLO_WmH125J_Hyy_Wincl_MINLO.merge.DAOD_HIGG1D1.e5734_s2726_r7772_r7676_p3015/DAOD_HIGG1D1.10692230._000019.pool.root.1
+HiggsWeightTest --output WpH.root --weightCutOff 2 --forceVH /eos/atlas/user/j/jvasquez/public/mc15_13TeV.345318.PowhegPythia8EvtGen_NNPDF30_AZNLO_WpH125J_Hyy_Wincl_MINLO.merge.DAOD_HIGG1D1.e5734_s2726_r7772_r7676_p3015/DAOD_HIGG1D1.10697844._000008.pool.root.1
+HiggsWeightTest --output ZH.root --weightCutOff 2 --forceVH /eos/atlas/user/j/jvasquez/public/mc15_13TeV.345319.PowhegPythia8EvtGen_NNPDF30_AZNLO_ZH125J_Hyy_Zincl_MINLO.merge.DAOD_HIGG1D1.e5743_s2726_r7772_r7676_p3015/DAOD_HIGG1D1.10803453._000002.pool.root.1
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testTruthWeightTool.src b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testTruthWeightTool.src
new file mode 100644
index 0000000000000000000000000000000000000000..ff633674caf6c51a89d2a013bc30cf32e80dd32c
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/data/testTruthWeightTool.src
@@ -0,0 +1 @@
+TruthMetaDataTest /eos/atlas/user/w/wangjin/higgs/DAOD_ggH_NNLOPS_massVariation/DAOD_TRUTH4.ggH125_345888_massVariation_4.truth.root
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/src/components/TruthWeightTools_entries.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/src/components/TruthWeightTools_entries.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..0924770d38ff88224a59d3c4c49986e721c12f84
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/src/components/TruthWeightTools_entries.cxx
@@ -0,0 +1,14 @@
+#include "GaudiKernel/DeclareFactoryEntries.h"
+
+#include "TruthWeightTools/TruthWeightTool.h"
+
+using namespace xAOD;
+
+DECLARE_TOOL_FACTORY(TruthWeightTool)
+
+DECLARE_FACTORY_ENTRIES(TruthWeightTools)
+{
+
+  DECLARE_TOOL(TruthWeightTool)
+
+}
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/src/components/TruthWeightTools_load.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/src/components/TruthWeightTools_load.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..9c3a90ca6369f255971acab4939c1e37ad74d4e1
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/src/components/TruthWeightTools_load.cxx
@@ -0,0 +1,5 @@
+// Gaudi/Athena includes
+#include "GaudiKernel/LoadFactoryEntries.h"
+
+// Declare the library to the infrastructure
+LOAD_FACTORY_ENTRIES(TruthWeightTools)
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/test/ath_test_truthWeightTool.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/test/ath_test_truthWeightTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..d03affcf368672bdbebeac87bdf1bea4538a3d4d
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/test/ath_test_truthWeightTool.cxx
@@ -0,0 +1,94 @@
+#ifndef ROOTCORE
+
+/// Example standalone executable using POOL to read an xAOD
+/// Tests the TruthWeightTool ... shows example usage
+
+/// Author: Dag Gillberg - based on
+///  https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/AnalysisCommon/CPAnalysisExamples/trunk/test/ut_ath_checkTrigger_test.cxx
+/// by Will Buttinger
+/// Updated for git-based athena by James Robinson
+
+#include "AthAnalysisBaseComps/AthAnalysisHelper.h" //tool creation and configuration
+#include "POOLRootAccess/TEvent.h" //event looping
+#include "GaudiKernel/ToolHandle.h" //for better working with tools
+
+#include "AsgTools/MessageCheck.h" //messaging
+using namespace asg::msgUserCode;  //messaging
+
+//EDM includes
+
+//ROOT includes
+#include "TString.h"
+#include "TSystem.h"
+#include "TStopwatch.h"
+#include "TH1D.h"
+#include "TFile.h"
+
+//specific includes for this test
+#include "TruthWeightTools/TruthWeightTool.h"
+
+int main(int argc, char *argv[])
+{
+
+  IAppMgrUI *app = POOL::Init(); //important to do this first!
+
+  // The application's name:
+  const char *APP_NAME = argv[0];
+
+  // Use default MC file for testing if none is provided
+  TString fileName = "$ASG_TEST_FILE_MC";
+  if (argc < 2) {
+    ANA_MSG_WARNING("No file name received, using $ASG_TEST_FILE_MC");
+  } else {
+   fileName = argv[1]; //use the user provided file
+  }
+
+  POOL::TEvent::EReadMode mode = POOL::TEvent::kClassAccess; //Class Access is faster than full POOL Access
+
+  POOL::TEvent evt(mode);
+  evt.readFrom(fileName);
+  //evt.setEvtSelProperty("ReadMetaDataWithPool",false); // If test xAOD format metadata, will need to uncomment this until pool converter is present
+
+  ANA_MSG_INFO("Will create tool");
+  // Create the truth weight tool:
+  xAOD::TruthWeightTool weightTool("TruthWeightTool");
+  weightTool.setProperty("OutputLevel", MSG::DEBUG).ignore();
+  weightTool.sysInitialize().ignore(); //must call sysInitialize to get the callbacks registered properly for an AsgMetadataTool
+
+  // Optional: create ToolHandle
+  // constructor argument is: Type/Name
+  //  ToolHandle< xAOD::ITruthWeightTool > handle( "xAOD::TruthWeightTool/TruthWeightTool" );
+  //if ( handle.retrieve().isFailure() ) {
+  //  ::Error( APP_NAME, "Could not retrieve TruthWeightTool");
+  //  return 1;
+  //}
+
+  ANA_MSG_INFO("Will loop");
+
+  const ::Long64_t Nevts = evt.getEntries();
+
+  for (int i = 0; i < 10; i++) {
+    if (evt.getEntry(i) < 0) { ANA_MSG_ERROR("Failed to read event " << i); continue; }
+
+    if (i == 0) {
+      ANA_MSG_INFO("Will print");
+      auto weightNames = weightTool.getWeightNames();
+      auto weights = weightTool.getWeights();
+
+      for (size_t i = 0; i < weightNames.size(); ++i) {
+        ::Info(APP_NAME, "Weight %3lu has value %.3f and name \"%s\"", i, weights[i], weightNames[i].c_str());
+      }
+    }
+
+    // Give some feedback of where we are:
+    if ((i + 1) % 1000 == 0) {
+      ::Info(APP_NAME, "Processed %i / %llu events", i + 1, Nevts);
+    }
+  }
+
+  // Will does this, so, so will I ;p
+  app->finalize();
+  return 0;
+}
+
+#endif
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/util/HiggsWeightTest.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/util/HiggsWeightTest.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..25911fa65b7d8dabfe1f0314e3d5b90a5ca70c92
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/util/HiggsWeightTest.cxx
@@ -0,0 +1,342 @@
+// $Id$
+#include <TFile.h>
+#include <TError.h>
+#include <TTree.h>
+#include "xAODRootAccess/Init.h"
+#include "xAODRootAccess/TEvent.h"
+#include "xAODRootAccess/tools/ReturnCheck.h"
+#include "xAODEventInfo/EventInfo.h"
+#include "xAODTruth/TruthEvent.h"
+#include "xAODTruth/TruthEventContainer.h"
+
+// ASG include(s):
+#include "AsgTools/ToolHandle.h"
+
+// Local include(s):
+#include "TruthWeightTools/TruthWeightTool.h"
+#include "TruthWeightTools/HiggsWeightTool.h"
+#include <TRandom3.h>
+#include <TH1F.h>
+
+typedef TString Str;
+typedef std::vector<Str> StrV;
+typedef std::vector<TH1F *> HistV;
+typedef std::vector<double> NumV;
+void fatal(TString msg) { printf("\nFATAL:\n\n  %s\n\n", msg.Data()); abort(); }
+void fillHistos(HistV &hw, double x, NumV ws)
+{
+  if (hw.size() < ws.size()) { fatal(Form("Bad input to fillHistos %lu hs, %lu ws", hw.size(), ws.size())); }
+
+  for (size_t i = 0; i < ws.size(); ++i) { hw[i]->Fill(x, ws[i]); }
+}
+HistV makeHistos(int N, Str prefix, int Nbins, double min, double max, Str tit = "")
+{
+  HistV hv;
+
+  for (int i = 1; i <= N; ++i) { hv.push_back(new TH1F(prefix + Form("%i", i), tit, Nbins, min, max)); }
+
+  return hv;
+}
+HistV makeHistos(StrV names, int Nbins, double min, double max, Str tit = "")
+{
+  HistV hv;
+
+  for (Str n : names) { hv.push_back(new TH1F(n, tit, Nbins, min, max)); }
+
+  return hv;
+}
+
+int main(int argc, char *argv[])
+{
+
+  // Get the application's name:
+  const char *APP_NAME = argv[ 0 ];
+
+  std::vector<TString> files;
+  bool forceNNLOPS = false;
+  bool forceVBF = false;
+  bool forceVH = false;
+  double weightMax = 100.0;
+  TString ofn("higgsWeightTest_histo.root");
+
+  for (int i = 1; i < argc; ++i) {
+    TString arg(argv[i]);
+
+    if (arg == "--forceNNLOPS") { forceNNLOPS = true; }
+    else if (arg == "--forceVBF") { forceVBF = true; }
+    else if (arg == "--forceVH") { forceVH = true; }
+    else if (arg == "--output") { ofn = argv[++i]; }
+    else if (arg == "--weightCutOff") { weightMax = atof(argv[++i]); }
+    else if (arg.Contains(".root")) { files.push_back(arg); }
+    else { throw std::runtime_error(TString("Cannot intepret argument: " + arg).Data()); }
+  }
+
+  if (files.size() == 0) {
+    ::Error(APP_NAME, "Usage: %s <xAOD file1> [xAOD file2]...", APP_NAME);
+    return 1;
+  }
+
+  // output file
+  TFile *of = new TFile(ofn, "RECREATE");
+  TTree *tree = new TTree("TruthTree", "");
+  float wnom = 0, yH = 0, pTH = 0, wnlo = 0;
+  int nj, fineSTXS;
+  tree->Branch("weight", &wnom, "weight/F");
+  tree->Branch("weightNLO", &wnlo, "weightNLO/F");
+  tree->Branch("y_H", &yH, "y_H/F");
+  tree->Branch("pT_H", &pTH, "pT_H/F");
+  tree->Branch("Njets30", &nj, "Njets30/I");
+  tree->Branch("STXS", &fineSTXS, "STXS/I");
+  Str ptTit = ";#it{p}_{T,#it{H}} [GeV]";
+  int Nbins = 25;
+  double min = 0, max = 250;
+
+  TH1F *h_wnom1 = new TH1F("w_nom1", "Nominal weight", 100, 0, 200);
+  TH1F *h_wnom2 = new TH1F("w_nom2", "Nominal weight", 100, 0, 20);
+
+  TH1F *h_pTH = new TH1F("pTH", ptTit, Nbins, min, max);
+  HistV h_pTH_pdf4lhc = makeHistos(30, "pTH_pdf4lhc", Nbins, min, max, ptTit);
+  HistV h_pTH_nnpdf30 = makeHistos(100, "pTH_nnpdf30", Nbins, min, max, ptTit);
+  HistV h_pTH_aS = makeHistos({"pTH_aSup", "pTH_aSdn"}, Nbins, min, max, ptTit);
+  // various QCD variations
+  HistV h_pTH_qcd         = makeHistos(8, "pTH_qcd", Nbins, min, max, ptTit); // Default Powheg QCD variations (NLO)
+  HistV h_pTH_nnlops_qcd  = makeHistos(26, "pTH_nnlops_qcd", Nbins, min, max, ptTit); // NNLOPS internal QCD vars
+  HistV h_pTH_nnlops_qcd2 = makeHistos(2, "pTH_nnlo_qcd", Nbins, min, max, ptTit); // NNLO and Powheg vars for NNLOPS
+  HistV h_pTH_wg1qcd      = makeHistos(8, "pTH_wg1qcd", Nbins, min, max, ptTit); // WG1 propsed scheme for ggF
+  HistV h_pTH_qcd_stxs    = makeHistos(9, "pTH_qcd_stxs", Nbins, min, max, ptTit); // WG1 propsed scheme for ggF
+
+  Nbins = 10;
+  min = -0.5;
+  max = 9.5;
+  Str tit = ";#it{N}_{jets}";
+  TH1F *h_Njets = new TH1F("Njets30", tit, Nbins, min, max);
+  HistV h_Njets_pdf4lhc = makeHistos(30, "Njets30_pdf4lhc", Nbins, min, max, tit);
+  HistV h_Njets_nnpdf30 = makeHistos(100, "Njets30_nnpdf30", Nbins, min, max, tit);
+  HistV h_Njets_aS = makeHistos({"Njets30_aSup", "Njets30_aSdn"}, Nbins, min, max, tit);
+  // various QCD variations
+  HistV h_Njets_qcd         = makeHistos(8, "Njets30_qcd", Nbins, min, max, tit); // Default Powheg QCD variations (NLO)
+  HistV h_Njets_nnlops_qcd  = makeHistos(26, "Njets30_nnlops_qcd", Nbins, min, max, tit); // NNLOPS internal QCD vars
+  HistV h_Njets_nnlops_qcd2 = makeHistos(2, "Njets30_nnlo_qcd", Nbins, min, max, tit); // NNLO and Powheg vars for NNLOPS
+  HistV h_Njets_wg1qcd      = makeHistos(8, "Njets30_wg1qcd", Nbins, min, max, tit); // WG1 propsed scheme for ggF
+
+  Nbins = 52;
+  min = 1;
+  max = 53;
+  tit = ";STXS fine index";
+  TH1F *h_STXS = new TH1F("STXS", tit, Nbins, min, max);
+  HistV h_STXS_pdf4lhc = makeHistos(30, "STXS_pdf4lhc", Nbins, min, max, tit);
+  HistV h_STXS_nnpdf30 = makeHistos(100, "STXS_nnpdf30", Nbins, min, max, tit);
+  HistV h_STXS_aS = makeHistos({"STXS_aSup", "STXS_aSdn"}, Nbins, min, max, tit);
+  // various QCD variations
+  HistV h_STXS_qcd         = makeHistos(8, "STXS_qcd", Nbins, min, max, tit); // Default Powheg QCD variations (NLO)
+  HistV h_STXS_nnlops_qcd  = makeHistos(26, "STXS_nnlops_qcd", Nbins, min, max, tit); // NNLOPS internal QCD vars
+  HistV h_STXS_nnlops_qcd2 = makeHistos(2, "STXS_nnlo_qcd", Nbins, min, max, tit); // NNLO and Powheg vars for NNLOPS
+  HistV h_STXS_wg1qcd      = makeHistos(8, "STXS_wg1qcd", Nbins, min, max, tit); // WG1 propsed scheme for ggF
+
+  Nbins = 80;
+  min = -4;
+  max = 4;
+  tit = ";#it{y_{H}}";
+  TH1F *h_yH = new TH1F("yH", tit, Nbins, min, max);
+  HistV h_yH_pdf4lhc = makeHistos(30, "yH_pdf4lhc", Nbins, min, max, tit);
+  HistV h_yH_nnpdf30 = makeHistos(100, "yH_nnpdf30", Nbins, min, max, tit);
+  HistV h_yH_aS = makeHistos({"yH_aSup", "yH_aSdn"}, Nbins, min, max, tit);
+  // various QCD variations
+  HistV h_yH_qcd         = makeHistos(8, "yH_qcd", Nbins, min, max, tit); // Default Powheg QCD variations (NLO)
+  HistV h_yH_nnlops_qcd  = makeHistos(26, "yH_nnlops_qcd", Nbins, min, max, tit); // NNLOPS internal QCD vars
+  HistV h_yH_nnlops_qcd2 = makeHistos(2, "yH_nnlo_qcd", Nbins, min, max, tit); // NNLO and Powheg vars for NNLOPS
+  HistV h_yH_wg1qcd      = makeHistos(8, "yH_wg1qcd", Nbins, min, max, tit); // WG1 propsed scheme for ggF
+  HistV h_yH_other       = makeHistos(8, "yH_other", Nbins, min, max, tit); // WG1 propsed scheme for ggF
+
+  // Initialise the application:
+  RETURN_CHECK(APP_NAME, xAOD::Init(APP_NAME));
+
+  // Create a TEvent object:
+  xAOD::TEvent event(xAOD::TEvent::kBranchAccess);
+
+  xAOD::HiggsWeightTool *higgsMCtool = new xAOD::HiggsWeightTool("HiggsWeightTool");
+  higgsMCtool->setProperty("OutputLevel", MSG::DEBUG).ignore();
+  higgsMCtool->setProperty("RequireFinite", true).ignore();
+  higgsMCtool->setProperty("WeightCutOff", weightMax).ignore();
+
+  if (forceNNLOPS) { higgsMCtool->setProperty("ForceNNLOPS", true).ignore(); }
+
+  if (forceVBF) { higgsMCtool->setProperty("ForceVBF", true).ignore(); }
+
+  if (forceVH) { higgsMCtool->setProperty("ForceVH", true).ignore(); }
+
+  higgsMCtool->initialize().ignore();
+
+  for (TString fn : files) {
+
+    // Open the input file:
+    std::unique_ptr< ::TFile > ifile(::TFile::Open(fn, "READ"));
+
+    if (! ifile.get()) {
+      ::Error(APP_NAME, "Couldn't open file: %s", fn.Data());
+      return 1;
+    }
+
+    ::Info(APP_NAME, "Opened file: %s", fn.Data());
+
+    // Connect the TEvent object to it:
+    RETURN_CHECK(APP_NAME, event.readFrom(ifile.get()));
+
+    // Loop over a few events:
+    const ::Long64_t entries = event.getEntries();
+
+    for (::Long64_t entry = 0; entry < entries; ++entry) {
+
+      // Get the current entry:
+      event.getEntry(entry);
+      const xAOD::EventInfo *evtInfo;
+      RETURN_CHECK(APP_NAME, event.retrieve(evtInfo, "EventInfo"));
+
+      TLorentzVector h;
+      h.SetPtEtaPhiM(gRandom->Gaus(0, 40), 0, 0, 125);
+      int HTXS_Njets30 = gRandom->Poisson(0.9), HTXS_Stage1 = 0, HTXS_index = 0;
+      double HTXS_pTH = 0;
+
+      // All input files used for test have the HTXS content
+      if (evtInfo->isAvailable<int>("HTXS_Njets_pTjet30")) {
+        HTXS_Njets30 = evtInfo->auxdata<int>("HTXS_Njets_pTjet30");
+        HTXS_Stage1 = evtInfo->auxdata<int>("HTXS_Stage1_Category_pTjet30");
+        HTXS_index  = evtInfo->auxdata<int>("HTXS_Stage1_FineIndex_pTjet30");
+        HTXS_pTH  = evtInfo->auxdata<float>("HTXS_Higgs_pt");
+        double HTXS_etaH = evtInfo->auxdata<float>("HTXS_Higgs_eta");
+        double HTXS_phiH = evtInfo->auxdata<float>("HTXS_Higgs_phi");
+        double HTXS_mH   = evtInfo->auxdata<float>("HTXS_Higgs_m");
+
+        h.SetPtEtaPhiM(HTXS_pTH, HTXS_etaH, HTXS_phiH, HTXS_mH);
+        h *= 1e-3; // convert to GeV
+      } else { HTXS_pTH = h.Pt() * 1000; }
+
+      // Access all Higgs weights
+      xAOD::HiggsWeights hw = higgsMCtool->getHiggsWeights(HTXS_Njets30, HTXS_pTH, HTXS_Stage1);
+      // on of my test files lack PDF info..
+
+      double n = hw.nominal;
+      h_wnom1->Fill(n);
+      h_wnom2->Fill(n);
+      bool bad = false;
+
+      for (double q : hw.qcd_nnlops)
+        if (std::abs(q - n) / n > 1) { bad = true; }
+
+      if (bad) {
+        //printf("Event %llu pT = %.3f, %i jets\n",entry,h.Pt(),HTXS_Njets30);
+        //for (double q:hw.qcd_nnlops) printf("%6.2f",(q-n)/n); printf("\n");
+      }
+
+      // 1. Nominal histograms
+      h_pTH  -> Fill(h.Pt(), hw.nominal);
+      h_Njets-> Fill(HTXS_Njets30, hw.nominal);
+      h_yH   -> Fill(h.Rapidity(), hw.nominal);
+      h_STXS -> Fill(HTXS_index, hw.nominal);
+
+      // 2. PDF and alphaS uncertainties
+      bool doPDF = hw.pdf4lhc_unc.size() == 30;
+
+      if (doPDF) {
+        if (std::abs(hw.alphaS_up) > 10000) {
+          // Debugging event with NAN values for PDF wegiht in Paul Thompson's file:
+          // /afs/cern.ch/work/t/thompson/public/group.phys-higgs.345097.PowhegPythia8EvtGen_NNLOPS_nnlo_30_ggH125_mumu.evgen.EVNT.e5732.002.TRUTH1_EXT0/group.phys-higgs.10609360.EXT0._000030.DAOD_TRUTH1.mc15.pool.root
+          printf("Found event with crazy weight. Dumping info below. Will ignore it.");
+          hw.print();
+          continue;
+        }
+
+        fillHistos(h_pTH_pdf4lhc, h.Pt(), hw.pdf4lhc_unc);
+        fillHistos(h_pTH_aS, h.Pt(), {hw.alphaS_up, hw.alphaS_dn});
+        fillHistos(h_yH_pdf4lhc, h.Rapidity(), hw.pdf4lhc_unc);
+        fillHistos(h_yH_aS, h.Rapidity(), {hw.alphaS_up, hw.alphaS_dn});
+        fillHistos(h_Njets_pdf4lhc, HTXS_Njets30, hw.pdf4lhc_unc);
+        fillHistos(h_Njets_aS, HTXS_Njets30, {hw.alphaS_up, hw.alphaS_dn});
+        fillHistos(h_STXS_pdf4lhc, HTXS_index, hw.pdf4lhc_unc);
+        fillHistos(h_STXS_aS, HTXS_index, {hw.alphaS_up, hw.alphaS_dn});
+      }
+
+      if (hw.nnpdf30_unc.size() == 100) {
+        fillHistos(h_pTH_nnpdf30, h.Pt(), hw.nnpdf30_unc);
+        fillHistos(h_yH_nnpdf30, h.Rapidity(), hw.nnpdf30_unc);
+        fillHistos(h_Njets_nnpdf30, HTXS_Njets30, hw.nnpdf30_unc);
+        fillHistos(h_STXS_nnpdf30, HTXS_index, hw.nnpdf30_unc);
+      }
+
+      ////////////////
+      // 3.  QCD uncertainties
+      //
+      // 3.a Default Powheg scale variations.
+      //     Note: For ggF, these are the pure Powheg MiNLO prime uncertainties
+      //           without considering the NNLO correction. I.e. don't use for NNLOPS.
+      //           Don't treat all these as NPs!! Take envelope. Or perhaps carefully chose 1 or 2 of them as NPs.
+      fillHistos(h_pTH_qcd, h.Pt(), hw.qcd);
+      fillHistos(h_yH_qcd, h.Rapidity(), hw.qcd);
+      fillHistos(h_Njets_qcd, HTXS_Njets30, hw.qcd);
+      fillHistos(h_STXS_qcd, HTXS_index, hw.qcd);
+
+      // QCD variations for (NNLOPS) ggF
+      //
+      // 3.b The 26 variations around the nominal from NNLOPS (3 scales x {d,n,u} => 3^3=27 points, one is nom).
+      // This should give an NNLO accurate normalization uncertainty (8-11%)
+      //     Note: The NNLOPS paper takes the envelope of all these variations
+      fillHistos(h_pTH_nnlops_qcd, h.Pt(), hw.qcd_nnlops);
+      fillHistos(h_yH_nnlops_qcd, h.Rapidity(), hw.qcd_nnlops);
+      fillHistos(h_Njets_nnlops_qcd, HTXS_Njets30, hw.qcd_nnlops);
+      fillHistos(h_STXS_nnlops_qcd, HTXS_index, hw.qcd_nnlops);
+
+      // 3.c Selecting two of the 26 as NPs (i.e. uncertainty sources to be treated as uncorrelated)
+      //     Taking the NNLO uncertainty (nnloDn-PowNomNom) as one source and the extreme Powheg varation
+      //     (nnloNom-PowDnDn) as an uncorrelation source (similar to >=1 in ST: affects high pT)
+      NumV nnlops_2np_qcd = {hw.qcd_nnlops_nnlo, hw.qcd_nnlops_pow};
+      fillHistos(h_pTH_nnlops_qcd2, h.Pt(), nnlops_2np_qcd);
+      fillHistos(h_yH_nnlops_qcd2, h.Rapidity(), nnlops_2np_qcd);
+      fillHistos(h_Njets_nnlops_qcd2, HTXS_Njets30, nnlops_2np_qcd);
+      fillHistos(h_STXS_nnlops_qcd2, HTXS_index, nnlops_2np_qcd);
+
+      // 3.d WG1 propsed uncertainty scheme. Recommended.
+      //NumV wg1_qcd={hw.qcd_wg1_mu,hw.qcd_wg1_res,hw.qcd_wg1_mig01,hw.qcd_wg1_mig12,hw.qcd_wg1_pTH,hw.qcd_wg1_qm};
+      NumV wg1_qcd = hw.ggF_qcd_wg1();
+      fillHistos(h_pTH_wg1qcd, h.Pt(), wg1_qcd);
+      fillHistos(h_yH_wg1qcd, h.Rapidity(), wg1_qcd);
+      fillHistos(h_Njets_wg1qcd, HTXS_Njets30, wg1_qcd);
+      fillHistos(h_STXS_wg1qcd, HTXS_index, wg1_qcd);
+
+      fillHistos(h_pTH_qcd_stxs, h.Pt(), hw.ggF_qcd_stxs);
+
+      // 4. Other weights
+      fillHistos(h_yH_other, h.Rapidity(), {
+        hw.weight0, hw.nnpdf30_nnlo, hw.pdf4lhc_nnlo, hw.nnpdf30_nlo, hw.pdf4lhc_nlo,
+        hw.mmht2014nlo, hw.ct14nlo, hw.ct10nlo
+      });
+
+      yH = h.Rapidity();
+      pTH = h.Pt();
+      wnom = hw.nominal;
+      wnlo = hw.weight0;
+      nj = HTXS_Njets30;
+      fineSTXS = HTXS_index;
+      tree->Fill();
+
+      // Print stuff to the screen for the first event in each file
+      if (entry == 0) {
+        hw.print();
+      }
+
+      // Give some feedback of where we are:
+      if ((entry + 1) % 10000 == 0) { ::Info(APP_NAME, "Processed %5llu/%5llu events", entry + 1, entries); }
+
+    } // for each entry
+  } // for each file
+
+  higgsMCtool->finalize().ignore();
+
+  of->cd();
+  of->Write();
+  printf("\nProduced %s\n\n", of->GetName());
+  of->Close();
+
+  // Return gracefully:
+  return 0;
+}
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/util/STXSacc.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/util/STXSacc.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..f8f9d3b1a1815594982ddb762db8f1767be3ee2c
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/util/STXSacc.cxx
@@ -0,0 +1,249 @@
+// $Id$
+#include <TFile.h>
+#include <TError.h>
+#include "xAODRootAccess/Init.h"
+#include "xAODRootAccess/TEvent.h"
+#include "xAODRootAccess/tools/ReturnCheck.h"
+#include "xAODEventInfo/EventInfo.h"
+
+// Local include(s):
+#include "TruthWeightTools/HiggsWeightTool.h"
+#include <TH1F.h>
+
+typedef TString Str;
+typedef std::vector<Str> StrV;
+typedef std::vector<TH1F *> HistV;
+typedef std::vector<double> NumV;
+void fatal(TString msg) { printf("\nFATAL:\n\n  %s\n\n", msg.Data()); abort(); }
+void fillHistos(HistV &hw, double x, NumV ws)
+{
+  if (hw.size() < ws.size()) { fatal("Bad input to fillHistos"); }
+
+  for (size_t i = 0; i < ws.size(); ++i) { hw[i]->Fill(x, ws[i]); }
+}
+HistV makeHistos(int N, Str prefix, int Nbins, double min, double max, Str tit = "")
+{
+  HistV hv;
+
+  for (int i = 1; i <= N; ++i) { hv.push_back(new TH1F(prefix + Form("%i", i), tit, Nbins, min, max)); }
+
+  return hv;
+}
+HistV makeHistos(StrV names, int Nbins, double min, double max, Str tit = "")
+{
+  HistV hv;
+
+  for (Str n : names) { hv.push_back(new TH1F(n, tit, Nbins, min, max)); }
+
+  return hv;
+}
+TString per(double frac)
+{
+  if (frac >= 0) { return Form("+%.1f%%", frac * 100); }
+
+  return Form("%.1f%%", frac * 100);
+}
+TString per(double var, double nom) { return per((var - nom) / nom); }
+
+int main(int argc, char *argv[])
+{
+
+  // Get the application's name:
+  const char *APP_NAME = argv[ 0 ];
+
+  TString fn("/eos/atlas/user/j/jvasquez/public/mc15_13TeV.343981.PowhegPythia8EvtGen_NNLOPS_nnlo_30_ggH125_gamgam.merge.DAOD_HIGG1D1.e5607_s2726_r7772_r7676_p3015/DAOD_HIGG1D1.10654168._000034.pool.root.1");
+
+  for (int i = 1; i < argc; ++i) {
+    TString arg(argv[i]);
+
+    if (arg.Contains(".root")) { fn = arg; }
+    else { std::runtime_error(TString("Cannot intepret argument: " + arg).Data()); }
+  }
+
+  int  Nbins = 14;
+  double min = 0, max = 14;
+  Str tit = ";STXS fine index";
+  TH1F *h_STXS = new TH1F("STXS", tit, Nbins, min, max);
+  HistV h_STXS_pdf4lhc = makeHistos(30, "STXS_pdf4lhc", Nbins, min, max, tit);
+  HistV h_STXS_aS = makeHistos({"STXS_aSup", "STXS_aSdn"}, Nbins, min, max, tit);
+
+  // Initialise the application:
+  RETURN_CHECK(APP_NAME, xAOD::Init(APP_NAME));
+
+  // Create a TEvent object:
+  xAOD::TEvent event(xAOD::TEvent::kBranchAccess);
+
+  xAOD::HiggsWeightTool *higgsMCtool = new xAOD::HiggsWeightTool("HiggsWeightTool");
+  higgsMCtool->setProperty("OutputLevel", MSG::DEBUG).ignore();
+  higgsMCtool->setProperty("ForceNNLOPS", true).ignore();
+  higgsMCtool->setProperty("WeightCutOff", 150.0).ignore();
+  higgsMCtool->initialize().ignore();
+
+  // Open the input file:
+  std::unique_ptr< ::TFile > ifile(::TFile::Open(fn, "READ"));
+
+  if (! ifile.get()) { fatal("Could not open file " + fn); }
+
+  ::Info(APP_NAME, "Opened file: %s", fn.Data());
+
+  // Connect the TEvent object to it:
+  RETURN_CHECK(APP_NAME, event.readFrom(ifile.get()));
+
+  // Loop over a few events:
+  const ::Long64_t entries = event.getEntries();
+
+  for (::Long64_t entry = 0; entry < entries; ++entry) {
+
+    // Get the current entry:
+    event.getEntry(entry);
+
+    const xAOD::EventInfo *evtInfo;
+    RETURN_CHECK(APP_NAME, event.retrieve(evtInfo, "EventInfo"));
+
+    std::vector<float> weights = evtInfo->mcEventWeights();
+    int HTXS_index   = evtInfo->auxdata<int>("HTXS_Stage1_FineIndex_pTjet30");
+
+    // Access all Higgs weights
+    xAOD::HiggsWeights hw = higgsMCtool->getHiggsWeights();
+
+    // Fill histos
+    h_STXS -> Fill(HTXS_index, hw.nominal);
+    fillHistos(h_STXS_pdf4lhc, HTXS_index, hw.pdf4lhc_unc);
+    fillHistos(h_STXS_aS, HTXS_index, {hw.alphaS_up, hw.alphaS_dn});
+
+    // Give some feedback of where we are:
+    if ((entry + 1) % 10000 == 0) { ::Info(APP_NAME, "Processed %5llu/%5llu events", entry + 1, entries); }
+
+  } // for each entry
+
+  higgsMCtool->finalize().ignore();
+
+  // 1. let's normalize to the ggF cross section
+  //    this means scale the sumw in each bin by
+  //      sig(ggF) / sum w total
+  double sf = 48.52 / h_STXS->Integral(0, -1);
+  h_STXS->Scale(sf);
+
+  for (auto *h : h_STXS_pdf4lhc) { h->Scale(sf); }
+
+  // Loop over the categories and print out the cross sections
+  printf("\n  Cross sections in pb\n\n");
+  printf("%5s%6s%9s", "STXS", "sig", "MC-stat");
+  int Npdf = 12; // number of colums, cutting off
+  int Nstxs = 12; // number of Stage 1 ggF STXS categories
+
+  for (int j = 0; j < Npdf; ++j) { printf("  PDF%2i", j + 1); }
+
+  printf("\n");
+
+  for (int i = 1; i <= Nstxs; ++i) {
+    int bin = i + 1;
+    // Nominal cross section and MC stat error
+    printf("%5i%6.2f +/- %.2f", i, h_STXS->GetBinContent(bin), h_STXS->GetBinError(bin));
+
+    for (int j = 0; j < Npdf; ++j) { printf("%7.2f", h_STXS_pdf4lhc[j]->GetBinContent(bin)); }
+
+    printf("\n");
+  }
+
+  printf("%5s%6.2f +/- 0.00", "Tot", h_STXS->Integral(0, -1));
+
+  for (int j = 0; j < Npdf; ++j) { printf("%7.2f", h_STXS_pdf4lhc[j]->Integral(0, -1)); }
+
+  printf("\n\n");
+
+  // same table but realtive uncertaitnies
+  printf("\n  Cross section with relative uncertaitnies\n\n");
+  printf("%5s%9s", "STXS", "sig");
+
+  for (int j = 0; j < Npdf; ++j) { printf("  PDF%2i", j + 1); }
+
+  printf(" PDF1-30\n");
+  double V = 0.0, nom = 0;
+
+  for (int i = 1; i <= Nstxs; ++i) {
+    int bin = i + 1;
+    nom = h_STXS->GetBinContent(bin);
+    // Nominal cross section and MC stat error
+    printf("%5i%6.2f pb", i, nom);
+    V = 0;
+
+    for (int j = 0; j < 30; ++j) { // loop over all 30 PDF vars
+      double nj = h_STXS_pdf4lhc[j]->GetBinContent(bin);
+      V += pow(nj - nom, 2);
+
+      if (j < Npdf) { printf("%7s", per(nj, nom).Data()); }
+    }
+
+    printf("%8s\n", per(sqrt(V) / nom).Data());
+  }
+
+  V = 0;
+  nom = h_STXS->Integral(0, -1);
+  printf("%5s%6.2f pb", "Tot", nom);
+
+  //   printf("%5s%6.2f pb  %s","Tot",nom,per(0).Data());
+  for (int j = 0; j < 30; ++j) {
+    double nj = h_STXS_pdf4lhc[j]->Integral();
+
+    if (j < Npdf) { printf("%7s", per(nj, nom).Data()); }
+
+    V += pow(nj - nom, 2);
+  }
+
+  printf("%8s\n", per(sqrt(V) / nom).Data());
+
+  // Loop over the categories and print out the cross sections
+  printf("\n  Acceptances in percent\n\n");
+  printf("%5s%6s%9s", "STXS", "acc", "MC-stat");
+  double tot = h_STXS->Integral();
+
+  for (int j = 0; j < Npdf; ++j) { printf("  PDF%2i", j + 1); }
+
+  printf("\n");
+
+  for (int i = 1; i <= Nstxs; ++i) {
+    int bin = i + 1;
+    // acc = n_i / sum(n_i) = a/(a+b)
+    double n_i = h_STXS->GetBinContent(bin), Dn_i = h_STXS->GetBinError(bin),
+           acc_i = n_i / tot, Dacc_i = Dn_i / tot;
+    printf("%5i%6.1f +/- %4.1f", i, acc_i * 100, Dacc_i * 100);
+
+    for (int j = 0; j < Npdf; ++j)
+    { printf("%7.1f", h_STXS_pdf4lhc[j]->GetBinContent(bin) / h_STXS_pdf4lhc[j]->Integral() * 100); }
+
+    printf("\n");
+  }
+
+  printf("\n");
+
+  // same table but realtive uncertaitnies
+  printf("\n  Acceptance with relative uncertaitnies\n\n");
+  printf("%5s%6s", "STXS", "acc");
+
+  for (int j = 0; j < Npdf; ++j) { printf("  PDF%2i", j + 1); }
+
+  printf(" PDF1-30\n");
+
+  for (int i = 1; i <= Nstxs; ++i) {
+    int bin = i + 1;
+    double acc_nom = h_STXS->GetBinContent(bin) / tot;
+    printf("%5i%6.1f", i, acc_nom * 100);
+    V = 0;
+
+    for (int j = 0; j < 30; ++j) {
+      double acc_j = h_STXS_pdf4lhc[j]->GetBinContent(bin) / h_STXS_pdf4lhc[j]->Integral();
+      V += pow(acc_j - acc_nom, 2);
+
+      if (j < Npdf) { printf("%7s", per(acc_j, acc_nom).Data()); }
+    }
+
+    printf("%8s\n", per(sqrt(V) / acc_nom).Data());
+  }
+
+  printf("\n");
+
+  // Return gracefully:
+  return 0;
+}
+
diff --git a/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/util/TruthMetaDataTest.cxx b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/util/TruthMetaDataTest.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..5ea982e970524c573d67cb77d15a778a35afa8e3
--- /dev/null
+++ b/PhysicsAnalysis/AnalysisCommon/TruthWeightTools/util/TruthMetaDataTest.cxx
@@ -0,0 +1,102 @@
+// $Id$
+
+// System include(s):
+#include <memory>
+
+// ROOT include(s):
+#include <TFile.h>
+#include <TError.h>
+
+// Infrastructure include(s):
+#include "xAODRootAccess/Init.h"
+#include "xAODRootAccess/TEvent.h"
+#include "xAODRootAccess/tools/ReturnCheck.h"
+#include "xAODEventInfo/EventInfo.h"
+
+// ASG include(s):
+#include "AsgTools/ToolHandle.h"
+#include "AsgTools/ToolHandleArray.h"
+
+// Local include(s):
+#include "TruthWeightTools/TruthWeightTool.h"
+
+int main(int argc, char *argv[])
+{
+
+  // Get the application's name:
+  const char *APP_NAME = argv[ 0 ];
+
+  // Check that we received at least one file name:
+  if (argc < 2) {
+    ::Error(APP_NAME, "Usage: %s <xAOD file1> [xAOD file2]...", APP_NAME);
+    return 1;
+  }
+
+  // Initialise the application:
+  RETURN_CHECK(APP_NAME, xAOD::Init(APP_NAME));
+
+  // Create a TEvent object:
+  xAOD::TEvent event(xAOD::TEvent::kBranchAccess);
+
+  // Create the truth weight tool:
+  xAOD::TruthWeightTool weightTool("TruthWeightTool");
+  weightTool.setProperty("OutputLevel", MSG::INFO).ignore();
+
+  /*
+  // Try creating ToolHandles for this tool:
+  ToolHandle< xAOD::ITruthWeightTool > handle( "TruthWeightTool" );
+  ToolHandleArray< xAOD::ITruthWeightTool > handleArray{ "TruthWeightTool" };
+
+  // Check if they can be retrieved:
+  if( handle.retrieve().isFailure() || handleArray.retrieve().isFailure() ) {
+    ::Error( APP_NAME,
+              "Couldn't retrieve the tested tool through tool handles" );
+    return 1;
+  }
+  */
+
+  // Loop over the files:
+  for (int i = 1; i < argc; ++i) {
+
+    // Open the input file:
+    std::unique_ptr< ::TFile > ifile(::TFile::Open(argv[ i ], "READ"));
+
+    if (! ifile.get()) {
+      ::Error(APP_NAME, "Couldn't open file: %s", argv[ i ]);
+      return 1;
+    }
+
+    ::Info(APP_NAME, "Opened file: %s", argv[ i ]);
+
+    // Connect the TEvent object to it:
+    RETURN_CHECK(APP_NAME, event.readFrom(ifile.get()));
+
+    // Loop over a few events:
+    const ::Long64_t entries = event.getEntries();
+
+    for (::Long64_t entry = 0; entry < entries; ++entry) {
+
+      // Get the current entry:
+      event.getEntry(entry);
+
+      if (entry == 0) {
+        auto weightNames = weightTool.getWeightNames();
+        auto weights = weightTool.getWeights();
+
+        for (size_t i = 0; i < weightNames.size(); ++i) {
+          std::string wname = weightNames[i];
+          ::Info(APP_NAME, "Weight %3lu has value %.3f = %.3f (index %lu) and name \"%s\"",
+                 i, weights[i], weightTool.getWeight(wname), weightTool.getWeightIndex(wname), wname.c_str());
+        }
+      }
+
+      // Give some feedback of where we are:
+      if ((entry + 1) % 1000 == 0)
+      { ::Info(APP_NAME, "Processed %5llu / %5llu events", entry + 1, entries); }
+    }
+  }
+
+  // Return gracefully:
+  return 0;
+}
+
diff --git a/PhysicsAnalysis/AnalysisCommon/UserAnalysis/doc/packagedoc.h b/PhysicsAnalysis/AnalysisCommon/UserAnalysis/doc/packagedoc.h
index bc22052a36b850b8e7e091bb7c49e69c82c63ede..5e17d49fa869bfa4043558eac27e1d85fe963333 100644
--- a/PhysicsAnalysis/AnalysisCommon/UserAnalysis/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisCommon/UserAnalysis/doc/packagedoc.h
@@ -33,11 +33,4 @@ analysis examples, look in CVS: PhysicsAnalysis/AnalysisCommon/AnalysisExamples/
  - For questions or comments: Ketevi A. Assamagan
    ketevi@bnl.gov
 
-@section UserAnalysis_used_packagesTkPara Used Packages
-
-@section UserAnalysis_requirements Requirements
-
 */
-
-
-
diff --git a/PhysicsAnalysis/AnalysisEventDisplay/AnalysisJiveXML/src/ElectronRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/AnalysisJiveXML/src/ElectronRetriever.cxx
index c1fcf31a5e107e0b5450e7dfc73e9402550d48b3..6a87ef7cf9c1b5cca03f5985c1de92a5af07a0ca 100755
--- a/PhysicsAnalysis/AnalysisEventDisplay/AnalysisJiveXML/src/ElectronRetriever.cxx
+++ b/PhysicsAnalysis/AnalysisEventDisplay/AnalysisJiveXML/src/ElectronRetriever.cxx
@@ -218,7 +218,7 @@ namespace JiveXML {
 
               summary = (*elItr)->trackParticle()->trackSummary();
               hasTrack.push_back( DataType( 1 ) );
-	      hitsBLayer.push_back( DataType( summary->get(Trk::numberOfBLayerHits) ));
+	      hitsBLayer.push_back( DataType( summary->get(Trk::numberOfInnermostPixelLayerHits) ));
               hitsPixel.push_back( DataType(  summary->get(Trk::numberOfPixelHits) ));
               hitsSCT.push_back( DataType( summary->get(Trk::numberOfSCTHits) ));
               hitsTRT.push_back( DataType( summary->get(Trk::numberOfTRTHits) ));
diff --git a/PhysicsAnalysis/AnalysisEventDisplay/AnalysisJiveXML/src/TrackParticleRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/AnalysisJiveXML/src/TrackParticleRetriever.cxx
index 12bbdd5739a3412e9ffe2b23de95f79f0542e2fa..1a57e649a863629af5ec0aedf631c4393966ac7f 100755
--- a/PhysicsAnalysis/AnalysisEventDisplay/AnalysisJiveXML/src/TrackParticleRetriever.cxx
+++ b/PhysicsAnalysis/AnalysisEventDisplay/AnalysisJiveXML/src/TrackParticleRetriever.cxx
@@ -242,7 +242,7 @@ namespace JiveXML {
         if(tSum){
           int nPixelHits = tSum->get(Trk::numberOfPixelHits);
           int nSCTHits   = tSum->get(Trk::numberOfSCTHits);
-          int nBLayerHits = tSum->get(Trk::numberOfBLayerHits);
+          int nBLayerHits = tSum->get(Trk::numberOfInnermostPixelLayerHits);
           int nTRTHits   = tSum->get(Trk::numberOfTRTHits);
           labelStr = "_PixelHits"+DataType( nPixelHits ).toString() + "_SCTHits"+DataType( nSCTHits ).toString() + 
                      "_BLayerHits"+DataType( nBLayerHits ).toString() + "_TRTHits"+DataType( nTRTHits ).toString() ;
diff --git a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx
index 998a0532cf9dc582288b8c68329b7e3bb8e764aa..8bd2ed460524d6165f23a15e3a9cfaddc03aa225 100755
--- a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx
+++ b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/src/xAODJetRetriever.cxx
@@ -1,6 +1,6 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
+   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+   */
 
 #include "xAODJiveXML/xAODJetRetriever.h"
 
@@ -10,6 +10,11 @@
 #include "xAODBTagging/BTagging.h"
 #include "xAODJet/JetAttributes.h"
 
+#include "TrkTrack/Track.h"
+#include "TrkTrack/TrackCollection.h"
+#include "CaloEvent/CaloCellContainer.h"
+
+
 #include "AthenaKernel/Units.h"
 using Athena::Units::GeV;
 
@@ -32,35 +37,36 @@ namespace JiveXML {
   xAODJetRetriever::xAODJetRetriever(const std::string& type,const std::string& name,const IInterface* parent):
     AthAlgTool(type,name,parent), m_typeName("Jet"){
 
-    //Only declare the interface
-    declareInterface<IDataRetriever>(this);
-
-    //In xAOD 25Mar14: 
-    //  AntiKt4LCTopoJets, CamKt12LCTopoJets, AntiKt4EMTopoJets, AntiKt4TruthWZJets
-    //  Kt4EMTopoJets, AntiKt10TruthWZJets, Kt4LCTopoJets, AntiKt4TruthJets
-    //  CamKt12TruthJets, AntiKt10TruthJets, CamKt12TruthWZJets, AntiKt10LCTopoJets
-
-    declareProperty("StoreGateKey", m_sgKey  = "AntiKt4EMTopoJets", 
- 	"Collection to be first in output, shown in Atlantis without switching");
-    declareProperty("FavouriteJetCollection" ,m_sgKeyFavourite = "AntiKt4TopoEMJets" ,
-	"Collection to be first in output, shown in Atlantis without switching");
-    declareProperty("OtherJetCollections" ,m_otherKeys,
-	"Other collections to be retrieved. If list left empty, all available retrieved");
-    declareProperty("DoWriteHLT", m_doWriteHLT = false,"Ignore HLTAutokey object by default."); // ignore HLTAutoKey objects
-    declareProperty("WriteJetQuality", m_writeJetQuality = false,"Don't write extended jet quality details by default.");
-  }
-  
+      //Only declare the interface
+      declareInterface<IDataRetriever>(this);
+
+      //In xAOD 25Mar14: 
+      //  AntiKt4LCTopoJets, CamKt12LCTopoJets, AntiKt4EMTopoJets, AntiKt4TruthWZJets
+      //  Kt4EMTopoJets, AntiKt10TruthWZJets, Kt4LCTopoJets, AntiKt4TruthJets
+      //  CamKt12TruthJets, AntiKt10TruthJets, CamKt12TruthWZJets, AntiKt10LCTopoJets
+
+      declareProperty("StoreGateKey", m_sgKey  = "AntiKt4EMTopoJets", 
+          "Collection to be first in output, shown in Atlantis without switching");
+      declareProperty("FavouriteJetCollection" ,m_sgKeyFavourite = "AntiKt4TopoEMJets" ,
+          "Collection to be first in output, shown in Atlantis without switching");
+      declareProperty("OtherJetCollections" ,m_otherKeys,
+          "Other collections to be retrieved. If list left empty, all available retrieved");
+      declareProperty("DoWriteHLT", m_doWriteHLT = false,"Ignore HLTAutokey object by default."); // ignore HLTAutoKey objects
+      declareProperty("WriteJetQuality", m_writeJetQuality = false,"Don't write extended jet quality details by default.");
+      declareProperty("TracksName", m_tracksName="InDetTrackParticles_xAOD");
+    }
+
   /**
    * For each jet collections retrieve basic parameters.
    * @param FormatTool the tool that will create formated output from the DataMap
    */
   StatusCode xAODJetRetriever::retrieve(ToolHandle<IFormatTool> &FormatTool) {
-    
+
     if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "in retrieveAll()" << endmsg;
-    
+
     const DataHandle<xAOD::JetContainer> iterator, end;
     const xAOD::JetContainer* Jets;
-    
+
     //obtain the default collection first
     if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "Trying to retrieve " << dataTypeName() << " (" << m_sgKeyFavourite << ")" << endmsg;
     StatusCode sc = evtStore()->retrieve(Jets, m_sgKeyFavourite);
@@ -69,50 +75,50 @@ namespace JiveXML {
     }else{
       DataMap data = getData(Jets);
       if ( FormatTool->AddToEvent(dataTypeName(), m_sgKeyFavourite+"_xAOD", &data).isFailure()){
-	if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Collection " << m_sgKeyFavourite << " not found in SG " << endmsg;
+        if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Collection " << m_sgKeyFavourite << " not found in SG " << endmsg;
       }else{
-         if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << dataTypeName() << " (" << m_sgKeyFavourite << ") Jet retrieved" << endmsg;
+        if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << dataTypeName() << " (" << m_sgKeyFavourite << ") Jet retrieved" << endmsg;
       }
     }
 
     if ( m_otherKeys.empty() ) {
       //obtain all other collections from StoreGate
       if (( evtStore()->retrieve(iterator, end)).isFailure()){
-         if (msgLvl(MSG::WARNING)) msg(MSG::WARNING)  << "Unable to retrieve iterator for Jet collection" << endmsg;
-//        return false;
+        if (msgLvl(MSG::WARNING)) msg(MSG::WARNING)  << "Unable to retrieve iterator for Jet collection" << endmsg;
+        //        return false;
       }
-      
+
       for (; iterator!=end; iterator++) {
 
-	std::string::size_type position = iterator.key().find("HLT",0);
-	if ( m_doWriteHLT ){ position = 99; } // override SG key find
-	if ( position != 0 ){  // SG key doesn't contain HLTAutoKey
-	  if (iterator.key()!=m_sgKeyFavourite) {
-             if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "Trying to retrieve all " << dataTypeName() << " (" << iterator.key() << ")" << endmsg;
-             DataMap data = getData(iterator);
-             if ( FormatTool->AddToEvent(dataTypeName(), iterator.key()+"_xAOD", &data).isFailure()){
-	       if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Collection " << iterator.key() << " not found in SG " << endmsg;
-	    }else{
-	      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << " (" << iterator.key() << ") AODJet retrieved" << endmsg;
-	    }
-	  }
-	}
+        std::string::size_type position = iterator.key().find("HLT",0);
+        if ( m_doWriteHLT ){ position = 99; } // override SG key find
+        if ( position != 0 ){  // SG key doesn't contain HLTAutoKey
+          if (iterator.key()!=m_sgKeyFavourite) {
+            if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "Trying to retrieve all " << dataTypeName() << " (" << iterator.key() << ")" << endmsg;
+            DataMap data = getData(iterator);
+            if ( FormatTool->AddToEvent(dataTypeName(), iterator.key()+"_xAOD", &data).isFailure()){
+              if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Collection " << iterator.key() << " not found in SG " << endmsg;
+            }else{
+              if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << " (" << iterator.key() << ") AODJet retrieved" << endmsg;
+            }
+          }
+        }
       }
     }else {
       //obtain all collections with the given keys
       std::vector<std::string>::const_iterator keyIter,endIter;
       for ( keyIter=m_otherKeys.begin(); keyIter!=m_otherKeys.end(); ++keyIter ){
         if ( !evtStore()->contains<xAOD::JetContainer>( (*keyIter) ) ){ continue; } // skip if not in SG
-	StatusCode sc = evtStore()->retrieve( Jets, (*keyIter) );
-	if (!sc.isFailure()) {
+        StatusCode sc = evtStore()->retrieve( Jets, (*keyIter) );
+        if (!sc.isFailure()) {
           if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG)  << "Trying to retrieve selected " << dataTypeName() << " (" << (*keyIter) << ")" << endmsg;
           DataMap data = getData(Jets);
           if ( FormatTool->AddToEvent(dataTypeName(), (*keyIter)+"_xAOD", &data).isFailure()){
-	    if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Collection " << (*keyIter) << " not found in SG " << endmsg;
-	  }else{
-	     if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << " (" << (*keyIter) << ") retrieved" << endmsg;
-	  }
-	}
+            if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Collection " << (*keyIter) << " not found in SG " << endmsg;
+          }else{
+            if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << dataTypeName() << " (" << (*keyIter) << ") retrieved" << endmsg;
+          }
+        }
       }
     } 
     //All collections retrieved okay
@@ -125,7 +131,7 @@ namespace JiveXML {
    * Also association with clusters and tracks (ElementLink).
    */
   const DataMap xAODJetRetriever::getData(const xAOD::JetContainer* jetCont) {
-    
+
     if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "in getData()" << endmsg;
 
     DataMap DataMap;
@@ -148,6 +154,15 @@ namespace JiveXML {
     DataVect isUgly; isUgly.reserve(jetCont->size());
     DataVect emfrac; emfrac.reserve(jetCont->size());
 
+    DataVect clusterKey; clusterKey.reserve(jetCont->size());
+    DataVect trackKey; trackKey.reserve(jetCont->size());
+    DataVect trackContKey; trackContKey.reserve(jetCont->size());
+    DataVect trackLinkCount; trackLinkCount.reserve(jetCont->size());
+    DataVect clusterID; clusterID.reserve(jetCont->size());
+
+    DataVect cellID; cellID.reserve(jetCont->size());
+    DataVect numCells; numCells.reserve(jetCont->size());
+
     int id = 0;
 
     xAOD::JetContainer::const_iterator jetItr  = jetCont->begin();
@@ -158,41 +173,97 @@ namespace JiveXML {
     double btag2 = 0.;
     double btag3 = 0.;
     for (; jetItr != jetItrE; ++jetItr) {
-    bool isCalo = false;
-    if (msgLvl(MSG::DEBUG)) {
-      msg(MSG::DEBUG) << "  Jet #" << counter++ << " : eta = "  << (*jetItr)->eta() 
+      bool isCalo = false;
+      if (msgLvl(MSG::DEBUG)) {
+        msg(MSG::DEBUG) << "  Jet #" << counter++ << " : eta = "  << (*jetItr)->eta() 
           << ", phi = " << (*jetItr)->phi() 
           << ", pt = " << (*jetItr)->pt() << endmsg;
-    }
+      }
 
-    for( size_t j = 0; j < ( *jetItr )->numConstituents(); ++j ) {
+      //if rawConstituent are CaloClusters, get associated tracks, and mark jet as isCalo
+
+      std::vector<std::string> tempCellID;
+      std::vector<float> clusterKey;
+      std::vector<int> tempTrackKey;
+      std::vector<std::string> tempTrackContKey;
+
+      for( size_t j = 0; j < ( *jetItr )->numConstituents(); ++j ) {
         const xAOD::CaloCluster* cluster =
-            dynamic_cast< const xAOD::CaloCluster* >(
-                  ( *jetItr )->rawConstituent( j ) );
+          dynamic_cast< const xAOD::CaloCluster* >(
+              ( *jetItr )->rawConstituent( j ) );
         if( ! cluster ) {
-               if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "  Associated cluster: n/a" << endmsg; }
+          if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "  Associated cluster: n/a" << endmsg; }
         } else {
-               if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "  Associated cluster: eta = "
-                                << cluster->eta() << ", phi = "
-                                << cluster->phi() << endmsg; 
-		 isCalo = true;}
+
+          isCalo=true;
+          //	  const xAOD::CaloClusterContainer* container = dynamic_cast< const xAOD::CaloClusterContainer* >( cluster);
+          clusterID.push_back(DataType(cluster->index()));
+
+
+          for (const auto& cc : *(cluster->getCellLinks())) {
+            if (std::find(tempCellID.begin(), tempCellID.end(), std::to_string(cc->caloDDE()->identify().get_compact()))!=tempCellID.end()){
+              continue;}
+            else{
+              cellID.push_back(DataType(cc->caloDDE()->identify().get_compact()));
+              tempCellID.push_back(std::to_string(cc->caloDDE()->identify().get_compact()));}
+          }
+
+
+          if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "  Associated cluster: eta = "
+            << cluster->eta() << ", phi = "
+              << cluster->phi() << endmsg; 
+          }
         }
-    }
+      }
+
 
-    // this doesn't work. How to access tracks ?
-    for( size_t j = 0; j < ( *jetItr )->numConstituents(); ++j ) {
-        const xAOD::TrackParticle* track =
-            dynamic_cast< const xAOD::TrackParticle* >(
-                  ( *jetItr )->rawConstituent( j ) );
+      numCells.push_back(DataType(tempCellID.size() ) );
+
+      //if a calo jet try and get the ghost tracks
+      if (isCalo){
+
+        std::vector<const xAOD::TrackParticle*> ghosttracks = (*jetItr)->getAssociatedObjects<xAOD::TrackParticle >(xAOD::JetAttribute::GhostTrack);
+
+        if( ghosttracks.empty() ) {
+          if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "  Associated track: ERROR" << endmsg; }
+	  trackLinkCount.push_back(DataType(0.));
+        }
+        else {
+          for (size_t i=0; i< ghosttracks.size(); i++) {
+
+            //can access the base track class, should be able to get tracker hits?
+            //	  const Trk::Track* baseTrack = dynamic_cast< const Trk::Track* >( ghosttracks[i]->track());
+
+            trackKey.push_back(DataType(ghosttracks[i]->index()));
+            trackContKey.push_back(m_tracksName);
+
+            if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "  Associated track: d0 = "
+              << ghosttracks[i]->d0() << ", pt = "
+                << ghosttracks[i]->pt() << endmsg; }
+          }
+          trackLinkCount.push_back(DataType(ghosttracks.size()));
+        }
+      }
+
+
+      // If rawConstituents are tracks then fill those as associated tracks
+      int trackcounter =0;
+      for( size_t j = 0; j < ( *jetItr )->numConstituents(); ++j ) {
+        const xAOD::TrackParticle* track = dynamic_cast< const xAOD::TrackParticle* >( ( *jetItr )->rawConstituent( j ) );
         if( ! track ) {
-               if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "  Associated track: ERROR" << endmsg; }
-        } else {
-               if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "  Associated track: d0 = "
-                                << track->d0() << ", pt = "
-                                << track->pt() << endmsg; }
+          if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "  Associated track: ERROR" << endmsg; }
         }
-    }
-   
+        else{
+          if(!isCalo){
+            trackKey.push_back(DataType(track->index()));
+            trackContKey.push_back(m_tracksName);
+	    //trackLinkCount.push_back(DataType(
+            trackcounter++;
+	    if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << "  Associated track: d0 = " << track->d0() << ", pt = " << track->pt() << endmsg; }
+          }
+        }
+      }
+      if(!isCalo){trackLinkCount.push_back(DataType(trackcounter));}
 
       phi.push_back(DataType((*jetItr)->phi()));
       eta.push_back(DataType((*jetItr)->eta()));
@@ -206,65 +277,72 @@ namespace JiveXML {
       py.push_back(DataType((*jetItr)->py()/GeV));
       pz.push_back(DataType((*jetItr)->pz()/GeV));
 
-   // bjet tagger values
-	const xAOD::BTagging *bTagJet = (*jetItr)->btagging();
-
-	bTagName.push_back( DataType( "default" ));
-	btag1 = (bTagJet) ? bTagJet->IP3D_loglikelihoodratio() : 0;
-	bTagValue.push_back( btag1 );
-	bTagName.push_back( DataType( "IP3D" ));
-	bTagValue.push_back( btag1 );
-	bTagName.push_back( DataType( "MV1" ));
-	btag2 = (bTagJet) ? bTagJet->MV1_discriminant() : 0;
-	bTagValue.push_back( btag2 );
-	bTagName.push_back( DataType( "SV1" ));
-	btag3 = (bTagJet) ? bTagJet->SV1_loglikelihoodratio() : 0;
-	bTagValue.push_back( btag3 );
-
-   if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << " Jet #" << counter << "; BTagging: MV1: "
-      << btag1 << ", IP3D: " << btag2 << ", SV1: " << btag3 << endmsg; }
-
-// from AnalysisJiveXML:
-//   bTagName.push_back( DataType( "JetFitterTagNN" ));
-//   bTagValue.push_back( DataType( (*itr)->getFlavourTagWeight("JetFitterTagNN") ));
-//
-// code from PaulT, 16Oct14
-/*
-    const xAOD::BTagging *btag = (*jetItr)->btagging();
-    std::cout << "btag " << btag << std::endl;
-    double mv1 = (btag) ? btag->MV1_discriminant() : 0;
-    std::cout <<"mv1 "<< mv1 << std::endl;
-    double ip3d = (btag) ? btag->IP3D_loglikelihoodratio() : 0;
-    std::cout <<"ip3d "<< ip3d << std::endl;
-    double sv1 = (btag) ? btag->SV1_loglikelihoodratio() : 0;
-    std::cout <<"sv1 "<< sv1 << std::endl;
-*/
+      // bjet tagger values
+      const xAOD::BTagging *bTagJet = (*jetItr)->btagging();
+
+
+      bTagName.push_back( DataType( "default" ));
+      if (bTagJet){
+        bTagJet->MVx_discriminant("MV2c10",btag1); 
+      }
+      else{
+        btag1=0;}
+      //    bTagJet->MVx_discriminant("MV2c10",btag1); 
+      //     bTagJet->MVx_discriminant("MV2c10"); 
+      bTagValue.push_back( btag1 );
+      bTagName.push_back(DataType( "MV2c10"));
+      bTagValue.push_back(btag1);
+      bTagName.push_back( DataType( "IP3D" ));
+      btag2 = (bTagJet) ? bTagJet->IP3D_loglikelihoodratio() : 0;
+      bTagValue.push_back( btag2 );
+      bTagName.push_back( DataType( "SV1" ));
+      btag3 = (bTagJet) ? bTagJet->SV1_loglikelihoodratio() : 0;
+      bTagValue.push_back( btag3 );
+
+      if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << " Jet #" << counter << "; BTagging: MV2c10: "
+        << btag1 << ", IP3D: " << btag2 << ", SV1: " << btag3 << endmsg; }
+
+      // from AnalysisJiveXML:
+      //   bTagName.push_back( DataType( "JetFitterTagNN" ));
+      //   bTagValue.push_back( DataType( (*itr)->getFlavourTagWeight("JetFitterTagNN") ));
+      //
+      // code from PaulT, 16Oct14
+      /*
+         const xAOD::BTagging *btag = (*jetItr)->btagging();
+         std::cout << "btag " << btag << std::endl;
+         double mv1 = (btag) ? btag->MV1_discriminant() : 0;
+         std::cout <<"mv1 "<< mv1 << std::endl;
+         double ip3d = (btag) ? btag->IP3D_loglikelihoodratio() : 0;
+         std::cout <<"ip3d "<< ip3d << std::endl;
+         double sv1 = (btag) ? btag->SV1_loglikelihoodratio() : 0;
+         std::cout <<"sv1 "<< sv1 << std::endl;
+         */
       //charge.push_back( DataType( (*jetItr)->charge() )); // charge not directly accessible. placeholder.
 
-// updated for data15
-// from: Reconstruction/MET/METReconstruction/Root/METJetFilterTool.cxx
-	std::vector<float> jvfread;
-	(*jetItr)->getAttribute<std::vector<float> >(xAOD::JetAttribute::JVF,jvfread);
-	if(!(*jetItr)->getAttribute<std::vector<float> >(xAOD::JetAttribute::JVF,jvfread)) {
-	  ATH_MSG_WARNING("Jet JVF unavailable!");
-          jvf.push_back( DataType( 1. ));
-	}else{
-	//ATH_MSG_VERBOSE("Jet JVF = " << jvfread[0]);
-          jvf.push_back( DataType(  jvfread[0] ));
-        }
+      // updated for data15
+      // from: Reconstruction/MET/METReconstruction/Root/METJetFilterTool.cxx
+      std::vector<float> jvfread;
+      (*jetItr)->getAttribute<std::vector<float> >(xAOD::JetAttribute::JVF,jvfread);
+      if(!(*jetItr)->getAttribute<std::vector<float> >(xAOD::JetAttribute::JVF,jvfread)) {
+        ATH_MSG_WARNING("Jet JVF unavailable!");
+        jvf.push_back( DataType( 1. ));
+      }else{
+        //ATH_MSG_VERBOSE("Jet JVF = " << jvfread[0]);
+        jvf.push_back( DataType(  jvfread[0] ));
+      }
 
-  if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << " JVF: " << jvfread[0] 
- 	<< " EMFrac: " << (*jetItr)->auxdata<float>("EMFrac") 
-	<< endmsg; }
+      if (msgLvl(MSG::VERBOSE)) { msg(MSG::VERBOSE) << " JVF: " << jvfread[0] 
+        << " EMFrac: " << (*jetItr)->auxdata<float>("EMFrac") 
+          << endmsg; }
 
       isGood.push_back( DataType( -1111. )); // not anymore defined ? 
-//// this is defined in xAOD-JetAttribute, but doesn't work with data15:
-//      isBad.push_back( DataType( (*jetItr)->auxdata<float>("isBadMedium") ));
-//      isUgly.push_back( DataType( (*jetItr)->auxdata<float>("isUgly") ));
+      //// this is defined in xAOD-JetAttribute, but doesn't work with data15:
+      //      isBad.push_back( DataType( (*jetItr)->auxdata<float>("isBadMedium") ));
+      //      isUgly.push_back( DataType( (*jetItr)->auxdata<float>("isUgly") ));
       isBad.push_back( DataType( -1111. ));
       isUgly.push_back( DataType( -1111. ));
-      if (isCalo == true){
-      emfrac.push_back( DataType( (*jetItr)->auxdata<float>("EMFrac") )); 
+      if (isCalo){
+        emfrac.push_back( DataType( (*jetItr)->auxdata<float>("EMFrac") )); 
       }
       else { emfrac.push_back( DataType( 0. ));
       }
@@ -279,7 +357,7 @@ namespace JiveXML {
     DataMap["mass"] = mass;
     DataMap["bTagName multiple=\"4\""] = bTagName; // assigned by hand !
     DataMap["bTagValue multiple=\"4\""] = bTagValue;
-//    DataMap["charge"] = charge;
+    //    DataMap["charge"] = charge;
     DataMap["id"] = idVec;
     DataMap["px"] = px;
     DataMap["py"] = py;
@@ -291,6 +369,24 @@ namespace JiveXML {
     DataMap["isUgly"] = isUgly;
     DataMap["emfrac"] = emfrac;
 
+    if ((trackKey.size()) != 0){
+      double NTracksPerVertex = trackKey.size()*1./jetCont->size();
+      std::string tag = "trackIndex multiple=\"" +DataType(NTracksPerVertex).toString()+"\"";
+      DataMap[tag] = trackKey;
+      tag = "trackKey multiple=\"" +DataType(NTracksPerVertex).toString()+"\"";
+      DataMap[tag] = trackContKey;
+    }
+
+    if ((clusterID.size())!=0){
+      std::string tag = "clusterIndex multiple=\"" + DataType(clusterID.size()).toString()+"\"";
+      double NCellsPerJet = cellID.size()*1./jetCont->size();
+      tag = "cells multiple=\"" +DataType(NCellsPerJet).toString()+"\"";
+      DataMap[tag]=cellID;
+    }
+
+    DataMap["trackLinkCount"] = trackLinkCount;
+    DataMap["numCells"] = numCells;
+
     if (msgLvl(MSG::DEBUG)) {
       msg(MSG::DEBUG) << dataTypeName() << " retrieved with " << phi.size() << " entries"<< endmsg;
     }
@@ -301,5 +397,5 @@ namespace JiveXML {
   } // retrieve
 
   //--------------------------------------------------------------------------
-  
+
 } // JiveXML namespace
diff --git a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/xAODJiveXML/xAODJetRetriever.h b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/xAODJiveXML/xAODJetRetriever.h
index 17d6b4f923175977b6fb27ff59ac43c66fbedea9..c58468e1c2c2033708a1d97a11c63a1139c41eaf 100755
--- a/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/xAODJiveXML/xAODJetRetriever.h
+++ b/PhysicsAnalysis/AnalysisEventDisplay/xAODJiveXML/xAODJiveXML/xAODJetRetriever.h
@@ -50,9 +50,11 @@ namespace JiveXML{
 
       std::string m_sgKey;
       std::string m_sgKeyFavourite;
+      std::string m_tracksName;
       std::vector<std::string> m_otherKeys;
       bool m_doWriteHLT;
       bool m_writeJetQuality;
+      
       };
 }
 #endif
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/doc/packagedoc.h b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/doc/packagedoc.h
index a2fdfea4910d1ff0d260b95d315c564b225bc105..0fe42bb1105bffdde6ad2837fa9c9d6814c672e6 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerAlgs/doc/packagedoc.h
@@ -36,14 +36,4 @@ This package contains some algorithms to create Trigger ESD/AOD objects.
 
 @section AnalysisTriggerAlgs_AnalysisTriggerAlgs Extra Pages
 
-- @ref used_AnalysisTriggerAlgs
-- @ref requirements_AnalysisTriggerAlgs
-*/
-
-/**
-   @page used_AnalysisTriggerAlgs Used Packages
-*/
-
-/**
-   @page requirements_AnalysisTriggerAlgs Requirements
 */
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent/doc/packagedoc.h b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent/doc/packagedoc.h
index 621dccdeb4e02e030da1dbb1c25c59331c0380bf..074bac97f65fe61fbabee96d42bd868069b74773 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent/doc/packagedoc.h
@@ -28,14 +28,4 @@
 
 @section AnalysisTriggerEvent_AnalysisTriggerEvent Extra Pages
 
-   - @ref used_AnalysisTriggerEvent
-   - @ref requirements_AnalysisTriggerEvent
-*/
-
-/**
-   @page used_AnalysisTriggerEvent Used Packages
-*/
-
-/**
-   @page requirements_AnalysisTriggerEvent Requirements
 */
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventAthenaPool/doc/packagedoc.h b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventAthenaPool/doc/packagedoc.h
index 71aee13fdb563b5be33ab24562b63bed56fe785e..a3fb34799382b272ba12f7911defd8ce1000ccd6 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventAthenaPool/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventAthenaPool/doc/packagedoc.h
@@ -8,8 +8,6 @@
 @section AnalysisTriggerEventAthenaPool_introductionAnalysisTriggerEventAthenaPool Introduction
 AnalysisTriggerEventAthenaPool contains POOL converters for Trigger ESD/AOD.
 
-@section AnalysisTriggerEventAthenaPool_used_packagesAnalysisTriggerEventAthenaPool Used packages
 
-@section AnalysisTriggerEventAthenaPool_requirementsAnalysisTriggerEventAthenaPool Requirements
 
 */
diff --git a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventTPCnv/doc/packagedoc.h b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventTPCnv/doc/packagedoc.h
index 73122f77b43936a766173196f1c5c54704c2f974..ff1ad0c2dddff37d80b94cf425936f20dc118f58 100644
--- a/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventTPCnv/doc/packagedoc.h
+++ b/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEventTPCnv/doc/packagedoc.h
@@ -31,14 +31,4 @@ and the corresponding T/P converter.
 
 @section AnalysisTriggerEventTPCnv_AnalysisTriggerEventTPCnv Extra Pages
 
-- @ref used_AnalysisTriggerEventTPCnv
-- @ref requirements_AnalysisTriggerEventTPCnv
-*/
-
-/**
-   @page used_AnalysisTriggerEventTPCnv Used Packages
-*/
-
-/**
-   @page requirements_AnalysisTriggerEventTPCnv Requirements
 */
diff --git a/PhysicsAnalysis/AthenaROOTAccess/AthenaROOTAccess/DataBucketVoid.h b/PhysicsAnalysis/AthenaROOTAccess/AthenaROOTAccess/DataBucketVoid.h
index 0c2ebee951073b186d5142299ea53d8359790cc7..5ce41e9dfea8081c69947531f38eefbc2331e7e4 100755
--- a/PhysicsAnalysis/AthenaROOTAccess/AthenaROOTAccess/DataBucketVoid.h
+++ b/PhysicsAnalysis/AthenaROOTAccess/AthenaROOTAccess/DataBucketVoid.h
@@ -87,7 +87,7 @@ public:
    */
   virtual void* cast (CLID clid,
                       SG::IRegisterTransient* itr = 0,
-                      bool isConst =true) const override;
+                      bool isConst =true) override;
 
 
   /**
@@ -100,7 +100,7 @@ public:
    */
   virtual void* cast (const std::type_info& tinfo,
                       SG::IRegisterTransient* itr = 0,
-                      bool isConst = true) const override;
+                      bool isConst = true) override;
 
   /**
    * @brief Return a new @c DataBucket whose payload has been cloned from the
diff --git a/PhysicsAnalysis/AthenaROOTAccess/python/transientTree.py b/PhysicsAnalysis/AthenaROOTAccess/python/transientTree.py
index 87c9e8867a837697c62a0766de4c65121886956a..9c676ad3239ef58bc74602c338ed2c13a3142c03 100755
--- a/PhysicsAnalysis/AthenaROOTAccess/python/transientTree.py
+++ b/PhysicsAnalysis/AthenaROOTAccess/python/transientTree.py
@@ -1011,10 +1011,6 @@ def get_DataHeader_p5 (dh_tree):
 # Make sure this is loaded, so we can call it from the C++ converters.
 ROOT.TDatabasePDG
 
-#Workarounds for root bugs. Needed to do e.g. tree.GetEntry(0)
-ROOT.RootUtils.ScanForAbstract.initialize()
-ROOT.RootUtils.StdHackGenerator.initialize()
-
 # Initialize the history, except if we're using the CINT shell.
 if ROOT.gApplication.GetName() != "TRint":
     ROOT.RootUtils.InitHist.initialize()
diff --git a/PhysicsAnalysis/AthenaROOTAccess/src/DataBucketVoid.cxx b/PhysicsAnalysis/AthenaROOTAccess/src/DataBucketVoid.cxx
index 5ba6c23c54345c6e7f2b3bd097e059654ef3efb0..736fa45616e01cae922b9fa428f5feaca313641a 100755
--- a/PhysicsAnalysis/AthenaROOTAccess/src/DataBucketVoid.cxx
+++ b/PhysicsAnalysis/AthenaROOTAccess/src/DataBucketVoid.cxx
@@ -118,7 +118,7 @@ const std::type_info& DataBucketVoid::tinfo() const
  */
 void* DataBucketVoid::cast (CLID /*clid*/,
                             SG::IRegisterTransient* /*itr = 0*/,
-                            bool /*isConst = true*/) const
+                            bool /*isConst = true*/)
 {
   // ??? unimplemented
   abort();
@@ -135,7 +135,7 @@ void* DataBucketVoid::cast (CLID /*clid*/,
  */
 void* DataBucketVoid::cast (const std::type_info& tinfo,
                             SG::IRegisterTransient* /*itr = 0*/,
-                            bool /*isConst = true*/) const
+                            bool /*isConst = true*/)
 {
   // If the requested type is the same as the held type,
   //no conversion is needed.
diff --git a/PhysicsAnalysis/AthenaROOTAccess/src/ProxyMap.cxx b/PhysicsAnalysis/AthenaROOTAccess/src/ProxyMap.cxx
index 1d545b77724ff04a74089c5d24979d74cc5fb173..4b0609bbc52fa1d5182288e1702de79c7715d1b3 100755
--- a/PhysicsAnalysis/AthenaROOTAccess/src/ProxyMap.cxx
+++ b/PhysicsAnalysis/AthenaROOTAccess/src/ProxyMap.cxx
@@ -1093,7 +1093,7 @@ ProxyMap::addToStore (CLID id, SG::DataProxy* proxy)
   if (proxy == 0)
     return StatusCode::FAILURE;
 
-  sgkey_t sgkey = proxy->transientAddress()->sgkey();
+  sgkey_t sgkey = proxy->sgkey();
   if (m_proxymap.find (sgkey) != m_proxymap.end())
     return StatusCode::FAILURE;
 
diff --git a/PhysicsAnalysis/BPhys/BPhysTagTools/doc/packagedoc.h b/PhysicsAnalysis/BPhys/BPhysTagTools/doc/packagedoc.h
index f41586e7a3b88d840572a77b4258995a6c30c5d8..2d1ff30da1894166d266d206eecfac8833d71a72 100644
--- a/PhysicsAnalysis/BPhys/BPhysTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/BPhys/BPhysTagTools/doc/packagedoc.h
@@ -16,10 +16,6 @@ BPhysTagTools contains the following tools:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section BPhysTagTools_used_packagesBPhysTagTools Used packages
 
-@section BPhysTagTools_requirementsBPhysTagTools Requirements
 
 */
-
-
diff --git a/PhysicsAnalysis/D2PDMaker/share/D2PD_topOptions.py b/PhysicsAnalysis/D2PDMaker/share/D2PD_topOptions.py
index 3dabcc4b9f94eb830270764ad12c17a7b31ffdc4..a89869b5cf588e42c12720314f22137d5842d7fd 100644
--- a/PhysicsAnalysis/D2PDMaker/share/D2PD_topOptions.py
+++ b/PhysicsAnalysis/D2PDMaker/share/D2PD_topOptions.py
@@ -57,14 +57,10 @@ D2PDFlags.WriteDAOD_H4lBremRecStream.ApplySkimming = False
 from AthenaCommon.AthenaCommonFlags import jobproperties as jp
 #jp.AthenaCommonFlags.FilesInput=["/afs/cern.ch/atlas/project/PAT/data/data.physics_Egamma.AOD.pool.root"]
 
-#myPath = "/eos/atlas/atlasgroupdisk/phys-higgs/dq2/mc12_8TeV/AOD/e1191_s1469_s1470_r3542_r3549/mc12_8TeV.160156.PowhegPythia8_AU2CT10_ggH130_ZZ4lep.merge.AOD.e1191_s1469_s1470_r3542_r3549_tid781452_00/"
-myPath = "/eos/atlas/atlasgroupdisk/phys-higgs/dq2/mc12_8TeV/AOD/e1191_s1469_s1470_r3542_r3549/mc12_8TeV.160155.PowhegPythia8_AU2CT10_ggH125_ZZ4lep.merge.AOD.e1191_s1469_s1470_r3542_r3549_tid781451_00/"
-
-
-from InDetBeamSpotExample import DiskUtils
-inFileList = DiskUtils.filelist( myPath, "root://eosatlas.cern.ch/" )
-jp.AthenaCommonFlags.FilesInput = inFileList
-#jp.AthenaCommonFlags.FilesInput=["root://eosatlas.cern.ch//eos/atlas/atlasgroupdisk/phys-higgs/dq2/mc12_8TeV/AOD/e1191_s1469_s1470_r3542_r3549/mc12_8TeV.160155.PowhegPythia8_AU2CT10_ggH125_ZZ4lep.merge.AOD.e1191_s1469_s1470_r3542_r3549_tid781451_00/AOD.781451._000019.pool.root.1"]
+from glob import glob
+myPath = "/eos/atlas/atlasgroupdisk/phys-higgs/dq2/mc12_8TeV/AOD/e1191_s1469_s1470_r3542_r3549/mc12_8TeV.160155.PowhegPythia8_AU2CT10_ggH125_ZZ4lep.merge.AOD.e1191_s1469_s1470_r3542_r3549_tid781451_00/*"
+jp.AthenaCommonFlags.FilesInput = glob(myPath)
+#jp.AthenaCommonFlags.FilesInput=["/eos/atlas/atlasgroupdisk/phys-higgs/dq2/mc12_8TeV/AOD/e1191_s1469_s1470_r3542_r3549/mc12_8TeV.160155.PowhegPythia8_AU2CT10_ggH125_ZZ4lep.merge.AOD.e1191_s1469_s1470_r3542_r3549_tid781451_00/AOD.781451._000019.pool.root.1"]
 
 # ==============================================================================
 # You can change the location and name of your output file with
diff --git a/PhysicsAnalysis/D2PDMaker/src/D2PDTrackParticleSelector.cxx b/PhysicsAnalysis/D2PDMaker/src/D2PDTrackParticleSelector.cxx
index 3ee8850cf4dad39337421851ac6b0bf0fe91cdb7..c6fd70ea11fb9e0d707b40c1990e3b2899c60a80 100644
--- a/PhysicsAnalysis/D2PDMaker/src/D2PDTrackParticleSelector.cxx
+++ b/PhysicsAnalysis/D2PDMaker/src/D2PDTrackParticleSelector.cxx
@@ -204,7 +204,7 @@ StatusCode D2PDTrackParticleSelector::processObject( const Rec::TrackParticle* t
           int nSctHits(0);
           int nSiliconHits(0);
           int nTrtHits(0);
-          nBLayHits    = trackSum->get(Trk::numberOfBLayerHits);
+          nBLayHits    = trackSum->get(Trk::numberOfInnermostPixelLayerHits);
           nPixelHits   = trackSum->get(Trk::numberOfPixelHits);
           nSctHits     = trackSum->get(Trk::numberOfSCTHits);
           nSiliconHits = nPixelHits + nSctHits + nBLayHits;
diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileDigitsGetterTool.cxx b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileDigitsGetterTool.cxx
index d845f5e23a77c792418860fd1cac4ec878139304..c2b17e593b2231fde9739315c3c454e8c04b4665 100755
--- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileDigitsGetterTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileDigitsGetterTool.cxx
@@ -61,8 +61,7 @@ namespace D3PD{
             m_digItr=m_digEnd;
             return StatusCode::SUCCESS;
         }
-        DataLinkVector<TileDigitsCollection>::DataHolder* holder=&(*m_evtItr);
-        const TileDigitsCollection* col=holder->getDataPtr();
+        const TileDigitsCollection* col=*m_evtItr;
         m_digItr=col->begin();
         m_digEnd=col->end();
 
@@ -71,7 +70,6 @@ namespace D3PD{
 
     const void* SGTileDigitsGetterTool::nextUntyped(){
         const TileDigits* tileD=0;
-        DataLinkVector<TileDigitsCollection>::DataHolder* holder=0;
         const TileDigitsCollection* col=0;
         do{
             if(m_evtItr==m_evtEnd)return 0;
@@ -79,8 +77,7 @@ namespace D3PD{
                 tileD=0;
                 ++m_evtItr;
                 if(m_evtItr!=m_evtEnd){
-                    holder=&(*m_evtItr);
-                    col=holder->getDataPtr();
+                    col=*m_evtItr;
                     m_digItr=col->begin();
                     m_digEnd=col->end();
                 }
diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileDigitsGetterTool.h b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileDigitsGetterTool.h
index 758e25f66ddf874f4821ddb059e7303b2a77d7a9..fe9e065629185415d82bf68177c50814057e5789 100755
--- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileDigitsGetterTool.h
+++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileDigitsGetterTool.h
@@ -45,23 +45,7 @@ namespace D3PD {
         TileDigitsCollection::const_iterator m_digItr,m_digEnd;
 
     };
-// Template specialization for rel 16.5.0
-//    template <>
-//    struct Deref<TileDigitsCollection*>{
-//        typedef DataLinkVector<TileDigitsCollection>::DataHolder DH;
-//        typedef TileDigitsCollection type;
-//        static const type* deref (DH* p) { return p->getDataPtr(); }
-//    };
-//------------------------------------    
-    
-// Template specialization for rel 16.6.2
-    template <>
-    struct Deref<TileDigitsContainer,TileDigitsCollection*>{
-        typedef TileDigitsContainer::const_iterator it;
-        typedef TileDigitsCollection type;
-        static const type* deref (it& p) { return p->getDataPtr(); }
-    };
-//-------------------------------------
+
 
 }
 
diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileHitGetterTool.h b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileHitGetterTool.h
index 7dfb92037133e723724c74ae0b82da324b6d5901..38b5cbb3bc4377819757ad095868897596bc5f00 100644
--- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileHitGetterTool.h
+++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileHitGetterTool.h
@@ -44,15 +44,7 @@ namespace D3PD {
         TileHitVector::const_iterator m_evtItr,m_evtEnd;
 
     };
-    
-// Template specialization for rel 16.6.2
-//    template <>
-//    struct Deref<TileHitVector,TileHitCollection*>{
-//        typedef TileHitVector::const_iterator it;
-//        typedef TileHitCollection type;
-//        static const type* deref (it& p) { return p->getDataPtr(); }
-//    };
-//-------------------------------------
+
 
 }
 
diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileModuleBitsGetterTool.cxx b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileModuleBitsGetterTool.cxx
index b81f37a60ff8d9a9997759c38efb3a202c9c85d0..247644fee3879f7ea52fe0ce6f01f8e3199a2436 100644
--- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileModuleBitsGetterTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileModuleBitsGetterTool.cxx
@@ -64,12 +64,10 @@ namespace D3PD{
     }
 
     const void* SGTileModuleBitsGetterTool::nextUntyped(){
-        DataLinkVector<TileRawChannelCollection>::DataHolder* holder=0;
         const TileRawChannelCollection* col=0;
         do{
             if(m_evtItr==m_evtEnd)return 0;            
-            holder=&(*m_evtItr);
-            col=holder->getDataPtr();
+            col=*m_evtItr;
             ++m_evtItr;
         }while(!col);
 
diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileRawChannelGetterTool.cxx b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileRawChannelGetterTool.cxx
index 120fa0a0726f14d7a1300ad7ab0de3f4616f80ec..61836fb8ebef6214a2efcd3257e821a53abfc1f9 100755
--- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileRawChannelGetterTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileRawChannelGetterTool.cxx
@@ -60,8 +60,7 @@ namespace D3PD{
             m_digItr=m_digEnd;
             return StatusCode::SUCCESS;
         }
-        DataLinkVector<TileRawChannelCollection>::DataHolder* holder=&(*m_evtItr);
-        const TileRawChannelCollection* col=holder->getDataPtr();
+        const TileRawChannelCollection* col=*m_evtItr;
         m_digItr=col->begin();
         m_digEnd=col->end();
 
@@ -70,7 +69,6 @@ namespace D3PD{
 
     const void* SGTileRawChannelGetterTool::nextUntyped(){
         const TileRawChannel* tileR=0;
-        DataLinkVector<TileRawChannelCollection>::DataHolder* holder=0;
         const TileRawChannelCollection* col=0;
         do{
             if(m_evtItr==m_evtEnd)return 0;
@@ -78,8 +76,7 @@ namespace D3PD{
                 tileR=0;
                 ++m_evtItr;
                 if(m_evtItr!=m_evtEnd){
-                    holder=&(*m_evtItr);
-                    col=holder->getDataPtr();
+                    col=*m_evtItr;
                     m_digItr=col->begin();
                     m_digEnd=col->end();
                 }
diff --git a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileRawChannelGetterTool.h b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileRawChannelGetterTool.h
index a1e46516bce3896c24fa04e10acb1aa943583083..0afc7939c8e97baf61df79f8f6c01a27ca93844e 100755
--- a/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileRawChannelGetterTool.h
+++ b/PhysicsAnalysis/D3PDMaker/CaloD3PDMaker/src/SGTileRawChannelGetterTool.h
@@ -44,23 +44,7 @@ namespace D3PD{
         TileRawChannelCollection::const_iterator m_digItr,m_digEnd;
     };
 
-// Template specialization for rel 16.5.0
-//    template <>
-//    struct Deref<TileRawChannelCollection*>{
-//        typedef DataLinkVector<TileRawChannelCollection>::DataHolder DH;
-//        typedef TileRawChannelCollection type;
-//        static const type* deref (DH* p) { return p->getDataPtr(); }
-//    };
-//------------------------------------
 
-// Template specialization for rel 16.6.2
-    template <>
-    struct Deref<TileRawChannelContainer,TileRawChannelCollection*>{
-        typedef TileRawChannelContainer::const_iterator it;
-        typedef TileRawChannelCollection type;
-        static const type* deref (it& p) { return p->getDataPtr(); }
-    };
-//-------------------------------------
 
 }
 #endif	/* SGTILERAWCHANNELGETTERTOOL_H */
diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/doc/muon-variables b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/doc/muon-variables
index 916620771b39d7053fa50dc1bf27dc1cdb9a8851..a0e082a2c1d71439c308dbcdcecbc50e81dbe9dd 100644
--- a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/doc/muon-variables
+++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/doc/muon-variables
@@ -164,12 +164,12 @@ Quality                                 tight
 
 Detail 2
 
-MuonHitsSummary numberOfBLayerHits      nBLHits
+MuonHitsSummary numberOfInnermostPixelLayerHits      nBLHits
 MuonHitsSummary numberOfPixelHits       nPixHits
 MuonHitsSummary numberOfSCTHits         nSCTHits
 MuonHitsSummary numberOfTRTHits         nTRTHits
 MuonHitsSummary numberOfTRTHighThresholdHits nTRTHighTHits
-MuonHitsSummary numberOfBLayerSharedHits nBLSharedHits
+MuonHitsSummary numberOfInnermostPixelLayerSharedHits nBLSharedHits
 MuonHitsSummary numberOfPixelSharedHits nPixSharedHits
 MuonHitsSummary numberOfPixelHoles      nPixHoles
 MuonHitsSummary numberOfSCTSharedHits   nSCTSharedHits
diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/scripts/mySetupWorkArea.py b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/scripts/mySetupWorkArea.py
deleted file mode 100755
index 1fb5041d0ca55ceb8e9c18cbceed10a36b2c9cfd..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/scripts/mySetupWorkArea.py
+++ /dev/null
@@ -1,248 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-# @file: setupWorkArea.py
-# @purpose: fill the stubs of the WorkArea package so that all the local
-#           CMT packages can be recompiled in one go.
-# @date: June 2006
-# @author: Sebastien Binet
-
-# /!\ Warning /!\
-# I am relying on the following assumption:
-#  - you have a working Release environment
-#     ==> a valid CMTPATH environment variable
-#     ==> python-2.4 (this needs to be addressed!!)
-
-# example0:
-# ./setupWorkArea.py
-# ==> will :
-#  - install a CMT package called WorkArea under the first directory found
-#    in the CMTPATH environment variable
-#  - put use statements for all the CMT packages (recursively) found under
-#    the first directory of the CMTPATH environment variable
-
-# example1:
-# ./setupWorkArea.py -i ~/Athena/dev -S ~/cmtSuppressList -w $CMTPATH
-# ==> will :
-#  - install a CMT package called WorkArea under the dir. ~/Athena/dev
-#  - put use statements for all the CMT packages (recursively) found under
-#    the ':' separated list of paths (=$CMTPATH)
-#  - and only if these packages are not found in the cmtSuppressList
-
-# example2:
-# ./setupWorkArea.py -s "['Foo']"
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - remove any 'use statement' for packages called "Foo"
-
-# example3:
-# ./setupWorkArea.py --suppress-list "['Foo']"
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - remove any 'use statement' for packages called "Foo"
-
-# example4:
-# ./setupWorkArea.py --suppress-list "['Foo']" --runtime Core
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - remove any 'use statement' for packages called "Foo"
-# - use only the AtlasCoreRunTime environment
-
-# example5:
-# ./setupWorkArea.py -r Core
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - use only the AtlasCoreRunTime environment
-
-# example6:
-# ./setupWorkArea.py -g (or --group-area)
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the $GroupArea environment variable
-# Note that one can specify the ':' separated list of Group areas directories:
-# --group-area=${SomeVariable}:${GroupArea}:${SomethingElse}
-# -g ${MyGroupArea}
-
-import sys
-import os
-import getopt
-import string
-
-from PyUtils.Logging import logging
-
-__version__ = "$Revision: 1.7 $"
-
-##########################
-# recognized user options
-##########################
-_useropts = 's:i:hl:S:w:r:gv'
-_userlongopts = [ 'suppress-list=',  'install-dir=',
-                  'help',            'loglevel=',
-                  'suppress-file=',
-                  'work-area=',
-                  'runtime=',
-                  'group-area',
-                  'version' ]
-
-def _usage():
-   print """Accepted command line options (CLI):
-   -s, --suppress-list <list> ...  list of package names to ignore.
-   -S, --suppress-file <file> ...  path to a file containing the suppress list.
-   -i, --install-dir <path>   ...  directory where to install the WorkArea pkg
-   -w, --work-area <dir1:d2>  ...  directories under which the packages for the
-                                   WorkArea pkg are installed.
-   -g, --group-area <dir1:d2> ...  directories under which the packages for the
-                                   GroupArea are looked for.
-                                   If no argument is given, it will try to
-                                   look for the $GroupArea environment
-                                   variable.
-   -r, --runtime <runtimePkg> ...  runtime package one wants to work with.
-                                   Default is AtlasOfflineRunTime.
-                                   Allowed values: core, event, conditions,
-                                                   simulation, reconstruction,
-                                                   trigger, analysis,
-                                                   production, point1,
-                                                   offline
-   -h, --help                 ...  print this help message
-   -l, --loglevel <level>     ...  logging level (DEBUG, INFO, WARNING, ERROR, FATAL)
-   -v, --version              ...  print version number
-   """
-   return
-
-from myWorkAreaLib import *
-
-def _processOptions( useropts, userlongopts ):
-
-    log = logging.getLogger("WorkAreaMgr")
-
-    runTimePkgAllowedValues = [ "core",
-                                "event",
-                                "conditions",
-                                "simulation",
-                                "reconstruction",
-                                "trigger",
-                                "analysis",
-                                "production",
-                                "point1",
-                                "tier0",
-                                "hlt",
-                                "offline",
-                                ]
-    # defaults
-    workAreas  = []
-    installDir = None
-    runTimePkg = "offline"
-    suppressList = []
-    lvl = logging.INFO
-    
-    try:
-        optlist,args = getopt.getopt( sys.argv[1:],
-                                      useropts,
-                                      userlongopts )
-    except getopt.error:
-        log.error( "%s" % sys.exc_value )
-        _usage()
-        sys.exit(2)
-
-    for opt, arg in optlist:
-        if opt in ('-h', '--help' ):
-            _usage()
-            sys.exit()
-        elif opt in ('-v', '--version'):
-            print WORKAREA_VERSION
-            print "By Sebastien Binet"
-            sys.exit()
-        elif opt in ('-i', '--install-dir'):
-            installDir = os.path.expanduser( os.path.expandvars(arg) )
-        elif opt in ('-s', '--suppress-list'):
-            exec( 'suppressList += %s' % arg )
-            #suppressList = arg
-        elif opt in ('-S', '--suppress-file'):
-            suppressFileName = os.path.expanduser( os.path.expandvars(arg) )
-            if os.path.exists( suppressFileName ):
-                suppressFile = open( suppressFileName, 'r' )
-                for line in suppressFile.readlines():
-                    for l in line.splitlines():
-                        suppressList.append( l.strip() )
-                        pass
-                    pass
-                pass
-            else:
-                log.error("Could NOT access this file [%s]" % suppressFileName)
-                pass
-        elif opt in ('-w', '--work-area'):
-            workAreaDirs = os.path.expanduser( os.path.expandvars(arg) )
-            if workAreaDirs.count(os.pathsep) > 0:
-               workAreaDirs = workAreaDirs.split(os.pathsep)
-               pass
-            for workAreaDir in workAreaDirs:
-                if os.path.exists( workAreaDir ):
-                    if os.access(workAreaDir, os.R_OK):
-                        workAreas.append( os.path.abspath(workAreaDir) )
-                        pass
-                    else:
-                        log.error( "Can't read from [%s] !!" % workAreaDir )
-                        pass
-                    pass
-                else:
-                    log.error("Directory does NOT exists [%s] !" % workAreaDir)
-                    pass
-                pass
-        elif opt in ('-g', '--group-area'):
-           if len(arg) == 0:
-              arg = os.environ.get("GroupArea") or ""
-              pass
-           groupAreaDirs = os.path.expanduser( os.path.expandvars(arg) )
-           if groupAreaDirs.count(os.pathsep) > 0:
-              groupAreaDirs = groupAreaDirs.split(os.pathsep)
-              pass
-           for groupAreaDir in groupAreaDirs:
-              if os.path.exists( groupAreaDir ):
-                 if os.access(groupAreaDir, os.R_OK):
-                    workAreas.append( groupAreaDir )
-                    pass
-                 else:
-                    log.error( "Can't read from [%s] !!" % groupAreaDir )
-                    pass
-                 pass
-              else:
-                 log.error("Directory does NOT exists [%s] !" % groupAreaDir)
-                 pass
-              pass
-        elif opt in ('-r', '--runtime'):
-           if arg.lower() in runTimePkgAllowedValues:
-              runTimePkg = arg
-           else:
-              log.error( "Unknown runtime package [%s]" % arg )
-              log.error( "Must be one of: %s" % str(runTimePkgAllowedValues) )
-              pass
-        elif opt in ('-l', '--loglevel'):
-            lvl = string.upper( arg )
-            logLevel = getattr(logging, lvl)
-            log.setLevel(logLevel)
-            del lvl,logLevel
-            pass
-        else:
-            pass
-        pass
-
-    return workAreas, installDir, runTimePkg, suppressList
-    
-if __name__ == "__main__":
-
-    msg = logging.getLogger('WorkAreaMgr')
-    msg.setLevel(logging.INFO)
-    
-    ## process user options
-    workAreas,  installDir,  \
-    runTimePkg, suppressList = _processOptions( _useropts, _userlongopts )
-
-    createWorkArea( workAreas, installDir, runTimePkg, suppressList )
-    pass
diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/scripts/myWorkAreaLib.py b/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/scripts/myWorkAreaLib.py
deleted file mode 100644
index c21847211e8ea2736909970374514f2ad424f517..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/D3PDMakerConfig/scripts/myWorkAreaLib.py
+++ /dev/null
@@ -1,380 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file myWorkAreaLib
-# @purpose factor out some useful methods out of setupWorkArea for clients
-
-import os, sys
-from PyCmt.Logging import logging
-from PyCmt.Cmt import CmtPkg, CmtStrings
-
-__version__ = '$Revision$'
-
-WORKAREA_VERSION = "WorkArea-00-00-00"
-
-# a list of directory names one should not bother inspecting
-_ignore_dir_list = [
-    "i686-",
-    "x86_64-",
-    "CVS",
-    ".svn",
-    "o..pacman..o",
-    "InstallArea",
-    ]
-
-def _is_in_ignore_dir_list(pathname):
-    return all(map(pathname.count, _ignore_dir_list))
-
-def listCmtDirs( path ):
-    """Return the list of paths pointing at 'cmt' directories, accessible
-    from the `path` path.
-    """
-
-    msg = logging.getLogger( "WorkAreaMgr" )
-    
-    cmtDirs = []
-    
-    # fill list of CMT directories
-    import os
-    import os.path as osp
-    for root, dirs, files in os.walk(path):
-        for d in dirs[:]:
-            if _is_in_ignore_dir_list(d):
-                dirs.remove(d)
-        for d in dirs:
-            if d == CmtStrings.CMTDIR:
-                full_name = osp.join(root, d)
-                msg.debug("\t==> found %s" % full_name)
-                cmtDirs.append(full_name)
-    return cmtDirs
-
-def scan( scanDir = os.curdir, suppressList = ["WorkArea"] ):
-    """Search for CMT packages in the given directory and walk down the
-    directory tree.
-    Return the list of found CMT packages.
-    """
-    msg = logging.getLogger( "WorkAreaMgr" )
-    msg.info( "Scanning [%s]" % scanDir )
-    
-    # return value
-    cmtPackages = []
-    
-    # retrieve all cmt-ised directories in the scan directory
-    scanDir = os.path.abspath( scanDir )
-
-    cmtDirs = []
-    try:
-        cmtDirs = listCmtDirs(scanDir)
-    except KeyboardInterrupt:
-        msg.warning( "Scanning has been STOPPED ! (by you)" )
-        pass
-    
-    for cmtDir in cmtDirs:
-        cmtPkg = createCmtPkg(cmtDir)
-        if cmtPkg != None and \
-           cmtPkg.name not in suppressList:
-            cmtPackages.append( cmtPkg )
-        pass
-    
-    return cmtPackages
-
-def createCmtPkg( cmtDir ):
-    """
-    the cmtDir is assumed to be of the form Xyz/cmt
-    One has also to handle the case with or without version-directory
-    """
-    msg = logging.getLogger("WorkAreaMgr")
-    
-    pkgName = None
-    # the CMTREQFILE should provide the name of package
-    # so we extract it from this file
-    try:
-        reqFile = open( os.path.join( cmtDir, CmtStrings.CMTREQFILE ), 'r' )
-        for line in reqFile.readlines():
-            line = line.strip()
-            if len(line) > 0  and \
-               line[0] != "#" and \
-               line.count("package ") > 0:
-                pkgName = line.splitlines()[0]\
-                          .split("package ")[1]\
-                          .replace("\r","")\
-                          .split("#")[0]\
-                          .strip()
-                break
-            pass
-        reqFile.close()
-        del reqFile
-    except IOError:
-        ## No CMTREQFILE in this directory
-        ## ==> not a CMT package then ?
-        ## check if there is any CMT project file instead
-        if not os.path.exists( os.path.join(cmtDir, CmtStrings.CMTPROJFILE) ):
-            msg.warning( "[%s] does NOT contain any '%s' nor '%s' file !!" % \
-                         ( cmtDir,
-                           CmtStrings.CMTREQFILE,
-                           CmtStrings.CMTPROJFILE ) )
-        return None
-
-    if pkgName == None:
-        msg.warning( "No 'package Foo' stmt in %s of %s" % \
-                     ( CmtStrings.CMTREQFILE, cmtDir ) )
-        return None
-    
-    msg.debug( "\t\t==> Analysing [%s]" % cmtDir )
-    
-    # first we try the no-version-directory case as it is the ATLAS
-    # default now.
-    if CmtStrings.CMTVERSIONFILE in os.listdir(cmtDir):
-        version = open( os.path.join( cmtDir, CmtStrings.CMTVERSIONFILE ),
-                        'r' )\
-                        .readline()
-        version = version.splitlines()[0].strip()
-        pkgDir = os.path.split(cmtDir)[0].strip()
-        pkgPath = os.path.split(pkgDir)[0].strip()
-        pass
-
-    # Now we *MAY* be in the case where:
-    # /somePath/MyPkg/MyPkg-00-00-00/cmt
-    # or
-    # /somePath/MyPkg/v1r2p3/cmt
-    # however this is not supported anymore: warn and fallback to previous
-    # case anyway (as user might have screwed up)
-    else:
-        msg.warning("No [%s] file in [%s] directory",
-                    CmtStrings.CMTVERSIONFILE,
-                    cmtDir)
-        msg.warning("Can't reliably infer package version/dir!")
-        version = '*'
-        tmpDir  = os.path.split(cmtDir)[0].strip()
-        pkgDir  = os.path.split(tmpDir)[0].strip()
-        pkgPath = os.path.split(pkgDir)[0].strip()
-        msg.warning("Will use:")
-        msg.warning( "\t\t\t- name    = %s" % pkgName )
-        msg.warning( "\t\t\t- version = %s" % version )
-        msg.warning( "\t\t\t- path    = %s" % pkgPath )
-        pass
-
-    msg.debug( "\t\t\t- name    = %s" % pkgName )
-    msg.debug( "\t\t\t- version = %s" % version )
-    msg.debug( "\t\t\t- path    = %s" % pkgPath )
-
-    if pkgName.count(os.sep) > 0 :
-       msg.warning( "About to create a funny CMT package !" )
-       msg.warning( "'PkgName' contains '%s'. Please fix it!" % os.sep )
-       msg.warning( "\t- name    = %s" % pkgName )
-       msg.warning( "\t- version = %s" % version )
-       msg.warning( "\t- path    = %s" % pkgPath )
-       # Ok, so, I fix it - but user is warned...
-       pkgName = os.path.basename(pkgName)
-       pass
-
-    return CmtPkg( pkgName, version, pkgPath )
-
-def createUseList(workAreas, suppressList = ["WorkArea"]):
-
-   msg = logging.getLogger( "WorkAreaMgr" )
-   cmtPackages = []
-   uses        = []
-   
-   for workArea in workAreas:
-      cmtPackages.extend( scan( workArea, suppressList ) )
-      pass
-
-   # Handle duplicate CMT packages:
-   pkgs = {}
-   duplicates = {}
-   for cmtPkg in cmtPackages:
-      if not pkgs.has_key(cmtPkg.name):
-         pkgs[cmtPkg.name] = cmtPkg
-         pass
-      else:
-         # we found a duplicate...
-         # check that the new one has a more recent version
-         if pkgs[cmtPkg.name].version < cmtPkg.version:
-            pkgs[cmtPkg.name] = cmtPkg
-            pass
-         duplicates[cmtPkg.name] = pkgs[cmtPkg.name]
-         pass
-      pass
-   if len(duplicates) > 0:
-      msg.warning( "Found duplicate(s): (listing the ones we kept)" )
-      for k in duplicates.keys():
-         msg.warning( "--" )
-         msg.warning( " Package: %s" % duplicates[k].name )
-         msg.warning( " Version: %s" % duplicates[k].version )
-         msg.warning( " Path:    %s" % duplicates[k].path )
-         pass
-      pass
-
-   del duplicates
-   cmtPackages = [ pkg for pkg in pkgs.values() ]
-   del pkgs
-                      
-   msg.info( "Found %i packages in WorkArea" % len(cmtPackages) )
-   if len(suppressList) >= 1:
-      # -1 because WorkArea is removed by default
-      msg.info( "=> %i package(s) in suppression list" % \
-                int(len(suppressList) - 1) ) 
-
-   for cmtPkg in cmtPackages:
-      # swallow the WorkArea path so we have a "cmt path" to put
-      # in the req file
-      for workArea in workAreas:
-         cmtPkg.path = cmtPkg.path.replace( workArea+os.sep, '' )
-         cmtPkg.path = cmtPkg.path.replace( workArea,        '' )
-         pass
-
-      if cmtPkg.path.endswith( os.sep ):
-         cmtPkg.path = os.path.split(cmtPkg.path)
-         pass
-
-      use = "use %s \t%s \t%s" % ( cmtPkg.name,
-                                   #cmtPkg.version,
-                                   "*",
-                                   cmtPkg.path )
-      msg.debug( "\t%s" % use )
-
-      uses.append( use )
-      pass
-
-   return uses
-
-def createWorkArea( workAreas = [], installDir = None,
-                    runTimePkg = 'offline', suppressList = None ):
-
-    msg = logging.getLogger("WorkAreaMgr")
-    if suppressList == None:
-       suppressList = [ "WorkArea" ]
-    else:
-       suppressList.append( "WorkArea" )
-       pass
-
-    atlasRunTime = runTimePkg[0].upper() + runTimePkg[1:]
-    
-    defaultWorkArea = os.environ[CmtStrings.CMTPATH].split(os.pathsep)[0]
-    if len(workAreas) <= 0:
-        workAreas = [ defaultWorkArea ]
-    if installDir == None:
-        installDir = defaultWorkArea
-        pass
-
-    msg.info( 80*"#" )
-    msg.info( "Creating a WorkArea CMT package under: [%s] " % installDir )
-
-    try:
-        installWorkArea( installDir,
-                         CmtPkg( "WorkArea", WORKAREA_VERSION, "" ) )
-    except Exception,err:
-        msg.error( "Could NOT create WorkArea package !!" )
-        msg.error( "%r", err)
-        msg.info( 80*"#" )
-        sys.exit(3)
-        
-    except :
-        msg.error( "Could NOT create WorkArea package !!" )
-        msg.info( 80*"#" )
-        sys.exit(4)
-        
-    reqLines = [
-        "package WorkArea",
-        "",
-        "author Sebastien Binet <binet@cern.ch>",
-        "",
-        "######################################",
-        "## Don't edit this file !!          ##",
-        "## It is automatically generated... ##",
-        "######################################",
-        "",
-        "## Generic part...",
-        "use AtlasPolicy 	 \tAtlasPolicy-*",
-        "use Atlas%sRunTime \tAtlas%sRunTime-*" % (atlasRunTime, atlasRunTime),
-        "",
-        "branches run python",
-        "",
-        "## Install the python classes into InstallArea",
-        "apply_pattern declare_python_modules files=\"*.py\"",
-        "",
-        "",
-        "## Automatically generated part...",
-        "" ]
-
-    uses = createUseList(workAreas, suppressList)
-
-    reqLines.extend( uses )
-    reqLines.append( "" )
-    reqLines.append( "## End of generation." )
-    reqLines.append( "## EOF ##" )
-    
-    reqFile = open( os.path.join( installDir,
-                                  "WorkArea",
-                                  CmtStrings.CMTDIR,
-                                  CmtStrings.CMTREQFILE ),
-                    "w" )
-    for reqLine in reqLines:
-        reqFile.writelines( reqLine + os.linesep )
-        pass
-
-    msg.info( "Generation of %s done [OK]" % \
-              os.path.join( "WorkArea",
-                            CmtStrings.CMTDIR,
-                            CmtStrings.CMTREQFILE ) )
-    
-    reqFile.close()
-
-    msg.info( 80*"#" )
-    return
-
-def installWorkArea( installDir, cmtWorkAreaPkg ):
-    msg = logging.getLogger("WorkAreaMgr")
-
-    workAreaDir = os.path.join( installDir,  cmtWorkAreaPkg.name )
-    cmtDir      = os.path.join( workAreaDir, CmtStrings.CMTDIR   )
-
-    if os.path.exists(installDir):
-        if os.access(installDir, os.W_OK):
-            if os.path.exists( workAreaDir ):
-                if not os.path.exists( cmtDir ):
-                    os.mkdir( cmtDir )
-                    pass
-                pass
-            else:
-                os.makedirs( os.path.join( workAreaDir, cmtDir ) )
-            pass
-        else:
-            msg.error( "Can't write under [%s] !!" % installDir )
-            raise OSError
-        pass
-    else:
-        try:
-            os.makedirs(installDir)
-            installWorkArea( installDir, cmtWorkAreaPkg )
-        except OSError, what:
-            msg.error( "Install dir for WorkArea does NOT exist and can't create it !!" )
-            raise OSError, what
-        pass
-
-    msg.debug( "Creating a consistent version file for the WorkArea pkg..." )
-    cmtVersFile = open( os.path.join(cmtDir, CmtStrings.CMTVERSIONFILE), 'w' )
-    cmtVersFile.writelines( cmtWorkAreaPkg.version + os.linesep )
-    cmtVersFile.close()
-    msg.debug( "Create a dummy %s file for the WorkArea pkg..." % CmtStrings.CMTREQFILE ) 
-    cmtReqFile = open( os.path.join(cmtDir, CmtStrings.CMTREQFILE), 'w' )
-    cmtReqFile.writelines( "package %s %s" % (cmtWorkAreaPkg.name, os.linesep ) )
-    cmtReqFile.close()
-
-    msg.debug("creating python directories to workaround CMT bugs...")
-    install_area = os.path.join(installDir, 'InstallArea')
-    pydirs = [os.path.join(install_area, 'python'),
-              os.path.join(install_area, '${CMTCONFIG}', 'lib', 'python')]
-    pydirs = [os.path.expandvars(p) for p in pydirs]
-    
-    for p in pydirs:
-        if not os.path.exists(p):
-            try:
-                os.makedirs(p)
-            except OSError, what:
-                msg.error('could not create directory [%s]',p)
-                msg.error(what)
-    msg.debug("creating python directories to workaround CMT bugs... [ok]")
-                
-    return
-
diff --git a/PhysicsAnalysis/D3PDMaker/D3PDMakerUtils/src/SGKeyResolver.cxx b/PhysicsAnalysis/D3PDMaker/D3PDMakerUtils/src/SGKeyResolver.cxx
index 810b13a0fb10fd60ebb2ce2aacf59cd0dfefa949..c1c277b9ccd221c4b2c1d60634f04f97b884f632 100644
--- a/PhysicsAnalysis/D3PDMaker/D3PDMakerUtils/src/SGKeyResolver.cxx
+++ b/PhysicsAnalysis/D3PDMaker/D3PDMakerUtils/src/SGKeyResolver.cxx
@@ -69,7 +69,7 @@ std::string SGKeyResolver::key()
   // First see if any existing proxies match the keys.
   std::vector<const SG::DataProxy*> proxies = m_sg->proxies();
   BOOST_FOREACH (const SG::DataProxy* & p, proxies) {
-    if (p->transientAddress()->transientID (m_clid) &&
+    if (p->transientID (m_clid) &&
         std::find (keys.begin(), keys.end(), p->name()) != keys.end())
     {
       if (!m_haveKey ||
diff --git a/PhysicsAnalysis/D3PDMaker/ForwardDetectorsD3PDMaker/python/ForwardDetectorsD3PD.py b/PhysicsAnalysis/D3PDMaker/ForwardDetectorsD3PDMaker/python/ForwardDetectorsD3PD.py
deleted file mode 100644
index 7a1e38fae3d59036185d6b121cd72c4f575e30a5..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/ForwardDetectorsD3PDMaker/python/ForwardDetectorsD3PD.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# attention, if you change D3PD content here
-# modify also share/ForwardDetectorsD3PDMaker_jobOptions.py accordingly
-
-from EventCommonD3PDMaker.EventInfoD3PDObject import EventInfoD3PDObject
-from ForwardDetectorsD3PDMaker.ZdcD3PDObject import ZdcD3PDObject
-from ForwardDetectorsD3PDMaker.ZdcDigitsD3PDObject import ZdcDigitsD3PDObject
-
-from AthenaCommon.GlobalFlags import globalflags
-
-print 'AO: Flags in ForwardDetectorsD3PD.py'
-print 'globalflags'
-print globalflags
-
-def ForwardDetectorsD3PD( alg = None,
-                          file = "ForwardDetectordD3PD.root"
-                          tuplename = 'ForwardDetectorsD3PD',
-                          **kw ):
-
-  if not alg:
-    from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-    alg = MGMgr.NewRootStream( tuplename, file )
-    pass
-
-  ##Event Info
-  alg += EventInfoD3PDObject( 10 )
-
-  ##ZDC
-  if globalflags.DataSource == "data":
-    alg += ZdcD3PDObject( 10 )
-    alg += ZdcDigitsD3PDObject( 10 )
-    pass
-
-  return alg
diff --git a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetTileD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetTileD3PDObject.py
deleted file mode 100644
index b84d742468a6cc613f44f1a2398b08707a6920ca..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/JetD3PDMaker/python/JetTileD3PDObject.py
+++ /dev/null
@@ -1,312 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import JetD3PDMaker
-import D3PDMakerCoreComps
-import EventCommonD3PDMaker
-from D3PDMakerCoreComps.D3PDObject import D3PDObject, \
-                                          make_SGDataVector_D3PDObject
-from D3PDMakerCoreComps.release_version import release_version
-from D3PDMakerCoreComps.resolveSGKey import resolveSGKey
-from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
-from D3PDMakerCoreComps.IndexMultiAssociation import IndexMultiAssociation
-from D3PDMakerCoreComps.ContainedVectorMultiAssociation import ContainedVectorMultiAssociation
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-from EventCommonD3PDMaker.DRAssociation import DRAssociation
-
-from JetD3PDMaker import JetD3PDMakerConf
-from JetRecTools.JetRecToolsConf import *
-from JetMomentTools.JetMomentToolsConf import *
-from RecExConfig.RecFlags import rec
-from AthenaCommon.AlgSequence import AlgSequence
-from JetRec import JetRecConf
-from JetRecTools import JetRecToolsConf
-from JetTagD3PDMaker.AddBTagD3PDInfo import addBTagInfoToJetObject
-
-
-jetMinEta=-2.0
-jetMaxEta=2.0
-jetMinPhi=-4.0
-jetMaxPhi=4.0
-
-
-#
-# Useful options:
-#  Specify ConstitIndex_Target to fill a list of indices of jet constituents.
-#  Target should be target collection for the association.
-#
-
-
-def makeJetTileFilterAlg(inSGkey):
-    jetTileFilter=JetD3PDMakerConf.JetTileFilterAlg(JetCollectionSGkey=inSGkey,
-    JetCollOutSGkey='JToutkey')#,
-#    jetEtaMin=jetMinEta,
-#    jetEtaMax=jetMaxEta,
- #   jetPhiMin=jetMinPhi,
- #   jetPhiMax=jetMaxPhi)
-    
-    return jetTileFilter
-
-# Reconstruction versions prior to 15.6.8 didn't fill in the jet timing/quality.
-# Fix up such jets here.
-def _fixJetTiming (c, **kw):
-    sgkey_raw = c.Getter.SGKey
-    jetfilter=makeJetTileFilterAlg(sgkey_raw)
-    seq = AlgSequence (D3PDMakerFlags.PreD3PDAlgSeqName())
-    seq+=jetfilter
-    sgkey_in=jetfilter.JetCollOutSGkey
-    c.Getter.SGKey =sgkey_in
-    # Check version number of the input data.
-    # If no version is found, assume old.
-    rlist = release_version()
-    if rlist:
-        if rlist[0] >= 16: return
-        if rlist[0] == 15 and rlist[1] >= 7: return
-        if rlist[0] == 15 and rlist[1] == 6 and rlist[2] >= 8: return
-
-    try:
-        sgkey_in = resolveSGKey ('JetCollection', sgkey_in)
-    except:
-        if not kw.get('allowMissing'): raise
-        return
-    sgkey_out = sgkey_in + '_timing'
-
-    if not hasattr (seq, sgkey_out):
-        tools = []
-        caloqual_kw = {'doCellBasedVariables' : True,
-                       'doConstituentBasedVariables' : True,
-                       'doSamplingBasedVariables' : True,
-                       'cutOnTile' : 254,
-                       'cutOnLAr' : 4000,
-                       'doTileQuality' : True,
-                       'doLArQuality' : True}
-
-        if hasattr (JetRecToolsConf, 'JetTimeQualityTool'):
-            # rel 15 setup
-            tool1 = JetRecToolsConf.JetTimeQualityTool (sgkey_out + 'TimeTool',
-                                                        DoTime = False,
-                                                        DoQuality = False,
-                                                        UseCells = False)
-            if rec.readESD() or rec.readRDO():
-                tool1.DoTime    = True
-                tool1.DoQuality = True
-                tool1.UseCells  = True
-            if rec.readAOD() and (sgkey_in.find ('H1Topo') >= 0 or
-                                  sgkey_in.find ('LCTopo') >= 0):
-                tool1.DoTime    = True
-            tools.append (tool1)
-        else:
-            # rel 16
-            caloqual_kw['doTiming'] = True
-
-        tool2 = JetCaloQualityTool (sgkey_out + 'QualTool',
-                                    **caloqual_kw)
-        tools.append (tool2)
-
-        alg = JetD3PDMaker.JetFixupAlg (sgkey_out,
-                                        InputKey = sgkey_in,
-                                        OutputKey = sgkey_out,
-                                        Tools = tools)
-        for t in tools:
-            alg += t
-
-        seq += alg
-
-    c.Getter.SGKey = sgkey_out
-    return
-
-def _getJvfTool():
-    from JetMomentTools.SetupJetMomentTools import getJetVertexAssociationTool
-    jvatool = getJetVertexAssociationTool('AntiKt', 0.4, 'Topo') # parameters are irrelevant, these will work for any jets. 
-    return jvatool
-
-# Don't make this unless target has been specified.
-def _constitAssocLevel (reqlev, args):
-    if reqlev < 1: return False
-    if not args.has_key ('Target'): return False
-    return True
-
-def getJetTileD3PDObject(objectname='JetTileD3PDObject', prefix='jet_', btagleveloffset=7):
-
-
-    object = make_SGDataVector_D3PDObject ('JetCollection',
-                                           D3PDMakerFlags.JetSGKey(),
-                                           prefix, objectname)
-
-    object.defineHook (_fixJetTiming)
-
-    object.defineBlock(0, 'Kinematics',
-                              EventCommonD3PDMaker.FourMomFillerTool,
-                              WriteE  = True)
-
-    object.defineBlock(1, 'OriginCorrection',
-                              JetD3PDMaker.JetMomentFillerTool,
-                              Moments=['EtaOrigin'  , 'PhiOrigin'  ,  'MOrigin'
-                                       ])
-
-    object.defineBlock(1, 'DQMoments',
-                              JetD3PDMaker.JetMomentFillerTool,
-                              Moments=['WIDTH',      'n90',
-                                       'Timing',     'LArQuality',
-                                       'nTrk',       'sumPtTrk',
-                                       'OriginIndex',
-                                       'HECQuality', 'NegativeE', 'AverageLArQF',
-                                       'BCH_CORR_CELL', 'BCH_CORR_DOTX','BCH_CORR_JET', 'BCH_CORR_JET_FORCELL', 
-                                       'ENG_BAD_CELLS', 'N_BAD_CELLS', 'N_BAD_CELLS_CORR','BAD_CELLS_CORR_E',
-                                       'NumTowers',
-                                       'ootFracCells5', 'ootFracCells10', 'ootFracClusters5', 'ootFracClusters10'
-                                       ])
-    
-    object.defineBlock(1, 'JetSamplingsFrac',
-                              JetD3PDMaker.JetSamplingsFracFillerTool)
-    object.defineBlock(1, 'JetQual',
-                              JetD3PDMaker.JetCaloUtilsFillerTool)
-    object.defineBlock(1, 'EMFraction',
-                              JetD3PDMaker.JetEMFractionFillerTool)
-    
-    object.defineBlock(1, 'JES',
-                              JetD3PDMaker.JetMomentFillerTool,
-                              Moments=[ 'Offset','EMJES','EMJES_EtaCorr','EMJESnooffset' ])
-    
-    
-    object.defineBlock(1, 'EMScale',
-                              JetD3PDMaker.JetSignalStateFillerTool,
-                              WriteE = True,
-                              SignalStateNumber = 0,
-                              SignalStatePrefix = 'emscale')
-                              
-    object.defineBlock(2, 'JetTileFiller',
-                              JetD3PDMaker.JetTileCellFillerTool)
-                              
-#    object.defineBlock(3, 'JVtx',
-#                              JetD3PDMaker.JetVtxFillerTool,
-#                              JetVertexAssociationTool=_getJvfTool())
-    
-    
-    object.defineBlock(3, 'Layer',
-                              JetD3PDMaker.JetMomentFillerTool,
-                              Moments=['GSCFactorF','WidthFraction'])
-    
-    object.defineBlock(4, 'Samplings',
-                              JetD3PDMaker.JetSamplingsFillerTool)
-    
-    object.defineBlock(5, 'JESMoments',
-                              JetD3PDMaker.JetMomentFillerTool,
-                              Moments=['LCJES'])
-#                              Moments=['GCWJES', 'GCWJES_EtaCorr','CB'])
-
-    object.defineBlock(5, 'JetShape',
-                              JetD3PDMaker.JetShapeFillerTool)
-    
-    
-    object.defineBlock(5, 'Constituents',
-                              JetD3PDMaker.JetConstituentFillerTool,
-                              SignalStateNumber = 0,
-                              SignalStatePrefix = 'emscale')
-    
-    object.defineBlock(5, 'ConstituentScale',
-                              JetD3PDMaker.JetSignalStateFillerTool,
-                              WriteE = True,
-                              SignalStateNumber = 2,
-                              SignalStatePrefix = 'constscale')
-    
-    object.defineBlock(6, 'JetLArHVMoment',
-                              JetD3PDMaker.JetMomentFillerTool,
-                              Moments=['LArBadHVEnergy','LArBadHVRatio'])
-    
-    addBTagInfoToJetObject(object,btagleveloffset)
-
-
-    # Track association cannot be done unless there are tracks.
-    # As often this is not the case track association will be done only
-    # if this is explicitly asked for. by defining it in the include list.
-    #
-    # You can also enable it by passing an argument to JetD3PDObject
-    # like:
-    #   AssocTrackCont_target='mytarget_'
-    def _jetAssocLevel (reqlev, args):
-        return args.has_key ('target') or (reqlev >= 999)
-    IndexMultiAssociation (object,
-                           JetD3PDMaker.FlavorAssociationTool,
-                           'trk',
-                           prefix = 'flavor_assoctrk_',
-                           level = _jetAssocLevel,
-                           blockname = 'AssocTrackCont')
-<
-
-    object.defineBlock(10, 'JetRoIword',
-                              JetD3PDMaker.JetROIWordFillerTool
-                              )
-
-
-    JetElAssoc = DRAssociation(object,"ElectronContainer",D3PDMakerFlags.ElectronSGKey(),0.2,prefix='el_',matched="matched",blockname="El02Match")
-
-    JetMuAssoc = DRAssociation(object,"Analysis::MuonContainer",D3PDMakerFlags.MuonSGKey(),0.2,prefix='mu_',matched="matched",blockname="Mu02Match")
-
-#JetTrkAssoc = DRAssociation(object,"Rec::TrackParticleContainer",D3PDMakerFlags.TrackSGKey(),0.4,prefix='trk_',matched="matched",blockname="Trk04Match")
-
-
-#---------------- Trigger Object ----------------------------
-
-    JetL1Assoc = SimpleAssociation(object,
-                                   JetD3PDMaker.JetL1TriggerObjectAssociationTool,
-                                   matched = 'matched',
-                                   blockname = 'L1Info',
-                                   prefix = 'L1_',
-                                   MaxDR = 0.6,
-                                   ChainPattern = 'L1_J.*')
-    
-    JetL1Assoc.defineBlock (99, 'L1Kinematics',
-                            EventCommonD3PDMaker.FourMomFillerTool,
-                            WriteE = True,
-                            WriteEt = False,
-                            WriteM = False)
-    
-    
-    JetL2Assoc = SimpleAssociation(object,
-                                   JetD3PDMaker.JetL2TriggerObjectAssociationTool,
-                                   matched = 'matched',
-                                   blockname = 'L2Info',
-                                   prefix = 'L2_',
-                                   MaxDR = 0.25,
-                                   ChainPattern = 'L2_j.*')
-    
-    JetL2Assoc.defineBlock (99, 'L2Kinematics',
-                            EventCommonD3PDMaker.FourMomFillerTool,
-                            WriteE = True,
-                            WriteEt = False,
-                            WriteM = False)
-    
-    JetEFAssoc = SimpleAssociation(object,
-                                   JetD3PDMaker.JetEFTriggerObjectAssociationTool,
-                                   matched = 'matched',
-                                   blockname = 'EFInfo',
-                                   prefix = 'EF_',
-                                   MaxDR = 0.25,
-                                   ChainPattern = 'EF_j.*')
-    
-    JetEFAssoc.defineBlock (99, 'EFKinematics',
-                            EventCommonD3PDMaker.FourMomFillerTool,
-                            WriteE = True,
-                            WriteEt = False,
-                            WriteM = False)
-    
-    
-    ConstitAssoc = ContainedVectorMultiAssociation \
-        (object,
-         #JetD3PDMaker.JetConstituentAssociationTool,
-         EventCommonD3PDMaker.NavigableConstituentAssociationTool,
-         'constit_',
-         TypeName = 'CaloCluster',
-         nrowName = '',
-         level = 1)
-    
-
-    ConstitAssoc.defineBlock (_constitAssocLevel, 'ConstitIndex',
-                              D3PDMakerCoreComps.IndexFillerTool,
-                              Target = '')
-
-
-    return object
-
-
-JetTileD3PDObject = getJetTileD3PDObject()
diff --git a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTrackD3PDObject.py b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTrackD3PDObject.py
index 75dbad54bfc9408d601093ebceef4d3295089985..f14596ecde692a89d4e0ce7dfe1c9c92be1a425f 100644
--- a/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTrackD3PDObject.py
+++ b/PhysicsAnalysis/D3PDMaker/JetTagD3PDMaker/python/JetTagTrackD3PDObject.py
@@ -72,7 +72,7 @@ def getJetTagTrackD3PDObject(level=20, **kw):
     jetTagD3PDInDetTrackSelectorTool.maxD0 = 99999.
     jetTagD3PDInDetTrackSelectorTool.maxD0overSigmaD0 = 99999.
     jetTagD3PDInDetTrackSelectorTool.numberOfPixelHits = -99
-    jetTagD3PDInDetTrackSelectorTool.numberOfBLayerHits = -99
+    jetTagD3PDInDetTrackSelectorTool.numberOfInnermostPixelLayerHits = -99
     jetTagD3PDInDetTrackSelectorTool.Extrapolator = ToolSvc.InDetExtrapolator 
     jetTagD3PDInDetTrackSelectorTool.TrackSummaryTool = ToolSvc.InDetTrackSummaryTool
     ToolSvc+=jetTagD3PDInDetTrackSelectorTool
diff --git a/PhysicsAnalysis/D3PDMaker/MinBiasD3PDMaker/share/RecoOptions.py b/PhysicsAnalysis/D3PDMaker/MinBiasD3PDMaker/share/RecoOptions.py
index 51ea3df699aa9d986a360b99a61f3eaa1f6bde97..3717d48e2c87cc95b83dcc1fc7d5b18ae06dbff4 100644
--- a/PhysicsAnalysis/D3PDMaker/MinBiasD3PDMaker/share/RecoOptions.py
+++ b/PhysicsAnalysis/D3PDMaker/MinBiasD3PDMaker/share/RecoOptions.py
@@ -130,9 +130,7 @@ InDetFlags.doTrkNtuple        = False
 InDetFlags.doPixelTrkNtuple   = False
 InDetFlags.doSctTrkNtuple     = False
 InDetFlags.doTrtTrkNtuple     = False
-InDetFlags.doPixelClusterNtuple = False
 InDetFlags.doSctClusterNtuple   = False
-InDetFlags.doTrtDriftCircleNtuple = False
 InDetFlags.doVtxNtuple        = False
 InDetFlags.doConvVtxNtuple    = False
 InDetFlags.doV0VtxNtuple      = False
diff --git a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonTrkHitFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonTrkHitFillerTool.cxx
index 22efc93637c9fc21142d31ed7e5dfb945539caef..6b5ac3f0f715b4ac4a85606e5b2a40be6d7079f2 100644
--- a/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonTrkHitFillerTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/MuonD3PDMaker/src/MuonTrkHitFillerTool.cxx
@@ -28,12 +28,12 @@ const Var  vars[] =
 {
   {"nOutliersOnTrack", xAOD::numberOfOutliersOnTrack, ID+MS},
 
-  {"nBLHits",           xAOD::numberOfBLayerHits,               ID},
+  {"nBLHits",           xAOD::numberOfInnermostPixelLayerHits,               ID},
   {"nPixHits",          xAOD::numberOfPixelHits,                ID},
   {"nSCTHits",          xAOD::numberOfSCTHits,                  ID},
   {"nTRTHits",          xAOD::numberOfTRTHits,                  ID},
   {"nTRTHighTHits",     xAOD::numberOfTRTHighThresholdHits,     ID},
-  {"nBLSharedHits",     xAOD::numberOfBLayerSharedHits,         ID},
+  {"nBLSharedHits",     xAOD::numberOfInnermostPixelLayerSharedHits,         ID},
   {"nPixSharedHits",    xAOD::numberOfPixelSharedHits,          ID},
   {"nPixHoles",         xAOD::numberOfPixelHoles,               ID},
   {"nSCTSharedHits",    xAOD::numberOfSCTSharedHits,            ID},
@@ -44,7 +44,7 @@ const Var  vars[] =
   {"nPixelDeadSensors", xAOD::numberOfPixelDeadSensors,         ID},
   {"nSCTDeadSensors",   xAOD::numberOfSCTDeadSensors,           ID},
   {"nTRTDeadStraws",    xAOD::numberOfTRTDeadStraws,            ID},
-  {"expectBLayerHit",   xAOD::expectBLayerHit,                  ID},
+  {"expectInnermostPixelLayerHit",   xAOD::expectInnermostPixelLayerHit,                  ID},
 
   {"nprecisionLayers",      xAOD::numberOfPrecisionLayers,      MS},
   {"nprecisionHoleLayers",  xAOD::numberOfPrecisionHoleLayers,  MS},
diff --git a/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/scripts/br_gmake.sh b/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/scripts/br_gmake.sh
deleted file mode 100755
index 8c690d9b4d3829c39303e1a9a913c934b2cb7d85..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/scripts/br_gmake.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-curdir=`pwd`
-cd $TestArea
-
-${curdir}/mySetupWorkArea.py
-cd WorkArea/cmt
-cmt br cmt config
-cmt br source setup.sh
-cmt br gmake -j 4 quiet=1
-cd ${curdir}
diff --git a/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/scripts/mySetupWorkArea.py b/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/scripts/mySetupWorkArea.py
deleted file mode 100755
index 1fb5041d0ca55ceb8e9c18cbceed10a36b2c9cfd..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/scripts/mySetupWorkArea.py
+++ /dev/null
@@ -1,248 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-# @file: setupWorkArea.py
-# @purpose: fill the stubs of the WorkArea package so that all the local
-#           CMT packages can be recompiled in one go.
-# @date: June 2006
-# @author: Sebastien Binet
-
-# /!\ Warning /!\
-# I am relying on the following assumption:
-#  - you have a working Release environment
-#     ==> a valid CMTPATH environment variable
-#     ==> python-2.4 (this needs to be addressed!!)
-
-# example0:
-# ./setupWorkArea.py
-# ==> will :
-#  - install a CMT package called WorkArea under the first directory found
-#    in the CMTPATH environment variable
-#  - put use statements for all the CMT packages (recursively) found under
-#    the first directory of the CMTPATH environment variable
-
-# example1:
-# ./setupWorkArea.py -i ~/Athena/dev -S ~/cmtSuppressList -w $CMTPATH
-# ==> will :
-#  - install a CMT package called WorkArea under the dir. ~/Athena/dev
-#  - put use statements for all the CMT packages (recursively) found under
-#    the ':' separated list of paths (=$CMTPATH)
-#  - and only if these packages are not found in the cmtSuppressList
-
-# example2:
-# ./setupWorkArea.py -s "['Foo']"
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - remove any 'use statement' for packages called "Foo"
-
-# example3:
-# ./setupWorkArea.py --suppress-list "['Foo']"
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - remove any 'use statement' for packages called "Foo"
-
-# example4:
-# ./setupWorkArea.py --suppress-list "['Foo']" --runtime Core
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - remove any 'use statement' for packages called "Foo"
-# - use only the AtlasCoreRunTime environment
-
-# example5:
-# ./setupWorkArea.py -r Core
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - use only the AtlasCoreRunTime environment
-
-# example6:
-# ./setupWorkArea.py -g (or --group-area)
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the $GroupArea environment variable
-# Note that one can specify the ':' separated list of Group areas directories:
-# --group-area=${SomeVariable}:${GroupArea}:${SomethingElse}
-# -g ${MyGroupArea}
-
-import sys
-import os
-import getopt
-import string
-
-from PyUtils.Logging import logging
-
-__version__ = "$Revision: 1.7 $"
-
-##########################
-# recognized user options
-##########################
-_useropts = 's:i:hl:S:w:r:gv'
-_userlongopts = [ 'suppress-list=',  'install-dir=',
-                  'help',            'loglevel=',
-                  'suppress-file=',
-                  'work-area=',
-                  'runtime=',
-                  'group-area',
-                  'version' ]
-
-def _usage():
-   print """Accepted command line options (CLI):
-   -s, --suppress-list <list> ...  list of package names to ignore.
-   -S, --suppress-file <file> ...  path to a file containing the suppress list.
-   -i, --install-dir <path>   ...  directory where to install the WorkArea pkg
-   -w, --work-area <dir1:d2>  ...  directories under which the packages for the
-                                   WorkArea pkg are installed.
-   -g, --group-area <dir1:d2> ...  directories under which the packages for the
-                                   GroupArea are looked for.
-                                   If no argument is given, it will try to
-                                   look for the $GroupArea environment
-                                   variable.
-   -r, --runtime <runtimePkg> ...  runtime package one wants to work with.
-                                   Default is AtlasOfflineRunTime.
-                                   Allowed values: core, event, conditions,
-                                                   simulation, reconstruction,
-                                                   trigger, analysis,
-                                                   production, point1,
-                                                   offline
-   -h, --help                 ...  print this help message
-   -l, --loglevel <level>     ...  logging level (DEBUG, INFO, WARNING, ERROR, FATAL)
-   -v, --version              ...  print version number
-   """
-   return
-
-from myWorkAreaLib import *
-
-def _processOptions( useropts, userlongopts ):
-
-    log = logging.getLogger("WorkAreaMgr")
-
-    runTimePkgAllowedValues = [ "core",
-                                "event",
-                                "conditions",
-                                "simulation",
-                                "reconstruction",
-                                "trigger",
-                                "analysis",
-                                "production",
-                                "point1",
-                                "tier0",
-                                "hlt",
-                                "offline",
-                                ]
-    # defaults
-    workAreas  = []
-    installDir = None
-    runTimePkg = "offline"
-    suppressList = []
-    lvl = logging.INFO
-    
-    try:
-        optlist,args = getopt.getopt( sys.argv[1:],
-                                      useropts,
-                                      userlongopts )
-    except getopt.error:
-        log.error( "%s" % sys.exc_value )
-        _usage()
-        sys.exit(2)
-
-    for opt, arg in optlist:
-        if opt in ('-h', '--help' ):
-            _usage()
-            sys.exit()
-        elif opt in ('-v', '--version'):
-            print WORKAREA_VERSION
-            print "By Sebastien Binet"
-            sys.exit()
-        elif opt in ('-i', '--install-dir'):
-            installDir = os.path.expanduser( os.path.expandvars(arg) )
-        elif opt in ('-s', '--suppress-list'):
-            exec( 'suppressList += %s' % arg )
-            #suppressList = arg
-        elif opt in ('-S', '--suppress-file'):
-            suppressFileName = os.path.expanduser( os.path.expandvars(arg) )
-            if os.path.exists( suppressFileName ):
-                suppressFile = open( suppressFileName, 'r' )
-                for line in suppressFile.readlines():
-                    for l in line.splitlines():
-                        suppressList.append( l.strip() )
-                        pass
-                    pass
-                pass
-            else:
-                log.error("Could NOT access this file [%s]" % suppressFileName)
-                pass
-        elif opt in ('-w', '--work-area'):
-            workAreaDirs = os.path.expanduser( os.path.expandvars(arg) )
-            if workAreaDirs.count(os.pathsep) > 0:
-               workAreaDirs = workAreaDirs.split(os.pathsep)
-               pass
-            for workAreaDir in workAreaDirs:
-                if os.path.exists( workAreaDir ):
-                    if os.access(workAreaDir, os.R_OK):
-                        workAreas.append( os.path.abspath(workAreaDir) )
-                        pass
-                    else:
-                        log.error( "Can't read from [%s] !!" % workAreaDir )
-                        pass
-                    pass
-                else:
-                    log.error("Directory does NOT exists [%s] !" % workAreaDir)
-                    pass
-                pass
-        elif opt in ('-g', '--group-area'):
-           if len(arg) == 0:
-              arg = os.environ.get("GroupArea") or ""
-              pass
-           groupAreaDirs = os.path.expanduser( os.path.expandvars(arg) )
-           if groupAreaDirs.count(os.pathsep) > 0:
-              groupAreaDirs = groupAreaDirs.split(os.pathsep)
-              pass
-           for groupAreaDir in groupAreaDirs:
-              if os.path.exists( groupAreaDir ):
-                 if os.access(groupAreaDir, os.R_OK):
-                    workAreas.append( groupAreaDir )
-                    pass
-                 else:
-                    log.error( "Can't read from [%s] !!" % groupAreaDir )
-                    pass
-                 pass
-              else:
-                 log.error("Directory does NOT exists [%s] !" % groupAreaDir)
-                 pass
-              pass
-        elif opt in ('-r', '--runtime'):
-           if arg.lower() in runTimePkgAllowedValues:
-              runTimePkg = arg
-           else:
-              log.error( "Unknown runtime package [%s]" % arg )
-              log.error( "Must be one of: %s" % str(runTimePkgAllowedValues) )
-              pass
-        elif opt in ('-l', '--loglevel'):
-            lvl = string.upper( arg )
-            logLevel = getattr(logging, lvl)
-            log.setLevel(logLevel)
-            del lvl,logLevel
-            pass
-        else:
-            pass
-        pass
-
-    return workAreas, installDir, runTimePkg, suppressList
-    
-if __name__ == "__main__":
-
-    msg = logging.getLogger('WorkAreaMgr')
-    msg.setLevel(logging.INFO)
-    
-    ## process user options
-    workAreas,  installDir,  \
-    runTimePkg, suppressList = _processOptions( _useropts, _userlongopts )
-
-    createWorkArea( workAreas, installDir, runTimePkg, suppressList )
-    pass
diff --git a/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/scripts/myWorkAreaLib.py b/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/scripts/myWorkAreaLib.py
deleted file mode 100644
index c21847211e8ea2736909970374514f2ad424f517..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/D3PDMaker/QcdD3PDMaker/scripts/myWorkAreaLib.py
+++ /dev/null
@@ -1,380 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file myWorkAreaLib
-# @purpose factor out some useful methods out of setupWorkArea for clients
-
-import os, sys
-from PyCmt.Logging import logging
-from PyCmt.Cmt import CmtPkg, CmtStrings
-
-__version__ = '$Revision$'
-
-WORKAREA_VERSION = "WorkArea-00-00-00"
-
-# a list of directory names one should not bother inspecting
-_ignore_dir_list = [
-    "i686-",
-    "x86_64-",
-    "CVS",
-    ".svn",
-    "o..pacman..o",
-    "InstallArea",
-    ]
-
-def _is_in_ignore_dir_list(pathname):
-    return all(map(pathname.count, _ignore_dir_list))
-
-def listCmtDirs( path ):
-    """Return the list of paths pointing at 'cmt' directories, accessible
-    from the `path` path.
-    """
-
-    msg = logging.getLogger( "WorkAreaMgr" )
-    
-    cmtDirs = []
-    
-    # fill list of CMT directories
-    import os
-    import os.path as osp
-    for root, dirs, files in os.walk(path):
-        for d in dirs[:]:
-            if _is_in_ignore_dir_list(d):
-                dirs.remove(d)
-        for d in dirs:
-            if d == CmtStrings.CMTDIR:
-                full_name = osp.join(root, d)
-                msg.debug("\t==> found %s" % full_name)
-                cmtDirs.append(full_name)
-    return cmtDirs
-
-def scan( scanDir = os.curdir, suppressList = ["WorkArea"] ):
-    """Search for CMT packages in the given directory and walk down the
-    directory tree.
-    Return the list of found CMT packages.
-    """
-    msg = logging.getLogger( "WorkAreaMgr" )
-    msg.info( "Scanning [%s]" % scanDir )
-    
-    # return value
-    cmtPackages = []
-    
-    # retrieve all cmt-ised directories in the scan directory
-    scanDir = os.path.abspath( scanDir )
-
-    cmtDirs = []
-    try:
-        cmtDirs = listCmtDirs(scanDir)
-    except KeyboardInterrupt:
-        msg.warning( "Scanning has been STOPPED ! (by you)" )
-        pass
-    
-    for cmtDir in cmtDirs:
-        cmtPkg = createCmtPkg(cmtDir)
-        if cmtPkg != None and \
-           cmtPkg.name not in suppressList:
-            cmtPackages.append( cmtPkg )
-        pass
-    
-    return cmtPackages
-
-def createCmtPkg( cmtDir ):
-    """
-    the cmtDir is assumed to be of the form Xyz/cmt
-    One has also to handle the case with or without version-directory
-    """
-    msg = logging.getLogger("WorkAreaMgr")
-    
-    pkgName = None
-    # the CMTREQFILE should provide the name of package
-    # so we extract it from this file
-    try:
-        reqFile = open( os.path.join( cmtDir, CmtStrings.CMTREQFILE ), 'r' )
-        for line in reqFile.readlines():
-            line = line.strip()
-            if len(line) > 0  and \
-               line[0] != "#" and \
-               line.count("package ") > 0:
-                pkgName = line.splitlines()[0]\
-                          .split("package ")[1]\
-                          .replace("\r","")\
-                          .split("#")[0]\
-                          .strip()
-                break
-            pass
-        reqFile.close()
-        del reqFile
-    except IOError:
-        ## No CMTREQFILE in this directory
-        ## ==> not a CMT package then ?
-        ## check if there is any CMT project file instead
-        if not os.path.exists( os.path.join(cmtDir, CmtStrings.CMTPROJFILE) ):
-            msg.warning( "[%s] does NOT contain any '%s' nor '%s' file !!" % \
-                         ( cmtDir,
-                           CmtStrings.CMTREQFILE,
-                           CmtStrings.CMTPROJFILE ) )
-        return None
-
-    if pkgName == None:
-        msg.warning( "No 'package Foo' stmt in %s of %s" % \
-                     ( CmtStrings.CMTREQFILE, cmtDir ) )
-        return None
-    
-    msg.debug( "\t\t==> Analysing [%s]" % cmtDir )
-    
-    # first we try the no-version-directory case as it is the ATLAS
-    # default now.
-    if CmtStrings.CMTVERSIONFILE in os.listdir(cmtDir):
-        version = open( os.path.join( cmtDir, CmtStrings.CMTVERSIONFILE ),
-                        'r' )\
-                        .readline()
-        version = version.splitlines()[0].strip()
-        pkgDir = os.path.split(cmtDir)[0].strip()
-        pkgPath = os.path.split(pkgDir)[0].strip()
-        pass
-
-    # Now we *MAY* be in the case where:
-    # /somePath/MyPkg/MyPkg-00-00-00/cmt
-    # or
-    # /somePath/MyPkg/v1r2p3/cmt
-    # however this is not supported anymore: warn and fallback to previous
-    # case anyway (as user might have screwed up)
-    else:
-        msg.warning("No [%s] file in [%s] directory",
-                    CmtStrings.CMTVERSIONFILE,
-                    cmtDir)
-        msg.warning("Can't reliably infer package version/dir!")
-        version = '*'
-        tmpDir  = os.path.split(cmtDir)[0].strip()
-        pkgDir  = os.path.split(tmpDir)[0].strip()
-        pkgPath = os.path.split(pkgDir)[0].strip()
-        msg.warning("Will use:")
-        msg.warning( "\t\t\t- name    = %s" % pkgName )
-        msg.warning( "\t\t\t- version = %s" % version )
-        msg.warning( "\t\t\t- path    = %s" % pkgPath )
-        pass
-
-    msg.debug( "\t\t\t- name    = %s" % pkgName )
-    msg.debug( "\t\t\t- version = %s" % version )
-    msg.debug( "\t\t\t- path    = %s" % pkgPath )
-
-    if pkgName.count(os.sep) > 0 :
-       msg.warning( "About to create a funny CMT package !" )
-       msg.warning( "'PkgName' contains '%s'. Please fix it!" % os.sep )
-       msg.warning( "\t- name    = %s" % pkgName )
-       msg.warning( "\t- version = %s" % version )
-       msg.warning( "\t- path    = %s" % pkgPath )
-       # Ok, so, I fix it - but user is warned...
-       pkgName = os.path.basename(pkgName)
-       pass
-
-    return CmtPkg( pkgName, version, pkgPath )
-
-def createUseList(workAreas, suppressList = ["WorkArea"]):
-
-   msg = logging.getLogger( "WorkAreaMgr" )
-   cmtPackages = []
-   uses        = []
-   
-   for workArea in workAreas:
-      cmtPackages.extend( scan( workArea, suppressList ) )
-      pass
-
-   # Handle duplicate CMT packages:
-   pkgs = {}
-   duplicates = {}
-   for cmtPkg in cmtPackages:
-      if not pkgs.has_key(cmtPkg.name):
-         pkgs[cmtPkg.name] = cmtPkg
-         pass
-      else:
-         # we found a duplicate...
-         # check that the new one has a more recent version
-         if pkgs[cmtPkg.name].version < cmtPkg.version:
-            pkgs[cmtPkg.name] = cmtPkg
-            pass
-         duplicates[cmtPkg.name] = pkgs[cmtPkg.name]
-         pass
-      pass
-   if len(duplicates) > 0:
-      msg.warning( "Found duplicate(s): (listing the ones we kept)" )
-      for k in duplicates.keys():
-         msg.warning( "--" )
-         msg.warning( " Package: %s" % duplicates[k].name )
-         msg.warning( " Version: %s" % duplicates[k].version )
-         msg.warning( " Path:    %s" % duplicates[k].path )
-         pass
-      pass
-
-   del duplicates
-   cmtPackages = [ pkg for pkg in pkgs.values() ]
-   del pkgs
-                      
-   msg.info( "Found %i packages in WorkArea" % len(cmtPackages) )
-   if len(suppressList) >= 1:
-      # -1 because WorkArea is removed by default
-      msg.info( "=> %i package(s) in suppression list" % \
-                int(len(suppressList) - 1) ) 
-
-   for cmtPkg in cmtPackages:
-      # swallow the WorkArea path so we have a "cmt path" to put
-      # in the req file
-      for workArea in workAreas:
-         cmtPkg.path = cmtPkg.path.replace( workArea+os.sep, '' )
-         cmtPkg.path = cmtPkg.path.replace( workArea,        '' )
-         pass
-
-      if cmtPkg.path.endswith( os.sep ):
-         cmtPkg.path = os.path.split(cmtPkg.path)
-         pass
-
-      use = "use %s \t%s \t%s" % ( cmtPkg.name,
-                                   #cmtPkg.version,
-                                   "*",
-                                   cmtPkg.path )
-      msg.debug( "\t%s" % use )
-
-      uses.append( use )
-      pass
-
-   return uses
-
-def createWorkArea( workAreas = [], installDir = None,
-                    runTimePkg = 'offline', suppressList = None ):
-
-    msg = logging.getLogger("WorkAreaMgr")
-    if suppressList == None:
-       suppressList = [ "WorkArea" ]
-    else:
-       suppressList.append( "WorkArea" )
-       pass
-
-    atlasRunTime = runTimePkg[0].upper() + runTimePkg[1:]
-    
-    defaultWorkArea = os.environ[CmtStrings.CMTPATH].split(os.pathsep)[0]
-    if len(workAreas) <= 0:
-        workAreas = [ defaultWorkArea ]
-    if installDir == None:
-        installDir = defaultWorkArea
-        pass
-
-    msg.info( 80*"#" )
-    msg.info( "Creating a WorkArea CMT package under: [%s] " % installDir )
-
-    try:
-        installWorkArea( installDir,
-                         CmtPkg( "WorkArea", WORKAREA_VERSION, "" ) )
-    except Exception,err:
-        msg.error( "Could NOT create WorkArea package !!" )
-        msg.error( "%r", err)
-        msg.info( 80*"#" )
-        sys.exit(3)
-        
-    except :
-        msg.error( "Could NOT create WorkArea package !!" )
-        msg.info( 80*"#" )
-        sys.exit(4)
-        
-    reqLines = [
-        "package WorkArea",
-        "",
-        "author Sebastien Binet <binet@cern.ch>",
-        "",
-        "######################################",
-        "## Don't edit this file !!          ##",
-        "## It is automatically generated... ##",
-        "######################################",
-        "",
-        "## Generic part...",
-        "use AtlasPolicy 	 \tAtlasPolicy-*",
-        "use Atlas%sRunTime \tAtlas%sRunTime-*" % (atlasRunTime, atlasRunTime),
-        "",
-        "branches run python",
-        "",
-        "## Install the python classes into InstallArea",
-        "apply_pattern declare_python_modules files=\"*.py\"",
-        "",
-        "",
-        "## Automatically generated part...",
-        "" ]
-
-    uses = createUseList(workAreas, suppressList)
-
-    reqLines.extend( uses )
-    reqLines.append( "" )
-    reqLines.append( "## End of generation." )
-    reqLines.append( "## EOF ##" )
-    
-    reqFile = open( os.path.join( installDir,
-                                  "WorkArea",
-                                  CmtStrings.CMTDIR,
-                                  CmtStrings.CMTREQFILE ),
-                    "w" )
-    for reqLine in reqLines:
-        reqFile.writelines( reqLine + os.linesep )
-        pass
-
-    msg.info( "Generation of %s done [OK]" % \
-              os.path.join( "WorkArea",
-                            CmtStrings.CMTDIR,
-                            CmtStrings.CMTREQFILE ) )
-    
-    reqFile.close()
-
-    msg.info( 80*"#" )
-    return
-
-def installWorkArea( installDir, cmtWorkAreaPkg ):
-    msg = logging.getLogger("WorkAreaMgr")
-
-    workAreaDir = os.path.join( installDir,  cmtWorkAreaPkg.name )
-    cmtDir      = os.path.join( workAreaDir, CmtStrings.CMTDIR   )
-
-    if os.path.exists(installDir):
-        if os.access(installDir, os.W_OK):
-            if os.path.exists( workAreaDir ):
-                if not os.path.exists( cmtDir ):
-                    os.mkdir( cmtDir )
-                    pass
-                pass
-            else:
-                os.makedirs( os.path.join( workAreaDir, cmtDir ) )
-            pass
-        else:
-            msg.error( "Can't write under [%s] !!" % installDir )
-            raise OSError
-        pass
-    else:
-        try:
-            os.makedirs(installDir)
-            installWorkArea( installDir, cmtWorkAreaPkg )
-        except OSError, what:
-            msg.error( "Install dir for WorkArea does NOT exist and can't create it !!" )
-            raise OSError, what
-        pass
-
-    msg.debug( "Creating a consistent version file for the WorkArea pkg..." )
-    cmtVersFile = open( os.path.join(cmtDir, CmtStrings.CMTVERSIONFILE), 'w' )
-    cmtVersFile.writelines( cmtWorkAreaPkg.version + os.linesep )
-    cmtVersFile.close()
-    msg.debug( "Create a dummy %s file for the WorkArea pkg..." % CmtStrings.CMTREQFILE ) 
-    cmtReqFile = open( os.path.join(cmtDir, CmtStrings.CMTREQFILE), 'w' )
-    cmtReqFile.writelines( "package %s %s" % (cmtWorkAreaPkg.name, os.linesep ) )
-    cmtReqFile.close()
-
-    msg.debug("creating python directories to workaround CMT bugs...")
-    install_area = os.path.join(installDir, 'InstallArea')
-    pydirs = [os.path.join(install_area, 'python'),
-              os.path.join(install_area, '${CMTCONFIG}', 'lib', 'python')]
-    pydirs = [os.path.expandvars(p) for p in pydirs]
-    
-    for p in pydirs:
-        if not os.path.exists(p):
-            try:
-                os.makedirs(p)
-            except OSError, what:
-                msg.error('could not create directory [%s]',p)
-                msg.error(what)
-    msg.debug("creating python directories to workaround CMT bugs... [ok]")
-                
-    return
-
diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFillerTool.cxx
index ddc6c334b32ae78ef45b4a2b5401c09ff2aaa562..76a1a17444ceae51aa72958a21012060b115e7ed 100644
--- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFillerTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileMuonFillerTool.cxx
@@ -109,12 +109,12 @@ StatusCode TileMuonFillerTool::book(){
     // MUON HITS IN SUBDETECTORS
     if(m_LevelOfDetails > 1){
         // HIT NUMBERS IN SUBDETECTORS
-        CHECK( addVariable("numberOfBLayerHits",               m_numberOfBLayerHits,               "", m_defaultValue));
+        CHECK( addVariable("numberOfInnermostPixelLayerHits",               m_numberOfBLayerHits,               "", m_defaultValue));
         CHECK( addVariable("numberOfPixelHits",                m_numberOfPixelHits,                "", m_defaultValue));
         CHECK( addVariable("numberOfSCTHits",                  m_numberOfSCTHits,                  "", m_defaultValue));
         CHECK( addVariable("numberOfTRTHits",                  m_numberOfTRTHits,                  "", m_defaultValue));
         CHECK( addVariable("numberOfTRTHighThresholdHits",     m_numberOfTRTHighThresholdHits,     "", m_defaultValue));
-        CHECK( addVariable("numberOfBLayerSharedHits",         m_numberOfBLayerSharedHits,         "", m_defaultValue));
+        CHECK( addVariable("numberOfInnermostPixelLayerSharedHits",         m_numberOfBLayerSharedHits,         "", m_defaultValue));
         CHECK( addVariable("numberOfPixelSharedHits",          m_numberOfPixelSharedHits,          "", m_defaultValue));
         CHECK( addVariable("numberOfPixelHoles",               m_numberOfPixelHoles,               "", m_defaultValue));
         CHECK( addVariable("numberOfSCTSharedHits",            m_numberOfSCTSharedHits,            "", m_defaultValue));
@@ -313,7 +313,7 @@ StatusCode TileMuonFillerTool::fill(const xAOD::Muon& p){
 
     if(m_LevelOfDetails > 1){
 
-        muonPointer->summaryValue( *((uint8_t*)m_numberOfBLayerHits), xAOD::numberOfBLayerHits );
+        muonPointer->summaryValue( *((uint8_t*)m_numberOfBLayerHits), xAOD::numberOfInnermostPixelLayerHits );
         muonPointer->summaryValue( *((uint8_t*)m_numberOfPixelHits), xAOD::numberOfPixelHits );
         muonPointer->summaryValue( *((uint8_t*)m_numberOfSCTHits), xAOD::numberOfSCTHits );
         muonPointer->summaryValue( *((uint8_t*)m_numberOfTRTHits), xAOD::numberOfTRTHits );
@@ -321,7 +321,7 @@ StatusCode TileMuonFillerTool::fill(const xAOD::Muon& p){
         muonPointer->summaryValue( *((uint8_t*)m_numberOfSCTDeadSensors), xAOD::numberOfSCTDeadSensors );
         muonPointer->summaryValue( *((uint8_t*)m_numberOfSCTHoles), xAOD::numberOfSCTHoles );
         muonPointer->summaryValue( *((uint8_t*)m_numberOfTRTHighThresholdHits), xAOD::numberOfTRTHighThresholdHits );
-        muonPointer->summaryValue( *((uint8_t*)m_numberOfBLayerSharedHits), xAOD::numberOfBLayerSharedHits );
+        muonPointer->summaryValue( *((uint8_t*)m_numberOfBLayerSharedHits), xAOD::numberOfInnermostPixelLayerSharedHits );
         muonPointer->summaryValue( *((uint8_t*)m_numberOfPixelSharedHits), xAOD::numberOfPixelSharedHits );
         muonPointer->summaryValue( *((uint8_t*)m_numberOfPixelHoles), xAOD::numberOfPixelHoles );
         muonPointer->summaryValue( *((uint8_t*)m_numberOfSCTSharedHits), xAOD::numberOfSCTSharedHits );
diff --git a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFillerTool.cxx
index 6c0f70c2fc3677fc84d5d53f6c08d74ed3e6f19d..6dd03a08463212514df1501e9c063f2eeeda99b0 100644
--- a/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFillerTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TileD3PDMaker/src/TileTrackFillerTool.cxx
@@ -121,9 +121,9 @@ StatusCode TileTrackFillerTool::book(){
     }
 
     if (m_LevelOfDetails > 3){
-        CHECK( addVariable("numberOfBLayerHits",               m_numberOfBLayerHits,               "", m_defaultValue));
+        CHECK( addVariable("numberOfInnermostPixelLayerHits",               m_numberOfBLayerHits,               "", m_defaultValue));
         CHECK( addVariable("numberOfTRTHighThresholdHits",     m_numberOfTRTHighThresholdHits,     "", m_defaultValue));
-        CHECK( addVariable("numberOfBLayerSharedHits",         m_numberOfBLayerSharedHits,         "", m_defaultValue));
+        CHECK( addVariable("numberOfInnermostPixelLayerSharedHits",         m_numberOfBLayerSharedHits,         "", m_defaultValue));
         CHECK( addVariable("numberOfPixelSharedHits",          m_numberOfPixelSharedHits,          "", m_defaultValue));
         CHECK( addVariable("numberOfPixelHoles",               m_numberOfPixelHoles,               "", m_defaultValue));
         CHECK( addVariable("numberOfSCTSharedHits",            m_numberOfSCTSharedHits,            "", m_defaultValue));
@@ -222,9 +222,9 @@ StatusCode TileTrackFillerTool::fill(const xAOD::TrackParticle& p){
     } // IF
     
     if(m_LevelOfDetails > 3){
-        trackPointer->summaryValue( *((uint8_t*)m_numberOfBLayerHits), xAOD::numberOfBLayerHits );
+        trackPointer->summaryValue( *((uint8_t*)m_numberOfBLayerHits), xAOD::numberOfInnermostPixelLayerHits );
         trackPointer->summaryValue( *((uint8_t*)m_numberOfTRTHighThresholdHits), xAOD::numberOfTRTHighThresholdHits );
-        trackPointer->summaryValue( *((uint8_t*)m_numberOfBLayerSharedHits), xAOD::numberOfBLayerSharedHits );
+        trackPointer->summaryValue( *((uint8_t*)m_numberOfBLayerSharedHits), xAOD::numberOfInnermostPixelLayerSharedHits );
         trackPointer->summaryValue( *((uint8_t*)m_numberOfPixelSharedHits), xAOD::numberOfPixelSharedHits );
         trackPointer->summaryValue( *((uint8_t*)m_numberOfPixelHoles), xAOD::numberOfPixelHoles );
         trackPointer->summaryValue( *((uint8_t*)m_numberOfSCTSharedHits), xAOD::numberOfSCTSharedHits );
diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/python/xAODTrackSummaryFiller.py b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/python/xAODTrackSummaryFiller.py
index 270acb9f5b24d5ddb3847783a9890e05e6e0b6f2..f72fd4e096862d5dc9135166dcaf75f725ab100d 100644
--- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/python/xAODTrackSummaryFiller.py
+++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/python/xAODTrackSummaryFiller.py
@@ -78,7 +78,7 @@ sumvars = [
     [  InfoPlus,              'standardDeviationOfChi2OS =standardDeviationOfChi2OS'],
 
     # Expect BLayer hit
-    [  ExpectBLayer,          'expectBLayerHit = expectInnermostPixelLayerHit'],
+    [  ExpectBLayer,          'expectInnermostPixelLayerHit = expectInnermostPixelLayerHit'],
 
     # Muon hits
     [ [MuonHits, HitSum],     'nprecisionLayers  = numberOfPrecisionLayers'],
diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/share/RecoOptions.py b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/share/RecoOptions.py
index 9699a577b1a66c4b0c8c73ed4d153abba51cdade..5f3938f119ec04524066ea8c3033dddef2289c28 100644
--- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/share/RecoOptions.py
+++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/share/RecoOptions.py
@@ -129,9 +129,7 @@ InDetFlags.doTrkNtuple        = False
 InDetFlags.doPixelTrkNtuple   = False
 InDetFlags.doSctTrkNtuple     = False
 InDetFlags.doTrtTrkNtuple     = False
-InDetFlags.doPixelClusterNtuple = False
 InDetFlags.doSctClusterNtuple   = False
-InDetFlags.doTrtDriftCircleNtuple = False
 InDetFlags.doVtxNtuple        = False
 InDetFlags.doConvVtxNtuple    = False
 InDetFlags.doV0VtxNtuple      = False
diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/share/RecoSetupForSctNtuple.py b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/share/RecoSetupForSctNtuple.py
index 9370c214bd63ebbd3a83123494536fb68e46c237..5e2cdf67537ff22aa84ce382429b7268b3925d82 100644
--- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/share/RecoSetupForSctNtuple.py
+++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/share/RecoSetupForSctNtuple.py
@@ -167,9 +167,7 @@ InDetFlags.doTrkNtuple        = False
 InDetFlags.doPixelTrkNtuple   = False 
 InDetFlags.doSctTrkNtuple     = False 
 InDetFlags.doTrtTrkNtuple     = False 
-InDetFlags.doPixelClusterNtuple = False
 InDetFlags.doSctClusterNtuple   = False
-InDetFlags.doTrtDriftCircleNtuple = False
 InDetFlags.doVtxNtuple        = False 
 InDetFlags.doConvVtxNtuple    = False 
 InDetFlags.doV0VtxNtuple      = False 
diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTByteStreamErrorFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTByteStreamErrorFillerTool.cxx
index a0aa9f791f1d8e441acf78e984ae368c326c2939..aa1f02214293e4273ad16d66a58434377de89969 100644
--- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTByteStreamErrorFillerTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/SCTByteStreamErrorFillerTool.cxx
@@ -81,11 +81,11 @@ StatusCode SCTByteStreamErrorFillerTool::fill (const xAOD::EventInfo& /*p*/)
 
    *m_totalNumErrors = 0;
    for (int type=0; type < SCT_ByteStreamErrors::NUM_ERROR_TYPES; ++type) {
-     std::set<IdentifierHash>* errorSet = m_byteStreamErrSvc->getErrorSet(type);
+     const std::set<IdentifierHash>* errorSet = m_byteStreamErrSvc->getErrorSet(type);
      if (errorSet != 0) {
        int eta=0,phi=0,bec=0,layer=0,side=0;
-       std::set<IdentifierHash>::iterator it = errorSet->begin();
-       std::set<IdentifierHash>::iterator itEnd = errorSet->end();
+       std::set<IdentifierHash>::const_iterator it = errorSet->begin();
+       std::set<IdentifierHash>::const_iterator itEnd = errorSet->end();
        *m_totalNumErrors += errorSet->size();
        for (; it != itEnd; ++it) {
 	 Identifier itId = m_sctid->wafer_id(*it);
diff --git a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackTrackSummaryFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackTrackSummaryFillerTool.cxx
index ac4482edaa2bc8ccfd88ea9967a8b3b0e8dde423..bd15ef7d3ab885afd3c12b5b5ac2238b84a6e636 100644
--- a/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackTrackSummaryFillerTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TrackD3PDMaker/src/TrackTrackSummaryFillerTool.cxx
@@ -55,7 +55,7 @@ struct Var {
 
 Var vars[] = {
   // ID hits
-  { IDHitsMask,                  "nBLHits",                   Trk::numberOfBLayerHits },
+  { IDHitsMask,                  "nBLHits",                   Trk::numberOfInnermostPixelLayerHits },
   { IDHitsMask   | HitSumMask,   "nPixHits",                  Trk::numberOfPixelHits },
   { IDHitsMask   | HitSumMask,   "nSCTHits",                  Trk::numberOfSCTHits },
   { IDHitsMask   | HitSumMask,   "nTRTHits",                  Trk::numberOfTRTHits },
@@ -68,13 +68,13 @@ Var vars[] = {
   { IDHolesMask,                 "nPixelDeadSensors",         Trk::numberOfPixelDeadSensors },
   { IDHolesMask,                 "nSCTDeadSensors",           Trk::numberOfSCTDeadSensors },
   // ID shared & Split hits
-  { IDSharedHitsMask,           "nBLSharedHits",              Trk::numberOfBLayerSharedHits},
+  { IDSharedHitsMask,           "nBLSharedHits",              Trk::numberOfInnermostPixelLayerSharedHits},
   { IDSharedHitsMask,           "nPixSharedHits",             Trk::numberOfPixelSharedHits},
   { IDSharedHitsMask,           "nSCTSharedHits",             Trk::numberOfSCTSharedHits },
-  { IDSharedHitsMask,           "nBLayerSplitHits",           Trk::numberOfBLayerSplitHits},
+  { IDSharedHitsMask,           "nBLayerSplitHits",           Trk::numberOfInnermostLayerSplitHits},
   { IDSharedHitsMask,           "nPixSplitHits",              Trk::numberOfPixelSplitHits},
   // ID outliers                                              
-  { IDOutliersMask,             "nBLayerOutliers",            Trk::numberOfBLayerOutliers },
+  { IDOutliersMask,             "nBLayerOutliers",            Trk::numberOfInnermostPixelLayerOutliers },
   { IDOutliersMask,             "nPixelOutliers",             Trk::numberOfPixelOutliers },
   { IDOutliersMask,             "nSCTOutliers",               Trk::numberOfSCTOutliers },
   { IDOutliersMask,             "nTRTOutliers",               Trk::numberOfTRTOutliers},
@@ -94,7 +94,7 @@ Var vars[] = {
   { InfoPlusMask,               "nOutliersOnTrack",           Trk::numberOfOutliersOnTrack },
   { InfoPlusMask,               "standardDeviationOfChi2OS",  Trk::standardDeviationOfChi2OS },
   // Expect BLayer hit                                        
-  { ExpectBLayerMask,           "expectBLayerHit",            Trk::expectBLayerHit },
+  { ExpectBLayerMask,           "expectInnermostPixelLayerHit",            Trk::expectInnermostPixelLayerHit },
   // Muon hits                                                
   { MuonHitsMask | HitSumMask,  "nMDTHits",                   Trk::numberOfMdtHits },
   { MuonHitsMask | HitSumMask,  "nCSCEtaHits",                Trk::numberOfCscEtaHits },
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/CMakeLists.txt b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/CMakeLists.txt
index 2a50e156f99f31b26ada3bdb4a672a14d76c01bb..e69052ff965430987e6a6a0a53cdee8ab87e638d 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/CMakeLists.txt
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/CMakeLists.txt
@@ -15,7 +15,7 @@ atlas_depends_on_subdirs( PRIVATE
                           Event/xAOD/xAODTruth
                           GaudiKernel
                           Generators/GeneratorObjects
-                          Generators/HforTool
+                          Generators/GenInterfaces
                           Generators/TruthUtils
                           PhysicsAnalysis/D3PDMaker/D3PDMakerInterfaces
                           PhysicsAnalysis/D3PDMaker/D3PDMakerUtils
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/HforFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/HforFillerTool.cxx
index ad79d1f0cece5f5ea842a18110187bde2b71c8c0..971eacc977b5e31d78d25d6db4b676c8fda8fe4c 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/HforFillerTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/HforFillerTool.cxx
@@ -10,6 +10,7 @@
 #include "D3PDMakerUtils/BlockFillerTool.h"
 #include "AthenaKernel/errorcheck.h"
 #include "HforFillerTool.h"
+#include "HepMC/SimpleVector.h"
 
 namespace D3PD{
 
diff --git a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/HforFillerTool.h b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/HforFillerTool.h
index d8d7017da5c39f68a1a5eaea111e9404a27fbd05..99b7360860a3ccdbd0719f9acf961261033c4dd1 100644
--- a/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/HforFillerTool.h
+++ b/PhysicsAnalysis/D3PDMaker/TruthD3PDMaker/src/HforFillerTool.h
@@ -14,7 +14,7 @@
 
 #include "GaudiKernel/ToolHandle.h"
 #include "D3PDMakerUtils/BlockFillerTool.h"
-#include "HforTool/HforTool.h"
+#include "GenInterfaces/IHforTool.h"
 
 namespace D3PD {
 
diff --git a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/egammaConversionFillerTool.cxx b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/egammaConversionFillerTool.cxx
index c4111c8ecd5c24b41b32e31d292b92ca1aba1484..d4bdb6591d79460fd78f2de9b7d2fe2e7d31171e 100644
--- a/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/egammaConversionFillerTool.cxx
+++ b/PhysicsAnalysis/D3PDMaker/egammaD3PDMaker/src/egammaConversionFillerTool.cxx
@@ -112,7 +112,7 @@ StatusCode egammaConversionFillerTool::fill (const xAOD::Photon& p)
     if (tp1) {
       psum += tp1->p4();
       *m_pt1conv = tp1->pt();
-      tp1->summaryValue (*m_convtrk1nBLHits,  xAOD::numberOfBLayerHits);
+      tp1->summaryValue (*m_convtrk1nBLHits,  xAOD::numberOfInnermostPixelLayerHits);
       tp1->summaryValue (*m_convtrk1nPixHits, xAOD::numberOfPixelHits);
       tp1->summaryValue (*m_convtrk1nSCTHits, xAOD::numberOfSCTHits);
       tp1->summaryValue (*m_convtrk1nTRTHits, xAOD::numberOfTRTHits);
@@ -122,7 +122,7 @@ StatusCode egammaConversionFillerTool::fill (const xAOD::Photon& p)
     if (tp2) {
       psum += tp2->p4();
       *m_pt2conv = tp2->pt();
-      tp2->summaryValue (*m_convtrk2nBLHits,  xAOD::numberOfBLayerHits);
+      tp2->summaryValue (*m_convtrk2nBLHits,  xAOD::numberOfInnermostPixelLayerHits);
       tp2->summaryValue (*m_convtrk2nPixHits, xAOD::numberOfPixelHits);
       tp2->summaryValue (*m_convtrk2nSCTHits, xAOD::numberOfSCTHits);
       tp2->summaryValue (*m_convtrk2nTRTHits, xAOD::numberOfTRTHits);
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ElectronsCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ElectronsCPContent.py
index 553b7f01663b7547971a05b659774779cacee2a1..a8ad3f2327c6f8905400b6a9d1bb9516b8a4f762 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ElectronsCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/ElectronsCPContent.py
@@ -4,7 +4,7 @@ ElectronsCPContent = [
 "Electrons",
 "ElectronsAux.trackParticleLinks.pt.eta.phi.m.truthParticleLink.truthOrigin.truthType.caloClusterLinks.author.OQ.ethad1.ethad.f1.f3.f3core.e233.e237.e277.weta1.weta2.e2tsts1.fracs1.wtots1.emins1.emaxs1.etcone20.ptcone30.deltaEta1.deltaPhi2.deltaPhiRescaled2.Loose.Medium.Tight.DFCommonElectronsLHLoose.DFCommonElectronsLHMedium.DFCommonElectronsLHTight.DFCommonElectronsML.ptcone20.ptcone30.ptcone40.ptvarcone20.ptvarcone30.ptvarcone40.topoetcone20.topoetcone30.topoetcone40.charge.Reta.Rphi.Eratio.Rhad.Rhad1.DeltaE.DFCommonElectronsIsEMLoose.DFCommonElectronsIsEMMedium.DFCommonElectronsIsEMTight.topoetcone20ptCorrection.topoetcone30ptCorrection.topoetcone40ptCorrection.etcone20ptCorrection.etcone30ptCorrection.etcone40ptCorrection.LHLoose",
 "GSFTrackParticles",
-"GSFTrackParticlesAux.phi.d0.theta.qOverP.definingParametersCovMatrix.parameterX.parameterPX.parameterPY.parameterPZ.parameterPosition.numberOfBLayerHits.numberOfBLayerOutliers.expectBLayerHit.numberOfPixelHits.numberOfPixelOutliers.numberOfPixelDeadSensors.numberOfSCTHits.numberOfSCTOutliers.numberOfSCTDeadSensors.numberOfTRTHits.numberOfTRTOutliers.numberOfTRTHighThresholdHits.numberOfTRTHighThresholdOutliers.numberOfTRTXenonHits.z0.vz.vertexLink.numberOfInnermostPixelLayerHits.numberOfInnermostPixelLayerOutliers.numberOfNextToInnermostPixelLayerOutliers.expectInnermostPixelLayerHit.eProbabilityComb.truthParticleLink.originalTrackParticle.eProbabilityHT.numberOfNextToInnermostPixelLayerHits.expectNextToInnermostPixelLayerHit",
+"GSFTrackParticlesAux.phi.d0.theta.qOverP.definingParametersCovMatrix.parameterX.parameterPX.parameterPY.parameterPZ.parameterPosition.numberOfInnermostPixelLayerHits.numberOfInnermostPixelLayerOutliers.expectInnermostPixelLayerHit.numberOfPixelHits.numberOfPixelOutliers.numberOfPixelDeadSensors.numberOfSCTHits.numberOfSCTOutliers.numberOfSCTDeadSensors.numberOfTRTHits.numberOfTRTOutliers.numberOfTRTHighThresholdHits.numberOfTRTHighThresholdOutliers.numberOfTRTXenonHits.z0.vz.vertexLink.numberOfNextToInnermostPixelLayerOutliers.eProbabilityComb.truthParticleLink.originalTrackParticle.eProbabilityHT.numberOfNextToInnermostPixelLayerHits.expectNextToInnermostPixelLayerHit",
 "GSFConversionVertices",
 "GSFConversionVerticesAux.px.py.pz",
 "PrimaryVertices",
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/InDetTrackParticlesCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/InDetTrackParticlesCPContent.py
index 8b99065219feec650134948dab66e59ec815bd38..1c480bc06c6b00b51c08efbe186ea50f78f2ddd6 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/InDetTrackParticlesCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/InDetTrackParticlesCPContent.py
@@ -2,5 +2,5 @@
 
 InDetTrackParticlesCPContent = [
 "InDetTrackParticles",
-"InDetTrackParticlesAux.phi.d0.z0.theta.qOverP.definingParametersCovMatrix.chiSquared.numberDoF.numberOfBLayerHits.numberOfPixelHits.numberOfPixelHoles.numberOfPixelSharedHits.numberOfPixelDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfSCTSharedHits.numberOfSCTDeadSensors.vertexLink.numberOfInnermostPixelLayerHits.numberOfNextToInnermostPixelLayerHits.truthParticleLink.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit"
+"InDetTrackParticlesAux.phi.d0.z0.theta.qOverP.definingParametersCovMatrix.chiSquared.numberDoF.numberOfInnermostPixelLayerHits.numberOfPixelHits.numberOfPixelHoles.numberOfPixelSharedHits.numberOfPixelDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfSCTSharedHits.numberOfSCTDeadSensors.vertexLink.numberOfNextToInnermostPixelLayerHits.truthParticleLink.expectInnermostPixelLayerHit.expectNextToInnermostPixelLayerHit"
 ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/PrimaryVerticesCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/PrimaryVerticesCPContent.py
index fdf14af6d56edb664e6aea8d2ddcbb24f1b5c851..9cd1c17bd215123375f904b7dac9dce5f34adc6a 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/PrimaryVerticesCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/PrimaryVerticesCPContent.py
@@ -4,5 +4,5 @@ PrimaryVerticesCPContent = [
 "InDetTrackParticles",
 "InDetTrackParticlesAux.vertexLink.d0.z0.theta.vz.truthParticleLink",
 "PrimaryVertices",
-"PrimaryVerticesAux.trackParticleLinks.z.vertexType.neutralParticleLinks"
+"PrimaryVerticesAux.trackParticleLinks.x.y.z.vertexType.neutralParticleLinks"
 ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py
index 015b8dd8560b87d1cb8abcc807fcca8935b549eb..ecb463322a0284c92500917c22a5ede7c820ebd8 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/python/InDetTrackParticlesCPContent.py
@@ -2,5 +2,5 @@
 
 InDetTrackParticlesCPContent = [
 "InDetTrackParticles",
-"InDetTrackParticlesAux.phi.theta.qOverP.chiSquared.numberDoF.numberOfBLayerHits.numberOfPixelHits.numberOfPixelHoles.numberOfPixelSharedHits.numberOfPixelDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfSCTSharedHits.numberOfSCTDeadSensors"
+"InDetTrackParticlesAux.phi.theta.qOverP.chiSquared.numberDoF.numberOfInnermostPixelLayerHits.numberOfPixelHits.numberOfPixelHoles.numberOfPixelSharedHits.numberOfPixelDeadSensors.numberOfSCTHits.numberOfSCTHoles.numberOfSCTSharedHits.numberOfSCTDeadSensors"
 ]
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/EventInfoBSErrDecorator.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/EventInfoBSErrDecorator.cxx
index e97f15f43d20e737b3d5e4a82c4e445256f6921b..d0c9fd5351603db38efdfda1c5ba8f6e8f3a32c6 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/EventInfoBSErrDecorator.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/EventInfoBSErrDecorator.cxx
@@ -81,11 +81,11 @@ namespace DerivationFramework {
 
     // fill BS error information
     for (int n_type=0; n_type < SCT_ByteStreamErrors::NUM_ERROR_TYPES; ++n_type) {
-      std::set<IdentifierHash>* errorSet = m_byteStreamErrSvc->getErrorSet(n_type);
+      const std::set<IdentifierHash>* errorSet = m_byteStreamErrSvc->getErrorSet(n_type);
       if (errorSet != 0) {
         int eta=0,phi=0,bec=0,layer=0,side=0;
-        std::set<IdentifierHash>::iterator it = errorSet->begin();
-        std::set<IdentifierHash>::iterator itEnd = errorSet->end();
+        std::set<IdentifierHash>::const_iterator it = errorSet->begin();
+        std::set<IdentifierHash>::const_iterator itEnd = errorSet->end();
         // add totalNumErrors to vector
         totalNumErrors += errorSet->size();
         scterr_Ntot.push_back(totalNumErrors);
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx
index cb16dc26721bc6c1f6cf80fff6710a2db804e93a..b99c4ec673e9167f1d8cf280101b0324738ee8f9 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/src/TrackStateOnSurfaceDecorator.cxx
@@ -298,10 +298,9 @@ namespace DerivationFramework {
 	SG::AuxElement::Decorator< float > decoratorTRTusedHits_noHT_divByL("ToT_usedHits_noHT_divByL");    
 
 	decoratorTRTdEdx (*track)     = m_TRTdEdxTool->dEdx( trkTrack, true, true, true);
-        ITRT_ToT_dEdx::EGasType gasType;
-	decoratorTRTusedHits (*track) = m_TRTdEdxTool->usedHits( trkTrack, gasType, true, true);
+	decoratorTRTusedHits (*track) = m_TRTdEdxTool->usedHits( trkTrack, true, true);
 	decoratorTRTdEdx_noHT_divByL (*track)     = m_TRTdEdxTool->dEdx( trkTrack, true, false, true);
-	decoratorTRTusedHits_noHT_divByL (*track) = m_TRTdEdxTool->usedHits( trkTrack, gasType, true, false);
+	decoratorTRTusedHits_noHT_divByL (*track) = m_TRTdEdxTool->usedHits( trkTrack, true, false);
       }
 
       // -- Add Track states to the current track, filtering on their type
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/LUT_mc12.root b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/share/LUT_mc12.root
old mode 100755
new mode 100644
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.cxx
index 0af0a88da67b33f1bf65bd96f839cd4cf933b780..a87a47322f8ff5c5f10972bfa156308803a78642 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.cxx
@@ -17,13 +17,13 @@ namespace DerivationFramework {
       const std::string& n,
       const IInterface* p) : 
     AthAlgTool(t,n,p),
-    dec_calibpt(0),
-    dec_calibeta(0),
-    dec_calibphi(0),
-    dec_calibm(0),
+    m_dec_calibpt(0),
+    m_dec_calibeta(0),
+    m_dec_calibphi(0),
+    m_dec_calibm(0),
     m_jetCalibTool(""),
     m_docalib(false),
-    dec_jvt(0),
+    m_dec_jvt(0),
     m_jvtTool(""),
     m_dojvt(false),
     m_dobtag(false),
@@ -52,24 +52,24 @@ namespace DerivationFramework {
       ATH_MSG_INFO("Augmenting jets with calibration \"" << m_momentPrefix+m_calibMomentKey << "\"");
       m_docalib = true;
 
-      dec_calibpt  = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_pt");
-      dec_calibeta = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_eta");
-      dec_calibphi = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_phi");
-      dec_calibm   = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_m");
+      m_dec_calibpt  = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_pt");
+      m_dec_calibeta = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_eta");
+      m_dec_calibphi = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_phi");
+      m_dec_calibm   = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_calibMomentKey+"_m");
 
       if(!m_jvtTool.empty()) {
 	CHECK(m_jvtTool.retrieve());
 	ATH_MSG_INFO("Augmenting jets with updated JVT \"" << m_momentPrefix+m_jvtMomentKey << "\"");
 	m_dojvt = true;
 
-	dec_jvt  = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_jvtMomentKey);
+	m_dec_jvt  = new SG::AuxElement::Decorator<float>(m_momentPrefix+m_jvtMomentKey);
 
 	if(!m_btagSelTools.empty()) {
 	  size_t ibtag(0);
 	  for(const auto& tool : m_btagSelTools) {
 	    CHECK(tool.retrieve());
 	    ATH_MSG_INFO("Augmenting jets with B-tag working point \"" << m_momentPrefix+m_btagWP[ibtag] << "\"");
-	    dec_btag.push_back(new SG::AuxElement::Decorator<float>(m_momentPrefix+m_btagWP[ibtag]));
+	    m_dec_btag.push_back(new SG::AuxElement::Decorator<float>(m_momentPrefix+m_btagWP[ibtag]));
 	    m_dobtag = true;
 	    ++ibtag;
 	  }
@@ -81,8 +81,8 @@ namespace DerivationFramework {
       CHECK(m_jetTrackSumMomentsTool.retrieve());
       ATH_MSG_INFO("Augmenting jets with track sum moments \"" << m_momentPrefix << "TrackSumMass,Pt\"");
       m_decoratetracksum = true;
-      dec_tracksummass = new SG::AuxElement::Decorator<float>(m_momentPrefix+"TrackSumMass");
-      dec_tracksumpt   = new SG::AuxElement::Decorator<float>(m_momentPrefix+"TrackSumPt");
+      m_dec_tracksummass = new SG::AuxElement::Decorator<float>(m_momentPrefix+"TrackSumMass");
+      m_dec_tracksumpt   = new SG::AuxElement::Decorator<float>(m_momentPrefix+"TrackSumPt");
     }
 
     return StatusCode::SUCCESS;
@@ -92,23 +92,23 @@ namespace DerivationFramework {
   {
 
     if(m_docalib) {
-      delete dec_calibpt;
-      delete dec_calibeta;
-      delete dec_calibphi;
-      delete dec_calibm;
+      delete m_dec_calibpt;
+      delete m_dec_calibeta;
+      delete m_dec_calibphi;
+      delete m_dec_calibm;
     }
 
     if(m_dojvt) {
-      delete dec_jvt;
+      delete m_dec_jvt;
     }
 
     if(m_dobtag) {
-      for(const auto& pdec : dec_btag) delete pdec;
+      for(const auto& pdec : m_dec_btag) delete pdec;
     }
 
     if(m_decoratetracksum){
-      delete dec_tracksummass;
-      delete dec_tracksumpt;
+      delete m_dec_tracksummass;
+      delete m_dec_tracksumpt;
     }
 
     return StatusCode::SUCCESS;
@@ -151,23 +151,23 @@ namespace DerivationFramework {
 
       if(m_docalib) {
 	// generate static decorators to avoid multiple lookups	
-	(*dec_calibpt)(jet_orig)  = jet->pt();
-	(*dec_calibeta)(jet_orig) = jet->eta();
-	(*dec_calibphi)(jet_orig) = jet->phi();
-	(*dec_calibm)(jet_orig)   = jet->m();
+	(*m_dec_calibpt)(jet_orig)  = jet->pt();
+	(*m_dec_calibeta)(jet_orig) = jet->eta();
+	(*m_dec_calibphi)(jet_orig) = jet->phi();
+	(*m_dec_calibm)(jet_orig)   = jet->m();
 
-	ATH_MSG_VERBOSE("Calibrated jet pt: " << (*dec_calibpt)(jet_orig) );
+	ATH_MSG_VERBOSE("Calibrated jet pt: " << (*m_dec_calibpt)(jet_orig) );
 
 	if(m_dojvt) {
-	  (*dec_jvt)(jet_orig) = m_jvtTool->updateJvt(*jet);
-	  ATH_MSG_VERBOSE("Calibrated JVT: " << (*dec_jvt)(jet_orig) );
+	  (*m_dec_jvt)(jet_orig) = m_jvtTool->updateJvt(*jet);
+	  ATH_MSG_VERBOSE("Calibrated JVT: " << (*m_dec_jvt)(jet_orig) );
 
 	  if(m_dobtag) {
-	    bool passJVT = jet->pt()>50e3 || fabs(jet->eta())>2.4 || (*dec_jvt)(jet_orig)>0.64;
+	    bool passJVT = jet->pt()>50e3 || fabs(jet->eta())>2.4 || (*m_dec_jvt)(jet_orig)>0.64;
 	    size_t ibtag(0);
 	    for(const auto& tool : m_btagSelTools) {
-	      (*dec_btag[ibtag])(jet_orig) = jet->pt()>20e3 && fabs(jet->eta())<2.5 && passJVT && tool->accept(*jet);
-	      ATH_MSG_VERBOSE("Btag working point \"" << m_btagWP[ibtag] << "\" " << ((*dec_btag[ibtag])(jet_orig) ? "passed." : "failed."));
+	      (*m_dec_btag[ibtag])(jet_orig) = jet->pt()>20e3 && fabs(jet->eta())<2.5 && passJVT && tool->accept(*jet);
+	      ATH_MSG_VERBOSE("Btag working point \"" << m_btagWP[ibtag] << "\" " << ((*m_dec_btag[ibtag])(jet_orig) ? "passed." : "failed."));
 	      ++ibtag;
 	    }
 	  }
@@ -175,10 +175,10 @@ namespace DerivationFramework {
       }
 
       if(m_decoratetracksum) {  
-	(*dec_tracksummass)(jet_orig) = jet->getAttribute<float>("TrackSumMass");
-	(*dec_tracksumpt)(jet_orig)   = jet->getAttribute<float>("TrackSumPt");
-	ATH_MSG_VERBOSE("TrackSumMass: " << (*dec_tracksummass)(jet_orig) );
-	ATH_MSG_VERBOSE("TrackSumPt: "   << (*dec_tracksummass)(jet_orig) );
+	(*m_dec_tracksummass)(jet_orig) = jet->getAttribute<float>("TrackSumMass");
+	(*m_dec_tracksumpt)(jet_orig)   = jet->getAttribute<float>("TrackSumPt");
+	ATH_MSG_VERBOSE("TrackSumMass: " << (*m_dec_tracksummass)(jet_orig) );
+	ATH_MSG_VERBOSE("TrackSumPt: "   << (*m_dec_tracksummass)(jet_orig) );
       }
     }
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h
index 7b6ecb7c4440eb90996d62f9d907bb20eef52c56..390640b04176bbced8f7435781b677caf2e0aecd 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetAugmentationTool.h
@@ -39,22 +39,22 @@ namespace DerivationFramework {
     // implement augmentations explicitly to avoid need to parse lists of moments to copy
     //
     // calibration
-    SG::AuxElement::Decorator<float>* dec_calibpt;
-    SG::AuxElement::Decorator<float>* dec_calibeta;
-    SG::AuxElement::Decorator<float>* dec_calibphi;
-    SG::AuxElement::Decorator<float>* dec_calibm;
+    SG::AuxElement::Decorator<float>* m_dec_calibpt;
+    SG::AuxElement::Decorator<float>* m_dec_calibeta;
+    SG::AuxElement::Decorator<float>* m_dec_calibphi;
+    SG::AuxElement::Decorator<float>* m_dec_calibm;
     ToolHandle<IJetModifier> m_jetCalibTool;
     std::string m_calibMomentKey;
     bool m_docalib;
 
     // JVT
-    SG::AuxElement::Decorator<float>* dec_jvt;
+    SG::AuxElement::Decorator<float>* m_dec_jvt;
     ToolHandle<IJetUpdateJvt> m_jvtTool;
     std::string m_jvtMomentKey;
     bool m_dojvt;
 
     // b-tagging       @author tripiana@cern.ch
-    std::vector<SG::AuxElement::Decorator<float>*> dec_btag;
+    std::vector<SG::AuxElement::Decorator<float>*> m_dec_btag;
     std::vector<std::string> m_btagWP;
     bool m_dobtag;
     /// Athena configured tools
@@ -64,8 +64,8 @@ namespace DerivationFramework {
     //@author: nurfikri.bin.norjoharuddeen@cern.ch
     ToolHandle<IJetModifier> m_jetTrackSumMomentsTool;
     bool m_decoratetracksum;
-    SG::AuxElement::Decorator<float>* dec_tracksummass;
-    SG::AuxElement::Decorator<float>* dec_tracksumpt;
+    SG::AuxElement::Decorator<float>* m_dec_tracksummass;
+    SG::AuxElement::Decorator<float>* m_dec_tracksumpt;
   }; 
 }
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetExternalAssocTool.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetExternalAssocTool.cxx
index 9ac909cce556ae881064c0fc4d69920aeff7d5dc..171ebace5cbf14076f037dda5d660f41bd1bc516 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetExternalAssocTool.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkJetEtMiss/src/JetExternalAssocTool.cxx
@@ -109,9 +109,9 @@ StatusCode JetExternalAssocTool::addBranches() const{
     // simple dR matching
 
     // initialize list of un-assigned external jets
-    std::vector<const xAOD::Jet*> m_UnAssignedExternalJets;
+    std::vector<const xAOD::Jet*> UnAssignedExternalJets;
     for(auto jet_external : *ExternalJetCollection){
-      m_UnAssignedExternalJets.push_back(jet_external);
+      UnAssignedExternalJets.push_back(jet_external);
     }
 
     // loop
@@ -119,9 +119,9 @@ StatusCode JetExternalAssocTool::addBranches() const{
       // get associated jet
       double mindR = 9e9;
       const xAOD::Jet* associated_jet = 0;
-      std::vector<const xAOD::Jet*>::iterator associated_iter = m_UnAssignedExternalJets.begin();  // random assignment
+      std::vector<const xAOD::Jet*>::iterator associated_iter = UnAssignedExternalJets.begin();  // random assignment
 
-      for(auto external_iter = m_UnAssignedExternalJets.begin(); external_iter != m_UnAssignedExternalJets.end(); external_iter++){
+      for(auto external_iter = UnAssignedExternalJets.begin(); external_iter != UnAssignedExternalJets.end(); external_iter++){
         auto jet_external = (*external_iter);
 
         double dR = jet->p4().DeltaR(jet_external->p4());
@@ -145,7 +145,7 @@ StatusCode JetExternalAssocTool::addBranches() const{
         }
 
         // remove associated jet from unasigned jet list
-        m_UnAssignedExternalJets.erase(associated_iter);
+        UnAssignedExternalJets.erase(associated_iter);
       }
 
       // transfer the link
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/TruthCollectionMaker.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/TruthCollectionMaker.cxx
index 38c11b0397a3a81aa45dce34a225bd6f094cfba2..ad227bd2c372fe918250e2362b14186d40076158 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/TruthCollectionMaker.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/src/TruthCollectionMaker.cxx
@@ -208,7 +208,13 @@ StatusCode DerivationFramework::TruthCollectionMaker::addBranches() const
                         if (theParticle->prodVtx()->nIncomingParticles() > 0) motherIDDecorator(*xTruthParticle) = theParticle->prodVtx()->incomingParticle(0)->pdgId();
                     }
                     if (theParticle->hasDecayVtx()) {
-                        if (theParticle->decayVtx()->nOutgoingParticles() > 0) daughterIDDecorator(*xTruthParticle) = theParticle->decayVtx()->outgoingParticle(0)->pdgId();
+                      if (theParticle->decayVtx()->nOutgoingParticles() > 0) {
+                        const xAOD::TruthParticle* d =
+                          theParticle->decayVtx()->outgoingParticle(0);
+                        if (d) {
+                          daughterIDDecorator(*xTruthParticle) = d->pdgId();
+                        }
+                      }
                     }
                     // Fill with numerical content
                     xTruthParticle->setPdgId(theParticle->pdgId());
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauOverlappingElectronLLHDecoratorWrapper.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauOverlappingElectronLLHDecoratorWrapper.cxx
index 80c75d97ba69d646750646a9548abc5661d3960a..6d9bd6a1cf7f0641dbc41bdb2a44a661e7a2a683 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauOverlappingElectronLLHDecoratorWrapper.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauOverlappingElectronLLHDecoratorWrapper.cxx
@@ -61,8 +61,6 @@ namespace DerivationFramework {
       return StatusCode::FAILURE;
     }
 
-    CHECK(m_TauOverlappingElectronLLHDecorator->initializeEvent());
-
     for(auto xTau : *xTauContainer){
       CHECK( m_TauOverlappingElectronLLHDecorator->decorate(*xTau) );
     }
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauTruthMatchingWrapper.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauTruthMatchingWrapper.cxx
index 1c0d38750c23868167f0028ba3ab5597a04b5c1d..d0b30688c1348341e6caa968abb036c07a1797c4 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauTruthMatchingWrapper.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkTau/src/TauTruthMatchingWrapper.cxx
@@ -44,8 +44,6 @@ namespace DerivationFramework {
       return StatusCode::FAILURE;
     }
 
-    CHECK(m_tTauTruthMatchingTool->initializeEvent());
-
     for(auto xTau : *xTauContainer)
       m_tTauTruthMatchingTool->applyTruthMatch(*xTau);
     
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h
index edd860c578fea318222b14777f4400009781392a..a2f6c5edd2a8ca7007b5232d4411dddf6e2c19d8 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h
@@ -152,7 +152,7 @@ namespace CP {
     CP::SystematicSet m_mySysConf;
     CP::SystematicSet m_affectingSys;
 
- /// Currently applied systematics
+    /// Currently applied systematics
    CP::SystematicSet* m_appliedSystematics;
  
     /// Decorator
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx
index ffe1d0f85a1175f9d22da1227ad65c6d0b5d82b2..15e1f1164ac120de907a5831ba9b96d518b97c87 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection/Root/ElectronChargeEfficiencyCorrectionTool.cxx
@@ -10,7 +10,6 @@
    @date   September 2015
 */
 // Include this class's header
-// #include "ElectronChargeEfficiencyCorrectionTool/ElectronChargeEfficiencyCorrectionTool.h"
 #include "ElectronEfficiencyCorrection/ElectronChargeEfficiencyCorrectionTool.h"
 // xAOD includes
 #include "PathResolver/PathResolver.h"
@@ -51,6 +50,7 @@ CP::ElectronChargeEfficiencyCorrectionTool::ElectronChargeEfficiencyCorrectionTo
   m_filtered_sys_sets(),
   m_mySysConf(),
   m_affectingSys(),
+  m_appliedSystematics(0),
   m_sf_decoration_name("chargeIDEffiSF"),
   m_sfDec(0)
 {
@@ -129,14 +129,14 @@ StatusCode CP::ElectronChargeEfficiencyCorrectionTool::initialize()
   m_SF_SS.clear();
   m_SF_OS.clear();
   TList* keyListfolder = rootFile->GetListOfKeys();
-std::vector<std::string> names;
+  std::vector<std::string> names;
 
   for ( int j=0; j<keyListfolder->GetEntries(); j++ ){
-names.push_back(( keyListfolder->At(j)->GetName() ));
-}
-std::sort(names.begin(), names.end());
+    names.push_back(( keyListfolder->At(j)->GetName() ));
+  }
+  std::sort(names.begin(), names.end());
 
- for ( unsigned int j=0; j<names.size(); j++ ){
+  for ( unsigned int j=0; j<names.size(); j++ ){
 
     std::string name = names.at(j);
     ATH_MSG_DEBUG("Got ROOT object with name: " << name);
@@ -197,11 +197,11 @@ std::sort(names.begin(), names.end());
           std::string runlow = histid;
           runlow.erase(histid.find(Form("RunNumber") ),9);
           runlow.erase(runlow.find("_"),runlow.size() );
-//          m_RunNumbers.push_back( static_cast<unsigned int>(atoi(runlow.c_str())) );
+	  //          m_RunNumbers.push_back( static_cast<unsigned int>(atoi(runlow.c_str())) );
           std::string runhigh = histid;
           runhigh.erase(histid.find(Form("RunNumber") ),9);
           runhigh.erase(0,runhigh.find("_")+1);
-//          m_RunNumbers.push_back( static_cast<unsigned int>(atoi(runhigh.c_str())) );
+	  //          m_RunNumbers.push_back( static_cast<unsigned int>(atoi(runhigh.c_str())) );
         }
         ATH_MSG_VERBOSE("Using histid (OS hid): " << histid);
         m_SF_OS[histid].push_back( (TH2D*)rootFile->Get( names.at(j).c_str() ));
@@ -242,11 +242,11 @@ std::sort(names.begin(), names.end());
           std::string runlow = histid;
           runlow.erase(histid.find(Form("RunNumber") ),9);
           runlow.erase(runlow.find("_"),runlow.size() );
-  //        m_RunNumbers.push_back( static_cast<unsigned int>(atoi(runlow.c_str())) );
+	  //        m_RunNumbers.push_back( static_cast<unsigned int>(atoi(runlow.c_str())) );
           std::string runhigh = histid;
           runhigh.erase(histid.find(Form("RunNumber") ),9);
           runhigh.erase(0,runhigh.find("_")+1);
-    //      m_RunNumbers.push_back( static_cast<unsigned int>(atoi(runhigh.c_str())) );
+	  //      m_RunNumbers.push_back( static_cast<unsigned int>(atoi(runhigh.c_str())) );
         }
         ATH_MSG_VERBOSE("Using histid (OS hid): " << histid);
         m_SF_OS[histid].push_back( (TH2D*)rootFile->Get( names.at(j).c_str() ));
@@ -269,7 +269,7 @@ std::sort(names.begin(), names.end());
   if ( m_SF_OS.size() <1 || m_SF_SS.size() <1 || m_SF_SS.size()!=m_SF_OS.size() ) {
     ATH_MSG_ERROR("OS/SS SF vectors not filled or of different size. -- Problem with files. -- Report to <hn-atlas-EGammaWG@cern.ch>");
     return CP::CorrectionCode::Error;
-}
+  }
 
 
   std::sort(m_RunNumbers.begin(),m_RunNumbers.end());
@@ -359,7 +359,7 @@ CP::ElectronChargeEfficiencyCorrectionTool::getEfficiencyScaleFactor(const xAOD:
   const double ele_pt  = ele.pt()*m_gevmev;
   const double ele_eta = std::abs( ele.caloCluster()->etaBE(2)   );
 
-   // getting the truth charge
+  // getting the truth charge
   int truth_ele_charge = 9999;
   CP::CorrectionCode charge_result = this->getEleTruthCharge( ele, truth_ele_charge); //// ## Giulia: second function to change
   if ( charge_result != CP::CorrectionCode::Ok ) {
@@ -402,9 +402,9 @@ CP::ElectronChargeEfficiencyCorrectionTool::getEfficiencyScaleFactor(const xAOD:
     }
     ATH_MSG_DEBUG("Number of RunNumbers: " << m_RunNumbers.size() );
     for ( std::size_t r=0; r<m_RunNumbers.size(); r++ ){
-ATH_MSG_DEBUG(  m_RunNumbers.at(r) );
-	}
-ATH_MSG_VERBOSE("DONE");
+      ATH_MSG_DEBUG(  m_RunNumbers.at(r) );
+    }
+    ATH_MSG_VERBOSE("DONE");
 
     for ( std::size_t r=0; r<m_RunNumbers.size()-1; r++ ){
       ATH_MSG_VERBOSE(m_RunNumbers.size()-1 << "  " << m_RunNumbers.at(r) << "  " << m_RunNumbers.at(r+1) << "  " << runnumber);
@@ -416,14 +416,14 @@ ATH_MSG_VERBOSE("DONE");
     }
 
     if (runnumber<m_RunNumbers.at(0) || (runnumber>m_RunNumbers.at(m_RunNumbers.size()-1) )) {
-    ATH_MSG_DEBUG("RunNumber not in valid RunNumber Range ");
-    sf = -9999.0;
-    return CP::CorrectionCode::OutOfValidityRange;
-      }
+      ATH_MSG_DEBUG("RunNumber not in valid RunNumber Range ");
+      sf = -9999.0;
+      return CP::CorrectionCode::OutOfValidityRange;
+    }
 
   }
 
-   // Determine WHICH histograms to use here
+  // Determine WHICH histograms to use here
   const std::vector<TH2D*>& SShistograms = m_SF_SS.at(cutRunNumber.c_str());
   const std::vector<TH2D*>& OShistograms = m_SF_OS.at(cutRunNumber.c_str());
 
@@ -449,14 +449,14 @@ ATH_MSG_VERBOSE("DONE");
     }
   }
 
-   ATH_MSG_DEBUG("eta: " << ele_eta << "  pt: "<< ele_pt );
-   ATH_MSG_DEBUG("SF Rates---- . SF: " << sf );
+  ATH_MSG_DEBUG("eta: " << ele_eta << "  pt: "<< ele_pt );
+  ATH_MSG_DEBUG("SF Rates---- . SF: " << sf );
 
 
   // Systematics ------------------------------------------------------------------------------------------------------
   double val_stat;
 
-   /// STAT
+  /// STAT
   if (isOS) {
     retVal = this->getChargeFlipRate( ele_eta, ele_pt,OShistograms.at(1), val_stat);
     if ( retVal != 0 ) {
@@ -475,7 +475,7 @@ ATH_MSG_VERBOSE("DONE");
 
   std::vector<float> systs;
   double val_sys{0.0};
-   /// STAT
+  /// STAT
   for (unsigned int s=2;s<OShistograms.size();s++){
     if (isOS) {
       retVal = this->getChargeFlipRate( ele_eta, ele_pt,OShistograms.at(s), val_sys);
@@ -495,7 +495,7 @@ ATH_MSG_VERBOSE("DONE");
     systs.push_back(static_cast<float>(val_sys));
   }
 
-    ATH_MSG_DEBUG(" ... nominal SF: "   << sf);
+  ATH_MSG_DEBUG(" ... nominal SF: "   << sf);
 
 
   if ( m_mySysConf.size()==0 ) {
@@ -622,7 +622,7 @@ CP::CorrectionCode CP::ElectronChargeEfficiencyCorrectionTool::getEleTruthCharge
 CP::CorrectionCode CP::ElectronChargeEfficiencyCorrectionTool::isGoodEle( const xAOD::Electron& ele, bool& goodele) const
 {
 
-   // good ele => (firstEgMotherPdgId) == 11 ## valid for both iso and conversion ele
+  // good ele => (firstEgMotherPdgId) == 11 ## valid for both iso and conversion ele
 
   goodele = false;
   int firstEgPdgId = -9999;
@@ -702,7 +702,7 @@ CP::SystematicSet CP::ElectronChargeEfficiencyCorrectionTool::affectingSystemati
     result.insert (SystematicVariation (Form("EL_CHARGEID_SYS%s",m_systematics.at(i).c_str()), 1));
     result.insert (SystematicVariation (Form("EL_CHARGEID_SYS%s",m_systematics.at(i).c_str()), -1));
   }
-   return result;
+  return result;
 }
 
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronChargeIDSelectorTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronChargeIDSelectorTool.cxx
index dbeab65de7c840db7380ad2c355f0ecb8fd978de..d78e948d37ddebe844eda12266c57a7584ce6da4 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronChargeIDSelectorTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronChargeIDSelectorTool.cxx
@@ -42,15 +42,15 @@
 // Standard constructor
 //=============================================================================
 AsgElectronChargeIDSelectorTool::AsgElectronChargeIDSelectorTool(std::string myname) :
-  AsgTool(myname) //,m_cutOnBDT(0)//,m_configFile("")//,m_rootTool(0)
+  AsgTool(myname) ,
+  m_cutPosition_bdt(0),
+  m_resultPosition_bdt(0)
 {
   // Declare the needed properties
   declareProperty("WorkingPoint",m_WorkingPoint="","The Working Point");
-  //declareProperty("ConfigFile",m_configFile="","The config file to use");
   declareProperty("usePVContainer", m_usePVCont=true, "Whether to use the PV container");
   declareProperty("nPVdefault", m_nPVdefault = 0, "The default number of PVs if not counted");
   declareProperty("primaryVertexContainer", m_primVtxContName="PrimaryVertices", "The primary vertex container name" );
-
   declareProperty("TrainingFile",  m_trainingFile="", "The input ROOT file name holding training" );
   declareProperty("CutOnBDT",m_cutOnBDT=0,"Cut on BDT discriminant");
   m_pid_name=myname.data();
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronMultiLeptonSelector.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronMultiLeptonSelector.cxx
index 30e37fde79cf84349642418af9d93bc3b89f8778..7412ecc015884023fc57d902d6297903dfbd598c 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronMultiLeptonSelector.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/AsgElectronMultiLeptonSelector.cxx
@@ -163,7 +163,7 @@ const Root::TAccept& AsgElectronMultiLeptonSelector::accept( const xAOD::Electro
   if (t) {
     trackqoverp = t->qOverP();
     
-    allFound = allFound && t->summaryValue(nBlayerHits, xAOD::numberOfBLayerHits);
+    allFound = allFound && t->summaryValue(nBlayerHits, xAOD::numberOfInnermostPixelLayerHits);
     allFound = allFound && t->summaryValue(nPix, xAOD::numberOfPixelHits);
     allFound = allFound && t->summaryValue(nSCT, xAOD::numberOfSCTHits);
     allFound = allFound && t->summaryValue(nPixDeadSensors, xAOD::numberOfPixelDeadSensors);
@@ -174,7 +174,7 @@ const Root::TAccept& AsgElectronMultiLeptonSelector::accept( const xAOD::Electro
     allFound = allFound && t->summaryValue(nTRT, xAOD::numberOfTRTHits);
     allFound = allFound && t->summaryValue(nTRTOutliers, xAOD::numberOfTRTOutliers);
     
-    allFound = allFound && t->summaryValue(expectBlayer, xAOD::expectBLayerHit);
+    allFound = allFound && t->summaryValue(expectBlayer, xAOD::expectInnermostPixelLayerHit);
     
     
     nSi = nPix+nSCT;
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx
index 04eb9b4050f600f5e1f5f7abb41fa28baf495051..b0d212978cf8b0da54b4d6e53ebc0d8ee0f714a5 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/Root/TElectronLikelihoodTool.cxx
@@ -271,11 +271,11 @@ int Root::TElectronLikelihoodTool::LoadVarHistograms(std::string vstr,unsigned i
 	    continue;
 	  
 	  char pdfdir[500];
-	  sprintf(pdfdir,"%s/%s",vstr.c_str(),sig_bkg.c_str());
+	  snprintf(pdfdir,500,"%s/%s",vstr.c_str(),sig_bkg.c_str());
 	  char pdf[500];
-	  sprintf(pdf,"%s_%s_smoothed_hist_from_KDE_%s",vstr.c_str(),sig_bkg.c_str(),binname);
+	  snprintf(pdf,500,"%s_%s_smoothed_hist_from_KDE_%s",vstr.c_str(),sig_bkg.c_str(),binname);
 	  char pdf_newname[500];
-	  sprintf(pdf_newname,"%s_%s_%s_LHtool_copy_%s",Root::TSelectorToolBase::getName(),vstr.c_str(),sig_bkg.c_str(),binname);
+	  snprintf(pdf_newname,500,"%s_%s_%s_LHtool_copy_%s",Root::TSelectorToolBase::getName(),vstr.c_str(),sig_bkg.c_str(),binname);
 
 	  if (!m_pdfFile->GetListOfKeys()->Contains(vstr.c_str())){
             ATH_MSG_INFO("Warning: skipping variable " << vstr << " because the folder does not exist.");
@@ -299,8 +299,8 @@ int Root::TElectronLikelihoodTool::LoadVarHistograms(std::string vstr,unsigned i
           if (et == 0 && !((TDirectory*)m_pdfFile->Get(pdfdir))->GetListOfKeys()->Contains(pdf)) {
             //std::cout << "Info: using 7 GeV bin in place of 4 GeV bin." << std::endl;
             getBinName( binname, et_tmp+1, eta_tmp, ip, m_ipBinning );
-            sprintf(pdf,"%s_%s_smoothed_hist_from_KDE_%s",vstr.c_str(),sig_bkg.c_str(),binname);
-            sprintf(pdf_newname,"%s_%s_%s_LHtool_copy4GeV_%s",Root::TSelectorToolBase::getName(),vstr.c_str(),sig_bkg.c_str(),binname);
+            snprintf(pdf,500,"%s_%s_smoothed_hist_from_KDE_%s",vstr.c_str(),sig_bkg.c_str(),binname);
+            snprintf(pdf_newname,500,"%s_%s_%s_LHtool_copy4GeV_%s",Root::TSelectorToolBase::getName(),vstr.c_str(),sig_bkg.c_str(),binname);
           }
           if (((TDirectory*)m_pdfFile->Get(pdfdir))->GetListOfKeys()->Contains(pdf)) {
             TH1F* hist = (TH1F*)(((TDirectory*)m_pdfFile->Get(pdfdir))->Get(pdf));
@@ -870,8 +870,7 @@ unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtDiscBin(double eT) co
     for(unsigned int eTBin = 0; eTBin < nEtBins; ++eTBin){
       if(eT < eTBins[eTBin])
         return eTBin;
-    }
-    
+    }   
     return nEtBins-1; // Return the last bin if > the last bin.
   }
 }
@@ -883,10 +882,12 @@ unsigned int Root::TElectronLikelihoodTool::getLikelihoodEtDiscBin(double eT) co
 void Root::TElectronLikelihoodTool::getBinName(char* buffer, int etbin,int etabin, int ipbin, std::string iptype) const{
   double eta_bounds[9] = {0.0,0.6,0.8,1.15,1.37,1.52,1.81,2.01,2.37};
   int et_bounds[fnEtBinsHist] = {4,7,10,15,20,30,40,100};
-  if (!iptype.empty())
-    sprintf(buffer, "%s%det%02deta%0.2f", iptype.c_str(), int(fIpBounds[ipbin]), et_bounds[etbin], eta_bounds[etabin]);
-  else 
-    sprintf(buffer, "et%deta%0.2f", et_bounds[etbin], eta_bounds[etabin]);
+  if (!iptype.empty()){
+    snprintf(buffer, 200,"%s%det%02deta%0.2f", iptype.c_str(), int(fIpBounds[ipbin]), et_bounds[etbin], eta_bounds[etabin]);
+  }
+  else{ 
+    snprintf(buffer, 200,"et%deta%0.2f", et_bounds[etbin], eta_bounds[etabin]);
+  }
   return;
 }
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMLooseSelectorCutDefs.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMLooseSelectorCutDefs.py
index 6034f705ab8827d4c32e7c062848923d4c267587..57a0a5fc2baec35f0963c9bd8905d62aa7dba297 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMLooseSelectorCutDefs.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMLooseSelectorCutDefs.py
@@ -24,5 +24,5 @@ def ForwardElectronIsEMLooseSelectorConfigMC15(theTool) :
     
     theTool = GetTool(theTool)
 
-    theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20150812/ForwardElectronIsEMLooseSelectorCutDefs.conf"
+    theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20170711/ForwardElectronIsEMLooseSelectorCutDefs.conf"
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMMediumSelectorCutDefs.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMMediumSelectorCutDefs.py
index bb2909aaa5ed23cec91ec636d22c92680e86779a..bd3b8a0b6cf2e01a04ad5f3ce26f16776ae4e35a 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMMediumSelectorCutDefs.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMMediumSelectorCutDefs.py
@@ -24,7 +24,7 @@ def ForwardElectronIsEMMediumSelectorConfigMC15(theTool) :
     
     theTool = GetTool(theTool)
 
-    theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20150812/ForwardElectronIsEMMediumSelectorCutDefs.conf"
+    theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20170711/ForwardElectronIsEMMediumSelectorCutDefs.conf"
 
 
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMTightSelectorCutDefs.py b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMTightSelectorCutDefs.py
index 00b7b4ac153a8ded48a0796bb1716b7f0c606d67..5f86f408b0b4974131eb2c33157ef4978324ab65 100755
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMTightSelectorCutDefs.py
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools/python/ForwardElectronIsEMTightSelectorCutDefs.py
@@ -27,5 +27,5 @@ def ForwardElectronIsEMTightSelectorConfigMC15(theTool) :
     #
     # PHOTON tight cuts, with updated using *MC15*
     #
-    theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20150812/ForwardElectronIsEMTightSelectorCutDefs.conf"
+    theTool.ConfigFile = "ElectronPhotonSelectorTools/offline/mc15_20170711/ForwardElectronIsEMTightSelectorCutDefs.conf"
 
diff --git a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/doc/packagedoc.h b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/doc/packagedoc.h
index 2b9e2db1a567059ce2815482617a56e50df6ff62..ea05e1ebc8a73e365c889d241ea2e4e5c50ed8b9 100644
--- a/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/ElectronPhotonID/ElectronPhotonTagTools/doc/packagedoc.h
@@ -17,10 +17,6 @@ ElectronPhotonTagTools contains the following tools:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section ElectronPhotonTagTools_used_packagesElectronPhotonTagTools Used packages
 
-@section ElectronPhotonTagTools_requirementsElectronPhotonTagTools Requirements
 
 */
-
-
diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/CMakeLists.txt b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/CMakeLists.txt
index 41df4d852ca399d78e2393441084aaa1c12d7db3..310138bd99ea091f48c75df017440de3899f2bf1 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/CMakeLists.txt
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/CMakeLists.txt
@@ -33,8 +33,8 @@ find_package( ROOT COMPONENTS Core Hist RIO MathCore )
 atlas_add_library( PhotonEfficiencyCorrectionLib
    PhotonEfficiencyCorrection/*.h Root/*.cxx
    PUBLIC_HEADERS PhotonEfficiencyCorrection
-   INCLUDE_DIRS ${BOOST_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${BOOST_LIBRARIES} ${ROOT_LIBRARIES} AsgTools xAODEgamma
+   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
+   LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AsgTools xAODEgamma
    PATCoreLib PATInterfaces ElectronEfficiencyCorrectionLib
    PRIVATE_LINK_LIBRARIES xAODEventInfo PathResolver )
 
@@ -53,8 +53,8 @@ atlas_add_dictionary( PhotonEfficiencyCorrectionDict
 # Executable(s) in the package:
 atlas_add_executable( PrintPhotonSF
    util/PrintPhotonSF.cxx
-   INCLUDE_DIRS ${BOOST_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${BOOST_LIBRARIES} ${ROOT_LIBRARIES}
+   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
+   LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES}
    PhotonEfficiencyCorrectionLib )
 
 if( XAOD_STANDALONE )
diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx
index fbbd9b01f83061dd972516f2e829e090c1363117..458673df5c3fb3fbd96ec69f6022803cb1703d20 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/AsgPhotonEfficiencyCorrectionTool.cxx
@@ -105,21 +105,21 @@ AsgPhotonEfficiencyCorrectionTool::~AsgPhotonEfficiencyCorrectionTool()
 StatusCode AsgPhotonEfficiencyCorrectionTool::initialize()
 {
   // Resolve the paths to the input files
-  std::vector < std::string > m_corrFileNameList;
+  std::vector < std::string > corrFileNameList;
 
   // First check if the tool is initialized using the input files or map
   if(m_mapFile.size()){ // using map file
-     m_corrFileNameList.push_back(getFileName(m_isoWP,true,""));	// converted photons input
-	 m_corrFileNameList.push_back(getFileName(m_isoWP,false,""));  // unconverted photons input
+     corrFileNameList.push_back(getFileName(m_isoWP,true,""));	// converted photons input
+	 corrFileNameList.push_back(getFileName(m_isoWP,false,""));  // unconverted photons input
 	// if isolation SF are initialized, then read RadZ inputs:
 	if(m_isoWP.size()){
-     m_corrFileNameList.push_back(getFileName(m_isoWP,true,"_RadZ"));	// converted photons input
-	 m_corrFileNameList.push_back(getFileName(m_isoWP,false,"_RadZ"));  // unconverted photons input	
+     corrFileNameList.push_back(getFileName(m_isoWP,true,"_RadZ"));	// converted photons input
+	 corrFileNameList.push_back(getFileName(m_isoWP,false,"_RadZ"));  // unconverted photons input	
 	}
   }
   else if(m_corrFileNameConv.size() && m_corrFileNameUnconv.size()){ // initialize the tool using input files (old scheme)
-  	m_corrFileNameList.push_back(m_corrFileNameConv);
-	m_corrFileNameList.push_back(m_corrFileNameUnconv);
+  	corrFileNameList.push_back(m_corrFileNameConv);
+	corrFileNameList.push_back(m_corrFileNameUnconv);
   }
   else{
       ATH_MSG_ERROR ( "Fail to resolve input file name, check if you set MapFilePath or CorrectionFileName properly" );
@@ -127,36 +127,36 @@ StatusCode AsgPhotonEfficiencyCorrectionTool::initialize()
   }
 
   // once the input files are retrieved, update the path using PathResolver or TOOL/data folder
-  for ( unsigned int i=0; i<m_corrFileNameList.size(); ++i ){
+  for ( unsigned int i=0; i<corrFileNameList.size(); ++i ){
 
     //First try the PathResolver
-    std::string filename = PathResolverFindCalibFile( m_corrFileNameList.at(i) );
+    std::string filename = PathResolverFindCalibFile( corrFileNameList.at(i) );
 
     // ROOTCore: Data folder
     char *rootCoreArea = getenv("ROOTCOREBIN");
     if(filename.empty() && rootCoreArea != NULL){
-      filename = std::string(rootCoreArea) + "/data/"+ m_corrFileNameList.at(i);
+      filename = std::string(rootCoreArea) + "/data/"+ corrFileNameList.at(i);
     }  
 
     if (filename.empty()){
-      ATH_MSG_ERROR ( "Could NOT resolve file name " << m_corrFileNameList.at(i) );
+      ATH_MSG_ERROR ( "Could NOT resolve file name " << corrFileNameList.at(i) );
       return StatusCode::FAILURE ;
     } else{
       ATH_MSG_INFO(" Path found = "<<filename);
     }
 
-    m_corrFileNameList.at(i) = filename;
+    corrFileNameList.at(i) = filename;
 
   }
    
   // Set prefix for sustematics if this is ISO or ID SF
-  if( m_corrFileNameList[0].find("offline.Tight") != std::string::npos) m_sysSubstring="ID_";
-  if( m_corrFileNameList[0].find("Isolation.isolFixedCut") != std::string::npos) {m_sysSubstring="TRKISO_"; m_sysSubstringRadZ="LOWPTISO_";}
+  if( corrFileNameList[0].find("offline.Tight") != std::string::npos) m_sysSubstring="ID_";
+  if( corrFileNameList[0].find("Isolation.isolFixedCut") != std::string::npos) {m_sysSubstring="TRKISO_"; m_sysSubstringRadZ="LOWPTISO_";}
   if(m_sysSubstring == "") {ATH_MSG_ERROR ( "Invalid input file" ); return StatusCode::FAILURE;}
 
   // Configure the underlying Root tool
-  m_rootTool_con->addFileName( m_corrFileNameList[0] );
-  m_rootTool_unc->addFileName( m_corrFileNameList[1] );
+  m_rootTool_con->addFileName( corrFileNameList[0] );
+  m_rootTool_unc->addFileName( corrFileNameList[1] );
 
   m_rootTool_con->setResultPrefix( m_resultPrefix );
   m_rootTool_con->setResultName( m_resultName );
@@ -169,12 +169,12 @@ StatusCode AsgPhotonEfficiencyCorrectionTool::initialize()
 
   
   // Check if ForceDataType is set up properly (should be 3 for AtlFast2)
-  if(TString(m_corrFileNameList[0]).Contains("AFII") && m_dataTypeOverwrite!=3)
+  if(TString(corrFileNameList[0]).Contains("AFII") && m_dataTypeOverwrite!=3)
   {
       ATH_MSG_ERROR("Property ForceDataType is set to "<< m_dataTypeOverwrite << ", while it should be 3 for FastSim");
       return StatusCode::FAILURE;
   }
-  if(!TString(m_corrFileNameList[0]).Contains("AFII") && m_dataTypeOverwrite!=1)
+  if(!TString(corrFileNameList[0]).Contains("AFII") && m_dataTypeOverwrite!=1)
   {
       ATH_MSG_ERROR("Property ForceDataType is set to "<< m_dataTypeOverwrite << ", while it should be 1 for FullSim");
       return StatusCode::FAILURE;
@@ -189,8 +189,8 @@ StatusCode AsgPhotonEfficiencyCorrectionTool::initialize()
   
   // For isolation SF initialize additional instances for lowPT photons
   if(m_isoWP.size()){
-    m_rootTool_conRadZ->addFileName( m_corrFileNameList[2] );
-    m_rootTool_uncRadZ->addFileName( m_corrFileNameList[3] ); 
+    m_rootTool_conRadZ->addFileName( corrFileNameList[2] );
+    m_rootTool_uncRadZ->addFileName( corrFileNameList[3] ); 
     m_rootTool_conRadZ->setResultPrefix( m_resultPrefix );
     m_rootTool_conRadZ->setResultName( m_resultName );
     m_rootTool_uncRadZ->setResultPrefix( m_resultPrefix );
@@ -337,13 +337,13 @@ CP::CorrectionCode AsgPhotonEfficiencyCorrectionTool::getEfficiencyScaleFactor(c
   }
   
   //Get the result + the uncertainty
-  float m_sigma(0);
+  float sigma(0);
   // will check if it isolation SF and if it correspong to low or high PT
   if(m_isoWP.size() && (inputObject.pt()<((m_UseRadZ_mediumPT ? m_Threshold_highPT : m_Threshold_lowPT)*1e3)))
-    m_sigma=appliedSystematics().getParameterByBaseName("PH_EFF_"+m_sysSubstringRadZ+"Uncertainty");
+    sigma=appliedSystematics().getParameterByBaseName("PH_EFF_"+m_sysSubstringRadZ+"Uncertainty");
   else
-    m_sigma=appliedSystematics().getParameterByBaseName("PH_EFF_"+m_sysSubstring+"Uncertainty");
-  efficiencyScaleFactor=calculate(&inputObject).getScaleFactor()+m_sigma*calculate(&inputObject).getTotalUncertainty();
+    sigma=appliedSystematics().getParameterByBaseName("PH_EFF_"+m_sysSubstring+"Uncertainty");
+  efficiencyScaleFactor=calculate(&inputObject).getScaleFactor()+sigma*calculate(&inputObject).getTotalUncertainty();
   return  CP::CorrectionCode::Ok;
 }
 
@@ -371,10 +371,10 @@ CP::CorrectionCode AsgPhotonEfficiencyCorrectionTool::applyEfficiencyScaleFactor
   
   float eff;
   if(m_appliedSystematics==nullptr) eff  = calculate(&inputObject).getScaleFactor();
-  else{ // if SF is up or down varies by m_sigma
-    float m_sigma(0);
-	m_sigma=appliedSystematics().getParameterByBaseName("PH_EFF_"+m_sysSubstring+"Uncertainty");
-	eff=calculate(&inputObject).getScaleFactor()+m_sigma*calculate(&inputObject).getTotalUncertainty();
+  else{ // if SF is up or down varies by sigma
+    float sigma(0);
+	sigma=appliedSystematics().getParameterByBaseName("PH_EFF_"+m_sysSubstring+"Uncertainty");
+	eff=calculate(&inputObject).getScaleFactor()+sigma*calculate(&inputObject).getTotalUncertainty();
   }
   // decorate photon
   ATH_MSG_INFO("decorate object");
diff --git a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/TPhotonEfficiencyCorrectionTool.cxx b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/TPhotonEfficiencyCorrectionTool.cxx
index 2a7e04a8a1caa76699c436700b7e5fdd74d39dfe..f46e8f4dbad417b2ab6d4938979623a0afdc638f 100644
--- a/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/TPhotonEfficiencyCorrectionTool.cxx
+++ b/PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection/Root/TPhotonEfficiencyCorrectionTool.cxx
@@ -51,6 +51,7 @@ switch (isolationcut){
 	  else if(fabs(eta)<1.81) return 0.00095;
 	  else if(fabs(eta)<2.37) return 0.0023;
 	}
+        return 0;
   case 4: return 0;	
   case 5:
 	if(isConv){
@@ -67,6 +68,7 @@ switch (isolationcut){
 	  else if(fabs(eta)<1.81) return 0.002;
 	  else if(fabs(eta)<2.37) return 0.0023;
 	}
+        return 0;
   case 6:
 	if(isConv){
 		if(fabs(eta)<0.6) return 0.0045;
@@ -82,7 +84,8 @@ switch (isolationcut){
 	  else if(fabs(eta)<1.81) return 0.0012;
 	  else if(fabs(eta)<2.37) return 0.0048;
 	}
-	case 7:
+        return 0;
+  case 7:
 	if(isConv){
 		if(fabs(eta)<0.6) return 0.011;
 		else if(fabs(eta)<1.37) return 0.0074;
@@ -97,7 +100,8 @@ switch (isolationcut){
 	  else if(fabs(eta)<1.81) return 0.00041;
 	  else if(fabs(eta)<2.37) return 0.0037;
 	}
-	case 8:
+        return 0;
+  case 8:
 	if(isConv){
 		if(fabs(eta)<0.6) return 0.0033;
 		else if(fabs(eta)<1.37) return 0.00051;
@@ -112,6 +116,7 @@ switch (isolationcut){
 	  else if(fabs(eta)<1.81) return 0.0012;
 	  else if(fabs(eta)<2.37) return 0.0032;
 	}
+        return 0;
 	default: std::cout<<"Wrong isolation input!!!!!"<<std::endl; return 0.;
 }	
 return 0.;
diff --git a/PhysicsAnalysis/EventTag/EventSelection/doc/packagedoc.h b/PhysicsAnalysis/EventTag/EventSelection/doc/packagedoc.h
index a0f4641bb885b3b0cd923ecad0fb8f952bf40d6a..836a1a7fca8dca498dfc086ebca49dd837b2191a 100644
--- a/PhysicsAnalysis/EventTag/EventSelection/doc/packagedoc.h
+++ b/PhysicsAnalysis/EventTag/EventSelection/doc/packagedoc.h
@@ -14,9 +14,7 @@ EventSelection contains the following jobOs
 - AODtoTAG_topOptions.py : produce TAG from AOD
 - EventSplitTest_topOptions.py : produce TAG collections together with AOD streams
 
-@section EventSelection_used_packagesEventSelection Used packages
 
-@section EventSelection_requirementsEventSelection Requirements
 
 @section EventSelection_How to use MakeSimpleCollection.py, MakeEventTagCollection.py and EventTagCollectionDeepCopy.py
 
diff --git a/PhysicsAnalysis/EventTag/EventTagAlgs/doc/packagedoc.h b/PhysicsAnalysis/EventTag/EventTagAlgs/doc/packagedoc.h
index a0c3c7c9b786ca8a4ef0abec8a6ef4549f69a108..ecc5c3d507af756681a82619db840b0cc42ea450 100644
--- a/PhysicsAnalysis/EventTag/EventTagAlgs/doc/packagedoc.h
+++ b/PhysicsAnalysis/EventTag/EventTagAlgs/doc/packagedoc.h
@@ -29,8 +29,6 @@ EventTagAlgs contains the following algs/files:
 
 - for questions and comments: ketevi@bnl.gov or tmaeno@bnl.gov
 
-@section EventTagAlgs_used_packagesEventTagAlgs Used packages
 
-@section EventTagAlgs_requirementsEventTagAlgs Requirements
 
 */
diff --git a/PhysicsAnalysis/EventTag/EventTagUtils/doc/packagedoc.h b/PhysicsAnalysis/EventTag/EventTagUtils/doc/packagedoc.h
index 62530af9e6aad00b9d608c7cfb4f4c8278437026..f7f096e719f0620f737e6abe2c49a149e5938dab 100644
--- a/PhysicsAnalysis/EventTag/EventTagUtils/doc/packagedoc.h
+++ b/PhysicsAnalysis/EventTag/EventTagUtils/doc/packagedoc.h
@@ -17,10 +17,6 @@ EventTagUtils contains the following algs/files:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section EventTagUtils_used_packagesEventTagUtils Used packages
 
-@section EventTagUtils_requirementsEventTagUtils Requirements
 
 */
-
-
diff --git a/PhysicsAnalysis/EventTag/TagEvent/doc/packagedoc.h b/PhysicsAnalysis/EventTag/TagEvent/doc/packagedoc.h
index 9da2f716dc8f4d0292393c67c73c59c1421d82ae..660e960dfb58b5b9dd5b69d1b85f14f24efaf177 100644
--- a/PhysicsAnalysis/EventTag/TagEvent/doc/packagedoc.h
+++ b/PhysicsAnalysis/EventTag/TagEvent/doc/packagedoc.h
@@ -34,11 +34,4 @@ b-physics group may encode the results of various hypotheses about exclusive pro
  - For questions or comments: Ketevi A. Assamagan
    ketevi@bnl.gov
 
-@section TagEvent_used_packagesTkPara Used Packages
-
-@section TagEvent_requirements Requirements
-
 */
-
-
-
diff --git a/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/doc/packagedoc.h b/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/doc/packagedoc.h
index 9917c0a8dc30b47db5aa0139b4fb2ff233196648..b2e9914d515f007475d892e0132a10e946eefe81 100644
--- a/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/ExoticPhys/ExoticPhysTagTools/doc/packagedoc.h
@@ -15,10 +15,6 @@ ExoticPhysTagTools contains the following tools:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section ExoticPhysTagTools_used_packagesExoticPhysTagTools Used packages
 
-@section ExoticPhysTagTools_requirementsExoticPhysTagTools Requirements
 
 */
-
-
diff --git a/PhysicsAnalysis/HeavyIonPhys/HIInDetValidation/share/HIInDetValidation_JobOptions.py b/PhysicsAnalysis/HeavyIonPhys/HIInDetValidation/share/HIInDetValidation_JobOptions.py
index b9baf3d73ef96848ba132967ed1e31acb3beeb38..5afeb9abcc74c5f30473cf1eb3fc424b367ab40a 100755
--- a/PhysicsAnalysis/HeavyIonPhys/HIInDetValidation/share/HIInDetValidation_JobOptions.py
+++ b/PhysicsAnalysis/HeavyIonPhys/HIInDetValidation/share/HIInDetValidation_JobOptions.py
@@ -172,9 +172,7 @@ InDetFlags.doPerfMon = True
 #InDetFlags.doPixelTrkNtuple = True
 #InDetFlags.doSctTrkNtuple   = True
 #InDetFlags.doTrtTrkNtuple   = True
-#InDetFlags.doPixelClusterNtuple = True
 #InDetFlags.doSctClusterNtuple   = True
-#InDetFlags.doTrtDriftCircleNtuple = True
 #InDetFlags.doVtxNtuple      = True
 #InDetFlags.doConvVtxNtuple  = True
 #InDetFlags.doV0VtxNtuple    = True
diff --git a/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/doc/packagedoc.h b/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/doc/packagedoc.h
index 4a6d828f8efe4f2a5f2f9e8c25b31ff57189e406..b9310a642b429c9bc434e0b7d15c387b1edbd22b 100644
--- a/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/HiggsPhys/HiggsPhysTagTools/doc/packagedoc.h
@@ -15,10 +15,6 @@ HiggsPhysTagTools contains the following tools:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section HiggsPhysTagTools_used_packagesHiggsPhysTagTools Used packages
 
-@section HiggsPhysTagTools_requirementsHiggsPhysTagTools Requirements
 
 */
-
-
diff --git a/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/doc/packagedoc.h b/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/doc/packagedoc.h
index 1d0fd6033f8725926bf657fcb19d6c5cadea88f4..c4a74831d9959dc729dc4d31560dca990d996033 100644
--- a/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/JetMissingEtID/JetMissingEtTagTools/doc/packagedoc.h
@@ -17,10 +17,6 @@ JetMissingEtTagTools contains the following tools:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section JetMissingEtTagTools_used_packagesJetMissingEtTagTools Used packages
 
-@section JetMissingEtTagTools_requirementsJetMissingEtTagTools Requirements
 
 */
-
-
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/doc/packagedoc.h b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/doc/packagedoc.h
index e8ca72926bfdedaa662d9b34f5d847a78f758e0e..83938d4f1d7d6f4538f53611cb986a08af23853c 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/doc/packagedoc.h
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/doc/packagedoc.h
@@ -113,6 +113,5 @@ reference histograms <i>Bkg_ref.root</i> and <i>Sig_ref.root</i>. The originals
 are located in PhysicsAnalysis/BTagging/BTaggingUtils/share and are copied
 to the release InstallArea on compiling.<br>
 
-@section BTagging_requirementsBTagging Requirements
 
 */
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfig.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfig.py
index 0cf0e7b3384ab8b2fb34c03777f71f5e5155193f..887c03268b7fb528ddc7d999bc73d82f0365b250 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfig.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfig.py
@@ -40,11 +40,6 @@ def getJetBTaggerTool(finder, mainParam, input, **options):
     if ( BTaggingFlags.SoftMu | BTaggingFlags.SoftMuChi2 ):
         btagger.MuonToJetAssociator     = ToolSvc.BTagMuonToJetAssociator
 
-    if BTaggingFlags.SoftEl:
-        btagger.ElectronContainerName   = BTaggingFlags.ElectronCollectionName
-        btagger.PhotonContainerName     = BTaggingFlags.PhotonCollectionName #Yes ! Sometimes Photons are good Electrons
-        btagger.ElectronToJetAssociator = ToolSvc.BTagElectronToJetAssociator
-
     if BTaggingFlags.MultiSV:
         btagger.AdditionalTrackToJetAssocName = [ "TracksBB" ]
         btagger.AdditionalTrackToJetAssociator = [ ToolSvc.BTagTrackToJetAssociatorBB ]
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py
index 2c610fa7de303927b33e62d1b136399fdecafd93..902a88e7b82dd379e33d429c87486dcdf5b67e94 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration.py
@@ -56,7 +56,6 @@ from BTagging.BTaggingConfiguration_NewJetFitterCollection import * #I collected
 from BTagging.BTaggingConfiguration_NewJetFitterIP3DNegCollection import *
 
 # Lepton taggers
-#from BTagging.BTaggingConfiguration_SoftElectronTag import *
 #from BTagging.BTaggingConfiguration_SoftMuonTagChi2 import *
 from BTagging.BTaggingConfiguration_SoftMuonTag import *
 
@@ -1618,10 +1617,6 @@ def taggerIsPossible(tagger):
     if not DetFlags.detdescr.ID_on():
         print '#BTAG# - WARNING - Disabling '+tagger+' tagger because ID detdescr. was not found'
         return False
-    if tagger in ['SoftEl']:
-        if not DetFlags.detdescr.Calo_on():
-            print '#BTAG# - WARNING - Disabling '+tagger+' tagger because calo detdescr. was not found'
-            return False
     if tagger in ['SoftMu',
                   'SoftMuChi2',
                   'SecondSoftMu',
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration_LoadTools.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration_LoadTools.py
index fe3a9a0e8b7d5435e71d037226a13250597b017e..aabe9c5c9c7f5717542e43b4599e48370dba6228 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration_LoadTools.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration_LoadTools.py
@@ -176,11 +176,6 @@ def Initiate(ConfInstance=None):
     if BTaggingFlags.Runmodus == 'reference':
 
       svcMgr.THistSvc.Output += ["RefFile DATAFILE='BTagCalibALL.root' OPT='RECREATE'"]
-      #for key in BTaggingFlags.Jets:
-      #  for tagger in ['JetProb','IP1D','IP2D','IP2DSpc','IP3D','IP3DSpc','SV1','SV2','SoftMu','SoftEl','JetFitterTagNN','JetFitterCOMBNN']:
-      #    if BTaggingFlags.IsEnabled(tagger):
-      #      RefileName = "BTaggingRef"+tagger+key+".root"
-      #      svcMgr.THistSvc.Output += ["RefFile"+tagger+key+" DATAFILE='"+RefileName+"' OPT='RECREATE'"]
 
     ConfInstance._Initialized = True
     return True
@@ -302,12 +297,6 @@ def SetupJetCollectionDefault(JetCollection, TaggerList, ConfInstance = None):
     BTagMuonToJetAssociator = ConfInstance.setupMuonAssociator('Muons', JetCollection, ToolSvc, Verbose = BTaggingFlags.OutputLevel < 3)
   else:
     BTagMuonToJetAssociator = None
-  if 'SoftEl' in TaggerList:
-    BTagElectronToJetAssociator = ConfInstance.setupElectronAssociator('Electrons', JetCollection, ToolSvc,
-                                                                     Verbose = BTaggingFlags.OutputLevel < 3,
-                                                                     PhotonCollectionName = 'Photons')
-  else:
-    BTagElectronToJetAssociator = None
   if 'MultiSVbb1' in TaggerList or 'MultiSVbb2' in TaggerList:
     ConfInstance.setupTrackAssociator('BTagTrackToJetAssociatorBB', JetCollection, ToolSvc,
                                     Verbose = BTaggingFlags.OutputLevel < 3,
@@ -387,8 +376,6 @@ def SetupJetCollectionDefault(JetCollection, TaggerList, ConfInstance = None):
 #            if BTaggingFlags.JetProbFlip:
 #              addTool('JetProbFlipTag', ToolSvc, 'BTagTrackToJetAssociator', JetCollection, Verbose = BTaggingFlags.OutputLevel < 3)
 
-#          if BTaggingFlags.SoftEl:
-#            addTool('SoftElectronTag', ToolSvc, 'BTagTrackToJetAssociator', JetCollection, Verbose = BTaggingFlags.OutputLevel < 3)
   if 'SoftMu' in TaggerList:
     ConfInstance.addTool('SoftMuonTag', ToolSvc, 'BTagTrackToJetAssociator', JetCollection, Verbose = BTaggingFlags.OutputLevel < 3)
 #          if BTaggingFlags.SoftMuChi2:
@@ -771,12 +758,6 @@ def SetupJetCollectionTrig(JetCollection, TaggerList, ConfInstance = None):
     BTagMuonToJetAssociator = ConfInstance.setupMuonAssociator('Muons', JetCollection, ToolSvc, Verbose = BTaggingFlags.OutputLevel < 3)
   else:
     BTagMuonToJetAssociator = None
-  if 'SoftEl' in TaggerList:
-    BTagElectronToJetAssociator = ConfInstance.setupElectronAssociator('Electrons', JetCollection, ToolSvc,
-                                                                     Verbose = BTaggingFlags.OutputLevel < 3,
-                                                                     PhotonCollectionName = 'Photons')
-  else:
-    BTagElectronToJetAssociator = None
   if 'MultiSVbb1' in TaggerList or 'MultiSVbb2' in TaggerList:
     ConfInstance.setupTrackAssociator('BTagTrackToJetAssociatorBB', JetCollection, ToolSvc,
                                     Verbose = BTaggingFlags.OutputLevel < 3,
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration_SoftElectronTag.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration_SoftElectronTag.py
deleted file mode 100644
index ef2a54f06b4ca499fa0cc313abd4dafdb264f225..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingConfiguration_SoftElectronTag.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# Configuration functions for SoftElectronTag
-# Author: Wouter van den Wollenberg (2013-2014)
-from BTagging.BTaggingFlags import BTaggingFlags
-
-metaSoftElectronTag = { 'IsATagger'               : True,
-                        'NeedsElectronAssociator' : True,
-                        'DependsOn'               : ['AtlasExtrapolator',
-                                                     'BTagTrackToVertexTool',
-                                                     'BTagFullLinearizedTrackFactory',
-                                                     'BTagTrackToVertexIPEstimator',
-                                                     'BTagCalibrationBrokerTool',
-                                                     'SoftElectronTagTrackSelector',
-                                                     'SoftElectronTagNewLikelihoodTool'],
-                        'PassByPointer'           : {'trackSelectorTool'        : 'SoftElectronTagTrackSelector',
-                                                     'LikelihoodTool'           : 'SoftElectronTagNewLikelihoodTool',
-                                                     'TrackToVertexIPEstimator' : 'BTagTrackToVertexIPEstimator',
-                                                     'calibrationTool'          : 'BTagCalibrationBrokerTool',
-                                                     'trackToVertexTool'        : 'BTagTrackToVertexTool'},
-                        'CalibrationFolders'      : ['SoftEl',],
-                        'JetCollectionList'       : 'jetCollectionList',
-                        'ToolCollection'          : 'SoftElectronTag' }
-
-def toolSoftElectronTag(name, useBTagFlagsDefaults = True, **options):
-    """Sets up a SoftElectronTag tool and returns it.
-
-    The following options have BTaggingFlags defaults:
-
-    OutputLevel                         default: BTaggingFlags.OutputLevel
-    Runmodus                            default: BTaggingFlags.Runmodus
-    originalElCollectionName            default: "ElectronAODCollection"
-    writeInfoPlus                       default: True
-    jetCollectionList                   default: BTaggingFlags.Jets
-
-    input:             name: The name of the tool (should be unique).
-      useBTagFlagsDefaults : Whether to use BTaggingFlags defaults for options that are not specified.
-                  **options: Python dictionary with options for the tool.
-    output: The actual tool, which can then by added to ToolSvc via ToolSvc += output."""
-    if useBTagFlagsDefaults:
-        defaults = { 'OutputLevel'                      : BTaggingFlags.OutputLevel,
-                     'Runmodus'                         : BTaggingFlags.Runmodus,
-                     'originalElCollectionName'         : 'ElectronAODCollection',
-                     'writeInfoPlus'                    : True,
-                     'jetCollectionList'                : BTaggingFlags.Jets }
-        for option in defaults:
-            options.setdefault(option, defaults[option])
-    options['name'] = name
-    from JetTagTools.JetTagToolsConf import Analysis__SoftElectronTag
-    return Analysis__SoftElectronTag(**options)
-
-#--------------------------------------------------------------------------
-
-metaSoftElectronTagTrackSelector = { 'DependsOn'      : ['BTagTrackToVertexTool',],
-                                     'PassByPointer'  : {'trackToVertexTool' : 'BTagTrackToVertexTool'},
-                                     'ToolCollection' : 'SoftElectronTag' }
-
-def toolSoftElectronTagTrackSelector(name, useBTagFlagsDefaults = True, **options):
-    """Sets up a SoftElectronTagTrackSelector tool and returns it.
-
-    The following options have BTaggingFlags defaults:
-
-    OutputLevel                         default: BTaggingFlags.OutputLevel
-
-    input:             name: The name of the tool (should be unique).
-      useBTagFlagsDefaults : Whether to use BTaggingFlags defaults for options that are not specified.
-                  **options: Python dictionary with options for the tool.
-    output: The actual tool, which can then by added to ToolSvc via ToolSvc += output."""
-    if useBTagFlagsDefaults:
-        defaults = { 'OutputLevel'            : BTaggingFlags.OutputLevel }
-        for option in defaults:
-            options.setdefault(option, defaults[option])
-    options['name'] = name
-    from JetTagTools.JetTagToolsConf import Analysis__TrackSelector
-    return Analysis__TrackSelector(**options)
-
-#--------------------------------------------------------------------------
-
-metaSoftElectronTagNewLikelihoodTool = { 'CalibrationFolders' : ['SoftEl',],
-                                         'DependsOn'          : ['BTagCalibrationBrokerTool',],
-                                         'PassByPointer'      : {'calibrationTool' : 'BTagCalibrationBrokerTool'},
-                                         'ToolCollection'     : 'SoftElectronTag' }
-
-def toolSoftElectronTagNewLikelihoodTool(name, useBTagFlagsDefaults = True, **options):
-    """Sets up a SoftElectronTagNewLikelihoodTool tool and returns it.
-
-    The following options have BTaggingFlags defaults:
-
-    OutputLevel                         default: BTaggingFlags.OutputLevel
-    taggerName                          default: "SoftEl"
-
-    input:             name: The name of the tool (should be unique).
-      useBTagFlagsDefaults : Whether to use BTaggingFlags defaults for options that are not specified.
-                  **options: Python dictionary with options for the tool.
-    output: The actual tool, which can then by added to ToolSvc via ToolSvc += output."""
-    if useBTagFlagsDefaults:
-        defaults = { 'OutputLevel'                         : BTaggingFlags.OutputLevel,
-                     'taggerName'                          : 'SoftEl' }
-        for option in defaults:
-            options.setdefault(option, defaults[option])
-    options['name'] = name
-    from JetTagTools.JetTagToolsConf import Analysis__NewLikelihoodTool
-    return Analysis__NewLikelihoodTool(**options)
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingFlags.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingFlags.py
index 2bd82b32b2ececa9e8730087f0543b4372a74116..ad79d2709794b489bff8575da07e6a36febdf6ca 100755
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingFlags.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/python/BTaggingFlags.py
@@ -22,7 +22,6 @@ class _BTaggingFlags:
               'SV2', 'SV2Flip',
               'JetProb', 'JetProbFlip',
               'IPFordG', 'IPFordGNeg',
-              'SoftEl',
               'SoftMu', 'SoftMuChi2',
               'BasicJetFitter', 'JetFitterTag', 'JetFitterTagFlip','JetFitterNN', 'JetFitterCOMBNN', 'JetFitterNNFlip',
               'TrackCounting', 'TrackCountingFlip',
@@ -238,8 +237,6 @@ class _BTaggingFlags:
           setattr(self, attr, False)
         if attr == 'JetProbFlip':
           setattr(self, attr, False)
-        if attr == 'SoftEl':
-          setattr(self, attr, False)
         if attr == 'SoftMu':
           setattr(self, attr, True)
         if attr == 'SoftMuChi2':
@@ -324,7 +321,7 @@ class _BTaggingFlags:
       for attr in self._HighPriorityTaggers:
         setattr(self, attr, ['IP3D','SV1','BasicJetFitter','JetFitterTag','JetFitterNN','MV2c10','MV2c10mu','MV2c100','MV2c10rnn','MV2cl100', 'IP3DFlip','IP3DPos','IP3DNeg','IP3DSpc','IP3DSpcPos','IP3DSpcNeg','SV1Flip','JetFitterTagFlip','JetFitterNNFlip','MV1Flip','MV1cFlip','MV2c10Flip','MV2c10muFlip','MV2c10rnnFlip','MV2c100Flip','MV2cl100Flip','JetVertexCharge', 'DL1', 'DL1Flip','DL1mu', 'DL1muFlip','DL1rnn', 'DL1rnnFlip', 'SoftMu'])
       for attr in self._MediumPriorityTaggers:
-        setattr(self, attr, ['SV0','IP2D','IP2DFlip','IP2DPos','IP2DNeg','IP2DSpc','IP2DSpcPos','IP2DSpcNeg','SoftEl','SoftMuChi2','MV2','MV2Flip'])
+        setattr(self, attr, ['SV0','IP2D','IP2DFlip','IP2DPos','IP2DNeg','IP2DSpc','IP2DSpcPos','IP2DSpcNeg','SoftMuChi2','MV2','MV2Flip'])
       for attr in self._LowPriorityTaggers:
         setattr(self, attr, ['IP1D','SV2','SV2Flip','TrackCounting','TrackCountingFlip','JetProb','JetProbFlip'])
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/share/BTagging_standAlone.py b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/share/BTagging_standAlone.py
index 017ff608a970e92aa234569598383b518e714f4a..523db76a323431c7197831ffca163ac315d14df9 100755
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/share/BTagging_standAlone.py
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/share/BTagging_standAlone.py
@@ -116,7 +116,6 @@ BTaggingFlags.CalibrationChannelAliases += [ "AntiKt6H1NewTopo->Cone4H1Tower", "
 BTaggingFlags.CalibrationChannelAliases += [ "AntiKtZ4Track->Cone4H1Tower", "AntiKtZ4Track->Cone4H1Tower" ]
 
 if IDSimulationOnly:
-  BTaggingFlags.SoftEl = False
   BTaggingFlags.SoftMu = False
 include( "BTagging/BTagging_LoadTools.py" )
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagEvent/doc/packagedoc.h b/PhysicsAnalysis/JetTagging/JetTagEvent/doc/packagedoc.h
index c50b247ae079e2ede737857627853dd857956847..fb2b8cc955229f2106f47c75d6b6e8945e33e142 100644
--- a/PhysicsAnalysis/JetTagging/JetTagEvent/doc/packagedoc.h
+++ b/PhysicsAnalysis/JetTagging/JetTagEvent/doc/packagedoc.h
@@ -16,8 +16,6 @@ JetTagEvent contains the following files/classes:
 - JetTag ... the basic b jet object.
 - JetTagContainer ... and its container for storegate
 
-@section JetTagEvent_used_packagesJetTagEvent Used packages
 
-@section JetTagEvent_requirementsJetTagEvent Requirements
 
 */
diff --git a/PhysicsAnalysis/JetTagging/JetTagMonitoring/CMakeLists.txt b/PhysicsAnalysis/JetTagging/JetTagMonitoring/CMakeLists.txt
index 01a4062431c221299954a104992861d3103db353..877984dfd108e66802a943c1605775fcef7ac0c3 100644
--- a/PhysicsAnalysis/JetTagging/JetTagMonitoring/CMakeLists.txt
+++ b/PhysicsAnalysis/JetTagging/JetTagMonitoring/CMakeLists.txt
@@ -21,7 +21,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Tools/LWHists
                           Tracking/TrkEvent/TrkParticleBase
                           Tracking/TrkEvent/VxSecVertex
-                          Tracking/TrkVertexFitter/TrkVertexFitterInterfaces )
+                          Tracking/TrkVertexFitter/TrkVertexFitterInterfaces
+                          Trigger/TrigAnalysis/TrigDecisionTool )
 
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -31,7 +32,7 @@ atlas_add_component( JetTagMonitoring
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringLib xAODJet ITrackToVertex xAODBTagging xAODEventInfo xAODTracking GaudiKernel LArRecEvent JetTagToolsLib LWHists TrkParticleBase VxSecVertex TrkVertexFitterInterfaces )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringLib xAODJet ITrackToVertex xAODBTagging xAODEventInfo xAODTracking GaudiKernel LArRecEvent JetTagToolsLib LWHists TrkParticleBase VxSecVertex TrkVertexFitterInterfaces TrigDecisionToolLib )
 
 # Install files from the package:
 atlas_install_headers( JetTagMonitoring )
diff --git a/PhysicsAnalysis/JetTagging/JetTagMonitoring/JetTagMonitoring/JetTagMonitoring.h b/PhysicsAnalysis/JetTagging/JetTagMonitoring/JetTagMonitoring/JetTagMonitoring.h
index 9f7ad76879b97acefe5cf2df5214bfb022d55b7c..94b921f301e59f89a06373b950beb7da4f517c9f 100755
--- a/PhysicsAnalysis/JetTagging/JetTagMonitoring/JetTagMonitoring/JetTagMonitoring.h
+++ b/PhysicsAnalysis/JetTagging/JetTagMonitoring/JetTagMonitoring/JetTagMonitoring.h
@@ -28,6 +28,7 @@
 #include "InDetConditionsSummaryService/IInDetConditionsSvc.h"
 
 #include "xAODJet/Jet.h"
+#include "TrigDecisionTool/TrigDecisionTool.h" // added by SARA
 
 class TH1F_LW;
 class TH2F_LW;
@@ -80,25 +81,27 @@ private:
     virtual StatusCode registerHist (MonGroup& theGroup, TH1* h1);
     virtual StatusCode registerHist (MonGroup& theGroup, LWHist* h1);
 
-    bool applyKinematicCuts(const xAOD::Jet *jet);
-    Jet_t applyQualityCuts(const xAOD::Jet *jet);
-
     void fillJetHistograms();
     void fillGoodJetHistos(const xAOD::Jet *jet);
     void fillSuspectJetHistos(const xAOD::Jet *jet);
     void fillBadJetHistos(const xAOD::Jet *jet);
-    void fillDetailedHistograms(const xAOD::Jet *jet, Jet_t quality);
+    void fillDetailedHistograms(const xAOD::Jet *jet, Jet_t taggabilityLabel);
     void fillTrackInJetHistograms(const xAOD::Jet *jet);
+    void fillBtagHistograms(const xAOD::Jet *jet, bool fill_top_histos); // added by SARA;
     void fillBadTrackBits(const std::bitset<17> failedCuts, double eta, double phi);
     void fillEffHist(TH1 * h_passed, TH1 * h_all, TH1F_LW * effHist);
     //void fillBadZone(int zone, double w);
-    bool isGoodJet(const xAOD::Jet *jet);
+    bool passJetQualityCuts(const xAOD::Jet *jet);
+    bool passKinematicCuts(const xAOD::Jet *jet);
+    Jet_t getTaggabilityLabel(const xAOD::Jet *jet);
+    bool isTopEvent(); // added by SARA
 
     ServiceHandle<StoreGateSvc> m_storeGate;
 
 
     ToolHandle< Analysis::TrackSelector > m_trackSelectorTool;
     ToolHandle<Reco::ITrackToVertex> m_trackToVertexTool;
+    ToolHandle< Trig::TrigDecisionTool > m_trigDecTool; // added by SARA
     /* ToolHandle<InDet::IInDetTestBLayerTool> m_blayerTool; */
     bool m_histogramsCreated;
 
@@ -111,6 +114,10 @@ private:
     std::string m_trackParticleName;
     /** @brief String to retrieve PrimaryVertexContainer from StoreGate. */
     std::string m_primaryVertexName;
+    /** @brief String to retrieve ElectronContainer from StoreGate. */
+    std::string m_electronName; // added by SARA
+    /** @brief String to retrieve MuonContainer from StoreGate. */
+    std::string m_muonName; // added by SARA
     /** @brief DQ cuts switcher. */
     bool m_do_cuts;
     double m_trk_d0_min_cut;
@@ -120,9 +127,27 @@ private:
     double m_jet_eta_cut;
     unsigned int m_trk_n;
     double m_sv1ip3d_weight_cut;
-    double m_mv2c20_50_weight_cut;
-    double m_mv2c20_70_weight_cut;
-    double m_mv2c20_80_weight_cut;    
+    double m_mv_60_weight_cut;
+    double m_mv_70_weight_cut;
+    double m_mv_77_weight_cut;
+    double m_mv_85_weight_cut;
+    std::string m_mv_algorithmName;
+    double m_MuonPtCut; // added by SARA
+    double m_MuonEtaCut; // added by SARA
+    double m_ElectronPtCut; // added by SARA
+    double m_ElectronEtaCut; // added by SARA
+    double m_ElectronEtaCrackLowCut; // added by SARA
+    double m_ElectronEtaCrackHighCut; // added by SARA
+    double m_ElectronTopoEtCone20Cut; // added by SARA
+    double m_ElectronPtVarCone20Cut; // added by SARA
+    double m_MuonTopoEtCone20Cut; // added by SARA
+    double m_MuonPtVarCone20Cut; // added by SARA
+    std::string m_ElectronTrigger_2016; // added by SARA
+    std::string m_MuonTrigger_2016; // added by SARA
+    std::string m_JetTrigger_2016; // added by SARA
+    std::string m_ElectronTrigger_2017; // added by SARA
+    std::string m_MuonTrigger_2017; // added by SARA
+    std::string m_JetTrigger_2017; // added by SARA
 
     /** @brief Master kill if no tools found. */
     bool m_switch_off;
@@ -132,7 +157,7 @@ private:
 
     /** @brief Use Analysis::TrigDecisionTool. */
     bool m_use_trigdectool;
-
+    
     /** @brief To monitor number of tracks used to evaluate IP2D weight. */
     TH1F_LW* m_tag_ip2d_n = nullptr;
     TH1F_LW* m_tag_ip2d_n_sj = nullptr;
@@ -188,82 +213,82 @@ private:
     TH1F_LW* m_tag_sv1ip3d_w = nullptr;
     TH1F_LW* m_tag_sv1ip3d_w_sj = nullptr;
    
-    /** @brief To monitor likelihood weight based on MV2c20 tagger. */
-    TH1F_LW* m_tag_mv2c20_w = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_pT10_20 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_pT20_50 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_pT50_100 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_pT100_200 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_pT200 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_LS = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_pT10_20_LS = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_pT20_50_LS = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_pT50_100_LS = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_pT100_200_LS = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_pT200_LS = nullptr;
-
-    TH1F_LW* m_tag_mv2c20_w_eta0_05 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta05_10 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta10_15 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta15_20 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta20_25 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi0_07 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi07_14 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi14_21 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi21_28 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi28 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi_sum85OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi_sum77OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi_sum70OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi_sum50OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi_sumAll = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi_frac85OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi_frac77OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi_frac70OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_phi_frac50OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_sum85OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_sum77OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_sum70OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_sum50OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_sumAll = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_frac85OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_frac77OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_frac70OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_frac50OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_pT10_20 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_pT20_50 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_pT50_100 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_pT100_200 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_pT200 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta0_05 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta05_10 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta10_15 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta15_20 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta20_25 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi0_07 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi07_14 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi14_21 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi21_28 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi28 = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi_sum85OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi_sum77OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi_sum70OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi_sum50OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi_sumAll = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi_frac85OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi_frac77OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi_frac70OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_phi_frac50OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta_sum85OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta_sum77OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta_sum70OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta_sum50OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta_sumAll = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta_frac85OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta_frac77OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta_frac70OP = nullptr;
-    TH1F_LW* m_tag_mv2c20_w_sj_eta_frac50OP = nullptr;
+    /** @brief To monitor likelihood weight based on Mv tagger. */
+    TH1F_LW* m_tag_mv_w = nullptr;
+    TH1F_LW* m_tag_mv_w_pT10_20 = nullptr;
+    TH1F_LW* m_tag_mv_w_pT20_50 = nullptr;
+    TH1F_LW* m_tag_mv_w_pT50_100 = nullptr;
+    TH1F_LW* m_tag_mv_w_pT100_200 = nullptr;
+    TH1F_LW* m_tag_mv_w_pT200 = nullptr;
+    TH1F_LW* m_tag_mv_w_LS = nullptr;
+    TH1F_LW* m_tag_mv_w_pT10_20_LS = nullptr;
+    TH1F_LW* m_tag_mv_w_pT20_50_LS = nullptr;
+    TH1F_LW* m_tag_mv_w_pT50_100_LS = nullptr;
+    TH1F_LW* m_tag_mv_w_pT100_200_LS = nullptr;
+    TH1F_LW* m_tag_mv_w_pT200_LS = nullptr;
+
+    TH1F_LW* m_tag_mv_w_eta0_05 = nullptr;
+    TH1F_LW* m_tag_mv_w_eta05_10 = nullptr;
+    TH1F_LW* m_tag_mv_w_eta10_15 = nullptr;
+    TH1F_LW* m_tag_mv_w_eta15_20 = nullptr;
+    TH1F_LW* m_tag_mv_w_eta20_25 = nullptr;
+    TH1F_LW* m_tag_mv_w_phi0_07 = nullptr;
+    TH1F_LW* m_tag_mv_w_phi07_14 = nullptr;
+    TH1F_LW* m_tag_mv_w_phi14_21 = nullptr;
+    TH1F_LW* m_tag_mv_w_phi21_28 = nullptr;
+    TH1F_LW* m_tag_mv_w_phi28 = nullptr;
+    TH1F_LW* m_tag_mv_w_phi_sum85OP = nullptr;
+    TH1F_LW* m_tag_mv_w_phi_sum77OP = nullptr;
+    TH1F_LW* m_tag_mv_w_phi_sum70OP = nullptr;
+    TH1F_LW* m_tag_mv_w_phi_sum60OP = nullptr;
+    TH1F_LW* m_tag_mv_w_phi_sumAll = nullptr;
+    TH1F_LW* m_tag_mv_w_phi_frac85OP = nullptr;
+    TH1F_LW* m_tag_mv_w_phi_frac77OP = nullptr;
+    TH1F_LW* m_tag_mv_w_phi_frac70OP = nullptr;
+    TH1F_LW* m_tag_mv_w_phi_frac60OP = nullptr;
+    TH1F_LW* m_tag_mv_w_eta_sum85OP = nullptr;
+    TH1F_LW* m_tag_mv_w_eta_sum77OP = nullptr;
+    TH1F_LW* m_tag_mv_w_eta_sum70OP = nullptr;
+    TH1F_LW* m_tag_mv_w_eta_sum60OP = nullptr;
+    TH1F_LW* m_tag_mv_w_eta_sumAll = nullptr;
+    TH1F_LW* m_tag_mv_w_eta_frac85OP = nullptr;
+    TH1F_LW* m_tag_mv_w_eta_frac77OP = nullptr;
+    TH1F_LW* m_tag_mv_w_eta_frac70OP = nullptr;
+    TH1F_LW* m_tag_mv_w_eta_frac60OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_pT10_20 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_pT20_50 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_pT50_100 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_pT100_200 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_pT200 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta0_05 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta05_10 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta10_15 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta15_20 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta20_25 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi0_07 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi07_14 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi14_21 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi21_28 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi28 = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi_sum85OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi_sum77OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi_sum70OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi_sum60OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi_sumAll = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi_frac85OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi_frac77OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi_frac70OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_phi_frac60OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta_sum85OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta_sum77OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta_sum70OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta_sum60OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta_sumAll = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta_frac85OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta_frac77OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta_frac70OP = nullptr;
+    TH1F_LW* m_tag_mv_w_sj_eta_frac60OP = nullptr;
     /** @brief To monitor number of Jets. */
     TH1F_LW* m_jet_n = nullptr;
     /** @brief To monitor number of TrackParticles. */
@@ -278,8 +303,8 @@ private:
     /** @brief To monitor z of primary vertex. */
     TH1F_LW* m_global_zPrimVtx = nullptr;
 
-    /** @brief To monitor number of b layer hits in TrackParticle. */
-    TH1F_LW* m_global_BLayerHits = nullptr;
+      /** @brief To monitor number of b layer hits in TrackParticle. */
+    TH1F_LW* m_global_BLayerHits = nullptr; // IBL hits in Run 2, old B-layer in Run-1
     /** @brief To monitor number of pixel hits in TrackParticle. */
     TH1F_LW* m_global_PixelHits = nullptr;
     /** @brief To monitor number of SCT hits in TrackParticle. */
@@ -311,7 +336,7 @@ private:
     TH1F_LW* m_jet_tracks_z0 = nullptr;
     TH1F_LW* m_jet_tracks_z0_LS = nullptr;
    /** @brief To monitor number of b layer hits in a jet. */
-    TH1F_LW* m_jet_tracks_BLayerHits = nullptr;
+    TH1F_LW* m_jet_tracks_BLayerHits = nullptr; // IBL hits in Run-2, old b-layer in Run-1
     /** @brief To monitor number of pixel hits in a jet. */
     TH1F_LW* m_jet_tracks_PixelHits = nullptr;
     /** @brief To monitor number of SCT hits in a jet. */
@@ -327,6 +352,9 @@ private:
     /** @brief To monitor Pt of electrons in a jet. */
     TH1F_LW* m_jet_electrons_pt = nullptr;
 
+    TH1F_LW* m_n_iso_el = nullptr; // added by SARA
+    TH1F_LW* m_n_iso_mu = nullptr; // added by SARA
+
     TH1F_LW* m_trigPassed = nullptr;
     TH1F_LW* m_cutflow = nullptr;
 
@@ -341,6 +369,17 @@ private:
     TH2F_LW* m_track_selector_all = nullptr;
     TH2F_LW* m_track_selector_all_LS = nullptr;
 
+    /** top histograms */
+    TH1F_LW* m_jet_top = nullptr; // added by SARA
+    TH1F_LW* m_jet_pt_top = nullptr; // added by SARA
+    TH1F_LW* m_jet_mv_w_top = nullptr; // added by SARA
+    
+    TH1F_LW* m_jet_top_tagged = nullptr; // added by SARA
+    TH1F_LW* m_jet_pt_top_tagged = nullptr; // added by SARA
+    
+    TH1F_LW* m_jet_top_eff = nullptr; // added by SARA
+    TH1F_LW* m_jet_pt_top_eff = nullptr; // added by SARA
+    
     /** @brief 2D map of jets at various cuts. */
     TH2F_LW* m_jet_2D_all = nullptr;
     TH2F_LW* m_jet_2D_good = nullptr;
@@ -354,16 +393,16 @@ private:
     TH2F_LW* m_sv1ip3d_tag_pos_rate_2D = nullptr;
     TH2F_LW* m_sv1ip3d_tag_neg_rate_2D = nullptr;
 
-    TH2F_LW* m_mv2c20_tag_50_2D = nullptr;
-    TH2F_LW* m_mv2c20_tag_70_2D = nullptr;
-    TH2F_LW* m_mv2c20_tag_80_2D = nullptr;   
-    TH2F_LW* m_mv2c20_tag_80_2D_LS = nullptr;    
+    TH2F_LW* m_mv_tag_60_2D = nullptr;
+    TH2F_LW* m_mv_tag_70_2D = nullptr;
+    TH2F_LW* m_mv_tag_77_2D = nullptr;   
+    TH2F_LW* m_mv_tag_77_2D_LS = nullptr;    
 
-    TH1F_LW* m_tag_mv2c20_w_eta_sum85OP_LS =nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_sum77OP_LS =nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_sum70OP_LS =nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_sum50OP_LS =nullptr;
-    TH1F_LW* m_tag_mv2c20_w_eta_sumAll_LS =nullptr;
+    TH1F_LW* m_tag_mv_w_eta_sum85OP_LS =nullptr;
+    TH1F_LW* m_tag_mv_w_eta_sum77OP_LS =nullptr;
+    TH1F_LW* m_tag_mv_w_eta_sum70OP_LS =nullptr;
+    TH1F_LW* m_tag_mv_w_eta_sum60OP_LS =nullptr;
+    TH1F_LW* m_tag_mv_w_eta_sumAll_LS =nullptr;
 
     enum Cuts_t { pTMin, d0Max, z0Max, sigd0Max, sigz0Max, etaMax,
                   nHitBLayer, deadBLayer, nHitPix, nHitSct, nHitSi, nHitTrt, nHitTrtHighE,
diff --git a/PhysicsAnalysis/JetTagging/JetTagMonitoring/share/JetTagMonitoring_jobOptions.py b/PhysicsAnalysis/JetTagging/JetTagMonitoring/share/JetTagMonitoring_jobOptions.py
index 2765fb35a2063bc6662a6bb0bf48b46fdcffb51b..d48827ad4c22094c7c06ede020b0ecde347d82e7 100644
--- a/PhysicsAnalysis/JetTagging/JetTagMonitoring/share/JetTagMonitoring_jobOptions.py
+++ b/PhysicsAnalysis/JetTagging/JetTagMonitoring/share/JetTagMonitoring_jobOptions.py
@@ -32,35 +32,52 @@ jetTagMonTool.FilterTools += [ monbadlb ]
 
 jetTagMonTool.OutputLevel = INFO
 jetTagMonTool.JetContainer = "AntiKt4EMTopoJets"
+jetTagMonTool.TrackParticleContainer = "InDetTrackParticles"
+jetTagMonTool.PrimaryVertexContainer = "PrimaryVertices"
+jetTagMonTool.ElectronContainer = "Electrons"
+jetTagMonTool.MuonContainer = "Muons"
+
 jetTagMonTool.DQcuts = True
 jetTagMonTool.PriVtxTrkMinCut = 4
 jetTagMonTool.D0_min_cuts = 0
 jetTagMonTool.D0_max_cuts = 1
-jetTagMonTool.JetPt_cuts = 15000
+jetTagMonTool.JetPt_cuts = 15
 jetTagMonTool.JetEta_cuts = 2.5
 jetTagMonTool.nTrk_cuts = 1
 
-##### REL20 recommendations
-##### Email Tim Scanlon  23.04.2015
+jetTagMonTool.MV_algorithmName = "MV2c10"
 
-jetTagMonTool.SV1IP3D_weight_cut         = 0.0
-jetTagMonTool.MV2c20_50_cut=0.751629
-jetTagMonTool.MV2c20_70_cut=-0.10694
-jetTagMonTool.MV2c20_80_cut=-0.658252
+# taken from webpage (https://twiki.cern.ch/twiki/bin/view/AtlasProtected/BTaggingBenchmarksRelease20) 14 june 2017
+jetTagMonTool.SV1IP3D_weight_cut = 0.0
+jetTagMonTool.MV_60_cut = 0.934906
+jetTagMonTool.MV_70_cut = 0.8244273
+jetTagMonTool.MV_77_cut = 0.645925
+jetTagMonTool.MV_85_cut = 0.1758475
 
 if not rec.doInDet:
     jetTagMonTool.UseTrackSelector = False
 else:
     jetTagMonTool.UseTrackSelector = True
 
-# Disable trigger for now since it produces an error in q-test q221
-#if DQMonFlags.useTrigger() and hasattr(ToolSvc, DQMonFlags.nameTrigDecTool()):
-#    print "jetTagMonTool will use TrigDecisionTool instance: %s" % DQMonFlags.nameTrigDecTool()
+# Setting up the trigger decision tool
+# for trigger-aware monitoring
+
+jetTagMonTool.UseTrigDecisionTool = True # added by SARA
+if DQMonFlags.useTrigger() and hasattr(ToolSvc, DQMonFlags.nameTrigDecTool()):
+    print "jetTagMonTool will use TrigDecisionTool instance: %s" % DQMonFlags.nameTrigDecTool()
 #    jetTagMonTool.TrigDecisionTool = getattr(ToolSvc, DQMonFlags.nameTrigDecTool())
-#    jetTagMonTool.TriggerChain = "L1_J.*, L1_[3-5]J.* ,EF_e24vh_medium1, EF_mu18_IDTrkNoCut_tight, L1_RD0_FILLED"   #"L1_J10"   even older #"EF_mu4_L1J10_matched"
-#    jetTagMonTool.UseTrigDecisionTool = True
-#else:
-#    print "WARNING!!! jetTagMonTool will NOT use TrigDecisionTool."
-#    jetTagMonTool.UseTrigDecisionTool = False
-jetTagMonTool.UseTrigDecisionTool = False
+    jetTagMonTool.UseTrigDecisionTool = True
+else:
+    print "WARNING!!! jetTagMonTool will NOT use TrigDecisionTool."
+    jetTagMonTool.UseTrigDecisionTool = False
+
+if (rec.triggerStream()=='express'): # added by SARA # don't require trigger if running on express stream
+    jetTagMonTool.UseTrigDecisionTool = False # added by SARA
+
+jetTagMonTool.ElectronTrigger_2016 = "HLT_e26_lhtight_nod0_ivarloose"; # added by SARA
+jetTagMonTool.MuonTrigger_2016 = "HLT_mu26_ivarmedium"; # added by SARA
+jetTagMonTool.JetTrigger_2016 = "HLT_j15"; # added by SARA
+jetTagMonTool.ElectronTrigger_2017 = "HLT_e28_lhtight_nod0_ivarloose"; # added by SARA
+jetTagMonTool.MuonTrigger_2017 = "HLT_mu26_ivarmedium"; # added by SARA
+jetTagMonTool.JetTrigger_2017 = "HLT_j15"; # added by SARA
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx b/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx
index c50f1785921fe0cea88540481c7f70dbadc413e1..14709492d072bbb575f4b88735595a9a7502a16f 100755
--- a/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagMonitoring/src/JetTagMonitoring.cxx
@@ -7,6 +7,8 @@
 #include "xAODJet/JetAttributes.h"
 #include "xAODBTagging/BTagging.h"
 #include "xAODEventInfo/EventInfo.h"
+#include "xAODEgamma/ElectronContainer.h"
+#include "xAODMuon/MuonContainer.h"
 
 #include "JetTagMonitoring/JetTagMonitoring.h"
 #include "JetTagTools/TrackSelector.h"
@@ -16,8 +18,7 @@
 #include "xAODTracking/Vertex.h"
 #include "xAODTracking/VertexContainer.h"
 
-// Disable trigger for now since it produces an error in q-test q221
-//#include "TrigDecisionTool/TrigDecisionTool.h"
+#include "TrigDecisionTool/TrigDecisionTool.h" // added by SARA
 #include "TrkParticleBase/LinkToTrackParticleBase.h"
 #include "TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h"
 #include "VxSecVertex/VxSecVKalVertexInfo.h"
@@ -44,17 +45,17 @@
 
 namespace {
 
-template< class T >
-bool retrieveCollection(const ServiceHandle<StoreGateSvc>& sg, const DataHandle<T>& coll, std::string key ) {
+  template< class T >
+  bool retrieveCollection(const ServiceHandle<StoreGateSvc>& sg, const DataHandle<T>& coll, std::string key ) {
 
     StatusCode sc;
     sc = sg->retrieve( coll, key );
 
     if (!sc.isSuccess())
-        return false;
+      return false;
 
     return true;
-}
+  }
 
 } // unnamed namespace
 
@@ -63,37 +64,62 @@ bool retrieveCollection(const ServiceHandle<StoreGateSvc>& sg, const DataHandle<
 
 
 JetTagMonitoring::JetTagMonitoring(const std::string & type, const std::string & name, const IInterface* parent) :
-    ManagedMonitorToolBase(type, name, parent),
-    m_storeGate( "StoreGateSvc", name ),
-    m_trackSelectorTool("Analysis::TrackSelector"),
-    m_trackToVertexTool("Reco::TrackToVertex"),
-    m_histogramsCreated(false),
-    m_switch_off(false),
-    m_pixelCondSummarySvc("PixelConditionsSummarySvc",name)
+  ManagedMonitorToolBase(type, name, parent),
+  m_storeGate( "StoreGateSvc", name ),
+  m_trackSelectorTool("Analysis::TrackSelector"),
+  m_trackToVertexTool("Reco::TrackToVertex"),
+  m_trigDecTool("Trig::TrigDecisionTool/TrigDecisionTool"), // added by SARA
+  m_histogramsCreated(false),
+  m_switch_off(false),
+  m_pixelCondSummarySvc("PixelConditionsSummarySvc",name)
 {
 
-    declareProperty("JetContainer",           m_jetName           = "AntiKt4EMTopoJets");
-    declareProperty("TrackParticleContainer", m_trackParticleName = "InDetTrackParticles");
-    declareProperty("PrimaryVertexContainer", m_primaryVertexName = "PrimaryVertices");
-
-    declareProperty("DQcuts", m_do_cuts = true);
-
-    declareProperty("PriVtxTrkMinCut", m_pri_vtx_trk_min_cut = 4 );
-    declareProperty("D0_min_cuts", m_trk_d0_min_cut = 0);
-    declareProperty("D0_max_cuts", m_trk_d0_max_cut = 1);
-    declareProperty("JetPt_cuts", m_jet_pt_cut = 15e3);
-    declareProperty("JetEta_cuts", m_jet_eta_cut = 2.5);
-    declareProperty("nTrk_cuts", m_trk_n = 1);
-    declareProperty("SV1IP3D_weight_cut", m_sv1ip3d_weight_cut=0.);
-    declareProperty("MV2c20_50_cut", m_mv2c20_50_weight_cut=0.751629);
-    declareProperty("MV2c20_70_cut", m_mv2c20_70_weight_cut=-0.10694);
-    declareProperty("MV2c20_80_cut", m_mv2c20_80_weight_cut=-0.658252);    
-    declareProperty("UseTrackSelector", m_use_trackselector = true);
-    declareProperty("UseTrigDecisionTool", m_use_trigdectool = true);
-    declareProperty("doLumiBlock",     m_doLumiBlock=false);
-    declareProperty("doStatus",        m_doStatus = false);
-
-    m_isNewLumiBlock = false;
+  declareProperty("JetContainer",           m_jetName           = "AntiKt4EMTopoJets");
+  declareProperty("TrackParticleContainer", m_trackParticleName = "InDetTrackParticles");
+  declareProperty("PrimaryVertexContainer", m_primaryVertexName = "PrimaryVertices");
+  declareProperty("ElectronContainer",      m_electronName      = "Electrons"); // added by SARA
+  declareProperty("MuonContainer",          m_muonName          = "Muons" ); // added by SARA
+
+  declareProperty("DQcuts", m_do_cuts = true);
+
+  declareProperty("PriVtxTrkMinCut", m_pri_vtx_trk_min_cut = 4 );
+  declareProperty("D0_min_cuts", m_trk_d0_min_cut = 0);
+  declareProperty("D0_max_cuts", m_trk_d0_max_cut = 1);
+  declareProperty("JetPt_cuts", m_jet_pt_cut = 15.0); // in GeV
+  declareProperty("JetEta_cuts", m_jet_eta_cut = 2.5);
+  declareProperty("nTrk_cuts", m_trk_n = 1);
+  declareProperty("SV1IP3D_weight_cut", m_sv1ip3d_weight_cut=0.);
+  declareProperty("MV_60_cut", m_mv_60_weight_cut=0.934906);
+  declareProperty("MV_70_cut", m_mv_70_weight_cut=0.8244273);
+  declareProperty("MV_77_cut", m_mv_77_weight_cut=0.645925);
+  declareProperty("MV_85_cut", m_mv_85_weight_cut=0.1758475);
+  declareProperty("MV_algorithmName", m_mv_algorithmName="MV2c10"); // added by SARA
+
+  declareProperty("UseTrackSelector", m_use_trackselector = true);
+  declareProperty("UseTrigDecisionTool", m_use_trigdectool = true);
+  declareProperty("doLumiBlock",     m_doLumiBlock=false);
+  declareProperty("doStatus",        m_doStatus = false);
+
+  declareProperty( "ElectronPtCut", m_ElectronPtCut = 25.0 ); // added by SARA - in GeV
+  declareProperty( "MuonPtCut", m_MuonPtCut = 25.0 ); // added by SARA - in GeV
+  declareProperty( "ElectronEtaCut", m_ElectronEtaCut = 2.47 ); // added by SARA
+  declareProperty( "MuonEtaCut", m_MuonEtaCut = 2.4 ); // added by SARA
+  declareProperty( "ElectronEtaCrackLowCut", m_ElectronEtaCrackLowCut = 1.37 ); // added by SARA
+  declareProperty( "ElectronEtaCrackHighCut", m_ElectronEtaCrackHighCut = 1.52 ); // added by SARA
+
+  declareProperty( "ElectronTopoEtCone20Cut", m_ElectronTopoEtCone20Cut = 0.06 ); // added by SARA -0.06 corresponds to the FixedTightCut working point
+  declareProperty( "MuonTopoEtCone20Cut", m_MuonTopoEtCone20Cut = 0.06 ); // added by SARA -0.06 corresponds to the FixedTightCut working point
+  declareProperty( "ElectronPtVarCone20Cut", m_ElectronPtVarCone20Cut = 0.06 ); // added by SARA -0.06 corresponds to the FixedTightCut working point
+  declareProperty( "MuonPtVarCone20Cut", m_MuonPtVarCone20Cut = 0.06 ); // added by SARA -0.06 corresponds to the FixedTightCut working point
+  
+  declareProperty( "ElectronTrigger_2016", m_ElectronTrigger_2016 = "HLT_e26_lhtight_nod0_ivarloose" ); // added by SARA
+  declareProperty( "MuonTrigger_2016", m_MuonTrigger_2016 = "HLT_mu26_ivarmedium" ); // added by SARA
+  declareProperty( "JetTrigger_2016", m_JetTrigger_2016 = "HLT_j15" ); // added by SARA
+  declareProperty( "ElectronTrigger_2017", m_ElectronTrigger_2017 = "HLT_e28_lhtight_nod0_ivarloose" ); // added by SARA
+  declareProperty( "MuonTrigger_2017", m_MuonTrigger_2017 = "HLT_mu26_ivarmedium" ); // added by SARA
+  declareProperty( "JetTrigger_2017", m_JetTrigger_2017 = "HLT_j15" ); // added by SARA
+
+  m_isNewLumiBlock = false;
 }
 
 //** --------------------------------------------------------------------------------------------------------------- **//
@@ -107,14 +133,14 @@ JetTagMonitoring::~JetTagMonitoring() {}
 
 StatusCode JetTagMonitoring::registerHist(MonGroup& theGroup, TH1* h1) {
 
-    // msg(MSG::VERBOSE) << "in JetTagMonitoring::registerHist " << h1->GetName() << endmsg;
-    ATH_MSG_VERBOSE("in JetTagMonitoring::registerHist " << h1->GetName());
+  // msg(MSG::VERBOSE) << "in JetTagMonitoring::registerHist " << h1->GetName() << endmsg;
+  ATH_MSG_VERBOSE("in JetTagMonitoring::registerHist " << h1->GetName());
 
-    StatusCode sc = theGroup.regHist(h1);
-    if (! sc.isSuccess())
-      ATH_MSG_WARNING("Could not register histogram ");
+  StatusCode sc = theGroup.regHist(h1);
+  if (! sc.isSuccess())
+    ATH_MSG_WARNING("Could not register histogram ");
 
-    return sc;
+  return sc;
 }
 
 //** --------------------------------------------------------------------------------------------------------------- **//
@@ -122,13 +148,13 @@ StatusCode JetTagMonitoring::registerHist(MonGroup& theGroup, TH1* h1) {
 
 StatusCode JetTagMonitoring::registerHist(MonGroup& theGroup, LWHist* h1) {
 
-    ATH_MSG_VERBOSE("in JetTagMonitoring::registerHist " << h1->GetName());
+  ATH_MSG_VERBOSE("in JetTagMonitoring::registerHist " << h1->GetName());
 
-    StatusCode sc = theGroup.regHist(h1);
-    if (!sc.isSuccess())
-      ATH_MSG_WARNING("Could not register histogram ");
+  StatusCode sc = theGroup.regHist(h1);
+  if (!sc.isSuccess())
+    ATH_MSG_WARNING("Could not register histogram ");
 
-    return sc;
+  return sc;
 }
 
 
@@ -145,35 +171,35 @@ StatusCode JetTagMonitoring::registerHist(MonGroup& theGroup, LWHist* h1) {
 
 StatusCode JetTagMonitoring::initialize() {
 
-    ATH_MSG_INFO("in JetTagMonitoring::initialize");
+  ATH_MSG_INFO("in JetTagMonitoring::initialize");
 
-    StatusCode sc = ManagedMonitorToolBase::initialize();
-    if (! sc.isSuccess()) {
-      ATH_MSG_WARNING("Unable to initialize ManagedMonitorToolBase");
-      return sc;
-    }
+  StatusCode sc = ManagedMonitorToolBase::initialize();
+  if (! sc.isSuccess()) {
+    ATH_MSG_WARNING("Unable to initialize ManagedMonitorToolBase");
+    return sc;
+  }
 
-    sc = m_storeGate.retrieve();
-    if (!sc.isSuccess()) {
-      ATH_MSG_WARNING("Unable to retrieve StoreGateSvc handle");
-      m_switch_off = true;
-    }
+  sc = m_storeGate.retrieve();
+  if (!sc.isSuccess()) {
+    ATH_MSG_WARNING("Unable to retrieve StoreGateSvc handle");
+    m_switch_off = true;
+  }
 
-    if ( m_use_trackselector ) {
-        if ( m_trackSelectorTool.retrieve().isFailure() ) {
-	  ATH_MSG_WARNING("Failed to retrieve tool " << m_trackSelectorTool);
-	  m_switch_off = true;
-        }
-    } else {
-        ATH_MSG_INFO("Analysis::TrackSelector not used");
+  if ( m_use_trackselector ) {
+    if ( m_trackSelectorTool.retrieve().isFailure() ) {
+      ATH_MSG_WARNING("Failed to retrieve tool " << m_trackSelectorTool);
+      m_switch_off = true;
     }
+  } else {
+    ATH_MSG_INFO("Analysis::TrackSelector not used");
+  }
 
-    if ( m_switch_off )
-      ATH_MSG_WARNING("Switching off JetTagMonitoring::fillHistograms()");
+  if ( m_switch_off )
+    ATH_MSG_WARNING("Switching off JetTagMonitoring::fillHistograms()");
 
-    m_lumiBlockNum = 0;
+  m_lumiBlockNum = 0;
 
-    return StatusCode::SUCCESS;
+  return StatusCode::SUCCESS;
 }
 
 
@@ -182,325 +208,359 @@ StatusCode JetTagMonitoring::initialize() {
 
 StatusCode JetTagMonitoring::bookHistograms() {
 
-    ATH_MSG_DEBUG("bookHistograms()");
+  ATH_MSG_DEBUG("bookHistograms()");
 
-    m_isNewLumiBlock = newLumiBlockFlag();
-    if ( !newRunFlag() ) {
-        // Only book run-length histogram
-        return StatusCode::SUCCESS;
-    }
+  m_isNewLumiBlock = newLumiBlockFlag();
+  if ( !newRunFlag() ) {
+    // Only book run-length histogram
+    return StatusCode::SUCCESS;
+  }
 
 
-    if ( (m_environment != AthenaMonManager::tier0) &&
-            (m_environment != AthenaMonManager::tier0ESD) &&
-            (m_environment != AthenaMonManager::online) ) {
-        // Only produce histograms from ESD, or from RAW if ESD-only monitoring is not enabled
-        ATH_MSG_INFO("Monitoring environment is \'" << m_environment << "\', not booking histograms");
-	//   return StatusCode::SUCCESS;
-    }
+  if ( (m_environment != AthenaMonManager::tier0) &&
+       (m_environment != AthenaMonManager::tier0ESD) &&
+       (m_environment != AthenaMonManager::online) ) {
+    // Only produce histograms from ESD, or from RAW if ESD-only monitoring is not enabled
+    ATH_MSG_INFO("Monitoring environment is \'" << m_environment << "\', not booking histograms");
+    //   return StatusCode::SUCCESS;
+  }
 
-    if ( m_dataType == AthenaMonManager::cosmics ) {
-        ATH_MSG_INFO("Cosmic-ray data, not booking histograms");
-        return StatusCode::SUCCESS;
-    }
+  if ( m_dataType == AthenaMonManager::cosmics ) {
+    ATH_MSG_INFO("Cosmic-ray data, not booking histograms");
+    return StatusCode::SUCCESS;
+  }
+
+  ATH_MSG_INFO("Monitoring environment is \'" << m_environment << "\', data type is \'" << m_dataType << "\', booking histograms now.");
+
+
+  m_monGr_shift = new MonGroup( this, "JetTagging", run );
+  m_monGr_LowStat = new MonGroup( this, "JetTagging", lowStat );
+
+  ////////////////////////
+  // General histograms //
+  ////////////////////////
+
+  registerHist(*m_monGr_shift, m_jet_n = TH1F_LW::create("jet_n","Number of Jets; Number of jets",20,0.,20.));
+  registerHist(*m_monGr_shift, m_jet_et  = TH1F_LW::create("jet_et","Jet pT; pT [GeV]",100,0.,500.)); // this is actually filled with pT although called et...
+  registerHist(*m_monGr_shift, m_jet_eta = TH1F_LW::create("jet_eta","Jet #eta; #eta",100,-5.,5.));
+  registerHist(*m_monGr_shift, m_jet_phi = TH1F_LW::create("jet_phi","Jet #phi; #phi",100,-3.15,3.15));
+
+  registerHist(*m_monGr_shift, m_global_nPrimVtx = TH1F_LW::create("global_nPrimVtx","Number of Primary Vertices; Number of PVs",30,0.,30.));
+  registerHist(*m_monGr_shift, m_global_xPrimVtx = TH1F_LW::create("global_xPrimVtx","Primary Vertex x Position; PV x [mm]",100,-5.0,5.0));
+  registerHist(*m_monGr_shift, m_global_yPrimVtx = TH1F_LW::create("global_yPrimVtx","Primary Vertex y Position; PV y [mm]",100,-5.0,5.0));
+  registerHist(*m_monGr_shift, m_global_zPrimVtx = TH1F_LW::create("global_zPrimVtx","Primary Vetex z Position; PV z [mm]",100,-250.,250.));
+  registerHist(*m_monGr_shift, m_priVtx_trks = TH1F_LW::create("priVtx_trks","Number of Tracks in PV; Number of tracks",100,-0.5,99.5));
+  //m_priVtx_trks->GetXaxis()->SetTitle("Primary Vertex #trks"); // removed by SARA (put correct title above instead)
+
+  registerHist(*m_monGr_shift, m_trackParticle_n = TH1F_LW::create("NTrackParticle","Number of TrackParticles; Number of tracks",100,0.,1000.));
+  registerHist(*m_monGr_shift, m_global_BLayerHits = TH1F_LW::create("global_BLayerHits","Number of IBL Hits on TrackParticle; Number of IBL hits",5,0.,5.)); // updated by SARA // IBL hits in Run-2, old b-layer in Run-1
+  registerHist(*m_monGr_shift, m_global_PixelHits = TH1F_LW::create("global_PixelHits","Number of PIX Hits on TrackParticle; Number of PIX hits",10,0.,10.));
+  registerHist(*m_monGr_shift, m_global_SCTHits = TH1F_LW::create("global_SCTHits","Number of SCT Hits on TrackParticle; Number of SCT hits",15,0.,15.));
+  registerHist(*m_monGr_shift, m_global_SiHits = TH1F_LW::create("global_SiHits","Number of PIX+SCT Hits on TrackParticle; Number of PIX+SCT hits",25,0.,25.));
+  registerHist(*m_monGr_shift, m_global_TRTHits = TH1F_LW::create("global_TRTHits","Number of TRT Hits on TrackParticle; Number of TRT hits",100,0.,100.));
+
+  registerHist(*m_monGr_shift, m_jet_tracks_n = TH1F_LW::create("jet_tracks_n","Number of Tracks per Jet; Number of tracks",50,0.,50.));
+  registerHist(*m_monGr_shift, m_jet_tracks_pt = TH1F_LW::create("jet_tracks_pt","pT of Tracks in Jets; pT [GeV]",100,0.,100.));
+  registerHist(*m_monGr_shift, m_jet_tracks_eta = TH1F_LW::create("jet_tracks_eta","#eta of Tracks in Jets; #eta",100,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_jet_tracks_phi = TH1F_LW::create("jet_tracks_phi","#phi of Tracks in Jets; #phi",100,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_jet_tracks_d0 = TH1F_LW::create("jet_tracks_d0","d0 of Tracks in Jets; d0 [mm]",100,-5.,5.));
+  registerHist(*m_monGr_shift, m_jet_tracks_z0 = TH1F_LW::create("jet_tracks_z0","z0 of Tracks in Jets; z0 [mm]",100,-300.,300.));
+  registerHist(*m_monGr_shift, m_jet_tracks_BLayerHits = TH1F_LW::create("jet_tracks_hits_BLayer","Number of IBL Hits on Tracks in Jets; Number of IBL hits",5,0.,5.)); // updatedby SARA // IBL hits in Run-2, old b-layer in Run-1
+  registerHist(*m_monGr_shift, m_jet_tracks_PixelHits = TH1F_LW::create("jet_tracks_hits_Pixel","Number of PIX Hits on Tracks in Jets; Number of PIX hits",10,0.,10.));
+  registerHist(*m_monGr_shift, m_jet_tracks_SCTHits = TH1F_LW::create("jet_tracks_hits_SCT","Number of SCT Hits on Tracks in Jets; Number of SCT hits",15,0.,15.));
+
+  ////////////////////////
+  // Trigger histograms //
+  ////////////////////////
+
+  //registerHist(*m_monGr_shift, m_trigPassed = TH1F_LW::create("trigPassed","Number of events passed trigger chains",40,-0.5,39.5));
+  registerHist(*m_monGr_shift, m_trigPassed = TH1F_LW::create("trigPassed","Number of events passed trigger chains",10,-0.5,9.5));
+  
+  m_trigPassed->GetXaxis()->SetBinLabel(1,"All") ;
+
+  // 2016 menu
+  m_trigPassed->GetXaxis()->SetBinLabel(2,m_ElectronTrigger_2016.c_str());
+  m_trigPassed->GetXaxis()->SetBinLabel(3,m_MuonTrigger_2016.c_str());
+  m_trigPassed->GetXaxis()->SetBinLabel(4,(m_ElectronTrigger_2016+"_OR_"+m_MuonTrigger_2016).c_str());
+  m_trigPassed->GetXaxis()->SetBinLabel(5,m_JetTrigger_2016.c_str());
+  
+  // 2017 menu
+  m_trigPassed->GetXaxis()->SetBinLabel(6,m_ElectronTrigger_2017.c_str());
+  m_trigPassed->GetXaxis()->SetBinLabel(7,m_MuonTrigger_2017.c_str());
+  m_trigPassed->GetXaxis()->SetBinLabel(8,(m_ElectronTrigger_2017+"_OR_"+m_MuonTrigger_2017).c_str());
+  m_trigPassed->GetXaxis()->SetBinLabel(9,m_JetTrigger_2017.c_str());
+
+  ///////////////////////
+  // Cutflow hitograms //
+  ///////////////////////
+
+  registerHist(*m_monGr_shift, m_cutflow = TH1F_LW::create("DQ_Cutflow","Number of events passing cuts",10,-0.5,9.5));
+
+  m_cutflow->GetXaxis()->SetBinLabel(1,"All");
+  m_cutflow->GetXaxis()->SetBinLabel(2,"Good LAr");
+  m_cutflow->GetXaxis()->SetBinLabel(3,"PV Present");
+  m_cutflow->GetXaxis()->SetBinLabel(4,"PV Ntrk");
+  m_cutflow->GetXaxis()->SetBinLabel(5,"Trigger");
+
+  registerHist(*m_monGr_shift, m_cutflow_jet = TH1F_LW::create("Jet_Cutflow","Number of jets passing cuts",10,-0.5,9.5));
+
+  m_cutflow_jet->GetXaxis()->SetBinLabel(1,"All");
+  m_cutflow_jet->GetXaxis()->SetBinLabel(2,"Quality Cuts");
+  m_cutflow_jet->GetXaxis()->SetBinLabel(3,"Kinematic Cuts");
+  m_cutflow_jet->GetXaxis()->SetBinLabel(4,"Taggable");
+  m_cutflow_jet->GetXaxis()->SetBinLabel(5,"Taggable Good");
+  m_cutflow_jet->GetXaxis()->SetBinLabel(6,"Taggable Suspect");
+
+  ////////////////////////////
+  // Taggability histograms //
+  ////////////////////////////
+
+  registerHist(*m_monGr_shift, m_track_selector_eff = TH2F_LW::create("track_selector_eff", "Fraction of Taggable Jets;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_track_selector_all = TH2F_LW::create("track_selector_all", "Number of Jets;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi())); // changed by SARA
+  registerHist(*m_monGr_shift, m_track_selector_suspect = TH2F_LW::create("track_selector_suspect", "Number of Taggable Suspect Jets;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+
+
+  ////////////////////
+  // Top histograms //
+  ////////////////////
 
-    ATH_MSG_INFO("Monitoring environment is \'" << m_environment << "\', data type is \'" << m_dataType << "\', booking histograms now.");
+  registerHist(*m_monGr_shift, m_n_iso_el =  TH1F_LW::create("n_iso_el","Number of Isolated Electrons; Number of electrons",10,-0.5,9.5)); // added by SARA (just for testing)
+  registerHist(*m_monGr_shift, m_n_iso_mu =  TH1F_LW::create("n_iso_mu","Number of Isolated Muons; Number of muons",10,-0.5,9.5)); // added by SARA (just for testing)
 
+  registerHist(*m_monGr_shift, m_jet_top = TH1F_LW::create("jet_top","Number of Jets in Top Events; Number of jets",1,-0.5,0.5)); // added by SARA
+  registerHist(*m_monGr_shift, m_jet_pt_top = TH1F_LW::create("jet_pt_top","pT of Jets in Top Events, pT [GeV]; pT",10,0.,200.)); // added by SARA
+  registerHist(*m_monGr_shift, m_jet_mv_w_top = TH1F_LW::create("jet_mv_top",(m_mv_algorithmName+" Tag Weight of Jets in Top Events; "+m_mv_algorithmName+" tag weight; "+m_mv_algorithmName+" tag weight").c_str(),100,-1.,1.)); // added by SARA
 
-    m_monGr_shift = new MonGroup( this, "JetTagging", run );
-    m_monGr_LowStat = new MonGroup( this, "JetTagging", lowStat );
+  registerHist(*m_monGr_shift, m_jet_top_tagged = TH1F_LW::create("jet_top_tagged","Number of b-tagged Jets in Top Events",1,-0.5,0.5)); // added by SARA
+  registerHist(*m_monGr_shift, m_jet_pt_top_tagged = TH1F_LW::create("jet_pt_top_tagged","pT of b-tagged Jets in Top Events; pT [GeV]",10,0.,200.)); // added by SARA
 
-    registerHist(*m_monGr_shift, m_tag_ip2d_n    = TH1F_LW::create("tag_IP2D_n","IP2D # of tracks (Quality Jets)",20,0.,20.));
-    registerHist(*m_monGr_shift, m_tag_ip2d_b    = TH1F_LW::create("tag_IP2D_b","IP2D Pb (Quality Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_ip2d_u    = TH1F_LW::create("tag_IP2D_u","IP2D Pu (Quality Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_ip2d_c    = TH1F_LW::create("tag_IP2D_c","IP2D Pc (Quality Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_ip2d_llr  = TH1F_LW::create("tag_IP2D_llr","IP2D llr (Quality Jets)",160,-40.,40.));
+  registerHist(*m_monGr_shift, m_jet_top_eff = TH1F_LW::create("jet_top_eff","Fraction of b-tagged Jets in Top Events",1,-0.5,0.5)); // added by SARA
+  registerHist(*m_monGr_shift, m_jet_pt_top_eff = TH1F_LW::create("jet_pt_top_eff","Fraction of b-tagged Jets in Top Events vs pT; pT [GeV]",10,0.,200.)); // added by SARA
 
-    registerHist(*m_monGr_shift, m_tag_ip2d_n_sj    = TH1F_LW::create("tag_IP2D_n_sj","IP2D # of tracks (Suspect Jets)",20,0.,20.));
-    registerHist(*m_monGr_shift, m_tag_ip2d_b_sj    = TH1F_LW::create("tag_IP2D_b_sj","IP2D Pb (Suspect Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_ip2d_u_sj    = TH1F_LW::create("tag_IP2D_u_sj","IP2D Pu (Suspect Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_ip2d_c_sj    = TH1F_LW::create("tag_IP2D_c_sj","IP2D Pc (Suspect Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_ip2d_llr_sj  = TH1F_LW::create("tag_IP2D_llr_sj","IP2D llr (Suspect Jets)",160,-40.,40.));
+  //////////////////////
+  // 2D jet hisograms //
+  //////////////////////
+
+  registerHist(*m_monGr_shift, m_jet_2D_all = TH2F_LW::create("jet_2D_all", "Number of Jets (No Cuts);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_jet_2D_good = TH2F_LW::create("jet_2D_good", "Number of Jets (Quality Cuts);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_jet_2D_kinematic = TH2F_LW::create("jet_2D_kinematic", "Number of Jets (Kinematic Cuts);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_jet_2D_quality = TH2F_LW::create("jet_2D_quality", "Number of Jets (Taggable Good);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_jet_2D_suspect = TH2F_LW::create("jet_2D_suspect", "Number of Jets (Taggable Suspect);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_jet_2D_bad = TH2F_LW::create("jet_2D_bad", "Number of Jets (Non-Taggable);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+
+  ///////////////////////////
+  // Tag weight histograms //
+  ///////////////////////////
+
+  // MV Tagger
+
+  registerHist(*m_monGr_shift, m_tag_mv_w  = TH1F_LW::create("tag_MV_w",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets); "+m_mv_algorithmName+" tag weight").c_str(),100,-1.,1.));    
+  
+  registerHist(*m_monGr_shift, m_tag_mv_w_pT10_20   = TH1F_LW::create("tag_MV_w_pT10_20"  ,(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, pT = [10,20] GeV); "+m_mv_algorithmName+" tag weight").c_str()  ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_pT20_50   = TH1F_LW::create("tag_MV_w_pT20_50"  ,(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, pT = [20,50] GeV); "+m_mv_algorithmName+" tag weight").c_str()  ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_pT50_100  = TH1F_LW::create("tag_MV_w_pT50_100" ,(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, pT = [50,100] GeV); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_pT100_200 = TH1F_LW::create("tag_MV_w_pT100_200",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, pT = [100,200] GeV); "+m_mv_algorithmName+" tag weight").c_str(),100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_pT200     = TH1F_LW::create("tag_MV_w_pT200"    ,(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, pT > 200 GeV); "+m_mv_algorithmName+" tag weight").c_str()      ,100,-1.,1.));    
+	       
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta0_05  = TH1F_LW::create("tag_MV_w_eta0_05" ,(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, |#eta| = [0.0,0.5]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta05_10 = TH1F_LW::create("tag_MV_w_eta05_10",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, |#eta| = [0.5,1.0]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta10_15 = TH1F_LW::create("tag_MV_w_eta10_15",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, |#eta| = [1.0,1.5]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta15_20 = TH1F_LW::create("tag_MV_w_eta15_20",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, |#eta| = [1.5,2.0]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta20_25 = TH1F_LW::create("tag_MV_w_eta20_25",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, |#eta| = [2.0,2.5]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi0_07  = TH1F_LW::create("tag_MV_w_phi0_07" ,(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, |#phi| = [0.0,0.7]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi07_14 = TH1F_LW::create("tag_MV_w_phi07_14",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, |#phi| = [0.7,1.4]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi14_21 = TH1F_LW::create("tag_MV_w_phi14_21",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, |#phi| = [1.4,2.1]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi21_28 = TH1F_LW::create("tag_MV_w_phi21_28",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, |#phi| = [2.1,2.8]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi28    = TH1F_LW::create("tag_MV_w_phi28",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, |#phi| > 2.8); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));
+
+  registerHist(*m_monGr_shift, m_mv_tag_60_2D = TH2F_LW::create("mv_tag_60_rate_2D", ("Number of Tagged Jets vs #eta and #phi ("+m_mv_algorithmName+" @ 60% WP);#eta;#phi").c_str(), 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_mv_tag_70_2D = TH2F_LW::create("mv_tag_70_rate_2D", ("Number of Tagged Jets vs #eta and #phi ("+m_mv_algorithmName+" @ 70% WP);#eta;#phi").c_str(), 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_mv_tag_77_2D = TH2F_LW::create("mv_tag_77_rate_2D", ("Number of Tagged Jets vs #eta and #phi ("+m_mv_algorithmName+" @ 77% WP);#eta;#phi").c_str(), 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi_sum85OP = TH1F_LW::create("tag_MV_w_phi_sum85OP",("Number of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 85% WP, Taggable Good Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi_sum77OP = TH1F_LW::create("tag_MV_w_phi_sum77OP",("Number of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 77% WP, Taggable Good Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi_sum70OP = TH1F_LW::create("tag_MV_w_phi_sum70OP",("Number of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 70% WP, Taggable Good Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi_sum60OP = TH1F_LW::create("tag_MV_w_phi_sum60OP",("Number of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 60% WP, Taggable Good Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi_sumAll  = TH1F_LW::create("tag_MV_w_phi_sumAll" ,"Number of Jets vs #phi (Taggable Good Jets); #phi" ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi_frac85OP = TH1F_LW::create("tag_MV_w_phi_frac85OP",("Fraction of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 85% WP, Taggable Good Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi_frac77OP = TH1F_LW::create("tag_MV_w_phi_frac77OP",("Fraction of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 77% WP, Taggable Good Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi_frac70OP = TH1F_LW::create("tag_MV_w_phi_frac70OP",("Fraction of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 70% WP, Taggable Good Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_phi_frac60OP = TH1F_LW::create("tag_MV_w_phi_frac60OP",("Fraction of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 60% WP, Taggable Good Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta_sum85OP = TH1F_LW::create("tag_MV_w_eta_sum85OP",("Number of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 85% WP, Taggable Good Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta_sum77OP = TH1F_LW::create("tag_MV_w_eta_sum77OP",("Number of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 77% WP, Taggable Good Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta_sum70OP = TH1F_LW::create("tag_MV_w_eta_sum70OP",("Number of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 70% WP, Taggable Good Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta_sum60OP = TH1F_LW::create("tag_MV_w_eta_sum60OP",("Number of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 60% WP, Taggable Good Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta_sumAll  = TH1F_LW::create("tag_MV_w_eta_sumAll" ,"Number of Jets vs #eta (Taggable Good Jets); #eta"      ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta_frac85OP = TH1F_LW::create("tag_MV_w_eta_frac85OP",("Fraction of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 85% WP, Taggable Good Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta_frac77OP = TH1F_LW::create("tag_MV_w_eta_frac77OP",("Fraction of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 77% WP, Taggable Good Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta_frac70OP = TH1F_LW::create("tag_MV_w_eta_frac70OP",("Fraction of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 70% WP, Taggable Good Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_eta_frac60OP = TH1F_LW::create("tag_MV_w_eta_frac60OP",("Fraction of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 60% WP, Taggable Good Jets); #eta").c_str() ,20,-2.5,2.5));
+  
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj  = TH1F_LW::create("tag_MV_w_sj",(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets); "+m_mv_algorithmName+" tag weight").c_str(),100,-1.,1.));   
+  
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_pT10_20   = TH1F_LW::create("tag_MV_w_sj_pT10_20"  ,(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, pT = [10,20] GeV); "+m_mv_algorithmName+" tag weight").c_str()  ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_pT20_50   = TH1F_LW::create("tag_MV_w_sj_pT20_50"  ,(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, pT = [20,50] GeV); "+m_mv_algorithmName+" tag weight").c_str()  ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_pT50_100  = TH1F_LW::create("tag_MV_w_sj_pT50_100" ,(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, pT = [50,100] GeV); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_pT100_200 = TH1F_LW::create("tag_MV_w_sj_pT100_200",(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, pT = [100,200] GeV); "+m_mv_algorithmName+" tag weight").c_str(),100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_pT200     = TH1F_LW::create("tag_MV_w_sj_pT200"    ,(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, pT > 200 GeV); "+m_mv_algorithmName+" tag weight").c_str()      ,100,-1.,1.));    
+  
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta0_05  = TH1F_LW::create("tag_MV_w_sj_eta0_05" ,(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, |#eta| = [0.0,0.5]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta05_10 = TH1F_LW::create("tag_MV_w_sj_eta05_10",(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, |#eta| = [0.5,1.0]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta10_15 = TH1F_LW::create("tag_MV_w_sj_eta10_15",(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, |#eta| = [1.0,1.5]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta15_20 = TH1F_LW::create("tag_MV_w_sj_eta15_20",(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, |#eta| = [1.5,2.0]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta20_25 = TH1F_LW::create("tag_MV_w_sj_eta20_25",(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, |#eta| = [2.0,2.5]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));  
+  
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi0_07  = TH1F_LW::create("tag_MV_w_sj_phi0_07" ,(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, |#phi| = [0.0,0.7]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi07_14 = TH1F_LW::create("tag_MV_w_sj_phi07_14",(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, |#phi| = [0.7,1.4]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi14_21 = TH1F_LW::create("tag_MV_w_sj_phi14_21",(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, |#phi| = [1.4,2.1]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi21_28 = TH1F_LW::create("tag_MV_w_sj_phi21_28",(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, |#phi| = [2.1,2.8]); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi28    = TH1F_LW::create("tag_MV_w_sj_phi28",(m_mv_algorithmName+" Tag Weight (Taggable Suspect Jets, |#phi| > 2.8); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));  
     
-    registerHist(*m_monGr_shift, m_tag_ip3d_n    = TH1F_LW::create("tag_IP3D_n","IP3D # of tracks (Quality Jets)",20,0.,20.));
-    registerHist(*m_monGr_shift, m_tag_ip3d_b    = TH1F_LW::create("tag_IP3D_b","IP3D Pb (Quality Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_ip3d_u    = TH1F_LW::create("tag_IP3D_u","IP3D Pu (Quality Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_ip3d_c    = TH1F_LW::create("tag_IP3D_c","IP3D Pc (Quality Jets)",100,0.,1.)); 
-    registerHist(*m_monGr_shift, m_tag_ip3d_llr  = TH1F_LW::create("tag_IP3D_llr","IP3D llr (Quality Jets)",160,-40.,40.));  
-
-    registerHist(*m_monGr_shift, m_tag_ip3d_n_sj    = TH1F_LW::create("tag_IP3D_n_sj","IP3D # of tracks (Suspect Jets)",20,0.,20.));
-    registerHist(*m_monGr_shift, m_tag_ip3d_b_sj    = TH1F_LW::create("tag_IP3D_b_sj","IP3D Pb (Suspect Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_ip3d_u_sj    = TH1F_LW::create("tag_IP3D_u_sj","IP3D Pu (Suspect Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_ip3d_c_sj    = TH1F_LW::create("tag_IP3D_c_sj","IP3D Pc (Suspect Jets)",100,0.,1.)); 
-    registerHist(*m_monGr_shift, m_tag_ip3d_llr_sj  = TH1F_LW::create("tag_IP3D_llr_sj","IP3D llr (Suspect Jets)",160,-40.,40.));  
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi_sum85OP = TH1F_LW::create("tag_MV_w_sj_phi_sum85OP",("Number of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 85% WP, Taggable Suspect Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi_sum77OP = TH1F_LW::create("tag_MV_w_sj_phi_sum77OP",("Number of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 77% WP, Taggable Suspect Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi_sum70OP = TH1F_LW::create("tag_MV_w_sj_phi_sum70OP",("Number of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 70% WP, Taggable Suspect Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi_sum60OP = TH1F_LW::create("tag_MV_w_sj_phi_sum60OP",("Number of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 60% WP, Taggable Suspect Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi_sumAll  = TH1F_LW::create("tag_MV_w_sj_phi_sumAll" ,"Number of Jets vs #phi (Taggable Suspect Jets); #phi"      ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi_frac85OP = TH1F_LW::create("tag_MV_w_sj_phi_frac85OP",("Fraction of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 85% WP, Taggable Suspect Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi_frac77OP = TH1F_LW::create("tag_MV_w_sj_phi_frac77OP",("Fraction of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 77% WP, Taggable Suspect Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi_frac70OP = TH1F_LW::create("tag_MV_w_sj_phi_frac70OP",("Fraction of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 70% WP, Taggable Suspect Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_phi_frac60OP = TH1F_LW::create("tag_MV_w_sj_phi_frac60OP",("Fraction of Tagged Jets vs #phi ("+m_mv_algorithmName+" @ 60% WP, Taggable Suspect Jets); #phi").c_str() ,14,-TMath::Pi(),TMath::Pi()));
+
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta_sum85OP = TH1F_LW::create("tag_MV_w_sj_eta_sum85OP",("Number of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 85% WP, Taggable Suspect Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta_sum77OP = TH1F_LW::create("tag_MV_w_sj_eta_sum77OP",("Number of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 77% WP, Taggable Suspect Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta_sum70OP = TH1F_LW::create("tag_MV_w_sj_eta_sum70OP",("Number of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 70% WP, Taggable Suspect Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta_sum60OP = TH1F_LW::create("tag_MV_w_sj_eta_sum60OP",("Number of Tagged Jets vs #ets ("+m_mv_algorithmName+" @ 60% WP, Taggable Suspect Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta_sumAll  = TH1F_LW::create("tag_MV_w_sj_eta_sumAll" ,"Number of Jets vs #eta (Taggable Suspect Jets); #eta"      ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta_frac85OP = TH1F_LW::create("tag_MV_w_sj_eta_frac85OP",("Fraction of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 85% WP, Taggable Suspect Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta_frac77OP = TH1F_LW::create("tag_MV_w_sj_eta_frac77OP",("Fraction of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 77% WP, Taggable Suspect Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta_frac70OP = TH1F_LW::create("tag_MV_w_sj_eta_frac70OP",("Fraction of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 70% WP, Taggable Suspect Jets); #eta").c_str() ,20,-2.5,2.5));
+  registerHist(*m_monGr_shift, m_tag_mv_w_sj_eta_frac60OP = TH1F_LW::create("tag_MV_w_sj_eta_frac60OP",("Fraction of Tagged Jets vs #eta ("+m_mv_algorithmName+" @ 60% WP, Taggable Suspect Jets); #eta").c_str() ,20,-2.5,2.5));
+
+  // SV1+IP3D, IP2D and IP3D Taggers
+
+  registerHist(*m_monGr_shift, m_tag_sv1ip3d_w = TH1F_LW::create("tag_SV1IP3D_w","SV1+IP3D Tag Weight (Taggable Good Jets); SV1+IP3D tag weight",100,-10.,10.));
+  registerHist(*m_monGr_shift, m_sv1ip3d_tag_pos_rate_2D = TH2F_LW::create("sv1ip3d_tag_pos_rate_2D", "SV1+IP3D Positive Tag Rate;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_sv1ip3d_tag_neg_rate_2D = TH2F_LW::create("sv1ip3d_tag_neg_rate_2D", "SV1+IP3D Negative Tag Rate;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+
+  registerHist(*m_monGr_shift, m_tag_sv1ip3d_w_sj = TH1F_LW::create("tag_SV1IP3D_w_sj","SV1+IP3D Tag Weight (Taggable Suspect Jets); SV1+IP3D tag weight",100,-10.,10.));
+
+  registerHist(*m_monGr_shift, m_tag_ip2d_n    = TH1F_LW::create("tag_IP2D_n","Number of IP2D Tracks (Taggable Good Jets); Number of tracks",20,0.,20.));
+  registerHist(*m_monGr_shift, m_tag_ip2d_b    = TH1F_LW::create("tag_IP2D_b","IP2D Pb (Taggable Good Jets); IP2D Pb",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_ip2d_u    = TH1F_LW::create("tag_IP2D_u","IP2D Pu (Taggable Good Jets); IP2D Pu",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_ip2d_c    = TH1F_LW::create("tag_IP2D_c","IP2D Pc (Taggable Good Jets); IP2D Pc",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_ip2d_llr  = TH1F_LW::create("tag_IP2D_llr","IP2D llr (Taggable Good Jets); IP2D llr",160,-40.,40.));
+
+  registerHist(*m_monGr_shift, m_tag_ip2d_n_sj    = TH1F_LW::create("tag_IP2D_n_sj","Number of IP2D Tracks (Taggable Suspect Jets); Number of tracks",20,0.,20.));
+  registerHist(*m_monGr_shift, m_tag_ip2d_b_sj    = TH1F_LW::create("tag_IP2D_b_sj","IP2D Pb (Taggable Suspect Jets); IP2D Pb",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_ip2d_u_sj    = TH1F_LW::create("tag_IP2D_u_sj","IP2D Pu (Taggable Suspect Jets); IP2D Pu",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_ip2d_c_sj    = TH1F_LW::create("tag_IP2D_c_sj","IP2D Pc (Taggable Suspect Jets); IP2D Pc",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_ip2d_llr_sj  = TH1F_LW::create("tag_IP2D_llr_sj","IP2D llr (Taggable Suspect Jets); IP2D llr",160,-40.,40.));
     
-    registerHist(*m_monGr_shift, m_tag_sv0_sig3d  = TH1F_LW::create("tag_SV0_sig3d","SV1 sig3d",100, 0.,100.));     
-     
-    registerHist(*m_monGr_shift, m_tag_sv1_b    = TH1F_LW::create("tag_SV1_b","SV1 Pb (Quality Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_sv1_u    = TH1F_LW::create("tag_SV1_u","SV1 Pu (Quality Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_sv1_c    = TH1F_LW::create("tag_SV1_c","SV1 Pc (Quality Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_sv1_llr  = TH1F_LW::create("tag_SV1_llr","SV1 llr (Quality Jets)",160,-40.,40.));
-
-    registerHist(*m_monGr_shift, m_tag_sv1_b_sj    = TH1F_LW::create("tag_SV1_b_sj","SV1 Pb (Suspect Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_sv1_u_sj    = TH1F_LW::create("tag_SV1_u_sj","SV1 Pu (Suspect Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_sv1_c_sj    = TH1F_LW::create("tag_SV1_c_sj","SV1 Pc (Suspect Jets)",100,0.,1.));
-    registerHist(*m_monGr_shift, m_tag_sv1_llr_sj  = TH1F_LW::create("tag_SV1_llr_sj","SV1 llr (Suspect Jets)",160,-40.,40.));
+  registerHist(*m_monGr_shift, m_tag_ip3d_n    = TH1F_LW::create("tag_IP3D_n","Number of IP3D Tracks (Taggable Good Jets); Number of tracks",20,0.,20.));
+  registerHist(*m_monGr_shift, m_tag_ip3d_b    = TH1F_LW::create("tag_IP3D_b","IP3D Pb (Taggable Good Jets); IP3D Pb",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_ip3d_u    = TH1F_LW::create("tag_IP3D_u","IP3D Pu (Taggable Good Jets); IP3D Pu",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_ip3d_c    = TH1F_LW::create("tag_IP3D_c","IP3D Pc (Taggable Good Jets); IP3D Pc",100,0.,1.)); 
+  registerHist(*m_monGr_shift, m_tag_ip3d_llr  = TH1F_LW::create("tag_IP3D_llr","IP3D llr (Taggable Good Jets); IP3D llr",160,-40.,40.));  
+
+  registerHist(*m_monGr_shift, m_tag_ip3d_n_sj    = TH1F_LW::create("tag_IP3D_n_sj","Number of IP3D Tracks (Taggable Suspect Jets); Number of tracks",20,0.,20.));
+  registerHist(*m_monGr_shift, m_tag_ip3d_b_sj    = TH1F_LW::create("tag_IP3D_b_sj","IP3D Pb (Taggable Suspect Jets); IP3D Pb",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_ip3d_u_sj    = TH1F_LW::create("tag_IP3D_u_sj","IP3D Pu (Taggable Suspect Jets); IP3D Pu",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_ip3d_c_sj    = TH1F_LW::create("tag_IP3D_c_sj","IP3D Pc (Taggable Suspect Jets); IP3D Pc",100,0.,1.)); 
+  registerHist(*m_monGr_shift, m_tag_ip3d_llr_sj  = TH1F_LW::create("tag_IP3D_llr_sj","IP3D llr (Taggable Suspect Jets); IP3D llr",160,-40.,40.));  
     
-    registerHist(*m_monGr_shift, m_tag_jetfitter_llr = TH1F_LW::create("tag_JetFitter_llr","JetFitter llr (Quality Jets)",160,-40.,40.));
-    registerHist(*m_monGr_shift, m_tag_jfcnn_llr   = TH1F_LW::create("tag_JFCNN_llr","Combined weight JetFitterCOMBNN (Quality Jets)",160,-40.,40.));
+  // SV0 and SV1 Taggers
 
-    registerHist(*m_monGr_shift, m_tag_jetfitter_llr_sj = TH1F_LW::create("tag_JetFitter_llr_sj","JetFitter llr (Suspect Jets)",160,-40.,40.));
-    registerHist(*m_monGr_shift, m_tag_jfcnn_llr_sj   = TH1F_LW::create("tag_JFCNN_llr_sj","Combined weight JetFitterCOMBNN (Suspect Jets)",160,-40.,40.));
-    
-    registerHist(*m_monGr_shift, m_tag_sv1ip3d_w = TH1F_LW::create("tag_SV1IP3D_w","Combined weight SV1IP3D (quality jet)",100,-10.,10.));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w  = TH1F_LW::create("tag_MV2c20_w","Combined weight Mv2c10 (quality jet)",100,-1.,1.));    
-
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_pT10_20   = TH1F_LW::create("tag_MV2c20_w_pT10_20"  ,"Combined weight Mv2c10 (quality jet), jet pT = [10,20] GeV"  ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_pT20_50   = TH1F_LW::create("tag_MV2c20_w_pT20_50"  ,"Combined weight Mv2c10 (quality jet), jet pT = [20,50] GeV"  ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_pT50_100  = TH1F_LW::create("tag_MV2c20_w_pT50_100" ,"Combined weight Mv2c10 (quality jet), jet pT = [50,100] GeV" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_pT100_200 = TH1F_LW::create("tag_MV2c20_w_pT100_200","Combined weight Mv2c10 (quality jet), jet pT = [100,200] GeV",100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_pT200     = TH1F_LW::create("tag_MV2c20_w_pT200"    ,"Combined weight Mv2c10 (quality jet), jet pT > 200 GeV"      ,100,-1.,1.));    
-
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta0_05  = TH1F_LW::create("tag_MV2c20_w_eta0_05" ,"Combined weight Mv2c10 (quality jet), jet |eta| = [0.0,0.5]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta05_10 = TH1F_LW::create("tag_MV2c20_w_eta05_10","Combined weight Mv2c10 (quality jet), jet |eta| = [0.5,1.0]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta10_15 = TH1F_LW::create("tag_MV2c20_w_eta10_15","Combined weight Mv2c10 (quality jet), jet |eta| = [1.0,1.5]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta15_20 = TH1F_LW::create("tag_MV2c20_w_eta15_20","Combined weight Mv2c10 (quality jet), jet |eta| = [1.5,2.0]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta20_25 = TH1F_LW::create("tag_MV2c20_w_eta20_25","Combined weight Mv2c10 (quality jet), jet |eta| = [2.0,2.5]" ,100,-1.,1.));    
-
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi0_07  = TH1F_LW::create("tag_MV2c20_w_phi0_07" ,"Combined weight Mv2c10 (quality jet), jet |phi| = [0.0,0.7]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi07_14 = TH1F_LW::create("tag_MV2c20_w_phi07_14","Combined weight Mv2c10 (quality jet), jet |phi| = [0.7,1.4]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi14_21 = TH1F_LW::create("tag_MV2c20_w_phi14_21","Combined weight Mv2c10 (quality jet), jet |phi| = [1.4,2.1]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi21_28 = TH1F_LW::create("tag_MV2c20_w_phi21_28","Combined weight Mv2c10 (quality jet), jet |phi| = [2.1,2.8]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi28    = TH1F_LW::create("tag_MV2c20_w_phi28","Combined weight Mv2c10 (quality jet), jet |phi| > 2.8" ,100,-1.,1.));
-
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi_sum85OP = TH1F_LW::create("tag_MV2c20_w_phi_sum85OP","Sum weight Mv2c10 > 85% OP (quality jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi_sum77OP = TH1F_LW::create("tag_MV2c20_w_phi_sum77OP","Sum weight Mv2c10 > 77% OP (quality jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi_sum70OP = TH1F_LW::create("tag_MV2c20_w_phi_sum70OP","Sum weight Mv2c10 > 70% OP (quality jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi_sum50OP = TH1F_LW::create("tag_MV2c20_w_phi_sum50OP","Sum weight Mv2c10 > 50% OP (quality jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi_sumAll  = TH1F_LW::create("tag_MV2c20_w_phi_sumAll" ,"Sum weight Mv2c10 All (quality jet)"      ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi_frac85OP = TH1F_LW::create("tag_MV2c20_w_phi_frac85OP","Frac weight Mv2c10 > 85% OP (quality jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi_frac77OP = TH1F_LW::create("tag_MV2c20_w_phi_frac77OP","Frac weight Mv2c10 > 77% OP (quality jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi_frac70OP = TH1F_LW::create("tag_MV2c20_w_phi_frac70OP","Frac weight Mv2c10 > 70% OP (quality jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_phi_frac50OP = TH1F_LW::create("tag_MV2c20_w_phi_frac50OP","Frac weight Mv2c10 > 50% OP (quality jet)" ,14,-TMath::Pi(),TMath::Pi()));
-
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta_sum85OP = TH1F_LW::create("tag_MV2c20_w_eta_sum85OP","Sum weight Mv2c10 > 85% OP (quality jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta_sum77OP = TH1F_LW::create("tag_MV2c20_w_eta_sum77OP","Sum weight Mv2c10 > 77% OP (quality jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta_sum70OP = TH1F_LW::create("tag_MV2c20_w_eta_sum70OP","Sum weight Mv2c10 > 70% OP (quality jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta_sum50OP = TH1F_LW::create("tag_MV2c20_w_eta_sum50OP","Sum weight Mv2c10 > 50% OP (quality jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta_sumAll  = TH1F_LW::create("tag_MV2c20_w_eta_sumAll" ,"Sum weight Mv2c10 All (quality jet)"      ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta_frac85OP = TH1F_LW::create("tag_MV2c20_w_eta_frac85OP","Frac weight Mv2c10 > 85% OP (quality jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta_frac77OP = TH1F_LW::create("tag_MV2c20_w_eta_frac77OP","Frac weight Mv2c10 > 77% OP (quality jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta_frac70OP = TH1F_LW::create("tag_MV2c20_w_eta_frac70OP","Frac weight Mv2c10 > 70% OP (quality jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_eta_frac50OP = TH1F_LW::create("tag_MV2c20_w_eta_frac50OP","Frac weight Mv2c10 > 50% OP (quality jet)" ,20,-2.5,2.5));
-
-    registerHist(*m_monGr_shift, m_tag_sv1ip3d_w_sj = TH1F_LW::create("tag_SV1IP3D_w_sj","Combined weight SV1IP3D (suspect jet)",100,-10.,10.));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj  = TH1F_LW::create("tag_MV2c20_w_sj","Combined weight Mv2c10 (suspect jet)",100,-1.,1.));   
-
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_pT10_20   = TH1F_LW::create("tag_MV2c20_w_sj_pT10_20"  ,"Combined weight Mv2c10 (suspect jet), jet pT = [10,20] GeV"  ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_pT20_50   = TH1F_LW::create("tag_MV2c20_w_sj_pT20_50"  ,"Combined weight Mv2c10 (suspect jet), jet pT = [20,50] GeV"  ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_pT50_100  = TH1F_LW::create("tag_MV2c20_w_sj_pT50_100" ,"Combined weight Mv2c10 (suspect jet), jet pT = [50,100] GeV" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_pT100_200 = TH1F_LW::create("tag_MV2c20_w_sj_pT100_200","Combined weight Mv2c10 (suspect jet), jet pT = [100,200] GeV",100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_pT200     = TH1F_LW::create("tag_MV2c20_w_sj_pT200"    ,"Combined weight Mv2c10 (suspect jet), jet pT > 200 GeV"      ,100,-1.,1.));    
-
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta0_05  = TH1F_LW::create("tag_MV2c20_w_sj_eta0_05" ,"Combined weight Mv2c10 (suspect jet), jet |eta| = [0.0,0.5]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta05_10 = TH1F_LW::create("tag_MV2c20_w_sj_eta05_10","Combined weight MV2c10 (suspect jet), jet |eta| = [0.5,1.0]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta10_15 = TH1F_LW::create("tag_MV2c20_w_sj_eta10_15","Combined weight MV2c10 (suspect jet), jet |eta| = [1.0,1.5]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta15_20 = TH1F_LW::create("tag_MV2c20_w_sj_eta15_20","Combined weight MV2c10 (suspect jet), jet |eta| = [1.5,2.0]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta20_25 = TH1F_LW::create("tag_MV2c20_w_sj_eta20_25","Combined weight MV2c10 (suspect jet), jet |eta| = [2.0,2.5]" ,100,-1.,1.));  
-
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi0_07  = TH1F_LW::create("tag_MV2c20_w_sj_phi0_07" ,"Combined weight MV2c10 (suspect jet), jet |phi| = [0.0,0.7]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi07_14 = TH1F_LW::create("tag_MV2c20_w_sj_phi07_14","Combined weight MV2c10 (suspect jet), jet |phi| = [0.7,1.4]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi14_21 = TH1F_LW::create("tag_MV2c20_w_sj_phi14_21","Combined weight MV2c10 (suspect jet), jet |phi| = [1.4,2.1]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi21_28 = TH1F_LW::create("tag_MV2c20_w_sj_phi21_28","Combined weight MV2c10 (suspect jet), jet |phi| = [2.1,2.8]" ,100,-1.,1.));    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi28    = TH1F_LW::create("tag_MV2c20_w_sj_phi28","Combined weight MV2c10 (suspect jet), jet |phi| > 2.8" ,100,-1.,1.));  
-    
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi_sum85OP = TH1F_LW::create("tag_MV2c20_w_sj_phi_sum85OP","Sum weight MV2c10 > 85% OP (suspect jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi_sum77OP = TH1F_LW::create("tag_MV2c20_w_sj_phi_sum77OP","Sum weight MV2c10 > 77% OP (suspect jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi_sum70OP = TH1F_LW::create("tag_MV2c20_w_sj_phi_sum70OP","Sum weight MV2c10 > 70% OP (suspect jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi_sum50OP = TH1F_LW::create("tag_MV2c20_w_sj_phi_sum50OP","Sum weight MV2c10 > 50% OP (suspect jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi_sumAll  = TH1F_LW::create("tag_MV2c20_w_sj_phi_sumAll" ,"Sum weight MV2c10 All (suspect jet)"      ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi_frac85OP = TH1F_LW::create("tag_MV2c20_w_sj_phi_frac85OP","Frac weight MV2c10 > 85% OP (suspect jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi_frac77OP = TH1F_LW::create("tag_MV2c20_w_sj_phi_frac77OP","Frac weight MV2c10 > 77% OP (suspect jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi_frac70OP = TH1F_LW::create("tag_MV2c20_w_sj_phi_frac70OP","Frac weight MV2c10 > 70% OP (suspect jet)" ,14,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_phi_frac50OP = TH1F_LW::create("tag_MV2c20_w_sj_phi_frac50OP","Frac weight MV2c10 > 50% OP (suspect jet)" ,14,-TMath::Pi(),TMath::Pi()));
-
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta_sum85OP = TH1F_LW::create("tag_MV2c20_w_sj_eta_sum85OP","Sum weight MV2c10 > 85% OP (suspect jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta_sum77OP = TH1F_LW::create("tag_MV2c20_w_sj_eta_sum77OP","Sum weight MV2c10 > 77% OP (suspect jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta_sum70OP = TH1F_LW::create("tag_MV2c20_w_sj_eta_sum70OP","Sum weight MV2c10 > 70% OP (suspect jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta_sum50OP = TH1F_LW::create("tag_MV2c20_w_sj_eta_sum50OP","Sum weight MV2c10 > 50% OP (suspect jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta_sumAll  = TH1F_LW::create("tag_MV2c20_w_sj_eta_sumAll" ,"Sum weight MV2c10 All (suspect jet)"      ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta_frac85OP = TH1F_LW::create("tag_MV2c20_w_sj_eta_frac85OP","Frac weight MV2c10 > 85% OP (suspect jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta_frac77OP = TH1F_LW::create("tag_MV2c20_w_sj_eta_frac77OP","Frac weight MV2c10 > 77% OP (suspect jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta_frac70OP = TH1F_LW::create("tag_MV2c20_w_sj_eta_frac70OP","Frac weight MV2c10 > 70% OP (suspect jet)" ,20,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_tag_mv2c20_w_sj_eta_frac50OP = TH1F_LW::create("tag_MV2c20_w_sj_eta_frac50OP","Frac weight MV2c10 > 50% OP (suspect jet)" ,20,-2.5,2.5));
-
-    registerHist(*m_monGr_shift, m_jet_n = TH1F_LW::create("jet_n","number of jets",20,0.,20.));
-
-    registerHist(*m_monGr_shift, m_global_nPrimVtx = TH1F_LW::create("global_nPrimVtx","# primary vertex",30,0.,30.));
-    registerHist(*m_monGr_shift, m_global_xPrimVtx = TH1F_LW::create("global_xPrimVtx","x primary vertex",100,-5.0,5.0));
-    registerHist(*m_monGr_shift, m_global_yPrimVtx = TH1F_LW::create("global_yPrimVtx","y primary vertex",100,-5.0,5.0));
-    registerHist(*m_monGr_shift, m_global_zPrimVtx = TH1F_LW::create("global_zPrimVtx","z primary vertex",100,-250.,250.));
-
-    registerHist(*m_monGr_shift, m_global_BLayerHits = TH1F_LW::create("global_BLayerHits","# of BLayer hits on TrackParticle",5,0.,5.));
-    registerHist(*m_monGr_shift, m_global_PixelHits = TH1F_LW::create("global_PixelHits","# of Pixel hits on TrackParticle",10,0.,10.));
-    registerHist(*m_monGr_shift, m_global_SCTHits = TH1F_LW::create("global_SCTHits","# of SCT hits on TrackParticle",15,0.,15.));
-    registerHist(*m_monGr_shift, m_global_SiHits = TH1F_LW::create("global_SiHits","# of pixel+SCT hits on TrackParticle",25,0.,25.));
-    registerHist(*m_monGr_shift, m_global_TRTHits = TH1F_LW::create("global_TRTHits","# of TRT hits on TrackParticle",100,0.,100.));
-
-    registerHist(*m_monGr_shift, m_trackParticle_n = TH1F_LW::create("NTrackParticle","number of TrackParticles",100,0.,1000.));
-
-    registerHist(*m_monGr_shift, m_jet_eta = TH1F_LW::create("jet_eta","Jet eta",100,-5.,5.));
-    registerHist(*m_monGr_shift, m_jet_phi = TH1F_LW::create("jet_phi","Jet phi",100,-3.15,3.15));
-    registerHist(*m_monGr_shift, m_jet_et  = TH1F_LW::create("jet_et","Jet et",100,0.,500000.));
-
-    registerHist(*m_monGr_shift, m_jet_tracks_n = TH1F_LW::create("jet_tracks_n","# of tracks in a jet",50,0.,50.));
-    registerHist(*m_monGr_shift, m_jet_tracks_pt = TH1F_LW::create("jet_tracks_pt","pT of tracks in a jet",100,0.,100.));
-    registerHist(*m_monGr_shift, m_jet_tracks_eta = TH1F_LW::create("jet_tracks_eta","#eta of tracks in a jet",100,-2.5,2.5));
-    registerHist(*m_monGr_shift, m_jet_tracks_phi = TH1F_LW::create("jet_tracks_phi","#varphi of tracks in a jet",100,-TMath::Pi(),TMath::Pi()));
-    registerHist(*m_monGr_shift, m_jet_tracks_d0 = TH1F_LW::create("jet_tracks_d0","d0 of tracks in a jet",100,-5.,5.));
-    registerHist(*m_monGr_shift, m_jet_tracks_z0 = TH1F_LW::create("jet_tracks_z0","z0 of tracks in a jet",100,-300.,300.));
-			      
-    registerHist(*m_monGr_shift, m_jet_tracks_BLayerHits = TH1F_LW::create("jet_tracks_hits_BLayer","# of BLayer hits per track in a jet",5,0.,5.));
-    registerHist(*m_monGr_shift, m_jet_tracks_PixelHits = TH1F_LW::create("jet_tracks_hits_Pixel","# of Pixel hits per track in a jet",10,0.,10.));
-    registerHist(*m_monGr_shift, m_jet_tracks_SCTHits = TH1F_LW::create("jet_tracks_hits_SCT","# of SCT hits per track in a jet",15,0.,15.));
-   // registerHist(*m_monGr_shift, m_jet_muons_n = TH1F_LW::create("jet_muons_n","# of muons in a jet",10,0.,10.));
-   // registerHist(*m_monGr_shift, m_jet_muons_pt = TH1F_LW::create("jet_muons_pt","pT of muons in a jet",100,0.,100.));
-   // registerHist(*m_monGr_shift, m_jet_electrons_n = TH1F_LW::create("jet_electrons_n","# of electrons in a jet",10,0.,10.));
-   // registerHist(*m_monGr_shift, m_jet_electrons_pt = TH1F_LW::create("jet_electrons_pt","pT of electrons in a jet",100,0.,100.));
-
-    registerHist(*m_monGr_shift, m_trigPassed = TH1F_LW::create("trigPassed","Number of events passed trigger chains",25,0.,25.));
-  
-    m_trigPassed->GetXaxis()->SetBinLabel(1,"L1_J10") ;
-    m_trigPassed->GetXaxis()->SetBinLabel(2,"L1_J15") ;
-    m_trigPassed->GetXaxis()->SetBinLabel(3,"L1_J20")  ;
-    m_trigPassed->GetXaxis()->SetBinLabel(4,"L1_J30") ;
-    m_trigPassed->GetXaxis()->SetBinLabel(5,"L1_J40")  ;
-    m_trigPassed->GetXaxis()->SetBinLabel(6,"L1_J50")  ;
-    m_trigPassed->GetXaxis()->SetBinLabel(7,"L1_J75")  ;
-    m_trigPassed->GetXaxis()->SetBinLabel(8,"L1_J100") ;
-    m_trigPassed->GetXaxis()->SetBinLabel(9,"L1_J350");
+  registerHist(*m_monGr_shift, m_tag_sv0_sig3d  = TH1F_LW::create("tag_SV0_sig3d","SV1 sig3d; SV1 sig3d",100, 0.,100.));     
+     
+  registerHist(*m_monGr_shift, m_tag_sv1_b    = TH1F_LW::create("tag_SV1_b","SV1 Pb (Taggable Good Jets); SV1 Pb",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_sv1_u    = TH1F_LW::create("tag_SV1_u","SV1 Pu (Taggable Good Jets); SV1 Pu",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_sv1_c    = TH1F_LW::create("tag_SV1_c","SV1 Pc (Taggable Good Jets); SV1 Pc",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_sv1_llr  = TH1F_LW::create("tag_SV1_llr","SV1 llr (Taggable Good Jets); SV1 llr",160,-40.,40.));
+
+  registerHist(*m_monGr_shift, m_tag_sv1_b_sj    = TH1F_LW::create("tag_SV1_b_sj","SV1 Pb (Taggable Suspect Jets); SV1 Pb",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_sv1_u_sj    = TH1F_LW::create("tag_SV1_u_sj","SV1 Pu (Taggable Suspect Jets); SV1 Pu",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_sv1_c_sj    = TH1F_LW::create("tag_SV1_c_sj","SV1 Pc (Taggable Suspect Jets); SV1 Pc",100,0.,1.));
+  registerHist(*m_monGr_shift, m_tag_sv1_llr_sj  = TH1F_LW::create("tag_SV1_llr_sj","SV1 llr (Taggable Suspect Jets); SV1 llr",160,-40.,40.));
     
-    m_trigPassed->GetXaxis()->SetBinLabel(10,"L1_3J10");
-    m_trigPassed->GetXaxis()->SetBinLabel(11,"L1_3J15");
-    m_trigPassed->GetXaxis()->SetBinLabel(12,"L1_3J20");
-    m_trigPassed->GetXaxis()->SetBinLabel(13,"L1_3J50");
-    m_trigPassed->GetXaxis()->SetBinLabel(14,"L1_3J75");
-    m_trigPassed->GetXaxis()->SetBinLabel(15,"L1_4J10");
-    m_trigPassed->GetXaxis()->SetBinLabel(16,"L1_4J15");
-    m_trigPassed->GetXaxis()->SetBinLabel(17,"L1_4J30");
-    m_trigPassed->GetXaxis()->SetBinLabel(18,"L1_5J10");
-    m_trigPassed->GetXaxis()->SetBinLabel(19,"L1_5J20");
-   
-    m_trigPassed->GetXaxis()->SetBinLabel(20,"EF_mu4_L1J10_matched");
-    m_trigPassed->GetXaxis()->SetBinLabel(21,"EF_e24vh_medium1");
-    m_trigPassed->GetXaxis()->SetBinLabel(22,"EF_mu18_IDTrkNoCut_tight");
-   
-    m_trigPassed->GetXaxis()->SetBinLabel(23,"L1_RD0_FILLED");
-
-
-    registerHist(*m_monGr_shift, m_cutflow =
-                     TH1F_LW::create("DQ_Cutflow","Number of events passing DQcuts",10,-0.5,9.5));
-
-    m_cutflow->GetXaxis()->SetBinLabel(1,"All");
-    m_cutflow->GetXaxis()->SetBinLabel(2,"Good LAr");
-    m_cutflow->GetXaxis()->SetBinLabel(3,"PV present");
-    m_cutflow->GetXaxis()->SetBinLabel(4,"PV ntrk");
-
-    registerHist(*m_monGr_shift, m_priVtx_trks = TH1F_LW::create("priVtx_trks","Tracks PV",100,-0.5,99.5));
-    m_priVtx_trks->GetXaxis()->SetTitle("Primary Vertex #trks");
-
-
-    registerHist(*m_monGr_shift, m_cutflow_jet = TH1F_LW::create("Jet_Cutflow","Number of jets passed DQcuts",10,-0.5,9.5));
-
-    m_cutflow_jet->GetXaxis()->SetBinLabel(1,"All");
-    m_cutflow_jet->GetXaxis()->SetBinLabel(2,"isGoodJet");
-    m_cutflow_jet->GetXaxis()->SetBinLabel(3,"Kinematic Cuts");
-    m_cutflow_jet->GetXaxis()->SetBinLabel(4,"Taggable");
-
-    registerHist(*m_monGr_shift, m_track_selector_eff = TH2F_LW::create("track_selector_eff", "Efficiency of Track Selector Tool;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_track_selector_all = TH2F_LW::create("track_selector_all", "Efficiency of Track Selector Tool;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_track_selector_suspect = TH2F_LW::create("track_selector_suspect", "Efficiency of Track Selector Tool (Suspect Jets);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-
-    //2D plots
-    registerHist(*m_monGr_shift, m_jet_2D_all = TH2F_LW::create("jet_2D_all", "Jet 2D plot (No Cuts);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_jet_2D_good = TH2F_LW::create("jet_2D_good", "Jet 2D plot (Good Jets);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_jet_2D_kinematic = TH2F_LW::create("jet_2D_kinematic", "Jet 2D plot (Kinematic Cuts);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_jet_2D_quality = TH2F_LW::create("jet_2D_quality", "Jet 2D plot (Quality Cuts);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_jet_2D_suspect = TH2F_LW::create("jet_2D_suspect", "Jet 2D plot (Suspect Jets);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_jet_2D_bad = TH2F_LW::create("jet_2D_bad", "Jet 2D plot (Bad Jets);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-
-    registerHist(*m_monGr_shift, m_sv1ip3d_tag_pos_rate_2D = TH2F_LW::create("sv1ip3d_tag_pos_rate_2D", "SV1+IP3D Tag Positive Rate;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_sv1ip3d_tag_neg_rate_2D = TH2F_LW::create("sv1ip3d_tag_neg_rate_2D", "SV1+IP3D Tag Negative Rate;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_mv2c20_tag_50_2D = TH2F_LW::create("mv2c20_tag_50_rate_2D", "MV2c10 Tag 50%;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_mv2c20_tag_70_2D = TH2F_LW::create("mv2c20_tag_70_rate_2D", "MV2c10 Tag 70%;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_mv2c20_tag_80_2D = TH2F_LW::create("mv2c20_tag_80_rate_2D", "MV2c10 Tag 80%;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  // JetFitter Taggers
+
+  registerHist(*m_monGr_shift, m_tag_jetfitter_llr = TH1F_LW::create("tag_JetFitter_llr","JetFitter llr (Taggable Good Jets); JetFitter llr",160,-40.,40.));
+  registerHist(*m_monGr_shift, m_tag_jfcnn_llr   = TH1F_LW::create("tag_JFCNN_llr","JetFitterCOMBNN Tag Weight (Taggable Good Jets); JetFitterCOMBNN tag weight",160,-40.,40.));
 
+  registerHist(*m_monGr_shift, m_tag_jetfitter_llr_sj = TH1F_LW::create("tag_JetFitter_llr_sj","JetFitter llr (Taggable Suspect Jets); JetFitter llr",160,-40.,40.));
+  registerHist(*m_monGr_shift, m_tag_jfcnn_llr_sj   = TH1F_LW::create("tag_JFCNN_llr_sj","JetFitterCOMBNN Tag Weight (Taggable Suspect Jets); JetFitterCOMBNN tag weight",160,-40.,40.));
+    
+  //////////////////////////
+  // Track cut histograms //
+  //////////////////////////
  
-    registerHist(*m_monGr_shift, m_tracks_all_2D = TH2F_LW::create("tracks_all_2D", "All Tracks", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_pTMin_2D = TH2F_LW::create("tracks_pTMin_2D", "Tracks Failed pTMin Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_d0Max_2D = TH2F_LW::create("tracks_d0Max_2D", "Tracks Failed d0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_z0Max_2D = TH2F_LW::create("tracks_z0Max_2D", "Tracks Failed z0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_sigd0Max_2D = TH2F_LW::create("tracks_sigd0Max_2D", "Tracks Failed sigd0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_sigz0Max_2D = TH2F_LW::create("tracks_sigz0Max_2D", "Tracks Failed sigz0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_etaMax_2D = TH2F_LW::create("tracks_etaMax_2D", "Tracks Failed etaMax Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_nHitBLayer_2D = TH2F_LW::create("tracks_nHitBLayer_2D", "Tracks Failed nHitBLayer Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_deadBLayer_2D = TH2F_LW::create("tracks_deadBLayer_2D", "Tracks Failed deadBLayer Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_nHitPix_2D = TH2F_LW::create("tracks_nHitPix_2D", "Tracks Failed nHitPix Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_nHitSct_2D = TH2F_LW::create("tracks_nHitSct_2D", "Tracks Failed nHitSct Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_nHitSi_2D = TH2F_LW::create("tracks_nHitSi_2D", "Tracks Failed nHitSi Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_nHitTrt_2D = TH2F_LW::create("tracks_nHitTrt_2D", "Tracks Failed nHitTrt Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_nHitTrtHighE_2D = TH2F_LW::create("tracks_nHitTrtHighE_2D", "Tracks Failed nHitTrtHighE Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_fitChi2_2D = TH2F_LW::create("tracks_fitChi2_2D", "Tracks Failed fitChi2 Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_fitProb_2D = TH2F_LW::create("tracks_fitProb_2D", "Tracks Failed fitProb Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    registerHist(*m_monGr_shift, m_tracks_fitChi2OnNdfMax_2D = TH2F_LW::create("tracks_fitChi2OnNdfMax_2D", "Tracks Failed fitChi2OnNdfMax Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-
-    registerHist(*m_monGr_shift, m_tracks_passedCuts_2D = TH2F_LW::create("tracks_passedCuts_2D", "Tracks passing all cuts;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-
-    /*
-    Starting to register LowStat histograms:
-    */
-    if ( newRunFlag() || newLowStatIntervalFlag() ) {
-        registerHist(*m_monGr_LowStat, m_tracks_all_2D_LS = TH2F_LW::create("tracks_all_2D_LS", "All Tracks;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_pTMin_2D_LS = TH2F_LW::create("tracks_pTMin_2D_LS", "Tracks Failed pTMin Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_d0Max_2D_LS = TH2F_LW::create("tracks_d0Max_2D_LS", "Tracks Failed d0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_z0Max_2D_LS = TH2F_LW::create("tracks_z0Max_2D_LS", "Tracks Failed z0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_sigd0Max_2D_LS = TH2F_LW::create("tracks_sigd0Max_2D_LS", "Tracks Failed sigd0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_sigz0Max_2D_LS = TH2F_LW::create("tracks_sigz0Max_2D_LS", "Tracks Failed sigz0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_etaMax_2D_LS = TH2F_LW::create("tracks_etaMax_2D_LS", "Tracks Failed etaMax Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_nHitBLayer_2D_LS = TH2F_LW::create("tracks_nHitBLayer_2D_LS", "Tracks Failed nHitBLayer Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_deadBLayer_2D_LS = TH2F_LW::create("tracks_deadBLayer_2D_LS", "Tracks Failed deadBLayer Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_nHitPix_2D_LS = TH2F_LW::create("tracks_nHitPix_2D_LS", "Tracks Failed nHitPix Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_nHitSct_2D_LS = TH2F_LW::create("tracks_nHitSct_2D_LS", "Tracks Failed nHitSct Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_nHitSi_2D_LS = TH2F_LW::create("tracks_nHitSi_2D_LS", "Tracks Failed nHitSi Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_nHitTrt_2D_LS = TH2F_LW::create("tracks_nHitTrt_2D_LS", "Tracks Failed nHitTrt Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_nHitTrtHighE_2D_LS = TH2F_LW::create("tracks_nHitTrtHighE_2D_LS", "Tracks Failed nHitTrtHighE Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_fitChi2_2D_LS = TH2F_LW::create("tracks_fitChi2_2D_LS", "Tracks Failed fitChi2 Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_fitProb_2D_LS = TH2F_LW::create("tracks_fitProb_2D_LS", "Tracks Failed fitProb Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_tracks_fitChi2OnNdfMax_2D_LS = TH2F_LW::create("tracks_fitChi2OnNdfMax_2D_LS", "Tracks Failed fitChi2OnNdfMax Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-
-	registerHist(*m_monGr_LowStat, m_jet_tracks_d0_LS = TH1F_LW::create("jet_tracks_d0_LS","d0 of tracks in a jet",100,-5.,5.));
-	registerHist(*m_monGr_LowStat, m_jet_tracks_z0_LS = TH1F_LW::create("jet_tracks_z0_LS","z0 of tracks in a jet",100,-300.,300.));
-
-        // registerHist(*m_monGr_LowStat, m_mv2c20_tag_80_2D_LS = TH2F_LW::create("mv2c20_tag_80_2D_LS", "MV2c20 Tag 80%", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-	registerHist(*m_monGr_shift, m_tag_mv2c20_w_LS  = TH1F_LW::create("tag_MV2c20_w_LS","Combined weight MV2c20 (quality jet)",100,-1.,1.));  
-	registerHist(*m_monGr_shift, m_tag_mv2c20_w_pT10_20_LS   = TH1F_LW::create("tag_MV2c20_w_pT10_20_LS"  ,"Combined weight MV2c10 (quality jet), jet pT = [10,20] GeV"  ,100,-1.,1.));    
-	registerHist(*m_monGr_shift, m_tag_mv2c20_w_pT20_50_LS   = TH1F_LW::create("tag_MV2c20_w_pT20_50_LS"  ,"Combined weight MV2c10 (quality jet), jet pT = [20,50] GeV"  ,100,-1.,1.));    
-	registerHist(*m_monGr_shift, m_tag_mv2c20_w_pT50_100_LS  = TH1F_LW::create("tag_MV2c20_w_pT50_100_LS" ,"Combined weight MV2c10 (quality jet), jet pT = [50,100] GeV" ,100,-1.,1.));    
-	registerHist(*m_monGr_shift, m_tag_mv2c20_w_pT100_200_LS = TH1F_LW::create("tag_MV2c20_w_pT100_200_LS","Combined weight MV2c10 (quality jet), jet pT = [100,200] GeV",100,-1.,1.));    
-	registerHist(*m_monGr_shift, m_tag_mv2c20_w_pT200_LS     = TH1F_LW::create("tag_MV2c20_w_pT200_LS"    ,"Combined weight MV2c10 (quality jet), jet pT > 200 GeV"      ,100,-1.,1.));   
-
-        registerHist(*m_monGr_LowStat, m_jet_2D_kinematic_LS     = TH2F_LW::create("jet_2D_kinematic_LS", "Jet 2D plot (Kinematic Cuts);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_track_selector_eff_LS   = TH2F_LW::create("track_selector_eff_LS", "Efficiency of Track Selector Tool;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-        registerHist(*m_monGr_LowStat, m_track_selector_all_LS   = TH2F_LW::create("track_selector_all_LS", "Efficiency of Track Selector Tool;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
-    }
+  registerHist(*m_monGr_shift, m_tracks_all_2D = TH2F_LW::create("tracks_all_2D", "Number of Tracks (No Cuts); #eta; #phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_pTMin_2D = TH2F_LW::create("tracks_pTMin_2D", "Number of Tracks Failing pTMin Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_d0Max_2D = TH2F_LW::create("tracks_d0Max_2D", "Number of Tracks Failing d0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_z0Max_2D = TH2F_LW::create("tracks_z0Max_2D", "Number of Tracks Failing z0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_sigd0Max_2D = TH2F_LW::create("tracks_sigd0Max_2D", "Number of Tracks Failing sigd0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_sigz0Max_2D = TH2F_LW::create("tracks_sigz0Max_2D", "Number of Tracks Failing sigz0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_etaMax_2D = TH2F_LW::create("tracks_etaMax_2D", "Number of Tracks Failing etaMax Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_nHitBLayer_2D = TH2F_LW::create("tracks_nHitBLayer_2D", "Number of Tracks Failing IBL Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi())); // IBL hits in Run-2, old b-layer in Run-1
+  registerHist(*m_monGr_shift, m_tracks_deadBLayer_2D = TH2F_LW::create("tracks_deadBLayer_2D", "Number of Tracks Failing Dead IBL Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi())); // IBL hits in Run-2, old b-layer in Run-1
+  registerHist(*m_monGr_shift, m_tracks_nHitPix_2D = TH2F_LW::create("tracks_nHitPix_2D", "Number of Tracks Failing PIX Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_nHitSct_2D = TH2F_LW::create("tracks_nHitSct_2D", "Number of Tracks Failing SCT Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_nHitSi_2D = TH2F_LW::create("tracks_nHitSi_2D", "Number of Tracks Failing Silicon Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_nHitTrt_2D = TH2F_LW::create("tracks_nHitTrt_2D", "Number of Tracks Failing TRT Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_nHitTrtHighE_2D = TH2F_LW::create("tracks_nHitTrtHighE_2D", "Number of Tracks Failing TRT High E Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_fitChi2_2D = TH2F_LW::create("tracks_fitChi2_2D", "Number of Tracks Failing fitChi2 Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_fitProb_2D = TH2F_LW::create("tracks_fitProb_2D", "Number of Tracks Failing fitProb Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_fitChi2OnNdfMax_2D = TH2F_LW::create("tracks_fitChi2OnNdfMax_2D", "Number of Tracks Failing fitChi2OnNdfMax Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  registerHist(*m_monGr_shift, m_tracks_passedCuts_2D = TH2F_LW::create("tracks_passedCuts_2D", "Number of Tracks Passing All Cuts;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+
+  ////////////////////////
+  // LowStat histograms //
+  ////////////////////////
+
+  if ( newRunFlag() || newLowStatIntervalFlag() ) {
+    registerHist(*m_monGr_LowStat, m_tracks_all_2D_LS = TH2F_LW::create("tracks_all_2D_LS", "Number of Tracks (No Cuts);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_pTMin_2D_LS = TH2F_LW::create("tracks_pTMin_2D_LS", "Number of Tracks Failing pTMin Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_d0Max_2D_LS = TH2F_LW::create("tracks_d0Max_2D_LS", "Number of Tracks Failing d0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_z0Max_2D_LS = TH2F_LW::create("tracks_z0Max_2D_LS", "Number of Tracks Failing z0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_sigd0Max_2D_LS = TH2F_LW::create("tracks_sigd0Max_2D_LS", "Number of Tracks Failing sigd0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_sigz0Max_2D_LS = TH2F_LW::create("tracks_sigz0Max_2D_LS", "Number of Tracks Failing sigz0Max Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_etaMax_2D_LS = TH2F_LW::create("tracks_etaMax_2D_LS", "Number of Tracks Failing etaMax Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_nHitBLayer_2D_LS = TH2F_LW::create("tracks_nHitBLayer_2D_LS", "Number of Tracks Failing IBL Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi())); // IBL hits in Run-2, old b-layer in Run-1
+    registerHist(*m_monGr_LowStat, m_tracks_deadBLayer_2D_LS = TH2F_LW::create("tracks_deadBLayer_2D_LS", "Number of Tracks Failing Dead IBL Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi())); // IBL hits in Run-2, old b-layer in Run-1
+    registerHist(*m_monGr_LowStat, m_tracks_nHitPix_2D_LS = TH2F_LW::create("tracks_nHitPix_2D_LS", "Number of Tracks Failing PIX Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_nHitSct_2D_LS = TH2F_LW::create("tracks_nHitSct_2D_LS", "Number of Tracks Failing SCT Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_nHitSi_2D_LS = TH2F_LW::create("tracks_nHitSi_2D_LS", "Number of Tracks Failing Silicon Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_nHitTrt_2D_LS = TH2F_LW::create("tracks_nHitTrt_2D_LS", "Number of Tracks Failing TRT Hits Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_nHitTrtHighE_2D_LS = TH2F_LW::create("tracks_nHitTrtHighE_2D_LS", "Number of Tracks Failing TRT High E Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_fitChi2_2D_LS = TH2F_LW::create("tracks_fitChi2_2D_LS", "Number of Tracks Failing fitChi2 Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_fitProb_2D_LS = TH2F_LW::create("tracks_fitProb_2D_LS", "Numbr of Tracks Failing fitProb Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tracks_fitChi2OnNdfMax_2D_LS = TH2F_LW::create("tracks_fitChi2OnNdfMax_2D_LS", "Number of Tracks Failing fitChi2OnNdfMax Cut;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+
+    registerHist(*m_monGr_LowStat, m_jet_tracks_d0_LS = TH1F_LW::create("jet_tracks_d0_LS","d0 of Tracks in Jets; d0 [mm]",100,-5.,5.));
+    registerHist(*m_monGr_LowStat, m_jet_tracks_z0_LS = TH1F_LW::create("jet_tracks_z0_LS","z0 of Tracks in Jets; z0 [mm]",100,-300.,300.));
+
+    // registerHist(*m_monGr_LowStat, m_mv_tag_77_2D_LS = TH2F_LW::create("mv_tag_77_2D_LS", (m_mv_algorithmName+" Tag 77%").c_str(), 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_tag_mv_w_LS  = TH1F_LW::create("tag_MV_w_LS",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets); "+m_mv_algorithmName+" tag weight").c_str(),100,-1.,1.));  
+    registerHist(*m_monGr_LowStat, m_tag_mv_w_pT10_20_LS   = TH1F_LW::create("tag_MV_w_pT10_20_LS"  ,(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, pT = [10,20] GeV); "+m_mv_algorithmName+" tag weight").c_str()  ,100,-1.,1.));    
+    registerHist(*m_monGr_LowStat, m_tag_mv_w_pT20_50_LS   = TH1F_LW::create("tag_MV_w_pT20_50_LS"  ,(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, pT = [20,50] GeV); "+m_mv_algorithmName+" tag weight").c_str()  ,100,-1.,1.));    
+    registerHist(*m_monGr_LowStat, m_tag_mv_w_pT50_100_LS  = TH1F_LW::create("tag_MV_w_pT50_100_LS" ,(m_mv_algorithmName+" Tag Weight Taggable Good Jets, pT = [50,100] GeV); "+m_mv_algorithmName+" tag weight").c_str() ,100,-1.,1.));    
+    registerHist(*m_monGr_LowStat, m_tag_mv_w_pT100_200_LS = TH1F_LW::create("tag_MV_w_pT100_200_LS",(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, pT = [100,200] GeV); "+m_mv_algorithmName+" tag weight").c_str(),100,-1.,1.));    
+    registerHist(*m_monGr_LowStat, m_tag_mv_w_pT200_LS     = TH1F_LW::create("tag_MV_w_pT200_LS"    ,(m_mv_algorithmName+" Tag Weight (Taggable Good Jets, pT > 200 GeV); "+m_mv_algorithmName+" tag weight").c_str()      ,100,-1.,1.));   
+    
+    registerHist(*m_monGr_LowStat, m_jet_2D_kinematic_LS     = TH2F_LW::create("jet_2D_kinematic_LS", "Number of Jets (Kinematic Cuts);#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_track_selector_eff_LS   = TH2F_LW::create("track_selector_eff_LS", "Fraction of Taggable Jets;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+    registerHist(*m_monGr_LowStat, m_track_selector_all_LS   = TH2F_LW::create("track_selector_all_LS", "Number of Jets;#eta;#phi", 25, -2.5, 2.5, 25, -TMath::Pi(), TMath::Pi()));
+  }
 
-    /*
+  /*
     Ended registering LowStat histograms
-    */
+  */
 
-    m_histogramsCreated = true;
+  m_histogramsCreated = true;
 
-    return StatusCode::SUCCESS;
+  return StatusCode::SUCCESS;
 }
 
 
@@ -509,226 +569,238 @@ StatusCode JetTagMonitoring::bookHistograms() {
 
 StatusCode JetTagMonitoring::fillHistograms() {
 
-    ATH_MSG_DEBUG("fillHistograms()");
+  ATH_MSG_DEBUG("fillHistograms()");
 
-    if (!m_histogramsCreated)
-        return StatusCode::SUCCESS;
+  if (!m_histogramsCreated)
+    return StatusCode::SUCCESS;
 
-    if (m_switch_off)
-        return StatusCode::SUCCESS;
+  if (m_switch_off)
+    return StatusCode::SUCCESS;
 
-    m_cutflow->Fill(0.);
+  m_cutflow->Fill(0.);
 
-    const xAOD::EventInfo* thisEventInfo;
-    if (evtStore()->retrieve(thisEventInfo).isFailure())
-      ATH_MSG_WARNING("Cannot retrieve EventInfo");
+  const xAOD::EventInfo* thisEventInfo;
+  if (evtStore()->retrieve(thisEventInfo).isFailure())
+    ATH_MSG_WARNING("Cannot retrieve EventInfo");
 
-    m_lumiBlockNum = thisEventInfo->lumiBlock();
+  m_lumiBlockNum = thisEventInfo->lumiBlock();
 
-    ATH_MSG_DEBUG("Lumiblock ID: " << m_lumiBlockNum);
+  ATH_MSG_DEBUG("Lumiblock ID: " << m_lumiBlockNum);
 
-    ////////////////////////////////
-    //* Event cleaning           *//
-    ////////////////////////////////
+  ////////////////////////////////
+  //* Event cleaning           *//
+  ////////////////////////////////
 
-    if ( thisEventInfo->errorState(xAOD::EventInfo::EventFlagSubDet::Tile) == xAOD::EventInfo::Error || 
-	 thisEventInfo->errorState(xAOD::EventInfo::EventFlagSubDet::LAr)  == xAOD::EventInfo::Error ||
-	 thisEventInfo->isEventFlagBitSet(xAOD::EventInfo::Core, 18) ) { 
-      ATH_MSG_DEBUG("Event cleaning : skip event");
-      return StatusCode::SUCCESS;    
-    }
+  if ( thisEventInfo->errorState(xAOD::EventInfo::EventFlagSubDet::Tile) == xAOD::EventInfo::Error || 
+       thisEventInfo->errorState(xAOD::EventInfo::EventFlagSubDet::LAr)  == xAOD::EventInfo::Error ||
+       thisEventInfo->isEventFlagBitSet(xAOD::EventInfo::Core, 18) ) { 
+    ATH_MSG_DEBUG("Event cleaning : skip event");
+    return StatusCode::SUCCESS;    
+  }
     
-    m_cutflow->Fill(1.);
+  m_cutflow->Fill(1.);
 
-    ///////////////////////////////
-    //* Trigger container       *//
-    ///////////////////////////////
+  ///////////////////////////////
+  //* Trigger container       *//
+  ///////////////////////////////
+
+  if (m_use_trigdectool && m_trigDecTool != 0) {
 
     ATH_MSG_DEBUG("TrigDecTool: " << m_trigDecTool);
+    
+    ATH_MSG_DEBUG("m_use_trigdectool: " << m_use_trigdectool << ", (m_trigDecTool->isPassed(" << m_ElectronTrigger_2016 << "): " << m_trigDecTool->isPassed(m_ElectronTrigger_2016));
+    ATH_MSG_DEBUG("m_use_trigdectool: " << m_use_trigdectool << ", (m_trigDecTool->isPassed(" << m_MuonTrigger_2016 << "): " << m_trigDecTool->isPassed(m_MuonTrigger_2016));
+    ATH_MSG_DEBUG("m_use_trigdectool: " << m_use_trigdectool << ", (m_trigDecTool->isPassed(" << m_JetTrigger_2016 << "): " << m_trigDecTool->isPassed(m_JetTrigger_2016));
+    
+    ATH_MSG_DEBUG("m_use_trigdectool: " << m_use_trigdectool << ", (m_trigDecTool->isPassed(" << m_ElectronTrigger_2016 << "): " << m_trigDecTool->isPassed(m_ElectronTrigger_2016));
+    ATH_MSG_DEBUG("m_use_trigdectool: " << m_use_trigdectool << ", (m_trigDecTool->isPassed(" << m_MuonTrigger_2016 << "): " << m_trigDecTool->isPassed(m_MuonTrigger_2016));
+    ATH_MSG_DEBUG("m_use_trigdectool: " << m_use_trigdectool << ", (m_trigDecTool->isPassed(" << m_JetTrigger_2016 << "): " << m_trigDecTool->isPassed(m_JetTrigger_2016));
+  
+ 
+    auto chainGroup = m_trigDecTool->getChainGroup(".*");
+    for (auto & trig : chainGroup->getListOfTriggers()) {
+      ATH_MSG_DEBUG("Found trigger " << trig);
+    }
+    
+    m_trigPassed->Fill(0.);
 
-    // Disable trigger for now since it produces an error in q-test q221
-    // if (m_use_trigdectool && m_trigDecTool != 0) {
-    //   if (m_trigDecTool->isPassed("L1_J10"))  m_trigPassed->Fill(0.);
-    //   if (m_trigDecTool->isPassed("L1_J15"))  m_trigPassed->Fill(1.);
-    //   if (m_trigDecTool->isPassed("L1_J20"))  m_trigPassed->Fill(2.);
-    //   if (m_trigDecTool->isPassed("L1_J30"))  m_trigPassed->Fill(3.);
-    //   if (m_trigDecTool->isPassed("L1_J40"))  m_trigPassed->Fill(4.);
-    //   if (m_trigDecTool->isPassed("L1_J50"))  m_trigPassed->Fill(5.);
-    //   if (m_trigDecTool->isPassed("L1_J75"))  m_trigPassed->Fill(6.);
-    //   if (m_trigDecTool->isPassed("L1_J100"))  m_trigPassed->Fill(7.);
-    //   if (m_trigDecTool->isPassed("L1_J350"))  m_trigPassed->Fill(8.);
-    //   if (m_trigDecTool->isPassed("L1_3J10"))  m_trigPassed->Fill(9.);
-    //   if (m_trigDecTool->isPassed("L1_3J15"))  m_trigPassed->Fill(10.);
-    //   if (m_trigDecTool->isPassed("L1_3J20"))  m_trigPassed->Fill(11.);
-    //   if (m_trigDecTool->isPassed("L1_3J50"))  m_trigPassed->Fill(12.);
-    //   if (m_trigDecTool->isPassed("L1_3J75"))  m_trigPassed->Fill(13.);
-    //   if (m_trigDecTool->isPassed("L1_4J10"))  m_trigPassed->Fill(14.);
-    //   if (m_trigDecTool->isPassed("L1_4J15"))  m_trigPassed->Fill(15.);
-    //   if (m_trigDecTool->isPassed("L1_4J30"))  m_trigPassed->Fill(16.);
-    //   if (m_trigDecTool->isPassed("L1_5J10"))  m_trigPassed->Fill(17.);
-    //   if (m_trigDecTool->isPassed("L1_5J20"))  m_trigPassed->Fill(18.);
-      
-      
-    //   if (m_trigDecTool->isPassed("EF_mu4_L1J10_matched"))  m_trigPassed->Fill(19.);
-    //   if (m_trigDecTool->isPassed("EF_e24vh_medium1")) m_trigPassed->Fill(20.);
-    //   if (m_trigDecTool->isPassed("EF_mu18_IDTrkNoCut_tight")) m_trigPassed->Fill(21.);
-      
-    //   if (m_trigDecTool->isPassed("L1_RD0_FILLED")) m_trigPassed->Fill(22.);
-    // }
+    // 2016 menu
+    if (m_trigDecTool->isPassed(m_ElectronTrigger_2016)) m_trigPassed->Fill(1.);
+    if (m_trigDecTool->isPassed(m_MuonTrigger_2016)) m_trigPassed->Fill(2.);
+    if (m_trigDecTool->isPassed(m_ElectronTrigger_2016) && m_trigDecTool->isPassed(m_MuonTrigger_2016)) m_trigPassed->Fill(3.);
+    if (m_trigDecTool->isPassed(m_JetTrigger_2016)) m_trigPassed->Fill(4.);
+
+    // 2017 menu
+    if (m_trigDecTool->isPassed(m_ElectronTrigger_2017)) m_trigPassed->Fill(5.);
+    if (m_trigDecTool->isPassed(m_MuonTrigger_2017)) m_trigPassed->Fill(6.);
+    if (m_trigDecTool->isPassed(m_ElectronTrigger_2017) && m_trigDecTool->isPassed(m_MuonTrigger_2017)) m_trigPassed->Fill(7.);
+    if (m_trigDecTool->isPassed(m_JetTrigger_2017)) m_trigPassed->Fill(8.);
 
-    //////////////////////
-    //* Primary vertex *//
-    //////////////////////
+  }
 
-    unsigned int npv = 0, npv_trk = 0;
-    double xpv = 0., ypv = 0., zpv = 0.;
+  //////////////////////
+  //* Primary vertex *//
+  //////////////////////
 
-    const xAOD::VertexContainer* vxContainer(0);
-    // const DataHandle<VxContainer> vxContainer;
-    bool foundPrimaryVtx = evtStore()->retrieve(vxContainer, m_primaryVertexName);
+  unsigned int npv = 0, npv_trk = 0;
+  double xpv = 0., ypv = 0., zpv = 0.;
 
-    if (!foundPrimaryVtx) {
-      ATH_MSG_WARNING("Unable to retrieve \"" << m_primaryVertexName << "\" from StoreGate");
-      return StatusCode::SUCCESS;
-    }
+  const xAOD::VertexContainer* vxContainer(0);
+  // const DataHandle<VxContainer> vxContainer;
+  bool foundPrimaryVtx = evtStore()->retrieve(vxContainer, m_primaryVertexName);
 
-    ATH_MSG_DEBUG("VxContainer \"" << m_primaryVertexName << "\" found with " << vxContainer->size() << " entries");
+  if (!foundPrimaryVtx) {
+    ATH_MSG_WARNING("Unable to retrieve \"" << m_primaryVertexName << "\" from StoreGate");
+    return StatusCode::SUCCESS;
+  }
 
-    npv = vxContainer->size();
-    m_global_nPrimVtx->Fill((float)npv);
+  ATH_MSG_DEBUG("VxContainer \"" << m_primaryVertexName << "\" found with " << vxContainer->size() << " entries");
 
-    if (vxContainer->size() < 2) {
-      ATH_MSG_WARNING("No primary vertices reconstructed");
-      return StatusCode::SUCCESS;
-    }
+  npv = vxContainer->size();
+  m_global_nPrimVtx->Fill((float)npv);
 
-    m_cutflow->Fill(2.);
+  if (vxContainer->size() < 2) {
+    ATH_MSG_WARNING("No primary vertices reconstructed");
+    return StatusCode::SUCCESS;
+  }
 
-    bool foundVxTypePriVtx = false;
-    m_priVtx = nullptr;
-    for (xAOD::VertexContainer::const_iterator vtx = vxContainer->begin(); vtx != vxContainer->end(); ++vtx) {
-      if ((*vtx)->vertexType() == xAOD::VxType::PriVtx && (*vtx)->numberDoF() > 0 ) {
-	m_priVtx = *vtx;
-	foundVxTypePriVtx = true;
-	break;
-      }
-    }
-    if ( ! foundVxTypePriVtx ) {
-      ATH_MSG_WARNING("xAOD::Vertex of type xAOD::VxType::PriVtx was not found in vertex container.");
-      return StatusCode::SUCCESS;
-    }
+  m_cutflow->Fill(2.);
 
-    // if (m_priVtx->vxTrackAtVertexAvailable()) {
-    if (m_priVtx->nTrackParticles()>0) {
-      //npv_trk = m_priVtx->vxTrackAtVertex().size()
-      npv_trk = m_priVtx->nTrackParticles();
-      ATH_MSG_DEBUG("PV tracks: " << npv_trk);
+  bool foundVxTypePriVtx = false;
+  m_priVtx = nullptr;
+  for (xAOD::VertexContainer::const_iterator vtx = vxContainer->begin(); vtx != vxContainer->end(); ++vtx) {
+    if ((*vtx)->vertexType() == xAOD::VxType::PriVtx && (*vtx)->numberDoF() > 0 ) {
+      m_priVtx = *vtx;
+      foundVxTypePriVtx = true;
+      break;
     }
+  }
+  if ( ! foundVxTypePriVtx ) {
+    ATH_MSG_WARNING("xAOD::Vertex of type xAOD::VxType::PriVtx was not found in vertex container.");
+    return StatusCode::SUCCESS;
+  }
 
-    xpv = m_priVtx->x();
-    ypv = m_priVtx->y();
-    zpv = m_priVtx->z();
-
+  // if (m_priVtx->vxTrackAtVertexAvailable()) {
+  if (m_priVtx->nTrackParticles()>0) {
+    //npv_trk = m_priVtx->vxTrackAtVertex().size()
+    npv_trk = m_priVtx->nTrackParticles();
+    ATH_MSG_DEBUG("PV tracks: " << npv_trk);
+  }
 
+  xpv = m_priVtx->x();
+  ypv = m_priVtx->y();
+  zpv = m_priVtx->z();
 
-    ATH_MSG_DEBUG("primary vertex: x = " << xpv << ", y = " << ypv << ", z = " << zpv);
+  ATH_MSG_DEBUG("primary vertex: x = " << xpv << ", y = " << ypv << ", z = " << zpv);
 
-    if (xpv == 0 && ypv == 0 && zpv == 0)
-      ATH_MSG_WARNING("Primary Vertex is (0,0,0)");
+  if (xpv == 0 && ypv == 0 && zpv == 0)
+    ATH_MSG_WARNING("Primary Vertex is (0,0,0)");
     
-    m_global_xPrimVtx->Fill(xpv);
-    m_global_yPrimVtx->Fill(ypv);
-    m_global_zPrimVtx->Fill(zpv);
-    m_priVtx_trks->Fill(npv_trk);
-
+  m_global_xPrimVtx->Fill(xpv);
+  m_global_yPrimVtx->Fill(ypv);
+  m_global_zPrimVtx->Fill(zpv);
+  m_priVtx_trks->Fill(npv_trk);
 
-    // check first PV > 4 tracks, if not, fail
-    if ( npv_trk <  m_pri_vtx_trk_min_cut )
-        return StatusCode::SUCCESS;
+  // check first PV > 4 tracks, if not, fail
+  if ( npv_trk <  m_pri_vtx_trk_min_cut )
+    return StatusCode::SUCCESS;
 
-    m_cutflow->Fill(3.);
+  m_cutflow->Fill(3.);
 
-//     double vtxChiSq = primaryRecVertex.fitQuality().chiSquared();
-//     int    vtxNDoF  = primaryRecVertex.fitQuality().numberDoF();
+  //     double vtxChiSq = primaryRecVertex.fitQuality().chiSquared();
+  //     int    vtxNDoF  = primaryRecVertex.fitQuality().numberDoF();
 
-//     double vtxProb  = vtxChiSq / vtxNDoF;
+  //     double vtxProb  = vtxChiSq / vtxNDoF;
 
-    /* Fill Jet-based histograms */
-    fillJetHistograms();
+  if (m_use_trigdectool && m_trigDecTool != 0) { // only require trigger if m_use_trigdectool is true (will be false eg for express stream) and trigDecTool is ok
+    // Require emu tigger to have unbiased sample of jets (and larger fraction of b-jets since many of these are ttbar events)
+    if (!m_trigDecTool->isPassed(m_ElectronTrigger_2016) && !m_trigDecTool->isPassed(m_MuonTrigger_2016) && // 2016 menu
+	!m_trigDecTool->isPassed(m_ElectronTrigger_2017) && !m_trigDecTool->isPassed(m_MuonTrigger_2017)) // 2017 menu
+      return StatusCode::SUCCESS;
+  }
+  
+  m_cutflow->Fill(4.);
+  
+  /* Fill Jet-based histograms */
+  fillJetHistograms();
 
-    ///////////////////////////////
-    //* TrackParticle container *//
-    ///////////////////////////////
+  ///////////////////////////////
+  //* TrackParticle container *//
+  ///////////////////////////////
     
     
-    const DataHandle<xAOD::TrackParticleContainer> trackParticles;
-    bool foundTrackPartColl = retrieveCollection(m_storeGate, trackParticles, m_trackParticleName);
+  const DataHandle<xAOD::TrackParticleContainer> trackParticles;
+  bool foundTrackPartColl = retrieveCollection(m_storeGate, trackParticles, m_trackParticleName);
 
-    if (!foundTrackPartColl)  {
+  if (!foundTrackPartColl)  {
 
-      ATH_MSG_WARNING("Unable to retrieve \"" << m_trackParticleName << "\" from StoreGate");
+    ATH_MSG_WARNING("Unable to retrieve \"" << m_trackParticleName << "\" from StoreGate");
 
-        return StatusCode::SUCCESS;
-
-    }
-
-    ATH_MSG_DEBUG("TrackParticleContainer \"" << m_trackParticleName << "\" found with " << trackParticles->size() << " entries");
+    return StatusCode::SUCCESS;
 
-    xAOD::TrackParticleContainer::const_iterator trackParticleItr = trackParticles->begin();
-    xAOD::TrackParticleContainer::const_iterator trackParticleEnd = trackParticles->end();
+  }
 
-    // New for Release 19: summary information is filled by reference, with a boolean Pass/Fail check...
+  ATH_MSG_DEBUG("TrackParticleContainer \"" << m_trackParticleName << "\" found with " << trackParticles->size() << " entries");
 
-    uint8_t nPixHits    = 0;
-    uint8_t nSCTHits    = 0;
-    uint8_t nSiHits     = 0;
-    uint8_t nBLayerHits = 0;
-    uint8_t nTRTHits    = 0;
+  xAOD::TrackParticleContainer::const_iterator trackParticleItr = trackParticles->begin();
+  xAOD::TrackParticleContainer::const_iterator trackParticleEnd = trackParticles->end();
 
-    for ( ; trackParticleItr != trackParticleEnd; trackParticleItr++) { 
+  // New for Release 19: summary information is filled by reference, with a boolean Pass/Fail check...
 
-	if ((*trackParticleItr)->summaryValue(nBLayerHits, xAOD::numberOfBLayerHits)) { m_global_BLayerHits->Fill((float) nBLayerHits); }
-	if ((*trackParticleItr)->summaryValue(nPixHits, xAOD::numberOfPixelHits))     { m_global_PixelHits->Fill((float) nPixHits); }
-	if ((*trackParticleItr)->summaryValue(nSCTHits, xAOD::numberOfSCTHits))       { m_global_SCTHits->Fill((float) nSCTHits); }
-	if ((*trackParticleItr)->summaryValue(nTRTHits, xAOD::numberOfTRTHits))       { m_global_TRTHits->Fill((float) nTRTHits); }
+  uint8_t nPixHits    = 0;
+  uint8_t nSCTHits    = 0;
+  uint8_t nSiHits     = 0;
+  uint8_t nBLayerHits = 0; // IBL hits in Run-2, old b-layer in Run-1
+  uint8_t nTRTHits    = 0;
 
-	// too complicated to set up a check at this point... thank you framework!
-	nSiHits = nPixHits + nSCTHits;
-        m_global_SiHits->Fill((float)nSiHits);
-	nSiHits = 0; // clean up value for next round...
-    }
+  for ( ; trackParticleItr != trackParticleEnd; trackParticleItr++) { 
+      
+    if ((*trackParticleItr)->summaryValue(nBLayerHits, xAOD::numberOfBLayerHits)) { m_global_BLayerHits->Fill((float) nBLayerHits); } // IBL hits in Run-2, old b-layer in Run-1
+    if ((*trackParticleItr)->summaryValue(nPixHits, xAOD::numberOfPixelHits))     { m_global_PixelHits->Fill((float) nPixHits); }
+    if ((*trackParticleItr)->summaryValue(nSCTHits, xAOD::numberOfSCTHits))       { m_global_SCTHits->Fill((float) nSCTHits); }
+    if ((*trackParticleItr)->summaryValue(nTRTHits, xAOD::numberOfTRTHits))       { m_global_TRTHits->Fill((float) nTRTHits); }
+      
+    // too complicated to set up a check at this point... thank you framework!
+    nSiHits = nPixHits + nSCTHits;
+    m_global_SiHits->Fill((float)nSiHits);
+    nSiHits = 0; // clean up value for next round...
+  }
 
-    m_trackParticle_n->Fill((*trackParticles).size());	    
+  m_trackParticle_n->Fill((*trackParticles).size());	    
 
-    ATH_MSG_DEBUG("end of fillHistograms()");
+  ATH_MSG_DEBUG("end of fillHistograms()");
 
-    return StatusCode::SUCCESS;
+  return StatusCode::SUCCESS;
 }
 
 
-bool JetTagMonitoring::applyKinematicCuts(const xAOD::Jet *jet) {
-
-    ATH_MSG_DEBUG("applyKinematicCuts()");
-
-    //* get jet basic kinematics *//
-    m_jet_eta->Fill(jet->eta());
-    m_jet_phi->Fill(jet->phi());
-    m_jet_et->Fill(jet->pt());
+bool JetTagMonitoring::passKinematicCuts(const xAOD::Jet *jet) {
+  
+  ATH_MSG_DEBUG("passKinematicCuts()");
+  
+  //* get jet basic kinematics *//
+  m_jet_eta->Fill(jet->eta());
+  m_jet_phi->Fill(jet->phi());
+  m_jet_et->Fill(jet->pt() / CLHEP::GeV);
 
-    ATH_MSG_DEBUG("Jet kinematics: eta = " << jet->eta() << ", phi= " << jet->phi() << ", pT= " << jet->pt());
+  ATH_MSG_DEBUG("Jet kinematics: eta = " << jet->eta() << ", phi= " << jet->phi() << ", pT= " << jet->pt() / CLHEP::GeV);
 
 
-    // kinematic cuts defined as properties
-    if ( jet->pt() < m_jet_pt_cut || fabs(jet->eta()) > m_jet_eta_cut )
-        return false;
+  // kinematic cuts defined as properties
+  if ( jet->pt()  / CLHEP::GeV < m_jet_pt_cut || fabs(jet->eta()) > m_jet_eta_cut )
+    return false;
 
-    return true;
+  return true;
 }
 
 
-JetTagMonitoring::Jet_t JetTagMonitoring::applyQualityCuts(const xAOD::Jet *jet) {
+JetTagMonitoring::Jet_t JetTagMonitoring::getTaggabilityLabel(const xAOD::Jet *jet) {
+  
+  // goodJet    = jet with at least one associated track passing track selection
+  // suspectJet = as good jet but
+  // badJet     = not goodJet (i.e. no associated track passing track selection)
 
-  ATH_MSG_DEBUG("in applyQualityCuts()");
+  ATH_MSG_DEBUG("in applyTaggabilityCuts()");
 
   /* if TrackSelector not used, return true */
   if ( ! m_use_trackselector ) {
@@ -737,7 +809,7 @@ JetTagMonitoring::Jet_t JetTagMonitoring::applyQualityCuts(const xAOD::Jet *jet)
   }
 
   ATH_MSG_DEBUG("Running track selection");
-
+  
   unsigned int nTrk = 0;
 
   // std::vector<InDet::TrackStateOnBLayerInfo> bInfo;
@@ -772,10 +844,10 @@ JetTagMonitoring::Jet_t JetTagMonitoring::applyQualityCuts(const xAOD::Jet *jet)
       nTrk++;
 
     } else {
-      const std::bitset<17> failedCuts = m_trackSelectorTool->currentTrackpassedCuts();
-      fillBadTrackBits(failedCuts, trk_eta, trk_phi);
+      const std::bitset<17> passedCuts = m_trackSelectorTool->currentTrackpassedCuts(); // SARA: changed the variable from "failedCuts" to "passedCuts" since it actually contains a bitmap of passedCuts (to avoid future confusion)
+      fillBadTrackBits(passedCuts, trk_eta, trk_phi);
 
-      if ( !failedCuts[deadBLayer] || !failedCuts[nHitBLayer] || !failedCuts[nHitSi] )
+      if ( !passedCuts[deadBLayer] || !passedCuts[nHitBLayer] || !passedCuts[nHitSi] ) // if at least one associated track does not pass the deadBLayer, nHitBLayer or nSiHit requirement the jet will be labeled suspectJet
 	isSuspectJet = true;
     }
 
@@ -784,6 +856,7 @@ JetTagMonitoring::Jet_t JetTagMonitoring::applyQualityCuts(const xAOD::Jet *jet)
 
   if ( nTrk < m_trk_n ) return badJet;
 
+  m_track_selector_eff->Fill(jet->eta(), jet->phi(), 1.); // added by SARA
   m_track_selector_eff_LS->Fill(jet->eta(), jet->phi(), 1.);
 
   if ( isSuspectJet ) return suspectJet;
@@ -792,9 +865,102 @@ JetTagMonitoring::Jet_t JetTagMonitoring::applyQualityCuts(const xAOD::Jet *jet)
 
 }
   
+bool JetTagMonitoring::isTopEvent() { // added by SARA for 2017 data taking
+  
+  // DO TOP SELECTION
+  // == 1 isolated electron with pT > m_ElectronPtCut (normally 25 GeV)
+  // == 1 isolated muon with pT > m_MuonPtCut (normally 25 GeV)
+  // electron and muon of opposite charge
+  
+  const DataHandle<xAOD::ElectronContainer> electrons;
+  bool foundElectronColl = retrieveCollection(m_storeGate, electrons, m_electronName);
 
-void JetTagMonitoring::fillEffHist(TH1 * h_passed, TH1 * h_all, TH1F_LW * effHist) {
+  if (!foundElectronColl) {
+    ATH_MSG_WARNING("Unable to retrieve \"" << m_electronName << "\" from StoreGate");
+    return false;
+  }
+  
+  ATH_MSG_DEBUG("ElectronContainer \"" << m_electronName << "\" found with " << electrons->size() << " entries");
+  
+  xAOD::ElectronContainer::const_iterator electronItr = electrons->begin();
+  xAOD::ElectronContainer::const_iterator electronEnd = electrons->end();
+  xAOD::ElectronContainer::const_iterator isoElectronItr = electrons->end();
+  
+  const DataHandle<xAOD::MuonContainer> muons;
+  bool foundMuonColl = retrieveCollection(m_storeGate, muons, m_muonName);
+  
+  if (!foundMuonColl) {
+    ATH_MSG_WARNING("Unable to retrieve \"" << m_muonName << "\" from StoreGate");
+    return false;
+  }
+  
+  ATH_MSG_DEBUG("MuonContainer \"" << m_muonName << "\" found with " << muons->size() << " entries");
+  
+  xAOD::MuonContainer::const_iterator muonItr = muons->begin();
+  xAOD::MuonContainer::const_iterator muonEnd = muons->end();
+  xAOD::MuonContainer::const_iterator isoMuonItr = muons->end();
+
+  // loop over electron container
+  int n_isoElectrons = 0;
+  for ( ; electronItr != electronEnd; electronItr++) {
+    //select electrons which passed author and pT cut
+    if (!(*electronItr)->author(xAOD::EgammaParameters::AuthorElectron)) continue; 
+    if ((*electronItr) -> pt() / CLHEP::GeV < m_ElectronPtCut) continue;
+    bool inAcceptance = (TMath::Abs((*electronItr) -> eta()) > m_ElectronEtaCrackHighCut || TMath::Abs((*electronItr) -> eta()) < m_ElectronEtaCrackLowCut) 
+      && TMath::Abs((*electronItr) -> eta()) < m_ElectronEtaCut;
+    if (!inAcceptance) continue;
+    // select mediumLH electron
+    bool lhmedium = false;
+    (*electronItr)->passSelection(lhmedium, "LHMedium");
+    if (!lhmedium) continue;
+    //if ( electron -> isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON) ) oq = true;
+    float topoetcone20_value = -999.;
+    float ptvarcone20_value = -999.;
+    (*electronItr)-> isolationValue(topoetcone20_value, xAOD::Iso::topoetcone20);
+    (*electronItr)-> isolationValue(ptvarcone20_value, xAOD::Iso::ptvarcone20);
+    if (topoetcone20_value/(*electronItr)->pt() > m_ElectronTopoEtCone20Cut) continue;
+    if (ptvarcone20_value/(*electronItr)->pt() > m_ElectronPtVarCone20Cut) continue;
+    isoElectronItr = electronItr;
+    ++n_isoElectrons;
+  }
+  
+  ATH_MSG_DEBUG("Number of isolated electrons is \"" << n_isoElectrons);
+  m_n_iso_el->Fill(n_isoElectrons);
+
+  // loop over muon container  
+  int n_isoMuons = 0;
+  for ( ; muonItr != muonEnd; muonItr++) {
+    //select muons which passed pT cut
+    if ((*muonItr) -> pt() / CLHEP::GeV < m_MuonPtCut) continue;
+    bool inAcceptance = TMath::Abs((*muonItr) -> eta()) < m_MuonEtaCut;
+    if (!inAcceptance) continue;
+    // medium muons
+    if ((*muonItr)->quality() != 1) continue; // 1 = medium muon
+    float topoetcone20_value = -999.;
+    float ptvarcone20_value = -999.;
+    (*muonItr)-> isolation(topoetcone20_value, xAOD::Iso::topoetcone20);
+    (*muonItr)-> isolation(ptvarcone20_value, xAOD::Iso::ptvarcone20);
+    if (topoetcone20_value/(*muonItr)->pt() > m_MuonTopoEtCone20Cut) continue;
+    if (ptvarcone20_value/(*muonItr)->pt() > m_MuonPtVarCone20Cut) continue;
+    isoMuonItr = muonItr;
+    ++n_isoMuons;
+  }
+  
+  ATH_MSG_DEBUG("Number of isolated muons is \"" << n_isoMuons);
+  m_n_iso_mu->Fill(n_isoMuons);
+  
+  // trying to understand what is going wrong
+  // require == 1 electron, == 1 muon and opposite charge
+  if (n_isoElectrons != 1) return false;
+  if (n_isoMuons != 1) return false;
+  if ((*isoElectronItr)->charge()*(*isoMuonItr)->charge() != -1.) return false;
 
+  return true;
+
+}
+
+void JetTagMonitoring::fillEffHist(TH1 * h_passed, TH1 * h_all, TH1F_LW * effHist) {
+  
   if ( TEfficiency::CheckConsistency(*h_passed, *h_all) ) {
 
     TEfficiency * eff = new TEfficiency(*h_passed, *h_all);
@@ -811,423 +977,478 @@ void JetTagMonitoring::fillEffHist(TH1 * h_passed, TH1 * h_all, TH1F_LW * effHis
   
 }
 
-
 StatusCode JetTagMonitoring::procHistograms() {
+  
+  ATH_MSG_DEBUG("in procHistograms()");
 
-    ATH_MSG_DEBUG("in procHistograms()");
-
-    /* Finalize the histograms */
-    if ( m_histogramsCreated && (endOfRunFlag() || AthenaMonManager::environment() == AthenaMonManager::online) ) {
-      
-      m_track_selector_eff->getROOTHist()->Divide(m_track_selector_all->getROOTHist(),m_tracks_all_2D->getROOTHist());
+  /* Finalize the histograms */
+  if ( m_histogramsCreated && (endOfRunFlag() || AthenaMonManager::environment() == AthenaMonManager::online) ) {
       
-      {
-	TH1 * qualityJets_sum85OP = m_tag_mv2c20_w_phi_sum85OP->getROOTHistBase();     
-	TH1 * qualityJets_sum77OP = m_tag_mv2c20_w_phi_sum77OP->getROOTHistBase();     
-	TH1 * qualityJets_sum70OP = m_tag_mv2c20_w_phi_sum70OP->getROOTHistBase();     
-	TH1 * qualityJets_sum50OP = m_tag_mv2c20_w_phi_sum50OP->getROOTHistBase();     
-	TH1 * qualityJets_sumAll  = m_tag_mv2c20_w_phi_sumAll->getROOTHistBase();     
-
-	fillEffHist(qualityJets_sum85OP, qualityJets_sumAll, m_tag_mv2c20_w_phi_frac85OP);
-	fillEffHist(qualityJets_sum77OP, qualityJets_sumAll, m_tag_mv2c20_w_phi_frac77OP);
-	fillEffHist(qualityJets_sum70OP, qualityJets_sumAll, m_tag_mv2c20_w_phi_frac70OP);
-	fillEffHist(qualityJets_sum50OP, qualityJets_sumAll, m_tag_mv2c20_w_phi_frac50OP);
-      }
+    //m_track_selector_eff->getROOTHist()->Divide(m_track_selector_all->getROOTHist(),m_tracks_all_2D->getROOTHist()); // removed by SARA
+    m_track_selector_eff->getROOTHist()->Divide(m_track_selector_all->getROOTHist()); // added by SARA
+    m_track_selector_eff_LS->getROOTHist()->Divide(m_track_selector_all_LS->getROOTHist()); // added by SARA
+
+    m_jet_pt_top_eff->getROOTHist()->Divide(m_jet_pt_top_tagged->getROOTHist(),m_jet_pt_top->getROOTHist()); // added by SARA
+    m_jet_top_eff->getROOTHist()->Divide(m_jet_top_tagged->getROOTHist(),m_jet_top->getROOTHist()); // added by SARA
+     
+    {
+      TH1 * qualityJets_sum85OP = m_tag_mv_w_phi_sum85OP->getROOTHistBase();     
+      TH1 * qualityJets_sum77OP = m_tag_mv_w_phi_sum77OP->getROOTHistBase();     
+      TH1 * qualityJets_sum70OP = m_tag_mv_w_phi_sum70OP->getROOTHistBase();     
+      TH1 * qualityJets_sum60OP = m_tag_mv_w_phi_sum60OP->getROOTHistBase();     
+      TH1 * qualityJets_sumAll  = m_tag_mv_w_phi_sumAll->getROOTHistBase();     
+
+      fillEffHist(qualityJets_sum85OP, qualityJets_sumAll, m_tag_mv_w_phi_frac85OP);
+      fillEffHist(qualityJets_sum77OP, qualityJets_sumAll, m_tag_mv_w_phi_frac77OP);
+      fillEffHist(qualityJets_sum70OP, qualityJets_sumAll, m_tag_mv_w_phi_frac70OP);
+      fillEffHist(qualityJets_sum60OP, qualityJets_sumAll, m_tag_mv_w_phi_frac60OP);
+    }
       
-      {
-	TH1 * qualityJets_sum85OP = m_tag_mv2c20_w_eta_sum85OP->getROOTHistBase();     
-	TH1 * qualityJets_sum77OP = m_tag_mv2c20_w_eta_sum77OP->getROOTHistBase();     
-	TH1 * qualityJets_sum70OP = m_tag_mv2c20_w_eta_sum70OP->getROOTHistBase();     
-	TH1 * qualityJets_sum50OP = m_tag_mv2c20_w_eta_sum50OP->getROOTHistBase();     
-	TH1 * qualityJets_sumAll  = m_tag_mv2c20_w_eta_sumAll->getROOTHistBase();     
+    {
+      TH1 * qualityJets_sum85OP = m_tag_mv_w_eta_sum85OP->getROOTHistBase();     
+      TH1 * qualityJets_sum77OP = m_tag_mv_w_eta_sum77OP->getROOTHistBase();     
+      TH1 * qualityJets_sum70OP = m_tag_mv_w_eta_sum70OP->getROOTHistBase();     
+      TH1 * qualityJets_sum60OP = m_tag_mv_w_eta_sum60OP->getROOTHistBase();     
+      TH1 * qualityJets_sumAll  = m_tag_mv_w_eta_sumAll->getROOTHistBase();     
 	
-	fillEffHist(qualityJets_sum85OP, qualityJets_sumAll, m_tag_mv2c20_w_eta_frac85OP);
-	fillEffHist(qualityJets_sum77OP, qualityJets_sumAll, m_tag_mv2c20_w_eta_frac77OP);
-	fillEffHist(qualityJets_sum70OP, qualityJets_sumAll, m_tag_mv2c20_w_eta_frac70OP);
-	fillEffHist(qualityJets_sum50OP, qualityJets_sumAll, m_tag_mv2c20_w_eta_frac50OP);
-      }
+      fillEffHist(qualityJets_sum85OP, qualityJets_sumAll, m_tag_mv_w_eta_frac85OP);
+      fillEffHist(qualityJets_sum77OP, qualityJets_sumAll, m_tag_mv_w_eta_frac77OP);
+      fillEffHist(qualityJets_sum70OP, qualityJets_sumAll, m_tag_mv_w_eta_frac70OP);
+      fillEffHist(qualityJets_sum60OP, qualityJets_sumAll, m_tag_mv_w_eta_frac60OP);
+    }
 
-      {
-	TH1 * suspectJets_sum85OP = m_tag_mv2c20_w_sj_phi_sum85OP->getROOTHistBase();     
-	TH1 * suspectJets_sum77OP = m_tag_mv2c20_w_sj_phi_sum77OP->getROOTHistBase();     
-	TH1 * suspectJets_sum70OP = m_tag_mv2c20_w_sj_phi_sum70OP->getROOTHistBase();     
-	TH1 * suspectJets_sum50OP = m_tag_mv2c20_w_sj_phi_sum50OP->getROOTHistBase();     
-	TH1 * suspectJets_sumAll  = m_tag_mv2c20_w_sj_phi_sumAll->getROOTHistBase();     
+    {
+      TH1 * suspectJets_sum85OP = m_tag_mv_w_sj_phi_sum85OP->getROOTHistBase();     
+      TH1 * suspectJets_sum77OP = m_tag_mv_w_sj_phi_sum77OP->getROOTHistBase();     
+      TH1 * suspectJets_sum70OP = m_tag_mv_w_sj_phi_sum70OP->getROOTHistBase();     
+      TH1 * suspectJets_sum60OP = m_tag_mv_w_sj_phi_sum60OP->getROOTHistBase();     
+      TH1 * suspectJets_sumAll  = m_tag_mv_w_sj_phi_sumAll->getROOTHistBase();     
 	
-	fillEffHist(suspectJets_sum85OP, suspectJets_sumAll, m_tag_mv2c20_w_sj_phi_frac85OP);
-	fillEffHist(suspectJets_sum77OP, suspectJets_sumAll, m_tag_mv2c20_w_sj_phi_frac77OP);
-	fillEffHist(suspectJets_sum70OP, suspectJets_sumAll, m_tag_mv2c20_w_sj_phi_frac70OP);
-	fillEffHist(suspectJets_sum50OP, suspectJets_sumAll, m_tag_mv2c20_w_sj_phi_frac50OP);
-      }
+      fillEffHist(suspectJets_sum85OP, suspectJets_sumAll, m_tag_mv_w_sj_phi_frac85OP);
+      fillEffHist(suspectJets_sum77OP, suspectJets_sumAll, m_tag_mv_w_sj_phi_frac77OP);
+      fillEffHist(suspectJets_sum70OP, suspectJets_sumAll, m_tag_mv_w_sj_phi_frac70OP);
+      fillEffHist(suspectJets_sum60OP, suspectJets_sumAll, m_tag_mv_w_sj_phi_frac60OP);
+    }
 
-      {
-	TH1 * suspectJets_sum85OP = m_tag_mv2c20_w_sj_eta_sum85OP->getROOTHistBase();     
-	TH1 * suspectJets_sum77OP = m_tag_mv2c20_w_sj_eta_sum77OP->getROOTHistBase();     
-	TH1 * suspectJets_sum70OP = m_tag_mv2c20_w_sj_eta_sum70OP->getROOTHistBase();     
-	TH1 * suspectJets_sum50OP = m_tag_mv2c20_w_sj_eta_sum50OP->getROOTHistBase();     
-	TH1 * suspectJets_sumAll  = m_tag_mv2c20_w_sj_eta_sumAll->getROOTHistBase();     
+    {
+      TH1 * suspectJets_sum85OP = m_tag_mv_w_sj_eta_sum85OP->getROOTHistBase();     
+      TH1 * suspectJets_sum77OP = m_tag_mv_w_sj_eta_sum77OP->getROOTHistBase();     
+      TH1 * suspectJets_sum70OP = m_tag_mv_w_sj_eta_sum70OP->getROOTHistBase();     
+      TH1 * suspectJets_sum60OP = m_tag_mv_w_sj_eta_sum60OP->getROOTHistBase();     
+      TH1 * suspectJets_sumAll  = m_tag_mv_w_sj_eta_sumAll->getROOTHistBase();     
 	
-	fillEffHist(suspectJets_sum85OP, suspectJets_sumAll, m_tag_mv2c20_w_sj_eta_frac85OP);
-	fillEffHist(suspectJets_sum77OP, suspectJets_sumAll, m_tag_mv2c20_w_sj_eta_frac77OP);
-	fillEffHist(suspectJets_sum70OP, suspectJets_sumAll, m_tag_mv2c20_w_sj_eta_frac70OP);
-	fillEffHist(suspectJets_sum50OP, suspectJets_sumAll, m_tag_mv2c20_w_sj_eta_frac50OP);
-      }
-
+      fillEffHist(suspectJets_sum85OP, suspectJets_sumAll, m_tag_mv_w_sj_eta_frac85OP);
+      fillEffHist(suspectJets_sum77OP, suspectJets_sumAll, m_tag_mv_w_sj_eta_frac77OP);
+      fillEffHist(suspectJets_sum70OP, suspectJets_sumAll, m_tag_mv_w_sj_eta_frac70OP);
+      fillEffHist(suspectJets_sum60OP, suspectJets_sumAll, m_tag_mv_w_sj_eta_frac60OP);
     }
-    ATH_MSG_DEBUG("Exiting from procHistograms()");
-    return StatusCode::SUCCESS;
+
+  }
+  ATH_MSG_DEBUG("Exiting from procHistograms()");
+  return StatusCode::SUCCESS;
 }
 
 
 void JetTagMonitoring::fillJetHistograms() {
+  
+  ATH_MSG_DEBUG("in fillJetHistograms()");
+  
+  /////////////////////
+  //* Jet container *//
+  /////////////////////
+  
+  const DataHandle<xAOD::JetContainer> jets;
+  bool foundJetColl = retrieveCollection(m_storeGate, jets, m_jetName);
+  
+  if (!foundJetColl) {
+    ATH_MSG_WARNING("Unable to retrieve \"" << m_jetName << "\" from StoreGate");
+    return;
+  }
+  
+  ATH_MSG_DEBUG("JetContainer \"" << m_jetName << "\" found with " << jets->size() << " entries");
+  
+  xAOD::JetContainer::const_iterator jetItr = jets->begin();
+  xAOD::JetContainer::const_iterator jetEnd = jets->end();
+  
+  // Do top selection
+  bool is_top_event = isTopEvent(); // added by SARA
 
-    ATH_MSG_DEBUG("in fillJetHistograms()");
-
-    /////////////////////
-    //* Jet container *//
-    /////////////////////
-
-    const DataHandle<xAOD::JetContainer> jets;
-    bool foundJetColl = retrieveCollection(m_storeGate, jets, m_jetName);
-
-    if (!foundJetColl) {
-      ATH_MSG_WARNING("Unable to retrieve \"" << m_jetName << "\" from StoreGate");
-      return;
-    }
-
-    ATH_MSG_DEBUG("JetContainer \"" << m_jetName << "\" found with " << jets->size() << " entries");
-
-    xAOD::JetContainer::const_iterator jetItr = jets->begin();
-    xAOD::JetContainer::const_iterator jetEnd = jets->end();
-
-    m_jet_n->Fill((*jets).size());
-
-    for ( ; jetItr != jetEnd; jetItr++) {
-
-        m_cutflow_jet->Fill(0.);
-
-        m_jet_2D_all->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
-
-	if( !isGoodJet(*jetItr) ) continue;
-	
-	m_cutflow_jet->Fill(1.);
-
-        m_jet_2D_good->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
-
-        if ( !applyKinematicCuts(*jetItr) ) continue;
-        
-
-        m_jet_2D_kinematic->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
-        m_jet_2D_kinematic_LS->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
-
-        m_cutflow_jet->Fill(2.);
-
-        //* get information about Track Constituents *//
-        fillTrackInJetHistograms(*jetItr);
-
-	    
-	const xAOD::BTagging* btag =(*jetItr)->btagging();
-
-        if(!btag) continue; 
-
-	double sv1ip3d = btag->SV1plusIP3D_discriminant();
-        double mv2c10_tmp = 0;
-	btag->MVx_discriminant("MV2c10",mv2c10_tmp);
-	double mv2c20 = mv2c10_tmp;
-	
+  m_jet_n->Fill((*jets).size());
+  
+  int n_jets_kinematic = 0; // added by SARA
+  xAOD::JetContainer::const_iterator firstKinematicjetItr = jets->end(); // added by SARA
+  
+  // Loop over jets
+  for ( ; jetItr != jetEnd; jetItr++) {
     
-        /* fill the 2D SV1IP3D rate */
-        if ( sv1ip3d > m_sv1ip3d_weight_cut ) {
-            m_sv1ip3d_tag_pos_rate_2D->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
-        } else {
-            m_sv1ip3d_tag_neg_rate_2D->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
-        }
-
-        /* fill the 2D MV2c20 histos */
-        if ( mv2c20 > m_mv2c20_50_weight_cut ) m_mv2c20_tag_50_2D->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
-        if ( mv2c20 > m_mv2c20_70_weight_cut ) m_mv2c20_tag_70_2D->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
-        if ( mv2c20 > m_mv2c20_80_weight_cut ) m_mv2c20_tag_80_2D->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);	
-        
-        ATH_MSG_DEBUG("btagging weights: " << "SV1IP3D: " << sv1ip3d << ", MV2c20: "  << mv2c20);
+    // All jets
+    
+    m_cutflow_jet->Fill(0.); // all jets
+    
+    m_jet_2D_all->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
+    
+    if( !passJetQualityCuts(*jetItr) ) continue;
+    
+    // Jets passing quality cuts
+    
+    m_cutflow_jet->Fill(1.); // good jets (standard jet cleaning cuts)
+    
+    m_jet_2D_good->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
 
-        Jet_t quality = applyQualityCuts(*jetItr);
-	
-        if ( m_do_cuts && quality == badJet ) continue;
+    if ( !passKinematicCuts(*jetItr) ) continue; 
 
-        m_cutflow_jet->Fill(3.);
-	
-        if ( quality == goodJet )
-           fillGoodJetHistos(*jetItr);
+    // Jets passing kinemtic cuts
 
-        else if ( quality == suspectJet )
-           fillSuspectJetHistos(*jetItr);
+    m_cutflow_jet->Fill(2.); // jets passing kinematic cuts
+    if (n_jets_kinematic == 0) firstKinematicjetItr = jetItr; // added by SARA - save this iterator since I will need to fill top histograms also for this 1st one if I find a 2nd kinematic jet later
+    ++n_jets_kinematic; // added by SARA
 
-        else if ( quality == badJet )
-           fillBadJetHistos(*jetItr);
+    m_jet_2D_kinematic->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
+    m_jet_2D_kinematic_LS->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
 
-        //* MORE PLOTS! *//
-        fillDetailedHistograms(*jetItr, quality);
+    fillTrackInJetHistograms(*jetItr); // fill histograms with properties of associated tracks
 
+    if (is_top_event && n_jets_kinematic >= 2) { // added by SARA - I have at least 2 kinematic jets, so want to fill top histograms
+      m_jet_top->Fill(0., 1.); // added by SARA
+      m_jet_pt_top->Fill((*jetItr)->pt() / CLHEP::GeV, 1.); // added by SARA
+      if (n_jets_kinematic == 2) { // added by SARA - now I know I have (at least) two kinematic jets, so I want to fill also for 1st kinematic jet
+	m_jet_top->Fill(0., 1.); // added by SARA
+	m_jet_pt_top->Fill((*firstKinematicjetItr)->pt() / CLHEP::GeV, 1.); // added by SARA
+      }
     }
 
-    ATH_MSG_DEBUG("... done fillJetHistograms()");
-    return;
+    fillBtagHistograms(*jetItr, false); // added by SARA; fill non-top histograms with b-tagging information (tag weights etc)
+    if (is_top_event && n_jets_kinematic >= 2) { // added by SARA - I have at least 2 kinematic jets, so want to fill top histograms
+      fillBtagHistograms(*jetItr, true); // added by SARA; fill histograms with b-tagging information (tag weights etc)
+      if (n_jets_kinematic == 2) { // added by SARA - now I know I have (at least) two kinematic jets, so I want to fill also for 1st kinematic jet
+	fillBtagHistograms(*firstKinematicjetItr, true); // added by SARA; fill histograms with b-tagging information (tag weights etc)
+      }
+    }
+    
+    Jet_t taggabilityLabel = getTaggabilityLabel(*jetItr); // check if jet is taggable (defined as goodJet or suspectJet)
+    
+    //if ( m_do_cuts && quality == badJet ) continue; // removed by SARA (otherwise we never fill the badJet histograms below)
+    
+    if ( taggabilityLabel == goodJet || taggabilityLabel == suspectJet ) {
+      m_cutflow_jet->Fill(3.); // added by SARA
+      fillDetailedHistograms(*jetItr, taggabilityLabel); // SARA: added if statement to make sure we don't fill the detailed histograms for bad jets (since I removed the continue statement above)	
+    }
+    
+    if ( taggabilityLabel == goodJet ) {
+      m_cutflow_jet->Fill(4.); // added by SARA
+      m_jet_2D_quality->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
+      fillGoodJetHistos(*jetItr);
+    }
+    else if ( taggabilityLabel == suspectJet ) {
+      m_cutflow_jet->Fill(5.); // added by SARA
+      m_jet_2D_suspect->Fill((*jetItr)->eta(), (*jetItr)->phi(), 1.);
+      fillSuspectJetHistos(*jetItr);
+    }
+    else if ( taggabilityLabel == badJet ) {
+      fillBadJetHistos(*jetItr);
+    }
+    
+  }
+  
+  ATH_MSG_DEBUG("... done fillJetHistograms()");
+  return;
 }
 
 void JetTagMonitoring::fillTrackInJetHistograms(const xAOD::Jet *jet) {
+  
+  ATH_MSG_DEBUG("in fillInJetTrackHistograms()");
+  
+  //* get information about Track Constituents *//
+  int nTrkInJet = 0;
 
-    ATH_MSG_DEBUG("in fillInJetTrackHistograms()");
+  std::vector<const xAOD::IParticle*> trackVector = jet->getAssociatedObjects<xAOD::IParticle>(xAOD::JetAttribute::GhostTrack);
 
-    //* get information about Track Constituents *//
-    int nTrkInJet = 0;
+  std::vector<const xAOD::IParticle*>::const_iterator trkItr;
 
-    std::vector<const xAOD::IParticle*> trackVector = jet->getAssociatedObjects<xAOD::IParticle>(xAOD::JetAttribute::GhostTrack);
+  nTrkInJet = trackVector.size();
+  ATH_MSG_DEBUG("examining " << nTrkInJet << " tracks.");
 
-    std::vector<const xAOD::IParticle*>::const_iterator trkItr;
+  // loop over tracks in a jet // 
+  for ( trkItr = trackVector.begin(); trkItr != trackVector.end() ; trkItr++ ) {
 
-    nTrkInJet = trackVector.size();
-    ATH_MSG_DEBUG("examining " << nTrkInJet << " tracks.");
+    const xAOD::TrackParticle* trackPart = dynamic_cast<const xAOD::TrackParticle*>(*trkItr);
+    if ( ! trackPart ) continue;
 
-    // loop over tracks in a jet // 
-    for ( trkItr = trackVector.begin(); trkItr != trackVector.end() ; trkItr++ ) {
+    uint8_t nBLayerHits = 0; // IBL hits in Run-2, old b-layer in Run-1
+    uint8_t nPixHits    = 0;
+    uint8_t nSCTHits    = 0;
 
-      const xAOD::TrackParticle* trackPart = dynamic_cast<const xAOD::TrackParticle*>(*trkItr);
-      if ( ! trackPart ) continue;
+    m_jet_tracks_pt->Fill(trackPart->pt() / CLHEP::GeV);
+    m_jet_tracks_eta->Fill(trackPart->eta());
+    m_jet_tracks_phi->Fill(trackPart->phi());
+    m_jet_tracks_d0->Fill(trackPart->d0());
+    m_jet_tracks_z0->Fill(trackPart->z0());
+    m_jet_tracks_d0_LS->Fill(trackPart->d0());
+    m_jet_tracks_z0_LS->Fill(trackPart->z0());
+
+    if (trackPart->summaryValue(nBLayerHits, xAOD::numberOfBLayerHits)) { m_jet_tracks_BLayerHits->Fill((float) nBLayerHits); } // IBL hits in Run-2, old b-layer in Run-1
+    if (trackPart->summaryValue(nPixHits, xAOD::numberOfPixelHits))     { m_jet_tracks_PixelHits->Fill((float)  nPixHits); }
+    if (trackPart->summaryValue(nSCTHits, xAOD::numberOfSCTHits))       { m_jet_tracks_SCTHits->Fill((float)    nSCTHits); }
+    
+  }
 
-      uint8_t nBLayerHits = 0;
-      uint8_t nPixHits    = 0;
-      uint8_t nSCTHits    = 0;
+  m_jet_tracks_n->Fill((float)nTrkInJet);
 
-      m_jet_tracks_pt->Fill(trackPart->pt()/1000.);
-      m_jet_tracks_eta->Fill(trackPart->eta());
-      m_jet_tracks_phi->Fill(trackPart->phi());
-      m_jet_tracks_d0->Fill(trackPart->d0());
-      m_jet_tracks_z0->Fill(trackPart->z0());
-      m_jet_tracks_d0_LS->Fill(trackPart->d0());
-      m_jet_tracks_z0_LS->Fill(trackPart->z0());
+  return;
+}
 
-      if (trackPart->summaryValue(nBLayerHits, xAOD::numberOfBLayerHits)) { m_jet_tracks_BLayerHits->Fill((float) nBLayerHits); }
-      if (trackPart->summaryValue(nPixHits, xAOD::numberOfPixelHits))     { m_jet_tracks_PixelHits->Fill((float)  nPixHits); }
-      if (trackPart->summaryValue(nSCTHits, xAOD::numberOfSCTHits))       { m_jet_tracks_SCTHits->Fill((float)    nSCTHits); }
-    
+void JetTagMonitoring::fillBtagHistograms(const xAOD::Jet *jet, bool fill_top_histos) { // added by SARA (just moved already existing code into this function for better readibility)
+  
+  const xAOD::BTagging* btag = jet->btagging();
+  
+  if (!btag) return; 
+  
+  double sv1ip3d = btag->SV1plusIP3D_discriminant();
+  double mv_tmp = 0;
+  btag->MVx_discriminant(m_mv_algorithmName,mv_tmp);
+  double mv = mv_tmp;
+  
+  ATH_MSG_DEBUG("btagging weights: " << "SV1IP3D: " << sv1ip3d << ", MV: "  << mv);
+  
+  if (fill_top_histos) { // added by SARA - fill top histograms
+    m_jet_mv_w_top->Fill(mv); // added by SARA
+    if (mv > m_mv_70_weight_cut) {
+      m_jet_top_tagged->Fill(0., 1.); // added by SARA
+      m_jet_pt_top_tagged->Fill(jet->pt() / CLHEP::GeV, 1.); // added by SARA
     }
-
-    m_jet_tracks_n->Fill((float)nTrkInJet);
-
-    return;
+  }
+  else { // added by SARA - fill non-top histograms
+    /* fill the 2D SV1IP3D rate */
+    if ( sv1ip3d > m_sv1ip3d_weight_cut ) {
+      m_sv1ip3d_tag_pos_rate_2D->Fill(jet->eta(), jet->phi(), 1.);
+    } 
+    else {
+      m_sv1ip3d_tag_neg_rate_2D->Fill(jet->eta(), jet->phi(), 1.);
+    }
+    
+    /* fill the 2D MV histos */
+    if ( mv > m_mv_60_weight_cut ) m_mv_tag_60_2D->Fill(jet->eta(), jet->phi(), 1.);
+    if ( mv > m_mv_70_weight_cut ) m_mv_tag_70_2D->Fill(jet->eta(), jet->phi(), 1.);
+    if ( mv > m_mv_77_weight_cut ) m_mv_tag_77_2D->Fill(jet->eta(), jet->phi(), 1.);	
+  }
+ 
+  return;
+  
 }
 
-void JetTagMonitoring::fillDetailedHistograms(const xAOD::Jet *jet, Jet_t quality) {
+void JetTagMonitoring::fillDetailedHistograms(const xAOD::Jet *jet, Jet_t taggabilityLabel) {
 
-    ATH_MSG_DEBUG("in fillDetailedHistograms()");
+  ATH_MSG_DEBUG("in fillDetailedHistograms()");
 
-    //* get detailed information *//
-    const xAOD::BTagging* btag = jet->btagging(); 
+  //* get detailed information *//
+  const xAOD::BTagging* btag = jet->btagging(); 
 
 
-    //* detailed information for impact parameter-based informations *//
-    unsigned int ntrk  = btag->nIP3D_TrackParticles();                  // number of tracks used for tagging in the jet
-    double pb          = btag->IP3D_pb();                               // b likelihood
-    double pu          = btag->IP3D_pu();                               // u likelihood
-    double pc          = btag->IP3D_pc();                               // c likelihood
-    double llr         = btag->IP3D_loglikelihoodratio();               // log likelihood ratio 
+  //* detailed information for impact parameter-based informations *//
+  unsigned int ntrk  = btag->nIP3D_TrackParticles();                  // number of tracks used for tagging in the jet
+  double pb          = btag->IP3D_pb();                               // b likelihood
+  double pu          = btag->IP3D_pu();                               // u likelihood
+  double pc          = btag->IP3D_pc();                               // c likelihood
+  double llr         = btag->IP3D_loglikelihoodratio();               // log likelihood ratio 
         
-    if ( quality == goodJet ) {
-      m_tag_ip3d_n->Fill((float)ntrk); 
-      m_tag_ip3d_b->Fill(pb);
-      m_tag_ip3d_u->Fill(pu);
-      m_tag_ip3d_c->Fill(pc);
-      m_tag_ip3d_llr->Fill(llr);    
-    }
-    else if ( quality == suspectJet ) {
-      m_tag_ip3d_n_sj->Fill((float)ntrk); 
-      m_tag_ip3d_b_sj->Fill(pb);
-      m_tag_ip3d_u_sj->Fill(pu);
-      m_tag_ip3d_c_sj->Fill(pc);
-      m_tag_ip3d_llr_sj->Fill(llr);    
-    }
+  if ( taggabilityLabel == goodJet ) {
+    m_tag_ip3d_n->Fill((float)ntrk); 
+    m_tag_ip3d_b->Fill(pb);
+    m_tag_ip3d_u->Fill(pu);
+    m_tag_ip3d_c->Fill(pc);
+    m_tag_ip3d_llr->Fill(llr);    
+  }
+  else if ( taggabilityLabel == suspectJet ) {
+    m_tag_ip3d_n_sj->Fill((float)ntrk); 
+    m_tag_ip3d_b_sj->Fill(pb);
+    m_tag_ip3d_u_sj->Fill(pu);
+    m_tag_ip3d_c_sj->Fill(pc);
+    m_tag_ip3d_llr_sj->Fill(llr);    
+  }
 
-    ATH_MSG_VERBOSE("InfoBase for IP3D: #tracks = " << ntrk << ", Pb = " << pb 
-    << ", Pu = " << pu<< ", Pc = " << pc << ", llr = " << llr);
+  ATH_MSG_VERBOSE("InfoBase for IP3D: #tracks = " << ntrk << ", Pb = " << pb 
+		  << ", Pu = " << pu<< ", Pc = " << pc << ", llr = " << llr);
 
-    ntrk  = btag->nIP2D_TrackParticles();  // number of tracks used for tagging in the jet
-    pb          = btag->IP2D_pb();        // b likelihood
-    pu          = btag->IP2D_pu();        // u likelihood
-    pc          = btag->IP2D_pc();        // c likelihood
-    llr         = btag->IP2D_loglikelihoodratio(); // log likelihood ratio 
+  ntrk  = btag->nIP2D_TrackParticles();  // number of tracks used for tagging in the jet
+  pb          = btag->IP2D_pb();        // b likelihood
+  pu          = btag->IP2D_pu();        // u likelihood
+  pc          = btag->IP2D_pc();        // c likelihood
+  llr         = btag->IP2D_loglikelihoodratio(); // log likelihood ratio 
     
-    if ( quality == goodJet ) {
-      m_tag_ip2d_n->Fill((float)ntrk); 
-      m_tag_ip2d_b->Fill(pb);
-      m_tag_ip2d_u->Fill(pu);
-      m_tag_ip2d_c->Fill(pc);
-      m_tag_ip2d_llr->Fill(llr);  
-    }
-    else if ( quality == suspectJet ) {
-      m_tag_ip2d_n_sj->Fill((float)ntrk); 
-      m_tag_ip2d_b_sj->Fill(pb);
-      m_tag_ip2d_u_sj->Fill(pu);
-      m_tag_ip2d_c_sj->Fill(pc);
-      m_tag_ip2d_llr_sj->Fill(llr);  
-    }
+  if ( taggabilityLabel == goodJet ) {
+    m_tag_ip2d_n->Fill((float)ntrk); 
+    m_tag_ip2d_b->Fill(pb);
+    m_tag_ip2d_u->Fill(pu);
+    m_tag_ip2d_c->Fill(pc);
+    m_tag_ip2d_llr->Fill(llr);  
+  }
+  else if ( taggabilityLabel == suspectJet ) {
+    m_tag_ip2d_n_sj->Fill((float)ntrk); 
+    m_tag_ip2d_b_sj->Fill(pb);
+    m_tag_ip2d_u_sj->Fill(pu);
+    m_tag_ip2d_c_sj->Fill(pc);
+    m_tag_ip2d_llr_sj->Fill(llr);  
+  }
      
-    ATH_MSG_VERBOSE("InfoBase for IP2D: #tracks = " << ntrk << ", Pb = " << pb 
-    << ", Pu = " << pu<< ", Pc = " << pc << ", llr = " << llr);
+  ATH_MSG_VERBOSE("InfoBase for IP2D: #tracks = " << ntrk << ", Pb = " << pb 
+		  << ", Pu = " << pu<< ", Pc = " << pc << ", llr = " << llr);
 
-    float sig3d = 0;
-    btag->variable<float>("SV1", "significance3d" , sig3d);
-    m_tag_sv0_sig3d->Fill(sig3d);
+  float sig3d = 0;
+  btag->variable<float>("SV1", "significance3d" , sig3d);
+  m_tag_sv0_sig3d->Fill(sig3d);
     
-    pb          = btag->SV1_pb();        // b likelihood
-    pu          = btag->SV1_pu();        // u likelihood
-    pc          = btag->SV1_pc();        // c likelihood
-    llr         = btag->SV1_loglikelihoodratio();// log likelihood ratio 
+  pb          = btag->SV1_pb();        // b likelihood
+  pu          = btag->SV1_pu();        // u likelihood
+  pc          = btag->SV1_pc();        // c likelihood
+  llr         = btag->SV1_loglikelihoodratio();// log likelihood ratio 
     
-    if ( quality == goodJet ) {
-      m_tag_sv1_b->Fill(pb);
-      m_tag_sv1_u->Fill(pu);
-      m_tag_sv1_c->Fill(pc);
-      m_tag_sv1_llr->Fill(llr);
-    }
-    else if ( quality == suspectJet ) {
-      m_tag_sv1_b_sj->Fill(pb);
-      m_tag_sv1_u_sj->Fill(pu);
-      m_tag_sv1_c_sj->Fill(pc);
-      m_tag_sv1_llr_sj->Fill(llr);
-    }
+  if ( taggabilityLabel == goodJet ) {
+    m_tag_sv1_b->Fill(pb);
+    m_tag_sv1_u->Fill(pu);
+    m_tag_sv1_c->Fill(pc);
+    m_tag_sv1_llr->Fill(llr);
+  }
+  else if ( taggabilityLabel == suspectJet ) {
+    m_tag_sv1_b_sj->Fill(pb);
+    m_tag_sv1_u_sj->Fill(pu);
+    m_tag_sv1_c_sj->Fill(pc);
+    m_tag_sv1_llr_sj->Fill(llr);
+  }
 
-    ATH_MSG_VERBOSE("InfoBase for SV1: Pb = " << pb << ", Pu = " << pu<< ", Pc = " << pc<< ", llr = " << llr);
+  ATH_MSG_VERBOSE("InfoBase for SV1: Pb = " << pb << ", Pu = " << pu<< ", Pc = " << pc<< ", llr = " << llr);
     
-    llr = btag->JetFitter_loglikelihoodratio(); // log likelihood ratio 
-    if ( quality == goodJet ) {
-      m_tag_jetfitter_llr->Fill(llr);
-    }
-    else if ( quality == suspectJet ) {
-      m_tag_jetfitter_llr_sj->Fill(llr);
-    }
+  llr = btag->JetFitter_loglikelihoodratio(); // log likelihood ratio 
+  if ( taggabilityLabel == goodJet ) {
+    m_tag_jetfitter_llr->Fill(llr);
+  }
+  else if ( taggabilityLabel == suspectJet ) {
+    m_tag_jetfitter_llr_sj->Fill(llr);
+  }
  
-    // log likelihood ratio
-    llr = btag->JetFitter_loglikelihoodratio();
+  // log likelihood ratio
+  llr = btag->JetFitter_loglikelihoodratio();
  
-    if ( quality == goodJet ) {
-      m_tag_jfcnn_llr->Fill(llr);
-    }
-    else if ( quality == suspectJet ) {
-      m_tag_jfcnn_llr_sj->Fill(llr);
-    }  
+  if ( taggabilityLabel == goodJet ) {
+    m_tag_jfcnn_llr->Fill(llr);
+  }
+  else if ( taggabilityLabel == suspectJet ) {
+    m_tag_jfcnn_llr_sj->Fill(llr);
+  }  
   
-    return;
+  return;
 }
 
 
 void JetTagMonitoring::fillBadTrackBits(const std::bitset<17> failedCuts, double eta, double phi) {
 
-    if ( failedCuts[pTMin]           == 0 ) m_tracks_pTMin_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[d0Max]           == 0 ) m_tracks_d0Max_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[z0Max]           == 0 ) m_tracks_z0Max_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[sigd0Max]        == 0 ) m_tracks_sigd0Max_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[sigz0Max]        == 0 ) m_tracks_sigz0Max_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[etaMax]          == 0 ) m_tracks_etaMax_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitBLayer]      == 0 ) m_tracks_nHitBLayer_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[deadBLayer]      == 0 ) m_tracks_deadBLayer_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitPix]         == 0 ) m_tracks_nHitPix_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitSct]         == 0 ) m_tracks_nHitSct_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitSi]          == 0 ) m_tracks_nHitSi_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitTrt]         == 0 ) m_tracks_nHitTrt_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitTrtHighE]    == 0 ) m_tracks_nHitTrtHighE_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[fitChi2]         == 0 ) m_tracks_fitChi2_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[fitProb]         == 0 ) m_tracks_fitProb_2D->Fill(eta, phi, 1.);
-    if ( failedCuts[fitChi2OnNdfMax] == 0 ) m_tracks_fitChi2OnNdfMax_2D->Fill(eta, phi, 1.);
-
-
-    if ( failedCuts[pTMin]           == 0 ) m_tracks_pTMin_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[d0Max]           == 0 ) m_tracks_d0Max_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[z0Max]           == 0 ) m_tracks_z0Max_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[sigd0Max]        == 0 ) m_tracks_sigd0Max_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[sigz0Max]        == 0 ) m_tracks_sigz0Max_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[etaMax]          == 0 ) m_tracks_etaMax_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitBLayer]      == 0 ) m_tracks_nHitBLayer_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[deadBLayer]      == 0 ) m_tracks_deadBLayer_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitPix]         == 0 ) m_tracks_nHitPix_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitSct]         == 0 ) m_tracks_nHitSct_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitSi]          == 0 ) m_tracks_nHitSi_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitTrt]         == 0 ) m_tracks_nHitTrt_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[nHitTrtHighE]    == 0 ) m_tracks_nHitTrtHighE_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[fitChi2]         == 0 ) m_tracks_fitChi2_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[fitProb]         == 0 ) m_tracks_fitProb_2D_LS->Fill(eta, phi, 1.);
-    if ( failedCuts[fitChi2OnNdfMax] == 0 ) m_tracks_fitChi2OnNdfMax_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[pTMin]           == 0 ) m_tracks_pTMin_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[d0Max]           == 0 ) m_tracks_d0Max_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[z0Max]           == 0 ) m_tracks_z0Max_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[sigd0Max]        == 0 ) m_tracks_sigd0Max_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[sigz0Max]        == 0 ) m_tracks_sigz0Max_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[etaMax]          == 0 ) m_tracks_etaMax_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[nHitBLayer]      == 0 ) m_tracks_nHitBLayer_2D->Fill(eta, phi, 1.); // IBL hits in Run-2, old b-layer in Run-1
+  if ( failedCuts[deadBLayer]      == 0 ) m_tracks_deadBLayer_2D->Fill(eta, phi, 1.); // IBL hits in Run-2, old b-layer in Run-1
+  if ( failedCuts[nHitPix]         == 0 ) m_tracks_nHitPix_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[nHitSct]         == 0 ) m_tracks_nHitSct_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[nHitSi]          == 0 ) m_tracks_nHitSi_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[nHitTrt]         == 0 ) m_tracks_nHitTrt_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[nHitTrtHighE]    == 0 ) m_tracks_nHitTrtHighE_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[fitChi2]         == 0 ) m_tracks_fitChi2_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[fitProb]         == 0 ) m_tracks_fitProb_2D->Fill(eta, phi, 1.);
+  if ( failedCuts[fitChi2OnNdfMax] == 0 ) m_tracks_fitChi2OnNdfMax_2D->Fill(eta, phi, 1.);
+
+
+  if ( failedCuts[pTMin]           == 0 ) m_tracks_pTMin_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[d0Max]           == 0 ) m_tracks_d0Max_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[z0Max]           == 0 ) m_tracks_z0Max_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[sigd0Max]        == 0 ) m_tracks_sigd0Max_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[sigz0Max]        == 0 ) m_tracks_sigz0Max_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[etaMax]          == 0 ) m_tracks_etaMax_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[nHitBLayer]      == 0 ) m_tracks_nHitBLayer_2D_LS->Fill(eta, phi, 1.); // IBL hits in Run-2, old b-layer in Run-1
+  if ( failedCuts[deadBLayer]      == 0 ) m_tracks_deadBLayer_2D_LS->Fill(eta, phi, 1.); // IBL hits in Run-2, old b-layer in Run-1
+  if ( failedCuts[nHitPix]         == 0 ) m_tracks_nHitPix_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[nHitSct]         == 0 ) m_tracks_nHitSct_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[nHitSi]          == 0 ) m_tracks_nHitSi_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[nHitTrt]         == 0 ) m_tracks_nHitTrt_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[nHitTrtHighE]    == 0 ) m_tracks_nHitTrtHighE_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[fitChi2]         == 0 ) m_tracks_fitChi2_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[fitProb]         == 0 ) m_tracks_fitProb_2D_LS->Fill(eta, phi, 1.);
+  if ( failedCuts[fitChi2OnNdfMax] == 0 ) m_tracks_fitChi2OnNdfMax_2D_LS->Fill(eta, phi, 1.);
 
 
-    return;
+  return;
 
 }
 
 void JetTagMonitoring::fillGoodJetHistos(const xAOD::Jet *jet) {
 
-    m_jet_2D_quality->Fill(jet->eta(), jet->phi(), 1.);
-
-    const xAOD::BTagging* btag = jet->btagging();
+  const xAOD::BTagging* btag = jet->btagging();
 
-    double sv1ip3d = btag->SV1plusIP3D_discriminant();
-    double mv2c10_tmp = 0;
-    btag->MVx_discriminant("MV2c10",mv2c10_tmp);
-    double mv2c20 = mv2c10_tmp;
+  double sv1ip3d = btag->SV1plusIP3D_discriminant();
+  double mv_tmp = 0;
+  btag->MVx_discriminant(m_mv_algorithmName,mv_tmp);
+  double mv = mv_tmp;
   
-    m_tag_sv1ip3d_w->Fill(sv1ip3d);
-    m_tag_mv2c20_w->Fill(mv2c20);   
-    m_tag_mv2c20_w_LS->Fill(mv2c20);   
-
-    if      ( jet->pt() > 200000. ) m_tag_mv2c20_w_pT200->Fill(mv2c20);   
-    else if ( jet->pt() > 100000. ) m_tag_mv2c20_w_pT100_200->Fill(mv2c20);   
-    else if ( jet->pt() >  50000. ) m_tag_mv2c20_w_pT50_100->Fill(mv2c20);   
-    else if ( jet->pt() >  20000. ) m_tag_mv2c20_w_pT20_50->Fill(mv2c20);   
-    else if ( jet->pt() >  10000. ) m_tag_mv2c20_w_pT10_20->Fill(mv2c20);   
-
-    if      ( jet->pt() > 200000. ) m_tag_mv2c20_w_pT200_LS->Fill(mv2c20);   
-    else if ( jet->pt() > 100000. ) m_tag_mv2c20_w_pT100_200_LS->Fill(mv2c20);   
-    else if ( jet->pt() >  50000. ) m_tag_mv2c20_w_pT50_100_LS->Fill(mv2c20);   
-    else if ( jet->pt() >  20000. ) m_tag_mv2c20_w_pT20_50_LS->Fill(mv2c20);   
-    else if ( jet->pt() >  10000. ) m_tag_mv2c20_w_pT10_20_LS->Fill(mv2c20);   
-
-
-    if      ( fabs(jet->eta()) > 2.0 ) m_tag_mv2c20_w_eta20_25->Fill(mv2c20);   
-    else if ( fabs(jet->eta()) > 1.5 ) m_tag_mv2c20_w_eta15_20->Fill(mv2c20);   
-    else if ( fabs(jet->eta()) > 1.0 ) m_tag_mv2c20_w_eta10_15->Fill(mv2c20);   
-    else if ( fabs(jet->eta()) > 0.5 ) m_tag_mv2c20_w_eta05_10->Fill(mv2c20);   
-    else                               m_tag_mv2c20_w_eta0_05->Fill(mv2c20);   
-
-    if      ( fabs(jet->phi()) > 2.8 ) m_tag_mv2c20_w_phi28->Fill(mv2c20);
-    else if ( fabs(jet->phi()) > 2.1 ) m_tag_mv2c20_w_phi21_28->Fill(mv2c20);
-    else if ( fabs(jet->phi()) > 1.4 ) m_tag_mv2c20_w_phi14_21->Fill(mv2c20);   
-    else if ( fabs(jet->phi()) > 0.7 ) m_tag_mv2c20_w_phi07_14->Fill(mv2c20);   
-    else                               m_tag_mv2c20_w_phi0_07->Fill(mv2c20);   
-
-    if ( mv2c20 > -0.7887 ) {
-      m_tag_mv2c20_w_phi_sum85OP->Fill(jet->phi());
-      m_tag_mv2c20_w_eta_sum85OP->Fill(jet->eta());
-    }
-    if ( mv2c20 > -0.4434 ) {
-      m_tag_mv2c20_w_phi_sum77OP->Fill(jet->phi());
-      m_tag_mv2c20_w_eta_sum77OP->Fill(jet->eta());
-    }
-    if ( mv2c20 > -0.0436 ) {
-      m_tag_mv2c20_w_phi_sum70OP->Fill(jet->phi());
-      m_tag_mv2c20_w_eta_sum70OP->Fill(jet->eta());
-    }
-    if ( mv2c20 >  0.7535 ) {
-      m_tag_mv2c20_w_phi_sum50OP->Fill(jet->phi());
-      m_tag_mv2c20_w_eta_sum50OP->Fill(jet->eta());
-    }
-    m_tag_mv2c20_w_phi_sumAll->Fill(jet->phi());
-    m_tag_mv2c20_w_eta_sumAll->Fill(jet->eta());
+  m_tag_sv1ip3d_w->Fill(sv1ip3d);
+  m_tag_mv_w->Fill(mv);   
+  m_tag_mv_w_LS->Fill(mv);   
+
+  if      ( jet->pt() / CLHEP::GeV > 200. ) m_tag_mv_w_pT200->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV > 100. ) m_tag_mv_w_pT100_200->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV >  50. ) m_tag_mv_w_pT50_100->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV >  20. ) m_tag_mv_w_pT20_50->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV >  10. ) m_tag_mv_w_pT10_20->Fill(mv);   
+
+  if      ( jet->pt() / CLHEP::GeV > 200. ) m_tag_mv_w_pT200_LS->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV > 100. ) m_tag_mv_w_pT100_200_LS->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV >  50. ) m_tag_mv_w_pT50_100_LS->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV >  20. ) m_tag_mv_w_pT20_50_LS->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV >  10. ) m_tag_mv_w_pT10_20_LS->Fill(mv);   
+
+
+  if      ( fabs(jet->eta()) > 2.0 ) m_tag_mv_w_eta20_25->Fill(mv);   
+  else if ( fabs(jet->eta()) > 1.5 ) m_tag_mv_w_eta15_20->Fill(mv);   
+  else if ( fabs(jet->eta()) > 1.0 ) m_tag_mv_w_eta10_15->Fill(mv);   
+  else if ( fabs(jet->eta()) > 0.5 ) m_tag_mv_w_eta05_10->Fill(mv);   
+  else                               m_tag_mv_w_eta0_05->Fill(mv);   
+
+  if      ( fabs(jet->phi()) > 2.8 ) m_tag_mv_w_phi28->Fill(mv);
+  else if ( fabs(jet->phi()) > 2.1 ) m_tag_mv_w_phi21_28->Fill(mv);
+  else if ( fabs(jet->phi()) > 1.4 ) m_tag_mv_w_phi14_21->Fill(mv);   
+  else if ( fabs(jet->phi()) > 0.7 ) m_tag_mv_w_phi07_14->Fill(mv);   
+  else                               m_tag_mv_w_phi0_07->Fill(mv);   
+
+  //  if ( mv > -0.7887 ) {
+  if ( mv > m_mv_85_weight_cut ) {
+    m_tag_mv_w_phi_sum85OP->Fill(jet->phi());
+    m_tag_mv_w_eta_sum85OP->Fill(jet->eta());
+  }
+  //  if ( mv > -0.4434 ) {
+  if ( mv > m_mv_77_weight_cut ) {
+    m_tag_mv_w_phi_sum77OP->Fill(jet->phi());
+    m_tag_mv_w_eta_sum77OP->Fill(jet->eta());
+  }
+  //  if ( mv > -0.0436 ) {
+  if ( mv > m_mv_70_weight_cut ) {
+    m_tag_mv_w_phi_sum70OP->Fill(jet->phi());
+    m_tag_mv_w_eta_sum70OP->Fill(jet->eta());
+  }
+  //  if ( mv >  0.7535 ) {
+  if ( mv >  m_mv_60_weight_cut ) {
+    m_tag_mv_w_phi_sum60OP->Fill(jet->phi());
+    m_tag_mv_w_eta_sum60OP->Fill(jet->eta());
+  }
+  m_tag_mv_w_phi_sumAll->Fill(jet->phi());
+  m_tag_mv_w_eta_sumAll->Fill(jet->eta());
 
-    return;
+  return;
 
 }
 
 /* should mimick as close as possible the same function from Reconstruction/Jet/JetMonitoring/src/JetRecMonToolBase.cxx */
 
-bool JetTagMonitoring::isGoodJet(const xAOD::Jet *jet){
+bool JetTagMonitoring::passJetQualityCuts(const xAOD::Jet *jet){
 
   if (msgLvl(MSG::DEBUG))
     ATH_MSG_DEBUG("in dq cleaning cuts JetTagMon");
@@ -1256,7 +1477,7 @@ bool JetTagMonitoring::isGoodJet(const xAOD::Jet *jet){
 	(emf<0.05 && fabs(jet->eta())>= 2) ||
 	(fracSamplingMax>0.99 && fabs(jet->eta())<2)
 	) 
-      ){
+       ){
     pass_cuts = true; 
   }
 	
@@ -1267,107 +1488,116 @@ bool JetTagMonitoring::isGoodJet(const xAOD::Jet *jet){
 
 void JetTagMonitoring::fillSuspectJetHistos(const xAOD::Jet *jet) {
 
-    m_jet_2D_suspect->Fill(jet->eta(), jet->phi(), 1.);
-    m_track_selector_suspect->Fill(jet->eta(), jet->phi(), 1.);
+  m_track_selector_suspect->Fill(jet->eta(), jet->phi(), 1.);
   
-    const xAOD::BTagging* btag = jet->btagging();
+  const xAOD::BTagging* btag = jet->btagging();
 
-    double sv1ip3d = btag->SV1plusIP3D_discriminant(); 
-    double mv2c10_tmp = 0;
-    btag->MVx_discriminant("MV2c10",mv2c10_tmp);
-    double mv2c20 = mv2c10_tmp;
+  double sv1ip3d = btag->SV1plusIP3D_discriminant(); 
+  double mv_tmp = 0;
+  btag->MVx_discriminant(m_mv_algorithmName,mv_tmp);
+  double mv = mv_tmp;
  
-    m_tag_sv1ip3d_w_sj->Fill(sv1ip3d);
-    m_tag_mv2c20_w_sj->Fill(mv2c20);   
-
-    if      ( jet->pt() > 200000. ) m_tag_mv2c20_w_sj_pT200->Fill(mv2c20);   
-    else if ( jet->pt() > 100000. ) m_tag_mv2c20_w_sj_pT100_200->Fill(mv2c20);   
-    else if ( jet->pt() >  50000. ) m_tag_mv2c20_w_sj_pT50_100->Fill(mv2c20);   
-    else if ( jet->pt() >  20000. ) m_tag_mv2c20_w_sj_pT20_50->Fill(mv2c20);   
-    else if ( jet->pt() >  10000. ) m_tag_mv2c20_w_sj_pT10_20->Fill(mv2c20);     
-
-    if      ( fabs(jet->eta()) > 2.0 ) m_tag_mv2c20_w_sj_eta20_25->Fill(mv2c20);   
-    else if ( fabs(jet->eta()) > 1.5 ) m_tag_mv2c20_w_sj_eta15_20->Fill(mv2c20);   
-    else if ( fabs(jet->eta()) > 1.0 ) m_tag_mv2c20_w_sj_eta10_15->Fill(mv2c20);   
-    else if ( fabs(jet->eta()) > 0.5 ) m_tag_mv2c20_w_sj_eta05_10->Fill(mv2c20);   
-    else                               m_tag_mv2c20_w_sj_eta0_05->Fill(mv2c20);   
-
-    if      ( fabs(jet->phi()) > 2.8 ) m_tag_mv2c20_w_sj_phi28->Fill(mv2c20);
-    else if ( fabs(jet->phi()) > 2.1 ) m_tag_mv2c20_w_sj_phi21_28->Fill(mv2c20);
-    else if ( fabs(jet->phi()) > 1.4 ) m_tag_mv2c20_w_sj_phi14_21->Fill(mv2c20);   
-    else if ( fabs(jet->phi()) > 0.7 ) m_tag_mv2c20_w_sj_phi07_14->Fill(mv2c20);   
-    else                               m_tag_mv2c20_w_sj_phi0_07->Fill(mv2c20); 
-
-    if ( mv2c20 > -0.7887 ) {
-      m_tag_mv2c20_w_sj_phi_sum85OP->Fill(jet->phi());
-      m_tag_mv2c20_w_sj_eta_sum85OP->Fill(jet->eta());
-    }
-    if ( mv2c20 > -0.4434 ) {
-      m_tag_mv2c20_w_sj_phi_sum77OP->Fill(jet->phi());
-      m_tag_mv2c20_w_sj_eta_sum77OP->Fill(jet->eta());
-    }
-    if ( mv2c20 > -0.0436 ) {
-      m_tag_mv2c20_w_sj_phi_sum70OP->Fill(jet->phi());
-      m_tag_mv2c20_w_sj_eta_sum70OP->Fill(jet->eta());
-    }
-    if ( mv2c20 >  0.7535 ) {
-      m_tag_mv2c20_w_sj_phi_sum50OP->Fill(jet->phi());
-      m_tag_mv2c20_w_sj_eta_sum50OP->Fill(jet->eta());
-    }
-    m_tag_mv2c20_w_sj_phi_sumAll->Fill(jet->phi());
-    m_tag_mv2c20_w_sj_eta_sumAll->Fill(jet->eta());
+  m_tag_sv1ip3d_w_sj->Fill(sv1ip3d);
+  m_tag_mv_w_sj->Fill(mv);   
+
+  if      ( jet->pt() / CLHEP::GeV > 200. ) m_tag_mv_w_sj_pT200->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV > 100. ) m_tag_mv_w_sj_pT100_200->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV >  50. ) m_tag_mv_w_sj_pT50_100->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV >  20. ) m_tag_mv_w_sj_pT20_50->Fill(mv);   
+  else if ( jet->pt() / CLHEP::GeV >  10. ) m_tag_mv_w_sj_pT10_20->Fill(mv);     
+
+  if      ( fabs(jet->eta()) > 2.0 ) m_tag_mv_w_sj_eta20_25->Fill(mv);   
+  else if ( fabs(jet->eta()) > 1.5 ) m_tag_mv_w_sj_eta15_20->Fill(mv);   
+  else if ( fabs(jet->eta()) > 1.0 ) m_tag_mv_w_sj_eta10_15->Fill(mv);   
+  else if ( fabs(jet->eta()) > 0.5 ) m_tag_mv_w_sj_eta05_10->Fill(mv);   
+  else                               m_tag_mv_w_sj_eta0_05->Fill(mv);   
+
+  if      ( fabs(jet->phi()) > 2.8 ) m_tag_mv_w_sj_phi28->Fill(mv);
+  else if ( fabs(jet->phi()) > 2.1 ) m_tag_mv_w_sj_phi21_28->Fill(mv);
+  else if ( fabs(jet->phi()) > 1.4 ) m_tag_mv_w_sj_phi14_21->Fill(mv);   
+  else if ( fabs(jet->phi()) > 0.7 ) m_tag_mv_w_sj_phi07_14->Fill(mv);   
+  else                               m_tag_mv_w_sj_phi0_07->Fill(mv); 
+
+  //  if ( mv > -0.7887 ) {
+  if ( mv > m_mv_85_weight_cut ) {
+    m_tag_mv_w_sj_phi_sum85OP->Fill(jet->phi());
+    m_tag_mv_w_sj_eta_sum85OP->Fill(jet->eta());
+  }
+  //  if ( mv > -0.4434 ) {
+  if ( mv > m_mv_77_weight_cut ) {
+    m_tag_mv_w_sj_phi_sum77OP->Fill(jet->phi());
+    m_tag_mv_w_sj_eta_sum77OP->Fill(jet->eta());
+  }
+  //  if ( mv > -0.0436 ) {
+  if ( mv > m_mv_70_weight_cut ) {
+    m_tag_mv_w_sj_phi_sum70OP->Fill(jet->phi());
+    m_tag_mv_w_sj_eta_sum70OP->Fill(jet->eta());
+  }
+  //  if ( mv >  0.7535 ) {
+  if ( mv >  m_mv_60_weight_cut ) {
+    m_tag_mv_w_sj_phi_sum60OP->Fill(jet->phi());
+    m_tag_mv_w_sj_eta_sum60OP->Fill(jet->eta());
+  }
+  m_tag_mv_w_sj_phi_sumAll->Fill(jet->phi());
+  m_tag_mv_w_sj_eta_sumAll->Fill(jet->eta());
 
-    return;
+  return;
 
 }
 
 
 void JetTagMonitoring::fillBadJetHistos(const xAOD::Jet *jet) {
 
-    m_jet_2D_bad->Fill(jet->eta(), jet->phi(), 1.);
+  m_jet_2D_bad->Fill(jet->eta(), jet->phi(), 1.);
 
-    return;
+  return;
 
 }
 
 /*
-void JetTagMonitoring::fillBadZone(int zone, double ip3d) {
+  void JetTagMonitoring::fillBadZone(int zone, double ip3d) {
 
   if( zone == 1 ) {
-    m_tag_ip3d_w_DMZ2_x1->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ2_x2->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ2_x4->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ2_x8->Fill(ip3d, 1.);
-
-    m_tag_ip3d_w_DMZ3_x1->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ3_x2->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ3_x4->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ3_x8->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ2_x1->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ2_x2->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ2_x4->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ2_x8->Fill(ip3d, 1.);
+
+  m_tag_ip3d_w_DMZ3_x1->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ3_x2->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ3_x4->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ3_x8->Fill(ip3d, 1.);
   }
   else if ( zone == 2 ) {
-    m_tag_ip3d_w_DMZ2_x1->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ2_x2->Fill(ip3d, 2.);
-    m_tag_ip3d_w_DMZ2_x4->Fill(ip3d, 4.);
-    m_tag_ip3d_w_DMZ2_x8->Fill(ip3d, 8.);
-
-    m_tag_ip3d_w_DMZ3_x1->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ3_x2->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ3_x4->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ3_x8->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ2_x1->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ2_x2->Fill(ip3d, 2.);
+  m_tag_ip3d_w_DMZ2_x4->Fill(ip3d, 4.);
+  m_tag_ip3d_w_DMZ2_x8->Fill(ip3d, 8.);
+
+  m_tag_ip3d_w_DMZ3_x1->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ3_x2->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ3_x4->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ3_x8->Fill(ip3d, 1.);
   }
   else if ( zone == 3 ) {
-    m_tag_ip3d_w_DMZ2_x1->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ2_x2->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ2_x4->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ2_x8->Fill(ip3d, 1.);
-
-    m_tag_ip3d_w_DMZ3_x1->Fill(ip3d, 1.);
-    m_tag_ip3d_w_DMZ3_x2->Fill(ip3d, 2.);
-    m_tag_ip3d_w_DMZ3_x4->Fill(ip3d, 4.);
-    m_tag_ip3d_w_DMZ3_x8->Fill(ip3d, 8.);
+  m_tag_ip3d_w_DMZ2_x1->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ2_x2->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ2_x4->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ2_x8->Fill(ip3d, 1.);
+
+  m_tag_ip3d_w_DMZ3_x1->Fill(ip3d, 1.);
+  m_tag_ip3d_w_DMZ3_x2->Fill(ip3d, 2.);
+  m_tag_ip3d_w_DMZ3_x4->Fill(ip3d, 4.);
+  m_tag_ip3d_w_DMZ3_x8->Fill(ip3d, 8.);
   }
 
   return;
 
-}
+  }
 */
+
+//void JetTagMonitoring::fillTopHistograms() {
+
+//return;
+
+//}
diff --git a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/CalibrationDataInterface/doc/packagedoc.h b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/CalibrationDataInterface/doc/packagedoc.h
index ff206797251332e6999a79b43f0c96642f9a59ec..3c58500648d3b62e87d5aa59282ca099f647d88f 100644
--- a/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/CalibrationDataInterface/doc/packagedoc.h
+++ b/PhysicsAnalysis/JetTagging/JetTagPerformanceCalibration/CalibrationDataInterface/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section CalibrationDataInterface_CalibrationDataInterfaceReq Requirements
 
 
 */
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftElectronTag.h b/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftElectronTag.h
deleted file mode 100644
index 7e6c7b404efadab3fd82f6df6e9275ce5f746957..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/JetTagging/JetTagTools/JetTagTools/SoftElectronTag.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef JETTAGTOOLS_SOFTELECTRONTAG_H
-#define JETTAGTOOLS_SOFTELECTRONTAG_H
-/**
-  @class SoftElectronTag
-   top-Algorithm which performs b-tagging based on soft electron identification
-   In reference mode the significance is filled into a histogram.
-   In analysis mode a ref histo is read in and a likelihood according to
-   the significance of each track calculated.
-   @author derue@lpnhe.in2p3.fr
-   @author2 Anna.Kaczmarska@ifj.edu.pl
-*/
-
-
-/********************************************************************
-
-NAME:     SoftElectronTag.h
-PACKAGE:  offline/PhysicsAnalysis/JetTagging/JetTagTools
-
-AUTHORS:  F. Derue, A. Kaczmarska, M.Wolter
-CREATED:  Jan 2005
-
-PURPOSE:  b-tagging based on soft electron identification
-          In reference mode the significance is filled into a histogram.
-          In analysis mode a ref histo is read in and a likelihood according to
-          the significance of each track calculated.
-
-          Reconstruction and identification of non-isolated electrons is obtained through the algorithm located in egammaRec: egammaAODBuilder. Identification is based on information from shower shapes in the electromagnetic calorimeter (EMShower) or from the inner detector. Variables such defined are used to identifiy objects through a cut-based analysis (egammaSoftElectronCutIDTool) or through a ratio of likelihood (egammaEPiLogLikelihoodSETool). In the latter case weights for the electron and background hypothesis are obtained.
-These variables are efficient in distinguishing electron tracks from non-electron tracks or electron tracks from gamma-conversions and Dalitz decays.
-In order to construct a b-tagging algorithm we combine them with 
-additional variables to exploit the specific features of b-jets.
-First we take advantage of the fact that the electron is coming from 
-a b quark and thus can have a significant transverse impact parameter d_0. 
-In addition, because of the B hadron's high mass, electrons from direct bottom decays tend to be more boosted in a plane transverse to the jet axis, i.e. have a larger p_T^{rel} than the backgrounds. p_T^{rel} is defined as the electron momentum in the plane orthogonal to the jet axis. 
-The combination of all variables is performed with a ratio of likelihood. 
-
-For each track inside a jet, passing a serie of quality criteria, a discriminating function is build according to this ratio of likelihood. 
-For each jet, the track with the highest value is chosen 
-and this single track will now be used to estimate the discriminating function 
-for the jet.
-
-COMMENTS: evolved from LifetimeTag
-
-UPDATE: 2006-02-10 AK, MW more track quality cuts added
-        FD    - 06.02.2008 - migration to COOL
-********************************************************************/
-
-#include "AthenaBaseComps/AthAlgTool.h"
-#include "GaudiKernel/ToolHandle.h"
-#include "JetTagTools/ITagTool.h"
-#include "xAODTracking/TrackParticle.h"
-#include "xAODTracking/TrackParticleContainer.h"
-#include <vector>
-
-//namespace xAOD  { class TrackParticle; }
-namespace Reco { class ITrackToVertex; }
-namespace Trk  { 
-  class VxCandidate; 
-  class ITrackToVertexIPEstimator;
-}
-//class Jet;
-class ElectronContainer;
-class PhotonContainer;
-class egamma;
-class TH1;
-
-namespace Analysis
-{
-  class SoftElectronInfo;
-  class HistoHelperRoot;
-  class NewLikelihoodTool;
-  class CalibrationBroker;
-  class TrackSelector;
-  class SVForIPTool;
-  
-  class SoftElectronTag : public AthAlgTool , virtual public ITagTool
-  {
-  public:
-
-    /** @brief Default constructor*/
-    SoftElectronTag(const std::string&,const std::string&,const IInterface*);
-    
-    /** @brief Destructor*/
-    virtual ~SoftElectronTag();
-
-    /** @brief initialize method*/
-    StatusCode initialize();
-    /** @brief finalize method*/
-    StatusCode finalize();
-        
-    /** @brief Booking of histograms in reference mode */
-    StatusCode InitReferenceMode(); 
-    
-    /** @brief Retrieve histograms in reference mode */
-    StatusCode InitAnalysisMode(); 
-    
-    /** @brief look for the best electron candidate */
-    void LookForBestElectron(xAOD::Jet& jetToTag);
-    /** @brief retrieve info (pTrel,d0,weights) from best electron */
-    void RetrieveInfoBestElectron(xAOD::Jet& jetToTag);
-
-    /** @brief jet tagging part done only in reference mode*/
-    void JetTagReferenceMode(xAOD::Jet& jetToTag);
-
-    /** @brief jet tagging part done only in analysis mode*/
-    void JetTagAnalysisMode(xAOD::Jet& jetToTag);
-    
-    /** @brief Set the primary vertex. TODO: This is temporary ! 
-	The primary vertex should be part of the JetTag IParticle 
-	interface implementation. The trouble with
-	ElementLink and persistency has to be solved for that. Revisit ... */
-    void setOrigin(const Trk::VxCandidate* priVtx);
-    
-    /** @brief main method to tag jets */
-    void tagJet(xAOD::Jet& jetToTag);
-    
-    /** @brief finalize the histos: Normalize other histos 
-	and fill the integratedNegativeIP histos.
-	This cannot be done in the finalize() of this algtool because 
-	the histo service writes the histos BEFORE AlgTool::finalize() methods 
-	are called.
-	However, it is closed AFTER Algorithm::finalize() methods are called ...
-	In the calling Algorithm::finalize() method the following method will be called.
-    */
-    void finalizeHistos();
-    
-    /** @brief  Useful tools */
-    bool IsHardEle(xAOD::Jet& jetToTag); 
-    bool isBMeson(const int) const;
-    bool isBBaryon(const int) const;
-    bool isDMeson(const int) const;
-    bool isDBaryon(const int) const;
-    std::string longToStr(const long) const;
-    
-  private:
-
-    /** @brief TrackToVertex tool */
-    ToolHandle< Reco::ITrackToVertex > m_trackToVertexTool;
-    /** @brief Track selection cuts for SoftElectronTag */
-    ToolHandle< TrackSelector > m_trackSelectorTool;
-    /** @brief Tool for the estimation of the IPs to the Vertex */
-    ToolHandle< Trk::ITrackToVertexIPEstimator > m_trackToVertexIPEstimator;
-    /** @brief Tool for IP */
-    ToolHandle< SVForIPTool > m_SVForIPTool;
-    /** @brief option to unbias IP estimation (remove track from vertex) */
-    bool m_unbiasIPEstimation;
-    /** @brief Pointer to the likelihood tool. */
-    ToolHandle< NewLikelihoodTool > m_likelihoodTool;
-    /** @brief tool to manipulate histograms*/
-    HistoHelperRoot* m_histoHelper;
-    /** @brief Pointer to the calibration tool: */
-    ToolHandle<CalibrationBroker> m_calibrationTool;
-
-    /** @brief tagger this tool refers to */
-    std::string m_taggerName; 
-    /** @brief likelihood hypotheses: usually B or U*/
-    std::vector<std::string> m_hypotheses; 
-    std::vector<std::string> m_histograms;    
-    
-    /** usually track parameters transported to the primary vertex 
-	are used. for comparison study it is also possible to 
-	use track parameters at the perigee: */
-    //bool m_usePerigeeParameters; 
-
-    /** @brief Storage for the primary vertex. 
-	Can be removed when JetTag provides origin(). 
-	this pointer does not need to be deleted in the destructor (because it
-	points to something in storegate) */
-    const Trk::VxCandidate* m_priVtx = 0;
-    
-    std::string m_author;
-    int m_eleCounter;
-    double m_thrTRT;
-    SoftElectronInfo* m_softeInfo;
-    const egamma *m_bestSoftE;
-
-    bool m_bestSoftIsPhoton;
-    // infos for best track
-    double m_d0wrtPvx;
-    double m_d0ErrwrtPvx;
-    double m_signOfIP;
-    double m_ptrel;
-    double m_Db;
-    double m_Du;
-   /** @brief electron isemse in jet*/
-    double m_isemse;
-    /** @brief maximum track probability in jet*/
-    double m_totalproMax;
-    /** @brief vector of track probabilities*/
-    std::vector<double> m_totalproVector; 
-
-    /** @brief Track selection cuts for LifetimeTagging */
-    /** @brief minimum pt[GeV] of the track*/
-    //double m_minpt;     
-    /** @brief max. transverse impact parameter: |d0|<d0Max */
-    //double m_d0Max;     
-    /** @brief max z0*/
-    //double m_z0Max;     
-    /** @brief maximum pseudo-rapidity */
-    //double m_etaMax;    
-    /** @brief at least n hits in Blayer */
-    //int m_nHitBLayer;   
-    /** @brief at least n hits in pixels */
-    //int m_nHitPix;      
-    /** @brief at least n hits in pixels+SCT */
-    //int m_nHitSi;       
-    /** @brief at least n hits in TRT */
-    //int m_nHitTrt;      
-    /** @brief at least n transition hits in TRT */
-    //int m_nHitTrtHighE; 
-    /** @brief ax. fit chi2 */
-    //double m_fitChi2;   
-    
-    /** @brief Preselection routine for the tracks in the jet. */
-    bool m_preselect(const xAOD::TrackParticle* track);
-    
-    /** @brief just print some info at the beginning */
-    void UseElectrons(xAOD::Jet& jetToTag);
-    void UsePhotons(xAOD::Jet& jetToTag);
-    double CombineWeights(xAOD::Jet& jetToTag, const egamma *eTemp, int choice);
-    std::vector<double> m_Weight;
-   
-    //
-    bool m_writeInfoPlus;
-    bool m_usePhoton;
-    /** @brief Name of the original electron collection*/
-    std::string m_originalElCollectionName;
-    /** @brief Original electron collection*/
-    const ElectronContainer* m_originalElCollection;
-    /** @brief Name of the original photon collection*/
-    std::string m_originalPhCollectionName;
-    /** @brief Original photon collection*/
-    const PhotonContainer* m_originalPhCollection;
-    
-    /** @brief for reference mode: */
-    std::string m_runModus;
-    std::string m_referenceType;
-    std::string m_TPContainerName, m_TPTruthContainerName; 
-    /** @brief Delta R for purification*/
-    double m_purificationDeltaR;
-    /** @brief Delta R for isolation wrt Z/W*/
-    double m_elecIsolDeltaR;
-    /** @brief min pT for jet*/
-    double m_jetPtMinRef;
-    /** @brief max eta for jet*/
-    double m_jetEtaMaxRef;
-    /** @brief boolean to use transverse impact parameter (NB: already applied 
-        in the weight for electrons in egammaRec, so by default set to false) */
-    bool m_useTransverseIP;
-    /** @brief boolean to use cut based selection (isemse)
-        for electrons in egammaRec, so by default set to false) */
-    bool m_useCutBased;
-    /** @brief the collection of jets*/
-    std::vector<std::string> m_jetCollectionList;
-    
-    //GP: use Tool for getting the secondary vertex information
-    std::string m_secVxFinderNameForV0Removal;
-    std::string m_secVxFinderNameForIPSign;
-    
-    bool m_doForcedCalib;
-    std::string m_ForcedCalibName;
-    
-  }; // End class
-  
-  inline void SoftElectronTag::setOrigin(const Trk::VxCandidate* priVtx) { m_priVtx=priVtx; } 
-} // End namespace
-
-#endif
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/doc/packagedoc.h b/PhysicsAnalysis/JetTagging/JetTagTools/doc/packagedoc.h
index 123dcf349e99b0207c13e0f8a9c990b3117280c7..cc9b4658794ac95c7b9b2cdacfbec48bf9ecd5b7 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/doc/packagedoc.h
@@ -101,8 +101,6 @@ JetTagTools contains the following files/classes:
 There are no jobOptions files for this package. Examples how to use these
 algtools are given in the package BTaggingAlgs.
 
-@section JetTagTools_used_packagesJetTagTools used packages
 
-@section JetTagTools_requirementsJetTagTools Requirements
 
 */
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/BasicTrackGradeFactory.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/BasicTrackGradeFactory.cxx
index fb5c3a4ef3048d5037f0cac703e27470df67b736..94e197b6d0f7975113335c1fabeaa688519315df 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/BasicTrackGradeFactory.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/BasicTrackGradeFactory.cxx
@@ -72,7 +72,7 @@ const TrackGradesDefinition & BasicTrackGradeFactory::getTrackGradesDefinition()
   {
 
     uint8_t nbs=0, nps=0, nss=0;
-    if (!track.summaryValue(nbs, xAOD::numberOfBLayerSharedHits)){
+    if (!track.summaryValue(nbs, xAOD::numberOfInnermostPixelLayerSharedHits)){
       ATH_MSG_ERROR("#BTAG# Cannot retrieve numberOfBLayerSharedHists for TrackGrade!");
     }
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/DetailedTrackGradeFactory.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/DetailedTrackGradeFactory.cxx
index aa03017ff3ccd676615a4fa7d081d4fd7c07b0da..232c9b0659b2ea913c91c4bec62e86b4a091607c 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/DetailedTrackGradeFactory.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/DetailedTrackGradeFactory.cxx
@@ -216,8 +216,8 @@ TrackGrade* DetailedTrackGradeFactory::getGrade(const xAOD::TrackParticle & trac
     //check if no hit in BLayer
     if (!m_useRun2TrackGrading) {
       uint8_t nbs;
-      if (!track.summaryValue(nbs, xAOD::numberOfBLayerHits)){
-	ATH_MSG_ERROR("#BTAG# Cannot retrieve numberOfBLayerHits for TrackGrade!");
+      if (!track.summaryValue(nbs, xAOD::numberOfInnermostPixelLayerHits)){
+	ATH_MSG_ERROR("#BTAG# Cannot retrieve numberOfInnermostPixelLayerHits for TrackGrade!");
       }
       if (nbs==0) nohitBLayer = true;
     }
@@ -251,7 +251,7 @@ TrackGrade* DetailedTrackGradeFactory::getGrade(const xAOD::TrackParticle & trac
     if (!m_useRun2TrackGrading){
       //check if shared
       uint8_t nbs=0, nps=0, nss=0;
-      if (!track.summaryValue(nbs, xAOD::numberOfBLayerSharedHits)){
+      if (!track.summaryValue(nbs, xAOD::numberOfInnermostPixelLayerSharedHits)){
 	ATH_MSG_ERROR("#BTAG# Cannot retrieve numberOfBLayerSharedHists for TrackGrade!");
       }
       
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/RNNIPTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/RNNIPTag.cxx
index 3710d7d04e3ae5293e6fd33b4a20ee92ff9a5bb3..04a56659f71e0374acf2024ad6fc8b9fa0a27194 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/RNNIPTag.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/RNNIPTag.cxx
@@ -104,7 +104,7 @@ namespace trkvar {
   const std::string N_SPLIT_PIX_HITS = "nsplitPixHits";
   const std::string N_SCT_HITS = "nSCTHits";
   const std::string N_SHARED_SCT_HITS = "nsharedSCTHits";
-  const std::string EXPECT_BL_HIT = "expectBLayerHit";
+  const std::string EXPECT_BL_HIT = "expectInnermostPixelLayerHit";
   const std::string EXPECT_INNERMOST_PIX_HIT =
     "expectInnermostPixelLayerHit";
   const std::string EXPECT_NEXT_TO_INNERMOST_PIX_HIT =
@@ -728,11 +728,11 @@ namespace {
       out.at(N_NEXT_TO_INN_HITS).push_back(
         val(tp, xAOD::numberOfNextToInnermostPixelLayerHits));
       out.at(N_BL_HITS).push_back(
-        val(tp, xAOD::numberOfBLayerHits));
+        val(tp, xAOD::numberOfInnermostPixelLayerHits));
       out.at(N_SHARED_BL_HITS).push_back(
-        val(tp, xAOD::numberOfBLayerSharedHits));
+        val(tp, xAOD::numberOfInnermostPixelLayerSharedHits));
       out.at(N_SPLIT_BL_HITS).push_back(
-        val(tp, xAOD::numberOfBLayerSplitHits));
+        val(tp, xAOD::numberOfInnermostPixelLayerSplitHits));
       out.at(N_PIX_HITS).push_back(
         val(tp, xAOD::numberOfPixelHits));
       out.at(N_SHARED_PIX_HITS).push_back(
@@ -744,7 +744,7 @@ namespace {
       out.at(N_SHARED_SCT_HITS).push_back(
         val(tp, xAOD::numberOfSCTSharedHits));
       out.at(EXPECT_BL_HIT).push_back(
-        val(tp, xAOD::expectBLayerHit));
+        val(tp, xAOD::expectInnermostPixelLayerHit));
       out.at(EXPECT_INNERMOST_PIX_HIT).push_back(
         val(tp, xAOD::expectInnermostPixelLayerHit));
       out.at(EXPECT_NEXT_TO_INNERMOST_PIX_HIT).push_back(
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/SharedHitMapper.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/SharedHitMapper.cxx
index b0fe25aad9e97f9ef65cd1ff9c04a67d13ce17bc..101c4a4b312023a521929f169ce0eb9f7129a41b 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/SharedHitMapper.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/SharedHitMapper.cxx
@@ -134,7 +134,7 @@ StatusCode SharedHitMapper::execute() {
     xAOD::TrackParticleContainer::const_iterator trkE(inputTracks->end());
     for (; trk1I!=trkE; ++trk1I) {
       int nbs, nps, nss;
-      (*trk1I)->summaryValue(nbs, xAOD::numberOfBLayerSharedHits);
+      (*trk1I)->summaryValue(nbs, xAOD::numberOfInnermostPixelLayerSharedHits);
       (*trk1I)->summaryValue(nps, xAOD::numberOfPixelSharedHits);
       (*trk1I)->summaryValue(nss, xAOD::numberOfSCTSharedHits);
       if (nbs < 0) nbs = 0;
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftElectronTag.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftElectronTag.cxx
deleted file mode 100644
index fd29b09f7c4f81bbd8b3cc44611c7974c6b832a3..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/SoftElectronTag.cxx
+++ /dev/null
@@ -1,1065 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/********************************************************************
-
-NAME:     SoftElectronTag.cxx
-PACKAGE:  offline/PhysicsAnalysis/JetTagging/JetTagTools
-
-AUTHORS:  F. Derue, A. Kaczmarska, M.Wolter
-CREATED:  Jan 2005
-
-PURPOSE:  b-tagging based on soft lepton identification
-
-COMMENTS: evolved from LifetimeTag
-
-UPDATE: AK,MW - 10.02.2006 - some track quality cuts added
-        FD    - 06.02.2008 - migration to COOL
-        FD    - 10.04.2008 - track quality cuts + m_Db m_Du normalized
-        FD    - 17.05.2008 - add access to Photons (for conversions)
-        FD    - 23.06.2008 - m_originalElCollection absent  = warning only + d0
-        FD    - 27.10.2008 - reorder calls of weights, pTrel and d0
-        FD    - 15.01.2009 - use of AthAlgTool and other changes +
-                             adapt to log10(weight) given by egamma
-********************************************************************/
-#include "JetTagTools/SoftElectronTag.h"
-
-#include "GeoPrimitives/GeoPrimitives.h"
-
-//#include "JetEvent/Jet.h"
-#include "JetTagInfo/SoftElectronInfo.h"
-#include "Navigation/NavigationToken.h" 
-
-#include "egammaEvent/Photon.h"
-#include "egammaEvent/Electron.h"
-#include "egammaEvent/ElectronAssociation.h"
-#include "egammaEvent/PhotonAssociation.h"
-
-#include "JetTagTools/TrackSelector.h"
-#include "JetTagTools/SVForIPTool.h"
-#include "JetTagTools/ITrackGradeFactory.h"
-#include "Navigation/NavigationToken.h"
-#include "ITrackToVertex/ITrackToVertex.h"
-#include "TrkVertexFitterInterfaces/ITrackToVertexIPEstimator.h"
-
-#include "ParticleTruth/TrackParticleTruth.h"
-#include "ParticleTruth/TrackParticleTruthCollection.h"
-#include "GeneratorObjects/HepMcParticleLink.h"
-#include "HepMC/GenParticle.h"
-#include "HepMC/GenVertex.h"
-
-#include "JetTagInfo/TruthInfo.h"
-#include "JetTagInfo/SoftLeptonTruthInfo.h"
-#include "JetTagInfo/SLTrueInfo.h"
-
-#include "JetTagTools/HistoHelperRoot.h"
-#include "JetTagTools/NewLikelihoodTool.h"
-#include "JetTagCalibration/CalibrationBroker.h"
-
-#include "GaudiKernel/ITHistSvc.h"
-#include "TH1.h"
-
-namespace Analysis 
-{
-  
-SoftElectronTag::SoftElectronTag(const std::string& t, const std::string& n, const IInterface* p)
-  : AthAlgTool(t,n,p),
-    m_trackToVertexTool("Reco::TrackToVertex"),
-    m_trackSelectorTool("Analysis::TrackSelector"),
-    m_trackToVertexIPEstimator("Trk::TrackToVertexIPEstimator"),
-    m_SVForIPTool("Analysis::SVForIPTool"),
-    m_unbiasIPEstimation(false),
-    m_likelihoodTool("Analysis::NewLikelihoodTool"),
-    m_histoHelper(0),
-    m_calibrationTool("BTagCalibrationBroker"),
-    m_secVxFinderNameForV0Removal("InDetVKalVxInJetTool"),
-    m_secVxFinderNameForIPSign("InDetVKalVxInJetTool")
-{
-
-  // declare interface
-  declareInterface<ITagTool>(this);
-  
-  //
-  declareProperty("Runmodus",     m_runModus     = "analysis");
-  //
-  declareProperty("writeInfoPlus", m_writeInfoPlus = false);
-
-  // Name of the electron input collection
-  declareProperty("originalElCollectionName", 
-		  m_originalElCollectionName = "ElectronAODCollection",
-		  "Name of the electron input collection");
-  // Boolean to use photon collection
-  declareProperty("usePhoton", m_usePhoton = true);
-  // Name of the photon input collection
-  declareProperty("originalPhCollectionName", 
-		  m_originalPhCollectionName = "PhotonAODCollection",
-		  "Name of the photon input collection");
-  // Name of the jet input collection
-  declareProperty("jetCollectionList", m_jetCollectionList,
-		  "Name of the jet input collection");
-  // Name of the track particle container
-  declareProperty("TPContainer",        
-		  m_TPContainerName      = "TrackParticleCandidate",
-		  "Name of the track particle container");
-  // Name of the track particle truth container
-  declareProperty("TPTruthContainer",
-		  m_TPTruthContainerName = "TrackParticleTruthCollection",
-		  "Name of the track particle truth container");
-  // Type of data to analyse in reference mode (B, UDSG, ALL)
-  declareProperty("referenceType",      m_referenceType        = "B",
-		  "Type of data to analyse in reference mode (B, UDSG, ALL)"); 
-  // Distance for purification
-  declareProperty("purificationDeltaR", m_purificationDeltaR   = 0.8,
-		  "Distance for purification");
-  // Distance of isolation to electrons
-  declareProperty("elecIsolDeltaR",     m_elecIsolDeltaR      = 0.7,
-		  "Distance of isolation to electrons");
-  // Cut on minimum pT for jets
-  declareProperty("jetPtMinRef",        m_jetPtMinRef          = 15.*Gaudi::Units::GeV,
-		  "Cut on minimum pT for jets");
-  // Cut on maximum eta for jets
-  declareProperty("jetEtaMaxRef",       m_jetEtaMaxRef         = 2.5,
-		  "Cut on maximum eta for jets");
-
-  // global configuration:
-  declareProperty("SVForIPTool", m_SVForIPTool);
-  // tools:
-  declareProperty("trackSelectorTool", m_trackSelectorTool);
-  declareProperty("trackToVertexTool", m_trackToVertexTool);
-  // Threshold for high-threshold hits in TRT
-  declareProperty("HTRTThr", m_thrTRT=0.05);
-  declareProperty("LikelihoodTool", m_likelihoodTool);
-  // Tools for calibration
-  declareProperty("calibrationTool",	m_calibrationTool);
-  declareProperty("useForcedCalibration",  m_doForcedCalib   = false);
-  declareProperty("ForcedCalibrationName", m_ForcedCalibName = "Cone4H1Tower");
-  // Boolean to use transverse impact parameter
-  declareProperty("UseTransverseIP", m_useTransverseIP = true,
-		  "Boolean to use transverse impact parameter");
-  // Boolean to have unbiased IP estimator
-  declareProperty("unbiasIPEstimation",m_unbiasIPEstimation,
-		  "Boolean to have unbiased IP estimator");
-  // tool for IP estimator
-  declareProperty("TrackToVertexIPEstimator",m_trackToVertexIPEstimator,
-		  "tool for IP estimator");
-  // Boolean to use cut-based identification of electrons
-  // if not use ratio of likelihood (default)
-  declareProperty("UseCutBased", m_useCutBased = false,
-		  "Boolean to use cut-based identification of electrons - if not use ratio of likelihood (default)");
-  
-  // hypotheses 
-  m_hypotheses.push_back("Sig");
-  m_hypotheses.push_back("Bkg");
-}
-
-  
-SoftElectronTag::~SoftElectronTag()
-{
-}
-
-// ==================================================
-StatusCode SoftElectronTag::initialize()
-{
-  // retrieving ToolSvc: 
-  IToolSvc* toolSvc;
-  StatusCode sc = service("ToolSvc", toolSvc);
-  if (StatusCode::SUCCESS != sc) {
-    ATH_MSG_ERROR(" Can't get ToolSvc");
-    return StatusCode::FAILURE;
-  }
-    
-  // retrieving TrackToVertex: 
-  if (m_runModus == "reference" || m_writeInfoPlus) {
-    if ( m_trackToVertexTool.retrieve().isFailure() ) {
-      ATH_MSG_FATAL("Failed to retrieve tool " << m_trackToVertexTool);
-      return StatusCode::FAILURE;
-    } else {
-      ATH_MSG_DEBUG("Retrieved tool " << m_trackToVertexTool);
-    }
-  } 
-
-  // retrieving trackToVertexIPEstimator
-  if (m_trackToVertexIPEstimator.retrieve().isFailure() ) {
-    ATH_MSG_FATAL("Failed to retrieve tool " << m_trackToVertexIPEstimator);
-  } else {
-    ATH_MSG_DEBUG("Retrieved tool " << m_trackToVertexIPEstimator);
-  }
-
-  // creation of TrackSelector: (private instance) 
-  if ( m_trackSelectorTool.retrieve().isFailure() ) {
-    ATH_MSG_FATAL("Failed to retrieve tool " << m_trackSelectorTool);
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG("Retrieved tool " << m_trackSelectorTool);
-  }
-  
-  // retrieving calibrationTool
-  if ( m_calibrationTool.retrieve().isFailure() ) {
-    ATH_MSG_FATAL("Failed to retrieve tool " << m_calibrationTool);
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG("Retrieved tool " << m_calibrationTool);
-  }
-
-  // If the jet author is not known (or one wants a calibration not 
-  // corresponding to the author), can force the calibration. 
-  // Check that this calibration has been loaded
-  if (m_doForcedCalib) {
-    if (std::find( m_jetCollectionList.begin(), 
-		   m_jetCollectionList.end(), 
-		   m_ForcedCalibName ) == m_jetCollectionList.end()) {
-      ATH_MSG_ERROR("Error, forced calibration to an unloaded one");
-      return StatusCode::FAILURE;
-    }
-  }
-  
-  // book histograms in reference mode 
-  if (m_runModus == "reference") {
-    sc = InitReferenceMode();
-    if (sc==StatusCode::FAILURE) return StatusCode::FAILURE;
-  }
-  
-  // read in calibration histograms 
-  if( m_runModus == "analysis" ) {
-    sc = InitAnalysisMode();
-    if (sc==StatusCode::FAILURE) return StatusCode::FAILURE;
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-// ==================================================================
-StatusCode SoftElectronTag::InitReferenceMode() 
-{
-  // ===========================================
-  // Booking of histograms in reference mode
-  // ===========================================
-  
-  StatusCode sc = StatusCode::SUCCESS;
-
-  ITHistSvc* myHistoSvc;
-  if( service( "THistSvc", myHistoSvc ).isSuccess() ) {
-    ATH_MSG_DEBUG("HistoSvc loaded successfully."); 
-    // define Histo Helper
-    m_histoHelper = new HistoHelperRoot(myHistoSvc);
-    // Check for overflows ?
-    m_histoHelper->setCheckOverflows(false);
-    // loop on all Jet collection
-    for(uint ijc=0;ijc<m_jetCollectionList.size();ijc++) {
-      // loop on hypotheses
-      for(uint ih=0;ih<m_hypotheses.size();ih++) {
-	std::string hName = "/RefFile/SoftEl/"+m_jetCollectionList[ijc]+"/"+
-	  m_hypotheses[ih]+"/";
-	
-	m_histoHelper->bookHisto(hName+"d0","|Transverse Impact Parameter|",
-				 100,0.,1.);
-	m_histoHelper->bookHisto(hName+"pTrel","Electron pT wrt jet axis",
-				 100,0.,5.);
-	m_histoHelper->bookHisto(hName+"D","Discriminant",
-				 50,-30.,20.);
-	m_histoHelper->bookHisto(hName+"DpT","Discriminant vs pTrel",
-				 25,0.,5.,25,-30.,20.);
-      }
-    }
-    m_histoHelper->print();
-  } else {
-    ATH_MSG_ERROR("HistoSvc could NOT bo loaded.");
-  }
-  
-  return sc;
-}
-
-// ==================================================================
-StatusCode SoftElectronTag::InitAnalysisMode() 
-{
-  // ===========================================
-  // Retrieve histograms in analysis mode
-  // ===========================================
-
-  StatusCode sc = StatusCode::SUCCESS;
-   
-  // configure likelihood
-  if ( m_likelihoodTool.retrieve().isFailure() ) {
-    ATH_MSG_FATAL("Failed to retrieve tool " << m_likelihoodTool);
-    return StatusCode::FAILURE;
-  } else {
-    ATH_MSG_DEBUG("Retrieved tool " << m_likelihoodTool);
-  }
-  
-  m_likelihoodTool->defineHypotheses(m_hypotheses);
-  std::string hDir;
-
-  // loop on hypotheses
-  for(uint ih=0;ih<m_hypotheses.size();ih++) {
-    
-    //hDir="/RefFile/"+m_jetCollectionList[ijc]+"/"+m_hypotheses[ih]+"/";
-    hDir=m_hypotheses[ih]+"/";
-    
-    // use of pTrel
-    m_likelihoodTool->defineHistogram(hDir+"pTrel");
-    
-    // use of transverse impact parameter
-    if (m_useTransverseIP) 
-      m_likelihoodTool->defineHistogram(hDir+"d0");
-    
-    // Weight of the likelihood (from electron-id only)
-    //m_likelihoodTool->defineHistogram(hDir+"D");
-    
-    // Weight of the likelihood vs pTrel
-    //m_likelihoodTool->defineHistogram(hDir+"DpT");
-    
-    // }
-  }
-  m_likelihoodTool->printStatus();
-
-  return sc;
-}
-
-// ==========================================================
-StatusCode SoftElectronTag::finalize()
-{
-  return StatusCode::SUCCESS;
-}
-
-// ==========================================================
-void SoftElectronTag::tagJet(xAOD::Jet& jetToTag)
-{
-  // If one wants to add a pointer to the best Electron, needs the container. 
-  // Retrieved for each jet. Does another way to do this exist ? 
-  if(m_writeInfoPlus) {
-    bool ppb = true;
-    StatusCode sc = evtStore()->retrieve(m_originalElCollection, m_originalElCollectionName);
-    
-    if (sc.isFailure()) {
-      ATH_MSG_WARNING("Electron collection " << m_originalElCollectionName 
-		      << " not found");
-    } else {
-      ATH_MSG_VERBOSE("Electron collection " << m_originalElCollectionName 
-		      << " found");
-      ppb = false;
-    }
-    if(ppb) {
-      ATH_MSG_VERBOSE("Not able to persistify electron infos ! Exiting...");
-      return;
-    }
-    
-    // retrieve the photon collection
-    if (m_usePhoton) {
-      sc = evtStore()->retrieve(m_originalPhCollection, m_originalPhCollectionName);
-      if (sc.isFailure()) {
-	ATH_MSG_WARNING("Photon collection " << m_originalPhCollectionName 
-			<< " not found");
-      } else {
-	ATH_MSG_VERBOSE("Photon collection " << m_originalPhCollectionName 
-			<< " found");
-	ppb = false;
-      }
-    }
-  
-    if(ppb) {
-      ATH_MSG_VERBOSE("Not able to persistify photon infos ! Exiting...");
-      return;
-    }
-  }
-
-  // author to know which jet algorithm: 
-  m_author = jetToTag.jetAuthor();
-  if (m_doForcedCalib) {
-    m_author = m_ForcedCalibName;
-  } else { 
-    //Check that this author is known in the calibration
-    if (std::find( m_jetCollectionList.begin(), 
-		   m_jetCollectionList.end(), 
-		   m_author ) == m_jetCollectionList.end()) {
-      ATH_MSG_DEBUG("Jet Algorithm not found in the standard list"); 
-      ATH_MSG_DEBUG("Trying to find a similar one...");
-      if      (m_author.find("Cone4",0) != std::string::npos) 
-	m_author = "Cone4H1Tower";
-      else if (m_author.find("Cone7",0) != std::string::npos) 
-	m_author = "Cone7H1Tower";
-      else if (m_author.find("Kt4",0)   != std::string::npos) 
-	m_author = "Kt4H1Tower";
-      else if (m_author.find("Kt6",0)   != std::string::npos) 
-	m_author = "Kt6H1Tower";
-      else {
-	ATH_MSG_DEBUG("None found, taking " << m_ForcedCalibName << " calibration");
-	m_author = m_ForcedCalibName;
-      }
-    }
-  }
-  
-  // Create the info class and append it to the Jet 
-  m_softeInfo = 0;
-  m_bestSoftE = 0;
-
-  // look for the best electron candidate
-  LookForBestElectron(jetToTag);
-  // Return if there are not enough electrons left after preselection
-  if (m_eleCounter<1) {
-    ATH_MSG_VERBOSE("Jet does not contain any good electrons");
-    return;
-  }
-  ATH_MSG_DEBUG(" Max. probability for jet: "  << m_totalproMax);
-  
-  // retrieve information from the best electron
-  RetrieveInfoBestElectron(jetToTag);
-  
-  // run the part of the tagging algorithm done only in analysis mode
-  if (m_runModus == "analysis") 
-    JetTagAnalysisMode(jetToTag);
-
-  // run the part of the tagging algorithm done only in reference mode
-  if (m_runModus == "reference" && m_bestSoftE) 
-    JetTagReferenceMode(jetToTag);
-  
-  return;
-}
-
-
-// ======================================================
-void SoftElectronTag::LookForBestElectron(xAOD::Jet& jetToTag)
-{
-  //
-  // Extract the Electrons from the jet and apply preselection on the track.
-  // Ignore other constituents for now
-  //
-
-  m_eleCounter       = 0;
-  m_bestSoftIsPhoton = false;
-  m_totalproMax      = 0.;
-
-  // initialisation
-  m_d0wrtPvx    = 0.;
-  m_d0ErrwrtPvx = 0.;
-  m_signOfIP    = 1.;
-  m_ptrel       = 0.;
-  m_Db          = 0.; 
-  m_Du          = 0.;
-
-  // retrieve the electron associated to the jet
-  UseElectrons(jetToTag);
-
-  // Is the softE misidentified as a member of photon conversion
-  if (m_usePhoton) UsePhotons(jetToTag);
-}
-
-// ======================================================
-void SoftElectronTag::UseElectrons(xAOD::Jet& jetToTag)
-{
-  //
-  // Extract the Electrons from the jet
-  //
-  
-  // retrieve the electron associated to the jet
-  const ElectronAssociation *ec = jetToTag.getAssociation<ElectronAssociation>("Electrons");
-  if (ec == 0) {
-    ATH_MSG_DEBUG("No electron assocation");
-  } else {
-    // loop on objects
-    for(Navigable<ElectronContainer,double>::object_iter j = ec->begin(); j!= ec->end(); ++j) {
-      const Electron *eTemp = *j;
-      ATH_MSG_DEBUG("eTemp = " << eTemp 
-		    << " author " << eTemp->author() 
-		    << " pt = " << eTemp->pt() 
-		    << " eta = " << eTemp->eta() 
-		    << " phi = " << eTemp->phi());
-      if (eTemp) {
-	// if no track is associated
-	if (!eTemp->trackParticle()) {
-	  //ATH_MSG_WARNING("Electron without a track ! This should not exist !");
-	} else {
-	  if ( m_preselect(eTemp->trackParticle()) && 
-	       eTemp->author(egammaParameters::AuthorSofte)) {
-	    m_eleCounter++;
-	    ATH_MSG_DEBUG("Looking at " << m_eleCounter 
-			  << " electron, isemse " << eTemp->isemse() 
-			  <<" author "<<eTemp->author());
-	    
-	    // in case of use of the electron-id based on weights
-	    double totalpro = 0.;
-	    if (!m_useCutBased) {
-	      // combine electron weights + pTrel + d0
-	      totalpro = CombineWeights(jetToTag,eTemp,1);
-	    } else
-	      // in case of use of the cut based selection 
-	      if (eTemp->isemse()&egammaPID::ElectronTight) {
-		// combine weights of pTrel + d0
-		totalpro = CombineWeights(jetToTag,eTemp,2);
-	      }
-	    ATH_MSG_DEBUG(" total prob "<<totalpro);
-	    // use by default the ratio of likelihood selection
-	    m_totalproVector.push_back(totalpro);
-	    if ( totalpro > m_totalproMax ) {
-	      m_totalproMax = totalpro;		  
-	      m_isemse    = eTemp->isemse();
-	      m_bestSoftE = eTemp;
-	    }
-	  }
-	}
-      }
-    }
-  }
-}
-
-// ======================================================
-void SoftElectronTag::UsePhotons(xAOD::Jet& jetToTag)
-{
-  //
-  // Extract the Photons from the jet to use electrons from conversions
-  // or electrons mis-identififed as photons
-  //
-
-  // retrieve association between photons and jets
-  const PhotonAssociation *ph = jetToTag.getAssociation<PhotonAssociation>("Photons");
-  if (ph == 0) {
-    ATH_MSG_DEBUG("No photon assocation");
-    return;
-  }
-  ATH_MSG_DEBUG("Now looking for photons in the photon container");
-  // loop on photons in jet container
-  for(Navigable<PhotonContainer,double>::object_iter j = ph->begin(); j!= ph->end(); ++j) {
-    const Photon *eTemp = *j;
-    ATH_MSG_DEBUG("eTemp = " << eTemp 
-		  << " author " << eTemp->author() 
-		  << " pt = " << eTemp->pt() 
-		  << " eta = " << eTemp->eta() 
-		  << " phi = " << eTemp->phi() 
-		  << " TrackMatch = " << eTemp->trackParticle());
-    //
-    if (eTemp) {
-      // if no track is associated it cannot be an electron from conversion
-      if (eTemp->trackParticle()) {
-	if ( m_preselect(eTemp->trackParticle()) && 
-	     eTemp->author(egammaParameters::AuthorSofte)) {
-	  m_eleCounter++;
-	  ATH_MSG_DEBUG("Looking at " << m_eleCounter 
-			<< " photon, isemse " << eTemp->isemse() 
-			<<" author "<<eTemp->author());
-	  
-	  double totalpro = 0.;
-	  // in case of use of the electron-id based on weights
-	  if (!m_useCutBased) {
-	    // combine electron weights + pTrel + d0
-	    totalpro = CombineWeights(jetToTag,eTemp,1);
-	  } else
-	    // in case of use of the cut based selection 
-	    if (eTemp->isemse()&egammaPID::ElectronTight) {
-	      // combine weights of pTrel + d0
-	      totalpro = CombineWeights(jetToTag,eTemp,2);
-	    }
-	  ATH_MSG_DEBUG(" total prob "<<totalpro);
-	  // use by default the ratio of likelihood selection
-	  m_totalproVector.push_back(totalpro);
-	  if ( totalpro > m_totalproMax ) {
-	    m_totalproMax = totalpro;		  
-	    m_isemse    = eTemp->isemse();
-	    m_bestSoftE = eTemp;
-	    m_bestSoftIsPhoton = true;
-	  }
-	}
-      }
-    }
-  }
-}
-
-// ======================================================
-double SoftElectronTag::CombineWeights(xAOD::Jet& jetToTag, const egamma *eTemp, int choice)
-{
-  //
-  // Combine weights filled at electron level + pT rel + d0
-  // eTemp = Electron or Photon
-  // choice = 1 combine all
-  //        = 2 use only pTrel and d0 (no electron weight but use "isem")
-  //
-
-  double totalpro = 0.;
-
-  //std::cout << " CombineWeights : " << choice << std::endl;
-
-  /** jet direction: */
-  Amg::Vector3D jetDirection(jetToTag.px(),jetToTag.py(),jetToTag.pz());
-  Amg::Vector3D unit = jetDirection.unit();
-
-  // weight to be signal from electron pid
-  // NB: SofteElectronWeight is a log10(weight) !
-  double s = eTemp->egammaID(egammaPID::SofteElectronWeight);
-  // weight to be background from electron pid
-  double b = eTemp->egammaID(egammaPID::SofteBgWeight);
-  //std::cout << " s1 = " << s << " b = " << b << std::endl;
-  s = pow(10.,s);
-  b = pow(10.,b);
-  // NB: SofteBgWeight is a log10(weight) !
-  //std::cout << " s = " << s << " b = " << b << std::endl;
-  
-  if ( s+b != 0.) { 
-    // weight to be signal
-    m_Db   = s/(s+b);
-    // weight to be background
-    m_Du   = b/(s+b);
-  } else {
-    ATH_MSG_DEBUG("Info for Soft E : both hypotheses with 0 weight"); 
-  }
-
-  //std::cout << " m_Db = " << m_Db << " " << m_Du << std::endl;
-  
-  std::vector<Slice> slices;
-  // pT of electron relative to jet axis
-  m_ptrel = eTemp->p4().Vect().Dot(jetToTag.p4().Vect());
-  AtomicProperty atom1(m_ptrel/1.e3,"pTrel");
-  std::string compoName(m_author+"#");
-  Composite compo1(compoName+"pTrel");
-  compo1.atoms.push_back(atom1);
-  Slice slice1("SoftEl");
-  slice1.composites.push_back(compo1);
-  
-  //std::cout << " pTrel = " << m_ptrel << std::endl;
-  // transverse impact parameter at perigee
-  /* use new Tool for "unbiased" IP estimation */
-  const Trk::ImpactParametersAndSigma* myIPandSigma(0);
-  if (m_trackToVertexIPEstimator) { 
-    myIPandSigma = m_trackToVertexIPEstimator->estimate(eTemp->trackParticle(),m_priVtx,m_unbiasIPEstimation);
-  }
-  if(0==myIPandSigma) {
-    ATH_MSG_WARNING("SET: trackToVertexIPEstimator failed !");
-  } else {
-    m_d0wrtPvx=myIPandSigma->IPd0;
-    m_d0ErrwrtPvx=myIPandSigma->sigmad0;
-    delete myIPandSigma;
-    myIPandSigma=0;
-  }
-
-
-  //std::cout << " m_d0 = " << m_d0wrtPvx << " " << m_d0ErrwrtPvx << std::endl;
-  // sign of the impact parameter 
-  if (m_trackToVertexIPEstimator) { 
-    m_signOfIP=m_trackToVertexIPEstimator->get2DLifetimeSignOfTrack(eTemp->trackParticle()->definingParameters(),unit,m_priVtx->recVertex());
-  }
-  //std::cout << " m_signOfIP = " << m_signOfIP << std::endl;
-  // signed ip and significances 
-  //double sd0             = m_signOfIP*fabs(m_d0wrtPvx);
-  //double sd0significance = m_signOfIP*fabs(m_d0wrtPvx/m_d0ErrwrtPvx);
-  //std::cout << " sd0 = " << sd0 << " " << sd0significance << std::endl;
-  
-  /*m_d0wrtPvx = eTemp->trackParticle()->measuredPerigee()->parameters()[Trk::d0];
-  const Trk::MeasuredPerigee* perigee = m_trackToVertexTool->perigeeAtVertex(*(m_bestSoftE->trackParticle()), m_priVtx->position());
-  if (perigee) {
-    m_d0wrtPvx = perigee->parameters()[Trk::d0];
-    delete perigee;
-    }*/
-  // if transverse impact parameter is used
-  if (m_useTransverseIP) {
-    AtomicProperty atom2(fabs(m_d0wrtPvx),"d0");
-    Composite compo2(compoName+"d0");
-    compo2.atoms.push_back(atom2);
-    slice1.composites.push_back(compo2);
-  }
-  slices.push_back(slice1);
-  // fill the likelihood method
-  m_likelihoodTool->setLhVariableValue(slices);
-  //std::cout << " ici 0" << std::endl;
-  // retrieve the weights
-  //m_Weight[0] = 0.;
-  //m_Weight[1] = 0.;
-  m_Weight = m_likelihoodTool->calculateLikelihood();
-  // add to tmp the weights to be electrons 
-  // only if not use a cut based analysis
-  if (choice==1) {
-    // std::cout << " m_Weight.size() " << m_Weight.size() << std::endl;
-
-    if (m_Weight.size() >= 2) {
-      m_Weight[0] *= m_Db;
-      m_Weight[1] *= m_Du;
-    }
-  }
-
-  //std::cout << " m_Weight = " << m_Weight[0] << " " << m_Weight[1] << std::endl;
-  // calculate totalpro as the "electron" hypothesis
-  totalpro = m_Weight[0];
-
-  //std::cout << " totalpro = " << totalpro << std::endl;
-  return totalpro;
-}
-
-// ======================================================
-void SoftElectronTag::RetrieveInfoBestElectron(xAOD::Jet& jetToTag)
-{
-  //
-  // retrieve information (pTrel,d0,weights) from best electron
-  //  
-  // initialisation
-  m_d0wrtPvx = 0.;
-  m_ptrel    = 0.;
-  m_Db       = 0; 
-  m_Du       = 0;
-
-  if (m_bestSoftE && (m_runModus == "reference" || m_writeInfoPlus)) {
-    // transverse impact parameter at perigee
-    m_d0wrtPvx = m_bestSoftE->trackParticle()->measuredPerigee()->parameters()[Trk::d0];
-    const Trk::Perigee* perigee = m_trackToVertexTool->perigeeAtVertex(*(m_bestSoftE->trackParticle()), m_priVtx->recVertex().position());
-    if (perigee) {
-      m_d0wrtPvx = perigee->parameters()[Trk::d0];
-      delete perigee;
-    }
-    // pT relative to jet axis
-    m_ptrel = m_bestSoftE->p4().Vect().Dot(jetToTag.p4().Vect());
-    //
-    double s = m_bestSoftE->egammaID(egammaPID::SofteElectronWeight);
-    double b = m_bestSoftE->egammaID(egammaPID::SofteBgWeight);
-    s = pow(10.,s);
-    b = pow(10.,b);
-    if ( s+b != 0.) { 
-      // weight to be signal
-      m_Db   = s/(s+b);
-      // weight to be background
-      m_Du   = b/(s+b);
-    } else {
-      ATH_MSG_DEBUG("Info for best Soft E : both hypotheses with 0 weight"); 
-    }
-  }
-  ATH_MSG_VERBOSE("Info for bestSoftE " << m_d0wrtPvx 
-		  << " " << m_ptrel << " " << m_Db << " " << m_Du);
-}
-
-// ======================================================
-void SoftElectronTag::JetTagReferenceMode(xAOD::Jet& jetToTag)
-{
-  // ===============================================================
-  // part of the jet tagging algorithm done only in reference mode
-  // ===============================================================
-
-  // check value of pT and eta of the jet
-  if ( jetToTag.pt()<=m_jetPtMinRef ) return;
-  if ( fabs(jetToTag.eta())>=m_jetEtaMaxRef ) return;
-
-  ATH_MSG_VERBOSE("A jet " << jetToTag.pt() 
-		  << " " << jetToTag.eta());
-
-  // check for a truth match
-  const TruthInfo* mcinfo = jetToTag.tagInfo<TruthInfo>("TruthInfo");
-  double deltaRmin(0.);
-  double deltaRminC(0.);
-  std::string label = "N/A";
-  if( mcinfo ) {
-    label = mcinfo->jetTruthLabel();
-    // for purification: require no b or c quark closer than dR=m_purificationDeltaR
-    double deltaRtoClosestB = mcinfo->deltaRMinTo("B");
-    double deltaRtoClosestC = mcinfo->deltaRMinTo("C");
-    deltaRmin = deltaRtoClosestB < deltaRtoClosestC ? deltaRtoClosestB : deltaRtoClosestC;
-    double deltaRtoClosestT = mcinfo->deltaRMinTo("T");
-    deltaRmin = deltaRtoClosestT < deltaRmin ? deltaRtoClosestT : deltaRmin;
-    deltaRminC = deltaRtoClosestB;
-  } else {
-    ATH_MSG_ERROR("No TruthInfo ! Cannot run on reference mode !");
-    return;
-  }
-
-  //
-  ATH_MSG_VERBOSE("A jet " << label);
-  if ( (    "B"==m_referenceType &&   "B"==label ) ||  // b-jets    
-       ( "UDSG"==m_referenceType && "N/A"==label ) ||  // light jets
-       (  "ALL"==m_referenceType && // all jets: b + purified light jets
-	  ( ( "B"==label ) || 
-	    ( "N/A"==label && deltaRmin > m_purificationDeltaR ) ||
-	    ( "C"==label   && deltaRminC > m_purificationDeltaR ) ) ) ) {
-    ATH_MSG_VERBOSE("Will add to calibration ! for a " << label << " jet");;
-    std::string pref = "N/A";
-    if ("N/A"==label) pref = m_hypotheses[1];
-    if ("B"==label) {
-      const SoftLeptonTruthInfo* sltinfo = 
-	jetToTag.tagInfo<SoftLeptonTruthInfo>("SoftLeptonTruthInfo");
-      if (sltinfo) {
-	ATH_MSG_VERBOSE("SLT info exist "); 
-	int nslt = sltinfo->numSLTrueInfo();
-	bool gotSLT = false;
-	if (nslt > 0) {
-	  ATH_MSG_VERBOSE("lepton(s) in the jets :" << nslt);
-	  // Get StoreGate to match the bestSoftE and the true lepton... seems complicated !
-	  //StoreGateSvc* m_storeGate;
-	  //StatusCode sc = service("StoreGateSvc", m_storeGate);
-	  //if (sc.isFailure()) {
-	  //ATH_MSG_ERROR("StoreGate service not found ! Cannot build calibration");
-	  //return;
-	  //}
-	  const xAOD::TrackParticleContainer * tpContainer(0);
-	  const TrackParticleTruthCollection* tpTruthColl(0);
-	  //sc = m_storeGate->retrieve(tpContainer,m_TPContainerName);
-	  StatusCode sc = evtStore()->retrieve(tpContainer,m_TPContainerName);
-	  if ( sc.isFailure() ) {
-	    ATH_MSG_DEBUG("No TrackParticleCandidate ! Cannot build calibration");
-	    return;
-	  }
-	  //sc = m_storeGate->retrieve(tpTruthColl,m_TPTruthContainerName);
-	  sc = evtStore()->retrieve(tpTruthColl,m_TPTruthContainerName);
-	  if (sc.isFailure() ) {
-	    ATH_MSG_DEBUG("No TrackParticleTruthCollection ! Cannot build calibration");
-	    return;
-	  }
-	  long theBarcode = 0;
-	  ElementLink<xAOD::TrackParticleContainer> trackPrtlink;
-	  trackPrtlink.setElement(const_cast<xAOD::TrackParticle*>(m_bestSoftE->trackParticle()));
-	  trackPrtlink.setStorableObject(*tpContainer);
-	  TrackParticleTruthCollection::const_iterator tempTrackPrtTruthItr = tpTruthColl->find(Rec::TrackParticleTruthKey(trackPrtlink));
-	  if (tempTrackPrtTruthItr != tpTruthColl->end()) {
-	    const HepMcParticleLink & temHepMcLink = (*tempTrackPrtTruthItr).second.particleLink();
-	    if (temHepMcLink.eventIndex()==0) theBarcode=temHepMcLink.barcode();
-	    const HepMC::GenParticle * thePart(0);
-	    if (theBarcode!=0 && theBarcode<100000) {
-	      ATH_MSG_VERBOSE("The barcode of the match for the bestSoftE " << theBarcode);
-	      thePart = temHepMcLink.cptr();
-	      if (thePart) {
-		for (int islt = 0; islt < nslt; islt++) {
-		  const SLTrueInfo slt = sltinfo->getSLTrueInfo(islt);
-		  int barc = slt.barcode();
-		  if (barc == theBarcode && abs(slt.pdgId()) == 11) {
-		    if ("B"==label) {
-		      int pdgM = slt.pdgIdMother();
-		      if (  isBMeson(pdgM) || isDMeson(pdgM) || isBBaryon(pdgM) || isDBaryon(pdgM) ) {gotSLT = true; pref = m_hypotheses[0];} 
-		      if ( slt.FromB() && !slt.FromD()) {gotSLT = true; }
-		      if ( slt.FromB() &&  slt.FromD()) {gotSLT = true; } 
-		      if (!slt.FromB() &&  slt.FromD()) {gotSLT = true; } // What is this ??
-		    }
-		    ATH_MSG_VERBOSE("Found a truth match in the SLT info" << slt);
-		  }
-		}
-	      }
-	    } else {
-	      ATH_MSG_VERBOSE("The barcode of the match for the bestSoftE is too high " << theBarcode);
-	    }
-	  }
-	}
-	if (!gotSLT) pref = m_hypotheses[1];
-      }
-    }
-    if (pref == m_hypotheses[0] || pref == m_hypotheses[1]) {
-      std::string hDir = "/RefFile/SoftEl/"+m_author+"/"+pref+"/";
-      m_histoHelper->fillHisto(hDir+"d0",fabs(m_d0wrtPvx));
-      m_histoHelper->fillHisto(hDir+"pTrel",m_ptrel/1.e3);
-      m_histoHelper->fillHisto(hDir+"D",m_totalproMax);
-      m_histoHelper->fillHisto(hDir+"DpT",m_ptrel/1.e3,m_totalproMax);
-    }
-  }
-}
-
-// ======================================================
-bool SoftElectronTag::IsHardEle(xAOD::Jet& jetToTag) 
-{
-
-  std::vector<Amg::Vector3D> hardMus;
-  bool hasHardEle(false);
-
-  const SoftLeptonTruthInfo* sltinfo = jetToTag.tagInfo<SoftLeptonTruthInfo>("SoftLeptonTruthInfo");
-
-  if (sltinfo) {
-    int nslt = sltinfo->numSLTrueInfo();
-    ATH_MSG_DEBUG("SL truth info exist. Found " << nslt << " true leptons in jet"); 
-    for (int islt = 0; islt < nslt; islt++) {
-      const SLTrueInfo slt = sltinfo->getSLTrueInfo(islt);
-      ATH_MSG_DEBUG("SLT info " << slt.pdgId() 
-		    << " " << slt.momentum().perp() 
-		    << " " << slt.FromB() << " " << slt.FromD() << " " << slt.FromGH());
-      if ( (abs(slt.pdgId()) == 13 || abs(slt.pdgId()) == 11 || abs(slt.pdgId()) == 15) && // Lepton from direct decay of W/Z/H
-          !(slt.FromB()) &&
-          !(slt.FromD()) &&
-      (abs(slt.pdgIdMother())<100) && // not from light hadron decay-in-flight
-          slt.FromGH()
-
-	   //if ( abs(slt.pdgId()) == 11 && // Electron from direct decay of W/Z/H
-	   //!(slt.FromB()) &&
-	   //!(slt.FromD()) &&
-	   //slt.FromGH()
-	   ) {
-	hardMus.push_back(slt.momentum());
-
-	//hack to avoid calling heplorentzvector on Amg::Vector3D
-	xAOD::IParticle::FourMom_t tempVec(slt.momentum().x(),slt.momentum().y(),slt.momentum().z());
-	//xAOD::IParticle::FourMom_t tempVec(v.x(),v.y(),v.z());
-	double dR = tempVec.DeltaR(jetToTag.p4());
-
-	ATH_MSG_DEBUG("DR info " 
-		      << v.eta() << " " << jetToTag.eta() << " "
-		      << v.phi() << " " << jetToTag.phi() << " "
-		      << dR);
-	if(dR<m_elecIsolDeltaR) {	    
-	  hasHardEle = true;
-	}
-      }
-    }
-  }
-  return hasHardEle;
-}
-
-// ======================================================
-void SoftElectronTag::JetTagAnalysisMode(xAOD::Jet& jetToTag)
-{
-  // ===============================================================
-  // part of the jet tagging algorithm done only in analysis mode
-  // ===============================================================
-  
-  std::string instanceName(name());
-  // Create the Info only if there is at least one electron (or photon)
-  if (m_bestSoftE && m_softeInfo == 0) {
-    m_softeInfo = new SoftElectronInfo(instanceName.erase(0,8));
-    jetToTag.addInfo(m_softeInfo);
-    
-    // Store maximum probability as Weight and NTrackProb 
-    // and a vector of probabilities as TrackProb
-    m_softeInfo->setNTrackProb(m_totalproMax);
-    m_softeInfo->setWeight(m_totalproMax);
-    m_softeInfo->setTrackProb(m_totalproVector);
-      
-    // Add the SETrackInfo
-    if (m_writeInfoPlus) {
-      if (m_bestSoftE) {
-	if (!m_bestSoftIsPhoton) {
-	  // if best candidate is an electron
-	  SETrackInfo tinfo(m_originalElCollection,dynamic_cast<const Electron *>(m_bestSoftE),
-			    m_d0wrtPvx,m_ptrel,m_totalproVector);
-	  m_softeInfo->addTrackInfo(tinfo);
-	} else {
-	  // if best candidate is a photon
-	  SETrackInfo tinfo(m_originalPhCollection,dynamic_cast<const Photon*>(m_bestSoftE),
-			    m_d0wrtPvx,m_ptrel,m_totalproVector);
-	  m_softeInfo->addTrackInfo(tinfo);
-	}
-      }
-    }
-  }
-
-  if (m_bestSoftE) {
-    if(m_softeInfo) m_softeInfo->setTagLikelihood(m_Weight);
-    // Tagging done. Make info object valid, i.e. tag was ok. 
-    // Fill the JetTag and return ... 
-    m_softeInfo->makeValid();
-    
-    ATH_MSG_DEBUG("Weight of the jet (max. probability): " 
-		  <<m_softeInfo->nTrackProb());
-    for (unsigned jj=0; jj< (m_softeInfo->vectorTrackProb()).size(); jj++){
-      ATH_MSG_DEBUG("Probability of track "<<jj<<" "
-		    <<(m_softeInfo->vectorTrackProb())[jj]);
-    }
-  }
-  m_likelihoodTool->clear();
-  m_totalproVector.clear();
-}
-
-// ===================================================
-void SoftElectronTag::finalizeHistos()
-{
-}
-
-
-/* ------------------------------------------------------------------- */
-/*                        Private Helper Functions                     */
-/* ------------------------------------------------------------------- */
-bool SoftElectronTag::m_preselect(const xAOD::TrackParticle *t)
-{
-  // 
-  // performs track selection 
-  // NB: should be similar to what is done in Reconstruction/egamma/egammaRec
-  // softeBuilder.cxx
-  // But some extra-cuts can be applied like on the transverse impact parameter
-  //
-  
-  ATH_MSG_DEBUG("m_preselect(): trkPrt->pt(): " << t->pt());
-  
-  m_trackSelectorTool->primaryVertex(m_priVtx->recVertex().position());
-  m_trackSelectorTool->prepare();
-  // apply track selection
-  if( m_trackSelectorTool->selectTrack(t) ) {
-    // apply further cuts like on TRT high threshold
-    // pseudo-rapidity
-    double eta = fabs(t->eta());
-
-    // fraction of high threshold hits in TRT (with outliers)
-    int nTRThigh, nTRThighOutliers, nTRT, nTRTOutliers;
-    t->summaryValue(nTRThigh, xAOD::numberOfTRTHighThresholdHits);
-    t->summaryValue(nTRThighOutliers, xAOD::numberOfTRTHighThresholdOutliers);
-    t->summaryValue(nTRT, xAOD::numberOfTRTHits);
-    t->summaryValue(nTRTOutliers, xAOD::numberOfTRTOutliers);
-
-
-    double rTRT = (nTRT+nTRTOutliers) > 0 ? ((double) (nTRThigh+nTRThighOutliers)/(nTRT+nTRTOutliers) ) : 0.;
-    
-    //std::cout << " tTRT = " << rTRT << std::endl;
-    if ((rTRT>m_thrTRT && eta<2.) || eta>=2.) return true;
-  }
-  return false;
-}
-
-// =============================================================
-bool SoftElectronTag::isBBaryon(const int pID) const 
-{
-  //
-  // PdgID of B-baryon is of form ...xxx5xxx
-  //
-  std::string idStr = longToStr( abs(pID) );
-  char digit4 = idStr[ idStr.length() - 4 ];
-  if( digit4=='5' ) 
-    return true;
-  else 
-    return false;
-}
-
-// ============================================================
-bool SoftElectronTag::isBMeson(const int pID) const 
-{
-  //
-  // PdgID of B-meson is of form ...xxx05xx
-  //
-  std::string idStr = longToStr( abs(pID) );
-  char digit3 = idStr[ idStr.length() - 3 ];
-  char digit4;
-  if( idStr.length() < 4 ) { digit4 = '0'; }
-  else { digit4 = idStr[ idStr.length() - 4 ]; };
-  if( (digit4=='0') && (digit3=='5') ) 
-    return true;
-  else 
-    return false;
-}
-
-// ============================================================
-bool SoftElectronTag::isDBaryon(const int pID) const 
-{
-  //
-  // PdgID of D-baryon is of form ...xxx4xxx
-  //
-  std::string idStr = longToStr( abs(pID) );
-  char digit4 = idStr[ idStr.length() - 4 ];
-  if( digit4=='4' ) 
-    return true;
-  else 
-    return false;
-}
-
-// =============================================================
-bool SoftElectronTag::isDMeson(const int pID) const 
-{
-  //
-  // PdgID of D-meson is of form ...xxx04xx
-  //
-  std::string idStr = longToStr( abs(pID) );
-  char digit3 = idStr[ idStr.length() - 3 ];
-  char digit4;
-  if( idStr.length() < 4 ) { digit4 = '0'; }
-  else { digit4 = idStr[ idStr.length() - 4 ]; };
-  if( (digit4=='0') && (digit3=='4') ) 
-    return true;
-  else 
-    return false;
-}
-
-// ==============================================================
-std::string SoftElectronTag::longToStr( const long n ) const 
-{
-  if (0==n) return "0"; 
-  std::string str = "";
-  for ( long m = n; m!=0; m/=10 )
-    str = char( '0' + abs(m%10) ) + str;
-  if ( n<0 )
-    str = "-" + str;
-  return str;
-}
-
-
-}
diff --git a/PhysicsAnalysis/JetTagging/JetTagTools/src/TrackSelector.cxx b/PhysicsAnalysis/JetTagging/JetTagTools/src/TrackSelector.cxx
index ab1b0f288750998cab374e1f3781935bf5a7a67e..608cc2c647f4f60bf7b289a18f64409f59a9a183 100644
--- a/PhysicsAnalysis/JetTagging/JetTagTools/src/TrackSelector.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagTools/src/TrackSelector.cxx
@@ -233,7 +233,7 @@ namespace Analysis {
     }
     if(m_useTrackSummaryInfo) {
       uint8_t nb=0;
-      track->summaryValue(nb, xAOD::numberOfBLayerHits); 
+      track->summaryValue(nb, xAOD::numberOfInnermostPixelLayerHits);
       if(nb < m_nHitBLayer) {
 	failedCuts.set(nHitBLayer);
 	if(!m_useBLayerHitPrediction) { 
@@ -241,8 +241,8 @@ namespace Analysis {
 	  failedCuts.set(deadBLayer);
 	} else {
 	  uint8_t ehib=1;
-	  if (!track->summaryValue(ehib,xAOD::expectBLayerHit)) {
-	    ATH_MSG_WARNING("#BTAG# expectBLayerHit not computed in  TrackSummary: assuming true");
+	  if (!track->summaryValue(ehib,xAOD::expectInnermostPixelLayerHit)) {
+	    ATH_MSG_WARNING("#BTAG# expectInnermostPixelLayerHit not computed in  TrackSummary: assuming true");
 	    ehib=1;
 	  }
 	  if(ehib) {  // check if module was alive
diff --git a/PhysicsAnalysis/JetTagging/JetTaggingTagTools/doc/packagedoc.h b/PhysicsAnalysis/JetTagging/JetTaggingTagTools/doc/packagedoc.h
index 04819cf1e7c703531f23f9c82c26aad46703219e..eb00e5284953c26f6068655d7f0a41efc89265f4 100644
--- a/PhysicsAnalysis/JetTagging/JetTaggingTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/JetTagging/JetTaggingTagTools/doc/packagedoc.h
@@ -15,10 +15,6 @@ JetTaggingTagTools contains the following tools:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section JetTaggingTagTools_used_packagesJetTaggingTagTools Used packages
 
-@section JetTaggingTagTools_requirementsJetTaggingTagTools Requirements
 
 */
-
-
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/EffiCollection.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/EffiCollection.cxx
index cd1669f28304b58216f27dfa1600c0f0ed5ee8ef..e587b838f8c7e7225c9bce593c3e4cb7db9753d0 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/EffiCollection.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/EffiCollection.cxx
@@ -301,7 +301,7 @@ namespace CP {
                 m_FileType(FileType) {
         TFile* fin = TFile::Open(FileName.c_str());
         if (!fin) {
-            Error("CollectionContainer", ("Unable to open file " + FileName).c_str());
+            Error("CollectionContainer", "%s", ("Unable to open file " + FileName).c_str());
             return;
         }
         TTree* intree = 0;
@@ -357,7 +357,7 @@ namespace CP {
                 if (m_currentSF->first.first <= RunNumber && m_currentSF->first.second >= RunNumber) return true;
             }
         } else return true;
-        Error("CollectionContainer", Form("Could not find any SF period matching the run number %u", RunNumber));
+        Error("CollectionContainer", "Could not find any SF period matching the run number %u", RunNumber);
         return false;
     }
     EfficiencyScaleFactor* EffiCollection::CollectionContainer::retrieve(unsigned int RunNumber) {
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/EfficiencyScaleFactor.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/EfficiencyScaleFactor.cxx
index 169fcc0476b2462c8289251ccf0cab2b333fb0a2..8490e8aa8b5fb2dae472ec726b8fe1f89a04ea6e 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/EfficiencyScaleFactor.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/EfficiencyScaleFactor.cxx
@@ -149,14 +149,24 @@ namespace CP {
     }
     bool EfficiencyScaleFactor::CheckConsistency() const {
         //Check whether  the SFs could be successfully loaded
-        if (!m_sf) Error("EfficiencyScaleFactor", ("Could not load the SF for " + EfficiencyTypeName(m_Type) + " and systematic " + EfficiencySystName(m_sysType)).c_str());
-        if (!m_sf_sys) Error("EfficiencyScaleFactor", ("Could not load the SF systematic for " + EfficiencyTypeName(m_Type) + " and systematic " + EfficiencySystName(m_sysType)).c_str());
+        if (!m_sf) Error("EfficiencyScaleFactor",
+                         "Could not load the SF for %s and systematic %s",
+                         EfficiencyTypeName(m_Type).c_str(),
+                         EfficiencySystName(m_sysType).c_str());
+        if (!m_sf_sys) Error("EfficiencyScaleFactor",
+                             "Could not load the SF systematic for %s and systematic %s",
+                             EfficiencyTypeName(m_Type).c_str(),
+                             EfficiencySystName(m_sysType).c_str());
         if (m_respond_to_kineDepSyst && !m_sf_KineDepsys->initialize()) {
-            Error("EfficiencyScaleFactor", ("Could not load the SF pt-dependent systematic for " + EfficiencyTypeName(m_Type) + " and systematic " + EfficiencySystName(m_sysType)).c_str());
+          Error("EfficiencyScaleFactor",
+                "Could not load the SF pt-dependent systematic for %s and systematic %s",
+                EfficiencyTypeName(m_Type).c_str(),
+                EfficiencySystName(m_sysType).c_str());
             return false;
         }
         if (m_NominalFallBack == this) {
-            Error("EfficiencyScaleFactor", ("The EfficiencyScaleFactor " + EfficiencyTypeName(m_Type) + " has itself as Nominal Fall back").c_str());
+          Error("EfficiencyScaleFactor", "The EfficiencyScaleFactor %s has itself as Nominal Fall back",
+                EfficiencyTypeName(m_Type).c_str());
             return false;
         }
         return m_sf_sys != nullptr && m_sf != nullptr;
@@ -259,12 +269,13 @@ namespace CP {
     CorrectionCode EfficiencyScaleFactor::GetContentFromHist(HistHandler* Hist, IKinematicSystHandler* PtDepHist, const xAOD::Muon& mu, float & Eff, bool PtDepHistNeeded) const {
         Eff = m_default_eff;
         if (!Hist) {
-            Warning("EfficiencyScaleFactor", Form("Could not find histogram for variation %s and muon with pt=%.4f, eta=%.2f and phi=%.2f, returning %.1f", sysname().c_str(), mu.pt(), mu.eta(), mu.phi(), m_default_eff));
+            Warning("EfficiencyScaleFactor", "Could not find histogram for variation %s and muon with pt=%.4f, eta=%.2f and phi=%.2f, returning %.1f", sysname().c_str(), mu.pt(), mu.eta(), mu.phi(), m_default_eff);
             return CorrectionCode::OutOfValidityRange;
         }
         if (m_Type == CP::MuonEfficiencyType::TTVA && fabs(mu.eta()) > 2.5 && fabs(mu.eta()) <= 2.7 && mu.muonType() == xAOD::Muon::MuonType::MuonStandAlone) {
             static bool Warned = false;
-            if (!Warned) Info("EfficiencyScaleFactor", Form("No TTVA sf/efficiency provided for standalone muons with 2.5<|eta|<2.7 for variation %s and muon with pt=%.4f, eta=%.2f and phi=%.2f, returning %.1f", sysname().c_str(), mu.pt(), mu.eta(), mu.phi(), m_default_eff_ttva));
+            if (!Warned) Info("EfficiencyScaleFactor",
+                              "No TTVA sf/efficiency provided for standalone muons with 2.5<|eta|<2.7 for variation %s and muon with pt=%.4f, eta=%.2f and phi=%.2f, returning %.1f", sysname().c_str(), mu.pt(), mu.eta(), mu.phi(), m_default_eff_ttva);
             Warned = true;
             Eff = m_default_eff_ttva;
             return CorrectionCode::Ok;
@@ -292,7 +303,8 @@ namespace CP {
         if (replicas.empty()) return CorrectionCode::OutOfValidityRange;
         if (m_Type == CP::MuonEfficiencyType::TTVA && fabs(mu.eta()) > 2.5 && fabs(mu.eta()) <= 2.7 && mu.muonType() == xAOD::Muon::MuonType::MuonStandAlone) {
             static bool Warned = false;
-            if (!Warned) Info("EfficiencyScaleFactor", Form("No TTVA sf/efficiency provided for standalone muons with 2.5<|eta|<2.7 for variation %s and muon with pt=%.4f, eta=%.2f and phi=%.2f, returning %.1f", sysname().c_str(), mu.pt(), mu.eta(), mu.phi(), m_default_eff_ttva));
+            if (!Warned) Info("EfficiencyScaleFactor",
+                              "No TTVA sf/efficiency provided for standalone muons with 2.5<|eta|<2.7 for variation %s and muon with pt=%.4f, eta=%.2f and phi=%.2f, returning %.1f", sysname().c_str(), mu.pt(), mu.eta(), mu.phi(), m_default_eff_ttva);
             Warned = true;
             for (auto& r : SF)
                 r = m_default_eff_ttva;
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonEfficiencyScaleFactors.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonEfficiencyScaleFactors.cxx
index 2f9d3455f389a043c5b381437ce30d0afede041c..4db9df28929ca3a7c705dd5af5053c1318fbe0f9 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonEfficiencyScaleFactors.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/Root/MuonEfficiencyScaleFactors.cxx
@@ -41,7 +41,7 @@ namespace CP {
                 m_sf_replica_decoration_name(),
                 m_eff_replica_decoration_name(),
                 m_mc_eff_replica_decoration_name(),
-                m_calibration_version("170410_Moriond"),
+                m_calibration_version("170904_Rel21PreRec"),
                 m_lowpt_threshold(15.e3),
                 m_effDec(0),
                 m_MCeffDec(0),
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/share/MuonEfficiencyCorrections_xAOD_Testing_jobOptions.py b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/share/MuonEfficiencyCorrections_xAOD_Testing_jobOptions.py
index 0dc6e9d35f3a9e32aafa0449258d0ba7ae01ee63..028e58c01f5c725ced1a76455f0ce5ed31a6db19 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/share/MuonEfficiencyCorrections_xAOD_Testing_jobOptions.py
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/share/MuonEfficiencyCorrections_xAOD_Testing_jobOptions.py
@@ -23,7 +23,7 @@ PRWTool = CfgMgr.CP__PileupReweightingTool("MyPRWTool",
                 DataScaleFactorUP=1., 
                 DataScaleFactorDOWN=1.0/1.18,
                 ConfigFiles=["/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/dev/PileupReweighting/mc15c_v2_defaults.NotRecommended.prw.root"],
-                LumiCalcFiles=["/afs/cern.ch/atlas/project/muon/mcp/PRWFiles/ilumicalc_histograms_data15_13TeV.periodAllYear_DetStatus-v79-repro20-02_DQDefects-00-02-02_PHYS_StandardGRL_All_Good_25ns.root", "/afs/cern.ch/atlas/project/muon/mcp/PRWFiles/ilumicalc_histograms_data16_13TeV.periodAllYear_DetStatus-v83-pro20-15_DQDefects-00-02-04_PHYS_StandardGRL_All_Good_25ns.root"])
+                LumiCalcFiles=["/afs/cern.ch/atlas/project/muon/mcp/PRWFiles/ilumicalc_histograms_OflLumi-13TeV-009_data16_13TeV.periodAllYear_DetStatus-v89-pro21-01_DQDefects-00-02-04_PHYS_StandardGRL_All_Good_25ns.root"])
 ToolSvc += PRWTool
 
 CustomInputDir = ""
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyCorrectionsRootCoreTest.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyCorrectionsRootCoreTest.cxx
index 2971d57185a24e970c068df5898d2a3a02395278..5d98e20d16d5d01227c23344dad76296b1696353 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyCorrectionsRootCoreTest.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyCorrectionsRootCoreTest.cxx
@@ -105,7 +105,7 @@ int main(int argc, char* argv[]) {
     asg::AnaToolHandle < CP::IPileupReweightingTool > m_prw_tool("CP::PileupReweightingTool/myTool");
     // This is just a placeholder configuration for testing. Do not use these config files for your analysis!
     std::vector<std::string> m_ConfigFiles { "/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/dev/PileupReweighting/mc15c_v2_defaults.NotRecommended.prw.root" };
-    std::vector<std::string> m_LumiCalcFiles { "/afs/cern.ch/atlas/project/muon/mcp/PRWFiles/ilumicalc_histograms_data15_13TeV.periodAllYear_DetStatus-v79-repro20-02_DQDefects-00-02-02_PHYS_StandardGRL_All_Good_25ns.root", "/afs/cern.ch/atlas/project/muon/mcp/PRWFiles/ilumicalc_histograms_data16_13TeV.periodAllYear_DetStatus-v83-pro20-15_DQDefects-00-02-04_PHYS_StandardGRL_All_Good_25ns.root" };
+    std::vector<std::string> m_LumiCalcFiles { "/afs/cern.ch/atlas/project/muon/mcp/PRWFiles/ilumicalc_histograms_OflLumi-13TeV-009_data16_13TeV.periodAllYear_DetStatus-v89-pro21-01_DQDefects-00-02-04_PHYS_StandardGRL_All_Good_25ns.root" };
     ASG_CHECK_SA(APP_NAME, m_prw_tool.setProperty("ConfigFiles", m_ConfigFiles));
     ASG_CHECK_SA(APP_NAME, m_prw_tool.setProperty("LumiCalcFiles", m_LumiCalcFiles));
 
@@ -122,8 +122,8 @@ int main(int argc, char* argv[]) {
 
     //This option unfolds all the statistical systematics per bin of the SFs. Please only activate
     //this *if* you know what you're doing. The world is gonna implode by that
-    bool doUncorrelateSystematicsForMedium = true;
-    ASG_CHECK_SA(APP_NAME, asg::setProperty(m_effi_corr, "UncorrelateSystematics", doUncorrelateSystematicsForMedium));
+    bool doUncorrelateSystematics = false;
+    ASG_CHECK_SA(APP_NAME, asg::setProperty(m_effi_corr, "UncorrelateSystematics", doUncorrelateSystematics));
 
     // setting a custom input folder containing SF files: this is NOT recommended!
     if (!DefaultCalibRelease.empty()) ASG_CHECK_SA(APP_NAME, asg::setProperty(m_effi_corr, "CustomInputFolder", DefaultCalibRelease));
@@ -140,7 +140,7 @@ int main(int argc, char* argv[]) {
     // instance for TTVA scale factors
     CP::MuonEfficiencyScaleFactors m_ttva_corr("TTVASFTestClass");
     ASG_CHECK_SA(APP_NAME, asg::setProperty(m_ttva_corr, "WorkingPoint", "TTVA"));
-    ASG_CHECK_SA(APP_NAME, asg::setProperty(m_ttva_corr, "UncorrelateSystematics", doUncorrelateSystematicsForMedium));
+    ASG_CHECK_SA(APP_NAME, asg::setProperty(m_ttva_corr, "UncorrelateSystematics", doUncorrelateSystematics));
 
     // setting a custom input folder containing SF files: this is NOT recommended!
     if (!DefaultCalibRelease.empty()) ASG_CHECK_SA(APP_NAME, asg::setProperty(m_ttva_corr, "CustomInputFolder", DefaultCalibRelease));
@@ -158,7 +158,7 @@ int main(int argc, char* argv[]) {
 
     // instance for isolation scale factors
     CP::MuonEfficiencyScaleFactors m_iso_effi_corr("GradientIsoSFTestClass");
-    ASG_CHECK_SA(APP_NAME, asg::setProperty(m_iso_effi_corr, "UncorrelateSystematics", doUncorrelateSystematicsForMedium));
+    ASG_CHECK_SA(APP_NAME, asg::setProperty(m_iso_effi_corr, "UncorrelateSystematics", doUncorrelateSystematics));
 
     ASG_CHECK_SA(APP_NAME, m_iso_effi_corr.setProperty("WorkingPoint", "GradientIso"));
     // setting a custom input folder containing SF files: this is NOT recommended!
@@ -172,7 +172,7 @@ int main(int argc, char* argv[]) {
 
     CP::MuonEfficiencyScaleFactors m_badboys_effi_corr("HighPtBadMuonVetoSFTestClass");
     ASG_CHECK_SA(APP_NAME, m_badboys_effi_corr.setProperty("WorkingPoint", "BadMuonHighPt"));
-    ASG_CHECK_SA(APP_NAME, asg::setProperty(m_badboys_effi_corr, "UncorrelateSystematics", doUncorrelateSystematicsForMedium));
+    ASG_CHECK_SA(APP_NAME, asg::setProperty(m_badboys_effi_corr, "UncorrelateSystematics", doUncorrelateSystematics));
 
     // setting a custom input folder containing SF files: this is NOT recommended!
     if (!DefaultCalibRelease.empty()) ASG_CHECK_SA(APP_NAME, asg::setProperty(m_badboys_effi_corr, "CustomInputFolder", DefaultCalibRelease));
@@ -231,13 +231,13 @@ int main(int argc, char* argv[]) {
 
             float nominalSF = 1.;
             CHECK_CPCorr(m_effi_corr.getEfficiencyScaleFactor(**mu_itr, nominalSF));
-            if (doUncorrelateSystematicsForMedium) std::cout << "nominal SF " << nominalSF << std::endl;
+            if (doUncorrelateSystematics) std::cout << "nominal SF " << nominalSF << std::endl;
             for (const auto &sysMedium : m_SystMedium) {
                 CHECK_CPSys(m_effi_corr.applySystematicVariation(sysMedium));
                 CHECK_CPCorr(m_effi_corr.getEfficiencyScaleFactor(**mu_itr, sf));
                 std::string sysMediumName = (sysMedium.name().empty()) ? "Nominal" : sysMedium.name();
                 // only print the systematic variation in case it is the relevant one when UncorrelateSystematics is enabled
-                if (!doUncorrelateSystematicsForMedium || nominalSF != sf) std::cout << sysMediumName << " scaleFactor = " << sf << std::endl;
+                if (!doUncorrelateSystematics || nominalSF != sf) std::cout << sysMediumName << " scaleFactor = " << sf << std::endl;
             }
             CHECK_CPSys(m_effi_corr.applySystematicVariation(CP::SystematicSet()));
 
diff --git a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyCorrectionsSFFilesTest.cxx b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyCorrectionsSFFilesTest.cxx
index 050798556ac83c708456bcfdfa66743871f6043e..aa441c35543b125d0c7aee6d946b542bd70cc01b 100644
--- a/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyCorrectionsSFFilesTest.cxx
+++ b/PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections/util/MuonEfficiencyCorrectionsSFFilesTest.cxx
@@ -127,7 +127,7 @@ int main(int argc, char* argv[]) {
     asg::AnaToolHandle < CP::IPileupReweightingTool > m_prw_tool("CP::PileupReweightingTool/myTool");
     // This is just a placeholder configuration for testing. Do not use these config files for your analysis!
     std::vector<std::string> m_ConfigFiles { "/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/dev/PileupReweighting/mc15c_v2_defaults.NotRecommended.prw.root" };
-    std::vector<std::string> m_LumiCalcFiles { "/afs/cern.ch/atlas/project/muon/mcp/PRWFiles/ilumicalc_histograms_data15_13TeV.periodAllYear_DetStatus-v79-repro20-02_DQDefects-00-02-02_PHYS_StandardGRL_All_Good_25ns.root", "/afs/cern.ch/atlas/project/muon/mcp/PRWFiles/ilumicalc_histograms_data16_13TeV.periodAllYear_DetStatus-v83-pro20-15_DQDefects-00-02-04_PHYS_StandardGRL_All_Good_25ns.root" };
+    std::vector<std::string> m_LumiCalcFiles { "/afs/cern.ch/atlas/project/muon/mcp/PRWFiles/ilumicalc_histograms_OflLumi-13TeV-009_data16_13TeV.periodAllYear_DetStatus-v89-pro21-01_DQDefects-00-02-04_PHYS_StandardGRL_All_Good_25ns.root" };
     ASG_CHECK_SA(APP_NAME, m_prw_tool.setProperty("ConfigFiles", m_ConfigFiles));
     ASG_CHECK_SA(APP_NAME, m_prw_tool.setProperty("LumiCalcFiles", m_LumiCalcFiles));
 
diff --git a/PhysicsAnalysis/MuonID/MuonIDEvent/doc/packagedoc.h b/PhysicsAnalysis/MuonID/MuonIDEvent/doc/packagedoc.h
index 9ad2b459ac8695784bbd8629a8fd9d2d44e8da8b..7e4733319ea60be350094891fdb5ecf1a7350198 100644
--- a/PhysicsAnalysis/MuonID/MuonIDEvent/doc/packagedoc.h
+++ b/PhysicsAnalysis/MuonID/MuonIDEvent/doc/packagedoc.h
@@ -80,9 +80,6 @@ You may also be interested in:
 
    - The rest of the AOD EDM classes
 
-@section MuonIDEvent_MuonIDEventReq Requirements
 
 
 */
-
-
diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/MuonSelectorTools/IMuonSelectionTool.h b/PhysicsAnalysis/MuonID/MuonSelectorTools/MuonSelectorTools/IMuonSelectionTool.h
index 7d3bd6b863ea259be426bb799203d46ff08d1838..3855f135be205f4daefd130bdc9d9a128fe694c2 100644
--- a/PhysicsAnalysis/MuonID/MuonSelectorTools/MuonSelectorTools/IMuonSelectionTool.h
+++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/MuonSelectorTools/IMuonSelectionTool.h
@@ -42,29 +42,39 @@ namespace CP {
       /// set the passes high pT cuts variable of the muon 
       virtual void setPassesHighPtCuts( xAOD::Muon& mu ) const = 0;
 
+      /// set the passes low pT cuts variable of the muon
+      //virtual void setPassesLowPtEfficiencyCuts( xAOD::Muon& mu ) const = 0;
+
       /// set the passes quality variable of the muon 
       virtual void setQuality( xAOD::Muon& mu ) const = 0;
 
       /// Returns true if the muon passes the standard MCP ID cuts. To set the value on the muon, instead call setPassesIDCuts(xAOD::Muon&) const
-      virtual bool                passedIDCuts(const xAOD::Muon&) const =0;
+      virtual bool passedIDCuts(const xAOD::Muon&) const =0;
 
       /// Returns true if the muon passes a standardized loose preselection.
-      virtual bool                passedMuonCuts(const xAOD::Muon&) const =0;
+      virtual bool passedMuonCuts(const xAOD::Muon&) const =0;
       
       /// Returns true if the track particle passes the standard MCP ID cuts.
-      virtual bool                passedIDCuts(const xAOD::TrackParticle&) const=0;
+      virtual bool passedIDCuts(const xAOD::TrackParticle&) const=0;
 
       /// Returns true if the muon passes the standard MCP high pt cuts. To set the value on the muon, instead call setPassesHighPtCuts(xAOD::Muon&) const
-      virtual bool                passedHighPtCuts(const xAOD::Muon&) const =0;
+      virtual bool passedHighPtCuts(const xAOD::Muon&) const =0;
+     
+      /// Returns true if the muon passes the standard MCP low pt cuts. To set the value on the muon, instead call setPassesHighPtCuts(xAOD::Muon&) const
+      virtual bool passedLowPtEfficiencyCuts(const xAOD::Muon&) const =0;
+      virtual bool passedLowPtEfficiencyCuts(const xAOD::Muon&, xAOD::Muon::Quality thisMu_quality) const =0;
      
+      /// Returns true if a CB muon fails a pt- and eta-dependent cut on the relative CB q/p error   
+      virtual bool passedErrorCutCB(const xAOD::Muon&) const=0;
+
       /// Returns true if a CB muon fails some loose quaility requirements designed to remove pathological tracks 
-      virtual bool                isBadMuon(const xAOD::Muon&) const=0;
+      virtual bool isBadMuon(const xAOD::Muon&) const=0;
 
       /// Returns the quality of the muon. To set the value on the muon, instead call setQuality(xAOD::Muon&) const
       virtual xAOD::Muon::Quality getQuality( const xAOD::Muon& mu ) const =0;
 
      /// Returns true if the muon passes additional calo-tag quality cuts
-     virtual bool               passedCaloTagQuality (const xAOD::Muon& mu) const = 0;
+     virtual bool passedCaloTagQuality (const xAOD::Muon& mu) const = 0;
 
    }; // class IMuonSelectionTool
 
diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/MuonSelectorTools/MuonSelectionTool.h b/PhysicsAnalysis/MuonID/MuonSelectorTools/MuonSelectorTools/MuonSelectionTool.h
index eeb6ace7f4a19dcb6c029774736e12e76acab729..9c4cea00cf8bd0bfcae23444b3eb12036cd0da98 100644
--- a/PhysicsAnalysis/MuonID/MuonSelectorTools/MuonSelectorTools/MuonSelectionTool.h
+++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/MuonSelectorTools/MuonSelectionTool.h
@@ -73,8 +73,11 @@ namespace CP {
       void setPassesIDCuts(xAOD::Muon&) const;
 	  
       /// set the passes high pT cuts variable of the muon 
-      virtual void setPassesHighPtCuts( xAOD::Muon& mu ) const;
+      void setPassesHighPtCuts( xAOD::Muon& mu ) const;
 
+      /// set the passes low pT cuts variable of the muon
+      //void setPassesLowPtEfficiencyCuts( xAOD::Muon& mu ) const;
+     
       /// set the passes quality variable of the muon 
       void setQuality( xAOD::Muon& mu ) const;
 
@@ -90,17 +93,24 @@ namespace CP {
       /// Returns true if the muon passes the standard MCP High Pt cuts. To set the value on the muon, instead call setPassesHighPtCuts(xAOD::Muon&) const
       bool passedHighPtCuts(const xAOD::Muon&) const;
 
+      /// Returns true if the muon passes the standard MCP low pt cuts. To set the value on the muon, instead call setPassesLowPtEfficiencyCuts(xAOD::Muon&) const
+      bool passedLowPtEfficiencyCuts(const xAOD::Muon&) const;
+      bool passedLowPtEfficiencyCuts(const xAOD::Muon&, xAOD::Muon::Quality thisMu_quality) const;
+
+      /// Returns true if a CB muon fails a pt- and eta-dependent cut on the relative CB q/p error
+      bool passedErrorCutCB(const xAOD::Muon&) const;
+
       /// Returns true if a CB muon fails some loose quaility requirements designed to remove pathological tracks
       bool isBadMuon(const xAOD::Muon&) const;
 
       /// Returns the quality of the muon. To set the value on the muon, instead call setQuality(xAOD::Muon&) const
-      xAOD::Muon::Quality     getQuality( const xAOD::Muon& mu ) const;
+      xAOD::Muon::Quality getQuality( const xAOD::Muon& mu ) const;
 
-     /// Returns true if the muon passed additional calo-tag quality cuts
-     bool passedCaloTagQuality (const xAOD::Muon& mu) const;
+      /// Returns true if the muon passed additional calo-tag quality cuts
+      bool passedCaloTagQuality (const xAOD::Muon& mu) const;
 
-     /// Returns true if the muon passed the tight working point cuts    
-     bool passTight(const xAOD::Muon& mu, float rho, float oneOverPSig) const;
+      /// Returns true if the muon passed the tight working point cuts    
+      bool passTight(const xAOD::Muon& mu, float rho, float oneOverPSig) const;
       /// @}
 
 
diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx b/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx
index 2ce589d548f62e515ef2ba91010c00db7c6db7ca..4ad7ea57871afb0b27b530fd4299065668ad07e1 100644
--- a/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx
+++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/Root/MuonSelectionTool.cxx
@@ -18,7 +18,7 @@ namespace CP {
     
     declareProperty( "MaxEta", m_maxEta = 2.7 );
     //xAOD::MuonQuality enum {Tight, Medium, Loose, VeryLoose}
-    //corresponds to 0, 1, 2, 3, 4=HighPt
+    //corresponds to 0, 1, 2, 3, 4=HighPt, 5=LowPtEfficiency
     declareProperty( "MuQuality", m_quality = 1 );
     declareProperty( "ToroidOff", m_toroidOff = false );
     declareProperty( "TurnOffMomCorr", m_TurnOffMomCorr = false );
@@ -109,6 +109,11 @@ namespace CP {
                      "Selection of muons according to their type/author" );
     m_accept.addCut( "Quality",
 		     "Selection of muons according to their tightness" );
+    // Sanity check
+    if(m_quality>5 ){
+      ATH_MSG_ERROR( "Invalid quality (i.e. selection WP) set: " << m_quality << " - it must be an integer between 0 and 5! (0=Tight, 1=Medium, 2=Loose, 3=Veryloose, 4=HighPt, 5=LowPtEfficiency)" );
+      return StatusCode::FAILURE;
+    }
 
     // Load Tight WP cut-map
     ATH_MSG_INFO( "Initialising tight working point histograms..." );
@@ -143,7 +148,7 @@ namespace CP {
     // 
     file->Close();
     delete file;
-
+    
     // Return gracefully:
     return StatusCode::SUCCESS;
   }
@@ -200,7 +205,7 @@ namespace CP {
     
     // Reset the result:
     m_accept.clear();
-    
+
     // Do the eta cut:
     ATH_MSG_VERBOSE( "Muon eta: " << mu.eta() );
     if( std::abs( mu.eta() ) > m_maxEta ) {
@@ -223,15 +228,20 @@ namespace CP {
     m_accept.setCutResult( "Preselection", true );
 
     // Passes quality requirements 
-    ATH_MSG_VERBOSE( "Muon quality: " << getQuality(mu) << " isHighPt: "<<passedHighPtCuts(mu) );
-    if(m_quality<4 && getQuality(mu) > m_quality){
+    xAOD::Muon::Quality thisMu_quality = getQuality(mu);
+    bool thisMu_highpt = passedHighPtCuts(mu);
+    bool thisMu_lowptE = passedLowPtEfficiencyCuts(mu,thisMu_quality);
+    ATH_MSG_VERBOSE( "Muon quality: " << thisMu_quality << " passes HighPt: "<< thisMu_highpt << " passes LowPtEfficiency: "<< thisMu_lowptE );
+    if(m_quality<4 && thisMu_quality > m_quality){
       return m_accept;
     }
-    if(m_quality>=4 && !passedHighPtCuts(mu)){
+    if(m_quality==4 && !thisMu_highpt){
+      return m_accept;
+    }
+    if(m_quality==5 && !thisMu_lowptE){
       return m_accept;
     }
     m_accept.setCutResult( "Quality", true );
-    
     // Return the result:
     return m_accept;
   }
@@ -255,7 +265,7 @@ namespace CP {
       // rejection muons with out-of-bounds hits
       uint8_t combinedTrackOutBoundsPrecisionHits;
       if(!mu.summaryValue(combinedTrackOutBoundsPrecisionHits, xAOD::MuonSummaryType::combinedTrackOutBoundsPrecisionHits)) {
-	ATH_MSG_VERBOSE("getQuality - # of out-of-bounds hits missing in combined muon! Aborting.");
+	ATH_MSG_WARNING("getQuality - # of out-of-bounds hits missing in combined muon! Returning VeryLoose...");
         return xAOD::Muon::VeryLoose;
       }
       if (combinedTrackOutBoundsPrecisionHits>0){
@@ -265,7 +275,7 @@ namespace CP {
       uint8_t nprecisionLayers,nprecisionHoleLayers;      
       if (!mu.summaryValue(nprecisionLayers, xAOD::SummaryType::numberOfPrecisionLayers) || 
 	  !mu.summaryValue(nprecisionHoleLayers, xAOD::SummaryType::numberOfPrecisionHoleLayers)){
-	ATH_MSG_VERBOSE("getQuality - #precision layers missing in combined muon! Aborting.");
+	ATH_MSG_WARNING("getQuality - #precision layers missing in combined muon! Returning VeryLoose...");
 	return xAOD::Muon::VeryLoose;
       }
 
@@ -312,7 +322,7 @@ namespace CP {
 	       !mu.summaryValue(outerSmallHits, xAOD::MuonSummaryType::outerSmallHits) ||
 	       !mu.summaryValue(outerLargeHits, xAOD::MuonSummaryType::outerLargeHits) ){
 
-	    ATH_MSG_VERBOSE("getQuality - Muon in CSC region and MS hits information missing!!! Returning VeryLoose...");
+	    ATH_MSG_WARNING("getQuality - Muon in CSC region and MS hits information missing!!! Returning VeryLoose...");
 	    return xAOD::Muon::VeryLoose;
 	  }
 	  if( innerSmallHits>1  || innerLargeHits>1  ) nprecisionLayers += 1;
@@ -367,7 +377,7 @@ namespace CP {
 	     !mu.summaryValue(outerLargeHits, xAOD::MuonSummaryType::outerLargeHits) //||
 	     //mu.summaryValue(nGoodPrecLayers, xAOD::numberOfGoodPrecisionLayers) 
 	   ) {
-	  ATH_MSG_VERBOSE("getQuality - SA muon with missing MS hits information!!! Returning VeryLoose...");
+	  ATH_MSG_WARNING("getQuality - SA muon with missing MS hits information!!! Returning VeryLoose...");
 	  return xAOD::Muon::VeryLoose;
 	}
 
@@ -410,7 +420,7 @@ namespace CP {
                !mu.summaryValue(outerLargeHits, xAOD::MuonSummaryType::outerLargeHits)  
 	       //!mu.summaryValue(nGoodPrecLayers, xAOD::numberOfGoodPrecisionLayers) 
 	       ) {
-            ATH_MSG_VERBOSE("getQuality - SAF muon with missing MS hits information!!! Returning VeryLoose...");
+            ATH_MSG_WARNING("getQuality - SAF muon with missing MS hits information!!! Returning VeryLoose...");
             return xAOD::Muon::VeryLoose;
           }
 	  // requiring at least 3 good precision layers (for future improvements)
@@ -468,6 +478,10 @@ namespace CP {
   void MuonSelectionTool::setPassesHighPtCuts( xAOD::Muon& mu ) const {    
     mu.setPassesHighPtCuts(passedHighPtCuts(mu));
   }
+
+  /*void MuonSelectionTool::setPassesLowPtEfficiencyCuts( xAOD::Muon& mu ) const {
+    mu.setPassesLowPtEfficiencyCuts(passedLowPtEfficiencyCuts(mu));
+    }*/
   
   bool MuonSelectionTool::passedIDCuts( const xAOD::Muon& mu ) const {
     //using namespace xAOD;
@@ -519,7 +533,7 @@ namespace CP {
       // ::
       if( m_quality==4 ) { 
 	// recipe for high-pt selection
-	IsBadMuon = ( qOverPerr_ME*1000. > sqrt( pow(0.07*fabs(qOverP_ME*1000),2) + pow(0.0005*sin(metrack->theta()),2) ) );
+	IsBadMuon = !passedErrorCutCB(mu);
       } else {
 	// recipe for other WP
 	double IdCbRatio = fabs( (qOverPerr_ID/qOverP_ID) / (qOverPerr_CB/qOverP_CB) );
@@ -532,6 +546,68 @@ namespace CP {
     return IsBadMuon;
   }
 
+  bool MuonSelectionTool::passedLowPtEfficiencyCuts( const xAOD::Muon& mu ) const {
+    xAOD::Muon::Quality thisMu_quality = getQuality(mu);
+    return passedLowPtEfficiencyCuts(mu,thisMu_quality);
+  }
+
+  bool MuonSelectionTool::passedLowPtEfficiencyCuts( const xAOD::Muon& mu, xAOD::Muon::Quality thisMu_quality ) const {
+
+    // requiring combined muons
+    if( mu.muonType() != xAOD::Muon::Combined ) return false;
+    if( mu.author()!=xAOD::Muon::MuGirl && mu.author()!=xAOD::Muon::MuidCo ) return false;
+
+    // applying Medium selection above pT = 18 GeV 
+    if( mu.pt()/1000.>18. ) {
+      if( thisMu_quality <= xAOD::Muon::Medium ) return true;
+      else return false;
+    }
+
+    // requiring Medium in forward regions
+    if( fabs(mu.eta())>1.55 && thisMu_quality > xAOD::Muon::Medium ) return false;
+    
+    // rejection of muons with out-of-bounds hits 
+    uint8_t combinedTrackOutBoundsPrecisionHits;
+    if(!mu.summaryValue(combinedTrackOutBoundsPrecisionHits, xAOD::MuonSummaryType::combinedTrackOutBoundsPrecisionHits)) {
+      ATH_MSG_WARNING("passedLowPtEfficiencyCuts - # of out-of-bounds hits missing in combined muon! Failing selection...");
+      return false;
+    }
+    if (combinedTrackOutBoundsPrecisionHits>0) {
+      return false;
+    }
+
+    // requiring explicitely >=1 station (2 in the |eta|>1.3 region when Medium selection is not explicitely required)
+    uint8_t nprecisionLayers;
+    if (!mu.summaryValue(nprecisionLayers, xAOD::SummaryType::numberOfPrecisionLayers)){
+      ATH_MSG_WARNING("passedLowPtEfficiencyCuts - #precision layers missing in combined muon! Failing selection...");
+      return false;
+    }
+    uint nStationsCut = (fabs(mu.eta())>1.3&&fabs(mu.eta())<1.55) ? 2 : 1;
+    if ( nprecisionLayers<nStationsCut ) {
+      return false;
+    }
+
+    // reject MuGirl muon if not found also by MuTagIMO 
+    if( mu.author()==xAOD::Muon::MuGirl && !mu.isAuthor(xAOD::Muon::MuTagIMO) ) {
+      return false;
+    }
+
+    // apply some loose quality requirements 
+    float momentumBalanceSignificance(0.), scatteringCurvatureSignificance(0.), scatteringNeighbourSignificance(0.);
+    if( !mu.parameter(momentumBalanceSignificance,xAOD::Muon::momentumBalanceSignificance) 
+	|| !mu.parameter(scatteringCurvatureSignificance,xAOD::Muon::scatteringCurvatureSignificance) 
+	|| !mu.parameter(scatteringNeighbourSignificance,xAOD::Muon::scatteringNeighbourSignificance) ) {
+      ATH_MSG_WARNING("passedLowPtEfficiencyCuts - momentum balance, scatternig curvature or neighbour significances missing in combined muon! Failing selection...");
+      return false;
+    }
+    if( fabs(momentumBalanceSignificance)>3. || fabs(scatteringCurvatureSignificance)>3. || fabs(scatteringNeighbourSignificance)>3. ) {
+      return false;
+    }
+
+    // passed low pt selection 
+    return true;
+  }
+
   bool MuonSelectionTool::passedHighPtCuts( const xAOD::Muon& mu ) const {
     using namespace xAOD;
     
@@ -542,7 +618,7 @@ namespace CP {
     // :: Reject muons with out-of-bounds hits
     uint8_t combinedTrackOutBoundsPrecisionHits;
     if(!mu.summaryValue(combinedTrackOutBoundsPrecisionHits, xAOD::MuonSummaryType::combinedTrackOutBoundsPrecisionHits)) {
-      ATH_MSG_VERBOSE("getQuality - # of out-of-bounds hits missing in combined muon! Aborting.");
+      ATH_MSG_WARNING("passedHighPtCuts - # of out-of-bounds hits missing in combined muon! Failing selection...");
       return false;
     }
     if (combinedTrackOutBoundsPrecisionHits>0){
@@ -565,13 +641,13 @@ namespace CP {
 	 !mu.summaryValue(extendedSmallHoles, xAOD::MuonSummaryType::extendedSmallHoles) ||
 	 !mu.summaryValue(isSmallGoodSectors, xAOD::MuonSummaryType::isSmallGoodSectors)
        ){
-      ATH_MSG_VERBOSE("getQuality - MS hits information missing!!! Failing High-pT selection...");
+      ATH_MSG_WARNING("passedHighPtCuts - MS hits information missing!!! Failing High-pT selection...");
       return false;
     }
 
     //::: Require 3 (good) station muons
     if( nprecisionLayers < 3 ) return false;
-    if( nGoodPrecLayers < 3 ) return false;
+    //if( nGoodPrecLayers < 3 ) return false; // postponed (further studies needed)
 
     //::: Apply MS Chamber Vetoes
     // Given according to their eta-phi locations in the muon spectrometer
@@ -585,7 +661,7 @@ namespace CP {
 	&& ( mu.muonSpectrometerTrackParticleLink() ).isValid() 
       ) MS_track = mu.trackParticle( xAOD::Muon::MuonSpectrometerTrackParticle );    
     else{
-      ATH_MSG_WARNING( "passedHighPtCuts - No MS track available for muon. Using combined track." );
+      ATH_MSG_VERBOSE( "passedHighPtCuts - No MS track available for muon. Using combined track." );
       MS_track = mu.trackParticle( xAOD::Muon::CombinedTrackParticle );
     }
     
@@ -621,15 +697,17 @@ namespace CP {
 	     || ( fabs( phiMS ) >= BEE_phi[ 6 ] && fabs( phiMS ) <= BEE_phi[ 7 ] ) 
 	     ) {
 	  // Muon falls in the BEE eta-phi region: asking for 4 good precision layers
-	  if( nGoodPrecLayers < 4 ) return false;
+	  //if( nGoodPrecLayers < 4 ) return false; // postponed (further studies needed) 
+	  if( nprecisionLayers < 4 ) return false;
 	}  
       }
       if( fabs(etaCB)>1.4 ) {
 	// Veto residual 3-station muons in BEE region due to MS eta/phi resolution effects
-	if( nGoodPrecLayers<4 && (extendedSmallHits>0||extendedSmallHoles>0) ) return false;
+	//if( nGoodPrecLayers<4 && (extendedSmallHits>0||extendedSmallHoles>0) ) return false; // postponed (further studies needed)
+	if( nprecisionLayers<4 && (extendedSmallHits>0||extendedSmallHoles>0) ) return false;
       }
     } else {
-      ATH_MSG_VERBOSE( "passedHighPtCuts - MS or CB track missing in muon! Aborting." );
+      ATH_MSG_WARNING( "passedHighPtCuts - MS or CB track missing in muon! Failing High-pT selection..." );
       return false;
     }
 
@@ -676,6 +754,46 @@ namespace CP {
     return true;
   }
 
+  bool MuonSelectionTool::passedErrorCutCB( const xAOD::Muon& mu ) const {
+    // ::
+    if( mu.muonType() != xAOD::Muon::Combined ) return false;
+    // :: 
+    float fabs_eta = fabs(mu.eta());
+    float p0(8.0), p1(0.034), p2(0.00011);
+    if( fabs_eta>1.05 && fabs_eta<1.3 ) {
+      p1=0.036;
+      p2=0.00012;
+    } else if( fabs_eta>1.3 && fabs_eta<1.7 ) {
+      p1=0.051;
+      p2=0.00014;
+    } else if( fabs_eta>1.7 && fabs_eta<2.0 ) {
+      p1=0.042;
+      p2=0.00010;
+    } else if( fabs_eta>2.0) {
+      p1=0.034;
+      p2=0.00013;
+    }
+    // :: 
+    bool passErrorCutCB = false;
+    const xAOD::TrackParticle* cbtrack = mu.trackParticle( xAOD::Muon::CombinedTrackParticle );
+    if( cbtrack ) {
+      // ::
+      double pt_CB = (cbtrack->pt() / 1000. < 5000.) ? cbtrack->pt() / 1000. : 5000.; // GeV
+      double qOverP_CB = cbtrack->qOverP();
+      double qOverPerr_CB = sqrt( cbtrack->definingParametersCovMatrix()(4,4) );
+      // sigma represents the average expected error at the muon's pt/eta 
+      double sigma = sqrt( pow(p0/pt_CB,2) + pow(p1,2) + pow(p2*pt_CB,2) );
+      // cuttting at 1.8*sigma for pt <=1 TeV, then linearly tightening untill 1*sigma is reached at pt >= 5TeV. 
+      double coefficient = (pt_CB > 1000.) ? (2.0-0.0002*pt_CB) : 1.8;
+      // ::
+      if( fabs(qOverPerr_CB/qOverP_CB) < coefficient*sigma ) {
+        passErrorCutCB = true;
+      }
+    }
+    // :: 
+    return passErrorCutCB;
+  }
+
   bool MuonSelectionTool::passedMuonCuts( const xAOD::Muon& mu ) const {
     // ::
     if( mu.muonType() == xAOD::Muon::Combined ) { 
diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/cmt/Makefile.RootCore b/PhysicsAnalysis/MuonID/MuonSelectorTools/cmt/Makefile.RootCore
deleted file mode 100644
index ad6093bd939785b4d090a586009636dd27b5882c..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/MuonID/MuonSelectorTools/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,16 +0,0 @@
-PACKAGE          = MuonSelectorTools
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS =
-PACKAGE_DEP      = AsgTools PATCore xAODMuon xAODEventInfo xAODTracking xAODRootAccess xAODCore PathResolver
-PACKAGE_TRYDEP   =
-PACKAGE_CLEAN    =
-PACKAGE_NOGRID   =
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/cmt/requirements b/PhysicsAnalysis/MuonID/MuonSelectorTools/cmt/requirements
deleted file mode 100644
index 71a2703fadd189729fa1be720a4d949381c23aa6..0000000000000000000000000000000000000000
--- a/PhysicsAnalysis/MuonID/MuonSelectorTools/cmt/requirements
+++ /dev/null
@@ -1,33 +0,0 @@
-package MuonSelectorTools 
-author Stefano Zambito <stefano.zambito@cern.ch>   
-
-public
-use  AtlasPolicy                AtlasPolicy-*
-use  AsgTools                   AsgTools-*                      Control/AthToolSupport
-use  GaudiInterface             GaudiInterface-*                External
-use  PATCore                    PATCore-*                       PhysicsAnalysis/AnalysisCommon
-use  xAODMuon                   xAODMuon-*                      Event/xAOD
-use  xAODEventInfo              xAODEventInfo-*                 Event/xAOD
-use  AtlasROOT                  AtlasROOT-*                     External
-use  PathResolver               PathResolver-*                  Tools
-private
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  xAODCore                   xAODCore-*                      Event/xAOD
-use  xAODTracking               xAODTracking-*                  Event/xAOD
-end_private
-
-# Change to a dual_use library because the lcgdict pattern doesn't work with a pure component library 
-# when building using cmake since such a library can't be linked against. This does pollute the list
-# of libraries for clients (if any), but the as-needed linkopts eliminates any bloat from this.
-apply_pattern dual_use_library files="*.cxx ../Root/*.cxx"
-####library MuonSelectorTools *.cxx ../Root/*.cxx components/*.cxx
-####apply_pattern component_library
-
-## install our job options files
-apply_pattern declare_joboptions files="*.py"
-
-# Generate dictionaries
-private
-use AtlasReflex AtlasReflex-* External -no-auto-imports
-apply_pattern lcgdict dict=MuonSelectorTools selectionfile=selection.xml headerfiles="../MuonSelectorTools/MuonSelectorToolsDict.h"
-
diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/python/MuonSelectorCutDefs.py b/PhysicsAnalysis/MuonID/MuonSelectorTools/python/MuonSelectorCutDefs.py
index 4335f1738b8e557319a6f15d2e3bcc2af0c4cba4..15e47261c6c2353d0256d1c572fbf789857b9247 100644
--- a/PhysicsAnalysis/MuonID/MuonSelectorTools/python/MuonSelectorCutDefs.py
+++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/python/MuonSelectorCutDefs.py
@@ -10,6 +10,11 @@
 ##
 ##=============================================================================
 
+# import the needed Reflex and ROOT stuff
+import PyCintex
+PyCintex.Cintex.Enable()
+import ROOT
+
 # Import a needed helper
 from PATCore.HelperUtils import *
 
diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/src/MuonQualityUpdaterAlg.cxx b/PhysicsAnalysis/MuonID/MuonSelectorTools/src/MuonQualityUpdaterAlg.cxx
index 79967806d2331a5074fded9a13903b7307527ea1..064753ea14ee82fce8af1491569da4d4baca06f7 100644
--- a/PhysicsAnalysis/MuonID/MuonSelectorTools/src/MuonQualityUpdaterAlg.cxx
+++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/src/MuonQualityUpdaterAlg.cxx
@@ -44,6 +44,7 @@ namespace CP {
       m_tool->setQuality(*muon);
       m_tool->setPassesHighPtCuts(*muon);
       m_tool->setPassesIDCuts(*muon);
+      //m_tool->setPassesLowPtEfficiencyCuts(*muon);
     }
 
     return StatusCode::SUCCESS;
diff --git a/PhysicsAnalysis/MuonID/MuonSelectorTools/src/MuonSelectionAlg.h b/PhysicsAnalysis/MuonID/MuonSelectorTools/src/MuonSelectionAlg.h
index bd03d9134b9f86896d738041eb3cc4c5f0f1ff30..010bab0e300c17dfc80947b5bc07d88b8ae4baae 100644
--- a/PhysicsAnalysis/MuonID/MuonSelectorTools/src/MuonSelectionAlg.h
+++ b/PhysicsAnalysis/MuonID/MuonSelectorTools/src/MuonSelectionAlg.h
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-
 //Simple alg to wrap the selectiontool
 //outputs a view container of the selected muons, if m_outputMuons different to m_inputMuons
 
@@ -37,4 +36,4 @@ class MuonSelectionAlg : public AthAlgorithm {
 
 }
 
-#endif
\ No newline at end of file
+#endif
diff --git a/PhysicsAnalysis/MuonID/MuonTagTools/MuonTagTools/MuonTagTool.h b/PhysicsAnalysis/MuonID/MuonTagTools/MuonTagTools/MuonTagTool.h
index 74bb95ae63ae176d6771c7c0ab29e7b324b3c3af..75719e11fa6e92a0b36877ee3554af5a022149ed 100644
--- a/PhysicsAnalysis/MuonID/MuonTagTools/MuonTagTools/MuonTagTool.h
+++ b/PhysicsAnalysis/MuonID/MuonTagTools/MuonTagTools/MuonTagTool.h
@@ -103,6 +103,8 @@ class MuonTagTool : public AthAlgTool {
 
   /** PV StoreGate key */
   std::string m_vxCandidate;
+
+  bool m_doIso;
 };
 
 #endif // MUONTAGTOOL_H
diff --git a/PhysicsAnalysis/MuonID/MuonTagTools/doc/packagedoc.h b/PhysicsAnalysis/MuonID/MuonTagTools/doc/packagedoc.h
index df2c7f23c30a8790f3c5e1b18a1f45ffdaeafa6a..47df12fe7d5ace203c9140e574c9a0d321517196 100644
--- a/PhysicsAnalysis/MuonID/MuonTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/MuonID/MuonTagTools/doc/packagedoc.h
@@ -16,10 +16,6 @@ MuonTagTools contains the following tools:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section MuonTagTools_used_packagesMuonTagTools Used packages
 
-@section MuonTagTools_requirementsMuonTagTools Requirements
 
 */
-
-
diff --git a/PhysicsAnalysis/MuonID/MuonTagTools/share/MuonTagTool_jobOptions.py b/PhysicsAnalysis/MuonID/MuonTagTools/share/MuonTagTool_jobOptions.py
index f3ba545f076615be06e59e42ef41a34e0f2ba97a..0e2c95a541eb48d3d7e166fad872fc083426f2fe 100644
--- a/PhysicsAnalysis/MuonID/MuonTagTools/share/MuonTagTool_jobOptions.py
+++ b/PhysicsAnalysis/MuonID/MuonTagTools/share/MuonTagTool_jobOptions.py
@@ -56,6 +56,7 @@ ToolSvc += FixedCutLooseIsoTool
 
 from RecExConfig.RecFlags import rec
 from MuonTagTools.MuonTagToolsConf import MuonTagTool as ConfiguredMuonTagTool
+from MuonRecExample.MuonRecFlags import muonRecFlags
 MuonTagTool = ConfiguredMuonTagTool(Container              = theMuonCollection,
                                     MuonMETContainerName   = MuonMETContainerName,
                                     PtCut                  = 6.0*GeV,
@@ -73,6 +74,7 @@ MuonTagTool = ConfiguredMuonTagTool(Container              = theMuonCollection,
                                     GradientIsolation      = GradientIsoTool   ,
                                     GradientLooseIsolation = GradientLooseIsoTool,
                                     FixedCutTightTrackOnlyIsolation= FixedCutTightTrackOnlyIsoTool,
-                                    FixedCutLooseIsolation         = FixedCutLooseIsoTool
+                                    FixedCutLooseIsolation         = FixedCutLooseIsoTool,
+                                    DoIsolation = muonRecFlags.doMuonIso()
                                     )
 ToolSvc += MuonTagTool
diff --git a/PhysicsAnalysis/MuonID/MuonTagTools/src/MuonTagTool.cxx b/PhysicsAnalysis/MuonID/MuonTagTools/src/MuonTagTool.cxx
index 36b48b4ac0a03d96fd15d6c21c01c0a5d9905452..bcc03d5c9f876a5833a86d77ac29a7cf39a0713a 100644
--- a/PhysicsAnalysis/MuonID/MuonTagTools/src/MuonTagTool.cxx
+++ b/PhysicsAnalysis/MuonID/MuonTagTools/src/MuonTagTool.cxx
@@ -98,6 +98,7 @@ MuonTagTool::MuonTagTool (const std::string& type, const std::string& name,
   declareProperty("GradientIsolation",       m_gradient_isolation);
   declareProperty("FixedCutTightTrackOnlyIsolation", m_fixedcut_tight_trackonly_isolation);
   declareProperty("FixedCutLooseIsolation",          m_fixedcut_loose_isolation);
+  declareProperty("DoIsolation", m_doIso=true);
 
   declareInterface<MuonTagTool>( this );
 }
@@ -111,31 +112,33 @@ StatusCode  MuonTagTool::initialize() {
   /** retrieve and check the muon selector tool*/
   ATH_CHECK ( m_muon_selection_tool.retrieve() );
   /** retrieve and check the muon isolation tool*/
-  CHECK(m_loose_trackonly_isolation.retrieve());
-  CHECK(m_loose_isolation.retrieve());
-  CHECK(m_tight_isolation.retrieve());
-  CHECK(m_gradient_loose_isolation.retrieve());
-  CHECK(m_gradient_isolation.retrieve());
-  CHECK(m_fixedcut_tight_trackonly_isolation.retrieve());
-  CHECK(m_fixedcut_loose_isolation.retrieve());
-
-  if (m_etconeisorelcutvalues.size() > 2) {
-    ATH_MSG_FATAL ("More than to EtconeRel values are not permitted");
-    return StatusCode::FAILURE;
-  }
-  if (m_etconeisocutvalues.size() > 2) {
-    ATH_MSG_FATAL ("More than to Etcone values are not permitted");
-    return StatusCode::FAILURE;
-  }
-  if (m_ptconeisorelcutvalues.size() > 2) {
-    ATH_MSG_FATAL ("More than to PtconeRel values are not permitted");
-    return StatusCode::FAILURE;
-  }
-  if (m_ptconeisocutvalues.size() > 2) {
-    ATH_MSG_FATAL ("More than to Ptcone values are not permitted");
-    return StatusCode::FAILURE;
+  if(m_doIso){
+    CHECK(m_loose_trackonly_isolation.retrieve());
+    CHECK(m_loose_isolation.retrieve());
+    CHECK(m_tight_isolation.retrieve());
+    CHECK(m_gradient_loose_isolation.retrieve());
+    CHECK(m_gradient_isolation.retrieve());
+    CHECK(m_fixedcut_tight_trackonly_isolation.retrieve());
+    CHECK(m_fixedcut_loose_isolation.retrieve());
+    
+    if (m_etconeisorelcutvalues.size() > 2) {
+      ATH_MSG_FATAL ("More than to EtconeRel values are not permitted");
+      return StatusCode::FAILURE;
+    }
+    if (m_etconeisocutvalues.size() > 2) {
+      ATH_MSG_FATAL ("More than to Etcone values are not permitted");
+      return StatusCode::FAILURE;
+    }
+    if (m_ptconeisorelcutvalues.size() > 2) {
+      ATH_MSG_FATAL ("More than to PtconeRel values are not permitted");
+      return StatusCode::FAILURE;
+    }
+    if (m_ptconeisocutvalues.size() > 2) {
+      ATH_MSG_FATAL ("More than to Ptcone values are not permitted");
+      return StatusCode::FAILURE;
+    }
   }
-  
+
   return StatusCode::SUCCESS;
 }
 
@@ -243,7 +246,7 @@ StatusCode MuonTagTool::execute(TagFragmentCollection & muonTagCol, const int ma
       /** fix calibration using tool */
       ATH_MSG_DEBUG("Un-Calibrated pt = " << shallowCopyMuon->pt());
       if(m_muon_calibration_tool->applyCorrection(*shallowCopyMuon) != CP::CorrectionCode::Ok){
-          ATH_MSG_WARNING("Cannot calibrate muon");
+	ATH_MSG_WARNING("Cannot calibrate muon");
       }
       ATH_MSG_DEBUG("Calibrated pt = " << shallowCopyMuon->pt()); 
 
@@ -345,252 +348,252 @@ StatusCode MuonTagTool::execute(TagFragmentCollection & muonTagCol, const int ma
     muonTagCol.insert( m_phiStr[i], muon.phi() );
     
     unsigned int iso = 0x0;
+    unsigned int tightness = 0x0; 
 
     /** now start filling the isolation information */
+    if(m_doIso){
+      /** let's compute the etcone20 isolation of the muon */
 
-    /** let's compute the etcone20 isolation of the muon */
-
-    float etcone     = 0.0;
-    if( ! muon.isolation(etcone,xAOD::Iso::etcone20) ){
-      ATH_MSG_ERROR("No etcone defined");
-    }
-    else{
-      
-      /** apply etcone/pt cuts first */
-      
-      float etcone_rel= etcone/muon.pt();
-      ATH_MSG_DEBUG("etcone20/pt = "<< etcone_rel);
-      
-      /* Etcone20/pt are bits 0 and 1 */
-      
-      for (unsigned int j=0; j<m_etconeisorelcutvalues.size(); j++) {
-        if( etcone_rel < m_etconeisorelcutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting Etcone20/pt isolation: bit " << j );
-          iso |= 1 << j;
-        }
+      float etcone     = 0.0;
+      if( ! muon.isolation(etcone,xAOD::Iso::etcone20) ){
+	ATH_MSG_ERROR("No etcone defined");
       }
+      else{
       
-      /* Etcone20 are bits 8 and 9 */
-      
-      for (unsigned int j=0; j<m_etconeisocutvalues.size(); j++) {
-        if ( etcone < m_etconeisocutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting Etcone20 isolation: bit " << j+8 );
-          iso |= 1 << (8+j);
-        }
-      } 
-    }
+	/** apply etcone/pt cuts first */
+	
+	float etcone_rel= etcone/muon.pt();
+	ATH_MSG_DEBUG("etcone20/pt = "<< etcone_rel);
+      
+	/* Etcone20/pt are bits 0 and 1 */
+      
+	for (unsigned int j=0; j<m_etconeisorelcutvalues.size(); j++) {
+	  if( etcone_rel < m_etconeisorelcutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting Etcone20/pt isolation: bit " << j );
+	    iso |= 1 << j;
+	  }
+	}
+      
+	/* Etcone20 are bits 8 and 9 */
+      
+	for (unsigned int j=0; j<m_etconeisocutvalues.size(); j++) {
+	  if ( etcone < m_etconeisocutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting Etcone20 isolation: bit " << j+8 );
+	    iso |= 1 << (8+j);
+	  }
+	} 
+      }
     
-    /** let's compute the etcone20 isolation of the muon */
+      /** let's compute the etcone20 isolation of the muon */
     
-    if( ! muon.isolation(etcone,xAOD::Iso::topoetcone20) ){
-      ATH_MSG_ERROR("No topoetcone20 defined");
-    }
-    else{
+      if( ! muon.isolation(etcone,xAOD::Iso::topoetcone20) ){
+	ATH_MSG_ERROR("No topoetcone20 defined");
+      }
+      else{
       
-      /** apply topoEtcone20/pt cuts first */
+	/** apply topoEtcone20/pt cuts first */
       
-      float etcone_rel= etcone/muon.pt();
-      ATH_MSG_DEBUG("topoetcone20/pt = "<< etcone_rel);
+	float etcone_rel= etcone/muon.pt();
+	ATH_MSG_DEBUG("topoetcone20/pt = "<< etcone_rel);
       
-      /* topoEtcone20/pt are bits 2 and 3 */
+	/* topoEtcone20/pt are bits 2 and 3 */
       
-      for (unsigned int j=0; j<m_etconeisorelcutvalues.size(); j++) {
-        if( etcone_rel < m_etconeisorelcutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting TopoEtcone20/pt isolation: bit " << j );
-          iso |= 1 << (2 + j);
-        }
-      }
+	for (unsigned int j=0; j<m_etconeisorelcutvalues.size(); j++) {
+	  if( etcone_rel < m_etconeisorelcutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting TopoEtcone20/pt isolation: bit " << j );
+	    iso |= 1 << (2 + j);
+	  }
+	}
       
-      /* topo20Etcone/pt are bits 10 and 11 */
+	/* topo20Etcone/pt are bits 10 and 11 */
       
-      for (unsigned int j=0; j<m_etconeisocutvalues.size(); j++) {
-        if ( etcone < m_etconeisocutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting TopoEtcone20: bit " << j+10 );
-          iso |= 1 << (10+j);
-        }
-      } 
-    }
+	for (unsigned int j=0; j<m_etconeisocutvalues.size(); j++) {
+	  if ( etcone < m_etconeisocutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting TopoEtcone20: bit " << j+10 );
+	    iso |= 1 << (10+j);
+	  }
+	} 
+      }
     
-    /** let's compute the etcone30 isolation of the muon */
+      /** let's compute the etcone30 isolation of the muon */
     
-    if( ! muon.isolation(etcone,xAOD::Iso::topoetcone30) ){
-      ATH_MSG_ERROR("No topoetcone30 defined");
-    }
-    else{
+      if( ! muon.isolation(etcone,xAOD::Iso::topoetcone30) ){
+	ATH_MSG_ERROR("No topoetcone30 defined");
+      }
+      else{
       
-      /** apply topoEtcone30/pt cuts first */
+	/** apply topoEtcone30/pt cuts first */
       
-      float etcone_rel= etcone/muon.pt();
-      ATH_MSG_DEBUG("topoetcone30/pt = "<< etcone_rel);
+	float etcone_rel= etcone/muon.pt();
+	ATH_MSG_DEBUG("topoetcone30/pt = "<< etcone_rel);
       
-      /* topoEtcone30/pt are bits 4 and 5 */
+	/* topoEtcone30/pt are bits 4 and 5 */
       
-      for (unsigned int j=0; j<m_etconeisorelcutvalues.size(); j++) {
-        if( etcone_rel < m_etconeisorelcutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting topoEtcone30/pt isolation: bit " << j+4 );
-          iso |= 1 << (4 + j);
-        }
-      }
+	for (unsigned int j=0; j<m_etconeisorelcutvalues.size(); j++) {
+	  if( etcone_rel < m_etconeisorelcutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting topoEtcone30/pt isolation: bit " << j+4 );
+	    iso |= 1 << (4 + j);
+	  }
+	}
       
-      /* topo30Etcone are bits 12 and 13 */
+	/* topo30Etcone are bits 12 and 13 */
       
-      for (unsigned int j=0; j<m_etconeisocutvalues.size(); j++) {
-        if ( etcone < m_etconeisocutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting topoEtcone30 isolation: bit " << j+12 );
-          iso |= 1 << (12+j);
-        }
-      } 
-    }
+	for (unsigned int j=0; j<m_etconeisocutvalues.size(); j++) {
+	  if ( etcone < m_etconeisocutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting topoEtcone30 isolation: bit " << j+12 );
+	    iso |= 1 << (12+j);
+	  }
+	} 
+      }
     
-    /** let's compute the etcone40 isolation of the muon */
+      /** let's compute the etcone40 isolation of the muon */
     
-    if( ! muon.isolation(etcone,xAOD::Iso::topoetcone40) ){
-      ATH_MSG_ERROR("No topoetcone40 defined");
-    }
-    else{
+      if( ! muon.isolation(etcone,xAOD::Iso::topoetcone40) ){
+	ATH_MSG_ERROR("No topoetcone40 defined");
+      }
+      else{
       
-      /** apply topoEtcone40/pt cuts first */
+	/** apply topoEtcone40/pt cuts first */
       
-      float etcone_rel= etcone/muon.pt();
-      ATH_MSG_DEBUG("topoetcone40/pt = "<< etcone_rel);
+	float etcone_rel= etcone/muon.pt();
+	ATH_MSG_DEBUG("topoetcone40/pt = "<< etcone_rel);
       
-      /* topo40Etcone/pt are bits 6 and 7 */
+	/* topo40Etcone/pt are bits 6 and 7 */
       
-      for (unsigned int j=0; j<m_etconeisorelcutvalues.size(); j++) {
-        if( etcone_rel < m_etconeisorelcutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting topoEtcone40/pt isolation: bit " << j+6 );
-          iso |= 1 << (6 + j);
-        }
-      }
+	for (unsigned int j=0; j<m_etconeisorelcutvalues.size(); j++) {
+	  if( etcone_rel < m_etconeisorelcutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting topoEtcone40/pt isolation: bit " << j+6 );
+	    iso |= 1 << (6 + j);
+	  }
+	}
       
-      /* topo40Etcone are bits 14 and 15 */
+	/* topo40Etcone are bits 14 and 15 */
       
-      for (unsigned int j=0; j<m_etconeisocutvalues.size(); j++) {
-        if ( etcone < m_etconeisocutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting topoEtcone40 isolation: bit " << j+14 );
-          iso |= 1 << (14+j);
-        }
-      } 
-    }
+	for (unsigned int j=0; j<m_etconeisocutvalues.size(); j++) {
+	  if ( etcone < m_etconeisocutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting topoEtcone40 isolation: bit " << j+14 );
+	    iso |= 1 << (14+j);
+	  }
+	} 
+      }
     
-    /** let's compute the ptcone20 isolation of the muon */
+      /** let's compute the ptcone20 isolation of the muon */
     
-    float ptcone = 0.0 ;
-    if( ! muon.isolation(ptcone,xAOD::Iso::ptcone20) ){
-      ATH_MSG_ERROR("No ptcone20 defined");
-    }
-    else{
+      float ptcone = 0.0 ;
+      if( ! muon.isolation(ptcone,xAOD::Iso::ptcone20) ){
+	ATH_MSG_ERROR("No ptcone20 defined");
+      }
+      else{
       
-      /** apply ptcone20/pt cuts first */
+	/** apply ptcone20/pt cuts first */
       
-      float ptcone_rel= ptcone/muon.pt();
-      ATH_MSG_DEBUG("ptcone20/pt = "<< ptcone_rel);
+	float ptcone_rel= ptcone/muon.pt();
+	ATH_MSG_DEBUG("ptcone20/pt = "<< ptcone_rel);
       
-      /* ptcone20/pt are bits 16 and 17 */
+	/* ptcone20/pt are bits 16 and 17 */
       
-      for (unsigned int j=0; j<m_ptconeisorelcutvalues.size(); j++) {
-        if ( ptcone_rel < m_ptconeisorelcutvalues[j] ){
-          ATH_MSG_DEBUG("Setting ptcone20/pt isolation: bit " << j+16 );
-          iso |= 1 << (16+j);
-        }
-      } 
+	for (unsigned int j=0; j<m_ptconeisorelcutvalues.size(); j++) {
+	  if ( ptcone_rel < m_ptconeisorelcutvalues[j] ){
+	    ATH_MSG_DEBUG("Setting ptcone20/pt isolation: bit " << j+16 );
+	    iso |= 1 << (16+j);
+	  }
+	} 
       
-      /* ptcone20 are bits 24 and 25 */
+	/* ptcone20 are bits 24 and 25 */
       
-      ATH_MSG_DEBUG("ptcone20 = "<< ptcone);
+	ATH_MSG_DEBUG("ptcone20 = "<< ptcone);
       
-      for (unsigned int j=0; j<m_ptconeisocutvalues.size(); j++) {
-        if ( ptcone < m_ptconeisocutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting ptcone20 isolation: bit " << j+24 );
-          iso |= 1 << (24+j);
-        }     
+	for (unsigned int j=0; j<m_ptconeisocutvalues.size(); j++) {
+	  if ( ptcone < m_ptconeisocutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting ptcone20 isolation: bit " << j+24 );
+	    iso |= 1 << (24+j);
+	  }     
+	}
       }
-    }
     
-    /** let's compute the ptcone30 isolation of the muon */
+      /** let's compute the ptcone30 isolation of the muon */
     
-    if( ! muon.isolation(ptcone,xAOD::Iso::ptcone30) ){
-      ATH_MSG_ERROR("No ptcone30 defined");
-    }
-    else{
+      if( ! muon.isolation(ptcone,xAOD::Iso::ptcone30) ){
+	ATH_MSG_ERROR("No ptcone30 defined");
+      }
+      else{
       
-      /** apply ptcone30/pt cuts first */
+	/** apply ptcone30/pt cuts first */
       
-      float ptcone_rel= ptcone/muon.pt();
-      ATH_MSG_DEBUG("ptcone30/pt = "<< ptcone_rel);
+	float ptcone_rel= ptcone/muon.pt();
+	ATH_MSG_DEBUG("ptcone30/pt = "<< ptcone_rel);
       
-      /* ptcone30 are bits 18 and 19 */
+	/* ptcone30 are bits 18 and 19 */
       
-      for (unsigned int j=0; j<m_ptconeisorelcutvalues.size(); j++) {
-        if ( ptcone_rel < m_ptconeisorelcutvalues[j] ){
-          ATH_MSG_DEBUG("Setting ptcone30/pt isolation: bit " << j+18 );
-          iso |= 1 << (18+j);
-        }
-      } 
+	for (unsigned int j=0; j<m_ptconeisorelcutvalues.size(); j++) {
+	  if ( ptcone_rel < m_ptconeisorelcutvalues[j] ){
+	    ATH_MSG_DEBUG("Setting ptcone30/pt isolation: bit " << j+18 );
+	    iso |= 1 << (18+j);
+	  }
+	} 
       
-      /* ptcone30 are bits 26 and 27 */      
+	/* ptcone30 are bits 26 and 27 */      
       
-      ATH_MSG_DEBUG("ptcone30 = "<< ptcone);
+	ATH_MSG_DEBUG("ptcone30 = "<< ptcone);
       
-      for (unsigned int j=0; j<m_ptconeisocutvalues.size(); j++) {
-        if ( ptcone < m_ptconeisocutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting ptcone30 solation: bit " << j+26 );
-          iso |= 1 << (26+j);
-        }     
+	for (unsigned int j=0; j<m_ptconeisocutvalues.size(); j++) {
+	  if ( ptcone < m_ptconeisocutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting ptcone30 solation: bit " << j+26 );
+	    iso |= 1 << (26+j);
+	  }     
+	}
       }
-    }
     
-    /** let's compute the ptcone20 isolation of the muon */
+      /** let's compute the ptcone20 isolation of the muon */
     
-    if( ! muon.isolation(ptcone,xAOD::Iso::ptcone40) ){
-      ATH_MSG_ERROR("No ptcone40 defined");
-    }
-    else{
+      if( ! muon.isolation(ptcone,xAOD::Iso::ptcone40) ){
+	ATH_MSG_ERROR("No ptcone40 defined");
+      }
+      else{
       
-      /** apply ptcone40/pt cuts first */
+	/** apply ptcone40/pt cuts first */
       
-      float ptcone_rel= ptcone/muon.pt();
-      ATH_MSG_DEBUG("ptcone40/pt = "<< ptcone_rel);
+	float ptcone_rel= ptcone/muon.pt();
+	ATH_MSG_DEBUG("ptcone40/pt = "<< ptcone_rel);
       
-      /* ptcone40/pt are bits 20 and 21 */
+	/* ptcone40/pt are bits 20 and 21 */
       
-      for (unsigned int j=0; j<m_ptconeisorelcutvalues.size(); j++) {
-        if ( ptcone_rel < m_ptconeisorelcutvalues[j] ){
-          ATH_MSG_DEBUG("Setting ptcone40/pt isolation: bit " << j+20 );
-          iso |= 1 << (20+j);
-        }
-      } 
+	for (unsigned int j=0; j<m_ptconeisorelcutvalues.size(); j++) {
+	  if ( ptcone_rel < m_ptconeisorelcutvalues[j] ){
+	    ATH_MSG_DEBUG("Setting ptcone40/pt isolation: bit " << j+20 );
+	    iso |= 1 << (20+j);
+	  }
+	} 
       
-      /* ptcone40 are bits 28 and 29 */
+	/* ptcone40 are bits 28 and 29 */
       
-      ATH_MSG_DEBUG("ptcone40 = "<< ptcone);
+	ATH_MSG_DEBUG("ptcone40 = "<< ptcone);
       
-      for (unsigned int j=0; j<m_ptconeisocutvalues.size(); j++) {
-        if ( ptcone < m_ptconeisocutvalues[j] ) {
-          ATH_MSG_DEBUG("Setting ptcone40 isolation: bit " << j+28 );
-          iso |= 1 << (28+j);
-        }     
+	for (unsigned int j=0; j<m_ptconeisocutvalues.size(); j++) {
+	  if ( ptcone < m_ptconeisocutvalues[j] ) {
+	    ATH_MSG_DEBUG("Setting ptcone40 isolation: bit " << j+28 );
+	    iso |= 1 << (28+j);
+	  }     
+	}
       }
-    }
 
-    if( msgLvl(MSG::DEBUG) ){
-      std::bitset<32> bits(iso);
-      ATH_MSG_DEBUG("Isolation: " << iso << " bits: " << bits.to_string() );
-    }
+      if( msgLvl(MSG::DEBUG) ){
+	std::bitset<32> bits(iso);
+	ATH_MSG_DEBUG("Isolation: " << iso << " bits: " << bits.to_string() );
+      }
     
-    muonTagCol.insert( m_isoStr[i], iso );
+      muonTagCol.insert( m_isoStr[i], iso );
     
-    unsigned int tightness = 0x0; 
-
-    /**  Using Isolation Tool to fill bit from 22,23,30,31  with loose_trackonly,loose,tight,gradientloose,gradient*/    
-    if(m_loose_trackonly_isolation->accept(**muonItr))tightness |= (1 << 24);
-    if(m_loose_isolation->accept(**muonItr))          tightness |= (1 << 25);
-    if(m_tight_isolation->accept(**muonItr))          tightness |= (1 << 26);
-    if(m_gradient_isolation->accept(**muonItr))       tightness |= (1 << 27);
-    if(m_gradient_loose_isolation->accept(**muonItr)) tightness |= (1 << 28);
-    if(m_fixedcut_tight_trackonly_isolation->accept(**muonItr))tightness |= (1 << 29);
-    if(m_fixedcut_loose_isolation->accept(**muonItr))          tightness |= (1 << 30);
 
+      /**  Using Isolation Tool to fill bit from 22,23,30,31  with loose_trackonly,loose,tight,gradientloose,gradient*/    
+      if(m_loose_trackonly_isolation->accept(**muonItr))tightness |= (1 << 24);
+      if(m_loose_isolation->accept(**muonItr))          tightness |= (1 << 25);
+      if(m_tight_isolation->accept(**muonItr))          tightness |= (1 << 26);
+      if(m_gradient_isolation->accept(**muonItr))       tightness |= (1 << 27);
+      if(m_gradient_loose_isolation->accept(**muonItr)) tightness |= (1 << 28);
+      if(m_fixedcut_tight_trackonly_isolation->accept(**muonItr))tightness |= (1 << 29);
+      if(m_fixedcut_loose_isolation->accept(**muonItr))          tightness |= (1 << 30);
+    }
     /** varying levels of tighness cuts - to be defined and implemented */
     
     if ( muon.muonType() == xAOD::Muon::MuonStandAlone )               tightness = tightness | bit2int(0);
@@ -631,13 +634,13 @@ StatusCode MuonTagTool::execute(TagFragmentCollection & muonTagCol, const int ma
         uint8_t nblh   = 0x0;
         uint8_t eblh   = 0x0;
         uint8_t nblo   = 0x0;
-        if( !tp->summaryValue(nblh,xAOD::numberOfBLayerHits)){
+        if( !tp->summaryValue(nblh,xAOD::numberOfInnermostPixelLayerHits)){
           ATH_MSG_WARNING("No nBLayerHits");
         }
-        if( !tp->summaryValue(nblo,xAOD::numberOfBLayerOutliers)){
+        if( !tp->summaryValue(nblo,xAOD::numberOfInnermostPixelLayerOutliers)){
           ATH_MSG_WARNING("No nofBLayerOutliers");
         }
-        if( !tp->summaryValue(eblh,xAOD::expectBLayerHit) ||
+        if( !tp->summaryValue(eblh,xAOD::expectInnermostPixelLayerHit) ||
             (nblh + nblo > 0) )        tightness = tightness | bit2int(11);
       
         // pixel hit counts
diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
index 39dbb5af3e02a597ffb7c16eccebb3df76c1d873..2ac9ba9127697e9daf35b63e0de34e5d7a7eec12 100644
--- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
+++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValMuon_jobOptions.py
@@ -4,22 +4,24 @@ getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool")
 from MuonPhysValMonitoring.MuonPhysValMonitoringConf import MuonPhysValMonitoring__MuonPhysValMonitoringTool
 from RecExConfig.RecFlags import rec as recFlags
 
-tool1 = MuonPhysValMonitoring__MuonPhysValMonitoringTool()
+tool1 = MuonPhysValMonitoring__MuonPhysValMonitoringTool( name = 'muphysval' )
 tool1.IsData = not recFlags.doTruth()
 
 #
 tool1.MuonContainerName = 'Muons';
+tool1.SlowMuonContainerName = '';
 tool1.MuonTruthParticleContainerName = 'MuonTruthParticles';
 tool1.DoBinnedResolutionPlots = True
 
 #comment out if you don't need any of the following containers
 tool1.TrackContainerName = 'InDetTrackParticles'
-#tool1.FwdTrackContainerName='InDetForwardTrackParticles'
+# #tool1.FwdTrackContainerName='InDetForwardTrackParticles'
 tool1.MuonTrackContainerName = 'MuonSpectrometerTrackParticles'
 tool1.MuonExtrapolatedTrackContainerName = 'ExtrapolatedMuonTrackParticles'
 tool1.MuonOnlyExtrapolatedTrackContainerName = 'MSOnlyExtrapolatedMuonTrackParticles'
 tool1.MuonSegmentContainerName = 'MuonSegments'
 
+
 #tool1.MuonTruthParticleContainerName = 'MuonTruthParticle' # uncomment for release 19
 # tool1.DoTrigMuonValidation =True
 # tool1.DoTrigMuonEFValidation = True
@@ -48,7 +50,7 @@ tool1.SelectL1MuonItems = [
 #Select Muon Working Points... (empty: all, -1: None, 0: Tight, 1: Medium, 2: Loose, 3: VeryLoose)
 tool1.SelectMuonWorkingPoints = [ 1 ]
 
-#Select Muon Authors... (empty: all authors, 1: combined, 2: STACO, 4: MuTagIMO, 5: Standalone, 6: MuGirl, 8: CaloTag)
+#Select Muon Authors... (empty: all authors, 0: None, 1: combined, 2: STACO, 4: MuTagIMO, 5: Standalone, 6: MuGirl, 8: CaloTag)
 tool1.SelectMuonAuthors = [ 1, 2, 4 ,5, 6, 8, 9 ]
 
 #Select Muon Categories... (origin of muons, empty: all categories, 0: ALL, 1: PROMPT, 2: IN-FLIGHT, 3: NON-ISOLATED, 4: REST)
diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValSlowMuon_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValSlowMuon_jobOptions.py
new file mode 100644
index 0000000000000000000000000000000000000000..bb94b735a8bbef887088bf5cd30d8ad561605c24
--- /dev/null
+++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysValSlowMuon_jobOptions.py
@@ -0,0 +1,42 @@
+from AthenaCommon.CfgGetter import getPublicTool
+getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool")
+
+from MuonPhysValMonitoring.MuonPhysValMonitoringConf import MuonPhysValMonitoring__MuonPhysValMonitoringTool
+from RecExConfig.RecFlags import rec as recFlags
+
+tool1 = MuonPhysValMonitoring__MuonPhysValMonitoringTool( name = 'slowmuphysval' )
+tool1.IsData = not recFlags.doTruth()
+
+#
+tool1.MuonContainerName = ''; # Must be blank for SlowMuons
+tool1.SlowMuonContainerName = 'SlowMuons';
+tool1.MuonTruthParticleContainerName = 'MuonTruthParticles';
+tool1.DoBinnedResolutionPlots = False
+
+tool1.TrackContainerName = ''
+tool1.FwdTrackContainerName=''
+tool1.MuonTrackContainerName = ''
+tool1.MuonExtrapolatedTrackContainerName = ''
+tool1.MuonOnlyExtrapolatedTrackContainerName = ''
+tool1.MuonSegmentContainerName = ''
+
+#Select Muon Working Points... (empty: all, -1: None, 0: Tight, 1: Medium, 2: Loose, 3: VeryLoose)
+tool1.SelectMuonWorkingPoints = [ -1 ]
+
+#Select Muon Authors... (empty: all authors, 0: None, 1: combined, 2: STACO, 4: MuTagIMO, 5: Standalone, 6: MuGirl, 8: CaloTag)
+tool1.SelectMuonAuthors = [ 0 ] # only one author is defined in this case... no need to specify
+
+#Select Muon Categories... (origin of muons, empty: all categories, 0: ALL, 1: PROMPT, 2: IN-FLIGHT, 3: NON-ISOLATED, 4: REST)
+#tool1.SelectMuonCategories = [ 0, 1, 2, 3, 4 ] # all possible categories
+tool1.SelectMuonCategories = [ 0, 1 ] # lighter version, good for official validation tasks; overriden when in data mode
+
+tool1.IsoTool = IsolationTool
+tool1.EnableLumi = False
+tool1.OutputLevel = ERROR
+tool1.DetailLevel = 10
+
+from AthenaCommon.AppMgr import ToolSvc
+ToolSvc += tool1
+
+monMan = CfgMgr.AthenaMonManager("PhysValMonManager")
+monMan.AthenaMonTools += [ tool1 ]
diff --git a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysVal_jobOptions.py b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysVal_jobOptions.py
index 084836e8d971289ec11e1e875aeff84f4f4fbb2a..4f458a6847d1859a2efeb04aea5a3cb4c89ff95f 100644
--- a/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysVal_jobOptions.py
+++ b/PhysicsAnalysis/PhysicsValidation/PhysValMonitoring/share/PhysVal_jobOptions.py
@@ -11,7 +11,7 @@ from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
 # Default 'do' list:
-validations = ["InDet","PrimaryTracking", "SecondaryTracking", "Jet", "MET", "Muon", "Egamma", "Tau", "Btag",
+validations = ["InDet","PrimaryTracking", "SecondaryTracking", "Jet", "MET", "Muon", "SlowMuon", "Egamma", "Tau", "Btag",
                "SMZee", "SMZMet", "HSG6", "Top", "SUSY", "Exotics",
                "Example"]
 
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/PrimaryDPDMaker/CaloCellThinningTool.h b/PhysicsAnalysis/PrimaryDPDMaker/PrimaryDPDMaker/CaloCellThinningTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..5ef227da45997fea0565da5f67b2f1d705448207
--- /dev/null
+++ b/PhysicsAnalysis/PrimaryDPDMaker/PrimaryDPDMaker/CaloCellThinningTool.h
@@ -0,0 +1,36 @@
+/*
+Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef DERIVATIONFRAMEWORK_CALOCELLTHINNINGTOOL_H
+#define DERIVATIONFRAMEWORK_CALOCELLTHINNINGTOOL_H 1
+
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "DerivationFrameworkInterfaces/IThinningTool.h"
+
+class TileID;
+class IThinningSvc;
+
+namespace DerivationFramework {
+
+  class CaloCellThinningTool : public AthAlgTool, 
+                               public IThinningTool {
+
+  public:
+    CaloCellThinningTool(const std::string& t, 
+                         const std::string& n, 
+                         const IInterface* p );
+    ~CaloCellThinningTool();
+
+    StatusCode  initialize();
+    StatusCode  finalize();
+    virtual StatusCode doThinning() const;
+
+  private:
+    ServiceHandle<IThinningSvc> m_thinningSvc;
+    double m_caloCellId;
+  }; 
+}
+
+#endif
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py b/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py
index d93ef37b3ddcedbd6b5f9ecd7483b35c2c1e68b1..168cacf4a18896105a41c9596afa8d5ab0354edd 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/python/PrimaryDPDFlags.py
@@ -353,14 +353,15 @@ jobproperties.PrimaryDPDFlags.add_JobProperty(WriteDRAW_EMU)
 listRAWtoDPD.append(WriteDRAW_EMU.StreamName)
 
 class WriteDRAW_BCID1(JobProperty):
-    """ Produce the BCID-filtered DRAW, based on the AcceptBCIDs list (Byte Stream format)."""
+    """ Produce the BCID-filtered DRAW, based on the AcceptBCIDs and RejectBCIDs lists."""
     statusOn       = True
     allowedTypes   = ['bool']
     StoredValue    = False
     StreamName     = "StreamDRAW_BCID1"
     FileName       = ""
     Prescale       = 1
-    AcceptBCIDs    = [11, 1247, 2430]
+    AcceptBCIDs    = []
+    RejectBCIDs    = []
     isVirtual      = False
     DPDMakerScript = "PrimaryDPDMaker/DRAW_BCID1.py"
     pass
@@ -368,20 +369,54 @@ jobproperties.PrimaryDPDFlags.add_JobProperty(WriteDRAW_BCID1)
 listRAWtoDPD.append(WriteDRAW_BCID1.StreamName)
 
 class WriteDRAW_BCID2(JobProperty):
-    """ Produce the BCID-filtered DRAW, based on the RejectBCIDs list (Byte Stream format)."""
+    """ Produce the BCID-filtered DRAW, based on the AcceptBCIDs and RejectBCIDs lists."""
     statusOn       = True
     allowedTypes   = ['bool']
     StoredValue    = False
     StreamName     = "StreamDRAW_BCID2"
     FileName       = ""
     Prescale       = 1
-    RejectBCIDs    = [11, 1247, 2430]
+    AcceptBCIDs    = []
+    RejectBCIDs    = []
     isVirtual      = False
     DPDMakerScript = "PrimaryDPDMaker/DRAW_BCID2.py"
     pass
 jobproperties.PrimaryDPDFlags.add_JobProperty(WriteDRAW_BCID2)
 listRAWtoDPD.append(WriteDRAW_BCID2.StreamName)
 
+class WriteDRAW_BCID3(JobProperty):
+    """ Produce the BCID-filtered DRAW, based on the AcceptBCIDs and RejectBCIDs lists."""
+    statusOn       = True
+    allowedTypes   = ['bool']
+    StoredValue    = False
+    StreamName     = "StreamDRAW_BCID3"
+    FileName       = ""
+    Prescale       = 1
+    AcceptBCIDs    = []
+    RejectBCIDs    = []
+    isVirtual      = False
+    DPDMakerScript = "PrimaryDPDMaker/DRAW_BCID3.py"
+    pass
+jobproperties.PrimaryDPDFlags.add_JobProperty(WriteDRAW_BCID3)
+listRAWtoDPD.append(WriteDRAW_BCID3.StreamName)
+
+
+class WriteDRAW_BCID4(JobProperty):
+    """ Produce the BCID-filtered DRAW, based on the AcceptBCIDs and RejectBCIDs lists."""
+    statusOn       = True
+    allowedTypes   = ['bool']
+    StoredValue    = False
+    StreamName     = "StreamDRAW_BCID4"
+    FileName       = ""
+    Prescale       = 1
+    AcceptBCIDs    = []
+    RejectBCIDs    = []
+    isVirtual      = False
+    DPDMakerScript = "PrimaryDPDMaker/DRAW_BCID4.py"
+    pass
+jobproperties.PrimaryDPDFlags.add_JobProperty(WriteDRAW_BCID4)
+listRAWtoDPD.append(WriteDRAW_BCID4.StreamName)
+
 class WriteDRAW_TOPSLMU(JobProperty):
     """ Produce DRAW_TOPSLMU, a top-like single-muon selection for tau embedding used by H+ searches."""
     statusOn       = True    
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID1.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID1.py
index b3f986e5d29063174fd8804811d21ec654a296b3..5e932f825fba4257073603bb93f81f351e21e560 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID1.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID1.py
@@ -11,7 +11,8 @@ DRAW_BCID1_Seq = CfgMgr.AthSequencer("DRAW_BCID1_Seq")
 
 from PrimaryDPDMaker.PrimaryDPDMakerConf import BCIDFilterTool
 bcidFilterTool = BCIDFilterTool( name        = "BCID1Filter",
-                                 AcceptBCIDs = jobproperties.PrimaryDPDFlags.WriteDRAW_BCID1.AcceptBCIDs
+                                 AcceptBCIDs = jobproperties.PrimaryDPDFlags.WriteDRAW_BCID1.AcceptBCIDs,
+                                 RejectBCIDs = jobproperties.PrimaryDPDFlags.WriteDRAW_BCID1.RejectBCIDs
                                  )
 
 bcidFilterTool.OutputLevel = 3 # INFO
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID2.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID2.py
index 8343a0353b88e23b7a3b07c73de144eaa13ad2d4..a421b3701fe9391e84590a2fe21145b349c22a7e 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID2.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID2.py
@@ -11,6 +11,7 @@ DRAW_BCID2_Seq = CfgMgr.AthSequencer("DRAW_BCID2_Seq")
 
 from PrimaryDPDMaker.PrimaryDPDMakerConf import BCIDFilterTool
 bcidFilterTool = BCIDFilterTool( name        = "BCID2Filter",
+                                 AcceptBCIDs = jobproperties.PrimaryDPDFlags.WriteDRAW_BCID2.AcceptBCIDs,
                                  RejectBCIDs = jobproperties.PrimaryDPDFlags.WriteDRAW_BCID2.RejectBCIDs
                                  )
 
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID3.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID3.py
new file mode 100644
index 0000000000000000000000000000000000000000..946bb7a49afa0e477762a8ea2b93b0f9fd451a62
--- /dev/null
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID3.py
@@ -0,0 +1,54 @@
+####################################################
+### Setup:
+###     sequencer
+###     derivation framework / event selection
+####################################################
+
+# Sequence
+from AthenaCommon.AlgSequence import AlgSequence 
+topSequence = AlgSequence() 
+DRAW_BCID3_Seq = CfgMgr.AthSequencer("DRAW_BCID3_Seq")
+
+from PrimaryDPDMaker.PrimaryDPDMakerConf import BCIDFilterTool
+bcidFilterTool = BCIDFilterTool( name        = "BCID3Filter",
+                                 AcceptBCIDs = jobproperties.PrimaryDPDFlags.WriteDRAW_BCID3.AcceptBCIDs,
+                                 RejectBCIDs = jobproperties.PrimaryDPDFlags.WriteDRAW_BCID3.RejectBCIDs
+                                 )
+
+bcidFilterTool.OutputLevel = 3 # INFO
+ToolSvc += bcidFilterTool
+
+# Kernel algorithm
+from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
+DRAW_BCID3_Seq += CfgMgr.DerivationFramework__DerivationKernel("DRAW_BCID3Kernel",
+                                                                  SkimmingTools = [bcidFilterTool]
+                                                                )
+topSequence += DRAW_BCID3_Seq 
+
+##################
+### Output stream
+##################
+from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
+from D2PDMaker.D2PDHelpers import buildFileName
+from PrimaryDPDMaker.PrimaryDPDFlags import primDPD
+streamName = primDPD.WriteDRAW_BCID3.StreamName
+fileName   = buildFileName( primDPD.WriteDRAW_BCID3 )
+# Remove the .pool.root ending in the file name, this is a RAW file!
+if fileName.endswith(".pool.root") :
+    fileName = fileName.rstrip(".pool.root")
+    pass
+StreamDRAW_BCID3 = MSMgr.NewByteStream( streamName, fileName )
+StreamDRAW_BCID3.AddRequireAlgs(["DRAW_BCID3Kernel"])
+
+# Don't write an output RAW file if it is empty
+StreamDRAW_BCID3.bsOutputSvc.WriteEventlessFiles = primDPD.WriteEventlessFiles()
+
+
+#########################################
+# Add the containers to the output stream
+#########################################
+from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
+
+# Take everything from the input
+ExcludeList=[]
+dpdOutput.addAllItemsFromInputExceptExcludeList(streamName,ExcludeList)
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID4.py b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID4.py
new file mode 100644
index 0000000000000000000000000000000000000000..11eb36b1737b0ee40a565c3dbaa2535065047894
--- /dev/null
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/DRAW_BCID4.py
@@ -0,0 +1,54 @@
+####################################################
+### Setup:
+###     sequencer
+###     derivation framework / event selection
+####################################################
+
+# Sequence
+from AthenaCommon.AlgSequence import AlgSequence 
+topSequence = AlgSequence() 
+DRAW_BCID4_Seq = CfgMgr.AthSequencer("DRAW_BCID4_Seq")
+
+from PrimaryDPDMaker.PrimaryDPDMakerConf import BCIDFilterTool
+bcidFilterTool = BCIDFilterTool( name        = "BCID4Filter",
+                                 AcceptBCIDs = jobproperties.PrimaryDPDFlags.WriteDRAW_BCID4.AcceptBCIDs,
+                                 RejectBCIDs = jobproperties.PrimaryDPDFlags.WriteDRAW_BCID4.RejectBCIDs
+                                 )
+
+bcidFilterTool.OutputLevel = 3 # INFO
+ToolSvc += bcidFilterTool
+
+# Kernel algorithm
+from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
+DRAW_BCID4_Seq += CfgMgr.DerivationFramework__DerivationKernel("DRAW_BCID4Kernel",
+                                                                  SkimmingTools = [bcidFilterTool]
+                                                                )
+topSequence += DRAW_BCID4_Seq 
+
+##################
+### Output stream
+##################
+from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
+from D2PDMaker.D2PDHelpers import buildFileName
+from PrimaryDPDMaker.PrimaryDPDFlags import primDPD
+streamName = primDPD.WriteDRAW_BCID4.StreamName
+fileName   = buildFileName( primDPD.WriteDRAW_BCID4 )
+# Remove the .pool.root ending in the file name, this is a RAW file!
+if fileName.endswith(".pool.root") :
+    fileName = fileName.rstrip(".pool.root")
+    pass
+StreamDRAW_BCID4 = MSMgr.NewByteStream( streamName, fileName )
+StreamDRAW_BCID4.AddRequireAlgs(["DRAW_BCID4Kernel"])
+
+# Don't write an output RAW file if it is empty
+StreamDRAW_BCID4.bsOutputSvc.WriteEventlessFiles = primDPD.WriteEventlessFiles()
+
+
+#########################################
+# Add the containers to the output stream
+#########################################
+from PrimaryDPDMaker import PrimaryDPD_OutputDefinitions as dpdOutput
+
+# Take everything from the input
+ExcludeList=[]
+dpdOutput.addAllItemsFromInputExceptExcludeList(streamName,ExcludeList)
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_TILEMU.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_TILEMU.py
index b0dd72b91c77a15bd8eeab5a7370ae0859f4ef51..86d9865d7fbdc3cce79149a5b8e24e601cd4e861 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_TILEMU.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDESDM_TILEMU.py
@@ -98,8 +98,30 @@ TileMuEventFilterTool = DerivationFramework__FilterCombinationAND(name="TileMuEv
 ToolSvc += TileMuEventFilterTool
 print TileMuEventFilterTool
 
+
+##======================================================================
+## Define the thinning for the DESDM_TILEMU output stream
+##======================================================================
+from PrimaryDPDMaker.PrimaryDPDMakerConf import DerivationFramework__CaloCellThinningTool
+TileMuCaloCellThinningTool = DerivationFramework__CaloCellThinningTool(name = "TileMuCaloCellThinningTool",
+                                                               ThinningService = "TileMuThinningToolSvc",
+                                                               CaloCellId = 3) # Tile Cells
+ToolSvc += TileMuCaloCellThinningTool
+
+from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
+TileMuMuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "TileMuMuonTPThinningTool",
+                                                                          ThinningService = "TileMuThinningToolSvc",
+                                                                          MuonKey = "Muons",
+                                                                          InDetTrackParticlesKey  = "InDetTrackParticles")
+ToolSvc += TileMuMuonTPThinningTool
+
+
+##======================================================================
+##  CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS
+##======================================================================
 desdTileMuonSequence += CfgMgr.DerivationFramework__DerivationKernel("TileMuKernel", 
-    SkimmingTools = [TileMuEventFilterTool])
+    SkimmingTools = [TileMuEventFilterTool],
+    ThinningTools = [TileMuCaloCellThinningTool, TileMuMuonTPThinningTool])
 
 ##======================================================================
 ## Define this Muon DPD output stream
@@ -121,6 +143,11 @@ if primDESDMTileMu.ApplySkimming():
     TileMuStream.AcceptAlgs(["TileMuKernel"])
     pass
 
+from AthenaServices.Configurables import ThinningSvc, createThinningSvc
+augStream = MSMgr.GetStream(streamName)
+evtStream = augStream.GetEventStream()
+svcMgr += createThinningSvc(svcName="TileMuThinningToolSvc", outStreams=[evtStream])
+
 #-----------------------------------------------------------------------
 # Add the containers to the output stream
 #-----------------------------------------------------------------------
@@ -129,6 +156,8 @@ ExcludeList=[]
 
 #dpdOutput.addAllItemsFromInputExceptExcludeList(streamName,ExcludeList)
 
+trackParticleAuxExclusions="-caloExtension.-cellAssociation.-clusterAssociation.-trackParameterCovarianceMatrices.-parameterX.-parameterY.-parameterZ.-parameterPX.-parameterPY.-parameterPZ.-parameterPosition"
+
 
 TileMuStream.AddItem(["xAOD::EventInfo#*"])
 TileMuStream.AddItem(["xAOD::EventAuxInfo#*"])
@@ -156,3 +185,12 @@ TileMuStream.AddItem(["CaloCellContainer#AllCalo"])
 
 TileMuStream.AddItem(["xAOD::MuonContainer#HLT_xAOD__MuonContainer_MuonEFInfo"])
 TileMuStream.AddItem(["xAOD::MuonAuxContainer#HLT_xAOD__MuonContainer_MuonEFInfoAux."])
+
+TileMuStream.AddItem(["xAOD::TrackParticleContainer#MuonSpectrometerTrackParticles"])
+TileMuStream.AddItem(["xAOD::TrackParticleAuxContainer#MuonSpectrometerTrackParticlesAux."+trackParticleAuxExclusions])
+TileMuStream.AddItem(["xAOD::TrackParticleContainer#CombinedMuonTrackParticles"])
+TileMuStream.AddItem(["xAOD::TrackParticleAuxContainer#CombinedMuonTrackParticlesAux."+trackParticleAuxExclusions])
+TileMuStream.AddItem(["xAOD::TrackParticleContainer#ExtrapolatedMuonTrackParticles"])
+TileMuStream.AddItem(["xAOD::TrackParticleAuxContainer#ExtrapolatedMuonTrackParticlesAux."+trackParticleAuxExclusions])
+TileMuStream.AddItem(["xAOD::TrackParticleContainer#InDetTrackParticles"]) 
+TileMuStream.AddItem(["xAOD::TrackParticleAuxContainer#InDetTrackParticlesAux."+trackParticleAuxExclusions])
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_topOptions.py b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_topOptions.py
index 6a6618a8c77a3fdc1ad43bfd536fcccdcdc90369..b52e64a6808701a8aef43ba6a0e2ae6868a18225 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_topOptions.py
+++ b/PhysicsAnalysis/PrimaryDPDMaker/share/PerfDPD_topOptions.py
@@ -56,16 +56,11 @@ from AthenaCommon.AthenaCommonFlags import jobproperties as jp
 #jp.AthenaCommonFlags.FilesInput = ["root://eosatlas//eos/atlas/atlasdatadisk/data11_7TeV/AOD/v83_m1095/data11_7TeV.00191715.physics_Muons.merge.AOD.v83_m1095/data11_7TeV.00191715.physics_Muons.merge.AOD.v83_m1095._lb0077._0001.1"]
 #myPath="/eos/atlas/atlascerngroupdisk/proj-pat/data/ESD/data11_7TeV.00191715.physics_Egamma.recon.ESD.v83/"
 #myPath="/eos/atlas/atlascerngroupdisk/proj-pat/data/ESD/data11_7TeV.00191715.physics_Muons.recon.ESD.v83/"
-#from InDetBeamSpotExample import DiskUtils
-#inFileList = DiskUtils.filelist( myPath, "root://eosatlas.cern.ch/" )
-#jp.AthenaCommonFlags.FilesInput = inFileList
 
-myPath = os.getenv("DataMC")+"/mc/xAOD/valid2.117050.PowhegPythia_P2011C_ttbar.digit.AOD.e2657_s1933_s1964_r5534/"
+myPath = os.getenv("DataMC")+"/mc/xAOD/valid2.117050.PowhegPythia_P2011C_ttbar.digit.AOD.e2657_s1933_s1964_r5534/*"
 #myPath = "/atlas/scratch0/kkoeneke/DataMC/mc/xAOD/valid2.147807.PowhegPythia8_AU2CT10_Zmumu.digit.AOD.e2657_s1933_s1964_r5493_tid01466650_00/"
-from InDetBeamSpotExample import DiskUtils
-#inFileList = DiskUtils.filelist( myPath, "root://eosatlas.cern.ch/" )
-inFileList = DiskUtils.filelist( myPath, "" )
-jp.AthenaCommonFlags.FilesInput = inFileList
+from glob import glob
+jp.AthenaCommonFlags.FilesInput = glob(myPath)
 
 
 
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/src/CaloCellThinningTool.cxx b/PhysicsAnalysis/PrimaryDPDMaker/src/CaloCellThinningTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..9e571d5db3d00a53f7041fa215614a3e762dc2b8
--- /dev/null
+++ b/PhysicsAnalysis/PrimaryDPDMaker/src/CaloCellThinningTool.cxx
@@ -0,0 +1,72 @@
+/*
+ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "PrimaryDPDMaker/CaloCellThinningTool.h"
+#include "AthenaKernel/IThinningSvc.h"
+#include "CaloEvent/CaloCell.h"
+#include "CaloEvent/CaloCellContainer.h"
+
+#include <vector>
+#include <string>
+
+DerivationFramework::CaloCellThinningTool::CaloCellThinningTool(const std::string& t,
+                                                                const std::string& n,
+                                                                const IInterface* p ) :
+  AthAlgTool(t,n,p),
+  m_thinningSvc("ThinningSvc",n),
+  m_caloCellId(-1)
+{
+  declareInterface<DerivationFramework::IThinningTool>(this);
+  declareProperty("ThinningService", m_thinningSvc);
+  declareProperty("CaloCellId", m_caloCellId);       
+}
+
+DerivationFramework::CaloCellThinningTool::~CaloCellThinningTool() 
+{
+}
+
+StatusCode DerivationFramework::CaloCellThinningTool::initialize()
+{
+  ATH_MSG_VERBOSE("initialize() ...");
+  return StatusCode::SUCCESS;
+}  
+
+StatusCode DerivationFramework::CaloCellThinningTool::finalize()
+{
+  ATH_MSG_VERBOSE("finalize() ...");
+  return StatusCode::SUCCESS;
+}
+
+StatusCode DerivationFramework::CaloCellThinningTool::doThinning() const
+{
+  const CaloCellContainer* container = 0;
+  CHECK(evtStore()->retrieve(container, "AllCalo"));
+
+  if (!container){
+    ATH_MSG_DEBUG("Couldn't retrieve CaloCellContainer with key AllCalo");
+    return StatusCode::SUCCESS;
+  }
+
+  std::vector<bool> mask;
+  
+  CaloCellContainer::const_iterator tcdc_it = container->begin();
+  CaloCellContainer::const_iterator cit = container->end();
+ 
+  for (; tcdc_it != cit; ++tcdc_it) {
+
+    bool match = true;
+
+    const CaloCell* cell = (*tcdc_it);
+    if (cell->caloDDE()->getSubCalo() != m_caloCellId) match = false;
+
+    mask.push_back(match);
+  }
+  
+  if (m_thinningSvc->filter(*container, mask).isFailure()) {
+    ATH_MSG_ERROR("Application of thinning service failed! ");
+    return StatusCode::FAILURE;
+  }
+
+  return StatusCode::SUCCESS;
+}
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx b/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx
index 992ef74143a20560efe9e9f0df712b6f6d98eb97..5d0628d2ef38d0cb4580de04e9cc063f046bc6ac 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx
+++ b/PhysicsAnalysis/PrimaryDPDMaker/src/ThinContainers.cxx
@@ -1789,7 +1789,7 @@ StatusCode ThinContainers::findGoodTrackParticles(const Rec::TrackParticleContai
       const Trk::TrackSummary* trackSum = track->trackSummary();
       long int nPixelHits = (long int) trackSum->get(Trk::numberOfPixelHits);
       long int nSctHits   = (long int) trackSum->get(Trk::numberOfSCTHits);
-      long int nBLayHits  = (long int) trackSum->get(Trk::numberOfBLayerHits);
+      long int nBLayHits  = (long int) trackSum->get(Trk::numberOfInnermostPixelLayerHits);
       if ( nPixelHits < 0 ) nPixelHits = 0; 
       if ( nSctHits   < 0 ) nSctHits   = 0; 
       if ( nBLayHits  < 0 ) nBLayHits  = 0; 
@@ -1901,7 +1901,7 @@ StatusCode ThinContainers::findGoodTracks(const TrackCollection* trackCont,
 
           nPixelHits = (long int) trackSum->get(Trk::numberOfPixelHits);
           nSctHits   = (long int) trackSum->get(Trk::numberOfSCTHits);
-          nBLayHits  = (long int) trackSum->get(Trk::numberOfBLayerHits);
+          nBLayHits  = (long int) trackSum->get(Trk::numberOfInnermostPixelLayerHits);
         }
 
       if ( nPixelHits < 0 ) nPixelHits = 0; 
diff --git a/PhysicsAnalysis/PrimaryDPDMaker/src/components/PrimaryDPDMaker_entries.cxx b/PhysicsAnalysis/PrimaryDPDMaker/src/components/PrimaryDPDMaker_entries.cxx
index c2cd49de20b02aaffb902ab43feb7a574a1e68cc..9f6b654d910b1315bb8ac76416b1ca894c5c850f 100644
--- a/PhysicsAnalysis/PrimaryDPDMaker/src/components/PrimaryDPDMaker_entries.cxx
+++ b/PhysicsAnalysis/PrimaryDPDMaker/src/components/PrimaryDPDMaker_entries.cxx
@@ -7,6 +7,9 @@
 #include "PrimaryDPDMaker/BCIDFilterTool.h"
 #include "PrimaryDPDMaker/CollisionFilterAlg.h"
 #include "PrimaryDPDMaker/muonTrkTrackThinTool.h"
+#include "PrimaryDPDMaker/CaloCellThinningTool.h"
+
+using namespace DerivationFramework;
 
 DECLARE_ALGORITHM_FACTORY( PrimaryDPDPrescaler )
 DECLARE_ALGORITHM_FACTORY( ThinContainers )
@@ -15,6 +18,7 @@ DECLARE_ALGORITHM_FACTORY( muonTrkTrackThinTool )
 DECLARE_TOOL_FACTORY( MBTSTimeFilterTool )
 DECLARE_TOOL_FACTORY( CaloTimeFilterTool )
 DECLARE_TOOL_FACTORY( BCIDFilterTool )
+DECLARE_TOOL_FACTORY( CaloCellThinningTool )
 
 DECLARE_FACTORY_ENTRIES( PrimaryDPDMaker )
 {
@@ -25,4 +29,5 @@ DECLARE_FACTORY_ENTRIES( PrimaryDPDMaker )
   DECLARE_TOOL( MBTSTimeFilterTool );
   DECLARE_TOOL( CaloTimeFilterTool );
   DECLARE_TOOL( BCIDFilterTool );
+  DECLARE_TOOL( CaloCellThinningTool );
 }
diff --git a/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/RingerSelectorToolsDefs.h b/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/RingerSelectorToolsDefs.h
index 710261eee5c495175125c23080f8a8b781649e3e..5770c0d9d3a5680a02f3fda4f7a0c049306010ce 100644
--- a/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/RingerSelectorToolsDefs.h
+++ b/PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/RingerSelectorToolsDefs.h
@@ -158,12 +158,6 @@ EtDependency getType(const char* cStr);
 template<>
 Requirement getType(const char* cStr);
 
-// Explicit instantiate the templates functions to avoid multiple definition
-template SegmentationType getType(const char *);
-template EtaDependency getType(const char *);
-template EtDependency getType(const char *);
-template Requirement getType(const char *);
-
 /**
  * Transform enumeration types to string
  **/
diff --git a/PhysicsAnalysis/RingerSelectorTools/Root/tools/TrackPatternsHolder.cxx b/PhysicsAnalysis/RingerSelectorTools/Root/tools/TrackPatternsHolder.cxx
index 667ce5ba25aa3b2256f4fb2a34880f288a3c2f1a..338e4d921f07661a117abaa2d94b78e05e8dd5fc 100644
--- a/PhysicsAnalysis/RingerSelectorTools/Root/tools/TrackPatternsHolder.cxx
+++ b/PhysicsAnalysis/RingerSelectorTools/Root/tools/TrackPatternsHolder.cxx
@@ -97,9 +97,9 @@ void TrackPatternsHolder::extractPatternsFrom(
 
   bool allFound = true;
 
-  allFound = allFound   && track->summaryValue(m_nBL,               xAOD::numberOfBLayerHits);
+  allFound = allFound   && track->summaryValue(m_nBL,               xAOD::numberOfInnermostPixelLayerHits);
   if (m_useBLOutliers) {
-    allFound = allFound && track->summaryValue(m_nBLOutliers,       xAOD::numberOfBLayerOutliers);
+    allFound = allFound && track->summaryValue(m_nBLOutliers,       xAOD::numberOfInnermostPixelLayerOutliers);
   }
   allFound = allFound   && track->summaryValue(m_nPi,               xAOD::numberOfPixelHits);
   if (m_usePIXOutliers){
@@ -118,7 +118,7 @@ void TrackPatternsHolder::extractPatternsFrom(
   if (m_useTRTXenonHits){
     allFound = allFound && track->summaryValue(m_nTRTXenonHits,     xAOD::numberOfTRTXenonHits);
   }
-  allFound = allFound   && track->summaryValue(m_expectHitInBLayer, xAOD::expectBLayerHit);
+  allFound = allFound   && track->summaryValue(m_expectHitInBLayer, xAOD::expectInnermostPixelLayerHit);
 
   m_trackd0 = fabsf(track->d0());
 
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/EmergingJetsFilterTool.h b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/EmergingJetsFilterTool.h
index 56ae8dedc61b725917361ee00bcb20617cab7197..85002714e31a398985daa9c693e4429736ad7e1c 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/EmergingJetsFilterTool.h
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/EmergingJetsFilterTool.h
@@ -26,7 +26,8 @@ namespace DerivationFramework {
       atlasoff:: ISF/ISF_Core/ISF_Tools
 
       @author James Catmore -at- cern.ch
-     */
+  **/
+  
   class EmergingJetsFilterTool : public AthAlgTool, public ISkimmingTool {
     
   public: 
@@ -48,14 +49,11 @@ namespace DerivationFramework {
     std::vector< std::string > m_triggers;
     mutable unsigned int m_ntot;
     mutable unsigned int m_npass;
+    mutable unsigned int m_nptpass;
     std::string m_jetSGKey;
-    std::string m_BjetSGKey;
-    std::string m_trackSGKey;
 
     double m_ptCut;
     double m_etaCut;
-    double m_sumPtTrkCut;
-    double m_sumJetsPtCut;
     int m_nJetsRequired;
     
   }; 
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/EmergingJetsHighPtFilterTool.h b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/EmergingJetsHighPtFilterTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..e1a250e6152bcb8ed50b8df158b083ebc8628340
--- /dev/null
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/LongLivedParticleDPDMaker/EmergingJetsHighPtFilterTool.h
@@ -0,0 +1,67 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+///////////////////////////////////////////////////////////////////
+// Emerging jets
+///////////////////////////////////////////////////////////////////
+
+#ifndef DERIVATIONFRAMEWORK_EMERGINGJETSHIGHPTFILTERTOOL_H
+#define DERIVATIONFRAMEWORK_EMERGINGJETSHIGHPTFILTERTOOL_H 
+
+#include<string>
+
+// Gaudi & Athena basics
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "TrigDecisionTool/TrigDecisionTool.h"
+
+// DerivationFramework includes
+#include "DerivationFrameworkInterfaces/ISkimmingTool.h"
+
+namespace DerivationFramework {
+
+  /** @class EmergingJetsHighPtFilterTool
+  
+      the code used in this implementation is kindly stolen from:
+      atlasoff:: ISF/ISF_Core/ISF_Tools
+
+      @author James Catmore -at- cern.ch
+  **/
+  
+  class EmergingJetsHighPtFilterTool : public AthAlgTool, public ISkimmingTool {
+    
+  public: 
+    /** Constructor with parameters */
+    EmergingJetsHighPtFilterTool( const std::string& t, const std::string& n, const IInterface* p );
+    
+    /** Destructor */
+    ~EmergingJetsHighPtFilterTool();
+    
+    // Athena algtool's Hooks
+    StatusCode  initialize();
+    StatusCode  finalize();
+    
+    /** Check that the current event passes this filter */
+    virtual bool eventPassesFilter() const;
+    
+  private:
+    ToolHandle< Trig::TrigDecisionTool > m_tdt;
+    std::vector< std::string > m_triggers;
+    mutable unsigned int m_ntot;
+    mutable unsigned int m_npass;
+    mutable unsigned int m_nptpass;
+    mutable unsigned int m_nhighptpass;
+    std::string m_jetSGKey;
+
+    double m_ptCut;
+    double m_highPtCut;
+    double m_etaCut;
+    int m_nJetsRequired;
+    int m_nHighPtJetsRequired;
+    
+  }; 
+  
+}
+
+
+#endif
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/DVFlags.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/DVFlags.py
index 327e2d2b2beb25b3e0e1fddb13f095213826a8ba..c65974e969bf1780e34eac53fe57a11ca458bc77 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/DVFlags.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/DVFlags.py
@@ -23,6 +23,13 @@ class DV_MultiJetTriggerFlags(JobProperty):
     StoredValue=True
     triggers = ["HLT_4j100","HLT_5j85","HLT_5j85_lcw","HLT_5j75_0eta250","EF_6j70","HLT_6j45_0eta240","HLT_7j45"]
     triggers += ["HLT_4j110","HLT_5j85","HLT_5j65_0eta240_L14J150ETA25","HLT_6j85","HLT_6j55_0eta240_L14J150ETA25"]  #2017
+    triggers += ["HLT_4j120","HLT_4j130","HLT_5j60","HLT_5j70","HLT_5j90","HLT_5j100","HLT_6j45","HLT_6j60","HLT_6j70","HLT_7j50"] #L34
+    triggers += ["HLT_4j60_gsc100_boffperf_split","HLT_4j60_gsc110_boffperf_split","HLT_4j60_gsc115_boffperf_split",
+			"HLT_4j70_gsc120_boffperf_split","HLT_4j70_gsc130_boffperf_split","HLT_5j50_gsc70_boffperf_split",
+			"HLT_5j55_gsc75_boffperf_split","HLT_5j60_gsc85_boffperf_split","HLT_5j60_gsc90_boffperf_split",
+			"HLT_5j60_gsc100_boffperf_split","HLT_6j45_gsc60_boffperf_split","HLT_6j50_gsc65_boffperf_split", 
+			"HLT_6j50_gsc70_boffperf_split","HLT_6j60_gsc85_boffperf_split","HLT_7j25_gsc45_boffperf_split_L14J20",
+			"HLT_7j25_gsc50_boffperf_split_L14J20" ]#gsc 
     pass
 primRPVLLDESDM.add_JobProperty(DV_MultiJetTriggerFlags)
 
@@ -117,6 +124,7 @@ class DV_METFilterFlags(JobProperty):
               "HLT_xe110_mht_L1XE55_AND_xe80_L1XE55"
 		         ]
     triggers+=[ "HLT_xe110_pufit_L1XE60", "HLT_xe120_mht_L1XE60_xe80_L1XE60" ]  #2017
+    triggers+=[ "HLT_xe120_pufit_L1XE60", "HLT_xe120_mht_xe80_L1XE60" ] #L34
     pass
 primRPVLLDESDM.add_JobProperty(DV_METFilterFlags)
 
@@ -167,7 +175,7 @@ class DV_MeffFilterFlags(JobProperty):
 	      	    "HLT_xe90_topoclPUC_L1XE60","HLT_xe100_topoclPUC_L1XE60","HLT_xe120_topoclPUC_L1XE60"
 		         ]
     pass
-primRPVLLDESDM.add_JobProperty(DV_MeffFilterFlags)
+#primRPVLLDESDM.add_JobProperty(DV_MeffFilterFlags)
 
 class DV_PrescalerFlags(JobProperty):
     statusOn=True
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/EmergingFlags.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/EmergingFlags.py
index 2dedcee6352d9b384ef212ecf7bca32477cb67e9..a6edc52ca532c76cfe776b34ce21a17de10fb0a7 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/EmergingFlags.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/EmergingFlags.py
@@ -8,21 +8,57 @@ import AthenaCommon.SystemOfUnits as Units
 primRPVLLDESDM = jobproperties.PrimaryDPDFlags_RPVLLStream
 
 class Emerging_FilterFlags(JobProperty):
-    statusOn      = True
-    allowedTypes  = ['bool']
-    StoredValue   = True
-    cutEtMin=100.0*Units.GeV
-    cutEtaMax=2.5
-    cutSumPtTrkMax=5.0*Units.GeV
-    cutSumJetsPtMax=800.0*Units.GeV
-    nPassed=4
-    Triggers  = ["HLT_4j100", "HLT_4j110"]
+    statusOn     = True
+    allowedTypes = ['bool']
+    StoredValue  = True
+    cutEtMin     = 100.0*Units.GeV
+    cutEtaMax    = 2.5
+    nPassed      = 4
+    Triggers     = ["HLT_4j90",
+                    "HLT_4j100",
+                    "HLT_4j110",
+                    "HLT_4j120",
+                    "HLT_4j130",
+                    "HLT_4j140",
+                    "HLT_4j150"
+                    ]
 primRPVLLDESDM.add_JobProperty(Emerging_FilterFlags)
 
 class Emerging_containerFlags(JobProperty):
-    statusOn = True
-    jetCollectionName="AntiKt4EMTopoJets"
-    bjetCollectionName="BTagging_AntiKt4EMTopo"
-    trackCollectionName="InDetTrackParticles"
+    statusOn          = True
+    jetCollectionName = "AntiKt4EMTopoJets"
+    hltJetCollectionName = "HLT_xAOD__JetContainer_a4tcemsubjesFS"
     pass
 primRPVLLDESDM.add_JobProperty(Emerging_containerFlags)
+
+
+# ----- PRESCALED DI-JET TRIGGER TEST ----- #
+class Emerging_DiJet110FilterFlags(JobProperty):
+    statusOn     = True
+    allowedTypes = ['bool']
+    StoredValue  = True
+    cutEtMin     = 100.0*Units.GeV
+    cutEtaMax    = 2.5
+    nPassed      = 2
+    Triggers     = ["HLT_j110"]
+primRPVLLDESDM.add_JobProperty(Emerging_DiJet110FilterFlags)
+
+class Emerging_DiJet175FilterFlags(JobProperty):
+    statusOn     = True
+    allowedTypes = ['bool']
+    StoredValue  = True
+    cutEtMin     = 100.0*Units.GeV
+    cutEtaMax    = 2.5
+    nPassed      = 2
+    Triggers     = ["HLT_j175"]
+primRPVLLDESDM.add_JobProperty(Emerging_DiJet175FilterFlags)
+
+class Emerging_DiJet260FilterFlags(JobProperty):
+    statusOn     = True
+    allowedTypes = ['bool']
+    StoredValue  = True
+    cutEtMin     = 100.0*Units.GeV
+    cutEtaMax    = 2.5
+    nPassed      = 2
+    Triggers     = ["HLT_j260"]
+primRPVLLDESDM.add_JobProperty(Emerging_DiJet260FilterFlags)
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/HVFlags.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/HVFlags.py
index 47562b7625a78eda1a99d938c2ab7143c9948d49..708d4c68d5f42387c9e37fd6e2cc99011e205617 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/HVFlags.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/HVFlags.py
@@ -55,6 +55,10 @@ class HV_CalRatioTriggerFlags(JobProperty):
         "HLT_j30_jes_cleanLLP_PS_llp_noiso_L1TAU60",
         "HLT_j30_jes_cleanLLP_PS_llp_L1LLP-NOMATCH", #L1Topo triggers are not running yet but should be "soon"
         "HLT_j30_jes_cleanLLP_PS_llp_noiso_L1LLP-NOMATCH",
+        "HLT_j30_jes_cleanLLP_PS_llp_L1TAU100", #will replace L1TAU60 soon
+        "HLT_j30_jes_cleanLLP_PS_llp_noiso_L1TAU100",
+        "HLT_j30_jes_cleanLLP_PS_llp_L1LLP-RO", #new L1Topo item; rate should be small
+        "HLT_j30_jes_cleanLLP_PS_llp_noiso_L1LLP-RO",
         #"HLT_j30_jes_cleanLLP_PS_llp_L1TAU8_EMPTY",
         #"HLT_j30_jes_cleanLLP_PS_llp_noiso_L1TAU8_EMPTY",
         #"HLT_j30_jes_cleanLLP_PS_llp_L1TAU8_UNPAIRED_ISO",
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/HipsFlags.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/HipsFlags.py
index 8ac3ce275c44c9b9fcfc60d6a2a1be07c1cb025e..8dfd1968faadf615f8d148c4ce7652a40b2de204 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/HipsFlags.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/python/HipsFlags.py
@@ -18,6 +18,6 @@ primHIPsDESD=jobproperties.PrimaryDPDFlags_HIPsStream
 class HipsTriggerFilterExpression(JobProperty):
     statusOn = True
     allowedTypes = ['string']
-    StoredValue  = 'HLT_g0_hiptrt_L1EM18VH || HLT_g0_hiptrt_L1EM20VH || HLT_g0_hiptrt_L1EM20VHI || HLT_g0_hiptrt_L1EM22VHI' 
+    StoredValue  = 'HLT_g0_hiptrt_L1EM18VH || HLT_g0_hiptrt_L1EM20VH || HLT_g0_hiptrt_L1EM20VHI || HLT_g0_hiptrt_L1EM22VHI || HLT_g0_hiptrt_L1EM24VHI || HLT_g0_hiptrt_L1EM24VHIM' 
     pass
 primHIPsDESD.add_JobProperty(HipsTriggerFilterExpression)
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/compileRPVLLRates.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/compileRPVLLRates.py
index ccf303c62da4b65297a752678ecc33ab48850b5f..6713bdf2b65645eebcb30d3e512c94ca79428752 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/compileRPVLLRates.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/compileRPVLLRates.py
@@ -1,191 +1,465 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Author: Heather Russel
+# Modified: 17 July 2017 by Colleen Treado
 
-#the input log file should have the output of:
-#python readFiles.py [output file name] [InputFolderWithLogFiles]
-#easiest to do if you're in the run folder.
-# do "eosmount eosDir; cd eosDir/atlas/atlastier0/tzero/prod/data16_13TeV/physics_Main/00303304/"
-# then run the python command from that folder, with the input folder name in this case being data16_13TeV.00303304.physics_Main.daq.RAW.f716.recon.task.LOG/
+# STEP 1: PARSE PHYSICS MAIN LOGFILES
+# $ python readFiles.py [output file name] [InputFolderWithLogFiles]
+# before deleted, can find physics_Main log files on eos -- ex:
+# /eos/atlas/atlastier0/tzero/prod/data16_13TeV/physics_Main/00303304/data16_13TeV.00303304.physics_Main.daq.RAW.f716.recon.task.LOG/
+# 2*n_filters+1 lines should be recovered from each file!
+# 22 filters + DVAugmentationKernel --> 2*23+1 = 47
 
-#for shorter runs, you can also use a grep command:
-#grep -E "RAWtoESD.*RPVLL.*Events|BSESOutputSvcStreamDRAW_RPVLL.*events" 00300784/data16_13TeV.00300784.physics_Main.daq.RAW.f708.recon.task.LOG/* > ~/rpvllLog_00300784.out &
-#the folder with log files is on eos: eos/eosatlas/atlastier0/tzero/prod/physics_Main/ 
-#if grep complains about the long argument, just cd into the folder with the log files. The command does take quite a while to run.
-#The log files only stay around for a few weeks, or the folder is empty and only LOGARC remain. the logs can likely be recovered from the LOGARC files, if necessary
+# NOTE: log files only stay around for a few weeks
+# or the folder is empty and LOGARC remains -->
+# logs can likely be recoverd from LOGARC files, if necessary
 
-#43 lines should be recovered from each file!
+# NOTE: for shorter or local individual runs can grep logs directly:
+# grep -E "RAWtoALL.*RPVLL.*Events|BSESOutputSvcStreamDRAW_RPVLL.*events" INPUT_LOG_FILES > rpvllLog_runNumber.out &
+
+# STEP 2: COMPILE RPVLL RATE INFORMATION
+# $ python compileRPVLLRates.py rpvllLog_runNumber.out RUNNUMBER lbTimes_runNumber.out
+# rpvllLog = output from readFiles.py or grep command
+# RUNNUMBER is data run number (for labeling plots)
+# lbTimes = list of lumiblocks and seconds/lumiblocks (can be copied from runquery)
+
+# NOTE ON lbTimes FILE:
+# for easiest copying from runquery, code designed to read file with (at least) three columns:
+# lb | start time (not used) | duration | nEvents in lb (optional)
+# --> second column must contain any non-empty string
+# --> fourth column is optional and used for scaling of analyses of partial lb's
+
+# outputs n_filters+1 rate plots:
+# one plot for overall rate + stacked filter rates
+# n_filters plots for individual filter rates -- one per filter
+# plots outputted into "plots/" directory
+# --> MAKE SURE THIS EXISTS IN CURRENT WORKING DIRECTORY (wherever script called from)
+
+# NOTE: for personal runs, RAWtoDRAW_RPVLL log files need to be in following format to work w/ this script:
+# *._lb*._*
 
-#run file with python compileRPVLLRates.py rpvllLog_00303304.out 303304 lbTimes_00303304.out
-#where the rpvllLog is the output from your grep command, next entry is the run number (plot label), and the next is a list of lb and seconds/lb (can be copied from runquery)
 
 import sys
 import ROOT
-from ROOT import gROOT, TCanvas, TH1F, THStack
+from ROOT import gROOT, TCanvas, TH1F, THStack, gPad, gStyle
 import math
+from decimal import Decimal
 
-#Make sure you have the atlas style files accessible!
-from AtlasStyle import SetAtlasStyle 
-SetAtlasStyle() 
 
-def end_lb(lumiBlock, lbEventList = [], rateHists = [], totalRateHist = 0):
-	events_in_lb = lbEventList[0]
-	events_passed_lb = lbEventList[42]
-	lbFilters = [0] * 20	
-	for i in range(0,21):
-	   if i < 7: 
-		lbFilters[i] = lbEventList[2*i+1]
-	   elif i > 7: lbFilters[i-1] = lbEventList[2*i+1]
-	for i,lb in enumerate(lbFilters):
-		rateHists[i].Fill(lumiBlock, float(lb) )
-	totalRateHist.Fill(lumiBlock, float(events_passed_lb) )
-	return
 
+## GET INPUT ARGUMENTS ##
 mypath = sys.argv[1]
 runNumber = sys.argv[2]
 lb_rates = sys.argv[3]
 
-List = open(mypath).readlines()
-c1 = TCanvas( 'c1', 'yay canvas', 1000, 600 )
 
-#the filter names could change run-to-run, with filter updates. If so, need to update the number of items in the list
-#and the hardcoded numbers 43 (2*number of filters + 1 line for the total accepted into RPVLL) , 21 (number of filters), 42 (2*number of filters)
-filterNames = ['DiLep_SiElectronFilterKernel','DiLep_SiPhotonXFilterKernel','DiLep_SiMuonFilterKernel','DiLep_DiElectronFilterKernel','DiLep_DiPhotonFilterKernel',
-'DiLep_DiElPhFilterKernel','DiLep_DiLoElPhFilterKernel','DVAugmentationKernel','DVMuonFilterKernel','DV_PhotonFilterKernel',
-'DV_PhotonPlusTLJetFilterKernel','DV_MultiJetFilterKernel','DV_METFilterKernel','DV_MeffFilterKernel','KinkedTrackJetFilterKernel',
-'KinkedTrackZeeFilterKernel','KinkedTrackZmumuFilterKernel','HnlFilterKernel','HV_MuvtxFilterKernel','HV_JetMETFilterKernel','HV_CalRatioFilterKernel']
+##  GET FILTERS ##
+# DVAugmentationKernel not a filter -- include in printout but not plots or rate calc.
+# DVAugmentationKernel appears 7th in filter list (counting from 0)
+# 22 filters -- 23 including DVAug
+filterNames = [ 'DiLep_SiElectronFilterKernel',
+                'DiLep_SiPhotonXFilterKernel',
+                'DiLep_SiMuonFilterKernel',
+                'DiLep_DiElectronFilterKernel',
+                'DiLep_DiPhotonFilterKernel',
+                'DiLep_DiElPhFilterKernel',
+                'DiLep_DiLoElPhFilterKernel',
+                'DVAugmentationKernel',
+                'DVMuonFilterKernel',
+                'DV_PhotonFilterKernel',
+                'DV_PhotonPlusTLJetFilterKernel',
+                'DV_MultiJetFilterKernel',
+                'DV_METFilterKernel',
+                'DV_MeffFilterKernel',
+                'KinkedTrackJetFilterKernel',
+                'KinkedTrackMultiJetFilterKernel',
+                'KinkedTrackZeeFilterKernel',
+                'KinkedTrackZmumuFilterKernel',
+                'EmergingFilterKernel',
+                'HnlFilterKernel',
+                'HV_MuvtxFilterKernel',
+                'HV_JetMETFilterKernel',
+                'HV_CalRatioFilterKernel' ]
+
+# list filter names excluding DVAugmentationKernel -- for plotting and calculating rate
+filterNames_mAug = [fn for fn in filterNames if fn != 'DVAugmentationKernel']
+
+nf = len(filterNames) # number of filters (23)
+nfm = len(filterNames_mAug) # number of filters excluding DVAug (22)
+nft = nf*2+1 # number of filters times two (events analyzed + accepted) plus one (total) (47)
+n_aug = filterNames.index('DVAugmentationKernel') # filterNames ix where DVAug resides (7)
 
-#just a list of filter names minus the augmentation kernel, which is just every event in the run (we don't want to plot that!)
-filterNames_mAug = ['DiLep_SiElectronFilterKernel','DiLep_SiPhotonXFilterKernel','DiLep_SiMuonFilterKernel','DiLep_DiElectronFilterKernel','DiLep_DiPhotonFilterKernel',
-'DiLep_DiElPhFilterKernel','DiLep_DiLoElPhFilterKernel','DVMuonFilterKernel','DV_PhotonFilterKernel',
-'DV_PhotonPlusTLJetFilterKernel','DV_MultiJetFilterKernel','DV_METFilterKernel','DV_MeffFilterKernel','KinkedTrackJetFilterKernel',
-'KinkedTrackZeeFilterKernel','KinkedTrackZmumuFilterKernel','HnlFilterKernel','HV_MuvtxFilterKernel','HV_JetMETFilterKernel','HV_CalRatioFilterKernel']
 
-eventList = [0] * 43
-lbEventList = [0] * 43 
+## CLASS TO FILL RATE HISTOGRAMS W/ NUMBER OF PASSING EVENTS PER LUMIBLOCK ##
+# lumiblock = specific lumiblock being read
+# lbEventList = list of number of events analyzed and accepted per filter + total accepted for one lumiblock
+# rateHists = list of individual filter rate histograms
+# totalRateHist = overall rpvll rate histogram
+def end_lb(lumiBlock, lbEventList = [], rateHists = [], totalRateHist = 0):
+    n_events_lb = lbEventList[0] # get total number of events per lumiblock
+    n_passed_lb = lbEventList[nft-1] # get total number of filter-passing events per lumiblock
+    lbFilters = [0] * (nf-1) # initialize list of filter-passing events for specific lumiblock
+    for i in range (0,nf):
+        # exclude DVAug -- don't want to plot this
+        if i < n_aug:
+            # every second line contains number of accepted events
+            lbFilters[i] = lbEventList[2*i+1]
+        elif i > n_aug:
+            lbFilters[i-1] = lbEventList[2*i+1]
+    # fill each filter histogram with filter rate
+    for i,lb in enumerate(lbFilters):
+        rateHists[i].Fill(lumiBlock, float(lb))
+    # fill total-rate histogram with overal rpvll rate
+    totalRateHist.Fill(lumiBlock, float(n_passed_lb))
+    return
+
 
+## INITIALIZE HISTOGRAMS ##
+# individual filter histograms
 rateHists = []
-for i in range(0,20):
-  rateHists.append(TH1F("ratePerLB_filter"+str(i),"ratePerLB_filter;lb;rate",2500,0,2500))
-  rateHists[i].Sumw2()
-totalRateHist = TH1F("ratePerLB_full","ratePerLB_full;lb;rate",2500,0,2500)
+for i in range(0,nf-1):
+    rateHists.append(TH1F("ratePerLB_filter" + str(i), "ratePerLB_filter;lb;rate", 2500, 0, 2500))
+    rateHists[i].Sumw2()
+eventHists=[]
+for i in range(0,nf-1):
+    eventHists.append(TH1F("eventsPerLB_filter" + str(i), "eventsPerLB_filter;lb;events", 2500, 0, 2500))
+    eventHists[i].Sumw2()
+# overall rate histogram
+totalRateHist = TH1F("ratePerLB_overall", "ratePerLB_overall;lb;rate", 2500, 0, 2500)
 totalRateHist.Sumw2()
 
-lbTimeHist = TH1F("lbTimeHist","lbTimeHist",2500,0,2500)
+# lumiblock-time hist (needed to calculate rate)
+lbTimeHist = TH1F("lbTimeHist", "lbTimeHist", 2500, 0, 2500)
 lbList = open(lb_rates).readlines()
 for lineNo,line in enumerate(lbList):
-	lbTimeHist.Fill(float(line.split()[0]), float(line.split()[1]))
-	lbTimeHist.SetBinError(lbTimeHist.FindBin(float(line.split()[0])),0)
+    lbTimeHist.Fill(float(line.split()[0]), float(line.split()[2]))
+    lbTimeHist.SetBinError(lbTimeHist.FindBin(float(line.split()[0])), 0) # ???
+
+
+## GET FILTER EVENT DATA FROM RPVLL LOG FILE ##
+# open list of filter data
+List = open(mypath).readlines()
+
+# initialize lists to hold filter data from log files
+lbEventList = [0] * nft # events per lumiblock
+eventList = [0] * nft # total events for all lumiblocks
 
-current_lb = 0
+# initialize lumiblock variables
 first_lb = 0
-last_lb = 2500
+first_line = List[0]
+for lb1 in first_line.split("._"):
+    if "lb" in lb1: first_lb = int(lb1[2:])
+current_lb = first_lb
+last_lb = 2500 # will change based on data in file
+print "FIRST LB:", first_lb, current_lb
 
+# initialize list to hold total number of processed events per lumiblock
+procEvents = []
+
+# loop over lines in filter-data list (from rpvll log output)
 for lineNo,line in enumerate(List):
-    if lineNo%43 == 0:
-    	for lb in line.split("._"):
-	    if "lb" in lb:
-	    	if int(lb[2:]) != current_lb:
-			if current_lb != 0: end_lb(current_lb, lbEventList, rateHists, totalRateHist)
-			lbEventList = [0] * 43
-			current_lb = int(lb[2:])
-		if first_lb == 0:
-			first_lb = current_lb
-    if(lineNo < len(List) - 43):
-        if(line.split()[0][:-10] == List[lineNo+43].split()[0][:-10]):
-		continue
-    [int(s) for s in line.split() if s.isdigit()]
-    eventList[lineNo%43] += int(s)
-    lbEventList[lineNo%43] += int(s)
-
-#print eventList
+    # if line number mod 2*n_filters+1 = 0, we're at the beginning of filter list
+    if lineNo % nft == 0:
+        # extract lumiblock info from line
+        for lb in line.split("._"):
+            if "lb" in lb:
+                # if lumiblock read from line not "current_lb"
+                # we've collected all info for current lumiblock --> start of new lb
+                # --> call end_lb for lumiblock just processed + reset
+                if int(lb[2:]) != current_lb:
+                    end_lb(current_lb, lbEventList, rateHists, totalRateHist)
+                    # save number of events processed per lumiblock
+                    procEvents.append(lbEventList[0])
+                    # set current lumiblock to lumiblock read from line
+                    current_lb = int(lb[2:])
+                    # re-initialize lbEventList -- set all elements to zero
+                    lbEventList = [0] * nft
+    # catches any repeats ??? -- necessary to avoid overcounting somehow
+    if (lineNo < len(List) - nft):
+        if (line.split()[0][:-10] == List[lineNo+nft].split()[0][:-10]):
+            continue
+    # get number of events analyzed/accepted from each line
+    s = line.split()[-1]
+    # add number of events analyzed/accepted per lb to lbEventList
+    lbEventList[lineNo % nft] += int(s)
+    eventList[lineNo % nft] += int(s)
+
+# run end_lb for last lumiblock; set last_lb to last lb in file; get n events from last lb
 end_lb(current_lb, lbEventList, rateHists, totalRateHist)
 last_lb = current_lb
+procEvents.append(lbEventList[0])
 
-TotalEvents = eventList[0]
-TotalRPVLLPass = eventList[42]
-print 'Out of ',TotalEvents,' events, ',TotalRPVLLPass,' events passed RPVLL filters. Efficiency: ',float(TotalRPVLLPass)/float(TotalEvents)*100.,'%.'
 
-TotalFracList = [0]*21
-RPVLLFracList = [0]*21
-filterEvents = [0]*21
+## RATE / EFFICIENCY CALCULATIONS ##
+totalEvents = eventList[0]
+totalRPVLLpass = eventList[nft-1]
+print 'Events passing RPVLL filters:', totalRPVLLpass, 'out of', totalEvents
+print 'RPVLL filter efficiency:', float(totalRPVLLpass)/float(totalEvents) * 100., '%'
+print 'RPVLL normalized average rate: ', float(totalRPVLLpass)/float(totalEvents) * 1000., 'Hz'
+print ''
+
+# calculate fraction of events passing each indidivual filter
+fracList_total = [0] * nf # fraction of ALL events passing filter
+fracList_RPVLL = [0] * nf # fraction of RPVLL events passing filter
+filterEvents = [0] * nf
 closureTest = 0
 
-for filterNo in range(0,21):	
-	closureTest += eventList[filterNo*2+1]
-	TotalFracList[filterNo] = float(eventList[filterNo*2+1])/float(TotalEvents)
-	RPVLLFracList[filterNo] = float(eventList[filterNo*2+1])/float(TotalRPVLLPass)
-	filterEvents[filterNo] = eventList[filterNo*2+1]
-	print filterNames[filterNo],' (rel, total): (',RPVLLFracList[filterNo],', ',TotalFracList[filterNo],')'
-	
-#subtracting away the results of the DVAugmentationKernel, which isn't a filter.
-#the first number should always be greater than the second - because of overlaps.
-print 'Total number of events passing filters / total number passing RPVLL: ',closureTest-eventList[15],'/',TotalRPVLLPass,'. Rate: ',float(closureTest-eventList[15])/float(TotalRPVLLPass)*100.,'%.'
-
-#printout for easy copy-paste into google spreasheet:
-for n in filterNames:
-	print n,
+print 'FRACTION OF (RPVLL | TOTAL) EVENTS PASSING EACH FILTER:'
+for filterNo in range(0,nf):
+    closureTest += eventList[filterNo*2+1]
+    fracList_total[filterNo] = float(eventList[filterNo*2+1])/float(totalEvents)
+    fracList_RPVLL[filterNo] = float(eventList[filterNo*2+1])/float(totalRPVLLpass)
+    filterEvents[filterNo] = eventList[filterNo*2+1]
+    if filterNo != n_aug:
+        print filterNames[filterNo], ' -- ', '%.2E' % Decimal(fracList_RPVLL[filterNo]), ' | ', '%.2E' % Decimal(fracList_total[filterNo])
+print ''
+
+print 'NORMALIZED (to 1 kHz) AVERAGE FILTER RATE:'
+for filterNo in range(0,nf):
+    if filterNo != n_aug:
+        print filterNames[filterNo], ' -- ', '%.2f' % (fracList_total[filterNo]*1000), 'Hz'
+print ''
+
+# subtract away events corresponding to DVAugmentationKernel -- NOT A FILTER
+# closureTest_mAug will always be larger than totalRPVLLpass because of overlap
+# --> some RPVLL events will pass multiple filters and thus be added multiple times
+closureTest_mAug = closureTest - filterEvents[n_aug]
+print 'Total number of events passing filters / total number of events passing RPVLL: ', closureTest_mAug, '/', totalRPVLLpass, '=', float(closureTest_mAug)/float(totalRPVLLpass) * 100., '%'
+print ''
+                
+# printout for easy copy-paste into google spreadsheet
+for n in filterNames_mAug:
+    print n,
+print ''
+for n in range(0,nf):
+    if n != n_aug: print filterEvents[n],
 print ''
-for n in filterEvents:
-	print n,
 
+
+
+## INITIALIZE OTHER LUMIBLOCK HISTS ##
+lbEventHist = TH1F("lbEventHist", "lbEventHist", 2500, 0, 2500)
+lbFullEventHist = TH1F("lbFullEventHist", "lbFullEventHist", 2500, 0, 2500)
+lbScaleHist = TH1F("lbScaleHist", "lbScaleHist", 2500, 0, 2500)
+# parse lbTimes file for total events per lumiblock per run -- for scaling partial runs
+scale = []
+l = 0
+for lineNo,line in enumerate(lbList):
+    if (float(line.split()[0]) >= first_lb and float(line.split()[0]) <= last_lb):
+        lbEventHist.Fill(float(line.split()[0]), procEvents[l])
+        lbEventHist.SetBinError(lbEventHist.FindBin(float(line.split()[0])), 0)
+        if len(line.split()) > 3:
+            lbFullEventHist.Fill(float(line.split()[0]), float(line.split()[3]))
+            lbFullEventHist.SetBinError(lbFullEventHist.FindBin(float(line.split()[0])), 0)
+            scale.append(float(line.split()[3])/float(procEvents[l]))
+        else:
+            lbFullEventHist.Fill(float(line.split()[0]), procEvents[l])
+            scale.append(1)
+        lbScaleHist.Fill(float(line.split()[0]), scale[l])
+        lbScaleHist.SetBinError(lbScaleHist.FindBin(float(line.split()[0])), 0)
+        #print "TEST: ", line.split()[0], procEvents[l], scale[l], l, lineNo, len(procEvents)
+        l += 1
+print ''
+
+
+## DRAW + PRINT PLOTS ##
+# set colors for individual filter rate hists
+colors = [
+# seven for DiLep
+ROOT.kBlue+3, ROOT.kBlue+1, ROOT.kBlue-4, ROOT.kBlue-2, ROOT.kBlue-7,ROOT.kBlue-5, ROOT.kBlue-9,
+# six for DV
+ROOT.kRed+3, ROOT.kRed+1, ROOT.kRed-2, ROOT.kRed-4, ROOT.kRed-6,ROOT.kRed-9,
+# four for kinked track
+ROOT.kCyan+2, ROOT.kTeal-8, ROOT.kCyan-6, ROOT.kCyan,
+# emerging
+ROOT.kGreen+1,
+# HNL
+ROOT.kOrange+8,
+# three for HV
+ROOT.kViolet+8, ROOT.kViolet+3, ROOT.kViolet-9 ]
+
+# ALL FILTERS -- STACK PLOT
+# create + configure new canvas
+c1 = TCanvas('c1', '', 1000, 600)
+c1.SetRightMargin(0.25)
+c1.SetLeftMargin(0.1)
+
+# create + configure new legend
+l1 = ROOT.TLegend(0.76, 0.1, 0.97, 0.91)
+l1.SetFillColor(0)
+l1.SetFillStyle(0)
+l1.SetBorderSize(0)
+l1.SetTextSize(0.02)
+
+# FILTER EVENTS
+# configure total rate hist
 totalRateHist.SetMarkerStyle(22)
 totalRateHist.SetMarkerSize(1.2)
 if (last_lb - first_lb) > 600:
-	totalRateHist.SetMarkerSize(0.6)
+    totalRateHist.SetMarkerSize(0.6)
 totalRateHist.SetMarkerColor(ROOT.kBlack)
 totalRateHist.SetLineColor(ROOT.kBlack)
-totalRateHist.Divide(lbTimeHist)
-for bin in range(1,totalRateHist.GetNbinsX() + 1):
-	totalRateHist.SetBinError( bin, 0 ) #the rate is what it is, there are no appreciable errors on it
-hs = THStack("hs","Stacked 1D histograms");
+for bin in range(1, totalRateHist.GetNbinsX() + 1):
+    totalRateHist.SetBinError(bin, 0) # no appreciable errors on rate
+# add total rate hist entry to legend
+l1.AddEntry(totalRateHist, "Overall RPVLL Events", "lp")
 
-colors = [
-#Seven for DiLep
-ROOT.kBlue+3, ROOT.kBlue +1, ROOT.kBlue- 4, ROOT.kBlue-2, ROOT.kBlue - 7,ROOT.kBlue - 5, ROOT.kBlue -9, 
-#Six for DV
-ROOT.kRed+3, ROOT.kRed +1, ROOT.kRed-2, ROOT.kRed - 4, ROOT.kRed -6,ROOT.kRed -9,
-#Three for kinked track
-ROOT.kCyan+2, ROOT.kTeal - 8, ROOT.kCyan -6, 
-#HNL
-ROOT.kOrange+8, 
-#Three for HV
-ROOT.kViolet +8, ROOT.kViolet+3,  ROOT.kViolet -9,
-#Extra
-ROOT.kGreen+3, ROOT.kGreen +1, ROOT.kGreen-1, ROOT.kGreen - 2, ROOT.kGreen -6 ]
+# initialize stack for all filter rate hists
+hs1 = THStack("hs1", "");
+# add individual filter rate hists to stack
+for i,hist in enumerate(rateHists):
+    hist.SetFillColor(colors[i])
+    hist.SetLineColor(colors[i])
+    hs1.Add(hist)
+    # add individual rate entries to legend
+    l1.AddEntry(hist, filterNames_mAug[i], "f")
 
-c1.SetRightMargin(0.25)
-c1.SetLeftMargin(0.1)
-leg = ROOT.TLegend(0.76,.15,.97,.96)
-leg.SetFillColor(0)
-leg.SetFillStyle(0)
-leg.SetBorderSize(0)
-leg.SetTextSize(0.02)
-leg.AddEntry(totalRateHist, "Overall RPVLL rate","lp")
+# draw individual filter stack + overall rate hist
+hs1.Draw("HIST")
+totalRateHist.Draw("pSAME")
+
+## configure axes
+# set axis titles
+hs1.GetXaxis().SetTitle("lumi block")
+hs1.GetYaxis().SetTitle("n events")
+hs1.GetYaxis().SetTitleOffset(.75)
+# set axis ranges
+hs1.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+hs1.GetYaxis().SetRangeUser(0, 100)
+# set tick marks on all axes
+gPad.SetTicks(1, 1)
+
+# draw legend
+l1.Draw()
+
+# add text to plot
+latex1 = ROOT.TLatex(0.52, 0.875, "#font[72]{ATLAS }#font[42]{Internal}")
+latex1.SetNDC()
+latex1.SetTextSize(0.05)
+latex1.SetTextAlign(13)
+latex1.Draw()
+latex2 = ROOT.TLatex(0.55, 0.82, "Run " + runNumber)
+latex2.SetNDC()
+latex2.SetTextSize(0.05)
+latex2.SetTextAlign(13)
+latex2.SetTextFont(42)
+latex2.Draw()
 
+# print stack
+c1.Update()
+c1.Print("run_" + runNumber + "_rpvllEvents.pdf")
+c1.Clear()
+l1.Clear()
+
+
+# individual filter events
+c2 = TCanvas('c2', '', 850, 600)
+c2.SetRightMargin(0.11765)
+c2.SetLeftMargin(0.11765)
+
+latex3 = ROOT.TLatex(0.62, 0.875, "#font[72]{ATLAS }#font[42]{Internal}")
+latex3.SetNDC()
+latex3.SetTextSize(0.05)
+latex3.SetTextAlign(13)
+latex4 = ROOT.TLatex(0.65, 0.82, "Run " + runNumber)
+latex4.SetNDC()
+latex4.SetTextSize(0.05)
+latex4.SetTextAlign(13)
+latex4.SetTextFont(42)
+
+# loop over filter rate histograms
+for j,h in enumerate(rateHists):
+    h.SetMarkerStyle(22)
+    h.SetMarkerSize(1.2)
+    if (last_lb - first_lb) > 600:
+        h.SetMarkerSize(0.6)
+    h.SetMarkerColor(colors[j])  
+    h.SetLineColor(colors[j])
+    h.Draw("P")
+    h.SetTitle(filterNames_mAug[j])
+    h.GetXaxis().SetTitle("lumi block")
+    h.GetYaxis().SetTitle("n events")
+    h.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+    h.SetStats(ROOT.kFALSE)
+    gPad.SetTicks(1,1)
+    gStyle.SetErrorX(0)
+    latex3.Draw()
+    latex4.Draw()
+    c2.Update()
+    c2.Print("run_" + runNumber + "_" + str(j) + "_events.pdf")
+    
+
+# FILTER RATES
+c1.cd()
+# configure total rate hist
+totalRateHist.Divide(lbTimeHist)
+totalRateHist.Multiply(lbScaleHist)
+for bin in range(1, totalRateHist.GetNbinsX() + 1):
+    totalRateHist.SetBinError(bin, 0) # no appreciable errors on rate
+# add total rpvll rate hist entry to legend
+l1.AddEntry(totalRateHist, "Overall RPVLL Rate", "lp")
+
+# initialize stack for all filter rate hists
+hs2 = THStack("hs2", "");
+# add individual filter rate hists to stack
 for i,hist in enumerate(rateHists):
-	hist.SetFillColor(colors[i])
-	hist.SetLineColor(colors[i])
-	hist.Divide(lbTimeHist)
-	hs.Add(hist)
-	leg.AddEntry(hist, filterNames_mAug[i], "f")	
-
-hs.Draw("HIST")
-hs.GetXaxis().SetTitle("lumi block")
-hs.GetYaxis().SetTitle("rate [Hz]")
-hs.GetYaxis().SetTitleOffset(0.8)
+    hist.SetFillColor(colors[i])
+    hist.SetLineColor(colors[i])
+    hist.Divide(lbTimeHist)    # calculate rate estimate
+    hist.Multiply(lbScaleHist) # scale to full lb
+    hs2.Add(hist)
+    # add individual event entries to legend
+    l1.AddEntry(hist, filterNames_mAug[i], "f")
+
+# draw individual filter stack + overall rate hist
+hs2.Draw("HIST")
 totalRateHist.Draw("pSAME")
 
-hs.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
-hs.GetYaxis().SetRangeUser(0,100)
-leg.Draw()
-latex2 = ROOT.TLatex(0.55,0.86,"Run "+runNumber)
-latex2.SetNDC();
-latex2.SetTextSize(0.05);
-latex2.SetTextAlign(13); 
+## configure axes
+# set axis titles
+hs2.GetXaxis().SetTitle("lumi block")
+hs2.GetYaxis().SetTitle("rate [Hz]")
+hs2.GetYaxis().SetTitleOffset(.75)
+# set axis ranges
+hs2.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+hs2.GetYaxis().SetRangeUser(0,100)
+# set tick marks on all axes
+gPad.SetTicks(1,1)
+
+# draw legend
+l1.Draw()
+
+# add text to plot
+latex1.Draw()
 latex2.Draw()
-latex = ROOT.TLatex(0.52,0.915,"#font[72]{ATLAS }#font[42]{Internal}")
-latex.SetNDC();
-latex.SetTextSize(0.05);
-latex.SetTextAlign(13); 
-latex.Draw()
+
+# print stack
 c1.Update()
-c1.Print("run_"+runNumber+"_rate.pdf")
+c1.Print("run_" + runNumber + "_rpvllRate.pdf")
+c1.Clear()
+l1.Clear()
+
+
+# individual filter rates
+c2.cd()
+# loop through filter rate histograms
+for j,h in enumerate(rateHists):
+    h.SetMarkerStyle(22)
+    h.SetMarkerSize(1.2)
+    if (last_lb - first_lb) > 600:
+        h.SetMarkerSize(0.6)
+    h.SetMarkerColor(colors[j])  
+    h.SetLineColor(colors[j])
+    # already divided by lb-times + multiplied by scale
+    h.Draw("P")
+    h.SetTitle(filterNames_mAug[j])
+    h.GetXaxis().SetTitle("lumi block")
+    h.GetYaxis().SetTitle("rate [Hz]")
+    h.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+    h.SetStats(ROOT.kFALSE)
+    gPad.SetTicks(1,1)
+    gStyle.SetErrorX(0)
+    latex3.Draw()
+    latex4.Draw()
+    c2.Update()
+    c2.Print("run_" + runNumber + "_" + str(j) + "_rate.pdf")
+
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/compileRPVLLRates_emergingFilterTest.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/compileRPVLLRates_emergingFilterTest.py
new file mode 100644
index 0000000000000000000000000000000000000000..039eb0f76560d404284123b59485fdbf47963593
--- /dev/null
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/compileRPVLLRates_emergingFilterTest.py
@@ -0,0 +1,665 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+# the input log file should have the output of:
+# $ python readFiles.py [output file name] [InputFolderWithLogFiles]
+# before deleted, can find log files on eos -- ex:
+# /eos/atlas/atlastier0/tzero/prod/data16_13TeV/physics_Main/00303304/data16_13TeV.00303304.physics_Main.daq.RAW.f716.recon.task.LOG/
+# log files only stay around for a few weeks, or the folder is empty and only LOGARC remains
+# logs can likely be recovered from LOGARC files, if necessary
+
+# for shorter or local individual runs, you can also use a grep command:
+# grep -E "RAWtoALL.*RPVLL.*Events|BSESOutputSvcStreamDRAW_RPVLL.*events" INPUT_LOG_FILES > rpvllLog_runNumber.out &
+
+# 2*n_filters+1 lines should be recovered from each file!
+# 22 filters + DVAugmentationKernel --> 2*23+1 = 47
+
+# compile rate estimates w/:
+# $ python compileRPVLLRates.py rpvllLog_runNumber.out RUNNUMBER lbTimes_runNumber.out
+# rpvllLog = output from readFiles.py or grep command
+# RUNNUMBER is data run number (for labeling plots)
+# lbTimes = list of lumiblocks info (can be copied from runquery)
+# --> column 1: lumiblock; column 2: lb duration; column 3: events per lb
+
+# NOTE ON lbTimes FILE:
+# for easiest copying from runquery, code designed to read file with (at least) three columns:
+# lb | start time (not used) | duration | nEvents in lb (optional)
+# --> second column must contain any non-empty string
+# --> fourth column is optional and used for scaling of analyses of partial lb's
+
+# outputs n_filters+1 rate plots:
+# one plot for overall rate + stacked filter rates
+# n_filters plots for individual filter rates -- one per filter
+# plots outputted into "plots/" directory
+# --> MAKE SURE THIS EXISTS IN CURRENT WORKING DIRECTORY (wherever script called from)
+
+# NOTE: for personal runs, RAWtoDRAW_RPVLL log files need to be in following format to work w/ this script:
+# *._lb*._*
+
+#############################################################################
+## TEST SCRIPT FOR EMERGING FILTER --> TESTING NEW PT CUTS + DIJET FILTERS ##
+#############################################################################
+
+import sys
+import ROOT
+from ROOT import gROOT, TCanvas, TH1F, THStack, gPad, gStyle
+import math
+from decimal import Decimal
+
+
+
+## GET INPUT ARGUMENTS ##
+mypath = sys.argv[1]
+runNumber = sys.argv[2]
+lb_rates = sys.argv[3]
+
+
+
+## GET FILTERS ##
+# DVAugmentationKernel not a filter -- remove from all outputs
+filterNames = [
+    'DiLep_SiElectronFilterKernel',
+    'DiLep_SiPhotonXFilterKernel',
+    'DiLep_SiMuonFilterKernel',
+    'DiLep_DiElectronFilterKernel',
+    'DiLep_DiPhotonFilterKernel',
+    'DiLep_DiElPhFilterKernel',
+    'DiLep_DiLoElPhFilterKernel',
+    'DVAugmentationKernel',
+    'DVMuonFilterKernel',
+    'DV_PhotonFilterKernel',
+    'DV_PhotonPlusTLJetFilterKernel',
+    'DV_MultiJetFilterKernel',
+    'DV_METFilterKernel',
+    'DV_MeffFilterKernel',
+    'KinkedTrackJetFilterKernel',
+    'KinkedTrackMultiJetFilterKernel',
+    'KinkedTrackZeeFilterKernel',
+    'KinkedTrackZmumuFilterKernel',
+    'EmergingFilterKernel',
+    'EmergingPt120FilterKernel',
+    'EmergingPt130FilterKernel',
+    'EmergingPt140FilterKernel',
+    'EmergingPt150FilterKernel',
+    'EmergingPt120HighPt250FilterKernel',
+    'EmergingPt130HighPt250FilterKernel',
+    'EmergingPt140HighPt250FilterKernel',
+    'EmergingPt150HighPt250FilterKernel',
+    'EmergingPt120HighPt300FilterKernel',
+    'EmergingPt130HighPt300FilterKernel',
+    'EmergingPt140HighPt300FilterKernel',
+    'EmergingPt150HighPt300FilterKernel',
+    'EmergingPt120HighPt350FilterKernel',
+    'EmergingPt130HighPt350FilterKernel',
+    'EmergingPt140HighPt350FilterKernel',
+    'EmergingPt150HighPt350FilterKernel',
+    'EmergingDiJet110FilterKernel',
+    'EmergingDiJet110Pt120FilterKernel',
+    'EmergingDiJet110Pt130FilterKernel',
+    'EmergingDiJet110Pt140FilterKernel',
+    'EmergingDiJet110Pt150FilterKernel',
+    'EmergingDiJet150FilterKernel',
+    'EmergingDiJet150Pt120FilterKernel',
+    'EmergingDiJet150Pt130FilterKernel',
+    'EmergingDiJet150Pt140FilterKernel',
+    'EmergingDiJet150Pt150FilterKernel',
+    'EmergingDiJet175FilterKernel',
+    'EmergingDiJet175Pt120FilterKernel',
+    'EmergingDiJet175Pt130FilterKernel',
+    'EmergingDiJet175Pt140FilterKernel',
+    'EmergingDiJet175Pt150FilterKernel',
+    'EmergingDiJet260FilterKernel',
+    'EmergingDiJet260Pt120FilterKernel',
+    'EmergingDiJet260Pt130FilterKernel',
+    'EmergingDiJet260Pt140FilterKernel',
+    'EmergingDiJet260Pt150FilterKernel',
+    'HnlFilterKernel',
+    'HV_MuvtxFilterKernel',
+    'HV_JetMETFilterKernel',
+    'HV_CalRatioFilterKernel' ]
+
+# list filter names excluding DVAugmentationKernel -- want to ignore completely
+filterNames_mAug = [fn for fn in filterNames if fn != 'DVAugmentationKernel']
+
+# list pt100 emerging filters
+filterNames_pt100 = [fn for fn in filterNames if ('Emerging' in fn and 'Pt' not in fn)]
+# list pt120 emerging filters
+filterNames_pt120 = [fn for fn in filterNames if ('Emerging' in fn and 'Pt120' in fn)]
+# list pt130 emerging filters
+filterNames_pt130 = [fn for fn in filterNames if ('Emerging' in fn and 'Pt130' in fn)]
+# list pt140 emerging filters
+filterNames_pt140 = [fn for fn in filterNames if ('Emerging' in fn and 'Pt140' in fn)]
+# list pt150 emerging filters
+filterNames_pt150 = [fn for fn in filterNames if ('Emerging' in fn and 'Pt150' in fn)]
+
+# extract just emerging + just dijet filters from each list
+# --> em_120, di_120
+# --> concatenate em + di lists --> em, di
+filterNames_em_pt100 = [fn for fn in filterNames_pt100 if 'DiJet' not in fn]
+filterNames_di_pt100 = [fn for fn in filterNames_pt100 if 'DiJet' in fn]
+#emFilterList = filterNames_em_pt100 + filterNames_di_pt100
+emFilterList = [fn for fn in filterNames_pt100 if 'DiJet' not in fn] + [fn for fn in filterNames_pt120 if 'DiJet' not in fn] + [fn for fn in filterNames_pt130 if 'DiJet' not in fn] + [fn for fn in filterNames_pt140 if 'DiJet' not in fn] + [fn for fn in filterNames_pt150 if 'DiJet' not in fn]
+dijetFilterList = [fn for fn in filterNames_pt100 if 'DiJet' in fn] + [fn for fn in filterNames_pt120 if 'DiJet' in fn] + [fn for fn in filterNames_pt130 if 'DiJet' in fn] + [fn for fn in filterNames_pt140 if 'DiJet' in fn] + [fn for fn in filterNames_pt150 if 'DiJet' in fn]
+for i in emFilterList:
+    print i
+print ''
+for i in dijetFilterList:
+    print i
+print ''
+
+
+
+# numbers of filters in different lists
+nf = len(filterNames)               # number of filters
+nft = nf*2+1                        # number of lines per lumiblock 
+
+# indices of certain filters
+ix_dv = filterNames.index('DVAugmentationKernel')
+ix_em = filterNames.index('EmergingFilterKernel')
+ix_dj = filterNames.index('EmergingDiJet110FilterKernel')
+print nf, nft, ix_dv, ix_em, ix_dj
+print ''
+
+
+
+# class to fill rate histograms with number of passing events per lumiblock
+# lumiblock = current lumiblock
+# lbEventList = filter event info for current lumiblock
+# --> n events processed + passed for each filter + n total rpvll events
+# rateHists = individual filter rate histograms
+# totalRateHist = overall rpvll rate histogram
+def end_lb(lumiBlock, lbEventList = [], rateHists = [], totalRateHist = 0):
+    n_passed_lb = lbEventList[nft-1] # get total number of rpvll events per lumiblock
+    lbFilters = [0] * (nf-1)         # initialize list of filter-passing events for specific lb
+    for i in range (0,nf):
+        # exclude DVAug -- don't want to plot this
+        if i < ix_dv:
+            # every second line contains number of accepted events (starts from 0)
+            lbFilters[i] = lbEventList[2*i+1]
+        elif i > ix_dv:
+            lbFilters[i-1] = lbEventList[2*i+1]
+    # fill each filter histogram with number of filter-passing events
+    for i,lb in enumerate(lbFilters):
+        rateHists[i].Fill(lumiBlock, float(lb))
+    # fill total-rate histogram with number of overall rpvll-passing events
+    totalRateHist.Fill(lumiBlock, float(n_passed_lb))
+    return
+
+
+
+## INITIALIZE HISTOGRAMS ##
+# individual filter histograms
+rateHists = []
+for i in range(0,nf-1):
+    rateHists.append(TH1F("ratePerLB_filter" + str(i), "ratePerLB_filter;lb;rate", 2500, 0, 2500))
+    rateHists[i].Sumw2()
+eventHists = []
+for i in range(0,nf-1):
+    eventHists.append(TH1F("eventsPerLB_filter" + str(i), "eventsPerLB_filter;lb;events", 2500, 0, 2500))
+    eventHists[i].Sumw2()
+# overall rate histogram
+totalRateHist = TH1F("ratePerLB_overall", "ratePerLB_overall;lb;rate", 2500, 0, 2500)
+totalRateHist.Sumw2()
+
+# lumiblock time hists (for calculating rate)
+lbTimeHist = TH1F("lbTimeHist", "lbTimeHist", 2500, 0, 2500)
+lbList = open(lb_rates).readlines()
+n_lb = 0
+for lineNo,line in enumerate(lbList):
+    lbTimeHist.Fill(float(line.split()[0]), float(line.split()[2]))
+    lbTimeHist.SetBinError(lbTimeHist.FindBin(float(line.split()[0])), 0)
+    n_lb += 1
+    
+
+
+## GET FILTER EVENT DATA FROM RPVLL LOG FILE ##
+# open list of filter data
+List = open(mypath).readlines()
+
+# initialize lists to hold filter data from log files
+lbEventList = [0] * nft # events per lumiblock
+eventList = [0] * nft   # total events for all lumiblocks
+
+# initialize lumiblock variables
+first_lb = 0
+first_line = List[0]
+for lb1 in first_line.split("._"):
+    if "lb" in lb1: first_lb = int(lb1[2:])
+current_lb = first_lb
+last_lb = 2500 # will change based on data in file
+
+#initialize list to hold total number of processed events per lumiblock
+procEvents = []
+lb_i = 0
+
+# loop over lines in filter-data list (from rpvll log output)
+for lineNo,line in enumerate(List):
+    # if line number mod 2*n_filters+1 = 0, we're at the beginning of filter list
+    if lineNo % nft == 0:
+        # extract lumiblock info from line
+        for lb in line.split("._"):
+            if "lb" in lb:
+                # if lumiblock read from line not "current_lb"
+                # we've collected all info for current lumiblock --> start of new lb
+                # --> call end_lb for lumiblock just processed + reset
+                if int(lb[2:]) != current_lb:
+                    end_lb(current_lb, lbEventList, rateHists, totalRateHist)
+                    # save number of events processed per lumiblock
+                    procEvents.append(lbEventList[0])
+                    # set current lumiblock to lumiblock read from line
+                    current_lb = int(lb[2:])
+                    # re-initialize lbEventList -- set all elements to zero
+                    lbEventList = [0] * nft
+    # catches any repeats ??? -- necessary to avoid overcounting somehow
+    if (lineNo < len(List) - nft):
+        if (line.split()[0][:-10] == List[lineNo+nft].split()[0][:-10]):
+            continue
+    # get number of events analyzed/accepted from each line
+    s = line.split()[-1]
+    # add number of events analyzed/accepted per lb to lbEventList
+    lbEventList[lineNo % nft] += int(s)
+    eventList[lineNo % nft] += int(s)
+
+# run end_lb for last lumiblock; set last_lb to last lb in file; get n events from last lb
+end_lb(current_lb, lbEventList, rateHists, totalRateHist)
+last_lb = current_lb
+procEvents.append(lbEventList[0])
+
+
+
+## RATE / EFFICIENCY CALCULATIONS ##
+totalEvents = eventList[0]
+totalRPVLLpass = eventList[nft-1]
+print 'Events passing RPVLL filters: ', totalRPVLLpass, 'out of ', totalEvents
+print 'RPVLL filter efficiency: ', float(totalRPVLLpass)/float(totalEvents) * 100., '%'
+print 'RPVLL normalized average rate: ', float(totalRPVLLpass)/float(totalEvents) * 1000., 'Hz'
+print ''
+
+# calculate fraction of events passing each individual filter
+fracList_total = [0] * nf # fraction of ALL events passing filter
+fracList_RPVLL = [0] * nf # fraction of RPVLL events passing filter
+filterEvents = [0] * nf
+closureTest = 0
+
+print 'FRACTION OF (RPVLL | TOTAL) EVENTS PASSING EACH FILTER:'
+for filterNo in range(0, nf):
+    closureTest += eventList[filterNo*2+1] # add up all filter-passing events
+    fracList_total[filterNo] = float(eventList[filterNo*2+1])/float(totalEvents)
+    fracList_RPVLL[filterNo] = float(eventList[filterNo*2+1])/float(totalRPVLLpass)
+    filterEvents[filterNo] = eventList[filterNo*2+1]
+#    if filterNo != ix_dv:
+#        print filterNames[filterNo], ' -- ', '%.2E' % Decimal(fracList_RPVLL[filterNo]), ' | ', '%.2E' % Decimal(fracList_total[filterNo])
+#print ''
+
+print 'NORMALIZED (to 1 kHz) AVERAGE FILTER RATE:'
+for filterNo in range(0, nf):
+    if filterNo != ix_dv:
+        print filterNames[filterNo], ' -- ', '%.2f' % (fracList_total[filterNo]*1000), 'Hz'
+print ''
+
+## subtract away events corresponding to DVAugmentationKernel -- NOT A FILTER
+## closureTest_mAug will always be larger than totalRPVLLpass because of overlap
+## --> some RPVLL events will pass multiple filters and thus be added multiple times
+#closureTest_mAug = closureTest - filterEvents[ix_dv]
+#print 'Total number of events passing filters / total number of events passing RPVLL: '
+#print closureTest_mAug, '/', totalRPVLLpass, '=', float(closureTest_mAug)/float(totalRPVLLpass) * 100., '%'
+#print ''
+#
+## printout for easy copy-paste into google spreadsheet
+#for n in filterNames_mAug:
+#    print n,
+#print ''
+#for i,n in enumerate(filterEvents):
+#    if i != ix_dv: print n,
+#print ''
+
+
+
+## INITIALIZE OTHER LUMIBLOCK HISTS ##
+lbEventHist = TH1F("lbEventHist", "lbEventHist", 2500, 0, 2500)
+lbFullEventHist = TH1F("lbFullEventHist", "lbFullEventHist", 2500, 0, 2500)
+lbScaleHist = TH1F("lbScaleHist", "lbScaleHist", 2500, 0, 2500)
+# parse lbTimes file for total events per lumiblock per run -- for scaling partial runs
+scale = []
+l = 0
+for lineNo,line in enumerate(lbList):
+    if (float(line.split()[0]) >= first_lb and float(line.split()[0]) <= last_lb):
+        lbEventHist.Fill(float(line.split()[0]), procEvents[l])
+        lbEventHist.SetBinError(lbEventHist.FindBin(float(line.split()[0])), 0)
+        if (len(line.split()) > 3:
+            lbFullEventHist.Fill(float(line.split()[0]), float(line.split()[3]))
+            lbFullEventHist.SetBinError(lbFullEventHist.FindBin(float(line.split()[0])), 0)
+            scale.append(float(line.split()[3])/float(procEvents[l]))
+        else:
+            lbFullEventHist.Fill(float(line.split()[0]), procEvents[l])
+            scale.append(1)
+        lbScaleHist.Fill(float(line.split()[0]), scale[l])
+        lbScaleHist.SetBinError(lbScaleHist.FindBin(float(line.split()[0])), 0)
+        print line.split()[0], procEvents[l], line.split()[3], scale[l]
+        l += 1
+print ''
+
+
+
+## DRAW + PRINT PLOTS ##
+# set colors for filters
+colors = [
+# seven for DiLep
+ROOT.kBlue+3, ROOT.kBlue+1, ROOT.kBlue-4, ROOT.kBlue-2, ROOT.kBlue-7, ROOT.kBlue-5, ROOT.kBlue-9,
+# six for DV
+ROOT.kRed+3, ROOT.kRed+1, ROOT.kRed-2, ROOT.kRed-4, ROOT.kRed-6, ROOT.kRed-9,
+# four for kinked track
+ROOT.kCyan+2, ROOT.kTeal-8, ROOT.kCyan-6, ROOT.kCyan,
+# five for emerging
+ROOT.kGreen+1, ROOT.kGreen+3, ROOT.kSpring+4, ROOT.kYellow-2, ROOT.kOrange,
+# HNL
+ROOT.kOrange+8,
+# three for HV
+ROOT.kViolet+8, ROOT.kViolet+3, ROOT.kViolet-9,
+# extras
+ROOT.kViolet, ROOT.kMagenta+2, ROOT.kPink+10, ROOT.kPink+5, ROOT.kPink-5 ]
+
+
+# ALL FILTERS -- STACK PLOT
+# create + configure new canvas
+c1 = TCanvas('c1', '', 1000, 600)
+c1.SetRightMargin(0.25)
+c1.SetLeftMargin(0.1)
+
+# create + configure new legend
+l1 = ROOT.TLegend(0.76, 0.1, 0.97, 0.91)
+l1.SetFillColor(0)
+l1.SetFillStyle(0)
+l1.SetBorderSize(0)
+l1.SetTextSize(0.02)
+
+# FILTER EVENTS
+# configure total rate hist
+totalRateHist.SetMarkerStyle(22)
+totalRateHist.SetMarkerSize(1.2)
+if (last_lb - first_lb) > 600:
+    totalRateHist.SetMarkerSize(0.6)
+totalRateHist.SetMarkerColor(ROOT.kBlack)
+totalRateHist.SetLineColor(ROOT.kBlack)
+for bin in range(1, totalRateHist.GetNbinsX() + 1):
+    totalRateHist.SetBinError(bin, 0) # no appreciable errors on rate
+# add total rpvll event hist entry to legend
+l1.AddEntry(totalRateHist, "Overall RPVLL Events", "lp")
+
+# initialize stack for all filter rate hists
+hs1 = THStack("hs1", "");
+# add individual filter rate hists to stack
+for i,hist in enumerate(rateHists):
+    hist.SetFillColor(colors[i%len(colors)])
+    hist.SetLineColor(colors[i%len(colors)])
+    if i >= len(colors):
+        hist.SetFillStyle(3004)
+    hs1.Add(hist)
+    # add individual event entries to legend
+    l1.AddEntry(hist, filterNames_mAug[i], "f")
+
+# draw individual filter stack + overall rate hist
+hs1.Draw("HIST")
+totalRateHist.Draw("pSAME")
+
+## configure axes
+# set axis titles
+hs1.GetXaxis().SetTitle("lumi block")
+hs1.GetYaxis().SetTitle("n events")
+hs1.GetYaxis().SetTitleOffset(.75)
+# set axis ranges
+hs1.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+hs1.GetYaxis().SetRangeUser(0,100)
+# set tick marks on all axes
+gPad.SetTicks(1,1)
+
+# draw legend
+l1.Draw()
+
+# add text to plot
+latex1 = ROOT.TLatex(0.52, 0.875, "#font[72]{ATLAS }#font[42]{Internal}")
+latex1.SetNDC()
+latex1.SetTextSize(0.05)
+latex1.SetTextAlign(13)
+latex1.Draw()
+latex2 = ROOT.TLatex(0.55, 0.82, "Run " + runNumber)
+latex2.SetNDC()
+latex2.SetTextSize(0.05)
+latex2.SetTextAlign(13)
+latex2.SetTextFont(42)
+latex2.Draw()
+
+# print stack
+c1.Update()
+c1.Print("run_" + runNumber + "_events.pdf")
+c1.Clear()
+l1.Clear()
+
+
+# INDIVIDUAL FILTER EVENTS
+c2 = TCanvas('c2', '', 850, 600)
+c2.SetRightMargin(0.11765)
+c2.SetLeftMargin(0.11765)
+
+latex3 = ROOT.TLatex(0.62, 0.875, "#font[72]{ATLAS }#font[42]{Internal}")
+latex3.SetNDC()
+latex3.SetTextSize(0.05)
+latex3.SetTextAlign(13)
+latex4 = ROOT.TLatex(0.65, 0.82, "Run " + runNumber)
+latex4.SetNDC()
+latex4.SetTextSize(0.05)
+latex4.SetTextAlign(13)
+latex4.SetTextFont(42)
+
+# loop over filter rate histograms
+for j,h in enumerate(rateHists):
+    h.SetMarkerStyle(22)
+    h.SetMarkerSize(1.2)
+    if (last_lb - first_lb) > 600:
+        h.SetMarkerSize(0.6)
+    h.SetMarkerColor(colors[j%len(colors)])  
+    h.SetLineColor(colors[j%len(colors)])
+    h.Draw("P")
+    h.SetTitle(filterNames_mAug[j])
+    h.GetXaxis().SetTitle("lumi block")
+    h.GetYaxis().SetTitle("n events")
+    h.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+    h.SetStats(ROOT.kFALSE)
+    gPad.SetTicks(1,1)
+    gStyle.SetErrorX(0)
+    latex3.Draw()
+    latex4.Draw()
+    c2.Update()
+    c2.Print("run_" + runNumber + "_" + str(j) + "_events.pdf")
+
+
+# FILTER RATES
+c1.cd()
+# configure total rate hist
+totalRateHist.Divide(lbTimeHist)
+totalRateHist.Multiply(lbScaleHist)
+for bin in range(1, totalRateHist.GetNbinsX() + 1):
+    totalRateHist.SetBinError(bin, 0) # no appreciable errors on rate
+# add total rpvll rate hist entry to legend
+l1.AddEntry(totalRateHist, "Overall RPVLL Rate", "lp")
+
+# initialize stack for all filter rate hists
+hs2 = THStack("hs2", "");
+# add individual filter rate hists to stack
+for i,hist in enumerate(rateHists):
+    hist.SetFillColor(colors[i%len(colors)])
+    hist.SetLineColor(colors[i%len(colors)])
+    if i >= len(colors):
+        hist.SetFillStyle(3004)
+    hist.Divide(lbTimeHist)    # calculate rate estimate
+    hist.Multiply(lbScaleHist) # scale to full lb
+    hs2.Add(hist)
+    # add individual event entries to legend
+    l1.AddEntry(hist, filterNames_mAug[i], "f")
+
+# draw individual filter stack + overall rate hist
+hs2.Draw("HIST")
+totalRateHist.Draw("pSAME")
+
+## configure axes
+# set axis titles
+hs2.GetXaxis().SetTitle("lumi block")
+hs2.GetYaxis().SetTitle("rate [Hz]")
+hs2.GetYaxis().SetTitleOffset(.75)
+# set axis ranges
+hs2.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+hs2.GetYaxis().SetRangeUser(0,100)
+# set tick marks on all axes
+gPad.SetTicks(1,1)
+# draw legend
+l1.Draw()
+# add text to plot
+latex1.Draw()
+latex2.Draw()
+# print stack
+c1.Update()
+c1.Print("run_" + runNumber + "_rate.pdf")
+c1.Clear()
+l1.Clear()
+
+
+# INDIVIDUAL FILTERS RATES
+c2.cd()
+# loop through filter rate histograms
+for j,h in enumerate(rateHists):
+    h.SetMarkerStyle(22)
+    h.SetMarkerSize(1.2)
+    if (last_lb - first_lb) > 600:
+        h.SetMarkerSize(0.6)
+    h.SetMarkerColor(colors[j%len(colors)])  
+    h.SetLineColor(colors[j%len(colors)])
+    # already divided by lb-times + multiplied by scale
+    h.Draw("P")
+    h.SetTitle(filterNames_mAug[j])
+    h.GetXaxis().SetTitle("lumi block")
+    h.GetYaxis().SetTitle("rate [Hz]")
+    h.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+    h.SetStats(ROOT.kFALSE)
+    gPad.SetTicks(1,1)
+    gStyle.SetErrorX(0)
+    latex3.Draw()
+    latex4.Draw()
+    c2.Update()
+    c2.Print("run_" + runNumber + "_" + str(j) + "_rate.pdf")
+
+
+    
+## --- EMERGING FILTERS --- ##
+# set colors for emerging filters
+em_col = [ ROOT.kBlue+3, ROOT.kBlue+1, ROOT.kBlue-7, ROOT.kBlue-9,
+           ROOT.kRed+3, ROOT.kRed+1, ROOT.kRed-6, ROOT.kRed-9,
+           ROOT.kCyan+2, ROOT.kTeal-8, ROOT.kCyan-6, ROOT.kCyan,
+           ROOT.kGreen+1, ROOT.kGreen+3, ROOT.kYellow-2, ROOT.kOrange,
+           ROOT.kViolet+8, ROOT.kViolet+3, ROOT.kViolet-9, ROOT.kViolet ]
+    
+c3 = TCanvas('c3', '', 1000, 600)
+c3.SetRightMargin(0.25)
+c3.SetLeftMargin(0.1)
+
+l2 = ROOT.TLegend(0.76, 0.4, 0.97, 0.61)
+l2.SetFillColor(0)
+l2.SetFillStyle(0)
+l2.SetBorderSize(0)
+l2.SetTextSize(0.02)
+
+## emerging filters (including dijets) by pt-cut
+#ptFilterList = [filterNames_pt100]
+#ptList = ["100"]
+ptFilterList = [filterNames_pt100, filterNames_pt120, filterNames_pt130, filterNames_pt140, filterNames_pt150]
+ptList = ["100", "120", "130", "140", "150"]
+for pt,pf in enumerate(ptFilterList):
+    c = pt*4
+    d = pt*4
+    # loop over histograms -- only grab those for emerging filters
+    hs_ej = THStack("hs_ej", "");
+    for k,h_ej in enumerate(rateHists):
+        for p,fn in enumerate(ptFilterList[pt]):
+            if filterNames_mAug[k] == ptFilterList[pt][p]:
+                if 'DiJet' not in filterNames_mAug[k]:
+                    h_ej.SetFillColor(em_col[c])
+                    h_ej.SetLineColor(em_col[c])
+                    h_ej.SetFillStyle(1000)
+                    c += 1
+                else:
+                    h_ej.SetFillColor(em_col[d])
+                    h_ej.SetLineColor(em_col[d])
+                    h_ej.SetFillStyle(3004)
+                    d += 1
+                hs_ej.Add(h_ej)
+                l2.AddEntry(h_ej, filterNames_mAug[k], "f")
+    hs_ej.Draw("HIST")
+    hs_ej.GetXaxis().SetTitle("lumi block")
+    hs_ej.GetYaxis().SetTitle("rate [Hz]")
+    hs_ej.GetYaxis().SetTitleOffset(.75)
+    hs_ej.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+    hs_ej.GetYaxis().SetRangeUser(0, 25) # SET Y-RANGE SAME FOR ALL STACKS (HOW?)
+    gPad.SetTicks(1, 1)
+    l2.Draw()
+    latex1.Draw()
+    latex2.Draw()
+    c3.Update()
+    c3.Print("run_" + runNumber + "_ej_pt" + ptList[pt] + "_rate.pdf")
+    c3.Clear()
+    l2.Clear()
+    
+
+## all emerging filters (excluding dijets)
+hs_em = THStack("hs_em", "");
+c = 0
+for p,fn in enumerate(emFilterList):
+    for k,h_em in enumerate(rateHists):
+        if emFilterList[p] == filterNames_mAug[k]:
+            h_em.SetFillColor(em_col[c])
+            h_em.SetLineColor(em_col[c])
+            h_em.SetFillStyle(1000)
+            if emFilterList[p] == 'EmergingFilterKernel':
+                c += 4
+            else:
+                c += 1
+            hs_em.Add(h_em)
+            l1.AddEntry(h_em, filterNames_mAug[k], "f")
+hs_em.Draw("HIST")
+hs_em.GetXaxis().SetTitle("lumi block")
+hs_em.GetYaxis().SetTitle("rate [Hz]")
+hs_em.GetYaxis().SetTitleOffset(.75)
+hs_em.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+hs_em.GetYaxis().SetRangeUser(0, 25)
+gPad.SetTicks(1, 1)
+l1.Draw()
+latex1.Draw()
+latex2.Draw()
+c3.Update()
+c3.Print("run_" + runNumber + "_ej_em_rate.pdf")
+c3.Clear()
+l1.Clear()
+
+## all dijet filters
+hs_di = THStack("hs_di", "");
+d = 0
+for p,fn in enumerate(dijetFilterList):
+    for k,h_di in enumerate(rateHists):
+        if dijetFilterList[p] == filterNames_mAug[k]:
+            h_di.SetFillColor(em_col[d])
+            h_di.SetLineColor(em_col[d])
+            h_di.SetFillStyle(3004)
+            d += 1
+            hs_di.Add(h_di)
+            l1.AddEntry(h_di, filterNames_mAug[k], "f")
+hs_di.Draw("HIST")
+hs_di.GetXaxis().SetTitle("lumi block")
+hs_di.GetYaxis().SetTitle("rate [Hz]")
+hs_di.GetYaxis().SetTitleOffset(.75)
+hs_di.GetXaxis().SetRangeUser(first_lb - 20, last_lb + 20)
+hs_di.GetYaxis().SetRangeUser(0, 25)
+gPad.SetTicks(1, 1)
+l1.Draw()
+latex1.Draw()
+latex2.Draw()
+c3.Update()
+c3.Print("run_" + runNumber + "_ej_di_rate.pdf")
+c3.Clear()
+l1.Clear()
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/readFiles.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/readFiles.py
index 141a2da0bf48f3587c6ca34b95c8e8484cebfc14..aa9041bac07a9d7dff2e4e166a1798cd25299001 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/readFiles.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/readFiles.py
@@ -1,6 +1,8 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-#file to parse log files for rate compilation. Instructions are in compileRPVLLRates.py
+# file to parse log files for rate compilation
+# instructions can be found in compileRPVLLRates.py
+# receives two arguments: output file + input directory containing log files to be parsed
 
 from os import listdir
 from os.path import isfile, join
@@ -9,6 +11,7 @@ import sys
 
 text_file = open(sys.argv[1], "w")
 mypath = sys.argv[2]
+# get list of log files w/in directory passed as argument
 onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
 
 print 'About to loop through files!'
@@ -24,8 +27,8 @@ for f in onlyfiles:
     openFile = open(mypath+f)
   print f
   for line in openFile:
-    #this line will need to be changed for "RAWtoALL"
-    if re.match('RAWtoESD.*RPVLL.*Events',line) or re.match('RAWtoESD.*BSESOutputSvcStreamDRAW_RPVLL.*events',line):
+    # changed from 'RAWtoESD' to 'RAWtoALL' in R21
+    if re.match('RAWtoALL.*RPVLL.*Events',line) or re.match('RAWtoALL.*BSESOutputSvcStreamDRAW_RPVLL.*events',line):
       if badName: 
 	text_file.write('.'.join(f.split('.')[3:16]) + ':' + line)
       else: 	
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/readGridFiles.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/readGridFiles.py
new file mode 100644
index 0000000000000000000000000000000000000000..602e5b758d042fbb0011f82c60d3f626644c45fe
--- /dev/null
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/run/readGridFiles.py
@@ -0,0 +1,48 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+# file to parse log files from grid for rate compilation
+# grid outputs logs as tarballs (.tgz)
+# instructions in compileRPVLLRates.p
+# receives two arguments: output file + input directory containing log files to be parsed
+
+from os import listdir
+from os.path import isfile, join, isdir
+import re
+import sys
+import tarfile
+import os
+
+text_file = open(sys.argv[1], "w")
+mypath = sys.argv[2]
+# get list of grid log tgz tarballs w/in directory
+tgzs = [t for t in listdir(mypath) if isfile(join(mypath, t))]
+# cd into directory containing tarballs
+os.chdir(mypath)
+
+# loop through tarballs and untar
+print 'About to loop through tarballs!'
+for t in tgzs:
+    tar = tarfile.open(t, "r:gz")
+    tar.extractall()
+    tar.close()
+
+# get list of untarred tarballs
+tarballs = [x for x in listdir(os.getcwd()) if isdir(x)]
+# loop through untarred tarballs + cd into them
+for x in tarballs:
+    # loop through files in tarballs
+    files = [f for f in listdir(x)]
+    for f in files:
+        # open log.RAWtoALL + extract filter info
+        if "log.RAWtoALL" in f:
+            openFile = open(x+'/'+f)
+            for line in openFile:
+                # find input data file for lumiblock info
+                if re.match('.*Py:AthFile\s*INFO opening \[\S*\]...',line):
+                    data_file = line[line.index("[")+1:line.rindex("]")]
+                # find RPVLL filter information
+                if re.match('.*RPVLL.*Events',line) or re.match('.*BSESOutputSvcStreamDRAW_RPVLL.*events',line):
+                    # write input data file + RPVLL info to output file
+                    text_file.write(data_file + ':' + line)
+# close output text file
+text_file.close()
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_DV.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_DV.py
index 8f5d6982d2742ce1bce1bc02f2b3823e8aa692a5..d1b9225690691a06175e98840283c4c5bc8600f0 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_DV.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_DV.py
@@ -333,29 +333,29 @@ RPVLLfilterNames.extend(["RPVLL_DV_METFilterKernel"])
 #########################################################################
 ### M_eff filter - use the MET trigger, but then cut on Meff, or MET/Meff
 #######################################################################
-
-DVMeffTriggerFilter = skimtool( name = "DVMeffTriggerFilter",
-                               expression = DVTriggerSelectionString(primRPVLLDESDM.DV_MeffFilterFlags)
-                               )
-
-ToolSvc+=DVMeffTriggerFilter
-
-from LongLivedParticleDPDMaker.LongLivedParticleDPDMakerConf import DerivationFramework__DVMeffFilterTool
-DVMeffFilterTool = DerivationFramework__DVMeffFilterTool(name = "DVMeffFilterTool",
-                                                         METContainerKey = METContainer,
-                                                         MeffCut=primRPVLLDESDM.DV_MeffFilterFlags.cutMeffMin,
-                                                         METCut=primRPVLLDESDM.DV_MeffFilterFlags.cutMETMin,
-                                                         METoverMeffCutMin=primRPVLLDESDM.DV_MeffFilterFlags.cutMEToverMeffMin,
-                                                         METoverMeffCutMax=primRPVLLDESDM.DV_MeffFilterFlags.cutMEToverMeffMax)
-ToolSvc += DVMeffFilterTool
-
-DV_MeffFinalFilter = DerivationFramework__FilterCombinationAND( name = "DV_MEffFinalFilter",
-                                                               FilterList=[DVMeffFilterTool,DVMeffTriggerFilter],
-##                                                               OutputLevel=DEBUG
-                                                                )
-ToolSvc += DV_MeffFinalFilter
-
-topSequence += kernel( "RPVLL_DV_MeffFilterKernel",
-                       SkimmingTools = [DV_MeffFinalFilter],
-                       )
-RPVLLfilterNames.extend(["RPVLL_DV_MeffFilterKernel"])
+# turning off DVMeffFilter 
+#DVMeffTriggerFilter = skimtool( name = "DVMeffTriggerFilter",
+#                               expression = DVTriggerSelectionString(primRPVLLDESDM.DV_MeffFilterFlags)
+#                               )
+#
+#ToolSvc+=DVMeffTriggerFilter
+#
+#from LongLivedParticleDPDMaker.LongLivedParticleDPDMakerConf import DerivationFramework__DVMeffFilterTool
+#DVMeffFilterTool = DerivationFramework__DVMeffFilterTool(name = "DVMeffFilterTool",
+#                                                         METContainerKey = METContainer,
+#                                                         MeffCut=primRPVLLDESDM.DV_MeffFilterFlags.cutMeffMin,
+#                                                         METCut=primRPVLLDESDM.DV_MeffFilterFlags.cutMETMin,
+#                                                         METoverMeffCutMin=primRPVLLDESDM.DV_MeffFilterFlags.cutMEToverMeffMin,
+#                                                         METoverMeffCutMax=primRPVLLDESDM.DV_MeffFilterFlags.cutMEToverMeffMax)
+#ToolSvc += DVMeffFilterTool
+#
+#DV_MeffFinalFilter = DerivationFramework__FilterCombinationAND( name = "DV_MEffFinalFilter",
+#                                                               FilterList=[DVMeffFilterTool,DVMeffTriggerFilter],
+###                                                               OutputLevel=DEBUG
+#                                                                )
+#ToolSvc += DV_MeffFinalFilter
+#
+#topSequence += kernel( "RPVLL_DV_MeffFilterKernel",
+#                       SkimmingTools = [DV_MeffFinalFilter],
+#                       )
+#RPVLLfilterNames.extend(["RPVLL_DV_MeffFilterKernel"])
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_Emerging.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_Emerging.py
index 06f5dee81e95d351dae3f099396a7a1593b02cf2..cb99e8f331bc4050ddfbbc30743bb03e37aed3ad 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_Emerging.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_Emerging.py
@@ -1,6 +1,5 @@
 jets = primRPVLLDESDM.Emerging_containerFlags.jetCollectionName
-Bjets = primRPVLLDESDM.Emerging_containerFlags.bjetCollectionName
-recoTracks = primRPVLLDESDM.Emerging_containerFlags.trackCollectionName
+#jets = primRPVLLDESDM.Emerging_containerFlags.hltJetCollectionName
 
 from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel as kernel
 from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__xAODStringSkimmingTool as skimtool
@@ -11,21 +10,88 @@ from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFram
 
 from LongLivedParticleDPDMaker.LongLivedParticleDPDMakerConf import DerivationFramework__EmergingJetsFilterTool
 
-EmergingJetsFilterTool = DerivationFramework__EmergingJetsFilterTool( name = "EmergingJetsFilterTool",
-                                                                              JetContainerKey = jets,
-                                                                              BJetContainerKey = Bjets,
-                                                                              TrackContainerKey = recoTracks,
-                                                                              Triggers = primRPVLLDESDM.Emerging_FilterFlags.Triggers,
-                                                                              JetPtCut = primRPVLLDESDM.Emerging_FilterFlags.cutEtMin,
-                                                                              JetEtaCut = primRPVLLDESDM.Emerging_FilterFlags.cutEtaMax,
-                                                                              sumPtTrkCut = primRPVLLDESDM.Emerging_FilterFlags.cutSumPtTrkMax,
-                                                                              sumJetsPtCut = primRPVLLDESDM.Emerging_FilterFlags.cutSumJetsPtMax,
-                                                                              nJetsRequired = primRPVLLDESDM.Emerging_FilterFlags.nPassed )
+# offline jet pt > 120 GeV cut
+EmergingJetsFilterTool = DerivationFramework__EmergingJetsFilterTool(
+    name = "EmergingJetsFilterTool",
+    JetContainerKey = jets,
+    Triggers = primRPVLLDESDM.Emerging_FilterFlags.Triggers,
+    JetPtCut = 120.0*Units.GeV,
+    JetEtaCut = primRPVLLDESDM.Emerging_FilterFlags.cutEtaMax,
+    nJetsRequired = primRPVLLDESDM.Emerging_FilterFlags.nPassed )
 
-ToolSvc+=EmergingJetsFilterTool
+ToolSvc += EmergingJetsFilterTool
+
+#topSequence += kernel( "RPVLL_EmergingFilterKernel",
+#                       SkimmingTools = [EmergingJetsFilterTool],
+#                     )
+#
+#RPVLLfilterNames.extend(["RPVLL_EmergingFilterKernel"])
+
+
+
+## REQUIRE HIGH-PT JET on top of increased thresholds
+#from LongLivedParticleDPDMaker.LongLivedParticleDPDMakerConf import DerivationFramework__EmergingJetsHighPtFilterTool
+#
+## pt > 120; high pt > 250 GeV
+#EmergingJetsPt120HighPt250FilterTool = DerivationFramework__EmergingJetsHighPtFilterTool(
+#    name = "EmergingJetsPt120HighPt250FilterTool",
+#    JetContainerKey = jets,
+#    Triggers = primRPVLLDESDM.Emerging_FilterFlags.Triggers,
+#    JetPtCut = 120.0*Units.GeV,
+#    JetHighPtCut = 250.0*Units.GeV,
+#    JetEtaCut = primRPVLLDESDM.Emerging_FilterFlags.cutEtaMax,
+#    nJetsRequired = primRPVLLDESDM.Emerging_FilterFlags.nPassed,
+#    nHighPtJetsRequired = 1 )
+#
+#ToolSvc += EmergingJetsPt120HighPt250FilterTool
+#
+#topSequence += kernel( "RPVLL_EmergingPt120HighPt250FilterKernel",
+#                       SkimmingTools = [EmergingJetsPt120HighPt250FilterTool],
+#                     )
+#
+#RPVLLfilterNames.extend(["RPVLL_EmergingPt120HighPt250FilterKernel"])
+
+
+
+###########################################################
+## DiJet filter -- for EJ background studies
+###########################################################
+
+# HLT_j110
+# offline jet pt > 120 GeV cut
+EmergingJetsDiJet110FilterTool = DerivationFramework__EmergingJetsFilterTool(
+    name = "EmergingJetsDiJet110FilterTool",
+    JetContainerKey = jets,
+    Triggers = primRPVLLDESDM.Emerging_DiJet110FilterFlags.Triggers,
+    JetPtCut = 120.0*Units.GeV,
+    JetEtaCut = primRPVLLDESDM.Emerging_DiJet110FilterFlags.cutEtaMax,
+    nJetsRequired = primRPVLLDESDM.Emerging_DiJet110FilterFlags.nPassed )
+
+ToolSvc += EmergingJetsDiJet110FilterTool
+
+#topSequence += kernel( "RPVLL_EmergingDiJet110FilterKernel",
+#                       SkimmingTools = [EmergingJetsDiJet110FilterTool],
+#                     )
+#
+#RPVLLfilterNames.extend(["RPVLL_EmergingDiJet110FilterKernel"])
+
+
+
+###########################################################
+## COMBINED Emerging + DiJet filter
+###########################################################
+from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__FilterCombinationOR
+
+EmergingJets_Combined_FilterTool = DerivationFramework__FilterCombinationOR(
+    name = "EmergingJets_Combined_FilterTool",
+    FilterList = [EmergingJetsFilterTool, EmergingJetsDiJet110FilterTool] )
+
+ToolSvc += EmergingJets_Combined_FilterTool
 
 topSequence += kernel( "RPVLL_EmergingFilterKernel",
-                       SkimmingTools = [EmergingJetsFilterTool],
-                       )
+                       SkimmingTools = [EmergingJets_Combined_FilterTool],
+                     )
 
 RPVLLfilterNames.extend(["RPVLL_EmergingFilterKernel"])
+
+
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_SmpCaloId.py b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_SmpCaloId.py
index ec61f98ece6ad4ecead8f064ec2f53a0716e1dc5..d3fe39470f6e7df0c28cd99eb847e7afb386e27f 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_SmpCaloId.py
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/share/PhysDESDM_SmpCaloId.py
@@ -80,7 +80,7 @@ offlineObjectFilterNames=[]
 #=#cutString+= str(primRPVLLDESDM.SmpCaloId_trackParticleFilterFlags.cutPtMin)
 #=#cutString+= " && "
 #=#cutString+= primRPVLLDESDM.SmpCaloId_trackParticleFilterFlags.cutInputCollection
-#=#cutString+=".numberOfBLayerHits >="
+#=#cutString+=".numberOfInnermostPixelLayerHits >="
 #=#cutString+=str(primRPVLLDESDM.SmpCaloId_trackParticleFilterFlags.cutBLayerHitsMin)
 #=#cutString+=" ) >= 1 "
 #=#print "NICK SmpCaloId cutString is ",cutString
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/EmergingJetsFilterTool.cxx b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/EmergingJetsFilterTool.cxx
index c0f6d6682813ee0a23344b53b64ad34f1f7b7ef4..8be8c12dc337172330bb7cf7b77a3f6ffd08e1a2 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/EmergingJetsFilterTool.cxx
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/EmergingJetsFilterTool.cxx
@@ -24,25 +24,19 @@ DerivationFramework::EmergingJetsFilterTool::EmergingJetsFilterTool( const std::
   m_tdt("Trig::TrigDecisionTool/TrigDecisionTool"),
   m_ntot(0),
   m_npass(0),
+  m_nptpass(0),
   m_jetSGKey("AntiKt4EMTopoJets"),
-  m_BjetSGKey("BTagging_AntiKt4EMTopo"),
-  m_trackSGKey("InDetTrackParticles"),
   m_ptCut(100000.0),
   m_etaCut(2.5),
-  m_sumPtTrkCut(5000.0),
-  m_sumJetsPtCut(800000.0)
+  m_nJetsRequired(4)
   {
     declareInterface<DerivationFramework::ISkimmingTool>(this);
     declareProperty("TrigDecisionTool", m_tdt, "Tool to access the trigger decision");
     declareProperty("Triggers", m_triggers = std::vector< std::string >());
     declareProperty("JetContainerKey", m_jetSGKey);
-    declareProperty("BJetContainerKey", m_BjetSGKey);
-    declareProperty("TrackContainerKey", m_trackSGKey);
     declareProperty("JetPtCut", m_ptCut);
     declareProperty("JetEtaCut", m_etaCut);
-    declareProperty("sumPtTrkCut", m_sumPtTrkCut);
-    declareProperty("sumJetsPtCut", m_sumJetsPtCut);
-    declareProperty("nJetsRequired", m_nJetsRequired = 4);
+    declareProperty("nJetsRequired", m_nJetsRequired);
   }
   
 // Destructor
@@ -67,6 +61,7 @@ StatusCode DerivationFramework::EmergingJetsFilterTool::finalize()
 {
      ATH_MSG_VERBOSE("finalize() ...");
      ATH_MSG_INFO("Processed "<< m_ntot <<" events, "<< m_npass<<" events passed filter ");
+     ATH_MSG_INFO(m_nptpass << " jets passed " << m_ptCut << " *0.001 GeV pt cut");
      return StatusCode::SUCCESS;
 }
 
@@ -76,18 +71,10 @@ bool DerivationFramework::EmergingJetsFilterTool::eventPassesFilter() const
 
   ++m_ntot;
   bool thisEventPasses = false;
-
   bool passedTrigger = false;
-  /*
-  int decision = m_tdt->isPassed("HLT_4j100");
-  int decision2 = m_tdt->isPassed("HLT_4j110");
 
-  if( decision == 1 || decision2 == 1 ){
-    passedTrigger = true;
-  }
-  */
+  // check for events passing triggers
   if( m_triggers.size() > 0 ){
-
     passedTrigger = false;
 
     for( unsigned int i = 0; i < m_triggers.size(); i++ ){
@@ -97,18 +84,13 @@ bool DerivationFramework::EmergingJetsFilterTool::eventPassesFilter() const
 	break;
       }
     }
-
   }
 
+  // if no triggers passed, event fails filter
   if( !passedTrigger ) return thisEventPasses;
 
-  int nJetsPassed = 0;
 
-  //Int_t nJets25SumTkPt5 = 0;
-  //Int_t nJets100SumTkPt5 = 0;
-
-  std::vector< double > sumJetsPt;
-  
+  // access jet container
   const xAOD::JetContainer* jets(0);
   StatusCode sc = evtStore()->retrieve(jets,m_jetSGKey);
   if( sc.isFailure() || !jets ){
@@ -117,184 +99,23 @@ bool DerivationFramework::EmergingJetsFilterTool::eventPassesFilter() const
   } 
   msg(MSG::DEBUG) << "size of Jet container is " << jets->size() << endmsg;
 
-  
+  // count number of jets passing pt + eta cuts
+  int nJetsPassed = 0;
   for( unsigned int i = 0; i < jets->size(); ++i ){ 
-
     const xAOD::Jet* jet = jets->at(i);
-    if( (jet->pt() < m_ptCut) || (fabs(jet->eta())>m_etaCut) ) continue;
-    sumJetsPt.push_back(jet->pt());
+    if( (jet->pt() < m_ptCut) || (fabs(jet->eta()) > m_etaCut) ) continue;
     nJetsPassed += 1;
-    /*
-    std::vector<float> sumPtTrkPt500vec;
-    jet->getAttribute(xAOD::JetAttribute::SumPtTrkPt500, sumPtTrkPt500vec);
-    if( sumPtTrkPt500vec.size() > 0 ){
-      msg(MSG::DEBUG) << "sumptTrk is " << sumPtTrkPt500vec.at(0) << endmsg;
-      if( sumPtTrkPt500vec.at(0) < m_sumPtTrkCut ){
-	if( jet->pt() > 25e3 ) ++nJets25SumTkPt5;
-	if( jet->pt() > 100e3 ) ++nJets100SumTkPt5;
-      }
-    }
-    */
-  }
-  /*
-  // Look at track d0-significance and track pT for each jet
-
-  Int_t nJets100 = 0;
-  Int_t nJets100_sumSigD0WpT3000 = 0;
-
-  std::vector< std::pair<float,int> > myJets_100;
-
-  // TLorentzVectors for the highest-pT jets with pT > 100 GeV                        
-  TLorentzVector* jet100_1 = new TLorentzVector(0,0,0,0);
-  TLorentzVector* jet100_2 = new TLorentzVector(0,0,0,0);
-  TLorentzVector* jet100_3 = new TLorentzVector(0,0,0,0);
-  TLorentzVector* jet100_4 = new TLorentzVector(0,0,0,0);
-  TLorentzVector* jet100_5 = new TLorentzVector(0,0,0,0);
-  TLorentzVector* jet100_6 = new TLorentzVector(0,0,0,0);
-  TLorentzVector* jet100_7 = new TLorentzVector(0,0,0,0);
-  TLorentzVector* jet100_8 = new TLorentzVector(0,0,0,0);
-  TLorentzVector* jet100_9 = new TLorentzVector(0,0,0,0);
-  TLorentzVector* jet100_10 = new TLorentzVector(0,0,0,0);
-
-  std::vector< TLorentzVector* > jets_100;
-  jets_100.push_back(jet100_1);
-  jets_100.push_back(jet100_2);
-  jets_100.push_back(jet100_3);
-  jets_100.push_back(jet100_4);
-  jets_100.push_back(jet100_5);
-  jets_100.push_back(jet100_6);
-  jets_100.push_back(jet100_7);
-  jets_100.push_back(jet100_8);
-  jets_100.push_back(jet100_9);
-  jets_100.push_back(jet100_10);
-
-  // Get track particles, to check tracks near jets                                   
-
-  const xAOD::TrackParticleContainer* recoTracks = 0;
-  if( !evtStore()->retrieve( recoTracks, m_trackSGKey ).isSuccess() ){
-    Error("execute()", "Failed to retrieve Reconstructed Track container. Exiting." );
+    ATH_MSG_INFO( "pt cut passing jet pt: " << jet->pt() * 0.001);
   }
 
+  m_nptpass = nJetsPassed;
 
-  xAOD::JetContainer::const_iterator jet_itr = jets->begin();
-  xAOD::JetContainer::const_iterator jet_end = jets->end();
-
-  Int_t jetInd = 0;
-
-  for( ; jet_itr != jet_end; ++jet_itr ) {
-
-    Double_t jetPTCut = 100.0;
-    Double_t jetEtaCut = 2.5;
-
-    std::pair<float,int> ptAndInd( ( (*jet_itr)->pt() )/1e3, jetInd );
-
-    if( ( (*jet_itr)->pt() )/1e3 > jetPTCut && fabs( (*jet_itr)->eta() ) < jetEtaCut ){
-
-      myJets_100.push_back( ptAndInd );
-
-      jets_100[nJets100]->SetPtEtaPhiM( (*jet_itr)->pt(),
-					(*jet_itr)->eta(),
-					(*jet_itr)->phi(),
-					(*jet_itr)->m()
-					);
-
-      // Check tracks near this jet                                                    
-      TLorentzVector* thisTrack = new TLorentzVector(0,0,0,0);
-
-      std::vector< double > dRs;
-      dRs.push_back(0.5);
-
-      for( UInt_t dRInd = 0; dRInd < dRs.size(); ++dRInd ){
-
-
-	Int_t nTrksAbovePt500 = 0;
-	Double_t sumSigD0WpT_500 = 0.0;
-	Int_t trkCtr = 0;
-
-	for( const auto& trk : *recoTracks ){
-	  //std::cout << "Track pT = " << trk->pt() << std::endl;                              
-	  thisTrack->SetPtEtaPhiM( trk->pt(),
-				   trk->eta(),
-				   trk->phi(),
-				   trk->m()
-				   );
-
-	  Double_t d0sig = fabs( trk->d0() ) / sqrt( trk->definingParametersCovMatrix()(0,0) );
-
-	  if( thisTrack->Pt() > 500.0 && thisTrack->DeltaR(*jets_100[nJets100]) < dRs[dRInd] ){
-	    ++nTrksAbovePt500;
-	    sumSigD0WpT_500 += d0sig*(trk->pt());
-	  }
-
-	  ++trkCtr;
-
-	}
-
-	if( sumSigD0WpT_500/1e3 > 3000.0 ) ++nJets100_sumSigD0WpT3000;
-
-      }
-
-      ++nJets100;
-
-    }
-
-    ++jetInd;
-
-  }
-
-
-  // Look at b-jets
-
-  const xAOD::BTaggingContainer* Bjets = 0;
-  evtStore()->retrieve( Bjets, m_BjetSGKey );
-
-  xAOD::BTaggingContainer::const_iterator bjet_itr = Bjets->begin();
-  xAOD::BTaggingContainer::const_iterator bjet_end = Bjets->end();
-
-  Int_t bJetIndex = -1;
-  Int_t nBjetsPt100 = 0;
-
-  for( ; bjet_itr != bjet_end; ++bjet_itr ) {
-
-    ++bJetIndex;
-
-    Double_t mv2c10Val = (*bjet_itr)->auxdataConst< double >("MV2c10_discriminant");
-    if( mv2c10Val > 0.6459 ){
-      if( bJetIndex < int(jets->size()) ){
-	if( jets->at(bJetIndex)->pt()/1e3 > 100.0 ){
-	  ++nBjetsPt100;
-	}
-      }
-    }
-  }
-  */
-  // Finally put it all together to see if the event passes
-
-  if( nJetsPassed >= 4 ){
+  // require certain number of jets 
+  if( nJetsPassed >= m_nJetsRequired ){
     ++m_npass;
     thisEventPasses = true;
   }
-  /*
-  if( nJetsPassed >= m_nJetsRequired ){
 
-    double sumJetsPtLocal = 0.0;
-
-    for( UInt_t jj = 0; jj < 4; ++jj ) sumJetsPtLocal += sumJetsPt[jj];
-
-    if( sumJetsPtLocal > m_sumJetsPtCut ){
-
-      if( nJets25SumTkPt5 > 1 || nJets100SumTkPt5 > 0 ){
-	++m_npass;
-	thisEventPasses = true;
-      }else if( nJets100_sumSigD0WpT3000 > 1 || nBjetsPt100 > 1 ){
-	++m_npass;
-	thisEventPasses = true;
-      }
-
-    }
-
-  }
-  */
   return thisEventPasses;
   
 }  
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/EmergingJetsHighPtFilterTool.cxx b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/EmergingJetsHighPtFilterTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..4553efa33fdcfcdc1a5eb79124fff1d1807986d3
--- /dev/null
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/EmergingJetsHighPtFilterTool.cxx
@@ -0,0 +1,134 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/////////////////////////////////////////////////////////////////
+// EmergingJetsHighPtFilterTool.cxx, (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+
+#include "LongLivedParticleDPDMaker/EmergingJetsHighPtFilterTool.h"
+#include <vector>
+#include <string>
+#include "xAODJet/JetContainer.h"
+#include "xAODTracking/TrackParticleContainer.h"
+
+#include "TrigDecisionTool/ChainGroup.h"
+#include "TrigDecisionTool/FeatureContainer.h"
+#include "TrigDecisionTool/Feature.h"
+
+// Constructor
+DerivationFramework::EmergingJetsHighPtFilterTool::EmergingJetsHighPtFilterTool( const std::string& t,
+								     const std::string& n,
+								     const IInterface* p ) : 
+  AthAlgTool(t,n,p),
+  m_tdt("Trig::TrigDecisionTool/TrigDecisionTool"),
+  m_ntot(0),
+  m_npass(0),
+  m_nptpass(0),
+  m_nhighptpass(0),
+  m_jetSGKey("AntiKt4EMTopoJets"),
+  m_ptCut(100000.0),
+  m_highPtCut(300000.0),
+  m_etaCut(2.5),
+  m_nJetsRequired(4),
+  m_nHighPtJetsRequired(1)
+  {
+    declareInterface<DerivationFramework::ISkimmingTool>(this);
+    declareProperty("TrigDecisionTool", m_tdt, "Tool to access the trigger decision");
+    declareProperty("Triggers", m_triggers = std::vector< std::string >());
+    declareProperty("JetContainerKey", m_jetSGKey);
+    declareProperty("JetPtCut", m_ptCut);
+    declareProperty("JetHighPtCut", m_highPtCut);
+    declareProperty("JetEtaCut", m_etaCut);
+    declareProperty("nJetsRequired", m_nJetsRequired);
+    declareProperty("nHighPtJetsRequired", m_nHighPtJetsRequired);
+  }
+  
+// Destructor
+DerivationFramework::EmergingJetsHighPtFilterTool::~EmergingJetsHighPtFilterTool() {
+}  
+
+// Athena initialize and finalize
+StatusCode DerivationFramework::EmergingJetsHighPtFilterTool::initialize()
+{
+     ATH_MSG_VERBOSE("initialize() ...");
+
+     if(m_tdt.retrieve().isFailure()) {
+       ATH_MSG_FATAL("Failed to retrieve tool: " << m_tdt);
+       return StatusCode::FAILURE;
+     }
+     ATH_MSG_INFO("Retrieved tool: " << m_tdt);
+     
+     return StatusCode::SUCCESS;
+     
+}
+StatusCode DerivationFramework::EmergingJetsHighPtFilterTool::finalize()
+{
+     ATH_MSG_VERBOSE("finalize() ...");
+     ATH_MSG_INFO("Processed " << m_ntot << " events, " << m_npass << " events passed filter ");
+     //ATH_MSG_INFO(m_nptpass << " jets passed " << m_ptCut << " GeV pt cut");
+     //ATH_MSG_INFO(m_nhighptpass << " jets passed " << m_highPtCut << " GeV high-pt cut");
+     return StatusCode::SUCCESS;
+}
+
+// The filter itself
+bool DerivationFramework::EmergingJetsHighPtFilterTool::eventPassesFilter() const
+{
+
+  ++m_ntot;
+  bool thisEventPasses = false;
+  bool passedTrigger = false;
+
+  // check for events passing triggers
+  if( m_triggers.size() > 0 ){
+    passedTrigger = false;
+
+    for( unsigned int i = 0; i < m_triggers.size(); i++ ){
+      int decision = m_tdt->isPassed( m_triggers.at(i) );
+      if( decision == 1 ){
+	passedTrigger = true;
+	break;
+      }
+    }
+  }
+
+  // if no triggers passed, event fails filter
+  if( !passedTrigger ) return thisEventPasses;
+
+
+  // access jet container
+  const xAOD::JetContainer* jets(0);
+  StatusCode sc = evtStore()->retrieve(jets,m_jetSGKey);
+  if( sc.isFailure() || !jets ){
+    msg(MSG::WARNING) << "No Jet container found, will skip this event" << endmsg;
+    return StatusCode::FAILURE;
+  } 
+  msg(MSG::DEBUG) << "size of Jet container is " << jets->size() << endmsg;
+
+  // count number of jets passing pt + eta cuts
+  int nJetsPassed = 0;
+  // count number of high-pt jets passing pt + eta cuts + high-pt cut
+  int nHighPtJetsPassed = 0;
+  for ( unsigned int i = 0; i < jets->size(); ++i ) { 
+    const xAOD::Jet* jet = jets->at(i);
+    if ( (jet->pt() < m_ptCut) || (fabs(jet->eta()) > m_etaCut) ) continue;
+    nJetsPassed += 1;
+    ATH_MSG_INFO( "pt cut passing jet pt: " << jet->pt() * 0.001);
+    if ( jet->pt() < m_highPtCut ) continue;
+    nHighPtJetsPassed += 1;
+    ATH_MSG_INFO( "high-pt cut passing jet pt: " << jet->pt() * 0.001);
+  }
+
+  m_nptpass = nJetsPassed;
+  m_nhighptpass = nHighPtJetsPassed;
+
+  // require certain number of jets 
+  if ( (nJetsPassed >= m_nJetsRequired) && (nHighPtJetsPassed >= m_nHighPtJetsRequired) ) {
+    ++m_npass;
+    thisEventPasses = true;
+  }
+
+  return thisEventPasses;
+  
+}  
+  
diff --git a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/components/LongLivedParticleDPDMaker_entries.cxx b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/components/LongLivedParticleDPDMaker_entries.cxx
index f71478a84322b0dca65cad023194717969cd8082..88a9ffe8a6af0636b503f8f9e8c6f7878ff496dd 100644
--- a/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/components/LongLivedParticleDPDMaker_entries.cxx
+++ b/PhysicsAnalysis/SUSYPhys/LongLivedParticleDPDMaker/src/components/LongLivedParticleDPDMaker_entries.cxx
@@ -14,6 +14,7 @@
 #include "LongLivedParticleDPDMaker/KinkTrkZmumuTagTool.h"
 #include "LongLivedParticleDPDMaker/KinkTrkZeeTagTool.h"
 #include "LongLivedParticleDPDMaker/EmergingJetsFilterTool.h"
+#include "LongLivedParticleDPDMaker/EmergingJetsHighPtFilterTool.h"
 
 DECLARE_NAMESPACE_TOOL_FACTORY( DerivationFramework, RpvElectronD0Tool )
 DECLARE_NAMESPACE_TOOL_FACTORY( DerivationFramework, RpvMuonD0Tool )
@@ -29,6 +30,7 @@ DECLARE_NAMESPACE_TOOL_FACTORY( DerivationFramework, KinkTrkZmumuTagTool )
 DECLARE_NAMESPACE_TOOL_FACTORY( DerivationFramework, KinkTrkZeeTagTool )
 DECLARE_NAMESPACE_TOOL_FACTORY( DerivationFramework, HVJetMETFilterTool )
 DECLARE_NAMESPACE_TOOL_FACTORY( DerivationFramework, EmergingJetsFilterTool )
+DECLARE_NAMESPACE_TOOL_FACTORY( DerivationFramework, EmergingJetsHighPtFilterTool )
 
 DECLARE_FACTORY_ENTRIES( LongLivedParticleDPDMaker ) {
 
@@ -46,6 +48,7 @@ DECLARE_FACTORY_ENTRIES( LongLivedParticleDPDMaker ) {
   DECLARE_NAMESPACE_TOOL( DerivationFramework, KinkTrkZmeeagTool );
   DECLARE_NAMESPACE_TOOL( DerivationFramework, HVJetMETFilterTool  );
   DECLARE_NAMESPACE_TOOL( DerivationFramework, EmergingJetsFilterTool  );
+  DECLARE_NAMESPACE_TOOL( DerivationFramework, EmergingJetsHighPtFilterTool  );
 
 }
 
diff --git a/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/doc/packagedoc.h b/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/doc/packagedoc.h
index 993b628ea4bad2c0c5219051b1ef90654b67c926..6de8154ee0cfabacf57cb7ac614575c7e24a79c0 100644
--- a/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/SUSYPhys/SUSYPhysTagTools/doc/packagedoc.h
@@ -15,12 +15,6 @@ SUSYPhysTagTools contains the following tools:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section SUSYPhysTagTools_used_packagesSUSYPhysTagTools Used packages
 
-@section SUSYPhysTagTools_requirementsSUSYPhysTagTools Requirements
 
 */
-
-
-
-
diff --git a/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/doc/packagedoc.h b/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/doc/packagedoc.h
index fcce8eee3a126bc558340f74a42ad40257d78978..8f47eae703628d7730431097d5480553e59a3b9f 100644
--- a/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/StandardModelPhys/StandardModelPhysTagTools/doc/packagedoc.h
@@ -15,10 +15,6 @@ StandardModelPhysTagTools contains the following tools:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section StandardModelPhysTagTools_used_packagesStandardModelPhysTagTools Used packages
 
-@section StandardModelPhysTagTools_requirementsStandardModelPhysTagTools Requirements
 
 */
-
-
diff --git a/PhysicsAnalysis/StandardModelPhys/Validation/ZeeValidation/src/ReconElectronsPlots.cxx b/PhysicsAnalysis/StandardModelPhys/Validation/ZeeValidation/src/ReconElectronsPlots.cxx
index ce05170379db9465803669af3d43836eab126f94..251f313f77f02a3c852710fd944dcb0310a8ad22 100644
--- a/PhysicsAnalysis/StandardModelPhys/Validation/ZeeValidation/src/ReconElectronsPlots.cxx
+++ b/PhysicsAnalysis/StandardModelPhys/Validation/ZeeValidation/src/ReconElectronsPlots.cxx
@@ -277,8 +277,8 @@ namespace ZeeValidation{
   void ReconElectronsPlots::fillHitInfo(const xAOD::Electron* electron){
 
     uint8_t blayerh(0), pixelh(0), scth(0), trth(0), trthighh(0), blayero(0), pixelo(0), scto(0), trto(0), trthigho(0);
-    if( electron -> trackParticleSummaryValue(blayerh, xAOD::numberOfBLayerHits ) && 
-	electron -> trackParticleSummaryValue(blayero, xAOD::numberOfBLayerOutliers) ){   
+    if( electron -> trackParticleSummaryValue(blayerh, xAOD::numberOfInnermostPixelLayerHits ) &&
+	electron -> trackParticleSummaryValue(blayero, xAOD::numberOfInnermostPixelLayerOutliers) ){
       h_n_blayer_hits -> Fill(blayerh);
       h_n_blayer_hits_outliers -> Fill(blayerh + blayero);
     }
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/README.rst b/PhysicsAnalysis/TauID/TauAnalysisTools/README.rst
index 4b248dab1db1a6335afb8891c39a98c5169d81ac..30335c5f0bc15fea6add937e7867405fa365fc7f 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/README.rst
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/README.rst
@@ -97,12 +97,6 @@ For each tool the message level can be adjusted like::
 Examples
 --------
 
-Athena
-------
-
-AnalysisBase
-------------
-
 An example implementation of all tools can be found for stand-alone mode in
 ``TauAnalysisTools/util/TauAnalysisToolsExample.cxx``. The binary file should be
 found after compilation in
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/BuildTruthTaus.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/BuildTruthTaus.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..8bcb720953bbf7167679fd89a8eec32201c9f418
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/BuildTruthTaus.cxx
@@ -0,0 +1,492 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// Local include(s)
+#include "TauAnalysisTools/BuildTruthTaus.h"
+
+// Core include(s):
+#include "AthLinks/ElementLink.h"
+
+// EDM include(s):
+#include "xAODTruth/TruthVertex.h"
+#include "xAODEventInfo/EventInfo.h"
+
+// Tool include(s)
+#include "MCTruthClassifier/MCTruthClassifier.h"
+
+#define PRINTVAR(VAR)                                                   \
+  std::cout<<__FILE__<<" "<<__LINE__<<":"<<#VAR<<" = "<<VAR<<"\n";
+
+using namespace TauAnalysisTools;
+
+//=================================PUBLIC-PART==================================
+//______________________________________________________________________________
+BuildTruthTaus::BuildTruthTaus( const std::string& name )
+  : AsgMetadataTool(name)
+  , m_bIsData(false)
+  , m_bIsConfigured(false)
+  , m_bTruthTauAvailable(true)
+  , m_xTruthTauContainerConst(0)
+  , m_xTruthMuonContainerConst(0)
+  , m_xTruthElectronContainerConst(0)
+  , m_xTruthJetContainerConst(0)
+  , m_xTruthTauContainer(0)
+  , m_bIsTruthMatchedAvailable(false)
+  , m_bIsTruthMatchedAvailableChecked(false)
+  , m_bNewEvent(false)
+  , m_xTruthParticleContainer(0)
+  , m_xTruthTauAuxContainer(0)
+  , m_sNewTruthTauContainerNameAux("TruthTausAux.")
+  , m_bTruthMuonAvailable(true)
+  , m_bTruthElectronAvailable(true)
+  , m_bTruthJetAvailable(true)
+  , m_iNChargedPions(0)
+  , m_iNNeutralPions(0)
+  , m_iNChargedOthers(0)
+  , m_iNNeutralOthers(0)
+  , m_iNChargedDaughters(0)
+  , m_bIsHadronicTau(false)
+  , m_tMCTruthClassifier("MCTruthClassifierTool", this)
+{
+  declareProperty( "WriteTruthTaus", m_bWriteTruthTaus = false);
+
+  // container names
+  declareProperty( "NewTruthTauContainerName", m_sNewTruthTauContainerName = "TruthTaus");
+  declareProperty( "TruthTauContainerName", m_sTruthTauContainerName = "TruthTaus");
+  declareProperty( "TruthMuonContainerName", m_sTruthMuonContainerName = "TruthMuons");
+  declareProperty( "TruthElectronContainerName", m_sTruthElectronContainerName = "TruthElectrons");
+  declareProperty( "TruthJetContainerName", m_sTruthJetContainerName = "AntiKt4TruthJets");
+  declareProperty( "TruthParticlesContainerName", m_sTruthParticlesContainerName = "TruthParticles");
+  declareProperty( "WriteInvisibleFourMomentum", m_bWriteInvisibleFourMomentum = false);
+  declareProperty( "WriteVisibleChargedFourMomentum", m_bWriteVisibleChargedFourMomentum = false);
+  declareProperty( "WriteVisibleNeutralFourMomentum", m_bWriteVisibleNeutralFourMomentum = false);
+  declareProperty( "WriteDecayModeVector", m_bWriteDecayModeVector = true);
+}
+
+//______________________________________________________________________________
+BuildTruthTaus::~BuildTruthTaus( )
+{
+
+}
+
+//______________________________________________________________________________
+StatusCode BuildTruthTaus::initialize()
+{
+  ATH_MSG_INFO( "Initializing BuildTruthTaus" );
+  m_sNewTruthTauContainerNameAux = m_sNewTruthTauContainerName + "Aux.";
+
+  ATH_CHECK(ASG_MAKE_ANA_TOOL(m_tMCTruthClassifier, MCTruthClassifier));
+  ATH_CHECK(m_tMCTruthClassifier.initialize());
+  return StatusCode::SUCCESS;
+}
+
+//______________________________________________________________________________
+xAOD::TruthParticleContainer* BuildTruthTaus::getTruthTauContainer()
+{
+  if (m_bIsData)
+    return 0;
+  if (!m_bTruthTauAvailable)
+    return m_xTruthTauContainer;
+  else
+  {
+    ATH_MSG_WARNING("TruthTau container was available from the event store and not rebuilt. Please get it from the event store");
+    return 0;
+  }
+}
+
+//______________________________________________________________________________
+xAOD::TruthParticleAuxContainer* BuildTruthTaus::getTruthTauAuxContainer()
+{
+  if (m_bIsData)
+    return 0;
+  if (!m_bTruthTauAvailable)
+    return m_xTruthTauAuxContainer;
+  else
+  {
+    ATH_MSG_WARNING("TruthTau auxiliary container was available from the event store and not rebuilt. Please get it from the event store");
+    return 0;
+  }
+}
+
+//______________________________________________________________________________
+StatusCode BuildTruthTaus::beginEvent()
+{
+  m_bNewEvent = true;
+  if (m_bIsConfigured)
+    return StatusCode::SUCCESS;
+
+  const xAOD::EventInfo* xEventInfo = 0;
+  ATH_CHECK(evtStore()->retrieve(xEventInfo,"EventInfo"));
+  m_bIsData = !(xEventInfo->eventType( xAOD::EventInfo::IS_SIMULATION));
+  m_bIsConfigured=true;
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode BuildTruthTaus::retrieveTruthTaus()
+{
+  if (m_bIsData)
+    return StatusCode::SUCCESS;
+
+  if (m_bNewEvent)
+    m_bNewEvent = false;
+  else
+    return StatusCode::SUCCESS;
+
+  if ( m_bTruthTauAvailable )
+  {
+    if (evtStore()->contains<xAOD::TruthParticleContainer>(m_sTruthTauContainerName))
+      ATH_CHECK( evtStore()->retrieve(m_xTruthTauContainerConst,m_sTruthTauContainerName));
+    else
+    {
+      ATH_MSG_INFO("TruthTaus container with name " << m_sTruthTauContainerName << " is not available, will generate the container for each event from TruthParticles container");
+      m_bTruthTauAvailable = false;
+    }
+  }
+
+  if ( m_bTruthMuonAvailable )
+  {
+    if (evtStore()->contains<xAOD::TruthParticleContainer>(m_sTruthMuonContainerName))
+      ATH_CHECK(evtStore()->retrieve(m_xTruthMuonContainerConst,m_sTruthMuonContainerName));
+    else
+    {
+      ATH_MSG_INFO("TruthMuons container with name " << m_sTruthMuonContainerName << " is not available, won't perform matching to truth muons");
+      m_bTruthMuonAvailable = false;
+    }
+  }
+
+  if ( m_bTruthElectronAvailable )
+  {
+    if (evtStore()->contains<xAOD::TruthParticleContainer>(m_sTruthElectronContainerName))
+      ATH_CHECK(evtStore()->retrieve(m_xTruthElectronContainerConst,m_sTruthElectronContainerName));
+    else
+    {
+      ATH_MSG_INFO("TruthElectrons container with name " << m_sTruthElectronContainerName << " is not available, won't perform matching to truth electrons");
+      m_bTruthElectronAvailable = false;
+    }
+  }
+
+  if ( m_bTruthJetAvailable )
+  {
+    if (evtStore()->contains<xAOD::JetContainer>(m_sTruthJetContainerName))
+      ATH_CHECK(evtStore()->retrieve(m_xTruthJetContainerConst,m_sTruthJetContainerName));
+    else
+    {
+      ATH_MSG_INFO("TruthJets container with name " << m_sTruthJetContainerName << " is not available, won't perform matching to truth jets");
+      m_bTruthJetAvailable = false;
+    }
+  }
+
+  // go here if TruthTaus was not found in m_bTruthTauAvailable if-block
+  if ( !m_bTruthTauAvailable )
+  {
+    if (evtStore()->contains<xAOD::TruthParticleContainer>(m_sTruthParticlesContainerName))
+    {
+      if ( evtStore()->retrieve(m_xTruthParticleContainer,m_sTruthParticlesContainerName).isSuccess() )
+        return buildTruthTausFromTruthParticles();
+      else
+        return StatusCode::FAILURE;
+    }
+    else
+    {
+      ATH_MSG_FATAL("TruthParticles container is not available but needed for building truth taus");
+      return StatusCode::FAILURE;
+    }
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+//=================================PRIVATE-PART=================================
+//______________________________________________________________________________
+//______________________________________________________________________________
+StatusCode BuildTruthTaus::buildTruthTausFromTruthParticles()
+{
+  if(m_xTruthTauContainer && !m_bWriteTruthTaus)
+  {
+    delete m_xTruthTauContainer;
+    delete m_xTruthTauAuxContainer;
+  }
+
+  // Create the new containers
+  m_xTruthTauContainer = new xAOD::TruthParticleContainer();
+  m_xTruthTauAuxContainer = new xAOD::TruthParticleAuxContainer();
+  m_xTruthTauContainer->setStore( m_xTruthTauAuxContainer );
+
+  if (m_bWriteTruthTaus)
+  {
+    if ( evtStore()->record( m_xTruthTauContainer, m_sNewTruthTauContainerName ).isFailure() )
+    {
+      ATH_MSG_FATAL("Couldn't create truth tau container with key " << m_sNewTruthTauContainerName);
+      return StatusCode::FAILURE;
+    }
+    if ( evtStore()->record( m_xTruthTauAuxContainer, m_sNewTruthTauContainerNameAux ).isFailure() )
+    {
+      ATH_MSG_FATAL("Couldn't create truth tau container with key " << m_sNewTruthTauContainerNameAux);
+      return StatusCode::FAILURE;
+    }
+    ATH_MSG_DEBUG( "Recorded new TruthParticleContainer with key: " <<  m_sNewTruthTauContainerName);
+  }
+
+  for (auto xTruthParticle : *m_xTruthParticleContainer)
+  {
+    if ( xTruthParticle->isTau() )
+    {
+      xAOD::TruthParticle* xTruthTau = new xAOD::TruthParticle();
+      xTruthTau->makePrivateStore( *xTruthParticle );
+
+      if ( examineTruthTau(*xTruthTau).isFailure() )
+      {
+        delete xTruthTau;
+        continue;
+      }
+
+      // Run classification
+      std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin> pClassification = m_tMCTruthClassifier->particleTruthClassifier(xTruthTau);
+      static SG::AuxElement::Decorator<unsigned int> decClassifierParticleType("classifierParticleType");
+      static SG::AuxElement::Decorator<unsigned int> decClassifierParticleOrigin("classifierParticleOrigin");
+      decClassifierParticleType(*xTruthTau) = pClassification.first;
+      decClassifierParticleOrigin(*xTruthTau) = pClassification.second;
+
+      // create link to the original TruthParticle
+      ElementLink < xAOD::TruthParticleContainer > lTruthParticleLink(xTruthParticle, *m_xTruthParticleContainer);
+      static SG::AuxElement::Accessor<ElementLink< xAOD::TruthParticleContainer > > accOriginalTruthParticle("originalTruthParticle");
+      accOriginalTruthParticle(*xTruthTau) = lTruthParticleLink;
+
+      m_xTruthTauContainer->push_back(xTruthTau);
+    }
+  }
+  return StatusCode::SUCCESS;
+}
+
+//______________________________________________________________________________
+StatusCode BuildTruthTaus::examineTruthTau(const xAOD::TruthParticle& xTruthParticle)
+{
+  // skip this tau if it has no decay vertex, should not happen
+  if ( !xTruthParticle.hasDecayVtx() )
+    return StatusCode::FAILURE;
+
+  ATH_MSG_VERBOSE("looking for charged daughters of a truth tau");
+
+  m_iNChargedPions = 0;
+  m_iNNeutralPions = 0;
+  m_iNChargedOthers = 0;
+  m_iNNeutralOthers = 0;
+  m_iNChargedDaughters = 0;
+  m_vDecayMode.clear();
+
+  // define truth visible kinematic variables
+  m_vTruthVisTLV = TLorentzVector();
+  m_vTruthVisTLVCharged = TLorentzVector();
+  m_vTruthVisTLVNeutral = TLorentzVector();
+
+  // default false, if there is a hadron in decay products, it is
+  // switched to true
+  m_bIsHadronicTau = false;
+
+  const xAOD::TruthVertex* xDecayVertex = xTruthParticle.decayVtx();
+  if ( !xDecayVertex )
+    return StatusCode::FAILURE;
+  for ( size_t iOutgoingParticle = 0; iOutgoingParticle < xDecayVertex->nOutgoingParticles(); ++iOutgoingParticle )
+  {
+    const xAOD::TruthParticle* xTruthDaughter = xDecayVertex->outgoingParticle(iOutgoingParticle);
+    if (!xTruthDaughter)
+    {
+      ATH_MSG_FATAL("Truth daughter of tau decay was not found in "<<m_sTruthParticlesContainerName<<" container. Please ensure that this container has the full tau decay information or produce the TruthTaus container in AtlasDerivation.\nInformation on how to do this can be found here:\nhttps://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TauPreRecommendations2015#Accessing_Tau_Truth_Information");
+      return StatusCode::FAILURE;
+    }
+
+    // if tau decays into tau this is not a proper tau decay
+    if ( xTruthDaughter->isTau() )
+    {
+      ATH_MSG_VERBOSE("Tau decays into a tau itself -> skip this decay");
+      return StatusCode::FAILURE;
+    }
+  }
+
+  examineTruthTauDecay(xTruthParticle).ignore();
+
+  if (m_bIsHadronicTau)
+    ATH_MSG_VERBOSE(m_iNChargedDaughters << " prong hadronic truth tau was found with barcode "<<xTruthParticle.barcode());
+  else
+    ATH_MSG_VERBOSE(m_iNChargedDaughters << " prong leptonic truth tau was found with barcode "<<xTruthParticle.barcode());
+  if ( m_iNChargedDaughters%2 == 0 )
+  {
+    ATH_MSG_WARNING("found tau with even multiplicity: " << m_iNChargedDaughters);
+    printDecay(xTruthParticle);
+  }
+
+  static SG::AuxElement::Decorator<double> decPtVis("pt_vis");
+  static SG::AuxElement::Decorator<double> decEtaVis("eta_vis");
+  static SG::AuxElement::Decorator<double> decPhiVis("phi_vis");
+  static SG::AuxElement::Decorator<double> accMVis("m_vis");
+
+  static SG::AuxElement::Decorator<size_t> decNumCharged("numCharged");
+  static SG::AuxElement::Decorator<size_t> decNumChargedPion("numChargedPion");
+  static SG::AuxElement::Decorator<size_t> decNumNeutral("numNeutral");
+  static SG::AuxElement::Decorator<size_t> accNumNeutralPion("numNeutralPion");
+
+  decPtVis(xTruthParticle) = m_vTruthVisTLV.Pt();
+  decEtaVis(xTruthParticle) = m_vTruthVisTLV.Eta();
+  decPhiVis(xTruthParticle) = m_vTruthVisTLV.Phi();
+  accMVis(xTruthParticle) = m_vTruthVisTLV.M();
+
+  decNumCharged(xTruthParticle) = m_iNChargedDaughters;
+  decNumChargedPion(xTruthParticle) = m_iNChargedPions;
+  decNumNeutral(xTruthParticle) = m_iNNeutralPions+m_iNNeutralOthers;
+  accNumNeutralPion(xTruthParticle) = m_iNNeutralPions;
+
+  static SG::AuxElement::Decorator<char> decIsHadronicTau("IsHadronicTau");
+  decIsHadronicTau(xTruthParticle) = (char)m_bIsHadronicTau;
+
+  if ( m_bWriteInvisibleFourMomentum )
+  {
+    TLorentzVector vTruthInvisTLV = xTruthParticle.p4() - m_vTruthVisTLV;
+    static SG::AuxElement::Decorator<double> decPtInvis("pt_invis");
+    static SG::AuxElement::Decorator<double> decEtaInvis("eta_invis");
+    static SG::AuxElement::Decorator<double> decPhiInvis("phi_invis");
+    static SG::AuxElement::Decorator<double> accMInvis("m_invis");
+    decPtInvis(xTruthParticle)  = vTruthInvisTLV.Pt();
+    decEtaInvis(xTruthParticle) = vTruthInvisTLV.Eta();
+    decPhiInvis(xTruthParticle) = vTruthInvisTLV.Phi();
+    accMInvis(xTruthParticle)   = vTruthInvisTLV.M();
+  }
+
+  if ( m_bWriteVisibleChargedFourMomentum )
+  {
+    static SG::AuxElement::Decorator<double> decPtVisCharged("pt_vis_charged");
+    static SG::AuxElement::Decorator<double> decEtaVisCharged("eta_vis_charged");
+    static SG::AuxElement::Decorator<double> decPhiVisCharged("phi_vis_charged");
+    static SG::AuxElement::Decorator<double> accMVisCharged("m_vis_charged");
+    decPtVisCharged(xTruthParticle)  = m_vTruthVisTLVCharged.Pt();
+    decEtaVisCharged(xTruthParticle) = m_vTruthVisTLVCharged.Eta();
+    decPhiVisCharged(xTruthParticle) = m_vTruthVisTLVCharged.Phi();
+    accMVisCharged(xTruthParticle)   = m_vTruthVisTLVCharged.M();
+  }
+
+  if ( m_bWriteVisibleNeutralFourMomentum )
+  {
+    static SG::AuxElement::Decorator<double> decPtVisNeutral("pt_vis_neutral");
+    static SG::AuxElement::Decorator<double> decEtaVisNeutral("eta_vis_neutral");
+    static SG::AuxElement::Decorator<double> decPhiVisNeutral("phi_vis_neutral");
+    static SG::AuxElement::Decorator<double> accMVisNeutral("m_vis_neutral");
+    decPtVisNeutral(xTruthParticle)  = m_vTruthVisTLVNeutral.Pt();
+    decEtaVisNeutral(xTruthParticle) = m_vTruthVisTLVNeutral.Eta();
+    decPhiVisNeutral(xTruthParticle) = m_vTruthVisTLVNeutral.Phi();
+    accMVisNeutral(xTruthParticle)   = m_vTruthVisTLVNeutral.M();
+  }
+
+  if ( m_bWriteDecayModeVector )
+  {
+    static SG::AuxElement::Decorator<std::vector<int> > decDecayModeVector("DecayModeVector");
+    decDecayModeVector(xTruthParticle) = m_vDecayMode;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+//______________________________________________________________________________
+StatusCode BuildTruthTaus::examineTruthTauDecay(const xAOD::TruthParticle& xTruthParticle)
+{
+  // get vertex and check if it exists
+  const xAOD::TruthVertex* xDecayVertex = xTruthParticle.decayVtx();
+  if (!xDecayVertex)
+    return StatusCode::SUCCESS;
+
+  for ( size_t iOutgoingParticle = 0; iOutgoingParticle < xDecayVertex->nOutgoingParticles(); ++iOutgoingParticle )
+  {
+    const xAOD::TruthParticle* xTruthDaughter = xDecayVertex->outgoingParticle(iOutgoingParticle);
+    if (!xTruthDaughter)
+    {
+      ATH_MSG_FATAL("Truth daughter of tau decay was not found in "<<m_sTruthParticlesContainerName<<" container. Please ensure that this container has the full tau decay information or produce the TruthTaus container in AtlasDerivation.\nInformation on how to do this can be found here:\nhttps://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TauPreRecommendations2015#Accessing_Tau_Truth_Information");
+      return StatusCode::FAILURE;
+    }
+
+    int iAbsPdgId = xTruthDaughter->absPdgId();
+    int iPdgId = xTruthDaughter->pdgId();
+
+    // look at decay of unstable particles
+    if (xTruthDaughter->status() == 2 or xTruthDaughter->status() == 11 or xTruthDaughter->status() == 10902) // 11 for HERWIG++
+    {
+      if ( iAbsPdgId != 111 and iAbsPdgId != 311 and iAbsPdgId != 310 and iAbsPdgId != 130 )
+      {
+        examineTruthTauDecay(*xTruthDaughter).ignore();
+        continue;
+      }
+    }
+
+    // only process stable particles
+    if (xTruthDaughter->status() != 1 and xTruthDaughter->status() != 2)
+      continue;
+
+    // add pdgID to vector for decay mode classification
+    m_vDecayMode.push_back(iPdgId);
+
+    // if tau decays leptonically, indicated by an electron/muon neutrino then
+    // it is not a hadronic decay
+    if ( xTruthDaughter->isHadron() )
+      m_bIsHadronicTau = true;
+
+    // ignore neutrinos for further progress
+    if ( xTruthDaughter->isNeutrino() )
+    {
+      ATH_MSG_VERBOSE("found neutrino decay particle with PdgId "<<iPdgId);
+      continue;
+    }
+
+    // add momentum of non-neutrino particle to visible momentum
+    m_vTruthVisTLV += xTruthDaughter->p4();
+    if ( m_bWriteVisibleChargedFourMomentum )
+      if ( xTruthDaughter->isCharged() )
+        m_vTruthVisTLVCharged += xTruthDaughter->p4();
+    if ( m_bWriteVisibleNeutralFourMomentum )
+      if ( xTruthDaughter->isNeutral() )
+        m_vTruthVisTLVNeutral += xTruthDaughter->p4();
+
+    // only count charged decay particles
+    if ( xTruthDaughter->isCharged() )
+    {
+      ATH_MSG_VERBOSE("found charged decay particle with PdgId "<<iPdgId);
+      m_iNChargedDaughters++;
+      // count charged pions
+      if (iAbsPdgId==211) m_iNChargedPions++;
+      else m_iNChargedOthers++;
+    }
+    else
+    {
+      ATH_MSG_VERBOSE("found neutral decay particle with PdgId "<<iPdgId);
+      // count neutral pions
+      if (iAbsPdgId==111) m_iNNeutralPions++;
+      else m_iNNeutralOthers++;
+    }
+  }
+  return StatusCode::SUCCESS;
+}
+
+void BuildTruthTaus::printDecay(const xAOD::TruthParticle& xTruthParticle, int depth) const
+{
+  // loop over all decay particles, print their kinematic and other properties
+
+  const xAOD::TruthVertex* xDecayVertex = xTruthParticle.decayVtx();
+  if (!xDecayVertex)
+    return;
+
+  for ( size_t iOutgoingParticle = 0; iOutgoingParticle < xDecayVertex->nOutgoingParticles(); ++iOutgoingParticle )
+  {
+    const xAOD::TruthParticle* xTruthDaughter = xDecayVertex->outgoingParticle(iOutgoingParticle);
+    if (!xTruthDaughter)
+    {
+      ATH_MSG_FATAL("Truth daughter of tau decay was not found in "<<m_sTruthParticlesContainerName<<" container. Please ensure that this container has the full tau decay information or produce the TruthTaus container in AtlasDerivation.\nInformation on how to do this can be found here:\nhttps://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TauPreRecommendations2015#Accessing_Tau_Truth_Information");
+      return;
+    }
+    ATH_MSG_WARNING("depth "<<depth
+                    <<" e "<<xTruthDaughter->e()
+                    <<" eta "<<xTruthDaughter->p4().Eta()
+                    <<" phi "<<xTruthDaughter->p4().Phi()
+                    <<" pdgid "<<xTruthDaughter->pdgId()
+                    <<" status "<<xTruthDaughter->status()
+                    <<" barcode "<<xTruthDaughter->barcode());
+    printDecay(*xTruthDaughter, depth+1);
+  }
+}
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonDiTauEfficiencyTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonDiTauEfficiencyTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..d17a101916ac495d13205ce2529970da3c15a122
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonDiTauEfficiencyTool.cxx
@@ -0,0 +1,248 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// Framework include(s):
+#include "PathResolver/PathResolver.h"
+
+// local include(s)
+#include "TauAnalysisTools/CommonDiTauEfficiencyTool.h"
+#include "TauAnalysisTools/TauEfficiencyCorrectionsTool.h"
+#include "xAODTruth/TruthParticleContainer.h"
+
+// ROOT include(s)
+#include "TH2F.h"
+
+using namespace TauAnalysisTools;
+
+//______________________________________________________________________________
+CommonDiTauEfficiencyTool::CommonDiTauEfficiencyTool(std::string sName)
+  : CommonEfficiencyTool( sName )
+  , m_fX(&DiTauPt)
+  , m_fY(&DiTauEta)
+  , m_bSFIsAvailable(false)
+  , m_bSFIsAvailableChecked(false)
+{
+}
+
+CommonDiTauEfficiencyTool::~CommonDiTauEfficiencyTool()
+{
+}
+
+
+/*
+  Retrieve the scale factors and if requested the values for the NP's and add
+  this stuff in quadrature. Finally return sf_nom +/- n*uncertainty
+*/
+//______________________________________________________________________________
+CP::CorrectionCode CommonDiTauEfficiencyTool::getEfficiencyScaleFactor(const xAOD::DiTauJet& xDiTau,
+    double& dEfficiencyScaleFactor)
+{
+  // check which true state is requestet
+  if (!m_bSkipTruthMatchCheck and checkTruthMatch(xDiTau) != m_eCheckTruth)
+  {
+    dEfficiencyScaleFactor = 1.;
+    return CP::CorrectionCode::Ok;
+  }
+
+  CP::CorrectionCode tmpCorrectionCode = getValue(m_sSFHistName,
+                                                  xDiTau,
+                                                  dEfficiencyScaleFactor);
+  // return correction code if histogram is not available
+  if (tmpCorrectionCode != CP::CorrectionCode::Ok)
+    return tmpCorrectionCode;
+
+  // skip further process if systematic set is empty
+  if (m_sSystematicSet->size() == 0)
+    return CP::CorrectionCode::Ok;
+
+  // get uncertainties summed in quadrature
+  double dTotalSystematic2 = 0;
+  double dDirection = 0;
+  for (auto syst : *m_sSystematicSet)
+  {
+
+    // check if systematic is available
+    auto it = m_mSystematicsHistNames.find(syst.basename());
+
+    // get uncertainty value
+    double dUncertaintySyst = 0;
+
+    // needed for up/down decision
+    dDirection = syst.parameter();
+
+    // build up histogram name
+    std::string sHistName = it->second;
+    if (dDirection>0)   sHistName+="_up";
+    else                sHistName+="_down";
+    if (!m_sWP.empty()) sHistName+="_"+m_sWP;
+    // sHistName += sProng;
+
+    // get the uncertainty from the histogram
+    tmpCorrectionCode = getValue(sHistName,
+                                 xDiTau,
+                                 dUncertaintySyst);
+
+    // return correction code if histogram is not available
+    if (tmpCorrectionCode != CP::CorrectionCode::Ok)
+      return tmpCorrectionCode;
+
+    // scale uncertainty with direction, i.e. +/- n*sigma
+    dUncertaintySyst *= dDirection;
+
+    // square uncertainty and add to total uncertainty
+    dTotalSystematic2 += dUncertaintySyst * dUncertaintySyst;
+  }
+
+  // now use dDirection to use up/down uncertainty
+  dDirection = (dDirection > 0) ? +1 : -1;
+
+  // finally apply uncertainty (eff * ( 1 +/- \sum  )
+  dEfficiencyScaleFactor *= 1 + dDirection * sqrt(dTotalSystematic2);
+
+  return CP::CorrectionCode::Ok;
+}
+
+/*
+  Get scale factor from getEfficiencyScaleFactor and decorate it to the
+  tau. Note that this can only be done if the variable name is not already used,
+  e.g. if the variable was already decorated on a previous step (enured by the
+  m_bSFIsAvailableChecked check).
+
+  Technical note: cannot use `static SG::AuxElement::Decorator` as we will have
+  multiple instances of this tool with different decoration names.
+*/
+//______________________________________________________________________________
+CP::CorrectionCode CommonDiTauEfficiencyTool::applyEfficiencyScaleFactor(const xAOD::DiTauJet& xDiTau)
+{
+  double dSf = 0.;
+
+  if (!m_bSFIsAvailableChecked)
+  {
+    m_bSFIsAvailable = xDiTau.isAvailable< double >(m_sVarName);
+    // m_bSFIsAvailable = xDiTau.isAvailable< double >("bliblablubb");
+    m_bSFIsAvailableChecked = true;
+    if (m_bSFIsAvailable)
+    {
+      ATH_MSG_DEBUG(m_sVarName << " decoration is available on first ditau processed, switched of applyEfficiencyScaleFactor for further ditaus.");
+      ATH_MSG_DEBUG("If an application of efficiency scale factors needs to be redone, please pass a shallow copy of the original ditau.");
+    }
+  }
+  if (m_bSFIsAvailable)
+    return CP::CorrectionCode::Ok;
+
+  // retreive scale factor
+  CP::CorrectionCode tmpCorrectionCode = getEfficiencyScaleFactor(xDiTau, dSf);
+  // adding scale factor to tau as decoration
+  xDiTau.auxdecor<double>(m_sVarName) = dSf;
+
+  return tmpCorrectionCode;
+}
+
+
+// //______________________________________________________________________________
+void CommonDiTauEfficiencyTool::ReadInputs(TFile* fFile)
+{
+  m_mSF->clear();
+
+  // initialize function pointer
+  m_fX = &DiTauPt;
+  m_fY = &DiTauEta;
+
+  TKey *kKey;
+  TIter itNext(fFile->GetListOfKeys());
+  while ((kKey = (TKey*)itNext()))
+  {
+    // parse file content for objects of type TNamed, check their title for
+    // known strings and reset funtion pointer
+    std::string sKeyName = kKey->GetName();
+
+    std::vector<std::string> vSplitName = {};
+    split(sKeyName,'_',vSplitName);
+    if (vSplitName[0] == "sf")
+    {
+      addHistogramToSFMap(kKey, sKeyName);
+    }
+    else
+    {
+      if (sKeyName.find("_up_") != std::string::npos or sKeyName.find("_down_") != std::string::npos)
+        addHistogramToSFMap(kKey, sKeyName);
+      else
+      {
+        size_t iPos = sKeyName.find('_');
+        addHistogramToSFMap(kKey, sKeyName.substr(0,iPos)+"_up"+sKeyName.substr(iPos));
+        addHistogramToSFMap(kKey, sKeyName.substr(0,iPos)+"_down"+sKeyName.substr(iPos));
+      }
+    }
+  }
+  ATH_MSG_INFO("data loaded from " << fFile->GetName());
+}
+
+
+/*
+  return value from the tuple map object based on the pt/eta values (or the
+  corresponding value in case of configuration)
+*/
+//______________________________________________________________________________
+CP::CorrectionCode CommonDiTauEfficiencyTool::getValue(const std::string& sHistName,
+    const xAOD::DiTauJet& xDiTau,
+    double& dEfficiencyScaleFactor) const
+{
+  if (m_mSF->find(sHistName) == m_mSF->end())
+  {
+    ATH_MSG_ERROR("Object with name "<<sHistName<<" was not found in input file.");
+    ATH_MSG_DEBUG("Content of input file");
+    for (auto eEntry : *m_mSF)
+      ATH_MSG_DEBUG("  Entry: "<<eEntry.first);
+    return CP::CorrectionCode::Error;
+  }
+
+  // get a tuple (TObject*,functionPointer) from the scale factor map
+  tTupleObjectFunc tTuple = (*m_mSF)[sHistName];
+
+  // get pt and eta (for x and y axis respectively)
+  double dPt = m_fX(xDiTau);
+  double dEta = m_fY(xDiTau);
+
+  // finally obtain efficiency scale factor from TH1F/TH1D/TF1, by calling the
+  // function pointer stored in the tuple from the scale factor map
+  return  (std::get<1>(tTuple))(std::get<0>(tTuple), dEfficiencyScaleFactor, dPt, dEta);
+}
+
+
+/*
+  Check the type of truth particle, previously matched with the
+  DiTauTruthMatchingTool. The type to match was parsed from the input file in
+  CommonEfficiencyTool::generateSystematicSets()
+*/
+//______________________________________________________________________________
+e_TruthMatchedParticleType CommonDiTauEfficiencyTool::checkTruthMatch(const xAOD::DiTauJet& xDiTau) const
+{
+
+  if (!xDiTau.isAvailable<char>("IsTruthHadronic"))
+    ATH_MSG_ERROR("No truth match information available. Please run DiTauTruthMatchingTool first");
+  static SG::AuxElement::Accessor<char> accIsTruthHadronic("IsTruthHadronic");
+
+  e_TruthMatchedParticleType eTruthMatchedParticleType = Unknown;
+
+  if (accIsTruthHadronic(xDiTau))
+    eTruthMatchedParticleType = TruthHadronicDiTau;
+
+  return eTruthMatchedParticleType;
+}
+
+
+//______________________________________________________________________________
+double TauAnalysisTools::DiTauPt(const xAOD::DiTauJet& xDiTau)
+{
+  // return ditau pt in GeV
+  return xDiTau.auxdata<double>("ditau_pt")/1000.;
+}
+
+
+//______________________________________________________________________________
+double TauAnalysisTools::DiTauEta(const xAOD::DiTauJet& xDiTau)
+{
+  // return ditau eta
+  return xDiTau.eta();
+}
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx
index 1a00797678f2314d8442a8c68b981e45a67879e1..bd4e3628aec659c2c7d07163210e2b31e29f50ab 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonEfficiencyTool.cxx
@@ -336,6 +336,7 @@ CP::SystematicSet CommonEfficiencyTool::recommendedSystematics() const
 //______________________________________________________________________________
 CP::SystematicCode CommonEfficiencyTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet)
 {
+
   // first check if we already know this systematic configuration
   auto itSystematicSet = m_mSystematicSets.find(sSystematicSet);
   if (itSystematicSet != m_mSystematicSets.end())
@@ -522,6 +523,7 @@ void CommonEfficiencyTool::addHistogramToSFMap(TKey* kKey, const std::string& sK
 //______________________________________________________________________________
 void CommonEfficiencyTool::generateSystematicSets()
 {
+
   // creation of basic string for all NPs, e.g. "TAUS_TRUEHADTAU_EFF_RECO_"
   std::vector<std::string> vSplitInputFilePath = {};
   split(m_sInputFileName,'_',vSplitInputFilePath);
@@ -536,6 +538,7 @@ void CommonEfficiencyTool::generateSystematicSets()
   if (sTruthType=="TRUEELECTRON") m_eCheckTruth = TauAnalysisTools::TruthElectron;
   if (sTruthType=="TRUEMUON") m_eCheckTruth = TauAnalysisTools::TruthMuon;
   if (sTruthType=="TRUEJET") m_eCheckTruth = TauAnalysisTools::TruthJet;
+  if (sTruthType=="TRUEHADDITAU") m_eCheckTruth = TauAnalysisTools::TruthHadronicDiTau;
   if (sEfficiencyType=="ELEOLR") m_bNoMultiprong = true;
 
   for (auto mSF : *m_mSF)
@@ -548,8 +551,8 @@ void CommonEfficiencyTool::generateSystematicSets()
 
     // skip nominal scale factors
     if (sNP == "sf") continue;
-    // skip if non 1p histogram to avoid duplications (TODO: come up with a better solution)
-    if (mSF.first.find("_1p") == std::string::npos) continue;
+    // skip if 3p histogram to avoid duplications (TODO: come up with a better solution)
+    if (mSF.first.find("_3p") != std::string::npos) continue;
 
     // test if NP starts with a capital letter indicating that this should be recommended
     bool bIsRecommended = false;
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx
index 2382e65eafb838deda4a1730a793d2ab144f4922..c3dccae02d22b2d55b46d321ef916b397a4bfd87 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx
@@ -143,15 +143,16 @@ StatusCode CommonSmearingTool::initialize()
   if (applySystematicVariation(CP::SystematicSet()) != CP::SystematicCode::Ok )
     return StatusCode::FAILURE;
 
+#ifndef XAODTAU_VERSIONS_TAUJET_V3_H
   if (m_bApplyMVATES)
   {
     ATH_CHECK(ASG_MAKE_ANA_TOOL(m_tMvaTESVariableDecorator, MvaTESVariableDecorator));
     ATH_CHECK(ASG_MAKE_ANA_TOOL(m_tMvaTESEvaluator, MvaTESEvaluator));
-    // ATH_CHECK(m_tMvaTESEvaluator.setProperty("WeightFileName", "LC.pantau.interpolPt250GeV_mediumTaus_BDTG.weights.xml"));
     ATH_CHECK(m_tMvaTESEvaluator.setProperty("WeightFileName", "MvaTES_20161015_pi0fix_BDTG.weights.xml"));
     ATH_CHECK(m_tMvaTESVariableDecorator.initialize());
     ATH_CHECK(m_tMvaTESEvaluator.initialize());
   }
+#endif
 
   if (m_bApplyCombinedTES || m_bApplyMVATES) // CombinedTES has to be available for MVA fix
   {
@@ -197,6 +198,7 @@ CP::CorrectionCode CommonSmearingTool::applyCorrection( xAOD::TauJet& xTau )
 
     if (not m_bPtFinalCalibIsAvailable)
     {
+#ifndef XAODTAU_VERSIONS_TAUJET_V3_H
       // TODO: only call eventInitialize once per event, probably via migration to
       // AsgMetadataTool
       if (m_tMvaTESVariableDecorator->eventInitialize().isFailure())
@@ -205,6 +207,10 @@ CP::CorrectionCode CommonSmearingTool::applyCorrection( xAOD::TauJet& xTau )
         return CP::CorrectionCode::Error;
       if (m_tMvaTESEvaluator->execute(xTau).isFailure())
         return CP::CorrectionCode::Error; 
+#else
+      ATH_MSG_ERROR("MVA TES decoration 'ptFinalCalib' is not available ");
+      return CP::CorrectionCode::Error;
+#endif
     }
     
     // veto MVA TES for unreasonably low resolution values
@@ -603,9 +609,9 @@ CP::CorrectionCode CommonSmearingTool::getValue(const std::string& sHistName,
     {
       TF1 f("",sTitle.c_str(), 0, 1000);
       if (sHistName.find("sf_") != std::string::npos)
-        dEfficiencyScaleFactor = (dEfficiencyScaleFactor -1) *f.Eval(dPt) + 1;
+        dEfficiencyScaleFactor = (dEfficiencyScaleFactor -1) *f.Eval(m_fX(xTau)) + 1;
       else
-        dEfficiencyScaleFactor *= f.Eval(dPt);
+        dEfficiencyScaleFactor *= f.Eval(m_fX(xTau));
     }
   }
   return CP::CorrectionCode::Ok;
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/DiTauEfficiencyCorrectionsTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/DiTauEfficiencyCorrectionsTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..4abb717bbb6b585a612e60cb702e2c6716e1565e
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/DiTauEfficiencyCorrectionsTool.cxx
@@ -0,0 +1,285 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// EDM include(s):
+#include "PATInterfaces/SystematicRegistry.h"
+#include "xAODEventInfo/EventInfo.h"
+
+// Local include(s):
+#include "TauAnalysisTools/DiTauEfficiencyCorrectionsTool.h"
+#include "TauAnalysisTools/Enums.h"
+#include "TauAnalysisTools/SharedFilesVersion.h"
+
+
+namespace TauAnalysisTools
+{
+
+//______________________________________________________________________________
+DiTauEfficiencyCorrectionsTool::DiTauEfficiencyCorrectionsTool( const std::string& sName )
+  : asg::AsgMetadataTool( sName )
+  , m_vCommonEfficiencyTools()
+  , m_bIsData(false)
+  , m_bIsConfigured(false)
+  , m_iRunNumber(0)
+{
+  declareProperty( "EfficiencyCorrectionTypes",    m_vEfficiencyCorrectionTypes    = {} );
+  declareProperty( "InputFilePathRecoHadTau",      m_sInputFilePathRecoHadTau      = "" );
+  declareProperty( "InputFilePathJetIDHadTau",     m_sInputFilePathJetIDHadTau     = "" );
+  declareProperty( "VarNameRecoHadTau",            m_sVarNameRecoHadTau            = "" );
+  declareProperty( "VarNameJetIDHadTau",           m_sVarNameJetIDHadTau           = "" );
+  declareProperty( "RecommendationTag",            m_sRecommendationTag            = "2017-moriond" );
+  declareProperty( "IDLevel",                      m_iIDLevel                      = (int)JETIDBDTTIGHT );
+  declareProperty( "EventInfoName",                m_sEventInfoName                = "EventInfo" );
+  declareProperty( "SkipTruthMatchCheck",          m_bSkipTruthMatchCheck          = false );
+}
+
+
+//______________________________________________________________________________
+DiTauEfficiencyCorrectionsTool::~DiTauEfficiencyCorrectionsTool()
+{
+  for (auto tTool : m_vCommonEfficiencyTools)
+    delete tTool;
+}
+
+
+//______________________________________________________________________________
+StatusCode DiTauEfficiencyCorrectionsTool::initialize()
+{
+  // Greet the user:
+  ATH_MSG_INFO( "Initializing DiTauEfficiencyCorrectionsTool" );
+
+  if (m_bSkipTruthMatchCheck)
+    ATH_MSG_WARNING("Truth match check will be skipped. This is ONLY FOR TESTING PURPOSE!");
+
+  // configure default set of variations if not set by the constructor using TauSelectionTool or the user
+  if ((m_sRecommendationTag== "2017-moriond") and m_vEfficiencyCorrectionTypes.size() == 0)
+    m_vEfficiencyCorrectionTypes = {SFJetIDHadTau
+                                   };
+
+  if (m_sRecommendationTag == "2017-moriond")
+    ATH_CHECK(initializeTools_2017_moriond());
+  else
+  {
+    ATH_MSG_FATAL("Unknown RecommendationTag: "<<m_sRecommendationTag);
+    return StatusCode::FAILURE;
+  }
+
+  for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
+  {
+    ATH_CHECK((**it).setProperty("OutputLevel", this->msg().level()));
+    ATH_CHECK((**it).initialize());
+  }
+
+  // Add the affecting systematics to the global registry
+  CP::SystematicRegistry& registry = CP::SystematicRegistry::getInstance();
+  if (!registry.registerSystematics(*this))
+  {
+    ATH_MSG_ERROR ("Unable to register the systematics");
+    return StatusCode::FAILURE;
+  }
+
+  printConfig(/* bAlways = */ false);
+
+  return StatusCode::SUCCESS;
+}
+
+
+//______________________________________________________________________________
+StatusCode DiTauEfficiencyCorrectionsTool::beginEvent()
+{
+  if (!m_bIsConfigured)
+  {
+    const xAOD::EventInfo* xEventInfo = nullptr;
+    ATH_CHECK(evtStore()->retrieve(xEventInfo,"EventInfo"));
+    m_bIsData = !(xEventInfo->eventType( xAOD::EventInfo::IS_SIMULATION));
+    m_bIsConfigured=true;
+  }
+
+  if (m_bIsData)
+    return StatusCode::SUCCESS;
+
+  return StatusCode::SUCCESS;
+}
+
+
+//______________________________________________________________________________
+void DiTauEfficiencyCorrectionsTool::printConfig(bool bAlways)
+{
+  if (bAlways)
+  {
+    ATH_MSG_DEBUG( "DiTauEfficiencyCorrectionsTool with name " << name() << " is configured as follows:" );
+    for (auto iEfficiencyCorrectionType : m_vEfficiencyCorrectionTypes)
+      ATH_MSG_ALWAYS( "  EfficiencyCorrectionTypes " << iEfficiencyCorrectionType );
+    ATH_MSG_ALWAYS( "  InputFilePathRecoHadTau " << m_sInputFilePathRecoHadTau );
+    ATH_MSG_ALWAYS( "  InputFilePathJetIDHadTau " << m_sInputFilePathJetIDHadTau );
+    ATH_MSG_ALWAYS( "  VarNameRecoHadTau " << m_sVarNameRecoHadTau );
+    ATH_MSG_ALWAYS( "  VarNameJetIDHadTau " << m_sVarNameJetIDHadTau );
+    ATH_MSG_ALWAYS( "  RecommendationTag " << m_sRecommendationTag );
+  }
+  else
+  {
+    ATH_MSG_DEBUG( "DiTauEfficiencyCorrectionsTool with name " << name() << " is configured as follows:" );
+    for (auto iEfficiencyCorrectionType : m_vEfficiencyCorrectionTypes)
+      ATH_MSG_DEBUG( "  EfficiencyCorrectionTypes " << iEfficiencyCorrectionType );
+    ATH_MSG_DEBUG( "  InputFilePathRecoHadTau " << m_sInputFilePathRecoHadTau );
+    ATH_MSG_DEBUG( "  VarNameRecoHadTau " << m_sVarNameRecoHadTau );
+    ATH_MSG_DEBUG( "  VarNameJetIDHadTau " << m_sVarNameJetIDHadTau );
+    ATH_MSG_DEBUG( "  RecommendationTag " << m_sRecommendationTag );
+  }
+}
+
+//______________________________________________________________________________
+CP::CorrectionCode DiTauEfficiencyCorrectionsTool::getEfficiencyScaleFactor( const xAOD::DiTauJet& xDiTau,
+    double& eff )
+{
+  eff = 1.;
+
+  if (m_bIsData)
+    return CP::CorrectionCode::Ok;
+
+  for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
+  {
+    double dToolEff = 1.;
+    CP::CorrectionCode tmpCorrectionCode = (**it)->getEfficiencyScaleFactor(xDiTau, dToolEff);
+    if (tmpCorrectionCode != CP::CorrectionCode::Ok)
+      return tmpCorrectionCode;
+    eff *= dToolEff;
+  }
+  return CP::CorrectionCode::Ok;
+}
+
+//______________________________________________________________________________
+CP::CorrectionCode DiTauEfficiencyCorrectionsTool::applyEfficiencyScaleFactor( const xAOD::DiTauJet& xDiTau )
+{
+  if (m_bIsData)
+    return CP::CorrectionCode::Ok;
+
+  for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
+  {
+    CP::CorrectionCode tmpCorrectionCode = (**it)->applyEfficiencyScaleFactor(xDiTau);
+    if (tmpCorrectionCode != CP::CorrectionCode::Ok)
+    {
+      return tmpCorrectionCode;
+    }
+  }
+  return CP::CorrectionCode::Ok;
+}
+
+/// returns: whether this tool is affected by the given systematis
+//______________________________________________________________________________
+bool DiTauEfficiencyCorrectionsTool::isAffectedBySystematic( const CP::SystematicVariation& systematic ) const
+{
+  for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
+    if ((**it)->isAffectedBySystematic(systematic))
+      return true;
+  return false;
+}
+
+/// returns: the list of all systematics this tool can be affected by
+//______________________________________________________________________________
+CP::SystematicSet DiTauEfficiencyCorrectionsTool::affectingSystematics() const
+{
+  CP::SystematicSet sAffectingSystematics;
+  for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
+    sAffectingSystematics.insert((**it)->affectingSystematics());
+  return sAffectingSystematics;
+}
+
+/// returns: the list of all systematics this tool recommends to use
+//______________________________________________________________________________
+CP::SystematicSet DiTauEfficiencyCorrectionsTool::recommendedSystematics() const
+{
+  CP::SystematicSet sRecommendedSystematics;
+  for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
+  {
+    sRecommendedSystematics.insert((**it)->recommendedSystematics());
+  }
+  return sRecommendedSystematics;
+}
+
+//______________________________________________________________________________
+CP::SystematicCode DiTauEfficiencyCorrectionsTool::applySystematicVariation ( const CP::SystematicSet& sSystematicSet)
+{
+  for (auto it = m_vCommonEfficiencyTools.begin(); it != m_vCommonEfficiencyTools.end(); it++)
+    if ((**it)->applySystematicVariation(sSystematicSet) == CP::SystematicCode::Unsupported)
+    {
+      return CP::SystematicCode::Unsupported;
+    }
+  return CP::SystematicCode::Ok;
+}
+
+//=================================PRIVATE-PART=================================
+
+//______________________________________________________________________________
+StatusCode DiTauEfficiencyCorrectionsTool::initializeTools_2017_moriond()
+{
+  std::string sDirectory = "TauAnalysisTools/"+std::string(sSharedFilesVersion)+"/EfficiencyCorrections/";
+  for (auto iEfficiencyCorrectionType : m_vEfficiencyCorrectionTypes)
+  {
+    if (iEfficiencyCorrectionType == SFJetIDHadTau)
+    {
+      // only set vars if they differ from "", which means they have been configured by the user
+      if (m_sInputFilePathJetIDHadTau.empty()) m_sInputFilePathJetIDHadTau = sDirectory+"JetID_TrueHadDiTau_2017-prerec.root";
+      if (m_sVarNameJetIDHadTau.length() == 0) m_sVarNameJetIDHadTau = "DiTauScaleFactorJetIDHadTau";
+
+      asg::AnaToolHandle<IDiTauEfficiencyCorrectionsTool>* tTool = new asg::AnaToolHandle<IDiTauEfficiencyCorrectionsTool>("JetIDHadTauTool", this);
+      m_vCommonEfficiencyTools.push_back(tTool);
+      ATH_CHECK(ASG_MAKE_ANA_TOOL(*tTool, TauAnalysisTools::CommonDiTauEfficiencyTool));
+      ATH_CHECK(tTool->setProperty("InputFilePath", m_sInputFilePathJetIDHadTau));
+      ATH_CHECK(tTool->setProperty("VarName", m_sVarNameJetIDHadTau));
+      ATH_CHECK(tTool->setProperty("SkipTruthMatchCheck", m_bSkipTruthMatchCheck));
+      ATH_CHECK(tTool->setProperty("WP", ConvertJetIDToString(m_iIDLevel)));
+    }
+    else
+    {
+      ATH_MSG_WARNING("unsupported EfficiencyCorrectionsType with enum "<<iEfficiencyCorrectionType);
+    }
+  }
+  return StatusCode::SUCCESS;
+}
+
+//______________________________________________________________________________
+std::string DiTauEfficiencyCorrectionsTool::ConvertJetIDToString(const int& iLevel)
+{
+  switch(iLevel)
+  {
+  case JETIDNONE:
+    return "none";
+    break;
+  case JETIDBDTLOOSE:
+    return "jetbdtsigloose";
+    break;
+  case JETIDBDTMEDIUM:
+    return "jetbdtsigmedium";
+    break;
+  case JETIDBDTTIGHT:
+    return "jetbdtsigtight";
+    break;
+  case JETIDBDTOTHER:
+    return "jetbdtsigother";
+    break;
+  case JETIDLLHLOOSE:
+    return "taujllhloose";
+    break;
+  case JETIDLLHMEDIUM:
+    return "taujllhmedium";
+    break;
+  case JETIDLLHTIGHT:
+    return "taujllhtight";
+    break;
+  case JETIDLLHFAIL:
+    return "taujllh";
+    break;
+  case JETIDBDTFAIL:
+    return "jetbdtsig";
+    break;
+  default:
+    assert(false && "No valid ID level passed. Breaking up ...");
+    break;
+  }
+  return "";
+}
+
+
+} // namespace TauAnalysisTools
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/DiTauTruthMatchingTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/DiTauTruthMatchingTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..f3833b4721e63f84e114ada2025fa1225cf0021a
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/DiTauTruthMatchingTool.cxx
@@ -0,0 +1,280 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// Local include(s)
+#include "TauAnalysisTools/DiTauTruthMatchingTool.h"
+
+// Core include(s):
+#include "AthLinks/ElementLink.h"
+#include "TruthUtils/PIDHelpers.h"
+
+// EDM include(s):
+// #include "xAODTau/TauxAODHelpers.h"
+
+using namespace TauAnalysisTools;
+
+//=================================PUBLIC-PART==================================
+//______________________________________________________________________________
+DiTauTruthMatchingTool::DiTauTruthMatchingTool( const std::string& name )
+  : BuildTruthTaus(name)
+  , m_accPtVis("pt_vis")
+  , m_accEtaVis("eta_vis")
+  , m_accPhiVis("phi_vis")
+  , m_accMVis("m_vis")
+{
+  declareProperty( "MaxDeltaR", m_dMaxDeltaR = .2);
+}
+
+//______________________________________________________________________________
+DiTauTruthMatchingTool::~DiTauTruthMatchingTool( )
+{
+
+}
+
+//______________________________________________________________________________
+StatusCode DiTauTruthMatchingTool::initialize()
+{
+  ATH_MSG_INFO( "Initializing DiTauTruthMatchingTool" );
+  if (DiTauTruthMatchingTool::BuildTruthTaus::initialize().isFailure())
+  {
+    ATH_MSG_FATAL("Failed initializing BuildTruthTaus");
+    return StatusCode::FAILURE;
+  };
+  return StatusCode::SUCCESS;
+}
+
+//______________________________________________________________________________
+void DiTauTruthMatchingTool::getTruth(const xAOD::DiTauJet& xDiTau)
+{
+  if (m_bIsData)
+    return;
+
+  if (retrieveTruthTaus().isFailure())
+    return;
+
+  if (findTruthTau(xDiTau).isFailure())
+    ATH_MSG_WARNING("There was a failure in finding the matched truth tau");
+
+  return;
+}
+
+//______________________________________________________________________________
+void DiTauTruthMatchingTool::applyTruthMatch(const xAOD::DiTauJet& xDiTau)
+{
+  // this function only exists to have the same interface functions like 
+  // TauTruthMatchingTool
+  getTruth(xDiTau);
+  return;
+}
+
+//______________________________________________________________________________
+void DiTauTruthMatchingTool::applyTruthMatch(const std::vector<const xAOD::DiTauJet*>& vDiTaus)
+{
+  for (auto xDiTau : vDiTaus)
+    getTruth(*xDiTau);
+  return;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+//                                 Private Part                               //
+////////////////////////////////////////////////////////////////////////////////
+
+//______________________________________________________________________________
+StatusCode DiTauTruthMatchingTool::findTruthTau(const xAOD::DiTauJet& xDiTau)
+{
+  // check if decorations were already added to the first passed tau
+  if (!m_bIsTruthMatchedAvailableChecked)
+  {
+    m_bIsTruthMatchedAvailable = xDiTau.isAvailable<char>("IsTruthMatched");
+    m_bIsTruthMatchedAvailableChecked = true;
+    if (m_bIsTruthMatchedAvailable)
+    {
+      ATH_MSG_DEBUG("IsTruthMatched decoration is available on first tau processed, switched of rerun for further taus.");
+      ATH_MSG_DEBUG("If a truth matching needs to be redone, please pass a shallow copy of the original tau.");
+    }
+  }
+  if (m_bIsTruthMatchedAvailable)
+    return StatusCode::SUCCESS;
+
+  if (m_bTruthTauAvailable)
+    return checkTruthMatch(xDiTau, *m_xTruthTauContainerConst);
+  else
+    return checkTruthMatch(xDiTau, *m_xTruthTauContainer);
+}
+
+//______________________________________________________________________________
+StatusCode DiTauTruthMatchingTool::checkTruthMatch (const xAOD::DiTauJet& xDiTau, const xAOD::TruthParticleContainer& xTruthTauContainer) const
+{
+  std::vector<const xAOD::TruthParticle*> vTruthMatch;
+  std::vector<TruthMatchedParticleType> vTruthMatchedParticleType;
+
+  xAOD::TruthParticleContainer xRemainingTruthTaus = xTruthTauContainer;
+
+  static SG::AuxElement::Decorator<char> decIsTruthMatched("IsTruthMatched");
+  static SG::AuxElement::Decorator<char> decIsTruthHadronic("IsTruthHadronic");
+  static SG::AuxElement::ConstAccessor<int> accNSubjets("n_subjets");
+
+  // set default values for each subjet
+  for (int i = 0; i < accNSubjets(xDiTau); ++i)
+  {
+    const xAOD::TruthParticle* xTruthMatch = 0;
+    TruthMatchedParticleType eTruthMatchedParticleType = Unknown;
+
+    vTruthMatch.push_back(xTruthMatch);
+    vTruthMatchedParticleType.push_back(eTruthMatchedParticleType);
+  }
+
+  for (int i = 0; i < accNSubjets(xDiTau); ++i)
+  {
+    TLorentzVector vSubjetTLV;
+    vSubjetTLV.SetPtEtaPhiE(xDiTau.subjetPt(i),
+                        xDiTau.subjetEta(i),
+                        xDiTau.subjetPhi(i),
+                        xDiTau.subjetE(i));
+    if ( truthMatch(vSubjetTLV,
+                    xRemainingTruthTaus,
+                    vTruthMatch.at(i),
+                    vTruthMatchedParticleType.at(i)).isFailure() )
+    {
+      ATH_MSG_WARNING("There was a failure in matching truth taus with subjet " << i);
+      return StatusCode::FAILURE;
+    }
+    if (vTruthMatch.at(i) && 
+       (vTruthMatchedParticleType.at(i) == TruthHadronicTau || vTruthMatchedParticleType.at(i) == TruthLeptonicTau))
+    {
+      xRemainingTruthTaus.erase( std::find(xRemainingTruthTaus.begin(),
+                                           xRemainingTruthTaus.end(),
+                                           vTruthMatch.at(i)) );
+    }
+  }
+
+  // the ditau candidate should have at least 2 subjets to be truth matched
+  if ( accNSubjets(xDiTau) < 2) {
+    decIsTruthMatched(xDiTau) = (char)false;
+    decIsTruthHadronic(xDiTau) = (char)false;
+    return StatusCode::SUCCESS;;
+  }
+
+  bool bTruthMatched = true;
+
+  // create link to the original TruthParticle
+  std::vector< ElementLink < xAOD::TruthParticleContainer > > vTruthLinks;
+  for (int i = 0; i < accNSubjets(xDiTau); ++i)
+  {
+    const xAOD::TruthParticle* xTruthMatch = vTruthMatch.at(i);
+    TruthMatchedParticleType eTruthMatchedParticleType = vTruthMatchedParticleType.at(i);
+    if (xTruthMatch)
+    {
+      if (eTruthMatchedParticleType == TruthHadronicTau or eTruthMatchedParticleType == TruthLeptonicTau)
+      {
+        ElementLink < xAOD::TruthParticleContainer > lTruthParticleLink(xTruthMatch, xTruthTauContainer);
+        vTruthLinks.push_back(lTruthParticleLink);  
+      }
+      else if (eTruthMatchedParticleType == TruthMuon)
+      {
+        ElementLink <xAOD::TruthParticleContainer> lTruthParticleLink(xTruthMatch, *m_xTruthMuonContainerConst);
+        vTruthLinks.push_back(lTruthParticleLink);
+      }
+      else if (eTruthMatchedParticleType  == TruthElectron)
+      {
+        ElementLink <xAOD::TruthParticleContainer> lTruthParticleLink(xTruthMatch, *m_xTruthElectronContainerConst);
+        vTruthLinks.push_back(lTruthParticleLink);
+      }
+    }
+    else
+    {
+      ElementLink < xAOD::TruthParticleContainer > lTruthParticleLink;
+      vTruthLinks.push_back(lTruthParticleLink);  
+
+      // ditau is not truth matched if one of the two leading subjets is not truth matched
+      if (i == 0 || i == 1) bTruthMatched = false;
+    }
+  }
+
+  xDiTau.auxdecor<std::vector<ElementLink<xAOD::TruthParticleContainer>>>("truthParticleLinks") = vTruthLinks;
+  if (!m_bTruthTauAvailable)
+  {
+    xDiTau.auxdecor<std::vector<ElementLink<xAOD::TruthParticleContainer>>>("TruthTaus") = vTruthLinks;
+  }
+
+  decIsTruthMatched(xDiTau) = (char)bTruthMatched;
+  if (bTruthMatched)
+  {
+    // ditau is hadronic if two leading subjets are truth matched with hadronic decay
+    decIsTruthHadronic(xDiTau) = (char)(vTruthMatchedParticleType[0]==TruthHadronicTau && vTruthMatchedParticleType[1]==TruthHadronicTau );
+  }
+  else 
+    decIsTruthHadronic(xDiTau) = (char)false;
+
+  return StatusCode::SUCCESS;
+}
+
+
+//______________________________________________________________________________
+StatusCode DiTauTruthMatchingTool::truthMatch(const TLorentzVector& vSubjetTLV,
+                                              const xAOD::TruthParticleContainer& xTruthTauContainer,
+                                              const xAOD::TruthParticle* &xTruthMatch,
+                                              TruthMatchedParticleType &eTruthMatchedParticleType) const
+{
+
+  double dPtMax = 0;
+  for (auto xTruthTauIt : xTruthTauContainer)
+  {
+    TLorentzVector vTruthVisTLV;
+    vTruthVisTLV.SetPtEtaPhiM(m_accPtVis(*xTruthTauIt),
+                              m_accEtaVis(*xTruthTauIt),
+                              m_accPhiVis(*xTruthTauIt),
+                              m_accMVis(*xTruthTauIt));
+    if (vSubjetTLV.DeltaR(vTruthVisTLV) <= m_dMaxDeltaR)
+    {
+      if (vTruthVisTLV.Pt()<dPtMax)
+        continue;
+      static SG::AuxElement::ConstAccessor<char> accIsHadronicTau("IsHadronicTau");
+      if ((bool)accIsHadronicTau(*xTruthTauIt))
+        eTruthMatchedParticleType = TruthHadronicTau;
+      else
+        eTruthMatchedParticleType = TruthLeptonicTau;
+
+      xTruthMatch = xTruthTauIt;
+      dPtMax = vTruthVisTLV.Pt();
+      break;
+    }
+  }
+
+  if (!xTruthMatch and m_xTruthMuonContainerConst)
+  {
+    double dPtMax = 0;
+    for (auto xTruthMuonIt : *m_xTruthMuonContainerConst)
+    {
+      if (vSubjetTLV.DeltaR(xTruthMuonIt->p4()) <= m_dMaxDeltaR)
+      {
+        if (xTruthMuonIt->pt()<dPtMax)
+          continue;
+        eTruthMatchedParticleType = TruthMuon;
+
+        xTruthMatch = xTruthMuonIt;
+        dPtMax = xTruthMuonIt->pt();
+      }
+    }
+  }
+
+  if (!xTruthMatch and m_xTruthElectronContainerConst)
+  {
+    double dPtMax = 0;
+    for (auto xTruthElectronIt : *m_xTruthElectronContainerConst)
+    {
+      if (vSubjetTLV.DeltaR(xTruthElectronIt->p4()) <= m_dMaxDeltaR)
+      {
+        if (xTruthElectronIt->pt()<dPtMax)
+          continue;
+        eTruthMatchedParticleType = TruthElectron;
+        xTruthMatch = xTruthElectronIt;
+        dPtMax = xTruthElectronIt->pt();
+      }
+    }
+  }
+
+  return StatusCode::SUCCESS;
+}
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx
index 0add7809a8e3c6b518b53cee5cef43cf69f32d7c..150b6a2d3f0198530d324a1ec891b282d4867511 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx
@@ -6,6 +6,7 @@
 
 // local include(s)
 #include "TauAnalysisTools/HelperFunctions.h"
+#include "TF1.h"
 
 #ifdef XAODTAU_VERSIONS_TAUJET_V3_H
 xAOD::TauJetParameters::PanTauDetails PANTAU_DECAYMODE=xAOD::TauJetParameters::PanTau_DecayMode;
@@ -230,7 +231,7 @@ void TauAnalysisTools::createPi0Vectors(const xAOD::TauJet* xTau, std::vector<TL
     vPi0s.push_back(xPfo->p4());
 
     // re-set the mass back to one pi0:
-    double dNewMomentum = std::sqrt(vPi0s[0].E() * vPi0s[0].E() - vPi0s[0].M() / 2. * vPi0s[0].M() / 2.);
+    double dNewMomentum = std::sqrt(vPi0s[0].E() / 2 * vPi0s[0].E() / 2 - vPi0s[0].M() / 2. * vPi0s[0].M() / 2.);
     vPi0s[0].SetVectM(vPi0s[0].Vect() * (dNewMomentum / vPi0s[0].P()), vPi0s[0].M() / 2.);
 
     // create another pi0 from the same vector:
@@ -246,3 +247,132 @@ void TauAnalysisTools::createPi0Vectors(const xAOD::TauJet* xTau, std::vector<TL
   }
 }
 
+
+//______________________________________________________________________________
+void TauAnalysisTools::correctedPi0Vectors(const xAOD::TauJet* xTau, std::vector<TLorentzVector>& correctedPi0s, TLorentzVector& TauP4){
+  //reset the pi0s
+  correctedPi0s.clear();
+
+  int iDecayMode = -1;  
+  xTau->panTauDetail(PANTAU_DECAYMODE, iDecayMode);
+
+  if (!(xTau->panTauDetail(PANTAU_DECAYMODE, iDecayMode)))
+  {
+    std::cerr <<"Failed to retrieve panTauDetail decay mode\n";
+    return;
+  }
+
+  //Reading in the pi0 vector from createPi0Vectors
+  std::vector<TLorentzVector> vPi0s;
+  createPi0Vectors(xTau,vPi0s);
+
+  if(iDecayMode == xAOD::TauJetParameters::DecayMode::Mode_1p1n || iDecayMode == xAOD::TauJetParameters::DecayMode::Mode_1pXn || iDecayMode == xAOD::TauJetParameters::DecayMode::Mode_3pXn){  
+    //Adding up Pi0 P4s from createPi0Vectors
+    TLorentzVector Sum_vPi0s;
+    for(unsigned int i = 0; i < vPi0s.size() ; i++){
+      Sum_vPi0s += vPi0s[i];
+    }
+    
+    //Get sum of the chargedPFOP4s
+    TLorentzVector Sum_ChrgPFOP4;
+    std::vector< ElementLink< xAOD::PFOContainer > > finalChrgPFOLinks = xTau->chargedPFOLinks();
+    unsigned int NCharged    = finalChrgPFOLinks.size();
+    for(unsigned int iPFO=0; iPFO<NCharged; iPFO++) {
+      const xAOD::PFO* pfo = finalChrgPFOLinks.at(iPFO).cachedElement();
+      Sum_ChrgPFOP4 += pfo->p4();
+    }
+    
+    //Get tau FinalCalib P4
+    TLorentzVector FinalCalibP4;
+    FinalCalibP4.SetPtEtaPhiM( xTau->auxdata<float>("ptFinalCalib") ,xTau->auxdata<float>("etaFinalCalib") ,xTau->auxdata<float>("phiFinalCalib") ,xTau->auxdata<float>("mFinalCalib") );
+    
+    //Calculate the difference 3-vector between FinalCalib and Sum of chargedPFOP4
+    double px = FinalCalibP4.Px() - Sum_ChrgPFOP4.Px();
+    double py = FinalCalibP4.Py() - Sum_ChrgPFOP4.Py();
+    double pz = FinalCalibP4.Pz() - Sum_ChrgPFOP4.Pz();
+
+    double p_correctedPi0s = sqrt( pow(px,2.) + pow(py,2.) + pow(pz,2.) );
+    double p_vPi0s = Sum_vPi0s.P();
+
+    //Calucate scale factor for the pi0 3-vector momentum
+    double X;
+    X = p_correctedPi0s/p_vPi0s;
+
+    //Scale the pi0s with X and recalculate the new pi0 energy
+    double px_scaled, py_scaled, pz_scaled, e;
+    double mPi0 = 134.977;
+    for(unsigned int i = 0; i < vPi0s.size() ; i++){
+      px_scaled = vPi0s[i].Px() * X;
+      py_scaled = vPi0s[i].Py() * X;
+      pz_scaled = vPi0s[i].Pz() * X;
+      e = sqrt( pow(px_scaled,2.) + pow(py_scaled,2.) + pow(pz_scaled,2.) + pow(mPi0,2.) );
+
+      //Append the corrected pi0P4 to correctedPi0s
+      TLorentzVector P4_correctedPi0s;
+      P4_correctedPi0s.SetPxPyPzE(px_scaled,py_scaled,pz_scaled,e);
+      correctedPi0s.push_back(P4_correctedPi0s);
+    }
+  }else{
+    correctedPi0s = vPi0s;
+  }
+
+  //Correct angles between pi0s for 1pXn decays with 1 cluster
+  if(iDecayMode == xAOD::TauJetParameters::DecayMode::Mode_1pXn && xTau->nPi0PFOs() == 1){
+
+    //Get Function of Delta R between the two Pi0s
+    TF1 DeltaRdist;
+    DeltaRdist = TF1("DeltaRdist", "pol3", 0, 67500);
+    DeltaRdist.SetParameter(0, 0.07924);
+    DeltaRdist.SetParameter(1, -2.078/1000000.);
+    DeltaRdist.SetParameter(2,  2.619/100000000000.);
+    DeltaRdist.SetParameter(3, -1.238/10000000000000000.);
+  
+    //Get Sum of pi0 P4.Pt()
+    TLorentzVector SumPi0_P4;
+    for( unsigned int i = 0 ; i < correctedPi0s.size() ; i++){
+      SumPi0_P4 += correctedPi0s[i];
+    }
+
+    float SumPi0_pt = SumPi0_P4.Pt();
+
+    //Get delta R value (mean of true DeltaR distribution)
+    float deltaR;
+    if(SumPi0_pt >= 67500){
+      deltaR = 0.020; // = DeltaRdist.Eval(67500);
+    } else{
+      deltaR = DeltaRdist.Eval(SumPi0_pt);
+    }
+
+    TLorentzVector correctedPi0_0, correctedPi0_1;
+    correctedPi0_0.SetPtEtaPhiM( correctedPi0s[0].Pt()/cos(0.5*deltaR/sqrt(2.0)), correctedPi0s[0].Eta()+0.5*deltaR/sqrt(2.0), correctedPi0s[0].Phi()+0.5*deltaR/sqrt(2.0), correctedPi0s[0].M() );
+    correctedPi0_1.SetPtEtaPhiM( correctedPi0s[1].Pt()/cos(0.5*deltaR/sqrt(2.0)), correctedPi0s[1].Eta()-0.5*deltaR/sqrt(2.0), correctedPi0s[1].Phi()-0.5*deltaR/sqrt(2.0), correctedPi0s[1].M() );
+
+    std::vector<TLorentzVector> AngleCorrectedPi0s;
+    AngleCorrectedPi0s.push_back(correctedPi0_0);
+    AngleCorrectedPi0s.push_back(correctedPi0_1);
+
+    //Reparametrise: Delta R -> mass of pi0 Cluster
+    TLorentzVector PionCluster_angleCorrected = AngleCorrectedPi0s[0]+AngleCorrectedPi0s[1];
+    
+    double dNewMomentum = std::sqrt(PionCluster_angleCorrected.E()/2 * PionCluster_angleCorrected.E()/2 - PionCluster_angleCorrected.M() / 2. * PionCluster_angleCorrected.M() / 2.);
+    correctedPi0s[0].SetVectM(PionCluster_angleCorrected.Vect() * (dNewMomentum / PionCluster_angleCorrected.P()), PionCluster_angleCorrected.M() / 2.);
+    correctedPi0s[1] = correctedPi0s[0];
+  }
+
+
+
+  //Calculate the new tau P4
+  std::vector< ElementLink< xAOD::PFOContainer > > finalChrgPFOLinks = xTau->chargedPFOLinks();
+  TLorentzVector SumChargedPionP4;
+  for(unsigned int iPFO=0; iPFO < finalChrgPFOLinks.size(); iPFO++) {
+    const xAOD::PFO* pfo = finalChrgPFOLinks.at(iPFO).cachedElement();
+    TauP4 += pfo->p4();
+  }
+
+  for(unsigned int iPi0=0; iPi0 < correctedPi0s.size(); iPi0++) {
+    TauP4 += correctedPi0s[iPi0];
+  }
+
+
+}
+
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx
index ace5aece68258503a4a1f9d9c05864789147ef56..56f1c3e55a223427cf93007aaf74b02a6f195ff6 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/SelectionCuts.cxx
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 
 // local include(s)
 #include "TauAnalysisTools/SelectionCuts.h"
@@ -340,6 +341,20 @@ bool SelectionCutJetIDWP::accept(const xAOD::TauJet& xTau)
   default:
     m_tTST->msg() << MSG::WARNING << "The jet ID working point with the enum "<<m_tTST->m_iJetIDWP<<" is not available" << endmsg;
     break;
+// #ifdef XAODTAU_VERSIONS_TAUJET_V3_H
+//   case JETIDBDTVERYLOOSE:
+//     if (xTau.isTau(xAOD::TauJetParameters::JetBDTSigVeryLoose)) bPass = true;
+//     break;
+//   case JETBDTBKGLOOSE:
+//     if (xTau.isTau(xAOD::TauJetParameters::JetBDTBkgLoose)) bPass = true;
+//     break;
+//   case JETBDTBKGMEDIUM:
+//     if (xTau.isTau(xAOD::TauJetParameters::JetBDTBkgMedium)) bPass = true;
+//     break;
+//   case JETBDTBKGTIGHT:
+//     if (xTau.isTau(xAOD::TauJetParameters::JetBDTBkgTight)) bPass = true;
+//     break;
+// #endif
   }
   if (bPass)
   {
@@ -458,7 +473,7 @@ bool SelectionCutEleBDTWP::accept(const xAOD::TauJet& xTau)
     if (fEleBDTScore > 0.15) bPass = true;
     break;
   default:
-    m_tTST->msg() << MSG::WARNING << "The electron ID working point with the enum "<<m_tTST->m_iJetIDWP<<" is not available" << endmsg;
+    m_tTST->msg() << MSG::WARNING << "The electron ID working point with the enum "<<m_tTST->m_iEleBDTWP<<" is not available" << endmsg;
     break;
   }
   if (bPass)
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx
index 9e9ef13a802c64936007232abf18e3ab079acfc7..a3dffb162b5d486a12070ba38d69f8d3874d8db5 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauEfficiencyCorrectionsTool.cxx
@@ -48,6 +48,7 @@ TauEfficiencyCorrectionsTool::TauEfficiencyCorrectionsTool( const std::string& s
   declareProperty( "RecommendationTag",            m_sRecommendationTag            = "2017-moriond" );
   declareProperty( "TriggerName",                  m_sTriggerName                  = "" );
   declareProperty( "TriggerYear",                  m_sTriggerYear                  = "2016" );
+  declareProperty( "TriggerSFMeasurement",         m_sTriggerSFMeasurement         = "combined" ); // "combined", "Ztauttau" or "ttbar"
 
   declareProperty( "UseIDExclusiveSF",             m_bUseIDExclusiveSF             = false );
   declareProperty( "UseInclusiveEta",              m_bUseInclusiveEta              = false );
@@ -534,7 +535,21 @@ StatusCode TauEfficiencyCorrectionsTool::initializeTools_2017_moriond()
         if (m_sInputFilePathTriggerHadTau.empty())
         {
           if (m_sTriggerName.empty()) ATH_MSG_FATAL("Property \"Trigger\" was not set, please provide a trigger name.");
-          if (m_bUseTriggerInclusiveEta) m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/Trigger_TrueHadTau_2016-fall_data"+m_sTriggerYear+"_"+m_sTriggerName+"_etainc.root";
+          if (m_bUseTriggerInclusiveEta) 
+          {
+            if (m_sTriggerYear == "2015")
+              m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/Trigger_TrueHadTau_2017-moriond_data2015_"+m_sTriggerName+"_etainc.root";
+            else if (m_sTriggerYear == "2016")
+            {
+              m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/Trigger_TrueHadTau_2017-moriond_data2016"+GetTriggerSFMeasrementString()+m_sTriggerName+"_etainc.root";
+            }
+            else if (m_sTriggerYear == "2017")
+            {
+              m_sInputFilePathTriggerHadTau = sDirectory+"Trigger/Trigger_TrueHadTau_2017-moriond_data2017"+GetTriggerSFMeasrementString()+m_sTriggerName+"_etainc.root";
+            }
+            else 
+              ATH_MSG_ERROR("trigger recommendations are only provided for year 2015, 2016 and 2017. Please set property \"TriggerYear\" accordingly.");
+          }
           else
           {
             ATH_MSG_ERROR("eta exclusive scale factors not available");
@@ -557,6 +572,7 @@ StatusCode TauEfficiencyCorrectionsTool::initializeTools_2017_moriond()
       {
         if (m_sVarNameTriggerHadTau.length() == 0) m_sVarNameTriggerHadTau = "TauScaleFactorTriggerHadTau";
 
+        // 2015 data
         std::string sInputFilePathTriggerHadTau("");
         if (m_sTriggerName != "HLT_tau160_medium1_tracktwo")
         {
@@ -564,7 +580,7 @@ StatusCode TauEfficiencyCorrectionsTool::initializeTools_2017_moriond()
           if (m_sInputFilePathTriggerHadTau.empty())
           {
             if (m_sTriggerName.empty()) ATH_MSG_FATAL("Property \"Trigger\" was not set, please provide a trigger name.");
-            if (m_bUseTriggerInclusiveEta) sInputFilePathTriggerHadTau = sDirectory+"Trigger/Trigger_TrueHadTau_2016-fall_data2015_"+m_sTriggerName+"_etainc.root";
+            if (m_bUseTriggerInclusiveEta) sInputFilePathTriggerHadTau = sDirectory+"Trigger/Trigger_TrueHadTau_2017-moriond_data2015_"+m_sTriggerName+"_etainc.root";
             else
             {
               ATH_MSG_ERROR("eta exclusive scale factors not available");
@@ -585,10 +601,11 @@ StatusCode TauEfficiencyCorrectionsTool::initializeTools_2017_moriond()
           ATH_CHECK(tTool_2015->setProperty("MaxRunNumber", 284484));
         }
 
+        // 2016 data
         if (m_sInputFilePathTriggerHadTau.empty())
         {
           if (m_sTriggerName.empty()) ATH_MSG_FATAL("Property \"Trigger\" was not set, please provide a trigger name.");
-          if (m_bUseTriggerInclusiveEta) sInputFilePathTriggerHadTau = sDirectory+"Trigger/Trigger_TrueHadTau_2016-fall_data2016_"+m_sTriggerName+"_etainc.root";
+          if (m_bUseTriggerInclusiveEta) sInputFilePathTriggerHadTau = sDirectory+"Trigger/Trigger_TrueHadTau_2017-moriond_data2016"+GetTriggerSFMeasrementString()+m_sTriggerName+"_etainc.root";
           else
           {
             ATH_MSG_ERROR("eta exclusive scale factors not available");
@@ -607,6 +624,31 @@ StatusCode TauEfficiencyCorrectionsTool::initializeTools_2017_moriond()
         ATH_CHECK(tTool_2016->setProperty("WP", ConvertTriggerIDToString(m_iIDLevel)));
         ATH_CHECK(tTool_2016->setProperty("PeriodBinning", (int)m_iTriggerPeriodBinning));
         ATH_CHECK(tTool_2016->setProperty("MinRunNumber", 296939));
+        ATH_CHECK(tTool_2016->setProperty("MaxRunNumber", 311481));
+
+        // 2017 data
+        if (m_sInputFilePathTriggerHadTau.empty())
+        {
+          if (m_sTriggerName.empty()) ATH_MSG_FATAL("Property \"Trigger\" was not set, please provide a trigger name.");
+          if (m_bUseTriggerInclusiveEta) sInputFilePathTriggerHadTau = sDirectory+"Trigger/Trigger_TrueHadTau_2017-moriond_data2017"+GetTriggerSFMeasrementString()+m_sTriggerName+"_etainc.root";
+          else
+          {
+            ATH_MSG_ERROR("eta exclusive scale factors not available");
+            return StatusCode::FAILURE;
+          }
+        }
+        else
+          sInputFilePathTriggerHadTau = m_sInputFilePathTriggerHadTau;
+
+        asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>* tTool_2017 = new asg::AnaToolHandle<ITauEfficiencyCorrectionsTool>("TriggerHadTauTool_2017", this);
+        m_vTriggerEfficiencyTools.push_back(tTool_2017);
+        ATH_CHECK(ASG_MAKE_ANA_TOOL(*tTool_2017, TauAnalysisTools::TauEfficiencyTriggerTool));
+        ATH_CHECK(tTool_2017->setProperty("InputFilePath", sInputFilePathTriggerHadTau));
+        ATH_CHECK(tTool_2017->setProperty("VarName", m_sVarNameTriggerHadTau));
+        ATH_CHECK(tTool_2017->setProperty("SkipTruthMatchCheck", m_bSkipTruthMatchCheck));
+        ATH_CHECK(tTool_2017->setProperty("WP", ConvertTriggerIDToString(m_iIDLevel)));
+        ATH_CHECK(tTool_2017->setProperty("PeriodBinning", (int)m_iTriggerPeriodBinning));
+        ATH_CHECK(tTool_2017->setProperty("MinRunNumber", 324320));
       }
     }
     else
@@ -1234,4 +1276,24 @@ std::string TauEfficiencyCorrectionsTool::ConvertTriggerIDToString(const int& iL
   return "";
 }
 
+//______________________________________________________________________________
+std::string TauEfficiencyCorrectionsTool::GetTriggerSFMeasrementString()
+{
+  std::string sMeasurement = "_comb_";
+
+  if (m_sTriggerSFMeasurement=="Ztautau")
+    sMeasurement = "_Ztt_";
+  else if (m_sTriggerSFMeasurement=="ttbar")
+    sMeasurement = "_ttbar_";
+  else if (m_sTriggerSFMeasurement!="combined")
+  {
+    ATH_MSG_WARNING("Trigger scale factor measurement \'" << m_sTriggerSFMeasurement << "\' is not known. \'combined\' is used instead.");
+  }
+
+  return sMeasurement;
+}
+
+
 } // namespace TauAnalysisTools
+
+
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauTruthMatchingTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauTruthMatchingTool.cxx
index 6b299ab916eb493eaff99935544dec342230a8f4..0833d8a5788ecd9ced7584cb83b85883078602f2 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauTruthMatchingTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/TauTruthMatchingTool.cxx
@@ -3,67 +3,27 @@
 */
 
 // Local include(s)
-#include <TauAnalysisTools/TauTruthMatchingTool.h>
+#include "TauAnalysisTools/TauTruthMatchingTool.h"
 
 // Core include(s):
 #include "AthLinks/ElementLink.h"
+#include "TruthUtils/PIDHelpers.h"
 
 // EDM include(s):
-#include "xAODTruth/TruthVertex.h"
-#include "xAODEventInfo/EventInfo.h"
-
-// Tool include(s)
-#include "MCTruthClassifier/MCTruthClassifier.h"
+#include "xAODTau/TauxAODHelpers.h"
 
 using namespace TauAnalysisTools;
 
 //=================================PUBLIC-PART==================================
 //______________________________________________________________________________
 TauTruthMatchingTool::TauTruthMatchingTool( const std::string& name )
-  : AsgMetadataTool(name)
-  , m_bIsData(false)
-  , m_bIsConfigured(false)
-  , m_xTruthParticleContainer(0)
-  , m_xTruthTauContainerConst(0)
-  , m_xTruthMuonContainerConst(0)
-  , m_xTruthElectronContainerConst(0)
-  , m_xTruthJetContainerConst(0)
-  , m_xTruthTauContainer(0)
-  , m_xTruthTauAuxContainer(0)
-  , m_sNewTruthTauContainerNameAux("TruthTausAux.")
-  , m_bTruthTauAvailable(true)
-  , m_bTruthMuonAvailable(true)
-  , m_bTruthElectronAvailable(true)
-  , m_bTruthJetAvailable(true)
-  , m_iNChargedPions(0)
-  , m_iNNeutralPions(0)
-  , m_iNChargedOthers(0)
-  , m_iNNeutralOthers(0)
-  , m_iNChargedDaughters(0)
-  , m_bIsHadronicTau(false)
-  , m_bIsTruthMatchedAvailable(false)
-  , m_bIsTruthMatchedAvailableChecked(false)
-  , m_bNewEvent(false)
+  : BuildTruthTaus(name)
   , m_accPtVis("pt_vis")
   , m_accEtaVis("eta_vis")
   , m_accPhiVis("phi_vis")
   , m_accMVis("m_vis")
-  , m_tMCTruthClassifier("MCTruthClassifierTool", this)
 {
   declareProperty( "MaxDeltaR", m_dMaxDeltaR = .2);
-  declareProperty( "WriteTruthTaus", m_bWriteTruthTaus = false);
-
-  // container names
-  declareProperty( "NewTruthTauContainerName", m_sNewTruthTauContainerName = "TruthTaus");
-  declareProperty( "TruthTauContainerName", m_sTruthTauContainerName = "TruthTaus");
-  declareProperty( "TruthMuonContainerName", m_sTruthMuonContainerName = "TruthMuons");
-  declareProperty( "TruthElectronContainerName", m_sTruthElectronContainerName = "TruthElectrons");
-  declareProperty( "TruthJetContainerName", m_sTruthJetContainerName = "AntiKt4TruthJets");
-  declareProperty( "TruthParticlesContainerName", m_sTruthParticlesContainerName = "TruthParticles");
-  declareProperty( "WriteInvisibleFourMomentum", m_bWriteInvisibleFourMomentum = false);
-  declareProperty( "WriteVisibleChargedFourMomentum", m_bWriteVisibleChargedFourMomentum = false);
-  declareProperty( "WriteVisibleNeutralFourMomentum", m_bWriteVisibleNeutralFourMomentum = false);
-  declareProperty( "WriteDecayModeVector", m_bWriteDecayModeVector = true);
 }
 
 //______________________________________________________________________________
@@ -76,100 +36,13 @@ TauTruthMatchingTool::~TauTruthMatchingTool( )
 StatusCode TauTruthMatchingTool::initialize()
 {
   ATH_MSG_INFO( "Initializing TauTruthMatchingTool" );
-  m_sNewTruthTauContainerNameAux = m_sNewTruthTauContainerName + "Aux.";
-
-  ATH_CHECK(ASG_MAKE_ANA_TOOL(m_tMCTruthClassifier, MCTruthClassifier));
-  ATH_CHECK(m_tMCTruthClassifier.initialize());
-  return StatusCode::SUCCESS;
-}
-
-//______________________________________________________________________________
-xAOD::TruthParticleContainer* TauTruthMatchingTool::getTruthTauContainer()
-{
-  if (m_bIsData)
-    return 0;
-  if (!m_bTruthTauAvailable)
-    return m_xTruthTauContainer;
-  else
+  if (TauTruthMatchingTool::BuildTruthTaus::initialize().isFailure())
   {
-    ATH_MSG_WARNING("TruthTau container was available from the event store and not rebuilt. Please get it from the event store");
-    return 0;
-  }
-}
-
-//______________________________________________________________________________
-xAOD::TruthParticleAuxContainer* TauTruthMatchingTool::getTruthTauAuxContainer()
-{
-  if (m_bIsData)
-    return 0;
-  if (!m_bTruthTauAvailable)
-    return m_xTruthTauAuxContainer;
-  else
-  {
-    ATH_MSG_WARNING("TruthTau auxiliary container was available from the event store and not rebuilt. Please get it from the event store");
-    return 0;
-  }
-}
-
-//______________________________________________________________________________
-const xAOD::TruthParticle* TauTruthMatchingTool::applyTruthMatch(const xAOD::TauJet& xTau)
-{
-  // this function only exists for historical reasons
-  return getTruth(xTau);
-}
-
-//______________________________________________________________________________
-std::vector<const xAOD::TruthParticle*> TauTruthMatchingTool::applyTruthMatch(const std::vector<const xAOD::TauJet*>& vTaus)
-{
-  std::vector<const xAOD::TruthParticle*> vTruths;
-  for (auto xTau : vTaus)
-    vTruths.push_back(getTruth(*xTau));
-  return vTruths;
-}
-
-//______________________________________________________________________________
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-StatusCode TauTruthMatchingTool::setTruthParticleContainer(const xAOD::TruthParticleContainer* xTruthParticleContainer)
-{
-  m_xTruthParticleContainer = xTruthParticleContainer;
-  // should be false by default, but better to be sure
-  m_bTruthTauAvailable = false;
-  return buildTruthTausFromTruthParticles();
-}
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
-
-//______________________________________________________________________________
-StatusCode TauTruthMatchingTool::beginEvent()
-{
-  m_bNewEvent = true;
-  if (m_bIsConfigured)
-    return StatusCode::SUCCESS;
-
-  const xAOD::EventInfo* xEventInfo = 0;
-  ATH_CHECK(evtStore()->retrieve(xEventInfo,"EventInfo"));
-  m_bIsData = !(xEventInfo->eventType( xAOD::EventInfo::IS_SIMULATION));
-  m_bIsConfigured=true;
-
-  return StatusCode::SUCCESS;
-}
-
-//______________________________________________________________________________
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-StatusCode TauTruthMatchingTool::initializeEvent()
-{
+    ATH_MSG_FATAL("Failed initializing BuildTruthTaus");
+    return StatusCode::FAILURE;
+  };
   return StatusCode::SUCCESS;
 }
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
 
 //______________________________________________________________________________
 const xAOD::TruthParticle* TauTruthMatchingTool::getTruth(const xAOD::TauJet& xTau)
@@ -201,6 +74,22 @@ const xAOD::TruthParticle* TauTruthMatchingTool::getTruth(const xAOD::TauJet& xT
   return nullptr;
 }
 
+//______________________________________________________________________________
+const xAOD::TruthParticle* TauTruthMatchingTool::applyTruthMatch(const xAOD::TauJet& xTau)
+{
+  // this function only exists for historical reasons
+  return getTruth(xTau);
+}
+
+//______________________________________________________________________________
+std::vector<const xAOD::TruthParticle*> TauTruthMatchingTool::applyTruthMatch(const std::vector<const xAOD::TauJet*>& vTaus)
+{
+  std::vector<const xAOD::TruthParticle*> vTruths;
+  for (auto xTau : vTaus)
+    vTruths.push_back(getTruth(*xTau));
+  return vTruths;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 //                              Wrapper functions                             //
 ////////////////////////////////////////////////////////////////////////////////
@@ -416,7 +305,7 @@ xAOD::TauJetParameters::DecayMode TauTruthMatchingTool::getDecayMode(const xAOD:
     return xAOD::TauJetParameters::Mode_Error;
   }
 
-  int iCharged = getNTauDecayParticles(xTruthTau,MC::PID::PIPLUS, true) + getNTauDecayParticles(xTruthTau,MC::PID::KPLUS, true);;
+  int iCharged = getNTauDecayParticles(xTruthTau,MC::PID::PIPLUS, true) + getNTauDecayParticles(xTruthTau,MC::PID::KPLUS, true);
   int iNeutral = getNTauDecayParticles(xTruthTau,MC::PID::PI0, true);
   if (iCharged == 1)
   {
@@ -439,9 +328,12 @@ xAOD::TauJetParameters::DecayMode TauTruthMatchingTool::getDecayMode(const xAOD:
   return xAOD::TauJetParameters::DecayMode::Mode_Error;
 }
 
-//=================================PRIVATE-PART=================================
+////////////////////////////////////////////////////////////////////////////////
+//                                 Private Part                               //
+////////////////////////////////////////////////////////////////////////////////
+
 //______________________________________________________________________________
-StatusCode TauTruthMatchingTool::findTruthTau(const xAOD::TauJet& xTau) const
+StatusCode TauTruthMatchingTool::findTruthTau(const xAOD::TauJet& xTau)
 {
   // check if decorations were already added to the first passed tau
   if (!m_bIsTruthMatchedAvailableChecked)
@@ -476,148 +368,15 @@ StatusCode TauTruthMatchingTool::findTruthTau(const xAOD::TauJet& xTau) const
   // return StatusCode::SUCCESS;
 }
 
-//______________________________________________________________________________
-StatusCode TauTruthMatchingTool::retrieveTruthTaus()
-{
-  if (m_bNewEvent)
-    m_bNewEvent = false;
-  else
-    return StatusCode::SUCCESS;
-
-  if ( m_bTruthTauAvailable )
-  {
-    if (evtStore()->contains<xAOD::TruthParticleContainer>(m_sTruthTauContainerName))
-      ATH_CHECK( evtStore()->retrieve(m_xTruthTauContainerConst,m_sTruthTauContainerName));
-    else
-    {
-      ATH_MSG_INFO("TruthTaus container with name " << m_sTruthTauContainerName << " is not available, will generate the container for each event from TruthParticles container");
-      m_bTruthTauAvailable = false;
-    }
-  }
-
-  if ( m_bTruthMuonAvailable )
-  {
-    if (evtStore()->contains<xAOD::TruthParticleContainer>(m_sTruthMuonContainerName))
-      ATH_CHECK(evtStore()->retrieve(m_xTruthMuonContainerConst,m_sTruthMuonContainerName));
-    else
-    {
-      ATH_MSG_INFO("TruthMuons container with name " << m_sTruthMuonContainerName << " is not available, won't perform matching to truth muons");
-      m_bTruthMuonAvailable = false;
-    }
-  }
-
-  if ( m_bTruthElectronAvailable )
-  {
-    if (evtStore()->contains<xAOD::TruthParticleContainer>(m_sTruthElectronContainerName))
-      ATH_CHECK(evtStore()->retrieve(m_xTruthElectronContainerConst,m_sTruthElectronContainerName));
-    else
-    {
-      ATH_MSG_INFO("TruthElectrons container with name " << m_sTruthElectronContainerName << " is not available, won't perform matching to truth electrons");
-      m_bTruthElectronAvailable = false;
-    }
-  }
-
-  if ( m_bTruthJetAvailable )
-  {
-    if (evtStore()->contains<xAOD::JetContainer>(m_sTruthJetContainerName))
-      ATH_CHECK(evtStore()->retrieve(m_xTruthJetContainerConst,m_sTruthJetContainerName));
-    else
-    {
-      ATH_MSG_INFO("TruthJets container with name " << m_sTruthJetContainerName << " is not available, won't perform matching to truth jets");
-      m_bTruthJetAvailable = false;
-    }
-  }
-
-  // go here if TruthTaus was not found in m_bTruthTauAvailable if-block
-  if ( !m_bTruthTauAvailable )
-  {
-    if (evtStore()->contains<xAOD::TruthParticleContainer>(m_sTruthParticlesContainerName))
-    {
-      if ( evtStore()->retrieve(m_xTruthParticleContainer,m_sTruthParticlesContainerName).isSuccess() )
-        return buildTruthTausFromTruthParticles();
-      else
-        return StatusCode::FAILURE;
-    }
-    else
-    {
-      ATH_MSG_FATAL("TruthParticles container is not available but needed for building truth taus");
-      return StatusCode::FAILURE;
-    }
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-//______________________________________________________________________________
-StatusCode TauTruthMatchingTool::buildTruthTausFromTruthParticles()
-{
-  if(m_xTruthTauContainer && !m_bWriteTruthTaus)
-  {
-    delete m_xTruthTauContainer;
-    delete m_xTruthTauAuxContainer;
-  }
-
-  // Create the new containers
-  m_xTruthTauContainer = new xAOD::TruthParticleContainer();
-  m_xTruthTauAuxContainer = new xAOD::TruthParticleAuxContainer();
-  m_xTruthTauContainer->setStore( m_xTruthTauAuxContainer );
-
-  if (m_bWriteTruthTaus)
-  {
-    if ( evtStore()->record( m_xTruthTauContainer, m_sNewTruthTauContainerName ).isFailure() )
-    {
-      ATH_MSG_FATAL("Couldn't create truth tau container with key " << m_sNewTruthTauContainerName);
-      return StatusCode::FAILURE;
-    }
-    if ( evtStore()->record( m_xTruthTauAuxContainer, m_sNewTruthTauContainerNameAux ).isFailure() )
-    {
-      ATH_MSG_FATAL("Couldn't create truth tau container with key " << m_sNewTruthTauContainerNameAux);
-      return StatusCode::FAILURE;
-    }
-    ATH_MSG_DEBUG( "Recorded new TruthParticleContainer with key: " <<  m_sNewTruthTauContainerName);
-  }
-
-  for (auto xTruthParticle : *m_xTruthParticleContainer)
-  {
-    if ( xTruthParticle->isTau() )
-    {
-      xAOD::TruthParticle* xTruthTau = new xAOD::TruthParticle();
-      xTruthTau->makePrivateStore( *xTruthParticle );
-
-      if ( examineTruthTau(*xTruthTau).isFailure() )
-      {
-        delete xTruthTau;
-        continue;
-      }
-
-      // Run classification
-      std::pair<MCTruthPartClassifier::ParticleType, MCTruthPartClassifier::ParticleOrigin> pClassification = m_tMCTruthClassifier->particleTruthClassifier(xTruthTau);
-      static SG::AuxElement::Decorator<unsigned int> decClassifierParticleType("classifierParticleType");
-      static SG::AuxElement::Decorator<unsigned int> decClassifierParticleOrigin("classifierParticleOrigin");
-      decClassifierParticleType(*xTruthTau) = pClassification.first;
-      decClassifierParticleOrigin(*xTruthTau) = pClassification.second;
-
-      // create link to the original TruthParticle
-      ElementLink < xAOD::TruthParticleContainer > lTruthParticleLink(xTruthParticle, *m_xTruthParticleContainer);
-      static SG::AuxElement::Accessor<ElementLink< xAOD::TruthParticleContainer > > accOriginalTruthParticle("originalTruthParticle");
-      accOriginalTruthParticle(*xTruthTau) = lTruthParticleLink;
-
-      m_xTruthTauContainer->push_back(xTruthTau);
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
 //______________________________________________________________________________
 StatusCode TauTruthMatchingTool::checkTruthMatch (const xAOD::TauJet& xTau, const xAOD::TruthParticleContainer& xTruthTauContainer) const
 {
   const xAOD::TruthParticle* xTruthMatch = 0;
   const xAOD::Jet* xTruthJetMatch = 0;
   TruthMatchedParticleType eTruthMatchedParticleType = Unknown;
-
   static SG::AuxElement::Decorator<char> decIsTruthMatched("IsTruthMatched");
   static SG::AuxElement::Decorator< ElementLink< xAOD::JetContainer > > decTruthJetLink("truthJetLink");
-
+  
   double dPtMax = 0;
   for (auto xTruthTauIt : xTruthTauContainer)
   {
@@ -747,234 +506,3 @@ StatusCode TauTruthMatchingTool::checkTruthMatch (const xAOD::TauJet& xTau, cons
 
   return StatusCode::SUCCESS;
 }
-
-//______________________________________________________________________________
-StatusCode TauTruthMatchingTool::examineTruthTau(const xAOD::TruthParticle& xTruthParticle)
-{
-  // skip this tau if it has no decay vertex, should not happen
-  if ( !xTruthParticle.hasDecayVtx() )
-    return StatusCode::FAILURE;
-
-  ATH_MSG_VERBOSE("looking for charged daughters of a truth tau");
-
-  m_iNChargedPions = 0;
-  m_iNNeutralPions = 0;
-  m_iNChargedOthers = 0;
-  m_iNNeutralOthers = 0;
-  m_iNChargedDaughters = 0;
-  m_vDecayMode.clear();
-
-  // define truth visible kinematic variables
-  m_vTruthVisTLV = TLorentzVector();
-  m_vTruthVisTLVCharged = TLorentzVector();
-  m_vTruthVisTLVNeutral = TLorentzVector();
-
-  // default false, if there is a hadron in decay products, it is
-  // switched to true
-  m_bIsHadronicTau = false;
-
-  const xAOD::TruthVertex* xDecayVertex = xTruthParticle.decayVtx();
-  if ( !xDecayVertex )
-    return StatusCode::FAILURE;
-  for ( size_t iOutgoingParticle = 0; iOutgoingParticle < xDecayVertex->nOutgoingParticles(); ++iOutgoingParticle )
-  {
-    const xAOD::TruthParticle* xTruthDaughter = xDecayVertex->outgoingParticle(iOutgoingParticle);
-    if (!xTruthDaughter)
-    {
-      ATH_MSG_FATAL("Truth daughter of tau decay was not found in "<<m_sTruthParticlesContainerName<<" container. Please ensure that this container has the full tau decay information or produce the TruthTaus container in AtlasDerivation.\nInformation on how to do this can be found here:\nhttps://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TauPreRecommendations2015#Accessing_Tau_Truth_Information");
-      return StatusCode::FAILURE;
-    }
-
-    // if tau decays into tau this is not a proper tau decay
-    if ( xTruthDaughter->isTau() )
-    {
-      ATH_MSG_VERBOSE("Tau decays into a tau itself -> skip this decay");
-      return StatusCode::FAILURE;
-    }
-  }
-
-  examineTruthTauDecay(xTruthParticle).ignore();
-
-  if (m_bIsHadronicTau)
-    ATH_MSG_VERBOSE(m_iNChargedDaughters << " prong hadronic truth tau was found with barcode "<<xTruthParticle.barcode());
-  else
-    ATH_MSG_VERBOSE(m_iNChargedDaughters << " prong leptonic truth tau was found with barcode "<<xTruthParticle.barcode());
-  if ( m_iNChargedDaughters%2 == 0 )
-  {
-    ATH_MSG_WARNING("found tau with even multiplicity: " << m_iNChargedDaughters);
-    printDecay(xTruthParticle);
-  }
-
-  static SG::AuxElement::Decorator<double> decPtVis("pt_vis");
-  static SG::AuxElement::Decorator<double> decEtaVis("eta_vis");
-  static SG::AuxElement::Decorator<double> decPhiVis("phi_vis");
-  static SG::AuxElement::Decorator<double> accMVis("m_vis");
-
-  static SG::AuxElement::Decorator<size_t> decNumCharged("numCharged");
-  static SG::AuxElement::Decorator<size_t> decNumChargedPion("numChargedPion");
-  static SG::AuxElement::Decorator<size_t> decNumNeutral("numNeutral");
-  static SG::AuxElement::Decorator<size_t> accNumNeutralPion("numNeutralPion");
-
-  decPtVis(xTruthParticle) = m_vTruthVisTLV.Pt();
-  decEtaVis(xTruthParticle) = m_vTruthVisTLV.Eta();
-  decPhiVis(xTruthParticle) = m_vTruthVisTLV.Phi();
-  accMVis(xTruthParticle) = m_vTruthVisTLV.M();
-
-  decNumCharged(xTruthParticle) = m_iNChargedDaughters;
-  decNumChargedPion(xTruthParticle) = m_iNChargedPions;
-  decNumNeutral(xTruthParticle) = m_iNNeutralPions+m_iNNeutralOthers;
-  accNumNeutralPion(xTruthParticle) = m_iNNeutralPions;
-
-  static SG::AuxElement::Decorator<char> decIsHadronicTau("IsHadronicTau");
-  decIsHadronicTau(xTruthParticle) = (char)m_bIsHadronicTau;
-
-  if ( m_bWriteInvisibleFourMomentum )
-  {
-    TLorentzVector vTruthInvisTLV = xTruthParticle.p4() - m_vTruthVisTLV;
-    static SG::AuxElement::Decorator<double> decPtInvis("pt_invis");
-    static SG::AuxElement::Decorator<double> decEtaInvis("eta_invis");
-    static SG::AuxElement::Decorator<double> decPhiInvis("phi_invis");
-    static SG::AuxElement::Decorator<double> accMInvis("m_invis");
-    decPtInvis(xTruthParticle)  = vTruthInvisTLV.Pt();
-    decEtaInvis(xTruthParticle) = vTruthInvisTLV.Eta();
-    decPhiInvis(xTruthParticle) = vTruthInvisTLV.Phi();
-    accMInvis(xTruthParticle)   = vTruthInvisTLV.M();
-  }
-
-  if ( m_bWriteVisibleChargedFourMomentum )
-  {
-    static SG::AuxElement::Decorator<double> decPtVisCharged("pt_vis_charged");
-    static SG::AuxElement::Decorator<double> decEtaVisCharged("eta_vis_charged");
-    static SG::AuxElement::Decorator<double> decPhiVisCharged("phi_vis_charged");
-    static SG::AuxElement::Decorator<double> accMVisCharged("m_vis_charged");
-    decPtVisCharged(xTruthParticle)  = m_vTruthVisTLVCharged.Pt();
-    decEtaVisCharged(xTruthParticle) = m_vTruthVisTLVCharged.Eta();
-    decPhiVisCharged(xTruthParticle) = m_vTruthVisTLVCharged.Phi();
-    accMVisCharged(xTruthParticle)   = m_vTruthVisTLVCharged.M();
-  }
-
-  if ( m_bWriteVisibleNeutralFourMomentum )
-  {
-    static SG::AuxElement::Decorator<double> decPtVisNeutral("pt_vis_neutral");
-    static SG::AuxElement::Decorator<double> decEtaVisNeutral("eta_vis_neutral");
-    static SG::AuxElement::Decorator<double> decPhiVisNeutral("phi_vis_neutral");
-    static SG::AuxElement::Decorator<double> accMVisNeutral("m_vis_neutral");
-    decPtVisNeutral(xTruthParticle)  = m_vTruthVisTLVNeutral.Pt();
-    decEtaVisNeutral(xTruthParticle) = m_vTruthVisTLVNeutral.Eta();
-    decPhiVisNeutral(xTruthParticle) = m_vTruthVisTLVNeutral.Phi();
-    accMVisNeutral(xTruthParticle)   = m_vTruthVisTLVNeutral.M();
-  }
-
-  if ( m_bWriteDecayModeVector )
-  {
-    static SG::AuxElement::Decorator<std::vector<int> > decDecayModeVector("DecayModeVector");
-    decDecayModeVector(xTruthParticle) = m_vDecayMode;
-  }
-
-  return StatusCode::SUCCESS;
-}
-
-//______________________________________________________________________________
-StatusCode TauTruthMatchingTool::examineTruthTauDecay(const xAOD::TruthParticle& xTruthParticle)
-{
-  // get vertex and check if it exists
-  const xAOD::TruthVertex* xDecayVertex = xTruthParticle.decayVtx();
-  if (!xDecayVertex)
-    return StatusCode::SUCCESS;
-
-  for ( size_t iOutgoingParticle = 0; iOutgoingParticle < xDecayVertex->nOutgoingParticles(); ++iOutgoingParticle )
-  {
-    const xAOD::TruthParticle* xTruthDaughter = xDecayVertex->outgoingParticle(iOutgoingParticle);
-    if (!xTruthDaughter)
-    {
-      ATH_MSG_FATAL("Truth daughter of tau decay was not found in "<<m_sTruthParticlesContainerName<<" container. Please ensure that this container has the full tau decay information or produce the TruthTaus container in AtlasDerivation.\nInformation on how to do this can be found here:\nhttps://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TauPreRecommendations2015#Accessing_Tau_Truth_Information");
-      return StatusCode::FAILURE;
-    }
-
-    int iAbsPdgId = xTruthDaughter->absPdgId();
-    int iPdgId = xTruthDaughter->pdgId();
-
-    // look at decay of unstable particles
-    if (xTruthDaughter->status() == 2 or xTruthDaughter->status() == 11 or xTruthDaughter->status() == 10902) // 11 for HERWIG++
-    {
-      if ( iAbsPdgId != 111 and iAbsPdgId != 311 and iAbsPdgId != 310 and iAbsPdgId != 130 )
-      {
-        examineTruthTauDecay(*xTruthDaughter).ignore();
-        continue;
-      }
-    }
-
-    // only process stable particles
-    if (xTruthDaughter->status() != 1 and xTruthDaughter->status() != 2)
-      continue;
-
-    // add pdgID to vector for decay mode classification
-    m_vDecayMode.push_back(iPdgId);
-
-    // if tau decays leptonically, indicated by an electron/muon neutrino then
-    // it is not a hadronic decay
-    if ( xTruthDaughter->isHadron() )
-      m_bIsHadronicTau = true;
-
-    // ignore neutrinos for further progress
-    if ( xTruthDaughter->isNeutrino() )
-    {
-      ATH_MSG_VERBOSE("found neutrino decay particle with PdgId "<<iPdgId);
-      continue;
-    }
-
-    // add momentum of non-neutrino particle to visible momentum
-    m_vTruthVisTLV += xTruthDaughter->p4();
-    if ( m_bWriteVisibleChargedFourMomentum )
-      if ( xTruthDaughter->isCharged() )
-        m_vTruthVisTLVCharged += xTruthDaughter->p4();
-    if ( m_bWriteVisibleNeutralFourMomentum )
-      if ( xTruthDaughter->isNeutral() )
-        m_vTruthVisTLVNeutral += xTruthDaughter->p4();
-
-    // only count charged decay particles
-    if ( xTruthDaughter->isCharged() )
-    {
-      ATH_MSG_VERBOSE("found charged decay particle with PdgId "<<iPdgId);
-      m_iNChargedDaughters++;
-      // count charged pions
-      if (iAbsPdgId==211) m_iNChargedPions++;
-      else m_iNChargedOthers++;
-    }
-    else
-    {
-      ATH_MSG_VERBOSE("found neutral decay particle with PdgId "<<iPdgId);
-      // count neutral pions
-      if (iAbsPdgId==111) m_iNNeutralPions++;
-      else m_iNNeutralOthers++;
-    }
-  }
-  return StatusCode::SUCCESS;
-}
-
-void TauTruthMatchingTool::printDecay(const xAOD::TruthParticle& xTruthParticle, int depth) const
-{
-  // loop over all decay particles, print their kinematic and other properties
-
-  const xAOD::TruthVertex* xDecayVertex = xTruthParticle.decayVtx();
-  if (!xDecayVertex)
-    return;
-
-  for ( size_t iOutgoingParticle = 0; iOutgoingParticle < xDecayVertex->nOutgoingParticles(); ++iOutgoingParticle )
-  {
-    const xAOD::TruthParticle* xTruthDaughter = xDecayVertex->outgoingParticle(iOutgoingParticle);
-    if (!xTruthDaughter)
-    {
-      ATH_MSG_FATAL("Truth daughter of tau decay was not found in "<<m_sTruthParticlesContainerName<<" container. Please ensure that this container has the full tau decay information or produce the TruthTaus container in AtlasDerivation.\nInformation on how to do this can be found here:\nhttps://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TauPreRecommendations2015#Accessing_Tau_Truth_Information");
-      return;
-    }
-    ATH_MSG_WARNING("depth "<<depth
-                    <<" e "<<xTruthDaughter->e()
-                    <<" eta "<<xTruthDaughter->p4().Eta()
-                    <<" phi "<<xTruthDaughter->p4().Phi()
-                    <<" pdgid "<<xTruthDaughter->pdgId()
-                    <<" status "<<xTruthDaughter->status()
-                    <<" barcode "<<xTruthDaughter->barcode());
-    printDecay(*xTruthDaughter, depth+1);
-  }
-}
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/BuildTruthTaus.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/BuildTruthTaus.h
new file mode 100644
index 0000000000000000000000000000000000000000..f3b4ff90a50b8803845180caf06c4545607c770b
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/BuildTruthTaus.h
@@ -0,0 +1,131 @@
+// Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef  TAUANALYSISTOOLS_BUILDTRUTHTAUS_H
+#define  TAUANALYSISTOOLS_BUILDTRUTHTAUS_H
+
+/*
+  author: Dirk Duschinger
+  mail: dirk.duschinger@cern.ch
+  documentation in: ../README.rst
+                    or
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/README.rst
+		    or
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/README.rst
+*/
+
+// Framework include(s):
+#include "AsgTools/AsgMetadataTool.h"
+#include "AsgTools/AnaToolHandle.h"
+
+// Core include(s):
+#include "MCTruthClassifier/IMCTruthClassifier.h"
+
+// EDM include(s):
+#include "xAODJet/JetContainer.h"
+
+// Local include(s):
+#include "TauAnalysisTools/IBuildTruthTaus.h"
+
+namespace TauAnalysisTools
+{
+
+class BuildTruthTaus
+  : public virtual TauAnalysisTools::IBuildTruthTaus
+  , public asg::AsgMetadataTool
+{
+  /// Create a proper constructor for Athena
+  ASG_TOOL_CLASS( BuildTruthTaus,
+                  TauAnalysisTools::IBuildTruthTaus )
+
+public:
+
+  BuildTruthTaus( const std::string& name );
+
+  virtual ~BuildTruthTaus();
+
+  // initialize the tool
+  virtual StatusCode initialize();
+
+  // get TruthTauContainer
+  virtual xAOD::TruthParticleContainer* getTruthTauContainer();
+
+  // get TruthTauAuxContainer
+  virtual xAOD::TruthParticleAuxContainer* getTruthTauAuxContainer();
+
+  StatusCode retrieveTruthTaus();
+
+private:
+  // Execute at each event
+  virtual StatusCode beginEvent();
+
+  StatusCode buildTruthTausFromTruthParticles();
+  StatusCode examineTruthTau(const xAOD::TruthParticle& xTruthParticle);
+  StatusCode examineTruthTauDecay(const xAOD::TruthParticle& xTruthParticle);
+  void printDecay(const xAOD::TruthParticle& xTruthParticle, int depth = 0) const;
+
+protected:
+  bool m_bIsData;
+  bool m_bIsConfigured;
+
+  // steering variables
+  bool m_bWriteTruthTaus;
+  bool m_bTruthTauAvailable;
+
+  const xAOD::TruthParticleContainer* m_xTruthTauContainerConst;
+  const xAOD::TruthParticleContainer* m_xTruthMuonContainerConst;
+  const xAOD::TruthParticleContainer* m_xTruthElectronContainerConst;
+  const xAOD::JetContainer* m_xTruthJetContainerConst;
+  xAOD::TruthParticleContainer* m_xTruthTauContainer;
+
+  bool m_bIsTruthMatchedAvailable;
+  bool m_bIsTruthMatchedAvailableChecked;
+  bool m_bNewEvent;
+
+private:
+
+  const xAOD::TruthParticleContainer* m_xTruthParticleContainer;
+  xAOD::TruthParticleAuxContainer* m_xTruthTauAuxContainer;
+
+  // steering variables
+  std::string m_sNewTruthTauContainerName;
+  std::string m_sNewTruthTauContainerNameAux;
+  std::string m_sTruthTauContainerName;
+  std::string m_sTruthMuonContainerName;
+  std::string m_sTruthElectronContainerName;
+  std::string m_sTruthJetContainerName;
+  std::string m_sTruthParticlesContainerName;
+
+  bool m_bTruthMuonAvailable;
+  bool m_bTruthElectronAvailable;
+  bool m_bTruthJetAvailable;
+
+  bool m_bWriteInvisibleFourMomentum;
+  bool m_bWriteVisibleChargedFourMomentum;
+  bool m_bWriteVisibleNeutralFourMomentum;
+  bool m_bWriteDecayModeVector;
+
+  size_t m_iNChargedPions;
+  size_t m_iNNeutralPions;
+  size_t m_iNChargedOthers;
+  size_t m_iNNeutralOthers;
+  size_t m_iNChargedDaughters;
+  std::vector<int> m_vDecayMode;
+
+  TLorentzVector m_vTruthVisTLV;
+  TLorentzVector m_vTruthVisTLVCharged;
+  TLorentzVector m_vTruthVisTLVNeutral;
+
+  bool m_bIsHadronicTau;
+
+private:
+
+  asg::AnaToolHandle<IMCTruthClassifier> m_tMCTruthClassifier;
+
+}; // class BuildTruthTaus
+
+}
+#endif // TAUANALYSISTOOLS_BUILDTRUTHTAUS_H
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonDiTauEfficiencyTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonDiTauEfficiencyTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..5b49cdfbb7ddc95965252b8a4f06d0379a303541
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/CommonDiTauEfficiencyTool.h
@@ -0,0 +1,74 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TAUANALYSISTOOLS_COMMONDITAUEFFICIENCYTOOL_H
+#define TAUANALYSISTOOLS_COMMONDITAUEFFICIENCYTOOL_H
+
+/*
+  author: David Kirchmeier
+  mail: david.kirchmeier@cern.ch
+  documentation in: ../README.rst
+                    or
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/README.rst
+        or
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/README.rst
+*/
+
+// Framework include(s):
+#include "AsgTools/AsgTool.h"
+
+// EDM include(s):
+#include "xAODTau/DiTauJet.h"
+
+// Local include(s):
+#include "TauAnalysisTools/Enums.h"
+// #include "TauAnalysisTools/ITauEfficiencyCorrectionsTool.h"
+#include "TauAnalysisTools/IDiTauEfficiencyCorrectionsTool.h"
+#include "TauAnalysisTools/CommonEfficiencyTool.h"
+#include "TauAnalysisTools/HelperFunctions.h"
+
+namespace TauAnalysisTools
+{
+
+double DiTauPt(const xAOD::DiTauJet& xDiTau);
+double DiTauEta(const xAOD::DiTauJet& xDiTau);
+
+class CommonDiTauEfficiencyTool
+  : public CommonEfficiencyTool
+  , public virtual IDiTauEfficiencyCorrectionsTool
+{
+  /// Create a proper constructor for Athena
+  ASG_TOOL_CLASS( CommonDiTauEfficiencyTool, TauAnalysisTools::IDiTauEfficiencyCorrectionsTool )
+
+public:
+
+  CommonDiTauEfficiencyTool(std::string sName);
+
+  ~CommonDiTauEfficiencyTool();
+
+  // next two lines are needed to achieve overloading of those methods 
+  using CommonEfficiencyTool::getEfficiencyScaleFactor;
+  using CommonEfficiencyTool::applyEfficiencyScaleFactor;
+  virtual CP::CorrectionCode getEfficiencyScaleFactor(const xAOD::DiTauJet& xDiTau, double& dEfficiencyScaleFactor);
+  virtual CP::CorrectionCode applyEfficiencyScaleFactor(const xAOD::DiTauJet& xDiTau);
+
+  double (*m_fX)(const xAOD::DiTauJet& xDiTau);
+  double (*m_fY)(const xAOD::DiTauJet& xDiTau);
+
+  void ReadInputs(TFile* fFile);
+
+  using CommonEfficiencyTool::getValue;
+  virtual CP::CorrectionCode getValue(const std::string& sHistName,
+                                      const xAOD::DiTauJet& xDiTau,
+                                      double& dEfficiencyScaleFactor) const;
+
+  e_TruthMatchedParticleType checkTruthMatch(const xAOD::DiTauJet& xDiTau) const;
+
+  bool m_bSFIsAvailable;
+  bool m_bSFIsAvailableChecked;
+
+};
+} // namespace TauAnalysisTools
+
+#endif // TAUANALYSISTOOLS_COMMONDITAUEFFICIENCYTOOL_H
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/DiTauEfficiencyCorrectionsTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/DiTauEfficiencyCorrectionsTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..fb82b0d7a9eab17361a73908c37d06c859b8a6d7
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/DiTauEfficiencyCorrectionsTool.h
@@ -0,0 +1,102 @@
+// Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TAUANALYSISTOOLS_DITAUEFFICIENCYTOOL_H
+#define TAUANALYSISTOOLS_DITAUEFFICIENCYTOOL_H
+
+/*
+  author: David Kirchmeier
+  mail: davd.kirchmeier@cern.ch
+  documentation in: 
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/doc/README-DiTauEfficiencyCorrectionsTool.rst
+        or
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/doc/README-DiTauEfficiencyCorrectionsTool.rst
+*/
+
+// Framework include(s):
+#include "AsgTools/AsgMetadataTool.h"
+#include "AsgTools/AnaToolHandle.h"
+
+// Local include(s):
+#include "TauAnalysisTools/IDiTauEfficiencyCorrectionsTool.h"
+#include "TauAnalysisTools/ITauEfficiencyCorrectionsTool.h"
+#include "TauAnalysisTools/CommonDiTauEfficiencyTool.h"
+
+namespace TauAnalysisTools
+{
+
+class DiTauEfficiencyCorrectionsTool
+  : public virtual IDiTauEfficiencyCorrectionsTool
+  , public asg::AsgMetadataTool
+{
+  /// Create a proper constructor for Athena
+  ASG_TOOL_CLASS( DiTauEfficiencyCorrectionsTool, TauAnalysisTools::IDiTauEfficiencyCorrectionsTool )
+
+public:
+  /// Create a constructor for standalone usage
+  DiTauEfficiencyCorrectionsTool( const std::string& sName );
+
+  ~DiTauEfficiencyCorrectionsTool();
+
+  /// Function initialising the tool
+  virtual StatusCode initialize();
+
+  /// Print tool configuration
+  virtual void printConfig(bool bAlways = true);
+
+  /// Get the "tau efficiency" as a return value
+  virtual CP::CorrectionCode getEfficiencyScaleFactor( const xAOD::DiTauJet& xDiTau,
+      double& eff );
+  /// Decorate the tau with its efficiency
+  virtual CP::CorrectionCode applyEfficiencyScaleFactor( const xAOD::DiTauJet& xDiTau );
+
+  /// returns: whether this tool is affected by the given systematis
+  virtual bool isAffectedBySystematic( const CP::SystematicVariation& systematic ) const;
+
+  /// returns: the list of all systematics this tool can be affected by
+  virtual CP::SystematicSet affectingSystematics() const;
+
+  /// returns: the list of all systematics this tool recommends to use
+  virtual CP::SystematicSet recommendedSystematics() const;
+
+  virtual CP::SystematicCode applySystematicVariation( const CP::SystematicSet& systConfig );
+
+  virtual bool isSupportedRunNumber( int iRunNumber )
+  {
+    (void) iRunNumber;
+    return true;
+  };
+
+private:
+  StatusCode beginEvent();
+
+  std::string ConvertJetIDToString(const int& iLevel);
+
+  StatusCode initializeTools_2017_moriond();
+
+private:
+
+  std::vector<int> m_vEfficiencyCorrectionTypes;
+  std::vector< asg::AnaToolHandle<IDiTauEfficiencyCorrectionsTool>* > m_vCommonEfficiencyTools;
+  std::string m_sInputFilePathRecoHadTau;
+  std::string m_sInputFilePathJetIDHadTau;
+  std::string m_sVarNameBase;
+  std::string m_sVarNameRecoHadTau;
+  std::string m_sVarNameJetIDHadTau;
+  std::string m_sRecommendationTag;
+  bool m_bSkipTruthMatchCheck;
+  bool m_bIsData;
+  bool m_bIsConfigured;
+  int m_iIDLevel;
+
+  unsigned int m_iRunNumber;
+
+  std::string m_sEventInfoName;
+}; // class DiTauEfficiencyCorrectionsTool
+
+} // namespace TauAnalysisTools
+
+#endif // TAUANALYSISTOOLS_DITAUEFFICIENCYTOOL_H
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/DiTauTruthMatchingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/DiTauTruthMatchingTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..b169b742092fd3462a58d87c38ac8b3a9d5f93b9
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/DiTauTruthMatchingTool.h
@@ -0,0 +1,77 @@
+// Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef  TAUANALYSISTOOLS_DITAUTRUTHMATCHINGTOOL_H
+#define  TAUANALYSISTOOLS_DITAUTRUTHMATCHINGTOOL_H
+
+/*
+  author: David Kirchmeier
+  mail: david.kirchmeier@cern.ch
+  implementation close to TauTruthMatchingTool.h
+  documentation in: 
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/doc/README-DiTauTruthMatchingTool.rst
+        or
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/doc/README-DiTauTruthMatchingTool.rst
+*/
+
+// Local include(s):
+#include "TauAnalysisTools/IDiTauTruthMatchingTool.h"
+#include "TauAnalysisTools/BuildTruthTaus.h"
+
+namespace TauAnalysisTools
+{
+
+class DiTauTruthMatchingTool
+  : public virtual TauAnalysisTools::BuildTruthTaus
+  , public virtual TauAnalysisTools::IDiTauTruthMatchingTool
+{
+  /// Create a proper constructor for Athena
+  ASG_TOOL_CLASS2( DiTauTruthMatchingTool,
+                   TauAnalysisTools::IBuildTruthTaus,
+                   TauAnalysisTools::IDiTauTruthMatchingTool )
+
+public:                         // Interface functions
+
+  DiTauTruthMatchingTool( const std::string& name );
+
+  virtual ~DiTauTruthMatchingTool();
+
+  // initialize the tool
+  virtual StatusCode initialize();
+
+  // get pointer to the truth matched particle, if no truth particle was found a null pointer is returned
+  virtual void getTruth(const xAOD::DiTauJet& xDiTau);
+
+  // apply match to a single tau
+  virtual void applyTruthMatch(const xAOD::DiTauJet& xDiTau);
+
+  // apply match to all taus in a vector
+  virtual void applyTruthMatch(const std::vector<const xAOD::DiTauJet*>& vDiTaus);
+
+private:                        // private helper functions
+
+  StatusCode findTruthTau(const xAOD::DiTauJet& xDiTau);
+  StatusCode checkTruthMatch (const xAOD::DiTauJet& xDiTau, const xAOD::TruthParticleContainer& xTauContainer) const;
+  StatusCode truthMatch (const TLorentzVector& vSubjetTLV,
+                         const xAOD::TruthParticleContainer& xTruthTauContainer, 
+                         const xAOD::TruthParticle* &xTruthMatch,
+                         TruthMatchedParticleType &eTruthMatchedParticleType) const;
+
+private:                        // steering variables
+
+  double m_dMaxDeltaR;
+
+private:                        // private helper variables
+
+  SG::AuxElement::ConstAccessor<double> m_accPtVis;
+  SG::AuxElement::ConstAccessor<double> m_accEtaVis;
+  SG::AuxElement::ConstAccessor<double> m_accPhiVis;
+  SG::AuxElement::ConstAccessor<double> m_accMVis;
+
+}; // class DiTauTruthMatchingTool
+
+}
+#endif // TAUANALYSISTOOLS_DITAUTRUTHMATCHINGTOOL_H
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h
index 8fba2e731ed4abd5daf421e8d0a7c848243bff5e..aca2f3603df9459bbfa95978489b0be5ae08c951 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/Enums.h
@@ -128,7 +128,8 @@ typedef enum e_TruthMatchedParticleType
   TruthLeptonicTau = 2,
   TruthMuon        = 3,
   TruthElectron    = 4,
-  TruthJet         = 5
+  TruthJet         = 5,
+  TruthHadronicDiTau = 6
 } TruthMatchedParticleType;
 
 typedef enum e_DataPeriod
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/HelperFunctions.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/HelperFunctions.h
index d8a652f0388366f1a6d1bc0d3fd901585bd7ce87..6a9ea01de51bf09a4af3b55d7c28e047d47d43ba 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/HelperFunctions.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/HelperFunctions.h
@@ -46,6 +46,7 @@ double tauLeadTrackEta(const xAOD::TauJet& xTau);
 
 bool testFileForEOFContainsCharacters(std::string sFileName);
 void createPi0Vectors(const xAOD::TauJet* xTau, std::vector<TLorentzVector>& vPi0s);
+void correctedPi0Vectors(const xAOD::TauJet* xTau, std::vector<TLorentzVector>& correctedPi0s, TLorentzVector& TauP4);
 }
 
 #endif // not TAUANALYSISTOOLS_HELPERFUNCTIONS_H
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/IBuildTruthTaus.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/IBuildTruthTaus.h
new file mode 100644
index 0000000000000000000000000000000000000000..4b7a34934956e9af75c4a42823dc0df0f6c56aea
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/IBuildTruthTaus.h
@@ -0,0 +1,53 @@
+// Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TAUANALYSISTOOLS_IBUILDTRUTHTAUS_H
+#define TAUANALYSISTOOLS_IBUILDTRUTHTAUS_H
+
+/*
+  author: Dirk Duschinger
+  mail: dirk.duschinger@cern.ch
+  documentation in: ../README.rst
+                    or
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/README.rst
+		    or
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/README.rst
+*/
+
+// Framework include(s):
+#include "AsgTools/IAsgTool.h"
+
+// EDM include(s):
+#include "xAODTruth/TruthParticleContainer.h"
+#include "xAODTruth/TruthParticleAuxContainer.h"
+
+namespace TauAnalysisTools
+{
+
+class IBuildTruthTaus :
+  public virtual asg::IAsgTool
+{
+
+  /// Declare the interface that the class provides
+  ASG_TOOL_INTERFACE( TauAnalysisTools::IBuildTruthTaus )
+
+public:
+  // initialize the tool
+  virtual StatusCode initialize() = 0;
+
+  // get TruthTauContainer
+  virtual xAOD::TruthParticleContainer* getTruthTauContainer() = 0;
+
+  // get TruthTauAuxContainer
+  virtual xAOD::TruthParticleAuxContainer* getTruthTauAuxContainer() = 0;
+
+  virtual StatusCode retrieveTruthTaus() = 0;
+
+}; // class IBuildTruthTaus
+
+} // namespace TauAnalysisTools
+
+#endif // TAUANALYSISTOOLS_IBUILDTRUTHTAUS_H
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/IDiTauEfficiencyCorrectionsTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/IDiTauEfficiencyCorrectionsTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..c5c9a71c8224e34843995c54a070e82d23b914df
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/IDiTauEfficiencyCorrectionsTool.h
@@ -0,0 +1,52 @@
+// Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TAUANALYSISTOOLS_IDITAUEFFICIENCYTOOL_H
+#define TAUANALYSISTOOLS_IDITAUEFFICIENCYTOOL_H
+
+/*
+  author: David Kirchmeier
+  mail: david.kirchmeier@cern.ch
+  documentation in: 
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/doc/README-DiTauEfficiencyCorrectionsTool.rst
+        or
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/doc/README-DiTauEfficiencyCorrectionsTool.rst
+*/
+
+// Framework include(s):
+#include "AsgTools/IAsgTool.h"
+
+// EDM include(s):
+#include "xAODTau/DiTauJet.h"
+#include "PATInterfaces/CorrectionCode.h"
+#include "PATInterfaces/ISystematicsTool.h"
+
+// Local include(s):
+
+namespace TauAnalysisTools
+{
+
+class IDiTauEfficiencyCorrectionsTool
+  : public virtual asg::IAsgTool
+  , public virtual CP::ISystematicsTool
+{
+
+  /// Declare the interface that the class provides
+  ASG_TOOL_INTERFACE( TauAnalysisTools::IDiTauEfficiencyCorrectionsTool )
+
+public:
+  /// Get the "tau efficiency" as a return value
+  virtual CP::CorrectionCode getEfficiencyScaleFactor( const xAOD::DiTauJet& xDiTau,
+      double& eff ) = 0;
+
+  /// Decorate the tau with its efficiency
+  virtual CP::CorrectionCode applyEfficiencyScaleFactor( const xAOD::DiTauJet& xDiTau ) = 0;
+
+}; // class IDiTauEfficiencyCorrectionsTool
+
+} // namespace TauAnalysisTools
+
+#endif // TAUANALYSISTOOLS_IDITAUEFFICIENCYTOOL_H
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/IDiTauTruthMatchingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/IDiTauTruthMatchingTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..83e60a4739072936010b5e2e2376f252a91857c3
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/IDiTauTruthMatchingTool.h
@@ -0,0 +1,61 @@
+// Dear emacs, this is -*- c++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TAUANALYSISTOOLS_IDITAUTRUTHMATCHINGTOOL_H
+#define TAUANALYSISTOOLS_IDITAUTRUTHMATCHINGTOOL_H
+
+/*
+  author: David Kirchmeier
+  mail: david.kirchmeier@cern.ch
+  implementation close to ITauTruthMatchingTool.h
+  documentation in: 
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-<tag>/doc/README-DiTauTruthMatchingTool.rst
+        or
+                    https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/doc/README-DiTauTruthMatchingTool.rst
+
+*/
+
+// Framework include(s):
+#include "AsgTools/IAsgTool.h"
+
+// EDM include(s):
+#include "xAODTau/DiTauJet.h"
+
+// // local include(s)
+#include "IBuildTruthTaus.h"
+
+// local include(s)
+#include "TauAnalysisTools/Enums.h"
+
+namespace TauAnalysisTools
+{
+
+class IDiTauTruthMatchingTool
+  : public virtual asg::IAsgTool
+  , public virtual TauAnalysisTools::IBuildTruthTaus
+{
+
+  /// Declare the interface that the class provides
+  ASG_TOOL_INTERFACE( TauAnalysisTools::IDiTauTruthMatchingTool )
+
+public:
+  // initialize the tool
+  virtual StatusCode initialize() = 0;
+
+  // apply match to a single tau
+  virtual void applyTruthMatch(const xAOD::DiTauJet& xDiTau) = 0;
+
+  // apply match to all taus in a vector
+  virtual void applyTruthMatch(const std::vector<const xAOD::DiTauJet*>& vDiTaus) = 0;
+
+  // get pointer to truth tau, if no truth tau was found a null pointer is returned
+  virtual void getTruth(const xAOD::DiTauJet& xDiTau) = 0;
+
+}; // class IDiTauTruthMatchingTool
+
+} // namespace TauAnalysisTools
+
+#endif // TAUANALYSISTOOLS_IDITAUTRUTHMATCHINGTOOL_H
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauEfficiencyCorrectionsTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauEfficiencyCorrectionsTool.h
index 69f8c13a5224b5295de6d7e9a568bcedc4da9206..c94c04d485270dd452f517d29e99eb19a2439afb 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauEfficiencyCorrectionsTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauEfficiencyCorrectionsTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_ITAUEFFICIENCYTOOL_H
 #define TAUANALYSISTOOLS_ITAUEFFICIENCYTOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauOverlappingElectronLLHDecorator.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauOverlappingElectronLLHDecorator.h
index 27c0b8d552fd26e6bb55fd144ec9f53c5acc353d..b19240af3b0f60d77fda3ff1ee07ab7a8d538868 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauOverlappingElectronLLHDecorator.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauOverlappingElectronLLHDecorator.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_ITAUOVERLAPPINGELECTRONLLHDECORATOR_H
 #define TAUANALYSISTOOLS_ITAUOVERLAPPINGELECTRONLLHDECORATOR_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSelectionTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSelectionTool.h
index a31de6e52d370a9ec5818b59a985d84acf50dd6e..6ad6093cca2762f7a569017082406b6656c587b3 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSelectionTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSelectionTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_ITAUONSELECTIONTOOL_H
 #define TAUANALYSISTOOLS_ITAUONSELECTIONTOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSmearingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSmearingTool.h
index 508203834c4b8ada88a7bdb4ea9b19be4b07da88..f0519c1bacfbd21276d3bc6cf820bc375f6fe5d3 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSmearingTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauSmearingTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_ITAUSMEARINGTOOL_H
 #define TAUANALYSISTOOLS_ITAUSMEARINGTOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauTruthMatchingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauTruthMatchingTool.h
index 8fe5e7dff06bdfe6fbddff6eaf244a5ac07fa619..50346f3fd12e367349328a8f3f8068192ac1ade4 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauTruthMatchingTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauTruthMatchingTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_ITAUTRUTHMATCHINGTOOL_H
 #define TAUANALYSISTOOLS_ITAUTRUTHMATCHINGTOOL_H
 
@@ -21,17 +22,19 @@
 
 // EDM include(s):
 #include "xAODTau/TauJet.h"
-#include "xAODTruth/TruthParticleContainer.h"
-#include "xAODTruth/TruthParticleAuxContainer.h"
+
+// // local include(s)
+#include "IBuildTruthTaus.h"
 
 // local include(s)
-#include "Enums.h"
+#include "TauAnalysisTools/Enums.h"
 
 namespace TauAnalysisTools
 {
 
-class ITauTruthMatchingTool :
-  public virtual asg::IAsgTool
+class ITauTruthMatchingTool
+  : public virtual asg::IAsgTool
+  , public virtual TauAnalysisTools::IBuildTruthTaus
 {
 
   /// Declare the interface that the class provides
@@ -41,24 +44,12 @@ public:
   // initialize the tool
   virtual StatusCode initialize() = 0;
 
-  // get TruthTauContainer
-  virtual xAOD::TruthParticleContainer* getTruthTauContainer() = 0;
-
-  // get TruthTauAuxContainer
-  virtual xAOD::TruthParticleAuxContainer* getTruthTauAuxContainer() = 0;
-
   // apply match to a single tau
   virtual const xAOD::TruthParticle* applyTruthMatch(const xAOD::TauJet& xTau) = 0;
 
   // apply match to all taus in a vector
   virtual std::vector<const xAOD::TruthParticle*> applyTruthMatch(const std::vector<const xAOD::TauJet*>& vTaus) = 0;
 
-  // set pointer to truth particle container
-  virtual StatusCode setTruthParticleContainer(const xAOD::TruthParticleContainer* xTruthParticleContainer) __attribute__ ((deprecated("This function is deprecated. Please remove it from your code and use the configurable property \"TruthParticlesContainerName\" instead.\nFor further information please refer to the README:\nhttps://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/doc/README-TauTruthMatchingTool.rst"))) = 0;
-
-  // set pointer to event
-  virtual StatusCode initializeEvent() __attribute__ ((deprecated("This function is deprecated. Please remove it from your code.\nFor further information please refer to the README:\nhttps://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/doc/README-TauTruthMatchingTool.rst"))) = 0;
-
   // get pointer to truth tau, if no truth tau was found a null pointer is returned
   virtual const xAOD::TruthParticle* getTruth(const xAOD::TauJet& xTau) = 0;
 
@@ -85,10 +76,6 @@ public:
   virtual xAOD::TauJetParameters::DecayMode getDecayMode(const xAOD::TauJet& xTau) = 0;
   virtual xAOD::TauJetParameters::DecayMode getDecayMode(const xAOD::TruthParticle& xTruthTau) = 0;
 
-  // build the truth tau collection
-  virtual StatusCode buildTruthTausFromTruthParticles() = 0;
-  virtual StatusCode retrieveTruthTaus() = 0;
-
 }; // class ITauTruthMatchingTool
 
 } // namespace TauAnalysisTools
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauTruthTrackMatchingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauTruthTrackMatchingTool.h
index 12e0fc4f3e420c179513e2e1ca14af5d3988e9a7..37da4c1213aad774c25139117541ff6ed002e641 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauTruthTrackMatchingTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/ITauTruthTrackMatchingTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_ITAUTRUTHTRACKMATCHINGTOOL_H
 #define TAUANALYSISTOOLS_ITAUTRUTHTRACKMATCHINGTOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h
index 12899acd72ea89b7a75b02eaa0686cfad7349346..0482cc4db9e187b0611de766d37bddf2822dc2ad 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SelectionCuts.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_SELECTIONCUTS_H
 #define TAUANALYSISTOOLS_SELECTIONCUTS_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SharedFilesVersion.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SharedFilesVersion.h
index ecdb018986fadf365768f6366bd3e09aa7c7a7e7..2caaa1bed2aefd308b426aadfd6b2a32f321cacd 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SharedFilesVersion.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/SharedFilesVersion.h
@@ -2,4 +2,4 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#define sSharedFilesVersion "00-02-48"
+#define sSharedFilesVersion "00-02-62"
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauAnalysisToolsDict.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauAnalysisToolsDict.h
index d8bb65dbf316c8bf1bd1be37cc8089c5d0c8f365..43da14a287ed8468192f5f97a03b4acd33ed3c2f 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauAnalysisToolsDict.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauAnalysisToolsDict.h
@@ -5,6 +5,9 @@
 #ifndef TAUANALYSISTOOLS_TAUANALYSISTOOLSDICT_H
 #define TAUANALYSISTOOLS_TAUANALYSISTOOLSDICT_H
 
+
+
+
 /*
   author: Dirk Duschinger
   mail: dirk.duschinger@cern.ch
@@ -23,7 +26,12 @@
 #include "TauAnalysisTools/TauEfficiencyCorrectionsTool.h"
 #include "TauAnalysisTools/TauSelectionTool.h"
 #include "TauAnalysisTools/TauSmearingTool.h"
+#include "TauAnalysisTools/BuildTruthTaus.h"
 #include "TauAnalysisTools/TauTruthMatchingTool.h"
 #include "TauAnalysisTools/TauTruthTrackMatchingTool.h"
+#include "TauAnalysisTools/CommonDiTauEfficiencyTool.h"
+#include "TauAnalysisTools/DiTauEfficiencyCorrectionsTool.h"
+#include "TauAnalysisTools/DiTauTruthMatchingTool.h"
+#include "TauAnalysisTools/BuildTruthTaus.h"
 
 #endif // not TAUANALYSISTOOLS_TAUANALYSISTOOLSDICT_H
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h
index b7de911366ccfb7025897617b7754d517b0d0c81..75969092792b06f0b5dc10810b08efc71a179c2f 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyContJetIDTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_TAUEFFICIENCYCONTJETIDTOOL_H
 #define TAUANALYSISTOOLS_TAUEFFICIENCYCONTJETIDTOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyCorrectionsTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyCorrectionsTool.h
index 5fcc36c520da9bf736268582752db100effb0367..1250cc652ad10fc6b99292244173c55af1608a9f 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyCorrectionsTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyCorrectionsTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_TAUEFFICIENCYTOOL_H
 #define TAUANALYSISTOOLS_TAUEFFICIENCYTOOL_H
 
@@ -89,6 +90,7 @@ private:
   std::string ConvertJetIDToString(const int& iLevel);
   std::string ConvertEleOLRToString(const int& iLevel);
   std::string ConvertTriggerIDToString(const int& iLevel);
+  std::string GetTriggerSFMeasrementString();
 
   StatusCode initializeWithTauSelectionTool();
 
@@ -122,6 +124,7 @@ private:
   std::string m_sRecommendationTag;
   std::string m_sTriggerName;
   std::string m_sTriggerYear;
+  std::string m_sTriggerSFMeasurement;
   bool m_bSkipTruthMatchCheck;
   //bool m_bNoMultiprong;
   bool m_bUseIDExclusiveSF;
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyEleIDTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyEleIDTool.h
index c782a31b89b54494985902b6848de8fbc0d99819..0c4e0cc733830495ab2e1909bb30afa6594b703e 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyEleIDTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyEleIDTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_TAUEFFICIENCYELEIDTOOL_H
 #define TAUANALYSISTOOLS_TAUEFFICIENCYELEIDTOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyJetIDTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyJetIDTool.h
index c50b324076b6c00e55b455aab250b64f4e839033..c9bf8705f9a7eaa536ee2027a35ea5a442eabd74 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyJetIDTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauEfficiencyJetIDTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_TAUEFFICIENCYJETIDTOOL_H
 #define TAUANALYSISTOOLS_TAUEFFICIENCYJETIDTOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauOverlappingElectronLLHDecorator.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauOverlappingElectronLLHDecorator.h
index e41a6eb48dc02ce5cde68f437a411562f0eca495..9e833f027bea63757e768a7d7b71aceed80249ab 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauOverlappingElectronLLHDecorator.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauOverlappingElectronLLHDecorator.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_TAUOVERLAPPINGELECTRONLLHDECORATOR_H
 #define TAUANALYSISTOOLS_TAUOVERLAPPINGELECTRONLLHDECORATOR_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h
index 7d0596799734bdefca580f4a2c2cec1950c150db..b22870789b1bd335636fd8f125c9fdb0d5e9eb13 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSelectionTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_TAUSELECTIONTOOL_H
 #define TAUANALYSISTOOLS_TAUSELECTIONTOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingRun1Tool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingRun1Tool.h
index 157f21d698496d545eb74fa5cb185e6309b494f2..93f01d6b5fe87c2609035562ef7eeaa5982a7de9 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingRun1Tool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingRun1Tool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_TAUSMEARINGRUN1TOOL_H
 #define TAUANALYSISTOOLS_TAUSMEARINGRUN1TOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingTool.h
index d4940a6eb9a509b1f02f2f1cc7df86114b0739d5..d3d79702bfcc14b29f02cfcd58f48ed5d393c539 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauSmearingTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLS_TAUSMEARINGTOOL_H
 #define TAUANALYSISTOOLS_TAUSMEARINGTOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauTruthMatchingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauTruthMatchingTool.h
index df51ebf1a9b51c546863d7b29ec792dbc42a463b..042a537ffe54950149861870dba5544c7ad384c3 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauTruthMatchingTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauTruthMatchingTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef  TAUANALYSISTOOLS_TAUTRUTHMATCHINGTOOL_H
 #define  TAUANALYSISTOOLS_TAUTRUTHMATCHINGTOOL_H
 
@@ -16,41 +17,23 @@
                     https://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/README.rst
 */
 
-// Framework include(s):
-#include "AsgTools/AsgMetadataTool.h"
-#include "AsgTools/AnaToolHandle.h"
-
-// Core include(s):
-#include "TruthUtils/PIDHelpers.h"
-#include "MCTruthClassifier/IMCTruthClassifier.h"
-
-// EDM include(s):
-#include "xAODTau/TauxAODHelpers.h"
-#include "xAODJet/JetContainer.h"
-
 // Local include(s):
 #include "TauAnalysisTools/ITauTruthMatchingTool.h"
+#include "TauAnalysisTools/BuildTruthTaus.h"
 
 namespace TauAnalysisTools
 {
 
-enum eSampleType
-{
-  OTHER            = 0,
-  PYTHIA           = 1,
-  SHERPA           = 2,
-};
-
-
 class TauTruthMatchingTool
-  : public virtual TauAnalysisTools::ITauTruthMatchingTool
-  , public asg::AsgMetadataTool
+  : public virtual TauAnalysisTools::BuildTruthTaus
+  , public virtual TauAnalysisTools::ITauTruthMatchingTool
 {
   /// Create a proper constructor for Athena
-  ASG_TOOL_CLASS( TauTruthMatchingTool,
-                  TauAnalysisTools::ITauTruthMatchingTool )
+  ASG_TOOL_CLASS2( TauTruthMatchingTool,
+                   TauAnalysisTools::IBuildTruthTaus,
+                   TauAnalysisTools::ITauTruthMatchingTool )
 
-public:
+public:                         // Interface functions
 
   TauTruthMatchingTool( const std::string& name );
 
@@ -59,11 +42,8 @@ public:
   // initialize the tool
   virtual StatusCode initialize() override final;
 
-  // get TruthTauContainer
-  virtual xAOD::TruthParticleContainer* getTruthTauContainer() override final;
-
-  // get TruthTauAuxContainer
-  virtual xAOD::TruthParticleAuxContainer* getTruthTauAuxContainer() override final;
+  // get pointer to the truth matched particle, if no truth particle was found a null pointer is returned
+  virtual const xAOD::TruthParticle* getTruth(const xAOD::TauJet& xTau) override final;
 
   // apply match to a single tau
   virtual const xAOD::TruthParticle* applyTruthMatch(const xAOD::TauJet& xTau) override final;
@@ -71,18 +51,8 @@ public:
   // apply match to all taus in a vector
   virtual std::vector<const xAOD::TruthParticle*> applyTruthMatch(const std::vector<const xAOD::TauJet*>& vTaus) override final;
 
-  // set pointer to truth particle container
-  virtual StatusCode setTruthParticleContainer(const xAOD::TruthParticleContainer* xTruthParticleContainer)  override final __attribute__ ((deprecated("This function is deprecated. Please remove it from your code and use the configurable property \"TruthParticlesContainerName\" instead.\nFor further information please refer to the README:\nhttps://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/doc/README-TauTruthMatchingTool.rst")));
-
-  // set pointer to event
-  virtual StatusCode initializeEvent() override final __attribute__ ((deprecated("This function is deprecated. Please remove it from your code.\nFor further information please refer to the README:\nhttps://svnweb.cern.ch/trac/atlasoff/browser/PhysicsAnalysis/TauID/TauAnalysisTools/trunk/doc/README-TauTruthMatchingTool.rst")));
-
-  // get pointer to truth tau, if no truth tau was found a null pointer is returned
-  virtual const xAOD::TruthParticle* getTruth(const xAOD::TauJet& xTau) override final;
-
-  StatusCode buildTruthTausFromTruthParticles() override final;
-  StatusCode retrieveTruthTaus() override final;
-
+public:                         // Wrapper functions
+  
   // wrapper function to get truth tau visible TLorentzvector
   virtual TLorentzVector getTruthTauP4Vis(const xAOD::TauJet& xTau) override final;
   virtual TLorentzVector getTruthTauP4Vis(const xAOD::TruthParticle& xTruthTau) override final;
@@ -106,80 +76,22 @@ public:
   virtual xAOD::TauJetParameters::DecayMode getDecayMode(const xAOD::TauJet& xTau) override final;
   virtual xAOD::TauJetParameters::DecayMode getDecayMode(const xAOD::TruthParticle& xTruthTau) override final;
 
-private:
-
-  // Execute at each event
-  virtual StatusCode beginEvent() override final;
-
-  int getNumPdgId(const xAOD::TauJet& xTau, std::vector<int> vPdgIdMatch) const;
-  int getNumPdgId(const xAOD::TruthParticle& xTruthTau, std::vector<int> vPdgIdMatch) const;
-
-  StatusCode findTruthTau(const xAOD::TauJet& xTau) const;
-
-  StatusCode examineTruthTau(const xAOD::TruthParticle& xTruthParticle);
-  StatusCode examineTruthTauDecay(const xAOD::TruthParticle& xTruthParticle);
-  void printDecay(const xAOD::TruthParticle& xTruthParticle, int depth = 0) const;
+private:                        // private helper functions
 
+  StatusCode findTruthTau(const xAOD::TauJet& xTau);
   StatusCode checkTruthMatch (const xAOD::TauJet& xTau, const xAOD::TruthParticleContainer& xTauContainer) const;
 
-private:
-  bool m_bIsData;
-  bool m_bIsConfigured;
-
-  const xAOD::TruthParticleContainer* m_xTruthParticleContainer;
-  const xAOD::TruthParticleContainer* m_xTruthTauContainerConst;
-  const xAOD::TruthParticleContainer* m_xTruthMuonContainerConst;
-  const xAOD::TruthParticleContainer* m_xTruthElectronContainerConst;
-  const xAOD::JetContainer* m_xTruthJetContainerConst;
-  xAOD::TruthParticleContainer* m_xTruthTauContainer;
-  xAOD::TruthParticleAuxContainer* m_xTruthTauAuxContainer;
+private:                        // steering variables
 
-  // steering variables
   double m_dMaxDeltaR;
-  bool m_bWriteTruthTaus;
-  std::string m_sNewTruthTauContainerName;
-  std::string m_sNewTruthTauContainerNameAux;
-  std::string m_sTruthTauContainerName;
-  std::string m_sTruthMuonContainerName;
-  std::string m_sTruthElectronContainerName;
-  std::string m_sTruthJetContainerName;
-  std::string m_sTruthParticlesContainerName;
-
-  bool m_bTruthTauAvailable;
-  bool m_bTruthMuonAvailable;
-  bool m_bTruthElectronAvailable;
-  bool m_bTruthJetAvailable;
-
-  bool m_bWriteInvisibleFourMomentum;
-  bool m_bWriteVisibleChargedFourMomentum;
-  bool m_bWriteVisibleNeutralFourMomentum;
-  bool m_bWriteDecayModeVector;
-
-  size_t m_iNChargedPions;
-  size_t m_iNNeutralPions;
-  size_t m_iNChargedOthers;
-  size_t m_iNNeutralOthers;
-  size_t m_iNChargedDaughters;
-  std::vector<int> m_vDecayMode;
-
-  TLorentzVector m_vTruthVisTLV;
-  TLorentzVector m_vTruthVisTLVCharged;
-  TLorentzVector m_vTruthVisTLVNeutral;
-
-  bool m_bIsHadronicTau;
-
-private:
-  mutable bool m_bIsTruthMatchedAvailable;
-  mutable bool m_bIsTruthMatchedAvailableChecked;
-  mutable bool m_bNewEvent;
+
+private:                        // private helper variables
 
   SG::AuxElement::ConstAccessor<double> m_accPtVis;
   SG::AuxElement::ConstAccessor<double> m_accEtaVis;
   SG::AuxElement::ConstAccessor<double> m_accPhiVis;
   SG::AuxElement::ConstAccessor<double> m_accMVis;
 
-  asg::AnaToolHandle<IMCTruthClassifier> m_tMCTruthClassifier;
-
 }; // class TauTruthMatchingTool
 
 }
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauTruthTrackMatchingTool.h b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauTruthTrackMatchingTool.h
index 11a13136cb369b75cab5fca270154a6ab21ba424..00a8bf3cbc3ceabb1e3f41165983ff665f3a2a3f 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauTruthTrackMatchingTool.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/TauTruthTrackMatchingTool.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef  TAUANALYSISTOOLS_TAUTRUTHTRACKMATCHINGTOOL_H
 #define  TAUANALYSISTOOLS_TAUTRUTHTRACKMATCHINGTOOL_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/selection.xml b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/selection.xml
index 2b1f07be412bad37ab8e6ebb81908a45fb4ebc43..769f6ff55d5be744f2cd83f81d1a1ddafb90f320 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/selection.xml
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/TauAnalysisTools/selection.xml
@@ -4,9 +4,13 @@
   <class name="TauAnalysisTools::TauEfficiencyCorrectionsTool" />
   <class name="TauAnalysisTools::TauSelectionTool" />
   <class name="TauAnalysisTools::TauSmearingTool" />
+  <class name="TauAnalysisTools::BuildTruthTaus" />
   <class name="TauAnalysisTools::TauTruthMatchingTool" />
   <class name="TauAnalysisTools::TauTruthTrackMatchingTool" />
   <class name="TauAnalysisTools::TauOverlappingElectronLLHDecorator" />
+  <class name="TauAnalysisTools::CommonDiTauEfficiencyTool" />
+  <class name="TauAnalysisTools::DiTauEfficiencyCorrectionsTool" />
+  <class name="TauAnalysisTools::DiTauTruthMatchingTool" />
   <function pattern="TauAnalysisTools::split*"/>
   <function pattern="TauAnalysisTools::testFileForEOFContainsCharacters*"/>
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-DiTauEfficiencyCorrectionsTool.rst b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-DiTauEfficiencyCorrectionsTool.rst
new file mode 100644
index 0000000000000000000000000000000000000000..da61f3bb6fff41eac0fef80238c2981c1feaadf5
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-DiTauEfficiencyCorrectionsTool.rst
@@ -0,0 +1,165 @@
+==============================
+DiTauEfficiencyCorrectionsTool
+==============================
+
+:authors: David Kirchmeier
+:contact: david.kirchmeier@cern.ch
+
+.. contents:: Table of contents
+
+-------
+Preface
+-------
+
+**NOTE:** To use this tool it is necessary that the decoration
+``IsTruthHadronic`` is available for each boosted di-tau candidate. 
+This information is decorated by `DiTauTruthMatchingTool <README-DiTauTruthMatchingTool.rst>`_, which should run before DiTauEfficiencyCorrectionsTool.
+
+------------
+Introduction
+------------
+
+This tool aims to provide nominal and systematically varied efficiency scale
+factors for boosted di-tau reconstruction and identification. 
+
+For the tool the following line needs to be added to include the header file::
+
+  #include "TauAnalysisTools/DiTauEfficiencyCorrectionsTool.h"
+
+The tool is in general created and initialized by::
+
+  TauAnalysisTools::DiTauEfficiencyCorrectionsTool DiTauEffTool( "DiTauEfficiencyCorrectionsTool" );
+  DiTauEffTool.initialize();
+
+Scale factors can be decorated to the boosted di-tau or retrieved from the tool by::
+  
+  DiTauEffTool.applyEfficiencyScaleFactor(xDiTau);                                     // either directly appending scale factors to the xAOD di-tau auxiliary store
+  DiTauEffTool.getEfficiencyScaleFactor(xDiTau, dEfficiencyScaleFactor);               // or storing fake factors in variable dEfficiencyScaleFactor
+
+The variable names for the scale factors have default values, but can be
+configured. For information on this please refer to the `section Available
+properties <README-DiTauEfficiencyCorrectionsTool.rst#available-properties>`_
+below.
+
+This configures the set of ``EfficiencyCorrectionTypes`` and if needed the jet
+(electron) ID working points, depending on the applied cuts.  Please note, that
+the tool is only able to see the configuration of the passed TauSelectionTool,
+any selection applied outside the passed tool (e.g. harder jet ID, ID control
+regions etc...) will not be taken into account.
+
+A set of recommended systematic variations can in general be retrieved by
+calling::
+
+  CP::SystematicSet recommendedSystematicSet = TauEffTool.recommendedSystematics();
+
+which gives at the moment only the systematics for boosted di-tau identification.
+
+--------------------
+Available properties
+--------------------
+
+Overview
+========
+
+The tool can be used to retrieve scale factors for a specific
+``RecommendationTag``. For the default ``RecommendationTag`` "2017-moriond" the following properties are available for tool steering:
+
+.. list-table::
+   :header-rows: 1
+   :widths: 25 10 55
+
+   * - property name
+     - type
+     - default value
+ 
+   * - ``EfficiencyCorrectionTypes``
+     - ``std::vector<int>``
+     - ``{SFJetIDHadTau}``
+
+   * - ``InputFilePathJetIDHadTau``
+     - ``std::string``
+     - ``"TauAnalysisTools/"+ <SharedFilesVersion> +"EfficiencyCorrections/JetID_TrueHadDiTau_2017-prerec.root"``
+
+   * - ``VarNameJetIDHadTau``
+     - ``std::string``
+     - ``"DiTauScaleFactorJetIDHadTau"``
+
+Details
+=======
+
+EfficiencyCorrectionTypes
+-------------------------
+
+The following enum for the property
+``EfficiencyCorrectionTypes`` can be used to obtain the corresponding scale
+factor:
+
+* SFJetIDHadTau: scale factors for boosted di-tau jet identification of true hadronic tau decays
+
+The InputFilePath* strings are predefined to load the files in
+/afs/cern.ch/atlas/www/GROUPS/DATABASE/GroupData/ or
+/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/ using PathResolver, but own
+files can be used as well. If you plan to do this, please contact the author as
+there are requirements on the input file for some EfficiencyCorrectionTypes. For
+documentation on PathResolver please refer to
+https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/PathResolver.
+
+The variable names VarName* for the scale factor decorations are only available
+if the corresponding type is requested in ``EfficiencyCorrectionTypes``.
+
+SFJetIDHadTau
+-------------
+
+Jet ID scale factors are provided for a couple of working points:
+
+.. list-table::
+   :header-rows: 1
+   :widths: 5 10
+
+   * - value
+     - description
+
+   * - ``JETIDBDTLOOSE``
+     - corresponding to a cut on jet BDT score > 0.72
+
+   * - ``JETIDBDTTIGHT``
+     - corresponding to a cut on jet BDT score > 0.77
+
+These can be accessed, for example via::
+
+  TauEffTool.setProperty("IDLevel", (int)JETIDBDTLOOSE);
+
+
+Scale Factor Extraction
+=========================
+
+This is minimal code example on how to extract scale factors (including systematic variations) for a list of recommended systematics::
+
+  for (auto sSystematicSet: DiTauEffTool->recommendedSystematics())
+  {
+    ANA_CHECK( DiTauEffTool->applySystematicVariation(sSystematicSet));
+    ANA_CHECK( DiTauEffTool->applyEfficiencyScaleFactor(*xDiTau) );
+    Info( "execute()",
+          "SystType %s: JetIDSF: %g",
+          sSystematicSet.name().c_str(),
+          xDiTau->auxdata< double >( "DiTauScaleFactorJetIDHadTau" ));
+  }
+
+
+----------
+Navigation
+----------
+
+* `TauAnalysisTools <../README.rst>`_
+
+  * `TauSelectionTool <README-TauSelectionTool.rst>`_
+  * `TauSmearingTool <README-TauSmearingTool.rst>`_
+  * `TauEfficiencyCorrectionsTool <README-TauEfficiencyCorrectionsTool.rst>`_
+
+    * `mc12 recommendations <README-TauEfficiencyCorrectionsTool-mc12.rst>`_ 
+    * `mc15 pre-recommendations <README-TauEfficiencyCorrectionsTool-mc15_pre-recommendations.rst>`_
+    * `TauEfficiencyCorrectionsTool Trigger <README-TauEfficiencyCorrectionsTool_Trigger.rst>`_
+  
+  * `TauTruthMatchingTool <README-TauTruthMatchingTool.rst>`_
+  * `TauTruthTrackMatchingTool <README-TauTruthTrackMatchingTool.rst>`_
+  * `TauOverlappingElectronLLHDecorator <README-TauOverlappingElectronLLHDecorator.rst>`_
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-DiTauTruthMatchingTool.rst b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-DiTauTruthMatchingTool.rst
new file mode 100644
index 0000000000000000000000000000000000000000..455d666dcdb00f0e0f5809ff0c6de7ceb0172f59
--- /dev/null
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-DiTauTruthMatchingTool.rst
@@ -0,0 +1,128 @@
+========================
+DiTauTruthMatchingTool
+========================
+
+:authors: David Kirchmeier
+:contact: david.kirchmeier@cern.ch
+
+.. contents:: Table of contents
+
+**NOTE:** To use this tool it is necessary that the decoration
+``n_subjets`` is available for each boosted di-tau candidate. 
+This information is decorated by `tauRecTools/DiTauIDVarCalculator <https://svnweb.cern.ch/trac/atlasoff/browser/Reconstruction/tauRecTools/tags/tauRecTools-00-00-12-21/Root/DiTauIDVarCalculator.cxx>`_, which should run before DiTauTruthMatchingTool.
+
+------------
+Introduction
+------------
+
+This tool performs a truth matching for reconstructed boosted di-tau candidates. 
+Most of the functionality of this tool is adapted from `TauTruthMatchingTool <README-TauTruthMatchingTool.rst>`_. This tool searches for truth taus, muons and electrons which are matching to subjets of boosted di-tau candidates. A di-tau candidate is considered as ``"IsTruthMatched"`` when the leading subjet as well subleading subjet is matching to truth leptons within a certain delta R cone. When both subjets are matching to different truth hadronic tau decays, this candidate is additionally considered as ``"IsTruthHadronic"``. Those information are decorated to the xAOD DiTauJet.
+
+The tool needs to include the following header file::
+
+  #include "TauAnalysisTools/DiTauTruthMatchingTool.h"
+
+The tool needs to be initialized at least in this way::
+
+  DiTauTruthMatchingTool* DiTauTruthMatchingTool = new TauTruthMatchingTool("DiTauTruthMatchingTool");
+  DiTauTruthMatchingTool->initialize();
+
+The truth match is made with an upper cut on DeltaR between the reconstructed
+ditau subjet and the visible 4-momentum of the truth tau, electron or
+muon. The default value is DeltaR=0.2. However, one can adjust this value via::
+
+  DiTauTruthMatchingTool->setProperty("MaxDeltaR", .2);
+
+The tool checks itself if there is already a TruthTau container stored in the
+file or generates the TruthTau container if necessary. (For more information see `TauTruthMatchingTool <README-TauTruthMatchingTool.rst>`_).
+
+The truth matching is done for either a single xAOD DiTauJet object or for a DiTauJets container with these functions::
+
+  void DiTauTruthMatchingTool::applyTruthMatch(const xAOD::DiTauJet& xDiTau);
+  void DiTauTruthMatchingTool::applyTruthMatch(const std::vector<const xAOD::DiTauJet*>& vDiTaus);
+
+
+------------------
+Tool configuration
+------------------
+
+.. list-table::
+   :header-rows: 1
+
+   * - property name
+     - default value
+     - explanation
+
+   * - MaxDeltaR
+     - 0.2
+     - Maximum delta R between reconstructed tau and truth
+
+   * - TruthTauContainerName
+     - TruthTaus
+     - Name of truth tau container within the xAOD file
+
+   * - TruthMuonContainerName
+     - TruthMuons
+     - Name of truth muon container within the xAOD file
+
+   * - TruthElectronContainerName
+     - TruthElectrons
+     - Name of truth electron container within the xAOD file
+
+   * - TruthJetContainerName
+     - AntiKt4TruthJets
+     - Name of truth jet container within the xAOD file
+
+   * - TruthParticlesContainerName
+     - TruthParticles
+     - Name of truth particles container within the xAOD file needed if truth
+       tau container needs to be created
+
+   * - WriteTruthTaus
+     - false
+     - switching this option to 'true' writes the created container (only in
+       case it is not found in the event store and thus newly created) to the
+       event store
+
+   * - NewTruthTauContainerName
+     - TruthTaus
+     - Name of the newly created truth tau container if WriteTruthTaus == true
+
+------
+Output
+------
+
+Calling applyTruthMatch(xDiTau) adds a vector of element links to the truth lepton
+particle as decoration: ``truthParticleLink``. Those can be accessed via::
+
+  auto vElementLinks = xDiTau.auxdata<std::vector<ElementLink<xAOD::TruthParticleContainer>>>("truthParticleLinks");
+
+In addition two variables of type char are decorated to the DiTauJet 
+
+* ``IsTruthMatched`` indicating if two leading subjets match to truth leptons
+* ``IsTruthHadronic`` indicating if two leading subjets match to truth hadronic tau decays
+
+After calling applyTruthMatch(xDiTau) those information can be retrieved via::
+
+  bool bMatched = (bool)xDiTau.auxdata<char>("IsTruthMatched")
+  bool bHadronic = (bool)xDiTau.auxdata<char>("IsTruthHadronic")
+
+
+----------
+Navigation
+----------
+
+* `TauAnalysisTools <../README.rst>`_
+
+  * `TauSelectionTool <README-TauSelectionTool.rst>`_
+  * `TauSmearingTool <README-TauSmearingTool.rst>`_
+  * `TauEfficiencyCorrectionsTool <README-TauEfficiencyCorrectionsTool.rst>`_
+
+    * `mc12 recommendations <README-TauEfficiencyCorrectionsTool-mc12.rst>`_
+    * `mc15 pre-recommendations <README-TauEfficiencyCorrectionsTool-mc15_pre-recommendations.rst>`_
+    * `TauEfficiencyCorrectionsTool Trigger <README-TauEfficiencyCorrectionsTool_Trigger.rst>`_
+
+  * `TauTruthMatchingTool <README-TauTruthMatchingTool.rst>`_
+  * `TauTruthTrackMatchingTool <README-TauTruthTrackMatchingTool.rst>`_
+  * `TauOverlappingElectronLLHDecorator <README-TauOverlappingElectronLLHDecorator.rst>`_
+
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauEfficiencyCorrectionsTool.rst b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauEfficiencyCorrectionsTool.rst
index 9a2386d1ba7c74c1bb5e5783aca1597f056c543e..35427847a5f764cd8788d6b712b8f011fd85e4f2 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauEfficiencyCorrectionsTool.rst
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauEfficiencyCorrectionsTool.rst
@@ -1,7 +1,3 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
 ============================
 TauEfficiencyCorrectionsTool
 ============================
@@ -22,15 +18,7 @@ accessible. I.e. if the linking is done in derivations to the TruthTau
 container, the ``TruthTaus`` and ``TruthElectrons`` container must be kept. For
 more information on how to achieve this, please refer to the `tau
 pre-recommendations TWiki
-<https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TauPreRecommendations2015#Accessing_Tau_Truth_Information>`_
-
-**IMPORTANT: If you used TauTruthMatchingTool-00-01-06 or older, for example
-within the derivation, the variable** ``truthParticleLink`` **is bugged. This
-can be fixed by rerunning the truth matching with a newer tag, i.e. before
-accessing efficiency corrections you have to call for each tau**::
-
-  xAOD::TruthParticle* TauTruthMatchingTool::getTruth(const xAOD::TauJet& xTau)
-
+<https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/TauPreRecommendations2015#Accessing_Tau_Truth_Information>`_.
 For more information on truth matching please refer to `TauTruthMatchingTool
 <README-TauTruthMatchingTool.rst>`_.
 
@@ -44,7 +32,7 @@ trigger efficiency scale factors are provided by this tool, but there are some
 differences to the other scale factors. For more information on how to use the
 tool for trigger scale factors please refer to the `TauEfficiencyCorrectionsTool
 -- Trigger readme <README-TauEfficiencyCorrectionsTool_Trigger.rst>`_. Please
-note that this documentation lists is only valid for the latest recommendations.
+note that this documentation is only valid for the latest recommendations.
 More information for older recommendations can be found following the links
 listed in `Section Special Notes on older recommendations
 <README-TauEfficiencyCorrectionsTool.rst#special-notes-on-older-recommendations>`_.
@@ -195,6 +183,10 @@ In addition the following properties are available for further configurations:
      - ``std::string``
      - ``"2016"``
      
+   * - ``TriggerSFMeasurement``
+     - ``std::string``
+     - ``"combined"``
+     
    * - ``UseIDExclusiveSF``
      - ``bool``
      - ``false``
@@ -237,7 +229,7 @@ Details
 EfficiencyCorrectionTypes
 -------------------------
 
-the default value for ``RecommendationTag`` the following enums for the property
+The following enums for the property
 ``EfficiencyCorrectionTypes`` can be used to obtain the corresponding scale
 factors:
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauEfficiencyCorrectionsTool_Trigger.rst b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauEfficiencyCorrectionsTool_Trigger.rst
index 1251680413e3e7205cc26e77ef5a4bdf79885b5f..65911100a3d653988d3ce5219431d5adb43d6fe5 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauEfficiencyCorrectionsTool_Trigger.rst
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauEfficiencyCorrectionsTool_Trigger.rst
@@ -63,6 +63,9 @@ like::
 
   CHECK(TauTriggerEffTool.setProperty("TriggerYear", "2015" ));
 
+The final trigger scale factors for 2016 data are extracted from three different measurements: Ztautau, ttbar and their combination. With ``TriggerSFMeasurement`` property one can choose between those measurements. Plots summarizing the trigger SF distributions are available here: https://qbuat-trigger.web.cern.ch/qbuat-trigger/tau_trigger_20.7_final/lmt_overlayed/index.html 
+
+
 --------------------
 Available properties
 --------------------
@@ -88,7 +91,7 @@ one needs a separate tool instance with at least the following configuration:
      - ``std::string``
      - ``"2016"``
      - year of data taking, not necessary if PileupReweightingTool Property is used
-	 
+   
    * - ``PileupReweightingTool``
      - ``ToolHandle<CP::PileupReweightingTool>``
      - empty
@@ -100,6 +103,12 @@ one needs a separate tool instance with at least the following configuration:
      - ``JETIDBDTMEDIUM`` 
      - level of offline ID, it is the same property as for jet ID scale
        factors. A list of supported values can be found below
+    
+   * - ``TriggerSFMeasurement``
+     - ``std::string``
+     - ``"combined"``
+     - choose between the measurements from which scale factors are extracted from. Options are: ``"combined"``, ``"Ztautau"`` and ``"ttbar"``
+
 
 In addition the variable ``EfficiencyCorrectionTypes`` needs to be set to the
 value ``std::vector<int>({SFTriggerHadTau})``
@@ -108,6 +117,24 @@ value ``std::vector<int>({SFTriggerHadTau})``
 Overview of Variations
 ----------------------
 
+2017 Moriond
+---------
+
+The recommended systematic variations are as of now for 2015 or 2016 as
+indicated by the postfix number:
+
+* ``TAUS_TRUEHADTAU_EFF_TRIGGER_STATDATA2015``
+* ``TAUS_TRUEHADTAU_EFF_TRIGGER_STATMC2015``
+* ``TAUS_TRUEHADTAU_EFF_TRIGGER_SYST2015``
+* ``TAUS_TRUEHADTAU_EFF_TRIGGER_STATDATA2016``
+* ``TAUS_TRUEHADTAU_EFF_TRIGGER_STATMC2016``
+* ``TAUS_TRUEHADTAU_EFF_TRIGGER_SYST2016``
+
+The following additional systematic variations are also available (**NOT recommended**):
+
+* ``TAUS_TRUEHADTAU_EFF_TRIGGER_TOTAL2015``
+* ``TAUS_TRUEHADTAU_EFF_TRIGGER_TOTAL2016``
+
 2016 fall
 ---------
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst
index dbb89808d1c9fff2070590e6f3966f49303ecb2a..c0ac6d7648248f430891b69a814970c33fa90acf 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/doc/README-TauSelectionTool.rst
@@ -1,7 +1,3 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
 ================
 TauSelectionTool
 ================
@@ -216,6 +212,12 @@ setup:
      - if ``MuonVeto == true``, accepting taus passing the muon veto
      - should only be used for run 1 analysis
 
+   * - ``CutMuonOLR``
+     - ``MuonOLR``
+     - ``bool``
+     - if ``MuonOLR == true``, removing tau overlapped with muon satisfying pt>2GeV and not calo-tagged
+     - should only be used for run 2 analysis
+
 Currently implemented working points for ``CutJetIDWP`` are:
 
 .. list-table::
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/src/TauAnalysisToolsExampleAthena.h b/PhysicsAnalysis/TauID/TauAnalysisTools/src/TauAnalysisToolsExampleAthena.h
index b4591d2bc56e86452973211d9d23c62036fdcb52..65fcee6323b280104e2e2ad27f8aae7176e31bd4 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/src/TauAnalysisToolsExampleAthena.h
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/src/TauAnalysisToolsExampleAthena.h
@@ -1,8 +1,9 @@
+// Dear emacs, this is -*- c++ -*-
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// Dear emacs, this is -*- c++ -*-
 #ifndef TAUANALYSISTOOLSEXAMPLEATHENA_H
 #define TAUANALYSISTOOLSEXAMPLEATHENA_H
 
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/src/components/TauAnalysisTools_entries.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/src/components/TauAnalysisTools_entries.cxx
index 8fb5248c55985d279c64a46a00113c97cc842953..b370b191cdbfd73d149aa14e9ee8ebea2ed1676b 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/src/components/TauAnalysisTools_entries.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/src/components/TauAnalysisTools_entries.cxx
@@ -17,6 +17,7 @@
 #include "TauAnalysisTools/TauEfficiencyTriggerTool.h"
 #include "TauAnalysisTools/TauOverlappingElectronLLHDecorator.h"
 #include "../TauAnalysisToolsExampleAthena.h"
+#include "TauAnalysisTools/BuildTruthTaus.h"
 
 DECLARE_NAMESPACE_TOOL_FACTORY( TauAnalysisTools, CommonEfficiencyTool )
 DECLARE_NAMESPACE_TOOL_FACTORY( TauAnalysisTools, CommonSmearingTool )
@@ -31,6 +32,7 @@ DECLARE_NAMESPACE_TOOL_FACTORY( TauAnalysisTools, TauEfficiencyEleIDTool )
 DECLARE_NAMESPACE_TOOL_FACTORY( TauAnalysisTools, TauEfficiencyJetIDTool )
 DECLARE_NAMESPACE_TOOL_FACTORY( TauAnalysisTools, TauEfficiencyTriggerTool )
 DECLARE_NAMESPACE_TOOL_FACTORY( TauAnalysisTools, TauOverlappingElectronLLHDecorator )
+DECLARE_NAMESPACE_TOOL_FACTORY( TauAnalysisTools, BuildTruthTaus)
 
 DECLARE_NAMESPACE_ALGORITHM_FACTORY( TauAnalysisTools, TauAnalysisToolsExampleAthena )
 
@@ -49,6 +51,7 @@ DECLARE_FACTORY_ENTRIES( TauAnalysisTools )
   DECLARE_NAMESPACE_TOOL( TauAnalysisTools, TauEfficiencyJetIDTool )
   DECLARE_NAMESPACE_TOOL( TauAnalysisTools, TauEfficiencyTriggerTool )
   DECLARE_NAMESPACE_TOOL( TauAnalysisTools, TauOverlappingElectronLLHDecorator )
+  DECLARE_NAMESPACE_TOOL( TauAnalysisTools, BuildTruthTaus )
 
   DECLARE_NAMESPACE_ALGORITHM( TauAnalysisTools, TauAnalysisToolsExampleAthena )
 }
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx
index 06922223ecf385027e470ba558ada695e9243cf3..085313f798dc771c3b2cc5f4b85767b3748214f7 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/util/TauAnalysisToolsExample.cxx
@@ -120,7 +120,7 @@ int main( int argc, char* argv[] )
   const xAOD::TauJetContainer* xTauJetContainer = 0;
 
   CP::PileupReweightingTool* m_tPRWTool = new CP::PileupReweightingTool("PileupReweightingTool");
-  std::vector<std::string> vLumiCalcFiles = {"ilumicalc_histograms_HLT_tau160_medium1_tracktwo_297730-311481_OflLumi-13TeV-005.root"};
+  std::vector<std::string> vLumiCalcFiles = {"/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/dev/PileupReweighting/ilumicalc_histograms_HLT_e24_lhvloose_nod0_L1EM20VH_297730-304494_OflLumi-13TeV-005.root"};
   CHECK(m_tPRWTool->setProperty("LumiCalcFiles", vLumiCalcFiles));
   // CHECK(m_tPRWTool->setProperty("DefaultChannel", "" ));
   CHECK(m_tPRWTool->initialize());
@@ -133,12 +133,14 @@ int main( int argc, char* argv[] )
   TauSelTool->msg().setLevel( MSG::DEBUG );
   // preparation for control hisograms
   TauSelTool->setOutFile( fOutputFile.get() );
-  CHECK(TauSelTool->setProperty("CreateControlPlots", true ));
+  // CHECK(TauSelTool->setProperty("CreateControlPlots", true ));
   CHECK(TauSelTool->setProperty("MuonOLR", true ));
+  CHECK(TauSelTool->setProperty("JetIDWP", int(JETIDBDTMEDIUM) ));
   CHECK(TauSelTool->setProperty("PtMin", 20. ));
-  CHECK(TauSelTool->setProperty("EleBDTWP", int(ELEIDBDTLOOSE) ));
+  // CHECK(TauSelTool->setProperty("EleBDTWP", int(ELEIDBDTLOOSE) ));
   CHECK(TauSelTool->setProperty("ConfigPath", "" ));
-  CHECK(TauSelTool->setProperty("SelectionCuts", int(CutPt|CutMuonOLR|CutEleOLR|CutEleBDTWP) ));
+  // CHECK(TauSelTool->setProperty("SelectionCuts", int(CutPt|CutMuonOLR|CutEleOLR|CutEleBDTWP|CutJetIDWP) ));
+  CHECK(TauSelTool->setProperty("SelectionCuts", int(CutPt|CutMuonOLR|CutJetIDWP) ));
   CHECK(TauSelTool->setProperty("IgnoreAODFixCheck", true));
   CHECK(TauSelTool->setProperty("RecalcEleOLR", false));
   CHECK(TauSelTool->initialize());
@@ -195,6 +197,7 @@ int main( int argc, char* argv[] )
   CHECK(TauEffTrigTool.setProperty("TriggerName", "HLT_tau25_medium1_tracktwo" ));
   CHECK(TauEffTrigTool.setProperty("IDLevel", (int)JETIDBDTTIGHT ));
   CHECK(TauEffTrigTool.setProperty("PileupReweightingTool", m_tPRWToolHandle ));
+  CHECK(TauEffTrigTool.setProperty("TriggerSFMeasurement", "combined"));
   CHECK(TauEffTrigTool.initialize());
 
   // restructure all recommended systematic variations for efficiency tools
@@ -248,8 +251,9 @@ int main( int argc, char* argv[] )
     RETRIEVE(xAOD::TauJetContainer, xTauJetContainer, "TauJets");
     std::pair< xAOD::TauJetContainer*, xAOD::ShallowAuxContainer* >xTauShallowContainer = xAOD::shallowCopyContainer(*xTauJetContainer);
 
-    // copy truth particles to get truthparticle link for truth taus to work
-    CHECK( xEvent.copy("TruthParticles") );
+    // // copy truth particles to get truthparticle link for truth taus to work
+    if (xEvent.contains<xAOD::TruthParticleContainer>("TruthParticles"))
+      CHECK( xEvent.copy("TruthParticles") );
 
     // copy taus
     CHECK( xEvent.copy("TauJets") );
@@ -265,6 +269,7 @@ int main( int argc, char* argv[] )
 
       // perform truth matching
       auto xTruthTau = T2MT.getTruth(*xTau);
+      // if (xTau->pt() < 25*1000) continue;
 
       if ((bool)xTau->auxdata<char>("IsTruthMatched"))
       {
diff --git a/PhysicsAnalysis/TauID/TauTagTools/doc/packagedoc.h b/PhysicsAnalysis/TauID/TauTagTools/doc/packagedoc.h
index fca40bc93756dd8bd91227a327c4fbcc7817e816..40246eb08cf3be8e879f0c06d7383e41abf6c091 100644
--- a/PhysicsAnalysis/TauID/TauTagTools/doc/packagedoc.h
+++ b/PhysicsAnalysis/TauID/TauTagTools/doc/packagedoc.h
@@ -16,10 +16,6 @@ TauTagTools contains the following tools:
 
 - for questions and comments: ketevi@bnl.gov
 
-@section TauTagTools_used_packagesTauTagTools Used packages
 
-@section TauTagTools_requirementsTauTagTools Requirements
 
 */
-
-
diff --git a/PhysicsAnalysis/TauID/TauTrackEvent/doc/packagedoc.h b/PhysicsAnalysis/TauID/TauTrackEvent/doc/packagedoc.h
index ccd11381c0574f5bdf9d43a39bce8fe7ddf3f373..da3c891d37b817399748f927243c858643d290ad 100644
--- a/PhysicsAnalysis/TauID/TauTrackEvent/doc/packagedoc.h
+++ b/PhysicsAnalysis/TauID/TauTrackEvent/doc/packagedoc.h
@@ -20,14 +20,10 @@
  *
 @section TauTrackEvent_@section ExtrasTauTrackEvent Extra Pages
  *
- *      - @ref UsedTauTrackEvent
- *      - @ref requirementsTauTrackEvent
  *       */
 
 /**
- * @page UsedTauTrackEvent Used Packages
  * */
 
 /**
- * @page requirementsTauTrackEvent Requirements
  * */
diff --git a/PhysicsAnalysis/TileID/TileTripReader/CMakeLists.txt b/PhysicsAnalysis/TileID/TileTripReader/CMakeLists.txt
index 8e8a6c52de47c2890735c03f405fcb1e138b7de2..db66b437721713dae0368fc15509b67d8a356ccb 100644
--- a/PhysicsAnalysis/TileID/TileTripReader/CMakeLists.txt
+++ b/PhysicsAnalysis/TileID/TileTripReader/CMakeLists.txt
@@ -5,35 +5,54 @@
 # Declare the package name:
 atlas_subdir( TileTripReader )
 
+# Extra dependencies, based on the environment:
+set( extra_deps )
+if( XAOD_STANDALONE )
+   set( extra_deps Control/xAODRootAccess )
+else()
+   set( extra_deps Event/EventKernel Control/AthenaKernel Control/AthenaBaseComps GaudiKernel )
+endif()
+
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
                           PhysicsAnalysis/AnalysisCommon/PATCore
                           PRIVATE
-                          Control/AthenaKernel
-                          Event/EventKernel
                           Event/xAOD/xAODEventInfo
-                          GaudiKernel
                           Tools/PathResolver )
 
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 PyROOT )
 
 # Component(s) in the package:
-atlas_add_library( TileTripReaderLib
+if( XAOD_STANDALONE )
+        atlas_add_library( TileTripReaderLib
+                   Root/*.cxx
+                   PUBLIC_HEADERS TileTripReader
+                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                   LINK_LIBRARIES PATCoreLib
+                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} xAODEventInfo PathResolver )
+
+else()
+        atlas_add_library( TileTripReaderLib
                    Root/*.cxx
                    PUBLIC_HEADERS TileTripReader
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    LINK_LIBRARIES AthenaBaseComps PATCoreLib
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel EventKernel xAODEventInfo GaudiKernel PathResolver )
 
-atlas_add_component( TileTripReader
+        atlas_add_component( TileTripReader
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps PATCoreLib AthenaKernel EventKernel xAODEventInfo GaudiKernel PathResolver TileTripReaderLib )
+endif()
+
+atlas_add_dictionary( TileTripReaderDict
+   TileTripReader/TileTripReaderDict.h
+   TileTripReader/selection.xml
+   LINK_LIBRARIES ${ROOT_LIBRARIES} TileTripReaderLib )
 
-# Install files from the package:
+ # Install files from the package:
 atlas_install_joboptions( share/*.py )
 atlas_install_xmls( data/*.root )
 
diff --git a/PhysicsAnalysis/TileID/TileTripReader/Root/TTileTripReader.cxx b/PhysicsAnalysis/TileID/TileTripReader/Root/TTileTripReader.cxx
index 7173e9bd0ffcac0522080a822137009929c8af5d..9f7f8767d8e93a76ace23462855087fc894a0a36 100644
--- a/PhysicsAnalysis/TileID/TileTripReader/Root/TTileTripReader.cxx
+++ b/PhysicsAnalysis/TileID/TileTripReader/Root/TTileTripReader.cxx
@@ -25,9 +25,12 @@ const double width=2.*pi/64.;
 
 namespace Root{
 
-TTileTripReader::TTileTripReader(const char* name)
+TTileTripReader::TTileTripReader(const char*
 #ifndef ROOTCORE
+      name)
     : TSelectorToolBase(name),TCalculatorToolBase(name)
+#else
+      )
 #endif /*ROOTCORE*/
 {
     m_trips=new TChain("TripList");
diff --git a/PhysicsAnalysis/TileID/TileTripReader/TileTripReader/AthTileTripReader.h b/PhysicsAnalysis/TileID/TileTripReader/TileTripReader/AthTileTripReader.h
index 5ba491e9eb87ebdc10e8040f110803b4afb583cd..3898924975071d4848f9a90280696ac46046b135 100644
--- a/PhysicsAnalysis/TileID/TileTripReader/TileTripReader/AthTileTripReader.h
+++ b/PhysicsAnalysis/TileID/TileTripReader/TileTripReader/AthTileTripReader.h
@@ -77,9 +77,6 @@ private:
     Root::TAccept m_acceptDummy;
     Root::TResult m_resultDummy;
     double m_dR;
-    int m_verbosity;
-    
-
 };
 
 #endif	/* ATHTILETRIPREADER_H */
diff --git a/PhysicsAnalysis/TileID/TileTripReader/TileTripReader/TileTripReaderDict.h b/PhysicsAnalysis/TileID/TileTripReader/TileTripReader/TileTripReaderDict.h
new file mode 100644
index 0000000000000000000000000000000000000000..5be604e7225adef5c046c3643acf899f79d6abb2
--- /dev/null
+++ b/PhysicsAnalysis/TileID/TileTripReader/TileTripReader/TileTripReaderDict.h
@@ -0,0 +1 @@
+#include "TileTripReader/TTileTripReader.h"
diff --git a/PhysicsAnalysis/TileID/TileTripReader/TileTripReader/selection.xml b/PhysicsAnalysis/TileID/TileTripReader/TileTripReader/selection.xml
new file mode 100644
index 0000000000000000000000000000000000000000..663103a58e7a741666a521e741890fbd153dadef
--- /dev/null
+++ b/PhysicsAnalysis/TileID/TileTripReader/TileTripReader/selection.xml
@@ -0,0 +1,3 @@
+<lcgdict>
+  <class name="Root::TTileTripReader"/>
+</lcgdict>
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/author.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/author.txt
new file mode 100644
index 0000000000000000000000000000000000000000..6e3e80b1bfcdf7b22805935366e5f73b2f2f5217
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/author.txt
@@ -0,0 +1,2 @@
+Anthony Ciavarella: ciavarella.3@buckeyemail.osu.edu
+
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta1.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta1.txt
new file mode 100755
index 0000000000000000000000000000000000000000..765541334980cb98eb4cb2dca1b9e6195b536464
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta1.txt
@@ -0,0 +1,10 @@
+0.00360271
+3.33603e-005
+0.0062623
+0.0886328
+0.297893
+0.000589548
+0.0498912
+-0.154182
+0.0401085
+-7.69083e-005
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta2.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta2.txt
new file mode 100755
index 0000000000000000000000000000000000000000..432b49227a775559327d2c66cdc9bf45642daada
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta2.txt
@@ -0,0 +1,10 @@
+0.00285929
+3.30998e-005
+0.0089998
+0.14087
+0.646116
+0.00151672
+0.0562376
+-0.261209
+0.0453541
+-5.33366e-005
\ No newline at end of file
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta3.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta3.txt
new file mode 100755
index 0000000000000000000000000000000000000000..ed064381149ec7cb39a27a52425d2223873936bf
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta3.txt
@@ -0,0 +1,10 @@
+---
+---
+---
+---
+---
+---
+---
+---
+---
+---
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta4.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta4.txt
new file mode 100755
index 0000000000000000000000000000000000000000..9e4c9348ef442ef4b065665d100ab3a4def3a3a9
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Electrons_eta4.txt
@@ -0,0 +1,10 @@
+0.0107555
+-1.92758e-006
+-0.00459803
+0.448251
+0.123156
+0.000983448
+0.0488765
+-0.150587
+0.0360965
+-1.54525e-007
\ No newline at end of file
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Muons_eta1.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Muons_eta1.txt
new file mode 100755
index 0000000000000000000000000000000000000000..83d39e15703838c56c9505b0463b5fbcc2986431
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Muons_eta1.txt
@@ -0,0 +1,10 @@
+0.00385286
+8.31288e-005
+0.0159891
+0.000171618
+-0.00333832
+0.00195086
+0.040049
+-9.60121e-005
+0.056444
+-7.69121e-005
\ No newline at end of file
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Muons_eta2.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Muons_eta2.txt
new file mode 100755
index 0000000000000000000000000000000000000000..9073cf09790296385ae14c07bd1fa8173d1bd195
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Muons_eta2.txt
@@ -0,0 +1,10 @@
+0.0022281
+0.000126326
+0.0150487
+0.000275567
+0.116811
+0.000566139
+0.037807
+-0.000118265
+0.0681063
+-0.000284248
\ No newline at end of file
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Muons_eta3.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Muons_eta3.txt
new file mode 100755
index 0000000000000000000000000000000000000000..cbe730765103b5ce3f2fd21c036c207a7f8bfc3d
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_Muons_eta3.txt
@@ -0,0 +1,10 @@
+0.00287001
+0.000125558
+0.0307276
+0.00018951
+0.272824
+0.000759595
+0.0204579
+1.62599e-006
+0.0597898
+-1.73917e-005
\ No newline at end of file
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta1.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta1.txt
new file mode 100755
index 0000000000000000000000000000000000000000..4b5e90976b466e2ef49b357e3cb2e62d9ef92519
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta1.txt
@@ -0,0 +1,10 @@
+-0.000432154
+1.8055
+0.0240412
+1.40853
+0.478436
+7.89636
+-0.00017881
+1.20603
+0.231936
+-0.000168297
\ No newline at end of file
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta2.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta2.txt
new file mode 100755
index 0000000000000000000000000000000000000000..c72e304120f60d7e12780e97f5d558c2f535344f
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta2.txt
@@ -0,0 +1,10 @@
+-0.00379513
+3.30386
+0.0180834
+0.943906
+0.27372
+7.47193
+0.2495
+-1.09052
+0.216925
+-4.13625e-05
\ No newline at end of file
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta3.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta3.txt
new file mode 100755
index 0000000000000000000000000000000000000000..5375fa0914846e0f2b524dfd152afd688effc7ce
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta3.txt
@@ -0,0 +1,10 @@
+0.0148761
+2.62929
+0.0733037
+0.634043
+0.171434
+18.4382
+0.475686
+-4.38242
+0.190552
+9.55331e-005
\ No newline at end of file
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta4.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta4.txt
new file mode 100755
index 0000000000000000000000000000000000000000..0cf4adae1bf1d83f33dfce96160046cc77eb656c
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_bJets_eta4.txt
@@ -0,0 +1,10 @@
+0.000708911
+8.22719
+0.138447
+-0.544192
+0.111233
+95.2936
+0.608303
+-6.32026
+0.166763
+0.000197378
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta1.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta1.txt
new file mode 100755
index 0000000000000000000000000000000000000000..6850bccac1520121a6abdd98c613ba0205188ca1
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta1.txt
@@ -0,0 +1,10 @@
+0.0120801
+1.22818
+0.0489807
+0.418622
+0.409053
+10.2044
+-0.0556186
+1.26076
+0.215323
+-5.49251e-005
\ No newline at end of file
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta2.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta2.txt
new file mode 100755
index 0000000000000000000000000000000000000000..7b0ff93b0a6d42b985d901460e60f3c8930c0e37
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta2.txt
@@ -0,0 +1,10 @@
+0.0287369
+-0.783209
+0.0225738
+1.36549
+0.0621159
+1.05336
+0.238489
+-0.601056
+0.273594
+0.00024647
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta3.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta3.txt
new file mode 100755
index 0000000000000000000000000000000000000000..9dafd6064f9ac3d36340771ce711df9eddb309d7
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta3.txt
@@ -0,0 +1,10 @@
+0.140728
+-10.9913
+0.100472
+0.855606
+0.115908
+8.96468
+0.338261
+-2.77732
+0.310263
+-9.96212e-005
\ No newline at end of file
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta4.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta4.txt
new file mode 100755
index 0000000000000000000000000000000000000000..4716e0b8c178c1a8428aeec74b69b38497be1826
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_energy_lJets_eta4.txt
@@ -0,0 +1,10 @@
+0.0239971
+0.317509
+0.063023
+0.808414
+0.406621
+11.8981
+0.314448
+-1.73275
+0.148917
+0.000125134
diff --git a/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_misset.txt b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_misset.txt
new file mode 100755
index 0000000000000000000000000000000000000000..44f51d27122a3b324c17d22e77d7e4902ac6e09f
--- /dev/null
+++ b/PhysicsAnalysis/TopPhys/KLFitter/data/transferfunctions/13TeV/ttbar/mc15_PowhegPythia6_4j2b_v1/par_misset.txt
@@ -0,0 +1,4 @@
+20.97
+-4459
+-0.1928
+-3896
\ No newline at end of file
diff --git a/PhysicsAnalysis/TruthParticleID/McParticleAlgs/doc/packagedoc.h b/PhysicsAnalysis/TruthParticleID/McParticleAlgs/doc/packagedoc.h
index 2298acdeb1092567af4e6b0e3d194a7184f22b62..81fe6daaa0369e931e2ea8f890da993ab8180b01 100644
--- a/PhysicsAnalysis/TruthParticleID/McParticleAlgs/doc/packagedoc.h
+++ b/PhysicsAnalysis/TruthParticleID/McParticleAlgs/doc/packagedoc.h
@@ -1,4 +1,3 @@
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
-
diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt
index c38b29ec447a444710d4be761f9dd5e3af25b0ea..b6eea38576bafd3f6c0b9acba3f5ef0d8737405e 100644
--- a/Projects/AnalysisBase/externals.txt
+++ b/Projects/AnalysisBase/externals.txt
@@ -6,5 +6,5 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AnalysisBaseExternalsVersion = aa2d4807
+AnalysisBaseExternalsVersion = 8643cbb2
 
diff --git a/Projects/AnalysisTop/externals.txt b/Projects/AnalysisTop/externals.txt
index 0b212754df81d3de707aa9f114876d899c12945e..59f0188418445afd159f1ef525bd38386c52548b 100644
--- a/Projects/AnalysisTop/externals.txt
+++ b/Projects/AnalysisTop/externals.txt
@@ -1,4 +1,4 @@
 # Versions of the various externals to build before starting the build of
 # this project, when doing a full stack nightly build.
 
-AnalysisBaseExternalsVersion = aa2d4807
+AnalysisBaseExternalsVersion = 8643cbb2
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index 7a8dcd3f5d9d6031df3b2a185ffc623bf086c39f..c0305844cdf746ce2250ef5980b590b465842a01 100644
--- a/Projects/AthSimulation/externals.txt
+++ b/Projects/AthSimulation/externals.txt
@@ -6,8 +6,7 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthSimulationExternalsVersion = aa2d4807
-
+AthSimulationExternalsVersion = 8643cbb2
 
 # The version of atlas/Gaudi to use:
-GaudiVersion = v28r2.006
+GaudiVersion = v28r2.011
diff --git a/Projects/AthSimulation/externals/MCUtils.cmake b/Projects/AthSimulation/externals/MCUtils.cmake
index 5fd191cfe6159b5c67aef98b53b8d38960e2d47a..e6673db77efb7630eccc6cf2598e82638b79e9ef 100644
--- a/Projects/AthSimulation/externals/MCUtils.cmake
+++ b/Projects/AthSimulation/externals/MCUtils.cmake
@@ -2,6 +2,6 @@
 # File specifying the location of MCUtils to use.
 #
 
-set( MCUTILS_VERSION 1.2.1 )
+set( MCUTILS_VERSION 1.3.0 )
 set( MCUTILS_ROOT
    ${LCG_RELEASE_DIR}/MCGenerators/mcutils/${MCUTILS_VERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthSimulation/package_filters.txt b/Projects/AthSimulation/package_filters.txt
index e7b77dcacb8554610d1a3c8816bd65887d45e04e..f872045ef9b8d3c820a53513c7338db4e2888cf0 100644
--- a/Projects/AthSimulation/package_filters.txt
+++ b/Projects/AthSimulation/package_filters.txt
@@ -162,6 +162,7 @@
 + External/AtlasPyFwdBwdPorts
 + External/CheckerGccPlugins
 + External/pyAMI
++ Generators/GenInterfaces
 + Generators/GeneratorObjects
 + Generators/GeneratorObjectsAthenaPool
 + Generators/GeneratorObjectsTPCnv
@@ -327,6 +328,7 @@
 + TileCalorimeter/TileG4/TileAncillary/DeadMaterial
 + TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator
 + TileCalorimeter/TileG4/TileAncillary/TileG4DetDescr
++ TileCalorimeter/TileG4/TileG4Interfaces
 + TileCalorimeter/TileG4/TileGeoG4Calib
 + TileCalorimeter/TileG4/TileGeoG4SD
 + TileCalorimeter/TileGeoModel
diff --git a/Projects/Athena/CMakeLists.txt b/Projects/Athena/CMakeLists.txt
index 048050720d85bd02fd0f7e0456303cb95e6c4e5b..65fafc0ba4ddf44e8772fe0b06ad392fa2438c0b 100644
--- a/Projects/Athena/CMakeLists.txt
+++ b/Projects/Athena/CMakeLists.txt
@@ -1,4 +1,3 @@
-
 # The minimum required CMake version:
 cmake_minimum_required( VERSION 3.2 FATAL_ERROR )
 
@@ -11,16 +10,30 @@ set( ATHENA_PROJECT_VERSION ${_version}
 unset( _version )
 
 # Set the versions of the TDAQ externals to pick up for the build:
-set( TDAQ-COMMON_VERSION "02-02-00" )
+if( NOT LCG_NIGHTLY )
+   if( NOT "$ENV{LCG_NIGHTLY}" STREQUAL "" )
+       set( LCG_NIGHTLY $ENV{LCG_NIGHTLY} CACHE STRING "LCG nightly build flavor" )
+       message( STATUS "Using LCG_NIGHTLY: ${LCG_NIGHTLY}" )
+   endif()
+endif()
+ 
+# Set the versions of the TDAQ externals to pick up for the build:
+if( LCG_NIGHTLY )
+    # TDAQ_RELEASE_BASE should be set to a NIGHTLY TDAQ build!
+    set( TDAQ-COMMON_VERSION "99-00-00" )
+    set( DQM-COMMON_VERSION "99-00-00" )
+    set( TDAQ_VERSION "99-00-00" )
+else()
+    set( TDAQ-COMMON_VERSION "02-02-00" )
+    set( DQM-COMMON_VERSION "01-02-00" )
+    set( TDAQ_VERSION "07-01-00" )
+endif()
+
 set( TDAQ-COMMON_ROOT
    "$ENV{TDAQ_RELEASE_BASE}/tdaq-common/tdaq-common-${TDAQ-COMMON_VERSION}" )
-
-set( DQM-COMMON_VERSION "01-02-00" )
 set( DQM-COMMON_ROOT
    "$ENV{TDAQ_RELEASE_BASE}/dqm-common/dqm-common-${DQM-COMMON_VERSION}" )
-
 set( TDAQ_PROJECT_NAME "tdaq")
-set( TDAQ_VERSION "07-01-00" )
 set( TDAQ_ROOT "$ENV{TDAQ_RELEASE_BASE}/${TDAQ_PROJECT_NAME}/${TDAQ_PROJECT_NAME}-${TDAQ_VERSION}" )
 
 # Find the ATLAS CMake code:
@@ -30,6 +43,9 @@ find_package( AtlasCMake QUIET )
 find_package( AthenaExternals REQUIRED )
 find_package( Gaudi REQUIRED )
 
+# Find some auxiliary packages:
+find_package( Doxygen )
+
 # Load all the files from the externals/ subdirectory:
 file( GLOB _externals "${CMAKE_CURRENT_SOURCE_DIR}/externals/*.cmake" )
 foreach( _external ${_externals} )
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index 13efdad96c0a2ea3a5e93651f491b5a0bc85b231..4a6dd79fc727d1c28b4f2e3be566865e779a2a0c 100644
--- a/Projects/Athena/externals.txt
+++ b/Projects/Athena/externals.txt
@@ -6,8 +6,7 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthenaExternalsVersion = aa2d4807
-
+AthenaExternalsVersion = 8643cbb2
 
 # The version of atlas/Gaudi to use:
-GaudiVersion = v28r2.006
+GaudiVersion = v28r2.011
diff --git a/Projects/Athena/externals/MCUtils.cmake b/Projects/Athena/externals/MCUtils.cmake
index 5fd191cfe6159b5c67aef98b53b8d38960e2d47a..e6673db77efb7630eccc6cf2598e82638b79e9ef 100644
--- a/Projects/Athena/externals/MCUtils.cmake
+++ b/Projects/Athena/externals/MCUtils.cmake
@@ -2,6 +2,6 @@
 # File specifying the location of MCUtils to use.
 #
 
-set( MCUTILS_VERSION 1.2.1 )
+set( MCUTILS_VERSION 1.3.0 )
 set( MCUTILS_ROOT
    ${LCG_RELEASE_DIR}/MCGenerators/mcutils/${MCUTILS_VERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt
index d77f348f7ea66698baeaa94d715f1d2b709afad4..4c20de1b25d9099e2d59d147dc2cfc4a03672ed8 100644
--- a/Projects/Athena/package_filters.txt
+++ b/Projects/Athena/package_filters.txt
@@ -59,6 +59,5 @@
 - Reconstruction/Jet/JetJvtEfficiency
 - Reconstruction/Jet/JetReclustering
 - Reconstruction/Jet/JetAnalysisTools/JetTileCorrection
-- Trigger/TrigAnalysis/TrigMuonEfficiency
 - Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching
 - Trigger/TrigFTK/FTKStandaloneMonitoring
diff --git a/README.md b/README.md
index af77daef9eb7165051a3006c7100e1c7ca4d28c9..7ecaec7e1d9c854cc0da89b9b6ed7a82a1b1b425 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ Branch                                                            | Purpose
 Links
 -----
 
-- The [ATLAS webpage](https://atlas.ch) will tell you all about the ATLAS experiment (for ATLAS members, the collaboration webpage is [here](http://atlas.web.cern.ch/Atlas/Collaboration/))
+- The [ATLAS webpage](https://atlas.ch) will tell you all about the ATLAS experiment (for ATLAS members, the collaboration webpage is [here](https://atlas-collaboration.web.cern.ch/))
 - The [Twiki](https://twiki.cern.ch/twiki/bin/view/AtlasComputing/AtlasComputing) is the main source of documentation, and has many links to sub-domains
 - The [software documentation](https://atlassoftwaredocs.web.cern.ch) page has some tutorials etc
 - The git repository is [here](https://gitlab.cern.ch/atlas/athena)
diff --git a/Reconstruction/AODFix/doc/packagedoc.h b/Reconstruction/AODFix/doc/packagedoc.h
index 528cb180a89564d8573fbd6c1d89fa15165842b2..de4912f2606ac61a3bd68c61adc41cc47af4bd0a 100644
--- a/Reconstruction/AODFix/doc/packagedoc.h
+++ b/Reconstruction/AODFix/doc/packagedoc.h
@@ -49,12 +49,4 @@ reconstruction.
 @author Jovan Mitrevski
 
 @section AODFix_ExtrasAODFix Extra Pages
- - @ref UsedAODFix
- - @ref RequirementsAODFix
-*/
-/**
-@page UsedAODFix Used Packages
-*/
-/**
-@page RequirementsAODFix Requirements
 */
diff --git a/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/HIPixelTrackletsCollectionCnv.cxx b/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/HIPixelTrackletsCollectionCnv.cxx
index b92956a3e56c54158c5c8277b2da41b70a971c73..6c8b8a1439a1173de7326f6194f7e3a1156bc0b1 100644
--- a/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/HIPixelTrackletsCollectionCnv.cxx
+++ b/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/HIPixelTrackletsCollectionCnv.cxx
@@ -54,7 +54,6 @@ HIPixelTrackletsCollectionCnv::createTransient() {
 
   HIPixelTrackletsCollection *p_collection = 0;
   if( compareClassGuid( p1_guid ) ) {
-    usingTPCnvForReading( m_TPConverter );
     std::auto_ptr< HIPixelTrackletsCollection_PERS > p_coll( poolReadObject< HIPixelTrackletsCollection_PERS >() );
     p_collection = m_TPConverter.createTransient( p_coll.get(), m_log );
   }
diff --git a/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/HIPixelTrackletsCollectionCnv.h b/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/HIPixelTrackletsCollectionCnv.h
index d78e6ea2a71e2bc1a84872934e4645aacbc3575f..b294e8e571d4e89c2f83cd5d404e08f8e9116bcf 100644
--- a/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/HIPixelTrackletsCollectionCnv.h
+++ b/Reconstruction/HeavyIonRec/HIRecAthenaPool/src/HIPixelTrackletsCollectionCnv.h
@@ -16,7 +16,6 @@
 #undef protected
 
 #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
-#include "AthenaPoolCnvSvc/AthenaPoolCnvTPExtension.h"
 
 #include "HIGlobal/HIPixelTrackletsCollection.h"
 #include "HIRecTPCnv/HIPixelTrackletsCollectionCnv_tlp1.h"
@@ -24,8 +23,7 @@
 typedef HIPixelTrackletsCollection_tlp1 HIPixelTrackletsCollection_PERS;
 typedef T_AthenaPoolCustomCnv<HIPixelTrackletsCollection, HIPixelTrackletsCollection_PERS> HIPixelTrackletsCollectionCnvBase;
 
-class HIPixelTrackletsCollectionCnv : public HIPixelTrackletsCollectionCnvBase,
-  public AthenaPoolCnvTPExtension
+class HIPixelTrackletsCollectionCnv : public HIPixelTrackletsCollectionCnvBase
 {
   friend class CnvFactory<HIPixelTrackletsCollectionCnv>;
   
diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetBadChanCorrTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetBadChanCorrTool.h
index 8955d4bf695fa1375de995166afcb01c77a038e7..8b26819b0f1c43106308a8d506ec0c22e486c37e 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetBadChanCorrTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetBadChanCorrTool.h
@@ -97,7 +97,7 @@ protected:
 
   //ToolHandle<IMissingCellListTool> m_missingCellToolHandle;
   //MissingCellListTool* m_missingCellTool;
-  std::string m_missingCellMapName;
+  // std::string m_missingCellMapName;
 
   bool m_forceMissingCellCheck;
 
@@ -137,11 +137,13 @@ protected:
     double m_etaMax;
     double m_phiMin;
     double m_phiMax;
+
   };
   std::vector<ProfileData> m_profileDatas[CaloCell_ID::Unknown];//24
   
   double getProfile(double pt, double dr, int sample, double eta, double phi) const;
 
+  SG::ReadHandleKey<jet::CaloCellFastMap> m_badCellMap_key;
 };
 #endif 
 
diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetConstitFourMomTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetConstitFourMomTool.h
index 53fe779f196b4e2a5725c392ca804a4199505267..768f0ac713ac817baa85cb2972c8241ed9e46050 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetConstitFourMomTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetConstitFourMomTool.h
@@ -13,6 +13,8 @@
 /// Tool to attach the LC constituent level 4-vector to EM Jets
 
 #include "JetRec/JetModifierBase.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+
 #include <vector>
 
 class JetConstitFourMomTool : public JetModifierBase {
@@ -39,6 +41,8 @@ class JetConstitFourMomTool : public JetModifierBase {
 
   std::vector<bool> m_isDetectorEtaPhi;
 
+  SG::ReadHandleKeyArray<xAOD::CaloClusterContainer> m_altColls_keys;
+
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtTool.h
index f4785156cfe655bfe190417230c3f331159b0730..2d16efc78bac1df1648b4f3f129308e375d68d4b 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetForwardJvtTool.h
@@ -90,5 +90,8 @@
     /// Default constructor:
     JetForwardJvtTool();
 
+    SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainer_key;
+    SG::ReadHandleKey<xAOD::MissingETContainer> m_trkMET_key;
+
   };
 #endif //> !FORWARDJVTTOOL_JVT_FORWARDJVTTOOL_H
diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetOriginCorrectionTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetOriginCorrectionTool.h
index c12b783ac482a4f91fe723774a9fbdda4f2bd827..f94d2cb477353fdd8f6548758e9cafc33b748011 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetOriginCorrectionTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetOriginCorrectionTool.h
@@ -25,6 +25,7 @@
 
 #include "AsgTools/AsgTool.h"
 #include "JetInterface/IJetModifier.h"
+#include "xAODEventInfo/EventInfo.h"
 
 class JetOriginCorrectionTool : public asg::AsgTool,
                                 virtual public IJetModifier {
@@ -37,15 +38,19 @@ public:
 
   /// Inherited method to modify a jet. Compute the origin-corrected
   /// momentum and put it in the jet
-  virtual int modify(xAOD::JetContainer& jet) const;
+  int modify(xAOD::JetContainer& jet) const override;
+  StatusCode initialize() override;
 
  protected:
   
-  std::string m_vtxContainerName;
   std::string m_correctionName;
-  std::string m_eInfoName;
-
   bool m_onlyAssignPV;
+
+private:
+
+  SG::ReadHandleKey< xAOD::VertexContainer> m_vertexContainer_key;
+  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo_key;
+
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetPtAssociationTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetPtAssociationTool.h
index a3b75cafa488eb45013be15bd4f8e5d119cb1ada..c4fe99d58f6d9f3f689a35f0458d9d50fb574904 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetPtAssociationTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetPtAssociationTool.h
@@ -60,8 +60,7 @@ private:  // data
 
   /// Properties.
   std::string m_aname;
-  std::string m_conname;
-
+  SG::ReadHandleKey<xAOD::JetContainer> m_jetContainer_key;
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetTrackMomentsTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetTrackMomentsTool.h
index 462662b76f6dd2286bbe121dc90b9e9c7aa38e3e..70fd2f41f26ddcfed8b6ca614f80e207cd70a4f9 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetTrackMomentsTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetTrackMomentsTool.h
@@ -49,9 +49,7 @@ public:
 private:
 
   // Configurable parameters
-  std::string m_vertexContainer;
   std::string m_assocTracksName;
-  std::string m_tva;
   std::vector<float> m_minTrackPt;
   ToolHandle<IJetTrackSelector> m_htsel;
         
@@ -74,6 +72,9 @@ private:
   // Parse the float to get a moment base name
   const std::string getMomentBaseName(const float minTrackPt) const;
 
+  SG::ReadHandleKey< xAOD::VertexContainer> m_vertexContainer_key;
+  SG::ReadHandleKey<jet::TrackVertexAssociation> m_tva_key;
+
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetTrackSumMomentsTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetTrackSumMomentsTool.h
index 20bfa8fae611c962247e88ac7f2dcf8380819a78..729c7b63ed9db0c942829c2a4ce599f614965de1 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetTrackSumMomentsTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetTrackSumMomentsTool.h
@@ -61,12 +61,13 @@ public:
 
 private:
 
-  std::string m_vertexContainer;
   std::string m_assocTracksName;
-  std::string m_tva;
   bool m_requireTrackPV;
   ToolHandle<IJetTrackSelector> m_htsel;
 
+
+  SG::ReadHandleKey< xAOD::VertexContainer> m_vertexContainer_key;
+  SG::ReadHandleKey<jet::TrackVertexAssociation> m_tva_key;
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexFractionTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexFractionTool.h
index afec710a502633a7edcd072c99a86fdb5b41aab5..68c9e910b6bf3360a5e419af166b291cd9e097b9 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexFractionTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexFractionTool.h
@@ -89,10 +89,7 @@ public:  // methods
 private:  // data
 
   // Configurable parameters
-  std::string m_verticesName;
   std::string m_assocTracksName;
-  std::string m_tvaName;
-  std::string m_tracksName;
   std::string m_sumPtTrkName;
   ToolHandle<IJetTrackSelector> m_htsel;
   std::string m_jvfname;
@@ -102,6 +99,10 @@ private:  // data
 private:  // methods
 
   std::vector<float> getEmptyJetVertexFraction(const xAOD::VertexContainer*) const;
+  
+  SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainer_key;
+  SG::ReadHandleKey<jet::TrackVertexAssociation> m_tva_key;
+  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_tracksCont_key;
 
   // Local method to count the number of pileup tracks in the event
   int getPileupTrackCount(const xAOD::Vertex*,
diff --git a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h
index 065c8e144db835d4b5febb469a6b721fd67d5b58..68823c71171b86f9d1b415adfaecbf6141650083 100644
--- a/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h
+++ b/Reconstruction/Jet/JetMomentTools/JetMomentTools/JetVertexTaggerTool.h
@@ -105,7 +105,6 @@ public:
 private:  // data
 
   // Configurable parameters
-  std::string m_verticesName;
   std::string m_assocTracksName;
   std::string m_tvaName;
   std::string m_tracksName;
@@ -119,6 +118,8 @@ private:  // data
   TFile * m_jvtfile;
   TH2F * m_jvthisto;
 
+  SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainer_key;
+
 };
 
 
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetConstitFourMomTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetConstitFourMomTool.cxx
index a0261791d7bd3156c547b74a48796d7235ee41a5..cff4cd021939085fd2bbee50fa1282f89f3a5c4d 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetConstitFourMomTool.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetConstitFourMomTool.cxx
@@ -9,7 +9,6 @@
 #include "xAODJet/JetConstituentVector.h"
 #include "xAODJet/JetTypes.h"
 
-#include "xAODCaloEvent/CaloClusterContainer.h"
 #include "xAODCaloEvent/CaloClusterChangeSignalState.h"
 
 //**********************************************************************
@@ -20,7 +19,8 @@ JetConstitFourMomTool::JetConstitFourMomTool(std::string myname)
     m_jetScaleNames({}),
     m_altColls({}),
     m_altConstitScales({}),
-    m_altJetScales({})
+    m_altJetScales({}),
+    m_altColls_keys {}  // calls default constructor 
 {
   // What cluster signal state to use for the jet constituents
   declareProperty("ConstitScale",     m_constitScale     );
@@ -37,13 +37,32 @@ JetConstitFourMomTool::JetConstitFourMomTool(std::string myname)
 //**********************************************************************
 
 StatusCode JetConstitFourMomTool::initialize() {
+  ATH_MSG_DEBUG("initializing version with data handles");
+
+  // load  data handle key array from a std::vector<std::string>
+  
+
+  // cannot use DataHandleKeyArray.assign(vector) as this sneakily removes
+  // empty strings...
+
+  for(auto dhn : m_altColls){
+    m_altColls_keys.emplace_back(SG::ReadHandleKey<xAOD::CaloClusterContainer>(dhn));
+  }
+  for(auto& dh : m_altColls_keys){ATH_CHECK(dh.initialize(!(dh.key() == "")));}
+
   // Check configuration consistency
   if( m_jetScaleNames.empty() ||
       (m_jetScaleNames.size() != m_altColls.size()) ||
       (m_jetScaleNames.size() != m_altConstitScales.size()) ||
-      (m_jetScaleNames.size() != m_altJetScales.size())
+      (m_jetScaleNames.size() != m_altJetScales.size()) ||
+      (m_jetScaleNames.size() != m_altColls_keys.size())
       ) {
-    ATH_MSG_FATAL("Inconsistency in configuration -- all vector properties must have the same (nonzero) length!");
+    ATH_MSG_FATAL("Inconsistency in configuration -- all vector properties must have the same (nonzero) length! Sizes: " 
+                  << m_jetScaleNames.size() << " "
+                  << m_altColls.size() << " "
+                  << m_altConstitScales.size() << " "
+                  << m_altJetScales.size() << " "
+                  << m_altColls_keys.size());
     return StatusCode::FAILURE;
   }
 
@@ -59,6 +78,7 @@ StatusCode JetConstitFourMomTool::initialize() {
     }
   }
 
+
   return StatusCode::SUCCESS;
 }
 
@@ -70,21 +90,23 @@ int JetConstitFourMomTool::modify(xAOD::JetContainer& jets) const {
   std::vector<const xAOD::CaloClusterContainer*> altCollections(nScales,NULL);
   // Do some setup that doesn't have to be repeated for each jet
   for(size_t iScale=0; iScale<nScales; ++iScale) {
-    if(!m_altColls[iScale].empty()) { // retrieve alternate constituent collections
+    // if(!m_altColls[iScale].empty()) { // retrieve alternate constituent collections
+    if(!m_altColls_keys[iScale].key().empty()) { // retrieve alternate constituent collections
       const xAOD::Jet& leadjet = *jets.front();
       if(leadjet.getInputType()==xAOD::JetInput::LCTopo || leadjet.getInputType()==xAOD::JetInput::EMTopo
 	 || leadjet.getInputType()==xAOD::JetInput::LCTopoOrigin || leadjet.getInputType()==xAOD::JetInput::EMTopoOrigin) {
-	const xAOD::CaloClusterContainer* altclusters(0);
-	ATH_CHECK( evtStore()->retrieve(altclusters,m_altColls[iScale]) );
-	if(!altclusters) {
-	  ATH_MSG_WARNING("Failed to retrieve alt cluster collection " << m_altColls[iScale]);
-	  return 1;
-	} else {
-	  altCollections[iScale] = altclusters;
-	}
+
+        auto handle = SG::makeHandle(m_altColls_keys[iScale]);
+        if(!handle.isValid()){
+          ATH_MSG_WARNING("Failed to retrieve alt cluster collection " 
+                          << m_altColls_keys[iScale].key());
+          return 1;
+        }
+
+        altCollections[iScale] = handle.cptr();
       } else {
-	ATH_MSG_WARNING("Alt collection " << m_altColls[iScale] << " and jet type " << leadjet.getInputType() << " not supported yet!");
-	return 1;
+        ATH_MSG_WARNING("Alt collection " << m_altColls[iScale] << " and jet type " << leadjet.getInputType() << " not supported yet!");
+        return 1;
       } // check that jet type/alt collection are implemented
     } // have an alt collection for this scale
   }
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetForwardJvtTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetForwardJvtTool.cxx
index 41135fa33906a07983c32a4f5a7e17de4dadd844..b044f43a35018ab120ef38e4a8f590de8c87af64 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetForwardJvtTool.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetForwardJvtTool.cxx
@@ -45,6 +45,10 @@
     declareProperty("JetScaleFactor",          m_jetScaleFactor         = 0.4              );
     //declareProperty("FJVTThreshold",          m_fjvtThresh         = 15e3              );//15GeV->92%,11GeV->85%
     declareProperty("UseTightOP",          m_tightOP         = false              );//Tight or Loose
+
+    declareProperty("VertexContainer", m_vertexContainer_key="PrimaryVertices");
+    declareProperty("Met_Track", m_trkMET_key="Met_Track");
+
   }
 
   // Destructor
@@ -56,11 +60,16 @@
   ////////////////////////////
   StatusCode JetForwardJvtTool::initialize()
   {
+    ATH_MSG_DEBUG("initializing version with data handles");
     ATH_MSG_INFO ("Initializing " << name() << "...");
     if (m_tightOP) m_fjvtThresh = 0.4;
     else m_fjvtThresh = 0.5;
     if (m_orLabel!="")  Dec_OR = new SG::AuxElement::Decorator<char>(m_orLabel);
     Dec_out = new SG::AuxElement::Decorator<char>(m_outLabel);
+
+    ATH_CHECK(m_vertexContainer_key.initialize());
+    ATH_CHECK(m_trkMET_key.initialize());
+
     return StatusCode::SUCCESS;
   }
 
@@ -97,20 +106,31 @@
 
   void JetForwardJvtTool::calculateVertexMomenta(const xAOD::JetContainer *jets) const {
     m_pileupMomenta.clear();
-    const xAOD::MissingETContainer* trkMet  = nullptr;
-    if( evtStore()->retrieve(trkMet, "MET_Track").isFailure()) {
-      ATH_MSG_WARNING("Unable to retrieve MET_Track container");
+
+    auto trkMETContainer = SG::makeHandle (m_trkMET_key);
+    if (!trkMETContainer.isValid()){
+      ATH_MSG_WARNING("Invalid  xAOD::MissingETContainer datahandle");
+      return;
     }
-    const xAOD::VertexContainer *vxCont = 0;
-    if( evtStore()->retrieve(vxCont, "PrimaryVertices").isFailure() ) {
-      ATH_MSG_WARNING("Unable to retrieve primary vertex container");
+    auto trkMet = trkMETContainer.cptr();
+
+    auto vertexContainer = SG::makeHandle (m_vertexContainer_key);
+    if (!vertexContainer.isValid()){
+      ATH_MSG_WARNING("Invalid  xAOD::VertexContainer datahandle");
+      return;
     }
+    auto vxCont = vertexContainer.cptr();
+
     for(const auto& vx : *vxCont) {
       if(vx->vertexType()!=xAOD::VxType::PriVtx && vx->vertexType()!=xAOD::VxType::PileUp) continue;
       TString vname = "PVTrack_vx";
       vname += vx->index();
-      m_pileupMomenta.push_back((vx->index()==m_pvind?0:-(1./m_jetScaleFactor))*TVector2(0.5*(*trkMet)[vname.Data()]->mpx(),0.5*(*trkMet)[vname.Data()]->mpy()));
+      m_pileupMomenta.push_back(\
+                                (vx->index()==m_pvind ? \
+                                 0:\
+                                 -(1./m_jetScaleFactor))*TVector2(0.5*(*trkMet)[vname.Data()]->mpx(),0.5*(*trkMet)[vname.Data()]->mpy()));
     }
+
     for (const auto& jet : *jets) {
       if (!centralJet(jet)) continue;
       int jetvert = getJetVertex(jet);
@@ -179,11 +199,16 @@
   }
 
   void JetForwardJvtTool::getPV() const {
-    const xAOD::VertexContainer *vxCont = 0;
+
+    auto vertexContainer = SG::makeHandle (m_vertexContainer_key);
+    if (!vertexContainer.isValid()){
+      ATH_MSG_WARNING("Invalid  xAOD::VertexContainer datahandle");
+      return;
+    }
+    auto vxCont = vertexContainer.cptr();
+
     m_pvind = 0;
-    if( evtStore()->retrieve(vxCont, "PrimaryVertices").isFailure() ) {
-      ATH_MSG_WARNING("Unable to retrieve primary vertex container");
-    } else if(vxCont->empty()) {
+    if(vxCont->empty()) {
       ATH_MSG_WARNING("Event has no primary vertices!");
     } else {
       ATH_MSG_DEBUG("Successfully retrieved primary vertex container");
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetOriginCorrectionTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetOriginCorrectionTool.cxx
index 7cc86a361868d21ae16eddfadee8b16a590c3506..f905364414081c7ee1ea15a1867e49b49975db6c 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetOriginCorrectionTool.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetOriginCorrectionTool.cxx
@@ -8,17 +8,31 @@
 
 #include "JetUtils/JetOriginHelpers.h"
 
-#include "xAODEventInfo/EventInfo.h"
+
+
 
 //**********************************************************************
 
 JetOriginCorrectionTool::JetOriginCorrectionTool(const std::string& myname)
 : asg::AsgTool(myname) { 
-  declareProperty("VertexContainer", m_vtxContainerName="PrimaryVertices");
   declareProperty("OriginCorrectedName", m_correctionName="JetOriginConstitScaleMomentum");
-  declareProperty("EventInfoName", m_eInfoName="EventInfo");
 
   declareProperty("OnlyAssignPV", m_onlyAssignPV=false);
+
+  declareProperty("VertexContainer", m_vertexContainer_key="PrimaryVertices");
+  declareProperty("EventInfoName", m_eventInfo_key="EventInfo");
+}
+
+
+//**********************************************************************
+
+StatusCode JetOriginCorrectionTool::initialize() {
+  ATH_MSG_DEBUG("initializing version with data handles");
+
+  ATH_CHECK(m_vertexContainer_key.initialize());
+  ATH_CHECK(m_eventInfo_key.initialize());
+
+  return StatusCode::SUCCESS;
 }
 
 //**********************************************************************
@@ -27,37 +41,49 @@ int JetOriginCorrectionTool::modify(xAOD::JetContainer& jetCont) const {
   // static accessor for PV index access
   static SG::AuxElement::ConstAccessor<int> PVIndexAccessor("PVIndex");
 
-  const xAOD::VertexContainer *vxContainer = 0;
+
 
   // retrieve the VertexContainer. if fails, fill the jets with null vector
-  if( (evtStore()->retrieve(vxContainer, m_vtxContainerName).isFailure()) || vxContainer->empty() ){
-    ATH_MSG_WARNING("Could not find origin Vertex. Filling jet with null "<< m_correctionName);
+  auto handle = SG::makeHandle (m_vertexContainer_key);
+  if (!handle.isValid()){
+    ATH_MSG_WARNING("Invalid VertexContainer datahandle: " 
+                    <<  m_correctionName
+                    << ": filling jet with null");
     xAOD::JetFourMom_t null;    
     for(xAOD::Jet * j : jetCont) j->setAttribute<xAOD::JetFourMom_t>(m_correctionName, null);
     return 0;
   }
 
+  auto vxContainer = handle.cptr();
+
+
   // Retrieve EventInfo to check for a PV# specification != PV0
-  // No errors if EventInfo or PV index is not specified, as this is the standard scenario
+  // No errors if EventInfo or PV index is not specified, 
+  // as this is the standard scenario
   // Warn if EventInfo is specified but cannot be retrieved
   // Specifying the PV index is only for special cases
   int PVindex = 0;
-  if (m_eInfoName != "")
-  {
-    const xAOD::EventInfo* eInfo = 0;
-    if ( evtStore()->retrieve(eInfo,m_eInfoName).isFailure() )
-      ATH_MSG_WARNING("Failed to retrieve EventInfo object.  Defaulting to PV0 for "<<m_correctionName);
-    else if (PVIndexAccessor.isAvailable(*eInfo))
-    {
-        PVindex = PVIndexAccessor(*eInfo);
-        ATH_MSG_DEBUG("Found PVIndex value of " << PVindex << " for " << m_correctionName);
-        if (PVindex < 0 || static_cast<size_t>(PVindex) >= vxContainer->size())
-        {
-          ATH_MSG_WARNING("Specified PV index of " << PVindex << " is out of bounds.  Filling jet with null "<<m_correctionName);
-          xAOD::JetFourMom_t null;
-          for (xAOD::Jet* j : jetCont) j->setAttribute<xAOD::JetFourMom_t>(m_correctionName,null);
-          return 0;
-        }
+  //if (m_eventInfoName.key() != "") {
+  if (m_eventInfo_key.key() != "") {
+    // retrieve the VertexContainer. if fails, fill the jets with null vector
+
+    auto eInfo = SG::makeHandle (m_eventInfo_key);
+    if (!eInfo.isValid()){
+      ATH_MSG_WARNING("Invalid eventInfo datahandle. Defaulting ti PV0 for " 
+                      <<  m_correctionName);
+    } else if (PVIndexAccessor.isAvailable(*(eInfo.cptr()))) {
+      PVindex = PVIndexAccessor(*(eInfo.cptr()));
+      ATH_MSG_DEBUG("Found PVIndex value of " << PVindex << " for " << m_correctionName);
+      
+      if (PVindex < 0 || static_cast<size_t>(PVindex) >= vxContainer->size()){
+        ATH_MSG_WARNING("Specified PV index of " 
+                        << PVindex << " is out of bounds.  Filling jet with null "
+                        <<m_correctionName);
+        xAOD::JetFourMom_t null;
+        for (xAOD::Jet* j : jetCont) j->setAttribute<xAOD::JetFourMom_t>(m_correctionName,null);
+        return 0;
+      }
+      
     }
   }
 
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetPtAssociationTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetPtAssociationTool.cxx
index 1844f5dad28ba375f8439e0abc2dfc367ffc6d71..70531bb6fe00a24fb6ae2c33e440ceed30fe43e2 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetPtAssociationTool.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetPtAssociationTool.cxx
@@ -18,13 +18,18 @@ using xAOD::JetConstituentVector;
 JetPtAssociationTool::JetPtAssociationTool(std::string myname)
 : JetModifierBase(myname) {
   declareProperty("AssociationName", m_aname);
-  declareProperty("InputContainer", m_conname);
+  declareProperty("InputContainer", m_jetContainer_key);
+
 }
 
 //**********************************************************************
 
 StatusCode JetPtAssociationTool::initialize() {
+
+  ATH_MSG_DEBUG("initializing version with data handles");
+  ATH_CHECK(m_jetContainer_key.initialize());
   return StatusCode::SUCCESS;
+
 }
 
 //**********************************************************************
@@ -32,19 +37,23 @@ StatusCode JetPtAssociationTool::initialize() {
 int JetPtAssociationTool::modifyJet(xAOD::Jet& jet) const {
   ATH_MSG_DEBUG("Processing jet " << jet.index());
   APVector apins;
+
   // Retrieve the association vector.
   if ( ! jet.getAssociatedObjects(m_aname, apins) ) {
     ATH_MSG_WARNING("Jet does not have association vector " << m_aname);
     return 1;
   }
+
   // Retrieve the container of jets to be matched.
-  const JetContainer* pjets = nullptr;
-  if ( evtStore()->contains<xAOD::JetContainer>(m_conname) ) {
-    pjets = evtStore()->retrieve<const xAOD::JetContainer>(m_conname);
-  } else {
-    ATH_MSG_DEBUG("Matching jet container not found: " << m_conname);
+  auto handle = SG::makeHandle (m_jetContainer_key);
+  if (!handle.isValid()){
+    ATH_MSG_WARNING("Matching jet container not found: "
+                    << m_jetContainer_key.key()); 
     return 2;
   }
+
+  auto pjets = handle.cptr();
+
   // Match associated particle to jets.
   FloatVector ptfs;
   if ( ptfrac(apins, *pjets, ptfs) ) {
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetTrackMomentsTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetTrackMomentsTool.cxx
index 706bbbd6a071e1000d272c58915b99c449afdee3..f76ea523fcaf80dae44c9c4b541b87c0c384dcf3 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetTrackMomentsTool.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetTrackMomentsTool.cxx
@@ -10,29 +10,36 @@
 
 JetTrackMomentsTool::JetTrackMomentsTool(const std::string& name)
     : JetModifierBase(name)
-    , m_vertexContainer("")
+      // , m_vertexContainer("")
     , m_assocTracksName("")
-    , m_tva("")
+      // , m_tva("")
     , m_minTrackPt()
     , m_htsel("")
 {
-    declareProperty("VertexContainer",m_vertexContainer);
-    declareProperty("AssociatedTracks",m_assocTracksName);
-    declareProperty("TrackVertexAssociation",m_tva);
-    declareProperty("TrackMinPtCuts",m_minTrackPt);
-    declareProperty("TrackSelector", m_htsel);
+  declareProperty("AssociatedTracks",m_assocTracksName);
+  declareProperty("TrackMinPtCuts",m_minTrackPt);
+  declareProperty("TrackSelector", m_htsel);
+  
+  declareProperty("VertexContainer",m_vertexContainer_key);
+  declareProperty("TrackVertexAssociation",m_tva_key);
 }
 
 
 //**********************************************************************
 
 StatusCode JetTrackMomentsTool::initialize() {
+  ATH_MSG_DEBUG("initializing version with data handles");
   ATH_MSG_INFO("Initializing JetTrackMomentsTool " << name());
   if ( m_htsel.empty() ) {
     ATH_MSG_INFO("  No track selector.");
   } else {
     ATH_MSG_INFO("  Track selector: " << m_htsel->name());
   }
+
+
+  ATH_CHECK(m_vertexContainer_key.initialize());
+  ATH_CHECK(m_tva_key.initialize());
+
   return StatusCode::SUCCESS;
 }
 
@@ -42,22 +49,25 @@ StatusCode JetTrackMomentsTool::initialize() {
 int JetTrackMomentsTool::modifyJet(xAOD::Jet& jet) const {
 
   // Get input vertex collection
-  const xAOD::VertexContainer* vertexContainer = nullptr;
-  if ( evtStore()->retrieve(vertexContainer,m_vertexContainer).isFailure()
-       || vertexContainer == nullptr ) {
-    ATH_MSG_ERROR("Could not retrieve the VertexContainer from evtStore: "
-                  << m_vertexContainer);
+  auto handle_v = SG::makeHandle (m_vertexContainer_key);
+  if (!handle_v.isValid()){
+    ATH_MSG_ERROR("Could not retrieve the VertexContainer: "
+                  << m_vertexContainer_key.key());
     return 1;
   }
 
+  auto vertexContainer = handle_v.cptr();
+
   // Get the track-vertex association
-  const jet::TrackVertexAssociation* tva = nullptr;
-  if ( evtStore()->retrieve(tva,m_tva).isFailure() || tva==nullptr ) {
-    ATH_MSG_ERROR("Could not retrieve the TrackVertexAssociation from evtStore: "
-                  << m_tva);
+  auto handle_tva = SG::makeHandle (m_tva_key);
+  if (!handle_tva.isValid()){
+    ATH_MSG_ERROR("Could not retrieve the TrackVertexAssociation: "
+                  << m_tva_key.key());
     return 2;
   }
 
+  auto tva = handle_tva.cptr();
+
 #if 0
     // Get the tracks associated to the jet
     // Note that there may be no tracks
@@ -89,7 +99,8 @@ int JetTrackMomentsTool::modifyJet(xAOD::Jet& jet) const {
   if ( ! havetracks ) ATH_MSG_WARNING("Associated tracks not found");
   ATH_MSG_DEBUG("Successfully retrieved track particles");
   
-  //For PFlow jets we will also calculate the same moments, using charged PFO                                                                                                                                                                                                        
+  //For PFlow jets we will also calculate the same moments, using charged PFO
+
   xAOD::Type::ObjectType ctype = jet.rawConstituent( 0 )->type();
   std::vector<const xAOD::TrackParticle*> pflowTracks;
   bool isPFlowJet = false;
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetTrackSumMomentsTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetTrackSumMomentsTool.cxx
index 53908dbaceed0640ee80eef7a90e6b2116f7a557..7444edd38a6e29610e9114464ca454afcff52eae 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetTrackSumMomentsTool.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetTrackSumMomentsTool.cxx
@@ -17,54 +17,61 @@ using xAOD::JetFourMom_t;
 
 JetTrackSumMomentsTool::JetTrackSumMomentsTool(const std::string& name)
     : JetModifierBase(name)
-    , m_vertexContainer("")
+      // , m_vertexContainer("")
     , m_assocTracksName("")
-    , m_tva("")
     , m_htsel("")
+    , m_vertexContainer_key("")
+    , m_tva_key("")
 {
-    declareProperty("VertexContainer",m_vertexContainer);
-    declareProperty("AssociatedTracks",m_assocTracksName);
-    declareProperty("TrackVertexAssociation",m_tva);
-    declareProperty("TrackSelector", m_htsel);
-    declareProperty("RequireTrackPV", m_requireTrackPV = true);
+  declareProperty("VertexContainer",m_vertexContainer_key);
+  declareProperty("AssociatedTracks",m_assocTracksName);
+  declareProperty("TrackVertexAssociation",m_tva_key);
+  declareProperty("TrackSelector", m_htsel);
+  declareProperty("RequireTrackPV", m_requireTrackPV = true);
 }
 
-
 //**********************************************************************
 
 StatusCode JetTrackSumMomentsTool::initialize() {
+  ATH_MSG_DEBUG("initializing version with data handles");
   ATH_MSG_INFO("Initializing JetTrackSumMomentsTool " << name());
   if ( m_htsel.empty() ) {
     ATH_MSG_INFO("  No track selector.");
   } else {
     ATH_MSG_INFO("  Track selector: " << m_htsel->name());
   }
+
+  ATH_CHECK(m_vertexContainer_key.initialize());
+  ATH_CHECK(m_tva_key.initialize());
+
   return StatusCode::SUCCESS;
 }
 
 //**********************************************************************
 
-
-
 int JetTrackSumMomentsTool::modifyJet(xAOD::Jet& jet) const {
 
   // Get input vertex collection
-  const xAOD::VertexContainer* vertexContainer = nullptr;
-  if ( evtStore()->retrieve(vertexContainer,m_vertexContainer).isFailure()
-       || vertexContainer == nullptr ) {
-    ATH_MSG_ERROR("Could not retrieve the VertexContainer from evtStore: "
-                  << m_vertexContainer);
+
+  auto handle_v = SG::makeHandle(m_vertexContainer_key);
+  if (!handle_v.isValid()){
+    ATH_MSG_ERROR("Could not retrieve the VertexContainer: "
+                  << m_vertexContainer_key.key());
     return 1;
   }
 
+  auto vertexContainer = handle_v.cptr();
+
   // Get the track-vertex association
-  const jet::TrackVertexAssociation* tva = nullptr;
-  if ( evtStore()->retrieve(tva,m_tva).isFailure() || tva==nullptr ) {
-    ATH_MSG_ERROR("Could not retrieve the TrackVertexAssociation from evtStore: "
-                  << m_tva);
+  auto handle_tva = SG::makeHandle(m_tva_key);
+  if (!handle_tva.isValid()){
+    ATH_MSG_ERROR("Could not retrieve the TrackVertexAssociation: "
+                  << m_tva_key.key());
     return 2;
   }
 
+  auto tva = handle_tva.cptr();
+
   // Get the tracks associated to the jet
   // Note that there may be no tracks - this is both normal and an error case
   std::vector<const xAOD::TrackParticle*> tracks;
@@ -72,7 +79,6 @@ int JetTrackSumMomentsTool::modifyJet(xAOD::Jet& jet) const {
     ATH_MSG_DEBUG("Associated tracks not found.");
   }
   
-
   if (vertexContainer->size() == 0 ) { 
     ATH_MSG_WARNING("There are no vertices in the container. Exiting"); 
     return 4;
@@ -91,7 +97,6 @@ int JetTrackSumMomentsTool::modifyJet(xAOD::Jet& jet) const {
   return 0;
 }
 
-
 //**********************************************************************
 
 const xAOD::Vertex* JetTrackSumMomentsTool::findHSVertex(const xAOD::VertexContainer*& vertices) const
@@ -138,5 +143,4 @@ std::pair<float,float> JetTrackSumMomentsTool::getJetTrackSums(const xAOD::Verte
   
 }
 
-
 //**********************************************************************
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetVertexFractionTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetVertexFractionTool.cxx
index 3ce1c9ef0fbf7015967b6bf1fcace2ad6d0bd10b..33391f16b4935c9992eca6bcece7cc30e4b1198d 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetVertexFractionTool.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetVertexFractionTool.cxx
@@ -11,23 +11,23 @@
 JetVertexFractionTool::JetVertexFractionTool(const std::string& name)
 : JetModifierBase(name)
 , m_assocTracksName("")
-, m_tvaName("")
-, m_tracksName("")
 , m_htsel("") {
-  declareProperty("VertexContainer", m_verticesName);
   declareProperty("AssociatedTracks", m_assocTracksName);
-  declareProperty("TrackVertexAssociation", m_tvaName);
-  declareProperty("TrackParticleContainer",m_tracksName);
   declareProperty("SumPtTrkName",m_sumPtTrkName="SumPtTrkPt500");
   declareProperty("TrackSelector", m_htsel);
   declareProperty("JVFName", m_jvfname ="JVF");
   declareProperty("K_JVFCorrScale",m_kcorrJVF = 0.01);
   declareProperty("PUTrkPtCut",m_PUtrkptcut = 30000.);
+
+  declareProperty("VertexContainer", m_vertexContainer_key);
+  declareProperty("TrackVertexAssociation", m_tva_key);
+  declareProperty("TrackParticleContainer",m_tracksCont_key);
 }
 
 //**********************************************************************
 
 StatusCode JetVertexFractionTool::initialize() {
+  ATH_MSG_DEBUG("initializing version with data handles");
   ATH_MSG_INFO("Initializing JetVertexFractionTool " << name());
   if ( m_htsel.empty() ) {
     ATH_MSG_INFO("  No track selector.");
@@ -35,9 +35,15 @@ StatusCode JetVertexFractionTool::initialize() {
     ATH_MSG_INFO("  Track selector: " << m_htsel->name());
   }
   ATH_MSG_INFO("  Attribute name: " << m_jvfname);
+
+  ATH_CHECK(m_vertexContainer_key.initialize());
+  ATH_CHECK(m_tva_key.initialize());
+  ATH_CHECK(m_tracksCont_key.initialize());
+
   return StatusCode::SUCCESS;
 }
 
+
 //**********************************************************************
 // Legacy version that uses the direct computation of sums over tracks
 //**********************************************************************
@@ -45,28 +51,39 @@ StatusCode JetVertexFractionTool::initialize() {
 int JetVertexFractionTool::modifyJet(xAOD::Jet& jet) const {
 
   // Get the vertices container
-  const xAOD::VertexContainer* vertices = NULL;
-  if ( evtStore()->retrieve(vertices,m_verticesName).isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve the VertexContainer from evtStore: " << m_verticesName);
+
+  auto vertexContainer = SG::makeHandle (m_vertexContainer_key);
+  if (!vertexContainer.isValid()){
+    ATH_MSG_WARNING("Invalid  xAOD::VertexContainer datahandle" 
+                    << m_vertexContainer_key.key());
     return 1;
   }
-  ATH_MSG_DEBUG("Successfully retrieved VertexContainer from evtStore: " << m_verticesName);
+  auto vertices = vertexContainer.cptr();
+
+  ATH_MSG_DEBUG("Successfully retrieved VertexContainer: " 
+                << m_vertexContainer_key.key());
 
   // Get the tracks associated to the jet
   // Note that there may be no tracks - this is both normal and an error case
   // In this case, just fill a vector with zero and don't set the highest vtx moment
+
   std::vector<const xAOD::TrackParticle*> tracks;
   if ( ! jet.getAssociatedObjects(m_assocTracksName, tracks) ) {
     ATH_MSG_WARNING("Associated tracks not found.");
   }
 
   // Get the TVA object
-  const jet::TrackVertexAssociation* tva = NULL;
-  if (evtStore()->retrieve(tva,m_tvaName).isFailure()) {
-    ATH_MSG_ERROR("Could not retrieve the TrackVertexAssociation from evtStore: " << m_tvaName);
+
+  auto tvaContainer = SG::makeHandle (m_tva_key);
+  if (!tvaContainer.isValid()){
+    ATH_MSG_ERROR("Could not retrieve the TrackVertexAssociation: " 
+                  << m_tva_key.key());
     return 3;
   }
-  ATH_MSG_DEBUG("Successfully retrieved TrackVertexAssociation from evtStore: " << m_tvaName);
+  auto tva = tvaContainer.cptr();
+
+  ATH_MSG_DEBUG("Successfully retrieved TrackVertexAssociation: " 
+                << m_tva_key.key());
 
   // Get and set the JVF vector
   const std::vector<float> jvf = getJetVertexFraction(vertices,tracks,tva);
@@ -86,28 +103,44 @@ int JetVertexFractionTool::modifyJet(xAOD::Jet& jet) const {
 int JetVertexFractionTool::modify(xAOD::JetContainer& jetCont) const {
 
   // Get the vertices container
-  const xAOD::VertexContainer* vertices = NULL;
-  if ( evtStore()->retrieve(vertices,m_verticesName).isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve the VertexContainer from evtStore: " << m_verticesName);
+
+  auto vertexContainer = SG::makeHandle (m_vertexContainer_key);
+  if (!vertexContainer.isValid()){
+    ATH_MSG_WARNING("Invalid  xAOD::VertexContainer datahandle"
+                    << m_vertexContainer_key.key()); 
     return 1;
   }
-  ATH_MSG_DEBUG("Successfully retrieved VertexContainer from evtStore: " << m_verticesName);
+  auto vertices = vertexContainer.cptr();
+
+  ATH_MSG_DEBUG("Successfully retrieved VertexContainer: " 
+                << m_vertexContainer_key.key()); 
 
   // Get the Tracks container
-  const xAOD::TrackParticleContainer* tracksCont = NULL;
-  if ( evtStore()->retrieve(tracksCont,m_tracksName).isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve the TrackParticleContainer from evtStore: " << m_tracksName);
+
+  auto tracksContainer = SG::makeHandle (m_tracksCont_key);
+  if (!tracksContainer.isValid()){
+    ATH_MSG_ERROR("Could not retrieve the TrackParticleContainer: " 
+                  << m_tracksCont_key.key());
     return 2;
   }
-  ATH_MSG_DEBUG("Successfully retrieved TrackParticleContainer from evtStore: " << m_tracksName);
+  auto tracksCont = tracksContainer.cptr();
+
+  ATH_MSG_DEBUG("Successfully retrieved TrackParticleContainer: " 
+                << m_tracksCont_key.key());
+  // << m_tracksName);
 
   // Get the TVA object
-  const jet::TrackVertexAssociation* tva = NULL;
-  if (evtStore()->retrieve(tva,m_tvaName).isFailure()) {
-    ATH_MSG_ERROR("Could not retrieve the TrackVertexAssociation from evtStore: " << m_tvaName);
+
+  auto tvaContainer = SG::makeHandle (m_tva_key);
+  if (!tvaContainer.isValid()){
+    ATH_MSG_ERROR("Could not retrieve the TrackVertexAssociation: " 
+                  << m_tva_key.key());
     return 3;
   }
-  ATH_MSG_DEBUG("Successfully retrieved TrackVertexAssociation from evtStore: " << m_tvaName);
+  auto tva = tvaContainer.cptr();
+
+  ATH_MSG_DEBUG("Successfully retrieved TrackVertexAssociation: " 
+                << m_tva_key.key());
 
   if (vertices->size() == 0 ) {
     ATH_MSG_WARNING("There are no vertices in the container. Exiting");
diff --git a/Reconstruction/Jet/JetMomentTools/Root/JetVertexTaggerTool.cxx b/Reconstruction/Jet/JetMomentTools/Root/JetVertexTaggerTool.cxx
index 65c161fcc044e9062c310710838166bb1abe9af8..09e0fd97d5c7dceea9714e01714da16d96ce58fe 100644
--- a/Reconstruction/Jet/JetMomentTools/Root/JetVertexTaggerTool.cxx
+++ b/Reconstruction/Jet/JetMomentTools/Root/JetVertexTaggerTool.cxx
@@ -25,17 +25,20 @@ JetVertexTaggerTool::JetVertexTaggerTool(const std::string& name)
 {
     declareProperty("JVFCorrName", m_jvfCorrName="JVFCorr");
     declareProperty("SumPtTrkName", m_sumPtTrkName="SumPtTrkPt500");
-    declareProperty("VertexContainer", m_verticesName="PrimaryVertices");
 
     declareProperty("JVTFileName",m_jvtfileName = "JVTlikelihood_20140805.root");
     declareProperty("JVTLikelihoodHistName",m_jvtlikelihoodHistName = "JVTRootCore_kNN100trim_pt20to50_Likelihood");
     declareProperty("TrackSelector", m_htsel);
     declareProperty("JVTName", m_jvtName ="Jvt");
+
+    declareProperty("VertexContainer", m_vertexContainer_key="PrimaryVertices");
+
 }
 
 //**********************************************************************
 
 StatusCode JetVertexTaggerTool::initialize() {
+  ATH_MSG_DEBUG("initializing version with data handles");
   ATH_MSG_INFO("Initializing JetVertexTaggerTool " << name());
 
   if ( m_htsel.empty() ) {
@@ -61,6 +64,8 @@ StatusCode JetVertexTaggerTool::initialize() {
      return StatusCode::FAILURE;
    }
 
+  ATH_CHECK(m_vertexContainer_key.initialize());
+
   return StatusCode::SUCCESS;
 }
 
@@ -68,13 +73,19 @@ StatusCode JetVertexTaggerTool::initialize() {
 
 int JetVertexTaggerTool::modify(xAOD::JetContainer& jetCont) const {
 
-  // Get the vertices container
-  const xAOD::VertexContainer* vertices = NULL;
-  if ( evtStore()->retrieve(vertices,m_verticesName).isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve the VertexContainer from evtStore: " << m_verticesName);
+  // Get input vertex collection
+  auto vertexContainer = SG::makeHandle (m_vertexContainer_key);
+  if (!vertexContainer.isValid()){
+    ATH_MSG_ERROR("Invalid VertexContainer datahandle: " 
+                  << m_vertexContainer_key.key());
     return 1;
   }
-  ATH_MSG_DEBUG("Successfully retrieved VertexContainer from evtStore: " << m_verticesName);
+
+  auto vertices = vertexContainer.cptr();
+
+  ATH_MSG_DEBUG("Successfully retrieved VertexContainer: " 
+                //                << m_verticesName);
+                << m_vertexContainer_key.key());
 
 
   if (vertices->size() == 0 ) {
@@ -96,11 +107,6 @@ int JetVertexTaggerTool::modify(xAOD::JetContainer& jetCont) const {
       jet->setAttribute(m_jvtName+"Rpt",rpt);
       jet->setAttribute(m_jvtName,jvt);
 
-      // ATH_MSG_VERBOSE("JetVertexTaggerTool " << name()
-      // 		   << ": Primary trk pT=" << tracksums.first
-      // 		   << ", Pileup trk pT=" << tracksums.second
-      // 		   << ", Old JVF=" <<  tracksums.first/(tracksums.first+tracksums.second)   );
-
       ATH_MSG_VERBOSE("JetVertexTaggerTool " << name()
 		   << ": JVT=" << jvt
 		   << ", RpT=" << rpt
diff --git a/Reconstruction/Jet/JetMomentTools/python/SetupJetMomentTools.py b/Reconstruction/Jet/JetMomentTools/python/SetupJetMomentTools.py
deleted file mode 100644
index a87bca6ddc6fd4d3d5fea74fcf5748760af9c765..0000000000000000000000000000000000000000
--- a/Reconstruction/Jet/JetMomentTools/python/SetupJetMomentTools.py
+++ /dev/null
@@ -1,306 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-from JetRec.JetAlgConfiguration import checkAndUpdateOptions
-from AthenaCommon.SystemOfUnits import *
-from JetRec.JetRecFlags  import jetFlags
-from AthenaCommon.AlgSequence import AlgSequence
-
-class memoize(object):
-    """memoize is intended to be used as a decorator
-    It will force the decorated function to be run only once, cache it's return value
-    and return this value on every subsequent call.
-    """
-    def __init__(self, func):
-        # func is the function being decorated
-        self.func = func
-        self.cache = None
-        
-    def __call__(self):
-        # this gives the memoize object the ability to be called
-        #  and thus this object behaves like a function
-        
-        if self.cache is None:
-            # call the function only once.
-            self.cache = self.func()
-        return self.cache
-
-
-
-def getJetVertexAssociationTool( toolName="JetVertexAssociation", *largs, **args):
-
-    #options=checkAndUpdateOptions(finder=finder, mainParam=mainParam, input=input,)
-    
-    from JetMomentTools.JetMomentToolsConf import JetVertexAssociationTool, JetOriginCorrectionTool
-    
-
-    jvaTool = JetVertexAssociationTool(toolName)
-
-    jvaTool.AssociateToHighestJVF = True
-
-    from JetRec.TrackSelectionForJets import getDefaultJetVtxTrackHelper
-    jvaTool.JetVtxTrackHelper = getDefaultJetVtxTrackHelper()
-    
-    # origin correction tool
-    origCorr = JetOriginCorrectionTool("JetOriginCorrection")
-    origCorr.CellCalibrator = None
-    origCorr.UseGCW = False
-    origCorr.UseClusters = True
-    
-    # Official Choice of Jet/MET Group : Primary Vertex
-    origCorr.UseJVA           = False
-    origCorr.UsePrimaryVertex = True
-    origCorr.UseBeamSpot      = True
-    jvaTool.OriginCorrectionTool = origCorr
-
-    jvaTool.StoreTrkMoments = False
-
-    jvaTool.sumPtTrkMomentName = "sumPtTrk_pv0_500MeV"
-    jvaTool.nTrkMomentName = "nTrk_pv0_500MeV"
-    jvaTool.TrackAssocName = "TrackAssoc"
-    
-    return jvaTool
-
-def getJetTracksMomentTool(**options):
-    
-    from JetMomentTools.JetMomentToolsConf import JetTracksMoments
-    from JetRec.TrackSelectionForJets import getDefaultJetVtxTrackHelper
-
-    suffix = options.get("MomentSuffix", None)
-    if suffix is None:
-        minpt = options.get("MinPt", 1*GeV)
-        if minpt>=GeV :
-            suffix = '_%1.1fGeV'%(minpt/GeV,)
-            suffix = suffix.replace('.0','') # don't write '1.0GeV', simply '1GeV'
-        else:
-            suffix = '_%dMeV'%(int(minpt),)
-        options["MomentSuffix"] = suffix
-    defaultJVtx = getDefaultJetVtxTrackHelper()
-    options.setdefault('JetVtxTrackHelper',defaultJVtx)  # update the JetVtxTrackHelper option if not given
-    trkTool = JetTracksMoments(
-        **options
-        )
-    return trkTool
-
-def getJetClusterMomentTool(toolName="JetClusterMoments")
-    from JetMomentTools.JetMomentToolsConf import JetClusterMomentsTool
-    return JetClusterMomentsTool(toolName)
-
-
-def getORIGINMoments(jetcollname):
-    from JetCalibTools.MakeCalibSequences import alternateCalibSequence 
-    from JetMomentTools.JetMomentToolsConf import JetMomentsFromCalib 
-    from JetMomentTools.GhostAssociation import interpretJetName 
-    from JetRec.JetAlgConfiguration import checkAndUpdateOptions 
-    recognizedJet = interpretJetName(jetcollname) 
-    if recognizedJet is not None: 
-        finder, input, mainParam = recognizedJet  
-        calib = 'LC:ORIGIN' if 'LC' in input else 'EM:ORIGIN' 
-        d = checkAndUpdateOptions(input=input) 
-    return JetMomentsFromCalib( "OriginRecalculator" , Calibrator = alternateCalibSequence(calib, d) )
-    
-
-def getDefaultMissingCellTool(rmax=1.0):
-    rmax = max(rmax, 1.0)
-    if getDefaultMissingCellTool.cache is None:
-        from JetMomentTools.JetMomentToolsConf import MissingCellListTool
-        from AthenaCommon.AppMgr import ToolSvc
-
-        tool = MissingCellListTool()
-        tool.DeltaRmax = rmax
-        tool.AddBadCells = True
-        getDefaultMissingCellTool.cache = tool
-        tool.RemoveCellList = [1275120944, 1275121456, 1275137328, 1275268400, 1275268912, 1275383088, 1275383600, 1275514160, 1275514672, 1275628848, 1275661616, 1275662128, 1275792688, 1275793200, 1275940144, 1275940656, 1275956528, 1276054832, 1276055344, 1276071216, 1283493168, 1283493680, 1283640624, 1283641136, 1283820848, 1283821360, 1283935536, 1283936048, 1284017456, 1284017968, 1284164912, 1284165424, 1284312368, 1284312880, 1284427056, 1284427568, ]
-        #1275349024, 1283688480 # these tile cells were not ignored in the original implementation
-
-
-        ToolSvc += tool
-    else:
-        if rmax > getDefaultMissingCellTool.cache.DeltaRmax:
-            getDefaultMissingCellTool.cache.DeltaRmax = rmax
-        
-    return getDefaultMissingCellTool.cache
-getDefaultMissingCellTool.cache = None
-
-
-def getJetBadChanCorrTool(finder, mainParam, input, **options):
-
-    options=checkAndUpdateOptions(finder=finder, mainParam=mainParam, input=input, **options)
-
-    from JetMomentTools.JetMomentToolsConf import JetBadChanCorrTool
-    from CaloClusterCorrection.StandardCellWeightCalib import getCellWeightTool
-
-    cellcalibtool = getCellWeightTool(options['finder'], options['mainParam'], input, onlyCellWeight=True)
-    coneSize = options['mainParam']
-
-    BadChanCorrT = JetBadChanCorrTool("JetBadChanCorrTool")
-    # Explicitly list flags
-    BadChanCorrT.ConeDr         = coneSize 
-    BadChanCorrT.CellCalibrator = cellcalibtool
-    BadChanCorrT.UseCalibScale  = False
-    BadChanCorrT.AttachCorrCell = True
-    BadChanCorrT.AttachCorrDOTX = True
-    BadChanCorrT.AttachCorrJet  = True
-
-    BadChanCorrT.MissingCellTool = getDefaultMissingCellTool(coneSize)
-    # Optional
-    BadChanCorrT.AttachCorrJetForCell = False
-    if options['addJetQualityMoments'] == True:        
-        BadChanCorrT.AttachCorrJetForCell = True
-
-    # new setup for THistService
-    import os
-    dataPathList = os.environ[ 'DATAPATH' ].split(os.pathsep)
-    dataPathList.insert(0, os.curdir)
-    from AthenaCommon.Utils.unixtools import FindFile
-    RefFileName = FindFile( "JetBadChanCorrTool.root" ,dataPathList, os.R_OK )
-
-
-    from AthenaCommon.AppMgr import ServiceMgr
-    if not hasattr(ServiceMgr, 'THistSvc'):
-        from GaudiSvc.GaudiSvcConf import THistSvc
-        ServiceMgr += THistSvc()
-    ServiceMgr.THistSvc.Input += ["JetBadChanCorrTool DATAFILE=\'%s\' OPT=\'READ\'" % RefFileName]
-
-    return BadChanCorrT
-
-def getCaloQualityTool(computeFromCluster = False,doCellBasedVars = False,addJetQualityMoments=False):
-
-    from JetMomentTools.JetMomentToolsConf import JetCaloQualityTool
-    caloQualityT = JetCaloQualityTool("JetCaloQualityTool")
-    caloQualityT.doCellBasedVariables = doCellBasedVars
-    caloQualityT.cutOnLAr = 4000
-    caloQualityT.doLArQuality = True
-    caloQualityT.doTiming = True
-    caloQualityT.doHECQuality = True
-    caloQualityT.doNegativeE = True
-    caloQualityT.doTileQuality = False
-    caloQualityT.doAverageLArQF = True        
-    #caloQualityT.timingMomentCells     = [5,10]  # produces jet moments: ootFracCells5, ootFracCells10 (names built on the fly from caloQualityT.timingMomentCellsName)
-    caloQualityT.timingMomentClusters  = [5,10]  #
-    caloQualityT.timingMomentCells = []
-    caloQualityT.doJetCentroid = True
-    
-    caloQualityT.ComputeVariableFromCluster = computeFromCluster
-
-    if addJetQualityMoments :
-        caloQualityT.doConstituentBasedVariables = True
-        caloQualityT.doSamplingBasedVariables = True
-        caloQualityT.cutOnTile = 254
-        caloQualityT.doTileQuality = True
-
-
-    return caloQualityT
-
-
-def getJetIsolationTool(toolname,**options):
-    from JetMomentTools.JetMomentToolsConf import JetIsolationTool
-
-    default_options = dict(JetRParam = 0.4,
-                           IsolationMoments = ["IsoKR","IsoDelta", "IsoFixedCone", "IsoFixedArea", "Iso6To8"],
-                           IsolationParam = [ 2., 0.2, 0.8, 1.4, 0.8],
-                           DoIsoSumPt = True,
-                       )
-    default_options.update(options)
-
-    
-    isot = JetIsolationTool(toolname, **default_options)                            
-    return isot
-
-@memoize
-def _getTruthJetIsoSelector():
-    from JetSimTools.JetSimToolsConf import JetTruthParticleSelectorTool
-    from AthenaCommon.AppMgr import ToolSvc
-    
-    selector = JetTruthParticleSelectorTool("JetTruthIsoSelector")
-    selector.includeMuons = False
-    selector.useInteractingParticlesOnly = True
-
-    ToolSvc += selector
-    return selector
-    
-def getTruthJetIsolationTool(toolname, doTruthPileup=False, **options):
-    """We need special options for truth jets.
-    """
-    isot = getJetIsolationTool(toolname, **options)
-
-    from RecExConfig.RecFlags import rec
-    defaultCollName = "SpclMC"  if rec.readAOD()  else "INav4MomTruthEvent"
-    defaultContList = [defaultCollName] if not doTruthPileup else [defaultCollName, defaultCollName+'INTIME']
-    truthCont = options.get('TruthInputContainers', defaultContList)
-
-    isot.TruthInputContainers = truthCont
-    
-    # make sure we have a truth jet selector.
-    isot.TruthSelector = _getTruthJetIsoSelector()
-
-    return isot
-
-def getJetTruthLabelTool(truthCont='TruthInputContainers') :
-    from JetMomentTools.JetMomentToolsConf import JetTruthLabel
-
-    tool = JetTruthLabel("JetTruthLabel")
-    tool.TruthInputContainers = truthCont
-
-    return tool
-
-def getsubJetsMomentTool(toolname="KtDeltaR"):
-    from JetMomentTools.JetMomentToolsConf import JetSubJetsMoments
-    from JetRec.JetFastJetConfig import  configFastJet
-    
-    ktDrTool = JetSubJetsMoments(toolname)
-    fjtool = configFastJet("Kt",0.4, Inclusive=False, ExclusiveNjets=2, ExclusiveDcut=-1)
-    from AthenaCommon.AppMgr import ToolSvc
-    ToolSvc += fjtool
-    ktDrTool.FastJetTool = fjtool
-    ktDrTool.FromJetAssociation = "TrackAssoc"
-    ktDrTool.MinPt = 1*GeV
-    return ktDrTool
-
-
-
-def getMatchingFractionTool(jetcollname, matchType, seq=AlgSequence()):
-    """ ATTENTION this tools returns (tool, alg) where alg is a dependency for  Matching.
-    It *has* to be scheduled before (caller's reponsability).
-    It return None if it can not guess what truth alg to request.
-    """
-    from JetMomentTools.GhostAssociation import interpretJetName
-    from JetMomentTools.JetMomentToolsConf import JetMatchingFractionTool
-    recognizedJet = interpretJetName(jetcollname)
-    if recognizedJet is None:
-        return None
-
-    finder, input, mainParam = recognizedJet
-    algtype = finder+str(int(mainParam*10))        
-    from JetRec.JetGetters import make_StandardJetGetter
-    if matchType == "Truth":
-        from JetRec.JetRec_defaults import standardJetAlgorithm
-        alg = standardJetAlgorithm(algtype+"TruthJets")
-        if alg is None: # possible if truth collection already exist
-            # !!!! WARNNIG minPt cut is ambiguous !!!!
-            alg=make_StandardJetGetter(finder,  mainParam,"Truth",  minPt=4*GeV, jetMoments=[], outputCollectionName=algtype+"TruthNewJets", seq=seq).jetAlgorithmHandle()
-
-        # Then the mftool can be scheduled
-        mftool = JetMatchingFractionTool("TruthMF",MFCollection = alg.JetCollectionName, AssociatedConstitKey="TruthAssoc",
-                                         MomentTag="Truth",UseHighestShareFrac=True)
-    elif matchType == "Track":
-        alg=make_StandardJetGetter(finder,  mainParam,"TrackZ",   addJetQualityMoments=False,  seq=seq).jetAlgorithmHandle()        
-        # Then the mftool can be scheduled
-        mftool = JetMatchingFractionTool("TrackMF",MFCollection = alg.JetCollectionName, AssociatedConstitKey="TrackAssoc",
-                                         MomentTag="Track",UseHighestShareFrac=True)
-    else:
-        return None
-
-    return (mftool, alg)
-
-def getJetLArHVMomentTool():
-
-    from LArRecUtils.LArHVCorrToolDefault import LArHVCorrToolDefault
-    theLArHVCorrTool=LArHVCorrToolDefault()
-    from AthenaCommon.AppMgr import ToolSvc
-    ToolSvc+=theLArHVCorrTool
-
-    #Now declare the jet moment algorithm:
-    from JetMomentTools.JetMomentToolsConf import JetLArHVMoment
-    JetLArHV = JetLArHVMoment("JetLArHVMoment")
-    JetLArHV.HVCorrTool = theLArHVCorrTool
-    return JetLArHV
diff --git a/Reconstruction/Jet/JetMomentTools/src/JetBadChanCorrTool.cxx b/Reconstruction/Jet/JetMomentTools/src/JetBadChanCorrTool.cxx
index b1f200cf3e8128f7ce483c14048cacbbf086cfa0..36d321a799cf12d6d17e160dfab5c77e236a0a88 100644
--- a/Reconstruction/Jet/JetMomentTools/src/JetBadChanCorrTool.cxx
+++ b/Reconstruction/Jet/JetMomentTools/src/JetBadChanCorrTool.cxx
@@ -38,7 +38,7 @@ JetBadChanCorrTool::JetBadChanCorrTool(	const std::string& name) :
   // m_calo_id(0),
   //m_calibTool(this),
   //    m_missingCellToolHandle("MissingCellListTool"),
-  m_missingCellMapName(),
+  // m_missingCellMapName(),
   m_forceMissingCellCheck(false),
   m_useClusters(false)
 {
@@ -60,9 +60,12 @@ JetBadChanCorrTool::JetBadChanCorrTool(	const std::string& name) :
   //  declareProperty("CellCalibrator", m_calibTool);
 
   //declareProperty("MissingCellTool", m_missingCellToolHandle);
-  declareProperty("MissingCellMap", m_missingCellMapName= "MissingCaloCellsMap");
+  // declareProperty("MissingCellMap", m_missingCellMapName= "MissingCaloCellsMap");
   declareProperty("ForceMissingCellCheck", m_forceMissingCellCheck=false);
   declareProperty("UseClusters",m_useClusters= false);
+
+  declareProperty("MissingCellMap", m_badCellMap_key="MissingCaloCellsMap");
+  
 }
 
 JetBadChanCorrTool::~JetBadChanCorrTool()
@@ -70,6 +73,7 @@ JetBadChanCorrTool::~JetBadChanCorrTool()
 
 StatusCode JetBadChanCorrTool::initialize()
 {
+  ATH_MSG_DEBUG("initializing version with data handles");
 
   if(!m_useClusters){
     std::string fname = PathResolver::find_file(m_profileName, "DATAPATH");
@@ -156,6 +160,8 @@ StatusCode JetBadChanCorrTool::initialize()
 
   }
  
+  ATH_CHECK(m_badCellMap_key.initialize());
+
   return StatusCode::SUCCESS;
 }
 
@@ -175,11 +181,16 @@ int JetBadChanCorrTool::modifyJet( xAOD::Jet& jet) const
   if(m_useClusters){
     res = correctionFromClustersBadCells( &jet);
   }else{
+    
+    auto handle = SG::makeHandle (m_badCellMap_key);
+    if (!handle.isValid()){
+      ATH_MSG_ERROR("Could not retieve bad cell map "
+                    << m_badCellMap_key.key());
+      // << m_missingCellMapName);
+      return 1;
+    }
 
-    const jet::CaloCellFastMap * badCellMap ;
-    StatusCode sc= evtStore()->retrieve(badCellMap, m_missingCellMapName) ;
-    if(sc.isFailure() ) {ATH_MSG_ERROR("Could not retieve bad cell map "<< m_missingCellMapName); return 1;}
-
+    auto badCellMap = handle.cptr();
     
     // number of bad cells exceed the limit, set -1 and skip    
     if((int) badCellMap->cells().size() >m_nBadCellLimit){
diff --git a/Reconstruction/Jet/JetRec/share/PUPPI.py b/Reconstruction/Jet/JetRec/share/PUPPI.py
new file mode 100644
index 0000000000000000000000000000000000000000..5e8c489f2279437403a1192cf533b9c9b92571ec
--- /dev/null
+++ b/Reconstruction/Jet/JetRec/share/PUPPI.py
@@ -0,0 +1,101 @@
+theApp.EvtMax = 10
+
+inputName="/eos/atlas/user/j/jstupak/data/AOD/mc15_13TeV.361021.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ1W.merge.AOD.e3569_s2576_s2132_r7725_r7676/AOD.07916735._000053.pool.root.1"
+outputName="JZ1.root"
+
+from AthenaCommon.AppMgr import ServiceMgr
+#ServiceMgr.MessageSvc.OutputLevel = VERBOSE
+
+import AthenaPoolCnvSvc.ReadAthenaPool
+ServiceMgr.EventSelector.InputCollections = [inputName]
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+from JetRec.JetRecFlags import jetFlags
+from JetRec.JetRecStandard import jtm
+
+# Flag to show messges while running.
+#   0 - no messages
+#   1 - Indicates which jetrec tool is running
+#   2 - Details about jetrec execution including which modfier
+#   3 - Plus messages from the finder
+#   4 - Plus messages from the jet builder
+jetFlags.debug = 4
+ServiceMgr.MessageSvc.verboseLimit = 100000
+
+############################################################################################
+
+from copy import copy
+def listReplace(l,old,new):
+  result=copy(l)
+  i=result.index(old)
+  result.pop(i)
+  result.insert(i,new)
+  return result
+
+############################################################################################
+#Run nominal PUPPI algo (CorrectPFO+PUPPI+CHS)
+
+from JetRec.JetRecConf import PseudoJetGetter
+jtm += PseudoJetGetter("PUPPIGetter",
+                       Label = "EMPFlow",
+                       InputContainer = "PUPPIParticleFlowObjects",
+                       OutputContainer = "PUPPIPseudoJets",
+                       SkipNegativeEnergy = True,
+                       )
+
+from JetRecTools.JetRecToolsConf import CorrectPFOTool
+correctPFOTool = CorrectPFOTool("correctPFOTool",
+                                WeightPFOTool = jtm.pflowweighter,
+                                InputIsEM = True,
+                                CalibratePFO = False,
+                                UseChargedWeights = True,
+                                UseVertices = True,
+                                UseTrackToVertexTool = False,
+                                )
+ToolSvc += correctPFOTool
+
+from JetRecTools.JetRecToolsConf import PuppiWeightTool
+puppiWeightTool = PuppiWeightTool("PUPPIWeightTool")
+ToolSvc += puppiWeightTool
+
+from JetRecTools.JetRecToolsConf import ChargedHadronSubtractionTool
+CHSTool = ChargedHadronSubtractionTool("CHSTool")
+ToolSvc += CHSTool
+
+from JetRecTools.JetRecToolsConf import  JetConstituentModSequence
+PUPPISequence = JetConstituentModSequence("PUPPISequence",
+                                          InputContainer = "JetETMiss",
+                                          OutputContainer = "PUPPI",
+                                          InputType = "ParticleFlow",
+                                          Modifiers = [correctPFOTool,puppiWeightTool,CHSTool],
+                                          SaveAsShallow = False,
+                                          )
+ToolSvc += PUPPISequence
+
+from JetRec.JetRecStandardToolManager import empfgetters,pflow_ungroomed_modifiers
+myPUPPIgetters=listReplace(empfgetters,jtm.empflowget,jtm.PUPPIGetter)
+pflow_ungroomed_modifiers.remove('calib')
+pflow_ungroomed_modifiers.remove('truthassoc')
+jtm.addJetFinder("AntiKt4EMPFlowPUPPIJets",  "AntiKt", 0.4,  myPUPPIgetters, pflow_ungroomed_modifiers, ghostArea=0.01 , ptmin=5000, ptminFilter=10000, calibOpt="")
+
+############################################################################################
+
+from JetRec.JetAlgorithm import addJetRecoToAlgSequence
+addJetRecoToAlgSequence(job=topSequence, separateJetAlgs=True)
+
+if hasattr(topSequence,"jetalgAntiKt4EMPFlowPUPPIJets"):
+  topSequence.jetalgAntiKt4EMPFlowPUPPIJets.Tools.insert(0,PUPPISequence)
+
+############################################################################################
+
+from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
+xAODStream = MSMgr.NewPoolRootStream( "StreamXAOD", outputName )
+
+xAODStream.AddItem(   "xAOD::JetContainer#AntiKt4EMPFlowPUPPIJets")
+xAODStream.AddItem("xAOD::JetAuxContainer#AntiKt4EMPFlowPUPPIJets")
+
+xAODStream.AddItem(       "xAOD::PFOContainer#*ParticleFlowObjects*")
+xAODStream.AddItem(    "xAOD::PFOAuxContainer#*ParticleFlowObjects*")
+xAODStream.AddItem("xAOD::ShallowAuxContainer#*ParticleFlowObjects*")
diff --git a/Reconstruction/Jet/JetRecTools/CMakeLists.txt b/Reconstruction/Jet/JetRecTools/CMakeLists.txt
index b430014990f4b346634355995cf524d2ae8c84e2..87d564b5877702a87137533099eeaf8e2b903a4f 100644
--- a/Reconstruction/Jet/JetRecTools/CMakeLists.txt
+++ b/Reconstruction/Jet/JetRecTools/CMakeLists.txt
@@ -5,25 +5,35 @@
 # Declare the package name:
 atlas_subdir( JetRecTools )
 
+# Declare the package's dependencies:
+set( extra_deps_public )
+
+if( NOT XAOD_ANALYSIS )
+  set( extra_deps_public
+    GaudiKernel
+    )
+endif()
+
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthToolSupport/AsgTools
-                          Event/xAOD/xAODPFlow
-                          Event/xAOD/xAODTracking
+                          ${extra_deps_public}
+			  Control/AthContainers
+			  Control/AthToolSupport/AsgTools
+			  Event/xAOD/xAODPFlow
+			  Event/xAOD/xAODTracking
 			  Event/xAOD/xAODCore
 			  Event/xAOD/xAODBase
 			  Event/xAOD/xAODCaloEvent
 			  Event/xAOD/xAODTruth
 			  Event/xAOD/xAODEgamma
 			  Event/xAOD/xAODJet
-                          GaudiKernel
-                          InnerDetector/InDetRecTools/InDetTrackSelectionTool
-                          InnerDetector/InDetRecTools/TrackVertexAssociationTool
-                          Reconstruction/Jet/JetEDM
-                          Reconstruction/Jet/JetInterface
-                          Reconstruction/Jet/JetRec
-                          Reconstruction/PFlow/PFlowUtils )
+			  InnerDetector/InDetRecTools/InDetTrackSelectionTool
+			  InnerDetector/InDetRecTools/TrackVertexAssociationTool
+			  Reconstruction/Jet/JetEDM
+			  Reconstruction/Jet/JetInterface
+			  Reconstruction/Jet/JetRec
+			  Reconstruction/PFlow/PFlowUtils
+			  )
 
 # External dependencies
 find_package( FastJet )
@@ -31,18 +41,30 @@ find_package( FastJetContrib COMPONENTS SoftKiller ConstituentSubtractor )
 
 # Component(s) in the package:
 # JAF tried adding library
-atlas_add_library( JetRecToolsLib
-		   JetRecTools/*.h Root/*.cxx
-		   PUBLIC_HEADERS JetRecTools
-		   INCLUDE_DIRS ${FASTJET_INCLUDE_DIRS} 
-		   PRIVATE_INCLUDE_DIRS ${FASTJETCONTRIB_INCLUDE_DIRS}
-		   LINK_LIBRARIES ${FASTJET_LIBRARIES} AthContainers AsgTools xAODPFlow xAODTracking xAODCore xAODBase xAODCaloEvent xAODTruth xAODEgamma xAODJet GaudiKernel TrackVertexAssociationToolLib JetEDM JetInterface JetRecLib InDetTrackSelectionToolLib
-                   PRIVATE_LINK_LIBRARIES ${FASTJETCONTRIB_LIBRARIES} )
-
-atlas_add_component( JetRecTools
-                     JetRecTools/*.h Root/*.cxx src/components/*.cxx
-                     LINK_LIBRARIES ${FASTJET_LIBRARIES} AthContainers AsgTools xAODPFlow xAODTracking xAODCore xAODBase xAODCaloEvent xAODTruth xAODEgamma xAODJet GaudiKernel TrackVertexAssociationToolLib JetEDM JetInterface JetRecLib JetRecToolsLib 
-		     PRIVATE_LINK_LIBRARIES ${FASTJETCONTRIB_LIBRARIES})
+if( NOT XAOD_STANDALONE )
+  atlas_add_library( JetRecToolsLib
+                     JetRecTools/*.h Root/*.cxx
+                     PUBLIC_HEADERS JetRecTools
+                     INCLUDE_DIRS ${FASTJET_INCLUDE_DIRS}
+                     PRIVATE_INCLUDE_DIRS ${FASTJETCONTRIB_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${FASTJET_LIBRARIES} AthContainers AsgTools xAODPFlow xAODTracking xAODCore xAODBase xAODCaloEvent xAODTruth xAODEgamma xAODJet GaudiKernel TrackVertexAssociationToolLib JetEDM JetInterface JetRecLib InDetTrackSelectionToolLib
+                     PRIVATE_LINK_LIBRARIES ${FASTJETCONTRIB_LIBRARIES} )
+else()
+  atlas_add_library( JetRecToolsLib
+                     JetRecTools/*.h Root/*.cxx
+                     PUBLIC_HEADERS JetRecTools
+                     INCLUDE_DIRS ${FASTJET_INCLUDE_DIRS}
+                     PRIVATE_INCLUDE_DIRS ${FASTJETCONTRIB_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${FASTJET_LIBRARIES} AthContainers AsgTools xAODPFlow xAODTracking xAODCore xAODBase xAODCaloEvent xAODTruth xAODEgamma xAODJet TrackVertexAssociationToolLib JetEDM JetInterface JetRecLib InDetTrackSelectionToolLib
+                     PRIVATE_LINK_LIBRARIES ${FASTJETCONTRIB_LIBRARIES} )
+endif()
+
+if( NOT XAOD_STANDALONE )
+  atlas_add_component( JetRecTools
+                       JetRecTools/*.h Root/*.cxx src/components/*.cxx
+                       LINK_LIBRARIES ${FASTJET_LIBRARIES} AthContainers AsgTools xAODPFlow xAODTracking xAODCore xAODBase xAODCaloEvent xAODTruth xAODEgamma xAODJet GaudiKernel TrackVertexAssociationToolLib JetEDM JetInterface JetRecLib JetRecToolsLib
+                       PRIVATE_LINK_LIBRARIES ${FASTJETCONTRIB_LIBRARIES})
+endif()
 
 # Install files from the package:
 atlas_install_headers( JetRecTools )
diff --git a/Reconstruction/Jet/JetRecTools/JetRecTools/CaloClusterConstituentsOrigin.h b/Reconstruction/Jet/JetRecTools/JetRecTools/CaloClusterConstituentsOrigin.h
index 59cd1aa0a50891d2a38943b3f1a5d362fe5791d9..101007d5822ccd2d71fb292c46bee7661069b36e 100644
--- a/Reconstruction/Jet/JetRecTools/JetRecTools/CaloClusterConstituentsOrigin.h
+++ b/Reconstruction/Jet/JetRecTools/JetRecTools/CaloClusterConstituentsOrigin.h
@@ -42,6 +42,8 @@ protected:
 private:
   SG::ReadHandleKey<xAOD::VertexContainer> m_readVertexContainer_key;
   
+  bool m_saveDetectorEta;
+  
 };
 
 #endif
diff --git a/Reconstruction/Jet/JetRecTools/JetRecTools/ClusterTimeCutTool.h b/Reconstruction/Jet/JetRecTools/JetRecTools/ClusterTimeCutTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..29c765f550f5bb705982d49b9288823348c59ac8
--- /dev/null
+++ b/Reconstruction/Jet/JetRecTools/JetRecTools/ClusterTimeCutTool.h
@@ -0,0 +1,39 @@
+#ifndef JETRECTOOLS_CLUSTERTIMECUTTOOL_H
+#define JETRECTOOLS_CLUSTERTIMECUTTOOL_H
+
+// \class ClusterTimeCutTool
+// \author Jennifer Roloff
+// \date October 2016
+//
+// This tool places cuts on (ECal) clusters based on their timing information
+
+
+#include "JetRecTools/JetConstituentModifierBase.h"
+#include "xAODBase/IParticleContainer.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+#include "xAODCaloEvent/CaloCluster.h"
+
+#include <string>
+
+class ClusterTimeCutTool : public JetConstituentModifierBase{
+  ASG_TOOL_CLASS(ClusterTimeCutTool, IJetConstituentModifier)
+
+  public:
+  
+  ClusterTimeCutTool(const std::string& name);
+  ~ClusterTimeCutTool();
+  StatusCode process(xAOD::IParticleContainer* cont) const; 
+  StatusCode process(xAOD::CaloClusterContainer* cont) const; // MEN: Might need to rename this process
+
+  private:
+  // Properties.
+  float m_lambdaCalDivide; 
+  float m_qualityCut; 
+  float m_timeCut1; 
+  float m_timeCut2; 
+
+		
+};
+
+
+#endif
diff --git a/Reconstruction/Jet/JetRecTools/JetRecTools/Puppi.h b/Reconstruction/Jet/JetRecTools/JetRecTools/Puppi.h
new file mode 100644
index 0000000000000000000000000000000000000000..a73c5120c48f404b9e0a4eeb572be350efb2f76b
--- /dev/null
+++ b/Reconstruction/Jet/JetRecTools/JetRecTools/Puppi.h
@@ -0,0 +1,66 @@
+#include "fastjet/internal/base.hh"
+#include "fastjet/PseudoJet.hh"
+
+#ifndef JETRECTOOLS_PUPPI_h
+#define JETRECTOOLS_PUPPI_h
+
+//This class can be used to pass in otherchi2 values for each PFO
+class PuppiUserInfo: public fastjet::PseudoJet::UserInfoBase{
+ public:
+  PuppiUserInfo();
+  PuppiUserInfo(std::vector<double>);
+  PuppiUserInfo(double);
+
+  std::vector<double> otherChi2Vec;
+};
+
+//=================================================================================================================================
+
+class Puppi{
+
+ public:
+  Puppi(double R0, double Rmin, double beta, double centralPTCutOffset, double centralPTCutSlope, double forwardPTCutOffset, double forwardPTCutSlope, double etaBoundary);
+
+  void setParticles(const std::vector<fastjet::PseudoJet> chargedHS, const std::vector<fastjet::PseudoJet> chargedPU, const std::vector<fastjet::PseudoJet> neutral, const std::vector<fastjet::PseudoJet> forward, int nPU);
+
+  // Returns the weight that would be applied to a particle (assuming it is neutral or forward)
+  double getWeight(const fastjet::PseudoJet pfo);
+
+  // Returns the value of alpha for this particle
+  double getAlpha(const fastjet::PseudoJet pfo);
+
+  double getMedian();
+  double getRMS();
+
+ private:
+
+  double getChi2(const fastjet::PseudoJet& pfo);
+
+  void findAlphaMedianAndRMS();
+
+  std::vector<fastjet::PseudoJet> m_chargedHS;
+  std::vector<fastjet::PseudoJet> m_chargedPU;
+  std::vector<fastjet::PseudoJet> m_neutral;
+  std::vector<fastjet::PseudoJet> m_forward;
+
+  std::vector< std::vector< fastjet::PseudoJet >* > m_allParticles;
+
+  double m_R0;
+  double m_Rmin;
+  double m_beta;
+  double m_centralPTCutOffset;
+  double m_centralPTCutSlope;
+  double m_forwardPTCutOffset;
+  double m_forwardPTCutSlope;
+  double m_etaBoundary;
+  bool m_includeCentralNeutralsInAlpha;
+
+  double m_median;
+  double m_rms;
+
+  double m_nPV;
+
+};
+
+#endif 
+//FASTJET_END_NAMESPACE
diff --git a/Reconstruction/Jet/JetRecTools/JetRecTools/PuppiWeightTool.h b/Reconstruction/Jet/JetRecTools/JetRecTools/PuppiWeightTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..776fdab31b352edd981a3099e84075c6573558c0
--- /dev/null
+++ b/Reconstruction/Jet/JetRecTools/JetRecTools/PuppiWeightTool.h
@@ -0,0 +1,45 @@
+#ifndef PUPPIWeightTool_h
+#define PUPPIWeightTool_h
+
+#include "JetRecTools/JetConstituentModifierBase.h"
+#include "xAODBase/IParticleContainer.h"
+
+#include "xAODCaloEvent/CaloCluster.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+#include "xAODTracking/VertexContainer.h"
+#include "xAODPFlow/PFOContainer.h"
+#include "JetRecTools/Puppi.h"
+#include <string>
+
+class PuppiWeightTool: public JetConstituentModifierBase {
+  ASG_TOOL_CLASS(PuppiWeightTool, IJetConstituentModifier)
+
+ public:
+
+  PuppiWeightTool(const std::string& name);
+  StatusCode initialize();
+  StatusCode process(xAOD::IParticleContainer* cont) const;
+  StatusCode process(xAOD::PFOContainer* cont) const; 
+
+ private:
+
+  // puppi parameters
+  double m_R0;
+  double m_Rmin;
+  double m_beta;
+  double m_centralPTCutOffset;
+  double m_centralPTCutSlope;
+  double m_forwardPTCutOffset;
+  double m_forwardPTCutSlope;
+  double m_etaBoundary;
+
+  Puppi* m_puppi;
+
+  bool m_includeCentralNeutralsInAlpha;
+  bool m_applyWeight;
+
+  SG::ReadHandleKey<xAOD::VertexContainer> m_vertexContainer_key{"PrimaryVertices"};
+
+};
+
+#endif
diff --git a/Reconstruction/Jet/JetRecTools/Root/CaloClusterConstituentsOrigin.cxx b/Reconstruction/Jet/JetRecTools/Root/CaloClusterConstituentsOrigin.cxx
index 51c471d2dca031ea3ab1340d8e42689ee35f8e82..293b704299fd79d1a6ecf2d8594f501b0f3df5c2 100644
--- a/Reconstruction/Jet/JetRecTools/Root/CaloClusterConstituentsOrigin.cxx
+++ b/Reconstruction/Jet/JetRecTools/Root/CaloClusterConstituentsOrigin.cxx
@@ -19,7 +19,7 @@ CaloClusterConstituentsOrigin::CaloClusterConstituentsOrigin(const std::string &
   declareProperty ("VertexContainer",  
                    m_readVertexContainer_key="PrimaryVertices");
   declareProperty("UseEMScale",m_useEMScale=false);
-
+  declareProperty("SaveDetectorEta",m_saveDetectorEta=false);
 }
 
 StatusCode CaloClusterConstituentsOrigin::initialize() {
@@ -62,11 +62,14 @@ StatusCode CaloClusterConstituentsOrigin::processLC(xAOD::CaloClusterContainer*
 
 
   for(xAOD::CaloCluster* cl : *cont) {
+    float eta_det = cl->eta();
     if(cl->calE()>1e-9) {
       xAOD::CaloVertexedTopoCluster corrCL( *cl,vert->position());
       cl->setEta(corrCL.eta());
       cl->setPhi(corrCL.phi());
     }
+    if(m_saveDetectorEta)
+      cl->auxdecor<float>("DetectorEta") = eta_det;
   }
   return StatusCode::SUCCESS;
 }
@@ -75,12 +78,15 @@ StatusCode CaloClusterConstituentsOrigin::processEM(xAOD::CaloClusterContainer*
 
 
   for(xAOD::CaloCluster* cl : *cont) {
-    if(cl->rawE()>1e-9) {
+    float eta_det = cl->eta();
+    if(cl->rawE()>1e-9) {      
       xAOD::CaloVertexedTopoCluster corrCL( *cl,xAOD::CaloCluster::UNCALIBRATED, vert->position());
       cl->setE(corrCL.e());
       cl->setEta(corrCL.eta());
       cl->setPhi(corrCL.phi());
     }
+    if(m_saveDetectorEta)
+      cl->auxdecor<float>("DetectorEta") = eta_det;
   }
   return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/Jet/JetRecTools/Root/ClusterTimeCutTool.cxx b/Reconstruction/Jet/JetRecTools/Root/ClusterTimeCutTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..032a068cb73443fa757d513a46317e235a73c4d8
--- /dev/null
+++ b/Reconstruction/Jet/JetRecTools/Root/ClusterTimeCutTool.cxx
@@ -0,0 +1,57 @@
+#include <vector>
+#include "JetRecTools/ClusterTimeCutTool.h"
+
+using namespace std;
+
+
+ClusterTimeCutTool::ClusterTimeCutTool(const std::string& name) : JetConstituentModifierBase(name)
+                                                                , m_lambdaCalDivide(0)
+                                                                , m_qualityCut(0)
+                                                                , m_timeCut1(0)
+                                                                , m_timeCut2(0)
+{
+#ifdef ASG_TOOL_ATHENA
+  declareInterface<IJetConstituentModifier>(this);
+#endif
+  declareProperty("LambdaCalDivide", m_lambdaCalDivide = 317);
+  declareProperty("QualityCut", m_qualityCut = 0.02);
+  declareProperty("TimeCut1", m_timeCut1 = 5);
+  declareProperty("TimeCut2", m_timeCut2 = 15);
+}
+
+
+StatusCode ClusterTimeCutTool::process(xAOD::CaloClusterContainer* cont) const {
+  xAOD::CaloClusterContainer::iterator cl = cont->begin();
+  xAOD::CaloClusterContainer::iterator cl_end = cont->end();
+
+  for( ; cl != cl_end; ++cl ) {
+		if(abs( (*cl)->eta() ) < 2.5){
+			double quality =(*cl)->auxdata<float>("AVG_LAR_Q");
+                        quality /= 65535; //quality is on [0,2^16-1] scale
+			double lambda_center =(*cl)->auxdata<float>("CENTER_LAMBDA");
+			double time = (*cl)->time();
+			if(lambda_center > m_lambdaCalDivide) continue;
+			if( quality > m_qualityCut && abs(time) > m_timeCut1){
+				(*cl)->setE( 0 );
+			}
+			if( quality <= m_qualityCut && abs(time) > m_timeCut2){
+				(*cl)->setE( 0 );
+			}
+		}
+
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode ClusterTimeCutTool::process(xAOD::IParticleContainer* cont) const {
+  xAOD::CaloClusterContainer* clust = dynamic_cast<xAOD::CaloClusterContainer*> (cont); // Get CaloCluster container
+  if(clust) return process(clust);
+  return StatusCode::FAILURE;
+}
+
+
+ClusterTimeCutTool::~ClusterTimeCutTool(){
+}
+
+
diff --git a/Reconstruction/Jet/JetRecTools/Root/LinkDef.h b/Reconstruction/Jet/JetRecTools/Root/LinkDef.h
index 67169c47af11cb2e4559f2d8076a262eb9751ba7..876782931dedbdfe19ff22a4fc9dd35b7e905f61 100644
--- a/Reconstruction/Jet/JetRecTools/Root/LinkDef.h
+++ b/Reconstruction/Jet/JetRecTools/Root/LinkDef.h
@@ -15,6 +15,9 @@
 #include <JetRecTools/SoftKillerWeightTool.h>
 #include <JetRecTools/VoronoiWeightTool.h>
 #include <JetRecTools/PFlowPseudoJetGetter.h>
+#include <JetRecTools/CorrectPFOTool.h>
+#include <JetRecTools/ChargedHadronSubtractionTool.h>
+#include <JetRecTools/PuppiWeightTool.h>
 
 #ifdef __CINT__
 
@@ -35,6 +38,9 @@
 #pragma link C++ class JetConstituentModSequence+;
 #pragma link C++ class SoftKillerWeightTool+;
 #pragma link C++ class VoronoiWeightTool+;
+#pragma link C++ class CorrectPFOTool+;
+#pragma link C++ class ChargedHadronSubtractionTool+;
+#pragma link C++ class PuppiWeightTool+;
 
 #pragma link C++ class PFlowPseudoJetGetter+;
 
diff --git a/Reconstruction/Jet/JetRecTools/Root/Puppi.cxx b/Reconstruction/Jet/JetRecTools/Root/Puppi.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..64785dfc593b8bd12db4b0ac119842ade0a13e22
--- /dev/null
+++ b/Reconstruction/Jet/JetRecTools/Root/Puppi.cxx
@@ -0,0 +1,165 @@
+#include "Math/ProbFunc.h"
+#include "TMath.h"
+#include "fastjet/Selector.hh"
+
+#include "JetRecTools/Puppi.h"
+
+using namespace std;
+
+//PuppiUserInfo can be used to include additional information in algorithm
+PuppiUserInfo::PuppiUserInfo(): otherChi2Vec(std::vector<double>()) {}
+PuppiUserInfo::PuppiUserInfo(std::vector<double> v): otherChi2Vec(v) {}
+PuppiUserInfo::PuppiUserInfo(double v): otherChi2Vec(std::vector<double>({v})) {}
+
+//=================================================================================================================================
+
+Puppi::Puppi(double R0, double Rmin, double beta, double centralPTCutOffset, double centralPTCutSlope, double forwardPTCutOffset, double forwardPTCutSlope, double etaBoundary): 
+  m_R0(R0), m_Rmin(Rmin), m_beta(beta), m_centralPTCutOffset(centralPTCutOffset), m_centralPTCutSlope(centralPTCutSlope), m_forwardPTCutOffset(forwardPTCutOffset), m_forwardPTCutSlope(forwardPTCutSlope), m_etaBoundary(etaBoundary)
+{}
+
+//---------------------------------------------------------------------------------------------------------------------------------
+
+//Sets the particles used for calculations, and calculates the median and RMS for the PU distribution
+void Puppi::setParticles(const std::vector<fastjet::PseudoJet> chargedHS, const std::vector<fastjet::PseudoJet> chargedPU, const std::vector<fastjet::PseudoJet> neutral, const std::vector<fastjet::PseudoJet> forward, int nPV){
+
+  m_chargedHS=chargedHS;
+  m_chargedPU=chargedPU;
+  m_neutral=neutral;
+  m_forward=forward;
+	
+  m_nPV=nPV;
+
+  m_allParticles = {&m_chargedHS, &m_chargedPU, &m_neutral, &m_forward};
+	
+  findAlphaMedianAndRMS();
+}
+
+//---------------------------------------------------------------------------------------------------------------------------------
+
+double Puppi::getChi2(const fastjet::PseudoJet& pfo){
+  double chi=(getAlpha(pfo)-m_median)/m_rms;
+  return chi*fabs(chi);
+}
+
+//---------------------------------------------------------------------------------------------------------------------------------
+
+double Puppi::getWeight(fastjet::PseudoJet pfo){
+
+  double chi2Total=getChi2(pfo);
+  int nDF=1;
+
+  if(pfo.has_user_info<PuppiUserInfo>()){
+    //This is untested!!!!
+    //Need to think about how to handle sign of chi2 - for now just throw it away
+    chi2Total=fabs(chi2Total);
+    for(auto v: pfo.user_info<PuppiUserInfo>().otherChi2Vec) {
+      chi2Total+=v;
+      nDF+=1;
+    }
+  }
+
+  double w = ROOT::Math::chisquared_cdf(chi2Total, nDF);
+
+  double offset,slope;
+  if( fabs(pfo.eta()) < m_etaBoundary) {
+    offset=m_centralPTCutOffset;
+    slope=m_centralPTCutSlope;
+  }
+  else {
+    offset=m_forwardPTCutOffset;
+    slope=m_forwardPTCutSlope;
+  }
+
+  w*=(pfo.pt()>offset+m_nPV*slope);
+
+  return w;
+}
+
+//---------------------------------------------------------------------------------------------------------------------------------
+
+double Puppi::getAlpha(const fastjet::PseudoJet pfo){
+  fastjet::Selector sel = fastjet::SelectorCircle(m_R0);
+  sel.set_reference(pfo);
+
+  double sum=0;
+  int nNeighbors=0;
+
+  if (fabs(pfo.eta())<m_etaBoundary+m_R0){
+    vector<fastjet::PseudoJet> chargedHSNeighbors = sel(m_chargedHS);
+    for (auto p: chargedHSNeighbors){
+      float dR=pfo.delta_R(p);
+      if (dR>m_Rmin){
+	sum+=p.pt()/pow(dR, m_beta);
+	nNeighbors+=1;
+      }
+    }
+  }
+
+  if (m_includeCentralNeutralsInAlpha){
+    if (fabs(pfo.eta())<m_etaBoundary+m_R0){
+      vector<fastjet::PseudoJet> neutralNeighbors = sel(m_neutral);
+      for (auto p: neutralNeighbors){
+	float dR=pfo.delta_R(p);
+	if (dR>m_Rmin){
+	  sum+=pow(p.pt()/dR, m_beta);
+	  nNeighbors+=1;
+	}
+      }
+    }
+  }
+
+  if (fabs(pfo.eta())>m_etaBoundary-m_R0){
+    vector<fastjet::PseudoJet> forwardNeighbors = sel(m_forward);
+    for (auto p: forwardNeighbors){
+      float dR=pfo.delta_R(p);
+      if (dR>m_Rmin){
+	sum+=pow(p.pt()/dR, m_beta);
+	nNeighbors+=1;
+      }
+    }
+  }
+
+  if (sum<=FLT_MIN) return -99999;
+  if (nNeighbors!=0) return log(sum);
+  return -9999;
+}
+
+//---------------------------------------------------------------------------------------------------------------------------------
+
+//Finds the median and LHS RMS for the charged PU distribution (done each event)
+void Puppi::findAlphaMedianAndRMS(){
+  vector<double> values;
+
+  for(auto p: m_chargedPU){
+
+    // Don't want to include particles on the boundary
+    if( fabs(p.eta()) > m_etaBoundary-m_R0) continue;
+
+    double value = getAlpha(p);
+    if(value > -999) values.push_back(value);  //-9999 is the value assigned to pfo with zero neighbors
+  }
+
+  std::sort(values.begin(),values.end());
+			
+  if(values.size()>0) m_median=values[int(values.size()*0.5)];
+  else m_median=-9999;
+
+  // now compute the LHS RMS
+  double sum=0;
+  int n = 0;
+  for(auto value: values){
+    if (value - m_median > 0) continue;
+    sum += (value - m_median)*(value - m_median);
+    ++n;
+  }
+
+  if(n > 0) m_rms = TMath::Sqrt(sum/n);
+  else m_rms=-9999;
+}
+
+double Puppi::getMedian(){
+  return m_median;
+}
+double Puppi::getRMS(){
+  return m_rms;
+}
diff --git a/Reconstruction/Jet/JetRecTools/Root/PuppiWeightTool.cxx b/Reconstruction/Jet/JetRecTools/Root/PuppiWeightTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..11daf44933a9107fe2991a3132887a30c77c2b28
--- /dev/null
+++ b/Reconstruction/Jet/JetRecTools/Root/PuppiWeightTool.cxx
@@ -0,0 +1,137 @@
+#include "JetRecTools/PuppiWeightTool.h"
+
+#include "fastjet/PseudoJet.hh"
+#include <vector>
+
+#include "xAODCore/ShallowCopy.h"
+#include "xAODCaloEvent/CaloCluster.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+#include "xAODBase/IParticleHelpers.h"
+#include "xAODCore/ShallowAuxContainer.h"
+
+using namespace std;
+
+//------------------------------------------------------------------------------
+
+PuppiWeightTool::PuppiWeightTool(const std::string& name) : JetConstituentModifierBase(name) {
+#ifdef ASG_TOOL_ATHENA
+  declareInterface<IJetConstituentModifier>(this);
+#endif
+
+  declareProperty("R0", m_R0 = 0.3);
+  declareProperty("Rmin", m_Rmin = 0.001);
+  declareProperty("Beta", m_beta = 1);
+  declareProperty("CentralPTCutOffset", m_centralPTCutOffset = 0);
+  declareProperty("CentralPTCutSlope", m_centralPTCutSlope = 0);
+  declareProperty("ForwardPTCutOffset", m_forwardPTCutOffset = 0);
+  declareProperty("ForwardPTCutSlope", m_forwardPTCutSlope = 0);
+  declareProperty("EtaBoundary",m_etaBoundary = 2.5);
+
+  declareProperty("ApplyWeight",m_applyWeight=true);
+  declareProperty("IncludeCentralNeutralsInAlpha",m_includeCentralNeutralsInAlpha=false);
+  
+  m_puppi = new Puppi(m_R0, m_Rmin, m_beta, m_centralPTCutOffset, m_centralPTCutSlope, m_forwardPTCutOffset, m_forwardPTCutSlope, m_etaBoundary);
+}
+
+//------------------------------------------------------------------------------
+
+StatusCode PuppiWeightTool::initialize() {
+  ATH_MSG_INFO("Initializing tool " << name() << "...");
+  
+  ATH_CHECK(m_vertexContainer_key.initialize());
+
+  return StatusCode::SUCCESS;
+}
+
+//------------------------------------------------------------------------------
+
+StatusCode PuppiWeightTool::process(xAOD::IParticleContainer* cont) const {
+  xAOD::PFOContainer* pfoCont = dynamic_cast<xAOD::PFOContainer*> (cont);
+  if(pfoCont) return process(pfoCont);
+  else{
+    ATH_MSG_ERROR("Unable to dynamic cast IParticleContainer to PFOContainer");
+    return StatusCode::FAILURE;
+  }
+}
+
+//------------------------------------------------------------------------------
+
+StatusCode PuppiWeightTool::process(xAOD::PFOContainer* cont) const{
+
+  const static SG::AuxElement::Accessor<bool> PVMatchedAcc("matchedToPV");
+  const static SG::AuxElement::Accessor<double> alphaAcc("PUPPI_alpha");
+  const static SG::AuxElement::Accessor<double> weightAcc("PUPPI_weight");
+
+  std::vector<fastjet::PseudoJet> chargedHSVector;
+  std::vector<fastjet::PseudoJet> chargedPUVector;
+  std::vector<fastjet::PseudoJet> neutralVector;
+  std::vector<fastjet::PseudoJet> forwardVector;
+
+  // Fill input particle vectors for puppi
+  for ( xAOD::PFO* ppfo : *cont ) {
+    if (!PVMatchedAcc.isAvailable(*ppfo)){
+      ATH_MSG_ERROR("Not known if PFO is matched to primary vertex.  Run CorrectPFOTool before ChargedHadronSubtractionTool");
+      return StatusCode::FAILURE;
+    }
+
+    if (ppfo->pt()<=FLT_MIN) continue;
+
+    fastjet::PseudoJet pj(ppfo->p4());
+    //pj.set_user_info(new PuppiUserInfo({someOtherChi2,yetAnotherChi2}));  //example of how additional information could be exploited - needs to be calculated somewhere above
+
+    float charge = ppfo->charge();
+    bool isCharged = (fabs(charge) > FLT_MIN);
+
+    if(fabs(ppfo->eta()) > m_etaBoundary) forwardVector.push_back(pj);
+    else{     
+      if(isCharged){
+        bool matchedToPrimaryVertex=PVMatchedAcc(*ppfo);
+	if(matchedToPrimaryVertex) chargedHSVector.push_back(pj);
+	else chargedPUVector.push_back(pj);
+      }
+      else neutralVector.push_back(pj);
+    }
+  }
+
+  //Count the number of primary vertices
+  const xAOD::VertexContainer* pvtxs = nullptr;
+  auto handle = SG::makeHandle(m_vertexContainer_key);
+  if (!handle.isValid()){
+    ATH_MSG_WARNING(" This event has no primary vertices " );
+    return StatusCode::FAILURE;
+  }
+    
+  pvtxs = handle.cptr();
+  if(pvtxs->empty()){
+    ATH_MSG_WARNING(" This event has no primary vertices " );
+    return StatusCode::FAILURE;
+  }
+
+  int nPV=0;
+  for( auto vtx_itr : *pvtxs ){
+    if((int)vtx_itr->nTrackParticles() < 2 ) continue;
+    ++nPV;
+  }
+
+  m_puppi->setParticles(chargedHSVector, chargedPUVector, neutralVector, forwardVector, nPV);
+
+  for ( xAOD::PFO* ppfo : *cont ) {
+    float charge = ppfo->charge();
+    bool isCharged = (fabs(charge) > FLT_MIN);
+    bool isForward = (fabs(ppfo->eta()) > m_etaBoundary);
+
+    fastjet::PseudoJet pj(ppfo->p4());
+
+    double weight = m_puppi->getWeight(pj);
+    double alpha = m_puppi->getAlpha(pj);
+
+    if ((!isCharged || isForward) && m_applyWeight) ppfo->setP4(weight*ppfo->p4());
+    alphaAcc(*ppfo) = alpha;
+    weightAcc(*ppfo) = weight;
+  }
+
+  ATH_MSG_DEBUG("Median: "<<m_puppi->getMedian());
+  ATH_MSG_DEBUG("RMS: "<<m_puppi->getRMS());
+
+  return StatusCode::SUCCESS;
+}
diff --git a/Reconstruction/Jet/JetRecTools/src/components/JetRecTools_entries.cxx b/Reconstruction/Jet/JetRecTools/src/components/JetRecTools_entries.cxx
index 0529ee4632316d34902387ef74e9d0ad49fa4e77..cbf29c06536481fba4f273375121b2e798d4c546 100755
--- a/Reconstruction/Jet/JetRecTools/src/components/JetRecTools_entries.cxx
+++ b/Reconstruction/Jet/JetRecTools/src/components/JetRecTools_entries.cxx
@@ -13,10 +13,12 @@
 #include "JetRecTools/SoftKillerWeightTool.h"
 #include "JetRecTools/VoronoiWeightTool.h"
 #include "JetRecTools/ClusterAtEMScaleTool.h"
+#include "JetRecTools/ClusterTimeCutTool.h"
 #include "JetRecTools/ConstituentSubtractorTool.h"
 #include "JetRecTools/JetInputElRemovalTool.h"
 #include "JetRecTools/CorrectPFOTool.h"
 #include "JetRecTools/ChargedHadronSubtractionTool.h"
+#include "JetRecTools/PuppiWeightTool.h"
 
 DECLARE_TOOL_FACTORY(JetTrackSelectionTool)
 DECLARE_TOOL_FACTORY(SimpleJetTrackSelectionTool)
@@ -30,10 +32,12 @@ DECLARE_TOOL_FACTORY(CaloClusterConstituentsOrigin)
 DECLARE_TOOL_FACTORY(SoftKillerWeightTool)
 DECLARE_TOOL_FACTORY( VoronoiWeightTool )
 DECLARE_TOOL_FACTORY( ClusterAtEMScaleTool )
+DECLARE_TOOL_FACTORY( ClusterTimeCutTool )
 DECLARE_TOOL_FACTORY( ConstituentSubtractorTool )
 DECLARE_TOOL_FACTORY( JetInputElRemovalTool )
 DECLARE_TOOL_FACTORY( CorrectPFOTool )
 DECLARE_TOOL_FACTORY( ChargedHadronSubtractionTool )
+DECLARE_TOOL_FACTORY( PuppiWeightTool )
 
 DECLARE_FACTORY_ENTRIES(JetRecTools) {
   DECLARE_TOOL(JetTrackSelectionTool)
@@ -49,8 +53,10 @@ DECLARE_FACTORY_ENTRIES(JetRecTools) {
   DECLARE_TOOL( ConstituentSubtractorTool )
   DECLARE_TOOL( VoronoiWeightTool )
   DECLARE_TOOL( ClusterAtEMScaleTool )
+  DECLARE_TOOL( ClusterTimeCutTool )
   DECLARE_TOOL( JetInputElRemovalTool )
   DECLARE_TOOL( CorrectPFOTool )
   DECLARE_TOOL( ChargedHadronSubtractionTool )
+  DECLARE_TOOL( PuppiWeightTool )
 
 }
diff --git a/Reconstruction/Jet/KtJet/src/packagedoc.h b/Reconstruction/Jet/KtJet/src/packagedoc.h
index 539d0b3963c95478683585deb57f2d17b6006a28..13428f01cf37122771e038318e810323c48364a1 100644
--- a/Reconstruction/Jet/KtJet/src/packagedoc.h
+++ b/Reconstruction/Jet/KtJet/src/packagedoc.h
@@ -83,9 +83,6 @@
 @section KtJet_@section jobOptions jobOptions
  * None
  *
- * <hr>
-@section KtJet_@section requirements CMT requirements
- * @verbinclude  requirements
  */
 
 /**
diff --git a/Reconstruction/MET/METUtilities/CMakeLists.txt b/Reconstruction/MET/METUtilities/CMakeLists.txt
index 05fabb69c45fdd308d0b9444d87775346e3fea22..cd63e950339cc9957d7fbab5ae0761d0e9afd477 100644
--- a/Reconstruction/MET/METUtilities/CMakeLists.txt
+++ b/Reconstruction/MET/METUtilities/CMakeLists.txt
@@ -16,7 +16,7 @@ elseif( XAOD_ANALYSIS )
         Control/AthenaBaseComps
 	PhysicsAnalysis/POOLRootAccess
         Reconstruction/Jet/JetCalibTools )
-elseif()
+else()
    set( extra_deps GaudiKernel
         Control/AthenaBaseComps )
 endif()
diff --git a/Reconstruction/MET/METUtilities/Root/METSystematicsTool.cxx b/Reconstruction/MET/METUtilities/Root/METSystematicsTool.cxx
index 6b136cd5bc5dff9ddb3c4d3a0f56b0f473eae8ac..a145556a8ca4b990ffa5a63481f367b8cb2801fa 100644
--- a/Reconstruction/MET/METUtilities/Root/METSystematicsTool.cxx
+++ b/Reconstruction/MET/METUtilities/Root/METSystematicsTool.cxx
@@ -417,7 +417,7 @@ namespace met {
       double const ptHardMet = TMath::Sqrt( ptHard.mpx * ptHard.mpx +
 					    ptHard.mpy * ptHard.mpy )  ;
 
-      xAOD::MissingET* jetterm = *METcont->find( MissingETBase::Source::jet() );
+      const xAOD::MissingET* jetterm = *METcont->find( MissingETBase::Source::jet() );
       size_t njet = (jetterm==nullptr) ? 0 : acc_constitObjLinks(*jetterm ).size();
 
       int          phbin                                     = m_shiftpara_pthard_njet_mu->GetXaxis()->FindBin( ptHardMet  ) ;
@@ -593,7 +593,7 @@ namespace met {
       switch( m_appliedSystEnum ) {
       case MET_JETTRK_SCALEUP :
 	{
-	  uncert  = uncert;
+	  //uncert  = uncert;
 	  break;
 	}
       case MET_JETTRK_SCALEDOWN :
diff --git a/Reconstruction/MVAUtils/doc/packagedoc.h b/Reconstruction/MVAUtils/doc/packagedoc.h
index d5ad3aa57db12ea10dcd2348456bda5d4d9f3a6a..169cb124b91f60def0ad651dd5d8eead8bcc4111 100644
--- a/Reconstruction/MVAUtils/doc/packagedoc.h
+++ b/Reconstruction/MVAUtils/doc/packagedoc.h
@@ -28,12 +28,4 @@ dual-use.
 @author Bruno Lenzi
 
 @section MVAUtils_ExtrasMVAUtils Extra Pages
- - @ref UsedMVAUtils
- - @ref RequirementsMVAUtils
-*/
-/**
-@page UsedMVAUtils Used Packages
-*/
-/**
-@page RequirementsMVAUtils Requirements
 */
diff --git a/Reconstruction/MVAUtils/util/convertXmlToRootTree.cxx b/Reconstruction/MVAUtils/util/convertXmlToRootTree.cxx
index cdff52c44c7d1ef7c6b583f6a2b54c4c8ffd9288..24f186b8f2b11838a5b8ee96cce9d7243c0e00b5 100644
--- a/Reconstruction/MVAUtils/util/convertXmlToRootTree.cxx
+++ b/Reconstruction/MVAUtils/util/convertXmlToRootTree.cxx
@@ -192,13 +192,6 @@ int main(int argc, char** argv){
   MVAUtils::BDT* bdt = new MVAUtils::BDT( method_bdt, isRegression || isGrad, useYesNoLeaf);
   bdt->SetPointers(m_vars);
 
-  // {
-  //   auto tree_itr = method_bdt->GetForest().begin();
-  //   const vector<float*>* p_vars(&m_vars);
-  //   TMVA::Event event( p_vars, m_vars.size() );
-  //   cout << "Verbose: " << (*tree_itr)->CheckEvent( &event, 0 ) << " " << bdt->GetTreeResponse(m_vars, bdt->m_forest[0]) << endl;
-  // }
-
 
   cout << endl << "Testing MVA produced from TMVA::Reader " << endl;
 
@@ -228,8 +221,14 @@ int main(int argc, char** argv){
 
 
   cout << endl << "Reading BDT from root file and testing " << outFileName << endl;
+
   f = TFile::Open(outFileName, "READ");
   TTree* bdt_tree = dynamic_cast<TTree*> (f->Get("BDT"));
+  if(!bdt_tree){
+    cerr <<"Could not Retrieve BDT TTree from file , should not happen" <<endl;
+    return 0;
+  }
+  
   bdt = new MVAUtils::BDT(bdt_tree);
   bdt->SetPointers(m_vars);
   cout << bdt->GetResponse() << endl;
diff --git a/Reconstruction/MuonIdentification/CaloTrkMuIdTools/doc/packagedoc.h b/Reconstruction/MuonIdentification/CaloTrkMuIdTools/doc/packagedoc.h
index f194331cb046e000366909460c95df594bb81f2c..dd0d49d97185b7b56486589fc0cac5dcd7edcd89 100644
--- a/Reconstruction/MuonIdentification/CaloTrkMuIdTools/doc/packagedoc.h
+++ b/Reconstruction/MuonIdentification/CaloTrkMuIdTools/doc/packagedoc.h
@@ -30,7 +30,5 @@
   The tools can be steered through jobOptions. The default configuration that is being employed for standard reconstruction is 
   set up by the jobOptions found in share. 
 
-@section CaloTrkMuIdTools_requirements Requirements
 
 */
-
diff --git a/Reconstruction/MuonIdentification/MuGirlGlobalFit/doc/packagedoc.h b/Reconstruction/MuonIdentification/MuGirlGlobalFit/doc/packagedoc.h
index d86aa45c2c7b1807c5c4c187174104d96459a64b..61501170bc7958113a207e7a96adca8c918e6416 100644
--- a/Reconstruction/MuonIdentification/MuGirlGlobalFit/doc/packagedoc.h
+++ b/Reconstruction/MuonIdentification/MuGirlGlobalFit/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section MuGirlGlobalFit_MuGirlGlobalFitReq Requirements
 
 
 */
diff --git a/Reconstruction/MuonIdentification/MuGirlPerformanceTools/CMakeLists.txt b/Reconstruction/MuonIdentification/MuGirlPerformanceTools/CMakeLists.txt
index b3f411aa0ba06868a88a9ff112fa0be28b3fafe8..3b5fe27847445f8d1e0ff11a6dc18ff1a4d78b73 100644
--- a/Reconstruction/MuonIdentification/MuGirlPerformanceTools/CMakeLists.txt
+++ b/Reconstruction/MuonIdentification/MuGirlPerformanceTools/CMakeLists.txt
@@ -13,7 +13,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Reconstruction/iPat/iPatInterfaces
                           Trigger/TrigEvent/TrigMuonEvent
                           PRIVATE
-                          Generators/GenAnalysisTools/TruthTools
+                          Generators/GenInterfaces
                           Generators/GeneratorObjects
                           Reconstruction/MuonIdentification/MuGirlCandidate
                           Reconstruction/iPat/iPatTrackParameters
diff --git a/Reconstruction/MuonIdentification/MuGirlPerformanceTools/cmt/requirements b/Reconstruction/MuonIdentification/MuGirlPerformanceTools/cmt/requirements
deleted file mode 100644
index deb2d00476254fa108d9ccfd8026a34fa01630ce..0000000000000000000000000000000000000000
--- a/Reconstruction/MuonIdentification/MuGirlPerformanceTools/cmt/requirements
+++ /dev/null
@@ -1,33 +0,0 @@
-package MuGirlPerformanceTools
-
-author Zvi Tarem <Zvi.Tarem@cern.ch>
-
-public
-use  AthenaBaseComps          AthenaBaseComps-*          Control
-use  AtlasPolicy              AtlasPolicy-*
-use  GaudiInterface           GaudiInterface-*           External
-use  TrigMuonEvent            TrigMuonEvent-*            Trigger/TrigEvent
-use  MuGirlInterfaces         MuGirlInterfaces-*         Reconstruction/MuonIdentification
-use  iPatInterfaces           iPatInterfaces-*           Reconstruction/iPat
-private
-use  GeneratorObjects         GeneratorObjects-*         Generators
-use  TrackRecord              TrackRecord-*              Simulation/G4Sim
-use  TruthTools               TruthTools-*               Generators/GenAnalysisTools
-use  iPatTrackParameters      iPatTrackParameters-*      Reconstruction/iPat
-use  iPatTruthTrajectory      iPatTruthTrajectory-*      Reconstruction/iPat
-
-# Force a dependency on HepPDT for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(HepPDT)"
-
-public
-apply_pattern component_library
-library MuGirlPerformanceTools *.cxx components/*.cxx
-
-private
-use  MuGirlCandidate          *                             Reconstruction/MuonIdentification
-
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
diff --git a/Reconstruction/MuonIdentification/MuGirlPerformanceTools/doc/packagedoc.h b/Reconstruction/MuonIdentification/MuGirlPerformanceTools/doc/packagedoc.h
index 3b696a22db4344bd95b9ab613c115df9d3494eeb..69e685287d5f4fd0e9870aa63df07c4722b3b083 100644
--- a/Reconstruction/MuonIdentification/MuGirlPerformanceTools/doc/packagedoc.h
+++ b/Reconstruction/MuonIdentification/MuGirlPerformanceTools/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section MuGirlPerformanceTools_MuGirlPerformanceToolsReq Requirements
 
 
 */
diff --git a/Reconstruction/MuonIdentification/MuGirlPerformanceTools/src/PerformanceTruthTool.cxx b/Reconstruction/MuonIdentification/MuGirlPerformanceTools/src/PerformanceTruthTool.cxx
index cbc8732650fbd87b0ba0059fdecf2c9375b45c45..909d347a0d1be8ec7e7aa2c463f87dae9e58463c 100644
--- a/Reconstruction/MuonIdentification/MuGirlPerformanceTools/src/PerformanceTruthTool.cxx
+++ b/Reconstruction/MuonIdentification/MuGirlPerformanceTools/src/PerformanceTruthTool.cxx
@@ -11,7 +11,7 @@
 #include "TrackRecord/TrackRecordCollection.h"
 #include "MuGirlCandidate/Intersection.h"
 #include "GeneratorObjects/McEventCollection.h"
-#include "TruthTools/ITruthSelector.h"
+#include "GenInterfaces/ITruthSelector.h"
 #include "iPatInterfaces/ITruthParameters.h"
 #include "iPatTrackParameters/PerigeeParameters.h"
 
diff --git a/Reconstruction/MuonIdentification/MuidCaloEnergyTools/doc/packagedoc.h b/Reconstruction/MuonIdentification/MuidCaloEnergyTools/doc/packagedoc.h
index 7edae0d64f3df079201d5ca100fc0907169004db..fa47d6ce90d7b3e493d0b9c26b3ad77a6744b6bf 100644
--- a/Reconstruction/MuonIdentification/MuidCaloEnergyTools/doc/packagedoc.h
+++ b/Reconstruction/MuonIdentification/MuidCaloEnergyTools/doc/packagedoc.h
@@ -19,20 +19,9 @@ The package contains three AlgTools:
 
 - @ref Rec::MuidCaloEnergyParam : Tool providing information on the parametrization of the muon energy loss in the material upstream of the muon spectrometer.
 
- - @ref UsedMuidCaloEnergyTools
- - @ref RequirementsMuidCaloEnergyTools
 
 
  @namespace Rec namespace for combined reconstruction tools and interfaces
  @namespace Trk namespace for general tracking tools and interfaces
 
 */
-
-/**
-@page UsedMuidCaloEnergyTools Used Packages
-*/
-
-/**
-@page RequirementsMuidCaloEnergyTools Requirements
-*/
-
diff --git a/Reconstruction/MuonIdentification/MuidCaloIsolationTools/doc/packagedoc.h b/Reconstruction/MuonIdentification/MuidCaloIsolationTools/doc/packagedoc.h
index 3d6f0838bb2e89ebb3e059284937d6e1771260a7..8a405023623eac6f9d67b81d5b6bc93bfca199ef 100644
--- a/Reconstruction/MuonIdentification/MuidCaloIsolationTools/doc/packagedoc.h
+++ b/Reconstruction/MuonIdentification/MuidCaloIsolationTools/doc/packagedoc.h
@@ -12,18 +12,8 @@ Track isolation is used by the @ref MuidCaloEnergyTool (MuidCaloEnergyTools pack
 @author Alan.Poppleton@cern.ch
 @author Konstantinos.Nikolopoulos@cern.ch
 
- - @ref UsedMuidCaloIsolationTools
- - @ref RequirementsMuidCaloIsolationTools
 
  @namespace Rec namespace for combined reconstruction tools and interfaces
  @namespace Trk namespace for general tracking tools and interfaces
 
 */
-
-/**
-@page UsedMuidCaloIsolationTools Used Packages
-*/
-
-/**
-@page RequirementsMuidCaloIsolationTools Requirements
-*/
diff --git a/Reconstruction/MuonIdentification/MuidCaloScatteringTools/doc/packagedoc.h b/Reconstruction/MuonIdentification/MuidCaloScatteringTools/doc/packagedoc.h
index 9e0e4f339fcc1fc1f74f9a7ca2329fca86e40e1b..8f07342d72b0ea4428f80f7ab8421a874317d4b4 100644
--- a/Reconstruction/MuonIdentification/MuidCaloScatteringTools/doc/packagedoc.h
+++ b/Reconstruction/MuonIdentification/MuidCaloScatteringTools/doc/packagedoc.h
@@ -18,15 +18,4 @@ MuidCaloScattering : Allocates 2 scattering centers onto the track to represent
 
 MuidCaloMaterialParam : Contains a model/parametrization of the calorimeter material. This parametrization represents the Coulomb scattering between the InDet and MuonSpectrometer entrance. The parametrized positions and thicknesses (CaloLayers) are stored as a function of eta assuming any track will 'see' 2 scattering centres, taken from an inner and an outer layer.
 
- - @ref UsedMuidCaloScatteringTools
- - @ref RequirementsMuidCaloScatteringTools
 */
-
-/**
-@page UsedMuidCaloScatteringTools Used Packages
-*/
-
-/**
-@page RequirementsMuidCaloScatteringTools Requirements
-*/
-
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.cxx
index 4fa65fb3914c60d336e324bec626cc41ea0e4c32..f6ceb096bd9c58765ee26a3d97caae158a4bba54 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.cxx
@@ -3,64 +3,46 @@
 */
 
 #include "MuonCombinedAlg.h"
-#include "MuonCombinedToolInterfaces/IMuonCombinedTool.h"
-
-#include "MuonCombinedEvent/InDetCandidateCollection.h"
-#include "MuonCombinedEvent/MuonCandidateCollection.h"
 
 
 MuonCombinedAlg::MuonCombinedAlg(const std::string& name, ISvcLocator* pSvcLocator):
-  AthAlgorithm(name,pSvcLocator),
-  m_muonCombinedTool("MuonCombined::MuonCombinedTool/MuonCombinedTool")
-{  
-  declareProperty("MuonCombinedTool",m_muonCombinedTool);
-  declareProperty("InDetCandidateLocation",m_indetCandidateCollectionName = "InDetCandidates" );
-  declareProperty("MuonCandidateLocation", m_muonCandidateCollectionName = "MuonCandidates" );
-}
-
-MuonCombinedAlg::~MuonCombinedAlg()
-{
+  AthAlgorithm(name,pSvcLocator)
+{}
 
-}
+MuonCombinedAlg::~MuonCombinedAlg(){}
 
 StatusCode MuonCombinedAlg::initialize()
 {
   ATH_CHECK(m_muonCombinedTool.retrieve());
-
+  ATH_CHECK(m_indetCandidateCollectionName.initialize());
+  ATH_CHECK(m_muonCandidateCollectionName.initialize());
   return StatusCode::SUCCESS; 
 }
 
 StatusCode MuonCombinedAlg::execute()
 {
 
-  InDetCandidateCollection* indetCandidateCollection = 0;
-  if(evtStore()->contains<InDetCandidateCollection>(m_indetCandidateCollectionName)) {
-    if(evtStore()->retrieve(indetCandidateCollection,m_indetCandidateCollectionName).isFailure()) {
-      ATH_MSG_FATAL( "Unable to retrieve " << m_indetCandidateCollectionName );
-      return StatusCode::FAILURE;
-    }
+  SG::ReadHandle<InDetCandidateCollection> indetCandidateCollection(m_indetCandidateCollectionName);
+  if(!indetCandidateCollection.isValid()){
+    ATH_MSG_ERROR("Could not read "<< m_indetCandidateCollectionName);
+    return StatusCode::FAILURE;
   }
-  
-  if( !indetCandidateCollection ){
-    ATH_MSG_WARNING("InDetCandidates not found in StoreGate");
+  if(!indetCandidateCollection.isPresent()){
+    ATH_MSG_WARNING(m_indetCandidateCollectionName<<" not present");
     return StatusCode::SUCCESS;
   }
 
-  MuonCandidateCollection* muonCandidateCollection = 0;
-  if(evtStore()->contains<MuonCandidateCollection>(m_muonCandidateCollectionName)) {
-    if(evtStore()->retrieve(muonCandidateCollection,m_muonCandidateCollectionName).isFailure()) {
-      ATH_MSG_FATAL( "Unable to retrieve " << m_muonCandidateCollectionName );
-      return StatusCode::FAILURE;
-    }
+  SG::ReadHandle<MuonCandidateCollection> muonCandidateCollection(m_muonCandidateCollectionName);
+  if(!muonCandidateCollection.isValid()){
+    ATH_MSG_ERROR("Could not read "<< m_muonCandidateCollectionName);
+    return StatusCode::FAILURE;
   }
-  
-  if( !muonCandidateCollection ){
-    ATH_MSG_WARNING("MuonCandidates not found in StoreGate");
+  if(!muonCandidateCollection.isPresent()){
+    ATH_MSG_WARNING(m_muonCandidateCollectionName<<" not present");
     return StatusCode::SUCCESS;
   }
-
-  m_muonCombinedTool->combine(*muonCandidateCollection,*indetCandidateCollection);
   
+  m_muonCombinedTool->combine(*muonCandidateCollection,*indetCandidateCollection);
   return StatusCode::SUCCESS;
 }
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.h
index 8675d72c3f76ad60cce01c409f35985d14cd6481..d1d46cee6bc2f487168e47a0d214678312adb242 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedAlg.h
@@ -7,6 +7,10 @@
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "MuonCombinedEvent/InDetCandidateCollection.h"
+#include "MuonCombinedEvent/MuonCandidateCollection.h"
+#include "MuonCombinedToolInterfaces/IMuonCombinedTool.h"
 #include <string>
 
 namespace MuonCombined {
@@ -25,9 +29,9 @@ class MuonCombinedAlg : public AthAlgorithm
   StatusCode finalize();
 
  private:
-  ToolHandle<MuonCombined::IMuonCombinedTool> m_muonCombinedTool;
-  std::string m_indetCandidateCollectionName;
-  std::string m_muonCandidateCollectionName;
+  ToolHandle<MuonCombined::IMuonCombinedTool> m_muonCombinedTool{this,"MuonCombinedTool","MuonCombined::MuonCombinedTool/MuonCombinedTool","muon combined tool"};
+  SG::ReadHandleKey<InDetCandidateCollection> m_indetCandidateCollectionName{this,"InDetCandidateLocation","InDetCandidates","name of ID candidate collection"};
+  SG::ReadHandleKey<MuonCandidateCollection> m_muonCandidateCollectionName{this,"MuonCandidateLocation","MuonCandidates","name of muon candidate collection"};
 
 };
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.cxx
index 9295aa9cfe71929b1adfdc5b26f0d689bb1c9a40..177bc49a6a47441a20d8992b549010b5bb4931e6 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.cxx
@@ -5,9 +5,6 @@
 #include "MuonCombinedInDetCandidateAlg.h"
 #include "MuonCombinedToolInterfaces/IInDetCandidateTool.h"
 
-#include "xAODTracking/TrackParticleContainer.h"
-#include "MuonCombinedEvent/InDetCandidateCollection.h"
-
 
 MuonCombinedInDetCandidateAlg::MuonCombinedInDetCandidateAlg(const std::string& name, ISvcLocator* pSvcLocator):
   AthAlgorithm(name,pSvcLocator),
@@ -15,16 +12,13 @@ MuonCombinedInDetCandidateAlg::MuonCombinedInDetCandidateAlg(const std::string&
 {  
   declareProperty("InDetCandidateTool",m_indetCandidateTool);
   declareProperty("InDetForwardCandidateTool",m_indetForwardCandidateTool);
-  declareProperty("TrackParticleLocation",m_indetTrackParticleLocation = "InDetTrackParticles");
+  declareProperty("TrackParticleLocation",m_indetTrackParticleLocation = {"InDetTrackParticles"});
   declareProperty("ForwardParticleLocation",m_indetForwardTrackParticleLocation = "InDetForwardTrackParticles");
-  declareProperty("InDetCandidateLocation",m_candidateCollectionName = "InDetCandidates" );
-  declareProperty("DoSiliconAssocForwardMuons",m_doSiliconForwardMuons=false);
+  declareProperty("InDetCandidateLocation", m_candidateCollectionName = "InDetCandidates");
+  declareProperty("DoSiliconAssocForwardMuons",m_doSiliconForwardMuons = false);
 }
 
-MuonCombinedInDetCandidateAlg::~MuonCombinedInDetCandidateAlg()
-{
-
-}
+MuonCombinedInDetCandidateAlg::~MuonCombinedInDetCandidateAlg(){}
 
 StatusCode MuonCombinedInDetCandidateAlg::initialize()
 {
@@ -32,61 +26,46 @@ StatusCode MuonCombinedInDetCandidateAlg::initialize()
   if (m_doSiliconForwardMuons) {
     ATH_CHECK(m_indetForwardCandidateTool.retrieve());
   }
+  ATH_CHECK(m_indetTrackParticleLocation.initialize());
+  ATH_CHECK(m_indetForwardTrackParticleLocation.initialize());
+  ATH_CHECK(m_candidateCollectionName.initialize());
+
   return StatusCode::SUCCESS; 
 }
 
 StatusCode MuonCombinedInDetCandidateAlg::execute()
 {
-
   // retrieve MuonSpectrometer tracks
   std::vector<ToolHandle<MuonCombined::IInDetCandidateTool> > canTool;
-  std::vector<std::string> trackParticleLoc;
 
   canTool.push_back(m_indetCandidateTool);
-  trackParticleLoc.push_back(m_indetTrackParticleLocation);
 
   if (m_doSiliconForwardMuons){
     canTool.push_back(m_indetForwardCandidateTool);
-    trackParticleLoc.push_back(m_indetForwardTrackParticleLocation);
+    m_indetTrackParticleLocation.push_back(m_indetForwardTrackParticleLocation);
   }
 
 
   //output collection
-  InDetCandidateCollection* indetCandidateCollection = NULL ; 
+  auto collection = std::make_unique<InDetCandidateCollection>(SG::OWN_ELEMENTS);
 
   for (unsigned int i(0);i<canTool.size();++i){
 
-    const xAOD::TrackParticleContainer* indetTrackParticles = 0;
-    if(evtStore()->contains<xAOD::TrackParticleContainer>(trackParticleLoc[i])){
-      if(evtStore()->retrieve(indetTrackParticles,trackParticleLoc[i]).isFailure()) {
-        ATH_MSG_FATAL( "Unable to retrieve " << trackParticleLoc[i] );
-        return StatusCode::FAILURE;
-      }
+    SG::ReadHandle<xAOD::TrackParticleContainer> indetTrackParticles(m_indetTrackParticleLocation[i]);
+    if(!indetTrackParticles.isValid()){
+      ATH_MSG_ERROR("Could not read "<< m_indetTrackParticleLocation[i]);
+      return StatusCode::FAILURE;
     }
-
-    if( !indetTrackParticles ){ 
-      continue;
-    }
-
+  
     InDetCandidateCollection* tempCandidates = new InDetCandidateCollection(SG::VIEW_ELEMENTS);
     canTool[i]->create(*indetTrackParticles,*tempCandidates);
 
-    //Copy indetCandidateCollection into output collection
-    if (!indetCandidateCollection) indetCandidateCollection = new InDetCandidateCollection(SG::OWN_ELEMENTS);
-    indetCandidateCollection->insert(indetCandidateCollection->end(), tempCandidates->begin(), tempCandidates->end());
+    collection->insert(collection->end(), tempCandidates->begin(), tempCandidates->end());
 
     delete tempCandidates;
   }
-
-  if(!indetCandidateCollection){
-    ATH_MSG_WARNING("InDetTrackParticles tracks not found in StoreGate");
-    return StatusCode::SUCCESS;
-  }
-
-  if(evtStore()->record(indetCandidateCollection,m_candidateCollectionName).isFailure()) {
-    ATH_MSG_FATAL( "Could not record " << m_candidateCollectionName );
-    return StatusCode::FAILURE;
-  }    
+  SG::WriteHandle<InDetCandidateCollection> indetCandidateCollection(m_candidateCollectionName);
+  ATH_CHECK(indetCandidateCollection.record(std::move(collection)));
 
   return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.h
index 99102be7abb4aa046cdc66e84f5c3487d2d1d2e7..b29f2ff9e1d254a5eb903f98b247e52a43a050f4 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetCandidateAlg.h
@@ -1,3 +1,4 @@
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
@@ -7,6 +8,10 @@
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+#include "xAODTracking/TrackParticleContainer.h"
+#include "MuonCombinedEvent/InDetCandidateCollection.h"
 #include <string>
 
 namespace MuonCombined {
@@ -27,9 +32,12 @@ class MuonCombinedInDetCandidateAlg : public AthAlgorithm
  private:
   ToolHandle<MuonCombined::IInDetCandidateTool> m_indetCandidateTool;
   ToolHandle<MuonCombined::IInDetCandidateTool> m_indetForwardCandidateTool;
-  std::string m_indetTrackParticleLocation;
-  std::string m_indetForwardTrackParticleLocation;
-  std::string m_candidateCollectionName;
+  
+  SG::ReadHandleKeyArray<xAOD::TrackParticleContainer> m_indetTrackParticleLocation;
+  SG::ReadHandleKey<xAOD::TrackParticleContainer>  m_indetForwardTrackParticleLocation;
+  // SG::ReadHandleKey<InDetCandidateCollection> m_indetCandidateCollectionName;
+  SG::WriteHandleKey<InDetCandidateCollection> m_candidateCollectionName;
+
   bool m_doSiliconForwardMuons;
 
 };
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.cxx
index 8f61dce77a5ea06a816d4db4a5ce1da3af662ca7..968290830a8d3ce751f48c194b4e5a29afdf3a54 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.cxx
@@ -4,8 +4,6 @@
 
 #include "MuonCombinedInDetExtensionAlg.h"
 #include "MuonCombinedToolInterfaces/IMuonCombinedInDetExtensionTool.h"
-
-#include "MuonCombinedEvent/InDetCandidateCollection.h"
 #include "MuonCombinedEvent/MuonCandidateCollection.h"
 
 
@@ -16,15 +14,13 @@ MuonCombinedInDetExtensionAlg::MuonCombinedInDetExtensionAlg(const std::string&
   declareProperty("InDetCandidateLocation",m_indetCandidateCollectionName = "InDetCandidates" );
 }
 
-MuonCombinedInDetExtensionAlg::~MuonCombinedInDetExtensionAlg()
-{
-
-}
+MuonCombinedInDetExtensionAlg::~MuonCombinedInDetExtensionAlg(){}
 
 StatusCode MuonCombinedInDetExtensionAlg::initialize()
 {
 
   ATH_CHECK(m_muonCombinedInDetExtensionTools.retrieve());
+  ATH_CHECK(m_indetCandidateCollectionName.initialize());
 
   return StatusCode::SUCCESS; 
 }
@@ -32,17 +28,10 @@ StatusCode MuonCombinedInDetExtensionAlg::initialize()
 StatusCode MuonCombinedInDetExtensionAlg::execute()
 {
 
-  InDetCandidateCollection* indetCandidateCollection = 0;
-  if(evtStore()->contains<InDetCandidateCollection>(m_indetCandidateCollectionName)) {
-    if(evtStore()->retrieve(indetCandidateCollection,m_indetCandidateCollectionName).isFailure()) {
-      ATH_MSG_FATAL( "Unable to retrieve " << m_indetCandidateCollectionName );
-      return StatusCode::FAILURE;
-    }
-  }
-  
-  if( !indetCandidateCollection ){
-    ATH_MSG_WARNING("InDetCandidates not found in StoreGate");
-    return StatusCode::SUCCESS;
+  SG::ReadHandle<InDetCandidateCollection> indetCandidateCollection(m_indetCandidateCollectionName);
+  if(!indetCandidateCollection.isValid()){
+    ATH_MSG_ERROR("Could not read "<< m_indetCandidateCollectionName);
+    return StatusCode::FAILURE;
   }
 
   for(auto& tool : m_muonCombinedInDetExtensionTools)
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
index 353ee5faa4a3a0c0f29fd9b3d201549e917d086d..a9e987f63922d1d2ddf86154c606838dd05f0d1b 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCombinedInDetExtensionAlg.h
@@ -7,6 +7,8 @@
 
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "MuonCombinedEvent/InDetCandidateCollection.h"
 #include <string>
 
 namespace MuonCombined {
@@ -26,8 +28,7 @@ class MuonCombinedInDetExtensionAlg : public AthAlgorithm
 
  private:
   ToolHandleArray<MuonCombined::IMuonCombinedInDetExtensionTool> m_muonCombinedInDetExtensionTools;
-  std::string m_indetCandidateCollectionName;
-
+  SG::ReadHandleKey<InDetCandidateCollection> m_indetCandidateCollectionName;
 };
 
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx
index 604a6f4979f1f45b844ef2a5299e9f9e855efb63..56b4fc96b240bfc569d3a28dcfb0f7112ae91e96 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.cxx
@@ -5,7 +5,6 @@
 #include "MuonCreatorAlg.h"
 #include "MuonCombinedToolInterfaces/IMuonCreatorTool.h"
 
-#include "MuonCombinedEvent/InDetCandidateCollection.h"
 #include "MuonCombinedEvent/MuonCandidateCollection.h"
 #include "xAODMuon/MuonContainer.h"
 #include "xAODMuon/MuonAuxContainer.h"
@@ -36,14 +35,12 @@ MuonCreatorAlg::MuonCreatorAlg(const std::string& name, ISvcLocator* pSvcLocator
   declareProperty("ClusterContainerName",m_clusterContainerName="MuonClusterCollection");
 }
 
-MuonCreatorAlg::~MuonCreatorAlg()
-{
-
-}
+MuonCreatorAlg::~MuonCreatorAlg(){}
 
 StatusCode MuonCreatorAlg::initialize()
 {
   ATH_CHECK(m_muonCreatorTool.retrieve());
+  ATH_CHECK(m_indetCandidateCollectionName.initialize());
 
   return StatusCode::SUCCESS; 
 }
@@ -51,14 +48,12 @@ StatusCode MuonCreatorAlg::initialize()
 StatusCode MuonCreatorAlg::execute()
 {
 
-  InDetCandidateCollection* indetCandidateCollection = 0;
-  if(evtStore()->contains<InDetCandidateCollection>(m_indetCandidateCollectionName)) {
-    if(evtStore()->retrieve(indetCandidateCollection,m_indetCandidateCollectionName).isFailure()) {
-      ATH_MSG_FATAL( "Unable to retrieve " << m_indetCandidateCollectionName );
-      return StatusCode::FAILURE;
-    }
+  SG::ReadHandle<InDetCandidateCollection> indetCandidateCollection(m_indetCandidateCollectionName);
+  if(!indetCandidateCollection.isValid()){
+    ATH_MSG_ERROR("Could not read "<< m_indetCandidateCollectionName);
+    return StatusCode::FAILURE;
   }
-  
+
   MuonCandidateCollection* muonCandidateCollection = 0;
   if(evtStore()->contains<MuonCandidateCollection>(m_muonCandidateCollectionName)) {
     if(evtStore()->retrieve(muonCandidateCollection,m_muonCandidateCollectionName).isFailure()) {
@@ -106,10 +101,11 @@ StatusCode MuonCreatorAlg::execute()
   if( m_clusterContainerName != "" ) ATH_CHECK(retrieveOrCreateAndRecord(output.clusterContainer));
   
   // build muons
-  if(!muonCandidateCollection || !indetCandidateCollection){
+  if(!muonCandidateCollection){
     ATH_MSG_WARNING("candidate collection missing, skip muon creation");
   }
-  else m_muonCreatorTool->create(muonCandidateCollection,indetCandidateCollection,output);
+
+  else m_muonCreatorTool->create(muonCandidateCollection, indetCandidateCollection.cptr() ,output);
 
   return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h
index 86768206a601e3bc52a4133540d4635ea9909782..585ae9aac0b5488396812e2e089f116fe8b0c79e 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonCreatorAlg.h
@@ -8,6 +8,8 @@
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
 #include <string>
+#include "StoreGate/ReadHandleKey.h"
+#include "MuonCombinedEvent/InDetCandidateCollection.h"
 
 #include "xAODMuon/MuonContainer.h"
 #include "xAODMuon/SlowMuonContainer.h"
@@ -41,7 +43,7 @@ class MuonCreatorAlg : public AthAlgorithm
   std::string m_combinedCollectionName;
   std::string m_extrapolatedCollectionName;
   std::string m_msOnlyExtrapolatedCollectionName;
-  std::string m_indetCandidateCollectionName;
+  SG::ReadHandleKey<InDetCandidateCollection> m_indetCandidateCollectionName;
   std::string m_muonCandidateCollectionName;
   std::string m_segContainerName;
   std::string m_clusterContainerName;
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonSegmentTagAlg.cxx b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonSegmentTagAlg.cxx
index f38634178ef70ee0a6d2f938bfd938c1983e3ab3..58937145610770ee8e95d45c063cd549ac2901a2 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonSegmentTagAlg.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonSegmentTagAlg.cxx
@@ -4,8 +4,6 @@
 
 #include "MuonSegmentTagAlg.h"
 #include "MuonCombinedToolInterfaces/IMuonSegmentTagTool.h"
-
-#include "MuonCombinedEvent/InDetCandidateCollection.h"
 #include "xAODMuon/MuonSegmentContainer.h"
 
 MuonSegmentTagAlg::MuonSegmentTagAlg(const std::string& name, ISvcLocator* pSvcLocator):
@@ -13,51 +11,42 @@ MuonSegmentTagAlg::MuonSegmentTagAlg(const std::string& name, ISvcLocator* pSvcL
   m_muonSegmentTagTool("MuonCombined::MuonSegmentTagTool/MuonSegmentTagTool")
 {  
   declareProperty("MuonSegmentTagTool",m_muonSegmentTagTool);
-  declareProperty("InDetCandidateLocation",m_indetCandidateCollectionName = "InDetCandidates" );
-  declareProperty("MuonSegmentLocation", m_muonSegmenteCollectionName = "MuonSegments" );
 }
 
-MuonSegmentTagAlg::~MuonSegmentTagAlg()
-{
-
-}
+MuonSegmentTagAlg::~MuonSegmentTagAlg(){}
 
 StatusCode MuonSegmentTagAlg::initialize()
 {
   
   ATH_CHECK(m_muonSegmentTagTool.retrieve());
-
+  ATH_CHECK(m_indetCandidateCollectionName.initialize());
+  ATH_CHECK(m_muonSegmentCollectionName.initialize());
+  
   return StatusCode::SUCCESS; 
 }
 
 StatusCode MuonSegmentTagAlg::execute()
 {
 
-  InDetCandidateCollection* indetCandidateCollection = 0;
-  if(evtStore()->contains<InDetCandidateCollection>(m_indetCandidateCollectionName)) {
-    if(evtStore()->retrieve(indetCandidateCollection,m_indetCandidateCollectionName).isFailure()) {
-      ATH_MSG_FATAL( "Unable to retrieve " << m_indetCandidateCollectionName );
-      return StatusCode::FAILURE;
-    }
+  SG::ReadHandle<InDetCandidateCollection> indetCandidateCollection(m_indetCandidateCollectionName);
+  if(!indetCandidateCollection.isValid()){
+    ATH_MSG_ERROR("Could not read "<< m_indetCandidateCollectionName);
+    return StatusCode::FAILURE;
   }
-  
-  if( !indetCandidateCollection ){
-    ATH_MSG_WARNING("InDetCandidates not found in StoreGate");
+  if(!indetCandidateCollection.isPresent()){
+    ATH_MSG_WARNING(m_indetCandidateCollectionName<<" not found in StoreGate");
     return StatusCode::SUCCESS;
   }
 
-  const xAOD::MuonSegmentContainer* segments = 0;
-  if(evtStore()->contains<xAOD::MuonSegmentContainer>(m_muonSegmenteCollectionName)) {
-    if(evtStore()->retrieve(segments,m_muonSegmenteCollectionName).isFailure()) {
-      ATH_MSG_FATAL( "Unable to retrieve " << m_muonSegmenteCollectionName );
-      return StatusCode::FAILURE;
-    }
-  }
-  
-  if( !segments ){
-    ATH_MSG_WARNING("MuonSegments not found in StoreGate");
+  SG::ReadHandle<xAOD::MuonSegmentContainer>segments(m_muonSegmentCollectionName);
+  if(!segments.isPresent()){
+    ATH_MSG_WARNING(m_muonSegmentCollectionName<<" not found in StoreGate");
     return StatusCode::SUCCESS;
   }
+  if(!segments.isValid()){
+    ATH_MSG_FATAL( "Unable to retrieve " << m_muonSegmentCollectionName );
+    return StatusCode::FAILURE;
+  }
 
   m_muonSegmentTagTool->tag(*indetCandidateCollection,*segments);
   
diff --git a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonSegmentTagAlg.h b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonSegmentTagAlg.h
index 947452540add6b214b697e0de6754449dd485d59..7f50b54433c179fd9f4cae02ffb5dec837429fa1 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonSegmentTagAlg.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedAlgs/src/MuonSegmentTagAlg.h
@@ -6,8 +6,11 @@
 #define MUONCOMBINEDALGS_MUONSEGMENTAGALG_H
 
 #include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteDecorHandleKey.h"
+#include "xAODMuon/MuonSegmentContainer.h"
+#include "MuonCombinedEvent/InDetCandidateCollection.h"
 #include "GaudiKernel/ToolHandle.h"
-#include <string>
 
 namespace MuonCombined {
   class IMuonSegmentTagTool;
@@ -26,8 +29,8 @@ class MuonSegmentTagAlg : public AthAlgorithm
 
  private:
   ToolHandle<MuonCombined::IMuonSegmentTagTool> m_muonSegmentTagTool;
-  std::string m_indetCandidateCollectionName;
-  std::string m_muonSegmenteCollectionName;
+  Gaudi::Property<SG::ReadHandleKey<InDetCandidateCollection> > m_indetCandidateCollectionName{this,"InDetCandidateLocation","InDetCandidates","name of ID candidate collection"};
+  Gaudi::Property<SG::ReadHandleKey<xAOD::MuonSegmentContainer> >m_muonSegmentCollectionName{this,"MuonSegmentLocation","MuonSegments","name of muon segment container"};
 };
 
 
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/InDetCandidateTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/InDetCandidateTool.cxx
index a10092e98a7811171d20fcce65be9b2c3be26a1b..c749810cc164c606e47b45eb0dd4cbe7bf48116d 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/InDetCandidateTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/InDetCandidateTool.cxx
@@ -65,7 +65,7 @@ namespace MuonCombined {
         if( !m_trackSelector->decision(*tp) ) {
           if( msgLvl(MSG::VERBOSE) &&  tp->pt() > 5000. )
             ATH_MSG_DEBUG(" Discarding InDet TrackParticle: pt " << tp->pt() << " eta " << tp->eta() << " phi " << tp->phi() 
-              << " Pixel " << getCount(*tp,xAOD::numberOfBLayerHits ) + getCount(*tp,xAOD::numberOfPixelHits )
+              << " Pixel " << getCount(*tp,xAOD::numberOfInnermostPixelLayerHits ) + getCount(*tp,xAOD::numberOfPixelHits )
               << " SCT "  << getCount(*tp,xAOD::numberOfSCTHits ) << " TRT " << getCount(*tp, xAOD::numberOfTRTHits ) );
           continue;
         }
@@ -82,7 +82,7 @@ namespace MuonCombined {
         link.toPersistent();
  
         ATH_MSG_DEBUG(" Creating InDetCandidate: pt " << tp->pt() << " eta " << tp->eta() << " phi " << tp->phi() 
-          << " Pixel " << getCount(*tp,xAOD::numberOfBLayerHits ) + getCount(*tp,xAOD::numberOfPixelHits )
+          << " Pixel " << getCount(*tp,xAOD::numberOfInnermostPixelLayerHits ) + getCount(*tp,xAOD::numberOfPixelHits )
           << " SCT "  << getCount(*tp,xAOD::numberOfSCTHits ) << " TRT " << getCount(*tp, xAOD::numberOfTRTHits ) );
         if( msgLvl(MSG::VERBOSE) && tp->isAvailable<ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink") ){
           ElementLink< xAOD::TruthParticleContainer > truthLink = tp->auxdata<ElementLink< xAOD::TruthParticleContainer > >("truthParticleLink");
diff --git a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
index 6631a011df667160b80b2fbdae05d89a45e8335b..e73f8113748704d28f7e0807773f586c7c775480 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedBaseTools/src/MuonCreatorTool.cxx
@@ -1046,6 +1046,9 @@ namespace MuonCombined {
 	      muon.setTrackParticleLink(xAOD::Muon::MSOnlyExtrapolatedMuonSpectrometerTrackParticle, link );
 	    }
 	    else ATH_MSG_WARNING("failed to create MS-only extrapolated track particle");
+	  } else {
+	    //original extrapolatedTrack is not needed anymore:
+	    delete extrapolatedTrack;
 	  }
 	  //now add refitted track as ME track
 	  ElementLink<xAOD::TrackParticleContainer> link = createTrackParticleElementLink( std::unique_ptr<const Trk::Track>(updatedExtrapolatedTrack),
diff --git a/Reconstruction/MuonIdentification/MuonCombinedEvaluationTools/src/MuonPrintingTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedEvaluationTools/src/MuonPrintingTool.cxx
index abf14ea23be0510b7b1cf1d75109ab7a1cb9b56f..799531af2f9b9896c729f64f58423a978efd99cc 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedEvaluationTools/src/MuonPrintingTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedEvaluationTools/src/MuonPrintingTool.cxx
@@ -230,17 +230,17 @@ std::string Rec::MuonPrintingTool::print( const xAOD::Muon& muon ) const {
 	sout << " No Track link";
 	ATH_MSG_DEBUG("ID track particle without Trk::Track");
       }else{
-	// uint8_t numberOfBLayerHits=0;
+	// uint8_t numberOfInnermostPixelLayerHits=0;
 	// uint8_t numberOfPixelHits=0;
 	// uint8_t numberOfSCTHits=0;
 	// uint8_t numberOfTRTHits=0;
 	
-	// if( !muon.summaryValue(numberOfBLayerHits,xAOD::numberOfBLayerHits) ) numberOfBLayerHits = 0;
+	// if( !muon.summaryValue(numberOfInnermostPixelLayerHits,xAOD::numberOfInnermostPixelLayerHits) ) numberOfInnermostPixelLayerHits = 0;
 	// if( !muon.summaryValue(numberOfPixelHits,xAOD::numberOfPixelHits) ) numberOfPixelHits = 0;
 	// if( !muon.summaryValue(numberOfSCTHits,xAOD::numberOfSCTHits) ) numberOfSCTHits = 0;
 	// if( !muon.summaryValue(numberOfTRTHits,xAOD::numberOfTRTHits) ) numberOfTRTHits = 0;
 	
-	// sout << " Hits in B Layer " << static_cast<int>(numberOfBLayerHits)
+	// sout << " Hits in B Layer " << static_cast<int>(numberOfInnermostPixelLayerHits)
 	//      << "   Pixels " << static_cast<int>(numberOfPixelHits)
 	//      << "   SCT " << static_cast<int>(numberOfSCTHits)
 	//      << "   TRT " << static_cast<int>(numberOfTRTHits);
diff --git a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
index 7a0c02678479ae77b9d1899351471cbd3c657952..ab07bcd56801eff624c80be9bdb2649309f6d8ca 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
+++ b/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedAlgs.py
@@ -42,8 +42,9 @@ def MuGirlStauAlg(name="MuGirlStauAlg",**kwargs):
     return CfgMgr.MuonCombinedInDetExtensionAlg(name,**kwargs)
 
 def MuonCombinedInDetCandidateAlg( name="MuonCombinedInDetCandidateAlg",**kwargs ):
+    from InDetRecExample.InDetJobProperties import InDetFlags
     kwargs.setdefault("InDetCandidateTool",getPublicTool("InDetCandidateTool") )
-    if muonCombinedRecFlags.doSiAssocForwardMuons():
+    if muonCombinedRecFlags.doSiAssocForwardMuons() and InDetFlags.doForwardTracks():
         kwargs.setdefault("DoSiliconAssocForwardMuons", True )
         kwargs.setdefault("InDetForwardCandidateTool", getPublicTool("MuonInDetForwardCandidateTool") )
     return CfgMgr.MuonCombinedInDetCandidateAlg(name,**kwargs)
diff --git a/Reconstruction/MuonIdentification/MuonCombinedTimingTools/doc/packagedoc.h b/Reconstruction/MuonIdentification/MuonCombinedTimingTools/doc/packagedoc.h
index 3e75e6ba34239e2d46c76f799656df6b093bcd48..64d700df1b0dd91c747e3649cd08de062fd3397e 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedTimingTools/doc/packagedoc.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedTimingTools/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section MuonCombinedTimingTools_MuonCombinedTimingToolsReq Requirements
 
 
 */
diff --git a/Reconstruction/MuonIdentification/MuonCombinedToolInterfaces/MuonCombinedToolInterfaces/IMuonCreatorTool.h b/Reconstruction/MuonIdentification/MuonCombinedToolInterfaces/MuonCombinedToolInterfaces/IMuonCreatorTool.h
index 33271e74df222a3a57051f7a6a06ae58f54feaf6..504846ecc14a2877ca3421bab44569d76375ba3e 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedToolInterfaces/MuonCombinedToolInterfaces/IMuonCreatorTool.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedToolInterfaces/MuonCombinedToolInterfaces/IMuonCreatorTool.h
@@ -80,8 +80,9 @@ namespace MuonCombined {
 
 
     /**IMuonCreatorTool interface: build muons from ID and MS candidates */    
+
     virtual void create( const MuonCandidateCollection* muonCandidates, const InDetCandidateCollection* inDetCandidates,
-			 OutputData& outputData ) const = 0;
+    			 OutputData& outputData ) const = 0;
 
     /** create a muon from a muon candidate */
     virtual xAOD::Muon* create( const MuonCandidate& candidate, OutputData& outputData ) const = 0;
diff --git a/Reconstruction/MuonIdentification/MuonCombinedToolInterfaces/doc/packagedoc.h b/Reconstruction/MuonIdentification/MuonCombinedToolInterfaces/doc/packagedoc.h
index e25ceeb477b01f2481288719f84fe57ed7b86871..4b3235ad393beded9c0210223e2d7998bf0bab42 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedToolInterfaces/doc/packagedoc.h
+++ b/Reconstruction/MuonIdentification/MuonCombinedToolInterfaces/doc/packagedoc.h
@@ -36,16 +36,4 @@ This package is not built as any library, it is a simple include package.
 
 @section MuonCombinedToolInterfaces_ExtrasMuCombToolInterfaces Extra Pages
 
- - @ref UsedMuCombToolInterfaces
- - @ref requirementsMuCombToolInterfaces
 */
-
-/**
-@page UsedMuCombToolInterfaces Used Packages
-*/
-
-/**
-@page requirementsMuCombToolInterfaces Requirements
-*/
-
-
diff --git a/Reconstruction/MuonIdentification/MuonCombinedValidation/MuonRecConfigTests/test/MuonRecConfigTests_TestConfiguration.xml b/Reconstruction/MuonIdentification/MuonCombinedValidation/MuonRecConfigTests/test/MuonRecConfigTests_TestConfiguration.xml
index 05dd4b63a3746c64fb25eed08ed0debcec428728..73406ada171eb9fb13f5cabe71e7fa62775ee2a6 100755
--- a/Reconstruction/MuonIdentification/MuonCombinedValidation/MuonRecConfigTests/test/MuonRecConfigTests_TestConfiguration.xml
+++ b/Reconstruction/MuonIdentification/MuonCombinedValidation/MuonRecConfigTests/test/MuonRecConfigTests_TestConfiguration.xml
@@ -4,7 +4,7 @@
 <unifiedTestConfiguration>
 <atn>
   <TEST name="ATN_BS_default" type="script" suite="MuonConfigBSTrfATN">
-    <options_atn>ATHENA_PYCINTEX_MINVMEM=180 Reco_trf.py --ignoreerrors=True maxEvents=5 AMITag=q122 autoConfiguration=everything --athenaopts=--stdcmalloc postInclude=MuonRecConfigTests/MuonRecConfigTests_postinclude.py  inputBSFile=/afs/cern.ch/atlas/project/pmb/data/data11_7TeV.00189822.physics_Muons.merge.RAW._lb0120._SFO-11._0001.1_500evts outputESDFile=myESD.pool.root preExec=muonRecFlags.doTrackPerformance=True,,rec.doDetailedAuditor=True</options_atn>
+    <options_atn>ATHENA_PYCINTEX_MINVMEM=180 Reco_tf.py --ignoreErrors=True --maxEvents=5 --AMI q122 --autoConfiguration=everything --athenaopts=--stdcmalloc --postInclude=MuonRecConfigTests/MuonRecConfigTests_postinclude.py  --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/data12_8TeV.00209109.physics_JetTauEtmiss.merge.RAW._lb0186._SFO-1._0001.1 --outputESDFile=myESD.pool.root --preExec 'muonRecFlags.doTrackPerformance=True' 'rec.doDetailedAuditor=True'</options_atn>
     <timelimit>20</timelimit>
     <author> Rikard Sandstrom </author>
     <mailto> rikard.sandstrom@cern.ch,liebig@mail.cern.ch </mailto>
diff --git a/Reconstruction/MuonIdentification/muonEvent/doc/packagedoc.h b/Reconstruction/MuonIdentification/muonEvent/doc/packagedoc.h
index 9a67340f7e8fbee5789220b6acb75c42ae77a44c..2317bd5eb9f2447c8301c8bfc22bbc390a080d0e 100644
--- a/Reconstruction/MuonIdentification/muonEvent/doc/packagedoc.h
+++ b/Reconstruction/MuonIdentification/muonEvent/doc/packagedoc.h
@@ -46,15 +46,4 @@
 
 @section muonEvent_ExtrasMuonEvent CMT and Dependency Description
 
- - @ref UsedMuonEvent
- - @ref RequirementsMuonEvent
 */
-
-/**
-@page UsedMuonEvent Used Packages
-*/
-
-/**
-@page RequirementsMuonEvent Requirements
-*/
-
diff --git a/Reconstruction/MuonIdentification/muonEvent/muonEvent/Muon.h b/Reconstruction/MuonIdentification/muonEvent/muonEvent/Muon.h
index b1bc555b09432ea8b13b738d0bae40a6d0f82030..6a5fafe63d81d5f53306b8f727451d9a4f39a03a 100644
--- a/Reconstruction/MuonIdentification/muonEvent/muonEvent/Muon.h
+++ b/Reconstruction/MuonIdentification/muonEvent/muonEvent/Muon.h
@@ -368,7 +368,7 @@ class Muon : public ParticleImpl<
   const CaloCluster* cluster() const { return ((this->hasCluster()) ? *m_cluster : 0); }
 
   /** Get Inner detector Hits information from ID trackparticle */
-  int numberOfBLayerHits() const;
+  int numberOfInnermostPixelLayerHits() const;
   /** Get number of Pixel hits from ID trackparticle */
   int numberOfPixelHits() const;
   /** Get number of Silicon SCT hits from ID trackparticle */
@@ -378,7 +378,7 @@ class Muon : public ParticleImpl<
   /** Get number of TRT High Threshold hits from ID trackparticle */
   int numberOfTRTHighThresholdHits() const;
   /** Get number of shared hits or holes from ID trackparticle */
-  int numberOfBLayerSharedHits() const;
+  int numberOfInnermostPixelLayerSharedHits() const;
   /** Get number of Pixel shared hits from ID trackparticle */
   int numberOfPixelSharedHits() const;
   /** Get number of Pixel holes from ID trackparticle */
diff --git a/Reconstruction/MuonIdentification/muonEvent/src/Muon.cxx b/Reconstruction/MuonIdentification/muonEvent/src/Muon.cxx
index c4173fec7a86b0b021dcd116157b84fa2e85add9..4ca0ec622e9db05712b9f8b2e2f4532a1034dfba 100644
--- a/Reconstruction/MuonIdentification/muonEvent/src/Muon.cxx
+++ b/Reconstruction/MuonIdentification/muonEvent/src/Muon.cxx
@@ -547,9 +547,9 @@ std::pair<double,double> Muon::energyLoss() const{
 }
 
 /** number of B-layer hits */
-int Muon::numberOfBLayerHits() const {   
+int Muon::numberOfInnermostPixelLayerHits() const {
   if ( this->hasCombinedMuonTrackParticle() || this->hasInDetTrackParticle() )
-    return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfBLayerHits );
+    return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfInnermostPixelLayerHits );
   else return -1;
   
 }
@@ -587,9 +587,9 @@ int Muon::numberOfTRTHighThresholdHits() const {
 }
 
 /** number of shared hits at pixel b-layer */
-int Muon::numberOfBLayerSharedHits() const {   
+int Muon::numberOfInnermostPixelLayerSharedHits() const {
   if ( this->hasCombinedMuonTrackParticle() || this->hasInDetTrackParticle() )
-      return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfBLayerSharedHits );
+      return (*m_inDetTrackParticle)->trackSummary()->get( Trk::numberOfInnermostPixelLayerSharedHits );
   else return -1;
 }
 int Muon::numberOfPixelSharedHits() const {   
diff --git a/Reconstruction/PanTau/PanTauAlgs/doc/packagedoc.h b/Reconstruction/PanTau/PanTauAlgs/doc/packagedoc.h
index 4990a98c67c9bec1d2ce1cfc1f4d1f7aac470a7b..6dd2fea6d2e9df2b7e4fc21df74b9892ab6a0fcd 100644
--- a/Reconstruction/PanTau/PanTauAlgs/doc/packagedoc.h
+++ b/Reconstruction/PanTau/PanTauAlgs/doc/packagedoc.h
@@ -29,14 +29,4 @@ This package contains algorithms for PanTau.
 
 @section PanTauAlgs_ExtrasPanTauA Extra Pages
 
-      - @ref UsedPanTauAlgs
-      - @ref requirementsPanTauAlgs
 */
-
-/**
- * @page UsedPanTauAlgs Used Packages
- * */
-
-/**
- * @page requirementsPanTauAlgs Requirements
- * */
diff --git a/Reconstruction/PanTau/PanTauEvent/doc/packagedoc.h b/Reconstruction/PanTau/PanTauEvent/doc/packagedoc.h
index 02c77e79c6cb9bb16bd28a405316ea885bb8de8e..84f527b4c80eda91049b2598bbd1d89cb2a26c84 100644
--- a/Reconstruction/PanTau/PanTauEvent/doc/packagedoc.h
+++ b/Reconstruction/PanTau/PanTauEvent/doc/packagedoc.h
@@ -25,14 +25,4 @@
  *
 @section PanTauEvent_@section ExtrasPanTauEvent Extra Pages
  *
- *      - @ref UsedPanTauEvent
- *      - @ref requirementsPanTauEvent
- *       */
-
-/**
- * @page UsedPanTauEvent Used Packages
- * */
-
-/**
- * @page requirementsPanTauEvent Requirements
- * */
+ **/
diff --git a/Reconstruction/PanTau/PanTauExample/doc/packagedoc.h b/Reconstruction/PanTau/PanTauExample/doc/packagedoc.h
index 46c01e26c2a87990167a050241ce1e4fbe795a29..8333656aad91ad4ffca5352df8e4e663ee9a55c8 100644
--- a/Reconstruction/PanTau/PanTauExample/doc/packagedoc.h
+++ b/Reconstruction/PanTau/PanTauExample/doc/packagedoc.h
@@ -14,7 +14,6 @@ This package contains job option fragments for PanTau.
 
 Job option fragments for PanTau.
 
-@section PanTauExample_PanTauExampleReq Requirements
 
 
 */
diff --git a/Reconstruction/PanTau/PanTauInterfaces/doc/packagedoc.h b/Reconstruction/PanTau/PanTauInterfaces/doc/packagedoc.h
index 49e0081bac843b52b035ef6aefd667db9541c1b0..3863171fdd77149e8604ea65c2df87b75e0c3faf 100644
--- a/Reconstruction/PanTau/PanTauInterfaces/doc/packagedoc.h
+++ b/Reconstruction/PanTau/PanTauInterfaces/doc/packagedoc.h
@@ -19,14 +19,4 @@
  *
 @section PanTauInterfaces_@section ExtrasPanTauInterfaces Extra Pages
  *
- *      - @ref UsedPanTauInterfaces
- *      - @ref requirementsPanTauInterfaces
- *       */
-
-/**
- * @page UsedPanTauInterfaces Used Packages
- * */
-
-/**
- * @page requirementsPanTauInterfaces Requirements
- * */
+ **/
diff --git a/Reconstruction/PanTau/PanTauUtils/doc/packagedoc.h b/Reconstruction/PanTau/PanTauUtils/doc/packagedoc.h
index f2192fd13aa1a6111a16666a0cd80e7cf5250ffb..112b4d793f372c419a44a98291ae56865b97578c 100644
--- a/Reconstruction/PanTau/PanTauUtils/doc/packagedoc.h
+++ b/Reconstruction/PanTau/PanTauUtils/doc/packagedoc.h
@@ -19,14 +19,4 @@
  *
 @section PanTauUtils_@section ExtrasPanTauUtils Extra Pages
  *
- *      - @ref UsedPanTauUtils
- *      - @ref requirementsPanTauUtils
- *       */
-
-/**
- * @page UsedPanTauUtils Used Packages
- * */
-
-/**
- * @page requirementsPanTauUtils Requirements
- * */
+ **/
diff --git a/Reconstruction/Particle/doc/packagedoc.h b/Reconstruction/Particle/doc/packagedoc.h
index 9d9eab85bed1fa624fdd8118b852efffe33ffd67..431999e1fffc4e8bbdcb48130e11c0682dd26833 100644
--- a/Reconstruction/Particle/doc/packagedoc.h
+++ b/Reconstruction/Particle/doc/packagedoc.h
@@ -52,15 +52,5 @@ Particle contains the following files/classes:
  - TrackParticleContainer.cxx ... container to store TrackParticle(s) in StoreGate.
 
 @section Particle_ExtraPages Extra Pages
- - @ref UsedParticle
- - @ref RequirementsParticle
 
 */
-
-/**
-@page UsedParticle Used Packages
-*/
-
-/**
-@page RequirementsParticle Requirements
-*/
diff --git a/Reconstruction/ParticleTruth/doc/packagedoc.h b/Reconstruction/ParticleTruth/doc/packagedoc.h
index fb2f36f821d3c07c60bd2f7d2fccbaa3c7520a48..d779ae8f4154e22a9ea8022e02c8e4eb136280df 100644
--- a/Reconstruction/ParticleTruth/doc/packagedoc.h
+++ b/Reconstruction/ParticleTruth/doc/packagedoc.h
@@ -18,9 +18,7 @@ ParticleTruth contains the following files/classes:
 - TrackParticleTruthCollectionContainer ... container of the TrackParticleTruthCollection used in the trigger navigation.
 - TrackParticleTruthVector.cxx ... an object necessary for custom converters (ignore it).
 
-@section ParticleTruth_used_packagesParticleTruth used packages
 
-@section ParticleTruth_requirements Requirements
 
 @namespace Rec Namespace of the ParticleTruth package.
 */
diff --git a/Reconstruction/RecExample/RecExAlgs/doc/packagedoc.h b/Reconstruction/RecExample/RecExAlgs/doc/packagedoc.h
index bfb87a476a73246e1449b6d9b962acc01b92c842..5854b78a7341820cf89985cf5cf9049ab7cc65ec 100644
--- a/Reconstruction/RecExample/RecExAlgs/doc/packagedoc.h
+++ b/Reconstruction/RecExample/RecExAlgs/doc/packagedoc.h
@@ -13,7 +13,6 @@
 
 >> Please enter a brief description of the package here.
 
-@section RecExAlgs_RecExAlgsReq Requirements
 
 
 */
diff --git a/Reconstruction/RecExample/RecExAlgs/share/anotherdummyfile.py b/Reconstruction/RecExample/RecExAlgs/share/anotherdummyfile.py
deleted file mode 100644
index 194a2e1a71c930050ff92f94d10d4eb0049a0e55..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/share/anotherdummyfile.py
+++ /dev/null
@@ -1 +0,0 @@
-another dummy file
diff --git a/Reconstruction/RecExample/RecExAlgs/share/dummy.py b/Reconstruction/RecExample/RecExAlgs/share/dummy.py
deleted file mode 100644
index bd7bde4e20e07d201b591419d67529f8d1b783f1..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/share/dummy.py
+++ /dev/null
@@ -1 +0,0 @@
-dummy file please ignore
diff --git a/Reconstruction/RecExample/RecExAlgs/share/xotherdummy.py b/Reconstruction/RecExample/RecExAlgs/share/xotherdummy.py
deleted file mode 100644
index df53ca5bb3520c00da7fe9de8da8ae85f21c12af..0000000000000000000000000000000000000000
--- a/Reconstruction/RecExample/RecExAlgs/share/xotherdummy.py
+++ /dev/null
@@ -1 +0,0 @@
-xother dummy file
diff --git a/Reconstruction/RecExample/RecExCommon/share/SystemRec_config.py b/Reconstruction/RecExample/RecExCommon/share/SystemRec_config.py
index c31aa3d2f30659ed9807f09bb1c5a0139fb54feb..caf3069a1369ac1230d5ec5ee905f897861f73aa 100755
--- a/Reconstruction/RecExample/RecExCommon/share/SystemRec_config.py
+++ b/Reconstruction/RecExample/RecExCommon/share/SystemRec_config.py
@@ -13,46 +13,17 @@ import PerfMonComps.DomainsRegistry as pdr
 from AODFix.AODFix import *
 AODFix_Init()
 
+#First do Calo-Reco
+pdr.flag_domain('calo')
+protectedInclude ("CaloRec/CaloRec_jobOptions.py")
+AODFix_postCaloRec()
 
-runningFatrasID=False #True woudl imply that ID reco runs before Calo Reco
-
-try:
-    from FastSimulationConfig.FastSimulationFlags import jobproperties
-    if jobproperties.FastSimulation.doFatrasID():
-        runningFatrasID=True
-except:
-    mlog.warning("Could not access 'jobproperties.FastSimulation.doFatrasID'. Assume regular reco job")
-    pass
-
-
-if runningFatrasID:
-    #First do ID/Fatras reco:
-    pdr.flag_domain('id')
-    if DetFlags.detdescr.ID_on():
-        try:
-            include("FatrasExample/Fatras_jobOptions.py")
-        except Exception:
-            treatException("Problem with Fatras_jobOptions. Switched off.")
-
-    #Then run Calo-Reco
-    pdr.flag_domain('calo')
-    protectedInclude ("CaloRec/CaloRec_jobOptions.py")
-    
-else: #Regular case, dont' run Fatras
-    #First do Calo-Reco
-    pdr.flag_domain('calo')
-    protectedInclude ("CaloRec/CaloRec_jobOptions.py")
-    AODFix_postCaloRec()
-
-    #then run ID reco:
-
-    pdr.flag_domain('id')
-    if DetFlags.detdescr.ID_on():
-        protectedInclude( "InDetRecExample/InDetRec_jobOptions.py" )
-        AODFix_postInDetRec()
-
-del runningFatrasID #Not needed any more
+#then run ID reco:
 
+pdr.flag_domain('id')
+if DetFlags.detdescr.ID_on():
+    protectedInclude( "InDetRecExample/InDetRec_jobOptions.py" )
+    AODFix_postInDetRec()
 
 # functionality : FTK reconstruction
 if DetFlags.detdescr.FTK_on() :
diff --git a/Reconstruction/RecExample/RecExPers/share/RecoOutputMetadataList_jobOptions.py b/Reconstruction/RecExample/RecExPers/share/RecoOutputMetadataList_jobOptions.py
index ca2b3a9dfabd585669bb1789e605020b2934a426..d45cc321ba9152e6944390504927d1d92adeb731 100644
--- a/Reconstruction/RecExample/RecExPers/share/RecoOutputMetadataList_jobOptions.py
+++ b/Reconstruction/RecExample/RecExPers/share/RecoOutputMetadataList_jobOptions.py
@@ -14,7 +14,9 @@ recoMetadataItemList = CfgItemList("RecoMetadata",
 	                                     "xAOD::LumiBlockRangeAuxContainer#*",
                                              "xAOD::CutBookkeeperContainer#*",
                                              "xAOD::CutBookkeeperAuxContainer#*",
-                                             "ByteStreamMetadataContainer#*"], 
+                                             "ByteStreamMetadataContainer#*",
+                                             "xAOD::TruthMetaDataContainer#TruthMetaData",
+                                             "xAOD::TruthMetaDataAuxContainer#TruthMetaDataAux."], 
                                     allowWildCard = True )
 
 # AOD extra
diff --git a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD.py b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD.py
index 0c932a38c8a442dd63ca461e0e5b48ea35c784a9..bc1e5a49330bb4261bf111686c440fa11434ebb1 100644
--- a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD.py
+++ b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD.py
@@ -94,7 +94,6 @@ if hasattr(runArgs,"outputNTUP_TRKVALIDFile"):
     from InDetRecExample.InDetJobProperties import InDetFlags
     InDetFlags.doTrkNtuple.set_Value_and_Lock( True )
     InDetFlags.doPixelTrkNtuple.set_Value_and_Lock( True )
-    InDetFlags.doPixelClusterNtuple.set_Value_and_Lock( True )
 
     from InDetRecExample.InDetKeys import InDetKeys
     InDetKeys.trkValidationNtupleName.set_Value_and_Lock( runArgs.outputNTUP_TRKVALIDFile )
diff --git a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py
index 3393d10110e88da129b54ed9664f943700f62613..18c83eff3ada885f6ea85921a5a377832f3c2260 100644
--- a/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py
+++ b/Reconstruction/RecJobTransforms/share/skeleton.RAWtoESD_tf.py
@@ -139,7 +139,6 @@ if hasattr(runArgs,"outputNTUP_TRKVALIDFile"):
     from InDetRecExample.InDetJobProperties import InDetFlags
     InDetFlags.doTrkNtuple.set_Value_and_Lock( True )
     InDetFlags.doPixelTrkNtuple.set_Value_and_Lock( True )
-    InDetFlags.doPixelClusterNtuple.set_Value_and_Lock( True )
 
     from InDetRecExample.InDetKeys import InDetKeys
     InDetKeys.trkValidationNtupleName.set_Value_and_Lock( runArgs.outputNTUP_TRKVALIDFile )
diff --git a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py
index 4ea998107f78ef5ab5e617e8cc9431f118383c64..c3e52bee61cde7c13c99fbdacbc47ea16cd785a0 100644
--- a/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py
+++ b/Reconstruction/RecoAlgs/IsolationAlgs/python/IsoGetter.py
@@ -10,6 +10,7 @@ from egammaRec.Factories import ToolFactory, AlgFactory, getPropertyValue
 #---------------------------------------
 # egamma specifics          
 from egammaCaloTools.egammaCaloToolsFactories import CaloFillRectangularCluster
+from MuonRecExample.MuonRecFlags import muonRecFlags
 
 from AthenaCommon.GlobalFlags import globalflags
 isMC = not globalflags.DataSource()=='data'
@@ -226,6 +227,7 @@ if doPFlow:
   IsoCorEg.append([ isoPar.coreCone, isoPar.pileupCorrection ])
   IsoCorMu.append([ isoPar.coreCone, isoPar.pileupCorrection ])
 
+
 from IsolationAlgs.IsolationAlgsConf import IsolationBuilder
 isoBuilder = AlgFactory(IsolationBuilder,
                         name                  = "IsolationBuilder",
@@ -237,7 +239,7 @@ isoBuilder = AlgFactory(IsolationBuilder,
                         FeCorTypes            = IsoCorFe,
 			EgIsoTypes            = [[]] if not rec.doEgamma() else IsoTypes,
                         EgCorTypes            = IsoCorEg,
-			MuIsoTypes            = [[]] if not rec.doMuon() else IsoTypes,
+			MuIsoTypes            = IsoTypes if rec.doMuon() and muonRecFlags.doMuonIso() else [[]],
                         MuCorTypes            = IsoCorMu,
                         LeakageTool           = None,
                         OutputLevel           = 3)
diff --git a/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.cxx b/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.cxx
index b667191ab895d201a5799d3b56fd3855ef0be14f..1579f8888c48370ff9f10e75ec9f9ad22da17c5b 100644
--- a/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.cxx
+++ b/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.cxx
@@ -42,7 +42,11 @@
 IsolationBuilder::IsolationBuilder( const std::string& name, 
 			  ISvcLocator* pSvcLocator ) : 
   ::AthAlgorithm( name, pSvcLocator ),
-  m_cellColl (nullptr)
+  m_cellIsolationTool("", this),
+  m_cellColl (nullptr),
+  m_topoIsolationTool("", this),
+  m_pflowIsolationTool("", this),
+  m_trackIsolationTool("", this)
 {
   //
   // Property declaration
@@ -270,6 +274,9 @@ StatusCode IsolationBuilder::initialize()
     ATH_CHECK(m_leakTool.retrieve());
   }
 
+  //initialise data handles
+  ATH_CHECK(m_MuonContainerName.initialize());
+
   return StatusCode::SUCCESS;
 }
 
@@ -320,41 +327,40 @@ StatusCode IsolationBuilder::execute()
     }
   }
 
-  // If AODFix, first deep copy
-  if (m_isAODFix) {
-    if (m_ElectronContainerName.size()) {
-      if (!evtStore()->tryRetrieve<xAOD::ElectronContainer>(m_ElectronContainerName)) {
-	if( deepCopy<xAOD::ElectronContainer,xAOD::ElectronAuxContainer>(m_ElectronContainerName).isFailure()) {
-	  ATH_MSG_FATAL( "Couldn't deep copy electrons" );
-	  return StatusCode::FAILURE;
-	}
-      }
-    }
-    if (m_FwdElectronContainerName.size()) {
-      if (!evtStore()->tryRetrieve<xAOD::ElectronContainer>(m_FwdElectronContainerName)) {
-	if( deepCopy<xAOD::ElectronContainer,xAOD::ElectronAuxContainer>(m_FwdElectronContainerName).isFailure()) {
-	  ATH_MSG_FATAL( "Couldn't deep copy forward electrons" );
-	  return StatusCode::FAILURE;
-	}
-      }
-    }
-    if (m_PhotonContainerName.size()) {
-      if (!evtStore()->tryRetrieve<xAOD::PhotonContainer>(m_PhotonContainerName)) {
-	if( deepCopy<xAOD::PhotonContainer,xAOD::PhotonAuxContainer>(m_PhotonContainerName).isFailure()) {
-	  ATH_MSG_FATAL( "Couldn't deep copy photons" );
-	  return StatusCode::FAILURE;
-	}
-      }
-    }
-    if (m_MuonContainerName.size()) {
-      if (!evtStore()->tryRetrieve<xAOD::MuonContainer>(m_MuonContainerName)) {
-	if( deepCopy<xAOD::MuonContainer,xAOD::MuonAuxContainer>(m_MuonContainerName).isFailure()) {
-	  ATH_MSG_FATAL( "Couldn't deep copy muons" );
-	  return StatusCode::FAILURE;
-	}
-      }
-    }
-  }
+  // // If AODFix, first deep copy  -- (JM: no longer necessary)
+  // if (m_isAODFix) {
+  //   if (m_ElectronContainerName.size()) {
+  //     if (!evtStore()->tryRetrieve<xAOD::ElectronContainer>(m_ElectronContainerName)) {
+  // 	if( deepCopy<xAOD::ElectronContainer,xAOD::ElectronAuxContainer>(m_ElectronContainerName).isFailure()) {
+  // 	  ATH_MSG_FATAL( "Couldn't deep copy electrons" );
+  // 	  return StatusCode::FAILURE;
+  // 	}
+  //     }
+  //   }
+  //   if (m_FwdElectronContainerName.size()) {
+  //     if (!evtStore()->tryRetrieve<xAOD::ElectronContainer>(m_FwdElectronContainerName)) {
+  // 	if( deepCopy<xAOD::ElectronContainer,xAOD::ElectronAuxContainer>(m_FwdElectronContainerName).isFailure()) {
+  // 	  ATH_MSG_FATAL( "Couldn't deep copy forward electrons" );
+  // 	  return StatusCode::FAILURE;
+  // 	}
+  //     }
+  //   }
+  //   if (m_PhotonContainerName.size()) {
+  //     if (!evtStore()->tryRetrieve<xAOD::PhotonContainer>(m_PhotonContainerName)) {
+  // 	if( deepCopy<xAOD::PhotonContainer,xAOD::PhotonAuxContainer>(m_PhotonContainerName).isFailure()) {
+  // 	  ATH_MSG_FATAL( "Couldn't deep copy photons" );
+  // 	  return StatusCode::FAILURE;
+  // 	}
+  //     }
+  //   }
+  //   SG::ReadHandle <xAOD::MuonContainer>h_muon(m_MuonContainerName);
+  //   if (h_muon.isValid()) {
+  //     if( deepCopy<xAOD::MuonContainer,xAOD::MuonAuxContainer>(m_MuonContainerName.key()).isFailure()) {
+  // 	ATH_MSG_FATAL( "Couldn't deep copy muons" );
+  // 	return StatusCode::FAILURE;
+  //     }
+  //   }
+  // }
 
   // Compute isolations
   /*
@@ -402,7 +408,7 @@ StatusCode IsolationBuilder::execute()
     else
       CHECK(DecorateEgamma("fwdelectron"));
   }
-  if ( (m_muCaloIso.size() != 0 || m_muTrackIso.size() != 0) && m_MuonContainerName.size()) {
+  if ( (m_muCaloIso.size() != 0 || m_muTrackIso.size() != 0) ) {
     if (m_customConfigMu == "")
       CHECK(IsolateMuon());
     else
@@ -418,7 +424,7 @@ StatusCode IsolationBuilder::execute()
 
 StatusCode IsolationBuilder::IsolateEgamma(std::string egType) {
 
-  xAOD::EgammaContainer *egC(0);
+  const xAOD::EgammaContainer *egC(0);
   if (egType == "electron") {
     if (evtStore()->contains<xAOD::ElectronContainer>(m_ElectronContainerName)) {
       if (evtStore()->retrieve(egC,m_ElectronContainerName).isFailure()) {
@@ -453,9 +459,9 @@ StatusCode IsolationBuilder::IsolateEgamma(std::string egType) {
     ATH_MSG_WARNING("Unknown egamma type " << egType);
     return StatusCode::SUCCESS;
   }
-  xAOD::EgammaContainer::iterator it = egC->begin(), itE = egC->end();
+  auto it = egC->begin(), itE = egC->end();
   for (; it != itE; it++) {
-    xAOD::Egamma *eg = *it; 
+    auto eg = *it; 
     //
     ATH_MSG_DEBUG(egType << " pt,eta,phi = " << eg->pt()/1e3 << " " << eg->eta() << " " << eg->phi());
     // 
@@ -536,20 +542,15 @@ StatusCode IsolationBuilder::IsolateEgamma(std::string egType) {
 } 
 StatusCode IsolationBuilder::IsolateMuon() {
 
-  xAOD::MuonContainer *muonC(0);
-  if (evtStore()->contains<xAOD::MuonContainer>(m_MuonContainerName)) {
-    if (evtStore()->retrieve(muonC,m_MuonContainerName).isFailure()) {
-      ATH_MSG_FATAL("Cannot retrieve muons container " << m_MuonContainerName);
-      return StatusCode::FAILURE;
-    }
-  } else {
-    ATH_MSG_DEBUG("MuonContainer " << m_MuonContainerName << " not available");
-    return StatusCode::SUCCESS;
+  SG::ReadHandle<xAOD::MuonContainer> muonC(m_MuonContainerName);      
+  if (!muonC.isValid()) {
+    ATH_MSG_FATAL("Cannot retrieve muons container " << m_MuonContainerName.key());
+    return StatusCode::FAILURE;
   }
 
-  xAOD::MuonContainer::iterator it = muonC->begin(), itE = muonC->end();
+  auto it = muonC->begin(), itE = muonC->end();
   for (; it != itE; it++) {
-    xAOD::Muon *mu = *it;
+    auto mu = *it;
 
     ATH_MSG_DEBUG("Muon pt,eta,phi = " << mu->pt()/1e3 << " " << mu->eta() << " " << mu->phi());
     // 
@@ -708,20 +709,15 @@ StatusCode IsolationBuilder::DecorateEgamma(std::string egType) {
 } 
 StatusCode IsolationBuilder::DecorateMuon() {
 
-  xAOD::MuonContainer *muonC(0);
-  if (evtStore()->contains<xAOD::MuonContainer>(m_MuonContainerName)) {
-    if (evtStore()->retrieve(muonC,m_MuonContainerName).isFailure()) {
-      ATH_MSG_FATAL("Cannot retrieve muons container " << m_MuonContainerName);
-      return StatusCode::FAILURE;
-    }
-  } else {
-    ATH_MSG_DEBUG("MuonContainer " << m_MuonContainerName << " not available");
-    return StatusCode::SUCCESS;
+  SG::ReadHandle<xAOD::MuonContainer> muonC(m_MuonContainerName);
+  if (!muonC.isValid()) {
+    ATH_MSG_FATAL("Cannot retrieve muons container " << m_MuonContainerName.key());
+    return StatusCode::FAILURE;
   }
 
-  xAOD::MuonContainer::iterator it = muonC->begin(), itE = muonC->end();
+  auto it = muonC->begin(), itE = muonC->end();
   for (; it != itE; it++) {
-    xAOD::Muon *mu = *it;
+    auto mu = *it;
     //
     ATH_MSG_DEBUG("Muon pt,eta,phi = " << mu->pt()/1e3 << " " << mu->eta() << " " << mu->phi());
     // 
diff --git a/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.h b/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.h
index 7c603578c54cc388361e0ee89c4dc67c982391b9..b06ab1102d2c20b06bdff17abc58e02955a4a7f0 100644
--- a/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.h
+++ b/Reconstruction/RecoAlgs/IsolationAlgs/src/IsolationBuilder.h
@@ -23,6 +23,7 @@
 #include "RecoToolInterfaces/IsolationCommon.h"
 
 #include "IsolationCorrections/IIsolationCorrectionTool.h"
+#include "xAODMuon/MuonContainer.h"
 
 namespace xAOD {
   class INeutralEFlowIsolationTool;
@@ -74,7 +75,7 @@ class IsolationBuilder
   std::string m_ElectronContainerName;
   std::string m_FwdElectronContainerName;
   std::string m_PhotonContainerName;
-  std::string m_MuonContainerName;
+  SG::ReadHandleKey<xAOD::MuonContainer> m_MuonContainerName;
 
   /** @brief Tool for cell isolation calculation */
   ToolHandle<xAOD::ICaloCellIsolationTool> m_cellIsolationTool;
diff --git a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleCellAssociationAlg.cxx b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleCellAssociationAlg.cxx
index 5ee61e53c157dc3cb243908c89c5fb34fb7afedb..9188c82a5b389323589dbee70b9d2efe47da1deb 100644
--- a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleCellAssociationAlg.cxx
+++ b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleCellAssociationAlg.cxx
@@ -24,6 +24,7 @@ TrackParticleCellAssociationAlg::TrackParticleCellAssociationAlg(const std::stri
   declareProperty("ParticleCaloCellAssociationTool",m_caloCellAssociationTool);
   declareProperty("TrackParticleContainerName",m_trackParticleCollectionName = "InDetTrackParticles" );
   declareProperty("PtCut", m_ptCut = 25000. );
+  declareProperty("OutputCollectionPostFix", m_outputPostFix = "" );
 }
 
 TrackParticleCellAssociationAlg::~TrackParticleCellAssociationAlg()
@@ -34,7 +35,7 @@ TrackParticleCellAssociationAlg::~TrackParticleCellAssociationAlg()
 StatusCode TrackParticleCellAssociationAlg::initialize()
 {
   ATH_CHECK(m_caloCellAssociationTool.retrieve());
-  ATH_CHECK(m_trackSelector.retrieve());
+  // ATH_CHECK(m_trackSelector.retrieve());
 
   return StatusCode::SUCCESS; 
 }
@@ -43,7 +44,7 @@ StatusCode TrackParticleCellAssociationAlg::execute()
 {
 
   // get track particles
-  xAOD::TrackParticleContainer* trackParticles = 0;
+  const xAOD::TrackParticleContainer* trackParticles = 0;
   if(evtStore()->contains<xAOD::TrackParticleContainer>(m_trackParticleCollectionName)) {
     if(evtStore()->retrieve(trackParticles,m_trackParticleCollectionName).isFailure()) {
       ATH_MSG_FATAL( "Unable to retrieve " << m_trackParticleCollectionName );
@@ -55,8 +56,8 @@ StatusCode TrackParticleCellAssociationAlg::execute()
   }
 
   // create strings for locations based on input track collection
-  std::string clusterContainerName = m_trackParticleCollectionName + "AssociatedClusters";
-  std::string associationContainerName = m_trackParticleCollectionName + "ClusterAssociations";
+  std::string clusterContainerName = m_trackParticleCollectionName + "AssociatedClusters" + m_outputPostFix;
+  std::string associationContainerName = m_trackParticleCollectionName + "ClusterAssociations" + m_outputPostFix;
 
   // Create the xAOD container and its auxiliary store:
   xAOD::CaloClusterContainer* xaod = CaloClusterStoreHelper::makeContainer(&(*evtStore()),clusterContainerName,msg());
@@ -80,7 +81,8 @@ StatusCode TrackParticleCellAssociationAlg::execute()
 
     // slect track
     const xAOD::TrackParticle* tp = (*trackParticles)[i];
-    if( !m_trackSelector->decision(*tp) || tp->pt() < m_ptCut ) continue;
+    // if( !m_trackSelector->decision(*tp) || tp->pt() < m_ptCut ) continue;
+    if( tp->pt() < m_ptCut ) continue;
 
     // get ParticleCellAssociation
     ATH_MSG_DEBUG(" Selected track: pt " << tp->pt() << " eta " << tp->eta() << " phi " << tp->phi() );
diff --git a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleCellAssociationAlg.h b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleCellAssociationAlg.h
index 561ff463c22e5d478a9957bca6db3297b77dea63..72086596bfb3fbcfd4c1d92f05060a7b4dae68f1 100644
--- a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleCellAssociationAlg.h
+++ b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleCellAssociationAlg.h
@@ -35,6 +35,7 @@ class TrackParticleCellAssociationAlg : public AthAlgorithm
 
   std::string m_trackParticleCollectionName;
   double m_ptCut;
+  std::string m_outputPostFix;
 };
 
 
diff --git a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleClusterAssociationAlg.cxx b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleClusterAssociationAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..7209bced179d1aeaf1e49549bb86f7219a630243
--- /dev/null
+++ b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleClusterAssociationAlg.cxx
@@ -0,0 +1,135 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TrackParticleClusterAssociationAlg.h"
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+#include "xAODCaloEvent/CaloClusterAuxContainer.h"
+#include "xAODCaloEvent/CaloCluster.h"
+#include "xAODAssociations/TrackParticleClusterAssociation.h"
+#include "xAODAssociations/TrackParticleClusterAssociationContainer.h"
+#include "xAODAssociations/TrackParticleClusterAssociationAuxContainer.h"
+
+#include "TrkToolInterfaces/ITrackSelectorTool.h"
+#include "RecoToolInterfaces/IParticleCaloClusterAssociationTool.h"
+#include "TrackToCalo/CrossedCaloCellHelper.h"
+#include "CaloUtils/CaloClusterStoreHelper.h"
+
+TrackParticleClusterAssociationAlg::TrackParticleClusterAssociationAlg(const std::string& name, ISvcLocator* pSvcLocator):
+  AthAlgorithm(name,pSvcLocator),
+  m_caloClusterAssociationTool("Rec::ParticleCaloClusterAssociationTool/ParticleCaloClusterAssociationTool"),
+  m_trackSelector("InDet::InDetDetailedTrackSelectorTool/MuonCombinedInDetDetailedTrackSelectorTool") {  
+
+  declareProperty("ParticleCaloClusterAssociationTool"  ,   m_caloClusterAssociationTool);
+  declareProperty("TrackParticleContainerName"          ,   m_trackParticleCollectionName = "InDetTrackParticles" );
+  declareProperty("PtCut"                               ,   m_ptCut                       = 25000. );
+  declareProperty("OutputCollectionPostFix"             ,   m_outputPostFix               = "" );
+  declareProperty("CaloClusterLocation"                 ,   m_caloClusters                = "CaloCalTopoClusters"   );
+}
+
+TrackParticleClusterAssociationAlg::~TrackParticleClusterAssociationAlg()
+{
+
+}
+
+StatusCode TrackParticleClusterAssociationAlg::initialize()
+{
+  ATH_CHECK(m_caloClusterAssociationTool.retrieve());
+  // ATH_CHECK(m_trackSelector.retrieve());
+
+  return StatusCode::SUCCESS; 
+}
+
+StatusCode TrackParticleClusterAssociationAlg::execute()
+{
+
+  // get track particles
+  const xAOD::TrackParticleContainer* trackParticles = 0;
+  if(evtStore()->contains<xAOD::TrackParticleContainer>(m_trackParticleCollectionName)) {
+    if(evtStore()->retrieve(trackParticles,m_trackParticleCollectionName).isFailure()) {
+      ATH_MSG_FATAL( "Unable to retrieve " << m_trackParticleCollectionName );
+      return StatusCode::FAILURE;
+    }
+  }else{
+    // in case nothing is found return
+    return StatusCode::SUCCESS;
+  }
+
+  // create strings for locations based on input track collection
+  // std::string clusterContainerName = m_trackParticleCollectionName + "AssociatedClusters" + m_outputPostFix;
+  std::string associationContainerName = m_trackParticleCollectionName + "ClusterAssociations" + m_outputPostFix;
+
+  // Create the xAOD container and its auxiliary store:
+  xAOD::TrackParticleClusterAssociationContainer* xaoda = new xAOD::TrackParticleClusterAssociationContainer();
+  ATH_CHECK( evtStore()->record( xaoda, associationContainerName ) );
+
+  xAOD::TrackParticleClusterAssociationAuxContainer* auxa = new xAOD::TrackParticleClusterAssociationAuxContainer();
+  ATH_CHECK( evtStore()->record( auxa, associationContainerName + "Aux." ) );
+  xaoda->setStore( auxa );
+  ATH_MSG_DEBUG( "Recorded TrackParticleClusterAssociationContainer with key: " << associationContainerName );    
+
+  unsigned int ntracks = 0;
+  for( unsigned int i=0;i<trackParticles->size();++i ){
+
+    // slect track
+    const xAOD::TrackParticle* tp = (*trackParticles)[i];
+    // if( !m_trackSelector->decision(*tp) || tp->pt() < m_ptCut ) continue;
+    if( tp->pt() < m_ptCut ) continue;
+
+    // get ParticleCellAssociation
+    ATH_MSG_DEBUG(" Selected track: pt " << tp->pt() << " eta " << tp->eta() << " phi " << tp->phi() );
+    const Rec::ParticleClusterAssociation* association = 0;
+    if( !m_caloClusterAssociationTool->particleClusterAssociation(*tp,association,0.1) ){
+      ATH_MSG_DEBUG("failed to obtain the ParticleClusterAssociation");
+      continue;
+    }
+
+    // require container as it should be there
+    if( !association->container() ){
+      ATH_MSG_WARNING("Failed to obtain CaloClusterContainer from ParticleCellAssociation");
+      continue;
+    }
+    
+    // create element links
+    ElementLink< xAOD::TrackParticleContainer > trackLink(m_trackParticleCollectionName,i);
+    std::vector< ElementLink< xAOD::CaloClusterContainer > > caloClusterLinks;
+    
+    for(auto cluster : association->data())
+    {
+        ElementLink< xAOD::CaloClusterContainer >   clusterLink(m_caloClusters,cluster->index());
+        // if valid create TrackParticleClusterAssociation
+        if( clusterLink.isValid() ){
+            caloClusterLinks.push_back( clusterLink );
+        }
+        ATH_MSG_DEBUG(" New cluster: eta " << cluster->eta() << " phi " << cluster->phi() );
+    }
+    
+    if( trackLink.isValid() && caloClusterLinks.size()!=0){
+        xAOD::TrackParticleClusterAssociation* trackAssociation = new xAOD::TrackParticleClusterAssociation();
+        xaoda->push_back(trackAssociation);
+        trackAssociation->setTrackParticleLink( trackLink );
+        trackAssociation->setCaloClusterLinks(caloClusterLinks);
+        ATH_MSG_DEBUG("added association");
+        ++ntracks;
+    }
+    else{
+        if( !trackLink.isValid() )   ATH_MSG_WARNING("Failed to create track ElementLink ");
+        if( caloClusterLinks.size()==0 ) ATH_MSG_VERBOSE("Failed to create cluster ElementLink - this is probably a trackonly TCC ");
+    }
+   
+  }
+
+  ATH_MSG_DEBUG(" Total number of selected tracks: " << ntracks );
+
+  // if (CaloClusterStoreHelper::finalizeClusters(&(*evtStore()), xaod,clusterContainerName,msg()).isFailure() ) 
+    // ATH_MSG_WARNING("finalizeClusters failed");
+
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrackParticleClusterAssociationAlg::finalize()
+{
+  return StatusCode::SUCCESS;
+}
diff --git a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleClusterAssociationAlg.h b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleClusterAssociationAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..c1fe43b908c269a44a9f86d701d28b6be53dfe4a
--- /dev/null
+++ b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/TrackParticleClusterAssociationAlg.h
@@ -0,0 +1,43 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRACKPARTICLEASSOCIATIONALGS_TRACKPARTICLECLUSTERASSOCIATIONALG_H
+#define TRACKPARTICLEASSOCIATIONALGS_TRACKPARTICLECLUSTERASSOCIATIONALG_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/ToolHandle.h"
+#include <string>
+
+
+namespace Rec {
+  class IParticleCaloClusterAssociationTool;
+}
+namespace Trk {
+  class ITrackSelectorTool;
+}
+
+class TrackParticleClusterAssociationAlg : public AthAlgorithm
+{
+ public:
+  TrackParticleClusterAssociationAlg(const std::string& name, ISvcLocator* pSvcLocator);
+
+  ~TrackParticleClusterAssociationAlg();
+
+  StatusCode initialize();
+  StatusCode execute();
+  StatusCode finalize();
+
+ private:
+
+  ToolHandle<Rec::IParticleCaloClusterAssociationTool> m_caloClusterAssociationTool;
+  ToolHandle <Trk::ITrackSelectorTool>              m_trackSelector; //!< Tool to select tracks
+
+  std::string m_trackParticleCollectionName;
+  double m_ptCut;
+  std::string m_outputPostFix;
+  std::string m_caloClusters;
+};
+
+
+#endif
diff --git a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/components/TrackParticleAssociationAlgs_entries.cxx b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/components/TrackParticleAssociationAlgs_entries.cxx
index 2a76f4a0517495fda536591ef836a8fdd9eecbc7..f05cca5a0bbf53361634c159e57161e371fbef2b 100644
--- a/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/components/TrackParticleAssociationAlgs_entries.cxx
+++ b/Reconstruction/RecoAlgs/TrackParticleAssociationAlgs/src/components/TrackParticleAssociationAlgs_entries.cxx
@@ -1,9 +1,12 @@
 #include "GaudiKernel/DeclareFactoryEntries.h"
 #include "../TrackParticleCellAssociationAlg.h"
+#include "../TrackParticleClusterAssociationAlg.h"
 
 DECLARE_ALGORITHM_FACTORY( TrackParticleCellAssociationAlg )
+DECLARE_ALGORITHM_FACTORY( TrackParticleClusterAssociationAlg )
 
 DECLARE_FACTORY_ENTRIES( TrackParticleAssociationAlgs )
 {
   DECLARE_ALGORITHM( TrackParticleCellAssociationAlg )
+  DECLARE_ALGORITHM( TrackParticleClusterAssociationAlg )
 }
diff --git a/Reconstruction/RecoEvent/ParticleCaloExtension/ParticleCaloExtension/ParticleClusterAssociation.h b/Reconstruction/RecoEvent/ParticleCaloExtension/ParticleCaloExtension/ParticleClusterAssociation.h
index 5b2750f96401a8e007da9e79e18c3b5b1aba5a89..067341ee92c46fd1756d3568a57ab5234a704a9b 100644
--- a/Reconstruction/RecoEvent/ParticleCaloExtension/ParticleCaloExtension/ParticleClusterAssociation.h
+++ b/Reconstruction/RecoEvent/ParticleCaloExtension/ParticleCaloExtension/ParticleClusterAssociation.h
@@ -16,7 +16,7 @@ namespace Trk {
 namespace Rec {
   
   /** class storing calorimeter cell association with IParticle objects */
-  class ParticleClusterAssociation  : public ParticleCaloAssociation< ElementLink<xAOD::CaloClusterContainer> > {
+  class ParticleClusterAssociation  : public ParticleCaloAssociation< const xAOD::CaloCluster* > {
   public:
     /** constructor taking CaloExtension, a vector of cells and a cone size as arguments */
     ParticleClusterAssociation( const Trk::CaloExtension& caloExtension, Data&& clusters, float coneSize, const xAOD::CaloClusterContainer* container = 0);
diff --git a/Reconstruction/RecoEvent/ParticleCaloExtension/src/ParticleClusterAssociation.cxx b/Reconstruction/RecoEvent/ParticleCaloExtension/src/ParticleClusterAssociation.cxx
index 850803e408cb8217b3f101fb29900a26ad046c47..415ddc4f731fcacfdf795ea7acae8e8a748454fd 100644
--- a/Reconstruction/RecoEvent/ParticleCaloExtension/src/ParticleClusterAssociation.cxx
+++ b/Reconstruction/RecoEvent/ParticleCaloExtension/src/ParticleClusterAssociation.cxx
@@ -9,7 +9,7 @@ namespace Rec {
 
   ParticleClusterAssociation::ParticleClusterAssociation( const Trk::CaloExtension& caloExtension, Data&& clusters, 
                                                           float coneSize, const xAOD::CaloClusterContainer* container ) :
-    ParticleCaloAssociation< ElementLink<xAOD::CaloClusterContainer> >(caloExtension,std::move(clusters),coneSize),
+    ParticleCaloAssociation< const xAOD::CaloCluster* >(caloExtension,std::move(clusters),coneSize),
     m_container(container) {
   }
 
diff --git a/Reconstruction/RecoTools/CaloRingerTools/doc/packagedoc.h b/Reconstruction/RecoTools/CaloRingerTools/doc/packagedoc.h
index 03249543b9d76ddc8ee24d4fe2eeec5af72084e5..1a07dacd339331ee815a1671fdfbf8d6de74e2ff 100644
--- a/Reconstruction/RecoTools/CaloRingerTools/doc/packagedoc.h
+++ b/Reconstruction/RecoTools/CaloRingerTools/doc/packagedoc.h
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
-
+/**
 @page CaloRingerTools_page The Calorimeter Ringer Tools
 
  - This package contains the Tools used by Reconstruction/RecoAlgs/CaloRingerAlgs to retrieve
@@ -11,9 +11,4 @@
 
  - For questions or comments: Werner S. Freund <wsfreund@cern.ch>
 
-@section CaloRingerTools_used_packagesTkPara Used Packages
-
-@section CaloRingerTools_requirements Requirements
-
 */
-
diff --git a/Reconstruction/RecoTools/IEnergyDepositionTool/doc/packagedoc.h b/Reconstruction/RecoTools/IEnergyDepositionTool/doc/packagedoc.h
index df4a7395e4f0da15c3b059fbd6301061d514b3f7..7a71cd5dc40cb8428ec34f54afdac17ef2767227 100644
--- a/Reconstruction/RecoTools/IEnergyDepositionTool/doc/packagedoc.h
+++ b/Reconstruction/RecoTools/IEnergyDepositionTool/doc/packagedoc.h
@@ -24,14 +24,4 @@ This package contains a single interface IAlgTool:
 
 @section IEnergyDepositionTool_ExtrasIEnergyDepositionTool Extra Pages
 
- - @ref UsedIEnergyDepositionTool
- - @ref RequirementsIEnergyDepositionTool
-*/
-
-/**
-@page UsedIEnergyDepositionTool Used Packages
-*/
-
-/**
-@page RequirementsIEnergyDepositionTool Requirements
 */
diff --git a/Reconstruction/RecoTools/IsolationTool/IsolationTool/CaloIsolationTool.h b/Reconstruction/RecoTools/IsolationTool/IsolationTool/CaloIsolationTool.h
index 5ad649dda0c445591d6f32a58c402b27a84411b5..3471c9a673ad93dcaf1130728d59e128be44547f 100644
--- a/Reconstruction/RecoTools/IsolationTool/IsolationTool/CaloIsolationTool.h
+++ b/Reconstruction/RecoTools/IsolationTool/IsolationTool/CaloIsolationTool.h
@@ -87,26 +87,26 @@ namespace xAOD {
 
 #ifndef XAOD_ANALYSIS
       virtual
-      bool decorateParticle( IParticle& tp,
+      bool decorateParticle( const IParticle& tp,
                              const std::vector<Iso::IsolationType>& cones,
                              CaloCorrection corrections,
                              const CaloCellContainer* Cells = 0,
                              const CaloClusterContainer* TopClusters = 0) override final; 
 #endif
       virtual
-      bool decorateParticle_caloCellIso( IParticle& tp,
+      bool decorateParticle_caloCellIso( const IParticle& tp,
                              const std::vector<Iso::IsolationType>& cones,
                              CaloCorrection corrections,
                              const CaloCellContainer* Cells) override final;
 
       virtual
-      bool decorateParticle_topoClusterIso( IParticle& tp,
+      bool decorateParticle_topoClusterIso( const IParticle& tp,
                              const std::vector<Iso::IsolationType>& cones,
                              CaloCorrection corrections,
                              const CaloClusterContainer* TopClusters) override final;
 
       virtual
-      bool decorateParticle_eflowIso( IParticle& tp,
+      bool decorateParticle_eflowIso( const IParticle& tp,
                              const std::vector<Iso::IsolationType>& cones,
                              CaloCorrection corrections) override final;
 
@@ -157,7 +157,7 @@ namespace xAOD {
 
       // final dressing function
       bool decorateParticle(CaloIsolation& result,
-                            IParticle& tp,
+                            const IParticle& tp,
                             const std::vector<Iso::IsolationType>& cones,
                             CaloCorrection corrections);
       // etcone computation for TrackParticle
diff --git a/Reconstruction/RecoTools/IsolationTool/IsolationTool/TrackIsolationTool.h b/Reconstruction/RecoTools/IsolationTool/IsolationTool/TrackIsolationTool.h
index 44ed4d8e35b91826e96f4af81cc9c36dab30a10b..89771feed95c13c1c2813e717b2fbbcf0b643e5e 100644
--- a/Reconstruction/RecoTools/IsolationTool/IsolationTool/TrackIsolationTool.h
+++ b/Reconstruction/RecoTools/IsolationTool/IsolationTool/TrackIsolationTool.h
@@ -81,7 +81,7 @@ namespace xAOD {
 
       /**ITrackIsolationTool interface: */    
       virtual
-      bool decorateParticle( IParticle& tp, 
+      bool decorateParticle( const IParticle& tp, 
                              const std::vector<Iso::IsolationType>& cones, 
                              TrackCorrection corrections, 
                              const Vertex* vertex = 0, 
diff --git a/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx b/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
index 7d9843ea0b5e897c944a0ae6d89e670bdf6d5ecb..669c3287824ece4960b9a8850deba03b67de1b2d 100644
--- a/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
+++ b/Reconstruction/RecoTools/IsolationTool/Root/CaloIsolationTool.cxx
@@ -28,8 +28,8 @@
 #include "xAODPrimitives/IsolationCorrection.h"
 #include "xAODPrimitives/IsolationHelpers.h"
 #include "xAODPrimitives/IsolationCorrectionHelper.h"
-#include "xAODPrimitives/tools/getIsolationAccessor.h"
-#include "xAODPrimitives/tools/getIsolationCorrectionAccessor.h"
+#include "xAODPrimitives/tools/getIsolationDecorator.h"
+#include "xAODPrimitives/tools/getIsolationCorrectionDecorator.h"
 
 #include "xAODEgamma/Egamma.h"
 #include "xAODEgamma/EgammaDefs.h"
@@ -56,13 +56,13 @@ namespace xAOD {
   CaloIsolationTool::CaloIsolationTool (const std::string& name):
         asg::AsgTool(name),
 #ifndef XAOD_ANALYSIS
-        m_assoTool("Rec::ParticleCaloCellAssociationTool/ParticleCaloCellAssociationTool"),
-        m_caloExtTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"),
-	m_clustersInConeTool("xAOD::CaloClustersInConeTool/CaloClustersInConeTool"),
-        m_pflowObjectsInConeTool(""),
-        m_caloFillRectangularTool(""),
+        m_assoTool("Rec::ParticleCaloCellAssociationTool/ParticleCaloCellAssociationTool", this),
+        m_caloExtTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool", this),
+	m_clustersInConeTool("xAOD::CaloClustersInConeTool/CaloClustersInConeTool", this),
+        m_pflowObjectsInConeTool("", this),
+        m_caloFillRectangularTool("", this),
 #endif // XAOD_ANALYSIS
-        m_IsoLeakCorrectionTool("")
+        m_IsoLeakCorrectionTool("", this)
   {
 #ifndef XAOD_ANALYSIS
     declareInterface<ICaloCellIsolationTool>(this);
@@ -1374,7 +1374,7 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result,
   }
 
   bool CaloIsolationTool::decorateParticle(CaloIsolation& result,
-					   IParticle& tp,
+					   const IParticle& tp,
 					   const std::vector<Iso::IsolationType>& cones,
 					   CaloCorrection corrections){
     // get the applied corrections
@@ -1383,7 +1383,7 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result,
     ATH_MSG_DEBUG("Decoded correction types: " << correctionTypes.size());
 
     // decorate the particle
-    SG::AuxElement::Accessor< uint32_t >* bitsetAcc = getIsolationCorrectionBitsetAccessor(Iso::isolationFlavour(cones[0]));
+    SG::AuxElement::Decorator< uint32_t >* bitsetAcc = getIsolationCorrectionBitsetDecorator(Iso::isolationFlavour(cones[0]));
 
     if( bitsetAcc )
       (*bitsetAcc)(tp) = corrections.calobitset.to_ulong();
@@ -1397,7 +1397,7 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result,
       // core energy and area
       for (auto par : coretype.second) {
 	if (par.first == Iso::coreArea) continue; // do not store area, as they are constant ! (pi R**2 or 5*0.025 * 7*pi/128)
-	SG::AuxElement::Accessor< float >* isoCorAcc = getIsolationCorrectionAccessor( Iso::isolationFlavour(cones[0]), ctype, par.first );
+	SG::AuxElement::Decorator< float >* isoCorAcc = getIsolationCorrectionDecorator( Iso::isolationFlavour(cones[0]), ctype, par.first );
 	if (isoCorAcc) { 
 	  ATH_MSG_DEBUG("Storing core correction " << Iso::toString(ctype) << " var " << Iso::toString(par.first) << " = " << par.second);
 	  (*isoCorAcc)(tp) = par.second;
@@ -1416,7 +1416,7 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result,
 	continue;
       }
       for (unsigned int i = 0; i < corrvec.size();i++) {
-	SG::AuxElement::Accessor< float >* isoCorAcc = getIsolationCorrectionAccessor(cones[i],ctype);
+	SG::AuxElement::Decorator< float >* isoCorAcc = getIsolationCorrectionDecorator(cones[i],ctype);
 	if (isoCorAcc) {
 	  ATH_MSG_DEBUG("Storing non core correction " << Iso::toString(ctype) << " of iso type " << Iso::toString(cones[i]) << " = " << corrvec[i]);
 	  (*isoCorAcc)(tp) = corrvec[i];
@@ -1431,7 +1431,7 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result,
       for( unsigned int i=0;i<cones.size();++i ){
 	
 	Iso::IsolationType type = cones[i];
-        SG::AuxElement::Accessor< float >* isoTypeAcc = getIsolationAccessor(type);
+        SG::AuxElement::Decorator< float >* isoTypeAcc = getIsolationDecorator(type);
         if ( isoTypeAcc ) {
 	  ATH_MSG_DEBUG("Filling " << Iso::toString(type) << " = " << result.etcones[i]);
           (*isoTypeAcc)(tp) = result.etcones[i];
@@ -1444,7 +1444,7 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result,
     return true;
   }
 
-  bool CaloIsolationTool::decorateParticle_caloCellIso( IParticle& tp,
+  bool CaloIsolationTool::decorateParticle_caloCellIso( const IParticle& tp,
                                           const std::vector<Iso::IsolationType>& cones,
                                           CaloCorrection corrections,
                                           const CaloCellContainer* Cells){
@@ -1463,7 +1463,7 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result,
   }
 
 
-  bool CaloIsolationTool::decorateParticle_topoClusterIso( IParticle& tp,
+  bool CaloIsolationTool::decorateParticle_topoClusterIso( const IParticle& tp,
                                           const std::vector<Iso::IsolationType>& cones,
                                           CaloCorrection corrections,
                                           const CaloClusterContainer* TopClusters) {
@@ -1481,7 +1481,7 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result,
     return true;
   }
 
-  bool CaloIsolationTool::decorateParticle_eflowIso( IParticle& tp,
+  bool CaloIsolationTool::decorateParticle_eflowIso( const IParticle& tp,
                                           const std::vector<Iso::IsolationType>& cones,
                                           CaloCorrection corrections){
     // calculate the isolation
@@ -1499,7 +1499,7 @@ bool CaloIsolationTool::correctIsolationEnergy_pflowCore(CaloIsolation& result,
   }
 
 #ifndef XAOD_ANALYSIS
-  bool CaloIsolationTool::decorateParticle( IParticle& tp,
+  bool CaloIsolationTool::decorateParticle( const IParticle& tp,
                                           const std::vector<Iso::IsolationType>& cones,
                                           CaloCorrection corrections,
                                           const CaloCellContainer* Cells,
diff --git a/Reconstruction/RecoTools/IsolationTool/Root/TrackIsolationTool.cxx b/Reconstruction/RecoTools/IsolationTool/Root/TrackIsolationTool.cxx
index 0976c55f8d0b409c6d6c4589cf6788d86dc06385..df89fce3c913d6d8c317311686396c131438dccc 100644
--- a/Reconstruction/RecoTools/IsolationTool/Root/TrackIsolationTool.cxx
+++ b/Reconstruction/RecoTools/IsolationTool/Root/TrackIsolationTool.cxx
@@ -16,8 +16,8 @@
 #include "xAODPrimitives/IsolationConeSize.h"
 #include "xAODPrimitives/IsolationHelpers.h"
 #include "xAODPrimitives/IsolationCorrectionHelper.h"
-#include "xAODPrimitives/tools/getIsolationAccessor.h"
-#include "xAODPrimitives/tools/getIsolationCorrectionAccessor.h"
+#include "xAODPrimitives/tools/getIsolationDecorator.h"
+#include "xAODPrimitives/tools/getIsolationCorrectionDecorator.h"
 #include "xAODMuon/Muon.h"
 
 #include <iomanip>
@@ -29,7 +29,7 @@ namespace xAOD {
   TrackIsolationTool::TrackIsolationTool (const std::string& name):
     asg::AsgTool(name)
 #ifndef XAOD_ANALYSIS
-    , m_tracksInConeTool("xAOD::TrackParticlesInConeTool/TrackParticlesInConeTool"),
+    , m_tracksInConeTool("xAOD::TrackParticlesInConeTool/TrackParticlesInConeTool", this),
 	m_trkselTool( "InDet::InDetTrackSelectionTool/TrackSelectionTool", this )
 #endif // XAOD_ANALYSIS
   {
@@ -185,7 +185,7 @@ namespace xAOD {
     return success;
   }
 
-  bool TrackIsolationTool::decorateParticle( IParticle& tp, 
+  bool TrackIsolationTool::decorateParticle( const IParticle& tp, 
                                              const std::vector<Iso::IsolationType>& cones, 
                                              TrackCorrection corrections, 
                                              const Vertex* vertex, 
@@ -209,7 +209,7 @@ namespace xAOD {
 
     // This is independant of the size. At least for the time being
     // fill bitset
-    SG::AuxElement::Accessor< uint32_t >* bitsetAcc = getIsolationCorrectionBitsetAccessor(Iso::isolationFlavour(cones[0]));
+    SG::AuxElement::Decorator< uint32_t >* bitsetAcc = getIsolationCorrectionBitsetDecorator(Iso::isolationFlavour(cones[0]));
 
     if( bitsetAcc ){
       (*bitsetAcc)(tp) = corrections.trackbitset.to_ulong();
@@ -222,7 +222,7 @@ namespace xAOD {
 	ATH_MSG_WARNING("Correction value not found " << Iso::toString(ctype) );         
 	continue;
       }
-      SG::AuxElement::Accessor< float >* isoCorAcc = getIsolationCorrectionAccessor( Iso::isolationFlavour(cones[0]), ctype );
+      SG::AuxElement::Decorator< float >* isoCorAcc = getIsolationCorrectionDecorator( Iso::isolationFlavour(cones[0]), ctype );
       if( isoCorAcc ){
 	(*isoCorAcc)(tp) = el->second;
       }        
@@ -237,7 +237,7 @@ namespace xAOD {
 
       // fill main isolation
       if( result.ptcones.size() == cones.size() ){
-        SG::AuxElement::Accessor< float >* isoTypeAcc = getIsolationAccessor(type);
+        SG::AuxElement::Decorator< float >* isoTypeAcc = getIsolationDecorator(type);
         if( isoTypeAcc ){
 	  ATH_MSG_DEBUG("Filling std cone " << result.ptcones[i]);
           (*isoTypeAcc)(tp) = result.ptcones[i];
@@ -249,7 +249,7 @@ namespace xAOD {
       // also fill var cone
       if( result.ptvarcones_10GeVDivPt.size() == cones.size() ){
         Iso::IsolationType varIsoType = Iso::isolationType( Iso::ptvarcone, coneSize );
-        SG::AuxElement::Accessor< float >* isoTypeAcc = getIsolationAccessor(varIsoType);
+        SG::AuxElement::Decorator< float >* isoTypeAcc = getIsolationDecorator(varIsoType);
         if( isoTypeAcc ){
 	  ATH_MSG_DEBUG("Filling var cone " << result.ptvarcones_10GeVDivPt[i]);
           (*isoTypeAcc)(tp) = result.ptvarcones_10GeVDivPt[i];
diff --git a/Reconstruction/RecoTools/IsolationTool/doc/packagedoc.h b/Reconstruction/RecoTools/IsolationTool/doc/packagedoc.h
index a58467e7389a78473022f9386e3c6b1c11b9daa8..3fb7b0ebc38a82f827a20407b14bf2cb5e44e29b 100644
--- a/Reconstruction/RecoTools/IsolationTool/doc/packagedoc.h
+++ b/Reconstruction/RecoTools/IsolationTool/doc/packagedoc.h
@@ -2,6 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
+/**
 @page IsolationTool_page The Track Isolation Tools
 
  - A package with base implementations to calculate the track isolation et() given a TrackParticle and a 
@@ -16,9 +17,4 @@ base implementation is overwritten in derived class in the package Reconstructio
  - For questions or comments: Ketevi A. Assamagan
    ketevi@bnl.gov
 
-@section IsolationTool_used_packagesTkPara Used Packages
-
-@section IsolationTool_requirements Requirements
-
 */
-
diff --git a/Reconstruction/RecoTools/IsolationTool/python/IsolationToolFactories.py b/Reconstruction/RecoTools/IsolationTool/python/IsolationToolFactories.py
deleted file mode 100644
index 8ec4fc429fc025b4a978a804d51334d58ba9c088..0000000000000000000000000000000000000000
--- a/Reconstruction/RecoTools/IsolationTool/python/IsolationToolFactories.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-__doc__ = "ToolFactories to instantiate all CaloIsolationTool for egammaCaloTools with default configuration"
-__author__ = "Nathan Readioff"
-
-from AthenaCommon.Constants import INFO
-
-from egammaRec.Factories import ToolFactory, getPropertyValue
-from CaloIdentifier import SUBCALO 
-#---------------------------------------
-# egamma specifics          
-from egammaCaloTools.egammaCaloToolsFactories import CaloFillRectangularCluster
-
-# tool to collect topo clusters in cone
-from ParticlesInConeTools.ParticlesInConeToolsConf import xAOD__CaloClustersInConeTool
-CaloClustersInConeTool = ToolFactory(xAOD__CaloClustersInConeTool,
-                                     CaloClusterLocation = "CaloCalTopoCluster")
-
-from AthenaCommon.GlobalFlags import globalflags
-isMC = not globalflags.DataSource()=='data'
-from IsolationCorrections.IsolationCorrectionsConf import CP__IsolationCorrectionTool as ICT
-IsoCorrectionTool = ToolFactory(ICT,
-                                name = "NewLeakageCorrTool",
-                                IsMC = isMC)
-
-# configuration for ED computation
-def configureEDCorrection(tool):
-  """Configure tools and algorithm for energy density correction 
-     (only if doEnergyDensityCorrection = True)"""
-  # Return if doEnergyDensityCorrection is false
-  if not getPropertyValue(tool, 'doEnergyDensityCorrection'):
-    return
-  # Set OutputLevel to INFO or higher if tool has it too
-  OutputLevel = min(getPropertyValue(tool, 'OutputLevel'), INFO)
-  try:
-    from AthenaCommon.AppMgr import ToolSvc
-    from EventShapeTools.EventDensityConfig import configEventDensityTool, EventDensityAlg
-    from JetRec.JetRecStandard import jtm
-    tc=configEventDensityTool("EDtpIsoCentralTool", jtm.emget,
-                              radius          = 0.5,
-                              AbsRapidityMin  = 0.0,
-                              AbsRapidityMax  = 1.5,
-                              OutputContainer = "DensitytpIsoCentral",
-                              OutputLevel     = OutputLevel
-                              )
-    ToolSvc += tc
-    tf=configEventDensityTool("EDtpIsoForwardTool", jtm.emget,
-                              radius          = 0.5,
-                              AbsRapidityMin  = 1.5,
-                              AbsRapidityMax  = 3.0,
-                              OutputContainer = "DensitytpIsoForward",
-                              OutputLevel     = OutputLevel
-                              )
-    ToolSvc += tf
-  except Exception:
-    print '\nERROR: could not get handle to EDEgammaXTool'
-    raise
- 
-  # add to topsequence 
-  from AthenaCommon.AlgSequence import AlgSequence
-  topSequence = AlgSequence()
-  if not hasattr(topSequence,'EDtpIsoCentralAlg'):
-    topSequence += EventDensityAlg("EDtpIsoCentralAlg", EventDensityTool = tc)
-  if not hasattr(topSequence,'EDtpIsoForwardAlg'):
-    topSequence += EventDensityAlg("EDtpIsoForwardAlg", EventDensityTool = tf)
-
-
-from IsolationTool.IsolationToolConf import xAOD__CaloIsolationTool
-CaloIsolationTool = ToolFactory(xAOD__CaloIsolationTool, name="CaloIsolationTool",
-                                postInit = [configureEDCorrection],
-                                CaloFillRectangularClusterTool  = CaloFillRectangularCluster,
-                                IsoLeakCorrectionTool           = IsoCorrectionTool,
-                                ClustersInConeTool              = CaloClustersInConeTool,
-                                EMCaloNums  = [SUBCALO.LAREM],
-                                HadCaloNums = [SUBCALO.LARHEC, SUBCALO.TILE],
-                                UseEMScale = True
-                                ExcludeTG3 = True)
diff --git a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloCellIsolationTool.h b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloCellIsolationTool.h
index 844ce4de65bc664c12620e8f045b5ae2406d788c..c0bfd68fc1e2da4df6f09215a00a5767251193e0 100644
--- a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloCellIsolationTool.h
+++ b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloCellIsolationTool.h
@@ -51,7 +51,7 @@ namespace xAOD {
        @param[in] container cell contrainer (for trigger only)
        @return true if the calculation and decoration was successfull
     */    
-    virtual bool decorateParticle_caloCellIso( IParticle& tp,
+    virtual bool decorateParticle_caloCellIso( const IParticle& tp,
                              const std::vector<Iso::IsolationType>& cones,
                              CaloCorrection corrections,
                              const CaloCellContainer* Cells = 0) = 0;
diff --git a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloIsolationDecoratorTool.h b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloIsolationDecoratorTool.h
index 95fc69919be6aea1157ac6031236b775366d1116..f2916799aeec995eff128471ef741540c9522a5b 100644
--- a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloIsolationDecoratorTool.h
+++ b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloIsolationDecoratorTool.h
@@ -39,7 +39,7 @@ namespace xAOD {
        @param[in] TopClusters topoCluster contrainer (for trigger only)
        @return true if the decoration was successfull
     */    
-    virtual bool decorateParticle( IParticle& tp,
+    virtual bool decorateParticle( const IParticle& tp,
 				   const std::vector<Iso::IsolationType>& cones, 
 				   CaloCorrection corrections, 
 				   const CaloCellContainer* Cells = 0,
diff --git a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloTopoClusterIsolationTool.h b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloTopoClusterIsolationTool.h
index 30c9959d3c38d2b66cff3a2a038d2e0e79b3dd58..427c19ab5cbb61af6a8935ecfadb7538f506100f 100644
--- a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloTopoClusterIsolationTool.h
+++ b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloTopoClusterIsolationTool.h
@@ -50,7 +50,7 @@ namespace xAOD {
        @param[in] container topo cluster contrainer (for trigger only)
        @return true if the calculation and decoration was successfull
     */
-    virtual bool decorateParticle_topoClusterIso(IParticle& tp,
+    virtual bool decorateParticle_topoClusterIso(const IParticle& tp,
                                                  const std::vector<Iso::IsolationType>& cones,
                                                  CaloCorrection corrections,
                                                  const CaloClusterContainer* TopClusters = 0) =0; 
diff --git a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/INeutralEFlowIsolationTool.h b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/INeutralEFlowIsolationTool.h
index 2710a0742f77f0fca52fa45a1719f059b8fce196..c3cd04152e01570703a9b094343f293b6f5c58c8 100644
--- a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/INeutralEFlowIsolationTool.h
+++ b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/INeutralEFlowIsolationTool.h
@@ -48,7 +48,7 @@ namespace xAOD {
        @param[in] corrections bitset specifying which corrections to apply to isolation
        @return true if the calculation and decoration was successfull
     */  
-    virtual bool decorateParticle_eflowIso(IParticle& tp,
+    virtual bool decorateParticle_eflowIso(const IParticle& tp,
                                            const std::vector<Iso::IsolationType>& cones,
                                            CaloCorrection corrections) = 0;
   };
diff --git a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ITrackIsolationTool.h b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ITrackIsolationTool.h
index 7ada246fab41fe1f641927bb4c604e5964d13b2b..04a23b3bc4a43e463866a9ea85aa5e7352a63475 100644
--- a/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ITrackIsolationTool.h
+++ b/Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ITrackIsolationTool.h
@@ -59,7 +59,7 @@ namespace xAOD {
        @param[in] indetTrackParticles if provided the isolation will be calculated using the ID track particle collection passed
        @return true if the calculation and decoration was successfull
     */    
-    virtual bool decorateParticle( IParticle& tp, 
+    virtual bool decorateParticle( const IParticle& tp, 
                                    const std::vector<Iso::IsolationType>& cones, 
                                    TrackCorrection corrections, 
                                    const Vertex* vertex = 0, 
diff --git a/Reconstruction/RecoTools/RecoToolInterfaces/doc/packagedoc.h b/Reconstruction/RecoTools/RecoToolInterfaces/doc/packagedoc.h
index 51d57d394be07999eb018d37d04a3eb2bc60b49f..1269b5f0e44e116c1c9c1d4c200f27c0f30c2b54 100644
--- a/Reconstruction/RecoTools/RecoToolInterfaces/doc/packagedoc.h
+++ b/Reconstruction/RecoTools/RecoToolInterfaces/doc/packagedoc.h
@@ -26,15 +26,4 @@ This package is not built as any library, it is a simple include package.
 
 @section RecoToolInterfaces_ExtrasRecoToolInterfaces Extra Pages
 
- - @ref UsedRecoToolInterfaces
- - @ref requirementsRecoToolInterfaces
 */
-
-/**
-@page UsedRecoToolInterfaces Used Packages
-*/
-
-/**
-@page requirementsRecoToolInterfaces Requirements
-*/
-
diff --git a/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt b/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt
index 4f44b309a923df87d7ce09a16f29aeb3ac63f603..05d87e1cafe5f82250890e921b47914ada655001 100644
--- a/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt
+++ b/Reconstruction/RecoTools/TrackToCalo/CMakeLists.txt
@@ -14,6 +14,8 @@ atlas_depends_on_subdirs( PUBLIC
                           GaudiKernel
                           Reconstruction/RecoEvent/ParticleCaloExtension
                           Reconstruction/RecoTools/RecoToolInterfaces
+                          Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces
+                          Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools
                           Tracking/TrkEvent/TrkCaloExtension
                           Tracking/TrkEvent/TrkParametersIdentificationHelpers
                           PRIVATE
@@ -28,6 +30,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Event/xAOD/xAODTracking
                           Event/xAOD/xAODTruth
                           Reconstruction/RecoTools/ParticlesInConeTools
+                          InnerDetector/InDetRecTools/TrackVertexAssociationTool
                           Tracking/TrkDetDescr/TrkSurfaces
                           Tracking/TrkEvent/TrkEventPrimitives
                           Tracking/TrkEvent/TrkParameters
@@ -43,11 +46,11 @@ atlas_add_library( TrackToCaloLib
                    src/*.cxx
                    PUBLIC_HEADERS TrackToCalo
                    INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${EIGEN_LIBRARIES} CaloEvent CaloGeoHelpers GeoPrimitives xAODCaloEvent GaudiKernel ParticleCaloExtension RecoToolInterfaces TrkCaloExtension TrkParametersIdentificationHelpers CaloDetDescrLib CaloUtilsLib
+                   LINK_LIBRARIES ${EIGEN_LIBRARIES} CaloEvent CaloGeoHelpers GeoPrimitives xAODCaloEvent GaudiKernel ParticleCaloExtension RecoToolInterfaces TrackCaloClusterRecTools TrkCaloExtension TrkParametersIdentificationHelpers CaloDetDescrLib CaloUtilsLib
                    PRIVATE_LINK_LIBRARIES CaloIdentifier AthenaBaseComps AtlasDetDescr FourMomUtils xAODMuon xAODTracking xAODTruth TrkSurfaces TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces )
 
 atlas_add_component( TrackToCalo
                      src/components/*.cxx
                      INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${EIGEN_LIBRARIES} CaloEvent CaloGeoHelpers GeoPrimitives xAODCaloEvent GaudiKernel ParticleCaloExtension RecoToolInterfaces TrkCaloExtension TrkParametersIdentificationHelpers CaloDetDescrLib CaloIdentifier CaloUtilsLib AthenaBaseComps AtlasDetDescr FourMomUtils xAODMuon xAODTracking xAODTruth TrkSurfaces TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces TrackToCaloLib )
+                     LINK_LIBRARIES ${EIGEN_LIBRARIES} CaloEvent CaloGeoHelpers GeoPrimitives xAODCaloEvent GaudiKernel ParticleCaloExtension RecoToolInterfaces TrackCaloClusterRecTools TrkCaloExtension TrkParametersIdentificationHelpers CaloDetDescrLib CaloIdentifier CaloUtilsLib AthenaBaseComps AtlasDetDescr FourMomUtils xAODMuon xAODTracking xAODTruth TrkSurfaces TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrkToolInterfaces TrackToCaloLib )
 
diff --git a/Reconstruction/RecoTools/TrackToCalo/doc/packagedoc.h b/Reconstruction/RecoTools/TrackToCalo/doc/packagedoc.h
index 28db15f2251ac7812a5216c6a34d1c1197b3dc44..9d8c1e037262a828a4967bfee05b3f84f2fee73f 100644
--- a/Reconstruction/RecoTools/TrackToCalo/doc/packagedoc.h
+++ b/Reconstruction/RecoTools/TrackToCalo/doc/packagedoc.h
@@ -19,15 +19,4 @@ The following classes are defined in this package:
 
 @section TrackToCalo_ExtrasTrackToCalo Extra Pages
 
- - @ref UsedTrackToCalo
- - @ref requirementsTrackToCalo
 */
-
-/**
-@page UsedTrackToCalo Used Packages
-*/
-
-/**
-@page requirementsTrackToCalo Requirements
-*/
-
diff --git a/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloCellAssociationTool.h b/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloCellAssociationTool.h
index 57e7f3cd8e9fde87529488e7a41a2cd5175fc1cf..3a8220910ca36c21a676ccd8820473d8acb69934 100644
--- a/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloCellAssociationTool.h
+++ b/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloCellAssociationTool.h
@@ -20,6 +20,8 @@ authors : Niels van Eldik (CERN PH-ATC)
 
 #include "PathLengthUtils.h"
 
+
+
 namespace Trk {
   class IParticleCaloExtensionTool;
   class CaloExtension;
@@ -72,6 +74,7 @@ namespace Rec {
 
     mutable PathLengthUtils m_pathLenUtil;
 
+
   };
 
 
diff --git a/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloClusterAssociationTool.cxx b/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloClusterAssociationTool.cxx
index ab136705f51f28206fb1de1620ad20ca12e38cb9..217d5f54814b65cf9a09555f5766e9ea6e3be2da 100644
--- a/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloClusterAssociationTool.cxx
+++ b/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloClusterAssociationTool.cxx
@@ -4,7 +4,6 @@
 
 #include "ParticleCaloClusterAssociationTool.h"
 // forward declares
-#include "RecoToolInterfaces/IParticleCaloExtensionTool.h"
 
 #include "ParticleCaloExtension/ParticleClusterAssociationCollection.h"
 #include "ParticlesInConeTools/ICaloClustersInConeTool.h"
@@ -14,21 +13,30 @@
 
 #include "FourMomUtils/P4Helpers.h"
 
+#include "CaloGeoHelpers/CaloSampling.h"
+
+#include "TrackCaloClusterRecTools/IParticleToCaloExtensionMap.h"
+#include "xAODTracking/VertexContainer.h"
+
+
 namespace Rec {
 
   ParticleCaloClusterAssociationTool::ParticleCaloClusterAssociationTool(const std::string& t, const std::string& n, const IInterface*  p )
     : AthAlgTool(t,n,p),
       m_caloExtensionTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"),
-      m_clustersInConeTool("xAOD::CaloClustersInConeTool/CaloClustersInConeTool")
+      m_clustersInConeTool("xAOD::CaloClustersInConeTool/CaloClustersInConeTool"),
+      m_caloClusters("CaloCalTopoClusters"),
+      m_caloEntryMapName("ParticleToCaloExtensionMap")
   {
-
     declareInterface<IParticleCaloClusterAssociationTool>(this);
     declareProperty("ParticleCaloExtensionTool",   m_caloExtensionTool );
     declareProperty("ClustersInConeTool",          m_clustersInConeTool);
-
+    declareProperty("CaloClusterLocation",         m_caloClusters);
+    declareProperty("AssociationCollectionName",   m_assCollection);
+    declareProperty("ParticleCaloEntryMapName",    m_caloEntryMapName);
     //coneSize for including calo cells around track
-    declareProperty("ConeSize", m_coneSize = 0.1);
-
+    declareProperty("ConeSize",                    m_coneSize = 0.1);
+    declareProperty("UseCovariance",               m_useCovariance = true);
   }
 
   ParticleCaloClusterAssociationTool::~ParticleCaloClusterAssociationTool() {}
@@ -38,7 +46,7 @@ namespace Rec {
     ATH_CHECK( m_caloExtensionTool.retrieve() );
 
     if (!m_clustersInConeTool.empty()) ATH_CHECK(m_clustersInConeTool.retrieve());
-
+    
     return StatusCode::SUCCESS;
   }
 
@@ -50,7 +58,7 @@ namespace Rec {
                                                                        const xAOD::CaloClusterContainer* container, bool useCaching ) const {
 
 
-    ATH_MSG_DEBUG(" particleCellAssociation: ptr " << &particle << " dr " << dr << " useCaching " << useCaching);
+    ATH_MSG_DEBUG(" particleClusterAssociation: ptr " << &particle << " dr " << dr << " useCaching " << useCaching);
 
     // reset pointer
     association = 0;
@@ -68,7 +76,7 @@ namespace Rec {
           if( dr > theAssociation->associationConeSize() ){
             ATH_MSG_DEBUG(" dr larger then cached dr: " << dr << " cached dr " << theAssociation->associationConeSize());
             ParticleClusterAssociation::Data clusters;
-            associateClusters(container,theAssociation->caloExtension(),dr,clusters);    
+            associateClusters(container,theAssociation->caloExtension(),dr,clusters,particle);    
             theAssociation->updateData(std::move(clusters),dr);
           }
           association = theAssociation;
@@ -80,7 +88,7 @@ namespace Rec {
 
     // get the extrapolation into the calo
     const Trk::CaloExtension* caloExtension = 0;
-    if( !m_caloExtensionTool->caloExtension(particle,caloExtension) ) {
+    if( !m_caloExtensionTool->particleToCaloExtrapolate(particle,caloExtension) ) {
       ATH_MSG_DEBUG("Failed to get calo extension");      
       return false;
     }
@@ -89,71 +97,134 @@ namespace Rec {
       return false;
     }
     
-
+    //retrieve the cluster container if not provided, return false it retrieval failed
+    if( !container && !(container = getClusterContainer()) ) {
+      ATH_MSG_DEBUG("Failed to get calo cluster container");      
+      return false;
+    }
+    
     // update cone size in case it is smaller than the default
     if( dr < m_coneSize ) dr = m_coneSize;
     ParticleClusterAssociation::Data clusters;
-    associateClusters(container,*caloExtension,dr,clusters);    
+    associateClusters(container,*caloExtension,dr,clusters,particle);    
     
-    ParticleClusterAssociation* theAssocation = new ParticleClusterAssociation( *caloExtension, std::move(clusters), dr, container );
-
-    // now add the extension to the output collection so we are not causing any leaks
-    ParticleClusterAssociationCollection* collection = 0;
-    if( !evtStore()->contains<ParticleClusterAssociationCollection>(m_containerName) ){
-      collection = new ParticleClusterAssociationCollection();
-      if( evtStore()->record( collection, m_containerName).isFailure() ) {
-        ATH_MSG_WARNING( "Failed to record output collection, will leak the ParticleCaloExtension");
-        delete collection;
-        collection = 0;
+    association = new ParticleClusterAssociation( *caloExtension, std::move(clusters), dr, container );
+
+    // now add particle and CaloExtension to the container
+    IParticleToCaloExtensionMap * caloExtensionMap = 0;
+    if(not evtStore()->contains<IParticleToCaloExtensionMap>(m_caloEntryMapName)) {
+      caloExtensionMap = new IParticleToCaloExtensionMap();
+      if (evtStore()->record(caloExtensionMap, m_caloEntryMapName).isFailure()) {
+	ATH_MSG_WARNING( "Failed to record output collection, will leak the ParticleCaloExtension");
+	delete caloExtensionMap;
+	caloExtensionMap = 0;
       }
-    }else{
-      if(evtStore()->retrieve(collection,m_containerName).isFailure()) {
-        ATH_MSG_WARNING( "Unable to retrieve " << m_containerName << " will leak the ParticleCaloExtension" );
+    } else {
+      if(evtStore()->retrieve(caloExtensionMap,m_caloEntryMapName).isFailure()) {
+	ATH_MSG_WARNING( "Unable to retrieve ParticleToCaloExtensionMap will leak the ParticleCaloExtension" );
       }
     }
-    if( collection ) collection->push_back(theAssocation);
-    else{
-      ATH_MSG_WARNING( "No ParticleCaloCellAssociationCollection, failing extension to avoid memory leak");
-      delete theAssocation;
-      theAssocation = 0;
-    }
-
-    association = theAssocation;
-    if( useCaching ) particle.auxdecor< ParticleClusterAssociation* >("clusterAssociation") = theAssocation;
-
-
+    if (caloExtensionMap)
+      caloExtensionMap->addEntry(&particle,caloExtension->caloEntryLayerIntersection());
+         
     return true;
-
+    
   }
-
+  
   void ParticleCaloClusterAssociationTool::associateClusters( const xAOD::CaloClusterContainer* container, 
                                                               const Trk::CaloExtension& caloExtension,
                                                               float dr,
-                                                              ParticleClusterAssociation::Data& clusters ) const {    
+                                                              ParticleClusterAssociation::Data& clusters, 
+                                                              const xAOD::IParticle& particle) const {    
+
+    particle.auxdecor<int>("ParticleCaloClusterAssociationTool")    = 1;
 
     const Trk::TrackParameters*  pars = caloExtension.caloEntryLayerIntersection();
     if(!pars) {
       ATH_MSG_WARNING( " NO TrackParameters caloExtension.caloEntryLayerIntersection() ");
       return;
     } 
-
+    
     float eta = pars->position().eta();
     float phi = pars->position().phi();
+         
     if( container ){
       float dr2Cut = dr*dr;
+            
       for( unsigned int i=0;i<container->size();++i ){
-        
         float dPhi = P4Helpers::deltaPhi( (*container)[i]->phi(), phi);
         float dEta = (*container)[i]->eta()-eta;
         float dr2  = dPhi*dPhi+ dEta*dEta;
-        if( dr2 < dr2Cut ) clusters.push_back( ElementLink<xAOD::CaloClusterContainer>(*container,i) );
+        
+        if(m_useCovariance) {
+            double uncertEta = 0.;
+            double uncertPhi = 0.;
+            if(pars->covariance()) {
+              uncertEta = -2.*sin(pars->position().theta()) / (cos(2.*pars->position().theta())-1.) * sqrt((*pars->covariance())(Trk::theta,Trk::theta));
+              uncertPhi = sqrt((*pars->covariance())(Trk::phi,Trk::phi));
+            } 
+            
+            float eInSample = 0.; 
+            float eInSampleFull = 0.; 
+            float emfrac = 0.; 
+            for (int s=0;s<CaloSampling::Unknown; s++){
+                eInSampleFull += (*container)[i]->eSample(CaloSampling::CaloSample(s));
+            }
+            eInSample += (*container)[i]->eSample(CaloSampling::EMB1);
+            eInSample += (*container)[i]->eSample(CaloSampling::EMB2);
+            eInSample += (*container)[i]->eSample(CaloSampling::EMB3);
+            eInSample += (*container)[i]->eSample(CaloSampling::EME1);
+            eInSample += (*container)[i]->eSample(CaloSampling::EME2);
+            eInSample += (*container)[i]->eSample(CaloSampling::EME3);
+            eInSample += (*container)[i]->eSample(CaloSampling::FCAL1);
+            
+            emfrac  = eInSample/eInSampleFull;
+            if ( emfrac > 1.0 ) emfrac = 1.;
+            if ( emfrac < 0.0 ) emfrac = 0.;
+            
+            double rad;
+            (*container)[i]->retrieveMoment(xAOD::CaloCluster::SECOND_R,rad);
+            double cent;
+            (*container)[i]->retrieveMoment(xAOD::CaloCluster::CENTER_MAG,cent);
+            double sigmaWidth = atan(sqrt(rad)/cent)*cosh((*container)[i]->eta());
+            double uncertExtrp = uncertEta*uncertEta + uncertPhi*uncertPhi;
+            double uncertClus  = 2.*sigmaWidth*sigmaWidth;
+	    	    
+            if(uncertExtrp>uncertClus){
+              ATH_MSG_DEBUG("Extrapolation uncertainty larger than cluster width! Returning without association.");
+	      continue;
+            }
+            
+            double dr2CutTmp = (sigmaWidth+uncertEta)*(sigmaWidth+uncertEta)+(sigmaWidth+uncertPhi)*(sigmaWidth+uncertPhi);
+            
+            if(sqrt(dr2)<sqrt(dr2Cut) && dr2 < dr2CutTmp) ATH_MSG_DEBUG("1. selections match! dR " << sqrt(dr2) << " new cut value " << sqrt(dr2CutTmp) << " pt trk " << pars->pT() << " sigma(phi) trk " << uncertPhi << " sigma(eta) trk " << uncertEta << " energy cluster " << (*container)[i]->e() << " sigma width " << sigmaWidth << " em frac " << emfrac);
+	    if(sqrt(dr2)<sqrt(dr2Cut) && dr2 > dr2CutTmp) ATH_MSG_DEBUG("2. only  dR matches! dR " << sqrt(dr2) << " new cut value " << sqrt(dr2CutTmp) << " pt trk " << pars->pT() << " sigma(phi) trk " << uncertPhi << " sigma(eta) trk " << uncertEta << " energy cluster " << (*container)[i]->e() << " sigma width " << sigmaWidth << " em frac " << emfrac);
+	    if(sqrt(dr2)>sqrt(dr2Cut) && dr2 < dr2CutTmp) ATH_MSG_DEBUG("3. only new matches! dR " << sqrt(dr2) << " new cut value " << sqrt(dr2CutTmp) << " pt trk " << pars->pT() << " sigma(phi) trk " << uncertPhi << " sigma(eta) trk " << uncertEta << " energy cluster " << (*container)[i]->e() << " sigma width " << sigmaWidth << " em frac " << emfrac);           
+            
+	    dr2Cut = dr2CutTmp;
+        }
+        
+        if( dr2 < dr2Cut )
+	  clusters.push_back( (*container)[i]);
       }
-    }else{
+    } else {
+      ATH_MSG_DEBUG("We're at the clustersinconetool." );
       if( !m_clustersInConeTool->particlesInCone(eta,phi,dr,clusters) ) {
         ATH_MSG_WARNING("Failed to get clusters");
       }
     }
-    ATH_MSG_DEBUG("associated cells " << clusters.size() << " using cone " << dr );
+  }
+  
+  const xAOD::CaloClusterContainer* ParticleCaloClusterAssociationTool::getClusterContainer() const {
+
+    const xAOD::CaloClusterContainer* container = 0;
+    //retrieve the cell container
+    if( evtStore()->retrieve(container, m_caloClusters).isFailure() || !container ) {
+      ATH_MSG_WARNING( "Unable to retrieve the cluster container  " << m_caloClusters << " container ptr " << container );
+      return 0;
+    }
+    if( container ) ATH_MSG_DEBUG("Retrieved cluster container " << container->size());
+    return container;
   }
 
-} // end of namespace Trk
+} // end of namespace Rec
\ No newline at end of file
diff --git a/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloClusterAssociationTool.h b/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloClusterAssociationTool.h
index be5a3a91e465dbd07df55806445e97b3cd0a67ea..84d60151d96b59c7103ec240c2035c6450bb2da2 100644
--- a/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloClusterAssociationTool.h
+++ b/Reconstruction/RecoTools/TrackToCalo/src/ParticleCaloClusterAssociationTool.h
@@ -17,8 +17,11 @@ authors : Niels van Eldik (CERN PH-ATC)
 
 #include "ParticleCaloExtension/ParticleClusterAssociation.h"
 
+#include "TrackCaloClusterRecInterfaces/IParticleExtrapolationTool.h"
+#include "TrackVertexAssociationTool/ITrackVertexAssociationTool.h"
+
+
 namespace Trk {
-  class IParticleCaloExtensionTool;
   class CaloExtension;
 }
 namespace xAOD {
@@ -60,13 +63,19 @@ namespace Rec {
     void associateClusters( const xAOD::CaloClusterContainer* container, 
                             const Trk::CaloExtension& caloExtension,
                             float dr,
-                            ParticleClusterAssociation::Data& clusters ) const;
+                            ParticleClusterAssociation::Data& clusters,
+                            const xAOD::IParticle& particle) const;
+    
+    const xAOD::CaloClusterContainer* getClusterContainer() const;
 
-    ToolHandle< Trk::IParticleCaloExtensionTool >  m_caloExtensionTool;
+    ToolHandle< IParticleExtrapolationTool >  m_caloExtensionTool;
     // FIXME: mutable
     mutable ToolHandle< xAOD::ICaloClustersInConeTool >     m_clustersInConeTool;
-    std::string m_containerName;
+    std::string m_caloClusters;
+    std::string m_assCollection;
+    std::string m_caloEntryMapName;
     double      m_coneSize;
+    bool        m_useCovariance;
 
   };
 
diff --git a/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.cxx b/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.cxx
index 95a02e6102737cc6c2c81d87dea97619effa1078..03c029a0eb78d9857b04a3cad1420d7b800e59ab 100644
--- a/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.cxx
+++ b/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.cxx
@@ -3,7 +3,6 @@
 */
 
 #include "TrackParticleCaloExtensionAlg.h"
-#include "RecoToolInterfaces/IParticleCaloExtensionTool.h"
 #include "RecoToolInterfaces/IParticleCaloCellAssociationTool.h"
 #include "TrkToolInterfaces/ITrackSelectorTool.h"
 #include "xAODTracking/TrackParticleContainer.h"
diff --git a/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.h b/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.h
index 07be8ae1ea356171d3da2e20773b611289cb19cb..8b8ee08b2779816338edf77bf6d320f9f793f102 100644
--- a/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.h
+++ b/Reconstruction/RecoTools/TrackToCalo/src/TrackParticleCaloExtensionAlg.h
@@ -17,9 +17,10 @@
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h"
 
+#include "TrackCaloClusterRecInterfaces/IParticleExtrapolationTool.h"
+
 namespace Trk {
   class ITrackSelectorTool;
-  class IParticleCaloExtensionTool;
 }
 namespace Rec {
   class IParticleCaloCellAssociationTool;
@@ -38,7 +39,7 @@ public:
   StatusCode finalize();
 
 private:
-  ToolHandle <Trk::IParticleCaloExtensionTool>       m_caloExtensionTool; //!< Tool to make the step-wise extrapolation
+  ToolHandle < IParticleExtrapolationTool>       m_caloExtensionTool; //!< Tool to make the step-wise extrapolation
   ToolHandle <Rec::IParticleCaloCellAssociationTool> m_caloCellAssociationTool; //!< Tool to make the step-wise extrapolation
   ToolHandle <Trk::ITrackSelectorTool>               m_trackSelector; //!< Tool to select tracks
 
diff --git a/Reconstruction/TRT_Rec/CMakeLists.txt b/Reconstruction/TRT_Rec/CMakeLists.txt
index 74ed7d728d5ca7156913fa719ab02ba8fb366a1a..d4ee2db576dc749dec33f87fe817d18d381ba2ee 100644
--- a/Reconstruction/TRT_Rec/CMakeLists.txt
+++ b/Reconstruction/TRT_Rec/CMakeLists.txt
@@ -13,6 +13,7 @@ atlas_depends_on_subdirs( PUBLIC
                           DetectorDescription/Identifier
                           GaudiKernel
                           Reconstruction/iPat/iPatInterfaces
+                          Event/EventContainers
                           PRIVATE
                           DetectorDescription/RoiDescriptor
                           InnerDetector/InDetDetDescr/InDetIdentifier
@@ -45,7 +46,7 @@ atlas_add_component( TRT_Rec
                      src/TRT_RoadData.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives IRegionSelector Identifier GaudiKernel iPatInterfaces RoiDescriptor InDetIdentifier InDetReadoutGeometry InDetPrepRawData iPatTrack iPatTrackParameters TrkGeometry TrkSurfaces TrkEventPrimitives TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkExInterfaces TrkExUtils TrkToolInterfaces )
+                     LINK_LIBRARIES ${EIGEN_LIBRARIES} AthenaBaseComps GeoPrimitives IRegionSelector Identifier GaudiKernel iPatInterfaces RoiDescriptor InDetIdentifier InDetReadoutGeometry InDetPrepRawData iPatTrack iPatTrackParameters TrkGeometry TrkSurfaces TrkEventPrimitives TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkExInterfaces TrkExUtils TrkToolInterfaces EventContainers )
 
 # Install files from the package:
 atlas_install_headers( TRT_Rec )
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/CMakeLists.txt b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..be39cbe9bd891424b21107dc4f38bfc580d4a503
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/CMakeLists.txt
@@ -0,0 +1,31 @@
+################################################################################
+# Package: TrackCaloClusterRecAlgs
+################################################################################
+
+# Declare the package name:
+atlas_subdir( TrackCaloClusterRecAlgs )
+
+# Declare the package's dependencies:
+atlas_depends_on_subdirs( PRIVATE
+                          Control/AthenaBaseComps
+                          Tracking/TrkEvent/TrkParametersIdentificationHelpers
+                          DetectorDescription/AtlasDetDescr
+                          PUBLIC
+                          GaudiKernel 
+                          Event/xAOD/xAODBase
+                          Event/xAOD/xAODTracking
+                          Event/xAOD/xAODAssociations
+                          Event/xAOD/xAODPFlow     
+                          Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools)
+
+find_package( FastJet )
+find_package( FastJetContrib ) 
+                          
+# Component(s) in the package:
+atlas_add_component( TrackCaloClusterRecAlgs
+                     src/*.cxx
+                     src/components/*.cxx
+                     INCLUDE_DIRS ${FASTJET_INCLUDE_DIRS} ${FASTJETCONTRIB_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${FASTJET_LIBRARIES} ${FASTJETCONTRIB_LIBRARIES} AthenaBaseComps GaudiKernel AtlasDetDescr xAODBase 
+                     xAODTracking xAODAssociations xAODPFlow TrackCaloClusterRecTools TrkParametersIdentificationHelpers )
+                     
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/TrackCaloClusterRecAlgs/TrackCaloClusterRecAlg.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/TrackCaloClusterRecAlgs/TrackCaloClusterRecAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..a641a28a0d257a0a844433fc41a894addaf335cc
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/TrackCaloClusterRecAlgs/TrackCaloClusterRecAlg.h
@@ -0,0 +1,59 @@
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECALGS_TRACKCALOCLUSTERRECALG_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECALGS_TRACKCALOCLUSTERRECALG_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/ToolHandle.h" //included under assumption you'll want to use some tools! Remove if you don't!
+#include "xAODBase/IParticle.h"
+#include "xAODPFlow/TrackCaloClusterContainer.h"
+#include "xAODTracking/TrackParticleContainer.h"
+
+#include "TrackCaloClusterRecTools/TrackCaloClusterWeightsTool.h"
+#include "TrackCaloClusterRecTools/TrackCaloClusterCreatorTool.h"
+
+class TrackCaloClusterRecAlg: public ::AthAlgorithm { 
+public: 
+  TrackCaloClusterRecAlg( const std::string& name, ISvcLocator* pSvcLocator );
+  virtual ~TrackCaloClusterRecAlg(); 
+    
+  virtual StatusCode  initialize();
+  virtual StatusCode  execute();
+  virtual StatusCode  finalize();
+  
+  /// Definition of the 4-momentum type.
+  typedef xAOD::IParticle::FourMom_t FourMom_t;
+ 
+private:
+    
+  // Get a data container; implementation at end of this header file
+  template<class T> const T* getContainer( const std::string & containerName);
+  
+  /// fill the maps
+  void fillMaps(std::multimap <const xAOD::CaloCluster*, const xAOD::TrackParticle*>& clusterToTracksMap, std::map <const xAOD::TrackParticle*, FourMom_t>& TrackTotalClusterPt, std::map <const xAOD::CaloCluster*, FourMom_t>& clusterToTracksWeightMap    );
+    
+  ToolHandle <TrackCaloClusterWeightsTool> m_trackCaloClusterWeightsTool;
+  ToolHandle <TrackCaloClusterCreatorTool> m_trackCaloClusterCreatorTool; 
+  
+  ///TrackParticle container's name
+  std::string m_trkParticleName;
+  
+  ///Output Collection container's name postfix
+  std::string m_outputPostFix;
+  
+  ///Cluster Collection container
+  std::string m_caloClusters;
+  
+  ///Cluster Collection container
+  std::string m_trackCaloClusterContainerName;
+      
+};
+  
+template<class T>
+inline const T* TrackCaloClusterRecAlg::getContainer(const std::string & containerName){
+  const T * ptr = evtStore()->retrieve< const T >( containerName );
+  if (!ptr) {
+    ATH_MSG_WARNING("Container '"<<containerName<<"' could not be retrieved");
+  }
+  return ptr;
+}
+
+#endif //> !TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECALGS_TRACKCALOCLUSTERRECALG_H
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/share/TrackCaloClusterReco_Standalone.py b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/share/TrackCaloClusterReco_Standalone.py
new file mode 100644
index 0000000000000000000000000000000000000000..779ce9e9710859b5b89808ff3722db25b86f34cf
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/share/TrackCaloClusterReco_Standalone.py
@@ -0,0 +1,552 @@
+import AthenaPoolCnvSvc.ReadAthenaPool
+
+from AthenaCommon import CfgMgr
+
+InputFiles = ["/eos/user/r/rjansky/TCCTestFiles/mc15_13TeV.301282.Pythia8EvtGen_A14NNPDF23LO_Wprime_WZqqqq_m4000.merge.AOD.e3743_s2608_s2183_r7772_r7676/AOD.08110078._000001.pool.root.1"]
+
+svcMgr.EventSelector.InputCollections = InputFiles
+
+# Name = Sample
+Name = "WprimeCovMatch"
+
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+athenaCommonFlags.FilesInput = svcMgr.EventSelector.InputCollections
+
+from AthenaCommon.GlobalFlags import globalflags
+DetDescrVersion = 'ATLAS-R2-2015-03-01-00'
+globalflags.DetDescrVersion = DetDescrVersion
+
+from IOVDbSvc.CondDB import conddb
+conddb.setGlobalTag('OFLCOND-MC15c-SDR-09')
+
+print "globalflags.DetDescrVersion = ", globalflags.DetDescrVersion
+# Set up geometry and BField
+include("RecExCond/AllDet_detDescr.py")
+
+from JetRec.JetRecConf import JetAlgorithm
+#from JetRecTools.JetRecToolsConf import JetConstituentModSequence, CaloClusterConstituentsOrigin, ClusterTimeCutTool
+from JetRecTools.JetRecToolsConf import JetConstituentModSequence, CaloClusterConstituentsOrigin
+ccco = CaloClusterConstituentsOrigin("JetConstit_LCOrigin") 
+ToolSvc += ccco
+
+#ctct = ClusterTimeCutTool("JetConstit_Timecut") 
+#ToolSvc += ctct
+
+PFSequence = JetConstituentModSequence("JetConstitSeq_LCOriginAndTime",
+                                       InputContainer = "CaloCalTopoClusters",
+                                       OutputContainer = "TimedCaloCalTopoClusters",
+                                       InputType = "CaloCluster",
+                                       Modifiers = [ccco],
+                                       SaveAsShallow = False
+                                       )
+ToolSvc += PFSequence
+
+#Configure the extrapolator
+from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
+theAtlasExtrapolator=AtlasExtrapolator("AtlasExtrapolator")
+ToolSvc += theAtlasExtrapolator
+
+from TrackCaloClusterRecTools.TrackCaloClusterRecToolsConf import ParticleToCaloExtrapolationTool
+ParticleToCaloExtrapolationTool = ParticleToCaloExtrapolationTool(name = "ParticleToCaloExtrapolationTool", 
+                                                                  Extrapolator = theAtlasExtrapolator,
+                                                                  ParticleType = "pion" )
+#ParticleToCaloExtrapolationTool.OutputLevel = DEBUG
+ToolSvc += ParticleToCaloExtrapolationTool
+
+print ParticleToCaloExtrapolationTool
+
+from ParticlesInConeTools.ParticlesInConeToolsConf import xAOD__CaloClustersInConeTool
+CaloClustersInCone = xAOD__CaloClustersInConeTool(name = "CaloClustersInCone", 
+                                                  CaloClusterLocation = "TimedCaloCalTopoClusters")
+# CaloClustersInCone.OutputLevel = DEBUG
+ToolSvc += CaloClustersInCone
+
+print CaloClustersInCone
+
+from TrackToCalo.TrackToCaloConf import Rec__ParticleCaloClusterAssociationTool
+ParticleCaloCellAssociation = Rec__ParticleCaloClusterAssociationTool(name                      = "ParticleCaloCellAssociationInDet",
+                                                                   ParticleCaloExtensionTool    = ParticleToCaloExtrapolationTool,
+
+                                                                   CaloClusterLocation          = "TimedCaloCalTopoClusters",
+                                                                   ClustersInConeTool           = CaloClustersInCone,
+                                                                   ConeSize                     = 0.1,
+                                                                   UseCovariance                = True )
+ParticleCaloCellAssociation.OutputLevel = DEBUG
+ToolSvc+=ParticleCaloCellAssociation
+print      ParticleCaloCellAssociation
+
+# Access the algorithm sequence:
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+# Add the algorithm.
+jetalg = JetAlgorithm("JetAlg_OriginAndTime")
+jetalg.OutputLevel = INFO
+jetalg.Tools += [PFSequence]
+topSequence += jetalg
+
+from TrackParticleAssociationAlgs.TrackParticleAssociationAlgsConf import TrackParticleClusterAssociationAlg
+TrackParticleClusterAssociation = TrackParticleClusterAssociationAlg(name = "TrackParticleClusterAssociationInDet",
+                                                            ParticleCaloClusterAssociationTool = ParticleCaloCellAssociation,
+                                                            TrackParticleContainerName = "InDetTrackParticles",
+                                                            PtCut = 400.,
+                                                            OutputCollectionPostFix = "Test",
+                                                            CaloClusterLocation = "TimedCaloCalTopoClusters")
+# TrackParticleClusterAssociation.OutputLevel = DEBUG
+topSequence += TrackParticleClusterAssociation
+
+print TrackParticleClusterAssociation
+
+from TrackCaloClusterRecTools.TrackCaloClusterRecToolsConf import TrackCaloClusterWeightsTool
+TrackCaloClusterWeights = TrackCaloClusterWeightsTool(name                 = "TrackCaloClusterWeights"  )
+# TrackCaloClusterWeights.OutputLevel = VERBOSE
+ToolSvc+=TrackCaloClusterWeights
+print      TrackCaloClusterWeights
+
+loosetrackvertexassotool=CfgMgr.CP__LooseTrackVertexAssociationTool("LooseTrackVertexAssociationTool", dzSinTheta_cut=3, d0_cut=2) 
+ToolSvc+=loosetrackvertexassotool 
+
+from JetRecTools.JetRecToolsConf import TrackVertexAssociationTool
+jettva  =   TrackVertexAssociationTool( name                    = "tvassoc",
+                                        TrackParticleContainer  = "InDetTrackParticles",
+                                        TrackVertexAssociation  = "JetTrackVtxAssoc",
+                                        VertexContainer         = "PrimaryVertices",
+                                        TrackVertexAssoTool     = loosetrackvertexassotool
+                                    )
+ToolSvc+=jettva 
+print      jettva
+
+#from TrackCaloClusterRecTools.TrackCaloClusterRecToolsConf import ClusterFilterTool
+#clusterfiltertool = ClusterFilterTool(name                       = "clusterfiltertool",
+#                                      LooseTrackVertexAssoTool   = loosetrackvertexassotool,
+#                                      TrackParticleContainerName = "InDetTrackParticles",
+#                                      ConeSize                   = 0.2,
+#                                      StoreParameters            = False)
+
+#ToolSvc+=clusterfiltertool
+#clusterfiltertool.OutputLevel = VERBOSE
+#print clusterfiltertool
+
+from TrackCaloClusterRecTools.TrackCaloClusterRecToolsConf import TrackCaloClusterCreatorTool
+TrackCaloClusterCreator = TrackCaloClusterCreatorTool(name                      = "TrackCaloClusterCreator",
+                                                      VertexContainerName       = "PrimaryVertices",
+                                                      LooseTrackVertexAssoTool  = loosetrackvertexassotool,
+                                                      ApplyClusterFilter        = False  )
+# TrackCaloClusterCreator.OutputLevel = VERBOSE
+ToolSvc+=TrackCaloClusterCreator
+print      TrackCaloClusterCreator
+
+from TrackCaloClusterRecAlgs.TrackCaloClusterRecAlgsConf import TrackCaloClusterRecAlg
+ParticleToCaloExtrapolation = TrackCaloClusterRecAlg(name                           = "TrackCaloClusterRecAlg",
+                                                     OutputCollectionPostFix        = "Test",
+                                                     CaloClustersLocation           = "TimedCaloCalTopoClusters",
+                                                     TrackCaloClusterContainerName  = "TrackCaloClusters",
+                                                     TrackCaloClusterWeightsTool    = TrackCaloClusterWeights,
+                                                     TrackCaloClusterCreatorTool    = TrackCaloClusterCreator)
+# ParticleToCaloExtrapolation.OutputLevel = VERBOSE
+topSequence += ParticleToCaloExtrapolation
+
+print ParticleToCaloExtrapolation
+
+theApp.EvtMax = -1
+
+### Jet Stuff
+if 1:
+  from JetRec.JetRecConf import JetFromPseudojet
+  jetFromPseudojet = JetFromPseudojet("jetFromPseudojet",Attributes = [] )
+  ToolSvc += jetFromPseudojet
+  
+  from JetRec.JetRecConf import JetTrimmer
+  groomer = JetTrimmer("JetGroomer")
+  groomer.RClus = 0.2  
+  groomer.PtFrac = 0.05
+  groomer.JetBuilder = jetFromPseudojet
+  ToolSvc += groomer
+
+  # Add filter for copied jets.
+  #from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import NSubjettinessTool
+  #ToolSvc += NSubjettinessTool("nsubjettiness")
+  #nsubjettiness = ToolSvc.nsubjettiness
+  
+  #from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import NSubjettinessRatiosTool
+  #ToolSvc += NSubjettinessRatiosTool("nsubjettinessratios")
+  #nsubjettinessratios = ToolSvc.nsubjettinessratios
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import KTSplittingScaleTool
+  # ToolSvc += KTSplittingScaleTool("ktsplittingscale")
+  # ktsplittingscale = ToolSvc.ktsplittingscale
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import DipolarityTool
+  # ToolSvc += DipolarityTool("dipolarity")
+  # dipolarity = ToolSvc.dipolarity
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import AngularityTool
+  # ToolSvc += AngularityTool("angularity")
+  # angularity = ToolSvc.angularity
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import KtDeltaRTool
+  # ToolSvc += KtDeltaRTool("ktdr")
+  # ktdr = ToolSvc.ktdr
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import KtMassDropTool
+  # ToolSvc += KtMassDropTool("ktmassdrop")
+  # ktmassdrop = ToolSvc.ktmassdrop
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import PlanarFlowTool
+  # ToolSvc += PlanarFlowTool("planarflow")
+  # planarflow = ToolSvc.planarflow
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import CenterOfMassShapesTool
+  # ToolSvc += CenterOfMassShapesTool("centerofmassshapes")
+  # centerofmassshapes = ToolSvc.centerofmassshapes
+  
+  #from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import EnergyCorrelatorTool
+  #ToolSvc += EnergyCorrelatorTool("energycorrelator")
+  #energycorrelator = ToolSvc.energycorrelator
+  
+  #from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import EnergyCorrelatorRatiosTool
+  #ToolSvc += EnergyCorrelatorRatiosTool("energycorrelatorratios")
+  #energycorrelatorratios = ToolSvc.energycorrelatorratios
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import JetPullTool
+  # ToolSvc += JetPullTool("pull")
+  # pull = ToolSvc.pull
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import JetChargeTool
+  # ToolSvc += JetChargeTool("charge")
+  # charge = ToolSvc.charge
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import VolatilityTool
+  # ToolSvc += VolatilityTool("volatility")
+  # volatility = ToolSvc.volatility
+  # volatility.TruncationFactor = 0.0
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import SubjetMakerTool
+  # ToolSvc += SubjetMakerTool("subjetmaker")
+  # subjetmaker = ToolSvc.subjetmaker
+  # subjetmaker.type = "Kt"
+  # subjetmaker.R = 0.2
+  # subjetmaker.PtCut = 5000;
+  
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import SubjetFinderTool
+  # ToolSvc += SubjetFinderTool("subjetfinder")
+  # subjetfinder = ToolSvc.subjetfinder
+  # from JetSubStructureMomentTools.JetSubStructureMomentToolsConf import SubjetRecorderTool
+  # ToolSvc += SubjetRecorderTool("subjetrecorder")
+  # subjetrecorder = ToolSvc.subjetrecorder
+  # subjetfinder.JetAlgorithm = "Kt"
+  # subjetfinder.JetRadius = 0.2
+  # subjetrecorder.SubjetLabel = "Kt2Subjets"
+  # subjetrecorder.SubjetContainerName = "Kt2TrackCaloClusterSubJets"
+  # subjetfinder.SubjetRecorder = subjetrecorder
+  
+  clname  = "TrackCaloClustersCombined"
+#  clname1 = "TrackCaloClustersCombinedAndNeutral"
+#  clname2 = "TrackCaloClustersCombinedAndCharged"
+  clname3 = "TrackCaloClustersAll"
+  
+#  clnames = [clname, clname1, clname2, clname3]
+  clnames = [clname, clname3]
+  
+  from JetRec.JetRecConf import JetPseudojetRetriever
+  from JetRec.JetRecConf import JetRecTool
+
+  for name in clnames:
+  #--------------------------------------------------------------
+  # Configure tools.
+  #--------------------------------------------------------------
+      
+    # Find jet inputs.
+    from JetRecTools.JetRecToolsConf import TCCPseudoJetGetter
+    psjget =  TCCPseudoJetGetter("TCCPseudoJetGetter_"+name)
+    psjget.InputContainer = name
+    psjget.Label = "TrackCaloCluster"
+    psjget.OutputContainer = "PseudoJetClusters"+name
+    # psjget.OutputLevel = INFO
+    psjget.SkipNegativeEnergy = True
+    ToolSvc += psjget
+    
+    # Find jets.
+    from JetRec.JetRecConf import JetFinder
+    jfind = JetFinder("JetFinder_"+name)
+    jfind.JetAlgorithm = "AntiKt"
+    jfind.JetRadius = 1.0
+    jfind.GhostArea = 0.01;
+    jfind.PtMin = 200000.0
+  #  jfind.OutputLevel = VERBOSE
+    ToolSvc += jfind
+      
+    # JetRec tool for finding.
+    jetrec = JetRecTool("JetRecTool_"+name)
+    jetrec.OutputContainer = "AntiKt10"+name+"Jets"
+    # jetrec.OutputLevel = INFO
+    jetrec.PseudoJetGetters += [psjget]
+    jetrec.JetFinder = jfind  
+    #jetrec.JetModifiers += [nsubjettiness]
+    #jetrec.JetModifiers += [nsubjettinessratios]
+    # jetrec.JetModifiers += [ktsplittingscale]
+    # jetrec.JetModifiers += [dipolarity]
+    # jetrec.JetModifiers += [angularity]
+    # jetrec.JetModifiers += [ktdr]
+    # jetrec.JetModifiers += [ktmassdrop]
+    # jetrec.JetModifiers += [planarflow]
+    # jetrec.JetModifiers += [centerofmassshapes]
+    #jetrec.JetModifiers += [energycorrelator]
+    #jetrec.JetModifiers += [energycorrelatorratios]
+    # jetrec.JetModifiers += [pull]
+    # jetrec.JetModifiers += [charge]
+    # jetrec.JetModifiers += [subjetmaker]
+    # jetrec.JetModifiers += [subjetfinder]
+    ToolSvc += jetrec
+    
+    jetPseudojetRetriever = JetPseudojetRetriever("JetPseudojetRetriever_"+name)
+    ToolSvc += jetPseudojetRetriever
+    
+    # JetRec tool for finding.    
+    jetrec_trimm = JetRecTool("JetRecTool_"+name+"Trimm")
+    jetrec_trimm.JetGroomer = groomer
+    jetrec_trimm.InputContainer  = "AntiKt10"+name+"Jets"
+    jetrec_trimm.OutputContainer = "AntiKt10"+name+"TrimmedJets"
+    jetrec_trimm.JetPseudojetRetriever = jetPseudojetRetriever
+    #jetrec_trimm.JetModifiers += [nsubjettiness]
+    #jetrec_trimm.JetModifiers += [nsubjettinessratios]
+    # jetrec_trimm.JetModifiers += [ktsplittingscale]
+    # jetrec_trimm.JetModifiers += [dipolarity]
+    # jetrec_trimm.JetModifiers += [angularity]
+    # jetrec_trimm.JetModifiers += [ktdr]
+    # jetrec_trimm.JetModifiers += [ktmassdrop]
+    # jetrec_trimm.JetModifiers += [planarflow]
+    # jetrec_trimm.JetModifiers += [centerofmassshapes]
+    #jetrec_trimm.JetModifiers += [energycorrelator]
+    #jetrec_trimm.JetModifiers += [energycorrelatorratios]
+    # jetrec_trimm.JetModifiers += [pull]
+    # jetrec_trimm.JetModifiers += [charge]
+    # jetrec_trimm.JetModifiers += [subjetmaker]
+    # jetrec_trimm.JetModifiers += [subjetfinder]
+    ToolSvc += jetrec_trimm
+      
+    # Add the algorithm. It runs the demo tools.
+    jetalg = JetAlgorithm("JetAlg_"+name)
+    # jetalg.OutputLevel = INFO
+    jetalg.Tools += [jetrec, jetrec_trimm]
+    topSequence += jetalg
+    
+  # Find jet inputs.
+  from JetRec.JetRecConf import PseudoJetGetter
+  psjget = PseudoJetGetter("PseudoJetGetter")
+  psjget.InputContainer = "TimedCaloCalTopoClusters"
+  psjget.Label = "LCTopoOrigin"
+  psjget.OutputContainer = "PseudoJetLCTopoOrigin"
+  # psjget.OutputLevel = INFO
+  psjget.SkipNegativeEnergy = True
+  ToolSvc += psjget
+  
+  psjget2 = PseudoJetGetter("cget_ghost")
+  psjget2.InputContainer = "InDetTrackParticles"
+  psjget2.Label = "GhostTrack"
+  psjget2.OutputContainer = "PseudoJetGhostTrack"
+  # psjget.OutputLevel = INFO
+  psjget2.GhostScale = 1e-40
+  ToolSvc += psjget2
+    
+  # Find jets.
+  from JetRec.JetRecConf import JetFinder
+  jfind = JetFinder("JetFinder")
+  jfind.JetAlgorithm = "AntiKt"
+  jfind.JetRadius = 1.0
+  jfind.GhostArea = 0.01;
+  jfind.PtMin = 200000.0
+  #  jfind.OutputLevel = VERBOSE
+  ToolSvc += jfind
+   
+  from JetMomentTools.JetMomentToolsConf import JetTrackSumMomentsTool
+  TrackSumMomentsTool = JetTrackSumMomentsTool(  name = "trksummoms",
+                                                 VertexContainer = "PrimaryVertices",
+                                                 AssociatedTracks = "GhostTrack",
+                                                 TrackVertexAssociation = jettva.TrackVertexAssociation,
+                                                 RequireTrackPV = True)
+  # TrackSumMomentsTool.OutputLevel = DEBUG                                               
+  ToolSvc += TrackSumMomentsTool   
+
+  # JetRec tool for finding.
+  jetrec = JetRecTool("JetRecTool")
+  jetrec.OutputContainer = "MyAntiKt10LCTopoJets"
+  # jetrec.OutputLevel = INFO
+  jetrec.PseudoJetGetters += [psjget, psjget2]
+  jetrec.JetFinder = jfind  
+  #jetrec.JetModifiers += [nsubjettiness]
+  #jetrec.JetModifiers += [nsubjettinessratios]
+  # jetrec.JetModifiers += [ktsplittingscale]
+  # jetrec.JetModifiers += [dipolarity]
+  # jetrec.JetModifiers += [angularity]
+  # jetrec.JetModifiers += [ktdr]
+  # jetrec.JetModifiers += [ktmassdrop]
+  # jetrec.JetModifiers += [planarflow]
+  # jetrec.JetModifiers += [centerofmassshapes]
+  #jetrec.JetModifiers += [energycorrelator]
+  #jetrec.JetModifiers += [energycorrelatorratios]
+  # jetrec.JetModifiers += [pull]
+  # jetrec.JetModifiers += [charge]
+  # jetrec.JetModifiers += [subjetmaker]
+  # jetrec.JetModifiers += [subjetfinder]
+  # jetrec.JetModifiers += [TrackSumMomentsTool]
+  ToolSvc += jetrec
+ 
+  from JetCalibTools.JetCalibToolsConf import JetCalibrationTool
+  calib_tool=JetCalibrationTool('JetCalibTool',JetCollection="AntiKt10LCTopoTrimmedPtFrac5SmallR20",ConfigFile='JES_MC15recommendation_FatJet_Nov2016_QCDCombinationUncorrelatedWeights.config',CalibSequence='EtaJES_JMS',IsData=False)
+  ToolSvc += calib_tool
+  print calib_tool
+    
+  jetPseudojetRetriever = JetPseudojetRetriever("JetPseudojetRetriever")
+  ToolSvc += jetPseudojetRetriever
+  
+  # JetRec tool for finding.
+  jetrec_trimm = JetRecTool("JetRecToolTrimm")
+  jetrec_trimm.JetGroomer = groomer
+  jetrec_trimm.InputContainer        = "MyAntiKt10LCTopoJets"
+  jetrec_trimm.OutputContainer       = "MyAntiKt10LCTopoTrimmedJets"
+  jetrec_trimm.JetPseudojetRetriever = jetPseudojetRetriever
+  #jetrec_trimm.JetModifiers += [nsubjettiness]
+  #jetrec_trimm.JetModifiers += [nsubjettinessratios]
+  # jetrec_trimm.JetModifiers += [ktsplittingscale]
+  # jetrec_trimm.JetModifiers += [dipolarity]
+  # jetrec_trimm.JetModifiers += [angularity]
+  # jetrec_trimm.JetModifiers += [ktdr]
+  # jetrec_trimm.JetModifiers += [ktmassdrop]
+  # jetrec_trimm.JetModifiers += [planarflow]
+  # jetrec_trimm.JetModifiers += [centerofmassshapes]
+  #jetrec_trimm.JetModifiers += [energycorrelator]
+  #jetrec_trimm.JetModifiers += [energycorrelatorratios]
+  # jetrec_trimm.JetModifiers += [pull]
+  # jetrec_trimm.JetModifiers += [charge]
+  # jetrec_trimm.JetModifiers += [subjetmaker]
+  # jetrec_trimm.JetModifiers += [subjetfinder]
+  jetrec_trimm.JetModifiers += [TrackSumMomentsTool]
+  jetrec_trimm.JetModifiers += [calib_tool]
+  ToolSvc += jetrec_trimm
+
+     
+  # Add the algorithm. It runs the demo tools.
+  jetalg = JetAlgorithm("JetAlg")
+  # jetalg.OutputLevel = INFO
+  jetalg.Tools += [jetrec, jettva, jetrec_trimm]
+  topSequence += jetalg
+
+  from MCTruthClassifier.MCTruthClassifierConf import MCTruthClassifier
+  truth_classifier_name='JetMCTruthClassifier'
+  truthClassifier = MCTruthClassifier(name = truth_classifier_name,
+                                           ParticleCaloExtensionTool="")
+  ToolSvc += truthClassifier
+
+  from ParticleJetTools.ParticleJetToolsConf import CopyTruthJetParticles
+  copytruth = CopyTruthJetParticles(name = "truthpartcopy", OutputName="JetInputTruthParticles",
+                                 MCTruthClassifier=truthClassifier)
+  ToolSvc += copytruth
+  
+  # Find jet inputs.
+  from JetRec.JetRecConf import PseudoJetGetter
+  psjget = PseudoJetGetter("PseudoTruthJetGetter")
+  psjget.InputContainer = "JetInputTruthParticles"
+  psjget.Label = "Truth"
+  psjget.OutputContainer = "PseudoJetTruth"
+  # psjget.OutputLevel = INFO
+  psjget.GhostScale = 0.0
+  psjget.SkipNegativeEnergy = True
+  ToolSvc += psjget
+
+  # Find jets.
+  jfind = JetFinder("JetFinderTruth")
+  jfind.JetAlgorithm = "AntiKt"
+  jfind.JetRadius = 1.0
+  jfind.GhostArea = 0.0;
+  jfind.PtMin = 150000.0
+  #  jfind.OutputLevel = VERBOSE
+  ToolSvc += jfind
+   
+  # JetRec tool for finding.
+  jetrec = JetRecTool("JetRecToolTruth")
+  jetrec.OutputContainer = "MyAntiKt10TruthJets"
+  # jetrec.OutputLevel = INFO
+  jetrec.PseudoJetGetters += [psjget]
+  jetrec.JetFinder = jfind  
+  #jetrec.JetModifiers += [nsubjettiness]
+  #jetrec.JetModifiers += [nsubjettinessratios]
+  # jetrec.JetModifiers += [ktsplittingscale]
+  # jetrec.JetModifiers += [dipolarity]
+  # jetrec.JetModifiers += [angularity]
+  # jetrec.JetModifiers += [ktdr]
+  # jetrec.JetModifiers += [ktmassdrop]
+  # jetrec.JetModifiers += [planarflow]
+  # jetrec.JetModifiers += [centerofmassshapes]
+  #jetrec.JetModifiers += [energycorrelator]
+  #jetrec.JetModifiers += [energycorrelatorratios]
+  # jetrec.JetModifiers += [pull]
+  # jetrec.JetModifiers += [charge]
+  # jetrec.JetModifiers += [subjetmaker]
+  # jetrec.JetModifiers += [subjetfinder]
+  # jetrec.JetModifiers += [TrackSumMomentsTool]
+  ToolSvc += jetrec
+ 
+  # JetRec tool for finding.
+  jetrec_trimm = JetRecTool("JetRecToolTruthTrimm")
+  jetrec_trimm.JetGroomer = groomer
+  jetrec_trimm.InputContainer        = "MyAntiKt10TruthJets"
+  jetrec_trimm.OutputContainer       = "MyAntiKt10TruthTrimmedJets"
+  jetrec_trimm.JetPseudojetRetriever = jetPseudojetRetriever
+  #jetrec_trimm.JetModifiers += [nsubjettiness]
+  #jetrec_trimm.JetModifiers += [nsubjettinessratios]
+  # jetrec_trimm.JetModifiers += [ktsplittingscale]
+  # jetrec_trimm.JetModifiers += [dipolarity]
+  # jetrec_trimm.JetModifiers += [angularity]
+  # jetrec_trimm.JetModifiers += [ktdr]
+  # jetrec_trimm.JetModifiers += [ktmassdrop]
+  # jetrec_trimm.JetModifiers += [planarflow]
+  # jetrec_trimm.JetModifiers += [centerofmassshapes]
+  #jetrec_trimm.JetModifiers += [energycorrelator]
+  #jetrec_trimm.JetModifiers += [energycorrelatorratios]
+  # jetrec_trimm.JetModifiers += [pull]
+  # jetrec_trimm.JetModifiers += [charge]
+  # jetrec_trimm.JetModifiers += [subjetmaker]
+  # jetrec_trimm.JetModifiers += [subjetfinder]
+  ToolSvc += jetrec_trimm
+  
+
+  # Add the algorithm. It runs the demo tools.
+  jetalg = JetAlgorithm("JetAlgTruth")
+
+  # jetalg.OutputLevel = INFO
+  jetalg.Tools += [copytruth, jetrec, jetrec_trimm]
+  topSequence += jetalg
+
+
+
+
+###end jet stuff
+
+from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
+xaodStream = MSMgr.NewPoolRootStream( "StreamAOD", "XAOD_"+Name+".pool.root" )
+# xaodStream.Stream.TakeItemsFromInput = True #this will only work for the event-by-event items. MetadataItems must still be specified
+xaodStream.AddItem("xAOD::EventInfo#*")
+xaodStream.AddItem("xAOD::EventAuxInfo#*")
+xaodStream.AddItem("xAOD::EventShape#*")
+xaodStream.AddItem("xAOD::EventShapeAuxInfo#*")
+xaodStream.AddItem("xAOD::VertexContainer#*")
+xaodStream.AddItem("xAOD::VertexAuxContainer#*")
+# xaodStream.AddItem( "xAOD::TrackCaloClusterContainer#TrackCaloClusters")
+# xaodStream.AddItem( "xAOD::TrackCaloClusterAuxContainer#TrackCaloClustersAux.")
+# xaodStream.AddItem( "xAOD::TrackCaloClusterContainer#TrackCaloClustersCombined")
+# xaodStream.AddItem( "xAOD::TrackCaloClusterAuxContainer#TrackCaloClustersCombinedAux.")
+# xaodStream.AddItem( "xAOD::TrackCaloClusterContainer#TrackCaloClustersAll")
+# xaodStream.AddItem( "xAOD::TrackCaloClusterAuxContainer#TrackCaloClustersAllAux.")
+# xaodStream.AddItem( "xAOD::TrackCaloClusterContainer#TrackCaloClustersAllTrack")
+# xaodStream.AddItem( "xAOD::TrackCaloClusterAuxContainer#TrackCaloClustersAllTrackAux.")
+xaodStream.AddItem( "xAOD::JetContainer#My*")
+xaodStream.AddItem( "xAOD::JetAuxContainer#My*")
+xaodStream.AddItem( "xAOD::JetContainer#*TrackCaloClusters*")
+xaodStream.AddItem( "xAOD::JetAuxContainer#*TrackCaloClusters*")
+# xaodStream.AddItem( "xAOD::CaloClusterContainer#*")
+# xaodStream.AddItem( "xAOD::CaloClusterAuxContainer#*")
+
+#from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties
+#pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True
+
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/share/TrackCaloClusterReco_TrackClusterInfo.py b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/share/TrackCaloClusterReco_TrackClusterInfo.py
new file mode 100644
index 0000000000000000000000000000000000000000..8af851107edcc1e38533aac2fa63251dcd83833e
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/share/TrackCaloClusterReco_TrackClusterInfo.py
@@ -0,0 +1,170 @@
+import AthenaPoolCnvSvc.ReadAthenaPool
+
+from AthenaCommon import CfgMgr
+
+##InputFiles = ["/eos/user/r/rjansky/TCCTestFiles/mc15_13TeV.301282.Pythia8EvtGen_A14NNPDF23LO_Wprime_WZqqqq_m4000.merge.AOD.e3743_s2608_s2183_r7772_r7676/AOD.08110078._000001.pool.root.1"]
+##InputFiles = ["root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/WPrime_4000/DAOD_JETM8.09331772._000001.pool.root.1"]
+#InputFiles   = ["/eos/atlas/user/r/rjansky/mc15_13TeV.301282.Pythia8EvtGen_A14NNPDF23LO_Wprime_WZqqqq_m4000.merge.AOD.e3743_s2608_s2183_r7772_r7676/AOD.08110078._000001.pool.root.1"]
+InputFiles   = ["/afs/cern.ch/user/n/ncalace/work/public/mc15_13TeV/AOD.08110078._000001.pool.root.1"]
+
+svcMgr.EventSelector.InputCollections = InputFiles
+
+# Name = Sample
+Name = "WprimeCovMatch_AllTests_TCC"
+
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+athenaCommonFlags.FilesInput = svcMgr.EventSelector.InputCollections
+
+from AthenaCommon.GlobalFlags import globalflags
+DetDescrVersion = 'ATLAS-R2-2015-03-01-00'
+globalflags.DetDescrVersion = DetDescrVersion
+
+from IOVDbSvc.CondDB import conddb
+conddb.setGlobalTag('OFLCOND-MC15c-SDR-09')
+
+print "globalflags.DetDescrVersion = ", globalflags.DetDescrVersion
+# Set up geometry and BField
+include("RecExCond/AllDet_detDescr.py")
+
+from JetRec.JetRecConf import JetAlgorithm
+from JetRecTools.JetRecToolsConf import JetConstituentModSequence, CaloClusterConstituentsOrigin, ClusterTimeCutTool
+ccco = CaloClusterConstituentsOrigin("JetConstit_LCOrigin") 
+ToolSvc += ccco
+
+ctct = ClusterTimeCutTool("JetConstit_Timecut") 
+ToolSvc += ctct
+
+PFSequence = JetConstituentModSequence("JetConstitSeq_LCOriginAndTime",
+                                       InputContainer = "CaloCalTopoClusters",
+                                       OutputContainer = "TimedCaloCalTopoClusters",
+                                       InputType = "CaloCluster",
+                                       Modifiers = [ctct, ccco],
+                                       SaveAsShallow = True)
+ToolSvc += PFSequence
+
+#Configure the extrapolator
+from TrkExTools.AtlasExtrapolator import AtlasExtrapolator
+theAtlasExtrapolator=AtlasExtrapolator("AtlasExtrapolator")
+ToolSvc += theAtlasExtrapolator
+
+from TrackCaloClusterRecTools.TrackCaloClusterRecToolsConf import ParticleToCaloExtrapolationTool
+ParticleToCaloExtrapolationTool = ParticleToCaloExtrapolationTool(name = "ParticleToCaloExtrapolationTool", 
+								  Extrapolator = theAtlasExtrapolator, 
+                                                                  ParticleType = "pion",
+                                                                  StoreParameters=True)
+# ParticleToCaloExtrapolationTool.OutputLevel = DEBUG
+ToolSvc += ParticleToCaloExtrapolationTool
+
+print ParticleToCaloExtrapolationTool
+
+from ParticlesInConeTools.ParticlesInConeToolsConf import xAOD__CaloClustersInConeTool
+CaloClustersInCone = xAOD__CaloClustersInConeTool(name = "CaloClustersInCone", 
+                                                  CaloClusterLocation = "TimedCaloCalTopoClusters")
+# CaloClustersInCone.OutputLevel = DEBUG
+ToolSvc += CaloClustersInCone
+
+print CaloClustersInCone
+
+from TrackToCalo.TrackToCaloConf import Rec__ParticleCaloClusterAssociationTool
+ParticleCaloCellAssociation = Rec__ParticleCaloClusterAssociationTool(name                      = "ParticleCaloCellAssociationInDet",
+                                                                   ParticleCaloExtensionTool    = ParticleToCaloExtrapolationTool,
+                                                                   CaloClusterLocation          = "TimedCaloCalTopoClusters",
+                                                                   ClustersInConeTool           = CaloClustersInCone,
+                                                                   ConeSize                     = 0.1,
+                                                                   UseCovariance                = True,
+                                                                   StoreParameters              = True)
+#ParticleCaloCellAssociation.OutputLevel = DEBUG
+ToolSvc+=ParticleCaloCellAssociation
+print      ParticleCaloCellAssociation
+
+# Access the algorithm sequence:
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+# Add the algorithm.
+jetalg = JetAlgorithm("JetAlg_OriginAndTime")
+#jetalg.OutputLevel = INFO
+jetalg.Tools += [PFSequence]
+topSequence += jetalg
+
+from TrackParticleAssociationAlgs.TrackParticleAssociationAlgsConf import TrackParticleClusterAssociationAlg
+TrackParticleClusterAssociation = TrackParticleClusterAssociationAlg(name = "TrackParticleClusterAssociationInDet",
+                                                                     ParticleCaloClusterAssociationTool = ParticleCaloCellAssociation,
+                                                                     TrackParticleContainerName = "InDetTrackParticles",
+                                                                     PtCut = 400.,
+                                                                     OutputCollectionPostFix = "Test",
+                                                                     CaloClusterLocation = "TimedCaloCalTopoClusters")
+#TrackParticleClusterAssociation.OutputLevel = DEBUG
+topSequence += TrackParticleClusterAssociation
+
+print TrackParticleClusterAssociation
+
+from TrackCaloClusterRecTools.TrackCaloClusterRecToolsConf import TrackCaloClusterWeightsTool
+TrackCaloClusterWeights = TrackCaloClusterWeightsTool(name                 = "TrackCaloClusterWeights")
+# TrackCaloClusterWeights.OutputLevel = VERBOSE
+ToolSvc+=TrackCaloClusterWeights
+print      TrackCaloClusterWeights
+
+loosetrackvertexassotool=CfgMgr.CP__LooseTrackVertexAssociationTool("LooseTrackVertexAssociationTool", dzSinTheta_cut=3, d0_cut=2) 
+ToolSvc+=loosetrackvertexassotool 
+
+from JetRecTools.JetRecToolsConf import TrackVertexAssociationTool
+jettva  =   TrackVertexAssociationTool( name                    = "tvassoc",
+                                        TrackParticleContainer  = "InDetTrackParticles",
+                                        TrackVertexAssociation  = "JetTrackVtxAssoc",
+                                        VertexContainer         = "PrimaryVertices",
+                                        TrackVertexAssoTool     = loosetrackvertexassotool
+                                        )
+ToolSvc+=jettva 
+print      jettva
+
+from TrackCaloClusterRecTools.TrackCaloClusterRecToolsConf import ClusterFilterTool
+clusterfiltertool = ClusterFilterTool(name                       = "clusterfiltertool",
+				      LooseTrackVertexAssoTool   = loosetrackvertexassotool,
+				      TrackParticleContainerName = "InDetTrackParticles",
+				      ConeSize                   = 0.2,
+				      PtFractionAtPV0            = 0.1,
+				      StoreParameters            = True)
+
+ToolSvc+=clusterfiltertool
+#clusterfiltertool.OutputLevel = VERBOSE
+print clusterfiltertool
+
+from TrackCaloClusterRecTools.TrackCaloClusterRecToolsConf import TrackCaloClusterCreatorTool
+TrackCaloClusterCreator = TrackCaloClusterCreatorTool(name                      = "TrackCaloClusterCreator",
+                                                      VertexContainerName       = "PrimaryVertices",
+                                                      LooseTrackVertexAssoTool  = loosetrackvertexassotool,
+                                                      ApplyClusterFilter        = False,
+                                                      ClusterFilterTool         = clusterfiltertool)
+#TrackCaloClusterCreator.OutputLevel = VERBOSE
+ToolSvc+=TrackCaloClusterCreator
+print      TrackCaloClusterCreator
+
+from TrackCaloClusterRecAlgs.TrackCaloClusterRecAlgsConf import TrackCaloClusterRecAlg
+ParticleToCaloExtrapolation = TrackCaloClusterRecAlg(name                           = "TrackCaloClusterRecAlg",
+                                                     OutputCollectionPostFix        = "Test",
+                                                     CaloClustersLocation           = "TimedCaloCalTopoClusters",
+                                                     TrackCaloClusterContainerName  = "TrackCaloClusters",
+                                                     TrackCaloClusterWeightsTool    = TrackCaloClusterWeights,
+                                                     TrackCaloClusterCreatorTool    = TrackCaloClusterCreator,
+                                                     StoreStatistics                = True )
+#ParticleToCaloExtrapolation.OutputLevel = VERBOSE
+topSequence += ParticleToCaloExtrapolation
+
+print ParticleToCaloExtrapolation
+
+theApp.EvtMax = 1000
+
+from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
+xaodStream = MSMgr.NewPoolRootStream( "StreamAOD", "XAOD_"+Name+".pool.root" )
+xaodStream.AddItem( "xAOD::CaloClusterContainer#TimedCaloCalTopoClusters")
+xaodStream.AddItem( "xAOD::ShallowAuxContainer#TimedCaloCalTopoClustersAux.")
+xaodStream.AddItem( "xAOD::TrackParticleContainer#InDetTrackParticles")
+xaodStream.AddItem( "xAOD::TrackParticleAuxContainer#InDetTrackParticlesAux.")
+xaodStream.AddItem( "xAOD::TrackCaloClusterContainer#*")
+xaodStream.AddItem( "xAOD::TrackCaloClusterAuxContainer#*")
+xaodStream.AddItem( "xAOD::TruthParticleContainer#TruthParticles")
+xaodStream.AddItem( "xAOD::TruthParticleAuxContainer#TruthParticlesAux.")
+
+ServiceMgr.MessageSvc.Format           = "% F%30W%S%7W%R%T %0W%M"
+#ServiceMgr.StoreGateSvc.Dump=True
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/src/TrackCaloClusterRecAlg.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/src/TrackCaloClusterRecAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..e84e4c68d88f683cd702b3983fec95d10a6515af
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/src/TrackCaloClusterRecAlg.cxx
@@ -0,0 +1,135 @@
+// TrackCaloClusterRecAlgs includes
+#include "TrackCaloClusterRecAlgs/TrackCaloClusterRecAlg.h"
+
+#include "TrkParametersIdentificationHelpers/TrackParametersIdHelper.h"
+#include "AtlasDetDescr/AtlasDetectorID.h"
+
+#include "xAODAssociations/TrackParticleClusterAssociationContainer.h"
+#include "xAODPFlow/TrackCaloClusterAuxContainer.h"
+
+TrackCaloClusterRecAlg::TrackCaloClusterRecAlg( const std::string& name, ISvcLocator* pSvcLocator ) : 
+  AthAlgorithm( name, pSvcLocator ),
+  m_trackCaloClusterWeightsTool("TrackCaloClusterRecTools/TrackCaloClusterWeightsTool"),
+  m_trackCaloClusterCreatorTool("TrackCaloClusterRecTools/TrackCaloClusterCreatorTool") {
+      
+    declareProperty("TrackParticleContainerName"   ,    m_trkParticleName                 = "InDetTrackParticles"   );
+    declareProperty("OutputCollectionPostFix"      ,    m_outputPostFix                   = ""                      );
+    declareProperty("CaloClustersLocation"         ,    m_caloClusters                    = "CaloCalTopoClusters"   );
+    declareProperty("TrackCaloClusterContainerName",    m_trackCaloClusterContainerName   = "TrackCaloClusters"     );
+    declareProperty("TrackCaloClusterWeightsTool"  ,    m_trackCaloClusterWeightsTool                               );
+    declareProperty("TrackCaloClusterCreatorTool"  ,    m_trackCaloClusterCreatorTool                               );
+  }
+  
+TrackCaloClusterRecAlg::~TrackCaloClusterRecAlg() {}
+  
+StatusCode TrackCaloClusterRecAlg::initialize() {
+  ATH_MSG_INFO ("Initializing " << name() << "...");    
+  ATH_CHECK(m_trackCaloClusterWeightsTool.retrieve());
+  ATH_CHECK(m_trackCaloClusterCreatorTool.retrieve());
+  return StatusCode::SUCCESS;
+}
+  
+StatusCode TrackCaloClusterRecAlg::finalize() {
+  ATH_MSG_INFO ("Finalizing " << name() << "...");  
+  return StatusCode::SUCCESS;
+}
+  
+StatusCode TrackCaloClusterRecAlg::execute() {  
+    ATH_MSG_DEBUG ("Executing " << name() << "...");
+    // Create cluster-to-tracks map
+    std::multimap <const xAOD::CaloCluster*, const xAOD::TrackParticle*> clusterToTracksMap;
+    std::map <const xAOD::TrackParticle*, FourMom_t> TrackTotalClusterPt;
+    std::map <const xAOD::CaloCluster*, FourMom_t> clusterToTracksWeightMap;
+    
+    // Combined
+    xAOD::TrackCaloClusterContainer* tccContainer = new xAOD::TrackCaloClusterContainer();
+    ATH_CHECK( evtStore()->record( tccContainer, m_trackCaloClusterContainerName + "Combined" ) );
+
+    xAOD::TrackCaloClusterAuxContainer* tccContainerAux = new xAOD::TrackCaloClusterAuxContainer();
+    ATH_CHECK( evtStore()->record( tccContainerAux, m_trackCaloClusterContainerName + "Combined" + "Aux." ) );
+    tccContainer->setStore( tccContainerAux );
+    ATH_MSG_DEBUG( "Recorded TrackCaloClusterContainer with key: " << m_trackCaloClusterContainerName + "Combined" );    
+
+    // Look at associated clusters
+    if ( !evtStore()->contains<xAOD::TrackParticleClusterAssociationContainer>( m_trkParticleName+"ClusterAssociations"+m_outputPostFix) ) {
+                ATH_MSG_WARNING ("Couldn't retrieve TrackParticleClusterAssociations with key: " << m_trkParticleName+"ClusterAssociations"+m_outputPostFix );
+                return StatusCode::SUCCESS;
+        }
+    
+    const auto associatedClusters = getContainer<xAOD::TrackParticleClusterAssociationContainer>(m_trkParticleName+"ClusterAssociations"+m_outputPostFix);
+    
+    // Look at all clusters
+    if ( !evtStore()->contains<xAOD::CaloClusterContainer>( m_caloClusters) ) {
+                ATH_MSG_WARNING ("Couldn't retrieve CaloClusterContainer with key: " << m_caloClusters );
+                return StatusCode::SUCCESS;
+        }
+    
+    const auto allClusters = getContainer<xAOD::CaloClusterContainer>(m_caloClusters);
+    
+    // Look at all tracks
+    if ( !evtStore()->contains<xAOD::TrackParticleContainer>( m_trkParticleName) ) {
+                ATH_MSG_WARNING ("Couldn't retrieve TrackParticleContainer with key: " << m_trkParticleName );
+                return StatusCode::SUCCESS;
+        }
+    
+    const auto allTracks = getContainer<xAOD::TrackParticleContainer>(m_trkParticleName);
+    
+    // Create the weights
+    m_trackCaloClusterWeightsTool->fillWeightMaps(associatedClusters, &clusterToTracksMap, &TrackTotalClusterPt, &clusterToTracksWeightMap);
+    
+    // Create Combined xAOD::TCC
+    m_trackCaloClusterCreatorTool->createCombinedTCCs(tccContainer, associatedClusters, &TrackTotalClusterPt, &clusterToTracksWeightMap);
+    
+    // Combined + Neutral
+    xAOD::TrackCaloClusterContainer* tccContainer1 = new xAOD::TrackCaloClusterContainer;
+    ATH_CHECK( evtStore()->record( tccContainer1, m_trackCaloClusterContainerName + "CombinedAndNeutral" ) );
+
+    xAOD::TrackCaloClusterAuxContainer* tccContainerAux1 = new xAOD::TrackCaloClusterAuxContainer();
+    ATH_CHECK( evtStore()->record( tccContainerAux1, m_trackCaloClusterContainerName + "CombinedAndNeutral" + "Aux." ) );
+    tccContainer1->setStore( tccContainerAux1 );
+    ATH_MSG_DEBUG( "Recorded TrackCaloClusterContainer with key: " << m_trackCaloClusterContainerName ); 
+    
+    for (xAOD::TrackCaloCluster* combined: *tccContainer) {
+      tccContainer1->push_back(new xAOD::TrackCaloCluster);
+      *tccContainer1->back() = *combined;
+    }
+    
+    // Create neutral xAOD::TCC
+    m_trackCaloClusterCreatorTool->createNeutralTCCs(tccContainer1, allClusters, &clusterToTracksWeightMap);
+    
+    // Combined + Neutral + Charged
+    xAOD::TrackCaloClusterContainer* tccContainer2 = new xAOD::TrackCaloClusterContainer;
+    ATH_CHECK( evtStore()->record( tccContainer2, m_trackCaloClusterContainerName + "All" ) );
+
+    xAOD::TrackCaloClusterAuxContainer* tccContainerAux2 = new xAOD::TrackCaloClusterAuxContainer();
+    ATH_CHECK( evtStore()->record( tccContainerAux2, m_trackCaloClusterContainerName + "All" + "Aux." ) );
+    tccContainer2->setStore( tccContainerAux2 );
+    ATH_MSG_DEBUG( "Recorded TrackCaloClusterContainer with key: " << m_trackCaloClusterContainerName + "All" ); 
+    
+    for (xAOD::TrackCaloCluster* combinedAndNeutral: *tccContainer1) {
+      tccContainer2->push_back(new xAOD::TrackCaloCluster);
+      *tccContainer2->back() = *combinedAndNeutral;
+    }
+    
+    // Create trackonly xAOD::TCC
+    m_trackCaloClusterCreatorTool->createChargedTCCs(tccContainer2, allTracks, &TrackTotalClusterPt);
+    
+    // Combined + Charged
+    xAOD::TrackCaloClusterContainer* tccContainer3 = new xAOD::TrackCaloClusterContainer;
+    ATH_CHECK( evtStore()->record( tccContainer3, m_trackCaloClusterContainerName + "CombinedAndCharged" ) );
+
+    xAOD::TrackCaloClusterAuxContainer* tccContainerAux3 = new xAOD::TrackCaloClusterAuxContainer();
+    ATH_CHECK( evtStore()->record( tccContainerAux3, m_trackCaloClusterContainerName + "CombinedAndCharged" + "Aux." ) );
+    tccContainer3->setStore( tccContainerAux3 );
+    ATH_MSG_DEBUG( "Recorded TrackCaloClusterContainer with key: " << m_trackCaloClusterContainerName + "AllTrack" ); 
+    
+    for (xAOD::TrackCaloCluster* combined: *tccContainer) {
+      tccContainer3->push_back(new xAOD::TrackCaloCluster);
+      *tccContainer3->back() = *combined;
+    }
+    
+    // Create trackonly xAOD::TCC
+    m_trackCaloClusterCreatorTool->createChargedTCCs(tccContainer3, allTracks, &TrackTotalClusterPt);
+    
+  return StatusCode::SUCCESS;
+}
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/src/components/TrackCaloClusterRecAlgs_entries.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/src/components/TrackCaloClusterRecAlgs_entries.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..310d103f3f5ccd2f96c6cf5b6d66cead009b68f5
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/src/components/TrackCaloClusterRecAlgs_entries.cxx
@@ -0,0 +1,11 @@
+#include "GaudiKernel/DeclareFactoryEntries.h"
+
+#include "TrackCaloClusterRecAlgs/TrackCaloClusterRecAlg.h"
+
+DECLARE_ALGORITHM_FACTORY(TrackCaloClusterRecAlg)
+
+    
+DECLARE_FACTORY_ENTRIES(TrackCaloClusterRecAlgs)
+{
+  DECLARE_ALGORITHM(TrackCaloClusterRecAlg)      
+}
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/src/components/TrackCaloClusterRecAlgs_load.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/src/components/TrackCaloClusterRecAlgs_load.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..41254fc6c5c639f870bd5f1e506236f3ab1f1eb0
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecAlgs/src/components/TrackCaloClusterRecAlgs_load.cxx
@@ -0,0 +1,3 @@
+#include "GaudiKernel/LoadFactoryEntries.h"
+
+LOAD_FACTORY_ENTRIES(TrackCaloClusterRecAlgs)
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces/CMakeLists.txt b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..15996af476bac7018354c26acc1ba9a10f7f556f
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces/CMakeLists.txt
@@ -0,0 +1,17 @@
+################################################################################
+# Package: TrackCaloClusterRecInterfaces
+################################################################################
+
+# Declare the package name:
+atlas_subdir( TrackCaloClusterRecInterfaces )
+
+# Declare the package's dependencies:
+atlas_depends_on_subdirs( PUBLIC
+                          GaudiKernel
+                          Event/xAOD/xAODBase
+                          Event/xAOD/xAODCaloEvent
+                          Tracking/TrkEvent/TrkCaloExtension
+                          Tracking/TrkEvent/TrkEventPrimitives )
+
+# Install files from the package:
+atlas_install_headers( TrackCaloClusterRecInterfaces )
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces/TrackCaloClusterRecInterfaces/IClusterFilterTool.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces/TrackCaloClusterRecInterfaces/IClusterFilterTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..58c009deb15cda26d2d53550cdc9bf3851664927
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces/TrackCaloClusterRecInterfaces/IClusterFilterTool.h
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////
+// IClusterFilterTool.h, (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECINTERFACES_ICLUSTERFILTERTOOL_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECINTERFACES_ICLUSTERFILTERTOOL_H
+
+#include "GaudiKernel/IAlgTool.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+
+static const InterfaceID IID_IClusterFilterTool("IClusterFilterTool", 1, 0);
+
+/** @brief Interface for extending Particles with calo intersections */
+class IClusterFilterTool : virtual public IAlgTool {
+  public:
+    
+    /** Method to check if a given cluster has to be rejected or not
+     *  based on primary vertices requirements
+     *  @param CaloCluster   reference to the cluster
+     *  @return true if the cluster has been rejected
+     * 
+     */
+    
+    virtual bool rejectCluster(const xAOD::CaloCluster& cluster) = 0;
+    
+    static const InterfaceID& interfaceID( ) ;
+};
+
+inline const InterfaceID& IClusterFilterTool::interfaceID() {
+  return IID_IClusterFilterTool; 
+}
+
+#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECINTERFACES_ICLUSTERFILTERTOOL_H
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces/TrackCaloClusterRecInterfaces/IParticleExtrapolationTool.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces/TrackCaloClusterRecInterfaces/IParticleExtrapolationTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..b06791128835c9b83fa3d01c6c772f85d7764a92
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces/TrackCaloClusterRecInterfaces/IParticleExtrapolationTool.h
@@ -0,0 +1,38 @@
+///////////////////////////////////////////////////////////////////
+// IParticleExtrapolationTool.h, (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECINTERFACES_IPARTICLEEXTRAPOLATIONTOOL_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECINTERFACES_IPARTICLEEXTRAPOLATIONTOOL_H
+
+#include "GaudiKernel/IAlgTool.h"
+#include "xAODBase/IParticle.h"
+#include "TrkCaloExtension/CaloExtension.h"
+#include "TrkEventPrimitives/ParticleHypothesis.h" 
+
+static const InterfaceID IID_IParticleExtrapolationTool("IParticleExtrapolationTool", 1, 0);
+
+/** @brief Interface for extending Particles with calo intersections */
+class IParticleExtrapolationTool : virtual public IAlgTool {
+  public:
+    
+    /** Method to dress a IParticle with the calo layers crossed by its track
+     *  Tracks are decorated using the calo layer index and the intersection
+     *  @param IParticle     reference to the particle
+     *  @param extension     reference to a pointer to a CaloExtesion, will be updated if call is successfull
+     *                       NEVER delete the pointer, you will cause a crash! 
+     *  @return true if the call was successful
+     * 
+     */
+    
+    virtual bool particleToCaloExtrapolate( const xAOD::IParticle& particle, const Trk::CaloExtension*& extension) const = 0;
+    
+    virtual Trk::CaloExtension* caloExtension( const Trk::TrackParameters& startPars, Trk::PropDirection propDir, Trk::ParticleHypothesis particleType ) const =0;
+  
+    static const InterfaceID& interfaceID( ) ;
+};
+
+inline const InterfaceID& IParticleExtrapolationTool::interfaceID() {
+  return IID_IParticleExtrapolationTool; 
+}
+
+#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECINTERFACES_IPARTICLEEXTRAPOLATIONTOOL_H
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/CMakeLists.txt b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..2fdeab782e9f5847d69f100198c7c80cfbe3e7bf
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/CMakeLists.txt
@@ -0,0 +1,51 @@
+################################################################################
+# Package: TrackCaloClusterRecTools
+################################################################################
+
+# Declare the package name:
+atlas_subdir( TrackCaloClusterRecTools )
+
+# Declare the package's dependencies:
+atlas_depends_on_subdirs( PUBLIC
+                          DetectorDescription/GeoPrimitives
+                          GaudiKernel
+                          Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecInterfaces                         
+                          Tracking/TrkEvent/TrkCaloExtension
+                          Tracking/TrkEvent/TrkParametersIdentificationHelpers
+                          PRIVATE
+                          Control/AthenaBaseComps
+                          DetectorDescription/AtlasDetDescr
+                          Event/FourMomUtils
+                          Event/xAOD/xAODMuon
+                          Event/xAOD/xAODTracking
+                          Event/xAOD/xAODTruth
+                          Event/xAOD/xAODPFlow
+                          Event/xAOD/xAODAssociations
+                          Tracking/TrkDetDescr/TrkSurfaces
+                          Tracking/TrkEvent/TrkEventPrimitives
+                          Tracking/TrkEvent/TrkParameters
+                          Tracking/TrkEvent/TrkTrack
+                          Tracking/TrkExtrapolation/TrkExInterfaces
+                          InnerDetector/InDetRecTools/TrackVertexAssociationTool
+                          )
+
+# External dependencies:
+find_package( Eigen )
+
+# Component(s) in the package:
+atlas_add_library( TrackCaloClusterRecToolsLib
+                   src/*.cxx
+                   PUBLIC_HEADERS TrackCaloClusterRecTools
+                   INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${EIGEN_LIBRARIES} GaudiKernel TrkCaloExtension TrkParametersIdentificationHelpers 
+                   PRIVATE_LINK_LIBRARIES AthenaBaseComps AtlasDetDescr FourMomUtils xAODMuon xAODTracking xAODTruth 
+                   xAODPFlow xAODAssociations TrkSurfaces TrkEventPrimitives TrkParameters TrkTrack 
+                   TrkExInterfaces TrackVertexAssociationToolLib)
+
+atlas_add_component( TrackCaloClusterRecTools
+                     src/components/*.cxx
+                     INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${EIGEN_LIBRARIES} GaudiKernel TrkCaloExtension TrkParametersIdentificationHelpers 
+                     AthenaBaseComps AtlasDetDescr xAODMuon xAODTracking xAODTruth xAODPFlow xAODAssociations 
+                     TrkSurfaces TrkEventPrimitives TrkParameters TrkTrack TrkExInterfaces TrackVertexAssociationToolLib 
+                     TrackCaloClusterRecToolsLib )
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/ClusterFilterTool.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/ClusterFilterTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..80dd3f7bb31ca045d837897430316c15933cc8b6
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/ClusterFilterTool.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+ClusterFilterTool.h  -  Description
+-------------------
+begin   : February 2017
+authors : Noemi Calace
+***************************************************************************/
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_CLUSTERFILTERTOOL_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_CLUSTERFILTERTOOL_H
+
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+
+#include "TrackCaloClusterRecInterfaces/IClusterFilterTool.h"
+#include "TrackVertexAssociationTool/ITrackVertexAssociationTool.h"
+
+class ClusterFilterTool : virtual public IClusterFilterTool, public AthAlgTool {
+  public:
+    ClusterFilterTool(const std::string&,const std::string&,const IInterface*);
+    virtual ~ClusterFilterTool();
+
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
+
+    /** Method to check if a given cluster has to be rejected or not
+     *  based on primary vertices requirements
+     *  @param CaloCluster   reference to the cluster
+     *  @return true if the cluster has been rejected
+     * 
+     */
+    bool rejectCluster(const xAOD::CaloCluster& cluster) final;
+    
+  private:    
+    // Get a data container; implementation at end of this header file
+    template<class T> const T* getContainer( const std::string & containerName);
+  
+    std::string m_caloEntryMapName;
+    
+    ToolHandle<CP::ITrackVertexAssociationTool> m_loosetrackvertexassoTool;
+    
+    std::string m_trackParticleCollectionName;
+    std::string m_vertexCollectionName;
+    
+    // cone size value
+    double m_coneSize;
+    
+    // pt fraction at PV0
+    double m_ptFractionPV0;
+
+};
+
+template<class T>
+inline const T* ClusterFilterTool::getContainer(const std::string & containerName){
+  const T * ptr = evtStore()->retrieve< const T >( containerName );
+  if (!ptr) {
+    ATH_MSG_WARNING("Container '"<<containerName<<"' could not be retrieved");
+  }
+  return ptr;
+}
+
+
+#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_CLUSTERFILTERTOOL_H
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/IParticleToCaloExtensionMap.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/IParticleToCaloExtensionMap.h
new file mode 100644
index 0000000000000000000000000000000000000000..4484bd734fd2042e9261789ac7517569fc1287c8
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/IParticleToCaloExtensionMap.h
@@ -0,0 +1,30 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_IPARTICLETOCALEXTENSIONMAP_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_IPARTICLETOCALEXTENSIONMAP_H
+
+#include "xAODTracking/TrackParticle.h"
+
+#include "StoreGate/StoreGateSvc.h"
+
+class IParticleToCaloExtensionMap {
+ public:
+  IParticleToCaloExtensionMap();
+  ~IParticleToCaloExtensionMap();
+  
+  void addEntry(const xAOD::IParticle* particle, const Trk::TrackParameters* extension);
+  const Trk::TrackParameters*  readCaloEntry(const xAOD::IParticle* particle) const;
+  unsigned int size() const;
+
+ private :
+  std::map<const xAOD::IParticle*, const Trk::TrackParameters* > m_caloExtensionMap;
+
+};
+
+#include "SGTools/CLASS_DEF.h"
+CLASS_DEF( IParticleToCaloExtensionMap , 221362399 , 1 )
+
+#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_IPARTICLETOCALEXTENSIONMAP_H
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/ParticleToCaloExtrapolationTool.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/ParticleToCaloExtrapolationTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..e36b3d4020da6a0267140bbd0ada601043a1d82a
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/ParticleToCaloExtrapolationTool.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+ParticleToCaloExtrapolationTool.h  -  Description
+-------------------
+begin   : February 2017
+authors : Noemi Calace
+***************************************************************************/
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_PARTICLETOCALOEXTRAPOLATIONTOOL_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_PARTICLETOCALOEXTRAPOLATIONTOOL_H
+
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
+#define private public
+#include "xAODTracking/TrackParticle.h"
+#define public private
+#include "TrackCaloClusterRecInterfaces/IParticleExtrapolationTool.h"
+#include "TrkEventPrimitives/ParticleHypothesis.h" 
+#include "xAODTracking/NeutralParticle.h"
+#include "xAODTruth/TruthParticle.h"
+
+class AtlasDetectorID;
+
+namespace Trk {
+  class IExtrapolator;
+  class CaloExtension;
+}
+
+class ParticleToCaloExtrapolationTool : virtual public IParticleExtrapolationTool, public AthAlgTool {
+  public:
+    ParticleToCaloExtrapolationTool(const std::string&,const std::string&,const IInterface*);
+    virtual ~ParticleToCaloExtrapolationTool();
+
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
+
+    /** Method to dress a IParticle with the calo layers crossed by its track
+     *  Tracks are decorated using the calo layer index and the intersection
+     *  @param IParticle     reference to the particle
+     *  @param extension     reference to a pointer to a CaloExtesion, will be updated if call is successfull
+     *                       NEVER delete the pointer, you will cause a crash! 
+     *  @param useCaching    configure whether the tool caches the result on the track particle
+     *                       The default behavior is 'true' to ensure optimal performance
+     *  @return true if the call was successful
+     * 
+     */
+    bool particleToCaloExtrapolate( const xAOD::IParticle& particle, const Trk::CaloExtension*& extension) const final;
+    Trk::CaloExtension* caloExtension( const Trk::TrackParameters& startPars, Trk::PropDirection propDir, Trk::ParticleHypothesis particleType ) const;
+    
+  private:    
+    const xAOD::TrackParticle* getTrackParticle(const xAOD::IParticle& particle ) const;
+    Trk::CaloExtension* particleToCaloExtrapolate( const xAOD::TruthParticle& particle ) const;
+    Trk::CaloExtension* particleToCaloExtrapolate( const xAOD::NeutralParticle& particle ) const;
+    Trk::CaloExtension* particleToCaloExtrapolate( const xAOD::TrackParticle& particle ) const;
+
+    const AtlasDetectorID*            m_detID;
+    ToolHandle< Trk::IExtrapolator >  m_extrapolator;
+    Trk::ParticleHypothesis           m_particleType;
+    std::string                       m_particleTypeName;
+    std::string                       m_containerName;
+    
+};
+
+#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_PARTICLETOCALOEXTRAPOLATIONTOOL_H
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/TrackCaloClusterCreatorTool.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/TrackCaloClusterCreatorTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..474f1119e309bad3b470dcdd089de8bce2f519e0
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/TrackCaloClusterCreatorTool.h
@@ -0,0 +1,82 @@
+/***************************************************************************
+TrackCaloClusterCreatorTool.h  -  Description
+-------------------
+begin   : March 2017
+authors : Roland Jansky
+***************************************************************************/
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_TRACKCALOCLUSTERCREATORTOOL_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_TRACKCALOCLUSTERCREATORTOOL_H
+
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ToolHandle.h" //included under assumption you'll want to use some tools! Remove if you don't!
+#include "xAODPFlow/TrackCaloClusterContainer.h"
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODAssociations/TrackParticleClusterAssociationContainer.h"
+
+#include "TrackVertexAssociationTool/ITrackVertexAssociationTool.h"
+
+#include "TrackCaloClusterRecInterfaces/IClusterFilterTool.h"
+
+class TrackCaloClusterCreatorTool : public AthAlgTool {
+  public:
+    TrackCaloClusterCreatorTool(const std::string&,const std::string&,const IInterface*);
+    virtual ~TrackCaloClusterCreatorTool();
+
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
+    
+    /// Definition of the 4-momentum type.
+    typedef xAOD::IParticle::FourMom_t FourMom_t;
+
+    /** Method to calculate weights for TCC
+     */
+    void createCombinedTCCs(xAOD::TrackCaloClusterContainer* tccContainer, 
+			    const xAOD::TrackParticleClusterAssociationContainer* assocContainer, 
+			    std::map <const xAOD::TrackParticle*, FourMom_t>* TrackTotalClusterPt, 
+			    std::map <const xAOD::CaloCluster*, FourMom_t>* clusterToTracksWeightMap    );
+    
+    void createNeutralTCCs(xAOD::TrackCaloClusterContainer* tccContainer,
+			   const xAOD::CaloClusterContainer* assocContainer,
+			   std::map <const xAOD::CaloCluster*, FourMom_t>* clusterToTracksWeightMap    );
+    
+    void createChargedTCCs(xAOD::TrackCaloClusterContainer* tccContainer,
+			   const xAOD::TrackParticleContainer* assocContainer, 
+			   std::map <const xAOD::TrackParticle*, FourMom_t>* TrackTotalClusterPt   );
+   
+  private:  
+    
+    void computeVertexCorr(double& eta, double& phi, const Amg::Vector3D& vertex, double radius);
+    
+//     double DetectorEta(const xAOD::CaloCluster& cluster, const Amg::Vector3D& vertex);
+    
+    // ToolHandle<IJetFromPseudojet> m_bld;  // Tool to build jets.
+    ToolHandle<CP::ITrackVertexAssociationTool> m_loosetrackvertexassoTool;
+    
+    /// Vertex container's name
+    std::string m_vertexContname;
+    
+    /// Particle to CaloEntry container name
+    std::string m_caloEntryMapName;
+    
+    /// use cluster energy or pt?
+    bool m_useEnergy;
+    
+    // enable origin correction
+    bool m_doOriginCorrection;
+    bool m_storeCorrectedPosition;
+    
+    // enable cluster filtering on the neutralOnly collection
+    bool m_applyFilter;
+    ToolHandle<IClusterFilterTool> m_clusterFilterTool;
+    
+    // this is saving the detector eta to be used in calibration
+    // --> For charged and combined TCC this is using eta of the extrapolated position at the calo entry
+    //     in the ATLAS global frame, i.e. origin (0., 0., 0.)
+    // --> For neutral TCC this is evaluated using the cluster moment CaloCluster::CENTER_MAG
+    //     inverting what is done for CaloVertexedTopoCluster objects
+    bool m_saveDetectorEta;
+    
+};
+
+
+#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_TRACKCALOCLUSTERCREATORTOOL_H
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/TrackCaloClusterWeightsTool.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/TrackCaloClusterWeightsTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..0f64364ce43dd21f9279a095ed98749dd7f592e6
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/TrackCaloClusterRecTools/TrackCaloClusterWeightsTool.h
@@ -0,0 +1,38 @@
+/***************************************************************************
+TrackCaloClusterWeightsTool.h  -  Description
+-------------------
+begin   : March 2017
+authors : Roland Jansky
+***************************************************************************/
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_TRACKCALOCLUSTERWEIGHTSTOOL_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_TRACKCALOCLUSTERWEIGHTSTOOL_H
+
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "xAODPFlow/TrackCaloCluster.h"
+#include "xAODTracking/TrackParticle.h"
+#include "xAODAssociations/TrackParticleClusterAssociationContainer.h"
+
+class TrackCaloClusterWeightsTool : public AthAlgTool {
+  public:
+    TrackCaloClusterWeightsTool(const std::string&,const std::string&,const IInterface*);
+    virtual ~TrackCaloClusterWeightsTool();
+
+    virtual StatusCode initialize();
+    virtual StatusCode finalize();
+    
+    /// Definition of the 4-momentum type.
+    typedef xAOD::IParticle::FourMom_t FourMom_t;
+
+    /** Method to calculate weights for TCC
+     */
+    void fillWeightMaps(const xAOD::TrackParticleClusterAssociationContainer* assocContainer, std::multimap <const xAOD::CaloCluster*, const xAOD::TrackParticle*>* clusterToTracksMap, std::map <const xAOD::TrackParticle*, FourMom_t>* TrackTotalClusterPt, std::map <const xAOD::CaloCluster*, FourMom_t>* clusterToTracksWeightMap    );
+   
+  private:    
+
+    /// use cluster energy or pt?
+    bool m_useEnergy;
+
+};
+
+
+#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECTOOLS_TRACKCALOCLUSTERWEIGHTSTOOL_H
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/ClusterFilterTool.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/ClusterFilterTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ad63165acdfcc8ef816dbfdde82989ac989ed72b
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/ClusterFilterTool.cxx
@@ -0,0 +1,95 @@
+#include "TrackCaloClusterRecTools/ClusterFilterTool.h"
+#include "TrackCaloClusterRecTools/IParticleToCaloExtensionMap.h"
+
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODTracking/VertexContainer.h"
+
+#include "FourMomUtils/P4Helpers.h"
+
+ClusterFilterTool::ClusterFilterTool(const std::string& t, const std::string& n, const IInterface*  p )
+  : AthAlgTool(t,n,p),
+  m_caloEntryMapName("ParticleToCaloExtensionMap"),
+  m_loosetrackvertexassoTool("LooseTrackVertexAssociationTool")
+{
+  declareInterface<IClusterFilterTool>(this);
+  declareProperty("LooseTrackVertexAssoTool",         m_loosetrackvertexassoTool                              );
+  declareProperty("ParticleCaloEntryMapName",         m_caloEntryMapName                                      );
+  declareProperty("TrackParticleContainerName",       m_trackParticleCollectionName = "InDetTrackParticles"   );
+  declareProperty("VertexCollection",                 m_vertexCollectionName        = "PrimaryVertices"       );
+  declareProperty("ConeSize",                         m_coneSize                    = 0.2                     );
+  declareProperty("PtFractionAtPV0",                  m_ptFractionPV0               = 0.1                     );
+}
+
+ClusterFilterTool::~ClusterFilterTool() {}
+
+StatusCode ClusterFilterTool::initialize() {
+  ATH_MSG_INFO ("Initializing " << name() << "...");
+  ATH_CHECK(m_loosetrackvertexassoTool.retrieve());
+  return StatusCode::SUCCESS;
+}
+
+StatusCode ClusterFilterTool::finalize() {
+  ATH_MSG_INFO ("Finalizing " << name() << "...");
+  return StatusCode::SUCCESS;
+}
+
+bool ClusterFilterTool::rejectCluster(const xAOD::CaloCluster& cluster) {
+      
+  // loop on all the tracks
+  const auto allTracks   = getContainer<xAOD::TrackParticleContainer>(m_trackParticleCollectionName);
+  if (not allTracks) {
+    ATH_MSG_DEBUG ("No rejection applied... returning");
+    return false;
+  }
+  
+  const auto allVertices = getContainer<xAOD::VertexContainer>(m_vertexCollectionName);
+  if (not allVertices) {
+    ATH_MSG_DEBUG ("No rejection applied... returning");
+    return false;
+  }  
+  
+  bool matchedPV0 = false;
+  bool matchedPVX  = false;
+  double pt_PV0 = 0.;
+  double pt_PVX = 0.;
+      
+  for (const auto& track : *allTracks) {
+    // check compatibility with PVX where X>0
+    // retrieve the caloExtensionContainer to get the track position at the calo entrance
+    IParticleToCaloExtensionMap * caloExtensionMap = 0;
+    if(evtStore()->retrieve(caloExtensionMap,m_caloEntryMapName).isFailure())
+      ATH_MSG_WARNING( "Unable to retrieve " << m_caloEntryMapName << " will leak the ParticleCaloExtension" );
+    const Trk::TrackParameters* pars = caloExtensionMap->readCaloEntry(track);
+    if (not pars) {
+      ATH_MSG_DEBUG( "Extrapolated parameters non existing --> No rejection applied... returning" );
+      continue;
+    }
+    
+    float eta = pars->position().eta();     
+    float phi = pars->position().phi();
+    
+    float dPhi = P4Helpers::deltaPhi( cluster.phi(), phi);
+    float dEta = cluster.eta()-eta;
+    float dr2  = dPhi*dPhi+ dEta*dEta;
+        
+    // check if the track is matching the cluster
+    if (dr2<m_coneSize*m_coneSize) {      
+      if (allVertices && allVertices->size()!=0) {
+	if (m_loosetrackvertexassoTool->isCompatible(*track, *(allVertices->at(0)))) {
+	  ATH_MSG_DEBUG ("PV0 is matched");
+	  matchedPV0 = true;
+	  pt_PV0 +=track->pt();
+	} else matchedPVX = true;
+	pt_PVX+=track->pt();
+      } else {
+	ATH_MSG_WARNING ("Vertex container " << m_vertexCollectionName << " is empty! Can't perform TVA! --> No rejection applied... returning");
+	return false;
+      }
+    }
+  }
+      
+  if (not matchedPV0 and matchedPVX) return true;
+ 
+  return false;
+  
+}
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/IParticleToCaloExtensionMap.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/IParticleToCaloExtensionMap.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a9d06729c9d374cbccc61a7b90738222d5475630
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/IParticleToCaloExtensionMap.cxx
@@ -0,0 +1,26 @@
+#include "TrackCaloClusterRecTools/IParticleToCaloExtensionMap.h"
+
+IParticleToCaloExtensionMap::IParticleToCaloExtensionMap() {
+  m_caloExtensionMap.clear();
+}
+
+IParticleToCaloExtensionMap::~IParticleToCaloExtensionMap() {
+  m_caloExtensionMap.clear();
+}
+
+void IParticleToCaloExtensionMap::addEntry(const xAOD::IParticle* particle, const Trk::TrackParameters* caloEntry) {
+  m_caloExtensionMap.insert( std::pair<const xAOD::IParticle*, const Trk::TrackParameters*>(particle, caloEntry) );  
+}
+
+const Trk::TrackParameters*  IParticleToCaloExtensionMap::readCaloEntry(const xAOD::IParticle* particle) const
+{
+  auto pos = m_caloExtensionMap.find(particle);
+  if (pos == m_caloExtensionMap.end())
+    return 0;
+  else
+    return pos->second;
+}
+
+unsigned int IParticleToCaloExtensionMap::size() const {
+  return m_caloExtensionMap.size();
+}
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/ParticleToCaloExtrapolationTool.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/ParticleToCaloExtrapolationTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b62d3b9205074e2e0bbdd3461acd03cb5a481c26
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/ParticleToCaloExtrapolationTool.cxx
@@ -0,0 +1,254 @@
+#include "TrackCaloClusterRecTools/ParticleToCaloExtrapolationTool.h"
+// forward declares
+#include "TrkSurfaces/PerigeeSurface.h"
+#include "TrkTrack/TrackStateOnSurface.h"
+#define private public
+#include "TrkParameters/TrackParameters.h"
+#include "TrkExInterfaces/IExtrapolator.h"
+#include "TrkCaloExtension/CaloExtension.h"
+#include "TrkCaloExtension/CaloExtensionCollection.h"
+#define public private 
+#include "xAODTracking/TrackingPrimitives.h"
+#include "AtlasDetDescr/AtlasDetectorID.h"
+#include "TrkParametersIdentificationHelpers/TrackParametersIdHelper.h"
+#include "xAODTruth/TruthVertex.h"
+#include "xAODMuon/Muon.h"
+
+
+ParticleToCaloExtrapolationTool::ParticleToCaloExtrapolationTool(const std::string& t, const std::string& n, const IInterface*  p )
+  : AthAlgTool(t,n,p),
+    m_detID(nullptr),
+    m_extrapolator("Trk::Extrapolator/AtlasExtrapolator"),
+    m_particleType(Trk::muon)
+{
+
+  declareInterface<IParticleExtrapolationTool>(this);
+  declareProperty("Extrapolator",        m_extrapolator );
+  declareProperty("ParticleType",        m_particleTypeName = "pion" );
+}
+
+ParticleToCaloExtrapolationTool::~ParticleToCaloExtrapolationTool() {}
+
+StatusCode ParticleToCaloExtrapolationTool::initialize() {
+  /* Retrieve track extrapolator from ToolService */
+  ATH_CHECK(detStore()->retrieve(m_detID, "AtlasID" ));
+  ATH_CHECK( m_extrapolator.retrieve() );
+
+  if( m_particleTypeName == "nonInteracting" ) m_particleType = Trk::nonInteracting;
+  else if( m_particleTypeName == "muon" )      m_particleType = Trk::muon;
+  else if( m_particleTypeName == "pion" )      m_particleType = Trk::pion;
+  else ATH_MSG_WARNING("Unsupported particle type, using muon " << m_particleTypeName );
+  ATH_MSG_INFO(" Using particle type " << m_particleTypeName << " enum value " << m_particleType );
+     
+  return StatusCode::SUCCESS;
+}
+
+StatusCode ParticleToCaloExtrapolationTool::finalize() {
+  return StatusCode::SUCCESS;
+}
+
+const xAOD::TrackParticle* ParticleToCaloExtrapolationTool::getTrackParticle(const xAOD::IParticle& particle ) const {
+
+  const xAOD::TrackParticle* trackParticle = dynamic_cast< const xAOD::TrackParticle*>(&particle);
+  if( trackParticle ) return trackParticle;
+
+  const xAOD::Muon* muon = dynamic_cast< const xAOD::Muon*>(&particle);
+  if( muon && muon->primaryTrackParticle() ) return muon->primaryTrackParticle();
+  return nullptr;
+}
+
+bool ParticleToCaloExtrapolationTool::particleToCaloExtrapolate( const xAOD::IParticle& particle, const Trk::CaloExtension*& theExtension) const {
+  
+  // reset input
+  theExtension = 0;
+
+  // ATH_MSG_DEBUG(" caloExtension: ptr " << &particle );
+  
+  // work out the type of particle and get the extension
+  const xAOD::TrackParticle* trackParticle = getTrackParticle(particle);
+  if( trackParticle ) theExtension = particleToCaloExtrapolate(*trackParticle);
+  else{
+    const xAOD::NeutralParticle* neutralParticle = dynamic_cast< const xAOD::NeutralParticle*>(&particle);
+    if( neutralParticle ) theExtension = particleToCaloExtrapolate(*neutralParticle);
+    else{
+      const xAOD::TruthParticle* truthParticle = dynamic_cast< const xAOD::TruthParticle*>(&particle);
+      if( truthParticle ) theExtension = particleToCaloExtrapolate(*truthParticle);
+      else{
+        ATH_MSG_WARNING("Unsupported IParticle type");
+        return false;
+      }
+    }
+  }
+
+  // return false is extension failed
+  return theExtension != nullptr;
+}
+
+Trk::CaloExtension* ParticleToCaloExtrapolationTool::particleToCaloExtrapolate( const xAOD::TruthParticle& particle ) const {
+
+  // get particle type
+  Trk::ParticleHypothesis                particleType = Trk::muon; //nonInteracting;
+  if( abs(particle.pdgId()) == 11 )      particleType = Trk::muon;   // we dont want the electron to loose energy when extrpolating in the calo
+  else if( abs(particle.pdgId()) == 13 ) particleType = Trk::muon;
+
+  // get start parameters
+  const xAOD::TruthVertex* pvtx = particle.prodVtx();
+  if ( pvtx == 0 ) return nullptr;
+
+  double charge = particle.charge();
+  Amg::Vector3D  pos( pvtx->x() , pvtx->y() , pvtx->z() );
+  Amg::Vector3D  mom( particle.px() , particle.py() , particle.pz() );
+
+  // hack, extrapolate neutral particles as infinit momentum for the time being
+  if( particle.isNeutral() ){
+    charge = 1.;
+    mom.normalize();
+    mom *= 1e10;
+  }
+  Trk::CurvilinearParameters startPars(pos,mom,charge);
+
+  // get extension
+  return caloExtension( startPars, Trk::alongMomentum, particleType );
+}
+
+Trk::CaloExtension* ParticleToCaloExtrapolationTool::particleToCaloExtrapolate( const xAOD::NeutralParticle& particle ) const {
+
+  float d0     = particle.d0();
+  float z0     = particle.z0();
+  float phi    = particle.phi0();
+  float theta  = particle.theta();
+  float oneOverP = particle.oneOverP();
+  
+  float vx = 0.;
+  float vy = 0.;
+  float vz = particle.vz();
+  
+  // Building the perigee
+  Trk::NeutralPerigee* perigee = new Trk::NeutralPerigee(d0, z0, phi, theta, oneOverP, Trk::PerigeeSurface(Amg::Vector3D(vx, vy, vz)));
+  
+  double charge = 1.;
+  Amg::Vector3D  pos( perigee->position() );
+  Amg::Vector3D  mom( perigee->momentum() );
+  delete perigee;
+  // hack, extrapolate neutral particles as infinit momentum for the time being
+  mom.normalize();
+  mom *= 1e10;
+  Trk::CurvilinearParameters startPars(pos,mom,charge);
+
+  // get extension
+  return caloExtension( startPars, Trk::alongMomentum, Trk::muon );
+}
+
+Trk::CaloExtension* ParticleToCaloExtrapolationTool::particleToCaloExtrapolate( const xAOD::TrackParticle& particle ) const {
+
+  Trk::ParticleHypothesis particleType = m_particleType;
+  bool idExit = true;
+
+  const Trk::TrackParameters* startPar = nullptr;
+
+  
+  if (particle.isAvailable<std::vector<float> >( "definingParametersCovMatrix" ) and 
+      particle.isAvailable<float>( "vx" ) and particle.isAvailable<float>( "vy" ) ) {
+    startPar = &particle.perigeeParameters();
+  } else {
+    float d0     = particle.d0();
+    float z0     = particle.z0();
+    float phi    = particle.phi0();
+    float theta  = particle.theta();
+    float qOverP = particle.qOverP();
+    
+    float vx = 0.;
+    float vy = 0.;
+    float vz = particle.vz();
+    
+    // Building the perigee
+    startPar = new Trk::Perigee(d0, z0, phi, theta, qOverP, Trk::PerigeeSurface(Amg::Vector3D(vx, vy, vz)));
+  }
+
+  if(fabs(startPar->position().z())>6700.) idExit = false; 
+  if(startPar->position().perp()>4200.) idExit = false; 
+  Trk::PropDirection propDir = idExit ? Trk::alongMomentum : Trk::oppositeMomentum;
+  Trk::CaloExtension* extension = caloExtension(*startPar,propDir,particleType);
+ 
+  return extension;
+}
+
+
+Trk::CaloExtension* ParticleToCaloExtrapolationTool::caloExtension( const Trk::TrackParameters& startPars, Trk::PropDirection propDir,
+						      Trk::ParticleHypothesis particleType ) const {
+
+  // ATH_MSG_DEBUG("looking up calo states: r " << startPars.position().perp() << " z " << startPars.position().z()
+                // << " momentum " << startPars.momentum().mag() );
+
+  // pointers to hold results and go
+  std::vector<const Trk::TrackStateOnSurface*>* material = 0;//new std::vector<const Trk::TrackStateOnSurface*>();
+  const auto* caloParameters = m_extrapolator->extrapolate( startPars, propDir, particleType, material, 3 ); 
+  if( material ) {
+    ATH_MSG_DEBUG("Got material " << material->size() );
+    for( auto& m : *material ) {
+      if( msgLvl(MSG::DEBUG) ){
+        msg(MSG::DEBUG) << " layer ";
+        const Trk::TrackParameters* param = m->trackParameters();
+        if( param ) msg(MSG::DEBUG) << " param " << param << " pos: r " << param->position().perp() << " z " << param->position().z() 
+                                    << " pt " << param->momentum().perp();
+        const Trk::MaterialEffectsBase* mat = m->materialEffectsOnTrack();
+        if( mat ) msg(MSG::DEBUG) << " mat: " <<  mat->thicknessInX0();
+        msg(MSG::DEBUG) << endmsg;
+      }
+      delete m;
+    }
+    delete material;
+  }
+  if( !caloParameters ) return nullptr;
+  Trk::TrackParametersIdHelper  parsIdHelper;
+
+  // create final object
+  const Trk::TrackParameters* caloEntry = 0;
+  const Trk::TrackParameters* muonEntry = 0;
+  std::vector<const Trk::CurvilinearParameters*> caloLayers;
+  caloLayers.reserve(caloParameters->size()-1);
+  // ATH_MSG_DEBUG( " Found calo parameters: " << caloParameters->size() );
+  for( const auto& p : *caloParameters ){
+
+    const Trk::TrackParameters* param = p.first;
+    if( !param ) continue;
+    // ATH_MSG_DEBUG( " param " << param << " id " << p.second /*<< " type " << p.first->type()*/ << " pos: r " << param->position().perp() << " z " << param->position().z() 
+                   // << " pt " << param->momentum().perp() << " cov " << param->covariance() );
+    
+    // assign parameters
+    if( p.second == 1 && propDir == Trk::alongMomentum)         caloEntry = p.first;
+    else if( p.second == 3 && propDir == Trk::oppositeMomentum) caloEntry = p.first;
+    else if( p.second == 3 && propDir == Trk::alongMomentum)    muonEntry = p.first;
+    else if( p.second == 4 && propDir == Trk::oppositeMomentum) muonEntry = p.first;
+    else{
+      bool isEntry = p.second > 0 ? true : false;
+      TrackParametersIdentifier id = parsIdHelper.encode( AtlasDetDescr::fFirstAtlasCaloTechnology, 
+                                                          static_cast<CaloSampling::CaloSample>( abs(p.second)%1000 ),
+                                                          isEntry );
+      const Trk::CurvilinearParameters* cpars = dynamic_cast<const Trk::CurvilinearParameters*>(p.first);
+      if( !cpars ){ /*p.first->type() == Curvilinear*/
+        cpars = p.first->covariance() ? new Trk::CurvilinearParameters(p.first->position(),p.first->momentum(),p.first->charge(),new AmgSymMatrix(5)(*p.first->covariance()),id) : new Trk::CurvilinearParameters(p.first->position(),p.first->momentum(),p.first->charge(),nullptr,id);
+        delete p.first;
+      }else{
+        const_cast<Trk::CurvilinearParameters*>(cpars)->m_cIdentifier = id;
+      }
+      caloLayers.push_back( cpars );
+    }      
+  }
+
+  if(!muonEntry && propDir == Trk::oppositeMomentum && fabs(startPars.position().perp()-4255.)<1.) {
+  // muonEntry is right at the startPars position
+    muonEntry = startPars.clone();
+  } 
+
+  if( muonEntry ) {
+     if( muonEntry->covariance() ) { 
+     ATH_MSG_VERBOSE (" p at MuonEntry " << muonEntry->momentum().mag() << " cov 00 " << (*(muonEntry->covariance()))(0,0) << " cov 11 " << (*(muonEntry->covariance()))(1,1));
+     }
+  }
+  // clean-up memory
+  delete caloParameters;
+  return new Trk::CaloExtension(caloEntry,muonEntry,std::move(caloLayers));
+    
+}
+
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/TrackCaloClusterCreatorTool.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/TrackCaloClusterCreatorTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..6a91aeea830e5655d066af9f9e8f1d8f6e4a48ba
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/TrackCaloClusterCreatorTool.cxx
@@ -0,0 +1,233 @@
+#include "TrackCaloClusterRecTools/TrackCaloClusterCreatorTool.h"
+#include "TrackCaloClusterRecTools/IParticleToCaloExtensionMap.h"
+#include "TrkCaloExtension/CaloExtension.h"
+
+#include "xAODTracking/VertexContainer.h"
+
+#include "CxxUtils/sincos.h"
+#include <cmath>
+
+TrackCaloClusterCreatorTool::TrackCaloClusterCreatorTool(const std::string& t, const std::string& n, const IInterface*  p )
+  : AthAlgTool(t,n,p),
+  m_loosetrackvertexassoTool("LooseTrackVertexAssociationTool"),
+  m_caloEntryMapName("ParticleToCaloExtensionMap"),
+  m_useEnergy(false),
+  m_doOriginCorrection(false),
+  m_storeCorrectedPosition(false),
+  m_applyFilter(true),
+  m_clusterFilterTool("ClusterFilterTool"),
+  m_saveDetectorEta(false)
+{
+    declareProperty("VertexContainerName"          ,    m_vertexContname                  = "PrimaryVertices"   );
+    declareProperty("ParticleCaloEntryMapName"     ,    m_caloEntryMapName                                      );
+    declareProperty("LooseTrackVertexAssoTool"     ,    m_loosetrackvertexassoTool                              );
+    declareProperty("UseEnergy"                    ,    m_useEnergy                                             );
+    declareProperty("DoOriginCorrection"           ,    m_doOriginCorrection                                    );
+    declareProperty("StoreCorrectedPosition"       ,    m_storeCorrectedPosition                                );
+    declareProperty("ApplyClusterFilter"           ,    m_applyFilter                                           );
+    declareProperty("ClusterFilterTool"            ,    m_clusterFilterTool                                     );
+    declareProperty("SaveDetectorEta"              ,    m_saveDetectorEta                                       );    
+}
+
+TrackCaloClusterCreatorTool::~TrackCaloClusterCreatorTool() {}
+
+StatusCode TrackCaloClusterCreatorTool::initialize() {
+  ATH_CHECK(m_loosetrackvertexassoTool.retrieve());
+  if (m_applyFilter)
+    ATH_CHECK(m_clusterFilterTool.retrieve());
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrackCaloClusterCreatorTool::finalize() {
+  return StatusCode::SUCCESS;
+}
+
+void TrackCaloClusterCreatorTool::createCombinedTCCs(xAOD::TrackCaloClusterContainer* tccContainer, 
+						     const xAOD::TrackParticleClusterAssociationContainer* assocContainer, 
+						     std::map <const xAOD::TrackParticle*, FourMom_t>* TrackTotalClusterPt, 
+						     std::map <const xAOD::CaloCluster*, FourMom_t>* clusterToTracksWeightMap ) {
+    
+    const xAOD::VertexContainer *vxCont=0;
+    StatusCode sc = evtStore()->retrieve(vxCont, m_vertexContname);
+    if (sc.isFailure()) {
+        ATH_MSG_WARNING ("Vertex container " << m_vertexContname << " not found! Can't perform TVA!");
+    }
+
+    for ( const auto* assocClusters : *assocContainer ) {
+        ATH_MSG_VERBOSE ("InDetTrackParticlesClusterAssociations index = " << assocClusters->index());
+        // flollow the link to the track particle
+        const xAOD::TrackParticle* trk = 0;
+        if (assocClusters->trackParticleLink().isValid()) {
+            trk = *(assocClusters->trackParticleLink());
+            bool isMatched = true;
+            if (vxCont && vxCont->size()!=0) {
+	      isMatched = m_loosetrackvertexassoTool->isCompatible(*trk, *(vxCont->at(0)) );
+            } else {
+	      ATH_MSG_WARNING ("Vertex container " << m_vertexContname << " is empty! Can't perform TVA!");
+            }
+            if (!isMatched) continue;
+        } else {
+	  ATH_MSG_ERROR ("trackParticleLink is not valid! " );
+        }
+	FourMom_t tcc_4p(0.,0.,0.,0.);
+        // follow the link to the calorimeter clusters
+        ATH_MSG_VERBOSE ("#(CaloCluster) = " << assocClusters->caloClusterLinks().size());
+        if (assocClusters->caloClusterLinks().size()) {
+            for (size_t c = 0; c < assocClusters->caloClusterLinks().size(); ++c) {
+                    const xAOD::CaloCluster* cluster = *(assocClusters->caloClusterLinks().at(c));
+                    double cluster_pt       = m_useEnergy ? cluster->e() : cluster->pt();
+                    double totalcluster_pt  = m_useEnergy ? TrackTotalClusterPt->at(trk).E() : TrackTotalClusterPt->at(trk).Pt();
+                    tcc_4p += cluster->p4()*(( trk->pt() * cluster_pt / totalcluster_pt) / ((clusterToTracksWeightMap->at(cluster)).Pt()));
+                    ATH_MSG_VERBOSE ("cluster->pt() " << cluster_pt << " cluster->eta() " << cluster->eta() << " cluster->phi() " 
+		    << cluster->phi() << " track pt " << trk->pt() << " (clusterToTracksWeightMap.at(cluster)).Pt() " << (clusterToTracksWeightMap->at(cluster)).Pt());
+            } // for caloClusterLinks
+        } // if caloClusterLinks().size
+        
+        double eta = trk->eta();
+	double phi = trk->phi();
+	
+	if (m_doOriginCorrection) {
+	  // retrieve the caloExtensionContainer to get the track direction at the calo entrance
+	  IParticleToCaloExtensionMap * caloExtensionMap = 0;
+	  if(evtStore()->retrieve(caloExtensionMap,m_caloEntryMapName).isFailure())
+	    ATH_MSG_WARNING( "Unable to retrieve " << m_caloEntryMapName << " will leak the ParticleCaloExtension" );
+	  
+	  const Trk::TrackParameters* pars = caloExtensionMap->readCaloEntry(trk);
+	  eta = pars->position().eta();
+	  phi = pars->position().phi();
+	  
+	  computeVertexCorr(eta, phi, (vxCont->at(0))->position(), pars->position().perp());
+	  if (m_storeCorrectedPosition) {
+	    trk->auxdecor<int>("Corrected") = 1;
+	    trk->auxdecor<float>("CaloEntryPosEtaCorr") = eta;
+	    trk->auxdecor<float>("CaloEntryPosPhiCorr") = phi;
+	  }
+	}
+	
+	xAOD::TrackCaloCluster* tcc = new xAOD::TrackCaloCluster;
+	tccContainer->push_back(tcc);
+	tcc->setParameters(tcc_4p.Pt(),eta,phi,tcc_4p.M(),xAOD::TrackCaloCluster::Taste::Combined,assocClusters->trackParticleLink(),assocClusters->caloClusterLinks());
+	// Commenting this for the moment... We can decide if we want this back later.
+	//         tcc->setParameters(tcc_4p.Pt(),eta,phi,tcc_4p.M(),xAOD::TrackCaloCluster::Taste::Combined,assocClusters->trackParticleLink(),assocClusters->caloClusterLinks());
+	
+        ATH_MSG_VERBOSE ("Created TCC with pt " << tcc->pt() << " eta " << tcc->eta() << " phi " << tcc->phi() << " mass " << tcc->m() << " taste " << tcc->taste());
+	
+	if(m_saveDetectorEta) {
+	  // retrieve the caloExtensionContainer to get the track direction at the calo entrance
+	  IParticleToCaloExtensionMap * caloExtensionMap = 0;
+	  if(evtStore()->retrieve(caloExtensionMap,m_caloEntryMapName).isFailure())
+	    ATH_MSG_WARNING( "Unable to retrieve " << m_caloEntryMapName << " will leak the ParticleCaloExtension" );
+	  
+	  const Trk::TrackParameters* pars = caloExtensionMap->readCaloEntry(trk);
+	  double det_eta = pars->position().eta();
+	  tcc->auxdecor<float>("DetectorEta") = det_eta;
+	}
+    } // for assoc clusters
+    
+}
+
+void TrackCaloClusterCreatorTool::createNeutralTCCs(xAOD::TrackCaloClusterContainer* tccContainer, 
+							const xAOD::CaloClusterContainer* assocContainer, 
+							std::map <const xAOD::CaloCluster*, FourMom_t>* clusterToTracksWeightMap  ) {
+//   const xAOD::VertexContainer* vxCont=0;
+//   if (m_saveDetectorEta) {
+//     StatusCode sc = evtStore()->retrieve(vxCont, m_vertexContname);
+//     if (sc.isFailure()) {
+//         ATH_MSG_WARNING ("Vertex container " << m_vertexContname << " not found!");
+//     }
+//   }
+  unsigned int i = 0;
+  for ( const auto* cluster : *assocContainer ) {
+      if(clusterToTracksWeightMap->find(cluster)==clusterToTracksWeightMap->end()){
+	  if (m_applyFilter and m_clusterFilterTool->rejectCluster(*cluster)) continue;
+          xAOD::TrackCaloCluster* tcc = new xAOD::TrackCaloCluster;
+          tccContainer->push_back(tcc);
+	  ElementLink< xAOD::CaloClusterContainer > clusterLink(*assocContainer,i);
+	  const std::vector< ElementLink<xAOD::CaloClusterContainer> > ClusterLink {clusterLink};
+	  tcc->setParameters(cluster->pt(),cluster->eta(),cluster->phi(),cluster->m(),xAOD::TrackCaloCluster::Taste::Neutral,ElementLink<xAOD::TrackParticleContainer>(),ClusterLink);
+          ATH_MSG_VERBOSE ("Created TCC with pt " << tcc->pt() << " eta " << tcc->eta() << " phi " << tcc->phi() << " mass " << tcc->m() << " taste " << tcc->taste());
+	  static SG::AuxElement::Accessor< float > acc_det_eta ( "DetectorEta" );
+	  if(m_saveDetectorEta and acc_det_eta.isAvailable(*cluster)) {
+// 	    double det_eta = DetectorEta(*cluster, vxCont->at(0)->position());
+	    tcc->auxdecor<float>("DetectorEta") = acc_det_eta(*cluster);
+	  }
+      }
+      i++;
+  } // for all clusters
+}
+
+void TrackCaloClusterCreatorTool::createChargedTCCs(xAOD::TrackCaloClusterContainer* tccContainer, 
+						      const xAOD::TrackParticleContainer* assocContainer, 
+						      std::map <const xAOD::TrackParticle*, FourMom_t>* TrackTotalClusterPt  ) {
+    
+    const xAOD::VertexContainer *vxCont=0;
+    StatusCode sc = evtStore()->retrieve(vxCont, m_vertexContname);
+    if (sc.isFailure()) {
+        ATH_MSG_WARNING ("Vertex container " << m_vertexContname << " not found! Can't perform TVA!");
+    }
+
+    unsigned int i = 0;
+    for ( const auto* track : *assocContainer ) {
+        if(TrackTotalClusterPt->find(track)==TrackTotalClusterPt->end()){
+            bool isMatched = true;
+            if (vxCont && vxCont->size()!=0) {
+                isMatched = m_loosetrackvertexassoTool->isCompatible(*track, *(vxCont->at(0)) );
+            }
+            else{
+                ATH_MSG_WARNING ("Vertex container " << m_vertexContname << " is empty! Can't perform TVA!");
+            }
+            if (!isMatched) continue;
+            xAOD::TrackCaloCluster* tcc = new xAOD::TrackCaloCluster;
+            tccContainer->push_back(tcc);
+	    ElementLink< xAOD::TrackParticleContainer > trkLink(*assocContainer,i);
+            tcc->setParameters(track->pt(),track->eta(),track->phi(),track->m(),xAOD::TrackCaloCluster::Taste::Charged,trkLink,std::vector<ElementLink<xAOD::CaloClusterContainer>>());
+            ATH_MSG_VERBOSE ("Created TCC with pt " << tcc->pt() << " eta " << tcc->eta() << " phi " << tcc->phi() << " mass " << tcc->m() << " taste " << tcc->taste());
+
+	    if(m_saveDetectorEta) {
+	      // retrieve the caloExtensionContainer to get the track direction at the calo entrance
+	      IParticleToCaloExtensionMap * caloExtensionMap = 0;
+	      if(evtStore()->retrieve(caloExtensionMap,m_caloEntryMapName).isFailure())
+		ATH_MSG_WARNING( "Unable to retrieve " << m_caloEntryMapName << " will leak the ParticleCaloExtension" );
+	      
+	      const Trk::TrackParameters* pars = caloExtensionMap->readCaloEntry(track);
+	      double det_eta = track->eta();
+	      if(pars)
+		det_eta = pars->position().eta();
+	      tcc->auxdecor<float>("DetectorEta") = det_eta;
+	    }
+        }
+        i++;
+    } // for all tracks
+    
+}
+
+void TrackCaloClusterCreatorTool::computeVertexCorr(double& eta, double& phi, const Amg::Vector3D& vertex, double radius) {
+  
+  if (radius<1.) return;
+  
+  if (std::fabs(eta)>10. || std::fabs(phi)>10.) return;
+  
+  CxxUtils::sincos sc (phi);
+  double iradius = 1 / radius;
+  eta += (-vertex[2]/std::cosh(eta) + sc.apply (vertex[1], vertex[0])*std::tanh(eta)) * iradius;
+  phi += sc.apply (vertex[0], -vertex[1]) * iradius;
+}
+
+// double TrackCaloClusterCreatorTool::DetectorEta(const xAOD::CaloCluster& cluster, const Amg::Vector3D& vertex) {
+//   
+//   // this is the origin corrected eta
+//   double eta = cluster.eta();
+//     
+//   double radius = 0;
+//   double mag = 0;
+//   if (cluster.retrieveMoment (xAOD::CaloCluster::CENTER_MAG, mag))  
+//     radius = mag/std::cosh(eta);
+//  
+//   if (radius<1. || std::fabs(eta)>10.) return eta;
+//   
+//   double theta = 2.*std::atan(std::exp(-eta));
+//   double eta_det = std::atan(radius/(radius/std::tan(theta)-vertex[2]));
+//   
+//   return eta_det;
+//   
+// }
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/TrackCaloClusterWeightsTool.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/TrackCaloClusterWeightsTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..488d9ff3ae8e3793a1aecc06745a972c94db1353
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/TrackCaloClusterWeightsTool.cxx
@@ -0,0 +1,65 @@
+#include "TrackCaloClusterRecTools/TrackCaloClusterWeightsTool.h"
+
+
+TrackCaloClusterWeightsTool::TrackCaloClusterWeightsTool(const std::string& t, const std::string& n, const IInterface*  p )
+  : AthAlgTool(t,n,p),
+    m_useEnergy(false)
+{
+    declareProperty("UseEnergy",        m_useEnergy );
+}
+
+TrackCaloClusterWeightsTool::~TrackCaloClusterWeightsTool() {}
+
+StatusCode TrackCaloClusterWeightsTool::initialize() {
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrackCaloClusterWeightsTool::finalize() {
+  return StatusCode::SUCCESS;
+}
+
+void TrackCaloClusterWeightsTool::fillWeightMaps( const xAOD::TrackParticleClusterAssociationContainer* assocContainer, 
+						  std::multimap <const xAOD::CaloCluster*, const xAOD::TrackParticle*>* clusterToTracksMap, 
+						  std::map <const xAOD::TrackParticle*, FourMom_t>* TrackTotalClusterPt, 
+						  std::map <const xAOD::CaloCluster*, FourMom_t>* clusterToTracksWeightMap ) {
+
+    // First loop to fill cluster-to-tracks map
+    for ( const auto* assocClusters : *assocContainer ) {
+        // flollow the link to the track particle
+        const xAOD::TrackParticle* trk = 0;
+        if (assocClusters->trackParticleLink().isValid()) {
+            trk = *(assocClusters->trackParticleLink());
+        }
+        else if ( !assocClusters->trackParticleLink().isValid() ){
+            ATH_MSG_ERROR ("trackParticleLink is not valid! " );
+        }
+        // follow the link to the calorimeter clusters
+        if (assocClusters->caloClusterLinks().size()) {
+            for (size_t c = 0; c < assocClusters->caloClusterLinks().size(); ++c) {
+                    const xAOD::CaloCluster* cluster = *(assocClusters->caloClusterLinks().at(c));
+                    clusterToTracksMap->insert(std::make_pair(cluster, trk));
+                    if(TrackTotalClusterPt->find(trk)==TrackTotalClusterPt->end()){
+                        TrackTotalClusterPt->insert(std::make_pair(trk, cluster->p4()));
+                    }
+                    else{
+                        TrackTotalClusterPt->at(trk) = TrackTotalClusterPt->at(trk) + cluster->p4();
+                    }
+            } // for caloClusterLinks
+        } // if caloClusterLinks().size
+    } // for assoc clusters
+    
+    // Create cluster-to-tracks weight map
+    for (auto entry : *clusterToTracksMap)
+    {
+        double cluster_pt       = m_useEnergy ? entry.first->e() : entry.first->pt();
+        double totalcluster_pt  = m_useEnergy ? TrackTotalClusterPt->at(entry.second).E() : TrackTotalClusterPt->at(entry.second).Pt();
+        if(clusterToTracksWeightMap->find(entry.first)==clusterToTracksWeightMap->end()){
+            clusterToTracksWeightMap->insert(std::make_pair(entry.first, entry.second->p4() * (cluster_pt/totalcluster_pt)));
+        }
+        else{
+            clusterToTracksWeightMap->at(entry.first) = clusterToTracksWeightMap->at(entry.first) + entry.second->p4() * (cluster_pt/totalcluster_pt);
+        }
+    }
+    
+}
+
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/components/ParticleToCaloExtrapolationTool_entries.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/components/ParticleToCaloExtrapolationTool_entries.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..6cc84eea2d7f1979705a5fc6fecf90324e6311f1
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/components/ParticleToCaloExtrapolationTool_entries.cxx
@@ -0,0 +1,19 @@
+#include "GaudiKernel/DeclareFactoryEntries.h"
+
+#include "TrackCaloClusterRecTools/ParticleToCaloExtrapolationTool.h"
+#include "TrackCaloClusterRecTools/TrackCaloClusterWeightsTool.h"
+#include "TrackCaloClusterRecTools/TrackCaloClusterCreatorTool.h"
+#include "TrackCaloClusterRecTools/ClusterFilterTool.h"
+ 
+DECLARE_TOOL_FACTORY(ParticleToCaloExtrapolationTool)
+DECLARE_TOOL_FACTORY(TrackCaloClusterWeightsTool)
+DECLARE_TOOL_FACTORY(TrackCaloClusterCreatorTool)
+DECLARE_TOOL_FACTORY(ClusterFilterTool)
+    
+DECLARE_FACTORY_ENTRIES(TrackCaloClusterRecTools)
+{
+  DECLARE_TOOL(ParticleToCaloExtrapolationTool)      
+  DECLARE_TOOL(TrackCaloClusterWeightsTool)   
+  DECLARE_TOOL(TrackCaloClusterCreatorTool)  
+  DECLARE_TOOL(ClusterFilterTool)  
+}
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/components/ParticleToCaloExtrapolationTool_load.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/components/ParticleToCaloExtrapolationTool_load.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..6d0003695c1e4ee375a9526f02e6d7063adaf5f5
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecTools/src/components/ParticleToCaloExtrapolationTool_load.cxx
@@ -0,0 +1,3 @@
+#include "GaudiKernel/LoadFactoryEntries.h"
+
+LOAD_FACTORY_ENTRIES(TrackCaloClusterRecTools)
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/CMakeLists.txt b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..879eba5ca6396016873c1eeca1560dd728efbad7
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/CMakeLists.txt
@@ -0,0 +1,54 @@
+################################################################################
+# Package: TrackCaloClusterRecValidation
+################################################################################
+
+
+# Declare the package name:
+atlas_subdir( TrackCaloClusterRecValidation )
+
+# Declare the package's dependencies:
+atlas_depends_on_subdirs( PUBLIC
+                          Control/AthenaBaseComps
+                          Control/AthenaMonitoring
+                          Event/xAOD/xAODCore
+                          Event/xAOD/xAODJet
+                          Event/xAOD/xAODTracking
+                          Event/xAOD/xAODTruth
+                          Event/xAOD/xAODEventInfo
+                          Event/xAOD/xAODPFlow
+                          Event/EventInfo
+                          GaudiKernel
+                          InnerDetector/InDetValidation/InDetPhysValMonitoring
+                          Tracking/TrkValidation/TrkValHistUtils
+                          PRIVATE
+                          Control/AthToolSupport/AsgTools
+                          Control/AthenaKernel
+                          DetectorDescription/GeoPrimitives
+                          Event/EventPrimitives
+                          Event/xAOD/xAODBase
+                          Event/xAOD/xAODParticleEvent
+                          Reconstruction/Jet/JetCalibTools
+                          Tools/PathResolver
+                          )
+                          
+
+# External dependencies:
+find_package( Eigen )
+find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread EG )
+find_package( XercesC )
+find_package( Boost )
+
+# Component(s) in the package:
+atlas_add_component( TrackCaloClusterRecValidation
+                     src/*.cxx
+                     src/components/*.cxx
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}  ${EIGEN_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${Boost_LIBRARIES} ${EIGEN_LIBRARIES} 
+                     AthenaBaseComps AthenaMonitoringLib xAODCore xAODTracking xAODTruth xAODPFlow GaudiKernel TrkValHistUtils InDetPhysValMonitoringLib
+                     AsgTools AthenaKernel GeoPrimitives EventPrimitives xAODBase xAODParticleEvent xAODEventInfo EventInfo xAODJet PathResolver)
+# Install files from the package:
+atlas_install_headers( TrackCaloClusterRecValidation )
+#atlas_install_python_modules( python/*.py )
+#atlas_install_runtime( share/*.hdef  share/*.xml  share/*.xsl} )
+atlas_install_runtime( share/*.xml  share/*.xsl )
+#atlas_install_runtime( test/TrackCaloClusterRecValidation_TestConfiguration.xml )
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/CalibrationNtupleMakerTool.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/CalibrationNtupleMakerTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..dfe972dc38607a98926e2143207f982c2ae63669
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/CalibrationNtupleMakerTool.h
@@ -0,0 +1,100 @@
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_CALIBRATIONNTUPLEMAKERTOOL_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_CALIBRATIONNTUPLEMAKERTOOL_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+
+#include "xAODJet/JetContainer.h"
+
+#include <vector>
+
+class TTree;
+class TH1;
+
+class CalibrationNtupleMakerTool : public AthAlgorithm {
+ 
+public:
+  
+  /** Standard Athena-Algorithm Constructor */
+  CalibrationNtupleMakerTool(const std::string& name, ISvcLocator* pSvcLocator);
+  
+  /** Default Destructor */
+  virtual ~CalibrationNtupleMakerTool();
+  
+  /** standard Athena-Algorithm method */
+  StatusCode          initialize();
+
+  /** standard Athena-Algorithm method */
+  StatusCode          execute();
+  
+  /** standard Athena-Algorithm method */
+  StatusCode          finalize();
+  
+  /* book the TTree branches */
+  virtual StatusCode  bookTree();
+  
+private:
+  
+  // Get a data container; implementation at end of this header file
+  template<class T> const T* getContainer( const std::string & containerName);
+  
+  int Matched(const xAOD::Jet* truth, const xAOD::JetContainer* jets, std::vector<const xAOD::Jet*>& matched, int& index);
+  
+  double DRmin(const xAOD::Jet* myjet, const xAOD::JetContainer* jets, double PtMin);
+  
+  float DetectorEta(const xAOD::Jet* jet);
+  
+    
+  std::vector < std::string >                  m_collectionNames;
+  std::map   < std::string, TTree* >           m_trees;
+  std::string                                  m_treeFolder;  
+  std::string                                  m_treeDescription;
+  
+  std::string                                  m_truthJetContainerName;
+  std::string                                  m_vertexContainerName;
+  
+  double                                       m_recoIsoDR;
+  double                                       m_recoIsoPtCut;
+  double                                       m_trueIsoDR;
+  double                                       m_trueIsoPtCut;
+  
+  double                                       m_matchingCut;
+  
+  TH1*                                         h_events;
+  
+  float                                        m_eventWeight;
+  float                                        m_mu;
+  float                                        m_npv;
+  
+  std::vector < int >*                         m_index;
+  
+  std::vector < double >*                      m_etaCalo;
+  std::vector < double >*                      m_etaDetCalo;
+  std::vector < double >*                      m_phiCalo;
+  std::vector < double >*                      m_eCalo;
+  std::vector < double >*                      m_mCalo;
+              
+  std::vector < double >*                      m_etaCorr;
+  std::vector < double >*                      m_etaDetCorr;
+  std::vector < double >*                      m_phiCorr;
+  std::vector < double >*                      m_eCorr;
+  std::vector < double >*                      m_mCorr;
+                                                           
+  std::vector < double >*                      m_etaTrue;
+  std::vector < double >*                      m_phiTrue;
+  std::vector < double >*                      m_eTrue;
+  std::vector < double >*                      m_mTrue;
+  
+  
+};
+
+template<class T>
+inline const T* CalibrationNtupleMakerTool::getContainer(const std::string & containerName){
+  const T * ptr = evtStore()->retrieve< const T >( containerName );
+  if (!ptr) {
+    ATH_MSG_WARNING("Container '"<<containerName<<"' could not be retrieved");
+  }
+  return ptr;
+}
+
+
+#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_CALIBRATIONNTUPLEMAKERTOOL_H
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/TrackCaloClusterRecValidationTool.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/TrackCaloClusterRecValidationTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..236a3ddfd73c702875c6dc216a1de9cd480f42b9
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/TrackCaloClusterRecValidation/TrackCaloClusterRecValidationTool.h
@@ -0,0 +1,119 @@
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TRACKCALOCLUSTERRECVALIDATIONTOOL_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TRACKCALOCLUSTERRECVALIDATIONTOOL_H
+/**
+ * @file TrackCaloClusterRecValidationTool.h
+ * header file for class of same name
+ * @author shaun roe
+ * @date 21 February 2014
+**/
+
+#include "AthenaMonitoring/ManagedMonitorToolBase.h"
+
+//#gaudi includes
+#include "GaudiKernel/ToolHandle.h"
+//EDM includes
+#include "xAODTruth/TruthParticleContainer.h"
+//Athena
+
+//STL includes
+#include <string>
+#include <vector>
+
+#include "xAODJet/JetContainer.h"
+#include "GaudiKernel/ToolHandle.h"
+
+class TCCPlots;
+class IJetCalibrationTool;
+
+/**
+ * Tool to book and fill inner detector histograms for physics validation
+ */
+class TrackCaloClusterRecValidationTool: public ManagedMonitorToolBase {
+public:
+    ///Constructor with parameters
+    TrackCaloClusterRecValidationTool(const std::string & type, const std::string & name, const IInterface* parent);
+    ///Destructor
+    virtual ~TrackCaloClusterRecValidationTool();
+    /** \name BaseclassMethods Baseclass methods reimplemented
+    }**/
+    //@{
+    virtual StatusCode initialize();
+    virtual StatusCode bookHistograms();
+    virtual StatusCode fillHistograms();
+    virtual StatusCode procHistograms();
+    //@}
+private:
+    ///prevent default construction
+    TrackCaloClusterRecValidationTool();
+    
+    /// calibration tool
+    ToolHandleArray<IJetCalibrationTool>  m_jetCalibrationTools;
+    std::vector< std::string >            m_jetCalibrationCollections;
+    bool                                  m_applyCalibration;
+    
+    /**Calibrate and record a shallow copy of a given jet container */
+    const xAOD::JetContainer* calibrateAndRecordShallowCopyJetCollection(const xAOD::JetContainer * jetContainer, const std::string name);
+    
+    /// Get the matched jet
+    const xAOD::Jet* ClusterMatched(const xAOD::Jet* jet, const xAOD::JetContainer* jets);
+    const xAOD::Jet* ClusterMatched(const xAOD::Jet* jet, std::vector<const xAOD::Jet*> jets);
+    
+    // Get a data container; implementation at end of this header file
+    template<class T> const T* getContainer( const std::string & containerName);
+        
+    bool m_saveJetInfo;
+    ///Truth jet container's name
+    std::string m_truthJetContainerName;
+    std::string m_truthTrimmedJetContainerName;
+    
+    std::vector<std::string> m_jetContainerNames;
+    
+    std::string m_vertexContainerName;
+    
+    std::string m_topoJetReferenceName;
+    std::string m_topoTrimmedJetReferenceName;
+
+    ///Directory name
+    std::string m_dirName;
+    float m_maxJetDR;
+    float m_maxEta;
+    float m_minPt;
+    float m_minMass;
+    float m_maxMass;
+    
+    std::string m_folder;
+    
+    std::string m_trackParticleCollectionName;
+   
+    bool  m_saveTrackInfo;
+    bool  m_saveMatchingInfo;
+    float m_trackPtMin;
+    
+    std::vector<float> m_jetPtBins           ;
+    std::vector<float> m_jetMassOverPtBins   ;
+    std::vector<float> m_trackPtBins         ;
+    std::vector<float> m_trackProdRadiusBins ;
+    
+    bool m_saveClusterInfo;
+    std::string m_caloClusterCollectionName;
+    float m_caloClusterEtaMax;
+    
+    bool m_saveTCCInfo;
+    std::vector<std::string> m_TCCCombinedCollectionNames;
+    float m_tccPtMin;
+    float m_tccEtaMax;
+    
+    //histograms
+    std::map<std::string, TCCPlots*>    m_tccPlots;
+};
+
+template<class T>
+inline const T* TrackCaloClusterRecValidationTool::getContainer(const std::string & containerName){
+  const T * ptr = evtStore()->retrieve< const T >( containerName );
+  if (!ptr) {
+    ATH_MSG_WARNING("Container '"<<containerName<<"' could not be retrieved");
+  }
+  return ptr;
+}
+
+#endif //TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TRACKCALOCLUSTERRECVALIDATIONTOOL_H
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/run/TrackCaloClusterRecValidation_jobOption.py b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/run/TrackCaloClusterRecValidation_jobOption.py
new file mode 100644
index 0000000000000000000000000000000000000000..03cce765ebc1e922649e183298eb46c22b1481df
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/run/TrackCaloClusterRecValidation_jobOption.py
@@ -0,0 +1,71 @@
+# $Id: TrackCaloClusterRecValidation_jobOptions.py $
+
+# Set up the reading of the input xAOD:
+import getpass
+#FNAME = "XAOD_Wprime.pool.root"
+
+#FNAME = ["root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/XAOD_Processed_Mar18/XAOD_WPrime2000_1.pool.root",
+	 #"root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/XAOD_Processed_Mar18/XAOD_WPrime2000_2.pool.root",
+	 #"root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/XAOD_Processed_Mar18/XAOD_WPrime2000_3.pool.root",
+	 #"root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/XAOD_Processed_Mar18/XAOD_WPrime2000_4.pool.root",
+	 #"root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/XAOD_Processed_Mar18/XAOD_WPrime2000_5.pool.root",]
+#name = "WPrime2000"
+
+#FNAME = ["root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/XAOD_Processed_Mar18/XAOD_JZ5W_1.pool.root",
+	 ##"root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/XAOD_Processed_Mar18/XAOD_JZ5W_2.pool.root",
+	 #"root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/XAOD_Processed_Mar18/XAOD_JZ5W_3.pool.root",
+	 #"root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/XAOD_Processed_Mar18/XAOD_JZ5W_4.pool.root",
+	 #"root://eosatlas//eos/atlas/user/n/ncalace/Samples_Physics/XAOD_Processed_Mar18/XAOD_JZ5W_5.pool.root",]
+#name = "JZ5W"
+
+FNAME = ["/afs/cern.ch/work/r/rjansky/TCC3/run/XAOD_WprimedRMatch.pool.root"]
+name = "XAOD_WprimedRMatch"
+
+import AthenaPoolCnvSvc.ReadAthenaPool
+svcMgr.EventSelector.InputCollections = FNAME
+
+# Access the algorithm sequence:
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+from InDetPhysValMonitoring.InDetPhysValMonitoringConf import HistogramDefinitionSvc
+ToolSvc = ServiceMgr.ToolSvc
+ServiceMgr+=HistogramDefinitionSvc()
+ServiceMgr.HistogramDefinitionSvc.DefinitionSource="../share/TCCPlotDef.xml"
+ServiceMgr.HistogramDefinitionSvc.DefinitionFormat="text/xml"
+
+from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
+monMan = AthenaMonManager( "PhysValMonManager" )
+monMan.ManualDataTypeSetup = True
+monMan.DataType            = "monteCarlo"
+monMan.Environment         = "altprod"
+monMan.ManualRunLBSetup    = True
+monMan.Run                 = 1
+monMan.LumiBlock           = 1
+monMan.FileKey = "MyTCC"
+topSequence += monMan
+
+from TrackCaloClusterRecValidation.TrackCaloClusterRecValidationConf import TrackCaloClusterRecValidationTool
+tool = TrackCaloClusterRecValidationTool()
+tool.JetTruthContainerName        = "AntiKt10TruthJets"
+tool.TopoJetReferenceName         = "MyAntiKt10LCTopoJets"
+tool.TopoTrimmedJetReferenceName  = "MyAntiKt10LCTopoTrimmedJets"
+tool.JetContainerNames = ["MyAntiKt10LCTopoJets"                  ,"MyAntiKt10LCTopoTrimmedJets",
+			  "AntiKt10TrackCaloClustersAllJets"      ,"AntiKt10TrackCaloClustersAllTrimmedJets",    
+			  "AntiKt10TrackCaloClustersChargedJets"  ,"AntiKt10TrackCaloClustersChargedTrimmedJets",
+			  "AntiKt10TrackCaloClustersJets"         ,"AntiKt10TrackCaloClustersTrimmedJets"]
+tool.OutputLevel = INFO
+print tool
+ToolSvc += tool
+monMan.AthenaMonTools += [tool]
+
+from GaudiSvc.GaudiSvcConf import THistSvc
+ServiceMgr += THistSvc()
+svcMgr.THistSvc.Output += ["MyTCC DATAFILE='TCC_Output_"+name+".root' OPT='RECREATE'"]
+
+# Do some additional tweaking:
+from AthenaCommon.AppMgr import theApp
+ServiceMgr.MessageSvc.OutputLevel = INFO
+ServiceMgr.MessageSvc.defaultLimit = 10000
+###theApp.EvtMax = 1000
+theApp.EvtMax = -1
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/share/TCCPlotDef.xml b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/share/TCCPlotDef.xml
new file mode 100644
index 0000000000000000000000000000000000000000..83ec3e1741b6aeaac0755865b2b7d30beafcf5d7
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/share/TCCPlotDef.xml
@@ -0,0 +1,3141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" media="screen" href="hdefhtml.xsl"?>
+<?xml-stylesheet type="text/xsl" media="tty" href="hdeftty.xsl" alternate="yes"?>
+<!DOCTYPE  hdef [
+<!ENTITY PI "3.1415926">
+]>
+
+<hdef xmlns:xi="http://www.w3.org/2001/XInclude">
+  <!-- TCC-specific plots -->
+  <!--
+     =======================================================
+     Track Plots
+     =======================================================
+    -->
+  
+<!--   m_jet_n -->
+  <h id="jet_n" type="TH1F" title="n">
+    <x title="n" n="50" lo="0" hi="50"/>
+    <y title="Entries"/>
+  </h>
+  
+<!--   m_jet_eta -->
+  <h id="jet_eta" type="TH1F" title="#eta - all jets">
+    <x title="#eta" n="200" lo="-5" hi="5"/>
+    <y title="Entries"/>
+  </h>
+  
+<!--   m_jet_phi -->
+  <h id="jet_phi" type="TH1F" title="#phi - all jets">
+    <x title="#phi" n="160" lo="-4" hi="4"/>
+    <y title="Entries"/>
+  </h> 
+  
+<!--   m_jet_pt -->
+  <h id="jet_pt" type="TH1F" title="p_{T} - all jets">
+    <x title="p_{T} [GeV]" n="10000" lo="0." hi="10000."/>
+    <y title="Entries"/>
+  </h>
+  
+<!--   m_jet_m  -->
+  <h id="jet_m" type="TH1F" title="mass - all jets">
+    <x title="m [GeV]" n="10000" lo="0." hi="10000."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_m_2leadings -->
+  <h id="jet_m_2leadings" type="TH1F" title="mass - 2 leading jets">
+    <x title="m [GeV]" n="10000" lo="0." hi="10000."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!--   m_jet_m_leading -->
+  <h id="jet_m_leading" type="TH1F" title="mass - leading jet">
+    <x title="m [GeV]" n="10000" lo="0." hi="10000."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!--   m_jet_m_subleading -->
+  <h id="jet_m_subleading" type="TH1F" title="mass - subleading jet">
+    <x title="m [GeV]" n="10000" lo="0." hi="10000."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!--   m_jet_pt_2leadings -->
+  <h id="jet_pt_2leadings" type="TH1F" title="p_{T} - 2 leading jets">
+    <x title="p_{T} [GeV]" n="10000" lo="0." hi="10000."/>
+    <y title="Entries"/>
+  </h>
+  
+<!--   m_jet_pt_leading -->
+  <h id="jet_pt_leading" type="TH1F" title="p_{T} - leading jet">
+    <x title="p_{T} [GeV]" n="10000" lo="0." hi="10000."/>
+    <y title="Entries"/>
+  </h>
+  
+<!--   m_jet_pt_subleading -->
+  <h id="jet_pt_subleading" type="TH1F" title="p_{T} - subleading jet">
+    <x title="p_{T} [GeV]" n="10000" lo="0." hi="10000."/>
+    <y title="Entries"/>
+  </h>
+  
+  
+<!--   m_jet_eta_2leadings -->
+  <h id="jet_eta_2leadings" type="TH1F" title="#eta - 2 leading jets">
+    <x title="#eta" n="200" lo="-5" hi="5"/>
+    <y title="Entries"/>
+  </h>
+  
+<!--   m_jet_phi_2leadings -->
+  <h id="jet_phi_2leadings" type="TH1F" title="#phi - 2 leadings jets">
+    <x title="#phi" n="160" lo="-4" hi="4"/>
+    <y title="Entries"/>
+  </h> 
+  
+  <!--   m_jet_eta_leading -->
+  <h id="jet_eta_leading" type="TH1F" title="#eta - leading jets">
+    <x title="#eta" n="200" lo="-5" hi="5"/>
+    <y title="Entries"/>
+  </h>
+  
+<!--   m_jet_phi_leading -->
+  <h id="jet_phi_leading" type="TH1F" title="#phi - leading jets">
+    <x title="#phi" n="160" lo="-4" hi="4"/>
+    <y title="Entries"/>
+  </h> 
+  
+  <!--   m_jet_eta_subleading -->
+  <h id="jet_eta_subleading" type="TH1F" title="#eta - subleading jets">
+    <x title="#eta" n="200" lo="-5" hi="5"/>
+    <y title="Entries"/>
+  </h>
+  
+<!--   m_jet_phi_subleading -->
+  <h id="jet_phi_subleading" type="TH1F" title="#phi - subleading jets">
+    <x title="#phi" n="160" lo="-4" hi="4"/>
+    <y title="Entries"/>
+  </h> 
+  
+<!--   m_jet_deltaR -->
+  <h id="jet_deltaR" type="TH1F" title="#DeltaR">
+    <x title="#DeltaR" n="100" lo="0." hi="1."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!--   m_jet_deltaR_matched -->
+  <h id="jet_deltaR_matched" type="TH1F" title="#DeltaR matched">
+    <x title="#DeltaR" n="100" lo="0." hi="1."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_m -->
+  <h id="jet_response_m" type="TH1F" title="Mass response - all jets">
+    <x title="Mass response" n="10000" lo="-1." hi="99."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_m_pt -->
+  <h id="jet_response_m_pt" type="TH2F" title="Mass response vs Truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Mass response"         n="10000" lo="-1." hi="99."/>
+  </h> 
+
+<!-- m_jet_response_pt -->
+  <h id="jet_response_pt" type="TH1F" title="p_{T} response - all jets">
+    <x title="p_{T} response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_eta -->
+  <h id="jet_response_eta" type="TH1F" title="#eta response - all jets">
+    <x title="#eta response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_phi -->
+  <h id="jet_response_phi" type="TH1F" title="#phi response - all jets">
+    <x title="#phi response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_m_2leadings -->
+  <h id="jet_response_m_2leadings" type="TH1F" title="Mass response - 2 leading jets">
+    <x title="Mass response" n="10000" lo="-1." hi="99."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_m_pt_2leadings -->
+  <h id="jet_response_m_pt_2leadings" type="TH2F" title="Mass response vs Truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Mass response"         n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_response_pt_2leadings -->
+  <h id="jet_response_pt_2leadings" type="TH1F" title="p_{T} response - 2 leading jets">
+    <x title="p_{T} response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_eta_2leadings -->
+  <h id="jet_response_eta_2leadings" type="TH1F" title="#eta response - 2 leading jets">
+    <x title="#eta response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_phi_2leadings -->
+  <h id="jet_response_phi_2leadings" type="TH1F" title="#phi response - 2 leading jets">
+    <x title="#phi response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_m_leading -->
+  <h id="jet_response_m_leading" type="TH1F" title="Mass response - leading jet">
+    <x title="Mass response" n="10000" lo="-1." hi="99."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_m_pt_leading -->
+  <h id="jet_response_m_pt_leading" type="TH2F" title="Mass response vs Truth jet p_{T} - leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Mass response"         n="10000" lo="-1." hi="99."/>
+  </h> 
+
+<!-- m_jet_response_pt_leading -->
+  <h id="jet_response_pt_leading" type="TH1F" title="p_{T} response - leading jet">
+    <x title="p_{T} response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_eta_leading -->
+  <h id="jet_response_eta_leading" type="TH1F" title="#eta response - leading jet">
+    <x title="#eta response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_phi_leading -->
+  <h id="jet_response_phi_leading" type="TH1F" title="#phi response - leading jet">
+    <x title="#phi response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_m_subleading -->
+  <h id="jet_response_m_subleading" type="TH1F" title="Mass response - subleading jet">
+    <x title="Mass response" n="10000" lo="-1." hi="99."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_m_pt_subleading -->
+  <h id="jet_response_m_pt_subleading" type="TH2F" title="Mass response vs Truth jet p_{T} - subleading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Mass response"         n="10000" lo="-1." hi="99."/>
+  </h> 
+
+
+<!-- m_jet_response_pt_subleading -->
+  <h id="jet_response_pt_subleading" type="TH1F" title="p_{T} response - subleading jet">
+    <x title="p_{T} response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_eta_subleading -->
+  <h id="jet_response_eta_subleading" type="TH1F" title="#eta response - subleading jet">
+    <x title="#eta response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_phi_subleading -->
+  <h id="jet_response_phi_subleading" type="TH1F" title="#phi response - subleading jet">
+    <x title="#phi response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_add_eta -->
+  <h id="jet_response_add_eta" type="TH1F" title="#eta additive response - all jets">
+    <x title="#eta additive response" n="1000" lo="-2." hi="2."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_add_eta_2leadings -->
+  <h id="jet_response_add_eta_2leadings" type="TH1F" title="#eta additive response - 2 leadings jets">
+    <x title="#eta additive response" n="1000" lo="-2." hi="2."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_add_eta_leading -->
+  <h id="jet_response_add_eta_leading" type="TH1F" title="#eta additive response - leading jet">
+    <x title="#eta additive response" n="1000" lo="-2." hi="2."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_add_eta_subleading -->
+  <h id="jet_response_add_eta_subleading" type="TH1F" title="#eta additive response - subleading jets">
+    <x title="#eta additive response" n="1000" lo="-2." hi="2."/>
+    <y title="Entries"/>
+  </h> 
+  
+  <!-- m_jet_response_add_eta_pt -->
+  <h id="jet_response_add_eta_pt" type="TH2F" title="#eta additive response vs truth p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="#eta additive response" n="1000" lo="-2." hi="2."/>
+  </h> 
+
+<!-- m_jet_response_add_eta_pt_2leadings -->
+  <h id="jet_response_add_eta_pt_2leadings" type="TH2F" title="#eta additive response vs truth p_{T} - 2 leadings jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="#eta additive response" n="1000" lo="-2." hi="2."/>
+  </h> 
+
+<!-- m_jet_response_add_eta_pt_leading -->
+  <h id="jet_response_add_eta_pt_leading" type="TH2F" title="#eta additive response vs truth p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="#eta additive response" n="1000" lo="-2." hi="2."/>
+  </h> 
+
+<!-- m_jet_response_add_eta_pt_subleading -->
+  <h id="jet_response_add_eta_pt_subleading" type="TH2F" title="#eta additive response vs truth p_{T} - subleading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="#eta additive response" n="1000" lo="-2." hi="2."/>
+  </h> 
+  
+<!-- m_jet_response_m_npv -->
+  <h id="jet_response_m_npv" type="TH2F" title="Mass response vs NPV - all jets">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="Mass response" n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_response_m_npv_2leadings -->
+  <h id="jet_response_m_npv_2leadings" type="TH2F" title="Mass response vs NPV - 2 leading jets">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="Mass response" n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_response_m_npv_leading -->
+  <h id="jet_response_m_npv_leading" type="TH2F" title="Mass response vs NPV - leading jet">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="Mass response" n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_response_m_npv_subleading -->
+  <h id="jet_response_m_npv_subleading" type="TH2F" title="Mass response vs NPV - subleading jets">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="Mass response" n="10000" lo="-1." hi="99."/>
+  </h> 
+
+  <!-- m_jet_response_d2_pt -->
+  <h id="jet_response_d2_pt" type="TH2F" title="D_{2} response vs Truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="D_{2} response"        n="10000" lo="-1." hi="99."/>
+  </h> 
+
+  <!-- m_jet_response_d2_pt_2leadings -->
+  <h id="jet_response_d2_pt_2leadings" type="TH2F" title="D_{2} response vs Truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="D_{2} response"        n="10000" lo="-1." hi="99."/>
+  </h> 
+
+  <!-- m_jet_response_d2_pt_leading -->
+  <h id="jet_response_d2_pt_leading" type="TH2F" title="D_{2} response vs Truth jet p_{T} - leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="D_{2} response"        n="10000" lo="-1." hi="99."/>
+  </h> 
+
+  <!-- m_jet_response_d2_pt_subleading -->
+  <h id="jet_response_d2_pt_subleading" type="TH2F" title="D_{2} response vs Truth jet p_{T} - subleading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="D_{2} response"        n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+  <!-- m_jet_response_add_d2_pt -->
+  <h id="jet_response_add_d2_pt" type="TH2F" title="D_{2} additive response vs Truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="D_{2} additive response"       n="200000" lo="-1000." hi="1000."/>
+  </h> 
+
+  <!-- m_jet_response_add_d2_pt_2leadings -->
+  <h id="jet_response_add_d2_pt_2leadings" type="TH2F" title="D_{2} additive response vs Truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="D_{2} additive response"       n="200000" lo="-1000." hi="1000."/>
+  </h> 
+
+  <!-- m_jet_response_add_d2_pt_leading -->
+  <h id="jet_response_add_d2_pt_leading" type="TH2F" title="D_{2} additive response vs Truth jet p_{T} - leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="D_{2} additive response"       n="200000" lo="-1000." hi="1000."/>
+  </h> 
+
+  <!-- m_jet_response_add_d2_pt_subleading -->
+  <h id="jet_response_add_d2_pt_subleading" type="TH2F" title="D_{2} additive response vs Truth jet p_{T} - subleading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="D_{2} additive response"       n="200000" lo="-1000." hi="1000."/>
+  </h> 
+  
+<!-- m_jet_pseudoresponse_m -->
+  <h id="jet_pseudoresponse_m" type="TH1F" title="Mass pseudo response - all jets">
+    <x title="Mass pseudoresponse" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_pseudoresponse_pt -->
+  <h id="jet_pseudoresponse_pt" type="TH1F" title="p_{T} pseudo response - all jets">
+    <x title="p_{T} pseudo response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_pseudoresponse_m_2leadings -->
+  <h id="jet_pseudoresponse_m_2leadings" type="TH1F" title="Mass pseudo response - 2 leading jets">
+    <x title="Mass pseudo response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_pseudoresponse_pt_2leadings -->
+  <h id="jet_pseudoresponse_pt_2leadings" type="TH1F" title="p_{T} pseudo response - 2 leading jets">
+    <x title="p_{T} pseudo response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_pseudoresponse_m_leading -->
+  <h id="jet_pseudoresponse_m_leading" type="TH1F" title="Mass pseudo response - leading jet">
+    <x title="Mass pseudo response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_pseudoresponse_pt_leading -->
+  <h id="jet_pseudoresponse_pt_leading" type="TH1F" title="p_{T} pseudo response - leading jet">
+    <x title="p_{T} pseudo response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_pseudoresponse_m_subleading -->
+  <h id="jet_pseudoresponse_m_subleading" type="TH1F" title="Mass pseudo response - subleading jet">
+    <x title="Mass pseudo response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_pseudoresponse_pt_subleading -->
+  <h id="jet_pseudoresponse_pt_subleading" type="TH1F" title="p_{T} pseudo response - subleading jet">
+    <x title="p_{T} pseudo response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_pseudoresponse_notcalib_pt -->
+  <h id="jet_pseudoresponse_notcalib_pt" type="TH1F" title="p_{T} pseudo response - all jets">
+    <x title="p_{T} pseudo response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_pseudoresponse_notcalib_pt_2leadings -->
+  <h id="jet_pseudoresponse_notcalib_pt_2leadings" type="TH1F" title="p_{T} pseudo response - 2 leading jets">
+    <x title="p_{T} pseudo response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_pseudoresponse_notcalib_pt_leading -->
+  <h id="jet_pseudoresponse_notcalib_pt_leading" type="TH1F" title="p_{T} pseudo response - leading jet">
+    <x title="p_{T} pseudo response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_pseudoresponse_notcalib_pt_subleading -->
+  <h id="jet_pseudoresponse_notcalib_pt_subleading" type="TH1F" title="p_{T} pseudo response - subleading jet">
+    <x title="p_{T} pseudo response" n="500" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_d2 -->
+  <h id="jet_d2" type="TH1F" title="D_{2} - all jets">
+    <x title="D_{2}" n="100" lo="0." hi="50."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_d2_2leadings -->
+  <h id="jet_d2_2leadings" type="TH1F" title="D_{2} - 2 leading jets">
+    <x title="D_{2}" n="100" lo="0." hi="50."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_d2_leading -->
+  <h id="jet_d2_leading" type="TH1F" title="D_{2} - leading jet">
+    <x title="D_{2}" n="100" lo="0." hi="50."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_d2_subleading -->
+  <h id="jet_d2_subleading" type="TH1F" title="D_{2} - subleading jet">
+    <x title="D_{2}" n="100" lo="0." hi="50."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_d2_massCut -->
+  <h id="jet_d2_massCut" type="TH1F" title="D_{2} after mass cut - all jets">
+    <x title="D_{2}" n="100" lo="0." hi="50."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_d2_2leadings_massCut -->
+  <h id="jet_d2_2leadings_massCut" type="TH1F" title="D_{2} after mass cut - 2 leading jets">
+    <x title="D_{2}" n="100" lo="0." hi="50."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_d2_leading_massCut -->
+  <h id="jet_d2_leading_massCut" type="TH1F" title="D_{2} after mass cut - leading jet">
+    <x title="D_{2}" n="100" lo="0." hi="50."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_d2_subleading_massCut -->
+  <h id="jet_d2_subleading_massCut" type="TH1F" title="D_{2} after mass cut - subleading jet">
+    <x title="D_{2}" n="100" lo="0." hi="50."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_jet_response_d2 -->
+  <h id="jet_response_d2" type="TH1F" title="D_{2} response - all jets">
+    <x title="D_{2} response" n="10000" lo="-1." hi="99."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_d2_2leadings -->
+  <h id="jet_response_d2_2leadings" type="TH1F" title="D_{2} response - 2 leading jets">
+    <x title="D_{2} response" n="10000" lo="-1." hi="99."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_d2_leading -->
+  <h id="jet_response_d2_leading" type="TH1F" title="D_{2} response - leading jet">
+    <x title="D_{2} response" n="10000" lo="-1." hi="99."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_d2_subleading -->
+  <h id="jet_response_d2_subleading" type="TH1F" title="D_{2} response - subleading jet">
+    <x title="D_{2} response" n="10000" lo="-1." hi="99."/>
+    <y title="Entries"/>
+  </h> 
+  
+  <!-- m_jet_response_add_d2 -->
+  <h id="jet_response_add_d2" type="TH1F" title="D_{2} additive response - all jets">
+    <x title="D_{2} additive response" n="20000" lo="-100." hi="100."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_add_d2_2leadings -->
+  <h id="jet_response_add_d2_2leadings" type="TH1F" title="D_{2} additive response - 2 leading jets">
+    <x title="D_{2} additive response" n="20000" lo="-100." hi="100."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_response_add_d2_leading -->
+  <h id="jet_response_add_d2_leading" type="TH1F" title="D_{2} additive response - leading jet">
+    <x title="D_{2} additive response" n="20000" lo="-100." hi="100."/>
+    <y title="Entries"/>
+  </h> 
+
+<!-- m_jet_response_add_d2_subleading -->
+  <h id="jet_response_add_d2_subleading" type="TH1F" title="D_{2} additive response - subleading jet">
+    <x title="D_{2} additive response" n="20000" lo="-100." hi="100."/>
+    <y title="Entries"/>
+  </h> 
+  
+<!-- m_jet_resolution_m -->
+  <h id="jet_resolution_m" type="TH1F" title="Mass resolution - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_resolution_m_2leadings -->
+  <h id="jet_resolution_m_2leadings" type="TH1F" title="Mass resolution - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_resolution_m_leading -->
+  <h id="jet_resolution_m_leading" type="TH1F" title="Mass resolution - leading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_resolution_m_subleading -->
+  <h id="jet_resolution_m_subleading" type="TH1F" title="Mass resolution - subleading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+  
+<!-- m_jet_resolution_m_npv -->
+  <h id="jet_resolution_m_npv" type="TH1F" title="Mass resolution - all jets">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_resolution_m_npv_2leadings -->
+  <h id="jet_resolution_m_npv_2leadings" type="TH1F" title="Mass resolution - 2 leading jets">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_resolution_m_npv_leading -->
+  <h id="jet_resolution_m_npv_leading" type="TH1F" title="Mass resolution - leading jet">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_resolution_m_npv_subleading -->
+  <h id="jet_resolution_m_npv_subleading" type="TH1F" title="Mass resolution - subleading jet">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+ 
+<!-- m_jet_median_width_m_npv -->
+  <h id="jet_median_width_m_npv" type="TH1F" title="Mass resolution - all jets">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="median(R_{m}) with 0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_median_width_m_npv_2leadings -->
+  <h id="jet_median_width_m_npv_2leadings" type="TH1F" title="Mass resolution - 2 leading jets">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="median(R_{m}) with 0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_median_width_m_npv_leading -->
+  <h id="jet_median_width_m_npv_leading" type="TH1F" title="Mass resolution - leading jet">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="median(R_{m}) with 0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_median_width_m_npv_subleading -->
+  <h id="jet_median_width_m_npv_subleading" type="TH1F" title="Mass resolution - subleading jet">
+    <x title="NPV" n="80"    lo="-.5" hi="79.5"/>
+    <y title="median(R_{m}) with 0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h>
+
+<!-- m_jet_resolution_d2 -->
+  <h id="jet_resolution_d2" type="TH1F" title="D_{2} resolution vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{D_{2}})/median(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_resolution_d2_2leadings -->
+  <h id="jet_resolution_d2_2leadings" type="TH1F" title="D_{2} resolution vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{D_{2}})/median(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_resolution_d2_leading -->
+  <h id="jet_resolution_d2_leading" type="TH1F" title="D_{2} resolution vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{D_{2}})/median(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_resolution_d2_subleading -->
+  <h id="jet_resolution_d2_subleading" type="TH1F" title="D_{2} resolution vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{D_{2}})/median(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_resolution_add_d2 -->
+  <h id="jet_resolution_add_d2" type="TH1F" title="D_{2} resolution vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_resolution_add_d2_2leadings -->
+  <h id="jet_resolution_add_d2_2leadings" type="TH1F" title="D_{2} resolution vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_resolution_add_d2_leading -->
+  <h id="jet_resolution_add_d2_leading" type="TH1F" title="D_{2} resolution vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_resolution_add_d2_subleading -->
+  <h id="jet_resolution_add_d2_subleading" type="TH1F" title="D_{2} resolution vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_mopt_pt_response_m -->
+  <h id="jet_mopt_pt_response_m" type="TH3F" title="Mass response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="Mass response"                 n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_m_2leadings -->
+  <h id="jet_mopt_pt_response_m_2leadings" type="TH3F" title="Mass response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="Mass response"                 n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_m_leading -->
+  <h id="jet_mopt_pt_response_m_leading" type="TH3F" title="Mass response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="Mass response"                 n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_m_subleading -->
+  <h id="jet_mopt_pt_response_m_subleading" type="TH3F" title="Mass response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="Mass response"                 n="10000" lo="-1." hi="99."/>
+  </h> 
+
+<!-- m_jet_mopt_pt_response_pt -->
+  <h id="jet_mopt_pt_response_pt" type="TH3F" title="p_{T} response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="p_{T} response"                 n="500" lo="0." hi="5."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_pt_2leadings -->
+  <h id="jet_mopt_pt_response_pt_2leadings" type="TH3F" title="p_{T} response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="p_{T} response"                 n="500" lo="0." hi="5."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_pt_leading -->
+  <h id="jet_mopt_pt_response_pt_leading" type="TH3F" title="p_{T} response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="p_{T} response"                 n="500" lo="0." hi="5."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_pt_subleading -->
+  <h id="jet_mopt_pt_response_pt_subleading" type="TH3F" title="p_{T} response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="p_{T} response"                 n="500" lo="0." hi="5."/>
+  </h> 
+
+<!-- m_jet_mopt_pt_response_eta -->
+  <h id="jet_mopt_pt_response_eta" type="TH3F" title="#eta response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="#eta response"                 n="500" lo="0." hi="5."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_eta_2leadings -->
+  <h id="jet_mopt_pt_response_eta_2leadings" type="TH3F" title="#eta response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="#eta response"                 n="500" lo="0." hi="5."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_eta_leading -->
+  <h id="jet_mopt_pt_response_eta_leading" type="TH3F" title="#eta response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="#eta response"                 n="500" lo="0." hi="5."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_eta_subleading -->
+  <h id="jet_mopt_pt_response_eta_subleading" type="TH3F" title="#eta response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="#eta response"                 n="500" lo="0." hi="5."/>
+  </h> 
+
+<!-- m_jet_mopt_pt_response_phi -->
+  <h id="jet_mopt_pt_response_phi" type="TH3F" title="#phi response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="#phi response"                 n="500" lo="0." hi="5."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_phi_2leadings -->
+  <h id="jet_mopt_pt_response_phi_2leadings" type="TH3F" title="#phi response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="#phi response"                 n="500" lo="0." hi="5."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_phi_leading -->
+  <h id="jet_mopt_pt_response_phi_leading" type="TH3F" title="#phi response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="#phi response"                 n="500" lo="0." hi="5."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_phi_subleading -->
+  <h id="jet_mopt_pt_response_phi_subleading" type="TH3F" title="#phi response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="#phi response"                 n="500" lo="0." hi="5."/>
+  </h> 
+
+<!-- m_jet_mopt_pt_response_d2 -->
+  <h id="jet_mopt_pt_response_d2" type="TH3F" title="D_{2} response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="D_{2} response"                 n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_d2_2leadings -->
+  <h id="jet_mopt_pt_response_d2_2leadings" type="TH3F" title="D_{2} response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="D_{2} response"                 n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_d2_leading -->
+  <h id="jet_mopt_pt_response_d2_leading" type="TH3F" title="D_{2} response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="D_{2} response"                 n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_mopt_pt_response_d2_subleading -->
+  <h id="jet_mopt_pt_response_d2_subleading" type="TH3F" title="D_{2} response vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]"         n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="D_{2} response"                 n="10000" lo="-1." hi="99."/>
+  </h> 
+  
+<!-- m_jet_resolution_mopt_pt_m -->
+  <h id="jet_resolution_mopt_pt_m" type="TH2F" title="Mass resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_m_2leadings -->
+  <h id="jet_resolution_mopt_pt_m_2leadings" type="TH2F" title="Mass resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h>
+  
+<!-- m_jet_resolution_mopt_pt_m_2leadings_test -->
+  <h id="jet_resolution_mopt_pt_m_2leadings_test" type="TH1F" title="Mass resolution TEST - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_m_leading -->
+  <h id="jet_resolution_mopt_pt_m_leading" type="TH2F" title="Mass resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_m_subleading -->
+  <h id="jet_resolution_mopt_pt_m_subleading" type="TH2F" title="Mass resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{m})/median(R_{m})" />
+  </h> 
+  
+<!-- m_jet_resolution_mopt_pt_pt -->
+  <h id="jet_resolution_mopt_pt_pt" type="TH2F" title="p_{T} resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{p_{T}})/median(R_{p_{T}})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_pt_2leadings -->
+  <h id="jet_resolution_mopt_pt_pt_2leadings" type="TH2F" title="p_{T} resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{p_{T}})/median(R_{p_{T}})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_pt_leading -->
+  <h id="jet_resolution_mopt_pt_pt_leading" type="TH2F" title="p_{T} resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{p_{T}})/median(R_{p_{T}})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_pt_subleading -->
+  <h id="jet_resolution_mopt_pt_pt_subleading" type="TH2F" title="p_{T} resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{p_{T}})/median(R_{p_{T}})" />
+  </h> 
+  
+<!-- m_jet_resolution_mopt_pt_eta -->
+  <h id="jet_resolution_mopt_pt_eta" type="TH2F" title="#eta resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{#eta})/median(R_{#eta})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_eta_2leadings -->
+  <h id="jet_resolution_mopt_pt_eta_2leadings" type="TH2F" title="#eta resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{#eta})/median(R_{#eta})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_eta_leading -->
+  <h id="jet_resolution_mopt_pt_eta_leading" type="TH2F" title="#eta resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{#eta})/median(R_{#eta})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_eta_subleading -->
+  <h id="jet_resolution_mopt_pt_eta_subleading" type="TH2F" title="#eta resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{#eta})/median(R_{#eta})" />
+  </h> 
+  
+<!-- m_jet_resolution_mopt_pt_phi -->
+  <h id="jet_resolution_mopt_pt_phi" type="TH2F" title="#phi resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{#phi})/median(R_{#phi})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_phi_2leadings -->
+  <h id="jet_resolution_mopt_pt_phi_2leadings" type="TH2F" title="#phi resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{#phi})/median(R_{#phi})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_phi_leading -->
+  <h id="jet_resolution_mopt_pt_phi_leading" type="TH2F" title="#phi resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{#phi})/median(R_{#phi})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_phi_subleading -->
+  <h id="jet_resolution_mopt_pt_phi_subleading" type="TH2F" title="#phi resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{#phi})/median(R_{#phi})" />
+  </h> 
+  
+<!-- m_jet_resolution_mopt_pt_d2 -->
+  <h id="jet_resolution_mopt_pt_d2" type="TH2F" title="D_{2} resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - all jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{D_{2}})/median(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_d2_2leadings -->
+  <h id="jet_resolution_mopt_pt_d2_2leadings" type="TH2F" title="D_{2} resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - 2 leading jets">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{D_{2}})/median(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_d2_leading -->
+  <h id="jet_resolution_mopt_pt_d2_leading" type="TH2F" title="D_{2} resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - leading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{D_{2}})/median(R_{D_{2}})" />
+  </h> 
+
+<!-- m_jet_resolution_mopt_pt_d2_subleading -->
+  <h id="jet_resolution_mopt_pt_d2_subleading" type="TH2F" title="D_{2} resolution vs truth jet Mass / truth jet p_{T} vs truth jet p_{T} - subleading jet">
+    <x title="Truth jet p_{T} [GeV]" n="18"  lo="200." hi="4000."/>
+    <y title="Truth jet Mass / jet p_{T}"    n="20"  lo="0."   hi="1."/>
+    <z title="0.5 x 68 % IQnR(R_{D_{2}})/median(R_{D_{2}})" />
+  </h> 
+   
+  <!-- m_trk_d0 -->
+  <h id="trk_d0" type="TH1F" title="d_{0}">
+    <x title="Track d_{0} [mm]" n="400"  lo="-100." hi="100."/>
+    <y title="Entries" />
+  </h> 
+  
+  <!-- m_trk_z0 -->
+  <h id="trk_z0" type="TH1F" title="z_{0}">
+    <x title="Track z_{0} [mm]" n="300"  lo="-300." hi="300."/>
+    <y title="Entries" />
+  </h> 
+  
+  <!-- m_trk_theta -->
+  <h id="trk_theta" type="TH1F" title="#theta">
+    <x title="Track #theta [rad]" n="250"  lo="0." hi="4."/>
+    <y title="Entries" />
+  </h>  
+  
+  <!-- m_trk_phi -->
+  <h id="trk_phi" type="TH1F" title="#phi">
+    <x title="Track #phi [rad]" n="500"  lo="-4." hi="4."/>
+    <y title="Entries" />
+  </h> 
+  
+  <!-- m_trk_qOverP -->
+  <h id="trk_qOverP" type="TH1F" title="q/p">
+    <x title="Track q/p [MeV^{-1}]" n="200"  lo="-0.0001" hi="0.0001"/>
+    <y title="Entries" />
+  </h> 
+    
+  <!-- m_trk_d0_eta -->
+  <h id="trk_d0_eta" type="TH2F" title="d_{0} vs track #eta">
+    <x title="Track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Track d_{0} [mm]" n="400"  lo="-100." hi="100."/>
+  </h>
+  
+  <!-- m_trk_z0_eta -->
+  <h id="trk_z0_eta" type="TH2F" title="z_{0} vs track #eta">
+    <x title="Track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Track z_{0} [mm]" n="300"  lo="-300." hi="300."/>
+  </h> 
+  
+  <!-- m_trk_theta_eta -->
+  <h id="trk_theta_eta" type="TH2F" title="#theta vs track #eta">
+    <x title="Track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Track #theta [rad]" n="250"  lo="0." hi="4."/>
+  </h>  
+  
+  <!-- m_trk_phi_eta -->
+  <h id="trk_phi_eta" type="TH2F" title="#phi vs track #eta">
+    <x title="Track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Track #phi [rad]" n="500"  lo="-4." hi="4."/>
+  </h> 
+  
+  <!-- m_trk_qOverP_eta -->
+  <h id="trk_qOverP_eta" type="TH2F" title="q/p vs track #eta">
+    <x title="Track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Track q/p [MeV^{-1}]" n="200"  lo="-0.0001" hi="0.0001"/>
+  </h> 
+  
+  <!-- m_trk_d0_pt -->
+  <h id="trk_d0_pt" type="TH2F" title="d_{0} vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Track d_{0} [mm]" n="400"  lo="-100." hi="100."/>
+  </h>
+  
+  <!-- m_trk_z0_pt -->
+  <h id="trk_z0_pt" type="TH2F" title="z_{0} vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Track z_{0} [mm]" n="300"  lo="-300." hi="300."/>
+  </h> 
+  
+  <!-- m_trk_theta_pt -->
+  <h id="trk_theta_pt" type="TH2F" title="#theta vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Track #theta [rad]" n="250"  lo="0." hi="4."/>
+  </h>  
+  
+  <!-- m_trk_phi_pt -->
+  <h id="trk_phi_pt" type="TH2F" title="#phi vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Track #phi [rad]" n="500"  lo="-4." hi="4."/>
+  </h> 
+  
+  <!-- m_trk_qOverP_pt -->
+  <h id="trk_qOverP_pt" type="TH2F" title="q/p vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Track q/p [MeV^{-1}]" n="200"  lo="-0.0001" hi="0.0001"/>
+  </h> 
+  
+  <!-- m_trk_caloEntryEta -->
+  <h id="trk_caloEntryEta" type="TH1F" title="calo entry #eta">
+    <x title="Calo Entry #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h> 
+  
+  <!-- m_trk_caloEntryEtaOverEta_eta -->
+  <h id="trk_caloEntryEtaOverEta_eta" type="TH2F" title="calo entry #eta/track #eta vs track #eta">
+    <x title="Track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Calo Entry #eta / track #eta" n="500" lo="-4." hi="4."/>
+  </h>
+
+  <!-- m_trk_caloEntryEtaOverEta_pt -->
+  <h id="trk_caloEntryEtaOverEta_pt" type="TH2F" title="calo entry #eta/track #eta vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Calo Entry #eta / track #eta" n="500" lo="-4." hi="4."/>
+  </h>
+  
+  <!-- m_trk_caloEntryPhi -->
+  <h id="trk_caloEntryPhi" type="TH1F" title="calo entry #phi">
+    <x title="Calo Entry #phi [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h> 
+  
+  <!-- m_trk_caloEntryPhiOverEta_eta -->
+  <h id="trk_caloEntryPhiOverPhi_eta" type="TH2F" title="calo entry #phi/track #phi vs track #eta">
+    <x title="Track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Calo Entry #phi / track #phi" n="500" lo="-4." hi="4."/>
+  </h>
+
+  <!-- m_trk_caloEntryPhiOverEta_pt -->
+  <h id="trk_caloEntryPhiOverPhi_pt" type="TH2F" title="calo entry #phi/track #phi vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Calo Entry #phi / track #phi" n="500" lo="-4." hi="4."/>
+  </h>
+   
+  <!-- m_trk_caloEntryUncEta_caloEntryEta -->
+  <h id="trk_caloEntryUncEta_caloEntryEta" type="TH2F" title="calo entry #sigma(#eta) vs calo entry #eta">
+    <x title="Calo Entry #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Calo Entry #sigma(#eta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_caloEntryUncEta_eta -->
+  <h id="trk_caloEntryUncEta_eta" type="TH2F" title="calo entry #sigma(#eta) vs track #eta">
+    <x title="track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Calo Entry #sigma(#eta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_caloEntryUncEta_pt -->
+  <h id="trk_caloEntryUncEta_pt" type="TH2F" title="calo entry #sigma(#eta) vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Calo Entry #sigma(#eta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_caloEntryUncTheta_eta -->
+  <h id="trk_caloEntryUncTheta_eta" type="TH2F" title="calo entry #sigma(#theta) vs track #eta">
+    <x title="track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Calo Entry #sigma(#theta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_caloEntryUncTheta_pt -->
+  <h id="trk_caloEntryUncTheta_pt" type="TH2F" title="calo entry #sigma(#theta) vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Calo Entry #sigma(#theta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- trk_prodRadius -->
+  <h id="trk_prodRadius" type="TH1F" title="truth production radius">
+    <x title="Truth Production Radius [mm]" n="100" lo="0." hi="2."/>
+    <y title="Entries"/>
+  </h>
+    
+  <!-- m_trk_caloEntryUncEta_prodRadius -->
+  <h id="trk_caloEntryUncEta_prodRadius" type="TH2F" title="calo entry #sigma(#eta) vs truth production radius">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Calo Entry #sigma(#eta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_caloEntryUncTheta_prodRadius -->
+  <h id="trk_caloEntryUncTheta_prodRadius" type="TH2F" title="calo entry #sigma(#theta) vs truth production radius">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Calo Entry #sigma(#theta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_caloEntryUncPhi_caloEntryPhi -->
+  <h id="trk_caloEntryUncPhi_caloEntryPhi" type="TH2F" title="calo entry #sigma(#phi) vs calo entry #eta">
+    <x title="Calo Entry #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Calo Entry #sigma(#phi)" n="500" lo="0" hi="0.1"/>
+  </h>
+  
+  <!-- m_trk_caloEntryUncPhi_eta -->
+  <h id="trk_caloEntryUncPhi_eta" type="TH2F" title="calo entry #sigma(#phi) vs track #eta">
+    <x title="track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Calo Entry #sigma(#phi)" n="500" lo="0" hi="0.1"/>
+  </h>
+  
+  <!-- m_trk_caloEntryUncPhi_pt -->
+  <h id="trk_caloEntryUncPhi_pt" type="TH2F" title="calo entry #sigma(#phi) vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Calo Entry #sigma(#phi)" n="500" lo="0" hi="0.1"/>
+  </h>
+    
+  <!-- m_trk_caloEntryUncPhi_prodRadius -->
+  <h id="trk_caloEntryUncPhi_prodRadius" type="TH2F" title="calo entry #sigma(#phi) vs truth production radius">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Calo Entry #sigma(#phi)" n="500" lo="0" hi="0.1"/>
+  </h>
+  
+  <!-- m_trk_caloEntryUncTot_eta -->
+  <h id="trk_caloEntryUncTot_eta" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track #eta">
+    <x title="track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_caloEntryUncTot_pt -->
+  <h id="trk_caloEntryUncTot_pt" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>
+    
+  <!-- m_trk_caloEntryUncTot_prodRadius -->
+  <h id="trk_caloEntryUncTot_prodRadius" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs truth production radius">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_perigeeEta -->
+  <h id="trk_perigeeEta" type="TH1F" title="Perigee #eta">
+    <x title="Perigee #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h> 
+  
+  <!-- m_trk_perigeeUncEta_eta -->
+  <h id="trk_perigeeUncEta_eta" type="TH2F" title="perigee #sigma(#eta) vs track #eta">
+    <x title="track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Perigee #sigma(#eta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_perigeeUncEta_pt -->
+  <h id="trk_perigeeUncEta_pt" type="TH2F" title="perigee #sigma(#eta) vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Perigee #sigma(#eta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_perigeeUncTheta_eta -->
+  <h id="trk_perigeeUncTheta_eta" type="TH2F" title="perigee #sigma(#theta) vs track #eta">
+    <x title="track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Perigee #sigma(#theta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_perigeeUncTheta_pt -->
+  <h id="trk_perigeeUncTheta_pt" type="TH2F" title="perigee #sigma(#theta) vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Perigee #sigma(#theta)" n="500" lo="0" hi="1."/>
+  </h>
+    
+  <!-- m_trk_perigeeUncEta_prodRadius -->
+  <h id="trk_perigeeUncEta_prodRadius" type="TH2F" title="perigee #sigma(#eta) vs truth production radius">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Perigee #sigma(#eta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_perigeeUncTheta_prodRadius -->
+  <h id="trk_perigeeUncTheta_prodRadius" type="TH2F" title="perigee #sigma(#theta) vs truth production radius">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Perigee #sigma(#theta)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_perigeePhi -->
+  <h id="trk_perigeePhi" type="TH1F" title="Perigee #phi">
+    <x title="Perigee #phi [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h> 
+  
+  <!-- m_trk_perigeeUncPhi_eta -->
+  <h id="trk_perigeeUncPhi_eta" type="TH2F" title="perigee #sigma(#phi) vs track #eta">
+    <x title="track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Perigee #sigma(#phi)" n="500" lo="0" hi="0.1"/>
+  </h>
+  
+  <!-- m_trk_perigeeUncPhi_pt -->
+  <h id="trk_perigeeUncPhi_pt" type="TH2F" title="perigee #sigma(#phi) vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Perigee #sigma(#phi)" n="500" lo="0" hi="0.1"/>
+  </h>
+    
+  <!-- m_trk_perigeeUncPhi_prodRadius -->
+  <h id="trk_perigeeUncPhi_prodRadius" type="TH2F" title="perigee #sigma(#phi) vs truth production radius">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Perigee #sigma(#phi)" n="500" lo="0" hi="0.1"/>
+  </h>
+  
+  <!-- m_trk_perigeeUncTot_eta -->
+  <h id="trk_perigeeUncTot_eta" type="TH2F" title="perigee #sigma(#Delta R) vs track #eta">
+    <x title="track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Perigee #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_perigeeUncTot_pt -->
+  <h id="trk_perigeeUncTot_pt" type="TH2F" title="perigee #sigma(#Delta R) vs track p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Perigee #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+    
+  <!-- m_trk_perigeeUncTot_prodRadius -->
+  <h id="trk_perigeeUncTot_prodRadius" type="TH2F" title="perigee #sigma(#Delta R) vs truth production radius">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Perigee #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_perigeeUncEta_caloUncEta   -->
+  <h id="trk_perigeeUncEta_caloUncEta" type="TH2F" title="perigee #sigma(#eta) vs calo entry #sigma(#eta)">
+    <x title="Calo Entry #sigma(#eta)" n="250"  lo="0" hi="1."/>
+    <y title="Perigee #sigma(#eta)"    n="250"  lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_perigeeUncTheta_caloUncTheta   -->
+  <h id="trk_perigeeUncTheta_caloUncTheta" type="TH2F" title="perigee #sigma(#theta) vs calo entry #sigma(#theta)">
+    <x title="Calo Entry #sigma(#theta)"  n="250" lo="0" hi="1."/>
+    <y title="Perigee #sigma(#theta)"     n="250" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_perigeeUncPhi_caloUncPhi   -->
+  <h id="trk_perigeeUncPhi_caloUncPhi" type="TH2F" title="perigee #sigma(#phi) vs calo entry #sigma(#phi)">
+    <x title="Calo Entry #sigma(#phi)" n="250" lo="0" hi="0.1"/>
+    <y title="Perigee #sigma(#phi)"    n="250" lo="0" hi="0.1"/>
+  </h>
+  
+  <!-- m_trk_perigeeUncTot_caloUncTot   -->
+  <h id="trk_perigeeUncTot_caloUncTot" type="TH2F" title="perigee #sigma(#Delta R) vs Extrapolated track angular uncertainty, #sigma(#Delta R)">
+    <x title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+    <y title="Perigee #sigma(#Delta R)"    n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- trk_delta_perigeeEta_caloEntryEta -->
+  <h id="trk_delta_perigeeEta_caloEntryEta" type="TH1F" title="(calo entry #eta - perigee #eta)">
+    <x title="calo entry #eta - perigee #eta"  n="400" lo="-0.4" hi="0.4"/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- trk_delta_perigeePhi_caloEntryPhi -->
+  <h id="trk_delta_perigeePhi_caloEntryPhi" type="TH1F" title="(calo entry #phi - perigee #phi)">
+    <x title="calo entry #phi - perigee #phi"  n="100" lo="-0.1" hi="0.1"/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- trk_delta_perigeeEta_caloEntryEta_eta" -->
+  <h id="trk_delta_perigeeEta_caloEntryEta_eta" type="TH2F" title="(calo entry #eta - perigee #eta) vs #eta">
+    <x title="track #eta [rad]"  n="500" lo="-4." hi="4."/>
+    <y title="(calo entry #eta - perigee #eta)" n="400" lo="-0.4" hi="0.4"/>
+  </h>
+  
+  <!-- trk_delta_perigeePhi_caloEntryPhi_eta" -->
+  <h id="trk_delta_perigeePhi_caloEntryPhi_eta" type="TH2F" title="(calo entry #phi - perigee #phi) vs #eta">
+    <x title="track #eta [rad]"  n="500" lo="-4." hi="4."/>
+    <y title="(calo entry #phi - perigee #phi)" n="100" lo="-0.1" hi="0.1"/>
+  </h>
+  
+  <!-- trk_delta_perigeeEta_caloEntryEta_pt" -->
+  <h id="trk_delta_perigeeEta_caloEntryEta_pt" type="TH2F" title="(calo entry #eta - perigee #eta) vs p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="(calo entry #eta - perigee #eta)" n="400" lo="-0.4" hi="0.4"/>
+  </h>
+  
+  <!-- trk_delta_perigeePhi_caloEntryPhi_pt" -->
+  <h id="trk_delta_perigeePhi_caloEntryPhi_pt" type="TH2F" title="(calo entry #phi - perigee #phi) vs p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="(calo entry #phi - perigee #phi)" n="100" lo="-0.1" hi="0.1"/>
+  </h>
+  
+  <!-- trk_delta_trackEta_caloEntryEta -->
+  <h id="trk_delta_trackEta_caloEntryEta" type="TH1F" title="(calo entry #eta - track #eta)">
+    <x title="calo entry #eta - track #eta"  n="400" lo="-0.4" hi="0.4"/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- trk_delta_trackPhi_caloEntryPhi -->
+  <h id="trk_delta_trackPhi_caloEntryPhi" type="TH1F" title="(calo entry #phi - track #phi)">
+    <x title="calo entry #phi - track #phi"  n="100" lo="-0.1" hi="0.1"/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- trk_delta_trackEta_caloEntryEta_eta" -->
+  <h id="trk_delta_trackEta_caloEntryEta_eta" type="TH2F" title="(calo entry #eta - track #eta) vs #eta">
+    <x title="track #eta [rad]"  n="500" lo="-4." hi="4."/>
+    <y title="(calo entry #eta - track #eta)" n="400" lo="-0.4" hi="0.4"/>
+  </h>
+  
+  <!-- trk_delta_trackPhi_caloEntryPhi_eta" -->
+  <h id="trk_delta_trackPhi_caloEntryPhi_eta" type="TH2F" title="(calo entry #phi - track #phi) vs #eta">
+    <x title="track #eta [rad]"  n="500" lo="-4." hi="4."/>
+    <y title="(calo entry #phi - track #phi)" n="100" lo="-0.1" hi="0.1"/>
+  </h>
+  
+  <!-- trk_delta_trackEta_caloEntryEta_pt" -->
+  <h id="trk_delta_trackEta_caloEntryEta_pt" type="TH2F" title="(calo entry #eta - track #eta) vs p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="(calo entry #eta - track #eta)" n="400" lo="-0.4" hi="0.4"/>
+  </h>
+  
+  <!-- trk_delta_trackPhi_caloEntryPhi_pt" -->
+  <h id="trk_delta_trackPhi_caloEntryPhi_pt" type="TH2F" title="(calo entry #phi - track #phi) vs p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="(calo entry #phi - track #phi)" n="100" lo="-0.1" hi="0.1"/>
+  </h>
+  
+  <!-- trk_delta_trackEta_caloEntryEtaCorr -->
+  <h id="trk_delta_trackEta_caloEntryEtaCorr" type="TH1F" title="(calo entry corr #eta - track #eta)">
+    <x title="calo entry corr #eta - track #eta"  n="100" lo="-0.01" hi="0.01"/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- trk_delta_trackPhi_caloEntryPhiCorr -->
+  <h id="trk_delta_trackPhi_caloEntryPhiCorr" type="TH1F" title="(calo entry corr #phi - track #phi)">
+    <x title="calo entry corr #phi - track #phi"  n="100" lo="-0.1" hi="0.1"/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- trk_delta_trackEta_caloEntryEtaCorr_eta" -->
+  <h id="trk_delta_trackEta_caloEntryEtaCorr_eta" type="TH2F" title="(calo entry corr #eta - track #eta) vs #eta">
+    <x title="track #eta [rad]"  n="500" lo="-4." hi="4."/>
+    <y title="(calo entry corr #eta - track #eta)" n="100" lo="-0.01" hi="0.01"/>
+  </h>
+  
+  <!-- trk_delta_trackPhi_caloEntryPhiCorr_eta" -->
+  <h id="trk_delta_trackPhi_caloEntryPhiCorr_eta" type="TH2F" title="(calo entry corr #phi - track #phi) vs #eta">
+    <x title="track #eta [rad]"  n="500" lo="-4." hi="4."/>
+    <y title="(calo entry corr #phi - track #phi)" n="100" lo="-0.1" hi="0.1"/>
+  </h>
+  
+  <!-- trk_delta_trackEta_caloEntryEtaCorr_pt" -->
+  <h id="trk_delta_trackEta_caloEntryEtaCorr_pt" type="TH2F" title="(calo entry corr #eta - track #eta) vs p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="(calo entry corr #eta - track #eta)" n="100" lo="-0.1" hi="0.1"/>
+  </h>
+  
+  <!-- trk_delta_trackPhi_caloEntryPhiCorr_pt" -->
+  <h id="trk_delta_trackPhi_caloEntryPhiCorr_pt" type="TH2F" title="(calo entry corr #phi - track #phi) vs p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="(calo entry corr #phi - track #phi)" n="100" lo="-0.1" hi="0.1"/>
+  </h>
+  
+  <!-- trk_delta_caloEntryEta_caloEntryEtaCorr -->
+  <h id="trk_delta_caloEntryEta_caloEntryEtaCorr" type="TH1F" title="(calo entry corr #eta - calo entry #eta)">
+    <x title="calo entry corr #eta - calo entry #eta"  n="400" lo="-0.4" hi="0.4"/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- trk_delta_caloEntryPhi_caloEntryPhiCorr -->
+  <h id="trk_delta_caloEntryPhi_caloEntryPhiCorr" type="TH1F" title="(calo entry corr #phi - calo entry #phi)">
+    <x title="calo entry corr #phi - calo entry #phi"  n="100" lo="-0.00005" hi="0.00005"/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- trk_delta_caloEntryEta_caloEntryEtaCorr_eta" -->
+  <h id="trk_delta_caloEntryEta_caloEntryEtaCorr_eta" type="TH2F" title="(calo entry corr #eta - calo entry #eta) vs #eta">
+    <x title="track #eta [rad]"  n="500" lo="-4." hi="4."/>
+    <y title="(calo entry corr #eta - calo entry #eta)" n="400" lo="-0.4" hi="0.4"/>
+  </h>
+  
+  <!-- trk_delta_caloEntryPhi_caloEntryPhiCorr_eta" -->
+  <h id="trk_delta_caloEntryPhi_caloEntryPhiCorr_eta" type="TH2F" title="(calo entry corr #phi - calo entry #phi) vs #eta">
+    <x title="track #eta [rad]"  n="500" lo="-4." hi="4."/>
+    <y title="(calo entry corr #phi - calo entry #phi)" n="100" lo="-0.00005" hi="0.00005"/>
+  </h>
+  
+  <!-- trk_delta_caloEntryEta_caloEntryEtaCorr_pt" -->
+  <h id="trk_delta_caloEntryEta_caloEntryEtaCorr_pt" type="TH2F" title="(calo entry corr #eta - calo entry #eta) vs p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="(calo entry corr #eta - calo entry #eta)" n="400" lo="-0.4" hi="0.4"/>
+  </h>
+  
+  <!-- trk_delta_caloEntryPhi_caloEntryPhiCorr_pt" -->
+  <h id="trk_delta_caloEntryPhi_caloEntryPhiCorr_pt" type="TH2F" title="(calo entry corr #phi - calo entry #phi) vs p_{T}">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="(calo entry corr #phi - calo entry #phi)" n="100" lo="-0.00005" hi="0.00005"/>
+  </h>
+  
+  
+  <!-- m_clusters_eta -->
+  <h id="clusters_eta" type="TH1F" title="#eta of all clusters - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_eta -->
+  <h id="clusters_matched_eta" type="TH1F" title="#eta of matching clusters - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+ 
+  <!-- m_clusters_notMatched_eta -->
+  <h id="clusters_notMatched_eta" type="TH1F" title="#eta of not matching clusters - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta -->
+  <h id="clusters_matchedFraction_eta" type="TH1F" title="fraction of matching clusters - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_notMatchedFraction_eta -->
+  <h id="clusters_notMatchedFraction_eta" type="TH1F" title="fraction of not matching clusters - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+
+  <!-- m_clusters_width -->
+  <h id="clusters_width" type="TH1F" title="Cluster width for all clusters - Energy weight">
+    <x title="Cluster width" n="2000" lo="0" hi="1."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_width_eta -->
+  <h id="clusters_width_eta" type="TH2F" title="Cluster width vs #eta for all clusters - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Cluster width" n="2000" lo="0" hi="1.0"/>
+  </h>
+  
+  <!-- m_clusters_energy -->
+  <h id="clusters_energy" type="TH1F" title="Cluster energy - Energy weight">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_energy -->
+  <h id="clusters_matched_energy" type="TH1F" title="Energy of matching clusters - Energy weight">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries"/>
+  </h>
+ 
+  <!-- m_clusters_notMatched_energy -->
+  <h id="clusters_notMatched_energy" type="TH1F" title="Energy of not matching clusters - Energy weight">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_energy -->
+  <h id="clusters_matchedFraction_energy" type="TH1F" title="fraction of matching clusters - Energy weight">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_notMatchedFraction_energy -->
+  <h id="clusters_notMatchedFraction_energy" type="TH1F" title="fraction of not matching clusters - Energy weight">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+  
+  <!-- m_clusters_width_energy -->
+  <h id="clusters_width_energy" type="TH2F" title="Cluster width vs Cluster energy for all clusters - Energy weight">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Cluster width" n="2000" lo="0" hi="1.0"/>
+  </h>
+  
+  <!-- m_clusters_matched_eta_fix_and_var -->
+  <h id="clusters_matched_eta_fix_and_var" type="TH1F" title="#eta of matching clusters - fixed and variable #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_eta_fix_or_var -->
+  <h id="clusters_matched_eta_fix_or_var" type="TH1F" title="#eta of matching clusters - fixed or variable #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_eta_fix -->
+  <h id="clusters_matched_eta_fix" type="TH1F" title="#eta of matching clusters - fixed #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_eta_notfix -->
+  <h id="clusters_matched_eta_notfix" type="TH1F" title="#eta of not matching clusters - fixed #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_eta_var -->
+  <h id="clusters_matched_eta_var" type="TH1F" title="#eta of matching clusters - variable #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_eta_notvar -->
+  <h id="clusters_matched_eta_notvar" type="TH1F" title="#eta of not matching clusters - variable #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_eta_onlyvar -->
+  <h id="clusters_matched_eta_onlyvar" type="TH1F" title="#eta of matching clusters - only variable #DeltaR - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_eta_onlyfix -->
+  <h id="clusters_matched_eta_onlyfix" type="TH1F" title="#eta of matching clusters - only fixed #DeltaR - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_eta_none -->
+  <h id="clusters_matched_eta_none" type="TH1F" title="#eta of not matching clusters - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_fix_and_var -->
+  <h id="clusters_matchedFraction_eta_fix_and_var" type="TH1F" title="Fraction of matching clusters - fixed and variable #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_fix_or_var -->
+  <h id="clusters_matchedFraction_eta_fix_or_var" type="TH1F" title="Fraction of matching clusters - fixed or variable #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_fix -->
+  <h id="clusters_matchedFraction_eta_fix" type="TH1F" title="Fraction of matching clusters - fixed #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_notfix -->
+  <h id="clusters_matchedFraction_eta_notfix" type="TH1F" title="Fraction of not matching clusters - fixed #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_var -->
+  <h id="clusters_matchedFraction_eta_var" type="TH1F" title="Fraction of matching clusters - variable #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_notvar -->
+  <h id="clusters_matchedFraction_eta_notvar" type="TH1F" title="Fraction of not matching clusters - variable #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_onlyvar -->
+  <h id="clusters_matchedFraction_eta_onlyvar" type="TH1F" title="Fraction of matching clusters - only variable #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_onlyfix -->
+  <h id="clusters_matchedFraction_eta_onlyfix" type="TH1F" title="Fraction of matching clusters - only fixed #Delta R - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_none -->
+  <h id="clusters_matchedFraction_eta_none" type="TH1F" title="Fraction of not matching clusters - Energy weight">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+  
+  <!-- m_clusters_matched_pv0_eta_fix_and_var -->
+  <h id="clusters_matched_pv0_eta_fix_and_var" type="TH1F" title="#eta of matching clusters - fixed and variable #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_pv0_eta_fix_or_var -->
+  <h id="clusters_matched_pv0_eta_fix_or_var" type="TH1F" title="#eta of matching clusters - fixed or variable #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_pv0_eta_fix -->
+  <h id="clusters_matched_pv0_eta_fix" type="TH1F" title="#eta of matching clusters - fixed #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_pv0_eta_notfix -->
+  <h id="clusters_matched_pv0_eta_notfix" type="TH1F" title="#eta of not matching clusters - fixed #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_pv0_eta_var -->
+  <h id="clusters_matched_pv0_eta_var" type="TH1F" title="#eta of matching clusters - variable #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_pv0_eta_notvar -->
+  <h id="clusters_matched_pv0_eta_notvar" type="TH1F" title="#eta of not matching clusters - variable #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_pv0_eta_onlyvar -->
+  <h id="clusters_matched_pv0_eta_onlyvar" type="TH1F" title="#eta of matching clusters - only variable #DeltaR - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_pv0_eta_onlyfix -->
+  <h id="clusters_matched_pv0_eta_onlyfix" type="TH1F" title="#eta of matching clusters - only fixed #DeltaR - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_pv0_eta_none -->
+  <h id="clusters_matched_pv0_eta_none" type="TH1F" title="#eta of not matching clusters - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_fix_and_var -->
+  <h id="clusters_matchedpv0Fraction_eta_fix_and_var" type="TH1F" title="Fraction of matching clusters - fixed and variable #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpv0Fraction_eta_fix_or_var -->
+  <h id="clusters_matchedpv0Fraction_eta_fix_or_var" type="TH1F" title="Fraction of matching clusters - fixed or variable #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpv0Fraction_eta_fix -->
+  <h id="clusters_matchedpv0Fraction_eta_fix" type="TH1F" title="Fraction of matching clusters - fixed #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpv0Fraction_eta_notfix -->
+  <h id="clusters_matchedpv0Fraction_eta_notfix" type="TH1F" title="Fraction of not matching clusters - fixed #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpv0Fraction_eta_var -->
+  <h id="clusters_matchedpv0Fraction_eta_var" type="TH1F" title="Fraction of matching clusters - variable #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpv0Fraction_eta_notvar -->
+  <h id="clusters_matchedpv0Fraction_eta_notvar" type="TH1F" title="Fraction of not matching clusters - variable #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpv0Fraction_eta_onlyvar -->
+  <h id="clusters_matchedpv0Fraction_eta_onlyvar" type="TH1F" title="Fraction of matching clusters - only variable #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpv0Fraction_eta_onlyfix -->
+  <h id="clusters_matchedpv0Fraction_eta_onlyfix" type="TH1F" title="Fraction of matching clusters - only fixed #Delta R - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpv0Fraction_eta_none -->
+  <h id="clusters_matchedpv0Fraction_eta_none" type="TH1F" title="Fraction of not matching clusters - Energy weight  - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+ 
+  <!-- m_clusters_matched_pvx_eta_fix_and_var -->
+  <h id="clusters_matched_pvx_eta_fix_and_var" type="TH1F" title="#eta of matching clusters - fixed and variable #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_pvx_eta_fix_or_var -->
+  <h id="clusters_matched_pvx_eta_fix_or_var" type="TH1F" title="#eta of matching clusters - fixed or variable #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_pvx_eta_fix -->
+  <h id="clusters_matched_pvx_eta_fix" type="TH1F" title="#eta of matching clusters - fixed #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_pvx_eta_notfix -->
+  <h id="clusters_matched_pvx_eta_notfix" type="TH1F" title="#eta of not matching clusters - fixed #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_matched_pvx_eta_var -->
+  <h id="clusters_matched_pvx_eta_var" type="TH1F" title="#eta of matching clusters - variable #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_pvx_eta_notvar -->
+  <h id="clusters_matched_pvx_eta_notvar" type="TH1F" title="#eta of not matching clusters - variable #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_pvx_eta_onlyvar -->
+  <h id="clusters_matched_pvx_eta_onlyvar" type="TH1F" title="#eta of matching clusters - only variable #DeltaR - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_pvx_eta_onlyfix -->
+  <h id="clusters_matched_pvx_eta_onlyfix" type="TH1F" title="#eta of matching clusters - only fixed #DeltaR - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matched_pvx_eta_none -->
+  <h id="clusters_matched_pvx_eta_none" type="TH1F" title="#eta of not matching clusters - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_matchedFraction_eta_fix_and_var -->
+  <h id="clusters_matchedpvxFraction_eta_fix_and_var" type="TH1F" title="Fraction of matching clusters - fixed and variable #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpvxFraction_eta_fix_or_var -->
+  <h id="clusters_matchedpvxFraction_eta_fix_or_var" type="TH1F" title="Fraction of matching clusters - fixed or variable #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpvxFraction_eta_fix -->
+  <h id="clusters_matchedpvxFraction_eta_fix" type="TH1F" title="Fraction of matching clusters - fixed #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpvxFraction_eta_notfix -->
+  <h id="clusters_matchedpvxFraction_eta_notfix" type="TH1F" title="Fraction of not matching clusters - fixed #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpvxFraction_eta_var -->
+  <h id="clusters_matchedpvxFraction_eta_var" type="TH1F" title="Fraction of matching clusters - variable #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpvxFraction_eta_notvar -->
+  <h id="clusters_matchedpvxFraction_eta_notvar" type="TH1F" title="Fraction of not matching clusters - variable #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpvxFraction_eta_onlyvar -->
+  <h id="clusters_matchedpvxFraction_eta_onlyvar" type="TH1F" title="Fraction of matching clusters - only variable #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpvxFraction_eta_onlyfix -->
+  <h id="clusters_matchedpvxFraction_eta_onlyfix" type="TH1F" title="Fraction of matching clusters - only fixed #Delta R - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_matchedpvxFraction_eta_none -->
+  <h id="clusters_matchedpvxFraction_eta_none" type="TH1F" title="Fraction of not matching clusters - Energy weight - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+  
+  <!-- m_clusters_abs_eta -->
+  <h id="clusters_abs_eta" type="TH1F" title="#eta of all clusters">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_eta -->
+  <h id="clusters_abs_matched_eta" type="TH1F" title="#eta of matching clusters">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+ 
+  <!-- m_clusters_abs_notMatched_eta -->
+  <h id="clusters_abs_notMatched_eta" type="TH1F" title="#eta of not matching clusters">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta -->
+  <h id="clusters_abs_matchedFraction_eta" type="TH1F" title="fraction of matching clusters">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_notMatchedFraction_eta -->
+  <h id="clusters_abs_notMatchedFraction_eta" type="TH1F" title="fraction of not matching clusters">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_width -->
+  <h id="clusters_abs_width" type="TH1F" title="Cluster width for all clusters">
+    <x title="Cluster width" n="2000" lo="0" hi="1."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_width_eta -->
+  <h id="clusters_abs_width_eta" type="TH2F" title="Cluster width vs #eta for all clusters">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Cluster width" n="2000" lo="0" hi="1.0"/>
+  </h>
+  
+  <!-- m_clusters_abs_energy -->
+  <h id="clusters_abs_energy" type="TH1F" title="Cluster energy">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_energy -->
+  <h id="clusters_abs_matched_energy" type="TH1F" title="Energy of matching clusters">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries"/>
+  </h>
+ 
+  <!-- m_clusters_abs_notMatched_energy -->
+  <h id="clusters_abs_notMatched_energy" type="TH1F" title="Energy of not matching clusters">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_energy -->
+  <h id="clusters_abs_matchedFraction_energy" type="TH1F" title="fraction of matching clusters">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_notMatchedFraction_energy -->
+  <h id="clusters_abs_notMatchedFraction_energy" type="TH1F" title="fraction of not matching clusters">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+  
+  <!-- m_clusters_abs_width_energy -->
+  <h id="clusters_abs_width_energy" type="TH2F" title="Cluster width vs Cluster energy for all clusters">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Cluster width" n="2000" lo="0" hi="1.0"/>
+  </h>
+      
+  <!-- m_clusters_abs_matched_eta_fix_and_var -->
+  <h id="clusters_abs_matched_eta_fix_and_var" type="TH1F" title="#eta of matching clusters - fixed and variable #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_eta_fix_or_var -->
+  <h id="clusters_abs_matched_eta_fix_or_var" type="TH1F" title="#eta of matching clusters - fixed or variable #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_eta_fix -->
+  <h id="clusters_abs_matched_eta_fix" type="TH1F" title="#eta of matching clusters - fixed #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_eta_notfix -->
+  <h id="clusters_abs_matched_eta_notfix" type="TH1F" title="#eta of not matching clusters - fixed #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_eta_var -->
+  <h id="clusters_abs_matched_eta_var" type="TH1F" title="#eta of matching clusters - variable #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_eta_notvar -->
+  <h id="clusters_abs_matched_eta_notvar" type="TH1F" title="#eta of not matching clusters - variable #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_eta_onlyvar -->
+  <h id="clusters_abs_matched_eta_onlyvar" type="TH1F" title="#eta of matching clusters - only variable #DeltaR">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_eta_onlyfix -->
+  <h id="clusters_abs_matched_eta_onlyfix" type="TH1F" title="#eta of matching clusters - only fixed #DeltaR">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_eta_none -->
+  <h id="clusters_abs_matched_eta_none" type="TH1F" title="#eta of not matching clusters">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_fix_and_var -->
+  <h id="clusters_abs_matchedFraction_eta_fix_and_var" type="TH1F" title="Fraction of matching clusters - fixed and variable #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_fix_or_var -->
+  <h id="clusters_abs_matchedFraction_eta_fix_or_var" type="TH1F" title="Fraction of matching clusters - fixed or variable #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_fix -->
+  <h id="clusters_abs_matchedFraction_eta_fix" type="TH1F" title="Fraction of matching clusters - fixed #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_notfix -->
+  <h id="clusters_abs_matchedFraction_eta_notfix" type="TH1F" title="Fraction of not matching clusters - fixed #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_var -->
+  <h id="clusters_abs_matchedFraction_eta_var" type="TH1F" title="Fraction of matching clusters - variable #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_notvar -->
+  <h id="clusters_abs_matchedFraction_eta_notvar" type="TH1F" title="Fraction of not matching clusters - variable #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_onlyvar -->
+  <h id="clusters_abs_matchedFraction_eta_onlyvar" type="TH1F" title="Fraction of matching clusters - only variable #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_onlyfix -->
+  <h id="clusters_abs_matchedFraction_eta_onlyfix" type="TH1F" title="Fraction of matching clusters - only fixed #Delta R">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_none -->
+  <h id="clusters_abs_matchedFraction_eta_none" type="TH1F" title="Fraction of not matching clusters">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_pv0_eta_fix_and_var -->
+  <h id="clusters_abs_matched_pv0_eta_fix_and_var" type="TH1F" title="#eta of matching clusters - fixed and variable #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_pv0_eta_fix_or_var -->
+  <h id="clusters_abs_matched_pv0_eta_fix_or_var" type="TH1F" title="#eta of matching clusters - fixed or variable #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_pv0_eta_fix -->
+  <h id="clusters_abs_matched_pv0_eta_fix" type="TH1F" title="#eta of matching clusters - fixed #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_pv0_eta_notfix -->
+  <h id="clusters_abs_matched_pv0_eta_notfix" type="TH1F" title="#eta of not matching clusters - fixed #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_pv0_eta_var -->
+  <h id="clusters_abs_matched_pv0_eta_var" type="TH1F" title="#eta of matching clusters - variable #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_pv0_eta_notvar -->
+  <h id="clusters_abs_matched_pv0_eta_notvar" type="TH1F" title="#eta of not matching clusters - variable #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_pv0_eta_onlyvar -->
+  <h id="clusters_abs_matched_pv0_eta_onlyvar" type="TH1F" title="#eta of matching clusters - only variable #DeltaR - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_pv0_eta_onlyfix -->
+  <h id="clusters_abs_matched_pv0_eta_onlyfix" type="TH1F" title="#eta of matching clusters - only fixed #DeltaR - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_pv0_eta_none -->
+  <h id="clusters_abs_matched_pv0_eta_none" type="TH1F" title="#eta of not matching clusters - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_fix_and_var -->
+  <h id="clusters_abs_matchedpv0Fraction_eta_fix_and_var" type="TH1F" title="Fraction of matching clusters - fixed and variable #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpv0Fraction_eta_fix_or_var -->
+  <h id="clusters_abs_matchedpv0Fraction_eta_fix_or_var" type="TH1F" title="Fraction of matching clusters - fixed or variable #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpv0Fraction_eta_fix -->
+  <h id="clusters_abs_matchedpv0Fraction_eta_fix" type="TH1F" title="Fraction of matching clusters - fixed #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpv0Fraction_eta_notfix -->
+  <h id="clusters_abs_matchedpv0Fraction_eta_notfix" type="TH1F" title="Fraction of not matching clusters - fixed #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpv0Fraction_eta_var -->
+  <h id="clusters_abs_matchedpv0Fraction_eta_var" type="TH1F" title="Fraction of matching clusters - variable #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpv0Fraction_eta_notvar -->
+  <h id="clusters_abs_matchedpv0Fraction_eta_notvar" type="TH1F" title="Fraction of not matching clusters - variable #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpv0Fraction_eta_onlyvar -->
+  <h id="clusters_abs_matchedpv0Fraction_eta_onlyvar" type="TH1F" title="Fraction of matching clusters - only variable #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpv0Fraction_eta_onlyfix -->
+  <h id="clusters_abs_matchedpv0Fraction_eta_onlyfix" type="TH1F" title="Fraction of matching clusters - only fixed #Delta R - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpv0Fraction_eta_none -->
+  <h id="clusters_abs_matchedpv0Fraction_eta_none" type="TH1F" title="Fraction of not matching clusters - Tracks from PV0">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_pvx_eta_fix_and_var -->
+  <h id="clusters_abs_matched_pvx_eta_fix_and_var" type="TH1F" title="#eta of matching clusters - fixed and variable #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_pvx_eta_fix_or_var -->
+  <h id="clusters_abs_matched_pvx_eta_fix_or_var" type="TH1F" title="#eta of matching clusters - fixed or variable #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_pvx_eta_fix -->
+  <h id="clusters_abs_matched_pvx_eta_fix" type="TH1F" title="#eta of matching clusters - fixed #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_pvx_eta_notfix -->
+  <h id="clusters_abs_matched_pvx_eta_notfix" type="TH1F" title="#eta of not matching clusters - fixed #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_abs_matched_pvx_eta_var -->
+  <h id="clusters_abs_matched_pvx_eta_var" type="TH1F" title="#eta of matching clusters - variable #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_pvx_eta_notvar -->
+  <h id="clusters_abs_matched_pvx_eta_notvar" type="TH1F" title="#eta of not matching clusters - variable #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_pvx_eta_onlyvar -->
+  <h id="clusters_abs_matched_pvx_eta_onlyvar" type="TH1F" title="#eta of matching clusters - only variable #DeltaR - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_pvx_eta_onlyfix -->
+  <h id="clusters_abs_matched_pvx_eta_onlyfix" type="TH1F" title="#eta of matching clusters - only fixed #DeltaR - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matched_pvx_eta_none -->
+  <h id="clusters_abs_matched_pvx_eta_none" type="TH1F" title="#eta of not matching clusters - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedFraction_eta_fix_and_var -->
+  <h id="clusters_abs_matchedpvxFraction_eta_fix_and_var" type="TH1F" title="Fraction of matching clusters - fixed and variable #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpvxFraction_eta_fix_or_var -->
+  <h id="clusters_abs_matchedpvxFraction_eta_fix_or_var" type="TH1F" title="Fraction of matching clusters - fixed or variable #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpvxFraction_eta_fix -->
+  <h id="clusters_abs_matchedpvxFraction_eta_fix" type="TH1F" title="Fraction of matching clusters - fixed #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpvxFraction_eta_notfix -->
+  <h id="clusters_abs_matchedpvxFraction_eta_notfix" type="TH1F" title="Fraction of not matching clusters - fixed #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpvxFraction_eta_var -->
+  <h id="clusters_abs_matchedpvxFraction_eta_var" type="TH1F" title="Fraction of matching clusters - variable #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpvxFraction_eta_notvar -->
+  <h id="clusters_abs_matchedpvxFraction_eta_notvar" type="TH1F" title="Fraction of not matching clusters - variable #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpvxFraction_eta_onlyvar -->
+  <h id="clusters_abs_matchedpvxFraction_eta_onlyvar" type="TH1F" title="Fraction of matching clusters - only variable #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpvxFraction_eta_onlyfix -->
+  <h id="clusters_abs_matchedpvxFraction_eta_onlyfix" type="TH1F" title="Fraction of matching clusters - only fixed #Delta R - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of matching clusters"/>
+  </h>
+
+  <!-- m_clusters_abs_matchedpvxFraction_eta_none -->
+  <h id="clusters_abs_matchedpvxFraction_eta_none" type="TH1F" title="Fraction of not matching clusters - Tracks from PVX(X>0)">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Fraction of not matching clusters"/>
+  </h>
+ 
+  <!-- m_clusters_pt_fraction_e -->
+  <h id="clusters_pt_fraction_e" type="TH2F" title="p_{T} fraction at PV0 - all clusters">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="p_{T} fraction at PV0" n="1000" lo="0." hi="1."/>
+  </h>
+  
+  <!-- m_clusters_PV0_pt_fraction_e -->
+  <h id="clusters_PV0_pt_fraction_e" type="TH2F" title="p_{T} fraction at PV0 - cluster matched PV0">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="p_{T} fraction at PV0" n="1000" lo="0." hi="1."/>
+  </h>
+  
+  <!-- m_clusters_PVX_pt_fraction_e -->
+  <h id="clusters_PVX_pt_fraction_e" type="TH2F" title="p_{T} fraction at PV0 - cluster matched PVX">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="p_{T} fraction at PV0" n="1000" lo="0." hi="1."/>
+  </h>
+  
+  <!-- m_clusters_rejected_pt_fraction_e -->
+  <h id="clusters_rejected_pt_fraction_e" type="TH2F" title="p_{T} fraction at PV0 - rejected clusters">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="p_{T} fraction at PV0" n="1000" lo="0." hi="1."/>
+  </h>
+  
+  
+  <!-- m_clusters_etacut_abs_width -->
+  <h id="clusters_etacut_abs_width" type="TH1F" title="Cluster width for all clusters - #eta^{cluster} cut">
+    <x title="Cluster width" n="2000" lo="0" hi="1."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_etacut_abs_width_eta -->
+  <h id="clusters_etacut_abs_width_eta" type="TH2F" title="Cluster width vs #eta for all clusters - #eta^{cluster} cut">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Cluster width" n="2000" lo="0" hi="1.0"/>
+  </h>
+  
+  <!-- m_clusters_etacut_abs_energy -->
+  <h id="clusters_etacut_abs_energy" type="TH1F" title="Cluster energy - #eta^{cluster} cut">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_etacut_abs_width_energy -->
+  <h id="clusters_etacut_abs_width_energy" type="TH2F" title="Cluster width vs Cluster energy for all clusters - #eta^{cluster} cut">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Cluster width" n="2000" lo="0" hi="1.0"/>
+  </h>
+  
+  <!-- m_clusters_etacut_etacut__eta -->
+  <h id="clusters_etacut_eta" type="TH1F" title="#eta of all clusters - Energy weight - #eta^{cluster} cut">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_etacut_abs_eta -->
+  <h id="clusters_etacut_abs_eta" type="TH1F" title="#eta of all clusters - #eta^{cluster} cut">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_etacut_width -->
+  <h id="clusters_etacut_width" type="TH1F" title="Cluster width for all clusters - Energy weight - #eta^{cluster} cut">
+    <x title="Cluster width" n="2000" lo="0" hi="1."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_clusters_etacut_width_eta -->
+  <h id="clusters_etacut_width_eta" type="TH2F" title="Cluster width vs #eta for all clusters - Energy weight - #eta^{cluster} cut">
+    <x title="Cluster #eta" n="200" lo="-4.0" hi="4.0"/>
+    <y title="Cluster width" n="2000" lo="0" hi="1.0"/>
+  </h>
+  
+  <!-- m_clusters_etacut_energy -->
+  <h id="clusters_etacut_energy" type="TH1F" title="Cluster energy - Energy weight - #eta^{cluster} cut">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_clusters_etacut_width_energy -->
+  <h id="clusters_etacut_width_energy" type="TH2F" title="Cluster width vs Cluster energy for all clusters - Energy weight - #eta^{cluster} cut">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Cluster width" n="2000" lo="0" hi="1.0"/>
+  </h>
+        
+  <!-- m_trk_total_eta -->
+  <h id="trk_total_eta" type="TH1F" title="#eta of all extrapolated tracks">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_total_pt -->
+  <h id="trk_total_pt" type="TH1F" title="p_{T} of all extrapolated tracks">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_total_clusters_eta -->
+  <h id="trk_total_clusters_eta" type="TH2F" title="Number of clusters vs extrapolated track #eta">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="# Clusters" n = "500" lo = "0" hi = "500"/>
+  </h>
+
+  <!-- m_trk_total_clusters_pt -->
+  <h id="trk_total_clusters_pt" type="TH2F" title="Number of clusters vs extrapolated track p_{T}">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="# Clusters" n = "15" lo = "0" hi = "15"/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_fix_eta -->
+  <h id="trk_notMatching_deltar_fix_eta" type="TH1F" title="track #eta not matching with fixed #Delta R">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_notMatching_deltar_fix_phi -->
+  <h id="trk_notMatching_deltar_fix_phi" type="TH1F" title="track #phi not matching with fixed #Delta R">
+    <x title="Track #phi [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_fix_pt -->
+  <h id="trk_notMatching_deltar_fix_pt" type="TH1F" title="track p_{T} not matching with fixed #Delta R">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_fix_caloEntryUncTot_eta -->
+  <h id="trk_notMatching_deltar_fix_caloEntryUncTot_eta" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track #eta - not matching with fixed #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_fix_caloEntryUncTot_pt -->
+  <h id="trk_notMatching_deltar_fix_caloEntryUncTot_pt" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track p_{T} - not matching with fixed #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_fix_caloEntryUncTot_prodRadius -->
+  <h id="trk_notMatching_deltar_fix_caloEntryUncTot_prodRadius" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track truth production radius - not matching with fixed #Delta R">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_notMatching_deltar_var_eta -->
+  <h id="trk_notMatching_deltar_var_eta" type="TH1F" title="track #eta not matching with variable #Delta R">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_notMatching_deltar_var_phi -->
+  <h id="trk_notMatching_deltar_var_phi" type="TH1F" title="track #phi not matching with variable #Delta R">
+    <x title="Track #phi [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_var_pt -->
+  <h id="trk_notMatching_deltar_var_pt" type="TH1F" title="track p_{T} not matching with variable #Delta R">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_var_caloEntryUncTot_eta -->
+  <h id="trk_notMatching_deltar_var_caloEntryUncTot_eta" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track #eta - not matching with variable #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_var_caloEntryUncTot_pt -->
+  <h id="trk_notMatching_deltar_var_caloEntryUncTot_pt" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track p_{T} - not matching with variable #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_var_caloEntryUncTot_prodRadius -->
+  <h id="trk_notMatching_deltar_var_caloEntryUncTot_prodRadius" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track truth production radius - not matching with variable #Delta R">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_notMatching_deltar_none_eta -->
+  <h id="trk_notMatching_deltar_none_eta" type="TH1F" title="track #eta not matching any #Delta R">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_notMatching_deltar_none_phi -->
+  <h id="trk_notMatching_deltar_none_phi" type="TH1F" title="track #phi not matching any #Delta R">
+    <x title="Track #phi [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_none_pt -->
+  <h id="trk_notMatching_deltar_none_pt" type="TH1F" title="track p_{T} not matching any #Delta R">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_none_caloEntryUncTot_eta -->
+  <h id="trk_notMatching_deltar_none_caloEntryUncTot_eta" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track #eta - not matching any #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_none_caloEntryUncTot_pt -->
+  <h id="trk_notMatching_deltar_none_caloEntryUncTot_pt" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track p_{T} - not matching any #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+
+  <!-- m_trk_notMatching_deltar_none_caloEntryUncTot_prodRadius -->
+  <h id="trk_notMatching_deltar_none_caloEntryUncTot_prodRadius" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track truth production radius - not matching any #Delta R">
+    <x title="Truth Production Radius [mm]" n="1500" lo="0." hi="1500."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="500" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_fix_eta -->
+  <h id="trk_matching_deltar_fix_eta" type="TH1F" title="matching track #eta - fixed #Delta R">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_fix_pt -->
+  <h id="trk_matching_deltar_fix_pt" type="TH1F" title="matching track p_{T} - fixed #Delta R">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_trk_matching_deltar_var_eta -->
+  <h id="trk_matching_deltar_var_eta" type="TH1F" title="matching track #eta - variable #Delta R">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_var_pt -->
+  <h id="trk_matching_deltar_var_pt" type="TH1F" title="matching track p_{T} - variable #Delta R">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_onlyfix_eta -->
+  <h id="trk_matching_deltar_onlyfix_eta" type="TH1F" title="matching track #eta - only fix #Delta R">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_onlyfix_pt -->
+  <h id="trk_matching_deltar_onlyfix_pt" type="TH1F" title="matching track p_{T} - only fix #Delta R">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_onlyvar_eta -->
+  <h id="trk_matching_deltar_onlyvar_eta" type="TH1F" title="matching track #eta - only variable #Delta R">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_onlyvar_pt -->
+  <h id="trk_matching_deltar_onlyvar_pt" type="TH1F" title="matching track p_{T} - only #Delta R">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_fix_or_var_eta -->
+  <h id="trk_matching_deltar_fix_or_var_eta" type="TH1F" title="matching track #eta - fixed or variable #Delta R">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_fix_or_var_pt -->
+  <h id="trk_matching_deltar_fix_or_var_pt" type="TH1F" title="matching track p_{T} - fixed or variable #Delta R">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_fix_and_var_eta -->
+  <h id="trk_matching_deltar_fix_and_var_eta" type="TH1F" title="matching track #eta - fixed and variable #Delta R">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_fix_and_var_pt -->
+  <h id="trk_matching_deltar_fix_and_var_pt" type="TH1F" title="matching track p_{T} - fixed and variable #Delta R">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_or_clusters_eta -->
+  <h id="trk_matching_deltar_or_clusters_eta" type="TH2F" title="Number of matched clusters vs track #eta - fixed or variable #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+
+  <!-- m_trk_matching_deltar_or_clusters_phi -->
+  <h id="trk_matching_deltar_or_clusters_phi" type="TH2F" title="Number of matched clusters vs track #phi - fixed or variable #Delta R">
+    <x title="track #phi [rad]" n="200" lo="-4." hi="4."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_or_clusters_pt -->
+  <h id="trk_matching_deltar_or_clusters_pt" type="TH2F" title="Number of matched clusters vs track p_{T} - fixed or variable #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_and_clusters_eta -->
+  <h id="trk_matching_deltar_and_clusters_eta" type="TH2F" title="Number of matched clusters vs track #eta - fixed and variable #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+
+  <!-- m_trk_matching_deltar_and_clusters_phi -->
+  <h id="trk_matching_deltar_and_clusters_phi" type="TH2F" title="Number of matched clusters vs track #phi - fixed and variable #Delta R">
+    <x title="track #phi [rad]" n="200" lo="-4." hi="4."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_and_clusters_pt -->
+  <h id="trk_matching_deltar_and_clusters_pt" type="TH2F" title="Number of matched clusters vs track p_{T} - fixed and variable #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_fix_only_clusters_eta -->
+  <h id="trk_matching_deltar_fix_only_clusters_eta" type="TH2F" title="Number of matched clusters vs track #eta - only fixed #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+
+  <!-- m_trk_matching_deltar_fix_only_clusters_phi -->
+  <h id="trk_matching_deltar_fix_only_clusters_phi" type="TH2F" title="Number of matched clusters vs track #phi - only fixed #Delta R">
+    <x title="track #phi [rad]" n="200" lo="-4." hi="4."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_fix_only_clusters_pt -->
+  <h id="trk_matching_deltar_fix_only_clusters_pt" type="TH2F" title="Number of matched clusters vs track p_{T} - only fixed #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_var_only_clusters_eta -->
+  <h id="trk_matching_deltar_var_only_clusters_eta" type="TH2F" title="Number of matched clusters vs track #eta - only variable #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+
+  <!-- m_trk_matching_deltar_var_only_clusters_phi -->
+  <h id="trk_matching_deltar_var_only_clusters_phi" type="TH2F" title="Number of matched clusters vs track #phi - only variable #Delta R">
+    <x title="track #phi [rad]" n="200" lo="-4." hi="4."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+  
+  <!-- m_trk_matching_deltar_var_only_clusters_pt -->
+  <h id="trk_matching_deltar_var_only_clusters_pt" type="TH2F" title="Number of matched clusters vs track p_{T} - only variable #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="# Clusters matched" n = "15" lo = "0" hi = "15"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_eta_fix_and_var -->
+  <h id="trk_matchedFraction_eta_fix_and_var" type="TH1F" title="Fraction of matching tracks - fixed and variable #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_eta_fix_or_var -->
+  <h id="trk_matchedFraction_eta_fix_or_var" type="TH1F" title="Fraction of matching tracks - fixed or variable #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_eta_fix -->
+  <h id="trk_matchedFraction_eta_fix" type="TH1F" title="Fraction of matching tracks - fixed #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_eta_notfix -->
+  <h id="trk_matchedFraction_eta_notfix" type="TH1F" title="Fraction of not matching tracks - fixed #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_eta_var -->
+  <h id="trk_matchedFraction_eta_var" type="TH1F" title="Fraction of matching tracks - variable #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_eta_notvar -->
+  <h id="trk_matchedFraction_eta_notvar" type="TH1F" title="Fraction of not matching tracks - variable #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_eta_onlyvar -->
+  <h id="trk_matchedFraction_eta_onlyvar" type="TH1F" title="Fraction of matching tracks - only variable #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_eta_onlyfix -->
+  <h id="trk_matchedFraction_eta_onlyfix" type="TH1F" title="Fraction of matching tracks - only fixed #Delta R">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_eta_none -->
+  <h id="trk_matchedFraction_eta_none" type="TH1F" title="Fraction of not matching tracks">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_pt_fix_and_var -->
+  <h id="trk_matchedFraction_pt_fix_and_var" type="TH1F" title="Fraction of matching tracks - fixed and variable #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_pt_fix_or_var -->
+  <h id="trk_matchedFraction_pt_fix_or_var" type="TH1F" title="Fraction of matching tracks - fixed or variable #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_pt_fix -->
+  <h id="trk_matchedFraction_pt_fix" type="TH1F" title="Fraction of matching tracks - fixed #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_pt_notfix -->
+  <h id="trk_matchedFraction_pt_notfix" type="TH1F" title="Fraction of not matching tracks - fixed #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_pt_var -->
+  <h id="trk_matchedFraction_pt_var" type="TH1F" title="Fraction of matching tracks - variable #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_pt_notvar -->
+  <h id="trk_matchedFraction_pt_notvar" type="TH1F" title="Fraction of not matching tracks - variable #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_pt_onlyvar -->
+  <h id="trk_matchedFraction_pt_onlyvar" type="TH1F" title="Fraction of matching tracks - only variable #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_pt_onlyfix -->
+  <h id="trk_matchedFraction_pt_onlyfix" type="TH1F" title="Fraction of matching tracks - only fixed #Delta R">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_matchedFraction_pt_none -->
+  <h id="trk_matchedFraction_pt_none" type="TH1F" title="Fraction of not matching tracks">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_total_eta -->
+  <h id="trk_pv0_total_eta" type="TH1F" title="#eta of all extrapolated tracks - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_total_pt -->
+  <h id="trk_pv0_total_pt" type="TH1F" title="p_{T} of all extrapolated tracks - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_caloEntryUncTot_eta -->
+  <h id="trk_pv0_caloEntryUncTot_eta" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track #eta - tracks from PV0">
+    <x title="track #eta [rad]" n="500" lo="-4." hi="4."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_pv0_caloEntryUncTot_pt -->
+  <h id="trk_pv0_caloEntryUncTot_pt" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track p_{T} - tracks from PV0">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_pv0_caloEntryUncTot_truthpt -->
+  <h id="trk_pv0_caloEntryUncTot_truthpt" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track p_{T} - tracks from PV0">
+    <x title="Truth track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_pv0_total_clusters_eta -->
+  <h id="trk_pv0_total_clusters_eta" type="TH2F" title="Number of clusters vs extrapolated track #eta - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="# Clusters" n = "500" lo = "0" hi = "500"/>
+  </h>
+
+  <!-- m_trk_pv0_total_clusters_pt -->
+  <h id="trk_pv0_total_clusters_pt" type="TH2F" title="Number of clusters vs extrapolated track p_{T} - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="# Clusters" n = "15" lo = "0" hi = "15"/>
+  </h>
+  
+  <!-- m_trk_pv0_notMatching_deltar_fix_pt -->
+  <h id="trk_pv0_notMatching_deltar_fix_pt" type="TH1F" title="track p_{T} not matching with fixed #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_notMatching_deltar_fix_eta -->
+  <h id="trk_pv0_notMatching_deltar_fix_eta" type="TH1F" title="track #eta not matching with fixed #Delta R - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_notMatching_deltar_var_pt -->
+  <h id="trk_pv0_notMatching_deltar_var_pt" type="TH1F" title="track p_{T} not matching with variable #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_notMatching_deltar_var_eta -->
+  <h id="trk_pv0_notMatching_deltar_var_eta" type="TH1F" title="track #eta not matching with variable #Delta R - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_notMatching_deltar_none_eta -->
+  <h id="trk_pv0_notMatching_deltar_none_eta" type="TH1F" title="track #eta not matching any #Delta R - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_notMatching_deltar_none_pt -->
+  <h id="trk_pv0_notMatching_deltar_none_pt" type="TH1F" title="track p_{T} not matching any #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_trk_pv0_matching_deltar_fix_eta -->
+  <h id="trk_pv0_matching_deltar_fix_eta" type="TH1F" title="matching track #eta - fixed #Delta R - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matching_deltar_fix_pt -->
+  <h id="trk_pv0_matching_deltar_fix_pt" type="TH1F" title="matching track p_{T} - fixed #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+
+  <!-- m_trk_pv0_matching_deltar_var_eta -->
+  <h id="trk_pv0_matching_deltar_var_eta" type="TH1F" title="matching track #eta - variable #Delta R - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matching_deltar_var_pt -->
+  <h id="trk_pv0_matching_deltar_var_pt" type="TH1F" title="matching track p_{T} - variable #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matching_deltar_onlyfix_eta -->
+  <h id="trk_pv0_matching_deltar_onlyfix_eta" type="TH1F" title="matching track #eta - only fix #Delta R - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matching_deltar_onlyfix_pt -->
+  <h id="trk_pv0_matching_deltar_onlyfix_pt" type="TH1F" title="matching track p_{T} - only fix #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matching_deltar_onlyvar_eta -->
+  <h id="trk_pv0_matching_deltar_onlyvar_eta" type="TH1F" title="matching track #eta - only variable #Delta R - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matching_deltar_onlyvar_pt -->
+  <h id="trk_pv0_matching_deltar_onlyvar_pt" type="TH1F" title="matching track p_{T} - only #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matching_deltar_fix_or_var_eta -->
+  <h id="trk_pv0_matching_deltar_fix_or_var_eta" type="TH1F" title="matching track #eta - fixed or variable #Delta R - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matching_deltar_fix_or_var_pt -->
+  <h id="trk_pv0_matching_deltar_fix_or_var_pt" type="TH1F" title="matching track p_{T} - fixed or variable #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matching_deltar_fix_and_var_eta -->
+  <h id="trk_pv0_matching_deltar_fix_and_var_eta" type="TH1F" title="matching track #eta - fixed and variable #Delta R - tracks from PV0">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matching_deltar_fix_and_var_pt -->
+  <h id="trk_pv0_matching_deltar_fix_and_var_pt" type="TH1F" title="matching track p_{T} - fixed and variable #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_eta_fix_and_var -->
+  <h id="trk_pv0_matchedFraction_eta_fix_and_var" type="TH1F" title="Fraction of matching tracks - fixed and variable #Delta R - tracks from PV0">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_eta_fix_or_var -->
+  <h id="trk_pv0_matchedFraction_eta_fix_or_var" type="TH1F" title="Fraction of matching tracks - fixed or variable #Delta R - tracks from PV0">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_eta_fix -->
+  <h id="trk_pv0_matchedFraction_eta_fix" type="TH1F" title="Fraction of matching tracks - fixed #Delta R - tracks from PV0">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_eta_notfix -->
+  <h id="trk_pv0_matchedFraction_eta_notfix" type="TH1F" title="Fraction of not matching tracks - fixed #Delta R - tracks from PV0">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_eta_var -->
+  <h id="trk_pv0_matchedFraction_eta_var" type="TH1F" title="Fraction of matching tracks - variable #Delta R - tracks from PV0">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_eta_notvar -->
+  <h id="trk_pv0_matchedFraction_eta_notvar" type="TH1F" title="Fraction of not matching tracks - variable #Delta R - tracks from PV0">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_eta_onlyvar -->
+  <h id="trk_pv0_matchedFraction_eta_onlyvar" type="TH1F" title="Fraction of matching tracks - only variable #Delta R - tracks from PV0">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_eta_onlyfix -->
+  <h id="trk_pv0_matchedFraction_eta_onlyfix" type="TH1F" title="Fraction of matching tracks - only fixed #Delta R - tracks from PV0">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_eta_none -->
+  <h id="trk_pv0_matchedFraction_eta_none" type="TH1F" title="Fraction of not matching tracks - tracks from PV0">
+    <x title="track #eta [rad]" n="200" lo="-4." hi="4."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_pt_fix_and_var -->
+  <h id="trk_pv0_matchedFraction_pt_fix_and_var" type="TH1F" title="Fraction of matching tracks - fixed and variable #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_pt_fix_or_var -->
+  <h id="trk_pv0_matchedFraction_pt_fix_or_var" type="TH1F" title="Fraction of matching tracks - fixed or variable #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_pt_fix -->
+  <h id="trk_pv0_matchedFraction_pt_fix" type="TH1F" title="Fraction of matching tracks - fixed #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_pt_notfix -->
+  <h id="trk_pv0_matchedFraction_pt_notfix" type="TH1F" title="Fraction of not matching tracks - fixed #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_pt_var -->
+  <h id="trk_pv0_matchedFraction_pt_var" type="TH1F" title="Fraction of matching tracks - variable #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_pt_notvar -->
+  <h id="trk_pv0_matchedFraction_pt_notvar" type="TH1F" title="Fraction of not matching tracks - variable #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_pt_onlyvar -->
+  <h id="trk_pv0_matchedFraction_pt_onlyvar" type="TH1F" title="Fraction of matching tracks - only variable #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_pt_onlyfix -->
+  <h id="trk_pv0_matchedFraction_pt_onlyfix" type="TH1F" title="Fraction of matching tracks - only fixed #Delta R - tracks from PV0">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of matching tracks"/>
+  </h>
+  
+  <!-- m_trk_pv0_matchedFraction_pt_none -->
+  <h id="trk_pv0_matchedFraction_pt_none" type="TH1F" title="Fraction of not matching tracks - tracks from PV0">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Fraction of not matching tracks"/>
+  </h>
+ 
+  <!-- m_trk_pv0_caloEntryUncTot_pt_0SiHits -->
+  <h id="trk_pv0_caloEntryUncTot_pt_0SiHits" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track p_{T} - tracks from PV0 - 0 SiHits">
+    <x title="Track p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_pv0_caloEntryUncTot_eta_0SiHits -->
+  <h id="trk_pv0_caloEntryUncTot_eta_0SiHits" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs track #eta - tracks from PV0 - 0 SiHits">
+    <x title="Track #eta [rad]"  n="200" lo="-4." hi="4."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_pv0_caloEntryUncTot_rFirstHit_0SiHits -->
+  <h id="trk_pv0_caloEntryUncTot_rFirstHit_0SiHits" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs Radius(first hit) - tracks from PV0 - 0 SiHits">
+    <x title="Radius(first Hit) [mm]"  n="1000" lo="0." hi="1000."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_pv0_caloEntryUncTot_rFirstHit -->
+  <h id="trk_pv0_caloEntryUncTot_rFirstHit" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs Radius(first hit) - tracks from PV0">
+    <x title="Radius(first Hit) [mm]"  n="1000" lo="0." hi="1000."/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>
+  
+  <!-- m_trk_pv0_caloEntryUncTot_nSiHits -->
+  <h id="trk_pv0_caloEntryUncTot_nSiHits" type="TH2F" title="Extrapolated track angular uncertainty, #sigma(#Delta R) vs  # SiHits - tracks from PV0">
+    <x title="# SiHits"  n="40" lo="-0.5" hi="39.5"/>
+    <y title="Extrapolated track angular uncertainty, #sigma(#Delta R)" n="20000" lo="0" hi="1."/>
+  </h>  
+  
+  <!-- trk_tcc_reco_pt_response -->
+  <h id="trk_tcc_reco_pt_response" type="TH1F" title="p_{T} response">
+    <x title="Track p_{T} response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_trk_tcc_reco_pt_truth_pt -->
+  <h id="trk_tcc_reco_pt_truth_pt" type="TH2F" title="Track p_{T} vs Truth p_{T}">
+    <x title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Truth p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+  </h>
+
+  <!-- m_tcc_pt -->
+  <h id="tcc_pt" type="TH1F" title="TCC p_{T}">
+    <x title="TrackCaloCluster p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Entries" />
+  </h> 
+  
+  <!-- m_tcc_pt_etacut -->
+  <h id="tcc_pt_etacut" type="TH1F" title="TCC p_{T} - #eta cut">
+    <x title="TrackCaloCluster p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="Entries" />
+  </h> 
+  
+  <!-- m_tcc_eta -->
+  <h id="tcc_eta" type="TH1F" title="TCC #eta">
+    <x title="TrackCaloCluster #eta [rad]" n="500"  lo="-4." hi="4."/>
+    <y title="Entries" />
+  </h>  
+  
+  <!-- m_tcc_eta_ptcut -->
+  <h id="tcc_eta_ptcut" type="TH1F" title="TCC #eta - p_{T} cut">
+    <x title="TrackCaloCluster #eta [rad]" n="500"  lo="-4." hi="4."/>
+    <y title="Entries" />
+  </h>  
+  
+  <!-- m_tcc_phi -->
+  <h id="tcc_phi" type="TH1F" title="TCC #phi">
+    <x title="TrackCaloCluster #phi [rad]" n="500"  lo="-4." hi="4."/>
+    <y title="Entries" />
+  </h> 
+  
+  <!-- m_tcc_m -->
+  <h id="tcc_m" type="TH1F" title="TCC mass">
+    <x title="TrackCaloCluster mass [GeV]" n="100" lo="0." hi="100."/>
+    <y title="Entries" />
+  </h> 
+
+  <!-- m_tcc_taste -->
+  <h id="tcc_taste" type="TH1F" title="TCC Taste">
+    <x title="TrackCaloCluster Taste" n="5" lo="0" hi="5"/>
+    <y title="Entries" />
+  </h> 
+  
+  <!-- m_tcc_taste_eta -->
+  <h id="tcc_taste_eta" type="TH2F" title="TCC Taste vs TCC #eta">
+    <x title="TrackCaloCluster #eta [rad]" n="500"  lo="-4." hi="4."/>
+    <y title="TrackCaloCluster Taste" n="5" lo="0" hi="5"/>
+  </h> 
+  
+  <!-- m_tcc_taste_eta_ptcut -->
+  <h id="tcc_taste_eta_ptcut" type="TH2F" title="TCC Taste vs TCC #eta - p_{T} cut">
+    <x title="TrackCaloCluster #eta [rad]" n="500"  lo="-4." hi="4."/>
+    <y title="TrackCaloCluster Taste" n="5" lo="0" hi="5"/>
+  </h>
+  
+  <!-- m_tcc_taste_pt -->
+  <h id="tcc_taste_pt" type="TH2F" title="TCC Taste vs TCC p_{T}">
+    <x title="TrackCaloCluster p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="TrackCaloCluster Taste" n="5" lo="0" hi="5"/>
+  </h> 
+  
+  <!-- m_tcc_taste_pt_etacut -->
+  <h id="tcc_taste_pt_etacut" type="TH2F" title="TCC Taste vs TCC p_{T} - #eta cut">
+    <x title="TrackCaloCluster p_{T} [GeV]" n="64" lo="0." hi="2000."/>
+    <y title="TrackCaloCluster Taste" n="5" lo="0" hi="5"/>
+  </h> 
+
+  <!-- m_tcc_pt_pseudoresponse -->
+  <h id="tcc_pt_pseudoresponse" type="TH1F" title="TCC p_{T} pseudoresponse">
+    <x title="TrackCaloCluster p_{T} pseudoresponse" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_tcc_pt_response -->
+  <h id="tcc_pt_response" type="TH1F" title="TCC p_{T} response">
+    <x title="TrackCaloCluster p_{T} response" n="100" lo="0." hi="5."/>
+    <y title="Entries"/>
+  </h>
+  
+  <!-- m_tcc_pt_track_pt -->
+  <h id="tcc_pt_track_pt" type="TH2F" title="TCC p_{T} vs Track p_{T}">
+    <x title="TrackCaloCluster p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Track p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+  </h>
+  
+  <!-- m_tcc_pt_truth_pt -->
+  <h id="tcc_pt_truth_pt" type="TH2F" title="TCC p_{T} vs Truth p_{T}">
+    <x title="TrackCaloCluster p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+    <y title="Truth p_{T} [GeV]"  n="64" lo="0." hi="2000."/>
+  </h>
+  
+  <!-- m_tcc_N_M -->
+  <h id="tcc_N_M" type="TH2F" title="TCC N vs M">
+    <x title="# Matched Clusters"  n="200" lo="-0.5" hi="199.5" />
+    <y title="# Matched Tracks"    n="200" lo="-0.5" hi="199.5" />
+    <z title="Entries" />
+  </h>
+  
+  <!-- tcc_N_M_pv0 -->
+  <h id="tcc_N_M_pv0" type="TH2F" title="TCC N vs M - tracks from PV0">
+    <x title="# Matched Clusters"  n="200" lo="-0.5" hi="199.5" />
+    <y title="# Matched Tracks"    n="200" lo="-0.5" hi="199.5" />
+    <z title="Entries" />
+  </h>
+  
+  <!-- m_clusters_all_neutral_eta -->
+  <h id="clusters_all_neutral_eta" type="TH1F" title="Cluster #eta - all Neutral">
+    <x title="Cluster #eta [rad]" n="200"  lo="-4." hi="4."/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- m_clusters_all_neutral_e-->
+  <h id="clusters_all_neutral_e" type="TH1F" title="Cluster Energy - all Neutral">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries" />
+  </h>
+     
+  <!-- m_clusters_all_neutral_PV0_eta -->
+  <h id="clusters_all_neutral_PV0_eta" type="TH1F" title="Cluster #eta - all Neutral from PV0">
+    <x title="Cluster #eta [rad]" n="200"  lo="-4." hi="4."/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- m_clusters_all_neutral_PV0_e-->
+  <h id="clusters_all_neutral_PV0_e" type="TH1F" title="Cluster Energy - all Neutral from PV0">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- m_clusters_all_neutral_notPV0_eta -->
+  <h id="clusters_all_neutral_notPV0_eta" type="TH1F" title="Cluster #eta - all Neutral not PV0">
+    <x title="Cluster #eta [rad]" n="200"  lo="-4." hi="4."/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- m_clusters_all_neutral_notPV0_e-->
+  <h id="clusters_all_neutral_notPV0_e" type="TH1F" title="Cluster Energy - all Neutral not PV0">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- m_clusters_all_neutral_neutral_eta -->
+  <h id="clusters_all_neutral_neutral_eta" type="TH1F" title="Cluster #eta - all Neutral real">
+    <x title="Cluster #eta [rad]" n="200"  lo="-4." hi="4."/>
+    <y title="Entries" />
+  </h>
+  
+  <!-- m_clusters_all_neutral_neutral_e-->
+  <h id="clusters_all_neutral_neutral_e" type="TH1F" title="Cluster Energy - all Neutral real">
+    <x title="Cluster Energy [GeV]" n="4000" lo="-500" hi="3500"/>
+    <y title="Entries" />
+  </h>
+  
+</hdef>
+
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/share/hdefhtml.xsl b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/share/hdefhtml.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..60bfe44bfc2666c3f5937faa763e4d57b8f78734
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/share/hdefhtml.xsl
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
+    exclude-result-prefixes="xs xd" version="1.0">
+    <xd:doc scope="stylesheet">
+        <xd:desc>
+            <xd:p><xd:b>Created on:</xd:b> Mar 22, 2016</xd:p>
+            <xd:p><xd:b>Author:</xd:b> sroe</xd:p>
+            <xd:p>Produces an html representation of the hdef xml file.</xd:p>
+        </xd:desc>
+    </xd:doc>
+    <xsl:output indent="yes" method="html"/>
+    <xsl:template match="@*|node()"/>
+    <xsl:template match="hdef">
+        <html>
+            <head>
+                <title>Histogram definitions</title>
+                <style type="text/css">
+table{
+  width: 800px;
+  border-collapse: collapse;
+}
+th, td{
+  border: none;
+}
+th{
+  background-color: #000;
+  color: #fff;
+}
+tr:nth-of-type(even){ background-color: #F3F3F3;
+}
+tr:nth-of-type(odd) { background-color:#ddd;
+}
+
+                </style>
+            </head>
+            <body>
+                <h1>Histogram Definitions</h1>
+                <table>
+                    <thead>
+                        <tr>
+                            <th>Unique id</th>
+                            <th>Type</th>
+                            <th>Title</th>
+                            <th>x:Nbins</th>
+                            <th>x:lo</th>
+                            <th>x:hi</th>
+                            <th>y:Title</th>
+                            <th>y:Nbins</th>
+                            <th>y:lo</th>
+                            <th>y:hi</th>
+                            <th>y:Title</th>
+                        </tr>
+                    </thead>
+                    <tbody>
+                        
+                            <xsl:apply-templates/>
+                        
+                    </tbody>
+                </table>
+            </body>
+        </html>
+    </xsl:template>
+    <xsl:template match="h">
+        <tr>
+        <td>
+            <xsl:value-of select="@id"/>
+        </td>
+        <td>
+            <xsl:value-of select="@type"/>
+        </td>
+        <td>
+            <xsl:value-of select="@title"/>
+        </td>
+        <td>
+            <xsl:value-of select="./x/@n"/>
+        </td>
+        <td>
+            <xsl:value-of select="./x/@lo"/>
+        </td>
+        <td>
+            <xsl:value-of select="./x/@hi"/>
+        </td>
+        <td>
+            <xsl:value-of select="./x/@title"/>
+        </td>
+        <td>
+            <xsl:value-of select="./y/@n"/>
+        </td>
+        <td>
+            <xsl:value-of select="./y/@lo"/>
+        </td>
+        <td>
+            <xsl:value-of select="./y/@hi"/>
+        </td>
+        <td>
+            <xsl:value-of select="./y/@title"/>
+        </td>
+            </tr>
+    </xsl:template>
+</xsl:stylesheet>
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/share/hdeftty.xsl b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/share/hdeftty.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..8c4dae828c324f13949e3bf679cd435583f7b515
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/share/hdeftty.xsl
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
+    exclude-result-prefixes="xs xd" version="1.0">
+    <xd:doc scope="stylesheet">
+        <xd:desc>
+            <xd:p><xd:b>Created on:</xd:b> Mar 22, 2016</xd:p>
+            <xd:p><xd:b>Author:</xd:b> sroe</xd:p>
+            <xd:p>Produces a plain text format of the hdef xml file.</xd:p>
+        </xd:desc>
+    </xd:doc>
+    <xsl:output method="text"/>
+    <xsl:template match="@*|node()"/>
+    <xsl:template match="hdef">
+        <xsl:apply-templates/>
+    </xsl:template>
+    <xsl:template match="h">
+        <xsl:variable name="s" select="' '"/>
+        <xsl:variable name="cr" select="'&#x0A;'"/>
+        <xsl:variable name="q" select="'&quot;'"/>
+        <xsl:value-of select="concat(@id,$s,@type,$s,$q,@title,$q,$s,x/@n,$s,x/@lo,$s,x/@hi,$s,$q,x/@title,$q,$s,y/@n,$s,y/@lo,$s,y/@hi,$s,$q,y/@title,$q,$s)"/>
+<xsl:value-of select="$cr"/>
+    </xsl:template>
+</xsl:stylesheet>
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3b5cc09e9af64d2c3a52bb6be65c2d053e6a2c98
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/CalibrationNtupleMakerTool.cxx
@@ -0,0 +1,363 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+//////////////////////////////////////////////////////////////////
+// CalibrationNtupleMakerTool.cxx, (c) ATLAS Detector software
+///////////////////////////////////////////////////////////////////
+
+#include "TrackCaloClusterRecValidation/CalibrationNtupleMakerTool.h"
+
+#include "xAODJet/JetContainer.h"
+#include "xAODEventInfo/EventInfo.h"
+#include "xAODEventInfo/EventAuxInfo.h"
+
+#include "EventInfo/EventInfo.h"
+#include "EventInfo/EventType.h"
+
+#include "xAODPFlow/TrackCaloClusterContainer.h"
+
+#include "xAODParticleEvent/IParticleLink.h"
+#include "xAODParticleEvent/IParticleLinkContainer.h"
+
+// Gaudi
+#include "GaudiKernel/ITHistSvc.h"
+
+// Root
+#include "TTree.h"
+#include "TString.h"
+#include "TH1F.h"
+
+#include <vector>
+
+using CLHEP::GeV;
+
+CalibrationNtupleMakerTool::CalibrationNtupleMakerTool(const std::string& name, ISvcLocator* pSvcLocator) :
+  AthAlgorithm(name, pSvcLocator),
+  m_treeFolder("/calibration/"),  
+  m_treeDescription("Calibration Ntuple"),
+  m_truthJetContainerName("MyAntiKt10TruthJets"),
+  m_vertexContainerName("PrimaryVertices"),
+  m_recoIsoDR(1.5),
+  m_recoIsoPtCut(100.*GeV),
+  m_trueIsoDR(2.5),
+  m_trueIsoPtCut(100.*GeV),  
+  m_matchingCut(0.6),  
+  h_events(nullptr),
+  m_index(0),  
+  m_etaCalo(0),
+  m_etaDetCalo(0),
+  m_phiCalo(0),
+  m_eCalo(0),
+  m_mCalo(0),  
+  m_etaCorr(0),
+  m_etaDetCorr(0),
+  m_phiCorr(0),
+  m_eCorr(0),
+  m_mCorr(0),              
+  m_etaTrue(0),
+  m_phiTrue(0),
+  m_eTrue(0),
+  m_mTrue(0)
+  {    
+    declareProperty("FolderName" , m_treeFolder);
+    declareProperty("Description", m_treeDescription);
+    
+    // the jets collections to calibrate
+    declareProperty("JetCollections"       , m_collectionNames);
+    declareProperty("TruthJetContainerName", m_truthJetContainerName);
+    declareProperty("VertexContainerName"  , m_vertexContainerName);
+    
+    declareProperty("RecoIsolationDR"    , m_recoIsoDR);
+    declareProperty("RecoIsolationPtCut" , m_recoIsoPtCut);
+    declareProperty("TruthIsolationDR"   , m_trueIsoDR);
+    declareProperty("TruthIsolationPtCut", m_trueIsoPtCut);
+    declareProperty("MatchingCut"        , m_matchingCut);   
+  }
+  
+CalibrationNtupleMakerTool::~CalibrationNtupleMakerTool()
+{}
+  
+StatusCode CalibrationNtupleMakerTool::initialize()
+{
+  ATH_MSG_INFO( "initialize()" );
+  
+  if  (bookTree().isFailure()){
+    ATH_MSG_FATAL( "Could not book the TTree object" );
+    return StatusCode::FAILURE;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode CalibrationNtupleMakerTool::bookTree()
+{
+  ATH_MSG_INFO( "bookTree()" );
+  
+  
+  for (auto& name : m_collectionNames) {
+    
+    // creating the tree for thw jet collection
+    TTree * tree = new TTree (name.c_str(), m_treeDescription.c_str());
+    
+    // add the branches
+    tree->Branch("EventWeight"    ,  &m_eventWeight   );
+    
+    tree->Branch("eta_calo"       ,  &m_etaCalo       );
+    tree->Branch("eta_det_calo"   ,  &m_etaDetCalo    );
+    tree->Branch("phi_calo"       ,  &m_phiCalo       );
+    tree->Branch("E_calo"         ,  &m_eCalo         );
+    tree->Branch("m_calo"         ,  &m_mCalo         );
+                                                      
+    tree->Branch("eta_corr1"      ,  &m_etaCorr       );
+    tree->Branch("eta_det_corr1"  ,  &m_etaDetCorr    );
+    tree->Branch("phi_corr1"      ,  &m_phiCorr       );
+    tree->Branch("E_corr1"        ,  &m_eCorr         );
+    tree->Branch("m_corr1"        ,  &m_mCorr         );
+                                                      
+    tree->Branch("eta_true"       ,  &m_etaTrue       );
+    tree->Branch("phi_true"       ,  &m_phiTrue       );
+    tree->Branch("E_true"         ,  &m_eTrue         );
+    tree->Branch("m_true"         ,  &m_mTrue         );
+                                                      
+    tree->Branch("index"          ,  &m_index         );
+    tree->Branch("mu"             ,  &m_mu            );
+    tree->Branch("NPV"            ,  &m_npv           );
+    
+    
+    m_trees.insert(std::pair<std::string, TTree*>(name, tree));
+    
+  }
+  
+  // now register the Tree
+  ITHistSvc* tHistSvc = 0;
+  if (service("THistSvc",tHistSvc).isFailure()) {
+    ATH_MSG_ERROR( "initialize() Could not find Hist Service!" );
+    return StatusCode::FAILURE;
+  }
+  
+  if (tHistSvc) {
+    for (auto name : m_collectionNames) {
+      if((tHistSvc->regTree(m_treeFolder+name, m_trees.at(name))).isFailure()) {
+	ATH_MSG_ERROR( "initialize() Could not register the validation Tree!" );
+	return StatusCode::FAILURE;
+      }
+    }
+  }
+  
+  // now register the Event histogram
+  h_events = new TH1F("h_events","total events", 10, 0, 10);
+  
+  if (tHistSvc and (tHistSvc->regHist(m_treeFolder+h_events->GetName(), h_events)).isFailure()) {
+    ATH_MSG_ERROR( "Can not register histogram" <<  h_events->GetName() );
+    return StatusCode::FAILURE;
+  }
+
+  ATH_MSG_INFO("Calibration Tree booked and registered successfully!");
+  
+  return StatusCode::SUCCESS;
+  
+}
+
+StatusCode CalibrationNtupleMakerTool::execute()
+{
+  h_events->Fill(0);
+  
+  const EventInfo* info = nullptr;
+  if (evtStore()->retrieve(info).isFailure()){
+    ATH_MSG_FATAL( "Unable to retrieve Event Info" );
+    return StatusCode::FAILURE;
+  } 
+
+  float ev_weight = info->event_type()->mc_event_weight();
+  
+  const auto truths = getContainer<xAOD::JetContainer>(m_truthJetContainerName);  
+  if (not truths) return StatusCode::FAILURE;
+  
+  const auto vertices = getContainer<xAOD::VertexContainer>(m_vertexContainerName);
+  if (not vertices) return StatusCode::FAILURE;
+  
+  // get mu
+  float mu= info->averageInteractionsPerCrossing();
+  
+  //get NPV
+  float npv = 0.;
+  
+  for (const auto& vertex : *vertices) {
+    if (vertex->nTrackParticles()>=2)
+      npv++;
+  }
+  
+  for (auto& name : m_collectionNames) {
+    const auto jets = getContainer<xAOD::JetContainer>(name);
+
+    m_etaCalo       ->clear();
+    m_etaDetCalo    ->clear();
+    m_phiCalo       ->clear();
+    m_eCalo         ->clear();
+    m_mCalo         ->clear();
+    m_etaCorr       ->clear();
+    m_etaDetCorr    ->clear();
+    m_phiCorr       ->clear();
+    m_eCorr         ->clear();
+    m_mCorr         ->clear();
+    m_etaTrue       ->clear();
+    m_phiTrue       ->clear();
+    m_eTrue         ->clear();
+    m_mTrue         ->clear();
+    m_index         ->clear();
+    
+    for (const auto& truth: *truths) {
+
+      // here we match to the reco
+      int index = 0;
+      std::vector<const xAOD::Jet*> matched = {};
+      
+      int Nmatches = Matched(truth, jets, matched, index);
+      
+      // skip truth jets that don't match any reco jets
+      if (Nmatches==0) continue; 
+
+      // skip the jets that are not isolated
+      if ( m_recoIsoDR > 0 ) {
+	double DRminReco = DRmin(matched.at(0),jets,m_recoIsoPtCut);
+	if ( DRminReco < m_recoIsoDR ) continue;
+      }
+      
+      if ( m_trueIsoDR > 0 ) {
+	double DRminTruth = DRmin(truth,truths,m_trueIsoPtCut);
+	if ( DRminTruth < m_trueIsoDR ) continue;
+      }
+      
+      //Storing variables
+      m_etaTrue->push_back(truth->eta());
+      m_phiTrue->push_back(truth->phi());
+      m_mTrue->push_back(truth->m()/GeV);
+      m_eTrue->push_back(truth->e()/GeV);
+      
+      m_etaCalo->push_back(jets->at(index)->eta());
+      m_phiCalo->push_back(jets->at(index)->phi());
+      m_mCalo->push_back(jets->at(index)->m()/GeV);
+      m_eCalo->push_back(jets->at(index)->e()/GeV);
+      
+      float detectorEta = DetectorEta(jets->at(index));
+      m_etaDetCalo->push_back(detectorEta);
+            
+      m_etaCorr->push_back(jets->at(index)->eta());
+      m_phiCorr->push_back(jets->at(index)->phi());
+      m_mCorr->push_back(jets->at(index)->m()/GeV);
+      m_eCorr->push_back(jets->at(index)->e()/GeV);
+      m_etaDetCorr->push_back(detectorEta);
+      
+      m_index->push_back(index);
+      
+    }
+    
+    m_eventWeight = ev_weight;
+    m_mu          = mu;
+    m_npv         = npv;
+    
+    m_trees.at(name)->Fill();
+    
+  }
+  
+  return StatusCode::SUCCESS;
+  
+}
+
+int CalibrationNtupleMakerTool::Matched(const xAOD::Jet* truth, const xAOD::JetContainer* jets, std::vector<const xAOD::Jet*>& matched, int& index) {
+  
+  int Nmatches = 0;
+  double drmin = 999.;
+  int Min_index=-1;
+
+  for (unsigned int ind = 0; ind < jets->size(); ind++) {  
+    double dr = truth->p4().DeltaR(jets->at(ind)->p4());
+    if (dr < m_matchingCut) ++Nmatches;
+    //find minimum:
+    if (dr < drmin) {
+      drmin     = dr;
+      Min_index = ind;
+    }
+  }
+  
+  if (drmin<m_matchingCut) {
+    matched.push_back(jets->at(Min_index));
+    index   = Min_index;
+  }
+  
+  return Nmatches;
+}
+
+double CalibrationNtupleMakerTool::DRmin(const xAOD::Jet* myjet, const xAOD::JetContainer* jets, double PtMin) {
+
+  double DRmin=9999;
+  for (const auto& jet : *jets) {
+    if (PtMin>0. and jet->pt()<PtMin) continue;
+    double Dr = myjet->p4().DeltaR(jet->p4());
+    if (Dr>0.0001 and Dr<DRmin) 
+      DRmin=Dr;
+  }
+  return DRmin;
+}
+
+float CalibrationNtupleMakerTool::DetectorEta(const xAOD::Jet* jet) {
+  
+  xAOD::IParticle::FourMom_t corrP4(0,0,0,0);
+      
+  const auto& partLinks = jet->constituentLinks();
+  for (const xAOD::IParticleLink& link : partLinks) {
+    
+    if (not link.isValid()) {
+      ATH_MSG_WARNING("Got an invalid element link. Returning jet eta...");
+      return jet->eta();
+    }
+    
+    const xAOD::TrackCaloCluster* tcc = dynamic_cast<const xAOD::TrackCaloCluster*>(*link);
+    
+    static SG::AuxElement::Accessor< float > acc_detEta( "DetectorEta" );
+    float det_eta = tcc->eta();
+    
+    if (acc_detEta.isAvailable(*tcc)) {
+      det_eta = acc_detEta(*tcc);      
+    } else
+      ATH_MSG_WARNING("DetectorEta decoration not found for TCCs! Using eta...");
+    
+    double pt = tcc->p4().P()/cosh(det_eta);
+    
+    xAOD::IParticle::FourMom_t p4CorrCl;
+    p4CorrCl.SetPtEtaPhiE(pt, det_eta, tcc->p4().Phi(), tcc->p4().E());
+    if(tcc->p4().E() < 0.) p4CorrCl*=-1.;
+    corrP4 += p4CorrCl;  
+  }
+    
+  return corrP4.Eta();
+}
+
+StatusCode CalibrationNtupleMakerTool::finalize()
+{
+  ATH_MSG_INFO( "finalize()" );
+  
+  delete  m_index;
+  
+  delete  m_etaCalo;
+  delete  m_etaDetCalo;
+  delete  m_phiCalo;
+  delete  m_eCalo;
+  delete  m_mCalo;
+  
+  delete  m_etaCorr;
+  delete  m_etaDetCorr;
+  delete  m_phiCorr;
+  delete  m_eCorr;
+  delete  m_mCorr;
+  
+  delete  m_etaTrue;
+  delete  m_phiTrue;
+  delete  m_eTrue;
+  delete  m_mTrue;
+  
+  return StatusCode::SUCCESS;
+  
+}
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlots.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlots.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..aebeb29b4c6631083c1315d5e8fba1ddb99ea5cb
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlots.cxx
@@ -0,0 +1,2807 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TCCPlots.h"
+#include <cmath>
+
+using CLHEP::GeV;
+
+TCCPlots::TCCPlots(TCCPlotsBase* pParent, const std::string& sDir, const std::string& collection) :
+  TCCPlotsBase(pParent, sDir),
+  m_collectionType (collection),
+  m_eventWeight    (1.0),
+  m_jet_n                           (nullptr),
+  m_jet_pt                          (nullptr),
+  m_jet_eta                         (nullptr),
+  m_jet_phi                         (nullptr),
+  m_jet_m                           (nullptr),
+  m_jet_m_2leadings                 (nullptr),
+  m_jet_pt_2leadings                (nullptr),
+  m_jet_eta_2leadings               (nullptr),
+  m_jet_phi_2leadings               (nullptr),
+  m_jet_m_leading                   (nullptr),
+  m_jet_pt_leading                  (nullptr),
+  m_jet_eta_leading                 (nullptr),
+  m_jet_phi_leading                 (nullptr),
+  m_jet_m_subleading                (nullptr),
+  m_jet_pt_subleading               (nullptr),
+  m_jet_eta_subleading              (nullptr),
+  m_jet_phi_subleading              (nullptr),
+  m_jet_deltaR                      (nullptr),
+  m_jet_deltaR_matched              (nullptr),
+  m_jet_response_m                  (nullptr),
+  m_jet_response_m_pt               (nullptr),
+  m_jet_response_pt                 (nullptr),
+  m_jet_response_eta                (nullptr),
+  m_jet_response_phi                (nullptr),
+  m_jet_response_m_2leadings        (nullptr),
+  m_jet_response_m_pt_2leadings     (nullptr),
+  m_jet_response_pt_2leadings       (nullptr),
+  m_jet_response_eta_2leadings      (nullptr),
+  m_jet_response_phi_2leadings      (nullptr),
+  m_jet_response_m_leading          (nullptr),
+  m_jet_response_m_pt_leading       (nullptr),
+  m_jet_response_pt_leading         (nullptr),
+  m_jet_response_eta_leading        (nullptr),
+  m_jet_response_phi_leading        (nullptr),
+  m_jet_response_m_subleading       (nullptr),
+  m_jet_response_m_pt_subleading    (nullptr),
+  m_jet_response_pt_subleading      (nullptr),
+  m_jet_response_eta_subleading     (nullptr),
+  m_jet_response_phi_subleading     (nullptr),
+  m_jet_response_add_eta            (nullptr),
+  m_jet_response_add_eta_2leadings  (nullptr),
+  m_jet_response_add_eta_leading    (nullptr),
+  m_jet_response_add_eta_subleading (nullptr),
+  m_jet_response_add_eta_pt            (nullptr),
+  m_jet_response_add_eta_pt_2leadings  (nullptr),
+  m_jet_response_add_eta_pt_leading    (nullptr),
+  m_jet_response_add_eta_pt_subleading (nullptr),
+  m_jet_response_m_npv              (nullptr),
+  m_jet_response_m_npv_2leadings    (nullptr),
+  m_jet_response_m_npv_leading      (nullptr),
+  m_jet_response_m_npv_subleading   (nullptr),
+  m_jet_response_d2_pt              (nullptr),
+  m_jet_response_d2_pt_2leadings    (nullptr),
+  m_jet_response_d2_pt_leading      (nullptr),
+  m_jet_response_d2_pt_subleading   (nullptr),
+  m_jet_response_add_d2_pt            (nullptr),
+  m_jet_response_add_d2_pt_2leadings  (nullptr),
+  m_jet_response_add_d2_pt_leading    (nullptr),
+  m_jet_response_add_d2_pt_subleading (nullptr),
+  m_jet_pseudoresponse_m            (nullptr),
+  m_jet_pseudoresponse_pt           (nullptr),
+  m_jet_pseudoresponse_m_2leadings  (nullptr),
+  m_jet_pseudoresponse_pt_2leadings (nullptr),
+  m_jet_pseudoresponse_m_leading    (nullptr),
+  m_jet_pseudoresponse_pt_leading   (nullptr),
+  m_jet_pseudoresponse_m_subleading (nullptr),
+  m_jet_pseudoresponse_pt_subleading(nullptr),
+  m_jet_pseudoresponse_notcalib_pt           (nullptr),
+  m_jet_pseudoresponse_notcalib_pt_2leadings (nullptr),
+  m_jet_pseudoresponse_notcalib_pt_leading   (nullptr),
+  m_jet_pseudoresponse_notcalib_pt_subleading(nullptr),
+  m_jet_d2                          (nullptr),
+  m_jet_d2_2leadings                (nullptr),
+  m_jet_d2_leading                  (nullptr),
+  m_jet_d2_subleading               (nullptr),
+  m_jet_d2_massCut                  (nullptr),
+  m_jet_d2_2leadings_massCut        (nullptr),
+  m_jet_d2_leading_massCut          (nullptr),
+  m_jet_d2_subleading_massCut       (nullptr),
+  m_jet_response_d2                 (nullptr),
+  m_jet_response_d2_2leadings       (nullptr),
+  m_jet_response_d2_leading         (nullptr),
+  m_jet_response_d2_subleading      (nullptr),
+  m_jet_response_add_d2             (nullptr),
+  m_jet_response_add_d2_2leadings   (nullptr),
+  m_jet_response_add_d2_leading     (nullptr),
+  m_jet_response_add_d2_subleading  (nullptr),
+  m_jet_resolution_m                (nullptr),
+  m_jet_resolution_m_2leadings      (nullptr),
+  m_jet_resolution_m_leading        (nullptr),
+  m_jet_resolution_m_subleading     (nullptr),
+  m_jet_resolution_m_npv            (nullptr),
+  m_jet_resolution_m_npv_2leadings  (nullptr),
+  m_jet_resolution_m_npv_leading    (nullptr),
+  m_jet_resolution_m_npv_subleading (nullptr),
+  m_jet_median_width_m_npv            (nullptr),
+  m_jet_median_width_m_npv_2leadings  (nullptr),
+  m_jet_median_width_m_npv_leading    (nullptr),
+  m_jet_median_width_m_npv_subleading (nullptr),  
+  m_jet_resolution_d2                 (nullptr),
+  m_jet_resolution_d2_2leadings       (nullptr),
+  m_jet_resolution_d2_leading         (nullptr),
+  m_jet_resolution_d2_subleading      (nullptr),
+  m_jet_resolution_add_d2             (nullptr),
+  m_jet_resolution_add_d2_2leadings   (nullptr),
+  m_jet_resolution_add_d2_leading     (nullptr),
+  m_jet_resolution_add_d2_subleading  (nullptr),
+  m_jet_mopt_pt_response_m                   (nullptr),  
+  m_jet_mopt_pt_response_m_2leadings         (nullptr),  
+  m_jet_mopt_pt_response_m_leading           (nullptr),  
+  m_jet_mopt_pt_response_m_subleading        (nullptr),  
+  m_jet_mopt_pt_response_pt                  (nullptr),  
+  m_jet_mopt_pt_response_pt_2leadings        (nullptr),  
+  m_jet_mopt_pt_response_pt_leading          (nullptr),  
+  m_jet_mopt_pt_response_pt_subleading       (nullptr),  
+  m_jet_mopt_pt_response_phi                 (nullptr),  
+  m_jet_mopt_pt_response_phi_2leadings       (nullptr),  
+  m_jet_mopt_pt_response_phi_leading         (nullptr),  
+  m_jet_mopt_pt_response_phi_subleading      (nullptr),  
+  m_jet_mopt_pt_response_eta                 (nullptr),  
+  m_jet_mopt_pt_response_eta_2leadings       (nullptr),  
+  m_jet_mopt_pt_response_eta_leading         (nullptr),  
+  m_jet_mopt_pt_response_eta_subleading      (nullptr),  
+  m_jet_mopt_pt_response_d2                  (nullptr),  
+  m_jet_mopt_pt_response_d2_2leadings        (nullptr),  
+  m_jet_mopt_pt_response_d2_leading          (nullptr),  
+  m_jet_mopt_pt_response_d2_subleading       (nullptr),  
+  m_jet_resolution_mopt_pt_m                 (nullptr),  
+  m_jet_resolution_mopt_pt_m_2leadings       (nullptr),  
+  m_jet_resolution_mopt_pt_m_leading         (nullptr),  
+  m_jet_resolution_mopt_pt_m_subleading      (nullptr),  
+  m_jet_resolution_mopt_pt_pt                (nullptr),  
+  m_jet_resolution_mopt_pt_pt_2leadings      (nullptr),  
+  m_jet_resolution_mopt_pt_pt_leading        (nullptr),  
+  m_jet_resolution_mopt_pt_pt_subleading     (nullptr),  
+  m_jet_resolution_mopt_pt_phi               (nullptr),  
+  m_jet_resolution_mopt_pt_phi_2leadings     (nullptr),  
+  m_jet_resolution_mopt_pt_phi_leading       (nullptr),  
+  m_jet_resolution_mopt_pt_phi_subleading    (nullptr),  
+  m_jet_resolution_mopt_pt_eta               (nullptr),  
+  m_jet_resolution_mopt_pt_eta_2leadings     (nullptr),  
+  m_jet_resolution_mopt_pt_eta_leading       (nullptr),  
+  m_jet_resolution_mopt_pt_eta_subleading    (nullptr),  
+  m_jet_resolution_mopt_pt_d2                (nullptr),  
+  m_jet_resolution_mopt_pt_d2_2leadings      (nullptr),  
+  m_jet_resolution_mopt_pt_d2_leading        (nullptr),  
+  m_jet_resolution_mopt_pt_d2_subleading     (nullptr),
+  m_trk_d0                                   (nullptr),
+  m_trk_z0                                   (nullptr),
+  m_trk_theta                                (nullptr),
+  m_trk_phi                                  (nullptr),
+  m_trk_qOverP                               (nullptr),
+  m_trk_d0_eta                               (nullptr),
+  m_trk_z0_eta                               (nullptr),
+  m_trk_theta_eta                            (nullptr),
+  m_trk_phi_eta                              (nullptr),
+  m_trk_qOverP_eta                           (nullptr),
+  m_trk_d0_pt                                (nullptr),
+  m_trk_z0_pt                                (nullptr),
+  m_trk_theta_pt                             (nullptr),
+  m_trk_phi_pt                               (nullptr),
+  m_trk_qOverP_pt                            (nullptr),
+  m_trk_caloEntryEta                         (nullptr),
+  m_trk_caloEntryEtaOverEta_eta              (nullptr),
+  m_trk_caloEntryEtaOverEta_pt               (nullptr),
+  m_trk_caloEntryUncEta_caloEntryEta         (nullptr),
+  m_trk_caloEntryUncEta_eta                  (nullptr),
+  m_trk_caloEntryUncEta_pt                   (nullptr),
+  m_trk_caloEntryUncTheta_eta                (nullptr),
+  m_trk_caloEntryUncTheta_pt                 (nullptr),
+  m_trk_caloEntryPhi                         (nullptr),
+  m_trk_caloEntryPhiOverPhi_eta              (nullptr),
+  m_trk_caloEntryPhiOverPhi_pt               (nullptr),
+  m_trk_caloEntryUncPhi_caloEntryPhi         (nullptr),
+  m_trk_caloEntryUncPhi_eta                  (nullptr),
+  m_trk_caloEntryUncPhi_pt                   (nullptr),
+  m_trk_caloEntryUncTot_eta                  (nullptr),
+  m_trk_caloEntryUncTot_pt                   (nullptr),
+  m_trk_perigeeEta                           (nullptr),
+  m_trk_perigeeUncEta_eta                    (nullptr),
+  m_trk_perigeeUncEta_pt                     (nullptr),
+  m_trk_perigeeUncTheta_eta                  (nullptr),
+  m_trk_perigeeUncTheta_pt                   (nullptr),
+  m_trk_perigeePhi                           (nullptr),
+  m_trk_perigeeUncPhi_eta                    (nullptr),
+  m_trk_perigeeUncPhi_pt                     (nullptr),
+  m_trk_perigeeUncTot_eta                    (nullptr),
+  m_trk_perigeeUncTot_pt                     (nullptr),
+  m_trk_perigeeUncEta_caloUncEta             (nullptr),
+  m_trk_perigeeUncTheta_caloUncTheta         (nullptr),
+  m_trk_perigeeUncPhi_caloUncPhi             (nullptr),
+  m_trk_perigeeUncTot_caloUncTot             (nullptr),
+  m_trk_prodRadius                           (nullptr),
+  m_trk_perigeeUncEta_prodRadius             (nullptr),
+  m_trk_perigeeUncTheta_prodRadius           (nullptr),
+  m_trk_perigeeUncPhi_prodRadius             (nullptr), 
+  m_trk_perigeeUncTot_prodRadius             (nullptr), 
+  m_trk_caloEntryUncEta_prodRadius           (nullptr), 
+  m_trk_caloEntryUncTheta_prodRadius         (nullptr), 
+  m_trk_caloEntryUncPhi_prodRadius           (nullptr), 
+  m_trk_caloEntryUncTot_prodRadius           (nullptr),
+  m_trk_delta_perigeeEta_caloEntryEta        (nullptr),
+  m_trk_delta_perigeePhi_caloEntryPhi        (nullptr),
+  m_trk_delta_perigeeEta_caloEntryEta_eta    (nullptr),
+  m_trk_delta_perigeePhi_caloEntryPhi_eta    (nullptr),
+  m_trk_delta_perigeeEta_caloEntryEta_pt     (nullptr),
+  m_trk_delta_perigeePhi_caloEntryPhi_pt     (nullptr),
+  m_trk_delta_trackEta_caloEntryEta          (nullptr),
+  m_trk_delta_trackPhi_caloEntryPhi          (nullptr),
+  m_trk_delta_trackEta_caloEntryEta_eta      (nullptr),
+  m_trk_delta_trackPhi_caloEntryPhi_eta      (nullptr),
+  m_trk_delta_trackEta_caloEntryEta_pt       (nullptr),
+  m_trk_delta_trackPhi_caloEntryPhi_pt       (nullptr),
+  m_trk_delta_trackEta_caloEntryEtaCorr      (nullptr),
+  m_trk_delta_trackPhi_caloEntryPhiCorr      (nullptr),
+  m_trk_delta_trackEta_caloEntryEtaCorr_eta  (nullptr),
+  m_trk_delta_trackPhi_caloEntryPhiCorr_eta  (nullptr),
+  m_trk_delta_trackEta_caloEntryEtaCorr_pt   (nullptr),
+  m_trk_delta_trackPhi_caloEntryPhiCorr_pt   (nullptr),
+  m_trk_delta_caloEntryEta_caloEntryEtaCorr    (nullptr),
+  m_trk_delta_caloEntryPhi_caloEntryPhiCorr    (nullptr),
+  m_trk_delta_caloEntryEta_caloEntryEtaCorr_eta(nullptr),
+  m_trk_delta_caloEntryPhi_caloEntryPhiCorr_eta(nullptr),
+  m_trk_delta_caloEntryEta_caloEntryEtaCorr_pt (nullptr),
+  m_trk_delta_caloEntryPhi_caloEntryPhiCorr_pt (nullptr),
+  m_clusters_eta                               (nullptr),
+  m_clusters_matched_eta                       (nullptr),
+  m_clusters_notMatched_eta                    (nullptr),
+  m_clusters_matchedFraction_eta               (nullptr),
+  m_clusters_notMatchedFraction_eta            (nullptr),
+  m_clusters_width                             (nullptr),
+  m_clusters_width_eta                         (nullptr),
+  m_clusters_energy                            (nullptr),
+  m_clusters_matched_energy                    (nullptr),
+  m_clusters_notMatched_energy                 (nullptr),
+  m_clusters_matchedFraction_energy            (nullptr),
+  m_clusters_notMatchedFraction_energy         (nullptr),
+  m_clusters_width_energy                      (nullptr),
+  m_clusters_etacut_eta                        (nullptr),
+  m_clusters_etacut_width                      (nullptr),
+  m_clusters_etacut_width_eta                  (nullptr),
+  m_clusters_etacut_energy                     (nullptr),
+  m_clusters_etacut_width_energy               (nullptr),          
+  m_clusters_matched_eta_fix_and_var           (nullptr),
+  m_clusters_matched_eta_fix_or_var            (nullptr),
+  m_clusters_matched_eta_fix                   (nullptr),
+  m_clusters_matched_eta_notfix                (nullptr),
+  m_clusters_matched_eta_var                   (nullptr),
+  m_clusters_matched_eta_notvar                (nullptr),
+  m_clusters_matched_eta_onlyvar               (nullptr),
+  m_clusters_matched_eta_onlyfix               (nullptr),
+  m_clusters_matched_eta_none                  (nullptr),
+  m_clusters_matchedFraction_eta_fix_and_var   (nullptr),
+  m_clusters_matchedFraction_eta_fix_or_var    (nullptr),
+  m_clusters_matchedFraction_eta_fix           (nullptr),
+  m_clusters_matchedFraction_eta_notfix        (nullptr),
+  m_clusters_matchedFraction_eta_var           (nullptr),
+  m_clusters_matchedFraction_eta_notvar        (nullptr),
+  m_clusters_matchedFraction_eta_onlyvar       (nullptr),
+  m_clusters_matchedFraction_eta_onlyfix       (nullptr),
+  m_clusters_matchedFraction_eta_none          (nullptr),
+  m_clusters_abs_eta                               (nullptr),
+  m_clusters_abs_matched_eta                       (nullptr),
+  m_clusters_abs_notMatched_eta                    (nullptr),
+  m_clusters_abs_matchedFraction_eta               (nullptr),
+  m_clusters_abs_notMatchedFraction_eta            (nullptr),
+  m_clusters_abs_width                             (nullptr),
+  m_clusters_abs_width_eta                         (nullptr),
+  m_clusters_abs_energy                            (nullptr),
+  m_clusters_abs_matched_energy                    (nullptr),
+  m_clusters_abs_notMatched_energy                 (nullptr),
+  m_clusters_abs_matchedFraction_energy            (nullptr),
+  m_clusters_abs_notMatchedFraction_energy         (nullptr),
+  m_clusters_abs_width_energy                      (nullptr),
+  m_clusters_etacut_abs_eta                        (nullptr), 
+  m_clusters_etacut_abs_width                      (nullptr),
+  m_clusters_etacut_abs_width_eta                  (nullptr),
+  m_clusters_etacut_abs_energy                     (nullptr),
+  m_clusters_etacut_abs_width_energy               (nullptr),
+  m_clusters_abs_matched_eta_fix_and_var           (nullptr),
+  m_clusters_abs_matched_eta_fix_or_var            (nullptr),
+  m_clusters_abs_matched_eta_fix                   (nullptr),
+  m_clusters_abs_matched_eta_notfix                (nullptr),
+  m_clusters_abs_matched_eta_var                   (nullptr),
+  m_clusters_abs_matched_eta_notvar                (nullptr),
+  m_clusters_abs_matched_eta_onlyvar               (nullptr),
+  m_clusters_abs_matched_eta_onlyfix               (nullptr),
+  m_clusters_abs_matched_eta_none                  (nullptr),
+  m_clusters_abs_matchedFraction_eta_fix_and_var   (nullptr),
+  m_clusters_abs_matchedFraction_eta_fix_or_var    (nullptr),
+  m_clusters_abs_matchedFraction_eta_fix           (nullptr),
+  m_clusters_abs_matchedFraction_eta_notfix        (nullptr),
+  m_clusters_abs_matchedFraction_eta_var           (nullptr),
+  m_clusters_abs_matchedFraction_eta_notvar        (nullptr),
+  m_clusters_abs_matchedFraction_eta_onlyvar       (nullptr),
+  m_clusters_abs_matchedFraction_eta_onlyfix       (nullptr),
+  m_clusters_abs_matchedFraction_eta_none          (nullptr),
+  m_clusters_matched_pv0_eta_fix_and_var           (nullptr),
+  m_clusters_matched_pv0_eta_fix_or_var            (nullptr),
+  m_clusters_matched_pv0_eta_fix                   (nullptr),
+  m_clusters_matched_pv0_eta_notfix                (nullptr),
+  m_clusters_matched_pv0_eta_var                   (nullptr),
+  m_clusters_matched_pv0_eta_notvar                (nullptr),
+  m_clusters_matched_pv0_eta_onlyvar               (nullptr),
+  m_clusters_matched_pv0_eta_onlyfix               (nullptr),
+  m_clusters_matched_pv0_eta_none                  (nullptr),
+  m_clusters_abs_matched_pv0_eta_fix_and_var       (nullptr),
+  m_clusters_abs_matched_pv0_eta_fix_or_var        (nullptr),
+  m_clusters_abs_matched_pv0_eta_fix               (nullptr),
+  m_clusters_abs_matched_pv0_eta_notfix            (nullptr),
+  m_clusters_abs_matched_pv0_eta_var               (nullptr),
+  m_clusters_abs_matched_pv0_eta_notvar            (nullptr),
+  m_clusters_abs_matched_pv0_eta_onlyvar           (nullptr),
+  m_clusters_abs_matched_pv0_eta_onlyfix           (nullptr),
+  m_clusters_abs_matched_pv0_eta_none              (nullptr),
+  m_clusters_matchedpv0Fraction_eta_fix_and_var    (nullptr),
+  m_clusters_matchedpv0Fraction_eta_fix_or_var     (nullptr),
+  m_clusters_matchedpv0Fraction_eta_fix            (nullptr),
+  m_clusters_matchedpv0Fraction_eta_notfix         (nullptr),
+  m_clusters_matchedpv0Fraction_eta_var            (nullptr),
+  m_clusters_matchedpv0Fraction_eta_notvar         (nullptr),
+  m_clusters_matchedpv0Fraction_eta_onlyvar        (nullptr),
+  m_clusters_matchedpv0Fraction_eta_onlyfix        (nullptr),
+  m_clusters_matchedpv0Fraction_eta_none           (nullptr),
+  m_clusters_abs_matchedpv0Fraction_eta_fix_and_var(nullptr),
+  m_clusters_abs_matchedpv0Fraction_eta_fix_or_var (nullptr),
+  m_clusters_abs_matchedpv0Fraction_eta_fix        (nullptr),
+  m_clusters_abs_matchedpv0Fraction_eta_notfix     (nullptr),
+  m_clusters_abs_matchedpv0Fraction_eta_var        (nullptr),
+  m_clusters_abs_matchedpv0Fraction_eta_notvar     (nullptr),
+  m_clusters_abs_matchedpv0Fraction_eta_onlyvar    (nullptr),
+  m_clusters_abs_matchedpv0Fraction_eta_onlyfix    (nullptr),
+  m_clusters_abs_matchedpv0Fraction_eta_none       (nullptr),
+  m_clusters_matched_pvx_eta_fix_and_var           (nullptr),
+  m_clusters_matched_pvx_eta_fix_or_var            (nullptr),
+  m_clusters_matched_pvx_eta_fix                   (nullptr),
+  m_clusters_matched_pvx_eta_notfix                (nullptr),
+  m_clusters_matched_pvx_eta_var                   (nullptr),
+  m_clusters_matched_pvx_eta_notvar                (nullptr),
+  m_clusters_matched_pvx_eta_onlyvar               (nullptr),
+  m_clusters_matched_pvx_eta_onlyfix               (nullptr),
+  m_clusters_matched_pvx_eta_none                  (nullptr),
+  m_clusters_abs_matched_pvx_eta_fix_and_var       (nullptr),
+  m_clusters_abs_matched_pvx_eta_fix_or_var        (nullptr),
+  m_clusters_abs_matched_pvx_eta_fix               (nullptr),
+  m_clusters_abs_matched_pvx_eta_notfix            (nullptr),
+  m_clusters_abs_matched_pvx_eta_var               (nullptr),
+  m_clusters_abs_matched_pvx_eta_notvar            (nullptr),
+  m_clusters_abs_matched_pvx_eta_onlyvar           (nullptr),
+  m_clusters_abs_matched_pvx_eta_onlyfix           (nullptr),
+  m_clusters_abs_matched_pvx_eta_none              (nullptr),
+  m_clusters_matchedpvxFraction_eta_fix_and_var    (nullptr),
+  m_clusters_matchedpvxFraction_eta_fix_or_var     (nullptr),
+  m_clusters_matchedpvxFraction_eta_fix            (nullptr),
+  m_clusters_matchedpvxFraction_eta_notfix         (nullptr),
+  m_clusters_matchedpvxFraction_eta_var            (nullptr),
+  m_clusters_matchedpvxFraction_eta_notvar         (nullptr),
+  m_clusters_matchedpvxFraction_eta_onlyvar        (nullptr),
+  m_clusters_matchedpvxFraction_eta_onlyfix        (nullptr),
+  m_clusters_matchedpvxFraction_eta_none           (nullptr),
+  m_clusters_abs_matchedpvxFraction_eta_fix_and_var(nullptr),
+  m_clusters_abs_matchedpvxFraction_eta_fix_or_var (nullptr),
+  m_clusters_abs_matchedpvxFraction_eta_fix        (nullptr),
+  m_clusters_abs_matchedpvxFraction_eta_notfix     (nullptr),
+  m_clusters_abs_matchedpvxFraction_eta_var        (nullptr),
+  m_clusters_abs_matchedpvxFraction_eta_notvar     (nullptr),
+  m_clusters_abs_matchedpvxFraction_eta_onlyvar    (nullptr),
+  m_clusters_abs_matchedpvxFraction_eta_onlyfix    (nullptr),
+  m_clusters_abs_matchedpvxFraction_eta_none       (nullptr),
+  m_clusters_pt_fraction_e                         (nullptr),
+  m_clusters_PV0_pt_fraction_e                     (nullptr),
+  m_clusters_PVX_pt_fraction_e                     (nullptr),
+  m_clusters_rejected_pt_fraction_e                (nullptr),
+  m_clusters_all_neutral_eta                       (nullptr),
+  m_clusters_all_neutral_e                         (nullptr),
+  m_clusters_all_neutral_PV0_eta                   (nullptr),
+  m_clusters_all_neutral_PV0_e                     (nullptr),
+  m_clusters_all_neutral_notPV0_eta                (nullptr),
+  m_clusters_all_neutral_notPV0_e                  (nullptr),
+  m_clusters_all_neutral_neutral_eta               (nullptr),
+  m_clusters_all_neutral_neutral_e                 (nullptr),
+  m_trk_total_eta                                           (nullptr),
+  m_trk_total_pt                                            (nullptr),
+  m_trk_total_clusters_eta                                  (nullptr),
+  m_trk_total_clusters_pt                                   (nullptr),
+  m_trk_notMatching_deltar_fix_eta                          (nullptr),
+  m_trk_notMatching_deltar_fix_phi                          (nullptr),
+  m_trk_notMatching_deltar_fix_pt                           (nullptr),
+  m_trk_notMatching_deltar_fix_caloEntryUncTot_eta          (nullptr),
+  m_trk_notMatching_deltar_fix_caloEntryUncTot_pt           (nullptr),
+  m_trk_notMatching_deltar_fix_caloEntryUncTot_prodRadius   (nullptr),
+  m_trk_notMatching_deltar_var_eta                          (nullptr),
+  m_trk_notMatching_deltar_var_phi                          (nullptr),
+  m_trk_notMatching_deltar_var_pt                           (nullptr),
+  m_trk_notMatching_deltar_var_caloEntryUncTot_eta          (nullptr),
+  m_trk_notMatching_deltar_var_caloEntryUncTot_pt           (nullptr),
+  m_trk_notMatching_deltar_var_caloEntryUncTot_prodRadius   (nullptr),
+  m_trk_notMatching_deltar_none_eta                         (nullptr),
+  m_trk_notMatching_deltar_none_phi                         (nullptr),
+  m_trk_notMatching_deltar_none_pt                          (nullptr),
+  m_trk_notMatching_deltar_none_caloEntryUncTot_eta         (nullptr),
+  m_trk_notMatching_deltar_none_caloEntryUncTot_pt          (nullptr),
+  m_trk_notMatching_deltar_none_caloEntryUncTot_prodRadius  (nullptr),
+  m_trk_matching_deltar_fix_eta                             (nullptr),
+  m_trk_matching_deltar_fix_pt                              (nullptr),
+  m_trk_matching_deltar_var_eta                             (nullptr),
+  m_trk_matching_deltar_var_pt                              (nullptr),
+  m_trk_matching_deltar_onlyfix_eta                         (nullptr),
+  m_trk_matching_deltar_onlyfix_pt                          (nullptr),
+  m_trk_matching_deltar_onlyvar_eta                         (nullptr),
+  m_trk_matching_deltar_onlyvar_pt                          (nullptr),
+  m_trk_matching_deltar_fix_or_var_eta                      (nullptr),
+  m_trk_matching_deltar_fix_or_var_pt                       (nullptr),
+  m_trk_matching_deltar_fix_and_var_eta                     (nullptr),
+  m_trk_matching_deltar_fix_and_var_pt                      (nullptr),
+  m_trk_matching_deltar_or_clusters_eta                     (nullptr),
+  m_trk_matching_deltar_or_clusters_phi                     (nullptr),
+  m_trk_matching_deltar_or_clusters_pt                      (nullptr),
+  m_trk_matching_deltar_and_clusters_eta                    (nullptr),
+  m_trk_matching_deltar_and_clusters_phi                    (nullptr),
+  m_trk_matching_deltar_and_clusters_pt                     (nullptr),
+  m_trk_matching_deltar_fix_only_clusters_eta               (nullptr),
+  m_trk_matching_deltar_fix_only_clusters_phi               (nullptr),
+  m_trk_matching_deltar_fix_only_clusters_pt                (nullptr),
+  m_trk_matching_deltar_var_only_clusters_eta               (nullptr),
+  m_trk_matching_deltar_var_only_clusters_phi               (nullptr),
+  m_trk_matching_deltar_var_only_clusters_pt                (nullptr),
+  m_trk_matchedFraction_eta_fix_and_var                     (nullptr),
+  m_trk_matchedFraction_eta_fix_or_var                      (nullptr),
+  m_trk_matchedFraction_eta_fix                             (nullptr),
+  m_trk_matchedFraction_eta_notfix                          (nullptr),
+  m_trk_matchedFraction_eta_var                             (nullptr),
+  m_trk_matchedFraction_eta_notvar                          (nullptr),
+  m_trk_matchedFraction_eta_onlyvar                         (nullptr),
+  m_trk_matchedFraction_eta_onlyfix                         (nullptr),
+  m_trk_matchedFraction_eta_none                            (nullptr),
+  m_trk_matchedFraction_pt_fix_and_var                      (nullptr),
+  m_trk_matchedFraction_pt_fix_or_var                       (nullptr),
+  m_trk_matchedFraction_pt_fix                              (nullptr),
+  m_trk_matchedFraction_pt_notfix                           (nullptr),
+  m_trk_matchedFraction_pt_var                              (nullptr),
+  m_trk_matchedFraction_pt_notvar                           (nullptr),
+  m_trk_matchedFraction_pt_onlyvar                          (nullptr),
+  m_trk_matchedFraction_pt_onlyfix                          (nullptr),
+  m_trk_matchedFraction_pt_none                             (nullptr),
+  m_trk_pv0_total_eta                                       (nullptr),
+  m_trk_pv0_total_pt                                        (nullptr),
+  m_trk_pv0_caloEntryUncTot_eta                             (nullptr),
+  m_trk_pv0_caloEntryUncTot_pt                              (nullptr),
+  m_trk_pv0_caloEntryUncTot_truthpt                         (nullptr), 
+  m_trk_pv0_total_clusters_eta                              (nullptr),
+  m_trk_pv0_total_clusters_pt                               (nullptr),
+  m_trk_pv0_matching_deltar_fix_eta                         (nullptr),
+  m_trk_pv0_matching_deltar_fix_pt                          (nullptr),
+  m_trk_pv0_matching_deltar_var_eta                         (nullptr),
+  m_trk_pv0_matching_deltar_var_pt                          (nullptr),
+  m_trk_pv0_notMatching_deltar_fix_eta                      (nullptr),
+  m_trk_pv0_notMatching_deltar_fix_pt                       (nullptr),
+  m_trk_pv0_notMatching_deltar_var_eta                      (nullptr),
+  m_trk_pv0_notMatching_deltar_var_pt                       (nullptr),
+  m_trk_pv0_notMatching_deltar_none_eta                     (nullptr),
+  m_trk_pv0_notMatching_deltar_none_pt                      (nullptr),
+  m_trk_pv0_matching_deltar_fix_and_var_eta                 (nullptr),
+  m_trk_pv0_matching_deltar_fix_and_var_pt                  (nullptr),
+  m_trk_pv0_matching_deltar_fix_or_var_eta                  (nullptr),
+  m_trk_pv0_matching_deltar_fix_or_var_pt                   (nullptr),
+  m_trk_pv0_matching_deltar_onlyfix_eta                     (nullptr),
+  m_trk_pv0_matching_deltar_onlyfix_pt                      (nullptr),
+  m_trk_pv0_matching_deltar_onlyvar_eta                     (nullptr),
+  m_trk_pv0_matching_deltar_onlyvar_pt                      (nullptr),
+  m_trk_pv0_matchedFraction_eta_fix_and_var                 (nullptr),
+  m_trk_pv0_matchedFraction_eta_fix_or_var                  (nullptr),
+  m_trk_pv0_matchedFraction_eta_fix                         (nullptr),
+  m_trk_pv0_matchedFraction_eta_notfix                      (nullptr),
+  m_trk_pv0_matchedFraction_eta_var                         (nullptr),
+  m_trk_pv0_matchedFraction_eta_notvar                      (nullptr),
+  m_trk_pv0_matchedFraction_eta_onlyvar                     (nullptr),
+  m_trk_pv0_matchedFraction_eta_onlyfix                     (nullptr),
+  m_trk_pv0_matchedFraction_eta_none                        (nullptr),
+  m_trk_pv0_matchedFraction_pt_fix_and_var                  (nullptr),
+  m_trk_pv0_matchedFraction_pt_fix_or_var                   (nullptr),
+  m_trk_pv0_matchedFraction_pt_fix                          (nullptr),
+  m_trk_pv0_matchedFraction_pt_notfix                       (nullptr),
+  m_trk_pv0_matchedFraction_pt_var                          (nullptr),
+  m_trk_pv0_matchedFraction_pt_notvar                       (nullptr),
+  m_trk_pv0_matchedFraction_pt_onlyvar                      (nullptr),
+  m_trk_pv0_matchedFraction_pt_onlyfix                      (nullptr),
+  m_trk_pv0_matchedFraction_pt_none                         (nullptr),
+  m_trk_pv0_caloEntryUncTot_eta_0SiHits                     (nullptr), 
+  m_trk_pv0_caloEntryUncTot_pt_0SiHits                      (nullptr),
+  m_trk_pv0_caloEntryUncTot_rFirstHit_0SiHits               (nullptr),
+  m_trk_pv0_caloEntryUncTot_nSiHits                         (nullptr),
+  m_trk_pv0_caloEntryUncTot_rFirstHit                       (nullptr),
+  m_tcc_pt                                                  (nullptr),
+  m_tcc_pt_etacut                                           (nullptr),
+  m_tcc_phi                                                 (nullptr),
+  m_tcc_eta                                                 (nullptr),
+  m_tcc_eta_ptcut                                           (nullptr),
+  m_tcc_m                                                   (nullptr),
+  m_tcc_taste                                               (nullptr),
+  m_tcc_taste_pt                                            (nullptr),
+  m_tcc_taste_pt_etacut                                     (nullptr),
+  m_tcc_taste_eta                                           (nullptr),
+  m_tcc_taste_eta_ptcut                                     (nullptr),
+  m_tcc_pt_truth_pt                                         (nullptr),
+  m_tcc_pt_response                                         (nullptr),
+  m_tcc_pt_track_pt                                         (nullptr),
+  m_tcc_pt_pseudoresponse                                   (nullptr),
+  m_tcc_N_M                                                 (nullptr),
+  m_tcc_N_M_pv0                                             (nullptr),
+  m_trk_tcc_reco_pt_truth_pt                                (nullptr),
+  m_trk_tcc_reco_pt_response                                (nullptr) {
+}
+
+void TCCPlots::setEventWeight(const float& weight) {
+  m_eventWeight = weight;
+}
+
+void TCCPlots::setJetPtBinning(const std::vector<float>& bins) {
+  m_jetPtBins = bins;
+}
+
+void TCCPlots::setJetMassOverPtBinning(const std::vector<float>& bins) {
+  m_jetMassOverPtBins = bins;
+}
+
+void TCCPlots::setTrackPtBinning(const std::vector<float>& bins) {
+  m_trackPtBins = bins;
+}
+
+void TCCPlots::setTrackProdRadiusBinning(const std::vector<float>& bins) {
+  m_trackProdRadiusBins = bins;
+}
+
+void TCCPlots::initializePlots() {
+  
+  if (m_collectionType!="")
+    std::cout << "INFO: TCCPlots configured for " << m_collectionType << " type collection" << std::endl;    
+  
+  if (m_collectionType == "jets") {
+    book(m_jet_n                                     , "jet_n"                                    );
+    book(m_jet_pt                                    , "jet_pt"                                   );
+    book(m_jet_eta                                   , "jet_eta"                                  );
+    book(m_jet_phi                                   , "jet_phi"                                  );
+    book(m_jet_m                                     , "jet_m"                                    );
+    book(m_jet_m_2leadings                           , "jet_m_2leadings"                          );
+    book(m_jet_pt_2leadings                          , "jet_pt_2leadings"                         );
+    book(m_jet_eta_2leadings                         , "jet_eta_2leadings"                        );
+    book(m_jet_phi_2leadings                         , "jet_phi_2leadings"                        );
+    book(m_jet_m_leading                             , "jet_m_leading"                            );
+    book(m_jet_pt_leading                            , "jet_pt_leading"                           );
+    book(m_jet_eta_leading                           , "jet_eta_leading"                          );
+    book(m_jet_phi_leading                           , "jet_phi_leading"                          );
+    book(m_jet_m_subleading                          , "jet_m_subleading"                         );
+    book(m_jet_pt_subleading                         , "jet_pt_subleading"                        );
+    book(m_jet_eta_subleading                        , "jet_eta_subleading"                       );
+    book(m_jet_phi_subleading                        , "jet_phi_subleading"                       );
+    book(m_jet_deltaR                                , "jet_deltaR"                               );
+    book(m_jet_deltaR_matched                        , "jet_deltaR_matched"                       );
+    book(m_jet_response_m                            , "jet_response_m"                           );
+    book(m_jet_response_m_pt                         , "jet_response_m_pt"                        );
+    book(m_jet_response_pt                           , "jet_response_pt"                          );
+    book(m_jet_response_m_2leadings                  , "jet_response_m_2leadings"                 );
+    book(m_jet_response_m_pt_2leadings               , "jet_response_m_pt_2leadings"              );
+    book(m_jet_response_pt_2leadings                 , "jet_response_pt_2leadings"                );
+    book(m_jet_response_m_leading                    , "jet_response_m_leading"                   );
+    book(m_jet_response_m_pt_leading                 , "jet_response_m_pt_leading"                );
+    book(m_jet_response_pt_leading                   , "jet_response_pt_leading"                  );
+    book(m_jet_response_m_subleading                 , "jet_response_m_subleading"                );
+    book(m_jet_response_m_pt_subleading              , "jet_response_m_pt_subleading"             );
+    book(m_jet_response_pt_subleading                , "jet_response_pt_subleading"               );
+    book(m_jet_response_eta                          , "jet_response_eta"                         );
+    book(m_jet_response_phi                          , "jet_response_phi"                         );
+    book(m_jet_response_eta_2leadings                , "jet_response_eta_2leadings"               );
+    book(m_jet_response_phi_2leadings                , "jet_response_phi_2leadings"               );
+    book(m_jet_response_eta_leading                  , "jet_response_eta_leading"                 );
+    book(m_jet_response_phi_leading                  , "jet_response_phi_leading"                 );
+    book(m_jet_response_eta_subleading               , "jet_response_eta_subleading"              );
+    book(m_jet_response_phi_subleading               , "jet_response_phi_subleading"              );
+    book(m_jet_response_add_eta                      , "jet_response_add_eta"                     );
+    book(m_jet_response_add_eta_2leadings            , "jet_response_add_eta_2leadings"           );
+    book(m_jet_response_add_eta_leading              , "jet_response_add_eta_leading"             );
+    book(m_jet_response_add_eta_subleading           , "jet_response_add_eta_subleading"          );
+    book(m_jet_response_add_eta_pt                   , "jet_response_add_eta_pt"                  );
+    book(m_jet_response_add_eta_pt_2leadings         , "jet_response_add_eta_pt_2leadings"        );
+    book(m_jet_response_add_eta_pt_leading           , "jet_response_add_eta_pt_leading"          );
+    book(m_jet_response_add_eta_pt_subleading        , "jet_response_add_eta_pt_subleading"       );
+    book(m_jet_response_m_npv                        , "jet_response_m_npv"                       );
+    book(m_jet_response_m_npv_2leadings              , "jet_response_m_npv_2leadings"             );
+    book(m_jet_response_m_npv_leading                , "jet_response_m_npv_leading"               );
+    book(m_jet_response_m_npv_subleading             , "jet_response_m_npv_subleading"            );
+    book(m_jet_response_d2_pt                        , "jet_response_d2_pt"                       );
+    book(m_jet_response_d2_pt_2leadings              , "jet_response_d2_pt_2leadings"             );
+    book(m_jet_response_d2_pt_leading                , "jet_response_d2_pt_leading"               );
+    book(m_jet_response_d2_pt_subleading             , "jet_response_d2_pt_subleading"            );
+    book(m_jet_response_add_d2_pt                    , "jet_response_add_d2_pt"                   );
+    book(m_jet_response_add_d2_pt_2leadings          , "jet_response_add_d2_pt_2leadings"         );
+    book(m_jet_response_add_d2_pt_leading            , "jet_response_add_d2_pt_leading"           );
+    book(m_jet_response_add_d2_pt_subleading         , "jet_response_add_d2_pt_subleading"        );
+    book(m_jet_pseudoresponse_m                      , "jet_pseudoresponse_m"                     );
+    book(m_jet_pseudoresponse_pt                     , "jet_pseudoresponse_pt"                    );
+    book(m_jet_pseudoresponse_m_2leadings            , "jet_pseudoresponse_m_2leadings"           );
+    book(m_jet_pseudoresponse_pt_2leadings           , "jet_pseudoresponse_pt_2leadings"          );
+    book(m_jet_pseudoresponse_m_leading              , "jet_pseudoresponse_m_leading"             );
+    book(m_jet_pseudoresponse_pt_leading             , "jet_pseudoresponse_pt_leading"            );
+    book(m_jet_pseudoresponse_m_subleading           , "jet_pseudoresponse_m_subleading"          );
+    book(m_jet_pseudoresponse_pt_subleading          , "jet_pseudoresponse_pt_subleading"         );
+    book(m_jet_pseudoresponse_notcalib_pt            , "jet_pseudoresponse_notcalib_pt"           );
+    book(m_jet_pseudoresponse_notcalib_pt_2leadings  , "jet_pseudoresponse_notcalib_pt_2leadings" );
+    book(m_jet_pseudoresponse_notcalib_pt_leading    , "jet_pseudoresponse_notcalib_pt_leading"   );
+    book(m_jet_pseudoresponse_notcalib_pt_subleading , "jet_pseudoresponse_notcalib_pt_subleading");
+    book(m_jet_d2                                    , "jet_d2"                                   );
+    book(m_jet_d2_2leadings                          , "jet_d2_2leadings"                         );
+    book(m_jet_d2_leading                            , "jet_d2_leading"                           );
+    book(m_jet_d2_subleading                         , "jet_d2_subleading"                        );
+    book(m_jet_d2_massCut                            , "jet_d2_massCut"                           );
+    book(m_jet_d2_2leadings_massCut                  , "jet_d2_2leadings_massCut"                 );
+    book(m_jet_d2_leading_massCut                    , "jet_d2_leading_massCut"                   );
+    book(m_jet_d2_subleading_massCut                 , "jet_d2_subleading_massCut"                );
+    book(m_jet_response_d2                           , "jet_response_d2"                          );
+    book(m_jet_response_d2_2leadings                 , "jet_response_d2_2leadings"                );
+    book(m_jet_response_d2_leading                   , "jet_response_d2_leading"                  );
+    book(m_jet_response_d2_subleading                , "jet_response_d2_subleading"               ); 
+    book(m_jet_response_add_d2                       , "jet_response_add_d2"                      );
+    book(m_jet_response_add_d2_2leadings             , "jet_response_add_d2_2leadings"            );
+    book(m_jet_response_add_d2_leading               , "jet_response_add_d2_leading"              );
+    book(m_jet_response_add_d2_subleading            , "jet_response_add_d2_subleading"           ); 
+    book(m_jet_resolution_m                          , "jet_resolution_m"                         );
+    book(m_jet_resolution_m_2leadings                , "jet_resolution_m_2leadings"               );
+    book(m_jet_resolution_m_leading                  , "jet_resolution_m_leading"                 );
+    book(m_jet_resolution_m_subleading               , "jet_resolution_m_subleading"              );
+    book(m_jet_resolution_m_npv                      , "jet_resolution_m_npv"                     );
+    book(m_jet_resolution_m_npv_2leadings            , "jet_resolution_m_npv_2leadings"           );
+    book(m_jet_resolution_m_npv_leading              , "jet_resolution_m_npv_leading"             );
+    book(m_jet_resolution_m_npv_subleading           , "jet_resolution_m_npv_subleading"          );
+    book(m_jet_resolution_d2                         , "jet_resolution_d2"                        );
+    book(m_jet_resolution_d2_2leadings               , "jet_resolution_d2_2leadings"              );
+    book(m_jet_resolution_d2_leading                 , "jet_resolution_d2_leading"                );
+    book(m_jet_resolution_d2_subleading              , "jet_resolution_d2_subleading"             );
+    book(m_jet_resolution_add_d2                     , "jet_resolution_add_d2"                    );
+    book(m_jet_resolution_add_d2_2leadings           , "jet_resolution_add_d2_2leadings"          );
+    book(m_jet_resolution_add_d2_leading             , "jet_resolution_add_d2_leading"            );
+    book(m_jet_resolution_add_d2_subleading          , "jet_resolution_add_d2_subleading"         );
+    book(m_jet_median_width_m_npv                    , "jet_median_width_m_npv"                   );
+    book(m_jet_median_width_m_npv_2leadings          , "jet_median_width_m_npv_2leadings"         );
+    book(m_jet_median_width_m_npv_leading            , "jet_median_width_m_npv_leading"           );
+    book(m_jet_median_width_m_npv_subleading         , "jet_median_width_m_npv_subleading"        );
+    book(m_jet_mopt_pt_response_m                    , "jet_mopt_pt_response_m"                   );
+    book(m_jet_mopt_pt_response_m_2leadings          , "jet_mopt_pt_response_m_2leadings"         );
+    book(m_jet_mopt_pt_response_m_leading            , "jet_mopt_pt_response_m_leading"           );
+    book(m_jet_mopt_pt_response_m_subleading         , "jet_mopt_pt_response_m_subleading"        );
+    book(m_jet_mopt_pt_response_pt                   , "jet_mopt_pt_response_pt"                  );
+    book(m_jet_mopt_pt_response_pt_2leadings         , "jet_mopt_pt_response_pt_2leadings"        );
+    book(m_jet_mopt_pt_response_pt_leading           , "jet_mopt_pt_response_pt_leading"          );
+    book(m_jet_mopt_pt_response_pt_subleading        , "jet_mopt_pt_response_pt_subleading"       );
+    book(m_jet_mopt_pt_response_phi                  , "jet_mopt_pt_response_phi"                 );
+    book(m_jet_mopt_pt_response_phi_2leadings        , "jet_mopt_pt_response_phi_2leadings"       );
+    book(m_jet_mopt_pt_response_phi_leading          , "jet_mopt_pt_response_phi_leading"         );
+    book(m_jet_mopt_pt_response_phi_subleading       , "jet_mopt_pt_response_phi_subleading"      );
+    book(m_jet_mopt_pt_response_eta                  , "jet_mopt_pt_response_eta"                 );
+    book(m_jet_mopt_pt_response_eta_2leadings        , "jet_mopt_pt_response_eta_2leadings"       );
+    book(m_jet_mopt_pt_response_eta_leading          , "jet_mopt_pt_response_eta_leading"         );
+    book(m_jet_mopt_pt_response_eta_subleading       , "jet_mopt_pt_response_eta_subleading"      );
+    book(m_jet_mopt_pt_response_d2                   , "jet_mopt_pt_response_d2"                  );
+    book(m_jet_mopt_pt_response_d2_2leadings         , "jet_mopt_pt_response_d2_2leadings"        );
+    book(m_jet_mopt_pt_response_d2_leading           , "jet_mopt_pt_response_d2_leading"          );
+    book(m_jet_mopt_pt_response_d2_subleading        , "jet_mopt_pt_response_d2_subleading"       ); 
+    book(m_jet_resolution_mopt_pt_m                  , "jet_resolution_mopt_pt_m"                 );
+    book(m_jet_resolution_mopt_pt_m_2leadings        , "jet_resolution_mopt_pt_m_2leadings"       );
+    book(m_jet_resolution_mopt_pt_m_leading          , "jet_resolution_mopt_pt_m_leading"         );
+    book(m_jet_resolution_mopt_pt_m_subleading       , "jet_resolution_mopt_pt_m_subleading"      );
+    book(m_jet_resolution_mopt_pt_pt                 , "jet_resolution_mopt_pt_pt"                );
+    book(m_jet_resolution_mopt_pt_pt_2leadings       , "jet_resolution_mopt_pt_pt_2leadings"      );
+    book(m_jet_resolution_mopt_pt_pt_leading         , "jet_resolution_mopt_pt_pt_leading"        );
+    book(m_jet_resolution_mopt_pt_pt_subleading      , "jet_resolution_mopt_pt_pt_subleading"     );
+    book(m_jet_resolution_mopt_pt_phi                , "jet_resolution_mopt_pt_phi"               );
+    book(m_jet_resolution_mopt_pt_phi_2leadings      , "jet_resolution_mopt_pt_phi_2leadings"     );
+    book(m_jet_resolution_mopt_pt_phi_leading        , "jet_resolution_mopt_pt_phi_leading"       );
+    book(m_jet_resolution_mopt_pt_phi_subleading     , "jet_resolution_mopt_pt_phi_subleading"    );
+    book(m_jet_resolution_mopt_pt_eta                , "jet_resolution_mopt_pt_eta"               );
+    book(m_jet_resolution_mopt_pt_eta_2leadings      , "jet_resolution_mopt_pt_eta_2leadings"     );
+    book(m_jet_resolution_mopt_pt_eta_leading        , "jet_resolution_mopt_pt_eta_leading"       );
+    book(m_jet_resolution_mopt_pt_eta_subleading     , "jet_resolution_mopt_pt_eta_subleading"    );
+    book(m_jet_resolution_mopt_pt_d2                 , "jet_resolution_mopt_pt_d2"                );
+    book(m_jet_resolution_mopt_pt_d2_2leadings       , "jet_resolution_mopt_pt_d2_2leadings"      );
+    book(m_jet_resolution_mopt_pt_d2_leading         , "jet_resolution_mopt_pt_d2_leading"        );
+    book(m_jet_resolution_mopt_pt_d2_subleading      , "jet_resolution_mopt_pt_d2_subleading"     );     
+ 
+  } else if (m_collectionType == "tracks") {
+   // book histograms for tracks 
+    book(m_trk_d0                           , "trk_d0"                           );
+    book(m_trk_z0                           , "trk_z0"                           );
+    book(m_trk_theta                        , "trk_theta"                        );
+    book(m_trk_phi                          , "trk_phi"                          );
+    book(m_trk_qOverP                       , "trk_qOverP"                       );
+    book(m_trk_d0_eta                       , "trk_d0_eta"                       );
+    book(m_trk_z0_eta                       , "trk_z0_eta"                       );
+    book(m_trk_theta_eta                    , "trk_theta_eta"                    );
+    book(m_trk_phi_eta                      , "trk_phi_eta"                      );
+    book(m_trk_qOverP_eta                   , "trk_qOverP_eta"                   );
+    book(m_trk_d0_pt                        , "trk_d0_pt"                        );
+    book(m_trk_z0_pt                        , "trk_z0_pt"                        );
+    book(m_trk_theta_pt                     , "trk_theta_pt"                     );
+    book(m_trk_phi_pt                       , "trk_phi_pt"                       );
+    book(m_trk_qOverP_pt                    , "trk_qOverP_pt"                    );
+    book(m_trk_caloEntryEta                 , "trk_caloEntryEta"                 );
+    book(m_trk_caloEntryEtaOverEta_eta      , "trk_caloEntryEtaOverEta_eta"      );
+    book(m_trk_caloEntryEtaOverEta_pt       , "trk_caloEntryEtaOverEta_pt"       );
+    book(m_trk_caloEntryUncEta_caloEntryEta , "trk_caloEntryUncEta_caloEntryEta" );
+    book(m_trk_caloEntryUncEta_eta          , "trk_caloEntryUncEta_eta"          );
+    book(m_trk_caloEntryUncEta_pt           , "trk_caloEntryUncEta_pt"           );
+    book(m_trk_caloEntryUncTheta_eta        , "trk_caloEntryUncTheta_eta"        );
+    book(m_trk_caloEntryUncTheta_pt         , "trk_caloEntryUncTheta_pt"         );
+    book(m_trk_caloEntryPhi                 , "trk_caloEntryPhi"                 );
+    book(m_trk_caloEntryPhiOverPhi_eta      , "trk_caloEntryPhiOverPhi_eta"      );
+    book(m_trk_caloEntryPhiOverPhi_pt       , "trk_caloEntryPhiOverPhi_pt"       );
+    book(m_trk_caloEntryUncPhi_caloEntryPhi , "trk_caloEntryUncPhi_caloEntryPhi" );
+    book(m_trk_caloEntryUncPhi_eta          , "trk_caloEntryUncPhi_eta"          );
+    book(m_trk_caloEntryUncPhi_pt           , "trk_caloEntryUncPhi_pt"           );
+    book(m_trk_caloEntryUncTot_eta          , "trk_caloEntryUncTot_eta"          );
+    book(m_trk_caloEntryUncTot_pt           , "trk_caloEntryUncTot_pt"           );
+    book(m_trk_perigeeEta                   , "trk_perigeeEta"                   );
+    book(m_trk_perigeeUncEta_eta            , "trk_perigeeUncEta_eta"            );
+    book(m_trk_perigeeUncEta_pt             , "trk_perigeeUncEta_pt"             );
+    book(m_trk_perigeeUncTheta_eta          , "trk_perigeeUncTheta_eta"          );
+    book(m_trk_perigeeUncTheta_pt           , "trk_perigeeUncTheta_pt"           );
+    book(m_trk_perigeePhi                   , "trk_perigeePhi"                   );
+    book(m_trk_perigeeUncPhi_eta            , "trk_perigeeUncPhi_eta"            );
+    book(m_trk_perigeeUncPhi_pt             , "trk_perigeeUncPhi_pt"             );
+    book(m_trk_perigeeUncTot_eta            , "trk_perigeeUncTot_eta"            );
+    book(m_trk_perigeeUncTot_pt             , "trk_perigeeUncTot_pt"             );
+    book(m_trk_perigeeUncEta_caloUncEta     , "trk_perigeeUncEta_caloUncEta"     );
+    book(m_trk_perigeeUncTheta_caloUncTheta , "trk_perigeeUncTheta_caloUncTheta" );
+    book(m_trk_perigeeUncPhi_caloUncPhi     , "trk_perigeeUncPhi_caloUncPhi"     );
+    book(m_trk_perigeeUncTot_caloUncTot     , "trk_perigeeUncTot_caloUncTot"     );
+    book(m_trk_prodRadius                   , "trk_prodRadius"                   );
+    book(m_trk_perigeeUncEta_prodRadius     , "trk_perigeeUncEta_prodRadius"     ); 
+    book(m_trk_perigeeUncTheta_prodRadius   , "trk_perigeeUncTheta_prodRadius"   ); 
+    book(m_trk_perigeeUncPhi_prodRadius     , "trk_perigeeUncPhi_prodRadius"     );
+    book(m_trk_perigeeUncTot_prodRadius     , "trk_perigeeUncTot_prodRadius"     );
+    book(m_trk_caloEntryUncEta_prodRadius   , "trk_caloEntryUncEta_prodRadius"   );
+    book(m_trk_caloEntryUncTheta_prodRadius , "trk_caloEntryUncTheta_prodRadius" );
+    book(m_trk_caloEntryUncPhi_prodRadius   , "trk_caloEntryUncPhi_prodRadius"   );
+    book(m_trk_caloEntryUncTot_prodRadius   , "trk_caloEntryUncTot_prodRadius"   );
+    book(m_trk_delta_perigeeEta_caloEntryEta, "trk_delta_perigeeEta_caloEntryEta");
+    book(m_trk_delta_perigeePhi_caloEntryPhi, "trk_delta_perigeePhi_caloEntryPhi");
+    book(m_trk_delta_perigeeEta_caloEntryEta_eta    , "trk_delta_perigeeEta_caloEntryEta_eta"   );   
+    book(m_trk_delta_perigeePhi_caloEntryPhi_eta    , "trk_delta_perigeePhi_caloEntryPhi_eta"   );   
+    book(m_trk_delta_perigeeEta_caloEntryEta_pt     , "trk_delta_perigeeEta_caloEntryEta_pt"    );    
+    book(m_trk_delta_perigeePhi_caloEntryPhi_pt     , "trk_delta_perigeePhi_caloEntryPhi_pt"    ); 
+    book(m_trk_delta_trackEta_caloEntryEta          , "trk_delta_trackEta_caloEntryEta"         );
+    book(m_trk_delta_trackPhi_caloEntryPhi          , "trk_delta_trackPhi_caloEntryPhi"         );
+    book(m_trk_delta_trackEta_caloEntryEta_eta      , "trk_delta_trackEta_caloEntryEta_eta"     );
+    book(m_trk_delta_trackPhi_caloEntryPhi_eta      , "trk_delta_trackPhi_caloEntryPhi_eta"     );
+    book(m_trk_delta_trackEta_caloEntryEta_pt       , "trk_delta_trackEta_caloEntryEta_pt"      );
+    book(m_trk_delta_trackPhi_caloEntryPhi_pt       , "trk_delta_trackPhi_caloEntryPhi_pt"      );
+    book(m_trk_delta_trackEta_caloEntryEtaCorr      , "trk_delta_trackEta_caloEntryEtaCorr"     );
+    book(m_trk_delta_trackPhi_caloEntryPhiCorr      , "trk_delta_trackPhi_caloEntryPhiCorr"     );
+    book(m_trk_delta_trackEta_caloEntryEtaCorr_eta  , "trk_delta_trackEta_caloEntryEtaCorr_eta" );
+    book(m_trk_delta_trackPhi_caloEntryPhiCorr_eta  , "trk_delta_trackPhi_caloEntryPhiCorr_eta" );
+    book(m_trk_delta_trackEta_caloEntryEtaCorr_pt   , "trk_delta_trackEta_caloEntryEtaCorr_pt"  );
+    book(m_trk_delta_trackPhi_caloEntryPhiCorr_pt   , "trk_delta_trackPhi_caloEntryPhiCorr_pt"  );
+    book(m_trk_delta_caloEntryEta_caloEntryEtaCorr      , "trk_delta_caloEntryEta_caloEntryEtaCorr"     );
+    book(m_trk_delta_caloEntryPhi_caloEntryPhiCorr      , "trk_delta_caloEntryPhi_caloEntryPhiCorr"     );
+    book(m_trk_delta_caloEntryEta_caloEntryEtaCorr_eta  , "trk_delta_caloEntryEta_caloEntryEtaCorr_eta" );
+    book(m_trk_delta_caloEntryPhi_caloEntryPhiCorr_eta  , "trk_delta_caloEntryPhi_caloEntryPhiCorr_eta" );
+    book(m_trk_delta_caloEntryEta_caloEntryEtaCorr_pt   , "trk_delta_caloEntryEta_caloEntryEtaCorr_pt"  );
+    book(m_trk_delta_caloEntryPhi_caloEntryPhiCorr_pt   , "trk_delta_caloEntryPhi_caloEntryPhiCorr_pt"  );
+        
+    book(m_trk_total_eta                                          , "trk_total_eta"                                         );
+    book(m_trk_total_pt                                           , "trk_total_pt"                                          );
+    book(m_trk_total_clusters_eta                                 , "trk_total_clusters_eta"                                );
+    book(m_trk_total_clusters_pt                                  , "trk_total_clusters_pt"                                 );
+    book(m_trk_notMatching_deltar_fix_eta                         , "trk_notMatching_deltar_fix_eta"                        );
+    book(m_trk_notMatching_deltar_fix_phi                         , "trk_notMatching_deltar_fix_phi"                        );
+    book(m_trk_notMatching_deltar_fix_pt                          , "trk_notMatching_deltar_fix_pt"                         );
+    book(m_trk_notMatching_deltar_fix_caloEntryUncTot_eta         , "trk_notMatching_deltar_fix_caloEntryUncTot_eta"        );
+    book(m_trk_notMatching_deltar_fix_caloEntryUncTot_pt          , "trk_notMatching_deltar_fix_caloEntryUncTot_pt"         );
+    book(m_trk_notMatching_deltar_fix_caloEntryUncTot_prodRadius  , "trk_notMatching_deltar_fix_caloEntryUncTot_prodRadius" );
+    book(m_trk_notMatching_deltar_var_eta                         , "trk_notMatching_deltar_var_eta"                        );
+    book(m_trk_notMatching_deltar_var_phi                         , "trk_notMatching_deltar_var_phi"                        );
+    book(m_trk_notMatching_deltar_var_pt                          , "trk_notMatching_deltar_var_pt"                         );
+    book(m_trk_notMatching_deltar_var_caloEntryUncTot_eta         , "trk_notMatching_deltar_var_caloEntryUncTot_eta"        );
+    book(m_trk_notMatching_deltar_var_caloEntryUncTot_pt          , "trk_notMatching_deltar_var_caloEntryUncTot_pt"         );
+    book(m_trk_notMatching_deltar_var_caloEntryUncTot_prodRadius  , "trk_notMatching_deltar_var_caloEntryUncTot_prodRadius" );
+    book(m_trk_notMatching_deltar_none_eta                        , "trk_notMatching_deltar_none_eta"                       );
+    book(m_trk_notMatching_deltar_none_phi                        , "trk_notMatching_deltar_none_phi"                       );
+    book(m_trk_notMatching_deltar_none_pt                         , "trk_notMatching_deltar_none_pt"                        );
+    book(m_trk_notMatching_deltar_none_caloEntryUncTot_eta        , "trk_notMatching_deltar_none_caloEntryUncTot_eta"       );
+    book(m_trk_notMatching_deltar_none_caloEntryUncTot_pt         , "trk_notMatching_deltar_none_caloEntryUncTot_pt"        );
+    book(m_trk_notMatching_deltar_none_caloEntryUncTot_prodRadius , "trk_notMatching_deltar_none_caloEntryUncTot_prodRadius");
+    book(m_trk_matching_deltar_fix_eta                            , "trk_matching_deltar_fix_eta"                           );
+    book(m_trk_matching_deltar_fix_pt                             , "trk_matching_deltar_fix_pt"                            );
+    book(m_trk_matching_deltar_var_eta                            , "trk_matching_deltar_var_eta"                           );
+    book(m_trk_matching_deltar_var_pt                             , "trk_matching_deltar_var_pt"                            );
+    book(m_trk_matching_deltar_onlyfix_eta                        , "trk_matching_deltar_onlyfix_eta"                       );
+    book(m_trk_matching_deltar_onlyfix_pt                         , "trk_matching_deltar_onlyfix_pt"                        );
+    book(m_trk_matching_deltar_onlyvar_eta                        , "trk_matching_deltar_onlyvar_eta"                       );
+    book(m_trk_matching_deltar_onlyvar_pt                         , "trk_matching_deltar_onlyvar_pt"                        );
+    book(m_trk_matching_deltar_fix_or_var_eta                     , "trk_matching_deltar_fix_or_var_eta"                    );
+    book(m_trk_matching_deltar_fix_or_var_pt                      , "trk_matching_deltar_fix_or_var_pt"                     );
+    book(m_trk_matching_deltar_fix_and_var_eta                    , "trk_matching_deltar_fix_and_var_eta"                   );
+    book(m_trk_matching_deltar_fix_and_var_pt                     , "trk_matching_deltar_fix_and_var_pt"                    );
+    book(m_trk_matching_deltar_or_clusters_eta                    , "trk_matching_deltar_or_clusters_eta"                   );
+    book(m_trk_matching_deltar_or_clusters_phi                    , "trk_matching_deltar_or_clusters_phi"                   );
+    book(m_trk_matching_deltar_or_clusters_pt                     , "trk_matching_deltar_or_clusters_pt"                    );
+    book(m_trk_matching_deltar_and_clusters_eta                   , "trk_matching_deltar_and_clusters_eta"                  );
+    book(m_trk_matching_deltar_and_clusters_phi                   , "trk_matching_deltar_and_clusters_phi"                  );
+    book(m_trk_matching_deltar_and_clusters_pt                    , "trk_matching_deltar_and_clusters_pt"                   );
+    book(m_trk_matching_deltar_fix_only_clusters_eta              , "trk_matching_deltar_fix_only_clusters_eta"             );
+    book(m_trk_matching_deltar_fix_only_clusters_phi              , "trk_matching_deltar_fix_only_clusters_phi"             );
+    book(m_trk_matching_deltar_fix_only_clusters_pt               , "trk_matching_deltar_fix_only_clusters_pt"              );
+    book(m_trk_matching_deltar_var_only_clusters_eta              , "trk_matching_deltar_var_only_clusters_eta"             );
+    book(m_trk_matching_deltar_var_only_clusters_phi              , "trk_matching_deltar_var_only_clusters_phi"             );
+    book(m_trk_matching_deltar_var_only_clusters_pt               , "trk_matching_deltar_var_only_clusters_pt"              );
+    book(m_trk_matchedFraction_eta_fix_and_var                    , "trk_matchedFraction_eta_fix_and_var"                   );
+    book(m_trk_matchedFraction_eta_fix_or_var                     , "trk_matchedFraction_eta_fix_or_var"                    );
+    book(m_trk_matchedFraction_eta_fix                            , "trk_matchedFraction_eta_fix"                           );
+    book(m_trk_matchedFraction_eta_notfix                         , "trk_matchedFraction_eta_notfix"                        );
+    book(m_trk_matchedFraction_eta_var                            , "trk_matchedFraction_eta_var"                           );
+    book(m_trk_matchedFraction_eta_notvar                         , "trk_matchedFraction_eta_notvar"                        );
+    book(m_trk_matchedFraction_eta_onlyvar                        , "trk_matchedFraction_eta_onlyvar"                       );
+    book(m_trk_matchedFraction_eta_onlyfix                        , "trk_matchedFraction_eta_onlyfix"                       );
+    book(m_trk_matchedFraction_eta_none                           , "trk_matchedFraction_eta_none"                          );
+    book(m_trk_matchedFraction_pt_fix_and_var                     , "trk_matchedFraction_pt_fix_and_var"                    );
+    book(m_trk_matchedFraction_pt_fix_or_var                      , "trk_matchedFraction_pt_fix_or_var"                     );
+    book(m_trk_matchedFraction_pt_fix                             , "trk_matchedFraction_pt_fix"                            );
+    book(m_trk_matchedFraction_pt_notfix                          , "trk_matchedFraction_pt_notfix"                         );
+    book(m_trk_matchedFraction_pt_var                             , "trk_matchedFraction_pt_var"                            );
+    book(m_trk_matchedFraction_pt_notvar                          , "trk_matchedFraction_pt_notvar"                         );
+    book(m_trk_matchedFraction_pt_onlyvar                         , "trk_matchedFraction_pt_onlyvar"                        );
+    book(m_trk_matchedFraction_pt_onlyfix                         , "trk_matchedFraction_pt_onlyfix"                        );
+    book(m_trk_matchedFraction_pt_none                            , "trk_matchedFraction_pt_none"                           );
+        
+    book(m_trk_pv0_total_eta                                      , "trk_pv0_total_eta"                           );
+    book(m_trk_pv0_total_pt                                       , "trk_pv0_total_pt"                            );
+    book(m_trk_pv0_caloEntryUncTot_eta                            , "trk_pv0_caloEntryUncTot_eta"                 );
+    book(m_trk_pv0_caloEntryUncTot_pt                             , "trk_pv0_caloEntryUncTot_pt"                  );
+    book(m_trk_pv0_caloEntryUncTot_truthpt                        , "trk_pv0_caloEntryUncTot_truthpt"             );
+    book(m_trk_pv0_total_clusters_eta                             , "trk_pv0_total_clusters_eta"                  );
+    book(m_trk_pv0_total_clusters_pt                              , "trk_pv0_total_clusters_pt"                   );
+    book(m_trk_pv0_matching_deltar_fix_eta                        , "trk_pv0_matching_deltar_fix_eta"             );
+    book(m_trk_pv0_matching_deltar_fix_pt                         , "trk_pv0_matching_deltar_fix_pt"              );
+    book(m_trk_pv0_matching_deltar_var_eta                        , "trk_pv0_matching_deltar_var_eta"             );
+    book(m_trk_pv0_matching_deltar_var_pt                         , "trk_pv0_matching_deltar_var_pt"              );
+    book(m_trk_pv0_notMatching_deltar_fix_eta                     , "trk_pv0_notMatching_deltar_fix_eta"          );
+    book(m_trk_pv0_notMatching_deltar_fix_pt                      , "trk_pv0_notMatching_deltar_fix_pt"           );
+    book(m_trk_pv0_notMatching_deltar_var_eta                     , "trk_pv0_notMatching_deltar_var_eta"          );
+    book(m_trk_pv0_notMatching_deltar_var_pt                      , "trk_pv0_notMatching_deltar_var_pt"           );
+    book(m_trk_pv0_notMatching_deltar_none_eta                    , "trk_pv0_notMatching_deltar_none_eta"         );
+    book(m_trk_pv0_notMatching_deltar_none_pt                     , "trk_pv0_notMatching_deltar_none_pt"          );
+    book(m_trk_pv0_matching_deltar_fix_and_var_eta                , "trk_pv0_matching_deltar_fix_and_var_eta"     );
+    book(m_trk_pv0_matching_deltar_fix_and_var_pt                 , "trk_pv0_matching_deltar_fix_and_var_pt"      );
+    book(m_trk_pv0_matching_deltar_fix_or_var_eta                 , "trk_pv0_matching_deltar_fix_or_var_eta"      );
+    book(m_trk_pv0_matching_deltar_fix_or_var_pt                  , "trk_pv0_matching_deltar_fix_or_var_pt"       );
+    book(m_trk_pv0_matching_deltar_onlyfix_eta                    , "trk_pv0_matching_deltar_onlyfix_eta"         );
+    book(m_trk_pv0_matching_deltar_onlyfix_pt                     , "trk_pv0_matching_deltar_onlyfix_pt"          );
+    book(m_trk_pv0_matching_deltar_onlyvar_eta                    , "trk_pv0_matching_deltar_onlyvar_eta"         );
+    book(m_trk_pv0_matching_deltar_onlyvar_pt                     , "trk_pv0_matching_deltar_onlyvar_pt"          );
+    book(m_trk_pv0_matchedFraction_eta_fix_and_var                , "trk_pv0_matchedFraction_eta_fix_and_var"     );
+    book(m_trk_pv0_matchedFraction_eta_fix_or_var                 , "trk_pv0_matchedFraction_eta_fix_or_var"      );
+    book(m_trk_pv0_matchedFraction_eta_fix                        , "trk_pv0_matchedFraction_eta_fix"             );
+    book(m_trk_pv0_matchedFraction_eta_notfix                     , "trk_pv0_matchedFraction_eta_notfix"          );
+    book(m_trk_pv0_matchedFraction_eta_var                        , "trk_pv0_matchedFraction_eta_var"             );
+    book(m_trk_pv0_matchedFraction_eta_notvar                     , "trk_pv0_matchedFraction_eta_notvar"          );
+    book(m_trk_pv0_matchedFraction_eta_onlyvar                    , "trk_pv0_matchedFraction_eta_onlyvar"         );
+    book(m_trk_pv0_matchedFraction_eta_onlyfix                    , "trk_pv0_matchedFraction_eta_onlyfix"         );
+    book(m_trk_pv0_matchedFraction_eta_none                       , "trk_pv0_matchedFraction_eta_none"            );
+    book(m_trk_pv0_matchedFraction_pt_fix_and_var                 , "trk_pv0_matchedFraction_pt_fix_and_var"      );
+    book(m_trk_pv0_matchedFraction_pt_fix_or_var                  , "trk_pv0_matchedFraction_pt_fix_or_var"       );
+    book(m_trk_pv0_matchedFraction_pt_fix                         , "trk_pv0_matchedFraction_pt_fix"              );
+    book(m_trk_pv0_matchedFraction_pt_notfix                      , "trk_pv0_matchedFraction_pt_notfix"           );
+    book(m_trk_pv0_matchedFraction_pt_var                         , "trk_pv0_matchedFraction_pt_var"              );
+    book(m_trk_pv0_matchedFraction_pt_notvar                      , "trk_pv0_matchedFraction_pt_notvar"           );
+    book(m_trk_pv0_matchedFraction_pt_onlyvar                     , "trk_pv0_matchedFraction_pt_onlyvar"          );
+    book(m_trk_pv0_matchedFraction_pt_onlyfix                     , "trk_pv0_matchedFraction_pt_onlyfix"          );
+    book(m_trk_pv0_matchedFraction_pt_none                        , "trk_pv0_matchedFraction_pt_none"             );
+    
+    book(m_trk_pv0_caloEntryUncTot_eta_0SiHits                    , "trk_pv0_caloEntryUncTot_eta_0SiHits"         );
+    book(m_trk_pv0_caloEntryUncTot_pt_0SiHits                     , "trk_pv0_caloEntryUncTot_pt_0SiHits"          );
+    book(m_trk_pv0_caloEntryUncTot_rFirstHit_0SiHits              , "trk_pv0_caloEntryUncTot_rFirstHit_0SiHits"   );
+    book(m_trk_pv0_caloEntryUncTot_nSiHits                        , "trk_pv0_caloEntryUncTot_nSiHits"             );
+    book(m_trk_pv0_caloEntryUncTot_rFirstHit                      , "trk_pv0_caloEntryUncTot_rFirstHit"           );        
+        
+  } else if (m_collectionType == "clusters") {
+    
+    book(m_clusters_eta                            , "clusters_eta"                   );
+    book(m_clusters_matched_eta                    , "clusters_matched_eta"           );
+    book(m_clusters_notMatched_eta                 , "clusters_notMatched_eta"        );
+    book(m_clusters_matchedFraction_eta            , "clusters_matchedFraction_eta"   );
+    book(m_clusters_notMatchedFraction_eta         , "clusters_notMatchedFraction_eta");
+    book(m_clusters_matchedFraction_energy         , "clusters_matchedFraction_energy"   );
+    book(m_clusters_notMatchedFraction_energy      , "clusters_notMatchedFraction_energy");
+    book(m_clusters_width                          , "clusters_width"                 );
+    book(m_clusters_width_eta                      , "clusters_width_eta"             );
+    book(m_clusters_energy                         , "clusters_energy"                );
+    book(m_clusters_abs_energy                     , "clusters_abs_energy"            );
+    book(m_clusters_width_energy                   , "clusters_width_energy"          );
+    book(m_clusters_abs_width_energy               , "clusters_abs_width_energy"      );
+    book(m_clusters_matched_energy                 , "clusters_matched_energy"        );
+    book(m_clusters_notMatched_energy              , "clusters_notMatched_energy"     );
+    book(m_clusters_matched_eta_fix_and_var        , "clusters_matched_eta_fix_and_var"          );
+    book(m_clusters_matched_eta_fix_or_var         , "clusters_matched_eta_fix_or_var"           );
+    book(m_clusters_matched_eta_fix                , "clusters_matched_eta_fix"                  );
+    book(m_clusters_matched_eta_notfix             , "clusters_matched_eta_notfix"               );
+    book(m_clusters_matched_eta_var                , "clusters_matched_eta_var"                  );
+    book(m_clusters_matched_eta_notvar             , "clusters_matched_eta_notvar"               );
+    book(m_clusters_matched_eta_onlyvar            , "clusters_matched_eta_onlyvar"              );
+    book(m_clusters_matched_eta_onlyfix            , "clusters_matched_eta_onlyfix"              );
+    book(m_clusters_matched_eta_none               , "clusters_matched_eta_none"                 );
+    book(m_clusters_matchedFraction_eta_fix_and_var, "clusters_matchedFraction_eta_fix_and_var"  );
+    book(m_clusters_matchedFraction_eta_fix_or_var , "clusters_matchedFraction_eta_fix_or_var"   );
+    book(m_clusters_matchedFraction_eta_fix        , "clusters_matchedFraction_eta_fix"          );
+    book(m_clusters_matchedFraction_eta_notfix     , "clusters_matchedFraction_eta_notfix"       );
+    book(m_clusters_matchedFraction_eta_var        , "clusters_matchedFraction_eta_var"          );
+    book(m_clusters_matchedFraction_eta_notvar     , "clusters_matchedFraction_eta_notvar"       );
+    book(m_clusters_matchedFraction_eta_onlyvar    , "clusters_matchedFraction_eta_onlyvar"      );
+    book(m_clusters_matchedFraction_eta_onlyfix    , "clusters_matchedFraction_eta_onlyfix"      );
+    book(m_clusters_matchedFraction_eta_none       , "clusters_matchedFraction_eta_none"         );    
+    
+    book(m_clusters_abs_eta                            , "clusters_abs_eta"                   );
+    book(m_clusters_abs_matched_eta                    , "clusters_abs_matched_eta"           );
+    book(m_clusters_abs_notMatched_eta                 , "clusters_abs_notMatched_eta"        );
+    book(m_clusters_abs_matchedFraction_eta            , "clusters_abs_matchedFraction_eta"   );
+    book(m_clusters_abs_notMatchedFraction_eta         , "clusters_abs_notMatchedFraction_eta");
+    book(m_clusters_abs_matched_energy                 , "clusters_abs_matched_energy"        );
+    book(m_clusters_abs_notMatched_energy              , "clusters_abs_notMatched_energy"     );
+    book(m_clusters_abs_matchedFraction_energy         , "clusters_abs_matchedFraction_energy"   );
+    book(m_clusters_abs_notMatchedFraction_energy      , "clusters_abs_notMatchedFraction_energy");
+    book(m_clusters_abs_width                          , "clusters_abs_width"                 );
+    book(m_clusters_abs_width_eta                      , "clusters_abs_width_eta"             );
+    book(m_clusters_abs_matched_eta_fix_and_var        , "clusters_abs_matched_eta_fix_and_var"          );
+    book(m_clusters_abs_matched_eta_fix_or_var         , "clusters_abs_matched_eta_fix_or_var"           );
+    book(m_clusters_abs_matched_eta_fix                , "clusters_abs_matched_eta_fix"                  );
+    book(m_clusters_abs_matched_eta_notfix             , "clusters_abs_matched_eta_notfix"               );
+    book(m_clusters_abs_matched_eta_var                , "clusters_abs_matched_eta_var"                  );
+    book(m_clusters_abs_matched_eta_notvar             , "clusters_abs_matched_eta_notvar"               );
+    book(m_clusters_abs_matched_eta_onlyvar            , "clusters_abs_matched_eta_onlyvar"              );
+    book(m_clusters_abs_matched_eta_onlyfix            , "clusters_abs_matched_eta_onlyfix"              );
+    book(m_clusters_abs_matched_eta_none               , "clusters_abs_matched_eta_none"                 );
+    book(m_clusters_abs_matchedFraction_eta_fix_and_var, "clusters_abs_matchedFraction_eta_fix_and_var"  );
+    book(m_clusters_abs_matchedFraction_eta_fix_or_var , "clusters_abs_matchedFraction_eta_fix_or_var"   );
+    book(m_clusters_abs_matchedFraction_eta_fix        , "clusters_abs_matchedFraction_eta_fix"          );
+    book(m_clusters_abs_matchedFraction_eta_notfix     , "clusters_abs_matchedFraction_eta_notfix"       );
+    book(m_clusters_abs_matchedFraction_eta_var        , "clusters_abs_matchedFraction_eta_var"          );
+    book(m_clusters_abs_matchedFraction_eta_notvar     , "clusters_abs_matchedFraction_eta_notvar"       );
+    book(m_clusters_abs_matchedFraction_eta_onlyvar    , "clusters_abs_matchedFraction_eta_onlyvar"      );
+    book(m_clusters_abs_matchedFraction_eta_onlyfix    , "clusters_abs_matchedFraction_eta_onlyfix"      );
+    book(m_clusters_abs_matchedFraction_eta_none       , "clusters_abs_matchedFraction_eta_none"         );
+    
+    book(m_clusters_matched_pv0_eta_fix_and_var           , "clusters_matched_pv0_eta_fix_and_var"              );
+    book(m_clusters_matched_pv0_eta_fix_or_var            , "clusters_matched_pv0_eta_fix_or_var"               );
+    book(m_clusters_matched_pv0_eta_fix                   , "clusters_matched_pv0_eta_fix"                      );
+    book(m_clusters_matched_pv0_eta_notfix                , "clusters_matched_pv0_eta_notfix"                   );
+    book(m_clusters_matched_pv0_eta_var                   , "clusters_matched_pv0_eta_var"                      );
+    book(m_clusters_matched_pv0_eta_notvar                , "clusters_matched_pv0_eta_notvar"                   );
+    book(m_clusters_matched_pv0_eta_onlyvar               , "clusters_matched_pv0_eta_onlyvar"                  );
+    book(m_clusters_matched_pv0_eta_onlyfix               , "clusters_matched_pv0_eta_onlyfix"                  );
+    book(m_clusters_matched_pv0_eta_none                  , "clusters_matched_pv0_eta_none"                     );
+    book(m_clusters_abs_matched_pv0_eta_fix_and_var       , "clusters_abs_matched_pv0_eta_fix_and_var"          );
+    book(m_clusters_abs_matched_pv0_eta_fix_or_var        , "clusters_abs_matched_pv0_eta_fix_or_var"           );
+    book(m_clusters_abs_matched_pv0_eta_fix               , "clusters_abs_matched_pv0_eta_fix"                  );
+    book(m_clusters_abs_matched_pv0_eta_notfix            , "clusters_abs_matched_pv0_eta_notfix"               );
+    book(m_clusters_abs_matched_pv0_eta_var               , "clusters_abs_matched_pv0_eta_var"                  );
+    book(m_clusters_abs_matched_pv0_eta_notvar            , "clusters_abs_matched_pv0_eta_notvar"               );
+    book(m_clusters_abs_matched_pv0_eta_onlyvar           , "clusters_abs_matched_pv0_eta_onlyvar"              );
+    book(m_clusters_abs_matched_pv0_eta_onlyfix           , "clusters_abs_matched_pv0_eta_onlyfix"              );
+    book(m_clusters_abs_matched_pv0_eta_none              , "clusters_abs_matched_pv0_eta_none"                 );
+    book(m_clusters_matchedpv0Fraction_eta_fix_and_var    , "clusters_matchedpv0Fraction_eta_fix_and_var"       );
+    book(m_clusters_matchedpv0Fraction_eta_fix_or_var     , "clusters_matchedpv0Fraction_eta_fix_or_var"        );
+    book(m_clusters_matchedpv0Fraction_eta_fix            , "clusters_matchedpv0Fraction_eta_fix"               );
+    book(m_clusters_matchedpv0Fraction_eta_notfix         , "clusters_matchedpv0Fraction_eta_notfix"            );
+    book(m_clusters_matchedpv0Fraction_eta_var            , "clusters_matchedpv0Fraction_eta_var"               );
+    book(m_clusters_matchedpv0Fraction_eta_notvar         , "clusters_matchedpv0Fraction_eta_notvar"            );
+    book(m_clusters_matchedpv0Fraction_eta_onlyvar        , "clusters_matchedpv0Fraction_eta_onlyvar"           );
+    book(m_clusters_matchedpv0Fraction_eta_onlyfix        , "clusters_matchedpv0Fraction_eta_onlyfix"           );
+    book(m_clusters_matchedpv0Fraction_eta_none           , "clusters_matchedpv0Fraction_eta_none"              );
+    book(m_clusters_abs_matchedpv0Fraction_eta_fix_and_var, "clusters_abs_matchedpv0Fraction_eta_fix_and_var"   );
+    book(m_clusters_abs_matchedpv0Fraction_eta_fix_or_var , "clusters_abs_matchedpv0Fraction_eta_fix_or_var"    );
+    book(m_clusters_abs_matchedpv0Fraction_eta_fix        , "clusters_abs_matchedpv0Fraction_eta_fix"           );
+    book(m_clusters_abs_matchedpv0Fraction_eta_notfix     , "clusters_abs_matchedpv0Fraction_eta_notfix"        );
+    book(m_clusters_abs_matchedpv0Fraction_eta_var        , "clusters_abs_matchedpv0Fraction_eta_var"           );
+    book(m_clusters_abs_matchedpv0Fraction_eta_notvar     , "clusters_abs_matchedpv0Fraction_eta_notvar"        );
+    book(m_clusters_abs_matchedpv0Fraction_eta_onlyvar    , "clusters_abs_matchedpv0Fraction_eta_onlyvar"       );
+    book(m_clusters_abs_matchedpv0Fraction_eta_onlyfix    , "clusters_abs_matchedpv0Fraction_eta_onlyfix"       );
+    book(m_clusters_abs_matchedpv0Fraction_eta_none       , "clusters_abs_matchedpv0Fraction_eta_none"          );
+    
+    
+    book(m_clusters_matched_pvx_eta_fix_and_var           , "clusters_matched_pvx_eta_fix_and_var"              );
+    book(m_clusters_matched_pvx_eta_fix_or_var            , "clusters_matched_pvx_eta_fix_or_var"               );
+    book(m_clusters_matched_pvx_eta_fix                   , "clusters_matched_pvx_eta_fix"                      );
+    book(m_clusters_matched_pvx_eta_notfix                , "clusters_matched_pvx_eta_notfix"                   );
+    book(m_clusters_matched_pvx_eta_var                   , "clusters_matched_pvx_eta_var"                      );
+    book(m_clusters_matched_pvx_eta_notvar                , "clusters_matched_pvx_eta_notvar"                   );
+    book(m_clusters_matched_pvx_eta_onlyvar               , "clusters_matched_pvx_eta_onlyvar"                  );
+    book(m_clusters_matched_pvx_eta_onlyfix               , "clusters_matched_pvx_eta_onlyfix"                  );
+    book(m_clusters_matched_pvx_eta_none                  , "clusters_matched_pvx_eta_none"                     );
+    book(m_clusters_abs_matched_pvx_eta_fix_and_var       , "clusters_abs_matched_pvx_eta_fix_and_var"          );
+    book(m_clusters_abs_matched_pvx_eta_fix_or_var        , "clusters_abs_matched_pvx_eta_fix_or_var"           );
+    book(m_clusters_abs_matched_pvx_eta_fix               , "clusters_abs_matched_pvx_eta_fix"                  );
+    book(m_clusters_abs_matched_pvx_eta_notfix            , "clusters_abs_matched_pvx_eta_notfix"               );
+    book(m_clusters_abs_matched_pvx_eta_var               , "clusters_abs_matched_pvx_eta_var"                  );
+    book(m_clusters_abs_matched_pvx_eta_notvar            , "clusters_abs_matched_pvx_eta_notvar"               );
+    book(m_clusters_abs_matched_pvx_eta_onlyvar           , "clusters_abs_matched_pvx_eta_onlyvar"              );
+    book(m_clusters_abs_matched_pvx_eta_onlyfix           , "clusters_abs_matched_pvx_eta_onlyfix"              );
+    book(m_clusters_abs_matched_pvx_eta_none              , "clusters_abs_matched_pvx_eta_none"                 );
+    book(m_clusters_matchedpvxFraction_eta_fix_and_var    , "clusters_matchedpvxFraction_eta_fix_and_var"       );
+    book(m_clusters_matchedpvxFraction_eta_fix_or_var     , "clusters_matchedpvxFraction_eta_fix_or_var"        );
+    book(m_clusters_matchedpvxFraction_eta_fix            , "clusters_matchedpvxFraction_eta_fix"               );
+    book(m_clusters_matchedpvxFraction_eta_notfix         , "clusters_matchedpvxFraction_eta_notfix"            );
+    book(m_clusters_matchedpvxFraction_eta_var            , "clusters_matchedpvxFraction_eta_var"               );
+    book(m_clusters_matchedpvxFraction_eta_notvar         , "clusters_matchedpvxFraction_eta_notvar"            );
+    book(m_clusters_matchedpvxFraction_eta_onlyvar        , "clusters_matchedpvxFraction_eta_onlyvar"           );
+    book(m_clusters_matchedpvxFraction_eta_onlyfix        , "clusters_matchedpvxFraction_eta_onlyfix"           );
+    book(m_clusters_matchedpvxFraction_eta_none           , "clusters_matchedpvxFraction_eta_none"              );
+    book(m_clusters_abs_matchedpvxFraction_eta_fix_and_var, "clusters_abs_matchedpvxFraction_eta_fix_and_var"   );
+    book(m_clusters_abs_matchedpvxFraction_eta_fix_or_var , "clusters_abs_matchedpvxFraction_eta_fix_or_var"    );
+    book(m_clusters_abs_matchedpvxFraction_eta_fix        , "clusters_abs_matchedpvxFraction_eta_fix"           );
+    book(m_clusters_abs_matchedpvxFraction_eta_notfix     , "clusters_abs_matchedpvxFraction_eta_notfix"        );
+    book(m_clusters_abs_matchedpvxFraction_eta_var        , "clusters_abs_matchedpvxFraction_eta_var"           );
+    book(m_clusters_abs_matchedpvxFraction_eta_notvar     , "clusters_abs_matchedpvxFraction_eta_notvar"        );
+    book(m_clusters_abs_matchedpvxFraction_eta_onlyvar    , "clusters_abs_matchedpvxFraction_eta_onlyvar"       );
+    book(m_clusters_abs_matchedpvxFraction_eta_onlyfix    , "clusters_abs_matchedpvxFraction_eta_onlyfix"       );
+    book(m_clusters_abs_matchedpvxFraction_eta_none       , "clusters_abs_matchedpvxFraction_eta_none"          );
+    
+    
+    book(m_clusters_pt_fraction_e                      ,  "clusters_pt_fraction_e"          );
+    book(m_clusters_PV0_pt_fraction_e                  ,  "clusters_PV0_pt_fraction_e"      );
+    book(m_clusters_PVX_pt_fraction_e                  ,  "clusters_PVX_pt_fraction_e"      );
+    book(m_clusters_rejected_pt_fraction_e             ,  "clusters_rejected_pt_fraction_e" );    
+    
+    book(m_clusters_all_neutral_eta                    , "clusters_all_neutral_eta"         );
+    book(m_clusters_all_neutral_e                      , "clusters_all_neutral_e"           );
+    book(m_clusters_all_neutral_PV0_eta                , "clusters_all_neutral_PV0_eta"     );
+    book(m_clusters_all_neutral_PV0_e                  , "clusters_all_neutral_PV0_e"       );
+    book(m_clusters_all_neutral_notPV0_eta             , "clusters_all_neutral_notPV0_eta"  );
+    book(m_clusters_all_neutral_notPV0_e               , "clusters_all_neutral_notPV0_e"    );
+    book(m_clusters_all_neutral_neutral_eta            , "clusters_all_neutral_neutral_eta"  );
+    book(m_clusters_all_neutral_neutral_e              , "clusters_all_neutral_neutral_e"    );
+    
+    book(m_clusters_etacut_eta                         , "clusters_etacut_eta"               );
+    book(m_clusters_etacut_width                       , "clusters_etacut_width"             );
+    book(m_clusters_etacut_width_eta                   , "clusters_etacut_width_eta"         );
+    book(m_clusters_etacut_energy                      , "clusters_etacut_energy"            );
+    book(m_clusters_etacut_width_energy                , "clusters_etacut_width_energy"      );
+    book(m_clusters_etacut_abs_eta                     , "clusters_etacut_abs_eta"           );
+    book(m_clusters_etacut_abs_width                   , "clusters_etacut_abs_width"         );
+    book(m_clusters_etacut_abs_width_eta               , "clusters_etacut_abs_width_eta"     );
+    book(m_clusters_etacut_abs_energy                  , "clusters_etacut_abs_energy"        );
+    book(m_clusters_etacut_abs_width_energy            , "clusters_etacut_abs_width_energy"  );
+    
+  } else if (m_collectionType == "tccs") {
+    book(m_tcc_pt                         , "tcc_pt"                               );
+    book(m_tcc_pt_etacut                  , "tcc_pt_etacut"                        );
+    book(m_tcc_phi                        , "tcc_phi"                              );
+    book(m_tcc_eta                        , "tcc_eta"                              );
+    book(m_tcc_eta_ptcut                  , "tcc_eta_ptcut"                        );
+    book(m_tcc_m                          , "tcc_m"                                );
+    book(m_tcc_taste                      , "tcc_taste"                            );
+    book(m_tcc_taste_pt                   , "tcc_taste_pt"                         );
+    book(m_tcc_taste_pt_etacut            , "tcc_taste_pt_etacut"                  );
+    book(m_tcc_taste_eta                  , "tcc_taste_eta"                        );
+    book(m_tcc_taste_eta_ptcut            , "tcc_taste_eta_ptcut"                  );
+    book(m_tcc_pt_pseudoresponse          , "tcc_pt_pseudoresponse"                );
+    book(m_tcc_pt_track_pt                , "tcc_pt_track_pt"                      );
+    book(m_tcc_pt_truth_pt                , "tcc_pt_truth_pt"                      );
+    book(m_tcc_pt_response                , "tcc_pt_response"                      );
+    book(m_tcc_N_M                        , "tcc_N_M"                              );
+    book(m_tcc_N_M_pv0                    , "tcc_N_M_pv0"                          );
+    
+    book(m_trk_tcc_reco_pt_truth_pt                                  , "trk_tcc_reco_pt_truth_pt"                                 );
+    book(m_trk_tcc_reco_pt_response                                  , "trk_tcc_reco_pt_response"                                 );
+        
+  } else
+    std::cout << "WARNING: TCCPlots configured with unkown collection. Please check if you are using jets or tracks!" << std::endl;   
+  
+  resizeHistograms();
+}
+
+void TCCPlots::fill(const xAOD::JetContainer& jets) {
+  fillHisto(m_jet_n , jets.size(), m_eventWeight); 
+}
+
+void TCCPlots::fill(const xAOD::Jet& jet) {
+  fillHisto(m_jet_pt , jet.pt()/GeV, m_eventWeight);
+  fillHisto(m_jet_eta, jet.eta()   , m_eventWeight);
+  fillHisto(m_jet_phi, jet.phi()   , m_eventWeight);
+  fillHisto(m_jet_m  , jet.m()/GeV , m_eventWeight);
+}
+
+void TCCPlots::fill(const xAOD::Jet& jet, const xAOD::Jet& truth) {
+  fillHisto(m_jet_deltaR , jet.p4().DeltaR(truth.p4()), m_eventWeight);
+}
+
+void TCCPlots::fillResponse(const xAOD::Jet& jet, const xAOD::Jet& truth) {
+  fillHisto(m_jet_deltaR_matched , jet.p4().DeltaR(truth.p4()), m_eventWeight);
+  fillHisto(m_jet_response_m     , jet.m() /truth.m()         , m_eventWeight);
+  fillHisto(m_jet_response_pt    , jet.pt()/truth.pt()        , m_eventWeight);
+  fillHisto(m_jet_response_eta   , jet.eta()/truth.eta()      , m_eventWeight);
+  fillHisto(m_jet_response_phi   , jet.phi()/truth.phi()      , m_eventWeight);
+  
+  fillHisto(m_jet_response_add_eta, jet.eta() - truth.eta()   , m_eventWeight);
+  fillHisto(m_jet_response_add_eta_pt, truth.pt()/GeV, jet.eta() - truth.eta(), m_eventWeight);
+  
+  fillHisto(m_jet_response_m_pt  , truth.pt()/GeV, jet.m()/truth.m() , m_eventWeight);
+    
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet) and accD2.isAvailable(truth)) {
+    fillHisto(m_jet_response_d2   , accD2(jet)/accD2(truth), m_eventWeight);  
+    fillHisto(m_jet_response_d2_pt, truth.pt()/GeV, accD2(jet)/accD2(truth) , m_eventWeight);
+    fillHisto(m_jet_response_add_d2   , accD2(jet) - accD2(truth), m_eventWeight);  
+    fillHisto(m_jet_response_add_d2_pt, truth.pt()/GeV, accD2(jet) - accD2(truth) , m_eventWeight);
+  }
+}
+
+void TCCPlots::fillResponseNPV(const xAOD::Jet& jet, const xAOD::Jet& truth, int npv) {
+  fillHisto(m_jet_response_m_npv  , npv, jet.m()/truth.m() , m_eventWeight);
+}
+
+void TCCPlots::fillResponseNoPtNoMassCuts(const xAOD::Jet& jet, const xAOD::Jet& truth) {
+  fillHisto(m_jet_mopt_pt_response_m     , truth.pt()/GeV, truth.m()/truth.pt(), jet.m() /truth.m()   , m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_pt    , truth.pt()/GeV, truth.m()/truth.pt(), jet.pt()/truth.pt()  , m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_eta   , truth.pt()/GeV, truth.m()/truth.pt(), jet.eta()/truth.eta(), m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_phi   , truth.pt()/GeV, truth.m()/truth.pt(), jet.phi()/truth.phi(), m_eventWeight);
+    
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet) and accD2.isAvailable(truth))
+    fillHisto(m_jet_mopt_pt_response_d2 , truth.pt()/GeV, truth.m()/truth.pt(), accD2(jet)/accD2(truth), m_eventWeight);
+}
+
+void TCCPlots::fillPseudoResponse(const xAOD::Jet& jet, const xAOD::Jet& calo) {
+  fillHisto(m_jet_pseudoresponse_m     , jet.m() /calo.m() , m_eventWeight);
+  fillHisto(m_jet_pseudoresponse_pt    , jet.pt()/calo.pt(), m_eventWeight);
+  
+  static SG::AuxElement::Accessor<float> ptAcc("JetConstitScaleMomentum_pt");
+  if (ptAcc.isAvailable(calo)) {
+    fillHisto(m_jet_pseudoresponse_notcalib_pt, jet.pt()/ptAcc(calo), m_eventWeight);
+  }
+}
+
+void TCCPlots::fillMoments(const xAOD::Jet& jet) {
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet))
+    fillHisto(m_jet_d2, accD2(jet), m_eventWeight);
+}
+
+void TCCPlots::fillMomentsWithMassCut(const xAOD::Jet& jet) {
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet))
+    fillHisto(m_jet_d2_massCut, accD2(jet), m_eventWeight);
+}
+
+void TCCPlots::fillMomentsLeading(const xAOD::Jet& jet) {
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet)) {
+    fillHisto(m_jet_d2_leading       , accD2(jet), m_eventWeight);
+    fillHisto(m_jet_d2_2leadings     , accD2(jet), m_eventWeight);
+  }
+}
+
+void TCCPlots::fillMomentsLeadingWithMassCut(const xAOD::Jet& jet) {
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet)) {
+    fillHisto(m_jet_d2_leading_massCut       , accD2(jet), m_eventWeight);
+    fillHisto(m_jet_d2_2leadings_massCut     , accD2(jet), m_eventWeight);
+  }
+}
+
+void TCCPlots::fillMomentsSubLeading(const xAOD::Jet& jet) {
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet)) {
+    fillHisto(m_jet_d2_subleading    , accD2(jet), m_eventWeight);
+    fillHisto(m_jet_d2_2leadings     , accD2(jet), m_eventWeight);
+  }
+}
+
+void TCCPlots::fillMomentsSubLeadingWithMassCut(const xAOD::Jet& jet) {
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet)) {
+    fillHisto(m_jet_d2_subleading_massCut    , accD2(jet), m_eventWeight);
+    fillHisto(m_jet_d2_2leadings_massCut     , accD2(jet), m_eventWeight);
+  }
+}
+
+void TCCPlots::fillResponseLeading(const xAOD::Jet& jet, const xAOD::Jet& truth) {
+  fillHisto(m_jet_response_m_leading     , jet.m()  /truth.m()  , m_eventWeight);
+  fillHisto(m_jet_response_pt_leading    , jet.pt() /truth.pt() , m_eventWeight);
+  fillHisto(m_jet_response_m_2leadings   , jet.m()  /truth.m()  , m_eventWeight);
+  fillHisto(m_jet_response_pt_2leadings  , jet.pt() /truth.pt() , m_eventWeight);
+  fillHisto(m_jet_response_eta_leading   , jet.eta()/truth.eta(), m_eventWeight);
+  fillHisto(m_jet_response_phi_leading   , jet.phi()/truth.phi(), m_eventWeight);
+  fillHisto(m_jet_response_eta_2leadings , jet.eta()/truth.eta(), m_eventWeight);
+  fillHisto(m_jet_response_phi_2leadings , jet.phi()/truth.phi(), m_eventWeight);
+  
+  fillHisto(m_jet_response_add_eta_leading  , jet.eta() - truth.eta()   , m_eventWeight);
+  fillHisto(m_jet_response_add_eta_2leadings, jet.eta() - truth.eta()   , m_eventWeight);
+  
+  fillHisto(m_jet_response_add_eta_pt_leading  , truth.pt()/GeV, jet.eta() - truth.eta(), m_eventWeight);
+  fillHisto(m_jet_response_add_eta_pt_2leadings, truth.pt()/GeV, jet.eta() - truth.eta(), m_eventWeight);
+  
+  fillHisto(m_jet_response_m_pt_2leadings  , truth.pt()/GeV, jet.m()/truth.m(), m_eventWeight);
+  fillHisto(m_jet_response_m_pt_leading    , truth.pt()/GeV, jet.m()/truth.m(), m_eventWeight);
+
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet) and accD2.isAvailable(truth)) {
+    fillHisto(m_jet_response_d2_2leadings , accD2(jet)/accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_d2_leading   , accD2(jet)/accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_d2_pt_2leadings  , truth.pt()/GeV, accD2(jet)/accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_d2_pt_leading    , truth.pt()/GeV, accD2(jet)/accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_add_d2_2leadings , accD2(jet) - accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_add_d2_leading   , accD2(jet) - accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_add_d2_pt_2leadings  , truth.pt()/GeV, accD2(jet) - accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_add_d2_pt_leading    , truth.pt()/GeV, accD2(jet) - accD2(truth), m_eventWeight);
+  }
+}
+
+void TCCPlots::fillResponseLeadingNPV(const xAOD::Jet& jet, const xAOD::Jet& truth, int npv) {
+  fillHisto(m_jet_response_m_npv_2leadings  , npv, jet.m()/truth.m() , m_eventWeight);
+  fillHisto(m_jet_response_m_npv_leading    , npv, jet.m()/truth.m() , m_eventWeight);
+}
+
+void TCCPlots::fillResponseNoPtNoMassCutsLeading(const xAOD::Jet& jet, const xAOD::Jet& truth) {
+  fillHisto(m_jet_mopt_pt_response_m_leading       , truth.pt()/GeV, truth.m()/truth.pt(), jet.m() /truth.m()   , m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_m_2leadings     , truth.pt()/GeV, truth.m()/truth.pt(), jet.m() /truth.m()   , m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_pt_leading      , truth.pt()/GeV, truth.m()/truth.pt(), jet.pt()/truth.pt()  , m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_pt_2leadings    , truth.pt()/GeV, truth.m()/truth.pt(), jet.pt()/truth.pt()  , m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_eta_leading     , truth.pt()/GeV, truth.m()/truth.pt(), jet.eta()/truth.eta(), m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_eta_2leadings   , truth.pt()/GeV, truth.m()/truth.pt(), jet.eta()/truth.eta(), m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_phi_leading     , truth.pt()/GeV, truth.m()/truth.pt(), jet.phi()/truth.phi(), m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_phi_2leadings   , truth.pt()/GeV, truth.m()/truth.pt(), jet.phi()/truth.phi(), m_eventWeight);
+  
+    
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet) and accD2.isAvailable(truth)) {
+    fillHisto(m_jet_mopt_pt_response_d2_leading   , truth.pt()/GeV, truth.m()/truth.pt(), accD2(jet)/accD2(truth), m_eventWeight);
+    fillHisto(m_jet_mopt_pt_response_d2_2leadings , truth.pt()/GeV, truth.m()/truth.pt(), accD2(jet)/accD2(truth), m_eventWeight);
+  }
+}
+
+void TCCPlots::fillLeading(const xAOD::Jet& jet) {
+  fillHisto(m_jet_m_2leadings   , jet.m() /GeV, m_eventWeight);
+  fillHisto(m_jet_m_leading     , jet.m() /GeV, m_eventWeight);
+  fillHisto(m_jet_pt_2leadings  , jet.pt()/GeV, m_eventWeight);
+  fillHisto(m_jet_pt_leading    , jet.pt()/GeV, m_eventWeight);
+  fillHisto(m_jet_eta_2leadings , jet.eta()   , m_eventWeight);
+  fillHisto(m_jet_eta_leading   , jet.eta()   , m_eventWeight);
+  fillHisto(m_jet_phi_2leadings , jet.phi()   , m_eventWeight);
+  fillHisto(m_jet_phi_leading   , jet.phi()   , m_eventWeight);
+}
+
+void TCCPlots::fillResponseSubLeading(const xAOD::Jet& jet, const xAOD::Jet& truth) {
+  fillHisto(m_jet_response_m_subleading   , jet.m()  /truth.m()  , m_eventWeight);
+  fillHisto(m_jet_response_pt_subleading  , jet.pt() /truth.pt() , m_eventWeight);
+  fillHisto(m_jet_response_m_2leadings    , jet.m()  /truth.m()  , m_eventWeight);
+  fillHisto(m_jet_response_pt_2leadings   , jet.pt() /truth.pt() , m_eventWeight);
+  fillHisto(m_jet_response_eta_subleading , jet.eta()/truth.eta(), m_eventWeight);
+  fillHisto(m_jet_response_phi_subleading , jet.phi()/truth.phi(), m_eventWeight);
+  fillHisto(m_jet_response_eta_2leadings  , jet.eta()/truth.eta(), m_eventWeight);
+  fillHisto(m_jet_response_phi_2leadings  , jet.phi()/truth.phi(), m_eventWeight);
+  
+  fillHisto(m_jet_response_add_eta_subleading, jet.eta() - truth.eta()   , m_eventWeight);
+  fillHisto(m_jet_response_add_eta_2leadings , jet.eta() - truth.eta()   , m_eventWeight);
+  
+  fillHisto(m_jet_response_add_eta_pt_subleading, truth.pt()/GeV, jet.eta() - truth.eta(), m_eventWeight);
+  fillHisto(m_jet_response_add_eta_pt_2leadings , truth.pt()/GeV, jet.eta() - truth.eta(), m_eventWeight);
+  
+  fillHisto(m_jet_response_m_pt_2leadings  , truth.pt()/GeV, jet.m()/truth.m(), m_eventWeight);
+  fillHisto(m_jet_response_m_pt_subleading , truth.pt()/GeV, jet.m()/truth.m(), m_eventWeight);
+
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet) and accD2.isAvailable(truth)) {
+    fillHisto(m_jet_response_d2_2leadings    , accD2(jet)/accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_d2_subleading   , accD2(jet)/accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_d2_pt_2leadings  , truth.pt()/GeV, accD2(jet)/accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_d2_pt_subleading , truth.pt()/GeV, accD2(jet)/accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_add_d2_2leadings    , accD2(jet) - accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_add_d2_subleading   , accD2(jet) - accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_add_d2_pt_2leadings  , truth.pt()/GeV, accD2(jet) - accD2(truth), m_eventWeight);
+    fillHisto(m_jet_response_add_d2_pt_subleading , truth.pt()/GeV, accD2(jet) - accD2(truth), m_eventWeight);
+  }
+}
+
+void TCCPlots::fillResponseSubLeadingNPV(const xAOD::Jet& jet, const xAOD::Jet& truth, int npv) {
+  fillHisto(m_jet_response_m_npv_2leadings  , npv, jet.m()/truth.m() , m_eventWeight);
+  fillHisto(m_jet_response_m_npv_subleading , npv, jet.m()/truth.m() , m_eventWeight);
+}
+
+void TCCPlots::fillResponseNoPtNoMassCutsSubLeading(const xAOD::Jet& jet, const xAOD::Jet& truth) {
+  fillHisto(m_jet_mopt_pt_response_m_subleading    , truth.pt()/GeV, truth.m()/truth.pt(), jet.m() /truth.m()   , m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_m_2leadings     , truth.pt()/GeV, truth.m()/truth.pt(), jet.m() /truth.m()   , m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_pt_subleading   , truth.pt()/GeV, truth.m()/truth.pt(), jet.pt()/truth.pt()  , m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_pt_2leadings    , truth.pt()/GeV, truth.m()/truth.pt(), jet.pt()/truth.pt()  , m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_eta_subleading  , truth.pt()/GeV, truth.m()/truth.pt(), jet.eta()/truth.eta(), m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_eta_2leadings   , truth.pt()/GeV, truth.m()/truth.pt(), jet.eta()/truth.eta(), m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_phi_subleading  , truth.pt()/GeV, truth.m()/truth.pt(), jet.phi()/truth.phi(), m_eventWeight);
+  fillHisto(m_jet_mopt_pt_response_phi_2leadings   , truth.pt()/GeV, truth.m()/truth.pt(), jet.phi()/truth.phi(), m_eventWeight);
+    
+  static SG::AuxElement::Accessor<float> accD2("D2");
+  if (accD2.isAvailable(jet) and accD2.isAvailable(truth)) {
+    fillHisto(m_jet_mopt_pt_response_d2_subleading, truth.pt()/GeV, truth.m()/truth.pt(), accD2(jet)/accD2(truth), m_eventWeight);
+    fillHisto(m_jet_mopt_pt_response_d2_2leadings , truth.pt()/GeV, truth.m()/truth.pt(), accD2(jet)/accD2(truth), m_eventWeight);
+  }
+}
+
+void TCCPlots::fillSubLeading(const xAOD::Jet& jet) {
+  fillHisto(m_jet_m_2leadings    , jet.m() /GeV, m_eventWeight);
+  fillHisto(m_jet_m_subleading   , jet.m() /GeV, m_eventWeight);
+  fillHisto(m_jet_pt_2leadings   , jet.pt()/GeV, m_eventWeight);
+  fillHisto(m_jet_pt_subleading  , jet.pt()/GeV, m_eventWeight);
+  fillHisto(m_jet_eta_2leadings  , jet.eta()   , m_eventWeight);
+  fillHisto(m_jet_eta_subleading , jet.eta()   , m_eventWeight);
+  fillHisto(m_jet_phi_2leadings  , jet.phi()   , m_eventWeight);
+  fillHisto(m_jet_phi_subleading , jet.phi()   , m_eventWeight);
+}
+
+void TCCPlots::fillPseudoResponseLeading(const xAOD::Jet& jet, const xAOD::Jet& calo) {
+  fillHisto(m_jet_pseudoresponse_m_leading     , jet.m() /calo.m() , m_eventWeight);
+  fillHisto(m_jet_pseudoresponse_pt_leading    , jet.pt()/calo.pt(), m_eventWeight);
+  fillHisto(m_jet_pseudoresponse_m_2leadings   , jet.m() /calo.m() , m_eventWeight);
+  fillHisto(m_jet_pseudoresponse_pt_2leadings  , jet.pt()/calo.pt(), m_eventWeight);
+  
+  static SG::AuxElement::Accessor<float> ptAcc("JetConstitScaleMomentum_pt");
+  if (ptAcc.isAvailable(calo)) {
+    fillHisto(m_jet_pseudoresponse_notcalib_pt_leading  , jet.pt()/ptAcc(calo), m_eventWeight);
+    fillHisto(m_jet_pseudoresponse_notcalib_pt_2leadings, jet.pt()/ptAcc(calo), m_eventWeight);
+  }
+}
+
+void TCCPlots::fillPseudoResponseSubLeading(const xAOD::Jet& jet, const xAOD::Jet& calo) {
+  fillHisto(m_jet_pseudoresponse_m_subleading   , jet.m() /calo.m() , m_eventWeight);
+  fillHisto(m_jet_pseudoresponse_pt_subleading  , jet.pt()/calo.pt(), m_eventWeight);
+  fillHisto(m_jet_pseudoresponse_m_2leadings    , jet.m() /calo.m() , m_eventWeight);
+  fillHisto(m_jet_pseudoresponse_pt_2leadings   , jet.pt()/calo.pt(), m_eventWeight);
+  
+  static SG::AuxElement::Accessor<float> ptAcc("JetConstitScaleMomentum_pt");
+  if (ptAcc.isAvailable(calo)) {
+    fillHisto(m_jet_pseudoresponse_notcalib_pt_subleading, jet.pt()/ptAcc(calo), m_eventWeight);
+    fillHisto(m_jet_pseudoresponse_notcalib_pt_2leadings , jet.pt()/ptAcc(calo), m_eventWeight);
+  }
+}
+      
+void TCCPlots::fillTrackParametersAllPt(const xAOD::TrackParticle& track) {  
+  fillHisto(m_trk_d0_pt      , track.pt()/GeV, track.d0()    , m_eventWeight);
+  fillHisto(m_trk_z0_pt      , track.pt()/GeV, track.z0()    , m_eventWeight);
+  fillHisto(m_trk_theta_pt   , track.pt()/GeV, track.theta() , m_eventWeight);
+  fillHisto(m_trk_phi_pt     , track.pt()/GeV, track.phi()   , m_eventWeight);
+  fillHisto(m_trk_qOverP_pt  , track.pt()/GeV, track.qOverP(), m_eventWeight);
+}
+
+void TCCPlots::fillCaloEntryInfoAllPt(const xAOD::TrackParticle& track) {    
+  static SG::AuxElement::Accessor< float > acc_caloEntryPosEta( "CaloEntryPosEta" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncEta( "CaloEntryUncEta" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncTheta( "CaloEntryUncTheta" );
+  if (acc_caloEntryPosEta.isAvailable(track)) {
+    float caloEntryEta = acc_caloEntryPosEta(track);
+    fillHisto(m_trk_caloEntryEtaOverEta_pt , track.pt()/GeV , caloEntryEta/track.eta(), m_eventWeight);
+  }
+  
+  if (acc_caloEntryUncEta.isAvailable(track)) {
+    float caloEntryUncEta = acc_caloEntryUncEta(track);
+    fillHisto(m_trk_caloEntryUncEta_pt          , track.pt()/GeV  , caloEntryUncEta, m_eventWeight);
+  }
+  if (acc_caloEntryUncTheta.isAvailable(track)) {
+    float caloEntryUncTheta = acc_caloEntryUncTheta(track);
+    fillHisto(m_trk_caloEntryUncTheta_pt          , track.pt()/GeV  , caloEntryUncTheta, m_eventWeight);
+  }  
+  
+  static SG::AuxElement::Accessor< float > acc_caloEntryPosPhi( "CaloEntryPosPhi" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncPhi( "CaloEntryUncPhi" );
+  if (acc_caloEntryPosPhi.isAvailable(track)) {
+    float caloEntryPhi = acc_caloEntryPosPhi(track);
+    fillHisto(m_trk_caloEntryPhiOverPhi_pt , track.pt()/GeV , caloEntryPhi/track.phi(), m_eventWeight);
+  }
+  
+  if (acc_caloEntryUncPhi.isAvailable(track)) {
+    float caloEntryUncPhi = acc_caloEntryUncPhi(track);
+    fillHisto(m_trk_caloEntryUncPhi_pt          , track.pt()/GeV  , caloEntryUncPhi, m_eventWeight);
+  }
+  
+  if (acc_caloEntryUncEta.isAvailable(track) and acc_caloEntryUncPhi.isAvailable(track)) {
+    float caloEntryUncEta = acc_caloEntryUncEta(track);
+    float caloEntryUncPhi = acc_caloEntryUncPhi(track);
+    float totUnc = sqrt(caloEntryUncEta*caloEntryUncEta+caloEntryUncPhi*caloEntryUncPhi);
+    fillHisto(m_trk_caloEntryUncTot_pt          , track.pt()/GeV  , totUnc, m_eventWeight);    
+  }
+}
+
+void TCCPlots::fillPerigeeInfoAllPt(const xAOD::TrackParticle& track) {
+  
+  static SG::AuxElement::Accessor< float > acc_perigeePosEta( "PerigeePosEta" );
+  static SG::AuxElement::Accessor< float > acc_perigeeUncEta( "PerigeeUncEta" );
+  static SG::AuxElement::Accessor< float > acc_perigeeUncTheta( "PerigeeUncTheta" );
+  if (acc_perigeeUncEta.isAvailable(track)) {
+    float perigeeUncEta = acc_perigeeUncEta(track);
+    fillHisto(m_trk_perigeeUncEta_pt          , track.pt()/GeV  , perigeeUncEta, m_eventWeight);
+  }
+  if (acc_perigeeUncTheta.isAvailable(track)) {
+    float perigeeUncTheta = acc_perigeeUncTheta(track);
+    fillHisto(m_trk_perigeeUncTheta_pt          , track.pt()/GeV  , perigeeUncTheta, m_eventWeight);
+  }
+  
+  static SG::AuxElement::Accessor< float > acc_perigeePosPhi( "PerigeePosPhi" );
+  static SG::AuxElement::Accessor< float > acc_perigeeUncPhi( "PerigeeUncPhi" );
+  if (acc_perigeeUncPhi.isAvailable(track)) {
+    float perigeeUncPhi = acc_perigeeUncPhi(track);
+    fillHisto(m_trk_perigeeUncPhi_pt          , track.pt()/GeV  , perigeeUncPhi, m_eventWeight);
+  }
+  
+  if (acc_perigeeUncEta.isAvailable(track) and acc_perigeeUncPhi.isAvailable(track)) {
+    float perigeeUncEta = acc_perigeeUncEta(track);
+    float perigeeUncPhi = acc_perigeeUncPhi(track);
+    float totUnc = sqrt(perigeeUncEta*perigeeUncEta+perigeeUncPhi*perigeeUncPhi);
+    fillHisto(m_trk_perigeeUncTot_pt          , track.pt()/GeV  , totUnc, m_eventWeight);
+  }
+}
+
+void TCCPlots::fillPerigeeVsCaloEntryAllPt(const xAOD::TrackParticle& track) {
+  static SG::AuxElement::Accessor< float > acc_perigeeEta( "PerigeePosEta" );
+  static SG::AuxElement::Accessor< float > acc_perigeePhi( "PerigeePosPhi" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryEta( "CaloEntryPosEta" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryPhi( "CaloEntryPosPhi" );
+  
+  if (acc_perigeeEta.isAvailable(track) and acc_perigeePhi.isAvailable(track) and acc_caloEntryEta.isAvailable(track) and acc_caloEntryPhi.isAvailable(track)) {
+    float delta_eta = acc_caloEntryEta(track) - acc_perigeeEta(track);
+    float delta_phi = acc_caloEntryPhi(track) - acc_perigeePhi(track);
+    
+    if (delta_phi > +M_PI) delta_phi -= 2. * M_PI;
+    if (delta_phi < -M_PI) delta_phi += 2. * M_PI;
+    
+    fillHisto(m_trk_delta_perigeeEta_caloEntryEta_pt        , track.pt()/GeV   , delta_eta   , m_eventWeight);
+    fillHisto(m_trk_delta_perigeePhi_caloEntryPhi_pt        , track.pt()/GeV   , delta_phi   , m_eventWeight);
+    
+    
+    delta_eta = acc_caloEntryEta(track) - track.eta();
+    delta_phi = acc_caloEntryPhi(track) - track.phi();
+    
+    if (delta_phi > +M_PI) delta_phi -= 2. * M_PI;
+    if (delta_phi < -M_PI) delta_phi += 2. * M_PI;
+               
+    fillHisto(m_trk_delta_trackEta_caloEntryEta_pt , track.pt()/GeV, delta_eta, m_eventWeight);
+    fillHisto(m_trk_delta_trackPhi_caloEntryPhi_pt , track.pt()/GeV, delta_phi, m_eventWeight);
+  }
+  
+  static SG::AuxElement::Accessor< int > acc_caloEntryCorr( "Corrected" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryEtaCorr( "CaloEntryPosEtaCorr" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryPhiCorr( "CaloEntryPosPhiCorr" );
+  
+  if (acc_caloEntryCorr.isAvailable(track) and acc_caloEntryCorr(track)>0) {
+    float delta_eta = acc_caloEntryEtaCorr(track) - track.eta();
+    float delta_phi = acc_caloEntryPhiCorr(track) - track.phi();
+    
+    if (delta_phi > +M_PI) delta_phi -= 2. * M_PI;    
+    if (delta_phi < -M_PI) delta_phi += 2. * M_PI;
+               
+    fillHisto(m_trk_delta_trackEta_caloEntryEtaCorr_pt, track.pt()/GeV   , delta_eta, m_eventWeight);
+    fillHisto(m_trk_delta_trackPhi_caloEntryPhiCorr_pt, track.pt()/GeV   , delta_phi, m_eventWeight);
+  }
+  
+  if (acc_caloEntryEta.isAvailable(track) and acc_caloEntryPhi.isAvailable(track) and acc_caloEntryCorr.isAvailable(track) and acc_caloEntryCorr(track)>0) {
+    float delta_eta = acc_caloEntryEtaCorr(track) - acc_caloEntryEta(track);
+    float delta_phi = acc_caloEntryPhiCorr(track) - acc_caloEntryPhi(track);
+    
+    if (delta_phi > +M_PI) delta_phi -= 2. * M_PI;    
+    if (delta_phi < -M_PI) delta_phi += 2. * M_PI;
+               
+    fillHisto(m_trk_delta_caloEntryEta_caloEntryEtaCorr_pt, track.pt()/GeV   , delta_eta, m_eventWeight);
+    fillHisto(m_trk_delta_caloEntryPhi_caloEntryPhiCorr_pt, track.pt()/GeV   , delta_phi, m_eventWeight);
+  }  
+}
+
+void TCCPlots::fillTrackParameters(const xAOD::TrackParticle& track) {
+  fillHisto(m_trk_d0      , track.d0()    , m_eventWeight);
+  fillHisto(m_trk_z0      , track.z0()    , m_eventWeight);
+  fillHisto(m_trk_theta   , track.theta() , m_eventWeight);
+  fillHisto(m_trk_phi     , track.phi()   , m_eventWeight);
+  fillHisto(m_trk_qOverP  , track.qOverP(), m_eventWeight);  
+  
+  fillHisto(m_trk_d0_eta      , track.eta(), track.d0()    , m_eventWeight);
+  fillHisto(m_trk_z0_eta      , track.eta(), track.z0()    , m_eventWeight);
+  fillHisto(m_trk_theta_eta   , track.eta(), track.theta() , m_eventWeight);
+  fillHisto(m_trk_phi_eta     , track.eta(), track.phi()   , m_eventWeight);
+  fillHisto(m_trk_qOverP_eta  , track.eta(), track.qOverP(), m_eventWeight);  
+  
+}
+
+void TCCPlots::fillCaloEntryInfo(const xAOD::TrackParticle& track) {    
+  static SG::AuxElement::Accessor< float > acc_caloEntryPosEta( "CaloEntryPosEta" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncEta( "CaloEntryUncEta" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncTheta( "CaloEntryUncTheta" );
+  if (acc_caloEntryPosEta.isAvailable(track)) {
+    float caloEntryEta = acc_caloEntryPosEta(track);
+    fillHisto(m_trk_caloEntryEta           , caloEntryEta , m_eventWeight);
+    fillHisto(m_trk_caloEntryEtaOverEta_eta, track.eta()    , caloEntryEta/track.eta(), m_eventWeight);
+  }
+  
+  if (acc_caloEntryPosEta.isAvailable(track) and acc_caloEntryUncEta.isAvailable(track)) {
+    float caloEntryEta    = acc_caloEntryPosEta(track);
+    float caloEntryUncEta = acc_caloEntryUncEta(track);
+    fillHisto(m_trk_caloEntryUncEta_caloEntryEta, caloEntryEta    , caloEntryUncEta, m_eventWeight);
+    fillHisto(m_trk_caloEntryUncEta_eta         , track.eta()     , caloEntryUncEta, m_eventWeight);
+  }
+  if (acc_caloEntryUncTheta.isAvailable(track)) {
+    float caloEntryUncTheta = acc_caloEntryUncTheta(track);
+    fillHisto(m_trk_caloEntryUncTheta_eta         , track.eta()     , caloEntryUncTheta, m_eventWeight);
+  }  
+  
+  static SG::AuxElement::Accessor< float > acc_caloEntryPosPhi( "CaloEntryPosPhi" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncPhi( "CaloEntryUncPhi" );
+  if (acc_caloEntryPosPhi.isAvailable(track)) {
+    float caloEntryPhi = acc_caloEntryPosPhi(track);
+    fillHisto(m_trk_caloEntryPhi           , caloEntryPhi, m_eventWeight);
+    fillHisto(m_trk_caloEntryPhiOverPhi_eta, track.eta()    , caloEntryPhi/track.phi(), m_eventWeight);
+  }
+  
+  if (acc_caloEntryPosPhi.isAvailable(track) and acc_caloEntryUncPhi.isAvailable(track)) {
+    float caloEntryPhi    = acc_caloEntryPosPhi(track);
+    float caloEntryUncPhi = acc_caloEntryUncPhi(track);
+    fillHisto(m_trk_caloEntryUncPhi_caloEntryPhi, caloEntryPhi, caloEntryUncPhi, m_eventWeight);
+    fillHisto(m_trk_caloEntryUncPhi_eta         , track.eta() , caloEntryUncPhi, m_eventWeight);
+  }
+  
+  if (acc_caloEntryUncEta.isAvailable(track) and acc_caloEntryUncPhi.isAvailable(track)) {
+    float caloEntryUncEta = acc_caloEntryUncEta(track);
+    float caloEntryUncPhi = acc_caloEntryUncPhi(track);
+    float totUnc = sqrt(caloEntryUncEta*caloEntryUncEta+caloEntryUncPhi*caloEntryUncPhi);
+    fillHisto(m_trk_caloEntryUncTot_eta         , track.eta() , totUnc, m_eventWeight);
+    static SG::AuxElement::Accessor< float > acc_prodRadius( "ProductionRadius" );
+    if (acc_prodRadius.isAvailable(track)) {
+      fillHisto(m_trk_caloEntryUncEta_prodRadius, acc_prodRadius(track), caloEntryUncEta, m_eventWeight);
+      fillHisto(m_trk_caloEntryUncPhi_prodRadius, acc_prodRadius(track), caloEntryUncPhi, m_eventWeight);
+      fillHisto(m_trk_caloEntryUncTot_prodRadius, acc_prodRadius(track), totUnc         , m_eventWeight);
+      if (acc_caloEntryUncTheta.isAvailable(track))
+	fillHisto(m_trk_caloEntryUncTheta_prodRadius, acc_prodRadius(track),  acc_caloEntryUncTheta(track), m_eventWeight);
+    }    
+  }
+}
+
+void TCCPlots::fillPerigeeInfo(const xAOD::TrackParticle& track) {
+  
+  static SG::AuxElement::Accessor< float > acc_perigeePosEta( "PerigeePosEta" );
+  static SG::AuxElement::Accessor< float > acc_perigeeUncEta( "PerigeeUncEta" );
+  static SG::AuxElement::Accessor< float > acc_perigeeUncTheta( "PerigeeUncTheta" );
+  if (acc_perigeePosEta.isAvailable(track)) {
+    float perigeeEta = acc_perigeePosEta(track);
+    fillHisto(m_trk_perigeeEta           , perigeeEta, m_eventWeight);
+  }
+  if (acc_perigeeUncEta.isAvailable(track)) {
+    float perigeeUncEta = acc_perigeeUncEta(track);
+    fillHisto(m_trk_perigeeUncEta_eta         , track.eta()     , perigeeUncEta, m_eventWeight);
+  }
+  if (acc_perigeeUncTheta.isAvailable(track)) {
+    float perigeeUncTheta = acc_perigeeUncTheta(track);
+    fillHisto(m_trk_perigeeUncTheta_eta         , track.eta()     , perigeeUncTheta, m_eventWeight);
+  }
+  
+  static SG::AuxElement::Accessor< float > acc_perigeePosPhi( "PerigeePosPhi" );
+  static SG::AuxElement::Accessor< float > acc_perigeeUncPhi( "PerigeeUncPhi" );
+  if (acc_perigeePosPhi.isAvailable(track)) {
+    float perigeePhi = acc_perigeePosPhi(track);
+    fillHisto(m_trk_perigeePhi           , perigeePhi, m_eventWeight);
+  }
+  
+  if (acc_perigeeUncPhi.isAvailable(track)) {
+    float perigeeUncPhi = acc_perigeeUncPhi(track);
+    fillHisto(m_trk_perigeeUncPhi_eta         , track.eta() , perigeeUncPhi, m_eventWeight);
+  }
+  
+  if (acc_perigeeUncEta.isAvailable(track) and acc_perigeeUncPhi.isAvailable(track)) {
+    float perigeeUncEta = acc_perigeeUncEta(track);
+    float perigeeUncPhi = acc_perigeeUncPhi(track);
+    float totUnc = sqrt(perigeeUncEta*perigeeUncEta+perigeeUncPhi*perigeeUncPhi);
+    fillHisto(m_trk_perigeeUncTot_eta         , track.eta() , totUnc, m_eventWeight);
+    static SG::AuxElement::Accessor< float > acc_prodRadius( "ProductionRadius" );
+    if (acc_prodRadius.isAvailable(track)) {
+      fillHisto(m_trk_perigeeUncEta_prodRadius, acc_prodRadius(track), perigeeUncEta, m_eventWeight);
+      fillHisto(m_trk_perigeeUncPhi_prodRadius, acc_prodRadius(track), perigeeUncPhi, m_eventWeight);
+      fillHisto(m_trk_perigeeUncTot_prodRadius, acc_prodRadius(track), totUnc       , m_eventWeight);
+      fillHisto(m_trk_prodRadius              , acc_prodRadius(track), m_eventWeight);
+      if (acc_perigeeUncTheta.isAvailable(track))
+	fillHisto(m_trk_perigeeUncTheta_prodRadius, acc_prodRadius(track),  acc_perigeeUncTheta(track), m_eventWeight);
+    }
+  }
+}
+
+void TCCPlots::fillPerigeeVsCaloEntry(const xAOD::TrackParticle& track) {
+  static SG::AuxElement::Accessor< float > acc_perigeeUncEta( "PerigeeUncEta" );
+  static SG::AuxElement::Accessor< float > acc_perigeeUncTheta( "PerigeeUncTheta" );
+  static SG::AuxElement::Accessor< float > acc_perigeeUncPhi( "PerigeeUncPhi" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncEta( "CaloEntryUncEta" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncTheta( "CaloEntryUncTheta" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncPhi( "CaloEntryUncPhi" );
+  
+  if (acc_perigeeUncEta.isAvailable(track) and acc_perigeeUncPhi.isAvailable(track) and acc_perigeeUncTheta.isAvailable(track) 
+      and acc_caloEntryUncEta.isAvailable(track) and acc_caloEntryUncPhi.isAvailable(track) and acc_caloEntryUncTheta.isAvailable(track)) {
+    float caloEntryUncEta = acc_caloEntryUncEta(track);
+    float CaloEntryUncTheta = acc_caloEntryUncTheta(track);
+    float caloEntryUncPhi = acc_caloEntryUncPhi(track);
+    float caloTotUnc = sqrt(caloEntryUncEta*caloEntryUncEta+caloEntryUncPhi*caloEntryUncPhi);
+    float perigeeUncEta = acc_perigeeUncEta(track);  
+    float perigeeUncTheta = acc_perigeeUncTheta(track);
+    float perigeeUncPhi = acc_perigeeUncPhi(track);
+    float perigeeTotUnc = sqrt(perigeeUncEta*perigeeUncEta+perigeeUncPhi*perigeeUncPhi);
+    fillHisto(m_trk_perigeeUncEta_caloUncEta    , caloEntryUncEta  , perigeeUncEta  , m_eventWeight);
+    fillHisto(m_trk_perigeeUncTheta_caloUncTheta, CaloEntryUncTheta, perigeeUncTheta, m_eventWeight);
+    fillHisto(m_trk_perigeeUncPhi_caloUncPhi    , caloEntryUncPhi  , perigeeUncPhi  , m_eventWeight);
+    fillHisto(m_trk_perigeeUncTot_caloUncTot    , caloTotUnc       , perigeeTotUnc  , m_eventWeight);
+  }
+  
+  static SG::AuxElement::Accessor< float > acc_perigeeEta( "PerigeePosEta" );
+  static SG::AuxElement::Accessor< float > acc_perigeePhi( "PerigeePosPhi" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryEta( "CaloEntryPosEta" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryPhi( "CaloEntryPosPhi" );
+  
+  if (acc_perigeeEta.isAvailable(track) and acc_perigeePhi.isAvailable(track) and acc_caloEntryEta.isAvailable(track) and acc_caloEntryPhi.isAvailable(track)) {
+    float delta_eta = acc_caloEntryEta(track) - acc_perigeeEta(track);
+    float delta_phi = acc_caloEntryPhi(track) - acc_perigeePhi(track);
+    
+    if (delta_phi > +M_PI) delta_phi -= 2. * M_PI;
+    if (delta_phi < -M_PI) delta_phi += 2. * M_PI;
+               
+    fillHisto(m_trk_delta_perigeeEta_caloEntryEta, delta_eta, m_eventWeight);
+    fillHisto(m_trk_delta_perigeePhi_caloEntryPhi, delta_phi, m_eventWeight);
+    
+    fillHisto(m_trk_delta_perigeeEta_caloEntryEta_eta       , track.eta()  , delta_eta   , m_eventWeight);
+    fillHisto(m_trk_delta_perigeePhi_caloEntryPhi_eta       , track.eta()  , delta_phi   , m_eventWeight);
+    
+    delta_eta = acc_caloEntryEta(track) - track.eta();
+    delta_phi = acc_caloEntryPhi(track) - track.phi();
+    
+    if (delta_phi > +M_PI) delta_phi -= 2. * M_PI;
+    if (delta_phi < -M_PI) delta_phi += 2. * M_PI;
+               
+    fillHisto(m_trk_delta_trackEta_caloEntryEta    , delta_eta, m_eventWeight);
+    fillHisto(m_trk_delta_trackPhi_caloEntryPhi    , delta_phi, m_eventWeight);
+    fillHisto(m_trk_delta_trackEta_caloEntryEta_eta, track.eta()   , delta_eta, m_eventWeight);
+    fillHisto(m_trk_delta_trackPhi_caloEntryPhi_eta, track.eta()   , delta_phi, m_eventWeight);
+  }
+  
+  static SG::AuxElement::Accessor< int > acc_caloEntryCorr( "Corrected" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryEtaCorr( "CaloEntryPosEtaCorr" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryPhiCorr( "CaloEntryPosPhiCorr" );
+  
+  if (acc_caloEntryCorr.isAvailable(track) and acc_caloEntryCorr(track)>0) {
+    float delta_eta = acc_caloEntryEtaCorr(track) - track.eta();
+    float delta_phi = acc_caloEntryPhiCorr(track) - track.phi();
+    
+    if (delta_phi > +M_PI) delta_phi -= 2. * M_PI;    
+    if (delta_phi < -M_PI) delta_phi += 2. * M_PI;
+               
+    fillHisto(m_trk_delta_trackEta_caloEntryEtaCorr    , delta_eta, m_eventWeight);
+    fillHisto(m_trk_delta_trackPhi_caloEntryPhiCorr    , delta_phi, m_eventWeight);
+    fillHisto(m_trk_delta_trackEta_caloEntryEtaCorr_eta, track.eta()   , delta_eta, m_eventWeight);
+    fillHisto(m_trk_delta_trackPhi_caloEntryPhiCorr_eta, track.eta()   , delta_phi, m_eventWeight);
+  }
+  
+ 
+  if (acc_caloEntryEta.isAvailable(track) and acc_caloEntryPhi.isAvailable(track) and acc_caloEntryCorr.isAvailable(track) and acc_caloEntryCorr(track)>0) {
+    float delta_eta = acc_caloEntryEtaCorr(track) - acc_caloEntryEta(track);
+    float delta_phi = acc_caloEntryPhiCorr(track) - acc_caloEntryPhi(track);
+          
+    if (delta_phi > +M_PI) delta_phi -= 2. * M_PI;    
+    if (delta_phi < -M_PI) delta_phi += 2. * M_PI;
+          
+    fillHisto(m_trk_delta_caloEntryEta_caloEntryEtaCorr    , delta_eta, m_eventWeight);
+    fillHisto(m_trk_delta_caloEntryPhi_caloEntryPhiCorr    , delta_phi, m_eventWeight);
+    fillHisto(m_trk_delta_caloEntryEta_caloEntryEtaCorr_eta, track.eta()   , delta_eta, m_eventWeight);
+    fillHisto(m_trk_delta_caloEntryPhi_caloEntryPhiCorr_eta, track.eta()   , delta_phi, m_eventWeight);
+  }  
+  
+}
+
+void TCCPlots::fillMatching(const xAOD::TrackParticle& track) {
+  // I should fill stats for the tracks 
+  static SG::AuxElement::Accessor< int > acc_assTool( "ParticleCaloClusterAssociationTool" );
+  if (not acc_assTool.isAvailable(track)) return;
+  if (acc_assTool(track)==0) return;
+  
+  // tracks w/ extrapolation
+  
+  fillHisto(m_trk_total_eta, track.eta()   , m_eventWeight);
+  fillHisto(m_trk_total_pt , track.pt()/GeV, m_eventWeight);
+      
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncEta( "CaloEntryUncEta" );
+  static SG::AuxElement::Accessor< float > acc_caloEntryUncPhi( "CaloEntryUncPhi" );
+  static SG::AuxElement::Accessor< float > acc_prodRadius( "ProductionRadius" );
+  
+  if (acc_caloEntryUncEta.isAvailable(track) and acc_caloEntryUncPhi.isAvailable(track) and acc_prodRadius.isAvailable(track)) {
+    float caloEntryUncEta = acc_caloEntryUncEta(track);
+    float caloEntryUncPhi = acc_caloEntryUncPhi(track);
+    float totUnc = sqrt(caloEntryUncEta*caloEntryUncEta+caloEntryUncPhi*caloEntryUncPhi);
+    
+  //   static SG::AuxElement::Accessor< std::vector<int> > acc_matched( "IsMatched" );
+  //   static SG::AuxElement::Accessor< std::vector<int> > acc_mode( "MatchingMode" );
+  
+    static SG::AuxElement::Accessor< int > acc_allClusters( "AllClusters" );
+    static SG::AuxElement::Accessor< int > acc_clusters_dr_fix      ( "Match_deltaR_fixed"        );
+    static SG::AuxElement::Accessor< int > acc_clusters_dr_var      ( "Match_deltaR_variable"     );
+    
+    fillHisto(m_trk_total_clusters_eta, track.eta()   , acc_allClusters(track), m_eventWeight);
+    fillHisto(m_trk_total_clusters_pt , track.pt()/GeV, acc_allClusters(track), m_eventWeight);
+      
+    if (acc_clusters_dr_fix(track)==0) {    
+      fillHisto(m_trk_notMatching_deltar_fix_eta , track.eta()   , m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_fix_phi , track.phi()   , m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_fix_pt  , track.pt()/GeV, m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_fix_caloEntryUncTot_eta, track.eta()   , totUnc, m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_fix_caloEntryUncTot_pt , track.pt()/GeV, totUnc, m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_fix_caloEntryUncTot_prodRadius, acc_prodRadius(track), totUnc       , m_eventWeight);
+    } else {
+      fillHisto(m_trk_matching_deltar_fix_eta , track.eta()   , m_eventWeight);
+      fillHisto(m_trk_matching_deltar_fix_pt  , track.pt()/GeV, m_eventWeight);
+    }
+    
+    if (acc_clusters_dr_var(track)==0) {    
+      fillHisto(m_trk_notMatching_deltar_var_eta , track.eta()   , m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_var_phi , track.phi()   , m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_var_pt  , track.pt()/GeV, m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_var_caloEntryUncTot_eta, track.eta()   , totUnc, m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_var_caloEntryUncTot_pt , track.pt()/GeV, totUnc, m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_var_caloEntryUncTot_prodRadius, acc_prodRadius(track), totUnc       , m_eventWeight);  
+    } else {
+      fillHisto(m_trk_matching_deltar_var_eta , track.eta()   , m_eventWeight);
+      fillHisto(m_trk_matching_deltar_var_pt  , track.pt()/GeV, m_eventWeight);
+    }
+    
+    if (acc_clusters_dr_fix(track)==0 and acc_clusters_dr_var(track)==0) {    
+      fillHisto(m_trk_notMatching_deltar_none_eta , track.eta()   , m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_none_phi , track.phi()   , m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_none_pt  , track.pt()/GeV, m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_none_caloEntryUncTot_eta, track.eta()   , totUnc, m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_none_caloEntryUncTot_pt , track.pt()/GeV, totUnc, m_eventWeight);
+      fillHisto(m_trk_notMatching_deltar_none_caloEntryUncTot_prodRadius, acc_prodRadius(track), totUnc       , m_eventWeight);
+    }
+    
+    if (acc_clusters_dr_fix(track)>0 and acc_clusters_dr_var(track)>0) {
+      fillHisto(m_trk_matching_deltar_fix_and_var_eta  , track.eta()   , m_eventWeight);
+      fillHisto(m_trk_matching_deltar_fix_and_var_pt   , track.pt()/GeV, m_eventWeight);
+    }
+    
+    if (acc_clusters_dr_fix(track)>0 or acc_clusters_dr_var(track)>0) {
+      fillHisto(m_trk_matching_deltar_fix_or_var_eta   , track.eta()   , m_eventWeight);
+      fillHisto(m_trk_matching_deltar_fix_or_var_pt    , track.pt()/GeV, m_eventWeight);
+    }
+    
+    if (acc_clusters_dr_fix(track)>0 and acc_clusters_dr_var(track)==0) {
+      fillHisto(m_trk_matching_deltar_onlyfix_eta      , track.eta()   , m_eventWeight);
+      fillHisto(m_trk_matching_deltar_onlyfix_pt       , track.pt()/GeV, m_eventWeight);
+    }
+    
+    if (acc_clusters_dr_fix(track)==0 and acc_clusters_dr_var(track)>0) {
+      fillHisto(m_trk_matching_deltar_onlyvar_eta      , track.eta()   , m_eventWeight);
+      fillHisto(m_trk_matching_deltar_onlyvar_pt       , track.pt()/GeV, m_eventWeight);
+    }
+    
+    static SG::AuxElement::Accessor< int > acc_clusters_dr_or       ( "Match_deltaR"             );
+    static SG::AuxElement::Accessor< int > acc_clusters_dr_and      ( "Match_deltaR_both"        );
+    static SG::AuxElement::Accessor< int > acc_clusters_dr_fix_only ( "Match_deltaR_fixedOnly"   );
+    static SG::AuxElement::Accessor< int > acc_clusters_dr_var_only ( "Match_deltaR_variableOnly");
+    
+    // matching dr fixed or dr variable
+    fillHisto(m_trk_matching_deltar_or_clusters_eta , track.eta()   , acc_clusters_dr_or(track), m_eventWeight);
+    fillHisto(m_trk_matching_deltar_or_clusters_phi , track.phi()   , acc_clusters_dr_or(track), m_eventWeight);
+    fillHisto(m_trk_matching_deltar_or_clusters_pt  , track.pt()/GeV, acc_clusters_dr_or(track), m_eventWeight);
+    
+    // matching dr fixed and dr variable
+    fillHisto(m_trk_matching_deltar_and_clusters_eta , track.eta()   , acc_clusters_dr_and(track), m_eventWeight);
+    fillHisto(m_trk_matching_deltar_and_clusters_phi , track.phi()   , acc_clusters_dr_and(track), m_eventWeight);
+    fillHisto(m_trk_matching_deltar_and_clusters_pt  , track.pt()/GeV, acc_clusters_dr_and(track), m_eventWeight);
+      
+    //matching only dr fix
+    fillHisto(m_trk_matching_deltar_fix_only_clusters_eta , track.eta()   , acc_clusters_dr_fix_only(track), m_eventWeight);
+    fillHisto(m_trk_matching_deltar_fix_only_clusters_phi , track.phi()   , acc_clusters_dr_fix_only(track), m_eventWeight);
+    fillHisto(m_trk_matching_deltar_fix_only_clusters_pt  , track.pt()/GeV, acc_clusters_dr_fix_only(track), m_eventWeight);
+    
+    //matching only dr variable
+    fillHisto(m_trk_matching_deltar_var_only_clusters_eta , track.eta()   , acc_clusters_dr_var_only(track), m_eventWeight);
+    fillHisto(m_trk_matching_deltar_var_only_clusters_phi , track.phi()   , acc_clusters_dr_var_only(track), m_eventWeight);
+    fillHisto(m_trk_matching_deltar_var_only_clusters_pt  , track.pt()/GeV, acc_clusters_dr_var_only(track), m_eventWeight);
+  }     
+  
+  static SG::AuxElement::Accessor< int > acc_trk_PV0 ( "IsPV0Compatible" );
+  if (acc_trk_PV0.isAvailable(track) and acc_trk_PV0(track)==1) {
+    
+    fillHisto(m_trk_pv0_total_eta, track.eta()   , m_eventWeight);
+    fillHisto(m_trk_pv0_total_pt , track.pt()/GeV, m_eventWeight);
+    
+    if (acc_caloEntryUncEta.isAvailable(track) and acc_caloEntryUncPhi.isAvailable(track) and acc_prodRadius.isAvailable(track)) {
+      float caloEntryUncEta = acc_caloEntryUncEta(track);
+      float caloEntryUncPhi = acc_caloEntryUncPhi(track);
+      float totUnc = sqrt(caloEntryUncEta*caloEntryUncEta+caloEntryUncPhi*caloEntryUncPhi);
+      
+      fillHisto(m_trk_pv0_caloEntryUncTot_eta, track.eta()   , totUnc, m_eventWeight);
+      fillHisto(m_trk_pv0_caloEntryUncTot_pt , track.pt()/GeV, totUnc, m_eventWeight);
+     
+      uint8_t nPixHits (0);
+      uint8_t nSCTHits (0);
+      
+      if (track.summaryValue(nPixHits, xAOD::numberOfPixelHits) and track.summaryValue(nSCTHits, xAOD::numberOfSCTHits)) {
+	int siHits = nPixHits + nSCTHits;
+	if (siHits == 0) {
+	  fillHisto(m_trk_pv0_caloEntryUncTot_eta_0SiHits      , track.eta()   , totUnc, m_eventWeight);
+	  fillHisto(m_trk_pv0_caloEntryUncTot_pt_0SiHits       , track.pt()/GeV, totUnc, m_eventWeight);
+	  fillHisto(m_trk_pv0_caloEntryUncTot_rFirstHit_0SiHits, track.radiusOfFirstHit(), totUnc, m_eventWeight);
+	}
+	fillHisto(m_trk_pv0_caloEntryUncTot_nSiHits, siHits, totUnc, m_eventWeight);
+      }
+
+      fillHisto(m_trk_pv0_caloEntryUncTot_rFirstHit, track.radiusOfFirstHit(), totUnc, m_eventWeight); 
+                  
+      static SG::AuxElement::Accessor< int > acc_allClusters     ( "AllClusters"           );
+      static SG::AuxElement::Accessor< int > acc_clusters_dr_fix ( "Match_deltaR_fixed"    );
+      static SG::AuxElement::Accessor< int > acc_clusters_dr_var ( "Match_deltaR_variable" );
+      
+      fillHisto(m_trk_pv0_total_clusters_eta, track.eta()   , acc_allClusters(track), m_eventWeight);
+      fillHisto(m_trk_pv0_total_clusters_pt , track.pt()/GeV, acc_allClusters(track), m_eventWeight);
+      
+      if (acc_clusters_dr_fix(track)>0) {    
+	fillHisto(m_trk_pv0_matching_deltar_fix_eta , track.eta()   , m_eventWeight);
+	fillHisto(m_trk_pv0_matching_deltar_fix_pt  , track.pt()/GeV, m_eventWeight);
+      } else {
+	fillHisto(m_trk_pv0_notMatching_deltar_fix_eta , track.eta()   , m_eventWeight);
+	fillHisto(m_trk_pv0_notMatching_deltar_fix_pt  , track.pt()/GeV, m_eventWeight);	
+      }
+      
+      if (acc_clusters_dr_var(track)>0) {    
+	fillHisto(m_trk_pv0_matching_deltar_var_eta , track.eta()   , m_eventWeight);
+	fillHisto(m_trk_pv0_matching_deltar_var_pt  , track.pt()/GeV, m_eventWeight);
+      } else {
+	fillHisto(m_trk_pv0_notMatching_deltar_var_eta , track.eta()   , m_eventWeight);
+	fillHisto(m_trk_pv0_notMatching_deltar_var_pt  , track.pt()/GeV, m_eventWeight);	
+      }
+      
+      if (acc_clusters_dr_fix(track)==0 and acc_clusters_dr_var(track)==0) {    
+	fillHisto(m_trk_pv0_notMatching_deltar_none_eta , track.eta()   , m_eventWeight);
+	fillHisto(m_trk_pv0_notMatching_deltar_none_pt  , track.pt()/GeV, m_eventWeight);
+      }
+      
+      if (acc_clusters_dr_fix(track)>0 and acc_clusters_dr_var(track)>0) {
+	fillHisto(m_trk_pv0_matching_deltar_fix_and_var_eta  , track.eta()   , m_eventWeight);
+	fillHisto(m_trk_pv0_matching_deltar_fix_and_var_pt   , track.pt()/GeV, m_eventWeight);
+      }
+      
+      if (acc_clusters_dr_fix(track)>0 or acc_clusters_dr_var(track)>0) {
+	fillHisto(m_trk_pv0_matching_deltar_fix_or_var_eta   , track.eta()   , m_eventWeight);
+	fillHisto(m_trk_pv0_matching_deltar_fix_or_var_pt    , track.pt()/GeV, m_eventWeight);
+      }
+      
+      if (acc_clusters_dr_fix(track)>0 and acc_clusters_dr_var(track)==0) {
+	fillHisto(m_trk_pv0_matching_deltar_onlyfix_eta      , track.eta()   , m_eventWeight);
+	fillHisto(m_trk_pv0_matching_deltar_onlyfix_pt       , track.pt()/GeV, m_eventWeight);
+      }
+      
+      if (acc_clusters_dr_fix(track)==0 and acc_clusters_dr_var(track)>0) {
+	fillHisto(m_trk_pv0_matching_deltar_onlyvar_eta      , track.eta()   , m_eventWeight);
+	fillHisto(m_trk_pv0_matching_deltar_onlyvar_pt       , track.pt()/GeV, m_eventWeight);
+      }
+    }
+  }
+}
+
+void TCCPlots::fillClusterEtaCut(const xAOD::CaloCluster& cluster) {
+  // here I fill the clusters
+  static SG::AuxElement::Accessor< int > acc_assTool( "ParticleCaloClusterAssociationTool" );
+  if (not acc_assTool.isAvailable(cluster)) return;
+  if (acc_assTool(cluster)==0) return;
+  
+  static SG::AuxElement::Accessor< float > acc_eta( "ClusterEta" );
+  static SG::AuxElement::Accessor< float > acc_unc( "ClusterUnc" );
+  
+  static SG::AuxElement::Accessor< float > acc_weight( "ClusterWeight" );
+  static SG::AuxElement::Accessor< float > acc_calE( "calE" );
+   
+  fillHisto(m_clusters_etacut_eta                     , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+  fillHisto(m_clusters_etacut_abs_eta                 , acc_eta(cluster), m_eventWeight);
+  fillHisto(m_clusters_etacut_width                   , acc_unc(cluster), acc_weight(cluster)*m_eventWeight);
+  fillHisto(m_clusters_etacut_abs_width               , acc_unc(cluster), m_eventWeight);
+  fillHisto(m_clusters_etacut_width_eta               , acc_eta(cluster), acc_unc(cluster), acc_weight(cluster)*m_eventWeight);
+  fillHisto(m_clusters_etacut_abs_width_eta           , acc_eta(cluster), acc_unc(cluster), m_eventWeight);
+  if (acc_calE.isAvailable(cluster)) {
+    fillHisto(m_clusters_etacut_energy                , cluster.e()/GeV, acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_etacut_abs_energy            , cluster.e()/GeV, m_eventWeight);
+    fillHisto(m_clusters_etacut_width_energy          , cluster.e()/GeV, acc_unc(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_etacut_abs_width_energy      , cluster.e()/GeV, acc_unc(cluster), m_eventWeight);  
+  }
+}
+
+void TCCPlots::fillCluster(const xAOD::CaloCluster& cluster) {
+  // here I fill the clusters
+  static SG::AuxElement::Accessor< int > acc_assTool( "ParticleCaloClusterAssociationTool" );
+  if (not acc_assTool.isAvailable(cluster)) return;
+  if (acc_assTool(cluster)==0) return;
+  
+  static SG::AuxElement::Accessor< float > acc_eta( "ClusterEta" );
+  static SG::AuxElement::Accessor< float > acc_unc( "ClusterUnc" );
+  
+  static SG::AuxElement::Accessor< float > acc_weight( "ClusterWeight" );
+  static SG::AuxElement::Accessor< float > acc_calE( "calE" );
+   
+  fillHisto(m_clusters_eta                     , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+  fillHisto(m_clusters_abs_eta                 , acc_eta(cluster), m_eventWeight);
+  fillHisto(m_clusters_width                   , acc_unc(cluster), acc_weight(cluster)*m_eventWeight);
+  fillHisto(m_clusters_abs_width               , acc_unc(cluster), m_eventWeight);
+  fillHisto(m_clusters_width_eta               , acc_eta(cluster), acc_unc(cluster), acc_weight(cluster)*m_eventWeight);
+  fillHisto(m_clusters_abs_width_eta           , acc_eta(cluster), acc_unc(cluster), m_eventWeight);
+  if (acc_calE.isAvailable(cluster)) {
+    fillHisto(m_clusters_energy                , cluster.e()/GeV, acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_energy            , cluster.e()/GeV, m_eventWeight);
+    fillHisto(m_clusters_width_energy          , cluster.e()/GeV, acc_unc(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_width_energy      , cluster.e()/GeV, acc_unc(cluster), m_eventWeight);  
+  }
+  
+  if (fabs(cluster.eta())<2.5) {
+    fillHisto(m_clusters_etacut_eta                     , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_etacut_abs_eta                 , acc_eta(cluster), m_eventWeight);
+    fillHisto(m_clusters_etacut_width                   , acc_unc(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_etacut_abs_width               , acc_unc(cluster), m_eventWeight);
+    fillHisto(m_clusters_etacut_width_eta               , acc_eta(cluster), acc_unc(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_etacut_abs_width_eta           , acc_eta(cluster), acc_unc(cluster), m_eventWeight);
+    if (acc_calE.isAvailable(cluster)) {
+      fillHisto(m_clusters_etacut_energy                , cluster.e()/GeV, acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_etacut_abs_energy            , cluster.e()/GeV, m_eventWeight);
+      fillHisto(m_clusters_etacut_width_energy          , cluster.e()/GeV, acc_unc(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_etacut_abs_width_energy      , cluster.e()/GeV, acc_unc(cluster), m_eventWeight);  
+    }
+  }  
+  
+  static SG::AuxElement::Accessor< int > acc_matched( "ClusterMatched" );
+  if (acc_matched(cluster)==1) {
+    fillHisto(m_clusters_matched_eta             , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_matched_eta         , acc_eta(cluster), m_eventWeight);
+    if (acc_calE.isAvailable(cluster)) {
+      fillHisto(m_clusters_matched_energy             , cluster.e()/GeV, acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_energy         , cluster.e()/GeV, m_eventWeight);    
+    }
+  } else {
+    fillHisto(m_clusters_notMatched_eta          , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);  
+    fillHisto(m_clusters_abs_notMatched_eta      , acc_eta(cluster), m_eventWeight);  
+    if (acc_calE.isAvailable(cluster)) {
+      fillHisto(m_clusters_notMatched_energy          , cluster.e()/GeV, acc_weight(cluster)*m_eventWeight);  
+      fillHisto(m_clusters_abs_notMatched_energy      , cluster.e()/GeV, m_eventWeight);  
+    }
+  }
+  
+  static SG::AuxElement::Accessor< int > acc_dr_fix_match( "ClusterMatchedFixedDeltaR" );
+  static SG::AuxElement::Accessor< int > acc_dr_var_match ( "ClusterMatchedVariableDeltaR" );
+  
+  
+  if (acc_dr_fix_match(cluster)==1 and acc_dr_var_match(cluster)==1) {
+    fillHisto(m_clusters_matched_eta_fix_and_var      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_matched_eta_fix_and_var  , acc_eta(cluster), m_eventWeight);
+  }
+  
+  if (acc_dr_fix_match(cluster)==1 or acc_dr_var_match(cluster)==1) {
+    fillHisto(m_clusters_matched_eta_fix_or_var      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_matched_eta_fix_or_var  , acc_eta(cluster), m_eventWeight);
+  }
+  
+  if (acc_dr_fix_match(cluster)==1) {
+    fillHisto(m_clusters_matched_eta_fix         , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_matched_eta_fix     , acc_eta(cluster), m_eventWeight);
+  } else {
+    fillHisto(m_clusters_matched_eta_notfix      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_matched_eta_notfix  , acc_eta(cluster), m_eventWeight);
+  }
+  
+  if (acc_dr_var_match(cluster)==1) {
+    fillHisto(m_clusters_matched_eta_var         , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_matched_eta_var     , acc_eta(cluster), m_eventWeight);
+  } else {
+    fillHisto(m_clusters_matched_eta_notvar      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_matched_eta_notvar  , acc_eta(cluster), m_eventWeight);
+  }
+      
+  if (acc_dr_fix_match(cluster)==0 and acc_dr_var_match(cluster)==1) {
+    fillHisto(m_clusters_matched_eta_onlyvar     , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_matched_eta_onlyvar , acc_eta(cluster), m_eventWeight);
+  }
+  
+  if (acc_dr_fix_match(cluster)==1 and acc_dr_var_match(cluster)==0) {
+    fillHisto(m_clusters_matched_eta_onlyfix     , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_matched_eta_onlyfix , acc_eta(cluster), m_eventWeight);
+  }
+  
+  if (acc_dr_fix_match(cluster)==0 and acc_dr_var_match(cluster)==0) {
+    fillHisto(m_clusters_matched_eta_none        , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+    fillHisto(m_clusters_abs_matched_eta_none    , acc_eta(cluster), m_eventWeight);
+  }
+  
+  // match with tracks from PV0
+  static SG::AuxElement::Accessor< int > acc_dr_fix_PV0( "FixedMatchPV0" );
+  static SG::AuxElement::Accessor< int > acc_dr_var_PV0( "VarMatchPV0"   );
+  
+  if (acc_dr_fix_PV0.isAvailable(cluster) and acc_dr_var_PV0.isAvailable(cluster)) {
+    bool matchFix = (acc_dr_fix_match(cluster)==1 and acc_dr_fix_PV0(cluster)==1);
+    bool matchVar = (acc_dr_var_match(cluster)==1 and acc_dr_var_PV0(cluster)==1);
+    
+    if (matchFix and matchVar) {
+      fillHisto(m_clusters_matched_pv0_eta_fix_and_var      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pv0_eta_fix_and_var  , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (matchFix or matchVar) {
+      fillHisto(m_clusters_matched_pv0_eta_fix_or_var      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pv0_eta_fix_or_var  , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (matchFix) {
+      fillHisto(m_clusters_matched_pv0_eta_fix         , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pv0_eta_fix     , acc_eta(cluster), m_eventWeight);
+    } else {
+      fillHisto(m_clusters_matched_pv0_eta_notfix      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pv0_eta_notfix  , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (matchVar) {
+      fillHisto(m_clusters_matched_pv0_eta_var         , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pv0_eta_var     , acc_eta(cluster), m_eventWeight);
+    } else {
+      fillHisto(m_clusters_matched_pv0_eta_notvar      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pv0_eta_notvar  , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (not matchFix and matchVar) {
+      fillHisto(m_clusters_matched_pv0_eta_onlyvar     , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pv0_eta_onlyvar , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (matchFix and not matchVar) {
+      fillHisto(m_clusters_matched_pv0_eta_onlyfix     , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pv0_eta_onlyfix , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (not matchFix and not matchVar) {
+      fillHisto(m_clusters_matched_pv0_eta_none        , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pv0_eta_none    , acc_eta(cluster), m_eventWeight);
+    }
+  }  
+  
+  // match with tracks from PVX
+  static SG::AuxElement::Accessor< int > acc_dr_fix_PVX( "FixedMatchPVX" );
+  static SG::AuxElement::Accessor< int > acc_dr_var_PVX( "VarMatchPVX"   );
+  
+  if (acc_dr_fix_PVX.isAvailable(cluster) and acc_dr_var_PVX.isAvailable(cluster)
+    and acc_dr_fix_PV0.isAvailable(cluster) and acc_dr_var_PV0.isAvailable(cluster)) {
+    bool matchFix = (acc_dr_fix_match(cluster)==1 and acc_dr_fix_PVX(cluster)==1 and acc_dr_fix_PV0(cluster)==0);
+    bool matchVar = (acc_dr_var_match(cluster)==1 and acc_dr_var_PVX(cluster)==1 and acc_dr_var_PV0(cluster)==0);
+    
+    if (matchFix and matchVar) {
+      fillHisto(m_clusters_matched_pvx_eta_fix_and_var      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pvx_eta_fix_and_var  , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (matchFix or matchVar) {
+      fillHisto(m_clusters_matched_pvx_eta_fix_or_var      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pvx_eta_fix_or_var  , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (matchFix) {
+      fillHisto(m_clusters_matched_pvx_eta_fix         , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pvx_eta_fix     , acc_eta(cluster), m_eventWeight);
+    } else {
+      fillHisto(m_clusters_matched_pvx_eta_notfix      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pvx_eta_notfix  , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (matchVar) {
+      fillHisto(m_clusters_matched_pvx_eta_var         , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pvx_eta_var     , acc_eta(cluster), m_eventWeight);
+    } else {
+      fillHisto(m_clusters_matched_pvx_eta_notvar      , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pvx_eta_notvar  , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (not matchFix and matchVar) {
+      fillHisto(m_clusters_matched_pvx_eta_onlyvar     , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pvx_eta_onlyvar , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (matchFix and not matchVar) {
+      fillHisto(m_clusters_matched_pvx_eta_onlyfix     , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pvx_eta_onlyfix , acc_eta(cluster), m_eventWeight);
+    }
+    
+    if (not matchFix and not matchVar) {
+      fillHisto(m_clusters_matched_pvx_eta_none        , acc_eta(cluster), acc_weight(cluster)*m_eventWeight);
+      fillHisto(m_clusters_abs_matched_pvx_eta_none    , acc_eta(cluster), m_eventWeight);
+    }
+  }  
+  
+  static SG::AuxElement::Accessor< int > acc_neutral( "isNeutral" );
+  static SG::AuxElement::Accessor< float > acc_pt_fraction( "ptFraction" );
+  static SG::AuxElement::Accessor< int > acc_rejected( "isRejected" );
+  static SG::AuxElement::Accessor< int > acc_isPV0( "isPV0" );
+  static SG::AuxElement::Accessor< int > acc_isPVX( "isPVX" );
+  
+  if (acc_calE.isAvailable(cluster) and acc_neutral.isAvailable(cluster) and acc_neutral(cluster)==1) {
+    fillHisto(m_clusters_pt_fraction_e, cluster.e()/GeV, acc_pt_fraction(cluster), m_eventWeight);
+    if (acc_isPV0(cluster)==1)
+      fillHisto(m_clusters_PV0_pt_fraction_e, cluster.e()/GeV, acc_pt_fraction(cluster), m_eventWeight);
+    else
+      fillHisto(m_clusters_PVX_pt_fraction_e, cluster.e()/GeV, acc_pt_fraction(cluster), m_eventWeight);
+    if (acc_rejected(cluster)==1)
+      fillHisto(m_clusters_rejected_pt_fraction_e, cluster.e()/GeV, acc_pt_fraction(cluster), m_eventWeight);
+  
+    fillHisto(m_clusters_all_neutral_e           , cluster.e()/GeV , m_eventWeight);
+    if (acc_isPV0(cluster)==1)
+      fillHisto(m_clusters_all_neutral_PV0_e     , cluster.e()/GeV , m_eventWeight);
+    else if (acc_isPVX(cluster)==1)                                                        
+      fillHisto(m_clusters_all_neutral_notPV0_e  , cluster.e()/GeV , m_eventWeight);
+    else 
+      fillHisto(m_clusters_all_neutral_neutral_e , cluster.e()/GeV , m_eventWeight);
+    
+    fillHisto(m_clusters_all_neutral_eta          , acc_eta(cluster), m_eventWeight);
+    if (acc_isPV0(cluster)==1)
+      fillHisto(m_clusters_all_neutral_PV0_eta    , acc_eta(cluster), m_eventWeight);
+    else if (acc_isPVX(cluster)==1)
+      fillHisto(m_clusters_all_neutral_notPV0_eta , acc_eta(cluster), m_eventWeight);
+    else
+      fillHisto(m_clusters_all_neutral_neutral_eta, acc_eta(cluster), m_eventWeight);
+    
+  }  
+}
+
+void TCCPlots::fillTCCptCut(const xAOD::TrackCaloCluster& tcc) {
+    fillHisto(m_tcc_eta_ptcut      , tcc.eta()   , m_eventWeight);
+    fillHisto(m_tcc_taste_eta_ptcut, tcc.eta(), tcc.taste(), m_eventWeight);
+}
+
+void TCCPlots::fillTCCetaCut(const xAOD::TrackCaloCluster& tcc) {
+    fillHisto(m_tcc_pt_etacut      , tcc.pt()/GeV, m_eventWeight);
+    fillHisto(m_tcc_taste_pt_etacut, tcc.pt()/GeV, tcc.taste(), m_eventWeight);
+}
+
+void TCCPlots::fillTCC(const xAOD::TrackCaloCluster& tcc, std::vector<const xAOD::TrackParticle*>& alltracksPV0) {
+    fillHisto(m_tcc_eta  , tcc.eta()   , m_eventWeight);
+    fillHisto(m_tcc_phi  , tcc.phi()   , m_eventWeight);
+    fillHisto(m_tcc_pt   , tcc.pt()/GeV, m_eventWeight);
+    fillHisto(m_tcc_m    , tcc.m()/GeV , m_eventWeight);
+    fillHisto(m_tcc_taste, tcc.taste() , m_eventWeight);
+    fillHisto(m_tcc_taste_eta, tcc.eta()     , tcc.taste(), m_eventWeight);
+    fillHisto(m_tcc_taste_pt , tcc.pt()/GeV  , tcc.taste(), m_eventWeight);
+    
+    const xAOD::TrackParticle* track = getTrackParticlePtr(tcc);
+    if (track) {
+      fillHisto(m_tcc_pt_pseudoresponse, tcc.pt()/track->pt()          , m_eventWeight);
+      fillHisto(m_tcc_pt_track_pt, tcc.pt()/GeV, track->pt()/GeV , m_eventWeight);
+      
+      const xAOD::TruthParticle* assTruth = getTruthPtr(*track);
+      if (assTruth) {
+	fillHisto(m_tcc_pt_response, tcc.pt()/assTruth->pt()          , m_eventWeight);
+	fillHisto(m_tcc_pt_truth_pt, tcc.pt()/GeV, assTruth->pt()/GeV , m_eventWeight);
+	
+        fillHisto(m_trk_tcc_reco_pt_truth_pt, track->pt()/GeV, assTruth->pt()/GeV, m_eventWeight);
+        fillHisto(m_trk_tcc_reco_pt_response, track->pt()/assTruth->pt()         , m_eventWeight);
+      }
+      
+      
+      //- There is one track matching a given number of clusters , N : size of the caloClusterLinks()
+      //- Each of those clusters matches a given number of tracks, M : size of MatchingTracks
+      //std::cout << "Size of the cluster vector: "<< tcc.caloClusterLinks().size() << std::endl;    
+      
+      static SG::AuxElement::Accessor< float > acc_unc( "ClusterUnc" );
+
+      if (tcc.caloClusterLinks().size()) {
+	int N = tcc.caloClusterLinks().size();
+// 	std::cout << "N = " << N << std::endl;
+	for (size_t c = 0; c < tcc.caloClusterLinks().size(); ++c) {
+	  const xAOD::CaloCluster* cluster = *(tcc.caloClusterLinks().at(c));
+// 	  std::cout << "cluster " << c << " --> " << cluster->eta() << ", " << cluster->phi() << "   ----   " << acc_unc(*cluster) << std::endl;
+	  static SG::AuxElement::Accessor< std::vector<ElementLink<xAOD::TrackParticleContainer>> > acc_links( "MatchingTracks" );
+	  if (acc_links.isAvailable(*cluster)) {
+	    int M = acc_links(*cluster).size();
+	    //std::cout << "Size of the track vector: "<< acc_links(*cluster).size() << std::endl;  
+	    fillHisto(m_tcc_N_M, N, M, m_eventWeight);
+	    int MPV0 = 0;
+	    for (size_t t = 0; t < acc_links(*cluster).size(); ++t) {
+	      const xAOD::TrackParticle* track = *(acc_links(*cluster).at(t));
+	      if (std::find(alltracksPV0.begin(), alltracksPV0.end(), track) != alltracksPV0.end()) {
+		MPV0++;
+// 		std::cout << "PV0 track " << t << " --> " << track->pt() << ", " << track->eta() << ", " << track->phi() << ", " << track->m() << std::endl;
+	      } 
+// 		else std::cout << "PVX track " << t << " --> " << track->pt() << ", " << track->eta() << ", " << track->phi() << ", " << track->m() << std::endl; 
+	    }
+	    fillHisto(m_tcc_N_M_pv0, N, MPV0, m_eventWeight);
+// 	    std::cout << "M PV0  = " << MPV0 << " ---- M = " << M << std::endl;
+	  }
+	} // for caloClusterLinks
+      } // if caloClusterLinks().size
+    }
+}
+
+void TCCPlots::finalizePlots() {
+  if (m_collectionType!= "")
+    std::cout << "Finalising " << m_collectionType << " in folder " << m_folder << std::endl;
+  
+  if (m_collectionType == "jets") {
+    
+    std::vector < TH2* > th2f = { m_jet_response_m_pt, m_jet_response_m_pt_2leadings, 
+      m_jet_response_m_pt_leading, m_jet_response_m_pt_subleading, 
+      m_jet_response_d2_pt, m_jet_response_d2_pt_2leadings, 
+      m_jet_response_d2_pt_leading, m_jet_response_d2_pt_subleading,
+      m_jet_response_add_d2_pt, m_jet_response_add_d2_pt_2leadings, 
+      m_jet_response_add_d2_pt_leading, m_jet_response_add_d2_pt_subleading,
+      m_jet_response_add_eta_pt, m_jet_response_add_eta_pt_2leadings, 
+      m_jet_response_add_eta_pt_leading, m_jet_response_add_eta_pt_subleading      
+    };
+      
+    std::vector < TH3* > th3f = { m_jet_mopt_pt_response_m, m_jet_mopt_pt_response_m_2leadings,
+      m_jet_mopt_pt_response_m_leading, m_jet_mopt_pt_response_m_subleading,
+      m_jet_mopt_pt_response_pt, m_jet_mopt_pt_response_pt_2leadings,
+      m_jet_mopt_pt_response_pt_leading, m_jet_mopt_pt_response_pt_subleading,
+      m_jet_mopt_pt_response_eta, m_jet_mopt_pt_response_eta_2leadings, 
+      m_jet_mopt_pt_response_eta_leading, m_jet_mopt_pt_response_eta_subleading, 
+      m_jet_mopt_pt_response_phi, m_jet_mopt_pt_response_phi_2leadings,
+      m_jet_mopt_pt_response_phi_leading, m_jet_mopt_pt_response_phi_subleading,
+      m_jet_mopt_pt_response_d2, m_jet_mopt_pt_response_d2_2leadings,
+      m_jet_mopt_pt_response_d2_leading, m_jet_mopt_pt_response_d2_subleading };
+      
+    for ( auto& histo : th2f ) {
+      for (int j = 1; j <= histo->GetNbinsY(); j++)
+	for (int i = 1; i <= histo->GetNbinsX(); i++) 
+	  histo->SetBinContent(i,j,histo->GetBinContent(i,j)/(histo->GetXaxis()->GetBinWidth(i)*histo->GetYaxis()->GetBinWidth(j)));
+    }
+    
+    for ( auto& histo : th3f ) {
+      for (int k = 1; k <= histo->GetNbinsZ(); k++)
+	for (int j = 1; j <= histo->GetNbinsY(); j++)
+	  for (int i = 1; i <= histo->GetNbinsX(); i++) 
+	    histo->SetBinContent(i,j,k,histo->GetBinContent(i,j,k)/(histo->GetXaxis()->GetBinWidth(i)*histo->GetYaxis()->GetBinWidth(j)*histo->GetZaxis()->GetBinWidth(k)));
+    }
+
+    make_median(m_jet_response_m_pt                      , m_jet_resolution_m            );
+    make_median(m_jet_response_m_pt_2leadings            , m_jet_resolution_m_2leadings  );  
+    make_median(m_jet_response_m_pt_leading              , m_jet_resolution_m_leading    );
+    make_median(m_jet_response_m_pt_subleading           , m_jet_resolution_m_subleading );
+    
+    make_median(m_jet_response_d2_pt                     , m_jet_resolution_d2            );
+    make_median(m_jet_response_d2_pt_2leadings           , m_jet_resolution_d2_2leadings  );  
+    make_median(m_jet_response_d2_pt_leading             , m_jet_resolution_d2_leading    );
+    make_median(m_jet_response_d2_pt_subleading          , m_jet_resolution_d2_subleading );
+    
+    make_median_add(m_jet_response_add_d2_pt             , m_jet_resolution_add_d2            );
+    make_median_add(m_jet_response_add_d2_pt_2leadings   , m_jet_resolution_add_d2_2leadings  );  
+    make_median_add(m_jet_response_add_d2_pt_leading     , m_jet_resolution_add_d2_leading    );
+    make_median_add(m_jet_response_add_d2_pt_subleading  , m_jet_resolution_add_d2_subleading );
+    
+    make_median(m_jet_mopt_pt_response_m                 , m_jet_resolution_mopt_pt_m               );
+    make_median(m_jet_mopt_pt_response_m_2leadings       , m_jet_resolution_mopt_pt_m_2leadings     );
+    
+    make_median(m_jet_mopt_pt_response_m_leading         , m_jet_resolution_mopt_pt_m_leading       );
+    make_median(m_jet_mopt_pt_response_m_subleading      , m_jet_resolution_mopt_pt_m_subleading    );
+    
+    make_median(m_jet_mopt_pt_response_pt                , m_jet_resolution_mopt_pt_pt              );
+    make_median(m_jet_mopt_pt_response_pt_2leadings      , m_jet_resolution_mopt_pt_pt_2leadings    );
+    make_median(m_jet_mopt_pt_response_pt_leading        , m_jet_resolution_mopt_pt_pt_leading      );
+    make_median(m_jet_mopt_pt_response_pt_subleading     , m_jet_resolution_mopt_pt_pt_subleading   );
+    
+    make_median(m_jet_mopt_pt_response_eta               , m_jet_resolution_mopt_pt_eta             );
+    make_median(m_jet_mopt_pt_response_eta_2leadings     , m_jet_resolution_mopt_pt_eta_2leadings   );
+    make_median(m_jet_mopt_pt_response_eta_leading       , m_jet_resolution_mopt_pt_eta_leading     );
+    make_median(m_jet_mopt_pt_response_eta_subleading    , m_jet_resolution_mopt_pt_eta_subleading  );
+    
+    make_median(m_jet_mopt_pt_response_phi               , m_jet_resolution_mopt_pt_phi             );
+    make_median(m_jet_mopt_pt_response_phi_2leadings     , m_jet_resolution_mopt_pt_phi_2leadings   );
+    make_median(m_jet_mopt_pt_response_phi_leading       , m_jet_resolution_mopt_pt_phi_leading     );
+    make_median(m_jet_mopt_pt_response_phi_subleading    , m_jet_resolution_mopt_pt_phi_subleading  );
+    
+    make_median(m_jet_mopt_pt_response_d2                , m_jet_resolution_mopt_pt_d2              );
+    make_median(m_jet_mopt_pt_response_d2_2leadings      , m_jet_resolution_mopt_pt_d2_2leadings    );
+    make_median(m_jet_mopt_pt_response_d2_leading        , m_jet_resolution_mopt_pt_d2_leading      );
+    make_median(m_jet_mopt_pt_response_d2_subleading     , m_jet_resolution_mopt_pt_d2_subleading   );  
+    
+    make_median(m_jet_response_m_npv                      , m_jet_resolution_m_npv            , m_jet_median_width_m_npv           );
+    make_median(m_jet_response_m_npv_2leadings            , m_jet_resolution_m_npv_2leadings  , m_jet_median_width_m_npv_2leadings );  
+    make_median(m_jet_response_m_npv_leading              , m_jet_resolution_m_npv_leading    , m_jet_median_width_m_npv_leading   );
+    make_median(m_jet_response_m_npv_subleading           , m_jet_resolution_m_npv_subleading , m_jet_median_width_m_npv_subleading);
+        
+  
+  } else if (m_collectionType == "tracks") {
+    //pt + prod radius th2
+    std::vector < TH2* > th2f = { m_trk_d0_pt, m_trk_z0_pt, m_trk_theta_pt, m_trk_phi_pt, m_trk_qOverP_pt, 
+      m_trk_caloEntryEtaOverEta_pt, m_trk_caloEntryUncEta_pt, m_trk_caloEntryUncTheta_pt, m_trk_caloEntryPhiOverPhi_pt,
+      m_trk_caloEntryUncPhi_pt, m_trk_caloEntryUncTot_pt, m_trk_pv0_caloEntryUncTot_pt, m_trk_pv0_caloEntryUncTot_truthpt,
+      m_trk_pv0_caloEntryUncTot_pt_0SiHits, m_trk_perigeeUncEta_pt, m_trk_perigeeUncTheta_pt, 
+      m_trk_perigeeUncPhi_pt, m_trk_perigeeUncTot_pt, m_trk_delta_perigeeEta_caloEntryEta_pt, 
+      m_trk_delta_perigeePhi_caloEntryPhi_pt, m_trk_delta_trackEta_caloEntryEta_pt, m_trk_delta_trackPhi_caloEntryPhi_pt,
+      m_trk_delta_trackEta_caloEntryEtaCorr_pt, m_trk_delta_trackPhi_caloEntryPhiCorr_pt, 
+      m_trk_delta_caloEntryEta_caloEntryEtaCorr_pt, m_trk_delta_caloEntryPhi_caloEntryPhiCorr_pt,
+      m_trk_matching_deltar_or_clusters_pt, m_trk_matching_deltar_and_clusters_pt, 
+      m_trk_matching_deltar_fix_only_clusters_pt, m_trk_matching_deltar_var_only_clusters_pt, m_trk_total_clusters_pt,
+      m_trk_notMatching_deltar_fix_caloEntryUncTot_pt, m_trk_notMatching_deltar_var_caloEntryUncTot_pt, 
+      m_trk_notMatching_deltar_none_caloEntryUncTot_pt,
+      m_trk_perigeeUncEta_prodRadius, m_trk_perigeeUncTheta_prodRadius, m_trk_perigeeUncPhi_prodRadius,
+      m_trk_perigeeUncTot_prodRadius, m_trk_caloEntryUncEta_prodRadius, m_trk_caloEntryUncTheta_prodRadius,
+      m_trk_caloEntryUncPhi_prodRadius, m_trk_caloEntryUncTot_prodRadius, 
+      m_trk_notMatching_deltar_fix_caloEntryUncTot_prodRadius, m_trk_notMatching_deltar_var_caloEntryUncTot_prodRadius, 
+      m_trk_notMatching_deltar_none_caloEntryUncTot_prodRadius };
+
+    //pt + prod radius th1
+    std::vector < TH1* > th1f = { m_trk_total_pt, m_trk_notMatching_deltar_fix_pt,
+      m_trk_notMatching_deltar_var_pt, m_trk_notMatching_deltar_none_pt, m_trk_prodRadius,
+      m_trk_matching_deltar_fix_and_var_pt, m_trk_matching_deltar_fix_or_var_pt, 
+      m_trk_matching_deltar_fix_pt, m_trk_matching_deltar_var_pt, 
+      m_trk_matching_deltar_onlyfix_pt, m_trk_matching_deltar_onlyvar_pt,
+      m_trk_pv0_total_pt, m_trk_pv0_notMatching_deltar_fix_pt,
+      m_trk_pv0_notMatching_deltar_var_pt, m_trk_pv0_notMatching_deltar_none_pt,
+      m_trk_pv0_matching_deltar_fix_and_var_pt, m_trk_pv0_matching_deltar_fix_or_var_pt, 
+      m_trk_pv0_matching_deltar_fix_pt, m_trk_pv0_matching_deltar_var_pt, 
+      m_trk_pv0_matching_deltar_onlyfix_pt, m_trk_pv0_matching_deltar_onlyvar_pt,
+    };
+      
+     
+    for ( auto& histo : th2f ) {
+      for (int j = 1; j <= histo->GetNbinsY(); j++)
+	for (int i = 1; i <= histo->GetNbinsX(); i++) 
+	  histo->SetBinContent(i,j,histo->GetBinContent(i,j)/(histo->GetXaxis()->GetBinWidth(i)*histo->GetYaxis()->GetBinWidth(j)));
+    }
+     
+    for ( auto& histo : th1f ) {
+      for (int i = 1; i <= histo->GetNbinsX(); i++)
+	histo->SetBinContent(i,histo->GetBinContent(i)/histo->GetBinWidth(i));       
+    }
+    
+    m_trk_matchedFraction_eta_fix_and_var ->Divide( m_trk_matching_deltar_fix_and_var_eta    , m_trk_total_eta, 1., 1., "B");
+    m_trk_matchedFraction_eta_fix_or_var  ->Divide( m_trk_matching_deltar_fix_or_var_eta     , m_trk_total_eta, 1., 1., "B");
+    m_trk_matchedFraction_eta_fix         ->Divide( m_trk_matching_deltar_fix_eta            , m_trk_total_eta, 1., 1., "B");
+    m_trk_matchedFraction_eta_notfix      ->Divide( m_trk_notMatching_deltar_fix_eta         , m_trk_total_eta, 1., 1., "B");
+    m_trk_matchedFraction_eta_var         ->Divide( m_trk_matching_deltar_var_eta            , m_trk_total_eta, 1., 1., "B");
+    m_trk_matchedFraction_eta_notvar      ->Divide( m_trk_notMatching_deltar_var_eta         , m_trk_total_eta, 1., 1., "B");
+    m_trk_matchedFraction_eta_onlyvar     ->Divide( m_trk_matching_deltar_onlyvar_eta        , m_trk_total_eta, 1., 1., "B");
+    m_trk_matchedFraction_eta_onlyfix     ->Divide( m_trk_matching_deltar_onlyfix_eta        , m_trk_total_eta, 1., 1., "B");
+    m_trk_matchedFraction_eta_none        ->Divide( m_trk_notMatching_deltar_none_eta        , m_trk_total_eta, 1., 1., "B");
+    
+    m_trk_matchedFraction_pt_fix_and_var  ->Divide( m_trk_matching_deltar_fix_and_var_pt     , m_trk_total_pt , 1., 1., "B");
+    m_trk_matchedFraction_pt_fix_or_var   ->Divide( m_trk_matching_deltar_fix_or_var_pt      , m_trk_total_pt , 1., 1., "B");
+    m_trk_matchedFraction_pt_fix          ->Divide( m_trk_matching_deltar_fix_pt             , m_trk_total_pt , 1., 1., "B");
+    m_trk_matchedFraction_pt_notfix       ->Divide( m_trk_notMatching_deltar_fix_pt          , m_trk_total_pt , 1., 1., "B");
+    m_trk_matchedFraction_pt_var          ->Divide( m_trk_matching_deltar_var_pt             , m_trk_total_pt , 1., 1., "B");
+    m_trk_matchedFraction_pt_notvar       ->Divide( m_trk_notMatching_deltar_var_pt          , m_trk_total_pt , 1., 1., "B");
+    m_trk_matchedFraction_pt_onlyvar      ->Divide( m_trk_matching_deltar_onlyvar_pt         , m_trk_total_pt , 1., 1., "B");
+    m_trk_matchedFraction_pt_onlyfix      ->Divide( m_trk_matching_deltar_onlyfix_pt         , m_trk_total_pt , 1., 1., "B");
+    m_trk_matchedFraction_pt_none         ->Divide( m_trk_notMatching_deltar_none_pt         , m_trk_total_pt , 1., 1., "B");
+    
+    m_trk_pv0_matchedFraction_eta_fix_and_var ->Divide( m_trk_pv0_matching_deltar_fix_and_var_eta    , m_trk_pv0_total_eta, 1., 1., "B");
+    m_trk_pv0_matchedFraction_eta_fix_or_var  ->Divide( m_trk_pv0_matching_deltar_fix_or_var_eta     , m_trk_pv0_total_eta, 1., 1., "B");
+    m_trk_pv0_matchedFraction_eta_fix         ->Divide( m_trk_pv0_matching_deltar_fix_eta            , m_trk_pv0_total_eta, 1., 1., "B");
+    m_trk_pv0_matchedFraction_eta_notfix      ->Divide( m_trk_pv0_notMatching_deltar_fix_eta         , m_trk_pv0_total_eta, 1., 1., "B");
+    m_trk_pv0_matchedFraction_eta_var         ->Divide( m_trk_pv0_matching_deltar_var_eta            , m_trk_pv0_total_eta, 1., 1., "B");
+    m_trk_pv0_matchedFraction_eta_notvar      ->Divide( m_trk_pv0_notMatching_deltar_var_eta         , m_trk_pv0_total_eta, 1., 1., "B");
+    m_trk_pv0_matchedFraction_eta_onlyvar     ->Divide( m_trk_pv0_matching_deltar_onlyvar_eta        , m_trk_pv0_total_eta, 1., 1., "B");
+    m_trk_pv0_matchedFraction_eta_onlyfix     ->Divide( m_trk_pv0_matching_deltar_onlyfix_eta        , m_trk_pv0_total_eta, 1., 1., "B");
+    m_trk_pv0_matchedFraction_eta_none        ->Divide( m_trk_pv0_notMatching_deltar_none_eta        , m_trk_pv0_total_eta, 1., 1., "B");
+         
+    m_trk_pv0_matchedFraction_pt_fix_and_var  ->Divide( m_trk_pv0_matching_deltar_fix_and_var_pt     , m_trk_pv0_total_pt , 1., 1., "B");
+    m_trk_pv0_matchedFraction_pt_fix_or_var   ->Divide( m_trk_pv0_matching_deltar_fix_or_var_pt      , m_trk_pv0_total_pt , 1., 1., "B");
+    m_trk_pv0_matchedFraction_pt_fix          ->Divide( m_trk_pv0_matching_deltar_fix_pt             , m_trk_pv0_total_pt , 1., 1., "B");
+    m_trk_pv0_matchedFraction_pt_notfix       ->Divide( m_trk_pv0_notMatching_deltar_fix_pt          , m_trk_pv0_total_pt , 1., 1., "B");
+    m_trk_pv0_matchedFraction_pt_var          ->Divide( m_trk_pv0_matching_deltar_var_pt             , m_trk_pv0_total_pt , 1., 1., "B");
+    m_trk_pv0_matchedFraction_pt_notvar       ->Divide( m_trk_pv0_notMatching_deltar_var_pt          , m_trk_pv0_total_pt , 1., 1., "B");
+    m_trk_pv0_matchedFraction_pt_onlyvar      ->Divide( m_trk_pv0_matching_deltar_onlyvar_pt         , m_trk_pv0_total_pt , 1., 1., "B");
+    m_trk_pv0_matchedFraction_pt_onlyfix      ->Divide( m_trk_pv0_matching_deltar_onlyfix_pt         , m_trk_pv0_total_pt , 1., 1., "B");
+    m_trk_pv0_matchedFraction_pt_none         ->Divide( m_trk_pv0_notMatching_deltar_none_pt         , m_trk_pv0_total_pt , 1., 1., "B");
+    
+  } else if (m_collectionType == "clusters") {
+    
+    m_clusters_matchedFraction_eta             ->Divide(m_clusters_matched_eta             , m_clusters_eta, 1., 1., "B");
+    m_clusters_notMatchedFraction_eta          ->Divide(m_clusters_notMatched_eta          , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedFraction_energy          ->Divide(m_clusters_matched_energy          , m_clusters_energy, 1., 1., "B");
+    m_clusters_notMatchedFraction_energy       ->Divide(m_clusters_notMatched_energy       , m_clusters_energy, 1., 1., "B");
+    m_clusters_matchedFraction_eta_fix_and_var ->Divide(m_clusters_matched_eta_fix_and_var , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedFraction_eta_fix_or_var  ->Divide(m_clusters_matched_eta_fix_or_var  , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedFraction_eta_fix         ->Divide(m_clusters_matched_eta_fix         , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedFraction_eta_notfix      ->Divide(m_clusters_matched_eta_notfix      , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedFraction_eta_var         ->Divide(m_clusters_matched_eta_var         , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedFraction_eta_notvar      ->Divide(m_clusters_matched_eta_notvar      , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedFraction_eta_onlyvar     ->Divide(m_clusters_matched_eta_onlyvar     , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedFraction_eta_onlyfix     ->Divide(m_clusters_matched_eta_onlyfix     , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedFraction_eta_none        ->Divide(m_clusters_matched_eta_none        , m_clusters_eta, 1., 1., "B");
+            
+    m_clusters_abs_matchedFraction_eta             ->Divide(m_clusters_abs_matched_eta             , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_notMatchedFraction_eta          ->Divide(m_clusters_abs_notMatched_eta          , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedFraction_energy          ->Divide(m_clusters_abs_matched_energy          , m_clusters_abs_energy, 1., 1., "B");
+    m_clusters_abs_notMatchedFraction_energy       ->Divide(m_clusters_abs_notMatched_energy       , m_clusters_abs_energy, 1., 1., "B");
+    m_clusters_abs_matchedFraction_eta_fix_and_var ->Divide(m_clusters_abs_matched_eta_fix_and_var , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedFraction_eta_fix_or_var  ->Divide(m_clusters_abs_matched_eta_fix_or_var  , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedFraction_eta_fix         ->Divide(m_clusters_abs_matched_eta_fix         , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedFraction_eta_notfix      ->Divide(m_clusters_abs_matched_eta_notfix      , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedFraction_eta_var         ->Divide(m_clusters_abs_matched_eta_var         , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedFraction_eta_notvar      ->Divide(m_clusters_abs_matched_eta_notvar      , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedFraction_eta_onlyvar     ->Divide(m_clusters_abs_matched_eta_onlyvar     , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedFraction_eta_onlyfix     ->Divide(m_clusters_abs_matched_eta_onlyfix     , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedFraction_eta_none        ->Divide(m_clusters_abs_matched_eta_none        , m_clusters_abs_eta, 1., 1., "B");
+    
+    m_clusters_matchedpv0Fraction_eta_fix_and_var ->Divide(m_clusters_matched_pv0_eta_fix_and_var , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpv0Fraction_eta_fix_or_var  ->Divide(m_clusters_matched_pv0_eta_fix_or_var  , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpv0Fraction_eta_fix         ->Divide(m_clusters_matched_pv0_eta_fix         , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpv0Fraction_eta_notfix      ->Divide(m_clusters_matched_pv0_eta_notfix      , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpv0Fraction_eta_var         ->Divide(m_clusters_matched_pv0_eta_var         , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpv0Fraction_eta_notvar      ->Divide(m_clusters_matched_pv0_eta_notvar      , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpv0Fraction_eta_onlyvar     ->Divide(m_clusters_matched_pv0_eta_onlyvar     , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpv0Fraction_eta_onlyfix     ->Divide(m_clusters_matched_pv0_eta_onlyfix     , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpv0Fraction_eta_none        ->Divide(m_clusters_matched_pv0_eta_none        , m_clusters_eta, 1., 1., "B");
+    
+    m_clusters_abs_matchedpv0Fraction_eta_fix_and_var ->Divide(m_clusters_abs_matched_pv0_eta_fix_and_var , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpv0Fraction_eta_fix_or_var  ->Divide(m_clusters_abs_matched_pv0_eta_fix_or_var  , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpv0Fraction_eta_fix         ->Divide(m_clusters_abs_matched_pv0_eta_fix         , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpv0Fraction_eta_notfix      ->Divide(m_clusters_abs_matched_pv0_eta_notfix      , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpv0Fraction_eta_var         ->Divide(m_clusters_abs_matched_pv0_eta_var         , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpv0Fraction_eta_notvar      ->Divide(m_clusters_abs_matched_pv0_eta_notvar      , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpv0Fraction_eta_onlyvar     ->Divide(m_clusters_abs_matched_pv0_eta_onlyvar     , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpv0Fraction_eta_onlyfix     ->Divide(m_clusters_abs_matched_pv0_eta_onlyfix     , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpv0Fraction_eta_none        ->Divide(m_clusters_abs_matched_pv0_eta_none        , m_clusters_abs_eta, 1., 1., "B");
+    
+    m_clusters_matchedpvxFraction_eta_fix_and_var ->Divide(m_clusters_matched_pvx_eta_fix_and_var , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpvxFraction_eta_fix_or_var  ->Divide(m_clusters_matched_pvx_eta_fix_or_var  , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpvxFraction_eta_fix         ->Divide(m_clusters_matched_pvx_eta_fix         , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpvxFraction_eta_notfix      ->Divide(m_clusters_matched_pvx_eta_notfix      , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpvxFraction_eta_var         ->Divide(m_clusters_matched_pvx_eta_var         , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpvxFraction_eta_notvar      ->Divide(m_clusters_matched_pvx_eta_notvar      , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpvxFraction_eta_onlyvar     ->Divide(m_clusters_matched_pvx_eta_onlyvar     , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpvxFraction_eta_onlyfix     ->Divide(m_clusters_matched_pvx_eta_onlyfix     , m_clusters_eta, 1., 1., "B");
+    m_clusters_matchedpvxFraction_eta_none        ->Divide(m_clusters_matched_pvx_eta_none        , m_clusters_eta, 1., 1., "B");
+    
+    m_clusters_abs_matchedpvxFraction_eta_fix_and_var ->Divide(m_clusters_abs_matched_pvx_eta_fix_and_var , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpvxFraction_eta_fix_or_var  ->Divide(m_clusters_abs_matched_pvx_eta_fix_or_var  , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpvxFraction_eta_fix         ->Divide(m_clusters_abs_matched_pvx_eta_fix         , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpvxFraction_eta_notfix      ->Divide(m_clusters_abs_matched_pvx_eta_notfix      , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpvxFraction_eta_var         ->Divide(m_clusters_abs_matched_pvx_eta_var         , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpvxFraction_eta_notvar      ->Divide(m_clusters_abs_matched_pvx_eta_notvar      , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpvxFraction_eta_onlyvar     ->Divide(m_clusters_abs_matched_pvx_eta_onlyvar     , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpvxFraction_eta_onlyfix     ->Divide(m_clusters_abs_matched_pvx_eta_onlyfix     , m_clusters_abs_eta, 1., 1., "B");
+    m_clusters_abs_matchedpvxFraction_eta_none        ->Divide(m_clusters_abs_matched_pvx_eta_none        , m_clusters_abs_eta, 1., 1., "B");
+  
+  } else if (m_collectionType == "tccs") {
+    std::vector < TH2* > th2f = { m_tcc_taste_pt, m_tcc_taste_pt_etacut,
+      m_tcc_pt_track_pt, m_trk_tcc_reco_pt_truth_pt, m_tcc_pt_truth_pt };
+
+    //pt + prod radius th1
+    std::vector < TH1* > th1f = { m_tcc_pt, m_tcc_pt_etacut };
+
+    for ( auto& histo : th2f ) {
+      for (int j = 1; j <= histo->GetNbinsY(); j++)
+	for (int i = 1; i <= histo->GetNbinsX(); i++)
+	  histo->SetBinContent(i,j,histo->GetBinContent(i,j)/(histo->GetXaxis()->GetBinWidth(i)*histo->GetYaxis()->GetBinWidth(j)));
+    }
+     
+    for ( auto& histo : th1f ) {
+      for (int i = 1; i <= histo->GetNbinsX(); i++)
+	histo->SetBinContent(i,histo->GetBinContent(i)/histo->GetBinWidth(i));       
+    }
+  } else return;
+  
+}
+
+void TCCPlots::make_median(TH2* h2_response, TH1* h1_resolution, TH1* h1_median){
+  for (int i=1; i<=h2_response->GetNbinsX(); i++){
+    TH1F* hold = new TH1F("","", h2_response->GetNbinsY(),
+			  h2_response->GetYaxis()->GetBinCenter(1)-0.5*h2_response->GetYaxis()->GetBinWidth(1),
+			  h2_response->GetYaxis()->GetBinCenter(h2_response->GetNbinsY())+0.5*h2_response->GetYaxis()->GetBinWidth(h2_response->GetNbinsY()));
+    for (int j=1; j<=h2_response->GetNbinsY(); j++){
+      hold->SetBinContent(j,h2_response->GetBinContent(i,j));
+    }
+    if (hold->Integral()==0.) continue;
+    Double_t prob,quant16,quant84,median;
+    prob=.5;
+    hold->GetQuantiles(1,&median,&prob);
+    prob=.84;
+    hold->GetQuantiles(1,&quant84,&prob);
+    prob=.16;
+    hold->GetQuantiles(1,&quant16,&prob);
+    h1_resolution->SetBinContent(i,0.5*fabs(quant84-quant16)/median);
+    if (h1_median) {
+      h1_median->SetBinContent(i,median);
+      h1_median->SetBinError(i,h1_resolution->GetBinContent(i));
+    }
+  }
+}
+
+void TCCPlots::make_median_add(TH2* h2_response, TH1* h1_resolution){
+  for (int i=1; i<=h2_response->GetNbinsX(); i++){
+    TH1F* hold = new TH1F("","", h2_response->GetNbinsY(),
+			  h2_response->GetYaxis()->GetBinCenter(1)-0.5*h2_response->GetYaxis()->GetBinWidth(1),
+			  h2_response->GetYaxis()->GetBinCenter(h2_response->GetNbinsY())+0.5*h2_response->GetYaxis()->GetBinWidth(h2_response->GetNbinsY()));
+    for (int j=1; j<=h2_response->GetNbinsY(); j++){
+      hold->SetBinContent(j,h2_response->GetBinContent(i,j));
+    }
+    if (hold->Integral()==0.) continue;
+    Double_t prob,quant16,quant84,median;
+    prob=.5;
+    hold->GetQuantiles(1,&median,&prob);
+//     prob=.84;
+    prob=0.75;
+    hold->GetQuantiles(1,&quant84,&prob);
+//     prob=.16;
+    prob=0.25;
+    hold->GetQuantiles(1,&quant16,&prob);
+    h1_resolution->SetBinContent(i,0.5*fabs(quant84-quant16));
+  }
+}
+
+void TCCPlots::make_median(TH3* h3_response, TH2* h2_resolution){
+  for (int i=1; i<=h3_response->GetNbinsX(); i++) {
+    for (int j=1; j<=h3_response->GetNbinsY(); j++) {
+      TH1F* hold = new TH1F("","", 
+			    h3_response->GetNbinsZ(), 
+			    h3_response->GetZaxis()->GetBinCenter(1)-0.5*h3_response->GetZaxis()->GetBinWidth(1), 
+			    h3_response->GetZaxis()->GetBinCenter(h3_response->GetNbinsZ())+0.5*h3_response->GetZaxis()->GetBinWidth(h3_response->GetNbinsZ()));
+      for (int k=1; k<=h3_response->GetNbinsZ(); k++){
+	hold->SetBinContent(k,h3_response->GetBinContent(i,j,k));
+      }
+      if (hold->Integral()==0.) continue;
+      Double_t prob,quant16,quant84,median;
+      prob=.5;
+      hold->GetQuantiles(1,&median,&prob);
+      prob=.84;
+      hold->GetQuantiles(1,&quant84,&prob);
+      prob=.16;
+      hold->GetQuantiles(1,&quant16,&prob);
+      h2_resolution->SetBinContent(i,j,0.5*fabs(quant84-quant16)/median);
+    }
+  }
+}
+
+void TCCPlots::resizeHistograms() {
+  
+  if (m_collectionType == "tracks") {
+    
+    if (m_trackPtBins.size()>0) {
+     
+      const float* ptBins = m_trackPtBins.data();
+      int           nBins = m_trackPtBins.size()-1;
+      
+      m_trk_d0_pt                                      ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_z0_pt                                      ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_theta_pt                                   ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_phi_pt                                     ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_qOverP_pt                                  ->GetXaxis()->Set(nBins, ptBins);    
+      m_trk_caloEntryEtaOverEta_pt                     ->GetXaxis()->Set(nBins, ptBins);    
+      m_trk_caloEntryUncEta_pt                         ->GetXaxis()->Set(nBins, ptBins);    
+      m_trk_caloEntryUncTheta_pt                       ->GetXaxis()->Set(nBins, ptBins);    
+      m_trk_caloEntryPhiOverPhi_pt                     ->GetXaxis()->Set(nBins, ptBins);    
+      m_trk_caloEntryUncPhi_pt                         ->GetXaxis()->Set(nBins, ptBins);    
+      m_trk_caloEntryUncTot_pt                         ->GetXaxis()->Set(nBins, ptBins); 
+      m_trk_pv0_caloEntryUncTot_pt                     ->GetXaxis()->Set(nBins, ptBins); 
+      m_trk_pv0_caloEntryUncTot_truthpt                ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_pv0_caloEntryUncTot_pt_0SiHits             ->GetXaxis()->Set(nBins, ptBins); 
+      m_trk_perigeeUncEta_pt                           ->GetXaxis()->Set(nBins, ptBins);    
+      m_trk_perigeeUncTheta_pt                         ->GetXaxis()->Set(nBins, ptBins);    
+      m_trk_perigeeUncPhi_pt                           ->GetXaxis()->Set(nBins, ptBins);    
+      m_trk_perigeeUncTot_pt                           ->GetXaxis()->Set(nBins, ptBins);    
+      m_trk_delta_perigeeEta_caloEntryEta_pt           ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_delta_perigeePhi_caloEntryPhi_pt           ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_delta_trackEta_caloEntryEta_pt             ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_delta_trackPhi_caloEntryPhi_pt             ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_delta_trackEta_caloEntryEtaCorr_pt         ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_delta_trackPhi_caloEntryPhiCorr_pt         ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_delta_caloEntryEta_caloEntryEtaCorr_pt     ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_delta_caloEntryPhi_caloEntryPhiCorr_pt     ->GetXaxis()->Set(nBins, ptBins);
+      
+      m_trk_total_pt                                   ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_total_clusters_pt                          ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_notMatching_deltar_fix_pt                  ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_notMatching_deltar_fix_caloEntryUncTot_pt  ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_notMatching_deltar_var_pt                  ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_notMatching_deltar_var_caloEntryUncTot_pt  ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_notMatching_deltar_none_pt                 ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_notMatching_deltar_none_caloEntryUncTot_pt ->GetXaxis()->Set(nBins, ptBins);
+      
+      m_trk_matching_deltar_or_clusters_pt             ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_matching_deltar_and_clusters_pt            ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_matching_deltar_fix_only_clusters_pt       ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_matching_deltar_var_only_clusters_pt       ->GetXaxis()->Set(nBins, ptBins);
+      
+      m_trk_matching_deltar_fix_and_var_pt             ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_matching_deltar_fix_or_var_pt              ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_matching_deltar_fix_pt                     ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_matching_deltar_var_pt                     ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_matching_deltar_onlyfix_pt                 ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_matching_deltar_onlyvar_pt                 ->GetXaxis()->Set(nBins, ptBins);
+              
+      m_trk_matchedFraction_pt_fix_and_var             ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_matchedFraction_pt_fix_or_var              ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_matchedFraction_pt_fix                     ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_matchedFraction_pt_notfix                  ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_matchedFraction_pt_var                     ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_matchedFraction_pt_notvar                  ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_matchedFraction_pt_onlyvar                 ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_matchedFraction_pt_onlyfix                 ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_matchedFraction_pt_none                    ->GetXaxis()->Set(nBins, ptBins);
+
+      m_trk_pv0_total_pt                               ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_pv0_total_clusters_pt                      ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_pv0_notMatching_deltar_fix_pt              ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_pv0_notMatching_deltar_var_pt              ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_pv0_notMatching_deltar_none_pt             ->GetXaxis()->Set(nBins, ptBins);
+      
+      m_trk_pv0_matching_deltar_fix_and_var_pt         ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_pv0_matching_deltar_fix_or_var_pt          ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_pv0_matching_deltar_fix_pt                 ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_pv0_matching_deltar_var_pt                 ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_pv0_matching_deltar_onlyfix_pt             ->GetXaxis()->Set(nBins, ptBins);
+      m_trk_pv0_matching_deltar_onlyvar_pt             ->GetXaxis()->Set(nBins, ptBins);
+              
+      m_trk_pv0_matchedFraction_pt_fix_and_var         ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_pv0_matchedFraction_pt_fix_or_var          ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_pv0_matchedFraction_pt_fix                 ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_pv0_matchedFraction_pt_notfix              ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_pv0_matchedFraction_pt_var                 ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_pv0_matchedFraction_pt_notvar              ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_pv0_matchedFraction_pt_onlyvar             ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_pv0_matchedFraction_pt_onlyfix             ->GetXaxis()->Set(nBins, ptBins);         
+      m_trk_pv0_matchedFraction_pt_none                ->GetXaxis()->Set(nBins, ptBins);
+     
+    }
+    
+    if (m_trackProdRadiusBins.size()>0) {
+      const float* radiusBins = m_trackProdRadiusBins.data();
+      int               nBins = m_trackProdRadiusBins.size()-1;
+      
+      m_trk_prodRadius                                         ->GetXaxis()->Set(nBins, radiusBins);
+      m_trk_perigeeUncEta_prodRadius                           ->GetXaxis()->Set(nBins, radiusBins);
+      m_trk_perigeeUncTheta_prodRadius                         ->GetXaxis()->Set(nBins, radiusBins);
+      m_trk_perigeeUncPhi_prodRadius                           ->GetXaxis()->Set(nBins, radiusBins);
+      m_trk_perigeeUncTot_prodRadius                           ->GetXaxis()->Set(nBins, radiusBins);
+      m_trk_caloEntryUncEta_prodRadius                         ->GetXaxis()->Set(nBins, radiusBins);
+      m_trk_caloEntryUncTheta_prodRadius                       ->GetXaxis()->Set(nBins, radiusBins);
+      m_trk_caloEntryUncPhi_prodRadius                         ->GetXaxis()->Set(nBins, radiusBins);
+      m_trk_caloEntryUncTot_prodRadius                         ->GetXaxis()->Set(nBins, radiusBins);
+      
+      m_trk_notMatching_deltar_fix_caloEntryUncTot_prodRadius  ->GetXaxis()->Set(nBins, radiusBins);
+      m_trk_notMatching_deltar_var_caloEntryUncTot_prodRadius  ->GetXaxis()->Set(nBins, radiusBins);
+      m_trk_notMatching_deltar_none_caloEntryUncTot_prodRadius ->GetXaxis()->Set(nBins, radiusBins);
+      
+    }
+  } else if (m_collectionType == "jets")  {
+        
+    if (m_jetPtBins.size()>0) {
+      
+      float* ptBins = m_jetPtBins.data();
+      int     nBins = m_jetPtBins.size()-1;
+       
+      m_jet_response_m_pt             ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_m_pt_2leadings   ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_m_pt_leading     ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_m_pt_subleading  ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_d2_pt            ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_d2_pt_2leadings  ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_d2_pt_leading    ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_d2_pt_subleading ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_add_d2_pt             ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_add_d2_pt_2leadings   ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_add_d2_pt_leading     ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_add_d2_pt_subleading  ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_add_eta_pt            ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_add_eta_pt_2leadings  ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_add_eta_pt_leading    ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_response_add_eta_pt_subleading ->GetXaxis()->Set(nBins, ptBins);      
+      m_jet_resolution_m                   ->GetXaxis()->Set(nBins, ptBins);          
+      m_jet_resolution_m_2leadings         ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_resolution_m_leading           ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_resolution_m_subleading        ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_resolution_d2                  ->GetXaxis()->Set(nBins, ptBins);          
+      m_jet_resolution_d2_2leadings        ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_resolution_d2_leading          ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_resolution_d2_subleading       ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_resolution_add_d2              ->GetXaxis()->Set(nBins, ptBins);          
+      m_jet_resolution_add_d2_2leadings    ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_resolution_add_d2_leading      ->GetXaxis()->Set(nBins, ptBins);
+      m_jet_resolution_add_d2_subleading   ->GetXaxis()->Set(nBins, ptBins);      
+    }
+    
+    if (m_jetPtBins.size()>0 and m_jetMassOverPtBins.size()>0) {
+      
+      float* ptBins = m_jetPtBins.data();
+      int   nBinsPt = m_jetPtBins.size()-1;
+      
+      float* massOverPtBins = m_jetMassOverPtBins.data();
+      int   nBinsMassOverPt = m_jetMassOverPtBins.size()-1;
+      
+      
+      m_jet_mopt_pt_response_m                ->GetXaxis()->Set(nBinsPt, ptBins);
+      m_jet_mopt_pt_response_m                ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);
+      m_jet_mopt_pt_response_m_2leadings      ->GetXaxis()->Set(nBinsPt, ptBins);
+      m_jet_mopt_pt_response_m_2leadings      ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);
+      m_jet_mopt_pt_response_m_leading        ->GetXaxis()->Set(nBinsPt, ptBins);
+      m_jet_mopt_pt_response_m_leading        ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);
+      m_jet_mopt_pt_response_m_subleading     ->GetXaxis()->Set(nBinsPt, ptBins);
+      m_jet_mopt_pt_response_m_subleading     ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);
+                                              
+      m_jet_mopt_pt_response_pt               ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_mopt_pt_response_pt               ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_mopt_pt_response_pt_2leadings     ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_mopt_pt_response_pt_2leadings     ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_mopt_pt_response_pt_leading       ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_mopt_pt_response_pt_leading       ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_mopt_pt_response_pt_subleading    ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_mopt_pt_response_pt_subleading    ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+                                              
+      m_jet_mopt_pt_response_eta              ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_mopt_pt_response_eta              ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_mopt_pt_response_eta_2leadings    ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_mopt_pt_response_eta_2leadings    ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_mopt_pt_response_eta_leading      ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_mopt_pt_response_eta_leading      ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_mopt_pt_response_eta_subleading   ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_mopt_pt_response_eta_subleading   ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+                                              
+      m_jet_mopt_pt_response_phi              ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_mopt_pt_response_phi              ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_mopt_pt_response_phi_2leadings    ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_mopt_pt_response_phi_2leadings    ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_mopt_pt_response_phi_leading      ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_mopt_pt_response_phi_leading      ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_mopt_pt_response_phi_subleading   ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_mopt_pt_response_phi_subleading   ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+                                              
+      m_jet_mopt_pt_response_d2               ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_mopt_pt_response_d2               ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_mopt_pt_response_d2_2leadings     ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_mopt_pt_response_d2_2leadings     ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_mopt_pt_response_d2_leading       ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_mopt_pt_response_d2_leading       ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_mopt_pt_response_d2_subleading    ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_mopt_pt_response_d2_subleading    ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+                                              
+      m_jet_resolution_mopt_pt_m              ->GetXaxis()->Set(nBinsPt, ptBins);
+      m_jet_resolution_mopt_pt_m              ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);
+      m_jet_resolution_mopt_pt_m_2leadings    ->GetXaxis()->Set(nBinsPt, ptBins);
+      m_jet_resolution_mopt_pt_m_2leadings    ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);
+      m_jet_resolution_mopt_pt_m_leading      ->GetXaxis()->Set(nBinsPt, ptBins);
+      m_jet_resolution_mopt_pt_m_leading      ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);
+      m_jet_resolution_mopt_pt_m_subleading   ->GetXaxis()->Set(nBinsPt, ptBins);
+      m_jet_resolution_mopt_pt_m_subleading   ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);
+                                              
+      m_jet_resolution_mopt_pt_pt             ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_resolution_mopt_pt_pt             ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_resolution_mopt_pt_pt_2leadings   ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_resolution_mopt_pt_pt_2leadings   ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_resolution_mopt_pt_pt_leading     ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_resolution_mopt_pt_pt_leading     ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_resolution_mopt_pt_pt_subleading  ->GetXaxis()->Set(nBinsPt, ptBins);
+      m_jet_resolution_mopt_pt_pt_subleading  ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);
+                                              
+      m_jet_resolution_mopt_pt_eta            ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_resolution_mopt_pt_eta            ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_resolution_mopt_pt_eta_2leadings  ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_resolution_mopt_pt_eta_2leadings  ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_resolution_mopt_pt_eta_leading    ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_resolution_mopt_pt_eta_leading    ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_resolution_mopt_pt_eta_subleading ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_resolution_mopt_pt_eta_subleading ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+                                              
+      m_jet_resolution_mopt_pt_phi            ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_resolution_mopt_pt_phi            ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_resolution_mopt_pt_phi_2leadings  ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_resolution_mopt_pt_phi_2leadings  ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_resolution_mopt_pt_phi_leading    ->GetXaxis()->Set(nBinsPt, ptBins);  
+      m_jet_resolution_mopt_pt_phi_leading    ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);  
+      m_jet_resolution_mopt_pt_phi_subleading ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_resolution_mopt_pt_phi_subleading ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+                                              
+      m_jet_resolution_mopt_pt_d2             ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_resolution_mopt_pt_d2             ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_resolution_mopt_pt_d2_2leadings   ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_resolution_mopt_pt_d2_2leadings   ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_resolution_mopt_pt_d2_leading     ->GetXaxis()->Set(nBinsPt, ptBins); 
+      m_jet_resolution_mopt_pt_d2_leading     ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins); 
+      m_jet_resolution_mopt_pt_d2_subleading  ->GetXaxis()->Set(nBinsPt, ptBins);
+      m_jet_resolution_mopt_pt_d2_subleading  ->GetYaxis()->Set(nBinsMassOverPt, massOverPtBins);
+    }
+  } else if (m_collectionType == "tccs") {
+    if (m_trackPtBins.size()>0) {  
+      float* ptBins = m_trackPtBins.data();
+      int     nBins = m_trackPtBins.size()-1;
+      
+      m_tcc_pt              ->GetXaxis()->Set(nBins, ptBins);
+      m_tcc_pt_etacut       ->GetXaxis()->Set(nBins, ptBins);
+      m_tcc_taste_pt        ->GetXaxis()->Set(nBins, ptBins);
+      m_tcc_taste_pt_etacut ->GetXaxis()->Set(nBins, ptBins);
+      m_tcc_pt_track_pt     ->GetXaxis()->Set(nBins, ptBins);
+      m_tcc_pt_track_pt     ->GetYaxis()->Set(nBins, ptBins);
+      m_tcc_pt_truth_pt     ->GetXaxis()->Set(nBins, ptBins);
+      m_tcc_pt_truth_pt     ->GetYaxis()->Set(nBins, ptBins);
+             
+      m_trk_tcc_reco_pt_truth_pt  ->GetXaxis()->Set(nBins, ptBins); 
+      m_trk_tcc_reco_pt_truth_pt  ->GetYaxis()->Set(nBins, ptBins); 
+              
+    }
+  } else return;
+}
+
+   
+   
+   
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlots.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlots.h
new file mode 100644
index 0000000000000000000000000000000000000000..e2827ab150f173cd47cd2bfee63753f43d4419e5
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlots.h
@@ -0,0 +1,697 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TCCPLOTS_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TCCPLOTS_H
+
+// std includes
+#include <string>
+#include <array>
+
+// local includes
+#include "TCCPlotsBase.h"
+#include "xAODJet/JetContainer.h"
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+#include "xAODPFlow/TrackCaloClusterContainer.h"
+#include "xAODTruth/TruthParticleContainer.h"
+
+class TCCPlots: public TCCPlotsBase {
+public:
+  TCCPlots(TCCPlotsBase* pParent, const std::string& dirName, const std::string& collection = "");
+  void fill(const xAOD::JetContainer& jets);
+  void fill(const xAOD::Jet& jet);
+  void fill(const xAOD::Jet& jet, const xAOD::Jet& truth);
+  
+  void fillLeading(const xAOD::Jet& jet);
+  void fillSubLeading(const xAOD::Jet& jet);
+  
+  void fillResponse(const xAOD::Jet& jet, const xAOD::Jet& truth);
+  void fillResponseLeading(const xAOD::Jet& jet, const xAOD::Jet& truth);
+  void fillResponseSubLeading(const xAOD::Jet& jet, const xAOD::Jet& truth);
+  void fillResponseNoPtNoMassCuts(const xAOD::Jet& jet, const xAOD::Jet& truth);
+  void fillResponseNoPtNoMassCutsLeading(const xAOD::Jet& jet, const xAOD::Jet& truth);
+  void fillResponseNoPtNoMassCutsSubLeading(const xAOD::Jet& jet, const xAOD::Jet& truth);
+  
+  void fillResponseNPV(const xAOD::Jet& jet, const xAOD::Jet& truth, int NPV);
+  void fillResponseLeadingNPV(const xAOD::Jet& jet, const xAOD::Jet& truth, int NPV);
+  void fillResponseSubLeadingNPV(const xAOD::Jet& jet, const xAOD::Jet& truth, int NPV);
+    
+  void fillPseudoResponse(const xAOD::Jet& jet, const xAOD::Jet& calo);
+  void fillPseudoResponseLeading(const xAOD::Jet& jet, const xAOD::Jet& calo);
+  void fillPseudoResponseSubLeading(const xAOD::Jet& jet, const xAOD::Jet& calo);
+    
+  void fillMoments(const xAOD::Jet& jet);
+  void fillMomentsLeading(const xAOD::Jet& jet);
+  void fillMomentsSubLeading(const xAOD::Jet& jet);
+  void fillMomentsWithMassCut(const xAOD::Jet& jet);
+  void fillMomentsLeadingWithMassCut(const xAOD::Jet& jet);
+  void fillMomentsSubLeadingWithMassCut(const xAOD::Jet& jet);
+  
+  void fillTrackParameters(const xAOD::TrackParticle& track);
+  void fillCaloEntryInfo(const xAOD::TrackParticle& track);
+  void fillPerigeeInfo(const xAOD::TrackParticle& track);
+  void fillPerigeeVsCaloEntry(const xAOD::TrackParticle& track);
+  
+  void fillTrackParametersAllPt(const xAOD::TrackParticle& track);
+  void fillCaloEntryInfoAllPt(const xAOD::TrackParticle& track);
+  void fillPerigeeInfoAllPt(const xAOD::TrackParticle& track);
+  void fillPerigeeVsCaloEntryAllPt(const xAOD::TrackParticle& track);
+  
+  void fillMatching(const xAOD::TrackParticle& track);
+  void fillCluster(const xAOD::CaloCluster& cluster);
+  void fillClusterEtaCut(const xAOD::CaloCluster& cluster);
+  
+  void fillTCC(const xAOD::TrackCaloCluster& tcc, std::vector<const xAOD::TrackParticle*>& alltracksPV0);
+  void fillTCCptCut(const xAOD::TrackCaloCluster& tcc);
+  void fillTCCetaCut(const xAOD::TrackCaloCluster& tcc);
+    
+  void make_median(TH2* h2_response, TH1* h1_resolution, TH1* h1_median=nullptr);
+  void make_median_add(TH2* h2_response, TH1* h1_resolution);
+  void make_median(TH3* h3_response, TH2* h2_resolution);
+  
+  void setEventWeight(const float& weight);
+  void setJetPtBinning(const std::vector<float>& bins);
+  void setJetMassOverPtBinning(const std::vector<float>& bins);
+  void setTrackPtBinning(const std::vector<float>& bins);
+  void setTrackProdRadiusBinning(const std::vector<float>& bins);
+
+  void resizeHistograms();
+  
+  const xAOD::TruthParticle* getTruthPtr(const xAOD::TrackParticle& trackParticle) const;
+  const xAOD::TrackParticle* getTrackParticlePtr(const xAOD::TrackCaloCluster& tcc) const;
+
+  
+private:
+  std::string m_collectionType             ;
+  float       m_eventWeight                ;
+  
+  std::vector<float> m_jetPtBins           ;
+  std::vector<float> m_jetMassOverPtBins   ;
+  std::vector<float> m_trackPtBins         ;
+  std::vector<float> m_trackProdRadiusBins ;
+  
+  TH1* m_jet_n                             ;
+  TH1* m_jet_pt                            ;
+  TH1* m_jet_eta                           ;
+  TH1* m_jet_phi                           ;
+  TH1* m_jet_m                             ;
+  
+  TH1* m_jet_m_2leadings                   ;
+  TH1* m_jet_pt_2leadings                  ;
+  TH1* m_jet_eta_2leadings                 ;
+  TH1* m_jet_phi_2leadings                 ;
+  
+  TH1* m_jet_m_leading                     ;
+  TH1* m_jet_pt_leading                    ;
+  TH1* m_jet_eta_leading                   ;
+  TH1* m_jet_phi_leading                   ;
+  
+  TH1* m_jet_m_subleading                  ;
+  TH1* m_jet_pt_subleading                 ;
+  TH1* m_jet_eta_subleading                ;
+  TH1* m_jet_phi_subleading                ;
+  
+  TH1* m_jet_deltaR                        ;
+  TH1* m_jet_deltaR_matched                ;
+  
+  TH1* m_jet_response_m                    ;
+  TH2* m_jet_response_m_pt                 ;
+  TH1* m_jet_response_pt                   ;
+  TH1* m_jet_response_eta                  ;
+  TH1* m_jet_response_phi                  ;
+  
+  TH1* m_jet_response_m_2leadings          ;
+  TH2* m_jet_response_m_pt_2leadings       ;
+  TH1* m_jet_response_pt_2leadings         ;
+  TH1* m_jet_response_eta_2leadings        ;
+  TH1* m_jet_response_phi_2leadings        ;
+  
+  TH1* m_jet_response_m_leading            ;
+  TH2* m_jet_response_m_pt_leading         ;
+  TH1* m_jet_response_pt_leading           ;
+  TH1* m_jet_response_eta_leading          ;
+  TH1* m_jet_response_phi_leading          ;
+  
+  TH1* m_jet_response_m_subleading         ;
+  TH2* m_jet_response_m_pt_subleading      ;
+  TH1* m_jet_response_pt_subleading        ;
+  TH1* m_jet_response_eta_subleading       ;
+  TH1* m_jet_response_phi_subleading       ;
+  
+  TH1* m_jet_response_add_eta              ;
+  TH1* m_jet_response_add_eta_2leadings    ;
+  TH1* m_jet_response_add_eta_leading      ;
+  TH1* m_jet_response_add_eta_subleading   ;
+  
+  TH2* m_jet_response_add_eta_pt           ;
+  TH2* m_jet_response_add_eta_pt_2leadings ;
+  TH2* m_jet_response_add_eta_pt_leading   ;
+  TH2* m_jet_response_add_eta_pt_subleading;
+  
+  TH2* m_jet_response_m_npv                ;
+  TH2* m_jet_response_m_npv_2leadings      ;
+  TH2* m_jet_response_m_npv_leading        ;
+  TH2* m_jet_response_m_npv_subleading     ;
+      
+  TH2* m_jet_response_d2_pt                ;
+  TH2* m_jet_response_d2_pt_2leadings      ;
+  TH2* m_jet_response_d2_pt_leading        ;
+  TH2* m_jet_response_d2_pt_subleading     ;
+  
+  TH2* m_jet_response_add_d2_pt                ;
+  TH2* m_jet_response_add_d2_pt_2leadings      ;
+  TH2* m_jet_response_add_d2_pt_leading        ;
+  TH2* m_jet_response_add_d2_pt_subleading     ;
+  
+  TH1* m_jet_pseudoresponse_m              ;
+  TH1* m_jet_pseudoresponse_pt             ;
+  
+  TH1* m_jet_pseudoresponse_m_2leadings    ;
+  TH1* m_jet_pseudoresponse_pt_2leadings   ;
+  
+  TH1* m_jet_pseudoresponse_m_leading      ;
+  TH1* m_jet_pseudoresponse_pt_leading     ;
+  
+  TH1* m_jet_pseudoresponse_m_subleading   ;
+  TH1* m_jet_pseudoresponse_pt_subleading  ;
+  
+  TH1* m_jet_pseudoresponse_notcalib_pt            ;           
+  TH1* m_jet_pseudoresponse_notcalib_pt_2leadings  ;
+  TH1* m_jet_pseudoresponse_notcalib_pt_leading    ;
+  TH1* m_jet_pseudoresponse_notcalib_pt_subleading ;
+  
+  TH1* m_jet_d2                            ;
+  TH1* m_jet_d2_2leadings                  ;
+  TH1* m_jet_d2_leading                    ;
+  TH1* m_jet_d2_subleading                 ;
+  
+  TH1* m_jet_d2_massCut                    ;
+  TH1* m_jet_d2_2leadings_massCut          ;
+  TH1* m_jet_d2_leading_massCut            ;
+  TH1* m_jet_d2_subleading_massCut         ;
+  
+  TH1* m_jet_response_d2                   ;
+  TH1* m_jet_response_d2_2leadings         ;
+  TH1* m_jet_response_d2_leading           ;
+  TH1* m_jet_response_d2_subleading        ;  
+  
+  TH1* m_jet_response_add_d2                   ;
+  TH1* m_jet_response_add_d2_2leadings         ;
+  TH1* m_jet_response_add_d2_leading           ;
+  TH1* m_jet_response_add_d2_subleading        ;  
+  
+  TH1* m_jet_resolution_m                  ;
+  TH1* m_jet_resolution_m_2leadings        ;
+  TH1* m_jet_resolution_m_leading          ;
+  TH1* m_jet_resolution_m_subleading       ;
+
+  TH1* m_jet_resolution_m_npv              ;
+  TH1* m_jet_resolution_m_npv_2leadings    ;
+  TH1* m_jet_resolution_m_npv_leading      ;
+  TH1* m_jet_resolution_m_npv_subleading   ;
+  
+  TH1* m_jet_median_width_m_npv              ;
+  TH1* m_jet_median_width_m_npv_2leadings    ;
+  TH1* m_jet_median_width_m_npv_leading      ;
+  TH1* m_jet_median_width_m_npv_subleading   ;
+
+  TH1* m_jet_resolution_d2              ;
+  TH1* m_jet_resolution_d2_2leadings    ;
+  TH1* m_jet_resolution_d2_leading      ;
+  TH1* m_jet_resolution_d2_subleading   ;  
+  
+  TH1* m_jet_resolution_add_d2              ;
+  TH1* m_jet_resolution_add_d2_2leadings    ;
+  TH1* m_jet_resolution_add_d2_leading      ;
+  TH1* m_jet_resolution_add_d2_subleading   ;
+  
+  TH3* m_jet_mopt_pt_response_m                  ;
+  TH3* m_jet_mopt_pt_response_m_2leadings        ;
+  TH3* m_jet_mopt_pt_response_m_leading          ;
+  TH3* m_jet_mopt_pt_response_m_subleading       ;
+  TH3* m_jet_mopt_pt_response_pt                 ;
+  TH3* m_jet_mopt_pt_response_pt_2leadings       ;
+  TH3* m_jet_mopt_pt_response_pt_leading         ;
+  TH3* m_jet_mopt_pt_response_pt_subleading      ;
+  TH3* m_jet_mopt_pt_response_phi                ;
+  TH3* m_jet_mopt_pt_response_phi_2leadings      ;
+  TH3* m_jet_mopt_pt_response_phi_leading        ;
+  TH3* m_jet_mopt_pt_response_phi_subleading     ;
+  TH3* m_jet_mopt_pt_response_eta                ;
+  TH3* m_jet_mopt_pt_response_eta_2leadings      ;
+  TH3* m_jet_mopt_pt_response_eta_leading        ;
+  TH3* m_jet_mopt_pt_response_eta_subleading     ;
+  TH3* m_jet_mopt_pt_response_d2                 ;
+  TH3* m_jet_mopt_pt_response_d2_2leadings       ;
+  TH3* m_jet_mopt_pt_response_d2_leading         ;
+  TH3* m_jet_mopt_pt_response_d2_subleading      ;
+  
+  TH2* m_jet_resolution_mopt_pt_m                ;
+  TH2* m_jet_resolution_mopt_pt_m_2leadings      ;
+  TH2* m_jet_resolution_mopt_pt_m_leading        ;
+  TH2* m_jet_resolution_mopt_pt_m_subleading     ;
+  TH2* m_jet_resolution_mopt_pt_pt               ;
+  TH2* m_jet_resolution_mopt_pt_pt_2leadings     ;
+  TH2* m_jet_resolution_mopt_pt_pt_leading       ;
+  TH2* m_jet_resolution_mopt_pt_pt_subleading    ;
+  TH2* m_jet_resolution_mopt_pt_phi              ;
+  TH2* m_jet_resolution_mopt_pt_phi_2leadings    ;
+  TH2* m_jet_resolution_mopt_pt_phi_leading      ;
+  TH2* m_jet_resolution_mopt_pt_phi_subleading   ;
+  TH2* m_jet_resolution_mopt_pt_eta              ;
+  TH2* m_jet_resolution_mopt_pt_eta_2leadings    ;
+  TH2* m_jet_resolution_mopt_pt_eta_leading      ;
+  TH2* m_jet_resolution_mopt_pt_eta_subleading   ;
+  TH2* m_jet_resolution_mopt_pt_d2               ;
+  TH2* m_jet_resolution_mopt_pt_d2_2leadings     ;
+  TH2* m_jet_resolution_mopt_pt_d2_leading       ;
+  TH2* m_jet_resolution_mopt_pt_d2_subleading    ;
+  
+  //track histograms
+  TH1* m_trk_d0                                  ;
+  TH1* m_trk_z0                                  ;
+  TH1* m_trk_theta                               ;
+  TH1* m_trk_phi                                 ;
+  TH1* m_trk_qOverP                              ;
+  TH2* m_trk_d0_eta                              ;
+  TH2* m_trk_z0_eta                              ;
+  TH2* m_trk_theta_eta                           ;
+  TH2* m_trk_phi_eta                             ;
+  TH2* m_trk_qOverP_eta                          ;
+  TH2* m_trk_d0_pt                               ;
+  TH2* m_trk_z0_pt                               ;
+  TH2* m_trk_theta_pt                            ;
+  TH2* m_trk_phi_pt                              ;
+  TH2* m_trk_qOverP_pt                           ;
+  TH1* m_trk_caloEntryEta                        ;
+  TH2* m_trk_caloEntryEtaOverEta_eta             ;
+  TH2* m_trk_caloEntryEtaOverEta_pt              ;
+  TH2* m_trk_caloEntryUncEta_caloEntryEta        ;
+  TH2* m_trk_caloEntryUncEta_eta                 ;
+  TH2* m_trk_caloEntryUncEta_pt                  ;
+  TH2* m_trk_caloEntryUncTheta_eta               ;
+  TH2* m_trk_caloEntryUncTheta_pt                ;
+  TH1* m_trk_caloEntryPhi                        ;
+  TH2* m_trk_caloEntryPhiOverPhi_eta             ;
+  TH2* m_trk_caloEntryPhiOverPhi_pt              ;
+  TH2* m_trk_caloEntryUncPhi_caloEntryPhi        ;
+  TH2* m_trk_caloEntryUncPhi_eta                 ;
+  TH2* m_trk_caloEntryUncPhi_pt                  ;
+  TH2* m_trk_caloEntryUncTot_eta                 ;
+  TH2* m_trk_caloEntryUncTot_pt                  ;
+  TH1* m_trk_perigeeEta                          ;
+  TH2* m_trk_perigeeUncEta_eta                   ;
+  TH2* m_trk_perigeeUncEta_pt                    ;
+  TH2* m_trk_perigeeUncTheta_eta                 ;
+  TH2* m_trk_perigeeUncTheta_pt                  ;
+  TH1* m_trk_perigeePhi                          ;
+  TH2* m_trk_perigeeUncPhi_eta                   ;
+  TH2* m_trk_perigeeUncPhi_pt                    ;
+  TH2* m_trk_perigeeUncTot_eta                   ;
+  TH2* m_trk_perigeeUncTot_pt                    ;
+  TH2* m_trk_perigeeUncEta_caloUncEta            ;
+  TH2* m_trk_perigeeUncTheta_caloUncTheta        ;
+  TH2* m_trk_perigeeUncPhi_caloUncPhi            ;
+  TH2* m_trk_perigeeUncTot_caloUncTot            ;
+  
+  TH1* m_trk_prodRadius                          ;
+  TH2* m_trk_perigeeUncEta_prodRadius            ;
+  TH2* m_trk_perigeeUncTheta_prodRadius          ;
+  TH2* m_trk_perigeeUncPhi_prodRadius            ;
+  TH2* m_trk_perigeeUncTot_prodRadius            ;
+  TH2* m_trk_caloEntryUncEta_prodRadius          ;
+  TH2* m_trk_caloEntryUncTheta_prodRadius        ;  
+  TH2* m_trk_caloEntryUncPhi_prodRadius          ;
+  TH2* m_trk_caloEntryUncTot_prodRadius          ;
+  
+  TH1* m_trk_delta_perigeeEta_caloEntryEta       ;
+  TH1* m_trk_delta_perigeePhi_caloEntryPhi       ;
+  TH2* m_trk_delta_perigeeEta_caloEntryEta_eta   ;
+  TH2* m_trk_delta_perigeePhi_caloEntryPhi_eta   ;
+  TH2* m_trk_delta_perigeeEta_caloEntryEta_pt    ;
+  TH2* m_trk_delta_perigeePhi_caloEntryPhi_pt    ;
+  
+  TH1* m_trk_delta_trackEta_caloEntryEta         ;
+  TH1* m_trk_delta_trackPhi_caloEntryPhi         ;
+  TH2* m_trk_delta_trackEta_caloEntryEta_eta     ;
+  TH2* m_trk_delta_trackPhi_caloEntryPhi_eta     ;
+  TH2* m_trk_delta_trackEta_caloEntryEta_pt      ;
+  TH2* m_trk_delta_trackPhi_caloEntryPhi_pt      ;
+  
+  TH1* m_trk_delta_trackEta_caloEntryEtaCorr     ;
+  TH1* m_trk_delta_trackPhi_caloEntryPhiCorr     ;
+  TH2* m_trk_delta_trackEta_caloEntryEtaCorr_eta ;
+  TH2* m_trk_delta_trackPhi_caloEntryPhiCorr_eta ;
+  TH2* m_trk_delta_trackEta_caloEntryEtaCorr_pt  ;
+  TH2* m_trk_delta_trackPhi_caloEntryPhiCorr_pt  ;
+  
+  TH1* m_trk_delta_caloEntryEta_caloEntryEtaCorr    ;
+  TH1* m_trk_delta_caloEntryPhi_caloEntryPhiCorr    ;
+  TH2* m_trk_delta_caloEntryEta_caloEntryEtaCorr_eta;
+  TH2* m_trk_delta_caloEntryPhi_caloEntryPhiCorr_eta;
+  TH2* m_trk_delta_caloEntryEta_caloEntryEtaCorr_pt ;
+  TH2* m_trk_delta_caloEntryPhi_caloEntryPhiCorr_pt ;
+      
+  TH1* m_clusters_eta                    ;
+  TH1* m_clusters_matched_eta            ;
+  TH1* m_clusters_notMatched_eta         ;
+  TH1* m_clusters_matchedFraction_eta    ;
+  TH1* m_clusters_notMatchedFraction_eta ;
+  TH1* m_clusters_width                  ;
+  TH2* m_clusters_width_eta              ;
+  TH1* m_clusters_energy                 ;  
+  TH1* m_clusters_matched_energy            ;
+  TH1* m_clusters_notMatched_energy         ;
+  TH1* m_clusters_matchedFraction_energy    ;
+  TH1* m_clusters_notMatchedFraction_energy ;
+  TH2* m_clusters_width_energy              ;
+  TH1* m_clusters_etacut_eta                 ;
+  TH1* m_clusters_etacut_width               ;
+  TH2* m_clusters_etacut_width_eta           ;
+  TH1* m_clusters_etacut_energy              ;
+  TH2* m_clusters_etacut_width_energy        ;  
+
+  TH1* m_clusters_matched_eta_fix_and_var        ;
+  TH1* m_clusters_matched_eta_fix_or_var         ;
+  TH1* m_clusters_matched_eta_fix                ;
+  TH1* m_clusters_matched_eta_notfix             ;
+  TH1* m_clusters_matched_eta_var                ;
+  TH1* m_clusters_matched_eta_notvar             ;
+  TH1* m_clusters_matched_eta_onlyvar            ;
+  TH1* m_clusters_matched_eta_onlyfix            ;
+  TH1* m_clusters_matched_eta_none               ;
+  TH1* m_clusters_matchedFraction_eta_fix_and_var;
+  TH1* m_clusters_matchedFraction_eta_fix_or_var ;
+  TH1* m_clusters_matchedFraction_eta_fix        ;
+  TH1* m_clusters_matchedFraction_eta_notfix     ;
+  TH1* m_clusters_matchedFraction_eta_var        ;
+  TH1* m_clusters_matchedFraction_eta_notvar     ;
+  TH1* m_clusters_matchedFraction_eta_onlyvar    ;
+  TH1* m_clusters_matchedFraction_eta_onlyfix    ;
+  TH1* m_clusters_matchedFraction_eta_none       ; 
+  
+  TH1* m_clusters_abs_eta                    ;
+  TH1* m_clusters_abs_matched_eta            ;
+  TH1* m_clusters_abs_notMatched_eta         ;
+  TH1* m_clusters_abs_matchedFraction_eta    ;
+  TH1* m_clusters_abs_notMatchedFraction_eta ;
+  TH1* m_clusters_abs_width                  ;
+  TH2* m_clusters_abs_width_eta              ;
+  TH1* m_clusters_abs_energy                 ;  
+  TH1* m_clusters_abs_matched_energy            ;
+  TH1* m_clusters_abs_notMatched_energy         ;
+  TH1* m_clusters_abs_matchedFraction_energy    ;
+  TH1* m_clusters_abs_notMatchedFraction_energy ;
+  TH2* m_clusters_abs_width_energy           ;
+  TH1* m_clusters_etacut_abs_eta             ;
+  TH1* m_clusters_etacut_abs_width           ;
+  TH2* m_clusters_etacut_abs_width_eta       ;
+  TH1* m_clusters_etacut_abs_energy          ;
+  TH2* m_clusters_etacut_abs_width_energy    ;
+  
+  TH1* m_clusters_abs_matched_eta_fix_and_var         ;
+  TH1* m_clusters_abs_matched_eta_fix_or_var          ;
+  TH1* m_clusters_abs_matched_eta_fix                 ;
+  TH1* m_clusters_abs_matched_eta_notfix              ;
+  TH1* m_clusters_abs_matched_eta_var                 ;
+  TH1* m_clusters_abs_matched_eta_notvar              ;
+  TH1* m_clusters_abs_matched_eta_onlyvar             ;
+  TH1* m_clusters_abs_matched_eta_onlyfix             ;
+  TH1* m_clusters_abs_matched_eta_none                ;
+  TH1* m_clusters_abs_matchedFraction_eta_fix_and_var ;
+  TH1* m_clusters_abs_matchedFraction_eta_fix_or_var  ;
+  TH1* m_clusters_abs_matchedFraction_eta_fix         ;
+  TH1* m_clusters_abs_matchedFraction_eta_notfix      ;
+  TH1* m_clusters_abs_matchedFraction_eta_var         ;
+  TH1* m_clusters_abs_matchedFraction_eta_notvar      ;
+  TH1* m_clusters_abs_matchedFraction_eta_onlyvar     ;
+  TH1* m_clusters_abs_matchedFraction_eta_onlyfix     ;
+  TH1* m_clusters_abs_matchedFraction_eta_none        ;
+                                                      
+  TH1* m_clusters_matched_pv0_eta_fix_and_var         ;
+  TH1* m_clusters_matched_pv0_eta_fix_or_var          ;
+  TH1* m_clusters_matched_pv0_eta_fix                 ;
+  TH1* m_clusters_matched_pv0_eta_notfix              ;
+  TH1* m_clusters_matched_pv0_eta_var                 ;
+  TH1* m_clusters_matched_pv0_eta_notvar              ;
+  TH1* m_clusters_matched_pv0_eta_onlyvar             ;
+  TH1* m_clusters_matched_pv0_eta_onlyfix             ;
+  TH1* m_clusters_matched_pv0_eta_none                ;
+  TH1* m_clusters_abs_matched_pv0_eta_fix_and_var     ;
+  TH1* m_clusters_abs_matched_pv0_eta_fix_or_var      ;
+  TH1* m_clusters_abs_matched_pv0_eta_fix             ;
+  TH1* m_clusters_abs_matched_pv0_eta_notfix          ;
+  TH1* m_clusters_abs_matched_pv0_eta_var             ;
+  TH1* m_clusters_abs_matched_pv0_eta_notvar          ;
+  TH1* m_clusters_abs_matched_pv0_eta_onlyvar         ;
+  TH1* m_clusters_abs_matched_pv0_eta_onlyfix         ;
+  TH1* m_clusters_abs_matched_pv0_eta_none            ;
+  
+  TH1* m_clusters_matchedpv0Fraction_eta_fix_and_var     ;
+  TH1* m_clusters_matchedpv0Fraction_eta_fix_or_var      ;
+  TH1* m_clusters_matchedpv0Fraction_eta_fix             ;
+  TH1* m_clusters_matchedpv0Fraction_eta_notfix          ;
+  TH1* m_clusters_matchedpv0Fraction_eta_var             ;
+  TH1* m_clusters_matchedpv0Fraction_eta_notvar          ;
+  TH1* m_clusters_matchedpv0Fraction_eta_onlyvar         ;
+  TH1* m_clusters_matchedpv0Fraction_eta_onlyfix         ;
+  TH1* m_clusters_matchedpv0Fraction_eta_none            ;                                                         
+  TH1* m_clusters_abs_matchedpv0Fraction_eta_fix_and_var ;
+  TH1* m_clusters_abs_matchedpv0Fraction_eta_fix_or_var  ;
+  TH1* m_clusters_abs_matchedpv0Fraction_eta_fix         ;
+  TH1* m_clusters_abs_matchedpv0Fraction_eta_notfix      ;
+  TH1* m_clusters_abs_matchedpv0Fraction_eta_var         ;
+  TH1* m_clusters_abs_matchedpv0Fraction_eta_notvar      ;
+  TH1* m_clusters_abs_matchedpv0Fraction_eta_onlyvar     ;
+  TH1* m_clusters_abs_matchedpv0Fraction_eta_onlyfix     ;
+  TH1* m_clusters_abs_matchedpv0Fraction_eta_none        ;
+  
+  TH1* m_clusters_matched_pvx_eta_fix_and_var         ;
+  TH1* m_clusters_matched_pvx_eta_fix_or_var          ;
+  TH1* m_clusters_matched_pvx_eta_fix                 ;
+  TH1* m_clusters_matched_pvx_eta_notfix              ;
+  TH1* m_clusters_matched_pvx_eta_var                 ;
+  TH1* m_clusters_matched_pvx_eta_notvar              ;
+  TH1* m_clusters_matched_pvx_eta_onlyvar             ;
+  TH1* m_clusters_matched_pvx_eta_onlyfix             ;
+  TH1* m_clusters_matched_pvx_eta_none                ;
+  TH1* m_clusters_abs_matched_pvx_eta_fix_and_var     ;
+  TH1* m_clusters_abs_matched_pvx_eta_fix_or_var      ;
+  TH1* m_clusters_abs_matched_pvx_eta_fix             ;
+  TH1* m_clusters_abs_matched_pvx_eta_notfix          ;
+  TH1* m_clusters_abs_matched_pvx_eta_var             ;
+  TH1* m_clusters_abs_matched_pvx_eta_notvar          ;
+  TH1* m_clusters_abs_matched_pvx_eta_onlyvar         ;
+  TH1* m_clusters_abs_matched_pvx_eta_onlyfix         ;
+  TH1* m_clusters_abs_matched_pvx_eta_none            ;
+  
+  TH1* m_clusters_matchedpvxFraction_eta_fix_and_var     ;
+  TH1* m_clusters_matchedpvxFraction_eta_fix_or_var      ;
+  TH1* m_clusters_matchedpvxFraction_eta_fix             ;
+  TH1* m_clusters_matchedpvxFraction_eta_notfix          ;
+  TH1* m_clusters_matchedpvxFraction_eta_var             ;
+  TH1* m_clusters_matchedpvxFraction_eta_notvar          ;
+  TH1* m_clusters_matchedpvxFraction_eta_onlyvar         ;
+  TH1* m_clusters_matchedpvxFraction_eta_onlyfix         ;
+  TH1* m_clusters_matchedpvxFraction_eta_none            ;                                                         
+  TH1* m_clusters_abs_matchedpvxFraction_eta_fix_and_var ;
+  TH1* m_clusters_abs_matchedpvxFraction_eta_fix_or_var  ;
+  TH1* m_clusters_abs_matchedpvxFraction_eta_fix         ;
+  TH1* m_clusters_abs_matchedpvxFraction_eta_notfix      ;
+  TH1* m_clusters_abs_matchedpvxFraction_eta_var         ;
+  TH1* m_clusters_abs_matchedpvxFraction_eta_notvar      ;
+  TH1* m_clusters_abs_matchedpvxFraction_eta_onlyvar     ;
+  TH1* m_clusters_abs_matchedpvxFraction_eta_onlyfix     ;
+  TH1* m_clusters_abs_matchedpvxFraction_eta_none        ;
+    
+  TH2* m_clusters_pt_fraction_e                      ;
+  TH2* m_clusters_PV0_pt_fraction_e                  ;
+  TH2* m_clusters_PVX_pt_fraction_e                  ;
+  TH2* m_clusters_rejected_pt_fraction_e             ;
+  
+  TH1* m_clusters_all_neutral_eta                    ;
+  TH1* m_clusters_all_neutral_e                      ;
+  TH1* m_clusters_all_neutral_PV0_eta                ;
+  TH1* m_clusters_all_neutral_PV0_e                  ;
+  TH1* m_clusters_all_neutral_notPV0_eta             ;
+  TH1* m_clusters_all_neutral_notPV0_e               ;
+  TH1* m_clusters_all_neutral_neutral_eta            ;
+  TH1* m_clusters_all_neutral_neutral_e              ;
+  
+  TH1* m_trk_total_eta                                            ;
+  TH1* m_trk_total_pt                                             ;
+  TH2* m_trk_total_clusters_eta                                   ;
+  TH2* m_trk_total_clusters_pt                                    ;
+  TH1* m_trk_notMatching_deltar_fix_eta                           ;
+  TH1* m_trk_notMatching_deltar_fix_phi                           ;
+  TH1* m_trk_notMatching_deltar_fix_pt                            ;
+  TH2* m_trk_notMatching_deltar_fix_caloEntryUncTot_eta           ;
+  TH2* m_trk_notMatching_deltar_fix_caloEntryUncTot_pt            ;
+  TH2* m_trk_notMatching_deltar_fix_caloEntryUncTot_prodRadius    ;
+  TH1* m_trk_notMatching_deltar_var_eta                           ;
+  TH1* m_trk_notMatching_deltar_var_phi                           ;
+  TH1* m_trk_notMatching_deltar_var_pt                            ;
+  TH2* m_trk_notMatching_deltar_var_caloEntryUncTot_eta           ;
+  TH2* m_trk_notMatching_deltar_var_caloEntryUncTot_pt            ;
+  TH2* m_trk_notMatching_deltar_var_caloEntryUncTot_prodRadius    ;
+  TH1* m_trk_notMatching_deltar_none_eta                          ;
+  TH1* m_trk_notMatching_deltar_none_phi                          ;
+  TH1* m_trk_notMatching_deltar_none_pt                           ;
+  TH2* m_trk_notMatching_deltar_none_caloEntryUncTot_eta          ;
+  TH2* m_trk_notMatching_deltar_none_caloEntryUncTot_pt           ;
+  TH2* m_trk_notMatching_deltar_none_caloEntryUncTot_prodRadius   ;
+  TH1* m_trk_matching_deltar_fix_eta                              ;
+  TH1* m_trk_matching_deltar_fix_pt                               ;
+  TH1* m_trk_matching_deltar_var_eta                              ;
+  TH1* m_trk_matching_deltar_var_pt                               ;
+  TH1* m_trk_matching_deltar_onlyfix_eta                          ;
+  TH1* m_trk_matching_deltar_onlyfix_pt                           ;
+  TH1* m_trk_matching_deltar_onlyvar_eta                          ;
+  TH1* m_trk_matching_deltar_onlyvar_pt                           ;
+  TH1* m_trk_matching_deltar_fix_or_var_eta                       ;
+  TH1* m_trk_matching_deltar_fix_or_var_pt                        ;
+  TH1* m_trk_matching_deltar_fix_and_var_eta                      ;
+  TH1* m_trk_matching_deltar_fix_and_var_pt                       ;
+  TH2* m_trk_matching_deltar_or_clusters_eta                      ;
+  TH2* m_trk_matching_deltar_or_clusters_phi                      ;
+  TH2* m_trk_matching_deltar_or_clusters_pt                       ;
+  TH2* m_trk_matching_deltar_and_clusters_eta                     ;
+  TH2* m_trk_matching_deltar_and_clusters_phi                     ;
+  TH2* m_trk_matching_deltar_and_clusters_pt                      ;
+  TH2* m_trk_matching_deltar_fix_only_clusters_eta                ;
+  TH2* m_trk_matching_deltar_fix_only_clusters_phi                ;
+  TH2* m_trk_matching_deltar_fix_only_clusters_pt                 ;
+  TH2* m_trk_matching_deltar_var_only_clusters_eta                ;
+  TH2* m_trk_matching_deltar_var_only_clusters_phi                ;
+  TH2* m_trk_matching_deltar_var_only_clusters_pt                 ;
+  
+  TH1* m_trk_matchedFraction_eta_fix_and_var                      ;
+  TH1* m_trk_matchedFraction_eta_fix_or_var                       ;
+  TH1* m_trk_matchedFraction_eta_fix                              ;
+  TH1* m_trk_matchedFraction_eta_notfix                           ;
+  TH1* m_trk_matchedFraction_eta_var                              ;
+  TH1* m_trk_matchedFraction_eta_notvar                           ;
+  TH1* m_trk_matchedFraction_eta_onlyvar                          ;
+  TH1* m_trk_matchedFraction_eta_onlyfix                          ;
+  TH1* m_trk_matchedFraction_eta_none                             ;
+  TH1* m_trk_matchedFraction_pt_fix_and_var                       ;
+  TH1* m_trk_matchedFraction_pt_fix_or_var                        ;
+  TH1* m_trk_matchedFraction_pt_fix                               ;
+  TH1* m_trk_matchedFraction_pt_notfix                            ;
+  TH1* m_trk_matchedFraction_pt_var                               ;
+  TH1* m_trk_matchedFraction_pt_notvar                            ;
+  TH1* m_trk_matchedFraction_pt_onlyvar                           ;
+  TH1* m_trk_matchedFraction_pt_onlyfix                           ;
+  TH1* m_trk_matchedFraction_pt_none                              ;
+  
+  TH1* m_trk_pv0_total_eta                                        ;
+  TH1* m_trk_pv0_total_pt                                         ;
+  TH2* m_trk_pv0_caloEntryUncTot_eta                              ;
+  TH2* m_trk_pv0_caloEntryUncTot_pt                               ;
+  TH2* m_trk_pv0_caloEntryUncTot_truthpt                          ;
+  TH2* m_trk_pv0_total_clusters_eta                               ;
+  TH2* m_trk_pv0_total_clusters_pt                                ;
+  TH1* m_trk_pv0_matching_deltar_fix_eta                          ;
+  TH1* m_trk_pv0_matching_deltar_fix_pt                           ;
+  TH1* m_trk_pv0_matching_deltar_var_eta                          ;
+  TH1* m_trk_pv0_matching_deltar_var_pt                           ;
+  TH1* m_trk_pv0_notMatching_deltar_fix_eta                       ; 
+  TH1* m_trk_pv0_notMatching_deltar_fix_pt                        ;
+  TH1* m_trk_pv0_notMatching_deltar_var_eta                       ;
+  TH1* m_trk_pv0_notMatching_deltar_var_pt                        ;
+  TH1* m_trk_pv0_notMatching_deltar_none_eta                      ;
+  TH1* m_trk_pv0_notMatching_deltar_none_pt                       ;
+  TH1* m_trk_pv0_matching_deltar_fix_and_var_eta                  ;
+  TH1* m_trk_pv0_matching_deltar_fix_and_var_pt                   ;
+  TH1* m_trk_pv0_matching_deltar_fix_or_var_eta                   ;
+  TH1* m_trk_pv0_matching_deltar_fix_or_var_pt                    ;
+  TH1* m_trk_pv0_matching_deltar_onlyfix_eta                      ;
+  TH1* m_trk_pv0_matching_deltar_onlyfix_pt                       ;
+  TH1* m_trk_pv0_matching_deltar_onlyvar_eta                      ;
+  TH1* m_trk_pv0_matching_deltar_onlyvar_pt                       ;
+  TH1* m_trk_pv0_matchedFraction_eta_fix_and_var                  ;
+  TH1* m_trk_pv0_matchedFraction_eta_fix_or_var                   ;
+  TH1* m_trk_pv0_matchedFraction_eta_fix                          ;
+  TH1* m_trk_pv0_matchedFraction_eta_notfix                       ;
+  TH1* m_trk_pv0_matchedFraction_eta_var                          ;
+  TH1* m_trk_pv0_matchedFraction_eta_notvar                       ;
+  TH1* m_trk_pv0_matchedFraction_eta_onlyvar                      ;
+  TH1* m_trk_pv0_matchedFraction_eta_onlyfix                      ;
+  TH1* m_trk_pv0_matchedFraction_eta_none                         ;
+  TH1* m_trk_pv0_matchedFraction_pt_fix_and_var                   ;
+  TH1* m_trk_pv0_matchedFraction_pt_fix_or_var                    ;
+  TH1* m_trk_pv0_matchedFraction_pt_fix                           ;
+  TH1* m_trk_pv0_matchedFraction_pt_notfix                        ;
+  TH1* m_trk_pv0_matchedFraction_pt_var                           ;
+  TH1* m_trk_pv0_matchedFraction_pt_notvar                        ;
+  TH1* m_trk_pv0_matchedFraction_pt_onlyvar                       ;
+  TH1* m_trk_pv0_matchedFraction_pt_onlyfix                       ;
+  TH1* m_trk_pv0_matchedFraction_pt_none                          ;
+  
+  TH2* m_trk_pv0_caloEntryUncTot_eta_0SiHits                      ;
+  TH2* m_trk_pv0_caloEntryUncTot_pt_0SiHits                       ;
+  TH2* m_trk_pv0_caloEntryUncTot_rFirstHit_0SiHits                ;
+  TH2* m_trk_pv0_caloEntryUncTot_nSiHits                          ;
+  TH2* m_trk_pv0_caloEntryUncTot_rFirstHit                        ;
+    
+  TH1* m_tcc_pt                                                   ;
+  TH1* m_tcc_pt_etacut                                            ;
+  TH1* m_tcc_phi                                                  ;
+  TH1* m_tcc_eta                                                  ;
+  TH1* m_tcc_eta_ptcut                                            ;
+  TH1* m_tcc_m                                                    ;
+  TH1* m_tcc_taste                                                ;
+  TH2* m_tcc_taste_pt                                             ;
+  TH2* m_tcc_taste_pt_etacut                                      ;
+  TH2* m_tcc_taste_eta                                            ;
+  TH2* m_tcc_taste_eta_ptcut                                      ;
+  TH2* m_tcc_pt_truth_pt                                          ;
+  TH1* m_tcc_pt_response                                          ;
+  TH2* m_tcc_pt_track_pt                                          ;
+  TH1* m_tcc_pt_pseudoresponse                                    ;
+  TH2* m_tcc_N_M                                                  ;
+  TH2* m_tcc_N_M_pv0                                              ;
+  
+  TH2* m_trk_tcc_reco_pt_truth_pt                                 ;
+  TH1* m_trk_tcc_reco_pt_response                                 ;   
+      
+  // plot base has nop default implementation of this; we use it to book the histos
+  void initializePlots();
+  void finalizePlots();
+  
+};
+
+inline const xAOD::TruthParticle* TCCPlots::getTruthPtr(const xAOD::TrackParticle& trackParticle) const {
+  typedef ElementLink<xAOD::TruthParticleContainer> ElementTruthLink_t;
+  const xAOD::TruthParticle* result(nullptr);
+  // 0. is there any truth?
+  if (trackParticle.isAvailable<ElementTruthLink_t>("truthParticleLink")) {
+    // 1. ..then get link
+    const ElementTruthLink_t ptruthContainer = trackParticle.auxdata<ElementTruthLink_t>("truthParticleLink");
+    if (ptruthContainer.isValid()) {
+      result = *ptruthContainer;
+    }
+  }
+  return result;
+}
+
+inline const xAOD::TrackParticle* TCCPlots::getTrackParticlePtr(const xAOD::TrackCaloCluster& tcc) const {
+  typedef ElementLink<xAOD::TrackParticleContainer> ElementTruthLink_t;
+  const xAOD::TrackParticle* result(nullptr);
+  // 0. is there any truth?
+  if (tcc.isAvailable<ElementTruthLink_t>("trackParticleLink")) {
+    // 1. ..then get link
+    const ElementTruthLink_t ptrackContainer = tcc.auxdata<ElementTruthLink_t>("trackParticleLink");
+    if (ptrackContainer.isValid()) {
+      result = *ptrackContainer;
+    }
+  }
+  return result;
+}
+
+
+
+#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TCCPLOTS_H
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlotsBase.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlotsBase.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ccd22af9e50ca4235e217e814bb1f7b014dfb3e5
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlotsBase.cxx
@@ -0,0 +1,165 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TCCPlotsBase.h"
+
+// bring Gaudi utilities in scope
+#include "GaudiKernel/Bootstrap.h"
+#include "GaudiKernel/ISvcLocator.h"
+#include "GaudiKernel/Service.h"
+#include "GaudiKernel/IToolSvc.h"
+
+// to retrieve HistogramDefinitionSvc
+#include "InDetPhysValMonitoring/HistogramDefinitionSvc.h"
+#include "InDetPhysValMonitoring/SingleHistogramDefinition.h"
+
+#include <cmath>
+
+using CLHEP::GeV;
+
+namespace {
+  bool
+  validArguments(const float arg) {
+    return not (std::isnan(arg));
+  }
+
+  bool
+  validArguments(const float arg1, const float arg2) {
+    return not (std::isnan(arg1) or std::isnan(arg2));
+  }
+  
+  bool
+  validArguments(const float arg1, const float arg2, const float arg3) {
+    return not (std::isnan(arg1) or std::isnan(arg2) or std::isnan(arg3));
+  }
+}
+
+TCCPlotsBase::TCCPlotsBase(PlotBase* pParent, std::string folder):
+  PlotBase(pParent, folder), 
+  m_folder(folder),
+  m_histoDefSvc(nullptr) {}  
+  
+
+void TCCPlotsBase::book(TH1*& pHisto, const std::string& histoIdentifier, const std::string& folder) {
+  const SingleHistogramDefinition hd = retrieveDefinition(histoIdentifier, folder);
+  if (hd.empty()) {
+    ATH_MSG_WARNING("Histogram definition is empty for identifier " << histoIdentifier);
+  }
+  book(pHisto, hd);
+  return;
+}
+
+void TCCPlotsBase::book(TH1*& pHisto, const SingleHistogramDefinition& hd) {
+  if (hd.isValid()) {
+    pHisto = Book1D(hd.name, hd.allTitles, 
+		    hd.nBinsX, hd.xAxis.first, hd.xAxis.second, 
+		    false);
+  }
+  return;
+}
+
+void TCCPlotsBase::book(TH2*& pHisto, const std::string& histoIdentifier, const std::string& folder) {
+  const SingleHistogramDefinition hd = retrieveDefinition(histoIdentifier, folder);
+  if (hd.empty()) {
+    ATH_MSG_WARNING("Histogram definition is empty for identifier " << histoIdentifier);
+  }
+  book(pHisto, hd);
+  return;
+}
+
+void TCCPlotsBase::book(TH2*& pHisto, const SingleHistogramDefinition& hd) {
+  if (hd.isValid()) {
+    pHisto = Book2D(hd.name, hd.allTitles, 
+		    hd.nBinsX, hd.xAxis.first, hd.xAxis.second, 
+		    hd.nBinsY, hd.yAxis.first, hd.yAxis.second, 
+		    false);
+  }
+  return;
+}
+
+void TCCPlotsBase::book(TH3*& pHisto, const std::string& histoIdentifier, const std::string& folder) {
+  const SingleHistogramDefinition hd = retrieveDefinition(histoIdentifier, folder);
+  if (hd.empty()) {
+    ATH_MSG_WARNING("Histogram definition is empty for identifier " << histoIdentifier);
+  }
+  book(pHisto, hd);
+  return;
+}
+
+void TCCPlotsBase::book(TH3*& pHisto, const SingleHistogramDefinition& hd) {
+  if (hd.isValid()) {
+    pHisto = Book3D(hd.name, hd.allTitles, 
+		    hd.nBinsX, hd.xAxis.first, hd.xAxis.second, 
+		    hd.nBinsY, hd.yAxis.first, hd.yAxis.second, 
+		    hd.nBinsZ, hd.zAxis.first, hd.zAxis.second,
+		    false);
+  }
+  return;
+}
+
+// 
+void TCCPlotsBase::fillHisto(TH1* pTh1, const float value) {
+  if (pTh1 and validArguments(value)) {
+    pTh1->Fill(value);
+  }
+}
+
+void TCCPlotsBase::fillHisto(TH1* pTh1, const float value, const float weight) {
+  if (pTh1 and validArguments(value)) {
+    pTh1->Fill(value, weight);
+  }
+}
+
+//
+void TCCPlotsBase::fillHisto(TH2* pTh2, const float xval, const float yval) {
+  if (pTh2 and validArguments(xval, yval)) {
+    pTh2->Fill(xval, yval);
+  }
+}
+
+void TCCPlotsBase::fillHisto(TH2* pTh2, const float xval, const float yval, const float weight) {
+  if (pTh2 and validArguments(xval, yval)) {
+    pTh2->Fill(xval, yval, weight);
+  }
+}
+
+//
+void TCCPlotsBase::fillHisto(TH3* pTh3, const float xval, const float yval, const float zval) {
+  if (pTh3 and validArguments(xval, yval, zval)) {
+    pTh3->Fill(xval, yval, zval);
+  }
+}
+
+void TCCPlotsBase::fillHisto(TH3* pTh3, const float xval, const float yval, const float zval, const float weight) {
+  if (pTh3 and validArguments(xval, yval, zval)) {
+    pTh3->Fill(xval, yval, zval, weight);
+  }
+}
+  
+SingleHistogramDefinition TCCPlotsBase::retrieveDefinition(const std::string& histoIdentifier, const std::string& folder) {
+  SingleHistogramDefinition s; // invalid result
+  
+  ATH_MSG_DEBUG("Retrieving SingleHistogramDefinition for "<< histoIdentifier);
+
+  if (not m_histoDefSvc) {
+    ISvcLocator* svcLoc = Gaudi::svcLocator();
+    StatusCode sc = svcLoc->service("HistogramDefinitionSvc", m_histoDefSvc);
+    if (sc.isFailure()) {
+      ATH_MSG_FATAL("failed to retrieve HistogramDefinitionSvc in " << __FILE__);
+      throw std::runtime_error("Could initialise the HistogramDefinitionSvc");
+      return s;
+    }
+  }
+  bool folderDefault = (folder.empty() or folder == "default");
+  s = m_histoDefSvc->definition(histoIdentifier, folder);
+  // "default" and empty string should be equivalent
+  if (folderDefault and s.empty()) {
+    const std::string otherDefault = (folder.empty()) ? ("default") : "";
+    s = m_histoDefSvc->definition(histoIdentifier, otherDefault);
+  }
+  if (s.empty()) {
+    ATH_MSG_WARNING("Histogram definition is empty for identifier " << histoIdentifier);
+  }
+  return s;
+}
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlotsBase.h b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlotsBase.h
new file mode 100644
index 0000000000000000000000000000000000000000..aacca1a5fefeb203305493711c159e3f5e619cac
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TCCPlotsBase.h
@@ -0,0 +1,70 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TCCPLOTSBASE_H
+#define TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TCCPLOTSBASE_H
+
+#include "TrkValHistUtils/PlotBase.h"
+#include "CLHEP/Units/SystemOfUnits.h"
+#include "xAODBase/IParticle.h"
+#include "AthenaKernel/MsgStreamMember.h"
+
+class IHistogramDefinitionSvc;
+class SingleHistogramDefinition;
+
+class TCCPlotsBase:public PlotBase {
+    public:
+      TCCPlotsBase(PlotBase* pParent, std::string folder);
+      
+      /// Retrieve a single histogram definition, given the unique string identifier
+      SingleHistogramDefinition retrieveDefinition(const std::string& histoIdentifier,
+						   const std::string& folder = "default");
+      
+      /// Book a TH1 histogram
+      void book(TH1*& pHisto, const SingleHistogramDefinition& hd);
+      /// Book a TH1 histogram with optional folder name
+      void book(TH1*& pHisto, const std::string& histoIdentifier, const std::string& folder = "default");
+            
+      /// Book a 2D histogram (TH2)
+      void book(TH2*& pHisto, const SingleHistogramDefinition& hd);
+      /// Book a 2D histogram (TH2) with optional folder name
+      void book(TH2*& pHisto, const std::string& histoIdentifier, const std::string& folder = "default");
+      
+      /// Book a 3D histogram (TH3)
+      void book(TH3*& pHisto, const SingleHistogramDefinition& hd);
+      /// Book a 3D histogram (TH3) with optional folder name
+      void book(TH3*& pHisto, const std::string& histoIdentifier, const std::string& folder = "default");
+
+      //
+      void fillHisto(TH1* pTh1, const float value);
+      void fillHisto(TH1* pTh1, const float value, const float weight);
+      void fillHisto(TH2* pTh2, const float xval, const float yval);
+      void fillHisto(TH2* pTh2, const float xval, const float yval, const float weight);
+      void fillHisto(TH3* pTh3, const float xval, const float yval, const float zval);
+      void fillHisto(TH3* pTh3, const float xval, const float yval, const float zval, const float weight);
+
+      std::string m_folder;
+            
+    protected:
+      /// Log a message using the Athena controlled logging system
+      MsgStream&
+      msg(MSG::Level lvl) const {
+        return m_msg.get() << lvl;
+      }
+    
+      /// Check whether the logging system is active at the provided verbosity level
+      bool
+      msgLvl(MSG::Level lvl) {
+        return m_msg.get().level() <= lvl;
+      }
+    
+      /// Private message stream member
+      mutable Athena::MsgStreamMember m_msg;
+      
+    private:
+      IHistogramDefinitionSvc* m_histoDefSvc;
+
+};
+
+#endif // TRACKCALOCLUSTERREC_TRACKCALOCLUSTERRECVALIDATION_TCCPLOTSBASE_H
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TrackCaloClusterRecValidationTool.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TrackCaloClusterRecValidationTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..cfc2931610e4d93f220d6ffe55ecdbd629c93ff2
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/TrackCaloClusterRecValidationTool.cxx
@@ -0,0 +1,474 @@
+#include "TrackCaloClusterRecValidation/TrackCaloClusterRecValidationTool.h"
+//
+#include "xAODTruth/TruthParticle.h"
+#include "xAODJet/JetContainer.h"
+#include "xAODEventInfo/EventInfo.h"
+#include "xAODEventInfo/EventAuxInfo.h"
+
+#include "EventInfo/EventInfo.h"
+#include "EventInfo/EventID.h"
+#include "EventInfo/EventType.h"
+#include "EventInfo/PileUpEventInfo.h"
+#include "EventInfo/PileUpTimeEventIndex.h"
+
+#include "xAODCaloEvent/CaloClusterContainer.h"
+#include "xAODCore/ShallowCopy.h"
+#include "xAODParticleEvent/IParticleLink.h"
+#include "xAODPFlow/TrackCaloClusterContainer.h"
+
+#include "JetCalibTools/JetCalibrationTool.h"
+
+#include "TCCPlots.h"
+//
+#include <algorithm>
+#include <limits>
+#include <cmath> // to get std::isnan(), std::abs etc.
+// #include <functional> // to get std::plus
+#include <utility>
+#include <cstdlib> // to getenv
+#include <vector>
+
+using CLHEP::GeV;
+
+///Parametrized constructor
+TrackCaloClusterRecValidationTool::TrackCaloClusterRecValidationTool(const std::string& type, const std::string& name,
+								     const IInterface* parent) :
+  ManagedMonitorToolBase(type, name, parent),
+  m_jetCalibrationTools()
+  {
+  declareProperty("JetCalibrationTools"         , m_jetCalibrationTools);
+  declareProperty("ApplyCalibration"            , m_applyCalibration = false);
+  declareProperty("CollectionsToCalibrate"      , m_jetCalibrationCollections);
+  declareProperty("SaveJetInfo"                 , m_saveJetInfo = true);
+  declareProperty("JetTruthContainerName"       , m_truthJetContainerName);
+  declareProperty("JetTruthTrimmedContainerName", m_truthTrimmedJetContainerName);
+  declareProperty("JetContainerNames"           , m_jetContainerNames);
+  declareProperty("PrimaryVertexContainerName"  , m_vertexContainerName = "PrimaryVertices");
+  declareProperty("TopoJetReferenceName"        , m_topoJetReferenceName = "AntiKt10LCTopoJets");
+  declareProperty("TopoTrimmedJetReferenceName" , m_topoTrimmedJetReferenceName = "AntiKt10LCTopoTrimmedJets");
+  declareProperty("maxTrkJetDR"                 , m_maxJetDR = 0.75);
+  declareProperty("maxEta"                      , m_maxEta   = 2.0);
+  declareProperty("minPt"                       , m_minPt    = 200*GeV);
+  declareProperty("minMass"                     , m_minMass  =  50.*GeV);
+  declareProperty("maxMass"                     , m_maxMass  = 150.*GeV);
+  declareProperty("DirName"                     , m_dirName = "TCCValidation/");
+  declareProperty("SubFolder"                   , m_folder);
+  declareProperty("SaveTrackInfo"               , m_saveTrackInfo = false);
+  declareProperty("SaveMatchingInfo"            , m_saveMatchingInfo = false);
+  declareProperty("TrackCollectionName"         , m_trackParticleCollectionName = "InDetTrackParticles");
+  declareProperty("TrackPtMin"                  , m_trackPtMin = 20.*GeV);
+  declareProperty("JetPtBins"                   , m_jetPtBins           );
+  declareProperty("JetMassOverPtBins"           , m_jetMassOverPtBins   );
+  declareProperty("TrackPtBins"                 , m_trackPtBins         );
+  declareProperty("TrackProdRadiusBins"         , m_trackProdRadiusBins );
+  declareProperty("SaveClusterInfo"             , m_saveClusterInfo = false);
+  declareProperty("ClusterCollectionName"       , m_caloClusterCollectionName = "TimedCaloCalTopoClusters");
+  declareProperty("ClusterEtaMax"               , m_caloClusterEtaMax = 2.5);
+  declareProperty("SaveTrackCaloClusterInfo"    , m_saveTCCInfo = false);
+  declareProperty("TCCCombinedCollectionNames"  , m_TCCCombinedCollectionNames);
+  declareProperty("TCCptMin"                    , m_tccPtMin = 10.*GeV);
+  declareProperty("TCCetaMax"                   , m_tccEtaMax = 2.5);
+  
+  }
+
+TrackCaloClusterRecValidationTool::~TrackCaloClusterRecValidationTool() {
+}
+
+StatusCode
+TrackCaloClusterRecValidationTool::initialize() {
+  ATH_MSG_DEBUG("Initializing " << name() << "...");
+  ATH_CHECK(ManagedMonitorToolBase::initialize());
+  
+  // retrieve the jet calibration tool
+  if (m_applyCalibration) {
+    if (m_jetCalibrationCollections.size() != m_jetCalibrationTools.size()) {
+      ATH_MSG_WARNING("Number of collections to calibrate differs from the number of calibration tools... switching off calibration!");
+      m_applyCalibration=false;
+    }
+    CHECK( m_jetCalibrationTools.retrieve() );
+  }
+  
+  if (m_saveJetInfo) {
+    for (auto name : m_jetContainerNames) {
+      ATH_MSG_INFO("Saving Plots for " << name << "...");
+      std::string myname = name;
+      if (name.find("AntiKt10LCTopo")!= std::string::npos and name.find("My")== std::string::npos)
+	myname = "My"+name;
+      
+      if (name == "AntiKt10TrackCaloClustersChargedJets")
+	myname = "AntiKt10TrackCaloClustersCombinedJets";
+      if (name == "AntiKt10TrackCaloClustersChargedTrimmedJets")
+	myname = "AntiKt10TrackCaloClustersCombinedTrimmedJets";
+      
+      m_tccPlots.insert(std::pair<std::string, TCCPlots*>(name, new TCCPlots(0, m_dirName + myname, "jets")));
+      m_tccPlots.at(name)->setJetPtBinning(m_jetPtBins);
+      m_tccPlots.at(name)->setJetMassOverPtBinning(m_jetMassOverPtBins);
+    }
+  }
+  
+  if (m_saveTrackInfo) {
+   ATH_MSG_INFO("Saving Plots for " << m_trackParticleCollectionName << "...");
+    m_tccPlots.insert(std::pair<std::string, TCCPlots*>(m_trackParticleCollectionName, new TCCPlots(0, m_dirName + m_trackParticleCollectionName, "tracks")));
+    m_tccPlots.at(m_trackParticleCollectionName)->setTrackPtBinning(m_trackPtBins);
+    m_tccPlots.at(m_trackParticleCollectionName)->setTrackProdRadiusBinning(m_trackProdRadiusBins);
+  }
+  
+  if (m_saveClusterInfo) {
+    ATH_MSG_INFO("Saving Plots for " << m_caloClusterCollectionName << "...");
+    m_tccPlots.insert(std::pair<std::string, TCCPlots*>(m_caloClusterCollectionName, new TCCPlots(0, m_dirName + m_caloClusterCollectionName, "clusters")));    
+  }
+  
+  if (m_saveTCCInfo) {
+    for (auto name : m_TCCCombinedCollectionNames) {
+      ATH_MSG_INFO("Saving Plots for " << name << "...");
+      m_tccPlots.insert(std::pair<std::string, TCCPlots*>(name, new TCCPlots(0, m_dirName + name, "tccs")));
+      m_tccPlots.at(name)->setTrackPtBinning(m_trackPtBins);
+    }
+  }
+  
+  return StatusCode::SUCCESS;
+}
+
+StatusCode
+TrackCaloClusterRecValidationTool::fillHistograms() {
+  
+  const EventInfo* info = nullptr;
+  if (evtStore()->retrieve(info).isFailure()){
+    ATH_MSG_FATAL( "Unable to retrieve Event Info" );
+  } 
+  float mcEventWeight = info->event_type()->mc_event_weight();
+  
+  if (m_saveJetInfo) {
+    ATH_MSG_DEBUG("Filling hists " << name() << "...");
+        
+    const auto vertices = getContainer<xAOD::VertexContainer>(m_vertexContainerName);
+        
+    // retrieve jet container
+    for (auto name : m_jetContainerNames) {
+      
+      m_tccPlots.at(name)->setEventWeight(mcEventWeight);
+      ATH_MSG_DEBUG("Using Container " << name << "...");
+      ATH_MSG_DEBUG("-- weight = " << mcEventWeight << "...");
+    
+      const auto jets_beforeCalib = getContainer<xAOD::JetContainer>(name);
+      if (not jets_beforeCalib) return StatusCode::FAILURE;
+      
+      const xAOD::JetContainer* jets = jets_beforeCalib;
+              
+      if (m_applyCalibration and std::find(m_jetCalibrationCollections.begin(), m_jetCalibrationCollections.end(), name)!=m_jetCalibrationCollections.end()) {
+	/** Calibrate and record a shallow copy of the jet container */
+	jets = calibrateAndRecordShallowCopyJetCollection(jets_beforeCalib, name);
+	if(!jets){
+	  ATH_MSG_WARNING(  "Unable to create calibrated jet shallow copy container" );
+	  return StatusCode::SUCCESS;
+	}
+      }
+    
+      // Getting the collections for the pseudo response
+      const auto caloclusters = (name.find("Trimmed")== std::string::npos) ?
+                                 getContainer<xAOD::JetContainer>(m_topoJetReferenceName) :
+                                 getContainer<xAOD::JetContainer>(m_topoTrimmedJetReferenceName);
+      const auto truths = (name.find("Trimmed")== std::string::npos) ?
+                          getContainer<xAOD::JetContainer>(m_truthJetContainerName) :
+                          getContainer<xAOD::JetContainer>(m_truthTrimmedJetContainerName);
+      
+      if (not truths) return StatusCode::FAILURE;
+    
+      if (not caloclusters) return StatusCode::FAILURE;
+      
+      m_tccPlots.at(name)->fill(*jets);
+      
+      for (const auto& jet: *jets) {
+	// conditions to be satisfied to select jets
+	if (fabs(jet->eta())>m_maxEta) continue;
+      
+	// get the truth matched
+	const xAOD::Jet* truth_matched_nocuts = ClusterMatched(jet,truths);
+	// if truth_matched exists, fill the response w/o pt and mass cuts
+	if (truth_matched_nocuts)
+	  m_tccPlots.at(name)->fillResponseNoPtNoMassCuts(*jet,*truth_matched_nocuts);
+	
+	if (fabs(jet->pt())<m_minPt) continue;
+	
+	// fill all jets histograms
+	m_tccPlots.at(name)->fill(*jet);
+	m_tccPlots.at(name)->fillMoments(*jet);
+	
+	// fill all jets histograms + truth
+	for (const auto& truth: *truths)
+	m_tccPlots.at(name)->fill(*jet,*truth);
+	
+	// get the truth matched
+	const xAOD::Jet* truth_matched = ClusterMatched(jet,truths);
+	
+	// apply mass requirement on the truth jet once you have matched
+	if (not truth_matched or (truth_matched->m()<m_minMass or truth_matched->m()>m_maxMass))
+	  continue;
+	
+	// if truth_matched exists, fill the jet histograms + truth matched
+	m_tccPlots.at(name)->fillResponse(*jet,*truth_matched);
+	m_tccPlots.at(name)->fillMomentsWithMassCut(*jet);
+	
+	if (vertices)
+	  m_tccPlots.at(name)->fillResponseNPV(*jet,*truth_matched,vertices->size());
+	
+	// get the calo matched
+	const xAOD::Jet* calo_matched = ClusterMatched(jet,caloclusters);
+	// if calo_matched exists, fill the jet histograms + calo matched
+	if (calo_matched)
+	  m_tccPlots.at(name)->fillPseudoResponse(*jet,*calo_matched);
+      }
+    
+    
+      ATH_MSG_DEBUG("All jets histograms filled! ...");
+    
+      // evaluate the leadings in mass of the leadings is pt
+      std::vector<const xAOD::Jet*> leadings = {nullptr, nullptr};
+      std::vector<const xAOD::Jet*> leadings_nocuts = {nullptr, nullptr};
+    
+      std::vector<const xAOD::Jet*> tmp_leadings;
+      if (jets->size()>0)
+	tmp_leadings.push_back(jets->at(0));
+      if (jets->size()>1)
+	tmp_leadings.push_back(jets->at(1));
+    
+      if (tmp_leadings.size()>1 and tmp_leadings.at(0)->m()<tmp_leadings.at(1)->m()) std::swap(tmp_leadings.at(0), tmp_leadings.at(1));
+    
+      // fill the leadings jets if they satisfy the eta requirement
+      if (tmp_leadings.size()>0 
+	and fabs(tmp_leadings.at(0)->eta())<m_maxEta)
+	leadings_nocuts.at(0) = tmp_leadings.at(0);
+    
+      if (tmp_leadings.size()>1 
+	and fabs(tmp_leadings.at(1)->eta())<m_maxEta)
+	leadings_nocuts.at(1) = tmp_leadings.at(1);
+    
+      std::vector<const xAOD::Jet*> truth_matches_nocuts  = {nullptr, nullptr};
+      unsigned int pos = 0;
+      for (const auto& jet: leadings_nocuts) {
+	pos++;
+	if (not jet) continue;
+	const xAOD::Jet* truth_matched_nocuts = ClusterMatched(jet,truths);
+	if (truth_matched_nocuts)
+	  truth_matches_nocuts.at(pos-1) = truth_matched_nocuts;
+      }
+    
+      if (leadings_nocuts.at(0)) {
+	ATH_MSG_DEBUG(" ---> fillLeading w/o cuts ...");
+	if (truth_matches_nocuts.at(0)) 
+	  m_tccPlots.at(name)->fillResponseNoPtNoMassCutsLeading(*leadings_nocuts.at(0),*truth_matches_nocuts.at(0));
+      ATH_MSG_DEBUG("Leading jet w/o cuts histograms filled! ...");
+    }
+    
+    if (leadings_nocuts.at(1)) {
+      ATH_MSG_DEBUG(" ---> fillSubLeading w/o cuts ...");
+      if (truth_matches_nocuts.at(1)) 
+	m_tccPlots.at(name)->fillResponseNoPtNoMassCutsSubLeading(*leadings_nocuts.at(1),*truth_matches_nocuts.at(1));
+	ATH_MSG_DEBUG("SubLeading jet w/o cuts histograms filled! ...");
+    }  
+    
+      // fill the leadings jets if they satisfy the eta and pt requirements
+      if (tmp_leadings.size()>0 
+	and fabs(tmp_leadings.at(0)->eta())<m_maxEta 
+	and tmp_leadings.at(0)->pt()>m_minPt)
+	leadings.at(0) = tmp_leadings.at(0);
+    
+      if (tmp_leadings.size()>1 
+	and fabs(tmp_leadings.at(1)->eta())<m_maxEta 
+	and tmp_leadings.at(1)->pt()>m_minPt)
+	leadings.at(1) = tmp_leadings.at(1);
+    
+      if (leadings.at(0)) {
+	m_tccPlots.at(name)->fillLeading(*leadings.at(0));
+	m_tccPlots.at(name)->fillMomentsLeading(*leadings.at(0));
+      }
+    
+      if (leadings.at(1)) {
+	m_tccPlots.at(name)->fillSubLeading(*leadings.at(1));
+	m_tccPlots.at(name)->fillMomentsSubLeading(*leadings.at(1));
+      }
+       
+      std::vector<const xAOD::Jet*> truth_matches         = {nullptr, nullptr};
+      std::vector<const xAOD::Jet*>  calo_matches         = {nullptr, nullptr};
+      pos = 0;
+      for (const auto& jet: leadings) {
+	pos++;
+	if (not jet) continue;
+	const xAOD::Jet* truth_matched = ClusterMatched(jet,truths);
+	if (truth_matched)
+	  truth_matches.at(pos-1) = truth_matched;
+	const xAOD::Jet* calo_matched  = ClusterMatched(jet,caloclusters);
+	if (calo_matched)
+	  calo_matches.at(pos-1) = calo_matched;
+      }
+    
+      if (leadings.at(0)) {
+	ATH_MSG_DEBUG(" ---> fillLeading ...");
+	if (truth_matches.at(0) and (truth_matches.at(0)->m()>m_minMass and truth_matches.at(0)->m()<m_maxMass)) {
+	  m_tccPlots.at(name)->fillMomentsLeadingWithMassCut(*leadings.at(0));
+	  m_tccPlots.at(name)->fillResponseLeading(*leadings.at(0),*truth_matches.at(0));
+	  if (vertices)
+	    m_tccPlots.at(name)->fillResponseLeadingNPV(*leadings.at(0),*truth_matches.at(0),vertices->size());
+	  if (calo_matches.at(0))
+	    m_tccPlots.at(name)->fillPseudoResponseLeading(*leadings.at(0),*calo_matches.at(0));
+	}
+	ATH_MSG_DEBUG("Leading jet histograms filled! ...");
+      }
+    
+      if (leadings.at(1)) {
+	ATH_MSG_DEBUG(" ---> fillSubLeading ...");
+	if (truth_matches.at(1) and (truth_matches.at(1)->m()>m_minMass and truth_matches.at(1)->m()<m_maxMass)) {
+	  m_tccPlots.at(name)->fillMomentsSubLeadingWithMassCut(*leadings.at(1));
+	  m_tccPlots.at(name)->fillResponseSubLeading(*leadings.at(1),*truth_matches.at(1));
+	  if (vertices)
+	    m_tccPlots.at(name)->fillResponseSubLeadingNPV(*leadings.at(1),*truth_matches.at(1),vertices->size());
+	  if (calo_matches.at(1))
+	    m_tccPlots.at(name)->fillPseudoResponseSubLeading(*leadings.at(1),*calo_matches.at(1));
+	}
+	ATH_MSG_DEBUG("SubLeading jet histograms filled! ...");
+      }     
+    }
+  }
+  
+  // Getting the collections for TrackParticles
+  if (m_saveTrackInfo) {
+    const auto tracks = getContainer<xAOD::TrackParticleContainer>(m_trackParticleCollectionName);
+    if (not tracks) return StatusCode::FAILURE;
+    for (const auto& track: *tracks) {
+      if (m_saveMatchingInfo)
+	m_tccPlots.at(m_trackParticleCollectionName)->fillMatching(*track);
+      m_tccPlots.at(m_trackParticleCollectionName)->fillTrackParametersAllPt(*track);
+      m_tccPlots.at(m_trackParticleCollectionName)->fillCaloEntryInfoAllPt(*track);
+      m_tccPlots.at(m_trackParticleCollectionName)->fillPerigeeInfoAllPt(*track);
+      m_tccPlots.at(m_trackParticleCollectionName)->fillPerigeeVsCaloEntryAllPt(*track);
+      if (track->pt()<m_trackPtMin) continue;
+      m_tccPlots.at(m_trackParticleCollectionName)->fillTrackParameters(*track);
+      m_tccPlots.at(m_trackParticleCollectionName)->fillCaloEntryInfo(*track);
+      m_tccPlots.at(m_trackParticleCollectionName)->fillPerigeeInfo(*track);
+      m_tccPlots.at(m_trackParticleCollectionName)->fillPerigeeVsCaloEntry(*track);
+    }    
+  }
+  
+  // Getting the collections for the CaloClusters
+  if (m_saveClusterInfo) {
+   const auto clusters = getContainer<xAOD::CaloClusterContainer>(m_caloClusterCollectionName);
+   if (not clusters) return StatusCode::FAILURE;
+   for (const auto& cluster: *clusters) {
+     m_tccPlots.at(m_caloClusterCollectionName)->fillCluster(*cluster);
+     if (fabs(cluster->eta())<m_caloClusterEtaMax)
+       m_tccPlots.at(m_caloClusterCollectionName)->fillClusterEtaCut(*cluster);
+   }    
+  }
+  
+  // Getting the collections for the TrackCaloClusters
+  if (m_saveTCCInfo) {
+    for (auto name : m_TCCCombinedCollectionNames) {
+      const auto tccs = getContainer<xAOD::TrackCaloClusterContainer>(name);
+      if (not tccs) return StatusCode::FAILURE;
+      // fill the map with all the tracks creating tcc (means from PV0)
+      std::vector<const xAOD::TrackParticle*> allpv0tracks;
+      for (const auto& tcc: *tccs) {
+	allpv0tracks.push_back(*tcc->trackParticleLink());
+      }
+      
+      for (const auto& tcc: *tccs) {
+	m_tccPlots.at(name)->fillTCC(*tcc, allpv0tracks);
+	if (tcc->pt()>m_tccPtMin)
+	  m_tccPlots.at(name)->fillTCCptCut(*tcc);
+	if (fabs(tcc->eta())<m_tccEtaMax)
+	  m_tccPlots.at(name)->fillTCCetaCut(*tcc);
+      }
+    } 
+  }
+  
+  return StatusCode::SUCCESS;
+}
+
+const xAOD::Jet* TrackCaloClusterRecValidationTool::ClusterMatched(const xAOD::Jet* jet, const xAOD::JetContainer* jets) {
+  std::vector<const xAOD::Jet*> myjets = {};
+  for (const auto& tomatch: *jets) myjets.push_back(tomatch);  
+  return ClusterMatched(jet, myjets);
+}
+
+const xAOD::Jet* TrackCaloClusterRecValidationTool::ClusterMatched(const xAOD::Jet* jet, std::vector<const xAOD::Jet*> jets) {
+  double minDeltaR = m_maxJetDR;
+  const xAOD::Jet* matched = 0;
+  for (const auto& tomatch: jets) {
+    if (jet->p4().DeltaR(tomatch->p4()) < minDeltaR) {
+      minDeltaR = jet->p4().DeltaR(tomatch->p4());
+      matched = tomatch;
+    }
+  }
+  return matched;
+}
+
+StatusCode
+TrackCaloClusterRecValidationTool::bookHistograms() {
+  ATH_MSG_INFO("Booking hists " << name() << "...");
+  for (auto& plots : m_tccPlots) {
+    plots.second->setDetailLevel(100); // DEBUG, enable expert histograms
+    plots.second->initialize();
+    std::vector<HistData> hists = plots.second->retrieveBookedHistograms();
+    for (auto hist : hists) {
+      ATH_CHECK(regHist(hist.first, hist.second, all)); 
+    }
+  }
+  
+  return StatusCode::SUCCESS;
+}
+
+StatusCode
+TrackCaloClusterRecValidationTool::procHistograms() {
+  ATH_MSG_INFO("Finalising hists " << name() << "...");
+  
+  if (endOfRunFlag()) {
+    for (auto& plots : m_tccPlots) 
+      plots.second->finalize();
+  }
+  
+  ATH_MSG_INFO("Successfully finalized hists");
+  return StatusCode::SUCCESS;
+}
+
+/**Calibrate and record a shallow copy of a given jet container */
+const xAOD::JetContainer* TrackCaloClusterRecValidationTool::calibrateAndRecordShallowCopyJetCollection(const xAOD::JetContainer * jetContainer, const std::string name) {
+  
+  // create a shallow copy of the jet container
+  std::pair< xAOD::JetContainer*, xAOD::ShallowAuxContainer* >  shallowCopy = xAOD::shallowCopyContainer(*jetContainer);
+  xAOD::JetContainer *jetContainerShallowCopy           = shallowCopy.first;
+  xAOD::ShallowAuxContainer *jetAuxContainerShallowCopy = shallowCopy.second;
+ 
+  if( evtStore()->record(jetContainerShallowCopy, name+"_Calib").isFailure() ){
+    ATH_MSG_WARNING("Unable to record JetCalibratedContainer: " << name+"_Calib");
+    return 0;
+  }
+  if( evtStore()->record(jetAuxContainerShallowCopy, name+"_Calib"+"Aux.").isFailure() ){
+    ATH_MSG_WARNING("Unable to record JetCalibratedAuxContainer: " << name+"_Calib"+"Aux.");
+    return 0;
+  }
+  
+  static SG::AuxElement::Accessor< xAOD::IParticleLink > accSetOriginLink ("originalObjectLink");
+  static SG::AuxElement::Decorator< float > decJvt("JvtUpdate");
+
+  int pos = std::find(m_jetCalibrationCollections.begin(), m_jetCalibrationCollections.end(), name) - m_jetCalibrationCollections.begin();
+  for ( xAOD::Jet *shallowCopyJet : * jetContainerShallowCopy ) {
+    
+    if( m_jetCalibrationTools[pos]->applyCalibration(*shallowCopyJet).isFailure() ){
+      ATH_MSG_WARNING( "Failed to apply calibration to the jet container"); 
+      return 0;
+    }
+    const xAOD::IParticleLink originLink( *jetContainer, shallowCopyJet->index() );
+    accSetOriginLink(*shallowCopyJet) = originLink;
+  }
+
+  if( evtStore()->setConst(jetContainerShallowCopy ).isFailure() ){
+    ATH_MSG_WARNING( "Failed to set jetcalibCollection (" << name+"_Calib"+"Aux." << ")const in StoreGate!"); 
+    return 0;
+  }
+  if( evtStore()->setConst(jetAuxContainerShallowCopy ).isFailure() ){
+    ATH_MSG_WARNING( "Failed to set jetcalibCollection (" << name+"_Calib"+"Aux." << ")const in StoreGate!"); 
+    return 0;
+  }
+  
+  return jetContainerShallowCopy; 
+}
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/components/TrackCaloClusterRecValidation_entries.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/components/TrackCaloClusterRecValidation_entries.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..a23fee784303f860f25fe78c1270f3b4fd05b343
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/components/TrackCaloClusterRecValidation_entries.cxx
@@ -0,0 +1,11 @@
+#include "GaudiKernel/DeclareFactoryEntries.h"
+#include "TrackCaloClusterRecValidation/TrackCaloClusterRecValidationTool.h"
+#include "TrackCaloClusterRecValidation/CalibrationNtupleMakerTool.h"
+
+DECLARE_TOOL_FACTORY(TrackCaloClusterRecValidationTool)
+DECLARE_ALGORITHM_FACTORY(CalibrationNtupleMakerTool)
+
+DECLARE_FACTORY_ENTRIES(TrackCaloClusterRecValidation){
+    DECLARE_TOOL(TrackCaloClusterRecValidationTool)
+    DECLARE_ALGORITHM(CalibrationNtupleMakerTool)
+}
\ No newline at end of file
diff --git a/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/components/TrackCaloClusterRecValidation_load.cxx b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/components/TrackCaloClusterRecValidation_load.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..269de5f44d1fcc0922606af8cc6800052b753b99
--- /dev/null
+++ b/Reconstruction/TrackCaloClusterRec/TrackCaloClusterRecValidation/src/components/TrackCaloClusterRecValidation_load.cxx
@@ -0,0 +1,3 @@
+#include "GaudiKernel/LoadFactoryEntries.h"
+
+LOAD_FACTORY_ENTRIES(TrackCaloClusterRecValidation)
\ No newline at end of file
diff --git a/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.h b/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.h
index bf2ef64447aafea382a6dd2beb7a26451a079c57..83253ba468c7015a275683c4f3b66d51fa7ebe5d 100644
--- a/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.h
+++ b/Reconstruction/TrackParticleAthenaPool/src/TrackParticleContainerCnv.h
@@ -18,7 +18,6 @@
 #undef protected
 
 #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
-#include "AthenaPoolCnvSvc/AthenaPoolCnvTPExtension.h"
 
 #include "Particle/TrackParticleContainer.h"
 
@@ -37,9 +36,7 @@ typedef T_AthenaPoolCustomCnv<Rec::TrackParticleContainer, TrackParticleContaine
 //-----------------------------------------------------------------------------
 // Converter for TrackCollection object
 //-----------------------------------------------------------------------------
-class TrackParticleContainerCnv
-   : public TrackParticleContainerCnvBase,
-     public AthenaPoolCnvTPExtension
+class TrackParticleContainerCnv : public TrackParticleContainerCnvBase
 {
  
  friend class CnvFactory<TrackParticleContainerCnv>;
diff --git a/Reconstruction/eflowRec/eflowRec/PFClusterSelector.h b/Reconstruction/eflowRec/eflowRec/PFClusterSelector.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef033324ded1c86a4aaba0f5789cd054624437c9
--- /dev/null
+++ b/Reconstruction/eflowRec/eflowRec/PFClusterSelector.h
@@ -0,0 +1,41 @@
+#ifndef PFCLUSTERSELECTOR_H
+#define PFCLUSTERSELECTOR_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "xAODCaloEvent/CaloClusterContainer.h"
+
+#include <map>
+
+class eflowRecClusterContainer;
+
+class PFClusterSelector : public AthAlgorithm {
+
+public:
+  /** Default constructor */
+  PFClusterSelector(const std::string& name, ISvcLocator* pSvcLocator);
+  /** Default destructor */
+  ~PFClusterSelector() {};
+
+  /** Gaudi AthAlgorithm hooks */
+  StatusCode initialize();
+  StatusCode execute();
+  StatusCode finalize();
+
+private:
+  /** for EM mode, LC weight for cells are retrieved before doing any subtraction; they will be used after subtraction */
+  void retrieveLCCalCellWeight(const double& energy, const unsigned& index, std::map<IdentifierHash,double>& cellsWeight);
+  
+  /** ReadHandle for the CaloClusterContainer to be used as input */
+  SG::ReadHandle<xAOD::CaloClusterContainer> m_caloClustersReadHandle;
+
+  /** ReadHandle for the CaloClusterContainer, at LC scale, to be used as input */
+  SG::ReadHandle<xAOD::CaloClusterContainer> m_caloCalClustersReadHandle;
+
+  /** WriteHandle for the eflowRecClusterContainer to write out: */
+  SG::WriteHandle<eflowRecClusterContainer> m_eflowRecClustersWriteHandle;
+  
+
+  
+};
+#endif
diff --git a/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h b/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h
new file mode 100644
index 0000000000000000000000000000000000000000..c26746ebe9cdf892fc5dbbfb34b4716fe41ef961
--- /dev/null
+++ b/Reconstruction/eflowRec/eflowRec/PFLeptonSelector.h
@@ -0,0 +1,68 @@
+#ifndef PFLEPTONSELECTOR_H
+#define PFLEPTONSELECTOR_H
+
+/** Algorithm which will select leptons for downstream algorithms to use within eflowRec */
+
+#include "AthContainers/ConstDataVector.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/DataHandle.h"
+
+#include "xAODEgamma/ElectronContainer.h"
+#include "xAODMuon/MuonContainer.h"
+
+class CaloCellContainer;
+
+class PFLeptonSelector : public AthAlgorithm {
+
+public:
+  /** Default constructor */
+  PFLeptonSelector(const std::string& name, ISvcLocator* pSvcLocator);
+  /** Default destructor */
+  ~PFLeptonSelector() {};
+
+  /** Gaudi AthAlgorithm hooks */
+  StatusCode initialize();
+  StatusCode execute();
+  StatusCode finalize();
+
+private:
+
+  /** Select electrons to use */
+  StatusCode selectElectrons();
+
+  /** store the cells of the electrons */
+  void storeElectronCells(const xAOD::Egamma& electron);
+
+  /** select  muons to use */
+  StatusCode selectMuons();
+
+  /** store the cells of the muons */
+  void storeMuonCells(const xAOD::Muon& muon);
+
+  /** puts set of lepton cells into the lepton container */
+  void storeLeptonCells(const xAOD::CaloCluster& theCluster);
+
+  /** Put lepton containers and list of lepton cells into Storegate */
+  StatusCode recordLeptonContainers();
+  
+  /** ReadHandle for the ElectronContainer to be used as input */
+  SG::ReadHandle<xAOD::ElectronContainer> m_electronsReadHandle;
+
+  /** ReadHandle for the MuonContainer to be used as input */
+  SG::ReadHandle<xAOD::MuonContainer> m_muonsReadHandle;
+
+  /** WriteHandle for the ElectronContainer, that will be filled with electrons passing the electron ID in PFLeptonSelector::selectElectrons */
+  SG::WriteHandle<xAOD::ElectronContainer> m_selectedElectronsWriteHandle;
+
+  /** WriteHandle for the MuonContainer, that will be filled with muons passing the muon ID in PFLeptonSelector::selectMuons */
+  SG::WriteHandle<xAOD::MuonContainer> m_selectedMuonsWriteHandle;
+
+  /** WriteHandle for the CaloCellContainer, that will store calorimeter cells associated to leptons */
+  SG::WriteHandle<ConstDataVector<CaloCellContainer> > m_leptonCaloCellsWriteHandle;
+
+  /** bool to toggle storage of lepton CaloCells */
+  bool m_storeLeptonCells;
+
+  
+};
+#endif
diff --git a/Reconstruction/eflowRec/eflowRec/PFTrackSelector.h b/Reconstruction/eflowRec/eflowRec/PFTrackSelector.h
new file mode 100644
index 0000000000000000000000000000000000000000..03012de25011175cc534cedcf7f1ca641b4a17c5
--- /dev/null
+++ b/Reconstruction/eflowRec/eflowRec/PFTrackSelector.h
@@ -0,0 +1,63 @@
+#ifndef PFTRACKSELECTOR_H
+#define PFTRACKSELECTOR_H
+
+/** Algorithm which will select tracks for downstream algorithms to use within eflowRec */
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/DataHandle.h"
+
+#include "eflowRec/eflowRecTrack.h"
+#include "Particle/TrackParticleContainer.h"
+#include "xAODEgamma/ElectronContainer.h"
+#include "xAODMuon/MuonContainer.h"
+
+class eflowTrackExtrapolatorBaseAlgTool;
+namespace InDet { class IInDetTrackSelectionTool; }
+
+class PFTrackSelector : public AthAlgorithm {
+
+public:
+  /** Default constructor */
+  PFTrackSelector(const std::string& name, ISvcLocator* pSvcLocator);
+  /** Default destructor */
+  ~PFTrackSelector() {};
+
+  /** Gaudi AthAlgorithm hooks */
+  StatusCode initialize();
+  StatusCode execute();
+  StatusCode finalize();
+
+private:
+  /** This applys a selection criteria to the track using the tracking CP track selection tool */
+  bool selectTrack(const xAOD::TrackParticle& track);
+
+  /** check if track belongs to an electron */
+  bool isElectron(const xAOD::TrackParticle* track);
+
+  /** check if track belongs to an muon */
+  bool isMuon(const xAOD::TrackParticle* track);
+
+  /** ReadHandle for the TrackParticleContainer to be used as input */
+  SG::ReadHandle<xAOD::TrackParticleContainer> m_tracksReadHandle;
+
+  /** ReadHandle for the ElectronContainer to be used as input */
+  SG::ReadHandle<xAOD::ElectronContainer> m_electronsReadHandle;
+
+  /** ReadHandle for the MuonContainer to be used as input */
+  SG::ReadHandle<xAOD::MuonContainer> m_muonsReadHandle;
+
+  /** WriteHandle for the eflowRecTrackContainer to write out: */
+  SG::WriteHandle<eflowRecTrackContainer> m_eflowRecTracksWriteHandle;
+
+  /** Handle to interface on TrackToCalo tool. */
+  ToolHandle<eflowTrackExtrapolatorBaseAlgTool> m_theTrackExtrapolatorTool;
+
+  /** New track selection tool */
+  ToolHandle<InDet::IInDetTrackSelectionTool> m_trackSelectorTool;
+
+  /** Upper limit on track Pt for input tracks */
+  float m_upperTrackPtCut;
+
+  
+};
+#endif
diff --git a/Reconstruction/eflowRec/eflowRec/eflowRecTrack.h b/Reconstruction/eflowRec/eflowRec/eflowRecTrack.h
index 88aac8ae0ce8ba4c46a74921611863ca1d315528..b9ed90bec94d7e47cf66d369c7640cfdd8cb4005 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowRecTrack.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowRecTrack.h
@@ -16,6 +16,8 @@
 #include <cassert>
 #include <map>
 #include <string>
+
+#include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/ToolHandle.h"
 
 #include "CxxUtils/fpcompare.h"
@@ -32,9 +34,11 @@
 #include "xAODTracking/TrackParticleContainer.h"
 
 class eflowTrackClusterLink;
-
 class eflowTrackExtrapolatorBaseAlgTool;
 
+class IMessageSvc;
+class ISvcLocator;
+
 class eflowRecTrack {
 public:
   eflowRecTrack(const ElementLink<xAOD::TrackParticleContainer>& trackElemLink,
@@ -70,9 +74,16 @@ public:
 
   void setSubtracted() {
     if (isSubtracted()){
-      std::cout << "eflowRecTrack\tWarning:\tInvoke setSubtracted() on track that is subtracted already!" << std::endl;
+      MsgStream* mlog = m_mlog.get();
+      std::string errorString = "Invoke setSubtracted() on track that is subtracted already!";
+      if (mlog) (*mlog) << MSG::WARNING << errorString << endmsg;
+      else {
+	std::string errorPrefix = "eflowRecTrack: WARNING";
+	std::cerr << errorPrefix << " - have invalid pointer to MsgStream service " << std::endl;
+	std::cerr << errorPrefix << errorString << std::endl;
+      }//if don't have valid pointer to mlog service, warn and use cerr
       return;
-    }
+    }//if track was already subtracted then print a warning to the user about that and return
     m_isSubtracted = true;
   }
 
@@ -129,6 +140,10 @@ private:
   std::vector<eflowTrackClusterLink*> m_clusterMatches;
   std::map<std::string,std::vector<eflowTrackClusterLink*> > m_alternativeClusterMatches;
 
+  ISvcLocator* m_svcLoc;
+  IMessageSvc* m_msgSvc;
+  std::unique_ptr<MsgStream> m_mlog;
+
 public:
   class SortDescendingPt {
   public:
diff --git a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloDummyExtensionTool.h b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloDummyExtensionTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..3128b3be2c411f40055712c34050e885df4ed332
--- /dev/null
+++ b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloDummyExtensionTool.h
@@ -0,0 +1,52 @@
+#ifndef EFLOWTRACKCALODUMMYEXTENSIONTOOL_H_
+#define EFLOWTRACKCALODUMMYEXTENSIONTOOL_H_
+
+/********************************************************************
+
+ NAME:     eflowTrackCaloDummyExtensionTool.h
+ PACKAGE:  offline/Reconstruction/eflowRec
+
+ AUTHORS:  T.J. Khoo
+ CREATED:  6/6/2016
+
+ ********************************************************************/
+
+#include "eflowRec/eflowTrackExtrapolatorBaseAlgTool.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/ToolHandle.h"
+#include <map>
+#include "TGraphErrors.h"
+
+class eflowTrackCaloPoints;
+
+static const InterfaceID IID_eflowTrackCaloDummyExtensionTool("eflowTrackCaloDummyExtensionTool", 1, 0);
+
+class eflowTrackCaloDummyExtensionTool: virtual public eflowTrackExtrapolatorBaseAlgTool, public AthAlgTool {
+
+public:
+  eflowTrackCaloDummyExtensionTool(const std::string& type, const std::string& name,
+                             const IInterface* parent);
+  ~eflowTrackCaloDummyExtensionTool();
+
+  static const InterfaceID& interfaceID();
+
+  virtual StatusCode initialize() override;
+  virtual  std::unique_ptr<eflowTrackCaloPoints> execute(const xAOD::TrackParticle* track) const override;
+  virtual StatusCode finalize() override;
+
+private:
+  void  FillEstimationMap(const char * filename, const char * graphname, eflowCalo::LAYER layer);
+  Trk::CurvilinearParameters* CorrectLayerPosition(eflowCalo::LAYER layer, const xAOD::TrackParticle* track) const;
+
+  bool                                        m_doMapEstimation;
+  std::string                                 m_mapEstimationPath;
+  std::string                                 m_parameterGraphName;
+  std::map<eflowCalo::LAYER, TGraphErrors*>   m_mapEstimation;
+
+};
+
+inline const InterfaceID& eflowTrackCaloDummyExtensionTool::interfaceID() {
+  return IID_eflowTrackCaloDummyExtensionTool;
+}
+
+#endif /* EFLOWTRACKCALODUMMYEXTENSIONTOOL_H_ */
diff --git a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloExtensionTool.h b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloExtensionTool.h
index 6691cae808337f40d60d70b767ffbbbe26346c14..f1c6dcc189a76d65f534573894de28e45e8f9a58 100644
--- a/Reconstruction/eflowRec/eflowRec/eflowTrackCaloExtensionTool.h
+++ b/Reconstruction/eflowRec/eflowRec/eflowTrackCaloExtensionTool.h
@@ -50,8 +50,6 @@ private:
 
   std::unique_ptr<Trk::TrackParametersIdHelper> m_trackParametersIdHelper;
 
-  /* Count number of tracks seen for summary report in finalize */
-  //int m_tracksProcessed;
 };
 
 inline const InterfaceID& eflowTrackCaloExtensionTool::interfaceID() {
diff --git a/Reconstruction/eflowRec/python/eflowCaloObjectBuilderGetter.py b/Reconstruction/eflowRec/python/eflowCaloObjectBuilderGetter.py
index 8d71fade89b94c7ad9304bb8adac3913a892ed88..0cf87cad76047813c21efd12f84d0e03b0c92bd0 100644
--- a/Reconstruction/eflowRec/python/eflowCaloObjectBuilderGetter.py
+++ b/Reconstruction/eflowRec/python/eflowCaloObjectBuilderGetter.py
@@ -1,31 +1,17 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.SystemOfUnits import *  # loads MeV etc...
-from AthenaCommon.Constants import * # Loads DEBUG INFO etc..
 from AthenaCommon.Logging import logging  # loads logger 
-import traceback # to allow printout of trace back
 from RecExConfig.Configured import Configured # import base class
-from AthenaCommon.Include import include
 
 class eflowCaloObjectBuilderGetter ( Configured )  :
 
-    #_outputType = "xAOD::PFOContainer"
-    #_output = { _outputType : "chargedJetETMiss_eflowRec",   _outputType : "neutralJetETMiss_eflowRec"}
-
     def configure(self):
 
         mlog = logging.getLogger( 'eflowCaloObjectBuilderGetter:configure :' )
-        #mlog.info("Output="+self.outputKey() ) # prints an info message
 
         from eflowRec.eflowCaloObjectBuilder import setup_eflowObjectBuilderTools
         return setup_eflowObjectBuilderTools(self, "EM", mlog)
 
-    #def outputKey(self):
-    #    return self._output[self._outputType]
-
-    #def outputType(self):
-    #    return self._outputType
-
     def eflowObjectBuilderToolsHandle(self):
         return self._eflowObjectBuilderToolsHandle
 
diff --git a/Reconstruction/eflowRec/python/eflowCaloObjectBuilderGetter_LC.py b/Reconstruction/eflowRec/python/eflowCaloObjectBuilderGetter_LC.py
index 91190a81f80e8d3992040d2caf5d3c1a33825da1..20417f67c995e47301b8227d603e48aae84bc8b5 100644
--- a/Reconstruction/eflowRec/python/eflowCaloObjectBuilderGetter_LC.py
+++ b/Reconstruction/eflowRec/python/eflowCaloObjectBuilderGetter_LC.py
@@ -1,31 +1,17 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.SystemOfUnits import *  # loads MeV etc...
-from AthenaCommon.Constants import * # Loads DEBUG INFO etc..
 from AthenaCommon.Logging import logging  # loads logger 
-import traceback # to allow printout of trace back
 from RecExConfig.Configured import Configured # import base class
-from AthenaCommon.Include import include
 
 class eflowCaloObjectBuilderGetter_LC ( Configured )  :
 
-    #_outputType = "xAOD::PFOContainer"
-    #_output = { _outputType : "chargedJetETMiss_LC_eflowRec",   _outputType : "neutralJetETMiss_LC_eflowRec"}
-
     def configure(self):
 
         mlog = logging.getLogger( 'eflowCaloObjectBuilderGetter_LC:configure :' )
-        #mlog.info("Output="+self.outputKey() ) # prints an info message
 
         from eflowRec.eflowCaloObjectBuilder import setup_eflowObjectBuilderTools
         return setup_eflowObjectBuilderTools(self, "LC", mlog)
 
-    #def outputKey(self):
-    #    return self._output[self._outputType]
-
-    #def outputType(self):
-    #    return self._outputType
-
     def eflowObjectBuilderToolsHandle(self):
         return self._eflowObjectBuilderToolsHandle
 
diff --git a/Reconstruction/eflowRec/python/eflowCellLevelSubtractionToolDefault.py b/Reconstruction/eflowRec/python/eflowCellLevelSubtractionToolDefault.py
index 8dd176ed7b69074a7129c6a5d753c27431a240db..58d0b351dac73c9d73bb3267ca36b9213e3d95a3 100644
--- a/Reconstruction/eflowRec/python/eflowCellLevelSubtractionToolDefault.py
+++ b/Reconstruction/eflowRec/python/eflowCellLevelSubtractionToolDefault.py
@@ -1,13 +1,8 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.Logging import logging
-from AthenaCommon.SystemOfUnits import *
-from AthenaCommon.Constants import *
-from AthenaCommon.Include import include
-#from AthenaCommon.GlobalFlags import *
 from AthenaCommon.JobProperties import jobproperties
 import traceback
-import sys
 # import the base class
 from eflowRec.eflowRecConf import eflowCellLevelSubtractionTool
 
diff --git a/Reconstruction/eflowRec/python/eflowLCCalibToolDefault.py b/Reconstruction/eflowRec/python/eflowLCCalibToolDefault.py
index 0b4ae5bddfa8447ecd9f9956511a82ab1d57b341..1fd010351b62a084a785400527f422d912b9eb13 100644
--- a/Reconstruction/eflowRec/python/eflowLCCalibToolDefault.py
+++ b/Reconstruction/eflowRec/python/eflowLCCalibToolDefault.py
@@ -1,8 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.Logging import logging  # loads logger 
-from AthenaCommon.SystemOfUnits import * #gives us access to deg
-from AthenaCommon.Constants import * #gives us access to INFO
 
 from eflowRec.eflowRecConf import eflowLCCalibTool
 
diff --git a/Reconstruction/eflowRec/python/eflowObjectBuilderGetter.py b/Reconstruction/eflowRec/python/eflowObjectBuilderGetter.py
index 528ce7e048e780c1230b45e069a563ae16cc5794..6d511caa196380ca49340059827b9de3b0b36c79 100644
--- a/Reconstruction/eflowRec/python/eflowObjectBuilderGetter.py
+++ b/Reconstruction/eflowRec/python/eflowObjectBuilderGetter.py
@@ -1,11 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.SystemOfUnits import *  # loads MeV etc...
-from AthenaCommon.Constants import * # Loads DEBUG INFO etc..
 from AthenaCommon.Logging import logging  # loads logger 
-import traceback # to allow printout of trace back
 from RecExConfig.Configured import Configured # import base class
-from AthenaCommon.Include import include
 
 class eflowObjectBuilderGetter ( Configured )  :
 
diff --git a/Reconstruction/eflowRec/python/eflowObjectBuilderGetter_LC.py b/Reconstruction/eflowRec/python/eflowObjectBuilderGetter_LC.py
index ca1c00b9d0c05f78e76073f0ae92734919202b22..f82a8f406a48f28c7e5f7b2d58cb1e7f72a75bcb 100644
--- a/Reconstruction/eflowRec/python/eflowObjectBuilderGetter_LC.py
+++ b/Reconstruction/eflowRec/python/eflowObjectBuilderGetter_LC.py
@@ -1,11 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.SystemOfUnits import *  # loads MeV etc...
-from AthenaCommon.Constants import * # Loads DEBUG INFO etc..
 from AthenaCommon.Logging import logging  # loads logger 
-import traceback # to allow printout of trace back
 from RecExConfig.Configured import Configured # import base class
-from AthenaCommon.Include import include
 
 class eflowObjectBuilderGetter_LC ( Configured )  :
 
diff --git a/Reconstruction/eflowRec/python/eflowObjectCreatorToolDefault.py b/Reconstruction/eflowRec/python/eflowObjectCreatorToolDefault.py
index 61536427e034ffdae3b6a740859bd30d77f7a02e..284d273edc10de4d6de97aaf4a98e13d4f79b8b2 100644
--- a/Reconstruction/eflowRec/python/eflowObjectCreatorToolDefault.py
+++ b/Reconstruction/eflowRec/python/eflowObjectCreatorToolDefault.py
@@ -1,13 +1,8 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.Logging import logging
-from AthenaCommon.SystemOfUnits import *
-from AthenaCommon.Constants import *
-from AthenaCommon.Include import include
-#from AthenaCommon.GlobalFlags import *
 from AthenaCommon.JobProperties import jobproperties
 import traceback
-import sys
 # import the base class
 from eflowRec.eflowRecConf import eflowObjectCreatorTool
 
diff --git a/Reconstruction/eflowRec/python/eflowPreparationGetter.py b/Reconstruction/eflowRec/python/eflowPreparationGetter.py
index ebcec7b90d40525259727a91806fbabab7b79412..aea01ef299fb0f0abcde3359d3ee15f94f3f024c 100644
--- a/Reconstruction/eflowRec/python/eflowPreparationGetter.py
+++ b/Reconstruction/eflowRec/python/eflowPreparationGetter.py
@@ -1,9 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.SystemOfUnits import *  # loads MeV etc...
-from AthenaCommon.Constants import * # Loads DEBUG INFO etc..
 from AthenaCommon.Logging import logging  # loads logger 
-import traceback # to allow printout of trace back
 from RecExConfig.Configured import Configured # import base class
 
 class eflowPreparationGetter ( Configured )  :  # python way to define inheritance
diff --git a/Reconstruction/eflowRec/python/eflowPreparationGetter_LC.py b/Reconstruction/eflowRec/python/eflowPreparationGetter_LC.py
index d38c99e777a139e4087961d83c9b3bc0f17631e7..0ada9e9708371a75f83b160fed01e74dcc01c864 100644
--- a/Reconstruction/eflowRec/python/eflowPreparationGetter_LC.py
+++ b/Reconstruction/eflowRec/python/eflowPreparationGetter_LC.py
@@ -1,9 +1,6 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.SystemOfUnits import *  # loads MeV etc...
-from AthenaCommon.Constants import * # Loads DEBUG INFO etc..
 from AthenaCommon.Logging import logging  # loads logger 
-import traceback # to allow printout of trace back
 from RecExConfig.Configured import Configured # import base class
 
 class eflowPreparationGetter_LC ( Configured )  :  # python way to define inheritance
diff --git a/Reconstruction/eflowRec/python/eflowRecoverSplitShowersToolDefault.py b/Reconstruction/eflowRec/python/eflowRecoverSplitShowersToolDefault.py
index e9699eb6b15150ca0c3d5cca8dd0e95c5cb1bdd8..a611afb6baf4d9968c4fde28f428155a5fb86712 100644
--- a/Reconstruction/eflowRec/python/eflowRecoverSplitShowersToolDefault.py
+++ b/Reconstruction/eflowRec/python/eflowRecoverSplitShowersToolDefault.py
@@ -1,12 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.SystemOfUnits import *  # loads MeV etc...
-from AthenaCommon.Constants import * # Loads DEBUG INFO etc..
 from AthenaCommon.Logging import logging  # loads logger 
-from AthenaCommon.Include import include
 from AthenaCommon.JobProperties import jobproperties
-import traceback # to allow printout of trace back
-import sys
 
 from eflowRec.eflowRecConf import eflowRecoverSplitShowersTool
 
diff --git a/Reconstruction/eflowRec/python/eflowRecoverSplitShowersToolDefault_LC.py b/Reconstruction/eflowRec/python/eflowRecoverSplitShowersToolDefault_LC.py
index ddc5b14ede4a53bd8f200f6c0d8d39184b38a0e7..a1668de6e4264801a8656233f0c81df3034e92d4 100644
--- a/Reconstruction/eflowRec/python/eflowRecoverSplitShowersToolDefault_LC.py
+++ b/Reconstruction/eflowRec/python/eflowRecoverSplitShowersToolDefault_LC.py
@@ -1,12 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.SystemOfUnits import *  # loads MeV etc...
-from AthenaCommon.Constants import * # Loads DEBUG INFO etc..
 from AthenaCommon.Logging import logging  # loads logger 
-from AthenaCommon.Include import include
 from AthenaCommon.JobProperties import jobproperties
-import traceback # to allow printout of trace back
-import sys
 
 from eflowRec.eflowRecConf import eflowRecoverSplitShowersTool
 
diff --git a/Reconstruction/eflowRec/share/PFlowHiveDeps.py b/Reconstruction/eflowRec/share/PFlowHiveDeps.py
new file mode 100644
index 0000000000000000000000000000000000000000..fde5bf74487b69932366b932a4168b9812f13315
--- /dev/null
+++ b/Reconstruction/eflowRec/share/PFlowHiveDeps.py
@@ -0,0 +1,26 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
+#
+## Based on CaloHiveDeps.py: Algorithm Data Dependencies for CaloBottoUp.py
+## With small adjustments to make it work on ESD files
+
+xAODMaker__EventInfoCnvAlg.ExtraInputs =  [('EventInfo','McEventInfo')]
+xAODMaker__EventInfoCnvAlg.ExtraOutputs = [('xAOD::EventAuxInfo','EventInfoAux.'),
+                                           ('xAOD::EventInfo','EventInfo') ]
+
+topSequence.CaloTopoCluster.ExtraInputs =  [('CaloCalibrationHitContainer','LArCalibrationHitActive'),
+                                            ('CaloCalibrationHitContainer','LArCalibrationHitDeadMaterial'),
+                                            ('CaloCalibrationHitContainer','LArCalibrationHitInactive'),
+                                            ('CaloCellContainer','AllCalo')]
+topSequence.CaloTopoCluster.ExtraOutputs = [('xAOD::CaloClusterContainer','CaloCalTopoClusters'),
+                                            ('xAOD::CaloClusterAuxContainer','CaloCalTopoClustersAux.'),
+                                            ('xAOD::CaloClusterContainer','CaloTopoCluster'),
+                                            ('xAOD::CaloClusterAuxContainer','CaloTopoClusterAux.'),
+                                            ('CaloClusterCellLinkContainer','CaloTopoCluster_links'),
+                                            ('CaloClusterCellLinkContainer','CaloCalTopoClusters_links')]
+
+
+StreamESD.ExtraInputs = [('CaloCellContainer','AllCalo'),
+                         ('xAOD::CaloClusterContainer','CaloTopoCluster')]
diff --git a/Reconstruction/eflowRec/share/PFlowHiveExOpts.py b/Reconstruction/eflowRec/share/PFlowHiveExOpts.py
new file mode 100644
index 0000000000000000000000000000000000000000..e94896bca81b73dc681e562af59f5bdf01e5632b
--- /dev/null
+++ b/Reconstruction/eflowRec/share/PFlowHiveExOpts.py
@@ -0,0 +1,224 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+# Runs calorimeter clustering reconstruction - this part is taken from CaloHiveExOpts.py
+# Additional configuration runs particle flow MT algorithms and sets up items needed for track to calorimeter extrapolation
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+import MagFieldServices.SetupField
+
+from AthenaCommon.GlobalFlags import globalflags
+globalflags.DetGeo = 'atlas'
+from AthenaCommon.DetFlags import DetFlags
+DetFlags.detdescr.all_setOff()
+DetFlags.detdescr.Muon_setOn()
+if hasattr(DetFlags,'BField_on'): DetFlags.BField_setOn()
+from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc
+AtlasTrackingGeometrySvc  = svcMgr.AtlasTrackingGeometrySvc
+include('RecExCond/AllDet_detDescr.py')
+
+#---------------------------------------------------------------------------------#
+# MT-specific code
+# Get number of processes and threads
+from AthenaCommon.ConcurrencyFlags import jobproperties as jp
+nThreads = jp.ConcurrencyFlags.NumThreads()
+nProc = jp.ConcurrencyFlags.NumProcs()
+
+if nThreads >=1 :
+   from AthenaCommon.AlgScheduler import AlgScheduler
+   AlgScheduler.OutputLevel( INFO )
+   AlgScheduler.ShowControlFlow( True )
+   AlgScheduler.ShowDataDependencies( True )
+   AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
+
+   # Support for the MT-MP hybrid mode
+   if (nProc > 0) :
+
+      from AthenaCommon.Logging import log as msg
+      if (theApp.EvtMax == -1) : 
+         msg.fatal('EvtMax must be >0 for hybrid configuration')
+         sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
+
+         if ( theApp.EvtMax % nProc != 0 ) :
+            msg.warning('EvtMax[%s] is not divisible by nProcs[%s]: MP Workers will not process all requested events',theApp.EvtMax,nProc)
+
+         chunkSize = int (theApp.EvtMax / nProc)
+
+         from AthenaMP.AthenaMPFlags import jobproperties as jps 
+         jps.AthenaMPFlags.ChunkSize= chunkSize
+         
+         msg.info('AthenaMP workers will process %s events each',chunkSize)
+
+   ## force loading of data. make sure this alg is at the front of the
+   ## AlgSequence
+   #
+   from SGComps.SGCompsConf import SGInputLoader
+   topSequence+=SGInputLoader(OutputLevel=DEBUG, ShowEventDump=False)
+
+# MT-specific code
+#---------------------------------------------------------------------------------#
+
+theApp.EvtMax = 5
+
+from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
+topSequence+=xAODMaker__EventInfoCnvAlg()
+
+#---------------------------------------------------------------------------------#
+# NEW Conditions access infrastructure
+#
+from IOVSvc.IOVSvcConf import CondInputLoader
+topSequence += CondInputLoader( "CondInputLoader", OutputLevel=DEBUG,  )
+
+import StoreGate.StoreGateConf as StoreGateConf
+svcMgr += StoreGateConf.StoreGateSvc("ConditionStore")
+
+from IOVSvc.IOVSvcConf import CondSvc
+svcMgr += CondSvc()
+# NEW Conditions access infrastructure
+#---------------------------------------------------------------------------------#
+
+# Make sure PerfMon is off
+include( "PerfMonGPerfTools/DisablePerfMon_jobOFragment.py" )
+
+# Input file
+dataFile="/eos/atlas/atlascerngroupdisk/phys-rig/MC15Samples/ESD/mc15_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.recon.ESD.e3668_s2832_r7968/ESD.08355655._001904.pool.root.1"
+
+from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
+athenaCommonFlags.FilesInput=[dataFile,dataFile]
+
+# AutoConfiguration
+from RecExConfig.RecFlags import rec
+rec.AutoConfiguration = ['everything']
+import RecExConfig.AutoConfiguration as auto
+auto.ConfigureFromListOfKeys(rec.AutoConfiguration())
+
+from RecExConfig.ObjKeyStore import objKeyStore, CfgKeyStore
+from RecExConfig.InputFilePeeker import inputFileSummary
+objKeyStore.addManyTypesInputFile(inputFileSummary['eventdata_itemsList'])
+
+#---------------------------------------------------------------------------------#
+# Detector Description
+from AtlasGeoModel import SetGeometryVersion
+from AtlasGeoModel import GeoModelInit
+
+from LArGeoAlgsNV.LArGeoAlgsNVConf import LArDetectorToolNV
+from TileGeoModel.TileGeoModelConf import TileDetectorTool
+
+ServiceMgr.GeoModelSvc.DetectorTools += [ LArDetectorToolNV(ApplyAlignments = True, GeometryConfig = "RECO"),
+                                          TileDetectorTool(GeometryConfig = "RECO")
+                                          ]
+
+
+from CaloDetMgrDetDescrCnv import CaloDetMgrDDCnv
+
+include( "TileConditions/TileConditions_jobOptions.py" )
+
+include( "CaloConditions/LArTTCellMap_ATLAS_jobOptions.py")
+include( "CaloConditions/CaloTTIdMap_ATLAS_jobOptions.py")
+
+include( "LArConditionsCommon/LArConditionsCommon_MC_jobOptions.py" )
+include( "LArConditionsCommon/LArIdMap_MC_jobOptions.py" )
+from LArConditionsCommon import LArAlignable
+ServiceMgr.DetDescrCnvSvc.DecodeIdDict = True
+# Detector Description
+#---------------------------------------------------------------------------------#
+
+import AthenaPoolCnvSvc.ReadAthenaPool  #Maybe better to break up to get rid of MetaData stuff
+
+svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput()
+
+from GaudiAlg.GaudiAlgConf import EventCounter
+topSequence+=EventCounter(Frequency=2)
+
+from LArROD.LArRODFlags import larRODFlags
+larRODFlags.readDigits=False
+
+from CaloRec.CaloRecFlags import jobproperties
+jobproperties.CaloRecFlags.clusterCellGetterName = 'CaloRec.CaloCellGetter.CaloCellGetter'
+
+from CaloRec.CaloCellFlags import jobproperties
+jobproperties.CaloCellFlags.doLArDeadOTXCorr=False
+
+include( "CaloRec/CaloTopoCluster_jobOptions.py" )
+
+#PFlow
+
+from eflowRec.eflowRecConf import PFLeptonSelector
+PFLeptonSelector=PFLeptonSelector("PFLeptonSelector")
+topSequence += PFLeptonSelector
+
+from eflowRec.eflowRecConf import PFTrackSelector
+PFTrackSelector=PFTrackSelector("PFTrackSelector")
+
+from eflowRec.eflowRecConf import eflowTrackCaloDummyExtensionTool
+TrackCaloExtensionTool=eflowTrackCaloDummyExtensionTool()
+
+PFTrackSelector.trackExtrapolatorTool = TrackCaloExtensionTool
+
+from InDetTrackSelectionTool.InDetTrackSelectionToolConf import InDet__InDetTrackSelectionTool
+TrackSelectionTool = InDet__InDetTrackSelectionTool()
+
+from AthenaCommon.AppMgr import ToolSvc
+ToolSvc += TrackSelectionTool
+
+TrackSelectionTool.CutLevel = "TightPrimary"
+TrackSelectionTool.minPt = 500.0 
+
+PFTrackSelector.trackSelectionTool = TrackSelectionTool
+
+topSequence += PFTrackSelector
+
+from eflowRec.eflowRecConf import PFClusterSelector
+PFClusterSelector=PFClusterSelector("PFClusterSelector")
+
+topSequence += PFClusterSelector
+
+import AthenaPoolCnvSvc.WriteAthenaPool
+logRecoOutputItemList_jobOptions = logging.getLogger( 'py:RecoOutputItemList_jobOptions' )
+from OutputStreamAthenaPool.OutputStreamAthenaPool import  createOutputStream
+
+StreamESD=createOutputStream("StreamESD","myESD.pool.root",True)
+include ("CaloRecEx/CaloRecOutputItemList_jobOptions.py")
+StreamESD.ItemList+=CaloESDList
+
+print StreamESD.ItemList
+
+#---------------------------------------------------------------------------------#
+# MT-specific code
+if nThreads >=1 :
+   include ( "PFlowHiveDeps.py" )
+
+print "==========================================================================================\n"
+
+#
+## set which Algorithms can be cloned
+#
+# names of algs are:
+#  SGInputLoader
+#  xAODMaker::EventInfoCnvAlg
+#  EventCounter
+#  CaloCellMaker
+#  CmbTowerBldr
+#  CaloClusterMakerSWCmb
+#  CaloTopoCluster
+#  StreamESD
+
+#  set algCardinality = 1 to disable cloning for all Algs
+algCardinality = nThreads
+
+if (algCardinality > 1):   
+   for alg in topSequence:      
+      name = alg.name()
+      if name in ["CaloCellMaker","StreamESD"] :
+         # suppress INFO message about Alg unclonability
+         alg.Cardinality = 1
+      else:
+         alg.Cardinality = algCardinality
+
+#Change input and output container names
+topSequence.CaloTopoCluster.ClustersOutputName="CaloCalTopoClusterV2"
+topSequence.PFClusterSelector.calClustersName="CaloCalTopoClusterV2"
+           
+
diff --git a/Reconstruction/eflowRec/share/eflowRec_config.py b/Reconstruction/eflowRec/share/eflowRec_config.py
deleted file mode 100644
index b549f7ca9a06dcc85d6255b60b60fc97c68cbb18..0000000000000000000000000000000000000000
--- a/Reconstruction/eflowRec/share/eflowRec_config.py
+++ /dev/null
@@ -1,49 +0,0 @@
-from eflowRec.eflowRecFlags import jobproperties
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-if jobproperties.eflowRecFlags.runTauMode == True:
-    from eflowRec.eflowRecConf import eflowTauSeeder
-    eflowTauSeeder = eflowTauSeeder()
-    topSequence += eflowTauSeeder
-
-from eflowRec.eflowPreparationGetter import eflowPreparationGetter
-CaloObjectBuilderGetter = eflowPreparationGetter()
-
-from eflowRec.eflowCaloObjectBuilderGetter import eflowCaloObjectBuilderGetter
-ObjectBuilderToolsGetter = eflowCaloObjectBuilderGetter()
-
-from eflowRec.eflowObjectBuilderGetter import eflowObjectBuilderGetter
-ObjectBuilderGetter = eflowObjectBuilderGetter()
-
-if jobproperties.eflowRecFlags.runTauMode == False:
-    from eflowRec.eflowRecConf import eflowQuantities
-    Quantities = eflowQuantities()
-
-    elif jobproperties.eflowRecFlags.eflowAlgType == "EOverP":
-        Quantities.EflowObjectsName="eflowObjects01"
-
-    topSequence+=Quantities
-
-from eflowRec.eflowRecConf import eflowVertexInformationSetter
-eflowVertexInformationSetter = eflowVertexInformationSetter()
-
-if jobproperties.eflowRecFlags.runTauMode == True:
-    from eflowRec.eflowRecConf import eflowPi0Tagger
-    eflowPi0Tagger = eflowPi0Tagger()
-    topSequence += eflowPi0Tagger
-    
-    eflowVertexInformationSetter.eflowObjects_inputName="eflowObjects_tauMode"
-
-elif jobproperties.eflowRecFlags.eflowAlgType == "EOverP":
-    eflowVertexInformationSetter.eflowObjects_inputName="eflowObjects01"
-else:
-    eflowVertexInformationSetter.eflowObjects_inputName="eflowObjects_FullMode"
-
-topSequence += eflowVertexInformationSetter
-
-from eflowRec.eflowRecConf import eflowOverlapRemoval
-eflowOverlapRemoval = eflowOverlapRemoval()
-
-topSequence += eflowOverlapRemoval
diff --git a/Reconstruction/eflowRec/src/PFClusterSelector.cxx b/Reconstruction/eflowRec/src/PFClusterSelector.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..1154dbcf73934385ff0f366e0fb58bbec6d2dc90
--- /dev/null
+++ b/Reconstruction/eflowRec/src/PFClusterSelector.cxx
@@ -0,0 +1,109 @@
+#include "CaloDetDescr/CaloDetDescrManager.h"
+#include "CaloIdentifier/CaloCell_ID.h"
+#include "eflowRec/eflowRecCluster.h"
+#include "eflowRec/PFClusterSelector.h"
+#include "xAODCaloEvent/CaloCluster.h"
+
+PFClusterSelector::PFClusterSelector(const std::string& name, ISvcLocator* pSvcLocator):
+  AthAlgorithm(name, pSvcLocator),
+  m_caloClustersReadHandle("CaloTopoCluster"),
+  m_caloCalClustersReadHandle("CaloCalTopoCluster"),
+  m_eflowRecClustersWriteHandle("eflowRecClusters")
+{
+  declareProperty("clustersName",m_caloClustersReadHandle );
+  declareProperty("calClustersName",m_caloCalClustersReadHandle  );
+  declareProperty("eflowRecClustersOutputName", m_eflowRecClustersWriteHandle);
+}
+
+StatusCode PFClusterSelector::initialize(){
+
+  ATH_CHECK(m_caloClustersReadHandle.initialize());
+  ATH_CHECK(m_caloCalClustersReadHandle.initialize());
+
+  ATH_CHECK(m_eflowRecClustersWriteHandle.initialize());
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode PFClusterSelector::execute(){
+
+  /* Verify the read handle has a valid pointer, and if not return */
+  if (!m_caloClustersReadHandle.isValid()){
+    msg(MSG::WARNING) << " Invalid ReadHandle for xAOD::CaloCluster with key: " <<  m_caloClustersReadHandle.key()  << endmsg;
+    return StatusCode::SUCCESS;
+  }
+  /* Record the eflowRecCluster output container */
+  ATH_CHECK(m_eflowRecClustersWriteHandle.record(std::make_unique<eflowRecClusterContainer>()));
+
+  /* Fill the vector of eflowRecClusters */
+  unsigned int nClusters = m_caloClustersReadHandle->size();
+  for (unsigned int iCluster = 0; iCluster < nClusters; ++iCluster) {
+    /* Create the eflowRecCluster and put it in the container */
+    std::unique_ptr<eflowRecCluster> thisEFRecCluster  = std::make_unique<eflowRecCluster>(ElementLink<xAOD::CaloClusterContainer>(*m_caloClustersReadHandle, iCluster));
+    
+    if (m_caloCalClustersReadHandle.isValid()){
+      std::map<IdentifierHash,double> cellsWeightMap;
+      retrieveLCCalCellWeight(m_caloClustersReadHandle->at(iCluster)->e(), iCluster, cellsWeightMap);
+
+      if (msgLvl(MSG::DEBUG)) {
+        //zhangr
+        std::map<IdentifierHash, double>::iterator it = cellsWeightMap.begin();
+        for (; it != cellsWeightMap.end(); ++it) {
+           msg(MSG::DEBUG) << "zhangrui eflowPreparation " << iCluster << "/" << nClusters << ": e="
+                    << m_caloClustersReadHandle->at(iCluster)->e() << " (" << it->first << "  "
+                    << it->second << ")" << endmsg;
+        }
+      }
+
+      thisEFRecCluster->setCellsWeight(cellsWeightMap);
+    }
+
+    thisEFRecCluster->setClusterId(iCluster);
+    m_eflowRecClustersWriteHandle->push_back(std::move(thisEFRecCluster));
+
+    if (msgLvl(MSG::DEBUG)) {
+      const xAOD::CaloCluster* thisCluster = m_caloClustersReadHandle->at(iCluster);
+      msg(MSG::DEBUG) << "eflowPreparation clus = " << thisCluster->eta() << " "
+		      << thisCluster->phi() << " " << thisCluster->e()/cosh(thisCluster->eta()) << " " << endmsg;
+    }
+  }
+  
+  return StatusCode::SUCCESS;
+}
+
+StatusCode PFClusterSelector::finalize(){
+  return StatusCode::SUCCESS;
+}
+
+void PFClusterSelector::retrieveLCCalCellWeight(const double& energy, const unsigned& index, std::map<IdentifierHash,double>& cellsWeight) {
+  
+  /* match CaloCluster with CaloCalCluster to obtain cell weight */
+  /* first try the position at 'index'. If we are lucky, the loop can be avoided. */
+  /* Note the read handle has been tested to be valid prior to the call of this function */
+  const xAOD::CaloCluster* matchedCalCluster = m_caloCalClustersReadHandle->at(index);
+  if (!(fabs(energy - matchedCalCluster->rawE()) < 0.001)) {
+    matchedCalCluster = nullptr;
+    for (unsigned iCalCalCluster = 0; iCalCalCluster < m_caloCalClustersReadHandle->size();
+        ++iCalCalCluster) {
+      matchedCalCluster = m_caloCalClustersReadHandle->at(iCalCalCluster);
+      if (fabs(energy - matchedCalCluster->rawE()) < 0.001) {
+        break;
+      }
+    }
+  }
+  assert (matchedCalCluster);
+
+  /* obtain cell index and cell weight */
+  const CaloDetDescrManager*   calo_dd_man  = CaloDetDescrManager::instance();
+  const CaloCell_ID*               calo_id  = calo_dd_man->getCaloCell_ID();
+  xAOD::CaloCluster::const_cell_iterator itCell = matchedCalCluster->cell_begin();
+  xAOD::CaloCluster::const_cell_iterator endCell = matchedCalCluster->cell_end();
+  for (; itCell != endCell; ++itCell) {
+    const CaloCell* pCell = *itCell;
+    Identifier myId = pCell->ID();
+    IdentifierHash myHashId = calo_id->calo_cell_hash(myId);
+    cellsWeight[myHashId] = itCell.weight();
+  }
+
+  return ;
+}
diff --git a/Reconstruction/eflowRec/src/PFLeptonSelector.cxx b/Reconstruction/eflowRec/src/PFLeptonSelector.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..64057dfc8ef35bb1c9e4c9ea2a1fa547c6d91758
--- /dev/null
+++ b/Reconstruction/eflowRec/src/PFLeptonSelector.cxx
@@ -0,0 +1,190 @@
+#include "eflowRec/PFLeptonSelector.h"
+
+PFLeptonSelector::PFLeptonSelector(const std::string& name, ISvcLocator* pSvcLocator):
+  AthAlgorithm(name, pSvcLocator),
+  m_electronsReadHandle("Electrons"),
+  m_muonsReadHandle("Muons"),
+  m_selectedElectronsWriteHandle("eflowRec_selectedElectrons"),
+  m_selectedMuonsWriteHandle("eflowRec_selectedMuons"),
+  m_leptonCaloCellsWriteHandle("eflowRec_leptonCellContainer"),
+  m_storeLeptonCells(false)
+{
+  declareProperty("inputElectronsName", m_electronsReadHandle);
+  declareProperty("inputMuonsName",  m_muonsReadHandle);
+  declareProperty("outputElectronsName", m_selectedElectronsWriteHandle);
+  declareProperty("outputMuonsName", m_selectedMuonsWriteHandle);
+  declareProperty("outputLeptonCellsName", m_leptonCaloCellsWriteHandle);
+  declareProperty("storeLeptonCells", m_storeLeptonCells);
+}
+
+StatusCode PFLeptonSelector::initialize(){
+  ATH_CHECK( m_electronsReadHandle.initialize() );
+  ATH_CHECK( m_muonsReadHandle.initialize() );
+
+  ATH_CHECK( m_selectedElectronsWriteHandle.initialize() );
+  ATH_CHECK( m_selectedMuonsWriteHandle.initialize() );
+
+  ATH_CHECK( m_leptonCaloCellsWriteHandle.initialize() );
+  
+  return StatusCode::SUCCESS;
+}
+
+StatusCode PFLeptonSelector::execute(){
+
+  if (recordLeptonContainers().isFailure()) {
+      return StatusCode::SUCCESS;
+    }
+
+  /* Select electrons */
+  StatusCode sc = this->selectElectrons();
+  if (sc.isFailure()) {
+    if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " Problem selecting electrons " << endmsg;
+  }
+
+  /* Select  muons */
+  sc = this->selectMuons();
+  if (sc.isFailure()) {
+    //won't mask out the tracks, but issue WARNING
+    if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " Problem selecting muons " << endmsg;
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode PFLeptonSelector::finalize(){ return StatusCode::SUCCESS; }
+
+StatusCode PFLeptonSelector::selectElectrons(){
+
+  if (!m_electronsReadHandle.isValid()){
+    if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Invalid read handle to electron container with name: " <<   m_electronsReadHandle.key() << endmsg;
+    return StatusCode::FAILURE;
+  }
+
+  xAOD::ElectronContainer::const_iterator firstElectron = m_electronsReadHandle->begin();
+  xAOD::ElectronContainer::const_iterator lastElectron = m_electronsReadHandle->end();
+
+  for (; firstElectron != lastElectron; ++firstElectron){
+
+    const xAOD::Electron* theElectron = *firstElectron;
+    if (theElectron){
+      if (theElectron->pt() > 10000){
+        bool val_med = false;
+	bool gotID = theElectron->passSelection(val_med, "LHMedium");
+	if (!gotID) {
+	  if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not get Electron ID " << endmsg;
+	  continue;
+	}
+	if (true == val_med){
+	  if (m_selectedElectronsWriteHandle.isValid()) m_selectedElectronsWriteHandle->push_back(const_cast<xAOD::Electron*>(theElectron));
+	  else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Do not have valid WriteHandle for ElectronContainer with name: " << m_selectedElectronsWriteHandle.key() << endmsg;
+	  if (true == m_storeLeptonCells) this->storeElectronCells(*theElectron);
+	}//mediumPP
+      }//10GeV pt cut
+    }//valid egamma pointer
+    else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "This electron is a NULL pointer " << endmsg;
+    
+  }//electron loop
+
+  return StatusCode::SUCCESS;
+}
+
+void PFLeptonSelector::storeElectronCells(const xAOD::Egamma& electron){
+
+  const xAOD::CaloCluster* electronCluster = electron.caloCluster(); 
+  if (electronCluster){
+    this->storeLeptonCells(*electronCluster);      
+  }
+  else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "This electron has an invalid pointer to its cluster " << endmsg;
+
+}
+
+StatusCode PFLeptonSelector::selectMuons() {
+
+  if (!m_muonsReadHandle.isValid()) {
+    if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Invalid read handle to muon container with name: " << m_muonsReadHandle.key() << endmsg;    
+    return StatusCode::FAILURE;
+  }
+
+  xAOD::MuonContainer::const_iterator firstMuon = m_muonsReadHandle->begin();
+  xAOD::MuonContainer::const_iterator lastMuon = m_muonsReadHandle->end();
+
+  for (; firstMuon != lastMuon; ++firstMuon) {
+    const xAOD::Muon* theMuon = *firstMuon;
+
+    //Details of medium muons are here:
+    //https://twiki.cern.ch/twiki/bin/view/Atlas/MuonSelectionTool
+    //No need to ask for combined muon, by construction other muons will not have ID track - we just ask for medium muons
+    
+    xAOD::Muon::Quality muonQuality = theMuon->quality();
+    if( muonQuality <= xAOD::Muon::Medium) {   
+      if (m_selectedMuonsWriteHandle.isValid()) m_selectedMuonsWriteHandle->push_back(const_cast<xAOD::Muon*>(theMuon));
+      else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Do not have valid WriteHandle for MuonContainer with name: " << m_selectedMuonsWriteHandle.key() << endmsg;
+      if (true == m_storeLeptonCells) this->storeMuonCells(*theMuon);
+    }//Medium muons
+  } //muon loop
+
+  return StatusCode::SUCCESS;
+}
+
+void PFLeptonSelector::storeMuonCells(const xAOD::Muon& muon){
+
+  const ElementLink<xAOD::CaloClusterContainer> theLink = muon.clusterLink(); 
+  if (theLink.isValid()){
+    const xAOD::CaloCluster* muonCluster = *theLink;
+    if (muonCluster){
+      this->storeLeptonCells(*muonCluster);
+    }
+    else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "This muon has an invalid pointer to its cluster " << endmsg;
+  }
+  else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "This muon has an invalid element link to its cluster " << endmsg;
+
+}
+
+void PFLeptonSelector::storeLeptonCells(const xAOD::CaloCluster& theCluster){
+
+  const CaloClusterCellLink* theCellLink = theCluster.getCellLinks();
+
+  if (theCellLink){
+  
+    CaloClusterCellLink::const_iterator firstCell = theCellLink->begin();
+    CaloClusterCellLink::const_iterator lastCell = theCellLink->end();
+    
+    for (; firstCell != lastCell; ++firstCell){
+      if (m_leptonCaloCellsWriteHandle.isValid()) m_leptonCaloCellsWriteHandle->push_back(*firstCell);
+      else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " Do not have valid WriteHandle for CaloCellContaienr with name: " << m_leptonCaloCellsWriteHandle.key() << endmsg;
+    }//cell loop
+  }
+ else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "This cluster has an invalid pointer to its cells, in storeLeptonCells " << endmsg;
+
+}
+
+StatusCode PFLeptonSelector::recordLeptonContainers(){
+
+  StatusCode sc = m_selectedElectronsWriteHandle.record(std::make_unique<xAOD::ElectronContainer>(SG::VIEW_ELEMENTS));
+  
+  if (sc.isFailure()) {
+    if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not record electron WriteHandle with key: " << m_selectedElectronsWriteHandle.key() << endmsg;
+    return sc;
+  }
+
+  sc = m_selectedMuonsWriteHandle.record(std::make_unique<xAOD::MuonContainer>(SG::VIEW_ELEMENTS));
+  
+  if (sc.isFailure()) {
+    if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Could not record muon WriteHandle with key: " << m_selectedMuonsWriteHandle.key() << endmsg;
+    return sc;
+  }
+
+  if (true == m_storeLeptonCells) {
+
+    //record the cell container
+    sc =  m_leptonCaloCellsWriteHandle.record(std::make_unique<ConstDataVector<CaloCellContainer> >(SG::VIEW_ELEMENTS));
+
+    if (sc.isFailure()) {
+      if (msgLvl(MSG::WARNING))msg(MSG::WARNING) << "Could not record CaloCell WriteHandle with key: " << m_leptonCaloCellsWriteHandle << endmsg;
+      return sc;
+    }
+  }
+
+  return StatusCode::SUCCESS;
+
+}
diff --git a/Reconstruction/eflowRec/src/PFTrackClusterMatchingTool.cxx b/Reconstruction/eflowRec/src/PFTrackClusterMatchingTool.cxx
index 8480712d64ede8cc7cce6d93684a49be66e1ac4f..ec9d184a6a3dc643107cb37d4b8ff8ac6cdd9b8f 100644
--- a/Reconstruction/eflowRec/src/PFTrackClusterMatchingTool.cxx
+++ b/Reconstruction/eflowRec/src/PFTrackClusterMatchingTool.cxx
@@ -41,19 +41,19 @@ StatusCode PFTrackClusterMatchingTool::initialize() {
 
   m_matcher = std::make_unique<PFMatch::TrackClusterMatcher>(DistanceFactory::Get(m_distanceType, TrackPositionFactory::Get(m_trackPositionType), ClusterPositionFactory::Get(m_clusterPositionType)),m_matchCut);
   
-  msg(MSG::INFO) << "In initialize:" << endmsg;
-  msg(MSG::INFO) << "Track position type is \"" << m_trackPositionType << "\"" << endmsg;
-  msg(MSG::INFO) << "Cluster position type is \"" << m_clusterPositionType << "\"" << endmsg;
-  msg(MSG::INFO) << "Distance type is \"" << m_distanceType << "\"" << endmsg;
-  msg(MSG::INFO) << "Match cut is " << m_matchCut << endmsg;
+  ATH_MSG_VERBOSE("In initialize:");
+  ATH_MSG_VERBOSE("Track position type is \"" << m_trackPositionType << "\"");
+  ATH_MSG_VERBOSE("Cluster position type is \"" << m_clusterPositionType << "\"");
+  ATH_MSG_VERBOSE("Distance type is \"" << m_distanceType << "\"");
+  ATH_MSG_VERBOSE("Match cut is " << m_matchCut);
 
   return StatusCode::SUCCESS;
 }
 
 StatusCode PFTrackClusterMatchingTool::finalize() {
-  msg(MSG::INFO) << "Final summary:" << endmsg;
-  msg(MSG::INFO) << "Processed " << m_tracksProcessed << " tracks." << endmsg;
-  msg(MSG::INFO) << "Produced  " << m_tracksMatched<< " matches." << endmsg;
+  ATH_MSG_INFO("Final summary:");
+  ATH_MSG_INFO("Processed " << m_tracksProcessed << " tracks.");
+  ATH_MSG_INFO("Produced  " << m_tracksMatched<< " matches.");
 
   return StatusCode::SUCCESS;
 }
diff --git a/Reconstruction/eflowRec/src/PFTrackSelector.cxx b/Reconstruction/eflowRec/src/PFTrackSelector.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..6e6e4707837d44d21d48aa462c33f2911dcd61b4
--- /dev/null
+++ b/Reconstruction/eflowRec/src/PFTrackSelector.cxx
@@ -0,0 +1,145 @@
+#include "eflowRec/eflowTrackExtrapolatorBaseAlgTool.h"
+#include "eflowRec/PFTrackSelector.h"
+#include "InDetTrackSelectionTool/IInDetTrackSelectionTool.h"
+#include "xAODEgamma/ElectronxAODHelpers.h"
+
+
+PFTrackSelector::PFTrackSelector(const std::string& name, ISvcLocator* pSvcLocator):
+  AthAlgorithm(name, pSvcLocator),
+  m_tracksReadHandle("InDetTrackParticles"),
+  m_electronsReadHandle("eflowRec_selectedElectrons"),
+  m_muonsReadHandle("eflowRec_selectedMuons"),
+  m_eflowRecTracksWriteHandle("eflowRecTracks"),
+  m_theTrackExtrapolatorTool("Trk::ParticleCaloExtensionTool",this),
+  m_upperTrackPtCut(100.0)
+{
+  declareProperty("tracksName", m_tracksReadHandle);
+  declareProperty("electronsName", m_electronsReadHandle);  
+  declareProperty("muonsName",  m_muonsReadHandle);
+  declareProperty("eflowRecTracksOutputName",  m_eflowRecTracksWriteHandle);
+  declareProperty("trackExtrapolatorTool", m_theTrackExtrapolatorTool, "AlgTool to use for track extrapolation");
+  declareProperty("trackSelectionTool", m_trackSelectorTool);
+  declareProperty("upperTrackPtCut",m_upperTrackPtCut);
+}
+
+StatusCode PFTrackSelector::initialize(){
+
+  ATH_CHECK(m_theTrackExtrapolatorTool.retrieve());  
+  ATH_CHECK(m_trackSelectorTool.retrieve());
+
+  ATH_CHECK(m_tracksReadHandle.initialize());
+  ATH_CHECK(m_electronsReadHandle.initialize());
+  ATH_CHECK(m_muonsReadHandle.initialize());
+
+  ATH_CHECK(m_eflowRecTracksWriteHandle.initialize());
+  
+  return StatusCode::SUCCESS;
+
+}
+
+StatusCode PFTrackSelector::execute(){
+
+  ATH_CHECK(m_eflowRecTracksWriteHandle.record(std::make_unique<eflowRecTrackContainer>()));
+
+  /* Verify the read handle has a valid pointer, and if not return */
+  if (!m_tracksReadHandle.isValid()){
+    if (msgLvl(MSG::WARNING)) { msg(MSG::WARNING) << "Can not retrieve xAOD::TrackParticleContainer with name: " << m_tracksReadHandle.key() << endmsg; }
+    return StatusCode::FAILURE;
+  }
+
+  /* Do the track selection for tracks to be used in all of the following steps: */
+  xAOD::TrackParticleContainer::const_iterator itTrackParticle = m_tracksReadHandle->begin();
+  int trackIndex = 0;
+  for (; itTrackParticle != m_tracksReadHandle->end(); ++itTrackParticle, ++trackIndex) {
+    const xAOD::TrackParticle* track = (*itTrackParticle);
+    if (!track){
+      if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Have invalid pointer to xAOD::TrackParticle " << endmsg;
+      continue;	
+    }
+
+    bool rejectTrack(!selectTrack(*track));
+
+    bool isElectron = this->isElectron(track);
+    bool isMuon = this->isMuon(track);
+    if (true == isElectron || true == isMuon) rejectTrack = true;
+
+    if (!rejectTrack) {
+      /* Create the eflowRecCluster and put it in the container */
+      std::unique_ptr<eflowRecTrack> thisEFRecTrack  = std::make_unique<eflowRecTrack>(ElementLink<xAOD::TrackParticleContainer>(*m_tracksReadHandle, trackIndex), m_theTrackExtrapolatorTool);
+      thisEFRecTrack->setTrackId(trackIndex);
+      m_eflowRecTracksWriteHandle->push_back(std::move(thisEFRecTrack));
+    }
+  }
+
+  std::sort(m_eflowRecTracksWriteHandle->begin(), m_eflowRecTracksWriteHandle->end(), eflowRecTrack::SortDescendingPt());
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode PFTrackSelector::finalize(){return StatusCode::SUCCESS;}
+
+bool PFTrackSelector::selectTrack(const xAOD::TrackParticle& track) {
+  if (track.pt()*0.001 < m_upperTrackPtCut) return m_trackSelectorTool->accept(track, track.vertex());
+  else return false;
+}
+
+bool PFTrackSelector::isElectron(const xAOD::TrackParticle* track){
+
+  if (m_electronsReadHandle.isValid()){
+
+    xAOD::ElectronContainer::const_iterator firstElectron = m_electronsReadHandle->begin();
+    xAOD::ElectronContainer::const_iterator lastElectron = m_electronsReadHandle->end();
+    
+    for (; firstElectron != lastElectron; ++firstElectron){
+      const xAOD::Electron* this_egamma = *firstElectron;
+      if (this_egamma){
+	unsigned int nTrack = this_egamma->nTrackParticles();
+	
+	if (0 != nTrack){	  
+	  const xAOD::TrackParticle* origTrack = xAOD::EgammaHelpers::getOriginalTrackParticle(this_egamma);	  
+	  if (origTrack){
+	    if (track == origTrack) {
+	      return true;
+	    }
+	  }//if valid track pointer
+	  else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Electron object map has NULL pointer to original TrackParticle " << endmsg;
+	}//if has a track
+	else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Electron object has " << nTrack << " tracks " << endmsg;
+      }//if valid pointer
+      else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "Electron is a NULL pointer " << endmsg;
+    }//electron loop    
+  }
+  else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " Invalid ReadHandle for electrons with key: " << m_electronsReadHandle.key() << endmsg;
+
+  return false;
+
+}
+
+bool PFTrackSelector::isMuon(const xAOD::TrackParticle* track){
+
+  if (m_muonsReadHandle.isValid()){
+
+    xAOD::MuonContainer::const_iterator firstMuon = m_muonsReadHandle->begin();
+    xAOD::MuonContainer::const_iterator lastMuon = m_muonsReadHandle->end();
+    
+    for (; firstMuon != lastMuon ; ++firstMuon){
+      const xAOD::Muon* theMuon = *firstMuon;
+      if (theMuon){
+	const ElementLink< xAOD::TrackParticleContainer > theLink = theMuon->inDetTrackParticleLink();
+	if (theLink.isValid()){
+	  const xAOD::TrackParticle* ID_track = *theLink;
+	  if (ID_track){
+	    if (track == ID_track) return true;
+	    return false;
+	  }
+	  else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "This muon has a NULL pointer to the track " << endmsg;
+	}
+	else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "This muon has an invalid link to the track " << endmsg;
+      }//if muon pointer is valid
+      else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "This muon is a NULL pointer " << endmsg;
+    }//muon loop
+  }
+   else if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << " Invalid ReadHandle for muons with key: " << m_muonsReadHandle.key() << endmsg;
+
+  return false;
+}
diff --git a/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx b/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
index 2bf17431e1a2933138aaf48cc3e996b5e7c1b105..bba1efacb4ad624d0bf4220fbee11858447d8d3d 100644
--- a/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
+++ b/Reconstruction/eflowRec/src/components/eflowRec_entries.cxx
@@ -8,12 +8,16 @@
 #include "eflowRec/eflowMomentCalculatorTool.h"
 #include "eflowRec/eflowClusterCollectionTool.h"
 #include "eflowRec/eflowTrackCaloExtensionTool.h"
+#include "eflowRec/eflowTrackCaloDummyExtensionTool.h"
 #include "eflowRec/PFTrackClusterMatchingTool.h"
 #include "eflowRec/eflowCellEOverPTool_mc12_JetETMiss.h"
 #include "eflowRec/eflowCellEOverPTool_mc12_LC.h"
 #include "eflowRec/eflowObjectCreatorTool.h"
 #include "eflowRec/eflowOverlapRemoval.h"
 #include "eflowRec/eflowVertexInformationSetter.h"
+#include "eflowRec/PFLeptonSelector.h"
+#include "eflowRec/PFTrackSelector.h"
+#include "eflowRec/PFClusterSelector.h"
 #include "GaudiKernel/DeclareFactoryEntries.h"
 
 DECLARE_ALGORITHM_FACTORY( eflowBuilder )
@@ -22,12 +26,16 @@ DECLARE_ALGORITHM_FACTORY( eflowCaloObjectBuilder )
 DECLARE_ALGORITHM_FACTORY( eflowObjectBuilder )
 DECLARE_ALGORITHM_FACTORY( eflowOverlapRemoval )
 DECLARE_ALGORITHM_FACTORY( eflowVertexInformationSetter )
+DECLARE_ALGORITHM_FACTORY( PFLeptonSelector )
+DECLARE_ALGORITHM_FACTORY( PFClusterSelector )
+DECLARE_ALGORITHM_FACTORY( PFTrackSelector )
 DECLARE_TOOL_FACTORY( eflowRecoverSplitShowersTool )
 DECLARE_TOOL_FACTORY( eflowCellLevelSubtractionTool )
 DECLARE_TOOL_FACTORY( eflowLCCalibTool )
 DECLARE_TOOL_FACTORY( eflowMomentCalculatorTool )
 DECLARE_TOOL_FACTORY( eflowClusterCollectionTool )
 DECLARE_TOOL_FACTORY( eflowTrackCaloExtensionTool )
+DECLARE_TOOL_FACTORY( eflowTrackCaloDummyExtensionTool )
 DECLARE_TOOL_FACTORY( PFTrackClusterMatchingTool )
 DECLARE_TOOL_FACTORY( eflowCellEOverPTool_mc12_JetETMiss)
 DECLARE_TOOL_FACTORY( eflowCellEOverPTool_mc12_LC)
@@ -40,12 +48,16 @@ DECLARE_FACTORY_ENTRIES(eflowRec) {
     DECLARE_ALGORITHM( eflowObjectBuilder )
     DECLARE_ALGORITHM (eflowOverlapRemoval )
     DECLARE_ALGORITHM ( eflowVertexInformationSetter )
+    DECLARE_ALGORITHM( PFLeptonSelector )
+    DECLARE_ALGORITHM( PFClusterSelector )
+    DECLARE_ALGORITHM( PFTrackSelector )
     DECLARE_TOOL ( eflowRecoverSplitShowersTool )
     DECLARE_TOOL ( eflowCellLevelSubtractionTool )
     DECLARE_TOOL ( eflowMomentCalculatorTool )
     DECLARE_TOOL ( eflowClusterCollectionTool )
     DECLARE_TOOL ( eflowLCCalibTool )
     DECLARE_TOOL ( eflowTrackCaloExtensionTool )
+    DECLARE_TOOL ( eflowTrackCaloDummyExtensionTool )
     DECLARE_TOOL ( PFTrackClusterMatchingTool )
     DECLARE_TOOL (eflowCellEOverPTool_mc12_JetETMiss)
     DECLARE_TOOL ( eflowCellEOverPTool_mc12_LC)
diff --git a/Reconstruction/eflowRec/src/eflowBuilder.cxx b/Reconstruction/eflowRec/src/eflowBuilder.cxx
index 72864810417d214074f5581cfe8c5ff47adc4b9a..7ccdd1e8e85eb7840f3746d6f147e100e9d40604 100644
--- a/Reconstruction/eflowRec/src/eflowBuilder.cxx
+++ b/Reconstruction/eflowRec/src/eflowBuilder.cxx
@@ -118,10 +118,10 @@ StatusCode eflowBuilder::initialize()
 
 /////////////////////////////////////////////////////////////////
 
-  ATH_MSG_INFO( "Using the Algorithms:"  );
-  ATH_MSG_INFO(  m_eflowPreparationAlgName  );
-  ATH_MSG_INFO( m_eflowObjectBuilderAlgName  );
-  ATH_MSG_INFO( m_eflowQuantitiesAlgName  );
+  ATH_MSG_VERBOSE( "Using the Algorithms:"  );
+  ATH_MSG_VERBOSE(  m_eflowPreparationAlgName  );
+  ATH_MSG_VERBOSE( m_eflowObjectBuilderAlgName  );
+  ATH_MSG_VERBOSE( m_eflowQuantitiesAlgName  );
 
 
   return sc;
diff --git a/Reconstruction/eflowRec/src/eflowCaloObjectBuilder.cxx b/Reconstruction/eflowRec/src/eflowCaloObjectBuilder.cxx
index 522bf3ca072240186e795c360b5f49d3382ff031..10b32a3e3a38d0027a1d25d819a35b6cead4dfa7 100644
--- a/Reconstruction/eflowRec/src/eflowCaloObjectBuilder.cxx
+++ b/Reconstruction/eflowRec/src/eflowCaloObjectBuilder.cxx
@@ -76,7 +76,7 @@ StatusCode eflowCaloObjectBuilder::initialize() {
     msg(MSG::WARNING) << "Failed to retrieve " << m_tools << endmsg;
     return StatusCode::SUCCESS;
   } else {
-    msg(MSG::INFO) << "Retrieved " << m_tools << endmsg;
+    msg(MSG::VERBOSE) << "Retrieved " << m_tools << endmsg;
   }
   
   // print the list of tools - taken from JetRec/JetAlgorithm.cxx
@@ -132,20 +132,20 @@ StatusCode eflowCaloObjectBuilder::finalize() { return StatusCode::SUCCESS; }
 
 void eflowCaloObjectBuilder::printTools() {
   // print the list of tools - taken from JetRec/JetAlgorithm.cxx
-  msg(MSG::INFO) << " " << endmsg;
-  msg(MSG::INFO) << "List of tools in execution sequence of eflowCaloObjectBuilder:" << endmsg;
-  msg(MSG::INFO) << "------------------------------------" << endmsg;
-  msg(MSG::INFO) << " " << endmsg;
+  ATH_MSG_VERBOSE(" ");
+  ATH_MSG_VERBOSE("List of tools in execution sequence of eflowCaloObjectBuilder:");
+  ATH_MSG_VERBOSE("------------------------------------");
+  ATH_MSG_VERBOSE(" ");
   ToolHandleArray<eflowISubtractionAlgTool>::iterator itTool = m_tools.begin();
   ToolHandleArray<eflowISubtractionAlgTool>::iterator lastTool = m_tools.end();
   unsigned int toolCtr = 0;
   for (; itTool != lastTool; itTool++) {
     toolCtr++;
-    msg(MSG::INFO) << std::setw(2) << std::setiosflags(std::ios_base::right) << toolCtr << ".) "
+    ATH_MSG_VERBOSE(std::setw(2) << std::setiosflags(std::ios_base::right) << toolCtr << ".) "
     << std::resetiosflags(std::ios_base::right) << std::setw(36) << std::setfill('.')
     << std::setiosflags(std::ios_base::left) << (*itTool)->type() << std::setfill('.')
-    << (*itTool)->name() << std::setfill(' ') << endmsg;
+		    << (*itTool)->name() << std::setfill(' '));
   }
-  msg(MSG::INFO) << " " << endmsg;
-  msg(MSG::INFO) << "------------------------------------" << endmsg;
+  ATH_MSG_VERBOSE(" ");
+  ATH_MSG_VERBOSE("------------------------------------");
 }
diff --git a/Reconstruction/eflowRec/src/eflowCellLevelSubtractionTool.cxx b/Reconstruction/eflowRec/src/eflowCellLevelSubtractionTool.cxx
index c270fdfe072340a0794a6dad48aae1bfbf082bb2..d2caad4a287f1311b5cbe0e3d41012958ab9ee63 100644
--- a/Reconstruction/eflowRec/src/eflowCellLevelSubtractionTool.cxx
+++ b/Reconstruction/eflowRec/src/eflowCellLevelSubtractionTool.cxx
@@ -125,7 +125,7 @@ StatusCode eflowCellLevelSubtractionTool::initialize(){
 
 void eflowCellLevelSubtractionTool::execute(eflowCaloObjectContainer* theEflowCaloObjectContainer, eflowRecTrackContainer* recTrackContainer, eflowRecClusterContainer* recClusterContainer) {
 
-  if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "Executing eflowCellLevelSubtractionTool" << endmsg;
+  ATH_MSG_VERBOSE("Executing eflowCellLevelSubtractionTool");
 
   m_eflowCaloObjectContainer = theEflowCaloObjectContainer;
   m_eflowTrackContainer = recTrackContainer;
diff --git a/Reconstruction/eflowRec/src/eflowObjectBuilder.cxx b/Reconstruction/eflowRec/src/eflowObjectBuilder.cxx
index 884844903fc0356dbdf19f0b0c6ce6cc135ec43c..422856e57d69201955f8344d1bcf73a081a285f5 100644
--- a/Reconstruction/eflowRec/src/eflowObjectBuilder.cxx
+++ b/Reconstruction/eflowRec/src/eflowObjectBuilder.cxx
@@ -46,25 +46,25 @@ eflowObjectBuilder::~eflowObjectBuilder() { }
 
 StatusCode eflowObjectBuilder::initialize() {
 
-  msg(MSG::DEBUG) << "Initialising eflowObjectBuilder " << endmsg;
+  ATH_MSG_DEBUG("Initialising eflowObjectBuilder ");
 
   if (service("StoreGateSvc", m_storeGate).isFailure()) {
-    msg(MSG::WARNING) << "Unable to retrieve pointer to StoreGateSvc" << endmsg;
+    ATH_MSG_WARNING("Unable to retrieve pointer to StoreGateSvc");
     return StatusCode::SUCCESS;
   }
 
   /* Tool service */
   IToolSvc* myToolSvc;
   if ( service("ToolSvc",myToolSvc).isFailure() ) {
-    msg(MSG::WARNING) << " Tool Service Not Found" << endmsg;
+    ATH_MSG_WARNING(" Tool Service Not Found");
     return StatusCode::SUCCESS;
   }
 
   if ( m_tools.retrieve().isFailure() ) {
-    msg(MSG::WARNING) << "Failed to retrieve " << m_tools << endmsg;
+    ATH_MSG_WARNING("Failed to retrieve " << m_tools);
     return StatusCode::SUCCESS;
   } else {
-    msg(MSG::INFO) << "Retrieved " << m_tools << endmsg;
+    ATH_MSG_VERBOSE("Retrieved " << m_tools);
   }
 
   // print the list of tools - taken from JetRec/JetAlgorithm.cxx
@@ -108,20 +108,20 @@ StatusCode eflowObjectBuilder::finalize() { return StatusCode::SUCCESS; }
 
 void eflowObjectBuilder::printTools() {
   // print the list of tools - taken from JetRec/JetAlgorithm.cxx
-  msg(MSG::INFO) << " " << endmsg;
-  msg(MSG::INFO) << "List of tools in execution sequence of eflowObjectBuilder:" << endmsg;
-  msg(MSG::INFO) << "------------------------------------" << endmsg;
-  msg(MSG::INFO) << " " << endmsg;
+  ATH_MSG_VERBOSE(" ");
+  ATH_MSG_VERBOSE("List of tools in execution sequence of eflowObjectBuilder:");
+  ATH_MSG_VERBOSE("------------------------------------");
+  ATH_MSG_VERBOSE(" ");
   ToolHandleArray<eflowBaseAlgTool>::iterator itTool = m_tools.begin();
   ToolHandleArray<eflowBaseAlgTool>::iterator lastTool = m_tools.end();
   unsigned int toolCtr = 0;
   for (; itTool != lastTool; itTool++) {
     toolCtr++;
-    msg(MSG::INFO) << std::setw(2) << std::setiosflags(std::ios_base::right) << toolCtr << ".) "
+    ATH_MSG_VERBOSE(std::setw(2) << std::setiosflags(std::ios_base::right) << toolCtr << ".) "
     << std::resetiosflags(std::ios_base::right) << std::setw(36) << std::setfill('.')
     << std::setiosflags(std::ios_base::left) << (*itTool)->type() << std::setfill('.')
-    << (*itTool)->name() << std::setfill(' ') << endmsg;
+		    << (*itTool)->name() << std::setfill(' '));
   }
-  msg(MSG::INFO) << " " << endmsg;
-  msg(MSG::INFO) << "------------------------------------" << endmsg;
+  ATH_MSG_VERBOSE(" ");
+  ATH_MSG_VERBOSE("------------------------------------");
 }
diff --git a/Reconstruction/eflowRec/src/eflowPreparation.cxx b/Reconstruction/eflowRec/src/eflowPreparation.cxx
index fd4349e470b076db0bbfae13ce3e468f43d5399c..3574c2f2dee5b513793b82bc0ceda0ed9f3911b4 100644
--- a/Reconstruction/eflowRec/src/eflowPreparation.cxx
+++ b/Reconstruction/eflowRec/src/eflowPreparation.cxx
@@ -132,7 +132,7 @@ StatusCode eflowPreparation::initialize() {
 
 StatusCode eflowPreparation::finalize() {
 
-  msg(MSG::INFO) << "Produced " << m_nMatches << " track-cluster matches." << endmsg;
+  ATH_MSG_INFO("Produced " << m_nMatches << " track-cluster matches.");
 
   return StatusCode::SUCCESS;
 
diff --git a/Reconstruction/eflowRec/src/eflowRecTrack.cxx b/Reconstruction/eflowRec/src/eflowRecTrack.cxx
index 7c7c9fabf0d1a95313b851f51a91887ef2c8de1f..759fb75904d2a94423de1d328e280037bc0511f6 100644
--- a/Reconstruction/eflowRec/src/eflowRecTrack.cxx
+++ b/Reconstruction/eflowRec/src/eflowRecTrack.cxx
@@ -13,6 +13,10 @@
 #include "eflowRec/eflowDepthCalculator.h"
 #include "eflowRec/eflowTrackExtrapolatorBaseAlgTool.h"
 
+#include "GaudiKernel/IMessageSvc.h"
+#include "GaudiKernel/ISvcLocator.h"
+#include "GaudiKernel/StatusCode.h"
+
 eflowRecTrack::eflowRecTrack(
     const ElementLink<xAOD::TrackParticleContainer>& trackElemLink,
     const ToolHandle<eflowTrackExtrapolatorBaseAlgTool>& theTrackExtrapolatorTool) :
@@ -25,6 +29,10 @@ eflowRecTrack::eflowRecTrack(
     m_isSubtracted(false),
     m_hasBin(true),
     m_trackCaloPoints(theTrackExtrapolatorTool->execute(m_track)) {
+  m_svcLoc = Gaudi::svcLocator();
+  StatusCode status = m_svcLoc->service( "MessageSvc", m_msgSvc );  
+  if ( status.isSuccess( ) ) m_mlog = std::make_unique<MsgStream>(m_msgSvc,"eflowRecTrack");
+  else m_mlog = nullptr;
 }
 
 eflowRecTrack::eflowRecTrack(const eflowRecTrack& eflowRecTrack){
@@ -39,6 +47,10 @@ eflowRecTrack::eflowRecTrack(const eflowRecTrack& eflowRecTrack){
   m_isSubtracted = eflowRecTrack.m_isSubtracted;
   m_hasBin = eflowRecTrack.m_hasBin;
   m_trackCaloPoints = std::make_unique<eflowTrackCaloPoints>(*eflowRecTrack.m_trackCaloPoints);
+  m_svcLoc = Gaudi::svcLocator();
+  StatusCode status = m_svcLoc->service( "MessageSvc", m_msgSvc );  
+  if ( status.isSuccess( ) ) m_mlog = std::make_unique<MsgStream>(m_msgSvc,"eflowRecTrack");
+  else m_mlog = nullptr;
 }
 
 eflowRecTrack& eflowRecTrack::operator = (const eflowRecTrack& originalEflowRecTrack){
@@ -56,6 +68,10 @@ eflowRecTrack& eflowRecTrack::operator = (const eflowRecTrack& originalEflowRecT
     m_isSubtracted = originalEflowRecTrack.m_isSubtracted;
     m_hasBin = originalEflowRecTrack.m_hasBin;
     m_trackCaloPoints = std::make_unique<eflowTrackCaloPoints>(*originalEflowRecTrack.m_trackCaloPoints);
+    m_svcLoc = Gaudi::svcLocator();
+    StatusCode status = m_svcLoc->service( "MessageSvc", m_msgSvc );  
+    if ( status.isSuccess( ) ) m_mlog = std::make_unique<MsgStream>(m_msgSvc,"eflowRecTrack");
+    else m_mlog = nullptr;
     return *this;
   }//if not assigning to self, then we have copied the data to the new object
 }
diff --git a/Reconstruction/eflowRec/src/eflowRecoverSplitShowersTool.cxx b/Reconstruction/eflowRec/src/eflowRecoverSplitShowersTool.cxx
index 021c31e6a4843e5f99ca9354a5964e8822a37452..64c8ae81d46dd4167cf4e9737fffc484cfb3e6f6 100644
--- a/Reconstruction/eflowRec/src/eflowRecoverSplitShowersTool.cxx
+++ b/Reconstruction/eflowRec/src/eflowRecoverSplitShowersTool.cxx
@@ -105,7 +105,7 @@ void eflowRecoverSplitShowersTool::execute(eflowCaloObjectContainer* theEflowCal
 
 StatusCode eflowRecoverSplitShowersTool::finalize(){
 
-  msg(MSG::INFO) << "Produced " << m_nTrackClusterMatches << " track-cluster matches." << endmsg;
+  ATH_MSG_INFO("Produced " << m_nTrackClusterMatches << " track-cluster matches.");
 
   return StatusCode::SUCCESS;
 
diff --git a/Reconstruction/eflowRec/src/eflowTrackCaloDummyExtensionTool.cxx b/Reconstruction/eflowRec/src/eflowTrackCaloDummyExtensionTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..244bebd5cfbb798e54f2b94c6d8965db48ad3251
--- /dev/null
+++ b/Reconstruction/eflowRec/src/eflowTrackCaloDummyExtensionTool.cxx
@@ -0,0 +1,270 @@
+/********************************************************************
+
+ NAME:     eflowTrackCaloDummyExtensionTool.cxx
+ PACKAGE:  offline/Reconstruction/eflowRec
+
+ AUTHORS:  T.Guttenberger
+ CREATED:  19th September, 2014
+
+ ********************************************************************/
+
+#include <eflowRec/eflowTrackCaloDummyExtensionTool.h>
+
+#include "eflowRec/eflowTrackCaloPoints.h"
+
+#include "TrkParameters/TrackParameters.h"  // typedef
+#include "xAODTracking/Vertex.h"  // typedef
+
+#include "GaudiKernel/ListItem.h"
+//#include "GaudiKernel/ToolHandle.h"
+
+#include <vector>
+#include <utility>
+
+#include "PathResolver/PathResolver.h"
+#include "TFile.h"
+#include "TF1.h"
+
+
+//using std::pair;
+
+std::vector<eflowCalo::LAYER> getLayerList(float trketa) {
+  std::vector<eflowCalo::LAYER> list;
+  for(unsigned int ilayer=eflowCalo::EMB1; ilayer<eflowCalo::nRegions; ++ilayer) {
+    eflowCalo::LAYER layer = eflowCalo::LAYER(ilayer);
+    switch(layer) {
+    case eflowCalo::EMB1:
+    case eflowCalo::EMB2:
+      if(fabs(trketa)<1.475) {list.push_back(layer);}
+      break;
+    case eflowCalo::EMB3:
+      if(fabs(trketa)<1.35) {list.push_back(layer);}
+      break;
+
+    case eflowCalo::EME1:
+    case eflowCalo::EME2:
+      if(fabs(trketa)>1.375 && fabs(trketa)<3.2) {list.push_back(layer);}
+      break;
+    case eflowCalo::EME3:
+      if(fabs(trketa)>1.5 && fabs(trketa)<2.5) {list.push_back(layer);}
+      break;
+
+    case eflowCalo::Tile1:
+    case eflowCalo::Tile2:
+    case eflowCalo::Tile3:
+      if(fabs(trketa)<1.7) {list.push_back(layer);}
+      break;
+  
+    case eflowCalo::HEC1:
+    case eflowCalo::HEC2:
+    case eflowCalo::HEC3:
+    case eflowCalo::HEC4:
+      if(fabs(trketa)>1.5) {list.push_back(layer);}
+      break;
+    default:
+      break;
+    }
+  }
+  return list;
+}
+
+namespace SimpleExtrap {
+  const static SG::AuxElement::Decorator<float> dec_etaEM1("eta_EM1_simple");
+  const static SG::AuxElement::Decorator<float> dec_phiEM1("phi_EM1_simple");
+  const static SG::AuxElement::Decorator<float> dec_etaEM2("eta_EM2_simple");
+  const static SG::AuxElement::Decorator<float> dec_phiEM2("phi_EM2_simple");
+  const static SG::AuxElement::Decorator<float> dec_etaEM3("eta_EM3_simple");
+  const static SG::AuxElement::Decorator<float> dec_phiEM3("phi_EM3_simple");
+
+  const static SG::AuxElement::Decorator<float> dec_etaHAD1("eta_HAD1_simple");
+  const static SG::AuxElement::Decorator<float> dec_phiHAD1("phi_HAD1_simple");
+  const static SG::AuxElement::Decorator<float> dec_etaHAD2("eta_HAD2_simple");
+  const static SG::AuxElement::Decorator<float> dec_phiHAD2("phi_HAD2_simple");
+  const static SG::AuxElement::Decorator<float> dec_etaHAD3("eta_HAD3_simple");
+  const static SG::AuxElement::Decorator<float> dec_phiHAD3("phi_HAD3_simple");
+  const static SG::AuxElement::Decorator<float> dec_etaHAD4("eta_HAD4_simple");
+  const static SG::AuxElement::Decorator<float> dec_phiHAD4("phi_HAD4_simple");
+
+  void decorateWithLayerEtaPhi(const xAOD::TrackParticle& tp, const eflowTrackCaloPoints& tcp) {
+    for(unsigned int ilayer=eflowCalo::EMB1; ilayer<eflowCalo::nRegions; ++ilayer) {
+      eflowCalo::LAYER layer = eflowCalo::LAYER(ilayer);
+      float etalayer = tcp.getEta(layer);
+      float philayer = tcp.getPhi(layer);
+      if(etalayer>-998) {
+	switch(layer) {
+	case eflowCalo::EMB1:
+	case eflowCalo::EME1:
+	  dec_etaEM1(tp) = etalayer;
+	  dec_phiEM1(tp) = philayer;
+	  break;
+	case eflowCalo::EMB2:
+	case eflowCalo::EME2:
+	  dec_etaEM2(tp) = etalayer;
+	  dec_phiEM2(tp) = philayer;
+	  break;
+	case eflowCalo::EMB3:
+	case eflowCalo::EME3:
+	  dec_etaEM3(tp) = etalayer;
+	  dec_phiEM3(tp) = philayer;
+	  break;
+	case eflowCalo::HEC1:
+	case eflowCalo::Tile1:
+	  dec_etaHAD1(tp) = etalayer;
+	  dec_phiHAD1(tp) = philayer;
+	  break;
+	case eflowCalo::HEC2:
+	case eflowCalo::Tile2:
+	  dec_etaHAD2(tp) = etalayer;
+	  dec_phiHAD2(tp) = philayer;
+	  break;
+	case eflowCalo::HEC3:
+	case eflowCalo::Tile3:
+	  dec_etaHAD3(tp) = etalayer;
+	  dec_phiHAD3(tp) = philayer;
+	  break;
+	case eflowCalo::HEC4:
+	  dec_etaHAD4(tp) = etalayer;
+	  dec_phiHAD4(tp) = philayer;
+	  break;
+	default:
+	  break;
+	}
+      }
+    }
+  }
+}
+
+eflowTrackCaloDummyExtensionTool::eflowTrackCaloDummyExtensionTool(const std::string& type, const std::string& name, const IInterface* parent)  :
+    AthAlgTool(type, name, parent) {
+  declareInterface<eflowTrackExtrapolatorBaseAlgTool>(this);
+
+  declareProperty( "doMapEstimation",          m_doMapEstimation   = false);
+  declareProperty( "mapEstimationPath",        m_mapEstimationPath = "eflowRec/data/");//The last slash is needed!
+  declareProperty( "ParameterGraphName",       m_parameterGraphName = "Paramter_vs_eta");
+
+}
+
+eflowTrackCaloDummyExtensionTool::~eflowTrackCaloDummyExtensionTool() {
+}
+
+StatusCode eflowTrackCaloDummyExtensionTool::initialize() {
+
+  /* Loading estimation map. */
+  if(m_doMapEstimation){
+ 
+    std::string namefile_had1 = PathResolver::find_file(m_mapEstimationPath+"Hist_HAD1.root","DATAPATH");
+    FillEstimationMap(namefile_had1.c_str(),m_parameterGraphName.c_str(),eflowCalo::HEC1);
+    FillEstimationMap(namefile_had1.c_str(),m_parameterGraphName.c_str(),eflowCalo::Tile1);
+    ATH_MSG_INFO("Loading HAD1 extrapolation file from "<< namefile_had1 << ".");
+ 
+    std::string namefile_had2 = PathResolver::find_file(m_mapEstimationPath+"Hist_HAD2.root","DATAPATH");
+    FillEstimationMap(namefile_had2.c_str(),m_parameterGraphName.c_str(),eflowCalo::HEC2);
+    FillEstimationMap(namefile_had2.c_str(),m_parameterGraphName.c_str(),eflowCalo::Tile2);
+    ATH_MSG_INFO("Loading HAD2 extrapolation file from "<< namefile_had2 << ".");
+ 
+    std::string namefile_had3 = PathResolver::find_file(m_mapEstimationPath+"Hist_HAD3.root","DATAPATH");
+    FillEstimationMap(namefile_had3.c_str(),m_parameterGraphName.c_str(),eflowCalo::HEC3);
+    FillEstimationMap(namefile_had3.c_str(),m_parameterGraphName.c_str(),eflowCalo::Tile3);
+    ATH_MSG_INFO("Loading HAD3 extrapolation file from "<< namefile_had3 << ".");
+ 
+    //FIX THIS
+    std::string namefile_had4 = PathResolver::find_file(m_mapEstimationPath+"Hist_HAD4.root","DATAPATH");
+    FillEstimationMap(namefile_had4.c_str(),m_parameterGraphName.c_str(),eflowCalo::HEC4);
+    ATH_MSG_INFO("Loading HAD4 extrapolation file from "<< namefile_had4 << ".");
+ 
+    std::string namefile_em1  = PathResolver::find_file(m_mapEstimationPath+"Hist_EM1.root","DATAPATH");
+    FillEstimationMap(namefile_em1.c_str(),m_parameterGraphName.c_str(),eflowCalo::EMB1);
+    FillEstimationMap(namefile_em1.c_str(),m_parameterGraphName.c_str(),eflowCalo::EME1);
+    ATH_MSG_INFO("Loading EM1 extrapolation file from "<< namefile_em1 << ".");
+ 
+    std::string namefile_em2  = PathResolver::find_file(m_mapEstimationPath+"Hist_EM2.root","DATAPATH");
+    FillEstimationMap(namefile_em2.c_str(),m_parameterGraphName.c_str(),eflowCalo::EMB2);
+    FillEstimationMap(namefile_em2.c_str(),m_parameterGraphName.c_str(),eflowCalo::EME2);
+    ATH_MSG_INFO("Loading EM2 extrapolation file from "<< namefile_em2 << ".");
+ 
+    std::string namefile_em3  = PathResolver::find_file(m_mapEstimationPath+"Hist_EM3.root","DATAPATH");
+    FillEstimationMap(namefile_em3.c_str(),m_parameterGraphName.c_str(),eflowCalo::EMB3);
+    FillEstimationMap(namefile_em3.c_str(),m_parameterGraphName.c_str(),eflowCalo::EME3);
+    ATH_MSG_INFO("Loading EM3 extrapolation file from "<< namefile_em3 << ".");
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+std::unique_ptr<eflowTrackCaloPoints> eflowTrackCaloDummyExtensionTool::execute(const xAOD::TrackParticle* track) const {
+  msg(MSG::VERBOSE) << " Now running eflowTrackCaloDummyExtensionTool" << endmsg;
+
+  float trackP = fabs(1./track->qOverP());
+  Amg::Vector3D dummyMom(trackP*cos(track->phi())*sin(track->theta()),
+			 trackP*sin(track->phi())*sin(track->theta()),
+			 trackP*cos(track->theta()));
+  // Use the eta/phi direction at the PV to stand in for the extrapolated position in the calo
+  Trk::CurvilinearParameters dummyPars(dummyMom,dummyMom,track->qOverP()>0);
+
+  /*make the map*/
+  std::map<eflowCalo::LAYER, const Trk::TrackParameters*> parametersMap;
+
+  /*fill the map*/
+  for(eflowCalo::LAYER layer : getLayerList(track->eta())) {
+    /*Correct the map*/
+    if(m_doMapEstimation) {
+      parametersMap[layer] = CorrectLayerPosition(layer, track);
+    }
+    else{
+      parametersMap[layer] = dummyPars.clone();
+    }
+  }
+
+  if (!m_doMapEstimation) return std::make_unique<eflowTrackCaloPoints>(parametersMap);
+  else{
+    std::unique_ptr<eflowTrackCaloPoints> eflowTrackCaloPoints_uniquePtr = std::make_unique<eflowTrackCaloPoints>(parametersMap);
+    SimpleExtrap::decorateWithLayerEtaPhi(*track, *(eflowTrackCaloPoints_uniquePtr.get()));
+    return eflowTrackCaloPoints_uniquePtr;
+  }
+    
+}
+
+StatusCode eflowTrackCaloDummyExtensionTool::finalize() {
+  return StatusCode::SUCCESS;
+}
+
+
+void eflowTrackCaloDummyExtensionTool::FillEstimationMap(const char * filename, const char * graphname, eflowCalo::LAYER layer) {
+  TFile * file = new TFile(filename);
+  m_mapEstimation[layer] = (TGraphErrors*)file->Get(graphname);
+  file->Close();
+}
+
+Trk::CurvilinearParameters* eflowTrackCaloDummyExtensionTool::CorrectLayerPosition(eflowCalo::LAYER layer, const xAOD::TrackParticle* track) const {
+
+  /* Getting the correction parameter */
+  std::map<eflowCalo::LAYER, TGraphErrors*>::const_iterator theIterator = m_mapEstimation.find(layer);
+  if (theIterator != m_mapEstimation.end()){
+    TGraphErrors * graph = (*theIterator).second;
+    ATH_MSG_DEBUG("Correction graph: " << graph);
+    ATH_MSG_DEBUG("Correction layer: " << layer);
+    double p0 = graph->Eval(fabs(track->eta())); // An linerly interpolated value is retrieved for the estimation of p0 between two eta graph points
+    float absDeltaPhi = p0*1000./fabs(track->pt()); //Barbara provided the hyperbolic fits dividing the pt of tracks by 1000.
+    ATH_MSG_DEBUG("Phi: " << track->phi());
+    ATH_MSG_DEBUG("Eta: " << fabs(track->eta()));
+    ATH_MSG_DEBUG("pt: " << fabs(track->pt()/1000.));
+    ATH_MSG_DEBUG("|DeltaPhi|: " << absDeltaPhi);
+    ATH_MSG_DEBUG("Charge: " << track->charge());
+    float corrected_phi = 0.;
+    corrected_phi = track->phi() + track->charge()*absDeltaPhi;
+    ATH_MSG_DEBUG("CorrectedPhi: " << corrected_phi);
+    
+    float trackP = fabs(1./track->qOverP());
+    Amg::Vector3D curvilinearCorrMom(trackP*cos(corrected_phi)*sin(track->theta()),
+				     trackP*sin(corrected_phi)*sin(track->theta()),
+				     trackP*cos(track->theta()));
+    // Use the eta/phi direction at the PV to stand in for the extrapolated position in the calo
+    Trk::CurvilinearParameters * ret = new Trk::CurvilinearParameters(curvilinearCorrMom,curvilinearCorrMom,track->qOverP()>0);
+
+    return ret;
+  }
+  else{
+    ATH_MSG_WARNING("Unable to find entry in  m_mapEstimation for calorimeter layer: " << layer);
+    return nullptr;
+  }
+}
diff --git a/Reconstruction/eflowRec/src/eflowTrackCaloExtensionTool.cxx b/Reconstruction/eflowRec/src/eflowTrackCaloExtensionTool.cxx
index 37e4b8b02e80fe8988625f4d34e4e825c647b34b..7fed651b5b5b0a64df8acfe67270c4e188cb4861 100644
--- a/Reconstruction/eflowRec/src/eflowTrackCaloExtensionTool.cxx
+++ b/Reconstruction/eflowRec/src/eflowTrackCaloExtensionTool.cxx
@@ -32,7 +32,7 @@
 
 eflowTrackCaloExtensionTool::eflowTrackCaloExtensionTool(const std::string& type, const std::string& name, const IInterface* parent)  :
     AthAlgTool(type, name, parent),
-    m_theTrackExtrapolatorTool("Trk::ParticleCaloExtensionTool"),
+    m_theTrackExtrapolatorTool("Trk::ParticleCaloExtensionTool",this),
     m_trackParametersIdHelper(std::make_unique<Trk::TrackParametersIdHelper>())
 {
   declareInterface<eflowTrackExtrapolatorBaseAlgTool>(this);
@@ -46,25 +46,25 @@ StatusCode eflowTrackCaloExtensionTool::initialize() {
   /* Tool service */
   IToolSvc* myToolSvc;
   if (service("ToolSvc", myToolSvc).isFailure()) {
-    msg(MSG::WARNING) << " Tool Service Not Found" << endmsg;
+    ATH_MSG_WARNING(" Tool Service Not Found");
     return StatusCode::SUCCESS;
   }
 
   if (m_theTrackExtrapolatorTool.retrieve().isFailure()) {
-    msg(MSG::WARNING) << "Cannot find Extrapolation tool "
-    << m_theTrackExtrapolatorTool.typeAndName() << endmsg;
+    ATH_MSG_WARNING("Cannot find Extrapolation tool "
+		    << m_theTrackExtrapolatorTool.typeAndName());
     return StatusCode::SUCCESS;
   } else {
-    msg(MSG::INFO) << "Successfully retrieved Extrapolation tool "
-    << m_theTrackExtrapolatorTool.typeAndName() << endmsg;
+    ATH_MSG_VERBOSE("Successfully retrieved Extrapolation tool "
+		    << m_theTrackExtrapolatorTool.typeAndName());
   }
 
   return StatusCode::SUCCESS;
 }
 
 std::unique_ptr<eflowTrackCaloPoints> eflowTrackCaloExtensionTool::execute(const xAOD::TrackParticle* track) const {
-  //++m_tracksProcessed;
-  msg(MSG::VERBOSE) << " Now running eflowTrackCaloExtensionTool" << endmsg;
+
+  ATH_MSG_VERBOSE(" Now running eflowTrackCaloExtensionTool");
 
   /*make the map*/
   std::map<eflowCalo::LAYER, const Trk::TrackParameters*> parametersMap;
@@ -88,7 +88,7 @@ std::unique_ptr<eflowTrackCaloPoints> eflowTrackCaloExtensionTool::execute(const
     return std::make_unique<eflowTrackCaloPoints>(parametersMap);
   }
   else{
-    msg(MSG::WARNING) << "TrackExtension failed for track with pt and eta " << track->pt() << " and " << track->eta() << endmsg;
+    if (track->pt() > 3*Gaudi::Units::GeV) ATH_MSG_WARNING("TrackExtension failed for track with pt and eta " << track->pt() << " and " << track->eta());
     parametersMap[eflowCalo::LAYER::Unknown] = nullptr;
     return std::make_unique<eflowTrackCaloPoints>(parametersMap);
   }
@@ -106,14 +106,14 @@ eflowCalo::LAYER eflowTrackCaloExtensionTool::getLayer(const Trk::CurvilinearPar
 
   /*Return unknown when the identifier is invalid */
   if (!m_trackParametersIdHelper->isValid(parametersIdentifier)) {
-    msg(MSG::ERROR) << "invalid Track Identifier"<<endmsg;
+    ATH_MSG_ERROR("invalid Track Identifier");
     return eflowCalo::LAYER::Unknown;
   };
 
   if(m_trackParametersIdHelper->isEntryToVolume(parametersIdentifier)) {
-    msg(MSG::VERBOSE) << "is Volume Entry" << endmsg;
+    ATH_MSG_VERBOSE("is Volume Entry");
  } else {
-    msg(MSG::VERBOSE) << "is Volume Exit" << endmsg;
+    ATH_MSG_VERBOSE("is Volume Exit");
     }
 
   return eflowCalo::translateSampl(m_trackParametersIdHelper->caloSample(parametersIdentifier));
diff --git a/Reconstruction/egamma/egammaCaloTools/doc/packagedoc.h b/Reconstruction/egamma/egammaCaloTools/doc/packagedoc.h
index 20bf411e4bad289704ba580aec26c0976ae5c433..2af315f72f13c1954d7460c3aee8ef9587ea63ad 100644
--- a/Reconstruction/egamma/egammaCaloTools/doc/packagedoc.h
+++ b/Reconstruction/egamma/egammaCaloTools/doc/packagedoc.h
@@ -34,4 +34,3 @@ Computes the barycentre in depth (R in barrel, z in endcaps)
 @author Alexander Khodinov <khodinov@bnl.gov>
 
 */
-
diff --git a/Reconstruction/egamma/egammaCaloTools/src/egammaStripsShape.cxx b/Reconstruction/egamma/egammaCaloTools/src/egammaStripsShape.cxx
index 174d8d8e0c431db4301415999ef762338e21ddcd..e657372f0de9465f5f035b4288dcdd79edee7856 100755
--- a/Reconstruction/egamma/egammaCaloTools/src/egammaStripsShape.cxx
+++ b/Reconstruction/egamma/egammaCaloTools/src/egammaStripsShape.cxx
@@ -83,11 +83,12 @@ egammaStripsShape::egammaStripsShape(const std::string& type,
   //
   // calculate quantities base on information in the strips in a region
   // around the cluster. 
+  //
   // Use 2 strips in phi and cover a region of +-1.1875
-  // times 0.025 in eta (corresponds to 19 strips in em barrel)
+  // 5 cells in eta based on second sampling granularity ~0.025 in eta.
+  //Corresponds to ~19 strips in em barrel)
   //  
-  //calculate quantities based on information in a region around the cluster. 
-  declareProperty("Neta",m_neta=2.5,
+  declareProperty("Neta",m_neta=5,
 		  "Number of eta cell in each sampling in which to calculated shower shapes");
 
   declareProperty("Nphi",m_nphi=2.,
@@ -101,6 +102,10 @@ egammaStripsShape::egammaStripsShape(const std::string& type,
   declareProperty("ExecOtherVariables",m_ExecOtherVariables=true,
 		  "Calculate some less important variables");  
 
+  // Use cluster  cells or all cells 
+  declareProperty("UseCellsFromCluster" ,m_UseCellsFromCluster=true,
+		"Use Cells from the cluster");  
+
   InitVariables();
   // initialize the arrays  
   std::fill (m_enecell,     m_enecell+STRIP_ARRAY_SIZE,     0);
@@ -156,19 +161,15 @@ StatusCode egammaStripsShape::execute(const xAOD::CaloCluster *cluster,
 {
   //
   // Estimate shower shapes from first compartment
-  // based on hottest cell and deta,dphi
-  // with eta = m_cluster->eta(sam)
-  //      phi = m_cluster->phi(sam)
-  // and search for hottest cell based on granularity in the second sampling 
+  // based on hottest cell in 2nd sampling , the  deta,dphi,
+  // And the barycenter in the 1st sampling (seed) 
   //
   ATH_MSG_DEBUG(" egammaStripsShape: execute");
-
   // check if cluster is available
   if(!cluster) { 
     ATH_MSG_DEBUG(" egammaStripsShape: Invalid pointer to cluster");
     return StatusCode::SUCCESS;
   }
-
   // check if cell container is available
   if(!cell_container) { 
     ATH_MSG_DEBUG(" egammaStripsShape: Invalid pointer to cell_container");
@@ -210,7 +211,7 @@ StatusCode egammaStripsShape::execute(const xAOD::CaloCluster *cluster,
 
   // From the original (eta,phi) position, find the location
   // (sampling, barrel/end-cap, granularity)
-  if (!FindPosition()) return StatusCode::SUCCESS;
+  if (!FindPosition()) {return StatusCode::SUCCESS;}
   
   // Fill the array in energy and eta from which all relevant
   // quantities are estimated
@@ -326,8 +327,8 @@ bool egammaStripsShape::FindPosition()
   // check if cluster is in barrel or end-cap
   // sam is used in SetArray to check that cells belong to strips
   // samgran is used to estimated window to use cells in eta
-  // it is based on granularity of middle
-  // NB: for phi we use the strip granularity !!!!! 
+  // it is based on granularity of middle layer
+  // For phi we use the strip layer granularity  
   bool in_barrel =  m_egammaEnergyPositionAllSamples->inBarrel();
   // define accordingly position of xAOD::CaloCluster
   if (in_barrel) {
@@ -367,7 +368,7 @@ bool egammaStripsShape::FindPosition()
   // if no object then exit
   if (!dde) return false;
   // width in eta is granularity (dde->deta()) times number of cells (m_neta)
-  m_deta = dde->deta()*m_neta;
+  m_deta = dde->deta()*m_neta/2.0;
 
   // use samgran = granularity in first sampling for phi !!!!
   m_calo_dd->decode_sample(m_subcalo, m_barrel, m_sampling_or_module, 
@@ -377,36 +378,9 @@ bool egammaStripsShape::FindPosition()
   // if no object then exit
   if (!dde) return false;
   // width in phi is granularity (dde->dphi()) times number of cells (m_nphi)
-  m_dphi = dde->dphi()*m_nphi/2.;
-
-  // Calculate the size of the arrays
-  // granularity as for 1st sampling
-  CaloCell_ID::CaloSample samgran1;
-  if (in_barrel) {
-    samgran1 = CaloCell_ID::EMB1; 
-  } else {
-    samgran1 = CaloCell_ID::EME1; 
-  }
-  m_calo_dd->decode_sample(m_subcalo, m_barrel, m_sampling_or_module, samgran1);
-  dde = m_calo_dd->get_element(m_subcalo, m_sampling_or_module, m_barrel, m_etamax, m_phimax);
-  double deta1 = dde->deta();
+  m_dphi = dde->dphi()*m_nphi/2.0;
 
-  // granularity as for 2nd sampling
-  if (in_barrel) {
-    samgran1 = CaloCell_ID::EMB2; 
-  } else {
-    samgran1 = CaloCell_ID::EME2; 
-  }
-  m_calo_dd->decode_sample(m_subcalo, m_barrel, m_sampling_or_module, samgran1);
-  dde = m_calo_dd->get_element(m_subcalo, m_sampling_or_module, m_barrel, m_etamax, m_phimax);
-  double deta2 = dde->deta();
-
-  m_sizearrayeta = (int)(2.*m_neta*deta2/deta1);
-  m_sizearrayeta = std::min((int)STRIP_ARRAY_SIZE,m_sizearrayeta);
-
-  // NB: actually we overwrite this logic as we use a constant size array now
   m_sizearrayeta = (int)STRIP_ARRAY_SIZE;
-  //std::cout << " sizearrayeeta = " << m_sizearrayeta << std::endl;
 
   return true;
 }
@@ -426,66 +400,105 @@ void egammaStripsShape::setArray(CaloSampling::CaloSample sam,
   //
 
   // two ways can be used to create the array
-  // 1- from the list of cells attached to the cluster
-  //    NB: one has to remember that a strip is added in cluster
-  //        if phi(strip)-phi(layer2)<dphi/2.
-  //        It can happen that in some areas were granularity is different
-  //        that only one value of this is selected,
-  //        and thus no merging is possible in phi
-
+  // 1- From the list of cells attached to the cluster
+  // 2 -Use a calo Cell List
   // temporary array of cell 
-  StripArrayHelper stripArray[DOUBLE_STRIP_ARRAY_SIZE];
+  StripArrayHelper stripArray[BIG_STRIP_ARRAY_SIZE];
 
-  // Convert eta, phi to raw.
-  // "raw" stands for Ideal/pointing positions (name is historical) 
-  // the other variables, not labeled as raw, are real and sensitive
-  // to (mis)alignment
-  // in particular it is important in end-cap which is shifted by about 4 cm
+  //Raw --> Calo Frame 
+  //Other variables ATLAS Frame
+  //Difference  is important in end-cap which is shifted by about 4 cm
+  //
   double etaraw = eta;
   double phiraw = phi;
   // look for the corresponding DetDescrElement
   const CaloDetDescrElement* dde =
     m_calo_dd->get_element (sam == CaloSampling::EMB1 ? CaloCell_ID::EMB1 :
-			    CaloCell_ID::EME1,
-                            eta, phi);
+			    CaloCell_ID::EME1, eta, phi);
   // if dde is found 
   if (dde) {
-    etaraw += dde->eta_raw() - dde->eta();
-    phiraw += dde->phi_raw() - dde->phi();
-  } else {
-    // FIX-ME : what to do if dde=0 ! jusr keep (eta,phi) ?
+    etaraw = dde->eta_raw();
+    phiraw = dde->phi_raw();
+  }
+  else{
+    return;
   }
-  // defines the boundaries around which to select cells
+
+  //The selection will be done in Raw co-ordinates
+  //defines the boundaries around which to select cells
   double etamin = etaraw - deta;
   double etamax = etaraw + deta;
   double phimin = phiraw - dphi;
-  double phimax = phiraw + dphi;
-
-  
+  double phimax = phiraw + dphi;  
   // index of elements of the array
   int index_array = 0;
   double eta_cell  = 0.;
   double phi_cell0 = 0.;
   double phi_cell  = 0.;
   
-
-  // Now loop over all cells in the cluster  
-  xAOD::CaloCluster::const_cell_iterator first = m_cluster->cell_begin();
-  xAOD::CaloCluster::const_cell_iterator last  = m_cluster->cell_end();
-  for (; first != last; ++first) {        
-    // ensure we are in 1st sampling
-    if( (*first)->caloDDE()->getSampling() == sam ) {
-      // retrieve the eta,phi of the cell
-      eta_cell = (*first)->caloDDE()->eta_raw();
-      // adjust for possible 2*pi offset. 
-      phi_cell0 = (*first)->caloDDE()->phi_raw();
-      phi_cell  = proxim(phi_cell0,phiraw) ;
-      // check if we are within boundaries
+  if(m_UseCellsFromCluster){
+    // Now loop over all cells in the cluster  
+    xAOD::CaloCluster::const_cell_iterator first = m_cluster->cell_begin();
+    xAOD::CaloCluster::const_cell_iterator last  = m_cluster->cell_end();
+    for (; first != last; ++first) {        
+      // ensure we are in 1st sampling
+      const CaloCell* theCell = *first;
+      if (!theCell){
+	continue;
+      }
+      if( theCell->caloDDE()->getSampling() == sam ) {
+	// retrieve the eta,phi of the cell
+	eta_cell = theCell->caloDDE()->eta_raw();
+	// adjust for possible 2*pi offset. 
+	phi_cell0 = theCell->caloDDE()->phi_raw();
+	phi_cell  = proxim(phi_cell0,phiraw) ;
+	// check if we are within boundaries
 	if (eta_cell >= etamin && eta_cell <= etamax) {
 	  if (phi_cell >= phimin && phi_cell <= phimax) {	    
 	    // a protection is put to avoid to have an array larger 
 	    // than 2*STRIP_ARRAY_SIZE
-	    if (index_array<DOUBLE_STRIP_ARRAY_SIZE) {
+	    if (index_array<BIG_STRIP_ARRAY_SIZE) {
+	      // energy
+	      stripArray[index_array].energy = theCell->energy()*(first.weight()); 
+	      // eta 
+	      stripArray[index_array].eta  = theCell->eta();
+	      // eta raw
+	      stripArray[index_array].etaraw = theCell->caloDDE()->eta_raw();
+	      // eta granularity
+	      stripArray[index_array].deta  = theCell->caloDDE()->deta();
+	      // index/number of cells in the array
+	      stripArray[index_array].ncell++;
+	      // increase index 
+	      index_array++;
+	    }
+	  }	  
+	}
+      }
+    }
+  }
+  else {
+    CaloCellList *ccl = new CaloCellList(m_cellContainer);
+    //CaloCellList uses ATLAS co-ordinates
+    ccl->select(dde->eta(),dde->phi_raw(),deta,dphi,sam);
+    // defines the cells interators
+    CaloCellList::list_iterator first=ccl->begin();
+    CaloCellList::list_iterator last =ccl->end();
+    for (; first != last; ++first) {        
+      //Avoid EME1 being inner endcap
+      if(! ((*first)->caloDDE()->is_lar_em_endcap_inner()) )
+      // ensure we are in 1st sampling
+      if( (*first)->caloDDE()->getSampling() == sam ) {
+	// retrieve the eta,phi of the cell
+	eta_cell = (*first)->caloDDE()->eta_raw();
+	// adjust for possible 2*pi offset. 
+	phi_cell0 = (*first)->caloDDE()->phi_raw();
+	phi_cell  = proxim(phi_cell0,phiraw) ;
+	// check if we are within boundaries
+	if (eta_cell >= etamin && eta_cell <= etamax) {
+	  if (phi_cell >= phimin && phi_cell <= phimax) {	    
+	    // a protection is put to avoid to have an array larger 
+	    // than 2*STRIP_ARRAY_SIZE
+	    if (index_array<BIG_STRIP_ARRAY_SIZE) {
 	      // energy
 	      stripArray[index_array].energy = (*first)->energy(); 
 	      // eta 
@@ -501,16 +514,15 @@ void egammaStripsShape::setArray(CaloSampling::CaloSample sam,
 	    }
 	  }	  
 	}
+      }
     }
   }
-
   // Exit early if no cells.
-  if (index_array == 0)
+  if (index_array == 0){
     return;
-
+  }
   // sort intermediate array with eta
   std::sort(stripArray,stripArray+index_array);
-  
 
   // loop on intermediate array and merge two cells in phi (when they exist)
   int ieta = 0;
@@ -532,6 +544,8 @@ void egammaStripsShape::setArray(CaloSampling::CaloSample sam,
       //if (fabs(stripArray[i].eta-stripArry[i+1]).eta>0.00001) next = true;
       if (fabs(stripArray[i].etaraw-stripArray[i+1].etaraw)>0.00001) next = true;
       if (next) {
+	//Increment the final array only if do not want to merge
+	//otherwise continue as to merge
 	ieta++;
 	next = false;
       }
@@ -539,38 +553,25 @@ void egammaStripsShape::setArray(CaloSampling::CaloSample sam,
   }
   // special case for last element which was not treated yet
   int index = index_array-1;
-  //std::cout << " last index = " << index << " " << ieta << std::endl;
   // if previous element had a different eta then append the array
   // NB: this could happen if only one cell in phi was available
   if (index == 0 ||
-      fabs(stripArray[index].etaraw-stripArray[index-1].etaraw)>0.00001)
-  {
+      fabs(stripArray[index].etaraw-stripArray[index-1].etaraw)>0.00001){
     // energy
     if (enecell_arr) enecell_arr[ieta] = stripArray[index].energy;
   }
   if (index != 0 &&
-      fabs(stripArray[index].etaraw-stripArray[index-1].etaraw)<0.00001)
-  {
+      fabs(stripArray[index].etaraw-stripArray[index-1].etaraw)<0.00001){
     // energy
-    if (enecell_arr) enecell_arr[ieta] +=  stripArray[index].energy;
+    if (enecell_arr) {enecell_arr[ieta] += stripArray[index].energy;}
   }
   // eta 
-  if (etacell_arr) etacell_arr[ieta] = stripArray[index].eta;
+  if (etacell_arr) {etacell_arr[ieta] = stripArray[index].eta;}
   // eta granularity
-  if (gracell_arr) gracell_arr[ieta] = stripArray[index].deta;
+  if (gracell_arr) {gracell_arr[ieta] = stripArray[index].deta;}
   // index/number of cells in the array
-  if (ncell_arr) ++ncell_arr[ieta];
-  //ieta++;
+  if (ncell_arr) {++ncell_arr[ieta];}
   
-  /*std::cout << " ieta = " << ieta << std::endl;
-  for (int i=0;i<40;i++) {
-    std::cout << " newetacell = " << i
-	      << " " << etacell_arr[i]
-	      << " " << gracell_arr[i]
-	      << " " << enecell_arr[i]
-	      << " " << ncell_arr[i]
-	      << std::endl;
-	      }*/
   return;
 }
 
@@ -591,14 +592,7 @@ void egammaStripsShape::setIndexSeed(double eta)
     eta_min = m_etacell[ieta]-demi_eta;
     eta_max = m_etacell[ieta]+demi_eta;
     
-    /*std::cout << " eta = " << eta 
-	      << " " << m_etacell[ieta]
-	      << " " << demi_eta
-	      << " " << eta_min
-	      << " " << eta_max
-	      << std::endl;*/
-    // beware that list is arranged from larger values to smaller ones
-    //if (fabs(eta)>fabs(m_etacellseed[ieta]) && fabs(eta)<=fabs(m_etacellseed[ieta+1]))
+    // Beware that list is arranged from larger values to smaller ones
     if ((fabs(eta)>fabs(eta_min) && fabs(eta)<=fabs(eta_max)) ||
 	(fabs(eta)<=fabs(eta_min) && fabs(eta)>fabs(eta_max)))
       m_ncetaseed = ieta;
@@ -866,13 +860,18 @@ int egammaStripsShape::setEmax2()
     if (m_ncell[ieta] == 0) continue;
 
     int ieta_left = ieta - 1;
-    while (ieta_left >= 0 && m_ncell[ieta_left] == 0)
+    while (ieta_left >= 0 && m_ncell[ieta_left] == 0){
       --ieta_left;
-    if (ieta_left < 0) continue;
+    }
+    if (ieta_left < 0) {continue;}
+
     int ieta_right = ieta + 1;
-    while (ieta_right < m_sizearrayeta && m_ncell[ieta_right] ==0)
+    while (ieta_right < m_sizearrayeta && m_ncell[ieta_right] ==0){
       ++ieta_right;
-    if (ieta_right >= m_sizearrayeta) continue;
+    }
+    if (ieta_right >= m_sizearrayeta) {
+      continue;
+    }
 
     double e = m_enecell[ieta]/ m_gracell[ieta];
     double e_left  = m_enecell[ieta_left] / m_gracell[ieta_left];
@@ -894,7 +893,6 @@ int egammaStripsShape::setEmax2()
 	    m_esec    = ecand; 
 	    //ncetasec  = ieta; 
 	}
-
 	// test energy of 2nd hottest local maximum
 	if(e>escalesec1){
           escalesec1 = e;
@@ -997,24 +995,24 @@ void egammaStripsShape::setFside()
 {
   //
   // fraction of energy outside shower core 
-  //     (E(+/-3strips)-E(+/-1strips))/ E(+/-1strips)
+  // (E(+/-3strips)-E(+/-1strips))/ E(+/-1strips)
   // 
-  
   // NB: threshold defined by M. Seman for DC0 data (or before ?), never tuned since
   double Ehsthr = 0.06*GeV; 
-  // local variable with max energy in strips
+  // Local variable with max energy in strips
   double e1     = m_emaxs1; 
-
   // left index defined as max-1
   int ileft = m_ncetamax-1;
-  while (ileft > 0 && m_ncell[ileft] == 0)
+  while (ileft > 0 && m_ncell[ileft] == 0){
     --ileft;
+  }
   double eleft  = ileft >= 0 ? m_enecell[ileft] : 0;
 
   // right index defined as max+1
   int iright = m_ncetamax+1;
-  while (iright < m_sizearrayeta-1 && m_ncell[iright] == 0)
+  while (iright < m_sizearrayeta-1 && m_ncell[iright] == 0){
     ++iright;
+  }
   double eright = iright < m_sizearrayeta ? m_enecell[iright] : 0;
 
   double fracm=0.;
@@ -1024,7 +1022,6 @@ void egammaStripsShape::setFside()
   // define index of the array from max+3 strips strips (if possible)
   int nhi = std::min(m_ncetamax+3,m_sizearrayeta-1); 
 
-  //std::cout << " e1 = " << e1 << " " << Ehsthr << std::endl;
   if(e1>Ehsthr) {
     for(int ieta=nlo;ieta<=nhi;ieta++){
       if (m_ncell[ieta] == 0) continue;
@@ -1060,9 +1057,9 @@ void egammaStripsShape::setF1core()
   // total ennergy
   double energy = m_cluster->e();
   // build fraction only if both quantities are well defined
-  if ( fabs(energy) > 0. && e132 > x )
+  if ( fabs(energy) > 0. && e132 > x ){
     m_f1core = e132/energy;
-
+  }
   return;  
 }
 
diff --git a/Reconstruction/egamma/egammaCaloTools/src/egammaStripsShape.h b/Reconstruction/egamma/egammaCaloTools/src/egammaStripsShape.h
index 711e5645e329eefd573a8f55f9be8c25a8dad06d..69413f2eeed7ddbafce3ada97e2c7561b060611c 100755
--- a/Reconstruction/egamma/egammaCaloTools/src/egammaStripsShape.h
+++ b/Reconstruction/egamma/egammaCaloTools/src/egammaStripsShape.h
@@ -173,6 +173,9 @@ class egammaStripsShape : public AthAlgTool, virtual public IegammaStripsShape {
   bool m_ExecAllVariables;
   /** @brief boolean to calculate less important variables*/
   bool m_ExecOtherVariables;
+  /** @brief boolean to use cluster cells or all cells */
+  bool m_UseCellsFromCluster;
+
   // Calo variables
   const CaloDetDescrManager* m_calo_dd;
 
@@ -181,7 +184,7 @@ class egammaStripsShape : public AthAlgTool, virtual public IegammaStripsShape {
   double m_dphi;
 
   enum { STRIP_ARRAY_SIZE = 40 };
-  enum { DOUBLE_STRIP_ARRAY_SIZE = 80 };
+  enum { BIG_STRIP_ARRAY_SIZE = STRIP_ARRAY_SIZE*3 };
   /** @brief array of cell energies*/
   double m_enecell[STRIP_ARRAY_SIZE]; 
   /** @brief array of cell eta*/
diff --git a/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt b/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt
index 670c8fc8f387af44546ea93f0771b7716ba75d68..337298d454e8ed333afd35fe145284ed87d54865 100644
--- a/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt
+++ b/Reconstruction/egamma/egammaInterfaces/CMakeLists.txt
@@ -10,6 +10,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Event/xAOD/xAODCaloEvent
                           Event/xAOD/xAODEgamma
                           Event/xAOD/xAODTracking
+                          Reconstruction/egamma/egammaRecEvent
                           GaudiKernel
                           Tracking/TrkEvent/TrkEventPrimitives
                           Tracking/TrkEvent/TrkNeutralParameters
diff --git a/Reconstruction/egamma/egammaInterfaces/doc/packagedoc.h b/Reconstruction/egamma/egammaInterfaces/doc/packagedoc.h
index ffddb676cd9507c18ce7d01c9e67f61d6578b69c..5d80777979f1da9d38e47a76a7bd31dd089cb2b8 100644
--- a/Reconstruction/egamma/egammaInterfaces/doc/packagedoc.h
+++ b/Reconstruction/egamma/egammaInterfaces/doc/packagedoc.h
@@ -50,4 +50,3 @@ selection.xml :
 @author F. Derue <derue@lpnhe.in2p3.fr>
 
 */
-
diff --git a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMConversionBuilder.h b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMConversionBuilder.h
index 678acb6337a3c0c2cf2d07959093b602f0209efa..c1cd67c1948ecb8dc19d047165dcb189d036e542 100755
--- a/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMConversionBuilder.h
+++ b/Reconstruction/egamma/egammaInterfaces/egammaInterfaces/IEMConversionBuilder.h
@@ -21,6 +21,7 @@ MODIFIED :
 // INCLUDE HEADER FILES:
 #include "egammaInterfaces/IegammaBaseTool.h"
 #include "xAODTracking/VertexContainerFwd.h"
+#include "egammaRecEvent/egammaRecContainer.h"
 // Forward declarations
 class egammaRec;
 
@@ -41,6 +42,7 @@ class IEMConversionBuilder : virtual public IegammaBaseTool
   virtual StatusCode initialize() = 0;
   /** @brief execute method*/
   virtual StatusCode contExecute() = 0;
+  virtual StatusCode contExecute(EgammaRecContainer& cont) = 0;
   /** @brief execute method*/
   virtual StatusCode executeRec(egammaRec* egRec)=0;
   /** @brief execute method*/
diff --git a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVACalib.h b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVACalib.h
index 553dcb8af91020d13771c47540e841ad18b9afeb..c86d94371f8353ab4a13bb0384c9e6445ad36fd4 100644
--- a/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVACalib.h
+++ b/Reconstruction/egamma/egammaMVACalib/egammaMVACalib/egammaMVACalib.h
@@ -425,8 +425,6 @@ class egammaMVACalib : public asg::AsgMessaging
     // the tree or chain
     TTree *m_tree, *m_input_tree;
 
-    // use internal TTree
-    bool m_useInternalTree;
 
     // Pattern of xml file names
     TPRegexp *m_fileNamePattern;
diff --git a/Reconstruction/egamma/egammaPerformance/src/ZeeTaPMonTool.cxx b/Reconstruction/egamma/egammaPerformance/src/ZeeTaPMonTool.cxx
index 2da773a2f2a1c77edac0fbf915a4986bc83eaf07..010047a5e74d00cf78ec46431e23e702dcb4e31c 100755
--- a/Reconstruction/egamma/egammaPerformance/src/ZeeTaPMonTool.cxx
+++ b/Reconstruction/egamma/egammaPerformance/src/ZeeTaPMonTool.cxx
@@ -412,15 +412,15 @@ void ZeeTaPMonTool::fillElectronProbe(const xAOD::Electron *el, bool isTight, bo
   // Associated track details
   const xAOD::TrackParticle *t = el->trackParticle();
   double trackp = 0; 
-  unsigned char numberOfBLayerHits=-1;
+  unsigned char numberOfInnermostPixelLayerHits=-1;
   unsigned char numberOfPixelHits=-1;
   unsigned char numberOfSCTHits=-1;
   unsigned char numberOfTRTHits=-1;
   if(t) {
     trackp = t->pt()*cosh(t->eta());
     // retrieve track summary information
-    if( t->summaryValue(numberOfBLayerHits,xAOD::numberOfBLayerHits) ) {
-      fillTH1FperRegion(m_hvNOfBLayerHits,ir,numberOfBLayerHits);
+    if( t->summaryValue(numberOfInnermostPixelLayerHits,xAOD::numberOfInnermostPixelLayerHits) ) {
+      fillTH1FperRegion(m_hvNOfBLayerHits,ir,numberOfInnermostPixelLayerHits);
     }
     if( t->summaryValue(numberOfPixelHits,xAOD::numberOfPixelHits) && t->summaryValue(numberOfSCTHits,xAOD::numberOfSCTHits) ) {
       fillTH1FperRegion(m_hvNOfSiHits,ir,numberOfPixelHits+numberOfSCTHits);
diff --git a/Reconstruction/egamma/egammaPerformance/src/electronMonTool.cxx b/Reconstruction/egamma/egammaPerformance/src/electronMonTool.cxx
index c2c115b4384f3ca31d3a55f2a38a7dda515d0ccf..014eac816b1f08d378744c0a02883234fb093e24 100755
--- a/Reconstruction/egamma/egammaPerformance/src/electronMonTool.cxx
+++ b/Reconstruction/egamma/egammaPerformance/src/electronMonTool.cxx
@@ -462,7 +462,7 @@ StatusCode electronMonTool::fillHistogramsForOneElectron(xAOD::ElectronContainer
     // Associated track details
     const xAOD::TrackParticle *t = (*e_iter)->trackParticle();
     double trackp = 0; 
-    unsigned char numberOfBLayerHits=-1;
+    unsigned char numberOfInnermostPixelLayerHits=-1;
     unsigned char numberOfPixelHits=-1;
     unsigned char numberOfSCTHits=-1;
     unsigned char numberOfTRTHits=-1;
@@ -471,8 +471,8 @@ StatusCode electronMonTool::fillHistogramsForOneElectron(xAOD::ElectronContainer
       if(t) {
 	trackp = t->pt()*cosh(t->eta());
 	// retrieve track summary information
-	if( t->summaryValue(numberOfBLayerHits,xAOD::numberOfBLayerHits) ) {
-	  fillTH1FperRegion(myHist.m_hvNOfBLayerHits,ir,numberOfBLayerHits);
+	if( t->summaryValue(numberOfInnermostPixelLayerHits,xAOD::numberOfInnermostPixelLayerHits) ) {
+	  fillTH1FperRegion(myHist.m_hvNOfBLayerHits,ir,numberOfInnermostPixelLayerHits);
 	}
 	if( t->summaryValue(numberOfPixelHits,xAOD::numberOfPixelHits) && t->summaryValue(numberOfSCTHits,xAOD::numberOfSCTHits) ) {
 	  fillTH1FperRegion(myHist.m_hvNOfSiHits,ir,numberOfPixelHits+numberOfSCTHits);
diff --git a/Reconstruction/egamma/egammaRec/doc/packagedoc.h b/Reconstruction/egamma/egammaRec/doc/packagedoc.h
index 416779286fd476b9e69bdfd03a14f3436c7aeedf..ccdaac32eb5c91c7a7c518a89269d983b877f59d 100644
--- a/Reconstruction/egamma/egammaRec/doc/packagedoc.h
+++ b/Reconstruction/egamma/egammaRec/doc/packagedoc.h
@@ -78,4 +78,3 @@ CBNTAA_egTruth : fill the CBNT for truth particles
 @author F. Derue <derue@lpnhe.in2p3.fr>
 @author T. Koffas  <Thomas.Koffas@cern.ch>
 */
-
diff --git a/Reconstruction/egamma/egammaRec/src/egammaBuilder.cxx b/Reconstruction/egamma/egammaRec/src/egammaBuilder.cxx
index 20d67c823c65871b9a0bf50a2ac833fcd468c94b..87ace3b2e2297154561f754dfd38ccae323aa445 100644
--- a/Reconstruction/egamma/egammaRec/src/egammaBuilder.cxx
+++ b/Reconstruction/egamma/egammaRec/src/egammaBuilder.cxx
@@ -477,7 +477,7 @@ StatusCode egammaBuilder::execute(){
     chronoName = this->name()+"_"+m_conversionBuilder->name();         
     if(m_timingProfile) m_timingProfile->chronoStart(chronoName);
     //
-    if (m_conversionBuilder->contExecute().isFailure()){
+    if (m_conversionBuilder->contExecute(*egammaRecs).isFailure()){
       ATH_MSG_ERROR("Problem executing " << m_conversionBuilder);
       return StatusCode::FAILURE;  
     }
diff --git a/Reconstruction/egamma/egammaRec/src/egammaTruthAssociationAlg.cxx b/Reconstruction/egamma/egammaRec/src/egammaTruthAssociationAlg.cxx
index 9dc23d31b0b3ade8e9531fc8d8463a5e8f4ae7a2..42903d9e8cc45c70ad2e31d4671866c446367611 100644
--- a/Reconstruction/egamma/egammaRec/src/egammaTruthAssociationAlg.cxx
+++ b/Reconstruction/egamma/egammaRec/src/egammaTruthAssociationAlg.cxx
@@ -229,15 +229,22 @@ template<class T> bool egammaTruthAssociationAlg::decorateWithRecoLink(T* part,
 
 // ==========================================================================
 xAOD::TruthParticle* egammaTruthAssociationAlg::getEgammaTruthParticle(const xAOD::TruthParticle *truth) const{
+
   if (!truth) return 0;
+
   // Find the original truth particle for electrons from conversions
   for (unsigned int i = 0; i < 100 && truth && truth->barcode() > 200e3; ++i){
     if (truth->prodVtx() && truth->prodVtx()->nIncomingParticles()){
       truth = truth->prodVtx()->incomingParticle(0);
     }
-    else
+    else{
       break;
+    }
   }
+
+  //In case truth became null in the above loop
+  if (!truth) return 0;
+  
   for (const auto& egammaTruth : *m_egammaTruthContainer)
     if (truth->barcode() == egammaTruth->barcode()) {
       return egammaTruth;
diff --git a/Reconstruction/egamma/egammaRec/src/topoEgammaBuilder.cxx b/Reconstruction/egamma/egammaRec/src/topoEgammaBuilder.cxx
index a5596adda47e024c9797d5c5b03d9a8568f0a071..f0c8a24c6eee8ae0f0c012a321f0766e32e3c227 100755
--- a/Reconstruction/egamma/egammaRec/src/topoEgammaBuilder.cxx
+++ b/Reconstruction/egamma/egammaRec/src/topoEgammaBuilder.cxx
@@ -455,7 +455,7 @@ StatusCode topoEgammaBuilder::execute(){
   if (m_doConversions){
     ATH_MSG_DEBUG("Running ConversionBuilder");  
     smallChrono timer(m_timingProfile, this->name()+"_"+m_conversionBuilder->name()+"_AllClusters");
-    if (m_conversionBuilder->contExecute().isFailure()){
+    if (m_conversionBuilder->contExecute(*egammaRecs).isFailure()){
       ATH_MSG_ERROR("Problem executing " << m_conversionBuilder);
       return StatusCode::FAILURE;  
     }
diff --git a/Reconstruction/egamma/egammaTools/doc/packagedoc.h b/Reconstruction/egamma/egammaTools/doc/packagedoc.h
index f635df9a25b52942c0f4d75414a0567a2aae770e..ef6c0329a451ac1426a3534c34efaa09a76df257 100644
--- a/Reconstruction/egamma/egammaTools/doc/packagedoc.h
+++ b/Reconstruction/egamma/egammaTools/doc/packagedoc.h
@@ -56,4 +56,3 @@ Tools EMShowerBuilder, EMPIDBuilder, EMFourMomBuilder, EMConversionBuilder and E
 @author F. Derue <derue@lpnhe.in2p3.fr>
 @author T. Koffas  <Thomas.Koffas@cern.ch>
 */
-
diff --git a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py
index d1d2e311c5e1e4f3ccafe4b4ada596e1eda2cb4d..173bf0538c9990922a7cb07bda30622b28b25b9f 100644
--- a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py
+++ b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py
@@ -83,7 +83,6 @@ EMBremCollectionBuilder = ToolFactory( egammaBremCollectionBuilder,
 
 
 EMConversionBuilder = ToolFactory( egammaToolsConf.EMConversionBuilder,
-                                   egammaRecContainerName = egammaKeys.outputEgammaRecKey(),
                                    ConversionContainerName = egammaKeys.outputConversionKey(),
                                    ExtrapolationTool = EMExtrapolationTools)   
 
diff --git a/Reconstruction/egamma/egammaTools/src/EMBremCollectionBuilder.cxx b/Reconstruction/egamma/egammaTools/src/EMBremCollectionBuilder.cxx
index 36f1b45d77e8f5b89bffb193354af8e239505da8..e6931de576f2ac39f40085a9f0521be3e66f48fd 100644
--- a/Reconstruction/egamma/egammaTools/src/EMBremCollectionBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMBremCollectionBuilder.cxx
@@ -361,7 +361,8 @@ StatusCode EMBremCollectionBuilder::refitTrack(const xAOD::TrackParticle* tmpTrk
     nSiliconHits_trk += dummy;
   }
   ATH_MSG_DEBUG("Number of Silicon hits "<<nSiliconHits_trk);    
-  //Get the original track that the track particle points to. Clone it in order to assume ownership
+
+  //Get the original track that the track particle points to. 
   const Trk::Track* tmpTrk(0);
   if ( tmpTrkPart->trackLink().isValid() ){
     tmpTrk =  tmpTrkPart->track();
@@ -370,8 +371,9 @@ StatusCode EMBremCollectionBuilder::refitTrack(const xAOD::TrackParticle* tmpTrk
     ATH_MSG_ERROR ("TrackParticle has not Track --  are you running on AOD?");
     return StatusCode::FAILURE;
   }
+
+  //Setup the Trk::Track Refit 
   std::unique_ptr<Trk::Track> trk_refit; 
-  //
   if( nSiliconHits_trk >= m_MinNoSiHits ) {
     StatusCode status = m_trkRefitTool->refitTrackParticle(tmpTrkPart);
     if (status == StatusCode::SUCCESS){
@@ -393,82 +395,89 @@ StatusCode EMBremCollectionBuilder::refitTrack(const xAOD::TrackParticle* tmpTrk
     m_FailedSiliconRequirFit++;
     trk_refit.reset(new Trk::Track(*tmpTrk));
   }
-  //
-  //Refit Trk::Track created
-  //
+  //Refit Trk::Track has been created
+
   //Get the vertex (may be pileup) that this track particle points to
   const xAOD::Vertex* trkVtx(0);
   if (tmpTrkPart->vertexLink().isValid()){ 
     trkVtx = tmpTrkPart->vertex();
   }
-  //
-  // Use the the refitted track and the original vertex to construct a new track particle
+
+  // Use the the Refitted Trk::Track and the original vertex to construct a new TrackParticle
   xAOD::TrackParticle* aParticle = m_particleCreatorTool->createParticle( *trk_refit, m_finalTrkPartContainer, trkVtx, xAOD::electron );
-  //
-  //finalize things
-  if(aParticle!=0) { //store in container
-    //Additional info using the full  Trk::Track
-    //Save extrapolated perigee to calo (eta,phi) for later usage in supercluster algorithm.
-    static const SG::AuxElement::Accessor<float> pgExtrapEta ("perigeeExtrapEta");
-    static const SG::AuxElement::Accessor<float> pgExtrapPhi ("perigeeExtrapPhi");  
-    float perigeeExtrapEta(-999.), perigeeExtrapPhi(-999.);
-    auto tsos = trk_refit->trackStateOnSurfaces()->begin();
-    for (;tsos != trk_refit->trackStateOnSurfaces()->end(); ++tsos) {
-
-      if ((*tsos)->type(Trk::TrackStateOnSurface::Perigee) && (*tsos)->trackParameters()!=0) {
-      
-	float extrapEta(-999.), extrapPhi(-999.);
-	const Trk::TrackParameters *perigeeTrackParams(0);
-	perigeeTrackParams = (*tsos)->trackParameters();
+
+
+  //If no TrackParticle , then ERROR
+  if (!aParticle){
+    ATH_MSG_ERROR("Could not create TrackParticle, this should never happen !");
+    return StatusCode::FAILURE;
+  }
+
+  //Set Vertex Link
+  aParticle->setVertexLink(tmpTrkPart->vertexLink());         
+
+   
+  //Additional info, e/gamma  using the full  Trk::Track
+
+  //Save extrapolated perigee to calo (eta,phi) for later usage in supercluster algorithm.
+  static const SG::AuxElement::Accessor<float> pgExtrapEta ("perigeeExtrapEta");
+  static const SG::AuxElement::Accessor<float> pgExtrapPhi ("perigeeExtrapPhi");  
+  float perigeeExtrapEta(-999.), perigeeExtrapPhi(-999.);
+
+  auto tsos = trk_refit->trackStateOnSurfaces()->begin();
+  for (;tsos != trk_refit->trackStateOnSurfaces()->end(); ++tsos) {
+    if ((*tsos)->type(Trk::TrackStateOnSurface::Perigee) && (*tsos)->trackParameters()!=0) {
+      float extrapEta(-999.), extrapPhi(-999.);
+      const Trk::TrackParameters *perigeeTrackParams(0);
+      perigeeTrackParams = (*tsos)->trackParameters();
       
-	const Trk::PerigeeSurface pSurface (perigeeTrackParams->position());
-	std::unique_ptr<const Trk::TrackParameters> pTrkPar(pSurface.createTrackParameters( perigeeTrackParams->position(), perigeeTrackParams->momentum().unit()*1.e9, +1, 0));
-	//Do the straight-line extrapolation.	  
-	bool hitEM2 = m_extrapolationTool->getEtaPhiAtCalo(pTrkPar.get(), &extrapEta, &extrapPhi);
-	if (hitEM2) {
-	  perigeeExtrapEta = extrapEta;
-	  perigeeExtrapPhi = extrapPhi;
-	} else {
-	  ATH_MSG_WARNING("Extrapolation to EM2 failed!");
-	}
-	break;
-      }
-    }
-    pgExtrapEta(*aParticle) = perigeeExtrapEta;    
-    pgExtrapPhi(*aParticle) = perigeeExtrapPhi;
-    //
-    //Add qoverP for the last measurement
-    static const SG::AuxElement::Accessor<float > QoverPLM  ("QoverPLM");
-    float QoverPLast(0);
-    auto rtsos = trk_refit->trackStateOnSurfaces()->rbegin();
-    for (;rtsos != trk_refit->trackStateOnSurfaces()->rend(); ++rtsos){
-      if ((*rtsos)->type(Trk::TrackStateOnSurface::Measurement) 
-	  && (*rtsos)->trackParameters()!=0 
-	  &&(*rtsos)->measurementOnTrack()!=0 
-	  && !dynamic_cast<const Trk::PseudoMeasurementOnTrack*>((*rtsos)->measurementOnTrack())) {
-	QoverPLast  = (*rtsos)->trackParameters()->parameters()[Trk::qOverP];
-	break;
+      const Trk::PerigeeSurface pSurface (perigeeTrackParams->position());
+      std::unique_ptr<const Trk::TrackParameters> pTrkPar(pSurface.createTrackParameters( perigeeTrackParams->position(), perigeeTrackParams->momentum().unit()*1.e9, +1, 0));
+      //Do the straight-line extrapolation.	  
+      bool hitEM2 = m_extrapolationTool->getEtaPhiAtCalo(pTrkPar.get(), &extrapEta, &extrapPhi);
+      if (hitEM2) {
+	perigeeExtrapEta = extrapEta;
+	perigeeExtrapPhi = extrapPhi;
+      } else {
+	ATH_MSG_WARNING("Extrapolation to EM2 failed!");
       }
+      break;
     }
-    QoverPLM(*aParticle) = QoverPLast;
-    //
-    //Now  Slim the track for writing to disk   
-    Trk::Track* slimmed = m_slimTool->slim(*trk_refit);
-    if(!slimmed){
-      ATH_MSG_ERROR ("TrackSlimming failed, this should never happen !");
-      return StatusCode::FAILURE;
+  }
+  pgExtrapEta(*aParticle) = perigeeExtrapEta;    
+  pgExtrapPhi(*aParticle) = perigeeExtrapPhi;
+  
+  //Add qoverP for the last measurement
+  static const SG::AuxElement::Accessor<float > QoverPLM  ("QoverPLM");
+  float QoverPLast(0);
+  auto rtsos = trk_refit->trackStateOnSurfaces()->rbegin();
+  for (;rtsos != trk_refit->trackStateOnSurfaces()->rend(); ++rtsos){
+    if ((*rtsos)->type(Trk::TrackStateOnSurface::Measurement) 
+	&& (*rtsos)->trackParameters()!=0 
+	&&(*rtsos)->measurementOnTrack()!=0 
+	&& !dynamic_cast<const Trk::PseudoMeasurementOnTrack*>((*rtsos)->measurementOnTrack())) {
+      QoverPLast  = (*rtsos)->trackParameters()->parameters()[Trk::qOverP];
+      break;
     }
+  }
+  QoverPLM(*aParticle) = QoverPLast;
+
+  //Now  Slim the TrK::Track for writing to disk   
+  Trk::Track* slimmed = m_slimTool->slim(*trk_refit);
+    
+  if(!slimmed){
+    ATH_MSG_WARNING ("TrackSlimming failed");
+    ElementLink<TrackCollection> dummy;
+    aParticle->setTrackLink(dummy);     
+  }else{
     m_finalTracks->push_back(slimmed);
-    //
     ElementLink<TrackCollection> trackLink( slimmed, *m_finalTracks);
     aParticle->setTrackLink( trackLink );     
-    aParticle->setVertexLink(tmpTrkPart->vertexLink());         
-    return StatusCode::SUCCESS;
-  }else {
-    ATH_MSG_WARNING("Could not create TrackParticle, this should never happen !");
-    return StatusCode::FAILURE;
   }
+
+  return StatusCode::SUCCESS;
 }
+
 // =================================================================
 bool EMBremCollectionBuilder::Select(const xAOD::CaloCluster*   cluster,
                                      bool                       trkTRT,
diff --git a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx
index af03e3d00bf90c92f86f833e7fea46cf9468c002..066f26acb8ac90654b7e1b96f91034af0ecd588e 100644
--- a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.cxx
@@ -47,11 +47,6 @@ EMConversionBuilder::EMConversionBuilder(const std::string& type,
 		  m_conversionContainerName="PhotonConversionVertices",
 		  "Name of the input conversion container");
 	
-  // Name of the input egammaRec container
-  declareProperty("egammaRecContainerName",                 
-		  m_egammaRecContainerName="egammaRecs",
-		  "Name of the input egammaRec container");
-
   // Name of the extrapolation tool
   declareProperty("ExtrapolationTool",
 		  m_extrapolationTool,
@@ -115,7 +110,7 @@ StatusCode EMConversionBuilder::initialize()
 }
 
 // =============================================================
-StatusCode EMConversionBuilder::contExecute() 
+StatusCode EMConversionBuilder::contExecute(EgammaRecContainer& cont) 
 {
 
   // retrieve Conversion Container
@@ -125,13 +120,7 @@ StatusCode EMConversionBuilder::contExecute()
     return StatusCode::SUCCESS;
   }
   
-  // retrieve egammaRec container
-  const EgammaRecContainer* egammaRecs = 0;
-  if(evtStore()->retrieve(egammaRecs,m_egammaRecContainerName).isFailure()){
-    ATH_MSG_WARNING("Could not retrieve egammaRec container! EMConversionBuilder will stop.");
-    return StatusCode::SUCCESS;
-  }   
-  for (auto& egRec : *egammaRecs){
+  for (egammaRec* egRec : cont){
     ATH_CHECK(vertexExecute(egRec,conversions));
   }
   return StatusCode::SUCCESS;
diff --git a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h
index f3f940e8f17ef1749a6be2fd52d346307560f099..956b93fed9308dcabcd8aef3c1364b4524953969 100644
--- a/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h
+++ b/Reconstruction/egamma/egammaTools/src/EMConversionBuilder.h
@@ -50,7 +50,8 @@ class EMConversionBuilder : public egammaBaseTool, virtual public IEMConversionB
   /** @brief initialize method*/
   StatusCode initialize();
   /** @brief execute method*/
-  virtual StatusCode contExecute();
+  virtual StatusCode contExecute() { return StatusCode::FAILURE; }
+  virtual StatusCode contExecute(EgammaRecContainer& cont);
   /** @brief execute method*/
   virtual StatusCode executeRec(egammaRec* egRec);
   /** @brief execute method*/
@@ -72,9 +73,6 @@ private:
   /** @brief Name of conversion container*/
   std::string		m_conversionContainerName; 
 
-  /** @brief Name of egammaRec container*/
-  std::string		m_egammaRecContainerName; 
-
 
   /** @brief EMExtrapolationTools */
   ToolHandle<IEMExtrapolationTools>  m_extrapolationTool;
diff --git a/Reconstruction/egamma/egammaTools/src/FourMomCombiner.cxx b/Reconstruction/egamma/egammaTools/src/FourMomCombiner.cxx
index 78682fdfd93ea2df4ce212d44039654bcc4fa1d7..ce05c529ceff953925e871cb50075c307efd7f43 100644
--- a/Reconstruction/egamma/egammaTools/src/FourMomCombiner.cxx
+++ b/Reconstruction/egamma/egammaTools/src/FourMomCombiner.cxx
@@ -153,7 +153,7 @@ StatusCode FourMomCombiner::TrackClusterExecute(xAOD::Egamma *eg,
   
   int charge(0);
   if (isElectron(eg)) {
-    xAOD::Electron* el = dynamic_cast<xAOD::Electron*> (eg);
+    xAOD::Electron* el =static_cast<xAOD::Electron*> (eg);
     charge = el->trackParticle(index)->charge();
   }
   
diff --git a/Reconstruction/egamma/egammaTools/src/egammaSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaTools/src/egammaSuperClusterBuilder.cxx
index 6086d2ccb01f8fa7b622ba5c1a9e7296ace36399..8789531a3b37dc46efdebab468b648b557c3da10 100644
--- a/Reconstruction/egamma/egammaTools/src/egammaSuperClusterBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/egammaSuperClusterBuilder.cxx
@@ -233,7 +233,7 @@ xAOD::CaloCluster* egammaSuperClusterBuilder::CreateNewCluster(const std::vector
     return nullptr;
   }
 
-  xAOD::CaloCluster* newCluster = CaloClusterStoreHelper::makeCluster(clusters.at(0)->getCellLinks()->getCellContainer());
+  std::unique_ptr<xAOD::CaloCluster> newCluster(CaloClusterStoreHelper::makeCluster(clusters.at(0)->getCellLinks()->getCellContainer()));
   if (!newCluster) {
     ATH_MSG_ERROR("CaloClusterStoreHelper::makeCluster failed.");
     return nullptr;
@@ -246,9 +246,8 @@ xAOD::CaloCluster* egammaSuperClusterBuilder::CreateNewCluster(const std::vector
   //
   //Start with the seed 
   //Add the EM cells of the seed cluster
-  if (AddEMCellsToCluster(newCluster,clusters[0]).isFailure()) {
+  if (AddEMCellsToCluster(newCluster.get(),clusters[0]).isFailure()) {
     ATH_MSG_DEBUG("There was problem adding the cells to cluster");
-    delete newCluster;
     return nullptr;
   }  
   //Set the element Link to the relevant constitent
@@ -259,7 +258,7 @@ xAOD::CaloCluster* egammaSuperClusterBuilder::CreateNewCluster(const std::vector
   }
   
   // calculate the seed cluster kinematics.
-  CaloClusterKineHelper::calculateKine(newCluster, true, true);
+  CaloClusterKineHelper::calculateKine(newCluster.get(), true, true);
   //
   //Set the eta0/phi0 based on the eta/phi of the seed 
   newCluster->setEta0(newCluster->eta());
@@ -272,9 +271,8 @@ xAOD::CaloCluster* egammaSuperClusterBuilder::CreateNewCluster(const std::vector
   // Now continue with the remaining clusters
   for (size_t i = 1; i < acSize; i++) {
     //Add te EM cells of the accumulated to the cluster
-    if (AddEMCellsToCluster(newCluster,clusters[i]).isFailure()) {
+    if (AddEMCellsToCluster(newCluster.get(),clusters[i]).isFailure()) {
       ATH_MSG_WARNING("There was problem adding the topocluster cells to the the cluster");
-      delete newCluster;
       return nullptr;
     }
     //
@@ -288,43 +286,40 @@ xAOD::CaloCluster* egammaSuperClusterBuilder::CreateNewCluster(const std::vector
   //
   //Set the link from the super cluster to the constituents (accumulated) clusters used. 
   static const SG::AuxElement::Accessor < std::vector< ElementLink< xAOD::CaloClusterContainer > > > caloClusterLinks("constituentClusterLinks");
-  caloClusterLinks(*newCluster) = constituentLinks;
+  caloClusterLinks(*newCluster.get()) = constituentLinks;
   //
   ///Calculate the kinematics of the new cluster, after all cells are added
-  CaloClusterKineHelper::calculateKine(newCluster, true, true);
+  CaloClusterKineHelper::calculateKine(newCluster.get(), true, true);
   //
   //Check to see if cluster doesn't have EMB2 OR EME2. If not, kill it.
   if (!newCluster->hasSampling(CaloSampling::EMB2) && !newCluster->hasSampling(CaloSampling::EME2)) {
     ATH_MSG_WARNING("Supercluster doesn't have energy in layer 2. Skipping...");
-    delete newCluster;
     return nullptr;     
   }
   //
   //If adding all EM cells I am somehow below the seed threshold then remove 
   //this one
   if(newCluster->et()<m_EtThresholdCut ){
-    delete newCluster;
     return nullptr;
   }
 
   // Apply SW-style summation of TileGap3 cells (if necessary).
-  if (AddTileGap3CellsinWindow(newCluster).isFailure()) {
+  if (AddTileGap3CellsinWindow(newCluster.get()).isFailure()) {
     ATH_MSG_ERROR("Problem with the input cluster when running AddTileGap3CellsinWindow?");
     return nullptr;
   }
-  CaloClusterKineHelper::calculateKine(newCluster, true, true);
+  CaloClusterKineHelper::calculateKine(newCluster.get(), true, true);
 
   // Apply correction  calibration
-  if (CalibrateCluster(newCluster, egType).isFailure()) {
+  if (CalibrateCluster(newCluster.get(), egType).isFailure()) {
     ATH_MSG_WARNING("There was problem calibrating the object");
-    delete newCluster;
     return nullptr;
   }
   // return the new cluster
-  return newCluster;  
+  return newCluster.release();  
 }
 
-StatusCode egammaSuperClusterBuilder::AddEMCellsToCluster(xAOD::CaloCluster       *newCluster,
+StatusCode egammaSuperClusterBuilder::AddEMCellsToCluster(xAOD::CaloCluster *newCluster,
 							  const xAOD::CaloCluster *ref) const {
   if (!newCluster || !ref) {
     ATH_MSG_ERROR("Invalid input in AddEMCellsToCluster");
diff --git a/Reconstruction/egamma/egammaTools/src/electronSuperClusterBuilder.cxx b/Reconstruction/egamma/egammaTools/src/electronSuperClusterBuilder.cxx
index 7ef5c1fcac857d6b7afdacf478d9354f9a9aa6f8..a534fbe1996db45e154cadffb374fa114cdcc377 100644
--- a/Reconstruction/egamma/egammaTools/src/electronSuperClusterBuilder.cxx
+++ b/Reconstruction/egamma/egammaTools/src/electronSuperClusterBuilder.cxx
@@ -265,20 +265,20 @@ const std::vector<std::size_t> electronSuperClusterBuilder::SearchForSecondaryCl
     if (!matchesInWindow 
 	&& seedSecdEta<m_maxDelEta 
 	&& seedSecdPhi<m_maxDelPhi) {      
-      matchSameTrack = MatchSameTrack(seedEgammaRec,egRec);
-      
+      matchSameTrack = MatchSameTrack(seedEgammaRec,egRec);      
+
       if(matchSameTrack) {
 	++m_nSameTrackClusters;
 	++m_nExtraClusters;
       } else {
-	if (egRec->trackParticle()) {
-	  float qoverp    = egRec->trackParticle()->qOverP();
-	  float seedEOverP(egRec->caloCluster()->e() / fabs(1./qoverp));
+	if (seedEgammaRec->trackParticle()) {
+	  float qoverp    = seedEgammaRec->trackParticle()->qOverP();
+	  float seedEOverP(seedEgammaRec->caloCluster()->e() * fabs(qoverp));
 	  
 	  static const SG::AuxElement::Accessor<float> pgExtrapEta ("perigeeExtrapEta");
 	  static const SG::AuxElement::Accessor<float> pgExtrapPhi ("perigeeExtrapPhi");
-	  float perigeeExtrapEta (pgExtrapEta(*egRec->trackParticle()));
-	  float perigeeExtrapPhi (pgExtrapPhi(*egRec->trackParticle()));
+	  float perigeeExtrapEta (pgExtrapEta(*seedEgammaRec->trackParticle()));
+	  float perigeeExtrapPhi (pgExtrapPhi(*seedEgammaRec->trackParticle()));
 	  if (perigeeExtrapEta>-999. && perigeeExtrapPhi>-999.)
 	    passesSimpleBremSearch = PassesSimpleBremSearch(seedCluster,
 							    clus,
@@ -332,25 +332,20 @@ bool electronSuperClusterBuilder::PassesSimpleBremSearch(const xAOD::CaloCluster
 							 float perigeeExtrapPhi,
 							 float seedEOverP) const
 {
+
+  if (!seed || !sec)
+    return false;
+
   if (seedEOverP > m_secEOverPCut){
     return false;
   }
 
-  float perigeeExtrapClusDelEta = fabs(seed->eta() - perigeeExtrapEta);
-  float perigeeExtrapClusDelPhi = fabs(P4Helpers::deltaPhi(seed->phi(), perigeeExtrapPhi));
+  ATH_MSG_DEBUG("Running PassesSimpleBremSearch");
+
   float perigeeExtrapSecClusDelEta = fabs(sec->eta() - perigeeExtrapEta);
   float perigeeExtrapSecClusDelPhi = fabs(P4Helpers::deltaPhi(sec->phi(), perigeeExtrapPhi));
 
-  // determine window size, barrel or EC
-  auto searchWindowEta = m_searchWindowEtaEndcap;
-  auto searchWindowPhi = m_searchWindowPhiEndcap;
-  if (xAOD::EgammaHelpers::isBarrel(seed)) {
-    searchWindowEta = m_searchWindowEtaBarrel;
-    searchWindowPhi = m_searchWindowPhiBarrel;
-  }
-
-  if (perigeeExtrapClusDelEta > searchWindowEta && perigeeExtrapClusDelPhi > searchWindowPhi && 
-      perigeeExtrapSecClusDelEta < m_bremExtrapMatchDelEta && 
+  if (perigeeExtrapSecClusDelEta < m_bremExtrapMatchDelEta && 
       perigeeExtrapSecClusDelPhi < m_bremExtrapMatchDelPhi) {
     return true;
   }
diff --git a/Reconstruction/egamma/egammaTrackTools/doc/packagedoc.h b/Reconstruction/egamma/egammaTrackTools/doc/packagedoc.h
index 3a9eac181627fab9da7f39e849184deef2451565..13a7726ee93baa33509861d734c7eceb8902d572 100644
--- a/Reconstruction/egamma/egammaTrackTools/doc/packagedoc.h
+++ b/Reconstruction/egamma/egammaTrackTools/doc/packagedoc.h
@@ -23,4 +23,3 @@ EMExtrapolationTools : Tool which proagates a track the calorimeter/cluster.
 @author F. Derue <derue@lpnhe.in2p3.fr>
 
 */
-
diff --git a/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx b/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx
index 1dfc4917e7282e8b0e4a60f4c52edb3d247f4aff..6aed06d1ed5d6681fd9df022dcf48b50fbaf9c7b 100755
--- a/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx
+++ b/Reconstruction/egamma/egammaTrackTools/src/CaloCluster_OnTrackBuilder.cxx
@@ -106,14 +106,12 @@ StatusCode CaloCluster_OnTrackBuilder::finalize(){ return StatusCode::SUCCESS; }
   if(!surface) return 0;
   
   const Trk::LocalParameters*  lp =getClusterLocalParameters( cluster, surface, charge );
-
   if (!lp){
     delete surface;
     return 0;
   }
      
-  const  Amg::MatrixX *em  =getClusterErrorMatrix( cluster, surface, charge );
-  
+  const  Amg::MatrixX *em  =getClusterErrorMatrix( cluster, surface, charge );  
   if (!em){
     delete surface;
     delete lp;
@@ -123,10 +121,10 @@ StatusCode CaloCluster_OnTrackBuilder::finalize(){ return StatusCode::SUCCESS; }
   Trk::CaloCluster_OnTrack* ccot = new  Trk::CaloCluster_OnTrack( *lp, *em, *surface );
   delete surface;
   delete lp;
+  delete em;
 
   if(ccot) {
     ATH_MSG_DEBUG("Successful build of Trk::CaloCluster_OnTrack");
-    //std::cout << *ccot << std::endl;
   }
   
   return ccot;
diff --git a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
index 4756d97b18d1e2b4e7825e68738f01ed304a52cd..92cba7df9673a391acac0a7d7a920af3130a6464 100644
--- a/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
+++ b/Reconstruction/egamma/egammaTrackTools/src/EMExtrapolationTools.cxx
@@ -216,7 +216,7 @@ EMExtrapolationTools::getMatchAtCalo (const xAOD::CaloCluster*      cluster,
   //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,m_useCaching)){
-      ATH_MSG_WARNING("Could not create an extension for TRT only track with : "<< " Track Pt "
+      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;
@@ -242,7 +242,7 @@ EMExtrapolationTools::getMatchAtCalo (const xAOD::CaloCluster*      cluster,
   //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, m_useCaching)){
-      ATH_MSG_WARNING("Could not create an extension from perigee for a silicon GSF track with : "<< " Track Pt "
+      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;
@@ -251,7 +251,7 @@ EMExtrapolationTools::getMatchAtCalo (const xAOD::CaloCluster*      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, false)){
-      ATH_MSG_WARNING("Could not create an extension from last measurement for a silicon GSF track with : "<< " Track Pt "
+      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;
@@ -260,7 +260,7 @@ EMExtrapolationTools::getMatchAtCalo (const xAOD::CaloCluster*      cluster,
   //Else track Particles before GSF, or failed GSF, or last measurement use the std tool/cache
   else {
     if(!m_defaultParticleCaloExtensionTool->caloExtension(*trkPB,extension,m_useCaching)){
-      ATH_MSG_WARNING("Could not create an extension from last measurement for a standard (non-GSF) track with : "<< " Track Pt "
+      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;
@@ -268,7 +268,7 @@ EMExtrapolationTools::getMatchAtCalo (const xAOD::CaloCluster*      cluster,
   }
   //------------------------------------------------------------------------------------------------------------------------------------//
   if(!extension){
-    ATH_MSG_WARNING("Could not create an extension for "<< " Track Pt "
+    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;
diff --git a/Reconstruction/egamma/egammaUtils/doc/packagedoc.h b/Reconstruction/egamma/egammaUtils/doc/packagedoc.h
index 815af4c1646ad66e7a6d95dec903d0312342db36..8ef54dd1671a531f5a17d341b9dda6efd8cd7ad7 100644
--- a/Reconstruction/egamma/egammaUtils/doc/packagedoc.h
+++ b/Reconstruction/egamma/egammaUtils/doc/packagedoc.h
@@ -40,4 +40,3 @@ selection criteria
 @author Alexander Khodinov <khodinov@bnl.gov>
 
 */
-
diff --git a/Reconstruction/egamma/egammaValidation/doc/packagedoc.h b/Reconstruction/egamma/egammaValidation/doc/packagedoc.h
index e8da4955e4207ae3b46e42073428fb7338d6608e..4bb835fd3a5dd396157719ed9053a253909eb914 100644
--- a/Reconstruction/egamma/egammaValidation/doc/packagedoc.h
+++ b/Reconstruction/egamma/egammaValidation/doc/packagedoc.h
@@ -18,4 +18,4 @@ Another macro then superimposes these histograms to a reference file ( if any )
 
 The list of input files ( all single particles ) and tests ran can be found in the RTT configuration file :
 test/egammaValidation_TestConfiguration.xml 
-
+*/
diff --git a/Reconstruction/iPat/iPatRecAlgs/CMakeLists.txt b/Reconstruction/iPat/iPatRecAlgs/CMakeLists.txt
index 2347e21cc3fe2931669a682a09545f37cf833609..5662b32a28975a8e706dd7acbbf45e7db3476a73 100644
--- a/Reconstruction/iPat/iPatRecAlgs/CMakeLists.txt
+++ b/Reconstruction/iPat/iPatRecAlgs/CMakeLists.txt
@@ -14,7 +14,7 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           DetectorDescription/GeoPrimitives
                           Event/xAOD/xAODEventInfo
-                          Generators/GenAnalysisTools/TruthTools
+                          Generators/GenInterfaces
                           InnerDetector/InDetRecEvent/InDetPrepRawData
                           Reconstruction/iPat/iPatInterfaces
                           Reconstruction/iPat/iPatTrackParameters
diff --git a/Reconstruction/iPat/iPatRecAlgs/cmt/requirements b/Reconstruction/iPat/iPatRecAlgs/cmt/requirements
deleted file mode 100755
index 8d6541a467ae82dcc1f8dd7a3b67503ba5d7cc8b..0000000000000000000000000000000000000000
--- a/Reconstruction/iPat/iPatRecAlgs/cmt/requirements
+++ /dev/null
@@ -1,49 +0,0 @@
-package iPatRecAlgs
-
-#############################################################################
-## inner detector pattern recognition and track fitting from Athena framework
-############################################################################# 
-
-author			Roger Clifft   <Roger.Clifft@cern.ch>
-author			Alan Poppleton <Alan.Poppleton@cern.ch>
-author			Nectarios Benekos <Nectarios.Benekos@cern.ch>
-
-private
-use xAODEventInfo	       xAODEventInfo-*		     Event/xAOD
-use GeoPrimitives	       GeoPrimitives-*		     DetectorDescription
-use InDetPrepRawData	       InDetPrepRawData-*	     InnerDetector/InDetRecEvent
-use TrkExInterfaces	       TrkExInterfaces-*	     Tracking/TrkExtrapolation
-use TrkExUtils		       TrkExUtils-*                  Tracking/TrkExtrapolation
-use TrkFitterInterfaces	       TrkFitterInterfaces-*	     Tracking/TrkFitter
-use TrkMaterialOnTrack	       TrkMaterialOnTrack-*	     Tracking/TrkEvent
-use TrkMeasurementBase	       TrkMeasurementBase-*	     Tracking/TrkEvent
-use TrkParameters	       TrkParameters-*		     Tracking/TrkEvent
-use TrkSpacePoint	       TrkSpacePoint-*		     Tracking/TrkEvent
-use TrkSurfaces		       TrkSurfaces-*		     Tracking/TrkDetDescr
-use TrkTrack		       TrkTrack-*		     Tracking/TrkEvent
-use TrkTruthData	       TrkTruthData-*		     Tracking/TrkEvent
-use TruthTools		       TruthTools-*		     Generators/GenAnalysisTools
-use iPatInterfaces	       iPatInterfaces-*		     Reconstruction/iPat
-use iPatTrackParameters	       iPatTrackParameters-*	     Reconstruction/iPat
-use iPatUtility		       iPatUtility-*                 Reconstruction/iPat
-
-public
-use AthenaBaseComps	       AthenaBaseComps-*	     Control
-use AtlasPolicy		       AtlasPolicy-*
-use GaudiInterface	       GaudiInterface-*		     External
-use iPatRecEvent	       iPatRecEvent-*		     Reconstruction/iPat
-use iPatTrack		       iPatTrack-*		     Reconstruction/iPat
-			       
-library iPatRecAlgs	       iPatRec.cxx		     \
-			       iPatShortTracks.cxx	     \
-			       iPatStatistics.cxx	     \
-			       iPatTrackTruthAssociator.cxx  \
-			       IntersectorTest.cxx	     \
-			       components/*.cxx	
-
-apply_pattern component_library
-
-private
-
-
-			  
diff --git a/Reconstruction/iPat/iPatRecAlgs/src/iPatStatistics.cxx b/Reconstruction/iPat/iPatRecAlgs/src/iPatStatistics.cxx
index 61835b40717872043404d0ff884f5e7e9cf25531..44ce20d8443babb0cec1990fc6f9429c486e5a5f 100755
--- a/Reconstruction/iPat/iPatRecAlgs/src/iPatStatistics.cxx
+++ b/Reconstruction/iPat/iPatRecAlgs/src/iPatStatistics.cxx
@@ -17,7 +17,7 @@
 #include "TrkSpacePoint/SpacePointCollection.h"
 #include "TrkSpacePoint/SpacePointContainer.h"
 #include "TrkSpacePoint/SpacePointOverlapCollection.h"
-#include "TruthTools/ITruthSelector.h"
+#include "GenInterfaces/ITruthSelector.h"
 #include "iPatInterfaces/IDetectorSelection.h"
 #include "iPatInterfaces/ILayerNumberAllocator.h"
 #include "iPatInterfaces/ITruthParameters.h"
diff --git a/Reconstruction/iPat/iPatRecAlgs/src/iPatTrackTruthAssociator.cxx b/Reconstruction/iPat/iPatRecAlgs/src/iPatTrackTruthAssociator.cxx
index 51f11e967a37b78bdbac9615688b8cd7729928c2..1d6e6803bf4483dfc16896263eee4b978c4c13e9 100755
--- a/Reconstruction/iPat/iPatRecAlgs/src/iPatTrackTruthAssociator.cxx
+++ b/Reconstruction/iPat/iPatRecAlgs/src/iPatTrackTruthAssociator.cxx
@@ -17,7 +17,7 @@
 #include "GaudiKernel/SystemOfUnits.h"
 #include "xAODEventInfo/EventInfo.h"
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
-#include "TruthTools/ITruthSelector.h"
+#include "GenInterfaces/ITruthSelector.h"
 #include "iPatInterfaces/IDetectorSelection.h"
 #include "iPatRecAlgs/iPatTrackTruthAssociator.h"
 #include "iPatRecEvent/iPatTrackContainer.h"
diff --git a/Reconstruction/iPat/iPatTrackFinder/CMakeLists.txt b/Reconstruction/iPat/iPatTrackFinder/CMakeLists.txt
index 4b0b12b48c514bf8b5b64900b34bed15315027db..0f9cdf4b76b82e1c71468b63a6db736bde1e3b4e 100644
--- a/Reconstruction/iPat/iPatTrackFinder/CMakeLists.txt
+++ b/Reconstruction/iPat/iPatTrackFinder/CMakeLists.txt
@@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC
                           InnerDetector/InDetRecEvent/InDetPrepRawData
                           Reconstruction/iPat/iPatInterfaces
                           Reconstruction/iPat/iPatTrack
+                          Event/EventContainers
                           PRIVATE
                           InnerDetector/InDetConditions/InDetBeamSpotService
                           InnerDetector/InDetDetDescr/InDetReadoutGeometry
@@ -39,7 +40,7 @@ atlas_add_component( iPatTrackFinder
                      src/TrackFinder.cxx
                      src/TrackManager.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps Identifier EventPrimitives GaudiKernel InDetPrepRawData iPatInterfaces iPatTrack InDetReadoutGeometry MagFieldInterfaces iPatGeometry iPatTrackParameters iPatUtility TrkPrepRawData TrkSpacePoint VxVertex )
+                     LINK_LIBRARIES AthenaBaseComps Identifier EventPrimitives GaudiKernel InDetPrepRawData iPatInterfaces iPatTrack InDetReadoutGeometry MagFieldInterfaces iPatGeometry iPatTrackParameters iPatUtility TrkPrepRawData TrkSpacePoint VxVertex EventContainers)
 
 # Install files from the package:
 atlas_install_headers( iPatTrackFinder )
diff --git a/Reconstruction/iPat/iPatTruthTrajectory/CMakeLists.txt b/Reconstruction/iPat/iPatTruthTrajectory/CMakeLists.txt
index 96c0e9435ad32ba0726e44708f9934f19410b746..c3fc30a718de840c6866cea0999b62e8831b6923 100644
--- a/Reconstruction/iPat/iPatTruthTrajectory/CMakeLists.txt
+++ b/Reconstruction/iPat/iPatTruthTrajectory/CMakeLists.txt
@@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Tracking/TrkExtrapolation/TrkExUtils
                           PRIVATE
                           Generators/GenAnalysisTools/TruthTools
+                          Generators/GenInterfaces
                           Generators/GeneratorObjects
                           Tracking/TrkDetDescr/TrkSurfaces
                           Tracking/TrkExtrapolation/TrkExInterfaces )
diff --git a/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx b/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx
index e6fdf8db4ea662f401b9335b5f63b1d3648803df..86e4620330f1b5cb532904d663f1f7780aa0aad3 100755
--- a/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx
+++ b/Reconstruction/iPat/iPatTruthTrajectory/src/TruthParameters.cxx
@@ -14,7 +14,7 @@
 #include "GeneratorObjects/McEventCollection.h"
 #include "TrkExInterfaces/IIntersector.h"
 #include "TrkSurfaces/PerigeeSurface.h"
-#include "TruthTools/ITruthSelector.h"
+#include "GenInterfaces/ITruthSelector.h"
 #include "iPatTruthTrajectory/TruthParameters.h"
 
 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
diff --git a/Reconstruction/tauRecTools/src/TauConversionTagger.cxx b/Reconstruction/tauRecTools/src/TauConversionTagger.cxx
index 0e9a7852a475d13d102b0f071293281774058fd9..c5066cc86adaad4fc9a113a7987e378154094a09 100644
--- a/Reconstruction/tauRecTools/src/TauConversionTagger.cxx
+++ b/Reconstruction/tauRecTools/src/TauConversionTagger.cxx
@@ -98,7 +98,7 @@ StatusCode TauConversionTagger::execute(xAOD::TauJet& pTau) {
     // Note: all must be of type uint8_t for summaryValue filling to work in xAOD
     // TODO: check if these default values are sane
     uint8_t nBLHits             = 0;
-    uint8_t expectBLayerHit     = 0;
+    uint8_t expectInnermostPixelLayerHit     = 0;
     uint8_t nTRTHighTHits       = 0;
     uint8_t nTRTHighTOutliers   = 0;
     float   nTRTHighT_outl      = 0.;
@@ -107,8 +107,8 @@ StatusCode TauConversionTagger::execute(xAOD::TauJet& pTau) {
     uint8_t nTRTOutliers        = 0;
 
     // Fill TrackSummary info
-    TauJetTrack->summaryValue(nBLHits,xAOD::numberOfBLayerHits);
-    TauJetTrack->summaryValue(expectBLayerHit,xAOD::expectBLayerHit);
+    TauJetTrack->summaryValue(nBLHits,xAOD::numberOfInnermostPixelLayerHits);
+    TauJetTrack->summaryValue(expectInnermostPixelLayerHit,xAOD::expectInnermostPixelLayerHit);
     TauJetTrack->summaryValue(nTRTHighTHits,xAOD::numberOfTRTHighThresholdHits);
     TauJetTrack->summaryValue(nTRTHighTOutliers,xAOD::numberOfTRTHighThresholdOutliers);
     nTRTHighT_outl = nTRTHighTHits + nTRTHighTOutliers;
@@ -141,7 +141,7 @@ StatusCode TauConversionTagger::execute(xAOD::TauJet& pTau) {
       m_a_cut[0][0]=0.0003;  m_b_cut[0][0]=0.1725;
       m_a_cut[0][1]=0.0003;  m_b_cut[0][1]=0.2025;
 
-      if ( nBLHits==0 && expectBLayerHit ){
+      if ( nBLHits==0 && expectInnermostPixelLayerHit ){
 	if( m_TRTHighTOutliersRatio > -m_a_cut[0][0]*Rconv + m_b_cut[0][0] && (-rconvii) > 40 && pt < 20000 ) m_TrkIsConv=true;
       }
       else {
diff --git a/Simulation/Barcode/BarcodeEvent/cmt/requirements b/Simulation/Barcode/BarcodeEvent/cmt/requirements
deleted file mode 100644
index a8f62bdd2b2c021f6d6b99053924f71e2e527e37..0000000000000000000000000000000000000000
--- a/Simulation/Barcode/BarcodeEvent/cmt/requirements
+++ /dev/null
@@ -1,7 +0,0 @@
-package BarcodeEvent
-author <Elmar.Ritsch@cern.ch>
-
-public
-use AtlasPolicy                	AtlasPolicy-*                   
-use GaudiInterface             	GaudiInterface-*       		External
-end_public
diff --git a/Simulation/Barcode/BarcodeInterfaces/cmt/requirements b/Simulation/Barcode/BarcodeInterfaces/cmt/requirements
deleted file mode 100644
index 5e31181ae8d5bfdaf31c62b268b35de9f87e16e6..0000000000000000000000000000000000000000
--- a/Simulation/Barcode/BarcodeInterfaces/cmt/requirements
+++ /dev/null
@@ -1,9 +0,0 @@
-package BarcodeInterfaces
-author <Andreas.Salzburger@cern.ch>
-
-public
-use AtlasPolicy                	AtlasPolicy-*                   
-use GaudiInterface             	GaudiInterface-*       		External
-use BarcodeEvent                BarcodeEvent-*              Simulation/Barcode
-end_public
-
diff --git a/Simulation/Barcode/BarcodeServices/cmt/requirements b/Simulation/Barcode/BarcodeServices/cmt/requirements
deleted file mode 100644
index 3b97490ca196771b58199b702dad8fd49f0fbeca..0000000000000000000000000000000000000000
--- a/Simulation/Barcode/BarcodeServices/cmt/requirements
+++ /dev/null
@@ -1,44 +0,0 @@
-package BarcodeServices
-author <Andreas.Salzburger@cern.ch>
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-#################################################################
-# public use statements
-use GaudiInterface            GaudiInterface-*        External
-use AtlasPolicy               AtlasPolicy-*
-use AtlasROOT                 AtlasROOT-*             External
-use AthenaBaseComps           AthenaBaseComps-*       Control
-use BarcodeEvent              BarcodeEvent-*          Simulation/Barcode
-use BarcodeInterfaces         BarcodeInterfaces-*     Simulation/Barcode
-
-## macros
-apply_tag       ROOTBasicLibs
-apply_tag       ROOTMathLibs
-
-#################################################################
-# private use statements
-private
-
-public
-
-# Create a named installed library
-library BarcodeServicesLib "../Root/*.cxx"
-apply_pattern named_installed_library library=BarcodeServicesLib
-
-# Create the CINT dictionary
-apply_pattern have_root_headers root_headers="BitCalculator.h TruthDressRoom.h ../Root/LinkDef.h" \
-              headers_lib=BarcodeServicesLib
-
-library BarcodeServices *.cxx components/*.cxx
-macro_append BarcodeServices_dependencies " BarcodeServicesLib"
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/BeamEffects/cmt/requirements b/Simulation/BeamEffects/cmt/requirements
deleted file mode 100644
index 29bf4f61714a829773aa91fdffbb87d3c5d70185..0000000000000000000000000000000000000000
--- a/Simulation/BeamEffects/cmt/requirements
+++ /dev/null
@@ -1,40 +0,0 @@
-package BeamEffects
-
-#################################################################
-# public use statements
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*         External
-
-#################################################################
-# private use statements
-private
-use AthenaBaseComps             AthenaBaseComps-*        Control
-use AthenaKernel                AthenaKernel-*           Control
-use AtlasCLHEP                  AtlasCLHEP-*             External
-use AtlasCLHEP_RandomGenerators AtlasCLHEP_RandomGenerators-* Simulation/Tools
-use AtlasHepMC                  AtlasHepMC-*             External
-use CxxUtils                    CxxUtils-*               Control
-use EventInfo                   EventInfo-*              Event
-use GeneratorObjects            GeneratorObjects-*       Generators
-use HepMC_Interfaces            HepMC_Interfaces-*       Simulation/Interfaces
-use InDetBeamSpotService        InDetBeamSpotService-*   InnerDetector/InDetConditions
-use StoreGate                   StoreGate-*              Control
-use AtlasGoogleTest             AtlasGoogleTest-*        External
-# For TF1
-#use AtlasROOT                   AtlasROOT-*              External
-#apply_tag rootGraphicsLibs
-
-public
-library BeamEffects *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
-
-private
-use TestTools                   TestTools-*              AtlasTest
-apply_pattern UnitTest_run unit_test=BeamEffectsAlg extra_sources=../src/BeamEffectsAlg.cxx
-
-# use this to enable debugging for this package
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-end_private
diff --git a/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_200MHz.py b/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_200MHz.py
index bd07720c15103e136f809fe7fdcce84f461868a0..c29acca58810c43f939578ea488e346a19986aed 100644
--- a/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_200MHz.py
+++ b/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_200MHz.py
@@ -1,5 +1,5 @@
-from AthenaCommon.CfgGetter import getPublicTool
-ckvptool = getPublicTool("CrabKissingVertexPositioner")
+from AthenaCommon.CfgGetter import getPrivateTool
+ckvptool = getPrivateTool("CrabKissingVertexPositioner")
 # all lengths are in mm
 ckvptool.BunchShape = "GAUSS" # GAUSS or FLAT
 ckvptool.BunchLength = 150.
diff --git a/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_CrabKissing50mrad.py b/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_CrabKissing50mrad.py
index 2076597ba2bf71351521b004c619302f8ccbd8f6..f7a331bdd3764cfe30a686f6cbcbef9f37e199a4 100644
--- a/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_CrabKissing50mrad.py
+++ b/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_CrabKissing50mrad.py
@@ -1,5 +1,5 @@
-from AthenaCommon.CfgGetter import getPublicTool
-ckvptool = getPublicTool("CrabKissingVertexPositioner")
+from AthenaCommon.CfgGetter import getPrivateTool
+ckvptool = getPrivateTool("CrabKissingVertexPositioner")
 # all lengths are in mm
 ckvptool.BunchShape = "GAUSS" # GAUSS or FLAT
 ckvptool.BunchLength = 75.
diff --git a/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_Nominal.py b/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_Nominal.py
index 8dbc4bf8f2f8f36077255b45f512674f2219941e..c4550269eda8b09b1e98cfc1e3ccac4909c1036c 100644
--- a/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_Nominal.py
+++ b/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_Nominal.py
@@ -1,5 +1,5 @@
-from AthenaCommon.CfgGetter import getPublicTool
-ckvptool = getPublicTool("CrabKissingVertexPositioner")
+from AthenaCommon.CfgGetter import getPrivateTool
+ckvptool = getPrivateTool("CrabKissingVertexPositioner")
 # all lengths are in mm
 ckvptool.BunchShape = "GAUSS" # GAUSS or FLAT
 ckvptool.BunchLength = 81.
diff --git a/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_Stage1.py b/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_Stage1.py
index 0beec2b618da9fec21df14c66ab372413c166ac7..8d7e23c8cc42a0c2d5d67b33bfab8ed701a40cd8 100644
--- a/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_Stage1.py
+++ b/Simulation/BeamEffects/share/postInclude.CrabKissingVertexPositioner_Stage1.py
@@ -1,5 +1,5 @@
-from AthenaCommon.CfgGetter import getPublicTool
-ckvptool = getPublicTool("CrabKissingVertexPositioner")
+from AthenaCommon.CfgGetter import getPrivateTool
+ckvptool = getPrivateTool("CrabKissingVertexPositioner")
 # all lengths are in mm
 ckvptool.BunchShape = "GAUSS" # GAUSS or FLAT
 ckvptool.BunchLength = 81.
diff --git a/Simulation/BeamEffects/src/GenEventVertexPositioner.cxx b/Simulation/BeamEffects/src/GenEventVertexPositioner.cxx
index 4ff808f13d3491db56211ba1fd295fc88a86b117..36f1da81516b847ce5b1d0006e66171cd1259746 100644
--- a/Simulation/BeamEffects/src/GenEventVertexPositioner.cxx
+++ b/Simulation/BeamEffects/src/GenEventVertexPositioner.cxx
@@ -22,8 +22,8 @@
 Simulation::GenEventVertexPositioner::GenEventVertexPositioner( const std::string& t,
                                                                 const std::string& n,
                                                                 const IInterface* p )
-  : AthAlgTool(t,n,p),
-    m_vertexShifters()
+  : AthAlgTool(t,n,p)
+  , m_vertexShifters(this)
 {
   declareInterface<Simulation::IGenEventManipulator>(this);
 
@@ -37,10 +37,9 @@ StatusCode  Simulation::GenEventVertexPositioner::initialize()
   ATH_MSG_VERBOSE("Initializing ...");
 
   // retrieve Vertex Shifters
-  if ( !m_vertexShifters.empty() )
-    {
-      ATH_CHECK(m_vertexShifters.retrieve());
-    }
+  if ( !m_vertexShifters.empty() ) {
+    ATH_CHECK(m_vertexShifters.retrieve());
+  }
 
   return StatusCode::SUCCESS;
 }
@@ -59,71 +58,65 @@ StatusCode Simulation::GenEventVertexPositioner::manipulate(HepMC::GenEvent& ge)
 {
   // Grab signal_process_vertex pointer
   const HepMC::GenVertex *signalProcVtx(ge.signal_process_vertex());
-  if(!signalProcVtx)
-    {
-      ATH_MSG_ERROR("Expected GenEvent::signal_process_vertex() to already have been set at this point!");
-      return StatusCode::FAILURE;
-    }
+  if(!signalProcVtx) {
+    ATH_MSG_ERROR("Expected GenEvent::signal_process_vertex() to already have been set at this point!");
+    return StatusCode::FAILURE;
+  }
 
   // loop over all given ILorentzVectorGenerator AlgTools
-  for (const auto& vertexShifter : m_vertexShifters)
-    {
-
-      // call VertexShifter and let it compute the current shift
-      CLHEP::HepLorentzVector *curShift = vertexShifter->generate();
-      if (!curShift)
-        {
-          ATH_MSG_ERROR("Vertex Shifter AthenaTool returned zero-pointer! Ignore.");
-          continue;
-        }
-
-      ATH_MSG_VERBOSE("Retrieved Vertex shift of: " << *curShift);
-
-      // As signal process vertex is a pointer, there is some risk
-      // that the pointer points to a vertex somewhere else in the
-      // event, rather than a unique / new vertex, in which case we
-      // will modify its position in the loop below and will not need
-      // to treat it separately.
-      bool modifySigVtx(true);
-
-      // loop over the vertices in the event, they are in respect with another
-      //   (code from Simulation/Fatras/FatrasAlgs/McEventPreProcessing.cxx)
-      HepMC::GenEvent::vertex_iterator vtxIt    = ge.vertices_begin();
-      HepMC::GenEvent::vertex_iterator vtxItEnd = ge.vertices_end();
-      for(  ; vtxIt != vtxItEnd; ++vtxIt)
-        {
-          // quick access:
-          HepMC::GenVertex *curVtx = (*vtxIt);
-          const HepMC::FourVector &curPos = curVtx->position();
-
-          // get a copy of the current vertex position
-          CLHEP::HepLorentzVector newPos( curPos.x(), curPos.y(), curPos.z(), curPos.t() );
-          // and update it with the given smearing
-          newPos += (*curShift);
-
-          ATH_MSG_VERBOSE( "Original vtx  position = " << curPos.x() << ", " << curPos.y() << ", " << curPos.z() );
-          ATH_MSG_VERBOSE( "Updated  vtx  position = " << newPos );
-
-          // store the updated position in the vertex
-          curVtx->set_position( newPos);
-          if(modifySigVtx && signalProcVtx==curVtx)
-            {
-              modifySigVtx=false;
-            }
-        }
-
-      // Do the same for the signal process vertex if still required.
-      if (modifySigVtx)
-        {
-          const HepMC::FourVector &curPos = ge.signal_process_vertex()->position();
-          CLHEP::HepLorentzVector newPos( curPos.x(), curPos.y(), curPos.z(), curPos.t() );
-          newPos += (*curShift);
-          ge.signal_process_vertex()->set_position( newPos);
-        }
-
-      // memory cleanup
-      delete curShift;
+  for (const auto& vertexShifter : m_vertexShifters) {
+
+    // call VertexShifter and let it compute the current shift
+    CLHEP::HepLorentzVector *curShift = vertexShifter->generate();
+    if (!curShift) {
+      ATH_MSG_ERROR("Vertex Shifter AthenaTool returned zero-pointer! Ignore.");
+      continue;
+    }
+
+    ATH_MSG_VERBOSE("Retrieved Vertex shift of: " << *curShift);
+
+    // As signal process vertex is a pointer, there is some risk
+    // that the pointer points to a vertex somewhere else in the
+    // event, rather than a unique / new vertex, in which case we
+    // will modify its position in the loop below and will not need
+    // to treat it separately.
+    bool modifySigVtx(true);
+
+    // loop over the vertices in the event, they are in respect with another
+    //   (code from Simulation/Fatras/FatrasAlgs/McEventPreProcessing.cxx)
+    HepMC::GenEvent::vertex_iterator vtxIt    = ge.vertices_begin();
+    HepMC::GenEvent::vertex_iterator vtxItEnd = ge.vertices_end();
+    for(  ; vtxIt != vtxItEnd; ++vtxIt) {
+      // quick access:
+      HepMC::GenVertex *curVtx = (*vtxIt);
+      const HepMC::FourVector &curPos = curVtx->position();
+
+      // get a copy of the current vertex position
+      CLHEP::HepLorentzVector newPos( curPos.x(), curPos.y(), curPos.z(), curPos.t() );
+      // and update it with the given smearing
+      newPos += (*curShift);
+
+      ATH_MSG_VERBOSE( "Original vtx  position = " << curPos.x() << ", " << curPos.y() << ", " << curPos.z() );
+      ATH_MSG_VERBOSE( "Updated  vtx  position = " << newPos );
+
+      // store the updated position in the vertex
+      curVtx->set_position( newPos);
+      if(modifySigVtx && signalProcVtx==curVtx) {
+        modifySigVtx=false;
+      }
+    }
+
+    // Do the same for the signal process vertex if still required.
+    if (modifySigVtx) {
+      const HepMC::FourVector &curPos = ge.signal_process_vertex()->position();
+      CLHEP::HepLorentzVector newPos( curPos.x(), curPos.y(), curPos.z(), curPos.t() );
+      newPos += (*curShift);
+      ge.signal_process_vertex()->set_position( newPos);
     }
 
+    // memory cleanup
+    delete curShift;
+  }
+
   return StatusCode::SUCCESS;
 }
diff --git a/Simulation/Digitization/cmt/requirements b/Simulation/Digitization/cmt/requirements
deleted file mode 100755
index c251944ed33c693e5e84333d868172a943b858a4..0000000000000000000000000000000000000000
--- a/Simulation/Digitization/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package Digitization
-
-author John Chapman <chapman@hep.phy.cam.ac.uk>
-
-# Run-time environment setup
-use MinimalRunTime MinimalRunTime-* Control -no_auto_imports
-
-private
-
-use TestPolicy TestPolicy-*
-
-apply_pattern validate_xml
-
-public
-
-apply_pattern declare_joboptions files="*.py jobOpts/*.py"
-
-apply_pattern declare_python_modules files="*.py"
-
-# runtime files
-apply_pattern declare_runtime files="../data/*.ascii" extras="../test/Digitization_TestConfiguration.xml"
-
-macro Digitization_TestConfiguration "../test/Digitization_TestConfiguration.xml"
-
diff --git a/Simulation/Digitization/python/DigitizationFlags.py b/Simulation/Digitization/python/DigitizationFlags.py
index 4209095bea311ccb52667a142c3a07057243ba50..770f761fdccfd959f177568fae7c79085e5a099e 100755
--- a/Simulation/Digitization/python/DigitizationFlags.py
+++ b/Simulation/Digitization/python/DigitizationFlags.py
@@ -737,6 +737,14 @@ class TRTRangeCut(JobProperty):
     allowedValues = [0.05,30.0]
     StoredValue=0.05
 
+#
+class PileUpPremixing(JobProperty):
+    """ Run pile-up premixing
+    """
+    statusOn=True
+    allowedTypes=['bool']
+    StoredValue=False
+
 #
 # Defines the container for the digitization flags
 class Digitization(JobPropertyContainer):
@@ -808,7 +816,7 @@ list_jobproperties=[doInDetNoise,doCaloNoise,doMuonNoise,doFwdNoise,doRadiationD
                     bunchSpacing,initialBunchCrossing,finalBunchCrossing,doXingByXingPileUp,\
                     simRunNumber,dataRunNumber,BeamIntensityPattern,FixedT0BunchCrossing,cavernIgnoresBeamInt,\
                     RunAndLumiOverrideList,SignalPatternForSteppingCache,
-                    experimentalDigi,pileupDSID,specialConfiguration,digiSteeringConf,TRTRangeCut]
+                    experimentalDigi,pileupDSID,specialConfiguration,digiSteeringConf,TRTRangeCut,PileUpPremixing]
 
 for i in list_jobproperties:
     jobproperties.Digitization.add_JobProperty(i)
diff --git a/Simulation/FastShower/FastCaloSim/cmt/requirements b/Simulation/FastShower/FastCaloSim/cmt/requirements
deleted file mode 100755
index 603bc1bc9d70b3fe01e3f0e84a2aa31a4bc46f57..0000000000000000000000000000000000000000
--- a/Simulation/FastShower/FastCaloSim/cmt/requirements
+++ /dev/null
@@ -1,119 +0,0 @@
-package FastCaloSim
-
-author Michael Duehrssen <michael.duehrssen@cern.ch>
-
-use AtlasPolicy          AtlasPolicy-*
-use AthenaKernel         AthenaKernel-*         Control
-
-use GaudiInterface       GaudiInterface-*       External
-#use AtlasCLHEP           AtlasCLHEP-*           External
-use AtlasROOT            AtlasROOT-*            External
-use HepPDT               *                      LCG_Interfaces 
-#use AtlasReflex       AtlasReflex-00-*      External
-use StoreGate            StoreGate-*            Control
-
-use Identifier           Identifier-*           DetectorDescription
-
-use CaloDetDescr         CaloDetDescr-*         Calorimeter
-use CaloIdentifier       CaloIdentifier-*       Calorimeter
-use CaloEvent            CaloEvent-*            Calorimeter
-use CaloInterface        CaloInterface-*        Calorimeter
-#use CaloUtils		 CaloUtils-*	        Calorimeter
-use TileEvent            TileEvent-*            TileCalorimeter
-use LArRecEvent          LArRecEvent-*          LArCalorimeter
-
-#use CBNT_Utils           CBNT_Utils-*           Reconstruction
-
-#use  GeneratorObjects     GeneratorObjects-*    Generators
-use FastSimulationEvent  FastSimulationEvent-*  Simulation/FastSimulation
-
-#use HepMC                HepMC-01-*             Simulation
-#use AtlfastEvent         AtlfastEvent-*         Simulation/Atlfast
-
-use TrkParameters        TrkParameters-*        Tracking/TrkEvent
-
-#use GeoModelSvc        GeoModelSvc-*           DetectorDescription/GeoModel
-#use CLIDSvc         CLIDSvc-*            Control
-
-use AthenaBaseComps	AthenaBaseComps-*	Control
-
-public
-use TrkExInterfaces      TrkExInterfaces-*      Tracking/TrkExtrapolation
-use TrkEventPrimitives   TrkEventPrimitives-*   Tracking/TrkEvent
-#use TruthHelper          TruthHelper-*          Generators/GenAnalysisTools
-
-private
-use AtlasCLHEP_RandomGenerators AtlasCLHEP_RandomGenerators-* Simulation/Tools
-use AtlasCLHEP           AtlasCLHEP-*           External
-use TruthUtils  TruthUtils-*  Generators
-use GeneratorObjects     GeneratorObjects-*    Generators
-use TrkGeometry         TrkGeometry-*          Tracking/TrkDetDescr 
-end_private
-
-private
-apply_tag ROOTMathLibs
-apply_tag ROOTGraphicsLibs
-end_private
-
-# Specify the required ROOT components for cmake (gtransparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS Gpad)"
-
-apply_pattern have_root_headers root_headers="ParticleEnergyParametrization.h ParticleEnergyParametrizationInDistbin.h TShape_Result.h TLateralShapeCorrection.h TSplineReweight.h TCellReweight.h LinkDef.h" \
-                                headers_lib=FastCaloSimLib
-
-ignore_pattern package_tag
-
-
-# DRQ: Note that the following two commented out lines have been removed from the list of files 
-# in the dual_use_library statement since they cause the cmt2cmake converter to ignore the remaining
-# lines in the list.
-
-#FastCaloSimIsGenSimulStable.cxx \
-#CBNTAA_DetailedCellInfo.cxx \
-
-apply_pattern dual_use_library files="\
-AddNoiseCellBuilderTool.cxx \
-BasicCellBuilderTool.cxx \
-EmptyCellBuilderTool.cxx \
-FSStoregateClean.cxx        \
-FastShowerCellBuilderTool.cxx \
-ParticleEnergyParametrization.cxx \
-ParticleEnergyParametrizationInDistbin.cxx \
-TShape_Result.cxx \
-ParticleEnergyShape.cxx \
-TLateralShapeCorrection.cxx \
-TSplineReweight.cxx \
-TCellReweight.cxx \
-"
-
-#Do not declare here, file is too large to go into CVS, has to be stored somewhere else...
-#apply_pattern declare_runtime extras="Particle*.root"
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-macro_append FastCaloSim_cppflags " '-DFastCaloSim_project_release=$(q2)$(FastCaloSim_project_release)$(q2)' "
-macro_append FastCaloSim_cppflags " -DFastCaloSim_project_release_v1=`echo $(FastCaloSim_project_release) | awk -F. '{printf("'"'%d'"'",$$1)}'` " 
-macro_append FastCaloSim_cppflags " -DFastCaloSim_project_release_v2=`echo $(FastCaloSim_project_release) | awk -F. '{printf("'"'%d'"'",$$2)}'` " 
-macro_append FastCaloSim_cppflags " -DFastCaloSim_project_release_v3=`echo $(FastCaloSim_project_release) | awk -F. '{printf("'"'%d'"'",$$3)}'` " 
-
-use AtlasDetDescr        AtlasDetDescr-*        DetectorDescription
-use AtlasHepMC           AtlasHepMC-*           External
-#use AtlfastAlgs          AtlfastAlgs-*          Simulation/Atlfast
-#use CaloSimEvent         CaloSimEvent-*         Calorimeter
-use CaloTrackingGeometry CaloTrackingGeometry-* Calorimeter
-use AthAllocators        AthAllocators-*        Control
-use EventKernel          EventKernel-*          Event
-#use ITrackToCalo         ITrackToCalo-*         Reconstruction/RecoTools
-use NavFourMom           NavFourMom-*           Event
-use PartPropSvc          v*
-use PathResolver         PathResolver-*         Tools
-use TrkMaterialOnTrack   TrkMaterialOnTrack-*   Tracking/TrkEvent
-use TrkSurfaces          TrkSurfaces-*          Tracking/TrkDetDescr
-use GeoPrimitives               GeoPrimitives-*              DetectorDescription
-use AthenaPoolUtilities     AthenaPoolUtilities-*     Database/AthenaPOOL
-#use DetDescrConditions DetDescrConditions-* DetectorDescription/DetDescrCond
-use DetDescrCondTools  DetDescrCondTools-*  DetectorDescription/DetDescrCond
-use FastCaloSimAthenaPool	FastCaloSimAthenaPool-*	Simulation/FastShower
diff --git a/Simulation/FastShower/FastCaloSimAthenaPool/cmt/requirements b/Simulation/FastShower/FastCaloSimAthenaPool/cmt/requirements
deleted file mode 100755
index aca1272848ffe471a52db7fd9b9c3e63af08b403..0000000000000000000000000000000000000000
--- a/Simulation/FastShower/FastCaloSimAthenaPool/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package FastCaloSimAthenaPool
-
-author Sascha Thoma <sascha.thoma@cern.ch>
-
-use AtlasPolicy          AtlasPolicy-*
-use DataModel            DataModel-*         Control
-use CLIDSvc         CLIDSvc-*            Control
-use AtlasReflex       AtlasReflex-*      External
-use AthenaPoolUtilities     AthenaPoolUtilities-*     Database/AthenaPOOL
-
-# never be dependent on FastCaloSim! circular dependency is evil !
-#use FastCaloSim   FastCaloSim-*   Simulation/FastShower
-
-library FastCaloSimAthenaPool *.cxx
-apply_pattern installed_library
-
-apply_pattern lcgdict dict=FastCaloSimAthenaPool selectionfile=selection.xml headerfiles="../FastCaloSimAthenaPool/FastCaloSimAthenaPoolDict.h"
-macro_append FastCaloSimAthenaPoolGen_dependencies " FastCaloSimAthenaPool"
-apply_pattern poolcnv files="-s=${FastCaloSimAthenaPool_root}/FastCaloSimAthenaPool FastShowerInfoContainer.h FastShowerInfo.h"
-macro_append FastCaloSimAthenaPoolPoolCnvGen_dependencies " FastCaloSimAthenaPoolGen"
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/FastShower/FastCaloSimHit/cmt/requirements b/Simulation/FastShower/FastCaloSimHit/cmt/requirements
deleted file mode 100644
index 87898c16ba62ea8892e5cf24b854e432e61a9c78..0000000000000000000000000000000000000000
--- a/Simulation/FastShower/FastCaloSimHit/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-package FastCaloSimHit
-
-public
-use AtlasPolicy          AtlasPolicy-*
-use AthenaBaseComps      AthenaBaseComps-*  Control
-use CaloInterface        CaloInterface-*    Calorimeter
-use GaudiInterface       GaudiInterface-*   External
-use LArElecCalib         LArElecCalib-*     LArCalorimeter
-use LArSimEvent          LArSimEvent-*      LArCalorimeter
-use StoreGate            StoreGate-*        Control
-use TileSimEvent         TileSimEvent-*     TileCalorimeter
-
-private
-use CaloIdentifier       CaloIdentifier-*   Calorimeter
-use CaloEvent            CaloEvent-*        Calorimeter
-use CxxUtils             CxxUtils-*         Control
-use EventInfo            EventInfo-*        Event
-use PileUpTools          PileUpTools-*      Control
-use TileEvent            TileEvent-*        TileCalorimeter
-use TileConditions       TileConditions-*   TileCalorimeter
-end_private
-
-ignore_pattern package_tag
-
-apply_pattern dual_use_library files=*.cxx
-#Do not declare here, file is too large to go into CVS, has to be stored somewhere else...
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-macro_append FastCaloSimHit_cppflags " '-DFastCaloSimHit_project_release=$(q2)$(FastCaloSimHit_project_release)$(q2)' "
-macro_append FastCaloSimHit_cppflags " -DFastCaloSimHit_project_release_v1=`echo $(FastCaloSimHit_project_release) | awk -F. '{printf("'"'%d'"'",$$1)}'` " 
-macro_append FastCaloSimHit_cppflags " -DFastCaloSimHit_project_release_v2=`echo $(FastCaloSimHit_project_release) | awk -F. '{printf("'"'%d'"'",$$2)}'` " 
-macro_append FastCaloSimHit_cppflags " -DFastCaloSimHit_project_release_v3=`echo $(FastCaloSimHit_project_release) | awk -F. '{printf("'"'%d'"'",$$3)}'` " 
-end_private
diff --git a/Simulation/FastSimulation/FastChainPileup/doc/packagedoc.h b/Simulation/FastSimulation/FastChainPileup/doc/packagedoc.h
index 04a9045ba7f25913fde41ee7da7e407a27d3a69e..0ed3cc3ab8c04073401e160bf4a1d767ccd6651b 100644
--- a/Simulation/FastSimulation/FastChainPileup/doc/packagedoc.h
+++ b/Simulation/FastSimulation/FastChainPileup/doc/packagedoc.h
@@ -46,8 +46,5 @@ distribution of number of pileup events - equivalent to the mu profile but
 with the additional Poisson fluctuations, filled for nevt values for each 
 BCID (but before multiplying by the R values).
 
-@section FastChainPileup_Req The requirements file:
-
-@section FastChainPileup_Uses The packages used:
 
 */
diff --git a/Simulation/FastSimulation/FastSimulationConfig/cmt/requirements b/Simulation/FastSimulation/FastSimulationConfig/cmt/requirements
deleted file mode 100644
index 480f025a862cd6ac9a1f70a93c6c776268243f8d..0000000000000000000000000000000000000000
--- a/Simulation/FastSimulation/FastSimulationConfig/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package FastSimulationConfig
- 
-author Michael Duehrssen
-
-branches run
-
-# put here the uses of the packages which need to be reached by cmt broadcast
-# Packages to be reached by cmt broadcast should be used either directly
-#
-# (the package should appear when typing cmt show uses) 
-
-
-
-use AtlasPolicy AtlasPolicy-*
-
-
-
-#put jobOption in InstallArea
-apply_pattern declare_joboptions files="*.py tests/*.py"
-
-apply_pattern declare_python_modules files="*.py tests/*.py"
-
-
-
-
- 
diff --git a/Simulation/FastSimulation/FastSimulationEvent/cmt/requirements b/Simulation/FastSimulation/FastSimulationEvent/cmt/requirements
deleted file mode 100755
index 8b28873b8c962f3a85d5df6394a84dce83c0080f..0000000000000000000000000000000000000000
--- a/Simulation/FastSimulation/FastSimulationEvent/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package FastSimulationEvent
-
-author Andreas.Salzburger@cern.ch
-
-
-# general athena dependecies
-use AtlasPolicy         AtlasPolicy-*
-
-# CLID required for the StoreGate container
-use CLIDSvc             CLIDSvc-*            Control
-
-# for the new track class
-use TrkMaterialOnTrack          TrkMaterialOnTrack-*         Tracking/TrkEvent
-use GeoPrimitives               GeoPrimitives-*              DetectorDescription
-
-#library FastSimulationEvent *.cxx 
-#apply_pattern installed_library
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-#apply_pattern declare_non_standard_include name=doc
diff --git a/Simulation/FastSimulation/FastSimulationJobTransforms/cmt/requirements b/Simulation/FastSimulation/FastSimulationJobTransforms/cmt/requirements
deleted file mode 100644
index 7a8a21313df081e1a4d7e21af399726e37122dbd..0000000000000000000000000000000000000000
--- a/Simulation/FastSimulation/FastSimulationJobTransforms/cmt/requirements
+++ /dev/null
@@ -1,8 +0,0 @@
-package FastSimulationJobTransforms
-
-use AtlasPolicy AtlasPolicy-*
-use PyJobTransformsCore PyJobTransformsCore-* Tools
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_runtime files="*.db *.root"
diff --git a/Simulation/FastSimulation/FastSimulationTests/cmt/requirements b/Simulation/FastSimulation/FastSimulationTests/cmt/requirements
deleted file mode 100644
index 2709d070f80b5820bf8a67b14ab9f151a4a4b7f2..0000000000000000000000000000000000000000
--- a/Simulation/FastSimulation/FastSimulationTests/cmt/requirements
+++ /dev/null
@@ -1,16 +0,0 @@
-package FastSimulationTests
-
-author Takashi Yamanaka <Takashi.Yamanaka@cern.ch>
-
-branches run
-
-use     AtlasPolicy             AtlasPolicy-*
-use     AtlasROOT               AtlasROOT-*             External
-
-private
-use     TestPolicy              TestPolicy-*
-
-# for RTT
-macro FastSimulationTests_TestConfiguration "../test/FastSimulationTests_TestConfiguration.xml"
-apply_pattern validate_xml
-apply_pattern declare_runtime extras="../test/FastSimulationTests_TestConfiguration.xml ../share/*.C ../share/*.h"
diff --git a/Simulation/FastSimulation/FastSimulationTests/cmt/version.cmt b/Simulation/FastSimulation/FastSimulationTests/cmt/version.cmt
deleted file mode 100644
index 6cb8e4534c5b9b30f6b92c63a52495caae347861..0000000000000000000000000000000000000000
--- a/Simulation/FastSimulation/FastSimulationTests/cmt/version.cmt
+++ /dev/null
@@ -1 +0,0 @@
-FastSimulationTests-00-01-02
diff --git a/Simulation/G4Atlas/G4AtlasAlg/cmt/requirements b/Simulation/G4Atlas/G4AtlasAlg/cmt/requirements
deleted file mode 100644
index cf716eda047431904b9fe07bfb7729a12165f942..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasAlg/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package G4AtlasAlg
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*        External
-
-private
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AthenaKernel        AthenaKernel-*          Control
-use AtlasCLHEP          AtlasCLHEP-*            External
-use AtlasHepMC          AtlasHepMC-*            External
-use FadsKinematics      FadsKinematics-*        Simulation/G4Sim/FADS
-use G4AtlasInterfaces   G4AtlasInterfaces*      Simulation/G4Atlas
-use G4AtlasTools        G4AtlasTools-*          Simulation/G4Atlas
-use Geant4              Geant4-*                External
-use GeneratorObjects    GeneratorObjects-*      Generators
-use MCTruth             MCTruth-*               Simulation/G4Sim
-use MCTruthBase         MCTruthBase-*           Simulation/G4Sim
-use SimHelpers          SimHelpers-*            Simulation/G4Sim
-use StoreGate           StoreGate-*             Control
-use SGTools             SGTools-*               Control
-use GeoModelInterfaces  GeoModelInterfaces-*    DetectorDescription/GeoModel
-use EventInfo           EventInfo-*             Event
-use CxxUtils            CxxUtils-*              Control
-end_private
-
-library G4AtlasAlg *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfig.py b/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfig.py
index 906ac630dd6a0b6c86b59ce3ff19763a623a656f..ff5e96c299f7d46d67ea591d71c368528ea625c9 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfig.py
+++ b/Simulation/G4Atlas/G4AtlasAlg/python/G4AtlasAlgConfig.py
@@ -6,7 +6,7 @@ def getAthenaStackingActionTool(name='G4UA::AthenaStackingActionTool', **kwargs)
     from G4AtlasApps.SimFlags import simFlags
     if "ATLAS" in simFlags.SimLayout():
         kwargs.setdefault('KillAllNeutrinos',  True)
-    return CfgMgr.G4UA__AthenaStackingActionTool(name,**kwargs)
+    return CfgMgr.G4UA__AthenaStackingActionTool(name, **kwargs)
 
 def getAthenaTrackingActionTool(name='G4UA::AthenaTrackingActionTool', **kwargs):
     kwargs.setdefault('SecondarySavingLevel', 2)
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.cxx
index 68a1630ff94925fd086e0d673a662702db19c42e..e6d99eb0a654c910bfec56c250fe4cd807bfaa1b 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.cxx
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.cxx
@@ -28,7 +28,6 @@
 #include "G4Gamma.hh"
 
 
-
 namespace G4UA
 {
 
@@ -43,7 +42,7 @@ namespace G4UA
   // Classify a new track
   //---------------------------------------------------------------------------
   G4ClassificationOfNewTrack
-  AthenaStackingAction::classifyNewTrack(const G4Track* track)
+  AthenaStackingAction::ClassifyNewTrack(const G4Track* track)
   {
     // Kill neutrinos if enabled
     if(m_config.killAllNeutrinos && isNeutrino(track)) {
@@ -117,20 +116,6 @@ namespace G4UA
     return fUrgent;
   }
 
-  //---------------------------------------------------------------------------
-  // New tracking stack
-  //---------------------------------------------------------------------------
-  void AthenaStackingAction::newStage()
-  {
-  }
-
-  //---------------------------------------------------------------------------
-  // Prepare stacking for new event
-  //---------------------------------------------------------------------------
-  void AthenaStackingAction::prepareNewEvent()
-  {
-  }
-
   //---------------------------------------------------------------------------
   // Identify track definition
   //---------------------------------------------------------------------------
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.h b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.h
index 89ca6d6a0a867ed340b59ffbb4be1741836cfb29..38211c4b082d46336a797c64e67b23b53c9e4d7f 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.h
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingAction.h
@@ -2,11 +2,10 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-
 #ifndef G4ATLASALG_G4UA_ATHENASTACKINGACTION_H
 #define G4ATLASALG_G4UA_ATHENASTACKINGACTION_H
 
-#include "G4AtlasInterfaces/IStackingAction.h"
+#include "G4UserStackingAction.hh"
 
 namespace G4UA
 {
@@ -18,7 +17,7 @@ namespace G4UA
   ///
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
-  class AthenaStackingAction : public IStackingAction
+  class AthenaStackingAction : public G4UserStackingAction
   {
 
     public:
@@ -38,15 +37,7 @@ namespace G4UA
       /// @brief Classify a new track.
       /// Result can be fUrgent, fWaiting, fPostpone, or fKill.
       virtual G4ClassificationOfNewTrack
-      classifyNewTrack(const G4Track* track) override;
-
-      /// @brief Called when starting the next priority queue.
-      /// The waiting stack gets moved into the urgent stack.
-      virtual void newStage() override;
-
-      /// @brief Invoked by stack manager at new event.
-      /// This method is possibly redundant so we could maybe remove it.
-      virtual void prepareNewEvent() override;
+      ClassifyNewTrack(const G4Track* track) override final;
 
     private:
 
@@ -54,6 +45,7 @@ namespace G4UA
       /// It might be useful to move this kind of functionality
       /// into some standalong helper function(s).
       bool isNeutrino(const G4Track*) const;
+
       /// @brief Identify track as a photon.
       bool isGamma(const G4Track*) const;
 
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingActionTool.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingActionTool.cxx
index f3bad708787c29202458e0fb66c20a83ae2db6ec..ae58958514b48937cfbf0bc9c0d179df1612a180 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingActionTool.cxx
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingActionTool.cxx
@@ -16,6 +16,7 @@ namespace G4UA
     : ActionToolBase<AthenaStackingAction>(type, name, parent),
       m_config { /*killAllNeutrinos*/ false, /*photonEnergyCut*/ -1.}
   {
+    declareInterface<IG4StackingActionTool>(this);
     declareProperty("KillAllNeutrinos", m_config.killAllNeutrinos,
                     "Toggle killing of all neutrinos");
     declareProperty("PhotonEnergyCut", m_config.photonEnergyCut,
@@ -23,11 +24,11 @@ namespace G4UA
   }
 
   //---------------------------------------------------------------------------
-  // Initialize - temporarily here for debugging
+  // Initialize
   //---------------------------------------------------------------------------
   StatusCode AthenaStackingActionTool::initialize()
   {
-    ATH_MSG_INFO("initialize");
+    ATH_MSG_DEBUG( "Initializing " << name() );
     return StatusCode::SUCCESS;
   }
 
@@ -37,23 +38,9 @@ namespace G4UA
   std::unique_ptr<AthenaStackingAction>
   AthenaStackingActionTool::makeAction()
   {
-    ATH_MSG_DEBUG("makeAction");
+    ATH_MSG_DEBUG("Creating an AthenaStackingAction");
     // Create and configure the action plugin.
     return std::make_unique<AthenaStackingAction>(m_config);
   }
 
-  //---------------------------------------------------------------------------
-  // Query interface
-  //---------------------------------------------------------------------------
-  StatusCode AthenaStackingActionTool::queryInterface(const InterfaceID& riid,
-                                                      void** ppvIf)
-  {
-    if(riid == IStackingActionTool::interfaceID()) {
-      *ppvIf = (IStackingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    return ActionToolBase<AthenaStackingAction>::queryInterface(riid, ppvIf);
-  }
-
 }
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingActionTool.h b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingActionTool.h
index aa2b33c41f050e7153821d9cdda56e9cf186dacf..5dcbc00ad57adf9ad1b8bc1c12bd9dc21c4ecb09 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingActionTool.h
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaStackingActionTool.h
@@ -12,7 +12,7 @@
 #include "AthenaStackingAction.h"
 
 // Infrastructure includes
-#include "G4AtlasInterfaces/IStackingActionTool.h"
+#include "G4AtlasInterfaces/IG4StackingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 
 
@@ -25,7 +25,7 @@ namespace G4UA
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class AthenaStackingActionTool : public ActionToolBase<AthenaStackingAction>,
-                                   public IStackingActionTool
+                                   public IG4StackingActionTool
   {
 
     public:
@@ -34,15 +34,12 @@ namespace G4UA
       AthenaStackingActionTool(const std::string& type, const std::string& name,
                                const IInterface* parent);
 
-      /// Initialize the tool (just for debugging printout)
-      virtual StatusCode initialize() override;
+      /// Initialize the tool
+      virtual StatusCode initialize() override final;
 
       /// Retrieve the stepping action
-      virtual IStackingAction* getStackingAction() override final
-      { return static_cast<IStackingAction*>( getAction() ); }
-
-      /// Query interface for gaudi
-      virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserStackingAction* getStackingAction() override final
+      { return static_cast<G4UserStackingAction*>( getAction() ); }
 
     protected:
 
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.cxx
index 84713b7e619c506118cbfc7d5f845d258d6d9176..17d3a2e40a1e46fa9b9c66189bac73ae51c27c59 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.cxx
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.cxx
@@ -6,15 +6,11 @@
 
 #include <iostream>
 
-#include "G4DynamicParticle.hh"
-#include "G4PrimaryParticle.hh"
 #include "G4Event.hh"
 #include "G4EventManager.hh"
 
 #include "MCTruth/EventInformation.h"
-#include "MCTruth/PrimaryParticleInformation.h"
 #include "MCTruth/TrackHelper.h"
-#include "MCTruth/TrackInformation.h"
 #include "MCTruthBase/AtlasTrajectory.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
@@ -24,9 +20,10 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Constructor
   //---------------------------------------------------------------------------
-  AthenaTrackingAction::AthenaTrackingAction(MSG::Level lvl, int secondarySavingLevel)
-    : m_msg("AthenaTrackingAction")
-    , m_secondarySavingLevel(secondarySavingLevel)
+  AthenaTrackingAction::AthenaTrackingAction(MSG::Level lvl,
+                                             int secondarySavingLevel)
+    : m_msg("AthenaTrackingAction"),
+      m_secondarySavingLevel(secondarySavingLevel)
   {
     m_msg.get().setLevel(lvl);
   }
@@ -34,7 +31,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Pre-tracking action.
   //---------------------------------------------------------------------------
-  void AthenaTrackingAction::preTracking(const G4Track* track)
+  void AthenaTrackingAction::PreUserTrackingAction(const G4Track* track)
   {
     ATH_MSG_DEBUG("Starting to track a new particle");
 
@@ -79,7 +76,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Post-tracking action.
   //---------------------------------------------------------------------------
-  void AthenaTrackingAction::postTracking(const G4Track* /*track*/)
+  void AthenaTrackingAction::PostUserTrackingAction(const G4Track* /*track*/)
   {
     ATH_MSG_DEBUG("Finished tracking a particle");
 
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.h b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.h
index 8b2386806ccbf38846767e1d5d748817ab6df553..c6abf3b1c3cf78814b1e5cee8370b586da6eab55 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.h
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingAction.h
@@ -5,17 +5,9 @@
 #ifndef G4AtlasAlg_AthenaTrackingAction_H
 #define G4AtlasAlg_AthenaTrackingAction_H
 
-/// @class AthenaTrackingAction
-/// @brief User action for pre/post tracking truth handling.
-///
-/// This is the current implementation based on the (V1) user action design
-/// as part of the simulation infrastructure migrations. The multi-threaded
-/// (V2) design is still in the works.
-///
-
 #include "AthenaKernel/MsgStreamMember.h"
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
-#include "G4AtlasInterfaces/IPostTrackingAction.h"
+
+#include "G4UserTrackingAction.hh"
 
 namespace G4UA
 {
@@ -23,10 +15,7 @@ namespace G4UA
   /// @class AthenaTrackingAction
   /// @brief User action for pre/post tracking truth handling.
   ///
-  /// This is the new/upcoming implementation for multi-threaded simulation.
-  ///
-  class AthenaTrackingAction : public IPreTrackingAction,
-                               public IPostTrackingAction
+  class AthenaTrackingAction : public G4UserTrackingAction
   {
 
     public:
@@ -39,12 +28,12 @@ namespace G4UA
       /// If the track meets certain conditions, we save it in the
       /// EventInformation and possibly construct a new AtlasTrajectory
       /// which will be used for writing out truth particles later.
-      virtual void preTracking(const G4Track*) override;
+      virtual void PreUserTrackingAction(const G4Track*) override final;
 
       /// @brief Called after tracking a particle.
       ///
       /// Here we reset the AtlasTrajectory if it was created.
-      virtual void postTracking(const G4Track*) override;
+      virtual void PostUserTrackingAction(const G4Track*) override final;
 
     private:
 
@@ -52,8 +41,10 @@ namespace G4UA
       MsgStream& msg( MSG::Level lvl ) const { return m_msg << lvl; }
       bool msgLvl( MSG::Level lvl ) const { return m_msg.get().level() <= lvl; }
       mutable Athena::MsgStreamMember m_msg;
+
       /// The saving level for secondaries.
       int m_secondarySavingLevel;
+
   }; // class AthenaTrackingAction
 
 } // namespace G4UA
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.cxx
index ffece197edbe34752e34d181bb865fddefef67ef..6ffcf11fcbfa9cb8458374b4d0cfa038b2379121 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.cxx
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.cxx
@@ -13,12 +13,12 @@ namespace G4UA
   AthenaTrackingActionTool::
   AthenaTrackingActionTool(const std::string& type, const std::string& name,
                            const IInterface* parent)
-    : ActionToolBase<AthenaTrackingAction>(type, name, parent)
-    , m_secondarySavingLevel(2)
+    : ActionToolBase<AthenaTrackingAction>(type, name, parent),
+      m_secondarySavingLevel(2)
   {
-    declareInterface<IPreTrackingActionTool>(this);
-    declareInterface<IPostTrackingActionTool>(this);
-    declareProperty("SecondarySavingLevel", m_secondarySavingLevel, "Three valid options: 1 - Primaries; 2 - StoredSecondaries(default); 3 - All");
+    declareInterface<IG4TrackingActionTool>(this);
+    declareProperty("SecondarySavingLevel", m_secondarySavingLevel,
+      "Three valid options: 1 - Primaries; 2 - StoredSecondaries(default); 3 - All");
   }
 
   //---------------------------------------------------------------------------
@@ -26,7 +26,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   StatusCode AthenaTrackingActionTool::initialize()
   {
-    ATH_MSG_INFO("initialize");
+    ATH_MSG_DEBUG( "Initializing " << name() );
     return StatusCode::SUCCESS;
   }
 
@@ -38,7 +38,8 @@ namespace G4UA
   {
     ATH_MSG_DEBUG("Constructing an AthenaTrackingAction");
     // Create and configure the action plugin.
-    return std::make_unique<AthenaTrackingAction>( msg().level(), m_secondarySavingLevel );
+    return std::make_unique<AthenaTrackingAction>( msg().level(),
+                                                   m_secondarySavingLevel );
   }
 
 }
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.h b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.h
index 92ebd5a2bc044527eb46c9b80c40a492ba0db01f..52127484dd6cfc75c38e035adbd00e2b72a51248 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.h
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/AthenaTrackingActionTool.h
@@ -6,8 +6,7 @@
 #define G4AtlasAlg_AthenaTrackingActionTool_H
 
 // Infrastructure includes
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
-#include "G4AtlasInterfaces/IPostTrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 
 // Local includes
@@ -22,8 +21,7 @@ namespace G4UA
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class AthenaTrackingActionTool : public ActionToolBase<AthenaTrackingAction>,
-                                   public IPreTrackingActionTool,
-                                   public IPostTrackingActionTool
+                                   public IG4TrackingActionTool
   {
 
     public:
@@ -36,20 +34,19 @@ namespace G4UA
       virtual StatusCode initialize() override;
 
       /// Retrieve the tracking action
-      virtual IPreTrackingAction* getPreTrackingAction() override final
-      { return static_cast<IPreTrackingAction*>( getAction() ); }
-
-      /// Retrieve the tracking action
-      virtual IPostTrackingAction* getPostTrackingAction() override final
-      { return static_cast<IPostTrackingAction*>( getAction() ); }
+      virtual G4UserTrackingAction* getTrackingAction() override final
+      { return static_cast<G4UserTrackingAction*>( getAction() ); }
 
     protected:
 
       /// Create an action for this thread
       virtual std::unique_ptr<AthenaTrackingAction> makeAction() override final;
-  private:
+
+    private:
+
       /// The saving level for secondaries.
       int m_secondarySavingLevel;
+
   }; // class AthenaTrackingActionTool
 
 } // namespace G4UA
diff --git a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
index 1db1fdd535bc6326d871214898781ce09ed0a719..04ab05687208645e253a311637095166b807e651 100644
--- a/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
+++ b/Simulation/G4Atlas/G4AtlasAlg/src/G4AtlasAlg.cxx
@@ -124,7 +124,6 @@ void G4AtlasAlg::initializeOnce()
     // Worker Thread initialization used to create worker run manager on demand.
     // @TODO use this class to pass any configuration to worker run manager.
     runMgr->SetUserInitialization( new G4AtlasUserWorkerThreadInitialization );
-    runMgr->SetUserInitialization( m_physListTool->GetPhysicsList() );
 #else
     throw std::runtime_error("Trying to use multi-threading in non-MT build!");
 #endif
@@ -137,7 +136,6 @@ void G4AtlasAlg::initializeOnce()
     runMgr->SetRecordFlux( m_recordFlux );
     runMgr->SetLogLevel( int(msg().level()) ); // Synch log levels
     runMgr->SetUserActionSvc( m_userActionSvc.typeAndName() );
-    runMgr->SetUserInitialization(m_physListTool->GetPhysicsList());
   }
 
   // G4 user interface commands
diff --git a/Simulation/G4Atlas/G4AtlasApps/cmt/requirements b/Simulation/G4Atlas/G4AtlasApps/cmt/requirements
deleted file mode 100644
index 08515c3374d954432459bdcc3d4cda7d2506c832..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasApps/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package G4AtlasApps
-
-author Andrea Dell'Acqua <dellacqu@mail.cern.ch>
-author Andy Buckley <andy.buckley@cern.ch>
-
-# Build policy
-use AtlasPolicy AtlasPolicy-*
-private
-#use G4AtlasControl             G4AtlasControl-*            Simulation/G4Atlas
-#use G4AtlasAlg                 G4AtlasAlg-*                Simulation/G4Atlas
-#use VertexPositionGenerator    VertexPositionGenerator-*   Simulation/Tools
-use AtlasCOOL                  AtlasCOOL-*                 External -no_auto_imports
-end_private
-
-# Install run-time files
-apply_pattern declare_joboptions files="-s=../share *.py"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_runtime extras="../test/G4AtlasApps_TestConfiguration.xml ../test/*.C"
-apply_pattern get_files data="PDGTABLE.MeV"
-
-# Added for RTT test
-macro G4AtlasApps_TestConfiguration "../test/G4AtlasApps_TestConfiguration.xml"
diff --git a/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py b/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py
index aa0c63a8e55ffd5a7b78fa17a87c4a5923526f24..493979565cb05945ace137a05c178c074edff943 100644
--- a/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py
+++ b/Simulation/G4Atlas/G4AtlasApps/python/G4Atlas_Metadata.py
@@ -92,6 +92,9 @@ def fillAtlasMetadata(dbFiller):
         ## Don't write out random number seeds or RunDict as metadata
         if sp in ("RandomSeedList", "RandomSeedOffset", "RunDict"):
             continue
+        ## Don't write out Tool and Service names
+        if sp in ("TruthService"):
+            continue
         ## Only store InitFunction names
         if sp in ("InitFunctions"):
             initfuncdict = dict()
@@ -155,7 +158,6 @@ def fillTestBeamMetadata(dbFiller):
 def fillISFMetadata(dbFiller):
     from ISF_Config.ISF_jobProperties import ISF_Flags
     dbFiller.addSimParam('Simulator', ISF_Flags.Simulator())
-    dbFiller.addSimParam('TruthStrategy', ISF_Flags.TruthStrategy())
 
 def createSimulationParametersMetadata():
     from IOVDbMetaDataTools import ParameterDbFiller
diff --git a/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py b/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py
index ad85057880205e88b00cbfc07abc4eea490ab301..8e4084656384e087a53d0eb73b81e604d1892a86 100644
--- a/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py
+++ b/Simulation/G4Atlas/G4AtlasApps/python/PyG4Atlas.py
@@ -140,9 +140,6 @@ class G4AtlasEngine:
         """
         if "init_G4" not in self._InitList:
             G4AtlasEngine.log.debug(' G4AtlasEngine: _init_G4: init Geant4 ')
-            if G4AtlasEngine.log.level <= 30:
-                from G4AtlasApps.SimFlags import simFlags
-                simFlags.G4Commands += ['/run/verbose 2'] # FIXME make configurable based on Athena message level?
             G4AtlasEngine._ctrl.initializeG4(is_hive)
             self._InitList.append('init_G4')
             G4AtlasEngine._app_profiler('_init_G4: ')
diff --git a/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py b/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py
index 416c475b85bb9848fb90acf1cf3dfd75360503cb..ebc1a2c96adf6dad7afb9b414eee7b06749a708d 100644
--- a/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py
+++ b/Simulation/G4Atlas/G4AtlasApps/python/SimFlags.py
@@ -656,7 +656,7 @@ class OptionalUserActionList(JobProperty):
     statusOn = True
     allowedTypes = ['dict']
     # not allowing stacking actions to be modified this way
-    StoredValue = {'BeginOfRun':[], 'BeginOfEvent':[], 'PreTracking':[], 'Step':['G4UA::LooperKillerTool'], 'PostTracking':[], 'EndOfRun':[], 'EndOfEvent':[]}
+    StoredValue = {'Run':[], 'Event':[], 'Tracking':[], 'Step':['G4UA::LooperKillerTool']}
     def addAction(self,actionTool,roles=[]):
         #Add the action to the end of the list of actions for each role.
         for role in roles:
@@ -665,7 +665,7 @@ class OptionalUserActionList(JobProperty):
             except KeyError:
                 print "WARNING Attempt to assign to action",actionTool,"a role ",role,"which is not allowed"
 
-    def removeAction(self,actionTool,roles=['BeginOfRun','BeginOfEvent', 'PreTracking', 'Step', 'PostTracking', 'EndOfRun', 'EndOfEvent']):
+    def removeAction(self, actionTool, roles=['Run', 'Event', 'Tracking', 'Step']):
          #Remove the action from the lists of actions for each role (remove from all by default) - no error if it isn't in the list.
         for role in roles:
             try:
@@ -681,7 +681,7 @@ class G4Commands(JobProperty):
     """
     statusOn = True
     allowedTypes = ['list']
-    StoredValue = []
+    StoredValue = ['/run/verbose 2'] # FIXME make configurable based on Athena message level?
 
 class UserActionConfig(JobProperty):
     """Configuration for UserActions
@@ -705,6 +705,32 @@ class specialConfiguration(JobProperty):
     StoredValue = dict()
 
 
+class TruthStrategy(JobProperty): ## TODO Setting this should automatically update dependent jobproperties.
+    """Steering of ISF: set truthStrategy"""
+    statusOn     = True
+    allowedTypes = ['str']
+    StoredValue  = 'MC12'
+    def TruthServiceName(self):
+        # Sometimes want to override and use the Validation Truth Service for example
+        if  jobproperties.SimFlags.TruthService.statusOn:
+            return jobproperties.SimFlags.TruthService.get_Value()
+        if self.statusOn:
+            return 'ISF_' + self.StoredValue + 'TruthService'
+    def EntryLayerFilterName(self):
+        if self.statusOn:
+            return 'ISF_' + self.StoredValue + 'EntryLayerFilter'
+    def BarcodeServiceName(self):
+        if self.statusOn:
+            return 'Barcode_' + self.StoredValue + 'BarcodeSvc'
+
+
+class TruthService(JobProperty):
+    """Steering of ISF: set the TruthService"""
+    statusOn     = False
+    allowedTypes = ['str']
+    StoredValue  = 'ISF_TruthService'
+
+
 ## Definition and registration of the simulation flag container
 class SimFlags(JobPropertyContainer):
     """
diff --git a/Simulation/G4Atlas/G4AtlasApps/python/callbacks.py b/Simulation/G4Atlas/G4AtlasApps/python/callbacks.py
index af27039578ed956ef25f01c754bae49fd85e6df2..51f8f61c95c575828e9cdc3b51ea2ec03506a759 100644
--- a/Simulation/G4Atlas/G4AtlasApps/python/callbacks.py
+++ b/Simulation/G4Atlas/G4AtlasApps/python/callbacks.py
@@ -43,8 +43,7 @@ def add_LLP_truth_strategies():
     mcTruthMenu.add_McTruthStrategy(astrategy)
 
 def add_EnergyConservationTest():
-    from G4AtlasApps import PyG4Atlas,AtlasG4Eng
+    from G4AtlasApps.SimFlags import simFlags
     # Enable the energy conservation test action
-    MyAction = PyG4Atlas.UserAction('G4UserActions','EnergyConservationTest', ['BeginOfEvent','EndOfEvent','Step'])
-    AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(MyAction)
-
+    simFlags.OptionalUserActionList.addAction(
+        'G4UA::EnergyConservationTestTool', ['Event', 'Tracking', 'Step'])
diff --git a/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4AtlasMT.py b/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4AtlasMT.py
new file mode 100644
index 0000000000000000000000000000000000000000..9ea47a66dc896a108408b85b73d764ff82e4e38b
--- /dev/null
+++ b/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4AtlasMT.py
@@ -0,0 +1,106 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
+#
+# Job options file for multi-threaded Geant4 ATLAS detector simulation.
+# Run this by specifying the number of threads on the command line:
+# $ athena --threads=4 G4AtlasApps/jobOptions.G4AtlasMT.py
+#
+
+from AthenaCommon.Logging import log as msg
+
+from AthenaCommon.ConcurrencyFlags import jobproperties as jp
+nThreads = jp.ConcurrencyFlags.NumThreads()
+if (nThreads < 1) :
+   msg.fatal('numThreads must be >0. Did you set the --threads=N option?')
+   sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
+
+# Message stream format
+msgFmt = "% F%40W%S%5W%e%s%7W%R%T %0W%M"
+svcMgr.MessageSvc.Format = msgFmt
+# svcMgr.MessageSvc.useColors = True
+# svcMgr.AthenaHiveEventLoopMgr.OutputLevel = DEBUG
+
+# Make the scheduler dump some information
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
+
+# Thread pool service and G4 thread initialization
+from GaudiHive.GaudiHiveConf import ThreadPoolSvc
+svcMgr += ThreadPoolSvc("ThreadPoolSvc")
+svcMgr.ThreadPoolSvc.ThreadInitTools = ["G4ThreadInitTool"]
+
+
+# AthenaCommon flags
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+athenaCommonFlags.PoolEvgenInput = ['/afs/cern.ch/atlas/offline/ProdData/15.6.11.3/mu_E200_eta0-60-10000.evgen.pool.root']
+athenaCommonFlags.PoolHitsOutput = "g4hive.hits.pool.root"
+athenaCommonFlags.EvtMax = 500
+
+# Global conditions tag
+from AthenaCommon.GlobalFlags import jobproperties
+jobproperties.Global.ConditionsTag = "OFLCOND-RUN12-SDR-21"
+
+# Detector flags
+from AthenaCommon.DetFlags import DetFlags
+DetFlags.ID_setOn()
+DetFlags.Calo_setOn()
+DetFlags.Muon_setOn()
+DetFlags.Lucid_setOff()
+DetFlags.Truth_setOn()
+
+# Simulation flags
+from G4AtlasApps.SimFlags import simFlags
+simFlags.load_atlas_flags()
+# Use the default layout
+simFlags.SimLayout.set_On()
+# Set the EtaPhi, VertexSpread and VertexRange checks on/off
+simFlags.EventFilter.set_Off()
+# Set the LAr parameterization
+#simFlags.LArParameterization = 2
+# Magnetic field
+simFlags.MagneticField.set_On()
+
+# Debug outputs of user actions
+#CfgGetter.getPublicTool('G4UA::AthenaTrackingActionTool').OutputLevel = DEBUG
+
+# Setup the algorithm sequence
+from AthenaCommon.AlgSequence import AlgSequence
+topSeq = AlgSequence()
+
+# SGInputLoader is a module in SGComps that will do a typeless StoreGate read
+# of data on disk, to preload it in the Whiteboard for other Alorithms to use.
+# It uses the same syntax as Algorithmic dependency declarations.
+from AthenaCommon import CfgMgr
+topSeq += CfgMgr.SGInputLoader(OutputLevel=INFO, ShowEventDump=False)
+topSeq.SGInputLoader.Load = [('McEventCollection', 'StoreGateSvc+GEN_EVENT')]
+
+# Add the beam effects algorithm
+from AthenaCommon.CfgGetter import getAlgorithm
+topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True)
+
+# Add the (python) G4 simulation service.
+# This will kickstart a lot of simulation setup.
+from G4AtlasApps.PyG4Atlas import PyG4AtlasSvc
+svcMgr += PyG4AtlasSvc()
+
+# Explicitly specify the data-flow dependencies of G4AtlasAlg and StreamHITS.
+# This is done like this because currently our VarHandles do not live in the
+# algorithm but rather in Geant4 components.
+# TODO: make this declaration more automatic
+topSeq.G4AtlasAlg.ExtraInputs =  [('McEventCollection','StoreGateSvc+BeamTruthEvent')]
+topSeq.G4AtlasAlg.ExtraOutputs = [('SiHitCollection','StoreGateSvc+SCT_Hits')]
+topSeq.StreamHITS.ExtraInputs += topSeq.G4AtlasAlg.ExtraOutputs
+
+# Increase verbosity of the output stream
+#topSeq.StreamHITS.OutputLevel = DEBUG
+
+# Disable alg filtering - doesn't work yet in multi-threading
+topSeq.StreamHITS.AcceptAlgs = []
+
+# Override algorithm cloning settings
+for alg in topSeq:
+    if alg.name() != 'StreamHITS':
+        alg.Cardinality = nThreads
diff --git a/Simulation/G4Atlas/G4AtlasControl/cmt/requirements b/Simulation/G4Atlas/G4AtlasControl/cmt/requirements
deleted file mode 100644
index b5cdae56efe40c1973c146a22452511853f43063..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasControl/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package G4AtlasControl
-
-public
-use AtlasPolicy         AtlasPolicy-*
-
-use GaudiInterface      GaudiInterface-*        External
-
-private
-use AtlasCLHEP          AtlasCLHEP-*            External
-use Geant4              Geant4-*                External
-use FadsPackageLoader   FadsPackageLoader-*     Simulation/G4Sim/FADS
-use MCTruthBase         MCTruthBase-*           Simulation/G4Sim
-end_private
-
-####include_dirs "$(G4AtlasControl_root)"
-
-library G4AtlasControl *.cxx
-apply_pattern installed_library
-
-private
-
-use AtlasReflex         AtlasReflex-*           External
-
-apply_pattern lcgdict dict=G4AtlasControl \
-                headerfiles="../G4AtlasControl/G4AtlasControlDict.h" \
-                selectionfile=selection.xml
-macro_prepend G4AtlasControlDict_shlibflags " -lG4AtlasControl "
-end_private
diff --git a/Simulation/G4Atlas/G4AtlasControl/doc/packagedoc.h b/Simulation/G4Atlas/G4AtlasControl/doc/packagedoc.h
index c1aa0b510b9811a22787a218d3a4ec8dd6f19b22..4fdb64aba98c49821b0543ca71c19dc172be09cb 100644
--- a/Simulation/G4Atlas/G4AtlasControl/doc/packagedoc.h
+++ b/Simulation/G4Atlas/G4AtlasControl/doc/packagedoc.h
@@ -19,17 +19,6 @@ The classes in this package are:
  - ParticleDataModifier : An interface for modifying particle properties during the simulation (charge, mass, etc)
  - SimControl : One interface to rule them all
 
-@ref used_G4AtlasControl
 
-@ref requirements_G4AtlasControl
 
 */
-
-/**
-@page used_G4AtlasControl Used Packages
-*/
-
-/**
-@page requirements_G4AtlasControl Requirements
-*/
-
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginEventAction.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginEventAction.h
deleted file mode 100644
index 87262319d64695160d0396ced0b01bfb7ecb3412..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginEventAction.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IBEGINEVENTACTION_H
-#define G4ATLASINTERFACES__G4UA_IBEGINEVENTACTION_H
-
-// Forward declarations
-class G4Event;
-
-namespace G4UA
-{
-
-  /// Simple interface for an ATLAS begin-of-event action
-  class IBeginEventAction
-  {
-    public:
-      /// Virtual destructor
-      virtual ~IBeginEventAction(){};
-      /// Method called before simulating a G4 event
-      virtual void beginOfEvent(const G4Event*) = 0;
-  };
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginEventActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginEventActionTool.h
deleted file mode 100644
index 69892a9135f868b116d34901e77b5fc32cfaab61..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginEventActionTool.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IBEGINEVENTACTIONTOOL_H
-#define G4ATLASINTERFACES__G4UA_IBEGINEVENTACTIONTOOL_H
-
-// Framework includes
-#include "GaudiKernel/IAlgTool.h"
-
-// Local includes
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-
-namespace G4UA
-{
-
-  /// @class IBeginEventActionTool
-  /// @brief Abstract interface for tools that manage ATLAS begin-of-event
-  /// custom actions.
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  ///
-  class IBeginEventActionTool : virtual public IAlgTool
-  {
-
-    public:
-
-      /// Return the action for current thread.
-      virtual IBeginEventAction* getBeginEventAction() = 0;
-
-      /// Interface declaration
-      static const InterfaceID& interfaceID() {
-        static const InterfaceID iid_IBeginEventTool("G4UA::IBeginEventActionTool", 1, 0);
-        return iid_IBeginEventTool;
-      }
-
-  }; // class IBeginEventActionTool
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginRunAction.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginRunAction.h
deleted file mode 100644
index 99b42c46700360cfb47f9da490a040489c6ef2fd..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginRunAction.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IBEGINRUNACTION_H
-#define G4ATLASINTERFACES__G4UA_IBEGINRUNACTION_H
-
-// Forward declarations
-class G4Run;
-
-namespace G4UA
-{
-
-  /// Simple interface for an ATLAS begin-of-run action
-  class IBeginRunAction
-  {
-    public:
-      /// Virtual destructor
-      virtual ~IBeginRunAction(){};
-      /// Method called before simulating a G4 run
-      virtual void beginOfRun(const G4Run*) = 0;
-  };
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginRunActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginRunActionTool.h
deleted file mode 100644
index c03a518b222b93691b71a6e54d09a87617eb9a7d..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IBeginRunActionTool.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IBEGINRUNACTIONTOOL_H
-#define G4ATLASINTERFACES__G4UA_IBEGINRUNACTIONTOOL_H
-
-// Framework includes
-#include "GaudiKernel/IAlgTool.h"
-
-// Local includes
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-
-namespace G4UA
-{
-
-  /// @class IBeginRunActionTool
-  /// @brief Abstract interface for tools that manage ATLAS begin-of-run
-  /// custom actions.
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  ///
-  class IBeginRunActionTool : virtual public IAlgTool
-  {
-
-    public:
-
-      /// Return the action for current thread.
-      virtual IBeginRunAction* getBeginRunAction() = 0;
-
-      /// Interface declaration
-      static const InterfaceID& interfaceID() {
-        static const InterfaceID iid_IBeginRunTool("G4UA::IBeginRunActionTool", 1, 0);
-        return iid_IBeginRunTool;
-      }
-
-  }; // class IBeginRunActionTool
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndEventAction.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndEventAction.h
deleted file mode 100644
index 55f8bee9ca0cfa6527ee1bfca72876bfaf0b331c..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndEventAction.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IENDEVENTACTION_H
-#define G4ATLASINTERFACES__G4UA_IENDEVENTACTION_H
-
-// Forward declarations
-class G4Event;
-
-namespace G4UA
-{
-
-  /// Simple interface for an ATLAS end-of-event action
-  class IEndEventAction
-  {
-    public:
-      /// Virtual destructor
-      virtual ~IEndEventAction(){};
-      /// Method called after simulating a G4 event
-      virtual void endOfEvent(const G4Event*) = 0;
-  };
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndEventActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndEventActionTool.h
deleted file mode 100644
index 33c1a451fa56e5c4cdeeb32793739fd0898dc908..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndEventActionTool.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IENDEVENTACTIONTOOL_H
-#define G4ATLASINTERFACES__G4UA_IENDEVENTACTIONTOOL_H
-
-// Framework includes
-#include "GaudiKernel/IAlgTool.h"
-
-// Local includes
-#include "G4AtlasInterfaces/IEndEventAction.h"
-
-namespace G4UA
-{
-
-  /// @class IEndEventActionTool
-  /// @brief Abstract interface for tools that manage ATLAS end-of-event
-  /// custom actions.
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  ///
-  class IEndEventActionTool : virtual public IAlgTool
-  {
-
-    public:
-
-      /// Return the action for current thread.
-      virtual IEndEventAction* getEndEventAction() = 0;
-
-      /// Interface declaration
-      static const InterfaceID& interfaceID() {
-        static const InterfaceID iid_IEndEventTool("G4UA::IEndEventActionTool", 1, 0);
-        return iid_IEndEventTool;
-      }
-
-  }; // class IEndEventActionTool
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndRunAction.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndRunAction.h
deleted file mode 100644
index bd4e3c55d12b71329994b2104668d490dcfdf509..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndRunAction.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IENDRUNACTION_H
-#define G4ATLASINTERFACES__G4UA_IENDRUNACTION_H
-
-// Forward declarations
-class G4Run;
-
-namespace G4UA
-{
-
-  /// Simple interface for an ATLAS end-of-run action
-  class IEndRunAction
-  {
-    public:
-      /// Virtual destructor
-      virtual ~IEndRunAction(){};
-      /// Method called after simulating a G4 run
-      virtual void endOfRun(const G4Run*) = 0;
-  };
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndRunActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndRunActionTool.h
deleted file mode 100644
index b96629eee9e55ff5859c4e479618e3af099570fa..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IEndRunActionTool.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IENDRUNACTIONTOOL_H
-#define G4ATLASINTERFACES__G4UA_IENDRUNACTIONTOOL_H
-
-// Framework includes
-#include "GaudiKernel/IAlgTool.h"
-
-// Local includes
-#include "G4AtlasInterfaces/IEndRunAction.h"
-
-namespace G4UA
-{
-
-  /// @class IEndRunActionTool
-  /// @brief Abstract interface for tools that manage ATLAS end-of-run
-  /// custom actions.
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  ///
-  class IEndRunActionTool : virtual public IAlgTool
-  {
-
-    public:
-
-      /// Return the action for current thread.
-      virtual IEndRunAction* getEndRunAction() = 0;
-
-      /// Interface declaration
-      static const InterfaceID& interfaceID() {
-        static const InterfaceID iid_IEndRunTool("G4UA::IEndRunActionTool", 1, 0);
-        return iid_IEndRunTool;
-      }
-
-  }; // class IEndRunActionTool
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4EventActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4EventActionTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..1c48ccbad71defee74ae9529052e8ea012101e70
--- /dev/null
+++ b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4EventActionTool.h
@@ -0,0 +1,40 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef G4ATLASINTERFACES__G4UA_IG4EVENTACTIONTOOL_H
+#define G4ATLASINTERFACES__G4UA_IG4EVENTACTIONTOOL_H
+
+// Framework includes
+#include "GaudiKernel/IAlgTool.h"
+
+// Forward declarations
+class G4UserEventAction;
+
+namespace G4UA
+{
+
+  /// @class IG4EventActionTool
+  /// @brief Abstract interface for tools that construct ATLAS G4 event actions.
+  ///
+  /// @author Steve Farrell <Steven.Farrell@cern.ch>
+  ///
+  class IG4EventActionTool : virtual public IAlgTool
+  {
+
+    public:
+
+      /// Return the action for current thread.
+      virtual G4UserEventAction* getEventAction() = 0;
+
+      /// Interface declaration
+      static const InterfaceID& interfaceID() {
+        static const InterfaceID iid_IG4EventTool("G4UA::IG4EventActionTool", 1, 0);
+        return iid_IG4EventTool;
+      }
+
+  }; // class IG4EventActionTool
+
+} // namespace G4UA
+
+#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4RunActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4RunActionTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..fc1df11a65ef15d7b27d35e0f07091e0cfb9f2f0
--- /dev/null
+++ b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4RunActionTool.h
@@ -0,0 +1,40 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef G4ATLASINTERFACES__G4UA_IG4RUNACTIONTOOL_H
+#define G4ATLASINTERFACES__G4UA_IG4RUNACTIONTOOL_H
+
+// Framework includes
+#include "GaudiKernel/IAlgTool.h"
+
+// Forward declarations
+class G4UserRunAction;
+
+namespace G4UA
+{
+
+  /// @class IG4RunActionTool
+  /// @brief Abstract interface for tools that construct G4 run actions.
+  ///
+  /// @author Steve Farrell <Steven.Farrell@cern.ch>
+  ///
+  class IG4RunActionTool : virtual public IAlgTool
+  {
+
+    public:
+
+      /// Return the action for current thread.
+      virtual G4UserRunAction* getRunAction() = 0;
+
+      /// Interface declaration
+      static const InterfaceID& interfaceID() {
+        static const InterfaceID iid_IG4RunTool("G4UA::IG4RunActionTool", 1, 0);
+        return iid_IG4RunTool;
+      }
+
+  }; // class IG4RunActionTool
+
+} // namespace G4UA
+
+#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4StackingActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4StackingActionTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..32ec73bacced6172451860874cedc232e6d7b6e0
--- /dev/null
+++ b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4StackingActionTool.h
@@ -0,0 +1,40 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef G4ATLASINTERFACES__G4UA_IG4STACKINGACTIONTOOL_H
+#define G4ATLASINTERFACES__G4UA_IG4STACKINGACTIONTOOL_H
+
+// Framework includes
+#include "GaudiKernel/IAlgTool.h"
+
+// Forward declarations
+class G4UserStackingAction;
+
+namespace G4UA
+{
+
+  /// @class IG4StackingActionTool
+  /// @brief Abstract interface for tools that construct G4 stacking actions.
+  ///
+  /// @author Steve Farrell <Steven.Farrell@cern.ch>
+  ///
+  class IG4StackingActionTool : virtual public IAlgTool
+  {
+    
+    public:
+
+      /// @brief Return the action for current thread.
+      virtual G4UserStackingAction* getStackingAction() = 0;
+
+      /// Interface declaration
+      static const InterfaceID& interfaceID() {
+        static const InterfaceID iid_IStepTool("G4UA::IG4StackingActionTool", 1, 0);
+        return iid_IStepTool;
+      }
+
+  }; // class IG4StackingActionTool
+
+} // namespace G4UA
+
+#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4SteppingActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4SteppingActionTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..0e8567f44f49e75ddbcbd508b3e40f8c4fde8e2e
--- /dev/null
+++ b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4SteppingActionTool.h
@@ -0,0 +1,40 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef G4ATLASINTERFACES__G4UA_IG4STEPPINGACTIONTOOL_H
+#define G4ATLASINTERFACES__G4UA_IG4STEPPINGACTIONTOOL_H
+
+// Framework includes
+#include "GaudiKernel/IAlgTool.h"
+
+// Forward declarations
+class G4UserSteppingAction;
+
+namespace G4UA
+{
+
+  /// @class IG4SteppingActionTool
+  /// @brief Abstract interface for tools that construct G4 stepping actions.
+  ///
+  /// @author Steve Farrell <Steven.Farrell@cern.ch>
+  ///
+  class IG4SteppingActionTool : virtual public IAlgTool
+  {
+    
+    public:
+
+      /// @brief Return the action for current thread.
+      virtual G4UserSteppingAction* getSteppingAction() = 0;
+
+      /// Interface declaration
+      static const InterfaceID& interfaceID() {
+        static const InterfaceID iid_IStepTool("G4UA::IG4SteppingActionTool", 1, 0);
+        return iid_IStepTool;
+      }
+
+  }; // class IG4SteppingActionTool
+
+} // namespace G4UA
+
+#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4TrackingActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4TrackingActionTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..d0797153f8d1f14cd6f8d3bfd386f3acd003195a
--- /dev/null
+++ b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IG4TrackingActionTool.h
@@ -0,0 +1,40 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef G4ATLASINTERFACES__G4UA_IG4TRACKINGACTIONTOOL_H
+#define G4ATLASINTERFACES__G4UA_IG4TRACKINGACTIONTOOL_H
+
+// Framework includes
+#include "GaudiKernel/IAlgTool.h"
+
+// Forward declarations
+class G4UserTrackingAction;
+
+namespace G4UA
+{
+
+  /// @class IG4TrackingActionTool
+  /// @brief Abstract interface for tools that construct G4 tracking actions.
+  ///
+  /// @author Steve Farrell <Steven.Farrell@cern.ch>
+  ///
+  class IG4TrackingActionTool : virtual public IAlgTool
+  {
+
+    public:
+
+      /// Return the action for current thread.
+      virtual G4UserTrackingAction* getTrackingAction() = 0;
+
+      /// Interface declaration
+      static const InterfaceID& interfaceID() {
+        static const InterfaceID iid_IG4TrkTool("G4UA::IG4TrackingActionTool", 1, 0);
+        return iid_IG4TrkTool;
+      }
+
+  }; // class IG4TrackingActionTool
+
+} // namespace G4UA
+
+#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPostTrackingAction.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPostTrackingAction.h
deleted file mode 100644
index 9e8a0a47d2864c7bec35261e7a0f1f88a322a7f6..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPostTrackingAction.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IPOSTTRACKINGACTION_H
-#define G4ATLASINTERFACES__G4UA_IPOSTTRACKINGACTION_H
-
-// Forward declarations
-class G4Track;
-
-namespace G4UA
-{
-
-  /// Simple interface for an ATLAS post-tracking action
-  class IPostTrackingAction
-  {
-    public:
-      /// Virtual destructor
-      virtual ~IPostTrackingAction(){};
-      /// Method called before tracking a particle
-      virtual void postTracking(const G4Track*) = 0;
-  };
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPostTrackingActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPostTrackingActionTool.h
deleted file mode 100644
index 02fc98529ee505a9866d7197205fcee8dca5ab6b..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPostTrackingActionTool.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IPOSTTRACKINGACTIONTOOL_H
-#define G4ATLASINTERFACES__G4UA_IPOSTTRACKINGACTIONTOOL_H
-
-// Framework includes
-#include "GaudiKernel/IAlgTool.h"
-
-// Local includes
-#include "G4AtlasInterfaces/IPostTrackingAction.h"
-
-namespace G4UA
-{
-
-  /// @class IPostTrackingActionTool
-  /// @brief Abstract interface for tools that manage ATLAS post-tracking
-  /// actions.
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  ///
-  class IPostTrackingActionTool : virtual public IAlgTool
-  {
-
-    public:
-
-      /// Return the action for current thread.
-      virtual IPostTrackingAction* getPostTrackingAction() = 0;
-
-      /// Interface declaration
-      static const InterfaceID& interfaceID() {
-        static const InterfaceID iid_IPostTrkTool("G4UA::IPostTrackingActionTool", 1, 0);
-        return iid_IPostTrkTool;
-      }
-
-  }; // class IPostTrackingActionTool
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPreTrackingAction.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPreTrackingAction.h
deleted file mode 100644
index 1ae57e2e8af5ef65b6dd922c4fad4a675d3941a3..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPreTrackingAction.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IPRETRACKINGACTION_H
-#define G4ATLASINTERFACES__G4UA_IPRETRACKINGACTION_H
-
-// Forward declarations
-class G4Track;
-
-namespace G4UA
-{
-
-  /// Simple interface for an ATLAS pre-tracking action
-  class IPreTrackingAction
-  {
-    public:
-      /// Virtual destructor
-      virtual ~IPreTrackingAction(){};
-      /// Method called before tracking a particle
-      virtual void preTracking(const G4Track*) = 0;
-  };
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPreTrackingActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPreTrackingActionTool.h
deleted file mode 100644
index 90f45d729cb9d1f4ab264e1288517d6dd6157eab..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IPreTrackingActionTool.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_IPRETRACKINGACTIONTOOL_H
-#define G4ATLASINTERFACES__G4UA_IPRETRACKINGACTIONTOOL_H
-
-// Framework includes
-#include "GaudiKernel/IAlgTool.h"
-
-// Local includes
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
-
-namespace G4UA
-{
-
-  /// @class IPreTrackingActionTool
-  /// @brief Abstract interface for tools that manage ATLAS pre-tracking
-  /// actions.
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  ///
-  class IPreTrackingActionTool : virtual public IAlgTool
-  {
-
-    public:
-
-      /// Return the action for current thread.
-      virtual IPreTrackingAction* getPreTrackingAction() = 0;
-
-      /// Interface declaration
-      static const InterfaceID& interfaceID() {
-        static const InterfaceID iid_IPreTrkTool("G4UA::IPreTrackingActionTool", 1, 0);
-        return iid_IPreTrkTool;
-      }
-
-  }; // class IPreTrackingActionTool
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IStackingAction.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IStackingAction.h
deleted file mode 100644
index 54e6be2ae0fa4d7581dcc18ddbd471f9e89244f8..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IStackingAction.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_ISTACKINGACTION_H
-#define G4ATLASINTERFACES__G4UA_ISTACKINGACTION_H
-
-// Geant4 includes
-#include "G4ClassificationOfNewTrack.hh"
-
-// Forward declarations
-class G4Track;
-
-namespace G4UA
-{
-
-  /// @class IStackingAction
-  /// @brief Simple interface class for an ATLAS stacking action.
-  /// Controls the stacks (i.e. priority queues) of G4Track objects.
-  /// Follows the methodology of the G4UserStackingAction:
-  /// http://www-geant4.kek.jp/lxr/source/event/include/G4UserStackingAction.hh
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  /// 
-  class IStackingAction
-  {
-    public:
-      /// Virtual destructor
-      virtual ~IStackingAction(){};
-
-      /// @brief Assigns a classification to a new track.
-      /// Result can be fUrgent, fWaiting, fPostpone, or fKill.
-      virtual G4ClassificationOfNewTrack classifyNewTrack(const G4Track* track) = 0;
-
-      /// @brief Called when starting the next priority queue.
-      /// The waiting stack gets moved into the urgent stack.
-      virtual void newStage() = 0;
-
-      /// @brief Invoked by stack manager at new event.
-      /// This method is possibly redundant so we could maybe remove it.
-      virtual void prepareNewEvent() = 0;
-  };
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IStackingActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IStackingActionTool.h
deleted file mode 100644
index ffad671818e666b77eb4cd765c864a6c9852eefa..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/IStackingActionTool.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_ISTACKINGACTIONTOOL_H
-#define G4ATLASINTERFACES__G4UA_ISTACKINGACTIONTOOL_H
-
-// Framework includes
-#include "GaudiKernel/IAlgTool.h"
-
-// Local includes
-#include "G4AtlasInterfaces/IStackingAction.h"
-
-namespace G4UA
-{
-
-  /// @class IStackingActionTool
-  /// @brief Abstract interface for tools that manage ATLAS stacking actions.
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  ///
-  class IStackingActionTool : virtual public IAlgTool
-  {
-    
-    public:
-
-      /// @brief Return the action for current thread.
-      virtual IStackingAction* getStackingAction() = 0;
-
-      /// Interface declaration
-      static const InterfaceID& interfaceID() {
-        static const InterfaceID iid_IStepTool("G4UA::IStackingActionTool", 1, 0);
-        return iid_IStepTool;
-      }
-
-  }; // class IStackingActionTool
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/ISteppingAction.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/ISteppingAction.h
deleted file mode 100644
index 60acb6e184e4a98c498faf17a680db2c487e243d..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/ISteppingAction.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_ISTEPPINGACTION_H
-#define G4ATLASINTERFACES__G4UA_ISTEPPINGACTION_H
-
-// Forward declarations
-class G4Step;
-
-namespace G4UA
-{
-
-  /// Simple interface class for an ATLAS stepping action
-  class ISteppingAction
-  {
-    public:
-      /// Virtual destructor
-      virtual ~ISteppingAction(){};
-      /// Method called at every step for processing
-      virtual void processStep(const G4Step*) = 0;
-  };
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/ISteppingActionTool.h b/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/ISteppingActionTool.h
deleted file mode 100644
index 47769b4d037bfb7758558a58700ffb9d3ce06822..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/G4AtlasInterfaces/ISteppingActionTool.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef G4ATLASINTERFACES__G4UA_ISTEPPINGACTIONTOOL_H
-#define G4ATLASINTERFACES__G4UA_ISTEPPINGACTIONTOOL_H
-
-// Framework includes
-#include "GaudiKernel/IAlgTool.h"
-
-// Local includes
-#include "G4AtlasInterfaces/ISteppingAction.h"
-
-namespace G4UA
-{
-
-  /// @class ISteppingActionTool
-  /// @brief Abstract interface for tools that manage ATLAS stepping actions.
-  ///
-  /// @author Steve Farrell <Steven.Farrell@cern.ch>
-  ///
-  class ISteppingActionTool : virtual public IAlgTool
-  {
-    
-    public:
-
-      /// @brief Return the action for current thread.
-      virtual ISteppingAction* getSteppingAction() = 0;
-
-      /// Interface declaration
-      static const InterfaceID& interfaceID() {
-        static const InterfaceID iid_IStepTool("G4UA::ISteppingActionTool", 1, 0);
-        return iid_IStepTool;
-      }
-
-  }; // class ISteppingActionTool
-
-} // namespace G4UA
-
-#endif
diff --git a/Simulation/G4Atlas/G4AtlasInterfaces/cmt/requirements b/Simulation/G4Atlas/G4AtlasInterfaces/cmt/requirements
deleted file mode 100644
index 7417553dbae39476a49ff4fb073edc31a7d23c26..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasInterfaces/cmt/requirements
+++ /dev/null
@@ -1,10 +0,0 @@
-package G4AtlasInterfaces
-
-use AtlasPolicy      AtlasPolicy-*
-
-use GaudiInterface   GaudiInterface-*    External
-
-use Geant4           Geant4-*            External
-
-# Declare an interface library for CMake:
-apply_pattern cmake_add_command command=metalibrary
diff --git a/Simulation/G4Atlas/G4AtlasServices/cmt/requirements b/Simulation/G4Atlas/G4AtlasServices/cmt/requirements
deleted file mode 100644
index b752ff525c4ae0c854e6a3b34ee2ff9ecb63d641..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasServices/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package G4AtlasServices
-
-# Required for every package
-use AtlasPolicy         AtlasPolicy-*
-
-# Member variables
-use GaudiInterface      GaudiInterface-*        External
-
-private
-# Base classes when the headers are in the src area
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-use G4AtlasTools        G4AtlasTools-*          Simulation/G4Atlas
-use Geant4              Geant4-*                External
-use CxxUtils            CxxUtils-*              Control
-use AtlasTBB            AtlasTBB-*              External
-use MagFieldInterfaces  MagFieldInterfaces-*    MagneticField
-end_private
-
-apply_pattern declare_python_modules files="*.py"
-
-library G4AtlasServices *.cxx components/*.cxx
-apply_pattern component_library
-
-# Install run-time files
-apply_pattern declare_joboptions files="-s=../share *.py"
-
diff --git a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfig.py b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfig.py
index eedebe58c15a950ee26b1e30cd6c1fd08a4cc633..75fc32cf155988e8611177d7d509115acd593b9d 100644
--- a/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfig.py
+++ b/Simulation/G4Atlas/G4AtlasServices/python/G4AtlasUserActionConfig.py
@@ -4,8 +4,8 @@ from AthenaCommon import CfgGetter,CfgMgr,Logging
 
 # Common methods to return default UserAction(Tool)s
 
-# actions to be run at begin of run
-def getDefaultBoRActions():
+# actions to be run at begin/end of run
+def getDefaultRunActions():
     from G4AtlasApps.SimFlags import simFlags
     defaultUA=[]
     #if not  simFlags.ISFRun:
@@ -14,17 +14,8 @@ def getDefaultBoRActions():
         defaultUA+=['G4UA::StoppedParticleActionTool']
     return defaultUA
 
-# actions to be run at end of run
-def getDefaultEoRActions():
-    from G4AtlasApps.SimFlags import simFlags
-    from AthenaCommon.BeamFlags import jobproperties
-    defaultUA=[]
-    if hasattr(simFlags, 'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn:
-        defaultUA+=['G4UA::StoppedParticleActionTool']
-    return defaultUA
-
 # begin of event
-def getDefaultBoEActions():
+def getDefaultEventActions():
     from G4AtlasApps.SimFlags import simFlags
     from AthenaCommon.BeamFlags import jobproperties
     defaultUA=[]
@@ -32,29 +23,17 @@ def getDefaultBoEActions():
         defaultUA+=['G4UA::G4SimTimerTool']
         defaultUA+=['G4UA::MCTruthSteppingActionTool']
     defaultUA+=['G4UA::G4TrackCounterTool']
-
+    if hasattr(simFlags, 'CavernBG') and simFlags.CavernBG.statusOn and simFlags.CavernBG.get_Value() == 'Read':
+        defaultUA+=['G4UA::HitWrapperTool']
     if jobproperties.Beam.beamType() == 'cosmics' and hasattr(simFlags, 'CavernBG') and not simFlags.CavernBG.statusOn:
         defaultUA+=['G4UA::CosmicPerigeeActionTool']
     if hasattr(simFlags, 'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn:
         defaultUA+=['G4UA::StoppedParticleActionTool']
-    if hasattr(simFlags, 'CalibrationRun') and simFlags.CalibrationRun() == 'LAr+Tile':
-        defaultUA+=['G4UA::CaloG4::CalibrationDefaultProcessingTool']
-    return defaultUA
-
-# end of event
-def getDefaultEoEActions():
-    from G4AtlasApps.SimFlags import simFlags
-    from AthenaCommon.BeamFlags import jobproperties
-    defaultUA=[]
-    if not simFlags.ISFRun:
-        defaultUA+=['G4UA::G4SimTimerTool']
-    if hasattr(simFlags, 'CavernBG') and simFlags.CavernBG.statusOn and simFlags.CavernBG.get_Value() == 'Read':
-        defaultUA+=['G4UA::HitWrapperTool']
-    if hasattr(simFlags,'StoppedParticleFile') and simFlags.StoppedParticleFile.statusOn:
-        defaultUA+=['G4UA::StoppedParticleActionTool']
         defaultUA+=['G4UA::G4CosmicFilterTool']
     if jobproperties.Beam.beamType() == 'cosmics' and not simFlags.ISFRun:
         defaultUA+=['G4UA::G4CosmicFilterTool']
+    if hasattr(simFlags, 'CalibrationRun') and simFlags.CalibrationRun() == 'LAr+Tile':
+        defaultUA+=['G4UA::CaloG4::CalibrationDefaultProcessingTool']
     return defaultUA
 
 # stepping
@@ -72,8 +51,8 @@ def getDefaultSteppingActions():
         defaultUA+=['G4UA::PhotonKillerTool']
     return defaultUA
 
-# PreUserTracking
-def getDefaultBoTActions():
+# tracking
+def getDefaultTrackingActions():
     from G4AtlasApps.SimFlags import simFlags
     defaultUA=[]
     if not simFlags.ISFRun:
@@ -81,29 +60,12 @@ def getDefaultBoTActions():
     defaultUA+=['G4UA::G4TrackCounterTool']
     return defaultUA
 
-# PostUserTracking
-def getDefaultEoTActions():
-    from G4AtlasApps.SimFlags import simFlags
-    defaultUA=[]
-    if not simFlags.ISFRun:
-        defaultUA+=['G4UA::AthenaTrackingActionTool']
-    return defaultUA
-
 # Stacking Classification
 def getDefaultStackingActions():
     defaultUA=[]
     defaultUA+=['G4UA::AthenaStackingActionTool']
     return defaultUA
 
-# Stacking PrepareNewEvent
-def getDefaultStaPrepareActions():
-    return []
-
-# Stacking NewStage
-def getDefaultStaNewStageActions():
-    return []
-
-
 def getUserActionSvc(name="G4UA::UserActionSvc", **kwargs):
     """
     Get the standard UA svc configurable with all default actions added.
@@ -112,13 +74,15 @@ def getUserActionSvc(name="G4UA::UserActionSvc", **kwargs):
 
     from G4AtlasApps.SimFlags import simFlags
 
-    kwargs.setdefault('BeginRunActionTools', getDefaultBoRActions()+simFlags.OptionalUserActionList.get_Value()['BeginOfRun'])
-    kwargs.setdefault('EndRunActionTools', getDefaultEoRActions()+simFlags.OptionalUserActionList.get_Value()['EndOfRun'])
-    kwargs.setdefault('BeginEventActionTools', getDefaultBoEActions()+simFlags.OptionalUserActionList.get_Value()['BeginOfEvent'])
-    kwargs.setdefault('EndEventActionTools', getDefaultEoEActions()+simFlags.OptionalUserActionList.get_Value()['EndOfEvent'])
-    kwargs.setdefault('SteppingActionTools', getDefaultSteppingActions()+simFlags.OptionalUserActionList.get_Value()['Step'])
-    kwargs.setdefault('PreTrackingActionTools', getDefaultBoTActions()+simFlags.OptionalUserActionList.get_Value()['PreTracking'])
-    kwargs.setdefault('PostTrackingActionTools', getDefaultEoTActions()+simFlags.OptionalUserActionList.get_Value()['PostTracking'])
+    optionalActions = simFlags.OptionalUserActionList
+    kwargs.setdefault('RunActionTools',
+        getDefaultRunActions() + optionalActions.get_Value()['Run'])
+    kwargs.setdefault('EventActionTools',
+        getDefaultEventActions() + optionalActions.get_Value()['Event'])
+    kwargs.setdefault('SteppingActionTools',
+        getDefaultSteppingActions() + optionalActions.get_Value()['Step'])
+    kwargs.setdefault('TrackingActionTools',
+        getDefaultTrackingActions() + optionalActions.get_Value()['Tracking'])
     # no optional actions for stacking
     kwargs.setdefault('StackingActionTools', getDefaultStackingActions())
 
@@ -127,13 +91,11 @@ def getUserActionSvc(name="G4UA::UserActionSvc", **kwargs):
 
 def getCTBUserActionSvc(name="G4UA::CTBUserActionSvc", **kwargs):
     from G4AtlasApps.SimFlags import simFlags
-    bor = getDefaultBoRActions()+simFlags.OptionalUserActionList.get_Value()['BeginOfRun']
-    eor = getDefaultEoRActions()+simFlags.OptionalUserActionList.get_Value()['EndOfRun']
-    boe = getDefaultBoEActions()+simFlags.OptionalUserActionList.get_Value()['BeginOfEvent']
-    eoe = getDefaultEoEActions()+simFlags.OptionalUserActionList.get_Value()['EndOfEvent']
-    bot = getDefaultBoTActions()+simFlags.OptionalUserActionList.get_Value()['PreTracking']
-    eot = getDefaultEoTActions()+simFlags.OptionalUserActionList.get_Value()['PostTracking']
-    stepping = getDefaultSteppingActions()+simFlags.OptionalUserActionList.get_Value()['Step']
+    optionalActions = simFlags.OptionalUserActionList
+    run = getDefaultRunActions() + optionalActions.get_Value()['Run']
+    event = getDefaultEventActions() + optionalActions.get_Value()['Event']
+    tracking = getDefaultTrackingActions() + optionalActions.get_Value()['Tracking']
+    stepping = getDefaultSteppingActions() + optionalActions.get_Value()['Step']
     stacking = getDefaultStackingActions()
 
     # FIXME: ADS these actions are not yet migrated to Hive
@@ -143,17 +105,14 @@ def getCTBUserActionSvc(name="G4UA::CTBUserActionSvc", **kwargs):
     #    if simFlags.LArTB_H6Step.statusOn:
     #        if simFlags.LArTB_H6Step.get_Value():
     #            stepping+=['LArGeoH62004SteppingAction']
-    #            boe+=['RadLenNtuple']
+    #            event+=['RadLenNtuple']
     #            eoe+=['RadLenNtuple']
     #            stepping+=['RadLenNtuple']
 
-    kwargs.setdefault('BeginRunActionTools', bor)
-    kwargs.setdefault('EndRunActionTools', eor)
-    kwargs.setdefault('BeginEventActionTools', boe)
-    kwargs.setdefault('EndEventActionTools', eoe)
+    kwargs.setdefault('RunActionTools', run)
+    kwargs.setdefault('EventActionTools', event)
     kwargs.setdefault('SteppingActionTools', stepping)
-    kwargs.setdefault('PreTrackingActionTools', bot)
-    kwargs.setdefault('PostTrackingActionTools', eot)
+    kwargs.setdefault('TrackingActionTools', tracking)
     kwargs.setdefault('StackingActionTools', stacking)
 
     # placeholder for more advanced config, if needed
@@ -166,22 +125,22 @@ def getISFUserActionSvc(name="G4UA::ISFUserActionSvc", **kwargs):
     MCTruthUserAction = kwargs.pop('MCTruthUserAction',['ISFMCTruthUserActionTool'])
 
     from G4AtlasApps.SimFlags import simFlags
-    bor = getDefaultBoRActions()+simFlags.OptionalUserActionList.get_Value()['BeginOfRun'] + PhysicsValidationUserAction
-    eor = getDefaultEoRActions()+simFlags.OptionalUserActionList.get_Value()['EndOfRun']
-    boe = getDefaultBoEActions()+simFlags.OptionalUserActionList.get_Value()['BeginOfEvent'] + TrackProcessorUserAction + PhysicsValidationUserAction
-    eoe = getDefaultEoEActions()+simFlags.OptionalUserActionList.get_Value()['EndOfEvent'] + TrackProcessorUserAction + PhysicsValidationUserAction
-    bot = TrackProcessorUserAction + MCTruthUserAction + getDefaultBoTActions()+simFlags.OptionalUserActionList.get_Value()['PreTracking'] + PhysicsValidationUserAction
-    eot = TrackProcessorUserAction + MCTruthUserAction + getDefaultEoTActions()+simFlags.OptionalUserActionList.get_Value()['PostTracking']
-    stepping = getDefaultSteppingActions()+simFlags.OptionalUserActionList.get_Value()['Step'] + TrackProcessorUserAction + PhysicsValidationUserAction
+    optionalActions = simFlags.OptionalUserActionList
+    run = (getDefaultRunActions() + optionalActions.get_Value()['Run'] +
+           PhysicsValidationUserAction)
+    event = (getDefaultEventActions() + optionalActions.get_Value()['Event'] +
+             TrackProcessorUserAction + PhysicsValidationUserAction)
+    tracking = (TrackProcessorUserAction + MCTruthUserAction +
+                getDefaultTrackingActions() + optionalActions.get_Value()['Tracking'] +
+                PhysicsValidationUserAction)
+    stepping = (getDefaultSteppingActions() + optionalActions.get_Value()['Step'] +
+                TrackProcessorUserAction + PhysicsValidationUserAction)
     stacking = getDefaultStackingActions()
 
-    kwargs.setdefault('BeginRunActionTools', bor)
-    kwargs.setdefault('EndRunActionTools', eor)
-    kwargs.setdefault('BeginEventActionTools', boe)
-    kwargs.setdefault('EndEventActionTools', eoe)
+    kwargs.setdefault('RunActionTools', run)
+    kwargs.setdefault('EventActionTools', event)
     kwargs.setdefault('SteppingActionTools', stepping)
-    kwargs.setdefault('PreTrackingActionTools', bot)
-    kwargs.setdefault('PostTrackingActionTools', eot)
+    kwargs.setdefault('TrackingActionTools', tracking)
     kwargs.setdefault('StackingActionTools', stacking)
 
     return CfgMgr.G4UA__UserActionSvc(name, **kwargs)
@@ -234,12 +193,9 @@ def addAction(actionTool, roles, systemAction=False):
 
     from AthenaCommon.AppMgr import theApp, AthAppMgr, ServiceMgr
 
-    roleMap={'BeginOfRun': 'BeginRunActionTools',
-             'EndOfRun': 'EndRunActionTools',
-             'BeginOfEvent': 'BeginEventActionTools',
-             'EndOfEvent': 'EndEventActionTools',
-             'BeginOfTracking': 'PreTrackingActionTools',
-             'EndOfTracking': 'PostTrackingActionTools',
+    roleMap={'Run': 'RunActionTools',
+             'Event': 'EventActionTools',
+             'Tracking': 'TrackingActionTools',
              'Step': 'SteppingActionTools',
              'Stack': 'StackingActionTools'}
 
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/DetectorGeometrySvc.cxx b/Simulation/G4Atlas/G4AtlasServices/src/DetectorGeometrySvc.cxx
index db6d814979c799b6c21bd001a5a7a9f76035a822..23b9635936767dddaf0936d7d209d80cf7a5bedf 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/DetectorGeometrySvc.cxx
+++ b/Simulation/G4Atlas/G4AtlasServices/src/DetectorGeometrySvc.cxx
@@ -25,10 +25,10 @@
 
 DetectorGeometrySvc::DetectorGeometrySvc( const std::string& name, ISvcLocator* pSvcLocator )
   : AthService(name,pSvcLocator),
-    m_detTool(""),
-    m_detConstruction(""),
-    m_regionCreators(),
-    m_parallelWorlds(),
+    m_detTool("",this),
+    m_detConstruction("",this),
+    m_regionCreators(this),
+    m_parallelWorlds(this),
     m_fieldManagers(this),
     m_activateParallelWorlds(false)
 {
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasEventAction.cxx b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasEventAction.cxx
index 8f161365acb313c879e40d01f6d797e69ddd48c2..0922c2350f1bfa65bc0f7fa65f0351554c192d2f 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasEventAction.cxx
+++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasEventAction.cxx
@@ -21,8 +21,8 @@ namespace G4UA
   void G4AtlasEventAction::BeginOfEventAction(const G4Event* event)
   {
     // Loop over my pre-actions and apply each one in turn
-    for(IBeginEventAction* action : m_beginEventActions){
-      action->beginOfEvent(event);
+    for(auto action : m_eventActions){
+      action->BeginOfEventAction(event);
     }
   }
 
@@ -32,25 +32,17 @@ namespace G4UA
   void G4AtlasEventAction::EndOfEventAction(const G4Event* event)
   {
     // Loop over my post-actions and apply each one in turn
-    for(IEndEventAction* action : m_endEventActions){
-      action->endOfEvent(event);
+    for(auto action : m_eventActions){
+      action->EndOfEventAction(event);
     }
   }
 
   //---------------------------------------------------------------------------
   // Add one action to the list
   //---------------------------------------------------------------------------
-  void G4AtlasEventAction::addBeginEventAction(IBeginEventAction* action)
+  void G4AtlasEventAction::addEventAction(G4UserEventAction* action)
   {
-    m_beginEventActions.push_back(action);
-  }
-
-  //---------------------------------------------------------------------------
-  // Add one action to the list
-  //---------------------------------------------------------------------------
-  void G4AtlasEventAction::addEndEventAction(IEndEventAction* action)
-  {
-    m_endEventActions.push_back(action);
+    m_eventActions.push_back(action);
   }
 
 } // namespace G4UA
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasEventAction.h b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasEventAction.h
index 749ebac839e23b88c1c081833020f947384f678e..65d1b6b2bcf00a52ab85f18d7b14d402726926e2 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasEventAction.h
+++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasEventAction.h
@@ -11,10 +11,6 @@
 // Geant4 includes
 #include "G4UserEventAction.hh"
 
-// Local includes
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-
 
 namespace G4UA
 {
@@ -25,6 +21,8 @@ namespace G4UA
   /// Maintains a list of custom actions for the beginning and end of an event
   /// and when invoked by Geant4 will forward the call to each of them in turn.
   ///
+  /// @todo TODO lifetime management of wrapper actions.
+  ///
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class G4AtlasEventAction : public G4UserEventAction
@@ -46,18 +44,12 @@ namespace G4UA
       void EndOfEventAction(const G4Event* event) override final;
 
       /// Add one action to the list
-      void addBeginEventAction(IBeginEventAction* action);
-
-      /// Add one action to the list
-      void addEndEventAction(IEndEventAction* action);
+      void addEventAction(G4UserEventAction* action);
 
     private:
 
-      /// List of ATLAS begin-event actions
-      std::vector<IBeginEventAction*> m_beginEventActions;
-
-      /// List of ATLAS end-event actions
-      std::vector<IEndEventAction*> m_endEventActions;
+      /// List of ATLAS event actions
+      std::vector<G4UserEventAction*> m_eventActions;
 
   }; // class G4AtlasEventAction
 
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasRunAction.cxx b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasRunAction.cxx
index 4761cfee7b70631385a5744bad0db37f38c6b141..152bfd10cf46daa5953b4cd9ada48f4a6c3815f4 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasRunAction.cxx
+++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasRunAction.cxx
@@ -21,8 +21,8 @@ namespace G4UA
   void G4AtlasRunAction::BeginOfRunAction(const G4Run* run)
   {
     // Loop over my pre-actions and apply each one in turn
-    for(IBeginRunAction* action : m_beginRunActions){
-      action->beginOfRun(run);
+    for(auto action : m_runActions){
+      action->BeginOfRunAction(run);
     }
   }
 
@@ -32,25 +32,17 @@ namespace G4UA
   void G4AtlasRunAction::EndOfRunAction(const G4Run* run)
   {
     // Loop over my post-actions and apply each one in turn
-    for(IEndRunAction* action : m_endRunActions){
-      action->endOfRun(run);
+    for(auto action : m_runActions){
+      action->EndOfRunAction(run);
     }
   }
 
   //---------------------------------------------------------------------------
   // Add one action to the list
   //---------------------------------------------------------------------------
-  void G4AtlasRunAction::addBeginRunAction(IBeginRunAction* action)
+  void G4AtlasRunAction::addRunAction(G4UserRunAction* action)
   {
-    m_beginRunActions.push_back(action);
-  }
-
-  //---------------------------------------------------------------------------
-  // Add one action to the list
-  //---------------------------------------------------------------------------
-  void G4AtlasRunAction::addEndRunAction(IEndRunAction* action)
-  {
-    m_endRunActions.push_back(action);
+    m_runActions.push_back(action);
   }
 
 } // namespace G4UA
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasRunAction.h b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasRunAction.h
index 86919ab6fb059a2bb2dbace38828a8ba842e40a0..6fe73d30e1df1f08b662d15951b53489d0e8f46e 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasRunAction.h
+++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasRunAction.h
@@ -11,10 +11,6 @@
 // Geant4 includes
 #include "G4UserRunAction.hh"
 
-// Local includes
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-
 
 namespace G4UA
 {
@@ -25,6 +21,8 @@ namespace G4UA
   /// Maintains a list of custom actions for the beginning and end of an run
   /// and when invoked by Geant4 will forward the call to each of them in turn.
   ///
+  /// @todo TODO lifetime management of wrapper actions.
+  ///
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class G4AtlasRunAction : public G4UserRunAction
@@ -46,18 +44,12 @@ namespace G4UA
       void EndOfRunAction(const G4Run* run) override final;
 
       /// Add one action to the list
-      void addBeginRunAction(IBeginRunAction* action);
-
-      /// Add one action to the list
-      void addEndRunAction(IEndRunAction* action);
+      void addRunAction(G4UserRunAction* action);
 
     private:
 
-      /// List of ATLAS begin-run actions
-      std::vector<IBeginRunAction*> m_beginRunActions;
-
-      /// List of ATLAS end-run actions
-      std::vector<IEndRunAction*> m_endRunActions;
+      /// List of ATLAS run actions
+      std::vector<G4UserRunAction*> m_runActions;
 
   }; // class G4AtlasRunAction
 
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasStackingAction.cxx b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasStackingAction.cxx
index 60f13c031b15c38235b897182a435c8b0940202f..a9f99e61ce5d51e148085687aadf3041e97347d9 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasStackingAction.cxx
+++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasStackingAction.cxx
@@ -4,7 +4,6 @@
 
 // Local includes
 #include "G4AtlasStackingAction.h"
-#include "G4AtlasInterfaces/IStackingAction.h"
 
 namespace G4UA
 {
@@ -26,8 +25,8 @@ namespace G4UA
     // TODO: decide how to properly handle multiple stacking action results.
     // Maybe we just need to forbid it. See ATLASSIM-2421.
     G4ClassificationOfNewTrack classification = fUrgent;
-    for(IStackingAction* action : m_actions){
-      classification = action->classifyNewTrack(track);
+    for(auto action : m_actions){
+      classification = action->ClassifyNewTrack(track);
       if(classification == fKill) return fKill;
     }
     return classification;
@@ -39,8 +38,8 @@ namespace G4UA
   void G4AtlasStackingAction::NewStage()
   {
     // Loop over my actions and apply each one in turn
-    for(IStackingAction* action : m_actions){
-      action->newStage();
+    for(auto action : m_actions){
+      action->NewStage();
     }
   }
 
@@ -50,15 +49,15 @@ namespace G4UA
   void G4AtlasStackingAction::PrepareNewEvent()
   {
     // Loop over my actions and apply each one in turn
-    for(IStackingAction* action : m_actions){
-      action->prepareNewEvent();
+    for(auto action : m_actions){
+      action->PrepareNewEvent();
     }
   }
 
   //---------------------------------------------------------------------------
   // Add one action to the action list
   //---------------------------------------------------------------------------
-  void G4AtlasStackingAction::addAction(IStackingAction* action)
+  void G4AtlasStackingAction::addAction(G4UserStackingAction* action)
   {
     m_actions.push_back(action);
   }
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasStackingAction.h b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasStackingAction.h
index be581251ee71c0c43d7c102915ed779975fdf1e1..a8623f2d5908038a3594696b8b7e1100c8d93551 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasStackingAction.h
+++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasStackingAction.h
@@ -15,16 +15,14 @@
 namespace G4UA
 {
 
-  // Forward declarations
-  class IStackingAction;
-
-
   /// @class G4AtlasStackingAction
   /// @brief Atlas subclass of the G4 stacking action.
   ///
   /// This object maintains a list of custom actions and when invoked by
   /// Geant4 will forward the call to each of them in turn.
   ///
+  /// @todo TODO lifetime management of wrapper actions.
+  ///
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class G4AtlasStackingAction : public G4UserStackingAction
@@ -50,12 +48,12 @@ namespace G4UA
       void PrepareNewEvent() override final;
 
       /// @brief Add one action to the list
-      void addAction(IStackingAction* action);
+      void addAction(G4UserStackingAction* action);
 
     private:
 
       /// List of ATLAS stacking actions
-      std::vector<IStackingAction*> m_actions;
+      std::vector<G4UserStackingAction*> m_actions;
 
   }; // class G4AtlasStackingAction
 
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSteppingAction.cxx b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSteppingAction.cxx
index 72ab2b6a9bb098f0f99b0c606e4641ba458f0942..896dc01ae0ee695571851054daa6ef50c7f600d8 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSteppingAction.cxx
+++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSteppingAction.cxx
@@ -4,7 +4,6 @@
 
 // Local includes
 #include "G4AtlasSteppingAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
 
 namespace G4UA
 {
@@ -22,15 +21,15 @@ namespace G4UA
   void G4AtlasSteppingAction::UserSteppingAction(const G4Step* step)
   {
     // Loop over my actions and apply each one in turn
-    for(ISteppingAction* action : m_actions){
-      action->processStep(step);
+    for(auto action : m_actions){
+      action->UserSteppingAction(step);
     }
   }
 
   //---------------------------------------------------------------------------
   // Add one action to the action list
   //---------------------------------------------------------------------------
-  void G4AtlasSteppingAction::addAction(ISteppingAction* action)
+  void G4AtlasSteppingAction::addAction(G4UserSteppingAction* action)
   {
     m_actions.push_back(action);
   }
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSteppingAction.h b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSteppingAction.h
index d8f902d9d12f8c62120f82b168bc7408f5355980..d2eaa567dacc7c3397171fa4edd95800e8037ffc 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSteppingAction.h
+++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasSteppingAction.h
@@ -15,16 +15,14 @@
 namespace G4UA
 {
 
-  // Forward declarations
-  class ISteppingAction;
-
-
   /// @class G4AtlasSteppingAction
   /// @brief Atlas subclass of the G4 stepping action.
   ///
   /// This object maintains a list of custom actions and when invoked by
   /// Geant4 will forward the call to each of them in turn.
   ///
+  /// @todo TODO lifetime management of wrapper actions.
+  ///
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class G4AtlasSteppingAction : public G4UserSteppingAction
@@ -41,12 +39,12 @@ namespace G4UA
       void UserSteppingAction(const G4Step* step) override final;
 
       /// @brief Add one action to the list
-      void addAction(ISteppingAction* action);
+      void addAction(G4UserSteppingAction* action);
 
     private:
 
       /// List of ATLAS stepping actions
-      std::vector<ISteppingAction*> m_actions;
+      std::vector<G4UserSteppingAction*> m_actions;
 
   }; // class G4AtlasSteppingAction
 
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasTrackingAction.cxx b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasTrackingAction.cxx
index c3f6afebfb09c6630a490d4883316ac0510503a6..7e661d54914d0b5e1abeba580912b7aeaeee4edd 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasTrackingAction.cxx
+++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasTrackingAction.cxx
@@ -21,8 +21,8 @@ namespace G4UA
   void G4AtlasTrackingAction::PreUserTrackingAction(const G4Track* trk)
   {
     // Loop over my pre-actions and apply each one in turn
-    for(IPreTrackingAction* action : m_preTrackActions){
-      action->preTracking(trk);
+    for(auto action : m_trackActions){
+      action->PreUserTrackingAction(trk);
     }
   }
 
@@ -32,25 +32,17 @@ namespace G4UA
   void G4AtlasTrackingAction::PostUserTrackingAction(const G4Track* trk)
   {
     // Loop over my post-actions and apply each one in turn
-    for(IPostTrackingAction* action : m_postTrackActions){
-      action->postTracking(trk);
+    for(auto action : m_trackActions){
+      action->PostUserTrackingAction(trk);
     }
   }
 
   //---------------------------------------------------------------------------
   // Add one action to the list
   //---------------------------------------------------------------------------
-  void G4AtlasTrackingAction::addPreTrackAction(IPreTrackingAction* action)
+  void G4AtlasTrackingAction::addTrackAction(G4UserTrackingAction* action)
   {
-    m_preTrackActions.push_back(action);
-  }
-
-  //---------------------------------------------------------------------------
-  // Add one action to the list
-  //---------------------------------------------------------------------------
-  void G4AtlasTrackingAction::addPostTrackAction(IPostTrackingAction* action)
-  {
-    m_postTrackActions.push_back(action);
+    m_trackActions.push_back(action);
   }
 
 } // namespace G4UA
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasTrackingAction.h b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasTrackingAction.h
index b7c67958e8cd9219b8da073adae82d30c4f1bc12..2bd6a136f81a1bf629e13e6636e1bdab8e952dfd 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasTrackingAction.h
+++ b/Simulation/G4Atlas/G4AtlasServices/src/G4AtlasTrackingAction.h
@@ -11,11 +11,6 @@
 // Geant4 includes
 #include "G4UserTrackingAction.hh"
 
-// Local includes
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
-#include "G4AtlasInterfaces/IPostTrackingAction.h"
-
-
 namespace G4UA
 {
 
@@ -25,6 +20,8 @@ namespace G4UA
   /// Maintains a list of custom tracking actions and when invoked by
   /// Geant4 will forard the call to each of them in turn.
   ///
+  /// @todo TODO lifetime management of wrapper actions.
+  ///
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class G4AtlasTrackingAction : public G4UserTrackingAction
@@ -46,18 +43,12 @@ namespace G4UA
       void PostUserTrackingAction(const G4Track* trk) override final;
 
       /// @brief Add one action to the list
-      void addPreTrackAction(IPreTrackingAction* action);
-
-      /// @brief Add one action to the list
-      void addPostTrackAction(IPostTrackingAction* action);
+      void addTrackAction(G4UserTrackingAction* action);
 
     private:
 
-      /// List of ATLAS pre-tracking actions
-      std::vector<IPreTrackingAction*> m_preTrackActions;
-
-      /// List of ATLAS post-tracking actions
-      std::vector<IPostTrackingAction*> m_postTrackActions;
+      /// List of ATLAS actions
+      std::vector<G4UserTrackingAction*> m_trackActions;
 
   }; // class G4AtlasTrackingAction
 
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/LVNotifier.cxx b/Simulation/G4Atlas/G4AtlasServices/src/LVNotifier.cxx
old mode 100755
new mode 100644
index fad16ac4962d73e3391a9ee7fe46c3ce84a52090..403d83cc510858a61dc0e31ac15d9a9ecfa893c4
--- a/Simulation/G4Atlas/G4AtlasServices/src/LVNotifier.cxx
+++ b/Simulation/G4Atlas/G4AtlasServices/src/LVNotifier.cxx
@@ -9,16 +9,18 @@
 
 #include "G4GeometryNotifierSvc.h"
 
-LVNotifier::LVNotifier(G4GeometryNotifierSvc* gs):m_notifierSvc(gs)
+LVNotifier::LVNotifier(G4GeometryNotifierSvc* gs)
+  : m_notifierSvc(gs)
 {
-  G4LogicalVolumeStore *store=G4LogicalVolumeStore::GetInstance();
+  G4LogicalVolumeStore* store = G4LogicalVolumeStore::GetInstance();
   store->SetNotifier(this);
 }
+
 void LVNotifier::NotifyRegistration()
 {
-  G4LogicalVolumeStore *store=G4LogicalVolumeStore::GetInstance();
-  G4LogicalVolume *lV=store->back();
-  lV->SetName(m_notifierSvc->GetCurrentDetectorName()+"::"+lV->GetName());
+  G4LogicalVolumeStore* store = G4LogicalVolumeStore::GetInstance();
+  G4LogicalVolume* lV = store->back();
+  lV->SetName( m_notifierSvc->GetCurrentDetectorName() + "::" + lV->GetName() );
 }
 
 void LVNotifier::NotifyDeRegistration()
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/LVNotifier.h b/Simulation/G4Atlas/G4AtlasServices/src/LVNotifier.h
old mode 100755
new mode 100644
index e7fe7bea59c2b4dfa9e31de0ffabadd3a1641ac6..0625e2744460748201e214269cc896cfe0ad249f
--- a/Simulation/G4Atlas/G4AtlasServices/src/LVNotifier.h
+++ b/Simulation/G4Atlas/G4AtlasServices/src/LVNotifier.h
@@ -9,15 +9,22 @@
 
 class G4GeometryNotifierSvc;
 
-  class LVNotifier: public G4VNotifier {
-    friend class G4GeometryNotifierSvc;
-  private:
-    LVNotifier(G4GeometryNotifierSvc *);
+/// @class LVNotifier
+/// @todo NEEDS DOCUMENTATION
+class LVNotifier : public G4VNotifier
+{
+  friend class G4GeometryNotifierSvc;
 
-    G4GeometryNotifierSvc* m_notifierSvc;
   public:
+
     void NotifyRegistration();
     void NotifyDeRegistration();
-  };
+
+  private:
+
+    LVNotifier(G4GeometryNotifierSvc*);
+
+    G4GeometryNotifierSvc* m_notifierSvc;
+};
 
 #endif
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/PVNotifier.cxx b/Simulation/G4Atlas/G4AtlasServices/src/PVNotifier.cxx
old mode 100755
new mode 100644
index 932706e7a948e7cfb0b0de93bd436ad361b2333a..b88778457dccb048476e046bdac5f66cc375bc85
--- a/Simulation/G4Atlas/G4AtlasServices/src/PVNotifier.cxx
+++ b/Simulation/G4Atlas/G4AtlasServices/src/PVNotifier.cxx
@@ -9,24 +9,24 @@
 
 #include "G4GeometryNotifierSvc.h"
 
-PVNotifier::PVNotifier(G4GeometryNotifierSvc* gs):m_notifierSvc(gs)
+PVNotifier::PVNotifier(G4GeometryNotifierSvc* gs)
+  : m_notifierSvc(gs)
 {
-  G4PhysicalVolumeStore *store=G4PhysicalVolumeStore::GetInstance();
+  G4PhysicalVolumeStore* store = G4PhysicalVolumeStore::GetInstance();
   store->SetNotifier(this);
 }
 
 void PVNotifier::NotifyRegistration()
 {
-  G4PhysicalVolumeStore *store=G4PhysicalVolumeStore::GetInstance();
-  unsigned int current=store->size();
-  G4VPhysicalVolume *lV=(*store)[current-1];
-  std::string temp1=m_notifierSvc->GetCurrentDetectorName()+"::";
-  std::string temp2=lV->GetName().substr(0,temp1.size());
-  if (temp1!=temp2)
-     lV->SetName(temp1+lV->GetName());
+  G4PhysicalVolumeStore* store = G4PhysicalVolumeStore::GetInstance();
+  unsigned int current = store->size();
+  G4VPhysicalVolume* lV = (*store)[current-1];
+  std::string temp1 = m_notifierSvc->GetCurrentDetectorName() + "::";
+  std::string temp2 = lV->GetName().substr(0, temp1.size());
+  if (temp1 != temp2)
+    lV->SetName(temp1 + lV->GetName());
 }
 
 void PVNotifier::NotifyDeRegistration()
 {
 }
-
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/PVNotifier.h b/Simulation/G4Atlas/G4AtlasServices/src/PVNotifier.h
old mode 100755
new mode 100644
index 209d1809723a19693d320c3ee12822fa7b8e9cbb..14d88fe2c6ac83b61b216d81ee0939320d93d57d
--- a/Simulation/G4Atlas/G4AtlasServices/src/PVNotifier.h
+++ b/Simulation/G4Atlas/G4AtlasServices/src/PVNotifier.h
@@ -5,22 +5,27 @@
 #ifndef PVNotifier_H
 #define PVNotifier_H
 
-// Notifier class to prepend detector name to all G4 Physical Volumes
-// Only to be used by the G4GeometryNotifierSvc
-
 #include "G4VNotifier.hh"
 
 class G4GeometryNotifierSvc;
 
-  class PVNotifier: public G4VNotifier {
+/// @class PVNotifier
+/// Notifier class to prepend detector name to all G4 Physical Volumes
+/// Only to be used by the G4GeometryNotifierSvc
+class PVNotifier :  public G4VNotifier
+{
   friend class G4GeometryNotifierSvc;
-  private:
-    PVNotifier(G4GeometryNotifierSvc*);
 
-    G4GeometryNotifierSvc* m_notifierSvc;
   public:
+
     void NotifyRegistration();
     void NotifyDeRegistration();
-  };
+
+  private:
+
+    PVNotifier(G4GeometryNotifierSvc*);
+
+    G4GeometryNotifierSvc* m_notifierSvc;
+};
 
 #endif
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.cxx b/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.cxx
index c93a75813cb020f32ba4faafc52de077e70635eb..6d3fbe28e5d3a14232dfd5220730908dbb23bb91 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.cxx
+++ b/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.cxx
@@ -24,30 +24,16 @@ namespace G4UA
   UserActionSvc::UserActionSvc(const std::string& name,
                                ISvcLocator* pSvcLocator)
     : AthService(name, pSvcLocator),
-      m_beginRunActionTools(),
-      m_endRunActionTools(),
-      m_beginEventActionTools(),
-      m_endEventActionTools(),
+      m_runActionTools(),
+      m_eventActionTools(),
       m_stackingActionTools(),
-      m_preTrackingActionTools(),
-      m_postTrackingActionTools(),
+      m_trackingActionTools(),
       m_steppingActionTools()
-      //m_beginRunActionTools(this),
-      //m_endRunActionTools(this),
-      //m_beginEventActionTools(this),
-      //m_endEventActionTools(this),
-      //m_stackingActionTools(this),
-      //m_preTrackingActionTools(this),
-      //m_postTrackingActionTools(this),
-      //m_steppingActionTools(this)
   {
-    declareProperty("BeginRunActionTools", m_beginRunActionTools);
-    declareProperty("EndRunActionTools", m_endRunActionTools);
-    declareProperty("BeginEventActionTools", m_beginEventActionTools);
-    declareProperty("EndEventActionTools", m_endEventActionTools);
+    declareProperty("RunActionTools", m_runActionTools);
+    declareProperty("EventActionTools", m_eventActionTools);
     declareProperty("StackingActionTools", m_stackingActionTools);
-    declareProperty("PreTrackingActionTools", m_preTrackingActionTools);
-    declareProperty("PostTrackingActionTools", m_postTrackingActionTools);
+    declareProperty("TrackingActionTools", m_trackingActionTools);
     declareProperty("SteppingActionTools", m_steppingActionTools);
   }
 
@@ -58,45 +44,30 @@ namespace G4UA
   {
     ATH_MSG_INFO("Initializing. user action tools of each type, in order of execution:");
 
-    ATH_MSG_INFO("  begin-run:     " << m_beginRunActionTools.size());
-    for(auto& action : m_beginRunActionTools)
+    ATH_MSG_INFO("  run:      " << m_runActionTools.size());
+    for(auto& action : m_runActionTools)
       ATH_MSG_INFO("      -> " << action.name());
 
-    ATH_MSG_INFO("  end-run:       " << m_endRunActionTools.size());
-    for(auto& action : m_endRunActionTools)
+    ATH_MSG_INFO("  event:    " << m_eventActionTools.size());
+    for(auto& action : m_eventActionTools)
       ATH_MSG_INFO("      -> " << action.name());
 
-    ATH_MSG_INFO("  begin-event:   " << m_beginEventActionTools.size());
-    for(auto& action : m_beginEventActionTools)
-      ATH_MSG_INFO("      -> " << action.name());
-
-    ATH_MSG_INFO("  end-event:     " << m_endEventActionTools.size());
-    for(auto& action : m_endEventActionTools)
-      ATH_MSG_INFO("      -> " << action.name());
-
-    ATH_MSG_INFO("  stacking:      " << m_stackingActionTools.size());
+    ATH_MSG_INFO("  stacking: " << m_stackingActionTools.size());
     for(auto& action : m_stackingActionTools)
       ATH_MSG_INFO("      -> " << action.name());
 
-    ATH_MSG_INFO("  pre-tracking:  " << m_preTrackingActionTools.size());
-    for(auto& action : m_preTrackingActionTools)
+    ATH_MSG_INFO("  tracking: " << m_trackingActionTools.size());
+    for(auto& action : m_trackingActionTools)
       ATH_MSG_INFO("      -> " << action.name());
 
-    ATH_MSG_INFO("  post-tracking: " << m_postTrackingActionTools.size());
-    for(auto& action : m_postTrackingActionTools)
-      ATH_MSG_INFO("      -> " << action.name());
-
-    ATH_MSG_INFO("  stepping:      " << m_steppingActionTools.size());
+    ATH_MSG_INFO("  stepping: " << m_steppingActionTools.size());
     for(auto& action : m_steppingActionTools)
       ATH_MSG_INFO("      -> " << action.name());
 
-    ATH_CHECK( m_beginRunActionTools.retrieve() );
-    ATH_CHECK( m_endRunActionTools.retrieve() );
-    ATH_CHECK( m_beginEventActionTools.retrieve() );
-    ATH_CHECK( m_endEventActionTools.retrieve() );
+    ATH_CHECK( m_runActionTools.retrieve() );
+    ATH_CHECK( m_eventActionTools.retrieve() );
     ATH_CHECK( m_stackingActionTools.retrieve() );
-    ATH_CHECK( m_preTrackingActionTools.retrieve() );
-    ATH_CHECK( m_postTrackingActionTools.retrieve() );
+    ATH_CHECK( m_trackingActionTools.retrieve() );
     ATH_CHECK( m_steppingActionTools.retrieve() );
 
    return StatusCode::SUCCESS;
@@ -143,13 +114,9 @@ namespace G4UA
       return StatusCode::FAILURE;
     }
     auto runAction = CxxUtils::make_unique<G4AtlasRunAction>();
-    // Assign begin-run plugins
-    for(auto& beginRunTool : m_beginRunActionTools)
-      runAction->addBeginRunAction( beginRunTool->getBeginRunAction() );
-    // Assign end-run plugins
-    for(auto& endRunTool : m_endRunActionTools)
-      runAction->addEndRunAction( endRunTool->getEndRunAction() );
-
+    // Assign run plugins
+    for(auto& runTool : m_runActionTools)
+      runAction->addRunAction( runTool->getRunAction() );
     G4RunManager::GetRunManager()->SetUserAction( runAction.get() );
     m_runActions.set( std::move(runAction) );
 
@@ -159,12 +126,9 @@ namespace G4UA
       return StatusCode::FAILURE;
     }
     auto eventAction = CxxUtils::make_unique<G4AtlasEventAction>();
-    // Assign begin-event plugins
-    for(auto& beginEventTool : m_beginEventActionTools)
-      eventAction->addBeginEventAction( beginEventTool->getBeginEventAction() );
-    // Assign end-event plugins
-    for(auto& endEventTool : m_endEventActionTools)
-      eventAction->addEndEventAction( endEventTool->getEndEventAction() );
+    // Assign event plugins
+    for(auto& eventTool : m_eventActionTools)
+      eventAction->addEventAction( eventTool->getEventAction() );
     G4RunManager::GetRunManager()->SetUserAction( eventAction.get() );
     m_eventActions.set( std::move(eventAction) );
 
@@ -177,7 +141,6 @@ namespace G4UA
     // Assign stacking plugins
     for(auto& stackTool : m_stackingActionTools){
       auto stackPlugin = stackTool->getStackingAction();
-      ATH_MSG_INFO("stackPlugin " << stackPlugin);
       stackAction->addAction( stackPlugin );
     }
     G4RunManager::GetRunManager()->SetUserAction( stackAction.get() );
@@ -189,12 +152,9 @@ namespace G4UA
       return StatusCode::FAILURE;
     }
     auto trackAction = CxxUtils::make_unique<G4AtlasTrackingAction>();
-    // Assign pre-tracking plugins
-    for(auto& preTrackTool : m_preTrackingActionTools)
-      trackAction->addPreTrackAction( preTrackTool->getPreTrackingAction() );
-    // Assign post-tracking plugins
-    for(auto& postTrackTool : m_postTrackingActionTools)
-      trackAction->addPostTrackAction( postTrackTool->getPostTrackingAction() );
+    // Assign tracking plugins
+    for(auto& trackTool : m_trackingActionTools)
+      trackAction->addTrackAction( trackTool->getTrackingAction() );
     G4RunManager::GetRunManager()->SetUserAction( trackAction.get() );
     m_trackingActions.set( std::move(trackAction) );
 
diff --git a/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.h b/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.h
index a6bf5f9ad766a0e8315d69717212ab653edf257a..7053a23fdb1264778351e00b2e2bbd81361df2bb 100644
--- a/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.h
+++ b/Simulation/G4Atlas/G4AtlasServices/src/UserActionSvc.h
@@ -20,14 +20,11 @@
 #include "G4AtlasStackingAction.h"
 #include "G4AtlasTrackingAction.h"
 #include "G4AtlasSteppingAction.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndRunActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IStackingActionTool.h"
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
-#include "G4AtlasInterfaces/IPostTrackingActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4StackingActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 
 #include "G4AtlasInterfaces/IUserActionSvc.h"
 #include "G4AtlasTools/ThreadActionHolder.h"
@@ -57,29 +54,23 @@ namespace G4UA
 
       /// Gaudi interface query
       virtual StatusCode queryInterface(const InterfaceID& riid,
-                                        void** ppvInterface);
+                                        void** ppvInterface) override;
 
     private:
 
       /// @name Handles to ATLAS action tools
       /// @{
 
-      /// Begin-run action tools
-      ToolHandleArray<IBeginRunActionTool> m_beginRunActionTools;
-      /// End-run action tools
-      ToolHandleArray<IEndRunActionTool> m_endRunActionTools;
-      /// Begin-event action tools
-      ToolHandleArray<IBeginEventActionTool> m_beginEventActionTools;
-      /// End-event action tools
-      ToolHandleArray<IEndEventActionTool> m_endEventActionTools;
+      /// Run action tools
+      ToolHandleArray<IG4RunActionTool> m_runActionTools;
+      /// Event action tools
+      ToolHandleArray<IG4EventActionTool> m_eventActionTools;
       /// Stacking action tools
-      ToolHandleArray<IStackingActionTool> m_stackingActionTools;
-      /// Pre-tracking action tools
-      ToolHandleArray<IPreTrackingActionTool> m_preTrackingActionTools;
-      /// Post-tracking action tools
-      ToolHandleArray<IPostTrackingActionTool> m_postTrackingActionTools;
+      ToolHandleArray<IG4StackingActionTool> m_stackingActionTools;
+      /// Tracking action tools
+      ToolHandleArray<IG4TrackingActionTool> m_trackingActionTools;
       /// Stepping action tools
-      ToolHandleArray<ISteppingActionTool> m_steppingActionTools;
+      ToolHandleArray<IG4SteppingActionTool> m_steppingActionTools;
 
       /// @}
 
diff --git a/Simulation/G4Atlas/G4AtlasTests/cmt/requirements b/Simulation/G4Atlas/G4AtlasTests/cmt/requirements
deleted file mode 100644
index 2f94adee3e1395a760ff2ad73c0cbac197f672f9..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasTests/cmt/requirements
+++ /dev/null
@@ -1,66 +0,0 @@
-package G4AtlasTests
-
-author Andrea DellAcqua <dellacqu@mail.cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use GaudiInterface      GaudiInterface-*        External
-
-private
-use AthenaKernel        AthenaKernel-*          Control
-use StoreGate           StoreGate-*             Control
-use AtlasCLHEP          AtlasCLHEP-*            External
-use AtlasHepMC          AtlasHepMC-*            External
-use AtlasROOT           AtlasROOT-*             External
-use Geant4              Geant4-*                External
-use TestPolicy          TestPolicy-*
-use CxxUtils            CxxUtils-*              Control
-use Identifier          Identifier-*            DetectorDescription
-use GeoAdaptors         GeoAdaptors-*           DetectorDescription/GeoModel
-use GeoPrimitives       GeoPrimitives-*         DetectorDescription
-use G4AtlasInterfaces	G4AtlasInterfaces-*	Simulation/G4Atlas
-use EventInfo           EventInfo-*             Event
-use GeneratorObjects    GeneratorObjects-*      Generators
-
-use G4AtlasTools	G4AtlasTools-*          Simulation/G4Atlas
-use HitManagement       HitManagement-*         Simulation
-use MCTruth             MCTruth-*               Simulation/G4Sim
-use TrackRecord         TrackRecord-*           Simulation/G4Sim
-
-use InDetSimEvent       InDetSimEvent-*         InnerDetector
-
-use CaloIdentifier      CaloIdentifier-*        Calorimeter
-use CaloDetDescr        CaloDetDescr-*          Calorimeter
-use CaloSimEvent        CaloSimEvent-*          Calorimeter
-use LArSimEvent         LArSimEvent-*           LArCalorimeter
-use TileIdentifier      TileIdentifier-*        TileCalorimeter
-use TileDetDescr        TileDetDescr-*          TileCalorimeter
-use TileSimEvent        TileSimEvent-*          TileCalorimeter
-
-use MuonIdHelpers       MuonIdHelpers-*         MuonSpectrometer
-use MuonReadoutGeometry MuonReadoutGeometry-*   MuonSpectrometer/MuonDetDescr
-use MuonSimEvent        MuonSimEvent-*          MuonSpectrometer
-
-use ALFA_SimEv          ALFA_SimEv-*            ForwardDetectors/ALFA
-use ZDC_SimEvent        ZDC_SimEvent-*          ForwardDetectors/ZDC
-use LUCID_SimEvent      LUCID_SimEvent-*        ForwardDetectors/LUCID/LUCID_SimUtils
-
-use McParticleEvent     McParticleEvent-*       PhysicsAnalysis/TruthParticleID
-end_private
-
-
-# build a component library
-library G4AtlasTests ../src/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_scripts files="../scripts/sim_*.py ../scripts/sim_*.sh"
-
-#private
-#apply_pattern validate_xml
-#public
-
-# Patterns for RTT
-#macro G4AtlasTests_TestConfiguration "../test/G4AtlasTests_TestConfiguration.xml"
-#apply_pattern declare_runtime extras="../test/G4AtlasTests_TestConfiguration.xml"
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Simulation/G4Atlas/G4AtlasTests/doc/packagedoc.h b/Simulation/G4Atlas/G4AtlasTests/doc/packagedoc.h
index 8e9bf01c63bc78c4bee618d97fa5d9f5a261df09..4e4d573820d0d8c0c03d31b185be43cc14c46174 100644
--- a/Simulation/G4Atlas/G4AtlasTests/doc/packagedoc.h
+++ b/Simulation/G4Atlas/G4AtlasTests/doc/packagedoc.h
@@ -43,16 +43,6 @@ including both subdetector specific and general functionality tests.
 
 All histograms are booked in BookHistograms.cxx - this file contains all limits for the histos.
 
-@ref used_G4AtlasTests
 
-@ref requirements_G4AtlasTests
 
 */
-
-/**
-@page used_G4AtlasTests Used Packages
-*/
-
-/**
-@page requirements_G4AtlasTests Requirements
-*/
diff --git a/Simulation/G4Atlas/G4AtlasTests/share/postInclude.StepVal.py b/Simulation/G4Atlas/G4AtlasTests/share/postInclude.StepVal.py
index 2930f5eb29e5f36cecb5ca3993ff592ba90d5fb1..51a411dfcb40be6b9628ee8479a0d9eb0beafa6e 100644
--- a/Simulation/G4Atlas/G4AtlasTests/share/postInclude.StepVal.py
+++ b/Simulation/G4Atlas/G4AtlasTests/share/postInclude.StepVal.py
@@ -6,6 +6,6 @@ if not hasattr(ServiceMgr, 'THistSvc'):
 ServiceMgr.THistSvc.Output  += ["truth DATAFILE='stepping.root' OPT='NEW'"];
 
 from G4AtlasApps.SimFlags import simFlags
-simFlags.OptionalUserActionList.addAction('G4UA::SteppingValidationTool',['BeginOfRun','EndOfEvent','BeginOfEvent','Step'])
+simFlags.OptionalUserActionList.addAction('G4UA::SteppingValidationTool',['Run','Event','Step'])
 
 
diff --git a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.cxx b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.cxx
index 4f4fbf03064d4943aa973c94ecf8e8c9f787bb8d..b5962e438564637bd7aea28a12dc56282a1885ac 100644
--- a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.cxx
+++ b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.cxx
@@ -21,7 +21,7 @@
 namespace G4UA{
 
   
-  void SteppingValidation::beginOfRun(const G4Run*){
+  void SteppingValidation::BeginOfRunAction(const G4Run*){
     m_path += "Stepping/";
     
     // Set up all the histograms...
@@ -45,7 +45,7 @@ namespace G4UA{
     
   }
   
-  void SteppingValidation::endOfEvent(const G4Event*){
+  void SteppingValidation::EndOfEventAction(const G4Event*){
     // Fill lateral energy spread 
     if (m_nsec>0){
       m_latPhi->Fill( std::sqrt( m_dp2/m_nsec - std::pow(m_dp/m_nsec,2) ) );
@@ -53,14 +53,14 @@ namespace G4UA{
     }
   }
   
-  void SteppingValidation::beginOfEvent(const G4Event*){
+  void SteppingValidation::BeginOfEventAction(const G4Event*){
     m_prim=m_sec=0;
     m_primH=m_primF=0;
     m_dh=m_dh2=m_dp=m_dp2=0;
     m_nsec=0;
   }
   
-  void SteppingValidation::processStep(const G4Step* aStep){
+  void SteppingValidation::UserSteppingAction(const G4Step* aStep){
     // Fill process type
     m_stepProc->Fill(aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessType());
     
diff --git a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.h b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.h
index 6abd452c894ae9ff5e33a25f18942e921f4d2a37..960fa30e75c27dc861f40281788c65b166a19ac3 100644
--- a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.h
+++ b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidation.h
@@ -17,15 +17,14 @@ class G4Track;
 // User action to do some basic step-based validation of G4
 
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserRunAction.hh"
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
 namespace G4UA{
   
   
   class SteppingValidation:
-  public IBeginRunAction,  public IEndEventAction,  public IBeginEventAction,  public ISteppingAction, public SimTestHisto 
+  public G4UserRunAction, public G4UserEventAction, public G4UserSteppingAction, public SimTestHisto
   {
 
   public:
@@ -37,10 +36,10 @@ namespace G4UA{
       m_primH(0),m_primF(0),m_dh(0),m_dh2(0),m_dp(0),m_dp2(0),m_nsec(0)
       {};
     
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
   private:
     TH1 *m_stepL, *m_stepProc, *m_mscAngle, *m_stepELoss, *m_secE, *m_latPhi, *m_latEta;
     TH2 *m_EvsR;
diff --git a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidationTool.cxx b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidationTool.cxx
index 0b3878904f68facf61d4108f5318349e774d3352..cdab8dacf4a1974204745d7a15195de55686eadd 100644
--- a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidationTool.cxx
+++ b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidationTool.cxx
@@ -15,23 +15,18 @@ namespace G4UA{
   }
   StatusCode SteppingValidationTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidationTool.h b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidationTool.h
index e196c0708ad2f4d486f2f8ca84f137c6620be918..ff4c848c3422190d07fb9ab39c1038598bb2a668 100644
--- a/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidationTool.h
+++ b/Simulation/G4Atlas/G4AtlasTests/src/SteppingValidationTool.h
@@ -4,10 +4,9 @@
 
 #ifndef G4ATLASTESTS_G4UA__STEPPINGVALIDATIONTOOL_H 
 #define G4ATLASTESTS_G4UA__STEPPINGVALIDATIONTOOL_H 
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "SteppingValidation.h"
 namespace G4UA{ 
@@ -21,24 +20,21 @@ namespace G4UA{
 
   class SteppingValidationTool: 
   public ActionToolBase<SteppingValidation>,
-    public IBeginRunActionTool,  public IEndEventActionTool,  public IBeginEventActionTool,  public ISteppingActionTool
+    public IG4RunActionTool, public IG4EventActionTool, public IG4SteppingActionTool
   {
     
   public:
     /// standard tool ctor
     SteppingValidationTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// gets the BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final
-    { return static_cast<IBeginRunAction*>( getAction() ); }
-    /// gets the EoE action
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
-    /// gets the BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
+    /// gets the run action
+    virtual G4UserRunAction* getRunAction() override final
+    { return static_cast<G4UserRunAction*>( getAction() ); }
+    /// gets the event action
+    virtual G4UserEventAction* getEventAction() override final
+    { return static_cast<G4UserEventAction*>( getAction() ); }
     /// gets the stepping action
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     /// Gaudi interface handling
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/AddPhysicsDecayTool.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/AddPhysicsDecayTool.h
index 499b2347a525b6c61593b2a623bb2052c0a4d32c..1e99a84dfb4a740031e0cd824619dc167e0ea780 100644
--- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/AddPhysicsDecayTool.h
+++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/AddPhysicsDecayTool.h
@@ -25,7 +25,7 @@ class AddPhysicsDecayTool : public G4VPhysicsConstructor, public AthAlgTool, vir
 public:
   /// Standard constructor
   AddPhysicsDecayTool( const std::string& type , const std::string& name,
-                       const IInterface* parent ) ;
+                       const IInterface* parent );
 
   virtual ~AddPhysicsDecayTool( ); ///< Destructor
 
@@ -37,10 +37,6 @@ public:
 
   virtual void ConstructParticle() override;
 
-  /** Implements
-   */
-
-
 protected:
   std::string m_ParticleName;
   double m_BR;
@@ -49,6 +45,4 @@ protected:
 
 };
 
-
-
 #endif //G4ATLASTOOLS_ADDPHYSICSDECAYTOOL_H
diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/BoxEnvelope.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/BoxEnvelope.h
index 6a3a4e092c4bd9e9fd131ef92f94c13741083660..ca414f55182216524bc8f05dce0bf63b3986173f 100644
--- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/BoxEnvelope.h
+++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/BoxEnvelope.h
@@ -16,13 +16,12 @@
 #include <vector>
 #include <map>
 
-typedef std::map<std::string, G4ThreeVector, std::less<std::string> > HoleSize;
-typedef std::map<std::string, G4ThreeVector, std::less<std::string> > HolePosition;
-
+/// @class BoxEnvelope
+/// @todo TODO needs documentation
 class BoxEnvelope final : public DetectorGeometryBase
 {
  public:
-  // Basic constructor and destructor
+  /// Basic constructor and destructor
   BoxEnvelope(const std::string& type, const std::string& name, const IInterface *parent);
   ~BoxEnvelope() {}
 
diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/CylindricalEnvelope.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/CylindricalEnvelope.h
index 283f910e62b8621b63f0de144b8c1ed746d53781..079398c077ac5d6ffc6bfe7574624385f2ac6447 100644
--- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/CylindricalEnvelope.h
+++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/CylindricalEnvelope.h
@@ -2,23 +2,23 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef CylindricalEnvelope_H
-#define CylindricalEnvelope_H
+#ifndef G4ATLASTOOLS_CylindricalEnvelope_H
+#define G4ATLASTOOLS_CylindricalEnvelope_H
 
 // Base classes
 #include "G4AtlasTools/DetectorGeometryBase.h"
 #include "G4AtlasInterfaces/IDetectorGeometrySvc.h"
 
-// Members
-
 // STL library
 #include <string>
 #include <vector>
 
+/// @class CylindricalEnvelope
+/// @todo TODO needs documentation
 class CylindricalEnvelope final : public DetectorGeometryBase
 {
  public:
-  // Basic constructor and destructor
+  /// Basic constructor and destructor
   CylindricalEnvelope(const std::string& type, const std::string& name, const IInterface *parent);
 
   ~CylindricalEnvelope() {}
@@ -35,8 +35,6 @@ class CylindricalEnvelope final : public DetectorGeometryBase
   double m_startphi;
   double m_deltaphi;
 
-
-
 };
 
 #endif
diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/DetectorGeometryBase.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/DetectorGeometryBase.h
index 41589138791becf19a90d17d1e5ebce83cd75302..5c9cdf7700ce3b23440f5299a76858532936019a 100644
--- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/DetectorGeometryBase.h
+++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/DetectorGeometryBase.h
@@ -2,8 +2,8 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef G4ATLASINTERFACES_DETECTORGEOMETRYBASE_H
-#define G4ATLASINTERFACES_DETECTORGEOMETRYBASE_H
+#ifndef G4ATLASTOOLS_DETECTORGEOMETRYBASE_H
+#define G4ATLASTOOLS_DETECTORGEOMETRYBASE_H
 
 // Base classes
 #include "AthenaBaseComps/AthAlgTool.h"
diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/EnvelopeTool.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/EnvelopeTool.h
index 6af348c0c9642cea450abbd41963da852e17af24..483e1b1804baebd4d4c70468772c97a5ef414158 100644
--- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/EnvelopeTool.h
+++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/EnvelopeTool.h
@@ -2,23 +2,23 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef EnvelopeTool_H
-#define EnvelopeTool_H
+#ifndef G4ATLASTOOLS_EnvelopeTool_H
+#define G4ATLASTOOLS_EnvelopeTool_H
 
 // Base classes
 #include "G4AtlasTools/DetectorGeometryBase.h"
 #include "G4AtlasInterfaces/IDetectorGeometrySvc.h"
 
-// Members
-
 // STL library
 #include <string>
 #include <vector>
 
+/// @class EnvelopeTool
+/// @todo TODO needs documentation
 class EnvelopeTool final : public DetectorGeometryBase 
 {
 public:
-  // Basic constructor and destructor
+  /// Basic constructor and destructor
   EnvelopeTool(const std::string& type, const std::string& name, const IInterface *parent);
   ~EnvelopeTool() {}
 
diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/FastSimulationBase.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/FastSimulationBase.h
index a28ed592263a0437dd8e89f8366dfd5e46f76227..c41d70f15bbd8e141f50a01538415adaae315aa6 100644
--- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/FastSimulationBase.h
+++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/FastSimulationBase.h
@@ -2,8 +2,8 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef G4ATLASINTERFACES_FASTSIMULATIONBASE_H
-#define G4ATLASINTERFACES_FASTSIMULATIONBASE_H
+#ifndef G4ATLASTOOLS_FASTSIMULATIONBASE_H
+#define G4ATLASTOOLS_FASTSIMULATIONBASE_H
 
 // Base classes
 #include "AthenaBaseComps/AthAlgTool.h"
@@ -21,15 +21,20 @@
 #include <vector>
 #include <thread>
 
+/// @class FastSimulationBase
+/// @todo TODO needs class documentation
 class FastSimulationBase : virtual public IFastSimulation, public AthAlgTool {
  public:
-  FastSimulationBase(const std::string& type, const std::string& name, const IInterface *parent);
+  FastSimulationBase(const std::string& type, const std::string& name,
+                     const IInterface *parent);
   virtual ~FastSimulationBase() {}
 
-  /** Athena method, used to get out the G4 geometry and set up the fast simulations
-    This is horrible, but the G4 method called Initialize is called at the beginning
-    of every event.  This method is the one that is called ONLY by athena at the
-    beginning of the job */
+  /// @brief Construct and setup the fast simulation model.
+  ///
+  /// This method invokes the makeFastSimModel of the derived concrete tool type
+  /// and assigns the configured regions. Errors are reported if regions are
+  /// missing. In multi-threading jobs, this method is called once per worker
+  /// thread.
   StatusCode initializeFastSim() override;
 
   /** End of an athena event - do any tidying up required at the end of each *athena* event. */
@@ -39,13 +44,15 @@ class FastSimulationBase : virtual public IFastSimulation, public AthAlgTool {
   virtual StatusCode queryInterface(const InterfaceID&, void**) override;
 
  protected:
-  /// Retrieve the current Fast Simulation Model. In hive, this means the
+  /// Retrieve the current Fast Simulation Model. In MT, this means the
   /// thread-local Fast Simulation Model. Otherwise, it is simply the single
-  // Fast Simulation Model.
+  /// Fast Simulation Model.
   G4VFastSimulationModel* getFastSimModel();
 
-  std::vector<std::string> m_regionNames; //!< All the regions to which this fast sim is assigned
-  bool m_noRegions; //!< This Fast Simulation has no regions associated with it.
+  /// All the regions to which this fast sim is assigned
+  std::vector<std::string> m_regionNames;
+  /// This Fast Simulation has no regions associated with it.
+  bool m_noRegions;
 
  private:
 
@@ -60,7 +67,8 @@ class FastSimulationBase : virtual public IFastSimulation, public AthAlgTool {
   /// Concurrent map of Fast Sim Models, one for each thread
   FastSimModelThreadMap_t m_fastsimmodelThreadMap;
 #else
-  G4VFastSimulationModel* m_FastSimModel;             ///!< The Fast Simulation Model to which this thing corresponds
+  /// The Fast Simulation Model to which this thing corresponds
+  G4VFastSimulationModel* m_FastSimModel;
 #endif
 };
 
diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/PolyconicalEnvelope.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/PolyconicalEnvelope.h
index 89063aa3fa40b39c7fa02415ed558fcb7ec0a109..aa0ffd83519cb2e4df88eeca469535028a314442 100644
--- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/PolyconicalEnvelope.h
+++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/PolyconicalEnvelope.h
@@ -2,19 +2,19 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef PolyconicalEnvelope_H
-#define PolyconicalEnvelope_H
+#ifndef G4ATLASTOOLS_PolyconicalEnvelope_H
+#define G4ATLASTOOLS_PolyconicalEnvelope_H
 
 // Base classes
 #include "G4AtlasTools/DetectorGeometryBase.h"
 #include "G4AtlasInterfaces/IDetectorGeometrySvc.h"
 
-// Members
-
 // STL library
 #include <string>
 #include <vector>
 
+/// @class PolyconicalEnvelope
+/// @todo TODO needs documentation
 class PolyconicalEnvelope final : public DetectorGeometryBase
 {
  public:
diff --git a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/SensitiveDetectorBase.h b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/SensitiveDetectorBase.h
index d5c44d77f0a78d54bc8ea8fd026c1c8f7c8a1bf9..ef37f590e12a45b364cfb31c8f5b6ea786d3abb8 100644
--- a/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/SensitiveDetectorBase.h
+++ b/Simulation/G4Atlas/G4AtlasTools/G4AtlasTools/SensitiveDetectorBase.h
@@ -2,8 +2,8 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef G4ATLASINTERFACES_SENSITIVEDETECTORBASE_H
-#define G4ATLASINTERFACES_SENSITIVEDETECTORBASE_H
+#ifndef G4ATLASTOOLS_SENSITIVEDETECTORBASE_H
+#define G4ATLASTOOLS_SENSITIVEDETECTORBASE_H
 
 // Base classes
 #include "AthenaBaseComps/AthAlgTool.h"
diff --git a/Simulation/G4Atlas/G4AtlasTools/cmt/requirements b/Simulation/G4Atlas/G4AtlasTools/cmt/requirements
deleted file mode 100644
index ba489ab42cab4d3c9c4be604a65798a206b6f96c..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasTools/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package G4AtlasTools
-
-public
-# Required for all packages
-use AtlasPolicy          AtlasPolicy-*
-
-# Base classes
-use G4AtlasInterfaces    G4AtlasInterfaces-*     Simulation/G4Atlas
-use AthenaBaseComps      AthenaBaseComps-*       Control
-use Geant4               Geant4-*                External
-
-# Member variables
-use SubDetectorEnvelopes SubDetectorEnvelopes-*  AtlasGeometryCommon
-use AtlasTBB             AtlasTBB-*              External
-
-private
-use AtlasBoost           AtlasBoost-*            External
-use AtlasCLHEP           AtlasCLHEP-*            External
-use GaudiInterface       GaudiInterface-*        External
-use G4PhysicsLists       G4PhysicsLists-*        Simulation/G4Utilities
-end_private
-
-apply_pattern declare_python_modules files="*.py"
-
-# Don't need to specify components for dual use
-apply_pattern dual_use_library files="*.cxx *.cc"
diff --git a/Simulation/G4Atlas/G4AtlasTools/src/G4ThreadInitTool.cxx b/Simulation/G4Atlas/G4AtlasTools/src/G4ThreadInitTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..ce2d101c3d03355fb8059e240c77c5dd3baf0380
--- /dev/null
+++ b/Simulation/G4Atlas/G4AtlasTools/src/G4ThreadInitTool.cxx
@@ -0,0 +1,119 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// Main header include
+#include "G4ThreadInitTool.h"
+
+// Geant4 includes
+#include "G4WorkerRunManager.hh"
+#include "G4UImanager.hh"
+#include "G4MTRunManager.hh"
+#include "G4WorkerThread.hh"
+#include "G4UserWorkerThreadInitialization.hh"
+#include "G4RunManager.hh"
+#include "G4VUserActionInitialization.hh"
+#include "G4UserWorkerInitialization.hh"
+#include "G4AutoDelete.hh"
+
+// System includes
+#include <unistd.h>
+#include <sys/syscall.h>
+
+//-----------------------------------------------------------------------------
+// Constructor
+//-----------------------------------------------------------------------------
+G4ThreadInitTool::G4ThreadInitTool(const std::string& type,
+                                   const std::string& name,
+                                   const IInterface* parent)
+  : base_class(type, name, parent),
+    m_nInitThreads(0)
+{}
+
+//-----------------------------------------------------------------------------
+// Worker thread initialization.
+// This code is modeled after G4MTRunManagerKernel::StartThread.
+//-----------------------------------------------------------------------------
+void G4ThreadInitTool::initThread()
+{
+  ATH_MSG_INFO("==> tbb thread started with id: 0x" <<
+               std::hex << pthread_self() << std::dec);
+
+  // Define the G4 worker thread context and setup its cleanup mechanism.
+  auto wThreadContext = new G4WorkerThread;
+  G4AutoDelete::Register(wThreadContext);
+
+  // Assign the thread ID
+  static std::atomic_uint tid(0);
+  wThreadContext->SetThreadId( tid++ );
+  G4Threading::G4SetThreadId( wThreadContext->GetThreadId() );
+
+  // Setup thread-local geometry and physics
+  wThreadContext->BuildGeometryAndPhysicsVector();
+
+  // Retrieve the master thread run manager
+  G4MTRunManager* masterRM = G4MTRunManager::GetMasterRunManager();
+  // Worker thread initialization object
+  const G4UserWorkerThreadInitialization* workerInitializer =
+    masterRM->GetUserWorkerThreadInitialization();
+
+  // Random number setup.
+  // TODO: revisit this once MT AthRNGSvc is available.
+  const CLHEP::HepRandomEngine* masterEngine = masterRM->getMasterRandomEngine();
+  workerInitializer->SetupRNGEngine(masterEngine);
+
+  // Create the thread-local worker run manager (G4AtlasWorkerRunManager)
+  ATH_MSG_INFO("Creating worker RM");
+  G4WorkerRunManager* wrm = workerInitializer->CreateWorkerRunManager();
+  wrm->SetWorkerThread(wThreadContext);
+
+  // Share detector from master with worker.
+  ATH_MSG_INFO("Assigning detector construction");
+  const G4VUserDetectorConstruction* detector =
+    masterRM->GetUserDetectorConstruction();
+  // I don't want to const-cast here, but this is what they do in G4's
+  // StartThread function, so there is likely no alternative.
+  wrm->G4RunManager::SetUserInitialization
+    (const_cast<G4VUserDetectorConstruction*>(detector));
+  // Share physics list from master with worker.
+  const G4VUserPhysicsList* physicslist = masterRM->GetUserPhysicsList();
+  wrm->SetUserInitialization(const_cast<G4VUserPhysicsList*>(physicslist));
+
+  // Build thread-local user actions - NOT CURRENTLY USED.
+  if(masterRM->GetUserActionInitialization()) {
+    masterRM->GetNonConstUserActionInitialization()->Build();
+  }
+
+  // Start user worker initialization
+  if(masterRM->GetUserWorkerInitialization()) {
+    masterRM->GetUserWorkerInitialization()->WorkerStart();
+  }
+
+  // Initialize the worker run manager
+  ATH_MSG_INFO("Initializing worker RM");
+  wrm->Initialize();
+
+  // Copy the UI commands to the worker
+  std::vector<G4String> cmds = masterRM->GetCommandStack();
+  ATH_MSG_INFO (cmds.size() << " commands in UI stack");
+  G4UImanager* uimgr = G4UImanager::GetUIpointer();
+  for(const auto& it : cmds) {
+    ATH_MSG_INFO ("Adding command to worker: " << it);
+    uimgr->ApplyCommand(it);
+  }
+
+  // Atomic increment number of initialized threads
+  m_nInitThreads++;
+
+  ATH_MSG_INFO("==> tbb thread end of initThread with id: 0x" <<
+               std::hex << pthread_self() << std::dec);
+}
+
+//-----------------------------------------------------------------------------
+// Worker thread termination
+//-----------------------------------------------------------------------------
+void G4ThreadInitTool::terminateThread()
+{
+  // Atomic decrement number of initialized threads
+  m_nInitThreads--;
+}
diff --git a/Simulation/G4Atlas/G4AtlasTools/src/G4ThreadInitTool.h b/Simulation/G4Atlas/G4AtlasTools/src/G4ThreadInitTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..b1e2ce119f33c7e9dacbf79b39e9638fe5be1285
--- /dev/null
+++ b/Simulation/G4Atlas/G4AtlasTools/src/G4ThreadInitTool.h
@@ -0,0 +1,47 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef G4ATLASTOOLS_G4THREADINITTOOL_H
+#define G4ATLASTOOLS_G4THREADINITTOOL_H
+
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "GaudiKernel/IThreadInitTool.h"
+
+#include <string>
+#include <atomic>
+
+/// @class G4ThreadInitTool
+/// @brief A tool which sets up the worker-thread-local workspace for Geant4.
+///
+/// @author Steve Farrell <Steven.Farrell@cern.ch>
+///
+class G4ThreadInitTool : virtual public extends1<AthAlgTool, IThreadInitTool>
+{
+
+  public:
+
+    /// Standard tool constructor
+    G4ThreadInitTool(const std::string&, const std::string&, const IInterface*);
+
+    /// Set up the Geant4 workspace for this worker thread
+    virtual void initThread() override final;
+
+    /// Tear down the Geant4 workspace for this worker thread
+    virtual void terminateThread() override final;
+
+    /// Counter used for barrier mechanism in thread initialization.
+    /// This number needs to be correctly reported to properly ensure
+    /// scheduling of thread-initialization tasks on every thread.
+    virtual unsigned int nInit() const override final {
+      return m_nInitThreads;
+    }
+
+  private:
+
+    /// Counter of threads that have been initialized
+    std::atomic_uint m_nInitThreads;
+
+}; // class G4ThreadInitTool
+
+#endif // G4ATLASTOOLS_G4THREADINITTOOL_H
diff --git a/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx b/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx
index ff5ad2e8d942608e0ec3981b1f0c9f756a13185a..1a7e72f67069ab5490bc1e0b83c5df75a65663d5 100644
--- a/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx
+++ b/Simulation/G4Atlas/G4AtlasTools/src/PhysicsListToolBase.cxx
@@ -57,7 +57,7 @@ StatusCode PhysicsListToolBase::initialize( )
 
 void PhysicsListToolBase::CreatePhysicsList()
 {
-
+  ATH_MSG_DEBUG("PhysicsListToolBase::CreatePhysicsList()");
   if (m_physicsListName != ""){
     G4PhysListFactory factory;
     AtlasPhysListFactory Atlasfactory;
@@ -92,20 +92,22 @@ void PhysicsListToolBase::CreatePhysicsList()
     }
 
   //ConstructProcess();
+  ATH_MSG_DEBUG("end of PhysicsListToolBase::CreatePhysicsList()");
 }
 
 G4VUserPhysicsList* PhysicsListToolBase::GetPhysicsList()
 {
-  if (!m_physicsList)
-    {
-      CreatePhysicsList();
-    }
+  if (!m_physicsList) {
+    this->CreatePhysicsList();
+  }
   return m_physicsList;
 }
 
 void PhysicsListToolBase::SetPhysicsList()
 {
-  CreatePhysicsList();
+  if(!m_physicsList) {
+    this->CreatePhysicsList();
+  }
   G4RunManager::GetRunManager()->SetUserInitialization(m_physicsList);
 }
 
diff --git a/Simulation/G4Atlas/G4AtlasTools/src/components/G4AtlasTools_entries.cxx b/Simulation/G4Atlas/G4AtlasTools/src/components/G4AtlasTools_entries.cxx
index c74a873e541fabfa6934a543ceeb173fbb70bcbf..e19ec7de5c51c0d6da6693242afb860d37d4cf9f 100644
--- a/Simulation/G4Atlas/G4AtlasTools/src/components/G4AtlasTools_entries.cxx
+++ b/Simulation/G4Atlas/G4AtlasTools/src/components/G4AtlasTools_entries.cxx
@@ -14,6 +14,7 @@
 #include "../FastSimulationMasterTool.h"
 #include "G4AtlasTools/GlobalFieldManagerTool.h"
 #include "G4AtlasTools/DetectorFieldManagerTool.h"
+#include "../G4ThreadInitTool.h"
 
 DECLARE_TOOL_FACTORY( PhysicsListToolBase )
 DECLARE_TOOL_FACTORY( DetectorGeometryBase )
@@ -29,3 +30,4 @@ DECLARE_TOOL_FACTORY( FastSimulationMasterTool )
 DECLARE_TOOL_FACTORY( AddPhysicsDecayTool )
 DECLARE_TOOL_FACTORY( GlobalFieldManagerTool )
 DECLARE_TOOL_FACTORY( DetectorFieldManagerTool )
+DECLARE_TOOL_FACTORY( G4ThreadInitTool )
diff --git a/Simulation/G4Atlas/G4AtlasUtilities/cmt/requirements b/Simulation/G4Atlas/G4AtlasUtilities/cmt/requirements
deleted file mode 100644
index 00b94ccfb6120813410c9002467a2614c7a8eba1..0000000000000000000000000000000000000000
--- a/Simulation/G4Atlas/G4AtlasUtilities/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package G4AtlasUtilities
-
-public
-use AtlasPolicy             AtlasPolicy-*
-use FadsKinematics          FadsKinematics-*        Simulation/G4Sim/FADS
-
-private
-use AtlasReflex             AtlasReflex-*           External
-use Geant4                  Geant4-*                External
-end_private
-
-include_dirs "$(G4AtlasUtilities_root)" "$(G4AtlasUtilities_root)/dict"
-
-library G4AtlasUtilities *.cxx
-apply_pattern installed_library
-
-private
-apply_pattern lcgdict dict=G4AtlasUtilities \
-    headerfiles="../G4AtlasUtilities/G4AtlasUtilitiesDict.h" \
-    selectionfile=selection.xml
-
-macro_prepend G4AtlasUtilitiesDict_shlibflags " -lG4AtlasUtilities "
-end_private
diff --git a/Simulation/G4Atlas/G4AtlasUtilities/doc/packagedoc.h b/Simulation/G4Atlas/G4AtlasUtilities/doc/packagedoc.h
index 16d9f42d1909900a5146503e28bbb6d1a82a8e42..fb143e642711f9361df6fe3550bc131073ad45d9 100644
--- a/Simulation/G4Atlas/G4AtlasUtilities/doc/packagedoc.h
+++ b/Simulation/G4Atlas/G4AtlasUtilities/doc/packagedoc.h
@@ -18,17 +18,6 @@ The following filters are available:
  - VertexPositioners : This filter changes the initial position of the primary event.  It can be used both for a misplaced beamspot and for smearing the beamspot.
  - VertexRangeChecker : This filter ensures that the primary particles are being created in a sensible place (e.g. not outside of the ATLAS detector)
 
-@ref used_G4AtlasUtilities
 
-@ref requirements_G4AtlasUtilities
 
 */
-
-/**
-@page used_G4AtlasUtilities Used Packages
-*/
-
-/**
-@page requirements_G4AtlasUtilities Requirements
-*/
-
diff --git a/Simulation/G4Extensions/Charginos/cmt/requirements b/Simulation/G4Extensions/Charginos/cmt/requirements
deleted file mode 100644
index 45a0dda1ea258ecd2e509484b72bc87783cedfce..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/Charginos/cmt/requirements
+++ /dev/null
@@ -1,19 +0,0 @@
-package Charginos
-
-author ADA <dellacqu@mail.cern.ch>
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*        External
-
-private
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AtlasCLHEP          AtlasCLHEP-*            External
-use Geant4              Geant4-*                External
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-end_private
-
-library Charginos *.cxx -s=components *.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-apply_pattern generic_declare_for_link kind=share files='-s=../share *.MeV *.txt' prefix=share name=<name>
diff --git a/Simulation/G4Extensions/Charginos/doc/packagedoc.h b/Simulation/G4Extensions/Charginos/doc/packagedoc.h
index 8c9575f2978790b2d8a1ae9dd23e4b4b7a331264..595da40338adc2f703c8277be0f2ef4429d0c3f2 100644
--- a/Simulation/G4Extensions/Charginos/doc/packagedoc.h
+++ b/Simulation/G4Extensions/Charginos/doc/packagedoc.h
@@ -16,17 +16,6 @@ This package contains only one class:
 
  - CharginosProcessDefinition : Responsible for assigning physics processes to the Charginos, such as transportation.
 
-@ref used_Charginos
 
-@ref requirements_Charginos
 
 */
-
-/**
-@page used_Charginos Used Packages
-*/
-
-/**
-@page requirements_Charginos Requirements
-*/
-
diff --git a/Simulation/G4Extensions/Charginos/python/CharginosConfig.py b/Simulation/G4Extensions/Charginos/python/CharginosConfig.py
index 927b1bcbb2115bb2644980c5661a4e38e7f6a8c8..bc9f51fbcac89d6293e59352c4d5a5cdf8a14a66 100644
--- a/Simulation/G4Extensions/Charginos/python/CharginosConfig.py
+++ b/Simulation/G4Extensions/Charginos/python/CharginosConfig.py
@@ -41,3 +41,81 @@ def getCharginosPhysicsTool(name="CharginosPhysicsTool", **kwargs):
     ##kwargs.setdefault("NeutralinoShortlived",    False)
 
     return CfgMgr.CharginosPhysicsTool(name, **kwargs)
+
+
+def getCharginoPlusToPiPlusNeutralino(name="CharginoPlusToPiPlusNeutralino", **kwargs):
+    from G4AtlasApps.SimFlags import simFlags
+    C1ToPiBR = 1.0
+    C1ToEleBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToEleBR", "-1.0"))
+    if C1ToEleBR > 0.0:
+        C1ToPiBR -= C1ToEleBR
+    C1ToMuBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToMuBR", "-1.0"))
+    if C1ToMuBR > 0.0:
+        C1ToPiBR -= C1ToMuBR
+    kwargs.setdefault("ParticleName","s_chi_plus_1")
+    kwargs.setdefault("BR",C1ToPiBR) #Branching Ratio
+    kwargs.setdefault("Daughters","s_chi_0_1,pi+")
+    return CfgMgr.AddPhysicsDecayTool(name, kwargs)
+
+
+def getCharginoMinusToPiMinusNeutralino(name="CharginoMinusToPiMinusNeutralino", **kwargs):
+    from G4AtlasApps.SimFlags import simFlags
+    C1ToPiBR = 1.0
+    C1ToEleBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToEleBR", "-1.0"))
+    if C1ToEleBR > 0.0:
+        C1ToPiBR -= C1ToEleBR
+    C1ToMuBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToMuBR", "-1.0"))
+    if C1ToMuBR > 0.0:
+        C1ToPiBR -= C1ToMuBR
+    kwargs.setdefault("ParticleName","s_chi_minus_1")
+    kwargs.setdefault("BR",C1ToPiBR) #Branching Ratio
+    kwargs.setdefault("Daughters","s_chi_0_1,pi-")
+    return CfgMgr.AddPhysicsDecayTool(name, kwargs)
+
+
+def getCharginoPlusToEPlusNeutralino(name="CharginoPlusToEPlusNeutralino", **kwargs):
+    from G4AtlasApps.SimFlags import simFlags
+    C1ToEBR = 0.0
+    C1ToEleBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToEleBR", "-1.0"))
+    if C1ToEleBR > 0.0:
+        C1ToEBR = C1ToEleBR
+    kwargs.setdefault("ParticleName","s_chi_plus_1")
+    kwargs.setdefault("BR",C1ToEBR) #Branching Ratio
+    kwargs.setdefault("Daughters","s_chi_0_1,nu_e,e+")
+    return CfgMgr.AddPhysicsDecayTool(name, kwargs)
+
+
+def getCharginoMinusToEMinusNeutralino(name="CharginoMinusToEMinusNeutralino", **kwargs):
+    from G4AtlasApps.SimFlags import simFlags
+    C1ToEBR = 0.0
+    C1ToEleBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToEleBR", "-1.0"))
+    if C1ToEleBR > 0.0:
+        C1ToEBR = C1ToEleBR
+    kwargs.setdefault("ParticleName","s_chi_minus_1")
+    kwargs.setdefault("BR",C1ToEBR) #Branching Ratio
+    kwargs.setdefault("Daughters","s_chi_0_1,anti_nu_e,e-")
+    return CfgMgr.AddPhysicsDecayTool(name, kwargs)
+
+
+def getCharginoPlusToMuPlusNeutralino(name="CharginoPlusToMuPlusNeutralino", **kwargs):
+    from G4AtlasApps.SimFlags import simFlags
+    C1ToMuonBR = 0.0
+    C1ToMuBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToMuBR", "-1.0"))
+    if C1ToMuBR > 0.0:
+        C1ToMuonBR = C1ToMuBR
+    kwargs.setdefault("ParticleName","s_chi_plus_1")
+    kwargs.setdefault("BR",C1ToMuonBR) #Branching Ratio
+    kwargs.setdefault("Daughters","s_chi_0_1,nu_mu,mu+")
+    return CfgMgr.AddPhysicsDecayTool(name, kwargs)
+
+
+def getCharginoMinusToMuMinusNeutralino(name="CharginoMinusToMuMinusNeutralino", **kwargs):
+    from G4AtlasApps.SimFlags import simFlags
+    C1ToMuonBR = 0.0
+    C1ToMuBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToMuBR", "-1.0"))
+    if C1ToMuBR > 0.0:
+        C1ToMuonBR = C1ToMuBR
+    kwargs.setdefault("ParticleName","s_chi_minus_1")
+    kwargs.setdefault("BR",C1ToMuonBR) #Branching Ratio
+    kwargs.setdefault("Daughters","s_chi_0_1,anti_nu_mu,mu-")
+    return CfgMgr.AddPhysicsDecayTool(name, kwargs)
diff --git a/Simulation/G4Extensions/Charginos/python/CharginosConfigDb.py b/Simulation/G4Extensions/Charginos/python/CharginosConfigDb.py
index 98d3fd563ac131b66c3f1bafb8fa7ff86db276d2..3514312c53b387a6a248db306ead0add6984362b 100644
--- a/Simulation/G4Extensions/Charginos/python/CharginosConfigDb.py
+++ b/Simulation/G4Extensions/Charginos/python/CharginosConfigDb.py
@@ -2,3 +2,9 @@
 
 from AthenaCommon.CfgGetter import addTool
 addTool("Charginos.CharginosConfig.getCharginosPhysicsTool"         , "CharginosPhysicsTool" )
+addTool("Charginos.CharginosConfig.getCharginoPlusToPiPlusNeutralino", "CharginoPlusToPiPlusNeutralino")
+addTool("Charginos.CharginosConfig.getCharginoMinusToPiMinusNeutralino", "CharginoMinusToPiMinusNeutralino")
+addTool("Charginos.CharginosConfig.getCharginoPlusToEPlusNeutralino", "CharginoPlusToEPlusNeutralino")
+addTool("Charginos.CharginosConfig.getCharginoMinusToEMinusNeutralino", "CharginoMinusToEMinusNeutralino")
+addTool("Charginos.CharginosConfig.getCharginoPlusToMuPlusNeutralino", "CharginoPlusToMuPlusNeutralino")
+addTool("Charginos.CharginosConfig.getCharginoMinusToMuMinusNeutralino", "CharginoMinusToMuMinusNeutralino")
diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h
index 5276dbd7d5bb0637866f3a97317a38bcc5c55b17..fe5f189bd3098fa35b1cb0c4a5c226c690842625 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h
+++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilter.h
@@ -2,66 +2,64 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// an action to query the SD responsible for the storing of the
-// TrackRecords *at the entrance of the ID* if no track it aborts
-// the event - jamie boyd 15 nov 06
+#ifndef G4COSMICFILTER_G4CosmicAndFilter_H
+#define G4COSMICFILTER_G4CosmicAndFilter_H
 
-
-#ifndef G4CosmicAndFilter_H
-#define G4CosmicAndFilter_H
-
-
-#include "G4AtlasInterfaces/IEndEventAction.h"
+#include "G4UserEventAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 #include "StoreGate/StoreGateSvc.h"
 #include "GaudiKernel/ServiceHandle.h"
-namespace G4UA{
-
-
-class G4CosmicAndFilter:
- public AthMessaging, public IEndEventAction
- {
-
- public:
-   
-   struct Config
-   {
-     std::string collectionName="TRTBarrelEntryLayer";
-     std::string collectionName2="CaloEntryLayer";
-   };
-   
-   G4CosmicAndFilter(const Config& config);
-   
-   struct Report
-   {
-     int ntot=0;
-     int npass=0;
-
-     void merge(const Report& rep){
-       ntot+=rep.ntot;
-       npass+=rep.npass;
-     }
-   };
-   
-   const Report& getReport() const
-   { return m_report; }
-   
-   virtual void endOfEvent(const G4Event*) override;
- private:
-   Config m_config;
-   Report m_report;
-   
-   typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
-   /// Pointer to StoreGate (event store by default)
-   mutable StoreGateSvc_t m_evtStore;
-   /// Pointer to StoreGate (detector store by default)
-   mutable StoreGateSvc_t m_detStore;
-   
-}; // class G4CosmicFilter
-
-
-} // namespace G4UA 
 
+namespace G4UA
+{
+
+  /// @class G4CosmicAndFilter
+  /// an action to query the SD responsible for the storing of the
+  /// TrackRecords *at the entrance of the ID* if no track it aborts
+  /// the event - jamie boyd 15 nov 06
+  ///
+  class G4CosmicAndFilter: public AthMessaging, public G4UserEventAction
+  {
+
+    public:
+
+      struct Config
+      {
+        std::string collectionName = "TRTBarrelEntryLayer";
+        std::string collectionName2 = "CaloEntryLayer";
+      };
+
+      G4CosmicAndFilter(const Config& config);
+
+      struct Report
+      {
+        int ntot = 0;
+        int npass = 0;
+
+        void merge(const Report& rep){
+          ntot += rep.ntot;
+          npass += rep.npass;
+        }
+      };
+
+      const Report& getReport() const
+      { return m_report; }
+
+      virtual void EndOfEventAction(const G4Event*) override;
+
+    private:
+      Config m_config;
+      Report m_report;
+
+      typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
+      /// Pointer to StoreGate (event store by default)
+      mutable StoreGateSvc_t m_evtStore;
+      /// Pointer to StoreGate (detector store by default)
+      mutable StoreGateSvc_t m_detStore;
+
+  }; // class G4CosmicFilter
+
+} // namespace G4UA
 
 #endif
diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilterTool.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilterTool.h
index 1b6899986e189a3990fadced7d6433d80aa2f47b..c6f14c7242bf945d092bb4e521c5978cdb8b12d7 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilterTool.h
+++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicAndFilterTool.h
@@ -2,36 +2,40 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef G4COSMICFILTER_G4UA__G4COSMICANDFILTERTOOL_H 
-#define G4COSMICFILTER_G4UA__G4COSMICANDFILTERTOOL_H 
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
+#ifndef G4COSMICFILTER_G4UA__G4COSMICANDFILTERTOOL_H
+#define G4COSMICFILTER_G4UA__G4COSMICANDFILTERTOOL_H
+
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4CosmicFilter/G4CosmicAndFilter.h"
 
-namespace G4UA{ 
-  
-  class G4CosmicAndFilterTool: 
-  public ActionToolBaseReport<G4CosmicAndFilter>,
-    public IEndEventActionTool
-    {
-      
+namespace G4UA
+{
+
+  class G4CosmicAndFilterTool: public ActionToolBaseReport<G4CosmicAndFilter>,
+                               public IG4EventActionTool
+  {
+
     public:
 
       G4CosmicAndFilterTool(const std::string& type, const std::string& name,const IInterface* parent);
-      virtual IEndEventAction* getEndEventAction() override final 
 
-      { return static_cast<IEndEventAction*>( getAction() ); }
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
       virtual StatusCode finalize() override;
 
     protected:
+
       virtual std::unique_ptr<G4CosmicAndFilter> makeAction() override final;
 
     private:
+
       G4CosmicAndFilter::Config m_config;
-    }; // class G4CosmicAndFilterTool
-  
-  
-} // namespace G4UA 
+
+  }; // class G4CosmicAndFilterTool
+
+} // namespace G4UA
+
 #endif
diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h
old mode 100755
new mode 100644
index 51970ab7c5ff5dd0e75117d791a775fa066bf9bd..82bab432ee77d9fe3e4d659850790b76a0445c39
--- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h
+++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilter.h
@@ -2,69 +2,65 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// an action to query the SD responsible for the storing of the
-// TrackRecords *at the entrance of the ID* if no track it aborts
-// the event - jamie boyd 15 nov 06
+#ifndef G4COSMICFILTER_G4CosmicFilter_H
+#define G4COSMICFILTER_G4CosmicFilter_H
 
-
-#ifndef G4CosmicFilter_H
-#define G4CosmicFilter_H
-
-
-#include "G4AtlasInterfaces/IEndEventAction.h"
+#include "G4UserEventAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 #include "StoreGate/StoreGateSvc.h"
 #include "GaudiKernel/ServiceHandle.h"
 
 
-namespace G4UA{
-  class G4CosmicFilter:
-  public AthMessaging, public IEndEventAction
+namespace G4UA
+{
+
+  /// @class G4CosmicFilter
+  /// an action to query the SD responsible for the storing of the
+  /// TrackRecords *at the entrance of the ID* if no track it aborts
+  /// the event - jamie boyd 15 nov 06
+  class G4CosmicFilter: public AthMessaging, public G4UserEventAction
   {
-    
-  public:
-    
-    struct Config
-    {
-      std::string collectionName="CaloEntryLayer";
-      int PDGId=0;
-      double ptMin=-1;
-      double ptMax=-1;
-    };
-    
-    struct Report
-    {
-      
-      int ntot=0;
-      int npass=0;
-      void merge(const Report& rep){
-	ntot+=rep.ntot;
-	ntot+=rep.npass;
-      }
-    };
-    
-    G4CosmicFilter(const Config& config);
-    const Report& getReport() const
-    { return m_report; }
-    
-    virtual void endOfEvent(const G4Event*) override;
-  
-  private:
-    Config m_config;
-    Report m_report;
-
-    typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
-    /// Pointer to StoreGate (event store by default)
-    mutable StoreGateSvc_t m_evtStore;
-    /// Pointer to StoreGate (detector store by default)
-    mutable StoreGateSvc_t m_detStore;
-    
-  }; // class G4CosmicFilter
-  
-  
-} // namespace G4UA 
 
+    public:
+
+      struct Config
+      {
+        std::string collectionName = "CaloEntryLayer";
+        int PDGId = 0;
+        double ptMin = -1;
+        double ptMax = -1;
+      };
+
+      struct Report
+      {
+        int ntot = 0;
+        int npass = 0;
+        void merge(const Report& rep){
+          ntot += rep.ntot;
+          ntot += rep.npass;
+        }
+      };
+
+      G4CosmicFilter(const Config& config);
+      const Report& getReport() const
+      { return m_report; }
+
+      virtual void EndOfEventAction(const G4Event*) override;
+
+    private:
+
+      Config m_config;
+      Report m_report;
+
+      typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
+      /// Pointer to StoreGate (event store by default)
+      mutable StoreGateSvc_t m_evtStore;
+      /// Pointer to StoreGate (detector store by default)
+      mutable StoreGateSvc_t m_detStore;
+
+  }; // class G4CosmicFilter
 
+} // namespace G4UA
 
 #endif
diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilterTool.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilterTool.h
index b99cfa51a6d2a85ef3de7e6dbf8f9ea1ff627ec5..1fa48ee029b0638b12a63ac746d0a6ed4fcbd080 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilterTool.h
+++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicFilterTool.h
@@ -2,32 +2,40 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef G4COSMICFILTER_G4UA__G4COSMICFILTERTOOL_H 
-#define G4COSMICFILTER_G4UA__G4COSMICFILTERTOOL_H 
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
+#ifndef G4COSMICFILTER_G4UA__G4COSMICFILTERTOOL_H
+#define G4COSMICFILTER_G4UA__G4COSMICFILTERTOOL_H
+
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4CosmicFilter/G4CosmicFilter.h"
-namespace G4UA{ 
 
+namespace G4UA
+{
+
+  class G4CosmicFilterTool: public ActionToolBaseReport<G4CosmicFilter>,
+                            public IG4EventActionTool
+  {
+
+    public:
+
+      G4CosmicFilterTool(const std::string& type, const std::string& name,const IInterface* parent);
+
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
+
+      virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual StatusCode finalize() override;
+
+    protected:
+
+      virtual std::unique_ptr<G4CosmicFilter> makeAction() override final;
 
-class G4CosmicFilterTool: 
-public ActionToolBaseReport<G4CosmicFilter>,
- public IEndEventActionTool
- {
+    private:
 
-public:
-G4CosmicFilterTool(const std::string& type, const std::string& name,const IInterface* parent);
-virtual IEndEventAction* getEndEventAction() override final 
- { return static_cast<IEndEventAction*>( getAction() ); }
-virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
-virtual StatusCode finalize() override;
-protected:
-virtual std::unique_ptr<G4CosmicFilter> makeAction() override final;
-private:
-G4CosmicFilter::Config m_config;
+      G4CosmicFilter::Config m_config;
 
-}; // class G4CosmicFilterTool
+  }; // class G4CosmicFilterTool
 
+} // namespace G4UA
 
-} // namespace G4UA 
 #endif
diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h
index 5d88e28c654f38a8fceb56df0932fe15ff372e10..e85859c8df37e095b9bac19ee2072cdd3467cce7 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h
+++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilter.h
@@ -2,68 +2,64 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// an action to query the SD responsible for the storing of the
-// TrackRecords *at the entrance of the ID* if no track it aborts
-// the event - jamie boyd 15 nov 06
+#ifndef G4COSMICFILTER_G4CosmicOrFilter_H
+#define G4COSMICFILTER_G4CosmicOrFilter_H
 
-
-#ifndef G4CosmicOrFilter_H
-#define G4CosmicOrFilter_H
-
-
-#include "G4AtlasInterfaces/IEndEventAction.h"
+#include "G4UserEventAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 #include "StoreGate/StoreGateSvc.h"
 #include "GaudiKernel/ServiceHandle.h"
 
-namespace G4UA{
-
+namespace G4UA
+{
 
-  class G4CosmicOrFilter:
-  public AthMessaging, public IEndEventAction
+  /// @class G4CosmicOrFilter
+  /// an action to query the SD responsible for the storing of the
+  /// TrackRecords *at the entrance of the ID* if no track it aborts
+  /// the event - jamie boyd 15 nov 06
+  class G4CosmicOrFilter : public AthMessaging, public G4UserEventAction
   {
-    
-  public:
-    
-    struct Config
-    {
-      std::string collectionName="TRTBarrelEntryLayer";
-      std::string collectionName2="CaloEntryLayer";
-      std::string collectionName3="TRTBarrelEntryLayer";
-    };
-    
-    G4CosmicOrFilter(const Config& config);
-    
-    struct Report
-    {
-      int ntot=0;
-      int npass=0;
-      void merge(const Report& rep){
-        ntot+=rep.ntot;
-        npass+=rep.npass;
-      }
-    };
-    
-    const Report& getReport() const
-    { return m_report; }
-    
-    virtual void endOfEvent(const G4Event*) override;
-  private:
-    Config m_config;
-    Report m_report;
-    
-    typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
-    /// Pointer to StoreGate (event store by default)
-    mutable StoreGateSvc_t m_evtStore;
-    /// Pointer to StoreGate (detector store by default)
-    mutable StoreGateSvc_t m_detStore;
-    
-}; // class G4CosmicOrFilter
-
-
-} // namespace G4UA 
 
+    public:
+
+      struct Config
+      {
+        std::string collectionName = "TRTBarrelEntryLayer";
+        std::string collectionName2 = "CaloEntryLayer";
+        std::string collectionName3 = "TRTBarrelEntryLayer";
+      };
+
+      G4CosmicOrFilter(const Config& config);
+
+      struct Report
+      {
+        int ntot = 0;
+        int npass = 0;
+        void merge(const Report& rep){
+          ntot += rep.ntot;
+          npass += rep.npass;
+        }
+      };
+
+      const Report& getReport() const
+      { return m_report; }
+
+      virtual void EndOfEventAction(const G4Event*) override;
+
+    private:
+
+      Config m_config;
+      Report m_report;
+
+      typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
+      /// Pointer to StoreGate (event store by default)
+      mutable StoreGateSvc_t m_evtStore;
+      /// Pointer to StoreGate (detector store by default)
+      mutable StoreGateSvc_t m_detStore;
+
+  }; // class G4CosmicOrFilter
 
+} // namespace G4UA
 
 #endif
diff --git a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilterTool.h b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilterTool.h
index 3bb7b69b5437f1fbd5095a16b37b9d237798673a..2aa2662733f8e621b32cab656c4728b8ca873950 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilterTool.h
+++ b/Simulation/G4Extensions/G4CosmicFilter/G4CosmicFilter/G4CosmicOrFilterTool.h
@@ -2,33 +2,33 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef G4COSMICFILTER_G4UA__G4COSMICORFILTERTOOL_H 
-#define G4COSMICFILTER_G4UA__G4COSMICORFILTERTOOL_H 
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
+#ifndef G4COSMICFILTER_G4UA__G4COSMICORFILTERTOOL_H
+#define G4COSMICFILTER_G4UA__G4COSMICORFILTERTOOL_H
+
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4CosmicFilter/G4CosmicOrFilter.h"
 
-namespace G4UA{ 
-  
-  class G4CosmicOrFilterTool: 
-  public ActionToolBaseReport<G4CosmicOrFilter>,
+namespace G4UA
+{
 
-    public IEndEventActionTool
-    {
-      
+  class G4CosmicOrFilterTool : public ActionToolBaseReport<G4CosmicOrFilter>,
+                               public IG4EventActionTool
+  {
     public:
       G4CosmicOrFilterTool(const std::string& type, const std::string& name,const IInterface* parent);
-      virtual IEndEventAction* getEndEventAction() override final 
-      { return static_cast<IEndEventAction*>( getAction() ); }
-      
+
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
+
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
       virtual StatusCode finalize() override;
     protected:
       virtual std::unique_ptr<G4CosmicOrFilter> makeAction() override final;
     private:
       G4CosmicOrFilter::Config m_config;
-    }; // class G4CosmicOrFilterTool
-  
-  
-} // namespace G4UA 
+  }; // class G4CosmicOrFilterTool
+
+} // namespace G4UA
+
 #endif
diff --git a/Simulation/G4Extensions/G4CosmicFilter/cmt/requirements b/Simulation/G4Extensions/G4CosmicFilter/cmt/requirements
deleted file mode 100755
index c7453fb247a9c9e8458b52942f7ea6e4ad1baa5b..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/G4CosmicFilter/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package G4CosmicFilter
-
-author Jamie Boyd <Jamie.Boyd@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*     External
-use G4AtlasTools        G4AtlasTools-*       Simulation/G4Atlas
-use G4AtlasInterfaces	G4AtlasInterfaces-*  Simulation/G4Atlas
-use AthenaBaseComps AthenaBaseComps-* Control
-use StoreGate             StoreGate-*              Control
-
-
-private
-use Geant4              Geant4-*             External
-use TrackRecord         TrackRecord-*        Simulation/G4Sim
-use MCTruth             MCTruth-*            Simulation/G4Sim
-use CxxUtils            CxxUtils-*              Control
-
-end_private
-
-library G4CosmicFilter ../src/*.cxx ../src/components/*.cxx
-
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Simulation/G4Extensions/G4CosmicFilter/doc/packagedoc.h b/Simulation/G4Extensions/G4CosmicFilter/doc/packagedoc.h
index 37bc27f38b91207f3b5641425aabfd84649a8eeb..f092a3d174deef8ee56e3d72008f6791f8a4fb28 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/doc/packagedoc.h
+++ b/Simulation/G4Extensions/G4CosmicFilter/doc/packagedoc.h
@@ -17,16 +17,6 @@ The package has three classes:
  - G4CosmicFilter : This algorithm checks for a cosmic ray having passed through the selected volume
  - G4CosmicAndFilter and G4CosmicOrFilter : These algorithms allow users to "and" or "or" two volumes in order to get a more precise selection criterion.  This is used for the pixel detector (and'ed with the TRT barrel in order to ensure the track passes through the sensitive volumes rather than the services).
 
-@ref used_G4CosmicFitter
 
-@ref requirements_G4CosmicFitter
 
 */
-
-/**
-@page used_G4CosmicFitter Used Packages
-*/
-
-/**
-@page requirements_G4CosmicFitter Requirements
-*/
diff --git a/Simulation/G4Extensions/G4CosmicFilter/share/G4CosmicAndFilter.py b/Simulation/G4Extensions/G4CosmicFilter/share/G4CosmicAndFilter.py
deleted file mode 100644
index eb8f56ea328702211c1b8cedee6a6b178191af2d..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/G4CosmicFilter/share/G4CosmicAndFilter.py
+++ /dev/null
@@ -1,13 +0,0 @@
-## add G4CosmicFilter action...
-#from G4AtlasApps import PyG4Atlas
-#MyAction= PyG4Atlas.UserAction('G4CosmicFilter','G4CosmicAndFilter',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step'])
-#
-##MyAction= PyG4Atlas.UserAction('G4CosmicFilter','G4CosmicFilter',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step'])
-#
-##actionProperties={"VolumeName":"CaloEntryLayer"}
-##actionProperties={"VolumeName":"MuonExitLayer"}
-#actionProperties={"VolumeName":"TRTBarrelEntryLayer"}
-#actionProperties={"VolumeName2":"PixelEntryLayer"}
-#
-#MyAction.set_Properties(actionProperties)
-#AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(MyAction)
diff --git a/Simulation/G4Extensions/G4CosmicFilter/share/G4CosmicFilter.py b/Simulation/G4Extensions/G4CosmicFilter/share/G4CosmicFilter.py
deleted file mode 100755
index 16562793ae125630925388ef05c38fffc8d72d5c..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/G4CosmicFilter/share/G4CosmicFilter.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#from G4AtlasApps import PyG4Atlas, AtlasG4Eng
-#from G4AtlasApps.SimFlags import simFlags
-#MyAction = PyG4Atlas.UserAction('G4CosmicFilter','G4CosmicFilter',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step'])
-#
-#volumeName="CaloEntryLayer"
-#if simFlags.CosmicFilterVolumeName=="Muon":
-#    volumeName="MuonExitLayer"
-#if simFlags.CosmicFilterVolumeName=="Calo":
-#    volumeName="MuonEntryLayer"
-#if simFlags.CosmicFilterVolumeName=="TRT_Barrel":
-#    volumeName="TRTBarrelEntryLayer"
-#if simFlags.CosmicFilterVolumeName=="TRT_EC":
-#    volumeName="TRTECAEntryLayer"
-#if simFlags.CosmicFilterVolumeName=="SCT_Barrel":
-#    volumeName="SCTBarrelEntryLayer"
-#if simFlags.CosmicFilterVolumeName=="Pixel":
-#    volumeName="PixelEntryLayer"
-#print 'G4CosmicFilter: Filter volume is %s' % volumeName
-#
-#if simFlags.CosmicFilterVolumeName=="TRT_EC":
-#    print 'G4CosmicFilter: adding TRTECBEntryLayer'
-#    MyAction= PyG4Atlas.UserAction('G4CosmicFilter','G4CosmicAndFilter',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step'])
-#    actionProperties={"VolumeName":volumeName,"VolumeName2":"TRTECBEntryLayer"}
-#else:
-#    actionProperties={"VolumeName":volumeName}
-#
-#if simFlags.CosmicFilterVolumeName2.statusOn:
-#    if simFlags.CosmicFilterVolumeName2=="Muon":
-#        volumeName2="MuonExitLayer"
-#    if simFlags.CosmicFilterVolumeName=="Calo":
-#        volumeName="MuonEntryLayer"
-#    if simFlags.CosmicFilterVolumeName2=="InnerDetector":
-#        volumeName2="CaloEntryLayer"
-#    if simFlags.CosmicFilterVolumeName2=="TRT_Barrel":
-#        volumeName2="TRTBarrelEntryLayer"
-#    if simFlags.CosmicFilterVolumeName2=="TRT_EC":
-#        volumeName2="TRTECAEntryLayer"
-#    if simFlags.CosmicFilterVolumeName2=="SCT_Barrel":
-#        volumeName2="SCTBarrelEntryLayer"
-#    if simFlags.CosmicFilterVolumeName2=="Pixel":
-#        volumeName2="PixelEntryLayer"
-#    if "volumeName2" in dir():
-#        print 'G4CosmicFilter: Filter volume #2 is %s' % volumeName2
-#        if simFlags.CosmicFilterVolumeName2=="TRT_EC":
-#            print 'G4CosmicFilter: adding TRTECBEntryLayer'
-#            MyAction = PyG4Atlas.UserAction('G4CosmicFilter','G4CosmicOrFilter',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step'])
-#            actionProperties = {"VolumeName":volumeName,"VolumeName2":volumeName2,"VolumeName3":"TRTECBEntryLayer"}
-#        else:
-#            MyAction = PyG4Atlas.UserAction('G4CosmicFilter','G4CosmicAndFilter',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step'])
-#            actionProperties = {"VolumeName":volumeName,"VolumeName2":volumeName2 }
-#
-#if simFlags.CosmicFilterID.statusOn:
-#    actionProperties["PDG_ID"] = simFlags.CosmicFilterID.get_Value()
-#if simFlags.CosmicFilterPTmin.statusOn:
-#    actionProperties["pTmin"] = simFlags.CosmicFilterPTmin.get_Value()
-#if simFlags.CosmicFilterPTmax.statusOn:
-#    actionProperties["pTmax"] = simFlags.CosmicFilterPTmax.get_Value()
-#
-#MyAction.set_Properties(actionProperties)
-#AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(MyAction)
diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx
index 0999b63835eea0478e33a8c033ffdf039495f373..16d57f88b3d87cee8f129bdb242116a05c9b2f77 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx
+++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilter.cxx
@@ -8,24 +8,25 @@
 #include "G4RunManager.hh"
 #include "G4Event.hh"
 
-
 #include "StoreGate/ReadHandle.h"
 
 #include "GaudiKernel/Bootstrap.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/IMessageSvc.h"
 
-namespace G4UA{
-
+namespace G4UA
+{
 
-  G4CosmicAndFilter::G4CosmicAndFilter(const Config& config):
-    AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ),"G4CosmicAndFilter"),
-    m_config(config),m_report(),
-    m_evtStore("StoreGateSvc/StoreGateSvc","G4CosmicAndFilter"),
-    m_detStore("StoreGateSvc/DetectorStore","G4CosmicAndFilter"){;
+  G4CosmicAndFilter::G4CosmicAndFilter(const Config& config)
+    : AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ), "G4CosmicAndFilter"),
+      m_config(config), m_report(),
+      m_evtStore("StoreGateSvc/StoreGateSvc", "G4CosmicAndFilter"),
+      m_detStore("StoreGateSvc/DetectorStore", "G4CosmicAndFilter")
+  {
   }
 
-  void G4CosmicAndFilter::endOfEvent(const G4Event*){;
+  void G4CosmicAndFilter::EndOfEventAction(const G4Event*)
+  {
 
     m_report.ntot++;
     int counter(0);
@@ -38,14 +39,14 @@ namespace G4UA{
       {
 	counter = coll->size();
       }
-    
+
     if (counter==0)
       {
 	ATH_MSG_INFO("aborting event due to failing AND filter");
 	G4RunManager::GetRunManager()->AbortEvent();
 	return;
       }
-    
+
     SG::ReadHandle <TrackRecordCollection> coll2(m_config.collectionName2);
     if (! coll2.isValid())
     {
@@ -62,11 +63,10 @@ namespace G4UA{
 	G4RunManager::GetRunManager()->AbortEvent();
 	return;
       }
-    
+
     m_report.npass++;
     return;
 
   }
 
-
-} // namespace G4UA 
+} // namespace G4UA
diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilterTool.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilterTool.cxx
index e107ed4a93b4f4299f56d353ac30a3bf333346d2..3846309dbd5b32810767ffbb6feb07c96be1624d 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilterTool.cxx
+++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicAndFilterTool.cxx
@@ -4,36 +4,41 @@
 
 #include "CxxUtils/make_unique.h"
 #include "G4CosmicFilter/G4CosmicAndFilterTool.h"
-namespace G4UA{ 
 
+namespace G4UA
+{
 
-  G4CosmicAndFilterTool::G4CosmicAndFilterTool(const std::string& type, const std::string& name,const IInterface* parent):
-    ActionToolBaseReport<G4CosmicAndFilter>(type, name, parent), m_config(){
-
-    
+  G4CosmicAndFilterTool::G4CosmicAndFilterTool(const std::string& type,
+                                               const std::string& name,
+                                               const IInterface* parent)
+    : ActionToolBaseReport<G4CosmicAndFilter>(type, name, parent),
+      m_config()
+  {
     declareProperty("CollectionName",m_config.collectionName);
     declareProperty("CollectionName2",m_config.collectionName2);
-    
   }
-  std::unique_ptr<G4CosmicAndFilter>  G4CosmicAndFilterTool::makeAction(){
+
+  std::unique_ptr<G4CosmicAndFilter> G4CosmicAndFilterTool::makeAction()
+  {
     ATH_MSG_DEBUG("makeAction");
     auto action = CxxUtils::make_unique<G4CosmicAndFilter>(m_config);
     return std::move(action);
   }
-  StatusCode G4CosmicAndFilterTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-    
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+
+  StatusCode G4CosmicAndFilterTool::queryInterface(const InterfaceID& riid, void** ppvIf)
+  {
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     } return ActionToolBase<G4CosmicAndFilter>::queryInterface(riid, ppvIf);
   }
-  
-  StatusCode G4CosmicAndFilterTool::finalize(){
+
+  StatusCode G4CosmicAndFilterTool::finalize()
+  {
     mergeReports();
     ATH_MSG_INFO( "processed "<< m_report.ntot <<" events, "<< m_report.npass<<" events passed filter" );
     return StatusCode::SUCCESS;
   }
-  
 
-} // namespace G4UA 
+} // namespace G4UA
diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx
old mode 100755
new mode 100644
index c84f03d6d600ce28784a0e672515c59af8f060de..2d419bfefc907396caf1169d394137764b8dc4b8
--- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx
+++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilter.cxx
@@ -11,27 +11,27 @@
 #include "G4Event.hh"
 #include "StoreGate/ReadHandle.h"
 
-
 #include "GaudiKernel/Bootstrap.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/IMessageSvc.h"
 
-namespace G4UA{
+namespace G4UA
+{
 
-  G4CosmicFilter::G4CosmicFilter(const Config& config):
-    AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ),"G4CosmicFilter"),
-    m_config(config),m_report(),
-    m_evtStore("StoreGateSvc/StoreGateSvc","G4CosmicFilter"),
-    m_detStore("StoreGateSvc/DetectorStore","G4CosmicFilter"){
+  G4CosmicFilter::G4CosmicFilter(const Config& config)
+    : AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ), "G4CosmicFilter"),
+      m_config(config), m_report(),
+      m_evtStore("StoreGateSvc/StoreGateSvc","G4CosmicFilter"),
+      m_detStore("StoreGateSvc/DetectorStore","G4CosmicFilter")
+  {
   }
 
-
-  void G4CosmicFilter::endOfEvent(const G4Event*){;
-    
+  void G4CosmicFilter::EndOfEventAction(const G4Event*)
+  {
     int counter(0);
-    
+
     m_report.ntot++;
-    
+
     SG::ReadHandle <TrackRecordCollection> coll(m_config.collectionName);
     if (! coll.isValid() )
       {
@@ -39,9 +39,9 @@ namespace G4UA{
 	G4RunManager::GetRunManager()->AbortEvent();
 	return;
       }
-    
+
     counter = coll->size();
-    
+
     if (m_config.PDGId!=0 || m_config.ptMin>0 || m_config.ptMax>0)
       {
 	counter=0;
@@ -53,7 +53,7 @@ namespace G4UA{
 	    counter++;
 	  }
       }
-    
+
     //std::cout << "EndOfEventAction counter is "<<counter<<std::endl;
     if (counter==0)
       {
@@ -61,10 +61,10 @@ namespace G4UA{
 	G4RunManager::GetRunManager()->AbortEvent();
 	return;
       }
-    
+
     m_report.npass++;
     return;
- 
+
   }
 
-} // namespace G4UA 
+} // namespace G4UA
diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilterTool.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilterTool.cxx
index b05d8fca8671c3dd7dcb73e9fe31fd1796796951..b3c5197c5279c442dc26a190536661a7be5e7a69 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilterTool.cxx
+++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicFilterTool.cxx
@@ -5,40 +5,44 @@
 #include "CxxUtils/make_unique.h"
 #include "G4CosmicFilter/G4CosmicFilterTool.h"
 
-namespace G4UA{ 
-
-  G4CosmicFilterTool::G4CosmicFilterTool(const std::string& type, const std::string& name,const IInterface* parent):
-    ActionToolBaseReport<G4CosmicFilter>(type, name, parent), m_config(){
-    
-    declareProperty("CollectionName",m_config.collectionName);
-    declareProperty("PDGId",m_config.PDGId);
-    declareProperty("PtMin",m_config.ptMin);
-    declareProperty("PtMax",m_config.ptMax);
-    
+namespace G4UA
+{
+
+  G4CosmicFilterTool::G4CosmicFilterTool(const std::string& type,
+                                         const std::string& name,
+                                         const IInterface* parent)
+    : ActionToolBaseReport<G4CosmicFilter>(type, name, parent),
+      m_config()
+  {
+    declareProperty("CollectionName", m_config.collectionName);
+    declareProperty("PDGId", m_config.PDGId);
+    declareProperty("PtMin", m_config.ptMin);
+    declareProperty("PtMax", m_config.ptMax);
   }
 
-  std::unique_ptr<G4CosmicFilter>  G4CosmicFilterTool::makeAction(){
+  std::unique_ptr<G4CosmicFilter> G4CosmicFilterTool::makeAction()
+  {
     ATH_MSG_DEBUG("makeAction");
     auto action = CxxUtils::make_unique<G4CosmicFilter>(m_config);
     return std::move(action);
   }
 
-  StatusCode G4CosmicFilterTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-    
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+  StatusCode G4CosmicFilterTool::queryInterface(const InterfaceID& riid, void** ppvIf)
+  {
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     } return ActionToolBase<G4CosmicFilter>::queryInterface(riid, ppvIf);
   }
 
-  StatusCode G4CosmicFilterTool::finalize(){
+  StatusCode G4CosmicFilterTool::finalize()
+  {
     mergeReports();
 
     ATH_MSG_INFO( "processed "<< m_report.ntot <<" events, "<< m_report.npass<<" events passed filter" );
 
     return StatusCode::SUCCESS;
   }
-  
-  
-} // namespace G4UA 
+
+} // namespace G4UA
diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx
index 55d3cecbe401641c8e6d5283bea2fc3e6ad153e9..3553e940a59176aa128382556dceaf0644db6461 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx
+++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilter.cxx
@@ -9,72 +9,58 @@
 #include "G4Event.hh"
 #include "StoreGate/ReadHandle.h"
 
-
 #include "GaudiKernel/Bootstrap.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/IMessageSvc.h"
 
-namespace G4UA{
-  
-  
-  G4CosmicOrFilter::G4CosmicOrFilter(const Config& config):
-    AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ),"G4CosmicOrFilter"),
-    m_config(config),m_report(),
-    m_evtStore("StoreGateSvc/StoreGateSvc","G4CosmicOrFilter"),
-    m_detStore("StoreGateSvc/DetectorStore","G4CosmicOrFilter"){;
+namespace G4UA
+{
+
+  G4CosmicOrFilter::G4CosmicOrFilter(const Config& config)
+    : AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >("MessageSvc"), "G4CosmicOrFilter"),
+      m_config(config), m_report(),
+      m_evtStore("StoreGateSvc/StoreGateSvc","G4CosmicOrFilter"),
+      m_detStore("StoreGateSvc/DetectorStore","G4CosmicOrFilter")
+  {
   }
-  
-  void G4CosmicOrFilter::endOfEvent(const G4Event*){;
-    
+
+  void G4CosmicOrFilter::EndOfEventAction(const G4Event*)
+  {
     int counterOne(0), counterTwo(0), counterThree(0);
     //need way to get "and" or "or" in
     m_report.ntot++;
-    
+
     SG::ReadHandle <TrackRecordCollection> coll(m_config.collectionName);
-    if (! coll.isValid())
-      {
+    if (! coll.isValid()) {
       ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " );
     }
-  else
-    {
+    else {
       counterOne = coll->size();
     }
-  
+
     SG::ReadHandle <TrackRecordCollection> coll2(m_config.collectionName2);
-    if (!coll2.isValid())
-      {
-        ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " );
-      }
-    else
-      {
-        counterTwo = coll2->size();
-      }
-    
-    SG::ReadHandle <TrackRecordCollection> coll3(m_config.collectionName3);
-    if (! coll3.isValid())
-      {
-        ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection" );
-      }
-    else
-      {
-        counterThree = coll3->size();
-      }
-    
-    if (counterOne==0 && counterTwo==0 && counterThree==0)
-      {
-        ATH_MSG_INFO("aborting event due to failing OR filter");
-        G4RunManager::GetRunManager()->AbortEvent();
-      }
-    else
-      {
-        m_report.npass++;
+    if (!coll2.isValid()) {
+      ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection " );
+    }
+    else {
+      counterTwo = coll2->size();
     }
-  return;
- 
-  }
-
-
 
+    SG::ReadHandle <TrackRecordCollection> coll3(m_config.collectionName3);
+    if (! coll3.isValid()) {
+      ATH_MSG_WARNING( "Cannot retrieve TrackRecordCollection" );
+    }
+    else {
+      counterThree = coll3->size();
+    }
 
+    if (counterOne==0 && counterTwo==0 && counterThree==0) {
+      ATH_MSG_INFO("aborting event due to failing OR filter");
+      G4RunManager::GetRunManager()->AbortEvent();
+    }
+    else {
+      m_report.npass++;
+    }
+  }
 
-} // namespace G4UA 
+} // namespace G4UA
diff --git a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilterTool.cxx b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilterTool.cxx
index 680b74202db7d402d690a77631ffad3245ee8a06..b6a9bbc86a39bd8a809c096c7022ce3bbcffdc67 100644
--- a/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilterTool.cxx
+++ b/Simulation/G4Extensions/G4CosmicFilter/src/G4CosmicOrFilterTool.cxx
@@ -4,38 +4,43 @@
 
 #include "CxxUtils/make_unique.h"
 #include "G4CosmicFilter/G4CosmicOrFilterTool.h"
-namespace G4UA{ 
-  
-  
-  G4CosmicOrFilterTool::G4CosmicOrFilterTool(const std::string& type, const std::string& name,const IInterface* parent):
-    ActionToolBaseReport<G4CosmicOrFilter>(type, name, parent), m_config(){
+
+namespace G4UA
+{
+
+  G4CosmicOrFilterTool::G4CosmicOrFilterTool(const std::string& type,
+                                             const std::string& name,
+                                             const IInterface* parent)
+    : ActionToolBaseReport<G4CosmicOrFilter>(type, name, parent),
+      m_config()
+  {
     declareProperty("CollectionName", m_config.collectionName);
     declareProperty("CollectionName2",m_config.collectionName2);
     declareProperty("CollectionName3",m_config.collectionName3);
-    
   }
-  
-  std::unique_ptr<G4CosmicOrFilter>  G4CosmicOrFilterTool::makeAction(){
+
+  std::unique_ptr<G4CosmicOrFilter> G4CosmicOrFilterTool::makeAction()
+  {
     ATH_MSG_DEBUG("makeAction");
     auto action = CxxUtils::make_unique<G4CosmicOrFilter>(m_config);
     return std::move(action);
   }
-  
-  StatusCode G4CosmicOrFilterTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-    
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+
+  StatusCode G4CosmicOrFilterTool::queryInterface(const InterfaceID& riid, void** ppvIf)
+  {
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     } return ActionToolBase<G4CosmicOrFilter>::queryInterface(riid, ppvIf);
   }
-  
-  StatusCode G4CosmicOrFilterTool::finalize(){
+
+  StatusCode G4CosmicOrFilterTool::finalize()
+  {
     mergeReports();
     ATH_MSG_INFO( "processed "<< m_report.ntot <<" events, "<< m_report.npass<<" events passed filter" );
 
     return StatusCode::SUCCESS;
   }
-  
-  
-} // namespace G4UA 
+
+} // namespace G4UA
diff --git a/Simulation/G4Extensions/G4ExternalDecay/cmt/requirements b/Simulation/G4Extensions/G4ExternalDecay/cmt/requirements
deleted file mode 100644
index 9d56e41f0aec497c15a029d6e93d2ee9556f8201..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/G4ExternalDecay/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package G4ExternalDecay
-
-author Andy Haas <ahaas@cern.ch>
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use AtlasFortranPolicy  AtlasFortranPolicy-*
-use Geant4              Geant4-*              External
-use Pythia              Pythia-*              External
-use Lhapdf              Lhapdf-*              External
-
-private
-use AtlasHepMC          AtlasHepMC-*          External
-use Pythia_i            Pythia_i-*            Generators
-end_private
-
-private
-macro_append  fflags "" Linux "  -fno-automatic "
-macro_append  G4ExternalDecay_shlibflags  " $(HepMC_IO_linkopts) "
-end_private
-
-library G4ExternalDecay ../src/*.cxx
-apply_pattern declare_joboptions files="-s=../share *.py"
-apply_pattern installed_library
diff --git a/Simulation/G4Extensions/G4HitFilter/cmt/requirements b/Simulation/G4Extensions/G4HitFilter/cmt/requirements
deleted file mode 100755
index e566342f950c6937303b89b89d1f6df34e27360d..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/G4HitFilter/cmt/requirements
+++ /dev/null
@@ -1,32 +0,0 @@
-package G4HitFilter
-
-author W. H. Bell <W.Bell@cern.ch>
-
-use GaudiInterface      GaudiInterface-*     External
-use AtlasPolicy           AtlasPolicy-*
-
-
-private
-use G4AtlasInterfaces	G4AtlasInterfaces-*  Simulation/G4Atlas
-use AthenaBaseComps AthenaBaseComps-* Control
-use StoreGate             StoreGate-*              Control
-use G4AtlasTools	   G4AtlasTools-*	     Simulation/G4Atlas
-use Geant4                Geant4-*                  External
-use CaloSimEvent          CaloSimEvent-*            Calorimeter
-use InDetSimEvent         InDetSimEvent-*           InnerDetector
-use LArSimEvent           LArSimEvent-*             LArCalorimeter
-use LUCID_SimEvent        LUCID_SimEvent-*          ForwardDetectors/LUCID/LUCID_SimUtils 
-use MuonSimEvent          MuonSimEvent-*            MuonSpectrometer
-use TileSimEvent          TileSimEvent-*            TileCalorimeter
-use CxxUtils            CxxUtils-*              Control
-
-end_private
-
-include_dirs "$(G4HitFilter_root)"
-
-library G4HitFilter ../src/*.cxx ../src/components/*.cxx
-
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Simulation/G4Extensions/G4HitFilter/python/G4HitFilterConfig.py b/Simulation/G4Extensions/G4HitFilter/python/G4HitFilterConfig.py
index de3b8122361ab8c44aa402d9872ff87ebe1e946d..7e91279de22d2492fb62169677f2b969e21372c9 100644
--- a/Simulation/G4Extensions/G4HitFilter/python/G4HitFilterConfig.py
+++ b/Simulation/G4Extensions/G4HitFilter/python/G4HitFilterConfig.py
@@ -8,4 +8,4 @@ def getG4HitFilterTool(name="G4UA::G4HitFilterTool", **kwargs):
     return G4UA__G4HitFilterTool(name, **kwargs)
 
 def addG4HitFilterTool(name="G4UA::G4HitFilterTool",system=False):
-    G4AtlasServicesConfig.addAction(name,['BeginOfRun','EndOfEvent'],system)
+    G4AtlasServicesConfig.addAction(name,['Run','Event'],system)
diff --git a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.cxx b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.cxx
index c0c7c90c42a485defc684ac6a89d2c8048641024..b5c1a40f5f7524e18d2c790adede055fcf7bd510 100755
--- a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.cxx
+++ b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.cxx
@@ -38,7 +38,7 @@ namespace G4UA{
   }
 
 
-  void G4HitFilter::beginOfRun(const G4Run*){;
+  void G4HitFilter::BeginOfRunAction(const G4Run*){
 
     if(m_config.volumenames.size()==0){
 
@@ -85,7 +85,7 @@ namespace G4UA{
   }
 
 
-  void G4HitFilter::endOfEvent(const G4Event*){;
+  void G4HitFilter::EndOfEventAction(const G4Event*){
     unsigned int counter = 0;
 
     m_report.ntot++;
diff --git a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.h b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.h
index 7288ee52c2a79e66e227f1a937e98b3bdc84ae75..497611a2bf39fde0e15dbabd8a8ceded4f7c9a03 100755
--- a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.h
+++ b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilter.h
@@ -12,8 +12,8 @@
 #include <map>
 
 
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserRunAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 #include "StoreGate/StoreGateSvc.h"
@@ -22,7 +22,7 @@
 namespace G4UA{
 
   class G4HitFilter:
-    public AthMessaging, public IEndEventAction,public IBeginRunAction
+    public AthMessaging, public G4UserEventAction, public G4UserRunAction
   {
 
   public:
@@ -49,8 +49,8 @@ namespace G4UA{
     const Report& getReport() const
     { return m_report; }
 
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void beginOfRun(const G4Run*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
   private:
 
     enum hitCntainerTypes {
diff --git a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilterTool.cxx b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilterTool.cxx
index 98d5529951744e6b6f2bca2734b66984304cf09b..6411d9a7dd3ee35a5f1f478c90bf08a1dd0fcfca 100644
--- a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilterTool.cxx
+++ b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilterTool.cxx
@@ -18,14 +18,14 @@ namespace G4UA{
   }
   StatusCode G4HitFilterTool::queryInterface(const InterfaceID& riid, void** ppvIf){
 
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
 
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilterTool.h b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilterTool.h
index f375724aa5eae67fb4404a36168459b8cc29de8b..a20e768f2dd213a4cf74267666be2e11297cc000 100644
--- a/Simulation/G4Extensions/G4HitFilter/src/G4HitFilterTool.h
+++ b/Simulation/G4Extensions/G4HitFilter/src/G4HitFilterTool.h
@@ -4,8 +4,8 @@
 
 #ifndef G4HITFILTER_G4UA__G4HITFILTERTOOL_H
 #define G4HITFILTER_G4UA__G4HITFILTERTOOL_H
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4HitFilter.h"
 
@@ -13,18 +13,18 @@ namespace G4UA{
 
 class G4HitFilterTool:
   public ActionToolBaseReport<G4HitFilter>,
-    public IEndEventActionTool,
-    public IBeginRunActionTool
+    public IG4EventActionTool,
+    public IG4RunActionTool
     {
 
     public:
       G4HitFilterTool(const std::string& type, const std::string& name,const IInterface* parent);
 
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
-      virtual IBeginRunAction* getBeginRunAction() override final
-      { return static_cast<IBeginRunAction*>( getAction() ); }
+      virtual G4UserRunAction* getRunAction() override final
+      { return static_cast<G4UserRunAction*>( getAction() ); }
 
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
       virtual StatusCode finalize() override;
diff --git a/Simulation/G4Extensions/G4ScoringProcess/cmt/requirements b/Simulation/G4Extensions/G4ScoringProcess/cmt/requirements
deleted file mode 100644
index bf6270222ea3e05ab97af2570d5be44c781f47fd..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/G4ScoringProcess/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package G4ScoringProcess
-
-author Andrea Di Simone <Andrea.Di.Simone@cern.ch>
-
-branches src cmt
-
-public
-
-use GaudiInterface      GaudiInterface-*        External
-use AtlasPolicy         AtlasPolicy-*
-
-private
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AtlasCLHEP          AtlasCLHEP-*            External
-use Geant4              Geant4-*                External
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-end_private
-
-
-library G4ScoringProcess ../src/*.cxx -s=components *.cxx
-
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
diff --git a/Simulation/G4Extensions/Gauginos/cmt/requirements b/Simulation/G4Extensions/Gauginos/cmt/requirements
deleted file mode 100755
index d31fe714bc546d23ac862f4bdd1fc018304ca4d1..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/Gauginos/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package Gauginos
-
-author Edoardo Farina <edoardo.maria.farina@cern.ch>
-
-public
-use AtlasPolicy         AtlasPolicy-*
-
-private
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AtlasCLHEP          AtlasCLHEP-*            External
-use Geant4              Geant4-*                External
-use GaudiInterface      GaudiInterface-*        External
-end_private
-
-library Gauginos ../src/*.cxx -s=components *.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
diff --git a/Simulation/G4Extensions/Gauginos/doc/packagedoc.h b/Simulation/G4Extensions/Gauginos/doc/packagedoc.h
index 703fbbf0595cea4c317107380b0f4487fe6dab0e..871098214f304d0d155abe057ff2f208a2c2cdfc 100644
--- a/Simulation/G4Extensions/Gauginos/doc/packagedoc.h
+++ b/Simulation/G4Extensions/Gauginos/doc/packagedoc.h
@@ -18,16 +18,6 @@ The package includes three classes:
  - G4Neutralino : Useful for r-parity conserving mSUGRA models
  - GMSBDecays : Defines both the Neutralino and Gravitino for late decay of the neutralino inside the detector (GMSB studies)
 
-@ref used_Gauginos
 
-@ref requirements_Gauginos
 
 */
-
-/**
-@page used_Gauginos Used Packages
-*/
-
-/**
-@page requirements_Gauginos Requirements
-*/
diff --git a/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py b/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py
index 22fcc73adcc3316a934cec64dfa0acdb5bcfb87f..c5a9d3b62f274dedf77c9874a8b858f13ff3f790 100644
--- a/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py
+++ b/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py
@@ -24,3 +24,10 @@ def getGauginosPhysicsTool(name="GauginosPhysicsTool", **kwargs):
         ##kwargs.setdefault("GravitinoLifetime",    -1);
         ##kwargs.setdefault("GravitinoShortlived",  False);
     return CfgMgr.GauginosPhysicsTool(name, **kwargs)
+
+
+def getNeutralinoToPhotonGravitino(name="NeutralinoToPhotonGravitino", **kwargs):
+    kwargs.setdefault("ParticleName","s_chi_0_1")
+    kwargs.setdefault("BR", 1.0) # Branching Ratio
+    kwargs.setdefault("Daughters","s_G,gamma")
+    return CfgMgr.AddPhysicsDecayTool(name, kwargs)
diff --git a/Simulation/G4Extensions/Gauginos/python/GauginosConfigDb.py b/Simulation/G4Extensions/Gauginos/python/GauginosConfigDb.py
index 0e8a5bfbe1ececd5181866d68947db682a16c56a..938e45e49f09bfa1158e7a7f60b2e2098fb1c987 100644
--- a/Simulation/G4Extensions/Gauginos/python/GauginosConfigDb.py
+++ b/Simulation/G4Extensions/Gauginos/python/GauginosConfigDb.py
@@ -2,3 +2,4 @@
 
 from AthenaCommon.CfgGetter import addTool
 addTool("Gauginos.GauginosConfig.getGauginosPhysicsTool"         , "GauginosPhysicsTool" )
+addTool("Gauginos.GauginosConfig.getNeutralinoToPhotonGravitino", "NeutralinoToPhotonGravitino")
diff --git a/Simulation/G4Extensions/Monopole/cmt/requirements b/Simulation/G4Extensions/Monopole/cmt/requirements
deleted file mode 100755
index fa034255d2aa92b70567aac3b2a65fa2d60537ba..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/Monopole/cmt/requirements
+++ /dev/null
@@ -1,17 +0,0 @@
-package Monopole
-
-author ADA <dellacqu@mail.cern.ch>
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*        External
-private
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AtlasCLHEP          AtlasCLHEP-*            External
-use Geant4              Geant4-*                External
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-end_private
-
-library Monopole *.cxx -s=components *.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
\ No newline at end of file
diff --git a/Simulation/G4Extensions/Monopole/doc/packagedoc.h b/Simulation/G4Extensions/Monopole/doc/packagedoc.h
index 87aa7d62ee3004a252ad614e77f740d6796a8719..25390abbf8fe0473fadf0a0bc95bbe8b1fc2f7e1 100644
--- a/Simulation/G4Extensions/Monopole/doc/packagedoc.h
+++ b/Simulation/G4Extensions/Monopole/doc/packagedoc.h
@@ -17,21 +17,10 @@ This package allows users to introduce magnetic monopoles into the Geant4 simula
   - MonopoleProcessDefinition : Defines which processes are to be applied to the magnetic monopoles as they propagate through the detector.
   - G4mplIonisation , G4mplIonisationModel , G4mplTransportation : Defines several specific processes for the magnetic monopoles.
   
-@ref used_Monopole
 
-@ref requirements_Monopole
-
-*/
-
-/**
-@page used_Monopole Used Packages
-*/
-
-/**
-@page requirements_Monopole Requirements
-*/
 
 doc/mainpage.h
 Monopole/G4Monopole.h
 Monopole/G4mplTransportation.h
 Monopole/MonopoleProcessDefinition.h
+*/
diff --git a/Simulation/G4Extensions/Monopole/share/jobOptions.Qball_Sim_Monopole.py b/Simulation/G4Extensions/Monopole/share/jobOptions.Qball_Sim_Monopole.py
index 07432437b40d1ae15a2d00bfb4e694f9da5c6ca2..e24b03d7343808ecb8f67167ef8ff22ecb1d8218 100644
--- a/Simulation/G4Extensions/Monopole/share/jobOptions.Qball_Sim_Monopole.py
+++ b/Simulation/G4Extensions/Monopole/share/jobOptions.Qball_Sim_Monopole.py
@@ -25,11 +25,11 @@ print "Number of requested events is ", evtmax
 from AthenaCommon.GlobalFlags import globalflags
 globalflags.ConditionsTag = "OFLCOND-SDR-BS7T-04-03"
 
-from G4AtlasApps.SimFlags import SimFlags
-SimFlags.load_atlas_flags()
-#SimFlags.MagneticField.set_Off()
-SimFlags.EventFilter.set_On()
-SimFlags.SimLayout.set_On()
+from G4AtlasApps.SimFlags import simFlags
+simFlags.load_atlas_flags()
+#simFlags.MagneticField.set_Off()
+simFlags.EventFilter.set_On()
+simFlags.SimLayout.set_On()
 
 ## Use single particle generator
 import AthenaCommon.AtlasUnixGeneratorJob
@@ -44,31 +44,20 @@ spgorders = ['pdgcode: constant '+str(PDGcode),
              'pt: constant 1000000']
 
 ## Use the monopole equation of motion for B field propagation
-SimFlags.EquationOfMotion.set_On()
-SimFlags.EquationOfMotion = "MonopoleEquationOfMotion"
+simFlags.EquationOfMotion.set_On()
+simFlags.EquationOfMotion = "MonopoleEquationOfMotion"
 
-## Load Monopole library in the sim init flow
-def load_monopole_lib():
-    from G4AtlasApps import AtlasG4Eng
-    AtlasG4Eng.G4Eng.load_Lib("Monopole")
-SimFlags.initFunctions.add_function("preInitPhysics", load_monopole_lib)
-#SimFlags.G4Commands += ['/tracking/verbose 1']
+## ## Load Monopole library in the sim init flow
+## def load_monopole_lib():
+##     from G4AtlasApps import AtlasG4Eng
+##     AtlasG4Eng.G4Eng.load_Lib("Monopole")
+## simFlags.initFunctions.add_function("preInitPhysics", load_monopole_lib)
+## #simFlags.G4Commands += ['/tracking/verbose 1']
 
-SimFlags.G4Stepper = 'ClassicalRK4'
+simFlags.G4Stepper = 'ClassicalRK4'
+simFlags.OptionalUserActionList.addAction('G4UA::HIPKillerTool', ['Step'])
 
-def setup_hipkiller():
-    from G4AtlasApps import PyG4Atlas,AtlasG4Eng
-    myHipKiller = PyG4Atlas.UserAction('G4UserActions', 'HIPKiller', ['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'])
-    AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(myHipKiller)
-SimFlags.InitFunctions.add_function("postInit", setup_hipkiller)
-
-#def setup_looperkiller():
-#    from G4AtlasApps import PyG4Atlas,AtlasG4Eng
-#    myLooperKiller = PyG4Atlas.UserAction('G4UserActions', 'LooperKiller', ['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'])
-#    myLooperKiller.set_Properties({"MaxSteps":"2000000","PrintSteps":"2","VerboseLevel":"0"})
-#    AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(myLooperKiller)
-
-#SimFlags.InitFunctions.add_function("postInit", setup_looperkiller)
+#simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool', ['Step'])
 
 ## Populate alg sequence
 from AthenaCommon.AlgSequence import AlgSequence
diff --git a/Simulation/G4Extensions/Quirks/cmt/requirements b/Simulation/G4Extensions/Quirks/cmt/requirements
deleted file mode 100644
index a6dafedda5462b07af47d5aa573678b67b970f5b..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/Quirks/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package Quirks
-
-public
-
-use GaudiInterface      GaudiInterface-*        External
-use AtlasPolicy         AtlasPolicy-*
-
-private
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use CxxUtils		CxxUtils-*		Control
-use Geant4              Geant4-*                External
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-use G4AtlasTools        G4AtlasTools-*          Simulation/G4Atlas
-end_private
-
-library Quirks ../src/*.cxx ../src/components/*.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
diff --git a/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.cxx b/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.cxx
index 21ea39768e58796a736388c3dce0f76457c318b5..e29e1999aaf3c3c409283800eb982b7c714b56ad 100755
--- a/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.cxx
+++ b/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.cxx
@@ -33,7 +33,7 @@ DebugSteppingAction::DebugSteppingAction(const Config& config):m_config(config)
  
  DebugSteppingAction::~DebugSteppingAction() {}
  
- void DebugSteppingAction::processStep(const G4Step* step) {
+ void DebugSteppingAction::UserSteppingAction(const G4Step* step) {
 #ifndef QUIRKS_STANDALONE
    G4double m_step=m_config.step;
    G4int m_numSteps=m_config.numSteps;
diff --git a/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.h b/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.h
index 004f49a5a9d56473503ad0dae3db3004be1f1182..bf76e6950f97e6d53e3981fca758d88e383db0f6 100644
--- a/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.h
+++ b/Simulation/G4Extensions/Quirks/src/DebugSteppingAction.h
@@ -6,23 +6,13 @@
 #define DEBUGSTEPPINGACTION_H
 
 #include "G4LorentzVector.hh"
-
-#ifdef QUIRKS_STANDALONE
 #include "G4UserSteppingAction.hh"
-#else
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#endif
 
 #ifndef QUIRKS_STANDALONE
 namespace G4UA{
 #endif
 
-class DebugSteppingAction :
-#ifdef QUIRKS_STANDALONE
-    public G4UserSteppingAction
-#else
-    public ISteppingAction
-#endif
+class DebugSteppingAction : public G4UserSteppingAction
 {
 public:
 #ifdef QUIRKS_STANDALONE
@@ -39,8 +29,7 @@ public:
 
     virtual ~DebugSteppingAction();
 
-    virtual void processStep(const G4Step* step) override;
-    virtual void UserSteppingAction(const G4Step* step) {processStep(step);}
+    virtual void UserSteppingAction(const G4Step* step) override;
 
 private:
 #ifndef QUIRKS_STANDALONE
diff --git a/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.cxx b/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.cxx
index 10e1f7cf086809d38b413e0c92c51bcc46a719f2..94a9d315b7dd9254ae092f6e5a9fd13800dc6aeb 100644
--- a/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.cxx
+++ b/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.cxx
@@ -18,8 +18,8 @@ namespace G4UA{
   }
   StatusCode DebugSteppingActionTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.h b/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.h
index 044007557af0faa78f9e99ed694985fd3ffedaab..9d4d825443af1771c7a7814ffd6a597edf1adfd2 100644
--- a/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.h
+++ b/Simulation/G4Extensions/Quirks/src/DebugSteppingActionTool.h
@@ -4,7 +4,7 @@
 
 #ifndef QUIRKS_G4UA__DEBUGSTEPPINGACTIONTOOL_H 
 #define QUIRKS_G4UA__DEBUGSTEPPINGACTIONTOOL_H 
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "DebugSteppingAction.h"
 namespace G4UA{ 
@@ -14,14 +14,14 @@ namespace G4UA{
   
   class DebugSteppingActionTool: 
   public ActionToolBase<DebugSteppingAction>,
-    public ISteppingActionTool
+    public IG4SteppingActionTool
     {
       
     public:
       DebugSteppingActionTool(const std::string& type, const std::string& name,const IInterface* parent);
       /// retrieves the stepping action
-      virtual ISteppingAction* getSteppingAction() override final 
-      { return static_cast<ISteppingAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final 
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
       /// gaudi interface handling
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
     protected:
diff --git a/Simulation/G4Extensions/RHadrons/cmt/requirements b/Simulation/G4Extensions/RHadrons/cmt/requirements
deleted file mode 100644
index 2d00cca0b80bf130f7b2566002a3d34b2a1ca2c5..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/RHadrons/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package RHadrons
-
-author ADA <dellacqu@mail.cern.ch>
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*        External
-
-private
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AtlasCLHEP          AtlasCLHEP-*            External
-use CxxUtils            CxxUtils-*              Control
-use Geant4              Geant4-*                External
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-use G4AtlasTools        G4AtlasTools-*          Simulation/G4Atlas
-use G4ExternalDecay     G4ExternalDecay-*       Simulation/G4Extensions
-use SimHelpers          SimHelpers-*            Simulation/G4Sim
-end_private
-
-library RHadrons *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern generic_declare_for_link kind=share files='-s=../share *.MeV *.txt' prefix=share name=<name>
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="-s=../share *.py"
diff --git a/Simulation/G4Extensions/RHadrons/share/SG_StepNtuple.py b/Simulation/G4Extensions/RHadrons/share/SG_StepNtuple.py
index f4454490e5590c9fd15f4b3d0d1d675461bcea07..1fc9434f8fa93537c3a565e8af2f9ba5ce09e24c 100644
--- a/Simulation/G4Extensions/RHadrons/share/SG_StepNtuple.py
+++ b/Simulation/G4Extensions/RHadrons/share/SG_StepNtuple.py
@@ -1,6 +1,6 @@
 
 from G4AtlasApps.SimFlags import simFlags
-simFlags.OptionalUserActionList.addAction('G4UA::SG_StepNtupleTool',['BeginOfRun','BeginOfEvent','EndOfEvent','Step'])
+simFlags.OptionalUserActionList.addAction('G4UA::SG_StepNtupleTool',['Run','Event','Step'])
 
 
 theApp.HistogramPersistency = "ROOT"
diff --git a/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.cxx b/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.cxx
index 8ce7393f846163064b4ba8fbf3a6c507891de3d2..23d7cd36c67758b8e317a59c61fef0d65b4150d4 100644
--- a/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.cxx
+++ b/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.cxx
@@ -22,7 +22,7 @@ namespace G4UA{
 SG_StepNtuple::SG_StepNtuple():AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ),"SG_StepNtuple"){;
 }
 
-  void SG_StepNtuple::beginOfRun(const G4Run*){
+  void SG_StepNtuple::BeginOfRunAction(const G4Run*){
     
     
     NTupleFilePtr file1(ntupleSvc(), "/NTUPLES/FILE1");
@@ -130,14 +130,14 @@ SG_StepNtuple::SG_StepNtuple():AthMessaging(Gaudi::svcLocator()->service< IMessa
     
   }
   
-  void SG_StepNtuple::beginOfEvent(const G4Event*){
+  void SG_StepNtuple::BeginOfEventAction(const G4Event*){
     m_nsteps=0;
     rhid=0;//the rhadron index (either the first or second rhadon, usually)
     nevents++; m_evtid=nevents;//since it gets cleared out after every fill...
     
   }
   
-  void SG_StepNtuple::endOfEvent(const G4Event*){
+  void SG_StepNtuple::EndOfEventAction(const G4Event*){
 
     if(! ntupleSvc()->writeRecord("/NTUPLES/FILE1/StepNtuple/10").isSuccess())
       ATH_MSG_ERROR( " failed to write record for this event" );
@@ -145,7 +145,7 @@ SG_StepNtuple::SG_StepNtuple():AthMessaging(Gaudi::svcLocator()->service< IMessa
     //this also seems to zero out all the arrays... so beware!
   }
   
-  void SG_StepNtuple::processStep(const G4Step* aStep){
+  void SG_StepNtuple::UserSteppingAction(const G4Step* aStep){
     if(m_nsteps<50000){
       int pdg = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
       bool rhad=false;
diff --git a/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.h b/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.h
index 111bfa2cef2ac698f3a6099d7944af3eaf98825d..d72190d6f74ede94d2a6b44e2865fc3c3af21bbb 100644
--- a/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.h
+++ b/Simulation/G4Extensions/RHadrons/src/SG_StepNtuple.h
@@ -10,25 +10,24 @@
 #include <vector>
 #include <set>
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserRunAction.hh"
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 namespace G4UA{
   
   
   class SG_StepNtuple:
-  public AthMessaging, public IBeginRunAction,  public IBeginEventAction,  public IEndEventAction,  public ISteppingAction
+  public AthMessaging, public G4UserRunAction, public G4UserEventAction, public G4UserSteppingAction
   {
     
   public:
     SG_StepNtuple();
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
   private:
   
     bool isSUSYParticle(const int id) const;
diff --git a/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.cxx b/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.cxx
index 5b10bdeb8fdeec6ad251d9b88d19a9925c79fbc9..5c17f08c17ef5772a17d8b4332fc5538e513852d 100644
--- a/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.cxx
+++ b/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.cxx
@@ -18,23 +18,18 @@ namespace G4UA{
   }
   StatusCode SG_StepNtupleTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.h b/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.h
index f077eb0569c41229ce037647802b9f4464373c0e..319bf0177747810c3a3555c1918c00dfea39b2fe 100644
--- a/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.h
+++ b/Simulation/G4Extensions/RHadrons/src/SG_StepNtupleTool.h
@@ -5,10 +5,9 @@
 #ifndef RHADRONS_G4UA__SG_STEPNTUPLETOOL_H 
 #define RHADRONS_G4UA__SG_STEPNTUPLETOOL_H 
 
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "SG_StepNtuple.h"
 
@@ -21,24 +20,21 @@ namespace G4UA{
 
   class SG_StepNtupleTool: 
   public ActionToolBase<SG_StepNtuple>,
-    public IBeginRunActionTool,  public IBeginEventActionTool,  public IEndEventActionTool,  public ISteppingActionTool
+    public IG4RunActionTool, public IG4EventActionTool, public IG4SteppingActionTool
   {
     
   public:
     /// standard tool ctor
     SG_StepNtupleTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// retrieves BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
-    /// retrieves BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// retrieves EoE action
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
+    /// retrieves run action
+    virtual G4UserRunAction* getRunAction() override final 
+    { return static_cast<G4UserRunAction*>( getAction() ); }
+    /// retrieves event action
+    virtual G4UserEventAction* getEventAction() override final 
+    { return static_cast<G4UserEventAction*>( getAction() ); }
     /// retrieves stepping action
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final 
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     /// gaudi interface manipulation
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
diff --git a/Simulation/G4Extensions/Sleptons/cmt/requirements b/Simulation/G4Extensions/Sleptons/cmt/requirements
deleted file mode 100755
index bcab67b26525f9c1a03be80e44160bf067b9c66e..0000000000000000000000000000000000000000
--- a/Simulation/G4Extensions/Sleptons/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package Sleptons
-
-author Edoardo Farina <edoardo.maria.farina@cern.ch>
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*        External
-
-private
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AtlasCLHEP          AtlasCLHEP-*            External
-use Geant4              Geant4-*                External
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-end_private
-
-library Sleptons ../src/*.cxx -s=components *.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
diff --git a/Simulation/G4Extensions/Sleptons/doc/packagedoc.h b/Simulation/G4Extensions/Sleptons/doc/packagedoc.h
index f6cc37c473e64a43d6db27437432cee1f0b7736f..44f5921879ad41270089b7f8ecd6141de8c01119 100644
--- a/Simulation/G4Extensions/Sleptons/doc/packagedoc.h
+++ b/Simulation/G4Extensions/Sleptons/doc/packagedoc.h
@@ -16,17 +16,6 @@ The package contains only one class:
 
  - SleptonsProcessDefinition : This class adds the appropriate physics processes to the slepton (for example transportation).
 
-@ref used_Sleptons
 
-@ref requirements_Sleptons
 
 */
-
-/**
-@page used_Sleptons Used Packages
-*/
-
-/**
-@page requirements_Sleptons Requirements
-*/
-
diff --git a/Simulation/G4Sim/CTB_G4Sim/cmt/requirements b/Simulation/G4Sim/CTB_G4Sim/cmt/requirements
deleted file mode 100755
index e826d4e74d13c1532b941b15e935209f3f762c71..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/CTB_G4Sim/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package CTB_G4Sim
-
-author MGALLAS <mgallas@mail.cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-
-# Install run-time files
-apply_pattern declare_joboptions files="-s=../share *.py"
-apply_pattern declare_python_modules files="*.py"
-#apply_pattern declare_scripts files="geant4.sh"	
-#alias G4CTB geant4.sh
-apply_pattern declare_runtime files="-s=../data *.xml *.dtd *.txt -s=../G4macros *.mac "
-apply_pattern get_files data=" material.dtd \
-                               TRgeometryinformation.dtd TR_CTBgeomodelgeometry.xml\
-                               Tile.dtd TileDM.dtd\
-                               phantombarrel.dtd  muonwall.dtd  combinedscintillator.dtd\
-                               deadmaterial.dtd larcrate.dtd\
-                               PDGTABLE.MeV"
diff --git a/Simulation/G4Sim/FADS/FadsControl/cmt/requirements b/Simulation/G4Sim/FADS/FadsControl/cmt/requirements
deleted file mode 100644
index 1c978a4aa4e6dfd171b169f9fc1437edb99cb937..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsControl/cmt/requirements
+++ /dev/null
@@ -1,11 +0,0 @@
-package FadsControl
-
-author Andrea DellAcqua
-
-use AtlasPolicy AtlasPolicy-*
-
-use Geant4      Geant4-*        External
-
-library FadsControl *.cxx
-
-apply_pattern installed_library
diff --git a/Simulation/G4Sim/FADS/FadsControl/doc/packagedoc.h b/Simulation/G4Sim/FADS/FadsControl/doc/packagedoc.h
index 36ec6d2e2015a07697642a7e3aeeb1a07ee315fd..34e7ed779e30771533f1a78a263fec9cf4b26373 100644
--- a/Simulation/G4Sim/FADS/FadsControl/doc/packagedoc.h
+++ b/Simulation/G4Sim/FADS/FadsControl/doc/packagedoc.h
@@ -27,17 +27,6 @@ Three other classes are included in this package:
  - FadsActionBase : A generic action that includes all the G4 action types (stepping actions, tracking actions, run actions, stacking actions).  All other action types can inherit from this one and select the methods they wish to implement.
  - SteppingVerboseDef : An interface for G4 stepping verbose within the athena framework
 
-@ref used_FadsControl
 
-@ref requirements_FadsControl
 
 */
-
-/**
-@page used_FadsControl Used Packages
-*/
-
-/**
-@page requirements_FadsControl Requirements
-*/
-
diff --git a/Simulation/G4Sim/FADS/FadsField/cmt/requirements b/Simulation/G4Sim/FADS/FadsField/cmt/requirements
deleted file mode 100755
index 5b39b5cddc7143d04ae23605f291bc4d6ece1498..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsField/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package FadsField
-
-author ADA
-
-use AtlasPolicy AtlasPolicy-*
-
-use Geant4 Geant4-* External
-
-include_dirs "$(FadsField_root)"
-
-library FadsField ../src/*.cxx
-
-apply_pattern installed_library
-
-#=======================================================
-#private
-#
-#macro_remove cppflags "-O3 "
-#macro_remove cppflags "-O "
-#macro_remove cppflags "-Wall "
-#
-#macro_remove CLHEP_pp_cppflags "-DCLHEP_SQR_DEFINED "
-#macro_remove CLHEP_pp_cppflags "-DCLHEP_MAX_MIN_DEFINED "
-
diff --git a/Simulation/G4Sim/FADS/FadsField/doc/packagedoc.h b/Simulation/G4Sim/FADS/FadsField/doc/packagedoc.h
deleted file mode 100644
index e1ce2d39e376a074a6344d9c92ec5d36c640d6c8..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsField/doc/packagedoc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-
-@page FadsField_page 
-
-@ref used_FadsField
-@ref requirements_FadsField
-
-*/
-
-/**
-@page used_FadsField Used Packages
-*/
-
-/**
-@page requirements_FadsField Requirements
-*/
-
-
diff --git a/Simulation/G4Sim/FADS/FadsKinematics/cmt/Makefile b/Simulation/G4Sim/FADS/FadsKinematics/cmt/Makefile
deleted file mode 100755
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsKinematics/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Simulation/G4Sim/FADS/FadsKinematics/cmt/requirements b/Simulation/G4Sim/FADS/FadsKinematics/cmt/requirements
deleted file mode 100644
index a27fc188b931afe20952f27ebaa564d0d599f1f1..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsKinematics/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package FadsKinematics
-
-author ADA
-author Andy Buckley
-
-use AtlasPolicy    AtlasPolicy-*
-use AtlasCLHEP          AtlasCLHEP-*            External
-use AtlasHepMC     AtlasHepMC-*       External
-use Geant4         Geant4-*           External
-
-include_dirs "$(FadsKinematics_root)" "$(FadsKinematics_root)/FadsKinematics"
-
-library FadsKinematics ../src/*.cxx
-
-apply_pattern installed_library
-
-
-private
-
-#macro_remove cppflags "-O3 "
-#macro_remove cppflags "-O "
-#macro_remove cppflags "-Wall "
-
-macro_remove CLHEP_pp_cppflags "-DCLHEP_SQR_DEFINED "
-macro_remove CLHEP_pp_cppflags "-DCLHEP_MAX_MIN_DEFINED "
-
-end_private
diff --git a/Simulation/G4Sim/FADS/FadsKinematics/doc/packagedoc.h b/Simulation/G4Sim/FADS/FadsKinematics/doc/packagedoc.h
deleted file mode 100644
index 188416a3eb130a99fd313f0ae1d431eba62eb36c..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsKinematics/doc/packagedoc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-
-@page FadsKinematics_page 
-
-@ref used_FadsKinematics
-@ref requirements_FadsKinematics
-
-*/
-
-/**
-@page used_FadsKinematics Used Packages
-*/
-
-/**
-@page requirements_FadsKinematics Requirements
-*/
-
-
diff --git a/Simulation/G4Sim/FADS/FadsMaterial/cmt/Makefile b/Simulation/G4Sim/FADS/FadsMaterial/cmt/Makefile
deleted file mode 100755
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsMaterial/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Simulation/G4Sim/FADS/FadsMaterial/cmt/requirements b/Simulation/G4Sim/FADS/FadsMaterial/cmt/requirements
deleted file mode 100755
index 1be5e20e207c93dacd7f6d8dc931b4c57f86e838..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsMaterial/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package FadsMaterial
-
-author ADA
-
-use AtlasPolicy AtlasPolicy-*
-use Geant4 Geant4-* External
-use AtlasCLHEP AtlasCLHEP-* External
-
-include_dirs "$(FadsMaterial_root)" "$(FadsMaterial_root)/FadsMaterial"
-
-library FadsMaterial ../src/*.cxx
-
-apply_pattern installed_library
-
-#=======================================================
-#private
-#
-#macro_remove cppflags "-O3 "
-#macro_remove cppflags "-O "
-#macro_remove cppflags "-Wall "
-#
-#macro_remove CLHEP_pp_cppflags "-DCLHEP_SQR_DEFINED "
-#macro_remove CLHEP_pp_cppflags "-DCLHEP_MAX_MIN_DEFINED "
-
diff --git a/Simulation/G4Sim/FADS/FadsMaterial/doc/packagedoc.h b/Simulation/G4Sim/FADS/FadsMaterial/doc/packagedoc.h
deleted file mode 100644
index e58ac24f7b93586315d6d4ff2eefaeb682700d36..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsMaterial/doc/packagedoc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-
-@page FadsMaterial_page 
-
-@ref used_FadsMaterial
-@ref requirements_FadsMaterial
-
-*/
-
-/**
-@page used_FadsMaterial Used Packages
-*/
-
-/**
-@page requirements_FadsMaterial Requirements
-*/
-
-
diff --git a/Simulation/G4Sim/FADS/FadsPackageLoader/cmt/Makefile b/Simulation/G4Sim/FADS/FadsPackageLoader/cmt/Makefile
deleted file mode 100755
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsPackageLoader/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Simulation/G4Sim/FADS/FadsPackageLoader/cmt/requirements b/Simulation/G4Sim/FADS/FadsPackageLoader/cmt/requirements
deleted file mode 100755
index bf537ef4e5c08641eaa4ec231d66953774286df5..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsPackageLoader/cmt/requirements
+++ /dev/null
@@ -1,19 +0,0 @@
-package FadsPackageLoader
-
-author ADA
-
-use AtlasPolicy         AtlasPolicy-*
-
-private
-use AtlasBoost                  AtlasBoost-*                    External
-end_private
-
-# Add required system libraries for cmake (transparent to CMT)
-apply_pattern cmake_add_libraries target=FadsPackageLoader libraries=dl
-
-include_dirs "$(FadsPackageLoader_root)" "$(FadsPackageLoader_root)/FadsPackageLoader"
-
-library FadsPackageLoader ../src/*.cxx
-
-apply_pattern installed_library
-
diff --git a/Simulation/G4Sim/FADS/FadsPackageLoader/doc/packagedoc.h b/Simulation/G4Sim/FADS/FadsPackageLoader/doc/packagedoc.h
deleted file mode 100644
index 0e964831322a13a8527404b05d3f1029de177a47..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsPackageLoader/doc/packagedoc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-
-@page FadsPackageLoader_page 
-
-@ref used_FadsPackageLoader
-@ref requirements_FadsPackageLoader
-
-*/
-
-/**
-@page used_FadsPackageLoader Used Packages
-*/
-
-/**
-@page requirements_FadsPackageLoader Requirements
-*/
-
-
diff --git a/Simulation/G4Sim/FADS/FadsUtilities/cmt/requirements b/Simulation/G4Sim/FADS/FadsUtilities/cmt/requirements
deleted file mode 100755
index 6cf3bc5e43acb901231370873dfe4a2d146223df..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsUtilities/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package FadsUtilities
-
-author ADA
-
-use AtlasPolicy AtlasPolicy-*
-
-use Geant4 Geant4-* External
-
-include_dirs "$(FadsUtilities_root)" "$(FadsUtilities_root)/FadsUtilities"
-
-library FadsUtilities ../src/*.cxx
-
-apply_pattern installed_library
-
-#=======================================================
-#private
-#
-#macro_remove cppflags "-O3 "
-#macro_remove cppflags "-O "
-#macro_remove cppflags "-Wall "
-#
-#macro_remove CLHEP_pp_cppflags "-DCLHEP_SQR_DEFINED "
-#macro_remove CLHEP_pp_cppflags "-DCLHEP_MAX_MIN_DEFINED "
-
diff --git a/Simulation/G4Sim/FADS/FadsUtilities/doc/packagedoc.h b/Simulation/G4Sim/FADS/FadsUtilities/doc/packagedoc.h
deleted file mode 100644
index de2c4ccc7311e3bd272083d1767f436c4d2773b4..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsUtilities/doc/packagedoc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-
-@page FadsUtilities_page 
-
-@ref used_FadsUtilities
-@ref requirements_FadsUtilities
-
-*/
-
-/**
-@page used_FadsUtilities Used Packages
-*/
-
-/**
-@page requirements_FadsUtilities Requirements
-*/
-
-
diff --git a/Simulation/G4Sim/FADS/FadsXMLParser/cmt/Makefile b/Simulation/G4Sim/FADS/FadsXMLParser/cmt/Makefile
deleted file mode 100755
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsXMLParser/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Simulation/G4Sim/FADS/FadsXMLParser/cmt/requirements b/Simulation/G4Sim/FADS/FadsXMLParser/cmt/requirements
deleted file mode 100755
index a7c75f928f6326686b6c4ff39c3f2a4145ad222a..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsXMLParser/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package FadsXMLParser
-
-author ADA
-
-use AtlasPolicy AtlasPolicy-*
-use AtlasXercesC AtlasXercesC-* External
-
-private
-use FadsMaterial FadsMaterial-* Simulation/G4Sim/FADS
-use FadsUtilities FadsUtilities-* Simulation/G4Sim/FADS
-use AtlasCLHEP AtlasCLHEP-* External
-use Geant4 Geant4-* External
-end_private
-
-
-include_dirs "$(FadsXMLParser_root)"
-
-library FadsXMLParser ../src/*.cxx
-
-apply_pattern installed_library
-
diff --git a/Simulation/G4Sim/FADS/FadsXMLParser/doc/packagedoc.h b/Simulation/G4Sim/FADS/FadsXMLParser/doc/packagedoc.h
deleted file mode 100644
index 9c7c51eea281a3339b3895d1bd16dea3797c2e53..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/FADS/FadsXMLParser/doc/packagedoc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-
-@page FadsXMLParser_page 
-
-@ref used_FadsXMLParser
-@ref requirements_FadsXMLParser
-
-*/
-
-/**
-@page used_FadsXMLParser Used Packages
-*/
-
-/**
-@page requirements_FadsXMLParser Requirements
-*/
-
-
diff --git a/Simulation/G4Sim/G4HiveEx/cmt/requirements b/Simulation/G4Sim/G4HiveEx/cmt/requirements
deleted file mode 100644
index a42ef04c5168855b1834d3745b31542c71efd375..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/G4HiveEx/cmt/requirements
+++ /dev/null
@@ -1,16 +0,0 @@
-package G4HiveEx
-#
-use AtlasPolicy   AtlasPolicy-*
-
-private
-use GaudiInterface      GaudiInterface-*        External
-use AthenaKernel        AthenaKernel-*          Control
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use GeneratorObjects    GeneratorObjects-*      Generators
-use Geant4              Geant4-*                External
-end_private
-
-library G4HiveEx *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
diff --git a/Simulation/G4Sim/G4HiveEx/share/G4HiveExOpts.py b/Simulation/G4Sim/G4HiveEx/share/G4HiveExOpts.py
index 45ea51478d4d72a40bbfbced8cc2ed0f1c6d7b82..337e810ae161aad727f05d8f04b0b033db38590a 100644
--- a/Simulation/G4Sim/G4HiveEx/share/G4HiveExOpts.py
+++ b/Simulation/G4Sim/G4HiveEx/share/G4HiveExOpts.py
@@ -9,10 +9,11 @@
 ## $ athena --threads=4 ./G4HiveExOpts.py
 #
 
+from AthenaCommon.Logging import log as msg
+
 from AthenaCommon.ConcurrencyFlags import jobproperties as jp
 nThreads = jp.ConcurrencyFlags.NumThreads()
 if (nThreads < 1) :
-   from AthenaCommon.Logging import log as msg
    msg.fatal('numThreads must be >0. Did you set the --threads=N option?')
    sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
 
@@ -22,7 +23,6 @@ if (nThreads < 1) :
 msgFmt = "% F%40W%S%5W%e%s%7W%R%T %0W%M"
 svcMgr.MessageSvc.Format = msgFmt
 # svcMgr.MessageSvc.useColors = True
-
 # svcMgr.AthenaHiveEventLoopMgr.OutputLevel = DEBUG
 
 #
@@ -33,10 +33,10 @@ svcMgr.MessageSvc.Format = msgFmt
 # numStores = 1
 # svcMgr.EventDataSvc.NSlots = numStores
 
-# from AthenaCommon.AlgScheduler import AlgScheduler
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
 # AlgScheduler.OutputLevel( DEBUG )
-# AlgScheduler.ShowControlFlow( True )
-# AlgScheduler.ShowDataDependencies( True )
 # AlgScheduler.setThreadPoolSize( nThreads )
 
 # Thread pool service and initialization
@@ -44,29 +44,13 @@ from GaudiHive.GaudiHiveConf import ThreadPoolSvc
 svcMgr += ThreadPoolSvc("ThreadPoolSvc")
 svcMgr.ThreadPoolSvc.ThreadInitTools = ["G4InitTool"]
 
-# Algorithm resource pool
-from GaudiHive.GaudiHiveConf import AlgResourcePool
-svcMgr += AlgResourcePool( OutputLevel = INFO );
-
-
-#
-## Uncomment following to avoid long waits when segfaulting,
-## and add "Root.Stacktrace: no" to your .rootrc file
-#
-# import ROOT
-# ROOT.SetSignalPolicy( ROOT.kSignalFast )
-
-## Output threshold (DEBUG, INFO, WARNING, ERROR, FATAL)
-#ServiceMgr.MessageSvc.OutputLevel = INFO
-
-
 
 ######################################################################################
 #
 ## AthenaCommon flags
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
 athenaCommonFlags.PoolEvgenInput = [
-    '/afs/cern.ch/user/z/zmarshal/public/ForSteve/mc15_13TeV.424000.ParticleGun_single_mu_Pt100.evgen.EVNT.e3580/EVNT.04922446._000001.pool.root.1',
+    '/afs/cern.ch/atlas/offline/ProdData/15.6.11.3/mu_E200_eta0-60-10000.evgen.pool.root',
     #'/afs/cern.ch/atlas/offline/ProdData/16.6.X/16.6.7.Y/ttbar_muplusjets-pythia6-7000.evgen.pool.root',
 ]
 
@@ -74,15 +58,11 @@ athenaCommonFlags.PoolEvgenInput = [
 if 'evtMax' in dir(): pass
 else: evtMax = -1
 
-# check to see if we're running hybrid mp/mt
+# Check to see if we're running hybrid mp/mt
 nProc = jp.ConcurrencyFlags.NumProcs()
 if (nProc > 0) :
 
-   #
-   ## For MP/Hive we need to set the chunk size
-   #
-
-   from AthenaCommon.Logging import log as msg
+   # For MP/Hive we need to set the chunk size
    if (evtMax == -1) :
       msg.fatal('EvtMax must be >0 for hybrid configuration')
       sys.exit(AthenaCommon.ExitCodes.CONFIGURATION_ERROR)
@@ -93,13 +73,11 @@ if (nProc > 0) :
                   evtMax, nProc)
 
    chunkSize = int (evtMax / nProc)
-
    from AthenaMP.AthenaMPFlags import jobproperties as jps
    jps.AthenaMPFlags.ChunkSize = chunkSize
-
    msg.info('AthenaMP workers will process %s events each', chunkSize)
 
-athenaCommonFlags.PoolHitsOutput = "atlasG4.hits.pool.root"
+athenaCommonFlags.PoolHitsOutput = "g4hive.hits.pool.root"
 athenaCommonFlags.EvtMax = evtMax
 
 ######################################################################################
@@ -107,7 +85,7 @@ athenaCommonFlags.EvtMax = evtMax
 ## Job options for Geant4 ATLAS detector simulations
 #
 
-## Detector flags
+# Detector flags
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.ID_setOn()
 DetFlags.Calo_setOn()
@@ -115,105 +93,71 @@ DetFlags.Muon_setOn()
 DetFlags.Lucid_setOff()
 DetFlags.Truth_setOn()
 
-## Global conditions tag
+# Global conditions tag
 from AthenaCommon.GlobalFlags import jobproperties
 jobproperties.Global.ConditionsTag = "OFLCOND-MC12-SIM-00"
 
-## Simulation flags
+# Simulation flags
 from G4AtlasApps.SimFlags import simFlags
 from G4AtlasApps import callbacks
 simFlags.load_atlas_flags()
-#simFlags.RandomSvc = 'AtDSFMTGenSvc'
 
-## Layout tags: see simFlags.SimLayout for allowed values
-## Use the default layout:
+# Layout tags: see simFlags.SimLayout for allowed values
+# Use the default layout:
 simFlags.SimLayout.set_On()
 
-## Set the EtaPhi, VertexSpread and VertexRange checks on
+# Set the EtaPhi, VertexSpread and VertexRange checks on/off
 simFlags.EventFilter.set_Off()
 
-## Set the LAr parameterization
+# Set the LAr parameterization
 #simFlags.LArParameterization = 2
 
-## No magnetic field
+# Magnetic field
 simFlags.MagneticField.set_On()
 
-## Change the field stepper or use verbose G4 tracking
-#from G4AtlasApps import callbacks
-#simFlags.InitFunctions.add_function("postInit", callbacks.use_simplerunge_stepper)
-#simFlags.InitFunctions.add_function("preInitG4", callbacks.use_verbose_tracking)
-
-# Debug output
+# Debug outputs of user actions
 #CfgGetter.getPublicTool('G4UA::AthenaTrackingActionTool').OutputLevel = DEBUG
 
 # Setup the algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence
 topSeq = AlgSequence()
 
-# Currently, Hive requires an algorithm to load the initial data into the
-# whiteboard and kickstart the data dependency chain. This alg must be at the
-# front of the AlgSequence.
-from AthenaCommon import CfgMgr
-topSeq += CfgMgr.SGInputLoader(OutputLevel = INFO, ShowEventDump=False)
-
-# Dependencies are either specified automatically via VarHandles (the preferred
-# way), or via the ExtraInputs/ExtraOutputs properties. Data objects in the
-# latter method are specified as vector of tuples as [(ClassID,'key'),...] or
-# [('ClassName','key'),...] 
-
 # SGInputLoader is a module in SGComps that will do a typeless StoreGate read
 # of data on disk, to preload it in the Whiteboard for other Alorithms to use.
-# Is uses the same syntax as Algorithmic dependency declarations
+# It uses the same syntax as Algorithmic dependency declarations.
+from AthenaCommon import CfgMgr
+topSeq += CfgMgr.SGInputLoader(OutputLevel=INFO, ShowEventDump=False)
 topSeq.SGInputLoader.Load = [('McEventCollection','StoreGateSvc+GEN_EVENT')]
 
 # Add the beam effects algorithm
 from AthenaCommon.CfgGetter import getAlgorithm
 topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True)
 
-## Add the G4 simulation service
+# Add the (python) G4 simulation service.
+# This will kickstart a lot of simulation setup.
 from G4AtlasApps.PyG4Atlas import PyG4AtlasSvc
 svcMgr += PyG4AtlasSvc()
 
+# Explicitly specify the data-flow dependencies of G4AtlasAlg and StreamHITS.
+# This is done like this because currently our VarHandles do not live in the
+# algorithm but rather in Geant4 components.
 # TODO: make this declaration more automatic
 topSeq.G4AtlasAlg.ExtraInputs =  [('McEventCollection','StoreGateSvc+BeamTruthEvent')]
 topSeq.G4AtlasAlg.ExtraOutputs = [('SiHitCollection','StoreGateSvc+SCT_Hits')]
-
 topSeq.StreamHITS.ExtraInputs += topSeq.G4AtlasAlg.ExtraOutputs
 
-# Disable all of the LAr SDs because they are not yet thread-safe
-sdMaster = ToolSvc.SensitiveDetectorMasterTool
-larSDs = [sd for sd in sdMaster.SensitiveDetectors if sd.name().startswith('LAr')]
-for sd in larSDs: sdMaster.SensitiveDetectors.remove(sd)
-
-# Workaround to disable the EventInfoTagBuilder.
-# Not sure how it gets on the sequence.
-try:
-    topSeq.remove(topSeq.EventInfoTagBuilder)
-except AttributeError as e:
-    from AthenaCommon.Logging import log as msg
-    msg.warning('EventInfoTagBuilder no longer on TopSeq')
-    msg.warning('Probably safe to disable workaround now.')
-
 # Increase verbosity of the output stream
 #topSeq.StreamHITS.OutputLevel = DEBUG
 
-# Disable alg filtering - doesn't work in multi-threading
+# Disable alg filtering - doesn't work yet in multi-threading
 topSeq.StreamHITS.AcceptAlgs = []
 
-# theAuditorSvc.Auditors = ["ChronoAuditor", "NameAuditor", "AlgContextAuditor"]
-
-#
-## set which Algorithms can be cloned
-#
-
-#  set algCardinality = 1 to disable cloning for all Algs
+# Override algorithm cloning settings
 algCardinality = jp.ConcurrencyFlags.NumThreads()
-
 if (algCardinality != 1):
     for alg in topSeq:
         name = alg.name()
-        if name in ["StreamHITS"]:
-            # suppress INFO message about Alg unclonability
+        if name == 'StreamHITS':
             alg.Cardinality = 1
         else:
             alg.Cardinality = algCardinality
diff --git a/Simulation/G4Sim/MCTruth/cmt/requirements b/Simulation/G4Sim/MCTruth/cmt/requirements
deleted file mode 100644
index 338757275ccdd72b4d09cfe4beaf068915e67e9c..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/MCTruth/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package MCTruth
-
-public
-use AtlasPolicy  AtlasPolicy-*
-
-use AtlasHepMC   AtlasHepMC-*   External
-use CLIDSvc      CLIDSvc-*      Control
-use Geant4       Geant4-*       External
-use GeneratorObjects GeneratorObjects-* Generators
-private
-use ISF_Event    ISF_Event-*    Simulation/ISF/ISF_Core
-use SimHelpers   SimHelpers-*   Simulation/G4Sim
-end_private
-
-include_dirs "$(MCTruth_root)"
-
-library MCTruth ../src/*.cxx
-apply_pattern installed_library
-
-#private
-# use this to enable debugging for this package
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/G4Sim/MCTruth/doc/packagedoc.h b/Simulation/G4Sim/MCTruth/doc/packagedoc.h
index 09c2e7d5259779a3b6d3456456ef8fab0448109d..a19f1f154a8615d323dbe5d9160c6f2b331e32d0 100644
--- a/Simulation/G4Sim/MCTruth/doc/packagedoc.h
+++ b/Simulation/G4Sim/MCTruth/doc/packagedoc.h
@@ -28,17 +28,6 @@ The MCTruth package includes the following classes:
  - TruthStrategyManager : The manager that keeps track of the truth strategies and where they are to be applied.
  - TruthStrategyManagerMessenger : An obsolete messenger for the TruthStrategyManager
 
-@ref used_MCTruth
 
-@ref requirements_MCTruth
 
 */
-
-/**
-@page used_MCTruth Used Packages
-*/
-
-/**
-@page requirements_MCTruth Requirements
-*/
-
diff --git a/Simulation/G4Sim/MCTruthBase/cmt/requirements b/Simulation/G4Sim/MCTruthBase/cmt/requirements
deleted file mode 100644
index 90d262ecb6271c9ac22b806416ebd7f8899e6d5e..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/MCTruthBase/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package MCTruthBase
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use AthenaKernel        AthenaKernel-*          Control
-use AtlasHepMC          AtlasHepMC-*            External
-use Geant4              Geant4-*                External
-use GaudiInterface      GaudiInterface-*        External
-
-private
-use CxxUtils            CxxUtils-*              Control
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-use G4AtlasTools        G4AtlasTools-*          Simulation/G4Atlas
-use SimHelpers          SimHelpers-*            Simulation/G4Sim
-use MCTruth             MCTruth-*               Simulation/G4Sim
-use StoreGate           StoreGate-*             Control
-use TrackRecord         TrackRecord-*           Simulation/G4Sim
-end_private
-
-include_dirs "$(MCTruthBase_root)"
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.cxx b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.cxx
index 1dd5dcca53455a46ef9a3a08ce4543c82737e9a3..b24007a58663243f73f7368369e06d37da630bfd 100644
--- a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.cxx
+++ b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.cxx
@@ -4,15 +4,11 @@
 
 #include "MCTruthSteppingAction.h"
 #include "MCTruth/TrackHelper.h"
-#include "RecordingEnvelope.h"
 
 #include "G4Step.hh"
 #include "G4StepPoint.hh"
 #include "G4TouchableHistory.hh"
-#include "G4SDManager.hh"
 
-#include <map>
-#include <iostream>
 
 namespace G4UA
 {
@@ -65,7 +61,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Beginning of event
   //---------------------------------------------------------------------------
-  void MCTruthSteppingAction::beginOfEvent(const G4Event*)
+  void MCTruthSteppingAction::BeginOfEventAction(const G4Event*)
   {
     // First time initialization
     if(!m_isInitialized) {
@@ -84,7 +80,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Process one tracking step
   //---------------------------------------------------------------------------
-  void MCTruthSteppingAction::processStep(const G4Step* aStep)
+  void MCTruthSteppingAction::UserSteppingAction(const G4Step* aStep)
   {
     if (m_recordingEnvelopes.size() == 0) return;
     TrackHelper trackHelper(aStep->GetTrack());
diff --git a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.h b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.h
index dd5a618cedce5e86359915d688ea4406aa6beccb..935d683efa8866bf701847ed57ad224320134c17 100644
--- a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.h
+++ b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingAction.h
@@ -5,29 +5,34 @@
 #ifndef MCTruthBase_MCTruthSteppingAction_H
 #define MCTruthBase_MCTruthSteppingAction_H
 
+// System includes
 #include <map>
 #include <string>
 #include <vector>
 
+// Framework includes
 #include "GaudiKernel/ToolHandle.h"
-#include "RecordingEnvelope.h"
+#include "AthenaBaseComps/AthMessaging.h"
 
+// Geant4 includes
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
+
+// Local includes
+#include "RecordingEnvelope.h"
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "AthenaBaseComps/AthMessaging.h"
 
 namespace G4UA
 {
 
   /// @class MCTruthSteppingAction
-  /// @brief User action which recording-envelope truth tracks.
+  /// @brief User action which handles recording-envelope truth tracks.
   ///
   /// This user action utilizes RecordingEnvelope objects to save truth tracks
   /// at entry/exit layers of certain configured detector layers.
   ///
-  class MCTruthSteppingAction : public IBeginEventAction,
-                                public ISteppingAction,
+  class MCTruthSteppingAction : public G4UserEventAction,
+                                public G4UserSteppingAction,
                                 public AthMessaging
   {
 
@@ -44,12 +49,12 @@ namespace G4UA
 
       /// Called at the start of each G4 event. Used to ensure that the
       /// TrackRecordCollection WriteHandles are valid.
-      virtual void beginOfEvent(const G4Event*) override final;
+      virtual void BeginOfEventAction(const G4Event*) override final;
 
       /// Process one particle step. If the step crosses a recording
       /// envelope volume boundary, passes the step to the corresponding
       /// RecordingEnvelope to add a TrackRecord.
-      virtual void processStep(const G4Step*) override final;
+      virtual void UserSteppingAction(const G4Step*) override final;
 
     private:
 
diff --git a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingActionTool.cxx b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingActionTool.cxx
index 7fce8f4165b01f6327e1510ba5753ae397fe792c..f99c60a74c6093d30e68427141384b1471f46721 100644
--- a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingActionTool.cxx
+++ b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingActionTool.cxx
@@ -2,8 +2,9 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "MCTruthSteppingActionTool.h"
+#include "CxxUtils/make_unique.h"
+
 
 namespace G4UA
 {
@@ -16,8 +17,8 @@ namespace G4UA
                             const IInterface* parent)
     : ActionToolBase<MCTruthSteppingAction>(type, name, parent)
   {
-    declareInterface<ISteppingActionTool>(this);
-    declareInterface<IBeginEventActionTool>(this);
+    declareInterface<IG4EventActionTool>(this);
+    declareInterface<IG4SteppingActionTool>(this);
     declareProperty("VolumeCollectionMap", m_volumeCollectionMap,
                     "Map of volume name to output collection name");
   }
@@ -27,7 +28,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   StatusCode MCTruthSteppingActionTool::initialize()
   {
-    ATH_MSG_DEBUG("initializing MCTruthSteppingActionTool");
+    ATH_MSG_DEBUG( "Initializing " << name() );
     return StatusCode::SUCCESS;
   }
 
@@ -38,10 +39,9 @@ namespace G4UA
   MCTruthSteppingActionTool::makeAction()
   {
     ATH_MSG_DEBUG("Constructing an MCTruthSteppingAction");
-    auto action =
-      CxxUtils::make_unique<MCTruthSteppingAction>
+    return
+      std::make_unique<MCTruthSteppingAction>
         ( m_volumeCollectionMap, msgSvc(), msg().level() );
-    return std::move(action);
   }
 
 } // namespace G4UA
diff --git a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingActionTool.h b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingActionTool.h
index eeb6c4fe13e364873aaccda9ed689431cde6f1ff..ab9a09972f950fcfb1bcceb887e09fae3724e248 100644
--- a/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingActionTool.h
+++ b/Simulation/G4Sim/MCTruthBase/src/MCTruthSteppingActionTool.h
@@ -10,8 +10,8 @@
 
 // Infrastructure includes
 #include "G4AtlasTools/ActionToolBase.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 
 // STL includes
 #include <string>
@@ -26,8 +26,8 @@ namespace G4UA
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class MCTruthSteppingActionTool : public ActionToolBase<MCTruthSteppingAction>,
-                                    public IBeginEventActionTool,
-                                    public ISteppingActionTool
+                                    public IG4EventActionTool,
+                                    public IG4SteppingActionTool
   {
 
     public:
@@ -36,16 +36,16 @@ namespace G4UA
       MCTruthSteppingActionTool(const std::string& type, const std::string& name,
                                 const IInterface* parent);
 
-      /// Initialize the tool - just for debug printing
-      virtual StatusCode initialize() override;
+      /// Initialize the tool
+      virtual StatusCode initialize() override final;
 
       /// Retrieve the begin-event action
-      virtual IBeginEventAction* getBeginEventAction() override final
-      { return static_cast<IBeginEventAction*>( getAction() ); }
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
       /// Retrieve the stepping action
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
     private:
 
diff --git a/Simulation/G4Sim/SimHelpers/cmt/requirements b/Simulation/G4Sim/SimHelpers/cmt/requirements
deleted file mode 100755
index 013d3733e1e93cccbc66de9f52733ccaf13c924f..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/SimHelpers/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package SimHelpers
-author ADA <dellacqu@mail.cern.ch>
-
-branches src cmt
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*     External
-use StoreGate           StoreGate-*           Control
-
-use Geant4 		Geant4-*		External
-
-macro SimHelpers_linkopts " "
- 
-include_dirs "$(SimHelpers_root)"
-
-
-apply_pattern installed_library
-library SimHelpers ../src/*.cxx
-
-# apply_pattern declare_runtime_extras extras=" "
-
diff --git a/Simulation/G4Sim/SimHelpers/doc/packagedoc.h b/Simulation/G4Sim/SimHelpers/doc/packagedoc.h
index c9bac775eec5fab6cb2c5ed7f73195912c1d7dd0..c1282e72b958e3c3729c5464f70c76d46dfc1784 100644
--- a/Simulation/G4Sim/SimHelpers/doc/packagedoc.h
+++ b/Simulation/G4Sim/SimHelpers/doc/packagedoc.h
@@ -23,16 +23,6 @@ The helpers in this package are:
  - StepHelper : Set of functions for dealing with G4Steps
  - TrackVisualizationHelper : Set of functions for dealing with the visualization of tracks
 
-@ref used_SinHelpers
 
-@ref requirements_SinHelpers
 
 */
-
-/**
-@page used_SinHelpers Used Packages
-*/
-
-/**
-@page requirements_SinHelpers Requirements
-*/
diff --git a/Simulation/G4Sim/TrackRecord/cmt/requirements b/Simulation/G4Sim/TrackRecord/cmt/requirements
deleted file mode 100755
index f564c080a5117b2f8d59c0cbe451ae3e60efac14..0000000000000000000000000000000000000000
--- a/Simulation/G4Sim/TrackRecord/cmt/requirements
+++ /dev/null
@@ -1,20 +0,0 @@
-package TrackRecord
-
-version TrackRecord-00-00-01
-
-author ADA <dellacqu@mail.cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-
-use AtlasCLHEP	AtlasCLHEP-* 	External
-
-use CLIDSvc		CLIDSvc-*		Control
-
-use HitManagement 	HitManagement-*	Simulation
-
-private
-use AtlasReflex	AtlasReflex-* 	External -no_auto_imports
-use AtlasSealCLHEP       AtlasSealCLHEP-*        Database -no_auto_imports
-
-apply_pattern lcgdict dict=TrackRecord selectionfile=selection.xml headerfiles="../TrackRecord/TrackRecordDict.h"
-
diff --git a/Simulation/G4SimCnv/G4SimAthenaPOOL/cmt/requirements b/Simulation/G4SimCnv/G4SimAthenaPOOL/cmt/requirements
deleted file mode 100755
index 97527274c1e54fe436bff8e024d25838dea7d89c..0000000000000000000000000000000000000000
--- a/Simulation/G4SimCnv/G4SimAthenaPOOL/cmt/requirements
+++ /dev/null
@@ -1,20 +0,0 @@
-package G4SimAthenaPOOL
-
-author ADA <dellacqu@mail.cern.ch>
-
-use AtlasPolicy          AtlasPolicy-*
-use AthenaPoolUtilities  AthenaPoolUtilities-*  Database/AthenaPOOL
-use GaudiInterface       GaudiInterface-*       External
-use AtlasSealCLHEP       AtlasSealCLHEP-*       Database
-
-private
-use G4SimTPCnv           G4SimTPCnv-*           Simulation/G4SimCnv
-use TrackRecord          TrackRecord-*          Simulation/G4Sim
-end_private
-
-apply_pattern declare_joboptions files="*.py"
-
-#
-# Create the list of files for which we want to generate a POOL converter
-macro converters "-s=${TrackRecord_root}/TrackRecord TrackRecordCollection.h "
-apply_pattern poolcnv files=${converters}
diff --git a/Simulation/G4SimCnv/G4SimTPCnv/cmt/requirements b/Simulation/G4SimCnv/G4SimTPCnv/cmt/requirements
deleted file mode 100644
index ca1700a59716a566486021a883acbbc0fe5904ed..0000000000000000000000000000000000000000
--- a/Simulation/G4SimCnv/G4SimTPCnv/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package G4SimTPCnv
-
-author  Davide Costanzo       <davide.costanzo@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use AthenaPoolCnvSvc    AthenaPoolCnvSvc-*     Database/AthenaPOOL
-use AthenaPoolServices  AthenaPoolServices-*   Database/AthenaPOOL
-use AtlasCLHEP          AtlasCLHEP-*           External
-use TrackRecord         TrackRecord-*          Simulation/G4Sim
-
-apply_pattern tpcnv_library
-library G4SimTPCnv *.cxx
-
-# The following use is to get the lcgdict pattern.
-# This is "hidden" behind "private" and "no_auto_imports" to keep
-# clients of EventInfo from seeing excess dependencies
-private
-use AtlasReflex         AtlasReflex-*          External -no_auto_imports
-use AthenaKernel        AthenaKernel-*         Control
-
-# Pattern to build the dict lib. User should create a single header
-# file: <package>Dict.h which includes all other .h files. See EventInfoDict
-apply_pattern lcgdict dict=G4SimTPCnv  selectionfile=selection.xml headerfiles="../G4SimTPCnv/G4SimTPCnvDict.h"
-apply_pattern lcgdict dict=OLD_G4SimTPCnv  selectionfile=OLD_selection.xml headerfiles="../G4SimTPCnv/G4SimTPCnvDict.h"
-end_private
\ No newline at end of file
diff --git a/Simulation/G4Utilities/G4Ancillary/G4AncillaryEventAthenaPool/cmt/requirements b/Simulation/G4Utilities/G4Ancillary/G4AncillaryEventAthenaPool/cmt/requirements
deleted file mode 100755
index 139841aebc4e0aa0bc66fb160cc3e0a3546f7903..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4Ancillary/G4AncillaryEventAthenaPool/cmt/requirements
+++ /dev/null
@@ -1,16 +0,0 @@
-package G4AncillaryEventAthenaPool
-
-author Thomas Kittelmann <kittel@nbi.dk>
-
-public
-use AtlasPolicy          AtlasPolicy-*
-use AthenaPoolUtilities  AthenaPoolUtilities-*   Database/AthenaPOOL
-use AtlasSealCLHEP       AtlasSealCLHEP-*        Database
-
-private
-use G4AncillarySimEvent  G4AncillarySimEvent-*   Simulation/G4Utilities/G4Ancillary
-
-public
-
-# Converter for the hit collection
-apply_pattern poolcnv files="-s=${G4AncillarySimEvent_root}/G4AncillarySimEvent ScintillatorHitCollection.h -s=${G4AncillarySimEvent_root}/G4AncillarySimEvent SimpleScintillatorHitCollection.h"
diff --git a/Simulation/G4Utilities/G4Ancillary/G4AncillaryEventAthenaPool/doc/packagedoc.h b/Simulation/G4Utilities/G4Ancillary/G4AncillaryEventAthenaPool/doc/packagedoc.h
index aa9fa331a1730f96c71eae74050e5e5471c16080..9366dff2b800ef60c688e983777ca847d5e262fb 100644
--- a/Simulation/G4Utilities/G4Ancillary/G4AncillaryEventAthenaPool/doc/packagedoc.h
+++ b/Simulation/G4Utilities/G4Ancillary/G4AncillaryEventAthenaPool/doc/packagedoc.h
@@ -14,17 +14,6 @@ This package creates a Pool converter for scintillator hit collections
 
 Pool converters are included for ScintillatorHitCollections and SimpleScintillatorHitCollections.
 
-@ref used_G4AncillaryEventAthenaPool
 
-@ref requirements_G4AncillaryEventAthenaPool
 
 */
-
-/**
-@page used_G4AncillaryEventAthenaPool Used Packages
-*/
-
-/**
-@page requirements_G4AncillaryEventAthenaPool Requirements
-*/
-
diff --git a/Simulation/G4Utilities/G4Ancillary/G4AncillarySimEvent/cmt/requirements b/Simulation/G4Utilities/G4Ancillary/G4AncillarySimEvent/cmt/requirements
deleted file mode 100755
index 42118c0c17146fe0cbea123bc9321f7bbd3a3e79..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4Ancillary/G4AncillarySimEvent/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package G4AncillarySimEvent
-
-author Thomas Kittelmann <kittel@nbi.dk>
-
-use AtlasPolicy         AtlasPolicy-*
-use GeneratorObjects    GeneratorObjects-*  Generators
-use CLIDSvc             CLIDSvc-*           Control
-use HitManagement       HitManagement-*     Simulation
-use AtlasCLHEP          AtlasCLHEP-*        External
-
-apply_pattern installed_library
-library G4AncillarySimEvent *.cxx
-
-private 
-use AtlasReflex   AtlasReflex-*    External -no_auto_imports
-use AtlasReflex     AtlasReflex-*  External -no_auto_imports
-
-apply_pattern lcgdict dict=G4AncillarySimEvent selectionfile=selection.xml headerfiles="../G4AncillarySimEvent/G4AncillarySimEventDict.h"
diff --git a/Simulation/G4Utilities/G4DebuggingTools/cmt/requirements b/Simulation/G4Utilities/G4DebuggingTools/cmt/requirements
deleted file mode 100644
index b9db6e09bbd41d44c3618a961bc9948d54522bc1..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4DebuggingTools/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-package G4DebuggingTools
-author Andrea Di Simone <andrea.di.simone@cern.ch>
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*     External
-
-
-
-
-
-
-private
-use G4AtlasInterfaces	G4AtlasInterfaces-*	Simulation/G4Atlas
-use StoreGate           StoreGate-*             Control
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AtlasTBB            AtlasTBB-*              External
-use CxxUtils            CxxUtils-*              Control
-use Geant4              Geant4-*                External
-use SimHelpers          SimHelpers-*            Simulation/G4Sim
-use G4AtlasTools        G4AtlasTools-*          Simulation/G4Atlas
-use EventInfo           EventInfo-*             Event
-use MCTruth             MCTruth-*               Simulation/G4Sim
-use MCTruthBase         MCTruthBase-*           Simulation/G4Sim
-end_private
-
-library G4DebuggingTools "../src/*.cxx ../src/components/*.cxx"
-
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
-
-
diff --git a/Simulation/G4Utilities/G4DebuggingTools/python/G4DebuggingToolsConfig.py b/Simulation/G4Utilities/G4DebuggingTools/python/G4DebuggingToolsConfig.py
index c8e45e8f89e15bcc453619e0931fa58d26fc673d..795df6923266a450634b2d0dd142dc931b4e260a 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/python/G4DebuggingToolsConfig.py
+++ b/Simulation/G4Utilities/G4DebuggingTools/python/G4DebuggingToolsConfig.py
@@ -4,26 +4,33 @@ from AthenaCommon import CfgMgr, Logging
 from G4AtlasServices import G4AtlasServicesConfig
 
 def getVerboseSelectorTool(name="G4UA::VerboseSelectorTool", **kwargs):
-    from G4DebuggingTools.G4DebuggingToolsConf import G4UA__VerboseSelectorTool
-    return G4UA__VerboseSelectorTool(name, **kwargs)
+    from G4AtlasApps.SimFlags import simFlags
+    # example custom configuration
+    if name in simFlags.UserActionConfig.get_Value().keys():
+        for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems():
+            kwargs.setdefault(prop,value)
+    return CfgMgr.G4UA__VerboseSelectorTool(name, **kwargs)
+
 
 def addVerboseSelectorTool(name="G4UA::VerboseSelectorTool",system=False):
-    G4AtlasServicesConfig.addAction(name,['BeginOfEvent','Step','BeginOfTracking','EndOfTracking'],system)
+    G4AtlasServicesConfig.addAction(name,['Event','Step','Tracking'],system)
+
 
 def getG4AtlantisDumperTool(name="G4UA::G4AtlantisDumperTool", **kwargs):
-    from G4DebuggingTools.G4DebuggingToolsConf import G4UA__G4AtlantisDumperTool
-    return G4UA__G4AtlantisDumperTool(name, **kwargs)
+    return CfgMgr.G4UA__G4AtlantisDumperTool(name, **kwargs)
+
 
 def addG4AtlantisDumperTool(name="G4UA::G4AtlantisDumperTool",system=False):
-    G4AtlasServicesConfig.addAction(name,['EndOfEvent','Step','BeginOfEvent'],system)
+    G4AtlasServicesConfig.addAction(name,['Event','Step','Event'],system)
 
 
 def getEnergyConservationTestTool(name="G4UA::EnergyConservationTestTool", **kwargs):
-    from G4DebuggingTools.G4DebuggingToolsConf import G4UA__EnergyConservationTestTool
-    return G4UA__EnergyConservationTestTool(name, **kwargs)
+    return CfgMgr.G4UA__EnergyConservationTestTool(name, **kwargs)
+
 
 def addEnergyConservationTestTool(name="G4UA::EnergyConservationTestTool",system=False):
-    G4AtlasServicesConfig.addAction(name,['EndOfEvent','Step','BeginOfTracking','EndOfTracking'],system)
+    G4AtlasServicesConfig.addAction(name,['Event','Step','Tracking'],system)
+
 
 def getHyperspaceCatcherTool(name="G4UA::HyperspaceCatcherTool", **kwargs):
     from G4AtlasApps.SimFlags import simFlags
@@ -31,12 +38,12 @@ def getHyperspaceCatcherTool(name="G4UA::HyperspaceCatcherTool", **kwargs):
     if name in simFlags.UserActionConfig.get_Value().keys():
         for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems():
             kwargs.setdefault(prop,value)
+    return CfgMgr.G4UA__HyperspaceCatcherTool(name, **kwargs)
 
-    from G4DebuggingTools.G4DebuggingToolsConf import G4UA__HyperspaceCatcherTool
-    return G4UA__HyperspaceCatcherTool(name, **kwargs)
 
 def addHyperspaceCatcherTool(name="G4UA::HyperspaceCatcherTool",system=False):
-    G4AtlasServicesConfig.addAction(name,['BeginOfRun','Step'],system)
+    G4AtlasServicesConfig.addAction(name,['Run','Step'],system)
+
 
 def getStepNtupleTool(name="G4UA::StepNtupleTool", **kwargs):
     from AthenaCommon.ConcurrencyFlags import jobproperties as concurrencyProps
@@ -46,9 +53,7 @@ def getStepNtupleTool(name="G4UA::StepNtupleTool", **kwargs):
         #from AthenaCommon.AppMgr import theApp
         #theApp.exit(1)
         return False
-
-    from G4DebuggingTools.G4DebuggingToolsConf import G4UA__StepNtupleTool
-    return G4UA__StepNtupleTool(name, **kwargs)
+    return CfgMgr.G4UA__StepNtupleTool(name, **kwargs)
 
 
 def getVolumeDebuggerTool(name="G4UA::VolumeDebuggerTool", **kwargs):
@@ -59,9 +64,8 @@ def getVolumeDebuggerTool(name="G4UA::VolumeDebuggerTool", **kwargs):
     if name in simFlags.UserActionConfig.get_Value().keys():
         for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems():
             kwargs.setdefault(prop,value)
+    return CfgMGr.G4UA__VolumeDebuggerTool(name, **kwargs)
 
-    from G4DebuggingTools.G4DebuggingToolsConf import G4UA__VolumeDebuggerTool
-    return G4UA__VolumeDebuggerTool(name, **kwargs)
 
 def getGeant4SetupCheckerTool(name="G4UA::Geant4SetupCheckerTool", **kwargs):
     # Set reference based on geometry
@@ -77,6 +81,5 @@ def getGeant4SetupCheckerTool(name="G4UA::Geant4SetupCheckerTool", **kwargs):
         for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems():
             kwargs.setdefault(prop,value)
     # Set up the user action
-    from G4DebuggingTools.G4DebuggingToolsConf import G4UA__Geant4SetupCheckerTool
-    return G4UA__Geant4SetupCheckerTool(name, **kwargs)
+    return CfgMgr.G4UA__Geant4SetupCheckerTool(name, **kwargs)
 
diff --git a/Simulation/G4Utilities/G4DebuggingTools/share/EnergyConservation_options.py b/Simulation/G4Utilities/G4DebuggingTools/share/EnergyConservation_options.py
index 10e6b943ee0700d38dadd115c7c425a49e41f52d..1a3f06c938a31a8624513ebb3dcaf507ef29ff90 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/share/EnergyConservation_options.py
+++ b/Simulation/G4Utilities/G4DebuggingTools/share/EnergyConservation_options.py
@@ -1,4 +1,4 @@
 from G4AtlasApps.SimFlags import simFlags
 # new MT actions. Note that this will only work with one thread.
-simFlags.OptionalUserActionList.addAction('G4UA::EnergyConservationTestTool',['PreTracking','Step','PostTracking','EndOfEvent'])
+simFlags.OptionalUserActionList.addAction('G4UA::EnergyConservationTestTool',['Tracking','Step','Event'])
 
diff --git a/Simulation/G4Utilities/G4DebuggingTools/share/G4AtlantisDumper_options.py b/Simulation/G4Utilities/G4DebuggingTools/share/G4AtlantisDumper_options.py
index 65cab5582ebc0a2932fe78e6601246853641cb76..411ccb1e1bcc62a13770ded07816f590206ba77f 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/share/G4AtlantisDumper_options.py
+++ b/Simulation/G4Utilities/G4DebuggingTools/share/G4AtlantisDumper_options.py
@@ -1,4 +1,4 @@
 from G4AtlasApps.SimFlags import simFlags
 # new MT actions. Note that this will only work with one thread.
-simFlags.OptionalUserActionList.addAction('G4UA::G4AtlantisDumperTool',[ 'BeginOfEvent', 'EndOfEvent', 'Step'])
+simFlags.OptionalUserActionList.addAction('G4UA::G4AtlantisDumperTool', ['Event', 'Step'])
 
diff --git a/Simulation/G4Utilities/G4DebuggingTools/share/Geant4SetupChecker_options.py b/Simulation/G4Utilities/G4DebuggingTools/share/Geant4SetupChecker_options.py
index e4ee58b6e8dcea29c70a1754accb4e5292c69b8b..5aa00dcd46adb9c5e33d2bd4701b0ede8d597ec0 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/share/Geant4SetupChecker_options.py
+++ b/Simulation/G4Utilities/G4DebuggingTools/share/Geant4SetupChecker_options.py
@@ -1,6 +1,6 @@
 # Job options to configure the Geant4 setup checker tool
 from G4AtlasApps.SimFlags import simFlags
-simFlags.OptionalUserActionList.addAction('G4UA::Geant4SetupCheckerTool',['BeginOfRun'])
+simFlags.OptionalUserActionList.addAction('G4UA::Geant4SetupCheckerTool',['Run'])
 
 # This flag disables checking so that you can write your own reference file
 #simFlags.UserActionConfig.addConfig('G4UA::Geant4SetupCheckerTool','RunTest',False)
diff --git a/Simulation/G4Utilities/G4DebuggingTools/share/HyperspaceCatcher_options.py b/Simulation/G4Utilities/G4DebuggingTools/share/HyperspaceCatcher_options.py
index 3ffdbb106e2933c0790e61ad56b2f9397ae7d175..b900af612f75f964fde0726cc48eaf0d6607cad2 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/share/HyperspaceCatcher_options.py
+++ b/Simulation/G4Utilities/G4DebuggingTools/share/HyperspaceCatcher_options.py
@@ -1,4 +1,4 @@
 from G4AtlasApps.SimFlags import simFlags
 # new MT actions. Note that this will only work with one thread.
-simFlags.OptionalUserActionList.addAction('G4UA::HyperspaceCatcherTool',['BeginOfRun','Step'])
+simFlags.OptionalUserActionList.addAction('G4UA::HyperspaceCatcherTool',['Run','Step'])
 
diff --git a/Simulation/G4Utilities/G4DebuggingTools/share/StepNtuple_options.py b/Simulation/G4Utilities/G4DebuggingTools/share/StepNtuple_options.py
index d972a7e2aa285130937eb7bdffdc3cbb761f5643..e5f33606bf3286d2143e17c7b6045097d061954d 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/share/StepNtuple_options.py
+++ b/Simulation/G4Utilities/G4DebuggingTools/share/StepNtuple_options.py
@@ -1,6 +1,6 @@
 from G4AtlasApps.SimFlags import simFlags
 # new MT actions. Note that this will only work with one thread.
-simFlags.OptionalUserActionList.addAction('G4UA::StepNtupleTool',['BeginOfEvent','EndOfEvent','BeginOfRun','Step'])
+simFlags.OptionalUserActionList.addAction('G4UA::StepNtupleTool',['Event','Run','Step'])
 # configure the NTupleSvc
 theApp.HistogramPersistency = "ROOT"
 svcMgr.NTupleSvc = Service( "NTupleSvc" )
diff --git a/Simulation/G4Utilities/G4DebuggingTools/share/VerboseSelector_options.py b/Simulation/G4Utilities/G4DebuggingTools/share/VerboseSelector_options.py
index 5eb60ec373843c6a23e0c231efdd92c8cd6989db..835e4444cb6f12fb755ff13d79c69edfd69fef60 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/share/VerboseSelector_options.py
+++ b/Simulation/G4Utilities/G4DebuggingTools/share/VerboseSelector_options.py
@@ -1,5 +1,5 @@
 
 from G4AtlasApps.SimFlags import simFlags
 # new MT actions. Note that this will only work with one thread.
-simFlags.OptionalUserActionList.addAction('G4UA::VerboseSelectorTool',['EndOfEvent','BeginOfTracking','EndOfTracking'])
+simFlags.OptionalUserActionList.addAction('G4UA::VerboseSelectorTool',['Event','Tracking'])
 
diff --git a/Simulation/G4Utilities/G4DebuggingTools/share/VolumeDebugger_options.py b/Simulation/G4Utilities/G4DebuggingTools/share/VolumeDebugger_options.py
index ee53ce0f1580beaf08a0b66bc0f2bf74b5c57d4e..61688b1d4539dcb543ede468c894abc2b884e43a 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/share/VolumeDebugger_options.py
+++ b/Simulation/G4Utilities/G4DebuggingTools/share/VolumeDebugger_options.py
@@ -6,5 +6,5 @@
 
 from G4AtlasApps.SimFlags import simFlags
 # new MT actions. Note that this will only work with one thread.
-simFlags.OptionalUserActionList.addAction('G4UA::VolumeDebuggerTool',['BeginOfRun'])
+simFlags.OptionalUserActionList.addAction('G4UA::VolumeDebuggerTool',['Run'])
 
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivation.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivation.cxx
index 1636183750bb3c9c443d5e4301ce3e0112ba65f6..e58bdcb5168d75045460e647e778b10755a64082 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivation.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivation.cxx
@@ -13,7 +13,7 @@ namespace G4UA{
 CheckActivation::CheckActivation(){;
 }
 
-void CheckActivation::beginOfEvent(const G4Event*){
+void CheckActivation::BeginOfEventAction(const G4Event*){
 
   G4TransportationManager *tm = G4TransportationManager::GetTransportationManager();
   tm->GetNavigatorForTracking()->CheckMode(true);
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivation.h b/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivation.h
index 496e3535e00379c0c0c73e69a79124a05cff0419..a3ce7c9d640b6b1d50618aa7d808ed197445be79 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivation.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivation.h
@@ -4,16 +4,16 @@
 
 #ifndef G4DEBUGGINGTOOLS_G4UA__CHECKACTIVATION_H 
 #define G4DEBUGGINGTOOLS_G4UA__CHECKACTIVATION_H 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
+#include "G4UserEventAction.hh"
 namespace G4UA{ 
 
 class CheckActivation: 
-  public IBeginEventAction
+  public G4UserEventAction
   {
     
   public:
     CheckActivation();
-    virtual void beginOfEvent(const G4Event*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
   private:
   }; // class CheckActivation
 
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivationTool.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivationTool.cxx
index 03291f50a989b4dee4964ebdcf7e834aa972d19d..a77238e2b8d41c90b33ea00e454502bb45a9e2d8 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivationTool.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivationTool.cxx
@@ -20,8 +20,8 @@ namespace G4UA{
 
   StatusCode CheckActivationTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivationTool.h b/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivationTool.h
index 7b1d101e36dbd92c3bc1c4693fdee79c50bcf7e5..856b63d29c9ea7c31b13abe7d22a09c20dfc2c2c 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivationTool.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/CheckActivationTool.h
@@ -4,7 +4,7 @@
 
 #ifndef G4DEBUGGINGTOOLS_G4UA__CHECKACTIVATIONTOOL_H 
 #define G4DEBUGGINGTOOLS_G4UA__CHECKACTIVATIONTOOL_H 
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "CheckActivation.h"
 
@@ -19,15 +19,15 @@ namespace G4UA{
 
   class CheckActivationTool: 
   public ActionToolBase<CheckActivation>,
-    public IBeginEventActionTool
+    public IG4EventActionTool
     {
       
     public:
       /// Standard constructor
       CheckActivationTool(const std::string& type, const std::string& name,const IInterface* parent);
       /// Retrieve the BoE action
-      virtual IBeginEventAction* getBeginEventAction() override final 
-      { return static_cast<IBeginEventAction*>( getAction() ); }
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
       /// Gaudi interface management
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
     protected:
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTest.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTest.cxx
index 82d18000a46cc3d79247df385f599c1a2b57ae21..3a3a3915928467ae0ef25b9832e04dcdb46ce5d9 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTest.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTest.cxx
@@ -30,17 +30,17 @@ namespace G4UA{
     m_detStore("StoreGateSvc/DetectorStore","EnergyConservationTest"),
     e_in(0), e_out(0), e_dep(0){}
   
-  void EnergyConservationTest::preTracking(const G4Track* t){
+  void EnergyConservationTest::PreUserTrackingAction(const G4Track* t){
     TrackHelper theHelper(t);
     if(theHelper.IsPrimary()) e_in += t->GetTotalEnergy();
   }
   
-  void EnergyConservationTest::postTracking(const G4Track* t){
+  void EnergyConservationTest::PostUserTrackingAction(const G4Track* t){
     // If it has any energy left *after* being tracked, it should have left the world
     if (!t->GetNextVolume()) e_out += t->GetTotalEnergy();
   }
   
-  void EnergyConservationTest::endOfEvent(const G4Event*){;
+  void EnergyConservationTest::EndOfEventAction(const G4Event*){
     
     ATH_MSG_DEBUG( "Event info: " << e_in << " in, " << e_out << " out, " << e_dep << " deposited." );
     if ( std::fabs( e_in-e_out-e_dep ) > 10000. ) { // 10 GeV threshold, which is really pretty generous!
@@ -56,17 +56,17 @@ namespace G4UA{
 	ei->setErrorState(EventInfo::Core,EventInfo::Error);
 	ATH_MSG_WARNING( "Set error state in event info!" );
       }
-  }
+    }
 
-  // reset
-  e_in=0.;
-  e_out=0.;
-  e_dep=0.;
+    // reset
+    e_in=0.;
+    e_out=0.;
+    e_dep=0.;
 
   }
   
-  void EnergyConservationTest::processStep(const G4Step* s){
-      e_dep += s->GetTotalEnergyDeposit();
+  void EnergyConservationTest::UserSteppingAction(const G4Step* s){
+    e_dep += s->GetTotalEnergyDeposit();
   }
   
 } // namespace G4UA 
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTest.h b/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTest.h
index 4fc60e36848f55aca7ce449322522f8b83221245..89c6e4d570ee6ea40ce12b6430a691925145c99f 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTest.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTest.h
@@ -8,24 +8,25 @@
 
 #include <string>
 
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
-#include "G4AtlasInterfaces/IPostTrackingAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserTrackingAction.hh"
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "GaudiKernel/ServiceHandle.h"
 
 namespace G4UA{ 
-  class EnergyConservationTest: 
-  public AthMessaging, public IPreTrackingAction,  public IPostTrackingAction,  public IEndEventAction,  public ISteppingAction
+  class EnergyConservationTest : public AthMessaging,
+                                 public G4UserTrackingAction,
+                                 public G4UserEventAction,
+                                 public G4UserSteppingAction
   {
   public:
     EnergyConservationTest();
-    virtual void preTracking(const G4Track*) override;
-    virtual void postTracking(const G4Track*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void PreUserTrackingAction(const G4Track*) override;
+    virtual void PostUserTrackingAction(const G4Track*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
 
   private:
     typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTestTool.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTestTool.cxx
index 347c926c50f917b2335c9bc8302fb691063bf0ba..7f45b9aa1b749ae8c750b71150a8ffd20db6a83c 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTestTool.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTestTool.cxx
@@ -20,20 +20,16 @@ namespace G4UA{
   
   StatusCode EnergyConservationTestTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IPreTrackingActionTool::interfaceID()) {
-      *ppvIf = (IPreTrackingActionTool*) this;
+    if(riid == IG4TrackingActionTool::interfaceID()) {
+      *ppvIf = (IG4TrackingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
-    } if(riid == IPostTrackingActionTool::interfaceID()) {
-      *ppvIf = (IPostTrackingActionTool*) this;
+    } if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
-    } if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    } if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     } return ActionToolBase<EnergyConservationTest>::queryInterface(riid, ppvIf);
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTestTool.h b/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTestTool.h
index 520442ec0b3bf4c7ad9d92bbd68ec546068c660b..f8c1f20bbe8bd091bb0b8b2b4a51ffc05e4ebbf5 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTestTool.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/EnergyConservationTestTool.h
@@ -5,10 +5,9 @@
 #ifndef G4DEBUGGINGTOOLS_G4UA__ENERGYCONSERVATIONTESTTOOL_H 
 #define G4DEBUGGINGTOOLS_G4UA__ENERGYCONSERVATIONTESTTOOL_H 
 
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
-#include "G4AtlasInterfaces/IPostTrackingActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "EnergyConservationTest.h"
 
@@ -16,19 +15,17 @@ namespace G4UA{
   
   class EnergyConservationTestTool: 
   public ActionToolBase<EnergyConservationTest>,
-    public IPreTrackingActionTool,  public IPostTrackingActionTool,  public IEndEventActionTool,  public ISteppingActionTool
+    public IG4TrackingActionTool,  public IG4EventActionTool,  public IG4SteppingActionTool
   {
 
   public:
     EnergyConservationTestTool(const std::string& type, const std::string& name,const IInterface* parent);
-    virtual IPreTrackingAction* getPreTrackingAction() override final 
-    { return static_cast<IPreTrackingAction*>( getAction() ); }
-    virtual IPostTrackingAction* getPostTrackingAction() override final 
-    { return static_cast<IPostTrackingAction*>( getAction() ); }
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserTrackingAction* getTrackingAction() override final
+    { return static_cast<G4UserTrackingAction*>( getAction() ); }
+    virtual G4UserEventAction* getEventAction() override final
+    { return static_cast<G4UserEventAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
     virtual std::unique_ptr<EnergyConservationTest> makeAction() override final;
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumper.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumper.cxx
index 343fc3fc136acf8abe5ee54c94141e0943d02850..9fb35ffb23cfe7ae5f0361a7820f211e303b3569 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumper.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumper.cxx
@@ -33,7 +33,7 @@ namespace G4UA{
     m_file(NULL){
   }
   
-  void G4AtlantisDumper::processStep(const G4Step* aStep){
+  void G4AtlantisDumper::UserSteppingAction(const G4Step* aStep){
     
     const G4Track *t=aStep->GetTrack();
     //if(m_nsteps>40) return;
@@ -101,7 +101,7 @@ namespace G4UA{
     
   }
 
-  void G4AtlantisDumper::endOfEvent(const G4Event* event){
+  void G4AtlantisDumper::EndOfEventAction(const G4Event* event){
     
     ATH_MSG_INFO( "Goodbye from G4AtlantisDumper, event "<<event->GetEventID());
     m_file->close();
@@ -112,7 +112,7 @@ namespace G4UA{
     
   }
   
-  void G4AtlantisDumper::beginOfEvent(const G4Event*){
+  void G4AtlantisDumper::BeginOfEventAction(const G4Event*){
     
     m_nsteps=0;
     
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumper.h b/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumper.h
index a746c1f29fd07e7ffa66624863a930e1fac22810..5250a403eab6a2864b24f9b6c4cfc231d8d2e77b 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumper.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumper.h
@@ -9,9 +9,8 @@
 #include <fstream>
 #include <string>
 
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
+#include "G4UserSteppingAction.hh"
+#include "G4UserEventAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 #include "StoreGate/StoreGateSvc.h"
@@ -19,8 +18,9 @@
 
 namespace G4UA{ 
   
-  class G4AtlantisDumper: 
-  public AthMessaging, public ISteppingAction,  public IEndEventAction,  public IBeginEventAction
+  class G4AtlantisDumper : public AthMessaging,
+                           public G4UserSteppingAction,
+                           public G4UserEventAction
   {
     
   public:
@@ -34,9 +34,9 @@ namespace G4UA{
     };
 
     G4AtlantisDumper(const Config& config);
-    virtual void processStep(const G4Step*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void beginOfEvent(const G4Event*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
   private:
     Config m_config;
     
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumperTool.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumperTool.cxx
index 806f679f4b95ed32982b39ced6e2c47b946f69b1..49a4cff99d05bed7525f24ca16ff45d4447d6194 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumperTool.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumperTool.cxx
@@ -25,16 +25,12 @@ G4AtlantisDumperTool::G4AtlantisDumperTool
   }
   StatusCode G4AtlantisDumperTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
-    } if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    } if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     } return ActionToolBase<G4AtlantisDumper>::queryInterface(riid, ppvIf);
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumperTool.h b/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumperTool.h
index c132b4998739ac30fd1c6043519e3a983132f709..43f6b524d50a0b04982607b9f47e2cbcbce520d9 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumperTool.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/G4AtlantisDumperTool.h
@@ -4,27 +4,24 @@
 
 #ifndef G4DEBUGGINGTOOLS_G4UA__G4ATLANTISDUMPERTOOL_H 
 #define G4DEBUGGINGTOOLS_G4UA__G4ATLANTISDUMPERTOOL_H 
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4AtlantisDumper.h"
 
 namespace G4UA{ 
 
-  class G4AtlantisDumperTool: 
-  public ActionToolBase<G4AtlantisDumper>,
-    public ISteppingActionTool,  public IEndEventActionTool,  public IBeginEventActionTool
+  class G4AtlantisDumperTool : public ActionToolBase<G4AtlantisDumper>,
+                               public IG4SteppingActionTool,
+                               public IG4EventActionTool
   {
     
   public:
     G4AtlantisDumperTool(const std::string& type, const std::string& name,const IInterface* parent);
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
+    virtual G4UserEventAction* getEventAction() override final
+    { return static_cast<G4UserEventAction*>( getAction() ); }
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
     virtual std::unique_ptr<G4AtlantisDumper> makeAction() override final;
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.cxx
index 77067e79990ae61a1bdf974e23d3de696aa96d42..8d898afed132eb0cd538a30138bf10c67d6947ee 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.cxx
@@ -22,7 +22,7 @@ namespace G4UA{
 Geant4SetupChecker::Geant4SetupChecker(const std::string& file_location, const bool test=true) : m_file_location(file_location) , m_test(test) {;
 }
 
-void Geant4SetupChecker::beginOfRun(const G4Run*){
+void Geant4SetupChecker::BeginOfRunAction(const G4Run*){
 
   // Print the sizes of several stores
   G4LogicalVolumeStore* g4_logical_volume_store = G4LogicalVolumeStore::GetInstance();
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.h b/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.h
index 0fd0c35482c35bebf816b4935047a59ed5d32877..40e109322d258fc26e00ce1ba21bd748dceadf3b 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupChecker.h
@@ -5,18 +5,18 @@
 #ifndef G4DEBUGGINGTOOLS_G4UA__GEANT4SETUPCHECKER_H 
 #define G4DEBUGGINGTOOLS_G4UA__GEANT4SETUPCHECKER_H 
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
+#include "G4UserRunAction.hh"
 #include <string>
 
 namespace G4UA{ 
 
 class Geant4SetupChecker: 
-  public IBeginRunAction
+  public G4UserRunAction
   {
     
   public:
     Geant4SetupChecker(const std::string&,const bool);
-    virtual void beginOfRun(const G4Run*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
   private:
     /// File location for reference file
     std::string m_file_location;
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupCheckerTool.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupCheckerTool.cxx
index 8b2da4ecf73d5546653893361555b09fef9c2473..845a95acc4194bd77c8d84a638cfaed92f170aa1 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupCheckerTool.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupCheckerTool.cxx
@@ -23,8 +23,8 @@ namespace G4UA{
   }
 
   StatusCode Geant4SetupCheckerTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupCheckerTool.h b/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupCheckerTool.h
index 3c6022c0ade8b609fcd38f705b34af7294184793..e0cf374a21a4e60ab5d95f76f3971f2492902d45 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupCheckerTool.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/Geant4SetupCheckerTool.h
@@ -4,7 +4,7 @@
 
 #ifndef G4DEBUGGINGTOOLS_G4UA__GEANT4SETUPCHECKERTOOL_H 
 #define G4DEBUGGINGTOOLS_G4UA__GEANT4SETUPCHECKERTOOL_H 
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "Geant4SetupChecker.h"
 
@@ -19,15 +19,15 @@ namespace G4UA{
 
   class Geant4SetupCheckerTool: 
   public ActionToolBase<Geant4SetupChecker>,
-    public IBeginRunActionTool
+    public IG4RunActionTool
     {
       
     public:
       /// Standard constructor
       Geant4SetupCheckerTool(const std::string& type, const std::string& name,const IInterface* parent);
       /// Retrieve the BoE action
-      virtual IBeginRunAction* getBeginRunAction() override final 
-      { return static_cast<IBeginRunAction*>( getAction() ); }
+      virtual G4UserRunAction* getRunAction() override final
+      { return static_cast<G4UserRunAction*>( getAction() ); }
       /// Gaudi interface management
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
     protected:
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcher.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcher.cxx
index c714dfe4869b0165b9168e80ef94a419caa31efa..1de8dab7d69309d1309008be9b8b8f3675fc6b37 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcher.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcher.cxx
@@ -30,7 +30,7 @@ namespace G4UA{
     m_world(0),m_killCount(0){;
   }
   
-  void HyperspaceCatcher::beginOfRun(const G4Run*){
+  void HyperspaceCatcher::BeginOfRunAction(const G4Run*){
 
     // Highest level implemented is 2 at the moment
     if (m_config.treatmentLevel>2) m_config.treatmentLevel=2;
@@ -53,7 +53,7 @@ namespace G4UA{
     
   }
   
-  void HyperspaceCatcher::processStep(const G4Step* aStep){
+  void HyperspaceCatcher::UserSteppingAction(const G4Step* aStep){
 
   bool hs = false;
   
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcher.h b/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcher.h
index 5add7cc2171b29d2d919b2b9dcc815f403cb8bf0..f0d78b9bb485bb7b310aea13958a5b0c6d1dfd0b 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcher.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcher.h
@@ -12,14 +12,14 @@ class G4VSolid;
 class G4Track;
 
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 namespace G4UA{ 
   
   class HyperspaceCatcher: 
-  public AthMessaging, public IBeginRunAction,  public ISteppingAction
+  public AthMessaging, public G4UserRunAction, public G4UserSteppingAction
   {
   public:
     
@@ -30,8 +30,8 @@ namespace G4UA{
     };
     
     HyperspaceCatcher(const Config& config);
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
 
   private:
     Config m_config;
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcherTool.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcherTool.cxx
index 0f1162bfd09f56bec845ef1eab36de23023e2496..cc9432c6f21dd185cd6f2ef2480f77a64678c39f 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcherTool.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcherTool.cxx
@@ -22,12 +22,12 @@ namespace G4UA{
   }
   StatusCode HyperspaceCatcherTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
-    } if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    } if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     } return ActionToolBase<HyperspaceCatcher>::queryInterface(riid, ppvIf);
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcherTool.h b/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcherTool.h
index c5f54a3fb1fa5482e05f3f1caa934686a0bcdda6..180c9faa33fffed678c7c724779042fb2802a722 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcherTool.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/HyperspaceCatcherTool.h
@@ -5,8 +5,8 @@
 #ifndef G4DEBUGGINGTOOLS_G4UA__HYPERSPACECATCHERTOOL_H 
 #define G4DEBUGGINGTOOLS_G4UA__HYPERSPACECATCHERTOOL_H 
 
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "HyperspaceCatcher.h"
 
@@ -14,14 +14,14 @@ namespace G4UA{
   
   class HyperspaceCatcherTool: 
   public ActionToolBase<HyperspaceCatcher>,
-    public  IBeginRunActionTool,  public ISteppingActionTool
+    public  IG4RunActionTool,  public IG4SteppingActionTool
   {
   public:
     HyperspaceCatcherTool(const std::string& type, const std::string& name,const IInterface* parent);
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserRunAction* getRunAction() override final
+    { return static_cast<G4UserRunAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
     virtual std::unique_ptr<HyperspaceCatcher> makeAction() override final;
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/StepNtuple.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/StepNtuple.cxx
index 10715d16c12f082be053aa5c6faa88f9db9173d1..14113425d8b0819bc9d02fbef08b77a5760e34fa 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/StepNtuple.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/StepNtuple.cxx
@@ -24,13 +24,13 @@ namespace G4UA{
   
   StepNtuple::StepNtuple():AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ),"StepNtuple"){;
   }
-  void StepNtuple::beginOfEvent(const G4Event*){
+  void StepNtuple::BeginOfEventAction(const G4Event*){
 
     eventSteps.clear();
 
   }
   
-  void StepNtuple::endOfEvent(const G4Event*){
+  void StepNtuple::EndOfEventAction(const G4Event*){
     
     //std::cout<<"start end of event, size is  "<<eventSteps.size()<<std::endl;
     
@@ -59,7 +59,7 @@ namespace G4UA{
     
   }
   
-  void StepNtuple::processStep(const G4Step* aStep){
+  void StepNtuple::UserSteppingAction(const G4Step* aStep){
 
     
     if(eventSteps.size()<49000){
@@ -82,7 +82,7 @@ namespace G4UA{
     
   }
   
-  void StepNtuple::beginOfRun(const G4Run*){
+  void StepNtuple::BeginOfRunAction(const G4Run*){
     
     NTupleFilePtr file1(ntupleSvc(), "/NTUPLES/FILE1");
     
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/StepNtuple.h b/Simulation/G4Utilities/G4DebuggingTools/src/StepNtuple.h
index 09e82d409bc8ca4f566fbe764195532a12fef0e4..c6ac811274a58a4f6d9d27c4dcf2afece9568209 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/StepNtuple.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/StepNtuple.h
@@ -12,17 +12,18 @@
 #include <vector>
 
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
+#include "G4UserRunAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 namespace G4UA{
   
   
-  class StepNtuple:
-  public AthMessaging, public IBeginEventAction,  public IEndEventAction,  public ISteppingAction,  public IBeginRunAction
+  class StepNtuple : public AthMessaging,
+                     public G4UserEventAction,
+                     public G4UserSteppingAction,
+                     public G4UserRunAction
   {
     /// simple struct to hold step information
     struct stepdata{
@@ -34,10 +35,10 @@ namespace G4UA{
     StepNtuple();
 
     /// the hooks for G4 UA handling
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void processStep(const G4Step*) override;
-    virtual void beginOfRun(const G4Run*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
 
   private:
 
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/StepNtupleTool.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/StepNtupleTool.cxx
index e26ea11467212bd730bd750102844bdd93caf0d0..78aaa525e3b22f79df096aa780044469d64558eb 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/StepNtupleTool.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/StepNtupleTool.cxx
@@ -17,23 +17,18 @@ namespace G4UA{
   }
   StatusCode StepNtupleTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/StepNtupleTool.h b/Simulation/G4Utilities/G4DebuggingTools/src/StepNtupleTool.h
index c5e5b7279fe7a95070131f80e7200fdf64e09458..43562f15c89866ca53975646a0f55f3ba985ca32 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/StepNtupleTool.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/StepNtupleTool.h
@@ -4,10 +4,9 @@
 
 #ifndef G4DEBUGGINGTOOLS_G4UA__STEPNTUPLETOOL_H 
 #define G4DEBUGGINGTOOLS_G4UA__STEPNTUPLETOOL_H 
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "StepNtuple.h"
 
@@ -22,26 +21,24 @@ namespace G4UA{
   /// @author Andrea Di Simone
   ///
   
-  class StepNtupleTool: 
-  public ActionToolBase<StepNtuple>,
-    public IBeginEventActionTool,  public IEndEventActionTool,  public ISteppingActionTool,  public IBeginRunActionTool
+  class StepNtupleTool : public ActionToolBase<StepNtuple>,
+                         public IG4EventActionTool,
+                         public IG4SteppingActionTool,
+                         public IG4RunActionTool
   {
     
   public:
     /// standard tool ctor
     StepNtupleTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// return the BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// return the EoE action
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
+    /// return the event action
+    virtual G4UserEventAction* getEventAction() override final
+    { return static_cast<G4UserEventAction*>( getAction() ); }
     /// return the stepping action
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
-    /// return the BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
+    /// return the run action
+    virtual G4UserRunAction* getRunAction() override final
+    { return static_cast<G4UserRunAction*>( getAction() ); }
     /// gaudi's interface handling
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelector.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelector.cxx
index 6269105300e093313757552b60857f8cbef96d24..e92ec75709aeafe135031df34aab5ece8e42af12 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelector.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelector.cxx
@@ -40,7 +40,7 @@ namespace G4UA{
     m_config(config),m_evtCount(0){;
   }
 
-  void VerboseSelector::beginOfEvent(const G4Event*){
+  void VerboseSelector::BeginOfEventAction(const G4Event*){
 
     SG::ReadHandle<EventInfo> eic("McEventInfo");
     if (!eic.isValid()){
@@ -53,7 +53,7 @@ namespace G4UA{
     }
   }
     
-  void VerboseSelector::processStep(const G4Step* aStep){
+  void VerboseSelector::UserSteppingAction(const G4Step* aStep){
     
     if(m_evtCount==(uint64_t)m_config.targetEvent||m_config.targetEvent<0){
 
@@ -103,7 +103,7 @@ namespace G4UA{
     
   }
   
-  void VerboseSelector::preTracking(const G4Track* aTrack){
+  void VerboseSelector::PreUserTrackingAction(const G4Track* aTrack){
    
     if(m_evtCount==(uint64_t)m_config.targetEvent||m_config.targetEvent<0)
       {
@@ -139,7 +139,7 @@ namespace G4UA{
      
   }
   
-  void VerboseSelector::postTracking(const G4Track* aTrack){
+  void VerboseSelector::PostUserTrackingAction(const G4Track* aTrack){
     if(m_evtCount==(uint64_t)m_config.targetEvent||m_config.targetEvent<0){
       if(aTrack->GetTrackID()==m_config.targetTrack||m_config.targetTrack<0)
 	G4EventManager::GetEventManager()->GetTrackingManager()->SetVerboseLevel(0);
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelector.h b/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelector.h
index 49f776ea2a64a64700cb39367a6731084a6e104d..a9258c34edfa31d3204d18b4be23ec485816c838 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelector.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelector.h
@@ -9,10 +9,9 @@
 #include <string>
 
 
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
-#include "G4AtlasInterfaces/IPostTrackingAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
+#include "G4UserSteppingAction.hh"
+#include "G4UserTrackingAction.hh"
+#include "G4UserEventAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "StoreGate/StoreGateSvc.h"
@@ -20,7 +19,7 @@
 namespace G4UA{ 
 
 class VerboseSelector: 
-  public AthMessaging, public IBeginEventAction, public ISteppingAction,  public IPreTrackingAction,  public IPostTrackingAction
+  public AthMessaging, public G4UserEventAction, public G4UserSteppingAction, public G4UserTrackingAction
   {
     
   public:
@@ -40,10 +39,10 @@ class VerboseSelector:
     };
 
     VerboseSelector(const Config& config);
-    virtual void processStep(const G4Step*) override;
-    virtual void preTracking(const G4Track*) override;
-    virtual void postTracking(const G4Track*) override;
-    virtual void beginOfEvent(const G4Event*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
+    virtual void PreUserTrackingAction(const G4Track*) override;
+    virtual void PostUserTrackingAction(const G4Track*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
 
   private:
     typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelectorTool.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelectorTool.cxx
index a33e2a7d53f472bb88539d6e21d2322279a039be..87bf445d1b806b5db3d72ebcdc570931d9a02494 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelectorTool.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelectorTool.cxx
@@ -35,20 +35,16 @@ namespace G4UA{
   
   StatusCode VerboseSelectorTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
-    } if(riid == IPreTrackingActionTool::interfaceID()) {
-      *ppvIf = (IPreTrackingActionTool*) this;
+    } if(riid == IG4TrackingActionTool::interfaceID()) {
+      *ppvIf = (IG4TrackingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
-    } if(riid == IPostTrackingActionTool::interfaceID()) {
-      *ppvIf = (IPostTrackingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    } if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelectorTool.h b/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelectorTool.h
index ec926c2eda274bf9ff4781ffef66ab1dd5ba2de3..23d0746de313c8c08d42ce6ef215d86313d7c3bf 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelectorTool.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/VerboseSelectorTool.h
@@ -5,30 +5,28 @@
 #ifndef G4DEBUGGINGTOOLS_G4UA__VERBOSESELECTORTOOL_H 
 #define G4DEBUGGINGTOOLS_G4UA__VERBOSESELECTORTOOL_H 
 
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
-#include "G4AtlasInterfaces/IPostTrackingActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "VerboseSelector.h"
 
 namespace G4UA{ 
 
-  class VerboseSelectorTool: 
-  public ActionToolBase<VerboseSelector>, public IBeginEventActionTool,
-    public ISteppingActionTool,  public IPreTrackingActionTool,  public IPostTrackingActionTool
+  class VerboseSelectorTool : public ActionToolBase<VerboseSelector>,
+                              public IG4EventActionTool,
+                              public IG4SteppingActionTool,
+                              public IG4TrackingActionTool
   {
     
   public:
     VerboseSelectorTool(const std::string& type, const std::string& name,const IInterface* parent);
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
-    virtual IPreTrackingAction* getPreTrackingAction() override final 
-    { return static_cast<IPreTrackingAction*>( getAction() ); }
-    virtual IPostTrackingAction* getPostTrackingAction() override final 
-    { return static_cast<IPostTrackingAction*>( getAction() ); }
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
+    virtual G4UserTrackingAction* getTrackingAction() override final
+    { return static_cast<G4UserTrackingAction*>( getAction() ); }
+    virtual G4UserEventAction* getEventAction() override final
+    { return static_cast<G4UserEventAction*>( getAction() ); }
 
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebugger.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebugger.cxx
index 56fcbb7fc4f10b4be1efe096151d23f4e57d99a5..abba23da1b51ed220a7b0a62759ba7a9be918d8f 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebugger.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebugger.cxx
@@ -103,7 +103,7 @@ namespace G4UA{
 
   }
 
-  void VolumeDebugger::beginOfRun(const G4Run*){
+  void VolumeDebugger::BeginOfRunAction(const G4Run*){
 
     std::call_once(VolumeDebugger_DumpGeometryOnce,&G4UA::VolumeDebugger::DumpGeometry,this);
     
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebugger.h b/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebugger.h
index 6c7fafcbc3887139357ae9dff5bcd18b858b7b94..6f8ddd589df66a6b21314dd69f972f72ab4340b4 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebugger.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebugger.h
@@ -11,7 +11,7 @@
 class G4LogicalVolume;
 class G4VPhysicalVolume;
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
+#include "G4UserRunAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 namespace G4UA{
@@ -33,7 +33,7 @@ namespace G4UA{
   static std::once_flag VolumeDebugger_DumpGeometryOnce;
 
   class VolumeDebugger:
-  public AthMessaging, public IBeginRunAction
+  public AthMessaging, public G4UserRunAction
   {
     
   public:
@@ -53,7 +53,7 @@ namespace G4UA{
     
     VolumeDebugger(const Config& config);
     /// hook for G4 UA functionality
-    virtual void beginOfRun(const G4Run*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
     
   private:
     /// configuration data
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebuggerTool.cxx b/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebuggerTool.cxx
index 2c40bb645251284426e9c317435837f84d787e0e..03100373a06000eb0df63da3357834d784c282e3 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebuggerTool.cxx
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebuggerTool.cxx
@@ -28,8 +28,8 @@ namespace G4UA{
   }
   StatusCode VolumeDebuggerTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebuggerTool.h b/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebuggerTool.h
index 6d211a419c06389a87e51141cf6e1444d8d4fd34..41a0b12ed8f48f800d5baf537308216c4c51493a 100644
--- a/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebuggerTool.h
+++ b/Simulation/G4Utilities/G4DebuggingTools/src/VolumeDebuggerTool.h
@@ -4,7 +4,7 @@
 
 #ifndef G4DEBUGGINGTOOLS_G4UA__VOLUMEDEBUGGERTOOL_H 
 #define G4DEBUGGINGTOOLS_G4UA__VOLUMEDEBUGGERTOOL_H 
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "./VolumeDebugger.h"
 
@@ -20,15 +20,15 @@ namespace G4UA{
   
   class VolumeDebuggerTool: 
   public ActionToolBase<VolumeDebugger>,
-    public IBeginRunActionTool
+    public IG4RunActionTool
     {
       
     public:
       /// standard tool constructor
       VolumeDebuggerTool(const std::string& type, const std::string& name,const IInterface* parent);
       /// returns the BoR action 
-      virtual IBeginRunAction* getBeginRunAction() override final 
-      { return static_cast<IBeginRunAction*>( getAction() ); }
+      virtual G4UserRunAction* getRunAction() override final
+      { return static_cast<G4UserRunAction*>( getAction() ); }
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
     protected:
       /// builds the action for a thread
diff --git a/Simulation/G4Utilities/G4FastSimulation/cmt/requirements b/Simulation/G4Utilities/G4FastSimulation/cmt/requirements
deleted file mode 100755
index 8ae05030e1d33a20b2ce78499d2c30f68d74498f..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4FastSimulation/cmt/requirements
+++ /dev/null
@@ -1,15 +0,0 @@
-package G4FastSimulation
-
-public
-use AtlasPolicy         AtlasPolicy-*
-
-private
-use AtlasCLHEP          AtlasCLHEP-*            External
-use GaudiInterface      GaudiInterface-*        External
-use Geant4              Geant4-*                External
-use G4AtlasTools        G4AtlasTools-*          Simulation/G4Atlas
-end_private
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern component_library
-library G4FastSimulation ../src/*.cxx components/*.cxx
diff --git a/Simulation/G4Utilities/G4FastSimulation/doc/packagedoc.h b/Simulation/G4Utilities/G4FastSimulation/doc/packagedoc.h
index 3c6caa722b9ee1735fa7a9a325555c555739f82d..92946c21215534cbe19f795e1362dc3d167b9e7b 100644
--- a/Simulation/G4Utilities/G4FastSimulation/doc/packagedoc.h
+++ b/Simulation/G4Utilities/G4FastSimulation/doc/packagedoc.h
@@ -19,17 +19,6 @@ The classes included in this package are:
  - FastSimModel : A base class for fast simulations
  - FastSimModelProxy : A type for fast simulations to use for inclusion in the catalog
 
-@ref used_G4FastSimulation 
 
-@ref requirements_G4FastSimulation
 
 */
-
-/**
-@page used_G4FastSimulation Used Packages
-*/
-
-/**
-@page requirements_G4FastSimulation Requirements
-*/
-
diff --git a/Simulation/G4Utilities/G4Field/cmt/requirements b/Simulation/G4Utilities/G4Field/cmt/requirements
deleted file mode 100755
index 29215b45e23038bf7c2ad5ea690e5cc6fedf2508..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4Field/cmt/requirements
+++ /dev/null
@@ -1,36 +0,0 @@
-package G4Field
-
-version G4Field-00-00-01
-
-author ADA <dellacqu@mail.cern.ch>
-
-branches src cmt
-
-use AtlasPolicy         AtlasPolicy-*
-use PathResolver	PathResolver-*		Tools
-
-use FadsField           FadsField-*          	Simulation/G4Sim/FADS
-use FadsXMLParser	FadsXMLParser-*		Simulation/G4Sim/FADS
-
-use Geant4        Geant4-*        External
-
-private
-use AtlasReflex         AtlasReflex-*           External
-use MagFieldInterfaces  MagFieldInterfaces-*    MagneticField
-end_private
-
-use GaudiInterface GaudiInterface-* External
-
-include_dirs "$(G4Field_root)" "$(G4Field_root)/dict"
-
-#  macro G4Field_linkopts "-lMagneticFieldStand"
-
-library G4Field ../src/*.cxx
-apply_pattern installed_library
-
-private
-
-apply_pattern lcgdict dict=G4Field \
-                headerfiles="../G4Field/G4FieldDict.h" \
-                selectionfile=selection.xml
-macro_prepend G4FieldDict_shlibflags " -lG4Field "
diff --git a/Simulation/G4Utilities/G4Field/doc/packagedoc.h b/Simulation/G4Utilities/G4Field/doc/packagedoc.h
index 3e9c570ac54c7db117422d03325c4bf1c50049f4..7280ff856fa772d1aa9de95b8b18a1413d92c42a 100644
--- a/Simulation/G4Utilities/G4Field/doc/packagedoc.h
+++ b/Simulation/G4Utilities/G4Field/doc/packagedoc.h
@@ -18,16 +18,6 @@ The package includes the following classes:
  - ConstantFieldXMLHandler : An interface for constructing constant fields from an XML file
  - FieldMapMgr : The manager that handles the fields which will be used during the simulation
 
-@ref used_G4Field
 
-@ref requirements_G4Field
 
 */
-
-/**
-@page used_G4Field Used Packages
-*/
-
-/**
-@page requirements_G4Field Requirements
-*/
diff --git a/Simulation/G4Utilities/G4Field/run/clid.py b/Simulation/G4Utilities/G4Field/run/clid.py
deleted file mode 100755
index c69577cae4bac2d2aa437f83ccadca7ff5980f71..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4Field/run/clid.py
+++ /dev/null
@@ -1,244 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-exec python -tx "$0" "$@"
-
-# Copyright (c) 2002-2003, cetull@lbl.gov
-# Driver for Athena CLID Generator
-# BUGS: 
-# * None Known
-#
-import string, re
-import sys, getopt, os
-import clidGen
-
-# PROGRAM NAME
-prog = os.path.basename(sys.argv[0])
-
-# DEBUG Flag: Turns on DEBUG printout (default = false)
-debug = 0
-# MACRO Flag: Turns on macro option (default = false)
-macro = 0
-# SILENT Flag: Turns on silent option (default = false)
-silent = 0
-# CLID DataBase
-cliddb = ''
-# List of regular expressions to process
-relist = []
-# List of "CLID==NAME"
-valist = []
-
-#
-# Help Messages
-#
-def usage_message():
-    print '''usage:''',prog,'''[-hmsuv] [--db=<clid.db>] [name ...] [clid ...]'''
-#
-def usage_message_full():
-    print '''usage:''',prog,'''[-dhmsuv] [--db=<clid.db>] [name ...] [clid ...]'''
-#
-def help_message():
-    print prog,'''- Athena CLID Generator
-Usage:''',prog,'''<options> [<ClassName>] [<CLID>]
-Options and arguments:  
--b <clid_db>: Reconcile generated CLID with CLID DataBase <clid_db>.
--f <regex>  : Find entry whose ClassName or CLID matches <regex>.
-              (See Python re module for syntax of regex.)
--h          : Print this help message and exit.
--m          : Print macro call for StoreGate.
--s          : Be more silent on output. Print _only_ result.
-              (N.B. Overrides -m option.)
--u          : Print usage message and exit.
--v          : Print version string and exit.
---db=<clid_db>: Synonym for -b.
---find=<regex>: Synonym for -f.
---help        : Synonym for -h.
---macro       : Synonym for -m.
---silent      : Synonym for -s.
---usage       : Synonym for -u.
---version     : Synonym for -v.
-Examples: '''
-    print '    ',prog,'-h'
-    print '    ',prog,'--version'
-    print '    ',prog,'LArCell'
-    print '    ',prog,'--db=clid.db LArCell'
-    print '    ',prog,'--db=clid.db 2001'
-    print '    ',prog,'--db=clid.db -f "Cr"'
-
-#
-#
-def help_message_full():
-    print prog,'''- Athena CLID Generator
-Usage:''',prog,'''<options> [<ClassName>] [<CLID>]
-Options and arguments:  
--b <clid_db>: Reconcile generated CLID with CLID DataBase <clid_db>.
--d          : Print DEBUG information during execution.
--f <regex>  : Find entry whose ClassName or CLID matches <regex>.
-              (See Python re module for syntax of regex.)
--h          : Print this help message and exit.
--m          : Print macro call for StoreGate.
--s          : Be more silent on output. Print _only_ result.
-              (N.B. Overrides -m option.)
--u          : Print usage message and exit.
--v          : Print version string and exit.
---db=<clid_db>: Synonym for -b.
---debug       : Synonym for -d.
---find=<regex>: Synonym for -f.
---help        : Synonym for -h.
---macro       : Synonym for -m.
---silent      : Synonym for -s.
---usage       : Synonym for -u.
---version     : Synonym for -v.
-Examples: '''
-    print '    ',prog,'-h'
-    print '    ',prog,'--version'
-    print '    ',prog,'-d LArCell'
-    print '    ',prog,'--db=clid.db LArCell'
-    print '    ',prog,'--db=clid.db 2001'
-    print '    ',prog,'--db=clid.db -f "Cr"'
-
-#
-# Error Message
-#
-def err_message():
-    print prog,'''- Error:
-You tried to use an unknown option or the argument for an option that
-requires one was missing.
-Try `''',prog,''' -h\' for more information.'''
-
-#
-# Unimplemented Option Message
-#
-def unimpl_message(AAA):
-    print prog,'''- Error:''',AAA,'''
-You tried to use an unimplemented option. This feature will be
-available in a future release.
-Try `''',prog,''' -h\' for more information.'''
-
-#
-# Depricated Option Message
-#
-def depricated_message(AAA):
-    print prog,'''- Error:''',AAA,'''
-You tried to use a depricated option. This feature is no longer
-available, though the option remains for compatability.
-Try `''',prog,''' -h\' for more information.'''
-
-#
-# Parse the options and their arguments.
-#
-kflags = 'b:df:hmsuvx:'
-kargs = ['db=','debug','find=','help','macro','silent','usage','version']
-try:
-    options, xarguments = getopt.getopt(sys.argv[1:],kflags,kargs)
-except getopt.error:
-    err_message()
-    sys.exit(0)
-
-#
-# Require at least one argument.
-#
-if len(sys.argv) == 1:
-    help_message()
-    sys.exit(0)
-
-#
-# Process known options.
-#
-for a in options[:]:
-    # STANDARD UTILITY OPTIONS
-    if a[0] == '-d' or a[0] == '--debug':
-        debug = 1
-        options.remove(a)
-    if a[0] == '-h' or a[0] == '--help':
-        help_message()
-        options.remove(a)
-        sys.exit(0)
-    if a[0] == '-s' or a[0] == '--silent':
-        silent = 1
-        options.remove(a)
-    if a[0] == '-u' or a[0] == '--usage':
-        usage_message()
-        options.remove(a)
-        sys.exit(0)
-    if a[0] == '-v' or a[0] == '--version':
-        print sys.argv[0],'$Revision: 1.1.1.1 $ (08jul02-cetull@lbl.gov)'
-        options.remove(a)
-        sys.exit(0)
-    # CLID OPTIONS
-    if a[0] == '-b' or a[0] == '--db':
-        if debug: print 'CLID DB =',a[1]
-        cliddb = a[1]
-        options.remove(a)
-    if a[0] == '-f' or a[0] == '--find':
-        if debug: print 'CLID FIND =',a[1]
-        relist.append(a[1])
-        options.remove(a)
-    if a[0] == '-m' or a[0] == '--macro':
-        macro = 1
-        options.remove(a)
-    if a[0] == '-x':
-        valist.append(a[1])
-        options.remove(a)
-
-#
-# Process unknown options.
-#
-for a in options[:]:
-    unimpl_message(a)
-    options.remove(a)
-
-#
-# Initialize 
-#
-if cliddb: 
-    cgen = clidGen.clidGenerator(cliddb)
-else:
-    cgen = clidGen.clidGenerator("")
-if debug: print "repository = ",cgen._clidGenerator__clidRep
-
-#
-# Process ClassName arguments
-#
-for a in xarguments:
-    try:
-        i = int(a)
-    except:
-        n = a
-        c = cgen.genClidFromName(a)
-    else:
-        n = cgen.getNameFromClid(i)
-        c = i
-        if not n:
-            n = ">>>Not Found in CLIDDB<<<"
-    if debug: 
-        print c,n,'(',hash(n),hash(n)&cgen._clidGenerator__mask,"%8x"%c,')'
-    else:
-        if silent: print c
-        else:
-            if macro: print "CLASS_DEF(",n,",",c,", 1 )"
-            else: print c,n
-
-#
-# Process RegEx list
-#
-for p in relist:
-    print '>>> Searching CLIDDB for (',p,') <<<'
-    print cgen.findPattern(p)
-
-#
-# Process Validation list
-#
-for p in valist:
-    pp = string.split(p,'==')
-#   print 'Validating(',pp,')'
-    ppid = cgen.getClidFromName(pp[1])
-    if ppid == int(pp[0]):
-        print pp,'is a valid pair.',ppid
-    else:
-        print pp,'is not a valid pair.',ppid
-        sys.exit(1)
-#
-# Write out new repository
-#
-cgen.writedb("new.db")
-#
diff --git a/Simulation/G4Utilities/G4PhysicsLists/cmt/requirements b/Simulation/G4Utilities/G4PhysicsLists/cmt/requirements
deleted file mode 100644
index fc4874faefe91459ed2b56e94f9e09dce0039f10..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4PhysicsLists/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package G4PhysicsLists
-
-public
-use AtlasPolicy       AtlasPolicy-*
-use Geant4            Geant4-*            External
-
-private
-use GaudiInterface    GaudiInterface-*    External
-use AtlasCLHEP        AtlasCLHEP-*        External
-end_private
-
-include_dirs "$(G4PhysicsLists_root)" "$(G4PhysicsLists_root)/G4PhysicsLists" "$(G4PhysicsLists_root)/src/MuBias"
-
-library G4PhysicsLists "../src/*.cc ../src/MuBias/*.cc"
-
-apply_pattern installed_library
-
-private
-
-apply_pattern declare_runtime files="biasValues.txt"
-end_private
diff --git a/Simulation/G4Utilities/G4PhysicsLists/doc/packagedoc.h b/Simulation/G4Utilities/G4PhysicsLists/doc/packagedoc.h
index 97c40964b9fc3baa1edeed5ffd61439b91aa41f7..2d6c0e6e6be3959c5e96e873ea1c1834a55b10ae 100644
--- a/Simulation/G4Utilities/G4PhysicsLists/doc/packagedoc.h
+++ b/Simulation/G4Utilities/G4PhysicsLists/doc/packagedoc.h
@@ -101,16 +101,6 @@ This package provides an interface to all the Geant4 physics lists to be include
 
 This package is only an interface, so it has no classes!
 
-@ref used_G4PhysicsLists
 
-@ref requirements_G4PhysicsLists
 
 */
-
-/**
-@page used_G4PhysicsLists Used Packages
-*/
-
-/**
-@page requirements_G4PhysicsLists Requirements
-*/
diff --git a/Simulation/G4Utilities/G4ProfilingTools/cmt/requirements b/Simulation/G4Utilities/G4ProfilingTools/cmt/requirements
deleted file mode 100644
index a57ff0e4e6aaf1b665a338c0fcda92af22f7032d..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4ProfilingTools/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package G4ProfilingTools
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*        External
-
-private
-use AthenaKernel        AthenaKernel-*          Control
-use AtlasBoost          AtlasBoost-*            External
-use AtlasROOT           AtlasROOT-*             External
-use G4AtlasTools        G4AtlasTools-*          Simulation/G4Atlas
-use Geant4              Geant4-*                External
-use CxxUtils            CxxUtils-*              Control
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-end_private
-
-apply_tag ROOTBasicLibs
-apply_tag ROOTMathLibs
-apply_tag ROOTSTLDictLibs
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTTableLibs
-
-apply_pattern declare_joboptions files="-s=../share *.py"
-apply_pattern declare_python_modules files="*.py"
-
-library G4ProfilingTools 
-apply_pattern dual_use_library files=*.cxx
diff --git a/Simulation/G4Utilities/G4ProfilingTools/python/G4ProfilingToolsConfig.py b/Simulation/G4Utilities/G4ProfilingTools/python/G4ProfilingToolsConfig.py
index 96f70777eec5906b8ed9afa1efc50278b53355ae..bee5bd5e03868ddf7089bf305f882ac9c6f14340 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/python/G4ProfilingToolsConfig.py
+++ b/Simulation/G4Utilities/G4ProfilingTools/python/G4ProfilingToolsConfig.py
@@ -12,31 +12,22 @@ def getTestActionTimerTool(name="G4UA::TestActionTimerTool", **kwargs):
         #from AthenaCommon.AppMgr import theApp
         #theApp.exit(1)
         return False
-
     from G4AtlasApps.SimFlags import simFlags
     # example custom configuration
     if name in simFlags.UserActionConfig.get_Value().keys():
         for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems():
             kwargs.setdefault(prop,value)
-    from G4ProfilingTools.G4ProfilingToolsConf import G4UA__TestActionTimerTool
-    return G4UA__TestActionTimerTool(name, **kwargs)
-        
+    return CfgMgr.G4UA__TestActionTimerTool(name, **kwargs)
+
+
 def getTestActionVPTimerTool(name="G4UA::TestActionVPTimerTool", **kwargs):
-    from AthenaCommon.ConcurrencyFlags import jobproperties as concurrencyProps
-    # ADS: this tool should be safe to run in MT
-    #if concurrencyProps.ConcurrencyFlags.NumThreads() >1:
-    #    log=Logging.logging.getLogger(name)
-    #    log.fatal('Attempt to run '+name+' with more than one thread, which is not supported')
-    #    return False
-    
     from G4AtlasApps.SimFlags import simFlags
     # example custom configuration
     if name in simFlags.UserActionConfig.get_Value().keys():
         for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems():
             kwargs.setdefault(prop,value)
-            
-    from G4ProfilingTools.G4ProfilingToolsConf import G4UA__TestActionVPTimerTool
-    return G4UA__TestActionVPTimerTool(name, **kwargs)
+    return CfgMgr.G4UA__TestActionVPTimerTool(name, **kwargs)
+
 
 def getTestActionEHistTool(name="G4UA::TestActionEHistTool", **kwargs):
     from AthenaCommon.ConcurrencyFlags import jobproperties as concurrencyProps
@@ -46,12 +37,9 @@ def getTestActionEHistTool(name="G4UA::TestActionEHistTool", **kwargs):
         #from AthenaCommon.AppMgr import theApp
         #theApp.exit(1)
         return False
-
     from G4AtlasApps.SimFlags import simFlags
     # example custom configuration
     if name in simFlags.UserActionConfig.get_Value().keys():
         for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems():
             kwargs.setdefault(prop,value)
-            
-    from G4ProfilingTools.G4ProfilingToolsConf import G4UA__TestActionEHistTool
-    return G4UA__TestActionEHistTool(name, **kwargs)
+    return CfgMgr.G4UA__TestActionEHistTool(name, **kwargs)
diff --git a/Simulation/G4Utilities/G4ProfilingTools/share/postInclude.G4ProfilingTools.py b/Simulation/G4Utilities/G4ProfilingTools/share/postInclude.G4ProfilingTools.py
index 5938d31cc7bd10ef7ceb5f62cdd752a3b3621593..f30f1c7534511113d6c09c093efdf46b949894ce 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/share/postInclude.G4ProfilingTools.py
+++ b/Simulation/G4Utilities/G4ProfilingTools/share/postInclude.G4ProfilingTools.py
@@ -9,7 +9,6 @@ print ServiceMgr.THistSvc
 
 from G4AtlasApps.SimFlags import simFlags
 # configuration for MT actions
-simFlags.OptionalUserActionList.addAction('G4UA::TestActionTimerTool',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step'])
-simFlags.OptionalUserActionList.addAction('G4UA::TestActionVPTimerTool',['BeginOfEvent','EndOfEvent','EndOfRun','BeginOfRun','Step'])
-simFlags.OptionalUserActionList.addAction('G4UA::TestActionEHistTool',['BeginOfRun','EndOfRun','Step','BeginOfTracking','EndOfTracking'])
-
+simFlags.OptionalUserActionList.addAction('G4UA::TestActionTimerTool',['Event','Run','Step'])
+simFlags.OptionalUserActionList.addAction('G4UA::TestActionVPTimerTool',['Event','Run','Step'])
+simFlags.OptionalUserActionList.addAction('G4UA::TestActionEHistTool',['Run','Step','Tracking'])
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.cxx
index be116a00ba979bffd925b673323099297b291411..4e9c31f5c2600ef59788f48ba4d2f41cb402be34 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.cxx
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.cxx
@@ -46,7 +46,7 @@ namespace G4UA{
   }
   
   
-  void TestActionEHist::preTracking(const G4Track* aTrack){
+  void TestActionEHist::PreUserTrackingAction(const G4Track* aTrack){
     if (aTrack) {
       
       // Set Particle label and empty trajectory
@@ -61,21 +61,21 @@ namespace G4UA{
     return;
   }
   
-  void TestActionEHist::postTracking(const G4Track* aTrack){
+  void TestActionEHist::PostUserTrackingAction(const G4Track* aTrack){
     if (aTrack) {
       m_trajectory.clear();
     }
     return;
   }
   
-  void TestActionEHist::beginOfRun(const G4Run*){
+  void TestActionEHist::BeginOfRunAction(const G4Run*){
     // initialize histogramming file (DON'T USE GAUDI) & directories
     m_world = new TFile(m_config.name.c_str(), "RECREATE");
     G4cout<<m_config.name<<" initialized, in directory "<<gDirectory->GetPath()<<G4endl;
     
   }
   
-  void TestActionEHist::endOfRun(const G4Run*){
+  void TestActionEHist::EndOfRunAction(const G4Run*){
 
     m_world->Write();
     m_world->Close();
@@ -85,7 +85,7 @@ namespace G4UA{
     return;
   }
   
-  void TestActionEHist::processStep(const G4Step* aStep){
+  void TestActionEHist::UserSteppingAction(const G4Step* aStep){
     
     if (aStep) {
       
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.h b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.h
index ed4726834d71ae0a6d226d7c45cdd87a91b0edbe..1daebd48f1ad8cac866abb193eb0046e1c5bd3bd 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.h
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHist.h
@@ -37,15 +37,13 @@ class IMessageSvc;
 class TFile;
 
 
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
-#include "G4AtlasInterfaces/IPostTrackingAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserTrackingAction.hh"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
 namespace G4UA{
 
   class TestActionEHist:
-  public IPreTrackingAction,  public IPostTrackingAction,  public IBeginRunAction,  public IEndRunAction,  public ISteppingAction
+    public G4UserTrackingAction, public G4UserRunAction, public G4UserSteppingAction
   {
     
   public:
@@ -63,11 +61,11 @@ namespace G4UA{
     };
     
     TestActionEHist(const Config& config);
-    virtual void preTracking(const G4Track*) override;
-    virtual void postTracking(const G4Track*) override;
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void endOfRun(const G4Run*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void PreUserTrackingAction(const G4Track*) override;
+    virtual void PostUserTrackingAction(const G4Track*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void EndOfRunAction(const G4Run*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
   private:
     Config m_config;	//!< holds the python configuration
     
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHistTool.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHistTool.cxx
index 1264831b6f6ffe4dd1075f6e08b56cafe4dcea92..d8297a5cbcd0d9134328b2dde1f2700fa572c29b 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHistTool.cxx
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHistTool.cxx
@@ -29,28 +29,18 @@ namespace G4UA{
 
   StatusCode TestActionEHistTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IPreTrackingActionTool::interfaceID()) {
-      *ppvIf = (IPreTrackingActionTool*) this;
+    if(riid == IG4TrackingActionTool::interfaceID()) {
+      *ppvIf = (IG4TrackingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IPostTrackingActionTool::interfaceID()) {
-      *ppvIf = (IPostTrackingActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndRunActionTool::interfaceID()) {
-      *ppvIf = (IEndRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHistTool.h b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHistTool.h
index db2830061cd4a19f5f4c7a8e5dfeb46587c20170..e1f075af783a3cb74667e157d38c68a1b4027d52 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHistTool.h
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionEHistTool.h
@@ -6,11 +6,9 @@
 #ifndef G4PROFILINGTOOLS_G4UA__TESTACTIONEHISTTOOL_H 
 #define G4PROFILINGTOOLS_G4UA__TESTACTIONEHISTTOOL_H 
 
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
-#include "G4AtlasInterfaces/IPostTrackingActionTool.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "TestActionEHist.h"
 
@@ -26,27 +24,21 @@ namespace G4UA{
   
   class TestActionEHistTool: 
   public ActionToolBase<TestActionEHist>,
-    public IPreTrackingActionTool,  public IPostTrackingActionTool,  public IBeginRunActionTool,  public IEndRunActionTool,  public ISteppingActionTool
+    public IG4TrackingActionTool, public IG4RunActionTool,  public IG4SteppingActionTool
   {
     
   public:
     /// Standard constructor
     TestActionEHistTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// Retrieve the begin of tracking action interface
-    virtual IPreTrackingAction* getPreTrackingAction() override final 
-    { return static_cast<IPreTrackingAction*>( getAction() ); }
-    /// Retrieve the end of tracking action interface
-    virtual IPostTrackingAction* getPostTrackingAction() override final 
-    { return static_cast<IPostTrackingAction*>( getAction() ); }
-    /// Retrieve the BoR action interface
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
-    /// Retrieve the EoR action interface
-    virtual IEndRunAction* getEndRunAction() override final 
-    { return static_cast<IEndRunAction*>( getAction() ); }
+    /// Retrieve the tracking action interface
+    virtual G4UserTrackingAction* getTrackingAction() override final 
+    { return static_cast<G4UserTrackingAction*>( getAction() ); }
+    /// Retrieve the run action interface
+    virtual G4UserRunAction* getRunAction() override final 
+    { return static_cast<G4UserRunAction*>( getAction() ); }
     /// Retrieve the stepping action interface
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final 
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     /// Gaudis query interface
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
 
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.cxx
index 4c3252e60446e6177a5d1e9e85aa4f9a898ce2c3..ff91a6fa9af5a013a443f8a2150074f82db9a964 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.cxx
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.cxx
@@ -100,7 +100,7 @@ namespace G4UA{
     
   }
 
-  void TestActionTimer::beginOfEvent(const G4Event*){
+  void TestActionTimer::BeginOfEventAction(const G4Event*){
 
     
     m_report.nev++;
@@ -117,7 +117,7 @@ namespace G4UA{
     return;
   }
   
-  void TestActionTimer::endOfEvent(const G4Event*){
+  void TestActionTimer::EndOfEventAction(const G4Event*){
  
     m_report.runTime += TimerSum(m_runTimer);
     m_eventTime = TimerSum(m_eventTimer);
@@ -129,7 +129,7 @@ namespace G4UA{
     
   }
   
-  void TestActionTimer::beginOfRun(const G4Run*){
+  void TestActionTimer::BeginOfRunAction(const G4Run*){
 
     
     m_report.runTime=0.;
@@ -138,14 +138,14 @@ namespace G4UA{
     return;
   }
   
-  void TestActionTimer::endOfRun(const G4Run*){
-    std::cerr<<"TestActionTimer::endOfRun "<< m_report.runTime <<std::endl;    
+  void TestActionTimer::EndOfRunAction(const G4Run*){
+    std::cerr<<"TestActionTimer::EndOfRunAction "<< m_report.runTime <<std::endl;
     m_report.runTime += TimerSum(m_runTimer);
     VPanic();
     PPanic();
   }
   
-  void TestActionTimer::processStep(const G4Step* aStep){
+  void TestActionTimer::UserSteppingAction(const G4Step* aStep){
     
     // HERE IS WHERE WE BEGIN OUR CLOCKING
     
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.h b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.h
index 55a4b21df4e1abcdc23243e2598c06fc6084c99a..e736983c6caeed98356baa2a52a38ea33b6460aa 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.h
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimer.h
@@ -35,11 +35,9 @@ class G4Timer;
 class ITHistSvc;
 
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
 namespace G4UA{
   
   /// @class TestActionTimer
@@ -50,7 +48,7 @@ namespace G4UA{
   ///         @author Wolfgang Ehrenfeld, University of Hamburg, Germany
 
   class TestActionTimer:
-  public IBeginEventAction,  public IEndEventAction,  public IBeginRunAction,  public IEndRunAction,  public ISteppingAction
+  public G4UserEventAction, public G4UserRunAction,  public G4UserSteppingAction
   {
     
   public:
@@ -82,11 +80,11 @@ namespace G4UA{
     const Report& getReport() const
     { return m_report; }
     
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void endOfRun(const G4Run*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void EndOfRunAction(const G4Run*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
 
     /* Enumeration for timers to be used
        First timers are by subdetector, second few are by particle
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.cxx
index 3c8db679ce9a8534d67f46014e584c66b03ba5d2..d6f85490aca778965309df35f1e5c0466fb9dd0b 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.cxx
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.cxx
@@ -20,28 +20,18 @@ namespace G4UA{
   }
   StatusCode TestActionTimerTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndRunActionTool::interfaceID()) {
-      *ppvIf = (IEndRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.h b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.h
index ca34d8dff53529ff34758df0980e70642c9af391..8da591871c47c5ba671a0b5e67b6b509cc786714 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.h
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionTimerTool.h
@@ -4,11 +4,9 @@
 
 #ifndef G4PROFILINGTOOLS_G4UA__TESTACTIONTIMERTOOL_H 
 #define G4PROFILINGTOOLS_G4UA__TESTACTIONTIMERTOOL_H 
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "TestActionTimer.h"
 
@@ -25,27 +23,21 @@ namespace G4UA{
   ///
   
   class TestActionTimerTool: public ActionToolBaseReport<TestActionTimer>,
-    public IBeginEventActionTool,  public IEndEventActionTool,  public IBeginRunActionTool,  public IEndRunActionTool,  public ISteppingActionTool
+    public IG4EventActionTool, public IG4RunActionTool,  public IG4SteppingActionTool
   {
     
   public:
     /// Standard constructor
     TestActionTimerTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// retrieve BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// retrieve EoE action
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
-    /// retrieve BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
-    /// retrieve EoR action
-    virtual IEndRunAction* getEndRunAction() override final 
-    { return static_cast<IEndRunAction*>( getAction() ); }
+    /// retrieve event action
+    virtual G4UserEventAction* getEventAction() override final 
+    { return static_cast<G4UserEventAction*>( getAction() ); }
+    /// retrieve run action
+    virtual G4UserRunAction* getRunAction() override final 
+    { return static_cast<G4UserRunAction*>( getAction() ); }
     /// retrieve stepping action
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final 
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
     /// Query interface for gaudi
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.cxx
index a30f57c1e20a10d2356ea99ef70892382dd7b861..b9f8e7db517f63e00aeffc679ff7df8357f4f327 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.cxx
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.cxx
@@ -59,29 +59,29 @@ namespace G4UA{
 
   }
 
-  void TestActionVPTimer::beginOfEvent(const G4Event*){
+  void TestActionVPTimer::BeginOfEventAction(const G4Event*){
     m_report.nev++;
     m_eventTimer->Start();
   }
   
-  void TestActionVPTimer::endOfEvent(const G4Event*){
+  void TestActionVPTimer::EndOfEventAction(const G4Event*){
     // this function also stops the timer. it will be restarted at BoE
     m_eventTime += TimerSum(m_eventTimer);
 
   }
   
-  void TestActionVPTimer::beginOfRun(const G4Run*){;
+  void TestActionVPTimer::BeginOfRunAction(const G4Run*){;
     m_runTimer->Start();
   }
   
-  void TestActionVPTimer::endOfRun(const G4Run*){
+  void TestActionVPTimer::EndOfRunAction(const G4Run*){
     // this also stops the timer
 
     m_report.runTime += TimerSum(m_runTimer);
 
   }
   
-  void TestActionVPTimer::processStep(const G4Step* aStep){
+  void TestActionVPTimer::UserSteppingAction(const G4Step* aStep){
 
     // HERE IS WHERE WE BEGIN OUR CLOCKING -- ONLY IF 
     // TIMERS ARE NOT VALID
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.h b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.h
index 13f2d27e6c54c4ddea3e637c61ae867b008b0d98..01f90b7a220b7c6e3840e5fa2811b7d6654a7ffd 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.h
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimer.h
@@ -44,16 +44,14 @@ class G4Step;
 class Algorithm;
 
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
 namespace G4UA{
 
   
   class TestActionVPTimer:
-  public IBeginEventAction,  public IEndEventAction,  public IBeginRunAction,  public IEndRunAction,  public ISteppingAction
+  public G4UserEventAction, public G4UserRunAction,  public G4UserSteppingAction
   {
     
   public:
@@ -143,11 +141,11 @@ namespace G4UA{
     const Report& getReport() const
     { return m_report; }
     
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void endOfRun(const G4Run*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void EndOfRunAction(const G4Run*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
 
   private:
     Config m_config;
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.cxx b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.cxx
index 347ecbfa244a502bccf873cac04dbbb956b30f39..6252366626d54ae17671f36ea1226a8b38e3c7db 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.cxx
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.cxx
@@ -49,28 +49,18 @@ namespace G4UA{
   }
   StatusCode TestActionVPTimerTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndRunActionTool::interfaceID()) {
-      *ppvIf = (IEndRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
@@ -81,12 +71,10 @@ namespace G4UA{
   StatusCode TestActionVPTimerTool::finalize(){
 
     for(auto tidAction : this->actions()) {
-      ((IEndRunAction*)tidAction.second)->endOfRun(0);
+      ((G4UserRunAction*)tidAction.second)->EndOfRunAction(0);
     }
  
-  
-  
-  mergeReports();
+    mergeReports();
     
     if(m_report.time_index.size()){
 
diff --git a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.h b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.h
index a0eeccbfb209e347eb0ebca75ece6d9890dd0fb5..7cc539a3bb08f0f5e9fedd0b43b299902c440bb6 100644
--- a/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.h
+++ b/Simulation/G4Utilities/G4ProfilingTools/src/TestActionVPTimerTool.h
@@ -4,11 +4,9 @@
 
 #ifndef G4PROFILINGTOOLS_G4UA__TESTACTIONVPTIMERTOOL_H 
 #define G4PROFILINGTOOLS_G4UA__TESTACTIONVPTIMERTOOL_H 
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "TestActionVPTimer.h"
 
@@ -26,27 +24,21 @@ namespace G4UA{
 class TestActionVPTimerTool:
   
   public ActionToolBaseReport<TestActionVPTimer>,
-    public IBeginEventActionTool,  public IEndEventActionTool,  public IBeginRunActionTool,  public IEndRunActionTool,  public ISteppingActionTool
+    public IG4EventActionTool, public IG4RunActionTool,  public IG4SteppingActionTool
   {
     
   public:
     /// constructor
     TestActionVPTimerTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// Retrieve the begin-event action interface
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// Retrieve the EoE action interface
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
-    /// Retrieve the BoR action interface
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
-    /// Retrieve the EoR action interface 
-    virtual IEndRunAction* getEndRunAction() override final 
-    { return static_cast<IEndRunAction*>( getAction() ); }
+    /// Retrieve the event action interface
+    virtual G4UserEventAction* getEventAction() override final 
+    { return static_cast<G4UserEventAction*>( getAction() ); }
+    /// Retrieve the run action interface
+    virtual G4UserRunAction* getRunAction() override final 
+    { return static_cast<G4UserRunAction*>( getAction() ); }
     /// Retrieve the stepping action interface
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final 
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     /// gaudi interface query
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
     /// triggers report merging from threads
diff --git a/Simulation/G4Utilities/G4StepLimitation/cmt/requirements b/Simulation/G4Utilities/G4StepLimitation/cmt/requirements
deleted file mode 100755
index 9b2292249db0378c81951970fca9e95d99aa11ce..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4StepLimitation/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package G4StepLimitation
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*        External
-
-private
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use Geant4              Geant4-*                External
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-end_private
-
-library G4StepLimitation *.cxx -s=components *.cxx
-
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Simulation/G4Utilities/G4StepLimitation/doc/packagedoc.h b/Simulation/G4Utilities/G4StepLimitation/doc/packagedoc.h
index 850c607276cd156aa0989cb6b079588d3ed4c563..18a727acc4ded8de344122ae00005ce06e9452bc 100644
--- a/Simulation/G4Utilities/G4StepLimitation/doc/packagedoc.h
+++ b/Simulation/G4Utilities/G4StepLimitation/doc/packagedoc.h
@@ -14,16 +14,6 @@ This class provides an interface for the Geant4 physics process called step limi
 
 The only class included in this package is G4StepLimitProcess , a UserPhysicsProcess.  It defines the step limitation.
 
-@ref used_G4StepLimitation
 
-@ref requirements_G4StepLimitation
 
 */
-
-/**
-@page used_G4StepLimitation Used Packages
-*/
-
-/**
-@page requirements_G4StepLimitation Requirements
-*/
diff --git a/Simulation/G4Utilities/G4TruthStrategies/cmt/requirements b/Simulation/G4Utilities/G4TruthStrategies/cmt/requirements
deleted file mode 100755
index 99ed213927dfe640ab8a409b4f4fa2fc4706b97e..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4TruthStrategies/cmt/requirements
+++ /dev/null
@@ -1,19 +0,0 @@
-package G4TruthStrategies
-
-public
-use AtlasPolicy         AtlasPolicy-*
-
-use MCTruthBase         MCTruthBase-*           Simulation/G4Sim
-
-private
-use AtlasCLHEP          AtlasCLHEP-*            External
-use Geant4              Geant4-*                External
-use MCTruth             MCTruth-*               Simulation/G4Sim
-#use SimHelpers          SimHelpers-*            Simulation/G4Sim
-end_private
-
-include_dirs "$(G4TruthStrategies_root)"
-
-library G4TruthStrategies ../src/*.cxx
-
-apply_pattern installed_library
diff --git a/Simulation/G4Utilities/G4TruthStrategies/doc/packagedoc.h b/Simulation/G4Utilities/G4TruthStrategies/doc/packagedoc.h
index 6cf21362518ea0c0b3b86f540ec9af4fb1accfc2..a4796838078c1c908a476bd305d639ea75b895bb 100644
--- a/Simulation/G4Utilities/G4TruthStrategies/doc/packagedoc.h
+++ b/Simulation/G4Utilities/G4TruthStrategies/doc/packagedoc.h
@@ -23,16 +23,6 @@ The truth strategies included in this package are:
  - IonizationStrategy : For saving hard ionizations (in the ID)
  - MuonCatchAllStrategy : For saving hard brems from muons (in the calorimetry)
 
-@ref used_G4TruthStrategies
 
-@ref requirements_G4TruthStrategies
 
 */
-
-/**
-@page used_G4TruthStrategies Used Packages
-*/
-
-/**
-@page requirements_G4TruthStrategies Requirements
-*/
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeAction.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeAction.h
index e74f8226eb06483fd95f3cffd1ec3dd16888d5d3..de883f00d89e26c88f041049452c33a8d1eb7de0 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeAction.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeAction.h
@@ -8,10 +8,9 @@
 #include "StoreGate/WriteHandle.h"
 #include "TrackRecord/TrackRecordCollection.h" // Can't be forward declared - it's a type def
 
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
+#include "G4UserSteppingAction.hh"
+#include "G4UserEventAction.hh"
+#include "G4UserTrackingAction.hh"
 
 #include "CLHEP/Units/SystemOfUnits.h"
 
@@ -19,31 +18,37 @@ namespace G4UA
 {
 
   /// @brief NEEDS DOCUMENTATION
-  class CosmicPerigeeAction final : public ISteppingAction, public IEndEventAction,
-                                    public IBeginEventAction, public IPreTrackingAction
+  class CosmicPerigeeAction final : public G4UserSteppingAction,
+                                    public G4UserEventAction,
+                                    public G4UserTrackingAction
   {
 
   public:
 
     struct Config
     {
-      bool AllowMods=false;
-      float pMinPrimary=100*CLHEP::MeV;
+      float pMinPrimary = 100*CLHEP::MeV;
     };
 
     CosmicPerigeeAction(const Config& config);
 
-    virtual void processStep(const G4Step*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void preTracking(const G4Track*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void PreUserTrackingAction(const G4Track*) override;
 
   private:
 
+    /// Configuration options
     Config m_config;
+
+    /// Output track track record
     SG::WriteHandle<TrackRecordCollection> m_trackRecordCollection;
+
+    /// State members
     bool m_hasBeenSaved;
-    double m_idZ, m_idR;
+    double m_idZ;
+    double m_idR;
 
   }; // class CosmicPerigeeAction
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeActionTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeActionTool.h
index 2a2f5cc33e4d49e6cb92d45824f58b8e6f2161c7..a74cfb697bca3ad9b989f833e2cd5fd4b1a39125 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeActionTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/CosmicPerigeeActionTool.h
@@ -9,10 +9,9 @@
 #include <string>
 
 // Infrastructure includes
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 
 // Local includes
@@ -29,39 +28,29 @@ namespace G4UA
   /// @author Andrea Di Simone
   ///
   class CosmicPerigeeActionTool : public ActionToolBase<CosmicPerigeeAction>,
-                                  public ISteppingActionTool,
-                                  public IEndEventActionTool,
-                                  public IBeginEventActionTool,
-                                  public IPreTrackingActionTool
+                                  public IG4SteppingActionTool,
+                                  public IG4EventActionTool,
+                                  public IG4TrackingActionTool
   {
 
     public:
 
       /// Standard constructor
       CosmicPerigeeActionTool(const std::string& type, const std::string& name,
-		       const IInterface* parent);
+		              const IInterface* parent);
 
 
       /// Retrieve the stepping action interface
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
-      /// Retrieve the begin-event action interface
-      virtual IBeginEventAction* getBeginEventAction() override final
-      { return static_cast<IBeginEventAction*>( getAction() ); }
-
-      /// Retrieve the end-event action interface
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
+      /// Retrieve the event action interface
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
       /// Retrieve the preTracking action interface
-      virtual IPreTrackingAction* getPreTrackingAction() override final
-      { return static_cast<IPreTrackingAction*>( getAction() ); }
-
-
-      /// Query interface for gaudi
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserTrackingAction* getTrackingAction() override final
+      { return static_cast<G4UserTrackingAction*>( getAction() ); }
 
     protected:
 
@@ -69,6 +58,7 @@ namespace G4UA
       virtual std::unique_ptr<CosmicPerigeeAction> makeAction() override final;
 
     private:
+
       /// Configuration parameters
       CosmicPerigeeAction::Config m_config;
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKiller.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKiller.h
index 010a8852fc9f0d8f79b3a11f439208558f913950..271ed7cf4089f5c7f7a9c1640c278df42d8d5ac9 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKiller.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKiller.h
@@ -6,15 +6,16 @@
 #define G4UserActions_FastIDKiller_H
 
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 namespace G4UA
 {
 
   /// @brief NEEDS DOCUMENTATION
-  class FastIDKiller : public IBeginRunAction, public ISteppingAction,
+  class FastIDKiller : public G4UserRunAction,
+                       public G4UserSteppingAction,
                        public AthMessaging
   {
 
@@ -43,8 +44,8 @@ namespace G4UA
     const Report& getReport() const
     { return m_report; }
 
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
 
   private:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKillerTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKillerTool.h
index 2e94417fd334aeceaec0107a20502dd53e5e2cd6..075f8ce7e8a8c5a4d46eb1d76ff5623c85b62bb0 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKillerTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/FastIDKillerTool.h
@@ -5,8 +5,8 @@
 #ifndef G4USERACTIONS_G4UA__FASTIDKILLERTOOL_H
 #define G4USERACTIONS_G4UA__FASTIDKILLERTOOL_H
 
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4UserActions/FastIDKiller.h"
 
@@ -15,8 +15,8 @@ namespace G4UA
 
   /// @brief NEEDS DOCUMENTATION
   class FastIDKillerTool: public ActionToolBaseReport<FastIDKiller>,
-                          public IBeginRunActionTool,
-                          public ISteppingActionTool
+                          public IG4RunActionTool,
+                          public IG4SteppingActionTool
   {
 
     public:
@@ -25,15 +25,11 @@ namespace G4UA
       FastIDKillerTool(const std::string& type, const std::string& name,
                        const IInterface* parent);
 
-      virtual IBeginRunAction* getBeginRunAction() override final
-      { return static_cast<IBeginRunAction*>( getAction() ); }
+      virtual G4UserRunAction* getRunAction() override final
+      { return static_cast<G4UserRunAction*>( getAction() ); }
 
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
-
-      /// Gaudi boiler plate
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
       virtual StatusCode finalize() override;
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorder.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorder.h
index 99717ffa52031238541a4406a762f5053a9ec4e5..2359d92bc0fc33cd99c7469e13158ba47b47d93a 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorder.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorder.h
@@ -7,28 +7,29 @@
 
 
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserRunAction.hh"
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
 
 #include <vector>
 
-
+// Forward declarations
 class TH1D;
 
-namespace G4UA{
+namespace G4UA
+{
 
-  class FluxRecorder:
-  public IBeginRunAction,  public IEndRunAction,  public IEndEventAction, public ISteppingAction
+  class FluxRecorder : public G4UserRunAction,
+                       public G4UserEventAction,
+                       public G4UserSteppingAction
   {
 
   public:
     FluxRecorder();
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void endOfRun(const G4Run*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void EndOfRunAction(const G4Run*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
   private:
     enum scoringVolume {RPCOlz,RPCOmz,RPCOhz,RPCMlz,RPCMmz,RPCMhz,MDTIlz,MDTImz,MDTIhz,
                         LMDTo,LMDTm,LMDTi,BMDTo,BMDTm,BMDTi,SWo,SWm,SWi,SWc,SWt,
@@ -39,7 +40,7 @@ namespace G4UA{
 
     double m_nev;
     std::vector<int> m_list;
-    void findVolume( const double , const double , const double , const double ) ;
+    void findVolume( const double, const double, const double, const double );
 
   }; // class FluxRecorder
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorderTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorderTool.h
index 0123bb92bd228deb4ce510b44fadeb652a834fe0..8fa62f0cdb9d768d1cf24373f58b6a1f54d49da6 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorderTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/FluxRecorderTool.h
@@ -2,15 +2,17 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef G4USERACTIONS_G4UA__FLUXRECORDERTOOL_H 
-#define G4USERACTIONS_G4UA__FLUXRECORDERTOOL_H 
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndRunActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#ifndef G4USERACTIONS_G4UA__FLUXRECORDERTOOL_H
+#define G4USERACTIONS_G4UA__FLUXRECORDERTOOL_H
+
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4UserActions/FluxRecorder.h"
-namespace G4UA{ 
+
+namespace G4UA
+{
 
   /// 	
   /// @class FluxRecorderTool
@@ -20,35 +22,31 @@ namespace G4UA{
   ///
   /// @author Andrea Di Simone
   ///
+  class FluxRecorderTool : public ActionToolBase<FluxRecorder>,
+                           public IG4RunActionTool, public IG4EventActionTool,
+                           public IG4SteppingActionTool
+  {
+
+    public:
+
+      /// standard tool ctor
+      FluxRecorderTool(const std::string& type, const std::string& name,const IInterface* parent);
+      /// retrieves the run action
+      virtual G4UserRunAction* getRunAction() override final
+      { return static_cast<G4UserRunAction*>( getAction() ); }
+      /// retrieves the event action
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
+      /// retrieves the stepping action
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
+
+    protected:
+
+      /// create action for this thread
+      virtual std::unique_ptr<FluxRecorder> makeAction() override final;
+
+  }; // class FluxRecorderTool
 
-class FluxRecorderTool: 
-public ActionToolBase<FluxRecorder>,
- public IBeginRunActionTool,  public IEndRunActionTool,  public IEndEventActionTool, public ISteppingActionTool
- {
-
-public:
-   /// standard tool ctor
-   FluxRecorderTool(const std::string& type, const std::string& name,const IInterface* parent);
-   /// retrieves the BoR action
-   virtual IBeginRunAction* getBeginRunAction() override final 
-   { return static_cast<IBeginRunAction*>( getAction() ); }
-   /// retrieves the EoR action
-   virtual IEndRunAction* getEndRunAction() override final 
-   { return static_cast<IEndRunAction*>( getAction() ); }
-   /// retrieves the EoE action
-   virtual IEndEventAction* getEndEventAction() override final 
-   { return static_cast<IEndEventAction*>( getAction() ); }
-   /// retrieves the stepping action
-   virtual ISteppingAction* getSteppingAction() override final 
-   { return static_cast<ISteppingAction*>( getAction() ); }
-   /// Gaudi interface handling
-   virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
- protected:
-   /// create action for this thread
-   virtual std::unique_ptr<FluxRecorder> makeAction() override final;
- private:
-}; // class FluxRecorderTool
-
-
-} // namespace G4UA 
+} // namespace G4UA
 #endif
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimer.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimer.h
index 7220c968c8cbfac5b65cbd768066dc8e103b5f97..b7c0a49bd6cd7ccdd96568ace07ce6b03a9b5d11 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimer.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimer.h
@@ -2,17 +2,15 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-
 #ifndef G4USERACTIONS_G4UA_G4SIMTIMER_H
 #define G4USERACTIONS_G4UA_G4SIMTIMER_H
 
 // Infrastructure includes
 #include "AthenaKernel/MsgStreamMember.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
 
 // Geant4 includes
 #include "G4Timer.hh"
+#include "G4UserEventAction.hh"
 
 // Forward declarations
 class G4Event;
@@ -24,7 +22,7 @@ namespace G4UA
   /// @class G4SimTimer
   /// @brief A user action for monitoring G4 runtime at event and run level.
   ///
-  /// This class implements the BeginEvent and EndEvent, and BeginRun actions.
+  /// This class implements the event and run action interfaces.
   /// The implementation was mostly taken from the previous G4SimTimer design.
   /// Results across worker threads are merged in finalize method of the
   /// G4SimTimerTool.
@@ -40,7 +38,7 @@ namespace G4UA
   /// @author Steve Farrell <Steven.Farrell>
   /// @author ???
   ///
-  class G4SimTimer : public IBeginEventAction, public IEndEventAction
+  class G4SimTimer : public G4UserEventAction
   {
 
     public:
@@ -61,9 +59,9 @@ namespace G4UA
         std::pair<double, double> meanAndSigma();
 
 	void merge(const Report& rep){
-	  nEvent+=rep.nEvent;
-	  eventTime+=rep.eventTime;
-	  eventTimeSquared+=rep.eventTimeSquared;
+	  nEvent += rep.nEvent;
+	  eventTime += rep.eventTime;
+	  eventTimeSquared += rep.eventTimeSquared;
 	}
       };
 
@@ -71,10 +69,10 @@ namespace G4UA
       G4SimTimer();
 
       /// Start timing this Geant4 event.
-      virtual void beginOfEvent(const G4Event* event) override;
+      virtual void BeginOfEventAction(const G4Event* event) override final;
 
       /// Finish timing this Geant4 event.
-      virtual void endOfEvent(const G4Event* event) override;
+      virtual void EndOfEventAction(const G4Event* event) override final;
 
       /// Retrieve my timing results
       const Report& getReport() const
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimerTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimerTool.h
index e3c8f04c8182d168b65afa67365b183e6cdddb81..b734a014ecee4a2f6c54f69e741d2f37b6221e26 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimerTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4SimTimerTool.h
@@ -9,8 +9,7 @@
 #include <string>
 
 // Infrastructure includes
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 
 // Local includes
@@ -28,7 +27,7 @@ namespace G4UA
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class G4SimTimerTool : public ActionToolBaseReport<G4SimTimer>,
-                         public IBeginEventActionTool, public IEndEventActionTool
+                         public IG4EventActionTool
   {
 
     public:
@@ -44,16 +43,8 @@ namespace G4UA
       virtual StatusCode finalize() override;
 
       /// Retrieve the begin-event action interface
-      virtual IBeginEventAction* getBeginEventAction() override final
-      { return static_cast<IBeginEventAction*>( getAction() ); }
-
-      /// Retreive the end-event action interface
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
-
-      /// Query interface for gaudi
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
     protected:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounter.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounter.h
index 9aae4a366d5d9d3fb78d4097595682f6926791cd..5fe848167e09032ed24c86330ce9b9d1885959de 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounter.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounter.h
@@ -5,10 +5,9 @@
 #ifndef G4USERACTIONS__G4UA_G4TRACKCOUNTER_H
 #define G4USERACTIONS__G4UA_G4TRACKCOUNTER_H
 
-// Infrastructure includes
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
+// Geant4 includes
+#include "G4UserEventAction.hh"
+#include "G4UserTrackingAction.hh"
 
 
 namespace G4UA
@@ -17,14 +16,10 @@ namespace G4UA
   /// @class G4TrackCounter
   /// @brief A simple action which counts tracks.
   ///
-  /// This action currently implements BeginEvent, EndRun, and PreTracking
-  /// interfaces. It's not clear if we really want to implement EndRun here.
-  /// Presumably we'll need to merge the counter results across threads, so it
-  /// might make sense to move some of that functionality in the finalize
-  /// method of the corresponding tool.
+  /// This action currently implements BeginEvent and PreTracking interfaces.
   ///
-  class G4TrackCounter : public IBeginEventAction,
-                         public IPreTrackingAction
+  class G4TrackCounter : public G4UserEventAction,
+                         public G4UserTrackingAction
   {
 
     public:
@@ -50,10 +45,10 @@ namespace G4UA
       /// @brief Increments event counter.
       /// I feel like there must be a better way to get this info.
       /// Hmm, the G4Run has a numberOfEvent field...
-      virtual void beginOfEvent(const G4Event* event) override;
+      virtual void BeginOfEventAction(const G4Event* event) override final;
 
       /// Increments the track counters
-      virtual void preTracking(const G4Track* track) override;
+      virtual void PreUserTrackingAction(const G4Track* track) override final;
 
       /// Retrieve my counts
       const Report& getReport() const
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounterTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounterTool.h
index e56a2990debf25a711aa42afd9acf311267bf70b..5fd9d688a7a70d65b8b1cb78c35a23ea3813e610 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounterTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/G4TrackCounterTool.h
@@ -5,12 +5,9 @@
 #ifndef G4USERACTIONS__G4UA_G4TRACKCOUNTERTOOL_H
 #define G4USERACTIONS__G4UA_G4TRACKCOUNTERTOOL_H
 
-// STL includes
-#include <string>
-
 // Infrastructure includes
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 
 // Local includes
@@ -27,8 +24,8 @@ namespace G4UA
   /// @author Steve Farrell <Steven.Farrell@cern.ch>
   ///
   class G4TrackCounterTool : public ActionToolBaseReport<G4TrackCounter>,
-                             public IBeginEventActionTool,
-                             public IPreTrackingActionTool
+                             public IG4EventActionTool,
+                             public IG4TrackingActionTool
   {
 
     public:
@@ -37,22 +34,19 @@ namespace G4UA
       G4TrackCounterTool(const std::string& type, const std::string& name,
                          const IInterface* parent);
 
-      /// Initialize tool - temporarily just for debugging
-      virtual StatusCode initialize() override;
+      /// Initialize tool
+      virtual StatusCode initialize() override final;
 
       /// Finalize and merge results from all threads
-      virtual StatusCode finalize() override;
-
-      /// Retrieve the begin-event action interface
-      virtual IBeginEventAction* getBeginEventAction() override final
-      { return static_cast<IBeginEventAction*>( getAction() ); }
+      virtual StatusCode finalize() override final;
 
-      /// Retrieve the pre-tracking action interface
-      virtual IPreTrackingAction* getPreTrackingAction() override final
-      { return static_cast<IPreTrackingAction*>( getAction() ); }
+      /// Retrieve the event action interface
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
-      /// Query interface for gaudi
-      virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
+      /// Retrieve the tracking action interface
+      virtual G4UserTrackingAction* getTrackingAction() override final
+      { return static_cast<G4UserTrackingAction*>( getAction() ); }
 
     protected:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKiller.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKiller.h
index 1262107b5bf2c6c0beaf534017b56c9b1fd9475b..4064e0b8b74b1d7052dc7f21c6858f7ba7bad21f 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKiller.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKiller.h
@@ -5,18 +5,18 @@
 #ifndef G4UserActions_HIPKiller_H
 #define G4UserActions_HIPKiller_H
 
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserSteppingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 namespace G4UA
 {
 
   /// @brief Kills Monopoles and QBalls with energy < 1 MeV
-  class HIPKiller : public ISteppingAction, public AthMessaging
+  class HIPKiller : public G4UserSteppingAction, public AthMessaging
   {
     public:
       HIPKiller();
-      virtual void processStep(const G4Step*) override;
+      virtual void UserSteppingAction(const G4Step*) override;
     private:
   }; // class HIPKiller
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKillerTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKillerTool.h
index d560a91e4106670e3d3166516bcb43645265d309..2fbc4bac1b5f35cdbefaf50a7e367b61b6ae79ae 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKillerTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPKillerTool.h
@@ -4,7 +4,7 @@
 
 #ifndef G4USERACTIONS_G4UA__HIPKILLERTOOL_H
 #define G4USERACTIONS_G4UA__HIPKILLERTOOL_H
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4UserActions/HIPKiller.h"
 
@@ -13,7 +13,7 @@ namespace G4UA
 
   /// @brief Tool which manages the HIPKiller user action.
   ///
-  class HIPKillerTool: public ActionToolBase<HIPKiller>, public ISteppingActionTool
+  class HIPKillerTool: public ActionToolBase<HIPKiller>, public IG4SteppingActionTool
   {
 
     public:
@@ -22,11 +22,8 @@ namespace G4UA
       HIPKillerTool(const std::string& type, const std::string& name,
                     const IInterface* parent);
 
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
-
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
     protected:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAccept.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAccept.h
index d00d046684dd0d19b0c0edc5ab34ef8c5a629299..0c522e2059cc2ce392d64110f5664d75e0fb16e3 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAccept.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAccept.h
@@ -5,11 +5,9 @@
 #ifndef G4UserActions_HIPLArVolumeAccept_H
 #define G4UserActions_HIPLArVolumeAccept_H
 
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
+#include "G4UserSteppingAction.hh"
+#include "G4UserEventAction.hh"
+#include "G4UserRunAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 #include "GaudiKernel/ServiceHandle.h"
@@ -18,8 +16,9 @@ namespace G4UA
 {
 
   /// @brief NEEDS DOCUMENTATION
-  class HIPLArVolumeAccept : public AthMessaging, public ISteppingAction,
-                             public IBeginEventAction, public IEndEventAction
+  class HIPLArVolumeAccept : public AthMessaging,
+                             public G4UserSteppingAction,
+                             public G4UserEventAction
   {
     public:
       HIPLArVolumeAccept();
@@ -38,9 +37,9 @@ namespace G4UA
       const Report& getReport() const
       { return m_report; }
 
-      virtual void processStep(const G4Step*) override;
-      virtual void beginOfEvent(const G4Event*) override;
-      virtual void endOfEvent(const G4Event*) override;
+      virtual void UserSteppingAction(const G4Step*) override;
+      virtual void BeginOfEventAction(const G4Event*) override;
+      virtual void EndOfEventAction(const G4Event*) override;
 
     private:
       Report m_report;
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAcceptTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAcceptTool.h
index 3c2c3cb7d9d8275d3eb5427e10dff98afd795da5..a6544d213f0d2254b57c07181875642c8c067f1d 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAcceptTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/HIPLArVolumeAcceptTool.h
@@ -5,9 +5,8 @@
 #ifndef G4USERACTIONS_G4UA__HIPLARVOLUMEACCEPTTOOL_H
 #define G4USERACTIONS_G4UA__HIPLARVOLUMEACCEPTTOOL_H
 
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4UserActions/HIPLArVolumeAccept.h"
 
@@ -17,9 +16,8 @@ namespace G4UA
   /// Tool which manages the HIPLArVolumeAccept action
   ///
   class HIPLArVolumeAcceptTool : public ActionToolBaseReport<HIPLArVolumeAccept>,
-                                 public ISteppingActionTool,
-                                 public IBeginEventActionTool,
-                                 public IEndEventActionTool
+                                 public IG4SteppingActionTool,
+                                 public IG4EventActionTool
   {
 
     public:
@@ -28,18 +26,11 @@ namespace G4UA
       HIPLArVolumeAcceptTool(const std::string& type, const std::string& name,
                              const IInterface* parent);
 
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
-      virtual IBeginEventAction* getBeginEventAction() override final
-      { return static_cast<IBeginEventAction*>( getAction() ); }
-
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
-
-      /// Gaudi boiler plate
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
       virtual StatusCode finalize() override;
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapper.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapper.h
index f52c144191fe1256689c2ecddbed0ebccc07b82e..b0e00f1c57dd6da0e3c983cff41b05d69fa5fc02 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapper.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapper.h
@@ -6,7 +6,7 @@
 #define G4UserActions_HitWrapper_H
 
 
-#include "G4AtlasInterfaces/IEndEventAction.h"
+#include "G4UserEventAction.hh"
 #include "StoreGate/StoreGateSvc.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaBaseComps/AthMessaging.h"
@@ -15,7 +15,7 @@ namespace G4UA
 {
 
   /// @brief NEEDS DOCUMENTATION
-  class HitWrapper : public AthMessaging, public IEndEventAction
+  class HitWrapper : public AthMessaging, public G4UserEventAction
   {
     public:
 
@@ -25,7 +25,7 @@ namespace G4UA
       };
 
       HitWrapper(const Config& config);
-      virtual void endOfEvent(const G4Event*) override;
+      virtual void EndOfEventAction(const G4Event*) override;
 
     private:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapperTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapperTool.h
index 2808854d57707771c96f8ca70bad0d65d6cf0df1..52054f8764b3369c67ab0cdbb480bd028a769089 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapperTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/HitWrapperTool.h
@@ -5,7 +5,7 @@
 #ifndef G4USERACTIONS_G4UA__HITWRAPPERTOOL_H
 #define G4USERACTIONS_G4UA__HITWRAPPERTOOL_H
 
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include  "G4AtlasTools/ActionToolBase.h"
 #include "G4UserActions/HitWrapper.h"
 
@@ -14,19 +14,15 @@ namespace G4UA
 
   /// @brief A tool which manages the HitWrapper user action.
   class HitWrapperTool : public ActionToolBase<HitWrapper>,
-                         public IEndEventActionTool
+                         public IG4EventActionTool
   {
     public:
       /// Standard constructor
       HitWrapperTool(const std::string& type, const std::string& name,
                      const IInterface* parent);
 
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
-
-      /// Gaudi boilerplate
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
     protected:
       virtual std::unique_ptr<HitWrapper> makeAction() override final;
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegrator.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegrator.h
index c34fb2d50219a703ae492c02d2e4c7e76d149997..eaab8edbcf9162284740a32252a99def1f7f7157 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegrator.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegrator.h
@@ -8,22 +8,19 @@
 #include "GaudiKernel/ITHistSvc.h"
 #include "GaudiKernel/ServiceHandle.h"
 
-#include <string>
-#include <map>
-
 #include "G4Pow.hh"
 #include "TString.h"
 
-class TProfile;
-class TProfile2D;
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
 
+#include <string>
+#include <map>
 
-// User action to evaluate the thickness (in %r.l. or i.l.) of all detectors
-// traversed by outgoing particles
+// Forward declarations
+class TProfile;
+class TProfile2D;
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
 
 namespace G4UA
 {
@@ -41,9 +38,8 @@ namespace G4UA
   /// that each instance has its own copy of the histograms which get merged in
   /// finalization of the LengthIntegratorTool.
   ///
-  class LengthIntegrator final : public IBeginEventAction,
-                                 public IEndEventAction,
-                                 public ISteppingAction
+  class LengthIntegrator final : public G4UserEventAction,
+                                 public G4UserSteppingAction
   {
 
     public:
@@ -53,13 +49,13 @@ namespace G4UA
 
       /// Called at beginning of G4 event to cache some details about the
       /// current primary vertex and particle. Also resets some measurements.
-      virtual void beginOfEvent(const G4Event*) override;
+      virtual void BeginOfEventAction(const G4Event*) override;
 
       /// Called at end of G4 event to finalize measurements and fill hists
-      virtual void endOfEvent(const G4Event*) override;
+      virtual void EndOfEventAction(const G4Event*) override;
 
       /// Called at every particle step to accumulate thickness.
-      virtual void processStep(const G4Step*) override;
+      virtual void UserSteppingAction(const G4Step*) override;
 
     private:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegratorTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegratorTool.h
index 313f13fef35833d115dc94f634e55f1e68b71fb2..b1489cd892687605c4dd01a270997d4446b6d132 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegratorTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/LengthIntegratorTool.h
@@ -10,9 +10,8 @@
 #include "GaudiKernel/ITHistSvc.h"
 
 // User action infrastructure includes
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 
 // Local includes
@@ -27,9 +26,8 @@ namespace G4UA
   /// Creates the LengthIntegrator for each worker thread.
   ///
   class LengthIntegratorTool : public ActionToolBase<LengthIntegrator>,
-                               public IBeginEventActionTool,
-                               public IEndEventActionTool,
-                               public ISteppingActionTool
+                               public IG4EventActionTool,
+                               public IG4SteppingActionTool
   {
 
     public:
@@ -41,21 +39,13 @@ namespace G4UA
       /// Initialize the tool
       virtual StatusCode initialize() override;
 
-      /// Retrieve the begin-event action interface
-      virtual IBeginEventAction* getBeginEventAction() override final
-      { return static_cast<IBeginEventAction*>( getAction() ); }
-
-      /// Retrieve the end-event action interface
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
+      /// Retrieve the event action interface
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
       /// Retrieve the stepping action interface
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
-
-      /// Query interface for gaudi
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
     protected:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKiller.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKiller.h
index 2cdb28c650b30c0ea2bf2377114568763be0e02d..c8abd6e369fea7beb6c90b13d9c83ae845a87e85 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKiller.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKiller.h
@@ -9,7 +9,7 @@
 
 // Infrastructure includes
 #include "AthenaKernel/MsgStreamMember.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserSteppingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 class StoreGateSvc;
@@ -20,7 +20,7 @@ namespace G4UA
   /// @class LooperKiller
   /// @brief A user action to kill looping tracks.
   ///
-  class LooperKiller final : public ISteppingAction, public AthMessaging
+  class LooperKiller final : public G4UserSteppingAction, public AthMessaging
   {
 
     public:
@@ -44,7 +44,7 @@ namespace G4UA
 
       LooperKiller(const Config& config);
 
-      virtual void processStep(const G4Step*) override;
+      virtual void UserSteppingAction(const G4Step*) override;
       /// Retrieve  results
       const Report& getReport() const
       { return m_report; }
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKillerTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKillerTool.h
index 707a33eaed83720aa8a0fc746dbd60fadc703d58..b8c923590c66e671f1e602f3d9f6fb17d16f187b 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKillerTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/LooperKillerTool.h
@@ -9,7 +9,7 @@
 #include <string>
 
 // Infrastructure includes
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 
 // Local includes
@@ -26,7 +26,7 @@ namespace G4UA
   /// @author Andrea Di Simone
   ///
   class LooperKillerTool : public ActionToolBaseReport<LooperKiller>,
-                           public ISteppingActionTool
+                           public IG4SteppingActionTool
   {
 
     public:
@@ -40,12 +40,8 @@ namespace G4UA
       virtual StatusCode finalize() override;
 
       /// Retrieve the begin-event action interface
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
-
-      /// Query interface for gaudi
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
     protected:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservation.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservation.h
index af1e2b964aa848b9fd5df38c6e807c9930d54136..5f82593d4f89ba096c89bb0b3ecd0753cc9e4e1a 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservation.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservation.h
@@ -5,9 +5,8 @@
 #ifndef G4UserActions_MomentumConservation_H
 #define G4UserActions_MomentumConservation_H
 
-
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
 #include "AthenaKernel/MsgStreamMember.h"
 
 #include <iostream>
@@ -16,17 +15,17 @@ namespace G4UA
 {
 
   /// @class MomentumConservation
-  /// @brief checks momentum conservation 
-  class MomentumConservation : public IEndEventAction, public ISteppingAction
+  /// @brief checks momentum conservation
+  class MomentumConservation : public G4UserEventAction, public G4UserSteppingAction
   {
     public:
 
       MomentumConservation()
         : m_msg("MomentumConservation"), _sum_edep(0), _sum_eesc(0)
-      {};
+      {}
 
-      virtual void endOfEvent(const G4Event*) override;
-      virtual void processStep(const G4Step*) override;
+      virtual void EndOfEventAction(const G4Event*) override;
+      virtual void UserSteppingAction(const G4Step*) override;
 
     private:
 
@@ -36,11 +35,11 @@ namespace G4UA
       /// Private message stream member and access to evtstore
       mutable Athena::MsgStreamMember m_msg;
 
-     /// Sum of energy deposited in the detector
-     double _sum_edep;
+      /// Sum of energy deposited in the detector
+      double _sum_edep;
 
-     /// Sum of energy escaping the detector (volume = 0)
-     double _sum_eesc;
+      /// Sum of energy escaping the detector (volume = 0)
+      double _sum_eesc;
 
   }; // class MomentumConservation
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservationTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservationTool.h
index 59fe94e6a75b486908e7645f1e0cfbeaa7b762fa..4cf2c23352884f541433c3a7652083db6734bd29 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservationTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/MomentumConservationTool.h
@@ -5,8 +5,8 @@
 #ifndef G4USERACTIONS_G4UA__MOMENTUMCONSERVATIONTOOL_H
 #define G4USERACTIONS_G4UA__MOMENTUMCONSERVATIONTOOL_H
 
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4UserActions/MomentumConservation.h"
 
@@ -16,8 +16,8 @@ namespace G4UA
   /// @brief Tool which manages the MomentumConservation user action.
   ///
   class MomentumConservationTool : public ActionToolBase<MomentumConservation>,
-                                   public IEndEventActionTool,
-                                   public ISteppingActionTool
+                                   public IG4EventActionTool,
+                                   public IG4SteppingActionTool
   {
 
     public:
@@ -26,15 +26,11 @@ namespace G4UA
       MomentumConservationTool(const std::string& type, const std::string& name,
                                const IInterface* parent);
 
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
-
-      /// Baudi boilerplate
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
     protected:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKiller.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKiller.h
index d565fdf3fc8476c57d5438648c6544fdc0ee749d..6650e2b4cf4e841f362d011804ce27f9b462bcdd 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKiller.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKiller.h
@@ -5,21 +5,21 @@
 #ifndef G4UserActions_PhotonKiller_H
 #define G4UserActions_PhotonKiller_H
 
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
+// Geant4 includes
+#include "G4UserSteppingAction.hh"
+#include "G4UserTrackingAction.hh"
 
 namespace G4UA
 {
 
   /// @brief NEEDS DOCUMENTATION
-  class PhotonKiller : public ISteppingAction, public IPreTrackingAction
+  class PhotonKiller : public G4UserSteppingAction, public G4UserTrackingAction
   {
     public:
       PhotonKiller();
-      virtual void processStep(const G4Step*) override;
-      virtual void preTracking(const G4Track*) override;
+      virtual void UserSteppingAction(const G4Step*) override final;
+      virtual void PreUserTrackingAction(const G4Track*) override final;
     private:
-      G4Track* m_lastTrack;
       int m_count;
       float m_energy;
   }; // class PhotonKiller
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKillerTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKillerTool.h
index aef3cc6d53a0825bf7d1d0d652877d58308fe0f4..0cfc6998bd9892f9e677a9c6c8d49a5899c77d89 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKillerTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/PhotonKillerTool.h
@@ -5,9 +5,9 @@
 #ifndef G4USERACTIONS_G4UA__PHOTONKILLERTOOL_H
 #define G4USERACTIONS_G4UA__PHOTONKILLERTOOL_H
 
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
-#include  "G4AtlasTools/ActionToolBase.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
+#include "G4AtlasTools/ActionToolBase.h"
 #include "G4UserActions/PhotonKiller.h"
 
 namespace G4UA
@@ -16,7 +16,7 @@ namespace G4UA
   /// @brief Tool which manages the PhotonKiller user action.
   ///
   class PhotonKillerTool : public ActionToolBase<PhotonKiller>,
-                           public ISteppingActionTool, public IPreTrackingActionTool
+                           public IG4SteppingActionTool, public IG4TrackingActionTool
   {
 
     public:
@@ -25,15 +25,11 @@ namespace G4UA
       PhotonKillerTool(const std::string& type, const std::string& name,
                        const IInterface* parent);
 
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
-      virtual IPreTrackingAction* getPreTrackingAction() override final
-      { return static_cast<IPreTrackingAction*>( getAction() ); }
-
-      /// Gaudi boilerplate
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserTrackingAction* getTrackingAction() override final
+      { return static_cast<G4UserTrackingAction*>( getAction() ); }
 
     protected:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlane.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlane.h
index cebe447da8cffb8f9ae858df9feb956beb68185f..3a804bcec33865871d61e2aa0014bd988cd892ce 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlane.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlane.h
@@ -5,76 +5,75 @@
 #ifndef G4UserActions_ScoringPlane_H
 #define G4UserActions_ScoringPlane_H
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
+#include "G4UserEventAction.hh"
 
 #include <string>
 
-
+// Forward declarations
 class TTree;
 
-namespace G4UA{
- 
- 
-  class ScoringPlane:
-  public IBeginRunAction,  public IEndRunAction,  public ISteppingAction,  public IBeginEventAction,  public IEndEventAction
+namespace G4UA
+{
+
+  /// @class ScoringPlane
+  /// @todo TODO NEEDS DOCUMENTATION
+  class ScoringPlane : public G4UserRunAction,
+                       public G4UserSteppingAction,
+                       public G4UserEventAction
   {
-    
-  public:
-    
-    struct Config
-    {
-      double      plane=22600;
-      int         pkill=0;
-      std::string fname="ufo.root";
-    };
 
-    ScoringPlane(const Config& config);
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void endOfRun(const G4Run*) override;
-    virtual void processStep(const G4Step*) override;
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-  private:
-    Config m_config;
-    
-    TTree* m_tree0;
-    TTree* m_tree1;
-    
-    int    m_evt;
-    int    m_ntr;
-    
-    int    m_pdg;
-    double m_cha;
-    double m_ene;
-    double m_vx;
-    double m_vy;
-    double m_vz;
-    double m_x0;
-    double m_y0;
-    double m_z0;
-    double m_t0;
-    double m_px0;
-    double m_py0;
-    double m_pz0;
-    double m_x1;
-    double m_y1;
-    double m_z1;
-    double m_t1;
-    double m_px1;
-    double m_py1;
-    double m_pz1;
-    double m_x;
-    double m_y;
-    double m_z;
-    
+    public:
+
+      struct Config
+      {
+        double      plane=22600;
+        int         pkill=0;
+        std::string fname="ufo.root";
+      };
+
+      ScoringPlane(const Config& config);
+      virtual void BeginOfRunAction(const G4Run*) override;
+      virtual void EndOfRunAction(const G4Run*) override;
+      virtual void UserSteppingAction(const G4Step*) override;
+      virtual void BeginOfEventAction(const G4Event*) override;
+      virtual void EndOfEventAction(const G4Event*) override;
+    private:
+      Config m_config;
+
+      TTree* m_tree0;
+      TTree* m_tree1;
+
+      int    m_evt;
+      int    m_ntr;
+
+      int    m_pdg;
+      double m_cha;
+      double m_ene;
+      double m_vx;
+      double m_vy;
+      double m_vz;
+      double m_x0;
+      double m_y0;
+      double m_z0;
+      double m_t0;
+      double m_px0;
+      double m_py0;
+      double m_pz0;
+      double m_x1;
+      double m_y1;
+      double m_z1;
+      double m_t1;
+      double m_px1;
+      double m_py1;
+      double m_pz1;
+      double m_x;
+      double m_y;
+      double m_z;
+
   }; // class ScoringPlane
-  
-  
-} // namespace G4UA 
 
+} // namespace G4UA
 
 #endif
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlaneTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlaneTool.h
index 4b4e64dec966cc52fe50c968ce575c22cc5d7098..2cb591aefd4dc3ae252a17a19d387cc78ca00e4a 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlaneTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringPlaneTool.h
@@ -2,59 +2,55 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#ifndef G4USERACTIONS_G4UA__SCORINGPLANETOOL_H 
-#define G4USERACTIONS_G4UA__SCORINGPLANETOOL_H 
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
+#ifndef G4USERACTIONS_G4UA__SCORINGPLANETOOL_H
+#define G4USERACTIONS_G4UA__SCORINGPLANETOOL_H
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4UserActions/ScoringPlane.h"
 
 
-namespace G4UA{ 
+namespace G4UA
+{
 
   /// @class ScoringPlaneTool
   /// @brief A tool to manage ScoprinPlane actions
   ///
   /// creates one ScoprinPlane instance per thread
   /// @author Andrea Di Simone
+  ///
+  class ScoringPlaneTool : public ActionToolBase<ScoringPlane>,
+                           public IG4RunActionTool,
+                           public IG4SteppingActionTool,
+                           public IG4EventActionTool
+  {
 
+    public:
+
+      /// standard tool ctor
+      ScoringPlaneTool(const std::string& type, const std::string& name,const IInterface* parent);
+      /// retrieves run action
+      virtual G4UserRunAction* getRunAction() override final
+      { return static_cast<G4UserRunAction*>( getAction() ); }
+      /// retrieves stepping action
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
+      /// retrieves event action
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
+
+    protected:
+
+      /// creates the action instances
+      virtual std::unique_ptr<ScoringPlane> makeAction() override final;
+
+    private:
+
+      /// holds the python configuration
+      ScoringPlane::Config m_config;
 
-class ScoringPlaneTool: 
-  public ActionToolBase<ScoringPlane>,
-    public IBeginRunActionTool,  public IEndRunActionTool,  public ISteppingActionTool,  public IBeginEventActionTool,  public IEndEventActionTool
-  {
-    
-  public:
-    /// standard tool ctor
-    ScoringPlaneTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// retrieves BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
-    /// retrieves EoR action
-    virtual IEndRunAction* getEndRunAction() override final 
-    { return static_cast<IEndRunAction*>( getAction() ); }
-    /// retrieves stepping action
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
-    /// retrieves BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// retrieves EoE action
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
-    /// gaudi interface manipulation
-    virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
-  protected:
-    /// creates the action instances
-    virtual std::unique_ptr<ScoringPlane> makeAction() override final;
-  private:
-    /// holds the python configuration
-    ScoringPlane::Config m_config;
   }; // class ScoringPlaneTool
-  
-  
-} // namespace G4UA 
+
+} // namespace G4UA
 #endif
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKiller.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKiller.h
index 267522e88f153a873831a3d811d9db35aa639b6b..6ea12305e6d199d6f2b6481572887fb3c3f0e2d8 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKiller.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKiller.h
@@ -5,23 +5,21 @@
 #ifndef G4UserActions_ScoringVolumeTrackKiller_H
 #define G4UserActions_ScoringVolumeTrackKiller_H
 
-
-
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 namespace G4UA
 {
 
   /// @brief NEEDS DOCUMENTATION
-  class ScoringVolumeTrackKiller : public AthMessaging, public IEndEventAction,
-                                   public ISteppingAction
+  class ScoringVolumeTrackKiller : public AthMessaging, public G4UserEventAction,
+                                   public G4UserSteppingAction
   {
     public:
       ScoringVolumeTrackKiller();
-      virtual void endOfEvent(const G4Event*) override;
-      virtual void processStep(const G4Step*) override;
+      virtual void EndOfEventAction(const G4Event*) override;
+      virtual void UserSteppingAction(const G4Step*) override;
     private:
       unsigned long m_killCount;
   }; // class ScoringVolumeTrackKiller
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKillerTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKillerTool.h
index 9a64273715ea766228907f476696ee95d894040c..bd9102806dcbfd54ca07fddfba460c3dfdbc83da 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKillerTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/ScoringVolumeTrackKillerTool.h
@@ -4,8 +4,8 @@
 
 #ifndef G4USERACTIONS_G4UA__SCORINGVOLUMETRACKKILLERTOOL_H
 #define G4USERACTIONS_G4UA__SCORINGVOLUMETRACKKILLERTOOL_H
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4UserActions/ScoringVolumeTrackKiller.h"
 
@@ -15,8 +15,8 @@ namespace G4UA
   /// @brief Tool which manages the ScoringVolumeTrackKiller user action.
   ///
   class ScoringVolumeTrackKillerTool : public ActionToolBase<ScoringVolumeTrackKiller>,
-                                       public IEndEventActionTool,
-                                       public ISteppingActionTool
+                                       public IG4EventActionTool,
+                                       public IG4SteppingActionTool
   {
 
     public:
@@ -25,14 +25,10 @@ namespace G4UA
       ScoringVolumeTrackKillerTool(const std::string& type, const std::string& name,
                                    const IInterface* parent);
 
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
-
-      /// Gaudi boiler plate
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
     protected:
 
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleAction.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleAction.h
index 51bf4a44b315dd344bd952eaa155fb08cbdb8bb5..f976ac5ed629a593e9922fe8aca3b1a9448b86c2 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleAction.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleAction.h
@@ -7,7 +7,7 @@
 
 #include <string>
 
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserSteppingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 class TrackFastSimSD;
@@ -16,11 +16,11 @@ namespace G4UA
 {
 
   /// @brief NEEDS DOCUMENTATION
-  class StoppedParticleAction : public AthMessaging, public ISteppingAction
+  class StoppedParticleAction : public AthMessaging, public G4UserSteppingAction
   {
     public:
       StoppedParticleAction();
-      virtual void processStep(const G4Step*) override;
+      virtual void UserSteppingAction(const G4Step*) override;
     private:
       bool isSUSYParticle(const int) const;
       TrackFastSimSD * m_fsSD;
diff --git a/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleActionTool.h b/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleActionTool.h
index 25a785c6fc21fd3294e1dc48d7121107d34da2e6..ea14a25da1e9d06ecbe96e752d2c0d5d796a295d 100644
--- a/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleActionTool.h
+++ b/Simulation/G4Utilities/G4UserActions/G4UserActions/StoppedParticleActionTool.h
@@ -5,7 +5,7 @@
 #ifndef G4USERACTIONS_G4UA__STOPPEDPARTICLEACTIONTOOL_H
 #define G4USERACTIONS_G4UA__STOPPEDPARTICLEACTIONTOOL_H
 
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "G4UserActions/StoppedParticleAction.h"
 
@@ -15,7 +15,7 @@ namespace G4UA
   /// @brief Tool which manages the StoppedParticleAction
   ///
   class StoppedParticleActionTool: public ActionToolBase<StoppedParticleAction>,
-                                   public ISteppingActionTool
+                                   public IG4SteppingActionTool
   {
 
     public:
@@ -24,12 +24,8 @@ namespace G4UA
       StoppedParticleActionTool(const std::string& type, const std::string& name,
                                 const IInterface* parent);
 
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
-
-      /// Gaudi boilerplate
-      virtual StatusCode
-      queryInterface(const InterfaceID& riid, void** ppvInterface) override;
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
 
     protected:
 
diff --git a/Simulation/G4Utilities/G4UserActions/cmt/requirements b/Simulation/G4Utilities/G4UserActions/cmt/requirements
deleted file mode 100644
index 9df45b3a875f700e70ee13edc95fcee71229d437..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/G4UserActions/cmt/requirements
+++ /dev/null
@@ -1,35 +0,0 @@
-package G4UserActions
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AthenaKernel        AthenaKernel-*          Control
-use AtlasROOT           AtlasROOT-*             External
-use GaudiInterface      GaudiInterface-*        External
-use Geant4              Geant4-*                External
-use G4AtlasInterfaces   G4AtlasInterfaces-*     Simulation/G4Atlas
-use G4AtlasTools        G4AtlasTools-*          Simulation/G4Atlas
-use StoreGate           StoreGate-*             Control
-use TrackRecord         TrackRecord-*           Simulation/G4Sim
-use AtlasCLHEP          AtlasCLHEP-*            External
-
-private
-use AtlasTBB            AtlasTBB-*              External
-use CxxUtils            CxxUtils-*              Control
-use EventInfo           EventInfo-*             Event
-use InDetSimEvent       InDetSimEvent-*         InnerDetector
-use MCTruth             MCTruth-*               Simulation/G4Sim
-use MuonSimEvent        MuonSimEvent-*          MuonSpectrometer
-use SimHelpers          SimHelpers-*            Simulation/G4Sim
-use TrackWriteFastSim   TrackWriteFastSim-*     Simulation/G4Utilities
-use AsgTools		AsgTools-*		Control/AthToolSupport
-use StoreGate	        StoreGate-*		Control
-end_private
-
-
-
-library G4UserActions "../src/*.cxx ../src/components/*.cxx"
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
diff --git a/Simulation/G4Utilities/G4UserActions/doc/packagedoc.h b/Simulation/G4Utilities/G4UserActions/doc/packagedoc.h
index 1deb6c2c1bb4a8def881f2330d6bf79765bfadec..8d1c6730a685c6ec8fc0aa4c02354edd962ec021 100644
--- a/Simulation/G4Utilities/G4UserActions/doc/packagedoc.h
+++ b/Simulation/G4Utilities/G4UserActions/doc/packagedoc.h
@@ -33,16 +33,6 @@ default, and some are for very specific cases.
 
   - VerboseSelector : Sets the verbosity level for several Geant actions
 
-@ref used_G4UserActions
 
-@ref requirements_G4UserActions
 
 */
-
-/**
-@page used_G4UserActions Used Packages
-*/
-
-/**
-@page requirements_G4UserActions Requirements
-*/
diff --git a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py
index 512b0b7e7b192eaec6e68cabcf617610ee5c89f3..453d79875293d29b78700ea7a209262a524211a2 100644
--- a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py
+++ b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfig.py
@@ -8,54 +8,85 @@ from G4AtlasServices import G4AtlasServicesConfig
 # This way, e.g., after the getter is called the tool is automatically added
 # to the ToolSvc and can be assigned to a ToolHandle by the add function.
 # Also, passing arguments to the getter (like "this is a system action") is not straightforward
- 
+
+def getHitWrapperTool(name="G4UA::HitWrapperTool", **kwargs):
+    from G4AtlasApps.SimFlags import simFlags
+    # example custom configuration
+    if name in simFlags.UserActionConfig.get_Value().keys():
+        for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems():
+            kwargs.setdefault(prop,value)
+    return CfgMgr.G4UA__HitWrapperTool(name, **kwargs)
+
+
 def getFastIDKillerTool(name="G4UA::FastIDKillerTool", **kwargs):
-    from G4UserActions.G4UserActionsConf import G4UA__FastIDKillerTool
-    return G4UA__FastIDKillerTool(name, **kwargs)
+    return CfgMgr.G4UA__FastIDKillerTool(name, **kwargs)
+
+
+def getFastMBKillerTool(name="G4UA::FastMBKillerTool", **kwargs):
+    kwargs.setdefault('Z',3600)
+    kwargs.setdefault('R',14)
+    return getFastIDKillerTool(name, **kwargs)
+
 
 def addFastIDKillerTool(name="G4UA::FastIDKillerTool",system=False):
-    G4AtlasServicesConfig.addAction(name,['BeginOfRun','Step'],system)
+    G4AtlasServicesConfig.addAction(name,['Run','Step'],system)
+
 
 def getHIPKillerTool(name="G4UA::HIPKillerTool", **kwargs):
-    from G4UserActions.G4UserActionsConf import G4UA__HIPKillerTool
-    return G4UA__HIPKillerTool(name, **kwargs)
+    return CfgMgr.G4UA__HIPKillerTool(name, **kwargs)
+
 
 def addHIPKillerTool(name="G4UA::HIPKillerTool",system=False):
     G4AtlasServicesConfig.addAction(name,['Step'],system)
 
+
 def getHIPLArVolumeAcceptTool(name="G4UA::HIPLArVolumeAcceptTool", **kwargs):
-    from G4UserActions.G4UserActionsConf import G4UA__HIPLArVolumeAcceptTool
-    return G4UA__HIPLArVolumeAcceptTool(name, **kwargs)
+    return CfgMgr.G4UA__HIPLArVolumeAcceptTool(name, **kwargs)
+
 
 def addHIPLArVolumeAcceptTool(name="G4UA::HIPLArVolumeAcceptTool", system=False):
-    G4AtlasServicesConfig.addAction(theTool,['Step','BeginOfEvent','EndOfEvent'],system)
+    G4AtlasServicesConfig.addAction(theTool,['Step','Event'],system)
+
 
 def getLooperKillerTool(name="G4UA::LooperKillerTool", **kwargs):
-    from G4UserActions.G4UserActionsConf import G4UA__LooperKillerTool
-    return G4UA__LooperKillerTool(name, **kwargs)
+    return CfgMgr.G4UA__LooperKillerTool(name, **kwargs)
+
+
+def getLooperKillerEventOverlayTool(name="G4UA::LooperKillerEventOverlayTool", **kwargs):
+    kwargs.setdefault("MaxSteps",1000000)
+    kwargs.setdefault("PrintSteps",10)
+    kwargs.setdefault("VerboseLevel",1)
+    kwargs.setdefault("AbortEvent",False)
+    kwargs.setdefault("SetError",True)
+    return getLooperKillerTool(name, **kwargs)
+
 
 def addLooperKillerTool(name="G4UA::LooperKillerTool", system=False):
     G4AtlasServicesConfig.addAction(name,['Step'],system)
 
+
 def getMonopoleLooperKillerTool(name="MonopoleLooperKillerTool", **kwargs):
     kwargs.setdefault("PrintSteps", 2)
     kwargs.setdefault("MaxSteps", 2000000)
     kwargs.setdefault("VerboseLevel", 0)
     return getLooperKillerTool(name, **kwargs)
 
+
 def getMomentumConservationTool(name="G4UA::MomentumConservationTool", **kwargs):
-    from G4UserActions.G4UserActionsConf import G4UA__MomentumConservationTool
-    return G4UA__MomentumConservationTool(name, **kwargs)
+    return CfgMgr.G4UA__MomentumConservationTool(name, **kwargs)
+
 
 def addMomentumConservationTool(name="G4UA::MomentumConservationTool", system=False):
-    G4AtlasServicesConfig.addAction(name,['Step','EndOfEvent'],system)
+    G4AtlasServicesConfig.addAction(name,['Step','Event'],system)
+
 
 def getScoringVolumeTrackKillerTool(name="G4UA::ScoringVolumeTrackKillerTool", **kwargs):
-    from G4UserActions.G4UserActionsConf import G4UA__ScoringVolumeTrackKillerTool
-    return G4UA__ScoringVolumeTrackKillerTool(name, **kwargs)
+    return CfgMgr.G4UA__ScoringVolumeTrackKillerTool(name, **kwargs)
+
 
 def addScoringVolumeTrackKillerTool(name="G4UA::ScoringVolumeTrackKillerTool", system=False):
-    G4AtlasServicesConfig.addAction(theTool,['Step','EndOfEvent'],system)
+    G4AtlasServicesConfig.addAction(theTool,['Step','Event'],system)
+
 
 def getScoringPlaneTool(name="G4UA::ScoringPlaneTool", **kwargs):
     from AthenaCommon.ConcurrencyFlags import jobproperties as concurrencyProps
@@ -65,15 +96,13 @@ def getScoringPlaneTool(name="G4UA::ScoringPlaneTool", **kwargs):
         #from AthenaCommon.AppMgr import theApp
         #theApp.exit(1)
         return False
-
     from G4AtlasApps.SimFlags import simFlags
     # example custom configuration
     if name in simFlags.UserActionConfig.get_Value().keys():
         for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems():
             kwargs.setdefault(prop,value)
+    return CfgMgr.G4UA__ScoringPlaneTool(name, **kwargs)
 
-    from G4UserActions.G4UserActionsConf import G4UA__ScoringPlaneTool
-    return G4UA__ScoringPlaneTool(name, **kwargs)
 
 def getFluxRecorderTool(name="G4UA::FluxRecorderTool", **kwargs):
     from AthenaCommon.ConcurrencyFlags import jobproperties as concurrencyProps
@@ -83,6 +112,4 @@ def getFluxRecorderTool(name="G4UA::FluxRecorderTool", **kwargs):
         #from AthenaCommon.AppMgr import theApp
         #theApp.exit(1)
         return False
-
-    from G4UserActions.G4UserActionsConf import G4UA__FluxRecorderTool
-    return G4UA__FluxRecorderTool(name, **kwargs)
+    return CfgMgr.G4UA__FluxRecorderTool(name, **kwargs)
diff --git a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py
index 311df1311b0693ff2f6d7b09c46759a499e3968f..24851a3f84cd0496294b711a537361b739d0de28 100644
--- a/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py
+++ b/Simulation/G4Utilities/G4UserActions/python/G4UserActionsConfigDb.py
@@ -6,16 +6,18 @@ from AthenaCommon.CfgGetter import addTool
 addTool("G4UserActions.G4UserActionsConf.G4UA__G4SimTimerTool", "G4UA::G4SimTimerTool")
 addTool("G4UserActions.G4UserActionsConf.G4UA__CosmicPerigeeActionTool", "G4UA::CosmicPerigeeActionTool")
 addTool("G4UserActions.G4UserActionsConf.G4UA__G4TrackCounterTool", "G4UA::G4TrackCounterTool")
-addTool("G4UserActions.G4UserActionsConf.G4UA__HitWrapperTool", "G4UA::HitWrapperTool")
 addTool("G4UserActions.G4UserActionsConf.G4UA__LengthIntegratorTool", "G4UA::LengthIntegratorTool")
 addTool("G4UserActions.G4UserActionsConf.G4UA__PhotonKillerTool", "G4UA::PhotonKillerTool")
 addTool("G4UserActions.G4UserActionsConf.G4UA__StoppedParticleActionTool", "G4UA::StoppedParticleActionTool")
 
 addTool("G4UserActions.G4UserActionsConfig.getFastIDKillerTool", "G4UA::FastIDKillerTool")
+addTool("G4UserActions.G4UserActionsConfig.getFastMBKillerTool", "G4UA::FastMBKillerTool")
+addTool("G4UserActions.G4UserActionsConfig.getHitWrapperTool", "G4UA::HitWrapperTool")
 addTool("G4UserActions.G4UserActionsConfig.getHIPKillerTool", "G4UA::HIPKillerTool")
 addTool("G4UserActions.G4UserActionsConfig.getHIPLArVolumeAcceptTool", "G4UA::HIPLArVolumeAcceptTool")
 addTool("G4UserActions.G4UserActionsConfig.getLooperKillerTool", "G4UA::LooperKillerTool")
 addTool("G4UserActions.G4UserActionsConfig.getMonopoleLooperKillerTool", "MonopoleLooperKillerTool")
+addTool("G4UserActions.G4UserActionsConfig.getLooperKillerEventOverlayTool", "G4UA::LooperKillerEventOverlayTool")
 addTool("G4UserActions.G4UserActionsConfig.getMomentumConservationTool", "G4UA::MomentumConservationTool")
 addTool("G4UserActions.G4UserActionsConfig.getScoringVolumeTrackKillerTool", "G4UA::ScoringVolumeTrackKillerTool")
 
diff --git a/Simulation/G4Utilities/G4UserActions/share/LengthIntegrator_options.py b/Simulation/G4Utilities/G4UserActions/share/LengthIntegrator_options.py
index e91c1e955e6785254a6e4a8bfc4f9229b763faac..bb8be99530f12fcf7d2b31cde0eaa435c46c425a 100644
--- a/Simulation/G4Utilities/G4UserActions/share/LengthIntegrator_options.py
+++ b/Simulation/G4Utilities/G4UserActions/share/LengthIntegrator_options.py
@@ -1,7 +1,7 @@
 ## Add RadLengthIntegrator to the UserActions, and produce a histogram
 from G4AtlasApps.SimFlags import simFlags
-simFlags.OptionalUserActionList.addAction('G4UA::LengthIntegratorTool',['BeginOfEvent','EndOfEvent','Step'])
-    
+simFlags.OptionalUserActionList.addAction('G4UA::LengthIntegratorTool',['Event','Step'])
+
 
 from AthenaCommon.AppMgr import ServiceMgr
 from GaudiSvc.GaudiSvcConf import THistSvc
diff --git a/Simulation/G4Utilities/G4UserActions/share/jobOptions.FastIDKiller.py b/Simulation/G4Utilities/G4UserActions/share/jobOptions.FastIDKiller.py
index 94c2ed656465f09f22fbe00682d634367ef50d93..a5270fa479f215251a7177e444f19f721d9d528a 100644
--- a/Simulation/G4Utilities/G4UserActions/share/jobOptions.FastIDKiller.py
+++ b/Simulation/G4Utilities/G4UserActions/share/jobOptions.FastIDKiller.py
@@ -9,7 +9,7 @@
 __version__="$Revision: 1.3 $"
 #==============================================================
 from G4AtlasApps.SimFlags import simFlags
-simFlags.OptionalUserActionList.addAction('G4UA::FastIDKillerTool',['BeginOfRun','Step'])
+simFlags.OptionalUserActionList.addAction('G4UA::FastIDKillerTool',['Run','Step'])
 
 #--- End jobOptions.FastIDKiller.py file  ------------------------------
 
diff --git a/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeAction.cxx b/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeAction.cxx
index d0c235c18307772cc973c2c5c5f2e38589b8400a..bf26bd9b8ae61ef8d3252fc1b799f11df8edb5fb 100644
--- a/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeAction.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeAction.cxx
@@ -29,14 +29,13 @@ namespace G4UA
   }
 
   //---------------------------------------------------------------------------
-  void CosmicPerigeeAction::beginOfEvent(const G4Event*)
+  void CosmicPerigeeAction::BeginOfEventAction(const G4Event*)
   {
-#ifdef G4MULTITHREADED
-    // Temporary fix for Hive until isValid is fixed
-    m_trackRecordCollection = CxxUtils::make_unique<TrackRecordCollection>(m_trackRecordCollection.name());
-#else
-    if (!m_trackRecordCollection.isValid()) m_trackRecordCollection = CxxUtils::make_unique<TrackRecordCollection>(m_trackRecordCollection.name());
-#endif
+    if (!m_trackRecordCollection.isValid()) {
+      m_trackRecordCollection = CxxUtils::make_unique<TrackRecordCollection>(
+          m_trackRecordCollection.name());
+    }
+
     //FIXME need a nice way of getting the maximum size of the ID envelope in R and Z.
     //EnvelopeGeometryManager *gm=EnvelopeGeometryManager::GetGeometryManager();
     //m_idR = gm->IdetOuterRadius();
@@ -44,19 +43,19 @@ namespace G4UA
   }
 
   //---------------------------------------------------------------------------
-  void CosmicPerigeeAction::endOfEvent(const G4Event*)
+  void CosmicPerigeeAction::EndOfEventAction(const G4Event*)
   {
   }
 
   //---------------------------------------------------------------------------
-  void CosmicPerigeeAction::preTracking(const G4Track*)
+  void CosmicPerigeeAction::PreUserTrackingAction(const G4Track*)
   {
     // reset the field
     m_hasBeenSaved = false;
   }
 
   //---------------------------------------------------------------------------
-  void CosmicPerigeeAction::processStep(const G4Step* aStep)
+  void CosmicPerigeeAction::UserSteppingAction(const G4Step* aStep)
   {
     // See if this is a new track
     if (aStep->GetPreStepPoint()->GetStepStatus() == fUndefined)
@@ -101,6 +100,8 @@ namespace G4UA
       theStep = postStep;
     }
 
+    // Could the following code be optimized?
+    // There seems to be a bit of object copying.
     int pdgcode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
     double ener = theStep->GetTotalEnergy();
     G4ThreeVector pos = theStep->GetPosition();
@@ -111,11 +112,11 @@ namespace G4UA
     if (aStep->GetTrack()->GetDefinition() == G4Geantino::Definition() ) pdgcode=999;
     if (aStep->GetTrack()->GetDefinition() == G4ChargedGeantino::Definition() ) pdgcode=998;
 
-    //create the TimedTrackRecord
+    // Create the TimedTrackRecord
     TrackHelper trHelp(aStep->GetTrack());
     int barcode = trHelp.GetBarcode();
-    m_trackRecordCollection->Emplace(pdgcode,ener,mom,pos,time,barcode,preVol->GetName());
-
+    m_trackRecordCollection->Emplace(pdgcode, ener, mom, pos, time, barcode,
+                                     preVol->GetName());
   }
 
 } // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeActionTool.cxx b/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeActionTool.cxx
index 97c0fe681ce2f701075cb68887aff27f70bc2d08..84ed3d8f2c677f803708f067fda9e8d3b12bea56 100644
--- a/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeActionTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/CosmicPerigeeActionTool.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/CosmicPerigeeActionTool.h"
 
 namespace G4UA
@@ -16,52 +15,19 @@ namespace G4UA
                                                    const IInterface* parent)
     : ActionToolBase<CosmicPerigeeAction>(type, name, parent)
   {
-    declareProperty("AllowMods", m_config.AllowMods);
-    declareProperty("pMinPrimary",m_config.pMinPrimary);
+    declareInterface<IG4SteppingActionTool>(this);
+    declareInterface<IG4EventActionTool>(this);
+    declareInterface<IG4TrackingActionTool>(this);
+    declareProperty("pMinPrimary", m_config.pMinPrimary);
   }
-  
 
   //---------------------------------------------------------------------------
   // Create the action on request
   //---------------------------------------------------------------------------
-  std::unique_ptr<CosmicPerigeeAction>
-  CosmicPerigeeActionTool::makeAction()
+  std::unique_ptr<CosmicPerigeeAction> CosmicPerigeeActionTool::makeAction()
   {
     ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<CosmicPerigeeAction>(m_config);
-    return std::move(action);
+    return std::make_unique<CosmicPerigeeAction>(m_config);
   }
 
-  //---------------------------------------------------------------------------
-  // Query interface
-  //---------------------------------------------------------------------------
-  StatusCode CosmicPerigeeActionTool::queryInterface(const InterfaceID& riid, void** ppvIf)
-  {
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    
-    if(riid == IPreTrackingActionTool::interfaceID()) {
-      *ppvIf = (IPreTrackingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    
-    return ActionToolBase<CosmicPerigeeAction>::queryInterface(riid, ppvIf);
-  }
-  
 }
diff --git a/Simulation/G4Utilities/G4UserActions/src/FastIDKiller.cxx b/Simulation/G4Utilities/G4UserActions/src/FastIDKiller.cxx
index 863a86a42e902a7b748bd0cdd544843c36b32cc9..e258299d5899f8a3899836fa8de3fb002c9a0d92 100644
--- a/Simulation/G4Utilities/G4UserActions/src/FastIDKiller.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/FastIDKiller.cxx
@@ -32,7 +32,7 @@ namespace G4UA
   }
 
   //---------------------------------------------------------------------------
-  void FastIDKiller::beginOfRun(const G4Run*)
+  void FastIDKiller::BeginOfRunAction(const G4Run*)
   {
     ATH_MSG_INFO( "Including the Fast Inner Detector Killer." << std::endl
                   << "\t This piece of code will kill all particles leaving the" << std::endl
@@ -73,7 +73,7 @@ namespace G4UA
 
 
   //---------------------------------------------------------------------------
-  void FastIDKiller::processStep(const G4Step* aStep){
+  void FastIDKiller::UserSteppingAction(const G4Step* aStep){
 
     if (msgLvl(MSG::VERBOSE)){
       ATH_MSG_DEBUG( " ===================================================== " );
diff --git a/Simulation/G4Utilities/G4UserActions/src/FastIDKillerTool.cxx b/Simulation/G4Utilities/G4UserActions/src/FastIDKillerTool.cxx
index 915cd5063b1945e853fda12cdfe751af6933d9a5..35ebcd12f3f8124d7128c6bb1b21384f2d71d5aa 100644
--- a/Simulation/G4Utilities/G4UserActions/src/FastIDKillerTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/FastIDKillerTool.cxx
@@ -2,47 +2,34 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/FastIDKillerTool.h"
 
 namespace G4UA
 {
 
-  FastIDKillerTool::FastIDKillerTool(const std::string& type, const std::string& name,const IInterface* parent)
+  FastIDKillerTool::FastIDKillerTool(const std::string& type,
+                                     const std::string& name,
+                                     const IInterface* parent)
     : ActionToolBaseReport<FastIDKiller>(type, name, parent)
   {
+    declareInterface<IG4RunActionTool>(this);
+    declareInterface<IG4SteppingActionTool>(this);
+
     declareProperty("R", m_config.R);
     declareProperty("Z", m_config.Z);
   }
 
-  std::unique_ptr<FastIDKiller>  FastIDKillerTool::makeAction()
+  std::unique_ptr<FastIDKiller> FastIDKillerTool::makeAction()
   {
     ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<FastIDKiller>(m_config);
-    return std::move(action);
-  }
-
-  StatusCode FastIDKillerTool::queryInterface(const InterfaceID& riid, void** ppvIf)
-  {
-    if(riid == IBeginRunActionTool::interfaceID())
-      {
-        *ppvIf = (IBeginRunActionTool*) this;
-        addRef();
-        return StatusCode::SUCCESS;
-      }
-    if(riid == ISteppingActionTool::interfaceID())
-      {
-        *ppvIf = (ISteppingActionTool*) this;
-        addRef();
-        return StatusCode::SUCCESS;
-      }
-    return ActionToolBase<FastIDKiller>::queryInterface(riid, ppvIf);
+    return std::make_unique<FastIDKiller>(m_config);
   }
 
   StatusCode FastIDKillerTool::finalize()
   {
-    this->mergeReports();
-    ATH_MSG_INFO( "Fast Inner Detector Killer killed " << m_report.killCount << " particles during this run." );
+    mergeReports();
+    ATH_MSG_INFO( "Fast Inner Detector Killer killed " << m_report.killCount <<
+                  " particles during this run." );
     return StatusCode::SUCCESS;
   }
 
diff --git a/Simulation/G4Utilities/G4UserActions/src/FluxRecorder.cxx b/Simulation/G4Utilities/G4UserActions/src/FluxRecorder.cxx
index f0bc58741be12704464873fe51d215786004fd84..e623057b1b9d42222bfa9a787be30d411b8761ce 100644
--- a/Simulation/G4Utilities/G4UserActions/src/FluxRecorder.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/FluxRecorder.cxx
@@ -20,16 +20,16 @@
 #include "G4StepPoint.hh"
 
 
-namespace G4UA{
-
+namespace G4UA
+{
 
   FluxRecorder::FluxRecorder()
     : m_nev(0.0)
   {
   }
-  
-  void FluxRecorder::beginOfRun(const G4Run*){
 
+  void FluxRecorder::BeginOfRunAction(const G4Run*)
+  {
     char nom[120];
     double timebins[101],ebins[101];
     for (int i=0;i<101;++i){
@@ -49,12 +49,12 @@ namespace G4UA{
 
   }
 
-  void FluxRecorder::endOfEvent(const G4Event*){;
-
+  void FluxRecorder::EndOfEventAction(const G4Event*)
+  {
     m_nev+=1.;
   }
 
-  void FluxRecorder::endOfRun(const G4Run*){
+  void FluxRecorder::EndOfRunAction(const G4Run*){
     TFile * f = new TFile("flux.root","RECREATE");
     f->cd();
     char nom[80];
@@ -73,7 +73,7 @@ namespace G4UA{
     f->Close();
   }
 
-  void FluxRecorder::processStep(const G4Step* aStep){
+  void FluxRecorder::UserSteppingAction(const G4Step* aStep){
     int pdgid = 8, energy=(aStep->GetTrack()->GetKineticEnergy()>10.)?1:0;
     if (aStep->GetTrack()->GetDefinition()==G4Gamma::Definition()){
       pdgid=0;
@@ -120,6 +120,7 @@ namespace G4UA{
   void FluxRecorder::findVolume( const double r1 , const double z1 , const double r2 , const double z2 )
   {
 
+    // This horrible code should be fixed
     const static double dim[lastVol][4] = {
       {980.,1000.,0.,400.} , {980.,1000.,400.,800.} , {980.,1000.,800.,1200.} ,
       {750.,770.,0.,200.} , {750.,770.,200.,450.} , {750.,770.,450.,850.} ,
@@ -186,4 +187,5 @@ namespace G4UA{
       } // if we scored
     } // Loop over all volumes
   }
+
 } // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/FluxRecorderTool.cxx b/Simulation/G4Utilities/G4UserActions/src/FluxRecorderTool.cxx
index eab21db054d455c70d34799dd9343d41685105fb..57340673d127c08fdbc931b7c3a6a04e51604e26 100644
--- a/Simulation/G4Utilities/G4UserActions/src/FluxRecorderTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/FluxRecorderTool.cxx
@@ -2,42 +2,25 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/FluxRecorderTool.h"
 
-namespace G4UA{ 
+namespace G4UA
+{
 
-  FluxRecorderTool::FluxRecorderTool(const std::string& type, const std::string& name,const IInterface* parent):
-    ActionToolBase<FluxRecorder>(type, name, parent){
+  FluxRecorderTool::FluxRecorderTool(const std::string& type,
+                                     const std::string& name,
+                                     const IInterface* parent)
+    : ActionToolBase<FluxRecorder>(type, name, parent)
+  {
+    declareInterface<IG4RunActionTool>(this);
+    declareInterface<IG4EventActionTool>(this);
+    declareInterface<IG4SteppingActionTool>(this);
   }
-  std::unique_ptr<FluxRecorder>  FluxRecorderTool::makeAction(){
+
+  std::unique_ptr<FluxRecorder> FluxRecorderTool::makeAction()
+  {
     ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<FluxRecorder>();
-    return std::move(action);
-  }
-  StatusCode FluxRecorderTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-    
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndRunActionTool::interfaceID()) {
-      *ppvIf = (IEndRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    return ActionToolBase<FluxRecorder>::queryInterface(riid, ppvIf);
+    return std::make_unique<FluxRecorder>();
   }
-  
-} // namespace G4UA 
+
+} // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/G4SimTimer.cxx b/Simulation/G4Utilities/G4UserActions/src/G4SimTimer.cxx
index 78ede7add5888e61c84d77f4acbf3db33bb8acda..b4ec16aa95f1a576dfe3c1edfb6f56008b1233ef 100644
--- a/Simulation/G4Utilities/G4UserActions/src/G4SimTimer.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/G4SimTimer.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-
 // Local includes
 #include "G4UserActions/G4SimTimer.h"
 
@@ -41,7 +40,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Begin-event action
   //---------------------------------------------------------------------------
-  void G4SimTimer::beginOfEvent(const G4Event* /*event*/)
+  void G4SimTimer::BeginOfEventAction(const G4Event* /*event*/)
   {
     //ATH_MSG_INFO("beginOfEvent");
     m_eventTimer.Start();
@@ -50,7 +49,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // End-event action
   //---------------------------------------------------------------------------
-  void G4SimTimer::endOfEvent(const G4Event* /*event*/)
+  void G4SimTimer::EndOfEventAction(const G4Event* /*event*/)
   {
     m_eventTimer.Stop();
     // We define time as user+system time.
diff --git a/Simulation/G4Utilities/G4UserActions/src/G4SimTimerTool.cxx b/Simulation/G4Utilities/G4UserActions/src/G4SimTimerTool.cxx
index bbae3241ad4ce6e546bcef554fe28b25d2bc8113..c449fe576d8ad3fc76cb2b9ed69b3bbf57ced3cd 100644
--- a/Simulation/G4Utilities/G4UserActions/src/G4SimTimerTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/G4SimTimerTool.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/G4SimTimerTool.h"
 
 namespace G4UA
@@ -11,67 +10,50 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Constructor
   //---------------------------------------------------------------------------
-  G4SimTimerTool::G4SimTimerTool(const std::string& type, const std::string& name,
+  G4SimTimerTool::G4SimTimerTool(const std::string& type,
+                                 const std::string& name,
                                  const IInterface* parent)
     : ActionToolBaseReport<G4SimTimer>(type, name, parent)
-  {}
-  
+  {
+    declareInterface<IG4EventActionTool>(this);
+  }
+
   //---------------------------------------------------------------------------
   // Initialize - temporarily here for debugging
   //---------------------------------------------------------------------------
   StatusCode G4SimTimerTool::initialize()
   {
-    ATH_MSG_DEBUG("initialize");
+    ATH_MSG_DEBUG( "Initializing " << name() );
     return StatusCode::SUCCESS;
   }
-  
+
   //---------------------------------------------------------------------------
   // Merge results from all threads
   //---------------------------------------------------------------------------
   StatusCode G4SimTimerTool::finalize()
   {
-    ATH_MSG_DEBUG("finalize");
-    
+    ATH_MSG_DEBUG( "Finalizing " << name() );
+
     mergeReports();
-    
+
     // Report the results
     auto meanSigma = m_report.meanAndSigma();
     ATH_MSG_INFO("Finalized timing results for " << m_report.nEvent <<
-                 " events (will be less than total)");
+                 " events (not all events used)");
     ATH_MSG_INFO("Average time per event was " <<
                  std::setprecision(4) << meanSigma.first << " +- " <<
                  std::setprecision(4) << meanSigma.second);
     return StatusCode::SUCCESS;
   }
-  
+
   //---------------------------------------------------------------------------
   // Create the action on request
   //---------------------------------------------------------------------------
   std::unique_ptr<G4SimTimer>
   G4SimTimerTool::makeAction()
   {
-    ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<G4SimTimer>();
-    return std::move(action);
-  }
-  
-  //---------------------------------------------------------------------------
-  // Query interface
-  //---------------------------------------------------------------------------
-  StatusCode G4SimTimerTool::queryInterface(const InterfaceID& riid, void** ppvIf)
-  {
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    
-    return ActionToolBase<G4SimTimer>::queryInterface(riid, ppvIf);
+    ATH_MSG_DEBUG("Making a G4SimTimer action");
+    return std::make_unique<G4SimTimer>();
   }
-  
+
 }
diff --git a/Simulation/G4Utilities/G4UserActions/src/G4TrackCounter.cxx b/Simulation/G4Utilities/G4UserActions/src/G4TrackCounter.cxx
index c3d2ef93a4a606deffcd0588f8ec6e80ec238cfa..fb168284ad391c24bced9785eaecf121f6301be4 100644
--- a/Simulation/G4Utilities/G4UserActions/src/G4TrackCounter.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/G4TrackCounter.cxx
@@ -4,42 +4,36 @@
 
 #include "G4UserActions/G4TrackCounter.h"
 #include "MCTruth/TrackHelper.h"
-#include <iostream>
 
 
-#include "G4ios.hh"
-
 namespace G4UA
 {
 
   //---------------------------------------------------------------------------
-  // merge results
+  // Merge results
   //---------------------------------------------------------------------------
-
-  void G4TrackCounter::Report::merge(const G4TrackCounter::Report& rep){
-
-    nEvents+=rep.nEvents;
-    nTotalTracks+=rep.nTotalTracks;
-    nPrimaryTracks+=rep.nPrimaryTracks;
-    nSecondaryTracks+=rep.nSecondaryTracks;
-    n50MeVTracks+=rep.n50MeVTracks;
+  void G4TrackCounter::Report::merge(const G4TrackCounter::Report& rep)
+  {
+    nEvents += rep.nEvents;
+    nTotalTracks += rep.nTotalTracks;
+    nPrimaryTracks += rep.nPrimaryTracks;
+    nSecondaryTracks += rep.nSecondaryTracks;
+    n50MeVTracks += rep.n50MeVTracks;
   }
 
   //---------------------------------------------------------------------------
   // Increment event counter
   //---------------------------------------------------------------------------
-  void G4TrackCounter::beginOfEvent(const G4Event* /*event*/)
+  void G4TrackCounter::BeginOfEventAction(const G4Event* /*event*/)
   {
-    //G4cout << "G4TrackCounter@" << this << "::beginOfEvent" << G4endl;
     m_report.nEvents++;
   }
 
   //---------------------------------------------------------------------------
   // Increment track counters
   //---------------------------------------------------------------------------
-  void G4TrackCounter::preTracking(const G4Track* track)
+  void G4TrackCounter::PreUserTrackingAction(const G4Track* track)
   {
-    //G4cout << "G4TrackCounter@" << this << "::preTracking" << G4endl;
     m_report.nTotalTracks++;
     TrackHelper helper(track);
 
diff --git a/Simulation/G4Utilities/G4UserActions/src/G4TrackCounterTool.cxx b/Simulation/G4Utilities/G4UserActions/src/G4TrackCounterTool.cxx
index 4c3e3d8fd4bcae81b0768c99b5fa61b31406da16..cdbd563400c13bf18800760e0404c639d04894a9 100644
--- a/Simulation/G4Utilities/G4UserActions/src/G4TrackCounterTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/G4TrackCounterTool.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/G4TrackCounterTool.h"
 
 namespace G4UA
@@ -15,14 +14,17 @@ namespace G4UA
   G4TrackCounterTool(const std::string& type, const std::string& name,
                      const IInterface* parent)
     : ActionToolBaseReport<G4TrackCounter>(type, name, parent)
-  {}
+  {
+    declareInterface<IG4EventActionTool>(this);
+    declareInterface<IG4TrackingActionTool>(this);
+  }
 
   //---------------------------------------------------------------------------
-  // Initialize - temporarily here for debugging
+  // Initialize
   //---------------------------------------------------------------------------
   StatusCode G4TrackCounterTool::initialize()
   {
-    ATH_MSG_INFO("initialize");
+    ATH_MSG_DEBUG( "Initializing " << name() );
     return StatusCode::SUCCESS;
   }
 
@@ -31,7 +33,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   StatusCode G4TrackCounterTool::finalize()
   {
-    ATH_MSG_INFO("finalize");
+    ATH_MSG_DEBUG( "Finalizing " << name() );
 
     mergeReports();
 
@@ -50,28 +52,8 @@ namespace G4UA
   std::unique_ptr<G4TrackCounter>
   G4TrackCounterTool::makeAction()
   {
-    ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<G4TrackCounter>();
-    return std::move(action);
-  }
-
-  //---------------------------------------------------------------------------
-  // Query interface
-  //---------------------------------------------------------------------------
-  StatusCode G4TrackCounterTool::queryInterface(const InterfaceID& riid,
-                                                void** ppvIf)
-  {
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IPreTrackingActionTool::interfaceID()) {
-      *ppvIf = (IPreTrackingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    return ActionToolBase<G4TrackCounter>::queryInterface(riid, ppvIf);
+    ATH_MSG_DEBUG("Making a G4TrackCounter action");
+    return std::make_unique<G4TrackCounter>();
   }
 
 }
diff --git a/Simulation/G4Utilities/G4UserActions/src/HIPKiller.cxx b/Simulation/G4Utilities/G4UserActions/src/HIPKiller.cxx
index 91ac66e54b7f5882872d381ae93bc6ebba4a95ef..a782400a8c93621df72aeae48d4c1fd61bc2ccda 100644
--- a/Simulation/G4Utilities/G4UserActions/src/HIPKiller.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/HIPKiller.cxx
@@ -26,7 +26,7 @@ namespace G4UA
   {}
 
   //---------------------------------------------------------------------------
-  void HIPKiller::processStep(const G4Step* aStep)
+  void HIPKiller::UserSteppingAction(const G4Step* aStep)
   {
     int PDGcode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
 
diff --git a/Simulation/G4Utilities/G4UserActions/src/HIPKillerTool.cxx b/Simulation/G4Utilities/G4UserActions/src/HIPKillerTool.cxx
index 50f7c34dd2ba795fcbc96d246346f55cfea22955..5bd1dd4bff6a0b9c251e03ac09464c992d7bca06 100644
--- a/Simulation/G4Utilities/G4UserActions/src/HIPKillerTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/HIPKillerTool.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/HIPKillerTool.h"
 
 namespace G4UA
@@ -12,24 +11,15 @@ namespace G4UA
   HIPKillerTool::HIPKillerTool(const std::string& type, const std::string& name,
                                const IInterface* parent)
     : ActionToolBase<HIPKiller>(type, name, parent)
-  {}
-  
-  //---------------------------------------------------------------------------
-  std::unique_ptr<HIPKiller>  HIPKillerTool::makeAction()
   {
-    ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<HIPKiller>();
-    return std::move(action);
+    declareInterface<IG4SteppingActionTool>(this);
   }
 
   //---------------------------------------------------------------------------
-  StatusCode HIPKillerTool::queryInterface(const InterfaceID& riid, void** ppvIf)
+  std::unique_ptr<HIPKiller>  HIPKillerTool::makeAction()
   {
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } return ActionToolBase<HIPKiller>::queryInterface(riid, ppvIf);
+    ATH_MSG_DEBUG("makeAction");
+    return std::make_unique<HIPKiller>();
   }
 
-} // namespace G4UA 
+} // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAccept.cxx b/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAccept.cxx
index 921d1104d7ca6f320a2d30edbc36b24bb2e5774b..8022964697f2c955feba279497f2a1721535898a 100644
--- a/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAccept.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAccept.cxx
@@ -3,7 +3,6 @@
 */
 
 #include "G4UserActions/HIPLArVolumeAccept.h"
-#include <iostream>
 
 #include "G4Event.hh"
 #include "G4Step.hh"
@@ -23,9 +22,8 @@ namespace G4UA
   {}
 
   //---------------------------------------------------------------------------
-  void HIPLArVolumeAccept::processStep(const G4Step* aStep){
-
-
+  void HIPLArVolumeAccept::UserSteppingAction(const G4Step* aStep)
+  {
     int PDGcode=aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
 
     // check if PDG code compatible with HIP (Monopole:411xxx0 or Qball:100xxxx0)
@@ -54,13 +52,13 @@ namespace G4UA
   }
 
   //---------------------------------------------------------------------------
-  void HIPLArVolumeAccept::beginOfEvent(const G4Event*){
-    m_HIPacc=false;
+  void HIPLArVolumeAccept::BeginOfEventAction(const G4Event*){
+    m_HIPacc = false;
   }
 
   //---------------------------------------------------------------------------
-  void HIPLArVolumeAccept::endOfEvent(const G4Event*){
-
+  void HIPLArVolumeAccept::EndOfEventAction(const G4Event*)
+  {
     m_report.HIPevts++;
     if(!m_HIPacc)
       {
@@ -71,7 +69,6 @@ namespace G4UA
         m_report.HIPevts_failed++;
         ATH_MSG_INFO("HIPLArVolumeAccept: no HIP reach the LAr detector volumes. Event aborted.");
       }
-
   }
 
 } // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAcceptTool.cxx b/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAcceptTool.cxx
index 551f9a4e2408888b3a1fc995d77bb3b89a29a976..e5b3836afd8f75906a49631f42a954c2a69cb8db 100644
--- a/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAcceptTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/HIPLArVolumeAcceptTool.cxx
@@ -2,50 +2,33 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/HIPLArVolumeAcceptTool.h"
 
-namespace G4UA{ 
-  
+namespace G4UA
+{
+
   //---------------------------------------------------------------------------
   HIPLArVolumeAcceptTool::HIPLArVolumeAcceptTool(const std::string& type,
                                                  const std::string& name,
                                                  const IInterface* parent)
     : ActionToolBaseReport<HIPLArVolumeAccept>(type, name, parent)
-  {}
-  
-  //---------------------------------------------------------------------------
-  std::unique_ptr<HIPLArVolumeAccept>  HIPLArVolumeAcceptTool::makeAction(){
-    ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<HIPLArVolumeAccept>();
-    return std::move(action);
+  {
+    declareInterface<IG4SteppingActionTool>(this);
+    declareInterface<IG4EventActionTool>(this);
   }
-  
+
   //---------------------------------------------------------------------------
-  StatusCode HIPLArVolumeAcceptTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-    
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } 
-
-    return ActionToolBase<HIPLArVolumeAccept>::queryInterface(riid, ppvIf);
+  std::unique_ptr<HIPLArVolumeAccept> HIPLArVolumeAcceptTool::makeAction()
+  {
+    ATH_MSG_DEBUG("makeAction");
+    return std::make_unique<HIPLArVolumeAccept>();
   }
-  
+
   //---------------------------------------------------------------------------
-  StatusCode HIPLArVolumeAcceptTool::finalize(){
-    
+  StatusCode HIPLArVolumeAcceptTool::finalize()
+  {
     mergeReports();
-    
+
     ATH_MSG_INFO("#########################################");
     ATH_MSG_INFO("##                                     ##");
     ATH_MSG_INFO( "##    HIPLArVolumeAccept - EndOfRun    ##");
@@ -55,7 +38,8 @@ namespace G4UA{
     ATH_MSG_INFO(m_report.HIPevts_failed<<" events were killed because they had no HIP in EMB or EMEC");
     double HIPfraction=1.*(m_report.HIPevts-m_report.HIPevts_failed)/m_report.HIPevts;
     ATH_MSG_INFO("HIP Acceptance: "<<HIPfraction);
-    
+
     return StatusCode::SUCCESS;
   }
-} // namespace G4UA 
+
+} // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/HitWrapper.cxx b/Simulation/G4Utilities/G4UserActions/src/HitWrapper.cxx
index 68b34b9c47579b0e56be1a21426a00d8b374c0f7..c9a9098de627632801b02e1f237c79254b9f15be 100644
--- a/Simulation/G4Utilities/G4UserActions/src/HitWrapper.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/HitWrapper.cxx
@@ -6,7 +6,6 @@
 #include <cmath>
 #include <cstdlib>
 
-
 #include "G4UserActions/HitWrapper.h"
 #include "G4Step.hh"
 
@@ -23,10 +22,9 @@
 #include "InDetSimEvent/SiHitCollection.h"
 
 
-
 namespace G4UA
 {
-  
+
   //---------------------------------------------------------------------------
   HitWrapper::HitWrapper(const Config& config)
     : AthMessaging(Gaudi::svcLocator()->service<IMessageSvc>("MessageSvc"),
@@ -35,12 +33,10 @@ namespace G4UA
       m_detStore("StoreGateSvc/DetectorStore","HitWrapper"),
       m_config(config)
   {}
-  
-  
+
   //---------------------------------------------------------------------------
-  void HitWrapper::endOfEvent(const G4Event*)
+  void HitWrapper::EndOfEventAction(const G4Event*)
   {
-    
 
     SG::WriteHandle<CSCSimHitCollection> csc("CSC_Hits");
     SG::WriteHandle<MDTSimHitCollection> mdt("MDT_Hits");
@@ -49,7 +45,7 @@ namespace G4UA
     /** for nSW */
     SG::WriteHandle<GenericMuonSimHitCollection> mmhits("MicromegasSensitiveDetector");
     SG::WriteHandle<GenericMuonSimHitCollection> stgc("sTGCSensitiveDetector");
-    
+
     if (!csc.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access csc hit collection" );
     else {
       //      std::cout << "Working on a collection of size " << cscC->size() << std::endl;
@@ -59,7 +55,7 @@ namespace G4UA
 	(*hit).setGlobalTime( fmod( (*hit).globalTime() , m_config.time ) );
       }
     }
-    
+
     if ( ! mdt.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access mdt hit collection" );
     else {
       //      std::cout << "Working on a collection of size " << mdtC->size() << std::endl;
@@ -69,7 +65,7 @@ namespace G4UA
 	(*hit).setGlobalTime( fmod( (*hit).globalTime() , m_config.time ) );
       }
     }
-    
+
     if (! rpc.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access rpc hit collection" );
     else {
       //      std::cout << "Working on a collection of size " << rpcC->size() << std::endl;
@@ -79,8 +75,8 @@ namespace G4UA
 	(*hit).setGlobalTime( fmod( (*hit).globalTime() , m_config.time ) );
       }
     }
-    
-    
+
+
     if (! tgc.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access tgc hit collection" );
     else {
       //      std::cout << "Working on a collection of size " << tgcC->size() << std::endl;
@@ -90,8 +86,8 @@ namespace G4UA
 	(*hit).setGlobalTime( fmod( (*hit).globalTime() , m_config.time ) );
       }
     }
-    
-    
+
+
     /** for nSW */
     if (! mmhits.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access Micromegas hit collection" );
     else {
@@ -102,7 +98,7 @@ namespace G4UA
 	(*hit).setGlobalTime( fmod( (*hit).globalTime() , m_config.time ) );
       }
     }
-    
+
     if (! stgc.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access sTGC hit collection" );
     else {
       //      std::cout << "Working on a collection of size " << nswC->size() << std::endl;
@@ -112,12 +108,12 @@ namespace G4UA
 	(*hit).setGlobalTime( fmod( (*hit).globalTime() , m_config.time ) );
       }
     }
-    
+
     // Handle the inner detector next
     SG::WriteHandle<TRTUncompressedHitCollection> trt("TRTUncompressedHits");
     SG::WriteHandle<SiHitCollection> pix("PixelHits");
     SG::WriteHandle<SiHitCollection> sct("SCT_Hits");
-    
+
     if (! trt.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access trt hit collection" );
     else {
       //TRTUncompressedHitCollection * trt = const_cast< TRTUncompressedHitCollection * > (&*trtC);
@@ -126,7 +122,7 @@ namespace G4UA
 	(*hit).SetGlobalTime( fmod( (*hit).GetGlobalTime() , m_config.time ) );
       }
     }
-    
+
     if (! pix.isValid()) ATH_MSG_WARNING( " HitWrapper could not access pix hit collection" );
     else {
       //SiHitCollection * pix = const_cast<SiHitCollection *> (&*pixC);
@@ -135,7 +131,7 @@ namespace G4UA
 	(*hit).setMeanTime( fmod( (*hit).meanTime() , m_config.time ) );
       }
     }
-    
+
     if (! sct.isValid() ) ATH_MSG_WARNING( " HitWrapper could not access sct hit collection" );
     else {
       //SiHitCollection * sct = const_cast<SiHitCollection *> (&*sctC);
@@ -144,7 +140,7 @@ namespace G4UA
 	(*hit).setMeanTime( fmod( (*hit).meanTime() , m_config.time ) );
       }
     }
-    
+
   }
+
 } // namespace G4UA
-  
diff --git a/Simulation/G4Utilities/G4UserActions/src/HitWrapperTool.cxx b/Simulation/G4Utilities/G4UserActions/src/HitWrapperTool.cxx
index 9636d9e4e8556298eeb52a59d1f9988181f1a0d7..0ce2be8c3b9d4d9da04a836f9e1a8a6bf6f10d06 100644
--- a/Simulation/G4Utilities/G4UserActions/src/HitWrapperTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/HitWrapperTool.cxx
@@ -2,34 +2,24 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/HitWrapperTool.h"
 
-namespace G4UA{ 
+namespace G4UA
+{
 
   //---------------------------------------------------------------------------
   HitWrapperTool::HitWrapperTool(const std::string& type, const std::string& name,
                                  const IInterface* parent)
     : ActionToolBase<HitWrapper>(type, name, parent)
   {
+    declareInterface<IG4EventActionTool>(this);
     declareProperty("Time", m_config.time);
   }
-  
+
   //---------------------------------------------------------------------------
-  std::unique_ptr<HitWrapper>  HitWrapperTool::makeAction(){
+  std::unique_ptr<HitWrapper> HitWrapperTool::makeAction(){
     ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<HitWrapper>(m_config);
-    return std::move(action);
-  }
-  
-  //---------------------------------------------------------------------------
-  StatusCode HitWrapperTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-    
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } return ActionToolBase<HitWrapper>::queryInterface(riid, ppvIf);
+    return std::make_unique<HitWrapper>(m_config);
   }
-  
-} // namespace G4UA 
+
+} // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/LengthIntegrator.cxx b/Simulation/G4Utilities/G4UserActions/src/LengthIntegrator.cxx
index 3dcb4ab604ee31c47dc8e9774b7621e8df567b19..889a324893db1693196209bcde1a0763a6535dc3 100644
--- a/Simulation/G4Utilities/G4UserActions/src/LengthIntegrator.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/LengthIntegrator.cxx
@@ -25,7 +25,6 @@
 #include "G4PhysicalConstants.hh"
 #include "G4SystemOfUnits.hh"
 
-
 // System includes
 #include <mutex>
 
@@ -101,7 +100,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Cache primary info at beginning of event
   //---------------------------------------------------------------------------
-  void LengthIntegrator::beginOfEvent(const G4Event* event)
+  void LengthIntegrator::BeginOfEventAction(const G4Event* event)
   {
     m_detThickMap.clear();
     G4PrimaryVertex* vert = event->GetPrimaryVertex(0);
@@ -114,7 +113,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Finalize event measurements
   //---------------------------------------------------------------------------
-  void LengthIntegrator::endOfEvent(const G4Event*)
+  void LengthIntegrator::EndOfEventAction(const G4Event*)
   {
     // Lazily protect this whole code from concurrent access
     std::lock_guard<std::mutex> lock(gHistSvcMutex);
@@ -142,7 +141,7 @@ namespace G4UA
 
     // Adding zeros to TProfile bins, so that each bin contains the same number of entries,
     // so that a THStack of all the material TProfile plots (or all the element plots) will equal the Total_X0 TProfile plot
-    // It's because each plot (for each material, say) is only filled if a Geantion hits it, not if it's not hit in an event 
+    // It's because each plot (for each material, say) is only filled if a Geantion hits it, not if it's not hit in an event
 
     TProfile* totalEtaRL = m_etaMapRL["Total_X0"];
     int nbins = totalEtaRL->GetNbinsX();
@@ -217,7 +216,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Accumulate results from one step
   //---------------------------------------------------------------------------
-  void LengthIntegrator::processStep(const G4Step* aStep)
+  void LengthIntegrator::UserSteppingAction(const G4Step* aStep)
   {
     G4TouchableHistory* touchHist =
       (G4TouchableHistory*) aStep->GetPreStepPoint()->GetTouchable();
@@ -269,7 +268,7 @@ namespace G4UA
       }
 
     }
-  
+
     //G4ThreeVector midPoint = (aStep->GetPreStepPoint()->GetPosition()+aStep->GetPostStepPoint()->GetPosition())*0.5;
     //m_rzProfRL->Fill( midPoint.z() , midPoint.perp() , thickstepRL , 1. );
     //m_rzProfIL->Fill( midPoint.z() , midPoint.perp() , thickstepIL , 1. );
@@ -319,12 +318,12 @@ namespace G4UA
 
       static std::mutex mutex_register;
       std::lock_guard<std::mutex> lock(mutex_register);
-      
+
       plotstring = it;
-      
+
       //G4cout<<"processing string "<<plotstring<<G4endl;;
-      
-      if(!m_rzMapRL[plotstring]){  
+
+      if(!m_rzMapRL[plotstring]){
 
 	TString rzname = "RZRadLen_"+plotstring;
 	std::string rznameReg = "/lengths/radLen/RZRadLen_"+plotstring;
@@ -336,22 +335,22 @@ namespace G4UA
 	m_xyMapRL[plotstring]=getOrCreateProfile(xynameReg, xyname, "X [mm]", 1000,-1200.,1200.,"Y [mm]",1000,-1200.,1200.,"%X0");
 	
       }
-      
+
       m_rzMapRL[plotstring]->Fill( hitPoint.z() , hitPoint.perp() , thickstepRL , 1. );
       m_rzMapRL[plotstring]->Fill( endPoint.z() , endPoint.perp() , thickstepRL , 1. );
       m_xyMapRL[plotstring]->Fill( hitPoint.x() , hitPoint.y() , thickstepRL , 1. );
       m_xyMapRL[plotstring]->Fill( endPoint.x() , endPoint.y() , thickstepRL , 1. );
-      
-    }  
-    
+
+    }
+
     for (auto it : L) {
-      
+
       static std::mutex mutex_instance;
       std::lock_guard<std::mutex> lock(mutex_instance);
-      
+
       plotstring = it;
 
-      if(!m_rzMapIL[plotstring]){  
+      if(!m_rzMapIL[plotstring]){
 	
 	std::string rznameReg = "/lengths/intLen/RZIntLen_"+plotstring;
 	TString rzname = "RZIntLen_"+plotstring;
@@ -362,13 +361,13 @@ namespace G4UA
 	m_xyMapIL[plotstring]=getOrCreateProfile(xynameReg, xyname, "X [mm]", 1000,-1200.,1200.,"Y [mm]",1000,-1200.,1200.,"#lambda");
 	
       }
-      
+
       m_rzMapIL[plotstring]->Fill( hitPoint.z() , hitPoint.perp() , thickstepIL , 1. );
       m_rzMapIL[plotstring]->Fill( endPoint.z() , endPoint.perp() , thickstepIL , 1. );
       m_xyMapIL[plotstring]->Fill( hitPoint.x() , hitPoint.y() , thickstepIL , 1. );
       m_xyMapIL[plotstring]->Fill( endPoint.x() , endPoint.y() , thickstepIL , 1. );
-      
-    }  
+
+    }
 
 
     const G4ElementVector* eVec = mat->GetElementVector();
@@ -381,7 +380,7 @@ namespace G4UA
       double el_thickstep = stepl * (mat->GetVecNbOfAtomsPerVolume())[i] * (*eVec)[i]->GetfRadTsai() * 100.0;
 
       if(!m_rzMapRL[elementName]){
-  
+
 	std::string rznameReg = "/lengths/radLen/RZRadLen_"+elementName;
 	TString rzname = "RZRadLen_"+elementName;
 	TString xyname = "XYRadLen_"+elementName;
@@ -391,16 +390,16 @@ namespace G4UA
 	m_xyMapRL[elementName]=getOrCreateProfile(xynameReg, xyname, "X [mm]", 1000,-1200.,1200.,"Y [mm]",1000,-1200.,1200.,"%X0");
 	
       }
-      
+
       m_rzMapRL[elementName]->Fill( hitPoint.z() , hitPoint.perp() , el_thickstep , 1. );
       m_rzMapRL[elementName]->Fill( endPoint.z() , endPoint.perp() , el_thickstep , 1. );
       m_xyMapRL[elementName]->Fill( hitPoint.x() , hitPoint.y() , el_thickstep , 1. );
       m_xyMapRL[elementName]->Fill( endPoint.x() , endPoint.y() , el_thickstep , 1. );
-      
+
     }
-    
+
     for (size_t i=0 ; i < mat->GetNumberOfElements() ; ++i) {
-      
+
       static std::mutex mutex_instance;
       std::lock_guard<std::mutex> lock(mutex_instance);
 
@@ -409,7 +408,7 @@ namespace G4UA
       //G4Pow* m_g4pow = G4Pow::GetInstance();
       double el_thickstep = stepl * amu/lambda0 * (mat->GetVecNbOfAtomsPerVolume())[i] * m_g4pow->Z23( G4int( (*eVec)[i]->GetN() + 0.5 ) );
 
-      if(!m_rzMapIL[elementName]){  
+      if(!m_rzMapIL[elementName]){
 
 	TString rzname = "RZIntLen_"+elementName;
 	std::string rznameReg = "/lengths/intLen/RZIntLen_"+elementName;
@@ -420,7 +419,7 @@ namespace G4UA
 	m_xyMapIL[elementName]=getOrCreateProfile(xynameReg, xyname, "X [mm]", 1000,-1200.,1200.,"Y [mm]",1000,-1200.,1200.,"#lambda");
 
       }
-      
+
       m_rzMapIL[elementName]->Fill( hitPoint.z() , hitPoint.perp() , el_thickstep , 1. );
       m_rzMapIL[elementName]->Fill( endPoint.z() , endPoint.perp() , el_thickstep , 1. );
       m_xyMapIL[elementName]->Fill( hitPoint.x() , hitPoint.y() , el_thickstep , 1. );
@@ -431,7 +430,7 @@ namespace G4UA
   }
 
   /// note that this should be called from a section protected by a mutex, since it talks to the THitSvc
-  
+
   TProfile2D* LengthIntegrator::getOrCreateProfile(std::string regName, TString histoname, TString xtitle, int nbinsx, float xmin, float xmax, TString ytitle, int nbinsy,float ymin, float ymax,TString ztitle){
 
     //G4cout<<"histo "<<histoname<<" not found. checking for  "<<regName<<G4endl;
@@ -446,14 +445,14 @@ namespace G4UA
       result->GetXaxis()->SetTitle(xtitle);
       result->GetYaxis()->SetTitle(ytitle);
       result->GetZaxis()->SetTitle(ztitle);
-      
+
       if (m_hSvc && m_hSvc->regHist(regName,result).isFailure()){
 	//ATH_MSG_FATAL( "Registration of histogram " << rznameReg << " failed" );
 	throw GaudiException("Registration of histogram " + regName + " failed", "RegHistErr", StatusCode::FAILURE);
       }
       return result;
     }
-    
+
     // should never be here
     G4cout<<"ERROR something went wrong in handling of THistSvc "<<regName <<" "<<histoname<<G4endl;
     return nullptr;
@@ -462,7 +461,7 @@ namespace G4UA
   //---------------------------------------------------------------------------
   // Add elements and values to the map
   //---------------------------------------------------------------------------
-  void LengthIntegrator::addToDetThickMap(std::string name, double thickstepRL, double thickstepIL) 
+  void LengthIntegrator::addToDetThickMap(std::string name, double thickstepRL, double thickstepIL)
   {
     auto it=m_detThickMap.find(name);
     if(it!=m_detThickMap.end()){
diff --git a/Simulation/G4Utilities/G4UserActions/src/LengthIntegratorTool.cxx b/Simulation/G4Utilities/G4UserActions/src/LengthIntegratorTool.cxx
index 85fa9f7587310bb138807e3365cf1ef6fcf68855..61befb4572797d07fc276c376d2550af297153ab 100644
--- a/Simulation/G4Utilities/G4UserActions/src/LengthIntegratorTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/LengthIntegratorTool.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/LengthIntegratorTool.h"
 
 namespace G4UA
@@ -17,6 +16,8 @@ namespace G4UA
     : ActionToolBase<LengthIntegrator>(type, name, parent),
       m_hSvc("THistSvc", name)
   {
+    declareInterface<IG4EventActionTool>(this);
+    declareInterface<IG4SteppingActionTool>(this);
     declareProperty("HistoSvc", m_hSvc);
   }
 
@@ -39,32 +40,7 @@ namespace G4UA
   LengthIntegratorTool::makeAction()
   {
     ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<LengthIntegrator>( m_hSvc.name() );
-    return std::move(action);
-  }
-
-  //---------------------------------------------------------------------------
-  // Query interface
-  //---------------------------------------------------------------------------
-  StatusCode LengthIntegratorTool::queryInterface(const InterfaceID& riid, void** ppvIf)
-  {
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-
-    return ActionToolBase<LengthIntegrator>::queryInterface(riid, ppvIf);
+    return std::make_unique<LengthIntegrator>( m_hSvc.name() );
   }
 
 }
diff --git a/Simulation/G4Utilities/G4UserActions/src/LooperKiller.cxx b/Simulation/G4Utilities/G4UserActions/src/LooperKiller.cxx
index 793165e52374a4079e769f06ab6e9d1a28243dbc..451a8f5f4d61dc5cdff2144b02c8a380fd3b9e89 100644
--- a/Simulation/G4Utilities/G4UserActions/src/LooperKiller.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/LooperKiller.cxx
@@ -19,7 +19,6 @@
 // For setting an error state in event info
 #include "EventInfo/EventInfo.h"
 
-
 #include "GaudiKernel/Bootstrap.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/IMessageSvc.h"
@@ -38,7 +37,7 @@ namespace G4UA
   }
 
   //---------------------------------------------------------------------------
-  void LooperKiller::processStep(const G4Step* aStep)
+  void LooperKiller::UserSteppingAction(const G4Step* aStep)
   {
 
     if (aStep->GetTrack()->GetCurrentStepNumber() < m_config.MaxSteps) {
diff --git a/Simulation/G4Utilities/G4UserActions/src/LooperKillerTool.cxx b/Simulation/G4Utilities/G4UserActions/src/LooperKillerTool.cxx
index d2015fec15e2596b59e276ecd0923326c9cab223..ee46aa9d43175bbdd30e6b3ea36d41b4275239de 100644
--- a/Simulation/G4Utilities/G4UserActions/src/LooperKillerTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/LooperKillerTool.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/LooperKillerTool.h"
 
 namespace G4UA
@@ -15,13 +14,14 @@ namespace G4UA
                                  const IInterface* parent)
     : ActionToolBaseReport<LooperKiller>(type, name, parent)
   {
+    declareInterface<IG4SteppingActionTool>(this);
     declareProperty("MaxSteps", m_config.MaxSteps);
     declareProperty("PrintSteps",m_config.PrintSteps);
     declareProperty("VerboseLevel", m_config.VerboseLevel);
     declareProperty("AbortEvent", m_config.AbortEvent);
     declareProperty("SetError", m_config.SetError);
   }
-  
+
   //---------------------------------------------------------------------------
   // Initialize - temporarily here for debugging
   //---------------------------------------------------------------------------
@@ -41,9 +41,9 @@ namespace G4UA
     ATH_MSG_INFO(" Set to kill tracks over " << m_config.MaxSteps << " steps");
     ATH_MSG_INFO(" and give " << m_config.PrintSteps << " steps of verbose output");
     ATH_MSG_INFO(" We killed " << m_report.killed_tracks << " tracks this run.");
-    ATH_MSG_INFO(" Was set to " << (m_config.AbortEvent?"":"not ") << "abort events and "); 
+    ATH_MSG_INFO(" Was set to " << (m_config.AbortEvent?"":"not ") << "abort events and ");
     ATH_MSG_INFO( (m_config.SetError?"":"not ") << "set an error state." );
-    
+
     return StatusCode::SUCCESS;
   }
 
@@ -55,22 +55,7 @@ namespace G4UA
   LooperKillerTool::makeAction()
   {
     ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<LooperKiller>(m_config);
-    return std::move(action);
-  }
-
-  //---------------------------------------------------------------------------
-  // Query interface
-  //---------------------------------------------------------------------------
-  StatusCode LooperKillerTool::queryInterface(const InterfaceID& riid, void** ppvIf)
-  {
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-
-    return ActionToolBase<LooperKiller>::queryInterface(riid, ppvIf);
+    return std::make_unique<LooperKiller>(m_config);
   }
 
 }
diff --git a/Simulation/G4Utilities/G4UserActions/src/MomentumConservation.cxx b/Simulation/G4Utilities/G4UserActions/src/MomentumConservation.cxx
index d9a5359735cf2b8faccac69e8453ea79926e1764..86126f87ef111ce5d64ced9d2bc4ab068a7228c7 100644
--- a/Simulation/G4Utilities/G4UserActions/src/MomentumConservation.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/MomentumConservation.cxx
@@ -15,7 +15,7 @@
 namespace G4UA
 {
 
-  void MomentumConservation::endOfEvent(const G4Event* anEvent)
+  void MomentumConservation::EndOfEventAction(const G4Event* anEvent)
   {
 
     // Energy conservation:
@@ -53,7 +53,7 @@ namespace G4UA
 
   }
 
-  void MomentumConservation::processStep(const G4Step* aStep){
+  void MomentumConservation::UserSteppingAction(const G4Step* aStep){
 
     if (aStep->GetPostStepPoint()->GetPhysicalVolume() != 0) {
       const double edep = aStep->GetTotalEnergyDeposit();
diff --git a/Simulation/G4Utilities/G4UserActions/src/MomentumConservationTool.cxx b/Simulation/G4Utilities/G4UserActions/src/MomentumConservationTool.cxx
index 988d1557f3edf38a91da7cefb4fcdd3613793876..c11db30199282b8d79a56f23c509c711d33b7c42 100644
--- a/Simulation/G4Utilities/G4UserActions/src/MomentumConservationTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/MomentumConservationTool.cxx
@@ -2,38 +2,25 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/MomentumConservationTool.h"
 
 namespace G4UA
-{ 
-  
+{
+
   //---------------------------------------------------------------------------
   MomentumConservationTool::MomentumConservationTool(const std::string& type,
                                                      const std::string& name,
                                                      const IInterface* parent)
     : ActionToolBase<MomentumConservation>(type, name, parent)
-  {}
-  
+  {
+    declareInterface<IG4EventActionTool>(this);
+    declareInterface<IG4SteppingActionTool>(this);
+  }
+
   //---------------------------------------------------------------------------
   std::unique_ptr<MomentumConservation>  MomentumConservationTool::makeAction(){
     ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<MomentumConservation>();
-    return std::move(action);
-  }
-  
-  //---------------------------------------------------------------------------
-  StatusCode MomentumConservationTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-    
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } return ActionToolBase<MomentumConservation>::queryInterface(riid, ppvIf);
+    return std::make_unique<MomentumConservation>();
   }
 
-} // namespace G4UA 
+} // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/PhotonKiller.cxx b/Simulation/G4Utilities/G4UserActions/src/PhotonKiller.cxx
index 9c6c27ba544b2ae72a4d59250329b0197101f2c1..331bbf0ebd77e92e461556e2df8b6290de6b5dd7 100644
--- a/Simulation/G4Utilities/G4UserActions/src/PhotonKiller.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/PhotonKiller.cxx
@@ -3,8 +3,6 @@
 */
 
 #include "G4UserActions/PhotonKiller.h"
-#include <iostream>
-#include <cmath>
 
 #include "G4Step.hh"
 #include "G4Event.hh"
@@ -17,19 +15,20 @@ namespace G4UA
 
   //---------------------------------------------------------------------------
   PhotonKiller::PhotonKiller()
-    :m_lastTrack(0), m_count(0), m_energy(0)
+    : m_count(0), m_energy(0)
   {}
-  
+
   //---------------------------------------------------------------------------
-  void PhotonKiller::preTracking(const G4Track*){;
+  void PhotonKiller::PreUserTrackingAction(const G4Track*)
+  {
     // reset counters
     m_count=0;
     m_energy=0;
   }
-  
+
   //---------------------------------------------------------------------------
-  void PhotonKiller::processStep(const G4Step* aStep){
-  
+  void PhotonKiller::UserSteppingAction(const G4Step* aStep)
+  {
     if ( fabs(m_energy-aStep->GetTrack()->GetKineticEnergy())<0.00001 ){
       // same energy as last time
       m_count++;
@@ -38,7 +37,7 @@ namespace G4UA
       m_energy = aStep->GetTrack()->GetKineticEnergy();
       return;
     }
-    
+
     if (aStep->GetTrack()->GetKineticEnergy() < 0.0001){ // Less than one hundred eV
       if ( (m_count>3 && aStep->GetTrack()->GetDefinition() == G4Gamma::Gamma() ) ||
            (m_count>10000) ){ // more than three steps with less than one keV of energy...
@@ -52,9 +51,6 @@ namespace G4UA
       rmk->GetEventManager()->AbortCurrentEvent();
       rmk->GetEventManager()->GetNonconstCurrentEvent()->SetEventAborted();
     }
-    
   }
-  
-} // namespace G4UA 
-
 
+} // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/PhotonKillerTool.cxx b/Simulation/G4Utilities/G4UserActions/src/PhotonKillerTool.cxx
index 7426cd91fda99fd4094cad3a14a0eb20a29a6776..aae9470c18ed5141a6e37a81202a02717b8a93ac 100644
--- a/Simulation/G4Utilities/G4UserActions/src/PhotonKillerTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/PhotonKillerTool.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/PhotonKillerTool.h"
 
 namespace G4UA
@@ -13,27 +12,16 @@ namespace G4UA
                                      const std::string& name,
                                      const IInterface* parent)
     : ActionToolBase<PhotonKiller>(type, name, parent)
-  {}
-
-  //---------------------------------------------------------------------------
-  std::unique_ptr<PhotonKiller>  PhotonKillerTool::makeAction(){
-    ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<PhotonKiller>();
-    return std::move(action);
+  {
+    declareInterface<IG4SteppingActionTool>(this);
+    declareInterface<IG4TrackingActionTool>(this);
   }
 
   //---------------------------------------------------------------------------
-  StatusCode PhotonKillerTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } if(riid == IPreTrackingActionTool::interfaceID()) {
-      *ppvIf = (IPreTrackingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } return ActionToolBase<PhotonKiller>::queryInterface(riid, ppvIf);
+  std::unique_ptr<PhotonKiller> PhotonKillerTool::makeAction()
+  {
+    ATH_MSG_DEBUG("Making a PhotonKiller action");
+    return std::make_unique<PhotonKiller>();
   }
 
 } // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/ScoringPlane.cxx b/Simulation/G4Utilities/G4UserActions/src/ScoringPlane.cxx
index 4b496404e15bc910404e2154f3ab127a3303bf7c..d60cd4d86d7a22746b15f9ec307a8fcd7fd342e5 100644
--- a/Simulation/G4Utilities/G4UserActions/src/ScoringPlane.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/ScoringPlane.cxx
@@ -9,25 +9,35 @@
 #include "TFile.h"
 
 
+namespace G4UA
+{
 
-namespace G4UA{
-  
-  
-  ScoringPlane::ScoringPlane(const Config& config):m_config(config), m_tree0(0),m_tree1(0),m_evt(0),m_ntr(0),
-						   m_pdg(0),m_cha(0),m_ene(0),m_vx(0),m_vy(0),m_vz(0),m_x0(0),m_y0(0),m_z0(0),m_t0(0),
-						   m_px0(0),m_py0(0),m_pz0(0),m_x1(0),m_y1(0),m_z1(0),m_t1(0),m_px1(0),m_py1(0),
-						   m_pz1(0),m_x(0),m_y(0),m_z(0){
+  //----------------------------------------------------------------------------
+  // Constructor
+  //----------------------------------------------------------------------------
+  ScoringPlane::ScoringPlane(const Config& config)
+    : m_config(config),
+      m_tree0(0), m_tree1(0),
+      m_evt(0), m_ntr(0), m_pdg(0), m_cha(0), m_ene(0),
+      m_vx(0), m_vy(0), m_vz(0),
+      m_x0(0), m_y0(0), m_z0(0), m_t0(0),
+      m_px0(0), m_py0(0), m_pz0(0),
+      m_x1(0), m_y1(0), m_z1(0), m_t1(0),
+      m_px1(0), m_py1(0), m_pz1(0),
+      m_x(0), m_y(0), m_z(0)
+  {
   }
-  
-  void ScoringPlane::beginOfRun(const G4Run*){
-    
+
+  void ScoringPlane::BeginOfRunAction(const G4Run*)
+  {
+
     m_tree0 = new TTree("t0", "ATHENA event tree");
-    
+
     m_tree0->Branch("evt", &m_evt, "evt/I");
     m_tree0->Branch("ntr", &m_ntr, "ntr/I");
-    
+
     m_tree1 = new TTree("t1", "ATHENA particle tree");
-    
+
     m_tree1->Branch("evt", &m_evt, "evt/I");
     m_tree1->Branch("ntr", &m_ntr, "ntr/I");
     m_tree1->Branch("pdg", &m_pdg, "pdg/I");
@@ -53,86 +63,86 @@ namespace G4UA{
     m_tree1->Branch("x",   &m_x,   "x/D");
     m_tree1->Branch("y",   &m_y,   "y/D");
     m_tree1->Branch("z",   &m_z,   "z/D");
-    
+
     m_evt = 0;
-    
+
     G4cout<<"ScoringPlane: placing scoring plane at [mm]: " << m_config.plane << G4endl;;
     G4cout<<"ScoringPlane: stop and kill particles: "       << m_config.pkill << G4endl;;
     G4cout<<"ScoringPlane: output root filename: "          << m_config.fname << G4endl;;
   }
-  
-  void ScoringPlane::endOfRun(const G4Run*){
+
+  void ScoringPlane::EndOfRunAction(const G4Run*){
     TFile* file = new TFile(m_config.fname.c_str(), "RECREATE", "ATHENA ufo simulation");
-    
+
     m_tree0->Write();
     m_tree1->Write();
-    
+
     file->Close();
   }
-  
-  void ScoringPlane::processStep(const G4Step* aStep){
-    
+
+  void ScoringPlane::UserSteppingAction(const G4Step* aStep)
+  {
     m_z0 = aStep->GetPreStepPoint()->GetPosition().z();
     m_z1 = aStep->GetPostStepPoint()->GetPosition().z();
-    
-    
+
     if (m_z0*m_config.plane < 0)                     return; // take only particles on one side
     if (m_z1*m_config.plane < 0)                     return; // take only particles on one side
     if (std::fabs(m_z0) < std::fabs(m_config.plane)) return; // take only particles flowing towards the IP
     if (std::fabs(m_z1) > std::fabs(m_config.plane)) return; // take only particles flowing towards the IP
-    
 
     m_ntr++;
-    
+
     m_pdg = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
     m_cha = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
     m_ene = aStep->GetTrack()->GetTotalEnergy();
     m_vx  = aStep->GetTrack()->GetVertexPosition().x();
     m_vy  = aStep->GetTrack()->GetVertexPosition().y();
     m_vz  = aStep->GetTrack()->GetVertexPosition().z();
-    
+
     m_x0  = aStep->GetPreStepPoint()->GetPosition().x();
     m_y0  = aStep->GetPreStepPoint()->GetPosition().y();
     m_t0  = aStep->GetPreStepPoint()->GetGlobalTime()/CLHEP::ns;
     m_px0 = aStep->GetPreStepPoint()->GetMomentum().x();
     m_py0 = aStep->GetPreStepPoint()->GetMomentum().y();
     m_pz0 = aStep->GetPreStepPoint()->GetMomentum().z();
-    
+
     m_x1  = aStep->GetPostStepPoint()->GetPosition().x();
     m_y1  = aStep->GetPostStepPoint()->GetPosition().y();
     m_t1  = aStep->GetPostStepPoint()->GetGlobalTime()/CLHEP::ns;
     m_px1 = aStep->GetPostStepPoint()->GetMomentum().x();
     m_py1 = aStep->GetPostStepPoint()->GetMomentum().y();
     m_pz1 = aStep->GetPostStepPoint()->GetMomentum().z();
-    
+
     m_z = m_config.plane;
     m_x = m_x0 + (m_z0!=m_z1 ? (m_x1-m_x0)/(m_z1-m_z0)*(m_z-m_z0) : (m_x1-m_x0)*0.5);
     m_y = m_y0 + (m_z0!=m_z1 ? (m_y1-m_y0)/(m_z1-m_z0)*(m_z-m_z0) : (m_y1-m_y0)*0.5);
-    
+
     m_tree1->Fill();
-    
+
     if      (m_config.pkill == 1) aStep->GetTrack()->SetTrackStatus(fStopAndKill);
     else if (m_config.pkill == 2) aStep->GetTrack()->SetTrackStatus(fKillTrackAndSecondaries);
-    
-//G4cout<<
-//  " z0: " << std::setw(10) << m_z0
-//	      << " z1: " << std::setw(10) << m_z1
-//	      << " x0: " << std::setw(10) << m_x0
-//	      << " x1: " << std::setw(10) << m_x1
-//	      << " x:  " << std::setw(10) << m_x
-//	      << " y0: " << std::setw(10) << m_y0
-//	      << " y1: " << std::setw(10) << m_y1
-//	      << " y:  " << std::setw(10) << m_y << G4endl;
+
+    //G4cout<<
+    //  " z0: " << std::setw(10) << m_z0
+    //	      << " z1: " << std::setw(10) << m_z1
+    //	      << " x0: " << std::setw(10) << m_x0
+    //	      << " x1: " << std::setw(10) << m_x1
+    //	      << " x:  " << std::setw(10) << m_x
+    //	      << " y0: " << std::setw(10) << m_y0
+    //	      << " y1: " << std::setw(10) << m_y1
+    //	      << " y:  " << std::setw(10) << m_y << G4endl;
 
   }
-  
-  void ScoringPlane::beginOfEvent(const G4Event*){
+
+  void ScoringPlane::BeginOfEventAction(const G4Event*)
+  {
     m_evt++;
-    m_ntr=0;
+    m_ntr = 0;
   }
-  
-  void ScoringPlane::endOfEvent(const G4Event*){
+
+  void ScoringPlane::EndOfEventAction(const G4Event*)
+  {
     m_tree0->Fill();
   }
-  
-} // namespace G4UA 
+
+} // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/ScoringPlaneTool.cxx b/Simulation/G4Utilities/G4UserActions/src/ScoringPlaneTool.cxx
index a293836e96df702864b482466d767b5da3683a36..073c72ebc4b167cac68faf9ebe3b5ca943292a9c 100644
--- a/Simulation/G4Utilities/G4UserActions/src/ScoringPlaneTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/ScoringPlaneTool.cxx
@@ -2,54 +2,29 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/ScoringPlaneTool.h"
 
-namespace G4UA{ 
 
-  
-  ScoringPlaneTool::ScoringPlaneTool(const std::string& type, const std::string& name,const IInterface* parent):
-    ActionToolBase<ScoringPlane>(type, name, parent), m_config(){
+namespace G4UA
+{
 
-    declareProperty("Plane",m_config.plane);
-    declareProperty("PKill",m_config.pkill);
-    declareProperty("FName",m_config.fname);
-    
+  ScoringPlaneTool::ScoringPlaneTool(const std::string& type,
+                                     const std::string& name,
+                                     const IInterface* parent)
+    : ActionToolBase<ScoringPlane>(type, name, parent)
+  {
+    declareInterface<IG4RunActionTool>(this);
+    declareInterface<IG4SteppingActionTool>(this);
+    declareInterface<IG4EventActionTool>(this);
+    declareProperty("Plane", m_config.plane);
+    declareProperty("PKill", m_config.pkill);
+    declareProperty("FName", m_config.fname);
   }
 
-  std::unique_ptr<ScoringPlane>  ScoringPlaneTool::makeAction(){
+  std::unique_ptr<ScoringPlane> ScoringPlaneTool::makeAction()
+  {
     ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<ScoringPlane>(m_config);
-    return std::move(action);
+    return std::make_unique<ScoringPlane>(m_config);
   }
-  StatusCode ScoringPlaneTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-    
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndRunActionTool::interfaceID()) {
-      *ppvIf = (IEndRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-}
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    return ActionToolBase<ScoringPlane>::queryInterface(riid, ppvIf);
-  }
-  
-} // namespace G4UA 
+
+} // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKiller.cxx b/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKiller.cxx
index 24f7b3d98212e006e14765fb2e17664837212951..b6aba0039d1bb04ace3a7b9dd246593519fd5697 100644
--- a/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKiller.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKiller.cxx
@@ -10,7 +10,6 @@
 #include "G4Step.hh"
 #include "G4TrackVector.hh"
 
-
 #include "GaudiKernel/Bootstrap.h"
 #include "GaudiKernel/ISvcLocator.h"
 #include "GaudiKernel/IMessageSvc.h"
@@ -26,14 +25,15 @@ namespace G4UA
   {}
 
   //---------------------------------------------------------------------------
-  void ScoringVolumeTrackKiller::endOfEvent(const G4Event*){
+  void ScoringVolumeTrackKiller::EndOfEventAction(const G4Event*)
+  {
     ATH_MSG_INFO( m_killCount << " tracks killed in this event " );
     m_killCount = 0;
   }
 
   //---------------------------------------------------------------------------
-  void ScoringVolumeTrackKiller::processStep(const G4Step* aStep){
-
+  void ScoringVolumeTrackKiller::UserSteppingAction(const G4Step* aStep)
+  {
     G4StepPoint* preStep = aStep->GetPreStepPoint();
     const G4VTouchable* preTouchable = preStep->GetTouchable();
     G4StepPoint* postStep = aStep->GetPostStepPoint();
@@ -72,9 +72,7 @@ namespace G4UA
     if ( (preInStation && postOutofStation) || outOfMother ) {
       aStep->GetTrack()->SetTrackStatus(fStopAndKill);
       m_killCount++;
-
     }
-
   }
 
 } // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKillerTool.cxx b/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKillerTool.cxx
index 8a36e7d72fcbcdee1d0a538532892a7e643aa336..48ffecba065a478ac3f9a8876885ce8143533c08 100644
--- a/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKillerTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/ScoringVolumeTrackKillerTool.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/ScoringVolumeTrackKillerTool.h"
 
 namespace G4UA
@@ -13,29 +12,17 @@ namespace G4UA
                                                              const std::string& name,
                                                              const IInterface* parent)
     : ActionToolBase<ScoringVolumeTrackKiller>(type, name, parent)
-  {}
-
-  //---------------------------------------------------------------------------
-  std::unique_ptr<ScoringVolumeTrackKiller> ScoringVolumeTrackKillerTool::makeAction()
   {
-    ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<ScoringVolumeTrackKiller>();
-    return std::move(action);
+    declareInterface<IG4EventActionTool>(this);
+    declareInterface<IG4SteppingActionTool>(this);
   }
 
   //---------------------------------------------------------------------------
-  StatusCode ScoringVolumeTrackKillerTool::queryInterface(const InterfaceID& riid,
-                                                          void** ppvIf)
+  std::unique_ptr<ScoringVolumeTrackKiller>
+  ScoringVolumeTrackKillerTool::makeAction()
   {
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } return ActionToolBase<ScoringVolumeTrackKiller>::queryInterface(riid, ppvIf);
+    ATH_MSG_DEBUG("makeAction");
+    return std::make_unique<ScoringVolumeTrackKiller>();
   }
 
 } // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/StoppedParticleAction.cxx b/Simulation/G4Utilities/G4UserActions/src/StoppedParticleAction.cxx
index 7a19ec75d91fb1afdbc39f4658da2d883cbe88dc..fbe46636c8720156ed694bc60b9a30d422da449f 100644
--- a/Simulation/G4Utilities/G4UserActions/src/StoppedParticleAction.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/StoppedParticleAction.cxx
@@ -22,7 +22,6 @@
 #include "GaudiKernel/IMessageSvc.h"
 
 
-
 namespace G4UA
 {
 
@@ -36,24 +35,27 @@ namespace G4UA
 	id==1009111 || id==1009113 || id==1009211 || id==1009213 || id==1009311 ||
 	id==1009313 || id==1009321 || id==1009323 || id==1009223 || id==1009333 ||
 	id==1092112 || id==1091114 || id==1092114 || id==1092212 || id==1092214 || id==1092224 ||
-	id==1093114 || id==1093122 || id==1093214 || id==1093224 || id==1093314 || id==1093324 || id==1093334) 
+	id==1093114 || id==1093122 || id==1093214 || id==1093224 || id==1093314 || id==1093324 || id==1093334)
       return true;
     return false;
   }
-  
+
   //---------------------------------------------------------------------------
-  StoppedParticleAction::StoppedParticleAction():
-    AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc"),"StoppedParticleAction"),
-    m_fsSD(0), m_init(false){}
-  
+  StoppedParticleAction::StoppedParticleAction()
+    : AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc"),
+                   "StoppedParticleAction"),
+      m_fsSD(0), m_init(false)
+  {}
+
   //---------------------------------------------------------------------------
-  void StoppedParticleAction::processStep(const G4Step* aStep){
-    
+  void StoppedParticleAction::UserSteppingAction(const G4Step* aStep)
+  {
+
     // Trigger if the energy is below our threshold or if the time is over 150 ns
-    int id = fabs(aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetPDGEncoding());
+    int id = std::abs(aStep->GetTrack()->GetDynamicParticle()->GetDefinition()->GetPDGEncoding());
     if (id>=1000000 && id<=1100000 &&
 	isSUSYParticle(id)){
-      
+
       G4Material * mat = aStep->GetTrack()->GetMaterial();
       double minA=1500000.;
       for (unsigned int i=0;i<mat->GetNumberOfElements();++i){
@@ -63,36 +65,36 @@ namespace G4UA
 	}
       }
       if (aStep->GetPostStepPoint()->GetVelocity()>0.15*std::pow(minA,-2./3.)*CLHEP::c_light) return;
-      
+
       if (!m_init){
 	m_init = true;
 	
 	G4SDManager * g4sdm = G4SDManager::GetSDMpointer();
-	if (!g4sdm) { 
+	if (!g4sdm) {
 	  ATH_MSG_ERROR( "StoppedParticleFastSim could not get sensitive detector catalog." );
 	} else {
 	  G4VSensitiveDetector * g4sd = g4sdm->FindSensitiveDetector("TrackFastSimSD");
-	  if (!g4sd) { 
-	    ATH_MSG_ERROR( "StoppedParticleFastSim could not get TrackFastSimSD sensitive detector." ); 
+	  if (!g4sd) {
+	    ATH_MSG_ERROR( "StoppedParticleFastSim could not get TrackFastSimSD sensitive detector." );
 	  } else {
 	    m_fsSD = dynamic_cast<TrackFastSimSD*>(g4sd);
 	    if (!m_fsSD) {
-	      ATH_MSG_ERROR( "StoppedParticleFastSim could not cast the SD." ); 
+	      ATH_MSG_ERROR( "StoppedParticleFastSim could not cast the SD." );
 	    }
 	  } // found the SD
 	} // got the catalog
       }
-      
+
       if (m_fsSD) {
 	m_fsSD->WriteTrack( aStep->GetTrack() , false , true );
       }
     }
-    
+
     aStep->GetTrack()->SetTrackStatus(fStopAndKill);
     const G4TrackVector *tv = aStep->GetSecondary();
     for (unsigned int i=0;i<tv->size();i++){
       (*tv)[i]->SetTrackStatus(fStopAndKill);
-    }  
+    }
   }
-  
-} // namespace G4UA 
+
+} // namespace G4UA
diff --git a/Simulation/G4Utilities/G4UserActions/src/StoppedParticleActionTool.cxx b/Simulation/G4Utilities/G4UserActions/src/StoppedParticleActionTool.cxx
index 0d940c8e1a72295a51f21caa932eb27f6c1d913c..937926e4aee427c732fb3036d09453283137ee42 100644
--- a/Simulation/G4Utilities/G4UserActions/src/StoppedParticleActionTool.cxx
+++ b/Simulation/G4Utilities/G4UserActions/src/StoppedParticleActionTool.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "CxxUtils/make_unique.h"
 #include "G4UserActions/StoppedParticleActionTool.h"
 
 namespace G4UA
@@ -13,25 +12,15 @@ namespace G4UA
                                                        const std::string& name,
                                                        const IInterface* parent)
     : ActionToolBase<StoppedParticleAction>(type, name, parent)
-  {}
-
-  //---------------------------------------------------------------------------
-  std::unique_ptr<StoppedParticleAction> StoppedParticleActionTool::makeAction()
   {
-    ATH_MSG_DEBUG("makeAction");
-    auto action = CxxUtils::make_unique<StoppedParticleAction>();
-    return std::move(action);
+    declareInterface<IG4SteppingActionTool>(this);
   }
 
   //---------------------------------------------------------------------------
-  StatusCode StoppedParticleActionTool::queryInterface(const InterfaceID& riid,
-                                                       void** ppvIf)
+  std::unique_ptr<StoppedParticleAction> StoppedParticleActionTool::makeAction()
   {
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    } return ActionToolBase<StoppedParticleAction>::queryInterface(riid, ppvIf);
+    ATH_MSG_DEBUG("makeAction");
+    return std::make_unique<StoppedParticleAction>();
   }
 
 } // namespace G4UA
diff --git a/Simulation/G4Utilities/Geo2G4/cmt/requirements b/Simulation/G4Utilities/Geo2G4/cmt/requirements
deleted file mode 100755
index 9f0a15b273a9a16567b0e4f7c375907691780890..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/Geo2G4/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package Geo2G4
-
-author ADA
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*     External
-private
-use AthenaBaseComps     AthenaBaseComps-*    Control
-use AthenaKernel        AthenaKernel-*       Control
-use AtlasBoost          AtlasBoost-*         External
-use AtlasCLHEP          AtlasCLHEP-*         External
-use AtlasROOT           AtlasROOT-*          External
-use G4AtlasInterfaces   G4AtlasInterfaces-*  Simulation/G4Atlas
-use G4AtlasTools        G4AtlasTools-*       Simulation/G4Atlas
-use Geant4              Geant4-*             External
-use GeoMaterial2G4      GeoMaterial2G4-*     Simulation/G4Utilities
-use GeoModelKernel      GeoModelKernel-*     DetectorDescription/GeoModel
-use GeoModelUtilities   GeoModelUtilities-*  DetectorDescription/GeoModel
-use GeoSpecialShapes    GeoSpecialShapes-*   DetectorDescription/GeoModel
-use GeoModelInterfaces  GeoModelInterfaces-* DetectorDescription/GeoModel
-use StoreGate           StoreGate-*          Control
-use SimHelpers          SimHelpers-*         Simulation/G4Sim
-use SGTools             SGTools-*            Control
-end_private
-
-include_dirs "$(Geo2G4_root)" "$(Geo2G4_root)/Geo2G4"
-
-# Specify the required ROOT components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS MathCore RIO)"
-
-# ZLM to CMake folks: I believe that now that this is dual use and cleaner, these are not needed?
-## Specify to cmake that this package has a non-standard include path (transparent to CMT)
-#apply_pattern cmake_add_command command="include_directories(Geo2G4)"
-#
-## Override the library type for cmake so that it is linkable by clients (transparent to CMT)
-#apply_pattern cmake_override_library_type library=Geo2G4 type=installed_library
-
-apply_pattern dual_use_library files="*.cxx"
-
-# Make dict for LArWheelSolidChecker
-use AtlasReflex  AtlasReflex-* External -no_auto_imports
-apply_pattern lcgdict dict=LArWheelSolidChecker selectionfile=../src/lcg_dict/selection.xml headerfiles="../src/LArWheelSolidDDProxy.h"
diff --git a/Simulation/G4Utilities/GeoMaterial2G4/cmt/requirements b/Simulation/G4Utilities/GeoMaterial2G4/cmt/requirements
deleted file mode 100644
index c7af290ffe6f518f846631052cc4a26020e6c323..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/GeoMaterial2G4/cmt/requirements
+++ /dev/null
@@ -1,14 +0,0 @@
-package GeoMaterial2G4
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use AthenaKernel        AthenaKernel-*       Control
-use Geant4              Geant4-*             External
-use GeoModelKernel      GeoModelKernel-*     DetectorDescription/GeoModel
-private
-use AthenaBaseComps     AthenaBaseComps-*    Control
-use GeoModelUtilities   GeoModelUtilities-*  DetectorDescription/GeoModel
-end_private
-
-library GeoMaterial2G4 *.cxx
-apply_pattern installed_library
\ No newline at end of file
diff --git a/Simulation/G4Utilities/MCTruthAlgs/cmt/requirements b/Simulation/G4Utilities/MCTruthAlgs/cmt/requirements
deleted file mode 100755
index 59eefd115b19201e9e35c7de4179dcf6077a289b..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/MCTruthAlgs/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package MCTruthAlgs
-author Davide Costanzo
-
-use AtlasPolicy         AtlasPolicy-*
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use GaudiInterface      GaudiInterface-*        External
-use HepPDT              v*                      LCG_Interfaces
-
-
-private
-use AtlasCLHEP          AtlasCLHEP-*            External
-use TrackRecord         TrackRecord-*           Simulation/G4Sim
-end_private
-
-
-apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_joboptions files="*.py"
diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/cmt/requirements b/Simulation/G4Utilities/MCTruthSimAlgs/cmt/requirements
deleted file mode 100644
index ec5a0d479197ada63f662ab27dbe1c0c4c6a5dde..0000000000000000000000000000000000000000
--- a/Simulation/G4Utilities/MCTruthSimAlgs/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-package MCTruthSimAlgs
-author Davide Costanzo
-
-use AtlasPolicy         AtlasPolicy-*
-
-private
-use AthenaBaseComps     AthenaBaseComps-*   Control
-use AthenaKernel        AthenaKernel-*      Control
-use CaloSimEvent        CaloSimEvent-*      Calorimeter
-use CxxUtils            CxxUtils-*          Control
-use GaudiInterface      GaudiInterface-*    External
-use GeneratorObjects    GeneratorObjects-*  Generators
-use MuonSimEvent        MuonSimEvent-*      MuonSpectrometer
-use PileUpTools         PileUpTools-*       Control
-use RecEvent            RecEvent-*          Reconstruction
-use StoreGate           StoreGate-*         Control
-use TrackRecord         TrackRecord-*       Simulation/G4Sim
-use TruthUtils          TruthUtils-*        Generators
-use xAODJet             xAODJet-*           Event/xAOD
-end_private
-
-
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern component_library
-
-library MCTruthSimAlgs *.cxx \
-                       components/MCTruthSimAlgs_entries.cxx \
-                       components/MCTruthSimAlgs_load.cxx
diff --git a/Simulation/G4Utilities/MCTruthSimAlgs/doc/packagedoc.h b/Simulation/G4Utilities/MCTruthSimAlgs/doc/packagedoc.h
index 8d0f843c723d08e230017bd6d1505dbc3d4ea690..323feced408b43075e5747b96b0c0e80d4e0040a 100644
--- a/Simulation/G4Utilities/MCTruthSimAlgs/doc/packagedoc.h
+++ b/Simulation/G4Utilities/MCTruthSimAlgs/doc/packagedoc.h
@@ -17,16 +17,6 @@ There are two classes in this package:
  - MergeCalibHits : For merging callibration hit collections
  - MergeTrackRecordCollection : For merging collections of track records
 
-@ref used_MCTruthSimAlgs
 
-@ref requirements_MCTruthSimAlgs
 
 */
-
-/**
-@page used_MCTruthSimAlgs Used Packages
-*/
-
-/**
-@page requirements_MCTruthSimAlgs Requirements
-*/
diff --git a/Simulation/HitManagement/cmt/requirements b/Simulation/HitManagement/cmt/requirements
deleted file mode 100755
index e4248ffff169c5a4497bebc03b79ccaf1b19fe4f..0000000000000000000000000000000000000000
--- a/Simulation/HitManagement/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-package HitManagement
-
-public
-use AtlasPolicy       AtlasPolicy-*
-use AthContainers     AthContainers-*         Control
-use AthenaKernel      AthenaKernel-*          Control
-use EventInfo         EventInfo-*             Event
-use GaudiInterface    GaudiInterface-*        External
-
-private
-use TestTools         TestTools-*             AtlasTest
-end_private
-
-macro HitManagement_linkopts " "
-
-apply_pattern installed_library
-library HitManagement ../src/*.cxx
-
-# add the test pattern for the TimedHitPtrCollection
-private
-#apply_pattern UnitTest_run unit_test=TimedHitPtr
-apply_pattern UnitTest_run unit_test=TimedHitPtrCollection extrapatterns="^Warning in <TEnvRec::ChangeValue>: duplicate entry"
diff --git a/Simulation/ISF/ISF_Config/CMakeLists.txt b/Simulation/ISF/ISF_Config/CMakeLists.txt
index 3d8a43e701c38f978b98191a044ce42417dffc34..1760bcdb8c54d515ac6bf572b7798cdcac4379c4 100644
--- a/Simulation/ISF/ISF_Config/CMakeLists.txt
+++ b/Simulation/ISF/ISF_Config/CMakeLists.txt
@@ -9,6 +9,9 @@ atlas_subdir( ISF_Config )
 atlas_depends_on_subdirs( PRIVATE
                           TestPolicy )
 
+atlas_add_test(test_Sim_tf_configuration
+               SCRIPT test/test_Sim_tf_configuration.py)
+
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
diff --git a/Simulation/ISF/ISF_Config/python/FlagSetters.py b/Simulation/ISF/ISF_Config/python/FlagSetters.py
index 15b7dd3aa5c07698fb034d9ef6afdd902822fb33..1399d36cbf53240f0532f17e72d9abf0202715c8 100644
--- a/Simulation/ISF/ISF_Config/python/FlagSetters.py
+++ b/Simulation/ISF/ISF_Config/python/FlagSetters.py
@@ -1,5 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
+from ISF_Config.ISF_jobProperties import ISF_Flags
+
 
 ## Base method
 
@@ -33,7 +35,7 @@ def configureFlagsBase():
     DetFlags.writeBS.all_setOff()
     DetFlags.writeRDOPool.all_setOff()
     DetFlags.writeRIOPool.all_setOff()
-    from ISF_Config.ISF_jobProperties import ISF_Flags
+
     if "G4" in ISF_Flags.Simulator():
         # Short-cut: if G4 is in the simulator name, then it's a pretty
         # safe assumption that the configuration uses Geant4.
@@ -45,6 +47,7 @@ def configureFlagsBase():
 def configureFlagsFullG4():
     from G4AtlasApps.SimFlags import simFlags
     simFlags.SimulationFlavour = "FullG4"
+    ISF_Flags.HITSMergingRequired = False
     return
 
 def configureFlagsFullG4_LongLived():
diff --git a/Simulation/ISF/ISF_Config/python/ISF_MainConfig.py b/Simulation/ISF/ISF_Config/python/ISF_MainConfig.py
index c6409e377f57bffc0de01406b22e1d35145c85f7..f1a687109bfd7dde6c4d1ea3d0b67f4a9389974c 100644
--- a/Simulation/ISF/ISF_Config/python/ISF_MainConfig.py
+++ b/Simulation/ISF/ISF_Config/python/ISF_MainConfig.py
@@ -185,7 +185,8 @@ def getKernel_GenericSimulator(name="ISF_Kernel_GenericSimulator", **kwargs):
     kwargs.setdefault("OutputHardScatterTruthCollection", "TruthEvent")
     kwargs.setdefault("InputConverter", "ISF_InputConverter")
     kwargs.setdefault("ParticleBroker", "ISF_ParticleBrokerSvc")
-    kwargs.setdefault("TruthRecordService", ISF_Flags.TruthService.get_Value())
+    from G4AtlasApps.SimFlags import simFlags
+    kwargs.setdefault("TruthRecordService", simFlags.TruthStrategy.TruthServiceName())
     kwargs.setdefault("SimHitService", "ISF_SimHitService")
     kwargs.setdefault("MemoryMonitoringTool", "ISF_MemoryMonitor")
     kwargs.setdefault("DoCPUMonitoring", ISF_Flags.DoTimeMonitoring())
diff --git a/Simulation/ISF/ISF_Config/python/ISF_jobProperties.py b/Simulation/ISF/ISF_Config/python/ISF_jobProperties.py
index 114852f062059cf2ad23f435a3b4d04c626a0efd..a5fefdf436d8ae027e85d93a5d53c4fd7f6a3160 100644
--- a/Simulation/ISF/ISF_Config/python/ISF_jobProperties.py
+++ b/Simulation/ISF/ISF_Config/python/ISF_jobProperties.py
@@ -106,49 +106,18 @@ class Simulator(JobProperty):
         if self.statusOn:
             return 'configureFlags' + self.StoredValue
 
+class HITSMergingRequired(JobProperty):
+    """The configured set of simulators requires merging of HITS collections"""
+    statusOn     = True
+    allowedTypes = ['bool']
+    StoredValue  = True
+
 class UsingGeant4(JobProperty):
     """Will this job be using Geant4?"""
     statusOn     = True
     allowedTypes = ['bool']
     StoredValue  = False
 
-## TODO Setting this should automatically update dependent jobproperties.
-class TruthStrategy(JobProperty):
-    """Steering of ISF: set truthStrategy"""
-    statusOn     = True
-    allowedTypes = ['str']
-    StoredValue  = 'MC15'
-    def TruthServiceName(self):
-        # Sometimes want to override and use the Validation Truth Service for example
-        if  jobproperties.ISF_jobProperties.TruthService.statusOn:
-            return jobproperties.ISF_jobProperties.TruthService.get_Value()
-        if self.statusOn:
-            return 'ISF_' + self.StoredValue + 'TruthService'
-    def EntryLayerFilterName(self):
-        if self.statusOn:
-            return 'ISF_' + self.StoredValue + 'EntryLayerFilter'
-    def BarcodeServiceName(self):
-        if self.statusOn:
-            return 'Barcode_' + self.StoredValue + 'BarcodeSvc'
-
-class TruthService(JobProperty):
-    """Steering of ISF: set the TruthService"""
-    statusOn     = False
-    allowedTypes = ['str']
-    StoredValue  = 'ISF_TruthService'
-
-class EntryLayerFilter(JobProperty):
-    """Steering of ISF: set the EntryLayerFilter"""
-    statusOn     = True
-    allowedTypes = ['str']
-    StoredValue  = 'ISF_MC12EntryLayerFilter'
-
-class BarcodeService(JobProperty):
-    """Steering of ISF: set the BarcodeService"""
-    statusOn     = True
-    allowedTypes = ['str']
-    StoredValue  = 'Barcode_MC12BarcodeSvc'
-
 # currently unused:
 #class ParticleBroker(JobProperty):
 #    """Steering of ISF: set the Particle Broker Service"""
@@ -228,11 +197,8 @@ jobproperties.ISF_jobProperties.add_JobProperty(DoMemoryMonitoring)
 jobproperties.ISF_jobProperties.add_JobProperty(DoTimeMonitoring)
 jobproperties.ISF_jobProperties.add_JobProperty(Input)
 jobproperties.ISF_jobProperties.add_JobProperty(Simulator)
+jobproperties.ISF_jobProperties.add_JobProperty(HITSMergingRequired)
 jobproperties.ISF_jobProperties.add_JobProperty(UsingGeant4)
-jobproperties.ISF_jobProperties.add_JobProperty(TruthStrategy)
-jobproperties.ISF_jobProperties.add_JobProperty(TruthService)
-jobproperties.ISF_jobProperties.add_JobProperty(EntryLayerFilter)
-jobproperties.ISF_jobProperties.add_JobProperty(BarcodeService)
 #jobproperties.ISF_jobProperties.add_JobProperty(ParticleBroker)
 jobproperties.ISF_jobProperties.add_JobProperty(OverrideInputFiles)
 jobproperties.ISF_jobProperties.add_JobProperty(RoutingChainBeamPipe)
diff --git a/Simulation/ISF/ISF_Config/share/ISF_ConfigJobInclude.py b/Simulation/ISF/ISF_Config/share/ISF_ConfigJobInclude.py
index 5b3ec6dc1fc4969391cbb2f011e8c3ab76c87907..fe8ee410b667afe61e3e8771ee39ca18eb4d3b20 100644
--- a/Simulation/ISF/ISF_Config/share/ISF_ConfigJobInclude.py
+++ b/Simulation/ISF/ISF_Config/share/ISF_ConfigJobInclude.py
@@ -121,10 +121,11 @@ topSeq += getAlgorithm("BeamEffectsAlg")
 # ISF kernel configuration
 #--------------------------------------------------------------
 
-# TODO: Find out what to do with these!
-#from ISF_Geant4Tools.ISF_Geant4ToolsConf import iGeant4__SDActivateUserAction
-#ToolSvc += iGeant4__SDActivateUserAction("ISFSDActivateUserAction",
-#                                        OutputLevel=INFO)
+# keep reference to collection merger algorithm to guarantee that
+# any subsequent simulator configuration gets a reference to the same
+# instance when calling confgetter's getAlgorithm
+collection_merger_alg = getAlgorithm('ISF_CollectionMerger')
+
 SimKernel = getAlgorithm(ISF_Flags.Simulator.KernelName())
 
 # Temporary work-around - see ATLASSIM-2351
@@ -165,6 +166,10 @@ from ISF_Example.ISF_Output import ISF_HITSStream
 from ISF_Example.ISF_Metadata import createSimulationParametersMetadata, configureRunNumberOverrides
 createSimulationParametersMetadata()
 configureRunNumberOverrides()
+
+if ISF_Flags.HITSMergingRequired():
+    topSequence += collection_merger_alg
+
 #--------------------------------------------------------------
 # Post kernel configuration
 #--------------------------------------------------------------
diff --git a/Simulation/ISF/ISF_Config/share/jobOptions_ConfGetter.py b/Simulation/ISF/ISF_Config/share/jobOptions_ConfGetter.py
index 51f1d3eabf791128dc144f31d050b3ce6d956b5f..cc3e33597977ec3cf00734720ac967e806867b2b 100644
--- a/Simulation/ISF/ISF_Config/share/jobOptions_ConfGetter.py
+++ b/Simulation/ISF/ISF_Config/share/jobOptions_ConfGetter.py
@@ -98,10 +98,8 @@ except:
     DetFlags.Forward_setOff() # Forward dets are off by default
 
 if 'truthStrategy' in dir():
-    ISF_Flags.BarcodeService   = 'Barcode_' + truthStrategy + 'BarcodeSvc'
-    ISF_Flags.TruthService     = 'ISF_'     + truthStrategy + 'TruthService'
-    ISF_Flags.EntryLayerFilter = 'ISF_'     + truthStrategy + 'EntryLayerFilter'
-    ISF_Flags.TruthStrategy    = truthStrategy
+    simFlags.TruthService     = 'ISF_'     + truthStrategy + 'TruthService'
+    simFlags.TruthStrategy    = truthStrategy
     try:
         from BarcodeServices.BarcodeServicesConfig import barcodeOffsetForTruthStrategy
         simFlags.SimBarcodeOffset  = barcodeOffsetForTruthStrategy(truthStrategy)
@@ -118,10 +116,8 @@ if 'truthStrategy' in dir():
         else:
             simFlags.SimBarcodeOffset  = 1000000 #MC15 setting
 else:
-    ISF_Flags.BarcodeService   = 'Barcode_MC12BarcodeSvc'
-    ISF_Flags.TruthService     = 'ISF_TruthService'
-    ISF_Flags.EntryLayerFilter = 'ISF_MC12EntryLayerFilter'
-    ISF_Flags.TruthStrategy    = 'MC12'
+    simFlags.TruthService     = 'ISF_MC12TruthService'
+    simFlags.TruthStrategy    = 'MC12'
     simFlags.SimBarcodeOffset  = 200000 #MC12 setting
 
 include('ISF_Config/ISF_ConfigJobInclude.py')
diff --git a/Simulation/ISF/ISF_Config/test/test_Sim_tf_configuration.py b/Simulation/ISF/ISF_Config/test/test_Sim_tf_configuration.py
new file mode 100755
index 0000000000000000000000000000000000000000..ef4c1063db65269cb740835296cf6be8cca9575d
--- /dev/null
+++ b/Simulation/ISF/ISF_Config/test/test_Sim_tf_configuration.py
@@ -0,0 +1,158 @@
+#!/usr/bin/env python
+
+import pickle
+import subprocess
+import unittest
+
+
+class TestATLFASTII(unittest.TestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        config_picklefilename = 'ATLFASTII_config.pkl'
+        command = [
+            'Sim_tf.py',
+            '--simulator', 'ATLFASTII',
+            '--athenaopts', '"--config-only={}"'.format(config_picklefilename),
+            '--conditionsTag', 'default:OFLCOND-RUN12-SDR-19',
+            '--geometryVersion', 'default:ATLAS-R2-2015-03-01-00_VALIDATION',
+            '--inputEVNTFile', '/afs/cern.ch/atlas/groups/Simulation/EVNT_files/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1',
+            '--outputHITSFile', 'Hits.pool.root',
+            '--maxEvents', '2',
+            # would otherwise fail due to missing HITS file:
+            '--outputFileValidation', 'False',
+        ]
+        subprocess.check_call(command)
+
+        with open(config_picklefilename) as picklefile:
+            job_config_dict = pickle.load(picklefile)
+
+        cls._job_config_dict = job_config_dict
+
+    def _assert_ISF_CollectionMerger_property_unordered_equal(self,
+                                                              property_name,
+                                                              expected_property_value):
+        collection_merger = self._job_config_dict['ISF_CollectionMerger']
+        actual_property_value_as_str = collection_merger[property_name]
+        # need to evaluate to obtain actual Python object
+        actual_property_value = eval(actual_property_value_as_str)
+
+        expected_property_value_sorted = sorted(expected_property_value)
+        actual_property_value_sorted = sorted(actual_property_value)
+
+        failure_message = "ISF_CollectionMerger.{property} has a different " \
+                          "value than expected!\n" \
+                          "expected (sorted):\n" \
+                          " {expected}\n" \
+                          "actual (sorted):\n" \
+                          " {actual}".format(
+                              property=property_name,
+                              expected=expected_property_value_sorted,
+                              actual=actual_property_value_sorted)
+        self.assertEqual(expected_property_value_sorted,
+                         actual_property_value_sorted,
+                         failure_message)
+
+    def test___ISF_Collection_merger_is_at_end_of_AthAlgSeq(self):
+        ath_alg_seqence_as_str = self._job_config_dict['AthAlgSeq']['Members']
+        # need to evaluate to obtain actual Python object
+        ath_alg_seqence_list = eval(ath_alg_seqence_as_str)
+
+        actual_last_ath_alg_sequence_entry = ath_alg_seqence_list[-1]
+        expected_last_ath_alg_sequence_entry = "ISF::CollectionMerger/ISF_CollectionMerger"
+        self.assertEqual(expected_last_ath_alg_sequence_entry,
+                         actual_last_ath_alg_sequence_entry)
+
+    def test___ISF_Collection_merger_InputBCMHits_contains_only_G4_collection(self):
+        expected_input_hits = ['BCMHits_G4']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputBCMHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputBLMHits_contains_only_G4_collection(self):
+        expected_input_hits = ['BLMHits_G4']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputBLMHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputCSCHits_contains_only_G4_collection(self):
+        expected_input_hits = ['CSC_Hits_G4']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputCSCHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputLArEMBHits_contains_G4_and_FastCaloSim_collections(self):
+        expected_input_hits = ['LArHitEMB_G4', 'LArHitEMB_FastCaloSim']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputLArEMBHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputLArEMECHits_contains_G4_and_FastCaloSim_collections(self):
+        expected_input_hits = ['LArHitEMEC_G4', 'LArHitEMEC_FastCaloSim']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputLArEMECHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputLArFCALHits_contains_G4_and_FastCaloSim_collections(self):
+        expected_input_hits = ['LArHitFCAL_G4', 'LArHitFCAL_FastCaloSim']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputLArFCALHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputLArHECHits_contains_G4_and_FastCaloSim_collections(self):
+        expected_input_hits = ['LArHitHEC_G4', 'LArHitHEC_FastCaloSim']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputLArHECHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputMBTSHits_contains_only_G4_collection(self):
+        expected_input_hits = ['MBTSHits_G4']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputMBTSHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputMDTHits_contains_only_G4_collection(self):
+        expected_input_hits = ['MDT_Hits_G4']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputMDTHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputPixelHits_contains_only_G4_collection(self):
+        expected_input_hits = ['PixelHits_G4']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputPixelHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputRPCHits_contains_only_G4_collection(self):
+        expected_input_hits = ['RPC_Hits_G4']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputRPCHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputSCTHits_contains_only_G4_collection(self):
+        expected_input_hits = ['SCT_Hits_G4']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputSCTHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputTGCHits_contains_only_G4_collection(self):
+        expected_input_hits = ['TGC_Hits_G4']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputTGCHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputTRTUncompressedHits_contains_only_G4_collection(self):
+        expected_input_hits = ['TRTUncompressedHits_G4']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputTRTUncompressedHits',
+            expected_input_hits)
+
+    def test___ISF_Collection_merger_InputTileHits_contains_G4_and_FastCaloSim_collections(self):
+        expected_input_hits = ['TileHitVec_G4', 'TileHitVec_FastCaloSim']
+        self._assert_ISF_CollectionMerger_property_unordered_equal(
+            'InputTileHits',
+            expected_input_hits)
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/CMakeLists.txt b/Simulation/ISF/ISF_Core/ISF_Algorithms/CMakeLists.txt
index 8ef02da9e3b9b28dece87c5be66cb6f36c890af3..361aee15c5484511a6f657fda0d4185c1aa53fd0 100644
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/CMakeLists.txt
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/CMakeLists.txt
@@ -48,6 +48,9 @@ atlas_add_test( CollectionMerger_test
    MuonSimEvent ${GTEST_LIBRARIES} #${GMOCK_LIBRARIES}
    ENVIRONMENT "JOBOPTSEARCHPATH=${CMAKE_CURRENT_SOURCE_DIR}/share" )
 
+atlas_add_test(collection_merger_helpers_tests
+               SCRIPT python/test/test_collection_merger_helpers.py)
+
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/cmt/requirements b/Simulation/ISF/ISF_Core/ISF_Algorithms/cmt/requirements
deleted file mode 100644
index 9f45496f99b96540c219e2184aba558b6d76057e..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/cmt/requirements
+++ /dev/null
@@ -1,48 +0,0 @@
-package ISF_Algorithms
-author <Andreas.Salzburger@cern.ch>
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-########################################################
-# public use statements
-use AtlasPolicy          AtlasPolicy-*
-use GaudiInterface       GaudiInterface-*        External
-
-########################################################
-# private use statements
-private
-use AthenaBaseComps      AthenaBaseComps-*       Control
-use AtlasBoost           AtlasBoost-*            External
-use AtlasDetDescr        AtlasDetDescr-*         DetectorDescription
-use AtlasROOT            AtlasROOT-*             External
-use ISF_Event            ISF_Event-*             Simulation/ISF/ISF_Core
-use ISF_Interfaces       ISF_Interfaces-*        Simulation/ISF/ISF_Core
-use CxxUtils             CxxUtils-*              Control
-use PmbCxxUtils          PmbCxxUtils-*           Tools
-use InDetSimEvent        InDetSimEvent-*         InnerDetector
-use LArSimEvent          LArSimEvent-*           LArCalorimeter
-use TileSimEvent         TileSimEvent-*          TileCalorimeter
-use MuonSimEvent         MuonSimEvent-*          MuonSpectrometer
-use CxxUtils             CxxUtils-*              Control
-use StoreGate            StoreGate-*             Control
-use AtlasGoogleTest      AtlasGoogleTest-*       External
-use GeneratorObjects     GeneratorObjects-*      Generators
-
-public
-library ISF_Algorithms *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-private
-use TestTools            TestTools-*             AtlasTest 
-apply_pattern UnitTest_run unit_test=CollectionMerger extra_sources=../src/CollectionMerger.cxx
-
-
-# enable the following lines to compile this package with debug symbols
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/ISF_AlgorithmsConfig.py b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/ISF_AlgorithmsConfig.py
index fddde4c12566a8d7371b88919eed6fb3e3f757be..dbbc0dca66e1af258729f967b1169132fc343486 100644
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/ISF_AlgorithmsConfig.py
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/ISF_AlgorithmsConfig.py
@@ -33,8 +33,8 @@ def getCollectionMerger(name="ISF_CollectionMerger", **kwargs):
     kwargs.setdefault( "OutputLArFCALHits",         "LArHitFCAL"          )
     kwargs.setdefault( "OutputLArHECHits",          "LArHitHEC"           )
 
-    kwargs.setdefault( "OutputTileHits",            "MBTSHits"            )
-    kwargs.setdefault( "OutputMBTSHits",            "TileHitVec"          )
+    kwargs.setdefault( "OutputTileHits",            "TileHitVec"          )
+    kwargs.setdefault( "OutputMBTSHits",            "MBTSHits"            )
 
     kwargs.setdefault( "OutputCSCHits",             "CSC_Hits"            )
     kwargs.setdefault( "OutputMDTHits",             "MDT_Hits"            )
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpers.py b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpers.py
new file mode 100644
index 0000000000000000000000000000000000000000..c90af2b8cdc12bf4d88987894dcb061bdf3e44ad
--- /dev/null
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/collection_merger_helpers.py
@@ -0,0 +1,35 @@
+from AthenaCommon.CfgGetter import getAlgorithm
+from G4AtlasApps.SimFlags import simFlags
+from ISF_Config.ISF_jobProperties import ISF_Flags
+
+
+def generate_mergeable_collection_name(bare_collection_name,
+                                       mergeable_collection_suffix,
+                                       merger_input_property):
+    """
+    Generates and returns a collection name that is also registered to
+    the ISF CollectionMerger algorithm.
+
+    :param bare_collection_name: name of the collection if no merging
+        is taking place.
+    :param mergeable_collection_suffix: suffix to the collection in
+        case merging is taking place.
+    :param merger_input_property: name of the Input* property in the
+        CollectionMerger algorithm to add the mergeable collection to.
+    """
+    if simFlags.ISFRun() and ISF_Flags.HITSMergingRequired():
+        mergeable_collection = '{bare}{suffix}'.format(
+            bare=bare_collection_name,
+            suffix=mergeable_collection_suffix
+        )
+
+        collection_merger = getAlgorithm('ISF_CollectionMerger')
+        input_attribute_name = 'Input{merger_input_property}'.format(
+            merger_input_property=merger_input_property)
+        merger_input_collections = getattr(collection_merger,
+                                           input_attribute_name)
+        merger_input_collections.append(mergeable_collection)
+    else:
+        mergeable_collection = bare_collection_name
+
+    return mergeable_collection
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/python/test/test_collection_merger_helpers.py b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/test/test_collection_merger_helpers.py
new file mode 100755
index 0000000000000000000000000000000000000000..6e7b6e32deb7d5ad4f133876980e045f5de6309a
--- /dev/null
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/python/test/test_collection_merger_helpers.py
@@ -0,0 +1,154 @@
+#!/usr/bin/env python
+
+from mock import Mock
+import sys
+import unittest
+
+from AthenaCommon.CfgGetter import getAlgorithm
+from G4AtlasApps.SimFlags import simFlags
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+from ISF_Config.ISF_jobProperties import ISF_Flags
+
+
+class Test_generate_mergeable_collection_name(unittest.TestCase):
+
+    def setUp(self):
+        # keep same algorithm instance around for the duration of each test
+        self.collection_merger = getAlgorithm('ISF_CollectionMerger')
+
+    def tearDown(self):
+        # get rid of current algorithm instance so that next test gets its own
+        # instance
+        del self.collection_merger
+
+    def test_isISFRunAndHITSMergingRequired_expectBareNameWithSuffixReturned(self):
+        simFlags.ISFRun.set_Value(True)
+        ISF_Flags.HITSMergingRequired.set_Value(True)
+
+        bare_collection_name = 'aTestCollection'
+        collection_suffix = '_TESTSUFFIX'
+        merger_input_property = 'PixelHits'
+        actual_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                                    collection_suffix,
+                                                                    merger_input_property)
+
+        expected_collection_name = 'aTestCollection_TESTSUFFIX'
+        self.assertEqual(expected_collection_name, actual_collection_name)
+
+    def test_isISFRunAndHITSMergingRequiredWithEmptyCollectionMergerAlgorithm_expectCollectionAddedToCollectionMergerAlgorithm(self):
+        simFlags.ISFRun.set_Value(True)
+        ISF_Flags.HITSMergingRequired.set_Value(True)
+
+        bare_collection_name = 'aTestCollection'
+        collection_suffix = '_TESTSUFFIX'
+        merger_input_property = 'PixelHits'
+        actual_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                                    collection_suffix,
+                                                                    merger_input_property)
+
+        collection_merger = getAlgorithm('ISF_CollectionMerger')
+        actual_collection_merger_input = collection_merger.InputPixelHits
+        expected_collection_merger_input = ['aTestCollection_TESTSUFFIX']
+
+        self.assertEqual(expected_collection_merger_input,
+                         actual_collection_merger_input)
+
+    def test_isISFRunAndNoHITSMergingRequired_expectBareCollectionNameReturned(self):
+        simFlags.ISFRun.set_Value(True)
+        ISF_Flags.HITSMergingRequired.set_Value(False)
+
+        bare_collection_name = 'aTestCollection'
+        collection_suffix = '_TESTSUFFIX'
+        merger_input_property = 'PixelHits'
+        actual_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                                    collection_suffix,
+                                                                    merger_input_property)
+
+        expected_collection_name = 'aTestCollection'
+        self.assertEqual(expected_collection_name, actual_collection_name)
+
+    def test_isISFRunAndNoHITSMergingRequiredWithEmptyCollectionMergerAlgorithm_expectCollectionMergerAlgorithmUntouched(self):
+        simFlags.ISFRun.set_Value(True)
+        ISF_Flags.HITSMergingRequired.set_Value(False)
+
+        bare_collection_name = 'aTestCollection'
+        collection_suffix = '_TESTSUFFIX'
+        merger_input_property = 'PixelHits'
+        actual_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                                    collection_suffix,
+                                                                    merger_input_property)
+
+        collection_merger = getAlgorithm('ISF_CollectionMerger')
+        actual_collection_merger_input = collection_merger.InputPixelHits
+
+        expected_collection_merger_input = list()
+        self.assertEqual(expected_collection_merger_input,
+                         actual_collection_merger_input)
+
+    def test_isNotISFRunAndNoHITSMergingRequired_expectBareCollectioNameReturned(self):
+        simFlags.ISFRun.set_Value(False)
+        ISF_Flags.HITSMergingRequired.set_Value(False)
+
+        bare_collection_name = 'aTestCollection'
+        collection_suffix = '_TESTSUFFIX'
+        merger_input_property = 'PixelHits'
+        actual_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                                    collection_suffix,
+                                                                    merger_input_property)
+
+        expected_collection_name = 'aTestCollection'
+        self.assertEqual(expected_collection_name, actual_collection_name)
+
+    def test_isNotISFRunAndHITSMergingRequired_expectBareCollectioNameReturned(self):
+        simFlags.ISFRun.set_Value(False)
+        ISF_Flags.HITSMergingRequired.set_Value(True)
+
+        bare_collection_name = 'aTestCollection'
+        collection_suffix = '_TESTSUFFIX'
+        merger_input_property = 'PixelHits'
+        actual_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                                    collection_suffix,
+                                                                    merger_input_property)
+
+        expected_collection_name = 'aTestCollection'
+        self.assertEqual(expected_collection_name, actual_collection_name)
+
+    def test_isNotISFRunAndNoHITSMergingRequired_expectCollectionMergerAlgorithmUntouched(self):
+        simFlags.ISFRun.set_Value(False)
+        ISF_Flags.HITSMergingRequired.set_Value(False)
+
+        bare_collection_name = 'aTestCollection'
+        collection_suffix = '_TESTSUFFIX'
+        merger_input_property = 'PixelHits'
+        actual_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                                    collection_suffix,
+                                                                    merger_input_property)
+
+        collection_merger = getAlgorithm('ISF_CollectionMerger')
+        actual_collection_merger_input = collection_merger.InputPixelHits
+
+        expected_collection_merger_input = list()
+        self.assertEqual(expected_collection_merger_input,
+                         actual_collection_merger_input)
+
+    def test_isNotISFRunAndHITSMergingRequired_expectCollectionMergerAlgorithmUntouched(self):
+        simFlags.ISFRun.set_Value(False)
+        ISF_Flags.HITSMergingRequired.set_Value(True)
+
+        bare_collection_name = 'aTestCollection'
+        collection_suffix = '_TESTSUFFIX'
+        merger_input_property = 'PixelHits'
+        actual_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                                    collection_suffix,
+                                                                    merger_input_property)
+
+        collection_merger = getAlgorithm('ISF_CollectionMerger')
+        actual_collection_merger_input = collection_merger.InputPixelHits
+
+        expected_collection_merger_input = list()
+        self.assertEqual(expected_collection_merger_input,
+                         actual_collection_merger_input)
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/CollectionMerger.cxx b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/CollectionMerger.cxx
index 12c987ab355727de067da5bc9312d88d5035e1c3..9296fd8dc7a407a393993fb3b7479a3de79d1fae 100644
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/CollectionMerger.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/CollectionMerger.cxx
@@ -153,24 +153,24 @@ StatusCode ISF::CollectionMerger::initialize()
 /** Athena Algorithm execute */
 StatusCode ISF::CollectionMerger::execute()
 {
-  mergeCollections( m_inputBCMHits,             m_outputBCMHits             );
-  mergeCollections( m_inputBLMHits,             m_outputBLMHits             );
-  mergeCollections( m_inputPixelHits,           m_outputPixelHits           );
-  mergeCollections( m_inputSCTHits,             m_outputSCTHits             );
-  mergeCollections( m_inputTRTUncompressedHits, m_outputTRTUncompressedHits );
+  ATH_CHECK(mergeCollections( m_inputBCMHits,             m_outputBCMHits             ));
+  ATH_CHECK(mergeCollections( m_inputBLMHits,             m_outputBLMHits             ));
+  ATH_CHECK(mergeCollections( m_inputPixelHits,           m_outputPixelHits           ));
+  ATH_CHECK(mergeCollections( m_inputSCTHits,             m_outputSCTHits             ));
+  ATH_CHECK(mergeCollections( m_inputTRTUncompressedHits, m_outputTRTUncompressedHits ));
 
-  mergeCollections( m_inputLArEMBHits,          m_outputLArEMBHits          );
-  mergeCollections( m_inputLArEMECHits,         m_outputLArEMECHits         );
-  mergeCollections( m_inputLArFCALHits,         m_outputLArFCALHits         );
-  mergeCollections( m_inputLArHECHits,          m_outputLArHECHits          );
+  ATH_CHECK(mergeCollections( m_inputLArEMBHits,          m_outputLArEMBHits          ));
+  ATH_CHECK(mergeCollections( m_inputLArEMECHits,         m_outputLArEMECHits         ));
+  ATH_CHECK(mergeCollections( m_inputLArFCALHits,         m_outputLArFCALHits         ));
+  ATH_CHECK(mergeCollections( m_inputLArHECHits,          m_outputLArHECHits          ));
 
-  mergeCollections( m_inputTileHits,            m_outputTileHits            );
-  mergeCollections( m_inputMBTSHits,            m_outputMBTSHits            );
+  ATH_CHECK(mergeCollections( m_inputTileHits,            m_outputTileHits            ));
+  ATH_CHECK(mergeCollections( m_inputMBTSHits,            m_outputMBTSHits            ));
 
-  mergeCollections( m_inputCSCHits,             m_outputCSCHits             );
-  mergeCollections( m_inputMDTHits,             m_outputMDTHits             );
-  mergeCollections( m_inputRPCHits,             m_outputRPCHits             );
-  mergeCollections( m_inputTGCHits,             m_outputTGCHits             );
+  ATH_CHECK(mergeCollections( m_inputCSCHits,             m_outputCSCHits             ));
+  ATH_CHECK(mergeCollections( m_inputMDTHits,             m_outputMDTHits             ));
+  ATH_CHECK(mergeCollections( m_inputRPCHits,             m_outputRPCHits             ));
+  ATH_CHECK(mergeCollections( m_inputTGCHits,             m_outputTGCHits             ));
 
   return StatusCode::SUCCESS;
 }
@@ -186,6 +186,6 @@ StatusCode ISF::CollectionMerger::finalize()
 StatusCode ISF::CollectionMerger::initializeVarHandleKey( SG::VarHandleKey& varHandleKey ) const {
   if ( varHandleKey.key().empty() )
     return StatusCode::SUCCESS;
-  
+
   return varHandleKey.initialize();
 }
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/CollectionMerger.h b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/CollectionMerger.h
index 0e1c5156262049df24bb1eb9871ae15b7f555eeb..ca3bb535b5effca291ac3d49631bf1f2d5650cac 100644
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/src/CollectionMerger.h
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/src/CollectionMerger.h
@@ -81,8 +81,17 @@ namespace ISF {
 
     /** Merge all hits of inputReadHandleKeys's collections into outputWriteHandleKey */
     template <typename T>
-    void mergeCollections( const ReadHandleKeyVector_t<T>& inputReadHandleKeys,
-                           SG::WriteHandleKey<T>&          outputWriteHandleKey ) const;
+    StatusCode mergeCollections( const ReadHandleKeyVector_t<T>& inputReadHandleKeys,
+                                 SG::WriteHandleKey<T>& outputWriteHandleKey ) const;
+
+	/** Copy the given hit into the given output collection, container or DataHandle */
+	template <typename HitType_t, typename OutputType_t>
+	void insertCopy(const HitType_t& hit, OutputType_t& outputHandle) const;
+
+	/** Copy the given const pointer to a hit into the given output collection,
+	    container or DataHandle */
+	template <typename HitType_t, typename OutputType_t>
+	void insertCopy(HitType_t * const hit, OutputType_t& outputHandle) const;
 
     /** Input collection StoreGate keys */
     SGKeyVector_t                                       m_inputBCMHitsSGKeys;
@@ -145,7 +154,6 @@ namespace ISF {
     SG::WriteHandleKey<TGCSimHitCollection>             m_outputTGCHits;
   };
 
-}
 
 //
 // templated methods below
@@ -175,28 +183,48 @@ StatusCode ISF::CollectionMerger::setupReadHandleKeyVector( const SGKeyVector_t&
 
 /** Merge all hits of inputReadHandleKeys's collections into outputWriteHandleKey */
 template <typename T>
-void ISF::CollectionMerger::mergeCollections( const ReadHandleKeyVector_t<T>& inputReadHandleKeys,
-                                              SG::WriteHandleKey<T>&          outputWriteHandleKey ) const {
+inline StatusCode ISF::CollectionMerger::mergeCollections( const ReadHandleKeyVector_t<T>& inputReadHandleKeys,
+                                              SG::WriteHandleKey<T>& outputWriteHandleKey ) const {
   // skip if not input collection
   if ( inputReadHandleKeys.empty() ) {
-    return;
+    return StatusCode::SUCCESS;
   }
   // TODO: is there a way to conveniently get the total number of hits in all inputReadHandleKeys
   //       and reserve the corresponding size in the outputHandle
-  SG::WriteHandle<T>  outputHandle{outputWriteHandleKey};
-  if (outputHandle.record( CxxUtils::make_unique<T>() ).isFailure()) {
-    return;
-  }
+  SG::WriteHandle<T> outputHandle{outputWriteHandleKey};
+  ATH_CHECK( outputHandle.record(std::make_unique<T>()) );
 
   for ( const auto& collKey: inputReadHandleKeys ) {
-    SG::ReadHandle<T>  inputHandle{collKey};
+    SG::ReadHandle<T> inputHandle{collKey};
 
     for ( const auto& hit: *inputHandle ) {
-      // TODO: replace with ->Emplace(hit) once LArHitContainer supports this
-      outputHandle->push_back( hit );
+      this->insertCopy(hit, outputHandle);
     }
   }
+
+  return StatusCode::SUCCESS;
+}
+
+
+/** Copy the given hit into the given output collection, container or DataHandle */
+template <typename HitType_t, typename OutputType_t>
+inline void ISF::CollectionMerger::insertCopy(const HitType_t& hit,
+                                           OutputType_t& outputHandle) const {
+  static_assert(!std::is_pointer<HitType_t>::value,
+                "The hit provided to ISF::CollectionMerger::insertCopy(..) must not be a pointer!");
+  outputHandle->Emplace( hit );
 }
 
 
+/** Copy the given const pointer to a hit into the given output collection, container or DataHandle */
+template <typename HitType_t, typename OutputType_t>
+inline void ISF::CollectionMerger::insertCopy(HitType_t * const hit,
+                                           OutputType_t& outputHandle) const {
+  auto&& hitCopy = std::make_unique<HitType_t>(*hit);
+  outputHandle->push_back( hitCopy.release() );
+}
+
+
+}
+
 #endif //> !ISF_ALGS_COLLECTIONMERGER_H
diff --git a/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx b/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx
index 0663bb9257c1d7a76fbaec13de6400d341e0500b..a2b4a28001f3278de4d017df2521b3827fd7ed38 100644
--- a/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Algorithms/test/CollectionMerger_test.cxx
@@ -31,14 +31,17 @@ namespace ISFTesting {
 // needed every time an AthAlgorithm, AthAlgTool or AthService is instantiated
 ISvcLocator* g_svcLoc = nullptr;
 
-// mock object for sensitive detector hits
-class TestHits {
+
+// fake sensitive detector hits
+class TestHit {
   public:
-    TestHits(int value):m_value(value) { };
+    TestHit(int value):m_value(value) { };
     int m_value;
 };
+
 // typedef for convenience
-typedef AtlasHitsVector<ISFTesting::TestHits> TestHitCollection_t;
+typedef AtlasHitsVector<ISFTesting::TestHit> TestHitCollection_t;
+typedef AthenaHitsVector<ISFTesting::TestHit> TestPointerHitCollection_t;
 
 
 // global test environment takes care of setting up Gaudi
@@ -196,7 +199,7 @@ TEST_F(CollectionMerger_test, mergeCollections) {
   ASSERT_TRUE( mergedCollectionHandle.isValid() );
   ASSERT_EQ( mergedCollectionHandle->size(), 3+2+3 );
 
-  auto& mergedCollectionVector = mergedCollectionHandle->getVector();
+  const auto& mergedCollectionVector = mergedCollectionHandle->getVector();
   ASSERT_EQ( mergedCollectionVector.at(0).m_value, 1  ); // inputCollectionA
   ASSERT_EQ( mergedCollectionVector.at(1).m_value, 20 ); // inputCollectionA
   ASSERT_EQ( mergedCollectionVector.at(2).m_value, 5  ); // inputCollectionA
@@ -250,7 +253,7 @@ TEST_F(CollectionMerger_test, integration_with_data) {
   ASSERT_TRUE( mergedCollectionHandle.isValid() );
   ASSERT_EQ( mergedCollectionHandle->size(), 3+2+3 );
 
-  auto& mergedCollectionVector = mergedCollectionHandle->getVector();
+  const auto& mergedCollectionVector = mergedCollectionHandle->getVector();
   ASSERT_EQ( mergedCollectionVector.at(0).trackNumber(), 1  ); // inputPixelCollectionIntegrationTestA
   ASSERT_EQ( mergedCollectionVector.at(1).trackNumber(), 20 ); // inputPixelCollectionIntegrationTestA
   ASSERT_EQ( mergedCollectionVector.at(2).trackNumber(), 5  ); // inputPixelCollectionIntegrationTestA
@@ -262,10 +265,141 @@ TEST_F(CollectionMerger_test, integration_with_data) {
 }
 
 
+TEST_F(CollectionMerger_test, one_empty_one_filled_input_collection___expect_filled_output_collection) {
+  std::string inputPropertyValue = "['inputPixelCollectionIntegrationTestFilled',"
+                                    "'inputPixelCollectionIntegrationTestEmpty']";
+  std::string outputPropertyValue = "'outputPixelCollectionTestFilled'";
+  ASSERT_TRUE( m_alg->setProperty( "InputPixelHits",  inputPropertyValue).isSuccess()  );
+  ASSERT_TRUE( m_alg->setProperty( "OutputPixelHits", outputPropertyValue).isSuccess() );
+
+  // create dummy input collections containing dummy data
+  HepGeom::Point3D<double> pos(0.,0.,0.);
+  SG::WriteHandle<SiHitCollection> inputTestDataHandleFilled{"inputPixelCollectionIntegrationTestFilled"};
+  ASSERT_TRUE(inputTestDataHandleFilled.record(CxxUtils::make_unique<SiHitCollection>()).isSuccess());
+  inputTestDataHandleFilled->Emplace( pos, pos, 1., 1.,  1, 0 );
+  inputTestDataHandleFilled->Emplace( pos, pos, 1., 1., 20, 0 );
+  inputTestDataHandleFilled->Emplace( pos, pos, 1., 1.,  5, 0 );
+
+  SG::WriteHandle<SiHitCollection> inputTestDataHandleEmpty{"inputPixelCollectionIntegrationTestEmpty"};
+  ASSERT_TRUE(inputTestDataHandleEmpty.record(CxxUtils::make_unique<SiHitCollection>()).isSuccess());
+
+  ASSERT_TRUE( m_alg->initialize().isSuccess() );
+  ASSERT_TRUE( m_alg->execute().isSuccess() );
+
+  // test "outputPixelCollectionIntegrationTest" contents
+  SG::ReadHandleKey<SiHitCollection>  mergedCollectionKey{"outputPixelCollectionTestFilled"};
+  ASSERT_TRUE( mergedCollectionKey.initialize().isSuccess() );
+  SG::ReadHandle<SiHitCollection> mergedCollectionHandle{mergedCollectionKey};
+
+  ASSERT_TRUE( mergedCollectionHandle.isValid() );
+  ASSERT_EQ( 3, mergedCollectionHandle->size() );
+
+  const auto& mergedCollectionVector = mergedCollectionHandle->getVector();
+  ASSERT_EQ( mergedCollectionVector.at(0).trackNumber(), 1  ); // inputPixelCollectionIntegrationTestA
+  ASSERT_EQ( mergedCollectionVector.at(1).trackNumber(), 20 ); // inputPixelCollectionIntegrationTestA
+  ASSERT_EQ( mergedCollectionVector.at(2).trackNumber(), 5  ); // inputPixelCollectionIntegrationTestA
+}
+
+
+TEST_F(CollectionMerger_test, preexisting_output_collection___expect_execute_isFailure) {
+  std::string inputPropertyValue = "['inputPixelCollectionTestX']";
+  std::string outputPropertyValue = "'outputPixelCollectionTestPreexisting'";
+  ASSERT_TRUE( m_alg->setProperty( "InputPixelHits",  inputPropertyValue).isSuccess()  );
+  ASSERT_TRUE( m_alg->setProperty( "OutputPixelHits", outputPropertyValue).isSuccess() );
+
+  // create dummy input collections containing dummy data
+  SG::WriteHandle<SiHitCollection> inputTestDataHandleA{"inputPixelCollectionTestX"};
+  ASSERT_TRUE( inputTestDataHandleA.record(CxxUtils::make_unique<SiHitCollection>()).isSuccess() );
+
+  // create pre-existing output collection
+  SG::WriteHandle<SiHitCollection> outputDataHandle{"outputPixelCollectionTestPreexisting"};
+  ASSERT_TRUE( outputDataHandle.record(CxxUtils::make_unique<SiHitCollection>()).isSuccess() );
+
+  ASSERT_TRUE( m_alg->initialize().isSuccess() );
+  ASSERT_TRUE( m_alg->execute().isFailure() );
+}
+
+
+TEST_F(CollectionMerger_test, nonexisting_input_collection___expect_SG_exception) {
+  std::string inputPropertyValue = "['inputPixelCollectionDoesntExist']";
+  std::string outputPropertyValue = "'outputPixelCollectionTest123'";
+  ASSERT_TRUE( m_alg->setProperty( "InputPixelHits",  inputPropertyValue).isSuccess()  );
+  ASSERT_TRUE( m_alg->setProperty( "OutputPixelHits", outputPropertyValue).isSuccess() );
+
+  ASSERT_TRUE( m_alg->initialize().isSuccess() );
+  ASSERT_THROW( m_alg->execute(), SG::ExcNullReadHandle );
+}
+
+
+TEST_F(CollectionMerger_test, mergeCollections_with_pointer_types___expect_merged_pointers_not_equal_to_input) {
+  std::vector<SG::ReadHandleKey<TestPointerHitCollection_t>> inputKeys{};
+  SG::WriteHandleKey<TestPointerHitCollection_t> outputKey{"outputPointerCollectionMergeTest"};
+  ASSERT_TRUE( outputKey.initialize().isSuccess() );
+
+  // create dummy input collections containing dummy data
+  auto inputTestDataA = CxxUtils::make_unique<TestPointerHitCollection_t>();
+  SG::WriteHandle<TestPointerHitCollection_t> inputTestDataHandleA{"inputPointerCollectionA"};
+  inputTestDataHandleA.record( std::move(inputTestDataA) );
+  auto* inputHitA1 = new ISFTesting::TestHit(1);
+  inputTestDataHandleA->push_back(inputHitA1);
+  auto* inputHitA2 = new ISFTesting::TestHit(20);
+  inputTestDataHandleA->push_back(inputHitA2);
+  auto* inputHitA3 = new ISFTesting::TestHit(5);
+  inputTestDataHandleA->push_back(inputHitA3);
+
+  auto inputTestDataB = CxxUtils::make_unique<TestPointerHitCollection_t>();
+  SG::WriteHandle<TestPointerHitCollection_t> inputTestDataHandleB{"inputPointerCollectionB"};
+  inputTestDataHandleB.record( std::move(inputTestDataB) );
+  auto* inputHitB1 = new ISFTesting::TestHit(50);
+  inputTestDataHandleB->push_back(inputHitB1);
+  auto* inputHitB2 = new ISFTesting::TestHit(1);
+  inputTestDataHandleB->push_back(inputHitB2);
+
+  // add inputCollections with test data to inputKeys for later merging
+  // ordering A, C, B is on purpose to test for unintended alphabetic ordering
+  inputKeys.emplace_back( "inputPointerCollectionA" );
+  inputKeys.emplace_back( "inputPointerCollectionB" );
+  ASSERT_TRUE( inputKeys.at(0).initialize().isSuccess() );
+  ASSERT_TRUE( inputKeys.at(1).initialize().isSuccess() );
+
+  // merge pointer collections
+  mergeCollections(inputKeys, outputKey);
+
+  // test "outputCollectionMergeTest" contents
+  SG::ReadHandleKey<TestPointerHitCollection_t> mergedCollectionKey{"outputPointerCollectionMergeTest"};
+  ASSERT_TRUE( mergedCollectionKey.initialize().isSuccess() );
+  SG::ReadHandle<TestPointerHitCollection_t> mergedCollectionHandle{mergedCollectionKey};
+
+  ASSERT_TRUE( mergedCollectionHandle.isValid() );
+  ASSERT_EQ( 3+2, mergedCollectionHandle->size() );
+
+  const auto* outputHit1 = (*mergedCollectionHandle)[0];  // inputPointerCollectionA
+  const auto* outputHit2 = (*mergedCollectionHandle)[1];  // inputPointerCollectionA
+  const auto* outputHit3 = (*mergedCollectionHandle)[2];  // inputPointerCollectionA
+  const auto* outputHit4 = (*mergedCollectionHandle)[3];  // inputPointerCollectionB
+  const auto* outputHit5 = (*mergedCollectionHandle)[4];  // inputPointerCollectionB
+
+  // check merged hit pointers are different from input (i.e. expect copies, not identities of input in output)
+  ASSERT_NE( inputHitA1, outputHit1 );  // inputPointerCollectionA
+  ASSERT_NE( inputHitA2, outputHit2 );  // inputPointerCollectionA
+  ASSERT_NE( inputHitA3, outputHit3 );  // inputPointerCollectionA
+  ASSERT_NE( inputHitB1, outputHit4 );  // inputPointerCollectionB
+  ASSERT_NE( inputHitB2, outputHit5 );  // inputPointerCollectionB
+
+  // check values of hits are copied
+  ASSERT_EQ( outputHit1->m_value, 1  );  // inputPointerCollectionA
+  ASSERT_EQ( outputHit2->m_value, 20 );  // inputPointerCollectionA
+  ASSERT_EQ( outputHit3->m_value, 5  );  // inputPointerCollectionA
+  ASSERT_EQ( outputHit4->m_value, 50 );  // inputPointerCollectionB
+  ASSERT_EQ( outputHit5->m_value, 1  );  // inputPointerCollectionB
+}
+
+
 } // <-- namespace ISFTesting
 
 
 CLASS_DEF (ISFTesting::TestHitCollection_t, 1234567890, 1)
+CLASS_DEF (ISFTesting::TestPointerHitCollection_t, 1234567891, 1)
 
 
 int main(int argc, char *argv[])
diff --git a/Simulation/ISF/ISF_Core/ISF_AthenaPool/cmt/requirements b/Simulation/ISF/ISF_Core/ISF_AthenaPool/cmt/requirements
deleted file mode 100644
index d274b52201ff8156551b5695a28d2a8b05fc1c99..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Core/ISF_AthenaPool/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package ISF_AthenaPool
-author <Elmar.Ritsch@cern.ch>
-
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Zdenek Hubacek <Zdenek.Hubacek@cern.ch>
-
-#Copy from RecAthenaPool, who knows what is really needed??...
-private
-
-use GaudiInterface       GaudiInterface-*           External
-use ISF_FastCaloSimEvent ISF_FastCaloSimEvent-*     Simulation/ISF/ISF_FastCaloSim
-
-public
-
-use AtlasPolicy          AtlasPolicy-*
-use AtlasSealCLHEP       AtlasSealCLHEP-*           Database -no_auto_imports
-use AthenaPoolUtilities  AthenaPoolUtilities-*      Database/AthenaPOOL
-
-
-branches isfAthenaPool src
-
-apply_pattern poolcnv typesWithNamespace="ISF_FCS_Parametrization::FCS_StepInfo \
-                                          ISF_FCS_Parametrization::FCS_StepInfoCollection" \
-   files=" -s=${ISF_FastCaloSimEvent_root}/ISF_FastCaloSimEvent FCS_StepInfoCollection.h "
diff --git a/Simulation/ISF/ISF_Core/ISF_Event/cmt/requirements b/Simulation/ISF/ISF_Core/ISF_Event/cmt/requirements
deleted file mode 100644
index f77a27e0b8dc188ae5d71cc2ce9fbef623796de2..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Core/ISF_Event/cmt/requirements
+++ /dev/null
@@ -1,32 +0,0 @@
-package ISF_Event
-author <Andreas.Salzburger@cern.ch>
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-public
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  AtlasPolicy                AtlasPolicy-*
-use  AtlasCLHEP                 AtlasCLHEP-*                    External
-use  AtlasHepMC                 AtlasHepMC-*                    External
-use  GaudiInterface             GaudiInterface-*                External
-use  BarcodeEvent               BarcodeEvent-*                  Simulation/Barcode
-use  AtlasDetDescr              AtlasDetDescr-*                 DetectorDescription
-use  GeoPrimitives              GeoPrimitives-*                 DetectorDescription
-use  TestTools                  TestTools-*                     AtlasTest 
-end_public
-
-private
-
-public
-
-library ISF_Event *.cxx
-apply_pattern installed_library
-
-apply_pattern UnitTest_run unit_test=ISFParticle
-
-private
-# un-comment the flags below to enable full debugging information in this package
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Core/ISF_Interfaces/cmt/requirements b/Simulation/ISF/ISF_Core/ISF_Interfaces/cmt/requirements
deleted file mode 100644
index c488ba99366a4083bee4c91719f226020f534684..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Core/ISF_Interfaces/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package ISF_Interfaces
-author <Andreas.Salzburger@cern.ch>
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-public
-use AtlasPolicy                 AtlasPolicy-*                   
-use AtlasCLHEP                  AtlasCLHEP-*                    External
-use GaudiInterface              GaudiInterface-*                External
-use AthenaKernel                AthenaKernel-*                  Control
-use AthenaBaseComps             AthenaBaseComps-*               Control
-use StoreGate                   StoreGate-*                     Control
-use ISF_Event                   ISF_Event-*                     Simulation/ISF/ISF_Core
-use BarcodeEvent                BarcodeEvent-*                  Simulation/Barcode
-use AtlasDetDescr               AtlasDetDescr-*                 DetectorDescription
-use GeoPrimitives               GeoPrimitives-*                 DetectorDescription
-
-public
-library ISF_Interfaces *.cxx
-apply_pattern installed_library
-
-#end_private
-
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/cmt/requirements b/Simulation/ISF/ISF_Core/ISF_Services/cmt/requirements
deleted file mode 100644
index 51a24f0e619dc69ddbf767a65f7af1c6f61cd5fb..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Core/ISF_Services/cmt/requirements
+++ /dev/null
@@ -1,61 +0,0 @@
-package ISF_Services
-
-#################################################################
-# public use statements
-use AtlasPolicy                   AtlasPolicy-*
-use GaudiInterface                GaudiInterface-*        External
-
-#################################################################
-# private use statements
-private
-
-use AthenaBaseComps               AthenaBaseComps-*       Control
-use AtlasDetDescr                 AtlasDetDescr-*         DetectorDescription
-use AtlasHepMC                    AtlasHepMC-*            External
-use AtlasROOT                     AtlasROOT-*             External
-use BarcodeEvent                  BarcodeEvent-*          Simulation/Barcode
-use BarcodeInterfaces             BarcodeInterfaces-*     Simulation/Barcode
-use GeneratorObjects              GeneratorObjects-*      Generators
-use G4AtlasInterfaces             G4AtlasInterfaces-*     Simulation/G4Atlas
-use InDetSimEvent                 InDetSimEvent-*         InnerDetector
-use ISF_Interfaces                ISF_Interfaces-*        Simulation/ISF/ISF_Core
-use ISF_Event                     ISF_Event-*             Simulation/ISF/ISF_Core
-use ISF_HepMC_Interfaces          ISF_HepMC_Interfaces-*  Simulation/ISF/ISF_HepMC
-use MuonSimEvent                  MuonSimEvent-*          MuonSpectrometer
-use PmbCxxUtils                   PmbCxxUtils-*           Tools
-use StoreGate                     StoreGate-*             Control
-use SubDetectorEnvelopes          SubDetectorEnvelopes-*  AtlasGeometryCommon
-use HepPDT                        *                       LCG_Interfaces
-use AtlasCLHEP                    AtlasCLHEP-*            External
-end_private
-
-public
-library ISF_Services *.cxx components/*.cxx
-apply_pattern declare_python_modules files="*.py"
-apply_pattern component_library
-
-# tests
-private
-pattern GTest_run \
-        application <unit_test>_test -group=$(whichGroup) ../test/<unit_test>_test.cxx <extra_sources> ; \
-        document athenarun_launcher <unit_test>_utest -group=$(whichGroup) \
-        athenarun_exe="'../${CMTCONFIG}/<unit_test>_test.exe'" \
-        athenarun_pre="'. ../cmt/setup.sh'" \
-        athenarun_out="' 2>&1 | tee <unit_test>_test.log'" \
-        athenarun_post="'../test/gtest_post_check.sh <unit_test>_test.log'" ; \
-        private ; \
-        macro_append <unit_test>_utest_dependencies " <unit_test>_test " ; \
-
-use AtlasGoogleTest      AtlasGoogleTest-*       External
-use TestTools            TestTools-*             AtlasTest
-use GeoPrimitives        GeoPrimitives-*         DetectorDescription
-apply_pattern GTest_run unit_test=InputConverter extra_sources=../src/InputConverter.cxx
-
-end_private
-
-
-private
-# use this to activate debug info in this package:
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-end_private
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py b/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py
index d813fd483fb09d5452009def8d38c2f8ac4099a0..69b712905a739354812410ee1f7b3f38c0b0ce05 100644
--- a/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py
+++ b/Simulation/ISF/ISF_Core/ISF_Services/python/ISF_ServicesConfig.py
@@ -19,7 +19,8 @@ def getParticleBrokerSvcNoOrdering(name="ISF_ParticleBrokerSvcNoOrdering", **kwa
     kwargs.setdefault('ValidateGeoIDs', ISF_Flags.ValidationMode())
     kwargs.setdefault('ValidationOutput', ISF_Flags.ValidationMode())
     kwargs.setdefault('ValidationStreamName', "ParticleBroker")
-    kwargs.setdefault('BarcodeService', ISF_Flags.BarcodeService())
+    from G4AtlasApps.SimFlags import simFlags
+    kwargs.setdefault('BarcodeService', simFlags.TruthStrategy.BarcodeServiceName())
     return CfgMgr.ISF__ParticleBrokerDynamicOnReadIn(name, **kwargs)
 
 def getParticleBrokerSvc(name="ISF_ParticleBrokerSvc", **kwargs):
@@ -95,12 +96,13 @@ def getLongLivedInputConverter(name="ISF_LongLivedInputConverter", **kwargs):
 #
 
 def getGenericTruthService(name="ISF_TruthService", **kwargs):
-    from ISF_Config.ISF_jobProperties import ISF_Flags
-    kwargs.setdefault('BarcodeSvc', ISF_Flags.BarcodeService())
+    from G4AtlasApps.SimFlags import simFlags
+    kwargs.setdefault('BarcodeSvc', simFlags.TruthStrategy.BarcodeServiceName())
     kwargs.setdefault('SkipIfNoChildren', True)
     kwargs.setdefault('SkipIfNoParentBarcode', True)
     kwargs.setdefault('ForceEndVtxInRegions', [])
     long_lived_simulators = ['LongLived', 'longLived']
+    from ISF_Config.ISF_jobProperties import ISF_Flags
     is_long_lived_simulation = any(x in ISF_Flags.Simulator() for x in long_lived_simulators) #FIXME this should be set in a nicer way.
     if is_long_lived_simulation:
         kwargs.setdefault('QuasiStableParticlesIncluded', True)
@@ -246,4 +248,4 @@ def getMC16TruthService(name="ISF_MC16TruthService", **kwargs):
     return getMC15aPlusTruthService(name, **kwargs)
 
 def getMC16LLPTruthService(name="ISF_MC16LLPTruthService", **kwargs):
-    return getMC15aPlusLLPTruthService(name, **kwargs)
\ No newline at end of file
+    return getMC15aPlusLLPTruthService(name, **kwargs)
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx
index 7e712640ddf90f1713e38a0a0956cac7db1927c5..0e3ce4da8f9852c9c0173b8fddc1d4213810ab5e 100644
--- a/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Services/src/InputConverter.cxx
@@ -39,11 +39,11 @@
 
 /** Constructor **/
 ISF::InputConverter::InputConverter(const std::string& name, ISvcLocator* svc)
-    : AthService(name,svc),
-      m_particlePropSvc("PartPropSvc",name),
-      m_particleDataTable(nullptr),
-      m_useGeneratedParticleMass(false),
-      m_genParticleFilters()
+    : AthService(name,svc)
+    , m_particlePropSvc("PartPropSvc",name)
+    , m_particleDataTable(nullptr)
+    , m_useGeneratedParticleMass(false)
+    , m_genParticleFilters(this)
 {
   // particle mass from particle data table?
   declareProperty("UseGeneratedParticleMass",
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx b/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx
index 9226cee223bdb538980ad2d2663ca99d89a9a04e..6229af776f1a8c737e8d40688dc4dac40227f927 100644
--- a/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Services/test/InputConverter_test.cxx
@@ -99,15 +99,6 @@ class InputConverter_test: public ::testing::Test {
   }
 
   virtual void TearDown() override {
-   // @TODO: for newer Gaudi versions (atlasoff rel 21+)
-    // an approach like this would be much cleaner
-    // than releasing the tools by hand in the individual
-    // test functions
-    //const auto tools = m_toolSvc->getTools();
-    //for (auto& tool: tools) {
-    //  ASSERT_TRUE( TearDownTool(tool).isSuccess() );
-    //}
-
     m_svcMgr->removeService(m_svc);
     ASSERT_TRUE( m_svc->finalize().isSuccess() );
     ASSERT_TRUE( m_svc->terminate().isSuccess() );
@@ -118,14 +109,6 @@ class InputConverter_test: public ::testing::Test {
     Gaudi::setInstance( static_cast<IAppMgrUI*>(nullptr)) ;
   }
 
-  MockFilterTool* SetUpMockFilterTool(const std::string& name) const {
-    IAlgTool* mockFilterITool = nullptr;
-    m_toolSvc->retrieveTool(name, mockFilterITool);
-
-    MockFilterTool* mockFilterTool = dynamic_cast<MockFilterTool*>(mockFilterITool);
-    return mockFilterTool;
-  }
-
   void ReleaseSmartIFComponent(IInterface* comp) {
     size_t finalRefCount = 1; // keep one reference for the SmartIF destructor
     for (size_t refCount = comp->refCount(); refCount>finalRefCount; refCount--) {
@@ -133,18 +116,6 @@ class InputConverter_test: public ::testing::Test {
     }
   }
 
-  // release given tool from the ToolService until it reaches a
-  // reference count of 1
-  StatusCode TearDownTool(IAlgTool* tool) const {
-    for (size_t refCount = tool->refCount(); refCount>0; refCount--) {
-      StatusCode sc = m_toolSvc->releaseTool(tool);
-      if ( !sc.isSuccess() ) {
-        return StatusCode::FAILURE;
-      }
-    }
-    return StatusCode::SUCCESS;
-  }
-
   //
   // accessors for private methods
   // NB: This works because InputConverter_test is a friend
@@ -160,6 +131,9 @@ class InputConverter_test: public ::testing::Test {
     return m_svc->passesFilters(std::forward<Args>(args)...);
   }
 
+  ToolHandleArray<ISF::IGenParticleFilter>& getGenParticleFilters() const {
+    return m_svc->m_genParticleFilters;
+  }
   //
   // protected member variables 
   //
@@ -360,11 +334,12 @@ TEST_F(InputConverter_test, passesFilters_empty_filters) {
 
 TEST_F(InputConverter_test, passesFilters_one_pass_filter) {
   // retrieve mockable GenParticleFilter tool and point InputConverter to the same instance
-  MockFilterTool* filterTool = SetUpMockFilterTool("ISFTesting::MockFilterTool/DummyFilter");
-  ASSERT_TRUE( filterTool );
   m_svc->setProperty("GenParticleFilters", "['ISFTesting::MockFilterTool/DummyFilter']");
   ASSERT_TRUE( m_svc->initialize().isSuccess() );
-
+  ToolHandleArray<ISF::IGenParticleFilter>& genParticleFilters = getGenParticleFilters();
+  ASSERT_EQ (genParticleFilters.size(), 1);
+  MockFilterTool* filterTool = dynamic_cast<MockFilterTool*>(&*(genParticleFilters[0]));
+  ASSERT_TRUE( filterTool );
   const HepMC::GenParticle genPart{};
   HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12);
   HepMC::GenParticle genPart2(mom,
@@ -373,21 +348,21 @@ TEST_F(InputConverter_test, passesFilters_one_pass_filter) {
                               );
 
   EXPECT_CALL(*filterTool, pass(genPart))
-      .Times(1)
-      .WillOnce(::testing::Return(true));
+             .Times(1)
+             .WillOnce(::testing::Return(true));
 
   ASSERT_TRUE( passesFilters(genPart) );
-
-  ASSERT_TRUE( TearDownTool(filterTool).isSuccess() );
 }
 
 
 TEST_F(InputConverter_test, passesFilters_one_nonpass_filter) {
   // retrieve mockable GenParticleFilter tool and point InputConverter to the same instance
-  MockFilterTool* filterTool = SetUpMockFilterTool("ISFTesting::MockFilterTool/DummyFilter");
-  ASSERT_TRUE( filterTool );
   m_svc->setProperty("GenParticleFilters", "['ISFTesting::MockFilterTool/DummyFilter']");
   ASSERT_TRUE( m_svc->initialize().isSuccess() );
+  ToolHandleArray<ISF::IGenParticleFilter>& genParticleFilters = getGenParticleFilters();
+  ASSERT_EQ (genParticleFilters.size(), 1);
+  MockFilterTool* filterTool = dynamic_cast<MockFilterTool*>(&*(genParticleFilters[0]));
+  ASSERT_TRUE( filterTool );
 
   const HepMC::GenParticle genPart{};
   HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12);
@@ -401,19 +376,19 @@ TEST_F(InputConverter_test, passesFilters_one_nonpass_filter) {
       .WillOnce(::testing::Return(false));
 
   ASSERT_FALSE( passesFilters(genPart) );
-
-  ASSERT_TRUE( TearDownTool(filterTool).isSuccess() );
 }
 
 
 TEST_F(InputConverter_test, passesFilters_two_filters) {
   // retrieve mockable GenParticleFilter tool and point InputConverter to the same instance
-  MockFilterTool* filterTool1 = SetUpMockFilterTool("ISFTesting::MockFilterTool/DummyFilterZ");
-  MockFilterTool* filterTool2 = SetUpMockFilterTool("ISFTesting::MockFilterTool/DummyFilterY");
-  ASSERT_TRUE( filterTool1 );
-  ASSERT_TRUE( filterTool2 );
   m_svc->setProperty("GenParticleFilters", "['ISFTesting::MockFilterTool/DummyFilterZ', 'ISFTesting::MockFilterTool/DummyFilterY']");
   ASSERT_TRUE( m_svc->initialize().isSuccess() );
+  ToolHandleArray<ISF::IGenParticleFilter>& genParticleFilters = getGenParticleFilters();
+  ASSERT_EQ (genParticleFilters.size(), 2);
+  MockFilterTool* filterTool1 = dynamic_cast<MockFilterTool*>(&*(genParticleFilters[0]));
+  ASSERT_TRUE( filterTool1 );
+  MockFilterTool* filterTool2 = dynamic_cast<MockFilterTool*>(&*(genParticleFilters[1]));
+  ASSERT_TRUE( filterTool2 );
 
   const HepMC::GenParticle genPart{};
   HepMC::FourVector mom(12.3, 45.6, 78.9, 0.12);
@@ -432,12 +407,6 @@ TEST_F(InputConverter_test, passesFilters_two_filters) {
 
   ASSERT_TRUE( passesFilters(genPart) );
 
-  // apparently it's our responsibility to reduce the reference
-  // counter to 0 to make sure the tools are properly destructed
-  ASSERT_TRUE( m_toolSvc->releaseTool(filterTool1).isSuccess() );
-  ASSERT_TRUE( m_toolSvc->releaseTool(filterTool1).isSuccess() );
-  ASSERT_TRUE( m_toolSvc->releaseTool(filterTool2).isSuccess() );
-  ASSERT_TRUE( m_toolSvc->releaseTool(filterTool2).isSuccess() );
 }
 
 } // <-- namespace ISFTesting
diff --git a/Simulation/ISF/ISF_Core/ISF_Tools/cmt/requirements b/Simulation/ISF/ISF_Core/ISF_Tools/cmt/requirements
deleted file mode 100644
index 2875067cbc5293fd545579bac91afd35c4412152..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Core/ISF_Tools/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package ISF_Tools
-author <Andreas.Salzburger@cern.ch>
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-#################################################################
-# public use statements
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*        External
-
-#################################################################
-# private use statements
-private
-use AthenaBaseComps             AthenaBaseComps-*       Control
-use AtlasDetDescr               AtlasDetDescr-*         DetectorDescription
-use BarcodeEvent                BarcodeEvent-*          Simulation/Barcode
-use BarcodeInterfaces           BarcodeInterfaces-*     Simulation/Barcode
-use ISF_Event                   ISF_Event-*             Simulation/ISF/ISF_Core
-use ISF_Interfaces              ISF_Interfaces-*        Simulation/ISF/ISF_Core
-use TrackRecord                 TrackRecord-*           Simulation/G4Sim
-
-public
-library ISF_Tools *.cxx components/*.cxx
-apply_pattern declare_python_modules files="*.py"
-apply_pattern component_library
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Core/ISF_Tools/python/ISF_ToolsConfig.py b/Simulation/ISF/ISF_Core/ISF_Tools/python/ISF_ToolsConfig.py
index 1da74979589125e971a2a6c4b58a8616203bd1c0..3c38a2c33b00f40c1c10c0131f291f0d9e4d824b 100644
--- a/Simulation/ISF/ISF_Core/ISF_Tools/python/ISF_ToolsConfig.py
+++ b/Simulation/ISF/ISF_Core/ISF_Tools/python/ISF_ToolsConfig.py
@@ -8,6 +8,7 @@ KG Tan, 17/06/2012
 from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,\
         getService,getServiceClone,getAlgorithm,getAlgorithmClone
 
+from AthenaCommon import CfgMgr
 from AthenaCommon.Constants import *  # FATAL,ERROR etc.
 from AthenaCommon.SystemOfUnits import *
 from AthenaCommon.DetFlags import DetFlags
@@ -16,9 +17,9 @@ from ISF_Config.ISF_jobProperties import ISF_Flags # IMPORTANT: Flags must be se
 
 
 def getParticleHelper(name="ISF_ParticleHelper", **kwargs):
-    kwargs.setdefault("BarcodeSvc"             , ISF_Flags.BarcodeService())
-    from ISF_Tools.ISF_ToolsConf import ISF__ParticleHelper
-    return ISF__ParticleHelper(name, **kwargs)
+    from G4AtlasApps.SimFlags import simFlags
+    kwargs.setdefault("BarcodeSvc"             , simFlags.TruthStrategy.BarcodeServiceName())
+    return CfgMgr.ISF__ParticleHelper(name, **kwargs)
 
 def getMemoryMonitor(name="ISF_MemoryMonitor", **kwargs):
     from ISF_Tools.ISF_ToolsConf import ISF__MemoryMonitoringTool
diff --git a/Simulation/ISF/ISF_Example/cmt/requirements b/Simulation/ISF/ISF_Example/cmt/requirements
deleted file mode 100644
index bd0791c07d9a37f44400cd9db1f9e3a345454590..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Example/cmt/requirements
+++ /dev/null
@@ -1,20 +0,0 @@
-package ISF_Example
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-private
-use AtlasPolicy                 AtlasPolicy-*
-
-private
-use TestPolicy                  TestPolicy-*
-apply_pattern validate_xml
-public
-
-apply_pattern declare_scripts files="../scripts/*.py"
-
-#macro ISF_Example_TestConfiguration "../test/ISF_Example_TestConfiguration.xml"
-#apply_pattern declare_runtime extras="../test/ISF_Example_TestConfiguration.xml"
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Simulation/ISF/ISF_Example/python/ISF_Metadata.py b/Simulation/ISF/ISF_Example/python/ISF_Metadata.py
index e1efc99b08ade023c2cc333ae58cefd3a84ebdbd..3cdcb33881492260c06010e4085309235453d773 100644
--- a/Simulation/ISF/ISF_Example/python/ISF_Metadata.py
+++ b/Simulation/ISF/ISF_Example/python/ISF_Metadata.py
@@ -92,6 +92,9 @@ def fillAtlasMetadata(dbFiller):
         ## Don't write out random number seeds or RunDict as metadata
         if sp in ("RandomSeedList", "RandomSeedOffset", "RunDict"):
             continue
+        ## Don't write out Tool and Service names
+        if sp in ("TruthService"):
+            continue
         ## Only store InitFunction names
         if sp in ("InitFunctions"):
             initfuncdict = dict()
@@ -152,7 +155,6 @@ def fillTestBeamMetadata(dbFiller):
 def fillISFMetadata(dbFiller):
     from ISF_Config.ISF_jobProperties import ISF_Flags
     dbFiller.addSimParam('Simulator', ISF_Flags.Simulator())
-    dbFiller.addSimParam('TruthStrategy', ISF_Flags.TruthStrategy())
 
 def createSimulationParametersMetadata():
     from IOVDbMetaDataTools import ParameterDbFiller
diff --git a/Simulation/ISF/ISF_Example/python/ISF_Output.py b/Simulation/ISF/ISF_Example/python/ISF_Output.py
index 513c2112f687e2783cdb8db265c980cb33044424..93163b6a9dd585650a9431f7d82f26118e3e8a04 100644
--- a/Simulation/ISF/ISF_Example/python/ISF_Output.py
+++ b/Simulation/ISF/ISF_Example/python/ISF_Output.py
@@ -70,6 +70,9 @@ def getHITSStreamItemList():
     ## TimingAlg
     hitsItemList +=["RecoTimingObj#EVNTtoHITS_timings"]
 
+    if 'G4UA::FastCaloSimParamActionTool' in simFlags.OptionalUserActionList.get_Value()['Step']:
+        hitsItemList +=["ISF_FCS_Parametrization::FCS_StepInfoCollection#MergedEventSteps"]
+
     ## add xAOD::TrackParticles output collection Parametric Simulation
     if simFlags.SimulationFlavour == "ParametricSimulation":
         hitsItemList +=["xAOD::TrackParticleContainer#*",
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionHistogram.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionHistogram.h
index 884455a7405b5694f733bf60a210f258bab5585d..a666bc5af7f56efee8407ab77440f6bae5a922ad 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionHistogram.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/ISF_FastCaloSimEvent/TFCS1DFunctionHistogram.h
@@ -28,7 +28,10 @@ class TFCS1DFunctionHistogram:public TFCS1DFunction
     double* histo_to_array(TH1*);
     double sample_from_histo(TH1* hist, double);
     double sample_from_histovalues(double);
-	
+
+    vector<float> get_HistoBorders() {return m_HistoBorders;};
+    vector<float> get_HistoContents()  {return m_HistoContents;};
+
   private:
 
     vector<float> m_HistoBorders;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionHistogram.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionHistogram.cxx
index e65f31ad14e299f53aaecabcf1626a705179eb9e..c187c2fb95e3b3f09eccc5b8fc1423a88748b9c6 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionHistogram.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCS1DFunctionHistogram.cxx
@@ -97,8 +97,7 @@ TH1* TFCS1DFunctionHistogram::vector_to_histo()
   for(int b=1;b<=h_out->GetNbinsX();b++)
     h_out->SetBinContent(b,m_HistoContents[b-1]);
 
-
-  delete bins;
+  delete[] bins;
 
   return h_out;
 
@@ -143,6 +142,12 @@ void TFCS1DFunctionHistogram::smart_rebin_loop(TH1* hist, int verbose, double cu
 
   cout<<"Info: Rebinned histogram has "<<h_output->GetNbinsX()<<" bins."<<endl;
 
+  //correct normalization (last bin content must be 1)
+  double sf=1.0/h_output->GetBinContent(h_output->GetNbinsX());
+  h_output->Scale(sf);
+
+  //store:
+
   for(int b=1;b<=h_output->GetNbinsX();b++)
     m_HistoContents.push_back(h_output->GetBinContent(b));
 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx
index 4d4e161b0df7b3266644002c1623418931ef2b36..1a810e8b4db0aab23e367d1ff2a092739b7cf7c9 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent/src/TFCSPCAEnergyParametrization.cxx
@@ -41,8 +41,6 @@ void TFCSPCAEnergyParametrization::simulate(TFCSSimulationState& simulstate,cons
   TVectorD*    LowerBounds   =m_LowerBounds[pcabin-1];
   std::vector<TFCS1DFunction*> cumulative=m_cumulative[pcabin-1];
 
-  if(verbose) std::cout<<"Gauss_means "<<Gauss_means<<std::endl;
-
   /*
     for(unsigned int i=0;i<CaloCell_ID_FCS::MaxSample;++i)
     simulstate.add_E(i,truth->Ekin()/CaloCell_ID_FCS::MaxSample);
@@ -66,13 +64,6 @@ void TFCSPCAEnergyParametrization::simulate(TFCSSimulationState& simulstate,cons
   double* vals_gauss_rms  =Gauss_rms->GetMatrixArray();
   double* vals_lowerBounds=LowerBounds->GetMatrixArray();
 
-  if(verbose)
-    {
-      std::cout<<"vals_gauss_means "<<vals_gauss_means<<" size "<<sizeof(vals_gauss_means)<<std::endl;
-      std::cout<<"vals_gauss_rms   "<<vals_gauss_rms<<std::endl;
-      std::cout<<"vals_lowerBounds "<<vals_lowerBounds<<std::endl;
-    }
-
   double *output_data = new double[layer.size()] ;
   double *input_data = new double[layer.size()]  ;
 
@@ -104,14 +95,20 @@ void TFCSPCAEnergyParametrization::simulate(TFCSSimulationState& simulstate,cons
 
       simdata[l]=cumulative[l]->rnd_to_fct(simdata_uniform[l]);
 
+      if(verbose)
+        std::cout<<"l "<<l<<" input_data[l] "<<input_data[l]<<" output_data[l] "<<output_data[l]<<" simdata_uniform[l] "<<simdata_uniform[l]<<" simdata[l] "<<simdata[l]<<std::endl;
+
       if(simdata[l]<0) simdata[l]=0;
       if(layer[l]!="totalE" && simdata[l]>1) simdata[l]=1;
       if(layer[l]!="totalE") sum_fraction+=simdata[l];
+
     }
 
   //RECSCALE SO THAT THE SUM GIVES 1
   double scale=1.0/sum_fraction;
 
+  if(verbose) std::cout<<" scale factor: "<<scale<<" sum_fraction "<<sum_fraction<<std::endl;
+
   sum_fraction=0.0;
 
   for(unsigned int l=0;l<layer.size();l++)
@@ -143,16 +140,6 @@ void TFCSPCAEnergyParametrization::simulate(TFCSSimulationState& simulstate,cons
       simulstate.set_E(s,energyfrac*total_energy);
     }
 
-
-  if(verbose)
-    {
-      std::cout<<"Result:"<<std::endl;
-      for(unsigned int l=0;l<layerNr.size();l++)
-        std::cout<<"  Energy fraction deposited in Layer "<<layerNr[l]<<" = "<<simdata_scaled[l]<<std::endl;
-      std::cout<<"  Sum of energy fractions = "<<sum_fraction<<std::endl;
-      std::cout<<"  Total Energy = "<<simulstate.E()<<" MeV "<<std::endl;
-    }
-
   delete Random3;
   // delete symCov;
   // delete EV;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimInterfaces/cmt/requirements b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimInterfaces/cmt/requirements
deleted file mode 100644
index 919f15900645468c7fdaf96a6ef3823cc5442490..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimInterfaces/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-package ISF_FastCaloSimInterfaces
-	
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-	
-use AtlasPolicy         AtlasPolicy-*
-
-################## public include ##############################
-use GaudiInterface      GaudiInterface-*             External
-
-# ISF
-use ISF_Event           ISF_Event-*                  Simulation/ISF/ISF_Core
-
-# use the following to compile with debug information
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-# Declare this package as a metalibrary for cmake in order to allow its clients access to
-# libraries and header files from packages that this one depends on. Transparent to CMT
-apply_pattern cmake_add_command command=metalibrary
\ No newline at end of file
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/FCAL_ChannelMap.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/FCAL_ChannelMap.h
index 49365dd83db4af3016b89fbbc49363413d21b8fd..3a7cb07efbbf6ff66df3f23e406bb91916fb015a 100755
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/FCAL_ChannelMap.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/FCAL_ChannelMap.h
@@ -5,7 +5,6 @@
 // ***************************************************************************
 // Liquid Argon FCAL detector description package
 // -----------------------------------------
-// Copyright (C) 1998 by ATLAS Collaboration
 //
 //
 // 10-Sep-2000 S.Simion   Handling of the FCAL read-out identifiers
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/ISF_HitAnalysis.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/ISF_HitAnalysis.h
index b92b9acff4dfc97aa5e08e373a422424be3a7407..47a0b7285d0d6c08364049a0177892226159e758 100755
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/ISF_HitAnalysis.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/ISF_FastCaloSimParametrization/ISF_HitAnalysis.h
@@ -159,41 +159,26 @@ class ISF_HitAnalysis : public AthAlgorithm {
    double m_ptruth_p;
    int m_pdgid;
 
-   std::vector<std::vector<double> >* m_TTC_entrance_eta;
-   std::vector<std::vector<double> >* m_TTC_entrance_phi;
-   std::vector<std::vector<double> >* m_TTC_entrance_r;
-   std::vector<std::vector<double> >* m_TTC_entrance_z;
-   std::vector<std::vector<double> >* m_TTC_back_eta;
-   std::vector<std::vector<double> >* m_TTC_back_phi;
-   std::vector<std::vector<double> >* m_TTC_back_r;
-   std::vector<std::vector<double> >* m_TTC_back_z;
-   std::vector<double>* m_TTC_IDCaloBoundary_eta;
-   std::vector<double>* m_TTC_IDCaloBoundary_phi;
-   std::vector<double>* m_TTC_IDCaloBoundary_r;
-   std::vector<double>* m_TTC_IDCaloBoundary_z;
-   std::vector<double>* m_TTC_Angle3D;
-   std::vector<double>* m_TTC_AngleEta;
-
-   std::vector<std::vector<double> >* m_newTTC_entrance_eta;
-   std::vector<std::vector<double> >* m_newTTC_entrance_phi;
-   std::vector<std::vector<double> >* m_newTTC_entrance_r;
-   std::vector<std::vector<double> >* m_newTTC_entrance_z;
-   std::vector<std::vector<double> >* m_newTTC_back_eta;
-   std::vector<std::vector<double> >* m_newTTC_back_phi;
-   std::vector<std::vector<double> >* m_newTTC_back_r;
-   std::vector<std::vector<double> >* m_newTTC_back_z;
-   std::vector<double>* m_newTTC_IDCaloBoundary_eta;
-   std::vector<double>* m_newTTC_IDCaloBoundary_phi;
-   std::vector<double>* m_newTTC_IDCaloBoundary_r;
-   std::vector<double>* m_newTTC_IDCaloBoundary_z;
-   std::vector<double>* m_newTTC_Angle3D;
-   std::vector<double>* m_newTTC_AngleEta;
+   std::vector<std::vector<float> >* m_newTTC_entrance_eta;
+   std::vector<std::vector<float> >* m_newTTC_entrance_phi;
+   std::vector<std::vector<float> >* m_newTTC_entrance_r;
+   std::vector<std::vector<float> >* m_newTTC_entrance_z;
+   std::vector<std::vector<float> >* m_newTTC_back_eta;
+   std::vector<std::vector<float> >* m_newTTC_back_phi;
+   std::vector<std::vector<float> >* m_newTTC_back_r;
+   std::vector<std::vector<float> >* m_newTTC_back_z;
+   std::vector<float>* m_newTTC_IDCaloBoundary_eta;
+   std::vector<float>* m_newTTC_IDCaloBoundary_phi;
+   std::vector<float>* m_newTTC_IDCaloBoundary_r;
+   std::vector<float>* m_newTTC_IDCaloBoundary_z;
+   std::vector<float>* m_newTTC_Angle3D;
+   std::vector<float>* m_newTTC_AngleEta;
 
    /** The new Extrapolator setup */
-   ToolHandle<Trk::ITimedExtrapolator>   m_extrapolator;
-   ToolHandle<ICaloSurfaceHelper>   m_caloSurfaceHelper;
-   mutable const Trk::TrackingVolume*  m_caloEntrance;
-   std::string                         m_caloEntranceName;
+   ToolHandle<Trk::ITimedExtrapolator>  m_extrapolator;
+   ToolHandle<ICaloSurfaceHelper>       m_caloSurfaceHelper;
+   mutable const Trk::TrackingVolume*   m_caloEntrance;
+   std::string                          m_caloEntranceName;
    // extrapolation through Calo
    std::vector<Trk::HitInfo>* caloHits(const HepMC::GenParticle& part ) const;
    Trk::PdgToParticleHypothesis        m_pdgToParticleHypothesis;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ISF_FastCaloSimParametrizationConfig.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ISF_FastCaloSimParametrizationConfig.py
index bc2faacb3a67ea52d195ce0224d5f5da16cd6ea4..290ae9ffb6665f19df4127738f4774ab44616eb1 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ISF_FastCaloSimParametrizationConfig.py
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ISF_FastCaloSimParametrizationConfig.py
@@ -1,16 +1,14 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
+
 """
 Tools configurations for ISF_FastCaloSimParametrization
 """
-
 from AthenaCommon import CfgMgr
 from AthenaCommon.Constants import *  # FATAL,ERROR etc.
 from AthenaCommon.SystemOfUnits import *
 from AthenaCommon.DetFlags import DetFlags
 
-
-
 def getFastCaloSimCaloExtrapolation(name="FastCaloSimCaloExtrapolation", **kwargs):
     from ISF_FastCaloSimParametrization.ISF_FastCaloSimParametrizationConf import FastCaloSimCaloExtrapolation
 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ISF_FastCaloSimParametrizationConfigDb.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ISF_FastCaloSimParametrizationConfigDb.py
index 99954c1e1b1e8b0ebfa4524cfcf4dd652de33229..add5acbb48a015c539655b8e739bb5ffc957e4d8 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ISF_FastCaloSimParametrizationConfigDb.py
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ISF_FastCaloSimParametrizationConfigDb.py
@@ -12,4 +12,3 @@ import AthenaCommon.SystemOfUnits as Units
 # Common tools, services and algorithms used by jobs
 addTool("ISF_FastCaloSimParametrization.ISF_FastCaloSimParametrizationConfig.getFastCaloSimCaloExtrapolation" , "FastCaloSimCaloExtrapolation"   )
 addTool("ISF_FastCaloSimParametrization.ISF_FastCaloSimParametrizationConfig.getFastCaloSimGeometryHelper" , "FastCaloSimGeometryHelper"   )
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ShowerShapeRegression.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ShowerShapeRegression.py
index 20804065fab6ce3df09ec51486c68e2b587814da..aab589e7bca1ee3c84628ba3330de3b3e9f63a49 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ShowerShapeRegression.py
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/python/ShowerShapeRegression.py
@@ -1,749 +1,749 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-__author__ = 'Christopher Bock - LMU'
-
-
-class ShowerShapeRegressor():
-    def __init__(self, root_file_name='ISF_HitAnalysispion.root', base_output_folder='RegressionOutput'):
-        """ Most of the important settings are configured/set within this function.
-
-        TODO: Make these options configurable via an external options file to ease the use of the script.
-        TODO: Make remaining hardcoded options configurable here.
-        """
-
-        self.neuron_type = 'tanh'   # linear does not work when fitting the efrac without log, seems to cause huge troubles somewhere
-
-        self.log_efrac = False
-
-        self.num_neurons = 10
-        self.root_file_name = root_file_name
-        self.base_output_folder = base_output_folder
-
-        self.truth_energy_threshold = 40000
-
-        self.check_output_folders()
-
-        self.etaphi_nbins = [400, 400]
-        self.etaphi_xrange = [-0.4, 0.4]
-        self.etaphi_yrange = [-0.4, 0.4]
-
-        self.cumulative_etaphi_nbins = [400, 400]
-        self.cumulative_etaphi_xrange = [-0.4, 0.4]
-        self.cumulative_etaphi_yrange = [-0.4, 0.4]
-
-        self.equidistant_binning = False
-
-        # self.etaphi_nbins = [200, 200]
-        # self.etaphi_xrange = [-0.2, 0.2]
-        # self.etaphi_yrange = [-0.2, 0.2]
-        #
-        # self.cumulative_etaphi_nbins = [200, 200]
-        # self.cumulative_etaphi_xrange = [-0.2, 0.2]
-        # self.cumulative_etaphi_yrange = [-0.2, 0.2]
-
-        self.eta_phi_efrac_hists = []
-
-        self.cumulated_events = 0
-        self.cumulated_events_threshold = 1000
-
-        self.layer_names = ["PreSamplerB", "EMB1", "EMB2", "EMB3",
-                            "PreSamplerE", "EME1", "EME2", "EME3",
-                            "HEC0", "HEC1", "HEC2", "HEC3",
-                            "TileBar0", "TileBar1", "TileBar2",
-                            "TileGap1", "TileGap2", "TileGap3",
-                            "TileExt0", "TileExt1", "TileExt2",
-                            "FCAL0", "FCAL1", "FCAL2"]
-
-        self.selected_layer = 13
-
-        # Trees needed for regression
-        self.cum_distribution_trees = None
-
-        from array import array
-        self.cum_eta_array = array('f', [0.])
-        self.cum_phi_array = array('f', [0.])
-        self.cum_r_array = array('f', [0.])
-        self.cum_efrac_array = array('f', [0.])
-
-        self.regression_method = 'MLP'
-        #self.regression_method = 'FDA_GA'
-
-        self.base_file_name = 'no_name'
-        self.mlp_base_file_name = 'no_name'
-        self.obtain_output_names()
-
-        self.do_regression = True
-
-    def initialize_cumulative_trees(self):
-        import ROOT
-        self.cum_distribution_trees = ROOT.TTree('cumulative_distributions',
-                                                 'Cumulative eta phi energy fraction distributions')
-
-        self.cum_distribution_trees.Branch('d_eta', self.cum_eta_array, 'd_eta/F')
-        self.cum_distribution_trees.Branch('d_phi', self.cum_phi_array, 'd_phi/F')
-        self.cum_distribution_trees.Branch('r', self.cum_r_array, 'r/F')
-        self.cum_distribution_trees.Branch('energy_fraction', self.cum_efrac_array, 'energy_fraction/F')
-
-        pass
-
-    def fill_regression_tree(self, cumulative_histogram):
-        """ Uses the supplied histogram to fill the regression tree with values. Depending on self.log_efrac the trees
-        are either filled with the logarithm of the energy fraction or with just the energy fraction.
-        """
-        import math
-
-        n_bins_x = cumulative_histogram.GetNbinsX()
-        n_bins_y = cumulative_histogram.GetNbinsY()
-
-        for x in xrange(n_bins_x + 1):
-            eta_value = cumulative_histogram.GetXaxis().GetBinCenter(x)
-            for y in xrange(n_bins_y + 1):
-                value = cumulative_histogram.GetBinContent(x, y)
-                if value <= 0:
-                    continue
-
-                phi_value = cumulative_histogram.GetYaxis().GetBinCenter(y)
-                r_value = math.sqrt(phi_value*phi_value + eta_value*eta_value)
-
-                if self.log_efrac:
-                    self.cum_efrac_array[0] = math.log(value)
-                else:
-                    self.cum_efrac_array[0] = value
-
-                self.cum_eta_array[0] = eta_value
-                self.cum_phi_array[0] = phi_value
-                self.cum_r_array[0] = r_value
-
-                self.cum_distribution_trees.Fill()
-
-        pass
-
-    def run_regression(self):
-        import ROOT
-
-        output_file = ROOT.TFile("%s.root" % self.mlp_base_file_name, "RECREATE")
-
-        factory = ROOT.TMVA.Factory(self.mlp_base_file_name, output_file, "!V:!Silent:!Color:DrawProgressBar")
-
-        factory.AddVariable("d_eta")
-        factory.AddVariable("d_phi")
-        factory.AddVariable("r")
-
-        factory.AddTarget("energy_fraction")
-
-        factory.AddRegressionTree(self.cum_distribution_trees, 1.0)
-
-        cut = ROOT.TCut('')
-
-        factory.PrepareTrainingAndTestTree(cut, 'nTrain_Regression=0:nTest_Regression=0:SplitMode=Random:NormMode=NumEvents:!V')
-
-        # Default: HiddenLayers=N+20
-        factory.BookMethod(ROOT.TMVA.Types.kMLP, "MLP",
-                           "!H:!V:VarTransform=Norm:NeuronType=%s:NCycles=20000:HiddenLayers=N+%i:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:!UseRegulator"
-                           % (self.neuron_type, self.num_neurons))
-
-        factory.TrainAllMethods()
-        factory.TestAllMethods()
-        factory.EvaluateAllMethods()
-
-        output_file.Close()
-
-        pass
-
-    def run(self):
-        """ This function iterates over all events and calls for each event the process_entry function. The event loop
-        breaks either once process_entry returns false or once all events in the input file have been processed.
-        """
-        import ROOT
-
-        print('--------------------------------------------')
-        print('Welcome to ShowerShapeRegressor.py')
-        print('Using %i neurons of type %s using log of efrac: %s' % (self.num_neurons, self.neuron_type,
-                                                                      str(self.log_efrac)))
-        print('--------------------------------------------')
-
-        self.obtain_output_names()
-
-        f = ROOT.TFile(self.root_file_name)
-        chain = ROOT.gDirectory.Get('ISF_HitAnalysis/CaloHitAna')
-        entries = chain.GetEntriesFast()
-
-        for current_entry in xrange(entries):
-            print(' Loading entry: %i' % current_entry)
-            j = chain.LoadTree(current_entry)
-            if j < 0:
-                break
-
-            # copy next entry into memory and verify
-            bites_read = chain.GetEntry(current_entry)
-            if bites_read <= 0:
-                continue
-
-            if not self.process_entry(chain, current_entry):
-                break
-
-        if len(self.eta_phi_efrac_hists) > 0:
-            self.create_output()
-
-        pass
-
-    def process_entry(self, chain, event_number):
-        """ This processes a single event in the chain. It first checks whether this event should be processed by
-        calling the take_event_into_account function. If this function returns true processing of this event continues
-        else the event will be skipped.
-        Only a single layer (self.selected_layer) will be processed. A histogram will be filled with the energy
-        distribution vs eta and phi. Corrections by the track to calo extrapolator will be applied here. Once all
-        events have been finished the histogram will be divided by its integral.
-        Once the desired number of events (self.cumulated_events_threshold) has been reached the self.create_output()
-        function will be called.
-        """
-        import ROOT
-
-        if not self.take_event_into_account(chain, event_number):
-            return True
-
-        num_hits = len(chain.HitX)
-
-        eta_phi_efrac_dist = ROOT.TH2D('eta_phi_efrac_dist_%i' % event_number, 'eta vs phi vs efrac',
-                                       self.cumulative_etaphi_nbins[0], self.cumulative_etaphi_xrange[0],
-                                       self.cumulative_etaphi_xrange[1], self.cumulative_etaphi_nbins[1],
-                                       self.cumulative_etaphi_yrange[0], self.cumulative_etaphi_yrange[1])
-        for i in xrange(num_hits):
-            layer_id = chain.HitSampling[i]
-
-            if not layer_id == self.selected_layer:
-                continue
-
-            pos = ROOT.TVector3(chain.HitX[i], chain.HitY[i], chain.HitZ[i])
-            eta = pos.PseudoRapidity()
-            phi = pos.Phi()
-
-            eta_correction = chain.TTC_entrance_eta[0][layer_id]
-            phi_correction = chain.TTC_entrance_phi[0][layer_id]
-
-            if eta_correction < -900:
-                eta_correction = 0
-                print('no valid eta_correction found')
-
-            if phi_correction < -900:
-                phi_correction = 0
-                print('no valid phi_correction found')
-
-            d_eta = eta - eta_correction
-            d_phi = self.phi_mpi_pi(phi - phi_correction)
-
-            eta_phi_efrac_dist.Fill(d_eta, d_phi, chain.HitE[i])
-
-        self.cumulated_events += 1
-
-        if eta_phi_efrac_dist.Integral() > 0:
-                eta_phi_efrac_dist.Scale(1.0/eta_phi_efrac_dist.Integral())
-
-        self.eta_phi_efrac_hists.append(eta_phi_efrac_dist)
-        if self.cumulated_events >= self.cumulated_events_threshold:
-            self.create_output()
-            return False
-
-        return True
-
-    def take_event_into_account(self, chain, event_number):
-        """ This function is used to filter events.
-        """
-        if chain.TruthE[0] < self.truth_energy_threshold:
-            print('  Pion does not pass energy threshold of %f skipping process_entry!' %
-                  self.truth_energy_threshold)
-            return False
-
-        return True
-
-    def create_output(self):
-        """ This function creates the average shower shape from all the energy fraction distributions and plots it. In
-        case self.do_regression is set to True, it will initialize the input trees used by TMVA (using
-        self.initialize_cumulative_trees), it will fill them (using self.fill_regression_tree) and run the regression
-        by calling self.run_regression. Once TMVA finished, regression test/control plots and our shower shape control
-        plots will be created.
-        """
-        import ROOT
-
-        cumulative_histogram = self.create_eta_phi_histogram(self.base_file_name, 'cumulative eta vs phi vs efrac')
-
-        if self.equidistant_binning:
-            for hist in self.eta_phi_efrac_hists:
-                cumulative_histogram.Add(hist)
-
-            if cumulative_histogram.Integral() > 0:
-                cumulative_histogram.Scale(1.0/cumulative_histogram.Integral())
-        else:
-            # first fill the cumulative histogram
-            x_axis = self.eta_phi_efrac_hists[0].GetXaxis()
-            n_bins_x = x_axis.GetNbins()
-
-            y_axis = self.eta_phi_efrac_hists[0].GetYaxis()
-            n_bins_y = y_axis.GetNbins()
-            for x_bin in xrange(n_bins_x + 1):
-                x_center = x_axis.GetBinCenter(x_bin)
-                for y_bin in xrange(n_bins_y + 1):
-                    y_center = x_axis.GetBinCenter(y_bin)
-                    for hist in self.eta_phi_efrac_hists:
-                        value = hist.GetBinContent(x_bin, y_bin)
-                        cumulative_histogram.Fill(x_center, y_center, value)
-
-            # now calculate the PDF
-            x_axis = cumulative_histogram.GetXaxis()
-            n_bins_x = x_axis.GetNbins()
-
-            y_axis = cumulative_histogram.GetYaxis()
-            n_bins_y = y_axis.GetNbins()
-            for x_bin in xrange(n_bins_x + 1):
-                x_bin_width = x_axis.GetBinWidth(x_bin)
-                for y_bin in xrange(n_bins_y + 1):
-                    y_bin_width = y_axis.GetBinWidth(y_bin)
-                    area = x_bin_width*y_bin_width
-
-                    cumulative_content = cumulative_histogram.GetBinContent(x_bin, y_bin) / area
-                    cumulative_histogram.SetBinContent(x_bin, y_bin, cumulative_content)
-
-            if cumulative_histogram.Integral() > 0:
-                cumulative_histogram.Scale(1.0/cumulative_histogram.Integral())
-
-        from os import path
-        cumulative_etaphi_file_name = path.join(self.base_output_folder, 'cumulative_eta_phi',
-                                                'average_shower_%s.pdf' % self.base_file_name)
-        cumulative_etaphi_root_file_name = path.join(self.base_output_folder, 'cumulative_eta_phi',
-                                                     '%s.root' % self.base_file_name)
-
-        root_file = ROOT.TFile(cumulative_etaphi_root_file_name, 'RECREATE')
-        root_file.cd()
-        self.plot_root_hist2d(cumulative_histogram.Clone(), cumulative_etaphi_file_name, '#eta', '#phi',
-                              root_file=root_file)
-        root_file.Write()
-        root_file.Close()
-
-        if self.do_regression:
-            if cumulative_histogram.Integral() > 0:
-                cumulative_histogram.Scale(1.0/cumulative_histogram.Integral())
-
-            self.initialize_cumulative_trees()
-            self.fill_regression_tree(cumulative_histogram)
-
-            self.run_regression()
-            self.plot_regression_control_plots()
-            self.shower_test_plot_tmva(cumulative_histogram)
-            self.shower_test_plot_tmva(cumulative_histogram, False)
-            self.shower_test_plot_getrandom2(cumulative_histogram)
-
-        for hist in self.eta_phi_efrac_hists:
-            hist.Delete()
-
-        self.eta_phi_efrac_hists = []
-        self.cumulated_events = 0
-
-        return
-
-    """
-    =========================================== Output Folder Functions ===============================================
-    The following are functions used to create the output folders and to obtain the names of the outputs.
-    ===================================================================================================================
-    """
-
-    @staticmethod
-    def check_folder(folder):
-        import os
-        from os import path
-        if not path.exists(folder):
-            print('Output folder %s does not exist, will try to create it.' % folder)
-            os.makedirs(folder)
-            if not path.exists(folder):
-                raise Exception('ERROR: Could not create output folder!')
-            else:
-                print('Basic output folder successfully created :)')
-
-    def check_output_folders(self):
-        from os import path
-        self.check_folder(self.base_output_folder)
-        self.check_folder(path.join(self.base_output_folder, 'cumulative_eta_phi'))
-        pass
-
-    def obtain_output_names(self):
-        ext = ''
-        if self.log_efrac:
-            ext = '_logEfrac'
-
-        eq_bin = ''
-        if self.equidistant_binning:
-            eq_bin = '_eqbin'
-
-        self.base_file_name = 'Evts%i_Lay%i_E%i_eta%.2f_PID%i%s' \
-                              % (self.cumulated_events_threshold, self.selected_layer, 50, 0.20, 211, eq_bin)
-        self.mlp_base_file_name = 'NN_reg%s_%s_NNeur%i_NT%s_%s' % (ext, self.regression_method, self.num_neurons,
-                                                                   self.neuron_type, self.base_file_name)
-
-    """
-    =============================================== Plot Functions ====================================================
-    The following functions  areused to create the plots. The "plot_regression_control_plots" function is a
-    reimplementation of a similar function found in TMVA's examples. It searches for TMVA's control plots inside the
-    root file and plots them.
-    ===================================================================================================================
-    """
-
-    def create_eta_phi_histogram(self, name, title):
-        """ This is a helper function to create the eta phi histograms either with equidistant or non-equidistant
-        binning depending on the settings. Please use this function to avoid code duplication.
-        """
-
-        import ROOT
-        if self.equidistant_binning:
-            eta_phi_histogram = ROOT.TH2D(name, title,
-                                          self.cumulative_etaphi_nbins[0], self.cumulative_etaphi_xrange[0],
-                                          self.cumulative_etaphi_xrange[1], self.cumulative_etaphi_nbins[1],
-                                          self.cumulative_etaphi_yrange[0], self.cumulative_etaphi_yrange[1])
-        else:
-            import array
-            x_binning = [-0.4, -0.1, -0.05, -0.04, -0.03, -0.02, -0.016, -0.014, -0.012, -0.01, -0.008, -0.006,
-                         -0.004, -0.002, 0, 0.002, 0.004, 0.006, 0.008, 0.01, 0.012, 0.014, 0.016, 0.02, 0.03, 0.04,
-                         0.05, 0.1, 0.4]
-            y_binning = x_binning
-
-            eta_phi_histogram = ROOT.TH2D(name, title,
-                                          len(x_binning) - 1, array.array('d', x_binning),
-                                          len(y_binning) - 1, array.array('d', y_binning))
-
-        return eta_phi_histogram
-
-    def shower_test_plot_getrandom2(self, histogram):
-        """ This function uses the input histogram's GetRandom2 function to draw random numbers according to the
-        distribution found in the input histogram and fills 50000 entries into a new histogram and in the end prints
-        it to a file.
-        """
-        import ROOT
-        from os import path
-        ROOT.gROOT.SetBatch(True)
-
-        ROOT.gStyle.SetNumberContours(999)
-
-        d_eta = ROOT.Double(0)
-        d_phi = ROOT.Double(0)
-
-        eta_phi_efrac_dist = self.create_eta_phi_histogram('shower_test_plot',
-                                                           'eta vs phi vs efrac - using TH2F::GetRandom2')
-
-        accepted_points = 0
-        accepted_points_target = 50000
-        while accepted_points < accepted_points_target:
-            histogram.GetRandom2(d_eta, d_phi)
-
-            eta_phi_efrac_dist.Fill(d_eta, d_phi, 1)
-            accepted_points += 1
-
-        if eta_phi_efrac_dist.Integral() > 0:
-            eta_phi_efrac_dist.Scale(1.0/eta_phi_efrac_dist.Integral())
-        self.plot_root_hist2d(eta_phi_efrac_dist,
-                              path.join(self.base_output_folder, '%s_th2f.pdf' % self.mlp_base_file_name), '#eta', '#phi')
-        self.difference_to_reference(histogram, eta_phi_efrac_dist,
-                                     path.join(self.base_output_folder, '%s_th2f_diff.pdf' % self.mlp_base_file_name),
-                                     '#eta', '#phi')
-
-        self.difference_to_reference(histogram, eta_phi_efrac_dist,
-                                     path.join(self.base_output_folder, '%s_th2f_diff_inf.pdf' % self.mlp_base_file_name),
-                                     '#eta', '#phi', inverted_ratio=True)
-
-        pass
-
-    def shower_test_plot_tmva(self, reference, randomize_pos=True):
-        """ This function uses the NN obtained by TMVA to plot the fitted shower shape and the ratio to the reference.
-        In case randomize_pos is set to true (which is the default), random positions (flat distributed) in the eta-phi
-        plane will drawn. The NN will be evaluated there and the value will be filled into the output histogram. This
-        method is faster than drawing a third random number and accepting the point based on whether this rnd number is
-        greater than the NN at this point or not.
-        If randomize_pos is set to false, a histogram will be filled by evaluating the NN at each point and filling the
-        value into the histogram.
-        """
-        import ROOT
-        import math
-        ROOT.gROOT.SetBatch(True)
-
-        ROOT.gStyle.SetNumberContours(999)
-
-        reader = ROOT.TMVA.Reader('!Color')
-
-        from array import array
-        d_eta = array('f', [0.])
-        d_phi = array('f', [0.])
-        r = array('f', [0])
-        reader.AddVariable('d_eta', d_eta)
-        reader.AddVariable('d_phi', d_phi)
-        reader.AddVariable('r', r)
-
-        from os import path
-        base_weight_name = self.mlp_base_file_name
-        method_name = self.regression_method
-        weight_file = path.join('weights', '%s_%s.weights.xml' % (base_weight_name, method_name))
-        reader.BookMVA(self.regression_method, weight_file)
-
-        ext = ''
-        if randomize_pos:
-            ext = ' rnd pos'
-
-        eta_phi_efrac_dist = self.create_eta_phi_histogram('shower_test_plot', 'eta vs phi vs efrac - using %s%s' %
-                                                           (self.regression_method, ext))
-        if randomize_pos:
-            accepted_points = 0
-            accepted_points_target = 50000
-            while accepted_points < accepted_points_target:
-                d_eta[0] = ROOT.gRandom.Rndm() - 0.5
-                d_phi[0] = ROOT.gRandom.Rndm() - 0.5
-                r[0] = math.sqrt(d_eta[0]*d_eta[0] + d_phi[0]*d_phi[0])
-
-                value = reader.EvaluateRegression(self.regression_method)[0]
-
-                if self.log_efrac:
-                    value = math.exp(value)
-
-                eta_phi_efrac_dist.Fill(d_eta[0], d_phi[0], value)
-                accepted_points += 1
-        else:
-            x_axis = reference.GetXaxis()
-            y_axis = reference.GetYaxis()
-            n_bins_x = x_axis.GetNbins()
-            n_bins_y = y_axis.GetNbins()
-            for x in xrange(n_bins_x + 1):
-                d_eta[0] = x_axis.GetBinCenter(x)
-                for y in xrange(n_bins_y + 1):
-                    d_phi[0] = y_axis.GetBinCenter(y)
-                    r[0] = math.sqrt(d_eta[0]*d_eta[0] + d_phi[0]*d_phi[0])
-
-                    value = reader.EvaluateRegression(self.regression_method)[0]
-
-                    if self.log_efrac:
-                        value = math.exp(value)
-
-                    eta_phi_efrac_dist.Fill(d_eta[0], d_phi[0], value)
-
-        if eta_phi_efrac_dist.Integral() > 0:
-            eta_phi_efrac_dist.Scale(1.0/eta_phi_efrac_dist.Integral())
-
-        if randomize_pos:
-            ext = '_rnd'
-
-        self.plot_root_hist2d(eta_phi_efrac_dist,
-                              path.join(self.base_output_folder, '%s%s.pdf' % (self.mlp_base_file_name, ext)),
-                              '#eta', '#phi')
-        self.difference_to_reference(reference, eta_phi_efrac_dist,
-                                     path.join(self.base_output_folder, '%s%s_diff.pdf' %
-                                               (self.mlp_base_file_name, ext)), '#eta', '#phi')
-
-        self.difference_to_reference(reference, eta_phi_efrac_dist,
-                                     path.join(self.base_output_folder, '%s%s_diff_inv.pdf' %
-                                               (self.mlp_base_file_name, ext)), '#eta', '#phi', inverted_ratio=True)
-
-        pass
-
-    def plot_regression_control_plots(self, file_name=None, show_target=False, compare_to_train=False):
-        """ This is a pythonic translation of the deviations function found in the TMVA examples.
-        """
-        import ROOT
-        ROOT.gROOT.SetBatch(True)
-
-        #ROOT.TMVA.TMVAGlob.Initialize(True)
-        ROOT.gStyle.SetNumberContours(999)
-
-        if not file_name:
-            file_name = '%s.root' % self.mlp_base_file_name
-        input_file = ROOT.TFile(file_name)
-
-        current_canvas = 0
-        for key in input_file.GetListOfKeys():
-            print('Key: %s' % key.GetName())
-
-            if not 'Method_' in key.GetName():
-                continue
-            if not ROOT.gROOT.GetClass(key.GetClassName()).InheritsFrom('TDirectory'):
-                continue
-
-            method_name = key.GetName().replace('Method_', '')
-
-            print('Now plotting control plots for method %s' % method_name)
-
-            directory = key.ReadObj()
-
-            for sub_method in directory.GetListOfKeys():
-                print('sub_method: %s' % sub_method.GetName())
-
-                if not ROOT.gROOT.GetClass(sub_method.GetClassName()).InheritsFrom('TDirectory'):
-                    continue
-
-                sub_method_name = sub_method.GetName()
-
-                print('Now plotting control plots for sub-method %s' % sub_method_name)
-
-                sub_directory = sub_method.ReadObj()
-
-                for plot_key in sub_directory.GetListOfKeys():
-                    print('plot_key: %s' % plot_key.GetName())
-
-                    plot_obj = plot_key.ReadObj()
-                    if isinstance(plot_obj, ROOT.TH2F):
-                        plot_name = plot_key.GetName()
-                        if not '_reg_' in plot_name:
-                            continue
-
-                        if not ((show_target and '_tgt' in plot_name) or
-                                (not show_target and (not '_tgt' in plot_name))):
-                            continue
-
-                        if not ((compare_to_train and 'train' in plot_name) or
-                                (not compare_to_train and 'test' in plot_name)):
-                            continue
-
-                        inortarg = 'input'
-                        type_string = 'test'
-                        if show_target:
-                            inortarg = 'target'
-
-                        if compare_to_train:
-                            type_string = 'training'
-
-                        canvas = ROOT.TCanvas('canvas_%i' % current_canvas,
-                                              'Regression output deviation versus %s for method %s' % (inortarg,
-                                              method_name), 800, 600)
-
-                        canvas.SetRightMargin(0.10)
-
-                        plot_obj.SetTitle('Output deviation for method: %s (%s sample)' % (sub_method_name,
-                                                                                           type_string))
-                        plot_obj.Draw('colz')
-
-                        line = ROOT.TLine(plot_obj.GetXaxis().GetXmin(), 0, plot_obj.GetXaxis().GetXmax(), 0)
-                        line.SetLineStyle(2)
-                        line.Draw()
-
-                        canvas.Update()
-
-                        import os
-                        output_name = os.path.join(self.base_output_folder, '%s_dev_%s_%s_%s_%i.pdf' %
-                                                   (self.mlp_base_file_name, method_name, inortarg, type_string,
-                                                    current_canvas))
-                        #ROOT.TMVAGlob.imgconv(canvas, output_name)
-                        canvas.Print(output_name, 'pdf')
-
-                        current_canvas += 1
-
-        pass
-
-    @staticmethod
-    def plot_root_hist2d(histogram, file_name='root_hist2d.pdf', x_label='X-Axis', y_label='Y-Axis',
-                         z_label='Probability', logscale=False, normalize=False, root_file=None):
-        import ROOT
-        ROOT.gROOT.SetBatch(True)
-        ROOT.gStyle.SetOptStat(1)
-
-        from os import path
-        ext = path.splitext(path.basename(file_name))[1]
-
-        canv = ROOT.TCanvas('canvas', 'test', 0, 0, 600, 600)
-        #canv.SetTopMargin(0.05)
-        #canv.SetLeftMargin(0.13)
-        canv.SetRightMargin(0.15)
-        #canv.SetBottomMargin(0.035)
-
-        if logscale:
-            canv.SetLogz()
-
-        if normalize:
-            integral = histogram.Integral()
-            if integral > 0:
-                histogram.Scale(1.0 / integral)
-
-        histogram.GetXaxis().SetTitle(x_label)
-        histogram.GetYaxis().SetTitle(y_label)
-        histogram.GetZaxis().SetTitle(z_label)
-
-        # histogram.GetYaxis().SetLabelSize(0.06)
-        # histogram.GetYaxis().SetLabelOffset(0.0015)
-        #
-        # histogram.GetYaxis().SetTitleSize(0.06)
-        # histogram.GetYaxis().SetTitleOffset(0.85)
-
-        histogram.Draw('COLZ')
-
-        canv.Update()
-        canv.Print(file_name, ext)
-
-        if root_file:
-            histogram.SetDirectory(root_file)
-            histogram.Write()
-
-        pass
-
-    """
-    ========================================== Utility Functions ======================================================
-    The following section will contain utility functions to ease some repetitive tasks. Those functions should be self-
-    explanatory.
-    ===================================================================================================================
-    """
-
-    def difference_to_reference(self, reference, histogram, output_name, x_label, y_label, inverted_ratio=False):
-        if inverted_ratio:
-            clone = reference.Clone(reference.GetName() + 'diff_to_ref_clone')
-            base = histogram
-        else:
-            clone = histogram.Clone(histogram.GetName() + 'diff_to_ref_clone')
-            base = reference
-
-        clone.Add(base, -1.0)
-        clone.Divide(base)
-
-        if inverted_ratio:
-            z_label = 'reference - output / output'
-        else:
-            z_label = 'output - reference / reference'
-
-        self.plot_root_hist2d(clone, output_name, x_label, y_label, z_label, logscale=True)
-
-        pass
-
-    def get_layer_name(self, layer_id):
-        if layer_id < 0 or layer_id >= len(self.layer_names):
-            return 'Unknown'
-        else:
-            return self.layer_names[layer_id]
-
-    @staticmethod
-    def phi_mpi_pi(phi):
-        import ROOT
-        pi = ROOT.TMath.Pi()
-        while phi >= pi:
-            phi -= pi
-        while phi < -pi:
-            phi += pi
-        return phi
-
-
-def run_reg(neuron_type, num_neurons):
-    plotter = ShowerShapeRegressor()
-
-    plotter.cumulated_events_threshold = 1000
-
-    plotter.neuron_type = neuron_type
-    plotter.num_neurons = num_neurons
-
-    plotter.log_efrac = True
-
-    plotter.run()
-
-    return
-
-
-if __name__ == "__main__":
-
-    #for nn in [5, 10, 15]:
-        #for nt in ['tanh', 'radial', 'sigmoid']:
-    run_reg('tanh', 5)
-
-    import time
-    from distutils import archive_util
-    # make_zipfile automagically adds the .zip extension
-    archive_util.make_zipfile('reg_out_%s' % (time.strftime("%y-%m-%d_%H-%M")),
-                              'RegressionOutput')
-    archive_util.make_zipfile('weights_%s' % (time.strftime("%y-%m-%d_%H-%M")),
-                              'weights')
\ No newline at end of file
+__author__ = 'Christopher Bock - LMU'
+
+
+class ShowerShapeRegressor():
+    def __init__(self, root_file_name='ISF_HitAnalysispion.root', base_output_folder='RegressionOutput'):
+        """ Most of the important settings are configured/set within this function.
+
+        TODO: Make these options configurable via an external options file to ease the use of the script.
+        TODO: Make remaining hardcoded options configurable here.
+        """
+
+        self.neuron_type = 'tanh'   # linear does not work when fitting the efrac without log, seems to cause huge troubles somewhere
+
+        self.log_efrac = False
+
+        self.num_neurons = 10
+        self.root_file_name = root_file_name
+        self.base_output_folder = base_output_folder
+
+        self.truth_energy_threshold = 40000
+
+        self.check_output_folders()
+
+        self.etaphi_nbins = [400, 400]
+        self.etaphi_xrange = [-0.4, 0.4]
+        self.etaphi_yrange = [-0.4, 0.4]
+
+        self.cumulative_etaphi_nbins = [400, 400]
+        self.cumulative_etaphi_xrange = [-0.4, 0.4]
+        self.cumulative_etaphi_yrange = [-0.4, 0.4]
+
+        self.equidistant_binning = False
+
+        # self.etaphi_nbins = [200, 200]
+        # self.etaphi_xrange = [-0.2, 0.2]
+        # self.etaphi_yrange = [-0.2, 0.2]
+        #
+        # self.cumulative_etaphi_nbins = [200, 200]
+        # self.cumulative_etaphi_xrange = [-0.2, 0.2]
+        # self.cumulative_etaphi_yrange = [-0.2, 0.2]
+
+        self.eta_phi_efrac_hists = []
+
+        self.cumulated_events = 0
+        self.cumulated_events_threshold = 1000
+
+        self.layer_names = ["PreSamplerB", "EMB1", "EMB2", "EMB3",
+                            "PreSamplerE", "EME1", "EME2", "EME3",
+                            "HEC0", "HEC1", "HEC2", "HEC3",
+                            "TileBar0", "TileBar1", "TileBar2",
+                            "TileGap1", "TileGap2", "TileGap3",
+                            "TileExt0", "TileExt1", "TileExt2",
+                            "FCAL0", "FCAL1", "FCAL2"]
+
+        self.selected_layer = 13
+
+        # Trees needed for regression
+        self.cum_distribution_trees = None
+
+        from array import array
+        self.cum_eta_array = array('f', [0.])
+        self.cum_phi_array = array('f', [0.])
+        self.cum_r_array = array('f', [0.])
+        self.cum_efrac_array = array('f', [0.])
+
+        self.regression_method = 'MLP'
+        #self.regression_method = 'FDA_GA'
+
+        self.base_file_name = 'no_name'
+        self.mlp_base_file_name = 'no_name'
+        self.obtain_output_names()
+
+        self.do_regression = True
+
+    def initialize_cumulative_trees(self):
+        import ROOT
+        self.cum_distribution_trees = ROOT.TTree('cumulative_distributions',
+                                                 'Cumulative eta phi energy fraction distributions')
+
+        self.cum_distribution_trees.Branch('d_eta', self.cum_eta_array, 'd_eta/F')
+        self.cum_distribution_trees.Branch('d_phi', self.cum_phi_array, 'd_phi/F')
+        self.cum_distribution_trees.Branch('r', self.cum_r_array, 'r/F')
+        self.cum_distribution_trees.Branch('energy_fraction', self.cum_efrac_array, 'energy_fraction/F')
+
+        pass
+
+    def fill_regression_tree(self, cumulative_histogram):
+        """ Uses the supplied histogram to fill the regression tree with values. Depending on self.log_efrac the trees
+        are either filled with the logarithm of the energy fraction or with just the energy fraction.
+        """
+        import math
+
+        n_bins_x = cumulative_histogram.GetNbinsX()
+        n_bins_y = cumulative_histogram.GetNbinsY()
+
+        for x in xrange(n_bins_x + 1):
+            eta_value = cumulative_histogram.GetXaxis().GetBinCenter(x)
+            for y in xrange(n_bins_y + 1):
+                value = cumulative_histogram.GetBinContent(x, y)
+                if value <= 0:
+                    continue
+
+                phi_value = cumulative_histogram.GetYaxis().GetBinCenter(y)
+                r_value = math.sqrt(phi_value*phi_value + eta_value*eta_value)
+
+                if self.log_efrac:
+                    self.cum_efrac_array[0] = math.log(value)
+                else:
+                    self.cum_efrac_array[0] = value
+
+                self.cum_eta_array[0] = eta_value
+                self.cum_phi_array[0] = phi_value
+                self.cum_r_array[0] = r_value
+
+                self.cum_distribution_trees.Fill()
+
+        pass
+
+    def run_regression(self):
+        import ROOT
+
+        output_file = ROOT.TFile("%s.root" % self.mlp_base_file_name, "RECREATE")
+
+        factory = ROOT.TMVA.Factory(self.mlp_base_file_name, output_file, "!V:!Silent:!Color:DrawProgressBar")
+
+        factory.AddVariable("d_eta")
+        factory.AddVariable("d_phi")
+        factory.AddVariable("r")
+
+        factory.AddTarget("energy_fraction")
+
+        factory.AddRegressionTree(self.cum_distribution_trees, 1.0)
+
+        cut = ROOT.TCut('')
+
+        factory.PrepareTrainingAndTestTree(cut, 'nTrain_Regression=0:nTest_Regression=0:SplitMode=Random:NormMode=NumEvents:!V')
+
+        # Default: HiddenLayers=N+20
+        factory.BookMethod(ROOT.TMVA.Types.kMLP, "MLP",
+                           "!H:!V:VarTransform=Norm:NeuronType=%s:NCycles=20000:HiddenLayers=N+%i:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=15:!UseRegulator"
+                           % (self.neuron_type, self.num_neurons))
+
+        factory.TrainAllMethods()
+        factory.TestAllMethods()
+        factory.EvaluateAllMethods()
+
+        output_file.Close()
+
+        pass
+
+    def run(self):
+        """ This function iterates over all events and calls for each event the process_entry function. The event loop
+        breaks either once process_entry returns false or once all events in the input file have been processed.
+        """
+        import ROOT
+
+        print('--------------------------------------------')
+        print('Welcome to ShowerShapeRegressor.py')
+        print('Using %i neurons of type %s using log of efrac: %s' % (self.num_neurons, self.neuron_type,
+                                                                      str(self.log_efrac)))
+        print('--------------------------------------------')
+
+        self.obtain_output_names()
+
+        f = ROOT.TFile(self.root_file_name)
+        chain = ROOT.gDirectory.Get('ISF_HitAnalysis/CaloHitAna')
+        entries = chain.GetEntriesFast()
+
+        for current_entry in xrange(entries):
+            print(' Loading entry: %i' % current_entry)
+            j = chain.LoadTree(current_entry)
+            if j < 0:
+                break
+
+            # copy next entry into memory and verify
+            bites_read = chain.GetEntry(current_entry)
+            if bites_read <= 0:
+                continue
+
+            if not self.process_entry(chain, current_entry):
+                break
+
+        if len(self.eta_phi_efrac_hists) > 0:
+            self.create_output()
+
+        pass
+
+    def process_entry(self, chain, event_number):
+        """ This processes a single event in the chain. It first checks whether this event should be processed by
+        calling the take_event_into_account function. If this function returns true processing of this event continues
+        else the event will be skipped.
+        Only a single layer (self.selected_layer) will be processed. A histogram will be filled with the energy
+        distribution vs eta and phi. Corrections by the track to calo extrapolator will be applied here. Once all
+        events have been finished the histogram will be divided by its integral.
+        Once the desired number of events (self.cumulated_events_threshold) has been reached the self.create_output()
+        function will be called.
+        """
+        import ROOT
+
+        if not self.take_event_into_account(chain, event_number):
+            return True
+
+        num_hits = len(chain.HitX)
+
+        eta_phi_efrac_dist = ROOT.TH2D('eta_phi_efrac_dist_%i' % event_number, 'eta vs phi vs efrac',
+                                       self.cumulative_etaphi_nbins[0], self.cumulative_etaphi_xrange[0],
+                                       self.cumulative_etaphi_xrange[1], self.cumulative_etaphi_nbins[1],
+                                       self.cumulative_etaphi_yrange[0], self.cumulative_etaphi_yrange[1])
+        for i in xrange(num_hits):
+            layer_id = chain.HitSampling[i]
+
+            if not layer_id == self.selected_layer:
+                continue
+
+            pos = ROOT.TVector3(chain.HitX[i], chain.HitY[i], chain.HitZ[i])
+            eta = pos.PseudoRapidity()
+            phi = pos.Phi()
+
+            eta_correction = chain.TTC_entrance_eta[0][layer_id]
+            phi_correction = chain.TTC_entrance_phi[0][layer_id]
+
+            if eta_correction < -900:
+                eta_correction = 0
+                print('no valid eta_correction found')
+
+            if phi_correction < -900:
+                phi_correction = 0
+                print('no valid phi_correction found')
+
+            d_eta = eta - eta_correction
+            d_phi = self.phi_mpi_pi(phi - phi_correction)
+
+            eta_phi_efrac_dist.Fill(d_eta, d_phi, chain.HitE[i])
+
+        self.cumulated_events += 1
+
+        if eta_phi_efrac_dist.Integral() > 0:
+                eta_phi_efrac_dist.Scale(1.0/eta_phi_efrac_dist.Integral())
+
+        self.eta_phi_efrac_hists.append(eta_phi_efrac_dist)
+        if self.cumulated_events >= self.cumulated_events_threshold:
+            self.create_output()
+            return False
+
+        return True
+
+    def take_event_into_account(self, chain, event_number):
+        """ This function is used to filter events.
+        """
+        if chain.TruthE[0] < self.truth_energy_threshold:
+            print('  Pion does not pass energy threshold of %f skipping process_entry!' %
+                  self.truth_energy_threshold)
+            return False
+
+        return True
+
+    def create_output(self):
+        """ This function creates the average shower shape from all the energy fraction distributions and plots it. In
+        case self.do_regression is set to True, it will initialize the input trees used by TMVA (using
+        self.initialize_cumulative_trees), it will fill them (using self.fill_regression_tree) and run the regression
+        by calling self.run_regression. Once TMVA finished, regression test/control plots and our shower shape control
+        plots will be created.
+        """
+        import ROOT
+
+        cumulative_histogram = self.create_eta_phi_histogram(self.base_file_name, 'cumulative eta vs phi vs efrac')
+
+        if self.equidistant_binning:
+            for hist in self.eta_phi_efrac_hists:
+                cumulative_histogram.Add(hist)
+
+            if cumulative_histogram.Integral() > 0:
+                cumulative_histogram.Scale(1.0/cumulative_histogram.Integral())
+        else:
+            # first fill the cumulative histogram
+            x_axis = self.eta_phi_efrac_hists[0].GetXaxis()
+            n_bins_x = x_axis.GetNbins()
+
+            y_axis = self.eta_phi_efrac_hists[0].GetYaxis()
+            n_bins_y = y_axis.GetNbins()
+            for x_bin in xrange(n_bins_x + 1):
+                x_center = x_axis.GetBinCenter(x_bin)
+                for y_bin in xrange(n_bins_y + 1):
+                    y_center = x_axis.GetBinCenter(y_bin)
+                    for hist in self.eta_phi_efrac_hists:
+                        value = hist.GetBinContent(x_bin, y_bin)
+                        cumulative_histogram.Fill(x_center, y_center, value)
+
+            # now calculate the PDF
+            x_axis = cumulative_histogram.GetXaxis()
+            n_bins_x = x_axis.GetNbins()
+
+            y_axis = cumulative_histogram.GetYaxis()
+            n_bins_y = y_axis.GetNbins()
+            for x_bin in xrange(n_bins_x + 1):
+                x_bin_width = x_axis.GetBinWidth(x_bin)
+                for y_bin in xrange(n_bins_y + 1):
+                    y_bin_width = y_axis.GetBinWidth(y_bin)
+                    area = x_bin_width*y_bin_width
+
+                    cumulative_content = cumulative_histogram.GetBinContent(x_bin, y_bin) / area
+                    cumulative_histogram.SetBinContent(x_bin, y_bin, cumulative_content)
+
+            if cumulative_histogram.Integral() > 0:
+                cumulative_histogram.Scale(1.0/cumulative_histogram.Integral())
+
+        from os import path
+        cumulative_etaphi_file_name = path.join(self.base_output_folder, 'cumulative_eta_phi',
+                                                'average_shower_%s.pdf' % self.base_file_name)
+        cumulative_etaphi_root_file_name = path.join(self.base_output_folder, 'cumulative_eta_phi',
+                                                     '%s.root' % self.base_file_name)
+
+        root_file = ROOT.TFile(cumulative_etaphi_root_file_name, 'RECREATE')
+        root_file.cd()
+        self.plot_root_hist2d(cumulative_histogram.Clone(), cumulative_etaphi_file_name, '#eta', '#phi',
+                              root_file=root_file)
+        root_file.Write()
+        root_file.Close()
+
+        if self.do_regression:
+            if cumulative_histogram.Integral() > 0:
+                cumulative_histogram.Scale(1.0/cumulative_histogram.Integral())
+
+            self.initialize_cumulative_trees()
+            self.fill_regression_tree(cumulative_histogram)
+
+            self.run_regression()
+            self.plot_regression_control_plots()
+            self.shower_test_plot_tmva(cumulative_histogram)
+            self.shower_test_plot_tmva(cumulative_histogram, False)
+            self.shower_test_plot_getrandom2(cumulative_histogram)
+
+        for hist in self.eta_phi_efrac_hists:
+            hist.Delete()
+
+        self.eta_phi_efrac_hists = []
+        self.cumulated_events = 0
+
+        return
+
+    """
+    =========================================== Output Folder Functions ===============================================
+    The following are functions used to create the output folders and to obtain the names of the outputs.
+    ===================================================================================================================
+    """
+
+    @staticmethod
+    def check_folder(folder):
+        import os
+        from os import path
+        if not path.exists(folder):
+            print('Output folder %s does not exist, will try to create it.' % folder)
+            os.makedirs(folder)
+            if not path.exists(folder):
+                raise Exception('ERROR: Could not create output folder!')
+            else:
+                print('Basic output folder successfully created :)')
+
+    def check_output_folders(self):
+        from os import path
+        self.check_folder(self.base_output_folder)
+        self.check_folder(path.join(self.base_output_folder, 'cumulative_eta_phi'))
+        pass
+
+    def obtain_output_names(self):
+        ext = ''
+        if self.log_efrac:
+            ext = '_logEfrac'
+
+        eq_bin = ''
+        if self.equidistant_binning:
+            eq_bin = '_eqbin'
+
+        self.base_file_name = 'Evts%i_Lay%i_E%i_eta%.2f_PID%i%s' \
+                              % (self.cumulated_events_threshold, self.selected_layer, 50, 0.20, 211, eq_bin)
+        self.mlp_base_file_name = 'NN_reg%s_%s_NNeur%i_NT%s_%s' % (ext, self.regression_method, self.num_neurons,
+                                                                   self.neuron_type, self.base_file_name)
+
+    """
+    =============================================== Plot Functions ====================================================
+    The following functions  areused to create the plots. The "plot_regression_control_plots" function is a
+    reimplementation of a similar function found in TMVA's examples. It searches for TMVA's control plots inside the
+    root file and plots them.
+    ===================================================================================================================
+    """
+
+    def create_eta_phi_histogram(self, name, title):
+        """ This is a helper function to create the eta phi histograms either with equidistant or non-equidistant
+        binning depending on the settings. Please use this function to avoid code duplication.
+        """
+
+        import ROOT
+        if self.equidistant_binning:
+            eta_phi_histogram = ROOT.TH2D(name, title,
+                                          self.cumulative_etaphi_nbins[0], self.cumulative_etaphi_xrange[0],
+                                          self.cumulative_etaphi_xrange[1], self.cumulative_etaphi_nbins[1],
+                                          self.cumulative_etaphi_yrange[0], self.cumulative_etaphi_yrange[1])
+        else:
+            import array
+            x_binning = [-0.4, -0.1, -0.05, -0.04, -0.03, -0.02, -0.016, -0.014, -0.012, -0.01, -0.008, -0.006,
+                         -0.004, -0.002, 0, 0.002, 0.004, 0.006, 0.008, 0.01, 0.012, 0.014, 0.016, 0.02, 0.03, 0.04,
+                         0.05, 0.1, 0.4]
+            y_binning = x_binning
+
+            eta_phi_histogram = ROOT.TH2D(name, title,
+                                          len(x_binning) - 1, array.array('d', x_binning),
+                                          len(y_binning) - 1, array.array('d', y_binning))
+
+        return eta_phi_histogram
+
+    def shower_test_plot_getrandom2(self, histogram):
+        """ This function uses the input histogram's GetRandom2 function to draw random numbers according to the
+        distribution found in the input histogram and fills 50000 entries into a new histogram and in the end prints
+        it to a file.
+        """
+        import ROOT
+        from os import path
+        ROOT.gROOT.SetBatch(True)
+
+        ROOT.gStyle.SetNumberContours(999)
+
+        d_eta = ROOT.Double(0)
+        d_phi = ROOT.Double(0)
+
+        eta_phi_efrac_dist = self.create_eta_phi_histogram('shower_test_plot',
+                                                           'eta vs phi vs efrac - using TH2F::GetRandom2')
+
+        accepted_points = 0
+        accepted_points_target = 50000
+        while accepted_points < accepted_points_target:
+            histogram.GetRandom2(d_eta, d_phi)
+
+            eta_phi_efrac_dist.Fill(d_eta, d_phi, 1)
+            accepted_points += 1
+
+        if eta_phi_efrac_dist.Integral() > 0:
+            eta_phi_efrac_dist.Scale(1.0/eta_phi_efrac_dist.Integral())
+        self.plot_root_hist2d(eta_phi_efrac_dist,
+                              path.join(self.base_output_folder, '%s_th2f.pdf' % self.mlp_base_file_name), '#eta', '#phi')
+        self.difference_to_reference(histogram, eta_phi_efrac_dist,
+                                     path.join(self.base_output_folder, '%s_th2f_diff.pdf' % self.mlp_base_file_name),
+                                     '#eta', '#phi')
+
+        self.difference_to_reference(histogram, eta_phi_efrac_dist,
+                                     path.join(self.base_output_folder, '%s_th2f_diff_inf.pdf' % self.mlp_base_file_name),
+                                     '#eta', '#phi', inverted_ratio=True)
+
+        pass
+
+    def shower_test_plot_tmva(self, reference, randomize_pos=True):
+        """ This function uses the NN obtained by TMVA to plot the fitted shower shape and the ratio to the reference.
+        In case randomize_pos is set to true (which is the default), random positions (flat distributed) in the eta-phi
+        plane will drawn. The NN will be evaluated there and the value will be filled into the output histogram. This
+        method is faster than drawing a third random number and accepting the point based on whether this rnd number is
+        greater than the NN at this point or not.
+        If randomize_pos is set to false, a histogram will be filled by evaluating the NN at each point and filling the
+        value into the histogram.
+        """
+        import ROOT
+        import math
+        ROOT.gROOT.SetBatch(True)
+
+        ROOT.gStyle.SetNumberContours(999)
+
+        reader = ROOT.TMVA.Reader('!Color')
+
+        from array import array
+        d_eta = array('f', [0.])
+        d_phi = array('f', [0.])
+        r = array('f', [0])
+        reader.AddVariable('d_eta', d_eta)
+        reader.AddVariable('d_phi', d_phi)
+        reader.AddVariable('r', r)
+
+        from os import path
+        base_weight_name = self.mlp_base_file_name
+        method_name = self.regression_method
+        weight_file = path.join('weights', '%s_%s.weights.xml' % (base_weight_name, method_name))
+        reader.BookMVA(self.regression_method, weight_file)
+
+        ext = ''
+        if randomize_pos:
+            ext = ' rnd pos'
+
+        eta_phi_efrac_dist = self.create_eta_phi_histogram('shower_test_plot', 'eta vs phi vs efrac - using %s%s' %
+                                                           (self.regression_method, ext))
+        if randomize_pos:
+            accepted_points = 0
+            accepted_points_target = 50000
+            while accepted_points < accepted_points_target:
+                d_eta[0] = ROOT.gRandom.Rndm() - 0.5
+                d_phi[0] = ROOT.gRandom.Rndm() - 0.5
+                r[0] = math.sqrt(d_eta[0]*d_eta[0] + d_phi[0]*d_phi[0])
+
+                value = reader.EvaluateRegression(self.regression_method)[0]
+
+                if self.log_efrac:
+                    value = math.exp(value)
+
+                eta_phi_efrac_dist.Fill(d_eta[0], d_phi[0], value)
+                accepted_points += 1
+        else:
+            x_axis = reference.GetXaxis()
+            y_axis = reference.GetYaxis()
+            n_bins_x = x_axis.GetNbins()
+            n_bins_y = y_axis.GetNbins()
+            for x in xrange(n_bins_x + 1):
+                d_eta[0] = x_axis.GetBinCenter(x)
+                for y in xrange(n_bins_y + 1):
+                    d_phi[0] = y_axis.GetBinCenter(y)
+                    r[0] = math.sqrt(d_eta[0]*d_eta[0] + d_phi[0]*d_phi[0])
+
+                    value = reader.EvaluateRegression(self.regression_method)[0]
+
+                    if self.log_efrac:
+                        value = math.exp(value)
+
+                    eta_phi_efrac_dist.Fill(d_eta[0], d_phi[0], value)
+
+        if eta_phi_efrac_dist.Integral() > 0:
+            eta_phi_efrac_dist.Scale(1.0/eta_phi_efrac_dist.Integral())
+
+        if randomize_pos:
+            ext = '_rnd'
+
+        self.plot_root_hist2d(eta_phi_efrac_dist,
+                              path.join(self.base_output_folder, '%s%s.pdf' % (self.mlp_base_file_name, ext)),
+                              '#eta', '#phi')
+        self.difference_to_reference(reference, eta_phi_efrac_dist,
+                                     path.join(self.base_output_folder, '%s%s_diff.pdf' %
+                                               (self.mlp_base_file_name, ext)), '#eta', '#phi')
+
+        self.difference_to_reference(reference, eta_phi_efrac_dist,
+                                     path.join(self.base_output_folder, '%s%s_diff_inv.pdf' %
+                                               (self.mlp_base_file_name, ext)), '#eta', '#phi', inverted_ratio=True)
+
+        pass
+
+    def plot_regression_control_plots(self, file_name=None, show_target=False, compare_to_train=False):
+        """ This is a pythonic translation of the deviations function found in the TMVA examples.
+        """
+        import ROOT
+        ROOT.gROOT.SetBatch(True)
+
+        #ROOT.TMVA.TMVAGlob.Initialize(True)
+        ROOT.gStyle.SetNumberContours(999)
+
+        if not file_name:
+            file_name = '%s.root' % self.mlp_base_file_name
+        input_file = ROOT.TFile(file_name)
+
+        current_canvas = 0
+        for key in input_file.GetListOfKeys():
+            print('Key: %s' % key.GetName())
+
+            if not 'Method_' in key.GetName():
+                continue
+            if not ROOT.gROOT.GetClass(key.GetClassName()).InheritsFrom('TDirectory'):
+                continue
+
+            method_name = key.GetName().replace('Method_', '')
+
+            print('Now plotting control plots for method %s' % method_name)
+
+            directory = key.ReadObj()
+
+            for sub_method in directory.GetListOfKeys():
+                print('sub_method: %s' % sub_method.GetName())
+
+                if not ROOT.gROOT.GetClass(sub_method.GetClassName()).InheritsFrom('TDirectory'):
+                    continue
+
+                sub_method_name = sub_method.GetName()
+
+                print('Now plotting control plots for sub-method %s' % sub_method_name)
+
+                sub_directory = sub_method.ReadObj()
+
+                for plot_key in sub_directory.GetListOfKeys():
+                    print('plot_key: %s' % plot_key.GetName())
+
+                    plot_obj = plot_key.ReadObj()
+                    if isinstance(plot_obj, ROOT.TH2F):
+                        plot_name = plot_key.GetName()
+                        if not '_reg_' in plot_name:
+                            continue
+
+                        if not ((show_target and '_tgt' in plot_name) or
+                                (not show_target and (not '_tgt' in plot_name))):
+                            continue
+
+                        if not ((compare_to_train and 'train' in plot_name) or
+                                (not compare_to_train and 'test' in plot_name)):
+                            continue
+
+                        inortarg = 'input'
+                        type_string = 'test'
+                        if show_target:
+                            inortarg = 'target'
+
+                        if compare_to_train:
+                            type_string = 'training'
+
+                        canvas = ROOT.TCanvas('canvas_%i' % current_canvas,
+                                              'Regression output deviation versus %s for method %s' % (inortarg,
+                                              method_name), 800, 600)
+
+                        canvas.SetRightMargin(0.10)
+
+                        plot_obj.SetTitle('Output deviation for method: %s (%s sample)' % (sub_method_name,
+                                                                                           type_string))
+                        plot_obj.Draw('colz')
+
+                        line = ROOT.TLine(plot_obj.GetXaxis().GetXmin(), 0, plot_obj.GetXaxis().GetXmax(), 0)
+                        line.SetLineStyle(2)
+                        line.Draw()
+
+                        canvas.Update()
+
+                        import os
+                        output_name = os.path.join(self.base_output_folder, '%s_dev_%s_%s_%s_%i.pdf' %
+                                                   (self.mlp_base_file_name, method_name, inortarg, type_string,
+                                                    current_canvas))
+                        #ROOT.TMVAGlob.imgconv(canvas, output_name)
+                        canvas.Print(output_name, 'pdf')
+
+                        current_canvas += 1
+
+        pass
+
+    @staticmethod
+    def plot_root_hist2d(histogram, file_name='root_hist2d.pdf', x_label='X-Axis', y_label='Y-Axis',
+                         z_label='Probability', logscale=False, normalize=False, root_file=None):
+        import ROOT
+        ROOT.gROOT.SetBatch(True)
+        ROOT.gStyle.SetOptStat(1)
+
+        from os import path
+        ext = path.splitext(path.basename(file_name))[1]
+
+        canv = ROOT.TCanvas('canvas', 'test', 0, 0, 600, 600)
+        #canv.SetTopMargin(0.05)
+        #canv.SetLeftMargin(0.13)
+        canv.SetRightMargin(0.15)
+        #canv.SetBottomMargin(0.035)
+
+        if logscale:
+            canv.SetLogz()
+
+        if normalize:
+            integral = histogram.Integral()
+            if integral > 0:
+                histogram.Scale(1.0 / integral)
+
+        histogram.GetXaxis().SetTitle(x_label)
+        histogram.GetYaxis().SetTitle(y_label)
+        histogram.GetZaxis().SetTitle(z_label)
+
+        # histogram.GetYaxis().SetLabelSize(0.06)
+        # histogram.GetYaxis().SetLabelOffset(0.0015)
+        #
+        # histogram.GetYaxis().SetTitleSize(0.06)
+        # histogram.GetYaxis().SetTitleOffset(0.85)
+
+        histogram.Draw('COLZ')
+
+        canv.Update()
+        canv.Print(file_name, ext)
+
+        if root_file:
+            histogram.SetDirectory(root_file)
+            histogram.Write()
+
+        pass
+
+    """
+    ========================================== Utility Functions ======================================================
+    The following section will contain utility functions to ease some repetitive tasks. Those functions should be self-
+    explanatory.
+    ===================================================================================================================
+    """
+
+    def difference_to_reference(self, reference, histogram, output_name, x_label, y_label, inverted_ratio=False):
+        if inverted_ratio:
+            clone = reference.Clone(reference.GetName() + 'diff_to_ref_clone')
+            base = histogram
+        else:
+            clone = histogram.Clone(histogram.GetName() + 'diff_to_ref_clone')
+            base = reference
+
+        clone.Add(base, -1.0)
+        clone.Divide(base)
+
+        if inverted_ratio:
+            z_label = 'reference - output / output'
+        else:
+            z_label = 'output - reference / reference'
+
+        self.plot_root_hist2d(clone, output_name, x_label, y_label, z_label, logscale=True)
+
+        pass
+
+    def get_layer_name(self, layer_id):
+        if layer_id < 0 or layer_id >= len(self.layer_names):
+            return 'Unknown'
+        else:
+            return self.layer_names[layer_id]
+
+    @staticmethod
+    def phi_mpi_pi(phi):
+        import ROOT
+        pi = ROOT.TMath.Pi()
+        while phi >= pi:
+            phi -= pi
+        while phi < -pi:
+            phi += pi
+        return phi
+
+
+def run_reg(neuron_type, num_neurons):
+    plotter = ShowerShapeRegressor()
+
+    plotter.cumulated_events_threshold = 1000
+
+    plotter.neuron_type = neuron_type
+    plotter.num_neurons = num_neurons
+
+    plotter.log_efrac = True
+
+    plotter.run()
+
+    return
+
+
+if __name__ == "__main__":
+
+    #for nn in [5, 10, 15]:
+        #for nt in ['tanh', 'radial', 'sigmoid']:
+    run_reg('tanh', 5)
+
+    import time
+    from distutils import archive_util
+    # make_zipfile automagically adds the .zip extension
+    archive_util.make_zipfile('reg_out_%s' % (time.strftime("%y-%m-%d_%H-%M")),
+                              'RegressionOutput')
+    archive_util.make_zipfile('weights_%s' % (time.strftime("%y-%m-%d_%H-%M")),
+                              'weights')
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeBinning.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeBinning.cxx
index df0bb9782a64249b75b07addf554c95413a534aa..32ef9ab5e8adec2edc00db8c779a6f7f43900e43 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeBinning.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeBinning.cxx
@@ -78,6 +78,9 @@ void ShowerShapeBinning::CreateHitsAlphaDrNtuple(std::string inputHits)
    TTree *hitsTree   = (TTree *)inputHitsFile->Get("hits");
    TTree *globalTree = (TTree *)inputHitsFile->Get("global");
 
+   TH1F* hEventEnergy = (TH1F*)inputHitsFile->Get("hEventEnergy");
+   TH1F* hEventHit = (TH1F*)inputHitsFile->Get("hEventHit");
+
 
    // * initialize the hits and global TTrees
    InitHitsTree(hitsTree, globalTree);
@@ -85,6 +88,7 @@ void ShowerShapeBinning::CreateHitsAlphaDrNtuple(std::string inputHits)
    // * Get the global variables
    globalTree->GetEntry(0);
 
+
    float etaCenter = m_etaCenter;
    float phiCenter = m_phiCenter;
    float etaShift  = m_etaShift;
@@ -96,6 +100,7 @@ void ShowerShapeBinning::CreateHitsAlphaDrNtuple(std::string inputHits)
    float cell_deta = m_cellDeta;
    float cell_dphi = m_cellDphi;
 
+   cout << " ==> eta, phi shifts = " << m_etaShift << " , " << m_phiShift << endl;
 
    if (m_debug)
    {
@@ -110,10 +115,13 @@ void ShowerShapeBinning::CreateHitsAlphaDrNtuple(std::string inputHits)
 
    // * use fine binning for the initial histograms
    TH1F *h_alpha = new TH1F("h_alpha", "h_alpha", 630000, alphaMin, alphaMax);
-   TH1F *h_dr    = new TH1F("h_dr", "h_dr", 75000000, 0, rMax);
-
    TH1F *h_alphaE = new TH1F("h_alphaE", "h_alphaE", 630000, alphaMin, alphaMax);
 
+   TH1F *h_dr_init    = new TH1F("h_dr_init", "h_dr_init", 75000000, 0, rMax);
+   TH1F *h_drE_init    = new TH1F("h_drE_init", "h_dr_init", 75000000, 0, rMax);
+
+
+
    TH1F *hdeta = new TH1F("hdeta", "hdeta", 100, -0.2, 0.2);
    TH1F *hdphi = new TH1F("hdphi", "hdphi", 100, -0.2, 0.2);
 
@@ -144,52 +152,63 @@ void ShowerShapeBinning::CreateHitsAlphaDrNtuple(std::string inputHits)
    TTree *m_hitsAlphaDrNtuple = new TTree("hitsAlphaDr", "hitsAlphaDr");
    BookHitsAlphaDrTree(m_hitsAlphaDrNtuple);
 
-   // float sumetaenergy = 0.;
-   // float sumphienergy = 0.;
-   // float energytotal  = 0;
-
-   // for (int ihit = 0; ihit < hitsTree->GetEntries(); ihit++)
-   // {
-   //    hitsTree->GetEntry(ihit);
-   //    int eventNumber = m_eventNumber;
-
-   //    float energy_hit = m_energy;
-   //    float deta       = m_deta;
-   //    float dphi       = m_dphi;
-
-   //    sumetaenergy += deta * energy_hit;
-   //    sumphienergy += dphi * energy_hit;
-   //    energytotal  += energy_hit;
-   // }
-
-   // float shiftyeta = sumetaenergy / energytotal;
-   // float shiftyphi = sumphienergy / energytotal;
-
-   // cout << " shwifty eta =" << shiftyeta << " shwifty phi = " << shiftyphi << endl;
 
 
 
    // * loop through all hits
 
+   int eventNumber = -1;
+   bool newEvent = false;
+   float eventEnergy = 0.;
+   int eventHit = 0;
+   float energy_hit = 0.;
+   float total_energy = 0.;
+   int nSkipHits = 0;
+   float eta_hit = 0.;
+   float phi_hit = 0.;
+   float eta_entrance = 0.;
+   float phi_entrance = 0.;
+   float deta = 0.;
+   float dphi = 0.;
+
+   float cutoff = 0.95; // cutoff energy fraction
+
    cout << " Looping over nhits = " << hitsTree->GetEntries() << endl;
 
+   int nSkpHitsTotal = 0;
+
    for (int ihit = 0; ihit < hitsTree->GetEntries(); ihit++)
    {
       hitsTree->GetEntry(ihit);
 
 
+      // read the TTree variables
+      eventNumber = m_eventNumber;
+      newEvent = m_newEvent;
+
+      if (newEvent) {
+
+         // cout << " total energy, skipped hits in last event = " << total_energy << " , " << nSkipHits << endl;
+         eventEnergy = hEventEnergy->GetBinContent(eventNumber);
+         eventHit = hEventHit->GetBinContent(eventNumber);
+         total_energy = 0.; // set the total energy to zero for each event
+         nSkipHits = 0; // reset the number of hits skipped
+         // cout << " event no = " << eventNumber << " event energy = " << eventEnergy << "event hit =" << eventHit << "new event? =" << newEvent << " cutoff = " << cutoff << endl;
+
+
+      }
 
-      int eventNumber = m_eventNumber;
+      energy_hit = m_energy;
+      total_energy += energy_hit;
+      eta_hit    = m_etaHit;
+      phi_hit    = m_phiHit;
 
-      float energy_hit = m_energy;
-      float eta_hit    = m_etaHit;
-      float phi_hit    = m_phiHit;
+      eta_entrance = m_etaEntrance;
+      phi_entrance = m_phiEntrance;
 
-      float eta_entrance = m_etaEntrance;
-      float phi_entrance = m_phiEntrance;
+      deta = m_deta;
+      dphi = m_dphi;
 
-      float deta = m_deta;
-      float dphi = m_dphi;
 
       float deta_mm, dphi_mm;
       tie(deta_mm, dphi_mm) = GetUnitsmm(eta_hit, deta, dphi, cell_r, cell_z);
@@ -204,8 +223,9 @@ void ShowerShapeBinning::CreateHitsAlphaDrNtuple(std::string inputHits)
 
       // * calculate the corrected deta, dphi
 
-      float deta_corr = deta - etaShift;
-      float dphi_corr = dphi - phiShift;
+
+      float deta_corr = deta; // - etaShift;
+      float dphi_corr = dphi; // - phiShift;
 
       if (m_debug)
       {
@@ -252,41 +272,67 @@ void ShowerShapeBinning::CreateHitsAlphaDrNtuple(std::string inputHits)
          cout << " delta r = " << delta_r << " mm, alpha = " << alpha << " mm" << endl;
       }
 
+      // if (total_energy <= eventEnergy * cutoff) {
       h_alpha->Fill(alpha);
       h_alphaE->Fill(alpha, energy_hit);
+      h_dr_init->Fill(delta_r);
+      h_drE_init->Fill(delta_r, energy_hit);
 
-      // * reweight r with hit energy,  if energy > 1 MeV weigher = energy, otherwise weight = 1
-      if (energy_hit > 1.)
-      {
-         h_dr->Fill(delta_r, energy_hit);
-      }
-      else
-      {
-         h_dr->Fill(delta_r, 1);
-      }
+      // } else {
+      //    nSkipHits++;
+      //    nSkpHitsTotal++;
 
+      // cout << " energy reached = " << cutoff << " of total event energy.. Skipping hits = " << ihit << endl;
+      //}
 
+      // cout << " Total number of hits skipped = " << nSkpHitsTotal << endl;
       // * fill the TTree
       m_eventNumber = eventNumber;
       m_alpha       = alpha;
       m_dr          = delta_r;
       m_energy      = energy_hit;
       m_hitsAlphaDrNtuple->Fill();
+
+
    }//end loop over hits
 
+   int bins;
+   double binmax;
+
+   tie(bins, binmax) = GetBinUpEdge(h_drE_init);
+   cout.precision(8);
+   cout << " bins = " << bins << " binmax = " << binmax << endl;
+
+
+
+
+   TH1F *h_dr = new TH1F("h_dr", "h_dr", bins + 1, 0, binmax);
+   TH1F *h_drE = new TH1F("h_drE", "h_drE", bins + 1, 0, binmax);
+
+
+   for (int i = 0; i < h_dr->GetNbinsX(); i ++) {
+
+      h_dr->SetBinContent(i, h_dr_init->GetBinContent(i));
+      h_drE->SetBinContent(i, h_drE_init->GetBinContent(i));
+   }
+
 
 
    hitsAlphaDrFile->cd();
    m_hitsAlphaDrNtuple->Write();
    globalTree->CloneTree()->Write();
    h_alpha->Write();
+   h_alphaE->Write();
+   h_dr_init->Write();
+   h_drE_init->Write();
    h_dr->Write();
+   h_drE->Write();
 
-   h_alphaE->Write();
-   //
-   //  hdeta_corr->Write();
-   //  hdphi_corr->Write();
-   //
+
+//
+//  hdeta_corr->Write();
+//  hdphi_corr->Write();
+//
 
    hdeta->Write();
    hdetaE->Write();
@@ -338,10 +384,11 @@ void ShowerShapeBinning::RunBinning()
    for (int i = 0; i < nAlphaBoundaries; i++)
    {
       xAlphaBins[i] = xbinsAlpha.at(i);
-      if (m_debug)
-      {
-         cout << " BIN ALPHA  " << i << ":  " << xAlphaBins[i] << endl;
-      }
+
+      // if (m_debug)
+      // {
+      cout << " BIN ALPHA  " << i << ":  " << xAlphaBins[i] << endl;
+      // }
    }
 
    // * r binning is iterative to ensure no empty bins
@@ -417,6 +464,7 @@ void ShowerShapeBinning::RunBinning()
          hHits            = new TH2F("hHits", "hHits", nAlphaBins, xAlphaBins, nRBoundaries - 1, yRBins);
          hEnergyDensity   = new TH2F("hEnergyDensity", "hEnergyDensity", nAlphaBins, xAlphaBins, nRBoundaries - 1, yRBins);
          hEnergy          = new TH2F("hEnergy", "hEnergy", nAlphaBins, xAlphaBins, nRBoundaries - 1, yRBins);
+         hDrEnergy          = new TH1F("hDrEnergy", "hDrEnergy", nRBoundaries - 1, yRBins);
          hLnEnergy        = new TH2F("hLnEnergy", "hLnEnergy", nAlphaBins, xAlphaBins, nRBoundaries - 1, yRBins);
          hLnEnergyDensity = new TH2F("hLnEnergyDensity", "hLnEnergyDensity", nAlphaBins, xAlphaBins, nRBoundaries - 1, yRBins);
 
@@ -426,6 +474,7 @@ void ShowerShapeBinning::RunBinning()
          // * loop over events to fill histograms with this binning
          cout << " * Start looping over " << hitsAlphaDrTree->GetEntries() << " hits ..." << endl;
 
+         //double nevent = 0.0;
 
 
          for (int ihit = 0; ihit < hitsAlphaDrTree->GetEntries(); ihit++)
@@ -454,6 +503,9 @@ void ShowerShapeBinning::RunBinning()
                // * define the histogram for the first hit
                halphadrE = new TH2F(Form("halphadrE_%i", eventNumber), Form("halphadrE_%i", eventNumber), nAlphaBins, xAlphaBins, nRBoundaries - 1, yRBins);
                halphadrE->Sumw2();
+
+               hDrE = new TH1F(Form("hDrE_%i", eventNumber), Form("hDrE_%i", eventNumber), nRBoundaries - 1, yRBins);
+               hDrE->Sumw2();
             }
 
             float alpha  = m_alpha;
@@ -468,12 +520,14 @@ void ShowerShapeBinning::RunBinning()
 
             hHits->Fill(alpha, dr, 1);
             halphadrE->Fill(alpha, dr, energy);
+            hDrE->Fill(dr, energy);
 
 
             if (NextEventNumber != eventNumber or ihit == hitsAlphaDrTree->GetEntries() - 1)
             {
                // if the next event has a different eventNumber then normalize
 
+               nevent += 1.0;
                isNewEvent = true;
 
                if (m_debug)
@@ -483,22 +537,35 @@ void ShowerShapeBinning::RunBinning()
 
                if (halphadrE->Integral() > 0)
                {
-                  halphadrE->Scale(1 / (halphadrE->Integral()));
+                  //halphadrE->Scale(1 / (halphadrE->Integral()));
                   hEnergy->Add(halphadrE);
                }
 
+               //hDrE->Scale(1 / (hDrE->Integral()));
+               hDrEnergy->Add(hDrE);
+
                if (halphadrE)
                {
                   delete halphadrE;
                }
+
+               if (hDrE) {
+
+                  delete hDrE;
+               }
             }
 
             if (isNewEvent and ihit != hitsAlphaDrTree->GetEntries() - 1)
             {
                halphadrE = new TH2F(Form("halphadrE_%i", eventNumber), Form("halphadrE_%i", eventNumber), nAlphaBins, xAlphaBins, nRBoundaries - 1, yRBins);
                halphadrE->Sumw2();
+
+               hDrE = new TH1F(Form("hDrE_%i", eventNumber), Form("hDrE_%i", eventNumber), nRBoundaries - 1, yRBins);
+               hDrE->Sumw2();
             }
          }
+
+         cout << " *** Total No of events = " << nevent << endl;
          cout << " *Checking if there are empty bins with tolerance = " << m_tolerance << endl;
          isEmptyBin = CheckEmptyBin();
 
@@ -533,6 +600,9 @@ void ShowerShapeBinning::RunBinning()
          {
             delete hGradient;
          }
+         if (hDrEnergy) {
+            delete hDrEnergy;
+         }
 
          cout << " end loop to combine bins" << endl;
       }// end loop to combine up to 5 bins
@@ -631,11 +701,11 @@ void ShowerShapeBinning::CreateNNinput()
          m_alphaBin = xbinsAlpha.at(ibinx);
          if (ibiny == 0)
          {
-            m_rBin = TMath::Log(ybinsR.at(1)) - 1;
+            m_LnrBin = TMath::Log(ybinsR.at(1)) - 1;
          }
          else
          {
-            m_rBin = TMath::Log(ybinsR.at(ibiny));
+            m_LnrBin = TMath::Log(ybinsR.at(ibiny));
          }
 
          // * calculate r prob
@@ -688,11 +758,15 @@ void ShowerShapeBinning::CreateNNinput()
 
    // * write the TTrees and relevant histograms
 
+   cout << " ****** Nevents = " << nevent << endl;
+
    NNinputFile->cd();
    NNbinCenter->Write();
    NNprob->Write();
    hHits->Write();
+   hEnergy->Scale(1.0 / nevent);
    hEnergy->Write();
+
    hEnergyNorm->Write();
    hEnergyDensity->Write();
    hLnEnergy->Write();
@@ -701,6 +775,8 @@ void ShowerShapeBinning::CreateNNinput()
    hValidation->Write();
    h_alpha->Write();
    h_dr->Write();
+   hDrEnergy->Scale(1.0 / nevent);
+   hDrEnergy->Write();
    NNinputFile->Close();
 
    //  std::string inputDistrFile = m_topDir + m_particle + "/InputDistribution_" + m_particle + ".root";
@@ -908,6 +984,36 @@ bool ShowerShapeBinning::CheckGradient()
 }
 
 
+std::tuple<int, double> ShowerShapeBinning::GetBinUpEdge(TH1F* histo) {
+
+   int nbins = histo->GetNbinsX();
+
+   double energy = histo->Integral();
+
+   double cutoff = 0.95 * energy;
+
+   double tot_energy = 0.;
+
+   double bin_edge = 0.;
+
+   int bin_no = -1;
+
+   for (int i = 0; i < nbins; i++) {
+
+      tot_energy += histo->GetBinContent(i);
+
+      if (tot_energy >= cutoff) {
+
+         bin_edge = histo->GetXaxis()->GetBinUpEdge(i);
+         bin_no = i;
+         break;
+      }
+
+   }
+
+   return std::make_tuple(bin_no, bin_edge);
+}
+
 std::vector<float> ShowerShapeBinning::Getxbins(TH1F *histo, int nbins)
 {
    // * calculate variable bin width in alpha and dr making sure each bin has almost equal amount of hits.
@@ -932,6 +1038,13 @@ std::vector<float> ShowerShapeBinning::Getxbins(TH1F *histo, int nbins)
    if (isAlpha)
    {
       xbins.push_back(TMath::Pi() / 8);
+
+      for (int i = 1; i <= nbins; i++ ) {
+
+         xbins.push_back(TMath::Pi() / 8 + i * 2 * TMath::Pi() / nbins);
+      }
+
+      return xbins;
    }
    else
    {
@@ -995,6 +1108,7 @@ std::tuple<float, float> ShowerShapeBinning::GetUnitsmm(float eta_hit, float d_e
 void ShowerShapeBinning::InitHitsTree(TTree *hitsNtuple, TTree *globalNtuple)
 {
    m_eventNumber = -1;
+   m_newEvent    = false;
    m_energy      = 0.;
    m_etaHit      = 0.;
    m_phiHit      = 0.;
@@ -1015,6 +1129,7 @@ void ShowerShapeBinning::InitHitsTree(TTree *hitsNtuple, TTree *globalNtuple)
    m_cellDphi  = 0.;
 
    hitsNtuple->SetBranchAddress("eventNumber", &m_eventNumber);
+   hitsNtuple->SetBranchAddress("newEvent", &m_newEvent);
    hitsNtuple->SetBranchAddress("energy_hit", &m_energy);
    hitsNtuple->SetBranchAddress("eta_hit", &m_etaHit);
    hitsNtuple->SetBranchAddress("phi_hit", &m_phiHit);
@@ -1101,6 +1216,7 @@ void ShowerShapeBinning::BookNNinputTree(TTree *energyNtuple, TTree *probNtuple)
    m_rProb     = 0.;
    m_alphaBin  = 0.;
    m_rBin      = 0.;
+   m_LnrBin    = 0;
    m_weight    = 0.;
 
    energyNtuple->Branch("alpha", &m_alphaBinCenter);
@@ -1115,5 +1231,6 @@ void ShowerShapeBinning::BookNNinputTree(TTree *energyNtuple, TTree *probNtuple)
    probNtuple->Branch("r_prob", &m_rProb);
    probNtuple->Branch("alpha_bin", &m_alphaBin);
    probNtuple->Branch("r_bin", &m_rBin);
+   probNtuple->Branch("Lnr_bin", &m_LnrBin);
    probNtuple->Branch("weight", &m_weight);
 }
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeBinning.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeBinning.h
index 02a6174e7376ee2f0487fd6fee0dd64802e55f61..0928fd1b63010aa61f46473ccbb03c730bb9fb14 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeBinning.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeBinning.h
@@ -27,6 +27,7 @@ public:
    bool CheckGradient();
 
    std::vector<float> Getxbins(TH1F *histo, int nbins);
+   std::tuple<int, double> GetBinUpEdge(TH1F* histo);
 
    std::tuple<float, float> GetUnitsmm(float eta_hits, float deta, float dphi, float cellr, float cellz);
 
@@ -77,6 +78,7 @@ private:
 
    // * for hits TTree
    int m_eventNumber;
+   bool m_newEvent;
    float m_energy;
    float m_etaHit;
    float m_phiHit;
@@ -108,6 +110,8 @@ private:
 
    // * histograms
 
+   double nevent = 0.;
+
    TH2F *halphadrE;
 
    TH1F *h_alpha;
@@ -117,6 +121,8 @@ private:
    TH2F *hHits;
    TH2F *hEnergyDensity;
    TH2F *hEnergy;
+   TH1F *hDrE;
+   TH1F *hDrEnergy;
 
 
    TH2F *hLnEnergy;
@@ -140,6 +146,7 @@ private:
    float m_rProb;
    float m_alphaBin;
    float m_rBin;
+   float m_LnrBin;
    float m_weight;
 
 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapePlotting.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapePlotting.cxx
index 982a32f99599481b53014569659bc5d697067338..10fb77c5ea78cd1d2ce708f3e8ee98c917793f36 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapePlotting.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapePlotting.cxx
@@ -153,18 +153,20 @@ void ShowerShapePlotting::PlotPolar(std::vector<string> histNameVec, bool isOutp
 {
    cout << " * Plotting NNinput polar plots ..." << endl;
 
-   //gStyle->SetPalette(1);
+   gStyle->SetPalette(1);
    SetCustomPalette();
    std::string labeltitle = CreateLabels();
 
 
    TFile *NNinputFile  = TFile::Open(m_NNinputName.c_str());
+   cout << " input file = " << m_NNinputName.c_str() << endl;
    TFile *NNoutputFile = TFile::Open(m_NNoutputName.c_str());
 
 
    for (unsigned int ihist = 0; ihist < histNameVec.size(); ihist++)
    {
-      TH2F *href = (TH2F *)NNinputFile->Get((histNameVec.at(ihist)).c_str());
+      TH2F *href = (TH2F *)NNinputFile->Get("hEnergyNorm");
+      //href->Scale(1 / href->Integral());
       TH2F *hout;
 
 
@@ -225,51 +227,58 @@ void ShowerShapePlotting::PlotPolar(std::vector<string> histNameVec, bool isOutp
          myr[1] = 0;
          myr[2] = zoom;
 
-         TLatex *l = new TLatex(-1 * zoom, -1.15 * zoom, "ATLAS");
-         l->SetTextSize(.03);
+         TLatex *l = new TLatex(-1 * zoom, -1.20 * zoom, "ATLAS");
+         l->SetTextSize(.035);
          l->SetTextFont(72);
 
-         TLatex *l2 = new TLatex(-0.7 * zoom, -1.15 * zoom, "Simulation Preliminary");
-         l2->SetTextSize(.03);
+         TLatex *l2 = new TLatex(-0.6 * zoom, -1.20 * zoom, "Simulation Preliminary");
+         l2->SetTextSize(.035);
          l2->SetTextFont(42);
 
-         TLatex *lInputTitle = new TLatex(-zoom, 1.02 * zoom, (labeltitle + ", " + labelzoom + ", NN input").c_str());
-         lInputTitle->SetTextSize(.02);
+         TLatex *lInputTitle = new TLatex(-zoom, 1.02 * zoom, (labeltitle + /*", " + labelzoom +*/ ", Geant4").c_str());
+         lInputTitle->SetTextSize(.03);
          lInputTitle->SetTextFont(42);
 
 
-         TLatex *lOutputTitle = new TLatex(-zoom, 1.02 * zoom, (labeltitle + ", " + labelzoom + ", NN output, neurons =" + std::to_string(m_neurons)).c_str());
-         lOutputTitle->SetTextSize(.02);
+         TLatex *lOutputTitle = new TLatex(-zoom, 1.02 * zoom, (labeltitle + /*", " + labelzoom + */", NN output" /*, neurons =" + std::to_string(m_neurons)*/).c_str());
+         lOutputTitle->SetTextSize(.03);
          lOutputTitle->SetTextFont(42);
 
 
-         TLatex *lRatioTitle = new TLatex(-zoom, 1.02 * zoom, (labeltitle + ", " + labelzoom + ", Ratio, neurons =" + std::to_string(m_neurons)).c_str());
-         lRatioTitle->SetTextSize(.02);
+         TLatex *lRatioTitle = new TLatex(-zoom, 1.02 * zoom, (labeltitle + /*", " + labelzoom + */", Ratio" /*neurons =" + std::to_string(m_neurons)*/).c_str());
+         lRatioTitle->SetTextSize(.03);
          lRatioTitle->SetTextFont(42);
 
 
          TH2F *hdummy = new TH2F(("hdummy" + histNameVec.at(ihist) + labelzoom).c_str(), "", 2, myr, 2, myr);
          hdummy->GetYaxis()->SetRangeUser(-float(zoom), float(zoom));
          hdummy->GetXaxis()->SetRangeUser(-float(zoom), float(zoom));
-         hdummy->GetYaxis()->SetLabelSize(.02);
-         hdummy->GetXaxis()->SetLabelSize(.02);
+         hdummy->GetYaxis()->SetLabelSize(.025);
+         hdummy->GetXaxis()->SetLabelSize(.025);
 
          hdummy->GetXaxis()->SetTitle("x [mm]");
+         hdummy->GetXaxis()->SetTitleSize(0.035);
          hdummy->GetYaxis()->SetTitle("y [mm]");
+         hdummy->GetYaxis()->SetTitleSize(0.035);
+
 
 
          href->SetContour(20);
          href->GetYaxis()->SetRangeUser(-float(zoom), float(zoom));
-         href->GetZaxis()->SetLabelSize(0.02);
-         href->GetZaxis()->SetTitle(label.c_str());
-         href->GetZaxis()->SetTitleSize(0.03);
-         href->GetZaxis()->SetTitleOffset(1.3);
+         //href->GetZaxis()->SetRangeUser(4000, 6500);
+         href->GetZaxis()->SetLabelSize(0.025);
+         href->GetZaxis()->SetTitle("Energy normalized to unity");
+         href->GetZaxis()->SetTitleSize(0.035);
+         href->GetZaxis()->SetTitleOffset(1.4);
          href->Sumw2();
+         //href->Scale(1.0 / href->Integral());
 
+         TFile *fNN = new TFile("fNN.root", "recreate");
 
-         TCanvas *c1 = new TCanvas(("NNinput_" + histNameVec.at(ihist) + labelzoom).c_str(), ("NNinput_" + histNameVec.at(ihist) + labelzoom).c_str(), 800, 800);
+         TCanvas *c1 = new TCanvas(("NNinput_" + histNameVec.at(ihist) + labelzoom).c_str(), ("NNinput_" + histNameVec.at(ihist) + labelzoom).c_str(), 900, 900);
          c1->cd();
-         c1->SetRightMargin(0.14);
+         c1->SetLeftMargin(0.14);
+         c1->SetRightMargin(0.17);
          hdummy->Draw("COLZ");
          href->Draw("COLZ POL SAME");
 
@@ -278,26 +287,31 @@ void ShowerShapePlotting::PlotPolar(std::vector<string> histNameVec, bool isOutp
          lInputTitle->Draw();
 
          c1->SaveAs((m_outputDirName + "NNinput_" + histNameVec.at(ihist) + "_" + labelzoom + ".png").c_str());
+
+         fNN->cd();
+         c1->Write();
          c1->Close();
 
          if (isOutput)
          {
-            hout = (TH2F *)NNoutputFile->Get((histNameVec.at(ihist)).c_str());
+            hout = (TH2F *)NNoutputFile->Get("hHits");
             //hout->Scale(1 / hout->Integral());
             hout->SetContour(20);
             hout->GetYaxis()->SetRangeUser(-float(zoom), float(zoom));
-            //hout->GetZaxis()->SetRangeUser(0, .012);
-            hout->GetZaxis()->SetLabelSize(0.02);
-            hout->GetZaxis()->SetTitle(label.c_str());
-            hout->GetZaxis()->SetTitleSize(0.03);
-            hout->GetZaxis()->SetTitleOffset(1.3);
+            hout->GetZaxis()->SetRangeUser(4000, 6500);
+            hout->GetZaxis()->SetLabelSize(0.025);
+            //hout->GetZaxis()->SetRangeUser(0.0, 0.011);
+            hout->GetZaxis()->SetTitle("Number of hits");
+            hout->GetZaxis()->SetTitleSize(0.035);
+            hout->GetZaxis()->SetTitleOffset(1.4);
             hout->Sumw2();
 
 
 
-            TCanvas *c2 = new TCanvas(("NNoutput_" + histNameVec.at(ihist) + labelzoom).c_str(), ("NNoutput_" + histNameVec.at(ihist) + labelzoom).c_str(), 800, 800);
+            TCanvas *c2 = new TCanvas(("NNoutput_" + histNameVec.at(ihist) + labelzoom).c_str(), ("NNoutput_" + histNameVec.at(ihist) + labelzoom).c_str(), 900, 900);
             c2->cd();
-            c2->SetRightMargin(0.14);
+            c2->SetLeftMargin(0.14);
+            c2->SetRightMargin(0.17);
             hdummy->Draw("COLZ");
             hout->Draw("COLZ POL SAME");
 
@@ -306,17 +320,24 @@ void ShowerShapePlotting::PlotPolar(std::vector<string> histNameVec, bool isOutp
             lOutputTitle->Draw();
 
             c2->SaveAs((m_outputDirName + "NNoutput_" + histNameVec.at(ihist) + "_" + labelzoom + ".png").c_str());
+            fNN->cd();
+            c2->Write();
             c2->Close();
+            fNN->Close();
 
             // * ratio
             TH2F *hratio = (TH2F *)href->Clone(("hratio_" + histNameVec.at(ihist) + labelzoom).c_str());
             hratio->Divide(hout);
-            hratio->GetZaxis()->SetTitle("");
-            hratio->GetZaxis()->SetRangeUser(0, +1.5);
-
-            TCanvas *c3 = new TCanvas(("Ratio_" + histNameVec.at(ihist) + labelzoom).c_str(), ("Ratio_" + histNameVec.at(ihist) + labelzoom).c_str(), 800, 800);
+            hratio->GetYaxis()->SetRangeUser(-float(zoom), float(zoom));
+            hratio->GetZaxis()->SetTitle("Geant4 / NN output ");
+            hratio->GetZaxis()->SetRangeUser(0.8, +1.2);
+            hratio->GetZaxis()->SetLabelSize(0.025);
+            hratio->GetZaxis()->SetTitleSize(0.035);
+            hratio->GetZaxis()->SetTitleOffset(1.4);
+
+            TCanvas *c3 = new TCanvas(("Ratio_" + histNameVec.at(ihist) + labelzoom).c_str(), ("Ratio_" + histNameVec.at(ihist) + labelzoom).c_str(), 900, 900);
             c3->cd();
-            c3->SetRightMargin(0.14);
+            c3->SetRightMargin(0.17);
             hdummy->Draw("COLZ");
             hratio->Draw("COLZ POL SAME");
 
@@ -399,7 +420,7 @@ std::string ShowerShapePlotting::CreateLabels()
    }
    else if (m_particle.compare("photon") == 0)
    {
-      particle = "#gamma^0";
+      particle = "#gamma^{0}";
    }
 
    std::string calolayer;
@@ -438,7 +459,7 @@ std::string ShowerShapePlotting::CreateLabels()
 
    bin = "#alpha nbins = " + std::to_string(final_nbinsAlpha) + ", r nbins = " + std::to_string(final_nbinsR);
 
-   std::string label = energy + " " + particle + ", " + eta + ", " + calolayer + ", " + binpca + ", " + bin;
+   std::string label = energy + " " + particle + ", " + eta /*+ ", " + calolayer + ", " + binpca + ", " + bin*/;
 
    return label;
 }
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeRegression.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeRegression.cxx
index 2a4cf7aa9327216ecc437f280329df9edbd2f98a..c43da9cdb282314bb9c7901e222481e974075a70 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeRegression.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeRegression.cxx
@@ -79,20 +79,27 @@ void ShowerShapeRegression::Run(std::vector<string> targetVarVec)
 
    for (unsigned int itarget = 0; itarget < targetVarVec.size(); itarget++)
    {
-      string histoName = "h" + targetVarVec.at(itarget);
+      string histoName = "hEnergyNorm"; /*h" + targetVarVec.at(itarget)*/;
 
-      TH2F *hin = (TH2F *)NNinputFile->Get(histoName.c_str());
+      TH2F *hin = (TH2F *)NNinputFile->Get("hEnergyNorm");
+
+      cout << "===> hin = " << hin << endl;
 
 
       cout << " ======> Run regrression training with target variable = " << (targetVarVec.at(itarget)).c_str() << " <======" << endl;
 
       TMVARegressionTraining(targetVarVec.at(itarget));
 
+      std::cout << " ======> after regression training " << std::endl;
+
       //* Define a histogram with alpha and Ln(r) boundaries
 
+      std::cout << " ===> 1 " << std::endl;
       int nalpha = hin->GetNbinsX() + 1;
       int nr = hin->GetNbinsY() + 1;
 
+      std::cout << " ===> 2 " << std::endl;
+
       // * get the bin boundaries
 
       float xbinsalpha[nalpha];
@@ -115,8 +122,8 @@ void ShowerShapeRegression::Run(std::vector<string> targetVarVec)
       }
 
       TH2F* houtLn = new TH2F("houtLn", "houtLn", nalpha - 1, xbinsalpha, nr - 1, xbinsLnr);
-      TH2F *hout = (TH2F *)hin->Clone(histoName.c_str());
-      hout->Reset();
+      //TH2F *hout = (TH2F *)hin->Clone(histoName.c_str());
+      //hout->Reset();
 
       //* Use random numbers for tmva application
 
@@ -125,32 +132,36 @@ void ShowerShapeRegression::Run(std::vector<string> targetVarVec)
          double random = myRandom->Uniform(0, 1);
          double random2 = myRandom2->Uniform(0, 1);
 
+         std::cout << " ======> before regression application " << std::endl;
+
          std::vector<float> value = TMVARegressionApplication(random, random2, targetVarVec.at(itarget));
+         std::cout << " ======> after regression application " << std::endl;
+
 
          houtLn->Fill(value.at(0), value.at(1));
-         hout->Fill(value.at(0), TMath::Exp(value.at(1)));
+         //hout->Fill(value.at(0), TMath::Exp(value.at(1)));
 
       }
 
 
       // // * change Ln(r) to r
 
-      // TH2F *hout = (TH2F *)hin->Clone(histoName.c_str());
-      // hout->Reset();
+      TH2F *hout = (TH2F *)hin->Clone(histoName.c_str());
+      hout->Reset();
 
 
-      // for (int ibinx = 1; ibinx < houtLn->GetNbinsX() + 1; ibinx++)
-      // {
-      //    for (int ibiny = 1; ibiny < houtLn->GetNbinsY() + 1; ibiny++)
-      //    {
-      //       hout->SetBinContent(ibinx, ibiny, houtLn->GetBinContent(ibinx, ibiny));
-      //       hout->SetBinError(ibinx, ibiny, houtLn->GetBinError(ibinx, ibiny));
-      //    }
-      // }
-      //
+      for (int ibinx = 1; ibinx < houtLn->GetNbinsX() + 1; ibinx++)
+      {
+         for (int ibiny = 1; ibiny < houtLn->GetNbinsY() + 1; ibiny++)
+         {
+            hout->SetBinContent(ibinx, ibiny, houtLn->GetBinContent(ibinx, ibiny));
+            hout->SetBinError(ibinx, ibiny, houtLn->GetBinError(ibinx, ibiny));
+         }
+      }
+
 
-      hout->Scale(1 / (hout->Integral()));
-      houtLn->Scale(1 / (houtLn->Integral()));
+      //hout->Scale(1.0 / hout->Integral());
+      // houtLn->Scale(1 / (houtLn->Integral()));
       NNoutputFile->cd();
       hout->Write();
       houtLn->Write();
@@ -275,7 +286,7 @@ void ShowerShapeRegression::TMVARegressionTraining(std::string target)
    // * Neural network (MLP)
    if (Use["MLP"])
    {
-      factory->BookMethod(dataloader, TMVA::Types::kMLP, "MLP", Form("!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=20000:HiddenLayers=%i,%i,%i,%i:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=20:!UseRegulator", m_neurons, m_neurons, m_neurons, m_neurons));
+      factory->BookMethod(dataloader, TMVA::Types::kMLP, "MLP", Form("!H:!V:VarTransform=Norm:NeuronType=tanh:NCycles=20000:HiddenLayers=%i,:TestRate=6:TrainingMethod=BFGS:Sampling=0.3:SamplingEpoch=0.8:ConvergenceImprove=1e-6:ConvergenceTests=20:!UseRegulator", m_neurons));
    }
 
 
@@ -384,6 +395,8 @@ std::vector<float> ShowerShapeRegression::TMVARegressionApplication(float xval,
    TString dir    = "RegWeight_" + target + "_neuron" + std::to_string(m_neurons) + "_nbinsR" + std::to_string(m_nbinsR) + m_fileName + "/weights/";
    TString prefix = "TMVARegression";
 
+   std::cout << "===> Reg file = " << dir << std::endl;
+
    // Book method(s)
    for (std::map<std::string, int>::iterator it = Use.begin(); it != Use.end(); it++)
    {
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeStudy.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeStudy.cxx
index 155a8bab7aaf9e9eef5aac52583cb962b7cf96b9..72dc93cc6d3ce8082d1dabffaba42bc346c44c77 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeStudy.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeStudy.cxx
@@ -94,6 +94,8 @@ std::tuple<float, float> ShowerShapeStudy::GetShift(int ievent)
 
 void ShowerShapeStudy::EachParticleShower()
 {
+
+
    // * get the input hits file
 
    cout << "* Reading input hits file = " << m_hitsNtupleName.c_str() << endl;
@@ -138,9 +140,31 @@ void ShowerShapeStudy::EachParticleShower()
    TH2F *hdetadphiE0 = nullptr;
    TH1F *hdetaE0     = nullptr;
 
+   TH2F *hEnergy = nullptr;
+   TH2F *hEnergyAvg = nullptr;
+
+   TH1F *hDrEnergy = nullptr;
+   TH1F *hDrEnergyAvg = nullptr;
+
    std::string file     = m_topDir + m_particle + "/EachParticleShower_" + m_fileName + ".root";
    TFile       *outfile = new TFile(file.c_str(), "recreate");
 
+   std::string GetBinningFile = m_topDir + m_particle + "/InputDistribution_" + m_particle + "_" + std::to_string(m_particleEnergy) + "GeV" + "_eta_" + std::to_string(m_etamin) + "_" + std::to_string(m_etamax) + ".root";
+
+   cout << " GetBinningFile = " << GetBinningFile << endl;
+
+   TFile *BinFile = TFile::Open(GetBinningFile.c_str());
+
+   std::string BinHistoName = "hEnergy_layer" + std::to_string(m_calolayer) + "_pca" + std::to_string(m_PCAbin);
+
+   cout << " BinHistoName = " << BinHistoName << endl;
+
+   TH2F* BinHisto = (TH2F*)BinFile->Get(BinHistoName.c_str());
+
+   int nBinsAlpha = BinHisto->GetNbinsX();
+   int nBinsR = BinHisto->GetNbinsY();
+
+
 
 
    int particleCount = 0;
@@ -148,8 +172,31 @@ void ShowerShapeStudy::EachParticleShower()
 
    float etaShift2, phiShift2 = 0;
 
+   cout << " nbins alpha, nbins r = " << nBinsAlpha << " , " << nBinsR << endl;
+
+
+   double Alphabinsx[nBinsAlpha + 1], Rbinsy[nBinsR + 1];
+
+
+
+
+   for (int i = 1; i <= BinHisto->GetNbinsX() + 1; i++) {
+      //cout << " x bins ..." << endl;
+      cout << BinHisto->GetXaxis()->GetBinLowEdge(i) << endl;
+      Alphabinsx[i - 1] = BinHisto->GetXaxis()->GetBinLowEdge(i);
+   }
+
+   for (int i = 1; i <= BinHisto->GetNbinsY() + 1; i++) {
+      //cout << " y bins..." << endl;
+      cout << BinHisto->GetYaxis()->GetBinLowEdge(i) << endl;
+      Rbinsy[i - 1] = BinHisto->GetYaxis()->GetBinLowEdge(i);
+   }
+
+
+
    for (int ihit = 0; ihit < hitsTree->GetEntries(); ihit++)
    {
+
       hitsTree->GetEntry(ihit);
 
       if (m_PCA != m_PCAbin)
@@ -163,6 +210,8 @@ void ShowerShapeStudy::EachParticleShower()
       bool isNewEvent      = false;
       int  NextEventNumber = -1;
 
+
+
       if (ihit != hitsTree->GetEntries() - 1)
       {
          hitsTree->GetEntry(ihit + 1);
@@ -183,16 +232,16 @@ void ShowerShapeStudy::EachParticleShower()
       float eta_entrance = m_etaEntrance;
       float phi_entrance = m_phiEntrance;
 
-      float etaShift2 = 0, phiShift2 = 0;
-      if (passEvent == 1 or NextEventNumber != eventNumber)
-      {
-         tie(etaShift2, phiShift2) = GetShift(eventNumber);
-      }
+      // float etaShift2 = 0, phiShift2 = 0;
+      // if (passEvent == 1 or NextEventNumber != eventNumber)
+      // {
+      //    tie(etaShift2, phiShift2) = GetShift(eventNumber);
+      // }
 
       // * calculate the corrected deta, dphi
 
-      float deta0 = m_deta - etaShift2;
-      float dphi0 = m_dphi - phiShift2;
+      float deta0 = m_deta - etaShift;
+      float dphi0 = m_dphi - phiShift;
 
       float deta0_mm, dphi0_mm;
       tie(deta0_mm, dphi0_mm) = GetUnitsmm(eta_hit, deta0, dphi0, cell_r, cell_z);
@@ -202,11 +251,28 @@ void ShowerShapeStudy::EachParticleShower()
          cout << "deta0 = " << deta0 << ", " << "dphi0 = " << dphi0 << ", deta0_mm =" << deta0_mm << ", dphi0_mm =" << dphi0_mm << endl;
       }
 
+      // * calculate r and alpha co-ordiantes
+
+      float delta_r = TMath::Sqrt(dphi0_mm * dphi0_mm + deta0_mm * deta0_mm);
+      float alpha   = TMath::ATan2(dphi0_mm, deta0_mm);
+
+      if (alpha < (TMath::Pi() / 8.))
+      {
+         alpha = 2 * TMath::Pi() + alpha;
+      }
+
+      if (m_debug)
+      {
+         cout << " delta r = " << delta_r << " mm, alpha = " << alpha << " mm" << endl;
+      }
+
+
       int nbins = 400;
       int low   = -100;
       int high  = 100;
 
 
+      cout << "particleCount = " << particleCount << endl;
 
       if (passEvent == 1)
       {
@@ -215,12 +281,28 @@ void ShowerShapeStudy::EachParticleShower()
          hdetaE0     = new TH1F(Form("hdetaE0_%i", eventNumber), Form("hdetaE0_%i", eventNumber), nbins, low, high);
          hdetadphi0  = new TH2F(Form("hdetadphi0_%i", eventNumber), Form("hdetadphi0_%i", eventNumber), nbins, low, high, nbins, low, high);
          hdetadphiE0 = new TH2F(Form("hdetadphiE0_%i", eventNumber), Form("hdetadphiE0_%i", eventNumber), nbins, low, high, nbins, low, high);
+
+         hEnergy = new TH2F(Form("hEnergy_%i", particleCount), Form("hEnergy_%i", particleCount), nBinsAlpha, Alphabinsx, nBinsR, Rbinsy);
+         hEnergy->Sumw2();
+
+         hEnergyAvg = new TH2F("hEnergyAvg", "hEnergyAvg", nBinsAlpha, Alphabinsx, nBinsR, Rbinsy);
+         hEnergyAvg->Sumw2();
+
+
+         hDrEnergy = new TH1F(Form("hDrEnergy_%i", particleCount), Form("hDrEnergy_%i", particleCount), nBinsR, Rbinsy);
+         hDrEnergy->Sumw2();
+
+         hDrEnergyAvg = new TH1F("hDrEnergyAvg", "hDrEnergyAvg", nBinsR, Rbinsy);
+         hDrEnergyAvg->Sumw2();
       }
 
       hdetaE0->Fill(deta0_mm, energy_hit);
       hdetadphi0->Fill(deta0_mm, dphi0_mm);
       hdetadphiE0->Fill(deta0_mm, dphi0_mm, energy_hit);
-
+      hEnergy->Fill(alpha, delta_r, energy_hit);
+      hDrEnergy->Fill(delta_r, energy_hit);
+      hDrEnergyAvg->Fill(delta_r, energy_hit);
+      hEnergyAvg->Fill(alpha, delta_r, energy_hit);
 
 
       if (NextEventNumber != eventNumber or ihit == hitsTree->GetEntries() - 1)
@@ -231,29 +313,50 @@ void ShowerShapeStudy::EachParticleShower()
          particleCount++;
 
          outfile->cd();
-         hdetaE0->Write();
-         hdetadphi0->Write();
-         hdetadphiE0->Write();
+         //detaE0->Write();
+         // hdetadphi0->Write();
+         // hdetadphiE0->Write();
+
+         hEnergy->Scale(1.0 / (hEnergy->Integral()));
+         //hEnergyAvg->Add(hEnergy);
+
+         hDrEnergy->Scale(1.0 / (hDrEnergy->Integral()));
+         //hDrEnergyAvg->Add(hDrEnergy);
+
+         hEnergy->Write();
+         hDrEnergy->Write();
+
 
          delete hdetaE0;
          delete hdetadphi0;
          delete hdetadphiE0;
+         delete hEnergy;
       }
 
 
 
-      if (isNewEvent and ihit != hitsTree->GetEntries() - 1)
+      if (isNewEvent and ihit != hitsTree->GetEntries())
       {
          hdetaE0     = new TH1F(Form("hdetaE0_%i", eventNumber), Form("hdetaE0_%i", eventNumber), nbins, low, high);
          hdetadphi0  = new TH2F(Form("hdetadphi0_%i", eventNumber), Form("hdetadphi0_%i", eventNumber), nbins, low, high, nbins, low, high);
          hdetadphiE0 = new TH2F(Form("hdetadphiE0_%i", eventNumber), Form("hdetadphiE0_%i", eventNumber), nbins, low, high, nbins, low, high);
+         hEnergy = new TH2F(Form("hEnergy_%i", particleCount), Form("hEnergy_%i", particleCount), nBinsAlpha, Alphabinsx, nBinsR, Rbinsy);
+
+         hDrEnergy = new TH1F(Form("hDrEnergy_%i", particleCount), Form("hDrEnergy_%i", particleCount), nBinsR, Rbinsy);
       }
 
 
-      if (particleCount == 20)
+      if (/*particleCount == 200 or*/ ihit == hitsTree->GetEntries() - 1)
       {
-         outfile->Close();
          cout << " Reach number of particles = " << particleCount << " exiting..." << endl;
+         outfile->cd();
+         hEnergyAvg->Scale(1.0 / particleCount);
+         hEnergyAvg->Scale(1.0 / hEnergyAvg->Integral());
+         hEnergyAvg->Write();
+         hDrEnergyAvg->Scale(1.0 / particleCount);
+         hDrEnergyAvg->Scale(1.0 / hDrEnergyAvg->Integral());
+         hDrEnergyAvg->Write();
+         outfile->Close();
          break;
       }
    }
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeThinning.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeThinning.cxx
index 91471d4297f8cd08881905ec7a1695f131d20048..e14d48d6259310cf10fec4151bef9f54bbdbc41b 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeThinning.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeThinning.cxx
@@ -21,17 +21,15 @@
 #include "TH2.h"
 
 #include "ShowerShapeThinning.h"
-#include "tools/CaloGeometryFromFile.h"
-#include "tools/CaloDetDescr/CaloDetDescrElement.h"
-
-
+#include "ISF_FastCaloSimParametrization/CaloGeometryFromFile.h"
+#include "ISF_FastCaloSimParametrization/CaloGeoDetDescrElement.h"
 
 using namespace std;
 
 
 ShowerShapeThinning::ShowerShapeThinning()
 {
-   m_debug = 0;
+   m_debug = 1;
 
    m_calolayer      = -1;
    m_PCAbin         = 0;
@@ -142,8 +140,20 @@ void ShowerShapeThinning::CreateHitsNtuple(TFile *file)
 
    int pcaEvent = -1;
 
+   int nevent = 0;
+
    // * loop over events
 
+
+   int previousEvent = -1;
+
+   cout << " No of events = " << m_chain->GetEntries() << endl;
+
+   TH1F *hEventEnergy = new TH1F("hEventEnergy", "hEventEnergy", m_chain->GetEntries(), 0, m_chain->GetEntries());
+
+   TH1F *hEventHit = new TH1F("hEventHit", "hEventHit", m_chain->GetEntries(), 0, m_chain->GetEntries());
+
+
    for (int ievent = 0; ievent < m_chain->GetEntries(); ievent++)
    {
       if (ievent % 200 == 0)
@@ -170,34 +180,52 @@ void ShowerShapeThinning::CreateHitsNtuple(TFile *file)
          continue;
       }
 
+      nevent++;
 
       // * loop over the cells and hits in each cell
 
+      if (m_debug) cout << " event number = " << ievent << endl;
+      // cout << " no of cells = " << (*m_cellVector).size() << endl;
+
+      int hitCount = 0;
+      float energyEvent = 0.;
+
+
       for (unsigned int icell = 0; icell < (*m_cellVector).size(); icell++)
       {
+
          for (unsigned int ihit = 0; ihit < ((FCS_matchedcell)(*m_cellVector)[icell]).hit.size(); ihit++)
          {
+            hitCount++;
+
             float energy = ((FCS_matchedcell)(*m_cellVector)[icell]).hit[ihit].hit_energy;
+            energyEvent += energy;
             float posx   = ((FCS_matchedcell)(*m_cellVector)[icell]).hit[ihit].hit_x;
             float posy   = ((FCS_matchedcell)(*m_cellVector)[icell]).hit[ihit].hit_y;
             float posz   = ((FCS_matchedcell)(*m_cellVector)[icell]).hit[ihit].hit_z;
 
+            if (m_debug) std::cout << " event = " << ievent << " cell = " << icell << " hit = " << ihit << " energy = " << energy << " pos x = " << posx << " pos y = " << posy << " pos z = " << posz << std::endl;
+
             TVector3 *pos = new TVector3(posx, posy, posz);
 
             // * hit eta, phi
             float etaHit = pos->PseudoRapidity();
             float phiHit = pos->Phi();
 
+            if (m_debug) std::cout << " event = " << ievent << " cell = " << icell << " hit = " << ihit << " energy = " << energy << " eta hit = " << etaHit << " phi hit = " << phiHit << std::endl;
+
             // * entrance eta
-            float etaEntrance = (*m_truthCollection)[0].TTC_entrance_eta[0];
-            float phiEntrance = (*m_truthCollection)[0].TTC_entrance_phi[0];
+            float etaEntrance = (*m_truthCollection)[0].newTTC_entrance_eta[0];
+            float phiEntrance = (*m_truthCollection)[0].newTTC_entrance_phi[0];
+
+            if (m_debug) std::cout << " event No = " << ievent << " eta entrance = " << etaEntrance << " phi entrance = " << phiEntrance << std::endl;
 
             float deta = etaHit - etaEntrance;
 
 
             // * calculate dphi
-            float y_entrance = ((*m_truthCollection)[0].TTC_entrance_r[0]) * TMath::Sin((*m_truthCollection)[0].TTC_entrance_phi[0]);
-            float x_entrance = ((*m_truthCollection)[0].TTC_entrance_r[0]) * TMath::Cos((*m_truthCollection)[0].TTC_entrance_phi[0]);
+            float y_entrance = ((*m_truthCollection)[0].newTTC_entrance_r[0]) * TMath::Sin((*m_truthCollection)[0].newTTC_entrance_phi[0]);
+            float x_entrance = ((*m_truthCollection)[0].newTTC_entrance_r[0]) * TMath::Cos((*m_truthCollection)[0].newTTC_entrance_phi[0]);
 
             TVector2 *entrance = new TVector2(x_entrance, y_entrance);
             TVector2 *hit      = new TVector2(pos->X(), pos->Y());
@@ -217,8 +245,17 @@ void ShowerShapeThinning::CreateHitsNtuple(TFile *file)
             sumPhi += phiHit;
             nhits++;
 
+            bool newEvent = false;
+            if ((ievent == 0 and icell == 0 and ihit == 0 ) or ievent != previousEvent)
+            {
+               //cout << " --> Start of a new event " << endl;
+               newEvent = true;
+
+            }
+
             // * fill the hits TTree
             m_eventNumber = ievent; // save the event number;
+            m_newEvent    = newEvent;
             m_energy      = energy;
             m_etaHit      = etaHit;
             m_phiHit      = phiHit;
@@ -228,8 +265,21 @@ void ShowerShapeThinning::CreateHitsNtuple(TFile *file)
             m_dphi        = dphi;
             m_PCA         = vbinsPCA.at(pcaEvent);
             m_hitsNtuple->Fill();
+            previousEvent = ievent;
          } // end loop over cells
       }    // end loop over hits
+
+      if (m_debug)
+      {
+         cout << " ==> hitCount = " << hitCount << endl;
+         cout << " ==> event energy = " << energyEvent << endl;
+         cout << " ==> total_hit_energy = " << m_total_hit_energy << endl;
+         cout << " ==> total_g4hit_energy = " << m_total_g4hit_energy << endl;
+      }
+
+      hEventEnergy->SetBinContent(ievent, energyEvent);
+      hEventHit->SetBinContent(ievent, hitCount);
+
    }       // end loop over events
 
    if (m_debug)
@@ -267,7 +317,7 @@ void ShowerShapeThinning::CreateHitsNtuple(TFile *file)
       cout << " cell r = " << cellr << ", cell z = " << cellz << ", cell eta = " << celleta << ", cell deta= " << cellDeta << ", cell dpi = " << cellDphi << endl;
    }
 
-
+   cout << " Number of events = " << nevent << endl;
 
    //* fill global TTree
 
@@ -288,6 +338,8 @@ void ShowerShapeThinning::CreateHitsNtuple(TFile *file)
    file->cd();
    m_hitsNtuple->Write();
    m_globalNtuple->Write();
+   hEventEnergy->Write();
+   hEventHit->Write();
    file->Close();
 }
 
@@ -558,6 +610,12 @@ void ShowerShapeThinning::GetCellGeom(float etacentre, float phicentre)
 
 
    const CaloGeoDetDescrElement *cell;
+
+   // const CaloGeoGeometry *cell;
+   //
+
+
+
    cell = geo->getDDE(layer, etacentre, phicentre);
 
    cellr    = cell->r();
@@ -616,6 +674,9 @@ void ShowerShapeThinning::InitInputTree()
    m_truthPz         = nullptr;
    m_truthE          = nullptr;
 
+   m_total_hit_energy = 0.;
+   m_total_g4hit_energy = 0.;
+
 
    TString layer = Form("Sampling_%i", m_calolayer);
    if (m_debug)
@@ -630,12 +691,15 @@ void ShowerShapeThinning::InitInputTree()
    m_chain->SetBranchAddress("TruthPy", &m_truthPy);
    m_chain->SetBranchAddress("TruthPz", &m_truthPz);
    m_chain->SetBranchAddress("TruthE", &m_truthE);
+   m_chain->SetBranchAddress("total_hit_energy", &m_total_hit_energy);
+   m_chain->SetBranchAddress("total_g4hit_energy", &m_total_g4hit_energy);
 }
 
 
 void ShowerShapeThinning::BookHitsTree(TTree *hitsNtuple, TTree *globalNtuple)
 {
    m_eventNumber = -1;
+   m_newEvent = false;
    m_energy      = 0.;
    m_etaHit      = 0.;
    m_phiHit      = 0.;
@@ -656,6 +720,7 @@ void ShowerShapeThinning::BookHitsTree(TTree *hitsNtuple, TTree *globalNtuple)
    m_cellDphi  = 0.;
 
    hitsNtuple->Branch("eventNumber", &m_eventNumber);
+   hitsNtuple->Branch("newEvent", &m_newEvent);
    hitsNtuple->Branch("energy_hit", &m_energy);
    hitsNtuple->Branch("eta_hit", &m_etaHit);
    hitsNtuple->Branch("phi_hit", &m_phiHit);
@@ -681,6 +746,7 @@ void ShowerShapeThinning::BookHitsTree(TTree *hitsNtuple, TTree *globalNtuple)
 void ShowerShapeThinning::InitHitsTree(TTree *hitsNtuple, TTree *globalNtuple)
 {
    m_eventNumber = -1;
+   m_newEvent = false;
    m_energy      = 0.;
    m_etaHit      = 0.;
    m_phiHit      = 0.;
@@ -701,6 +767,7 @@ void ShowerShapeThinning::InitHitsTree(TTree *hitsNtuple, TTree *globalNtuple)
    m_cellDphi  = 0.;
 
    hitsNtuple->SetBranchAddress("eventNumber", &m_eventNumber);
+   hitsNtuple->SetBranchAddress("newEvent", &m_newEvent);
    hitsNtuple->SetBranchAddress("energy_hit", &m_energy);
    hitsNtuple->SetBranchAddress("eta_hit", &m_etaHit);
    hitsNtuple->SetBranchAddress("phi_hit", &m_phiHit);
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeThinning.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeThinning.h
index 4679991d0bb900466cd94b4d0385719c6fbd8380..194fc23dd5c067faf53b227ff2dafa4f576789c7 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeThinning.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/ShowerShapeThinning.h
@@ -9,7 +9,7 @@
 #include "TTree.h"
 #include "TH1.h"
 
-#include "tools/FCS_Cell.h"
+#include "tools/newFCS_Cell.h"
 
 
 
@@ -100,9 +100,12 @@ private:
    std::vector<float> *m_truthPy;
    std::vector<float> *m_truthPz;
    std::vector<float> *m_truthE;
+   float m_total_hit_energy;
+   float m_total_g4hit_energy;
 
    // * for hits TTree
    int m_eventNumber;
+   bool m_newEvent;
    float m_energy;
    float m_etaHit;
    float m_phiHit;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateComparisonLatex.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateComparisonLatex.C
new file mode 100644
index 0000000000000000000000000000000000000000..423cc95e298d3795f4a73c2e6ecd3bf71c795b0d
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateComparisonLatex.C
@@ -0,0 +1,145 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TROOT.h"
+#include "TFile.h"
+#include "TH2.h"
+#include "TString.h"
+#include "TLatex.h"
+
+#include <iostream>
+
+
+void CreateComparisonLatex() {
+
+
+	std::vector<int> layer;
+
+	layer.push_back(0);
+	layer.push_back(1);
+	layer.push_back(2);
+	layer.push_back(3);
+	// layer.push_back(12);
+	// layer.push_back(13);
+	// layer.push_back(14);
+
+
+
+	std::string topDir = "/Users/hasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/comparison_1mm_opt/";
+
+	std::string file = "/Users/hasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/comparison_1mm_opt/plot_book/ElectronComparisonPlotbook.tex";
+
+	ofstream mylatex;
+	mylatex.open(file.c_str());
+
+	if (mylatex.is_open())
+	{
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
+		mylatex << "\\documentclass[english,professionalfonts]{beamer}" << endl;
+		mylatex << "\\usefonttheme{serif}" << endl;
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
+		mylatex << "\\usepackage{beamerthemesplit}" << endl;
+		mylatex << "\\usepackage{multicol}" << endl;
+		mylatex << "\\usepackage{amsmath}" << endl;
+		mylatex << "\\usepackage{amssymb}" << endl;
+		mylatex << "\\usepackage{array}" << endl;
+		mylatex << "\\usepackage{graphicx}" << endl;
+		mylatex << "\\usepackage{multimedia}" << endl;
+		mylatex << "\\usepackage{hyperref}" << endl;
+		mylatex << "\\usepackage{url}" << endl;
+		mylatex << "%% Define a new 'leo' style for the package that will use a smaller font." << endl;
+		mylatex << "\\makeatletter" << endl;
+		mylatex << "\\def\\url@leostyle{\\@ifundefined{selectfont}{\\def\\UrlFont{\\sf}}{\\def\\UrlFont{\\small\\ttfamily}}}" << endl;
+		mylatex << "\\makeatother" << endl;
+		mylatex << "%% Now actually use the newly defined style." << endl;
+		mylatex << "\\urlstyle{leo}" << endl;
+		mylatex << "\\usepackage{cancel}" << endl;
+		mylatex << "\\usepackage{color}" << endl;
+		mylatex << "\\usepackage{verbatim}" << endl;
+		mylatex << "\\usepackage{epsfig}" << endl;
+		mylatex << "\\usepackage{fancybox}" << endl;
+		mylatex << "\\usepackage{xcolor}" << endl;
+		mylatex << "%\\usepackage{fontspec}" << endl;
+		mylatex << "%\\usepackage{booktabs,caption}" << endl;
+		mylatex << "%\\usepackage{eulervm}" << endl;
+		mylatex << "\\usepackage{textpos}" << endl;
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
+		mylatex << "\\usetheme{Warsaw}" << endl;
+		mylatex << "\\usecolortheme{default}" << endl;
+		mylatex << "%\\setbeamercovered{transparent}" << endl;
+		mylatex << "\\beamertemplatenavigationsymbolsempty" << endl;
+		mylatex << "%\\setbeamertemplate" << endl;
+		mylatex << "\\setbeamertemplate{footline}[page number]" << endl;
+		mylatex << "%%\\setsansfont{Fontin Sans}" << endl;
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
+		mylatex << "\\definecolor{jgreen}{cmyk}{0.99,0,0.52,0}" << endl;
+		mylatex << "\\definecolor{green}{rgb}{0.,.6,0.}" << endl;
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
+		mylatex << "\\title{Plotbook: Electron Merging schemes}" << endl;
+		mylatex << "\\author{ Hasib Ahmed}" << endl;
+		mylatex << "\\institute{ University of Edinburgh}" << endl;
+		mylatex << " % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % " << endl;
+		mylatex << "\\begin{document}" << endl;
+		mylatex << " \\maketitle" << endl;
+
+		mylatex << "\\begin{frame}" << endl;
+		mylatex << "\\frametitle{Parameters}" << endl;
+		mylatex << "\\begin{center}" << endl;
+		mylatex << "\\begin{itemize}" << endl;
+		mylatex << "\\item Particle = $\\pi^ {\\pm}$" << endl;
+		mylatex << "\\item Energy = 50 GeV" << endl;
+		mylatex << "\\item  0.20 $ < | \\eta | < $ 0.25"  << endl;
+		mylatex << "\\item Merging schemes: 1mm and optimized" << endl;
+		mylatex << "\\item 5mm  binning is used for the plots except for $\\delta\\eta$ in EMB1µ" << endl;
+		mylatex << "\\end{itemize}" << endl;
+		mylatex << "\\includegraphics[width = 5cm] {" + topDir + "optimized_merging.png}" << endl;
+		mylatex << "\\end{center}" << endl;
+		mylatex << "\\end{frame}" << endl;
+
+
+
+
+		for (int i = 0; i < layer.size(); ++i)
+		{
+			for (int j = 1; j < 5; ++j)
+			{
+
+				std::string hitseta  = "hits_deta_layer" + std::to_string(layer.at(i)) + "_pca" + std::to_string(j) + ".png";
+				std::string hitsphi = "hits_dphi_layer" + std::to_string(layer.at(i)) + "_pca" + std::to_string(j) + ".png";
+				std::string energyeta = "energy_deta_layer" + std::to_string(layer.at(i)) + "_pca" + std::to_string(j) + ".png";
+				std::string energyphi = "energy_dphi_layer" + std::to_string(layer.at(i)) + "_pca" + std::to_string(j) + ".png";
+
+				std::string label = "EMB" + std::to_string(layer.at(i)) + ", bin(PCA) = " + std::to_string(j);
+
+				mylatex << "\\begin{frame}" << endl;
+				mylatex << "\\frametitle{" + label + "}" << endl;
+				mylatex << "\\includegraphics[width = 6cm] {" + topDir + hitseta + "}" << endl;
+				mylatex << "\\includegraphics[width = 6cm] {" + topDir + energyeta + "}" << endl;
+				mylatex << "\\end{frame}" << endl;
+
+				mylatex << "\\begin{frame}" << endl;
+				mylatex << "\\frametitle{" + label + "}" << endl;
+				mylatex << "\\includegraphics[width = 6cm] {" + topDir + hitsphi + "}" << endl;
+				mylatex << "\\includegraphics[width = 6cm] {" + topDir + energyphi + "}" << endl;
+				mylatex << "\\end{frame}" << endl;
+
+			}
+		}
+
+		mylatex << "\\end{document}" << endl;
+		mylatex.close();
+	}
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateElectronComparisonPlots.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateElectronComparisonPlots.C
new file mode 100644
index 0000000000000000000000000000000000000000..8bc3dca5b8bd0e66646ec6ce28cb27249621313f
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateElectronComparisonPlots.C
@@ -0,0 +1,267 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TROOT.h"
+#include "TFile.h"
+#include "TH1.h"
+#include "TString.h"
+#include "TLegend.h"
+
+#include <iostream>
+
+
+void CreateElectronComparisonPlots() {
+
+
+	gStyle->SetOptStat(0);
+	gROOT->SetBatch(kTRUE);
+
+
+	std::vector<int> layer;
+
+	layer.push_back(0);
+	layer.push_back(1);
+	layer.push_back(2);
+	layer.push_back(3);
+
+
+
+	for (int i = 0; i < layer.size(); ++i)
+	{
+		for (int j = 1; j < 5; ++j)
+		{
+			std::string el1mmFile = "/Users/hasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/el_1mm/HitsAlphaDr_el_1mm_50.000000GeV_eta_0.200000_0.250000_layer" + std::to_string(layer.at(i)) + "_PCAbin" + std::to_string(j) + ".root";
+
+			std::string eloptFile = "/Users/hasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/el_opt/HitsAlphaDr_el_opt_50.000000GeV_eta_0.200000_0.250000_layer" + std::to_string(layer.at(i)) + "_PCAbin" + std::to_string(j) + ".root";
+
+
+			std::cout << " location of el 1mm file =" << el1mmFile << std::endl;
+			std::cout << " location of el opt file =" << eloptFile << std::endl;
+
+
+			std::string outDetaHits = "/Users/hasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/comparison_1mm_opt/hits_deta_layer" + std::to_string(layer.at(i)) + "_pca" + std::to_string(j) + ".png";
+
+			std::string outDetaEnergy = "/Users/hasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/comparison_1mm_opt/energy_deta_layer" + std::to_string(layer.at(i)) + "_pca" + std::to_string(j) + ".png";
+
+			std::string outDphiHits = "/Users/hasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/comparison_1mm_opt/hits_dphi_layer" + std::to_string(layer.at(i)) + "_pca" + std::to_string(j) + ".png";
+
+			std::string outDphiEnergy = "/Users/hasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/comparison_1mm_opt/energy_dphi_layer" + std::to_string(layer.at(i)) + "_pca" + std::to_string(j) + ".png";
+
+
+			TFile *f1mm = TFile::Open(el1mmFile.c_str());
+			TFile *fopt = TFile::Open(eloptFile.c_str());
+
+
+			std::cout << " f1mm = " << f1mm << std::endl;
+			std::cout << " fopt = " << fopt << std::endl;
+
+
+			TH1F *hdeta_1mm = (TH1F*)f1mm->Get("hdeta_corr_mm");
+			TH1F *hdphi_1mm = (TH1F*)f1mm->Get("hdphi_corr_mm");
+			TH1F *hdeta_opt = (TH1F*)fopt->Get("hdeta_corr_mm");
+			TH1F *hdphi_opt = (TH1F*)fopt->Get("hdphi_corr_mm");
+
+			TH1F *hEdeta_1mm = (TH1F*)f1mm->Get("hdetaE_corr_mm");
+			TH1F *hEdphi_1mm = (TH1F*)f1mm->Get("hdphiE_corr_mm");
+			TH1F *hEdeta_opt = (TH1F*)fopt->Get("hdetaE_corr_mm");
+			TH1F *hEdphi_opt = (TH1F*)fopt->Get("hdphiE_corr_mm");
+
+
+			hdeta_1mm->Scale(1 / hdeta_1mm->Integral());
+			hdphi_1mm->Scale(1 / hdphi_1mm->Integral());
+
+			hdeta_opt->Scale(1 / hdeta_opt->Integral());
+			hdphi_opt->Scale(1 / hdphi_opt->Integral());
+
+
+			hEdeta_1mm->Scale(1 / hEdeta_1mm->Integral());
+			hEdphi_1mm->Scale(1 / hEdphi_1mm->Integral());
+
+			hEdeta_opt->Scale(1 / hEdeta_opt->Integral());
+			hEdphi_opt->Scale(1 / hEdphi_opt->Integral());
+
+
+
+
+			hdeta_1mm->GetXaxis()->SetTitle("#delta#eta [mm]");
+			hdeta_1mm->GetYaxis()->SetTitle("hits norm.");
+
+			hdphi_1mm->GetXaxis()->SetTitle("#delta#phi [mm]");
+			hdphi_1mm->GetYaxis()->SetTitle("hits norm.");
+
+			hdeta_opt->GetXaxis()->SetTitle("#delta#eta [mm]");
+			hdeta_opt->GetYaxis()->SetTitle("hits norm.");
+
+			hdphi_opt->GetXaxis()->SetTitle("#delta#phi [mm]");
+			hdphi_opt->GetYaxis()->SetTitle("hits norm.");
+
+			hEdeta_1mm->GetXaxis()->SetTitle("#delta#eta [mm]");
+			hEdeta_1mm->GetYaxis()->SetTitle("energy norm.");
+
+			hEdphi_1mm->GetXaxis()->SetTitle("#delta#phi [mm]");
+			hEdphi_1mm->GetYaxis()->SetTitle("energy norm.");
+
+			hEdeta_opt->GetXaxis()->SetTitle("#delta#eta [mm]");
+			hEdeta_opt->GetYaxis()->SetTitle("energy norm.");
+
+			hEdphi_opt->GetXaxis()->SetTitle("#delta#phi [mm]");
+			hEdphi_opt->GetYaxis()->SetTitle("energy norm.");
+
+
+			hdeta_1mm->GetYaxis()->SetTitleOffset(1.4);
+			hdphi_1mm->GetYaxis()->SetTitleOffset(1.4);
+			hdeta_opt->GetYaxis()->SetTitleOffset(1.4);
+			hdphi_opt->GetYaxis()->SetTitleOffset(1.4);
+
+			hEdeta_1mm->GetYaxis()->SetTitleOffset(1.4);
+			hEdphi_1mm->GetYaxis()->SetTitleOffset(1.4);
+			hEdeta_opt->GetYaxis()->SetTitleOffset(1.4);
+			hEdphi_opt->GetYaxis()->SetTitleOffset(1.4);
+
+
+			if (layer.at(i) == 1) {
+				hdeta_1mm->Rebin(1);
+				hdeta_opt->Rebin(1);
+			} else {
+				hdeta_1mm->Rebin(5);
+				hdphi_1mm->Rebin(5);
+				hdeta_opt->Rebin(5);
+				hdphi_opt->Rebin(5);
+
+				hEdeta_1mm->Rebin(5);
+				hEdphi_1mm->Rebin(5);
+				hEdeta_opt->Rebin(5);
+				hEdphi_opt->Rebin(5);
+			}
+
+			hdeta_1mm->GetXaxis()->SetRangeUser(-50, 50);
+			hdphi_1mm->GetXaxis()->SetRangeUser(-50, 50);
+
+			hdeta_opt->GetXaxis()->SetRangeUser(-50, 50);
+			hdphi_opt->GetXaxis()->SetRangeUser(-50, 50);
+
+			hEdeta_1mm->GetXaxis()->SetRangeUser(-50, 50);
+			hEdphi_1mm->GetXaxis()->SetRangeUser(-50, 50);
+
+			hEdeta_opt->GetXaxis()->SetRangeUser(-50, 50);
+			hEdphi_opt->GetXaxis()->SetRangeUser(-50, 50);
+
+
+
+			hdeta_1mm->SetLineColor(kRed);
+			hdphi_1mm->SetLineColor(kRed);
+			hdeta_opt->SetLineColor(kBlue);
+			hdphi_opt->SetLineColor(kBlue);
+			hEdeta_1mm->SetLineColor(kRed);
+			hEdphi_1mm->SetLineColor(kRed);
+			hEdeta_opt->SetLineColor(kBlue);
+			hEdphi_opt->SetLineColor(kBlue);
+
+
+			hdeta_1mm->SetTitle("");
+			hdphi_1mm->SetTitle("");
+			hdeta_opt->SetTitle("");
+			hdphi_opt->SetTitle("");
+			hEdeta_1mm->SetTitle("");
+			hEdphi_1mm->SetTitle("");
+			hEdeta_opt->SetTitle("");
+			hEdphi_opt->SetTitle("");
+
+
+
+
+
+			TCanvas * c1 = new TCanvas(Form("c1_layer%i_pca%i", layer.at(i), j), Form("c1_layer%i_pca%i", layer.at(i), j), 0, 0, 800, 700);
+			TCanvas * c2 = new TCanvas(Form("c2_layer%i_pca%i", layer.at(i), j), Form("c2_layer%i_pca%i", layer.at(i), j), 0, 0, 800, 700);
+			TCanvas * c3 = new TCanvas(Form("c3_layer%i_pca%i", layer.at(i), j), Form("c3_layer%i_pca%i", layer.at(i), j), 0, 0, 800, 700);
+			TCanvas * c4 = new TCanvas(Form("c4_layer%i_pca%i", layer.at(i), j), Form("c4_layer%i_pca%i", layer.at(i), j), 0, 0, 800, 700);
+
+
+			TLegend *l1 = new TLegend(0.75, 0.75, 0.85, 0.85);
+			l1->SetLineColor(0);
+			l1->AddEntry(hdeta_1mm, "1mm", "l");
+			l1->AddEntry(hdeta_opt, "opt", "l" );
+
+			TLegend *l2 = new TLegend(0.75, 0.75, 0.85, 0.85);
+			l2->SetLineColor(0);
+			l2->AddEntry(hdphi_1mm, "1mm", "l");
+			l2->AddEntry(hdphi_opt, "opt", "l" );
+
+			TLegend *l3 = new TLegend(0.75, 0.75, 0.85, 0.85);
+			l3->SetLineColor(0);
+			l3->AddEntry(hEdeta_1mm, "1mm", "l");
+			l3->AddEntry(hEdeta_opt, "opt", "l" );
+
+			TLegend *l4 = new TLegend(0.75, 0.75, 0.85, 0.85);
+			l4->SetLineColor(0);
+			l4->AddEntry(hEdphi_1mm, "1mm", "l");
+			l4->AddEntry(hEdphi_opt, "opt", "l" );
+
+
+			std::string label = "EMB" + std::to_string(layer.at(i)) + "   bin(PCA) = " + std::to_string(j);
+
+
+
+
+			// TLatex *latex1 = new TLatex(15, 0.1, label.c_str());;
+
+			TLatex *latex = new TLatex();
+			latex->SetTextSize(.02);
+			latex->SetTextFont(42);
+
+
+			c1->cd();
+			hdeta_1mm->Draw("hist");
+			hdeta_opt->Draw("hist same");
+			l1->Draw("same");
+			float yval1 = hdeta_1mm->GetMaximum();
+			latex->DrawLatex(15, yval1, label.c_str());
+			c1->SaveAs(outDetaHits.c_str());
+
+
+
+			c2->cd();
+			hEdeta_opt->Draw("hist");
+			hEdeta_1mm->Draw("hist same");
+			l2->Draw("same");
+			float yval2 = hEdeta_opt->GetMaximum();
+			latex->DrawLatex(15, yval2, label.c_str());
+			c2->SaveAs(outDetaEnergy.c_str());
+
+
+			c3->cd();
+			hdphi_1mm->Draw("hist");
+			hdphi_opt->Draw("hist same");
+			l3->Draw("same");
+			float yval3 = hdphi_1mm->GetMaximum();
+			latex->DrawLatex(15, yval3, label.c_str());
+			c3->SaveAs(outDphiHits.c_str());
+
+
+			c4->cd();
+			hEdphi_opt->Draw("hist");
+			hEdphi_1mm->Draw("hist same");
+			l3->Draw("same");
+			float yval4 = hEdphi_opt->GetMaximum();
+			latex->DrawLatex(15, yval4, label.c_str());
+			c4->SaveAs(outDphiEnergy.c_str());
+
+			// c1->Close();
+			// c2->Close();
+			// c3->Close();
+			// c4->Close();
+
+
+
+
+		}
+	}
+
+
+
+
+
+
+
+}
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateHitsGrid.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateHitsGrid.C
new file mode 100644
index 0000000000000000000000000000000000000000..8a83ec74549ffdb36886ccbfc598778546c944b7
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateHitsGrid.C
@@ -0,0 +1,75 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TROOT.h"
+#include "TFile.h"
+#include "TH2.h"
+#include "TString.h"
+
+#include <iostream>
+
+void CreateHitsGrid(std::string particle) {
+
+
+	std::vector<int> layer;
+// std::vector<int> pca;
+
+	layer.push_back(0);
+	layer.push_back(1);
+	layer.push_back(2);
+	layer.push_back(3);
+	layer.push_back(12);
+	//layer.push_back(13);
+	//layer.push_back(14);
+
+	std::string outFile = "../../run/output/shape_para/" + particle + "/nHits_" + particle + "_50.000000GeV_eta_0.200000_0.250000.csv";
+
+	std::cout << " csv file = " << outFile.c_str() << endl;
+
+	ofstream mycsv;
+	mycsv.open(outFile.c_str());
+
+	if (mycsv.is_open())
+	{
+
+		mycsv << "CaloLayer, PCAbin, nHits, nEvents" << endl;
+
+
+		for (int i = 0; i < layer.size(); ++i)
+		{
+			for (int j = 1; j < 6; ++j)
+			{
+				std::string file = "../../run/output/shape_para/" + particle + "/HitsAlphaDr_" + particle + "_50.000000GeV_eta_0.200000_0.250000_layer" + std::to_string(layer.at(i)) + "_PCAbin" + std::to_string(j) + ".root";
+
+
+
+				TFile * f = TFile::Open(file.c_str());
+				TTree* t = (TTree*)f->Get("hitsAlphaDr");
+
+				int m_eventNumber = -1;
+				t->SetBranchAddress("eventNumber", &m_eventNumber);
+
+				int nevents = 2;
+
+				for (int i = 0; i < t->GetEntries() - 1 ; i++) {
+
+					t->GetEntry(i);
+					int current_evt = m_eventNumber;
+					t->GetEntry(i + 1);
+					int next_evt = m_eventNumber;
+
+					if (current_evt != next_evt) nevents++;
+
+				}
+
+				mycsv << layer.at(i) << ", " << j << ", " << t->GetEntries() << ", " << nevents << endl;
+
+				f->Close();
+			}
+		}
+
+		mycsv.close();
+	}
+
+}
\ No newline at end of file
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateLatex.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateLatex.C
new file mode 100644
index 0000000000000000000000000000000000000000..f99dc24ce706912f96815730e315f46cc43480c3
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateLatex.C
@@ -0,0 +1,183 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TROOT.h"
+#include "TFile.h"
+#include "TH2.h"
+#include "TString.h"
+#include "TLatex.h"
+
+#include <iostream>
+
+void CreateLatex() {
+
+
+	std::vector<int> layer;
+// std::vector<int> pca;
+
+	layer.push_back(0);
+	layer.push_back(1);
+	layer.push_back(2);
+	layer.push_back(3);
+	layer.push_back(12);
+	//layer.push_back(13);
+	//layer.push_back(14);
+
+
+	std::string file = "/Users/ahasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/el_1mm/plot_books/InputDistribution_el_1mm_50.000000GeV_eta_0.200000_0.250000.tex";
+
+
+
+
+	ofstream mylatex;
+	mylatex.open(file.c_str());
+
+	if (mylatex.is_open())
+	{
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
+		mylatex << "\\documentclass[english,professionalfonts]{beamer}" << endl;
+		mylatex << "\\usefonttheme{serif}" << endl;
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
+		mylatex << "\\usepackage{beamerthemesplit}" << endl;
+		mylatex << "\\usepackage{multicol}" << endl;
+		mylatex << "\\usepackage{amsmath}" << endl;
+		mylatex << "\\usepackage{amssymb}" << endl;
+		mylatex << "\\usepackage{array}" << endl;
+		mylatex << "\\usepackage{graphicx}" << endl;
+		mylatex << "\\usepackage{multimedia}" << endl;
+		mylatex << "\\usepackage{hyperref}" << endl;
+		mylatex << "\\usepackage{url}" << endl;
+		mylatex << "%% Define a new 'leo' style for the package that will use a smaller font." << endl;
+		mylatex << "\\makeatletter" << endl;
+		mylatex << "\\def\\url@leostyle{\\@ifundefined{selectfont}{\\def\\UrlFont{\\sf}}{\\def\\UrlFont{\\small\\ttfamily}}}" << endl;
+		mylatex << "\\makeatother" << endl;
+		mylatex << "%% Now actually use the newly defined style." << endl;
+		mylatex << "\\urlstyle{leo}" << endl;
+		mylatex << "\\usepackage{cancel}" << endl;
+		mylatex << "\\usepackage{color}" << endl;
+		mylatex << "\\usepackage{verbatim}" << endl;
+		mylatex << "\\usepackage{epsfig}" << endl;
+		mylatex << "\\usepackage{fancybox}" << endl;
+		mylatex << "\\usepackage{xcolor}" << endl;
+		mylatex << "%\\usepackage{fontspec}" << endl;
+		mylatex << "%\\usepackage{booktabs,caption}" << endl;
+		mylatex << "%\\usepackage{eulervm}" << endl;
+		mylatex << "\\usepackage{textpos}" << endl;
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
+		mylatex << "\\usetheme{Warsaw}" << endl;
+		mylatex << "\\usecolortheme{default}" << endl;
+		mylatex << "%\\setbeamercovered{transparent}" << endl;
+		mylatex << "\\beamertemplatenavigationsymbolsempty" << endl;
+		mylatex << "%\\setbeamertemplate" << endl;
+		mylatex << "\\setbeamertemplate{footline}[page number]" << endl;
+		mylatex << "%%\\setsansfont{Fontin Sans}" << endl;
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
+		mylatex << "\\definecolor{jgreen}{cmyk}{0.99,0,0.52,0}" << endl;
+		mylatex << "\\definecolor{green}{rgb}{0.,.6,0.}" << endl;
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl
+		        ;
+		mylatex << "\\title{Plotbook: 65 GeV, 0.20$< |\\eta| <$ 0.25 el}" << endl;
+		mylatex << "\\author{ Hasib Ahmed}" << endl;
+		mylatex << "\\institute{ University of Edinburgh}" << endl;
+		mylatex << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << endl;
+		mylatex << "\\begin{document}" << endl;
+		mylatex << " \\maketitle" << endl;
+
+		mylatex << "\\begin{frame}" << endl;
+		mylatex << "\\frametitle{Parameters}" << endl;
+		mylatex << "\\begin{center}" << endl;
+		mylatex << "\\begin{itemize}" << endl;
+		mylatex << "\\item Particle = $\\gamma^{0}$" << endl;
+		mylatex << "\\item Energy = 50 GeV" << endl;
+		mylatex << "\\item  0.20 $< |\\eta| <$ 0.25"  << endl;
+
+		mylatex << "\\end{itemize}" << endl;
+		mylatex << "\\end{center}" << endl;
+		mylatex << "\\end{frame}" << endl;
+
+
+
+
+		for (int i = 0; i < layer.size(); ++i)
+		{
+			for (int j = 1; j < 6; ++j)
+			{
+				std::string inDir = "/Users/ahasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/el_1mm/plots_layer" + std::to_string(layer.at(i)) + "_pca" + std::to_string(j) + "/";
+
+				std::string fig0  = "NNinput_hEnergy_zoom0.png";
+				std::string fig1  = "NNinput_hEnergy_zoom1.png";
+				std::string fig2  = "NNinput_hEnergy_zoom2.png";
+
+				std::string Nfig0  = "NNinput_hEnergyNorm_zoom0.png";
+				std::string Nfig1  = "NNinput_hEnergyNorm_zoom1.png";
+				std::string Nfig2  = "NNinput_hEnergyNorm_zoom2.png";
+
+				mylatex << "\\begin{frame}" << endl;
+				mylatex << "\\frametitle{Calolayer and PCA bin}" << endl;
+				mylatex << "\\begin{center}" << endl;
+				mylatex << "\\begin{itemize}" << endl;
+				mylatex << "\\item Calorimeter layer = " + std::to_string(layer.at(i)) << endl;
+				mylatex << "\\item PCA bin = " + std::to_string(j) << endl;
+				mylatex << "\\end{itemize}" << endl;
+				mylatex << "\\end{center}" << endl;
+				mylatex << "\\end{frame}" << endl;
+
+				// mylatex << "\\begin{frame}" << endl;
+				// mylatex << "\\frametitle{Gradient Energy}" << endl;
+				// mylatex << "\\begin{center}" << endl;
+				// mylatex << "\\includegraphics[width=8cm]{" + inDir + "EnergyDensityGradient.png" + "}" << endl;
+				// mylatex << "\\end{center}" << endl;
+				// mylatex << "\\end{frame}" << endl;
+
+				mylatex << "\\begin{frame}" << endl;
+				mylatex << "\\frametitle{Input distribution: Energy zoom0}" << endl;
+				mylatex << "\\begin{center}" << endl;
+				mylatex << "\\includegraphics[width=8cm]{" + inDir + fig0 + "}" << endl;
+				mylatex << "\\end{center}" << endl;
+				mylatex << "\\end{frame}" << endl;
+
+				mylatex << "\\begin{frame}" << endl;
+				mylatex << "\\frametitle{Input distribution: normalized Energy zoom0}" << endl;
+				mylatex << "\\begin{center}" << endl;
+				mylatex << "\\includegraphics[width=8cm]{" + inDir + Nfig0 + "}" << endl;
+				mylatex << "\\end{center}" << endl;
+				mylatex << "\\end{frame}" << endl;
+
+				mylatex << "\\begin{frame}" << endl;
+				mylatex << "\\frametitle{Input distribution: Energy zoom1}" << endl;
+				mylatex << "\\begin{center}" << endl;
+				mylatex << "\\includegraphics[width=8cm]{" + inDir + fig1 + "}" << endl;
+				mylatex << "\\end{center}" << endl;
+				mylatex << "\\end{frame}" << endl;
+
+				mylatex << "\\begin{frame}" << endl;
+				mylatex << "\\frametitle{Input distribution: normalized Energy zoom1}" << endl;
+				mylatex << "\\begin{center}" << endl;
+				mylatex << "\\includegraphics[width=8cm]{" + inDir + Nfig1 + "}" << endl;
+				mylatex << "\\end{center}" << endl;
+				mylatex << "\\end{frame}" << endl;
+
+				mylatex << "\\begin{frame}" << endl;
+				mylatex << "\\frametitle{Input distribution: Energy zoom2}" << endl;
+				mylatex << "\\begin{center}" << endl;
+				mylatex << "\\includegraphics[width=8cm]{" + inDir + fig2 + "}" << endl;
+				mylatex << "\\end{center}" << endl;
+				mylatex << "\\end{frame}" << endl;
+
+				mylatex << "\\begin{frame}" << endl;
+				mylatex << "\\frametitle{Input distribution: normalized Energy zoom2}" << endl;
+				mylatex << "\\begin{center}" << endl;
+				mylatex << "\\includegraphics[width=8cm]{" + inDir + Nfig2 + "}" << endl;
+				mylatex << "\\end{center}" << endl;
+				mylatex << "\\end{frame}" << endl;
+
+			}
+		}
+
+		mylatex << "\\end{document}" << endl;
+		mylatex.close();
+	}
+
+
+}
\ No newline at end of file
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateRootFile.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateRootFile.C
new file mode 100644
index 0000000000000000000000000000000000000000..0ea63ca1fa781f5c14bc94d36ec22cf0d1b6c514
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/CreateRootFile.C
@@ -0,0 +1,72 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TROOT.h"
+#include "TFile.h"
+#include "TH2.h"
+#include "TString.h"
+
+#include <iostream>
+
+void CreateRootFile() {
+
+
+	std::vector<int> layer;
+// std::vector<int> pca;
+
+	layer.push_back(0);
+	layer.push_back(1);
+	layer.push_back(2);
+	layer.push_back(3);
+	layer.push_back(12);
+	//layer.push_back(13);
+	//layer.push_back(14);
+
+
+	std::string outFile = "/Users/ahasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/el_1mm/InputDistribution_el_50.000000GeV_eta_0.200000_0.250000_Norm.root";
+
+	TFile *fout = new TFile(outFile.c_str(), "recreate");
+
+	double total_energy = 0.;
+
+	for (int i = 0; i < layer.size(); ++i)
+	{
+		for (int j = 1; j < 6; ++j)
+		{
+			std::string file = "/Users/ahasib/Documents/Analysis/FastCaloSim/ISF_FastCaloSim/run/output/shape_para/el_1mm/NNinput_el_1mm_50.000000GeV_eta_0.200000_0.250000_layer" + std::to_string(layer.at(i)) + "_PCAbin" + std::to_string(j) + ".root";
+
+
+
+			TFile * f = TFile::Open(file.c_str());
+
+
+
+			//TH1F *h = (TH1F*)f->Get("hDrEnergy");
+
+
+
+			// TH1F *h2 = (TH1F*)h->Clone(Form("hDrEnergy_layer%i_pca%i", layer.at(i), j));
+			// h2->SetTitle(Form("hDrEnergy_layer%i_pca%i", layer.at(i), j));
+
+
+
+			TH2F *h_LnEnergyDensity = (TH2F*)f->Get("hEnergyNorm");
+
+			TH2F *h2 = (TH2F*)h_LnEnergyDensity->Clone(Form("hEnergy_layer%i_pca%i", layer.at(i), j));
+			h2->SetTitle(Form("hEnergy_layer%i_pca%i", layer.at(i), j));
+
+			total_energy += h2->Integral();
+
+			cout << "* layer = " << layer.at(i) << " pca = " << j << " energy =" << h2->Integral() <<  endl;
+
+			fout->cd();
+			h2->Write();
+			f->Close();
+		}
+	}
+
+	fout->Close();
+
+
+}
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/GetCellInformation.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/GetCellInformation.C
new file mode 100644
index 0000000000000000000000000000000000000000..5aeb0cd3ad88bbe395be3c66380fceaab6d90939
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/GetCellInformation.C
@@ -0,0 +1,73 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TROOT.h"
+#include "TFile.h"
+#include "TH2.h"
+#include "TString.h"
+
+#include <iostream>
+
+void GetCellInformation(std::string particle) {
+
+
+	std::vector<int> layer;
+// std::vector<int> pca;
+
+	layer.push_back(0);
+	layer.push_back(1);
+	layer.push_back(2);
+	layer.push_back(3);
+	layer.push_back(12);
+	//layer.push_back(13);
+	//layer.push_back(14);
+
+	float cell_r = 0.;
+	float cell_z =  0.;
+	float cell_eta = 0.;
+
+
+
+
+	std::string outFile = "../../run/output/shape_para/" + particle + "/CellInfo_" + particle + "_50.000000GeV_eta_0.200000_0.250000.csv";
+
+	std::cout << " csv file = " << outFile.c_str() << endl;
+
+	ofstream mycsv;
+	mycsv.open(outFile.c_str());
+
+	if (mycsv.is_open())
+	{
+
+		mycsv << "CaloLayer, PCAbin, cell_r, cell_z, cell_eta" << endl;
+
+
+		for (int i = 0; i < layer.size(); ++i)
+		{
+			for (int j = 1; j < 6; ++j)
+			{
+				std::string file = "../../run/output/shape_para/" + particle + "/HitsAlphaDr_" + particle + "_50.000000GeV_eta_0.200000_0.250000_layer" + std::to_string(layer.at(i)) + "_PCAbin" + std::to_string(j) + ".root";
+
+
+
+				TFile * f = TFile::Open(file.c_str());
+				TTree* t = (TTree*)f->Get("global");
+				t->SetBranchAddress("cell_r", &cell_r);
+				t->SetBranchAddress("cell_z", &cell_z);
+				t->SetBranchAddress("cell_eta", &cell_eta);
+
+				t->GetEntry(0);
+
+				cout << " r, z, eta = " << cell_r << cell_z << cell_eta << endl;
+
+				mycsv << layer.at(i) << ", " << j << ", " << cell_r << ", " << cell_z << ", " << cell_eta << endl;
+
+				f->Close();
+			}
+		}
+
+		mycsv.close();
+	}
+
+}
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/PlotRMS.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/PlotRMS.C
new file mode 100644
index 0000000000000000000000000000000000000000..2c0ff012851b5cb487cbd873777f34f1ce74073c
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/PlotRMS.C
@@ -0,0 +1,70 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// this macro plots RMS
+
+#include "TROOT.h"
+#include "TFile.h"
+#include "TH1.h"
+#include "TString.h"
+
+#include <iostream>
+
+void PlotRMS() {
+
+	std::vector<int> layer;
+
+	layer.push_back(2);
+
+	std::string InputFile = "../../run/output/shape_para/photon/NNinput_photon_50.000000GeV_eta_0.200000_0.250000_layer2_PCAbin1.root";
+
+
+	std::string OutputFile = "../../run/output/shape_para/photon/NNinput_photon_50.000000GeV_eta_0.200000_0.250000_RMS.root";
+
+
+
+	TFile *fin = TFile::Open(InputFile.c_str());
+
+	TH1F *histo = (TH1F*)fin->Get("hDrEnergy");
+
+	int nbins = histo->GetNbinsX();
+	double nBinsR[nbins + 1];
+
+	cout << " sizeof(nBinsR) = " << sizeof(nBinsR) << endl;
+
+
+
+	for (int i = 1; i <= histo->GetNbinsX() + 1; i++) {
+
+		nBinsR[i - 1] = histo->GetBinLowEdge(i);
+
+	}
+
+	for (int i = 0; i < histo->GetNbinsX(); i++) {
+
+		std::cout << nBinsR[i] << std::endl;
+	}
+
+	TH1F *hRMS = new TH1F("hRMS", "hRMS", nbins, nBinsR);
+
+
+	for (int i = 1; i < histo->GetNbinsX(); i++) {
+		hRMS->SetBinContent(i, histo->GetBinError(i));
+
+	}
+
+	TFile *fout = new TFile(OutputFile.c_str(), "recreate");
+
+
+	fout->cd();
+	hRMS->Write();
+	fout->Close();
+
+
+
+
+
+
+}
+
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/TotalEvents.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/TotalEvents.C
new file mode 100644
index 0000000000000000000000000000000000000000..0f7aafd464ed68af37e41b4d3bb0388cd688696e
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/shapepara/scripts/TotalEvents.C
@@ -0,0 +1,52 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TChain.h"
+#include "TFile.h"
+#include "TTree.h"
+
+#include <iostream>
+#include <stdlib.h>
+
+
+using namespace std;
+
+void TotalEvents() {
+
+	vector < string > input;
+
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000001.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000002.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000003.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000004.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000005.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000006.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000007.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000008.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000009.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000010.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000011.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000012.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000013.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000014.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000015.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000016.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000017.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000018.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000019.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000020.matched_output.root");
+	input.push_back("root://eosatlas//eos/atlas/user/s/schaarsc/FCS/user.fladias.428137.FastCalo_pid11_E65536_etam35_35_zv_m100.e4001_s2865_r7736.w0_162706_matched_output.root/user.fladias.8834800._000021.matched_output.root");
+
+
+	TChain *mychain = new TChain("FCS_ParametrizationInput");
+
+	for (auto i : input)
+	{
+		mychain->Add(i.c_str());
+	}
+
+
+	cout << " * Prepare to run with entries = " << mychain->GetEntries() << endl;
+
+}
\ No newline at end of file
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_DigiPostInclude.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_DigiPostInclude.py
new file mode 100644
index 0000000000000000000000000000000000000000..3491c5354028b6eb42dd151458b011e8abc3ae2d
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_DigiPostInclude.py
@@ -0,0 +1,3 @@
+streamRDO.ItemList+=["ISF_FCS_Parametrization::FCS_StepInfoCollection#MergedEventSteps","LArHitContainer#*","TileHitVector#*"];
+from AthenaCommon.CfgGetter import getPublicTool
+getPublicTool("LArPileUpTool").CrossTalk=False
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_DigiTilePreInclude.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_DigiTilePostInclude.py
similarity index 59%
rename from Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_DigiTilePreInclude.py
rename to Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_DigiTilePostInclude.py
index 81eef137a23c55280010f51bfb420d6cb7410c0a..64d3c37f2e0839aad91dbbee4a8dbd2f74aa23be 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_DigiTilePreInclude.py
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_DigiTilePostInclude.py
@@ -1,7 +1,6 @@
 from AthenaCommon.AppMgr import ServiceMgr
-ServiceMgr.MessageSvc.OutputLevel= VERBOSE
-#rel 19 is configuring this via a tool!!
-ToolSvc.TileHitVecToCntTool.HitTimeFlag=1 
+
+ToolSvc.TileHitVecToCntTool.HitTimeFlag=1
 
 ServiceMgr.TileInfoLoader.NPhElec=0
 ServiceMgr.TileInfoLoader.NPhElecA=0
@@ -9,13 +8,14 @@ ServiceMgr.TileInfoLoader.NPhElecC=0
 ServiceMgr.TileInfoLoader.NPhElecD=0
 ServiceMgr.TileInfoLoader.NPhElecE=0
 
+topSequence.TileDigitsMaker.IntegerDigits=True
+
 ###########
 print ServiceMgr.TileInfoLoader
 print topSequence.TileDigitsMaker
 print ToolSvc.TileHitVecToCntTool
-topSequence.TileDigitsMaker.OutputLevel=1
-topSequence.TileDigitsMaker.IntegerDigits=True
-TileHitVecToCntTool.OutputLevel=1
-ToolSvc.TileRawChannelBuilderOptATLAS.OutputLevel=1
-########### 
-
+#topSequence.TileDigitsMaker.OutputLevel=1
+#TileHitVecToCntTool.OutputLevel=1
+#ToolSvc.TileRawChannelBuilderOptATLAS.OutputLevel=1
+#ServiceMgr.MessageSvc.OutputLevel= VERBOSE
+###########
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_SimPostInclude.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_SimPostInclude.py
index 0755665a169c6da85ad169b71d8b2ea2657a76dd..67017a344bb85806b0cb4485b6529dbf93939eee 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_SimPostInclude.py
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_SimPostInclude.py
@@ -1,10 +1,3 @@
-def add_my_user_action():
-    from G4AtlasApps import PyG4Atlas,AtlasG4Eng
-    MyAction = PyG4Atlas.UserAction( 'ISF_Geant4UserActions','FastCaloSimParamAction',['BeginOfEvent','EndOfEvent','BeginOfRun','EndOfRun','Step'])
-    MyAction.set_Properties({"shift_lar_subhit":"1"})
-    AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(MyAction)
-simFlags.InitFunctions.add_function("postInit", add_my_user_action)
-                           
 from ISF_FastCaloSimParametrization.ISF_FastCaloSimParametrizationConf import FastCaloSimParamAlg
 topSeq += FastCaloSimParamAlg()
-ISF_HITSStream.stream1.ItemList += ["ISF_FCS_Parametrization::FCS_StepInfoCollection#ZHMergedEventSteps"]
+ISF_HITSStream.stream1.ItemList += ["ISF_FCS_Parametrization::FCS_StepInfoCollection#MergedEventSteps"]
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_SimPreInclude.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_SimPreInclude.py
new file mode 100644
index 0000000000000000000000000000000000000000..d83a177b86b6ba833016980f76749750b6675c30
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_SimPreInclude.py
@@ -0,0 +1,20 @@
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::FastCaloSimParamActionTool',['Event','Run','Step'])
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"shift_lar_subhit",True)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"shorten_lar_step",True)
+# optimised merging scheme parameters
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxEtaPS",1)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxPhiPS",5)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxrPS",0)
+
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxEtaEM1",1)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxPhiEM1",5)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxrEM1",15)
+
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxEtaEM2",1)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxPhiEM2",5)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxrEM2",60)
+
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxEtaEM3",1)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxPhiEM3",5)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxrEM3",8)
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_SimPreInclude_1mm.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_SimPreInclude_1mm.py
new file mode 100644
index 0000000000000000000000000000000000000000..80367e58f00397c97c3c014b1c559a9aa5fdc0fb
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_FastCaloSimParametrization_SimPreInclude_1mm.py
@@ -0,0 +1,6 @@
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::FastCaloSimParamActionTool',['Event','Run','Step'])
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"shift_lar_subhit",True)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"shorten_lar_step",True)
+simFlags.UserActionConfig.addConfig('G4UA::FastCaloSimParamActionTool',"maxRadiusLAr",1)
+# optimised merging scheme parameters are not required for 1mm merging
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_ntuple.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_ntuple.py
index 21092900ef21f3de9b63021fde6afdfef730f665..e3fcc92a05aaa96197aa4446c69531debce89341 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_ntuple.py
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/share/ISF_ntuple.py
@@ -1,4 +1,3 @@
-
 from AthenaCommon.AppMgr import ServiceMgr
 import AthenaPoolCnvSvc.ReadAthenaPool
 
@@ -15,8 +14,8 @@ from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
 #athenaCommonFlags.FilesInput = glob( "ESDpion_eta1.pool.root" )
 #athenaCommonFlags.FilesInput = glob( "ESD_calo__211__E10000_10000__eta20_20_Evts0-1000_z03350.pool.root" )
 #athenaCommonFlags.FilesInput = glob( "ESD_*root" )
-#athenaCommonFlags.FilesInput = ["/afs/cern.ch/user/c/cmills/public/pions20GeV_fulldet.ESD.pool.root"] 
-#athenaCommonFlags.FilesInput = ["/afs/cern.ch/user/c/cmills/public/pions20GeV_z0150_fulldet.ESD.pool.root"] 
+#athenaCommonFlags.FilesInput = ["/afs/cern.ch/user/c/cmills/public/pions20GeV_fulldet.ESD.pool.root"]
+#athenaCommonFlags.FilesInput = ["/afs/cern.ch/user/c/cmills/public/pions20GeV_z0150_fulldet.ESD.pool.root"]
 athenaCommonFlags.FilesInput = ["root://eosatlas//eos/atlas/user/z/zhubacek/FastCaloSim/ForMichael/ESD_evgen_calo__211_E50000_50000_eta20_25_Evts0-5500_vz_0_origin_calo.pool.root"]
 
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
@@ -37,12 +36,12 @@ DetFlags.Forward_setOff()
 #include ('TrkDetDescrSvc/AtlasTrackingGeometrySvc.py')
 
 from ISF_FastCaloSimParametrization.ISF_FastCaloSimParametrizationConf import ISF_HitAnalysis
-topSequence += ISF_HitAnalysis() 
+topSequence += ISF_HitAnalysis()
 
 #This can be used to text dump the TruthEvent container
 #from TruthExamples.TruthExamplesConf import DumpMC
-#dumpMC = DumpMC();                                                                                                       
-#dumpMC.MCEventKey = "TruthEvent"                                                                                           
+#dumpMC = DumpMC();
+#dumpMC.MCEventKey = "TruthEvent"
 #topSequence += DumpMC(McEventKey = "TruthEvent")
 
 ISF_HitAnalysis = ISF_HitAnalysis()
@@ -51,12 +50,13 @@ ISF_HitAnalysis.NtupleFileName = 'ISF_HitAnalysis'
 ##############################
 #ISF_HitAnalysis.CaloBoundaryR = [ 0., 1148., 1148., 0. ]
 #ISF_HitAnalysis.CaloBoundaryZ = [ -3475., -3475., 3475., 3475. ]
-       
+
 ISF_HitAnalysis.CaloBoundaryR = 1148.0
 ISF_HitAnalysis.CaloBoundaryZ = 3549.5 #before: 3475.0
 ISF_HitAnalysis.CaloMargin=100 #=10cm
 ISF_HitAnalysis.NTruthParticles = 1 # Copy only one truth particle to the ntuples for now
-ISF_HitAnalysis.OutputLevel = WARNING
+#ISF_HitAnalysis.OutputLevel = WARNING
+ISF_HitAnalysis.OutputLevel = ERROR
 
 #############################
 ##### NEW TRACKING SETUP ####
@@ -65,8 +65,8 @@ mlog = logging.getLogger( 'ISF_HitAnalysis::configure:' )
 mlog.info("now configure the non-interacting propagator...")
 from TrkExSTEP_Propagator.TrkExSTEP_PropagatorConf import Trk__STEP_Propagator
 niPropagator = Trk__STEP_Propagator()
-niPropagator.MaterialEffects = False 
-ToolSvc+=niPropagator    
+niPropagator.MaterialEffects = False
+ToolSvc+=niPropagator
 mlog.info("configure nono-interacting propagator finished")
 
 mlog.info("now configure the TimedExtrapolator...")
@@ -81,7 +81,7 @@ from CaloTrackingGeometry.CaloTrackingGeometryConf import CaloSurfaceHelper
 caloSurfaceHelper = CaloSurfaceHelper()
 ToolSvc+=caloSurfaceHelper
 
-from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags 
+from TrkDetDescrSvc.TrkDetDescrJobProperties import TrkDetFlags
 
 ISF_HitAnalysis.CaloEntrance=TrkDetFlags.InDetContainerName()
 ISF_HitAnalysis.CaloSurfaceHelper=caloSurfaceHelper
@@ -100,8 +100,10 @@ ToolSvc+=fcsgeohelper
 ISF_HitAnalysis.CaloGeometryHelper=fcsgeohelper
 
 ISF_HitAnalysis.FastCaloSimCaloExtrapolation= getPublicTool('FastCaloSimCaloExtrapolation')
-ISF_HitAnalysis.FastCaloSimCaloExtrapolation.OutputLevel = DEBUG
-ToolSvc.FastCaloSimCaloExtrapolation.OutputLevel = DEBUG
+#ISF_HitAnalysis.FastCaloSimCaloExtrapolation.OutputLevel = DEBUG
+#ToolSvc.FastCaloSimCaloExtrapolation.OutputLevel = DEBUG
+ISF_HitAnalysis.FastCaloSimCaloExtrapolation.OutputLevel = ERROR
+ToolSvc.FastCaloSimCaloExtrapolation.OutputLevel = ERROR
 
 
 from GaudiSvc.GaudiSvcConf import THistSvc
@@ -115,7 +117,8 @@ ServiceMgr.THistSvc.Output += [ "ISF_HitAnalysis DATAFILE='"+OutputName+"' OPT='
 from AthenaCommon.GlobalFlags import jobproperties
 ServiceMgr.THistSvc.Output += [ "ISF_Geometry DATAFILE='output_geo.root' OPT='RECREATE'" ]
 
-ServiceMgr.MessageSvc.OutputLevel = INFO
+#ServiceMgr.MessageSvc.OutputLevel = INFO
+ServiceMgr.MessageSvc.OutputLevel = ERROR
 ServiceMgr.MessageSvc.defaultLimit = 9999999
 
 #All events by default
@@ -126,5 +129,3 @@ ServiceMgr.AuditorSvc.Auditors  += [ "ChronoAuditor"]
 
 AthenaPoolCnvSvc = Service("AthenaPoolCnvSvc")
 AthenaPoolCnvSvc.UseDetailChronoStat = TRUE
-
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FCAL_ChannelMap.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FCAL_ChannelMap.cxx
index 7171f9893815099da1c2b09788d0994b1ec8720a..4c2cbebd5f5d6a0a493740a39892afc0848a7ea6 100755
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FCAL_ChannelMap.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FCAL_ChannelMap.cxx
@@ -5,12 +5,11 @@
 // ***************************************************************************
 // Liquid Argon FCAL detector description package
 // -----------------------------------------
-// Copyright (C) 1998 by ATLAS Collaboration
 //
 //
 // 10-Sep-2000 S.Simion   Handling of the FCAL read-out identifiers
 //    Jan-2001 R.Sobie    Modify for persistency
-//    Feb-2002 R.Sobie    Use same FCAL geometry files as simulation 
+//    Feb-2002 R.Sobie    Use same FCAL geometry files as simulation
 //****************************************************************************
 
 #include "ISF_FastCaloSimParametrization/FCAL_ChannelMap.h"
@@ -27,7 +26,7 @@ const double cm = 10.;
 //const double FCAL_ChannelMap::m_tubeSpacing[] = {0.75*CLHEP::cm, 0.8179*CLHEP::cm, 0.90*CLHEP::cm};
 const double FCAL_ChannelMap::m_tubeSpacing[] = {0.75*cm, 0.8179*cm, 0.90*cm};
 
-FCAL_ChannelMap::FCAL_ChannelMap( int flag)          
+FCAL_ChannelMap::FCAL_ChannelMap( int flag)
 {
 
   /* === Initialize geometrical dimensions */
@@ -39,7 +38,7 @@ FCAL_ChannelMap::FCAL_ChannelMap( int flag)
   // FCAL1 small cells are 2x2 tubes
   m_tileDx[0] = 2. * m_tubeSpacing[0];
   m_tileDy[0] = 2. * m_tubeSpacing[0] * sqrt(3.)/2.;
-  
+
   // FCAL2 small cells are 2x3 tubes
   m_tileDx[1] = 2. * m_tubeSpacing[1];
   m_tileDy[1] = 3. * m_tubeSpacing[1] * sqrt(3.)/2.;
@@ -49,8 +48,8 @@ FCAL_ChannelMap::FCAL_ChannelMap( int flag)
   m_tileDy[2] = 6. * m_tubeSpacing[2] * sqrt(3.)/2.;
 
 
-  m_invert_x = flag & 1; 
-  m_invert_xy = flag & 2; 
+  m_invert_x = flag & 1;
+  m_invert_xy = flag & 2;
 
 }
 
@@ -84,7 +83,7 @@ void FCAL_ChannelMap::add_tube(const std::string & tileName, int mod, int /*id*/
 
   TubePosition tb(tilename, x*cm, y*cm,"");
   // Add offsets, becaues iy and ix can be negative HMA
-  
+
   i = i+200;
   j = j+200;
   //  m_tubeMap[mod-1][(j <<  16) + i] = tb;
@@ -110,7 +109,7 @@ void FCAL_ChannelMap::add_tube(const std::string & tileName, int mod, int /*id*/
 
   TubePosition tb(tilename, x*cm,y*cm, hvFT);
   // Add offsets, becaues iy and ix can be negative HMA
-  
+
   i = i+200;
   j = j+200;
   //  m_tubeMap[mod-1][(j <<  16) + i] = tb;
@@ -147,29 +146,29 @@ FCAL_ChannelMap::create_tileMap(int isam)
       float y             = (first->second).y();
       unsigned int ntubes = 1;
       TilePosition tp(x, y, ntubes);
-      m_tileMap[isam-1][tileName] = tp; 
+      m_tileMap[isam-1][tileName] = tp;
     }
     else{                                             // Existing tile
       float x             = (tile->second).x() + (first->second).x();
       float y             = (tile->second).y() + (first->second).y();
       unsigned int ntubes = (tile->second).ntubes() + 1;
       TilePosition tp(x, y, ntubes);
-      m_tileMap[isam-1][tileName] = tp; 
+      m_tileMap[isam-1][tileName] = tp;
     }
     ++first;
   }
 
   //
-  // List the number of tubes and tiles 
+  // List the number of tubes and tiles
   //
-  // std::cout << "FCAL::create_tilemap: FCAL # " << isam  
-  //	    << " Number of tiles = " << m_tileMap[isam-1].size() 
-  //	    << " Number of tubes = " << m_tubeMap[isam-1].size()
-  //	    << std::endl;
+  // std::cout << "FCAL::create_tilemap: FCAL # " << isam
+  //        << " Number of tiles = " << m_tileMap[isam-1].size()
+  //        << " Number of tubes = " << m_tubeMap[isam-1].size()
+  //        << std::endl;
 
   // this->print_tubemap(isam);
-  
-  
+
+
   //
   // loop over tiles and set (x,y) to average tile positions
   //
@@ -182,48 +181,48 @@ FCAL_ChannelMap::create_tileMap(int isam)
     float x             = (tilefirst->second).x() / xtubes;
     float y             = (tilefirst->second).y() / xtubes;
     TilePosition tp(x, y, ntubes);
-    m_tileMap[isam-1][tileName] = tp; 
+    m_tileMap[isam-1][tileName] = tp;
     ++tilefirst;
   }
 
 }
 
-//---------- for New LArFCAL_ID ------------------------ 
+//---------- for New LArFCAL_ID ------------------------
 
 // *********************************************************************
 //  get Tile ID
-//  
+//
 // Original code: Stefan Simion, Randy Sobie
 // -------------------------------------------------------------------
-//   This function computes the tile identifier for any given position 
+//   This function computes the tile identifier for any given position
 //   Inputs:
 //   - isam the sampling number, from G3 data;
 //   - x the tube x position, in CLHEP::cm, from G3 data;
 //   - y the tube y position, in CLHEP::cm, from G3 data.
 //   Outputs:
-//   - pair of indices eta, phi 
+//   - pair of indices eta, phi
 //
 //   Attention side-effect: x is changed by this function.
-// -------------------------------------------------------------------- 
-//   June 2002  HMA 
+// --------------------------------------------------------------------
+//   June 2002  HMA
 // ***********************************************************************
-bool 
-FCAL_ChannelMap::getTileID(int isam, float x_orig, float y_orig, 
-	int& eta, int& phi) const throw (std::range_error) 
+bool
+FCAL_ChannelMap::getTileID(int isam, float x_orig, float y_orig,
+        int& eta, int& phi) const throw (std::range_error)
 {
 
 //  /* ### MIRROR for compatibility between G3 and ASCII files ### */
 
-  float x = x_orig; 
-  float y = y_orig; 
+  float x = x_orig;
+  float y = y_orig;
 
   if(m_invert_xy){
-    x = y_orig; 
-    y = x_orig; 
-  } 
+    x = y_orig;
+    y = x_orig;
+  }
 
   if(m_invert_x) x = -x;
-  
+
   /* === Compute the tubeID */
   int ktx = (int) (x / m_tubeDx[isam-1]);
   int kty = (int) (y / m_tubeDy[isam-1]);
@@ -238,13 +237,13 @@ FCAL_ChannelMap::getTileID(int isam, float x_orig, float y_orig,
   // # # # #
   //  # # # #
   // # # # #
-  // 
+  //
   // in order to avoid this problem we have to make sure the integer
   // indices for x and y have either both to be even or both to be odd
   // (For Module 0 one has to be odd the other even ...). We take the
   // y-index and check for odd/even and change the x-index in case
   // it's different from the first tube in the current sampling ...
-  // 
+  //
   // S.M. update: in case we are in a hole of the integer grid the
   // relative x and y w.r.t to the original tube are used to assign a
   // tube according to the hexagonal pattern.
@@ -252,10 +251,10 @@ FCAL_ChannelMap::getTileID(int isam, float x_orig, float y_orig,
   tubemap_const_iterator  it = m_tubeMap[isam-1].begin();
   unsigned int firstId = it->first;
 
-  // take offset from actual map 
+  // take offset from actual map
   int ix = ktx+((int)((firstId&0xffff)-it->second.x()/m_tubeDx[isam-1]))+1;
   int iy = kty+((int)((firstId>>16)-it->second.y()/m_tubeDy[isam-1]))+1;
-  
+
   int isOddEven = (((firstId>>16)%2)+(firstId%2))%2;
   bool movex = false;
 
@@ -264,25 +263,25 @@ FCAL_ChannelMap::getTileID(int isam, float x_orig, float y_orig,
     if ( fabs(yc) > 0.5/sqrt(3) ) {
       double xk = x/m_tubeDx[isam-1] - ktx;
       if ( xk > 0.5 ) {
-	xk = 1 - xk;
+        xk = 1 - xk;
       }
       double yn = 0.5-xk/3;
       if ( fabs(yc) > fabs(yn) ) {
-	if ( yc > 0 ) 
-	  iy++;
-	else
-	  iy--;
+        if ( yc > 0 )
+          iy++;
+        else
+          iy--;
       }
-      else 
-	movex = true;
+      else
+        movex = true;
     }
-    else 
+    else
       movex = true;
     if ( movex ) {
-      if ( x/m_tubeDx[isam-1] - ktx > 0.5 ) 
-	ix++;
+      if ( x/m_tubeDx[isam-1] - ktx > 0.5 )
+        ix++;
       else
-	ix--;
+        ix--;
     }
   }
 
@@ -294,10 +293,10 @@ FCAL_ChannelMap::getTileID(int isam, float x_orig, float y_orig,
     phi = tilename & 0xffff;
     eta = tilename >> 16;
     return true ;
-  } 
-  // reach here only if it failed the second time. 
+  }
+  // reach here only if it failed the second time.
 
-  return false; 
+  return false;
 
 }
 
@@ -306,27 +305,27 @@ FCAL_ChannelMap::getTileID(int isam, float x_orig, float y_orig,
 /* ----------------------------------------------------------------------
    To decode the tile x position from the tile identifier
    ---------------------------------------------------------------------- */
-float 
+float
 FCAL_ChannelMap::x(int isam, int eta, int phi) const
                                     throw(std::range_error)
 {
-  if(m_invert_xy){ 
-   // temp turn off the flag 
-   m_invert_xy=false; 
-   float y1 =  y(isam,eta,phi); 
-   m_invert_xy=true; 
-   return y1; 
-  } 
+  if(m_invert_xy){
+   // temp turn off the flag
+   m_invert_xy=false;
+   float y1 =  y(isam,eta,phi);
+   m_invert_xy=true;
+   return y1;
+  }
   float x;
 
-  tileName_t tilename = (eta << 16) + phi  ; 
+  tileName_t tilename = (eta << 16) + phi  ;
 
   tileMap_const_iterator it = m_tileMap[isam-1].find(tilename);
   if(it != m_tileMap[isam-1].end())
   {
-    x = (it->second).x(); 
-  } else 
-  { // can't find the tile, throw exception. 
+    x = (it->second).x();
+  } else
+  { // can't find the tile, throw exception.
       char l_str[200] ;
       snprintf(l_str, sizeof(l_str),
    "Error in FCAL_ChannelMap::x, wrong tile,phi= %d ,eta=: %d ",phi,eta);
@@ -341,7 +340,7 @@ FCAL_ChannelMap::x(int isam, int eta, int phi) const
     return x;
   }
 
-  return x; 
+  return x;
 
 }
 
@@ -349,30 +348,30 @@ FCAL_ChannelMap::x(int isam, int eta, int phi) const
 /* ----------------------------------------------------------------------
    To decode the tile y position from the tile identifier
    ---------------------------------------------------------------------- */
-float 
+float
 FCAL_ChannelMap::y(int isam, int eta, int phi) const
                                     throw(std::range_error)
 {
   if(m_invert_xy){
 
-   // temp turn off the flag 
-   m_invert_xy=false; 
-   float x1 =  x(isam,eta,phi); 
-   m_invert_xy=true; 
-   return x1; 
+   // temp turn off the flag
+   m_invert_xy=false;
+   float x1 =  x(isam,eta,phi);
+   m_invert_xy=true;
+   return x1;
 
   }
 
   float y;
 
-  tileName_t tilename = (eta << 16) + phi  ; 
+  tileName_t tilename = (eta << 16) + phi  ;
 
   tileMap_const_iterator it = m_tileMap[isam-1].find(tilename);
   if(it != m_tileMap[isam-1].end())
   {
-    y = (it->second).y(); 
-  } else 
-  { // can't find the tile, throw exception. 
+    y = (it->second).y();
+  } else
+  { // can't find the tile, throw exception.
       char l_str[200] ;
       snprintf(l_str, sizeof(l_str),
    "Error in FCAL_ChannelMap::x, wrong tile,phi= %d ,eta=: %d",phi,eta);
@@ -380,7 +379,7 @@ FCAL_ChannelMap::y(int isam, int eta, int phi) const
       throw std::range_error(errorMessage.c_str());
   }
 
-  return y; 
+  return y;
 }
 
 /* ----------------------------------------------------------------------
@@ -391,57 +390,57 @@ void FCAL_ChannelMap::tileSize(int sam, int ntubes, float &dx, float &dy) const
 
   dx = m_tubeDx[sam-1];
   dy = m_tubeDy[sam-1];
-  //      float ntubes =  (it->second).ntubes(); 
-  if(sam == 1 || sam == 3) { 
-    float scale =sqrt(ntubes);  
-    dx = dx * scale; 
-    dy = dy * scale; 
-  } 
+  //      float ntubes =  (it->second).ntubes();
+  if(sam == 1 || sam == 3) {
+    float scale =sqrt(ntubes);
+    dx = dx * scale;
+    dy = dy * scale;
+  }
   else  {
-    float scale = sqrt(ntubes/1.5); 
-    dx = dx * scale; 
-    dy = dy * scale * 1.5 ;               
+    float scale = sqrt(ntubes/1.5);
+    dx = dx * scale;
+    dy = dy * scale * 1.5 ;
   }
-  
+
 
   // There is a fundamental discrepancy between dx and dy. A cell will
   // contain twice as many distinct x-positions as y-positions.  Diagram:
-  
+
   // . . . .        -
   //. . . .         -
   //  . . . .       -   4 x dy
   // . . . .        -
-  // ||||||||             
-  //    8 x dx 
-  
+  // ||||||||
+  //    8 x dx
+
   dx = 2*dx;
-  
+
   if(m_invert_xy){
-    // switch xy 
-    float temp = dx; 
+    // switch xy
+    float temp = dx;
     dx = dy;
     dy = temp;
-  } 
-  
+  }
+
 }
 
 void FCAL_ChannelMap::tileSize(int sam, int eta, int phi,
-	float& dx, float& dy ) const  throw(std::range_error)
+        float& dx, float& dy ) const  throw(std::range_error)
 {
-  
-  tileName_t tilename = (eta << 16) + phi  ; 
-  
+
+  tileName_t tilename = (eta << 16) + phi  ;
+
   tileMap_const_iterator it = m_tileMap[sam-1].find(tilename);
   if(it != m_tileMap[sam-1].end()) {
-    int ntubes =  (it->second).ntubes(); 
+    int ntubes =  (it->second).ntubes();
     tileSize(sam,ntubes,dx,dy);
-    return ; 
+    return ;
   }
   else {
-    // can't find the tile, throw exception. 
+    // can't find the tile, throw exception.
     char l_str[200] ;
     snprintf(l_str, sizeof(l_str),
-	    "Error in FCAL_ChannelMap::tilesize, wrong tile,phi= %d ,eta=: %d ",phi,eta);
+            "Error in FCAL_ChannelMap::tilesize, wrong tile,phi= %d ,eta=: %d ",phi,eta);
     std::string errorMessage(l_str);
     throw std::range_error(errorMessage.c_str());
   }
@@ -458,10 +457,10 @@ FCAL_ChannelMap::print_tubemap( int imap) const
   std::cout << "First 10 elements of the New FCAL tube map : " << imap << std::endl;
   std::cout.precision(5);
   for ( int i=0;  i<10; i++, it++)
-    std::cout << std::hex << it->first << "\t" 
-	      << (it->second).get_tileName() << std::dec <<"\t" 
-	      << (it->second).x() <<"\t" 
-	      << (it->second).y() << std::endl;
+    std::cout << std::hex << it->first << "\t"
+              << (it->second).get_tileName() << std::dec <<"\t"
+              << (it->second).x() <<"\t"
+              << (it->second).y() << std::endl;
 
 }
 
@@ -487,5 +486,3 @@ FCAL_ChannelMap::tubemap_size (int imap) const
 {
   return m_tubeMap[imap-1].size();
 }
-
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx
index 97b6b2d5ffa923219dd7b4fe18f94a79d7fe03a4..5db3bfbbf96ee327f5d147c62e60abcacc92918e 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimCaloExtrapolation.cxx
@@ -63,27 +63,32 @@ StatusCode FastCaloSimCaloExtrapolation::initialize()
   IPartPropSvc* p_PartPropSvc=nullptr;
 
   ATH_CHECK(service("PartPropSvc",p_PartPropSvc));
-  if(!p_PartPropSvc) {
-    ATH_MSG_ERROR("could not find PartPropService");
-    return StatusCode::FAILURE;
-  }
+  if(!p_PartPropSvc)
+    {
+      ATH_MSG_ERROR("could not find PartPropService");
+      return StatusCode::FAILURE;
+    }
 
   m_particleDataTable = (HepPDT::ParticleDataTable*) p_PartPropSvc->PDT();
-  if(!m_particleDataTable) {
-    ATH_MSG_ERROR("PDG table not found");
-    return StatusCode::FAILURE;
-  }
+  if(!m_particleDataTable)
+    {
+      ATH_MSG_ERROR("PDG table not found");
+      return StatusCode::FAILURE;
+    }
   //#########################
 
   // Get TimedExtrapolator
-  if(!m_extrapolator.empty()) {
-    ATH_CHECK(m_extrapolator.retrieve());
-    ATH_MSG_INFO("Extrapolator retrieved "<< m_extrapolator);
-  }
+  if(!m_extrapolator.empty())
+    {
+      ATH_CHECK(m_extrapolator.retrieve());
+      ATH_MSG_INFO("Extrapolator retrieved "<< m_extrapolator);
+    }
 
   // Get CaloSurfaceHelper
   ATH_CHECK(m_caloSurfaceHelper.retrieve());
 
+  ATH_MSG_INFO("m_CaloBoundaryR "<<m_CaloBoundaryR<<" m_caloEntranceName "<<m_caloEntranceName);
+
   return StatusCode::SUCCESS;
 
 }
@@ -118,12 +123,14 @@ void FastCaloSimCaloExtrapolation::extrapolate(TFCSExtrapolationState& result,co
 
   ATH_MSG_INFO("FastCaloSimCaloExtrapolation::extrapolate: Truth extrapolation done");
 
-  for(std::vector<Trk::HitInfo>::iterator it = hitVector->begin();it < hitVector->end();++it) {
-    if((*it).trackParms) {
-      delete (*it).trackParms;
-      (*it).trackParms=0;
+  for(std::vector<Trk::HitInfo>::iterator it = hitVector->begin();it < hitVector->end();++it)
+    {
+      if((*it).trackParms)
+        {
+          delete (*it).trackParms;
+          (*it).trackParms=0;
+        }
     }
-  }
   delete hitVector;
   ATH_MSG_INFO("Done FastCaloSimCaloExtrapolation::extrapolate");
 }
@@ -170,7 +177,8 @@ std::vector<Trk::HitInfo>* FastCaloSimCaloExtrapolation::caloHits(const TFCSTrut
   double mom = isp.momentum().mag();
   double beta = mom/sqrt(mom*mom+mass*mass);
 
-  if ( tDec>0.) {
+  if ( tDec>0.)
+  {
   tDec = tDec/beta/CLHEP::c_light + isp.timeStamp();
   decayProc = 201;
   }
@@ -198,113 +206,120 @@ std::vector<Trk::HitInfo>* FastCaloSimCaloExtrapolation::caloHits(const TFCSTrut
   ATH_MSG_INFO( "[ fastCaloSim transport ] before calo entrance ");
 
   // get CaloEntrance if not done already
-  if(!m_caloEntrance) {
-    ATH_MSG_DEBUG("check1");
-    ATH_MSG_DEBUG("m_extrapolator "<<m_extrapolator);
-    ATH_MSG_DEBUG("trackingGeometry() "<<m_extrapolator->trackingGeometry());
-    ATH_MSG_DEBUG("trackingVolume(m_caloEntranceName) "<<m_extrapolator->trackingGeometry()->trackingVolume(m_caloEntranceName));
-
-    m_caloEntrance = m_extrapolator->trackingGeometry()->trackingVolume(m_caloEntranceName);
-
-    if(!m_caloEntrance) {
-      ATH_MSG_WARNING("CaloEntrance not found");
+  if(!m_caloEntrance)
+    {
+      m_caloEntrance = m_extrapolator->trackingGeometry()->trackingVolume(m_caloEntranceName);
+
+      if(!m_caloEntrance)
+        ATH_MSG_WARNING("CaloEntrance not found");
+      else
+        ATH_MSG_INFO("CaloEntrance found");
     }
-    else {
-      ATH_MSG_DEBUG("CaloEntrance found");
-    }
-  }
 
-  ATH_MSG_DEBUG( "[ fastCaloSim transport ] after calo entrance ");
+  ATH_MSG_INFO( "[ fastCaloSim transport ] after calo entrance ");
 
   const Trk::TrackParameters* caloEntry = 0;
 
-  if(m_caloEntrance && m_caloEntrance->inside(pos,0.001) && !m_extrapolator->trackingGeometry()->atVolumeBoundary(pos,m_caloEntrance,0.001)) {
-    std::vector<Trk::HitInfo>* dummyHitVector = 0;
-    if( charge==0 ) {
-      caloEntry = m_extrapolator->transportNeutralsWithPathLimit(inputPar,pathLim,timeLim,
-                                                                 Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
+  if(m_caloEntrance && m_caloEntrance->inside(pos,0.001) && !m_extrapolator->trackingGeometry()->atVolumeBoundary(pos,m_caloEntrance,0.001))
+    {
+      std::vector<Trk::HitInfo>* dummyHitVector = 0;
+      if( charge==0 )
+        {
+          caloEntry = m_extrapolator->transportNeutralsWithPathLimit(inputPar,pathLim,timeLim,
+                                                                     Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
 
+        }
+      else
+        {
+          caloEntry = m_extrapolator->extrapolateWithPathLimit(inputPar,pathLim,timeLim,
+                                                               Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
+        }
     }
-    else {
-      caloEntry = m_extrapolator->extrapolateWithPathLimit(inputPar,pathLim,timeLim,
-                                                           Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
-    }
-  }
-  else {
+  else
     caloEntry=&inputPar;
-  }
+
   ATH_MSG_INFO( "[ fastCaloSim transport ] after calo caloEntry ");
 
-  if(caloEntry) {
-    const Trk::TrackParameters* eParameters = 0;
+  if(caloEntry)
+    {
+      const Trk::TrackParameters* eParameters = 0;
 
-    // save Calo entry hit (fallback info)
-    hitVector->push_back(Trk::HitInfo(caloEntry->clone(),timeLim.time,nextGeoID,0.));
+      // save Calo entry hit (fallback info)
+      hitVector->push_back(Trk::HitInfo(caloEntry->clone(),timeLim.time,nextGeoID,0.));
 
-    ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting Calo transport from position eta="<<caloEntry->position().eta()<<" phi="<<caloEntry->position().phi()<<" d="<<caloEntry->position().mag() );
+      ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting Calo transport from position eta="<<caloEntry->position().eta()<<" phi="<<caloEntry->position().phi()<<" d="<<caloEntry->position().mag() );
 
-    if(charge==0) {
-      eParameters = m_extrapolator->transportNeutralsWithPathLimit(*caloEntry,pathLim,timeLim,
-                                                                   Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
-    }
-    else {
-      eParameters = m_extrapolator->extrapolateWithPathLimit(*caloEntry,pathLim,timeLim,
-                                                             Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
-    }
+      if(charge==0)
+        {
+          eParameters = m_extrapolator->transportNeutralsWithPathLimit(*caloEntry,pathLim,timeLim,
+                                                                       Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
+        }
+      else
+        {
+          eParameters = m_extrapolator->extrapolateWithPathLimit(*caloEntry,pathLim,timeLim,
+                                                                 Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
+        }
 
-    // save Calo exit hit (fallback info)
-    if(eParameters) hitVector->push_back(Trk::HitInfo(eParameters,timeLim.time,nextGeoID,0.));
-    //delete eParameters;   // HitInfo took ownership
-  } //if caloEntry
+      // save Calo exit hit (fallback info)
+      if(eParameters) hitVector->push_back(Trk::HitInfo(eParameters,timeLim.time,nextGeoID,0.));
+      //delete eParameters;   // HitInfo took ownership
+    } //if caloEntry
+
+  if(msgLvl(MSG::DEBUG))
+    {
+      std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
+      while (it < hitVector->end() )
+        {
+          int sample=(*it).detID;
+          Amg::Vector3D hitPos = (*it).trackParms->position();
+          ATH_MSG_DEBUG(" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag());
+          it++;
+        }
+    }
 
-  if(msgLvl(MSG::DEBUG)) {
-    std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-    while (it < hitVector->end() ) {
+  ATH_MSG_INFO("CHECK BEFORE");
+  std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
+  while(it < hitVector->end() )
+    {
       int sample=(*it).detID;
       Amg::Vector3D hitPos = (*it).trackParms->position();
-      ATH_MSG_DEBUG(" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag());
+      ATH_MSG_INFO(" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag());
       it++;
     }
-  }
-
-  std::cout<<"CHECK BEFORE"<<std::endl;
-  std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-  while(it < hitVector->end() ) {
-    int sample=(*it).detID;
-    Amg::Vector3D hitPos = (*it).trackParms->position();
-    std::cout<<" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag()<<std::endl;
-    it++;
-  }
 
-  unsigned int again=1;
-  while(again) {
-    again=0;
-    std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-    int ele=0;
-    while(it < hitVector->end()) {
-      int sample=(*it).detID;
-      //Amg::Vector3D hitPos = (*it).trackParms->position();
-      //std::cout<<" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag()<<std::endl;
-      //delete the entry from the hit vector if sample is<3000:
-      if(sample<3000) {
-        //std::cout<<"deleting element "<<ele<<std::endl;
-        hitVector->erase(it);
-        again=1;
-        it=hitVector->end();
-      }
-      ele++;
-      it++;
+  int again=1;
+  while(again)
+    {
+      again=0;
+      std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
+      int ele=0;
+      while(it < hitVector->end())
+        {
+          int sample=(*it).detID;
+          //Amg::Vector3D hitPos = (*it).trackParms->position();
+          //std::cout<<" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag()<<std::endl;
+          //delete the entry from the hit vector if sample is<3000:
+          if(sample<3000)
+            {
+              //std::cout<<"deleting element "<<ele<<std::endl;
+              hitVector->erase(it);
+              again=1;
+              it=hitVector->end();
+            }
+          ele++;
+          it++;
+        }
     }
-  }
 
-  std::cout<<"CHECK AFTER"<<std::endl;
+  ATH_MSG_INFO("CHECK AFTER");
   std::vector<Trk::HitInfo>::iterator it2 = hitVector->begin();
-  while(it2 < hitVector->end() ) {
-    int sample=(*it2).detID;
-    Amg::Vector3D hitPos = (*it2).trackParms->position();
-    std::cout<<" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag()<<std::endl;
-    it2++;
-  }
+  while(it2 < hitVector->end() )
+    {
+      int sample=(*it2).detID;
+      Amg::Vector3D hitPos = (*it2).trackParms->position();
+      ATH_MSG_INFO(" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag());
+      it2++;
+    }
 
 
   return hitVector;
@@ -329,31 +344,33 @@ void FastCaloSimCaloExtrapolation::extrapolate(TFCSExtrapolationState& result,co
   std::vector< std::vector<double> > phi_safe(3);
   std::vector< std::vector<double> > r_safe(3);
   std::vector< std::vector<double> > z_safe(3);
-  for(int subpos=SUBPOS_MID;subpos<=SUBPOS_EXT;++subpos) {
-    eta_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-    phi_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-    r_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-    z_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-  }
+  for(int subpos=SUBPOS_MID;subpos<=SUBPOS_EXT;++subpos)
+    {
+      eta_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
+      phi_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
+      r_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
+      z_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
+    }
 
   // only continue if inside the calo
-  if( fabs(result.CaloSurface_eta())<6 ) {
-    // now try to extrpolate to all calo layers, that contain energy
-    ATH_MSG_DEBUG("Calo position for particle id "<<pdgid<<", trutheta= " << ptruth_eta <<", truthphi= "<<ptruth_phi<<", truthp="<<ptruth_p<<", truthpt="<<ptruth_pt);
-    for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample) {
-      for(int subpos=SUBPOS_MID;subpos<=SUBPOS_EXT;++subpos) {
-        if(get_calo_etaphi(result,hitVector,sample,subpos)) {
-          ATH_MSG_DEBUG( "Result in sample "<<sample<<"."<<subpos<<": eta="<<result.eta(sample,subpos)<<" phi="<<result.phi(sample,subpos)<<" r="<<result.r(sample,subpos)<<" z="<<result.z(sample,subpos)<<" (ok="<<result.OK(sample,subpos)<<")");
-        }
-        else {
-          ATH_MSG_DEBUG( "Extrapolation to sample "<<sample<<" failed (ok="<<result.OK(sample,subpos)<<")");
-        }
-      } //for pos
-    } //for sample
-  } //inside calo
-  else {
-    std::cout<<"Ups. Not inside calo. result.CaloSurface_eta()="<<result.CaloSurface_eta()<<std::endl;
-  }
+  if( fabs(result.CaloSurface_eta())<6 )
+    {
+      // now try to extrpolate to all calo layers, that contain energy
+      ATH_MSG_DEBUG("Calo position for particle id "<<pdgid<<", trutheta= " << ptruth_eta <<", truthphi= "<<ptruth_phi<<", truthp="<<ptruth_p<<", truthpt="<<ptruth_pt);
+      for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample)
+        {
+          for(int subpos=SUBPOS_MID;subpos<=SUBPOS_EXT;++subpos)
+            {
+              if(get_calo_etaphi(result,hitVector,sample,subpos))
+                ATH_MSG_DEBUG( "Result in sample "<<sample<<"."<<subpos<<": eta="<<result.eta(sample,subpos)<<" phi="<<result.phi(sample,subpos)<<" r="<<result.r(sample,subpos)<<" z="<<result.z(sample,subpos)<<" (ok="<<result.OK(sample,subpos)<<")");
+              else
+                ATH_MSG_DEBUG( "Extrapolation to sample "<<sample<<" failed (ok="<<result.OK(sample,subpos)<<")");
+            } //for pos
+        } //for sample
+    } //inside calo
+  else
+    ATH_MSG_WARNING( "Ups. Not inside calo. result.CaloSurface_eta()="<<result.CaloSurface_eta());
+
   ATH_MSG_DEBUG("End extrapolate()");
 }
 
@@ -363,42 +380,46 @@ void FastCaloSimCaloExtrapolation::extrapolate_to_ID(TFCSExtrapolationState& res
 
   Amg::Vector3D hitpos(0,0,0);
   Amg::Vector3D hitmom(0,0,0);
-  if(rz_cylinder_get_calo_etaphi(hitVector,m_CaloBoundaryR,m_CaloBoundaryZ,hitpos,hitmom)) {
-    ATH_MSG_DEBUG("BOUNDARY ID-CALO eta="<<hitpos.eta()<<" phi="<<hitpos.phi()<<" r="<<hitpos.perp()<<" z="<<hitpos[Amg::z]<<" theta="<<hitpos.theta()<<" ; momentum eta="<<hitmom.eta()<<" phi="<<hitmom.phi()<<" theta="<<hitmom.theta());
-    result.set_IDCaloBoundary_eta(hitpos.eta());
-    result.set_IDCaloBoundary_phi(hitpos.phi());
-    result.set_IDCaloBoundary_r(hitpos.perp());
-    result.set_IDCaloBoundary_z(hitpos[Amg::z]);
-  }
-  else {
-    ATH_MSG_DEBUG("Extrapolation to IDCaloBoundary failed");
-    result.set_IDCaloBoundary_eta(-999.);
-    result.set_IDCaloBoundary_phi(-999.);
-    result.set_IDCaloBoundary_r(0);
-    result.set_IDCaloBoundary_z(0);
-  }
-  
+  if(rz_cylinder_get_calo_etaphi(hitVector,m_CaloBoundaryR,m_CaloBoundaryZ,hitpos,hitmom))
+    {
+      ATH_MSG_DEBUG("BOUNDARY ID-CALO eta="<<hitpos.eta()<<" phi="<<hitpos.phi()<<" r="<<hitpos.perp()<<" z="<<hitpos[Amg::z]<<" theta="<<hitpos.theta()<<" ; momentum eta="<<hitmom.eta()<<" phi="<<hitmom.phi()<<" theta="<<hitmom.theta());
+      result.set_IDCaloBoundary_eta(hitpos.eta());
+      result.set_IDCaloBoundary_phi(hitpos.phi());
+      result.set_IDCaloBoundary_r(hitpos.perp());
+      result.set_IDCaloBoundary_z(hitpos[Amg::z]);
+    }
+  else
+    {
+      ATH_MSG_DEBUG("Extrapolation to IDCaloBoundary failed");
+      result.set_IDCaloBoundary_eta(-999.);
+      result.set_IDCaloBoundary_phi(-999.);
+      result.set_IDCaloBoundary_r(0);
+      result.set_IDCaloBoundary_z(0);
+    }
+
   TVector3 vec(hitpos[Amg::x],hitpos[Amg::y],hitpos[Amg::z]);
 
   //get the tangentvector on this interaction point:
   //GlobalMomentum* mom=params_on_surface_ID->TrackParameters::momentum().unit() ;
   //Trk::GlobalMomentum* trackmom=params_on_surface_ID->Trk::TrackParameters::momentum();
-  if(hitmom.mag()>0) {
-    //angle between vec and trackmom:
-    TVector3 Trackmom(hitmom[Amg::x],hitmom[Amg::y],hitmom[Amg::z]);
-    double angle3D=Trackmom.Angle(vec); //isn't this the same as TVector3 vec?
-    ATH_MSG_DEBUG("    3D ANGLE "<<angle3D);
-
-    double angleEta=vec.Theta()-Trackmom.Theta();
-    ATH_MSG_DEBUG("    ANGLE dTHEA"<<angleEta);
-
-    result.set_IDCaloBoundary_AngleEta(angleEta);
-    result.set_IDCaloBoundary_Angle3D(angle3D);
-  }
-  else {
-    result.set_IDCaloBoundary_AngleEta(-999.);
-    result.set_IDCaloBoundary_Angle3D(-999.);
-  }
+  if(hitmom.mag()>0)
+    {
+      //angle between vec and trackmom:
+      TVector3 Trackmom(hitmom[Amg::x],hitmom[Amg::y],hitmom[Amg::z]);
+      double angle3D=Trackmom.Angle(vec); //isn't this the same as TVector3 vec?
+      ATH_MSG_DEBUG("    3D ANGLE "<<angle3D);
+
+      double angleEta=vec.Theta()-Trackmom.Theta();
+      ATH_MSG_DEBUG("    ANGLE dTHEA"<<angleEta);
+
+      result.set_IDCaloBoundary_AngleEta(angleEta);
+      result.set_IDCaloBoundary_Angle3D(angle3D);
+    }
+  else
+    {
+      result.set_IDCaloBoundary_AngleEta(-999.);
+      result.set_IDCaloBoundary_Angle3D(-999.);
+    }
 
   ATH_MSG_DEBUG("End extrapolate_to_ID()");
 
@@ -415,77 +436,80 @@ bool FastCaloSimCaloExtrapolation::get_calo_surface(TFCSExtrapolationState& resu
   result.set_CaloSurface_z(0);
   double min_calo_surf_dist=1000;
 
-  for(unsigned int i=0;i<m_surfacelist.size();++i) {
+  for(unsigned int i=0;i<m_surfacelist.size();++i)
+    {
 
-    int sample=m_surfacelist[i];
-    std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
+      int sample=m_surfacelist[i];
+      std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
 
-    while (it != hitVector->end() && it->detID != (3000+sample) ) {
-      it++;
-    }
-    if(it==hitVector->end()) continue;
+      while (it != hitVector->end() && it->detID != (3000+sample) )
+        it++;
 
-    Amg::Vector3D hitPos = (*it).trackParms->position();
+      if(it==hitVector->end()) continue;
 
-    //double offset = 0.;
-    double etaCalo = hitPos.eta();
+      Amg::Vector3D hitPos = (*it).trackParms->position();
 
-    if(fabs(etaCalo)<900) {
-      double phiCalo = hitPos.phi();
-      double distsamp =deta(sample,etaCalo);
-
-      if(distsamp<min_calo_surf_dist && min_calo_surf_dist>=0) {
-        //hitVector is ordered in r, so if first surface was hit, keep it
-        result.set_CaloSurface_sample(sample);
-        result.set_CaloSurface_eta(etaCalo);
-        result.set_CaloSurface_phi(phiCalo);
-        double rcalo=rent(sample,etaCalo);
-        double zcalo=zent(sample,etaCalo);
-        result.set_CaloSurface_r(rcalo);
-        result.set_CaloSurface_z(zcalo);
-        min_calo_surf_dist=distsamp;
-        msg(MSG::DEBUG)<<" r="<<rcalo<<" z="<<zcalo;
-
-        if(distsamp<0) {
+      //double offset = 0.;
+      double etaCalo = hitPos.eta();
+
+      if(fabs(etaCalo)<900)
+        {
+          double phiCalo = hitPos.phi();
+          double distsamp =deta(sample,etaCalo);
+
+          if(distsamp<min_calo_surf_dist && min_calo_surf_dist>=0)
+            {
+              //hitVector is ordered in r, so if first surface was hit, keep it
+              result.set_CaloSurface_sample(sample);
+              result.set_CaloSurface_eta(etaCalo);
+              result.set_CaloSurface_phi(phiCalo);
+              double rcalo=rent(sample,etaCalo);
+              double zcalo=zent(sample,etaCalo);
+              result.set_CaloSurface_r(rcalo);
+              result.set_CaloSurface_z(zcalo);
+              min_calo_surf_dist=distsamp;
+              msg(MSG::DEBUG)<<" r="<<rcalo<<" z="<<zcalo;
+
+              if(distsamp<0)
+                {
+                  msg(MSG::DEBUG)<<endmsg;
+                  break;
+                }
+            }
           msg(MSG::DEBUG)<<endmsg;
-          break;
         }
-      }
-      msg(MSG::DEBUG)<<endmsg;
+      else
+        msg(MSG::DEBUG)<<": eta > 900, not using this"<<endmsg;
     }
-    else {
-      msg(MSG::DEBUG)<<": eta > 900, not using this"<<endmsg;
-    }
-  }
 
-  if(result.CaloSurface_sample()==CaloCell_ID_FCS::noSample) {
-    // first intersection with sensitive calo layer
-    std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-
-    while( it < hitVector->end() && (*it).detID != 3 ) {
-      it++;   // to be updated
-    }
-    if (it==hitVector->end()) {
-      return false;  // no calo intersection, abort
+  if(result.CaloSurface_sample()==CaloCell_ID_FCS::noSample)
+    {
+      // first intersection with sensitive calo layer
+      std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
+
+      while( it < hitVector->end() && (*it).detID != 3 )
+        it++;   // to be updated
+
+      if (it==hitVector->end())
+        return false;  // no calo intersection, abort
+
+      Amg::Vector3D surface_hitPos = (*it).trackParms->position();
+
+      result.set_CaloSurface_eta(surface_hitPos.eta());
+      result.set_CaloSurface_phi(surface_hitPos.phi());
+      result.set_CaloSurface_r(surface_hitPos.perp());
+      result.set_CaloSurface_z(surface_hitPos[Amg::z]);
+
+      double pT=(*it).trackParms->momentum().perp();
+      if(TMath::Abs(result.CaloSurface_eta())>4.9 || pT<500 || (TMath::Abs(result.CaloSurface_eta())>4 && pT<1000) )
+        ATH_MSG_DEBUG("only entrance to calo entrance layer found, no surface : eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" pT="<<pT);
+      else
+        ATH_MSG_WARNING("only entrance to calo entrance layer found, no surface : eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" pT="<<pT);
+    } //sample
+  else
+    {
+      ATH_MSG_DEBUG("entrance to calo surface : sample="<<result.CaloSurface_sample()<<" eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" deta="<<min_calo_surf_dist);
     }
-    Amg::Vector3D surface_hitPos = (*it).trackParms->position();
-
-    result.set_CaloSurface_eta(surface_hitPos.eta());
-    result.set_CaloSurface_phi(surface_hitPos.phi());
-    result.set_CaloSurface_r(surface_hitPos.perp());
-    result.set_CaloSurface_z(surface_hitPos[Amg::z]);
-
-    double pT=(*it).trackParms->momentum().perp();
-    if(TMath::Abs(result.CaloSurface_eta())>4.9 || pT<500 || (TMath::Abs(result.CaloSurface_eta())>4 && pT<1000) ) {
-      ATH_MSG_DEBUG("only entrance to calo entrance layer found, no surface : eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" pT="<<pT);
-    }
-    else {
-      ATH_MSG_WARNING("only entrance to calo entrance layer found, no surface : eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" pT="<<pT);
-    }
-  } //sample
-  else {
-    ATH_MSG_DEBUG("entrance to calo surface : sample="<<result.CaloSurface_sample()<<" eta="<<result.CaloSurface_eta()<<" phi="<<result.CaloSurface_phi()<<" r="<<result.CaloSurface_r()<<" z="<<result.CaloSurface_z()<<" deta="<<min_calo_surf_dist);
-  }
 
   ATH_MSG_DEBUG("End get_calo_surface()");
   return true;
@@ -509,156 +533,170 @@ bool FastCaloSimCaloExtrapolation::get_calo_etaphi(TFCSExtrapolationState& resul
 
   std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
 
-  while( it!= hitVector->end() && it->detID != (3000+sample) ) {
+  while( it!= hitVector->end() && it->detID != (3000+sample) )
     it++;
-  }
+
   //while ((*it).detID != (3000+sample) && it < hitVector->end() )  it++;
 
-  if(it!=hitVector->end()) {
+  if(it!=hitVector->end())
+    {
 
-    Amg::Vector3D hitPos1 = (*it).trackParms->position();
-    int sid1=(*it).detID;
-    int sid2=-1;
-    Amg::Vector3D hitPos;
-    Amg::Vector3D hitPos2;
+      Amg::Vector3D hitPos1 = (*it).trackParms->position();
+      int sid1=(*it).detID;
+      int sid2=-1;
+      Amg::Vector3D hitPos;
+      Amg::Vector3D hitPos2;
+
+      std::vector<Trk::HitInfo>::iterator itnext = it;
+      ++itnext;
+      if(itnext!=hitVector->end())
+        {
+          hitPos2 = (*itnext).trackParms->position();
+          sid2=(*itnext).detID;
+          double eta_avg=0.5*(hitPos1.eta()+hitPos2.eta());
+          double t;
+
+          if(isCaloBarrel(sample))
+            {
+              double r=rpos(sample,eta_avg,subpos);
+              double r1=hitPos1.perp();
+              double r2=hitPos2.perp();
+              t=(r-r1)/(r2-r1);
+              best_target=r;
+            }
+          else
+            {
+              double z=zpos(sample,eta_avg,subpos);
+              double z1=hitPos1[Amg::z];
+              double z2=hitPos2[Amg::z];
+              t=(z-z1)/(z2-z1);
+              best_target=z;
+            }
+          hitPos=t*hitPos2+(1-t)*hitPos1;
 
-    std::vector<Trk::HitInfo>::iterator itnext = it;
-    ++itnext;
-    if(itnext!=hitVector->end()) {
-      hitPos2 = (*itnext).trackParms->position();
-      sid2=(*itnext).detID;
-      double eta_avg=0.5*(hitPos1.eta()+hitPos2.eta());
-      double t;
+        }
+      else
+        {
+          hitPos=hitPos1;
+          hitPos2=hitPos1;
+        }
 
-      if(isCaloBarrel(sample)) {
-        double r=rpos(sample,eta_avg,subpos);
-        double r1=hitPos1.perp();
-        double r2=hitPos2.perp();
-        t=(r-r1)/(r2-r1);
-        best_target=r;
-      }
-      else {
-        double z=zpos(sample,eta_avg,subpos);
-        double z1=hitPos1[Amg::z];
-        double z2=hitPos2[Amg::z];
-        t=(z-z1)/(z2-z1);
-        best_target=z;
-      }
-      hitPos=t*hitPos2+(1-t)*hitPos1;
+      double etaCalo = hitPos.eta();
+      double phiCalo = hitPos.phi();
+      result.set_OK(sample,subpos,true);
+      result.set_eta(sample,subpos,etaCalo);
+      result.set_phi(sample,subpos,phiCalo);
+      result.set_r(sample,subpos,hitPos.perp());
+      result.set_z(sample,subpos,hitPos[Amg::z]);
+      hitdist=hitPos.mag();
+      lrzpos=rzpos(sample,etaCalo,subpos);
+      distsamp=deta(sample,etaCalo);
+      best_found=true;
+
+      ATH_MSG_DEBUG("extrapol with layer hit: id="<<sid1<<" -> "<<sid2<<" target r/z="<<best_target<<" r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<
+                    " r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<" result.r="<<result.r(sample,subpos)<<" result.z="<<result.z(sample,subpos));
 
     }
-    else {
-      hitPos=hitPos1;
-      hitPos2=hitPos1;
-    }
-
-    double etaCalo = hitPos.eta();
-    double phiCalo = hitPos.phi();
-    result.set_OK(sample,subpos,true);
-    result.set_eta(sample,subpos,etaCalo);
-    result.set_phi(sample,subpos,phiCalo);
-    result.set_r(sample,subpos,hitPos.perp());
-    result.set_z(sample,subpos,hitPos[Amg::z]);
-    hitdist=hitPos.mag();
-    lrzpos=rzpos(sample,etaCalo,subpos);
-    distsamp=deta(sample,etaCalo);
-    best_found=true;
-
-    ATH_MSG_DEBUG("extrapol with layer hit: id="<<sid1<<" -> "<<sid2<<" target r/z="<<best_target<<" r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<
-                  " r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<" result.r="<<result.r(sample,subpos)<<" result.z="<<result.z(sample,subpos));
 
-  }
-
-  if(!best_found) {
-    it = hitVector->begin();
-    double best_dist=0.5;
-    bool best_inside=false;
-    int best_id1,best_id2;
-    Amg::Vector3D best_hitPos=(*it).trackParms->position();
-    while (it < hitVector->end()-1 ) {
-      Amg::Vector3D hitPos1 = (*it).trackParms->position();
-      int sid1=(*it).detID;
-      it++;
-      Amg::Vector3D hitPos2 = (*it).trackParms->position();
-      int sid2=(*it).detID;
-      double eta_avg=0.5*(hitPos1.eta()+hitPos2.eta());
-      double t;
-      double tmp_target=0;
-      if(isCaloBarrel(sample)) {
-        double r=rpos(sample,eta_avg,subpos);
-        double r1=hitPos1.perp();
-        double r2=hitPos2.perp();
-        t=(r-r1)/(r2-r1);
-        tmp_target=r;
-      }
-      else {
-        double z=zpos(sample,eta_avg,subpos);
-        double z1=hitPos1[Amg::z];
-        double z2=hitPos2[Amg::z];
-        t=(z-z1)/(z2-z1);
-        tmp_target=z;
-      }
-      Amg::Vector3D hitPos=t*hitPos2+(1-t)*hitPos1;
-      double dist=TMath::Min(TMath::Abs(t-0),TMath::Abs(t-1));
-      bool inside=false;
-      if(t>=0 && t<=1) inside=true;
-      if(!best_found || inside) {
-        if(!best_inside || dist<best_dist) {
-          best_dist=dist;
-          best_hitPos=hitPos;
-          best_inside=inside;
-          best_found=true;
-          best_id1=sid1;
-          best_id2=sid2;
-          best_target=tmp_target;
+  if(!best_found)
+    {
+      it = hitVector->begin();
+      double best_dist=0.5;
+      bool best_inside=false;
+      int best_id1,best_id2;
+      Amg::Vector3D best_hitPos=(*it).trackParms->position();
+      while (it < hitVector->end()-1 )
+        {
+          Amg::Vector3D hitPos1 = (*it).trackParms->position();
+          int sid1=(*it).detID;
+          it++;
+          Amg::Vector3D hitPos2 = (*it).trackParms->position();
+          int sid2=(*it).detID;
+          double eta_avg=0.5*(hitPos1.eta()+hitPos2.eta());
+          double t;
+          double tmp_target=0;
+          if(isCaloBarrel(sample))
+            {
+              double r=rpos(sample,eta_avg,subpos);
+              double r1=hitPos1.perp();
+              double r2=hitPos2.perp();
+              t=(r-r1)/(r2-r1);
+              tmp_target=r;
+            }
+          else
+            {
+              double z=zpos(sample,eta_avg,subpos);
+              double z1=hitPos1[Amg::z];
+              double z2=hitPos2[Amg::z];
+              t=(z-z1)/(z2-z1);
+              tmp_target=z;
+            }
+          Amg::Vector3D hitPos=t*hitPos2+(1-t)*hitPos1;
+          double dist=TMath::Min(TMath::Abs(t-0),TMath::Abs(t-1));
+          bool inside=false;
+          if(t>=0 && t<=1) inside=true;
+          if(!best_found || inside)
+            {
+              if(!best_inside || dist<best_dist)
+                {
+                  best_dist=dist;
+                  best_hitPos=hitPos;
+                  best_inside=inside;
+                  best_found=true;
+                  best_id1=sid1;
+                  best_id2=sid2;
+                  best_target=tmp_target;
+                }
+            }
+          else
+            {
+              if(!best_inside && dist<best_dist)
+                {
+                  best_dist=dist;
+                  best_hitPos=hitPos;
+                  best_inside=inside;
+                  best_found=true;
+                  best_id1=sid1;
+                  best_id2=sid2;
+                  best_target=tmp_target;
+                }
+            }
+          ATH_MSG_DEBUG("extrapol without layer hit: id="<<sid1<<" -> "<<sid2<<" dist="<<dist<<" mindist="<<best_dist<<
+                        " t="<<t<<" best_inside="<<best_inside<<" target r/z="<<tmp_target<<
+                        " r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<" r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<
+                        " re="<<hitPos.perp()<<" ze="<<hitPos[Amg::z]<<
+                        " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z]);
+          if(best_found)
+            {
+              double etaCalo = best_hitPos.eta();
+              result.set_OK(sample,subpos,true);
+              result.set_eta(sample,subpos,etaCalo);
+              result.set_phi(sample,subpos,best_hitPos.phi());
+              result.set_r(sample,subpos,best_hitPos.perp());
+              result.set_z(sample,subpos,best_hitPos[Amg::z]);
+              hitdist=best_hitPos.mag();
+              lrzpos=rzpos(sample,etaCalo,subpos);
+              distsamp=deta(sample,etaCalo);
+            }
+        } //while hit vector
+
+      if(best_found)
+        {
+          ATH_MSG_DEBUG("extrapol without layer hit: id="<<best_id1<<" -> "<<best_id2<<" mindist="<<best_dist<<
+                        " best_inside="<<best_inside<<" target r/z="<<best_target<<
+                        " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z] );
         }
-      }
-      else {
-        if(!best_inside && dist<best_dist) {
-          best_dist=dist;
-          best_hitPos=hitPos;
-          best_inside=inside;
-          best_found=true;
-          best_id1=sid1;
-          best_id2=sid2;
-          best_target=tmp_target;
-        }
-      }
-      ATH_MSG_DEBUG("extrapol without layer hit: id="<<sid1<<" -> "<<sid2<<" dist="<<dist<<" mindist="<<best_dist<<
-                    " t="<<t<<" best_inside="<<best_inside<<" target r/z="<<tmp_target<<
-                    " r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<" r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<
-                    " re="<<hitPos.perp()<<" ze="<<hitPos[Amg::z]<<
-                    " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z]);
-      if(best_found) {
-        double etaCalo = best_hitPos.eta();
-        result.set_OK(sample,subpos,true);
-        result.set_eta(sample,subpos,etaCalo);
-        result.set_phi(sample,subpos,best_hitPos.phi());
-        result.set_r(sample,subpos,best_hitPos.perp());
-        result.set_z(sample,subpos,best_hitPos[Amg::z]);
-        hitdist=best_hitPos.mag();
-        lrzpos=rzpos(sample,etaCalo,subpos);
-        distsamp=deta(sample,etaCalo);
-      }
-    } //while hit vector
-
-    if(best_found) {
-      ATH_MSG_DEBUG("extrapol without layer hit: id="<<best_id1<<" -> "<<best_id2<<" mindist="<<best_dist<<
-                    " best_inside="<<best_inside<<" target r/z="<<best_target<<
-                    " rb="<<best_hitPos.perp()<<" zb="<<best_hitPos[Amg::z] );
     }
-  }
 
-  if(isCaloBarrel(sample)) {
+  if(isCaloBarrel(sample))
     lrzpos*=cosh(result.eta(sample,subpos));
-  }
-  else {
+  else
     lrzpos= fabs(lrzpos/tanh(result.eta(sample,subpos)));
-  }
+
   result.set_d(sample,subpos,lrzpos);
   result.set_detaBorder(sample,subpos,distsamp);
 
-  std::cout<<"Final TTC result for sample "<<sample<<" subpos="<<subpos<<" OK() "<<result.OK(sample,subpos)<<" eta="<<result.eta(sample,subpos)<<" phi="<<result.phi(sample,subpos)<<" dCalo="<<result.d(sample,subpos)<<" dist(hit)="<<hitdist<<std::endl;
+  ATH_MSG_DEBUG("Final TTC result for sample "<<sample<<" subpos="<<subpos<<" OK() "<<result.OK(sample,subpos)<<" eta="<<result.eta(sample,subpos)<<" phi="<<result.phi(sample,subpos)<<" dCalo="<<result.d(sample,subpos)<<" dist(hit)="<<hitdist);
 
   return result.OK(sample,subpos);
 }
@@ -691,8 +729,7 @@ bool FastCaloSimCaloExtrapolation::rz_cylinder_get_calo_etaphi(std::vector<Trk::
         double r1=hitPos1.perp();
         double r2=hitPos2.perp();
         t=(r-r1)/(r2-r1);
-      }
-      else {
+      } else {
         double z=cylZ;
         double z1=hitPos1[Amg::z];
         double z2=hitPos2[Amg::z];
@@ -714,8 +751,7 @@ bool FastCaloSimCaloExtrapolation::rz_cylinder_get_calo_etaphi(std::vector<Trk::
           best_id2=sid2;
           mom=t*hitMom2+(1-t)*hitMom1;
         }
-      }
-      else {
+      } else {
         if(!best_inside && dist<best_dist) {
           best_dist=dist;
           best_hitPos=hitPos;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimParamAlg.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimParamAlg.cxx
index 39331d5d3f74d9c127c297cf0c4ac1f6a8e92032..5b59891e38e96fa58ee19f1e3e9cd0a1a315176d 100755
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimParamAlg.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/FastCaloSimParamAlg.cxx
@@ -193,7 +193,7 @@ StatusCode FastCaloSimParamAlg::execute()
     }
   //clusterize(eventSteps);
   std::cout << "Size after clusterization: " << MergeeventSteps->size() << std::endl;
-  StatusCode sc = evtStore()->record(MergeeventSteps,"ZHMergedEventSteps");
+  StatusCode sc = evtStore()->record(MergeeventSteps,"MergedEventSteps");
   if (sc.isFailure()) 
     {
       std::cout<<"Coudn't resave merged collection "<<std::endl;
@@ -219,7 +219,7 @@ const HepMC::GenParticle* FastCaloSimParamAlg::getParticleFromMC()
 const ISF_FCS_Parametrization::FCS_StepInfoCollection* FastCaloSimParamAlg::getFCS_StepInfo()
 {
   const ISF_FCS_Parametrization::FCS_StepInfoCollection* eventStepsES;
-  StatusCode sc = evtStore()->retrieve(eventStepsES, "ZHEventSteps");
+  StatusCode sc = evtStore()->retrieve(eventStepsES, "EventSteps");
   if (sc.isFailure()) return NULL;
   
   return eventStepsES;
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/ISF_HitAnalysis.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/ISF_HitAnalysis.cxx
index 2c750341e13712f1252cd6e8ae197fbff3feb7d7..9b95a5310e2ccde1fa0d14ac305c4a2170df4b83 100755
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/ISF_HitAnalysis.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/src/ISF_HitAnalysis.cxx
@@ -80,107 +80,108 @@
 //const std::string MC_SIM_PARAM = "/Simulation/Parameters";
 
 ISF_HitAnalysis::ISF_HitAnalysis(const std::string& name, ISvcLocator* pSvcLocator)
-: AthAlgorithm(name, pSvcLocator)
-//, m_storeGate(0)
-  , m_geoModel(0)
-  , m_tileInfo(0)
-, m_larEmID(0)
-  , m_larFcalID(0)
-, m_larHecID(0)
-  , m_tileID(0)
-  , m_tileMgr(0)
-  , m_hit_x(0)
-  , m_hit_y(0)
-  , m_hit_z(0)
-  , m_hit_energy(0)
-  , m_hit_time(0)
-, m_hit_identifier(0)
-  , m_hit_cellidentifier(0)
-, m_islarbarrel(0)
-  , m_islarendcap(0)
-, m_islarhec(0)
-  , m_islarfcal(0)
-  , m_istile(0)
-  , m_hit_sampling(0)
-  , m_hit_samplingfraction(0)
-, m_truth_energy(0)
-  , m_truth_px(0)
-  , m_truth_py(0)
-  , m_truth_pz(0)
-  , m_truth_pdg(0)
-  , m_truth_barcode(0)
-  , m_truth_vtxbarcode(0)
-  , m_cell_identifier(0)
-  , m_cell_energy(0)
-  , m_cell_sampling(0)
-  , m_g4hit_energy(0)
-  , m_g4hit_time(0)
-  , m_g4hit_identifier(0)
-  , m_g4hit_cellidentifier(0)
-  , m_g4hit_samplingfraction(0)
-  , m_g4hit_sampling(0)
-  //   , m_matched_cells(0)
-  , m_tree(0)
-  , m_ntupleFileName("/ntuples/file1")
-  , m_ntupleDirName("ISF_HitAnalysis")
-  , m_ntupleTreeName("CaloHitAna")
-  , m_metadataTreeName("MetaData")
-  , m_geoFileName("ISF_Geometry")
-  , m_thistSvc(0)
-  , m_calo_dd_man(0)
-  //#####################
-  , m_eta_calo_surf(0)
-  , m_phi_calo_surf(0)
-  , m_d_calo_surf(0)
-  , m_ptruth_eta(0)
-  , m_ptruth_phi(0)
-  , m_ptruth_e(0)
-  , m_ptruth_et(0)
-  , m_ptruth_pt(0)
-  , m_ptruth_p(0)
-  , m_pdgid(0)
+   : AthAlgorithm(name, pSvcLocator)
+   //, m_storeGate(0)
+   , m_geoModel(0)
+   , m_tileInfo(0)
+   , m_larEmID(0)
+   , m_larFcalID(0)
+   , m_larHecID(0)
+   , m_tileID(0)
+   , m_tileMgr(0)
+   , m_hit_x(0)
+   , m_hit_y(0)
+   , m_hit_z(0)
+   , m_hit_energy(0)
+   , m_hit_time(0)
+   , m_hit_identifier(0)
+   , m_hit_cellidentifier(0)
+   , m_islarbarrel(0)
+   , m_islarendcap(0)
+   , m_islarhec(0)
+   , m_islarfcal(0)
+   , m_istile(0)
+   , m_hit_sampling(0)
+   , m_hit_samplingfraction(0)
+   , m_truth_energy(0)
+   , m_truth_px(0)
+   , m_truth_py(0)
+   , m_truth_pz(0)
+   , m_truth_pdg(0)
+   , m_truth_barcode(0)
+   , m_truth_vtxbarcode(0)
+   , m_cell_identifier(0)
+   , m_cell_energy(0)
+   , m_cell_sampling(0)
+   , m_g4hit_energy(0)
+   , m_g4hit_time(0)
+   , m_g4hit_identifier(0)
+   , m_g4hit_cellidentifier(0)
+   , m_g4hit_samplingfraction(0)
+   , m_g4hit_sampling(0)
+     //   , m_matched_cells(0)
+   , m_tree(0)
+   , m_ntupleFileName("/ntuples/file1")
+   , m_ntupleDirName("ISF_HitAnalysis")
+   , m_ntupleTreeName("CaloHitAna")
+   , m_metadataTreeName("MetaData")
+   , m_geoFileName("ISF_Geometry")
+   , m_thistSvc(0)
+   , m_calo_dd_man(0)
+   //#####################
+   , m_eta_calo_surf(0)
+   , m_phi_calo_surf(0)
+   , m_d_calo_surf(0)
+   , m_ptruth_eta(0)
+   , m_ptruth_phi(0)
+   , m_ptruth_e(0)
+   , m_ptruth_et(0)
+   , m_ptruth_pt(0)
+   , m_ptruth_p(0)
+   , m_pdgid(0)
+
+   //######################
 
-  //######################
-
-  , m_TTC_entrance_eta(0)
-  , m_TTC_entrance_phi(0)
-  , m_TTC_entrance_r(0)
-  , m_TTC_entrance_z(0)
-  , m_TTC_back_eta(0)
-  , m_TTC_back_phi(0)
-  , m_TTC_back_r(0)
-  , m_TTC_back_z(0)
-  , m_TTC_IDCaloBoundary_eta(0)
-  , m_TTC_IDCaloBoundary_phi(0)
-  , m_TTC_IDCaloBoundary_r(0)
-  , m_TTC_IDCaloBoundary_z(0)
-  , m_TTC_Angle3D(0)
-  , m_TTC_AngleEta(0)
-
-  , m_newTTC_entrance_eta(0)
-  , m_newTTC_entrance_phi(0)
-  , m_newTTC_entrance_r(0)
-  , m_newTTC_entrance_z(0)
-  , m_newTTC_back_eta(0)
-  , m_newTTC_back_phi(0)
-  , m_newTTC_back_r(0)
-  , m_newTTC_back_z(0)
-  , m_newTTC_IDCaloBoundary_eta(0)
-  , m_newTTC_IDCaloBoundary_phi(0)
-  , m_newTTC_IDCaloBoundary_r(0)
-  , m_newTTC_IDCaloBoundary_z(0)
-  , m_newTTC_Angle3D(0)
-  , m_newTTC_AngleEta(0)
-
-  , m_caloEntrance(0)
-  , m_calo_tb_coord(0)
-  , m_sample_calo_surf(CaloCell_ID_FCS::noSample)
-  , m_particleDataTable(0)
-
-  ,m_MC_DIGI_PARAM("/Digitization/Parameters")
-  ,m_MC_SIM_PARAM("/Simulation/Parameters")
-
-  //######################
+/*
+   , m_TTC_entrance_eta(0)
+   , m_TTC_entrance_phi(0)
+   , m_TTC_entrance_r(0)
+   , m_TTC_entrance_z(0)
+   , m_TTC_back_eta(0)
+   , m_TTC_back_phi(0)
+   , m_TTC_back_r(0)
+   , m_TTC_back_z(0)
+   , m_TTC_IDCaloBoundary_eta(0)
+   , m_TTC_IDCaloBoundary_phi(0)
+   , m_TTC_IDCaloBoundary_r(0)
+   , m_TTC_IDCaloBoundary_z(0)
+   , m_TTC_Angle3D(0)
+   , m_TTC_AngleEta(0)
+*/
+   , m_newTTC_entrance_eta(0)
+   , m_newTTC_entrance_phi(0)
+   , m_newTTC_entrance_r(0)
+   , m_newTTC_entrance_z(0)
+   , m_newTTC_back_eta(0)
+   , m_newTTC_back_phi(0)
+   , m_newTTC_back_r(0)
+   , m_newTTC_back_z(0)
+   , m_newTTC_IDCaloBoundary_eta(0)
+   , m_newTTC_IDCaloBoundary_phi(0)
+   , m_newTTC_IDCaloBoundary_r(0)
+   , m_newTTC_IDCaloBoundary_z(0)
+   , m_newTTC_Angle3D(0)
+   , m_newTTC_AngleEta(0)
+
+   , m_caloEntrance(0)
+   , m_calo_tb_coord(0)
+   , m_sample_calo_surf(CaloCell_ID_FCS::noSample)
+   , m_particleDataTable(0)
+
+   ,m_MC_DIGI_PARAM("/Digitization/Parameters")
+   ,m_MC_SIM_PARAM("/Simulation/Parameters")
+
+   //######################
 
 
   //Note that m_xxx are pointers to vectors set to 0, not set to empty vector! see note around TBranch
@@ -230,76 +231,74 @@ ISF_HitAnalysis::~ISF_HitAnalysis()
 
 StatusCode ISF_HitAnalysis::updateMetaData( IOVSVC_CALLBACK_ARGS_P( I, keys ) )
 {
-  ATH_MSG_INFO( "Updating the Sim+Digi MetaData" );
-
-  // Reset the internal settings:
-  bool run_update = false;
-
-  // Check what kind of keys we got. In principle the function should only
-  // receive the "/Digitization/Parameters" and "/Simulation/Parameters" key.
-  msg( MSG::DEBUG ) << "Update called with " <<I<< " folder " << keys.size() << " keys:";
-  std::list< std::string >::const_iterator itr = keys.begin();
-  std::list< std::string >::const_iterator end = keys.end();
-  for( ; itr != end; ++itr )
-    {
-      if( *itr == m_MC_DIGI_PARAM ) run_update = true;
-      if( *itr == m_MC_SIM_PARAM ) run_update = true;
-      msg() << *itr;
-    }
-  msg() << endmsg;
-  // If that's not the key that we received after all, let's just return
-  // silently...
-  if( ! run_update ) return StatusCode::SUCCESS;
-
-  const DataHandle< AthenaAttributeList > simParam;
-  if( detStore()->retrieve( simParam, m_MC_SIM_PARAM ).isFailure() )
-    {
-      ATH_MSG_WARNING("Retrieving MC SIM metadata failed");
-    }
-  else
-    {
-      AthenaAttributeList::const_iterator attr_itr = simParam->begin();
-      AthenaAttributeList::const_iterator attr_end = simParam->end();
-      for( ; attr_itr != attr_end; ++attr_itr )
-        {
-          std::stringstream outstr;
-          attr_itr->toOutputStream(outstr);
-          ATH_MSG_INFO("MetaData: " << outstr.str());
-        }
-    }
+ ATH_MSG_INFO( "Updating the Sim+Digi MetaData" );
+
+ // Reset the internal settings:
+ bool run_update = false;
+
+ // Check what kind of keys we got. In principle the function should only
+ // receive the "/Digitization/Parameters" and "/Simulation/Parameters" key.
+ ATH_MSG_DEBUG("Update called with " <<I<< " folder " << keys.size() << " keys:");
+ std::list< std::string >::const_iterator itr = keys.begin();
+ std::list< std::string >::const_iterator end = keys.end();
+ for( ; itr != end; ++itr )
+ {
+  if( *itr == m_MC_DIGI_PARAM ) run_update = true;
+  if( *itr == m_MC_SIM_PARAM ) run_update = true;
+ }
+ // If that's not the key that we received after all, let's just return
+ // silently...
+ if( ! run_update ) return StatusCode::SUCCESS;
+
+ const DataHandle< AthenaAttributeList > simParam;
+ if( detStore()->retrieve( simParam, m_MC_SIM_PARAM ).isFailure() )
+ {
+   ATH_MSG_WARNING("Retrieving MC SIM metadata failed");
+ }
+ else
+ {
+  AthenaAttributeList::const_iterator attr_itr = simParam->begin();
+  AthenaAttributeList::const_iterator attr_end = simParam->end();
+  for( ; attr_itr != attr_end; ++attr_itr )
+  {
+   std::stringstream outstr;
+   attr_itr->toOutputStream(outstr);
+   ATH_MSG_INFO("MetaData: " << outstr.str());
+  }
+ }
 
-  return StatusCode::SUCCESS;
+ return StatusCode::SUCCESS;
 }
 
 
 StatusCode ISF_HitAnalysis::initialize()
 {
-  ATH_MSG_INFO( "Initializing ISF_HitAnalysis" );
+ ATH_MSG_INFO( "Initializing ISF_HitAnalysis" );
 
-  /*
-  // get a handle of StoreGate for access to the Detector Store
+ /*
+ // get a handle of StoreGate for access to the Detector Store
   sc = service("DetectorStore", m_detStore);
   if (sc.isFailure()) {
-  ATH_MSG_ERROR( "ZH Unable to retrieve pointer to Detector Store");
-  return sc;
+    ATH_MSG_ERROR( "ZH Unable to retrieve pointer to Detector Store");
+    return sc;
   }
   // get a handle of StoreGate for access to the Event Store
   sc = service("StoreGateSvc", m_storeGate);
   if (sc.isFailure()) {
-  ATH_MSG_ERROR( "Unable to retrieve pointer to StoreGateSvc" );
-  return sc;
+     ATH_MSG_ERROR( "Unable to retrieve pointer to StoreGateSvc" );
+     return sc;
   }
-  */
-
-  //
-  // Register the callback(s):
-  //
-  StatusCode sc = service("GeoModelSvc", m_geoModel);
-  if(sc.isFailure())
-    {
-      ATH_MSG_ERROR( "Could not locate GeoModelSvc" );
-      return StatusCode::FAILURE;
-    }
+ */
+
+ //
+ // Register the callback(s):
+ //
+ StatusCode sc = service("GeoModelSvc", m_geoModel);
+ if(sc.isFailure())
+ {
+  ATH_MSG_ERROR( "Could not locate GeoModelSvc" );
+  return StatusCode::FAILURE;
+ }
 
   sc = detStore()->retrieve(m_tileMgr);
   if (sc.isFailure())
@@ -386,1024 +385,1039 @@ StatusCode ISF_HitAnalysis::initialize()
         ATH_MSG_INFO("retrieved " << CaloCoordinateTool_name);
     } //tools
 
-  if( detStore()->contains< AthenaAttributeList >( m_MC_DIGI_PARAM ) )
-    {
-      const DataHandle< AthenaAttributeList > aptr;
-      if( detStore()->regFcn( &ISF_HitAnalysis::updateMetaData, this, aptr,m_MC_DIGI_PARAM, true ).isFailure() )
-        {
-          ATH_MSG_ERROR( "Could not register callback for "<< m_MC_DIGI_PARAM );
-          return StatusCode::FAILURE;
-        }
-    }
-  else
-    {
-      ATH_MSG_WARNING( "MetaData not found for "<< m_MC_DIGI_PARAM );
-    }
-
-  if(detStore()->contains< AthenaAttributeList >( m_MC_SIM_PARAM ) )
-    {
-      const DataHandle< AthenaAttributeList > aptr;
-      if( detStore()->regFcn( &ISF_HitAnalysis::updateMetaData, this, aptr,m_MC_SIM_PARAM, true ).isFailure() )
-        {
-          ATH_MSG_ERROR( "Could not register callback for "<< m_MC_SIM_PARAM );
-          return StatusCode::FAILURE;
-        }
-    }
-  else
-    ATH_MSG_WARNING( "MetaData not found for "<< m_MC_SIM_PARAM );
-
-  // Get CaloGeometryHelper
-  if (m_CaloGeometryHelper.retrieve().isFailure())
-    {
-      ATH_MSG_ERROR("CaloGeometryHelper not found ");
-      return StatusCode::FAILURE;
-    }
-
-  // Get FastCaloSimCaloExtrapolation
-  if (m_FastCaloSimCaloExtrapolation.retrieve().isFailure())
-    {
-      ATH_MSG_ERROR("FastCaloSimCaloExtrapolation not found ");
-      return StatusCode::FAILURE;
-    }
-
-  // Grab the Ntuple and histogramming service for the tree
-  sc = service("THistSvc",m_thistSvc);
-  if (sc.isFailure())
-    {
-      ATH_MSG_ERROR( "Unable to retrieve pointer to THistSvc" );
-      return StatusCode::FAILURE;
-    }
+if( detStore()->contains< AthenaAttributeList >( m_MC_DIGI_PARAM ) )
+ {
+  const DataHandle< AthenaAttributeList > aptr;
+  if( detStore()->regFcn( &ISF_HitAnalysis::updateMetaData, this, aptr,m_MC_DIGI_PARAM, true ).isFailure() )
+  {
+   ATH_MSG_ERROR( "Could not register callback for "<< m_MC_DIGI_PARAM );
+   return StatusCode::FAILURE;
+  }
+ }
+ else
+ {
+  ATH_MSG_WARNING( "MetaData not found for "<< m_MC_DIGI_PARAM );
+ }
+
+ if(detStore()->contains< AthenaAttributeList >( m_MC_SIM_PARAM ) )
+ {
+  const DataHandle< AthenaAttributeList > aptr;
+  if( detStore()->regFcn( &ISF_HitAnalysis::updateMetaData, this, aptr,m_MC_SIM_PARAM, true ).isFailure() )
+  {
+   ATH_MSG_ERROR( "Could not register callback for "<< m_MC_SIM_PARAM );
+   return StatusCode::FAILURE;
+  }
+ }
+ else
+  ATH_MSG_WARNING( "MetaData not found for "<< m_MC_SIM_PARAM );
+
+ // Get CaloGeometryHelper
+ if (m_CaloGeometryHelper.retrieve().isFailure())
+ {
+  ATH_MSG_ERROR("CaloGeometryHelper not found ");
+  return StatusCode::FAILURE;
+ }
+
+ // Get FastCaloSimCaloExtrapolation
+ if (m_FastCaloSimCaloExtrapolation.retrieve().isFailure())
+ {
+  ATH_MSG_ERROR("FastCaloSimCaloExtrapolation not found ");
+  return StatusCode::FAILURE;
+ }
+
+ // Grab the Ntuple and histogramming service for the tree
+ sc = service("THistSvc",m_thistSvc);
+ if (sc.isFailure())
+ {
+  ATH_MSG_ERROR( "Unable to retrieve pointer to THistSvc" );
+  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_MSG_ERROR("PDG table not found");
+  return StatusCode::FAILURE;
+ }
+ //#########################
+
+ //
+ m_tree = new TTree( TString(m_ntupleTreeName), "CaloHitAna" );
+ std::string fullNtupleName =  "/"+m_ntupleFileName+"/"+m_ntupleDirName+"/"+m_ntupleTreeName;
+ sc = m_thistSvc->regTree(fullNtupleName, m_tree);
+ if (sc.isFailure() || !m_tree )
+ {
+  ATH_MSG_ERROR("Unable to register TTree: " << fullNtupleName);
+  return StatusCode::FAILURE;
+ }
+
+ /** now add branches and leaves to the tree */
+ if (m_tree)
+ {
+  ATH_MSG_INFO("Successfull registered TTree: " << fullNtupleName);
+  //this actually creates the vector itself! And only if it succeeds! Note that the result is not checked! And the code is probably leaking memory in the end
+  m_tree->Branch("HitX",                 &m_hit_x);
+  m_tree->Branch("HitY",                 &m_hit_y);
+  m_tree->Branch("HitZ",                 &m_hit_z);
+  m_tree->Branch("HitE",                 &m_hit_energy);
+  m_tree->Branch("HitT",                 &m_hit_time);
+  m_tree->Branch("HitIdentifier",        &m_hit_identifier);
+  m_tree->Branch("HitCellIdentifier",    &m_hit_cellidentifier);
+  m_tree->Branch("HitIsLArBarrel",       &m_islarbarrel);
+  m_tree->Branch("HitIsLArEndCap",       &m_islarendcap);
+  m_tree->Branch("HitIsHEC",             &m_islarhec);
+  m_tree->Branch("HitIsFCAL",            &m_islarfcal);
+  m_tree->Branch("HitIsTile",            &m_istile);
+  m_tree->Branch("HitSampling",          &m_hit_sampling);
+  m_tree->Branch("HitSamplingFraction",  &m_hit_samplingfraction);
+
+  m_tree->Branch("TruthE",               &m_truth_energy);
+  m_tree->Branch("TruthPx",              &m_truth_px);
+  m_tree->Branch("TruthPy",              &m_truth_py);
+  m_tree->Branch("TruthPz",              &m_truth_pz);
+  m_tree->Branch("TruthPDG",             &m_truth_pdg);
+  m_tree->Branch("TruthBarcode",         &m_truth_barcode);
+  m_tree->Branch("TruthVtxBarcode",      &m_truth_vtxbarcode);
+
+  m_tree->Branch("CellIdentifier",       &m_cell_identifier);
+  m_tree->Branch("CellE",                &m_cell_energy);
+  m_tree->Branch("CellSampling",         &m_cell_sampling);
+
+  m_tree->Branch("G4HitE",               &m_g4hit_energy);
+  m_tree->Branch("G4HitT",               &m_g4hit_time);
+  m_tree->Branch("G4HitIdentifier",      &m_g4hit_identifier);
+  m_tree->Branch("G4HitCellIdentifier",  &m_g4hit_cellidentifier);
+  m_tree->Branch("G4HitSamplingFraction",&m_g4hit_samplingfraction);
+  m_tree->Branch("G4HitSampling",        &m_g4hit_sampling);
+  //And this looks like will fail since ROOT has no idea what the object is...
+  //m_tree->Branch("MatchedCells", &m_matched_cells);
 
   //#########################
-  IPartPropSvc* p_PartPropSvc=0;
-  if (service("PartPropSvc",p_PartPropSvc).isFailure() || p_PartPropSvc == 0)
-    {
-      ATH_MSG_ERROR("could not find PartPropService");
-      return StatusCode::FAILURE;
-    }
+  /*
+  m_tree->Branch("TTC_back_eta",&m_TTC_back_eta);
+  m_tree->Branch("TTC_back_phi",&m_TTC_back_phi);
+  m_tree->Branch("TTC_back_r",&m_TTC_back_r);
+  m_tree->Branch("TTC_back_z",&m_TTC_back_z);
+  m_tree->Branch("TTC_entrance_eta",&m_TTC_entrance_eta);
+  m_tree->Branch("TTC_entrance_phi",&m_TTC_entrance_phi);
+  m_tree->Branch("TTC_entrance_r",&m_TTC_entrance_r);
+  m_tree->Branch("TTC_entrance_z",&m_TTC_entrance_z);
+  m_tree->Branch("TTC_IDCaloBoundary_eta",&m_TTC_IDCaloBoundary_eta);
+  m_tree->Branch("TTC_IDCaloBoundary_phi",&m_TTC_IDCaloBoundary_phi);
+  m_tree->Branch("TTC_IDCaloBoundary_r",&m_TTC_IDCaloBoundary_r);
+  m_tree->Branch("TTC_IDCaloBoundary_z",&m_TTC_IDCaloBoundary_z);
+  m_tree->Branch("TTC_Angle3D",&m_TTC_Angle3D);
+  m_tree->Branch("TTC_AngleEta",&m_TTC_AngleEta);
+  */
+  m_tree->Branch("newTTC_back_eta",&m_newTTC_back_eta);
+  m_tree->Branch("newTTC_back_phi",&m_newTTC_back_phi);
+  m_tree->Branch("newTTC_back_r",&m_newTTC_back_r);
+  m_tree->Branch("newTTC_back_z",&m_newTTC_back_z);
+  m_tree->Branch("newTTC_entrance_eta",&m_newTTC_entrance_eta);
+  m_tree->Branch("newTTC_entrance_phi",&m_newTTC_entrance_phi);
+  m_tree->Branch("newTTC_entrance_r",&m_newTTC_entrance_r);
+  m_tree->Branch("newTTC_entrance_z",&m_newTTC_entrance_z);
+  m_tree->Branch("newTTC_IDCaloBoundary_eta",&m_newTTC_IDCaloBoundary_eta);
+  m_tree->Branch("newTTC_IDCaloBoundary_phi",&m_newTTC_IDCaloBoundary_phi);
+  m_tree->Branch("newTTC_IDCaloBoundary_r",&m_newTTC_IDCaloBoundary_r);
+  m_tree->Branch("newTTC_IDCaloBoundary_z",&m_newTTC_IDCaloBoundary_z);
+  m_tree->Branch("newTTC_Angle3D",&m_newTTC_Angle3D);
+  m_tree->Branch("newTTC_AngleEta",&m_newTTC_AngleEta);
 
-  m_particleDataTable = (HepPDT::ParticleDataTable*) p_PartPropSvc->PDT();
-  if(m_particleDataTable == 0)
-    {
-      ATH_MSG_ERROR("PDG table not found");
-      return StatusCode::FAILURE;
-    }
   //#########################
+  //m_tree->Print();
+  if (!m_hit_x || !m_hit_y || !m_hit_z || !m_hit_energy || !m_hit_time || !m_hit_identifier || !m_hit_cellidentifier || !m_islarbarrel || !m_islarendcap || !m_islarfcal || !m_islarhec || !m_istile || !m_hit_sampling || !m_hit_samplingfraction || !m_truth_energy || !m_truth_px || !m_truth_py || !m_truth_pz || !m_truth_pdg || !m_truth_barcode || !m_truth_vtxbarcode)
+  {
+   ATH_MSG_ERROR("Unable to create TTree branch correctly");
+   return StatusCode::FAILURE;
+  }
+  if (!m_cell_identifier || !m_cell_energy || !m_cell_sampling || !m_g4hit_energy || !m_g4hit_time || !m_g4hit_identifier || !m_g4hit_cellidentifier || !m_g4hit_samplingfraction || !m_g4hit_sampling )
+  {
+   ATH_MSG_ERROR("Unable to create TTree branch correctly (cell or g4hit)");
+   return StatusCode::FAILURE;
+  }
+  /*
+  if (!m_TTC_back_eta || !m_TTC_back_phi || !m_TTC_back_r || !m_TTC_back_z || !m_TTC_entrance_eta || !m_TTC_entrance_phi || !m_TTC_entrance_r || !m_TTC_entrance_z || !m_TTC_IDCaloBoundary_eta || !m_TTC_IDCaloBoundary_phi || !m_TTC_IDCaloBoundary_r || !m_TTC_IDCaloBoundary_z || !m_TTC_Angle3D || !m_TTC_AngleEta)
+  {
+         ATH_MSG_ERROR("Unable to create TTree branch correctly (TTC variables)");
+         return StatusCode::FAILURE;
+  }
+  */
+  if (!m_newTTC_back_eta || !m_newTTC_back_phi || !m_newTTC_back_r || !m_newTTC_back_z || !m_newTTC_entrance_eta || !m_newTTC_entrance_phi || !m_newTTC_entrance_r || !m_newTTC_entrance_z || !m_newTTC_IDCaloBoundary_eta || !m_newTTC_IDCaloBoundary_phi || !m_newTTC_IDCaloBoundary_r || !m_newTTC_IDCaloBoundary_z || !m_newTTC_Angle3D || !m_newTTC_AngleEta)
+  {
+         ATH_MSG_ERROR("Unable to create TTree branch correctly (newTTC variables)");
+         return StatusCode::FAILURE;
+  }
 
-  //
-  m_tree = new TTree( TString(m_ntupleTreeName), "CaloHitAna" );
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/"+m_ntupleDirName+"/"+m_ntupleTreeName;
-  sc = m_thistSvc->regTree(fullNtupleName, m_tree);
-  if (sc.isFailure() || !m_tree )
-    {
-      ATH_MSG_ERROR("Unable to register TTree: " << fullNtupleName);
-      return StatusCode::FAILURE;
-    }
-
-  /** now add branches and leaves to the tree */
-  if (m_tree)
-    {
-      ATH_MSG_INFO("Successfull registered TTree: " << fullNtupleName);
-      //this actually creates the vector itself! And only if it succeeds! Note that the result is not checked! And the code is probably leaking memory in the end
-      m_tree->Branch("HitX",                 &m_hit_x);
-      m_tree->Branch("HitY",                 &m_hit_y);
-      m_tree->Branch("HitZ",                 &m_hit_z);
-      m_tree->Branch("HitE",                 &m_hit_energy);
-      m_tree->Branch("HitT",                 &m_hit_time);
-      m_tree->Branch("HitIdentifier",        &m_hit_identifier);
-      m_tree->Branch("HitCellIdentifier",    &m_hit_cellidentifier);
-      m_tree->Branch("HitIsLArBarrel",       &m_islarbarrel);
-      m_tree->Branch("HitIsLArEndCap",       &m_islarendcap);
-      m_tree->Branch("HitIsHEC",             &m_islarhec);
-      m_tree->Branch("HitIsFCAL",            &m_islarfcal);
-      m_tree->Branch("HitIsTile",            &m_istile);
-      m_tree->Branch("HitSampling",          &m_hit_sampling);
-      m_tree->Branch("HitSamplingFraction",  &m_hit_samplingfraction);
-
-      m_tree->Branch("TruthE",               &m_truth_energy);
-      m_tree->Branch("TruthPx",              &m_truth_px);
-      m_tree->Branch("TruthPy",              &m_truth_py);
-      m_tree->Branch("TruthPz",              &m_truth_pz);
-      m_tree->Branch("TruthPDG",             &m_truth_pdg);
-      m_tree->Branch("TruthBarcode",         &m_truth_barcode);
-      m_tree->Branch("TruthVtxBarcode",      &m_truth_vtxbarcode);
-
-      m_tree->Branch("CellIdentifier",       &m_cell_identifier);
-      m_tree->Branch("CellE",                &m_cell_energy);
-      m_tree->Branch("CellSampling",         &m_cell_sampling);
-
-      m_tree->Branch("G4HitE",               &m_g4hit_energy);
-      m_tree->Branch("G4HitT",               &m_g4hit_time);
-      m_tree->Branch("G4HitIdentifier",      &m_g4hit_identifier);
-      m_tree->Branch("G4HitCellIdentifier",  &m_g4hit_cellidentifier);
-      m_tree->Branch("G4HitSamplingFraction",&m_g4hit_samplingfraction);
-      m_tree->Branch("G4HitSampling",        &m_g4hit_sampling);
-      //And this looks like will fail since ROOT has no idea what the object is...
-      //m_tree->Branch("MatchedCells", &m_matched_cells);
-
-      //#########################
-      m_tree->Branch("TTC_back_eta",&m_TTC_back_eta);
-      m_tree->Branch("TTC_back_phi",&m_TTC_back_phi);
-      m_tree->Branch("TTC_back_r",&m_TTC_back_r);
-      m_tree->Branch("TTC_back_z",&m_TTC_back_z);
-      m_tree->Branch("TTC_entrance_eta",&m_TTC_entrance_eta);
-      m_tree->Branch("TTC_entrance_phi",&m_TTC_entrance_phi);
-      m_tree->Branch("TTC_entrance_r",&m_TTC_entrance_r);
-      m_tree->Branch("TTC_entrance_z",&m_TTC_entrance_z);
-      m_tree->Branch("TTC_IDCaloBoundary_eta",&m_TTC_IDCaloBoundary_eta);
-      m_tree->Branch("TTC_IDCaloBoundary_phi",&m_TTC_IDCaloBoundary_phi);
-      m_tree->Branch("TTC_IDCaloBoundary_r",&m_TTC_IDCaloBoundary_r);
-      m_tree->Branch("TTC_IDCaloBoundary_z",&m_TTC_IDCaloBoundary_z);
-      m_tree->Branch("TTC_Angle3D",&m_TTC_Angle3D);
-      m_tree->Branch("TTC_AngleEta",&m_TTC_AngleEta);
-
-      m_tree->Branch("newTTC_back_eta",&m_newTTC_back_eta);
-      m_tree->Branch("newTTC_back_phi",&m_newTTC_back_phi);
-      m_tree->Branch("newTTC_back_r",&m_newTTC_back_r);
-      m_tree->Branch("newTTC_back_z",&m_newTTC_back_z);
-      m_tree->Branch("newTTC_entrance_eta",&m_newTTC_entrance_eta);
-      m_tree->Branch("newTTC_entrance_phi",&m_newTTC_entrance_phi);
-      m_tree->Branch("newTTC_entrance_r",&m_newTTC_entrance_r);
-      m_tree->Branch("newTTC_entrance_z",&m_newTTC_entrance_z);
-      m_tree->Branch("newTTC_IDCaloBoundary_eta",&m_newTTC_IDCaloBoundary_eta);
-      m_tree->Branch("newTTC_IDCaloBoundary_phi",&m_newTTC_IDCaloBoundary_phi);
-      m_tree->Branch("newTTC_IDCaloBoundary_r",&m_newTTC_IDCaloBoundary_r);
-      m_tree->Branch("newTTC_IDCaloBoundary_z",&m_newTTC_IDCaloBoundary_z);
-      m_tree->Branch("newTTC_Angle3D",&m_newTTC_Angle3D);
-      m_tree->Branch("newTTC_AngleEta",&m_newTTC_AngleEta);
-
-      //#########################
-      //m_tree->Print();
-      if (!m_hit_x || !m_hit_y || !m_hit_z || !m_hit_energy || !m_hit_time || !m_hit_identifier || !m_hit_cellidentifier || !m_islarbarrel || !m_islarendcap || !m_islarfcal || !m_islarhec || !m_istile || !m_hit_sampling || !m_hit_samplingfraction || !m_truth_energy || !m_truth_px || !m_truth_py || !m_truth_pz || !m_truth_pdg || !m_truth_barcode || !m_truth_vtxbarcode)
-        {
-          ATH_MSG_ERROR("Unable to create TTree branch correctly");
-          return StatusCode::FAILURE;
-        }
-      if (!m_cell_identifier || !m_cell_energy || !m_cell_sampling || !m_g4hit_energy || !m_g4hit_time || !m_g4hit_identifier || !m_g4hit_cellidentifier || !m_g4hit_samplingfraction || !m_g4hit_sampling )
-        {
-          ATH_MSG_ERROR("Unable to create TTree branch correctly (cell or g4hit)");
-          return StatusCode::FAILURE;
-        }
-      if (!m_TTC_back_eta || !m_TTC_back_phi || !m_TTC_back_r || !m_TTC_back_z || !m_TTC_entrance_eta || !m_TTC_entrance_phi || !m_TTC_entrance_r || !m_TTC_entrance_z || !m_TTC_IDCaloBoundary_eta || !m_TTC_IDCaloBoundary_phi || !m_TTC_IDCaloBoundary_r || !m_TTC_IDCaloBoundary_z || !m_TTC_Angle3D || !m_TTC_AngleEta)
-        {
-          ATH_MSG_ERROR("Unable to create TTree branch correctly (TTC variables)");
-          return StatusCode::FAILURE;
-        }
-      if (!m_newTTC_back_eta || !m_newTTC_back_phi || !m_newTTC_back_r || !m_newTTC_back_z || !m_newTTC_entrance_eta || !m_newTTC_entrance_phi || !m_newTTC_entrance_r || !m_newTTC_entrance_z || !m_newTTC_IDCaloBoundary_eta || !m_newTTC_IDCaloBoundary_phi || !m_newTTC_IDCaloBoundary_r || !m_newTTC_IDCaloBoundary_z || !m_newTTC_Angle3D || !m_newTTC_AngleEta)
-        {
-          ATH_MSG_ERROR("Unable to create TTree branch correctly (newTTC variables)");
-          return StatusCode::FAILURE;
-        }
-    }
+ }
 
-  return StatusCode::SUCCESS;
+ return StatusCode::SUCCESS;
 
 } //initialize
 
 StatusCode ISF_HitAnalysis::finalize()
 {
 
-  ATH_MSG_INFO( "doing finalize()" );
-
-  TTree* geo = new TTree( m_geoModel->atlasVersion().c_str() , m_geoModel->atlasVersion().c_str() );
-  std::string fullNtupleName =  "/"+m_geoFileName+"/"+m_geoModel->atlasVersion();
-  StatusCode sc = m_thistSvc->regTree(fullNtupleName, geo);
-  if(sc.isFailure() || !geo )
-    {
-      ATH_MSG_ERROR("Unable to register TTree: " << fullNtupleName);
-      return StatusCode::FAILURE;
-    }
-
-  /** now add branches and leaves to the tree */
-
-  typedef struct
+ ATH_MSG_INFO( "doing finalize()" );
+
+ TTree* geo = new TTree( m_geoModel->atlasVersion().c_str() , m_geoModel->atlasVersion().c_str() );
+ std::string fullNtupleName =  "/"+m_geoFileName+"/"+m_geoModel->atlasVersion();
+ StatusCode sc = m_thistSvc->regTree(fullNtupleName, geo);
+ if(sc.isFailure() || !geo )
+ {
+  ATH_MSG_ERROR("Unable to register TTree: " << fullNtupleName);
+  return StatusCode::FAILURE;
+ }
+
+ /** now add branches and leaves to the tree */
+
+ typedef struct
+ {
+  Long64_t identifier;
+  Int_t calosample;
+  float eta,phi,r,eta_raw,phi_raw,r_raw,x,y,z,x_raw,y_raw,z_raw;
+  float deta,dphi,dr,dx,dy,dz;
+ } GEOCELL;
+
+ static GEOCELL geocell;
+
+ if(geo)
+ {
+  ATH_MSG_INFO("Successfull registered TTree: " << fullNtupleName);
+  //this actually creates the vector itself! And only if it succeeds! Note that the result is not checked! And the code is probably leaking memory in the end
+  //geo->Branch("cells", &geocell,"identifier/L:eta,phi,r,eta_raw,phi_raw,r_raw,x,y,z,x_raw,y_raw,z_raw/F:Deta,Dphi,Dr,Dx,Dy,Dz/F");
+  geo->Branch("identifier", &geocell.identifier,"identifier/L");
+  geo->Branch("calosample", &geocell.calosample,"calosample/I");
+
+  geo->Branch("eta", &geocell.eta,"eta/F");
+  geo->Branch("phi", &geocell.phi,"phi/F");
+  geo->Branch("r", &geocell.r,"r/F");
+  geo->Branch("eta_raw", &geocell.eta_raw,"eta_raw/F");
+  geo->Branch("phi_raw", &geocell.phi_raw,"phi_raw/F");
+  geo->Branch("r_raw", &geocell.r_raw,"r_raw/F");
+
+  geo->Branch("x", &geocell.x,"x/F");
+  geo->Branch("y", &geocell.y,"y/F");
+  geo->Branch("z", &geocell.z,"z/F");
+  geo->Branch("x_raw", &geocell.x_raw,"x_raw/F");
+  geo->Branch("y_raw", &geocell.y_raw,"y_raw/F");
+  geo->Branch("z_raw", &geocell.z_raw,"z_raw/F");
+
+  geo->Branch("deta", &geocell.deta,"deta/F");
+  geo->Branch("dphi", &geocell.dphi,"dphi/F");
+  geo->Branch("dr", &geocell.dr,"dr/F");
+  geo->Branch("dx", &geocell.dx,"dx/F");
+  geo->Branch("dy", &geocell.dy,"dy/F");
+  geo->Branch("dz", &geocell.dz,"dz/F");
+ }
+
+ if(m_calo_dd_man)
+ {
+  int ncells=0;
+  for(CaloDetDescrManager::calo_element_const_iterator calo_iter=m_calo_dd_man->element_begin();calo_iter<m_calo_dd_man->element_end();++calo_iter)
   {
-    Long64_t identifier;
-    Int_t calosample;
-    float eta,phi,r,eta_raw,phi_raw,r_raw,x,y,z,x_raw,y_raw,z_raw;
-    float deta,dphi,dr,dx,dy,dz;
-  } GEOCELL;
-
-  static GEOCELL geocell;
-
-  if(geo)
+   const CaloDetDescrElement* theDDE=*calo_iter;
+   if(theDDE)
+   {
+    CaloCell_ID::CaloSample sample=theDDE->getSampling();
+    //CaloCell_ID::SUBCALO calo=theDDE->getSubCalo();
+    ++ncells;
+    if(geo)
     {
-      ATH_MSG_INFO("Successfull registered TTree: " << fullNtupleName);
-      //this actually creates the vector itself! And only if it succeeds! Note that the result is not checked! And the code is probably leaking memory in the end
-      //geo->Branch("cells", &geocell,"identifier/L:eta,phi,r,eta_raw,phi_raw,r_raw,x,y,z,x_raw,y_raw,z_raw/F:Deta,Dphi,Dr,Dx,Dy,Dz/F");
-      geo->Branch("identifier", &geocell.identifier,"identifier/L");
-      geo->Branch("calosample", &geocell.calosample,"calosample/I");
-
-      geo->Branch("eta", &geocell.eta,"eta/F");
-      geo->Branch("phi", &geocell.phi,"phi/F");
-      geo->Branch("r", &geocell.r,"r/F");
-      geo->Branch("eta_raw", &geocell.eta_raw,"eta_raw/F");
-      geo->Branch("phi_raw", &geocell.phi_raw,"phi_raw/F");
-      geo->Branch("r_raw", &geocell.r_raw,"r_raw/F");
-
-      geo->Branch("x", &geocell.x,"x/F");
-      geo->Branch("y", &geocell.y,"y/F");
-      geo->Branch("z", &geocell.z,"z/F");
-      geo->Branch("x_raw", &geocell.x_raw,"x_raw/F");
-      geo->Branch("y_raw", &geocell.y_raw,"y_raw/F");
-      geo->Branch("z_raw", &geocell.z_raw,"z_raw/F");
-
-      geo->Branch("deta", &geocell.deta,"deta/F");
-      geo->Branch("dphi", &geocell.dphi,"dphi/F");
-      geo->Branch("dr", &geocell.dr,"dr/F");
-      geo->Branch("dx", &geocell.dx,"dx/F");
-      geo->Branch("dy", &geocell.dy,"dy/F");
-      geo->Branch("dz", &geocell.dz,"dz/F");
+     geocell.identifier=theDDE->identify().get_compact();
+     geocell.calosample=sample;
+     geocell.eta=theDDE->eta();
+     geocell.phi=theDDE->phi();
+     geocell.r=theDDE->r();
+     geocell.eta_raw=theDDE->eta_raw();
+     geocell.phi_raw=theDDE->phi_raw();
+     geocell.r_raw=theDDE->r_raw();
+     geocell.x=theDDE->x();
+     geocell.y=theDDE->y();
+     geocell.z=theDDE->z();
+     geocell.x_raw=theDDE->x_raw();
+     geocell.y_raw=theDDE->y_raw();
+     geocell.z_raw=theDDE->z_raw();
+     geocell.deta=theDDE->deta();
+     geocell.dphi=theDDE->dphi();
+     geocell.dr=theDDE->dr();
+     geocell.dx=theDDE->dx();
+     geocell.dy=theDDE->dy();
+     geocell.dz=theDDE->dz();
+
+     geo->Fill();
     }
+   }
+  }
 
-  if(m_calo_dd_man)
-    {
-      int ncells=0;
-      for(CaloDetDescrManager::calo_element_const_iterator calo_iter=m_calo_dd_man->element_begin();calo_iter<m_calo_dd_man->element_end();++calo_iter)
-        {
-          const CaloDetDescrElement* theDDE=*calo_iter;
-          if(theDDE)
-            {
-              CaloCell_ID::CaloSample sample=theDDE->getSampling();
-              //CaloCell_ID::SUBCALO calo=theDDE->getSubCalo();
-              ++ncells;
-              if(geo)
-                {
-                  geocell.identifier=theDDE->identify().get_compact();
-                  geocell.calosample=sample;
-                  geocell.eta=theDDE->eta();
-                  geocell.phi=theDDE->phi();
-                  geocell.r=theDDE->r();
-                  geocell.eta_raw=theDDE->eta_raw();
-                  geocell.phi_raw=theDDE->phi_raw();
-                  geocell.r_raw=theDDE->r_raw();
-                  geocell.x=theDDE->x();
-                  geocell.y=theDDE->y();
-                  geocell.z=theDDE->z();
-                  geocell.x_raw=theDDE->x_raw();
-                  geocell.y_raw=theDDE->y_raw();
-                  geocell.z_raw=theDDE->z_raw();
-                  geocell.deta=theDDE->deta();
-                  geocell.dphi=theDDE->dphi();
-                  geocell.dr=theDDE->dr();
-                  geocell.dx=theDDE->dx();
-                  geocell.dy=theDDE->dy();
-                  geocell.dz=theDDE->dz();
-
-                  geo->Fill();
-                }
-            }
-        }
-
-      ATH_MSG_INFO( ncells<<" cells found" );
-    }
+  ATH_MSG_INFO( ncells<<" cells found" );
+ }
 
-  return StatusCode::SUCCESS;
+ return StatusCode::SUCCESS;
 } //finalize
 
 
 StatusCode ISF_HitAnalysis::execute()
 {
 
-  ATH_MSG_DEBUG( "In ISF_HitAnalysis::execute()" );
-
-  if (! m_tree)
-    {
-      ATH_MSG_ERROR( "tree not registered" );
-      return StatusCode::FAILURE;
-    }
-
-  //now if the branches were created correctly, the pointers point to something and it is possible to clear the vectors
-  TVector3 vectest;
-  vectest.SetPtEtaPhi(1.,1.,1.);
-  m_hit_x->clear();
-  m_hit_y->clear();
-  m_hit_z->clear();
-  m_hit_energy->clear();
-  m_hit_time->clear();
-  m_hit_identifier->clear();
-  m_hit_cellidentifier->clear();
-  m_islarbarrel->clear();
-  m_islarendcap->clear();
-  m_islarhec->clear();
-  m_islarfcal->clear();
-  m_istile->clear();
-  m_hit_sampling->clear();
-  m_hit_samplingfraction->clear();
-  m_truth_energy->clear();
-  m_truth_px->clear();
-  m_truth_py->clear();
-  m_truth_pz->clear();
-  m_truth_pdg->clear();
-  m_truth_barcode->clear();
-  m_truth_vtxbarcode->clear();
-  m_cell_identifier->clear();
-  m_cell_energy->clear();
-  m_cell_sampling->clear();
-  m_g4hit_energy->clear();
-  m_g4hit_time->clear();
-  m_g4hit_identifier->clear();
-  m_g4hit_cellidentifier->clear();
-  m_g4hit_sampling->clear();
-  m_g4hit_samplingfraction->clear();
-  //which fails for this one!!
-  //m_matched_cells->clear();
-
-  //##########################
-  m_TTC_back_eta->clear();
-  m_TTC_back_phi->clear();
-  m_TTC_back_r->clear();
-  m_TTC_back_z->clear();
-  m_TTC_entrance_eta->clear();
-  m_TTC_entrance_phi->clear();
-  m_TTC_entrance_r->clear();
-  m_TTC_entrance_z->clear();
-  m_TTC_IDCaloBoundary_eta->clear();
-  m_TTC_IDCaloBoundary_phi->clear();
-  m_TTC_IDCaloBoundary_r->clear();
-  m_TTC_IDCaloBoundary_z->clear();
-  m_TTC_Angle3D->clear();
-  m_TTC_AngleEta->clear();
-
-  m_newTTC_back_eta->clear();
-  m_newTTC_back_phi->clear();
-  m_newTTC_back_r->clear();
-  m_newTTC_back_z->clear();
-  m_newTTC_entrance_eta->clear();
-  m_newTTC_entrance_phi->clear();
-  m_newTTC_entrance_r->clear();
-  m_newTTC_entrance_z->clear();
-  m_newTTC_IDCaloBoundary_eta->clear();
-  m_newTTC_IDCaloBoundary_phi->clear();
-  m_newTTC_IDCaloBoundary_r->clear();
-  m_newTTC_IDCaloBoundary_z->clear();
-  m_newTTC_Angle3D->clear();
-  m_newTTC_AngleEta->clear();
-  //##########################
-
-  //Get the FastCaloSim step info collection from store
-  const ISF_FCS_Parametrization::FCS_StepInfoCollection* eventStepsES;
-  StatusCode sc = evtStore()->retrieve(eventStepsES, "ZHMergedEventSteps");
-  if (sc.isFailure())
-    {
-      ATH_MSG_WARNING( "No FastCaloSim steps read from StoreGate?" );
-      //return StatusCode::FAILURE;
-    }
-  else
-    {
-      ATH_MSG_INFO("Read: "<<eventStepsES->size()<<" position hits");
-      for (ISF_FCS_Parametrization::FCS_StepInfoCollection::const_iterator it = eventStepsES->begin(); it != eventStepsES->end(); ++it)
-        {
-          m_hit_x->push_back( (*it)->x() );
-          m_hit_y->push_back( (*it)->y() );
-          m_hit_z->push_back( (*it)->z() );
-          m_hit_energy->push_back( (*it)->energy() );
-          m_hit_time->push_back( (*it)->time());
-
-          //Try to get the samplings, sampling fractions from identifiers
-          bool larbarrel=false;
-          bool larendcap=false;
-          bool larhec=false;
-          bool larfcal=false;
-          bool tile=false;
-          int sampling=-1;
-          double sampfrac=0.0;
-
-          Identifier id = (*it)->identify();
-          Identifier cell_id = (*it)->identify(); //to be replaced by cell_id in tile
-
-          if(m_calo_dd_man->get_element(id))
-            {
-              CaloCell_ID::CaloSample layer = m_calo_dd_man->get_element(id)->getSampling();
-              sampling = layer; //use CaloCell layer immediately
-            }
-          else
-            ATH_MSG_WARNING( "Warning no sampling info for "<<id.getString());
-
-          if(m_larEmID->is_lar_em(id) || m_larHecID->is_lar_hec(id) || m_larFcalID->is_lar_fcal(id))
-            sampfrac=m_dd_fSampl->FSAMPL(id);
-
-          if(m_larEmID->is_lar_em(id))
-            {
-              //std::cout <<"This hit is in LAr EM ";
-              if (m_larEmID->is_em_barrel(id))
-                larbarrel=true;
-              else if(m_larEmID->is_em_endcap(id))
-                larendcap=true;
-            }
-          else if(m_larHecID->is_lar_hec(id))
-            larhec = true;
-          else if(m_larFcalID->is_lar_fcal(id))
-            larfcal = true;
-          else if(m_tileID->is_tile_barrel(id) || m_tileID->is_tile_extbarrel(id) || m_tileID->is_tile_gap(id) || m_tileID->is_tile_gapscin(id) || m_tileID->is_tile_aux(id))
-            {
-              cell_id = m_tileID->cell_id(id);
-              Int_t tile_sampling = -1;
-              if(m_calo_dd_man->get_element(cell_id))
+ ATH_MSG_DEBUG( "In ISF_HitAnalysis::execute()" );
+
+ if (! m_tree)
+ {
+  ATH_MSG_ERROR( "tree not registered" );
+  return StatusCode::FAILURE;
+ }
+
+ //now if the branches were created correctly, the pointers point to something and it is possible to clear the vectors
+ TVector3 vectest;
+ vectest.SetPtEtaPhi(1.,1.,1.);
+ m_hit_x->clear();
+ m_hit_y->clear();
+ m_hit_z->clear();
+ m_hit_energy->clear();
+ m_hit_time->clear();
+ m_hit_identifier->clear();
+ m_hit_cellidentifier->clear();
+ m_islarbarrel->clear();
+ m_islarendcap->clear();
+ m_islarhec->clear();
+ m_islarfcal->clear();
+ m_istile->clear();
+ m_hit_sampling->clear();
+ m_hit_samplingfraction->clear();
+ m_truth_energy->clear();
+ m_truth_px->clear();
+ m_truth_py->clear();
+ m_truth_pz->clear();
+ m_truth_pdg->clear();
+ m_truth_barcode->clear();
+ m_truth_vtxbarcode->clear();
+ m_cell_identifier->clear();
+ m_cell_energy->clear();
+ m_cell_sampling->clear();
+ m_g4hit_energy->clear();
+ m_g4hit_time->clear();
+ m_g4hit_identifier->clear();
+ m_g4hit_cellidentifier->clear();
+ m_g4hit_sampling->clear();
+ m_g4hit_samplingfraction->clear();
+ //which fails for this one!!
+ //m_matched_cells->clear();
+
+ //##########################
+ /*
+ m_TTC_back_eta->clear();
+ m_TTC_back_phi->clear();
+ m_TTC_back_r->clear();
+ m_TTC_back_z->clear();
+ m_TTC_entrance_eta->clear();
+ m_TTC_entrance_phi->clear();
+ m_TTC_entrance_r->clear();
+ m_TTC_entrance_z->clear();
+ m_TTC_IDCaloBoundary_eta->clear();
+ m_TTC_IDCaloBoundary_phi->clear();
+ m_TTC_IDCaloBoundary_r->clear();
+ m_TTC_IDCaloBoundary_z->clear();
+ m_TTC_Angle3D->clear();
+ m_TTC_AngleEta->clear();
+ */
+
+ m_newTTC_back_eta->clear();
+ m_newTTC_back_phi->clear();
+ m_newTTC_back_r->clear();
+ m_newTTC_back_z->clear();
+ m_newTTC_entrance_eta->clear();
+ m_newTTC_entrance_phi->clear();
+ m_newTTC_entrance_r->clear();
+ m_newTTC_entrance_z->clear();
+ m_newTTC_IDCaloBoundary_eta->clear();
+ m_newTTC_IDCaloBoundary_phi->clear();
+ m_newTTC_IDCaloBoundary_r->clear();
+ m_newTTC_IDCaloBoundary_z->clear();
+ m_newTTC_Angle3D->clear();
+ m_newTTC_AngleEta->clear();
+ //##########################
+
+ //Get the FastCaloSim step info collection from store
+ const ISF_FCS_Parametrization::FCS_StepInfoCollection* eventStepsES;
+ StatusCode sc = evtStore()->retrieve(eventStepsES, "ZHMergedEventSteps");
+ if (sc.isFailure())
+ {
+  ATH_MSG_WARNING( "No FastCaloSim steps read from StoreGate?" );
+  //return StatusCode::FAILURE;
+ }
+ else
+ {
+  ATH_MSG_INFO("Read: "<<eventStepsES->size()<<" position hits");
+  for (ISF_FCS_Parametrization::FCS_StepInfoCollection::const_iterator it = eventStepsES->begin(); it != eventStepsES->end(); ++it)
+  {
+         m_hit_x->push_back( (*it)->x() );
+         m_hit_y->push_back( (*it)->y() );
+         m_hit_z->push_back( (*it)->z() );
+         m_hit_energy->push_back( (*it)->energy() );
+   m_hit_time->push_back( (*it)->time());
+
+         //Try to get the samplings, sampling fractions from identifiers
+         bool larbarrel=false;
+         bool larendcap=false;
+         bool larhec=false;
+         bool larfcal=false;
+         bool tile=false;
+         int sampling=-1;
+         double sampfrac=0.0;
+
+         Identifier id = (*it)->identify();
+         Identifier cell_id = (*it)->identify(); //to be replaced by cell_id in tile
+
+         if(m_calo_dd_man->get_element(id))
+         {
+          CaloCell_ID::CaloSample layer = m_calo_dd_man->get_element(id)->getSampling();
+          sampling = layer; //use CaloCell layer immediately
+         }
+         else
+          ATH_MSG_WARNING( "Warning no sampling info for "<<id.getString());
+
+   if(m_larEmID->is_lar_em(id) || m_larHecID->is_lar_hec(id) || m_larFcalID->is_lar_fcal(id))
+          sampfrac=m_dd_fSampl->FSAMPL(id);
+
+         if(m_larEmID->is_lar_em(id))
+         {
+          //std::cout <<"This hit is in LAr EM ";
+          if (m_larEmID->is_em_barrel(id))
+                 larbarrel=true;
+          else if(m_larEmID->is_em_endcap(id))
+                 larendcap=true;
+         }
+         else if(m_larHecID->is_lar_hec(id))
+    larhec = true;
+         else if(m_larFcalID->is_lar_fcal(id))
+    larfcal = true;
+         else if(m_tileID->is_tile_barrel(id) || m_tileID->is_tile_extbarrel(id) || m_tileID->is_tile_gap(id) || m_tileID->is_tile_gapscin(id) || m_tileID->is_tile_aux(id))
+         {
+          cell_id = m_tileID->cell_id(id);
+          Int_t tile_sampling = -1;
+          if(m_calo_dd_man->get_element(cell_id))
                 {
-                  tile_sampling = m_calo_dd_man->get_element(cell_id)->getSampling();
-                  sampfrac = m_tileInfo->HitCalib(cell_id);
+                 tile_sampling = m_calo_dd_man->get_element(cell_id)->getSampling();
+                 sampfrac = m_tileInfo->HitCalib(cell_id);
                 }
-              tile = true;
-              if(tile_sampling!= -1)
-                sampling = tile_sampling; //m_calo_dd_man needs to be called with cell_id not pmt_id!!
-            }
-          else
-            ATH_MSG_WARNING( "This hit is somewhere. Please check!");
-
-          m_hit_identifier->push_back(id.get_compact());
-          m_hit_cellidentifier->push_back(cell_id.get_compact());
-          //push things into vectors:
-          m_islarbarrel->push_back(larbarrel);
-          m_islarendcap->push_back(larendcap);
-          m_islarhec->push_back(larhec);
-          m_islarfcal->push_back(larfcal);
-          m_istile->push_back(tile);
-          m_hit_sampling->push_back(sampling);
-          m_hit_samplingfraction->push_back(sampfrac);
+          tile = true;
+          if(tile_sampling!= -1)
+           sampling = tile_sampling; //m_calo_dd_man needs to be called with cell_id not pmt_id!!
+         }
+         else
+    ATH_MSG_WARNING( "This hit is somewhere. Please check!");
+
+         m_hit_identifier->push_back(id.get_compact());
+         m_hit_cellidentifier->push_back(cell_id.get_compact());
+         //push things into vectors:
+         m_islarbarrel->push_back(larbarrel);
+         m_islarendcap->push_back(larendcap);
+         m_islarhec->push_back(larhec);
+         m_islarfcal->push_back(larfcal);
+         m_istile->push_back(tile);
+         m_hit_sampling->push_back(sampling);
+         m_hit_samplingfraction->push_back(sampfrac);
 
         } //event steps
-    }//event steps read correctly
-
-  //Get truth particle info
-  //Note that there can be more truth particles, the first one is usually the one we need.
-  const DataHandle<McEventCollection> mcEvent;
-  sc = evtStore()->retrieve(mcEvent,"TruthEvent");
-  if(sc.isFailure())
-    ATH_MSG_WARNING( "No truth event!");
-  else
-    {
-      if(mcEvent)
-        {
-          //std::cout<<"ISF_HitAnalysis: MC event size: "<<mcEvent->size()<<std::endl;
-          if (mcEvent->size())
-            {
-              int particleIndex=0;
-              int loopEnd = m_NtruthParticles;
-              if(loopEnd==-1)
+ }//event steps read correctly
+
+ //Get truth particle info
+ //Note that there can be more truth particles, the first one is usually the one we need.
+ const DataHandle<McEventCollection> mcEvent;
+ sc = evtStore()->retrieve(mcEvent,"TruthEvent");
+ if(sc.isFailure())
+  ATH_MSG_WARNING( "No truth event!");
+ else
+ {
+  if(mcEvent)
+  {
+         //std::cout<<"ISF_HitAnalysis: MC event size: "<<mcEvent->size()<<std::endl;
+         if (mcEvent->size())
+         {
+                int particleIndex=0;
+                int loopEnd = m_NtruthParticles;
+                if(loopEnd==-1)
                 {
-                  loopEnd = (*mcEvent->begin())->particles_size(); //is this the correct thing?
+                 loopEnd = (*mcEvent->begin())->particles_size(); //is this the correct thing?
                 }
-              //std::cout <<"ISF_HitAnalysis: MC first truth event size: "<<(*mcEvent->begin())->particles_size()<<std::endl;
-              for (HepMC::GenEvent::particle_const_iterator it = (*mcEvent->begin())->particles_begin(); it != (*mcEvent->begin())->particles_end(); ++it)
+                //std::cout <<"ISF_HitAnalysis: MC first truth event size: "<<(*mcEvent->begin())->particles_size()<<std::endl;
+          for (HepMC::GenEvent::particle_const_iterator it = (*mcEvent->begin())->particles_begin(); it != (*mcEvent->begin())->particles_end(); ++it)
                 {
-                  ATH_MSG_DEBUG("Number truth particles="<<(*mcEvent->begin())->particles_size()<<" loopEnd="<<loopEnd);
-                  particleIndex++;
-
-                  if (particleIndex>loopEnd) break; //enough particles
-
-                  //UPDATE EXTRAPOLATION WITH ALGTOOL *********************************************************************************************
-
-                  TFCSTruthState truth((*it)->momentum().px(),(*it)->momentum().py(),(*it)->momentum().pz(),(*it)->momentum().e(),(*it)->pdg_id());
-
-                  //calculate the vertex
-                  TVector3 moment;
-                  moment.SetXYZ((*it)->momentum().px(),(*it)->momentum().py(),(*it)->momentum().pz());
-                  TVector3 direction=moment.Unit();
-
-                  //does it hit the barrel or the EC?
-                  if(abs(direction.Z())/3550.<direction.Perp()/1148.) //BARREL
-                    direction*=1148./direction.Perp();
-                  else //EC
-                    direction*=3550./abs(direction.Z());
-
-                  truth.set_vertex(direction.X(),direction.Y(),direction.Z()); //is this really needed?
-                  TFCSExtrapolationState result;
-                  m_FastCaloSimCaloExtrapolation->extrapolate(result,&truth);
-
-                  //write the result into the ntuple variables:
-
-                  std::cout<<"IDCaloBoundary_eta() "<<result.IDCaloBoundary_eta()<<std::endl;
-                  std::cout<<"IDCaloBoundary_phi() "<<result.IDCaloBoundary_phi()<<std::endl;
-                  std::cout<<"IDCaloBoundary_r() "<<result.IDCaloBoundary_r()<<std::endl;
-                  std::cout<<"IDCaloBoundary_z() "<<result.IDCaloBoundary_z()<<std::endl;
-                  std::cout<<"AngleEta "<<result.IDCaloBoundary_AngleEta()<<std::endl;
-                  std::cout<<"Angle3D "<<result.IDCaloBoundary_Angle3D()<<std::endl;
-
-                  m_newTTC_IDCaloBoundary_eta->push_back(result.IDCaloBoundary_eta());
-                  m_newTTC_IDCaloBoundary_phi->push_back(result.IDCaloBoundary_phi());
-                  m_newTTC_IDCaloBoundary_r->push_back(result.IDCaloBoundary_r());
-                  m_newTTC_IDCaloBoundary_z->push_back(result.IDCaloBoundary_z());
-                  m_newTTC_Angle3D ->push_back(result.IDCaloBoundary_Angle3D());
-                  m_newTTC_AngleEta->push_back(result.IDCaloBoundary_AngleEta());
-
-                  std::vector<double> eta_vec_ENT;
-                  std::vector<double> phi_vec_ENT;
-                  std::vector<double> r_vec_ENT;
-                  std::vector<double> z_vec_ENT;
-
-                  std::vector<double> eta_vec_EXT;
-                  std::vector<double> phi_vec_EXT;
-                  std::vector<double> r_vec_EXT;
-                  std::vector<double> z_vec_EXT;
-
-                  for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample)
-                    {
-                      std::cout<<"sample "<<sample<<std::endl;
-                      std::cout<<" eta ENT "<<result.eta(sample,1)<<" eta EXT "<<result.eta(sample,2)<<std::endl;
-                      std::cout<<" phi ENT "<<result.phi(sample,1)<<" phi EXT "<<result.phi(sample,2)<<std::endl;
-                      std::cout<<" r   ENT "<<result.r(sample,1)  <<" r   EXT "<<result.r(sample,2)  <<std::endl;
-                      std::cout<<" z   ENT "<<result.z(sample,1)  <<" z   EXT "<<result.z(sample,2)  <<std::endl;
-                      eta_vec_ENT.push_back(result.eta(sample,1));
-                      eta_vec_EXT.push_back(result.eta(sample,2));
-                      phi_vec_ENT.push_back(result.phi(sample,1));
-                      phi_vec_EXT.push_back(result.phi(sample,2));
-                      r_vec_ENT.push_back(result.r(sample,1));
-                      r_vec_EXT.push_back(result.r(sample,2));
-                      z_vec_ENT.push_back(result.z(sample,1));
-                      z_vec_EXT.push_back(result.z(sample,2));
-                    }
-
-                  m_newTTC_back_eta->push_back(eta_vec_EXT);
-                  m_newTTC_back_phi->push_back(phi_vec_EXT);
-                  m_newTTC_back_r  ->push_back(r_vec_EXT);
-                  m_newTTC_back_z  ->push_back(z_vec_EXT);
-                  m_newTTC_entrance_eta->push_back(eta_vec_ENT);
-                  m_newTTC_entrance_phi->push_back(phi_vec_ENT);
-                  m_newTTC_entrance_r  ->push_back(r_vec_ENT);
-                  m_newTTC_entrance_z  ->push_back(z_vec_ENT);
-
-                  //*******************************************************************************************************************************
-
-                  //OLD EXTRAPOLATION
-                  std::vector<Trk::HitInfo>* hitVector = caloHits(*(*it));
-
-                  Amg::Vector3D mom((*it)->momentum().x(),(*it)->momentum().y(),(*it)->momentum().z());
-
-                  m_truth_energy->push_back((*it)->momentum().e());
-                  m_truth_px->push_back((*it)->momentum().px());
-                  m_truth_py->push_back((*it)->momentum().py());
-                  m_truth_pz->push_back((*it)->momentum().pz());
-                  m_truth_pdg->push_back((*it)->pdg_id());
-                  m_truth_barcode->push_back((*it)->barcode());
-
-                  //extrapolate only if the vertex is within the IDcaloboundary - margin
-                  //bool inside_ID=false;
-                  HepMC::GenVertex* pvtx = (*it)->production_vertex();
-                  if(pvtx)
-                    {
-                      truth.set_vertex(pvtx->position().x(),pvtx->position().y(),pvtx->position().z(),pvtx->position().t());
-
-                      m_truth_vtxbarcode->push_back(pvtx->barcode());
-                      double radius2=(pvtx->position().x()*pvtx->position().x())+(pvtx->position().y()*pvtx->position().y());
-                      ATH_MSG_VERBOSE("particle "<<particleIndex<<" Mom: "<<(*it)->momentum().e()<<"|"<<(*it)->momentum().px()<<"|"<<(*it)->momentum().py()<<"|"<<(*it)->momentum().pz()<<" vertex_x "<<pvtx->position().x()<<" y "<<pvtx->position().y()<<" z "<<pvtx->position().z()<<" r2 "<<radius2<<" VertexBarcode: "<<pvtx->barcode()<<" ParticleBarcode:"<<(*it)->barcode()<<" status: "<<(*it)->status());
-                      //std::cout<<"m_CaloBoundaryZ+m_calomargin "<<m_CaloBoundaryZ+m_calomargin<<" m_CaloBoundaryR+m_calomargin "<<m_CaloBoundaryR+m_calomargin<<std::endl;
-
-                      if(fabs(pvtx->position().z())<(m_CaloBoundaryZ+m_calomargin) && radius2<((m_CaloBoundaryR+m_calomargin)*(m_CaloBoundaryR+m_calomargin)))
+     ATH_MSG_DEBUG("Number truth particles="<<(*mcEvent->begin())->particles_size()<<" loopEnd="<<loopEnd);
+                 particleIndex++;
+
+                 if (particleIndex>loopEnd) break; //enough particles
+
+     //UPDATE EXTRAPOLATION WITH ALGTOOL *********************************************************************************************
+
+           TFCSTruthState truth((*it)->momentum().px(),(*it)->momentum().py(),(*it)->momentum().pz(),(*it)->momentum().e(),(*it)->pdg_id());
+
+           //calculate the vertex
+           TVector3 moment;
+           moment.SetXYZ((*it)->momentum().px(),(*it)->momentum().py(),(*it)->momentum().pz());
+           TVector3 direction=moment.Unit();
+
+           //does it hit the barrel or the EC?
+           if(abs(direction.Z())/3550.<direction.Perp()/1148.) //BARREL
+            direction*=1148./direction.Perp();
+     else //EC
+        direction*=3550./abs(direction.Z());
+
+           truth.set_vertex(direction.X(),direction.Y(),direction.Z()); //is this really needed?
+
+           ATH_MSG_DEBUG("VERTEX x "<<direction.X()<<" y "<<direction.Y()<<" z "<<direction.Z());
+
+           TFCSExtrapolationState result;
+           m_FastCaloSimCaloExtrapolation->extrapolate(result,&truth);
+
+     //write the result into the ntuple variables:
+
+     ATH_MSG_DEBUG("IDCaloBoundary_eta() "<<result.IDCaloBoundary_eta());
+     ATH_MSG_DEBUG("IDCaloBoundary_phi() "<<result.IDCaloBoundary_phi());
+     ATH_MSG_DEBUG("IDCaloBoundary_r() "<<result.IDCaloBoundary_r());
+     ATH_MSG_DEBUG("IDCaloBoundary_z() "<<result.IDCaloBoundary_z());
+     ATH_MSG_DEBUG("AngleEta "<<result.IDCaloBoundary_AngleEta());
+     ATH_MSG_DEBUG("Angle3D "<<result.IDCaloBoundary_Angle3D());
+
+     m_newTTC_IDCaloBoundary_eta->push_back(float(result.IDCaloBoundary_eta()));
+                 m_newTTC_IDCaloBoundary_phi->push_back(float(result.IDCaloBoundary_phi()));
+                 m_newTTC_IDCaloBoundary_r->push_back(float(result.IDCaloBoundary_r()));
+                 m_newTTC_IDCaloBoundary_z->push_back(float(result.IDCaloBoundary_z()));
+                 m_newTTC_Angle3D ->push_back(float(result.IDCaloBoundary_Angle3D()));
+                 m_newTTC_AngleEta->push_back(float(result.IDCaloBoundary_AngleEta()));
+
+     std::vector<float> eta_vec_ENT;
+                 std::vector<float> phi_vec_ENT;
+                 std::vector<float> r_vec_ENT;
+                 std::vector<float> z_vec_ENT;
+
+     std::vector<float> eta_vec_EXT;
+                 std::vector<float> phi_vec_EXT;
+                 std::vector<float> r_vec_EXT;
+                 std::vector<float> z_vec_EXT;
+
+     for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample)
+                 {
+                        ATH_MSG_DEBUG("sample "<<sample);
+                        ATH_MSG_DEBUG(" eta ENT "<<result.eta(sample,1)<<" eta EXT "<<result.eta(sample,2));
+                        ATH_MSG_DEBUG(" phi ENT "<<result.phi(sample,1)<<" phi EXT "<<result.phi(sample,2));
+                        ATH_MSG_DEBUG(" r   ENT "<<result.r(sample,1)  <<" r   EXT "<<result.r(sample,2)  );
+                        ATH_MSG_DEBUG(" z   ENT "<<result.z(sample,1)  <<" z   EXT "<<result.z(sample,2)  );
+                        eta_vec_ENT.push_back(float(result.eta(sample,1)));
+                        eta_vec_EXT.push_back(float(result.eta(sample,2)));
+                        phi_vec_ENT.push_back(float(result.phi(sample,1)));
+                        phi_vec_EXT.push_back(float(result.phi(sample,2)));
+                        r_vec_ENT.push_back(float(result.r(sample,1)));
+                        r_vec_EXT.push_back(float(result.r(sample,2)));
+                        z_vec_ENT.push_back(float(result.z(sample,1)));
+                        z_vec_EXT.push_back(float(result.z(sample,2)));
+     }
+
+     m_newTTC_back_eta->push_back(eta_vec_EXT);
+                 m_newTTC_back_phi->push_back(phi_vec_EXT);
+                 m_newTTC_back_r  ->push_back(r_vec_EXT);
+                 m_newTTC_back_z  ->push_back(z_vec_EXT);
+                 m_newTTC_entrance_eta->push_back(eta_vec_ENT);
+                 m_newTTC_entrance_phi->push_back(phi_vec_ENT);
+                 m_newTTC_entrance_r  ->push_back(r_vec_ENT);
+                 m_newTTC_entrance_z  ->push_back(z_vec_ENT);
+
+     //*******************************************************************************************************************************
+
+     //OLD EXTRAPOLATION
+     std::vector<Trk::HitInfo>* hitVector = caloHits(*(*it));
+
+     Amg::Vector3D mom((*it)->momentum().x(),(*it)->momentum().y(),(*it)->momentum().z());
+
+                 m_truth_energy->push_back((*it)->momentum().e());
+                 m_truth_px->push_back((*it)->momentum().px());
+                 m_truth_py->push_back((*it)->momentum().py());
+                 m_truth_pz->push_back((*it)->momentum().pz());
+                 m_truth_pdg->push_back((*it)->pdg_id());
+                 m_truth_barcode->push_back((*it)->barcode());
+
+     //extrapolate only if the vertex is within the IDcaloboundary - margin
+                 //bool inside_ID=false;
+
+                 /*
+
+                 HepMC::GenVertex* pvtx = (*it)->production_vertex();
+                 if(pvtx)
+                 {
+                  truth.set_vertex(pvtx->position().x(),pvtx->position().y(),pvtx->position().z(),pvtx->position().t());
+
+                  m_truth_vtxbarcode->push_back(pvtx->barcode());
+                  double radius2=(pvtx->position().x()*pvtx->position().x())+(pvtx->position().y()*pvtx->position().y());
+                  ATH_MSG_VERBOSE("particle "<<particleIndex<<" Mom: "<<(*it)->momentum().e()<<"|"<<(*it)->momentum().px()<<"|"<<(*it)->momentum().py()<<"|"<<(*it)->momentum().pz()<<" vertex_x "<<pvtx->position().x()<<" y "<<pvtx->position().y()<<" z "<<pvtx->position().z()<<" r2 "<<radius2<<" VertexBarcode: "<<pvtx->barcode()<<" ParticleBarcode:"<<(*it)->barcode()<<" status: "<<(*it)->status());
+                  //std::cout<<"m_CaloBoundaryZ+m_calomargin "<<m_CaloBoundaryZ+m_calomargin<<" m_CaloBoundaryR+m_calomargin "<<m_CaloBoundaryR+m_calomargin<<std::endl;
+
+      if(fabs(pvtx->position().z())<(m_CaloBoundaryZ+m_calomargin) && radius2<((m_CaloBoundaryR+m_calomargin)*(m_CaloBoundaryR+m_calomargin)))
                         {
-                          //inside_ID=true;
-                          //if(inside_ID)
-                          //  {
-                          ATH_MSG_DEBUG("*** Do extrapolation ***");
-                          extrapolate(*it,hitVector);
-                          ATH_MSG_DEBUG("*** Do extrapolation to ID ***");
-                          extrapolate_to_ID(*it,hitVector);
-                          ATH_MSG_DEBUG("Truth extrapolation done for "<<particleIndex<<" "<<(*it)->barcode());
+                         //inside_ID=true;
+                         //if(inside_ID)
+                         //  {
+                         ATH_MSG_DEBUG("*** Do extrapolation ***");
+                         extrapolate(*it,hitVector);
+                         ATH_MSG_DEBUG("*** Do extrapolation to ID ***");
+                         extrapolate_to_ID(*it,hitVector);
+                         ATH_MSG_DEBUG("Truth extrapolation done for "<<particleIndex<<" "<<(*it)->barcode());
                         } //in this case no extrapolation possible
-                      else
-                        {
-                          //fill extrapolated angles with some weird values
-                          m_TTC_IDCaloBoundary_eta->push_back(-999.);
-                          m_TTC_IDCaloBoundary_phi->push_back(-999.);
-                          m_TTC_IDCaloBoundary_r->push_back(-999.);
-                          m_TTC_IDCaloBoundary_z->push_back(-999.);
-                          m_TTC_Angle3D->push_back(-999.);
-                          m_TTC_AngleEta->push_back(-999.);
-
-                        }
-                    } //if pvtx
-                  else //no pvtx
-                    {
-                      ATH_MSG_WARNING( "No vertex found for truth particle, no extrapolation");
-                      m_truth_vtxbarcode->push_back(-999999);
-
-                      //fill extrapolated angles with some weird values
-                      std::vector<double> eta_safe;
-                      std::vector<double> phi_safe;
-                      std::vector<double> r_safe;
-                      std::vector<double> z_safe;
-                      for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample)
+                  else
                         {
-                          eta_safe.push_back(-999.0);
-                          phi_safe.push_back(-999.0);
-                          r_safe.push_back(-999.0);
-                          z_safe.push_back(-999.0);
+                         //fill extrapolated angles with some weird values
+                         m_TTC_IDCaloBoundary_eta->push_back(-999.);
+                         m_TTC_IDCaloBoundary_phi->push_back(-999.);
+                         m_TTC_IDCaloBoundary_r->push_back(-999.);
+                         m_TTC_IDCaloBoundary_z->push_back(-999.);
+                         m_TTC_Angle3D->push_back(-999.);
+                         m_TTC_AngleEta->push_back(-999.);
                         }
-
-                      m_TTC_back_eta->push_back(eta_safe);
-                      m_TTC_back_phi->push_back(phi_safe);
-                      m_TTC_back_r->push_back(r_safe);
-                      m_TTC_back_z->push_back(z_safe);
-                      m_TTC_entrance_eta->push_back(eta_safe);
-                      m_TTC_entrance_phi->push_back(phi_safe);
-                      m_TTC_entrance_r->push_back(r_safe);
-                      m_TTC_entrance_z->push_back(z_safe);
-                      m_TTC_IDCaloBoundary_eta->push_back(-999.);
-                      m_TTC_IDCaloBoundary_phi->push_back(-999.);
-                      m_TTC_IDCaloBoundary_r->push_back(-999.);
-                      m_TTC_IDCaloBoundary_z->push_back(-999.);
-                      m_TTC_Angle3D->push_back(-999.);
-                      m_TTC_AngleEta->push_back(-999.);
-
-                    } //no pvtx
-                  for(std::vector<Trk::HitInfo>::iterator it = hitVector->begin();it < hitVector->end();++it)
-                    {
-                      if((*it).trackParms)
+                 } //if pvtx
+                 else //no pvtx
+                 {
+                  ATH_MSG_WARNING( "No vertex found for truth particle, no extrapolation");
+      m_truth_vtxbarcode->push_back(-999999);
+
+                  //fill extrapolated angles with some weird values
+                  std::vector<float> eta_safe;
+                  std::vector<float> phi_safe;
+                  std::vector<float> r_safe;
+                  std::vector<float> z_safe;
+                  for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample)
                         {
-                          delete (*it).trackParms;
-                          (*it).trackParms=0;
+                         eta_safe.push_back(-999.0);
+                         phi_safe.push_back(-999.0);
+                         r_safe.push_back(-999.0);
+                         z_safe.push_back(-999.0);
                         }
-                    }
-                  delete hitVector;
-                }
-            }
-        }
-    }//truth event
-
-  //Get reco cells if available
-  const CaloCellContainer *cellColl = 0;
-  sc = evtStore()->retrieve(cellColl, "AllCalo");
-
-  if (sc.isFailure())
-    {
-      ATH_MSG_WARNING( "Couldn't read AllCalo cells from StoreGate");
-      //return NULL;
-    }
-  else
-    {
-      ATH_MSG_INFO( "Found: "<<cellColl->size()<<" calorimeter cells");
-      CaloCellContainer::const_iterator itrCell = cellColl->begin();
-      CaloCellContainer::const_iterator itrLastCell = cellColl->end();
-      for ( ; itrCell!=itrLastCell; ++itrCell)
-        {
-          m_cell_energy->push_back((*itrCell)->energy());
-          m_cell_identifier->push_back((*itrCell)->ID().get_compact());
-          if (m_calo_dd_man->get_element((*itrCell)->ID()))
-            {
-              CaloCell_ID::CaloSample layer = m_calo_dd_man->get_element((*itrCell)->ID())->getSampling();
-              m_cell_sampling->push_back(layer);
-            }
-          else
-            m_cell_sampling->push_back(-1);
-        }
-    } //calorimeter cells
-
-  //Get all G4Hits (from CaloHitAnalysis)
-  std::string  lArKey [4] = {"LArHitEMB", "LArHitEMEC", "LArHitFCAL", "LArHitHEC"};
-  for (unsigned int i=0;i<4;i++)
-    {
-      const DataHandle<LArHitContainer> iter;
-      ATH_MSG_DEBUG( "Checking G4Hits: "<<lArKey[i]);
-      if(evtStore()->retrieve(iter,lArKey[i])==StatusCode::SUCCESS)
-        {
-          LArHitContainer::const_iterator hi;
-          int hitnumber = 0;
-          for (hi=(*iter).begin();hi!=(*iter).end();hi++)
-            {
-              hitnumber++;
-              GeoLArHit ghit(**hi);
-              if (!ghit)
-                continue;
-              const CaloDetDescrElement *hitElement = ghit.getDetDescrElement();
-              if(!hitElement)
-                continue;
-              Identifier larhitid = hitElement->identify();
-              if(m_calo_dd_man->get_element(larhitid))
-                {
-                  CaloCell_ID::CaloSample larlayer = m_calo_dd_man->get_element(larhitid)->getSampling();
-
-                  float larsampfrac=m_dd_fSampl->FSAMPL(larhitid);
-                  m_g4hit_energy->push_back( ghit.Energy() );
-                  m_g4hit_time->push_back( ghit.Time() );
-                  m_g4hit_identifier->push_back( larhitid.get_compact() );
-                  m_g4hit_cellidentifier->push_back( larhitid.get_compact() );
-                  m_g4hit_sampling->push_back( larlayer);
-                  m_g4hit_samplingfraction->push_back( larsampfrac );
-                }
-            } // End while LAr hits
-          ATH_MSG_INFO( "Read "<<hitnumber<<" G4Hits from "<<lArKey[i]);
-        }
-      else
-        {
-          ATH_MSG_INFO( "Can't retrieve LAr hits");
-        }// End statuscode success upon retrieval of hits
-      //std::cout <<"ZH G4Hit size: "<<m_g4hit_e->size()<<std::endl;
-    }// End detector type loop
 
-  const TileHitVector * hitVec;
-  if (evtStore()->retrieve(hitVec,"TileHitVec")==StatusCode::SUCCESS &&  m_tileMgr &&  m_tileID )
-    {
-      int hitnumber = 0;
-      for(TileHitVecConstIterator i_hit=hitVec->begin() ; i_hit!=hitVec->end() ; ++i_hit)
-        {
+                  m_TTC_back_eta->push_back(eta_safe);
+                  m_TTC_back_phi->push_back(phi_safe);
+                  m_TTC_back_r->push_back(r_safe);
+                  m_TTC_back_z->push_back(z_safe);
+                  m_TTC_entrance_eta->push_back(eta_safe);
+                  m_TTC_entrance_phi->push_back(phi_safe);
+                  m_TTC_entrance_r->push_back(r_safe);
+                  m_TTC_entrance_z->push_back(z_safe);
+                  m_TTC_IDCaloBoundary_eta->push_back(-999.);
+                  m_TTC_IDCaloBoundary_phi->push_back(-999.);
+                  m_TTC_IDCaloBoundary_r->push_back(-999.);
+                  m_TTC_IDCaloBoundary_z->push_back(-999.);
+                  m_TTC_Angle3D->push_back(-999.);
+                  m_TTC_AngleEta->push_back(-999.);
+
+                 } //no pvtx
+                 */
+
+     for(std::vector<Trk::HitInfo>::iterator it = hitVector->begin();it < hitVector->end();++it)
+     {
+      if((*it).trackParms)
+      {
+       delete (*it).trackParms;
+       (*it).trackParms=0;
+      }
+     }
+     delete hitVector;
+    } //for mcevent
+         } //mcevent size
+        } //mcEvent
+ }//truth event
+
+ //Get reco cells if available
+ const CaloCellContainer *cellColl = 0;
+ sc = evtStore()->retrieve(cellColl, "AllCalo");
+
+ if (sc.isFailure())
+ {
+  ATH_MSG_WARNING( "Couldn't read AllCalo cells from StoreGate");
+  //return NULL;
+ }
+ else
+ {
+  ATH_MSG_INFO( "Found: "<<cellColl->size()<<" calorimeter cells");
+  CaloCellContainer::const_iterator itrCell = cellColl->begin();
+  CaloCellContainer::const_iterator itrLastCell = cellColl->end();
+  for ( ; itrCell!=itrLastCell; ++itrCell)
+  {
+         m_cell_energy->push_back((*itrCell)->energy());
+         m_cell_identifier->push_back((*itrCell)->ID().get_compact());
+         if (m_calo_dd_man->get_element((*itrCell)->ID()))
+         {
+          CaloCell_ID::CaloSample layer = m_calo_dd_man->get_element((*itrCell)->ID())->getSampling();
+          m_cell_sampling->push_back(layer);
+         }
+         else
+          m_cell_sampling->push_back(-1);
+  }
+ } //calorimeter cells
+
+ //Get all G4Hits (from CaloHitAnalysis)
+ std::string  lArKey [4] = {"LArHitEMB", "LArHitEMEC", "LArHitFCAL", "LArHitHEC"};
+ for (unsigned int i=0;i<4;i++)
+ {
+  const DataHandle<LArHitContainer> iter;
+  ATH_MSG_DEBUG( "Checking G4Hits: "<<lArKey[i]);
+  if(evtStore()->retrieve(iter,lArKey[i])==StatusCode::SUCCESS)
+  {
+   LArHitContainer::const_iterator hi;
+   int hitnumber = 0;
+   for (hi=(*iter).begin();hi!=(*iter).end();hi++)
+   {
           hitnumber++;
-          Identifier pmt_id = (*i_hit).identify();
-          Identifier cell_id = m_tileID->cell_id(pmt_id);
-          //const  CaloDetDescrElement* ddElement = m_tileMgr->get_cell_element(cell_id);
-
-          if (m_calo_dd_man->get_element(cell_id))
-            {
-              CaloCell_ID::CaloSample layer = m_calo_dd_man->get_element(cell_id)->getSampling();
-
-              float tilesampfrac = m_tileInfo->HitCalib(cell_id);
-
-              //could there be more subhits??
-              for (int tilesubhit_i = 0; tilesubhit_i<(*i_hit).size(); tilesubhit_i++)
-                {
-                  //!!
-                  //std::cout <<"Tile subhit: "<<tilesubhit_i<<"/"<<(*i_hit).size()<< " E: "<<(*i_hit).energy(tilesubhit_i)<<std::endl;
-                  m_g4hit_energy->push_back( (*i_hit).energy(tilesubhit_i) );
-                  m_g4hit_time->push_back(   (*i_hit).time(tilesubhit_i)   );
-                  m_g4hit_identifier->push_back( pmt_id.get_compact() );
-                  m_g4hit_cellidentifier->push_back( cell_id.get_compact() );
-                  m_g4hit_sampling->push_back( layer );
-                  m_g4hit_samplingfraction->push_back( tilesampfrac );
-                }
-            }
-        }
-      ATH_MSG_INFO( "Read "<<hitnumber<<" G4Hits from TileHitVec");
-    }
+          GeoLArHit ghit(**hi);
+    if (!ghit)
+     continue;
+    const CaloDetDescrElement *hitElement = ghit.getDetDescrElement();
+          if(!hitElement)
+           continue;
+    Identifier larhitid = hitElement->identify();
+          if(m_calo_dd_man->get_element(larhitid))
+          {
+           CaloCell_ID::CaloSample larlayer = m_calo_dd_man->get_element(larhitid)->getSampling();
+
+           float larsampfrac=m_dd_fSampl->FSAMPL(larhitid);
+           m_g4hit_energy->push_back( ghit.Energy() );
+           m_g4hit_time->push_back( ghit.Time() );
+           m_g4hit_identifier->push_back( larhitid.get_compact() );
+           m_g4hit_cellidentifier->push_back( larhitid.get_compact() );
+           m_g4hit_sampling->push_back( larlayer);
+           m_g4hit_samplingfraction->push_back( larsampfrac );
+          }
+   } // End while LAr hits
+   ATH_MSG_INFO( "Read "<<hitnumber<<" G4Hits from "<<lArKey[i]);
+  }
+  else
+  {
+         ATH_MSG_INFO( "Can't retrieve LAr hits");
+  }// End statuscode success upon retrieval of hits
+  //std::cout <<"ZH G4Hit size: "<<m_g4hit_e->size()<<std::endl;
+ }// End detector type loop
+
+ const TileHitVector * hitVec;
+ if (evtStore()->retrieve(hitVec,"TileHitVec")==StatusCode::SUCCESS &&  m_tileMgr &&  m_tileID )
+ {
+  int hitnumber = 0;
+  for(TileHitVecConstIterator i_hit=hitVec->begin() ; i_hit!=hitVec->end() ; ++i_hit)
+  {
+   hitnumber++;
+   Identifier pmt_id = (*i_hit).identify();
+   Identifier cell_id = m_tileID->cell_id(pmt_id);
+   //const  CaloDetDescrElement* ddElement = m_tileMgr->get_cell_element(cell_id);
+
+   if (m_calo_dd_man->get_element(cell_id))
+         {
+          CaloCell_ID::CaloSample layer = m_calo_dd_man->get_element(cell_id)->getSampling();
+
+          float tilesampfrac = m_tileInfo->HitCalib(cell_id);
+
+          //could there be more subhits??
+          for (int tilesubhit_i = 0; tilesubhit_i<(*i_hit).size(); tilesubhit_i++)
+          {
+           //!!
+           //std::cout <<"Tile subhit: "<<tilesubhit_i<<"/"<<(*i_hit).size()<< " E: "<<(*i_hit).energy(tilesubhit_i)<<std::endl;
+           m_g4hit_energy->push_back( (*i_hit).energy(tilesubhit_i) );
+           m_g4hit_time->push_back(   (*i_hit).time(tilesubhit_i)   );
+           m_g4hit_identifier->push_back( pmt_id.get_compact() );
+           m_g4hit_cellidentifier->push_back( cell_id.get_compact() );
+           m_g4hit_sampling->push_back( layer );
+           m_g4hit_samplingfraction->push_back( tilesampfrac );
+          }
+         }
+  }
+  ATH_MSG_INFO( "Read "<<hitnumber<<" G4Hits from TileHitVec");
+ }
 
-  //Fill the tree and finish
-  if (m_tree) m_tree->Fill();
+ //Fill the tree and finish
+ if (m_tree) m_tree->Fill();
 
-  return StatusCode::SUCCESS;
+ return StatusCode::SUCCESS;
 
 } //execute
 
 std::vector<Trk::HitInfo>* ISF_HitAnalysis::caloHits(const HepMC::GenParticle& part) const
 {
-  // Start calo extrapolation
-  ATH_MSG_DEBUG ("[ fastCaloSim transport ] processing particle "<<part.pdg_id() );
-
-  std::vector<Trk::HitInfo>*     hitVector =  new std::vector<Trk::HitInfo>;
-
-  int     pdgId    = part.pdg_id();
-  double  charge   = HepPDT::ParticleID(pdgId).charge();
-
-  // particle Hypothesis for the extrapolation
-  Trk::ParticleHypothesis pHypothesis = m_pdgToParticleHypothesis.convert(pdgId,charge);
-
-  ATH_MSG_DEBUG ("particle hypothesis "<< pHypothesis );
-
-  // geantinos not handled by PdgToParticleHypothesis - fix there
-  if( pdgId == 999 ) pHypothesis = Trk::geantino;
-
-  HepMC::GenVertex *vtx = part.production_vertex();
-  Amg::Vector3D pos(0.,0.,0.);    // default
-
-  if (vtx)
-    {
-      //const HepMC::ThreeVector vtxPos(vtx->point3d());
-      pos = Amg::Vector3D( vtx->point3d().x(),vtx->point3d().y(), vtx->point3d().z());
-    }
-
-  Amg::Vector3D mom(part.momentum().x(),part.momentum().y(),part.momentum().z());
-  ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting transport from position eta="<<pos.eta()<<" phi="<<pos.phi()<<" d="<<pos.mag()<<" pT="<<mom.perp() );
-
-  // input parameters : curvilinear parameters
-  Trk::CurvilinearParameters inputPar(pos,mom,charge);
+ // Start calo extrapolation
+ ATH_MSG_DEBUG ("[ fastCaloSim transport ] processing particle "<<part.pdg_id() );
+
+ std::vector<Trk::HitInfo>*     hitVector =  new std::vector<Trk::HitInfo>;
+
+ int     pdgId    = part.pdg_id();
+ double  charge   = HepPDT::ParticleID(pdgId).charge();
+
+ // particle Hypothesis for the extrapolation
+ Trk::ParticleHypothesis pHypothesis = m_pdgToParticleHypothesis.convert(pdgId,charge);
+
+ ATH_MSG_DEBUG ("particle hypothesis "<< pHypothesis );
+
+ // geantinos not handled by PdgToParticleHypothesis - fix there
+ if( pdgId == 999 ) pHypothesis = Trk::geantino;
+
+ HepMC::GenVertex *vtx = part.production_vertex();
+ Amg::Vector3D pos(0.,0.,0.);    // default
+
+ if (vtx)
+ {
+  //const HepMC::ThreeVector vtxPos(vtx->point3d());
+  pos = Amg::Vector3D( vtx->point3d().x(),vtx->point3d().y(), vtx->point3d().z());
+ }
+
+ Amg::Vector3D mom(part.momentum().x(),part.momentum().y(),part.momentum().z());
+ ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting transport from position eta="<<pos.eta()<<" phi="<<pos.phi()<<" d="<<pos.mag()<<" pT="<<mom.perp() );
+
+ // 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.;
+ double freepath = -1.;
+ //ATH_MSG_VERBOSE( "[ fatras transport ] Particle free path : " << freepath);
+ // path limit -> time limit  ( TODO : extract life-time directly from decay helper )
+ double tDec = freepath > 0. ? freepath : -1.;
+ int decayProc = 0;
+
+ /* uncomment if unstable particles used by FastCaloSim
+ // 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);
+
+ if ( tDec>0.)
+ {
+    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()) {
+ //    ATH_MSG_VERBOSE( "[ fatras transport ] Decay is triggered for input particle.");
+ //    m_particleDecayHelper->decay(isp);
+ //  }
+ //  return 0;
+ //}
+
+ // 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;
+
+ // first extrapolation to reach the ID boundary
+ ATH_MSG_DEBUG( "[ fastCaloSim transport ] before calo entrance ");
+
+ // get CaloEntrance if not done already
+ if (!m_caloEntrance)
+ {
+  m_caloEntrance = m_extrapolator->trackingGeometry()->trackingVolume(m_caloEntranceName);
+  if(!m_caloEntrance)
+   ATH_MSG_INFO("CaloEntrance not found ");
+  else
+   ATH_MSG_INFO("CaloEntrance found ");
+ }
 
-  // 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 )
-  double tDec = freepath > 0. ? freepath : -1.;
-  int decayProc = 0;
+ ATH_MSG_DEBUG( "[ fastCaloSim transport ] after calo entrance ");
 
-  /* uncomment if unstable particles used by FastCaloSim
-  // 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);
+ const Trk::TrackParameters* caloEntry = 0;
 
-  if ( tDec>0.)
+ if(m_caloEntrance && m_caloEntrance->inside(pos,0.001) && !m_extrapolator->trackingGeometry()->atVolumeBoundary(pos,m_caloEntrance,0.001))
+ {
+  std::vector<Trk::HitInfo>*     dummyHitVector = 0;
+  if( charge==0 )
   {
-  tDec = tDec/beta/CLHEP::c_light + isp.timeStamp();
-  decayProc = 201;
+   caloEntry = m_extrapolator->transportNeutralsWithPathLimit(inputPar,pathLim,timeLim,Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
   }
-  */
-
-  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()) {
-  //    ATH_MSG_VERBOSE( "[ fatras transport ] Decay is triggered for input particle.");
-  //    m_particleDecayHelper->decay(isp);
-  //  }
-  //  return 0;
-  //}
-
-  // 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;
-
-  // first extrapolation to reach the ID boundary
-  ATH_MSG_DEBUG( "[ fastCaloSim transport ] before calo entrance ");
-
-  // get CaloEntrance if not done already
-  if (!m_caloEntrance)
-    {
-      m_caloEntrance = m_extrapolator->trackingGeometry()->trackingVolume(m_caloEntranceName);
-      if(!m_caloEntrance)
-        ATH_MSG_INFO("CaloEntrance not found ");
-      else
-        ATH_MSG_INFO("CaloEntrance found ");
-    }
-
-  ATH_MSG_DEBUG( "[ fastCaloSim transport ] after calo entrance ");
-
-  const Trk::TrackParameters* caloEntry = 0;
-
-  if(m_caloEntrance && m_caloEntrance->inside(pos,0.001) && !m_extrapolator->trackingGeometry()->atVolumeBoundary(pos,m_caloEntrance,0.001))
-    {
-      std::vector<Trk::HitInfo>*     dummyHitVector = 0;
-      if( charge==0 )
-        {
-          caloEntry = m_extrapolator->transportNeutralsWithPathLimit(inputPar,pathLim,timeLim,Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
-        }
-      else
-        {
-          caloEntry = m_extrapolator->extrapolateWithPathLimit(inputPar,pathLim,timeLim,Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
-        }
-    }
   else
-    caloEntry=&inputPar;
+  {
+   caloEntry = m_extrapolator->extrapolateWithPathLimit(inputPar,pathLim,timeLim,Trk::alongMomentum,pHypothesis,dummyHitVector,nextGeoID,m_caloEntrance);
+  }
+ }
+ else
+  caloEntry=&inputPar;
 
-  ATH_MSG_DEBUG( "[ fastCaloSim transport ] after calo caloEntry ");
+ ATH_MSG_DEBUG( "[ fastCaloSim transport ] after calo caloEntry ");
 
-  if(caloEntry)
-    {
-      const Trk::TrackParameters* eParameters = 0;
+ if(caloEntry)
+ {
+  const Trk::TrackParameters* eParameters = 0;
 
-      // save Calo entry hit (fallback info)
-      hitVector->push_back(Trk::HitInfo(caloEntry->clone(),timeLim.time,nextGeoID,0.));
+  // save Calo entry hit (fallback info)
+  hitVector->push_back(Trk::HitInfo(caloEntry->clone(),timeLim.time,nextGeoID,0.));
 
-      ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting Calo transport from position eta="<<caloEntry->position().eta()<<" phi="<<caloEntry->position().phi()<<" d="<<caloEntry->position().mag() );
+  ATH_MSG_DEBUG( "[ fastCaloSim transport ] starting Calo transport from position eta="<<caloEntry->position().eta()<<" phi="<<caloEntry->position().phi()<<" d="<<caloEntry->position().mag() );
 
-      if( charge==0 )
-        {
-          eParameters = m_extrapolator->transportNeutralsWithPathLimit(*caloEntry,pathLim,timeLim,Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
-        }
-      else
-        {
-          eParameters = m_extrapolator->extrapolateWithPathLimit(*caloEntry,pathLim,timeLim,Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
-        }
-      // save Calo exit hit (fallback info)
-      if (eParameters) hitVector->push_back(Trk::HitInfo(eParameters,timeLim.time,nextGeoID,0.));
-      //delete eParameters;   // HitInfo took ownership
-    }
+  if( charge==0 )
+  {
+   eParameters = m_extrapolator->transportNeutralsWithPathLimit(*caloEntry,pathLim,timeLim,Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
+  }
+  else
+  {
+   eParameters = m_extrapolator->extrapolateWithPathLimit(*caloEntry,pathLim,timeLim,Trk::alongMomentum,pHypothesis,hitVector,nextGeoID);
+  }
+  // save Calo exit hit (fallback info)
+  if (eParameters) hitVector->push_back(Trk::HitInfo(eParameters,timeLim.time,nextGeoID,0.));
+  //delete eParameters;   // HitInfo took ownership
+ }
 
-  if(msgLvl(MSG::DEBUG))
-    {
-      std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
-      while (it < hitVector->end() )
-        {
-          int sample=(*it).detID;
-          Amg::Vector3D hitPos = (*it).trackParms->position();
-          ATH_MSG_DEBUG(" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag());
-          it++;
-        }
-    }
+ if(msgLvl(MSG::DEBUG))
+ {
+  std::vector<Trk::HitInfo>::iterator it = hitVector->begin();
+  while (it < hitVector->end() )
+  {
+   int sample=(*it).detID;
+   Amg::Vector3D hitPos = (*it).trackParms->position();
+   ATH_MSG_DEBUG(" HIT: layer="<<sample<<" sample="<<sample-3000<<" eta="<<hitPos.eta()<<" phi="<<hitPos.phi()<<" d="<<hitPos.mag());
+   it++;
+  }
+ }
 
-  return hitVector;
+ return hitVector;
 } //caloHits
 
+/*
 //#######################################################################
 void ISF_HitAnalysis::extrapolate(const HepMC::GenParticle* part,std::vector<Trk::HitInfo>* hitVector)
 {
-  ATH_MSG_DEBUG("Start extrapolate()");
-
-  m_ptruth_eta=part->momentum().eta();
-  m_ptruth_phi=part->momentum().phi();
-  m_ptruth_e  =part->momentum().e();
-  m_ptruth_pt =part->momentum().perp();
-  m_ptruth_p  =part->momentum().rho();
-  m_pdgid=part->pdg_id();
-
-  //////////////////////////////////////
-  // Start calo extrapolation
-  // First: get entry point into first calo sample
-  //////////////////////////////////////
-
-  get_calo_surface(hitVector);
-
-  std::vector< std::vector<double> > eta_safe(3);
-  std::vector< std::vector<double> > phi_safe(3);
-  std::vector< std::vector<double> > r_safe(3);
-  std::vector< std::vector<double> > z_safe(3);
-  for(int subpos=CaloSubPos::SUBPOS_MID;subpos<=CaloSubPos::SUBPOS_EXT;++subpos)
+ ATH_MSG_DEBUG("Start extrapolate()");
+
+ m_ptruth_eta=part->momentum().eta();
+ m_ptruth_phi=part->momentum().phi();
+ m_ptruth_e  =part->momentum().e();
+ m_ptruth_pt =part->momentum().perp();
+ m_ptruth_p  =part->momentum().rho();
+ m_pdgid=part->pdg_id();
+
+ //////////////////////////////////////
+ // Start calo extrapolation
+ // First: get entry point into first calo sample
+ //////////////////////////////////////
+
+ get_calo_surface(hitVector);
+
+ std::vector< std::vector<double> > eta_safe(3);
+ std::vector< std::vector<double> > phi_safe(3);
+ std::vector< std::vector<double> > r_safe(3);
+ std::vector< std::vector<double> > z_safe(3);
+ for(int subpos=CaloSubPos::SUBPOS_MID;subpos<=CaloSubPos::SUBPOS_EXT;++subpos)
+ {
+  eta_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
+        phi_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
+        r_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
+        z_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
+ }
+
+ // only continue if inside the calo
+ if( fabs(m_eta_calo_surf)<6 )
+ {
+  // now try to extrpolate to all calo layers, that contain energy
+  ATH_MSG_DEBUG("Calo position for particle id "<<m_pdgid<<", trutheta= " << m_ptruth_eta <<", truthphi= "<<m_ptruth_phi<<", truthp="<<m_ptruth_p<<", truthpt="<<m_ptruth_pt);
+  for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample)
+  {
+   for(int subpos=CaloSubPos::SUBPOS_MID;subpos<=CaloSubPos::SUBPOS_EXT;++subpos)
+   {
+    m_letaCalo[sample][subpos]=-12345;
+    m_lphiCalo[sample][subpos]=-12345;
+    m_lrCalo[sample][subpos]=-12345;
+    m_lzCalo[sample][subpos]=-12345;
+    m_layerCaloOK[sample][subpos]=0;
+    //ATH_MSG_DEBUG("============= Getting Calo position for sample "<<sample<<" E/Etot="<<p.E_layer[sample]<<" ; in : eta= " << m_ptruth_eta);
+
+    if(get_calo_etaphi(hitVector,sample,subpos))
     {
-      eta_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-      phi_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-      r_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
-      z_safe[subpos].resize(CaloCell_ID_FCS::MaxSample,-999.0);
+     ATH_MSG_DEBUG( "Result in sample "<<sample<<"."<<subpos<<": eta="<<m_letaCalo[sample][subpos]<<" phi="<<m_lphiCalo[sample][subpos]<<" r="<<m_lrCalo[sample][subpos]<<" z="<<m_lzCalo[sample][subpos]<<" (ok="<<m_layerCaloOK[sample][subpos]<<")");
+     eta_safe[subpos][sample]=m_letaCalo[sample][subpos];
+     phi_safe[subpos][sample]=m_lphiCalo[sample][subpos];
+     r_safe[subpos][sample]=m_lrCalo[sample][subpos];
+     z_safe[subpos][sample]=m_lzCalo[sample][subpos];
     }
-
-  // only continue if inside the calo
-  if( fabs(m_eta_calo_surf)<6 )
-    {
-      // now try to extrpolate to all calo layers, that contain energy
-      ATH_MSG_DEBUG("Calo position for particle id "<<m_pdgid<<", trutheta= " << m_ptruth_eta <<", truthphi= "<<m_ptruth_phi<<", truthp="<<m_ptruth_p<<", truthpt="<<m_ptruth_pt);
-      for(int sample=CaloCell_ID_FCS::FirstSample;sample<CaloCell_ID_FCS::MaxSample;++sample)
-        {
-          for(int subpos=CaloSubPos::SUBPOS_MID;subpos<=CaloSubPos::SUBPOS_EXT;++subpos)
-            {
-              m_letaCalo[sample][subpos]=-12345;
-              m_lphiCalo[sample][subpos]=-12345;
-              m_lrCalo[sample][subpos]=-12345;
-              m_lzCalo[sample][subpos]=-12345;
-              m_layerCaloOK[sample][subpos]=0;
-              //ATH_MSG_DEBUG("============= Getting Calo position for sample "<<sample<<" E/Etot="<<p.E_layer[sample]<<" ; in : eta= " << m_ptruth_eta);
-
-              if(get_calo_etaphi(hitVector,sample,subpos))
-                {
-                  ATH_MSG_DEBUG( "Result in sample "<<sample<<"."<<subpos<<": eta="<<m_letaCalo[sample][subpos]<<" phi="<<m_lphiCalo[sample][subpos]<<" r="<<m_lrCalo[sample][subpos]<<" z="<<m_lzCalo[sample][subpos]<<" (ok="<<m_layerCaloOK[sample][subpos]<<")");
-                  eta_safe[subpos][sample]=m_letaCalo[sample][subpos];
-                  phi_safe[subpos][sample]=m_lphiCalo[sample][subpos];
-                  r_safe[subpos][sample]=m_lrCalo[sample][subpos];
-                  z_safe[subpos][sample]=m_lzCalo[sample][subpos];
-                }
-              else
-                ATH_MSG_DEBUG( "Extrapolation to sample "<<sample<<" failed (ok="<<m_layerCaloOK[sample][subpos]<<")");
-            }
-        }
-    } //inside calo
-
-  m_TTC_back_eta->push_back(eta_safe[CaloSubPos::SUBPOS_EXT]);
-  m_TTC_back_phi->push_back(phi_safe[CaloSubPos::SUBPOS_EXT]);
-  m_TTC_back_r->push_back(r_safe[CaloSubPos::SUBPOS_EXT]);
-  m_TTC_back_z->push_back(z_safe[CaloSubPos::SUBPOS_EXT]);
-
-  m_TTC_entrance_eta->push_back(eta_safe[CaloSubPos::SUBPOS_ENT]);
-  m_TTC_entrance_phi->push_back(phi_safe[CaloSubPos::SUBPOS_ENT]);
-  m_TTC_entrance_r->push_back(r_safe[CaloSubPos::SUBPOS_ENT]);
-  m_TTC_entrance_z->push_back(z_safe[CaloSubPos::SUBPOS_ENT]);
-
-  ATH_MSG_DEBUG("End extrapolate()");
+    else
+     ATH_MSG_DEBUG( "Extrapolation to sample "<<sample<<" failed (ok="<<m_layerCaloOK[sample][subpos]<<")");
+   }
+  }
+ } //inside calo
+
+ m_TTC_back_eta->push_back(eta_safe[CaloSubPos::SUBPOS_EXT]);
+ m_TTC_back_phi->push_back(phi_safe[CaloSubPos::SUBPOS_EXT]);
+ m_TTC_back_r->push_back(r_safe[CaloSubPos::SUBPOS_EXT]);
+ m_TTC_back_z->push_back(z_safe[CaloSubPos::SUBPOS_EXT]);
+ m_TTC_entrance_eta->push_back(eta_safe[CaloSubPos::SUBPOS_ENT]);
+ m_TTC_entrance_phi->push_back(phi_safe[CaloSubPos::SUBPOS_ENT]);
+ m_TTC_entrance_r->push_back(r_safe[CaloSubPos::SUBPOS_ENT]);
+ m_TTC_entrance_z->push_back(z_safe[CaloSubPos::SUBPOS_ENT]);
+
+ ATH_MSG_DEBUG("End extrapolate()");
 } //extrapolate
+*/
 
+/*
 void ISF_HitAnalysis::extrapolate_to_ID(const HepMC::GenParticle* part,std::vector<Trk::HitInfo>* hitVector)
 {
-  ATH_MSG_DEBUG("Start extrapolate_to_ID()");
-
-  m_ptruth_eta=part->momentum().eta();
-  m_ptruth_phi=part->momentum().phi();
-  m_ptruth_e  =part->momentum().e();
-  m_ptruth_pt =part->momentum().perp();
-  m_ptruth_p  =part->momentum().rho();
-  m_pdgid     =part->pdg_id();
-
-  Amg::Vector3D hitpos(0,0,0);
-  Amg::Vector3D hitmom(0,0,0);
-  if(rz_cylinder_get_calo_etaphi(hitVector,m_CaloBoundaryR,m_CaloBoundaryZ,hitpos,hitmom))
-    {
-      ATH_MSG_DEBUG("BOUNDARY ID-CALO eta="<<hitpos.eta()<<" phi="<<hitpos.phi()<<" r="<<hitpos.perp()<<" z="<<hitpos[Amg::z]<<" theta="<<hitpos.theta()<<" ; momentum eta="<<hitmom.eta()<<" phi="<<hitmom.phi()<<" theta="<<hitmom.theta());
-      m_TTC_IDCaloBoundary_eta->push_back(hitpos.eta());
-      m_TTC_IDCaloBoundary_phi->push_back(hitpos.phi());
-      m_TTC_IDCaloBoundary_r->push_back(hitpos.perp());
-      m_TTC_IDCaloBoundary_z->push_back(hitpos[Amg::z]);
-    }
-  else
-    {
-      ATH_MSG_DEBUG("Extrapolation to IDCaloBoundary failed");
-      m_TTC_IDCaloBoundary_eta->push_back(-999.);
-      m_TTC_IDCaloBoundary_phi->push_back(-999.);
-      m_TTC_IDCaloBoundary_r->push_back(-999.);
-      m_TTC_IDCaloBoundary_z->push_back(-999.);
-    }
-
-  TVector3 vec(hitpos[Amg::x],hitpos[Amg::y],hitpos[Amg::z]);
-
-  //get the tangentvector on this interaction point:
-  //GlobalMomentum* mom=params_on_surface_ID->TrackParameters::momentum().unit() ;
-  //Trk::GlobalMomentum* trackmom=params_on_surface_ID->Trk::TrackParameters::momentum();
-
-  if(hitmom.mag()>0)
-    {
-      //angle between vec and trackmom:
-      TVector3 Trackmom(hitmom[Amg::x],hitmom[Amg::y],hitmom[Amg::z]);
-      double angle3D=Trackmom.Angle(vec); //isn't this the same as TVector3 vec?
-      ATH_MSG_DEBUG("    3D ANGLE "<<angle3D);
-
-      double angleEta=vec.Theta()-Trackmom.Theta();
-      ATH_MSG_DEBUG("    ANGLE dTHEA"<<angleEta);
-
-      m_TTC_Angle3D->push_back(angle3D);
-      m_TTC_AngleEta->push_back(angleEta);
-    }
-  else
-    {
-      m_TTC_Angle3D->push_back(-999.);
-      m_TTC_AngleEta->push_back(-999.);
-    }
-  ATH_MSG_DEBUG("End extrapolate_to_ID()");
+ ATH_MSG_DEBUG("Start extrapolate_to_ID()");
+
+ m_ptruth_eta=part->momentum().eta();
+ m_ptruth_phi=part->momentum().phi();
+ m_ptruth_e  =part->momentum().e();
+ m_ptruth_pt =part->momentum().perp();
+ m_ptruth_p  =part->momentum().rho();
+ m_pdgid     =part->pdg_id();
+
+ Amg::Vector3D hitpos(0,0,0);
+ Amg::Vector3D hitmom(0,0,0);
+ if(rz_cylinder_get_calo_etaphi(hitVector,m_CaloBoundaryR,m_CaloBoundaryZ,hitpos,hitmom))
+ {
+  ATH_MSG_DEBUG("BOUNDARY ID-CALO eta="<<hitpos.eta()<<" phi="<<hitpos.phi()<<" r="<<hitpos.perp()<<" z="<<hitpos[Amg::z]<<" theta="<<hitpos.theta()<<" ; momentum eta="<<hitmom.eta()<<" phi="<<hitmom.phi()<<" theta="<<hitmom.theta());
+  m_TTC_IDCaloBoundary_eta->push_back(hitpos.eta());
+  m_TTC_IDCaloBoundary_phi->push_back(hitpos.phi());
+  m_TTC_IDCaloBoundary_r->push_back(hitpos.perp());
+  m_TTC_IDCaloBoundary_z->push_back(hitpos[Amg::z]);
+ }
+ else
+ {
+  ATH_MSG_DEBUG("Extrapolation to IDCaloBoundary failed");
+  m_TTC_IDCaloBoundary_eta->push_back(-999.);
+  m_TTC_IDCaloBoundary_phi->push_back(-999.);
+  m_TTC_IDCaloBoundary_r->push_back(-999.);
+  m_TTC_IDCaloBoundary_z->push_back(-999.);
+ }
+
+ TVector3 vec(hitpos[Amg::x],hitpos[Amg::y],hitpos[Amg::z]);
+
+ //get the tangentvector on this interaction point:
+ //GlobalMomentum* mom=params_on_surface_ID->TrackParameters::momentum().unit() ;
+ //Trk::GlobalMomentum* trackmom=params_on_surface_ID->Trk::TrackParameters::momentum();
+
+ if(hitmom.mag()>0)
+ {
+  //angle between vec and trackmom:
+  TVector3 Trackmom(hitmom[Amg::x],hitmom[Amg::y],hitmom[Amg::z]);
+  double angle3D=Trackmom.Angle(vec); //isn't this the same as TVector3 vec?
+  ATH_MSG_DEBUG("    3D ANGLE "<<angle3D);
+
+  double angleEta=vec.Theta()-Trackmom.Theta();
+  ATH_MSG_DEBUG("    ANGLE dTHEA"<<angleEta);
+
+  m_TTC_Angle3D->push_back(angle3D);
+  m_TTC_AngleEta->push_back(angleEta);
+ }
+ else
+ {
+  m_TTC_Angle3D->push_back(-999.);
+  m_TTC_AngleEta->push_back(-999.);
+ }
+ ATH_MSG_DEBUG("End extrapolate_to_ID()");
 } //extrapolate_to_ID
-
+*/
 
 //UPDATED
 bool ISF_HitAnalysis::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, int sample,int subpos)
@@ -1415,7 +1429,7 @@ bool ISF_HitAnalysis::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, int
   m_lzCalo[sample][subpos] = zpos(sample,m_eta_calo_surf,subpos);
   double distsamp =deta(sample,m_eta_calo_surf);
   double lrzpos =rzpos(sample,m_eta_calo_surf,subpos);
-  double hitdist=0;
+  //double hitdist=0;
   bool best_found=false;
   double best_target=0;
 
@@ -1461,7 +1475,7 @@ bool ISF_HitAnalysis::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, int
     m_lphiCalo[sample][subpos]=phiCalo;
     m_lrCalo[sample][subpos] = hitPos.perp();
     m_lzCalo[sample][subpos] = hitPos[Amg::z];
-    hitdist=hitPos.mag();
+    //hitdist=hitPos.mag();
     m_layerCaloOK[sample][subpos]=true;
     lrzpos=rzpos(sample,etaCalo,subpos);
     distsamp=deta(sample,etaCalo);
@@ -1526,17 +1540,17 @@ bool ISF_HitAnalysis::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, int
         }
       }
       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][subpos]=best_hitPos.eta();
         m_lphiCalo[sample][subpos]=best_hitPos.phi();
         m_lrCalo[sample][subpos] = best_hitPos.perp();
         m_lzCalo[sample][subpos] = best_hitPos[Amg::z];
-        hitdist=best_hitPos.mag();
+        //hitdist=best_hitPos.mag();
         lrzpos=rzpos(sample,m_letaCalo[sample][subpos],subpos);
         distsamp=deta(sample,m_letaCalo[sample][subpos]);
         m_layerCaloOK[sample][subpos]=true;
@@ -1551,18 +1565,11 @@ bool ISF_HitAnalysis::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, int
   }
 
   if(isCaloBarrel(sample)) lrzpos*=cosh(m_letaCalo[sample][subpos]);
-  else                    lrzpos= fabs(lrzpos/tanh(m_letaCalo[sample][subpos]));
+   else                    lrzpos= fabs(lrzpos/tanh(m_letaCalo[sample][subpos]));
 
   m_dCalo[sample][subpos]=lrzpos;
   m_distetaCaloBorder[sample][subpos]=distsamp;
 
-  if(msgLvl(MSG::DEBUG)) {
-    msg(MSG::DEBUG)<<"  Final par TTC sample "<<sample<<" subpos="<<subpos;
-    if(m_layerCaloOK[sample][subpos]) msg()<<" (good)";
-    else msg()<<" (bad)";
-    msg()<<" eta=" << m_letaCalo[sample][subpos] << "   phi=" << m_lphiCalo[sample][subpos] <<" m_dCalo="<<m_dCalo[sample][subpos]<<" dist(hit)="<<hitdist<< endmsg;
-  }
-
   return m_layerCaloOK[sample][subpos];
 } //get_calo_etaphi
 
@@ -1648,8 +1655,8 @@ bool ISF_HitAnalysis::rz_cylinder_get_calo_etaphi(std::vector<Trk::HitInfo>* hit
 
 //UPDATED
 /*
-  bool ISF_HitAnalysis::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, CaloCell_ID_FCS::CaloSample sample)
-  {
+bool ISF_HitAnalysis::get_calo_etaphi(std::vector<Trk::HitInfo>* hitVector, CaloCell_ID_FCS::CaloSample sample)
+{
   m_layerCaloOK[sample]=false;
   m_letaCalo[sample]=m_eta_calo_surf;
   m_lphiCalo[sample]=m_phi_calo_surf;
@@ -1664,143 +1671,143 @@ bool ISF_HitAnalysis::rz_cylinder_get_calo_etaphi(std::vector<Trk::HitInfo>* hit
   //while ((*it).detID != (3000+sample) && it < hitVector->end() )  it++;
 
   if (it!=hitVector->end()) {
-  Amg::Vector3D hitPos1 = (*it).trackParms->position();
-  int sid1=(*it).detID;
-  int sid2=-1;
-  Amg::Vector3D hitPos;
-  Amg::Vector3D hitPos2;
-
-  std::vector<Trk::HitInfo>::iterator itnext = it;
-  ++itnext;
-  if(itnext!=hitVector->end()) {
-  hitPos2 = (*itnext).trackParms->position();
-  sid2=(*itnext).detID;
-  double eta_avg=0.5*(hitPos1.eta()+hitPos2.eta());
-  double t;
-  if(isCaloBarrel(sample)) {
-  double r=rmid(sample,eta_avg);
-  double r1=hitPos1.perp();
-  double r2=hitPos2.perp();
-  t=(r-r1)/(r2-r1);
-  best_target=r;
-  } else {
-  double z=zmid(sample,eta_avg);
-  double z1=hitPos1[Amg::z];
-  double z2=hitPos2[Amg::z];
-  t=(z-z1)/(z2-z1);
-  best_target=z;
-  }
-  hitPos=t*hitPos2+(1-t)*hitPos1;
-  } else {
-  hitPos=hitPos1;
-  hitPos2=hitPos1;
-  }
-  double etaCalo = hitPos.eta();
-  double phiCalo = hitPos.phi();
-  m_letaCalo[sample]=etaCalo;
-  m_lphiCalo[sample]=phiCalo;
-  hitdist=hitPos.mag();
-  m_layerCaloOK[sample]=true;
-  rzmiddle=rzmid((CaloCell_ID_FCS::CaloSample)sample,etaCalo);
-  distsamp=deta((CaloCell_ID_FCS::CaloSample)sample,etaCalo);
-  best_found=true;
-  ATH_MSG_DEBUG(" extrapol with layer hit: id="<<sid1<<" -> "<<sid2<<
-  " target r/z="<<best_target<<
-  " r1="<<hitPos1.perp()<<" z1="<<hitPos1[Amg::z]<<" r2="<<hitPos2.perp()<<" z2="<<hitPos2[Amg::z]<<
-  " re="<<hitPos.perp()<<" ze="<<hitPos[Amg::z]
-  );
+    Amg::Vector3D hitPos1 = (*it).trackParms->position();
+    int sid1=(*it).detID;
+    int sid2=-1;
+    Amg::Vector3D hitPos;
+    Amg::Vector3D hitPos2;
+
+    std::vector<Trk::HitInfo>::iterator itnext = it;
+    ++itnext;
+    if(itnext!=hitVector->end()) {
+      hitPos2 = (*itnext).trackParms->position();
+      sid2=(*itnext).detID;
+      double eta_avg=0.5*(hitPos1.eta()+hitPos2.eta());
+      double t;
+      if(isCaloBarrel(sample)) {
+        double r=rmid(sample,eta_avg);
+        double r1=hitPos1.perp();
+        double r2=hitPos2.perp();
+        t=(r-r1)/(r2-r1);
+        best_target=r;
+      } else {
+        double z=zmid(sample,eta_avg);
+        double z1=hitPos1[Amg::z];
+        double z2=hitPos2[Amg::z];
+        t=(z-z1)/(z2-z1);
+        best_target=z;
+      }
+      hitPos=t*hitPos2+(1-t)*hitPos1;
+    } else {
+      hitPos=hitPos1;
+      hitPos2=hitPos1;
+    }
+    double etaCalo = hitPos.eta();
+    double phiCalo = hitPos.phi();
+    m_letaCalo[sample]=etaCalo;
+    m_lphiCalo[sample]=phiCalo;
+    hitdist=hitPos.mag();
+    m_layerCaloOK[sample]=true;
+    rzmiddle=rzmid((CaloCell_ID_FCS::CaloSample)sample,etaCalo);
+    distsamp=deta((CaloCell_ID_FCS::CaloSample)sample,etaCalo);
+    best_found=true;
+    ATH_MSG_DEBUG(" extrapol with layer hit: id="<<sid1<<" -> "<<sid2<<
+                  " target r/z="<<best_target<<
+                  " 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;
-  bool best_inside=false;
-  int best_id1,best_id2;
-  Amg::Vector3D best_hitPos=(*it).trackParms->position();
-  while (it < hitVector->end()-1 ) {
-  Amg::Vector3D hitPos1 = (*it).trackParms->position();
-  int sid1=(*it).detID;
-  it++;
-  Amg::Vector3D hitPos2 = (*it).trackParms->position();
-  int sid2=(*it).detID;
-  double eta_avg=0.5*(hitPos1.eta()+hitPos2.eta());
-  double t;
-  double tmp_target=0;
-  if(isCaloBarrel(sample)) {
-  double r=rmid(sample,eta_avg);
-  double r1=hitPos1.perp();
-  double r2=hitPos2.perp();
-  t=(r-r1)/(r2-r1);
-  tmp_target=r;
-  } else {
-  double z=zmid(sample,eta_avg);
-  double z1=hitPos1[Amg::z];
-  double z2=hitPos2[Amg::z];
-  t=(z-z1)/(z2-z1);
-  tmp_target=z;
-  }
-  Amg::Vector3D hitPos=t*hitPos2+(1-t)*hitPos1;
-  double dist=TMath::Min(TMath::Abs(t-0),TMath::Abs(t-1));
-  bool inside=false;
-  if(t>=0 && t<=1) inside=true;
-  if(!best_found || inside) {
-  if(!best_inside || dist<best_dist) {
-  best_dist=dist;
-  best_hitPos=hitPos;
-  best_inside=inside;
-  best_found=true;
-  best_id1=sid1;
-  best_id2=sid2;
-  best_target=tmp_target;
-  }
-  } else {
-  if(!best_inside && dist<best_dist) {
-  best_dist=dist;
-  best_hitPos=hitPos;
-  best_inside=inside;
-  best_found=true;
-  best_id1=sid1;
-  best_id2=sid2;
-  best_target=tmp_target;
-  }
-  }
-  ATH_MSG_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]
-  );
-  if(best_found) {
-  m_letaCalo[sample]=best_hitPos.eta();
-  m_lphiCalo[sample]=best_hitPos.phi();
-  hitdist=best_hitPos.mag();
-  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]
-  );
-  }
+    it = hitVector->begin();
+    double best_dist=0.5;
+    bool best_inside=false;
+    int best_id1,best_id2;
+    Amg::Vector3D best_hitPos=(*it).trackParms->position();
+    while (it < hitVector->end()-1 ) {
+      Amg::Vector3D hitPos1 = (*it).trackParms->position();
+      int sid1=(*it).detID;
+      it++;
+      Amg::Vector3D hitPos2 = (*it).trackParms->position();
+      int sid2=(*it).detID;
+      double eta_avg=0.5*(hitPos1.eta()+hitPos2.eta());
+      double t;
+      double tmp_target=0;
+      if(isCaloBarrel(sample)) {
+        double r=rmid(sample,eta_avg);
+        double r1=hitPos1.perp();
+        double r2=hitPos2.perp();
+        t=(r-r1)/(r2-r1);
+        tmp_target=r;
+      } else {
+        double z=zmid(sample,eta_avg);
+        double z1=hitPos1[Amg::z];
+        double z2=hitPos2[Amg::z];
+        t=(z-z1)/(z2-z1);
+        tmp_target=z;
+      }
+      Amg::Vector3D hitPos=t*hitPos2+(1-t)*hitPos1;
+      double dist=TMath::Min(TMath::Abs(t-0),TMath::Abs(t-1));
+      bool inside=false;
+      if(t>=0 && t<=1) inside=true;
+      if(!best_found || inside) {
+        if(!best_inside || dist<best_dist) {
+          best_dist=dist;
+          best_hitPos=hitPos;
+          best_inside=inside;
+          best_found=true;
+          best_id1=sid1;
+          best_id2=sid2;
+          best_target=tmp_target;
+        }
+      } else {
+        if(!best_inside && dist<best_dist) {
+          best_dist=dist;
+          best_hitPos=hitPos;
+          best_inside=inside;
+          best_found=true;
+          best_id1=sid1;
+          best_id2=sid2;
+          best_target=tmp_target;
+        }
+      }
+      ATH_MSG_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]
+                    );
+      if(best_found) {
+        m_letaCalo[sample]=best_hitPos.eta();
+        m_lphiCalo[sample]=best_hitPos.phi();
+        hitdist=best_hitPos.mag();
+        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;
 
   if(msgLvl(MSG::DEBUG)) {
-  msg(MSG::DEBUG)<<"  Final par TTC sample "<<(int)sample;
-  if(m_layerCaloOK[sample]) msg()<<" (good)";
-  else msg()<<" (bad)";
-  msg()<<" eta=" << m_letaCalo[sample] << "   phi=" << m_lphiCalo[sample] <<" m_dCalo="<<m_dCalo[sample]<<" dist(hit)="<<hitdist<< endmsg;
+    msg(MSG::DEBUG)<<"  Final par TTC sample "<<(int)sample;
+    if(m_layerCaloOK[sample]) msg()<<" (good)";
+     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];
-  }
+}
 */
 
 //UPDATED
@@ -1823,32 +1830,34 @@ bool ISF_HitAnalysis::get_calo_surface(std::vector<Trk::HitInfo>* hitVector)
     //double offset = 0.;
     double etaCalo = hitPos.eta();
 
-    msg(MSG::DEBUG)<<"test: entrance to calo surface : sample="<<sample<<" eta="<<etaCalo;
+     ATH_MSG_DEBUG("test: entrance to calo surface : sample="<<sample<<" eta="<<etaCalo);
 
     if (fabs(etaCalo)<900) {
       double phiCalo = hitPos.phi();
       double distsamp =deta(sample,etaCalo);
 
-      msg(MSG::DEBUG)<<" phi="<<phiCalo<<" dist="<<distsamp;
-      if(distsamp<min_calo_surf_dist && min_calo_surf_dist>=0) {
+      ATH_MSG_DEBUG(" phi="<<phiCalo<<" dist="<<distsamp);
+      if(distsamp<min_calo_surf_dist && min_calo_surf_dist>=0)
+      {
         //hitVector is ordered in r, so if first surface was hit, keep it
         m_eta_calo_surf=etaCalo;
         m_phi_calo_surf=phiCalo;
         min_calo_surf_dist=distsamp;
         m_sample_calo_surf=sample;
         m_d_calo_surf=rzent(sample,etaCalo);
-        msg(MSG::DEBUG)<<" r/z="<<m_d_calo_surf;
+        ATH_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));
-        msg(MSG::DEBUG)<<" d="<<m_d_calo_surf;
-        if(distsamp<0) {
-          msg(MSG::DEBUG)<<endmsg;
+        ATH_MSG_DEBUG(" d="<<m_d_calo_surf);
+        if(distsamp<0)
+        {
           break;
         }
       }
-      msg(MSG::DEBUG)<<endmsg;
-    } else {
-      msg(MSG::DEBUG)<<": eta > 900, not using this"<<endmsg;
+    }
+    else
+    {
+     ATH_MSG_DEBUG(": eta > 900, not using this");
     }
   }
 
@@ -1954,4 +1963,3 @@ double ISF_HitAnalysis::rzpos(int sample,double eta,int subpos) const
 {
   return GetCaloGeometry()->rzpos(sample,eta,subpos);
 }
-
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/AtlasLabels.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/AtlasLabels.h
index ad0415e5b572f6893b1fa04e83e810c44544fbec..625668434a08f043ed7939c876f13ae0f791371b 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/AtlasLabels.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/AtlasLabels.h
@@ -3,11 +3,10 @@
 */
 
 //
-//   @file    AtlasLabels.h         
-//   
+//   @file    AtlasLabels.h
+//
 //   @author M.Sutton
-// 
-//   Copyright (C) 2010 Atlas Collaboration
+//
 //
 //   $Id: AtlasLabels.h, v0.0   Thu 25 Mar 2010 10:34:20 CET $
 
@@ -17,10 +16,10 @@
 
 #include "Rtypes.h"
 
-void ATLASLabel(Double_t x,Double_t y,const char* text=NULL,Color_t color=1); 
+void ATLASLabel(Double_t x,Double_t y,const char* text=NULL,Color_t color=1);
 
-void ATLASLabelOld(Double_t x,Double_t y,bool Preliminary=false,Color_t color=1); 
+void ATLASLabelOld(Double_t x,Double_t y,bool Preliminary=false,Color_t color=1);
 
-void ATLASVersion(const char* version=NULL,Double_t x=0.88,Double_t y=0.975,Color_t color=1); 
+void ATLASVersion(const char* version=NULL,Double_t x=0.88,Double_t y=0.975,Color_t color=1);
 
 #endif // __ATLASLABELS_H
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/AtlasUtils.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/AtlasUtils.h
index 5305a36284dc2ed2186642bdb98b8fb08ecda079..3fefb9c8787f28536bec96690fb39474f850bb55 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/AtlasUtils.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/AtlasUtils.h
@@ -3,12 +3,11 @@
 */
 
 //
-//   @file    AtlasUtils.h         
-//   
+//   @file    AtlasUtils.h
+//
 //
 //   @author M.Sutton
-// 
-//   Copyright (C) 2010 Atlas Collaboration
+//
 //
 //   $Id: AtlasUtils.h, v0.0   Thu 25 Mar 2010 10:34:20 CET $
 
@@ -19,7 +18,7 @@
 #include "TGraphErrors.h"
 #include "TGraphAsymmErrors.h"
 
-void ATLAS_LABEL(Double_t x,Double_t y,Color_t color=1); 
+void ATLAS_LABEL(Double_t x,Double_t y,Color_t color=1);
 
 TGraphErrors* myTGraphErrorsDivide(TGraphErrors* g1,TGraphErrors* g2);
 
@@ -35,6 +34,6 @@ void myText(Double_t x,Double_t y,Color_t color,const char *text);
 
 void myBoxText(Double_t x, Double_t y,Double_t boxsize,Int_t mcolor,const char *text);
 
-void myMarkerText(Double_t x,Double_t y,Int_t color,Int_t mstyle,const char *text,Float_t msize=2.); 
+void myMarkerText(Double_t x,Double_t y,Int_t color,Int_t mstyle,const char *text,Float_t msize=2.);
 
 #endif // __ATLASUTILS_H
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/CaloHitAna.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/CaloHitAna.C
index e2caea6cc4f4f61a1f6fd6a728d4fd47d440066e..061a6bbf6cf310cad015cf946fed7655fb7188f0 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/CaloHitAna.C
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/CaloHitAna.C
@@ -11,13 +11,11 @@
 #include <iostream>
 #include <map>
 #include "TSystem.h"
-const int CaloHitAna::MAX_LAYER =25; //number of calorimeter layers/samplings, use last (MAX_LAYER-1) for invalid cells/hits
 
 using namespace std;
 
 void CaloHitAna::Loop()
 {
-
   //This Loop is supposed to read the output ntuple/tree
   //(vector of cells, vector of G4 hits, vector of FCS detailed hits, ...)
   //from the athena ISF_HitAnalysis algorithm (==ESD dumper)
@@ -25,150 +23,11 @@ void CaloHitAna::Loop()
   //NB: E = Ehit * SamplingFraction for Tile or E = Ehit / SamplingFraction (LAr) conversion
   //is done here
 
-  //Create output structure
-
-  m_Output = new TFile(m_OutputName, "RECREATE");
-  m_OutputTree = new TTree("FCS_ParametrizationInput","Output_Matched_cell_Tree");
-
-  FCS_matchedcellvector oneeventcells; //these are all matched cells in a single event
-  FCS_matchedcellvector layercells[MAX_LAYER]; //these are all matched cells in a given layer in a given event
-
-  std::vector<FCS_truth> truthcollection;
-
-  Float_t total_cell_e  = 0.0;
-  Float_t total_hit_e   = 0.0;
-  Float_t total_g4hit_e = 0.0;
-
-  std::vector<Float_t> cell_energy;
-  std::vector<Float_t> hit_energy;
-  std::vector<Float_t> g4hit_energy;
-
-  //Store energies (not fractions in each layer 0-23 (BPS-FCAL2), 24 = INVALID, 25 = TOTAL
-  cell_energy.resize(MAX_LAYER+1);
-  hit_energy.resize(MAX_LAYER+1);
-  g4hit_energy.resize(MAX_LAYER+1);
-
-  for (int i =0 ; i<MAX_LAYER+1; i++)
-    {
-      cell_energy[i]  = 0.0;
-      hit_energy[i]   = 0.0;
-      g4hit_energy[i] = 0.0;
-    }
-
-  std::vector<Float_t> truthE, truthPx,truthPy,truthPz;
-  std::vector<int> truthBarcode, truthPDG, truthVtxBarcode;
-  /*
-    std::vector<std::vector<double> >* m_TTC_entrance_eta=0;
-    std::vector<std::vector<double> >* m_TTC_entrance_phi=0;
-    std::vector<std::vector<double> >* m_TTC_entrance_r=0;
-    std::vector<std::vector<double> >* m_TTC_entrance_z=0;
-    std::vector<std::vector<double> >* m_TTC_back_eta=0;
-    std::vector<std::vector<double> >* m_TTC_back_phi=0;
-    std::vector<std::vector<double> >* m_TTC_back_r=0;
-    std::vector<std::vector<double> >* m_TTC_back_z=0;
-    std::vector<double>* m_TTC_IDCaloBoundary_eta=0;
-    std::vector<double>* m_TTC_IDCaloBoundary_phi=0;
-    std::vector<double>* m_TTC_IDCaloBoundary_r=0;
-    std::vector<double>* m_TTC_IDCaloBoundary_z=0;
-    std::vector<double>* m_TTC_Angle3D=0;
-    std::vector<double>* m_TTC_AngleEta=0;
-  */
-  std::vector<std::vector<double> >* m_newTTC_entrance_eta=0;
-  std::vector<std::vector<double> >* m_newTTC_entrance_phi=0;
-  std::vector<std::vector<double> >* m_newTTC_entrance_r=0;
-  std::vector<std::vector<double> >* m_newTTC_entrance_z=0;
-  std::vector<std::vector<double> >* m_newTTC_back_eta=0;
-  std::vector<std::vector<double> >* m_newTTC_back_phi=0;
-  std::vector<std::vector<double> >* m_newTTC_back_r=0;
-  std::vector<std::vector<double> >* m_newTTC_back_z=0;
-  std::vector<double>* m_newTTC_IDCaloBoundary_eta=0;
-  std::vector<double>* m_newTTC_IDCaloBoundary_phi=0;
-  std::vector<double>* m_newTTC_IDCaloBoundary_r=0;
-  std::vector<double>* m_newTTC_IDCaloBoundary_z=0;
-  std::vector<double>* m_newTTC_Angle3D=0;
-  std::vector<double>* m_newTTC_AngleEta=0;
-
-  m_OutputTree->Branch("TruthE",&truthE);
-  m_OutputTree->Branch("TruthPx",&truthPx);
-  m_OutputTree->Branch("TruthPy",&truthPy);
-  m_OutputTree->Branch("TruthPz",&truthPz);
-  m_OutputTree->Branch("TruthPDG",&truthPDG);
-  m_OutputTree->Branch("TruthBarcode",&truthBarcode);
-  m_OutputTree->Branch("TruthVtxBarcode",&truthVtxBarcode); //this is duplicate of what is in the truth collection, will be good to remove/hide at some point
-
-  //ADDING THE EXTRAPOLATOR vARIABLES
-
-  /*
-    m_OutputTree->Branch("TTC_back_eta",&m_TTC_back_eta);
-    m_OutputTree->Branch("TTC_back_phi",&m_TTC_back_phi);
-    m_OutputTree->Branch("TTC_back_r",  &m_TTC_back_r);
-    m_OutputTree->Branch("TTC_back_z",  &m_TTC_back_z);
-    m_OutputTree->Branch("TTC_entrance_eta",&m_TTC_entrance_eta);
-    m_OutputTree->Branch("TTC_entrance_phi",&m_TTC_entrance_phi);
-    m_OutputTree->Branch("TTC_entrance_r",  &m_TTC_entrance_r);
-    m_OutputTree->Branch("TTC_entrance_z",  &m_TTC_entrance_z);
-    m_OutputTree->Branch("TTC_IDCaloBoundary_eta",&m_TTC_IDCaloBoundary_eta);
-    m_OutputTree->Branch("TTC_IDCaloBoundary_phi",&m_TTC_IDCaloBoundary_phi);
-    m_OutputTree->Branch("TTC_IDCaloBoundary_r",&m_TTC_IDCaloBoundary_r);
-    m_OutputTree->Branch("TTC_IDCaloBoundary_z",&m_TTC_IDCaloBoundary_z);
-    m_OutputTree->Branch("TTC_Angle3D", &m_TTC_Angle3D);
-    m_OutputTree->Branch("TTC_AngleEta",&m_TTC_AngleEta);
-  */
-
-  m_OutputTree->Branch("newTTC_back_eta",&m_newTTC_back_eta);
-  m_OutputTree->Branch("newTTC_back_phi",&m_newTTC_back_phi);
-  m_OutputTree->Branch("newTTC_back_r",  &m_newTTC_back_r);
-  m_OutputTree->Branch("newTTC_back_z",  &m_newTTC_back_z);
-  m_OutputTree->Branch("newTTC_entrance_eta",&m_newTTC_entrance_eta);
-  m_OutputTree->Branch("newTTC_entrance_phi",&m_newTTC_entrance_phi);
-  m_OutputTree->Branch("newTTC_entrance_r",  &m_newTTC_entrance_r);
-  m_OutputTree->Branch("newTTC_entrance_z",  &m_newTTC_entrance_z);
-  m_OutputTree->Branch("newTTC_IDCaloBoundary_eta",&m_newTTC_IDCaloBoundary_eta);
-  m_OutputTree->Branch("newTTC_IDCaloBoundary_phi",&m_newTTC_IDCaloBoundary_phi);
-  m_OutputTree->Branch("newTTC_IDCaloBoundary_r",&m_newTTC_IDCaloBoundary_r);
-  m_OutputTree->Branch("newTTC_IDCaloBoundary_z",&m_newTTC_IDCaloBoundary_z);
-  m_OutputTree->Branch("newTTC_Angle3D", &m_newTTC_Angle3D);
-  m_OutputTree->Branch("newTTC_AngleEta",&m_newTTC_AngleEta);
-
-  cout<<"check2"<<endl;
-
-  //m_OutputTree->Branch("TruthCollection", &truthcollection); //vector of truth particles with track extrapolation variables
-
-  //create branches in the output tree according to the settings vector
-  if(! m_Settings.size() || m_Settings[0]==1)
-    {
-      //Write all FCS_matchedcells
-      m_OutputTree->Branch("AllCells", &oneeventcells);
-    }
-  if (m_Settings.size()>=2 && m_Settings[1]==1)
-    {
-      //write cells per layer
-      for (Int_t i=0; i<MAX_LAYER; i++)
-        {
-          TString branchname="Sampling_";
-          branchname+=i;
-          m_OutputTree->Branch(branchname, &layercells[i]);
-        }
-    }
-
-  if (m_Settings.size()>=3 && m_Settings[2]==1)
-    {
-      //write also energies per layer:
-      m_OutputTree->Branch("cell_energy", &cell_energy);
-      m_OutputTree->Branch("hit_energy",  &hit_energy);
-      m_OutputTree->Branch("g4hit_energy",&g4hit_energy);
-
-      //This is a duplicate of cell_energy[25]
-      m_OutputTree->Branch("total_cell_energy",  &total_cell_e);
-      m_OutputTree->Branch("total_hit_energy",   &total_hit_e);
-      m_OutputTree->Branch("total_g4hit_energy", &total_g4hit_e);
-    }
-
-  if(fChain == 0) return;
+  if (fChain == 0) return;
   ProcInfo_t procinfo;
   Long64_t nentries = fChain->GetEntriesFast();
-  m_all_cells.resize(nentries);
-  if(m_max_nentries>=0 && m_max_nentries<nentries) nentries=m_max_nentries;
+
+  if (m_max_nentries >= 0 && m_max_nentries < nentries) nentries = m_max_nentries;
 
   std::map<Long64_t, FCS_cell> cells; //read all objects and collect them by identifier (Long64_t)
   std::map<Long64_t, std::vector<FCS_g4hit> > g4hits;
@@ -178,641 +37,476 @@ void CaloHitAna::Loop()
   FCS_g4hit  one_g4hit;
   FCS_hit    one_hit;
   FCS_matchedcell one_matchedcell;
-  FCS_truth  one_truth;
+  //FCS_truth  one_truth;
 
   //From here: Loop over events:
   Long64_t nbytes = 0, nb = 0;
-  for(Long64_t jentry=0; jentry<nentries;jentry++)
+  std::cout << "before event loop" << std::endl;
+  for (Long64_t jentry = 0; jentry < nentries; jentry++)
+  {
+    if (jentry % 100 == 0)
+      std::cout << "jentry " << jentry << endl;
+
+    Long64_t ientry = LoadTree(jentry);
+    if (ientry < 0) break;
+    nb = fChain->GetEntry(jentry);   nbytes += nb;
+    if (jentry % m_PrintOutFrequency == 0)
     {
+      std::cout << "Processing entry " << jentry << std::endl;
+      gSystem->GetProcInfo(&procinfo);
+      std::cout << "Memory usage: " << procinfo.fMemResident << " " << procinfo.fMemVirtual << std::endl;
+    }
 
-      if(jentry%100==0) cout<<"jentry "<<jentry<<endl;
-
-      Long64_t ientry = LoadTree(jentry);
-      if (ientry < 0) break;
-      nb = fChain->GetEntry(jentry);   nbytes += nb;
-      if (jentry % m_PrintOutFrequency == 0)
-        {
-          std::cout <<"Processing entry "<<jentry<<std::endl;
-          gSystem->GetProcInfo(&procinfo);
-          std::cout <<"Memory usage: "<<procinfo.fMemResident<<" "<<procinfo.fMemVirtual<<std::endl;
-        }
-
-      //Copy truth
-      truthE.clear();
-      truthPx.clear();
-      truthPy.clear();
-      truthPz.clear();
-      truthPDG.clear();
-      truthBarcode.clear();
-      truthVtxBarcode.clear();
-      truthcollection.clear();
-
-      for(unsigned int truth_i = 0; truth_i < TruthE->size(); truth_i++)
-        {
-          //std::cout <<truth_i<<" "<<(*TruthPDG)[truth_i]<<std::endl;
-          //std::cout <<"TTC2: "<<(*TTC_entrance_eta)[truth_i].size()<<std::endl;//this one has 24 layers ->ok
-          truthE.push_back( (*TruthE)[truth_i]);
-          truthPx.push_back((*TruthPx)[truth_i]);
-          truthPy.push_back((*TruthPy)[truth_i]);
-          truthPz.push_back((*TruthPz)[truth_i]);
-          truthPDG.push_back((*TruthPDG)[truth_i]);
-          truthBarcode.push_back((*TruthBarcode)[truth_i]);
-          truthVtxBarcode.push_back((*TruthVtxBarcode)[truth_i]);
-
-          /*
-            m_TTC_IDCaloBoundary_eta->push_back(TTC_IDCaloBoundary_eta->at(truth_i));
-            m_TTC_IDCaloBoundary_phi->push_back(TTC_IDCaloBoundary_phi->at(truth_i));
-            m_TTC_IDCaloBoundary_r  ->push_back(TTC_IDCaloBoundary_r->at(truth_i));
-            m_TTC_IDCaloBoundary_z  ->push_back(TTC_IDCaloBoundary_z->at(truth_i));
-            m_TTC_Angle3D           ->push_back(TTC_Angle3D->at(truth_i));
-            m_TTC_AngleEta          ->push_back(TTC_AngleEta->at(truth_i));
-          */
-
-          m_newTTC_IDCaloBoundary_eta->push_back(newTTC_IDCaloBoundary_eta->at(truth_i));
-          m_newTTC_IDCaloBoundary_phi->push_back(newTTC_IDCaloBoundary_phi->at(truth_i));
-          m_newTTC_IDCaloBoundary_r  ->push_back(newTTC_IDCaloBoundary_r->at(truth_i));
-          m_newTTC_IDCaloBoundary_z  ->push_back(newTTC_IDCaloBoundary_z->at(truth_i));
-          m_newTTC_Angle3D           ->push_back(newTTC_Angle3D->at(truth_i));
-          m_newTTC_AngleEta          ->push_back(newTTC_AngleEta->at(truth_i));
-
-          /*
-            vector<double> entrance_eta;
-            vector<double> entrance_phi;
-            vector<double> entrance_r;
-            vector<double> entrance_z;
-            vector<double> back_eta;
-            vector<double> back_phi;
-            vector<double> back_r;
-            vector<double> back_z;
-          */
-
-          vector<double> new_entrance_eta;
-          vector<double> new_entrance_phi;
-          vector<double> new_entrance_r;
-          vector<double> new_entrance_z;
-          vector<double> new_back_eta;
-          vector<double> new_back_phi;
-          vector<double> new_back_r;
-          vector<double> new_back_z;
-          for(unsigned int s=0;s<24;s++)
-            {
-              /*
-                entrance_eta.push_back((TTC_entrance_eta->at(truth_i))[s]);
-                entrance_phi.push_back((TTC_entrance_phi->at(truth_i))[s]);
-                entrance_r  .push_back((TTC_entrance_r->at(truth_i))[s]);
-                entrance_z  .push_back((TTC_entrance_z->at(truth_i))[s]);
-                back_eta    .push_back((TTC_back_eta->at(truth_i))[s]);
-                back_phi    .push_back((TTC_back_phi->at(truth_i))[s]);
-                back_r      .push_back((TTC_back_r->at(truth_i))[s]);
-                back_z      .push_back((TTC_back_z->at(truth_i))[s]);
-              */
-              new_entrance_eta.push_back((newTTC_entrance_eta->at(truth_i))[s]);
-              new_entrance_phi.push_back((newTTC_entrance_phi->at(truth_i))[s]);
-              new_entrance_r  .push_back((newTTC_entrance_r->at(truth_i))[s]);
-              new_entrance_z  .push_back((newTTC_entrance_z->at(truth_i))[s]);
-              new_back_eta    .push_back((newTTC_back_eta->at(truth_i))[s]);
-              new_back_phi    .push_back((newTTC_back_phi->at(truth_i))[s]);
-              new_back_r      .push_back((newTTC_back_r->at(truth_i))[s]);
-              new_back_z      .push_back((newTTC_back_z->at(truth_i))[s]);
-            }
-          /*
-            m_TTC_entrance_eta->push_back(entrance_eta);
-            m_TTC_entrance_phi->push_back(entrance_phi);
-            m_TTC_entrance_r  ->push_back(entrance_r);
-            m_TTC_entrance_z  ->push_back(entrance_z);
-            m_TTC_back_eta    ->push_back(back_eta);
-            m_TTC_back_phi    ->push_back(back_phi);
-            m_TTC_back_r      ->push_back(back_r);
-            m_TTC_back_z      ->push_back(back_z);
-          */
-          m_newTTC_entrance_eta->push_back(new_entrance_eta);
-          m_newTTC_entrance_phi->push_back(new_entrance_phi);
-          m_newTTC_entrance_r  ->push_back(new_entrance_r);
-          m_newTTC_entrance_z  ->push_back(new_entrance_z);
-          m_newTTC_back_eta    ->push_back(new_back_eta);
-          m_newTTC_back_phi    ->push_back(new_back_phi);
-          m_newTTC_back_r      ->push_back(new_back_r);
-          m_newTTC_back_z      ->push_back(new_back_z);
-
-          /*
-            one_truth.SetPxPyPzE((*TruthPx)[truth_i], (*TruthPy)[truth_i], (*TruthPz)[truth_i], (*TruthE)[truth_i]);
-          */
-
-          one_truth.pdgid   = (*TruthPDG)[truth_i];
-          one_truth.barcode = (*TruthBarcode)[truth_i];
-          one_truth.vtxbarcode = (*TruthVtxBarcode)[truth_i];
-          truthcollection.push_back(one_truth);
+    //Copy truth
+    new_truthE->clear();
+    new_truthPx->clear();
+    new_truthPy->clear();
+    new_truthPz->clear();
+    new_truthPDG->clear();
+    new_truthBarcode->clear();
+    new_truthVtxBarcode->clear();
+    //truthcollection->clear();
+    m_newTTC_entrance_eta->clear();
+    m_newTTC_entrance_phi->clear();
+    m_newTTC_entrance_r->clear();
+    m_newTTC_entrance_z->clear();
+    m_newTTC_back_eta->clear();
+    m_newTTC_back_phi->clear();
+    m_newTTC_back_r->clear();
+    m_newTTC_back_z->clear();
+    m_newTTC_IDCaloBoundary_eta->clear();
+    m_newTTC_IDCaloBoundary_phi->clear();
+    m_newTTC_IDCaloBoundary_r->clear();
+    m_newTTC_IDCaloBoundary_z->clear();
+    m_newTTC_Angle3D->clear();
+    m_newTTC_AngleEta->clear();
+
+    oneeventcells->m_vector.clear();
+
+    if (TruthE->size() != 1)
+      std::cout << "Strange! TruthE->size() is " << TruthE->size() << ", but it should be 1. Please check input." << std::endl;
+
+    for (unsigned int truth_i = 0; truth_i < TruthE->size(); truth_i++)
+    {
+      //std::cout <<truth_i<<" "<<TruthE->size()<<" "<<TruthPDG->at(truth_i)<<std::endl;
+      //std::cout <<"TTC2: "<<(*TTC_entrance_eta)[truth_i].size()<<std::endl;//this one has 24 layers ->ok
+
+      new_truthE->push_back(TruthE->at(truth_i));
+      new_truthPx->push_back(TruthPx->at(truth_i));
+      new_truthPy->push_back(TruthPy->at(truth_i));
+      new_truthPz->push_back(TruthPz->at(truth_i));
+      new_truthPDG->push_back(TruthPDG->at(truth_i));
+      new_truthBarcode->push_back(TruthBarcode->at(truth_i));
+      //new_truthVtxBarcode->push_back(TruthVtxBarcode->at(truth_i));
+
+      m_newTTC_IDCaloBoundary_eta->push_back(newTTC_IDCaloBoundary_eta->at(truth_i));
+      m_newTTC_IDCaloBoundary_phi->push_back(newTTC_IDCaloBoundary_phi->at(truth_i));
+      m_newTTC_IDCaloBoundary_r  ->push_back(newTTC_IDCaloBoundary_r->at(truth_i));
+      m_newTTC_IDCaloBoundary_z  ->push_back(newTTC_IDCaloBoundary_z->at(truth_i));
+      m_newTTC_Angle3D           ->push_back(newTTC_Angle3D->at(truth_i));
+      m_newTTC_AngleEta          ->push_back(newTTC_AngleEta->at(truth_i));
+
+      //create temporary vectors
+      vector<float> new_entrance_eta;
+      vector<float> new_entrance_phi;
+      vector<float> new_entrance_r;
+      vector<float> new_entrance_z;
+      vector<float> new_back_eta;
+      vector<float> new_back_phi;
+      vector<float> new_back_r;
+      vector<float> new_back_z;
+
+      for (unsigned int s = 0; s < 24; s++)
+      {
+        new_entrance_eta.push_back((newTTC_entrance_eta->at(truth_i))[s]);
+        new_entrance_phi.push_back((newTTC_entrance_phi->at(truth_i))[s]);
+        new_entrance_r.push_back((newTTC_entrance_r->at(truth_i))[s]);
+        new_entrance_z.push_back((newTTC_entrance_z->at(truth_i))[s]);
+        new_back_eta.push_back((newTTC_back_eta->at(truth_i))[s]);
+        new_back_phi.push_back((newTTC_back_phi->at(truth_i))[s]);
+        new_back_r.push_back((newTTC_back_r->at(truth_i))[s]);
+        new_back_z.push_back((newTTC_back_z->at(truth_i))[s]);
+      }
+
+      //push back temporary vectors
+      m_newTTC_entrance_eta->push_back(new_entrance_eta);
+      m_newTTC_entrance_phi->push_back(new_entrance_phi);
+      m_newTTC_entrance_r->push_back(new_entrance_r);
+      m_newTTC_entrance_z->push_back(new_entrance_z);
+      m_newTTC_back_eta->push_back(new_back_eta);
+      m_newTTC_back_phi->push_back(new_back_phi);
+      m_newTTC_back_r->push_back(new_back_r);
+      m_newTTC_back_z->push_back(new_back_z);
+
+      /*
+      one_truth.SetPxPyPzE((*TruthPx)[truth_i], (*TruthPy)[truth_i], (*TruthPz)[truth_i], (*TruthE)[truth_i]);
+      one_truth.pdgid   = TruthPDG->at(truth_i);
+      one_truth.barcode = TruthBarcode->at(truth_i);
+      one_truth.vtxbarcode = TruthVtxBarcode->at(truth_i);
+      truthcollection->push_back(one_truth);
+      */
 
-        }
+    }
 
-      //Now matching between cells, G4hits and G4detailed hits
-      //sort cells by identifier:
-      //clear first the containers for this event:
-      cells.clear();
-      g4hits.clear();
-      hits.clear();
+    //std::cout<<"check. after truth block"<<std::endl;
 
-      //std::cout <<"Check Original size: Cells: "<<CellIdentifier->size()<<" G4Hits: "<<G4HitCellIdentifier->size()<<" FCSHits: "<<HitCellIdentifier->size()<<std::endl;
-      if(m_Debug > 1) std::cout <<"Reading cells...";
+    //Now matching between cells, G4hits and G4detailed hits
+    //sort cells by identifier:
+    //clear first the containers for this event:
+    cells.clear();
+    g4hits.clear();
+    hits.clear();
+    //std::cout <<"Check Original size: Cells: "<<CellIdentifier->size()<<" G4Hits: "<<G4HitCellIdentifier->size()<<" FCSHits: "<<HitCellIdentifier->size()<<std::endl;
+    if (m_Debug > 1) std::cout << "Reading cells...";
 
-      for (unsigned int cell_i = 0; cell_i <CellIdentifier->size(); cell_i++)
-        {
-          if (cells.find((*CellIdentifier)[cell_i]) == cells.end()) //doesn't exist
-            {
-              //FCS_cell one_cell;
-              one_cell.cell_identifier = (*CellIdentifier)[cell_i];
-              one_cell.sampling = (*CellSampling)[cell_i];
-              one_cell.energy = (*CellE)[cell_i];
-              one_cell.center_x = 0.0; //for now
-              one_cell.center_y = 0.0;
-              one_cell.center_z = 0.0;
-              cells.insert(std::pair<Long64_t, FCS_cell>(one_cell.cell_identifier, one_cell));
-            }
-          else
-            {
-              //there shouldn't be a cell with the same identifier in this event
-              std::cout <<"ISF_HitAnalysis: Same cell???? ERROR"<<std::endl;
-            }
-        }
+    for (unsigned int cell_i = 0; cell_i < CellIdentifier->size(); cell_i++)
+    {
+      if (cells.find((*CellIdentifier)[cell_i]) == cells.end()) //doesn't exist
+      {
+        one_cell.cell_identifier = (*CellIdentifier)[cell_i];
+        one_cell.sampling = (*CellSampling)[cell_i];
+        one_cell.energy = (*CellE)[cell_i];
+        one_cell.center_x = 0.0; //for now
+        one_cell.center_y = 0.0;
+        one_cell.center_z = 0.0;
+        cells.insert(std::pair<Long64_t, FCS_cell>(one_cell.cell_identifier, one_cell));
+      }
+      else
+      {
+        //there shouldn't be a cell with the same identifier in this event
+        std::cout << "ISF_HitAnalysis: Same cell???? ERROR" << std::endl;
+      }
+    }
 
-      if(m_Debug > 1) std::cout <<" Done"<<std::endl;
+    if (m_Debug > 1) std::cout << " Done" << std::endl;
 
-      if (m_Debug > 1) std::cout <<"Reading G4hits";
+    if (m_Debug > 1) std::cout << "Reading G4hits";
 
-      for (unsigned int g4hit_i = 0; g4hit_i <G4HitIdentifier->size(); g4hit_i++)
+    if (m_do_g4_hits)
+    {
+      for (unsigned int g4hit_i = 0; g4hit_i < G4HitIdentifier->size(); g4hit_i++)
+      {
+        if ((*G4HitSampling)[g4hit_i] >= 0 && (*G4HitSampling)[g4hit_i] <= 25 && (*G4HitT)[g4hit_i] > m_TimingCut)
         {
-          if ((*G4HitSampling)[g4hit_i] >=0 && (*G4HitSampling)[g4hit_i]<=25 && (*G4HitT)[g4hit_i]>m_TimingCut)
-            {
-              if (m_Debug > 1) std::cout <<"Ignoring G4hit, time too large: "<<g4hit_i<<" time: "<<(*G4HitT)[g4hit_i]<<std::endl;
-              continue;
-            }
-
-          if (g4hits.find((*G4HitCellIdentifier)[g4hit_i]) == g4hits.end())
-            {
-              //this G4 hit doesn't exist yet
-              //FCS_g4hit one_g4hit;
-              one_g4hit.identifier = (*G4HitIdentifier)[g4hit_i];
-              one_g4hit.cell_identifier = (*G4HitCellIdentifier)[g4hit_i];
-              one_g4hit.sampling = (*G4HitSampling)[g4hit_i];
-              one_g4hit.hit_time = (*G4HitT)[g4hit_i];
-              //one_g4hit.hit_energy = (*G4HitE)[g4hit_i];
-              //scale the hit energy with the sampling fraction
-              if (one_g4hit.sampling >=12 && one_g4hit.sampling <=20)
-                {//tile
-                 //std::cout <<"Tile: "<<(*G4HitE)[g4hit_i]<<" "<<(*G4HitSamplingFraction)[g4hit_i]<<std::endl;
-                  if((*G4HitSamplingFraction)[g4hit_i])
-                    {
-                      one_g4hit.hit_energy = (*G4HitE)[g4hit_i]*(*G4HitSamplingFraction)[g4hit_i];
-                      //std::cout <<"TileE: "<<one_g4hit.hit_energy<<std::endl;
-                    }
-                  else one_g4hit.hit_energy = 0.;
-                }
-              else
-                {
-                  //std::cout <<"LAr: "<<(*G4HitE)[g4hit_i]<<" "<<(*G4HitSamplingFraction)[g4hit_i]<<std::endl;
-                  one_g4hit.hit_energy = (*G4HitE)[g4hit_i]/(*G4HitSamplingFraction)[g4hit_i];
-                }
-              //one_g4hit.hit_sampfrac = (*G4HitSamplingFraction)[g4hit_i];
-              //new g4hit -> insert vector with 1 element
-              g4hits.insert(std::pair<Long64_t, std::vector<FCS_g4hit> >(one_g4hit.cell_identifier, std::vector<FCS_g4hit>(1,one_g4hit)));
-            }
-          else
-            {
-              //G4 hit exists in this identifier -> push_back new to the vector                                                                                           //FCS_g4hit one_g4hit;
-              one_g4hit.identifier = (*G4HitIdentifier)[g4hit_i];
-              one_g4hit.cell_identifier = (*G4HitCellIdentifier)[g4hit_i];
-              one_g4hit.sampling = (*G4HitSampling)[g4hit_i];
-              one_g4hit.hit_time = (*G4HitT)[g4hit_i];
-              if (one_g4hit.sampling >=12 && one_g4hit.sampling <=20)
-                {//tile
-                 //std::cout <<"Tile2: "<<(*G4HitE)[g4hit_i]<<" "<<(*G4HitSamplingFraction)[g4hit_i]<<std::endl;
-                  if((*G4HitSamplingFraction)[g4hit_i])
-                    {
-                      one_g4hit.hit_energy = (*G4HitE)[g4hit_i]*(*G4HitSamplingFraction)[g4hit_i];
-                      //std::cout <<"TileE2: "<<one_g4hit.hit_energy<<std::endl;
-                    }
-                  else one_g4hit.hit_energy = 0.;
-                }
-              else
-                {
-                  //std::cout <<"LAr2: "<<(*G4HitE)[g4hit_i]<<" "<<(*G4HitSamplingFraction)[g4hit_i]<<std::endl;
-                  one_g4hit.hit_energy = (*G4HitE)[g4hit_i]/(*G4HitSamplingFraction)[g4hit_i];
-                }
-              //one_g4hit.hit_sampfrac = (*G4HitSamplingFraction)[g4hit_i];
-              g4hits[(*G4HitCellIdentifier)[g4hit_i]].push_back(one_g4hit);
-            }
+          if (m_Debug > 1) std::cout << "Ignoring G4hit, time too large: " << g4hit_i << " time: " << (*G4HitT)[g4hit_i] << std::endl;
+          continue;
         }
 
-      if (m_Debug > 1) std::cout <<" Done"<<std::endl;
-
-      if (m_Debug > 1) std::cout <<"Reading detailed FCS hits "<< HitIdentifier->size()<<std::endl;
-
-      for (unsigned int hit_i = 0; hit_i < HitIdentifier->size(); hit_i++)
+        if (g4hits.find((*G4HitCellIdentifier)[g4hit_i]) == g4hits.end())
         {
-          if((*HitSampling)[hit_i] >=0 && (*HitSampling)[hit_i]<=25 && (*HitT)[hit_i]>m_TimingCut)
+          //this G4 hit doesn't exist yet
+          one_g4hit.identifier = (*G4HitIdentifier)[g4hit_i];
+          one_g4hit.cell_identifier = (*G4HitCellIdentifier)[g4hit_i];
+          one_g4hit.sampling = (*G4HitSampling)[g4hit_i];
+          one_g4hit.hit_time = (*G4HitT)[g4hit_i];
+          //one_g4hit.hit_energy = (*G4HitE)[g4hit_i];
+          //scale the hit energy with the sampling fraction
+          if (one_g4hit.sampling >= 12 && one_g4hit.sampling <= 20)
+          { //tile
+            //std::cout <<"Tile: "<<(*G4HitE)[g4hit_i]<<" "<<(*G4HitSamplingFraction)[g4hit_i]<<std::endl;
+            if ((*G4HitSamplingFraction)[g4hit_i])
             {
-              if (m_Debug > 1)
-                std::cout <<"Ignoring FCS hit, time too large: "<<hit_i<<" time: "<<(*HitT)[hit_i]<<std::endl;
-              continue;
-            }
-          if(hits.find((*HitCellIdentifier)[hit_i]) == hits.end())
-            {
-              //Detailed hit doesn't exist yet
-              //FCS_hit one_hit;
-              one_hit.identifier = (*HitIdentifier)[hit_i];
-              one_hit.cell_identifier = (*HitCellIdentifier)[hit_i];
-              one_hit.sampling = (*HitSampling)[hit_i];
-
-              if (one_hit.sampling >=12 && one_hit.sampling <=20)
-                {//tile
-                  if((*HitSamplingFraction)[hit_i])
-                    {
-                      one_hit.hit_energy = (*HitE)[hit_i]*(*HitSamplingFraction)[hit_i];
-                    }
-                  else
-                    one_hit.hit_energy = 0.;
-                }
-              else
-                {
-                  one_hit.hit_energy = (*HitE)[hit_i]/(*HitSamplingFraction)[hit_i];
-                }
-              //one_hit.hit_sampfrac = (*HitSamplingFraction)[hit_i];
-              one_hit.hit_time = (*HitT)[hit_i];
-              one_hit.hit_x = (*HitX)[hit_i];
-              one_hit.hit_y = (*HitY)[hit_i];
-              one_hit.hit_z = (*HitZ)[hit_i];
-              hits.insert(std::pair<Long64_t, std::vector<FCS_hit> >(one_hit.cell_identifier, std::vector<FCS_hit>(1,one_hit)));
+              one_g4hit.hit_energy = (*G4HitE)[g4hit_i] * (*G4HitSamplingFraction)[g4hit_i];
+              //std::cout <<"TileE: "<<one_g4hit.hit_energy<<std::endl;
             }
+            else one_g4hit.hit_energy = 0.;
+          }
           else
-            {
-              //Detailed hit exists in this identifier -> push_back new to the vector
-              //FCS_hit one_hit;
-              one_hit.identifier = (*HitIdentifier)[hit_i];
-              one_hit.cell_identifier = (*HitCellIdentifier)[hit_i];
-              one_hit.sampling = (*HitSampling)[hit_i];
-              //one_hit.hit_energy = (*HitE)[hit_i];
-              if (one_hit.sampling >=12 && one_hit.sampling <=20)
-                {//tile
-                  if ((*HitSamplingFraction)[hit_i])
-                    {
-                      one_hit.hit_energy = (*HitE)[hit_i]*(*HitSamplingFraction)[hit_i];
-                    }
-                  else
-                    one_hit.hit_energy = 0.;
-                }
-              else
-                {
-                  one_hit.hit_energy = (*HitE)[hit_i]/(*HitSamplingFraction)[hit_i];
-                }
-              //one_hit.hit_sampfrac = (*HitSamplingFraction)[hit_i];
-              one_hit.hit_time = (*HitT)[hit_i];
-              one_hit.hit_x = (*HitX)[hit_i];
-              one_hit.hit_y = (*HitY)[hit_i];
-              one_hit.hit_z = (*HitZ)[hit_i];
-              hits[(*HitCellIdentifier)[hit_i]].push_back(one_hit);
-            }
+          {
+            //std::cout <<"LAr: "<<(*G4HitE)[g4hit_i]<<" "<<(*G4HitSamplingFraction)[g4hit_i]<<std::endl;
+            one_g4hit.hit_energy = (*G4HitE)[g4hit_i] / (*G4HitSamplingFraction)[g4hit_i];
+          }
+          //one_g4hit.hit_sampfrac = (*G4HitSamplingFraction)[g4hit_i];
+          //new g4hit -> insert vector with 1 element
+          g4hits.insert(std::pair<Long64_t, std::vector<FCS_g4hit> >(one_g4hit.cell_identifier, std::vector<FCS_g4hit>(1, one_g4hit)));
         }
-
-      if (m_Debug > 1) std::cout <<" Done"<<std::endl;
-
-      if (m_Debug > 1) std::cout <<"ISF_HitAnalysis Check: Cells: "<<cells.size()<<" G4hits: "<<g4hits.size()<<" FCS detailed hits: "<<hits.size()<<std::endl;
-
-      //Start matching:
-      Int_t iindex = 0;
-      for (std::map<Long64_t, FCS_cell>::iterator it = cells.begin(); it!= cells.end(); )
+        else
         {
-          iindex++;
-          //std::cout <<iindex<<std::endl;
-          //FCS_matchedcell one_matchedcell;
-          one_matchedcell.clear(); //maybe not completely necessery, as we're not pushing_back into vectors
-          //set the cell part
-          one_matchedcell.cell = it->second;
-          //now look for FCS detailed hits in this cell
-          std::map<Long64_t, std::vector<FCS_hit> >::iterator it2 = hits.find(it->first);
-          if (it2!=hits.end())
-            {
-              //std::cout <<"FCS hits found in this cell"<<std::endl;
-              one_matchedcell.hit = it2->second;
-              hits.erase(it2); //remove it
-            }
-          else
-            {
-              //no hit found for this cell
-              one_matchedcell.hit.clear(); //important!
-            }
-          //now look for G4hits in this cell
-          std::map<Long64_t, std::vector<FCS_g4hit> >::iterator it3 = g4hits.find(it->first);
-          if (it3 != g4hits.end())
+          //G4 hit exists in this identifier -> push_back new to the vector                                                                                       //FCS_g4hit one_g4hit;
+          one_g4hit.identifier = (*G4HitIdentifier)[g4hit_i];
+          one_g4hit.cell_identifier = (*G4HitCellIdentifier)[g4hit_i];
+          one_g4hit.sampling = (*G4HitSampling)[g4hit_i];
+          one_g4hit.hit_time = (*G4HitT)[g4hit_i];
+          if (one_g4hit.sampling >= 12 && one_g4hit.sampling <= 20)
+          { //tile
+            //std::cout <<"Tile2: "<<(*G4HitE)[g4hit_i]<<" "<<(*G4HitSamplingFraction)[g4hit_i]<<std::endl;
+            if ((*G4HitSamplingFraction)[g4hit_i])
             {
-              //std::cout <<"G4 hits found in this cell"<<std::endl;
-              one_matchedcell.g4hit = it3->second;
-              g4hits.erase(it3);
+              one_g4hit.hit_energy = (*G4HitE)[g4hit_i] * (*G4HitSamplingFraction)[g4hit_i];
+              //std::cout <<"TileE2: "<<one_g4hit.hit_energy<<std::endl;
             }
+            else one_g4hit.hit_energy = 0.;
+          }
           else
-            {
-              //no g4hit found for this cell
-              one_matchedcell.g4hit.clear();//important!
-            }
-          //std::cout <<"Erase cell"<<std::endl;
-          cells.erase(it++);
-          //std::cout <<"Insert matched object"<<std::endl;
-          //push_back matched cell for event jentry
-          m_all_cells[jentry].push_back(one_matchedcell);
-          //std::cout <<"Go next"<<std::endl;
+          {
+            //std::cout <<"LAr2: "<<(*G4HitE)[g4hit_i]<<" "<<(*G4HitSamplingFraction)[g4hit_i]<<std::endl;
+            one_g4hit.hit_energy = (*G4HitE)[g4hit_i] / (*G4HitSamplingFraction)[g4hit_i];
+          }
+          //one_g4hit.hit_sampfrac = (*G4HitSamplingFraction)[g4hit_i];
+          g4hits[(*G4HitCellIdentifier)[g4hit_i]].push_back(one_g4hit);
         }
+      }
+    }
 
-      //ok, cells should be empty, what about hits and g4hits?
-      //There could be G4hits/FCS hits for which we don't have a cell ->create a dummy empty cell with 0 energy, take the cell identifier from the hit
-      if (m_Debug > 1) std::cout <<"ISF_HitAnalysis Check after cells: "<<cells.size()<<" "<<g4hits.size()<<" "<<hits.size()<<std::endl;
+    if (m_Debug > 1) std::cout << " Done" << std::endl;
 
-      for (std::map<Long64_t, std::vector<FCS_hit> >::iterator it = hits.begin(); it!= hits.end();)
-        {
-          //FCS_matchedcell one_matchedcell;
-          one_matchedcell.clear();
-          one_matchedcell.cell.cell_identifier = it->first;
-          //std::cout <<"This hit didn't exist in cell: "<<it->first<<std::endl;
-          if (it->second.size())
-            {
-              one_matchedcell.cell.sampling = (it->second)[0].sampling;
-            }
-          else
-            {
-              one_matchedcell.cell.sampling = -1; //
-              //ok, but you really shouldn't be here
-              std::cout <<"ERROR: You shouldn't really be here"<<std::endl;
-            }
-          one_matchedcell.cell.energy = 0.;
-          one_matchedcell.cell.center_x = 0.0;
-          one_matchedcell.cell.center_y = 0.0;
-          one_matchedcell.cell.center_z = 0.0;
-          one_matchedcell.hit = it->second;
-          std::map<Long64_t, std::vector<FCS_g4hit> >::iterator it3 = g4hits.find(it->first);
-          if (it3 != g4hits.end())
-            {
-              one_matchedcell.g4hit = it3->second;
-              g4hits.erase(it3);
-            }
-          else
-            {
-              //no g4hit found for this cell
-              one_matchedcell.g4hit.clear(); //important!
-            }
-          hits.erase(it++);
-          m_all_cells[jentry].push_back(one_matchedcell);
-        }
+    if (m_Debug > 1) std::cout << "Reading detailed FCS hits " << HitIdentifier->size() << std::endl;
 
-      //ok, hits should be empty, what about g4hits?
-      if (m_Debug > 1 )std::cout <<"ISF_HitAnalysis Check after hits: "<<cells.size()<<" "<<g4hits.size()<<" "<<hits.size()<<std::endl;
-      for (std::map<Long64_t, std::vector<FCS_g4hit> >::iterator it = g4hits.begin(); it!= g4hits.end();)
-        {
-          //FCS_matchedcell one_matchedcell;
-          one_matchedcell.clear(); //maybe not so important
-          one_matchedcell.cell.cell_identifier = it->first;
-          if (it->second.size())
-            {
-              one_matchedcell.cell.sampling = (it->second)[0].sampling;
-            }
-          else
-            {
-              one_matchedcell.cell.sampling = -1; //
-              //not really
-              std::cout <<"ERROR: You shouldn't really be here"<<std::endl;
-            }
-          one_matchedcell.cell.energy = 0.;
-          one_matchedcell.cell.center_x = 0.0;
-          one_matchedcell.cell.center_y = 0.0;
-          one_matchedcell.cell.center_z = 0.0;
-          one_matchedcell.g4hit = it->second;
-          one_matchedcell.hit.clear(); //important!!
-          g4hits.erase(it++);
-          m_all_cells[jentry].push_back(one_matchedcell);
+    for (unsigned int hit_i = 0; hit_i < HitIdentifier->size(); hit_i++)
+    {
+      if ((*HitSampling)[hit_i] >= 0 && (*HitSampling)[hit_i] <= 25 && (*HitT)[hit_i] > m_TimingCut)
+      {
+        if (m_Debug > 1)
+          std::cout << "Ignoring FCS hit, time too large: " << hit_i << " time: " << (*HitT)[hit_i] << std::endl;
+        continue;
+      }
+      if (hits.find((*HitCellIdentifier)[hit_i]) == hits.end())
+      {
+        //Detailed hit doesn't exist yet
+        one_hit.identifier = (*HitIdentifier)[hit_i];
+        one_hit.cell_identifier = (*HitCellIdentifier)[hit_i];
+        one_hit.sampling = (*HitSampling)[hit_i];
+
+        if (one_hit.sampling >= 12 && one_hit.sampling <= 20)
+        { //tile
+          if ((*HitSamplingFraction)[hit_i])
+          {
+            one_hit.hit_energy = (*HitE)[hit_i] * (*HitSamplingFraction)[hit_i];
+          }
+          else one_hit.hit_energy = 0.;
         }
-
-      if (m_Debug > 1) std::cout <<"ISF_HitAnalysis Check after g4hits: "<<cells.size()<<" "<<g4hits.size()<<" "<<hits.size()<<std::endl;
-      //Final size for this event
-      if (m_Debug > 1) std::cout <<"ISF_HitAnalysis Matched cells size: "<<m_all_cells[jentry].size()<<std::endl;
-
-      //Can fill the output tree already here:
-      total_cell_e  = 0.0;
-      total_hit_e   = 0.0;
-      total_g4hit_e = 0.0;
-
-      oneeventcells = m_all_cells[jentry]; //This gets cells for particular event jentry (m_all_cells holds now all cells from all events (huge!)
-      for (int j=0; j<MAX_LAYER-1; j++)
+        else
         {
-          layercells[j].m_vector = oneeventcells.GetLayer(j);
+          one_hit.hit_energy = (*HitE)[hit_i] / (*HitSamplingFraction)[hit_i];
         }
-
-      //this is for invalid cells
-      layercells[MAX_LAYER-1].m_vector = oneeventcells.GetLayer(-1);
-
-      for (int i=0; i<MAX_LAYER; i++)
+        //one_hit.hit_sampfrac = (*HitSamplingFraction)[hit_i];
+        one_hit.hit_time = (*HitT)[hit_i];
+        one_hit.hit_x = (*HitX)[hit_i];
+        one_hit.hit_y = (*HitY)[hit_i];
+        one_hit.hit_z = (*HitZ)[hit_i];
+        hits.insert(std::pair<Long64_t, std::vector<FCS_hit> >(one_hit.cell_identifier, std::vector<FCS_hit>(1, one_hit)));
+      }
+      else
+      {
+        //Detailed hit exists in this identifier -> push_back new to the vector
+        one_hit.identifier = (*HitIdentifier)[hit_i];
+        one_hit.cell_identifier = (*HitCellIdentifier)[hit_i];
+        one_hit.sampling = (*HitSampling)[hit_i];
+        //one_hit.hit_energy = (*HitE)[hit_i];
+        if (one_hit.sampling >= 12 && one_hit.sampling <= 20)
+        { //tile
+          if ((*HitSamplingFraction)[hit_i])
+          {
+            one_hit.hit_energy = (*HitE)[hit_i] * (*HitSamplingFraction)[hit_i];
+          }
+          else one_hit.hit_energy = 0.;
+        }
+        else
         {
-          cell_energy[i]  = 0.0; //zero for each event!
-          hit_energy[i]   = 0.0;
-          g4hit_energy[i] = 0.0;
-          for (unsigned int cellindex = 0; cellindex < layercells[i].size(); cellindex++)
-            {
-              if (i!=MAX_LAYER-1)
-                {
-                  cell_energy[i]+=layercells[i][cellindex].cell.energy;
-                  total_cell_e+=layercells[i][cellindex].cell.energy;
-                }
-              else
-                {
-                  //don't add the energy in the invalid layer to the total energy (if there is any (shouldn't)
-                  cell_energy[i]+=layercells[i][cellindex].cell.energy; //this should be here anyway
-                }
-
-              //sum energy of all FCS detailed hits in this layer/cell
-              for (unsigned int j=0; j<layercells[i][cellindex].hit.size(); j++)
-                {
-                  if (i!=MAX_LAYER-1)
-                    {
-                      total_hit_e+=layercells[i][cellindex].hit[j].hit_energy;
-                      hit_energy[i]+=layercells[i][cellindex].hit[j].hit_energy;
-                    }
-                  else
-                    {
-                      //again, don't add invalid layer energy to the sum
-                      hit_energy[i]+=layercells[i][cellindex].hit[j].hit_energy;
-                    }
-                }
-
-              //sum energy of all G4 hits in this layer/cell
-              for (unsigned int j=0; j<layercells[i][cellindex].g4hit.size(); j++)
-                {
-                  if (i!=MAX_LAYER-1)
-                    {
-                      total_g4hit_e+=layercells[i][cellindex].g4hit[j].hit_energy;
-                      g4hit_energy[i]+=layercells[i][cellindex].g4hit[j].hit_energy;
-                    }
-                  else
-                    {
-                      //don't add invalied layer energy to the sum
-                      g4hit_energy[i]+=layercells[i][cellindex].g4hit[j].hit_energy;
-                    }
-                }
-            }
+          one_hit.hit_energy = (*HitE)[hit_i] / (*HitSamplingFraction)[hit_i];
         }
-      cell_energy[MAX_LAYER]  = total_cell_e;
-      hit_energy[MAX_LAYER]   = total_hit_e;
-      g4hit_energy[MAX_LAYER] = total_g4hit_e;
-
-      //Uncomment this to get energy cross check
-      if (jentry % m_PrintOutFrequency ==0) std::cout <<"Energy check: event: "<<jentry<<" cell: "<<total_cell_e<<" g4hits: "<<total_g4hit_e<<" hits: "<<total_hit_e<<std::endl;
-      //tree gets filled
-      m_OutputTree->Fill();
-
-    }//loop over entries
-
-  m_OutputTree->Write();
-  m_Output->Close();
-
-};
-
-void CaloHitAna::Finish(std::vector<Int_t> settings, TString outputname)
-{
-  //Not necessary to call now (it is done in Loop directly)
-
-  //This writes out the tree out of m_all_cells vector
-  //settings vector specifies what branches are written out
-  //if settings[0]==1 -> write all cells for all events
-  //if settings[1]==1 -> write all cells for all layers(samplings) separately
-  //if settings[2]==1 -> write fractions of energies in all layers
+        //one_hit.hit_sampfrac = (*HitSamplingFraction)[hit_i];
+        one_hit.hit_time = (*HitT)[hit_i];
+        one_hit.hit_x = (*HitX)[hit_i];
+        one_hit.hit_y = (*HitY)[hit_i];
+        one_hit.hit_z = (*HitZ)[hit_i];
+        hits[(*HitCellIdentifier)[hit_i]].push_back(one_hit);
+      }
+    }
 
-  TFile *fout = TFile::Open(outputname,"RECREATE");
-  TTree *tout = new TTree("FCS_ParametrizationInput_TEST","Output_Matched_cell_Tree");
+    if (m_Debug > 1) std::cout << " Done" << std::endl;
 
-  FCS_matchedcellvector oneeventcells; //these are all matched cells in a single event
-  FCS_matchedcellvector layercells[MAX_LAYER]; //these are all matched cells in a given layer in a given event
+    if (m_Debug > 1) std::cout << "ISF_HitAnalysis Check: Cells: " << cells.size() << " G4hits: " << g4hits.size() << " FCS detailed hits: " << hits.size() << std::endl;
 
-  Float_t total_cell_e  = 0.0;
-  Float_t total_hit_e   = 0.0;
-  Float_t total_g4hit_e = 0.0;
+    //Start matching:
+    Int_t iindex = 0;
+    for (std::map<Long64_t, FCS_cell>::iterator it = cells.begin(); it != cells.end(); )
+    {
+      iindex++;
+      // std::cout <<iindex<<std::endl;
+      one_matchedcell.clear(); //maybe not completely necessery, as we're not pushing_back into vectors
+      //set the cell part
+      one_matchedcell.cell = it->second;
+      //now look for FCS detailed hits in this cell
+      std::map<Long64_t, std::vector<FCS_hit> >::iterator it2 = hits.find(it->first);
+      if (it2 != hits.end())
+      {
+        //std::cout <<"FCS hits found in this cell"<<std::endl;
+        one_matchedcell.hit = it2->second;
+        hits.erase(it2); //remove it
+      }
+      else
+      {
+        //no hit found for this cell
+        one_matchedcell.hit.clear(); //important!
+      }
+      //now look for G4hits in this cell
+      std::map<Long64_t, std::vector<FCS_g4hit> >::iterator it3 = g4hits.find(it->first);
+      if (it3 != g4hits.end())
+      {
+        //std::cout <<"G4 hits found in this cell"<<std::endl;
+        one_matchedcell.g4hit = it3->second;
+        g4hits.erase(it3);
+      }
+      else
+      {
+        //no g4hit found for this cell
+        one_matchedcell.g4hit.clear();//important!
+      }
+      //std::cout <<"Erase cell"<<std::endl;
+      cells.erase(it++);
+      //std::cout <<"Insert matched object"<<std::endl;
+      //push_back matched cell for event jentry
+      oneeventcells->push_back(one_matchedcell);
+      //std::cout <<"Go next"<<std::endl;
 
-  std::vector<Float_t> cell_energy;
-  std::vector<Float_t> hit_energy;
-  std::vector<Float_t> g4hit_energy;
+    }
 
-  //Store energies (not fractions in each layer 0-23 (BPS-FCAL2), 24 = INVALID, 25 = TOTAL
-  cell_energy.resize(MAX_LAYER+1);
-  hit_energy.resize(MAX_LAYER+1);
-  g4hit_energy.resize(MAX_LAYER+1);
+    //ok, cells should be empty, what about hits and g4hits?
+    //There could be G4hits/FCS hits for which we don't have a cell ->create a dummy empty cell with 0 energy, take the cell identifier from the hit
+    if (m_Debug > 1) std::cout << "ISF_HitAnalysis Check after cells: " << cells.size() << " " << g4hits.size() << " " << hits.size() << std::endl;
 
-  for(int i =0 ; i<MAX_LAYER+1; i++)
+    for (std::map<Long64_t, std::vector<FCS_hit> >::iterator it = hits.begin(); it != hits.end();)
     {
-      cell_energy[i]  = 0.0;
-      hit_energy[i]   = 0.0;
-      g4hit_energy[i] = 0.0;
-    }
+      one_matchedcell.clear();
+      one_matchedcell.cell.cell_identifier = it->first;
+      //std::cout <<"This hit didn't exist in cell: "<<it->first<<std::endl;
+      if (it->second.size())
+      {
+        one_matchedcell.cell.sampling = (it->second)[0].sampling;
+      }
+      else
+      {
+        one_matchedcell.cell.sampling = -1; //
+        //ok, but you really shouldn't be here
+        std::cout << "ERROR: You shouldn't really be here" << std::endl;
+      }
+      one_matchedcell.cell.energy = 0.;
+      one_matchedcell.cell.center_x = 0.0;
+      one_matchedcell.cell.center_y = 0.0;
+      one_matchedcell.cell.center_z = 0.0;
+      one_matchedcell.hit = it->second;
+      std::map<Long64_t, std::vector<FCS_g4hit> >::iterator it3 = g4hits.find(it->first);
+      if (it3 != g4hits.end())
+      {
+        one_matchedcell.g4hit = it3->second;
+        g4hits.erase(it3);
+      }
+      else
+      {
+        //no g4hit found for this cell
+        one_matchedcell.g4hit.clear(); //important!
+      }
+      hits.erase(it++);
+      oneeventcells->push_back(one_matchedcell);
 
-  //create branches in the output tree according to the settings vector
-  if(settings[0]==1 || ! settings.size())
-    {
-      //Write all FCS_matchedcells
-      tout->Branch("AllCells", &oneeventcells);
     }
-  if (settings.size()>=2 && settings[1]==1)
+
+    //ok, hits should be empty, what about g4hits?
+    if (m_Debug > 1 )std::cout << "ISF_HitAnalysis Check after hits: " << cells.size() << " " << g4hits.size() << " " << hits.size() << std::endl;
+    for (std::map<Long64_t, std::vector<FCS_g4hit> >::iterator it = g4hits.begin(); it != g4hits.end();)
     {
-      //write cells per layer
-      for (Int_t i=0; i<MAX_LAYER; i++)
-        {
-          TString branchname="Sampling_";
-          branchname+=i;
-          tout->Branch(branchname, &layercells[i]);
-        }
+      one_matchedcell.clear(); //maybe not so important
+      one_matchedcell.cell.cell_identifier = it->first;
+      if (it->second.size())
+      {
+        one_matchedcell.cell.sampling = (it->second)[0].sampling;
+      }
+      else
+      {
+        one_matchedcell.cell.sampling = -1; //
+        //not really
+        std::cout << "ERROR: You shouldn't really be here" << std::endl;
+      }
+      one_matchedcell.cell.energy = 0.;
+      one_matchedcell.cell.center_x = 0.0;
+      one_matchedcell.cell.center_y = 0.0;
+      one_matchedcell.cell.center_z = 0.0;
+      one_matchedcell.g4hit = it->second;
+      one_matchedcell.hit.clear(); //important!!
+      g4hits.erase(it++);
+      oneeventcells->push_back(one_matchedcell);
     }
 
-  if(settings.size()>=3 && settings[2]==1)
+    if (m_Debug > 1) std::cout << "ISF_HitAnalysis Check after g4hits: " << cells.size() << " " << g4hits.size() << " " << hits.size() << std::endl;
+    //Final size for this event
+    if (m_Debug > 1) std::cout << "ISF_HitAnalysis Matched cells size: " << oneeventcells->size() << std::endl;
+
+    //Can fill the output tree already here:
+    total_cell_e  = 0;
+    total_hit_e   = 0;
+    total_g4hit_e = 0;
+
+    for (int j = 0; j < MAX_LAYER - 1; j++)
     {
-      //write also energies per layer:
-      tout->Branch("cell_energy",&cell_energy);
-      tout->Branch("hit_energy",&hit_energy);
-      tout->Branch("g4hit_energy",&g4hit_energy);
-
-      //This is a duplicate of cell_energy[25]
-      tout->Branch("total_cell_energy",  &total_cell_e);
-      tout->Branch("total_hit_energy",   &total_hit_e);
-      tout->Branch("total_g4hit_energy", &total_g4hit_e);
+      layercells[j]->m_vector = oneeventcells->GetLayer(j);
     }
 
-  //Loop over all events
-  for(unsigned int event=0; event<m_all_cells.size(); event++)
-    {
+    //this is for invalid cells
+    layercells[MAX_LAYER - 1]->m_vector = oneeventcells->GetLayer(-1);
 
-      if (event % m_PrintOutFrequency == 0)
-        std::cout <<"Reprocessing: "<<event<<std::endl;
+    for (int i = 0; i < MAX_LAYER; i++)
+    {
+      cell_energy->at(i)  = 0.0; //zero for each event!
+      hit_energy->at(i)   = 0.0;
+      g4hit_energy->at(i) = 0.0;
 
-      total_cell_e  = 0.0;
-      total_hit_e   = 0.0;
-      total_g4hit_e = 0.0;
-      oneeventcells = m_all_cells[event]; //This gets cells for particular event i (m_all_cells holds now all cells from all events (huge!)
-      for (int j=0; j<MAX_LAYER-1; j++)
-        layercells[j].m_vector = oneeventcells.GetLayer(j);
+      for (unsigned int cellindex = 0; cellindex < layercells[i]->size(); cellindex++)
+      {
+        if (i != MAX_LAYER - 1)
+        {
+          cell_energy->at(i) += layercells[i]->m_vector.at(cellindex).cell.energy;
+          total_cell_e += layercells[i]->m_vector.at(cellindex).cell.energy;
+        }
+        else
+        {
+          //don't add the energy in the invalid layer to the total energy (if there is any (shouldn't)
+          cell_energy->at(i) += layercells[i]->m_vector.at(cellindex).cell.energy; //this should be here anyway
+        }
 
-      //this is for invalid cells
-      layercells[MAX_LAYER-1].m_vector = oneeventcells.GetLayer(-1);
+        //sum energy of all FCS detailed hits in this layer/cell
+        for (unsigned int j = 0; j < layercells[i]->m_vector.at(cellindex).hit.size(); j++)
+        {
+          if (i != MAX_LAYER - 1)
+          {
+            total_hit_e += layercells[i]->m_vector.at(cellindex).hit[j].hit_energy;
+            hit_energy->at(i) += layercells[i]->m_vector.at(cellindex).hit[j].hit_energy;
+          }
+          else
+          {
+            //again, don't add invalid layer energy to the sum
+            hit_energy->at(i) += layercells[i]->m_vector.at(cellindex).hit[j].hit_energy;
+          }
+        }
 
-      for (int i=0; i<MAX_LAYER; i++)
+        //sum energy of all G4 hits in this layer/cell
+        for (unsigned int j = 0; j < layercells[i]->m_vector.at(cellindex).g4hit.size(); j++)
         {
-          cell_energy[i]  = 0.0; //zero for each event!
-          hit_energy[i]   = 0.0;
-          g4hit_energy[i] = 0.0;
-          for (unsigned int cellindex = 0; cellindex < layercells[i].size(); cellindex++)
-            {
-              if (i!=MAX_LAYER-1)
-                {
-                  cell_energy[i]+=layercells[i][cellindex].cell.energy;
-                  total_cell_e+=layercells[i][cellindex].cell.energy;
-                }
-              else
-                {
-                  //don't add the energy in the invalid layer to the total energy (if there is any (shouldn't)
-                  cell_energy[i]+=layercells[i][cellindex].cell.energy; //this should be here anyway
-                }
-
-              //sum energy of all FCS detailed hits in this layer/cell
-              for (unsigned int j=0; j<layercells[i][cellindex].hit.size(); j++)
-                {
-                  if (i!=MAX_LAYER-1)
-                    {
-                      total_hit_e+=layercells[i][cellindex].hit[j].hit_energy;
-                      hit_energy[i]+=layercells[i][cellindex].hit[j].hit_energy;
-                    }
-                  else
-                    {
-                      //again, don't add invalid layer energy to the sum
-                      hit_energy[i]+=layercells[i][cellindex].hit[j].hit_energy;
-                    }
-                }
-
-              //sum energy of all G4 hits in this layer/cell
-              for (unsigned int j=0; j<layercells[i][cellindex].g4hit.size(); j++)
-                {
-                  if (i!=MAX_LAYER-1)
-                    {
-                      total_g4hit_e+=layercells[i][cellindex].g4hit[j].hit_energy;
-                      g4hit_energy[i]+=layercells[i][cellindex].g4hit[j].hit_energy;
-                    }
-                  else
-                    {
-                      //don't add invalied layer energy to the sum
-                      g4hit_energy[i]+=layercells[i][cellindex].g4hit[j].hit_energy;
-                    }
-                }
-            }
+          if (i != MAX_LAYER - 1)
+          {
+            total_g4hit_e += layercells[i]->m_vector.at(cellindex).g4hit[j].hit_energy;
+            g4hit_energy->at(i) += layercells[i]->m_vector.at(cellindex).g4hit[j].hit_energy;
+          }
+          else
+          {
+            //don't add invalied layer energy to the sum
+            g4hit_energy->at(i) += layercells[i]->m_vector.at(cellindex).g4hit[j].hit_energy;
+          }
         }
+      }
+    }
 
-      //Uncomment this to get energy cross check
-      //std::cout <<"Energy check: event: "<<event<<" cell: "<<total_cell_e<<" g4hits: "<<total_g4hit_e<<" hits: "<<total_hit_e<<std::endl;
-      //tree gets filled
-      tout->Fill();
+    cell_energy->at(MAX_LAYER)  = total_cell_e;
+    hit_energy->at(MAX_LAYER)   = total_hit_e;
+    g4hit_energy->at(MAX_LAYER) = total_g4hit_e;
 
-    }
+    //Uncomment this to get energy cross check
+    if (jentry % m_PrintOutFrequency == 0) std::cout << "Energy check: event: " << jentry << " cell: " << total_cell_e << " g4hits: " << total_g4hit_e << " hits: " << total_hit_e << std::endl;
+    //tree gets filled
+    m_OutputTree->Fill();
 
-  //and written out
-  tout->Write();
-  fout->Close();
+  }//loop over entries
 
-}
+  m_OutputTree->Write();
+  m_Output->Close
+};
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/CaloHitAna.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/CaloHitAna.h
index ccd08872cdc7c8f25e2e6d0a2fcafcf467997dda..302b44f9638d797575104743e1f6904eaf126c1f 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/CaloHitAna.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/CaloHitAna.h
@@ -21,394 +21,477 @@
 #include <FCS_Cell.h>
 
 #include <iostream>
-// Fixed size dimensions of array or collections stored in the TTree if any.
 
-class CaloHitAna {
+class CaloHitAna
+{
 public :
-   TTree          *fChain;   //!pointer to the analyzed TTree or TChain
-   Int_t           fCurrent; //!current Tree number in a TChain
-   TString         fFilename;
-
-   //output structure
-   TFile *m_Output;
-   TString m_OutputName;
-   TTree *m_OutputTree;
-   std::vector<Int_t> m_Settings;
-   Float_t m_TimingCut;
-   Int_t m_Debug;
-   Int_t m_PrintOutFrequency;
-   Int_t m_max_nentries;
-
-   static const int MAX_LAYER;
-
-   // Declaration of leaf types
-   std::vector<float>   *HitX;
-   std::vector<float>   *HitY;
-   std::vector<float>   *HitZ;
-   std::vector<float>   *HitE;
-   std::vector<float>   *HitT;
-   std::vector<Long64_t>  *HitIdentifier;
-   std::vector<Long64_t>  *HitCellIdentifier;
-   std::vector<bool>    *HitIsLArBarrel;
-   std::vector<bool>    *HitIsLArEndCap;
-   std::vector<bool>    *HitIsHEC;
-   std::vector<bool>    *HitIsFCAL;
-   std::vector<bool>    *HitIsTile;
-   std::vector<int>     *HitSampling;
-   std::vector<float>   *HitSamplingFraction;
-   std::vector<float>   *TruthE;
-   std::vector<float>   *TruthPx;
-   std::vector<float>   *TruthPy;
-   std::vector<float>   *TruthPz;
-   std::vector<int>     *TruthPDG;
-   std::vector<int>     *TruthBarcode;
-   std::vector<int>     *TruthVtxBarcode;
-   std::vector<Long64_t>  *CellIdentifier;
-   std::vector<float>   *CellE;
-   std::vector<int>     *CellSampling;
-   std::vector<float>   *G4HitE;
-   std::vector<float>   *G4HitT;
-   std::vector<Long64_t>  *G4HitIdentifier;
-   std::vector<Long64_t>  *G4HitCellIdentifier;
-   std::vector<float>   *G4HitSamplingFraction;
-   std::vector<int>     *G4HitSampling;
-   /*
-   std::vector<std::vector<double> > *TTC_back_eta;
-   std::vector<std::vector<double> > *TTC_back_phi;
-   std::vector<std::vector<double> > *TTC_back_r;
-   std::vector<std::vector<double> > *TTC_back_z;
-   std::vector<std::vector<double> > *TTC_entrance_eta;
-   std::vector<std::vector<double> > *TTC_entrance_phi;
-   std::vector<std::vector<double> > *TTC_entrance_r;
-   std::vector<std::vector<double> > *TTC_entrance_z;
-   std::vector<double>  *TTC_IDCaloBoundary_eta; 
-   std::vector<double>  *TTC_IDCaloBoundary_phi;
-   std::vector<double>  *TTC_IDCaloBoundary_r;
-   std::vector<double>  *TTC_IDCaloBoundary_z;
-   std::vector<double>  *TTC_Angle3D;
-   std::vector<double>  *TTC_AngleEta;
-   */
-   std::vector<std::vector<double> >* newTTC_entrance_eta;
-   std::vector<std::vector<double> >* newTTC_entrance_phi;
-   std::vector<std::vector<double> >* newTTC_entrance_r;
-   std::vector<std::vector<double> >* newTTC_entrance_z;
-   std::vector<std::vector<double> >* newTTC_back_eta;
-   std::vector<std::vector<double> >* newTTC_back_phi;
-   std::vector<std::vector<double> >* newTTC_back_r;
-   std::vector<std::vector<double> >* newTTC_back_z;
-   std::vector<double>* newTTC_IDCaloBoundary_eta;
-   std::vector<double>* newTTC_IDCaloBoundary_phi;
-   std::vector<double>* newTTC_IDCaloBoundary_r;
-   std::vector<double>* newTTC_IDCaloBoundary_z;
-   std::vector<double>* newTTC_Angle3D;
-   std::vector<double>* newTTC_AngleEta;
-   
-   //If this won't work, we will have to change it... (memory??)
-   std::vector<FCS_matchedcellvector> m_all_cells; //hm, make it a vector of (vector of FCS_matchedcell) and have it for all 1000 events at once in memory??
-
-   // List of branches
-   TBranch        *b_HitX;   //!
-   TBranch        *b_HitY;   //!
-   TBranch        *b_HitZ;   //!
-   TBranch        *b_HitE;   //!
-   TBranch        *b_HitT;   //!
-   TBranch        *b_HitIdentifier;   //!
-   TBranch        *b_HitCellIdentifier;   //!
-   TBranch        *b_HitIsLArBarrel;   //!
-   TBranch        *b_HitIsLArEndCap;   //!
-   TBranch        *b_HitIsHEC;   //!
-   TBranch        *b_HitIsFCAL;   //!
-   TBranch        *b_HitIsTile;   //!
-   TBranch        *b_HitSampling;   //!
-   TBranch        *b_HitSamplingFraction;   //!
-   TBranch        *b_TruthE;   //!
-   TBranch        *b_TruthPx;   //!
-   TBranch        *b_TruthPy;   //!
-   TBranch        *b_TruthPz;   //!
-   TBranch        *b_TruthPDG;   //!
-   TBranch        *b_TruthBarcode; //!
-   TBranch        *b_TruthVtxBarcode; //!
-   TBranch        *b_CellIdentifier;   //!
-   TBranch        *b_CellE;   //!
-   TBranch        *b_CellSampling;   //!
-   TBranch        *b_G4HitE;   //!
-   TBranch        *b_G4HitT;   //!
-   TBranch        *b_G4HitIdentifier;   //!
-   TBranch        *b_G4HitCellIdentifier;   //!
-   TBranch        *b_G4HitSamplingFraction;   //!
-   TBranch        *b_G4HitSampling;   //!
-   /*
-   TBranch        *b_TTC_back_eta;   //!
-   TBranch        *b_TTC_back_phi;   //!
-   TBranch        *b_TTC_back_r;   //!
-   TBranch        *b_TTC_back_z;   //!
-   TBranch        *b_TTC_entrance_eta;   //!
-   TBranch        *b_TTC_entrance_phi;   //!
-   TBranch        *b_TTC_entrance_r;   //!
-   TBranch        *b_TTC_entrance_z;   //!
-   TBranch        *b_TTC_IDCaloBoundary_eta;   //!
-   TBranch        *b_TTC_IDCaloBoundary_phi;   //!
-   TBranch        *b_TTC_IDCaloBoundary_r;   //!
-   TBranch        *b_TTC_IDCaloBoundary_z;   //!
-   TBranch        *b_TTC_Angle3D;   //!
-   TBranch        *b_TTC_AngleEta;   //!
-   */
-   
-   TBranch        *b_newTTC_back_eta;   //!
-   TBranch        *b_newTTC_back_phi;   //!
-   TBranch        *b_newTTC_back_r;   //!
-   TBranch        *b_newTTC_back_z;   //!
-   TBranch        *b_newTTC_entrance_eta;   //!
-   TBranch        *b_newTTC_entrance_phi;   //!
-   TBranch        *b_newTTC_entrance_r;   //!
-   TBranch        *b_newTTC_entrance_z;   //!
-   TBranch        *b_newTTC_IDCaloBoundary_eta;   //!
-   TBranch        *b_newTTC_IDCaloBoundary_phi;   //!
-   TBranch        *b_newTTC_IDCaloBoundary_r;   //!
-   TBranch        *b_newTTC_IDCaloBoundary_z;   //!
-   TBranch        *b_newTTC_Angle3D;   //!
-   TBranch        *b_newTTC_AngleEta;   //!
-   
-   
-   CaloHitAna(TString filename="ISF_HitAnalysispion_eta1.root", TString outputname="output1.root", std::vector<Int_t> settings=std::vector<Int_t>(), Float_t timingcut=999999., Int_t debug=0, TTree *tree=0);
-   virtual ~CaloHitAna();
-   virtual Int_t    Cut(Long64_t entry);
-   virtual Int_t    GetEntry(Long64_t entry);
-   virtual Long64_t LoadTree(Long64_t entry);
-   virtual void     Init(TTree *tree);
-   virtual void     Loop();
-   virtual void     Finish(std::vector<Int_t> settings, TString outputname="output_cells.root");
-   virtual Bool_t   Notify();
-   virtual void     Show(Long64_t entry = -1);
-   
-   void SetDebug(Int_t debug=0) {m_Debug=debug;};
-   void SetTimingCut(Int_t timingcut=999999) {m_TimingCut=timingcut;};
-   void SetDoAllCells(Int_t doit=0) {if(m_Settings.size()<1) m_Settings.resize(1,0);m_Settings[0]=doit;};
-   void SetDoLayers(Int_t doit=0) {if(m_Settings.size()<2) m_Settings.resize(2,0);m_Settings[1]=doit;};
-   void SetDoLayerSums(Int_t doit=0) {if(m_Settings.size()<3) m_Settings.resize(3,0);m_Settings[2]=doit;};
+  TTree          *fChain;   //!pointer to the analyzed TTree or TChain
+  Int_t           fCurrent; //!current Tree number in a TChain
+  TString         fFilename;
+
+  //output structure
+  TFile *m_Output;
+  TString m_OutputName;
+  TTree *m_OutputTree;
+  std::vector<Int_t> m_Settings;
+  Float_t m_TimingCut;
+  Int_t m_Debug;
+  Int_t m_PrintOutFrequency;
+  Int_t m_max_nentries;
+  bool m_do_g4_hits = false;
+
+  const static int MAX_LAYER = 25;
+
+  // Declaration of leaf types
+  std::vector<float>   *HitX;
+  std::vector<float>   *HitY;
+  std::vector<float>   *HitZ;
+  std::vector<float>   *HitE;
+  std::vector<float>   *HitT;
+  std::vector<Long64_t>  *HitIdentifier;
+  std::vector<Long64_t>  *HitCellIdentifier;
+  std::vector<bool>    *HitIsLArBarrel;
+  std::vector<bool>    *HitIsLArEndCap;
+  std::vector<bool>    *HitIsHEC;
+  std::vector<bool>    *HitIsFCAL;
+  std::vector<bool>    *HitIsTile;
+  std::vector<int>     *HitSampling;
+  std::vector<float>   *HitSamplingFraction;
+  std::vector<float>   *TruthE;
+  std::vector<float>   *TruthPx;
+  std::vector<float>   *TruthPy;
+  std::vector<float>   *TruthPz;
+  std::vector<int>     *TruthPDG;
+  std::vector<int>     *TruthBarcode;
+  std::vector<int>     *TruthVtxBarcode;
+  std::vector<Long64_t>  *CellIdentifier;
+  std::vector<float>   *CellE;
+  std::vector<int>     *CellSampling;
+  std::vector<float>   *G4HitE;
+  std::vector<float>   *G4HitT;
+  std::vector<Long64_t>  *G4HitIdentifier;
+  std::vector<Long64_t>  *G4HitCellIdentifier;
+  std::vector<float>   *G4HitSamplingFraction;
+  std::vector<int>     *G4HitSampling;
+
+  //input (from is hit analysis ntuple):
+  std::vector<std::vector<float> >* newTTC_entrance_eta;
+  std::vector<std::vector<float> >* newTTC_entrance_phi;
+  std::vector<std::vector<float> >* newTTC_entrance_r;
+  std::vector<std::vector<float> >* newTTC_entrance_z;
+  std::vector<std::vector<float> >* newTTC_back_eta;
+  std::vector<std::vector<float> >* newTTC_back_phi;
+  std::vector<std::vector<float> >* newTTC_back_r;
+  std::vector<std::vector<float> >* newTTC_back_z;
+  std::vector<float>* newTTC_IDCaloBoundary_eta;
+  std::vector<float>* newTTC_IDCaloBoundary_phi;
+  std::vector<float>* newTTC_IDCaloBoundary_r;
+  std::vector<float>* newTTC_IDCaloBoundary_z;
+  std::vector<float>* newTTC_Angle3D;
+  std::vector<float>* newTTC_AngleEta;
+
+  //output:
+  std::vector<std::vector<float> >* m_newTTC_entrance_eta = new std::vector<std::vector<float>>;
+  std::vector<std::vector<float> >* m_newTTC_entrance_phi = new std::vector<std::vector<float>>;
+  std::vector<std::vector<float> >* m_newTTC_entrance_r = new std::vector<std::vector<float>>;
+  std::vector<std::vector<float> >* m_newTTC_entrance_z = new std::vector<std::vector<float>>;
+  std::vector<std::vector<float> >* m_newTTC_back_eta = new std::vector<std::vector<float>>;
+  std::vector<std::vector<float> >* m_newTTC_back_phi = new std::vector<std::vector<float>>;
+  std::vector<std::vector<float> >* m_newTTC_back_r = new std::vector<std::vector<float>>;
+  std::vector<std::vector<float> >* m_newTTC_back_z = new std::vector<std::vector<float>>;
+  std::vector<float>* m_newTTC_IDCaloBoundary_eta = new std::vector<float>;
+  std::vector<float>* m_newTTC_IDCaloBoundary_phi = new std::vector<float>;
+  std::vector<float>* m_newTTC_IDCaloBoundary_r = new std::vector<float>;
+  std::vector<float>* m_newTTC_IDCaloBoundary_z = new std::vector<float>;
+  std::vector<float>* m_newTTC_Angle3D = new std::vector<float>;
+  std::vector<float>* m_newTTC_AngleEta = new std::vector<float>;
+
+  FCS_matchedcellvector* oneeventcells = new FCS_matchedcellvector; //these are all matched cells in a single event
+  FCS_matchedcellvector* layercells[MAX_LAYER]; //these are all matched cells in a given layer in a given event
+
+  std::vector<FCS_truth>* truthcollection = new std::vector<FCS_truth>;
+
+  Float_t total_cell_e = 0;
+  Float_t total_hit_e = 0;
+  Float_t total_g4hit_e = 0;
+
+  std::vector<Float_t>* cell_energy = new std::vector<Float_t>(MAX_LAYER + 1);
+  std::vector<Float_t>* hit_energy = new std::vector<Float_t>(MAX_LAYER + 1);
+  std::vector<Float_t>* g4hit_energy = new std::vector<Float_t>(MAX_LAYER + 1);
+
+  std::vector<Float_t>* new_truthE = new std::vector<Float_t>;
+  std::vector<Float_t>* new_truthPx = new std::vector<Float_t>;
+  std::vector<Float_t>* new_truthPy = new std::vector<Float_t>;
+  std::vector<Float_t>* new_truthPz = new std::vector<Float_t>;
+  std::vector<int>* new_truthBarcode = new std::vector<int>;
+  std::vector<int>* new_truthPDG = new std::vector<int>;
+  std::vector<int>* new_truthVtxBarcode = new std::vector<int>;
+
+  // List of branches
+  TBranch        *b_HitX;   //!
+  TBranch        *b_HitY;   //!
+  TBranch        *b_HitZ;   //!
+  TBranch        *b_HitE;   //!
+  TBranch        *b_HitT;   //!
+  TBranch        *b_HitIdentifier;   //!
+  TBranch        *b_HitCellIdentifier;   //!
+  TBranch        *b_HitIsLArBarrel;   //!
+  TBranch        *b_HitIsLArEndCap;   //!
+  TBranch        *b_HitIsHEC;   //!
+  TBranch        *b_HitIsFCAL;   //!
+  TBranch        *b_HitIsTile;   //!
+  TBranch        *b_HitSampling;   //!
+  TBranch        *b_HitSamplingFraction;   //!
+  TBranch        *b_TruthE;   //!
+  TBranch        *b_TruthPx;   //!
+  TBranch        *b_TruthPy;   //!
+  TBranch        *b_TruthPz;   //!
+  TBranch        *b_TruthPDG;   //!
+  TBranch        *b_TruthBarcode; //!
+  TBranch        *b_TruthVtxBarcode; //!
+  TBranch        *b_CellIdentifier;   //!
+  TBranch        *b_CellE;   //!
+  TBranch        *b_CellSampling;   //!
+  TBranch        *b_G4HitE;   //!
+  TBranch        *b_G4HitT;   //!
+  TBranch        *b_G4HitIdentifier;   //!
+  TBranch        *b_G4HitCellIdentifier;   //!
+  TBranch        *b_G4HitSamplingFraction;   //!
+  TBranch        *b_G4HitSampling;   //!
+  /*
+  TBranch        *b_TTC_back_eta;   //!
+  TBranch        *b_TTC_back_phi;   //!
+  TBranch        *b_TTC_back_r;   //!
+  TBranch        *b_TTC_back_z;   //!
+  TBranch        *b_TTC_entrance_eta;   //!
+  TBranch        *b_TTC_entrance_phi;   //!
+  TBranch        *b_TTC_entrance_r;   //!
+  TBranch        *b_TTC_entrance_z;   //!
+  TBranch        *b_TTC_IDCaloBoundary_eta;   //!
+  TBranch        *b_TTC_IDCaloBoundary_phi;   //!
+  TBranch        *b_TTC_IDCaloBoundary_r;   //!
+  TBranch        *b_TTC_IDCaloBoundary_z;   //!
+  TBranch        *b_TTC_Angle3D;   //!
+  TBranch        *b_TTC_AngleEta;   //!
+  */
+
+  TBranch        *b_newTTC_back_eta;   //!
+  TBranch        *b_newTTC_back_phi;   //!
+  TBranch        *b_newTTC_back_r;   //!
+  TBranch        *b_newTTC_back_z;   //!
+  TBranch        *b_newTTC_entrance_eta;   //!
+  TBranch        *b_newTTC_entrance_phi;   //!
+  TBranch        *b_newTTC_entrance_r;   //!
+  TBranch        *b_newTTC_entrance_z;   //!
+  TBranch        *b_newTTC_IDCaloBoundary_eta;   //!
+  TBranch        *b_newTTC_IDCaloBoundary_phi;   //!
+  TBranch        *b_newTTC_IDCaloBoundary_r;   //!
+  TBranch        *b_newTTC_IDCaloBoundary_z;   //!
+  TBranch        *b_newTTC_Angle3D;   //!
+  TBranch        *b_newTTC_AngleEta;   //!
+
+
+  CaloHitAna(TString filename = "ISF_HitAnalysispion_eta1.root", TString outputname = "output1.root", std::vector<Int_t> settings = std::vector<Int_t>(), Float_t timingcut = 999999., Int_t debug = 0, TTree *tree = 0);
+  virtual ~CaloHitAna();
+  virtual Int_t    Cut(Long64_t entry);
+  virtual Int_t    GetEntry(Long64_t entry);
+  virtual Long64_t LoadTree(Long64_t entry);
+  virtual void     Init(TTree *tree);
+  virtual void     InitOutTree();
+  virtual void     Loop();
+  virtual Bool_t   Notify();
+  virtual void     Show(Long64_t entry = -1);
+
+  void SetDebug(Int_t debug = 0) {m_Debug = debug;};
+  void SetTimingCut(Int_t timingcut = 999999) {m_TimingCut = timingcut;};
+  void SetDoAllCells(Int_t doit = 0) {if (m_Settings.size() < 1) m_Settings.resize(1, 0); m_Settings[0] = doit;};
+  void SetDoLayers(Int_t doit = 0) {if (m_Settings.size() < 2) m_Settings.resize(2, 0); m_Settings[1] = doit;};
+  void SetDoLayerSums(Int_t doit = 0) {if (m_Settings.size() < 3) m_Settings.resize(3, 0); m_Settings[2] = doit;};
 };
 
 #endif
 
 #ifdef CaloHitAna_cxx
-CaloHitAna::CaloHitAna(TString filename, TString outputname, std::vector<Int_t> settings, Float_t timingcut, Int_t debug, TTree *tree) : fChain(0) 
+CaloHitAna::CaloHitAna(TString filename, TString outputname, std::vector<Int_t> settings, Float_t timingcut, Int_t debug, TTree *tree) : fChain(0)
 {
-  fFilename= filename;
-// if parameter tree is not specified (or zero), connect the file
-// used to generate this class and read the Tree.
-   if (tree == 0) {
-     TFile *f = TFile::Open(filename,"READ");
-     TString dirname=filename;
-     dirname+=":/ISF_HitAnalysis";
-     TDirectory * dir = (TDirectory*)f->Get(dirname);
-     dir->GetObject("CaloHitAna",tree);
-
-   }
-   //tree->Print();
-   Init(tree);
-   m_Settings = settings;
-   m_Debug = debug;
-   m_TimingCut = timingcut;
-   m_OutputName = outputname;
-   m_PrintOutFrequency = 100;
-   m_max_nentries=-1;
-   //std::cout <<"Input: "<<fFilename<<" output: "<<m_OutputName<<" debug: "<<m_Debug<<" TC: "<<m_TimingCut<<std::endl;
+  fFilename = filename;
+  // if parameter tree is not specified (or zero), connect the file
+  // used to generate this class and read the Tree.
+  if (tree == 0) {
+    TFile *f = TFile::Open(filename, "READ");
+    TString dirname = filename;
+    dirname += ":/ISF_HitAnalysis";
+    TDirectory * dir = (TDirectory*)f->Get(dirname);
+    dir->GetObject("CaloHitAna", tree);
+  }
+  Init(tree);
+  m_Settings = settings;
+  m_Debug = debug;
+  m_TimingCut = timingcut;
+  m_OutputName = outputname;
+  m_PrintOutFrequency = 100;
+  m_max_nentries = -1;
+  m_Output = new TFile(m_OutputName, "RECREATE");
+  m_OutputTree = new TTree("FCS_ParametrizationInput", "Output_Matched_cell_Tree");
+  InitOutTree();
 }
 
 CaloHitAna::~CaloHitAna()
 {
-  //if (m_OutputTree) delete m_OutputTree;
-  //if (m_Output) delete m_Output;
-   if (!fChain) return;
-   delete fChain->GetCurrentFile();
+  // if (m_OutputTree) delete m_OutputTree;
+  // if (m_Output) delete m_Output;
+  if (!fChain) return;
+  delete fChain->GetCurrentFile();
 }
 
 Int_t CaloHitAna::GetEntry(Long64_t entry)
 {
-// Read contents of entry.
-   if (!fChain) return 0;
-   return fChain->GetEntry(entry);
+  // Read contents of entry.
+  if (!fChain) return 0;
+  return fChain->GetEntry(entry);
 }
 Long64_t CaloHitAna::LoadTree(Long64_t entry)
 {
-// Set the environment to read one entry
-   if (!fChain) return -5;
-   Long64_t centry = fChain->LoadTree(entry);
-   if (centry < 0) return centry;
-   if (fChain->GetTreeNumber() != fCurrent) {
-      fCurrent = fChain->GetTreeNumber();
-      Notify();
-   }
-   return centry;
+  // Set the environment to read one entry
+  if (!fChain) return -5;
+  Long64_t centry = fChain->LoadTree(entry);
+  if (centry < 0) return centry;
+  if (fChain->GetTreeNumber() != fCurrent) {
+    fCurrent = fChain->GetTreeNumber();
+    Notify();
+  }
+  return centry;
+}
+
+void CaloHitAna::InitOutTree()
+{
+  m_OutputTree->Branch("TruthE", &new_truthE);
+  m_OutputTree->Branch("TruthPx", &new_truthPx);
+  m_OutputTree->Branch("TruthPy", &new_truthPy);
+  m_OutputTree->Branch("TruthPz", &new_truthPz);
+  m_OutputTree->Branch("TruthPDG", &new_truthPDG);
+  m_OutputTree->Branch("TruthBarcode", &new_truthBarcode);
+  m_OutputTree->Branch("TruthVtxBarcode", &new_truthVtxBarcode); //this is duplicate of what is in the truth collection, will be good to remove/hide at some point
+
+  m_OutputTree->Branch("newTTC_back_eta", &m_newTTC_back_eta);
+  m_OutputTree->Branch("newTTC_back_phi", &m_newTTC_back_phi);
+  m_OutputTree->Branch("newTTC_back_r",  &m_newTTC_back_r);
+  m_OutputTree->Branch("newTTC_back_z",  &m_newTTC_back_z);
+  m_OutputTree->Branch("newTTC_entrance_eta", &m_newTTC_entrance_eta);
+  m_OutputTree->Branch("newTTC_entrance_phi", &m_newTTC_entrance_phi);
+  m_OutputTree->Branch("newTTC_entrance_r",  &m_newTTC_entrance_r);
+  m_OutputTree->Branch("newTTC_entrance_z",  &m_newTTC_entrance_z);
+  m_OutputTree->Branch("newTTC_IDCaloBoundary_eta", &m_newTTC_IDCaloBoundary_eta);
+  m_OutputTree->Branch("newTTC_IDCaloBoundary_phi", &m_newTTC_IDCaloBoundary_phi);
+  m_OutputTree->Branch("newTTC_IDCaloBoundary_r", &m_newTTC_IDCaloBoundary_r);
+  m_OutputTree->Branch("newTTC_IDCaloBoundary_z", &m_newTTC_IDCaloBoundary_z);
+  m_OutputTree->Branch("newTTC_Angle3D", &m_newTTC_Angle3D);
+  m_OutputTree->Branch("newTTC_AngleEta", &m_newTTC_AngleEta);
+
+  //create branches in the output tree according to the settings vector
+  if (! m_Settings.size() || m_Settings[0] == 1)
+  {
+    //Write all FCS_matchedcells
+    m_OutputTree->Branch("AllCells", &oneeventcells);
+  }
+  if (m_Settings.size() >= 2 && m_Settings[1] == 1)
+  {
+    //write cells per layer
+    for (Int_t i = 0; i < MAX_LAYER; i++)
+    {
+      TString branchname = "Sampling_";
+      branchname += i;
+      // std::cout<< "fail?" << std::endl;
+      layercells[i] = new FCS_matchedcellvector;
+      m_OutputTree->Branch(branchname, &layercells[i]);
+    }
+  }
+  if (m_Settings.size() >= 3 && m_Settings[2] == 1)
+  {
+    //write also energies per layer:
+    m_OutputTree->Branch("cell_energy", &cell_energy);
+    m_OutputTree->Branch("hit_energy",  &hit_energy);
+    m_OutputTree->Branch("g4hit_energy", &g4hit_energy);
+
+    //This is a duplicate of cell_energy[25]
+    m_OutputTree->Branch("total_cell_energy", &total_cell_e);
+    m_OutputTree->Branch("total_hit_energy",  &total_hit_e);
+    m_OutputTree->Branch("total_g4hit_energy", &total_g4hit_e);
+  }
+  // Enable/Disable recording of g4hits
+  if (m_Settings.size() >= 4 && m_Settings[3] == 1) {
+    std::cout << "do g4hits!" << std::endl;
+    m_do_g4_hits = true;
+  }
 }
 
 void CaloHitAna::Init(TTree *tree)
 {
-   // The Init() function is called when the selector needs to initialize
-   // a new tree or chain. Typically here the branch addresses and branch
-   // pointers of the tree will be set.
-   // It is normally not necessary to make changes to the generated
-   // code, but the routine can be extended by the user if needed.
-   // Init() will be called many times when running on PROOF
-   // (once per file to be processed).
-
-   // Set object pointer
-   HitX = 0;
-   HitY = 0;
-   HitZ = 0;
-   HitE = 0;
-   HitT = 0;
-   HitIdentifier = 0;
-   HitCellIdentifier = 0;
-   HitIsLArBarrel = 0;
-   HitIsLArEndCap = 0;
-   HitIsHEC = 0;
-   HitIsFCAL = 0;
-   HitIsTile = 0;
-   HitSampling = 0;
-   HitSamplingFraction = 0;
-   TruthE = 0;
-   TruthPx = 0;
-   TruthPy = 0;
-   TruthPz = 0;
-   TruthPDG = 0;
-   TruthBarcode = 0;
-   TruthVtxBarcode = 0;
-   CellIdentifier = 0;
-   CellE = 0;
-   CellSampling = 0;
-   G4HitE = 0;
-   G4HitT = 0;
-   G4HitIdentifier = 0;
-   G4HitCellIdentifier = 0;
-   G4HitSamplingFraction = 0;
-   G4HitSampling = 0;
-   /*
-   TTC_back_eta = 0;
-   TTC_back_phi = 0;
-   TTC_back_r = 0;
-   TTC_back_z = 0;
-   TTC_entrance_eta = 0;
-   TTC_entrance_phi = 0;
-   TTC_entrance_r = 0;
-   TTC_entrance_z = 0;
-   TTC_IDCaloBoundary_eta = 0;
-   TTC_IDCaloBoundary_phi = 0;
-   TTC_IDCaloBoundary_r = 0;
-   TTC_IDCaloBoundary_z = 0;
-   TTC_Angle3D = 0;
-   TTC_AngleEta = 0;
-   */
-   newTTC_back_eta = 0;
-   newTTC_back_phi = 0;
-   newTTC_back_r = 0;
-   newTTC_back_z = 0;
-   newTTC_entrance_eta = 0;
-   newTTC_entrance_phi = 0;
-   newTTC_entrance_r = 0;
-   newTTC_entrance_z = 0;
-   newTTC_IDCaloBoundary_eta = 0;
-   newTTC_IDCaloBoundary_phi = 0;
-   newTTC_IDCaloBoundary_r = 0;
-   newTTC_IDCaloBoundary_z = 0;
-   newTTC_Angle3D = 0;
-   newTTC_AngleEta = 0;
-   
-   
-   // Set branch addresses and branch pointers
-   if (!tree) return;
-   fChain = tree;
-   fCurrent = -1;
-   fChain->SetMakeClass(1);
-
-   fChain->SetBranchAddress("HitX", &HitX, &b_HitX);
-   fChain->SetBranchAddress("HitY", &HitY, &b_HitY);
-   fChain->SetBranchAddress("HitZ", &HitZ, &b_HitZ);
-   fChain->SetBranchAddress("HitE", &HitE, &b_HitE);
-   fChain->SetBranchAddress("HitT", &HitT, &b_HitT);
-   fChain->SetBranchAddress("HitIdentifier", &HitIdentifier, &b_HitIdentifier);
-   fChain->SetBranchAddress("HitCellIdentifier", &HitCellIdentifier, &b_HitCellIdentifier);
-   fChain->SetBranchAddress("HitIsLArBarrel", &HitIsLArBarrel, &b_HitIsLArBarrel);
-   fChain->SetBranchAddress("HitIsLArEndCap", &HitIsLArEndCap, &b_HitIsLArEndCap);
-   fChain->SetBranchAddress("HitIsHEC", &HitIsHEC, &b_HitIsHEC);
-   fChain->SetBranchAddress("HitIsFCAL", &HitIsFCAL, &b_HitIsFCAL);
-   fChain->SetBranchAddress("HitIsTile", &HitIsTile, &b_HitIsTile);
-   fChain->SetBranchAddress("HitSampling", &HitSampling, &b_HitSampling);
-   fChain->SetBranchAddress("HitSamplingFraction", &HitSamplingFraction, &b_HitSamplingFraction);
-   fChain->SetBranchAddress("TruthE", &TruthE, &b_TruthE);
-   fChain->SetBranchAddress("TruthPx", &TruthPx, &b_TruthPx);
-   fChain->SetBranchAddress("TruthPy", &TruthPy, &b_TruthPy);
-   fChain->SetBranchAddress("TruthPz", &TruthPz, &b_TruthPz);
-   fChain->SetBranchAddress("TruthPDG", &TruthPDG, &b_TruthPDG);
-   fChain->SetBranchAddress("TruthBarcode", &TruthBarcode, &b_TruthBarcode);
-   fChain->SetBranchAddress("TruthVtxBarcode", &TruthVtxBarcode, &b_TruthVtxBarcode);
-   fChain->SetBranchAddress("CellIdentifier", &CellIdentifier, &b_CellIdentifier);
-   fChain->SetBranchAddress("CellE", &CellE, &b_CellE);
-   fChain->SetBranchAddress("CellSampling", &CellSampling, &b_CellSampling);
-   fChain->SetBranchAddress("G4HitE", &G4HitE, &b_G4HitE);
-   fChain->SetBranchAddress("G4HitT", &G4HitT, &b_G4HitT);
-   fChain->SetBranchAddress("G4HitIdentifier", &G4HitIdentifier, &b_G4HitIdentifier);
-   fChain->SetBranchAddress("G4HitCellIdentifier", &G4HitCellIdentifier, &b_G4HitCellIdentifier);
-   fChain->SetBranchAddress("G4HitSamplingFraction", &G4HitSamplingFraction, &b_G4HitSamplingFraction);
-   fChain->SetBranchAddress("G4HitSampling", &G4HitSampling, &b_G4HitSampling);
-   /*
-   fChain->SetBranchAddress("TTC_back_eta", &TTC_back_eta, &b_TTC_back_eta);
-   fChain->SetBranchAddress("TTC_back_phi", &TTC_back_phi, &b_TTC_back_phi);
-   fChain->SetBranchAddress("TTC_back_r", &TTC_back_r, &b_TTC_back_r);
-   fChain->SetBranchAddress("TTC_back_z", &TTC_back_z, &b_TTC_back_z);
-   fChain->SetBranchAddress("TTC_entrance_eta", &TTC_entrance_eta, &b_TTC_entrance_eta);
-   fChain->SetBranchAddress("TTC_entrance_phi", &TTC_entrance_phi, &b_TTC_entrance_phi);
-   fChain->SetBranchAddress("TTC_entrance_r", &TTC_entrance_r, &b_TTC_entrance_r);
-   fChain->SetBranchAddress("TTC_entrance_z", &TTC_entrance_z, &b_TTC_entrance_z);
-   fChain->SetBranchAddress("TTC_IDCaloBoundary_eta", &TTC_IDCaloBoundary_eta, &b_TTC_IDCaloBoundary_eta);
-   fChain->SetBranchAddress("TTC_IDCaloBoundary_phi", &TTC_IDCaloBoundary_phi, &b_TTC_IDCaloBoundary_phi);
-   fChain->SetBranchAddress("TTC_IDCaloBoundary_r", &TTC_IDCaloBoundary_r, &b_TTC_IDCaloBoundary_r);
-   fChain->SetBranchAddress("TTC_IDCaloBoundary_z", &TTC_IDCaloBoundary_z, &b_TTC_IDCaloBoundary_z);
-   fChain->SetBranchAddress("TTC_Angle3D",     &TTC_Angle3D, &b_TTC_Angle3D);
-   fChain->SetBranchAddress("TTC_AngleEta",    &TTC_AngleEta, &b_TTC_AngleEta);
-   */
-   fChain->SetBranchAddress("newTTC_back_eta", &newTTC_back_eta, &b_newTTC_back_eta);
-   fChain->SetBranchAddress("newTTC_back_phi", &newTTC_back_phi, &b_newTTC_back_phi);
-   fChain->SetBranchAddress("newTTC_back_r",   &newTTC_back_r, &b_newTTC_back_r);
-   fChain->SetBranchAddress("newTTC_back_z",   &newTTC_back_z, &b_newTTC_back_z);
-   fChain->SetBranchAddress("newTTC_entrance_eta", &newTTC_entrance_eta, &b_newTTC_entrance_eta);
-   fChain->SetBranchAddress("newTTC_entrance_phi", &newTTC_entrance_phi, &b_newTTC_entrance_phi);
-   fChain->SetBranchAddress("newTTC_entrance_r",   &newTTC_entrance_r, &b_newTTC_entrance_r);
-   fChain->SetBranchAddress("newTTC_entrance_z",   &newTTC_entrance_z, &b_newTTC_entrance_z);
-   fChain->SetBranchAddress("newTTC_IDCaloBoundary_eta", &newTTC_IDCaloBoundary_eta, &b_newTTC_IDCaloBoundary_eta);
-   fChain->SetBranchAddress("newTTC_IDCaloBoundary_phi", &newTTC_IDCaloBoundary_phi, &b_newTTC_IDCaloBoundary_phi);
-   fChain->SetBranchAddress("newTTC_IDCaloBoundary_r",   &newTTC_IDCaloBoundary_r, &b_newTTC_IDCaloBoundary_r);
-   fChain->SetBranchAddress("newTTC_IDCaloBoundary_z",   &newTTC_IDCaloBoundary_z, &b_newTTC_IDCaloBoundary_z);
-   fChain->SetBranchAddress("newTTC_Angle3D",  &newTTC_Angle3D, &b_newTTC_Angle3D);
-   fChain->SetBranchAddress("newTTC_AngleEta", &newTTC_AngleEta, &b_newTTC_AngleEta);
-   
-   Notify();
+  // The Init() function is called when the selector needs to initialize
+  // a new tree or chain. Typically here the branch addresses and branch
+  // pointers of the tree will be set.
+  // It is normally not necessary to make changes to the generated
+  // code, but the routine can be extended by the user if needed.
+  // Init() will be called many times when running on PROOF
+  // (once per file to be processed).
+
+  // Set object pointer
+  HitX = 0;
+  HitY = 0;
+  HitZ = 0;
+  HitE = 0;
+  HitT = 0;
+  HitIdentifier = 0;
+  HitCellIdentifier = 0;
+  HitIsLArBarrel = 0;
+  HitIsLArEndCap = 0;
+  HitIsHEC = 0;
+  HitIsFCAL = 0;
+  HitIsTile = 0;
+  HitSampling = 0;
+  HitSamplingFraction = 0;
+  TruthE = 0;
+  TruthPx = 0;
+  TruthPy = 0;
+  TruthPz = 0;
+  TruthPDG = 0;
+  TruthBarcode = 0;
+  TruthVtxBarcode = 0;
+  CellIdentifier = 0;
+  CellE = 0;
+  CellSampling = 0;
+  G4HitE = 0;
+  G4HitT = 0;
+  G4HitIdentifier = 0;
+  G4HitCellIdentifier = 0;
+  G4HitSamplingFraction = 0;
+  G4HitSampling = 0;
+  /*
+  TTC_back_eta = 0;
+  TTC_back_phi = 0;
+  TTC_back_r = 0;
+  TTC_back_z = 0;
+  TTC_entrance_eta = 0;
+  TTC_entrance_phi = 0;
+  TTC_entrance_r = 0;
+  TTC_entrance_z = 0;
+  TTC_IDCaloBoundary_eta = 0;
+  TTC_IDCaloBoundary_phi = 0;
+  TTC_IDCaloBoundary_r = 0;
+  TTC_IDCaloBoundary_z = 0;
+  TTC_Angle3D = 0;
+  TTC_AngleEta = 0;
+  */
+  newTTC_back_eta = 0;
+  newTTC_back_phi = 0;
+  newTTC_back_r = 0;
+  newTTC_back_z = 0;
+  newTTC_entrance_eta = 0;
+  newTTC_entrance_phi = 0;
+  newTTC_entrance_r = 0;
+  newTTC_entrance_z = 0;
+  newTTC_IDCaloBoundary_eta = 0;
+  newTTC_IDCaloBoundary_phi = 0;
+  newTTC_IDCaloBoundary_r = 0;
+  newTTC_IDCaloBoundary_z = 0;
+  newTTC_Angle3D = 0;
+  newTTC_AngleEta = 0;
+
+
+  // Set branch addresses and branch pointers
+  if (!tree) return;
+  fChain = tree;
+  fCurrent = -1;
+  fChain->SetMakeClass(1);
+
+  fChain->SetBranchAddress("HitX", &HitX, &b_HitX);
+  fChain->SetBranchAddress("HitY", &HitY, &b_HitY);
+  fChain->SetBranchAddress("HitZ", &HitZ, &b_HitZ);
+  fChain->SetBranchAddress("HitE", &HitE, &b_HitE);
+  fChain->SetBranchAddress("HitT", &HitT, &b_HitT);
+  fChain->SetBranchAddress("HitIdentifier", &HitIdentifier, &b_HitIdentifier);
+  fChain->SetBranchAddress("HitCellIdentifier", &HitCellIdentifier, &b_HitCellIdentifier);
+  fChain->SetBranchAddress("HitIsLArBarrel", &HitIsLArBarrel, &b_HitIsLArBarrel);
+  fChain->SetBranchAddress("HitIsLArEndCap", &HitIsLArEndCap, &b_HitIsLArEndCap);
+  fChain->SetBranchAddress("HitIsHEC", &HitIsHEC, &b_HitIsHEC);
+  fChain->SetBranchAddress("HitIsFCAL", &HitIsFCAL, &b_HitIsFCAL);
+  fChain->SetBranchAddress("HitIsTile", &HitIsTile, &b_HitIsTile);
+  fChain->SetBranchAddress("HitSampling", &HitSampling, &b_HitSampling);
+  fChain->SetBranchAddress("HitSamplingFraction", &HitSamplingFraction, &b_HitSamplingFraction);
+  fChain->SetBranchAddress("TruthE", &TruthE, &b_TruthE);
+  fChain->SetBranchAddress("TruthPx", &TruthPx, &b_TruthPx);
+  fChain->SetBranchAddress("TruthPy", &TruthPy, &b_TruthPy);
+  fChain->SetBranchAddress("TruthPz", &TruthPz, &b_TruthPz);
+  fChain->SetBranchAddress("TruthPDG", &TruthPDG, &b_TruthPDG);
+  fChain->SetBranchAddress("TruthBarcode", &TruthBarcode, &b_TruthBarcode);
+  fChain->SetBranchAddress("TruthVtxBarcode", &TruthVtxBarcode, &b_TruthVtxBarcode);
+  fChain->SetBranchAddress("CellIdentifier", &CellIdentifier, &b_CellIdentifier);
+  fChain->SetBranchAddress("CellE", &CellE, &b_CellE);
+  fChain->SetBranchAddress("CellSampling", &CellSampling, &b_CellSampling);
+  fChain->SetBranchAddress("G4HitE", &G4HitE, &b_G4HitE);
+  fChain->SetBranchAddress("G4HitT", &G4HitT, &b_G4HitT);
+  fChain->SetBranchAddress("G4HitIdentifier", &G4HitIdentifier, &b_G4HitIdentifier);
+  fChain->SetBranchAddress("G4HitCellIdentifier", &G4HitCellIdentifier, &b_G4HitCellIdentifier);
+  fChain->SetBranchAddress("G4HitSamplingFraction", &G4HitSamplingFraction, &b_G4HitSamplingFraction);
+  fChain->SetBranchAddress("G4HitSampling", &G4HitSampling, &b_G4HitSampling);
+  /*
+  fChain->SetBranchAddress("TTC_back_eta", &TTC_back_eta, &b_TTC_back_eta);
+  fChain->SetBranchAddress("TTC_back_phi", &TTC_back_phi, &b_TTC_back_phi);
+  fChain->SetBranchAddress("TTC_back_r", &TTC_back_r, &b_TTC_back_r);
+  fChain->SetBranchAddress("TTC_back_z", &TTC_back_z, &b_TTC_back_z);
+  fChain->SetBranchAddress("TTC_entrance_eta", &TTC_entrance_eta, &b_TTC_entrance_eta);
+  fChain->SetBranchAddress("TTC_entrance_phi", &TTC_entrance_phi, &b_TTC_entrance_phi);
+  fChain->SetBranchAddress("TTC_entrance_r", &TTC_entrance_r, &b_TTC_entrance_r);
+  fChain->SetBranchAddress("TTC_entrance_z", &TTC_entrance_z, &b_TTC_entrance_z);
+  fChain->SetBranchAddress("TTC_IDCaloBoundary_eta", &TTC_IDCaloBoundary_eta, &b_TTC_IDCaloBoundary_eta);
+  fChain->SetBranchAddress("TTC_IDCaloBoundary_phi", &TTC_IDCaloBoundary_phi, &b_TTC_IDCaloBoundary_phi);
+  fChain->SetBranchAddress("TTC_IDCaloBoundary_r", &TTC_IDCaloBoundary_r, &b_TTC_IDCaloBoundary_r);
+  fChain->SetBranchAddress("TTC_IDCaloBoundary_z", &TTC_IDCaloBoundary_z, &b_TTC_IDCaloBoundary_z);
+  fChain->SetBranchAddress("TTC_Angle3D",     &TTC_Angle3D, &b_TTC_Angle3D);
+  fChain->SetBranchAddress("TTC_AngleEta",    &TTC_AngleEta, &b_TTC_AngleEta);
+  */
+  fChain->SetBranchAddress("newTTC_back_eta", &newTTC_back_eta, &b_newTTC_back_eta);
+  fChain->SetBranchAddress("newTTC_back_phi", &newTTC_back_phi, &b_newTTC_back_phi);
+  fChain->SetBranchAddress("newTTC_back_r",   &newTTC_back_r, &b_newTTC_back_r);
+  fChain->SetBranchAddress("newTTC_back_z",   &newTTC_back_z, &b_newTTC_back_z);
+  fChain->SetBranchAddress("newTTC_entrance_eta", &newTTC_entrance_eta, &b_newTTC_entrance_eta);
+  fChain->SetBranchAddress("newTTC_entrance_phi", &newTTC_entrance_phi, &b_newTTC_entrance_phi);
+  fChain->SetBranchAddress("newTTC_entrance_r",   &newTTC_entrance_r, &b_newTTC_entrance_r);
+  fChain->SetBranchAddress("newTTC_entrance_z",   &newTTC_entrance_z, &b_newTTC_entrance_z);
+  fChain->SetBranchAddress("newTTC_IDCaloBoundary_eta", &newTTC_IDCaloBoundary_eta, &b_newTTC_IDCaloBoundary_eta);
+  fChain->SetBranchAddress("newTTC_IDCaloBoundary_phi", &newTTC_IDCaloBoundary_phi, &b_newTTC_IDCaloBoundary_phi);
+  fChain->SetBranchAddress("newTTC_IDCaloBoundary_r",   &newTTC_IDCaloBoundary_r, &b_newTTC_IDCaloBoundary_r);
+  fChain->SetBranchAddress("newTTC_IDCaloBoundary_z",   &newTTC_IDCaloBoundary_z, &b_newTTC_IDCaloBoundary_z);
+  fChain->SetBranchAddress("newTTC_Angle3D",  &newTTC_Angle3D, &b_newTTC_Angle3D);
+  fChain->SetBranchAddress("newTTC_AngleEta", &newTTC_AngleEta, &b_newTTC_AngleEta);
+
+  Notify();
 }
 
 Bool_t CaloHitAna::Notify()
 {
-   // The Notify() function is called when a new file is opened. This
-   // can be either for a new TTree in a TChain or when when a new TTree
-   // is started when using PROOF. It is normally not necessary to make changes
-   // to the generated code, but the routine can be extended by the
-   // user if needed. The return value is currently not used.
+  // The Notify() function is called when a new file is opened. This
+  // can be either for a new TTree in a TChain or when when a new TTree
+  // is started when using PROOF. It is normally not necessary to make changes
+  // to the generated code, but the routine can be extended by the
+  // user if needed. The return value is currently not used.
 
-   return kTRUE;
+  return kTRUE;
 }
 
 void CaloHitAna::Show(Long64_t entry)
 {
-// Print contents of entry.
-// If entry is not specified, print current entry
-   if (!fChain) return;
-   fChain->Show(entry);
+  // Print contents of entry.
+  // If entry is not specified, print current entry
+  if (!fChain) return;
+  fChain->Show(entry);
 }
 Int_t CaloHitAna::Cut(Long64_t entry)
 {
-// This function may be called from Loop.
-// returns  1 if entry is accepted.
-// returns -1 otherwise.
-  std::cout <<entry<<std::endl;
-   return 1;
+  // This function may be called from Loop.
+  // returns  1 if entry is accepted.
+  // returns -1 otherwise.
+  std::cout << entry << std::endl;
+  return 1;
 }
 #endif // #ifdef CaloHitAna_cxx
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/Linkdef.h b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/Linkdef.h
index db9030ead3d9c33e2e94d6a7277a552a9e8140cf..73dcb053904cc3e6d3e7d77c3119c6a95d55f1df 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/Linkdef.h
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/Linkdef.h
@@ -14,4 +14,5 @@
 #pragma link C++ class std::vector<Float_t>+;
 #pragma link C++ struct FCS_truth+;
 #pragma link C++ struct std::vector<FCS_truth>+;
+#pragma link C++ class std::vector<std::vector<float> >+;
 #endif
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/epara_validation_plots.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/epara_validation_plots.C
new file mode 100644
index 0000000000000000000000000000000000000000..4ab4ff5439153bd5c159d583133310105027f4e5
--- /dev/null
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/epara_validation_plots.C
@@ -0,0 +1,303 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+void plots_public();
+void epara_validation_plots();
+TH1* get_cumul(TH1* hist);
+void ATLAS_LABEL(double x,double y);
+
+void epara_validation_plots()
+{
+ 
+  string samplename="photons";
+  
+  //string dirname ="/afs/cern.ch/user/s/schaarsc/public/fastcalo/epara_storage";
+  string dirname ="../../../../../../epara_storage";
+  
+  //get layers:
+  TFile* file1=TFile::Open(Form("%s/%s/firstPCA.root",dirname.c_str(),samplename.c_str()));
+  TH2I* h_layer=(TH2I*)file1->Get("h_layer");
+  int pcabins=h_layer->GetNbinsX();
+  vector<int> layerNr;
+  for(int i=1;i<=h_layer->GetNbinsY();i++)
+  {
+ 	 if(h_layer->GetBinContent(1,i)==1) 
+ 	  layerNr.push_back(h_layer->GetYaxis()->GetBinCenter(i));
+  }
+  vector<string> layer;
+  for(unsigned int l=0;l<layerNr.size();l++)
+   layer.push_back(Form("layer%i",layerNr[l]));
+  layer.push_back("totalE");
+  
+  vector<string> name;
+  vector<string> title;
+  for(unsigned int l=0;l<layer.size()-1;l++)
+  {
+   name.push_back(layer[l].c_str());
+   title.push_back(Form("E fraction in Layer %i",layerNr[l]));
+  }
+  name.push_back("totalE");  title.push_back("total E [MeV]");
+  
+  TFile* file=TFile::Open(Form("eparavalidation/%s/validation.root",samplename.c_str()));
+
+  int use_autozoom=1;
+
+  for(unsigned int l=0;l<layer.size();l++)
+  {
+   int one_canvas=0;
+   double min,max,rmin,rmax;
+   TH1D* h_output_lin;
+   TH1D* h_input_lin;
+   if(use_autozoom)
+   {
+   	h_output_lin=(TH1D*)file->Get(Form("h_output_zoom_%s",layer[l].c_str())); h_output_lin->SetName("h_output_lin");
+   	h_input_lin =(TH1D*)file->Get(Form("h_input_zoom_%s",layer[l].c_str()));  h_input_lin->SetName("h_input_lin");
+   }
+   else
+   {
+   	h_output_lin=(TH1D*)file->Get(Form("h_output_%s",layer[l].c_str())); h_output_lin->SetName("h_output_lin");
+   	h_input_lin =(TH1D*)file->Get(Form("h_input_%s",layer[l].c_str()));  h_input_lin->SetName("h_input_lin");
+   }
+   
+   //linear:
+   double kolmo=h_input_lin->KolmogorovTest(h_output_lin);
+   double chi2=h_input_lin->Chi2Test(h_output_lin,"UW");
+   h_input_lin->SetMarkerSize(1.0);
+   h_input_lin->SetLineWidth(1);
+   h_output_lin->SetLineWidth(1);
+   h_output_lin->SetFillColor(7);
+   h_output_lin->Scale(h_input_lin->Integral()/h_output_lin->Integral());
+   h_input_lin->GetXaxis()->SetNdivisions(504,kFALSE);
+   double ymax=h_input_lin->GetBinContent(h_input_lin->GetMaximumBin());
+   h_input_lin->GetYaxis()->SetRangeUser(0,ymax*1.4);
+   h_input_lin->GetYaxis()->SetTitle("Linear");
+   h_input_lin->GetXaxis()->SetTitle(title[l].c_str());
+   
+   //log:
+   TH1D* h_output_log=(TH1D*)h_output_lin->Clone("h_output_log");
+   TH1D* h_input_log=(TH1D*)h_input_lin->Clone("h_input_log");
+   h_input_log->GetYaxis()->SetRangeUser(0.1,ymax*5.0);
+   h_input_log->GetYaxis()->SetTitle("Log");
+      
+   //cumulative:
+   TH1D* h_output_cumul=(TH1D*)get_cumul(h_output_lin); h_output_cumul->SetName("h_output_cumul");
+   TH1D* h_input_cumul =(TH1D*)get_cumul(h_input_lin);  h_input_cumul->SetName("h_input_cumul");
+   double sf=h_input_cumul->GetBinContent(h_input_cumul->GetNbinsX());
+   h_output_cumul->Scale(1.0/sf);
+   h_input_cumul->Scale(1.0/sf);
+   h_input_cumul->GetYaxis()->SetRangeUser(0,1.2);
+   h_input_cumul->GetYaxis()->SetTitle("Cumulative");
+   
+   if(one_canvas)
+   {
+    TCanvas* can=new TCanvas("can","can",0,0,1600,600);
+    can->Divide(3,1);
+    can->cd(1);
+    h_input_lin->Draw("e");
+    h_output_lin->Draw("histsame");
+    h_input_lin->Draw("esame");
+    
+    TLegend* leg=new TLegend(0.65,0.82,0.99,0.93);
+    leg->SetBorderSize(0);
+    leg->SetFillStyle(0);
+    leg->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
+    leg->AddEntry(h_output_lin,"Parametrisation","f");
+    leg->AddEntry(h_input_lin,"G4 Input","lpe");
+    leg->Draw();
+    
+    can->cd(2);
+    h_input_log->Draw("e");
+    h_output_log->Draw("histsame");
+    h_input_log->Draw("esame");
+    can->cd(2)->SetLogy();
+
+    can->cd(3);
+    h_input_cumul->Draw("e");
+    h_output_cumul->Draw("histsame");
+    h_input_cumul->Draw("esame");
+    
+    can->cd(1)->RedrawAxis();
+    can->cd(2)->RedrawAxis();
+    can->cd(3)->RedrawAxis();
+    can->Print(Form("eparavalidation/%s/%s.pdf",samplename.c_str(),name[l].c_str()));
+    delete can;
+   } //one_canvas
+   else
+   {
+   	TCanvas* can_lin=new TCanvas(Form("can_lin_%s",layer[l].c_str()),Form("can_lin_%s",layer[l].c_str()),0,0,800,600);
+    h_input_lin ->Draw("e");
+    h_output_lin->Draw("histsame");
+    h_input_lin ->Draw("esame");
+    {
+     TLegend* leg=new TLegend(0.65,0.82,0.99,0.93);
+     leg->SetBorderSize(0);
+     leg->SetFillStyle(0);
+     leg->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
+     leg->AddEntry(h_output_lin,"Parametrisation","f");
+     leg->AddEntry(h_input_lin,"G4 Input","lpe");
+     leg->Draw();
+     TLatex* la=new TLatex(0.2,0.5,"#splitline{Photons 50 GeV}{0.2 < |#eta| < 0.25}");
+     la->SetNDC();
+     la->Draw();
+     ATLAS_LABEL(0.2,0.9);
+    }
+   	can_lin->RedrawAxis();
+    can_lin->Print(Form("eparavalidation/%s/%s_lin.pdf",samplename.c_str(),name[l].c_str()));
+    
+    TCanvas* can_log=new TCanvas("can_log","can_log",0,0,800,600);
+    h_input_log ->Draw("e");
+    h_output_log->Draw("histsame");
+    h_input_log ->Draw("esame");
+    can_log->SetLogy();
+    {
+     TLegend* leg=new TLegend(0.65,0.82,0.99,0.93);
+     leg->SetBorderSize(0);
+     leg->SetFillStyle(0);
+     leg->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
+     leg->AddEntry(h_output_lin,"Parametrisation","f");
+     leg->AddEntry(h_input_lin,"G4 Input","lpe");
+     leg->Draw();
+    }
+   	can_log->RedrawAxis();
+    can_log->Print(Form("eparavalidation/%s/%s_log.pdf",samplename.c_str(),name[l].c_str()));
+   	
+   	TCanvas* can_cum=new TCanvas("can_cum","can_cum",0,0,800,600);
+    h_input_cumul ->Draw("e");
+    h_output_cumul->Draw("histsame");
+    h_input_cumul ->Draw("esame");
+    {
+     TLegend* leg=new TLegend(0.65,0.82,0.99,0.93);
+     leg->SetBorderSize(0);
+     leg->SetFillStyle(0);
+     leg->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
+     leg->AddEntry(h_output_lin,"Parametrisation","f");
+     leg->AddEntry(h_input_lin,"G4 Input","lpe");
+     leg->Draw();
+    }
+   	can_cum->RedrawAxis();
+    can_cum->Print(Form("eparavalidation/%s/%s_cum.pdf",samplename.c_str(),name[l].c_str()));
+    
+   } //separate canvases
+   
+  } //for layer
+ 
+}
+
+TH1* get_cumul(TH1* hist)
+{
+  TH1D* h_cumul=(TH1D*)hist->Clone("h_cumul");
+  double sum=0;
+  for(int b=1;b<=h_cumul->GetNbinsX();b++)
+  {
+    sum+=hist->GetBinContent(b);
+    h_cumul->SetBinContent(b,sum);
+  }
+  return h_cumul; 
+}
+
+void ATLAS_LABEL(double x,double y) 
+{
+  TLatex l; //l.SetTextAlign(12); l.SetTextSize(tsize); 
+  l.SetNDC();
+  l.SetTextFont(72);
+  l.SetTextColor(1);
+  l.DrawLatex(x,y,"ATLAS #bf{#it{Simulation}}");
+}
+
+void Prelim_LABEL(double x,double y) 
+{
+  TLatex l;
+  l.SetNDC();
+  l.SetTextFont(72);
+  l.SetTextColor(1);
+  l.DrawLatex(x,y,"#bf{#it{Preliminary}}");
+}
+
+void photon()
+{
+ 
+ int zoom=1;
+ string zname="";
+ if(zoom) zname="_zoom";
+ 
+ TFile* file=TFile::Open("eparavalidation/photons/validation.root");
+ TH1D* h_input=(TH1D*)file->Get(Form("h_input%s_totalE",zname.c_str()));   h_input->SetName("h_input");
+ TH1D* h_output=(TH1D*)file->Get(Form("h_output%s_totalE",zname.c_str())); h_output->SetName("h_output");
+ 
+ h_input->SetMarkerSize(1.0);
+ h_input->SetLineWidth(1);
+ h_output->SetLineWidth(1);
+ h_output->SetFillColor(7);
+ h_output->Scale(h_input->Integral()/h_output->Integral());
+ h_input->GetXaxis()->SetNdivisions(506,kTRUE);
+ double ymax=h_input->GetBinContent(h_input->GetMaximumBin());
+ h_input->GetYaxis()->SetRangeUser(0,ymax*1.4);
+ h_input->GetYaxis()->SetTitle("Events");
+ h_input->GetXaxis()->SetTitle("Total cell energy [MeV]");
+ 
+ TCanvas* can=new TCanvas("can","can",0,0,800,600);
+ h_input ->Draw("e");
+ h_input->GetYaxis()->SetRangeUser(0.5,10000);
+ h_input->GetXaxis()->SetRangeUser(43000,52000);
+ h_output->Draw("histsame");
+ h_input ->Draw("esame");
+ can->SetLogy();
+ TLegend* leg=new TLegend(0.65,0.82,0.95,0.93);
+ leg->SetBorderSize(0);
+ leg->SetFillStyle(0);
+ leg->AddEntry(h_output,"#bf{Parametrisation}","f");
+ leg->AddEntry(h_input,"#bf{G4 Input}","lpe");
+ leg->Draw();
+ TLatex* la=new TLatex(0.2,0.5,"#splitline{Photons 50 GeV}{0.2 < |#eta| < 0.25}");
+ la->SetNDC();
+ la->Draw();
+ ATLAS_LABEL(0.2,0.88);
+ Prelim_LABEL(0.2,0.83);
+ can->RedrawAxis();
+ can->Print("eparavalidation/photon_totalE.pdf");
+ 
+}
+
+void pion()
+{
+ 
+ int zoom=1;
+ string zname="";
+ if(zoom) zname="_zoom";
+ 
+ TFile* file=TFile::Open("eparavalidation/pions/validation.root");
+ TH1D* h_input=(TH1D*)file->Get(Form("h_input%s_layer12",zname.c_str()));   h_input->SetName("h_input");
+ TH1D* h_output=(TH1D*)file->Get(Form("h_output%s_layer12",zname.c_str())); h_output->SetName("h_output");
+ 
+ h_input->SetMarkerSize(1.0);
+ h_input->SetLineWidth(1);
+ h_output->SetLineWidth(1);
+ h_output->SetFillColor(7);
+ h_output->Scale(h_input->Integral()/h_output->Integral());
+ h_input->GetXaxis()->SetNdivisions(506,kTRUE);
+ double ymax=h_input->GetBinContent(h_input->GetMaximumBin());
+ h_input->GetYaxis()->SetRangeUser(0,ymax*1.4);
+ h_input->GetYaxis()->SetTitle("Events");
+ h_input->GetXaxis()->SetTitle("Fraction of energy deposited in TileBarrel1");
+ 
+ TCanvas* can=new TCanvas("can","can",0,0,800,600);
+ h_input ->Draw("e");
+ h_output->Draw("histsame");
+ h_input ->Draw("esame");
+ TLegend* leg=new TLegend(0.65,0.82,0.95,0.93);
+ leg->SetBorderSize(0);
+ leg->SetFillStyle(0);
+ leg->AddEntry(h_output,"#bf{Parametrisation}","f");
+ leg->AddEntry(h_input,"#bf{G4 Input}","lpe");
+ leg->Draw();
+ TLatex* la=new TLatex(0.6,0.5,"#splitline{Pions 50 GeV}{0.2 < |#eta| < 0.25}");
+ la->SetNDC();
+ la->Draw();
+ ATLAS_LABEL(0.2,0.88);
+ Prelim_LABEL(0.2,0.83);
+ can->RedrawAxis();
+ can->Print("eparavalidation/pion_layer12.pdf");
+ 
+}
+
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/init_shapepara.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/init_shapepara.C
index 2c36d9fee5f9d01614250c62efaa0aaba184a0be..185f34b0f3d3452d6b5287907b0b4b61da6a3a20 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/init_shapepara.C
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/init_shapepara.C
@@ -25,9 +25,9 @@ void init_shapepara(bool isStandAlone) {
         gInterpreter->AddIncludePath("./");
 
 
-        gROOT->LoadMacro("CaloSampling.cxx+");
-        gROOT->LoadMacro("../src/CaloGeometry.cxx+");
-        gROOT->LoadMacro("CaloGeometryFromFile.cxx+");
+        // gROOT->LoadMacro("CaloSampling.cxx+");
+        gROOT->LoadMacro("../src/CaloGeoGeometry.cxx+");
+        gROOT->LoadMacro("../src/CaloGeometryFromFile.cxx+");
         gROOT->LoadMacro("../src/FCAL_ChannelMap.cxx+");
         gROOT->LoadMacro("../shapepara/ShowerShapeThinning.cxx+");
         gROOT->LoadMacro("../shapepara/ShowerShapeStudy.cxx+");
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_epara_validation.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_epara_validation.C
index 6316b5dd4c6114cd41759d2301fa37105b3f4bbf..14cd60cefd841226e07f960020d73954b82e2870 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_epara_validation.C
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_epara_validation.C
@@ -5,54 +5,59 @@
 TH1* get_cumul(TH1* hist);
 void run_epara_validation();
 
+void ATLAS_LABEL(double x,double y) ;
+
+//Instructions:
 //.x init_epara_validation.C+
 //.x run_epara_validation.C
 
+
 void run_epara_validation()
 {
- 	
- 	//parametrization input files:
- 	
-  string sample="pions";
+
+  //parametrization input files:
+
+  string samplename="pions";
+  //string samplename="photons";
   //string samplename="pions_s2864";
-  //string samplename="pions_s2865";
-    
- 	string dirname ="/afs/cern.ch/user/s/schaarsc/public/fastcalo/epara_storage";
-  
+  //string samplename="s2865";
+
+  string dirname ="/afs/cern.ch/user/s/schaarsc/public/fastcalo/epara_storage";
+
   system("mkdir eparavalidation");
-  system(("mkdir eparavalidation/"+sample).c_str());
+  system(("mkdir eparavalidation/"+samplename).c_str());
   /*
-  int setbin=-1;
-  cout<<"PCA bin (-1 if random)? "<<endl;
-  cin>>setbin;
+    int setbin=-1;
+    cout<<"PCA bin (-1 if random)? "<<endl;
+    cin>>setbin;
   */
   //Prepare the Histograms
   cout<<"Preparing validation histograms"<<endl;
-  TFile* file1=TFile::Open(Form("%s/%s/firstPCA.root",dirname.c_str(),sample.c_str()));
+  TFile* file1=TFile::Open(Form("%s/%s/firstPCA.root",dirname.c_str(),samplename.c_str()));
   TH2I* h_layer=(TH2I*)file1->Get("h_layer");
   int pcabins=h_layer->GetNbinsX();
   vector<int> layerNr;
   for(int i=1;i<=h_layer->GetNbinsY();i++)
-  {
- 	 if(h_layer->GetBinContent(1,i)==1) 
- 	  layerNr.push_back(h_layer->GetYaxis()->GetBinCenter(i));
-  }
+    {
+      if(h_layer->GetBinContent(1,i)==1)
+	layerNr.push_back(h_layer->GetYaxis()->GetBinCenter(i));
+    }
   vector<string> layer;
   for(unsigned int l=0;l<layerNr.size();l++)
-   layer.push_back(Form("layer%i",layerNr[l]));
+    layer.push_back(Form("layer%i",layerNr[l]));
   layer.push_back("totalE");
-  
+
   for(unsigned int l=0;l<layer.size();l++)
-   cout<<"l "<<l<<" "<<layer[l]<<endl;
-  
+    cout<<"l "<<l<<" "<<layer[l]<<endl;
+
   int nbins=100;
   TH1D* h_input[layer.size()+2];
   TH1D* h_output[layer.size()+2];
   for(unsigned int l=0;l<layerNr.size();l++)
-  {
-   h_input[l]=new TH1D(Form("h_input_%s",layer[l].c_str()),Form("h_input_%s",layer[l].c_str()),nbins,0,1);
-   h_output[l]=new TH1D(Form("h_output_%s",layer[l].c_str()),Form("h_output_%s",layer[l].c_str()),nbins,0,1);
-  }
+    {
+      h_input[l]=new TH1D(Form("h_input_%s",layer[l].c_str()),Form("h_input_%s",layer[l].c_str()),nbins,0,1);
+      h_output[l]=new TH1D(Form("h_output_%s",layer[l].c_str()),Form("h_output_%s",layer[l].c_str()),nbins,0,1);
+    }
   //Total E
   TTree* InputTree = (TTree*)file1->Get("tree_1stPCA");
   TreeReader* read_inputTree = new TreeReader();
@@ -69,48 +74,51 @@ void run_epara_validation()
   h_output[layer.size()]  =new TH1D("h_output_sumfractions_elmag","h_output_sumfractions_elmag",nbins,-1,2);
   h_input[layer.size()+1] =new TH1D("h_input_sumfractions_had","h_input_sumfractions_had",nbins,-1,2);
   h_output[layer.size()+1]=new TH1D("h_output_sumfractions_had","h_output_sumfractions_had",nbins,-1,2);
-  
+
   //Fill the Input Histograms:
   vector<int> elmag; //0-8
   for(int e=0;e<=8;e++) elmag.push_back(e);
   vector<int> had;   //9-24
   for(int h=9;h<25;h++) had.push_back(h);
-  
+
   cout<<"Now fill input histograms"<<endl;
   for(int event=0;event<read_inputTree->GetEntries();event++)
-  {
-   read_inputTree->GetEntry(event);
-   //if(setbin<0 || (setbin>=1 && read_inputTree->GetVariable("firstPCAbin")==setbin))
-   //{
-   double sum_fraction_elmag=0.0;
-   double sum_fraction_had=0.0;
-   double data = read_inputTree->GetVariable("energy_totalE");
-   h_input[layerNr.size()]->Fill(data);
-   for(unsigned int l=0;l<layerNr.size();l++)
-   {
-   	double data = read_inputTree->GetVariable(Form("energy_%s",layer[l].c_str()));
-   	h_input[l]->Fill(data);
-   	
-   	int is_elmag,is_had;
-   	is_elmag=is_had=0;
-    
-    for(int e=0;e<elmag.size();e++)
-    { 	  if(elmag[e]==layerNr[l]) is_elmag=1;   }
-    for(int h=0;h<had.size();h++)
-    { 	  if(had[h]==layerNr[l]) is_had=1;   }
-    if(is_elmag) sum_fraction_elmag+=data;
-    if(is_had)   sum_fraction_had+=data;
-   }
-   h_input[layerNr.size()+1]->Fill(sum_fraction_elmag);
-   h_input[layerNr.size()+2]->Fill(sum_fraction_had);
-   //}
-  }
-  
+    {
+      read_inputTree->GetEntry(event);
+      //if(setbin<0 || (setbin>=1 && read_inputTree->GetVariable("firstPCAbin")==setbin))
+      //{
+      double sum_fraction_elmag=0.0;
+      double sum_fraction_had=0.0;
+      double data = read_inputTree->GetVariable("energy_totalE");
+      h_input[layerNr.size()]->Fill(data);
+      for(unsigned int l=0;l<layerNr.size();l++)
+	{
+	  double data = read_inputTree->GetVariable(Form("energy_%s",layer[l].c_str()));
+	  h_input[l]->Fill(data);
+
+	  int is_elmag,is_had;
+	  is_elmag=is_had=0;
+
+	  for(int e=0;e<elmag.size();e++)
+	    {	  if(elmag[e]==layerNr[l]) is_elmag=1;   }
+	  for(int h=0;h<had.size();h++)
+	    {	  if(had[h]==layerNr[l]) is_had=1;   }
+	  if(is_elmag) sum_fraction_elmag+=data;
+	  if(is_had)   sum_fraction_had+=data;
+	}
+      h_input[layerNr.size()+1]->Fill(sum_fraction_elmag);
+      h_input[layerNr.size()+2]->Fill(sum_fraction_had);
+      //}
+    }
+
   TH1D* h_randombin=new TH1D("h_randombin","h_randombin",pcabins,-0.5,pcabins-0.5);
-  
-   
+
+
   TFCSPCAEnergyParametrization etest("etest","etest");
-  TFile* file2 = TFile::Open("/afs/cern.ch/atlas/groups/Simulation/FastCaloSimV2/FCSParams.root");
+  //TFile* file2 = TFile::Open("/afs/cern.ch/atlas/groups/Simulation/FastCaloSimV2/FCSParams.root");
+
+  TFile* file2 = TFile::Open(Form("%s/%s/secondPCA.root",dirname.c_str(),samplename.c_str()));
+
   cout<<"pca bins before load "<<etest.n_pcabins()<<endl;
   etest.loadInputs(file2);
   cout<<"number of pca bins after load "<<etest.n_pcabins()<<" , number from firstPCA file: "<<pcabins<<endl;
@@ -118,171 +126,246 @@ void run_epara_validation()
   delete file2;
 
   //Run the loop:
-  int ntoys=1000;
+  int ntoys=10000;
   TRandom3* Random=new TRandom3();
   Random->SetSeed(0);
   const TFCSTruthState* truth=new TFCSTruthState();
   const TFCSExtrapolationState* extrapol=new TFCSExtrapolationState();
+
+  TFCSSimulationState simulstate;
   for(int i=0;i<ntoys;i++)
-  {
-   //if(i%100==0) 
-   	cout<<"Now run simulation for Toy "<<i<<endl;
-   
-   int randombin=0;
-   double uniform=Random->Uniform(1);
-   for(int n=0;n<pcabins;n++)
-   {
-    if(uniform>n*1.0/(double)pcabins && uniform<(n+1.)*1.0/(double)pcabins)
-     randombin=n+1;
-   }
-   h_randombin->Fill(randombin);
-         
-   TFCSSimulationState simulstate;
-   simulstate.set_Ebin(randombin);
-   
-   etest.simulate(simulstate, truth, extrapol);
-   
-   //fill the Histograms:
-   double sum_fraction_elmag=0.0;
-   double sum_fraction_had=0.0;
-   
-   for(int s=0;s<30;s++) //30 is a dummy number, sth big
-   {
-   	int is_elmag,is_had;
-   	is_elmag=is_had=0;
-   	for(unsigned int l=0;l<layerNr.size();l++)
     {
-     if(s==layerNr[l])
-     {
-   	  h_output[l]->Fill(simulstate.Efrac(s));
-      for(int e=0;e<elmag.size();e++)
-      { 	  if(elmag[e]==layerNr[l]) is_elmag=1;   }
-      for(int h=0;h<had.size();h++)
-      { 	  if(had[h]==layerNr[l]) is_had=1;   }
-      if(is_elmag) sum_fraction_elmag+=simulstate.Efrac(s);
-      if(is_had)   sum_fraction_had+=simulstate.Efrac(s);
-     }
+      if(i%100==0) cout<<"Now run simulation for Toy "<<i<<endl;
+
+      int randombin=0;
+      double uniform=Random->Uniform(1);
+      for(int n=0;n<pcabins;n++)
+	{
+	  if(uniform>n*1.0/(double)pcabins && uniform<(n+1.)*1.0/(double)pcabins)
+	    randombin=n+1;
+	}
+      h_randombin->Fill(randombin);
+
+      simulstate.set_Ebin(randombin);
+
+      etest.simulate(simulstate, truth, extrapol);
+
+      //fill the Histograms:
+      double sum_fraction_elmag=0.0;
+      double sum_fraction_had=0.0;
+
+      /*
+	for(int s=0;s<30;s++) //30 is a dummy number, sth big
+	{
+	int is_elmag,is_had;
+	is_elmag=is_had=0;
+	for(unsigned int l=0;l<layerNr.size();l++)
+	{
+	if(s==layerNr[l])
+	{
+	h_output[l]->Fill(simulstate.Efrac(s));
+	for(int e=0;e<elmag.size();e++)
+	{		  if(elmag[e]==layerNr[l]) is_elmag=1;   }
+	for(int h=0;h<had.size();h++)
+	{		  if(had[h]==layerNr[l]) is_had=1;   }
+	if(is_elmag) sum_fraction_elmag+=simulstate.Efrac(s);
+	if(is_had)   sum_fraction_had+=simulstate.Efrac(s);
+	}
+	}
+	}
+	h_output[layerNr.size()]->Fill(simulstate.E());
+	h_output[layerNr.size()+1]->Fill(sum_fraction_elmag);
+	h_output[layerNr.size()+2]->Fill(sum_fraction_had);
+      */
+
+      for(unsigned int l=0;l<layerNr.size();l++)
+	{
+	  h_output[l]->Fill(simulstate.Efrac(layerNr[l]));
+	}
+      h_output[layerNr.size()]->Fill(simulstate.E());
+
+    } //loop over toys
+
+  //save the histograms in an output file
+  TFile* outfile=new TFile(Form("eparavalidation/%s/validation.root",samplename.c_str()),"RECREATE");
+  cout<<"writing output to file "<<outfile->GetName()<<endl;
+  for(unsigned int l=0;l<layer.size();l++)
+    {
+      cout<<"l "<<l<<" layer[l] "<<layer[l]<<endl;
+      outfile->Add(h_output[l]);
+      outfile->Add(h_input[l]);
+      double min,max,rmin,rmax;
+      EnergyParametrizationValidation::autozoom(h_input[l],min,max,rmin,rmax);
+      TH1D* h_output_zoom=EnergyParametrizationValidation::refill(h_output[l],min,max,rmin,rmax);
+      h_output_zoom->SetName(Form("h_output_zoom_%s",layer[l].c_str()));
+      TH1D* h_input_zoom=EnergyParametrizationValidation::refill(h_input[l],min,max,rmin,rmax);
+      h_input_zoom->SetName(Form("h_input_zoom_%s",layer[l].c_str()));
+      outfile->Add(h_output_zoom);
+      outfile->Add(h_input_zoom);
+    }
+  outfile->Write();
+
+  /*
+
+    cout<<"Now making validation plots"<<endl;
+
+    vector<string> name;
+    vector<string> title;
+    for(unsigned int l=0;l<layer.size()-1;l++)
+    {
+    name.push_back(layer[l].c_str());
+    title.push_back(Form("E fraction in Layer %i",layerNr[l]));
     }
-   }
-   h_output[layerNr.size()]->Fill(simulstate.E());
-   h_output[layerNr.size()+1]->Fill(sum_fraction_elmag);
-   h_output[layerNr.size()+2]->Fill(sum_fraction_had);
-   
-  } //loop over toys
-  
-  
-  cout<<"Now making validation plots"<<endl;
-  
-  vector<string> name;
-  vector<string> title;
-  for(unsigned int l=0;l<layer.size()-1;l++)
-  {
-   name.push_back(layer[l].c_str());
-   title.push_back(Form("E fraction in Layer %i",layerNr[l]));
-  }
-  name.push_back("totalE");
-  name.push_back("sumfraction_elmag");
-  name.push_back("sumfraction_had");
-  title.push_back("total E [MeV]");
-  title.push_back("Sum of E fractions in elmag. layers");
-  title.push_back("Sum of E fractions in had. layers");
-  
-  for(unsigned int l=0;l<layer.size()+2;l++)
-  {
-   //TCanvas* can=new TCanvas(Form("can_%i",l),Form("can_%i",l),0,0,1600,600);
-   TCanvas* can=new TCanvas("can","can",0,0,1600,600);
-   can->Divide(3,1);
-   can->cd(1); //linear scale
-   double min,max,rmin,rmax;
-
-   int use_autozoom=1;
-   TH1D* h_output_lin;
-   TH1D* h_input_lin;
-   if(use_autozoom)
-   {
+    name.push_back("totalE");
+    name.push_back("sumfraction_elmag");
+    name.push_back("sumfraction_had");
+    title.push_back("total E [MeV]");
+    title.push_back("Sum of E fractions in elmag. layers");
+    title.push_back("Sum of E fractions in had. layers");
+
+    for(unsigned int l=0;l<layer.size()+2;l++)
+    {
+    int use_autozoom=1;
+    int one_canvas=0;
+    double min,max,rmin,rmax;
+    TH1D* h_output_lin;
+    TH1D* h_input_lin;
+    if(use_autozoom)
+    {
     EnergyParametrizationValidation::autozoom(h_input[l],min,max,rmin,rmax);
     h_output_lin=EnergyParametrizationValidation::refill(h_output[l],min,max,rmin,rmax);  h_output_lin->SetName("h_output_lin");
     h_input_lin=EnergyParametrizationValidation::refill(h_input[l],min,max,rmin,rmax); h_input_lin->SetName("h_input_lin");
-   }
-   else
-   {
-   	h_output_lin=(TH1D*)h_output[l]->Clone("h_output_lin");
-   	h_input_lin=(TH1D*)h_input[l]->Clone("h_input_lin");
-   }
-   
-   double kolmo=h_input[l]->KolmogorovTest(h_output[l]);
-   double chi2=h_input[l]->Chi2Test(h_output[l],"UW");
-
-   h_input_lin->SetMarkerSize(1.0);
-   h_input_lin->SetLineWidth(1);
-   h_output_lin->SetLineWidth(1);
-   h_output_lin->SetFillColor(7);
-   
-   h_output_lin->Scale(h_input[l]->Integral()/h_output_lin->Integral());
-   h_input_lin->Draw("e");
-   h_input_lin->GetXaxis()->SetNdivisions(504,kFALSE);
-   double ymax=h_input_lin->GetBinContent(h_input_lin->GetMaximumBin());
-   h_input_lin->GetYaxis()->SetRangeUser(0,ymax*1.4);
-   h_input_lin->GetYaxis()->SetTitle("Linear");
-   h_input_lin->GetXaxis()->SetTitle(title[l].c_str());
-   h_output_lin->Draw("histsame");
-   h_input_lin->Draw("esame");
-   
-   TLegend* leg=new TLegend(0.65,0.82,0.99,0.93);
-   leg->SetBorderSize(0);
-   leg->SetFillStyle(0);
-   leg->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
-   leg->AddEntry(h_output_lin,"Parametrisation","f");
-   leg->AddEntry(h_input_lin,"G4 Input","lpe");
-   leg->Draw();
-  
-   can->cd(2);
-   TH1D* h_output_log=(TH1D*)h_output_lin->Clone("h_output_log");
-   TH1D* h_input_log=(TH1D*)h_input_lin->Clone("h_input_log");
-   h_input_log->Draw("e");
-   h_input_log->GetYaxis()->SetRangeUser(0.1,ymax*5.0);
-   h_input_log->GetYaxis()->SetTitle("Log");
-   h_output_log->Draw("histsame");
-   h_input_log->Draw("esame");
-   can->cd(2)->SetLogy();
-   TLegend* leg2=new TLegend(0.65,0.82,0.99,0.93);
-   leg2->SetBorderSize(0);
-   leg2->SetFillStyle(0);
-   leg2->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
-   leg2->AddEntry(h_output_lin,"Parametrisation","f");
-   leg2->AddEntry(h_input_lin,"G4 Input","lpe");
-   leg2->Draw();
-   
-   can->cd(3);
-   TH1D* h_output_cumul=(TH1D*)get_cumul(h_output_lin); h_output_cumul->SetName("h_output_cumul");
-   TH1D* h_input_cumul =(TH1D*)get_cumul(h_input_lin);  h_input_cumul->SetName("h_input_cumul");
-   double sf=h_input_cumul->GetBinContent(h_input_cumul->GetNbinsX());
-   h_output_cumul->Scale(1.0/sf);
-   h_input_cumul->Scale(1.0/sf);
-   h_input_cumul->Draw("e");
-   h_input_cumul->GetYaxis()->SetRangeUser(0,1.2);
-   h_input_cumul->GetYaxis()->SetTitle("Cumulative");
-   h_output_cumul->Draw("histsame");
-   h_input_cumul->Draw("esame");
-   TLegend* leg3=new TLegend(0.19,0.82,0.53,0.93);
-   leg3->SetBorderSize(0);
-   leg3->SetFillStyle(0);
-   leg3->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
-   leg3->AddEntry(h_output_lin,"Parametrisation","f");
-   leg3->AddEntry(h_input_lin,"G4 Input","lpe");
-   leg3->Draw();
-   
-   can->cd(1)->RedrawAxis();
-   can->cd(2)->RedrawAxis();
-   can->cd(3)->RedrawAxis();
-   
-   can->Print(Form("eparavalidation/%s/%s.pdf",sample.c_str(),name[l].c_str()));
-   
-   delete can;
-   
-  } //for layer
-  
-  
+    }
+    else
+    {
+    h_output_lin=(TH1D*)h_output[l]->Clone("h_output_lin");
+    h_input_lin=(TH1D*)h_input[l]->Clone("h_input_lin");
+    }
+
+    //linear:
+    double kolmo=h_input[l]->KolmogorovTest(h_output[l]);
+    double chi2=h_input[l]->Chi2Test(h_output[l],"UW");
+    h_input_lin->SetMarkerSize(1.0);
+    h_input_lin->SetLineWidth(1);
+    h_output_lin->SetLineWidth(1);
+    h_output_lin->SetFillColor(7);
+    h_output_lin->Scale(h_input[l]->Integral()/h_output_lin->Integral());
+    h_input_lin->GetXaxis()->SetNdivisions(504,kFALSE);
+    double ymax=h_input_lin->GetBinContent(h_input_lin->GetMaximumBin());
+    h_input_lin->GetYaxis()->SetRangeUser(0,ymax*1.4);
+    h_input_lin->GetYaxis()->SetTitle("Linear");
+    h_input_lin->GetXaxis()->SetTitle(title[l].c_str());
+
+    //log:
+    TH1D* h_output_log=(TH1D*)h_output_lin->Clone("h_output_log");
+    TH1D* h_input_log=(TH1D*)h_input_lin->Clone("h_input_log");
+    h_input_log->GetYaxis()->SetRangeUser(0.1,ymax*5.0);
+    h_input_log->GetYaxis()->SetTitle("Log");
+
+    //cumulative:
+    TH1D* h_output_cumul=(TH1D*)get_cumul(h_output_lin); h_output_cumul->SetName("h_output_cumul");
+    TH1D* h_input_cumul =(TH1D*)get_cumul(h_input_lin);  h_input_cumul->SetName("h_input_cumul");
+    double sf=h_input_cumul->GetBinContent(h_input_cumul->GetNbinsX());
+    h_output_cumul->Scale(1.0/sf);
+    h_input_cumul->Scale(1.0/sf);
+    h_input_cumul->GetYaxis()->SetRangeUser(0,1.2);
+    h_input_cumul->GetYaxis()->SetTitle("Cumulative");
+
+    if(one_canvas)
+    {
+    TCanvas* can=new TCanvas("can","can",0,0,1600,600);
+    can->Divide(3,1);
+    can->cd(1);
+    h_input_lin->Draw("e");
+    h_output_lin->Draw("histsame");
+    h_input_lin->Draw("esame");
+
+    TLegend* leg=new TLegend(0.65,0.82,0.99,0.93);
+    leg->SetBorderSize(0);
+    leg->SetFillStyle(0);
+    leg->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
+    leg->AddEntry(h_output_lin,"Parametrisation","f");
+    leg->AddEntry(h_input_lin,"G4 Input","lpe");
+    leg->Draw();
+
+    can->cd(2);
+    h_input_log->Draw("e");
+    h_output_log->Draw("histsame");
+    h_input_log->Draw("esame");
+    can->cd(2)->SetLogy();
+
+    can->cd(3);
+    h_input_cumul->Draw("e");
+    h_output_cumul->Draw("histsame");
+    h_input_cumul->Draw("esame");
+
+    can->cd(1)->RedrawAxis();
+    can->cd(2)->RedrawAxis();
+    can->cd(3)->RedrawAxis();
+    can->Print(Form("eparavalidation/%s/%s.pdf",samplename.c_str(),name[l].c_str()));
+    delete can;
+    } //one_canvas
+    else
+    {
+    TCanvas* can_lin=new TCanvas("can_lin","can_lin",0,0,800,600);
+    h_input_lin ->Draw("e");
+    h_output_lin->Draw("histsame");
+    h_input_lin ->Draw("esame");
+    {
+    TLegend* leg=new TLegend(0.65,0.82,0.99,0.93);
+    leg->SetBorderSize(0);
+    leg->SetFillStyle(0);
+    leg->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
+    leg->AddEntry(h_output_lin,"Parametrisation","f");
+    leg->AddEntry(h_input_lin,"G4 Input","lpe");
+    leg->Draw();
+    TLatex* la=new TLatex(0.2,0.5,"#splitline{Photons 50 GeV}{0.2 < |#eta| < 0.25}");
+    la->SetNDC();
+    la->Draw();
+    ATLAS_LABEL(0.2,0.9);
+    }
+    can_lin->RedrawAxis();
+    can_lin->Print(Form("eparavalidation/%s/%s_lin.pdf",samplename.c_str(),name[l].c_str()));
+
+    TCanvas* can_log=new TCanvas("can_log","can_log",0,0,800,600);
+    h_input_log ->Draw("e");
+    h_output_log->Draw("histsame");
+    h_input_log ->Draw("esame");
+    can_log->SetLogy();
+    {
+    TLegend* leg=new TLegend(0.65,0.82,0.99,0.93);
+    leg->SetBorderSize(0);
+    leg->SetFillStyle(0);
+    leg->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
+    leg->AddEntry(h_output_lin,"Parametrisation","f");
+    leg->AddEntry(h_input_lin,"G4 Input","lpe");
+    leg->Draw();
+    }
+    can_log->RedrawAxis();
+    can_log->Print(Form("eparavalidation/%s/%s_log.pdf",samplename.c_str(),name[l].c_str()));
+
+    TCanvas* can_cum=new TCanvas("can_cum","can_cum",0,0,800,600);
+    h_input_cumul ->Draw("e");
+    h_output_cumul->Draw("histsame");
+    h_input_cumul ->Draw("esame");
+    {
+    TLegend* leg=new TLegend(0.65,0.82,0.99,0.93);
+    leg->SetBorderSize(0);
+    leg->SetFillStyle(0);
+    leg->SetHeader(Form("KS: %.2f, Chi2: %.2f",kolmo,chi2));
+    leg->AddEntry(h_output_lin,"Parametrisation","f");
+    leg->AddEntry(h_input_lin,"G4 Input","lpe");
+    leg->Draw();
+    }
+    can_cum->RedrawAxis();
+    //can_cum->Print(Form("eparavalidation/%s/%s_cum.pdf",samplename.c_str(),name[l].c_str()));
+
+    } //separate canvases
+
+    } //for layer
+
+  */
+
 }
 
 
@@ -291,11 +374,19 @@ TH1* get_cumul(TH1* hist)
   TH1D* h_cumul=(TH1D*)hist->Clone("h_cumul");
   double sum=0;
   for(int b=1;b<=h_cumul->GetNbinsX();b++)
-  {
-    sum+=hist->GetBinContent(b);
-    h_cumul->SetBinContent(b,sum);
-  }
-  return h_cumul; 
+    {
+      sum+=hist->GetBinContent(b);
+      h_cumul->SetBinContent(b,sum);
+    }
+  return h_cumul;
 }
 
-
+void ATLAS_LABEL(double x,double y)
+{
+  TLatex l; //l.SetTextAlign(12); l.SetTextSize(tsize);
+  l.SetNDC();
+  l.SetTextFont(72);
+  l.SetTextColor(1);
+  l.DrawLatex(x,y,"#bf{ATLAS} Simulation");
+  l.DrawLatex(x,y-10,"Preliminary");
+}
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_shapepara.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_shapepara.C
index 0436281d9f8ac612402d3c7325860ba149b48a11..50340ca0c05b00c85580d1d9d898f99de4a2870b 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_shapepara.C
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_shapepara.C
@@ -27,7 +27,7 @@ void run_shapepara(int layer, int binpca)
 {
 // * set the input parameters -----------------------------------------------------------------------------
 
-   string particle = "el_1mm"; // pion, el_1mm, el_opt, photon
+   string particle = "pion"; // pion, el_1mm, el_opt, photon
    float  energy   = 50;     // in GeV
    float  etamin   = 0.20;
    float  etamax   = 0.25;
@@ -114,7 +114,8 @@ void run_shapepara(int layer, int binpca)
       if (particle == "pion")
       {
          // * input sample
-         input.push_back("/afs/cern.ch/work/a/ahasib/FastCaloSim/old/StandAlone/ISF_FastCaloSimParametrization_WorkingBranch/ISF_HitAnalysis6_evgen_calo__211_E50000_50000_eta20_25_Evts0-5500_vz_0_origin_calo.merged.pool.root");
+         // input.push_back("/afs/cern.ch/work/a/ahasib/FastCaloSim/old/StandAlone/ISF_FastCaloSimParametrization_WorkingBranch/ISF_HitAnalysis6_evgen_calo__211_E50000_50000_eta20_25_Evts0-5500_vz_0_origin_calo.merged.pool.root");
+         input.push_back("/afs/cern.ch/user/a/ahasib/public/NewInputSamples/pion_50GeV_eta_020_025.root");
 
          // * PCA file
          pca.push_back("/afs/cern.ch/user/a/ahasib/WorkDir/FastCaloSim/ISF_FastCaloSim/PCAs/pion/firstPCA.root");
@@ -242,7 +243,7 @@ void run_shapepara(int layer, int binpca)
       std::ifstream hitsfile(HitsFile);
       std::ifstream hitsalphadrfile(HitsAlphaDrFile);
 
-      bool force = false;
+      bool force = true;
 
       if (!hitsfile or force)
       {
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_shapeparaLocal.C b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_shapeparaLocal.C
index fc40ef06613612b691cbb5ca3b9fdafba3ebcbf5..bfe48fe1b7b2110c1314801c02ca5cff55661e3e 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_shapeparaLocal.C
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/run_shapeparaLocal.C
@@ -27,23 +27,23 @@ void run_shapeparaLocal(string action)
 {
    // * set the input parameters -----------------------------------------------------------------------------
 
-   string particle = "el_1mm"; // pion, el_1mm, el_opt, photon
+   string particle = "pion"; // pion, el_1mm, el_opt, photon
    float  energy   = 50;     // in GeV
    float  etamin   = 0.20;
    float  etamax   = 0.25;
 
 
-   int   calolayer   = 12;
-   int   PCAbin      = 5;
-   int   nbinsR      = 20;
+   int   calolayer   = 2;
+   int   PCAbin      = 1;
    int   nbinsAlpha  = 8;
+   int   nbinsR      = 20;
    float mincalosize = -1000;     //whaaat are thooose?
-   float tolerance   = .00000001; // for empty bin check
+   float tolerance   = .000000001; // for empty bin check
 
 
 
    // * regression parameters
-   int neurons = 6;
+   int neurons = 4;
 
 
 
@@ -136,8 +136,9 @@ void run_shapeparaLocal(string action)
       shapeStudy->set_fileName(fileName);
       shapeStudy->set_hitsNtupleName(HitsFile);
 
-      shapeStudy->InvesitageShowerCenter(HitsFile);
-      //shapeStudy->EachParticleShower();
+      //shapeStudy->InvesitageShowerCenter(HitsFile);
+
+      shapeStudy->EachParticleShower();
    }
    else if (doBinning)
    {
@@ -162,6 +163,8 @@ void run_shapeparaLocal(string action)
       shapeBin->set_topDir(topDir);
       shapeBin->set_fileName(fileName);
 
+      bool force = true;
+
       if (!hitsalphadrfile)
       {
          cout << " HitsAlphaDr root file is missing ....Creating..." << endl;
@@ -207,7 +210,8 @@ void run_shapeparaLocal(string action)
       //targetVarVec.push_back("EnergyDensity");
       //targetVarVec.push_back("LnEnergy");
       //targetVarVec.push_back("LnEnergyDensity");
-      targetVarVec.push_back("EnergyNorm");
+      //targetVarVec.push_back("EnergyNorm");
+      targetVarVec.push_back("hEnergyNorm");
       shapeRegression->Run(targetVarVec);
    }
    else if (doPlotting)
@@ -247,15 +251,15 @@ void run_shapeparaLocal(string action)
 
       std::vector < string > histVec;
       //histVec.push_back("hHits");
-      // histVec.push_back("hEnergy");
-      histVec.push_back("hEnergyDensity");
+      //histVec.push_back("hEnergy");
+      // histVec.push_back("hEnergyDensity");
       //histVec.push_back("hLnEnergy");
       //histVec.push_back("hLnEnergyDensity");
-      // histVec.push_back("hEnergyNorm");
+      histVec.push_back("hEnergyNorm");
 
       shapePlot->PlotEnergyDensityGradient();
       shapePlot->PlotPolar(histVec, false);
-      shapePlot->CreateValidationPlot();
+      //shapePlot->CreateValidationPlot();
       // shapePlot->CreateHTML(histVec);
       shapePlot->CreatePlotBook(histVec);
    }
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py
index 670a435bce101cf4526ae67496071d354f23eba1..5ae7546667a63abf3a1a9e58c9c3df83ff4b670a 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/python/AdditionalConfig.py
@@ -16,6 +16,9 @@ from AthenaCommon.DetFlags import DetFlags
 from ISF_Config.ISF_jobProperties import ISF_Flags # IMPORTANT: Flags must be set before tools are retrieved
 from ISF_FastCaloSimServices.ISF_FastCaloSimJobProperties import ISF_FastCaloSimFlags
 
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+
+
 def getAdditionalParticleParametrizationFileNames():
     return [
       "DB=/GLOBAL/AtlfastII/FastCaloSimParam:2:EnergyResults/pdgid_211/EN_1000/eta_central",
@@ -672,7 +675,7 @@ def getPunchThroughTool(name="ISF_PunchThroughTool", **kwargs):
     kwargs.setdefault("MinEnergy"               , [   938.3,   135.6,     50.,     50.,   105.7 ]    )
     kwargs.setdefault("MaxNumParticles"         , [      -1,      -1,      -1,      -1,      -1 ]    )
     kwargs.setdefault("EnergyFactor"            , [      1.,      1.,      1.,      1.,      1. ]    )
-    kwargs.setdefault("BarcodeSvc"              , ISF_Flags.BarcodeService()                         )
+    kwargs.setdefault("BarcodeSvc"              , simFlags.TruthStrategy.BarcodeServiceName()                         )
     kwargs.setdefault("EnvelopeDefSvc"          , getService('AtlasGeometry_EnvelopeDefSvc')         )
     kwargs.setdefault("BeamPipeRadius"          , 500.                                               )
 
@@ -789,19 +792,50 @@ def getPileupFastShowerCellBuilderTool(name="ISF_PileupFastShowerCellBuilderTool
     kwargs.setdefault("sampling_energy_reweighting", weightsfcs )
     return getFastShowerCellBuilderTool(name, **kwargs)
 
-def getFastHitConvertTool(name="ISF_FastHitConvertTool",**kwargs):
-    kwargs.setdefault( 'embHitContainername' , 'LArHitEMB_FastCaloSim'  )
-    kwargs.setdefault( 'emecHitContainername', 'LArHitEMEC_FastCaloSim' )
-    kwargs.setdefault( 'fcalHitContainername', 'LArHitFCAL_FastCaloSim' )
-    kwargs.setdefault( 'hecHitContainername' , 'LArHitHEC_FastCaloSim'  )
-    kwargs.setdefault( 'tileHitContainername', 'TileHitVec_FastCaloSim' )
-    # make sure the FastCaloSim hits get merged into the main output collections
-    collectionMerger = getAlgorithm('ISF_CollectionMerger')
-    collectionMerger.InputLArEMBHits  += kwargs['embHitContainername' ]
-    collectionMerger.InputLArEMECHits += kwargs['emecHitContainername']
-    collectionMerger.InputLArFCALHits += kwargs['fcalHitContainername']
-    collectionMerger.InputLArHECHits  += kwargs['hecHitContainername' ]
-    collectionMerger.InputTileHits    += kwargs['tileHitContainername']
+def getFastHitConvertTool(name="ISF_FastHitConvertTool", **kwargs):
+    mergeable_collection_suffix = "_FastCaloSim"
+
+    EMB_hits_bare_collection_name = "LArHitEMB"
+    EMB_hits_merger_input_property = "LArEMBHits"
+    EMB_hits_collection_name = generate_mergeable_collection_name(
+        EMB_hits_bare_collection_name,
+        mergeable_collection_suffix,
+        EMB_hits_merger_input_property)
+
+    EMEC_hits_bare_collection_name = "LArHitEMEC"
+    EMEC_hits_merger_input_property = "LArEMECHits"
+    EMEC_hits_collection_name = generate_mergeable_collection_name(
+        EMEC_hits_bare_collection_name,
+        mergeable_collection_suffix,
+        EMEC_hits_merger_input_property)
+
+    FCAL_hits_bare_collection_name = "LArHitFCAL"
+    FCAL_hits_merger_input_property = "LArFCALHits"
+    FCAL_hits_collection_name = generate_mergeable_collection_name(
+        FCAL_hits_bare_collection_name,
+        mergeable_collection_suffix,
+        FCAL_hits_merger_input_property)
+
+    HEC_hits_bare_collection_name = "LArHitHEC"
+    HEC_hits_merger_input_property = "LArHECHits"
+    HEC_hits_collection_name = generate_mergeable_collection_name(
+        HEC_hits_bare_collection_name,
+        mergeable_collection_suffix,
+        HEC_hits_merger_input_property)
+
+    tile_hits_bare_collection_name = "TileHitVec"
+    tile_hits_merger_input_property = "TileHits"
+    tile_hits_collection_name = generate_mergeable_collection_name(
+        tile_hits_bare_collection_name,
+        mergeable_collection_suffix,
+        tile_hits_merger_input_property)
+
+    kwargs.setdefault('embHitContainername', EMB_hits_collection_name)
+    kwargs.setdefault('emecHitContainername', EMEC_hits_collection_name)
+    kwargs.setdefault('fcalHitContainername', FCAL_hits_collection_name)
+    kwargs.setdefault('hecHitContainername', HEC_hits_collection_name)
+    kwargs.setdefault('tileHitContainername', tile_hits_collection_name)
+
     from FastCaloSimHit.FastCaloSimHitConf import FastHitConvertTool
     return FastHitConvertTool(name,**kwargs)
 
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/cmt/requirements b/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/cmt/requirements
deleted file mode 100644
index 733e2d23777c70b8c2e768f1cbe5d29cfafbc138..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_PunchThroughTools/cmt/requirements
+++ /dev/null
@@ -1,39 +0,0 @@
-package ISF_PunchThroughTools
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-public
-use AtlasPolicy              AtlasPolicy-*
-
-use AtlasROOT                AtlasROOT-*                External
-
-private
-
-use AthenaKernel             AthenaKernel-*             Control
-use AthenaBaseComps          AthenaBaseComps-*          Control
-use AtlasCLHEP               AtlasCLHEP-*               External
-use AtlasHepMC               AtlasHepMC-*               External
-use BarcodeEvent             BarcodeEvent-*             Simulation/Barcode
-use BarcodeInterfaces        BarcodeInterfaces-*        Simulation/Barcode
-use DataModel                DataModel-*                Control
-use GaudiInterface           GaudiInterface-*           External
-use GeoPrimitives            GeoPrimitives-*            DetectorDescription
-use HepPDT                     v*                       LCG_Interfaces
-use ISF_Event                  ISF_Event-*                   Simulation/ISF/ISF_Core
-use ISF_FastCaloSimInterfaces  ISF_FastCaloSimInterfaces-*   Simulation/ISF/ISF_FastCaloSim
-use ISF_Interfaces             ISF_Interfaces-*              Simulation/ISF/ISF_Core
-use PathResolver            PathResolver-*              Tools
-use SubDetectorEnvelopes  SubDetectorEnvelopes-*  AtlasGeometryCommon
-
-apply_pattern declare_runtime_extras extras=../Data/*.root
-
-public
-library ISF_PunchThroughTools *.cxx components/*.cxx
-apply_pattern component_library
-
-# use the following to compile with debug information
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/cmt/requirements
deleted file mode 100644
index bcf0852050a9f2313f1edab121f5f289c109322f..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrInterfaces/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package ISF_FatrasDetDescrInterfaces
-
-author Noemi Calace <Noemi.Calace@cern.ch>
-
-#################################################################
-# public use statements
-#public
-use AtlasPolicy             AtlasPolicy-*
-use AtlasROOT               AtlasROOT-*              External
-use GaudiInterface          GaudiInterface-*         External
-use GeoPrimitives           GeoPrimitives-*          DetectorDescription
-use EventPrimitives         EventPrimitives-*        Event
-use InDetReadoutGeometry    InDetReadoutGeometry-*   InnerDetector/InDetDetDescr
-#################################################################
-
-# private use statements
-#private
-
-# Declare this package as a metalibrary for cmake in order to propagate libraries and header files from 
-# packages that it depends on to it clients. Transparent to CMT.
-apply_pattern cmake_add_command command=metalibrary
-
-#public
-#library ISF_FatrasDetDescrInterfaces *.cxx 
-#apply_pattern installed_library
-
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/DiscOverlapDescriptor.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/DiscOverlapDescriptor.h
index 9bf7ea4cf366ef12b26ce62950d9535f3c645b9a..e12077063dd02abf209a4f7cb596ab6153e00b24 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/DiscOverlapDescriptor.h
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/DiscOverlapDescriptor.h
@@ -63,7 +63,7 @@ namespace iFatras {
     virtual ~DiscOverlapDescriptor() {}
          
     /**Pseudo-Constructor*/
-    DiscOverlapDescriptor* clone() const;
+    virtual DiscOverlapDescriptor* clone() const override;
      
     /** get the compatible surfaces 
         - return vector : surfaces
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/PlanarOverlapDescriptor.h b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/PlanarOverlapDescriptor.h
index cab790d105f83936806e0d31ed0fbf68409711be..42dfe8594e8ec3336a9a10714303ff5cb5663e7e 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/PlanarOverlapDescriptor.h
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/ISF_FatrasDetDescrModel/PlanarOverlapDescriptor.h
@@ -54,7 +54,7 @@ namespace iFatras {
     virtual ~PlanarOverlapDescriptor(){}
          
     /**Pseudo-Constructor*/
-    PlanarOverlapDescriptor* clone() const;
+    virtual PlanarOverlapDescriptor* clone() const override;
     
     /** get the compatible surfaces 
         - return vector : surfaces
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/cmt/requirements
deleted file mode 100644
index f6a074ea370f2b760e95bb6e4b624fbb8ad7a46f..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrModel/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package ISF_FatrasDetDescrModel
-
-author Noemi Calace <Noemi.Calace@cern.ch>
-
-#################################################################
-# public use statements
-public
-use AtlasPolicy                    AtlasPolicy-*
-use AtlasROOT                      AtlasROOT-*                       External
-use GeoPrimitives                  GeoPrimitives-*                   DetectorDescription
-use Identifier                     Identifier-*                      DetectorDescription
-use TrkDetElementBase              TrkDetElementBase-*               Tracking/TrkDetDescr
-use EventPrimitives                EventPrimitives-*                 Event
-use TrkSurfaces                    TrkSurfaces-*                     Tracking/TrkDetDescr
-use TrkDetDescrUtils               TrkDetDescrUtils-*                Tracking/TrkDetDescr
-use TrkParameters                  TrkParameters-*                   Tracking/TrkEvent
-use TrkEventPrimitives             TrkEventPrimitives-*              Tracking/TrkEvent
-use TrkGeometry                    TrkGeometry-*                     Tracking/TrkDetDescr
-use CLIDSvc                        CLIDSvc-*                         Control
-use ISF_FatrasDetDescrInterfaces   ISF_FatrasDetDescrInterfaces-*    Simulation/ISF/ISF_Fatras
-use InDetReadoutGeometry           InDetReadoutGeometry-*            InnerDetector/InDetDetDescr
-use InDetIdentifier                InDetIdentifier-*                 InnerDetector/InDetDetDescr
-
-#################################################################
-
-# private use statements
-private
-use GaudiInterface                 GaudiInterface-*                  External
-use StoreGate                      StoreGate-*                       Control
-public
-
-library ISF_FatrasDetDescrModel *.cxx
-apply_pattern installed_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-#macro DOXYGEN_IMAGE_PATH "../doc/images"
-
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/cmt/requirements
deleted file mode 100644
index 8463c250ff83b188bca4ce82d395851d47c7b1b4..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasDetDescrTools/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package ISF_FatrasDetDescrTools
-
-author Noemi Calace <Noemi.Calace@cern.ch>
-
-#################################################################
-# public use statements
-public
-use AtlasPolicy                    AtlasPolicy-*
-use AtlasROOT                      AtlasROOT-*                     External
-use GaudiInterface                 GaudiInterface-*                External
-use AthenaBaseComps                AthenaBaseComps-*               Control
-use GeoPrimitives                  GeoPrimitives-*                 DetectorDescription
-use TrkDetDescrInterfaces          TrkDetDescrInterfaces-*         Tracking/TrkDetDescr
-use TrkDetDescrUtils               TrkDetDescrUtils-*              Tracking/TrkDetDescr
-use ISF_FatrasDetDescrModel        ISF_FatrasDetDescrModel-*       Simulation/ISF/ISF_Fatras
-use ISF_FatrasDetDescrInterfaces   ISF_FatrasDetDescrInterfaces-*  Simulation/ISF/ISF_Fatras
-use TrkSurfaces                    TrkSurfaces-*                   Tracking/TrkDetDescr
-#################################################################
-
-# private use statements
-private
-use TrkGeometry               TrkGeometry-*                Tracking/TrkDetDescr
-use TrkVolumes                TrkVolumes-*                 Tracking/TrkDetDescr
-use StoreGate                 StoreGate-*                  Control
-use InDetIdentifier           InDetIdentifier-*            InnerDetector/InDetDetDescr
-use InDetReadoutGeometry      InDetReadoutGeometry-*       InnerDetector/InDetDetDescr
-
-# Specify the required ROOT components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS RIO)"
-
-public
-
-apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-#macro DOXYGEN_IMAGE_PATH "../doc/images"
-
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEvent/CMakeLists.txt b/Simulation/ISF/ISF_Fatras/ISF_FatrasEvent/CMakeLists.txt
index 5cb2fd8c0300b996ec64eba526d285ff60add6fc..1b25bafcdd861f5e45a830e043f7d3b8df961b69 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEvent/CMakeLists.txt
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEvent/CMakeLists.txt
@@ -26,6 +26,6 @@ atlas_add_library( ISF_FatrasEvent
                    src/*.cxx
                    PUBLIC_HEADERS ISF_FatrasEvent
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks DataModel SGTools Identifier InDetPrepRawData ISF_FatrasDetDescrModel TrkPrepRawData TrkRIO_OnTrack
+                   LINK_LIBRARIES ${ROOT_LIBRARIES} AthLinks DataModel SGTools Identifier InDetPrepRawData ISF_FatrasDetDescrModel TrkPrepRawData TrkRIO_OnTrack EventContainers
                    PRIVATE_LINK_LIBRARIES GaudiKernel )
 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEvent/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasEvent/cmt/requirements
deleted file mode 100644
index 77965aff2769e006117d9eb69f2441342766f287..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEvent/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package ISF_FatrasEvent
-
-author Noemi Calace <Noemi.Calace@cern.ch>
-
-#################################################################
-# public use statements
-public
-use AtlasPolicy                 AtlasPolicy-*
-use AtlasROOT                   AtlasROOT-*                      External
-use Identifier                  Identifier-*                     DetectorDescription
-use AthLinks                    AthLinks-*                       Control
-use DataModel                   DataModel-*                      Control
-use ISF_FatrasDetDescrModel     ISF_FatrasDetDescrModel-*        Simulation/ISF/ISF_Fatras	
-use InDetPrepRawData            InDetPrepRawData-*               InnerDetector/InDetRecEvent
-use TrkRIO_OnTrack              TrkRIO_OnTrack-*                 Tracking/TrkEvent
-use SGTools                     SGTools-*                        Control
-use TrkPrepRawData              TrkPrepRawData-*                 Tracking/TrkEvent
-# private use statements
-private
-use GaudiInterface              GaudiInterface-*                External
-
-public
-library ISF_FatrasEvent *.cxx
-apply_pattern installed_library
-
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/cmt/requirements
deleted file mode 100644
index 68df551dbb4e3b73d790a6c03430170559164518..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventAthenaPool/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package ISF_FatrasEventAthenaPool
-
-author Noemi Calace <Noemi.Calace@cern.ch>
-
-use AtlasPolicy          AtlasPolicy-* 
-
-private
-use GaudiInterface       GaudiInterface-*       External
-use ISF_FatrasEventTPCnv ISF_FatrasEventTPCnv-* Simulation/ISF/ISF_Fatras
-use ISF_FatrasEvent      ISF_FatrasEvent-*      Simulation/ISF/ISF_Fatras
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*     Database/AthenaPOOL
-use AtlasSealCLHEP       AtlasSealCLHEP-*       Database
-end_private 
-
-use AthenaPoolUtilities  AthenaPoolUtilities-*  Database/AthenaPOOL
-
-# Converters for the rdo containers and hit collections
-apply_pattern poolcnv typesWithNamespace="iFatras::PlanarClusterContainer" \
-	              files="-s=${ISF_FatrasEvent_root}/ISF_FatrasEvent \
-                             PlanarClusterContainer.h"	
-				 
-
-
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/cmt/requirements
deleted file mode 100644
index 39d72fb2d47293e5792a8f2b3b22f35a3fb57e27..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,51 +0,0 @@
-package ISF_FatrasEventTPCnv
-
-author  Noemi Calace <noemi.calace@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AthenaPoolCnvSvc           AthenaPoolCnvSvc-*              Database/AthenaPOOL
-use  AthenaPoolUtilities        AthenaPoolUtilities-*           Database/AthenaPOOL
-use  ISF_FatrasEvent            ISF_FatrasEvent-*               Simulation/ISF/ISF_Fatras/
-use  InDetEventTPCnv            InDetEventTPCnv-*	        InnerDetector/InDetEventCnv
-use  TrkEventTPCnv              TrkEventTPCnv-*                 Tracking/TrkEventCnv
-use  ISF_FatrasDetDescrModel    ISF_FatrasDetDescrModel-*       Simulation/ISF/ISF_Fatras/
-use  Identifier                 Identifier-*                    DetectorDescription
-private
-use  CxxUtils                   CxxUtils-*                      Control
-use  AthenaKernel               AthenaKernel-*                  Control
-use  AtlasReflex                AtlasReflex-*                   External                        -no_auto_imports
-use  AthAllocators              AthAllocators-*                 Control
-use  GaudiInterface             GaudiInterface-*                External
-use  GeoPrimitives              GeoPrimitives-*                 DetectorDescription
-use  IdDictParser               IdDictParser-*                  DetectorDescription
-use  InDetIdentifier            InDetIdentifier-*               InnerDetector/InDetDetDescr
-use  StoreGate                  StoreGate-*                     Control
-use  EventPrimitives            EventPrimitives-*               Event
-use  TrkGeometry                TrkGeometry-*                   Tracking/TrkDetDescr
-end_private
-
-public
-
-apply_pattern tpcnv_library
-library ISF_FatrasEventTPCnv *.cxx \
-	ISF_FatrasEvent/*.cxx
- 
-# The following use is to get the lcgdict pattern.
-# This is "hidden" behind "private" and "no_auto_imports" to keep 
-# clients of EventInfo from seeing excess dependencies
-private
-use AtlasReflex        AtlasReflex-*        External -no_auto_imports
-
-# Pattern to build the dict lib. User should create a single header
-# file: <package>Dict.h which includes all other .h files. See EventInfoDict
-apply_pattern lcgdict dict=ISF_FatrasEventTPCnv  selectionfile=selection.xml headerfiles="../ISF_FatrasEventTPCnv/ISF_FatrasEventTPCnvDict.h"
-
-
-private
-use TestTools      TestTools-*         AtlasTest 
-
-apply_pattern UnitTest_run unit_test=PlanarClusterCnv_p1
-apply_pattern UnitTest_run unit_test=PlanarClusterCnv_p2
-apply_pattern UnitTest_run unit_test=PlanarClusterContainerCnv_p1
-apply_pattern UnitTest_run unit_test=PlanarClusterContainerCnv_p2
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p1_test.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p1_test.cxx
index cd15f61aaa3aba89b8ded99d1266a58d928cea6c..8a0d245771163f9e4a0ffed8574a0af877ebb80c 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p1_test.cxx
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p1_test.cxx
@@ -77,15 +77,12 @@ void compare (const iFatras::PlanarClusterContainer& p1,
   iFatras::PlanarClusterContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
       const iFatras::PlanarClusterCollection& coll1 = **it1;
       const iFatras::PlanarClusterCollection& coll2 = **it2;
       assert (coll1.size() == coll2.size());
       for (size_t j = 0; j < coll1.size(); j++) {
         compare (*coll1[j], *coll2[j]);
       }
-    }
     ++it1;
     ++it2;
   }
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p2_test.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p2_test.cxx
index d2adb4548c7fe5540c333be7b71e2609aaba212c..9780503d774ac9da912dcb9d8014402b08edbd03 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p2_test.cxx
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasEventTPCnv/test/PlanarClusterContainerCnv_p2_test.cxx
@@ -77,15 +77,12 @@ void compare (const iFatras::PlanarClusterContainer& p1,
   iFatras::PlanarClusterContainer::const_iterator it2e = p2.end();
   while (it1 != it1e && it2 != it2e) {
     assert (it1.hashId() == it2.hashId());
-    assert (it1->hasData() == it2->hasData());
-    if (it1->hasData()) {
       const iFatras::PlanarClusterCollection& coll1 = **it1;
       const iFatras::PlanarClusterCollection& coll2 = **it2;
       assert (coll1.size() == coll2.size());
       for (size_t j = 0; j < coll1.size(); j++) {
         compare (*coll1[j], *coll2[j]);
       }
-    }
     ++it1;
     ++it2;
   }
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasInterfaces/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasInterfaces/cmt/requirements
deleted file mode 100644
index 02be9e676b2948c14ac0ee9c78fb69fba3d93cc5..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasInterfaces/cmt/requirements
+++ /dev/null
@@ -1,32 +0,0 @@
-package ISF_FatrasInterfaces
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-
-################## public include ##############################
-use DataModel           DataModel-*                  Control
-use GaudiInterface      GaudiInterface-*             External
-
-# Trk
-use TrkEventPrimitives  TrkEventPrimitives-*         Tracking/TrkEvent
-use TrkParameters       TrkParameters-*              Tracking/TrkEvent
-use TrkNeutralParameters       TrkNeutralParameters-*              Tracking/TrkEvent
-use GeoPrimitives       GeoPrimitives-*              DetectorDescription
-use TrkExInterfaces     TrkExInterfaces-*            Tracking/TrkExtrapolation
-#use EventPrimitives     EventPrimitives-*            Event
-use TrkExUtils          TrkExUtils-*                 Tracking/TrkExtrapolation
-
-# ISF
-use ISF_Event           ISF_Event-*                  Simulation/ISF/ISF_Core
-
-# use the following to compile with debug information
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-# This setting is needed to set up an interface library in the package for the
-# CMake build:
-apply_pattern cmake_add_command command=metalibrary
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/cmt/requirements
deleted file mode 100644
index 9dd876dd9a5598a89dc903b7af18e2f79e6c1212..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/cmt/requirements
+++ /dev/null
@@ -1,51 +0,0 @@
-package ISF_FatrasRecoTools
-
-author Noemi Calace <Noemi.Calace@cern.ch>
-
-#################################################################
-# public use statements
-public
-use AtlasPolicy                 AtlasPolicy-*
-use AthenaBaseComps             AthenaBaseComps-*             Control
-use ISF_FatrasEvent             ISF_FatrasEvent-*             Simulation/ISF/ISF_Fatras	
-use GeoPrimitives               GeoPrimitives-*               DetectorDescription
-use TrkParameters               TrkParameters-*               Tracking/TrkEvent
-use TrkEventPrimitives          TrkEventPrimitives-*          Tracking/TrkEvent
-use TrkToolInterfaces           TrkToolInterfaces-*           Tracking/TrkTools
-use TrkSpacePoint               TrkSpacePoint-*               Tracking/TrkEvent
-use Identifier                  Identifier-*                  DetectorDescription
-use TrkToolInterfaces           TrkToolInterfaces-*           Tracking/TrkTools
-use TrkPrepRawData              TrkPrepRawData-*              Tracking/TrkEvent
-use ISF_FatrasEvent             ISF_FatrasEvent-*             Simulation/ISF/ISF_Fatras
-use TrkTrackSummary             TrkTrackSummary-*             Tracking/TrkEvent
-use TrkTruthTrackInterfaces     TrkTruthTrackInterfaces-*     Tracking/TrkTruthTracks
-
-private
-use GaudiInterface              GaudiInterface-*              External
-use EventPrimitives             EventPrimitives-*             Event
-use ISF_FatrasDetDescrModel     ISF_FatrasDetDescrModel-*     Simulation/ISF/ISF_Fatras	
-use SiSpacePoint                SiSpacePoint-*                InnerDetector/InDetRecEvent
-use AtlasDetDescr               AtlasDetDescr-*               DetectorDescription
-use InDetIdentifier             InDetIdentifier-*             InnerDetector/InDetDetDescr
-use TrkPrepRawData		TrkPrepRawData-* 	      Tracking/TrkEvent
-use InDetPrepRawData		InDetPrepRawData-*	      InnerDetector/InDetRecEvent
-use TrkDetElementBase           TrkDetElementBase-*           Tracking/TrkDetDescr 
-use TrkRIO_OnTrack		TrkRIO_OnTrack-*	      Tracking/TrkEvent
-use TrkTrack			TrkTrack-*		      Tracking/TrkEvent
-use AtlasROOT			AtlasROOT-*		      External
-use TrkCompetingRIOsOnTrack	TrkCompetingRIOsOnTrack-*     Tracking/TrkEvent
-use AtlasHepMC                  AtlasHepMC-*		      External
-use TrkTruthData	        TrkTruthData-*       	      Tracking/TrkEvent
-use TrkEventUtils               TrkEventUtils-*               Tracking/TrkEvent
-
-public
-library ISF_FatrasRecoTools *.cxx components/*.cxx
-apply_pattern installed_library
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
\ No newline at end of file
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/ISF_TrackSummaryHelperTool.cxx b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/ISF_TrackSummaryHelperTool.cxx
index 6fa5c4b9cb862777d41cdaa3a8ab0bc35d160cec..07ab7ca102d436ce85bef2c44eeefb85440ba8de 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/ISF_TrackSummaryHelperTool.cxx
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasRecoTools/src/ISF_TrackSummaryHelperTool.cxx
@@ -94,9 +94,6 @@ void iFatras::ISF_TrackSummaryHelperTool::analyse(const Trk::Track& track,
       if (msgLvl(MSG::DEBUG)) msg() << "Pixel outlier info storing" << endmsg;
 
       information[Trk::numberOfPixelOutliers]++;
-      if (m_pixelId->is_blayer(id)){
-	information[Trk::numberOfBLayerOutliers]++;
-      }
       if (m_pixelId->layer_disk(id)==0 && m_pixelId->is_barrel(id)){
 	information[Trk::numberOfInnermostPixelLayerOutliers]++;
       }
@@ -108,7 +105,6 @@ void iFatras::ISF_TrackSummaryHelperTool::analyse(const Trk::Track& track,
       if (msgLvl(MSG::DEBUG)) msg() << "Pixel info storing" << endmsg;
 
       information[Trk::numberOfPixelHits]++;
-      if ((m_pixelId->is_blayer(id))) information[Trk::numberOfBLayerHits]++; // found b layer hit
       if (m_pixelId->layer_disk(id)==0 && m_pixelId->is_barrel(id)) information[Trk::numberOfInnermostPixelLayerHits]++;
       if (m_pixelId->layer_disk(id)==1 && m_pixelId->is_barrel(id)) information[Trk::numberOfNextToInnermostPixelLayerHits]++;  
       
@@ -130,10 +126,6 @@ void iFatras::ISF_TrackSummaryHelperTool::analyse(const Trk::Track& track,
 	if ( m_assoTool->isShared(*(rot->prepRawData())) ) {
 	  if (msgLvl(MSG::DEBUG)) msg() << "shared Pixel hit found" << endmsg;
 	  information[Trk::numberOfPixelSharedHits]++;
-	  if ( (m_pixelId->is_blayer(id) ) ) {
-	    if (msgLvl(MSG::DEBUG)) msg() << "--> shared Pixel hit is in b-layer" << endmsg;
-	    information[Trk::numberOfBLayerSharedHits]++;        
-	  }
 	  if ( (m_pixelId->is_barrel(id) && m_pixelId->layer_disk(id)==0) ) {
 	    if (msgLvl(MSG::DEBUG)) msg() << "--> shared Pixel hit is in innermost layer" << endmsg;
 	    information[Trk::numberOfInnermostPixelLayerSharedHits]++;        
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/cmt/requirements
deleted file mode 100644
index bc5f365dd8e80f017f635486dd3fb5bd9bee3c00..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/cmt/requirements
+++ /dev/null
@@ -1,33 +0,0 @@
-package ISF_FatrasServices
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-#################################################################
-# public use statements
-use AtlasPolicy               AtlasPolicy-*
-use GaudiInterface            GaudiInterface-*             External
-use AthenaBaseComps           AthenaBaseComps-*            Control
-
-use ISF_Interfaces            ISF_Interfaces-*             Simulation/ISF/ISF_Core
-
-use TrkTrack                  TrkTrack-*                   Tracking/TrkEvent
-
-use AtlasDetDescr             AtlasDetDescr-*              DetectorDescription
-
-#################################################################
-# private use statements
-private
-use StoreGate                 StoreGate-*                  Control
-use ISF_Event                 ISF_Event-*                  Simulation/ISF/ISF_Core
-
-public
-library ISF_FatrasServices *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-
-# use the following to compile with debug information
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py
index 6456c3575bf2ced778d3c954b5074c5f1ecddb4c..0aa171032c0c021337902d588ea6e17fc2d3e5d9 100644
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py
+++ b/Simulation/ISF/ISF_Fatras/ISF_FatrasServices/python/ISF_FatrasServicesConfig.py
@@ -17,6 +17,7 @@ from ISF_Config.ISF_jobProperties import ISF_Flags # IMPORTANT: Flags must be se
 from ISF_FatrasServices.ISF_FatrasJobProperties import ISF_FatrasFlags
 from ISF_FatrasServices.FatrasTuning import FatrasTuningFlags
 from ISF_FatrasServices.FatrasValidation import FatrasValidationFlags
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
 
 #################################################################################
 # Material for the Geometry
@@ -241,7 +242,7 @@ def getFatrasParticleDecayHelper(name="ISF_FatrasParticleDecayHelper", **kwargs)
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("G4RandomStreamName"    , "FatrasG4") # TODO: read stream name "FatrasG4" from Fatras jobProperties
     kwargs.setdefault("ParticleBroker"  , getService('ISF_ParticleBrokerSvc'))
-    kwargs.setdefault("ParticleTruthSvc", ISF_Flags.TruthService.get_Value())
+    kwargs.setdefault("ParticleTruthSvc", simFlags.TruthStrategy.TruthServiceName())
     kwargs.setdefault("PDGToG4ParticleConverter", getPublicTool('ISF_FatrasPdgG4Particle'))
     # the validation output
     kwargs.setdefault("ValidationMode"              , ISF_Flags.ValidationMode())
@@ -265,7 +266,7 @@ def getFatrasG4HadIntProcessor(name="ISF_FatrasG4HadIntProcessor", **kwargs):
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("ParticleBroker"      , getService('ISF_ParticleBrokerSvc'))
-    kwargs.setdefault("TruthRecordSvc"      , ISF_Flags.TruthService.get_Value())
+    kwargs.setdefault("TruthRecordSvc"      , simFlags.TruthStrategy.TruthServiceName())
     kwargs.setdefault("PhysicsValidationTool"       , getPublicTool('ISF_FatrasPhysicsValidationTool'))
     kwargs.setdefault('ValidationMode'      , ISF_Flags.ValidationMode())
     kwargs.setdefault("MomentumCut"        , FatrasTuningFlags.MomCutOffSec())
@@ -280,7 +281,7 @@ def getFatrasParametricHadIntProcessor(name="ISF_FatrasParametricHadIntProcessor
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("ParticleBroker"      , getService('ISF_ParticleBrokerSvc'))
-    kwargs.setdefault("TruthRecordSvc"      , ISF_Flags.TruthService.get_Value())
+    kwargs.setdefault("TruthRecordSvc"      , simFlags.TruthStrategy.TruthServiceName())
     kwargs.setdefault("HadronicInteractionScaleFactor"  , FatrasTuningFlags.HadronicInteractionProbabilityScalor())
     kwargs.setdefault("MinimumHadronicInitialEnergy"    , FatrasTuningFlags.MomCutOffSec())
     kwargs.setdefault("MinimumHadronicOutEnergy"        , FatrasTuningFlags.MomCutOffSec())
@@ -301,7 +302,7 @@ def getFatrasConversionCreator(name="ISF_FatrasConversionCreator", **kwargs):
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("ParticleBroker"  , getService('ISF_ParticleBrokerSvc'))
-    kwargs.setdefault("TruthRecordSvc"  , ISF_Flags.TruthService.get_Value())
+    kwargs.setdefault("TruthRecordSvc"  , simFlags.TruthStrategy.TruthServiceName())
     kwargs.setdefault("PhysicsValidationTool"       , getPublicTool('ISF_FatrasPhysicsValidationTool'))
     kwargs.setdefault("PhysicsProcessCode"              , 14) # TODO: to be taken from central definition
     kwargs.setdefault('ValidationMode'      , ISF_Flags.ValidationMode())
@@ -315,7 +316,7 @@ def getFatrasProcessSamplingTool(name="ISF_FatrasProcessSamplingTool", **kwargs)
     from G4AtlasApps.SimFlags import SimFlags,simFlags
     kwargs.setdefault( "RandomNumberService", simFlags.RandomSvc())
     # truth record
-    kwargs.setdefault("TruthRecordSvc"      , ISF_Flags.TruthService.get_Value())
+    kwargs.setdefault("TruthRecordSvc"      , simFlags.TruthStrategy.TruthServiceName())
     # decays
     kwargs.setdefault("ParticleDecayHelper" , getPublicTool('ISF_FatrasParticleDecayHelper'))
     # photon conversion
@@ -401,7 +402,7 @@ def getFatrasMaterialUpdator(name="ISF_FatrasMaterialUpdator", **kwargs):
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("ParticleBroker"              , getService('ISF_ParticleBrokerSvc'))
-    kwargs.setdefault("TruthRecordSvc"              , ISF_Flags.TruthService.get_Value())
+    kwargs.setdefault("TruthRecordSvc"              , simFlags.TruthStrategy.TruthServiceName())
     # hadronic interactions
     kwargs.setdefault("HadronicInteraction"         , True)
     #kwargs.setdefault("HadronicInteractionProcessor", getPublicTool('ISF_FatrasParametricHadIntProcessor'))
@@ -437,7 +438,7 @@ def getFatrasMaterialEffectsEngine(name="ISF_FatrasMaterialEffectsEngine", **kwa
     kwargs.setdefault("RandomNumberService"         , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"            , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("ParticleBroker"              , getService('ISF_ParticleBrokerSvc'))
-    kwargs.setdefault("TruthRecordSvc"              , ISF_Flags.TruthService.get_Value())
+    kwargs.setdefault("TruthRecordSvc"              , simFlags.TruthStrategy.TruthServiceName())
     kwargs.setdefault("ProcessSamplingTool"         , getPublicTool('ISF_FatrasProcessSamplingTool'))
     kwargs.setdefault("ParticleDecayHelper"         , getPublicTool('ISF_FatrasParticleDecayHelper'))
     # energy loss
@@ -527,32 +528,53 @@ def getFatrasExEngine(name="ISF_FatrasExEngine", **kwargs):
 #   Fatras Hadronic Interaction Processor
 #   hadronic interaction creator
 def getFatrasHitCreatorPixel(name="ISF_FatrasHitCreatorPixel", **kwargs):
+    bare_collection_name = "PixelHits"
+    mergeable_collection_suffix = "_Fatras"
+    merger_input_property = "PixelHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
+
     from G4AtlasApps.SimFlags import SimFlags,simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("IdHelperName"    , 'PixelID')
-    kwargs.setdefault("CollectionName"  , 'PixelHits')
+    kwargs.setdefault("CollectionName"  , hits_collection_name)
+
+    from FastCaloSimHit.FastCaloSimHitConf import FastHitConvertTool
     kwargs.setdefault("UseConditionsSvc", False)
 
     from ISF_FatrasToolsID.ISF_FatrasToolsIDConf import iFatras__HitCreatorSilicon
     return iFatras__HitCreatorSilicon(name, **kwargs )
 
 def getFatrasHitCreatorSCT(name="ISF_FatrasHitCreatorSCT", **kwargs):
+    bare_collection_name = "SCT_Hits"
+    mergeable_collection_suffix = "_Fatras"
+    merger_input_property = "SCTHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     from G4AtlasApps.SimFlags import SimFlags,simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("IdHelperName"    , 'SCT_ID')
-    kwargs.setdefault("CollectionName"  , 'SCT_Hits')
+    kwargs.setdefault("CollectionName"  , hits_collection_name)
     kwargs.setdefault("UseConditionsSvc", False)
 
     from ISF_FatrasToolsID.ISF_FatrasToolsIDConf import iFatras__HitCreatorSilicon
     return iFatras__HitCreatorSilicon(name, **kwargs )
 
 def getFatrasHitCreatorTRT(name="ISF_FatrasHitCreatorTRT", **kwargs):
+    bare_collection_name = "TRTUncompressedHits"
+    mergeable_collection_suffix = "_Fatras"
+    merger_input_property = "TRTUncompressedHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     from G4AtlasApps.SimFlags import SimFlags,simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
-    kwargs.setdefault("CollectionName"  , 'TRTUncompressedHits')
+    kwargs.setdefault("CollectionName"  , hits_collection_name)
 
     from ISF_FatrasToolsID.ISF_FatrasToolsIDConf import iFatras__HitCreatorTRT
     return iFatras__HitCreatorTRT(name, **kwargs )
@@ -588,10 +610,38 @@ def getFatrasPileupSimHitCreatorID(name="ISF_FatrasPileupSimHitCreatorID", **kwa
     return getFatrasSimHitCreatorID(name, **kwargs )
 
 def getFatrasSimHitCreatorMS(name="ISF_FatrasSimHitCreatorMS", **kwargs):
+    mergeable_collection_suffix = "_Fatras"
+
+    mdt_bare_collection_name = "MDT_Hits"
+    mdt_merger_input_property = "MDTHits"
+    mdt_hits_collection_name = generate_mergeable_collection_name(mdt_bare_collection_name,
+                                                                  mergeable_collection_suffix,
+                                                                  mdt_merger_input_property)
+    rpc_bare_collection_name = "RPC_Hits"
+    rpc_merger_input_property = "RPCHits"
+    rpc_hits_collection_name = generate_mergeable_collection_name(rpc_bare_collection_name,
+                                                                  mergeable_collection_suffix,
+                                                                  rpc_merger_input_property)
+    tgc_bare_collection_name = "TGC_Hits"
+    tgc_merger_input_property = "TGCHits"
+    tgc_hits_collection_name = generate_mergeable_collection_name(tgc_bare_collection_name,
+                                                                  mergeable_collection_suffix,
+                                                                  tgc_merger_input_property)
+    csc_bare_collection_name = "CSC_Hits"
+    csc_merger_input_property = "CSCHits"
+    csc_hits_collection_name = generate_mergeable_collection_name(csc_bare_collection_name,
+                                                                  mergeable_collection_suffix,
+                                                                  csc_merger_input_property)
+
     from G4AtlasApps.SimFlags import SimFlags,simFlags
     kwargs.setdefault("RandomNumberService" , simFlags.RandomSvc() )
     kwargs.setdefault("RandomStreamName"    , ISF_FatrasFlags.RandomStreamName())
     kwargs.setdefault("Extrapolator" , getPublicTool('ISF_FatrasExtrapolator'))
+    kwargs.setdefault("MDTCollectionName", mdt_hits_collection_name)
+    kwargs.setdefault("RPCCollectionName", rpc_hits_collection_name)
+    kwargs.setdefault("TGCCollectionName", tgc_hits_collection_name)
+    kwargs.setdefault("CSCCollectionName", csc_hits_collection_name)
+
     from ISF_FatrasToolsMS.ISF_FatrasToolsMSConf import iFatras__SimHitCreatorMS
     return iFatras__SimHitCreatorMS(name, **kwargs )
 
@@ -661,12 +711,12 @@ def getFatrasSimServiceID(name="ISF_FatrasSimSvc", **kwargs):
 
     # set the output level
     kwargs.setdefault("OutputLevel"         , ISF_FatrasFlags.OutputLevelGeneral())
-    
+
     # register Fatras random number stream if not already registered
     from G4AtlasApps.SimFlags import SimFlags,simFlags
     if not simFlags.RandomSeedList.checkForExistingSeed( "FatrasRnd" ):
       simFlags.RandomSeedList.addSeed( "FatrasRnd", 81234740, 23474923 )
-        
+
     from ISF_FatrasServices.ISF_FatrasServicesConf import iFatras__FatrasSimSvc
     return iFatras__FatrasSimSvc(name, **kwargs )
 
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/cmt/requirements
deleted file mode 100644
index afec11567fa921dd29cc95c82f02c2fb78114bac..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasTools/cmt/requirements
+++ /dev/null
@@ -1,74 +0,0 @@
-package ISF_FatrasTools
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-public
-########## Control #############################################################
-use AtlasPolicy              AtlasPolicy-*
-use AthenaBaseComps          AthenaBaseComps-*         Control
-use AthenaKernel             AthenaKernel-*            Control
-use GaudiInterface           GaudiInterface-*          External
-
-########## External ############################################################
-use AtlasCLHEP               AtlasCLHEP-*              External
-
-########## ISF #################################################################
-use ISF_Event                ISF_Event-*               Simulation/ISF/ISF_Core
-use ISF_FatrasInterfaces     ISF_FatrasInterfaces-*    Simulation/ISF/ISF_Fatras
-use ISF_Interfaces           ISF_Interfaces-*          Simulation/ISF/ISF_Core 
- 
-########## Barcode #############################################################
-use BarcodeEvent             BarcodeEvent-*            Simulation/Barcode
-
-########## Tracking ############################################################
-use TrkDetDescrUtils         TrkDetDescrUtils-*        Tracking/TrkDetDescr
-use TrkEventPrimitives       TrkEventPrimitives-*      Tracking/TrkEvent
-use TrkExInterfaces          TrkExInterfaces-*         Tracking/TrkExtrapolation
-use TrkExUtils               TrkExUtils-*              Tracking/TrkExtrapolation
-use TrkParameters            TrkParameters-*           Tracking/TrkEvent
-use EventPrimitives          EventPrimitives-*         Event
-use GeoPrimitives            GeoPrimitives-*           DetectorDescription
-use TrkGeometry              TrkGeometry-*             Tracking/TrkDetDescr
-
-private
-########## Control #############################################################
-use StoreGate                StoreGate-*                Control
-
-########## External ############################################################
-use AtlasROOT                AtlasROOT-*                External
-
-########## RandomNumbers #######################################################
-use AtlasCLHEP_RandomGenerators AtlasCLHEP_RandomGenerators-* Simulation/Tools
-
-########## Tracking ############################################################
-use TrkVolumes               TrkVolumes-*              Tracking/TrkDetDescr
-use TrkDetDescrInterfaces    TrkDetDescrInterfaces-*   Tracking/TrkDetDescr
-use TrkTrack                 TrkTrack-*                Tracking/TrkEvent
-use TrkMaterialOnTrack       TrkMaterialOnTrack-*      Tracking/TrkEvent
-use TrkNeutralParameters     TrkNeutralParameters-*    Tracking/TrkEvent
-use TrkSurfaces              TrkSurfaces-*             Tracking/TrkDetDescr
-
-########## ISF #################################################################
-
-########## Fast Simulation######################################################
-use FastSimulationEvent      FastSimulationEvent-*      Simulation/FastSimulation
-
-########## DetectorDescription #################################################
-use AtlasDetDescr            AtlasDetDescr-*             DetectorDescription
-
-########## SUSY particles ######################################################
-## does not link at the moment (04/02/2008)
-#use Sleptons                 Sleptons-*                 Simulation/G4Extensions
-#use Gauginos                 Gauginos-*                 Simulation/G4Extensions
-
-
-public
-library ISF_FatrasTools *.cxx components/*.cxx
-apply_pattern component_library
-
-# use the following to compile with debug information
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsG4/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsG4/cmt/requirements
deleted file mode 100755
index 2637cc19982d98f83b44fcd6b3642035577b86d6..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsG4/cmt/requirements
+++ /dev/null
@@ -1,60 +0,0 @@
-package ISF_FatrasToolsG4
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-public
-use AtlasPolicy              AtlasPolicy-*
-use AthenaKernel             AthenaKernel-*             Control
-use AthenaBaseComps          AthenaBaseComps-*          Control
-use GaudiInterface           GaudiInterface-*           External
-
-########## Barcode ##########################################################
-use BarcodeEvent             BarcodeEvent-*             Simulation/Barcode/ 
-
-########## ISF ##############################################################
-use ISF_Event                ISF_Event-*                Simulation/ISF/ISF_Core
-
-########## ISF Fatras #######################################################
-use ISF_FatrasInterfaces     ISF_FatrasInterfaces-*     Simulation/ISF/ISF_Fatras
-
-########## Geant4 ###########################################################
-use Geant4                   Geant4-*                   External
-
-########## Tracking #########################################################
-use TrkEventPrimitives       TrkEventPrimitives-*       Tracking/TrkEvent
-
-private
-
-########## Control #############################################################
-use StoreGate                StoreGate-*                Control
-
-########## External ############################################################
-use AtlasCLHEP               AtlasCLHEP-*               External
-use AtlasHepMC               AtlasHepMC-*               External
-use AtlasROOT                AtlasROOT-*                External
-use AtlasBoost               AtlasBoost-*               External
-
-########## Tracking ############################################################
-use TrkGeometry              TrkGeometry-*              Tracking/TrkDetDescr
-
-########## ISF ##############################################################
-use ISF_Interfaces           ISF_Interfaces-*           Simulation/ISF/ISF_Core   
-use ISF_Geant4Tools          ISF_Geant4Tools-*          Simulation/ISF/ISF_Geant4
-
-########## SUSY particles ######################################################
-## does not link at the moment (04/02/2008)
-#use Sleptons                 Sleptons-*                 Simulation/G4Extensions
-#use Gauginos                 Gauginos-*                 Simulation/G4Extensions
-
-
-public
-library ISF_FatrasToolsG4 *.cxx components/*.cxx
-apply_pattern component_library
-
-# use the following to compile with debug information
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/cmt/requirements
deleted file mode 100644
index a6482f2eec9268a898445c811eaad04b75a5a13d..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsID/cmt/requirements
+++ /dev/null
@@ -1,76 +0,0 @@
-package ISF_FatrasToolsID
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-#################################################################
-# public use statements
-public
-use AtlasPolicy              AtlasPolicy-*
-use GaudiInterface           GaudiInterface-*             External
-use AthenaBaseComps          AthenaBaseComps-*            Control
-use AthenaKernel             AthenaKernel-*               Control
-use AtlasCLHEP               AtlasCLHEP-*                 External
-use DataModel                DataModel-*                  Control
-use Identifier               Identifier-*                 DetectorDescription
-
-########## Fatras dependencies #####################################################
-use ISF_FatrasInterfaces     ISF_FatrasInterfaces-*       Simulation/ISF/ISF_Fatras
-
-######### ID dependencies ##########################################################
-use InDetSimEvent            InDetSimEvent-*              InnerDetector
-
-######### Tracking dependencies ####################################################
-use TrkParameters            TrkParameters-*              Tracking/TrkEvent
-use TrkExInterfaces          TrkExInterfaces-*            Tracking/TrkExtrapolation
-
-
-#################################################################
-# private use statements
-private
-use AtlasROOT                AtlasROOT-*                  External
-use StoreGate                StoreGate-*                  Control
-use AtlasDetDescr            AtlasDetDescr-*              DetectorDescription
-use IdDictDetDescr           IdDictDetDescr-*             DetectorDescription
-
-use InDetReadoutGeometry     InDetReadoutGeometry-*       InnerDetector/InDetDetDescr
-use SiClusterizationTool     SiClusterizationTool-*       InnerDetector/InDetRecTools
-
-########## ISF dependencies ########################################################
-use ISF_Event                ISF_Event-*                  Simulation/ISF/ISF_Core
-use ISF_Interfaces           ISF_Interfaces-*             Simulation/ISF/ISF_Core
-use ISF_FatrasDetDescrModel  ISF_FatrasDetDescrModel-*    Simulation/ISF/ISF_Fatras
-########## Fatras dependencies #####################################################
-# use FatrasDetDescrUtils      FatrasDetDescrUtils-*        Simulation/Fatras
-
-######### Tracking dependencies ####################################################
-use TrkDetElementBase        TrkDetElementBase-*          Tracking/TrkDetDescr
-use TrkSurfaces              TrkSurfaces-*                Tracking/TrkDetDescr
-use TrkTrack                 TrkTrack-*                   Tracking/TrkEvent
-use TrkMeasurementBase       TrkMeasurementBase-*         Tracking/TrkEvent
-use TrkRIO_OnTrack           TrkRIO_OnTrack-*             Tracking/TrkEvent
-use TrkToolInterfaces        TrkToolInterfaces-*          Tracking/TrkTools
-use TrkExUtils               TrkExUtils-*                 Tracking/TrkExtrapolation
-use TrkEventPrimitives       TrkEventPrimitives-*         Tracking/TrkEvent
-
-######### ID dependencies ##########################################################
-use InDetIdentifier          InDetIdentifier-*            InnerDetector/InDetDetDescr
-use InDetPrepRawData         InDetPrepRawData-*           InnerDetector/InDetRecEvent
-use InDetRIO_OnTrack         InDetRIO_OnTrack-*           InnerDetector/InDetRecEvent
-use InDetConditionsSummaryService   InDetConditionsSummaryService-*   InnerDetector/InDetConditions
-use TRT_ConditionsServices   TRT_ConditionsServices-*     InnerDetector/InDetConditions
-
-######### Simulation dependencies ##################################################
-#use TrackRecord              TrackRecord-*                Simulation/G4Sim
-
-#declare_runtime_extras extras = ../Data/*.root
-
-public
-library ISF_FatrasToolsID *.cxx components/*.cxx
-apply_pattern component_library
-
-# use the following to compile with debug information
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/cmt/requirements b/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/cmt/requirements
deleted file mode 100644
index a7f82298deda3d7f271bd138e779932ff026d77d..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Fatras/ISF_FatrasToolsMS/cmt/requirements
+++ /dev/null
@@ -1,59 +0,0 @@
-package ISF_FatrasToolsMS
-
-manager Sharka Todorova <Sarka.Todorova@cern.ch>
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-################## public dependencies ######################
-public
-
-# External and control
-use AtlasPolicy          AtlasPolicy-* 
-use GaudiInterface       GaudiInterface-*           External
-use AthenaBaseComps      AthenaBaseComps-*          Control
-use AthenaKernel         AthenaKernel-*             Control
-
-# iFatras dependencies
-use ISF_FatrasInterfaces ISF_FatrasInterfaces-*   Simulation/ISF/ISF_Fatras
-
-# Detector description
-use Identifier       Identifier-*       DetectorDescription
-
-# Tracking dependencies
-#use TrkEventPrimitives  TrkEventPrimitives-* Tracking/TrkEvent
-use TrkParameters       TrkParameters-*      Tracking/TrkEvent
-use TrkExInterfaces    TrkExInterfaces-*     Tracking/TrkExtrapolation
-
-# Muons dependence
-use MuonSimEvent        MuonSimEvent-*         MuonSpectrometer
-
-################## private dependencies ######################
-private
-
-# External
-use AtlasCLHEP               AtlasCLHEP-*               External
-
-# ISF
-use ISF_Event           ISF_Event-*            Simulation/ISF/ISF_Core
-use ISF_Interfaces      ISF_Interfaces-*       Simulation/ISF/ISF_Core
-
-# Muon
-use MuonIdHelpers       MuonIdHelpers-*        MuonSpectrometer
-use MuonReadoutGeometry MuonReadoutGeometry-*  MuonSpectrometer/MuonDetDescr
-use MuonTGRecTools      MuonTGRecTools-*       MuonSpectrometer/MuonReconstruction/MuonRecTools 
-#use MuonRecHelperTools  MuonRecHelperTools-*   MuonSpectrometer/MuonReconstruction/MuonRecTools 
-
-# Tracking dependencies
-use TrkTrack            TrkTrack-*           Tracking/TrkEvent
-#use TrkGeometry         TrkGeometry-*        Tracking/TrkDetDescr 
-
-public
-apply_pattern component_library
-library ISF_FatrasToolsMS *.cxx components/*.cxx
-
-# use the following to compile with debug information
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonServices/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonServices/cmt/requirements
deleted file mode 100644
index 591ae2f92192cc48af7c720b20708bc1411e423d..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonServices/cmt/requirements
+++ /dev/null
@@ -1,41 +0,0 @@
-package ISF_Geant4CommonServices
-
-author Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-
-#################################################################
-# public use statements
-#################################################################
-public
-# Framework
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*         External
-
-
-#################################################################
-# private use statements
-#################################################################
-private
-# Framework
-use AthenaBaseComps             AthenaBaseComps-*        Control
-# Geant4
-use Geant4                      Geant4-*                 External
-# Geometry
-use AtlasDetDescr               AtlasDetDescr-*          DetectorDescription
-use SubDetectorEnvelopes        SubDetectorEnvelopes-*   AtlasGeometryCommon
-# ISF
-use ISF_Event                   ISF_Event-*              Simulation/ISF/ISF_Core
-use ISF_Interfaces              ISF_Interfaces-*         Simulation/ISF/ISF_Core
-
-
-public
-library ISF_Geant4CommonServices *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-
-private
-macro_append ISF_Geant4CommonServicesConf_dependencies " install_python_modules"
-# use this to enable debugging for this package
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-end_private
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools/cmt/requirements
deleted file mode 100644
index 92b0093e5c86d105cc6e3c3f910bed4b1f1b91f0..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools/cmt/requirements
+++ /dev/null
@@ -1,35 +0,0 @@
-package ISF_Geant4CommonTools
-
-author Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-
-#################################################################
-# public use statements
-#################################################################
-public
-# Framework
-use AtlasPolicy          AtlasPolicy-*
-use GaudiInterface       GaudiInterface-*        External
-
-#################################################################
-# public use statements
-#################################################################
-private
-# Framework
-use AthenaBaseComps      AthenaBaseComps-*       Control
-# Geant4
-use TrackRecord          TrackRecord-*           Simulation/G4Sim
-# ISF
-use ISF_Event            ISF_Event-*             Simulation/ISF/ISF_Core
-use ISF_Interfaces       ISF_Interfaces-*        Simulation/ISF/ISF_Core
-
-
-public
-library ISF_Geant4CommonTools *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-
-private
-# use this to enable debugging for this package
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools/python/ISF_Geant4CommonToolsConfig.py b/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools/python/ISF_Geant4CommonToolsConfig.py
index 901485e74c25b048e9348086c69b8ec03de34be7..dfcbc352f394dd9305d156fd91229fb28c497dc5 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools/python/ISF_Geant4CommonToolsConfig.py
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4CommonTools/python/ISF_Geant4CommonToolsConfig.py
@@ -16,12 +16,13 @@ from ISF_Config.ISF_jobProperties import ISF_Flags # IMPORTANT: Flags must be se
 
 
 def getEntryLayerTool(name="ISF_EntryLayerTool", **kwargs):
-    kwargs.setdefault('GeoIDSvc'        , getService('ISF_GeoIDSvc')   )
-    kwargs.setdefault('ParticleFilters' , [ ISF_Flags.EntryLayerFilter() ] )
+    kwargs.setdefault('GeoIDSvc'        , 'ISF_GeoIDSvc')
+    from G4AtlasApps.SimFlags import simFlags
+    kwargs.setdefault('ParticleFilters' , [ simFlags.TruthStrategy.EntryLayerFilterName() ] )
 
     from ISF_Geant4CommonTools.ISF_Geant4CommonToolsConf import ISF__EntryLayerTool
     return ISF__EntryLayerTool(name, **kwargs)
 
 def getAFIIEntryLayerTool(name="ISF_AFIIEntryLayerTool", **kwargs):
-    kwargs.setdefault('GeoIDSvc'        , getService('ISF_AFIIGeoIDSvc'))
+    kwargs.setdefault('GeoIDSvc'        , 'ISF_AFIIGeoIDSvc')
     return getEntryLayerTool(name, **kwargs)
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Config/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4Config/cmt/requirements
deleted file mode 100644
index 50bd9fab8fcce7c4319ff6759240ea5c37c08830..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Config/cmt/requirements
+++ /dev/null
@@ -1,10 +0,0 @@
-package ISF_Geant4Config
-
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-
-private
-use AtlasPolicy                 AtlasPolicy-*
-
-branches share
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/cmt/requirements
deleted file mode 100644
index 554b80977dc7f6e7b66cfb673f2f8cb4128167a1..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Event/cmt/requirements
+++ /dev/null
@@ -1,32 +0,0 @@
-package ISF_Geant4Event
-author <Andreas.Petridis@cern.ch>
-
-manager Andreas Petridis <Andreas.Petridis@cern.ch>
-
-public
-use AtlasPolicy           AtlasPolicy-*
-use GaudiInterface        GaudiInterface-*        External
-use AtlasHepMC            AtlasHepMC-*            External
-use ISF_Event             ISF_Event-*             Simulation/ISF/ISF_Core
-use SimHelpers            SimHelpers-*            Simulation/G4Sim
-use BarcodeEvent          BarcodeEvent-*          Simulation/Barcode
-use MCTruth               MCTruth-*               Simulation/G4Sim
-use Geant4                Geant4-*                External
-use AtlasDetDescr 	  AtlasDetDescr-*    	  DetectorDescription
-use ISF_Interfaces        ISF_Interfaces-*        Simulation/ISF/ISF_Core
-
-private
-use GeoPrimitives         GeoPrimitives-*         DetectorDescription
-use AtlasROOT             AtlasROOT-*             External
-
-
-public
-library ISF_Geant4Event *.cxx 
-apply_pattern installed_library
-
-apply_pattern declare_python_modules files="*.py"
- 
-private
-# use this to enable debugging for this package
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Interfaces/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4Interfaces/cmt/requirements
deleted file mode 100644
index ee14c1533f41afef5df23aa6bb55bd1bb6a7bf71..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Interfaces/cmt/requirements
+++ /dev/null
@@ -1,9 +0,0 @@
-package ISF_Geant4Interfaces
-
-author Robert Harrington <roberth@cern.ch>
-
-use AtlasPolicy      AtlasPolicy-*
-
-use GaudiInterface   GaudiInterface-*    External
-
-
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Services/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4Services/cmt/requirements
deleted file mode 100644
index 8ad4c1ce082e1dc95d8b45588faf6b6b091df5ac..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Services/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-package ISF_Geant4Services
-author <andreas.salzburger@cern.ch>
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-#################################################################
-# public use statements
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*         External
-
-#################################################################
-# private use statements
-private
-use AthenaBaseComps             AthenaBaseComps-*        Control
-use Geant4                      Geant4-*                 External
-use G4AtlasInterfaces           G4AtlasInterfaces-*      Simulation/G4Atlas
-use GeoModelInterfaces          GeoModelInterfaces-*     DetectorDescription/GeoModel
-use ISF_Event                   ISF_Event-*              Simulation/ISF/ISF_Core
-use ISF_Geant4Interfaces        ISF_Geant4Interfaces-*   Simulation/ISF/ISF_Geant4
-use ISF_Interfaces              ISF_Interfaces-*         Simulation/ISF/ISF_Core
-use StoreGate                   StoreGate-*              Control
-
-
-public
-library ISF_Geant4Services *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/cmt/requirements
deleted file mode 100644
index dfdd8e332c796d1306a1be8e594b2430f068f8e6..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/cmt/requirements
+++ /dev/null
@@ -1,39 +0,0 @@
-package ISF_Geant4Tools
-
-public
-use AtlasPolicy           AtlasPolicy-*
-use GaudiInterface        GaudiInterface-*        External
-
-use AthenaKernel          AthenaKernel-*          Control
-use Geant4                Geant4-*                External
-use G4AtlasInterfaces     G4AtlasInterfaces-*     Simulation/G4Atlas
-
-private
-use AsgTools		  AsgTools-*		  Control/AthToolSupport
-use AthenaBaseComps       AthenaBaseComps-*       Control
-use AtlasCLHEP            AtlasCLHEP-*            External
-use AtlasDetDescr         AtlasDetDescr-*         DetectorDescription
-use AtlasHepMC            AtlasHepMC-*            External
-use AtlasROOT             AtlasROOT-*             External
-use BarcodeEvent          BarcodeEvent-*          Simulation/Barcode
-use BarcodeInterfaces     BarcodeInterfaces-*     Simulation/Barcode
-use G4AtlasTools          G4AtlasTools-*          Simulation/G4Atlas
-use GeneratorObjects      GeneratorObjects-*      Generators
-use ISF_Event             ISF_Event-*             Simulation/ISF/ISF_Core
-use ISF_Geant4Event       ISF_Geant4Event-*       Simulation/ISF/ISF_Geant4
-use ISF_Geant4Interfaces  ISF_Geant4Interfaces-*  Simulation/ISF/ISF_Geant4
-use ISF_Interfaces        ISF_Interfaces-*        Simulation/ISF/ISF_Core
-use MCTruth               MCTruth-*               Simulation/G4Sim
-use SimHelpers            SimHelpers-*            Simulation/G4Sim
-use StoreGate             StoreGate-*             Control
-use CxxUtils              CxxUtils-*              Control
-public
-library ISF_Geant4Tools *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
-
-private
-# use this to enable debugging for this package
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py
index 7814e5742afafdc4a6d736f946a662c6f4ca1cc2..692695c599d9cb0500cc14a65c86a2acec7ae4a7 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/python/ISF_Geant4ToolsConfig.py
@@ -5,14 +5,14 @@
 
 def getMCTruthUserActionTool(name='ISFMCTruthUserActionTool', **kwargs):
     # get the MT action
-    from ISF_Config.ISF_jobProperties import ISF_Flags
-    kwargs.setdefault('TruthRecordSvc',  ISF_Flags.TruthService.get_Value())
+    from G4AtlasApps.SimFlags import simFlags
+    kwargs.setdefault('TruthRecordSvc',  simFlags.TruthStrategy.TruthServiceName())
     from ISF_Geant4Tools.ISF_Geant4ToolsConf import G4UA__iGeant4__MCTruthUserActionTool
     return G4UA__iGeant4__MCTruthUserActionTool(name, **kwargs)
 
 def addMCTruthUserActionTool(name="ISFMCTruthUserActionTool",system=False):
     from G4AtlasServices import G4AtlasServicesConfig
-    G4AtlasServicesConfig.addAction(name,['BeginOfRun','BeginOfTracking','EndOfTracking'],system)
+    G4AtlasServicesConfig.addAction(name,['Run','Tracking'],system)
 
 ## -----------------------------------------------------------------------------
 ### Base Version
@@ -74,14 +74,13 @@ def getAFII_G4TrackProcessorUserActionTool(name='AFII_G4TrackProcessorUserAction
 
 def addTrackProcessorTool(name,system=False):
     from G4AtlasServices import G4AtlasServicesConfig
-    G4AtlasServicesConfig.addAction(name,['BeginOfRun','BeginOfTracking','BeginOfEvent','Step'],system)
+    G4AtlasServicesConfig.addAction(name,['Run','Tracking','Event','Step'],system)
 
 ## -----------------------------------------------------------------------------
 ### Base Version
 def getG4TransportTool(name='ISFG4TransportTool', **kwargs):
     from G4AtlasApps.SimFlags import simFlags
-    from ISF_Config.ISF_jobProperties import ISF_Flags
-    kwargs.setdefault('BarcodeSvc',               ISF_Flags.BarcodeService()     )
+    kwargs.setdefault('BarcodeSvc', simFlags.TruthStrategy.BarcodeServiceName())
     kwargs.setdefault('RandomGenerator', 'athena')
     kwargs.setdefault('RandomNumberService', simFlags.RandomSvc())
 
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.cxx
index 2e095163ca3443f2768e7d75a8b2d843b86f0f74..d98a4aee16523044848b8a88ab022dcb88de13cf 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.cxx
@@ -59,7 +59,7 @@ namespace G4UA{
       m_truthRecordSvcQuick = &(*(m_config.truthRecordSvc));
     }
 
-    void MCTruthUserAction::preTracking(const G4Track* inTrack){;
+    void MCTruthUserAction::PreUserTrackingAction(const G4Track* inTrack){
       //ATH_MSG_DEBUG("Starting to track a new particle");
 
       //m_sHelper.ResetNrOfSecondaries();
@@ -82,7 +82,7 @@ namespace G4UA{
 
     }
 
-    void MCTruthUserAction::postTracking(const G4Track*){
+    void MCTruthUserAction::PostUserTrackingAction(const G4Track*){
       //ATH_MSG_DEBUG("Finished tracking a particle");
       G4EventManager::GetEventManager()->GetTrackingManager()->SetStoreTrajectory(false);
     }
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.h
index 7f0fc88c9f112398e4fa1f00370b06d9fd324274..2198a804109665fed9828a38bfc22c1b27287677 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserAction.h
@@ -33,12 +33,11 @@
   Thus it is defined as a AlgTool, to get these assigned easily via python.
 */
 
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
-#include "G4AtlasInterfaces/IPostTrackingAction.h"
+#include "G4UserTrackingAction.hh"
 
 namespace G4UA{
   namespace iGeant4 {
-    class MCTruthUserAction: public IPreTrackingAction,  public IPostTrackingAction
+    class MCTruthUserAction: public G4UserTrackingAction
     {
 
     public:
@@ -51,8 +50,8 @@ namespace G4UA{
       };
 
       MCTruthUserAction(const Config& config);
-      virtual void preTracking(const G4Track*) override;
-      virtual void postTracking(const G4Track*) override;
+      virtual void PreUserTrackingAction(const G4Track*) override;
+      virtual void PostUserTrackingAction(const G4Track*) override;
     private:
       Config m_config;
       ISF::ITruthSvc                  *m_truthRecordSvcQuick; //!< used for faster access
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserActionTool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserActionTool.cxx
index 15fe415a548364b6b216f3a4fa3e8926a4a20eb8..382e0af4f22ec675915ee205b1897a1b148a6ff3 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserActionTool.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserActionTool.cxx
@@ -26,13 +26,8 @@ namespace G4UA{
     }
     StatusCode MCTruthUserActionTool::queryInterface(const InterfaceID& riid, void** ppvIf){
       
-      if(riid == IPreTrackingActionTool::interfaceID()) {
-	*ppvIf = (IPreTrackingActionTool*) this;
-	addRef();
-	return StatusCode::SUCCESS;
-      }
-      if(riid == IPostTrackingActionTool::interfaceID()) {
-	*ppvIf = (IPostTrackingActionTool*) this;
+      if(riid == IG4TrackingActionTool::interfaceID()) {
+	*ppvIf = (IG4TrackingActionTool*) this;
 	addRef();
 	return StatusCode::SUCCESS;
       }
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserActionTool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserActionTool.h
index ddfeb6ae0aed00411db0e45ae5f2797a80419c32..df34c4b2f6b1f4ad7519f7dda79acefd9a26d1fd 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserActionTool.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/MCTruthUserActionTool.h
@@ -4,8 +4,7 @@
 
 #ifndef ISF_GEANT4TOOLS_G4UA__MCTRUTHUSERACTIONTOOL_H 
 #define ISF_GEANT4TOOLS_G4UA__MCTRUTHUSERACTIONTOOL_H 
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
-#include "G4AtlasInterfaces/IPostTrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "MCTruthUserAction.h"
 
@@ -22,18 +21,15 @@ namespace G4UA{
   
     class MCTruthUserActionTool: 
     public ActionToolBase<MCTruthUserAction>,
-      public IPreTrackingActionTool,  public IPostTrackingActionTool
+      public IG4TrackingActionTool
     {
       
     public:
       /// Standard constructor
       MCTruthUserActionTool(const std::string& type, const std::string& name,const IInterface* parent);
-      /// Retrieve the preTracking action
-      virtual IPreTrackingAction* getPreTrackingAction() override final 
-      { return static_cast<IPreTrackingAction*>( getAction() ); }
-      /// Retrieve the postTracking action
-      virtual IPostTrackingAction* getPostTrackingAction() override final 
-      { return static_cast<IPostTrackingAction*>( getAction() ); }
+      /// Retrieve the tracking action
+      virtual G4UserTrackingAction* getTrackingAction() override final 
+      { return static_cast<G4UserTrackingAction*>( getAction() ); }
 
       /// Query interface for gaudi
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx
index 4cdb56d7276c71578d0c8733dbce13107ab1a013..f3edbaac0dfd6ab6299511e6fdc5ddff8e09b8f1 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.cxx
@@ -70,7 +70,7 @@ namespace G4UA{
         }
     }
 
-    void PhysicsValidationUserAction::beginOfEvent(const G4Event*)
+    void PhysicsValidationUserAction::BeginOfEventAction(const G4Event*)
     {
 
 
@@ -87,7 +87,7 @@ namespace G4UA{
       
     }
 
-    void PhysicsValidationUserAction::endOfEvent(const G4Event*)
+    void PhysicsValidationUserAction::EndOfEventAction(const G4Event*)
     {
       
       m_X0=0.;
@@ -100,7 +100,7 @@ namespace G4UA{
       return;
     }
 
-    void PhysicsValidationUserAction::beginOfRun(const G4Run*)
+    void PhysicsValidationUserAction::BeginOfRunAction(const G4Run*)
     {
       
       if (m_config.particleBroker.retrieve().isFailure()) {
@@ -213,8 +213,8 @@ namespace G4UA{
 	}
       
     }
-    
-    void PhysicsValidationUserAction::processStep(const G4Step* aStep)
+
+    void PhysicsValidationUserAction::UserSteppingAction(const G4Step* aStep)
     {
       //std::cout<<"PhysicsValidationUserAction::SteppingAction"<<std::endl;
       
@@ -526,8 +526,8 @@ namespace G4UA{
       }
       
     }
-    
-    void PhysicsValidationUserAction::preTracking(const G4Track*)
+
+    void PhysicsValidationUserAction::PreUserTrackingAction(const G4Track*)
     {
 
       m_sHelper.ResetNrOfSecondaries();
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.h
index 77d72bfdf053543a149b99b8cfc643df8ccf05a2..b93c11e9098ea09397adf4d83968e5fdb372a131 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserAction.h
@@ -36,16 +36,15 @@ namespace ISF {
   class IParticleBroker;
 }
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
+#include "G4UserTrackingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 namespace G4UA{
   namespace iGeant4 {
-    class PhysicsValidationUserAction: public IBeginEventAction,  public IEndEventAction,  public IBeginRunAction,  public ISteppingAction,  public IPreTrackingAction, public AthMessaging
+    class PhysicsValidationUserAction: public G4UserEventAction, public G4UserRunAction, public G4UserSteppingAction, public G4UserTrackingAction, public AthMessaging
     {
 
     public:
@@ -77,11 +76,11 @@ namespace G4UA{
       };
 
       PhysicsValidationUserAction(const Config& config);
-      virtual void beginOfEvent(const G4Event*) override final;
-      virtual void endOfEvent(const G4Event*) override final;
-      virtual void beginOfRun(const G4Run*) override final;
-      virtual void processStep(const G4Step*) override final;
-      virtual void preTracking(const G4Track*) override final;
+      virtual void BeginOfEventAction(const G4Event*) override final;
+      virtual void EndOfEventAction(const G4Event*) override final;
+      virtual void BeginOfRunAction(const G4Run*) override final;
+      virtual void UserSteppingAction(const G4Step*) override final;
+      virtual void PreUserTrackingAction(const G4Track*) override final;
     private:
 
       Config m_config;
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.cxx
index 9a17c5eafff0970e9d11be051a5158d8f37c761f..9412c69a25aaad7650ced5950c92a1eb947e33af 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.cxx
@@ -45,30 +45,25 @@ namespace G4UA{
       return std::move(action);
     }
 
-    StatusCode PhysicsValidationUserActionTool::queryInterface(const InterfaceID& riid, void** ppvIf){
-
-      if(riid == IBeginEventActionTool::interfaceID()) {
-        *ppvIf = (IBeginEventActionTool*) this;
-        addRef();
-        return StatusCode::SUCCESS;
-      }
-      if(riid == IEndEventActionTool::interfaceID()) {
-        *ppvIf = (IEndEventActionTool*) this;
+    StatusCode PhysicsValidationUserActionTool::queryInterface(const InterfaceID& riid, void** ppvIf)
+    {
+      if(riid == IG4EventActionTool::interfaceID()) {
+        *ppvIf = (IG4EventActionTool*) this;
         addRef();
         return StatusCode::SUCCESS;
       }
-      if(riid == IBeginRunActionTool::interfaceID()) {
-        *ppvIf = (IBeginRunActionTool*) this;
+      if(riid == IG4RunActionTool::interfaceID()) {
+        *ppvIf = (IG4RunActionTool*) this;
         addRef();
         return StatusCode::SUCCESS;
       }
-      if(riid == ISteppingActionTool::interfaceID()) {
-        *ppvIf = (ISteppingActionTool*) this;
+      if(riid == IG4SteppingActionTool::interfaceID()) {
+        *ppvIf = (IG4SteppingActionTool*) this;
         addRef();
         return StatusCode::SUCCESS;
       }
-      if(riid == IPreTrackingActionTool::interfaceID()) {
-        *ppvIf = (IPreTrackingActionTool*) this;
+      if(riid == IG4TrackingActionTool::interfaceID()) {
+        *ppvIf = (IG4TrackingActionTool*) this;
         addRef();
         return StatusCode::SUCCESS;
       }
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.h
index 32401815201449e66699a55323222c7d1bdf564b..ccc1d21bbf98feef2b650d327cc5c6f9f2bb47e7 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/PhysicsValidationUserActionTool.h
@@ -4,11 +4,10 @@
 
 #ifndef ISF_GEANT4TOOLS_G4UA__PHYSICSVALIATIONUSERACTIONTOOL_H
 #define ISF_GEANT4TOOLS_G4UA__PHYSICSVALIATIONUSERACTIONTOOL_H
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "PhysicsValidationUserAction.h"
 
@@ -25,27 +24,24 @@ namespace G4UA{
     
     class PhysicsValidationUserActionTool:
     public ActionToolBase<PhysicsValidationUserAction>,
-      public IBeginEventActionTool,  public IEndEventActionTool,  public IBeginRunActionTool,  public ISteppingActionTool,  public IPreTrackingActionTool
+      public IG4EventActionTool, public IG4RunActionTool, public IG4SteppingActionTool, public IG4TrackingActionTool
     {
       
     public:
       /// Standard constructor
       PhysicsValidationUserActionTool(const std::string& type, const std::string& name,const IInterface* parent);
-      /// Retrieve the BoE action
-      virtual IBeginEventAction* getBeginEventAction() override final
-      { return static_cast<IBeginEventAction*>( getAction() ); }
-      /// Retrieve the EoE action
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
-      /// Retrieve the BoR action
-      virtual IBeginRunAction* getBeginRunAction() override final
-      { return static_cast<IBeginRunAction*>( getAction() ); }
+      /// Retrieve the event action
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
+      /// Retrieve the run action
+      virtual G4UserRunAction* getRunAction() override final
+      { return static_cast<G4UserRunAction*>( getAction() ); }
       /// Retrieve the stepping action
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
-      /// Retrieve the preTracking action
-      virtual IPreTrackingAction* getPreTrackingAction() override final
-      { return static_cast<IPreTrackingAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
+      /// Retrieve the tracking action
+      virtual G4UserTrackingAction* getTrackingAction() override final
+      { return static_cast<G4UserTrackingAction*>( getAction() ); }
       
       /// Query interface for gaudi
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx
index b359cfa98237ff7a18970632b8382f3a19660e27..be9e0bcba3cfaf99b9b863875e25f5773d3679c0 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.cxx
@@ -55,21 +55,21 @@ TrackProcessorUserActionBase::TrackProcessorUserActionBase():
 {;
 }
 
-void TrackProcessorUserActionBase::beginOfEvent(const G4Event*)
+void TrackProcessorUserActionBase::BeginOfEventAction(const G4Event*)
 {
   m_curBaseISP = nullptr;
   m_eventInfo = ::iGeant4::ISFG4Helper::getEventInformation();
   return;
 }
 
-void TrackProcessorUserActionBase::endOfEvent(const G4Event*)
+void TrackProcessorUserActionBase::EndOfEventAction(const G4Event*)
 {
   m_curBaseISP = nullptr;
   m_eventInfo = nullptr;
   return;
 }
 
-void TrackProcessorUserActionBase::processStep(const G4Step* aStep)
+void TrackProcessorUserActionBase::UserSteppingAction(const G4Step* aStep)
 {
   // get geoID from parent
   //TODO ELLI AtlasDetDescr::AtlasRegion curGeoID = m_curBaseISP->nextGeoID();
@@ -105,7 +105,7 @@ void TrackProcessorUserActionBase::processStep(const G4Step* aStep)
   return;
 }
 
-void TrackProcessorUserActionBase::preTracking(const G4Track* aTrack)
+void TrackProcessorUserActionBase::PreUserTrackingAction(const G4Track* aTrack)
 {
   bool isPrimary = ! aTrack->GetParentID();
   if (isPrimary) {
@@ -234,7 +234,7 @@ TrackClassification TrackProcessorUserActionBase::classify(const HepMC::GenParti
 
 
 
-void TrackProcessorUserActionBase::postTracking(const G4Track*)
+void TrackProcessorUserActionBase::PostUserTrackingAction(const G4Track*)
 {
   m_curBaseISP = nullptr;
   return;
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h
index 8e95e581b16e424cfb58c6fcf56cc422cbb6c43c..43ddce5efa49eae810285548eae90066f5a4f5a6 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionBase.h
@@ -9,11 +9,9 @@
 
 #include <string>
 
-#include "G4AtlasInterfaces/IPreTrackingAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IPostTrackingAction.h"
+#include "G4UserTrackingAction.hh"
+#include "G4UserSteppingAction.hh"
+#include "G4UserEventAction.hh"
 
 #include "MCTruth/VTrackInformation.h"
 
@@ -34,20 +32,20 @@ namespace G4UA{
 
 namespace iGeant4 {
 
-class TrackProcessorUserActionBase: public IPreTrackingAction, public ISteppingAction,
-                                    public IBeginEventAction, public IEndEventAction,
-                                    public IPostTrackingAction
+class TrackProcessorUserActionBase: public G4UserTrackingAction,
+                                    public G4UserSteppingAction,
+                                    public G4UserEventAction
 {
 
 public:
   TrackProcessorUserActionBase();
-  virtual void beginOfEvent(const G4Event*) override final;
-  virtual void endOfEvent(const G4Event*) override final;
+  virtual void BeginOfEventAction(const G4Event*) override final;
+  virtual void EndOfEventAction(const G4Event*) override final;
 
-  virtual void preTracking(const G4Track*) override;
-  virtual void postTracking(const G4Track*) override final;
+  virtual void PreUserTrackingAction(const G4Track*) override;
+  virtual void PostUserTrackingAction(const G4Track*) override final;
 
-  virtual void processStep(const G4Step*) override final;
+  virtual void UserSteppingAction(const G4Step*) override final;
 
 protected:
   EventInformation* m_eventInfo;   //!< event-global G4 UserInformation
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.cxx
index 8ae9fb8eabe2811b9298f65cf7c3595fc82d09e3..68adb16ebbf7da765955962ae31ba96ecbb52aa2 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.cxx
@@ -218,11 +218,11 @@ namespace G4UA{
       return layer;
     }
 
-    void TrackProcessorUserActionFullG4::preTracking(const G4Track* aTrack){
+    void TrackProcessorUserActionFullG4::PreUserTrackingAction(const G4Track* aTrack){
       // reset geoId, call upstream method
       m_nextGeoID = m_config.truthVolLevel>1?AtlasDetDescr::fAtlasCavern:AtlasDetDescr::fUndefinedAtlasRegion;
       m_currentTrack = aTrack;
-      TrackProcessorUserActionBase::preTracking(aTrack);
+      TrackProcessorUserActionBase::PreUserTrackingAction(aTrack);
       return;
     }
 
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.h
index b90df01e748e43b7ef72f80f01f6eb45feeb0857..91088c41fefd4ae46e86e9931c8184919a08dabe 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4.h
@@ -52,7 +52,7 @@ namespace G4UA{
       TrackProcessorUserActionFullG4(const Config& config);
       virtual ~TrackProcessorUserActionFullG4() {}
 
-      virtual void preTracking(const G4Track*) override final;
+      virtual void PreUserTrackingAction(const G4Track*) override final;
     private:
       /** Called by the base class after the G4Track->ISFParticle association
        *  has been established */
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4Tool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4Tool.cxx
index d768a63539f88505876be8eb6472f10bb54e11e5..bd4744ee663f4e5017e94b380e747067968dad8d 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4Tool.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4Tool.cxx
@@ -27,28 +27,18 @@ namespace G4UA{
 
     StatusCode TrackProcessorUserActionFullG4Tool::queryInterface(const InterfaceID& riid, void** ppvIf){
 
-      if(riid == IPreTrackingActionTool::interfaceID()) {
-        *ppvIf = (IPreTrackingActionTool*) this;
+      if(riid == IG4TrackingActionTool::interfaceID()) {
+        *ppvIf = (IG4TrackingActionTool*) this;
         addRef();
         return StatusCode::SUCCESS;
       }
-      if(riid == IPostTrackingActionTool::interfaceID()) {
-        *ppvIf = (IPostTrackingActionTool*) this;
+      if(riid == IG4SteppingActionTool::interfaceID()) {
+        *ppvIf = (IG4SteppingActionTool*) this;
         addRef();
         return StatusCode::SUCCESS;
       }
-      if(riid == ISteppingActionTool::interfaceID()) {
-        *ppvIf = (ISteppingActionTool*) this;
-        addRef();
-        return StatusCode::SUCCESS;
-      }
-      if(riid == IBeginEventActionTool::interfaceID()) {
-        *ppvIf = (IBeginEventActionTool*) this;
-        addRef();
-        return StatusCode::SUCCESS;
-      }
-      if(riid == IEndEventActionTool::interfaceID()) {
-        *ppvIf = (IEndEventActionTool*) this;
+      if(riid == IG4EventActionTool::interfaceID()) {
+        *ppvIf = (IG4EventActionTool*) this;
         addRef();
         return StatusCode::SUCCESS;
       }
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4Tool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4Tool.h
index c9563ce751d8fd194b597bea78c1f6dd6eee5549..1f47ce24fae5554971c59e320d5259e2e2895120 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4Tool.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionFullG4Tool.h
@@ -4,11 +4,9 @@
 
 #ifndef ISF_GEANT4TOOLS_G4UA__TRACKPROCESSORUSERACTIONFULLG4TOOL_H
 #define ISF_GEANT4TOOLS_G4UA__TRACKPROCESSORUSERACTIONFULLG4TOOL_H
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
-#include "G4AtlasInterfaces/IPostTrackingActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "TrackProcessorUserActionFullG4.h"
 
@@ -25,28 +23,22 @@ namespace G4UA{
 
     class TrackProcessorUserActionFullG4Tool:
     public ActionToolBase<TrackProcessorUserActionFullG4>,
-      public IPreTrackingActionTool,  public IPostTrackingActionTool,  public ISteppingActionTool,  public IBeginEventActionTool,  public IEndEventActionTool
+      public IG4TrackingActionTool, public IG4SteppingActionTool, public IG4EventActionTool
     {
 
     public:
       /// Standard constructor
       TrackProcessorUserActionFullG4Tool(const std::string& type, const std::string& name,const IInterface* parent);
 
-      /// Retrieve the preTracking action
-      virtual IPreTrackingAction* getPreTrackingAction() override final
-      { return static_cast<IPreTrackingAction*>( getAction() ); }
-      /// Retrieve the postTracking action
-      virtual IPostTrackingAction* getPostTrackingAction() override final
-      { return static_cast<IPostTrackingAction*>( getAction() ); }
+      /// Retrieve the tracking action
+      virtual G4UserTrackingAction* getTrackingAction() override final
+      { return static_cast<G4UserTrackingAction*>( getAction() ); }
       /// Retrieve the stepping action
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
-      /// Retrieve the BoE action
-      virtual IBeginEventAction* getBeginEventAction() override final
-      { return static_cast<IBeginEventAction*>( getAction() ); }
-      /// Retrieve the EoE action
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
+      /// Retrieve the event action
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
       /// Query interface for gaudi
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBackTool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBackTool.cxx
index d3e61769f0852e1a4d9aa0e5e36f73a10553f8a1..25a041fb5085733bdc96dc01de612ec7c0a6e80e 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBackTool.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBackTool.cxx
@@ -36,28 +36,18 @@ namespace G4UA{
 
     StatusCode TrackProcessorUserActionPassBackTool::queryInterface(const InterfaceID& riid, void** ppvIf){
 
-      if(riid == IPreTrackingActionTool::interfaceID()) {
-        *ppvIf = (IPreTrackingActionTool*) this;
+      if(riid == IG4TrackingActionTool::interfaceID()) {
+        *ppvIf = (IG4TrackingActionTool*) this;
         addRef();
         return StatusCode::SUCCESS;
       }
-      if(riid == IPostTrackingActionTool::interfaceID()) {
-        *ppvIf = (IPostTrackingActionTool*) this;
+      if(riid == IG4SteppingActionTool::interfaceID()) {
+        *ppvIf = (IG4SteppingActionTool*) this;
         addRef();
         return StatusCode::SUCCESS;
       }
-      if(riid == ISteppingActionTool::interfaceID()) {
-        *ppvIf = (ISteppingActionTool*) this;
-        addRef();
-        return StatusCode::SUCCESS;
-      }
-      if(riid == IBeginEventActionTool::interfaceID()) {
-        *ppvIf = (IBeginEventActionTool*) this;
-        addRef();
-        return StatusCode::SUCCESS;
-      }
-      if(riid == IEndEventActionTool::interfaceID()) {
-        *ppvIf = (IEndEventActionTool*) this;
+      if(riid == IG4EventActionTool::interfaceID()) {
+        *ppvIf = (IG4EventActionTool*) this;
         addRef();
         return StatusCode::SUCCESS;
       }
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBackTool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBackTool.h
index 55d26e1bf3fec9370c763ce260d32c108b6eb0b0..c3169223ed6abbad37ba3df7cc88850ea061a146 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBackTool.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TrackProcessorUserActionPassBackTool.h
@@ -4,11 +4,9 @@
 
 #ifndef ISF_GEANT4TOOLS_G4UA__TRACKPROCESSORUSERACTIONPASSBACKTOOL_H
 #define ISF_GEANT4TOOLS_G4UA__TRACKPROCESSORUSERACTIONPASSBACKTOOL_H
-#include "G4AtlasInterfaces/IPreTrackingActionTool.h"
-#include "G4AtlasInterfaces/IPostTrackingActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
+#include "G4AtlasInterfaces/IG4TrackingActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "TrackProcessorUserActionPassBack.h"
 
@@ -24,28 +22,22 @@ namespace G4UA{
 
     class TrackProcessorUserActionPassBackTool:
       public ActionToolBase<TrackProcessorUserActionPassBack>,
-      public IPreTrackingActionTool,  public IPostTrackingActionTool,  public ISteppingActionTool,  public IBeginEventActionTool,  public IEndEventActionTool
+      public IG4TrackingActionTool, public IG4SteppingActionTool, public IG4EventActionTool
     {
 
     public:
       /// Standard constructor
       TrackProcessorUserActionPassBackTool(const std::string& type, const std::string& name,const IInterface* parent);
 
-      /// Retrieve the preTracking action
-      virtual IPreTrackingAction* getPreTrackingAction() override final
-      { return static_cast<IPreTrackingAction*>( getAction() ); }
-      /// Retrieve the postTracking action
-      virtual IPostTrackingAction* getPostTrackingAction() override final
-      { return static_cast<IPostTrackingAction*>( getAction() ); }
+      /// Retrieve the tracking action
+      virtual G4UserTrackingAction* getTrackingAction() override final
+      { return static_cast<G4UserTrackingAction*>( getAction() ); }
        /// Retrieve the stepping action
-      virtual ISteppingAction* getSteppingAction() override final
-      { return static_cast<ISteppingAction*>( getAction() ); }
-       /// Retrieve the BoE action
-      virtual IBeginEventAction* getBeginEventAction() override final
-      { return static_cast<IBeginEventAction*>( getAction() ); }
-       /// Retrieve the EoE action
-      virtual IEndEventAction* getEndEventAction() override final
-      { return static_cast<IEndEventAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
+       /// Retrieve the event action
+      virtual G4UserEventAction* getEventAction() override final
+      { return static_cast<G4UserEventAction*>( getAction() ); }
 
       /// Query interface for gaudi
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx
index ffc4f45030f7206843eace1d565ff7cb0c827d51..65b52fde0a1ac31c0f2616160b81089a759537a5 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.cxx
@@ -45,17 +45,18 @@
 iGeant4::G4TransportTool::G4TransportTool(const std::string& t,
                                           const std::string& n,
                                           const IInterface*  p )
-  : AthAlgTool(t,n,p),
-    m_useMT(false),
-    m_userActionSvc("",n),
-    m_rndmGenSvc("AtDSFMTGenSvc",n),
-    m_barcodeSvc("",n),
-    m_barcodeGenerationIncrement(Barcode::fUndefinedBarcode),
-    m_g4RunManagerHelper("iGeant4::G4RunManagerHelper/G4RunManagerHelper"),
-    m_physListTool("PhysicsListToolBase"),
-    m_mcEventCollectionName("TruthEvent"),
-    m_quasiStableParticlesIncluded(false),
-    m_worldSolid(0)
+  : AthAlgTool(t,n,p)
+  , m_pRunMgr(nullptr)
+  , m_useMT(false)
+  , m_userActionSvc("",n)
+  , m_rndmGenSvc("AtDSFMTGenSvc",n)
+  , m_barcodeSvc("",n)
+  , m_barcodeGenerationIncrement(Barcode::fUndefinedBarcode)
+  , m_g4RunManagerHelper("iGeant4::G4RunManagerHelper/G4RunManagerHelper")
+  , m_physListTool("PhysicsListToolBase")
+  , m_mcEventCollectionName("TruthEvent")
+  , m_quasiStableParticlesIncluded(false)
+  , m_worldSolid(nullptr)
 {
 
   declareInterface<ITransportTool>(this);
@@ -87,6 +88,17 @@ iGeant4::G4TransportTool::G4TransportTool(const std::string& t,
   // Commands to send to the G4UI
   declareProperty("G4Commands", m_g4commands);
 
+}
+
+//________________________________________________________________________
+iGeant4::G4TransportTool::~G4TransportTool()
+{}
+
+//________________________________________________________________________
+StatusCode iGeant4::G4TransportTool::initialize()
+{
+  ATH_MSG_VERBOSE("initialize");
+
   // get G4AtlasRunManager
   ATH_MSG_DEBUG("initialize G4AtlasRunManager");
 
@@ -96,24 +108,14 @@ iGeant4::G4TransportTool::G4TransportTool(const std::string& t,
     ATH_MSG_FATAL("Could not get "<<m_g4RunManagerHelper);
   }
 
-  //p_runMgr = G4AtlasRunManager::GetG4AtlasRunManager();    // clashes with use of G4HadIntProcessor
-  p_runMgr = m_g4RunManagerHelper ? m_g4RunManagerHelper->g4RunManager() : 0;
+  //m_pRunMgr = G4AtlasRunManager::GetG4AtlasRunManager();    // clashes with use of G4HadIntProcessor
+  m_pRunMgr = m_g4RunManagerHelper ? m_g4RunManagerHelper->g4RunManager() : 0;
 
   if(m_physListTool.retrieve().isFailure())
     {
       ATH_MSG_FATAL("Could not get PhysicsListToolBase");
     }
   m_physListTool->SetPhysicsList();
-}
-
-//________________________________________________________________________
-iGeant4::G4TransportTool::~G4TransportTool()
-{}
-
-//________________________________________________________________________
-StatusCode iGeant4::G4TransportTool::initialize()
-{
-  ATH_MSG_VERBOSE("initialize");
 
   // retrieve BarcodeSvc
   if ( m_barcodeSvc.retrieve().isFailure() ) {
@@ -127,7 +129,7 @@ StatusCode iGeant4::G4TransportTool::initialize()
   }
 
   ATH_CHECK( m_userActionSvc.retrieve() );
-  p_runMgr->SetUserActionSvc( m_userActionSvc.typeAndName() );
+  m_pRunMgr->SetUserActionSvc( m_userActionSvc.typeAndName() );
 
   if(m_useMT) {
     // Retrieve the python service to trigger its initialization. This is done
@@ -161,11 +163,11 @@ StatusCode iGeant4::G4TransportTool::initialize()
     ui->ApplyCommand("/MagneticField/Initialize");
   }
 
-  p_runMgr->SetReleaseGeo( m_releaseGeoModel );
-  p_runMgr->SetRecordFlux( m_recordFlux );
+  m_pRunMgr->SetReleaseGeo( m_releaseGeoModel );
+  m_pRunMgr->SetRecordFlux( m_recordFlux );
 
   // *AS* TEST:
-  // *AS* p_runMgr->Initialize();
+  // *AS* m_pRunMgr->Initialize();
   // *AS* but this is a good place
 
 
@@ -203,7 +205,7 @@ StatusCode iGeant4::G4TransportTool::initialize()
     ATH_MSG_FATAL("Could not get "<<m_particleBroker);
     return StatusCode::FAILURE;
     }
-    //p_runMgr->setParticleBroker(&m_particleBroker);
+    //m_pRunMgr->setParticleBroker(&m_particleBroker);
 
     if (m_particleHelper.retrieve().isSuccess())
     ATH_MSG_DEBUG("retrieved "<<m_particleHelper);
@@ -211,7 +213,7 @@ StatusCode iGeant4::G4TransportTool::initialize()
     ATH_MSG_FATAL("Could not get "<<m_particleHelper);
     return StatusCode::FAILURE;
     }
-    //p_runMgr->setParticleHelper(&m_particleHelper);
+    //m_pRunMgr->setParticleHelper(&m_particleHelper);
     */
   /*
     if (m_configTool.retrieve().isSuccess())
@@ -231,7 +233,7 @@ StatusCode iGeant4::G4TransportTool::finalize()
 
   ATH_MSG_DEBUG("\t terminating the current G4 run");
 
-  p_runMgr->RunTermination();
+  m_pRunMgr->RunTermination();
 
   return StatusCode::SUCCESS;
 }
@@ -246,7 +248,7 @@ StatusCode iGeant4::G4TransportTool::process(const ISF::ISFParticle& isp)
   G4Event* inputEvent=ISF_to_G4Event(isp);
   if (inputEvent) {
 
-    bool abort = p_runMgr->ProcessEvent(inputEvent);
+    bool abort = m_pRunMgr->ProcessEvent(inputEvent);
 
     if (abort) {
       ATH_MSG_WARNING("Event was aborted !! ");
@@ -284,7 +286,7 @@ StatusCode iGeant4::G4TransportTool::processVector(const ISF::ConstISFParticleVe
 
   G4Event* inputEvent = ISF_to_G4Event(ispVector);
   if (inputEvent) {
-    bool abort = p_runMgr->ProcessEvent(inputEvent);
+    bool abort = m_pRunMgr->ProcessEvent(inputEvent);
 
     if (abort) {
       ATH_MSG_WARNING("Event was aborted !! ");
@@ -412,7 +414,7 @@ G4PrimaryParticle* iGeant4::G4TransportTool::getPrimaryParticle(const HepMC::Gen
   // Set the user information for this primary to point to the HepMcParticleLink...
   PrimaryParticleInformation* ppi = new PrimaryParticleInformation(&gp);
   particle->SetUserInformation(ppi);
-  std::cout << "ZLM making primary down the line with " << ppi->GetParticleBarcode() << std::endl;
+  ATH_MSG_VERBOSE("ZLM making primary down the line with " << ppi->GetParticleBarcode());
 
   return particle;
 }
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h
index c8b397826c28ebc625c9ba6a5713b71c3f03c41f..f5e109cabc98814ed10c2c5535c71b9aab590c70 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4Tools/src/TransportTool.h
@@ -94,7 +94,7 @@ namespace iGeant4
 
     HepMC::GenEvent* genEvent() const;
 
-    G4AtlasRunManager    * p_runMgr;
+    G4AtlasRunManager    * m_pRunMgr;
 
     /// Activate multi-threading configuration
     bool m_useMT;
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/CMakeLists.txt b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/CMakeLists.txt
index 7a02122f42e1378a653da2d6ba7a48801a94b01d..4b163d93dd79b6387cfd90023d8aac541e1affe4 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/CMakeLists.txt
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/CMakeLists.txt
@@ -11,6 +11,7 @@ atlas_depends_on_subdirs( PUBLIC
                           GaudiKernel
                           Simulation/G4Atlas/G4AtlasInterfaces
                           Simulation/G4Atlas/G4AtlasTools
+                          TileCalorimeter/TileG4/TileG4Interfaces
                           PRIVATE
                           Calorimeter/CaloDetDescr
                           Calorimeter/CaloIdentifier
@@ -19,7 +20,7 @@ atlas_depends_on_subdirs( PUBLIC
                           Generators/GeneratorObjects
                           LArCalorimeter/LArG4/LArG4Code
                           Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent
-                          TileCalorimeter/TileG4/TileGeoG4SD )
+                          DetectorDescription/Identifier )
 
 # External dependencies:
 find_package( CLHEP )
@@ -32,7 +33,7 @@ atlas_add_component( ISF_Geant4UserActions
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GaudiKernel G4AtlasInterfaces G4AtlasToolsLib CaloDetDescrLib CaloIdentifier CxxUtils GeneratorObjects LArG4Code ISF_FastCaloSimEvent TileGeoG4SDLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${XERCESC_LIBRARIES} ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} StoreGateLib SGtests GaudiKernel G4AtlasInterfaces G4AtlasToolsLib CaloDetDescrLib CaloIdentifier CxxUtils GeneratorObjects LArG4Code ISF_FastCaloSimEvent Identifier )
 
 # Install files from the package:
 atlas_install_headers( ISF_Geant4UserActions )
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamAction.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamAction.h
index d706af05b15ef6694276f44e6bb64b16731107ad..591684b64162da76b10cd5989bfa1b336a3bea37 100755
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamAction.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamAction.h
@@ -12,16 +12,24 @@
 // athena simulation includes
 
 #include "GaudiKernel/ServiceHandle.h"
+#include "LArG4Code/ILArCalculatorSvc.h"
+#include "StoreGate/WriteHandle.h"
+#include "TileG4Interfaces/ITileCalculator.h"
+
+// CLHEP include for Hep3Vector
+#include "CLHEP/Vector/ThreeVector.h"
+#include "Identifier/Identifier.h"
+
 
 // forward declarations in namespaces
 namespace ISF_FCS_Parametrization {
   class FCS_StepInfoCollection;
+  class FCS_StepInfo;
 }
 namespace HepMC {
   class GenParticle;
 }
 // forward declarations in global namespace
-class ILArCalculatorSvc;
 class G4VSolid;
 class G4AffineTransform;
 class LArG4SimpleSD;
@@ -29,6 +37,7 @@ class LArIdentifierConverter;
 class TileGeoG4SDCalc;
 class CaloDetDescrManager;
 class LArEM_ID;
+class Hep3Vector;
 /**
  *
  *   @short Class for collecting G4 hit information
@@ -44,11 +53,9 @@ class LArEM_ID;
  *
  */
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserRunAction.hh"
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
 
 
 #include "StoreGate/StoreGateSvc.h"
@@ -59,7 +66,7 @@ namespace G4UA{
 
 
   class FastCaloSimParamAction:
-    public IBeginRunAction,  public IEndRunAction,  public IBeginEventAction,  public IEndEventAction,  public ISteppingAction
+    public G4UserRunAction, public G4UserEventAction, public G4UserSteppingAction
   {
 
   public:
@@ -68,36 +75,66 @@ namespace G4UA{
     {
       bool shift_lar_subhit=true;
       bool shorten_lar_step=false;
+      std::string stepInfoCollName="EventSteps";
       // calculators
-      ILArCalculatorSvc* calculator_EMECIW_pos=nullptr;            //!< pointer to EMEC positive inner wheel calculator
-      ILArCalculatorSvc* calculator_EMECIW_neg=nullptr;            //!< pointer to EMEC negative inner wheel calculator
-      ILArCalculatorSvc* calculator_EMECOW_pos=nullptr;            //!< pointer to EMEC positive outer wheel calculator
-      ILArCalculatorSvc* calculator_EMECOW_neg=nullptr;            //!< pointer to EMEC negative outer wheel calculator
-      //ILArCalculatorSvc* calculator_BIB=nullptr;                 //!< pointer to EMEC Back Inner Barrette wheel calculator
-      ILArCalculatorSvc* calculator_BOB=nullptr;                   //!< pointer to EMEC Back Outer Barrette wheel calculator
-      ILArCalculatorSvc* calculator_EMB=nullptr;                   //!< pointer to barrel calculator
-      ILArCalculatorSvc* calculator_FCAL1=nullptr;
-      ILArCalculatorSvc* calculator_FCAL2=nullptr;
-      ILArCalculatorSvc* calculator_FCAL3=nullptr;
-      ILArCalculatorSvc* calculator_HEC=nullptr;
-      ILArCalculatorSvc* calculator_EMBPS=nullptr;                 //!< pointer to barrel presampler calculator
-      ILArCalculatorSvc* calculator_EMEPS=nullptr;                 //!< pointer to endcap presampler calculator
-      //ILArCalculatorSvc* calculator_HECLocal=nullptr;
+      ServiceHandle<ILArCalculatorSvc> calculator_EMECIW_pos=ServiceHandle<ILArCalculatorSvc>("EMECPosInnerWheelCalculator", "FastCaloSimParamAction");            //!< handle to EMEC positive inner wheel calculator
+      ServiceHandle<ILArCalculatorSvc> calculator_EMECIW_neg=ServiceHandle<ILArCalculatorSvc>("EMECNegInnerWheelCalculator", "FastCaloSimParamAction");            //!< handle to EMEC negative inner wheel calculator
+      ServiceHandle<ILArCalculatorSvc> calculator_EMECOW_pos=ServiceHandle<ILArCalculatorSvc>("EMECPosOuterWheelCalculator", "FastCaloSimParamAction");            //!< handle to EMEC positive outer wheel calculator
+      ServiceHandle<ILArCalculatorSvc> calculator_EMECOW_neg=ServiceHandle<ILArCalculatorSvc>("EMECNegOuterWheelCalculator", "FastCaloSimParamAction");            //!< handle to EMEC negative outer wheel calculator
+      //ServiceHandle<ILArCalculatorSvc> calculator_BIB;                 //!< handle to EMEC Back Inner Barrette wheel calculator
+      ServiceHandle<ILArCalculatorSvc> calculator_BOB=ServiceHandle<ILArCalculatorSvc>("EMECBackOuterBarretteCalculator", "FastCaloSimParamAction");                   //!< handle to EMEC Back Outer Barrette wheel calculator
+      ServiceHandle<ILArCalculatorSvc> calculator_EMB=ServiceHandle<ILArCalculatorSvc>("EMBCalculator", "FastCaloSimParamAction");                   //!< handle to barrel calculator
+      ServiceHandle<ILArCalculatorSvc> calculator_FCAL1=ServiceHandle<ILArCalculatorSvc>("FCAL1Calculator", "FastCaloSimParamAction");
+      ServiceHandle<ILArCalculatorSvc> calculator_FCAL2=ServiceHandle<ILArCalculatorSvc>("FCAL2Calculator", "FastCaloSimParamAction");
+      ServiceHandle<ILArCalculatorSvc> calculator_FCAL3=ServiceHandle<ILArCalculatorSvc>("FCAL3Calculator", "FastCaloSimParamAction");
+      ServiceHandle<ILArCalculatorSvc> calculator_HEC=ServiceHandle<ILArCalculatorSvc>("HECWheelCalculator", "FastCaloSimParamAction");
+      ServiceHandle<ILArCalculatorSvc> calculator_EMBPS=ServiceHandle<ILArCalculatorSvc>("EMBPresamplerCalculator", "FastCaloSimParamAction");                 //!< handle to barrel presampler calculator
+      ServiceHandle<ILArCalculatorSvc> calculator_EMEPS=ServiceHandle<ILArCalculatorSvc>("EMECPresamplerCalculator", "FastCaloSimParamAction");                 //!< handle to endcap presampler calculator
+      //ServiceHandle<ILArCalculatorSvc> calculator_HECLocal;
+      ServiceHandle<ITileCalculator> calculator_TILE=ServiceHandle<ITileCalculator>("TileGeoG4SDCalc", "FastCaloSimParamAction");                    //!< pointer to tile calculator
+
+      // Merging properties
+      DoubleProperty            m_maxRadius=25.;                //!< property, see @link LArG4GenShowerLib::LArG4GenShowerLib @endlink
+      DoubleProperty            m_maxRadiusLAr=25.;             //!< property, see @link LArG4GenShowerLib::LArG4GenShowerLib @endlink
+      DoubleProperty            m_maxRadiusHEC=100.;             //!< property, see @link LArG4GenShowerLib::LArG4GenShowerLib @endlink
+      DoubleProperty            m_maxRadiusFCAL=100.;            //!< property, see @link LArG4GenShowerLib::LArG4GenShowerLib @endlink
+      DoubleProperty            m_maxRadiusTile=100.;            //!< property, see @link LArG4GenShowerLib::LArG4GenShowerLib @endlink
+
+      DoubleProperty            m_maxTime=25.;
+      DoubleProperty            m_maxTimeLAr=25.;
+      DoubleProperty            m_maxTimeHEC=25.;
+      DoubleProperty            m_maxTimeFCAL=25.;
+      DoubleProperty            m_maxTimeTile=25.;
+
+      // Optimised merging scheme
+      DoubleProperty            m_maxEtaPS=1.;
+      DoubleProperty            m_maxPhiPS=5.;
+      DoubleProperty            m_maxrPS=0.;
+
+      DoubleProperty            m_maxEtaEM1=1.;
+      DoubleProperty            m_maxPhiEM1=5.;
+      DoubleProperty            m_maxrEM1=15.;
+
+      DoubleProperty            m_maxEtaEM2=1.;
+      DoubleProperty            m_maxPhiEM2=5.;
+      DoubleProperty            m_maxrEM2=60.;
+
+      DoubleProperty            m_maxEtaEM3=1.;
+      DoubleProperty            m_maxPhiEM3=5.;
+      DoubleProperty            m_maxrEM3=8.;
 
     };
 
     FastCaloSimParamAction(const Config& config);
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void endOfRun(const G4Run*) override;
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void EndOfRunAction(const G4Run*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
   private:
     Config m_config;
 
     typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
-    /// Pointer to StoreGate (event store by default)
-    mutable StoreGateSvc_t m_evtStore;
     /// Pointer to StoreGate (detector store by default)
     mutable StoreGateSvc_t m_detStore;
 
@@ -105,20 +142,21 @@ namespace G4UA{
     /* data members */
 
     ILArCalculatorSvc *m_current_calculator;
-    TileGeoG4SDCalc *m_current_calculator_Tile;
+    ITileCalculator *m_current_calculator_Tile;
 
     G4VSolid *m_current_solid;
     G4AffineTransform *m_current_transform;
 
-    // calculators
-    TileGeoG4SDCalc *m_calculator_Tile;
-
     // helper
     LArG4SimpleSD *m_lar_helper;
     const LArEM_ID *m_lar_emID;
     const CaloDetDescrManager *m_calo_dd_man;
 
-    ISF_FCS_Parametrization::FCS_StepInfoCollection *m_eventSteps;    //!< collection of StepInfo
+
+    void update_map(const CLHEP::Hep3Vector & l_vec, const Identifier & l_cell, double l_energy, double l_time, bool l_valid, int l_detector);
+    std::map< Identifier , std::vector< ISF_FCS_Parametrization::FCS_StepInfo* >* > m_hit_map;
+
+    SG::WriteHandle<ISF_FCS_Parametrization::FCS_StepInfoCollection> m_eventSteps;    //!< collection of StepInfo
     std::map<std::string,int> m_detectormap;
     std::set<std::string> m_unuseddetector;
     int m_ndetectors;
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamActionTool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamActionTool.h
index dde4313197ca8f3dc407a1d4dba6e789b7c28f3c..b280c1a493f0da248d83d6758d169512e7b252d8 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamActionTool.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/ISF_Geant4UserActions/FastCaloSimParamActionTool.h
@@ -4,17 +4,17 @@
 
 #ifndef ISF_GEANT4USERACTIONS_G4UA__FASTCALOSIMPARAMACTIONTOOL_H
 #define ISF_GEANT4USERACTIONS_G4UA__FASTCALOSIMPARAMACTIONTOOL_H
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndRunActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 
 #include "G4AtlasTools/ActionToolBase.h"
 
 #include "ISF_Geant4UserActions/FastCaloSimParamAction.h"
 
 class ILArCalculatorSvc;
+class ITileCalculator;
+
 namespace G4UA{
 
   /// @class FastCaloSimParamActionTool
@@ -25,7 +25,7 @@ namespace G4UA{
 
   class FastCaloSimParamActionTool:
   public ActionToolBase<FastCaloSimParamAction>,
-    public IBeginRunActionTool,  public IEndRunActionTool,  public IBeginEventActionTool,  public IEndEventActionTool,  public ISteppingActionTool
+    public IG4RunActionTool, public IG4EventActionTool, public IG4SteppingActionTool
   {
 
   public:
@@ -33,21 +33,15 @@ namespace G4UA{
     FastCaloSimParamActionTool(const std::string& type, const std::string& name,const IInterface* parent);
     /// Intialize Athena components
     StatusCode initialize() override final;
-    /// Retrieve the BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final
-    { return static_cast<IBeginRunAction*>( getAction() ); }
-    /// Retrieve the EoR action
-    virtual IEndRunAction* getEndRunAction() override final
-    { return static_cast<IEndRunAction*>( getAction() ); }
-    /// Retrieve the BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// Retrieve the EoE action
-    virtual IEndEventAction* getEndEventAction() override final
-    { return static_cast<IEndEventAction*>( getAction() ); }
+    /// Retrieve the run action
+    virtual G4UserRunAction* getRunAction() override final
+    { return static_cast<G4UserRunAction*>( getAction() ); }
+    /// Retrieve the event action
+    virtual G4UserEventAction* getEventAction() override final
+    { return static_cast<G4UserEventAction*>( getAction() ); }
     /// Retrieve the stepping action
-    virtual ISteppingAction* getSteppingAction() override final
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
     /// Create an action for this thread
@@ -68,6 +62,7 @@ namespace G4UA{
     ServiceHandle<ILArCalculatorSvc> m_heccalc;     //!< HEC wheel calculator
     ServiceHandle<ILArCalculatorSvc> m_pscalc;      //!< Barrel presampler calculator
     ServiceHandle<ILArCalculatorSvc> m_emepscalc;   //!< Endcap presampler calculator
+    ServiceHandle<ITileCalculator> m_tileCalculator; //!< Tile calculator
 
   }; // class FastCaloSimParamActionTool
 
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/cmt/requirements b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/cmt/requirements
deleted file mode 100644
index 07a7cd43c8a26607fbaa44542b5763e01da500b4..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package ISF_Geant4UserActions
-
-public
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*        External
-use G4AtlasTools                G4AtlasTools-*          Simulation/G4Atlas
-use G4AtlasInterfaces		G4AtlasInterfaces-*	Simulation/G4Atlas
-use StoreGate                   StoreGate-*             Control
-
-private
-use AtlasROOT                   AtlasROOT-*             External
-use CaloDetDescr                CaloDetDescr-*          Calorimeter
-use CaloIdentifier              CaloIdentifier-*        Calorimeter
-use Geant4                      Geant4-*                External
-use GeneratorObjects            GeneratorObjects-*      Generators
-use ISF_FastCaloSimEvent        ISF_FastCaloSimEvent-*  Simulation/ISF/ISF_FastCaloSim
-use LArG4Code                   LArG4Code-*             LArCalorimeter/LArG4
-use TileGeoG4SD                 TileGeoG4SD-*           TileCalorimeter/TileG4
-use CxxUtils                    CxxUtils-*              Control
-use AthenaBaseComps		AthenaBaseComps-*	Control
-
-public
-apply_pattern declare_python_modules files="*.py"
-
-library ISF_Geant4UserActions *.cxx -s=components *.cxx
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/python/ISF_Geant4UserActionsConfig.py b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/python/ISF_Geant4UserActionsConfig.py
index b023af977f4255648c1f31d3dbf5131bcdacb8f3..550c154aa8c6927339e67feb928e71de67d5f42d 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/python/ISF_Geant4UserActionsConfig.py
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/python/ISF_Geant4UserActionsConfig.py
@@ -1,13 +1,20 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
+from AthenaCommon import CfgMgr
 
 def getFastCaloSimParamActionTool(name='G4UA::FastCaloSimParamActionTool', **kwargs):
-    from ISF_Geant4UserActions.ISF_Geant4UserActionsConf import G4UA__FastCaloSimParamActionTool
-    return G4UA__FastCaloSimParamActionTool(name,**kwargs)
+    from G4AtlasApps.SimFlags import simFlags
+    # example custom configuration
+    if name in simFlags.UserActionConfig.get_Value().keys():
+        for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems():
+            kwargs.setdefault(prop,value)
+    return CfgMgr.G4UA__FastCaloSimParamActionTool(name,**kwargs)
+
 
 def addFastCaloSimParamActionTool(name='G4UA::FastCaloSimParamActionTool',system=False):
     from G4AtlasServices import G4AtlasServicesConfig
-    G4AtlasServicesConfig.addAction(name,['BeginOfRun','EndOfRun','BeginOfEvent','EndOfEvent','Step'],system)
+    G4AtlasServicesConfig.addAction(name,['Run','Event','Step'],system)
+
 
 def getTestBoundariesUserActionTool(name='G4UA::iGeant4::TestBoundariesUserActionTool', **kwargs):
     from AthenaCommon import Logging
@@ -18,5 +25,4 @@ def getTestBoundariesUserActionTool(name='G4UA::iGeant4::TestBoundariesUserActio
         #from AthenaCommon.AppMgr import theApp
         #theApp.exit(1)
         return False
-    from ISF_Geant4UserActions.ISF_Geant4UserActionsConf import G4UA__iGeant4__TestBoundariesUserActionTool
-    return G4UA__iGeant4__TestBoundariesUserActionTool(name,**kwargs)
+    return CfgMgr.G4UA__iGeant4__TestBoundariesUserActionTool(name,**kwargs)
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx
index c3bada4392c51fdc5ecca1e8a78e066968d58201..2188be3d9a4da09f3216579e15b0bea1149322f0 100755
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamAction.cxx
@@ -7,6 +7,7 @@
 
 #include <stdexcept>
 #include <map>
+#include <memory>
 #include <string>
 #include <stdlib.h>
 #include <string.h>
@@ -23,9 +24,7 @@
 #include "LArG4Code/LArG4SimpleSD.h"
 
 // TileCAL calculators
-#include "TileGeoG4SD/TileGeoG4SDCalc.hh"
-#include "G4SDManager.hh"
-#include "TileGeoG4SD/TileGeoG4SD.hh"
+#include "TileG4Interfaces/ITileCalculator.h"
 
 #include "ISF_FastCaloSimEvent/FCS_StepInfo.h"
 #include "ISF_FastCaloSimEvent/FCS_StepInfoCollection.h"
@@ -42,20 +41,19 @@
 namespace G4UA{
 
 
-  FastCaloSimParamAction::FastCaloSimParamAction(const Config& config):
-    m_config(config),
-    m_evtStore("StoreGateSvc/StoreGateSvc","FastCaloSimParamAction"),
-    m_detStore("StoreGateSvc/DetectorStore","FastCaloSimParamAction"),
-    m_current_calculator(nullptr),
-    m_current_calculator_Tile(nullptr),
-    m_current_solid(nullptr),
-    m_current_transform(nullptr),
-    m_calculator_Tile(nullptr),
-    m_lar_helper(nullptr),
-    m_lar_emID(nullptr),
-    m_calo_dd_man(nullptr),
-    m_eventSteps(nullptr),
-    m_ndetectors(0){
+  FastCaloSimParamAction::FastCaloSimParamAction(const Config& config)
+    : m_config(config)
+    , m_detStore("StoreGateSvc/DetectorStore","FastCaloSimParamAction")
+    , m_current_calculator(nullptr)
+    , m_current_calculator_Tile(nullptr)
+    , m_current_solid(nullptr)
+    , m_current_transform(nullptr)
+    , m_lar_helper(nullptr)
+    , m_lar_emID(nullptr)
+    , m_calo_dd_man(nullptr)
+    , m_eventSteps(m_config.stepInfoCollName)
+    , m_ndetectors(0)
+  {
 
 #ifdef _myDEBUG_
     G4cout << "############################################" << G4endl
@@ -65,27 +63,11 @@ namespace G4UA{
 
   }
 
-  void FastCaloSimParamAction::beginOfRun(const G4Run*){
+  void FastCaloSimParamAction::BeginOfRunAction(const G4Run*){
 
     //G4cout << "############################################" << G4endl
     // << "##    FastCaloSimParamAction - BeginOfRun ##" << G4endl
     // << "############################################" << G4endl;
-    // ?? Ok, where do I need this??
-    // init tile calculator
-    if (m_calculator_Tile == nullptr)
-      {
-        // Get the tile calculator from the SD
-        G4SDManager *sdManager = G4SDManager::GetSDMpointer();
-        TileGeoG4SD * tileSD = dynamic_cast<TileGeoG4SD*>( sdManager->FindSensitiveDetector("TileGeoG4SD") );
-        if (tileSD){
-          m_calculator_Tile = tileSD->GetCalculator();
-        } else {
-          G4ExceptionDescription description;
-          description << "FastCaloSimParamAction::BeginOfRunAction - can't find TileGeoG4SDCalc";
-          G4Exception("FastCaloSimParamAction", "NoTileGeoG4SDCalc", FatalException, description);
-          abort();
-        }
-      }
 
     if (m_current_transform == nullptr)
       {
@@ -106,7 +88,7 @@ namespace G4UA{
     return;
   }
 
-  void FastCaloSimParamAction::endOfRun(const G4Run*){
+  void FastCaloSimParamAction::EndOfRunAction(const G4Run*){
 
 
     G4cout << "############################################" << G4endl
@@ -114,12 +96,6 @@ namespace G4UA{
            << "##          deleting calculators          ##" << G4endl
            << "############################################" << G4endl;
 
-    if (m_calculator_Tile !=0) {
-      delete m_calculator_Tile;
-      m_calculator_Tile = 0;
-
-    }
-
     G4cout << "ZH good detector map: " << G4endl;
     for (std::map<std::string, int>::iterator it = m_detectormap.begin(); it!= m_detectormap.end(); ++it)
       {
@@ -139,38 +115,19 @@ namespace G4UA{
            << "############################################" << G4endl;
 
     return;
-
-
   }
 
-  void FastCaloSimParamAction::beginOfEvent(const G4Event*){
+  void FastCaloSimParamAction::BeginOfEventAction(const G4Event*)
+  {
 
     //G4cout << "############################################" << G4endl
     //     << "##  FastCaloSimParamAction - BeginOfEvent ##" << G4endl
     //     << "############################################" << G4endl;
 
-    // init tile calculator
-    if (m_calculator_Tile == nullptr)
-      {
-        // Get the tile calculator from the SD
-        G4SDManager *sdManager = G4SDManager::GetSDMpointer();
-        TileGeoG4SD * tileSD = dynamic_cast<TileGeoG4SD*>( sdManager->FindSensitiveDetector("TileGeoG4SD") );
-        if (tileSD){
-          m_calculator_Tile = tileSD->GetCalculator();
-        } else {
-          G4ExceptionDescription description;
-          description << "FastCaloSimParamAction::BeginOfEventAction - can't find TileGeoG4SDCalc";
-          G4Exception("FastCaloSimParamAction", "NoTileGeoG4SDCalc", FatalException, description);
-          abort();
-        }
-      }
-
-    if (m_current_transform == nullptr)
-      {
-        m_current_transform = new G4AffineTransform ();
-      }
-
-    m_eventSteps = new ISF_FCS_Parametrization::FCS_StepInfoCollection();
+    if (m_current_transform == nullptr) {
+      m_current_transform = new G4AffineTransform ();
+    }
+    if (!m_eventSteps.isValid()) m_eventSteps = std::make_unique<ISF_FCS_Parametrization::FCS_StepInfoCollection>();
     //G4cout << "############################################" << G4endl
     //     << "## FastCaloSimParamAction - BeginOfEvent2 ##" << G4endl
     //     << "############################################" << G4endl;
@@ -179,7 +136,7 @@ namespace G4UA{
     return;
   }
 
-  void FastCaloSimParamAction::endOfEvent(const G4Event*){
+  void FastCaloSimParamAction::EndOfEventAction(const G4Event*){
 
     //G4cout << "############################################" << G4endl
     //     << "##    FastCaloSimParamAction - EndOfEvent ##" << G4endl
@@ -198,64 +155,25 @@ namespace G4UA{
 #endif
 
     //  G4cout << "FastCaloSimParamAction::EndOfEventAction: After initial cleanup, N=" << m_eventSteps->size() << G4endl;
+
+    // Unpack map into vector
+    for (auto it : m_hit_map){
+      for (auto a_s : * it.second){
+        // Giving away ownership of the objects!
+        m_eventSteps->push_back( a_s );
+      }
+      it.second->clear();
+      delete it.second;
+    } // Vector of IDs in the map
+    m_hit_map.clear();
+
     if (m_eventSteps->size()==0) return; //don't need to play with it
     G4cout << "FastCaloSimParamAction::EndOfEventAction: After initial cleanup, N=" << m_eventSteps->size() << G4endl;
 
-    //
-    // Put eventSteps into event store
-    //
-    std::string location("ZHEventSteps");
-    ISF_FCS_Parametrization::FCS_StepInfoCollection* test;
-    // std::cout <<"Check if already in StoreGate:"<<std::endl;
-    if (m_evtStore->contains<ISF_FCS_Parametrization::FCS_StepInfoCollection>(location))
-      {
-        StatusCode check = m_evtStore->retrieve(test,location);
-        if (check.isSuccess())
-          {
-            //std::cout <<"ZH, Already have in StoreGate : "<<test->size()<<std::endl;
-            //want to merge and overwrite!
-            for (ISF_FCS_Parametrization::FCS_StepInfoCollection::iterator iter = m_eventSteps->begin();iter != m_eventSteps->end();iter++)
-              {
-                test->push_back((*iter));
-              }
-            //std::cout <<"Now have: "<<test->size()<<std::endl;
-            //      StatusCode sc = evtStore()->remove(
-            //check
-            check = m_evtStore->retrieve(test,location);
-            if (check.isSuccess())
-              {
-                std::cout <<"ZH, check in StoreGate : "<<test->size()<<std::endl;
-              }
-            /*
-              StatusCode sc = evtStore()->record( test, location); //want to overwrite? but current release doesn't have this method???
-              if( sc.isFailure() ) {
-              G4cout << "Error: Couldn't store EventSteps object in event store at location: " << location << G4endl;//
-              } else {
-
-              G4cout << "Info: Stored EventSteps object (size: " << test->size() << ")"
-              << " in event store at location: " << location << G4endl;
-              }
-            */
-          }
-        else
-          {
-            std::cout <<"ZH WTF ??"<<std::endl;
-          }
-      }
-    else
-      {
-        StatusCode sc = m_evtStore->record( m_eventSteps, location, true );
-        if( sc.isFailure() ) {
-          G4cout << "Error: Couldn't store EventSteps object in event store at location: " << location << G4endl;
-        } else {
-          G4cout << "Info: Stored EventSteps object (size: " << m_eventSteps->size() << ")"
-                 << " in event store at location: " << location << G4endl;
-        }
-      }
     return;
   }
 
-  void FastCaloSimParamAction::processStep(const G4Step* aStep)
+  void FastCaloSimParamAction::UserSteppingAction(const G4Step* aStep)
 {
 
     //G4cout <<"FastCaloSimParamAction - SteppingAction"<<G4endl;
@@ -313,82 +231,84 @@ namespace G4UA{
         if(CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module1::Absorber")
           {
             // shower is inside FCAL1
-            m_current_calculator = m_config.calculator_FCAL1;
+            m_current_calculator = &*m_config.calculator_FCAL1;
             //m_current_calculator = nullptr;
             break;
           }
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module2::Absorber")
           {
             // shower is inside FCAL2
-            m_current_calculator = m_config.calculator_FCAL2;
+            m_current_calculator = &*m_config.calculator_FCAL2;
             //m_current_calculator = nullptr; //try disable..
             break;
           }
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::FCAL::Module3::Absorber")
           {
             // shower is inside FCAL3
-            m_current_calculator = m_config.calculator_FCAL3;
+            m_current_calculator = &*m_config.calculator_FCAL3;
             break;
           }
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Pos::InnerWheel")
           {
-            m_current_calculator = m_config.calculator_EMECIW_pos;
+            m_current_calculator = &*m_config.calculator_EMECIW_pos;
             break;
           }
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Neg::InnerWheel")
           {
             // shower is inside inner EMEC
-            m_current_calculator = m_config.calculator_EMECIW_neg;
+            m_current_calculator = &*m_config.calculator_EMECIW_neg;
             break;
           }
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Pos::OuterWheel")
           {
-            m_current_calculator = m_config.calculator_EMECOW_pos;
+            m_current_calculator = &*m_config.calculator_EMECOW_pos;
             break;
           }
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::Neg::OuterWheel")
           {
             // shower is inside outer EMEC positive
-            m_current_calculator = m_config.calculator_EMECOW_neg;
+            m_current_calculator = &*m_config.calculator_EMECOW_neg;
             break;
           }
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMB::STAC")
           {
             // shower is inside EMB positive
-            m_current_calculator = m_config.calculator_EMB;
+            m_current_calculator = &*m_config.calculator_EMB;
             break;
           }
         //else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::FrontInnerBarrette::Module::Phidiv")
         //	{
-        //          m_current_calculator = m_config.calculator_BIB;
+        //          m_current_calculator = &*m_config.calculator_BIB;
         //          break;
         //	}
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::EMEC::BackOuterBarrette::Module::Phidiv")
           {
-            m_current_calculator = m_config.calculator_BOB;
+            m_current_calculator = &*m_config.calculator_BOB;
             break;
           }
         //else if (CurrentLogicalVolumeName == "LArMgr::LAr::HEC::Module::Depth::Slice::Local")
         //{
-        //  m_current_calculator = m_config.calculator_HECLocal;
+        //  m_current_calculator = &*m_config.calculator_HECLocal;
         //  break;
         //} //doesn't exist anymore
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::HEC::Module::Depth::Slice")
           {
-            m_current_calculator = m_config.calculator_HEC;
+            m_current_calculator = &*m_config.calculator_HEC;
             break;
           }
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::Barrel::Presampler::Module")
           {
-            m_current_calculator = m_config.calculator_EMBPS;
+            m_current_calculator = &*m_config.calculator_EMBPS;
+            break;
           }
         else if (CurrentLogicalVolumeName == "LArMgr::LAr::Endcap::Presampler::LiquidArgon")
           {
-            m_current_calculator = m_config.calculator_EMEPS;
+            m_current_calculator = &*m_config.calculator_EMEPS;
+            break;
           }
         else if (CurrentLogicalVolumeName.find(tilestring)!= std::string::npos)
           {
-            m_current_calculator_Tile = m_calculator_Tile;
+            m_current_calculator_Tile = &*m_config.calculator_TILE;
             break;
           }
 
@@ -480,13 +400,6 @@ namespace G4UA{
               G4ThreeVector subpoint1=position1*(1-fraction1) + position2*fraction1;
               G4ThreeVector subpoint2=position1*(1-fraction2) + position2*fraction2;
 
-              //G4StepPoint *startpoint = 0;
-              //startpoint = const_cast<G4StepPoint*>(aStep->GetPreStepPoint());
-              //startpoint->SetPosition(subpoint1);
-              //G4StepPoint *endpoint = 0;
-              //endpoint = const_cast<G4StepPoint*>(aStep->GetPostStepPoint());
-              //endpoint->SetPosition(subpoint2);
-
               G4StepPoint *startpoint = new G4StepPoint(*(aStep->GetPreStepPoint()));
               G4StepPoint *endpoint = new G4StepPoint(*(aStep->GetPostStepPoint()));
               startpoint->SetPosition(subpoint1);
@@ -494,9 +407,6 @@ namespace G4UA{
 
               //std::cout <<"ZH substep: "<<i<<" Pos: "<<subpoint1<<" "<<subpoint2<<std::endl;
               G4Step* newstep = new G4Step(*aStep);
-              //newstep = const_cast<G4Step*>(aStep);
-              if(newstep->GetPreStepPoint()) delete newstep->GetPreStepPoint();
-              if(newstep->GetPostStepPoint()) delete newstep->GetPostStepPoint();
               newstep->SetPreStepPoint(startpoint);
               newstep->SetPostStepPoint(endpoint);
               newstep->SetStepLength( (subpoint1-subpoint2).mag());
@@ -682,12 +592,12 @@ namespace G4UA{
                 //double time = results[i].energy)==0 ? 0. : (double) results[i].time/results[i].energy/CLHEP::ns;
                 double time = results[i].time;
                 double energy = results[i].energy/CLHEP::MeV;
-
-                ISF_FCS_Parametrization::FCS_StepInfo* theInfo = new ISF_FCS_Parametrization::FCS_StepInfo(pos, id, energy, time, true, nlarh); //store nlarh as info
+                update_map(pos, id, energy, time, true, nlarh); //store nlarh as info
+                // ISF_FCS_Parametrization::FCS_StepInfo* theInfo = new ISF_FCS_Parametrization::FCS_StepInfo(pos, id, energy, time, true, nlarh); //store nlarh as info
                 //This one stores also StepLength, but it is not yet in SVN...
                 //          ISF_FCS_Parametrization::FCS_StepInfo* theInfo = new ISF_FCS_Parametrization::FCS_StepInfo(pos, id, (double) results[i].energy, (double) results[i].time, true, nlarh, StepLength); //store nlarh as info
                 //std::cout <<"Adding new step info: "<<i<<" at: "<<pos<<" Id: "<<id<<" E: "<<energy<<" time: "<<time<<std::endl;
-                m_eventSteps->push_back(theInfo);
+                // m_eventSteps->push_back(theInfo);
               }//nlarh
             //std::cout <<"----"<<std::endl;
           } //istep
@@ -708,7 +618,8 @@ namespace G4UA{
           //std::cout<<"GG: Hello" << std::endl;
 
           //calculation of MicroHit with aStep
-          TileMicroHit micHit = m_calculator_Tile->TileGeoG4SDCalc::GetTileMicroHit(aStep);
+          TileHitData hitData;
+          TileMicroHit micHit = m_current_calculator_Tile->GetTileMicroHit(aStep, hitData);
           Identifier m_invalid_id;
 
           //Check if MicroHit is not in scintillator
@@ -723,14 +634,15 @@ namespace G4UA{
                 //std::cout <<"Something wrong in identifier: One tile pmt: "<<micHit.pmt_up<<" "<<micHit.pmt_down<<std::endl;
                 //std::cout <<"E up: "<<micHit.e_up<<" E down: "<<micHit.e_down<<" T up: "<<micHit.time_up<<" T down: "<<micHit.time_down<<std::endl;
               }
-            ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_up = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_up, micHit.e_up, micHit.time_up, true,1);
+            update_map(pos, micHit.pmt_up, micHit.e_up, micHit.time_up, true,1);
+            // ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_up = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_up, micHit.e_up, micHit.time_up, true,1);
             //Commented out version needs ISF_Event which is not yet in SVN..
             //      ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_up = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_up, micHit.e_up, micHit.time_up, true,1,StepLength);
-            m_eventSteps->push_back(theInfo_Tile_up);
-
-            ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_down = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_down, micHit.e_down,micHit.time_down , true,1);
+            // m_eventSteps->push_back(theInfo_Tile_up);
+            update_map(pos, micHit.pmt_down, micHit.e_down,micHit.time_down , true,1);
+            // ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_down = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_down, micHit.e_down,micHit.time_down , true,1);
             //ISF_FCS_Parametrization::FCS_StepInfo* theInfo_Tile_down = new ISF_FCS_Parametrization::FCS_StepInfo(pos, micHit.pmt_down, micHit.e_down,micHit.time_down , true,1,StepLength);
-            m_eventSteps->push_back(theInfo_Tile_down);
+            // m_eventSteps->push_back(theInfo_Tile_down);
 
             //std::cout << "GG: GetTileMicroHit: pmtID_up,pmtID_down,edep_up,edep_down,scin_Time_up,scin_Time_down:\t" << micHit.pmt_up <<";\t"<< micHit.pmt_down <<";\t"<< micHit.e_up <<";\t"<< micHit.e_down <<";\t" << micHit.time_up <<";\t"<< micHit.time_down << std::endl;
 
@@ -752,4 +664,101 @@ namespace G4UA{
 
   }
 
+
+// We are keeping a map instead of trying to keep the full vector
+// At the end of run we'll push the map back into the flat vector for storage in StoreGate
+void FastCaloSimParamAction::update_map(const CLHEP::Hep3Vector & l_vec, const Identifier & l_cell, double l_energy, double l_time, bool l_valid, int l_detector)
+{
+  // Drop any hits that don't have a good identifier attached
+  if (!m_calo_dd_man->get_element(l_cell)) return;
+
+  auto map_item = m_hit_map.find( l_cell );
+  if (map_item==m_hit_map.end()){
+    m_hit_map[l_cell] = new std::vector< ISF_FCS_Parametrization::FCS_StepInfo* >;
+    m_hit_map[l_cell]->push_back( new ISF_FCS_Parametrization::FCS_StepInfo( l_vec , l_cell , l_energy , l_time , l_valid , l_detector ) );
+  }
+  else {
+
+    // Get the appropriate merging limits
+    double tsame;
+    const CaloCell_ID::CaloSample& layer = m_calo_dd_man->get_element(l_cell)->getSampling();
+    if (layer >= CaloCell_ID::PreSamplerB && layer <= CaloCell_ID::EME3){
+      tsame = m_config.m_maxTimeLAr;
+    } else if (layer >= CaloCell_ID::HEC0  && layer <= CaloCell_ID::HEC3){
+      tsame = m_config.m_maxTimeHEC;
+    } else if (layer >= CaloCell_ID::TileBar0 && layer <= CaloCell_ID::TileExt2){
+      tsame = m_config.m_maxTimeTile;
+    } else if (layer >=CaloCell_ID::FCAL0 && layer <= CaloCell_ID::FCAL2){
+      tsame = m_config.m_maxTimeFCAL;
+    } else {
+      tsame = m_config.m_maxTime;
+    }
+
+    bool match = false;
+    for (auto map_it : * map_item->second){
+      // Time check is straightforward
+      double delta_t = fabs(map_it->time()-l_time);
+      if ( delta_t >= tsame ) continue;
+
+      // Distance check is less straightforward
+      CLHEP::Hep3Vector a_diff = l_vec - map_it->position();
+      double a_inv_length = 1./a_diff.mag();
+      double delta_phi = fabs(sin(l_vec.phi()-map_it->position().phi())*a_diff.mag());
+      double delta_eta = fabs(sin(l_vec.theta()-map_it->position().theta())*a_diff.mag());
+      double delta_r = fabs(a_diff.dot( l_vec ) * a_inv_length);
+      double hit_diff2 = map_it->position().diff2( l_vec );
+
+      // Overall merging scheme
+      if (layer >= CaloCell_ID::PreSamplerB && layer <= CaloCell_ID::EME3){
+        // Customized merging scheme for LAr barrel and endcap, use only if we're not changing maxRadiusLAr value
+        if(m_config.m_maxRadiusLAr == 25){
+          if (layer==CaloCell_ID::PreSamplerB || layer==CaloCell_ID::PreSamplerE){
+            // PS default is 1mm in eta, 5mm in phi, no cut in r
+            if (delta_r >= m_config.m_maxrPS) continue;
+            if (delta_eta >= m_config.m_maxEtaPS) continue;
+            if (delta_phi >= m_config.m_maxPhiPS) continue;
+          } else if (layer==CaloCell_ID::EMB1 || layer==CaloCell_ID::EME1){
+            // EM1 default is 1mm in eta, 5mm in phi, 15mm in r
+            if (delta_r >= m_config.m_maxrEM1) continue;
+            if (delta_eta >= m_config.m_maxEtaEM1) continue;
+            if (delta_phi >= m_config.m_maxPhiEM1) continue;
+          } else if (layer==CaloCell_ID::EMB2 || layer==CaloCell_ID::EME2){
+            // EM2 default is 1mm in eta, 5mm in phi, 60mm in r
+            if (delta_r >= m_config.m_maxrEM2) continue;
+            if (delta_eta >= m_config.m_maxEtaEM2) continue;
+            if (delta_phi >= m_config.m_maxPhiEM2) continue;
+          } else if (layer==CaloCell_ID::EMB3 || layer==CaloCell_ID::EME3){
+            // EM3 default is 1mm in eta, 5mm in phi, 8mm in r
+            if (delta_r >= m_config.m_maxrEM3) continue;
+            if (delta_eta >= m_config.m_maxEtaEM3) continue;
+            if (delta_phi >= m_config.m_maxPhiEM3) continue;
+          }
+        } else{ // Merging schemes done by changing maxRadiusLAr
+            if ( hit_diff2 >= m_config.m_maxRadiusLAr ) continue;
+        }
+      } else if (layer >= CaloCell_ID::HEC0  && layer <= CaloCell_ID::HEC3){
+        if ( hit_diff2 >= m_config.m_maxRadiusHEC ) continue;
+      } else if (layer >= CaloCell_ID::TileBar0 && layer <= CaloCell_ID::TileExt2){
+        if ( hit_diff2 >= m_config.m_maxRadiusTile ) continue;
+      } else if (layer >=CaloCell_ID::FCAL0 && layer <= CaloCell_ID::FCAL2){
+        if ( hit_diff2 >= m_config.m_maxRadiusFCAL ) continue;
+      } else {
+        if ( hit_diff2 >= m_config.m_maxRadius ) continue;
+      }
+      // Found a match.  Make a temporary that will be deleted!
+      ISF_FCS_Parametrization::FCS_StepInfo my_info( l_vec , l_cell , l_energy , l_time , l_valid , l_detector );
+      *map_it += my_info;
+      match = true;
+      break;
+    } // End of search for match in time and space
+    if (!match){
+      map_item->second->push_back( new ISF_FCS_Parametrization::FCS_StepInfo( l_vec , l_cell , l_energy , l_time , l_valid , l_detector ) );
+    } // Didn't match
+  } // ID already in the map
+
+} // That's it for updating the map!
+
+
+
+
 } // namespace G4UA
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamActionTool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamActionTool.cxx
index da2f6d16278a9993ecd86f614027190fdfe6ab7b..f3dc27041714763ea5a125749fd70301f9326ea2 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamActionTool.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/FastCaloSimParamActionTool.cxx
@@ -5,6 +5,7 @@
 #include "CxxUtils/make_unique.h"
 #include "ISF_Geant4UserActions/FastCaloSimParamActionTool.h"
 #include "LArG4Code/ILArCalculatorSvc.h"
+#include "TileG4Interfaces/ITileCalculator.h"
 
 namespace G4UA{
 
@@ -23,9 +24,39 @@ namespace G4UA{
     , m_heccalc("HECWheelCalculator", name)
     , m_pscalc("EMBPresamplerCalculator", name)
     , m_emepscalc("EMECPresamplerCalculator", name)
+    , m_tileCalculator("TileGeoG4SDCalc", name)
   {
     declareProperty("shift_lar_subhit",m_config.shift_lar_subhit, "");
     declareProperty("shorten_lar_step",m_config.shorten_lar_step, "");
+    declareProperty("stepInfoCollName",m_config.stepInfoCollName, "");
+
+    declareProperty("maxRadius",m_config.m_maxRadius, "");
+    declareProperty("maxRadiusLAr",m_config.m_maxRadiusLAr, "");
+    declareProperty("maxRadiusHEC",m_config.m_maxRadiusHEC, "");
+    declareProperty("maxRadiusFCAL",m_config.m_maxRadiusFCAL, "");
+    declareProperty("maxRadiusTile",m_config.m_maxRadiusTile, "");
+
+    declareProperty("maxTime",m_config.m_maxTime, "");
+    declareProperty("maxTimeLAr",m_config.m_maxTimeLAr, "");
+    declareProperty("maxTimeHEC",m_config.m_maxTimeHEC, "");
+    declareProperty("maxTimeFCAL",m_config.m_maxTimeFCAL, "");
+    declareProperty("maxTimeTile",m_config.m_maxTimeTile, "");
+
+    declareProperty("maxEtaPS", m_config.m_maxEtaPS, "");
+    declareProperty("maxPhiPS", m_config.m_maxPhiPS, "");
+    declareProperty("maxrPS", m_config.m_maxrPS, "");
+
+    declareProperty("maxEtaEM1", m_config.m_maxEtaEM1, "");
+    declareProperty("maxPhiEM1", m_config.m_maxPhiEM1, "");
+    declareProperty("maxrEM1", m_config.m_maxrEM1, "");
+
+    declareProperty("maxEtaEM2", m_config.m_maxEtaEM2, "");
+    declareProperty("maxPhiEM2", m_config.m_maxPhiEM2, "");
+    declareProperty("maxrEM2", m_config.m_maxrEM2, "");
+
+    declareProperty("maxEtaEM3", m_config.m_maxEtaEM3, "");
+    declareProperty("maxPhiEM3", m_config.m_maxPhiEM3, "");
+    declareProperty("maxrEM3", m_config.m_maxrEM3, "");
 
     declareProperty("EMECPosIWCalculator", m_emepiwcalc);
     declareProperty("EMECNegIWCalculator", m_emeniwcalc);
@@ -39,34 +70,24 @@ namespace G4UA{
     declareProperty("HECWheelCalculator", m_heccalc);
     declareProperty("EMBPSCalculator",m_pscalc);
     declareProperty("EMECPSCalculator", m_emepscalc);
-    }
+    declareProperty("TileCalculator", m_tileCalculator);
+  }
 
   StatusCode FastCaloSimParamActionTool::initialize()
   {
-    ATH_CHECK(m_emepiwcalc.retrieve());
-    ATH_CHECK(m_emeniwcalc.retrieve());
-    ATH_CHECK(m_emepowcalc.retrieve());
-    ATH_CHECK(m_emenowcalc.retrieve());
-    ATH_CHECK(m_emeobarcalc.retrieve());
-    ATH_CHECK(m_embcalc.retrieve());
-    ATH_CHECK(m_fcal1calc.retrieve());
-    ATH_CHECK(m_fcal2calc.retrieve());
-    ATH_CHECK(m_fcal3calc.retrieve());
-    ATH_CHECK(m_heccalc.retrieve());
-    ATH_CHECK(m_pscalc.retrieve());
-    ATH_CHECK(m_emepscalc.retrieve());
-    m_config.calculator_EMECIW_pos = &*m_emepiwcalc;
-    m_config.calculator_EMECIW_neg = &*m_emeniwcalc;
-    m_config.calculator_EMECOW_pos = &*m_emepowcalc;
-    m_config.calculator_EMECOW_neg = &*m_emenowcalc;
-    m_config.calculator_BOB        = &*m_emeobarcalc;
-    m_config.calculator_EMB        = &*m_embcalc;
-    m_config.calculator_FCAL1      = &*m_fcal1calc;
-    m_config.calculator_FCAL2      = &*m_fcal2calc;
-    m_config.calculator_FCAL3      = &*m_fcal3calc;
-    m_config.calculator_HEC        = &*m_heccalc;
-    m_config.calculator_EMBPS      = &*m_pscalc;
-    m_config.calculator_EMEPS      = &*m_emepscalc;
+    m_config.calculator_EMECIW_pos.setTypeAndName(m_emepiwcalc.typeAndName());
+    m_config.calculator_EMECIW_neg.setTypeAndName(m_emeniwcalc.typeAndName());
+    m_config.calculator_EMECOW_pos.setTypeAndName(m_emepowcalc.typeAndName());
+    m_config.calculator_EMECOW_neg.setTypeAndName(m_emenowcalc.typeAndName());
+    m_config.calculator_BOB.setTypeAndName(m_emeobarcalc.typeAndName());
+    m_config.calculator_EMB.setTypeAndName(m_embcalc.typeAndName());
+    m_config.calculator_FCAL1.setTypeAndName(m_fcal1calc.typeAndName());
+    m_config.calculator_FCAL2.setTypeAndName(m_fcal2calc.typeAndName());
+    m_config.calculator_FCAL3.setTypeAndName(m_fcal3calc.typeAndName());
+    m_config.calculator_HEC.setTypeAndName(m_heccalc.typeAndName());
+    m_config.calculator_EMBPS.setTypeAndName(m_pscalc.typeAndName());
+    m_config.calculator_EMEPS.setTypeAndName(m_emepscalc.typeAndName());
+    m_config.calculator_TILE.setTypeAndName(m_tileCalculator.typeAndName());
 
     return StatusCode::SUCCESS;
   }
@@ -80,28 +101,18 @@ namespace G4UA{
 
   StatusCode FastCaloSimParamActionTool::queryInterface(const InterfaceID& riid, void** ppvIf){
 
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndRunActionTool::interfaceID()) {
-      *ppvIf = (IEndRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.cxx
index b89569a8ddf4c9483c915b60dc5c4a0fea040052..b7396be5f99513e8843963ba25bca0411b053a63 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.cxx
@@ -25,7 +25,7 @@ namespace G4UA{
     TestBoundariesUserAction::TestBoundariesUserAction():AthMessaging(Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc" ),"TestBoundariesUserAction"){;
     }
 
-    void TestBoundariesUserAction::beginOfRun(const G4Run*){;
+    void TestBoundariesUserAction::BeginOfRunAction(const G4Run*){;
       file = TFile::Open("points.root","RECREATE");
       ATH_MSG_INFO("Open file points.root, create tree");
       file->cd();
@@ -41,7 +41,7 @@ namespace G4UA{
       return;
     }
     
-    void TestBoundariesUserAction::endOfRun(const G4Run*){
+    void TestBoundariesUserAction::EndOfRunAction(const G4Run*){
       ATH_MSG_INFO("Writing file points.root");
       file->cd();
       tree->Write();
@@ -51,7 +51,7 @@ namespace G4UA{
       tree=0;
     }
     
-    void TestBoundariesUserAction::processStep(const G4Step* aStep){
+    void TestBoundariesUserAction::UserSteppingAction(const G4Step* aStep){
       G4StepPoint * preStep = aStep->GetPreStepPoint();
       
       G4StepPoint *postStep = aStep->GetPostStepPoint();
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.h
index 8d7837e8e52181c01f35f5dde39afa7e4203e0d3..59cdd411b23d233d1081224a5dcb1d0c02ed2a0c 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserAction.h
@@ -14,9 +14,8 @@ class TFile;
 #include "TMath.h"
 
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
 #include "AthenaBaseComps/AthMessaging.h"
 
 
@@ -25,14 +24,14 @@ namespace G4UA{
   namespace iGeant4{
     
     class TestBoundariesUserAction:
-    public AthMessaging, public IBeginRunAction,  public IEndRunAction,  public ISteppingAction
+    public AthMessaging, public G4UserRunAction, public G4UserSteppingAction
     {
       
     public:
       TestBoundariesUserAction();
-      virtual void beginOfRun(const G4Run*) override;
-      virtual void endOfRun(const G4Run*) override;
-      virtual void processStep(const G4Step*) override;
+      virtual void BeginOfRunAction(const G4Run*) override;
+      virtual void EndOfRunAction(const G4Run*) override;
+      virtual void UserSteppingAction(const G4Step*) override;
     private:
       
       typedef std::map<std::string,int> SMap;
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserActionTool.cxx b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserActionTool.cxx
index 0a50098b36f3230bb73b41fa0d87d2906a63a674..c5d367c7457bacf41a2e4ed1a2f9eeaee6951fd2 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserActionTool.cxx
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserActionTool.cxx
@@ -19,18 +19,13 @@ namespace G4UA{
     }
     StatusCode TestBoundariesUserActionTool::queryInterface(const InterfaceID& riid, void** ppvIf){
       
-      if(riid == IBeginRunActionTool::interfaceID()) {
-	*ppvIf = (IBeginRunActionTool*) this;
+      if(riid == IG4RunActionTool::interfaceID()) {
+	*ppvIf = (IG4RunActionTool*) this;
 	addRef();
 	return StatusCode::SUCCESS;
       }
-      if(riid == IEndRunActionTool::interfaceID()) {
-	*ppvIf = (IEndRunActionTool*) this;
-	addRef();
-	return StatusCode::SUCCESS;
-      }
-      if(riid == ISteppingActionTool::interfaceID()) {
-	*ppvIf = (ISteppingActionTool*) this;
+      if(riid == IG4SteppingActionTool::interfaceID()) {
+	*ppvIf = (IG4SteppingActionTool*) this;
 	addRef();
 	return StatusCode::SUCCESS;
       }
diff --git a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserActionTool.h b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserActionTool.h
index 6bc0a76d1ae9b2314e17b42b4006560c1c7b37f8..d23c0fba7598d38cecb7d7f5ff1b50c28293eda3 100644
--- a/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserActionTool.h
+++ b/Simulation/ISF/ISF_Geant4/ISF_Geant4UserActions/src/TestBoundariesUserActionTool.h
@@ -4,9 +4,8 @@
 
 #ifndef ISF_GEANT4USERACTIONS_G4UA_IGEANT4_TESTBOUNDARIESUSERACTIONTOOL_H 
 #define ISF_GEANT4USERACTIONS_G4UA_IGEANT4_TESTBOUNDARIESUSERACTIONTOOL_H 
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "TestBoundariesUserAction.h"
 
@@ -24,21 +23,18 @@ namespace G4UA{
 
     class TestBoundariesUserActionTool: 
     public ActionToolBase<TestBoundariesUserAction>,
-      public IBeginRunActionTool,  public IEndRunActionTool,  public ISteppingActionTool
+      public IG4RunActionTool, public IG4SteppingActionTool
     {
       
     public:
       /// standard tool ctor
       TestBoundariesUserActionTool(const std::string& type, const std::string& name,const IInterface* parent);
-      /// gets the BoR action
-      virtual IBeginRunAction* getBeginRunAction() override final 
-      { return static_cast<IBeginRunAction*>( getAction() ); }
-      /// gets the EoR action
-      virtual IEndRunAction* getEndRunAction() override final 
-      { return static_cast<IEndRunAction*>( getAction() ); }
+      /// gets the run action
+      virtual G4UserRunAction* getRunAction() override final 
+      { return static_cast<G4UserRunAction*>( getAction() ); }
       /// gets the stepping action
-      virtual ISteppingAction* getSteppingAction() override final 
-      { return static_cast<ISteppingAction*>( getAction() ); }
+      virtual G4UserSteppingAction* getSteppingAction() override final 
+      { return static_cast<G4UserSteppingAction*>( getAction() ); }
       /// Gaudi interface handling
       virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
     protected:
diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Interfaces/cmt/requirements b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Interfaces/cmt/requirements
deleted file mode 100644
index 6678f4e10ad4a2d3329be4ec0738f4c2e73ecc32..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Interfaces/cmt/requirements
+++ /dev/null
@@ -1,16 +0,0 @@
-package ISF_HepMC_Interfaces
-author <Andreas.Salzburger@cern.ch>
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  GaudiInterface             GaudiInterface-*        External
-use  ISF_Event                  ISF_Event-*             Simulation/ISF/ISF_Core
-end_public
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/cmt/requirements b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/cmt/requirements
deleted file mode 100644
index 80a46ffe2c2f321f37ccbe060bd1826230440c19..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/cmt/requirements
+++ /dev/null
@@ -1,36 +0,0 @@
-package ISF_HepMC_Tools
-author <Andreas.Salzburger@cern.ch>
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-#################################################################
-# public use statements
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*         External
-
-#################################################################
-# private use statements
-private
-use AthenaBaseComps             AthenaBaseComps-*        Control
-use AtlasHepMC                  AtlasHepMC-*             External
-use ISF_Interfaces              ISF_Interfaces-*         Simulation/ISF/ISF_Core
-use ISF_Event                   ISF_Event-*              Simulation/ISF/ISF_Core
-use ISF_HepMC_Interfaces        ISF_HepMC_Interfaces-*   Simulation/ISF/ISF_HepMC
-use PathResolver                PathResolver-*           Tools
-use TruthUtils                  TruthUtils-*             Generators
-
-# For TF1
-use AtlasROOT                   AtlasROOT-*              External
-apply_tag rootGraphicsLibs
-
-public
-library ISF_HepMC_Tools *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-
-private
-# use this to enable debugging for this package
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_ParametricSim/ISF_ParSimInterfaces/cmt/requirements b/Simulation/ISF/ISF_ParametricSim/ISF_ParSimInterfaces/cmt/requirements
deleted file mode 100644
index 333b032979bf90e6337dcc4f16606d4e6002607b..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_ParametricSim/ISF_ParSimInterfaces/cmt/requirements
+++ /dev/null
@@ -1,12 +0,0 @@
-package ISF_ParSimInterfaces
-author <Andreas.Salzburger@cern.ch>
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-
-public
-use AtlasPolicy                 AtlasPolicy-*                   
-use GaudiInterface              GaudiInterface-*                External
-use TrkParameters		        TrkParameters-*                 Tracking/TrkEvent
-use  xAODTracking               xAODTracking-*                  Event/xAOD
-
-#end_private
diff --git a/Simulation/ISF/ISF_ParametricSim/ISF_ParSimServices/cmt/requirements b/Simulation/ISF/ISF_ParametricSim/ISF_ParSimServices/cmt/requirements
deleted file mode 100644
index ee39d6e58689d001fadb44279f97e63a90308af7..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_ParametricSim/ISF_ParSimServices/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-package ISF_ParSimServices
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-
-
-#################################################################
-# public use statements
-use AtlasPolicy               AtlasPolicy-*
-use GaudiInterface            GaudiInterface-*             External
-use AthenaBaseComps           AthenaBaseComps-*            Control
-use ISF_Interfaces            ISF_Interfaces-*             Simulation/ISF/ISF_Core
-
-#################################################################
-# private use statements
-private
-use ISF_Event                 ISF_Event-*                  Simulation/ISF/ISF_Core
-
-public
-use TrkDetDescrInterfaces     TrkDetDescrInterfaces-*      Tracking/TrkDetDescr
-
-
-library ISF_ParSimServices *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-
-# use the following to compile with debug information
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/cmt/requirements b/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/cmt/requirements
deleted file mode 100644
index 8cc20edef4b77354a6c81c8c1d2a588a76d250cc..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_ParametricSim/ISF_ParSimTools/cmt/requirements
+++ /dev/null
@@ -1,55 +0,0 @@
-package ISF_ParSimTools
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Miha Muskinja <Miha.Muskinja@cern.ch>
-
-public
-########## Control #############################################################
-use AtlasPolicy              AtlasPolicy-*
-use AthenaBaseComps          AthenaBaseComps-*          Control
-use AthenaKernel             AthenaKernel-*             Control
-use GaudiInterface           GaudiInterface-*           External
-
-########## CLHEP & ROOT ########################################################
-use AtlasROOT                AtlasROOT-*                External
-use AtlasCLHEP               AtlasCLHEP-*               External
-use AthenaKernel             AthenaKernel-*             Control
-
-########## ISF #################################################################
-use ISF_Interfaces           ISF_Interfaces-*           Simulation/ISF/ISF_Core   
-use ISF_ParSimInterfaces     ISF_ParSimInterfaces-*     Simulation/ISF/ISF_ParametricSim
-
-########## xAOD ################################################################
-use xAODTracking             xAODTracking-*             Event/xAOD
-
-########## Tracking ############################################################
-use TrkExInterfaces          TrkExInterfaces-*          Tracking/TrkExtrapolation
-use InDetBeamSpotService     InDetBeamSpotService-*     InnerDetector/InDetConditions
-
-
-private
-
-########## ISF #################################################################
-use ISF_Event                ISF_Event-*                Simulation/ISF/ISF_Core
-
-########## External ############################################################
-use AtlasCLHEP               AtlasCLHEP-*               External
-use TrkParameters            TrkParameters-*            Tracking/TrkEvent
-
-########## PathResolver ########################################################
-use PathResolver             PathResolver-*             Tools
-
-########## RooFit ##############################################################
-apply_tag ROOTRooFitLibs
-
-########## Initialize ../Data/ folder ##########################################
-apply_pattern declare_runtime_extras extras = "../Data/*.txt ../Data/*.root"
-
-public
-library ISF_ParSimTools *.cxx components/*.cxx
-apply_pattern component_library
-
-# use the following to compile with debug information
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_SimulationSelectors/cmt/requirements b/Simulation/ISF/ISF_SimulationSelectors/cmt/requirements
deleted file mode 100644
index cb5efb69ce915b1235606d6fb3cef27574ea5acf..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_SimulationSelectors/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-package ISF_SimulationSelectors
-author <Elmar.Ritsch@cern.ch>
-
-manager Andreas Salzburger <Andreas.Salzburger@cern.ch>
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager Wolfgang Lukas <Wolfgang.Lukas@cern.ch>
-
-#################################################################
-# public use statements
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*        External
-
-
-use AtlasROOT                   AtlasROOT-*             External
-
-#################################################################
-# private use statements
-private
-use AtlasHepMC                  AtlasHepMC-*            External
-use ISF_Event                   ISF_Event-*             Simulation/ISF/ISF_Core
-use ISF_Interfaces              ISF_Interfaces-*        Simulation/ISF/ISF_Core
-use ISF_TrackingInterfaces      ISF_TrackingInterfaces-* Simulation/ISF/ISF_Tracking
-
-use BarcodeServices             BarcodeServices-*       Simulation/Barcode      
-
-public
-library ISF_SimulationSelectors *.cxx components/*.cxx
-apply_pattern declare_python_modules files="*.py"
-apply_pattern component_library
-
-private
-# uncomment the following lines to enable debug symbols in this package:
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Tracking/ISF_TrackingInterfaces/cmt/requirements b/Simulation/ISF/ISF_Tracking/ISF_TrackingInterfaces/cmt/requirements
deleted file mode 100644
index 6b7c47cbe20df47ebae365964758f996816d5eb4..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Tracking/ISF_TrackingInterfaces/cmt/requirements
+++ /dev/null
@@ -1,13 +0,0 @@
-package ISF_TrackingInterfaces
-author <Elmar.Ritsch@cern.ch>
-
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  GaudiInterface             GaudiInterface-*        External
-end_public
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Tracking/ISF_TrackingTools/cmt/requirements b/Simulation/ISF/ISF_Tracking/ISF_TrackingTools/cmt/requirements
deleted file mode 100644
index 658ab9890fcb292688e8973288394a015ad4cccb..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Tracking/ISF_TrackingTools/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package ISF_TrackingTools
-author <Elmar.Ritsch@cern.ch>
-
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-
-public
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*         External
-end_public
-
-private
-use AthenaBaseComps             AthenaBaseComps-*        Control
-
-use ISF_TrackingInterfaces      ISF_TrackingInterfaces-* Simulation/ISF/ISF_Tracking
-use ISF_Event                   ISF_Event-*              Simulation/ISF/ISF_Core
-
-use TrkDetDescrInterfaces       TrkDetDescrInterfaces-*  Tracking/TrkDetDescr
-use TrkExInterfaces             TrkExInterfaces-*        Tracking/TrkExtrapolation
-use TrkEventPrimitives          TrkEventPrimitives-*     Tracking/TrkEvent
-use TrkParameters               TrkParameters-*          Tracking/TrkEvent
-use TrkGeometry                 TrkGeometry-*            Tracking/TrkDetDescr
-
-public
-library ISF_TrackingTools *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-
-private
-# use this to enable debugging for this package
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/ISF/ISF_Validation/CMakeLists.txt b/Simulation/ISF/ISF_Validation/CMakeLists.txt
index 065d472492c4a68ada314215a0bf2508f4380128..9504397f872c1455deb3cdd2be4064379e01024b 100644
--- a/Simulation/ISF/ISF_Validation/CMakeLists.txt
+++ b/Simulation/ISF/ISF_Validation/CMakeLists.txt
@@ -11,4 +11,4 @@ atlas_depends_on_subdirs( PRIVATE
 
 # Install files from the package:
 atlas_install_runtime( test/ISF_Validation_TestConfiguration.xml )
-atlas_install_scripts( scripts/*.sh )
+atlas_install_scripts( scripts/*.sh test/*.sh )
diff --git a/Simulation/ISF/ISF_Validation/cmt/requirements b/Simulation/ISF/ISF_Validation/cmt/requirements
deleted file mode 100644
index 0bed55c828b6926218813bc61452ea9aabc0c02f..0000000000000000000000000000000000000000
--- a/Simulation/ISF/ISF_Validation/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package ISF_Validation
-
-manager Elmar Ritsch <Elmar.Ritsch@cern.ch>
-manager John Chapman <chapman@hep.phy.cam.ac.uk>
-
-private
-use AtlasPolicy                 AtlasPolicy-*
-
-private
-use TestPolicy                  TestPolicy-*
-apply_pattern validate_xml
-apply_pattern declare_scripts   files="../scripts/*.sh"
-
-public
-macro ISF_Validation_TestConfiguration "../test/ISF_Validation_TestConfiguration.xml"
-apply_pattern declare_runtime extras="../test/ISF_Validation_TestConfiguration.xml"
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh
new file mode 100755
index 0000000000000000000000000000000000000000..cacb98ecb3d5e2aa874f9371f9ddeabc540f21e6
--- /dev/null
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_minbias.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# art-description: Run simulation using ISF with the ATLFASTIIF simulator, reading minbias events, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC12' --simulator 'ATLFASTIIF' --postInclude 'default:PyJobTransforms/UseFrontier.py' 'G4AtlasTests/postInclude.DCubeTest.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.119994.Pythia8_A2MSTW2008LO_minbias_inelastic.evgen.EVNT.e3099.01517253._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 2000
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+
+#TODO Add Digi and Reco steps
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh
new file mode 100755
index 0000000000000000000000000000000000000000..271dadc58821d7a9749e21e307c1e3228284df8d
--- /dev/null
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTIIF_ttbar.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# art-description: Run simulation using ISF with the ATLFASTIIF simulator, reading ttbar events, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC12' --simulator 'ATLFASTIIF' --postInclude 'default:PyJobTransforms/UseFrontier.py' 'G4AtlasTests/postInclude.DCubeTest.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 2000
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+
+#TODO Add Digi and Reco steps
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTII_ttbar.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTII_ttbar.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c260e86de49a367b1b76b8a3b69e39f92ddd12e5
--- /dev/null
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_ATLFASTII_ttbar.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation  using ISF with the ATLFASTII simulator, reading ttbar events, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC12' --simulator 'ATLFASTII' --postInclude 'default:PyJobTransforms/UseFrontier.py' 'G4AtlasTests/postInclude.DCubeTest.py' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 250
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CalibrationHits_pions.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CalibrationHits_pions.sh
new file mode 100755
index 0000000000000000000000000000000000000000..87f89062d1d8d6a11c99096f7ae5d28a652b1c58
--- /dev/null
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CalibrationHits_pions.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation using ISF with the FullG4 simulator, reading single pion events, writing HITS including full CaloCalibrationHit information, using 2015 geometry and conditions
+# art-type: grid
+
+Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC12' --simulator 'FullG4'  --postInclude 'G4AtlasTests/postInclude.DCubeTest_CaloCalibHits.py' --preExec 'simFlags.ReleaseGeoModel=False;' --preInclude 'SimulationJobOptions/preInclude.CalHits.py,SimulationJobOptions/preInclude.ParticleID.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/pi_E50_eta0-60.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '10'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSim.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSim.sh
new file mode 100755
index 0000000000000000000000000000000000000000..3d5684b363fa66973613c8d70fccfd76e3f77681
--- /dev/null
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSim.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run cosmics simulation using ISF with the FullG4 simulator, generating events on-the-fly, using 2015 geometry and conditions
+# art-type: grid
+
+Sim_tf.py --conditionsTag 'OFLCOND-RUN12-SDR-19' --physicsList 'QGSP_BERT' --truthStrategy 'MC12' --simulator 'FullG4' --outputEVNT_COSMICSTRFile 'test.TR.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '1500' --randomSeed '1234' --DataRunNumber '10' --CosmicFilterVolume 'Calo' --CosmicFilterVolume2 'NONE' --preInclude 'SimulationJobOptions/preInclude.Cosmics.py' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --CosmicPtSlice 'NONE' --beamType 'cosmics'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root test.TR.pool.root
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSimTR.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSimTR.sh
new file mode 100755
index 0000000000000000000000000000000000000000..94361f1e65c1990e4e5a3a622aa8ce1e52348957
--- /dev/null
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_CosmicSimTR.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run cosmics simulation using ISF with the FullG4 simulator, using TrackRecords as input, using 2015 geometry and conditions
+# art-type: grid
+
+Sim_tf.py --conditionsTag 'OFLCOND-RUN12-SDR-19'  --physicsList 'QGSP_BERT' --truthStrategy 'MC12' --simulator 'FullG4' --inputEVNT_COSMICSFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/Cosmics.TR.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents -1 --randomSeed 1234 --DataRunNumber '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --firstEvent 0 --preInclude 'SimulationJobOptions/preInclude.Cosmics.py' --beamType 'cosmics'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ZPrime_QuasiStable.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ZPrime_QuasiStable.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a429d3ee59654112640fdcdfadc3c3d385461a21
--- /dev/null
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ZPrime_QuasiStable.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation using ISF with the FullG4_LongLived simulator, reading events, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'FullG4_LongLived' --postInclude 'default:PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/EVNT.04607198._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 10
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_minbias.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_minbias.sh
new file mode 100755
index 0000000000000000000000000000000000000000..5582b841286c416a4cdb27685c1f638750def2fb
--- /dev/null
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_minbias.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation using ISF with the FullG4 simulator, reading minbias events, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC15aPlus' --simulator 'FullG4' --postInclude 'default:PyJobTransforms/UseFrontier.py,G4AtlasTests/postInclude.DCubeTest.py' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py,SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.119994.Pythia8_A2MSTW2008LO_minbias_inelastic.evgen.EVNT.e3099.01517253._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 50
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ttbar.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ttbar.sh
new file mode 100755
index 0000000000000000000000000000000000000000..01e990b0b70bb61d7985f02f2e77a939bc5a7630
--- /dev/null
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_FullG4_ttbar.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation  using ISF with the FullG4 simulator, reading ttbar events, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/ttbar_muplusjets-pythia6-7000.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '4' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.DCubeTest.py' --preExec 'AtlasG4Tf:simFlags.ReleaseGeoModel=False;'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/ISF/ISF_Validation/test/test_Sim_G4FastCalo_ttbar.sh b/Simulation/ISF/ISF_Validation/test/test_Sim_G4FastCalo_ttbar.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d054eb922abe53b297e75c199f5ea4f42ab095c7
--- /dev/null
+++ b/Simulation/ISF/ISF_Validation/test/test_Sim_G4FastCalo_ttbar.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation  using ISF with the G4FastCalo simulator, reading ttbar events, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+Sim_tf.py --conditionsTag 'default:OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --truthStrategy 'MC12' --simulator 'G4FastCalo' --postInclude 'default:PyJobTransforms/UseFrontier.py' 'G4AtlasTests/postInclude.DCubeTest.py' --preInclude 'EVNTtoHITS:SimulationJobOptions/preInclude.BeamPipeKill.py' --DataRunNumber '222525' --geometryVersion 'default:ATLAS-R2-2015-03-01-00_VALIDATION' --inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc12_valid.110401.PowhegPythia_P2012_ttbar_nonallhad.evgen.EVNT.e3099.01517252._000001.pool.root.1" --outputHITSFile "test.HITS.pool.root" --maxEvents 250
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Interfaces/HepMC_Interfaces/cmt/requirements b/Simulation/Interfaces/HepMC_Interfaces/cmt/requirements
deleted file mode 100644
index 363c9d47710172d1e9a43d438cf36cdecd5f1223..0000000000000000000000000000000000000000
--- a/Simulation/Interfaces/HepMC_Interfaces/cmt/requirements
+++ /dev/null
@@ -1,10 +0,0 @@
-package HepMC_Interfaces
-
-public
-use  AtlasPolicy                AtlasPolicy-*
-use  GaudiInterface             GaudiInterface-*        External
-end_public
-
-private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Simulation/RunDependentSim/RunDependentSimComps/cmt/requirements b/Simulation/RunDependentSim/RunDependentSimComps/cmt/requirements
deleted file mode 100644
index 65e953fd7e5c7b19c1ec227b0acff41aefb43663..0000000000000000000000000000000000000000
--- a/Simulation/RunDependentSim/RunDependentSimComps/cmt/requirements
+++ /dev/null
@@ -1,12 +0,0 @@
-package RunDependentSimComps
-author Ayana Arce <atarce (a) phy.duke.edu>
-
-use AtlasPolicy         AtlasPolicy-*
-
-## No need for use statements for python dependencies
-#use LumiBlockComps      LumiBlockComps-*        LumiBlock -no_auto_imports
-#use Digitization        Digitization-*          Simulation -no_auto_imports
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_scripts files="RunDepTaskMaker.py PrintFirstJobForRun.py"
-
diff --git a/Simulation/RunDependentSim/RunDependentSimData/cmt/requirements b/Simulation/RunDependentSim/RunDependentSimData/cmt/requirements
deleted file mode 100644
index d321f8ddd9ac3c3714e95c4dfdf6a87092f1cfbd..0000000000000000000000000000000000000000
--- a/Simulation/RunDependentSim/RunDependentSimData/cmt/requirements
+++ /dev/null
@@ -1,14 +0,0 @@
-package RunDependentSimData
-author Ayana Arce <atarce (a) phy.duke.edu>
-
-use AtlasPolicy         AtlasPolicy-*
-
-use MinimalRunTime MinimalRunTime-* Control -no_auto_imports
-
-# Install run-time files
-# apply_pattern install_runtime
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_scripts files="rundmc_printdist"
-
-
-
diff --git a/Simulation/SimuJobTransforms/cmt/requirements b/Simulation/SimuJobTransforms/cmt/requirements
deleted file mode 100644
index 769df3b1af1500706e300b777308a34cfce2923a..0000000000000000000000000000000000000000
--- a/Simulation/SimuJobTransforms/cmt/requirements
+++ /dev/null
@@ -1,11 +0,0 @@
-package SimuJobTransforms
-
-use AtlasPolicy AtlasPolicy-*
-use AtlasPython AtlasPython-* External -no_auto_imports
-use PyJobTransforms PyJobTransforms-* Tools
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_job_transforms tfs='*.py' jo='*.py'
-apply_pattern declare_scripts   files="../scripts/*.sh"
-macro SimuJobTransforms_TestConfiguration "../test/SimuJobTransforms_TestConfiguration.xml"
-apply_pattern declare_runtime_extras extras="../test/SimuJobTransforms_TestConfiguration.xml"
diff --git a/Simulation/SimuJobTransforms/python/simTrfArgs.py b/Simulation/SimuJobTransforms/python/simTrfArgs.py
index a6aa6cc872d23f0f07dd760978055b92219bf826..0e6fd040ccd955deb565a57e8f57e8d9a10a3058 100644
--- a/Simulation/SimuJobTransforms/python/simTrfArgs.py
+++ b/Simulation/SimuJobTransforms/python/simTrfArgs.py
@@ -69,6 +69,9 @@ def addBasicDigiArgs(parser):
     parser.add_argument('--AddCaloDigi',
                         type=argFactory(argBool),
                         help='Save Calo Digits too, not just RawChannels.', group='Digi')
+    parser.add_argument('--PileUpPremixing',
+                        type=argFactory(argBool),
+                        help='Run digitization with pile-up premixing configuration.', group='Digi')
 
 ## Add Pile-up related transform arguments to an argparse ArgumentParser
 def addPileUpTrfArgs(parser):
@@ -151,9 +154,6 @@ def addSim_tfArgs(parser):
     parser.add_argument('--simulator',
                         type=argFactory(argString), metavar='CONFIGNAME',
                         help='Specify a named configuration. E.g. MC12G4, ATLFASTII ATLFASTIIF', group='Sim_tf')
-    parser.add_argument('--truthStrategy',
-                        type=argFactory(argString), metavar='CONFIGNAME',
-                        help='Specify the named group of Truth strategies that the ISF should use.  E.g. MC12, MC15, Validation', group='Sim_tf')
 
 ## Add arguments used only by TestBeam simulation jobs
 def addTestBeamArgs(parser):
@@ -190,6 +190,9 @@ def addCommonSimTrfArgs(parser):
                         type=argFactory(argSubstepInt), help='Random seed offset', group='CommonSim')
     parser.add_argument('--enableLooperKiller', nargs='+', metavar='substep:LooperKiller',
                         type=argFactory(argSubstepBool), help='Should the LooperKiller be used', group='CommonSim')
+    parser.add_argument('--truthStrategy',
+                        type=argFactory(argString), metavar='CONFIGNAME',
+                        help='Specify the named group of Truth strategies that the simulation should use.  E.g. MC12, MC15aPlus, MC16', group='CommonSim')
 
 ## Add common Simulation/Digitization transform arguments to an argparse ArgumentParser
 def addCommonSimDigTrfArgs(parser):
diff --git a/Simulation/SimuJobTransforms/scripts/Digi_tf.py b/Simulation/SimuJobTransforms/scripts/Digi_tf.py
index df78dcf61aaa3edbbc7cd35461e7932d5abda782..33581357fd33fd393217411d161e877a12ad80d3 100755
--- a/Simulation/SimuJobTransforms/scripts/Digi_tf.py
+++ b/Simulation/SimuJobTransforms/scripts/Digi_tf.py
@@ -25,7 +25,7 @@ from SimuJobTransforms.simTrfArgs import addForwardDetTrfArgs, addBasicDigiArgs,
 import PyJobTransforms.trfArgClasses as trfArgClasses
 
 # Prodsys hack...
-ListOfDefaultPositionalKeys=['--AFPOn', '--ALFAOn', '--AddCaloDigi', '--DBRelease', '--DataRunNumber', '--FwdRegionOn', '--LucidOn', '--ZDCOn', '--amiConfig', '--amiMetadataTag', '--asetup', '--athena', '--athenaopts', '--beamType', '--bunchSpacing', '--checkEventCount', '--command', '--conditionsTag', '--digiRndmSvc', '--digiSeedOffset1', '--digiSeedOffset2', '--doAllNoise', '--env', '--eventAcceptanceEfficiency', '--execOnly', '--geometryVersion', '--ignoreErrors', '--ignoreFiles', '--ignorePatterns', '--imf', '--inputBeamGasHitsFile', '--inputBeamHaloHitsFile', '--inputCavernHitsFile', '--inputHITSFile', '--inputHighPtMinbiasHitsFile', '--inputLowPtMinbiasHitsFile', '--jobNumber', '--maxEvents', '--numberOfBeamGas', '--numberOfBeamHalo', '--numberOfCavernBkg', '--numberOfHighPtMinBias', '--numberOfLowPtMinBias', '--outputRDOFile', '--outputRDO_FILTFile', '--pileupFinalBunch', '--pileupInitialBunch', '--postExec', '--postInclude', '--preExec', '--preInclude', '--reportName', '--reportType', '--runNumber', '--samplingFractionDbTag', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation', '--tcmalloc', '--testPileUpConfig', '--triggerConfig']
+ListOfDefaultPositionalKeys=['--AFPOn', '--ALFAOn', '--AddCaloDigi', '--DBRelease', '--DataRunNumber', '--FwdRegionOn', '--LucidOn', '--PileUpPremixing', '--ZDCOn', '--amiConfig', '--amiMetadataTag', '--asetup', '--athena', '--athenaopts', '--beamType', '--bunchSpacing', '--checkEventCount', '--command', '--conditionsTag', '--digiRndmSvc', '--digiSeedOffset1', '--digiSeedOffset2', '--doAllNoise', '--env', '--eventAcceptanceEfficiency', '--execOnly', '--geometryVersion', '--ignoreErrors', '--ignoreFiles', '--ignorePatterns', '--imf', '--inputBeamGasHitsFile', '--inputBeamHaloHitsFile', '--inputCavernHitsFile', '--inputHITSFile', '--inputHighPtMinbiasHitsFile', '--inputLowPtMinbiasHitsFile', '--jobNumber', '--maxEvents', '--numberOfBeamGas', '--numberOfBeamHalo', '--numberOfCavernBkg', '--numberOfHighPtMinBias', '--numberOfLowPtMinBias', '--outputRDOFile', '--outputRDO_FILTFile', '--pileupFinalBunch', '--pileupInitialBunch', '--postExec', '--postInclude', '--preExec', '--preInclude', '--reportName', '--reportType', '--runNumber', '--samplingFractionDbTag', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation', '--tcmalloc', '--testPileUpConfig', '--triggerConfig']
 
 @stdTrfExceptionHandler
 @sigUsrStackTrace
diff --git a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT.py b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT.py
index a638e3a8b684851d78af0dc6f74dd0ab08e27349..b629a601feeed155cb7d1be5a0a36692a7c4fa87 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT.py
@@ -5,13 +5,32 @@ if hasattr(runArgs, "jobNumber"):
         raise ValueError('jobNumber must be a postive integer. %s lies outside this range', str(runArgs.jobNumber))
 
 
+from G4AtlasApps.SimFlags import simFlags
 if hasattr(runArgs, "inputTXT_EVENTIDFile"):
     from OverlayCommonAlgs.OverlayFlags import overlayFlags
     overlayFlags.EventIDTextFile = runArgs.inputTXT_EVENTIDFile[0]
-    from G4AtlasApps.SimFlags import simFlags
     simFlags.load_atlas_flags()
     if hasattr(simFlags, 'IsEventOverlayInputSim'):
         simFlags.IsEventOverlayInputSim = True
     if hasattr(runArgs, 'inputVertexPosFile'):
         simFlags.VertexOverrideFile= runArgs.inputVertexPosFile
 
+if hasattr(runArgs, 'truthStrategy'):
+    simFlags.TruthService     = 'ISF_'     + runArgs.truthStrategy + 'TruthService'
+    simFlags.TruthStrategy    = runArgs.truthStrategy
+    try:
+        from BarcodeServices.BarcodeServicesConfig import barcodeOffsetForTruthStrategy
+        simFlags.SimBarcodeOffset  = barcodeOffsetForTruthStrategy(runArgs.truthStrategy)
+    except RuntimeError:
+        Offset200kStrings = ['MC12', 'MC15a', 'MC16']
+        is200kOffset = any(x in runArgs.truthStrategy for x in Offset200kStrings)
+        if is200kOffset:
+            simFlags.SimBarcodeOffset  = 200000 #MC12, MC15a, MC16 setting
+        else:
+            simFlags.SimBarcodeOffset  = 1000000 #MC15 setting
+        atlasG4log.warning('Using unknown truth strategy '+str(runArgs.truthStrategy)+' guessing that barcode offset is '+str(simFlags.SimBarcodeOffset))
+else:
+    simFlags.TruthService     = 'ISF_TruthService'
+    simFlags.TruthStrategy    = 'MC12'
+    simFlags.SimBarcodeOffset  = 200000 #MC12 setting
+
diff --git a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py
index c829800c18655a95eb2b0cf73756e3a4acf73917..45a4e93142df5d93bea90d432ef083807fe273d8 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_ISF.py
@@ -1,14 +1,14 @@
+## Get the logger
+from AthenaCommon.Logging import *
+atlasG4log = logging.getLogger('ISF')
+atlasG4log.info('****************** STARTING ISF ******************')
+
 ## Include common skeleton
 include("SimuJobTransforms/skeleton.EVGENtoHIT.py")
 
 if hasattr(runArgs, 'useISF') and not runArgs.useISF:
     raise RuntimeError("Unsupported configuration! If you want to run with useISF=False, please use AtlasG4_tf.py!")
 
-## Get the logger
-from AthenaCommon.Logging import *
-atlasG4log = logging.getLogger('ISF')
-atlasG4log.info('****************** STARTING ISF ******************')
-
 ## Simulation flags need to be imported first
 from G4AtlasApps.SimFlags import simFlags
 simFlags.load_atlas_flags()
@@ -248,32 +248,12 @@ try:
 except:
     atlasG4log.warning('Could not add TimingAlg, no timing info will be written out.')
 
-if hasattr(runArgs, 'truthStrategy'):
-    ISF_Flags.BarcodeService   = 'Barcode_' + runArgs.truthStrategy + 'BarcodeSvc'
-    ISF_Flags.TruthService     = 'ISF_'     + runArgs.truthStrategy + 'TruthService'
-    ISF_Flags.EntryLayerFilter = 'ISF_'     + runArgs.truthStrategy + 'EntryLayerFilter'
-    ISF_Flags.TruthStrategy    = runArgs.truthStrategy
-    try:
-        from BarcodeServices.BarcodeServicesConfig import barcodeOffsetForTruthStrategy
-        simFlags.SimBarcodeOffset  = barcodeOffsetForTruthStrategy(runArgs.truthStrategy)
-    except RuntimeError:
-        if 'MC12' in runArgs.truthStrategy or 'MC15a' in runArgs.truthStrategy:
-            simFlags.SimBarcodeOffset  = 200000 #MC12 setting
-        else:
-            simFlags.SimBarcodeOffset  = 1000000 #MC15 setting
-        atlasG4log.warning('Using unknown truth strategy '+str(runArgs.truthStrategy)+' guessing that barcode offset is '+str(simFlags.SimBarcodeOffset))
-    except ImportError:
-        # Temporary back-compatibility
-        if 'MC12' in runArgs.truthStrategy or 'MC15a' in runArgs.truthStrategy:
-            simFlags.SimBarcodeOffset  = 200000 #MC12 setting
-        else:
-            simFlags.SimBarcodeOffset  = 1000000 #MC15 setting
+## Always enable the looper killer, unless it's been disabled
+if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
+    simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool', ['Step'])
 else:
-    ISF_Flags.BarcodeService   = 'Barcode_MC12BarcodeSvc'
-    ISF_Flags.TruthService     = 'ISF_TruthService'
-    ISF_Flags.EntryLayerFilter = 'ISF_MC12EntryLayerFilter'
-    ISF_Flags.TruthStrategy    = 'MC12'
-    simFlags.SimBarcodeOffset  = 200000 #MC12 setting
+    atlasG4log.warning("The looper killer will NOT be run in this job.")
+
 #### *********** import ISF_Example code here **************** ####
 include("ISF_Config/ISF_ConfigJobInclude.py")
 
@@ -312,23 +292,3 @@ if hasattr(runArgs, "postExec"):
     for cmd in runArgs.postExec:
         atlasG4log.info(cmd)
         exec(cmd)
-
-
-## Always enable the looper killer, unless it's been disabled
-if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
-    if ISF_Flags.UsingGeant4():
-        # this configures the MT LooperKiller
-        try:
-            from G4UserActions import G4UserActionsConfig
-            G4UserActionsConfig.addLooperKillerTool()
-        except AttributeError, ImportError:
-            atlasG4log.warning("Could not add the MT-version of the LooperKiller")
-            # this configures the non-MT looperKiller
-            try:
-                from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-            except ImportError:
-                from G4AtlasServices.UserActionStore import UAStore
-            # add default configurable
-            UAStore.addAction('LooperKiller',['Step'])
-else:
-    atlasG4log.warning("The looper killer will NOT be run in this job.")
diff --git a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py
index 864db6c576a0ebdc5a766681ec733bd609108f7d..eeb5ad54f8b0870753b7451fc3db323c1aac0b77 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.EVGENtoHIT_MC12.py
@@ -1,14 +1,14 @@
+## Get the logger
+from AthenaCommon.Logging import *
+atlasG4log = logging.getLogger('AtlasG4')
+atlasG4log.info('****************** STARTING ATLASG4 ******************')
+
 ## Include common skeleton
 include("SimuJobTransforms/skeleton.EVGENtoHIT.py")
 
 if hasattr(runArgs, 'useISF') and runArgs.useISF:
     raise RuntimeError("Unsupported configuration! If you want to run with useISF=True, please use Sim_tf.py!")
 
-## Get the logger
-from AthenaCommon.Logging import *
-atlasG4log = logging.getLogger('AtlasG4')
-atlasG4log.info('****************** STARTING ATLASG4 ******************')
-
 ## Simulation flags need to be imported first
 from G4AtlasApps.SimFlags import SimFlags, simFlags #FIXME drop import of SimFlags rather than simFlags asap
 simFlags.load_atlas_flags()
@@ -112,7 +112,7 @@ if hasattr(runArgs, "inputEVNT_CAVERNFile"):
     include('SimulationJobOptions/preInclude.G4ReadCavern.py')
 if hasattr(runArgs, "outputEVNT_CAVERNTRFile"):
     include('SimulationJobOptions/preInclude.G4WriteCavern.py')
-    
+
 # Avoid command line preInclude for event service
 if hasattr(runArgs, "eventService") and runArgs.eventService:
     include('AthenaMP/AthenaMP_EventService.py')
@@ -220,6 +220,12 @@ if jobproperties.Beam.beamType.get_Value() != 'cosmics':
     else:
         simFlags.EventFilter.set_On()
 
+## Always enable the looper killer, unless it's been disabled
+if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
+    simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool', ['Step'])
+else:
+    atlasG4log.warning("The looper killer will NOT be run in this job.")
+
 from AthenaCommon.AlgSequence import AlgSequence
 topSeq = AlgSequence()
 
@@ -239,7 +245,8 @@ topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True)
 try:
     # the non-hive version of G4AtlasApps provides PyG4AtlasAlg
     from G4AtlasApps.PyG4Atlas import PyG4AtlasAlg
-    topSeq += PyG4AtlasAlg()
+    if not hasattr (topSeq, 'PyG4AtlasAlg'):
+        topSeq += PyG4AtlasAlg()
 except ImportError:
     try:
         # the hive version provides PyG4AtlasSvc
@@ -283,22 +290,3 @@ if hasattr(runArgs, "postExec"):
     for cmd in runArgs.postExec:
         atlasG4log.info(cmd)
         exec(cmd)
-
-
-## Always enable the looper killer, unless it's been disabled
-if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
-    # this configures the MT LooperKiller
-    try:
-        from G4UserActions import G4UserActionsConfig
-        G4UserActionsConfig.addLooperKillerTool()
-    except AttributeError, ImportError:
-        atlasG4log.warning("Could not add the MT-version of the LooperKiller")
-        # this configures the non-MT looperKiller
-        try:
-            from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-        except ImportError:
-            from G4AtlasServices.UserActionStore import UAStore
-        # add default configurable
-        UAStore.addAction('LooperKiller',['Step'])
-else:
-    atlasG4log.warning("The looper killer will NOT be run in this job.")
diff --git a/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py b/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py
index d9406d810f381bf70424daa3cf7b6317deb32d2b..3ebd5a0325a1e53d6c452c7f800453967416f7aa 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.HITtoRDO.py
@@ -199,6 +199,10 @@ if hasattr(runArgs,"conditionsTag"):
     if(runArgs.conditionsTag!='NONE'):
         digitizationFlags.IOVDbGlobalTag = runArgs.conditionsTag
 
+if hasattr(runArgs,"PileUpPremixing"):
+    digilog.info("Doing pile-up premixing")
+    digitizationFlags.PileUpPremixing = runArgs.PileUpPremixing
+
 #--------------------------------------------------------------
 # Pileup configuration
 #--------------------------------------------------------------
@@ -405,11 +409,9 @@ if hasattr(runArgs,"outputRDOFile") or hasattr(runArgs,"outputRDO_FILTFile"):
         athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock( runArgs.outputRDOFile )
     elif hasattr(runArgs,"outputRDO_FILTFile"):
         athenaCommonFlags.PoolRDOOutput.set_Value_and_Lock( runArgs.outputRDO_FILTFile )
-    if hasattr(runArgs, "AddCaloDigi"):
-        AddCaloDigi = runArgs.AddCaloDigi
-        if AddCaloDigi:
-            digilog.info("Will write out all LArDigitContainers and TileDigitsContainers to RDO file.")
-            digitizationFlags.experimentalDigi+=["AddCaloDigi"]
+    if digitizationFlags.PileUpPremixing or (hasattr(runArgs, "AddCaloDigi") and runArgs.AddCaloDigi):
+        digilog.info("Will write out all LArDigitContainers and TileDigitsContainers to RDO file.")
+        digitizationFlags.experimentalDigi+=["AddCaloDigi"]
 else:
     digilog.info("no output file (outputRDOFile or outputRDO_FILTFile) specified - switching off output StreamRDO")
     if not 'DetFlags' in dir():
diff --git a/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py b/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py
index eab0a44819647184679c3bf38c9fa8433c7728e9..bd3c31ef6ba893dc0e91854c180bcaa12a463ded 100644
--- a/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py
+++ b/Simulation/SimuJobTransforms/share/skeleton.TestBeam.py
@@ -1,3 +1,8 @@
+## Get the logger
+from AthenaCommon.Logging import *
+atlasG4log = logging.getLogger('TestBeam')
+atlasG4log.info('****************** STARTING ATLASG4 Test Beam ******************')
+
 ## Include common skeleton
 include("SimuJobTransforms/skeleton.EVGENtoHIT.py")
 
@@ -8,20 +13,15 @@ svcMgr.MessageSvc.useColors = False
 if hasattr(runArgs, 'useISF') and runArgs.useISF:
     raise RuntimeError("Unsupported configuration! If you want to run with useISF=True, please use Sim_tf.py!")
 
-## Get the logger
-from AthenaCommon.Logging import *
-testBeamlog = logging.getLogger('TestBeam')
-testBeamlog.info('****************** STARTING ATLASG4 Test Beam ******************')
-
 ## Simulation flags need to be imported first
 from G4AtlasApps.SimFlags import simFlags
 
 ## Set simulation geometry tag
 if hasattr(runArgs, 'geometryVersion'):
     simFlags.SimLayout.set_Value_and_Lock(runArgs.geometryVersion)
-    testBeamlog.debug('SimLayout set to %s' % simFlags.SimLayout)
+    atlasG4log.debug('SimLayout set to %s' % simFlags.SimLayout)
 else:
-    testBeamlog.info('no geometryVersion specified, so assuming tb_Tile2000_2003_5B')
+    atlasG4log.info('no geometryVersion specified, so assuming tb_Tile2000_2003_5B')
     simFlags.SimLayout.set_Value_and_Lock('tb_Tile2000_2003_5B')
 
 ## Load the test beam flags
@@ -33,7 +33,7 @@ if hasattr(runArgs, 'testBeamConfig'):
     else:
         raise RuntimeError("testBeamConfig %s is unknown." % runArgs.testBeamConfig)
 else:
-    testBeamlog.info('no testBeamConfig specified, so assuming tbtile')
+    atlasG4log.info('no testBeamConfig specified, so assuming tbtile')
     simFlags.load_tbtile_flags()
 
 ## AthenaCommon flags
@@ -54,7 +54,7 @@ if hasattr(runArgs, "inputEvgenFile"):
     # We don't expect both inputFile and inputEvgenFile to be specified
     athenaCommonFlags.FilesInput.set_Value_and_Lock( runArgs.inputEvgenFile )
 else:
-    testBeamlog.info('No inputEvgenFile provided. Assuming that you are running a generator on the fly.')
+    atlasG4log.info('No inputEvgenFile provided. Assuming that you are running a generator on the fly.')
     athenaCommonFlags.PoolEvgenInput.set_Off()
 
 ## Output hits file config
@@ -63,14 +63,14 @@ if hasattr(runArgs, "outputHITSFile"):
 elif hasattr(runArgs, "outputHitsFile"):
     athenaCommonFlags.PoolHitsOutput.set_Value_and_Lock( runArgs.outputHitsFile )
 else:
-    testBeamlog.info('No outputHitsFile provided. This simulation job will not write out any HITS file.')
+    atlasG4log.info('No outputHitsFile provided. This simulation job will not write out any HITS file.')
     athenaCommonFlags.PoolHitsOutput = ""
     athenaCommonFlags.PoolHitsOutput.statusOn = False
 
 
 ## Write out runArgs configuration
-testBeamlog.info( '**** Transformation run arguments' )
-testBeamlog.info( str(runArgs) )
+atlasG4log.info( '**** Transformation run arguments' )
+atlasG4log.info( str(runArgs) )
 
 
 #==============================================================
@@ -78,9 +78,9 @@ testBeamlog.info( str(runArgs) )
 #==============================================================
 ## Pre-exec
 if hasattr(runArgs, "preExec"):
-    testBeamlog.info("transform pre-exec")
+    atlasG4log.info("transform pre-exec")
     for cmd in runArgs.preExec:
-        testBeamlog.info(cmd)
+        atlasG4log.info(cmd)
         exec(cmd)
 
 ## Pre-include
@@ -118,27 +118,27 @@ if hasattr(runArgs, 'physicsList'):
 if hasattr(runArgs, "randomSeed"):
     simFlags.RandomSeedOffset = int(runArgs.randomSeed)
 else:
-    testBeamlog.warning('randomSeed not set')
+    atlasG4log.warning('randomSeed not set')
 
 if hasattr(runArgs,"Eta") and ( hasattr(runArgs,"Theta") or hasattr(runArgs,"Z") ):
     raise RuntimeError("Eta cannot be specified at the same time as Theta and Z.")
 
 if hasattr(runArgs,"Eta"):
-    testBeamlog.info('Overriding simFlags.Eta from command-line. simFlags.Eta = %s', runArgs.Eta)
+    atlasG4log.info('Overriding simFlags.Eta from command-line. simFlags.Eta = %s', runArgs.Eta)
     simFlags.Eta = runArgs.Eta
 
 if hasattr(runArgs,"Theta") or hasattr(runArgs,"Z"):
     if hasattr(runArgs,"Theta"):
-        testBeamlog.info('Overriding simFlags.Theta from command-line. simFlags.Theta = %s', runArgs.Theta)
+        atlasG4log.info('Overriding simFlags.Theta from command-line. simFlags.Theta = %s', runArgs.Theta)
         simFlags.Theta = runArgs.Theta
     else:
-        testBeamlog.info('Z specified on the commmand-line without Theta, so will use simFlags.Theta = 90')
+        atlasG4log.info('Z specified on the commmand-line without Theta, so will use simFlags.Theta = 90')
         simFlags.Theta=90
     if hasattr(runArgs,"Z"):
-        testBeamlog.info('Overriding simFlags.Z from command-line. simFlags.Z = %s', runArgs.Z)
+        atlasG4log.info('Overriding simFlags.Z from command-line. simFlags.Z = %s', runArgs.Z)
         simFlags.Z = runArgs.Z
     else:
-        testBeamlog.info('Theta specified on the commmand-line without Z, so will use simFlags.Z = 2550.0')
+        atlasG4log.info('Theta specified on the commmand-line without Z, so will use simFlags.Z = 2550.0')
         simFlags.Z = 2550.0
 
 if hasattr(runArgs,"Phi"):
@@ -149,13 +149,13 @@ if hasattr(runArgs,"Y"):
 ## Set the Run Number (if required)
 if hasattr(runArgs,"DataRunNumber"):
     if runArgs.DataRunNumber>0:
-        testBeamlog.info( 'Overriding run number to be: %s ', runArgs.DataRunNumber )
+        atlasG4log.info( 'Overriding run number to be: %s ', runArgs.DataRunNumber )
         simFlags.RunNumber=runArgs.DataRunNumber
 elif hasattr(runArgs,'jobNumber'):
     if runArgs.jobNumber>=0:
-        testBeamlog.info( 'Using job number '+str(runArgs.jobNumber)+' to derive run number.' )
+        atlasG4log.info( 'Using job number '+str(runArgs.jobNumber)+' to derive run number.' )
         simFlags.RunNumber = simFlags.RunDict.GetRunNumber( runArgs.jobNumber )
-        testBeamlog.info( 'Set run number based on dictionary to '+str(simFlags.RunNumber) )
+        atlasG4log.info( 'Set run number based on dictionary to '+str(simFlags.RunNumber) )
 
 # uncomment and modify any of options below to have non-standard simulation
 from TileSimUtils.TileSimInfoConfigurator import TileSimInfoConfigurator
@@ -231,7 +231,7 @@ try:
     from RecAlgs.RecAlgsConf import TimingAlg
     topSeq+=TimingAlg("SimTimerBegin", TimingObjOutputName = "EVNTtoHITS_timings")
 except:
-    testBeamlog.warning('Could not add TimingAlg, no timing info will be written out.')
+    atlasG4log.warning('Could not add TimingAlg, no timing info will be written out.')
 
 ## Add G4 alg to alg sequence
 from G4AtlasApps.PyG4Atlas import PyG4AtlasAlg
@@ -259,9 +259,9 @@ if hasattr(runArgs, "postInclude"):
 
 ## Post-exec
 if hasattr(runArgs, "postExec"):
-    testBeamlog.info("transform post-exec")
+    atlasG4log.info("transform post-exec")
     for cmd in runArgs.postExec:
-        testBeamlog.info(cmd)
+        atlasG4log.info(cmd)
         exec(cmd)
 
 
@@ -279,4 +279,4 @@ if hasattr(runArgs, "enableLooperKiller") and runArgs.enableLooperKiller:
     except AttributeError:
         atlasG4log.warning("Could not add the MT-version of the LooperKiller")
 else:
-    testBeamlog.warning("The looper killer will NOT be run in this job.")
+    atlasG4log.warning("The looper killer will NOT be run in this job.")
diff --git a/Simulation/SimuJobTransforms/test/test_digi_unmergeHIT b/Simulation/SimuJobTransforms/test/test_digi_unmergeHIT
index fd62f5efcf2bcb0373ac57f06bb753462f807ed1..9cac12061e35be795ec77e058b91a4cfbd1ce5f7 100755
--- a/Simulation/SimuJobTransforms/test/test_digi_unmergeHIT
+++ b/Simulation/SimuJobTransforms/test/test_digi_unmergeHIT
@@ -17,7 +17,10 @@ INPUTFILE=${TESTDATA}/mu_E50_eta0-25_${GEOMETRY}.hits.pool.root
 FILENAME=`basename ${INPUTFILE}`
 FILEBASE=${FILENAME%.hits.pool.root}
 INPUTFILE2=${FILEBASE}.3.hits.pool.root
-cp $INPUTFILE $INPUTFILE2
+# Copy the file.  We can't use cp here, since we need the copy to get
+# a new GUID.  Otherwise, we'll get errors about duplicate GUIDs
+# in the file catalog.
+mergePOOL -o $INPUTFILE2 -i $INPUTFILE
 INPUTLIST=$INPUTFILE,$INPUTFILE2
 RDOFILE=${FILEBASE}.unmerged.rdo.pool.root
 MINBIASFILE=NONE
diff --git a/Simulation/SimuJobTransforms/test/test_mergeHIT b/Simulation/SimuJobTransforms/test/test_mergeHIT
index 9d09796de29ae6d3bcf523c1f807b0926df4fd84..f3394a743b9c73a28fb316c6c11656b286d435f1 100755
--- a/Simulation/SimuJobTransforms/test/test_mergeHIT
+++ b/Simulation/SimuJobTransforms/test/test_mergeHIT
@@ -16,7 +16,10 @@ INPUTFILE=$TESTDATA/mu_E50_eta0-25_${GEOMETRY}.hits.pool.root
 FILENAME=`basename ${INPUTFILE}`
 FILEBASE=${FILENAME%.hits.pool.root}
 INPUTFILE2=${FILEBASE}.2.hits.pool.root
-cp $INPUTFILE $INPUTFILE2
+# Copy the file.  We can't use cp here, since we need the copy to get
+# a new GUID.  Otherwise, we'll get errors about duplicate GUIDs
+# in the file catalog.
+mergePOOL -o $INPUTFILE2 -i $INPUTFILE
 INPUTLIST=$INPUTFILE,$INPUTFILE2
 MERGEHITSFILE=${FILEBASE}.merged.hits.pool.root
 JOBCONFIG=NONE
diff --git a/Simulation/SimulationJobOptions/cmt/requirements b/Simulation/SimulationJobOptions/cmt/requirements
deleted file mode 100644
index 3790df5fcacfffd817b9bad703244a98422fd4e2..0000000000000000000000000000000000000000
--- a/Simulation/SimulationJobOptions/cmt/requirements
+++ /dev/null
@@ -1,8 +0,0 @@
-package SimulationJobOptions
-
-author John Chapman
-
-use AtlasPolicy		AtlasPolicy-*
-
-public
-apply_pattern declare_joboptions files="*.py hive/*.py atlfast2/*.py heavyIons/*.py cosmics/*.py digitization/*.py subdetectors/*.py g4/*.py cavern/*.py pileup/*.py susy/*.py specialConfig/*.py"
diff --git a/Simulation/SimulationJobOptions/share/atlfast2/preInclude.FastIDKiller.py b/Simulation/SimulationJobOptions/share/atlfast2/preInclude.FastIDKiller.py
index e2d208c5dac1a5d830fce935d56d097e6d305751..614b664efd93a9c6214dc2ada9ff6aa49766b11a 100644
--- a/Simulation/SimulationJobOptions/share/atlfast2/preInclude.FastIDKiller.py
+++ b/Simulation/SimulationJobOptions/share/atlfast2/preInclude.FastIDKiller.py
@@ -10,8 +10,5 @@
 # energy above a certain threshold.
 #########################################################
 
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-UAStore.addAction('FastIDKiller', ['BeginOfRun','Step'])
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::FastIDKillerTool', ['Run','Step'])
diff --git a/Simulation/SimulationJobOptions/share/atlfast2/preInclude.FastMBKiller.py b/Simulation/SimulationJobOptions/share/atlfast2/preInclude.FastMBKiller.py
index a1256369409e720f6a859a0aa11c4ed3240a67e7..42b665e579f04cc93ef42db50d8e8a43292ca2dd 100644
--- a/Simulation/SimulationJobOptions/share/atlfast2/preInclude.FastMBKiller.py
+++ b/Simulation/SimulationJobOptions/share/atlfast2/preInclude.FastMBKiller.py
@@ -6,14 +6,5 @@
 # Requested for the Atlfast-II and MinBias groups
 #########################################################
 
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-from AthenaCommon.CfgGetter import getPublicTool
-
-FastMBKiller=getPublicTool('FastIDKiller/FastMBKiller',tryDefaultConfigurable=True)
-FastMBKiller.Z=3600
-FastMBKiller.R=14
-
-UAStore.addAction(FastMBKiller, ['BeginOfRun','Step'])
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::FastMBKillerTool', ['Run','Step'])
diff --git a/Simulation/SimulationJobOptions/share/cavern/postInclude.Cavern.py b/Simulation/SimulationJobOptions/share/cavern/postInclude.Cavern.py
new file mode 100644
index 0000000000000000000000000000000000000000..8b1ba488783521f357cef603591f6238343a6f42
--- /dev/null
+++ b/Simulation/SimulationJobOptions/share/cavern/postInclude.Cavern.py
@@ -0,0 +1,14 @@
+#########################################################
+#
+# SimulationJobOptions/Cavern.py
+# Andrea Dell'Acqua
+#
+# Setting special range cuts in G4 for use with cavern
+# background production.
+#########################################################
+
+from AthenaCommon.CfgGetter import getPrivateTool,getService
+getService('DetectorGeometrySvc').RegionCreators += [getPrivateTool('MuonPhysicsRegionTool')]
+#FIXME need to add this to the list of RegionCreators, but
+#currently initializing the DetectorGeometrySvc too early causes
+#problems with the GeoModelSvc configuration.
diff --git a/Simulation/SimulationJobOptions/share/cavern/preInclude.Cavern.py b/Simulation/SimulationJobOptions/share/cavern/preInclude.Cavern.py
index afeaf506c21f4be0ef28341e67999624a5b35cca..a08dc1e073670fdda667503314177224f43b5718 100644
--- a/Simulation/SimulationJobOptions/share/cavern/preInclude.Cavern.py
+++ b/Simulation/SimulationJobOptions/share/cavern/preInclude.Cavern.py
@@ -12,8 +12,3 @@ simFlags.CalibrationRun.set_Off()
 simFlags.CavernCuts = True
 simFlags.LArParameterization = 0
 
-from AthenaCommon.CfgGetter import getPublicTool,getService
-getService('DetectorGeometrySvc').RegionCreators += [getPublicTool('MuonPhysicsRegionTool')]
-#FIXME need to add this to the list of RegionCreators, but
-#currently initializing the DetectorGeometrySvc too early causes
-#problems with the GeoModelSvc configuration.
diff --git a/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern150.py b/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern150.py
index 0f5fa997283858ba6bfd46ef0602472b277733d3..28686cbfdba305330b1c1561863a9dc5c8c80e15 100644
--- a/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern150.py
+++ b/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern150.py
@@ -1,11 +1,7 @@
 # Modify the hit wrapping action to wrap on 150 ns
 
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-from AthenaCommon.CfgGetter import getPublicTool
-
-getPublicTool('HitWrapper',tryDefaultConfigurable=True).WrapTime=150
-UAStore.addAction('HitWrapper',['EndOfEvent'])
+from G4AtlasApps.SimFlags import simFlags
+# new MT actions. Note that this will only work with one thread.
+simFlags.OptionalUserActionList.addAction('G4UA::HitWrapperTool',['Event'])
+simFlags.UserActionConfig.addConfig('G4UA::HitWrapperTool','WrapTime',150)
 
diff --git a/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern1600.py b/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern1600.py
index be9b71a892e6e03fcee9cef27b570be6eca51e32..3ac0b65033691bbd2f141e1f5a485f85d2cd81cd 100644
--- a/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern1600.py
+++ b/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern1600.py
@@ -1,12 +1,7 @@
 # Modify the hit wrapping action to wrap on 1600 ns
 
-
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-from AthenaCommon.CfgGetter import getPublicTool
-
-getPublicTool('HitWrapper',tryDefaultConfigurable=True).WrapTime=1600
-UAStore.addAction('HitWrapper',['EndOfEvent']) 
+from G4AtlasApps.SimFlags import simFlags
+# new MT actions. Note that this will only work with one thread.
+simFlags.OptionalUserActionList.addAction('G4UA::HitWrapperTool',['Event'])
+simFlags.UserActionConfig.addConfig('G4UA::HitWrapperTool','WrapTime',1600)
 
diff --git a/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern50.py b/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern50.py
index 2d85250f4fe79eb48af3e6ddd43f97c61e3c71fa..dc7fd79c693183aadf8b5137c808460aa97d7745 100644
--- a/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern50.py
+++ b/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern50.py
@@ -1,11 +1,7 @@
 # Modify the hit wrapping action to wrap on 50 ns
 
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-from AthenaCommon.CfgGetter import getPublicTool
-
-getPublicTool('HitWrapper',tryDefaultConfigurable=True).WrapTime=50
-UAStore.addAction('HitWrapper',['EndOfEvent']) 
+from G4AtlasApps.SimFlags import simFlags
+# new MT actions. Note that this will only work with one thread.
+simFlags.OptionalUserActionList.addAction('G4UA::HitWrapperTool',['Event'])
+simFlags.UserActionConfig.addConfig('G4UA::HitWrapperTool','WrapTime',50)
 
diff --git a/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern75.py b/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern75.py
index 5a90a6a25b462ad5f566de34bb0e978610797eed..572581df76a689046c2be4ea8ba5b86e47c92eed 100644
--- a/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern75.py
+++ b/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern75.py
@@ -1,10 +1,6 @@
 # Modify the hit wrapping action to wrap on 75 ns
 
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-from AthenaCommon.CfgGetter import getPublicTool
-
-getPublicTool('HitWrapper',tryDefaultConfigurable=True).WrapTime=75
-UAStore.addAction('HitWrapper',['EndOfEvent']) 
+from G4AtlasApps.SimFlags import simFlags
+# new MT actions. Note that this will only work with one thread.
+simFlags.OptionalUserActionList.addAction('G4UA::HitWrapperTool',['Event'])
+simFlags.UserActionConfig.addConfig('G4UA::HitWrapperTool','WrapTime',75)
diff --git a/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern900.py b/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern900.py
index 344a8d3aaf5fcaab2ea6c3680ef26232b6343f8a..3e349849f7c4468696e54636747dea893e43f150 100644
--- a/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern900.py
+++ b/Simulation/SimulationJobOptions/share/cavern/preInclude.G4ReadCavern900.py
@@ -1,12 +1,7 @@
 # Modify the hit wrapping action to wrap on 50 ns
 
-
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-from AthenaCommon.CfgGetter import getPublicTool
-
-getPublicTool('HitWrapper',tryDefaultConfigurable=True).WrapTime=900
-UAStore.addAction('HitWrapper',['EndOfEvent']) 
+from G4AtlasApps.SimFlags import simFlags
+# new MT actions. Note that this will only work with one thread.
+simFlags.OptionalUserActionList.addAction('G4UA::HitWrapperTool',['Event'])
+simFlags.UserActionConfig.addConfig('G4UA::HitWrapperTool','WrapTime',900)
 
diff --git a/Simulation/SimulationJobOptions/share/cosmics/preInclude.MuonFilter.py b/Simulation/SimulationJobOptions/share/cosmics/preInclude.MuonFilter.py
index c235bb926f24aa3bb651633f88d16e5d4358b971..3dfd198020e5bcf868f0abfc8a157b35432e92d8 100644
--- a/Simulation/SimulationJobOptions/share/cosmics/preInclude.MuonFilter.py
+++ b/Simulation/SimulationJobOptions/share/cosmics/preInclude.MuonFilter.py
@@ -13,9 +13,3 @@ simFlags.CosmicFilterVolumeName = "Calo"
 simFlags.CosmicFilterID = "13"
 simFlags.CosmicFilterPTmin = "6000" # in MeV
 simFlags.CosmicFilterPTmax = "50000" # in MeV
-
-def cosmics_muonfilter():
-    from G4AtlasApps import AtlasG4Eng
-    include('G4CosmicFilter/G4CosmicFilter.py')
-
-simFlags.InitFunctions.add_function("preInitG4", cosmics_muonfilter)
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts10.py b/Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts10.py
similarity index 76%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts10.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts10.py
index 46adb255912ba74597cd1a5a81cf9ff6e9e14049..e72cf71ce99d6f01cda3119d3c8aff231b9df331 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts10.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts10.py
@@ -9,9 +9,8 @@
 #########################################################
 
 atlasG4log.info("G4 PIX Config: Setting PIX cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-pixelRegionTool = getPublicTool('PixelPhysicsRegionTool')
+from AthenaCommon.CfgGetter import getService
+pixelRegionTool = getService('DetectorGeometrySvc').RegionCreators['PixelPhysicsRegionTool']
 pixelRegionTool.ElectronCut = 0.01
 pixelRegionTool.PositronCut = 0.01
 pixelRegionTool.GammaCut = 0.01
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts100.py b/Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts100.py
similarity index 76%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts100.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts100.py
index d75bd0c6daa0a6f22aae09b0b8bbf9dc887ed62e..3b6e0b619fc3ab4c53bdb1155c8fb74e167e9221 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts100.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts100.py
@@ -9,9 +9,8 @@
 #########################################################
 
 atlasG4log.info("G4 PIX Config: Setting PIX cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-pixelRegionTool = getPublicTool('PixelPhysicsRegionTool')
+from AthenaCommon.CfgGetter import getService
+pixelRegionTool = getService('DetectorGeometrySvc').RegionCreators['PixelPhysicsRegionTool']
 pixelRegionTool.ElectronCut = 0.1
 pixelRegionTool.PositronCut = 0.1
 pixelRegionTool.GammaCut = 0.1
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts20.py b/Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts20.py
similarity index 76%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts20.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts20.py
index daa18f2a378c19041547fe0ca8b10707b59ae42e..3bbaa619590ebce97a70cb1a751826b8c92a10a2 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts20.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts20.py
@@ -9,9 +9,8 @@
 #########################################################
 
 atlasG4log.info("G4 PIX Config: Setting PIX cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-pixelRegionTool = getPublicTool('PixelPhysicsRegionTool')
+from AthenaCommon.CfgGetter import getService
+pixelRegionTool = getService('DetectorGeometrySvc').RegionCreators['PixelPhysicsRegionTool']
 pixelRegionTool.ElectronCut = 0.02
 pixelRegionTool.PositronCut = 0.02
 pixelRegionTool.GammaCut = 0.02
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts5.py b/Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts5.py
similarity index 76%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts5.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts5.py
index 88ce88b8dfbee58c4ee720960c36e233b2baa827..fd7fe76b2bf4178972432d2be86654d69141822e 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts5.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts5.py
@@ -9,9 +9,8 @@
 #########################################################
 
 atlasG4log.info("G4 PIX Config: Setting PIX cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-pixelRegionTool = getPublicTool('PixelPhysicsRegionTool')
+from AthenaCommon.CfgGetter import getService
+pixelRegionTool = getService('DetectorGeometrySvc').RegionCreators['PixelPhysicsRegionTool']
 pixelRegionTool.ElectronCut = 0.005
 pixelRegionTool.PositronCut = 0.005
 pixelRegionTool.GammaCut = 0.005
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts50.py b/Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts50.py
similarity index 76%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts50.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts50.py
index a15079b09f4d0e109de4f7d0d7304d6a173ee4e8..9e7e59c1636bde3815c35a7209f95c48807c7b8c 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.PixelCuts50.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.PixelCuts50.py
@@ -9,9 +9,8 @@
 #########################################################
 
 atlasG4log.info("G4 PIX Config: Setting PIX cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-pixelRegionTool = getPublicTool('PixelPhysicsRegionTool')
+from AthenaCommon.CfgGetter import getService
+pixelRegionTool = getService('DetectorGeometrySvc').RegionCreators['PixelPhysicsRegionTool']
 pixelRegionTool.ElectronCut = 0.05
 pixelRegionTool.PositronCut = 0.05
 pixelRegionTool.GammaCut = 0.05
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts10.py b/Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts10.py
similarity index 78%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts10.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts10.py
index 56a91cf324a8649aa2cada00f0b35c79f86db354..6fd825ea11a2008c0b20d6c35ae1fde056cdb8d4 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts10.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts10.py
@@ -9,9 +9,8 @@
 #########################################################
 
 atlasG4log.info("G4 SCT Config: Setting SCT cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-sctRegionTool = getPublicTool('SCTPhysicsRegionTool')
+from AthenaCommon.CfgGetter import getService
+sctRegionTool = getService('DetectorGeometrySvc').RegionCreators['SCTPhysicsRegionTool']
 sctRegionTool.ElectronCut = 0.01
 sctRegionTool.PositronCut = 0.01
 sctRegionTool.GammaCut = 0.01
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts100.py b/Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts100.py
similarity index 81%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts100.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts100.py
index 7abfc177172c39548bd0abde8a05c0aefc8f311b..01265242c91fe9ae1dc0eef36c0b7339510a0c20 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts100.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts100.py
@@ -12,9 +12,8 @@
 #########################################################
 
 atlasG4log.info("G4 SCT Config: Setting SCT cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-sctRegionTool = getPublicTool('SCTPhysicsRegionTool')
+from AthenaCommon.CfgGetter import getService
+sctRegionTool = getService('DetectorGeometrySvc').RegionCreators['SCTPhysicsRegionTool']
 sctRegionTool.ElectronCut = 0.1
 sctRegionTool.PositronCut = 0.1
 sctRegionTool.GammaCut = 0.1
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts20.py b/Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts20.py
similarity index 78%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts20.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts20.py
index 8d5901e6dae5bb88c87b90093a1005d2adad1a20..b0d6815263f444cc51fcaf4b6d949c9f0f10ea19 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts20.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts20.py
@@ -9,8 +9,8 @@
 #########################################################
 
 atlasG4log.info("G4 SCT Config: Setting SCT cut")
-from AthenaCommon.CfgGetter import getPublicTool
-sctRegionTool = getPublicTool('SCTPhysicsRegionTool')
+from AthenaCommon.CfgGetter import getService
+sctRegionTool = getService('DetectorGeometrySvc').RegionCreators['SCTPhysicsRegionTool']
 sctRegionTool.ElectronCut = 0.02
 sctRegionTool.PositronCut = 0.02
 sctRegionTool.GammaCut = 0.02
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts5.py b/Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts5.py
similarity index 78%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts5.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts5.py
index 4884716aa7e662ebb9313f84ab5ea6aef4a7f605..21a13f6023719f50446b622ae1e6cca18d87a773 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts5.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts5.py
@@ -9,9 +9,8 @@
 #########################################################
 
 atlasG4log.info("G4 SCT Config: Setting SCT cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-sctRegionTool = getPublicTool('SCTPhysicsRegionTool')
+from AthenaCommon.CfgGetter import getService
+sctRegionTool = getService('DetectorGeometrySvc').RegionCreators['SCTPhysicsRegionTool']
 sctRegionTool.ElectronCut = 0.005
 sctRegionTool.PositronCut = 0.005
 sctRegionTool.GammaCut = 0.005
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts50.py b/Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts50.py
similarity index 78%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts50.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts50.py
index 53e34ceb617be34b2a096c0e735a276459e110cb..c6f7e6d15bfaa62a10bea74d53aa1cda24f33af0 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.SCTCuts50.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.SCTCuts50.py
@@ -9,9 +9,8 @@
 #########################################################
 
 atlasG4log.info("G4 SCT Config: Setting SCT cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-sctRegionTool = getPublicTool('SCTPhysicsRegionTool')
+from AthenaCommon.CfgGetter import getService
+sctRegionTool = getService('DetectorGeometrySvc').RegionCreators['SCTPhysicsRegionTool']
 sctRegionTool.ElectronCut = 0.05
 sctRegionTool.PositronCut = 0.05
 sctRegionTool.GammaCut = 0.05
diff --git a/Simulation/SimulationJobOptions/share/g4/postInclude.ScoringVolumeKiller.py b/Simulation/SimulationJobOptions/share/g4/postInclude.ScoringVolumeKiller.py
new file mode 100644
index 0000000000000000000000000000000000000000..2f45c4e8ae18d3c29d3b2dbbd3279cc567286098
--- /dev/null
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.ScoringVolumeKiller.py
@@ -0,0 +1,16 @@
+#############################################################
+#
+#  postOptions.ScoringVolume.py : calls ScoringVolumeKiller
+#  while running a G4 simulation of the ATLAS detector.
+#  The ScoringVolumeKiller will kill all particles leaving
+#  the scoring volumes surrounding the muon stations.
+#
+#  Dennis Wright (SLAC)
+#  25 May 2010
+#############################################################
+
+from AthenaCommon.CfgGetter import getPrivateTool,getService
+getService('DetectorGeometrySvc').RegionCreators += [getPrivateTool('MuonPhysicsRegionTool')]
+#FIXME need to add this to the list of RegionCreators, but
+#currently initializing the DetectorGeometrySvc too early causes
+#problems with the GeoModelSvc configuration.
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts10.py b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts10.py
similarity index 73%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts10.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts10.py
index cf56c6bbcfacdb34546b3e01035efa16419275b3..dd9894e8510f55f0fb5dcfc88a3ca7c35e6fc10c 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts10.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts10.py
@@ -8,8 +8,7 @@
 #########################################################
 
 atlasG4log.info("G4 TRT Config: Setting TRT cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-getPublicTool('TRTPhysicsRegionTool').ElectronCut=10. #FIXME Units?!
+rom AthenaCommon.CfgGetter import getService
+getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=10. #FIXME Units?!
 # FIXME: Is it correct to alter only the e- cut and leave the e+ and
 # photon cuts unchanged?
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts100.py b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts100.py
similarity index 73%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts100.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts100.py
index 9a9023e0edb38f8cbefd7d9d92a1ac8b579b13ec..d9ca3305de14bb9783f425f926a7a50416770de5 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts100.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts100.py
@@ -8,8 +8,7 @@
 #########################################################
 
 atlasG4log.info("G4 TRT Config: Setting TRT cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-getPublicTool('TRTPhysicsRegionTool').ElectronCut=100. #FIXME Units?!
+from AthenaCommon.CfgGetter import getService
+getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=100. #FIXME Units?!
 # FIXME: Is it correct to alter only the e- cut and leave the e+ and
 # photon cuts unchanged?
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts5.py b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts5.py
similarity index 73%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts5.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts5.py
index c7f93556aae6cba76eba3030c698821741020653..f48734d3334dc5c4037623cc7f409c1091f80f67 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts5.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts5.py
@@ -8,8 +8,7 @@
 #########################################################
 
 atlasG4log.info("G4 TRT Config: Setting TRT cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-getPublicTool('TRTPhysicsRegionTool').ElectronCut=5. #FIXME Units?!
+from AthenaCommon.CfgGetter import getService
+getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=5. #FIXME Units?!
 # FIXME: Is it correct to alter only the e- cut and leave the e+ and
 # photon cuts unchanged?
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts50.py b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts50.py
similarity index 73%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts50.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts50.py
index 1d3d647e2523bc5aa7938efc6cb4fac8dd1f3df9..81ba7fe3909663bb7764fa24c94d94aa4b10cff3 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts50.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts50.py
@@ -8,8 +8,7 @@
 #########################################################
 
 atlasG4log.info("G4 TRT Config: Setting TRT cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-getPublicTool('TRTPhysicsRegionTool').ElectronCut=50. #FIXME Units?!
+from AthenaCommon.CfgGetter import getService
+getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=50. #FIXME Units?!
 # FIXME: Is it correct to alter only the e- cut and leave the e+ and
 # photon cuts unchanged?
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts500.py b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts500.py
similarity index 73%
rename from Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts500.py
rename to Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts500.py
index 4e8d11e04c614cab9b2bc14b91bdaafd9f4f2978..97ac91fb58bfeaae003be154735ef3342acd416e 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.TRTCuts500.py
+++ b/Simulation/SimulationJobOptions/share/g4/postInclude.TRTCuts500.py
@@ -8,8 +8,7 @@
 #########################################################
 
 atlasG4log.info("G4 TRT Config: Setting TRT cut")
-
-from AthenaCommon.CfgGetter import getPublicTool
-getPublicTool('TRTPhysicsRegionTool').ElectronCut=500. #FIXME Units?!
+from AthenaCommon.CfgGetter import getService
+getService('DetectorGeometrySvc').RegionCreators['TRTPhysicsRegionTool'].ElectronCut=500. #FIXME Units?!
 # FIXME: Is it correct to alter only the e- cut and leave the e+ and
 # photon cuts unchanged?
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.HyperspaceCatcher.py b/Simulation/SimulationJobOptions/share/g4/preInclude.HyperspaceCatcher.py
index a4e368d059ef1cd90dd1ef1a27d63626692798ba..b8cd9c6bedc91e321298e9fba0ddfdb2e0e8ef01 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.HyperspaceCatcher.py
+++ b/Simulation/SimulationJobOptions/share/g4/preInclude.HyperspaceCatcher.py
@@ -3,14 +3,7 @@
 # This is VERY handy for looking into problems in G4 - it should NOT be used for standard production.
 # Set "killAfter" in order to crash the job after a certain number of hyperspace particles
 
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-from AthenaCommon.CfgGetter import getPublicTool
-
-catcher=getPublicTool('HyperspaceCatcher',tryDefaultConfigurable=True)
-catcher.TreatmentLevel=1
-catcher.KillAfter=-1
-
-UAStore.addAction(catcher,['BeginOfRun','Step'])
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::HyperspaceCatcherTool', ['Run','Step'])
+simFlags.UserActionConfig.addConfig('G4UA::HyperspaceCatcherTool', 'TreatmentLevel',1)
+simFlags.UserActionConfig.addConfig('G4UA::HyperspaceCatcherTool', 'KillAfter',-1)
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.ScoringVolumeKiller.py b/Simulation/SimulationJobOptions/share/g4/preInclude.ScoringVolumeKiller.py
index ddd009440fb08a238ab717988ed3479d098af83c..acb94cb5f1fb8483ab5ba4bbe2516b59746ef795 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.ScoringVolumeKiller.py
+++ b/Simulation/SimulationJobOptions/share/g4/preInclude.ScoringVolumeKiller.py
@@ -13,15 +13,4 @@ from G4AtlasApps.SimFlags import simFlags
 simFlags.NeutronTimeCut = int(2**31 - 1) #probably not required.
 simFlags.NeutronTimeCut.set_Off()
 
-from AthenaCommon.CfgGetter import getPublicTool,getService
-getService('DetectorGeometrySvc').RegionCreators += [getPublicTool('MuonPhysicsRegionTool')]
-#FIXME need to add this to the list of RegionCreators, but
-#currently initializing the DetectorGeometrySvc too early causes
-#problems with the GeoModelSvc configuration.
-
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-svkiller=getPublicTool('ScoringVolumeTrackKiller',tryDefaultConfigurable=True)
-UAStore.addAction(svkiller,['EndOfEvent', 'Step'])
+simFlags.OptionalUserActionList.addAction('G4UA::ScoringVolumeTrackKillerTool',['Event', 'Step'])
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.VerboseSelector.py b/Simulation/SimulationJobOptions/share/g4/preInclude.VerboseSelector.py
index 97598bb4a9741ec35bb411b039f998e7f6840bfa..156a6d5d78148b260e15e34f6935a6e7171f5f93 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.VerboseSelector.py
+++ b/Simulation/SimulationJobOptions/share/g4/preInclude.VerboseSelector.py
@@ -2,15 +2,9 @@
 # Very handy for debugging crashes on the grid when you know what track caused the crash
 # Most powerful in conjunction with the verbose selector area
 
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-from AthenaCommon.CfgGetter import getPublicTool
-
-verboseSelector= getPublicTool('VerboseSelector',tryDefaultConfigurable=True).TargetEvent=1
-verboseSelector.TargetTrack=15932
-verboseSelector.VerboseLevel=2
-verboseSelector.TargetBarcode=-1
-
-UAStore.addAction('VerboseSelector',['EndOfEvent','BeginOfTracking','EndOfTracking'])
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::VerboseSelectorTool',['Event','Tracking','Step'])
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','TargetEvent',1)
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','TargetTrack',15932)
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','VerboseLevel',2)
+#simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','TargetBarcode',-1)
diff --git a/Simulation/SimulationJobOptions/share/g4/preInclude.VerboseSelectorArea.py b/Simulation/SimulationJobOptions/share/g4/preInclude.VerboseSelectorArea.py
index dbb16aa62dbe0d93743e38ad2ff29810a5616717..235bb0ef20d2c7edcd6c6df12e5891c087a615b3 100644
--- a/Simulation/SimulationJobOptions/share/g4/preInclude.VerboseSelectorArea.py
+++ b/Simulation/SimulationJobOptions/share/g4/preInclude.VerboseSelectorArea.py
@@ -4,22 +4,14 @@
 # Verbose level is transmitted to several G4 classes to increase their verbosity.
 # Note that the event number is the number of events into the G4 run, rather than the ATLAS event number.
 
-try:
-    from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-except ImportError:
-    from G4AtlasServices.UserActionStore import UAStore
-from AthenaCommon.CfgGetter import getPublicToolClone,getPublicTool
-
-vsArea=getPublicTool('VerboseSelector/VerboseSelectorArea',tryDefaultConfigurable=True)
-
-vsArea.Xmin=-25000
-vsArea.Xmax=25000
-vsArea.Ymin=-25000
-vsArea.Ymax=25000
-vsArea.Zmin=-30000
-vsArea.Zmax=30000
-vsArea.TargetEvent=1
-vsArea.VerboseLevel=1
-
-UAStore.addAction(vsArea,['EndOfEvent','Step'])
+from G4AtlasApps.SimFlags import simFlags
+simFlags.OptionalUserActionList.addAction('G4UA::VerboseSelectorTool',['Event','Tracking','Step'])
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','Xmin',-25000)
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','Xmax',25000)
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','Ymin',-25000)
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','Ymax',25000)
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','Zmin',-30000)
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','Zmax',30000)
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','TargetEvent',1)
+simFlags.UserActionConfig.addConfig('G4UA::VerboseSelectorTool','VerboseLevel',1)
 
diff --git a/Simulation/SimulationJobOptions/share/pileup/preInclude.PileUpBunchTrainsMC16c_2017_8b4e_Config.py b/Simulation/SimulationJobOptions/share/pileup/preInclude.PileUpBunchTrainsMC16c_2017_8b4e_Config.py
new file mode 100644
index 0000000000000000000000000000000000000000..bd31899186ff01114d1623c9172ea5db8d16183b
--- /dev/null
+++ b/Simulation/SimulationJobOptions/share/pileup/preInclude.PileUpBunchTrainsMC16c_2017_8b4e_Config.py
@@ -0,0 +1,771 @@
+####################################################################################
+## This configuration replicates the beam configuration in the
+## following file: 25ns_1916b_1909_1042_1560_112bpi_20i8b4e.csv.
+## Any of the filled bunch crossings can be chosen as the central
+## bunch crossing, so the timing of the out-of-time pile-up will vary
+## significantly from event to event.  Cavern Background is
+## independent of the bunch pattern. (Compatible with 25ns cavern
+## background.)
+####################################################################################
+
+from Digitization.DigitizationFlags import digitizationFlags
+
+digitizationFlags.cavernIgnoresBeamInt = True
+
+digitizationFlags.bunchSpacing = 25 # This now sets the bunch slot length.
+
+
+digitizationFlags.BeamIntensityPattern = [0.0, # bunch crossing zero is always empty
+0.0,0.0,0.0,0.0,0.0,0.0,         # Starting BCID:    0, Gap: 150 ns
+
+1.0,1.0,1.0,1.0,1.0,             # Starting BCID:    7, Colliding:  5 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,         # Starting BCID:   12, Gap: 950 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:   50, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:   58, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:   62, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:   70, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:   74, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:   82, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:   86, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:   94, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:   98, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  106, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  110, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  118, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  122, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID:  130, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  161, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  169, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  173, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  181, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  185, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  193, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  197, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  205, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  209, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  217, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  221, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  229, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  233, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID:  241, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  248, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  256, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  260, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  268, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  272, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  280, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  284, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  292, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  296, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  304, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  308, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  316, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  320, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID:  328, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  359, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  367, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  371, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  379, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  383, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  391, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  395, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  403, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  407, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  415, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  419, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  427, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  431, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID:  439, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  446, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  454, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  458, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  466, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  470, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  478, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  482, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  490, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  494, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  502, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  506, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  514, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  518, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID:  526, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  557, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  565, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  569, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  577, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  581, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  589, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  593, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  601, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  605, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  613, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  617, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  625, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  629, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID:  637, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  644, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  652, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  656, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  664, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  668, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  676, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  680, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  688, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  692, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  700, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  704, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  712, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  716, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0, # Starting BCID:  724, Gap: 850 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  758, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  766, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  770, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  778, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  782, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  790, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  794, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  802, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  806, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  814, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  818, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  826, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  830, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID:  838, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  869, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  877, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  881, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  889, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  893, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  901, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  905, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  913, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  917, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  925, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  929, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  937, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  941, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID:  949, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  956, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  964, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  968, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  976, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  980, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID:  988, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID:  992, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1000, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1004, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1012, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1016, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1024, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1028, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 1036, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1067, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1075, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1079, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1087, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1091, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1099, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1103, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1111, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1115, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1123, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1127, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1135, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1139, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 1147, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1154, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1162, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1166, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1174, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1178, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1186, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1190, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1198, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1202, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1210, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1214, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1222, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1226, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 1234, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1265, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1273, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1277, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1285, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1289, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1297, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1301, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1309, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1313, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1321, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1325, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1333, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1337, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 1345, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1352, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1360, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1364, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1372, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1376, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1384, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1388, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1396, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1400, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1408, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1412, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1420, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1424, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 1432, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1463, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1471, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1475, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1483, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1487, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1495, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1499, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1507, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1511, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1519, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1523, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1531, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1535, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 1543, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1550, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1558, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1562, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1570, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1574, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1582, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1586, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1594, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1598, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1606, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1610, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1618, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1622, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0, # Starting BCID: 1630, Gap: 850 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1664, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1672, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1676, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1684, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1688, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1696, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1700, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1708, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1712, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1720, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1724, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1732, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1736, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 1744, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1775, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1783, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1787, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1795, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1799, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1807, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1811, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1819, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1823, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1831, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1835, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1843, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1847, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 1855, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1862, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1870, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1874, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1882, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1886, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1894, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1898, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1906, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1910, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1918, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1922, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1930, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1934, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 1942, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1973, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1981, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1985, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 1993, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 1997, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2005, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2009, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2017, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2021, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2029, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2033, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2041, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2045, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 2053, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2060, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2068, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2072, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2080, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2084, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2092, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2096, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2104, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2108, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2116, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2120, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2128, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2132, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 2140, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2171, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2179, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2183, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2191, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2195, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2203, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2207, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2215, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2219, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2227, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2231, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2239, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2243, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 2251, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2258, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2266, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2270, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2278, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2282, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2290, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2294, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2302, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2306, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2314, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2318, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2326, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2330, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 2338, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2369, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2377, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2381, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2389, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2393, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2401, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2405, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2413, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2417, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2425, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2429, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2437, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2441, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 2449, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2456, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2464, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2468, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2476, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2480, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2488, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2492, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2500, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2504, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2512, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2516, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2524, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2528, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0, # Starting BCID: 2536, Gap: 850 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2570, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2578, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2582, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2590, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2594, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2602, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2606, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2614, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2618, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2626, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2630, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2638, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2642, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 2650, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2681, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2689, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2693, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2701, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2705, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2713, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2717, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2725, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2729, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2737, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2741, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2749, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2753, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 2761, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2768, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2776, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2780, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2788, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2792, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2800, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2804, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2812, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2816, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2824, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2828, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2836, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2840, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 2848, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2879, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2887, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2891, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2899, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2903, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2911, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2915, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2923, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2927, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2935, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2939, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2947, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2951, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 2959, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2966, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2974, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2978, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2986, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 2990, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 2998, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3002, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3010, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3014, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3022, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3026, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3034, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3038, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 3046, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3077, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3085, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3089, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3097, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3101, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3109, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3113, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3121, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3125, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3133, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3137, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3145, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3149, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 3157, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3164, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3172, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3176, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3184, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3188, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3196, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3200, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3208, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3212, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3220, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3224, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3232, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3236, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 3244, Gap: 775 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3275, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3283, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3287, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3295, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3299, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3307, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3311, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3319, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3323, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3331, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3335, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3343, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3347, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0, # Starting BCID: 3355, Gap: 175 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3362, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3370, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3374, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3382, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3386, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3394, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3398, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3406, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3410, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3418, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3422, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0, # Starting BCID: 3430, Gap: 100 ns
+
+1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0, # Starting BCID: 3434, Colliding:  8 BCIDs
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0] # Staring BCID: 3442 - Abort gap
+
+from AthenaCommon.BeamFlags import jobproperties
+jobproperties.Beam.bunchSpacing = 25 # Set this to the spacing between filled bunch-crossings within the train.
diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.AMSB.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.AMSB.py
index 8345e2bb7e208359c57482d148c1f57456919166..005338d89e20ff63c8193b91016b44af90f02d56 100644
--- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.AMSB.py
+++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.AMSB.py
@@ -54,13 +54,18 @@ get_and_fix_PDGTABLE([(1000022, N1Mass, '~chi(0,1)', '0'), (1000024, C1Mass, '~c
 if doG4SimConfig:
     from G4AtlasApps.SimFlags import simFlags
     simFlags.PhysicsOptions += ['CharginosPhysicsTool']
-
-    def amsb_applycalomctruthstrategy():
-## Applying the MCTruth strategies: add decays in the Calorimeter
-        from G4AtlasApps import AtlasG4Eng
-        myDecay = AtlasG4Eng.G4Eng.Dict_MCTruthStrg.get('Decay')
-        myDecay.add_Volumes('CALO::CALO', 1)
-
-    simFlags.InitFunctions.add_function("postInit", amsb_applycalomctruthstrategy)
+    # Add Chargino decays if necessary
+    C1Lifetime = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1Lifetime", "-1.0"))
+    if C1Lifetime > 0.0:
+        simFlags.PhysicsOptions += ['CharginoPlusToPiPlusNeutralino']
+        simFlags.PhysicsOptions += ['CharginoMinusToPiMinusNeutralino']
+        C1ToEleBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToEleBR", "-1.0"))
+        if C1ToEleBR > 0.0:
+            simFlags.PhysicsOptions += ['CharginoPlusToEPlusNeutralino']
+            simFlags.PhysicsOptions += ['CharginoMinusToEMinusNeutralino']
+        C1ToMuBR = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1ToMuBR", "-1.0"))
+        if C1ToMuBR > 0.0:
+            simFlags.PhysicsOptions += ['CharginoPlusToMuPlusNeutralino']
+            simFlags.PhysicsOptions += ['CharginoMinusToMuMinusNeutralino']
 
 del doG4SimConfig, simdict
diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py
index 7db54d148f4dbb240d4e26b966e18102f7b39ef4..ed6ab712c05848e0cff3d6c9f922554089f4b124 100644
--- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py
+++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.GMSB.py
@@ -117,6 +117,7 @@ if doG4SimConfig:
     GMSBIndex = int(simdict["GMSBIndex"])
     if GMSBIndex == 1: # generic neutralino to photon scenario
         simFlags.PhysicsOptions += ["GauginosPhysicsTool"]
+        simFlags.PhysicsOptions += ["NeutralinoToPhotonGravitino"]
     elif GMSBIndex == 2 or GMSBIndex == 3 or GMSBIndex == 4: # generic stau scenario
         simFlags.PhysicsOptions += ["SleptonsPhysicsTool"]
     else:
@@ -124,12 +125,4 @@ if doG4SimConfig:
         raise
     del GMSBIndex
 
-    def gmsb_applycalomctruthstrategy():
-    ## Applying the MCTruth strategies: add decays in the Calorimeter
-        from G4AtlasApps import AtlasG4Eng
-        myDecay = AtlasG4Eng.G4Eng.Dict_MCTruthStrg.get('Decay')
-        myDecay.add_Volumes('CALO::CALO', 1)
-
-    simFlags.InitFunctions.add_function("postInit", gmsb_applycalomctruthstrategy)
-
 del doG4SimConfig, simdict
diff --git a/Simulation/Tests/DigitizationTests/CMakeLists.txt b/Simulation/Tests/DigitizationTests/CMakeLists.txt
index 4218f37b8a00ade25cb87fab28eb8fd330d6533a..6ddf1750571fd5bcf29357bc97ae166ac2c2785d 100644
--- a/Simulation/Tests/DigitizationTests/CMakeLists.txt
+++ b/Simulation/Tests/DigitizationTests/CMakeLists.txt
@@ -34,5 +34,5 @@ atlas_install_headers( DigitizationTests )
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( test/DigitizationTests_TestConfiguration.xml )
-atlas_install_scripts( scripts/*.sh )
+atlas_install_scripts( scripts/*.sh test/*.sh )
 
diff --git a/Simulation/Tests/DigitizationTests/cmt/requirements b/Simulation/Tests/DigitizationTests/cmt/requirements
deleted file mode 100755
index eb14e9340ecb06c82bb5bbbdfcda19766b5272fd..0000000000000000000000000000000000000000
--- a/Simulation/Tests/DigitizationTests/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package DigitizationTests
-
-author John Chapman <chapman@hep.phy.cam.ac.uk>
-
-public
-
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*        External
-
-private
-use AthenaKernel        AthenaKernel-*          Control
-use AtlasROOT           AtlasROOT-*             External
-use AtlasBoost          AtlasBoost-*            External
-use EventInfo           EventInfo-*             Event
-use GeneratorObjects    GeneratorObjects-*      Generators
-use InDetIdentifier     InDetIdentifier-*       InnerDetector/InDetDetDescr
-use InDetRawData        InDetRawData-*          InnerDetector/InDetRawEvent
-use InDetSimData        InDetSimData-*          InnerDetector/InDetRawEvent
-
-use TestPolicy          TestPolicy-*
-
-apply_pattern validate_xml
-
-public
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-# build a component library
-library DigitizationTests *.cxx components/*.cxx
-apply_pattern component_library
-
-# runtime files
-apply_pattern declare_runtime extras="../test/DigitizationTests_TestConfiguration.xml"
-
-macro DigitizationTests_TestConfiguration "../test/DigitizationTests_TestConfiguration.xml"
-
-#scripts
-# apply_pattern declare_scripts files="../scripts/Digitization_mc15test.sh ../scripts/DigitizationCheckReferenceLocation.sh"
-apply_pattern declare_scripts files="../scripts/*.sh"
-
-
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2010_ttbar_no_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2010_ttbar_no_pileup.sh
new file mode 100755
index 0000000000000000000000000000000000000000..0f6a9fd576172b134530ca3357a99cf8c9c896a4
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2010_ttbar_no_pileup.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# art-description: Run digitization of an MC15 ttbar sample with 2010 geometry and conditions, without pile-up
+# art-type: grid
+
+
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ttbar.ATLAS-R1-2010-02-00-00.HITS.pool.root --outputRDOFile mc15_2010_ttbar.RDO.pool.root --maxEvents 25 --skipEvents 0  --digiSeedOffset1=11 --digiSeedOffset2=22 --geometryVersion ATLAS-R1-2010-02-00-00 --conditionsTag OFLCOND-RUN12-SDR-22 --DataRunNumber 155697 --postInclude default:PyJobTransforms/UseFrontier.py
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2010_ttbar.RDO.pool.root
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2011_ttbar_no_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2011_ttbar_no_pileup.sh
new file mode 100755
index 0000000000000000000000000000000000000000..46f6d25820e3fd4c220eb9b611e4f21fbc07f946
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2011_ttbar_no_pileup.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# art-description: Run digitization of an MC15 ttbar sample with 2011 geometry and conditions, without pile-up
+# art-type: grid
+
+
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ttbar.ATLAS-R1-2011-02-00-00.HITS.pool.root --outputRDOFile mc15_2011_ttbar.RDO.pool.root --maxEvents 25 --skipEvents 0  --digiSeedOffset1 11 --digiSeedOffset2 22 --geometryVersion ATLAS-R1-2011-02-00-00 --conditionsTag OFLCOND-RUN12-SDR-22  --DataRunNumber 180164 --postInclude 'default:PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2011_ttbar.RDO.pool.root
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2012_ttbar_no_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2012_ttbar_no_pileup.sh
new file mode 100755
index 0000000000000000000000000000000000000000..b76344e60dd91c3edf4fe6ba2a1c33da61693e81
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2012_ttbar_no_pileup.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# art-description: Run digitization of an MC15 ttbar sample with 2012 geometry and conditions, without pile-up
+# art-type: grid
+
+
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/ttbar.ATLAS-R1-2012-03-00-00.HITS.pool.root --outputRDOFile mc15_2012_ttbar.RDO.pool.root --maxEvents 25 --skipEvents 0  --digiSeedOffset1=11 --digiSeedOffset2=22 --geometryVersion ATLAS-R1-2012-03-00-00 --conditionsTag OFLCOND-RUN12-SDR-22 --DataRunNumber 212272 --postInclude 'default:PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2012_ttbar.RDO.pool.root
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_cosmics.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_cosmics.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9603f438b7189fe1c202bedd42f154a80811dc58
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_cosmics.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# art-description: Run digitization of a cosmics sample produced with MC15 using 2015 geometry and conditions
+# art-type: grid
+
+
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/testCosmics.ATLAS-R2-2015-03-01-00_VALIDATION.HITS.pool.root  --outputRDOFile mc15_2015_cosmics.RDO.pool.root  --maxEvents 100  --skipEvents 0  --digiSeedOffset1 11 --digiSeedOffset2 22  --geometryVersion ATLAS-R2-2015-03-01-00_VALIDATION  --conditionsTag default:OFLCOND-RUN12-SDR-25  --DataRunNumber 222500  --postInclude 'default:PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_cosmics.RDO.pool.root
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9db08c65f72679988ed2ecc298e4afd357122379
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_algs_pileup.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# art-description: Run digitization of an MC15 ttbar sample with 2015 geometry and conditions, 25ns pile-up and using digitizationFlags.doXingByXingPileUp=False
+# art-type: grid
+
+
+cp -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/
+cp -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
+
+Digi_tf.py  --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/HITS.05098387.*.pool.root.? --inputLowPtMinbiasHitsFile mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374.*.pool.root.? --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile mc15_2015_ttbar.RDO.pool.root  --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1'  --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6  --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfAlgorithms.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
+
+rm -rf mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_ttbar.RDO.pool.root
+
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a202f6537e2a72984773ec9c177a40ccf1fdd701
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# art-description: Run digitization of an MC15 ttbar sample with 2015 geometry and conditions, 25ns pile-up and using digitizationFlags.doXingByXingPileUp=True
+# art-type: grid
+
+
+cp -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/
+cp -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
+
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/HITS.05098387.*.pool.root.?  --inputLowPtMinbiasHitsFile mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374.*.pool.root.?  --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile mc15_2015_ttbar.RDO.pool.root --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec    'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
+
+rm -rf mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_ttbar.RDO.pool.root
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh
new file mode 100755
index 0000000000000000000000000000000000000000..cac739386bd6190757b15760e9bd6faf6573a1eb
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_25ns_pileup_noNoise.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# art-description: Run digitization of an MC15 ttbar sample with 2015 geometry and conditions, 25ns pile-up, switching off noise and using digitizationFlags.doXingByXingPileUp=True
+# art-type: grid
+
+
+cp -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/
+cp -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
+
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2 170 --doAllNoise False --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/HITS.05098387.*.pool.root.? --inputLowPtMinbiasHitsFile mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374.*.pool.root.? --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194 --outputRDOFile mc15_2015_ttbar.RDO.pool.root  --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1'  --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)'  --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run222525_v1.py' --skipEvents 0
+
+rm -rf mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_ttbar.RDO.pool.root
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9dc57e47c9c106bc96f63adb983e5fb398c381c1
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_50ns_pileup.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# art-description: Run digitization of an MC15 ttbar sample with 2015 geometry and conditions, 50ns pile-up and using digitizationFlags.doXingByXingPileUp=True
+# art-type: grid
+
+
+cp -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/
+cp -r /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/mc15a/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
+
+Digi_tf.py --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1  --conditionsTag default:OFLCOND-RUN12-SDR-25 --digiSeedOffset1 170 --digiSeedOffset2=170  --geometryVersion ATLAS-R2-2015-03-01-00 --inputHighPtMinbiasHitsFile mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/HITS.05098387.*.pool.root.? --inputLowPtMinbiasHitsFile mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374.*.pool.root.? --jobNumber 1 --maxEvents 25 --numberOfCavernBkg 0 --numberOfHighPtMinBias 0.12268057 --numberOfLowPtMinBias 39.8773194  --outputRDOFile mc15_2015_ttbar.RDO.pool.root --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'HITtoRDO:from AthenaCommon.CfgGetter import getPublicTool;getPublicTool("MergeMcEventCollTool").OnlySaveSignalTruth=True;ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1' --postInclude 'default:PyJobTransforms/UseFrontier.py' --pileupFinalBunch 6 --preExec 'all:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.numberOfCollisions.set_Value_and_Lock(20.0);from LArROD.LArRODFlags import larRODFlags;larRODFlags.NumberOfCollisions.set_Value_and_Lock(20);larRODFlags.nSamples.set_Value_and_Lock(4);larRODFlags.doOFCPileupOptimization.set_Value_and_Lock(True);larRODFlags.firstSample.set_Value_and_Lock(0);larRODFlags.useHighestGainAutoCorr.set_Value_and_Lock(True)' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_50ns_Config1.py,RunDependentSimData/configLumi_run222510.py' --skipEvents 0
+
+rm -rf mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/ mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_ttbar.RDO.pool.root
diff --git a/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_no_pileup.sh b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_no_pileup.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a8b11caad54131423fda5658cb2072132feea7bf
--- /dev/null
+++ b/Simulation/Tests/DigitizationTests/test/test_Digi_tf_mc15_2015_ttbar_no_pileup.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# art-description: Run digitization of an MC15 ttbar sample with 2015 geometry and conditions, without pile-up
+# art-type: grid
+
+
+Digi_tf.py  --inputHITSFile /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/DigitizationTests/HITS.04919495._001041.pool.root.1 --outputRDOFile mc15_2015_ttbar.RDO.pool.root --maxEvents 25 --skipEvents 0  --digiSeedOffset1 11 --digiSeedOffset2 22  --geometryVersion ATLAS-R2-2015-03-01-00 --conditionsTag default:OFLCOND-RUN12-SDR-25 --DataRunNumber 222500 --postInclude 'default:PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and add DCube tests
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME mc15_2015_ttbar.RDO.pool.root
diff --git a/Simulation/Tests/SimCoreTests/CMakeLists.txt b/Simulation/Tests/SimCoreTests/CMakeLists.txt
index fbb9f7fe5dad567ea2d64a4e3e842fbb08e1a0f6..48c2030a672ad7041c46d84cb314c46b1392d513 100644
--- a/Simulation/Tests/SimCoreTests/CMakeLists.txt
+++ b/Simulation/Tests/SimCoreTests/CMakeLists.txt
@@ -11,4 +11,4 @@ atlas_depends_on_subdirs( PRIVATE
 
 # Install files from the package:
 atlas_install_runtime( test/SimCoreTests_TestConfiguration.xml )
-
+atlas_install_scripts( test/*.sh test/*.py )
diff --git a/Simulation/Tests/SimCoreTests/cmt/requirements b/Simulation/Tests/SimCoreTests/cmt/requirements
deleted file mode 100644
index 6ffbf531dabd6c68c800169cc7e7116f517ed188..0000000000000000000000000000000000000000
--- a/Simulation/Tests/SimCoreTests/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package SimCoreTests
-
-author Andreas Schaelicke <andreas.schaelicke -at- cern.ch>
-
-branches src cmt doc
-
-use AtlasPolicy         AtlasPolicy-*
-
-private
-use TestPolicy          TestPolicy-*
-end_private
-
-
-# build a component library
-# library SimCoreTests ../src/*.cxx
-#apply_pattern component_library
-
-private
-apply_pattern validate_xml
-public
-
-# Patterns for RTT
-macro SimCoreTests_TestConfiguration "../test/SimCoreTests_TestConfiguration.xml"
-apply_pattern declare_runtime extras="../test/SimCoreTests_TestConfiguration.xml"
-#apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_joboptions files="-s=../share *.py"
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_2010GeomSim.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_2010GeomSim.sh
new file mode 100755
index 0000000000000000000000000000000000000000..e97db8a70f45ff9c127b7ef35b2fbb7c8aed7796
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_2010GeomSim.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, using 2010 geometry and conditions, reading single muon events, writing HITS
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mu_E200_eta0-25.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '10' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R1-2010-02-00-00' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '155697' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_2011GeomSim.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_2011GeomSim.sh
new file mode 100755
index 0000000000000000000000000000000000000000..485240b264e419ba47782c5525bd094d851c1af7
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_2011GeomSim.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, using 2011 geometry and conditions, reading single muon events, writing HITS
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mu_E200_eta0-25.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '10' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R1-2011-02-00-00' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '180164' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_2012GeomSim.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_2012GeomSim.sh
new file mode 100755
index 0000000000000000000000000000000000000000..03a55af79dd6ace0d23671c8bdaa0a1c301befa4
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_2012GeomSim.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, using 2012 geometry and conditions, reading single muon events, writing HITS
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/mu_E200_eta0-25.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '10' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R1-2012-03-00-00' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '212272' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_AFPSimTest.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_AFPSimTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d8b007d972938e49bad6de80185af9e376f94579
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_AFPSimTest.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# art-description: Tests ATLAS + AFP simulation, generating events on-the-fly
+# art-type: grid
+
+# FIXME need an AFP-specific single particle generator configuration
+AtlasG4_tf.py --preInclude 'G4AtlasTests/preInclude.ALFA_SingleParticle.py' --outputHITSFile 'test.HITS.pool.root' --maxEvents '3' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --AFPOn 'True' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and run DCube
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_ALFASimTest.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_ALFASimTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..14bd2a1dd18d76aa1128fc72a3affa27eb545029
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_ALFASimTest.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Tests ATLAS + ALFA simulation, generating events on-the-fly
+# art-type: grid
+
+AtlasG4_tf.py --preInclude 'G4AtlasTests/preInclude.ALFA_SingleParticle.py' --outputHITSFile 'test.HITS.pool.root' --maxEvents '3' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --ALFAOn 'True' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.ALFA_dcube.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and run DCube
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CavernBg_EVNT2TR.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CavernBg_EVNT2TR.sh
new file mode 100755
index 0000000000000000000000000000000000000000..09a22ce1db69dd8e17522f0f35fb78cd8bcb7358
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CavernBg_EVNT2TR.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, reading min bias events, write cavern background track records, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/minbias_Inelastic_low-pythia8-7000.evgen.pool.root' --outputHITSFile 'discard.HITS.pool.root' --outputEVNT_CAVERNTRFile 'test.EVNT.pool.root' --maxEvents '2' --skipEvents '0' --randomSeed '5678' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'QGSP_BERT_HP' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.EVNT.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CavernBg_TR2HITS.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CavernBg_TR2HITS.sh
new file mode 100755
index 0000000000000000000000000000000000000000..21acd5574c1e65cee7abf31e1cfaca6ab803b3b8
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CavernBg_TR2HITS.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, reading cavern background track records, writing cavern background HITS, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNT_CAVERNFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/cavernbg-pythia8-7000.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '5' --skipEvents '0' --randomSeed '8765' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'QGSP_BERT_HP' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CosmicSim.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CosmicSim.sh
new file mode 100755
index 0000000000000000000000000000000000000000..dc690fb9bac707c6932b3e9eea82b6653f772f21
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CosmicSim.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run cosmics simulation outside ISF, generating events on-the-fly, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --outputHITSFile 'test.HITS.pool.root' --maxEvents '1500' --randomSeed '1234' --DataRunNumber '222525' --CosmicFilterVolume 'Calo' --CosmicFilterVolume2 'NONE' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --CosmicPtSlice 'NONE' --outputEVNT_COSMICSTRFile 'test.TR.pool.root' --beamType 'cosmics' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root test.TR.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CosmicSimTR.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CosmicSimTR.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9b393ee738c4a9a9cc00a1ca3aefd5d79517007b
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_CosmicSimTR.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run cosmics simulation outside ISF, using TrackRecords as input, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNT_COSMICSFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/Cosmics.TR.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '-1' --randomSeed '1234' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --physicsList 'FTFP_BERT' --DataRunNumber '222525' --firstEvent '0' --beamType 'cosmics' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_FrozenShowerFCalOnly.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_FrozenShowerFCalOnly.sh
new file mode 100755
index 0000000000000000000000000000000000000000..87d3d845445507bd265e8be96fa0e520dd61ea52
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_FrozenShowerFCalOnly.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, using Frozen Showers to speed up FCAL simulation, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/e_E50_eta34_49.EVNT.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents 10 --skipEvents 0 --randomSeed 10 --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --preInclude 'SimulationJobOptions/preInclude.FrozenShowersFCalOnly.py' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_FtfpBertAtlTest.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_FtfpBertAtlTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..4da36a25e124e4650044c0ccc661ae29f05bf205
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_FtfpBertAtlTest.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, reading di-jet events, using FTFP_BERT_ATL physics list, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/J2_jetjet-pythia6-7000.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '5' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT_ATL' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_HeavyIonSim.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_HeavyIonSim.sh
new file mode 100755
index 0000000000000000000000000000000000000000..8ac20db8eabc5e9d7da653e80e11f10f36fb1878
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_HeavyIonSim.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, reading lead ions peripheral simulation (low multiplicity) events, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/pbpb_Peripheral-hijing-5500.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '1' --skipEvents '4' --randomSeed '10' --geometryVersion 'ATLAS-R1-2012-03-00-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '210184' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:SimulationJobOptions/postInclude.HijingPars.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_LucidSimTest.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_LucidSimTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..3f06b212c28852b93b84edef9a2710f9f5cc66a4
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_LucidSimTest.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Tests ATLAS + Lucid simulation, reading in events from a file, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/minbias_Inelastic-pythia8-7000.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '3' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --LucidOn 'True' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and run DCube
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..2c2dc1114edb405fdf7a1ac70b35aab24603a128
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NSWSimTest.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# art-description: Tests NSW detector functionality using di-muon events, generating events on-the-fly
+# art-type: grid
+
+AtlasG4_tf.py --preInclude 'G4AtlasTests/ParticleGun_flatpt_2particle.py' --outputHITSFile 'test.HITS.pool.root' --maxEvents '200' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-25' --physicsList 'FTFP_BERT' --DBRelease 'current' --postInclude 'G4AtlasTests/postInclude.DCubeTest.py,G4AtlasTests/postInclude.NSW.config.simu.py' --preExec 'simFlags.ReleaseGeoModel=False;simFlags.SimulateNewSmallWheel=True;'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and run DCube
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NeutronCutTest.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NeutronCutTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..29eee33eadd575f3890d067c7af0155523b741cc
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_NeutronCutTest.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, reading Z->tau tau events, modifying the Neutron timing cut, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/A3_Ztautau_filter-pythia6-7000.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '5' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --preInclude 'SimulationJobOptions/preInclude.G4SignalCavern.py' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_QgsBicTest.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_QgsBicTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..b8b21d097ef212742906d4f6cba218e20491a18f
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_QgsBicTest.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, with alternative QGS_BIC physics list, reading in SU3 SUSY events, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/susy_SU3-herwigpp-7000.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '5' --skipEvents '0' --randomSeed '42' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'QGSP_BIC' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_SkipEventsTest.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_SkipEventsTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..666317a9532167a38a70dc29476e1dd53170d90b
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_SkipEventsTest.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Reading single particle gen events, checking that the SkipEvents argument works, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/e_E50_eta0-25.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '10' --skipEvents '5' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py'
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO Here we also want to be able to grep the log file for:
+#<fileGrepperPattern>skipping event 1.*skipping event 2.*skipping event 3.*skipping event 4.*skipping event 5</fileGrepperPattern>
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_TTbarSim.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_TTbarSim.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a1a3cb53dfb26028ea5aea264c09434890de2b3f
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_TTbarSim.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, reading ttbar events, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/ttbar_muplusjets-pythia6-7000.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '4' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.DCubeTest.py' --preExec 'AtlasG4Tf:simFlags.ReleaseGeoModel=False;'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_TimingTest_TTbarSim.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_TimingTest_TTbarSim.sh
new file mode 100755
index 0000000000000000000000000000000000000000..b67b715dcc5b3aa0e7c698a970d9d47bc592b89d
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_TimingTest_TTbarSim.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run simulation outside ISF, reading ttbar events, switching on extra timing checks, writing HITS, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/ttbar_muplusjets-pythia6-7000.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '10' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:LArG4FastSimulation/LArG4FastSimulation_setupTimer_jobOptions.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO Need to run DCube on timing histograms
+#art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_WriteCalHitsTest.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_WriteCalHitsTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..4c40badd015f7f6ff3e432fee310ebeb29fb981e
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_WriteCalHitsTest.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Reading in single particle gen events, writing out full CaloCalibrationHit information, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/pi_E50_eta0-60.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '10' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --preInclude 'SimulationJobOptions/preInclude.CalHits.py,SimulationJobOptions/preInclude.ParticleID.py' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.DCubeTest_CaloCalibHits.py' --preExec 'AtlasG4Tf:simFlags.ReleaseGeoModel=False;'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+#TODO This is a regression test I think. We would also need to compare these files to fixed references and run DCube
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_ZDCSimTest.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_ZDCSimTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..ad92cc6c1d4e0274a6d0870e309bddfe40eac66d
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_ZDCSimTest.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Tests ATLAS + ZDC simulation, generating events on-the-fly
+# art-type: grid
+
+AtlasG4_tf.py --preInclude 'G4AtlasTests/preInclude.ZDC_SingleParticle.py' --outputHITSFile 'test.HITS.pool.root' --maxEvents 3 --randomSeed 10 --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --ZDCOn 'True' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.ZDC_dcube.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and run DCube
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_electrons.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_electrons.sh
new file mode 100755
index 0000000000000000000000000000000000000000..91869e7eb22a46de18ade1e498b6052b91d406ca
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_electrons.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# art-description: Tests detector response to single electrons, generated on-the-fly, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --preInclude 'SimulationJobOptions/preInclude.SingleElectronGenerator.py' --outputHITSFile 'test.HITS.pool.root' --maxEvents '1000' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.DCubeTest.py' --preExec 'AtlasG4Tf:simFlags.ReleaseGeoModel=False;'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and run DCube
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+
+# TODO Remake plots by reading in the HITS file produced by the previous job (Tests TP conversion) - need to run DCube on output
+# athena G4AtlasTests/test_AtlasG4_electrons_noevgen.py
+
+
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_minbias.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_minbias.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c983d3cf2d1efb8d9cfe4e906ee2cfb7707218f9
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_minbias.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# art-description: Tests inner detector response to minbias events, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/SimCoreTests/minbias_Inelastic-pythia8-7000.evgen.pool.root' --outputHITSFile 'test.HITS.pool.root' --maxEvents '50' --skipEvents '0' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --preInclude 'SimulationJobOptions/preInclude.CaloOffDigitConfig.py,SimulationJobOptions/preInclude.MuonOffDigitConfig.py' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.DCubeTest.py' --preExec 'AtlasG4Tf:simFlags.ReleaseGeoModel=False;'
+# TODO would be good to update preExec syntax to apply beam rotations
+#'simFlags.EventFilter.set_On();simFlags.EventFilter.get_Value()["BeamEffectTransformation"]=True;'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and run DCube
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_muons.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_muons.sh
new file mode 100755
index 0000000000000000000000000000000000000000..7fe3bca50c00fd8303b07e0431f223a9db8eb72b
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_muons.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# art-description: Tests detector response to single muons, generated on-the-fly, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --preInclude 'SimulationJobOptions/preInclude.SingleMuonGenerator.py' --outputHITSFile 'test.HITS.pool.root' --maxEvents '2000' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.DCubeTest.py' --preExec 'AtlasG4Tf:simFlags.ReleaseGeoModel=False;'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and run DCube
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
+
+# TODO Remake plots by reading in the HITS file produced by the previous job (Tests TP conversion) - need to run DCube on output
+# athena G4AtlasTests/test_AtlasG4_muons_noevgen.py
+
+
diff --git a/Simulation/Tests/SimCoreTests/test/test_AtlasG4_pions.sh b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_pions.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9b256a52463cc4e84ea70cacaf9d9d7db48806ad
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_AtlasG4_pions.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Tests detector response to single pions, generated on-the-fly, using 2015 geometry and conditions
+# art-type: grid
+
+AtlasG4_tf.py --preInclude 'SimulationJobOptions/preInclude.SinglePionGenerator.py' --outputHITSFile 'test.HITS.pool.root' --maxEvents '150' --randomSeed '10' --geometryVersion 'ATLAS-R2-2015-03-01-00_VALIDATION' --conditionsTag 'OFLCOND-RUN12-SDR-19' --DataRunNumber '222525' --physicsList 'FTFP_BERT' --postInclude 'PyJobTransforms/UseFrontier.py' 'AtlasG4Tf:G4AtlasTests/postInclude.DCubeTest.py' --preExec 'AtlasG4Tf:simFlags.ReleaseGeoModel=False;'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references and run DCube
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_TestBeamSim.sh b/Simulation/Tests/SimCoreTests/test/test_TestBeamSim.sh
new file mode 100755
index 0000000000000000000000000000000000000000..f1f9417052434c1c74f8eb091510724f3e08e7d1
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_TestBeamSim.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# art-description: Run test-beam simulation outside ISF, generating events on-the-fly, writing HITS
+# art-type: grid
+
+TestBeam_tf.py --outputHITSFile 'test.HITS.pool.root' --maxEvents '10' --Eta '0.35' --testBeamConfig 'tbtile' --postInclude 'PyJobTransforms/UseFrontier.py'
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+# TODO This is a regression test I think. We would also need to compare these files to fixed references
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_athena_G4AtlasCosmic.sh b/Simulation/Tests/SimCoreTests/test/test_athena_G4AtlasCosmic.sh
new file mode 100755
index 0000000000000000000000000000000000000000..8a9cfb321582447db81c1c5cc4820918e880e6b7
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_athena_G4AtlasCosmic.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# art-description: Run cosmics simulation outside ISF from the athena command-line, generating events on-the-fly
+# art-type: grid
+
+athena --preloadlib=${ATLASMKLLIBDIR_PRELOAD}/libintlc.so.5:${ATLASMKLLIBDIR_PRELOAD}/libimf.so G4AtlasApps/jobOptions.G4Cosmic.py
+
+# TODO This is a regression test I think. 
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME test.HITS.pool.root
diff --git a/Simulation/Tests/SimCoreTests/test/test_athena_G4AtlasGeoTest.sh b/Simulation/Tests/SimCoreTests/test/test_athena_G4AtlasGeoTest.sh
new file mode 100755
index 0000000000000000000000000000000000000000..b534af9ea9af31b0d00d5374b923d87aa2ff5145
--- /dev/null
+++ b/Simulation/Tests/SimCoreTests/test/test_athena_G4AtlasGeoTest.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# art-description: Recursive geometry test on ATLAS-R2-2015-03-01-00 (MC15 default). Done only on G4 and GeoModel envelopes
+# art-type: grid
+
+athena G4AtlasTests/test_G4AtlasGeo.py
+
+#TODO need to add a test to grep log files.
diff --git a/Simulation/Tests/SimExoticsTests/cmt/requirements b/Simulation/Tests/SimExoticsTests/cmt/requirements
deleted file mode 100644
index fb27fa94629b678adceea415a83bdf2144bca9e9..0000000000000000000000000000000000000000
--- a/Simulation/Tests/SimExoticsTests/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package SimExoticsTests
-
-author Andreas Schaelicke <andreas.schaelicke -at- cern.ch>
-
-branches cmt doc
-
-use AtlasPolicy         AtlasPolicy-*
-
-private
-use TestPolicy          TestPolicy-*
-end_private
-
-
-# build a component library
-# library SimExoticsTests ../src/*.cxx
-#apply_pattern component_library
-
-private
-apply_pattern validate_xml
-public
-
-# Patterns for RTT
-macro SimExoticsTests_TestConfiguration "../test/SimExoticsTests_TestConfiguration.xml"
-apply_pattern declare_runtime extras="../test/SimExoticsTests_TestConfiguration.xml"
-#apply_pattern declare_joboptions files="*.py"
diff --git a/Simulation/Tests/SimPerformanceTests/cmt/requirements b/Simulation/Tests/SimPerformanceTests/cmt/requirements
deleted file mode 100644
index 6c421ef5d379f62bc4b88daa3ebf94eb86931444..0000000000000000000000000000000000000000
--- a/Simulation/Tests/SimPerformanceTests/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package SimPerformanceTests
-
-author Andreas Schaelicke <andreas.schaelicke -at- cern.ch>
-
-branches src cmt doc
-
-use AtlasPolicy         AtlasPolicy-*
-
-private
-use TestPolicy          TestPolicy-*
-end_private
-
-
-# build a component library
-# library SimPerformanceTests ../src/*.cxx
-#apply_pattern component_library
-
-private
-apply_pattern validate_xml
-public
-
-# Patterns for RTT
-macro SimPerformanceTests_TestConfiguration "../test/SimPerformanceTests_TestConfiguration.xml"
-apply_pattern declare_runtime extras="../test/SimPerformanceTests_TestConfiguration.xml"
-apply_pattern declare_joboptions files="*.py"
diff --git a/Simulation/Tests/SimRTT_Tools/cmt/requirements b/Simulation/Tests/SimRTT_Tools/cmt/requirements
deleted file mode 100644
index 36c41e268f09f0db89405300bb2444fa0fed5bb8..0000000000000000000000000000000000000000
--- a/Simulation/Tests/SimRTT_Tools/cmt/requirements
+++ /dev/null
@@ -1,8 +0,0 @@
-package SimRTT_Tools
-author Thomas Gillam <thomas.gillam@cern.ch>
-
-use AtlasPolicy AtlasPolicy-*
-
-apply_pattern declare_scripts files="../scripts/parse_TruthEvent.py ../scripts/grabRttRootFile.py ../share/simCoreFileGrepperScript.py"
-
-apply_pattern declare_runtime extras="../share/DCubeFlexibleRunner.py ../share/FlexibleDiffPoolFilesRunner.py ../share/SimCoreFileGrepper.py"
diff --git a/Simulation/Tools/AtlasCLHEP_RandomGenerators/cmt/requirements b/Simulation/Tools/AtlasCLHEP_RandomGenerators/cmt/requirements
deleted file mode 100755
index 71227236d8d922144778328d3a7202a7cb801e16..0000000000000000000000000000000000000000
--- a/Simulation/Tools/AtlasCLHEP_RandomGenerators/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package AtlasCLHEP_RandomGenerators
-
-author M. Duehrssen <michael.duehrssen@cern.ch>
-
-use AtlasCLHEP           AtlasCLHEP-*           External
-use AtlasPolicy          AtlasPolicy-*
-
-#####
-## Use this for standard compilation
-#####
-apply_pattern installed_library
-library AtlasCLHEP_RandomGenerators ../src/*.cxx src/ValidationTests/*.cxx
-
-#####
-## Use this if you want to run the rnd generator testing code with the JO in share
-#####
-#apply_pattern dual_use_library files="*.cxx ValidationTests/*.cxx"
-
-
-private
-use GaudiInterface       GaudiInterface-*       External
-use AthenaKernel         AthenaKernel-*         Control
-use AtlasDSFMT           AtlasDSFMT-*           External
-use AthenaBaseComps      AthenaBaseComps-*      Control
-use AtlasROOT            AtlasROOT-*            External
-use AtlasBoost           AtlasBoost-*           External
diff --git a/Simulation/Tools/HitAnalysis/cmt/requirements b/Simulation/Tools/HitAnalysis/cmt/requirements
deleted file mode 100755
index 1d8154fcff756ad12a02f8090a24ad1f80259391..0000000000000000000000000000000000000000
--- a/Simulation/Tools/HitAnalysis/cmt/requirements
+++ /dev/null
@@ -1,46 +0,0 @@
-package HitAnalysis
-
-author Zach Marshall <zach.marshall@cern.ch>
-
-use AtlasPolicy			AtlasPolicy-*
-
-branches run
-
-use GaudiInterface		GaudiInterface-*		External
-use AtlasROOT			AtlasROOT-*				External
-
-private
-use AthenaBaseComps	 AthenaBaseComps-*		 Control
-use InDetSimEvent        InDetSimEvent-*         	 InnerDetector
-use TileSimEvent         TileSimEvent-*          	 TileCalorimeter
-use TileDetDescr         TileDetDescr-*          	 TileCalorimeter
-use LArSimEvent          LArSimEvent-*           	 LArCalorimeter
-use GeoAdaptors          GeoAdaptors-*           	 DetectorDescription/GeoModel
-use CaloIdentifier       CaloIdentifier-*        	 Calorimeter
-use CaloDetDescr         CaloDetDescr-*          	 Calorimeter
-use CaloSimEvent         CaloSimEvent-*          	 Calorimeter
-use InDetSimEvent        InDetSimEvent-*         	 InnerDetector
-use MuonSimEvent         MuonSimEvent-*          	 MuonSpectrometer
-use AtlasCLHEP           AtlasCLHEP-*            	 External
-use EventInfo	         EventInfo-*			 Event
-use AtlasHepMC           AtlasHepMC-*            	 External
-use GeneratorObjects     GeneratorObjects-*      	 Generators
-use TrackRecord          TrackRecord-*			 Simulation/G4Sim
-use ALFA_SimEv           ALFA_SimEv-*			 ForwardDetectors/ALFA
-use LUCID_SimEvent 	 LUCID_SimEvent-*		 ForwardDetectors/LUCID/LUCID_SimUtils
-use ZDC_SimEvent     	 ZDC_SimEvent-*			 ForwardDetectors/ZDC
-use AFP_SimEv            AFP_SimEv-*                     ForwardDetectors/AFP
-end_private
-
-use AtlasSimulationRunTime 	AtlasSimulationRunTime-*
-
-library HitAnalysis *.cxx components/*.cxx
-
-apply_tag  ROOTBasicLibs
-apply_tag  ROOTMathLibs
-apply_tag  ROOTSTLDictLibs
-apply_tag  ROOTGraphicsLibs
-apply_tag  ROOTTableLibs
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py *.sh"
diff --git a/Simulation/Tools/HitAnalysis/share/AFPHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/AFPHitAnalysis_topOptions.py
index 2afbcca4cdb77defa0e2bd4de9df3fd27e423b30..f22c3e8ac83892f18399764b7a53036eef2bd9c4 100755
--- a/Simulation/Tools/HitAnalysis/share/AFPHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/AFPHitAnalysis_topOptions.py
@@ -4,13 +4,13 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -19,8 +19,8 @@ topSequence = AlgSequence()
 from HitAnalysis.HitAnalysisConf import AFPHitAnalysis
 topSequence += AFPHitAnalysis() 
 AFPHitAnalysis = AFPHitAnalysis()
-AFPHitAnalysis.NtupleFileName = '/AFPHitAnalysis/ntuples/'
-AFPHitAnalysis.HistPath = '/AFPHitAnalysis/histos/'
+AFPHitAnalysis.NtupleFileName = '/AFPHitAnalysis/'
+AFPHitAnalysis.HistPath = '/AFPHitAnalysis/'
 
 from GaudiSvc.GaudiSvcConf import THistSvc
 ServiceMgr += THistSvc()
@@ -41,4 +41,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/ALFAHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/ALFAHitAnalysis_topOptions.py
index 05ece5efe46658e466076b68e58401a4c7622553..4065c4d2854ae79935020940bafa6c0941488215 100755
--- a/Simulation/Tools/HitAnalysis/share/ALFAHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/ALFAHitAnalysis_topOptions.py
@@ -10,7 +10,7 @@ include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -19,6 +19,7 @@ topSequence = AlgSequence()
 from HitAnalysis.HitAnalysisConf import ALFAHitAnalysis
 topSequence += ALFAHitAnalysis() 
 ALFAHitAnalysis = ALFAHitAnalysis()
+ALFAHitAnalysis.NtupleFileName = '/ALFAHitAnalysis/'
 ALFAHitAnalysis.HistPath = '/ALFAHitAnalysis/'
 
 from GaudiSvc.GaudiSvcConf import THistSvc
@@ -40,4 +41,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/AllHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/AllHitAnalysis_topOptions.py
index 54b3b85785444b952715d591f944b1a53fb96924..e815ea4a872cf0b663c56543e70653ee72e37f88 100755
--- a/Simulation/Tools/HitAnalysis/share/AllHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/AllHitAnalysis_topOptions.py
@@ -2,7 +2,6 @@
 from AthenaCommon.AppMgr import ServiceMgr
 import AthenaPoolCnvSvc.ReadAthenaPool
 
-
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
 include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
@@ -11,9 +10,8 @@ include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/afs/cern.ch/work/a/ancuetog/HitsAreas/20.3.X.Y-VAL-r3/atlasG4_10ttbar_20.3.X.Y-VAL-r3-modtime.NoFrozenShower.DeadLAr.hits.pool.root" )
-#athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )                                                                                         
-ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() 
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
+ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput()
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
@@ -21,57 +19,70 @@ from HitAnalysis.HitAnalysisConf import *
 
 topSequence += SiHitAnalysis('PixelHitAnalysis')
 topSequence.PixelHitAnalysis.CollectionName='PixelHits'
+topSequence.PixelHitAnalysis.NtupleFileName='/HitAnalysis/Pixel/'
+topSequence.PixelHitAnalysis.HistPath='/HitAnalysis/Pixel/'
+
 topSequence += SiHitAnalysis('SCTHitAnalysis')
 topSequence.SCTHitAnalysis.CollectionName='SCT_Hits'
+topSequence.SCTHitAnalysis.NtupleFileName='/HitAnalysis/SCT/'
+topSequence.SCTHitAnalysis.HistPath='/HitAnalysis/SCT/'
+
 topSequence += SiHitAnalysis('BCMHitAnalysis')
 topSequence.BCMHitAnalysis.CollectionName='BCMHits'
+topSequence.BCMHitAnalysis.NtupleFileName='/HitAnalysis/BCM/'
+topSequence.BCMHitAnalysis.HistPath='/HitAnalysis/BCM/'
+
 topSequence += SiHitAnalysis('BLMHitAnalysis')
 topSequence.BLMHitAnalysis.CollectionName='BLMHits'
+topSequence.BLMHitAnalysis.NtupleFileName='/HitAnalysis/BLM/'
+topSequence.BLMHitAnalysis.HistPath='/HitAnalysis/BLM/'
+
 topSequence += TRTHitAnalysis('TRTHitAnalysis')
+topSequence.TRTHitAnalysis.NtupleFileName='/HitAnalysis/TRT/'
+topSequence.TRTHitAnalysis.HistPath='/HitAnalysis/TRT/'
+
 topSequence += RPCHitAnalysis('RPCHitAnalysis')
+topSequence.RPCHitAnalysis.NtupleFileName='/HitAnalysis/RPC/'
+topSequence.RPCHitAnalysis.HistPath='/HitAnalysis/RPC/'
+
 topSequence += MDTHitAnalysis('MDTHitAnalysis')
+topSequence.MDTHitAnalysis.NtupleFileName='/HitAnalysis/MDT/'
+topSequence.MDTHitAnalysis.HistPath='/HitAnalysis/MDT/'
+
 topSequence += CSCHitAnalysis('CSCHitAnalysis')
+topSequence.CSCHitAnalysis.NtupleFileName='/HitAnalysis/CSC/'
+topSequence.CSCHitAnalysis.HistPath='/HitAnalysis/CSC/'
+
 topSequence += TGCHitAnalysis('TGCHitAnalysis')
+topSequence.TGCHitAnalysis.NtupleFileName='/HitAnalysis/TGC/'
+topSequence.TGCHitAnalysis.HistPath='/HitAnalysis/TGC/'
+
 #topSequence += ALFAHitAnalysis('ALFAHitAnalysis')
+#topSequence.ALFAHitAnalysis.NtupleFileName='/HitAnalysis/ALFA/'
+#topSequence.ALFAHitAnalysis.HistPath='/HitAnalysis/ALFA/'
+
 #topSequence += LucidHitAnalysis('LucidHitAnalysis')
+#topSequence.LucidHitAnalysis.NtupleFileName='/HitAnalysis/Lucid/'
+#topSequence.LucidHitAnalysis.HistPath='/HitAnalysis/Lucid/'
+
 #topSequence += ZDCHitAnalysis('ZDCHitAnalysis')
+#topSequence.ZDCHitAnalysis.NtupleFileName='/HitAnalysis/ZDC/'
+#topSequence.ZDCHitAnalysis.HistPath='/HitAnalysis/ZDC/'
+
 topSequence += TrackRecordAnalysis('TrackRecordAnalysis')
+topSequence.TrackRecordAnalysis.NtupleFileName='/HitAnalysis/Track/'
+topSequence.TrackRecordAnalysis.HistPath='/HitAnalysis/Track/'
+
 topSequence += TruthHitAnalysis('TruthHitAnalysis')
-topSequence += CaloHitAnalysis('CaloHitAnalysis')
+topSequence.TruthHitAnalysis.NtupleFileName = '/HitAnalysis/Truth/' 
+topSequence.TruthHitAnalysis.HistPath = '/HitAnalysis/Truth/'
 
+topSequence += CaloHitAnalysis('CaloHitAnalysis')
+topSequence.CaloHitAnalysis.NtupleFileName = '/HitAnalysis/Calo/' 
+topSequence.CaloHitAnalysis.HistPath = '/HitAnalysis/Calo/'
 
 
-topSequence.PixelHitAnalysis.HistPath='/HitAnalysis/Pixel/histos/'
-topSequence.SCTHitAnalysis.HistPath='/HitAnalysis/SCT/histos/'
-topSequence.BCMHitAnalysis.HistPath='/HitAnalysis/BCM/histos/'
-topSequence.BLMHitAnalysis.HistPath='/HitAnalysis/BLM/histos/'
-topSequence.TRTHitAnalysis.HistPath='/HitAnalysis/TRT/histos/'
-topSequence.RPCHitAnalysis.HistPath='/HitAnalysis/RPC/histos/'
-topSequence.MDTHitAnalysis.HistPath='/HitAnalysis/MDT/histos/'
-topSequence.CSCHitAnalysis.HistPath='/HitAnalysis/CSC/histos/'
-topSequence.TGCHitAnalysis.HistPath='/HitAnalysis/TGC/histos/'
-#topSequence.ALFAHitAnalysis.HistPath='/HitAnalysis/'
-#topSequence.LucidHitAnalysis.HistPath='/HitAnalysis/'
-#topSequence.ZDCHitAnalysis.HistPath='/HitAnalysis/'
-topSequence.TrackRecordAnalysis.HistPath='/HitAnalysis/Track/histos/'
-topSequence.TruthHitAnalysis.HistPath = '/HitAnalysis/Truth/histos/'                       
-topSequence.CaloHitAnalysis.HistPath = '/HitAnalysis/Calo/histos/'                                                                                                        
-topSequence.PixelHitAnalysis.NtupleFileName='/HitAnalysis/Pixel/ntuple/'
-topSequence.SCTHitAnalysis.NtupleFileName='/HitAnalysis/SCT/ntuple/'
-topSequence.BCMHitAnalysis.NtupleFileName='/HitAnalysis/BCM/ntuple/'
-topSequence.BLMHitAnalysis.NtupleFileName='/HitAnalysis/BLM/ntuple/'
-topSequence.TRTHitAnalysis.NtupleFileName='/HitAnalysis/TRT/ntuple/'
-topSequence.RPCHitAnalysis.NtupleFileName='/HitAnalysis/RPC/ntuple/'
-topSequence.MDTHitAnalysis.NtupleFileName='/HitAnalysis/MDT/ntuple/'
-topSequence.CSCHitAnalysis.NtupleFileName='/HitAnalysis/CSC/ntuple/'
-topSequence.TGCHitAnalysis.NtupleFileName='/HitAnalysis/TGC/ntuple/'
-#topSequence.ALFAHitAnalysis.NtupleFileName='/HitAnalysis/'
-#topSequence.LucidHitAnalysis.NtupleFileName='/HitAnalysis/'
-#topSequence.ZDCHitAnalysis.NtupleFileName='/HitAnalysis/'
-topSequence.TrackRecordAnalysis.NtupleFileName='/HitAnalysis/Track/ntuple/'
-topSequence.TruthHitAnalysis.NtupleFileName = '/HitAnalysis/Truth/ntuple/'                       
-topSequence.CaloHitAnalysis.NtupleFileName = '/HitAnalysis/Calo/ntuple/'                                                                                                        
-#Add some more TH2 histograms                                                                                                                                          
+#Add some more TH2 histograms
 
 
 topSequence.PixelHitAnalysis.ExpertMode= "off"
@@ -85,7 +96,6 @@ from GaudiSvc.GaudiSvcConf import THistSvc
 ServiceMgr += THistSvc()
 ServiceMgr.THistSvc.Output += ["HitAnalysis DATAFILE='AllHitAnalysis.root' OPT='RECREATE'" ]
 
-
 ServiceMgr.MessageSvc.OutputLevel = INFO
 ServiceMgr.MessageSvc.defaultLimit = 9999999
 
diff --git a/Simulation/Tools/HitAnalysis/share/CSCHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/CSCHitAnalysis_topOptions.py
index 3cc733d76a21145f721bd06370c054a5b4ca8ce1..dd817a4ea6ea792796d5315c6a1636c71619b204 100755
--- a/Simulation/Tools/HitAnalysis/share/CSCHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/CSCHitAnalysis_topOptions.py
@@ -1,16 +1,16 @@
-q#from AthenaCommon.AppMgr import ToolSvc
+#from AthenaCommon.AppMgr import ToolSvc
 from AthenaCommon.AppMgr import ServiceMgr
 import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -19,6 +19,7 @@ topSequence = AlgSequence()
 from HitAnalysis.HitAnalysisConf import CSCHitAnalysis
 topSequence += CSCHitAnalysis() 
 CSCHitAnalysis = CSCHitAnalysis()
+CSCHitAnalysis.NtupleFileName = '/CSCHitAnalysis/'
 CSCHitAnalysis.HistPath = '/CSCHitAnalysis/'
 
 from GaudiSvc.GaudiSvcConf import THistSvc
@@ -40,4 +41,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/CaloHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/CaloHitAnalysis_topOptions.py
index 95306b508b4560a8e68ed3738c9a6459dc8a4ba3..d3b16e0b037577228c68ffbec3f70ce1745d4133 100755
--- a/Simulation/Tools/HitAnalysis/share/CaloHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/CaloHitAnalysis_topOptions.py
@@ -4,23 +4,24 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-#include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
 from HitAnalysis.HitAnalysisConf import CaloHitAnalysis
+topSequence += CaloHitAnalysis()
 CaloHitAnalysis = CaloHitAnalysis()
-topSequence += CaloHitAnalysis
-CaloHitAnalysis.HistPath = '/CaloHitAnalysis/histos/'
-CaloHitAnalysis.NtupleFileName = '/CaloHitAnalysis/ntuple/'
+CaloHitAnalysis.NtupleFileName = '/CaloHitAnalysis/'
+CaloHitAnalysis.HistPath = '/CaloHitAnalysis/'
+
 #ExpertMode adds more histograms to the output. Default mode is off
 CaloHitAnalysis.ExpertMode = "off"
 #CalibHits adds Calibrated hits histograms to the output. Default mode is off
@@ -30,7 +31,6 @@ from GaudiSvc.GaudiSvcConf import THistSvc
 ServiceMgr += THistSvc()
 ServiceMgr.THistSvc.Output += ["CaloHitAnalysis DATAFILE='CaloHitAnalysis.root' OPT='RECREATE'" ]
 
-
 ServiceMgr.MessageSvc.OutputLevel = INFO
 ServiceMgr.MessageSvc.defaultLimit = 9999999
 
@@ -46,4 +46,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include( "TrkDetDescrSvc/AtlasTrackingGeometrySvc.py" ) # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/HitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/HitAnalysis_topOptions.py
index 2719aae9383ac07bcffb4fe2bfe496fb8db01a3a..ecece8910f816a82e74668a41431b8bd0c12dbc3 100755
--- a/Simulation/Tools/HitAnalysis/share/HitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/HitAnalysis_topOptions.py
@@ -1,56 +1,73 @@
 #from AthenaCommon.AppMgr import ToolSvc
-#from AthenaCommon.AppMgr import ServiceMgr
-#import AthenaPoolCnvSvc.ReadAthenaPool
+from AthenaCommon.AppMgr import ServiceMgr
+import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
+
+#import os
+#from glob import glob
+#from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
+#athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
+#ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput()
 
-import os
-from glob import glob
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
-from HitAnalysis.HitAnalysisConf import *
 
+
+from HitAnalysis.HitAnalysisConf import *
 topSequence += SiHitAnalysis('PixelHitAnalysis')
-topSequence.PixelHitAnalysis.CollectionName='PixelHits'
+topSequence.PixelHitAnalysis.CollectionName = 'PixelHits'
+topSequence.PixelHitAnalysis.HistPath = '/HitAnalysis/Pixel/'
+
 topSequence += SiHitAnalysis('SCTHitAnalysis')
-topSequence.SCTHitAnalysis.CollectionName='SCT_Hits'
+topSequence.SCTHitAnalysis.CollectionName = 'SCT_Hits'
+topSequence.SCTHitAnalysis.HistPath = '/HitAnalysis/SCT/'
+
 topSequence += SiHitAnalysis('BCMHitAnalysis')
-topSequence.BCMHitAnalysis.CollectionName='BCMHits'
+topSequence.BCMHitAnalysis.CollectionName = 'BCMHits'
+topSequence.BCMHitAnalysis.HistPath = '/HitAnalysis/BCM/'
+
 topSequence += SiHitAnalysis('BLMHitAnalysis')
-topSequence.BLMHitAnalysis.CollectionName='BLMHits'
+topSequence.BLMHitAnalysis.CollectionName = 'BLMHits'
+topSequence.BLMHitAnalysis.HistPath = '/HitAnalysis/BLM/'
+
 topSequence += TRTHitAnalysis('TRTHitAnalysis')
+topSequence.TRTHitAnalysis.HistPath = '/HitAnalysis/TRT/'
+
 topSequence += RPCHitAnalysis('RPCHitAnalysis')
+topSequence.RPCHitAnalysis.HistPath = '/HitAnalysis/RPC/'
+
 topSequence += MDTHitAnalysis('MDTHitAnalysis')
+topSequence.MDTHitAnalysis.HistPath = '/HitAnalysis/MDT/'
+
 topSequence += CSCHitAnalysis('CSCHitAnalysis')
+topSequence.CSCHitAnalysis.HistPath = '/HitAnalysis/CSC/'
+
 topSequence += TGCHitAnalysis('TGCHitAnalysis')
+topSequence.TGCHitAnalysis.HistPath = '/HitAnalysis/TGC/'
+
 #topSequence += ALFAHitAnalysis('ALFAHitAnalysis')
+#topSequence.ALFAHitAnalysis.HistPath = '/HitAnalysis/ALFA/'
+
 #topSequence += LucidHitAnalysis('LucidHitAnalysis')
+#topSequence.LucidHitAnalysis.HistPath = '/HitAnalysis/Lucid/'
+
 #topSequence += ZDCHitAnalysis('ZDCHitAnalysis')
-topSequence += TrackRecordAnalysis('TrackRecordAnalysis')
-topSequence += TruthHitAnalysis('TruthHitAnalysis')
-topSequence += CaloHitAnalysis('CaloHitAnalysis')
+#topSequence.ZDCHitAnalysis.HistPath = '/HitAnalysis/ZDC/'
 
+topSequence += TrackRecordAnalysis('TrackRecordAnalysis')
+topSequence.TrackRecordAnalysis.HistPath = '/HitAnalysis/Track/'
 
+topSequence += TruthHitAnalysis('TruthHitAnalysis')
+topSequence.TruthHitAnalysis.HistPath = '/HitAnalysis/Truth/'
 
-topSequence.PixelHitAnalysis.HistPath='/HitAnalysis/'
-topSequence.SCTHitAnalysis.HistPath='/HitAnalysis/'
-topSequence.BCMHitAnalysis.HistPath='/HitAnalysis/'
-topSequence.BLMHitAnalysis.HistPath='/HitAnalysis/'
-topSequence.TRTHitAnalysis.HistPath='/HitAnalysis/'
-topSequence.RPCHitAnalysis.HistPath='/HitAnalysis/'
-topSequence.MDTHitAnalysis.HistPath='/HitAnalysis/'
-topSequence.CSCHitAnalysis.HistPath='/HitAnalysis/'
-topSequence.TGCHitAnalysis.HistPath='/HitAnalysis/'
-#topSequence.ALFAHitAnalysis.HistPath='/HitAnalysis/'
-#topSequence.LucidHitAnalysis.HistPath='/HitAnalysis/'
-#topSequence.ZDCHitAnalysis.HistPath='/HitAnalysis/'
-topSequence.TrackRecordAnalysis.HistPath='/HitAnalysis/'
-topSequence.TruthHitAnalysis.HistPath = '/HitAnalysis/'                       
-topSequence.CaloHitAnalysis.HistPath = '/HitAnalysis/'                                                                                                        
-#Add some more TH2 histograms                                                                                                                                          
+topSequence += CaloHitAnalysis('CaloHitAnalysis')
+topSequence.CaloHitAnalysis.HistPath = '/HitAnalysis/Calo'           
+                                                                                                     
+#Add some more TH2 histograms
 
 
 topSequence.PixelHitAnalysis.ExpertMode= "off"
@@ -60,10 +77,6 @@ topSequence.BLMHitAnalysis.ExpertMode= "off"
 topSequence.CaloHitAnalysis.ExpertMode = "off"
 topSequence.CaloHitAnalysis.CalibHits = "off" 
 
-#from GaudiSvc.GaudiSvcConf import THistSvc
-#ServiceMgr += THistSvc()
-#ServiceMgr.THistSvc.Output += ["CaloHitAnalysis DATAFILE='CaloHitAnalysis_v2.root' OPT='RECREATE'" ]
-
 
 ServiceMgr.MessageSvc.OutputLevel = INFO
 ServiceMgr.MessageSvc.defaultLimit = 9999999
@@ -80,4 +93,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include( "TrkDetDescrSvc/AtlasTrackingGeometrySvc.py" ) # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/LucidHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/LucidHitAnalysis_topOptions.py
index b4404d517df75c2370517461d5c8b9b189b22fb9..0255deadc37b0653458fecd968f2b08a6be9427c 100755
--- a/Simulation/Tools/HitAnalysis/share/LucidHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/LucidHitAnalysis_topOptions.py
@@ -4,13 +4,13 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -19,6 +19,7 @@ topSequence = AlgSequence()
 from HitAnalysis.HitAnalysisConf import LucidHitAnalysis
 topSequence += LucidHitAnalysis() 
 LucidHitAnalysis = LucidHitAnalysis()
+LucidHitAnalysis.NtupleFileName = '/LucidHitAnalysis/'
 LucidHitAnalysis.HistPath = '/LucidHitAnalysis/'
 
 from GaudiSvc.GaudiSvcConf import THistSvc
@@ -40,4 +41,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/MDTHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/MDTHitAnalysis_topOptions.py
index 8cac6fc0153a0037b429515aef9e68ce77ff7977..f29cb9b63d5d4867acf9e183c38e3ddcc776e38a 100755
--- a/Simulation/Tools/HitAnalysis/share/MDTHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/MDTHitAnalysis_topOptions.py
@@ -4,13 +4,13 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -19,7 +19,8 @@ topSequence = AlgSequence()
 from HitAnalysis.HitAnalysisConf import MDTHitAnalysis
 topSequence += MDTHitAnalysis() 
 MDTHitAnalysis = MDTHitAnalysis()
-MDTHitAnalysis.NtupleFileName = 'MDTHitAnalysis'
+MDTHitAnalysis.NtupleFileName = '/MDTHitAnalysis/'
+MDTHitAnalysis.HistPath = '/MDTHitAnalysis/'
 
 from GaudiSvc.GaudiSvcConf import THistSvc
 ServiceMgr += THistSvc()
@@ -40,4 +41,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/MuonHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/MuonHitAnalysis_topOptions.py
index 1d887bb4d46208b112e8ac80ab6265457a4b1bb5..cc465ff0c4626c926e4070f85fb41c067b0b7a56 100755
--- a/Simulation/Tools/HitAnalysis/share/MuonHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/MuonHitAnalysis_topOptions.py
@@ -4,30 +4,39 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
+
 from HitAnalysis.HitAnalysisConf import RPCHitAnalysis
-topSequence += RPCHitAnalysis('RPCHitAnalysis') 
-topSequence.RPCHitAnalysis.HistPath = '/MuonHitAnalysis/'
+topSequence += RPCHitAnalysis('RPCHitAnalysis')
+topSequence.RPCHitAnalysis.NtupleFileName = '/MuonHitAnalysis/RPC/'
+topSequence.RPCHitAnalysis.HistPath = '/MuonHitAnalysis/RPC/'
+
 from HitAnalysis.HitAnalysisConf import MDTHitAnalysis
-topSequence += MDTHitAnalysis('MDTHitAnalysis') 
-topSequence.MDTHitAnalysis.HistPath = '/MuonHitAnalysis/'
+topSequence += MDTHitAnalysis('MDTHitAnalysis')
+topSequence.MDTHitAnalysis.NtupleFileName = '/MuonHitAnalysis/MDT/'
+topSequence.MDTHitAnalysis.HistPath = '/MuonHitAnalysis/MDT/'
+
 from HitAnalysis.HitAnalysisConf import CSCHitAnalysis
-topSequence += CSCHitAnalysis('CSCHitAnalysis') 
-topSequence.CSCHitAnalysis.HistPath = '/MuonHitAnalysis/'
+topSequence += CSCHitAnalysis('CSCHitAnalysis')
+topSequence.CSCHitAnalysis.NtupleFileName = '/MuonHitAnalysis/CSC/'
+topSequence.CSCHitAnalysis.HistPath = '/MuonHitAnalysis/CSC/'
+
 from HitAnalysis.HitAnalysisConf import TGCHitAnalysis
-topSequence += TGCHitAnalysis('TGCHitAnalysis') 
-topSequence.TGCHitAnalysis.HistPath = '/MuonHitAnalysis/'
+topSequence += TGCHitAnalysis('TGCHitAnalysis')
+topSequence.TGCHitAnalysis.NtupleFileName = '/MuonHitAnalysis/TGC/'
+topSequence.TGCHitAnalysis.HistPath = '/MuonHitAnalysis/TGC/'
+
 
 from GaudiSvc.GaudiSvcConf import THistSvc
 ServiceMgr += THistSvc()
@@ -48,4 +57,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/RPCHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/RPCHitAnalysis_topOptions.py
index 17160c375da896c878b09f565799b6ccea8f3ac1..3f5d19055403fc052bca9352ac94f1bda6202446 100755
--- a/Simulation/Tools/HitAnalysis/share/RPCHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/RPCHitAnalysis_topOptions.py
@@ -4,13 +4,13 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -19,7 +19,8 @@ topSequence = AlgSequence()
 from HitAnalysis.HitAnalysisConf import RPCHitAnalysis
 topSequence += RPCHitAnalysis() 
 RPCHitAnalysis = RPCHitAnalysis()
-RPCHitAnalysis.NtupleFileName = 'RPCHitAnalysis'
+RPCHitAnalysis.NtupleFileName = '/RPCHitAnalysis/'
+RPCHitAnalysis.HistPath = '/RPCHitAnalysis/'
 
 from GaudiSvc.GaudiSvcConf import THistSvc
 ServiceMgr += THistSvc()
@@ -40,4 +41,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/SiHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/SiHitAnalysis_topOptions.py
index e274b8fb193a21712ce067a50f7577251a529a34..0d71eb7c54700a66f9160c5734f171fb04fe3417 100755
--- a/Simulation/Tools/HitAnalysis/share/SiHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/SiHitAnalysis_topOptions.py
@@ -4,37 +4,39 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
+
 from HitAnalysis.HitAnalysisConf import SiHitAnalysis
 topSequence += SiHitAnalysis('PixelHitAnalysis') 
 topSequence.PixelHitAnalysis.CollectionName='PixelHits'
+topSequence.PixelHitAnalysis.NtupleFileName='/SiHitAnalysis/'
+topSequence.PixelHitAnalysis.HistPath='/SiHitAnalysis/'
+
 topSequence += SiHitAnalysis('SCTHitAnalysis')
 topSequence.SCTHitAnalysis.CollectionName='SCT_Hits'
+topSequence.SCTHitAnalysis.NtupleFileName='/SiHitAnalysis/'
+topSequence.SCTHitAnalysis.HistPath='/SiHitAnalysis/'
+
 topSequence += SiHitAnalysis('BCMHitAnalysis')
 topSequence.BCMHitAnalysis.CollectionName='BCMHits'
+topSequence.BCMHitAnalysis.NtupleFileName='/SiHitAnalysis/'
+topSequence.BCMHitAnalysis.HistPath='/SiHitAnalysis/'
+
 topSequence += SiHitAnalysis('BLMHitAnalysis')
 topSequence.BLMHitAnalysis.CollectionName='BLMHits'
-
-topSequence.PixelHitAnalysis.HistPath='/SiHitAnalysis/histos/'
-topSequence.SCTHitAnalysis.HistPath='/SiHitAnalysis/histos/'
-topSequence.BCMHitAnalysis.HistPath='/SiHitAnalysis/histos/'
-topSequence.BLMHitAnalysis.HistPath='/SiHitAnalysis/histos/'
-
-topSequence.PixelHitAnalysis.NtupleFileName='/SiHitAnalysis/ntuples/'
-topSequence.SCTHitAnalysis.NtupleFileName='/SiHitAnalysis/ntuples/'
-topSequence.BCMHitAnalysis.NtupleFileName='/SiHitAnalysis/ntuples/'
-topSequence.BLMHitAnalysis.NtupleFileName='/SiHitAnalysis/ntuples/'
+topSequence.BLMHitAnalysis.NtupleFileName='/SiHitAnalysis/'
+topSequence.BLMHitAnalysis.HistPath='/SiHitAnalysis/'
 
 
 #Add some more TH2 histograms
@@ -62,4 +64,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include( "TrkDetDescrSvc/AtlasTrackingGeometrySvc.py" ) # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/TGCHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/TGCHitAnalysis_topOptions.py
index ec86239c82d51d66d7391370a48fd040bb55f902..d5a7d70e879aa346d5533c752ec482c8bebab97c 100755
--- a/Simulation/Tools/HitAnalysis/share/TGCHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/TGCHitAnalysis_topOptions.py
@@ -4,13 +4,13 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -19,6 +19,7 @@ topSequence = AlgSequence()
 from HitAnalysis.HitAnalysisConf import TGCHitAnalysis
 topSequence += TGCHitAnalysis() 
 TGCHitAnalysis = TGCHitAnalysis()
+TGCHitAnalysis.NtupleFileName = '/TGCHitAnalysis/'
 TGCHitAnalysis.HistPath = '/TGCHitAnalysis/'
 
 from GaudiSvc.GaudiSvcConf import THistSvc
@@ -40,4 +41,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/TRTHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/TRTHitAnalysis_topOptions.py
index 799b65c1b5a9d0bb709b2c1f0ff9ed0b89c4d956..157d3fc1c48251276050ed7b39cf256ee1d231f3 100755
--- a/Simulation/Tools/HitAnalysis/share/TRTHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/TRTHitAnalysis_topOptions.py
@@ -4,13 +4,13 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -19,6 +19,7 @@ topSequence = AlgSequence()
 from HitAnalysis.HitAnalysisConf import TRTHitAnalysis
 topSequence += TRTHitAnalysis() 
 TRTHitAnalysis = TRTHitAnalysis()
+TRTHitAnalysis.NtupleFileName = '/TRTHitAnalysis/'
 TRTHitAnalysis.HistPath = '/TRTHitAnalysis/'
 
 from GaudiSvc.GaudiSvcConf import THistSvc
@@ -40,4 +41,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include( "TrkDetDescrSvc/AtlasTrackingGeometrySvc.py" ) # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/TrackRecordAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/TrackRecordAnalysis_topOptions.py
index eb6c8b3d313cbd161f5cb9e6616ad9dbf7b9152e..d4deea7d5d31c393b0a9ec7c2f862bb5e0e8115d 100755
--- a/Simulation/Tools/HitAnalysis/share/TrackRecordAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/TrackRecordAnalysis_topOptions.py
@@ -4,29 +4,34 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*.root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
+
 from HitAnalysis.HitAnalysisConf import TrackRecordAnalysis
 topSequence += TrackRecordAnalysis('TrackRecordCaloEntry') 
-topSequence.TrackRecordCaloEntry.CollectionName='CaloEntryLayer'
-topSequence.TrackRecordCaloEntry.HistPath='/TrackRecordAnalysis/'
+topSequence.TrackRecordCaloEntry.CollectionName = 'CaloEntryLayer'
+topSequence.TrackRecordCaloEntry.NtupleFileName = '/TrackRecordAnalysis/'
+topSequence.TrackRecordCaloEntry.HistPath = '/TrackRecordAnalysis/'
+
 topSequence += TrackRecordAnalysis('TrackRecordMuonEntry') 
-topSequence.TrackRecordMuonEntry.CollectionName='MuonEntryLayer'
-topSequence.TrackRecordMuonEntry.HistPath='/TrackRecordAnalysis/'
-topSequence += TrackRecordAnalysis('TrackRecordMuonExit') 
-topSequence.TrackRecordMuonExit.CollectionName='MuonExitLayer'
-topSequence.TrackRecordMuonExit.HistPath='/TrackRecordAnalysis/'
+topSequence.TrackRecordMuonEntry.CollectionName = 'MuonEntryLayer'
+topSequence.TrackRecordMuonEntry.NtupleFileName = '/TrackRecordAnalysis/'
+topSequence.TrackRecordMuonEntry.HistPath = '/TrackRecordAnalysis/'
 
+topSequence += TrackRecordAnalysis('TrackRecordMuonExit') 
+topSequence.TrackRecordMuonExit.CollectionName = 'MuonExitLayer'
+topSequence.TrackRecordMuonExit.NtupleFileName = '/TrackRecordAnalysis/'
+topSequence.TrackRecordMuonExit.HistPath = '/TrackRecordAnalysis/'
 
 
 from GaudiSvc.GaudiSvcConf import THistSvc
@@ -48,4 +53,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/TruthHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/TruthHitAnalysis_topOptions.py
index 8a872418ae88dfc76cde9daed85f38f7a64b0ffd..3299fb3dc509a2bea610cb1086efa076bee6205b 100755
--- a/Simulation/Tools/HitAnalysis/share/TruthHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/TruthHitAnalysis_topOptions.py
@@ -4,13 +4,13 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" )
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" + "HITS*root*" )
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -19,6 +19,7 @@ topSequence = AlgSequence()
 from HitAnalysis.HitAnalysisConf import TruthHitAnalysis
 topSequence += TruthHitAnalysis() 
 TruthHitAnalysis = TruthHitAnalysis()
+TruthHitAnalysis.NtupleFileName = '/TruthHitAnalysis/'
 TruthHitAnalysis.HistPath = '/TruthHitAnalysis/'
 
 from GaudiSvc.GaudiSvcConf import THistSvc
@@ -40,4 +41,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/share/ZDCHitAnalysis_topOptions.py b/Simulation/Tools/HitAnalysis/share/ZDCHitAnalysis_topOptions.py
index 5e0ef00009e0d667a5008bb3fb4e165867b3074c..02da3c262fb44fcfc5f82b657ce623b71bdf074b 100755
--- a/Simulation/Tools/HitAnalysis/share/ZDCHitAnalysis_topOptions.py
+++ b/Simulation/Tools/HitAnalysis/share/ZDCHitAnalysis_topOptions.py
@@ -4,13 +4,13 @@ import AthenaPoolCnvSvc.ReadAthenaPool
 
 from PartPropSvc.PartPropSvcConf import PartPropSvc
 
-include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
-include( "EventAthenaPool/EventAthenaPool_joboptions.py" )
+include("ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py")
+include("EventAthenaPool/EventAthenaPool_joboptions.py" )
 
 import os
 from glob import glob
 from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput = glob( "/tmp/"+os.environ['USER']+"HITS*root*" ) 
+athenaCommonFlags.FilesInput = glob( "/tmp/" + os.environ['USER'] + "/" +"HITS*root*" ) 
 ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput() # This is stupid and redundant, but necessary
 
 from AthenaCommon.AlgSequence import AlgSequence
@@ -19,6 +19,7 @@ topSequence = AlgSequence()
 from HitAnalysis.HitAnalysisConf import ZDCHitAnalysis
 topSequence += ZDCHitAnalysis() 
 ZDCHitAnalysis = ZDCHitAnalysis()
+ZDCHitAnalysis.NtupleFileName = '/ZDCHitAnalysis/'
 ZDCHitAnalysis.HistPath = '/ZDCHitAnalysis/'
 
 from GaudiSvc.GaudiSvcConf import THistSvc
@@ -40,4 +41,3 @@ from RecExConfig.AutoConfiguration import *
 ConfigureFieldAndGeo() # Configure the settings for the geometry
 include("RecExCond/AllDet_detDescr.py") # Actually load the geometry
 #include("TrkDetDescrSvc/AtlasTrackingGeometrySvc.py") # Tracking geometry, handy for ID work
-
diff --git a/Simulation/Tools/HitAnalysis/src/AFPHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/AFPHitAnalysis.cxx
index 8e2dac96fca9f38ba29c7886299275fd21f7447c..e689e089ed58ce7fb12c7c5202ec310a43e5f404 100755
--- a/Simulation/Tools/HitAnalysis/src/AFPHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/AFPHitAnalysis.cxx
@@ -7,12 +7,10 @@
 #include "AFP_SimEv/AFP_SIDSimHit.h"
 #include "AFP_SimEv/AFP_SIDSimHitCollection.h"
 
-
 #include "TH1.h"
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -34,21 +32,34 @@ AFPHitAnalysis::AFPHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator
    , h_detID(0)
    , h_pixelRow(0)
    , h_pixelCol(0)
+   , m_hitID(0)
+   , m_pdgID(0)
+   , m_trackID(0)
+   , m_kine(0)
+   , m_edep(0)
+   , m_stepX(0)
+   , m_stepY(0)
+   , m_stepZ(0)
+   , m_time(0)
+   , m_stationID(0)
+   , m_detID(0)
+   , m_pixelRow(0)
+   , m_pixelCol(0)
    , m_tree(0)
-   , m_ntupleFileName("/AFPHitAnalysis/ntuples/")
-   , m_path("/AFPHitAnalysis/histos/")
+   , m_ntupleFileName("/AFPHitAnalysis/")
+   , m_path("/AFPHitAnalysis/")
    , m_thistSvc("THistSvc", name)
 {
-  declareProperty("HistPath", m_path); 
-  declareProperty("NtupleFileName", m_ntupleFileName); 
+  declareProperty("NtupleFileName", m_ntupleFileName);
+  declareProperty("HistPath", m_path);
 }
 
+
 StatusCode AFPHitAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing AFPHitAnalysis" );
 
   // Grab the Ntuple and histogramming service for the tree
   CHECK(m_thistSvc.retrieve());
- 
 
   /** now define the histograms**/
   h_hitID = new TH1D("h_hitID", "hitID",100, 0., 100.);
@@ -95,15 +106,14 @@ StatusCode AFPHitAnalysis::initialize() {
   h_pixelRow->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path+h_pixelRow->GetName(), h_pixelRow));
 
-
   h_pixelCol =  new TH1D("h_pixelCol", "pixelCol", 20, 0,20);
   h_pixelCol->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path+h_pixelCol->GetName(), h_pixelCol));
   
   /** now add branches and leaves to the tree */
-    m_tree= new TTree("NtupleAFPHitAnanalysis","AFPHitAna");
-    std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
-    CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
+  m_tree = new TTree("AFP","AFP");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/";
+  CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
 
   if (m_tree){
     m_tree->Branch("hitID", &m_hitID);
@@ -117,16 +127,16 @@ StatusCode AFPHitAnalysis::initialize() {
     m_tree->Branch("stationID", &m_stationID);
     m_tree->Branch("detID", &m_detID);
     m_tree->Branch("pixelRow", &m_pixelRow);
-    m_tree->Branch("pixelCol", &m_pixelCol);
-    
-    
-  }else{
+    m_tree->Branch("pixelCol", &m_pixelCol);  
+  }
+  else {
     ATH_MSG_ERROR("No tree found!");
   }
+
+  ATH_MSG_INFO("Exiting AFPHitAnalysis::initialize()");
   
   return StatusCode::SUCCESS;
 }		 
-
   
 
 StatusCode AFPHitAnalysis::execute() {
@@ -146,10 +156,15 @@ StatusCode AFPHitAnalysis::execute() {
   m_pixelRow->clear();
   m_pixelCol->clear();
 
+  ATH_MSG_INFO( "AFPHitAnalysis tree branches cleared" );
+
   AFP_SIDSimHitConstIter hi;
   const DataHandle<AFP_SIDSimHitCollection> iter;
-  CHECK(evtStore()->retrieve(iter,"AFP_SIDSimHitCollection"));
-  for(hi=(*iter).begin(); hi != (*iter).end();++hi){
+  CHECK( evtStore()->retrieve(iter,"AFP_SIDSimHitCollection") );
+
+  ATH_MSG_DEBUG( "AFP_SIDSSimHitCollection retrieved" );
+  
+  for ( hi=(*iter).begin(); hi != (*iter).end(); ++hi ) {
     AFP_SIDSimHit ghit(*hi);
     h_hitID->Fill(ghit.m_nHitID);
     h_pdgID->Fill(ghit.m_nParticleEncoding);
@@ -165,7 +180,6 @@ StatusCode AFPHitAnalysis::execute() {
     h_pixelRow->Fill(ghit.m_nPixelRow);
     h_pixelCol->Fill(ghit.m_nPixelCol);
 
-
     m_hitID->push_back(ghit.m_nHitID);
     m_pdgID->push_back(ghit.m_nParticleEncoding);
     m_trackID->push_back(ghit.m_nTrackID);
@@ -182,5 +196,6 @@ StatusCode AFPHitAnalysis::execute() {
   }
    
   if (m_tree) m_tree->Fill();
+  
   return StatusCode::SUCCESS;
 }
diff --git a/Simulation/Tools/HitAnalysis/src/AFPHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/AFPHitAnalysis.h
index 7dfd58e0e680fd1f5f66404d7b06b290852ce774..63f4d61983ff49b7c6bade5f51127983d77eb797 100755
--- a/Simulation/Tools/HitAnalysis/src/AFPHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/AFPHitAnalysis.h
@@ -15,10 +15,10 @@
 #include "TH1.h"
 #include "TTree.h"
 
-
 class TH1;
 class TTree;
- 
+
+
 class AFPHitAnalysis : public AthAlgorithm {
 
  public:
@@ -59,6 +59,7 @@ class AFPHitAnalysis : public AthAlgorithm {
    std::vector<int>*   m_detID;
    std::vector<int>*   m_pixelRow;
    std::vector<int>*   m_pixelCol;
+   
    TTree * m_tree;
    std::string m_ntupleFileName;
    std::string m_path; 
@@ -67,4 +68,3 @@ class AFPHitAnalysis : public AthAlgorithm {
 };
 
 #endif // AFP_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/ALFAHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/ALFAHitAnalysis.cxx
index b1074bce7cd5d450b89eae56ecb73011be75cf41..049933ff3d7b45c190b6371d4a62a95656e5fa19 100644
--- a/Simulation/Tools/HitAnalysis/src/ALFAHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/ALFAHitAnalysis.cxx
@@ -11,7 +11,6 @@
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -24,81 +23,76 @@ ALFAHitAnalysis::ALFAHitAnalysis(const std::string& name, ISvcLocator* pSvcLocat
    , m_fiber(0)
    , m_sign(0)
    , m_energy(0)
+     
    , m_tree(0)
-   , m_ntupleFileName("/ALFAHitsAnalysis/ntuples/")
-   , m_path("/ALFAHitsAnalysis/histos")
+   , m_ntupleFileName("/ALFAHitsAnalysis/")
+   , m_path("/ALFAHitsAnalysis/")
    , m_thistSvc("THistSvc", name)
 { 
-  for(int i(0); i<8; i++){
+  for (int i(0); i<8; i++) {
     h_E_full_sum_h[i]=0;
     h_E_layer_sum_h[i]=0;
     h_hit_layer[i]=0;
     h_hit_fiber[i]=0;
-
   }
   declareProperty("NtupleFileName", m_ntupleFileName);    
   declareProperty("HistPath", m_path); 
 }
 
+
 StatusCode ALFAHitAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing ALFAHitAnalysis" );
 
-
   // Grab the Ntuple and histogramming service for the tree
   CHECK(m_thistSvc.retrieve());
  
-
-
   /** now add branches and leaves to the tree */
   std::stringstream s;
-  for(unsigned int j=0; j<8;j++){
+  for (unsigned int j=0; j<8; j++) {
     s.str("");
-    s <<"edep_in_det_no."<< j+1;
+    s << "edep_in_det_no." << j+1;
     float Emax = 5;
-    if(j==3) Emax=150;
-    h_E_full_sum_h[j] = new TH1D(s.str().c_str(),s.str().c_str(), 100,0,Emax);
+    if (j==3) Emax = 150;
+    h_E_full_sum_h[j] = new TH1D(s.str().c_str(), s.str().c_str(), 100, 0, Emax);
     h_E_full_sum_h[j]->StatOverflows();
-    CHECK(m_thistSvc->regHist(m_path+h_E_full_sum_h[j]->GetName(), h_E_full_sum_h[j]));
+    CHECK( m_thistSvc->regHist( m_path + h_E_full_sum_h[j]->GetName(), h_E_full_sum_h[j] ) );
 
     s.str("");
-    s <<"edep_per_layer_det_no."<< j+1;
-    h_E_layer_sum_h[j] = new TH1D(s.str().c_str(),s.str().c_str(), 100,0,15);
+    s << "edep_per_layer_det_no." << j+1;
+    h_E_layer_sum_h[j] = new TH1D(s.str().c_str(), s.str().c_str(), 100, 0, 15);
     h_E_layer_sum_h[j]->StatOverflows();
-    CHECK(m_thistSvc->regHist(m_path+h_E_layer_sum_h[j]->GetName(), h_E_layer_sum_h[j]));
+    CHECK( m_thistSvc->regHist( m_path + h_E_layer_sum_h[j]->GetName(), h_E_layer_sum_h[j] ) );
 
     s.str("");
-    s <<"hit_layer_det_no."<< j+1;
-    h_hit_layer[j] = new TH1D(s.str().c_str(),s.str().c_str(),50,0,50);
+    s << "hit_layer_det_no." << j+1;
+    h_hit_layer[j] = new TH1D(s.str().c_str(), s.str().c_str(), 50, 0, 50);
     h_hit_layer[j]->StatOverflows();
-    CHECK(m_thistSvc->regHist(m_path+h_hit_layer[j]->GetName(), h_hit_layer[j]));
+    CHECK( m_thistSvc->regHist( m_path + h_hit_layer[j]->GetName(), h_hit_layer[j] ) );
 
     s.str("");
-    s <<"hit_fiber_det_no."<< j+1;
-    h_hit_fiber[j] = new TH1D(s.str().c_str(),s.str().c_str(),100,0,60);
+    s << "hit_fiber_det_no." << j+1;
+    h_hit_fiber[j] = new TH1D(s.str().c_str(), s.str().c_str(), 100, 0, 60);
     h_hit_fiber[j]->StatOverflows();
-    CHECK(m_thistSvc->regHist(m_path+h_hit_fiber[j]->GetName(), h_hit_fiber[j]));
-    
-    }
+    CHECK( m_thistSvc->regHist( m_path + h_hit_fiber[j]->GetName(), h_hit_fiber[j] ) );
+  }
 
-  m_tree= new TTree("NtupleALFAHitAnalysis", "ALFAHitAna");
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
+  m_tree = new TTree("ALFA", "ALFA");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/" ;
   CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
   
-  
-  
-  /** now add branches and leaves to the tree */
-  if (m_tree){
+  if (m_tree) {
       m_tree->Branch("station", &m_station);
       m_tree->Branch("plate", &m_plate);
       m_tree->Branch("fiber", &m_fiber);
       m_tree->Branch("energy", &m_energy);
-  }else{
+  }
+  else {
     ATH_MSG_ERROR("No tree found!");
   }
+  
   return StatusCode::SUCCESS;
 }		 
 
-  
 
 StatusCode ALFAHitAnalysis::execute() {
   ATH_MSG_DEBUG( "In ALFAHitAnalysis::execute()" );
@@ -110,15 +104,15 @@ StatusCode ALFAHitAnalysis::execute() {
   m_energy->clear();
 
   //cleaning
-  int fiber,plate,sign,station;
+  int fiber, plate, sign, station;
   double E_fiber_sum[8][10][64][2], E_full_sum[8], E_layer_sum[8][20];
-  for (int l= 0;l<8;l++){
+  for (int l= 0; l<8; l++) {
     E_full_sum[l] = 0.;           
-    for ( int i = 0; i < 10; i++ ){
+    for (int i = 0; i < 10; i++) {
       E_layer_sum[l][i] = 0.;
-      E_layer_sum[l][i+10] = 0.;	                       
-      for ( int j = 0; j < 64;  j++ ){
-	for ( int k = 0; k < 2; k++ ){
+      E_layer_sum[l][i+10] = 0.;
+      for (int j = 0; j < 64; j++) {
+	for (int k = 0; k < 2; k++) {
 	  E_fiber_sum[l][i][j][k] = 0.;
 	}
       }
@@ -127,28 +121,28 @@ StatusCode ALFAHitAnalysis::execute() {
   
   ALFA_HitConstIter iter;
   const DataHandle<ALFA_HitCollection> col_alfa;
-  CHECK(evtStore()->retrieve(col_alfa,"ALFA_HitCollection"));
-  for(iter=(*col_alfa).begin(); iter!=(*col_alfa).end();++iter){
+  CHECK( evtStore()->retrieve( col_alfa, "ALFA_HitCollection" ) );
+  for (iter = (*col_alfa).begin(); iter != (*col_alfa).end(); ++iter) {
     station = (*iter).GetStationNumber();
-    plate   = (*iter).GetPlateNumber();
-    fiber   = (*iter).GetFiberNumber();
-    sign    = (*iter).GetSignFiber();
-    E_fiber_sum[station-1][plate-1][fiber-1][(1-sign)/2]+=((*iter).GetEnergyDeposit());
+    plate = (*iter).GetPlateNumber();
+    fiber = (*iter).GetFiberNumber();
+    sign = (*iter).GetSignFiber();
+    E_fiber_sum[station-1][plate-1][fiber-1][(1-sign)/2] += ((*iter).GetEnergyDeposit());
 
     m_station->push_back(station);
     m_plate->push_back(plate);
     m_fiber->push_back(fiber);
     m_sign->push_back(sign);
     m_energy->push_back((*iter).GetEnergyDeposit());
-  }    // End iteration
+  } // End iteration
  
-  for(int l=0;l<8;l++){
-    for(int i=0;i<10; i++){
-      for(int j=0;j<64;j++){
-	for(int k=0;k<2;k++){
-	  E_full_sum[l]+=E_fiber_sum[l][i][j][k];
-	  E_layer_sum[l][2*i+k]+=E_fiber_sum[l][i][j][k];
-	  if(E_fiber_sum[l][i][j][k]>0.){
+  for (int l=0; l<8; l++){
+    for (int i=0; i<10; i++){
+      for (int j=0; j<64; j++){
+	for (int k=0; k<2; k++){
+	  E_full_sum[l] += E_fiber_sum[l][i][j][k];
+	  E_layer_sum[l][2*i+k] += E_fiber_sum[l][i][j][k];
+	  if (E_fiber_sum[l][i][j][k] > 0.) {
 	    h_hit_layer[l]->Fill(2*i+k+1);
 	    h_hit_fiber[l]->Fill(j+1);
 	  }
@@ -156,14 +150,14 @@ StatusCode ALFAHitAnalysis::execute() {
       }
     }
   }
-  for(int l = 0;l<8;l++){
+  for (int l=0; l<8; l++) {
     h_E_full_sum_h[l]->Fill(E_full_sum[l]);
-    for(int i = 0; i< 20;i++){
+    for (int i = 0; i< 20; i++) {
       h_E_layer_sum_h[l]->Fill(E_layer_sum[l][i]);
     }
   }
 
   if (m_tree) m_tree->Fill();
+  
   return StatusCode::SUCCESS;
 }
-
diff --git a/Simulation/Tools/HitAnalysis/src/ALFAHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/ALFAHitAnalysis.h
index 8d833d12f703fef1138de93d749e410991476558..5f27159bef44f83b13c6841b7c97cd2727c82111 100755
--- a/Simulation/Tools/HitAnalysis/src/ALFAHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/ALFAHitAnalysis.h
@@ -10,7 +10,6 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ITHistSvc.h"
 
-
 #include <string>
 #include <vector>
 #include "TH1.h"
@@ -18,7 +17,8 @@
 
 class TH1;
 class TTree;
- 
+
+
 class ALFAHitAnalysis : public AthAlgorithm {
 
  public:
@@ -31,7 +31,6 @@ class ALFAHitAnalysis : public AthAlgorithm {
 
  private:
 
-   std::string m_collection;
    /** Some variables**/
    TH1* h_E_full_sum_h[8];
    TH1* h_E_layer_sum_h[8];
@@ -43,16 +42,14 @@ class ALFAHitAnalysis : public AthAlgorithm {
    std::vector<int>* m_fiber;
    std::vector<int>* m_sign;
    std::vector<double>* m_energy;
-   
-   
+
+   std::string m_collection;
    
    TTree * m_tree;
    std::string m_ntupleFileName;   
    std::string m_path; 
    ServiceHandle<ITHistSvc>  m_thistSvc;
 
-
 };
 
 #endif // ALFA_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/CSCHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/CSCHitAnalysis.cxx
index a03e6f7fad3582a399d1a77acf02478b6fa8cbd7..a7f4d52f4491d7f8ea7772a8eb948651903f8c16 100755
--- a/Simulation/Tools/HitAnalysis/src/CSCHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/CSCHitAnalysis.cxx
@@ -16,7 +16,6 @@
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -57,21 +56,22 @@ CSCHitAnalysis::CSCHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator
    , m_hits_time(0)
    , m_hits_edep(0)
    , m_hits_kine(0)
+     
    , m_tree(0)
-   , m_ntupleFileName("/CSCHitAnalysis/ntuples/")
-   , m_path("/CSCHitAnalysis/histos/")
+   , m_ntupleFileName("/CSCHitAnalysis/")
+   , m_path("/CSCHitAnalysis/")
    , m_thistSvc("THistSvc", name)
 {
   declareProperty("NtupleFileName", m_ntupleFileName);
   declareProperty("HistPath", m_path); 
 }
 
+
 StatusCode CSCHitAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing CSCHitAnalysis" );
 
   // Grab the Ntuple and histogramming service for the tree
   CHECK(m_thistSvc.retrieve());
- 
 
   /** Histograms**/
   h_hits_x = new TH1D("h_csc_hits_x","hits_x", 100,-2000, 2000);
@@ -118,7 +118,6 @@ StatusCode CSCHitAnalysis::initialize() {
   h_hits_sz->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_hits_sz->GetName(), h_hits_sz));
 
-
   h_hits_ex = new TH1D("h_csc_hits_ex","hits_ex", 100,-10, 10);
   h_hits_ex->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_hits_ex->GetName(), h_hits_ex));
@@ -143,13 +142,11 @@ StatusCode CSCHitAnalysis::initialize() {
   h_hits_kine->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_hits_kine->GetName(), h_hits_kine));
 
-  m_tree= new TTree("NtupleCSCHitAnalysis","CSCHitAna");
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
-  CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
-  
-  
-  
   /** now add branches and leaves to the tree */
+  m_tree = new TTree("CSC", "CSC");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/";
+  CHECK(m_thistSvc->regTree(fullNtupleName, m_tree));
+  
   if (m_tree){
     m_tree->Branch("x", &m_hits_x);
     m_tree->Branch("y", &m_hits_y);
@@ -166,13 +163,14 @@ StatusCode CSCHitAnalysis::initialize() {
     m_tree->Branch("time", &m_hits_time);
     m_tree->Branch("edep", &m_hits_edep);
     m_tree->Branch("kine", &m_hits_kine);
-  }else{
+  }
+  else {
     ATH_MSG_ERROR("No tree found!");
   }
+  
   return StatusCode::SUCCESS;
-}		 
+}
 
-  
 
 StatusCode CSCHitAnalysis::execute() {
   ATH_MSG_DEBUG( "In CSCHitAnalysis::execute()" );
@@ -192,17 +190,16 @@ StatusCode CSCHitAnalysis::execute() {
   m_hits_time->clear();
   m_hits_edep->clear();
   m_hits_kine->clear();
-  
-
 
   const DataHandle<CSCSimHitCollection> csc_container;
-  if (evtStore()->retrieve(csc_container, "CSC_Hits" )==StatusCode::SUCCESS) {
-    for(CSCSimHitCollection::const_iterator i_hit = csc_container->begin(); 
-	i_hit != csc_container->end();++i_hit){
+  if (evtStore()->retrieve(csc_container, "CSC_Hits") == StatusCode::SUCCESS) {
+    for (CSCSimHitCollection::const_iterator i_hit = csc_container->begin(); 
+	i_hit != csc_container->end(); ++i_hit) {
       //CSCSimHitCollection::const_iterator i_hit;
       //for(auto i_hit : *csc_container){
       GeoCSCHit ghit(*i_hit);
-      if(!ghit) continue;
+      if (!ghit) continue;
+      
       Amg::Vector3D p = ghit.getGlobalPosition();
       h_hits_x->Fill(p.x());
       h_hits_y->Fill(p.y());
@@ -212,12 +209,12 @@ StatusCode CSCHitAnalysis::execute() {
       h_zr->Fill(p.z(), p.perp());
       h_hits_eta->Fill(p.eta());
       h_hits_phi->Fill(p.phi());
-      h_hits_sx->Fill( (*i_hit).getHitStart().x());
-      h_hits_sy->Fill( (*i_hit).getHitStart().y());
-      h_hits_sz->Fill( (*i_hit).getHitStart().z());
-      h_hits_ex->Fill( (*i_hit).getHitEnd().x());
-      h_hits_ey->Fill( (*i_hit).getHitEnd().y());
-      h_hits_ez->Fill( (*i_hit).getHitEnd().z());
+      h_hits_sx->Fill((*i_hit).getHitStart().x());
+      h_hits_sy->Fill((*i_hit).getHitStart().y());
+      h_hits_sz->Fill((*i_hit).getHitStart().z());
+      h_hits_ex->Fill((*i_hit).getHitEnd().x());
+      h_hits_ey->Fill((*i_hit).getHitEnd().y());
+      h_hits_ez->Fill((*i_hit).getHitEnd().z());
       h_hits_edep->Fill((*i_hit).energyDeposit());
       h_hits_time->Fill((*i_hit).globalTime());
       h_hits_kine->Fill((*i_hit).kineticEnergy());
@@ -228,21 +225,20 @@ StatusCode CSCHitAnalysis::execute() {
       m_hits_r->push_back(p.perp());
       m_hits_eta->push_back(p.eta());
       m_hits_phi->push_back(p.phi());
-      m_hits_start_x->push_back( (*i_hit).getHitStart().x());
-      m_hits_start_y->push_back( (*i_hit).getHitStart().y());
-      m_hits_start_z->push_back( (*i_hit).getHitStart().z());
-      m_hits_end_x->push_back( (*i_hit).getHitEnd().x());
-      m_hits_end_y->push_back( (*i_hit).getHitEnd().y());
-      m_hits_end_z->push_back( (*i_hit).getHitEnd().z());
+      m_hits_start_x->push_back((*i_hit).getHitStart().x());
+      m_hits_start_y->push_back((*i_hit).getHitStart().y());
+      m_hits_start_z->push_back((*i_hit).getHitStart().z());
+      m_hits_end_x->push_back((*i_hit).getHitEnd().x());
+      m_hits_end_y->push_back((*i_hit).getHitEnd().y());
+      m_hits_end_z->push_back((*i_hit).getHitEnd().z());
       m_hits_edep->push_back((*i_hit).energyDeposit());
       m_hits_time->push_back((*i_hit).globalTime());
-      m_hits_kine->push_back((*i_hit).kineticEnergy());
-      
+      m_hits_kine->push_back((*i_hit).kineticEnergy());    
     }
   } // End while hits
+  
   if (m_tree) m_tree->Fill();
  
-
-
   return StatusCode::SUCCESS;
+  
 }
diff --git a/Simulation/Tools/HitAnalysis/src/CSCHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/CSCHitAnalysis.h
index c85d3e63a672d986c28635058f09125ae7c9415e..c33042c6578471f6b3dc17cfc7b051b6e650106c 100755
--- a/Simulation/Tools/HitAnalysis/src/CSCHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/CSCHitAnalysis.h
@@ -16,12 +16,11 @@
 #include "TH2.h"
 #include "TTree.h"
 
-
-
 class TH1;
 class TH2;
 class TTree;
- 
+
+
 class CSCHitAnalysis : public AthAlgorithm {
 
  public:
@@ -77,4 +76,3 @@ class CSCHitAnalysis : public AthAlgorithm {
 };
 
 #endif // CSC_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/CaloHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/CaloHitAnalysis.cxx
index ae15f65605266565fcca81e86df14fb00676fe6d..9781d1ef1487c0e93a9a434fe082e98a7e1f34f0 100755
--- a/Simulation/Tools/HitAnalysis/src/CaloHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/CaloHitAnalysis.cxx
@@ -74,24 +74,25 @@ CaloHitAnalysis::CaloHitAnalysis(const std::string& name, ISvcLocator* pSvcLocat
    , m_calib_partID(0)
    , m_expert("off")
    , m_calib("off")
-   , m_thistSvc("THistSvc",name)
-   , m_path("/CaloHitAnalysis/")
-   , m_tree(0)
-   , m_ntupleFileName("/ntuples/")
    , m_tileID(0)
    , m_tileMgr(0)
+     
+   , m_tree(0)
+   , m_ntupleFileName("/CaloHitAnalysis/")
+   , m_path("/CaloHitAnalysis/")
+   , m_thistSvc("THistSvc", name)
 {
-  declareProperty("HistPath", m_path);
   declareProperty("ExpertMode", m_expert="off");
   declareProperty("CalibHits", m_calib="off");
   declareProperty("NtupleFileName", m_ntupleFileName);
+  declareProperty("HistPath", m_path);
 }
 
+
 StatusCode CaloHitAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing CaloHitAnalysis" );
 
   CHECK( detStore()->retrieve(m_tileMgr) );
-
   CHECK( detStore()->retrieve(m_tileID) );
 
   // Grab the Ntuple and histogramming service for the tree
@@ -138,13 +139,12 @@ StatusCode CaloHitAnalysis::initialize() {
   h_r_e = new TH2D("h_Calo_r_e", "energy vs radius", 100, 0,6000, 100,0,500);
   h_r_e->StatOverflows();
 
-  if( m_expert == "on")
-    {
-      CHECK(m_thistSvc->regHist( m_path+h_time_e->GetName(), h_time_e));
-      CHECK(m_thistSvc->regHist( m_path+h_eta_e->GetName(), h_eta_e));
-      CHECK(m_thistSvc->regHist( m_path+h_phi_e->GetName(), h_phi_e));
-      CHECK(m_thistSvc->regHist( m_path+h_r_e->GetName(), h_r_e));
-    }
+  if (m_expert == "on") {
+    CHECK(m_thistSvc->regHist(m_path + h_time_e->GetName(), h_time_e));
+    CHECK(m_thistSvc->regHist(m_path + h_eta_e->GetName(), h_eta_e));
+    CHECK(m_thistSvc->regHist(m_path + h_phi_e->GetName(), h_phi_e));
+    CHECK(m_thistSvc->regHist(m_path + h_r_e->GetName(), h_r_e));
+  }
 
   //Histograms for calibrated hits
   h_calib_eta = new TH1D("h_calib_eta", "calib. hits eta", 50,-5,5);
@@ -177,53 +177,52 @@ StatusCode CaloHitAnalysis::initialize() {
   h_calib_eTotpartID = new TH1D("h_calib_eTotpartID", "calib. hits partID weighted with energy",600,0,300000);
   h_calib_eTotpartID->StatOverflows();
 
-  if( m_calib == "on")
-    {
-      CHECK(m_thistSvc->regHist( m_path+h_calib_eta->GetName(), h_calib_eta));
-      CHECK(m_thistSvc->regHist( m_path+h_calib_phi->GetName(), h_calib_phi));
-      CHECK(m_thistSvc->regHist( m_path+h_calib_rz->GetName(), h_calib_rz));
-      CHECK(m_thistSvc->regHist( m_path+h_calib_etaphi->GetName(), h_calib_etaphi));
-      CHECK(m_thistSvc->regHist( m_path+h_calib_eEM->GetName(), h_calib_eEM));
-      CHECK(m_thistSvc->regHist( m_path+h_calib_eNonEM->GetName(), h_calib_eNonEM));
-      CHECK(m_thistSvc->regHist( m_path+h_calib_eInv->GetName(), h_calib_eInv));
-      CHECK(m_thistSvc->regHist( m_path+h_calib_eEsc->GetName(), h_calib_eEsc));
-      CHECK(m_thistSvc->regHist( m_path+h_calib_eTot->GetName(), h_calib_eTot));
-      CHECK(m_thistSvc->regHist( m_path+h_calib_eTotpartID->GetName(), h_calib_eTotpartID));
-    }
-  
+  if( m_calib == "on") {
+    CHECK(m_thistSvc->regHist(m_path + h_calib_eta->GetName(), h_calib_eta));
+    CHECK(m_thistSvc->regHist(m_path + h_calib_phi->GetName(), h_calib_phi));
+    CHECK(m_thistSvc->regHist(m_path + h_calib_rz->GetName(), h_calib_rz));
+    CHECK(m_thistSvc->regHist(m_path + h_calib_etaphi->GetName(), h_calib_etaphi));
+    CHECK(m_thistSvc->regHist(m_path + h_calib_eEM->GetName(), h_calib_eEM));
+    CHECK(m_thistSvc->regHist(m_path + h_calib_eNonEM->GetName(), h_calib_eNonEM));
+    CHECK(m_thistSvc->regHist(m_path + h_calib_eInv->GetName(), h_calib_eInv));
+    CHECK(m_thistSvc->regHist(m_path + h_calib_eEsc->GetName(), h_calib_eEsc));
+    CHECK(m_thistSvc->regHist(m_path + h_calib_eTot->GetName(), h_calib_eTot));
+    CHECK(m_thistSvc->regHist(m_path + h_calib_eTotpartID->GetName(), h_calib_eTotpartID));
+  }
 
-  m_tree = new TTree( "CaloHitNtuple", "CaloHitAna" );
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
+  /** now add branches and leaves to the tree */
+  m_tree = new TTree("Calo", "Calo");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/";
   CHECK( m_thistSvc->regTree(fullNtupleName, m_tree) );
 
-  if(m_tree)
-    {
-      m_tree->Branch("CellEta", &m_cell_eta);
-      m_tree->Branch("CellPhi", &m_cell_phi);
-      m_tree->Branch("CellX", &m_cell_x);
-      m_tree->Branch("CellY", &m_cell_y);
-      m_tree->Branch("CellZ", &m_cell_z);
-      m_tree->Branch("CellE", &m_cell_e);
-      m_tree->Branch("CellRadius", &m_cell_radius);
-      m_tree->Branch("Time", &m_time);
-      m_tree->Branch("CalibEta", &m_calib_eta);
-      m_tree->Branch("CalibPhi", &m_calib_phi);
-      m_tree->Branch("CalibRadius", &m_calib_radius);
-      m_tree->Branch("CalibZ", &m_calib_z);
-      m_tree->Branch("Calib_eEM", &m_calib_eEM);
-      m_tree->Branch("Calib_eNonEM", &m_calib_eNonEM);
-      m_tree->Branch("Calib_eInv", &m_calib_eInv);
-      m_tree->Branch("Calib_eEsc", &m_calib_eEsc);
-      m_tree->Branch("Calib_eTot", &m_calib_eTot);
-      m_tree->Branch("Calib_partID", &m_calib_partID);
-      
-    }else{
+  if(m_tree) {
+    m_tree->Branch("CellEta", &m_cell_eta);
+    m_tree->Branch("CellPhi", &m_cell_phi);
+    m_tree->Branch("CellX", &m_cell_x);
+    m_tree->Branch("CellY", &m_cell_y);
+    m_tree->Branch("CellZ", &m_cell_z);
+    m_tree->Branch("CellE", &m_cell_e);
+    m_tree->Branch("CellRadius", &m_cell_radius);
+    m_tree->Branch("Time", &m_time);
+    m_tree->Branch("CalibEta", &m_calib_eta);
+    m_tree->Branch("CalibPhi", &m_calib_phi);
+    m_tree->Branch("CalibRadius", &m_calib_radius);
+    m_tree->Branch("CalibZ", &m_calib_z);
+    m_tree->Branch("Calib_eEM", &m_calib_eEM);
+    m_tree->Branch("Calib_eNonEM", &m_calib_eNonEM);
+    m_tree->Branch("Calib_eInv", &m_calib_eInv);
+    m_tree->Branch("Calib_eEsc", &m_calib_eEsc);
+    m_tree->Branch("Calib_eTot", &m_calib_eTot);
+    m_tree->Branch("Calib_partID", &m_calib_partID);     
+  }
+  else {
     ATH_MSG_ERROR( "No tree found!" );
   }
 
   return StatusCode::SUCCESS;
 }		 
 
+
 StatusCode CaloHitAnalysis::execute() {
   ATH_MSG_DEBUG( "In CaloHitAnalysis::execute()" );
 
@@ -247,11 +246,11 @@ StatusCode CaloHitAnalysis::execute() {
   m_calib_partID->clear();
 
   std::string  lArKey [4] = {"LArHitEMB", "LArHitEMEC", "LArHitFCAL", "LArHitHEC"};
-  for (unsigned int i=0;i<4;i++){
+  for (unsigned int i=0; i<4; i++) {
     const DataHandle<LArHitContainer> iter;
-    if (evtStore()->retrieve(iter,lArKey[i])==StatusCode::SUCCESS) {
+    if (evtStore()->retrieve(iter,lArKey[i]) == StatusCode::SUCCESS) {
       LArHitContainer::const_iterator hi;
-      for (auto hi : *iter ){
+      for (auto hi : *iter ) {
         GeoLArHit ghit(*hi);
         if (!ghit) continue;
         const CaloDetDescrElement *hitElement = ghit.getDetDescrElement();	
@@ -260,8 +259,8 @@ StatusCode CaloHitAnalysis::execute() {
 	double eta = hitElement->eta();
 	double phi = hitElement->phi();
 	double radius = hitElement->r();
-	float  x = hitElement->x();
-	float  y = hitElement->y();
+	float x = hitElement->x();
+	float y = hitElement->y();
 	double z = hitElement->z();
 
 	h_cell_e->Fill( energy );
@@ -271,12 +270,11 @@ StatusCode CaloHitAnalysis::execute() {
         h_xy->Fill(x,y);
 	h_zr->Fill(z,radius);
 	h_etaphi->Fill(eta, phi);
-	if( m_expert == "on"){	  
+	if (m_expert == "on") {	  
 	  h_time_e->Fill(time, energy);
 	  h_eta_e->Fill(eta, energy);
 	  h_phi_e->Fill(phi, energy);
-	  h_r_e->Fill(radius, energy);
-	  
+	  h_r_e->Fill(radius, energy);	  
 	}
 	m_cell_eta->push_back(eta);
 	m_cell_phi->push_back(phi);
@@ -286,34 +284,31 @@ StatusCode CaloHitAnalysis::execute() {
 	m_cell_z->push_back(z);
 	m_cell_radius->push_back(radius);
 	m_time->push_back(time);
-
       } // End while hits
-    }    // End statuscode success upon retrieval of hits
-  }   // End detector type loop
+    } // End statuscode success upon retrieval of hits
+  } // End detector type loop
   
   const DataHandle<TileHitVector> hitVec;
   //const TileHitVector* hitVec;
-  if (evtStore()->retrieve(hitVec,"TileHitVec")==StatusCode::SUCCESS &&
-    m_tileMgr &&
-    m_tileID ){
-    for(auto i_hit : *hitVec ){
+  if (evtStore()->retrieve(hitVec,"TileHitVec") == StatusCode::SUCCESS && m_tileMgr && m_tileID) {
+    for (auto i_hit : *hitVec) {
       Identifier pmt_id = (i_hit).identify();
       Identifier cell_id = m_tileID->cell_id(pmt_id);
       const CaloDetDescrElement* ddElement = (m_tileID->is_tile_aux(cell_id)) ? 0 : m_tileMgr->get_cell_element(cell_id);
-      if(ddElement){
+      if (ddElement) {
 	double tot_e = 0.;
 	double tot_time = 0.;
-	for (int t=0;t<(i_hit).size();++t)  tot_e += (i_hit).energy(t);
-	for (int t=0;t<(i_hit).size();++t)  tot_time += (i_hit).time(t);
-	h_cell_e->Fill( tot_e );
-	h_cell_eta->Fill( ddElement->eta() );
-	h_cell_phi->Fill( ddElement->phi() );
-	h_cell_radius->Fill( ddElement->z() );
-	h_xy->Fill(ddElement->x(),ddElement->y());
+	for (int t=0; t<(i_hit).size(); ++t) tot_e += (i_hit).energy(t);
+	for (int t=0; t<(i_hit).size(); ++t) tot_time += (i_hit).time(t);
+	h_cell_e->Fill(tot_e);
+	h_cell_eta->Fill(ddElement->eta());
+	h_cell_phi->Fill(ddElement->phi()) ;
+	h_cell_radius->Fill(ddElement->z());
+	h_xy->Fill(ddElement->x(), ddElement->y());
 	h_zr->Fill(ddElement->r(), ddElement->r());
 	h_etaphi->Fill(ddElement->eta(), ddElement->phi());
 	
-	if( m_expert == "on"){	  
+	if (m_expert == "on") {	  
 	  h_time_e->Fill(tot_time, tot_e);
 	  h_eta_e->Fill(ddElement->eta(), tot_e);
 	  h_phi_e->Fill(ddElement->phi(), tot_e);
@@ -331,27 +326,26 @@ StatusCode CaloHitAnalysis::execute() {
     }
   }
 
-
   //For calibrated hits
   std::string LArCalibKey [3] = {"LArCalibrationHitActive", "LArCalibrationHitInactive","LArCalibrationHitDeadMaterial"};
-  for(unsigned int j=0; j<3;j++){
-    if(m_calib != "on") continue;
+  for (unsigned int j=0; j<3; j++) {
+    if (m_calib != "on") continue;
     const DataHandle<CaloCalibrationHitContainer> iterator;
     CaloCalibrationHitContainer::const_iterator hit_i;
-    if(evtStore()->retrieve(iterator, LArCalibKey[j])==StatusCode::SUCCESS){
+    if(evtStore()->retrieve(iterator, LArCalibKey[j]) == StatusCode::SUCCESS) {
       //Not tested
-      for(auto hit_i : *iterator){
+      for (auto hit_i : *iterator) {
 	GeoCaloCalibHit geoHit(*hit_i, LArCalibKey[j]);
-	if(!geoHit) continue;
+	if (!geoHit) continue;
 	const CaloDetDescrElement* Element = geoHit.getDetDescrElement();
 	double eta = Element->eta();
 	double phi = Element->phi();
 	double radius = Element->r();
-	double z =Element->z();
-	double emEnergy  = geoHit.energyEM();
+	double z = Element->z();
+	double emEnergy = geoHit.energyEM();
 	double nonEmEnergy = geoHit.energyNonEM();
 	double invEnergy = geoHit.energyInvisible();
-	double escEnergy =  geoHit.energyEscaped();
+	double escEnergy = geoHit.energyEscaped();
 	double totEnergy = geoHit.energyTotal();
 	double particleID = (*hit_i).particleID();
 	
@@ -376,11 +370,11 @@ StatusCode CaloHitAnalysis::execute() {
 	m_calib_eEsc->push_back(escEnergy);
 	m_calib_eTot->push_back(totEnergy);
 	m_calib_partID->push_back(particleID);		
-
       }
     }
   }
+  
   if(m_tree) m_tree->Fill();
+  
   return StatusCode::SUCCESS;
 }
-
diff --git a/Simulation/Tools/HitAnalysis/src/CaloHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/CaloHitAnalysis.h
index a0e04559e5ab75fabb3002f417ca6da6356b5eec..9b6a78c4452794d420ac312def32557f52471fa5 100755
--- a/Simulation/Tools/HitAnalysis/src/CaloHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/CaloHitAnalysis.h
@@ -22,6 +22,7 @@ class TH1;
 class TH2;
 class TTree;
 
+
 class CaloHitAnalysis : public AthAlgorithm {
 
  public:
@@ -57,6 +58,9 @@ class CaloHitAnalysis : public AthAlgorithm {
    TH1* h_calib_eTot;
    TH1* h_calib_eTotpartID;
 
+   const TileID * m_tileID;
+   const TileDetDescrManager * m_tileMgr;
+
    std::vector<float>* m_cell_eta;
    std::vector<float>* m_cell_phi;
    std::vector<float>* m_cell_x;
@@ -75,19 +79,15 @@ class CaloHitAnalysis : public AthAlgorithm {
    std::vector<float>* m_calib_eEsc;
    std::vector<float>* m_calib_eTot;
    std::vector<float>* m_calib_partID;
- 
    
    std::string m_expert;    
    std::string m_calib;    
-   ServiceHandle<ITHistSvc> m_thistSvc;
-   std::string m_path;
-
+   
    TTree* m_tree;
    std::string m_ntupleFileName;
-   const TileID * m_tileID;
-   const TileDetDescrManager * m_tileMgr;
+   std::string m_path;
+   ServiceHandle<ITHistSvc> m_thistSvc;
    
 };
 
 #endif // CALO_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/LucidHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/LucidHitAnalysis.cxx
index 57b312d3454ad69f889c3a27749002e15d845798..92deeefe57bdca99b8ddef91e7aa3b405f56e410 100755
--- a/Simulation/Tools/HitAnalysis/src/LucidHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/LucidHitAnalysis.cxx
@@ -4,15 +4,12 @@
 
 #include "LucidHitAnalysis.h"
 
-
 #include "LUCID_SimEvent/LUCID_SimHitCollection.h"
 
-
 #include "TH1.h"
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -47,22 +44,22 @@ LucidHitAnalysis::LucidHitAnalysis(const std::string& name, ISvcLocator* pSvcLoc
    , m_hit_posttime(0)
    , m_gen_volume(0)
    , m_wavelength(0)
+     
    , m_tree(0)
-   , m_ntupleFileName("/LucidHitAnalysis/ntuple/")
-   , m_path("/LucidHitAnalysis/histos/")
+   , m_ntupleFileName("/LucidHitAnalysis/")
+   , m_path("/LucidHitAnalysis/")
    , m_thistSvc("THistSvc", name)
 {
   declareProperty("NtupleFileName", m_ntupleFileName);
   declareProperty("HistPath", m_path); 
-
 }
 
+
 StatusCode LucidHitAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing LucidHitAnalysis" );
 
   // Grab the Ntuple and histogramming service for the tree
   CHECK(m_thistSvc.retrieve());
- 
 
   /** Histograms**/
   h_hit_x = new TH1D("h_hit_x", "hit_x", 100,-150.,150.);
@@ -121,9 +118,9 @@ StatusCode LucidHitAnalysis::initialize() {
   h_wavelength->StatOverflows();
   CHECK(m_thistSvc->regHist( m_path+h_wavelength->GetName(), h_wavelength));
 
-
-  m_tree= new TTree("NtupleLucidHitAnalysis","LucidHitAna");
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
+  /** now add branches and leaves to the tree */
+  m_tree = new TTree("Lucid","Lucid");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/";
   CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
 
   if (m_tree){
@@ -139,74 +136,71 @@ StatusCode LucidHitAnalysis::initialize() {
     m_tree->Branch("posttime", &m_hit_posttime);
     m_tree->Branch("gen_volume", &m_gen_volume);
     m_tree->Branch("wavelength", &m_wavelength);
-  }else{
+  }
+  else {
     ATH_MSG_ERROR("No tree found!");
   }
+  
   return StatusCode::SUCCESS;
 }		 
-
   
 
 StatusCode LucidHitAnalysis::execute() {
   ATH_MSG_DEBUG( "In LucidHitAnalysis::execute()" );
 
-    m_hit_x->clear();
-    m_hit_y->clear();
-    m_hit_z->clear();
-    m_hit_post_x->clear();
-    m_hit_post_y->clear();
-    m_hit_post_z->clear();
-    m_hit_edep->clear();
-    m_hit_pdgid->clear();
-    m_hit_pretime->clear();
-    m_hit_posttime->clear();
-    m_gen_volume->clear();
-    m_wavelength->clear();
-
-
-    const DataHandle<LUCID_SimHitCollection> iter;
-    if (evtStore()->retrieve(iter)==StatusCode::SUCCESS) {
-      for(LUCID_SimHitCollection::const_iterator i_hit = (*iter).begin(); 
-	  i_hit != (*iter).end();++i_hit){
-	double x = i_hit->GetX();
-	double y = i_hit->GetY();
-	double z = i_hit->GetZ();
-	double r = sqrt(x*x+y*y);
-        h_hit_x->Fill(i_hit->GetX());
-        h_hit_y->Fill(i_hit->GetY());
-        h_hit_z->Fill(i_hit->GetZ());
-	h_xy->Fill(x, y);
-	h_zr->Fill(z, r);
-        h_hit_post_x->Fill(i_hit->GetEPX());
-        h_hit_post_y->Fill(i_hit->GetEPY());
-        h_hit_post_z->Fill(i_hit->GetEPZ());
-        h_hit_edep->Fill(i_hit->GetEnergy());
-	h_hit_pdgid->Fill(i_hit->GetPdgCode());
-	h_hit_pretime->Fill(i_hit->GetPreStepTime());
-	h_hit_posttime->Fill(i_hit->GetPostStepTime());
-        h_genvolume->Fill(i_hit->GetGenVolume());
-        h_wavelength->Fill(i_hit->GetWavelength());
- 
-
-	m_hit_x->push_back(i_hit->GetX());
-	m_hit_y->push_back(i_hit->GetY());
-	m_hit_z->push_back(i_hit->GetZ());
-	m_hit_post_x->push_back(i_hit->GetEPX());
-	m_hit_post_y->push_back(i_hit->GetEPY());
-	m_hit_post_z->push_back(i_hit->GetEPZ());
-	m_hit_edep->push_back(i_hit->GetEnergy());
-	m_hit_pdgid->push_back(i_hit->GetPdgCode());
-	m_hit_pretime->push_back(i_hit->GetPreStepTime());
-	m_hit_posttime->push_back(i_hit->GetPostStepTime());
-	m_gen_volume->push_back(i_hit->GetGenVolume());
-	m_wavelength->push_back(i_hit->GetWavelength()); 
-      }
-    } // End while hits
+  m_hit_x->clear();
+  m_hit_y->clear();
+  m_hit_z->clear();
+  m_hit_post_x->clear();
+  m_hit_post_y->clear();
+  m_hit_post_z->clear();
+  m_hit_edep->clear();
+  m_hit_pdgid->clear();
+  m_hit_pretime->clear();
+  m_hit_posttime->clear();
+  m_gen_volume->clear();
+  m_wavelength->clear();
+
+  const DataHandle<LUCID_SimHitCollection> iter;
+  if (evtStore()->retrieve(iter) == StatusCode::SUCCESS) {
+    for (LUCID_SimHitCollection::const_iterator i_hit = (*iter).begin(); i_hit != (*iter).end(); ++i_hit) {
+      double x = i_hit->GetX();
+      double y = i_hit->GetY();
+      double z = i_hit->GetZ();
+      double r = sqrt(x*x+y*y);
+      
+      h_hit_x->Fill(i_hit->GetX());
+      h_hit_y->Fill(i_hit->GetY());
+      h_hit_z->Fill(i_hit->GetZ());
+      h_xy->Fill(x, y);
+      h_zr->Fill(z, r);
+      h_hit_post_x->Fill(i_hit->GetEPX());
+      h_hit_post_y->Fill(i_hit->GetEPY());
+      h_hit_post_z->Fill(i_hit->GetEPZ());
+      h_hit_edep->Fill(i_hit->GetEnergy());
+      h_hit_pdgid->Fill(i_hit->GetPdgCode());
+      h_hit_pretime->Fill(i_hit->GetPreStepTime());
+      h_hit_posttime->Fill(i_hit->GetPostStepTime());
+      h_genvolume->Fill(i_hit->GetGenVolume());
+      h_wavelength->Fill(i_hit->GetWavelength());
+
+      m_hit_x->push_back(i_hit->GetX());
+      m_hit_y->push_back(i_hit->GetY());
+      m_hit_z->push_back(i_hit->GetZ());
+      m_hit_post_x->push_back(i_hit->GetEPX());
+      m_hit_post_y->push_back(i_hit->GetEPY());
+      m_hit_post_z->push_back(i_hit->GetEPZ());
+      m_hit_edep->push_back(i_hit->GetEnergy());
+      m_hit_pdgid->push_back(i_hit->GetPdgCode());
+      m_hit_pretime->push_back(i_hit->GetPreStepTime());
+      m_hit_posttime->push_back(i_hit->GetPostStepTime());
+      m_gen_volume->push_back(i_hit->GetGenVolume());
+      m_wavelength->push_back(i_hit->GetWavelength()); 
+    }
+  } // End while hits
    
-    if (m_tree) m_tree->Fill();
-
- 
-
+  if (m_tree) m_tree->Fill();
 
   return StatusCode::SUCCESS;
+  
 }
diff --git a/Simulation/Tools/HitAnalysis/src/LucidHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/LucidHitAnalysis.h
index 056751fbcbc68d8f623c38711cd83336c9772dc3..3fb396e819d2f03441adbe79f614f5483bf118a1 100755
--- a/Simulation/Tools/HitAnalysis/src/LucidHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/LucidHitAnalysis.h
@@ -16,11 +16,11 @@
 #include "TH2.h"
 #include "TTree.h"
 
-
 class TH1;
 class TH2;
 class TTree;
- 
+
+
 class LucidHitAnalysis : public AthAlgorithm {
 
  public:
@@ -33,7 +33,6 @@ class LucidHitAnalysis : public AthAlgorithm {
 
  private:
 
-   std::string m_collection;
    /** Some histograms**/
    TH1* h_hit_x;
    TH1* h_hit_y;
@@ -49,7 +48,6 @@ class LucidHitAnalysis : public AthAlgorithm {
    TH1* h_hit_posttime;
    TH1* h_genvolume;
    TH1* h_wavelength;
-  
 
    std::vector<float>* m_hit_x;
    std::vector<float>* m_hit_y;
@@ -64,8 +62,6 @@ class LucidHitAnalysis : public AthAlgorithm {
    std::vector<float>* m_gen_volume;
    std::vector<float>* m_wavelength;
    
-   
-   
    TTree * m_tree;
    std::string m_ntupleFileName; 
    std::string m_path; 
@@ -74,4 +70,3 @@ class LucidHitAnalysis : public AthAlgorithm {
 };
 
 #endif // LUCID_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/MDTHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/MDTHitAnalysis.cxx
index 1f7ddd9d3fe849ae48c5ecee1303cded275b5e90..1759e6d4ab7e1d4ef67864212ef71b560577aa8a 100755
--- a/Simulation/Tools/HitAnalysis/src/MDTHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/MDTHitAnalysis.cxx
@@ -15,7 +15,6 @@
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -54,25 +53,24 @@ MDTHitAnalysis::MDTHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator
    , m_hits_edep(0)
    , m_hits_kine(0)
    , m_hits_step(0)
+     
    , m_tree(0)
-   , m_ntupleFileName("MDTHitAnalysis/ntuple/")
-   , m_path("/MDTHitAnalysis/histos/")
+   , m_ntupleFileName("/MDTHitAnalysis/")
+   , m_path("/MDTHitAnalysis/")
    , m_thistSvc("THistSvc", name)
 {
   declareProperty("NtupleFileName", m_ntupleFileName); 
   declareProperty("HistPath", m_path); 
-
 }
 
+
 StatusCode MDTHitAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing MDTHitAnalysis" );
 
   // Grab the Ntuple and histogramming service for the tree
   CHECK(m_thistSvc.retrieve());
- 
 
   /** Histograms */
-
   h_hits_x = new TH1D("h_hits_mdt_x","hits_x", 100,-25000, 25000);
   h_hits_x->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_hits_x->GetName(), h_hits_x));
@@ -137,13 +135,11 @@ StatusCode MDTHitAnalysis::initialize() {
   h_hits_step->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_hits_step->GetName(), h_hits_step));
 
-  m_tree= new TTree("NtupleMDTHitAnalysis","MDTHitAna");
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
+  /** now add branches and leaves to the tree */
+  m_tree = new TTree("MDT","MDT");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/";
   CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
   
-  
-  
-  /** now add branches and leaves to the tree */
   if (m_tree){
     m_tree->Branch("x", &m_hits_x);
     m_tree->Branch("y", &m_hits_y);
@@ -159,14 +155,14 @@ StatusCode MDTHitAnalysis::initialize() {
     m_tree->Branch("edep", &m_hits_edep);
     m_tree->Branch("kine", &m_hits_kine);
     m_tree->Branch("step", &m_hits_step);
-  }else{
+  }
+  else {
     ATH_MSG_ERROR("No tree found!");
   }
   
   return StatusCode::SUCCESS;
-}		 
+}
 
-  
 
 StatusCode MDTHitAnalysis::execute() {
   ATH_MSG_DEBUG( "In MDTHitAnalysis::execute()" );
@@ -187,13 +183,13 @@ StatusCode MDTHitAnalysis::execute() {
   m_hits_step->clear();
   
   const DataHandle<MDTSimHitCollection> mdt_container;
-  if (evtStore()->retrieve(mdt_container, "MDT_Hits" )==StatusCode::SUCCESS) {
-    for(MDTSimHitCollection::const_iterator i_hit = mdt_container->begin(); 
-	i_hit != mdt_container->end();++i_hit){
+  if (evtStore()->retrieve(mdt_container, "MDT_Hits") == StatusCode::SUCCESS) {
+    for (MDTSimHitCollection::const_iterator i_hit = mdt_container->begin(); i_hit != mdt_container->end(); ++i_hit) {
       //MDTSimHitCollection::const_iterator i_hit;
       //for(auto i_hit : *mdt_container){
       GeoMDTHit ghit(*i_hit);
-      if(!ghit) continue;
+      if (!ghit) continue;
+
       Amg::Vector3D p = ghit.getGlobalPosition();
       h_hits_x->Fill(p.x());
       h_hits_y->Fill(p.y());
@@ -212,7 +208,6 @@ StatusCode MDTHitAnalysis::execute() {
       h_hits_step->Fill((*i_hit).stepLength());
       h_hits_kine->Fill((*i_hit).kineticEnergy());
       
-      
       m_hits_x->push_back(p.x());
       m_hits_y->push_back(p.y());
       m_hits_z->push_back(p.z());
@@ -220,9 +215,9 @@ StatusCode MDTHitAnalysis::execute() {
       m_hits_eta->push_back(p.eta());
       m_hits_phi->push_back(p.phi());
       m_hits_driftR->push_back((*i_hit).driftRadius());
-      m_hits_lx->push_back( (*i_hit).localPosition().x());
-      m_hits_ly->push_back( (*i_hit).localPosition().y());
-      m_hits_lz->push_back( (*i_hit).localPosition().z());
+      m_hits_lx->push_back((*i_hit).localPosition().x());
+      m_hits_ly->push_back((*i_hit).localPosition().y());
+      m_hits_lz->push_back((*i_hit).localPosition().z());
       m_hits_edep->push_back((*i_hit).energyDeposit());
       m_hits_time->push_back((*i_hit).globalTime());
       m_hits_step->push_back((*i_hit).stepLength());
diff --git a/Simulation/Tools/HitAnalysis/src/MDTHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/MDTHitAnalysis.h
index 85b154dad3711c524a9d9549bb93727fc1a1b0e1..a73f01bc84e6f1043f0348f79c0105311c52d8f9 100755
--- a/Simulation/Tools/HitAnalysis/src/MDTHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/MDTHitAnalysis.h
@@ -16,13 +16,11 @@
 #include "TH2.h"
 #include "TTree.h"
 
-
-
 class TH1;
 class TH2;
 class TTree;
 
- 
+
 class MDTHitAnalysis : public AthAlgorithm {
 
  public:
@@ -52,6 +50,7 @@ class MDTHitAnalysis : public AthAlgorithm {
    TH1* h_hits_edep;
    TH1* h_hits_kine;
    TH1* h_hits_step;
+   
    std::vector<float>* m_hits_x;
    std::vector<float>* m_hits_y;
    std::vector<float>* m_hits_z;
@@ -69,11 +68,9 @@ class MDTHitAnalysis : public AthAlgorithm {
 
    TTree * m_tree;
    std::string m_ntupleFileName;
-
    std::string m_path;
-   ServiceHandle<ITHistSvc>  m_thistSvc;
+   ServiceHandle<ITHistSvc> m_thistSvc;
 
 };
 
 #endif // MDT_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/RPCHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/RPCHitAnalysis.cxx
index b83c04c183da51f37ba9d459e6794163912e1399..cc91f7834f41940bc4f7ca6f21b16cc32bd5896d 100755
--- a/Simulation/Tools/HitAnalysis/src/RPCHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/RPCHitAnalysis.cxx
@@ -15,7 +15,6 @@
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -52,22 +51,23 @@ RPCHitAnalysis::RPCHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator
    , m_hits_edep(0)
    , m_hits_kine(0)
    , m_hits_step(0)
+     
    , m_tree(0)
-   , m_ntupleFileName("/RPCHitAnalysis/ntuple/")
-   , m_path("/RPCHitAnalysis/histos/")
+   , m_ntupleFileName("/RPCHitAnalysis/")
+   , m_path("/RPCHitAnalysis/")
    , m_thistSvc("THistSvc", name)
 {
   declareProperty("NtupleFileName", m_ntupleFileName); 
   declareProperty("HistPath", m_path); 
-
 }
 
+
 StatusCode RPCHitAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing RPCHitAnalysis" );
 
   // Grab the Ntuple and histogramming service for the tree
   CHECK(m_thistSvc.retrieve());
-
+  
   /** Histograms**/
   h_hits_x = new TH1D("h_hits_rpc_x","hits_x", 100,-11000, 11000);
   h_hits_x->StatOverflows();
@@ -113,7 +113,6 @@ StatusCode RPCHitAnalysis::initialize() {
   h_hits_lz->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_hits_lz->GetName(), h_hits_lz));
 
-
   h_hits_time = new TH1D("h_hits_rpc_time","hits_time", 100,0, 120);
   h_hits_time->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_hits_time->GetName(), h_hits_time));
@@ -130,14 +129,11 @@ StatusCode RPCHitAnalysis::initialize() {
   h_hits_step->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_hits_step->GetName(), h_hits_step));
 
-
-  m_tree= new TTree("NtupleRPCHitAnalysis","RPCHitAna");
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
+  /** now add branches and leaves to the tree */
+  m_tree = new TTree("RPC","RPC");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/";
   CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
   
-    
-    
-  /** now add branches and leaves to the tree */
   if (m_tree){
     m_tree->Branch("x", &m_hits_x);
     m_tree->Branch("y", &m_hits_y);
@@ -152,13 +148,13 @@ StatusCode RPCHitAnalysis::initialize() {
     m_tree->Branch("edep", &m_hits_edep);
     m_tree->Branch("kine", &m_hits_kine);
     m_tree->Branch("step", &m_hits_step);
-  }else{
+  }
+  else {
     ATH_MSG_ERROR("No tree found!");
   }
   
   return StatusCode::SUCCESS;
-}		 
-
+}
 
 
 StatusCode RPCHitAnalysis::execute() {
@@ -179,13 +175,13 @@ StatusCode RPCHitAnalysis::execute() {
   m_hits_step->clear();
   
   const DataHandle<RPCSimHitCollection> rpc_container;
-  if (evtStore()->retrieve(rpc_container, "RPC_Hits" )==StatusCode::SUCCESS) {
-    for(RPCSimHitCollection::const_iterator i_hit = rpc_container->begin(); 
-	i_hit != rpc_container->end();++i_hit){
+  if (evtStore()->retrieve(rpc_container, "RPC_Hits") == StatusCode::SUCCESS) {
+    for (RPCSimHitCollection::const_iterator i_hit = rpc_container->begin(); i_hit != rpc_container->end(); ++i_hit) {
       //RPCSimHitCollection::const_iterator i_hit;
       //for(auto i_hit : *rpc_container){
       GeoRPCHit ghit(*i_hit);
-      if(!ghit) continue;
+      if (!ghit) continue;
+      
       Amg::Vector3D p = ghit.getGlobalPosition();
       h_hits_x->Fill(p.x());
       h_hits_y->Fill(p.y());
@@ -195,9 +191,9 @@ StatusCode RPCHitAnalysis::execute() {
       h_zr->Fill(p.z(),p.perp());
       h_hits_eta->Fill(p.eta());
       h_hits_phi->Fill(p.phi());
-      h_hits_lx->Fill( (*i_hit).localPosition().x());
-      h_hits_ly->Fill( (*i_hit).localPosition().y());
-      h_hits_lz->Fill( (*i_hit).localPosition().z());
+      h_hits_lx->Fill((*i_hit).localPosition().x());
+      h_hits_ly->Fill((*i_hit).localPosition().y());
+      h_hits_lz->Fill((*i_hit).localPosition().z());
       h_hits_edep->Fill((*i_hit).energyDeposit());
       h_hits_time->Fill((*i_hit).globalTime());
       h_hits_step->Fill((*i_hit).stepLength());
@@ -209,9 +205,9 @@ StatusCode RPCHitAnalysis::execute() {
       m_hits_r->push_back(p.perp());
       m_hits_eta->push_back(p.eta());
       m_hits_phi->push_back(p.phi());
-      m_hits_lx->push_back( (*i_hit).localPosition().x());
-      m_hits_ly->push_back( (*i_hit).localPosition().y());
-      m_hits_lz->push_back( (*i_hit).localPosition().z());
+      m_hits_lx->push_back((*i_hit).localPosition().x());
+      m_hits_ly->push_back((*i_hit).localPosition().y());
+      m_hits_lz->push_back((*i_hit).localPosition().z());
       m_hits_edep->push_back((*i_hit).energyDeposit());
       m_hits_time->push_back((*i_hit).globalTime());
       m_hits_step->push_back((*i_hit).stepLength());
@@ -219,7 +215,7 @@ StatusCode RPCHitAnalysis::execute() {
     }
   } // End while hits
   
+  if (m_tree) m_tree->Fill();
   
-  if (m_tree) m_tree->Fill();  
   return StatusCode::SUCCESS;
 }
diff --git a/Simulation/Tools/HitAnalysis/src/RPCHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/RPCHitAnalysis.h
index fadb854c2127018a69936086aba16a5841417d52..2384dcd2482cdaa9dcb9ed462adbf770d65c6d25 100755
--- a/Simulation/Tools/HitAnalysis/src/RPCHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/RPCHitAnalysis.h
@@ -16,12 +16,11 @@
 #include "TH2.h"
 #include "TTree.h"
 
-
-
 class TH1;
 class TH2;
 class TTree;
- 
+
+
 class RPCHitAnalysis : public AthAlgorithm {
 
  public:
@@ -51,7 +50,6 @@ class RPCHitAnalysis : public AthAlgorithm {
    TH1* h_hits_kine;
    TH1* h_hits_step;
 
-  
    std::vector<float>* m_hits_x;
    std::vector<float>* m_hits_y;
    std::vector<float>* m_hits_z;
@@ -74,4 +72,3 @@ class RPCHitAnalysis : public AthAlgorithm {
 };
 
 #endif // RPC_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/SiHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/SiHitAnalysis.cxx
index 8c757c7893afc2c1ee7a44037b905f510cebe616..28b14711c41e674d2b3909effcffad43b3a4ebf0 100644
--- a/Simulation/Tools/HitAnalysis/src/SiHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/SiHitAnalysis.cxx
@@ -13,7 +13,6 @@
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -22,7 +21,6 @@
 //m_collection:  "PixelHits", "SCT_Hits", "BCMHits" and "BLMHits" 
 SiHitAnalysis::SiHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator)
    : AthAlgorithm(name, pSvcLocator)
-   , m_collection("BCMHits")
    , h_hits_x(0)
    , h_hits_y(0)
    , h_hits_z(0)
@@ -44,32 +42,44 @@ SiHitAnalysis::SiHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator)
    , m_hits_eloss(0)
    , m_hits_step(0)
    , m_hits_barcode(0)
-   , m_tree(0)
-   , m_ntupleFileName("/ntuples/")
+     
+   , m_collection("BCMHits")
    , m_expert("off")
+     
+   , m_tree(0)
+   , m_ntupleFileName("/SiHitAnalysis/")
    , m_path("/SiHitAnalysis/")
    , m_thistSvc("THistSvc", name)
 {
   declareProperty("CollectionName",  m_collection="BCMHits");
-  declareProperty("HistPath", m_path); 
   declareProperty("ExpertMode", m_expert = "off");
   declareProperty("NtupleFileName", m_ntupleFileName);
+  declareProperty("HistPath", m_path);
 }
 
 StatusCode SiHitAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing SiHitAnalysis" );
 
   std::string detName("Pixel");
-  //initialise pixel or SCT variables
-  if(m_collection=="PixelHits"){
+  std::string ntupName("SiPixel");
+  
+  if (m_collection=="PixelHits") {
     detName = "Pixel";
-  }else if (m_collection=="SCT_Hits"){
+    ntupName = "SiPixel";
+  }
+  else if (m_collection=="SCT_Hits") {
     detName = "SCT";
-  }else if(m_collection=="BCMHits"){
+    ntupName = "SiSCT";
+  }
+  else if (m_collection=="BCMHits") {
     detName = "BCM";
-  }else if(m_collection=="BLMHits"){
+    ntupName = "SiBCM";
+  }
+  else if (m_collection=="BLMHits") {
     detName = "BLM";
-  }else{
+    ntupName = "SiBLM";
+  }
+  else {
     ATH_MSG_ERROR("SiHitsAnalysis for "<< name()<<"not supported!!! \n");
     return StatusCode::FAILURE;
   }
@@ -82,7 +92,7 @@ StatusCode SiHitAnalysis::initialize() {
   float bin_up = 600;
   float radius_up = 600;
   float radius_down = 200;
-  if(detName=="Pixel"){
+  if (detName=="Pixel") {
     bin_down = -170;
     bin_up = 170;
     radius_up = 170;
@@ -128,7 +138,6 @@ StatusCode SiHitAnalysis::initialize() {
   h_r_eloss = new TH2D(("h_"+detName+"_r_eloss").c_str(), ("h_"+detName+ " Eloss vs. r").c_str(),100, radius_down,radius_down,100,0,50);
   h_r_eloss->StatOverflows();
 
-
   CHECK(m_thistSvc->regHist(m_path + h_hits_x->GetName(), h_hits_x));
   CHECK(m_thistSvc->regHist(m_path + h_hits_y->GetName(), h_hits_y));
   CHECK(m_thistSvc->regHist(m_path + h_hits_z->GetName(), h_hits_z));
@@ -140,23 +149,20 @@ StatusCode SiHitAnalysis::initialize() {
   CHECK(m_thistSvc->regHist(m_path + h_hits_step->GetName(), h_hits_step));
   CHECK(m_thistSvc->regHist(m_path + h_hits_barcode->GetName(), h_hits_barcode));
   
-  
   //To be filled only when the expert mode is on.
-  if(m_expert == "on")
-    {
-      CHECK(m_thistSvc->regHist(m_path + h_time_eloss->GetName(), h_time_eloss));
-      CHECK(m_thistSvc->regHist(m_path + h_z_eloss->GetName(), h_z_eloss));
-	  CHECK(m_thistSvc->regHist(m_path + h_r_eloss->GetName(), h_r_eloss));
-    }
-
-  /**ntuple**/
-  CHECK(m_thistSvc.retrieve());
-  m_tree= new TTree(detName.c_str(), detName.c_str());
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/"+detName;
-  CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
+  if (m_expert == "on") {
+    CHECK(m_thistSvc->regHist(m_path + h_time_eloss->GetName(), h_time_eloss));
+    CHECK(m_thistSvc->regHist(m_path + h_z_eloss->GetName(), h_z_eloss));
+    CHECK(m_thistSvc->regHist(m_path + h_r_eloss->GetName(), h_r_eloss));
+  }
 
+  CHECK(m_thistSvc.retrieve());
 
   /** now add branches and leaves to the tree */
+  m_tree = new TTree(ntupName.c_str(), ntupName.c_str());
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/" + detName;
+  CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
+
   if (m_tree){
     m_tree->Branch((detName+"_x").c_str(), &m_hits_x);
     m_tree->Branch((detName+"_y").c_str(), &m_hits_y);
@@ -166,17 +172,18 @@ StatusCode SiHitAnalysis::initialize() {
     m_tree->Branch((detName+"_eloss").c_str(), &m_hits_eloss);
     m_tree->Branch((detName+"_step").c_str(), &m_hits_step);
     m_tree->Branch((detName+"_barcode").c_str(), &m_hits_barcode);
-  }else{
+  }
+  else {
     ATH_MSG_ERROR("No tree found!");
   }
   
   return StatusCode::SUCCESS;
 }		 
 
-  
 
 StatusCode SiHitAnalysis::execute() {
   ATH_MSG_DEBUG( "In SiHitAnalysis::execute()" );
+  
   m_hits_x->clear();
   m_hits_y->clear();
   m_hits_z->clear();
@@ -187,9 +194,8 @@ StatusCode SiHitAnalysis::execute() {
   m_hits_barcode->clear();
   
   const DataHandle<SiHitCollection> p_collection;
-  if (evtStore()->retrieve(p_collection, m_collection )==StatusCode::SUCCESS) {
-    for(SiHitConstIterator i_hit = p_collection->begin(); 
-	i_hit != p_collection->end();++i_hit){
+  if (evtStore()->retrieve(p_collection, m_collection) == StatusCode::SUCCESS) {
+    for (SiHitConstIterator i_hit = p_collection->begin(); i_hit != p_collection->end() ;++i_hit) {
       GeoSiHit ghit(*i_hit);
       HepGeom::Point3D<double> p = ghit.getGlobalPosition();
       h_hits_x->Fill(p.x());
@@ -200,19 +206,19 @@ StatusCode SiHitAnalysis::execute() {
       h_zr->Fill(p.z(),p.perp());
       h_hits_eloss->Fill(i_hit->energyLoss());
       h_hits_time->Fill(i_hit->meanTime());  
-      double step_length=(i_hit->localStartPosition()-i_hit->localEndPosition()).mag();
+      double step_length=(i_hit->localStartPosition() - i_hit->localEndPosition()).mag();
       h_hits_step->Fill(step_length);
       h_hits_barcode->Fill(i_hit->particleLink().barcode());
       
-      if(m_expert == "on")
-	{
-	  h_time_eloss->Fill(i_hit->meanTime(), i_hit->energyLoss());
-	  if(i_hit->getBarrelEndcap()==0) {
-	    h_z_eloss->Fill(p.z(), i_hit->energyLoss());
-	  }else{
-	    h_r_eloss->Fill(p.perp(), i_hit->energyLoss());
-	  }
+      if (m_expert == "on") {
+	h_time_eloss->Fill(i_hit->meanTime(), i_hit->energyLoss());
+	if (i_hit->getBarrelEndcap()==0) {
+	  h_z_eloss->Fill(p.z(), i_hit->energyLoss());
+	}
+	else {
+	  h_r_eloss->Fill(p.perp(), i_hit->energyLoss());
 	}
+      }
       
       m_hits_x->push_back(p.x());
       m_hits_y->push_back(p.y());
@@ -223,10 +229,9 @@ StatusCode SiHitAnalysis::execute() {
       m_hits_step->push_back(step_length);
       m_hits_barcode->push_back(i_hit->particleLink().barcode());    
     } // End while hits
-  }    // End statuscode success upon retrieval of hits
+  } // End statuscode success upon retrieval of hits
+
   if (m_tree) m_tree->Fill();
-  
 
   return StatusCode::SUCCESS;
 }
-
diff --git a/Simulation/Tools/HitAnalysis/src/SiHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/SiHitAnalysis.h
index 29fdc72de8e1852d763dfefe9ed2c2d22d8ef289..fe304cbf7e74f5576c5913c6fc87ceed95d74e5e 100755
--- a/Simulation/Tools/HitAnalysis/src/SiHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/SiHitAnalysis.h
@@ -10,7 +10,6 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ITHistSvc.h"
 
-
 #include <string>
 #include <vector>
 #include "TH1.h"
@@ -19,7 +18,8 @@
 class TH1;
 class TH2;
 class TTree;
- 
+
+
 class SiHitAnalysis : public AthAlgorithm {
 
  public:
@@ -32,7 +32,6 @@ class SiHitAnalysis : public AthAlgorithm {
 
  private:
 
-   std::string m_collection;
    /** Some variables**/
    TH1* h_hits_x;
    TH1* h_hits_y;
@@ -56,15 +55,15 @@ class SiHitAnalysis : public AthAlgorithm {
    std::vector<float>* m_hits_eloss;
    std::vector<float>* m_hits_step;
    std::vector<float>* m_hits_barcode;
+
+   std::string m_collection;
+   std::string m_expert;  
    
    TTree* m_tree;
    std::string m_ntupleFileName; 
-
-   std::string m_expert; 
-   std::string m_path; 
+   std::string m_path;
    ServiceHandle<ITHistSvc>  m_thistSvc;
 
 };
 
 #endif // SI_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.cxx
index 437baef10b8bbd0e5440bb93b24a4177142f00a5..d6e6282615c55fa98a67a70723efba2b2b1495a4 100755
--- a/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.cxx
@@ -15,7 +15,6 @@
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -58,9 +57,10 @@ TGCHitAnalysis::TGCHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator
    , m_hits_edep(0)
    , m_hits_kine(0)
    , m_hits_step(0)
+     
    , m_tree(0)
-   , m_ntupleFileName("/TGCHitAnalysis/ntuple/")
-   , m_path("/TGCHitAnalysis/histos/")
+   , m_ntupleFileName("/TGCHitAnalysis/")
+   , m_path("/TGCHitAnalysis/")
    , m_thistSvc("THistSvc", name)
 {
   declareProperty("NtupleFileName", m_ntupleFileName); 
@@ -72,7 +72,7 @@ StatusCode TGCHitAnalysis::initialize() {
 
   // Grab the Ntuple and histogramming service for the tree
   CHECK(m_thistSvc.retrieve());
- 
+  
   /** Histograms**/
   h_hits_x = new TH1D("h_hits_tgc_x","hits_x", 100,-5000, 5000);
   h_hits_x->StatOverflows();
@@ -98,7 +98,6 @@ StatusCode TGCHitAnalysis::initialize() {
   h_rz->StatOverflows();
   CHECK(m_thistSvc->regHist( m_path+h_rz->GetName(), h_rz));
 
-
   h_hits_eta = new TH1D("h_hits_tgc_eta", "hits_eta", 100,-10.0,10.0);
   h_hits_eta->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_hits_eta->GetName(), h_hits_eta));
@@ -147,14 +146,12 @@ StatusCode TGCHitAnalysis::initialize() {
   h_hits_step->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_hits_step->GetName(), h_hits_step));
 
-  m_tree= new TTree("NtupleTGCHitAnalysis","TGCHitAna");
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
+  /** now add branches and leaves to the tree */
+  m_tree = new TTree("TGC", "TGC");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/";
   CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
   
-  
-  
-  /** now add branches and leaves to the tree */
-  if (m_tree){
+  if (m_tree) {
     m_tree->Branch("x", &m_hits_x);
     m_tree->Branch("y", &m_hits_y);
     m_tree->Branch("z", &m_hits_z);
@@ -171,15 +168,14 @@ StatusCode TGCHitAnalysis::initialize() {
     m_tree->Branch("edep", &m_hits_edep);
     m_tree->Branch("kine", &m_hits_kine);
     m_tree->Branch("step", &m_hits_step);
-  }else{
+  }
+  else {
     ATH_MSG_ERROR("No tree found!");
   }
   
-
   return StatusCode::SUCCESS;
 }		 
 
-  
 
 StatusCode TGCHitAnalysis::execute() {
   ATH_MSG_DEBUG( "In TGCHitAnalysis::execute()" );
@@ -202,13 +198,13 @@ StatusCode TGCHitAnalysis::execute() {
   m_hits_step->clear();
   
   const DataHandle<TGCSimHitCollection> tgc_container;
-  if (evtStore()->retrieve(tgc_container, "TGC_Hits" )==StatusCode::SUCCESS) {
-    for(TGCSimHitCollection::const_iterator i_hit = tgc_container->begin(); 
-	i_hit != tgc_container->end();++i_hit){
+  if (evtStore()->retrieve(tgc_container, "TGC_Hits" ) == StatusCode::SUCCESS) {
+    for (TGCSimHitCollection::const_iterator i_hit = tgc_container->begin(); i_hit != tgc_container->end(); ++i_hit) {
       //TGCSimHitCollection::const_iterator i_hit;
-    //for(auto i_hit : *tgc_container){
+      //for(auto i_hit : *tgc_container){
       GeoTGCHit ghit(*i_hit);
-      if(!ghit) continue;
+      if (!ghit) continue;
+
       Amg::Vector3D p = ghit.getGlobalPosition();
       h_hits_x->Fill(p.x());
       h_hits_y->Fill(p.y());
@@ -218,9 +214,9 @@ StatusCode TGCHitAnalysis::execute() {
       h_rz->Fill(p.perp(), p.z());
       h_hits_eta->Fill(p.eta());
       h_hits_phi->Fill(p.phi());
-      h_hits_lx->Fill( (*i_hit).localPosition().x());
-      h_hits_ly->Fill( (*i_hit).localPosition().y());
-      h_hits_lz->Fill( (*i_hit).localPosition().z());
+      h_hits_lx->Fill((*i_hit).localPosition().x());
+      h_hits_ly->Fill((*i_hit).localPosition().y());
+      h_hits_lz->Fill((*i_hit).localPosition().z());
       h_hits_dcx->Fill((*i_hit).localDireCos().x());
       h_hits_dcy->Fill((*i_hit).localDireCos().y());
       h_hits_dcz->Fill((*i_hit).localDireCos().z());
@@ -235,9 +231,9 @@ StatusCode TGCHitAnalysis::execute() {
       m_hits_r->push_back(p.perp());
       m_hits_eta->push_back(p.eta());
       m_hits_phi->push_back(p.phi());
-      m_hits_lx->push_back( (*i_hit).localPosition().x());
-      m_hits_ly->push_back( (*i_hit).localPosition().y());
-      m_hits_lz->push_back( (*i_hit).localPosition().z());
+      m_hits_lx->push_back((*i_hit).localPosition().x());
+      m_hits_ly->push_back((*i_hit).localPosition().y());
+      m_hits_lz->push_back((*i_hit).localPosition().z());
       m_hits_dcx->push_back((*i_hit).localDireCos().x());
       m_hits_dcy->push_back((*i_hit).localDireCos().y());
       m_hits_dcz->push_back((*i_hit).localDireCos().z());
@@ -250,6 +246,5 @@ StatusCode TGCHitAnalysis::execute() {
   
   if (m_tree) m_tree->Fill();
 
-
-  return StatusCode::SUCCESS;
+  return StatusCode::SUCCESS; 
 }
diff --git a/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.h
index 74a73d450312bf0dc6c073df970cd3f3b8f80ef1..e27066d14b0b18660146fad18719d7f62078409e 100755
--- a/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/TGCHitAnalysis.h
@@ -16,11 +16,11 @@
 #include "TH2.h"
 #include "TTree.h"
 
-
 class TH1;
 class TH2;
 class TTree;
- 
+
+
 class TGCHitAnalysis : public AthAlgorithm {
 
  public:
@@ -34,8 +34,6 @@ class TGCHitAnalysis : public AthAlgorithm {
  private:
 
    /** Some variables**/
-
-
    TH1* h_hits_x;
    TH1* h_hits_y;
    TH1* h_hits_z;
@@ -72,8 +70,6 @@ class TGCHitAnalysis : public AthAlgorithm {
    std::vector<float>* m_hits_kine;
    std::vector<float>* m_hits_step;
    
-   
-   
    TTree * m_tree;
    std::string m_ntupleFileName; 
    std::string m_path;
@@ -82,4 +78,3 @@ class TGCHitAnalysis : public AthAlgorithm {
 };
 
 #endif // TGC_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/TRTHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/TRTHitAnalysis.cxx
index e5fdacefa9374b5726c2b48cd0260f4011ffe2d5..c0cfe7c29180366318b4d9ccdd39c9b6b58aae04 100755
--- a/Simulation/Tools/HitAnalysis/src/TRTHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/TRTHitAnalysis.cxx
@@ -12,7 +12,6 @@
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -44,24 +43,24 @@ TRTHitAnalysis::TRTHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator
    , m_TRT_kine_photons(0)
    , m_TRT_kine_nonphotons(0)
    , m_TRT_barcode(0)
+     
    , m_tree(0)
-   , m_path("/histos/TRTHitAnalysis/")
-   , m_ntupleFileName("/ntuples/TRTHitAnalysis/")
+   , m_ntupleFileName("/TRTHitAnalysis/")
+   , m_path("/TRTHitAnalysis/")
    , m_thistSvc("THistSvc", name)
-   
 {
-  declareProperty("HistPath", m_path);
   declareProperty("NtupleFileName", m_ntupleFileName);
+  declareProperty("HistPath", m_path);
 }
 
+
 StatusCode TRTHitAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing TRTHitAnalysis" );
 
   // Grab the Ntuple and histogramming service for the tree
   CHECK(m_thistSvc.retrieve());
-
+  
   /** Histograms **/
-
   h_TRT_x = new TH1D("h_TRT_x","hits_x", 100,-1100, 1100);
   h_TRT_x->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_TRT_x->GetName(), h_TRT_x));
@@ -114,14 +113,12 @@ StatusCode TRTHitAnalysis::initialize() {
   h_TRT_barcode->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_TRT_barcode->GetName(), h_TRT_barcode));
 
-
-  /*ntuples*/
-
-  m_tree= new TTree("TRTHitNtuple","TRTHitAna");
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
+  /** now add branches and leaves to the tree */
+  m_tree = new TTree("TRT","TRT");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/";
   CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
 
-  if (m_tree){
+  if (m_tree) {
     m_tree->Branch("x", &m_TRT_x);
     m_tree->Branch("y", &m_TRT_y);
     m_tree->Branch("z", &m_TRT_z);
@@ -133,15 +130,14 @@ StatusCode TRTHitAnalysis::initialize() {
     m_tree->Branch("KineticEnergy_photons", &m_TRT_kine_photons);
     m_tree->Branch("KineticEnergy_nonphotons", &m_TRT_kine_nonphotons);
     m_tree->Branch("barcode", &m_TRT_barcode);
-  }else{
+  }
+  else {
     ATH_MSG_ERROR("No tree found!");
   }
   
-  
   return StatusCode::SUCCESS;
 }		 
 
-  
 
 StatusCode TRTHitAnalysis::execute() {
   ATH_MSG_DEBUG( "In TRTHitAnalysis::execute()" );
@@ -159,48 +155,46 @@ StatusCode TRTHitAnalysis::execute() {
   m_TRT_barcode->clear();
   
   const DataHandle<TRTUncompressedHitCollection> p_collection;
-    if (evtStore()->retrieve(p_collection, "TRTUncompressedHits" )==StatusCode::SUCCESS) {
-      for(TRTUncompressedHitConstIter i_hit = p_collection->begin(); 
-	            i_hit != p_collection->end();++i_hit){
-	GeoTRTUncompressedHit ghit(*i_hit);
-	HepGeom::Point3D<double> p = ghit.getGlobalPosition();
-
-        h_TRT_x->Fill(p.x());
-        h_TRT_y->Fill(p.y());
-        h_TRT_z->Fill(p.z());
-        h_TRT_r->Fill(p.perp());
-        h_TRT_xy->Fill(p.x(), p.y());
-        h_TRT_zr->Fill(p.z(),sqrt(pow(p.x(),2)+pow(p.y(),2)));
-        h_TRT_barcode->Fill(i_hit->particleLink().barcode());
-
-	m_TRT_x->push_back(p.x());
-	m_TRT_y->push_back(p.y());
-	m_TRT_z->push_back(p.z());
-	m_TRT_r->push_back(p.perp());
-	m_TRT_barcode->push_back(i_hit->particleLink().barcode());
-        int particleId(i_hit->GetParticleEncoding());
-        if(particleId == 22 || static_cast<int>(abs(particleId)/100000)==41 || static_cast<int>(abs(particleId)/10000000) == 1){
-          h_TRT_time_photons->Fill(i_hit->GetGlobalTime());
-          h_TRT_edep_photons->Fill(i_hit->GetEnergyDeposit());
-          h_TRT_kine_photons->Fill(i_hit->GetKineticEnergy());
-	  m_TRT_time_photons->push_back(i_hit->GetGlobalTime());
-	  m_TRT_edep_photons->push_back(i_hit->GetEnergyDeposit());
-	  m_TRT_kine_photons->push_back(i_hit->GetKineticEnergy());
-        }else{
-          h_TRT_time_nonphotons->Fill(i_hit->GetGlobalTime());
-          h_TRT_edep_nonphotons->Fill(i_hit->GetEnergyDeposit());
-          h_TRT_kine_nonphotons->Fill(i_hit->GetKineticEnergy());
-	  
-	  m_TRT_time_nonphotons->push_back(i_hit->GetGlobalTime());
-	  m_TRT_edep_nonphotons->push_back(i_hit->GetEnergyDeposit());
-	  m_TRT_kine_nonphotons->push_back(i_hit->GetKineticEnergy());
-        }
-      } // End while hits                                                                                                                                                  
-    } 
-    if (m_tree) m_tree->Fill();
-
+  if (evtStore()->retrieve(p_collection, "TRTUncompressedHits") == StatusCode::SUCCESS) {
+    for (TRTUncompressedHitConstIter i_hit = p_collection->begin(); i_hit != p_collection->end(); ++i_hit) {
+      GeoTRTUncompressedHit ghit(*i_hit);
+      HepGeom::Point3D<double> p = ghit.getGlobalPosition();
+
+      h_TRT_x->Fill(p.x());
+      h_TRT_y->Fill(p.y());
+      h_TRT_z->Fill(p.z());
+      h_TRT_r->Fill(p.perp());
+      h_TRT_xy->Fill(p.x(), p.y());
+      h_TRT_zr->Fill(p.z(),sqrt(pow(p.x(),2)+pow(p.y(),2)));
+      h_TRT_barcode->Fill(i_hit->particleLink().barcode());
+
+      m_TRT_x->push_back(p.x());
+      m_TRT_y->push_back(p.y());
+      m_TRT_z->push_back(p.z());
+      m_TRT_r->push_back(p.perp());
+      m_TRT_barcode->push_back(i_hit->particleLink().barcode());
       
+      int particleId(i_hit->GetParticleEncoding());
+      if(particleId == 22 || static_cast<int>(abs(particleId)/100000)==41 || static_cast<int>(abs(particleId)/10000000)==1) {
+	h_TRT_time_photons->Fill(i_hit->GetGlobalTime());
+	h_TRT_edep_photons->Fill(i_hit->GetEnergyDeposit());
+	h_TRT_kine_photons->Fill(i_hit->GetKineticEnergy());
+	m_TRT_time_photons->push_back(i_hit->GetGlobalTime());
+	m_TRT_edep_photons->push_back(i_hit->GetEnergyDeposit());
+	m_TRT_kine_photons->push_back(i_hit->GetKineticEnergy());
+      }
+      else {
+	h_TRT_time_nonphotons->Fill(i_hit->GetGlobalTime());
+	h_TRT_edep_nonphotons->Fill(i_hit->GetEnergyDeposit());
+	h_TRT_kine_nonphotons->Fill(i_hit->GetKineticEnergy());	  
+	m_TRT_time_nonphotons->push_back(i_hit->GetGlobalTime());
+	m_TRT_edep_nonphotons->push_back(i_hit->GetEnergyDeposit());
+	m_TRT_kine_nonphotons->push_back(i_hit->GetKineticEnergy());
+      }
+    } // End while hits
+  }
+  
+  if (m_tree) m_tree->Fill();      
 
   return StatusCode::SUCCESS;
 }
-
diff --git a/Simulation/Tools/HitAnalysis/src/TRTHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/TRTHitAnalysis.h
index 7c34cfe043cdb34c2f6f8f843b906f72ca32ff59..de25e66b7913378f0a9b22f062a5361a6794d64a 100755
--- a/Simulation/Tools/HitAnalysis/src/TRTHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/TRTHitAnalysis.h
@@ -10,7 +10,6 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ITHistSvc.h"
 
-
 #include <string>
 #include <vector>
 #include "TH1.h"
@@ -20,7 +19,8 @@
 class TH1;
 class TH2;
 class TTree;
- 
+
+
 class TRTHitAnalysis : public AthAlgorithm {
 
  public:
@@ -48,7 +48,6 @@ class TRTHitAnalysis : public AthAlgorithm {
    TH1* h_TRT_kine_nonphotons;
    TH1* h_TRT_barcode;
 
-
    std::vector<float>* m_TRT_x;
    std::vector<float>* m_TRT_y;
    std::vector<float>* m_TRT_z;
@@ -64,10 +63,8 @@ class TRTHitAnalysis : public AthAlgorithm {
    TTree * m_tree;
    std::string m_path;
    std::string m_ntupleFileName; 
-   ServiceHandle<ITHistSvc>  m_thistSvc;
-
+   ServiceHandle<ITHistSvc> m_thistSvc;
 
 };
 
 #endif // TRT_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/TrackRecordAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/TrackRecordAnalysis.cxx
index 92e687af1d599a7859e1de4445ddf53f13b7ffe3..c74f23f614214bfbeee7359b8316368e67e62940 100755
--- a/Simulation/Tools/HitAnalysis/src/TrackRecordAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/TrackRecordAnalysis.cxx
@@ -5,7 +5,6 @@
 #include "TrackRecordAnalysis.h"
 
 // Section of includes for TrackRecord tests
-
 #include "TrackRecord/TrackRecord.h"
 #include "TrackRecord/TrackRecordCollection.h"
 #include "CLHEP/Vector/LorentzVector.h"
@@ -14,7 +13,6 @@
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -51,38 +49,45 @@ TrackRecordAnalysis::TrackRecordAnalysis(const std::string& name, ISvcLocator* p
    , m_time(0)
    , m_edep(0)
    , m_pdg(0)
+     
+   , m_collection("CaloEntryLayer")
+     
    , m_tree(0)
-   , m_ntupleFileName("/TrackRecordAnalysis/ntuple/")
-   , m_path("/TrackRecordAnalysis/histos/")
+   , m_ntupleFileName("/TrackRecordAnalysis/")
+   , m_path("/TrackRecordAnalysis/")
    , m_thistSvc("THistSvc", name)
-   , m_collection("CaloEntryLayer")
 {
+  declareProperty("CollectionName", m_collection="CaloEntryLayer"); 
   declareProperty("NtupleFileName", m_ntupleFileName);
   declareProperty("HistPath", m_path); 
-  declareProperty("CollectionName", m_collection="CaloEntryLayer"); 
 }
 
+
 StatusCode TrackRecordAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing TrackRecordAnalysis" );
 
-  // Grab the Ntuple and histogramming service for the tree
   std::string detName("CaloEntry");
   std::string ntupName("TrackRecordCaloEntry");
-  if(m_collection=="CaloEntryLayer"){
+  
+  if (m_collection == "CaloEntryLayer") {
     detName="CaloEntry";
     ntupName="TrackRecordCaloEntry";
-  } else if(m_collection=="MuonEntryLayer"){
+  }
+  else if (m_collection == "MuonEntryLayer") {
     detName="MuonEntry";
     ntupName="TrackRecordMuonEntry";
-  } else if(m_collection=="MuonExitLayer"){
+  }
+  else if (m_collection == "MuonExitLayer") {
     detName="MuonExit";
     ntupName="TrackRecordMuonExit";
-  }else{
+  }
+  else {
     ATH_MSG_ERROR("TrackRecordAnalysis for "<< name() << "not supported !!! \n");
     return StatusCode::FAILURE;
-
   }
-  std::cout<<"Name "<<name()<<std::endl;
+  
+  std::cout << "Name " << name() << std::endl;
+  
   //Grab the Ntuple and histogramming service for the tree
   CHECK(m_thistSvc.retrieve());
 
@@ -93,7 +98,7 @@ StatusCode TrackRecordAnalysis::initialize() {
   float eta_up = 5.8;
   float z_down = -7000;
   float z_up = 7000;
-  if(detName =="CaloEntry"){
+  if (detName == "CaloEntry") {
     x_down = -1180;
     x_up =  1180;
     radius = 1200;
@@ -101,7 +106,6 @@ StatusCode TrackRecordAnalysis::initialize() {
     eta_up = 5.6;
     z_down = -3700;
     z_up = 3700;
-
   }
 
   /** Histograms**/
@@ -165,37 +169,33 @@ StatusCode TrackRecordAnalysis::initialize() {
   h_pdg->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_pdg->GetName(), h_pdg));
 
-
-  m_tree= new TTree(ntupName.c_str(),ntupName.c_str());
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/"+detName;
+  /** now add branches and leaves to the tree */
+  m_tree = new TTree(ntupName.c_str(), ntupName.c_str());
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/" + detName;
   CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
-  
-    
     
-      /** now add branches and leaves to the tree */
-      if (m_tree){
-        m_tree->Branch("x", &m_x);
-        m_tree->Branch("y", &m_y);
-        m_tree->Branch("z", &m_z);
-        m_tree->Branch("r", &m_r);
-        m_tree->Branch("eta", &m_eta);
-        m_tree->Branch("phi", &m_phi);
-        m_tree->Branch("px", &m_px);
-        m_tree->Branch("py", &m_py);
-        m_tree->Branch("pz", &m_pz);
-        m_tree->Branch("pt", &m_pt);
-        m_tree->Branch("time", &m_time);
-        m_tree->Branch("energy", &m_edep);
-        m_tree->Branch("pdg", &m_pdg);
-      }else{
-        ATH_MSG_ERROR("No tree found!");
-      }
-
+  if (m_tree){
+    m_tree->Branch("x", &m_x);
+    m_tree->Branch("y", &m_y);
+    m_tree->Branch("z", &m_z);
+    m_tree->Branch("r", &m_r);
+    m_tree->Branch("eta", &m_eta);
+    m_tree->Branch("phi", &m_phi);
+    m_tree->Branch("px", &m_px);
+    m_tree->Branch("py", &m_py);
+    m_tree->Branch("pz", &m_pz);
+    m_tree->Branch("pt", &m_pt);
+    m_tree->Branch("time", &m_time);
+    m_tree->Branch("energy", &m_edep);
+    m_tree->Branch("pdg", &m_pdg);
+  }
+  else {
+    ATH_MSG_ERROR("No tree found!");
+  }
 
   return StatusCode::SUCCESS;
 }		 
 
-  
 
 StatusCode TrackRecordAnalysis::execute() {
   ATH_MSG_DEBUG( "In TrackRecordAnalysis::execute()" );
@@ -214,51 +214,49 @@ StatusCode TrackRecordAnalysis::execute() {
   m_edep->clear();
   m_pdg->clear();
     
-    const DataHandle<TrackRecordCollection> TRcoll;
-    if (evtStore()->retrieve(TRcoll, m_collection )==StatusCode::SUCCESS) {
-    for(TrackRecordCollection::const_iterator track = TRcoll->begin(); 
-  	            track != TRcoll->end();++track){
-    //TrackRecordCollection::const_iterator track;
-    //for(auto track : *TRcoll){
-      std::cout<<"Entra en el loop"<<std::endl;
+  const DataHandle<TrackRecordCollection> TRcoll;
+  if (evtStore()->retrieve(TRcoll, m_collection ) == StatusCode::SUCCESS) {
+    for (TrackRecordCollection::const_iterator track = TRcoll->begin(); track != TRcoll->end(); ++track) {
+      //TrackRecordCollection::const_iterator track;
+      //for(auto track : *TRcoll){
+      //std::cout<<"Entra en el loop"<<std::endl;
+      
       CLHEP::Hep3Vector p =(*track).GetPosition();
-        h_hits_x->Fill(p.x());
-        h_hits_y->Fill(p.y());
-        h_hits_z->Fill(p.z());
-        h_hits_r->Fill(p.perp());
-	h_xy->Fill(p.x(), p.y());
-	h_zr->Fill(p.z(),p.perp());
-        h_hits_eta->Fill(p.eta());
-        h_hits_phi->Fill(p.phi());
-	CLHEP::Hep3Vector mom = (*track).GetMomentum();
-	h_hits_px->Fill( mom.x());
-	h_hits_py->Fill( mom.y());
-	h_hits_pz->Fill( mom.z());
-	h_hits_pt->Fill( mom.perp());
-        h_edep->Fill((*track).GetEnergy());
-        h_time->Fill((*track).GetTime());
-        h_pdg->Fill((*track).GetPDGCode());
+      h_hits_x->Fill(p.x());
+      h_hits_y->Fill(p.y());
+      h_hits_z->Fill(p.z());
+      h_hits_r->Fill(p.perp());
+      h_xy->Fill(p.x(), p.y());
+      h_zr->Fill(p.z(),p.perp());
+      h_hits_eta->Fill(p.eta());
+      h_hits_phi->Fill(p.phi());
+      
+      CLHEP::Hep3Vector mom = (*track).GetMomentum();
+      h_hits_px->Fill(mom.x());
+      h_hits_py->Fill(mom.y());
+      h_hits_pz->Fill(mom.z());
+      h_hits_pt->Fill(mom.perp());
+      h_edep->Fill((*track).GetEnergy());
+      h_time->Fill((*track).GetTime());
+      h_pdg->Fill((*track).GetPDGCode());
   
-	m_x->push_back(p.x());
-	m_y->push_back(p.y());
-	m_z->push_back(p.z());
-	m_r->push_back(p.perp());
-	m_eta->push_back(p.eta());
-	m_phi->push_back(p.phi());
-	m_px->push_back( mom.x());
-	m_py->push_back( mom.y());
-	m_pz->push_back( mom.z());
-	m_pt->push_back( mom.perp());
-	m_edep->push_back((*track).GetEnergy());
-	m_time->push_back((*track).GetTime());
-	m_pdg->push_back((*track).GetPDGCode());
-	}
-     } // End while hits
-   
+      m_x->push_back(p.x());
+      m_y->push_back(p.y());
+      m_z->push_back(p.z());
+      m_r->push_back(p.perp());
+      m_eta->push_back(p.eta());
+      m_phi->push_back(p.phi());
+      m_px->push_back(mom.x());
+      m_py->push_back(mom.y());
+      m_pz->push_back(mom.z());
+      m_pt->push_back(mom.perp());
+      m_edep->push_back((*track).GetEnergy());
+      m_time->push_back((*track).GetTime());
+      m_pdg->push_back((*track).GetPDGCode());
+    }
+  } // End while hits 
  
-    if (m_tree) m_tree->Fill();
+  if (m_tree) m_tree->Fill();
  
-
-
   return StatusCode::SUCCESS;
 }
diff --git a/Simulation/Tools/HitAnalysis/src/TrackRecordAnalysis.h b/Simulation/Tools/HitAnalysis/src/TrackRecordAnalysis.h
index 9f530143fde1b4695f4e4139edb67d72c2183d0b..3915bcd40c40bbfd38be0bb1e6392bbf5feff616 100755
--- a/Simulation/Tools/HitAnalysis/src/TrackRecordAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/TrackRecordAnalysis.h
@@ -16,8 +16,6 @@
 #include "TH2.h"
 #include "TTree.h"
 
-
-
 class TH1;
 class TH2;
 class TTree;
@@ -35,7 +33,6 @@ class TrackRecordAnalysis : public AthAlgorithm {
 
  private:
    
-
    /** Some variables**/
    TH1* h_hits_x;
    TH1* h_hits_y;
@@ -53,8 +50,6 @@ class TrackRecordAnalysis : public AthAlgorithm {
    TH1* h_edep;
    TH1* h_pdg;
 
-
-   
    std::vector<float>* m_x;
    std::vector<float>* m_y;
    std::vector<float>* m_z;
@@ -68,13 +63,14 @@ class TrackRecordAnalysis : public AthAlgorithm {
    std::vector<float>* m_time;
    std::vector<float>* m_edep;
    std::vector<float>* m_pdg;
+
+   std::string m_collection;
         
    TTree * m_tree;
    std::string m_ntupleFileName; 
    std::string m_path; 
    ServiceHandle<ITHistSvc>  m_thistSvc;
-   std::string m_collection;
+
 };
 
 #endif // TRACK_RECORD_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.cxx
index 36025ca049e38c4eca204129de9f74d55a1b5d5b..08e9927572c76037e8b7f925a49a8faaf4350853 100755
--- a/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.cxx
@@ -14,7 +14,6 @@
 #include "TTree.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -64,22 +63,22 @@ TruthHitAnalysis::TruthHitAnalysis(const std::string& name, ISvcLocator* pSvcLoc
    , m_barcode(0)
    , m_status(0)
    , m_pdgid(0)
+     
    , m_tree(0)
-   , m_ntupleFileName("/TruthHitAnalysis/ntuples/")
-   , m_path("/TruthHitAnalysis/histos/")
+   , m_ntupleFileName("/TruthHitAnalysis/")
+   , m_path("/TruthHitAnalysis/")
    , m_thistSvc("THistSvc", name)
-   
 {
-  declareProperty("HistPath", m_path); 
-  declareProperty("NtupleFileName", m_ntupleFileName); 
+  declareProperty("NtupleFileName", m_ntupleFileName);
+  declareProperty("HistPath", m_path);  
 }
 
+
 StatusCode TruthHitAnalysis::initialize() {
   ATH_MSG_DEBUG( "Initializing TruthHitAnalysis" );
 
   // Grab the Ntuple and histogramming service for the tree
   CHECK(m_thistSvc.retrieve());
- 
 
   /** histograms declaration */
   h_n_vert = new TH1D("h_n_vert","n_vert", 100,200, 1500);
@@ -94,7 +93,6 @@ StatusCode TruthHitAnalysis::initialize() {
   h_n_vert_prim->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_n_vert_prim->GetName(), h_n_vert_prim));
 
-
   h_n_part_prim = new TH1D("h_n_part_prim","n_part prim", 100,200, 1500);
   h_n_part_prim->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_n_part_prim->GetName(), h_n_part_prim));
@@ -139,7 +137,6 @@ StatusCode TruthHitAnalysis::initialize() {
   h_vtx_sec_zr->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_vtx_sec_zr->GetName(), h_vtx_sec_zr));
 
-
   h_n_generations = new TH1D("h_n_generations","h_generations", 100,0, 25);
   h_n_generations->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_n_generations->GetName(), h_n_generations));
@@ -196,16 +193,12 @@ StatusCode TruthHitAnalysis::initialize() {
   h_part_p->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_part_p->GetName(), h_part_p));
 
-
-  m_tree= new TTree("TruthHitNtuple ","TruthHitAna");
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
+  /** now add branches and leaves to the tree */
+  m_tree = new TTree("Truth", "Truth");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/";
   CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
   
-  
-  
-  /** now add branches and leaves to the tree */
-  if (m_tree){
-
+  if (m_tree) {
     m_tree->Branch("vtx_x", &m_vtx_x);
     m_tree->Branch("vtx_y", &m_vtx_y);
     m_tree->Branch("vtx_z", &m_vtx_z);
@@ -219,17 +212,15 @@ StatusCode TruthHitAnalysis::initialize() {
     m_tree->Branch("truth_phi", &m_truth_phi);
     m_tree->Branch("barcode", &m_barcode);
     m_tree->Branch("status", &m_status);
-    m_tree->Branch("pdg_id", &m_pdgid);
-    
-  }else{
+    m_tree->Branch("pdg_id", &m_pdgid); 
+  }
+  else {
     ATH_MSG_ERROR("No tree found!");
   }
-  
 
   return StatusCode::SUCCESS;
-}		 
+}
 
-  
 
 StatusCode TruthHitAnalysis::execute() {
   ATH_MSG_DEBUG( "In TruthHitAnalysis::execute()" );
@@ -248,111 +239,103 @@ StatusCode TruthHitAnalysis::execute() {
   m_barcode->clear();
   m_status->clear();
   m_pdgid->clear();
-
   
   const DataHandle<EventInfo> event;
   if (!evtStore()->retrieve(event, "McEventInfo" ).isSuccess()) 
     return StatusCode::FAILURE;
-      const DataHandle<McEventCollection> mcCollection;
-      if(evtStore()->retrieve(mcCollection,"TruthEvent")==StatusCode::SUCCESS){
-	McEventCollection::const_iterator currentGenEventIter = mcCollection->begin(); 
-	if(currentGenEventIter != mcCollection->end()){
-	    int nvtx = 0;
-	    int nvtx_sec=0;
-            for(HepMC::GenEvent::vertex_const_iterator vtx=(*currentGenEventIter)->vertices_begin(); vtx!=(*currentGenEventIter)->vertices_end();++vtx){
-
-
-	        double x = (*vtx)->position().x();
-      	        double y = (*vtx)->position().y();
-	        double z = (*vtx)->position().z();
-	        double r = sqrt(x*x+y*y);
-		h_vtx_x->Fill(x);
-		h_vtx_y->Fill(y);
-	        h_vtx_r->Fill(r);
-	        h_vtx_z->Fill(z);
-
-
-		int bcode = (*vtx)->barcode();
-		m_vtx_x->push_back(x);
-		m_vtx_y->push_back(y);
-		m_vtx_r->push_back(r);
-		m_vtx_z->push_back(z);
-		m_vtx_barcode->push_back(bcode);
-
-		if((*vtx)->barcode()>-20000){
-		  h_vtx_prim_xy->Fill(x,y);
-		  h_vtx_prim_zr->Fill(z,r);
-                 ++nvtx;
-                } else{
-		  h_vtx_sec_xy->Fill(x,y);
-		  h_vtx_sec_zr->Fill(z,r);
-		  ++nvtx_sec; 
-                }
-
-	      } //End iteration over vertices
-
-	     h_n_vert->Fill(nvtx+nvtx_sec);
-	     h_n_vert_prim->Fill(nvtx);
-	     h_n_vert_sec->Fill(nvtx_sec);
-		int npart_prim=0; 
-		int npart_sec=0;
-		HepMC::GenEvent::particle_const_iterator currentGenParticleIter;
-	     for(currentGenParticleIter=(*currentGenEventIter)->particles_begin(); currentGenParticleIter!=(*currentGenEventIter)->particles_end(); ++currentGenParticleIter){
-
-
-	        const HepMC::FourVector mom=(*currentGenParticleIter)->momentum();             
-
-
-                h_truth_px->Fill(mom.x());
-                h_truth_py->Fill(mom.y());
-                h_truth_pz->Fill(mom.z());
-                h_truth_pt->Fill(mom.perp());
-                h_truth_eta->Fill(mom.eta());
-                h_truth_phi->Fill(mom.phi());
-                h_barcode->Fill((*currentGenParticleIter)->barcode());
-
-		h_part_status->Fill((*currentGenParticleIter)->status());
-		
-		m_truth_px->push_back(mom.x());
-		m_truth_py->push_back(mom.y());
-		m_truth_pz->push_back(mom.z());
-		m_truth_pt->push_back(mom.perp());
-		m_truth_eta->push_back(mom.eta());
-		m_truth_phi->push_back(mom.phi());
-		m_barcode->push_back((*currentGenParticleIter)->barcode());		
-		m_status->push_back((*currentGenParticleIter)->status());
-	        int pdg = (*currentGenParticleIter)->pdg_id();
-		m_pdgid->push_back(pdg);
-
-                 if((*currentGenParticleIter)->barcode()<200000){
-		   h_part_pdgid->Fill(pdg);
-		   h_part_p->Fill(mom.rho());
-		   h_part_eta->Fill(mom.eta());
-		   h_part_phi->Fill(mom.phi());
-		   ++npart_prim; 
-		   if((*currentGenParticleIter)->barcode()<10000){
-		     h_n_generations->Fill(0);
-		   }else{
-		     h_n_generations->Fill(1);
-		   }
-                } //End barcode <200000
-		else{
-		  h_part_pdgid_sec->Fill(pdg);
-		  ++npart_sec;
-		  const int gen = (*currentGenParticleIter)->barcode()/1000000 +2;
-		  h_n_generations ->Fill(gen);    
-		}             }  // End iteration over particles
-
-		  h_n_part_prim->Fill(npart_prim);
-		  h_n_part_sec->Fill(npart_sec);
-		  h_n_part->Fill(npart_prim+npart_sec);
+  const DataHandle<McEventCollection> mcCollection;
+  if (evtStore()->retrieve(mcCollection,"TruthEvent") == StatusCode::SUCCESS) {
+    McEventCollection::const_iterator currentGenEventIter = mcCollection->begin(); 
+    if (currentGenEventIter != mcCollection->end()) {
+      int nvtx = 0;
+      int nvtx_sec=0;
+      for (HepMC::GenEvent::vertex_const_iterator vtx=(*currentGenEventIter)->vertices_begin(); vtx!=(*currentGenEventIter)->vertices_end(); ++vtx) {
+	double x = (*vtx)->position().x();
+	double y = (*vtx)->position().y();
+	double z = (*vtx)->position().z();
+	double r = sqrt(x*x+y*y);
+	h_vtx_x->Fill(x);
+	h_vtx_y->Fill(y);
+	h_vtx_r->Fill(r);
+	h_vtx_z->Fill(z);
+
+	int bcode = (*vtx)->barcode();
+	m_vtx_x->push_back(x);
+	m_vtx_y->push_back(y);
+	m_vtx_r->push_back(r);
+	m_vtx_z->push_back(z);
+	m_vtx_barcode->push_back(bcode);
+
+	if ((*vtx)->barcode() > -20000) {
+	  h_vtx_prim_xy->Fill(x,y);
+	  h_vtx_prim_zr->Fill(z,r);
+	  ++nvtx;
+	}
+	else {
+	  h_vtx_sec_xy->Fill(x,y);
+	  h_vtx_sec_zr->Fill(z,r);
+	  ++nvtx_sec; 
+	}
+      } //End iteration over vertices
+
+      h_n_vert->Fill(nvtx+nvtx_sec);
+      h_n_vert_prim->Fill(nvtx);
+      h_n_vert_sec->Fill(nvtx_sec);
+
+      int npart_prim=0; 
+      int npart_sec=0;
+      HepMC::GenEvent::particle_const_iterator currentGenParticleIter;
+      for (currentGenParticleIter=(*currentGenEventIter)->particles_begin(); currentGenParticleIter!=(*currentGenEventIter)->particles_end(); ++currentGenParticleIter) {
+	const HepMC::FourVector mom = (*currentGenParticleIter)->momentum();
+
+	h_truth_px->Fill(mom.x());
+	h_truth_py->Fill(mom.y());
+	h_truth_pz->Fill(mom.z());
+	h_truth_pt->Fill(mom.perp());
+	h_truth_eta->Fill(mom.eta());
+	h_truth_phi->Fill(mom.phi());
+	h_barcode->Fill((*currentGenParticleIter)->barcode());
+	h_part_status->Fill((*currentGenParticleIter)->status());
+	m_truth_px->push_back(mom.x());
+	m_truth_py->push_back(mom.y());
+	m_truth_pz->push_back(mom.z());
+	m_truth_pt->push_back(mom.perp());
+	m_truth_eta->push_back(mom.eta());
+	m_truth_phi->push_back(mom.phi());
+	m_barcode->push_back((*currentGenParticleIter)->barcode());		
+	m_status->push_back((*currentGenParticleIter)->status());
+	
+	int pdg = (*currentGenParticleIter)->pdg_id();
+	m_pdgid->push_back(pdg);
 	
-	} // End mcCollection 
-      }    // End statuscode success upon retrieval of events
+	if ((*currentGenParticleIter)->barcode() < 200000) {
+	  h_part_pdgid->Fill(pdg);
+	  h_part_p->Fill(mom.rho());
+	  h_part_eta->Fill(mom.eta());
+	  h_part_phi->Fill(mom.phi());
+	  ++npart_prim; 
+	  if ((*currentGenParticleIter)->barcode() < 10000) {
+	    h_n_generations->Fill(0);
+	  }
+	  else {
+	    h_n_generations->Fill(1);
+	  }
+	} //End barcode <200000
+	else {
+	  h_part_pdgid_sec->Fill(pdg);
+	  ++npart_sec;
+	  const int gen = (*currentGenParticleIter)->barcode()/1000000 + 2;
+	  h_n_generations->Fill(gen);    
+	}
+      } // End iteration over particles
+
+      h_n_part_prim->Fill(npart_prim);
+      h_n_part_sec->Fill(npart_sec);
+      h_n_part->Fill(npart_prim+npart_sec);	
+    } // End mcCollection 
+  } // End statuscode success upon retrieval of events
  
-
-      if (m_tree) m_tree->Fill();
+  if (m_tree) m_tree->Fill();
 
   return StatusCode::SUCCESS;
 }
-
diff --git a/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.h
index e868d555a3d09d1d57ae541141adbe7c23d875d3..567639b8fdbbc8f050ecb2bd6ade93a32a71553a 100755
--- a/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/TruthHitAnalysis.h
@@ -10,7 +10,6 @@
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/ITHistSvc.h"
 
-
 #include <string>
 #include <vector>
 #include "TH1.h"
@@ -20,7 +19,8 @@
 class TH1;
 class TH2;
 class TTree;
- 
+
+
 class TruthHitAnalysis : public AthAlgorithm {
 
  public:
@@ -63,7 +63,6 @@ class TruthHitAnalysis : public AthAlgorithm {
    TH1* h_part_phi;
    TH1* h_part_p;
 
-
    std::vector<float>* m_vtx_x;
    std::vector<float>* m_vtx_y;
    std::vector<float>* m_vtx_z;
@@ -84,9 +83,6 @@ class TruthHitAnalysis : public AthAlgorithm {
    std::string m_path;
    ServiceHandle<ITHistSvc>  m_thistSvc;
 
-
-
 };
 
 #endif // TRUTH_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/HitAnalysis/src/ZDCHitAnalysis.cxx b/Simulation/Tools/HitAnalysis/src/ZDCHitAnalysis.cxx
index 7b838ddb1266acf312544ec72cbc17520d4545ab..ed6d1d565a01078fdce025ce188836622290372a 100755
--- a/Simulation/Tools/HitAnalysis/src/ZDCHitAnalysis.cxx
+++ b/Simulation/Tools/HitAnalysis/src/ZDCHitAnalysis.cxx
@@ -4,17 +4,14 @@
 
 #include "ZDCHitAnalysis.h"
 
-
 #include "ZDC_SimEvent/ZDC_SimStripHit_Collection.h"
 #include "ZDC_SimEvent/ZDC_SimStripHit.h"
 #include "ZDC_SimEvent/ZDC_SimPixelHit_Collection.h"
 #include "ZDC_SimEvent/ZDC_SimPixelHit.h"
 
-
 #include "TH1.h"
 #include "TString.h"
 
-
 #include <algorithm>
 #include <math.h>
 #include <functional>
@@ -22,25 +19,28 @@
 #include <stdio.h>
 
 ZDCHitAnalysis::ZDCHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator)
-   : AthAlgorithm(name, pSvcLocator)
-   , h_zdc_sidea_0(0)
-   , h_zdc_sidea_1(0)
-   , h_zdc_sidea_2(0)
-   , h_zdc_sidea_3(0)
-   , h_zdc_sidec_0(0)
-   , h_zdc_sidec_1(0)
-   , h_zdc_sidec_2(0)
-   , h_zdc_sidec_3(0)
-   , m_zdc_strip_side(0)
-   , m_zdc_strip_mod(0)
-   , m_zdc_strip_energy(0)
-   , m_zdc_pix_side(0)
-   , m_zdc_pix_mod(0)
-   , m_zdc_pix_energy(0)
-   , m_path("/ZDCHitAnalysis/")
-   , m_thistSvc("THistSvc", name)
+  : AthAlgorithm(name, pSvcLocator)
+  , h_zdc_sidea_0(0)
+  , h_zdc_sidea_1(0)
+  , h_zdc_sidea_2(0)
+  , h_zdc_sidea_3(0)
+  , h_zdc_sidec_0(0)
+  , h_zdc_sidec_1(0)
+  , h_zdc_sidec_2(0)
+  , h_zdc_sidec_3(0)
+  , m_zdc_strip_side(0)
+  , m_zdc_strip_mod(0)
+  , m_zdc_strip_energy(0)
+  , m_zdc_pix_side(0)
+  , m_zdc_pix_mod(0)
+  , m_zdc_pix_energy(0)
+  , m_tree(0)
+  , m_ntupleFileName("/ZDCHitAnalysis/")
+  , m_path("/ZDCHitAnalysis/")
+  , m_thistSvc("THistSvc", name)
 {
-  declareProperty("HistPath", m_path); 
+  declareProperty("NtupleFileName", m_ntupleFileName);
+  declareProperty("HistPath", m_path);
 }
 
 StatusCode ZDCHitAnalysis::initialize() {
@@ -50,7 +50,6 @@ StatusCode ZDCHitAnalysis::initialize() {
   CHECK(m_thistSvc.retrieve());
  
   /** Histograms*/
-
   h_zdc_sidea_0 = new TH1D("m_edep_side_a0","edep_side_a0", 100,0, 1000);
   h_zdc_sidea_0->StatOverflows();
   CHECK(m_thistSvc->regHist(m_path + h_zdc_sidea_0->GetName(), h_zdc_sidea_0));
@@ -84,27 +83,27 @@ StatusCode ZDCHitAnalysis::initialize() {
   CHECK(m_thistSvc->regHist(m_path + h_zdc_sidec_3->GetName(), h_zdc_sidec_3));
 
 
-  m_tree= new TTree("NtupleZDCHitAnalysis","ZDCHitAna");
-  std::string fullNtupleName =  "/"+m_ntupleFileName+"/";
+  /** now add branches and leaves to the tree */
+  m_tree = new TTree("ZDC","ZDC");
+  std::string fullNtupleName =  "/" + m_ntupleFileName + "/";
   CHECK(m_thistSvc->regTree(fullNtupleName,m_tree));
   
-      /** now add branches and leaves to the tree */
-      if (m_tree){
-        m_tree->Branch("strip_side", &m_zdc_strip_side);
-        m_tree->Branch("strip_mode", &m_zdc_strip_mod);
-        m_tree->Branch("strip_energy", &m_zdc_strip_energy);
-
-	m_tree->Branch("pix_side", &m_zdc_pix_side);
-        m_tree->Branch("pix_mode", &m_zdc_pix_mod);
-        m_tree->Branch("pix_energy", &m_zdc_pix_energy);
-    
-      }else{
-        ATH_MSG_ERROR("No tree found!");
-      }
+  if (m_tree) {
+    m_tree->Branch("strip_side", &m_zdc_strip_side);
+    m_tree->Branch("strip_mode", &m_zdc_strip_mod);
+    m_tree->Branch("strip_energy", &m_zdc_strip_energy);
+
+    m_tree->Branch("pix_side", &m_zdc_pix_side);
+    m_tree->Branch("pix_mode", &m_zdc_pix_mod);
+    m_tree->Branch("pix_energy", &m_zdc_pix_energy);  
+  }
+  else {
+    ATH_MSG_ERROR("No tree found!");
+  }
+
   return StatusCode::SUCCESS;
-}		 
+}
 
-  
 
 StatusCode ZDCHitAnalysis::execute() {
   ATH_MSG_DEBUG( "In ZDCHitAnalysis::execute()" );
@@ -115,24 +114,25 @@ StatusCode ZDCHitAnalysis::execute() {
   m_zdc_pix_side->clear();
   m_zdc_pix_mod->clear();
   m_zdc_pix_energy->clear();
+
   double ene_strip = -999.;
   int side_strip = -1;
-  int mod_strip  = -1;
+  int mod_strip = -1;
   double ene_pix = -999.;
   int side_pix = -1;
-  int mod_pix  = -1;
+  int mod_pix = -1;
 
   ZDC_SimStripHit_ConstIterator striphi;
   const DataHandle<ZDC_SimStripHit_Collection> stripiter;
   CHECK(evtStore()->retrieve(stripiter,"ZDC_SimStripHit_Collection"));
-  for(striphi=(*stripiter).begin(); striphi != (*stripiter).end();++striphi){
+  for (striphi=(*stripiter).begin(); striphi != (*stripiter).end(); ++striphi) {
     ZDC_SimStripHit ghit(*striphi);
-     ene_strip=ghit.GetEdep();
-     side_strip = ghit.GetSide();
-     mod_strip  = ghit.GetMod();
+    ene_strip = ghit.GetEdep();
+    side_strip = ghit.GetSide();
+    mod_strip = ghit.GetMod();
     
-    if(side_pix==1){
-      switch(mod_strip){
+    if (side_pix==1) {
+      switch (mod_strip) {
       case 0:
 	h_zdc_sidea_0->Fill(ene_strip);
 	break;
@@ -146,8 +146,9 @@ StatusCode ZDCHitAnalysis::execute() {
 	h_zdc_sidea_3->Fill(ene_strip);
 	break;
       }
-    }else{
-      switch (mod_strip){
+    }
+    else {
+      switch (mod_strip) {
       case 0:
 	h_zdc_sidec_0->Fill(ene_strip);
 	break;
@@ -167,14 +168,14 @@ StatusCode ZDCHitAnalysis::execute() {
   ZDC_SimPixelHit_ConstIterator pixelhi;
   const DataHandle<ZDC_SimPixelHit_Collection> pixeliter;
   CHECK(evtStore()->retrieve(pixeliter,"ZDC_SimPixelHit_Collection"));
-  for(pixelhi=(*pixeliter).begin(); pixelhi != (*pixeliter).end();++pixelhi){
+  for (pixelhi=(*pixeliter).begin(); pixelhi != (*pixeliter).end(); ++pixelhi) {
     ZDC_SimPixelHit ghit(*pixelhi);
-     ene_pix=ghit.GetEdep();
-     side_pix = ghit.GetSide();
-     mod_pix  = ghit.GetMod();
+    ene_pix = ghit.GetEdep();
+    side_pix = ghit.GetSide();
+    mod_pix = ghit.GetMod();
     
-    if(side_pix==1){
-      switch(mod_pix){
+    if (side_pix==1) {
+      switch (mod_pix) {
       case 0:
 	h_zdc_sidea_0->Fill(ene_pix);
 	break;
@@ -188,8 +189,9 @@ StatusCode ZDCHitAnalysis::execute() {
 	h_zdc_sidea_3->Fill(ene_pix);
 	break;
       }
-    }else{
-      switch (mod_pix){
+    }
+    else {
+      switch (mod_pix) {
       case 0:
 	h_zdc_sidec_0->Fill(ene_pix);
 	break;
@@ -205,14 +207,15 @@ StatusCode ZDCHitAnalysis::execute() {
       }
     }
   
-  m_zdc_strip_side->push_back(side_strip);
-  m_zdc_strip_mod->push_back(mod_strip);
-  m_zdc_strip_energy->push_back(ene_strip);
-  m_zdc_pix_side->push_back(side_pix);
-  m_zdc_pix_mod->push_back(mod_pix);
-  m_zdc_pix_energy->push_back(ene_pix);
+    m_zdc_strip_side->push_back(side_strip);
+    m_zdc_strip_mod->push_back(mod_strip);
+    m_zdc_strip_energy->push_back(ene_strip);
+    m_zdc_pix_side->push_back(side_pix);
+    m_zdc_pix_mod->push_back(mod_pix);
+    m_zdc_pix_energy->push_back(ene_pix);
   }
 
   if (m_tree) m_tree->Fill();
+  
   return StatusCode::SUCCESS;
 }
diff --git a/Simulation/Tools/HitAnalysis/src/ZDCHitAnalysis.h b/Simulation/Tools/HitAnalysis/src/ZDCHitAnalysis.h
index cf7678b4e77f7e72e20a8687084d36fd68b6afd2..a0d2edab82a9a2a527bfc57f1f5d7bbfc3bcb31a 100755
--- a/Simulation/Tools/HitAnalysis/src/ZDCHitAnalysis.h
+++ b/Simulation/Tools/HitAnalysis/src/ZDCHitAnalysis.h
@@ -15,7 +15,6 @@
 #include "TH1.h"
 #include "TTree.h"
 
-
 class TH1;
 class TTree;
 
@@ -58,4 +57,3 @@ class ZDCHitAnalysis : public AthAlgorithm {
 };
 
 #endif // ZDC_HIT_ANALYSIS_H
-
diff --git a/Simulation/Tools/McEventCollectionFilter/cmt/requirements b/Simulation/Tools/McEventCollectionFilter/cmt/requirements
deleted file mode 100644
index f0d2ceec43b84aca0bd9c052e0c9d038c1656b7b..0000000000000000000000000000000000000000
--- a/Simulation/Tools/McEventCollectionFilter/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package McEventCollectionFilter
-
-author Oleg Fedin <Oleg.Fedin@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*        External
-
-apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_joboptions files="*.txt *.py"
-
-apply_pattern declare_python_modules files="*.py"
-
-
-private
-
-use AtlasCLHEP          AtlasCLHEP-*            External
-use GaudiInterface      GaudiInterface-*        External
-use AtlasHepMC          AtlasHepMC-*            External
-
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use GeoPrimitives      GeoPrimitives-*    DetectorDescription
-
-use InDetSimEvent       InDetSimEvent-*         InnerDetector
-use MuonSimEvent        MuonSimEvent-*          MuonSpectrometer
-
-use GeneratorObjects    GeneratorObjects-*      Generators
diff --git a/Simulation/TruthJiveXML/cmt/requirements b/Simulation/TruthJiveXML/cmt/requirements
deleted file mode 100755
index 664163158d831c3f6963a82cbada10ae8ac74ef8..0000000000000000000000000000000000000000
--- a/Simulation/TruthJiveXML/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-package TruthJiveXML
-
-public
-
-use AtlasPolicy           AtlasPolicy-*
-use AthenaBaseComps       AthenaBaseComps-*       Control
-
-use JiveXML               JiveXML-*               graphics
-use GaudiInterface        GaudiInterface-*        External
-
-private
-
-use HepPDT	              v*		              	  LCG_Interfaces
-
-use StoreGate             StoreGate-*             Control 
-use AtlasHepMC            AtlasHepMC-*            External
-use AtlasCLHEP 	      	  AtlasCLHEP-* 	          External
-use GeneratorObjects      GeneratorObjects-*      Generators
-
-use TrackRecord		        TrackRecord-*	          Simulation/G4Sim
-use EventPrimitives      EventPrimitives-*    Event
-
-public
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern component_library
-library TruthJiveXML *.cxx components/*.cxx
-
-
diff --git a/Simulation/TruthJiveXML/doc/packagedoc.h b/Simulation/TruthJiveXML/doc/packagedoc.h
index 5901eead632b966088a335a0a561db8630e59a61..9e0b8201a8bd13e24b091f44f2350fdeda15d4e6 100644
--- a/Simulation/TruthJiveXML/doc/packagedoc.h
+++ b/Simulation/TruthJiveXML/doc/packagedoc.h
@@ -21,15 +21,5 @@ forward them to the formatting tool. Each tool implements the IDataRetriever int
 - JiveXML::TruthCosmicsTrackRetriever @copydoc JiveXML::TruthCosmicsTrackRetriever
 
 @section TruthJiveXML_TruthJiveXMLEnv Environment
- - @ref used_TruthJiveXML
- - @ref requirements_TruthJiveXML
 
 */
-
-/**
-@page used_TruthJiveXML Used Packages
-*/
-
-/**
-@page requirements_TruthJiveXML Requirements
-*/
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserDefaultCalibTool.h b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserDefaultCalibTool.h
index 44f60cde42134ac4b28702d8fa5efdd3bddbbc1f..92eeb8222115b1f6054a5838945ab5bdfcd46b50 100644
--- a/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserDefaultCalibTool.h
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/TileCalibAlgs/TileLaserDefaultCalibTool.h
@@ -31,6 +31,7 @@
 #define NSLICES 100
 #define NFIBERS 2
 
+
 class TileRawChannelContainer;
 class TileBeamInfoProvider;
 class TileLaserObject;
@@ -92,10 +93,13 @@ class TileLaserDefaultCalibTool : public AthAlgTool, virtual public ITileCalibTo
   float m_las_time;                 // Event time
 
   // LASERII
-  float m_ratio_LASERII[NDIODES][NGAINS][4][NDRAWERS][NCHANNELS][NGAINS];       // Calib coefficients computed for this run (for all diodes, PMTs, phocal, CIS)
-  float m_ratio_S_LASERII[NDIODES][NGAINS][4][NDRAWERS][NCHANNELS][NGAINS];     // Corresponding RMS
+  float m_ratio_LASERII[NDIODES][NGAINS][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];       // Calib coefficients computed for this run (for all diodes, PMTs, phocal, CIS)
+  float m_ratio_S_LASERII[NDIODES][NGAINS][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];     // Corresponding RMS
+  float m_ratio_LASERII_good[NDIODES][NGAINS][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];       // Calib coefficients computed for this run (for all diodes, PMTs, phocal, CIS)
+  float m_ratio_S_LASERII_good[NDIODES][NGAINS][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];     // Corresponding RMS
 
-  RunningStat* m_rs_ratio_LASERII[NDIODES][NGAINS][4][NDRAWERS][NCHANNELS][NGAINS];
+  RunningStat* m_rs_ratio_LASERII[NDIODES][NGAINS][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];
+  RunningStat* m_rs_ratio_LASERII_good[NDIODES][NGAINS][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];
 
   // FIRST PART OF DATA FRAGMENT
   /*  float m_chan_LAS[32];                 // Mean value for monitoring diodes, PMTs, phocal, CIS in Laser runs
@@ -147,11 +151,14 @@ class TileLaserDefaultCalibTool : public AthAlgTool, virtual public ITileCalibTo
   float m_diode_SAlpha[NDIODES_LASER1];              // RMS of alpha spectra
   float m_ratio[NDIODES_LASER1][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];       // Calib coefficients computed for this run (for all diodes)
   float m_ratio_S[NDIODES_LASER1][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];     // Corresponding RMS
+  float m_ratio_good[NDIODES_LASER1][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];       // Calib coefficients computed for this run (for all diodes)
+  float m_ratio_good_S[NDIODES_LASER1][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];     // Corresponding RMS
   float m_pmt_ratios[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];       // Calib coefficients computed for this run (for all diodes)
   float m_pmt_S_ratios[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];     // Corresponding RMS
   RunningStat* m_rs_diode_signal[NDIODES_LASER1];
   RunningStat* m_rs_PMT_signal[NPMTS];
   RunningStat* m_rs_ratio[NDIODES_LASER1][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];
+  RunningStat* m_rs_ratio_good[NDIODES_LASER1][NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];
   RunningStat* m_rs_pmt_ratios[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];
  
 
@@ -183,10 +190,10 @@ class TileLaserDefaultCalibTool : public AthAlgTool, virtual public ITileCalibTo
   RunningStat* m_rs_time[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];
   RunningStat* m_rs_signal[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];
   RunningStat* m_rs_raw_signal[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];
-  RunningStat* m_rs_reducedKappa[NPARTITIONS][NDRAWERS][NCOUPLES][NGAINS];
+  RunningStat* m_rs_reducedKappa[NPARTITIONS][NDRAWERS][NCOUPLES-1][NCOUPLES][NGAINS][NFIBERS];
 
   // Functions
-  std::pair<unsigned int, unsigned int> getCoupleOfChan(int ros, int couple);
+  std::pair<unsigned int, unsigned int> getCoupleOfPMT(int ros, int couple);
   short isCellBad(int ros, int drawer, int channel, int gain);
   
   inline int chanIsConnected(int ros, int chan) {
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/doc/mainpage.h b/TileCalorimeter/TileCalib/TileCalibAlgs/doc/mainpage.h
new file mode 100644
index 0000000000000000000000000000000000000000..2c4555c41d2583fa38b7e3d9bdd65dd249c351b3
--- /dev/null
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/doc/mainpage.h
@@ -0,0 +1,82 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**
+
+@mainpage TileCalibAlgs
+
+This package provides algorithms for calculating calibration constants from calibration runs or from the data extracted from database
+
+@author Ximo Poveda Torres <Joaquin.Poveda@cern.ch>
+@author Karl Gellerstedt <Karl.Gellerstedt@cern.ch>
+@author Nils Gollub <Nils.Gollub@cern.ch>
+@author Luca Fiorini <Luca.Fiorini@cern.ch>
+@author Andrei Artamonov <andrei.artamonov@cern.ch>
+
+@section Package_Structure Package Structure 
+
+Different Algorithm Tools are provided for calculating calibration
+constants related to the Charge
+Injection System (TileCISCalibTool, TileMonoCISCalibTool).
+All these tools derive from a common TileCondTool
+that provides basic infrastructure shared by all the specialized
+tools.
+
+A subset of events needed as input for the different computing tools
+can be preselected with the TileCalibEventSelectionAlg.
+
+The Noise Calibration constants are produced by TileDigiNoiseCalibAlg and  
+TileRawChNoiseCalibAlg. The first one extracts the noise constants from 
+Digits (high frequency noise, low frequency noise, pedestals, ...) and the 
+latter extract the noise constants from the various RawChannels containers
+(average, mean, RMS and sigma of the amplitude distribution).
+
+Algorithm TileOFC2DBAlg is used to calculate Optimal Filtering Constants 
+and store them in sqlite file for further merging to COOL database.
+It uses TileCondToolOfc which gets A/C matrix and pulse shapes from
+database and calculated OFCs. The are two modes in TileOFC2DBAlg.
+The first one: calculate OFCs for the only, default, channel 
+for different phases
+(usually in the window +/- 100 ns, 1 ns step). This kind of OFCs
+are used later in on-line (DSP) reconstruction and, optionally,
+in TileRawChannelBuilderOpt2Filter. The second mode: calculate OFCs
+for every channel for the "best phase", extracted from database for
+particular channel (not yet fully debugged at the moment).
+The choice of the mode is made in joboptions. Example of joboptions
+to use this algorithm is in jobOptions_OFC2DBTest.py.
+
+Algorithm TileTriggerDefaultCalibTool is used for finding bad trigger towers. 
+This algorithm runs on special calibration runs taken with L1Calo. The trigger
+tower energy from L1Calo is used to determine if a given PMT or tower in Tile 
+does not have the correct energy. 
+
+@section Package_Configuration Package Configuration
+
+The package configuration is done through old-style job options, need
+to move to configurables.
+
+
+@todo 
+Most of the algorithms need to be updated to the latest best
+knowledge of calibration constant calculation. While doing this more
+detailed documentation will be provided. For the current status of the
+package a detailed documentation would not make much sense.
+
+
+
+@ref used_TileCalibAlgs
+@ref requirements_TileCalibAlgs
+ 
+
+*/
+
+/**
+@page used_TileCalibAlgs Used Packages
+@htmlinclude used_packages.html
+*/
+
+/**
+@page requirements_TileCalibAlgs Requirements
+@include requirements
+*/
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/doc/packagedoc.h b/TileCalorimeter/TileCalib/TileCalibAlgs/doc/packagedoc.h
index 973879a6a1b1856e18fcacd48825b59f6af82e02..499e3c426c6ca63a4a4c1e20bf9eb60b0ea6e4e8 100644
--- a/TileCalorimeter/TileCalib/TileCalibAlgs/doc/packagedoc.h
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/doc/packagedoc.h
@@ -65,16 +65,6 @@ package a detailed documentation would not make much sense.
 
 
 
-@ref used_TileCalibAlgs
-@ref requirements_TileCalibAlgs
  
 
 */
-
-/**
-@page used_TileCalibAlgs Used Packages
-*/
-
-/**
-@page requirements_TileCalibAlgs Requirements
-*/
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserCalibAlg.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserCalibAlg.cxx
index da8d5c2125c780e5103d7c6c192e4fffa98fcec8..30a688cdae3952bdbbc176050574e4336089cd35 100644
--- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserCalibAlg.cxx
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserCalibAlg.cxx
@@ -119,7 +119,7 @@ StatusCode TileLaserCalibAlg::finalize() {
   lastools_t::iterator fTool = m_lasTools.begin();
 
   for (; fTool != m_lasTools.end(); ++fTool) {
-    CHECK( (*fTool)->finalize() ); // Perform the calibration
+    CHECK( (*fTool)->finalizeCalculations() ); // Perform the calibration
     CHECK( (*fTool)->writeNtuple(m_runNo, 2, m_outfile) ); // Fill the nTuple
   }
 
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx
index 44da7a0d7b318d7da597581ced0624b865f36f6f..d84a81d4afb4ae7be0a9a1066ff2b947949843e4 100644
--- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx
@@ -9,7 +9,6 @@
 #include "GaudiKernel/IToolSvc.h"
 #include "GaudiKernel/ListItem.h"
 
-
 #include "Identifier/HWIdentifier.h"
 
 #include "TileEvent/TileRawChannelContainer.h"
@@ -28,10 +27,12 @@
 #include <iostream>
 
 /****************************************************/
-/* TileLaserDefaultCalibTool.cxx     July 2014      */
+/* TileLaserDefaultCalibTool.cxx     June 2017      */
 /*                                                  */
 /* Henric Wilkens, following work from Seb Viret and 
-   Vincent Giangiobbe             
+   Vincent Giangiobbe    
+
+   Giulia Di Gregorio, following work from Henric 
                                                     */
 /****************************************************/
 
@@ -55,7 +56,10 @@ TileLaserDefaultCalibTool::TileLaserDefaultCalibTool(const std::string& type, co
   m_las_time(0),
   m_ratio_LASERII(),
   m_ratio_S_LASERII(),
+  m_ratio_LASERII_good(),
+  m_ratio_S_LASERII_good(),
   m_rs_ratio_LASERII(),
+  m_rs_ratio_LASERII_good(),
   m_PMT_LASERII(),
   m_PMT_S_LASERII(),
   m_rs_PMT_signal_LASERII(),
@@ -69,10 +73,6 @@ TileLaserDefaultCalibTool::TileLaserDefaultCalibTool(const std::string& type, co
   m_diode_Alpha_S_LASERII(),
   m_diode_Led_LASERII(),
   m_diode_Led_S_LASERII(),
-  /*  m_diode_Lin_LASERII(),
-  m_diode_Lin_S_LASERII(),
-  m_diode_Las_LASERII(),
-  m_diode_Las_S_LASERII(), */
   m_PMT_Ped_LASERII(),
   m_PMT_Ped_S_LASERII(),
   m_PMT(),
@@ -85,6 +85,8 @@ TileLaserDefaultCalibTool::TileLaserDefaultCalibTool(const std::string& type, co
   m_diode_SAlpha(),
   m_ratio(),
   m_ratio_S(),
+  m_ratio_good(),
+  m_ratio_good_S(),
   m_pmt_ratios(),
   m_pmt_S_ratios(),
   m_rs_diode_signal(),
@@ -129,7 +131,7 @@ TileLaserDefaultCalibTool::~TileLaserDefaultCalibTool()
 
 
 StatusCode TileLaserDefaultCalibTool::initialize(){
-  // RESET LOCAL PARAMETERS AND LOAD NECESSARY SERVICE
+  // Reset local parameters and load necessary service
   ATH_MSG_DEBUG ( "initialize() TileLaserDefaultCalibTool" );
   m_evtNr        = 0;
   m_toolRunNo    = 0;
@@ -163,11 +165,6 @@ StatusCode TileLaserDefaultCalibTool::initialize(){
       m_diode_Alpha_S_LASERII[diode][gain] = 0;// Sigma of Alpha values    
       m_diode_Led_LASERII[diode][gain] = 0;  // Corresponding LED values
       m_diode_Led_S_LASERII[diode][gain] = 0;// Sigma of LED values    
-      /*      m_diode_Lin_LASERII[diode][gain] = 0;  // Corresponding linearity values
-      m_diode_Lin_S_LASERII[diode][gain] = 0;// Sigma of linearity values    
-      m_diode_Las_LASERII[diode][gain] = 0;  // Corresponding Laser values
-      m_diode_Las_S_LASERII[diode][gain] = 0;// Sigma of Laser values    
-      */
 
     }
   }
@@ -203,16 +200,16 @@ StatusCode TileLaserDefaultCalibTool::initialize(){
       m_rs_meantime[part][gain] = new RunningStat(); 
       m_meantime[part][gain] = 0.;
     } 
-
+    
     for ( int drawer=0; drawer<NDRAWERS; ++drawer ) {
       for ( int gain=0; gain<NGAINS; ++gain ) {
-        
-        for(int couple=0; couple<NCOUPLES; ++couple){
-	  // K factor for each couple of odd and event pmts
-          m_rs_reducedKappa[part][drawer][couple][gain] = new RunningStat();
-        } // FOR
         for (int fiber=0; fiber<NFIBERS; ++fiber){
 	   m_kappa[part][drawer][fiber][gain]   = 0;
+	   for (int pmt1=0; pmt1<NCOUPLES-1; ++pmt1){
+	     for (int pmt2=pmt1+1; pmt2<NCOUPLES; ++pmt2){
+	       m_rs_reducedKappa[part][drawer][pmt1][pmt2][gain][fiber] = new RunningStat();
+	     }
+	   }	      
 	}
 	
         for ( int channel=0; channel<NCHANNELS; ++channel ) {
@@ -228,8 +225,6 @@ StatusCode TileLaserDefaultCalibTool::initialize(){
           m_raw_mean[part][drawer][channel][gain]    = 0;
           m_raw_mean_S[part][drawer][channel][gain]  = 0;
 
-          m_status[part][drawer][channel][gain]  = 0;
-          
           for ( int iSlice=0; iSlice<NSLICES; ++iSlice ) {
             m_mean_slice[part][drawer][channel][iSlice][gain] = 0;
             m_variance_slice[part][drawer][channel][iSlice][gain] = 0;
@@ -241,6 +236,9 @@ StatusCode TileLaserDefaultCalibTool::initialize(){
 	      m_rs_ratio_LASERII[diode][diode_gain][part][drawer][channel][gain]  = new RunningStat();
 	      m_ratio_LASERII[diode][diode_gain][part][drawer][channel][gain]   = 0;
 	      m_ratio_S_LASERII[diode][diode_gain][part][drawer][channel][gain] = 0;
+	      m_rs_ratio_LASERII_good[diode][diode_gain][part][drawer][channel][gain]  = new RunningStat();
+	      m_ratio_LASERII_good[diode][diode_gain][part][drawer][channel][gain]   = 0;
+	      m_ratio_S_LASERII_good[diode][diode_gain][part][drawer][channel][gain] = 0;
 	    }
           } // FOR
 	  
@@ -253,15 +251,16 @@ StatusCode TileLaserDefaultCalibTool::initialize(){
             m_rs_ratio[d][part][drawer][channel][gain]  = new RunningStat();
             m_ratio[d][part][drawer][channel][gain]   = 0;
             m_ratio_S[d][part][drawer][channel][gain] = 0;
+            m_rs_ratio_good[d][part][drawer][channel][gain]  = new RunningStat();
+            m_ratio_good[d][part][drawer][channel][gain]   = 0;
+            m_ratio_good_S[d][part][drawer][channel][gain] = 0;
           } // FOR
           
-          
           m_entries[part][drawer][channel][gain] = 0;
           
-          //	  int pmt = abs(m_cabling->channel2hole(part,channel));
-          m_HV[part][drawer][channel] = 0.; //m_tileDCSSvc->getDCSHV(part, drawer, pmt);
-          m_HVSet[part][drawer][channel] = 0.; //m_tileDCSSvc->getDCSHVSET(part, drawer, pmt);
-          //	  std::cout << "Henric " <<  m_HV[part][drawer][channel] << " " << m_HVSet[part][drawer][channel] << std::endl;
+          m_HV[part][drawer][channel] = 0.; 
+          m_HVSet[part][drawer][channel] = 0.; 
+
         } // channel loop
       } // gain loop
     } // drawer loop
@@ -269,27 +268,27 @@ StatusCode TileLaserDefaultCalibTool::initialize(){
   
   ATH_CHECK( detStore()->retrieve(m_tileHWID) );
   ATH_CHECK( m_tileToolEmscale.retrieve() );
-
-  m_cabling = TileCablingService::getInstance();
-  
-  ATH_CHECK( toolSvc()->retrieveTool("TileBeamInfoProvider",m_beamInfo) );
   ATH_CHECK( m_tileBadChanTool.retrieve() );
+  ATH_CHECK( toolSvc()->retrieveTool("TileBeamInfoProvider",m_beamInfo) );
+  
+
   ATH_CHECK( m_tileDCSSvc.retrieve() );
   return StatusCode::SUCCESS;
 }
 
+
 StatusCode TileLaserDefaultCalibTool::initNtuple(int runNumber, int runType, TFile * rootFile){
   ATH_MSG_INFO ( "initialize(" << runNumber << "," << runType << "," << rootFile << ")" );
   return StatusCode::SUCCESS;
 } // INITNTUPLE
 
+
 StatusCode TileLaserDefaultCalibTool::execute(){
   const char* text[NGAINS] = {"LG DIODE ","HG DIODE "}; 
-  // INCREMENT EVENT NUMBER
-  ++m_evtNr;
-  ATH_MSG_DEBUG ( "EVENT COUNTER: " << m_evtNr );
+  ++m_evtNr;   // Increment event number
+  ATH_MSG_DEBUG ( "Event counter: " << m_evtNr );
   
-  // STORE LASER OBJECT AND RAWCHANNEL INFORMATION INTO MAPS
+  // Store laser object and rawchannel information into maps
   ATH_MSG_DEBUG ( "execute() TileLaserDefaultCalibTool" );
   
   const TileRawChannelContainer * rawCnt = 0;
@@ -300,32 +299,66 @@ StatusCode TileLaserDefaultCalibTool::execute(){
   
   m_LASERII = laserObj->isLASERII();
 
-  if(m_LASERII) ATH_MSG_DEBUG ( "LASERII VERSION IS " << laserObj->getVersion() << " DAQ TYPE = " << laserObj->getDaqType() );
-  else          ATH_MSG_DEBUG ( "LASERI VERSION IS "  << laserObj->getVersion() << " DAQ TYPE = " << laserObj->getDaqType() );
+  if(m_LASERII) ATH_MSG_DEBUG ( "LaserII version is " << laserObj->getVersion() << " DAQ Type = " << laserObj->getDaqType() );
+  else          ATH_MSG_DEBUG ( "LaserI version is "  << laserObj->getVersion() << " DAQ Type = " << laserObj->getDaqType() );
   
   const uint32_t *cispar = m_beamInfo->cispar();
   
   m_las_time = static_cast<double>(cispar[10])+static_cast<double>(cispar[11])/1000000;
   
-  // RETRIEVE LASER INFORMATION
+  // Retrieve laser information
   if(laserObj->getDiodeCurrOrd() == 0 || laserObj->getFiltNumber() == 0){
-    ATH_MSG_DEBUG ( "NO FILTER NUMBER OR DIODE CURRENT: WHEEL MOVING?" );
+    ATH_MSG_DEBUG ( "No filter number or diode current: wheel moving?" );
     return StatusCode::SUCCESS; // This is expected for some events
   } // IF
   
   float normalization[NDIODES][NGAINS];
   float pmt_values[NPARTITIONS][NDRAWERS][NCHANNELS][NGAINS];
-  for (int npart=0; npart<NPARTITIONS; npart++){
-    for (int ndraw=0; ndraw<NDRAWERS; ndraw++){
-      for (int nchan=0; nchan<NCHANNELS; nchan++){
-	for (int ngain=0; ngain<NGAINS; ngain++) {
-	  pmt_values[npart][ndraw][nchan][ngain]=0.;
+  for (int part=0; part<NPARTITIONS; part++){
+    for (int draw=0; draw<NDRAWERS; draw++){
+      for (int chan=0; chan<NCHANNELS; chan++){
+	for (int gain=0; gain<NGAINS; gain++) {
+	  pmt_values[part][draw][chan][gain]=0.;
 	}
       }
     }
   }
-	
- 
+
+  static int first = 1; // Do only once
+  if ( first ) {
+    for ( int part=0; part<NPARTITIONS; ++part ) {
+      int ros = part+1;
+      for ( int drawer=0; drawer<NDRAWERS; ++drawer ) {
+	unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros,drawer);
+	for ( int channel=0; channel<NCHANNELS; ++channel ) {
+	  const TileDQstatus *theDQstatus = m_beamInfo->getDQstatus();
+	  if ( theDQstatus->isChEmpty(ros,drawer,channel) ) {  // Check whether channel is connected
+	    continue;
+	  }
+	  for ( int gain=0; gain<NGAINS; ++gain ) {
+	    short status = m_tileBadChanTool->encodeStatus(m_tileBadChanTool->getAdcStatus(drawerIdx, channel, gain)) ;
+	    /* --- Status of the channel in DB
+	       
+	       0 = isGood()
+	       1 = isNoisy() : Large HF noise; Correlated noise; Large LF noise;
+	       0x2 = isAffected() : ?
+	       0x4 = isBad()   : ADC masked (unspecified); ADC dead; Very large HF noise; No data; 
+	                         Wrong DSP configuration; Severe stuck bit; Severe data corruption; 
+	                         Channel masked (unspecified); No PMT connected;No HV; Wrong HV;
+	       0x8 = Unknown ?!
+
+	       0x10 = bad ADC, masked on the fly
+	       
+	       Later we will add the transiant quality flags ---- */
+	    if (status)
+	      m_status[part][drawer][channel][gain]  = 1 << (status-1);	 
+	  }
+	}
+      }
+    }
+    first = 0; 
+  }
+  
   if ( m_LASERII ) {  // LASERII
     // We need to have pedestals
     static int have_pedestals = 0; 
@@ -334,9 +367,6 @@ StatusCode TileLaserDefaultCalibTool::execute(){
     static int have_linearity = 0; 
     static int have_laser = 0;
 
-    
-    
-      
     if ( ! (have_pedestals && have_alpha && have_led ) ) {
       ATH_MSG_DEBUG ( "Calib type " << laserObj->getCalibType() << have_pedestals << have_alpha <<have_led<<have_linearity<<have_laser);
       switch ( laserObj->getCalibType()  ) {
@@ -363,13 +393,11 @@ StatusCode TileLaserDefaultCalibTool::execute(){
 	  }
 	  have_pedestals = 1;
 	} 
-	
 	break; 
 	
       case TileLaserObject::calibType::Pedestal1: 
 	break;
 
-
       case TileLaserObject::calibType::Alpha: 	
 	if ( laserObj->isSet(0, 0, TileLaserObject::calibType::Alpha) ) { // Alpha are set
 	  for ( int diode=0; diode<NDIODES; ++diode ) {
@@ -383,12 +411,10 @@ StatusCode TileLaserDefaultCalibTool::execute(){
 	    m_diode_Alpha_LASERII[NDIODES][gain]   = laserObj->getMean(13, gain, TileLaserObject::calibType::Alpha);
 	    m_diode_Alpha_S_LASERII[NDIODES][gain] = laserObj->getSigma(13, gain, TileLaserObject::calibType::Alpha);	     
 	  }
-
 	  have_alpha = 1;
 	} 
 	break; 
 		
-		
       case TileLaserObject::calibType::LED: 	
 	if ( laserObj->isSet(0, 0, TileLaserObject::calibType::LED) ) { // LED are set
 	  for ( int diode=0; diode<NDIODES; ++diode ) {
@@ -401,13 +427,11 @@ StatusCode TileLaserDefaultCalibTool::execute(){
 	      m_diode_Led_LASERII[NDIODES][gain]   = laserObj->getMean(13, gain, TileLaserObject::calibType::LED);
 	      m_diode_Led_S_LASERII[NDIODES][gain] = laserObj->getSigma(13, gain, TileLaserObject::calibType::LED);	     
 	    }
- 
 	  }
 	  have_led = 1;
 	} 
 	break; 	
 
-
       default:
 	ATH_MSG_ERROR ("Got an invalid calibration type from LaserObject" ); 
 	return StatusCode::SUCCESS; // We can't do anything yet
@@ -476,45 +500,47 @@ StatusCode TileLaserDefaultCalibTool::execute(){
     m_head_temp    = laserObj->getPumpDiodeTemp();
     m_las_requ_amp = laserObj->getDiodeCurrOrd();
   } // IF
-  /*
-    
+
+  double Q1Q2[NCOUPLES-1][NCOUPLES];
+  for (int pmt1=0; pmt1<NCOUPLES-1; ++pmt1){
+    for (int pmt2=0; pmt2<NCOUPLES; ++pmt2){
+      Q1Q2[pmt1][pmt2]=0.;
+    }
+  }
+  //int currentDrawer=0;
+  
+  RunningStat* avg_time[NPARTITIONS][NGAINS];
+  for(int part=0; part<NPARTITIONS; part++){
+    for(int gain=0;gain<NGAINS;++gain){
+      avg_time[part][gain] = new RunningStat();
+    }
+  }
+  /*  
     Iterator over rawchannelcontainer
- 
   */  
   TileRawChannelUnit::UNIT RChUnit = rawCnt->get_unit();
   TileRawChannelContainer::const_iterator itColl;
   TileRawChannelContainer::const_iterator itCollEnd = rawCnt->end();
   
-  double Q1Q2[NCOUPLES];
-  for (int couple=0; couple<NCOUPLES; ++couple) Q1Q2[couple]=1;
-  int currentDrawer=0;
-  
-  RunningStat* avg_time[NCHANNELS][NGAINS];
-  for (int ros=0; ros<NCHANNELS; ros++) {
-    for (int gain=0; gain<NGAINS; gain++) avg_time[ros][gain] = new RunningStat();
-  }
-  
-  // Loop over tilerawchannelcollections to get avg time per partition
-  for ( itColl=rawCnt->begin(); itColl != itCollEnd; ++itColl ) {
+  for ( itColl=rawCnt->begin(); itColl != itCollEnd; ++itColl ) {  // Loop over tilerawchannelcollections to get avg time per partition
     HWIdentifier drawer_id = m_tileHWID->drawer_id((*itColl)->identify());
-    int ros  = m_tileHWID->ros(drawer_id)-1;     // LBA=0 LBC=1 EBA=2 EBC=3
+    int part = m_tileHWID->ros(drawer_id)-1;     // LBA=0 LBC=1 EBA=2 EBC=3
     // Loop over tilerawchannels in collection
     for ( TileRawChannelCollection::const_iterator it = (*itColl)->begin(); it != (*itColl)->end(); ++it ) {
       HWIdentifier hwid=(*it)->adc_HWID();  
       int gain   = m_tileHWID->adc(hwid);      // low=0 high=1    
       float ofctime = (*it)->time();
       if(ofctime!=0.0 and std::abs(ofctime-15.0)<30.)
-        avg_time[ros][gain]->Push(ofctime);
+        avg_time[part][gain]->Push(ofctime);
     } 
   } // Now we have the average time per partition for this event
   
-
-  // Loop over tilerawchannelcollections 
-  for ( itColl=rawCnt->begin(); itColl != itCollEnd; ++itColl ) {
+  for ( itColl=rawCnt->begin(); itColl != itCollEnd; ++itColl ) {   // Loop over tilerawchannelcollections 
     HWIdentifier drawer_id = m_tileHWID->drawer_id((*itColl)->identify());
-    int ros = m_tileHWID->ros(drawer_id)-1;     // LBA=0 LBC=1 EBA=2 EBC=3
+    int ros = m_tileHWID->ros(drawer_id);     // LBA=0 LBC=1 EBA=2 EBC=3
+    int part = ros-1; 
     int drawer = m_tileHWID->drawer(drawer_id); // 0 to 63
-    unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros+1,drawer);
+    unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros,drawer);
     
     // Loop over tilerawchannels in collection
     for ( TileRawChannelCollection::const_iterator it = (*itColl)->begin(); it != (*itColl)->end(); ++it ) {
@@ -525,164 +551,138 @@ StatusCode TileLaserDefaultCalibTool::execute(){
       float amp         = (*it)->amplitude();
       float ofctime     = (*it)->time();
       float ped = (*it)->pedestal();
-      if(ofctime!=0.0) ofctime -= avg_time[ros][gain]->Mean();
-      const TileDQstatus *theDQstatus = m_beamInfo->getDQstatus();
-      
-      // Check whether channel is connected
-      if ( theDQstatus->isChEmpty(ros+1,drawer,chan) ) {
-        m_status[ros][drawer][chan][0] = -1;
-        m_status[ros][drawer][chan][1] = -1;
-        continue;
-      } 
-      
-      /* --- Status of the channel in DB
-	 TileBchStatus status = m_tileBadChanTool->getAdcStatus(drawerIdx, chan, gain);
-	 m_status[ros][drawer][chan][gain] = status.isBad();
-	 std::cout<<"Status = "<<status.isBad()<<std::endl;
+      bool is_good = true;
       
-	 0 = isGood()
-	 1 = isNoisy() : Large HF noise; Correlated noise; Large LF noise;
-	 0x2 = isAffected() : ?
-	 0x4 = isBad()   : ADC masked (unspecified); ADC dead; 
-	                 Very large HF noise; No data; 
-                         Wrong DSP configuration; Severe stuck bit; 
-                         Severe data corruption; 
-                         Channel masked (unspecified); No PMT connected; 
-                         No HV; Wrong HV;
-         0x8 = other
-         0x10 = bad ADC
-	 0x100 =hasSaturation()
-	 0x200 =underflow all samples
-      */
+      if(ofctime!=0.0) ofctime -= avg_time[part][gain]->Mean();
       
-      if ( theDQstatus->isAdcDQgood(ros+1,drawer,chan,gain) ) {
-	const TileBchStatus status=m_tileBadChanTool->getAdcStatus(drawerIdx, chan, gain);
-	if (status.isNoisy()){
-	   m_status[ros][drawer][chan][gain] |= 1;
-	}
-	if (status.isAffected()){
-	    m_status[ros][drawer][chan][gain] |= 0x2;
-	}
-	if (status.isBad()){
-	    m_status[ros][drawer][chan][gain] |=0x4;
-	}
-	if (!status.isGood()){
-	  m_status[ros][drawer][chan][gain] |=0x8;
-        }
-      }
-      else {
-        m_status[ros][drawer][chan][gain] |= 0x10;
+      const TileDQstatus *theDQstatus = m_beamInfo->getDQstatus();
+      if ( theDQstatus->isChEmpty(ros,drawer,chan) ) {  // Check whether channel is connected
+        m_status[part][drawer][chan][0] = -1;
+        m_status[part][drawer][chan][1] = -1;
+        continue; // Nothing to be seen here
+      } 
+            
+      if ( !theDQstatus->isAdcDQgood(ros,drawer,chan,gain) ) { // Masked on the fly
+        m_status[part][drawer][chan][gain] |= 0x10;
+	is_good = false;
       }
-      
-      /*
-	Don't enable negative or null energies
-	if(amp <= 0.) continue;
-	In fact we don't like this line since it biases the averages to follow
-       */
-      
-      if (int (ped/10000.)-10 == -8){
-	m_status[ros][drawer][chan][gain] = m_status[ros][drawer][chan][gain] | 0x100;
-        continue;
-	}
 
+      int problem = int(ped + 500.)/10000;
       
-      if (int (ped/10000.)-10 == -2){
-	m_status[ros][drawer][chan][gain] = m_status[ros][drawer][chan][gain] | 0x200;
-        continue;
-	}
+      switch (problem) {
+      case 1: // Underflow
+	m_status[part][drawer][chan][gain] |= 0x100;
+	is_good = false;
+	break;
+      case 2: // Overflow
+	m_status[part][drawer][chan][gain] |= 0x200;
+	is_good = false;
+	break;
+      case 3: // Under and Overflow
+	m_status[part][drawer][chan][gain] |= 0x400;
+	is_good = false;
+	break;
+      case 4: // Constant signal
+	m_status[part][drawer][chan][gain] |= 0x800;
+	is_good = false;
+	break;
+      case 8: // Underflow in all channels
+	m_status[part][drawer][chan][gain] |= 0x1000;
+	is_good = false;
+	break;
+      case 9: // Overflow in all channels
+	m_status[part][drawer][chan][gain] |= 0x2000;
+	is_good = false;
+	break;
+      }
 
       float ampInPicoCoulombs = m_tileToolEmscale->channelCalib(drawerIdx, chan, gain, amp, RChUnit, TileRawChannelUnit::PicoCoulombs);
       
-      m_rs_time[ros][drawer][chan][gain]->Push(ofctime);
-      m_rs_signal[ros][drawer][chan][gain]->Push(ampInPicoCoulombs);
-      m_rs_raw_signal[ros][drawer][chan][gain]->Push(amp);
+      m_rs_time[part][drawer][chan][gain]->Push(ofctime);
+      m_rs_signal[part][drawer][chan][gain]->Push(ampInPicoCoulombs);
+      m_rs_raw_signal[part][drawer][chan][gain]->Push(amp);
       
-      if ( m_LASERII ){
+      if ( m_LASERII ) {
         for(int diode=0; diode<NDIODES; ++diode){
-	  for ( int diode_gain=0; diode_gain<NGAINS; diode_gain++ ) {  // MONITORING DIODES
-	    if ( normalization[diode][diode_gain]!=0. )
-	      m_rs_ratio_LASERII[diode][diode_gain][ros][drawer][chan][gain]->Push( ampInPicoCoulombs/normalization[diode][diode_gain] );	
+	  for ( int diode_gain=0; diode_gain<NGAINS; diode_gain++ ) {  // MONITORING DIODES	      
+	      if ( normalization[diode][diode_gain]!=0. ){
+		if (is_good) m_rs_ratio_LASERII_good[diode][diode_gain][part][drawer][chan][gain]->Push( ampInPicoCoulombs/normalization[diode][diode_gain] );
+		m_rs_ratio_LASERII[diode][diode_gain][part][drawer][chan][gain]->Push( ampInPicoCoulombs/normalization[diode][diode_gain] );
+	      }
           } // Diode Gains
-        } // Diodes
-        pmt_values[ros][drawer][chan][gain]=ampInPicoCoulombs;
+	} // Diodes
+	if (is_good) m_entries[part][drawer][chan][gain]++;
       } else {
         for(int i=0; i<NDIODES_LASER1; ++i){
-          if((laserObj->getDiodeADC(i,0)-laserObj->getDiodePedestal(i,0)) != 0)
-            m_rs_ratio[i][ros][drawer][chan][gain]->Push(ampInPicoCoulombs/(laserObj->getDiodeADC(i,0)-laserObj->getDiodePedestal(i,0)));
+          if((laserObj->getDiodeADC(i,0)-laserObj->getDiodePedestal(i,0)) != 0) {
+	    if (is_good) m_rs_ratio_good[i][part][drawer][chan][gain]->Push(ampInPicoCoulombs/(laserObj->getDiodeADC(i,0)-laserObj->getDiodePedestal(i,0)));
+	    m_rs_ratio[i][part][drawer][chan][gain]->Push(ampInPicoCoulombs/(laserObj->getDiodeADC(i,0)-laserObj->getDiodePedestal(i,0)));
+	  }
         } // FOR
+	if (is_good) m_entries[part][drawer][chan][gain]++;
       } // ELSE
-
-      /* 
-	 V.Giangiobbe. Compute the average <q1.q2> for each couple of even and odd PMTs.
-      */
-
-      if (m_status[ros][drawer][chan][gain]&0x4) //We don't want to use bad channels for the calculation of kappa
-	continue;
-
-      if(currentDrawer != drawer){
-        for(int couple=0; couple<NCOUPLES; ++couple) Q1Q2[couple]=1;
-      } 
       
-      //-- Store the data in m_rs_reducedKappa[ros][drawer][couple][gain]
-      for(int couple=0; couple<NCOUPLES; ++couple){
-        if(chan==int(getCoupleOfChan(ros, couple).first) || chan==int(getCoupleOfChan(ros, couple).second)){
-          Q1Q2[couple]*=ampInPicoCoulombs;
-          currentDrawer = drawer;
-          
-          if(Q1Q2[couple]!=1 && Q1Q2[couple]!=ampInPicoCoulombs) m_rs_reducedKappa[ros][drawer][couple][gain]->Push( Q1Q2[couple] );
-        } // IF
-      } // FOR
+      if ((is_good) && (!(m_status[part][drawer][chan][gain]&0x4)) )
+	pmt_values[part][drawer][chan][gain]=ampInPicoCoulombs;
+      else
+	pmt_values[part][drawer][chan][gain]=0.;
+	
     } // End of the loop over the TileRawChannelCollection
   } // End of the loop over the TileRawChannelContainer
-   
-  for ( itColl=rawCnt->begin(); itColl != itCollEnd; ++itColl ) {
-    HWIdentifier drawer_id = m_tileHWID->drawer_id((*itColl)->identify());
-    int ros = m_tileHWID->ros(drawer_id)-1;     // LBA=0 LBC=1 EBA=2 EBC=3
-    int drawer = m_tileHWID->drawer(drawer_id); // 0 to 63
-    unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros+1,drawer);
-    
-    // Loop over tilerawchannels in collection
-    for ( TileRawChannelCollection::const_iterator it = (*itColl)->begin(); it != (*itColl)->end(); ++it ) {
-          // Get adchash
-      HWIdentifier hwid = (*it)->adc_HWID();
-      int chan          = m_tileHWID->channel(hwid);  // 0 to 47 channel
-      int gain          = m_tileHWID->adc(hwid);      // low=0 high=1
-      float amp         = (*it)->amplitude();
-      float ofctime     = (*it)->time();
-      // float ped = (*it)->pedestal();
-      if(ofctime!=0.0) ofctime -= avg_time[ros][gain]->Mean();
-      //      const TileDQstatus *theDQstatus = m_beamInfo->getDQstatus();
-      
-      float ampInPicoCoulombs = m_tileToolEmscale->channelCalib(drawerIdx, chan, gain, amp, RChUnit, TileRawChannelUnit::PicoCoulombs);
-      
-      if(currentDrawer != drawer){
-        for(int couple=0; couple<NCOUPLES; ++couple) Q1Q2[couple]=1;
-      } 
-      
-      if (fabs( m_rs_signal[ros][drawer][chan][gain]->Mean()-ampInPicoCoulombs)>4*m_rs_signal[ros][drawer][chan][gain]->StandardDeviation()){
-	continue;
-      }
-
-      //-- Store the data in m_rs_reducedKappa[ros][drawer][couple][gain]
-      for(int couple=0; couple<NCOUPLES; ++couple){
-        if(chan==int(getCoupleOfChan(ros, couple).first) || chan==int(getCoupleOfChan(ros, couple).second)){
-          Q1Q2[couple]*=ampInPicoCoulombs;
-          currentDrawer = drawer;
-          
-          if(Q1Q2[couple]!=1 && Q1Q2[couple]!=ampInPicoCoulombs)
-	    m_rs_reducedKappa[ros][drawer][couple][gain]->Push( Q1Q2[couple] );
-	} // IF
-      } // FOR
-    }
-  }
-
+  
+  int chan1;
+  int chan2;
+  for (int part=0; part<NPARTITIONS; part++){
+    for (int drawer=0; drawer<NDRAWERS; ++drawer){
+      for(int pmt1=0; pmt1<NCOUPLES-1; ++pmt1){
+	  for (int pmt2=0; pmt2<NCOUPLES; ++pmt2){
+	    Q1Q2[pmt1][pmt2]=0.;
+	  }
+	}
+      //We compute <q1.q2> for odd PMTs
+      for (int gain=0; gain<NGAINS; ++gain){
+	for (int pmt1=0; pmt1<NCOUPLES-1; ++pmt1){
+	  chan1 = int(getCoupleOfPMT(part, pmt1).second);
+	  if (chan1==-1) continue;
+	  
+	  for (int pmt2=pmt1+1; pmt2<NCOUPLES; ++pmt2){
+	    chan2 = int(getCoupleOfPMT(part, pmt2).second);
+	    if (chan2==-1) continue;
+	
+	    Q1Q2[pmt1][pmt2]= pmt_values[part][drawer][chan1][gain]*pmt_values[part][drawer][chan2][gain];
+	    if (Q1Q2[pmt1][pmt2]>0.){
+	      m_rs_reducedKappa[part][drawer][pmt1][pmt2][gain][1]->Push(Q1Q2[pmt1][pmt2]);
+	    }//IF
+	  }//pmt2
+	}//pmt1
+	
+        //We compute <q1.q2> for even PMTs
+	for (int pmt1=0; pmt1<NCOUPLES-1; ++pmt1){
+	  chan1 = int(getCoupleOfPMT(part, pmt1).first);
+	  if (chan1==-1) continue;
+	  for (int pmt2=pmt1+1; pmt2<NCOUPLES; ++pmt2){
+	    chan2=int(getCoupleOfPMT(part, pmt2).first);
+	    if (chan2==-1)
+	      continue;
+	    Q1Q2[pmt1][pmt2]= pmt_values[part][drawer][chan1][gain]*pmt_values[part][drawer][chan2][gain];
+	    if (Q1Q2[pmt1][pmt2]>0.){
+	      m_rs_reducedKappa[part][drawer][pmt1][pmt2][gain][0]->Push(Q1Q2[pmt1][pmt2]);
+	    }//IF
+	  }//pmt2
+	}//pmt1
+	
+	
+      }//gain
+    }//drawer
+  }//part
+	    
 
-  for(int ros=0; ros<NPARTITIONS; ros++){
+  for(int part=0; part<NPARTITIONS; part++){
     for(int drawer=0; drawer<NDRAWERS; ++drawer){
       for (int chan=0; chan<NCHANNELS; ++chan){
 	for(int gain=0;gain<NGAINS;++gain){
 	  int chanref = 0;
-	  if(ros<2){
+	  if(part<2){
 	    chanref = 24 + chan%2;
 	  }
 	  else{
@@ -701,27 +701,26 @@ StatusCode TileLaserDefaultCalibTool::execute(){
 	      chanref = 38 - chan%2;
 	    }
 	  }
-	  if(pmt_values[ros][drawer][chanref][gain]>0.001){
-	    m_rs_pmt_ratios[ros][drawer][chan][gain]->Push(pmt_values[ros][drawer][chan][gain]/pmt_values[ros][drawer][chanref][gain]);
+	  if(pmt_values[part][drawer][chanref][gain]>0.001){
+	    m_rs_pmt_ratios[part][drawer][chan][gain]->Push(pmt_values[part][drawer][chan][gain]/pmt_values[part][drawer][chanref][gain]);
 	  }
 
 	}
       }
     }
   }
-       
-
-
-  for(int ros=0; ros<NPARTITIONS; ros++){
+  
+  for (int part=0; part<NPARTITIONS; part++){
     for(int gain=0;gain<NGAINS;++gain){
-      m_rs_meantime[ros][gain]->Push(avg_time[ros][gain]->Mean());
-      delete(avg_time[ros][gain]);
+      m_rs_meantime[part][gain]->Push(avg_time[part][gain]->Mean());
+      delete(avg_time[part][gain]);
     } // FOR
   } // FOR
-  
+
   return StatusCode::SUCCESS;
 } // EXECUTE
 
+
 StatusCode TileLaserDefaultCalibTool::finalizeCalculations(){
   // COMPUTE CALIBRATION COEFFICIENT AT THE END OF THE EVENT LOOP
   ATH_MSG_INFO ( "finalizeCalculations()" );
@@ -738,7 +737,7 @@ StatusCode TileLaserDefaultCalibTool::finalizeCalculations(){
       for ( int gain=0; gain<NGAINS; ++gain ) {	 
 	m_diode_LASERII[d][gain]       = m_rs_diode_signal_LASERII[d][gain]->Mean();
 	m_diode_S_LASERII[d][gain]     = m_rs_diode_signal_LASERII[d][gain]->StandardDeviation();
-	m_entries_diode_LASERII[d][gain] = m_rs_diode_signal_LASERII[d][gain]->NumDataValues();
+       	m_entries_diode_LASERII[d][gain] = m_rs_diode_signal_LASERII[d][gain]->NumDataValues();
       }
     }
   } else {           // LASERI
@@ -758,40 +757,83 @@ StatusCode TileLaserDefaultCalibTool::finalizeCalculations(){
     for ( int gain=0; gain<NGAINS; ++gain ) {
       m_meantime[partition][gain] = m_rs_meantime[partition][gain]->Mean();
     }
-
+    
     for ( int drawer=0; drawer<NDRAWERS; ++drawer ) {
       for ( int gain=0; gain<NGAINS; ++gain ) {
-/*  Compute the average kappa correction factor for all event and odd pmts
-    Kappa is by definition: cov(q1,q2)/<q1>*<q2> average on all couples of 
-    pmts q1, q2 receiving light from the same clear fiber (only 2 independent 
-    kappa for each module)    */
+	/*  Compute the average kappa correction factor for all event and odd pmts
+	    Kappa is by definition: cov(q1,q2)/<q1>*<q2> average on all couples of 
+	    pmts q1, q2 receiving light from the same clear fiber (only 2 independent 
+	    kappa for each module)    */
         int nCouplesEven=0, nCouplesOdd=0;
 
-        for(int couple=0; couple<NCOUPLES; ++couple){
-          int chan0 = getCoupleOfChan(partition, couple).first;
-          int chan1 = getCoupleOfChan(partition, couple).second;
-          double q0 = m_rs_signal[partition][drawer][chan0][gain]->Mean();
-          double q1 = m_rs_signal[partition][drawer][chan1][gain]->Mean();
-          
-          if(q0*q1==0) continue;
-          
-          //-- Average of all couples on the same even fiber
-	  int fibre = couple%2;
-	  m_kappa[partition][drawer][fibre][gain] += (m_rs_reducedKappa[partition][drawer][couple][gain]->Mean()/(q0*q1) - 1);
-	  
-          if ( fibre ) nCouplesOdd ++; 
-	  else nCouplesEven++;
-
-        } // FOR
-
-        if ( nCouplesEven!=0 ) m_kappa[partition][drawer][0][gain] = m_kappa[partition][drawer][0][gain]/nCouplesEven;
-        if ( nCouplesOdd!=0 )  m_kappa[partition][drawer][1][gain] = m_kappa[partition][drawer][1][gain]/nCouplesOdd;
-        
-       
-        // This line looks like a bug to me (Henric), commenting it,
-	// m_kappa[partition][drawer][32][gain] = m_kappa[partition][drawer][0][gain];
-        // END OF KAPPA CALCULATION
-        
+	int chan1;
+	int chan2;
+	double q1;
+	double q2;
+
+	//We evaluate kappa value for odd PMTs
+	for (int pmt1=0; pmt1<NCOUPLES-1; ++pmt1){
+	  for (int pmt2=pmt1+1; pmt2<NCOUPLES; ++pmt2){
+	    chan1 = getCoupleOfPMT(partition, pmt1).second;
+	    chan2 = getCoupleOfPMT(partition, pmt2).second;
+	    q1 = m_rs_signal[partition][drawer][chan1][gain]->Mean();
+	    q2 = m_rs_signal[partition][drawer][chan2][gain]->Mean();
+
+	    if (q1*q2<=0){
+	      continue;
+	    }
+	    if (m_rs_reducedKappa[partition][drawer][pmt1][pmt2][gain][1]->Mean() < q1*q2){
+	      continue;
+	    }
+	    if ((m_rs_reducedKappa[partition][drawer][pmt1][pmt2][gain][1]->Mean()/(q1*q2)-1) > 0.01 ){
+	      continue;
+	    }
+	    m_kappa[partition][drawer][1][gain] += (m_rs_reducedKappa[partition][drawer][pmt1][pmt2][gain][1]->Mean()/(q1*q2)-1);
+	    if ( m_kappa[partition][drawer][1][gain]<0.){
+	      ATH_MSG_DEBUG ( "Negative kappa value: " <<  m_kappa[partition][drawer][1][gain] );
+	    }
+	    nCouplesOdd++;
+	  }// pmt2
+	}// pmt1
+
+	//We evaluate kappa value for even PMTs
+	for (int pmt1=0; pmt1<NCOUPLES-1; ++pmt1){
+	  for (int pmt2=pmt1+1; pmt2<NCOUPLES; ++pmt2){
+	    chan1 = getCoupleOfPMT(partition, pmt2).first;
+	    chan2 = getCoupleOfPMT(partition, pmt1).first;
+	    q1 = m_rs_signal[partition][drawer][chan1][gain]->Mean();
+	    q2 = m_rs_signal[partition][drawer][chan2][gain]->Mean();
+
+	    if (q1*q2<=0){
+	      continue;
+	    }
+	    if (m_rs_reducedKappa[partition][drawer][pmt1][pmt2][gain][0]->Mean()<q1*q2){
+	      continue;
+	    }
+	    if ((m_rs_reducedKappa[partition][drawer][pmt1][pmt2][gain][0]->Mean()/(q1*q2)-1) >0.01){
+	      continue;
+	    }
+	    m_kappa[partition][drawer][0][gain] += (m_rs_reducedKappa[partition][drawer][pmt1][pmt2][gain][0]->Mean()/(q1*q2)-1);
+	    nCouplesEven++;
+	    if (m_kappa[partition][drawer][0][gain]<0.){
+	      ATH_MSG_DEBUG ( "Negative kappa value: " <<  m_kappa[partition][drawer][0][gain] );
+	    }// if
+	  }// pmt2
+	}// pmt1
+	
+        if ( nCouplesEven!=0 ){
+	  m_kappa[partition][drawer][0][gain] = m_kappa[partition][drawer][0][gain]/nCouplesEven;
+	  if (m_kappa[partition][drawer][0][gain]>0.01){
+	    ATH_MSG_DEBUG ( "Too big kappa value: " << m_kappa[partition][drawer][0][gain] << "  " << nCouplesEven);
+	  }
+	}
+        if ( nCouplesOdd!=0 ){
+	  m_kappa[partition][drawer][1][gain] = m_kappa[partition][drawer][1][gain]/nCouplesOdd;
+	  if ( m_kappa[partition][drawer][1][gain]>0.01){
+	    ATH_MSG_DEBUG ( "Too big kappa value: " <<  m_kappa[partition][drawer][1][gain] << "  " << nCouplesOdd );
+	  }
+	}
+               
         for(int channel=0; channel<NCHANNELS; ++channel){
           m_time[partition][drawer][channel][gain]       = m_rs_time[partition][drawer][channel][gain]->Mean();
           m_time_S[partition][drawer][channel][gain]     = m_rs_time[partition][drawer][channel][gain]->StandardDeviation();
@@ -802,45 +844,122 @@ StatusCode TileLaserDefaultCalibTool::finalizeCalculations(){
           
           //-- V.Giangiobbe : save the average charge and variance in slices of m_eventsPerSlice=1000
           if(m_pisaMethod2){
-            for(int iSlice=0; iSlice<m_rs_signal[partition][drawer][channel][gain]->GetNSlices(); ++iSlice){
-              if(iSlice>=100) continue;
+            int nSlices = std::min(NSLICES,m_rs_signal[partition][drawer][channel][gain]->GetNSlices());
+            for(int iSlice=0; iSlice<nSlices; ++iSlice){
               m_mean_slice[partition][drawer][channel][iSlice][gain]     = m_rs_signal[partition][drawer][channel][gain]->Mean(iSlice);
               m_variance_slice[partition][drawer][channel][iSlice][gain] = m_rs_signal[partition][drawer][channel][gain]->Variance(iSlice);
             } // FOR
           } // IF
           
-          if(m_LASERII){
+          if (m_LASERII) { // Laser II
+
             for ( int diode=0; diode<NDIODES; diode++ ) {
 	      for ( int diode_gain=0; diode_gain<NGAINS; diode_gain++) {
 		m_ratio_LASERII[diode][diode_gain][partition][drawer][channel][gain]   = m_rs_ratio_LASERII[diode][diode_gain][partition][drawer][channel][gain]->Mean();
 		m_ratio_S_LASERII[diode][diode_gain][partition][drawer][channel][gain] = m_rs_ratio_LASERII[diode][diode_gain][partition][drawer][channel][gain]->StandardDeviation();
+		m_ratio_LASERII_good[diode][diode_gain][partition][drawer][channel][gain]   = m_rs_ratio_LASERII_good[diode][diode_gain][partition][drawer][channel][gain]->Mean();
+		m_ratio_S_LASERII_good[diode][diode_gain][partition][drawer][channel][gain] = m_rs_ratio_LASERII_good[diode][diode_gain][partition][drawer][channel][gain]->StandardDeviation();
 	      } // FOR
 	    }
 	    m_pmt_ratios[partition][drawer][channel][gain] = m_rs_pmt_ratios[partition][drawer][channel][gain]->Mean();
 	    if (std::abs(m_rs_pmt_ratios[partition][drawer][channel][gain]->Mean())>100000.) {
-	      std::cout << "too big value for " << partition 
-			<< " " << drawer
- 			<< " " << channel
- 			<< " " << gain << " " << m_rs_pmt_ratios[partition][drawer][channel][gain]->NumDataValues() << "status" << m_status[partition][drawer][channel][gain] << std::endl;
-
-		}
+	      ATH_MSG_DEBUG( "too big value for " << partition << " " << drawer	<< " " << channel << " " << gain << " "
+			     << m_rs_pmt_ratios[partition][drawer][channel][gain]->NumDataValues() << "status" << m_status[partition][drawer][channel][gain] );
+	    }
 	    m_pmt_S_ratios[partition][drawer][channel][gain] = m_rs_pmt_ratios[partition][drawer][channel][gain]->StandardDeviation();	    
-	  } else {
-            for(int d=0; d<NDIODES_LASER1; ++d){
+	    
+	  } else { // Laser I
+
+	    for(int d=0; d<NDIODES_LASER1; ++d){
               m_ratio[d][partition][drawer][channel][gain]   = m_rs_ratio[d][partition][drawer][channel][gain]->Mean();
               m_ratio_S[d][partition][drawer][channel][gain] = m_rs_ratio[d][partition][drawer][channel][gain]->StandardDeviation();
+              m_ratio_good[d][partition][drawer][channel][gain]   = m_rs_ratio_good[d][partition][drawer][channel][gain]->Mean();
+              m_ratio_good_S[d][partition][drawer][channel][gain] = m_rs_ratio_good[d][partition][drawer][channel][gain]->StandardDeviation();
             } // Laser 1 diodes
-          } // ELSE
-          m_entries[partition][drawer][channel][gain] = m_rs_signal[partition][drawer][channel][gain]->NumDataValues();
 
+          }
+	  
         } // Channels
       } // Gain
     } // Drawer
   } // Partition
   
+
+  m_cabling = TileCablingService::getInstance();
+  // Store high voltage
+  for(int part=0; part<NPARTITIONS; ++part){
+    int ros = part+1;
+    for(int drawer=0; drawer<NDRAWERS; ++drawer){
+      int module = drawer+1;
+      for(int channel=0; channel<NCHANNELS; ++channel){
+        int pmt = abs(m_cabling->channel2hole(ros,channel));
+        m_HV[part][drawer][channel] = m_tileDCSSvc->getDCSHV(ros, module, pmt);
+        m_HVSet[part][drawer][channel] = m_tileDCSSvc->getDCSHVSET(ros, module, pmt);
+      } // channel
+    } // drawers
+  } // partitions
+
+  // remove all RunningStat objects from memory
+  for ( int diode=0; diode<NDIODES; ++diode ) {
+    for ( int gain=0; gain<NGAINS; gain++ ) {
+      delete m_rs_diode_signal_LASERII[diode][gain];
+    }
+  }
+
+  for(int pmt=0;pmt<NPMTS;++pmt){
+    for ( int gain=0; gain<NGAINS; gain++ ) {
+      delete m_rs_PMT_signal_LASERII[pmt][gain];
+    }
+    delete m_rs_PMT_signal[pmt];
+  }
+
+  for(int d=0; d<NDIODES_LASER1; ++d){
+    delete m_rs_diode_signal[d];
+  }
+
+  for ( int part=0; part<NPARTITIONS; ++part ) {
+    for ( int gain=0; gain<NGAINS; ++gain ) {
+      delete m_rs_meantime[part][gain];
+    }
+
+    for ( int drawer=0; drawer<NDRAWERS; ++drawer ) {
+      for ( int gain=0; gain<NGAINS; ++gain ) {
+        for (int fiber=0; fiber<NFIBERS; ++fiber){
+	   for (int pmt1=0; pmt1<NCOUPLES-1; ++pmt1){
+	     for (int pmt2=pmt1+1; pmt2<NCOUPLES; ++pmt2){
+	       delete m_rs_reducedKappa[part][drawer][pmt1][pmt2][gain][fiber];
+	     }
+	   }
+	}
+
+        for ( int channel=0; channel<NCHANNELS; ++channel ) {
+          delete m_rs_time[part][drawer][channel][gain];
+          delete m_rs_signal[part][drawer][channel][gain];
+          delete m_rs_raw_signal[part][drawer][channel][gain];
+
+          for(int diode=0; diode<NDIODES; ++diode){
+	    for (int diode_gain=0; diode_gain<NGAINS; diode_gain++) {
+	      delete m_rs_ratio_LASERII[diode][diode_gain][part][drawer][channel][gain];
+	      delete m_rs_ratio_LASERII_good[diode][diode_gain][part][drawer][channel][gain];
+	    }
+          }
+
+	  delete m_rs_pmt_ratios[part][drawer][channel][gain];
+
+          for(int d=0; d<NDIODES_LASER1; ++d){
+            delete m_rs_ratio[d][part][drawer][channel][gain];
+	    delete m_rs_ratio_good[d][part][drawer][channel][gain];
+          }
+
+        } // channel loop
+      } // gain loop
+    } // drawer loop
+  } // partition loop
+
   return StatusCode::SUCCESS;
 } // FINALIZECALCULATIONS
 
+
 StatusCode TileLaserDefaultCalibTool::writeNtuple(int runNumber, int runType, TFile * rootFile){
   // CALLED FROM LASERCALIBALG TO STORE CALIBRATION COEFFICIENTS
   // STORES NTUPLE AS ROOT FILE
@@ -889,11 +1008,10 @@ StatusCode TileLaserDefaultCalibTool::writeNtuple(int runNumber, int runType, TF
     t->Branch("Diode_Led",*m_diode_Led_LASERII,"diode_Led[11][2]/F");
     t->Branch("Diode_Sigma_Led",*m_diode_Led_S_LASERII,"diode_sLed[11][2]/F");
 
-    /*    t->Branch("Diode_Lin",*m_diode_Lin_LASERII,"diode_Lin[10][2]/F");
-    t->Branch("Diode_Sigma_Lin",*m_diode_Lin_S_LASERII,"diode_sLin[10][2]/F");
-    */
     t->Branch("Ratio",*m_ratio_LASERII,"signal_cor[10][2][4][64][48][2]/F");
     t->Branch("Sigma_Ratio",*m_ratio_S_LASERII,"signal_cor_s[10][2][4][64][48][2]/F");
+    t->Branch("Ratio_good",*m_ratio_LASERII_good,"signal_cor_good[10][2][4][64][48][2]/F");
+    t->Branch("Sigma_Ratio_good",*m_ratio_S_LASERII_good,"signal_cor_good_s[10][2][4][64][48][2]/F");
     t->Branch("Pmt_Ratio", *m_pmt_ratios, "pmt_ratio[4][64][48][2]/F");
     t->Branch("Sigma_Pmt_Ratio", *m_pmt_S_ratios, "pmt_ratio_s[4][64][48][2]/F");
  
@@ -915,9 +1033,10 @@ StatusCode TileLaserDefaultCalibTool::writeNtuple(int runNumber, int runType, TF
     
     t->Branch("Ratio",*m_ratio,"signal_cor[4][4][64][48][2]/F");
     t->Branch("Sigma_Ratio",*m_ratio_S,"signal_cor_s[4][4][64][48][2]/F");
+    t->Branch("Ratio",*m_ratio_good,"signal_cor_good[4][4][64][48][2]/F");
+    t->Branch("Sigma_Ratio",*m_ratio_good_S,"signal_cor_good_s[4][4][64][48][2]/F");
   } // ELSE
   
-  
   if(m_pisaMethod2){
     t->Branch("MeanSlice",*m_mean_slice,"MeanSlice[4][64][48][100][2]/F");
     t->Branch("VarianceSlice",*m_variance_slice,"VarianceSlice[4][64][48][100][2]/F");
@@ -931,58 +1050,35 @@ StatusCode TileLaserDefaultCalibTool::writeNtuple(int runNumber, int runType, TF
     }
   }
 
-  // FILL VALUES FOR THIS RUN
+  // Fill values for this run
   t->Fill();
   
   return StatusCode::SUCCESS;
-} // WRITENTUPLE
+} // Write ntuple
+
 
 StatusCode TileLaserDefaultCalibTool::finalize(){
-  // STORE HIGH VOLTAGE (HV) AND FINALIZE CALCULATIONS
   ATH_MSG_INFO ( "finalize()" );
-  
-  StatusCode sc = TileLaserDefaultCalibTool::finalizeCalculations(); // Perform the analysis
-  
-  for(int part=0; part<NPARTITIONS; ++part){
-    int ros = part+1;
-    for(int drawer=0; drawer<NDRAWERS; ++drawer){
-      int module = drawer+1;
-      for(int channel=0; channel<NCHANNELS; ++channel){
-        int pmt = abs(m_cabling->channel2hole(ros,channel));        
-        m_HV[part][drawer][channel] = m_tileDCSSvc->getDCSHV(ros, module, pmt);
-        m_HVSet[part][drawer][channel] = m_tileDCSSvc->getDCSHVSET(ros, module, pmt);
-      } // FOR
-    } // FOR
-  } // FOR
-  
-  if(sc.isFailure()){
-    ATH_MSG_ERROR( "Failure in DefaultLaserTool finalization!" );
-    return StatusCode::FAILURE;
-  } // IF
-  
   return StatusCode::SUCCESS;
-} // FINALIZE
+} // FInalize
 
-std::pair<unsigned int, unsigned int> TileLaserDefaultCalibTool::getCoupleOfChan(int ros, int couple){
-  // GET CHANNEL COUPLES THAT ARE ON THE SAME CLEAR FIBER
-  std::pair<unsigned int, unsigned int> coupleOfChannels;
-  
-  int chan1LB[NCOUPLES]={0, 1, 4, 5, 8,  9,  12, 13, 16, 17, 20, 21, 26, 25, 28, 27, 38, 35, 40, 37, 42, 47};
-  int chan2LB[NCOUPLES]={2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 24, 29, 34, 39, 36, 33, 44, 41, 46, 45};
-  
-  int chan1EB[NCOUPLES]={0, 1, 4, 5,  8, 9,  12, 13, 16, 17, 22, 23, 30, 35, 41, 40, -1, -1, -1, -1, -1, -1};
-  int chan2EB[NCOUPLES]={2, 3, 6, 7, 10, 11, 14, 15, 20, 21, 31, 32, 38, 37, 39, 36, -1, -1, -1, -1, -1, -1};
-  
-  //--- LB,
-  if(ros<2){
-    coupleOfChannels.first  = chan1LB[couple];
-    coupleOfChannels.second = chan2LB[couple];
-  } // IF
-  
-  //--- EB
-  if(ros>=2){
-    coupleOfChannels.first  = chan1EB[couple];
-    coupleOfChannels.second = chan2EB[couple];
-  } // IF
-  return coupleOfChannels;
-} // COUPLEOFCHANNELS
+
+std::pair<unsigned int, unsigned int> TileLaserDefaultCalibTool::getCoupleOfPMT(int part, int couple){
+  std::pair<unsigned int, unsigned int> coupleOfPMTs;
+
+  int chanLBOdd[NCOUPLES] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 33, 35, 37, 39, 41, 45, 47};
+  int chanLBEven[NCOUPLES] = {0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 34, 36, 38, 40, 42, 44, 46};
+
+  int chanEBOdd[NCOUPLES] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 21, 23, 32, 35, 36, 37, 40, -1, -1, -1, -1, -1, -1};
+  int chanEBEven[NCOUPLES] = {0, 2, 4, 6, 8, 10, 12, 14, 16, 20, 22, 30, 31, 38, 39, 41, -1, -1, -1, -1, -1, -1};
+
+  if (part<2){   //----LB
+    coupleOfPMTs.first = chanLBEven[couple];
+    coupleOfPMTs.second = chanLBOdd[couple];
+  } else {  //----EB
+    coupleOfPMTs.first = chanEBEven[couple];
+    coupleOfPMTs.second = chanEBOdd[couple];
+  }
+
+  return coupleOfPMTs;
+}
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx
index d6b1473ee8f4a0962c937e41c3445bf7640e756e..f789631f943735b65fe30e623588c63e834279b4 100644
--- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx
@@ -522,7 +522,46 @@ StatusCode TileLaserLinearityCalibTool::finalizeCalculations()
     }
   } 
 
+  // remove all RunningStat objects from memory
 
+  for(int f=0; f<8; ++f)
+  {
+    for(int d=0; d<2; ++d)
+    {
+      delete m_LG_PMT_signal[f][d];
+      delete m_HG_PMT_signal[f][d];
+    }
+  }
+
+  for(int f=0; f<8; ++f)
+  {
+    for(int d=0; d<4; ++d)
+    {
+      delete m_LG_diode_signal[f][d];
+      delete m_HG_diode_signal[f][d];
+    }
+  }
+
+  for(int f=0; f<8; ++f)        // Filter
+  {
+    for(int i=0; i<4; ++i)      // Partition
+    {
+      for(int j=0; j<64; ++j)   // Module
+      {
+	for(int k=0; k<48; ++k) // Channel
+	{
+	  for(int l=0; l<2; ++l) // Gain
+	  {
+	    delete m_signal[f][i][j][k][l];
+	    delete m_HG_ratio_stat[f][i][j][k][l];
+	    delete m_HG_ratio2_stat[f][i][j][k][l];
+	    delete m_LG_ratio_stat[f][i][j][k][l];
+	    delete m_LG_ratio2_stat[f][i][j][k][l];
+	  }
+	}
+      }
+    }
+  }
 
   return StatusCode::SUCCESS;  
 }       
@@ -585,7 +624,6 @@ StatusCode TileLaserLinearityCalibTool::writeNtuple(int runNumber, int runType,
 StatusCode TileLaserLinearityCalibTool::finalize()
 {
   ATH_MSG_INFO ( "finalize()" );
-  ATH_CHECK( TileLaserLinearityCalibTool::finalizeCalculations() );
   return StatusCode::SUCCESS;  
 }  
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobObjs/doc/packagedoc.h b/TileCalorimeter/TileCalib/TileCalibBlobObjs/doc/packagedoc.h
index 4284e5f5f6213c2bbf97153dddc2c70fea474921..610e02a9558588247fba55760dae91f72fb56f5e 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobObjs/doc/packagedoc.h
+++ b/TileCalorimeter/TileCalib/TileCalibBlobObjs/doc/packagedoc.h
@@ -25,16 +25,6 @@ TileCalibDrawer class in case a const coral::Blob reference is passed
 as argurment. This prevents TileCalibDrawer classes from modifying
 const coral::Blobs.
 
-@ref used_TileCalibBlobObjs
-@ref requirements_TileCalibBlobObjs
  
 
 */
-
-/**
-@page used_TileCalibBlobObjs Used Packages
-*/
-
-/**
-@page requirements_TileCalibBlobObjs Requirements
-*/
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py
index 93259057ffe3c7d412cf4f68604055635babb567..711ca20c2aba01be8152f2066e824ac30ccd8733 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileBchTools.py
@@ -57,7 +57,7 @@ class TileBchMgr(TileCalibLogger):
         return TileCalibUtils.getAdcIdx(ros,drawer,channel,adc)
 
     #____________________________________________________________________
-    def __updateFromDb(self, db, folderPath, tag, runLumi, fillTable=1):
+    def __updateFromDb(self, db, folderPath, tag, runLumi, fillTable=1, ros=-1, module=-1):
         """
         Updates the internal bad channel cache with the content
         found in the database. An open database instance (db) has to
@@ -75,15 +75,22 @@ class TileBchMgr(TileCalibLogger):
 
         #=== print status information
         reader = TileCalibTools.TileBlobReader(db,folderPath,tag)
-        self.log().info("Updating dictionary from \'%s\'" % db.databaseName())
-        self.log().info("... using tag \'%s\', run-lumi=%s" % (tag,runLumi))
-        self.__multiVersion = reader.folderIsMultiVersion()
-        self.__comment = reader.getComment(runLumi)
-        self.log().info("... comment: %s" % self.__comment)
+        if ros==-2:
+            ros=0
+            module=TileCalibUtils.definitions_draweridx()
+            self.log().info("Updating dictionary from \'%s\'" % db.databaseName())
+            self.log().info("... using tag \'%s\', run-lumi=%s" % (tag,runLumi))
+            self.__multiVersion = reader.folderIsMultiVersion()
+            self.__comment = reader.getComment(runLumi)
+            self.log().info("... comment: %s" % self.__comment)
 
         #=== loop over the whole detector
-        for ros in xrange(0,TileCalibUtils.max_ros()):
-            for mod in xrange(TileCalibUtils.getMaxDrawer(ros)):
+        rosmin = ros if ros>=0 else 0
+        rosmax = ros+1 if ros>=0 else TileCalibUtils.max_ros()
+        for ros in xrange(rosmin,rosmax):
+            modmin = module if module>=0 else 0
+            modmax = module+1 if module>=0 else TileCalibUtils.getMaxDrawer(ros)
+            for mod in xrange(modmin,modmax):
                 bch = reader.getDrawer(ros, mod, runLumi, False)
                 if bch is None:
                     if fillTable>=0: self.log().warning("Missing IOV in condDB: ros=%i mod=%i runLumi=%s" % (ros,mod,runLumi))
@@ -114,12 +121,12 @@ class TileBchMgr(TileCalibLogger):
         return self.__comment
 
     #____________________________________________________________________
-    def updateFromDb(self, db, folderPath, tag, runLumi, fillTable=1, mode=None):
+    def updateFromDb(self, db, folderPath, tag, runLumi, fillTable=1, mode=None, ros=-1, module=-1):
         if mode: self.__mode = mode
-        self.__updateFromDb(db, folderPath, tag, runLumi, fillTable)
+        self.__updateFromDb(db, folderPath, tag, runLumi, fillTable, ros, module)
 
     #____________________________________________________________________
-    def initialize(self, db, folderPath, tag="", runLumi=(MAXRUN,MAXLBK-1), mode=None):
+    def initialize(self, db, folderPath, tag="", runLumi=(MAXRUN,MAXLBK-1), mode=None, ros=-1, module=-1):
         """
         Initializes the internal bad channel cache. Any changes applied to the
         cache previous to calling this function are lost. Typically this function
@@ -130,18 +137,22 @@ class TileBchMgr(TileCalibLogger):
         #=== initialize reference to current status
         self.__runLumi = runLumi
         if mode: self.__mode = mode
+        fT = -1
         if self.__mode<0: # silent mode
             self.__mode = -self.__mode
             if self.__mode==2:
-                self.updateFromDb(db,folderPath,tag,runLumi,-3)
+                fT = -3
             else:
-                self.updateFromDb(db,folderPath,tag,runLumi,-2)
+                fT = -2
         else:
             if self.__mode==2:
-                self.updateFromDb(db,folderPath,tag,runLumi,3)
+                fT = 3
             else:
-                self.updateFromDb(db,folderPath,tag,runLumi,2)
+                fT = 2
 
+        if ros!=-2:
+            self.__updateFromDb(db,folderPath,tag,runLumi,fT,-2)
+        self.__updateFromDb(db,folderPath,tag,runLumi,fT,ros,module)
         #=== update TileBchStatus::isBad() definition from DB
         self.log().info("Updating TileBchStatus::isBad() definition from DB")
         status = self.getBadDefinition()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py
index 0e5bbdcd1068510df58c5ee5a3374f6b11daee92..cdc42f4be124467b4efe371645afbfbe78b27a53 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCalibTools.py
@@ -67,7 +67,7 @@ def getLastRunNumber(partition=""):
         data = response.read().split()
     except:
         data=[]
-    return int(data[0]) if len(data) else 222222
+    return int(data[0])+1 if len(data) else 222222
 
 #
 #______________________________________________________________________
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py
index a2b1323a3d622f631ca81035f36dec1740e8bc2d..33351942577334f971da27a5c8511a83cbb5b1ec 100644
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/python/TileCellTools.py
@@ -7,10 +7,60 @@ class TileCellHashMgr():
     This class ised to convert cell hash to cell name
     """
     #____________________________________________________________________
-    def __init__(self):
+    def __init__(self, geometry='Default'):
 
         #=== initialize all arrays
-        self.__cellNames=[ 
+        self._geometry=geometry
+        if geometry == "UpgradeABC":
+            self._cellNames=[
+            ["A-1","A-2","A-3","B-1","C-1","A-4","A-5","A-6","A-7","B-2","C-2","A-8","A-9","D-1","A-10","A-11","B-3","C-3","A-12","A-13","A-14","A-15","B-4","C-4",
+             "A-16","A-17","D-2","A-18","A-19","B-5","C-5","A-20","A-21","A-22","A-23","B-6","C-6","A-24","A-25","D-3","A-26","A-27","B-7","C-7","A-28","A-29","A-30",
+             "A-31","B-8","C-8","A-32","A-33","A-34","A-35","B-9","A-36","A-37","A-38","A-39","A-40"],
+            ["A+1","D*0","A+2","A+3","B+1","C+1","A+4","A+5","A+6","A+7","B+2","C+2","A+8","A+9","D+1","A+10","A+11","B+3","C+3","A+12","A+13","A+14","A+15","B+4","C+4",
+             "A+16","A+17","D+2","A+18","A+19","B+5","C+5","A+20","A+21","A+22","A+23","B+6","C+6","A+24","A+25","D+3","A+26","A+27","B+7","C+7","A+28","A+29","A+30",
+             "A+31","B+8","C+8","A+32","A+33","A+34","A+35","B+9","A+36","A+37","A+38","A+39","A+40"],
+            ["D-5","A-42","B-11","A-44","A-45","A-46","A-47","B-12","A-48","A-49","D-6","A-50","A-51","B-13","A-52","A-53","A-54","A-55","B-14","A-56","A-57","A-58","A-59","B-15",
+             "A-60","A-61","A-62","A-63","A-64"],
+            ["D+5","A+42","B+11","A+44","A+45","A+46","A+47","B+12","A+48","A+49","D+6","A+50","A+51","B+13","A+52","A+53","A+54","A+55","B+14","A+56","A+57","A+58","A+59","B+15",
+             "A+60","A+61","A+62","A+63","A+64"],
+            ["D-4","C-10","E-1","E-2","E-3","E-4","spD-4","spC-10","spD-40","spE-1","mbE-1","e4E-1"],
+            ["D+4","C+10","E+1","E+2","E+3","E+4","spD+4","spC+10","spD+40","spE+1","mbE+1","e4E+1"]
+            ]
+            self._nCellsModule = [60,61,29,29,6,6]
+
+        elif geometry == "UpgradeBC":
+            self._cellNames=[
+            ["A-1","B-1","C-1","A-2","B-2","C-2","A-3","B-3","C-3","D-1","A-4","B-4","C-4","A-5","B-5","C-5","D-2","A-6","B-6","C-6","A-7","B-7","C-7",
+             "D-3","A-8","B-8","C-8","A-9","B-9","A-10"],
+            ["A+1","B+1","C+1","D*0","A+2","B+2","C+2","A+3","B+3","C+3","D+1","A+4","B+4","C+4","A+5","B+5","C+5","D+2","A+6","B+6","C+6","A+7","B+7","C+7",
+             "D+3","A+8","B+8","C+8","A+9","B+9","A+10"],
+            ["B-11","D-5","A-12","B-12","A-13","B-13","D-6","A-14","B-14","A-15","B-15","A-16"],
+            ["B+11","D+5","A+12","B+12","A+13","B+13","D+6","A+14","B+14","A+15","B+15","A+16"],
+            ["D-4","C-10","E-1","E-2","E-3","E-4","spD-4","spC-10","spD-40","spE-1","mbE-1","e4E-1"],
+            ["D+4","C+10","E+1","E+2","E+3","E+4","spD+4","spC+10","spD+40","spE+1","mbE+1","e4E+1"]
+           ]
+            self._nCellsModule = [30,31,12,12,6,6]
+
+        elif geometry == "UpgradeA":
+            self._cellNames=[
+            ["A-1","A-2","A-3","B-1","A-4","A-5","A-6","A-7","B-2","A-8","A-9","D-1","A-10","A-11","B-3","A-12","A-13","A-14","A-15","B-4","A-16","A-17","D-2","A-18",
+             "A-19","B-5","A-20","A-21","A-22","A-23","B-6","A-24","A-25","D-3","A-26","A-27","B-7","A-28","A-29","A-30","A-31","B-8","A-32","A-33","A-34",
+             "A-35","B-9","A-36","A-37","A-38","A-39","A-40"],
+            ["A+1","D*0","A+2","A+3","B+1","A+4","A+5","A+6","A+7","B+2","A+8","A+9","D+1","A+10","A+11","B+3","A+12","A+13","A+14","A+15","B+4","A+16","A+17","D+2","A+18",
+             "A+19","B+5","A+20","A+21","A+22","A+23","B+6","A+24","A+25","D+3","A+26","A+27","B+7","A+28","A+29","A+30","A+31","B+8","A+32","A+33","A+34",
+             "A+35","B+9","A+36","A+37","A+38","A+39","A+40"],
+            ["D-5","A-42","B-11","A-44","A-45","A-46","A-47","B-12","A-48","A-49","D-6","A-50","A-51","B-13","A-52","A-53","A-54","A-55","B-14","A-56","A-57","A-58","A-59","B-15",
+             "A-60","A-61","A-62","A-63","A-64"],
+            ["D+5","A+42","B+11","A+44","A+45","A+46","A+47","B+12","A+48","A+49","D+6","A+50","A+51","B+13","A+52","A+53","A+54","A+55","B+14","A+56","A+57","A+58","A+59","B+15",
+             "A+60","A+61","A+62","A+63","A+64"],
+            ["D-4","C-10","E-1","E-2","E-3","E-4","spD-4","spC-10","spD-40","spE-1","mbE-1","e4E-1"],
+            ["D+4","C+10","E+1","E+2","E+3","E+4","spD+4","spC+10","spD+40","spE+1","mbE+1","e4E+1"]
+            ]
+            self._nCellsModule = [52,53,29,29,6,6]
+
+        else:
+            self._geometry="Default"
+            self._cellNames=[
             ["A-1","B-1","A-2","B-2","A-3","B-3","D-1","A-4","B-4","A-5","B-5","D-2","A-6","B-6","A-7","B-7","D-3","A-8","B-8","A-9","B-9","A-10"],
             ["A+1","B+1","D*0","A+2","B+2","A+3","B+3","D+1","A+4","B+4","A+5","B+5","D+2","A+6","B+6","A+7","B+7","D+3","A+8","B+8","A+9","B+9","A+10"],
             ["B-11","D-5","A-12","B-12","A-13","B-13","D-6","A-14","B-14","A-15","B-15","A-16"],
@@ -18,28 +68,42 @@ class TileCellHashMgr():
             ["D-4","C-10","E-1","E-2","E-3","E-4","spD-4","spC-10","spD-40","spE-1","mbE-1","e4E-1"],
             ["D+4","C+10","E+1","E+2","E+3","E+4","spD+4","spC+10","spD+40","spE+1","mbE+1","e4E+1"]
             ]
+            self._nCellsModule = [22,23,12,12,6,6]
 
-        self.__partNames=["LBC","LBA","EBC","EBA","EBC","EBA"]
-        self.__nCellsModule = [22,23,12,12,6,6]
-        self.__nModules = 64
-        self.__nCellsPart = [0]
-        self.__nHashMax=0
+        self._partNames=["LBC","LBA","EBC","EBA","EBC","EBA"]
+        self._nModules = 64
+        self._nCellsPart = [0]
+        self._nHashMax=0
         for p in xrange(6):
-            self.__nHashMax+=self.__nCellsModule[p]*self.__nModules
-            self.__nCellsPart.append(self.__nHashMax)
+            self._nHashMax+=self._nCellsModule[p]*self._nModules
+            self._nCellsPart.append(self._nHashMax)
+
+    #____________________________________________________________________
+    def getGeometry(self):
+        """
+        return geometry name
+        """
+        return self._geometry
+
+    #____________________________________________________________________
+    def getHashMax(self):
+        """
+        return max hash value
+        """
+        return self._nHashMax
 
     #____________________________________________________________________
     def getNames(self, hash):
         """
         return module name and cell name for given hash
         """
-        if hash>=self.__nHashMax or hash<0:
+        if hash>=self._nHashMax or hash<0:
             return (None,None)
 
-        part=bisect.bisect(self.__nCellsPart,hash)-1
-        module=(hash-self.__nCellsPart[part])/self.__nCellsModule[part]+1
-        modName="%s%02d" % (self.__partNames[part],module)
-        index=(hash-self.__nCellsPart[part])%self.__nCellsModule[part]
+        part=bisect.bisect(self._nCellsPart,hash)-1
+        module=(hash-self._nCellsPart[part])/self._nCellsModule[part]+1
+        modName="%s%02d" % (self._partNames[part],module)
+        index=(hash-self._nCellsPart[part])%self._nCellsModule[part]
         if part>=4:
             if index==0 and ((part==4 and module==18) or (part==5 and module==15)): index+=8
             if index==0 and (module==14 or module==15 or module==18 or module==19): index+=6
@@ -50,19 +114,19 @@ class TileCellHashMgr():
                 if index==2 and (module==28 or module==31 or module==35 or module==38): index+=7
                 if index==2 and (module==29 or module==32 or module==34 or module==37): index+=9
 
-        return (modName,self.__cellNames[part][index])
+        return (modName,self._cellNames[part][index])
 
     #____________________________________________________________________
     def cellName(self, hash):
         """
         return cell name for given hash
         """
-        if hash>=self.__nHashMax or hash<0:
+        if hash>=self._nHashMax or hash<0:
             return None
 
-        part=bisect.bisect(self.__nCellsPart,hash)-1
-        module=(hash-self.__nCellsPart[part])/self.__nCellsModule[part]+1
-        index=(hash-self.__nCellsPart[part])%self.__nCellsModule[part]
+        part=bisect.bisect(self._nCellsPart,hash)-1
+        module=(hash-self._nCellsPart[part])/self._nCellsModule[part]+1
+        index=(hash-self._nCellsPart[part])%self._nCellsModule[part]
         if part>=4:
             if index==0 and ((part==4 and module==18) or (part==5 and module==15)): index+=8
             if index==0 and (module>=15 and module<=18): index+=6
@@ -71,18 +135,18 @@ class TileCellHashMgr():
             if part==4:
                 if index==2 and (module==28 or module==29 or module==31 or module==32 or module==35 or module==34 or module==38 or module==37): index+=7
 
-        return self.__cellNames[part][index]
+        return self._cellNames[part][index]
 
     #____________________________________________________________________
     def moduleName(self, hash):
         """
         return module name for given hash
         """
-        if hash>=self.__nHashMax or hash<0:
+        if hash>=self._nHashMax or hash<0:
             return None
 
-        part=bisect.bisect(self.__nCellsPart,hash)-1
-        module=(hash-self.__nCellsPart[part])/self.__nCellsModule[part]+1
-        modName="%s%02d" % (self.__partNames[part],module)
+        part=bisect.bisect(self._nCellsPart,hash)-1
+        module=(hash-self._nCellsPart[part])/self._nCellsModule[part]+1
+        modName="%s%02d" % (self._partNames[part],module)
 
         return modName
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py
index f870d3649d05845eb92641ad3ce56a93dfb5dab5..3d6b44b71f50a6882cf58d1486f4b3020e879c33 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/BchCleanup.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # File:    BchCleanup.py
 # Package: TileCalibBlobPython
 # Purpose: Clean up BCH folders from an input bch-input-sqlite.db file.  Output saved to output sqlite.db file.
@@ -94,7 +97,7 @@ if __name__ == "__main__":
   keywords = ["help","tag=","folder=","outtag=","instance="]
   try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-  except getopt.GetOptError, err:
+  except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py
index 4e249eb7b2f0be3c8b49af0b28a41aadbc31a8f1..4cec58414eb50fc6acb5aa8fb0c8207474c13442 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/CheckTagAssociation.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # CheckTagAssociation.py
 # Andrei Artamonov 2012
 #==================================================
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py
index 7bc8c670628a8dfdb45ac3a4b723c1a5a5507404..57e8af227b8c1619942aef6efc477f4d9ac293ee 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/Example_ReadSampleNoise.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # Example_ReadSampleNoise.py
 # Nils Gollub <nils.gollub@cern.ch>, 2008-06-16
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py
new file mode 100755
index 0000000000000000000000000000000000000000..e5037427b78e3f769483abfbeafd38a9c3349db5
--- /dev/null
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotCalibFromCool.py
@@ -0,0 +1,649 @@
+#!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+# PlotCalibFromCool.py
+# Using Part of ReadCalibfromCool.py to plot constants
+# Tigran Mkrtchyan 2017-06-15
+
+
+
+import getopt,sys,os,string,math,re
+os.environ['TERM'] = 'linux' 
+
+def usage():
+    print "How to use: ",sys.argv[0]," [OPTION] ... "
+    print "Plots the TileCal constants from various schemas / folders / tags as a function of run number/ lumiblock"
+    print ""
+    print "-h, --help      shows this help"
+    print "-T, --tree      save all in a tree"
+    print "-o, --opt=      specify plotting option: line, noline or graph, bin, dist or 2d, default is dist"
+    print "-P, --print     print all the values on the console"
+    print "-n, --norm      normalize everything to the first point"
+    print "-f, --folder=   specify status folder to use f.i. /TILE/OFL02/CALIB/CIS/LIN "
+    print "-t, --tag=      specify tag to use, f.i. UPD1 or UPD4 or full suffix like RUN2-HLT-UPD1-00"
+    print "-b, --begin=    specify the starting run number"
+    print "-e, --end=      sepcify the last run number"
+    print "-r, --run=      specify fixed run number, will plot constants as a function of lumi"
+    print "-l, --lumi=     specify lumi block number, default is 0"
+    print "-p, --part=     specify which partition to plot, only for --plotopt=2d"
+    print "-I, --modmin=   specify minimal module to use for 2D plot, default is 1"
+    print "-A, --modmax=   specify maximal module to use for 2D plot, default is 64"
+    print "-N, --chmin=    specify minimal channel to use for 2D plot, default is 0"
+    print "-X, --chmax=    specify maximal channel to use for 2D plot, default is 47"
+    print "-Y, --gmin=     specify minimal gain to use for print option, default is 0"
+    print "-Z, --gmax=     specify maximal gain to use for print option, default is 1"
+    print "-m, --module=   specify module to use for 1D plots, default is LBA01"
+    print "-c, --chan=     specify channel to use for 1D plots, default is 0"
+    print "-g, --gain=, -a, --adc=  specify adc(gain) to use, default is 0 (low gain)"
+    print "-v, --val=,  -i, --ind=  specify index of value to use, default is 0 "
+    print "-s, --schema=   specify schema to use, like 'COOLONL_TILE/CONDBR2' or 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2' or tileSqlite.db"
+
+
+letters = "hr:l:s:t:f:a:g:b:e:o:Pp:Tv:i:m:c:I:A:N:X:Y:Z:n"
+words = ["help","run=","lumi=","schema=","tag=","folder=","adc=","gain=","print","module=","opt=","chan=","begin=","end=","tree","val=","ind=","part=","modmin=","modmax=","chmin=","chmax=","gmin=","gmax=","norm"]
+try:
+    options,args = getopt.getopt(sys.argv[1:],letters,words)
+except getopt.GetoptError, err:
+    print
+    print str(err)
+    print
+    usage()
+    sys.exit(2)
+
+
+
+# defaults 
+schema = 'COOLOFL_TILE/CONDBR2'
+folderPath =  "/TILE/OFL02/CALIB/CIS/LIN"
+tag = "UPD4"
+line = False
+noline = False
+vsbin = False
+plotopt= "dist"
+save_tree = False
+print_msg = False
+opt2d = False 
+partname = "LBA"
+modulename = "LBA01"
+modmin=0
+modmax=9999
+chanmin=0
+chanmax=9999
+gainmin=0
+gainmax=1
+mod_n = 0
+chan_n = 0
+gain_n = 0
+val_n = 0
+begin = 0
+end = 0
+runNum = 0
+lumiNum = 0
+one_run = False
+multi = False
+norm = False
+
+for o, a in options:
+    if o in ("-f","--folder"):
+        folderPath = a
+    elif o in ("-t","--tag"):
+        tag = a
+    elif o in ("-s","--schema"):
+        schema = a
+    elif o in ("-b","--begin"):
+        begin = int(a)
+    elif o in ("-e","--end"):
+        end = int(a)
+    elif o in ("-r","--run"):
+        runNum = int(a)
+        one_run = True
+    elif o in ("-l","--lumi"):
+        lumiNum = int(a)
+    elif o in ("-m","--module"):
+        modulename = a
+    elif o in ("-c","--chan"):
+        chan_n = int(a)
+        chanmin = chan_n
+        chanmax = chan_n
+    elif o in ("-a","--adc","-g","--gain"):
+        gain_n = int(a)
+        gainmin = gain_n
+        gainmax = gain_n
+    elif o in ("-v","--val","-i","--ind"):
+        val_n = int(a)
+    elif o in ("-p","--part"):
+        partname = a
+        opt2d = True
+    elif o in ("-I","--modmin"):
+        modmin = int(a)
+    elif o in ("-A","--modmax"):
+        modmax = int(a)
+    elif o in ("-N","--chmin"):
+        chanmin = int(a)
+    elif o in ("-X","--chmax"):
+        chanmax = int(a)
+    elif o in ("-Y","--gmin"):
+        gainmin = int(a)
+    elif o in ("-Z","--gmax"):
+        gainmax = int(a)
+    elif o in ("-o","--opt"):
+        plotopt = a
+    elif o in ("-T","--tree"):
+        save_tree = True 
+    elif o in ("-P","--print"):
+        print_msg = True 
+    elif o in ("-n","--norm"):
+        norm = True 
+    elif o in ("-h","--help"):
+        usage()
+        sys.exit(2) 
+    else:
+        assert False, "unhandeled option"
+
+
+if opt2d: plotopt = "2d"
+if plotopt == "print": print_msg = True
+elif plotopt == "line": line = True
+elif plotopt == "bin": vsbin = True
+elif plotopt == "noline" or plotopt == "graph": noline = True
+elif plotopt == "2d": opt2d = True; one_run = True
+
+chan_n=max(0,chan_n)
+gain_n=max(0,gain_n)
+val_n=max(0,val_n)
+
+if opt2d: 
+    partname=partname[:3]
+    modulename=partname+"00"
+    modmin=max(1,modmin)
+    modmax=min(64,modmax)
+    chanmin=max(0,chanmin)
+    chanmax=min(47,chanmax)
+else: 
+    if len(modulename) < 5 or len(modulename) > 5:
+        print "Wrong module name:",modulename
+        sys.exit(2)
+    partname=modulename[:3]
+    modnum=modulename[3:]
+    if modnum.isdigit():
+        mod_n=int(modnum)
+        if mod_n<1 or mod_n>64:
+            print "Wrong module name:",modulename
+            sys.exit(2)
+        modmin=mod_n
+        modmax=mod_n
+    else:
+        print "Wrong module name:",modulename
+        sys.exit(2)
+    if plotopt != "print":
+        chanmin=chan_n
+        chanmax=chan_n
+if plotopt != "print":
+    gainmin=gain_n
+    gainmax=gain_n
+
+part_dict = {'AUX':0,'LBA':1,'LBC':2,'EBA':3,'EBC':4,'ALL':5}
+if partname in part_dict:
+    ros=part_dict[partname]
+    if ros==5: rosmin=0; rosmax=5; ros=-1
+    else: rosmin=ros; rosmax=ros+1
+else:
+    if opt2d: print "Wrong partition name:",partname
+    else: print "Wrong module name:",modulename
+    sys.exit(2)
+
+if one_run and plotopt == "dist":
+    print "Switching to noline mode"
+    noline = True
+    plotopt = "noline"
+
+
+import ROOT
+from ROOT import TCanvas, TH1D, TH2D, TGraph, TTree
+from ROOT import gROOT
+from ROOT import kTRUE
+from array import array
+import numpy as np
+
+
+from TileCalibBlobPython import TileCalibTools
+from TileCalibBlobPython import TileCellTools
+from TileCalibBlobObjs.Classes import *
+from TileCalibBlobPython.TileCalibLogger import TileCalibLogger, getLogger
+log = getLogger("PlotCalibFromCool")
+import logging
+logLevel=logging.DEBUG
+log.setLevel(logLevel)
+log1 = getLogger("PlotCalibFromCool")
+log1.setLevel(logLevel)
+
+folderPath=folderPath.split(",")
+folderTag=[]
+for fp in folderPath:
+    ft = TileCalibTools.getFolderTag(schema , fp, tag)
+    log.info("Initializing folder %s with tag %s" % (fp, ft))
+    folderTag += [ft]
+multi=(len(folderPath)>1)
+
+#=== Get list of IOVs for given drawer or for comments record
+if ros!=-1:
+    modmax=min(modmax,TileCalibUtils.getMaxDrawer(ros))
+if ros!=-1 and modmin==modmax:
+    COOL_part = ros
+    COOL_chan = modmin-1
+elif ros==0 and modmin==1:
+    COOL_part = ros
+    COOL_chan = modmin-1
+else:
+    COOL_part = -1
+    COOL_chan = 1000
+idb = TileCalibTools.openDbConn(schema,'READONLY')
+iovList = []
+blobReader = []
+for (fp,ft) in zip(folderPath,folderTag):
+  try:
+    br = TileCalibTools.TileBlobReader(idb,fp, ft)
+    blobReader += [br]
+    dbobjs = br.getDBobjsWithinRange(COOL_part, COOL_chan)
+    if (dbobjs == None): raise Exception("No DB objects retrieved when building IOV list!")
+    while dbobjs.goToNext():
+      obj = dbobjs.currentRef()
+      objsince = obj.since()
+      sinceRun = objsince >> 32
+      sinceLum = objsince & 0xFFFFFFFF
+      since    = (sinceRun, sinceLum)
+      objuntil = obj.until()
+      untilRun = objuntil >> 32
+      untilLum = objuntil & 0xFFFFFFFF
+      until    = (untilRun, untilLum)
+
+      if multi:
+          iov = (since, since)
+      else:
+          iov = (since, until)
+      iovList.append(iov)
+  except:
+    print "Warning: can not read IOVs from input DB file"
+    sys.exit(2)
+
+if multi:
+    il=[]
+    iov1=(-1,-1)
+    for iov in sorted(iovList):
+        iov2=iov[0]
+        if iov1!=iov2:
+            il.append(iov)
+            iov1=iov2
+    iovList=[]
+    for i in xrange(len(il)-1):
+        iovList.append(((il[i][0][0],il[i][0][1]),(il[i+1][1][0],il[i+1][1][1])))
+    i=len(il)-1
+    iovList.append(((il[i][0][0],il[i][0][1]),(0xFFFFFFFF,0xFFFFFFFF)))
+
+###################################################################
+print "\nPlotting in %s mode" % plotopt
+print '-'*20
+
+be=iovList[0][0][0]
+en=iovList[-1][0][0]
+
+import cx_Oracle
+connection=cx_Oracle.connect(dsn="ATLR",user="atlas_run_number_r",password="-Run.Num@rEaDeR-x-12")
+con=connection.cursor()
+sql="SELECT MAX(RUNNUMBER) FROM ATLAS_RUN_NUMBER.RUNNUMBER"
+con.execute(sql)
+data=con.fetchall()
+lastrun=data[0][0]
+connection.close()
+
+if runNum <= 0:
+    runNum = en
+if one_run:
+    begin = runNum
+    end = runNum
+    if line or noline:
+        lumiNum = 0
+else:
+    if begin <= 0: begin = be
+    if end <= 0: end = lastrun
+
+veryEnd = end if end<lastrun else lastrun
+
+if begin != be or end != en:
+    ib=0
+    ie=len(iovList)
+    for i,iovs in enumerate(iovList):
+        run = iovs[0][0]
+        lumi = iovs[0][1]
+        if (run<begin and run>be) or (run==begin and lumi<=lumiNum):
+            be=run
+            ib=i
+        if run>end and run<en:
+            en=run
+            ie=i+1
+    if be != begin:
+        print "Changing begin run from",begin,"to",be,"(start of IOV)"
+        begin=be
+    if en != end:
+        if en>end: print "Changing end run from",end,"to",en,"(start of next IOV)"
+        else: print "Changing end run from",end,"to",en,"(start of last IOV)"
+        end=en
+    iovList=iovList[ib:ie]
+
+if one_run: 
+    if opt2d and not (line or noline):
+        iovList=iovList[:1]
+        print "Plotting values for (Run,Lumi) = (%i,%i) " % (runNum,lumiNum)
+        print "from IOV",iovList[0]
+    elif len(iovList)<=2 and iovList[-1][0][0]!=runNum:
+        print "Too few points to plot value as a function of lumi block"
+        print "Just one IOV around run", runNum
+        print iovList[0]
+        print "Plotting value as a function of run number"
+        one_run=False
+    else:
+        print "Plotting Run: %i" % runNum
+        print "IOV around this run"
+        print iovList
+        if not line and runNum!=iovList[-1][0][0]:
+            iovList=iovList[:-1]
+            
+if not one_run: 
+    print "Plotting Runs: %i to %i" % (begin, end)
+    print len(iovList),"different IOVs in total"
+    if iovList[0][0][0]!=begin or iovList[-1][0][0]!=end:
+        print "Congratulations! You found the bug in this script"
+        print "Please, contact authors"
+        sys.exit(2)
+
+####################################################################
+
+#### Creating tree for constants
+
+ROOT.gROOT.SetBatch(kTRUE)
+
+labels = ROOT.vector('string')()
+vals = ROOT.vector('double')()
+
+titsuff=""
+if one_run or opt2d:
+    if lumiNum<=0:
+        titsuff=" Run " + str(runNum)
+    else: 
+        titsuff=" Run " + str(runNum) + " LB " + str(lumiNum)
+titsuff+=" Tag " + " ".join(folderTag)
+rlt=titsuff.replace(" ","_").replace("_Tag","")
+
+if opt2d: fname="%s_g%d_v%d%s_%s" % ( partname,gain_n,val_n,rlt,plotopt)
+else: fname="%s_ch%2.2d_g%d_v%d%s_%s" % ( modulename,chan_n,gain_n,val_n,rlt,plotopt) 
+
+if save_tree: tree_file = ROOT.TFile(fname+".root","RECREATE")
+
+tree = TTree("tree","ttree")
+run_n = np.zeros(1, dtype = float)
+lumi_n = np.zeros(1, dtype = float)
+channel_n = np.zeros(1, dtype = float)
+module_n = np.zeros(1, dtype = int)
+value = np.zeros(1, dtype = float)
+scale = np.zeros(1, dtype = float)
+
+tree.Branch("runnumber",run_n,'runnumber/D')
+tree.Branch("luminum",lumi_n,'luminum/D')
+tree.Branch("channel",channel_n,'channel/D')
+tree.Branch("module",module_n,'module/I')
+tree.Branch("labels", labels)
+tree.Branch("vals", vals)
+if multi: tree.Branch("value", value,'value/D')
+if norm: tree.Branch("scale", scale,'scale/D')
+
+####################################################################
+#Looping over iovs and filling the tree
+first=True
+value[0]=1.
+scale[0]=1.
+vals.clear()
+labels.clear()
+one_iov = (len(iovList)<2)
+
+for iovs in iovList:
+        
+    if one_iov:
+        run = runNum
+        lumi = lumiNum
+        rl = "(%i,%i) - (%i,%i)" % (iovs[0][0],iovs[0][1],iovs[1][0],iovs[1][1])
+    else:
+        run = iovs[0][0]
+        lumi = iovs[0][1]
+        rl = "(%i,%i)" % (run,lumi)
+        if one_run and run!=runNum:
+            if run<runNum: lumi=-1
+            if run>runNum: lumi=2000
+            run=runNum
+
+    run_n[0] = run
+    lumi_n[0] = lumi
+    if vals.size()>0:
+        if first:
+            scale[0]=value[0]
+            first=False
+        tree.Fill()
+        labels.clear()
+        vals.clear()
+        value[0]=1.
+    
+    for ros in xrange(rosmin,rosmax):
+        for mod in xrange(modmin-1, min(modmax,TileCalibUtils.getMaxDrawer(ros))):
+            module_n[0] = mod
+            modName = TileCalibUtils.getDrawerString(ros,mod)
+            for (fp,ft,br) in zip(folderPath,folderTag,blobReader):
+                try:
+                  flt = br.getDrawer(ros, mod,(run,lumi), False, False)   # modified
+                  if flt is None or isinstance(flt, (int)):
+                      if one_iov or ros!=0: print "%s is missing in DB" % modName
+                  else:
+                      nchan = flt.getNChans()
+                      ngain = flt.getNGains()
+                      nval  = flt.getObjSizeUint32()
+                      for chn in xrange(chanmin,min(chanmax+1,nchan)):
+                          for adc in xrange(gainmin,min(gainmax+1,ngain)):
+                              msg = "%s  %s %2i %1i  " % (rl, modName, chn, adc )
+                              for val in xrange(nval):
+                                  msg += "  %f" % flt.getData(chn, adc, val)
+                                  vals.push_back(flt.getData(chn, adc, val))
+                                  if val==0:
+                                      value[0] *= flt.getData(chn, adc, val)
+                              if print_msg: 
+                                  if multi:
+                                      print fp,msg
+                                  else:
+                                      print msg
+                          channel_n[0] = chn
+                          if one_run: labels.push_back(str(lumi))
+                          else: labels.push_back(str(run))
+                          if not multi or opt2d:
+                              if first:
+                                  if vals.size()>val_n:
+                                      scale[0]=vals[val_n]
+                                  first=False
+                              tree.Fill()
+                              if not line:
+                                  labels.clear()
+                                  vals.clear()
+                                  value[0] = 1.
+
+                except Exception, e:
+                  print e
+
+            if multi and not opt2d and vals.size()>0:
+                if first:
+                    scale[0]=value[0]
+                    first=False
+                tree.Fill()
+                if not line:
+                    labels.clear()
+                    vals.clear()
+                    value[0] = 1.
+
+
+if not opt2d and vals.size()>0:
+    run_n[0] = veryEnd
+    lumi_n[0] = 0
+    if first:
+        scale[0]=value[0]
+        first=False
+    tree.Fill()
+    labels.clear()
+    vals.clear()
+    value[0]=1.
+
+idb.closeDatabase()
+
+if plotopt == "print":
+    sys.exit(0)
+
+
+####################################################################################
+
+ROOT.gROOT.SetStyle("Plain")
+ROOT.gROOT.ForceStyle()
+ROOT.gStyle.SetOptStat(0)
+
+
+if one_run:
+    cut_cond = "runnumber == " + str(runNum)
+else:
+    cut_cond = "runnumber >= " + str(begin) + " && " + "runnumber <= " + str(veryEnd) 
+
+##### Which gain to choose
+if gain_n == 0:
+    gainvalue = "LG"
+elif gain_n == 1:
+    gainvalue = "HG"
+else:
+    gainvalue = "G"+str(gain_n)
+
+##### Which value to choose
+if multi:
+  data = "value"
+else:
+  data = "vals[" + str(val_n) + "]"
+if norm:
+  data += "/scale"
+
+if (line or noline) and not one_run:
+    data += ":runnumber"
+
+elif vsbin:
+    data +=":labels"
+
+elif one_run:
+    data += ":luminum"
+
+
+canv = TCanvas("PlotCalib","plotCalib",0,0,1600,800)
+
+if opt2d: 
+    hhh = TH2D("hhh","hhh",modmax-modmin+1,modmin-0.5,modmax+0.5,chanmax-chanmin+1,chanmin-0.5,chanmax+0.5)
+
+if vsbin: tree.Draw(data,cut_cond,"goff",15)
+else: tree.Draw(data,cut_cond,"goff")
+
+if (not opt2d and tree.GetSelectedRows() <= 1) or tree.GetSelectedRows() <= 0:
+    print "Not enough points to plot"
+    sys.exit(2)
+
+if vsbin:
+    if tree.GetSelectedRows() >= 15:
+        print "Maximum number of bins is 15"
+
+
+if line or noline:
+    gr = TGraph(tree.GetSelectedRows(),tree.GetV2(),tree.GetV1())
+    gr.SetTitle(modulename +" " + " Channel "+ str(chan_n) +" " + gainvalue + titsuff)
+    gr.SetMarkerStyle(20)
+    gr.SetMarkerSize(1.3)
+    gr.SetMarkerColor(2)
+    gr.SetLineColor(2)
+    gr.GetXaxis().SetNoExponent(kTRUE)
+    if one_run: gr.GetXaxis().SetTitle("Lumi")
+    else: gr.GetXaxis().SetTitle("Runs")
+    if noline: gr.Draw("ap")
+    else: gr.Draw("apl")
+
+elif opt2d:
+    nentries = tree.GetEntries()
+    hhh.SetName(modulename)
+    hhh.SetTitle(partname +" " + gainvalue + titsuff)
+    hhh.GetYaxis().SetTitle("Channels")
+    hhh.GetXaxis().SetTitle("Modules")
+
+    if multi:
+        Matrix = [[1 for y in range(48)] for x in range(64)] 
+        for i in xrange(nentries):
+            tree.GetEntry(i)
+            if vals.size()>0:
+                x=int(module_n[0])
+                y=int(channel_n[0])
+                Matrix[x][y] *= vals[0]
+        sc = Matrix[modmax-1][chanmax] if norm and Matrix[modmax-1][chanmax]>0 else 1
+        for x in xrange(modmin,modmax+1):
+            for y in xrange(chanmin,chanmax+1):
+                hhh.Fill(x, y, Matrix[x-1][y]/sc)
+    else:
+        for i in xrange(nentries):
+            tree.GetEntry(i)
+            #print ("%f %f %f") % (module_n[0], channel_n[0],vals[0])
+            if norm:
+                hhh.Fill(module_n[0]+1, channel_n[0],vals[val_n]/scale[0])
+            else:
+                hhh.Fill(module_n[0]+1, channel_n[0],vals[val_n])
+
+    hhh.Draw("colz")
+
+else:
+    h = ROOT.gDirectory.Get("htemp")
+    h.SetName(modulename)
+    h.SetTitle(modulename +" " + " Channel "+str(chan_n)  + " " + gainvalue + titsuff)
+    h.SetLineColor(2)
+    h.SetLineWidth(2)
+    h.GetXaxis().SetTitle("Value")
+    if vsbin or one_run:
+        h.SetMarkerStyle(21)
+        h.SetMarkerSize(1.4)
+        h.SetMarkerColor(2)
+        h.GetXaxis().SetTitle("Run")
+        if one_run: h.GetXaxis().SetTitle("Lumi");  h.SetTitle(modulename +" " + " Channel "+str(chan_n) +" " + gainvalue + titsuff)
+        h.GetYaxis().SetTitle("")
+        h.GetYaxis().SetTitleOffset(1.35)
+    try:
+        h.Draw()
+    except: print "Empty "
+
+canv.SetGridx();
+canv.SetGridy();
+
+canv.Update()
+
+##########################################################
+
+
+canv.Print(fname+".eps")
+canv.Print(fname+".png")
+
+if save_tree: 
+    tree_file.Write()
+    tree_file.Close()
+
+
+        #=== display plot
+os.system("display "+fname+".png") 
+
+
+#
+#if __name__ == '__main__':
+#   rep = ''
+#   while not rep in [ 'q', 'Q' ]:
+#      rep = raw_input( 'enter "q" to quit: ' )
+#      if 1 < len(rep):
+#         rep = rep[0]
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py
index 961dbecd13480703ddd3f40db17f441be4439208..aa2e1b85ba63780a717461013ef225656181fc67 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/PlotPulseshapeFromCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # PlotPulseshapeFromCool.py
 # Nils Gollub <nils.gollub@cern.ch>, 2008-06-05
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py
index 5fa5f573dd6c2484c9e20128d6ce891da5c81a07..e0d480da2c4c5fbe40a2730faab040272ec2ccf0 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBadBitsFromCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ReadBadBitsFromCool.py   --schema='COOLOFL_TILE/CONDBR2'  --folder='OFL02' --tag='UPD4'
 # Sanya Solodkov 2011-07-15
 
@@ -23,7 +26,7 @@ keywords = ["help","run=","lumi=","schema=","tag=","folder=","dbname=","warning"
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py
index 2c97320b296a31a1bb4e9582b82a049c17241d39..f8989191fc4b827b070af17d443124990697c132 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadBchFromCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ReadBchFromCool.py  --schema='COOLOFL_TILE/CONDBR2'  --folder='OFL02' --tag='UPD4'
 # Sanya Solodkov 2011-07-15
 # change: Yuri Smirnov 2015-08-29, correction for EB* modules' nbad counter
@@ -15,20 +18,28 @@ def usage():
     print "-t, --tag=      specify tag to use, f.i. UPD1 or UPD4 or full suffix like RUN2-HLT-UPD1-00"
     print "-r, --run=      specify run  number, by default uses latest iov"
     print "-l, --lumi=     specify lumi block number, default is 0"
-    print "-d, --default   print also default values stored in AUX01-AUX20 "
-    print "-b, --blob      print additional blob info"
+    print "-b, --begin=    specify run number of first iov in multi-iov mode, by default uses very first iov"
+    print "-e, --end=      specify run number of last iov in multi-iov mode, by default uses latest iov"
+    print "-m, --module=   specify module to use, default is not set"
+    print "-N, --chmin=    specify minimal channel to use, default is 0"
+    print "-X, --chmax=    specify maximal channel to use, default is 47"
+    print "-c, --chan=     specify channel to use , default is all channels from chmin to chmax"
+    print "-g, --gain=, -a, --adc=  specify adc(gain) to use, default is 2 (i.e. both low and high gains)"
+    print "-C, --comment   print comment for every IOV"
+    print "-d, --default   print also default values stored in AUX01-AUX20"
+    print "-B, --blob      print additional blob info"
     print "-H, --hex       print frag id instead of module name"
     print "-P, --pmt       print pmt number in addition to channel number"
     print "-s, --schema=   specify schema to use, like 'COOLOFL_TILE/CONDBR2' or 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2' or tileSqlite.db"
     print "-D, --dbname=   specify dbname part of schema if schema only contains file name, default is CONDBR2'"
     print "-w, --warning   suppress warning messages about missing drawers in DB"
     
-letters = "hr:l:s:t:f:D:dbHPw"
-keywords = ["help","run=","lumi=","schema=","tag=","folder=","dbname=","default","blob","hex","pmt","warning"]
+letters = "hr:l:s:t:f:D:dBHPwm:b:e:a:g:c:N:X:C"
+keywords = ["help","run=","lumi=","schema=","tag=","folder=","dbname=","default","blob","hex","pmt","warning","module=","begin=","end=","chmin=","chmax=","gain=","adc=","chan=","comment"]
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
@@ -41,10 +52,28 @@ dbname = ''
 folderPath =  "/TILE/OFL02/STATUS/ADC"
 tag = "UPD4"
 rosmin = 1
+rosmax = 5
 blob = False
 hexid = False
 pmt = False
 warn = 1
+modmin = 0
+modmax = 99999
+modulename="AUX-1"
+partname=""
+one_mod = False
+mod = -1
+ros = -1
+chan_n= -1
+chanmin = -1
+chanmax = -1
+gain_n = -1
+gainmin = -1
+gainmax = -1
+begin = 0
+end = 2147483647
+iov = False
+comment = False
 
 for o, a in opts:
     if o in ("-f","--folder"):
@@ -60,9 +89,30 @@ for o, a in opts:
         run = int(a) 
     elif o in ("-l","--lumi"):
         lumi = int(a)
+    elif o in ("-b","--begin"):
+        begin = int(a)
+        iov = True
+        one_mod = True
+    elif o in ("-e","--end"):
+        end = int(a)
+        iov = True
+        one_mod = True
+    elif o in ("-a","--adc","-g","--gain"):
+        gain_n = int(a)
+    elif o in ("-m","--module"):
+        modulename = a
+        one_mod = True
+    elif o in ("-c","--chan"):
+        chan_n = int(a)
+    elif o in ("-N","--chmin"):
+        chanmin = int(a)
+    elif o in ("-X","--chmax"):
+        chanmax = int(a)
+    elif o in ("-C","--comment"):
+        comment = True
     elif o in ("-d","--default"):
         rosmin = 0
-    elif o in ("-b","--blob"):
+    elif o in ("-B","--blob"):
         blob = True
     elif o in ("-H","--hex"):
         hexid = True
@@ -136,9 +186,9 @@ log.info("Initializing folder %s with tag %s" % (folderPath, folderTag))
 #=== create bad channel manager
 mgr = TileBchTools.TileBchMgr()
 mgr.setLogLvl(logLevel)
-mgr.initialize(db, folderPath, folderTag, (run,lumi), warn)
-if warn<0: 
-    reader = TileCalibTools.TileBlobReader(db,folderPath,folderTag)
+mgr.initialize(db, folderPath, folderTag, (run,lumi), warn, -2)
+if iov or comment or warn<0:
+    blobReader = TileCalibTools.TileBlobReader(db,folderPath,folderTag)
 
 #=== Dump the current isBad definition
 isBadDef = mgr.getAdcProblems(0, TileCalibUtils.definitions_draweridx(), TileCalibUtils.bad_definition_chan(), 0)
@@ -156,8 +206,105 @@ if len(isBadTimingDef.keys()):
         prbDesc = isBadTimingDef[prbCode]
         msg = "- %2i (%s)" % (prbCode,prbDesc)
         log.info( msg )
+
+
+#=== check ROS and module numbers
+if one_mod:
+    partname = modulename[:3]
+    mod = int(modulename[3:]) -1
+
+part_dict = {'AUX':0,'LBA':1,'LBC':2,'EBA':3,'EBC':4}
+if partname in part_dict:
+    ros = part_dict[partname]
+    rosmin = ros
+    rosmax = ros+1
+else:
+    ros = -1
+
+if mod >= 0:
+    modmin = mod
+    modmax = mod+1
+elif mod < -1:
+    modmax = modmin
+
+if chan_n >= 0 and chan_n < TileCalibUtils.max_chan():
+    chanmin = chan_n
+    chanmax = chan_n+1
+else:
+    if chanmin<0: chanmin = 0
+    if chanmax<0: chanmax = TileCalibUtils.max_chan()
+    else: chanmax += 1
+
+if gain_n >= 0 and gain_n < TileCalibUtils.max_gain():
+    gainmin = gain_n
+    gainmax = gain_n+1
+else:
+    gainmin = 0
+    gainmax = TileCalibUtils.max_gain()
+
+
+#=== Filling the iovList
+iovList = []
+if iov:
+    if mod>=0:
+        COOL_part = ros
+        COOL_chan = mod
+    else:
+        COOL_part = -1
+        COOL_chan = 1000
+
+    try:
+      dbobjs = blobReader.getDBobjsWithinRange(COOL_part,COOL_chan)
+      if (dbobjs == None): raise Exception("No DB objects retrieved when building IOV list!")
+      while dbobjs.goToNext():
+	obj = dbobjs.currentRef()
+	objsince = obj.since()
+	sinceRun = objsince >> 32
+	sinceLum = objsince & 0xFFFFFFFF
+	since    = (sinceRun, sinceLum)
+	objuntil = obj.until()
+	untilRun = objuntil >> 32
+	untilLum = objuntil & 0xFFFFFFFF
+	until    = (untilRun, untilLum)
+	iovList.append((since, until))
+    except:
+      log.warning( "Warning: can not read IOVs from input DB file" )
+      sys.exit(2)
+
+    be=iovList[0][0][0]
+    en=iovList[-1][0][0]
+
+    if begin != be or end != en:
+        ib=0
+        ie=len(iovList)
+        for i,iovs in enumerate(iovList):
+            run = iovs[0][0]
+            lumi = iovs[0][1]
+            if (run<begin and run>be) or run==begin :
+                be=run
+                ib=i
+            if run>=end and run<en:
+                en=run
+                ie=i+1
+        log.info( "" )
+        if be != begin:
+            log.info( "Changing begin run from %d to %d (start of IOV)" % (begin,be) )
+            begin=be
+        if en != end:
+            if en>end: log.info( "Changing end run from %d to %d (start of next IOV)" % (end,en) )
+            else: log.info( "Changing end run from %d to %d (start of last IOV)" % (end,en) )
+            end=en
+        iovList=iovList[ib:ie]
+        if COOL_chan == 1000:
+            log.info( "%d IOVs in total for comment field" % len(iovList) )
+        else:
+            log.info( "%d IOVs in total for %s" % (len(iovList),modulename) )
+else:
+    iovList.append(((run,lumi),(MAXRUN, MAXLBK)))
+
 log.info( "\n" )
 
+
 ##channel2pmt
 ##negative means not connected !
 ##
@@ -182,73 +329,82 @@ gname = [ "LG", "HG" ]
 #=== isAffected = has a problem not included in isBad definition
 #=== isGood = has no problem at all
 
-modOk = False
-miss  = 0
-good  = 0
-aff   = 0
-bad   = 0
-for ros in xrange(rosmin,5):
-    for mod in xrange(0, min(64,TileCalibUtils.getMaxDrawer(ros))):
-        if hexid:
-            modName = "0x%x" % ((ros<<8)+mod)
-        else:
-            modName = TileCalibUtils.getDrawerString(ros,mod)
-        if warn<0:
-            bch = reader.getDrawer(ros, mod, (run,lumi), False, False)
-            if bch is None:
-                modOk = False
-                miss+=1
-                #print "%s is missing in DB" % modName
-            else:
-                modOk = True
-                if blob and bch:
-                    print "%s  Blob type: %d  Version: %d  Nchannels: %d  Ngains: %d  Nval: %d" % (modName, bch.getObjType(), bch.getObjVersion(), bch.getNChans(), bch.getNGains(), bch.getObjSizeUint32())
-        nBad=0
-        for chn in xrange(TileCalibUtils.max_chan()):
-            chnName = " %2i" % chn
-            for adc in xrange(TileCalibUtils.max_gain()):
-
-                stat = mgr.getAdcStatus(ros,mod,chn,adc)
-                #log.info( "- ADC status = isBad:      %d" % stat.isBad()      )
-                #log.info( "- ADC status = isGood:     %d" % stat.isGood()     )
-                #log.info( "- ADC status = isAffected: %d" % stat.isAffected() )
-
-                #=== get all problems of the channel
-                prbs = mgr.getAdcProblems(ros,mod,chn,adc)
-                #log.info( "ADC Problems: " )
-                if len(prbs):
-                    modOk = False
-                    if pmt:
-                        msg = "%s pm %02i ch %02i %s " % ( modName, abs(ch2pmt[ros][chn]), chn, gname[adc] )
-                    else:
-                        msg = "%s %2i %1i " % ( modName,chn,adc )
-                    for prbCode in sorted(prbs.keys()):
-                        prbDesc = prbs[prbCode]
-                        msg += " %5i (%s)" % (prbCode,prbDesc)
-                    if stat.isBad():
-                        msg += "  => BAD"
-                        nBad+=1
-                    elif stat.isAffected():
-                        msg += "  => Affected"
-                    elif stat.isGood():
-                        msg += "  => good"
-                    print msg
-        if modOk:
-            good+=1
-            print "%s ALL GOOD" % (modName)
-        elif nBad==0:
-            aff+=1
-        elif nBad==TileCalibUtils.max_gain()*TileCalibUtils.max_chan() or (nBad==90 and 'LB' in modName) or (nBad==64 and 'EB'in modName) or (nBad==60 and 'EBA15' in modName) or (nBad==60 and 'EBC18' in modName):
-            bad+=1
-if warn<0: 
-    if miss: print "%3i drawers are missing in DB" % miss
-    print "%3i drawers are absolutely good" % good
-    print "%3i drawers have good and affected channels" % (aff-miss)
-    print "%3i drawers have some bad channels" % ((256 if rosmin else 276)-good-bad-aff)
-    print "%3i drawers are completely bad" % bad
-#=== print all bad channels
-#log.info("listing bad channels")
-#mgr.listBadAdcs()
+pref = ""
+for iovs in iovList:
+    if iov:
+        pref = "(%i,%i)  " % (iovs[0][0],iovs[0][1])
+    if comment:
+        log.info( blobReader.getComment(iovs[0]) )
+    modOk = False
+    miss  = 0
+    good  = 0
+    aff   = 0
+    bad   = 0
+    nMod  = 0
+    for ros in xrange(rosmin,rosmax):
+	for mod in xrange(modmin, min(modmax,TileCalibUtils.getMaxDrawer(ros))):
+            nMod += 1
+	    mgr.updateFromDb(db, folderPath, folderTag, iovs[0], 1, warn, ros, mod)
+	    if hexid:
+		modName = "0x%x" % ((ros<<8)+mod)
+	    else:
+		modName = TileCalibUtils.getDrawerString(ros,mod)
+	    if warn<0:
+		bch = blobReader.getDrawer(ros, mod, iovs[0], False, False)
+		if bch is None:
+		    modOk = False
+		    miss+=1
+		    #print "%s is missing in DB" % modName
+		else:
+		    modOk = True
+		    if blob and bch:
+			print "%s  Blob type: %d  Version: %d  Nchannels: %d  Ngains: %d  Nval: %d" % (modName, bch.getObjType(), bch.getObjVersion(), bch.getNChans(), bch.getNGains(), bch.getObjSizeUint32())
+	    nBad=0
+	    for chn in xrange(chanmin,chanmax):
+		chnName = " %2i" % chn
+		for adc in xrange(gainmin,gainmax):
+
+		    stat = mgr.getAdcStatus(ros,mod,chn,adc)
+		    #log.info( "- ADC status = isBad:      %d" % stat.isBad()      )
+		    #log.info( "- ADC status = isGood:     %d" % stat.isGood()     )
+		    #log.info( "- ADC status = isAffected: %d" % stat.isAffected() )
+
+		    #=== get all problems of the channel
+		    prbs = mgr.getAdcProblems(ros,mod,chn,adc)
+		    #log.info( "ADC Problems: " )
+		    if len(prbs) or iov:
+			modOk = False
+                        if pmt:
+                            msg = "%s pm %02i ch %02i %s " % ( modName, abs(ch2pmt[ros][chn]), chn, gname[adc] )
+                        else:
+                            msg = "%s %2i %1i " % ( modName,chn,adc )
+			for prbCode in sorted(prbs.keys()):
+			    prbDesc = prbs[prbCode]
+			    msg += " %5i (%s)" % (prbCode,prbDesc)
+			if stat.isBad():
+			    msg += "  => BAD"
+			    nBad+=1
+			elif stat.isAffected():
+			    msg += "  => Affected"
+                        elif stat.isGood():
+                            msg += "  => good"
+			print pref+msg
+	    if modOk:
+		good+=1
+		print "%s ALL GOOD" % (modName)
+	    elif nBad==0:
+		aff+=1
+	    elif nBad==TileCalibUtils.max_gain()*TileCalibUtils.max_chan() or (nBad==90 and 'LB' in modName) or (nBad==64 and 'EB'in modName) or (nBad==60 and 'EBA15' in modName) or (nBad==60 and 'EBC18' in modName):
+		bad+=1
+    if warn<0:
+	if miss: print "%3i drawers are missing in DB" % miss
+	print "%3i drawers are absolutely good" % good
+	print "%3i drawers have good and affected channels" % (aff-miss)
+	print "%3i drawers have some bad channels" % (nMod-good-bad-aff)
+	print "%3i drawers are completely bad" % bad
+    #=== print all bad channels
+    #log.info("listing bad channels")
+    #mgr.listBadAdcs()
 
 #=== close DB
 db.closeDatabase()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py
index 7b1b355af89d823b16776541b9153a2a6c6e8bf9..11b2d15c56ca81c5fc1997cdb137ac0f84d83343 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCalibFromCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ReadCalibFromCool.py
 # Andrei Artamonov 2009-11-03
 
@@ -14,8 +17,15 @@ def usage():
     print "-t, --tag=      specify tag to use, f.i. UPD1 or UPD4 or full suffix like RUN2-HLT-UPD1-00"
     print "-r, --run=      specify run  number, by default uses latest iov"
     print "-l, --lumi=     specify lumi block number, default is 0"
+    print "-b, --begin=    specify run number of first iov in multi-iov mode, by default uses very first iov"
+    print "-e, --end=      specify run number of last iov in multi-iov mode, by default uses latest iov"
+    print "-m, --module=   specify module to use, default is not set"
+    print "-N, --chmin=    specify minimal channel to use, default is 0"
+    print "-X, --chmax=    specify maximal channel to use, default is 47"
+    print "-c, --chan=     specify channel to use , default is all channels from chmin to chmax"
+    print "-g, --gain=, -a, --adc=  specify adc(gain) to print or number of adcs to print with - sign, default is -2"
     print "-n, --nval=     specify number of values to output, default is all"
-    print "-g, -a, --adc=  specify adc(gain) to print or number of adcs to print with - sign, default is -2"
+    print "-C, --comment   print comment for every IOV"
     print "-d, --default   print also default values stored in AUX01-AUX20 "
     print "-b, --blob      print additional blob info"
     print "-H, --hex       print frag id instead of module name"
@@ -25,17 +35,17 @@ def usage():
     print "-s, --schema=   specify schema to use, like 'COOLONL_TILE/CONDBR2' or 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2' or tileSqlite.db"
     print "-D, --dbname=   specify dbname part of schema if schema only contains file name, default is CONDBR2'"
 
-letters = "hr:l:s:t:f:D:n:a:g:p:dbHPk:"
-keywords = ["help","run=","lumi=","schema=","tag=","folder=","dbname=","nval=","adc=","gain=","prefix=","default","blob","hex","pmt","keep="]
+letters = "hr:l:s:t:f:D:n:b:e:m:N:X:c:a:g:p:dBCHPk:"
+keywords = ["help","run=","lumi=","schema=","tag=","folder=","dbname=","module=","begin=","end=","chmin=","chmax=","gain=","adc=","chan=","nval=","prefix=","default","blob","hex","pmt","keep=","comment"]
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
 
-# defaults 
+# defaults
 run = 2147483647
 lumi = 0
 schema = 'COOLOFL_TILE/CONDBR2'
@@ -43,12 +53,29 @@ dbname = ''
 folderPath =  "/TILE/OFL02/CALIB/CIS/LIN"
 tag = "UPD4"
 nval = 0
-nadc = -99
+nadc = -1
 rosmin = 1
+rosmax = 5
 blob = False
 hexid = False
 pmt = False
 prefix = None
+modmin = 0
+modmax = 99999
+modulename="AUX-1"
+partname=""
+one_mod = False
+mod = -1
+ros = -1
+chan_n= -1
+chanmin = -1
+chanmax = -1
+gainmin = -1
+gainmax = -1
+begin = 0
+end = 2147483647
+iov = False
+comment = False
 keep=[]
 
 for o, a in opts:
@@ -62,8 +89,27 @@ for o, a in opts:
         dbname = a
     elif o in ("-n","--nval"):
         nval = int(a)
+    elif o in ("-b","--begin"):
+        begin = int(a)
+        iov = True
+        one_mod = True
+    elif o in ("-e","--end"):
+        end = int(a)
+        iov = True
+        one_mod = True
     elif o in ("-a","--adc","-g","--gain"):
         nadc = int(a)
+    elif o in ("-m","--module"):
+        modulename = a
+        one_mod = True
+    elif o in ("-c","--chan"):
+        chan_n = int(a)
+    elif o in ("-N","--chmin"):
+        chanmin = int(a)
+    elif o in ("-X","--chmax"):
+        chanmax = int(a)
+    elif o in ("-C","--comment"):
+        comment = True
     elif o in ("-r","--run"):
         run = int(a)
     elif o in ("-l","--lumi"):
@@ -88,10 +134,11 @@ for o, a in opts:
 
 
 from TileCalibBlobPython import TileCalibTools
+from TileCalibBlobPython.TileCalibTools import MINRUN, MINLBK, MAXRUN, MAXLBK
 from TileCalibBlobObjs.Classes import *
 
 from TileCalibBlobPython.TileCalibLogger import TileCalibLogger, getLogger
-log = getLogger("ReadCalibFromCool")
+log = getLogger("ReadCalibFrCool")
 import logging
 logLevel=logging.DEBUG
 log.setLevel(logLevel)
@@ -108,17 +155,17 @@ if not 'COOLO' in schema and not ':' in schema and not ';' in schema:
 
 if schema=='COOLONL_TILE/COMP200':
     if not (folderPath.startswith('/TILE/ONL01/') or folderPath.startswith('/TILE/OFL01/')):
-        print "Folder %s doesn't exist in schema %s " % (folderPath,schema) 
+        print "Folder %s doesn't exist in schema %s " % (folderPath,schema)
         sys.exit(2)
-        
+
 if schema=='COOLONL_TILE/CONDBR2':
     if not folderPath.startswith('/TILE/ONL01/'):
-        print "Folder %s doesn't exist in schema %s, only /TILE/ONL01 " % (folderPath,schema) 
+        print "Folder %s doesn't exist in schema %s, only /TILE/ONL01 " % (folderPath,schema)
         sys.exit(2)
-        
+
 if schema=='COOLOFL_TILE/COMP200' or schema=='COOLOFL_TILE/CONDBR2':
     if not folderPath.startswith('/TILE/OFL02/'):
-        print "Folder %s doesn't exist in schema %s " % (folderPath,schema) 
+        print "Folder %s doesn't exist in schema %s " % (folderPath,schema)
         sys.exit(2)
 
 
@@ -137,6 +184,7 @@ flt=None
 r=5
 d=0
 nchan=TileCalibUtils.max_chan()
+ngain=TileCalibUtils.max_gain()
 while not flt:
     d-=1
     if d<0:
@@ -153,19 +201,110 @@ if flt:
     log.info( "Blob type: %d  Version: %d  Nchannels: %d  Ngains: %d  Nval: %d" % (blobT,blobV,mchan,mgain,mval) )
     if nadc<-mgain: nadc=-mgain
     if nchan<mchan: nchan=mchan
+    if ngain<mgain: ngain=mgain
 else:
     mgain=1
-    if nadc==-99: nadc=-TileCalibUtils.max_gain()
+if nadc==-1: nadc=-ngain
 
 log.info("Comment: %s" % blobReader.getComment((run,lumi)))
-log.info( "\n" )
 
-if nadc<0:
-    a1=0
-    a2=-nadc
+#=== check ROS and module numbers
+if one_mod:
+    partname = modulename[:3]
+    mod = int(modulename[3:]) -1
+
+part_dict = {'AUX':0,'LBA':1,'LBC':2,'EBA':3,'EBC':4}
+if partname in part_dict:
+    ros = part_dict[partname]
+    rosmin = ros
+    rosmax = ros+1
+else:
+    ros = -1
+
+if mod >= 0:
+    modmin = mod
+    modmax = mod+1
+elif mod < -1:
+    modmax = modmin
+
+if chan_n >= 0 and chan_n < nchan:
+    chanmin = chan_n
+    chanmax = chan_n+1
+else:
+    if chanmin<0: chanmin = 0
+    if chanmax<0: chanmax = nchan
+    else: chanmax += 1
+
+if nadc >= 0 and nadc < ngain:
+    gainmin = nadc
+    gainmax = nadc+1
+else:
+    gainmin = 0
+    if nadc<0: gainmax = -nadc
+    else: gainmax = ngain
+
+
+#=== Filling the iovList
+iovList = []
+if iov:
+    if mod>=0:
+        COOL_part = ros
+        COOL_chan = mod
+    else:
+        COOL_part = -1
+        COOL_chan = 1000
+
+    try:
+      dbobjs = blobReader.getDBobjsWithinRange(COOL_part,COOL_chan)
+      if (dbobjs == None): raise Exception("No DB objects retrieved when building IOV list!")
+      while dbobjs.goToNext():
+	obj = dbobjs.currentRef()
+	objsince = obj.since()
+	sinceRun = objsince >> 32
+	sinceLum = objsince & 0xFFFFFFFF
+	since    = (sinceRun, sinceLum)
+	objuntil = obj.until()
+	untilRun = objuntil >> 32
+	untilLum = objuntil & 0xFFFFFFFF
+	until    = (untilRun, untilLum)
+	iovList.append((since, until))
+    except:
+      log.warning( "Warning: can not read IOVs from input DB file" )
+      sys.exit(2)
+
+    be=iovList[0][0][0]
+    en=iovList[-1][0][0]
+
+    if begin != be or end != en:
+        ib=0
+        ie=len(iovList)
+        for i,iovs in enumerate(iovList):
+            run = iovs[0][0]
+            lumi = iovs[0][1]
+            if (run<begin and run>be) or run==begin :
+                be=run
+                ib=i
+            if run>=end and run<en:
+                en=run
+                ie=i+1
+        log.info( "" )
+        if be != begin:
+            log.info( "Changing begin run from %d to %d (start of IOV)" % (begin,be) )
+            begin=be
+        if en != end:
+            if en>end: log.info( "Changing end run from %d to %d (start of next IOV)" % (end,en) )
+            else: log.info( "Changing end run from %d to %d (start of last IOV)" % (end,en) )
+            end=en
+        iovList=iovList[ib:ie]
+        if COOL_chan == 1000:
+            log.info( "%d IOVs in total for comment field" % len(iovList) )
+        else:
+            log.info( "%d IOVs in total for %s" % (len(iovList),modulename) )
 else:
-    a1=nadc
-    a2=nadc+1
+    iovList.append(((run,lumi),(MAXRUN, MAXLBK)))
+
+log.info( "\n" )
+
 
 ##channel2pmt
 ##negative means not connected !
@@ -182,79 +321,90 @@ extbar = [ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12,
 
 ch2pmt = [ dummy, barrel, barrel, extbar, extbar ]
 gname=[]
-if mgain!=2: 
+if mgain!=2:
     for i in xrange(mgain+1): gname+=[ "g "+str(i) ]
 else: gname = [ "LG", "HG" ]
+
 #=== loop over all partitions,modules,channels
-miss=0
-good=0
-for ros in xrange(rosmin,5):
-    for mod in xrange(0, min(64,TileCalibUtils.getMaxDrawer(ros))):
-        if hexid:
-            modName = "0x%x" % ((ros<<8)+mod)
-        else:
-            modName = TileCalibUtils.getDrawerString(ros,mod)
-        if prefix:
-            modName = prefix + " " + modName
-        if modName in ['EBA39','EBA40','EBA41','EBA42','EBA55','EBA56','EBA57','EBA58',
-                       'EBC39','EBC40','EBC41','EBC42','EBC55','EBC56','EBC57','EBC58' ]:
-            modSpec = 'EBspC10'
-        elif modName in ['EBA15','EBC18']:
-            modSpec = 'EBspD4'
-        elif modName in ['EBC29','EBC32','EBC34','EBC37']:
-            modSpec = 'EBspE4'
-        elif modName in ['EBA07', 'EBA25', 'EBA44', 'EBA53',
-                         'EBC07', 'EBC25', 'EBC44', 'EBC53',
-                         'EBC28', 'EBC31', 'EBC35', 'EBC38' ]:
-            modSpec = 'EBspE1'
-        elif modName in ['EBA08', 'EBA24', 'EBA43', 'EBA54',
-                         'EBC08', 'EBC24', 'EBC43', 'EBC54' ]:
-            modSpec = 'EBMBTS'
-        else:
-            modSpec = modName
-        try:
-            flt = blobReader.getDrawer(ros, mod,(run,lumi), False, False)
-            if flt is None or isinstance(flt, (int)):
-                miss+=1
-                print "%s is missing in DB" % modName
+pref = ""
+for iovs in iovList:
+    if iov:
+        pref = "(%i,%i)  " % (iovs[0][0],iovs[0][1])
+    if prefix:
+        pref = prefix + " " + pref
+    if comment:
+        log.info( blobReader.getComment(iovs[0]) )
+    miss=0
+    good=0
+    for ros in xrange(rosmin,rosmax):
+	for mod in xrange(modmin, min(modmax,TileCalibUtils.getMaxDrawer(ros))):
+	    if hexid:
+		modName = "0x%x" % ((ros<<8)+mod)
+	    else:
+		modName = TileCalibUtils.getDrawerString(ros,mod)
+            if modName in ['EBA39','EBA40','EBA41','EBA42','EBA55','EBA56','EBA57','EBA58',
+                           'EBC39','EBC40','EBC41','EBC42','EBC55','EBC56','EBC57','EBC58' ]:
+                modSpec = 'EBspC10'
+            elif modName in ['EBA15','EBC18']:
+                modSpec = 'EBspD4'
+            elif modName in ['EBC29','EBC32','EBC34','EBC37']:
+                modSpec = 'EBspE4'
+            elif modName in ['EBA07', 'EBA25', 'EBA44', 'EBA53',
+                             'EBC07', 'EBC25', 'EBC44', 'EBC53',
+                             'EBC28', 'EBC31', 'EBC35', 'EBC38' ]:
+                modSpec = 'EBspE1'
+            elif modName in ['EBA08', 'EBA24', 'EBA43', 'EBA54',
+                             'EBC08', 'EBC24', 'EBC43', 'EBC54' ]:
+                modSpec = 'EBMBTS'
             else:
-                good+=1
-                if blob:
-                    print "%s  Blob type: %d  Version: %d  Nchannels: %d  Ngains: %d  Nval: %d" % (modName, flt.getObjType(), flt.getObjVersion(), flt.getNChans(), flt.getNGains(), flt.getObjSizeUint32())
-                mval0 = 0
-                mval = flt.getObjSizeUint32()
-                if nval<0 and -nval<=mval:
-                    mval=-nval
-                    mval0=mval-1
-                elif nval!=0 and nval<mval:
-                    mval = nval
-                a3=flt.getNGains()
-                a4=(a3 if a3<a2 else a2)
-                for chn in xrange(flt.getNChans()):
-                    for adc in xrange(a1,a4):
-                        if pmt:
-                            msg = "%s pm %02i ch %02i %s  " % ( modName, abs(ch2pmt[ros][chn]), chn, gname[adc] )
-                        else:
-                            msg = "%s %2i %1i  " % ( modName, chn, adc )
-                        for val in xrange(mval0,mval):
-                            if str(val) in keep or modName in keep or  modSpec in keep or modName[:3] in keep or  modName[:2] in keep \
-                               or ("%sch%i"% (modName,chn)) in keep or ("%sch%i"% (modSpec,chn)) in keep or ("%sch%i"% (modName[:3],chn)) in keep or ("%sch%i"% (modName[:2],chn)) in keep \
-                               or ("%sch%ig%i"% (modName,chn,adc)) in keep or ("%sch%ig%i"% (modSpec,chn,adc)) in keep or ("%sch%ig%i"% (modName[:3],chn,adc)) in keep or ("%sch%ig%i"% (modName[:2],chn,adc)) in keep:
-                                msg += "   keep   "
+                modSpec = modName
+            try:
+                flt = blobReader.getDrawer(ros, mod,iovs[0], False, False)
+                if flt is None or isinstance(flt, (int)):
+                    miss+=1
+                    print "%s is missing in DB" % modName
+                else:
+                    good+=1
+                    if blob:
+                        print "%s  Blob type: %d  Version: %d  Nchannels: %d  Ngains: %d  Nval: %d" % (modName, flt.getObjType(), flt.getObjVersion(), flt.getNChans(), flt.getNGains(), flt.getObjSizeUint32())
+                    mval0 = 0
+                    mval = flt.getObjSizeUint32()
+                    if nval<0 and -nval<=mval:
+                        mval=-nval
+                        mval0=mval-1
+                    elif nval!=0 and nval<mval:
+                        mval = nval
+                    mchan=flt.getNChans()
+                    mgain=flt.getNGains()
+                    chmin = chanmin if chanmin<mchan else mchan
+                    chmax = chanmax if chanmax<mchan else mchan
+                    gnmin = gainmin if gainmin<mgain else mgain
+                    gnmax = gainmax if gainmax<mgain else mgain
+                    for chn in xrange(chmin,chmax):
+                        for adc in xrange(gnmin,gnmax):
+                            if pmt:
+                                msg = "%s pm %02i ch %02i %s  " % ( modName, abs(ch2pmt[ros][chn]), chn, gname[adc] )
                             else:
-                                msg += "  %f" % flt.getData(chn, adc, val)
-                        print msg
-        except Exception, e:
-            print e
-if miss: 
-    if run!=2147483647:
-        print "%3i drawers are preseint in DB for run %d lb %d" % (good,run,lumi)
-        print "%3i drawers are missing  in DB for run %d lb %d" % (miss,run,lumi)
-    else:
-        print "%3i drawers are preseint in DB" % (good)
-        print "%3i drawers are missing  in DB" % (miss)
-    if good==0:
-        print "Please, check that you are using correct schema and correct tag"
+                                msg = "%s %2i %1i  " % ( modName, chn, adc )
+                            for val in xrange(mval0,mval):
+                                if str(val) in keep or modName in keep or  modSpec in keep or modName[:3] in keep or  modName[:2] in keep \
+                                    or ("%sch%i"% (modName,chn)) in keep or ("%sch%i"% (modSpec,chn)) in keep or ("%sch%i"% (modName[:3],chn)) in keep or ("%sch%i"% (modName[:2],chn)) in keep \
+                                    or ("%sch%ig%i"% (modName,chn,adc)) in keep or ("%sch%ig%i"% (modSpec,chn,adc)) in keep or ("%sch%ig%i"% (modName[:3],chn,adc)) in keep or ("%sch%ig%i"% (modName[:2],chn,adc)) in keep:
+                                    msg += "   keep   "
+                                else:
+                                    msg += "  %f" % flt.getData(chn, adc, val)
+                            print pref+msg
+            except Exception, e:
+                print e
+    if miss:
+        if iovs[0][0]!=2147483647:
+            print "%3i drawers are preseint in DB for run %d lb %d" % (good,iovs[0][0],iovs[0][1])
+            print "%3i drawers are missing  in DB for run %d lb %d" % (miss,iovs[0][0],iovs[0][1])
+        else:
+            print "%3i drawers are preseint in DB" % (good)
+            print "%3i drawers are missing  in DB" % (miss)
+        if good==0:
+            print "Please, check that you are using correct schema and correct tag"
 
 #=== close DB
 db.closeDatabase()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py
index ed64989b8953c42c768956760c2992c86ce105ee..fc7b8efdf09afeddfcf94c197d6d6f1715746f16 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCool.py
@@ -1,4 +1,7 @@
-#!/usr/bin/env python
+#!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ReadFloatFromCaloCool.py
 # Carlos.Solans <Carlos.Solans@cern.ch>
 # Each Tile cell has 5 values stored in COOL.
@@ -88,7 +91,11 @@ import cppyy
 from CaloCondBlobAlgs import CaloCondTools, CaloCondLogger
 from TileCalibBlobPython import TileCalibTools
 from TileCalibBlobPython import TileCellTools
-hashMgr=TileCellTools.TileCellHashMgr()
+hashMgr=None
+hashMgrDef=TileCellTools.TileCellHashMgr()
+hashMgrA=TileCellTools.TileCellHashMgr("UpgradeA")
+hashMgrBC=TileCellTools.TileCellHashMgr("UpgradeBC")
+hashMgrABC=TileCellTools.TileCellHashMgr("UpgradeABC")
 
 #=== get a logger
 log = CaloCondLogger.getLogger("ReadCellNoise")
@@ -169,6 +176,16 @@ ncell=blobFlt.getNChans()
 ngain=blobFlt.getNGains()
 nval=blobFlt.getObjSizeUint32()
 
+if ncell>hashMgrA.getHashMax():
+    hashMgr=hashMgrABC
+elif ncell>hashMgrBC.getHashMax():
+    hashMgr=hashMgrA
+elif ncell>hashMgrDef.getHashMax():
+    hashMgr=hashMgrBC
+else:
+    hashMgr=hashMgrDef
+log.info("Using %s CellMgr with hashMax %d" % (hashMgr.getGeometry(),hashMgr.getHashMax()))
+
 if cell<0 or cell>=ncell:
     cellmin=0
     cellmax=ncell
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py
index 938ea7f26b688a6cf2890baa62adc7208e552785..778a67ebb38dfff4bc7e1697e8a25ec58703414a 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCellNoiseFromCoolCompare.py
@@ -1,4 +1,7 @@
-#!/usr/bin/env python
+#!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ReadCellNoiseFromCoolCompare.py
 # based on ReadCellNoiseFromCool.py and ReadFromCoolCompare.py
 # Yuri Smirnov 2015-03-19
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCsFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCsFromCool.py
deleted file mode 100755
index d6bb1bd9af45e7136a723e501cb0c9714828ffb8..0000000000000000000000000000000000000000
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadCsFromCool.py
+++ /dev/null
@@ -1,225 +0,0 @@
-#!/bin/env python
-# ReadCsFromCool.py -h
-# Sanya Solodkov 2011-07-15
-
-import getopt,sys,os,string
-os.environ['TERM'] = 'linux'
-
-def usage():
-    print "Usage: ",sys.argv[0]," [OPTION] ... "
-    print "Dumps the TileCal cesium from various schemas / folders / tags"
-    print ""
-    print "-h, --help      shows this help"
-    print "-f, --folder=   specify status folder to use ONL01 or OFL02 or full path /TILE/OFL02/CALIB/CES"
-    print "-t, --tag=      specify tag to use, f.i. UPD1 or UPD4 or full suffix like RUN2-HLT-UPD1-01"
-    print "-r, --run=      specify run  number, by default uses latest iov"
-    print "-l, --lumi=     specify lumi block number, default is 0"
-    print "-n, --nval=     specify number of values to output, default is all"
-    print "-g, -a, --adc=  specify adc(gain) to print default is 0"
-    print "-d, --default   print also default values stored in AUX01-AUX20 "
-    print "-b, --blob      print additional blob info"
-    print "-H, --hex       print frag id instead of module name"
-    print "-P, --pmt       print pmt number in addition to channel number"
-    print "-p, --prefix=   print some prefix on every line "
-    print "-s, --schema=   specify schema to use, like 'COOLONL_TILE/CONDBR2' or 'sqlite://;schema=tileSqlite.db;dbname=CONDBR2' or tileSqlite.db"
-    print "-D, --dbname=   specify dbname part of schema if schema only contains file name, default is CONDBR2'"
-
-letters = "hr:l:s:t:f:D:n:a:g:p:dbHP"
-keywords = ["help","run=","lumi=","schema=","tag=","folder=","dbname=","nval=","adc=","gain=","prefix=","default","blob","hex","pmt"]
-
-try:
-    opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-except getopt.GetOptError, err:
-    print str(err)
-    usage()
-    sys.exit(2)
-
-# defaults 
-run = 2147483647
-lumi = 0
-schema = 'COOLOFL_TILE/CONDBR2'
-dbname = ''
-folderPath =  "/TILE/OFL02/CALIB/CES"
-tag = "UPD4"
-nval = 0
-nadc = 0
-rosmin = 1
-blob = False
-hexid = False
-pmt = True
-prefix = None
-
-for o, a in opts:
-    if o in ("-f","--folder"):
-        if a=='ONL01' or a=='OFL01' or a=='OFL02':
-            folderPath = "/TILE/%s/CALIB/CES" % a
-        else:
-            folderPath = a
-    elif o in ("-t","--tag"):
-        tag = a
-    elif o in ("-s","--schema"):
-        schema = a
-    elif o in ("-D","--dbname"):
-        dbname = a
-    elif o in ("-n","--nval"):
-        nval = int(a)
-    elif o in ("-a","--adc","-g","--gain"):
-        nadc = int(a)
-    elif o in ("-r","--run"):
-        run = int(a)
-    elif o in ("-l","--lumi"):
-        lumi = int(a)
-    elif o in ("-d","--default"):
-        rosmin = 0
-    elif o in ("-b","--blob"):
-        blob = True
-    elif o in ("-H","--hex"):
-        hexid = True
-    elif o in ("-P","--pmt"):
-        pmt = True
-    elif o in ("-p","--prefix"):
-        prefix = a
-    elif o in ("-h","--help"):
-        usage()
-        sys.exit(2)
-    else:
-        assert False, "unhandeled option"
-
-
-from TileCalibBlobPython import TileCalibTools
-from TileCalibBlobObjs.Classes import *
-
-from TileCalibBlobPython.TileCalibLogger import TileCalibLogger, getLogger
-log = getLogger("ReadCsFromCool")
-import logging
-logLevel=logging.DEBUG
-log.setLevel(logLevel)
-log1 = getLogger("TileCalibTools")
-log1.setLevel(logLevel)
-
-
-#=== check parameters
-if len(dbname)<7 and run!=2147483647:
-    dbname = 'COMP200' if run<232000 else 'CONDBR2'
-
-if not 'COOLO' in schema and not ':' in schema and not ';' in schema:
-    schema='sqlite://;schema='+schema+';dbname='+(dbname if len(dbname) else 'CONDBR2')
-
-if schema=='COOLONL_TILE/COMP200':
-    if not (folderPath.startswith('/TILE/ONL01/') or folderPath.startswith('/TILE/OFL01/')):
-        print "Folder %s doesn't exist in schema %s " % (folderPath,schema) 
-        sys.exit(2)
-        
-if schema=='COOLONL_TILE/CONDBR2':
-    if not folderPath.startswith('/TILE/ONL01/'):
-        print "Folder %s doesn't exist in schema %s, only /TILE/ONL01 " % (folderPath,schema) 
-        sys.exit(2)
-        
-if schema=='COOLOFL_TILE/COMP200' or schema=='COOLOFL_TILE/CONDBR2':
-    if not folderPath.startswith('/TILE/OFL02/'):
-        print "Folder %s doesn't exist in schema %s " % (folderPath,schema) 
-        sys.exit(2)
-
-
-#=== set database
-db = TileCalibTools.openDbConn(schema,'READONLY')
-folderTag = TileCalibTools.getFolderTag(schema if 'COMP200' in schema or 'OFLP200' in schema else db, folderPath, tag)
-log.info("Initializing folder %s with tag %s" % (folderPath, folderTag))
-
-#=== initialize blob reader
-blobReader = TileCalibTools.TileBlobReader(db,folderPath, folderTag)
-#blobReader.log().setLevel(logging.DEBUG)
-
-#=== get drawer with status at given run
-log.info("Initializing for run %d, lumiblock %d" % (run,lumi))
-flt=None
-r=5
-d=0
-nchan=TileCalibUtils.max_chan()
-while not flt:
-    d-=1
-    if d<0:
-        r-=1
-        if r<0: break
-        d=TileCalibUtils.getMaxDrawer(r)-1
-    flt = blobReader.getDrawer(r, d, (run,lumi), False, False)
-if flt:
-    blobT=flt.getObjType()
-    blobV=flt.getObjVersion()
-    mchan=flt.getNChans()
-    mgain=flt.getNGains()
-    mval=flt.getObjSizeUint32()
-    log.info( "Blob type: %d  Version: %d  Nchannels: %d  Ngains: %d  Nval: %d" % (blobT,blobV,mchan,mgain,mval) )
-    if nadc>=mgain or nadc<0: nadc=mgain-1
-else:
-    mgain=1
-    if nadc!=0: nadc=1
-gname=[]
-if mgain!=2: 
-    for i in xrange(mgain+1): gname+=[ "g "+str(i) ]
-else: gname = [ 'Low gain','High gain' ]
-log.info( "Using gain %d - %s"%(nadc,gname[nadc]) )
-
-log.info("Comment: %s" % blobReader.getComment((run,lumi)))
-log.info( "\n" )
-
-##channel2pmt
-##negative means not connected !
-##
-dummy = [0]*48
-barrel = [ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12,
-          13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
-          27, 26, 25, 30, 29, 28,-33,-32, 31, 36, 35, 34,
-          39, 38, 37, 42, 41, 40, 45,-44, 43, 48, 47, 46]
-extbar = [ 1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12,
-          13, 14, 15, 16, 17, 18,-19,-20, 21, 22, 23, 24,
-         -27,-26,-25,-31,-32,-28, 33, 29, 30,-36,-35, 34,
-          44, 38, 37, 43, 42, 41,-45,-39,-40,-48,-47,-46]
-
-ch2pmt = [ dummy, barrel, barrel, extbar, extbar ]
-
-#=== loop over all partitions,modules,channels
-cnt=0
-for ros in xrange(rosmin,5):
-    for mod in xrange(0, min(64,TileCalibUtils.getMaxDrawer(ros))):
-        if hexid:
-            modName = "0x%x" % ((ros<<8)+mod)
-        else:
-            modName = TileCalibUtils.getDrawerString(ros,mod)
-        if prefix:
-            modName = prefix + " " + modName
-        try:
-            flt = blobReader.getDrawer(ros, mod,(run,lumi), False, False)
-            if flt is None or isinstance(flt, (int)):
-                if rosmin==0:
-                    print "%s is missing in DB" % modName
-                    cnt+=1
-            elif nadc<flt.getNGains():
-                if blob:
-                    print "%s  Blob type: %d  Version: %d  Nchannels: %d  Ngains: %d  Nval: %d" % (modName, flt.getObjType(), flt.getObjVersion(), flt.getNChans(), flt.getNGains(), flt.getObjSizeUint32())
-                mval0 = 0
-                if nval<1:
-                    mval = flt.getObjSizeUint32()
-                    if nval<0 and -nval<mval:
-                        mval=-nval
-                        mval0=mval-1
-                else:
-                    mval = nval
-                for chn in xrange(flt.getNChans()):
-                    msg = "%s pm %02i ch %02i " % ( modName, abs(ch2pmt[ros][chn]), chn )
-                    for val in xrange(mval0,mval):
-                        msg += "  %f" % flt.getData(chn, nadc, val)
-                    print msg
-                    cnt+=1
-            else:
-                print "%s gain %d not found" % (modName,nadc)
-                cnt+=1
-        except Exception, e:
-            print e
-
-if cnt==0:
-    print "Nothing to dump"
-
-#=== close DB
-db.closeDatabase()
-
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py
index 34cbe407a967ef6e378b2cda141a4da282b8e0e6..2bb32c312f984fa5ec64ee8ccbb32ddb08545b6a 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFloatFromCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ReadFloatFromCool.py
 # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-11-18
 
@@ -26,7 +29,7 @@ keywords = ["help","run=","lumi=","schema=","tag=","folder=","ros=","drawer=","c
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py
index 46bdfedac39eefea4e093bcb7d48c95ce5b3907d..2830330b37ffe93991b5a0a9a489e8c77bbf526d 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadFromCoolCompare.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ReadFromCoolCompare.py
 # (Based on A. Solodkov's script ReadCsFromCool.py)
 # Andrei Artamonov 2010-09-22
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py
index 1944979e74de7e60eeda0e2fe79b4b8751edc23d..37a39d032ddd0173790cb6785c0b57642334cf7c 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadLUTFromCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ReadLUTFromCool.py
 # Lukas Pribyl <lukas.pribyl@cern.ch>, 2010-03-18
 
@@ -25,7 +28,7 @@ keywords = ["help","run=","lumi=","schema=","tag=","folder=","ros=","drawer=","c
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py
index a9f60d7b5fe699d48ccb7255183b727b19b18f00..dd88f887eaacbf24e465eef6f5835cca92c4825d 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadNoiseFromCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ReadNoiseFromCool.py
 # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-08-05
 
@@ -24,7 +27,7 @@ keywords = ["help","run=","lumi=","schema=","tag=","ros=","drawer=","channel=","
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py
index a9540b2e62a515545da2e48527be01f72e0034a8..244f0a39e63f529a9334f8485f9d5cdd12527e6f 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadOfcFromCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ReadOfcFromCool.py
 # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-07-25
 
@@ -25,7 +28,7 @@ keywords = ["help","run=","lumi=","schema=","tag=","folder=","ros=","drawer=","c
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py
index 85b5cd64ffe4e8304a45abd2548569b3181c2d37..663ac732d7ff881da057152b7b56e25ec75c0656 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/ReadTripsProbsFromCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # ./ReadTripsProbsFromCool.py  --schema='COOLOFL_TILE/OFLP200'  --folder='OFL02' --tag='UPD4'
 
 import getopt,sys,os,string
@@ -20,7 +23,7 @@ keywords = ["help","run=","lumi=","schema=","tag=","folder="]
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_Ofl_Onl.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_Ofl_Onl.py
index 56ed26b5356654d0f5075188161b977069ff9d91..adfa6a6762175885d8f9f3e5990a799f35f2b709 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_Ofl_Onl.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_Ofl_Onl.py
@@ -1,4 +1,7 @@
-#!/bib/env/python
+#!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_Ofl_Onl.py
 # Lukas Pribyl
 # This Python script needs sqlite file with default (empty) ONL01 and OFL02 folders
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py
index ca18dae0f9f32c5986a23eda634db99bf7179471..a51626d9770a3ee261e3f742c2ca3f4161cf0e33 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_badChannelExample.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_badChannelExample.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-12-19
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py
index 1fb6649acf43b1132ec40cf33c041a4df820001d..6d1a15df96bc7246289b7e2cbb2253f8d9be1b79 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeAutoCrFromASCII.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writePedFromASCII.py
 # Nils Gollub <nils.gollub@cern.ch>, 2008-03-03
 # modified: Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-06-27
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py
index 47fb8abeb1cdcb56440b9da4b8a7f727589c310d..e1dc3674de07aecc0e74c7ee7f7960629659b1eb 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchFromASCII.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_badChannelExample.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-12-19
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py
index 3b063d339345893e50e0381c8d03befe8ce27362..61d1bb7b11b038c6fa368a3cda8784c3df1754d7 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchM7.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writeBchM7.py
 # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-05-29
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py
index ed778aa457ed3f5d29aa32586ddb25c61265ce87..cbca26471315e89f722e88697d276185451d4d02 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeBchOnlM8.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writeBchOnlM8.py
 # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-07-14
 # Luca Fiorini <fiorini@ifae.es>
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py
index 611d7afb9d3a15bc132fe7eabe70a12147eec6fc..4226ee450a47f45b8e7caa67bab0af6a512e3868 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultCs.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writeDefaults.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-11-26
 # change Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py
index f37b80c7dd1c012c5cc977d8e77dd01846019238..9f8e0c8a467a30706f02b28f652a43223d0f79a3 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaultOnlNoise.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writeDefaults.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-11-26
 # Andrei Artamonov 2011-05-26
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py
index f9b05e4fc104060676e53ff48fe536ec24c302a7..8dd20ddfff721de476045b4a31ab0b34d17cfdaa 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeDefaults.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writeDefaults.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-11-26
 # change: Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py
index df39299dfb232db2a29b3686871d46580de3dda4..269dde37416ef1ad9acdfbe7f0e6a0c4bd45f701 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeIntegratorFromASCII.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writeIntegratorFromASCII.py
 # Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-12-05
 # change: Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py
index ce2c900c51a8f9d4f2154fe893bb6f0c4c683c59..8b26af2c366103db522eb016a656f5cac7248487 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeMuonReceiverPulseShape.py
@@ -1,5 +1,7 @@
 #!/bin/env python
 
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 from TileCalibBlobPython import TileCalibTools, TileCalibDefaultWriter
 
 #=== open the database
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py
index dd435e672d23588b8a70c40644d076056b038f92..48f18d11feda2a21228e2a6dfa2ad239acd3c5e5 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeOfc.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writeOfc.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-11-19
 # change: Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
@@ -55,7 +58,7 @@ folderMode = cool.FolderVersioning.SINGLE_VERSION
 folderSpec = cool.FolderSpecification(folderMode, spec)
 
 #=== loop over all input files
-for fileName in ofcFiles:
+for fileName in [ofcFiles[0]]:
     log.info( "Reading file: %s" % fileName )
 
     #=== determine COOL folder from input file name
@@ -83,9 +86,9 @@ for fileName in ofcFiles:
             #=== for all channels
             drawerOfc = g.TileCalibDrawerOfc.getInstance(blob,objVersion,7,-2001,1,2)
             #=== set phases as ints: phase[ns] * 10
-            phases = g.std.vector('int')()
+            phases = g.std.vector('float')()
             for phase in xrange(-1000,1001):
-                phases.push_back(int(phase))
+                phases.push_back(phase/10.)
             drawerOfc.setPhases(0,0,phases);
     
             #=== read file and fill OFCs
@@ -99,20 +102,21 @@ for fileName in ofcFiles:
                 #=== check for consistency
                 if phase>1000:
                     raise ("Phase out of range: %i" % phase)
+                phaseF=phase/10.
 
                 ofc = line.split()
                 #=== fill OFCs depending on OF version number
                 if objVersion==1:
                     if len(ofc)!=3: raise ("OF1, but len(ofc)=%i" % len(ofc))
-                    drawerOfc.setOfc(drawerOfc.FieldA,channel,adc,phase,sample,float(ofc[0]))
-                    drawerOfc.setOfc(drawerOfc.FieldB,channel,adc,phase,sample,float(ofc[1]))
-                    drawerOfc.setOfc(drawerOfc.FieldG,channel,adc,phase,sample,float(ofc[2]))
+                    drawerOfc.setOfc(drawerOfc.FieldA,channel,adc,phaseF,sample,float(ofc[0]))
+                    drawerOfc.setOfc(drawerOfc.FieldB,channel,adc,phaseF,sample,float(ofc[1]))
+                    drawerOfc.setOfc(drawerOfc.FieldG,channel,adc,phaseF,sample,float(ofc[2]))
                 elif objVersion==2:
                     if len(ofc)!=4: raise ("OF2, but len(ofc)=%i" % len(ofc))
-                    drawerOfc.setOfc(drawerOfc.FieldA,channel,adc,phase,sample,float(ofc[0]))
-                    drawerOfc.setOfc(drawerOfc.FieldB,channel,adc,phase,sample,float(ofc[1]))
-                    drawerOfc.setOfc(drawerOfc.FieldC,channel,adc,phase,sample,float(ofc[2]))
-                    drawerOfc.setOfc(drawerOfc.FieldG,channel,adc,phase,sample,float(ofc[3]))
+                    drawerOfc.setOfc(drawerOfc.FieldA,channel,adc,phaseF,sample,float(ofc[0]))
+                    drawerOfc.setOfc(drawerOfc.FieldB,channel,adc,phaseF,sample,float(ofc[1]))
+                    drawerOfc.setOfc(drawerOfc.FieldC,channel,adc,phaseF,sample,float(ofc[2]))
+                    drawerOfc.setOfc(drawerOfc.FieldG,channel,adc,phaseF,sample,float(ofc[3]))
                 else:
                     raise ("Impossible objVersion: %i" % objVersion)
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py
index cd3abc52d9574ecc172dcb4b9169c611f05a9ed7..3887f035205caf333ac9d014ea9a93de2ae5fe34 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writePedFromASCII.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writePedFromASCII.py
 # Nils Gollub <nils.gollub@cern.ch>, 2008-03-03
 # modified: Lukas Pribyl <lukas.pribyl@cern.ch>, 2008-06-27
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py
index d84ff6da1c85d0e28da491a508e48b831d9a7175..9b5dc304a92a89b4e07017116285de6681446e6e 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTileMuIdFromASCII.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writeTileMuIdFromASCII.py
 # Lukas Pribyl <lukas.pribyl@cern.ch>, 2009-04-29
 # change: Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py
index 5efff19d77f3a06df1d2d78ecd2d0bd4ff3f8218..433645fa6a3439dadb40544e71cd889a6f64a94d 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTimingFromASCII.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_writeTimingFromASCII.py
 # Nils Gollub <nils.gollub@cern.ch>, 2007-11-26
 # change: Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py
index 62b71cf2f9b2b31acc8ce96150f9de7c2b280705..f95ea8723b73cafce3b3020af9c6079e19cac913 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileCalibBlobPython_writeTripsProbsFromASCII.py
@@ -1,5 +1,7 @@
 #!/bin/env python
 
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 import getopt,sys,os,string
  
 def usage():
@@ -20,7 +22,7 @@ keywords = ["help", "tag=", "input=","folder="]
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:], letters, keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py
index d3c4ad31aa7787ccba712efa1333951fcb488370..2c402012f4231bce740e9dd71bcb9e31432d9799 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeBch.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileSynchronizeBch.py <TAG1> <TAG2> <MASKONLY> <RUN1> <RUN2>
 # sanya.solodkov@cern.ch July 2016
 # copy bad status from one tag to another (e.g. from UPD4 to UPD1)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py
index 2be53cb0761d57d843f8f01f39d75feeb23ad364..9d406889d43d6bb66d008e1878df56d3fafff137 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/TileSynchronizeOnlBchWithOfl.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileSynchronizeOnlBchWithOfl.py <TAG> <RUN>
 # lukas.pribyl@cern.ch March 2010
 # sanya.solodkov@cern.ch November 2014
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
index 7b847e3a90b438adf05d634423726f2b99a783d6..bfb3be5a21ae7b1a0899ae9f68efb5e58c07065a 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteBchToCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # WriteBchToCool.py
 # Alexander Solodkov <Sanya.Solodkov@cern.ch>, 2014-09-09
 # change Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
@@ -31,7 +34,7 @@ keywords = ["help","run=","lumi=","mode=","schema=","inschema=","outschema=","ta
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:], letters, keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py
index 73fa9d4b51e7d780b2abb2f8acc605c0e3facefc..581a6b701fcf027c6596034d1328a9169fbe32ce 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCalibToCool.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # WriteCalibToCool.py
 # Sanya Solodkov 2014-08-29
 # change Yuri Smirnov 2014-12-24
@@ -24,8 +27,8 @@ def usage():
     print "-a, --all       if present, means that all drawers are saved, otherwise only those which were updated"
     print "-z, --zero      if present, means that zero-sized blob is written for missing drawers"
     print "-Z, --allzero   if present, means that zero-sized blob is created for all drawers which are not present in input file"
-    print "-C, --nchannel= specify number of channels to store to DB, default is 48"
-    print "-G, --ngain=    specify number of gains to store to DB, default is 2"
+    print "-C, --nchannel= specify number of channels to store to DB, default is 0 - means the same as in input DB"
+    print "-G, --ngain=    specify number of gains to store to DB, default is 0 - means the same as in input DB"
     print "-n, --nval=     specify number of values to store to DB, default is 0 - means all"
     print "-v, --version=  specify blob version, by default version from input DB is used" 
     print "-x, --txtfile=  specify the text file with the new constants for reading"
@@ -42,7 +45,7 @@ keywords = ["help","run=","lumi=","run2=","lumi2=","schema=","inschema=","outsch
 
 try:
     opts, extraparams = getopt.getopt(sys.argv[1:],letters,keywords)
-except getopt.GetOptError, err:
+except getopt.GetoptError, err:
     print str(err)
     usage()
     sys.exit(2)
@@ -64,8 +67,8 @@ rosmin = 1
 all=False
 zero=False
 allzero=False
-nchan = 48
-ngain = 2
+nchan = 0
+ngain = 0
 nval = 0
 blobVersion = -1
 txtFile= ""
@@ -208,12 +211,10 @@ if flt:
     mval=flt.getObjSizeUint32()
     log.info( "Blob type: %d  version: %d  Nchannels: %d  Ngains: %d  Nval: %d" % (blobT,blobV,mchan,mgain,mval) )
     if blobVersion<0: blobVersion = blobV 
-    if nchan<1: nchan=mchan
-    if ngain<1: ngain=mgain
 else:
     mval=-1
-    if nchan<1: nchan=TileCalibUtils.max_chan()
-    if ngain<1: ngain=TileCalibUtils.max_gain()
+nchanDef=nchan
+ngainDef=ngain
 
 log.info("Comment: %s" % blobReader.getComment((run,lumi)))
 log.info( "\n" )
@@ -273,6 +274,8 @@ if len(txtFile)>0:
                 modSpec = modName
             newDrawer=True
             flt1 = blobReader.getDrawer(ros, mod, since, False, False)
+            nchan = nchanDef if nchanDef>0 else (flt1.getNChans() if flt1 else TileCalibUtils.max_chan())
+            ngain = ngainDef if ngainDef>0 else (flt1.getNGains() if flt1 else TileCalibUtils.max_gain())
             for chn in xrange(nchan):
                 #=== loop over gains
                 for adc in xrange(ngain):
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py
index 3fcce17b979b006f51f92bed5e20b761d7c60855..cbe690dae729e09aa6c23935fb89a4fe185bc065 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/WriteCellNoiseToCool.py
@@ -1,10 +1,12 @@
-#!/usr/bin/env python
+#!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 #
 # File:    WriteCellNoiseToCool.py
 # Purpose: Manual update of cell noise constants from ascii file
 #
 # 2014-07-14 - Sasha, based on update_noise_bulk.py from Carlos,Gui,Blake,Yuri
-# 2024-12-14 - Yuri Smirnov, change for PyCintex->cppyy for ROOT6
+# 2016-12-14 - Yuri Smirnov, change for PyCintex->cppyy for ROOT6
 
 import getopt,sys,os,string,math,re
 os.environ['TERM'] = 'linux'
@@ -161,7 +163,11 @@ import cppyy
 from CaloCondBlobAlgs import CaloCondTools
 from TileCalibBlobPython import TileCalibTools
 from TileCalibBlobPython import TileCellTools
-hashMgr=TileCellTools.TileCellHashMgr()
+hashMgr=None
+hashMgrDef=TileCellTools.TileCellHashMgr()
+hashMgrA=TileCellTools.TileCellHashMgr("UpgradeA")
+hashMgrBC=TileCellTools.TileCellHashMgr("UpgradeBC")
+hashMgrABC=TileCellTools.TileCellHashMgr("UpgradeABC")
 
 #=== Get list of IOVs by tricking TileCalibTools to read a Calo blob
 idb = TileCalibTools.openDbConn(ischema,'READONLY')
@@ -210,7 +216,8 @@ from math import sqrt
 cellData = {}
 ival=0
 igain=0
-icell=0
+icell=[0,0,0,0,0,0,0]
+gain=-1
 useNames=None
 useModuleNames=None
 useGain=None
@@ -292,7 +299,7 @@ if len(txtFile):
                       dictKey  = (cellN,gain)
                       if not dictKey in cellData:
                           cellData[dictKey] = noise
-          icell+=1
+          icell[gain]+=1
       else:
           if useNames is not None and useNames:
               raise Exception("Mixture of formats in inpyt file %s - useNames" % (txtFile))
@@ -317,7 +324,7 @@ else:
 
 nval=ival
 ngain=igain
-ncell=icell
+ncell=max(icell)
 
 print "IOV list in input DB:", iovList
 
@@ -379,7 +386,7 @@ for iov in iovList:
   mgain=blobR.getNGains()
   mval=blobR.getObjSizeUint32()
 
-  print "input file: ncell: %d ngain %d nval %d" % (icell, igain, ival)
+  print "input file: ncell: %d ngain %d nval %d" % (max(icell), igain, ival)
   print "input db:   ncell: %d ngain %d nval %d" % (mcell, mgain, mval)
   if mcell>ncell: ncell=mcell
   if mgain>ngain: ngain=mgain
@@ -387,6 +394,16 @@ for iov in iovList:
 
   print "output db:  ncell: %d ngain %d nval %d" % (ncell, ngain, nval)
 
+  if ncell>hashMgrA.getHashMax():
+    hashMgr=hashMgrABC
+  elif ncell>hashMgrBC.getHashMax():
+    hashMgr=hashMgrA
+  elif ncell>hashMgrDef.getHashMax():
+    hashMgr=hashMgrBC
+  else:
+    hashMgr=hashMgrDef
+  print "Using %s CellMgr with hashMax %d" % (hashMgr.getGeometry(),hashMgr.getHashMax())
+
   GainDefVec = cppyy.gbl.std.vector('float')()
   for val in xrange(nval):
     GainDefVec.push_back(0.0)
@@ -482,6 +499,7 @@ for iov in iovList:
       print "IOV in output DB [%d,%d]-[%d,%d)" % (sinceRun, sinceLum, untilRun, untilLum)
       writer.register((sinceRun,sinceLum), (untilRun,untilLum), outTag)
 
+print "Using %s CellMgr with hashMax %d" % (hashMgr.getGeometry(),hashMgr.getHashMax())
 #=== Cleanup
 dbw.closeDatabase()
 dbr.closeDatabase()
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py
index d932606ece106f96b4c8735c88c3dd0043dfe692..0c4e2996ea4f47a404fa82cf55f32404edb77932 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_ascii2db.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # TileCalibBlobPython_integratorExample
 # Nils Gollub <nils.gollub@cern.ch>, 2008-02-07
 # change Yuri Smirnov <iouri.smirnov@cern.ch>, 2014-12-24
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py
index 395e660c7a4c5dd505eadeac0a0abcf520714248..65daa9575423474f26f67cfc7aee6964bf426a74 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/integrator_readDb.py
@@ -1,4 +1,7 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # integrator_readDb.py
 # Nils Gollub <nils.gollub@cern.ch>, 2008-02-07
 
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py
index bcb19a87df8b1ba99739a9b25d96c8eae6e7ecf0..eeba99e46f8f6f17e08c226c8b138acacc938249 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/maskDeadModules.py
@@ -1,4 +1,7 @@
-#!/bib/env/python
+#!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 # File:    maskDeadModules.py
 # Purpose: Mask a dead module over a range.  A new IOV gets created in the process.
 #
diff --git a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py
index 7ffb3b7eb9215e6480d58a9956c71cdf79c50833..9ba79b1f0326a4e8474b0c9cd3dcaad1fdcfddf5 100755
--- a/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py
+++ b/TileCalorimeter/TileCalib/TileCalibBlobPython/share/testcurrent_tag.py
@@ -1,4 +1,8 @@
 #!/bin/env python
+
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+# testcurrent_tag.py
 #==================================================
 import os, sys, getopt
 
diff --git a/TileCalorimeter/TileConditions/doc/packagedoc.h b/TileCalorimeter/TileConditions/doc/packagedoc.h
index 5543df9833b3d4e935582948ebe78cb81ade4418..aa1e491b389b20648c5e25cb7216c806ebda25cb 100644
--- a/TileCalorimeter/TileConditions/doc/packagedoc.h
+++ b/TileCalorimeter/TileConditions/doc/packagedoc.h
@@ -266,17 +266,6 @@ svcMgr += CfgMgr.TileCablingSvc()
 
 
 
-@ref used_TileConditions
-@ref requirements_TileConditions
  
 
 */
-
-/**
-@page used_TileConditions Used Packages
-*/
-
-/**
-@page requirements_TileConditions Requirements
-*/
-
diff --git a/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py b/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py
index a910e9d24f2e5295be9e7180054068a959ec555a..db7b5ce05cbd783c5f942c7dc2187307dc946fe2 100644
--- a/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py
+++ b/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py
@@ -122,7 +122,7 @@ class _TileInfoConfigurator( TileInfoLoader ):
         - defTag          : Tag to be added to each folder tag (NGO change this to a hierarchical tag!)
         - dbConnection    : The DB connection string to use [default "": auto-initialization by CondDBSetup.py]
         - type              Pulse type - PHY or LAS or CIS
-        - ofcType         : Optimla filtering methods - OF1 or OF2
+        - ofcType         : Optimal filtering methods - OF1 or OF2
         """
 
         name = 'TileCondToolOfcCool'
@@ -208,7 +208,6 @@ class _TileInfoConfigurator( TileInfoLoader ):
             self.setupCOOLLASPULSE(defTag,dbConnection)
         else:
             self.setupCOOLPHYPULSE(defTag,dbConnection)
-            self.setupCOOLAutoCr(defTag,dbConnection)
 
     #_______________________________________________________________
     def setupCOOLCISPULSE(self, defTag = "", dbConnection = ""):
@@ -371,7 +370,7 @@ class _TileInfoConfigurator( TileInfoLoader ):
         return
 
     #_______________________________________________________________
-    def setupCOOLDCS(self, defTag = "", dbConnection = ""):
+    def setupCOOLDCS(self, defTag = "", dbConnection = "", useHV = True, useHVSET = False, useSTATUS = True):
         """
         Call this function to read DCS from COOL folder.
         Input parameters:
@@ -395,9 +394,9 @@ class _TileInfoConfigurator( TileInfoLoader ):
             self._msg.info("setting up DCS TileCal conditions data")
             dbConnStr = 'DCS_OFL'
             from IOVDbSvc.CondDB import conddb
-            conddb.addFolder(dbConnStr, "/TILE/DCS/HV")
-            conddb.addFolder(dbConnStr, "/TILE/DCS/HVSET")
-            conddb.addFolder(dbConnStr, "/TILE/DCS/STATES")
+            if useHV:     conddb.addFolder(dbConnStr, "/TILE/DCS/HV")
+            if useHVSET:  conddb.addFolder(dbConnStr, "/TILE/DCS/HVSET")
+            if useSTATUS: conddb.addFolder(dbConnStr, "/TILE/DCS/STATES")
             self._msg.info("Adding TileDCSSvc to ServiceMgr")
             svcMgr += CfgMgr.TileDCSSvc()
 
diff --git a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py
index 0916e2105b387f24960f7b7a2b46caa7264ac77c..2a23238bf2322ccf1533d79fc3471d6124b9288c 100644
--- a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py
+++ b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py
@@ -97,10 +97,6 @@ elif TileUseCOOL:
         TileUseCOOLPULSE=True; # read pulse from COOL
 
     tileInfoConfigurator.setupCOOL(type=(TileGapTiming+TilePulse))
-    if TileUseCOOLOFC:
-        tileInfoConfigurator.setupCOOLOFC(type=TilePulse)
-    if TileUseCOOLPULSE:
-        tileInfoConfigurator.setupCOOLPULSE(type=TilePulse)
 
     if TileUseDCS:
         tileInfoConfigurator.setupCOOLDCS();
diff --git a/TileCalorimeter/TileCoolDcs/CMakeLists.txt b/TileCalorimeter/TileCoolDcs/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..585f4f540dec7b1b85a7a6d8e8b2b42273d258b9
--- /dev/null
+++ b/TileCalorimeter/TileCoolDcs/CMakeLists.txt
@@ -0,0 +1,12 @@
+################################################################################
+# Package: TileCoolDcs
+################################################################################
+
+# Declare the package name:
+atlas_subdir( TileCoolDcs )
+
+# Install files from the package:
+atlas_install_python_modules( python/*.py )
+atlas_install_scripts( share/*.py )
+atlas_install_runtime( share/*.dat )
+
diff --git a/TileCalorimeter/TileCoolDcs/python/ProgressBar.py b/TileCalorimeter/TileCoolDcs/python/ProgressBar.py
new file mode 100755
index 0000000000000000000000000000000000000000..e30b86245cc572341954969b50e0123ea2c30df3
--- /dev/null
+++ b/TileCalorimeter/TileCoolDcs/python/ProgressBar.py
@@ -0,0 +1,57 @@
+#!/bin/env python
+import sys
+
+class progressBar:
+    def __init__(self, minValue = 0, maxValue = 10, totalWidth=12, prefix="", suffix=""):
+        self.progBar = "[]"   # This holds the progress bar string
+        self.min = minValue
+        self.max = maxValue
+        self.span = maxValue - minValue
+        self.amount = 0       # When amount == max, we are 100% done
+        self.nextUpdate = minValue+float(self.span/100.0)
+        self.update(0)  # Build progress bar string
+        if len(prefix): self.prefix=prefix+" ["
+        else: self.prefix="["
+        if len(suffix): self.suffix="] " + suffix
+        else: self.suffix="]"
+        self.width = totalWidth - len(self.prefix) - len(self.suffix)
+
+    def update(self, newAmount = 0):
+        if newAmount < self.min: newAmount = self.min
+        if newAmount > self.max: newAmount = self.max
+
+        #=== only continue if something new to draw
+        if newAmount < self.nextUpdate and newAmount<self.max : return
+        self.nextUpdate = self.nextUpdate+float(self.span/100.0)
+        self.amount = newAmount
+
+        # Figure out the new percent done, round to an integer
+        diffFromMin = float(self.amount - self.min)
+        percentDone = (diffFromMin / float(self.span)) * 100.0
+        percentDone = round(percentDone)
+        percentDone = int(percentDone)
+
+        # Figure out how many hash bars the percentage should be
+        numHashes = (percentDone / 100.0) * self.width
+        numHashes = int(round(numHashes))
+
+        # build a progress bar with hashes and spaces
+        self.progBar = self.prefix + '#'*numHashes + ' '*(self.width-numHashes) + self.suffix
+
+        # figure out where to put the percentage, roughly centered
+        percentPlace = (len(self.progBar) / 2) - len(str(percentDone))
+        percentString = str(percentDone) + "%"
+
+        # slice the percentage into the bar
+        self.progBar = self.progBar[0:percentPlace] + percentString + self.progBar[percentPlace+len(percentString):]
+
+        sys.stdout.write('\r' + self.progBar)
+        sys.stdout.flush()# force updating of screen
+
+    def done(self):
+        self.update(self.max)
+        sys.stdout.write('\r' + self.progBar + '\n')
+        sys.stdout.flush()# force updating of screen
+
+    def __str__(self):
+        return str(self.progBar)
diff --git a/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py b/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py
new file mode 100755
index 0000000000000000000000000000000000000000..94a7acc6332a4ea6e9bdbcd40825dfb32e012c46
--- /dev/null
+++ b/TileCalorimeter/TileCoolDcs/python/TileDCSDataGrabber.py
@@ -0,0 +1,820 @@
+#!/bin/env python
+# Author: nils.gollub@cern.ch
+
+import sys, os
+import time
+import logging
+from PyCool import cool
+import ROOT
+from array import array
+from sets import Set
+import copy
+import TileDCSDataInfo
+from CoolConvUtilities.AtlCoolTool import connect
+from ProgressBar import progressBar
+
+#====================================================================================================
+class IOVDict:
+    """
+    Class that stores time stamps and associated data. If data is requested for a time
+    between registered time stamps, then the data at the smaller time stamp is returned.
+    For overflow time request, the last data is returned.
+    For underflow time requests, the first data is returned.
+
+    It is mandatory that data is entered with strictly growing iovSince!
+    """
+
+    def __init__(self, putDuplicates=False):
+        self.iovDict = {}
+        self.iovList = []
+        self.putDuplicates = putDuplicates
+
+    def addData(self, iovSince, data):
+        """
+        Only add data with new iovSince if the list of data values changed
+        """
+        #=== check strict iovSince ordering
+        if len(self.iovList):
+            if iovSince < self.iovList[-1]:
+                raise "ERROR: Data must be entered by strict iov order"
+        #=== check if data has changed since last entry
+        oldData = self.getData(iovSince)
+        if data != oldData or self.putDuplicates:
+            #print "Adding new data to store...: ", iovSince,"(",time.ctime(iovSince/1000000000),")", data
+            self.iovDict[iovSince] = data
+            if iovSince not in self.iovList:
+                self.iovList.append(iovSince)
+
+
+    def getData(self, iovTime):
+        if len(self.iovList):
+            key = self.__floorsearch(self.iovList, iovTime)
+            return self.iovDict[key]
+        else:
+            return None
+
+    def getIOVs(self):
+        if not self.isSorted:
+            self.iovList.sort()
+            self.isSorted = True
+        return iovList;
+
+    def __binsearch(self, seq, search):
+        right = len(seq)
+        left = 0
+        previous_center = -1
+        if search < seq[0]:
+            return -1
+        while True:
+            center = (left + right) / 2
+            candidate = seq[center]
+            if search == candidate:
+                return center
+            if center == previous_center:
+                return - 2 - center
+            elif search < candidate:
+                right = center
+            else:
+                left = center
+            previous_center = center
+
+    def __floorsearch(self, seq, search):
+        ind = self.__binsearch(seq,search)
+        if ind>=0:
+            return search
+        elif ind==-1:
+            #=== catch left out of bounds case
+            return seq[0]
+        else:
+            return seq[-ind-2]
+
+
+
+#====================================================================================================
+class FolderVarSet:
+    """
+    Class that stored a set of variables. Groups of sets belonging to the same
+    drawer and IOV are saved.
+    """
+
+    def __init__(self, variables, putDuplicates=False):
+
+        #=== list to store the variable values
+        self.val = len(variables) * [ 0 ]
+        #=== dictionary of variable name to index and modified
+        self.index = {}
+        for ind in xrange(len(variables)):
+            self.index[variables[ind]] = [ ind, False ]
+        #=== dictionary of drawers to IOVDict objects
+        self.iovDictStore = {}
+        self.putDuplicates = putDuplicates
+
+
+    def setVariable(self, variable, value):
+        ind, mod = self.index[variable]
+        self.val[ind] = value
+        self.index[variable][1] = True
+
+
+    def getVariable(self, variable):
+        ind, mod = self.index[variable]
+        return self.val[ind]
+
+
+    def registerInIOVStore(self, drawer, iovSince):
+
+        #=== check if all variables have been set
+        notSet = []
+        for var, stat in self.index.iteritems():
+            mod = stat[1]
+            if mod==False: notSet.append(var)
+        if len(notSet):
+            print "WARNING: Not all variables set: "
+            for var in notSet: print var
+
+        #=== register in IOVDict
+        if drawer not in self.iovDictStore:
+            self.iovDictStore[drawer] = IOVDict(self.putDuplicates)
+        valueCopy = copy.deepcopy(self.val)
+        self.iovDictStore[drawer].addData(iovSince, valueCopy)
+
+        #=== reset all values and modification flags
+        for var in self.index.iterkeys():
+            self.index[var][1] = False
+            self.val[ self.index[var][0] ] = 0
+
+
+    def getFromIOVStore(self, drawer, iovSince):
+
+        if drawer not in self.iovDictStore:
+            raise "Drawer not known: ", drawer
+        iovDict = self.iovDictStore[drawer]
+        self.val = iovDict.getData(iovSince)
+
+
+    def getUniqueIOVs(self):
+
+        uniqueIOVList = []
+        for iovDict in self.iovDictStore.itervalues():
+            uniqueIOVList.extend( iovDict.iovList )
+        return list(set(uniqueIOVList))
+
+    def getUniqueVariables(self):
+
+        uniqueVariableList = []
+        for drawer in self.iovDictStore.iterkeys():
+            for variable in self.index.iterkeys():
+                uniqueVariableList.append( (drawer,variable) )
+        return uniqueVariableList;
+
+    def getVariables(self):
+        return self.index.keys()
+
+    def getDrawers(self):
+        return self.iovDictStore.keys()
+
+
+
+#====================================================================================================
+class TileDCSDataGrabber:
+
+    """
+    Class to extract DCS data from the COOL database in two different ways:
+    - selected variables will be extracted to a TTree in synchronization with
+      time stamps in an input ntuple (getSyncDCSTree)
+    - selected variables for a selection of drawers will be dumped to a TTree for
+      a speciefied time range. The data between the different selected drawers is
+      synchronized.
+    """
+
+    #________________________________________________________________________________________________
+    def __init__( self, dbSource="COOL", logLevel=logging.WARNING, dbstring=None, putDuplicates=False, iovStartUnix=None):
+
+        #=== setup loggging
+        logging.basicConfig(level=logLevel, format='TileDCSDataGrabber %(levelname)-8s %(message)s')
+
+        #=== connect to DB, depending on technology
+        self.db = 0
+        self.dbV = []
+        self.info = TileDCSDataInfo.TileDCSDataInfo(dbstring)
+        if dbSource=="COOL":
+            if dbstring==None:
+                self.dbV.append(0)
+                self.dbV.append(0)
+                self.dbV.append(0)
+                self.dbV[1], connectString = connect( self.info.get_dbstring(dbSource,1) )
+                self.dbV[2], connectString = connect( self.info.get_dbstring(dbSource,2) )
+                self.db = self.dbV[2]
+            else:
+                self.db, connectString = connect( dbstring )
+                self.dbV.append(self.db)
+                self.dbV.append(self.db)
+                self.dbV.append(self.db)
+        elif dbSource=="ORACLE":
+            self.iovStart = self.getOracleTimeString(iovStartUnix)
+            self.oldTableBoundary = 131231230000
+            if dbstring==None:
+                dbstring = self.info.get_dbstring(dbSource, 1 if int(self.iovStart) < self.oldTableBoundary else 2)
+            self.db = ROOT.TSQLServer.Connect( dbstring[0], dbstring[1], dbstring[2])
+        elif dbSource=="TESTBEAM":
+            if dbstring==None:
+                dbstring = self.info.get_dbstring(dbSource,0)
+            self.db = ROOT.TSQLServer.Connect( dbstring[0], dbstring[1], dbstring[2])
+        else:
+            raise("Unknown dbSource: %s, please use either COOL or ORACLE or TESTBEAM" % dbSource)
+
+        self.dbCounter = 0
+        self.queryCounter = 0
+        self.maxQueryCounter = 100
+        self.dbString = dbstring
+        self.dbSource = dbSource
+        self.unix2cool = 1000000000
+        self.R2minTime = 1404165600 # 01-jul-2014 00:00:00 CEST
+        self.putDuplicates = putDuplicates
+        print """
+        ##############################################################################
+        #
+        #     TileDCSDataGrabber   --   Access to TileCal DCS data in COOL / ORACLE
+        #
+        #         problems, suggestions, etc... :  andrey.ryzhov@cern.ch
+        #
+        ##############################################################################
+
+        """
+        print "Reading from",dbSource
+
+    #________________________________________________________________________________________________
+    def check_db(self, iovStartUnix, iovEndUnix, ar):
+
+        if self.dbCounter==0:
+            if iovStartUnix<self.R2minTime:
+                self.dbCounter=1
+                if iovEndUnix>self.R2minTime:
+                    ar[0] = cool.ValidityKey(iovStartUnix*self.unix2cool)
+                    ar[1] = cool.ValidityKey(self.R2minTime*self.unix2cool)
+            else:
+                self.dbCounter=2
+        elif self.dbCounter==1:
+            if iovEndUnix<=self.R2minTime:
+                self.dbCounter=0
+            else:
+                self.dbCounter=2
+                if iovStartUnix<self.R2minTime:
+                    ar[0] = cool.ValidityKey(self.R2minTime*self.unix2cool)
+                    ar[1] = cool.ValidityKey(iovEndUnix*self.unix2cool)
+        else:
+            self.dbCounter=0
+
+        self.db = self.dbV[self.dbCounter]
+        return self.dbCounter
+
+
+    #________________________________________________________________________________________________
+    def reconnect(self):
+
+        if self.queryCounter == self.maxQueryCounter:
+            if self.dbSource=="ORACLE" or self.dbSource=="TESTBEAM":
+                print "Max connect counter reached, reconnecting to Databaase Server"
+                self.db.Close()
+                self.db = ROOT.TSQLServer.Connect( self.dbString[0], self.dbString[1], self.dbString[2] )
+            self.queryCounter=1
+        else:
+            self.queryCounter+=1
+
+
+
+    #________________________________________________________________________________________________
+    def getSyncDCSTree(self, h2000, drawer, variables=[], timeVarName="EvTime"):
+        """
+        This function returns a tree containing the DCS variables in <variables>
+        for the drawer <drawer> synchronized with the input tree <h2000>. The
+        name of the time stamp used for synchronization is <timeVarName>.
+        Input:  - h2000      : a TTree containing at least the variable <timeVarName>
+                - drawer     : The drawer of interst in string from, i.e. \"LBC02\"
+                - variables  : A python list containing all the variable names of
+                               interest. By default all variables are attached.
+                - timeVarName: name of the time stamp in h2000 tree
+        """
+
+        #=== avoid variable duplication
+        if not len(variables):
+            variables = self.info.get_all_variables()
+        variables = list(set(variables))
+
+        #=== sort variables by directories
+        folders = self.info.get_variables_by_folder(variables, drawer)
+
+        #=== prepare input tree for fast reading
+        evTime = array('i', [0])
+        h2000.SetBranchStatus("*",0)
+        h2000.SetBranchStatus(timeVarName,1)
+        h2000.SetBranchAddress(timeVarName, evTime)
+        nEntries = h2000.GetEntries()
+
+        #=== create the friend
+        friendName=drawer
+        t = ROOT.TTree(friendName,friendName)
+        t.SetDirectory(0)
+        buffer = []
+        nVars = len(variables)
+        previousVal = {}
+        for iVar in xrange(nVars):
+            var = variables[iVar]
+            arrayType, treeType = self.info.get_variable_type(var)
+            previousVal[var] = array(arrayType, [0])
+            buffer.append(     array(arrayType, [0]) )
+            t.Branch( var , buffer[iVar], var+treeType )
+
+
+        #=== loop over input tree h2000
+        timeBeg = -1
+        timeEnd = -1
+        bar = progressBar(0, nEntries, 78)
+        for jentry in xrange( nEntries ):
+
+            #=== load current entry
+            ientry = h2000.LoadTree( jentry )
+            if ientry < 0: break
+            nb = h2000.GetEntry( jentry )
+            if nb <= 0: continue
+            bar.update(jentry)
+
+            #=== access cool only if IOV changed
+            if timeEnd==-1: timeBeg = evTime[0]
+            if evTime[0]!=timeEnd:
+                timeEnd=evTime[0]
+                valKey = cool.ValidityKey(evTime[0]*self.unix2cool)
+                for folder, varlist in folders.iteritems():
+                    coolFolder = self.db.getFolder(folder)
+                    channel = self.info.get_channel(folder,drawer)
+                    obj = coolFolder.findObject(valKey,channel)
+                    #payload = obj.payload()
+                    for var in varlist:
+                        if '/HVSET' in folder:
+                            coolVarName = var.split(".")[1]
+                        elif '/AI' in folder:
+                            coolVarName = "AI_"+var+"_VALUE"
+                        else:
+                            coolVarName = var.upper()
+                        #previousVal[var][0]  = payload[coolVarName]
+                        sval = obj.payloadValue(coolVarName)
+                        if sval=="NULL": sval="0"
+                        previousVal[var][0] = float(sval)
+
+            #=== fill the buffers with current value
+            for iVar in xrange(len(variables)):
+                var = variables[iVar]
+                buffer[iVar][0] = previousVal[var][0]
+            #=== fill friend tree
+            t.Fill()
+
+        #=== reset trees
+        h2000.SetBranchStatus("*",1)
+        t.ResetBranchAddresses();
+        bar.done()
+
+        #=== print out stats
+        print "IOV start: ", time.ctime(timeBeg), "\t COOL time stamp: ", (timeBeg*self.unix2cool)
+        print "IOV end  : ", time.ctime(timeEnd), "\t COOL time stamp: ", (timeEnd*self.unix2cool)
+
+        return t
+
+
+    #________________________________________________________________________________________________
+    def getDCSTree(self, iovStartUnix, iovEndUnix, drawers, variables, lastOnly=False, firstAndLast=False):
+        """
+        Returns a TTree containing the specified variables for the specified drawers between
+        iovStart and iovEnd. The variables in the output tree are called <drawer.variable>.
+        Input: - iovStartUnix: start time stamp in unix time
+               - iovEndUnix  :   end time stamp in unix time
+               - drawers     : list of drawers, i.e. ['LBC13','LBC15']
+               - variables   : list of variables, i.e. ['AI_5VMB_OUTPUT_V_VALUE','AI_15VMB_OUTPUT_I_VALUE']
+        Output: TTree with the requested variables. A new entry is created in the tree if any
+                of the variables changes its value. A weight called \"weight\" is calculated for each
+                entry in the tree proportional to the lenght of the IOV.
+        """
+
+        #=== catch duplications
+        drawers   = list(set(drawers))
+        if not len(variables):
+            variables = self.info.get_all_variables()
+        variables = list(set(variables))
+        logging.debug("Will extract the following variables:")
+        for var in variables:
+            logging.debug("\t- %s"%var)
+
+        #=== build a list of folders and
+        #=== 1) associated channel numbers  and
+        #=== 2) associated variables in the folder
+        #=== that need to be accessed
+        folderChannelDict = {}
+        folderVariableDict = {}
+        for drawer in drawers:
+            for variable in variables:
+                folder, channel = self.info.get_folder_and_channel(variable, drawer)
+
+                if folder not in folderChannelDict:
+                    folderChannelDict[folder] = [ channel ]
+                else:
+                    if channel not in folderChannelDict[folder]:
+                        folderChannelDict[folder].append(channel)
+
+                if folder not in folderVariableDict:
+                    folderVariableDict[folder] = [ variable ]
+                else:
+                    if variable not in folderVariableDict[folder]:
+                        folderVariableDict[folder].append(variable)
+
+
+        #===============================================================
+        #=== Extract data from DB
+        #===============================================================
+
+        folderVarSetList = []
+        if self.dbSource=="COOL":
+            folderVarSetList = self.readFromCool(iovStartUnix, iovEndUnix, folderChannelDict, folderVariableDict)
+        elif self.dbSource=="ORACLE":
+            folderVarSetList = self.readFromOracle(iovStartUnix, iovEndUnix, folderChannelDict, folderVariableDict)
+        elif self.dbSource=="TESTBEAM":
+            folderVarSetList = self.readFromOracle(iovStartUnix, iovEndUnix, folderChannelDict, folderVariableDict)
+
+
+        #=== extract list of unique iovSince
+        uniqueIOVs = []
+        uniqueVariables = []
+        for folderVarSet in folderVarSetList:
+            uniqueIOVs.extend( folderVarSet.getUniqueIOVs() )
+            uniqueVariables.extend( folderVarSet.getUniqueVariables() )
+        uniqueIOVs = sorted(list(set(uniqueIOVs)))
+        print "===> Found Number of unique IOVs: " , len(uniqueIOVs)
+        print "===> Will store the following variables:" , uniqueVariables
+
+        #=== calculate normalized iov weights
+        uniqueIOVs.append(iovEndUnix*self.unix2cool)
+        iovWeight={}
+        sumDiff = 0.
+        for i in xrange(len(uniqueIOVs)-1):
+            iov = uniqueIOVs[i]
+            diff = float(uniqueIOVs[i+1]-iov)
+            iovWeight[iov] = diff
+            sumDiff = sumDiff + diff
+        uniqueIOVs.pop(-1)
+        for iov in uniqueIOVs:
+            iovWeight[iov] = iovWeight[iov]/sumDiff
+
+        #=== create tree structure
+        treeName="DCS_tree"
+        t = ROOT.TTree(treeName,treeName)
+        t.SetDirectory(0)
+        evTime = array('l',[0])
+        t.Branch('EvTime', evTime, 'EvTime/I')
+        weight = array('f',[0])
+        t.Branch('weight', weight, 'weight/F')
+        buffer = {}
+        for drawer, variable in uniqueVariables:
+            varName = drawer+"."+variable
+            arrayType, treeType = self.info.get_variable_type(variable)
+            buffer[varName] = array(arrayType, [0])
+            t.Branch( varName , buffer[varName], varName+treeType )
+
+        if firstAndLast:
+            uniqueIOVs = uniqueIOVs[:1] + uniqueIOVs[-1:]
+        if lastOnly:
+            uniqueIOVs = uniqueIOVs[-1:]
+        #=== fill tree ordered by iov
+        bar = progressBar(0, len(uniqueIOVs), 78)
+        iov = 0
+        for iovSince in uniqueIOVs:
+            bar.update(iov)
+            iov+=1
+            evTime[0] = int(iovSince/self.unix2cool)
+            weight[0] = iovWeight[iovSince]
+            for folderVarSet in folderVarSetList:
+                for drawer in folderVarSet.getDrawers():
+                    folderVarSet.getFromIOVStore(drawer,iovSince)
+                    for variable in folderVarSet.getVariables():
+                        varName = drawer+"."+variable
+                        if variable=="FORDAQ_MBHV":
+                            buffer[varName][0] = int(folderVarSet.getVariable(variable))
+                        else:
+                            buffer[varName][0] = folderVarSet.getVariable(variable)
+            t.Fill()
+        bar.done()
+        t.ResetBranchAddresses()
+        return t
+
+
+
+    #________________________________________________________________________________________________
+    def getEntry(self, drawer, variable, unixTime):
+        """
+        """
+
+        #=== sort variables by directories
+        folder, channel = self.info.get_folder_and_channel(variable, drawer)
+
+        #NGO quick hack to fix ./checkCoolLatestUpdate.py --> need to introduce some varname mapping
+        if '/HVSET' in folder:
+            variable = variable.split(".")[1]
+        elif '/AI' in folder:
+            variable = "AI_"+variable+"_VALUE"
+        else:
+            variable = variable.upper()
+        valKey = cool.ValidityKey(unixTime*self.unix2cool)
+        coolFolder = self.db.getFolder(folder)
+        obj = coolFolder.findObject(valKey,channel)
+        iovSince = obj.since()
+        iovUntil = obj.until()
+        sval     = obj.payloadValue(variable)
+        if sval=="NULL": sval="0"
+        val      = float(sval)
+        inTime   = obj.insertionTime()
+
+        return (val, iovSince, iovUntil, inTime)
+
+
+
+    #________________________________________________________________________________________________
+    def readFromCool(self, iovStartUnix, iovEndUnix, folderChannelDict, folderVariableDict):
+        """
+        """
+
+        self.reconnect()
+
+        #=== verify and translate times, maximum is current time
+        #=== need iovStart/End as cool::ValidityKey
+        if not (iovStartUnix>0):
+            iovStartUnix=self.R2minTime
+        if not (iovEndUnix>iovStartUnix and iovEndUnix>0):
+            iovEndUnix=int(time.time())
+
+        iovS=cool.ValidityKey(iovStartUnix*self.unix2cool)
+        iovE=cool.ValidityKey(iovEndUnix*self.unix2cool)
+
+        print "IOV start: ", time.ctime(iovS/self.unix2cool), "\t COOL time stamp: ", iovS
+        if iovStartUnix<self.R2minTime and iovEndUnix>self.R2minTime:
+            print "R1->R2 tm: ", time.ctime(self.R2minTime), "\t COOL time stamp: ", self.R2minTime*self.unix2cool
+        print "IOV end  : ", time.ctime(iovE/self.unix2cool), "\t COOL time stamp: ", iovE
+
+        #=== initialize return list
+        folderVarSetList = []
+
+        #=== loop over all different folders and build list of FolderVarSets
+        for folder, channels in folderChannelDict.iteritems():
+            logging.debug( "treating folder: %s" % folder )
+            varsInFolder =  folderVariableDict[folder]
+            logging.debug( "---> variables in this folder: %s" % varsInFolder )
+            folderVarSet = FolderVarSet(varsInFolder,self.putDuplicates)
+
+            ar=[iovS,iovE]
+            #=== loop over different databases
+            while self.check_db(iovStartUnix, iovEndUnix,ar):
+                iovStart=ar[0]
+                iovEnd=ar[1]
+                coolFolder = self.dbV[self.dbCounter].getFolder(folder)
+                coolFolder.setPrefetchAll(False) #=== save some RAM
+                for channel in channels:
+                    drawer = self.info.get_drawer(folder,channel)
+                    logging.debug( "---> treating channel %s,    drawer %s" % ( channel, drawer ) )
+                    channelSelection = cool.ChannelSelection(channel)
+                    objs = coolFolder.browseObjects(iovStart, iovEnd, channelSelection)
+                    bar = progressBar(iovStart,iovEnd,78,drawer)
+                    while objs.goToNext():
+                        obj = objs.currentRef()
+                        iovSince = max(iovStart,obj.since())
+                        for var in varsInFolder:
+                            #=== pre- and append stuff for AI variables
+                            if '/HVSET' in folder:
+                                coolVarName = var.split(".")[1]
+                            elif '/AI' in folder:
+                                coolVarName = "AI_"+var+"_VALUE"
+                            else:
+                                coolVarName = var.upper()
+                            sval=obj.payloadValue(coolVarName)
+                            if sval=="NULL": sval="0"
+                            val=float(sval)
+                            logging.debug( "-------------> %s (%s)  %s : %f" % ( iovSince, time.ctime(iovSince/self.unix2cool), var, val ) )
+                            folderVarSet.setVariable(var, val)
+                        folderVarSet.registerInIOVStore(drawer,iovSince)
+                        bar.update(iovSince)
+                    bar.done()
+                    #=== release server resources
+                    objs.close()
+            folderVarSetList.append(folderVarSet)
+        return folderVarSetList
+
+
+    #________________________________________________________________________________________________
+    def readFromOracle(self, iovStartUnix, iovEndUnix, folderChannelDict, folderVariableDict):
+        """
+        """
+
+        #=== get logging status
+        isDebug = (logging.getLogger().getEffectiveLevel() <= logging.DEBUG)
+
+        #=== verify and translate times, maximum is current time
+        now = int(time.time())
+        iovStart = self.getOracleTimeString(iovStartUnix)
+        iovEnd   = self.getOracleTimeString(now)
+        if iovEndUnix>iovStartUnix and iovEndUnix>0:
+            iovEnd = self.getOracleTimeString(iovEndUnix)
+        print "IOV start: ", time.ctime(iovStartUnix), " (in local time)\t ORACLE time string: ", iovStart, " (in UTC)"
+        print "IOV end  : ", time.ctime(iovEndUnix  ), " (in local time)\t ORACLE time string: ", iovEnd  , " (in UTC)"
+
+        #=== initialize return list
+        folderVarSetList = []
+
+        #=== get all tables spanned by query
+        tableRange = self.getEventHistoryTables( iovStart, iovEnd)
+        tables = tableRange.keys()
+        tables.sort()
+        print "===> Going to access the following oracle table(s):"
+        for table in tables:
+            print "     * ", table, " ---> validity range: ", tableRange[table]
+
+        for folder, channels in folderChannelDict.iteritems():
+            logging.debug( "treating folder: %s" % folder )
+            varsInFolder = folderVariableDict[folder]
+            logging.debug( "---> variables in this folder: %s" % varsInFolder )
+            for channel in channels:
+                drawer = self.info.get_drawer(folder,channel)
+                logging.debug( "channel: %s" % channel )
+                nCrap = 0;
+                for var in varsInFolder:
+                    varType = self.info.get_variable_type(var)
+                    logging.debug( "variable: %s" % var )
+                    folderVarSet = FolderVarSet([var],self.putDuplicates)
+                    bar = progressBar(iovStartUnix,iovEndUnix,78,drawer,var)
+                    for table in tables:
+                        tableRangeStart, tableRangeEnd = tableRange[table]
+                        logging.debug( "Processing table: %s" % table )
+                        oracleString = self.getOracleString(folder, drawer, var, table, tableRangeStart, tableRangeEnd)
+                        logging.debug( "Oralce string: %s" % oracleString )
+                        stmt = self.db.Statement(oracleString)
+                        if stmt.Process():
+                            stmt.StoreResult()
+                            #=== read all values
+                            value = 0
+                            while stmt.NextResultRow():
+                                if   varType==self.info.type_int:    value = stmt.GetInt(   1)
+                                elif varType==self.info.type_float:  value = stmt.GetDouble(1)
+                                #=== catch crap in oracle
+                                if value < -10000:
+                                    nCrap += 1
+                                    continue
+                                #=== extract time stamp
+                                Y     = stmt.GetYear(0)
+                                M     = stmt.GetMonth(0)
+                                D     = stmt.GetDay(0)
+                                H     = stmt.GetHour(0)
+                                Min   = stmt.GetMinute(0)
+                                Sec   = stmt.GetSecond(0)
+                                tuple = (Y,M,D,H,Min,Sec,0,0,0)
+                                #=== time.mktime interprets tuple as local standard (==winter) time
+                                #=== example: Oracle time stamp is 15:00
+                                #=== mktime makes seconds for 15:00 local winter time, i.e. 14:00 UTC
+                                #=== --> need to add 3600 seconds (time.timezone == -3600)
+                                unixTime = time.mktime(tuple) - time.timezone
+                                iovSince = int(unixTime*self.unix2cool)
+                                folderVarSet.setVariable(var, value)
+                                folderVarSet.registerInIOVStore(drawer,iovSince)
+                                if not isDebug: bar.update(unixTime)
+                                logging.debug( "%s %s: %s (%s)\t%f" % (drawer,var,iovSince,time.ctime(unixTime),value) )
+                        if not isDebug: bar.done()
+                    folderVarSetList.append(folderVarSet)
+                if nCrap > 0:
+                    logging.warning("Found %i \"crap\" entries for %s, ignored those!"%(nCrap,var))
+        return folderVarSetList
+
+
+    #________________________________________________________________________________________________
+    def getOracleTimeString(self, unixTime):
+        """
+        Convert input unixTime to Oracle time string yymmddhh24miss
+        """
+
+        tuple  = time.gmtime(unixTime)
+        year   = str(tuple[0])[-2:]
+        month  = ('00'+str(tuple[1]))[-2:]
+        day    = ('00'+str(tuple[2]))[-2:]
+        hour   = ('00'+str(tuple[3]))[-2:]
+        minute = ('00'+str(tuple[4]))[-2:]
+        second = ('00'+str(tuple[5]))[-2:]
+        return year+month+day+hour+minute+second
+
+
+
+    #________________________________________________________________________________________________
+    def getOracleString(self, folder, drawer, var, table, tableRangeStart, tableRangeEnd):
+        """
+        iovStart and iovEnd need to be a string, formated in yymmddhh24miss
+        """
+
+        self.reconnect()
+        key = ( folder , drawer)
+        if key not in self.info.folderDrawer_to_oracleId:
+            logging.error( "Can not resolve key: %s , known keys are:" % key )
+            for key, val in self.info.folderDrawer_to_oracleId.iteritems():
+                logging.error( "%s %s" % (key, val) )
+            return None
+        oracleId = self.info.folderDrawer_to_oracleId[key]
+
+        masterTableName = table.split('.')[0]
+        statement  = "select TS, VALUE_NUMBER, ELEMENT_NAME from "
+        sysId = self.info.systemID[drawer[:3]]
+        #=== DAQ STATE has system id from SCS
+        if self.info.vars[var][0] == self.info.VARS_DAQ:
+            sysId = self.info.systemID["SCS"]
+        statement += "(select element_id, element_name from %s.elements where sys_id = %i and event = 1 and " % (masterTableName,sysId)
+        statement += "ELEMENT_NAME = \'"+oracleId
+
+        #=== special treatment for STATES
+        if self.info.vars[var][0] == self.info.LVPS_STATES:
+            logging.debug( "STATES VAR DETECTED: %s" % var )
+            if   var == "FORDAQ_HV"  : var = ".ForDAQ_HV"
+            elif var == "FORDAQ_MB"  : var = ".ForDAQ_MB"
+            elif var == "FORDAQ_MBHV": var = ".ForDAQ_MBHV"
+        #=== special treatment for HV
+        elif self.info.vars[var][0] == self.info.VARS_HV:
+            logging.debug( "HV VAR DETECTED: %s" % var )
+            var = "."+var+".value"
+        #=== special treatment for HV
+        elif self.info.vars[var][0] == self.info.VARS_HVSET:
+            logging.debug( "HVSET VAR DETECTED: %s" % var )
+            var = "."+var.split(".")[1]+".order"
+        #=== special treatment for DAQ STATE
+        elif self.info.vars[var][0] == self.info.VARS_DAQ:
+            var = ""
+        else:
+            var = "/"+var+".value"
+
+
+        statement += var
+        statement +="\') el, "
+        statement += "(select element_id, ts, value_number from %s " % table
+        statement += "where ts between to_date(\'"+tableRangeStart+"\', \'yymmddhh24miss\') AND to_date(\'"+tableRangeEnd+"\', \'yymmddhh24miss\')) "
+        statement += "ev where el.element_id = ev.element_id"
+        return statement
+
+
+    #________________________________________________________________________________________________
+    def getEventHistoryTables(self, iovStart, iovEnd):
+        """
+        This function returns a list of the oracle eventhistory tables spanned
+        by the range iovStart to iovEnd.
+        - iovStart : start time in the format yymmddhh24miss
+        - iovEnd   : end   time in the format yymmddhh24miss
+        """
+
+        evhistNames = {}
+
+        #=== last entry in ATLAS_PVSS_TILE.EVENTHISTORY_00007001:  06/25/2007, 15:06:48 (oracle time, UTC)
+        #=== ---> table name changed at oracle time 070625150648 (yymmddhh24miss)
+        #=== last entry in ATONR_ADG.EVENTHISTORY:  May 25 00:00:00 2011 (oracle time, UTC)
+        #=== ---> table name changed at oracle time 070625150648 (yymmddhh24miss)
+        oldTableBoundary = 70625150648
+        oldTableBoundary2 = 131231230000
+        if int(iovStart) < oldTableBoundary:
+            if int(iovEnd) > oldTableBoundary:
+                raise ("Can not generate plots of table boundary at 2007-06-25 15:06:48, sorry...")
+            rangeEnd = min(iovEnd , "070625150648" )
+            validityRange = ( iovStart, rangeEnd )
+            evhistNames["ATLAS_PVSS_TILE.EVENTHISTORY_00007001"] = validityRange
+        elif int(iovStart) < oldTableBoundary2 and int(iovStart) >= oldTableBoundary and int(iovEnd)>oldTableBoundary2:
+            raise ("Can not generate plots of table boundary at 2014-01-01 00:00:00, sorry...")
+            rangeEnd = min(iovEnd , "131231230000" )
+            validityRange = ( iovStart, rangeEnd )
+            evhistNames["ATLAS_PVSS_TILE.EVENTHISTORY_00007001"] = validityRange
+
+        else:
+            statement  = "select archive#, "
+            statement += "to_char(start_time, 'yymmddhh24miss') as s_time, "
+            statement += "to_char(end_time,   'yymmddhh24miss') as e_time "
+            statement += "from( "
+            statement += "select archive#, start_time, end_time from ATLAS_PVSSTIL.arc_archive "
+            statement += "where group_name = 'EVENT' and "
+            statement += "(end_time > to_date('%s', 'yymmddhh24miss') or end_time is null) " % iovStart
+            statement += "intersect "
+            statement += "select archive#, start_time, end_time from ATLAS_PVSSTIL.arc_archive "
+            statement += "where group_name = 'EVENT' and "
+            statement += "start_time < to_date('%s', 'yymmddhh24miss') " % iovEnd
+            statement += ")"
+
+            stmt = self.db.Statement(statement)
+            if stmt.Process()==True:
+                stmt.StoreResult()
+                while stmt.NextResultRow():
+                    rangeStart = stmt.GetString(1)
+                    if iovStart > rangeStart:
+                        rangeStart = iovStart
+                    rangeEnd = stmt.GetString(2)
+                    if rangeEnd=="" or iovEnd<rangeEnd:
+                        rangeEnd=iovEnd
+
+                    validityRange = ( rangeStart , rangeEnd )
+                    evhistNum = (8*'0'+stmt.GetString(0))[-8:]
+                    evhistNames["ATLAS_PVSSTIL.EVENTHISTORY_"+evhistNum] = validityRange
+
+        return evhistNames
+
+
diff --git a/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py b/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py
new file mode 100755
index 0000000000000000000000000000000000000000..4ba6f23a94ada6709b3b52c93650eef75104814a
--- /dev/null
+++ b/TileCalorimeter/TileCoolDcs/python/TileDCSDataInfo.py
@@ -0,0 +1,256 @@
+#!/bin/env python
+# Author: nils.gollub@cern.ch
+
+import re, os, sys, string
+
+class TileDCSDataInfo:
+    """
+    Keeps a list of drawer, variable <---> folder, channel
+    associations and provides information about the available
+    variables and their datatypes.
+    """
+
+    LVPS_AI     = ("/TILE/DCS/", "AI")
+    LVPS_STATES = ("/TILE/DCS/", "STATES")
+    VARS_HV     = ("/TILE/DCS/", "HV")
+    VARS_HVSET  = ("/TILE/DCS/", "HVSET")
+    VARS_DAQ    = ("/DAQdummy/","/DAQdummy")
+    type_float  = ('f','/F')
+    type_int    = ('i','/I')
+
+    vars_LVPS_STATES = {"FORDAQ_MB"      : [ LVPS_STATES, type_int],
+                        "FORDAQ_HV"      : [ LVPS_STATES, type_int],
+                        "FORDAQ_MBHV"    : [ LVPS_STATES, type_int]}
+
+    vars_LVPS_AI = {"15VMB_OUTPUT_I"      : [ LVPS_AI, type_float],
+                    "M5VMB_TEMP2"         : [ LVPS_AI, type_float],
+                    "M5VMB_SENSES"        : [ LVPS_AI, type_float],
+                    "M5VMB_OUTPUT_V"      : [ LVPS_AI, type_float],
+                    "M5VMB_OUTPUT_I"      : [ LVPS_AI, type_float],
+                    "M5VMB_INPUT_V"       : [ LVPS_AI, type_float],
+                    "15VHV_INPUT_V"       : [ LVPS_AI, type_float],
+                    "M15VHV_TEMP3"        : [ LVPS_AI, type_float],
+                    "M15VHV_TEMP2"        : [ LVPS_AI, type_float],
+                    "15VHV_OUTPUT_I"      : [ LVPS_AI, type_float],
+                    "M15VHV_OUTPUT_V"     : [ LVPS_AI, type_float],
+                    "M15VHV_OUTPUT_I"     : [ LVPS_AI, type_float],
+                    "M15VHV_INPUT_V"      : [ LVPS_AI, type_float],
+                    "15VHV_OUTPUT_V"      : [ LVPS_AI, type_float],
+                    "EXT_TEMP2"           : [ LVPS_AI, type_float],
+                    "15VMB_TEMP3"         : [ LVPS_AI, type_float],
+                    "3VDIG_INPUT_V"       : [ LVPS_AI, type_float],
+                    "3VDIG_OUTPUT_I"      : [ LVPS_AI, type_float],
+                    "3VDIG_OUTPUT_V"      : [ LVPS_AI, type_float],
+                    "3VDIG_SENSES"        : [ LVPS_AI, type_float],
+                    "15VMB_TEMP2"         : [ LVPS_AI, type_float],
+                    "3VDIG_TEMP2"         : [ LVPS_AI, type_float],
+                    "3VDIG_TEMP3"         : [ LVPS_AI, type_float],
+                    "15VMB_SENSES"        : [ LVPS_AI, type_float],
+                    "5VDIG_INPUT_V"       : [ LVPS_AI, type_float],
+                    "5VDIG_OUTPUT_I"      : [ LVPS_AI, type_float],
+                    "5VDIG_OUTPUT_V"      : [ LVPS_AI, type_float],
+                    "5VDIG_SENSES"        : [ LVPS_AI, type_float],
+                    "15VMB_OUTPUT_V"      : [ LVPS_AI, type_float],
+                    "5VDIG_TEMP2"         : [ LVPS_AI, type_float],
+                    "5VDIG_TEMP3"         : [ LVPS_AI, type_float],
+                    "M5VMB_TEMP3"         : [ LVPS_AI, type_float],
+                    "5VHV_INPUT_V"        : [ LVPS_AI, type_float],
+                    "5VHV_OUTPUT_I"       : [ LVPS_AI, type_float],
+                    "5VHV_OUTPUT_V"       : [ LVPS_AI, type_float],
+                    "15VMB_INPUT_V"       : [ LVPS_AI, type_float],
+                    "5VHV_TEMP2"          : [ LVPS_AI, type_float],
+                    "5VHV_TEMP3"          : [ LVPS_AI, type_float],
+                    "15VHV_TEMP3"         : [ LVPS_AI, type_float],
+                    "5VMB_INPUT_V"        : [ LVPS_AI, type_float],
+                    "5VMB_OUTPUT_I"       : [ LVPS_AI, type_float],
+                    "5VMB_OUTPUT_V"       : [ LVPS_AI, type_float],
+                    "5VMB_SENSES"         : [ LVPS_AI, type_float],
+                    "15VHV_TEMP2"         : [ LVPS_AI, type_float],
+                    "5VMB_TEMP2"          : [ LVPS_AI, type_float],
+                    "5VMB_TEMP3"          : [ LVPS_AI, type_float],
+                    "EXT_TEMP1"           : [ LVPS_AI, type_float]}
+
+    vars_HV = {}
+    for i in xrange(48):
+        i = str(i+1)
+        vars_HV["hvOut"+i] = [ VARS_HV, type_float ]
+    for i in xrange(4):
+        i = str(i+1)
+        vars_HV["hvIn"+i]  = [ VARS_HV, type_float ]
+    for i in xrange(7):
+        i = str(i+1)
+        vars_HV["volt"+i]  = [ VARS_HV, type_float ]
+        vars_HV["temp"+i]  = [ VARS_HV, type_float ]
+
+    vars_HVSET = {}
+    for i in xrange(48):
+        i = str(i+1)
+        vars_HVSET["Set.hvOut"+i] = [ VARS_HVSET, type_float ]
+    for i in xrange(4):
+        i = str(i+1)
+        vars_HVSET["Set.hvIn"+i]  = [ VARS_HVSET, type_float ]
+    for i in xrange(7):
+        i = str(i+1)
+        vars_HVSET["Set.volt"+i]  = [ VARS_HVSET, type_float ]
+        vars_HVSET["Set.temp"+i]  = [ VARS_HVSET, type_float ]
+    #for i in xrange(2):
+    #    i = str(i+1)
+    #    vars_HVSET["Set.vFix1"+i]  = [ VARS_HVSET, type_float ]
+
+    vars_DAQ = {}
+    vars_DAQ["STATE"] = [ VARS_DAQ, type_int]
+
+    systemID = { "LBA" : 88 ,
+                 "LBC" : 87 ,
+                 "EBA" : 86 ,
+                 "EBC" : 89 ,
+                 "SCS" : 80 }
+
+    partitionID = { 0 : "EBA",
+                    1 : "LBA",
+                    2 : "LBC",
+                    3 : "EBC"}
+
+    def __init__( self, dbstring=None ):
+
+        self.vars = {}
+        for var, info in self.vars_LVPS_AI.iteritems():
+            self.vars[var] = info
+        for var, info in self.vars_LVPS_STATES.iteritems():
+            self.vars[var] = info
+        for var, info in self.vars_HV.iteritems():
+            self.vars[var] = info
+        for var, info in self.vars_HVSET.iteritems():
+            self.vars[var] = info
+        for var, info in self.vars_DAQ.iteritems():
+            self.vars[var] = info
+
+        self.folderDrawer_to_channel = {}
+        self.folderChannel_to_drawer = {}
+        self.folderDrawer_to_oracleId  = {}
+
+        filename=self.find_data_file("cool_channel_id.dat")
+        lines = open(filename,"r").readlines()
+        for line in lines:
+                line = line.strip()
+                folder, drawer, channel, oracleId = line.split()
+
+                keyFolderDrawer = ( folder , drawer)
+                if keyFolderDrawer in self.folderDrawer_to_channel:
+                    raise "trying to generate key twice: ", keyFolderDrawer
+                self.folderDrawer_to_channel[ keyFolderDrawer] = int(channel)
+                self.folderDrawer_to_oracleId[keyFolderDrawer] = oracleId
+
+                keyFolderChannel = ( folder , int(channel))
+                if keyFolderChannel in self.folderChannel_to_drawer:
+                    raise "trying to generate key twice: ", keyFolderChannel
+                self.folderChannel_to_drawer[keyFolderChannel] = drawer
+
+        self.dbstring = {"DEFAULT":[],"COOL":[],"ORACLE":[],"TESTBEAM":[]}
+        self.dbstring['DEFAULT'] += [dbstring]*3
+        dbstring = "oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_DCS;dbname=COMP200;"
+        dbstring+= "user=ATLAS_COOL_READER;password=COOLRED4PRO"
+        self.dbstring['COOL'] += [None]
+        self.dbstring['COOL'] += [dbstring]
+        self.dbstring['COOL'] += [dbstring.replace("COMP200","CONDBR2")]
+        self.dbstring['ORACLE'] += [["oracle://localhost/ATONR_PVSSPROD","ATLAS_PVSS_READER","PVSSRED4PRO"]]
+        self.dbstring['ORACLE'] += [["oracle://localhost/ATLAS_PVSSPROD","ATLAS_PVSS_READER","PVSSRED4PRO"]]
+        self.dbstring['ORACLE'] += [["oracle://localhost/ATONR_ADG","ATLAS_PVSS_READER","PVSSRED4PRO"]]
+        self.dbstring['TESTBEAM'] += [["oracle://localhost/INTR","ATLAS_PVSS_READER","PVSSRED4INT"]]*3
+
+
+    def get_dbstring(self, key, ind=2):
+        return self.dbstring[key][ind] if key in self.dbstring and len(self.dbstring[key])>ind else None
+
+    def get_channel(self, folder, drawer):
+
+        if not self.check_drawer_syntax(drawer):
+            raise "ERROR: drawer not valid: ", drawer
+        key = (folder, drawer )
+        if key not in self.folderDrawer_to_channel:
+            print "get_channel WARNING, can not resolve key: ", key
+            return None
+        return self.folderDrawer_to_channel[key]
+
+    def get_drawer(self, folder, channel):
+
+        key = (folder, channel)
+        if key not in self.folderChannel_to_drawer:
+            print "get_drawer WARNING, can not resolve key: ", key
+            return None
+        return self.folderChannel_to_drawer[key]
+
+
+    def get_folder_and_channel(self, variable, drawer):
+        """
+        For a given DCS variable and drawer, return the complete COOL
+        folder name and the channel number associated to the drawer
+        """
+        if variable not in self.vars:
+            raise "Variable not known: ", variable
+        partition = drawer[0:3]
+
+        folderDef = self.vars[variable][0]
+        #=== for STATE, we have only one "drawer" per partition
+        if variable=="STATE":
+            drawer = partition+"XX"
+            folder = folderDef[0]+partition+folderDef[1]
+        else:
+            folder = folderDef[0]+folderDef[1]
+        key = (folder, drawer)
+        if key not in self.folderDrawer_to_channel:
+            print "WARNING, can not resolve key: ", key
+            return None
+        channel = self.folderDrawer_to_channel[key]
+        return (folder, channel)
+
+    def get_variable_type(self, variable):
+        """
+        Returns the type of a variable
+        """
+        if variable not in self.vars:
+            raise "Variable not known: ", variable
+        return self.vars[variable][1]
+
+    def get_all_variables(self):
+        return self.vars.keys()
+
+    def check_drawer_syntax(self, drawer):
+        partition = drawer[0:3]
+        drawerNum = int(drawer[3:5])
+        valid = ("LBA" , "LBC", "EBA", "EBC")
+        if partition not in valid:
+            return False
+        if drawerNum<1 or drawerNum>64:
+            return False
+        return True
+
+    def get_variables_by_folder(self, variables, drawer):
+        """
+        Return a dictionary listing all folders that need to be
+        accessed as keys and all variables associated to the key folder
+        as values.
+        """
+        folderDict = {}
+        for var in variables:
+            if var not in self.vars:
+                print "Unknown variable, IGNORING IT: ", var
+            else:
+                folder, channel = self.get_folder_and_channel(var,drawer)
+                if folder not in folderDict:
+                    folderDict[folder] = [var]
+                else:
+                    folderDict[folder].extend([var])
+        return folderDict
+
+    def find_data_file(self, fname, pathlist=None, access=os.R_OK):
+        """the python equivalent to the C++ PathResolver for datafiles.
+        """
+
+        if pathlist is None:
+            pathlist = os.getenv('DATAPATH').split(os.pathsep)
+
+        for path in pathlist:
+            f = os.path.join( path, fname )
+            if os.access( f, access ):
+                return f
diff --git a/TileCalorimeter/TileCoolDcs/python/__init__.py b/TileCalorimeter/TileCoolDcs/python/__init__.py
new file mode 100755
index 0000000000000000000000000000000000000000..36af10244e73a475759c651eeffdcaf32b0b30be
--- /dev/null
+++ b/TileCalorimeter/TileCoolDcs/python/__init__.py
@@ -0,0 +1,5 @@
+# File TileCoolDcs/python/__init__.py
+# Author: nils.gollub@cern.ch
+
+__author__="Nils Gollub"
+__all__= ["TileDCSDataGrabber","TileDCSDataInfo","ProgressBar"]
diff --git a/TileCalorimeter/TileCoolDcs/share/TileDCSDataPlotter.py b/TileCalorimeter/TileCoolDcs/share/TileDCSDataPlotter.py
new file mode 100755
index 0000000000000000000000000000000000000000..736bc91918053d5eae6ca49c8c15c7d53f58d50c
--- /dev/null
+++ b/TileCalorimeter/TileCoolDcs/share/TileDCSDataPlotter.py
@@ -0,0 +1,762 @@
+#!/bin/env python
+# Author: nils.gollub@cern.ch
+
+import sys, os
+import time
+import ROOT
+import logging
+from ROOT import TCanvas, TH1D, TH2D, TGraph, TArrayD
+from TileCoolDcs import TileDCSDataGrabber
+from TileCoolDcs import ProgressBar
+
+
+class TileDCSDataPlotter:
+
+    #_______________________________________________________________________________________
+    def __init__( self, argv, useCool, useTestBeam, verbose, dbstring=None, putDuplicates=False ):
+
+        dbSource = "ORACLE"
+        self.useCool = useCool
+        if useCool:
+            dbSource = "COOL"
+        self.useTestBeam = useTestBeam
+        if useTestBeam:
+            dbSource = "TESTBEAM"
+        logLvl = logging.WARNING
+        if verbose:
+            logLvl = logging.DEBUG
+
+#        self.dataGrabber = TileDCSDataGrabber.TileDCSDataGrabber(dbSource, logLvl, dbstring, putDuplicates)
+#        self.info = self.dataGrabber.info
+
+        self.cmd     = argv[1]
+        self.drawer  = argv[2]
+        self.varExp  = argv[3]
+        beg          = argv[4]
+        end          = argv[5]
+        self.iovBeg  = int(time.mktime(time.strptime(beg,"%Y-%m-%d %H:%M:%S")))
+        self.iovEnd  = int(time.mktime(time.strptime(end,"%Y-%m-%d %H:%M:%S")))
+
+        self.dataGrabber = TileDCSDataGrabber.TileDCSDataGrabber(dbSource, logLvl, dbstring, putDuplicates, self.iovBeg)
+        self.info = self.dataGrabber.info
+
+        self.cutExp  = ""
+        if len(argv) >6:
+            self.cutExp = argv[6]
+        beg = beg.replace(' ','_')
+        end = end.replace(' ','_')
+        self.outName   = self.drawer+"_"+self.varExp+"__"+beg+"__"+end
+        self.outName   = self.outName.replace('/',':')
+        self.outName   = self.outName.replace('(','0')
+        self.outName   = self.outName.replace(')','0')
+        print "---> OUTNAME: " , self.outName
+        if len(argv) >7:
+            self.outName = argv[7]
+
+        timeBegInfo = time.localtime(self.iovBeg);
+        timeEndInfo = time.localtime(self.iovEnd);
+        self.rangeStr = "FROM: "+time.asctime(timeBegInfo)+"  UNTIL: "+time.asctime(timeEndInfo)
+
+        part=["LBA","LBC","EBA","EBC"]
+        if self.drawer == "ALL":
+            self.drawer=""
+            for p in xrange(4):
+                for m in xrange(64):
+                    self.drawer+="%s%2.2d," % (part[p],m+1)
+            self.drawer=self.drawer[:-1]
+        elif self.drawer in part:
+            p=self.drawer
+            self.drawer=""
+            for m in xrange(64):
+                self.drawer+="%s%2.2d," % (p,m+1)
+            self.drawer=self.drawer[:-1]
+
+
+    #_______________________________________________________________________________________
+    def parseVarExpression(self, varExpression):
+
+        knownVars = self.info.get_all_variables()
+        varDict = {}
+        for var in knownVars:
+            pos = varExpression.find(var)
+            if pos>-1:
+                if pos in varDict:
+                    #=== other variable found at same place?
+                    #=== -> choose the longer one
+                    oldVar = varDict[pos]
+                    if len(oldVar) > len(var):
+                        var = oldVar
+                varDict[pos] = var
+
+        #=== check for overlap
+        positions = sorted(varDict.keys())
+        posLength = len(positions)
+        if posLength > 1:
+            iPos = 1
+            while iPos < posLength:
+                if positions[iPos] < positions[iPos-1]+len(varDict[positions[iPos-1]]):
+                    varDict.pop(positions[iPos])
+                    positions.pop(iPos)
+                    posLength=len(positions)
+                else:
+                    iPos+=1
+
+        varList = varDict.values()
+        if "ALL_LVPS_AI" in varExpression:
+            varList.extend(self.info.vars_LVPS_AI.keys())
+        if "ALL_LVPS_STATES" in varExpression:
+            varList.extend(self.info.vars_LVPS_STATES.keys())
+        if "ALL_HVSET" in varExpression or "ALL_SETHV" in varExpression:
+            varList.extend(self.info.vars_HVSET.keys())
+            if self.useCool:
+                for i in xrange(2):
+                    varList.remove("Set.vFix1%d" % (i+1))
+                for i in xrange(4):
+                    varList.remove("Set.hvIn%d" % (i+1))
+                for i in xrange(7):
+                    varList.remove("Set.volt%d" % (i+1))
+                for i in xrange(7):
+                    varList.remove("Set.temp%d" % (i+1))
+        if "ALL_HV" in varExpression and not "ALL_HVSET" in varExpression:
+            varList.extend(self.info.vars_HV.keys())
+            if self.useCool:
+                for i in xrange(4):
+                    varList.remove("hvIn%d" % (i+1))
+                for i in xrange(7):
+                    varList.remove("volt%d" % (i+1))
+                for i in xrange(7):
+                    varList.remove("temp%d" % (i+1))
+
+        return list(set(varList))
+
+
+    #_______________________________________________________________________________________
+    def getTree(self, drawer=None, var=None,lastOnly=False,firstAndLast=False):
+
+        #=== parse for variables needed
+        varList = self.parseVarExpression(self.varExp+self.cutExp)
+
+        #=== get the variable
+        if drawer is None:
+            t = self.dataGrabber.getDCSTree(self.iovBeg, self.iovEnd, self.drawer.split(","), varList, lastOnly, firstAndLast)
+        elif var is None:
+            drl=[drawer]
+            t = self.dataGrabber.getDCSTree(self.iovBeg, self.iovEnd, drl, varList, lastOnly, firstAndLast)
+        else:
+            drl=[drawer]
+            varl=[var]
+            t = self.dataGrabber.getDCSTree(self.iovBeg, self.iovEnd, drl, varl, lastOnly, firstAndLast)
+
+        if t.GetEntries()==0:
+            print "ERROR: No data in time intervall!"
+            sys.exit(1)
+        else:
+            print "Found number of entries: ", t.GetEntries()
+
+        #=== append drawer to all variables
+        if self.cmd!="tree" and drawer is None and var is None:
+            for var in varList:
+                if "," in self.drawer:
+                    newvar=""
+                    newcut=""
+                    if var in self.cutExp: cut=self.cutExp
+                    else: cut=None
+                    for dr in self.drawer.split(","):
+                        newvar += dr+"."+var+","
+                        if cut: newcut += dr+"."+cut+","
+                    self.varExp = self.varExp.replace(var,newvar[:-1])
+                    if cut: self.cutExp = newcut[:-1]
+                    self.varExp = self.varExp.replace("Set."+newvar[:-1],"Set."+var)
+                    if cut and "Set." in cut and not "Set." in var: self.cutExp=cut
+                else:
+                    self.varExp = self.varExp.replace(var,self.drawer+"."+var)
+                    self.cutExp = self.cutExp.replace(var,self.drawer+"."+var)
+                    self.varExp = self.varExp.replace("Set."+self.drawer,"Set")
+                    self.cutExp = self.cutExp.replace("Set."+self.drawer,"Set")
+                    self.varExp = self.varExp.replace(self.drawer+"."+self.drawer,self.drawer)
+                    self.cutExp = self.cutExp.replace(self.drawer+"."+self.drawer,self.drawer)
+            if "ALL_LVPS_AI" in self.varExp:
+                newvar=""
+                for dr in self.drawer.split(","):
+                    for var in self.info.vars_LVPS_AI.keys():
+                        newvar += dr+"."+var+","
+                self.varExp = self.varExp.replace("ALL_LVPS_AI",newvar[:-1])
+
+            if "ALL_LVPS_STATES" in self.varExp:
+                newvar=""
+                for dr in self.drawer.split(","):
+                    for var in self.info.vars_LVPS_STATES.keys():
+                        newvar += dr+"."+var+","
+                self.varExp = self.varExp.replace("ALL_LVPS_STATES",newvar[:-1])
+
+            if "ALL_HVSET" in self.varExp or "ALL_SETHV" in self.varExp:
+                newvar=""
+                for dr in self.drawer.split(","):
+                    for var in self.info.vars_HVSET.keys():
+                        if not self.useCool or not ("Set.vFix" in var or "Set.hvIn" in var or "Set.volt" in var or "Set.temp" in var):
+                            newvar += dr+"."+var+","
+                self.varExp = self.varExp.replace("ALL_HVSET",newvar[:-1])
+                self.varExp = self.varExp.replace("ALL_SETHV",newvar[:-1])
+            if "ALL_HV" in self.varExp and not "ALL_HVSET" in self.varExp :
+                newvar=""
+                for dr in self.drawer.split(","):
+                    for var in self.info.vars_HV.keys():
+                        if not self.useCool or not ("hvIn" in var or "volt" in var or "temp" in var):
+                            newvar += dr+"."+var+","
+                self.varExp = self.varExp.replace("ALL_HV",newvar[:-1])
+
+            print "self.drawer: ", self.drawer
+            print "self.varExp: ", self.varExp
+            print "self.cutExp: ", self.cutExp
+
+        return t
+
+
+    #_______________________________________________________________________________________
+    def getTimelinePlot(self):
+        """
+        Returns a TCanvas with the variable plotted vs time.
+
+        """
+
+        ROOT.gStyle.SetOptStat(0)
+        t = self.getTree()
+
+        if t.GetEntries()==1:
+            print "ERROR: Only one data point, need at least 2"
+            print "---> Try increasing the time span"
+            sys.exit(1)
+
+        #=== extract the values
+        hh=[]
+        ih=0
+        hmin=1000000000
+        hmax=-1000000000
+        color = [2,4,3,5,6,7]
+        for var in self.varExp.split(","):
+          cut=self.cutExp
+          cut = cut.replace("ALL_SETHV",var)
+          cut = cut.replace("ALL_HVSET",var)
+          cut = cut.replace("ALL_HV",var)
+          cut = cut.replace("ALL",var)
+          #print var
+          #print cut
+          t.Draw(var+":EvTime",cut,"goff");
+          n = t.GetSelectedRows()
+          #print "n=",n
+          if n>0:
+            x = t.GetV2()
+            y = t.GetV1()
+
+            #=== fix for **** root time convention and add end time
+            offset = 788918400 # = 1.1.1995(UTC), the root offset
+            xarr = TArrayD(n+1)
+            for i in xrange(n):
+                xarr[i] = x[i]-offset
+            xarr[n] = self.iovEnd-offset
+
+            #=== create and fill histogram with values
+            title = self.rangeStr+";;"+self.varExp
+            h = TH1D("hDCS"+str(ih),title,n,xarr.GetArray())
+            for i in xrange(n):
+                center = h.GetBinCenter(i+1)
+                h.Fill(center,y[i])
+                if y[i]>hmax: hmax=y[i]
+                if y[i]<hmin: hmin=y[i]
+
+            #=== set time display
+            sec_min = 60
+            sec_hrs = sec_min*60
+            sec_day = sec_hrs*24
+            sec_mon = sec_day*30
+            timeDiff = self.iovEnd-self.iovBeg
+            h.GetXaxis().SetTimeFormat("%S")
+            h.SetXTitle("time [seconds]")
+            if timeDiff > 2*sec_mon:
+                h.GetXaxis().SetTimeFormat("%m")
+                h.SetXTitle("time [month]")
+            elif timeDiff > 2*sec_day:
+                h.GetXaxis().SetTimeFormat("%d(%H)")
+                h.SetXTitle("time [day(hour)]")
+            elif timeDiff > 2*sec_hrs:
+                h.GetXaxis().SetTimeFormat("%H:%M")
+                h.SetXTitle("time [hour:min]")
+            elif   timeDiff > 2*sec_min:
+                h.GetXaxis().SetTimeFormat("%M")
+                h.SetXTitle("time [min]")
+            h.GetXaxis().SetTimeDisplay(1)
+            h.SetLineColor(color[ih%len(color)])
+
+            ih+=1
+            hh+=[h]
+
+        if len(hh)>1:
+            delta=(hmax-hmin)/20.
+            if delta<=0: delta=0.5
+            hmin-=delta
+            hmax+=delta
+            for h in hh:
+                h.SetMaximum(hmax)
+                h.SetMinimum(hmin)
+
+        return hh
+
+
+    #_______________________________________________________________________________________
+    def getDiffPlot(self,opt):
+        """
+        Returns a TCanvas with 2D plot showing difference between last and first entries.
+
+        """
+
+        ROOT.gStyle.SetOptStat(0)
+        tree = self.getTree(firstAndLast=(opt==1))
+
+        if tree.GetEntries()==1:
+            print "ERROR: Only one data point, need at least 2"
+            print "---> Try increasing the time span"
+            sys.exit(1)
+
+        if len(self.cutExp) and not "ALL" in self.cutExp:
+            print "Cut expression is ignored in diff plot"
+
+        #=== extract the values
+        leaves=tree.GetListOfLeaves()
+        xaxis=[]
+        yaxis=[]
+        for leaf in leaves:
+          z=leaf.GetTitle().split('.')
+          if len(z)==2 or (len(z)==3 and z[1]=="Set"):
+            x=z[0]
+            y=z[1]
+            if len(z)==3: y+= "."+z[2]
+            if not y[-2].isdigit() and y[-1].isdigit():
+              y=y[:-2]+'0'+y[-1]
+            if not x in xaxis: xaxis+=[x]
+            if not y in yaxis: yaxis+=[y]
+        xaxis.sort()
+        yaxis.sort()
+        nx=len(xaxis)
+        ny=len(yaxis)
+        if opt==1: pref="Diff "
+        elif opt==2: pref="Diff_Prof "
+        elif opt==3: pref="Prof "
+        else: pref=""
+        if opt==1: hist=ROOT.TH2F("hist2D",pref+self.outName,nx,-0.5,nx-0.5,ny,-0.5,ny-0.5)
+        else:      hist=ROOT.TProfile2D("hist2D",pref+self.outName,nx,-0.5,nx-0.5,ny,-0.5,ny-0.5)
+
+        XA=hist.GetXaxis()
+        n=0
+        for i in xrange(nx):
+          if n: XA.SetBinLabel(i + 1, '')
+          else: XA.SetBinLabel(i + 1, xaxis[i])
+          n=1-n
+
+        YA=hist.GetYaxis()
+        for i in xrange(ny):
+          YA.SetBinLabel(i + 1, yaxis[i])
+
+        tree.GetEntry(0)
+        val = {}
+        for leaf in leaves:
+          if opt>2:
+            val[leaf.GetTitle()] = 0
+          else:
+            val[leaf.GetTitle()] = leaf.GetValue()
+
+        ne=tree.GetEntries()
+        if opt==1:
+            n1=ne-1
+        elif opt==2:
+            n1=1
+        else:
+            n1=0
+        bar = ProgressBar.progressBar(n1,ne, 78)
+        for n in xrange(n1,ne):
+          tree.GetEntry(n)
+          bar.update(n)
+          for leaf in leaves:
+            v1=val[leaf.GetTitle()]
+            z=leaf.GetTitle().split('.')
+            if len(z)==2 or (len(z)==3 and z[1]=="Set"):
+              x=z[0]
+              y=z[1]
+              if len(z)==3: y+= "."+z[2]
+              if not y[-2].isdigit() and y[-1].isdigit():
+                y=y[:-2]+'0'+y[-1]
+              v2=leaf.GetValue()
+              if "ALL" in self.cutExp:
+                  var=str(v2)
+                  vardiff=str(v2-v1)
+                  cut=self.cutExp
+                  cut = cut.replace("ALL_DIFF",vardiff)
+                  cut = cut.replace("ALL_SETHV",var)
+                  cut = cut.replace("ALL_HVSET",var)
+                  cut = cut.replace("ALL_HV",var)
+                  cut = cut.replace("ALL",var)
+                  ok = eval(cut)
+                  #print cut
+                  #print ok
+              else:
+                  ok = True
+              if ok:
+                  hist.Fill(xaxis.index(x),yaxis.index(y),v2-v1)
+        bar.done()
+
+        return hist
+
+
+    #_______________________________________________________________________________________
+    def getDistributionPlot(self):
+        """
+        Returns a TCanvas with the variable distribution plotted (using weights)
+
+        """
+
+        t = self.getTree()
+
+        hh=[]
+        ih=0
+        color = [2,4,3,5,6,7]
+        xmin=1000000000
+        xmax=-1000000000
+        ymin=1000000000
+        ymax=-1000000000
+        hmin=1000000000
+        hmax=-1000000000
+        dim=0
+        xtit=""
+        ytit=""
+        for var in sorted(self.varExp.split(",")):
+            cut=self.cutExp
+            dim = var.count(':')
+            if dim>0:
+                varX = var.split(":")[1]
+                varY = var.split(":")[0]
+                if len(cut):
+                    cutY = cut
+                    cut = cut.replace("ALL_SETHV",varX)
+                    cut = cut.replace("ALL_HVSET",varX)
+                    cut = cut.replace("ALL_HV",varX)
+                    cut = cut.replace("ALL",varX)
+                    cutY = cutY.replace("ALL_SETHV",varY)
+                    cutY = cutY.replace("ALL_HVSET",varY)
+                    cutY = cutY.replace("ALL_HV",varY)
+                    cutY = cutY.replace("ALL",varY)
+                    cut = "("+cut+") && ("+cutY+")"
+            else:
+                varX=var
+                varY=""
+                if len(cut):
+                    cut = cut.replace("ALL_SETHV",varX)
+                    cut = cut.replace("ALL_HVSET",varX)
+                    cut = cut.replace("ALL_HV",varX)
+                    cut = cut.replace("ALL",varX)
+            if cut!="":
+                cut = "weight*("+cut+")"
+            else:
+                cut = "weight"
+            #print var
+            #print cut
+
+            t.Draw(var,cut,"goff");
+            h = ROOT.gDirectory.Get("htemp")
+            h.SetXTitle(var.split(":")[0])
+            h.SetTitle(self.rangeStr)
+            h.SetName("TileDCSDataPlotter"+str(ih))
+            #print "n=",h.GetEntries()
+
+            if h.GetEntries()>0:
+                xmi = h.GetXaxis().GetBinLowEdge(1)
+                xma = h.GetXaxis().GetBinLowEdge(h.GetNbinsX())+h.GetXaxis().GetBinWidth(h.GetNbinsX())
+                if xmi<xmin: xmin=xmi
+                if xma>xmax: xmax=xma
+                if dim>0:
+                    ymi = h.GetYaxis().GetBinLowEdge(1)
+                    yma = h.GetYaxis().GetBinLowEdge(h.GetNbinsY())+h.GetYaxis().GetBinWidth(h.GetNbinsY())
+                    if ymi<ymin: ymin=ymi
+                    if yma>ymax: ymax=yma
+                hmi = h.GetMinimum()
+                hma = h.GetMaximum()
+                if hmi<hmin: hmin=hmi
+                if hma>hmax: hmax=hma
+                xtit+=varX+","
+                if dim>0: ytit+=varY+","
+
+            h.SetLineColor(color[ih%len(color)])
+            h.SetMarkerColor(color[ih%len(color)])
+
+            ih+=1
+            hh+=[h]
+
+        if len(hh)>1:
+            if xmin>xmax:
+                xmin=0
+                xmax=0
+            delta=(xmax-xmin)/20.
+            if delta<=0: delta=0.5
+            xmin-=delta
+            xmax+=delta
+            if ymin>ymax:
+                ymin=0
+                ymax=0
+            delta=(ymax-ymin)/20.
+            if delta<=0: delta=0.5
+            ymin-=delta
+            ymax+=delta
+            if hmin>hmax:
+                hmin=0
+                hmax=1
+            delta=(hmax-hmin)/20.
+            if delta<=0: delta=0.5
+            if hmin!=0: hmin-=delta
+            hmax+=delta
+            if dim>0:
+                h0 = TH2D("hDCS","dummy",2,xmin,xmax,2,ymin,ymax)
+                h0.SetYTitle(ytit[:-1])
+            else:
+                h0 = TH1D("hDCS","dummy",2,xmin,xmax)
+            h0.SetXTitle(xtit[:-1])
+            h0.SetTitle(self.rangeStr)
+            h0.SetMaximum(hmax)
+            if hmin!=0: h0.SetMinimum(hmin)
+            hh=[h0]+hh
+            ROOT.gStyle.SetOptStat(0)
+
+        return hh
+
+
+    #_______________________________________________________________________________________
+    def printDistributionStatAll(self):
+        """
+        Print mean values from histograms
+
+        """
+
+        t = self.getTree()
+        if self.cutExp!="":
+            for v, c in zip(self.varExp.split(","), self.cutExp.split(",")):
+                t.Draw(v,c,"goff");
+                h = ROOT.gDirectory.Get("htemp")
+
+                print "%s  %s  %s  Nentries %d  Mean %7.3f  RMS %8.4f" % \
+                    (v,c,self.rangeStr,h.GetEntries(),h.GetMean(),h.GetRMS())
+        else:
+            cut = ""
+            for v in self.varExp.split(","):
+                t.Draw(v,cut,"goff");
+                h = ROOT.gDirectory.Get("htemp")
+                print "%s  %s  Nentries %d  Mean %7.3f  RMS %8.4f" % \
+                    (v,self.rangeStr,h.GetEntries(),h.GetMean(),h.GetRMS())
+
+        return 0
+
+
+    #_______________________________________________________________________________________
+    def printDistributionStat(self, lastOnly=False):
+        """
+        Print mean values from histograms
+
+        """
+
+        if "ALL_LVPS_AI" in self.varExp:
+            self.varExp = self.varExp.replace("ALL_LVPS_AI",",".join(sorted(self.info.vars_LVPS_AI.keys())))
+        if "ALL_LVPS_STATES" in self.varExp:
+            self.varExp = self.varExp.replace("ALL_LVPS_STATES",",".join(sorted(self.info.vars_LVPS_STATES.keys())))
+        if "ALL_HVSET" in self.varExp or "ALL_SETHV" in self.varExp:
+            vlist = self.info.vars_HVSET.keys()
+            if self.useCool:
+                for i in xrange(2):
+                    vlist.remove("Set.vFix1%d" % (i+1))
+                for i in xrange(4):
+                    vlist.remove("Set.hvIn%d" % (i+1))
+                for i in xrange(7):
+                    vlist.remove("Set.volt%d" % (i+1))
+                for i in xrange(7):
+                    vlist.remove("Set.temp%d" % (i+1))
+            self.varExp = self.varExp.replace("ALL_HVSET",",".join(sorted(vlist)))
+            self.varExp = self.varExp.replace("ALL_SETHV",",".join(sorted(vlist)))
+        if "ALL_HV" in self.varExp and not "ALL_HVSET" in self.varExp:
+            vlist = self.info.vars_HV.keys()
+            if self.useCool:
+                for i in xrange(4):
+                    vlist.remove("hvIn%d" % (i+1))
+                for i in xrange(7):
+                    vlist.remove("volt%d" % (i+1))
+                for i in xrange(7):
+                    vlist.remove("temp%d" % (i+1))
+            self.varExp = self.varExp.replace("ALL_HV",",".join(sorted(vlist)))
+        print self.varExp
+
+        reslist=[]
+        cutlist = self.parseVarExpression(self.cutExp)
+        print cutlist
+        t = None
+        drlistprev=[]
+        varlistprev=[]
+        for drawer in self.drawer.split(","):
+            drlist=[drawer]
+            for v in self.varExp.split(","):
+                varlist=self.parseVarExpression(v)
+                varlist += cutlist
+                varlist=sorted(list(set(varlist)))
+                #for drawer in self.drawer.split(","):
+                #    drlist=[drawer]
+                if not (t and drlist==drlistprev and varlist==varlistprev):
+                    t = self.dataGrabber.getDCSTree(self.iovBeg, self.iovEnd, drlist, varlist, lastOnly)
+                    drlistprev=drlist
+                    varlistprev=varlist
+                if t and t.GetEntries()>0:
+                    var=v
+                    cut=self.cutExp
+                    cut = cut.replace("ALL_SETHV",var)
+                    cut = cut.replace("ALL_HVSET",var)
+                    cut = cut.replace("ALL_HV",var)
+                    cut = cut.replace("ALL",var)
+                    for va in varlist:
+                        var = var.replace(va,drawer+"."+va)
+                        cut = cut.replace(va,drawer+"."+va)
+                    var = var.replace("Set."+drawer,"Set")
+                    cut = cut.replace("Set."+drawer,"Set")
+                    var = var.replace(drawer+"."+drawer,drawer)
+                    cut = cut.replace(drawer+"."+drawer,drawer)
+                    print "var is",var
+                    print "cut is",cut
+                    t.Draw(var,cut,"goff");
+                    h = ROOT.gDirectory.Get("htemp")
+                    if h:
+                        if cut!="":
+                            reslist.append((var+" CUT "+cut,self.rangeStr,h.GetEntries(),h.GetMean(),h.GetRMS()))
+                        else:
+                            reslist.append((var,self.rangeStr,h.GetEntries(),h.GetMean(),h.GetRMS()))
+                    else:
+                        reslist.append((var,self.rangeStr,-1,0.0,0.0))
+
+        if lastOnly:
+            for res in reslist:
+                print "%-25s  %s        Last %-9.3f" % (res[0],res[1],res[3])
+        else:
+            for res in reslist:
+                print "%-25s  %s        Nentries %-7d  Mean %-9.3f  RMS %-9.4f" % res
+        return 0
+
+
+#================================================================================================
+
+
+#==== interactive use
+callName = os.path.basename(sys.argv[0])
+if callName=="TileDCSDataPlotter.py":
+
+    #=== check if we are in batch mode
+    batch = False
+    if "-b" in sys.argv:
+        batch=True
+        sys.argv.remove("-b")
+
+
+    #=== check if we are in Oracle mode
+    useCool = False
+    if "--cool" in sys.argv:
+        useCool=True
+        sys.argv.remove("--cool")
+
+    #=== check if we are in Oracle mode
+    useTestBeam = False
+    if "--testbeam" in sys.argv:
+        useTestBeam=True
+        sys.argv.remove("--testbeam")
+
+
+    #=== check if we are in verbose mode
+    verbose = False
+    if "-v" in sys.argv:
+        verbose=True
+        sys.argv.remove("-v")
+
+    #=== catch invalid commands
+    cmd = sys.argv[1]
+    if not(cmd=="plot" or cmd=="diff" or cmd=="diffprof" or cmd=="prof" or cmd=="dist" or cmd=="tree"  or cmd=="mean"  or cmd=="last"):
+        print """ Please use one of the following commands: plot, diff, dist, tree, mean, last !"""
+        sys.exit(1)
+
+    #=== command is recognized, we go on....
+    ROOT.gROOT.SetBatch()
+    dp = TileDCSDataPlotter(sys.argv, useCool, useTestBeam, verbose, putDuplicates=(cmd =="mean" or cmd =="dist"))
+
+    #=== no graphics if only get tree
+    if cmd == "tree":
+        t = dp.getTree()
+        f = ROOT.TFile(dp.outName+".root", "recreate")
+        t.Write()
+        f.Close()
+
+    #=== distribution plot (using weights)
+    elif cmd =="mean":
+        dp.printDistributionStat()
+    elif cmd =="last":
+        dp.printDistributionStat(True)
+
+    else:
+        #=== graphics output below -> configure style and canvas
+        ROOT.gROOT.SetStyle("Plain")
+        ROOT.gROOT.ForceStyle()
+        if cmd =="diff" or cmd=="diffprof" or cmd=="prof":
+            can = TCanvas("c_TileDCSDataPlotter","c_TileDCSDataPlotter",0,0,1200,900)
+        else:
+            can = TCanvas("c_TileDCSDataPlotter","c_TileDCSDataPlotter")
+
+        #=== simple timeline plot
+        if cmd =="plot":
+            hh = dp.getTimelinePlot()
+            can.SetGridx()
+            can.SetGridy()
+            opt="HIST"
+            for h in hh:
+                h.Draw(opt)
+                opt="HISTSAME"
+
+        #=== simple diff plot
+        if cmd =="diff":
+            h = dp.getDiffPlot(1)
+            h.Draw('COLZ')
+
+        #=== simple diff profile plot
+        if cmd =="diffprof":
+            h = dp.getDiffPlot(2)
+            h.Draw('COLZ')
+
+        #=== simple diff profile plot
+        if cmd =="prof":
+            h = dp.getDiffPlot(3)
+            h.Draw('COLZ')
+
+        #=== distribution plot (using weights)
+        elif cmd =="dist":
+            hh = dp.getDistributionPlot()
+            if len(hh)>0:
+                dim = dp.varExp.split(',')[0].count(':')
+                opt=""
+                pr=(len(hh)==1)
+                for h in hh:
+                    if dim==0:
+                        h.Draw("EHIST"+opt)
+                        if pr:
+                            print "%s  %s  Nentries %d  Mean %7.3f  RMS %8.4f" % \
+                                (h.GetXaxis().GetTitle(),h.GetTitle(),h.GetEntries(),h.GetMean(),h.GetRMS())
+                        else:
+                            pr=True
+                    elif dim==1:
+                        print "2D plot, opt ",opt
+                        h.Draw("BOX"+opt)
+                    else:
+                        h.Draw(opt)
+                    opt="SAME"
+
+        #=== save output in eps and png
+        can.Print(dp.outName+"_"+cmd+".eps")
+        can.Print(dp.outName+"_"+cmd+".png")
+
+        #=== display plot
+        if not batch:
+            os.system("display "+dp.outName+"_"+cmd+".png")
diff --git a/TileCalorimeter/TileCoolDcs/share/checkCoolLatestUpdate.py b/TileCalorimeter/TileCoolDcs/share/checkCoolLatestUpdate.py
new file mode 100755
index 0000000000000000000000000000000000000000..1fee4b4a07dcaeb1e9e4545a114f091fa0169cf8
--- /dev/null
+++ b/TileCalorimeter/TileCoolDcs/share/checkCoolLatestUpdate.py
@@ -0,0 +1,26 @@
+#!/bin/env python
+import time
+from TileCoolDcs.TileDCSDataGrabber import TileDCSDataGrabber
+
+dg = TileDCSDataGrabber()
+
+
+partitions = ["LBA", "LBC","EBA", "EBC"]
+variables  = ["FORDAQ_MBHV", "hvOut10"]
+
+#=== ask for one day in the future to be sure
+now = int(time.time()) + 60*60*24
+
+
+print "\n\n   ====    SUMMARY OF LAST FOLDER/CHANNEL UPDATES   ======\n\n"
+
+
+for var in variables:
+    for part in partitions:
+        for num in xrange(1,65):
+            strNum = ("0"+str(num))[-2:]
+            drawer = part+strNum
+            folder, chanNum = dg.info.get_folder_and_channel(var, drawer)
+            iovSince = dg.getEntry(drawer, var, now)[1]
+            print folder, drawer," (",chanNum,")", " ---> ", time.ctime(iovSince/dg.unix2cool)," (",iovSince,")"
+
diff --git a/TileCalorimeter/TileCoolDcs/share/cool_channel_id.dat b/TileCalorimeter/TileCoolDcs/share/cool_channel_id.dat
new file mode 100644
index 0000000000000000000000000000000000000000..0d072ed78293cd480bc8c4ccebd8c428c4ac2a2a
--- /dev/null
+++ b/TileCalorimeter/TileCoolDcs/share/cool_channel_id.dat
@@ -0,0 +1,1028 @@
+/DAQdummy/EBA/DAQdummy	EBAXX	0	ATLTILSCS:DAQEBA.state
+/DAQdummy/EBC/DAQdummy	EBCXX	3	ATLTILSCS:DAQEBC.state
+/DAQdummy/LBA/DAQdummy	LBAXX	1	ATLTILSCS:DAQLBA.state
+/DAQdummy/LBC/DAQdummy	LBCXX	2	ATLTILSCS:DAQLBC.state
+/TILE/DCS/AI	EBA01	55461086	ATLTILLV00:ELMB/LVCAN4/LVPS_1/AI
+/TILE/DCS/AI	EBA02	55537086	ATLTILLV00:ELMB/LVCAN4/LVPS_2/AI
+/TILE/DCS/AI	EBA03	55613086	ATLTILLV00:ELMB/LVCAN4/LVPS_3/AI
+/TILE/DCS/AI	EBA04	55689086	ATLTILLV00:ELMB/LVCAN4/LVPS_4/AI
+/TILE/DCS/AI	EBA05	55765086	ATLTILLV00:ELMB/LVCAN4/LVPS_5/AI
+/TILE/DCS/AI	EBA06	55841086	ATLTILLV00:ELMB/LVCAN4/LVPS_6/AI
+/TILE/DCS/AI	EBA07	55917086	ATLTILLV00:ELMB/LVCAN4/LVPS_7/AI
+/TILE/DCS/AI	EBA08	55993086	ATLTILLV00:ELMB/LVCAN4/LVPS_8/AI
+/TILE/DCS/AI	EBA09	56753086	ATLTILLV00:ELMB/LVCAN1/LVPS_9/AI
+/TILE/DCS/AI	EBA10	56829086	ATLTILLV00:ELMB/LVCAN1/LVPS_10/AI
+/TILE/DCS/AI	EBA11	56905086	ATLTILLV00:ELMB/LVCAN1/LVPS_11/AI
+/TILE/DCS/AI	EBA12	56981086	ATLTILLV00:ELMB/LVCAN1/LVPS_12/AI
+/TILE/DCS/AI	EBA13	57057086	ATLTILLV00:ELMB/LVCAN1/LVPS_13/AI
+/TILE/DCS/AI	EBA14	57133086	ATLTILLV00:ELMB/LVCAN1/LVPS_14/AI
+/TILE/DCS/AI	EBA15	58881086	ATLTILLV00:ELMB/LVCAN1/LVPS_15/AI
+/TILE/DCS/AI	EBA16	57209086	ATLTILLV00:ELMB/LVCAN1/LVPS_16/AI
+/TILE/DCS/AI	EBA17	57285086	ATLTILLV00:ELMB/LVCAN1/LVPS_17/AI
+/TILE/DCS/AI	EBA18	57361086	ATLTILLV00:ELMB/LVCAN1/LVPS_18/AI
+/TILE/DCS/AI	EBA19	57437086	ATLTILLV00:ELMB/LVCAN1/LVPS_19/AI
+/TILE/DCS/AI	EBA20	58957086	ATLTILLV00:ELMB/LVCAN1/LVPS_20/AI
+/TILE/DCS/AI	EBA21	57513086	ATLTILLV00:ELMB/LVCAN1/LVPS_21/AI
+/TILE/DCS/AI	EBA22	57589086	ATLTILLV00:ELMB/LVCAN1/LVPS_22/AI
+/TILE/DCS/AI	EBA23	57665086	ATLTILLV00:ELMB/LVCAN1/LVPS_23/AI
+/TILE/DCS/AI	EBA24	57741086	ATLTILLV00:ELMB/LVCAN1/LVPS_24/AI
+/TILE/DCS/AI	EBA25	56677086	ATLTILLV00:ELMB/LVCAN2/LVPS_25/AI
+/TILE/DCS/AI	EBA26	57817086	ATLTILLV00:ELMB/LVCAN2/LVPS_26/AI
+/TILE/DCS/AI	EBA27	53621086	ATLTILLV00:ELMB/LVCAN2/LVPS_27/AI
+/TILE/DCS/AI	EBA28	57893086	ATLTILLV00:ELMB/LVCAN2/LVPS_28/AI
+/TILE/DCS/AI	EBA29	57969086	ATLTILLV00:ELMB/LVCAN2/LVPS_29/AI
+/TILE/DCS/AI	EBA30	58045086	ATLTILLV00:ELMB/LVCAN2/LVPS_30/AI
+/TILE/DCS/AI	EBA31	58121086	ATLTILLV00:ELMB/LVCAN2/LVPS_31/AI
+/TILE/DCS/AI	EBA32	58197086	ATLTILLV00:ELMB/LVCAN2/LVPS_32/AI
+/TILE/DCS/AI	EBA33	58273086	ATLTILLV00:ELMB/LVCAN2/LVPS_33/AI
+/TILE/DCS/AI	EBA34	58349086	ATLTILLV00:ELMB/LVCAN2/LVPS_34/AI
+/TILE/DCS/AI	EBA35	58425086	ATLTILLV00:ELMB/LVCAN2/LVPS_35/AI
+/TILE/DCS/AI	EBA36	58501086	ATLTILLV00:ELMB/LVCAN2/LVPS_36/AI
+/TILE/DCS/AI	EBA37	58577086	ATLTILLV00:ELMB/LVCAN2/LVPS_37/AI
+/TILE/DCS/AI	EBA38	58653086	ATLTILLV00:ELMB/LVCAN2/LVPS_38/AI
+/TILE/DCS/AI	EBA39	58729086	ATLTILLV00:ELMB/LVCAN2/LVPS_39/AI
+/TILE/DCS/AI	EBA40	58805086	ATLTILLV00:ELMB/LVCAN2/LVPS_40/AI
+/TILE/DCS/AI	EBA41	53399086	ATLTILLV00:ELMB/LVCAN3/LVPS_41/AI
+/TILE/DCS/AI	EBA42	53769086	ATLTILLV00:ELMB/LVCAN3/LVPS_42/AI
+/TILE/DCS/AI	EBA43	53843086	ATLTILLV00:ELMB/LVCAN3/LVPS_43/AI
+/TILE/DCS/AI	EBA44	53917086	ATLTILLV00:ELMB/LVCAN3/LVPS_44/AI
+/TILE/DCS/AI	EBA45	53695086	ATLTILLV00:ELMB/LVCAN3/LVPS_45/AI
+/TILE/DCS/AI	EBA46	53991086	ATLTILLV00:ELMB/LVCAN3/LVPS_46/AI
+/TILE/DCS/AI	EBA47	54065086	ATLTILLV00:ELMB/LVCAN3/LVPS_47/AI
+/TILE/DCS/AI	EBA48	54139086	ATLTILLV00:ELMB/LVCAN3/LVPS_48/AI
+/TILE/DCS/AI	EBA49	54213086	ATLTILLV00:ELMB/LVCAN3/LVPS_49/AI
+/TILE/DCS/AI	EBA50	54287086	ATLTILLV00:ELMB/LVCAN3/LVPS_50/AI
+/TILE/DCS/AI	EBA51	54361086	ATLTILLV00:ELMB/LVCAN3/LVPS_51/AI
+/TILE/DCS/AI	EBA52	54435086	ATLTILLV00:ELMB/LVCAN3/LVPS_52/AI
+/TILE/DCS/AI	EBA53	54509086	ATLTILLV00:ELMB/LVCAN3/LVPS_53/AI
+/TILE/DCS/AI	EBA54	54583086	ATLTILLV00:ELMB/LVCAN3/LVPS_54/AI
+/TILE/DCS/AI	EBA55	54657086	ATLTILLV00:ELMB/LVCAN3/LVPS_55/AI
+/TILE/DCS/AI	EBA56	54731086	ATLTILLV00:ELMB/LVCAN3/LVPS_56/AI
+/TILE/DCS/AI	EBA57	56069086	ATLTILLV00:ELMB/LVCAN4/LVPS_57/AI
+/TILE/DCS/AI	EBA58	56145086	ATLTILLV00:ELMB/LVCAN4/LVPS_58/AI
+/TILE/DCS/AI	EBA59	56221086	ATLTILLV00:ELMB/LVCAN4/LVPS_59/AI
+/TILE/DCS/AI	EBA60	56297086	ATLTILLV00:ELMB/LVCAN4/LVPS_60/AI
+/TILE/DCS/AI	EBA61	56373086	ATLTILLV00:ELMB/LVCAN4/LVPS_61/AI
+/TILE/DCS/AI	EBA62	56449086	ATLTILLV00:ELMB/LVCAN4/LVPS_62/AI
+/TILE/DCS/AI	EBA63	56525086	ATLTILLV00:ELMB/LVCAN4/LVPS_63/AI
+/TILE/DCS/AI	EBA64	56601086	ATLTILLV00:ELMB/LVCAN4/LVPS_64/AI
+/TILE/DCS/AI	EBC01	55461089	ATLTILLV03:ELMB/LVCAN4/LVPS_1/AI
+/TILE/DCS/AI	EBC02	55537089	ATLTILLV03:ELMB/LVCAN4/LVPS_2/AI
+/TILE/DCS/AI	EBC03	55613089	ATLTILLV03:ELMB/LVCAN4/LVPS_3/AI
+/TILE/DCS/AI	EBC04	55689089	ATLTILLV03:ELMB/LVCAN4/LVPS_4/AI
+/TILE/DCS/AI	EBC05	55765089	ATLTILLV03:ELMB/LVCAN4/LVPS_5/AI
+/TILE/DCS/AI	EBC06	55841089	ATLTILLV03:ELMB/LVCAN4/LVPS_6/AI
+/TILE/DCS/AI	EBC07	55917089	ATLTILLV03:ELMB/LVCAN4/LVPS_7/AI
+/TILE/DCS/AI	EBC08	55993089	ATLTILLV03:ELMB/LVCAN4/LVPS_8/AI
+/TILE/DCS/AI	EBC09	56753089	ATLTILLV03:ELMB/LVCAN1/LVPS_9/AI
+/TILE/DCS/AI	EBC10	56829089	ATLTILLV03:ELMB/LVCAN1/LVPS_10/AI
+/TILE/DCS/AI	EBC11	56905089	ATLTILLV03:ELMB/LVCAN1/LVPS_11/AI
+/TILE/DCS/AI	EBC12	56981089	ATLTILLV03:ELMB/LVCAN1/LVPS_12/AI
+/TILE/DCS/AI	EBC13	57057089	ATLTILLV03:ELMB/LVCAN1/LVPS_13/AI
+/TILE/DCS/AI	EBC14	57133089	ATLTILLV03:ELMB/LVCAN1/LVPS_14/AI
+/TILE/DCS/AI	EBC15	58881089	ATLTILLV03:ELMB/LVCAN1/LVPS_15/AI
+/TILE/DCS/AI	EBC16	57209089	ATLTILLV03:ELMB/LVCAN1/LVPS_16/AI
+/TILE/DCS/AI	EBC17	57285089	ATLTILLV03:ELMB/LVCAN1/LVPS_17/AI
+/TILE/DCS/AI	EBC18	57361089	ATLTILLV03:ELMB/LVCAN1/LVPS_18/AI
+/TILE/DCS/AI	EBC19	57437089	ATLTILLV03:ELMB/LVCAN1/LVPS_19/AI
+/TILE/DCS/AI	EBC20	58957089	ATLTILLV03:ELMB/LVCAN1/LVPS_20/AI
+/TILE/DCS/AI	EBC21	57513089	ATLTILLV03:ELMB/LVCAN1/LVPS_21/AI
+/TILE/DCS/AI	EBC22	57589089	ATLTILLV03:ELMB/LVCAN1/LVPS_22/AI
+/TILE/DCS/AI	EBC23	57665089	ATLTILLV03:ELMB/LVCAN1/LVPS_23/AI
+/TILE/DCS/AI	EBC24	57741089	ATLTILLV03:ELMB/LVCAN1/LVPS_24/AI
+/TILE/DCS/AI	EBC25	56677089	ATLTILLV03:ELMB/LVCAN2/LVPS_25/AI
+/TILE/DCS/AI	EBC26	57817089	ATLTILLV03:ELMB/LVCAN2/LVPS_26/AI
+/TILE/DCS/AI	EBC27	53621089	ATLTILLV03:ELMB/LVCAN2/LVPS_27/AI
+/TILE/DCS/AI	EBC28	57893089	ATLTILLV03:ELMB/LVCAN2/LVPS_28/AI
+/TILE/DCS/AI	EBC29	57969089	ATLTILLV03:ELMB/LVCAN2/LVPS_29/AI
+/TILE/DCS/AI	EBC30	58045089	ATLTILLV03:ELMB/LVCAN2/LVPS_30/AI
+/TILE/DCS/AI	EBC31	58121089	ATLTILLV03:ELMB/LVCAN2/LVPS_31/AI
+/TILE/DCS/AI	EBC32	58197089	ATLTILLV03:ELMB/LVCAN2/LVPS_32/AI
+/TILE/DCS/AI	EBC33	58273089	ATLTILLV03:ELMB/LVCAN2/LVPS_33/AI
+/TILE/DCS/AI	EBC34	58349089	ATLTILLV03:ELMB/LVCAN2/LVPS_34/AI
+/TILE/DCS/AI	EBC35	58425089	ATLTILLV03:ELMB/LVCAN2/LVPS_35/AI
+/TILE/DCS/AI	EBC36	58501089	ATLTILLV03:ELMB/LVCAN2/LVPS_36/AI
+/TILE/DCS/AI	EBC37	58577089	ATLTILLV03:ELMB/LVCAN2/LVPS_37/AI
+/TILE/DCS/AI	EBC38	58653089	ATLTILLV03:ELMB/LVCAN2/LVPS_38/AI
+/TILE/DCS/AI	EBC39	58729089	ATLTILLV03:ELMB/LVCAN2/LVPS_39/AI
+/TILE/DCS/AI	EBC40	58805089	ATLTILLV03:ELMB/LVCAN2/LVPS_40/AI
+/TILE/DCS/AI	EBC41	53399089	ATLTILLV03:ELMB/LVCAN3/LVPS_41/AI
+/TILE/DCS/AI	EBC42	53769089	ATLTILLV03:ELMB/LVCAN3/LVPS_42/AI
+/TILE/DCS/AI	EBC43	53843089	ATLTILLV03:ELMB/LVCAN3/LVPS_43/AI
+/TILE/DCS/AI	EBC44	53917089	ATLTILLV03:ELMB/LVCAN3/LVPS_44/AI
+/TILE/DCS/AI	EBC45	53695089	ATLTILLV03:ELMB/LVCAN3/LVPS_45/AI
+/TILE/DCS/AI	EBC46	53991089	ATLTILLV03:ELMB/LVCAN3/LVPS_46/AI
+/TILE/DCS/AI	EBC47	54065089	ATLTILLV03:ELMB/LVCAN3/LVPS_47/AI
+/TILE/DCS/AI	EBC48	54139089	ATLTILLV03:ELMB/LVCAN3/LVPS_48/AI
+/TILE/DCS/AI	EBC49	54213089	ATLTILLV03:ELMB/LVCAN3/LVPS_49/AI
+/TILE/DCS/AI	EBC50	54287089	ATLTILLV03:ELMB/LVCAN3/LVPS_50/AI
+/TILE/DCS/AI	EBC51	54361089	ATLTILLV03:ELMB/LVCAN3/LVPS_51/AI
+/TILE/DCS/AI	EBC52	54435089	ATLTILLV03:ELMB/LVCAN3/LVPS_52/AI
+/TILE/DCS/AI	EBC53	54509089	ATLTILLV03:ELMB/LVCAN3/LVPS_53/AI
+/TILE/DCS/AI	EBC54	54583089	ATLTILLV03:ELMB/LVCAN3/LVPS_54/AI
+/TILE/DCS/AI	EBC55	54657089	ATLTILLV03:ELMB/LVCAN3/LVPS_55/AI
+/TILE/DCS/AI	EBC56	54731089	ATLTILLV03:ELMB/LVCAN3/LVPS_56/AI
+/TILE/DCS/AI	EBC57	56069089	ATLTILLV03:ELMB/LVCAN4/LVPS_57/AI
+/TILE/DCS/AI	EBC58	56145089	ATLTILLV03:ELMB/LVCAN4/LVPS_58/AI
+/TILE/DCS/AI	EBC59	56221089	ATLTILLV03:ELMB/LVCAN4/LVPS_59/AI
+/TILE/DCS/AI	EBC60	56297089	ATLTILLV03:ELMB/LVCAN4/LVPS_60/AI
+/TILE/DCS/AI	EBC61	56373089	ATLTILLV03:ELMB/LVCAN4/LVPS_61/AI
+/TILE/DCS/AI	EBC62	56449089	ATLTILLV03:ELMB/LVCAN4/LVPS_62/AI
+/TILE/DCS/AI	EBC63	56525089	ATLTILLV03:ELMB/LVCAN4/LVPS_63/AI
+/TILE/DCS/AI	EBC64	56601089	ATLTILLV03:ELMB/LVCAN4/LVPS_64/AI
+/TILE/DCS/AI	LBA01	55461088	ATLTILLV01:ELMB/LVCAN4/LVPS_1/AI
+/TILE/DCS/AI	LBA02	55537088	ATLTILLV01:ELMB/LVCAN4/LVPS_2/AI
+/TILE/DCS/AI	LBA03	55613088	ATLTILLV01:ELMB/LVCAN4/LVPS_3/AI
+/TILE/DCS/AI	LBA04	55689088	ATLTILLV01:ELMB/LVCAN4/LVPS_4/AI
+/TILE/DCS/AI	LBA05	55765088	ATLTILLV01:ELMB/LVCAN4/LVPS_5/AI
+/TILE/DCS/AI	LBA06	55841088	ATLTILLV01:ELMB/LVCAN4/LVPS_6/AI
+/TILE/DCS/AI	LBA07	55917088	ATLTILLV01:ELMB/LVCAN4/LVPS_7/AI
+/TILE/DCS/AI	LBA08	55993088	ATLTILLV01:ELMB/LVCAN4/LVPS_8/AI
+/TILE/DCS/AI	LBA09	56753088	ATLTILLV01:ELMB/LVCAN1/LVPS_9/AI
+/TILE/DCS/AI	LBA10	56829088	ATLTILLV01:ELMB/LVCAN1/LVPS_10/AI
+/TILE/DCS/AI	LBA11	56905088	ATLTILLV01:ELMB/LVCAN1/LVPS_11/AI
+/TILE/DCS/AI	LBA12	56981088	ATLTILLV01:ELMB/LVCAN1/LVPS_12/AI
+/TILE/DCS/AI	LBA13	57057088	ATLTILLV01:ELMB/LVCAN1/LVPS_13/AI
+/TILE/DCS/AI	LBA14	57133088	ATLTILLV01:ELMB/LVCAN1/LVPS_14/AI
+/TILE/DCS/AI	LBA15	58881088	ATLTILLV01:ELMB/LVCAN1/LVPS_15/AI
+/TILE/DCS/AI	LBA16	57209088	ATLTILLV01:ELMB/LVCAN1/LVPS_16/AI
+/TILE/DCS/AI	LBA17	57285088	ATLTILLV01:ELMB/LVCAN1/LVPS_17/AI
+/TILE/DCS/AI	LBA18	57361088	ATLTILLV01:ELMB/LVCAN1/LVPS_18/AI
+/TILE/DCS/AI	LBA19	57437088	ATLTILLV01:ELMB/LVCAN1/LVPS_19/AI
+/TILE/DCS/AI	LBA20	58957088	ATLTILLV01:ELMB/LVCAN1/LVPS_20/AI
+/TILE/DCS/AI	LBA21	57513088	ATLTILLV01:ELMB/LVCAN1/LVPS_21/AI
+/TILE/DCS/AI	LBA22	57589088	ATLTILLV01:ELMB/LVCAN1/LVPS_22/AI
+/TILE/DCS/AI	LBA23	57665088	ATLTILLV01:ELMB/LVCAN1/LVPS_23/AI
+/TILE/DCS/AI	LBA24	57741088	ATLTILLV01:ELMB/LVCAN1/LVPS_24/AI
+/TILE/DCS/AI	LBA25	56677088	ATLTILLV01:ELMB/LVCAN2/LVPS_25/AI
+/TILE/DCS/AI	LBA26	57817088	ATLTILLV01:ELMB/LVCAN2/LVPS_26/AI
+/TILE/DCS/AI	LBA27	53621088	ATLTILLV01:ELMB/LVCAN2/LVPS_27/AI
+/TILE/DCS/AI	LBA28	57893088	ATLTILLV01:ELMB/LVCAN2/LVPS_28/AI
+/TILE/DCS/AI	LBA29	57969088	ATLTILLV01:ELMB/LVCAN2/LVPS_29/AI
+/TILE/DCS/AI	LBA30	58045088	ATLTILLV01:ELMB/LVCAN2/LVPS_30/AI
+/TILE/DCS/AI	LBA31	58121088	ATLTILLV01:ELMB/LVCAN2/LVPS_31/AI
+/TILE/DCS/AI	LBA32	58197088	ATLTILLV01:ELMB/LVCAN2/LVPS_32/AI
+/TILE/DCS/AI	LBA33	58273088	ATLTILLV01:ELMB/LVCAN2/LVPS_33/AI
+/TILE/DCS/AI	LBA34	58349088	ATLTILLV01:ELMB/LVCAN2/LVPS_34/AI
+/TILE/DCS/AI	LBA35	58425088	ATLTILLV01:ELMB/LVCAN2/LVPS_35/AI
+/TILE/DCS/AI	LBA36	58501088	ATLTILLV01:ELMB/LVCAN2/LVPS_36/AI
+/TILE/DCS/AI	LBA37	58577088	ATLTILLV01:ELMB/LVCAN2/LVPS_37/AI
+/TILE/DCS/AI	LBA38	58653088	ATLTILLV01:ELMB/LVCAN2/LVPS_38/AI
+/TILE/DCS/AI	LBA39	58729088	ATLTILLV01:ELMB/LVCAN2/LVPS_39/AI
+/TILE/DCS/AI	LBA40	58805088	ATLTILLV01:ELMB/LVCAN2/LVPS_40/AI
+/TILE/DCS/AI	LBA41	53399088	ATLTILLV01:ELMB/LVCAN3/LVPS_41/AI
+/TILE/DCS/AI	LBA42	53769088	ATLTILLV01:ELMB/LVCAN3/LVPS_42/AI
+/TILE/DCS/AI	LBA43	53843088	ATLTILLV01:ELMB/LVCAN3/LVPS_43/AI
+/TILE/DCS/AI	LBA44	53917088	ATLTILLV01:ELMB/LVCAN3/LVPS_44/AI
+/TILE/DCS/AI	LBA45	53695088	ATLTILLV01:ELMB/LVCAN3/LVPS_45/AI
+/TILE/DCS/AI	LBA46	53991088	ATLTILLV01:ELMB/LVCAN3/LVPS_46/AI
+/TILE/DCS/AI	LBA47	54065088	ATLTILLV01:ELMB/LVCAN3/LVPS_47/AI
+/TILE/DCS/AI	LBA48	54139088	ATLTILLV01:ELMB/LVCAN3/LVPS_48/AI
+/TILE/DCS/AI	LBA49	54213088	ATLTILLV01:ELMB/LVCAN3/LVPS_49/AI
+/TILE/DCS/AI	LBA50	54287088	ATLTILLV01:ELMB/LVCAN3/LVPS_50/AI
+/TILE/DCS/AI	LBA51	54361088	ATLTILLV01:ELMB/LVCAN3/LVPS_51/AI
+/TILE/DCS/AI	LBA52	54435088	ATLTILLV01:ELMB/LVCAN3/LVPS_52/AI
+/TILE/DCS/AI	LBA53	54509088	ATLTILLV01:ELMB/LVCAN3/LVPS_53/AI
+/TILE/DCS/AI	LBA54	54583088	ATLTILLV01:ELMB/LVCAN3/LVPS_54/AI
+/TILE/DCS/AI	LBA55	54657088	ATLTILLV01:ELMB/LVCAN3/LVPS_55/AI
+/TILE/DCS/AI	LBA56	54731088	ATLTILLV01:ELMB/LVCAN3/LVPS_56/AI
+/TILE/DCS/AI	LBA57	56069088	ATLTILLV01:ELMB/LVCAN4/LVPS_57/AI
+/TILE/DCS/AI	LBA58	56145088	ATLTILLV01:ELMB/LVCAN4/LVPS_58/AI
+/TILE/DCS/AI	LBA59	56221088	ATLTILLV01:ELMB/LVCAN4/LVPS_59/AI
+/TILE/DCS/AI	LBA60	56297088	ATLTILLV01:ELMB/LVCAN4/LVPS_60/AI
+/TILE/DCS/AI	LBA61	56373088	ATLTILLV01:ELMB/LVCAN4/LVPS_61/AI
+/TILE/DCS/AI	LBA62	56449088	ATLTILLV01:ELMB/LVCAN4/LVPS_62/AI
+/TILE/DCS/AI	LBA63	56525088	ATLTILLV01:ELMB/LVCAN4/LVPS_63/AI
+/TILE/DCS/AI	LBA64	56601088	ATLTILLV01:ELMB/LVCAN4/LVPS_64/AI
+/TILE/DCS/AI	LBC01	55461087	ATLTILLV02:ELMB/LVCAN4/LVPS_1/AI
+/TILE/DCS/AI	LBC02	55537087	ATLTILLV02:ELMB/LVCAN4/LVPS_2/AI
+/TILE/DCS/AI	LBC03	55613087	ATLTILLV02:ELMB/LVCAN4/LVPS_3/AI
+/TILE/DCS/AI	LBC04	55689087	ATLTILLV02:ELMB/LVCAN4/LVPS_4/AI
+/TILE/DCS/AI	LBC05	55765087	ATLTILLV02:ELMB/LVCAN4/LVPS_5/AI
+/TILE/DCS/AI	LBC06	55841087	ATLTILLV02:ELMB/LVCAN4/LVPS_6/AI
+/TILE/DCS/AI	LBC07	55917087	ATLTILLV02:ELMB/LVCAN4/LVPS_7/AI
+/TILE/DCS/AI	LBC08	55993087	ATLTILLV02:ELMB/LVCAN4/LVPS_8/AI
+/TILE/DCS/AI	LBC09	56753087	ATLTILLV02:ELMB/LVCAN1/LVPS_9/AI
+/TILE/DCS/AI	LBC10	56829087	ATLTILLV02:ELMB/LVCAN1/LVPS_10/AI
+/TILE/DCS/AI	LBC11	56905087	ATLTILLV02:ELMB/LVCAN1/LVPS_11/AI
+/TILE/DCS/AI	LBC12	56981087	ATLTILLV02:ELMB/LVCAN1/LVPS_12/AI
+/TILE/DCS/AI	LBC13	57057087	ATLTILLV02:ELMB/LVCAN1/LVPS_13/AI
+/TILE/DCS/AI	LBC14	57133087	ATLTILLV02:ELMB/LVCAN1/LVPS_14/AI
+/TILE/DCS/AI	LBC15	58881087	ATLTILLV02:ELMB/LVCAN1/LVPS_15/AI
+/TILE/DCS/AI	LBC16	57209087	ATLTILLV02:ELMB/LVCAN1/LVPS_16/AI
+/TILE/DCS/AI	LBC17	57285087	ATLTILLV02:ELMB/LVCAN1/LVPS_17/AI
+/TILE/DCS/AI	LBC18	57361087	ATLTILLV02:ELMB/LVCAN1/LVPS_18/AI
+/TILE/DCS/AI	LBC19	57437087	ATLTILLV02:ELMB/LVCAN1/LVPS_19/AI
+/TILE/DCS/AI	LBC20	58957087	ATLTILLV02:ELMB/LVCAN1/LVPS_20/AI
+/TILE/DCS/AI	LBC21	57513087	ATLTILLV02:ELMB/LVCAN1/LVPS_21/AI
+/TILE/DCS/AI	LBC22	57589087	ATLTILLV02:ELMB/LVCAN1/LVPS_22/AI
+/TILE/DCS/AI	LBC23	57665087	ATLTILLV02:ELMB/LVCAN1/LVPS_23/AI
+/TILE/DCS/AI	LBC24	57741087	ATLTILLV02:ELMB/LVCAN1/LVPS_24/AI
+/TILE/DCS/AI	LBC25	56677087	ATLTILLV02:ELMB/LVCAN2/LVPS_25/AI
+/TILE/DCS/AI	LBC26	57817087	ATLTILLV02:ELMB/LVCAN2/LVPS_26/AI
+/TILE/DCS/AI	LBC27	53621087	ATLTILLV02:ELMB/LVCAN2/LVPS_27/AI
+/TILE/DCS/AI	LBC28	57893087	ATLTILLV02:ELMB/LVCAN2/LVPS_28/AI
+/TILE/DCS/AI	LBC29	57969087	ATLTILLV02:ELMB/LVCAN2/LVPS_29/AI
+/TILE/DCS/AI	LBC30	58045087	ATLTILLV02:ELMB/LVCAN2/LVPS_30/AI
+/TILE/DCS/AI	LBC31	58121087	ATLTILLV02:ELMB/LVCAN2/LVPS_31/AI
+/TILE/DCS/AI	LBC32	58197087	ATLTILLV02:ELMB/LVCAN2/LVPS_32/AI
+/TILE/DCS/AI	LBC33	58273087	ATLTILLV02:ELMB/LVCAN2/LVPS_33/AI
+/TILE/DCS/AI	LBC34	58349087	ATLTILLV02:ELMB/LVCAN2/LVPS_34/AI
+/TILE/DCS/AI	LBC35	58425087	ATLTILLV02:ELMB/LVCAN2/LVPS_35/AI
+/TILE/DCS/AI	LBC36	58501087	ATLTILLV02:ELMB/LVCAN2/LVPS_36/AI
+/TILE/DCS/AI	LBC37	58577087	ATLTILLV02:ELMB/LVCAN2/LVPS_37/AI
+/TILE/DCS/AI	LBC38	58653087	ATLTILLV02:ELMB/LVCAN2/LVPS_38/AI
+/TILE/DCS/AI	LBC39	58729087	ATLTILLV02:ELMB/LVCAN2/LVPS_39/AI
+/TILE/DCS/AI	LBC40	58805087	ATLTILLV02:ELMB/LVCAN2/LVPS_40/AI
+/TILE/DCS/AI	LBC41	53399087	ATLTILLV02:ELMB/LVCAN3/LVPS_41/AI
+/TILE/DCS/AI	LBC42	53769087	ATLTILLV02:ELMB/LVCAN3/LVPS_42/AI
+/TILE/DCS/AI	LBC43	53843087	ATLTILLV02:ELMB/LVCAN3/LVPS_43/AI
+/TILE/DCS/AI	LBC44	53917087	ATLTILLV02:ELMB/LVCAN3/LVPS_44/AI
+/TILE/DCS/AI	LBC45	53695087	ATLTILLV02:ELMB/LVCAN3/LVPS_45/AI
+/TILE/DCS/AI	LBC46	53991087	ATLTILLV02:ELMB/LVCAN3/LVPS_46/AI
+/TILE/DCS/AI	LBC47	54065087	ATLTILLV02:ELMB/LVCAN3/LVPS_47/AI
+/TILE/DCS/AI	LBC48	54139087	ATLTILLV02:ELMB/LVCAN3/LVPS_48/AI
+/TILE/DCS/AI	LBC49	54213087	ATLTILLV02:ELMB/LVCAN3/LVPS_49/AI
+/TILE/DCS/AI	LBC50	54287087	ATLTILLV02:ELMB/LVCAN3/LVPS_50/AI
+/TILE/DCS/AI	LBC51	54361087	ATLTILLV02:ELMB/LVCAN3/LVPS_51/AI
+/TILE/DCS/AI	LBC52	54435087	ATLTILLV02:ELMB/LVCAN3/LVPS_52/AI
+/TILE/DCS/AI	LBC53	54509087	ATLTILLV02:ELMB/LVCAN3/LVPS_53/AI
+/TILE/DCS/AI	LBC54	54583087	ATLTILLV02:ELMB/LVCAN3/LVPS_54/AI
+/TILE/DCS/AI	LBC55	54657087	ATLTILLV02:ELMB/LVCAN3/LVPS_55/AI
+/TILE/DCS/AI	LBC56	54731087	ATLTILLV02:ELMB/LVCAN3/LVPS_56/AI
+/TILE/DCS/AI	LBC57	56069087	ATLTILLV02:ELMB/LVCAN4/LVPS_57/AI
+/TILE/DCS/AI	LBC58	56145087	ATLTILLV02:ELMB/LVCAN4/LVPS_58/AI
+/TILE/DCS/AI	LBC59	56221087	ATLTILLV02:ELMB/LVCAN4/LVPS_59/AI
+/TILE/DCS/AI	LBC60	56297087	ATLTILLV02:ELMB/LVCAN4/LVPS_60/AI
+/TILE/DCS/AI	LBC61	56373087	ATLTILLV02:ELMB/LVCAN4/LVPS_61/AI
+/TILE/DCS/AI	LBC62	56449087	ATLTILLV02:ELMB/LVCAN4/LVPS_62/AI
+/TILE/DCS/AI	LBC63	56525087	ATLTILLV02:ELMB/LVCAN4/LVPS_63/AI
+/TILE/DCS/AI	LBC64	56601087	ATLTILLV02:ELMB/LVCAN4/LVPS_64/AI
+/TILE/DCS/HV	EBA01	199	ATLTILLV00:Drawer1.Readings.Monitoring
+/TILE/DCS/HV	EBA02	9  	ATLTILLV00:Drawer2.Readings.Monitoring
+/TILE/DCS/HV	EBA03	202	ATLTILLV00:Drawer3.Readings.Monitoring
+/TILE/DCS/HV	EBA04	23 	ATLTILLV00:Drawer4.Readings.Monitoring
+/TILE/DCS/HV	EBA05	204	ATLTILLV00:Drawer5.Readings.Monitoring
+/TILE/DCS/HV	EBA06	206	ATLTILLV00:Drawer6.Readings.Monitoring
+/TILE/DCS/HV	EBA07	41 	ATLTILLV00:Drawer7.Readings.Monitoring
+/TILE/DCS/HV	EBA08	42 	ATLTILLV00:Drawer8.Readings.Monitoring
+/TILE/DCS/HV	EBA09	43 	ATLTILLV00:Drawer9.Readings.Monitoring
+/TILE/DCS/HV	EBA10	1  	ATLTILLV00:Drawer10.Readings.Monitoring
+/TILE/DCS/HV	EBA11	238	ATLTILLV00:Drawer11.Readings.Monitoring
+/TILE/DCS/HV	EBA12	200	ATLTILLV00:Drawer12.Readings.Monitoring
+/TILE/DCS/HV	EBA13	2  	ATLTILLV00:Drawer13.Readings.Monitoring
+/TILE/DCS/HV	EBA14	3  	ATLTILLV00:Drawer14.Readings.Monitoring
+/TILE/DCS/HV	EBA15	4  	ATLTILLV00:Drawer15.Readings.Monitoring
+/TILE/DCS/HV	EBA16	5  	ATLTILLV00:Drawer16.Readings.Monitoring
+/TILE/DCS/HV	EBA17	6  	ATLTILLV00:Drawer17.Readings.Monitoring
+/TILE/DCS/HV	EBA18	7  	ATLTILLV00:Drawer18.Readings.Monitoring
+/TILE/DCS/HV	EBA19	8  	ATLTILLV00:Drawer19.Readings.Monitoring
+/TILE/DCS/HV	EBA20	10 	ATLTILLV00:Drawer20.Readings.Monitoring
+/TILE/DCS/HV	EBA21	11 	ATLTILLV00:Drawer21.Readings.Monitoring
+/TILE/DCS/HV	EBA22	201	ATLTILLV00:Drawer22.Readings.Monitoring
+/TILE/DCS/HV	EBA23	239	ATLTILLV00:Drawer23.Readings.Monitoring
+/TILE/DCS/HV	EBA24	12 	ATLTILLV00:Drawer24.Readings.Monitoring
+/TILE/DCS/HV	EBA25	13 	ATLTILLV00:Drawer25.Readings.Monitoring
+/TILE/DCS/HV	EBA26	14 	ATLTILLV00:Drawer26.Readings.Monitoring
+/TILE/DCS/HV	EBA27	15 	ATLTILLV00:Drawer27.Readings.Monitoring
+/TILE/DCS/HV	EBA28	16 	ATLTILLV00:Drawer28.Readings.Monitoring
+/TILE/DCS/HV	EBA29	17 	ATLTILLV00:Drawer29.Readings.Monitoring
+/TILE/DCS/HV	EBA30	18 	ATLTILLV00:Drawer30.Readings.Monitoring
+/TILE/DCS/HV	EBA31	240	ATLTILLV00:Drawer31.Readings.Monitoring
+/TILE/DCS/HV	EBA32	19 	ATLTILLV00:Drawer32.Readings.Monitoring
+/TILE/DCS/HV	EBA33	241	ATLTILLV00:Drawer33.Readings.Monitoring
+/TILE/DCS/HV	EBA34	242	ATLTILLV00:Drawer34.Readings.Monitoring
+/TILE/DCS/HV	EBA35	20 	ATLTILLV00:Drawer35.Readings.Monitoring
+/TILE/DCS/HV	EBA36	21 	ATLTILLV00:Drawer36.Readings.Monitoring
+/TILE/DCS/HV	EBA37	243	ATLTILLV00:Drawer37.Readings.Monitoring
+/TILE/DCS/HV	EBA38	244	ATLTILLV00:Drawer38.Readings.Monitoring
+/TILE/DCS/HV	EBA39	22 	ATLTILLV00:Drawer39.Readings.Monitoring
+/TILE/DCS/HV	EBA40	24 	ATLTILLV00:Drawer40.Readings.Monitoring
+/TILE/DCS/HV	EBA41	25 	ATLTILLV00:Drawer41.Readings.Monitoring
+/TILE/DCS/HV	EBA42	26 	ATLTILLV00:Drawer42.Readings.Monitoring
+/TILE/DCS/HV	EBA43	203	ATLTILLV00:Drawer43.Readings.Monitoring
+/TILE/DCS/HV	EBA44	27 	ATLTILLV00:Drawer44.Readings.Monitoring
+/TILE/DCS/HV	EBA45	245	ATLTILLV00:Drawer45.Readings.Monitoring
+/TILE/DCS/HV	EBA46	28 	ATLTILLV00:Drawer46.Readings.Monitoring
+/TILE/DCS/HV	EBA47	246	ATLTILLV00:Drawer47.Readings.Monitoring
+/TILE/DCS/HV	EBA48	29 	ATLTILLV00:Drawer48.Readings.Monitoring
+/TILE/DCS/HV	EBA49	30 	ATLTILLV00:Drawer49.Readings.Monitoring
+/TILE/DCS/HV	EBA50	31 	ATLTILLV00:Drawer50.Readings.Monitoring
+/TILE/DCS/HV	EBA51	32 	ATLTILLV00:Drawer51.Readings.Monitoring
+/TILE/DCS/HV	EBA52	247	ATLTILLV00:Drawer52.Readings.Monitoring
+/TILE/DCS/HV	EBA53	205	ATLTILLV00:Drawer53.Readings.Monitoring
+/TILE/DCS/HV	EBA54	248	ATLTILLV00:Drawer54.Readings.Monitoring
+/TILE/DCS/HV	EBA55	33 	ATLTILLV00:Drawer55.Readings.Monitoring
+/TILE/DCS/HV	EBA56	34 	ATLTILLV00:Drawer56.Readings.Monitoring
+/TILE/DCS/HV	EBA57	35 	ATLTILLV00:Drawer57.Readings.Monitoring
+/TILE/DCS/HV	EBA58	36 	ATLTILLV00:Drawer58.Readings.Monitoring
+/TILE/DCS/HV	EBA59	249	ATLTILLV00:Drawer59.Readings.Monitoring
+/TILE/DCS/HV	EBA60	37 	ATLTILLV00:Drawer60.Readings.Monitoring
+/TILE/DCS/HV	EBA61	38 	ATLTILLV00:Drawer61.Readings.Monitoring
+/TILE/DCS/HV	EBA62	250	ATLTILLV00:Drawer62.Readings.Monitoring
+/TILE/DCS/HV	EBA63	39 	ATLTILLV00:Drawer63.Readings.Monitoring
+/TILE/DCS/HV	EBA64	40 	ATLTILLV00:Drawer64.Readings.Monitoring
+/TILE/DCS/HV	EBC01	137	ATLTILLV03:Drawer1.Readings.Monitoring
+/TILE/DCS/HV	EBC02	148	ATLTILLV03:Drawer2.Readings.Monitoring
+/TILE/DCS/HV	EBC03	159	ATLTILLV03:Drawer3.Readings.Monitoring
+/TILE/DCS/HV	EBC04	170	ATLTILLV03:Drawer4.Readings.Monitoring
+/TILE/DCS/HV	EBC05	180	ATLTILLV03:Drawer5.Readings.Monitoring
+/TILE/DCS/HV	EBC06	190	ATLTILLV03:Drawer6.Readings.Monitoring
+/TILE/DCS/HV	EBC07	196	ATLTILLV03:Drawer7.Readings.Monitoring
+/TILE/DCS/HV	EBC08	197	ATLTILLV03:Drawer8.Readings.Monitoring
+/TILE/DCS/HV	EBC09	198	ATLTILLV03:Drawer9.Readings.Monitoring
+/TILE/DCS/HV	EBC10	138	ATLTILLV03:Drawer10.Readings.Monitoring
+/TILE/DCS/HV	EBC11	139	ATLTILLV03:Drawer11.Readings.Monitoring
+/TILE/DCS/HV	EBC12	140	ATLTILLV03:Drawer12.Readings.Monitoring
+/TILE/DCS/HV	EBC13	141	ATLTILLV03:Drawer13.Readings.Monitoring
+/TILE/DCS/HV	EBC14	142	ATLTILLV03:Drawer14.Readings.Monitoring
+/TILE/DCS/HV	EBC15	143	ATLTILLV03:Drawer15.Readings.Monitoring
+/TILE/DCS/HV	EBC16	144	ATLTILLV03:Drawer16.Readings.Monitoring
+/TILE/DCS/HV	EBC17	145	ATLTILLV03:Drawer17.Readings.Monitoring
+/TILE/DCS/HV	EBC18	146	ATLTILLV03:Drawer18.Readings.Monitoring
+/TILE/DCS/HV	EBC19	147	ATLTILLV03:Drawer19.Readings.Monitoring
+/TILE/DCS/HV	EBC20	149	ATLTILLV03:Drawer20.Readings.Monitoring
+/TILE/DCS/HV	EBC21	150	ATLTILLV03:Drawer21.Readings.Monitoring
+/TILE/DCS/HV	EBC22	151	ATLTILLV03:Drawer22.Readings.Monitoring
+/TILE/DCS/HV	EBC23	152	ATLTILLV03:Drawer23.Readings.Monitoring
+/TILE/DCS/HV	EBC24	153	ATLTILLV03:Drawer24.Readings.Monitoring
+/TILE/DCS/HV	EBC25	154	ATLTILLV03:Drawer25.Readings.Monitoring
+/TILE/DCS/HV	EBC26	155	ATLTILLV03:Drawer26.Readings.Monitoring
+/TILE/DCS/HV	EBC27	156	ATLTILLV03:Drawer27.Readings.Monitoring
+/TILE/DCS/HV	EBC28	157	ATLTILLV03:Drawer28.Readings.Monitoring
+/TILE/DCS/HV	EBC29	158	ATLTILLV03:Drawer29.Readings.Monitoring
+/TILE/DCS/HV	EBC30	160	ATLTILLV03:Drawer30.Readings.Monitoring
+/TILE/DCS/HV	EBC31	161	ATLTILLV03:Drawer31.Readings.Monitoring
+/TILE/DCS/HV	EBC32	162	ATLTILLV03:Drawer32.Readings.Monitoring
+/TILE/DCS/HV	EBC33	163	ATLTILLV03:Drawer33.Readings.Monitoring
+/TILE/DCS/HV	EBC34	164	ATLTILLV03:Drawer34.Readings.Monitoring
+/TILE/DCS/HV	EBC35	165	ATLTILLV03:Drawer35.Readings.Monitoring
+/TILE/DCS/HV	EBC36	166	ATLTILLV03:Drawer36.Readings.Monitoring
+/TILE/DCS/HV	EBC37	167	ATLTILLV03:Drawer37.Readings.Monitoring
+/TILE/DCS/HV	EBC38	168	ATLTILLV03:Drawer38.Readings.Monitoring
+/TILE/DCS/HV	EBC39	169	ATLTILLV03:Drawer39.Readings.Monitoring
+/TILE/DCS/HV	EBC40	171	ATLTILLV03:Drawer40.Readings.Monitoring
+/TILE/DCS/HV	EBC41	172	ATLTILLV03:Drawer41.Readings.Monitoring
+/TILE/DCS/HV	EBC42	173	ATLTILLV03:Drawer42.Readings.Monitoring
+/TILE/DCS/HV	EBC43	174	ATLTILLV03:Drawer43.Readings.Monitoring
+/TILE/DCS/HV	EBC44	175	ATLTILLV03:Drawer44.Readings.Monitoring
+/TILE/DCS/HV	EBC45	176	ATLTILLV03:Drawer45.Readings.Monitoring
+/TILE/DCS/HV	EBC46	177	ATLTILLV03:Drawer46.Readings.Monitoring
+/TILE/DCS/HV	EBC47	236	ATLTILLV03:Drawer47.Readings.Monitoring
+/TILE/DCS/HV	EBC48	178	ATLTILLV03:Drawer48.Readings.Monitoring
+/TILE/DCS/HV	EBC49	179	ATLTILLV03:Drawer49.Readings.Monitoring
+/TILE/DCS/HV	EBC50	181	ATLTILLV03:Drawer50.Readings.Monitoring
+/TILE/DCS/HV	EBC51	182	ATLTILLV03:Drawer51.Readings.Monitoring
+/TILE/DCS/HV	EBC52	237	ATLTILLV03:Drawer52.Readings.Monitoring
+/TILE/DCS/HV	EBC53	183	ATLTILLV03:Drawer53.Readings.Monitoring
+/TILE/DCS/HV	EBC54	184	ATLTILLV03:Drawer54.Readings.Monitoring
+/TILE/DCS/HV	EBC55	185	ATLTILLV03:Drawer55.Readings.Monitoring
+/TILE/DCS/HV	EBC56	186	ATLTILLV03:Drawer56.Readings.Monitoring
+/TILE/DCS/HV	EBC57	187	ATLTILLV03:Drawer57.Readings.Monitoring
+/TILE/DCS/HV	EBC58	188	ATLTILLV03:Drawer58.Readings.Monitoring
+/TILE/DCS/HV	EBC59	189	ATLTILLV03:Drawer59.Readings.Monitoring
+/TILE/DCS/HV	EBC60	191	ATLTILLV03:Drawer60.Readings.Monitoring
+/TILE/DCS/HV	EBC61	192	ATLTILLV03:Drawer61.Readings.Monitoring
+/TILE/DCS/HV	EBC62	193	ATLTILLV03:Drawer62.Readings.Monitoring
+/TILE/DCS/HV	EBC63	194	ATLTILLV03:Drawer63.Readings.Monitoring
+/TILE/DCS/HV	EBC64	195	ATLTILLV03:Drawer64.Readings.Monitoring
+/TILE/DCS/HV	LBA01	44 	ATLTILLV01:Drawer1.Readings.Monitoring
+/TILE/DCS/HV	LBA02	53 	ATLTILLV01:Drawer2.Readings.Monitoring
+/TILE/DCS/HV	LBA03	61 	ATLTILLV01:Drawer3.Readings.Monitoring
+/TILE/DCS/HV	LBA04	70 	ATLTILLV01:Drawer4.Readings.Monitoring
+/TILE/DCS/HV	LBA05	78 	ATLTILLV01:Drawer5.Readings.Monitoring
+/TILE/DCS/HV	LBA06	215	ATLTILLV01:Drawer6.Readings.Monitoring
+/TILE/DCS/HV	LBA07	217	ATLTILLV01:Drawer7.Readings.Monitoring
+/TILE/DCS/HV	LBA08	90 	ATLTILLV01:Drawer8.Readings.Monitoring
+/TILE/DCS/HV	LBA09	218	ATLTILLV01:Drawer9.Readings.Monitoring
+/TILE/DCS/HV	LBA10	45 	ATLTILLV01:Drawer10.Readings.Monitoring
+/TILE/DCS/HV	LBA11	46 	ATLTILLV01:Drawer11.Readings.Monitoring
+/TILE/DCS/HV	LBA12	47 	ATLTILLV01:Drawer12.Readings.Monitoring
+/TILE/DCS/HV	LBA13	48 	ATLTILLV01:Drawer13.Readings.Monitoring
+/TILE/DCS/HV	LBA14	207	ATLTILLV01:Drawer14.Readings.Monitoring
+/TILE/DCS/HV	LBA15	49 	ATLTILLV01:Drawer15.Readings.Monitoring
+/TILE/DCS/HV	LBA16	208	ATLTILLV01:Drawer16.Readings.Monitoring
+/TILE/DCS/HV	LBA17	50 	ATLTILLV01:Drawer17.Readings.Monitoring
+/TILE/DCS/HV	LBA18	51 	ATLTILLV01:Drawer18.Readings.Monitoring
+/TILE/DCS/HV	LBA19	52 	ATLTILLV01:Drawer19.Readings.Monitoring
+/TILE/DCS/HV	LBA20	54 	ATLTILLV01:Drawer20.Readings.Monitoring
+/TILE/DCS/HV	LBA21	55 	ATLTILLV01:Drawer21.Readings.Monitoring
+/TILE/DCS/HV	LBA22	209	ATLTILLV01:Drawer22.Readings.Monitoring
+/TILE/DCS/HV	LBA23	210	ATLTILLV01:Drawer23.Readings.Monitoring
+/TILE/DCS/HV	LBA24	211	ATLTILLV01:Drawer24.Readings.Monitoring
+/TILE/DCS/HV	LBA25	56 	ATLTILLV01:Drawer25.Readings.Monitoring
+/TILE/DCS/HV	LBA26	57 	ATLTILLV01:Drawer26.Readings.Monitoring
+/TILE/DCS/HV	LBA27	58 	ATLTILLV01:Drawer27.Readings.Monitoring
+/TILE/DCS/HV	LBA28	59 	ATLTILLV01:Drawer28.Readings.Monitoring
+/TILE/DCS/HV	LBA29	60 	ATLTILLV01:Drawer29.Readings.Monitoring
+/TILE/DCS/HV	LBA30	62 	ATLTILLV01:Drawer30.Readings.Monitoring
+/TILE/DCS/HV	LBA31	63 	ATLTILLV01:Drawer31.Readings.Monitoring
+/TILE/DCS/HV	LBA32	64 	ATLTILLV01:Drawer32.Readings.Monitoring
+/TILE/DCS/HV	LBA33	65 	ATLTILLV01:Drawer33.Readings.Monitoring
+/TILE/DCS/HV	LBA34	66 	ATLTILLV01:Drawer34.Readings.Monitoring
+/TILE/DCS/HV	LBA35	67 	ATLTILLV01:Drawer35.Readings.Monitoring
+/TILE/DCS/HV	LBA36	68 	ATLTILLV01:Drawer36.Readings.Monitoring
+/TILE/DCS/HV	LBA37	251	ATLTILLV01:Drawer37.Readings.Monitoring
+/TILE/DCS/HV	LBA38	69 	ATLTILLV01:Drawer38.Readings.Monitoring
+/TILE/DCS/HV	LBA39	252	ATLTILLV01:Drawer39.Readings.Monitoring
+/TILE/DCS/HV	LBA40	253	ATLTILLV01:Drawer40.Readings.Monitoring
+/TILE/DCS/HV	LBA41	71 	ATLTILLV01:Drawer41.Readings.Monitoring
+/TILE/DCS/HV	LBA42	72 	ATLTILLV01:Drawer42.Readings.Monitoring
+/TILE/DCS/HV	LBA43	73 	ATLTILLV01:Drawer43.Readings.Monitoring
+/TILE/DCS/HV	LBA44	254	ATLTILLV01:Drawer44.Readings.Monitoring
+/TILE/DCS/HV	LBA45	74 	ATLTILLV01:Drawer45.Readings.Monitoring
+/TILE/DCS/HV	LBA46	75 	ATLTILLV01:Drawer46.Readings.Monitoring
+/TILE/DCS/HV	LBA47	76 	ATLTILLV01:Drawer47.Readings.Monitoring
+/TILE/DCS/HV	LBA48	212	ATLTILLV01:Drawer48.Readings.Monitoring
+/TILE/DCS/HV	LBA49	77 	ATLTILLV01:Drawer49.Readings.Monitoring
+/TILE/DCS/HV	LBA50	213	ATLTILLV01:Drawer50.Readings.Monitoring
+/TILE/DCS/HV	LBA51	214	ATLTILLV01:Drawer51.Readings.Monitoring
+/TILE/DCS/HV	LBA52	79 	ATLTILLV01:Drawer52.Readings.Monitoring
+/TILE/DCS/HV	LBA53	80 	ATLTILLV01:Drawer53.Readings.Monitoring
+/TILE/DCS/HV	LBA54	81 	ATLTILLV01:Drawer54.Readings.Monitoring
+/TILE/DCS/HV	LBA55	82 	ATLTILLV01:Drawer55.Readings.Monitoring
+/TILE/DCS/HV	LBA56	83 	ATLTILLV01:Drawer56.Readings.Monitoring
+/TILE/DCS/HV	LBA57	255	ATLTILLV01:Drawer57.Readings.Monitoring
+/TILE/DCS/HV	LBA58	84 	ATLTILLV01:Drawer58.Readings.Monitoring
+/TILE/DCS/HV	LBA59	85 	ATLTILLV01:Drawer59.Readings.Monitoring
+/TILE/DCS/HV	LBA60	86 	ATLTILLV01:Drawer60.Readings.Monitoring
+/TILE/DCS/HV	LBA61	87 	ATLTILLV01:Drawer61.Readings.Monitoring
+/TILE/DCS/HV	LBA62	88 	ATLTILLV01:Drawer62.Readings.Monitoring
+/TILE/DCS/HV	LBA63	89 	ATLTILLV01:Drawer63.Readings.Monitoring
+/TILE/DCS/HV	LBA64	216	ATLTILLV01:Drawer64.Readings.Monitoring
+/TILE/DCS/HV	LBC01	91 	ATLTILLV02:Drawer1.Readings.Monitoring
+/TILE/DCS/HV	LBC02	98 	ATLTILLV02:Drawer2.Readings.Monitoring
+/TILE/DCS/HV	LBC03	105	ATLTILLV02:Drawer3.Readings.Monitoring
+/TILE/DCS/HV	LBC04	113	ATLTILLV02:Drawer4.Readings.Monitoring
+/TILE/DCS/HV	LBC05	122	ATLTILLV02:Drawer5.Readings.Monitoring
+/TILE/DCS/HV	LBC06	131	ATLTILLV02:Drawer6.Readings.Monitoring
+/TILE/DCS/HV	LBC07	135	ATLTILLV02:Drawer7.Readings.Monitoring
+/TILE/DCS/HV	LBC08	235	ATLTILLV02:Drawer8.Readings.Monitoring
+/TILE/DCS/HV	LBC09	136	ATLTILLV02:Drawer9.Readings.Monitoring
+/TILE/DCS/HV	LBC10	92 	ATLTILLV02:Drawer10.Readings.Monitoring
+/TILE/DCS/HV	LBC11	219	ATLTILLV02:Drawer11.Readings.Monitoring
+/TILE/DCS/HV	LBC12	220	ATLTILLV02:Drawer12.Readings.Monitoring
+/TILE/DCS/HV	LBC13	93 	ATLTILLV02:Drawer13.Readings.Monitoring
+/TILE/DCS/HV	LBC14	94 	ATLTILLV02:Drawer14.Readings.Monitoring
+/TILE/DCS/HV	LBC15	95 	ATLTILLV02:Drawer15.Readings.Monitoring
+/TILE/DCS/HV	LBC16	96 	ATLTILLV02:Drawer16.Readings.Monitoring
+/TILE/DCS/HV	LBC17	221	ATLTILLV02:Drawer17.Readings.Monitoring
+/TILE/DCS/HV	LBC18	222	ATLTILLV02:Drawer18.Readings.Monitoring
+/TILE/DCS/HV	LBC19	97 	ATLTILLV02:Drawer19.Readings.Monitoring
+/TILE/DCS/HV	LBC20	99 	ATLTILLV02:Drawer20.Readings.Monitoring
+/TILE/DCS/HV	LBC21	100	ATLTILLV02:Drawer21.Readings.Monitoring
+/TILE/DCS/HV	LBC22	101	ATLTILLV02:Drawer22.Readings.Monitoring
+/TILE/DCS/HV	LBC23	223	ATLTILLV02:Drawer23.Readings.Monitoring
+/TILE/DCS/HV	LBC24	102	ATLTILLV02:Drawer24.Readings.Monitoring
+/TILE/DCS/HV	LBC25	103	ATLTILLV02:Drawer25.Readings.Monitoring
+/TILE/DCS/HV	LBC26	224	ATLTILLV02:Drawer26.Readings.Monitoring
+/TILE/DCS/HV	LBC27	104	ATLTILLV02:Drawer27.Readings.Monitoring
+/TILE/DCS/HV	LBC28	225	ATLTILLV02:Drawer28.Readings.Monitoring
+/TILE/DCS/HV	LBC29	226	ATLTILLV02:Drawer29.Readings.Monitoring
+/TILE/DCS/HV	LBC30	106	ATLTILLV02:Drawer30.Readings.Monitoring
+/TILE/DCS/HV	LBC31	107	ATLTILLV02:Drawer31.Readings.Monitoring
+/TILE/DCS/HV	LBC32	108	ATLTILLV02:Drawer32.Readings.Monitoring
+/TILE/DCS/HV	LBC33	227	ATLTILLV02:Drawer33.Readings.Monitoring
+/TILE/DCS/HV	LBC34	256	ATLTILLV02:Drawer34.Readings.Monitoring
+/TILE/DCS/HV	LBC35	109	ATLTILLV02:Drawer35.Readings.Monitoring
+/TILE/DCS/HV	LBC36	110	ATLTILLV02:Drawer36.Readings.Monitoring
+/TILE/DCS/HV	LBC37	111	ATLTILLV02:Drawer37.Readings.Monitoring
+/TILE/DCS/HV	LBC38	112	ATLTILLV02:Drawer38.Readings.Monitoring
+/TILE/DCS/HV	LBC39	228	ATLTILLV02:Drawer39.Readings.Monitoring
+/TILE/DCS/HV	LBC40	114	ATLTILLV02:Drawer40.Readings.Monitoring
+/TILE/DCS/HV	LBC41	115	ATLTILLV02:Drawer41.Readings.Monitoring
+/TILE/DCS/HV	LBC42	116	ATLTILLV02:Drawer42.Readings.Monitoring
+/TILE/DCS/HV	LBC43	229	ATLTILLV02:Drawer43.Readings.Monitoring
+/TILE/DCS/HV	LBC44	117	ATLTILLV02:Drawer44.Readings.Monitoring
+/TILE/DCS/HV	LBC45	118	ATLTILLV02:Drawer45.Readings.Monitoring
+/TILE/DCS/HV	LBC46	119	ATLTILLV02:Drawer46.Readings.Monitoring
+/TILE/DCS/HV	LBC47	230	ATLTILLV02:Drawer47.Readings.Monitoring
+/TILE/DCS/HV	LBC48	120	ATLTILLV02:Drawer48.Readings.Monitoring
+/TILE/DCS/HV	LBC49	121	ATLTILLV02:Drawer49.Readings.Monitoring
+/TILE/DCS/HV	LBC50	123	ATLTILLV02:Drawer50.Readings.Monitoring
+/TILE/DCS/HV	LBC51	124	ATLTILLV02:Drawer51.Readings.Monitoring
+/TILE/DCS/HV	LBC52	125	ATLTILLV02:Drawer52.Readings.Monitoring
+/TILE/DCS/HV	LBC53	126	ATLTILLV02:Drawer53.Readings.Monitoring
+/TILE/DCS/HV	LBC54	127	ATLTILLV02:Drawer54.Readings.Monitoring
+/TILE/DCS/HV	LBC55	231	ATLTILLV02:Drawer55.Readings.Monitoring
+/TILE/DCS/HV	LBC56	128	ATLTILLV02:Drawer56.Readings.Monitoring
+/TILE/DCS/HV	LBC57	129	ATLTILLV02:Drawer57.Readings.Monitoring
+/TILE/DCS/HV	LBC58	130	ATLTILLV02:Drawer58.Readings.Monitoring
+/TILE/DCS/HV	LBC59	232	ATLTILLV02:Drawer59.Readings.Monitoring
+/TILE/DCS/HV	LBC60	132	ATLTILLV02:Drawer60.Readings.Monitoring
+/TILE/DCS/HV	LBC61	233	ATLTILLV02:Drawer61.Readings.Monitoring
+/TILE/DCS/HV	LBC62	133	ATLTILLV02:Drawer62.Readings.Monitoring
+/TILE/DCS/HV	LBC63	234	ATLTILLV02:Drawer63.Readings.Monitoring
+/TILE/DCS/HV	LBC64	134	ATLTILLV02:Drawer64.Readings.Monitoring
+/TILE/DCS/HVSET	EBA01	129	ATLTILLV00:Drawer1.Readings.Requests
+/TILE/DCS/HVSET	EBA02	140	ATLTILLV00:Drawer2.Readings.Requests
+/TILE/DCS/HVSET	EBA03	151	ATLTILLV00:Drawer3.Readings.Requests
+/TILE/DCS/HVSET	EBA04	162	ATLTILLV00:Drawer4.Readings.Requests
+/TILE/DCS/HVSET	EBA05	173	ATLTILLV00:Drawer5.Readings.Requests
+/TILE/DCS/HVSET	EBA06	184	ATLTILLV00:Drawer6.Readings.Requests
+/TILE/DCS/HVSET	EBA07	190	ATLTILLV00:Drawer7.Readings.Requests
+/TILE/DCS/HVSET	EBA08	191	ATLTILLV00:Drawer8.Readings.Requests
+/TILE/DCS/HVSET	EBA09	192	ATLTILLV00:Drawer9.Readings.Requests
+/TILE/DCS/HVSET	EBA10	130	ATLTILLV00:Drawer10.Readings.Requests
+/TILE/DCS/HVSET	EBA11	131	ATLTILLV00:Drawer11.Readings.Requests
+/TILE/DCS/HVSET	EBA12	132	ATLTILLV00:Drawer12.Readings.Requests
+/TILE/DCS/HVSET	EBA13	133	ATLTILLV00:Drawer13.Readings.Requests
+/TILE/DCS/HVSET	EBA14	134	ATLTILLV00:Drawer14.Readings.Requests
+/TILE/DCS/HVSET	EBA15	135	ATLTILLV00:Drawer15.Readings.Requests
+/TILE/DCS/HVSET	EBA16	136	ATLTILLV00:Drawer16.Readings.Requests
+/TILE/DCS/HVSET	EBA17	137	ATLTILLV00:Drawer17.Readings.Requests
+/TILE/DCS/HVSET	EBA18	138	ATLTILLV00:Drawer18.Readings.Requests
+/TILE/DCS/HVSET	EBA19	139	ATLTILLV00:Drawer19.Readings.Requests
+/TILE/DCS/HVSET	EBA20	141	ATLTILLV00:Drawer20.Readings.Requests
+/TILE/DCS/HVSET	EBA21	142	ATLTILLV00:Drawer21.Readings.Requests
+/TILE/DCS/HVSET	EBA22	143	ATLTILLV00:Drawer22.Readings.Requests
+/TILE/DCS/HVSET	EBA23	144	ATLTILLV00:Drawer23.Readings.Requests
+/TILE/DCS/HVSET	EBA24	145	ATLTILLV00:Drawer24.Readings.Requests
+/TILE/DCS/HVSET	EBA25	146	ATLTILLV00:Drawer25.Readings.Requests
+/TILE/DCS/HVSET	EBA26	147	ATLTILLV00:Drawer26.Readings.Requests
+/TILE/DCS/HVSET	EBA27	148	ATLTILLV00:Drawer27.Readings.Requests
+/TILE/DCS/HVSET	EBA28	149	ATLTILLV00:Drawer28.Readings.Requests
+/TILE/DCS/HVSET	EBA29	150	ATLTILLV00:Drawer29.Readings.Requests
+/TILE/DCS/HVSET	EBA30	152	ATLTILLV00:Drawer30.Readings.Requests
+/TILE/DCS/HVSET	EBA31	153	ATLTILLV00:Drawer31.Readings.Requests
+/TILE/DCS/HVSET	EBA32	154	ATLTILLV00:Drawer32.Readings.Requests
+/TILE/DCS/HVSET	EBA33	155	ATLTILLV00:Drawer33.Readings.Requests
+/TILE/DCS/HVSET	EBA34	156	ATLTILLV00:Drawer34.Readings.Requests
+/TILE/DCS/HVSET	EBA35	157	ATLTILLV00:Drawer35.Readings.Requests
+/TILE/DCS/HVSET	EBA36	158	ATLTILLV00:Drawer36.Readings.Requests
+/TILE/DCS/HVSET	EBA37	159	ATLTILLV00:Drawer37.Readings.Requests
+/TILE/DCS/HVSET	EBA38	160	ATLTILLV00:Drawer38.Readings.Requests
+/TILE/DCS/HVSET	EBA39	161	ATLTILLV00:Drawer39.Readings.Requests
+/TILE/DCS/HVSET	EBA40	163	ATLTILLV00:Drawer40.Readings.Requests
+/TILE/DCS/HVSET	EBA41	164	ATLTILLV00:Drawer41.Readings.Requests
+/TILE/DCS/HVSET	EBA42	165	ATLTILLV00:Drawer42.Readings.Requests
+/TILE/DCS/HVSET	EBA43	166	ATLTILLV00:Drawer43.Readings.Requests
+/TILE/DCS/HVSET	EBA44	167	ATLTILLV00:Drawer44.Readings.Requests
+/TILE/DCS/HVSET	EBA45	168	ATLTILLV00:Drawer45.Readings.Requests
+/TILE/DCS/HVSET	EBA46	169	ATLTILLV00:Drawer46.Readings.Requests
+/TILE/DCS/HVSET	EBA47	170	ATLTILLV00:Drawer47.Readings.Requests
+/TILE/DCS/HVSET	EBA48	171	ATLTILLV00:Drawer48.Readings.Requests
+/TILE/DCS/HVSET	EBA49	172	ATLTILLV00:Drawer49.Readings.Requests
+/TILE/DCS/HVSET	EBA50	174	ATLTILLV00:Drawer50.Readings.Requests
+/TILE/DCS/HVSET	EBA51	175	ATLTILLV00:Drawer51.Readings.Requests
+/TILE/DCS/HVSET	EBA52	176	ATLTILLV00:Drawer52.Readings.Requests
+/TILE/DCS/HVSET	EBA53	177	ATLTILLV00:Drawer53.Readings.Requests
+/TILE/DCS/HVSET	EBA54	178	ATLTILLV00:Drawer54.Readings.Requests
+/TILE/DCS/HVSET	EBA55	179	ATLTILLV00:Drawer55.Readings.Requests
+/TILE/DCS/HVSET	EBA56	180	ATLTILLV00:Drawer56.Readings.Requests
+/TILE/DCS/HVSET	EBA57	181	ATLTILLV00:Drawer57.Readings.Requests
+/TILE/DCS/HVSET	EBA58	182	ATLTILLV00:Drawer58.Readings.Requests
+/TILE/DCS/HVSET	EBA59	183	ATLTILLV00:Drawer59.Readings.Requests
+/TILE/DCS/HVSET	EBA60	185	ATLTILLV00:Drawer60.Readings.Requests
+/TILE/DCS/HVSET	EBA61	186	ATLTILLV00:Drawer61.Readings.Requests
+/TILE/DCS/HVSET	EBA62	187	ATLTILLV00:Drawer62.Readings.Requests
+/TILE/DCS/HVSET	EBA63	188	ATLTILLV00:Drawer63.Readings.Requests
+/TILE/DCS/HVSET	EBA64	189	ATLTILLV00:Drawer64.Readings.Requests
+/TILE/DCS/HVSET	EBC01	2  	ATLTILLV03:Drawer1.Readings.Requests
+/TILE/DCS/HVSET	EBC02	13 	ATLTILLV03:Drawer2.Readings.Requests
+/TILE/DCS/HVSET	EBC03	24 	ATLTILLV03:Drawer3.Readings.Requests
+/TILE/DCS/HVSET	EBC04	35 	ATLTILLV03:Drawer4.Readings.Requests
+/TILE/DCS/HVSET	EBC05	45 	ATLTILLV03:Drawer5.Readings.Requests
+/TILE/DCS/HVSET	EBC06	56 	ATLTILLV03:Drawer6.Readings.Requests
+/TILE/DCS/HVSET	EBC07	62 	ATLTILLV03:Drawer7.Readings.Requests
+/TILE/DCS/HVSET	EBC08	63 	ATLTILLV03:Drawer8.Readings.Requests
+/TILE/DCS/HVSET	EBC09	64 	ATLTILLV03:Drawer9.Readings.Requests
+/TILE/DCS/HVSET	EBC10	3  	ATLTILLV03:Drawer10.Readings.Requests
+/TILE/DCS/HVSET	EBC11	4  	ATLTILLV03:Drawer11.Readings.Requests
+/TILE/DCS/HVSET	EBC12	5  	ATLTILLV03:Drawer12.Readings.Requests
+/TILE/DCS/HVSET	EBC13	6  	ATLTILLV03:Drawer13.Readings.Requests
+/TILE/DCS/HVSET	EBC14	7  	ATLTILLV03:Drawer14.Readings.Requests
+/TILE/DCS/HVSET	EBC15	8  	ATLTILLV03:Drawer15.Readings.Requests
+/TILE/DCS/HVSET	EBC16	9  	ATLTILLV03:Drawer16.Readings.Requests
+/TILE/DCS/HVSET	EBC17	10 	ATLTILLV03:Drawer17.Readings.Requests
+/TILE/DCS/HVSET	EBC18	11 	ATLTILLV03:Drawer18.Readings.Requests
+/TILE/DCS/HVSET	EBC19	12 	ATLTILLV03:Drawer19.Readings.Requests
+/TILE/DCS/HVSET	EBC20	14 	ATLTILLV03:Drawer20.Readings.Requests
+/TILE/DCS/HVSET	EBC21	15 	ATLTILLV03:Drawer21.Readings.Requests
+/TILE/DCS/HVSET	EBC22	16 	ATLTILLV03:Drawer22.Readings.Requests
+/TILE/DCS/HVSET	EBC23	17 	ATLTILLV03:Drawer23.Readings.Requests
+/TILE/DCS/HVSET	EBC24	18 	ATLTILLV03:Drawer24.Readings.Requests
+/TILE/DCS/HVSET	EBC25	19 	ATLTILLV03:Drawer25.Readings.Requests
+/TILE/DCS/HVSET	EBC26	20 	ATLTILLV03:Drawer26.Readings.Requests
+/TILE/DCS/HVSET	EBC27	21 	ATLTILLV03:Drawer27.Readings.Requests
+/TILE/DCS/HVSET	EBC28	22 	ATLTILLV03:Drawer28.Readings.Requests
+/TILE/DCS/HVSET	EBC29	23 	ATLTILLV03:Drawer29.Readings.Requests
+/TILE/DCS/HVSET	EBC30	25 	ATLTILLV03:Drawer30.Readings.Requests
+/TILE/DCS/HVSET	EBC31	26 	ATLTILLV03:Drawer31.Readings.Requests
+/TILE/DCS/HVSET	EBC32	27 	ATLTILLV03:Drawer32.Readings.Requests
+/TILE/DCS/HVSET	EBC33	28 	ATLTILLV03:Drawer33.Readings.Requests
+/TILE/DCS/HVSET	EBC34	29 	ATLTILLV03:Drawer34.Readings.Requests
+/TILE/DCS/HVSET	EBC35	30 	ATLTILLV03:Drawer35.Readings.Requests
+/TILE/DCS/HVSET	EBC36	31 	ATLTILLV03:Drawer36.Readings.Requests
+/TILE/DCS/HVSET	EBC37	32 	ATLTILLV03:Drawer37.Readings.Requests
+/TILE/DCS/HVSET	EBC38	33 	ATLTILLV03:Drawer38.Readings.Requests
+/TILE/DCS/HVSET	EBC39	34 	ATLTILLV03:Drawer39.Readings.Requests
+/TILE/DCS/HVSET	EBC40	36 	ATLTILLV03:Drawer40.Readings.Requests
+/TILE/DCS/HVSET	EBC41	37 	ATLTILLV03:Drawer41.Readings.Requests
+/TILE/DCS/HVSET	EBC42	1  	ATLTILLV03:Drawer42.Readings.Requests
+/TILE/DCS/HVSET	EBC43	38 	ATLTILLV03:Drawer43.Readings.Requests
+/TILE/DCS/HVSET	EBC44	39 	ATLTILLV03:Drawer44.Readings.Requests
+/TILE/DCS/HVSET	EBC45	40 	ATLTILLV03:Drawer45.Readings.Requests
+/TILE/DCS/HVSET	EBC46	41 	ATLTILLV03:Drawer46.Readings.Requests
+/TILE/DCS/HVSET	EBC47	42 	ATLTILLV03:Drawer47.Readings.Requests
+/TILE/DCS/HVSET	EBC48	43 	ATLTILLV03:Drawer48.Readings.Requests
+/TILE/DCS/HVSET	EBC49	44 	ATLTILLV03:Drawer49.Readings.Requests
+/TILE/DCS/HVSET	EBC50	46 	ATLTILLV03:Drawer50.Readings.Requests
+/TILE/DCS/HVSET	EBC51	47 	ATLTILLV03:Drawer51.Readings.Requests
+/TILE/DCS/HVSET	EBC52	48 	ATLTILLV03:Drawer52.Readings.Requests
+/TILE/DCS/HVSET	EBC53	49 	ATLTILLV03:Drawer53.Readings.Requests
+/TILE/DCS/HVSET	EBC54	50 	ATLTILLV03:Drawer54.Readings.Requests
+/TILE/DCS/HVSET	EBC55	51 	ATLTILLV03:Drawer55.Readings.Requests
+/TILE/DCS/HVSET	EBC56	52 	ATLTILLV03:Drawer56.Readings.Requests
+/TILE/DCS/HVSET	EBC57	53 	ATLTILLV03:Drawer57.Readings.Requests
+/TILE/DCS/HVSET	EBC58	54 	ATLTILLV03:Drawer58.Readings.Requests
+/TILE/DCS/HVSET	EBC59	55 	ATLTILLV03:Drawer59.Readings.Requests
+/TILE/DCS/HVSET	EBC60	57 	ATLTILLV03:Drawer60.Readings.Requests
+/TILE/DCS/HVSET	EBC61	58 	ATLTILLV03:Drawer61.Readings.Requests
+/TILE/DCS/HVSET	EBC62	59 	ATLTILLV03:Drawer62.Readings.Requests
+/TILE/DCS/HVSET	EBC63	60 	ATLTILLV03:Drawer63.Readings.Requests
+/TILE/DCS/HVSET	EBC64	61 	ATLTILLV03:Drawer64.Readings.Requests
+/TILE/DCS/HVSET	LBA01	193	ATLTILLV01:Drawer1.Readings.Requests
+/TILE/DCS/HVSET	LBA02	204	ATLTILLV01:Drawer2.Readings.Requests
+/TILE/DCS/HVSET	LBA03	215	ATLTILLV01:Drawer3.Readings.Requests
+/TILE/DCS/HVSET	LBA04	226	ATLTILLV01:Drawer4.Readings.Requests
+/TILE/DCS/HVSET	LBA05	237	ATLTILLV01:Drawer5.Readings.Requests
+/TILE/DCS/HVSET	LBA06	248	ATLTILLV01:Drawer6.Readings.Requests
+/TILE/DCS/HVSET	LBA07	254	ATLTILLV01:Drawer7.Readings.Requests
+/TILE/DCS/HVSET	LBA08	255	ATLTILLV01:Drawer8.Readings.Requests
+/TILE/DCS/HVSET	LBA09	256	ATLTILLV01:Drawer9.Readings.Requests
+/TILE/DCS/HVSET	LBA10	194	ATLTILLV01:Drawer10.Readings.Requests
+/TILE/DCS/HVSET	LBA11	195	ATLTILLV01:Drawer11.Readings.Requests
+/TILE/DCS/HVSET	LBA12	196	ATLTILLV01:Drawer12.Readings.Requests
+/TILE/DCS/HVSET	LBA13	197	ATLTILLV01:Drawer13.Readings.Requests
+/TILE/DCS/HVSET	LBA14	198	ATLTILLV01:Drawer14.Readings.Requests
+/TILE/DCS/HVSET	LBA15	199	ATLTILLV01:Drawer15.Readings.Requests
+/TILE/DCS/HVSET	LBA16	200	ATLTILLV01:Drawer16.Readings.Requests
+/TILE/DCS/HVSET	LBA17	201	ATLTILLV01:Drawer17.Readings.Requests
+/TILE/DCS/HVSET	LBA18	202	ATLTILLV01:Drawer18.Readings.Requests
+/TILE/DCS/HVSET	LBA19	203	ATLTILLV01:Drawer19.Readings.Requests
+/TILE/DCS/HVSET	LBA20	205	ATLTILLV01:Drawer20.Readings.Requests
+/TILE/DCS/HVSET	LBA21	206	ATLTILLV01:Drawer21.Readings.Requests
+/TILE/DCS/HVSET	LBA22	207	ATLTILLV01:Drawer22.Readings.Requests
+/TILE/DCS/HVSET	LBA23	208	ATLTILLV01:Drawer23.Readings.Requests
+/TILE/DCS/HVSET	LBA24	209	ATLTILLV01:Drawer24.Readings.Requests
+/TILE/DCS/HVSET	LBA25	210	ATLTILLV01:Drawer25.Readings.Requests
+/TILE/DCS/HVSET	LBA26	211	ATLTILLV01:Drawer26.Readings.Requests
+/TILE/DCS/HVSET	LBA27	212	ATLTILLV01:Drawer27.Readings.Requests
+/TILE/DCS/HVSET	LBA28	213	ATLTILLV01:Drawer28.Readings.Requests
+/TILE/DCS/HVSET	LBA29	214	ATLTILLV01:Drawer29.Readings.Requests
+/TILE/DCS/HVSET	LBA30	216	ATLTILLV01:Drawer30.Readings.Requests
+/TILE/DCS/HVSET	LBA31	217	ATLTILLV01:Drawer31.Readings.Requests
+/TILE/DCS/HVSET	LBA32	218	ATLTILLV01:Drawer32.Readings.Requests
+/TILE/DCS/HVSET	LBA33	219	ATLTILLV01:Drawer33.Readings.Requests
+/TILE/DCS/HVSET	LBA34	220	ATLTILLV01:Drawer34.Readings.Requests
+/TILE/DCS/HVSET	LBA35	221	ATLTILLV01:Drawer35.Readings.Requests
+/TILE/DCS/HVSET	LBA36	222	ATLTILLV01:Drawer36.Readings.Requests
+/TILE/DCS/HVSET	LBA37	223	ATLTILLV01:Drawer37.Readings.Requests
+/TILE/DCS/HVSET	LBA38	224	ATLTILLV01:Drawer38.Readings.Requests
+/TILE/DCS/HVSET	LBA39	225	ATLTILLV01:Drawer39.Readings.Requests
+/TILE/DCS/HVSET	LBA40	227	ATLTILLV01:Drawer40.Readings.Requests
+/TILE/DCS/HVSET	LBA41	228	ATLTILLV01:Drawer41.Readings.Requests
+/TILE/DCS/HVSET	LBA42	229	ATLTILLV01:Drawer42.Readings.Requests
+/TILE/DCS/HVSET	LBA43	230	ATLTILLV01:Drawer43.Readings.Requests
+/TILE/DCS/HVSET	LBA44	231	ATLTILLV01:Drawer44.Readings.Requests
+/TILE/DCS/HVSET	LBA45	232	ATLTILLV01:Drawer45.Readings.Requests
+/TILE/DCS/HVSET	LBA46	233	ATLTILLV01:Drawer46.Readings.Requests
+/TILE/DCS/HVSET	LBA47	234	ATLTILLV01:Drawer47.Readings.Requests
+/TILE/DCS/HVSET	LBA48	235	ATLTILLV01:Drawer48.Readings.Requests
+/TILE/DCS/HVSET	LBA49	236	ATLTILLV01:Drawer49.Readings.Requests
+/TILE/DCS/HVSET	LBA50	238	ATLTILLV01:Drawer50.Readings.Requests
+/TILE/DCS/HVSET	LBA51	239	ATLTILLV01:Drawer51.Readings.Requests
+/TILE/DCS/HVSET	LBA52	240	ATLTILLV01:Drawer52.Readings.Requests
+/TILE/DCS/HVSET	LBA53	241	ATLTILLV01:Drawer53.Readings.Requests
+/TILE/DCS/HVSET	LBA54	242	ATLTILLV01:Drawer54.Readings.Requests
+/TILE/DCS/HVSET	LBA55	243	ATLTILLV01:Drawer55.Readings.Requests
+/TILE/DCS/HVSET	LBA56	244	ATLTILLV01:Drawer56.Readings.Requests
+/TILE/DCS/HVSET	LBA57	245	ATLTILLV01:Drawer57.Readings.Requests
+/TILE/DCS/HVSET	LBA58	246	ATLTILLV01:Drawer58.Readings.Requests
+/TILE/DCS/HVSET	LBA59	247	ATLTILLV01:Drawer59.Readings.Requests
+/TILE/DCS/HVSET	LBA60	249	ATLTILLV01:Drawer60.Readings.Requests
+/TILE/DCS/HVSET	LBA61	250	ATLTILLV01:Drawer61.Readings.Requests
+/TILE/DCS/HVSET	LBA62	251	ATLTILLV01:Drawer62.Readings.Requests
+/TILE/DCS/HVSET	LBA63	252	ATLTILLV01:Drawer63.Readings.Requests
+/TILE/DCS/HVSET	LBA64	253	ATLTILLV01:Drawer64.Readings.Requests
+/TILE/DCS/HVSET	LBC01	65 	ATLTILLV02:Drawer1.Readings.Requests
+/TILE/DCS/HVSET	LBC02	76 	ATLTILLV02:Drawer2.Readings.Requests
+/TILE/DCS/HVSET	LBC03	87 	ATLTILLV02:Drawer3.Readings.Requests
+/TILE/DCS/HVSET	LBC04	98 	ATLTILLV02:Drawer4.Readings.Requests
+/TILE/DCS/HVSET	LBC05	109	ATLTILLV02:Drawer5.Readings.Requests
+/TILE/DCS/HVSET	LBC06	120	ATLTILLV02:Drawer6.Readings.Requests
+/TILE/DCS/HVSET	LBC07	126	ATLTILLV02:Drawer7.Readings.Requests
+/TILE/DCS/HVSET	LBC08	127	ATLTILLV02:Drawer8.Readings.Requests
+/TILE/DCS/HVSET	LBC09	128	ATLTILLV02:Drawer9.Readings.Requests
+/TILE/DCS/HVSET	LBC10	66 	ATLTILLV02:Drawer10.Readings.Requests
+/TILE/DCS/HVSET	LBC11	67 	ATLTILLV02:Drawer11.Readings.Requests
+/TILE/DCS/HVSET	LBC12	68 	ATLTILLV02:Drawer12.Readings.Requests
+/TILE/DCS/HVSET	LBC13	69 	ATLTILLV02:Drawer13.Readings.Requests
+/TILE/DCS/HVSET	LBC14	70 	ATLTILLV02:Drawer14.Readings.Requests
+/TILE/DCS/HVSET	LBC15	71 	ATLTILLV02:Drawer15.Readings.Requests
+/TILE/DCS/HVSET	LBC16	72 	ATLTILLV02:Drawer16.Readings.Requests
+/TILE/DCS/HVSET	LBC17	73 	ATLTILLV02:Drawer17.Readings.Requests
+/TILE/DCS/HVSET	LBC18	74 	ATLTILLV02:Drawer18.Readings.Requests
+/TILE/DCS/HVSET	LBC19	75 	ATLTILLV02:Drawer19.Readings.Requests
+/TILE/DCS/HVSET	LBC20	77 	ATLTILLV02:Drawer20.Readings.Requests
+/TILE/DCS/HVSET	LBC21	78 	ATLTILLV02:Drawer21.Readings.Requests
+/TILE/DCS/HVSET	LBC22	79 	ATLTILLV02:Drawer22.Readings.Requests
+/TILE/DCS/HVSET	LBC23	80 	ATLTILLV02:Drawer23.Readings.Requests
+/TILE/DCS/HVSET	LBC24	81 	ATLTILLV02:Drawer24.Readings.Requests
+/TILE/DCS/HVSET	LBC25	82 	ATLTILLV02:Drawer25.Readings.Requests
+/TILE/DCS/HVSET	LBC26	83 	ATLTILLV02:Drawer26.Readings.Requests
+/TILE/DCS/HVSET	LBC27	84 	ATLTILLV02:Drawer27.Readings.Requests
+/TILE/DCS/HVSET	LBC28	85 	ATLTILLV02:Drawer28.Readings.Requests
+/TILE/DCS/HVSET	LBC29	86 	ATLTILLV02:Drawer29.Readings.Requests
+/TILE/DCS/HVSET	LBC30	88 	ATLTILLV02:Drawer30.Readings.Requests
+/TILE/DCS/HVSET	LBC31	89 	ATLTILLV02:Drawer31.Readings.Requests
+/TILE/DCS/HVSET	LBC32	90 	ATLTILLV02:Drawer32.Readings.Requests
+/TILE/DCS/HVSET	LBC33	91 	ATLTILLV02:Drawer33.Readings.Requests
+/TILE/DCS/HVSET	LBC34	92 	ATLTILLV02:Drawer34.Readings.Requests
+/TILE/DCS/HVSET	LBC35	93 	ATLTILLV02:Drawer35.Readings.Requests
+/TILE/DCS/HVSET	LBC36	94 	ATLTILLV02:Drawer36.Readings.Requests
+/TILE/DCS/HVSET	LBC37	95 	ATLTILLV02:Drawer37.Readings.Requests
+/TILE/DCS/HVSET	LBC38	96 	ATLTILLV02:Drawer38.Readings.Requests
+/TILE/DCS/HVSET	LBC39	97 	ATLTILLV02:Drawer39.Readings.Requests
+/TILE/DCS/HVSET	LBC40	99 	ATLTILLV02:Drawer40.Readings.Requests
+/TILE/DCS/HVSET	LBC41	100	ATLTILLV02:Drawer41.Readings.Requests
+/TILE/DCS/HVSET	LBC42	101	ATLTILLV02:Drawer42.Readings.Requests
+/TILE/DCS/HVSET	LBC43	102	ATLTILLV02:Drawer43.Readings.Requests
+/TILE/DCS/HVSET	LBC44	103	ATLTILLV02:Drawer44.Readings.Requests
+/TILE/DCS/HVSET	LBC45	104	ATLTILLV02:Drawer45.Readings.Requests
+/TILE/DCS/HVSET	LBC46	105	ATLTILLV02:Drawer46.Readings.Requests
+/TILE/DCS/HVSET	LBC47	106	ATLTILLV02:Drawer47.Readings.Requests
+/TILE/DCS/HVSET	LBC48	107	ATLTILLV02:Drawer48.Readings.Requests
+/TILE/DCS/HVSET	LBC49	108	ATLTILLV02:Drawer49.Readings.Requests
+/TILE/DCS/HVSET	LBC50	110	ATLTILLV02:Drawer50.Readings.Requests
+/TILE/DCS/HVSET	LBC51	111	ATLTILLV02:Drawer51.Readings.Requests
+/TILE/DCS/HVSET	LBC52	112	ATLTILLV02:Drawer52.Readings.Requests
+/TILE/DCS/HVSET	LBC53	113	ATLTILLV02:Drawer53.Readings.Requests
+/TILE/DCS/HVSET	LBC54	114	ATLTILLV02:Drawer54.Readings.Requests
+/TILE/DCS/HVSET	LBC55	115	ATLTILLV02:Drawer55.Readings.Requests
+/TILE/DCS/HVSET	LBC56	116	ATLTILLV02:Drawer56.Readings.Requests
+/TILE/DCS/HVSET	LBC57	117	ATLTILLV02:Drawer57.Readings.Requests
+/TILE/DCS/HVSET	LBC58	118	ATLTILLV02:Drawer58.Readings.Requests
+/TILE/DCS/HVSET	LBC59	119	ATLTILLV02:Drawer59.Readings.Requests
+/TILE/DCS/HVSET	LBC60	121	ATLTILLV02:Drawer60.Readings.Requests
+/TILE/DCS/HVSET	LBC61	122	ATLTILLV02:Drawer61.Readings.Requests
+/TILE/DCS/HVSET	LBC62	123	ATLTILLV02:Drawer62.Readings.Requests
+/TILE/DCS/HVSET	LBC63	124	ATLTILLV02:Drawer63.Readings.Requests
+/TILE/DCS/HVSET	LBC64	125	ATLTILLV02:Drawer64.Readings.Requests
+/TILE/DCS/STATES	EBA01	241	ATLTILLV00:ELMB/LVCAN4/LVPS_1/states
+/TILE/DCS/STATES	EBA02	242	ATLTILLV00:ELMB/LVCAN4/LVPS_2/states
+/TILE/DCS/STATES	EBA03	243	ATLTILLV00:ELMB/LVCAN4/LVPS_3/states
+/TILE/DCS/STATES	EBA04	244	ATLTILLV00:ELMB/LVCAN4/LVPS_4/states
+/TILE/DCS/STATES	EBA05	248	ATLTILLV00:ELMB/LVCAN4/LVPS_5/states
+/TILE/DCS/STATES	EBA06	254	ATLTILLV00:ELMB/LVCAN4/LVPS_6/states
+/TILE/DCS/STATES	EBA07	255	ATLTILLV00:ELMB/LVCAN4/LVPS_7/states
+/TILE/DCS/STATES	EBA08	256	ATLTILLV00:ELMB/LVCAN4/LVPS_8/states
+/TILE/DCS/STATES	EBA09	208	ATLTILLV00:ELMB/LVCAN1/LVPS_9/states
+/TILE/DCS/STATES	EBA10	193	ATLTILLV00:ELMB/LVCAN1/LVPS_10/states
+/TILE/DCS/STATES	EBA11	194	ATLTILLV00:ELMB/LVCAN1/LVPS_11/states
+/TILE/DCS/STATES	EBA12	195	ATLTILLV00:ELMB/LVCAN1/LVPS_12/states
+/TILE/DCS/STATES	EBA13	196	ATLTILLV00:ELMB/LVCAN1/LVPS_13/states
+/TILE/DCS/STATES	EBA14	197	ATLTILLV00:ELMB/LVCAN1/LVPS_14/states
+/TILE/DCS/STATES	EBA15	198	ATLTILLV00:ELMB/LVCAN1/LVPS_15/states
+/TILE/DCS/STATES	EBA16	199	ATLTILLV00:ELMB/LVCAN1/LVPS_16/states
+/TILE/DCS/STATES	EBA17	200	ATLTILLV00:ELMB/LVCAN1/LVPS_17/states
+/TILE/DCS/STATES	EBA18	201	ATLTILLV00:ELMB/LVCAN1/LVPS_18/states
+/TILE/DCS/STATES	EBA19	202	ATLTILLV00:ELMB/LVCAN1/LVPS_19/states
+/TILE/DCS/STATES	EBA20	203	ATLTILLV00:ELMB/LVCAN1/LVPS_20/states
+/TILE/DCS/STATES	EBA21	204	ATLTILLV00:ELMB/LVCAN1/LVPS_21/states
+/TILE/DCS/STATES	EBA22	205	ATLTILLV00:ELMB/LVCAN1/LVPS_22/states
+/TILE/DCS/STATES	EBA23	206	ATLTILLV00:ELMB/LVCAN1/LVPS_23/states
+/TILE/DCS/STATES	EBA24	207	ATLTILLV00:ELMB/LVCAN1/LVPS_24/states
+/TILE/DCS/STATES	EBA25	209	ATLTILLV00:ELMB/LVCAN2/LVPS_25/states
+/TILE/DCS/STATES	EBA26	210	ATLTILLV00:ELMB/LVCAN2/LVPS_26/states
+/TILE/DCS/STATES	EBA27	211	ATLTILLV00:ELMB/LVCAN2/LVPS_27/states
+/TILE/DCS/STATES	EBA28	212	ATLTILLV00:ELMB/LVCAN2/LVPS_28/states
+/TILE/DCS/STATES	EBA29	213	ATLTILLV00:ELMB/LVCAN2/LVPS_29/states
+/TILE/DCS/STATES	EBA30	214	ATLTILLV00:ELMB/LVCAN2/LVPS_30/states
+/TILE/DCS/STATES	EBA31	215	ATLTILLV00:ELMB/LVCAN2/LVPS_31/states
+/TILE/DCS/STATES	EBA32	216	ATLTILLV00:ELMB/LVCAN2/LVPS_32/states
+/TILE/DCS/STATES	EBA33	217	ATLTILLV00:ELMB/LVCAN2/LVPS_33/states
+/TILE/DCS/STATES	EBA34	218	ATLTILLV00:ELMB/LVCAN2/LVPS_34/states
+/TILE/DCS/STATES	EBA35	219	ATLTILLV00:ELMB/LVCAN2/LVPS_35/states
+/TILE/DCS/STATES	EBA36	220	ATLTILLV00:ELMB/LVCAN2/LVPS_36/states
+/TILE/DCS/STATES	EBA37	221	ATLTILLV00:ELMB/LVCAN2/LVPS_37/states
+/TILE/DCS/STATES	EBA38	222	ATLTILLV00:ELMB/LVCAN2/LVPS_38/states
+/TILE/DCS/STATES	EBA39	223	ATLTILLV00:ELMB/LVCAN2/LVPS_39/states
+/TILE/DCS/STATES	EBA40	224	ATLTILLV00:ELMB/LVCAN2/LVPS_40/states
+/TILE/DCS/STATES	EBA41	225	ATLTILLV00:ELMB/LVCAN3/LVPS_41/states
+/TILE/DCS/STATES	EBA42	226	ATLTILLV00:ELMB/LVCAN3/LVPS_42/states
+/TILE/DCS/STATES	EBA43	227	ATLTILLV00:ELMB/LVCAN3/LVPS_43/states
+/TILE/DCS/STATES	EBA44	228	ATLTILLV00:ELMB/LVCAN3/LVPS_44/states
+/TILE/DCS/STATES	EBA45	229	ATLTILLV00:ELMB/LVCAN3/LVPS_45/states
+/TILE/DCS/STATES	EBA46	230	ATLTILLV00:ELMB/LVCAN3/LVPS_46/states
+/TILE/DCS/STATES	EBA47	231	ATLTILLV00:ELMB/LVCAN3/LVPS_47/states
+/TILE/DCS/STATES	EBA48	232	ATLTILLV00:ELMB/LVCAN3/LVPS_48/states
+/TILE/DCS/STATES	EBA49	233	ATLTILLV00:ELMB/LVCAN3/LVPS_49/states
+/TILE/DCS/STATES	EBA50	234	ATLTILLV00:ELMB/LVCAN3/LVPS_50/states
+/TILE/DCS/STATES	EBA51	235	ATLTILLV00:ELMB/LVCAN3/LVPS_51/states
+/TILE/DCS/STATES	EBA52	236	ATLTILLV00:ELMB/LVCAN3/LVPS_52/states
+/TILE/DCS/STATES	EBA53	237	ATLTILLV00:ELMB/LVCAN3/LVPS_53/states
+/TILE/DCS/STATES	EBA54	238	ATLTILLV00:ELMB/LVCAN3/LVPS_54/states
+/TILE/DCS/STATES	EBA55	239	ATLTILLV00:ELMB/LVCAN3/LVPS_55/states
+/TILE/DCS/STATES	EBA56	240	ATLTILLV00:ELMB/LVCAN3/LVPS_56/states
+/TILE/DCS/STATES	EBA57	245	ATLTILLV00:ELMB/LVCAN4/LVPS_57/states
+/TILE/DCS/STATES	EBA58	246	ATLTILLV00:ELMB/LVCAN4/LVPS_58/states
+/TILE/DCS/STATES	EBA59	247	ATLTILLV00:ELMB/LVCAN4/LVPS_59/states
+/TILE/DCS/STATES	EBA60	249	ATLTILLV00:ELMB/LVCAN4/LVPS_60/states
+/TILE/DCS/STATES	EBA61	250	ATLTILLV00:ELMB/LVCAN4/LVPS_61/states
+/TILE/DCS/STATES	EBA62	251	ATLTILLV00:ELMB/LVCAN4/LVPS_62/states
+/TILE/DCS/STATES	EBA63	252	ATLTILLV00:ELMB/LVCAN4/LVPS_63/states
+/TILE/DCS/STATES	EBA64	253	ATLTILLV00:ELMB/LVCAN4/LVPS_64/states
+/TILE/DCS/STATES	EBC01	177	ATLTILLV03:ELMB/LVCAN4/LVPS_1/states
+/TILE/DCS/STATES	EBC02	178	ATLTILLV03:ELMB/LVCAN4/LVPS_2/states
+/TILE/DCS/STATES	EBC03	179	ATLTILLV03:ELMB/LVCAN4/LVPS_3/states
+/TILE/DCS/STATES	EBC04	180	ATLTILLV03:ELMB/LVCAN4/LVPS_4/states
+/TILE/DCS/STATES	EBC05	184	ATLTILLV03:ELMB/LVCAN4/LVPS_5/states
+/TILE/DCS/STATES	EBC06	190	ATLTILLV03:ELMB/LVCAN4/LVPS_6/states
+/TILE/DCS/STATES	EBC07	191	ATLTILLV03:ELMB/LVCAN4/LVPS_7/states
+/TILE/DCS/STATES	EBC08	192	ATLTILLV03:ELMB/LVCAN4/LVPS_8/states
+/TILE/DCS/STATES	EBC09	145	ATLTILLV03:ELMB/LVCAN1/LVPS_9/states
+/TILE/DCS/STATES	EBC10	131	ATLTILLV03:ELMB/LVCAN1/LVPS_10/states
+/TILE/DCS/STATES	EBC11	132	ATLTILLV03:ELMB/LVCAN1/LVPS_11/states
+/TILE/DCS/STATES	EBC12	133	ATLTILLV03:ELMB/LVCAN1/LVPS_12/states
+/TILE/DCS/STATES	EBC13	64	ATLTILLV03:ELMB/LVCAN1/LVPS_13/states
+/TILE/DCS/STATES	EBC14	134	ATLTILLV03:ELMB/LVCAN1/LVPS_14/states
+/TILE/DCS/STATES	EBC15	135	ATLTILLV03:ELMB/LVCAN1/LVPS_15/states
+/TILE/DCS/STATES	EBC16	136	ATLTILLV03:ELMB/LVCAN1/LVPS_16/states
+/TILE/DCS/STATES	EBC17	137	ATLTILLV03:ELMB/LVCAN1/LVPS_17/states
+/TILE/DCS/STATES	EBC18	138	ATLTILLV03:ELMB/LVCAN1/LVPS_18/states
+/TILE/DCS/STATES	EBC19	139	ATLTILLV03:ELMB/LVCAN1/LVPS_19/states
+/TILE/DCS/STATES	EBC20	140	ATLTILLV03:ELMB/LVCAN1/LVPS_20/states
+/TILE/DCS/STATES	EBC21	141	ATLTILLV03:ELMB/LVCAN1/LVPS_21/states
+/TILE/DCS/STATES	EBC22	142	ATLTILLV03:ELMB/LVCAN1/LVPS_22/states
+/TILE/DCS/STATES	EBC23	143	ATLTILLV03:ELMB/LVCAN1/LVPS_23/states
+/TILE/DCS/STATES	EBC24	144	ATLTILLV03:ELMB/LVCAN1/LVPS_24/states
+/TILE/DCS/STATES	EBC25	146	ATLTILLV03:ELMB/LVCAN2/LVPS_25/states
+/TILE/DCS/STATES	EBC26	147	ATLTILLV03:ELMB/LVCAN2/LVPS_26/states
+/TILE/DCS/STATES	EBC27	148	ATLTILLV03:ELMB/LVCAN2/LVPS_27/states
+/TILE/DCS/STATES	EBC28	149	ATLTILLV03:ELMB/LVCAN2/LVPS_28/states
+/TILE/DCS/STATES	EBC29	150	ATLTILLV03:ELMB/LVCAN2/LVPS_29/states
+/TILE/DCS/STATES	EBC30	151	ATLTILLV03:ELMB/LVCAN2/LVPS_30/states
+/TILE/DCS/STATES	EBC31	152	ATLTILLV03:ELMB/LVCAN2/LVPS_31/states
+/TILE/DCS/STATES	EBC32	153	ATLTILLV03:ELMB/LVCAN2/LVPS_32/states
+/TILE/DCS/STATES	EBC33	154	ATLTILLV03:ELMB/LVCAN2/LVPS_33/states
+/TILE/DCS/STATES	EBC34	155	ATLTILLV03:ELMB/LVCAN2/LVPS_34/states
+/TILE/DCS/STATES	EBC35	156	ATLTILLV03:ELMB/LVCAN2/LVPS_35/states
+/TILE/DCS/STATES	EBC36	157	ATLTILLV03:ELMB/LVCAN2/LVPS_36/states
+/TILE/DCS/STATES	EBC37	158	ATLTILLV03:ELMB/LVCAN2/LVPS_37/states
+/TILE/DCS/STATES	EBC38	159	ATLTILLV03:ELMB/LVCAN2/LVPS_38/states
+/TILE/DCS/STATES	EBC39	160	ATLTILLV03:ELMB/LVCAN2/LVPS_39/states
+/TILE/DCS/STATES	EBC40	161	ATLTILLV03:ELMB/LVCAN2/LVPS_40/states
+/TILE/DCS/STATES	EBC41	162	ATLTILLV03:ELMB/LVCAN3/LVPS_41/states
+/TILE/DCS/STATES	EBC42	130	ATLTILLV03:ELMB/LVCAN3/LVPS_42/states
+/TILE/DCS/STATES	EBC43	163	ATLTILLV03:ELMB/LVCAN3/LVPS_43/states
+/TILE/DCS/STATES	EBC44	164	ATLTILLV03:ELMB/LVCAN3/LVPS_44/states
+/TILE/DCS/STATES	EBC45	165	ATLTILLV03:ELMB/LVCAN3/LVPS_45/states
+/TILE/DCS/STATES	EBC46	166	ATLTILLV03:ELMB/LVCAN3/LVPS_46/states
+/TILE/DCS/STATES	EBC47	167	ATLTILLV03:ELMB/LVCAN3/LVPS_47/states
+/TILE/DCS/STATES	EBC48	168	ATLTILLV03:ELMB/LVCAN3/LVPS_48/states
+/TILE/DCS/STATES	EBC49	169	ATLTILLV03:ELMB/LVCAN3/LVPS_49/states
+/TILE/DCS/STATES	EBC50	170	ATLTILLV03:ELMB/LVCAN3/LVPS_50/states
+/TILE/DCS/STATES	EBC51	171	ATLTILLV03:ELMB/LVCAN3/LVPS_51/states
+/TILE/DCS/STATES	EBC52	172	ATLTILLV03:ELMB/LVCAN3/LVPS_52/states
+/TILE/DCS/STATES	EBC53	173	ATLTILLV03:ELMB/LVCAN3/LVPS_53/states
+/TILE/DCS/STATES	EBC54	174	ATLTILLV03:ELMB/LVCAN3/LVPS_54/states
+/TILE/DCS/STATES	EBC55	175	ATLTILLV03:ELMB/LVCAN3/LVPS_55/states
+/TILE/DCS/STATES	EBC56	176	ATLTILLV03:ELMB/LVCAN3/LVPS_56/states
+/TILE/DCS/STATES	EBC57	181	ATLTILLV03:ELMB/LVCAN4/LVPS_57/states
+/TILE/DCS/STATES	EBC58	182	ATLTILLV03:ELMB/LVCAN4/LVPS_58/states
+/TILE/DCS/STATES	EBC59	183	ATLTILLV03:ELMB/LVCAN4/LVPS_59/states
+/TILE/DCS/STATES	EBC60	185	ATLTILLV03:ELMB/LVCAN4/LVPS_60/states
+/TILE/DCS/STATES	EBC61	186	ATLTILLV03:ELMB/LVCAN4/LVPS_61/states
+/TILE/DCS/STATES	EBC62	187	ATLTILLV03:ELMB/LVCAN4/LVPS_62/states
+/TILE/DCS/STATES	EBC63	188	ATLTILLV03:ELMB/LVCAN4/LVPS_63/states
+/TILE/DCS/STATES	EBC64	189	ATLTILLV03:ELMB/LVCAN4/LVPS_64/states
+/TILE/DCS/STATES	LBA01	49	ATLTILLV01:ELMB/LVCAN4/LVPS_1/states
+/TILE/DCS/STATES	LBA02	50	ATLTILLV01:ELMB/LVCAN4/LVPS_2/states
+/TILE/DCS/STATES	LBA03	51	ATLTILLV01:ELMB/LVCAN4/LVPS_3/states
+/TILE/DCS/STATES	LBA04	65	ATLTILLV01:ELMB/LVCAN4/LVPS_4/states
+/TILE/DCS/STATES	LBA05	55	ATLTILLV01:ELMB/LVCAN4/LVPS_5/states
+/TILE/DCS/STATES	LBA06	61	ATLTILLV01:ELMB/LVCAN4/LVPS_6/states
+/TILE/DCS/STATES	LBA07	62	ATLTILLV01:ELMB/LVCAN4/LVPS_7/states
+/TILE/DCS/STATES	LBA08	63	ATLTILLV01:ELMB/LVCAN4/LVPS_8/states
+/TILE/DCS/STATES	LBA09	16	ATLTILLV01:ELMB/LVCAN1/LVPS_9/states
+/TILE/DCS/STATES	LBA10	1 	ATLTILLV01:ELMB/LVCAN1/LVPS_10/states
+/TILE/DCS/STATES	LBA11	2 	ATLTILLV01:ELMB/LVCAN1/LVPS_11/states
+/TILE/DCS/STATES	LBA12	3 	ATLTILLV01:ELMB/LVCAN1/LVPS_12/states
+/TILE/DCS/STATES	LBA13	4 	ATLTILLV01:ELMB/LVCAN1/LVPS_13/states
+/TILE/DCS/STATES	LBA14	5 	ATLTILLV01:ELMB/LVCAN1/LVPS_14/states
+/TILE/DCS/STATES	LBA15	6 	ATLTILLV01:ELMB/LVCAN1/LVPS_15/states
+/TILE/DCS/STATES	LBA16	7 	ATLTILLV01:ELMB/LVCAN1/LVPS_16/states
+/TILE/DCS/STATES	LBA17	8 	ATLTILLV01:ELMB/LVCAN1/LVPS_17/states
+/TILE/DCS/STATES	LBA18	9 	ATLTILLV01:ELMB/LVCAN1/LVPS_18/states
+/TILE/DCS/STATES	LBA19	10	ATLTILLV01:ELMB/LVCAN1/LVPS_19/states
+/TILE/DCS/STATES	LBA20	11	ATLTILLV01:ELMB/LVCAN1/LVPS_20/states
+/TILE/DCS/STATES	LBA21	12	ATLTILLV01:ELMB/LVCAN1/LVPS_21/states
+/TILE/DCS/STATES	LBA22	13	ATLTILLV01:ELMB/LVCAN1/LVPS_22/states
+/TILE/DCS/STATES	LBA23	14	ATLTILLV01:ELMB/LVCAN1/LVPS_23/states
+/TILE/DCS/STATES	LBA24	15	ATLTILLV01:ELMB/LVCAN1/LVPS_24/states
+/TILE/DCS/STATES	LBA25	17	ATLTILLV01:ELMB/LVCAN2/LVPS_25/states
+/TILE/DCS/STATES	LBA26	18	ATLTILLV01:ELMB/LVCAN2/LVPS_26/states
+/TILE/DCS/STATES	LBA27	19	ATLTILLV01:ELMB/LVCAN2/LVPS_27/states
+/TILE/DCS/STATES	LBA28	20	ATLTILLV01:ELMB/LVCAN2/LVPS_28/states
+/TILE/DCS/STATES	LBA29	21	ATLTILLV01:ELMB/LVCAN2/LVPS_29/states
+/TILE/DCS/STATES	LBA30	22	ATLTILLV01:ELMB/LVCAN2/LVPS_30/states
+/TILE/DCS/STATES	LBA31	23	ATLTILLV01:ELMB/LVCAN2/LVPS_31/states
+/TILE/DCS/STATES	LBA32	24	ATLTILLV01:ELMB/LVCAN2/LVPS_32/states
+/TILE/DCS/STATES	LBA33	25	ATLTILLV01:ELMB/LVCAN2/LVPS_33/states
+/TILE/DCS/STATES	LBA34	26	ATLTILLV01:ELMB/LVCAN2/LVPS_34/states
+/TILE/DCS/STATES	LBA35	27	ATLTILLV01:ELMB/LVCAN2/LVPS_35/states
+/TILE/DCS/STATES	LBA36	28	ATLTILLV01:ELMB/LVCAN2/LVPS_36/states
+/TILE/DCS/STATES	LBA37	29	ATLTILLV01:ELMB/LVCAN2/LVPS_37/states
+/TILE/DCS/STATES	LBA38	30	ATLTILLV01:ELMB/LVCAN2/LVPS_38/states
+/TILE/DCS/STATES	LBA39	31	ATLTILLV01:ELMB/LVCAN2/LVPS_39/states
+/TILE/DCS/STATES	LBA40	32	ATLTILLV01:ELMB/LVCAN2/LVPS_40/states
+/TILE/DCS/STATES	LBA41	33	ATLTILLV01:ELMB/LVCAN3/LVPS_41/states
+/TILE/DCS/STATES	LBA42	34	ATLTILLV01:ELMB/LVCAN3/LVPS_42/states
+/TILE/DCS/STATES	LBA43	35	ATLTILLV01:ELMB/LVCAN3/LVPS_43/states
+/TILE/DCS/STATES	LBA44	36	ATLTILLV01:ELMB/LVCAN3/LVPS_44/states
+/TILE/DCS/STATES	LBA45	37	ATLTILLV01:ELMB/LVCAN3/LVPS_45/states
+/TILE/DCS/STATES	LBA46	38	ATLTILLV01:ELMB/LVCAN3/LVPS_46/states
+/TILE/DCS/STATES	LBA47	39	ATLTILLV01:ELMB/LVCAN3/LVPS_47/states
+/TILE/DCS/STATES	LBA48	40	ATLTILLV01:ELMB/LVCAN3/LVPS_48/states
+/TILE/DCS/STATES	LBA49	41	ATLTILLV01:ELMB/LVCAN3/LVPS_49/states
+/TILE/DCS/STATES	LBA50	42	ATLTILLV01:ELMB/LVCAN3/LVPS_50/states
+/TILE/DCS/STATES	LBA51	43	ATLTILLV01:ELMB/LVCAN3/LVPS_51/states
+/TILE/DCS/STATES	LBA52	44	ATLTILLV01:ELMB/LVCAN3/LVPS_52/states
+/TILE/DCS/STATES	LBA53	45	ATLTILLV01:ELMB/LVCAN3/LVPS_53/states
+/TILE/DCS/STATES	LBA54	46	ATLTILLV01:ELMB/LVCAN3/LVPS_54/states
+/TILE/DCS/STATES	LBA55	47	ATLTILLV01:ELMB/LVCAN3/LVPS_55/states
+/TILE/DCS/STATES	LBA56	48	ATLTILLV01:ELMB/LVCAN3/LVPS_56/states
+/TILE/DCS/STATES	LBA57	52	ATLTILLV01:ELMB/LVCAN4/LVPS_57/states
+/TILE/DCS/STATES	LBA58	53	ATLTILLV01:ELMB/LVCAN4/LVPS_58/states
+/TILE/DCS/STATES	LBA59	54	ATLTILLV01:ELMB/LVCAN4/LVPS_59/states
+/TILE/DCS/STATES	LBA60	56	ATLTILLV01:ELMB/LVCAN4/LVPS_60/states
+/TILE/DCS/STATES	LBA61	57	ATLTILLV01:ELMB/LVCAN4/LVPS_61/states
+/TILE/DCS/STATES	LBA62	58	ATLTILLV01:ELMB/LVCAN4/LVPS_62/states
+/TILE/DCS/STATES	LBA63	59	ATLTILLV01:ELMB/LVCAN4/LVPS_63/states
+/TILE/DCS/STATES	LBA64	60	ATLTILLV01:ELMB/LVCAN4/LVPS_64/states
+/TILE/DCS/STATES	LBC01	114	ATLTILLV02:ELMB/LVCAN4/LVPS_1/states
+/TILE/DCS/STATES	LBC02	115	ATLTILLV02:ELMB/LVCAN4/LVPS_2/states
+/TILE/DCS/STATES	LBC03	116	ATLTILLV02:ELMB/LVCAN4/LVPS_3/states
+/TILE/DCS/STATES	LBC04	117	ATLTILLV02:ELMB/LVCAN4/LVPS_4/states
+/TILE/DCS/STATES	LBC05	121	ATLTILLV02:ELMB/LVCAN4/LVPS_5/states
+/TILE/DCS/STATES	LBC06	127	ATLTILLV02:ELMB/LVCAN4/LVPS_6/states
+/TILE/DCS/STATES	LBC07	128	ATLTILLV02:ELMB/LVCAN4/LVPS_7/states
+/TILE/DCS/STATES	LBC08	129	ATLTILLV02:ELMB/LVCAN4/LVPS_8/states
+/TILE/DCS/STATES	LBC09	81	ATLTILLV02:ELMB/LVCAN1/LVPS_9/states
+/TILE/DCS/STATES	LBC10	66	ATLTILLV02:ELMB/LVCAN1/LVPS_10/states
+/TILE/DCS/STATES	LBC11	67	ATLTILLV02:ELMB/LVCAN1/LVPS_11/states
+/TILE/DCS/STATES	LBC12	68	ATLTILLV02:ELMB/LVCAN1/LVPS_12/states
+/TILE/DCS/STATES	LBC13	69	ATLTILLV02:ELMB/LVCAN1/LVPS_13/states
+/TILE/DCS/STATES	LBC14	70	ATLTILLV02:ELMB/LVCAN1/LVPS_14/states
+/TILE/DCS/STATES	LBC15	71	ATLTILLV02:ELMB/LVCAN1/LVPS_15/states
+/TILE/DCS/STATES	LBC16	72	ATLTILLV02:ELMB/LVCAN1/LVPS_16/states
+/TILE/DCS/STATES	LBC17	73	ATLTILLV02:ELMB/LVCAN1/LVPS_17/states
+/TILE/DCS/STATES	LBC18	74	ATLTILLV02:ELMB/LVCAN1/LVPS_18/states
+/TILE/DCS/STATES	LBC19	75	ATLTILLV02:ELMB/LVCAN1/LVPS_19/states
+/TILE/DCS/STATES	LBC20	76	ATLTILLV02:ELMB/LVCAN1/LVPS_20/states
+/TILE/DCS/STATES	LBC21	77	ATLTILLV02:ELMB/LVCAN1/LVPS_21/states
+/TILE/DCS/STATES	LBC22	78	ATLTILLV02:ELMB/LVCAN1/LVPS_22/states
+/TILE/DCS/STATES	LBC23	79	ATLTILLV02:ELMB/LVCAN1/LVPS_23/states
+/TILE/DCS/STATES	LBC24	80	ATLTILLV02:ELMB/LVCAN1/LVPS_24/states
+/TILE/DCS/STATES	LBC25	82	ATLTILLV02:ELMB/LVCAN2/LVPS_25/states
+/TILE/DCS/STATES	LBC26	83	ATLTILLV02:ELMB/LVCAN2/LVPS_26/states
+/TILE/DCS/STATES	LBC27	84	ATLTILLV02:ELMB/LVCAN2/LVPS_27/states
+/TILE/DCS/STATES	LBC28	85	ATLTILLV02:ELMB/LVCAN2/LVPS_28/states
+/TILE/DCS/STATES	LBC29	86	ATLTILLV02:ELMB/LVCAN2/LVPS_29/states
+/TILE/DCS/STATES	LBC30	87	ATLTILLV02:ELMB/LVCAN2/LVPS_30/states
+/TILE/DCS/STATES	LBC31	88	ATLTILLV02:ELMB/LVCAN2/LVPS_31/states
+/TILE/DCS/STATES	LBC32	89	ATLTILLV02:ELMB/LVCAN2/LVPS_32/states
+/TILE/DCS/STATES	LBC33	90	ATLTILLV02:ELMB/LVCAN2/LVPS_33/states
+/TILE/DCS/STATES	LBC34	91	ATLTILLV02:ELMB/LVCAN2/LVPS_34/states
+/TILE/DCS/STATES	LBC35	92	ATLTILLV02:ELMB/LVCAN2/LVPS_35/states
+/TILE/DCS/STATES	LBC36	93	ATLTILLV02:ELMB/LVCAN2/LVPS_36/states
+/TILE/DCS/STATES	LBC37	94	ATLTILLV02:ELMB/LVCAN2/LVPS_37/states
+/TILE/DCS/STATES	LBC38	95	ATLTILLV02:ELMB/LVCAN2/LVPS_38/states
+/TILE/DCS/STATES	LBC39	96	ATLTILLV02:ELMB/LVCAN2/LVPS_39/states
+/TILE/DCS/STATES	LBC40	97	ATLTILLV02:ELMB/LVCAN2/LVPS_40/states
+/TILE/DCS/STATES	LBC41	98	ATLTILLV02:ELMB/LVCAN3/LVPS_41/states
+/TILE/DCS/STATES	LBC42	99	ATLTILLV02:ELMB/LVCAN3/LVPS_42/states
+/TILE/DCS/STATES	LBC43	100	ATLTILLV02:ELMB/LVCAN3/LVPS_43/states
+/TILE/DCS/STATES	LBC44	101	ATLTILLV02:ELMB/LVCAN3/LVPS_44/states
+/TILE/DCS/STATES	LBC45	102	ATLTILLV02:ELMB/LVCAN3/LVPS_45/states
+/TILE/DCS/STATES	LBC46	103	ATLTILLV02:ELMB/LVCAN3/LVPS_46/states
+/TILE/DCS/STATES	LBC47	104	ATLTILLV02:ELMB/LVCAN3/LVPS_47/states
+/TILE/DCS/STATES	LBC48	105	ATLTILLV02:ELMB/LVCAN3/LVPS_48/states
+/TILE/DCS/STATES	LBC49	106	ATLTILLV02:ELMB/LVCAN3/LVPS_49/states
+/TILE/DCS/STATES	LBC50	107	ATLTILLV02:ELMB/LVCAN3/LVPS_50/states
+/TILE/DCS/STATES	LBC51	108	ATLTILLV02:ELMB/LVCAN3/LVPS_51/states
+/TILE/DCS/STATES	LBC52	109	ATLTILLV02:ELMB/LVCAN3/LVPS_52/states
+/TILE/DCS/STATES	LBC53	110	ATLTILLV02:ELMB/LVCAN3/LVPS_53/states
+/TILE/DCS/STATES	LBC54	111	ATLTILLV02:ELMB/LVCAN3/LVPS_54/states
+/TILE/DCS/STATES	LBC55	112	ATLTILLV02:ELMB/LVCAN3/LVPS_55/states
+/TILE/DCS/STATES	LBC56	113	ATLTILLV02:ELMB/LVCAN3/LVPS_56/states
+/TILE/DCS/STATES	LBC57	118	ATLTILLV02:ELMB/LVCAN4/LVPS_57/states
+/TILE/DCS/STATES	LBC58	119	ATLTILLV02:ELMB/LVCAN4/LVPS_58/states
+/TILE/DCS/STATES	LBC59	120	ATLTILLV02:ELMB/LVCAN4/LVPS_59/states
+/TILE/DCS/STATES	LBC60	122	ATLTILLV02:ELMB/LVCAN4/LVPS_60/states
+/TILE/DCS/STATES	LBC61	123	ATLTILLV02:ELMB/LVCAN4/LVPS_61/states
+/TILE/DCS/STATES	LBC62	124	ATLTILLV02:ELMB/LVCAN4/LVPS_62/states
+/TILE/DCS/STATES	LBC63	125	ATLTILLV02:ELMB/LVCAN4/LVPS_63/states
+/TILE/DCS/STATES	LBC64	126	ATLTILLV02:ELMB/LVCAN4/LVPS_64/states
diff --git a/TileCalorimeter/TileCoolDcs/share/createCoolChannelIdFile.py b/TileCalorimeter/TileCoolDcs/share/createCoolChannelIdFile.py
new file mode 100755
index 0000000000000000000000000000000000000000..d24e78200e2da74187b9f2490cba7606ffed2c31
--- /dev/null
+++ b/TileCalorimeter/TileCoolDcs/share/createCoolChannelIdFile.py
@@ -0,0 +1,108 @@
+#!/bin/env python
+# Author: nils.gollub@cern.ch
+
+import sys, os, re
+import time
+import ROOT
+from TileCoolDcs import TileDCSDataInfo
+
+
+buffer=[]
+
+re_ai     = re.compile("ATLTILLV(\d{2})(:ELMB/LVCAN.*_)(\d*)/AI/M5VMB_TEMP2.value")
+re_states = re.compile("ATLTILLV(\d{2})(:ELMB/LVCAN.*_)(\d*)/states.ForDAQ_MBHV")
+re_hv     = re.compile("ATLTILLV(\d{2}):Drawer(\d*).Readings.Monitoring.hvOut1.value")
+re_hvset  = re.compile("ATLTILLV(\d{2}):Drawer(\d*).Readings.Requests.hvOut1.order")
+re_daq    = re.compile("ATLTILSCS:DAQ(.*).state")
+
+#=== mapping of system name number to partition
+partitionID = { 0 : "EBA",
+                1 : "LBA",
+                2 : "LBC",
+                3 : "EBC"}
+
+
+#=== connect to Oracle DB
+
+par = sys.argv
+info = TileDCSDataInfo.TileDCSDataInfo()
+dbstring=info.get_dbstring('ORACLE',int(par[1]) if len(par)>1 and par[1].isdigit() else 2)
+if dbstring is None:
+    print "Unknown DB"
+    sys.exit(2)
+
+print "Connecting to",dbstring[0]
+
+db = ROOT.TSQLServer.Connect( dbstring[0], dbstring[1], dbstring[2])
+
+
+statement  = "select ELEMENT_NAME, SYS_ID, DP_ID from ATLAS_PVSSTIL.elements"
+stmt = db.Statement(statement)
+if stmt.Process()==True:
+    stmt.StoreResult()
+    while stmt.NextResultRow():
+
+        element_name = stmt.GetString(0)
+        sys_id       = stmt.GetString(1)
+        dp_id        = stmt.GetString(2)
+
+        #=== build COOL channel id
+        channel_id = dp_id + ('000'+sys_id)[-3:]
+
+        #=== find components
+        result_ai     = re_ai.search(element_name)
+        result_states = re_states.search(element_name)
+        result_hv     = re_hv.search(element_name)
+        result_hvset  = re_hvset.search(element_name)
+        result_daq    = re_daq.search(element_name)
+
+        if result_ai:
+            partition = partitionID[int(result_ai.groups()[0])]
+            drawer    = partition+('00'+result_ai.groups()[2])[-2:]
+            oracleId  = "ATLTILLV"
+            for part in result_ai.groups(): oracleId += part
+            oracleId += "/AI"
+            buffer.append( "/TILE/DCS/AI\t%s\t%s\t%s\n"%(drawer,channel_id,oracleId) )
+
+        elif result_states:
+            partition = partitionID[int(result_states.groups()[0])]
+            drawer    = partition+('00'+result_states.groups()[2])[-2:]
+            oracleId  = "ATLTILLV"
+            for part in result_states.groups(): oracleId += part
+            oracleId += "/states"
+            buffer.append( "/TILE/DCS/STATES\t%s\t%s\t%s\n"%(drawer,channel_id,oracleId) )
+
+        elif result_hv:
+            part = result_hv.groups()
+            partition = partitionID[int(part[0])]
+            drawer    = partition+('00'+part[1])[-2:]
+            oracleId  = "ATLTILLV"+part[0]
+            oracleId += ":Drawer"+part[1]+".Readings.Monitoring"
+            buffer.append( "/TILE/DCS/HV\t%s\t%s\t%s\n"%(drawer,channel_id,oracleId) )
+
+        elif result_hvset:
+            part = result_hvset.groups()
+            partition = partitionID[int(part[0])]
+            drawer    = partition+('00'+part[1])[-2:]
+            oracleId  = "ATLTILLV"+part[0]
+            oracleId += ":Drawer"+part[1]+".Readings.Requests"
+            buffer.append( "/TILE/DCS/HVSET\t%s\t%s\t%s\n"%(drawer,channel_id,oracleId) )
+
+        elif result_daq:
+            part = result_daq.groups()
+            partition = part[0][:3]
+            oracleId  = "ATLTILSCS:DAQ"+partition+".state"
+            #=== only one entry per partition, set module number to "XX"
+            drawer = partition + "XX"
+            buffer.append( "/DAQdummy/%s/DAQdummy\t%s\t%s\t%s\n"%(partition,drawer,channel_id,oracleId) )
+
+
+#=== write file
+oldname=info.find_data_file("cool_channel_id.dat")
+newname="cool_channel_id.dat"
+print "Old file:", oldname
+print "Nef file:", newname
+buffer.sort()
+file = open(newname,"w")
+for item in buffer:
+    file.write( item )
diff --git a/TileCalorimeter/TileCosmicAlgs/doc/packagedoc.h b/TileCalorimeter/TileCosmicAlgs/doc/packagedoc.h
index 2f6c9837f27c3da7eabe4975f4d63916bdb2a40d..6fe9df6618ab623404db68392b3c85301e0a3040 100644
--- a/TileCalorimeter/TileCosmicAlgs/doc/packagedoc.h
+++ b/TileCalorimeter/TileCosmicAlgs/doc/packagedoc.h
@@ -23,19 +23,4 @@ muons reconstruction, analysis, and trigger simulation.
   - CBNTAA_TileMuonFitter: creates an AthenaAware CBNT ntuple with TileMuonFitter information.
 
   - TileCosmicsTrigger: used in simulation to emulate the standalone Tile cosmics trigger. It reads the container of TileTTL1 objects (see TileEvent and TileSimAlgs), apllies the trigger logic according to the board configuration and produces a TileTrigger object, put in the StoreGate. More details on the trigger logic, usage, etc, can be found here: https://twiki.cern.ch/twiki/bin/view/Main/TileCosmicsTrigger  The output can be put in CBNTAA format (see the TileRec package).
-
-
-
-@ref used_MyPackage
-
-@ref requirements_MyPackage
-*/
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-
 */
diff --git a/TileCalorimeter/TileDetDescr/doc/packagedoc.h b/TileCalorimeter/TileDetDescr/doc/packagedoc.h
index 50368341dde57f65ba3f595410e78ff27fa87e50..2a1f7ec1b82012a41b9a7a8d33e98c26f9309dfd 100644
--- a/TileCalorimeter/TileDetDescr/doc/packagedoc.h
+++ b/TileCalorimeter/TileDetDescr/doc/packagedoc.h
@@ -37,15 +37,4 @@ This is the draft of TileDetDescr documentation, under construction ... us usual
   - TileDetDescrRegion: This class provides an interface to detector description
     information for the regions (sub-detectors) of the  Tile calorimeter.
 
-@section TileDetDescr_Requirements 
-
-*/
-
-/**
-@page requirements_TileDetDescr Requirements
 */
-
-/**
-@page used_TileDetDescr Used Packages
-*/
-
diff --git a/TileCalorimeter/TileEvent/CMakeLists.txt b/TileCalorimeter/TileEvent/CMakeLists.txt
index f48215d5afccfa8ea712b6b0071208ec29bd0ecf..f98e91da40e3e728c42055f565ac740fafb65b14 100644
--- a/TileCalorimeter/TileEvent/CMakeLists.txt
+++ b/TileCalorimeter/TileEvent/CMakeLists.txt
@@ -30,12 +30,12 @@ atlas_add_library( TileEvent
                    src/Tile*.cxx
                    PUBLIC_HEADERS TileEvent
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES CaloEvent DataModel Identifier GaudiKernel TileIdentifier TileSimEvent StoreGateLib SGtests TileConditionsLib CaloDetDescrLib
+                   LINK_LIBRARIES CaloEvent DataModel Identifier GaudiKernel TileIdentifier TileSimEvent StoreGateLib SGtests TileConditionsLib CaloDetDescrLib EventContainers
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} CaloIdentifier SGTools )
 
 atlas_add_dictionary( TileEventDict
                       TileEvent/TileEventDict.h
                       TileEvent/selection.xml
                       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent DataModel StoreGateLib SGtests Identifier GaudiKernel TileConditionsLib TileIdentifier TileSimEvent CaloDetDescrLib CaloIdentifier SGTools TileEvent )
+                      LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent DataModel StoreGateLib SGtests Identifier GaudiKernel TileConditionsLib TileIdentifier TileSimEvent CaloDetDescrLib CaloIdentifier SGTools TileEvent EventContainers )
 
diff --git a/TileCalorimeter/TileEvent/TileEvent/TileDigitsCollection.h b/TileCalorimeter/TileEvent/TileEvent/TileDigitsCollection.h
index 1428499061d4bd8c4ed1ad4729e3f71bdaa64b4b..4683f62d7ce02db5a1bc96163c30d369eb122c43 100755
--- a/TileCalorimeter/TileEvent/TileEvent/TileDigitsCollection.h
+++ b/TileCalorimeter/TileEvent/TileEvent/TileDigitsCollection.h
@@ -82,7 +82,8 @@ public:
    * Get BCID
    * @return BCID
    */
-  inline uint32_t getFragBCID() const { return m_FragBCID; }
+  inline uint32_t getFragBCID() const { return (m_FragBCID & 0xFFFF); }
+  inline uint32_t getFragStatus() const { return (m_FragBCID >> 16); }
 
   /**
    * Set chip header words for this collection
diff --git a/TileCalorimeter/TileEvent/TileEvent/TileRawDataContainer.h b/TileCalorimeter/TileEvent/TileEvent/TileRawDataContainer.h
index 51b222e1b64585ef4b626a98b03759a93624809d..1cb3b4f090f8ff7760b8f3c46757254ab0a63f6b 100755
--- a/TileCalorimeter/TileEvent/TileEvent/TileRawDataContainer.h
+++ b/TileCalorimeter/TileEvent/TileEvent/TileRawDataContainer.h
@@ -39,7 +39,6 @@ public:
     typedef typename _TCollection::TCollection_const_iterator TCollection_const_iterator ;
 
     typedef IdentifiableContainer<_TCollection> MyBase;
-    typedef typename MyBase::DLV DLV;
     typedef TileFragHash::TYPE TYPE;
     typedef TileRawChannelUnit::UNIT UNIT;
 
diff --git a/TileCalorimeter/TileEvent/TileEvent/TileRawDataContainer.icc b/TileCalorimeter/TileEvent/TileEvent/TileRawDataContainer.icc
index c4daa347d610d740c477ce1e9455e9db7c6548eb..a2052bd4977801ca95a23d71f4bc8e5267c9c2a3 100755
--- a/TileCalorimeter/TileEvent/TileEvent/TileRawDataContainer.icc
+++ b/TileCalorimeter/TileEvent/TileEvent/TileRawDataContainer.icc
@@ -20,8 +20,6 @@ void TileRawDataContainer<_TCollection>::initialize(bool createColl, TYPE type,
 {
     // initialize HashFunc
     this->m_hashFunc.initialize(TileCablingService::getInstance()->getTileHWID(),type); 
-    // initialize base class
-    DLV::init(this->m_hashFunc.max());
 
     if (createColl) {
         int ncoll = this->m_hashFunc.max();
@@ -54,7 +52,7 @@ TileRawDataContainer<_TCollection>::TileRawDataContainer(bool createColl,
                                                          TYPE type,
                                                          UNIT unit,
                                                          SG::OwnershipPolicy ownPolicy)
-    : MyBase(0) // 0 = do not initialize DLV in base class.
+    : MyBase(TileCablingService::getInstance()->getTileHWID()->drawer_hash_max())
     , m_unit(unit)
     , m_type(type)
     , m_bsflags(0)
@@ -67,7 +65,7 @@ TileRawDataContainer<_TCollection>::TileRawDataContainer(bool createColl,
 template <typename _TCollection> 
 TileRawDataContainer<_TCollection>::TileRawDataContainer(bool createColl,
                                                          SG::OwnershipPolicy ownPolicy)
-    : MyBase(0) // 0 = do not initialize DLV in base class.
+    : MyBase(TileCablingService::getInstance()->getTileHWID()->drawer_hash_max())
     , m_unit(TileRawChannelUnit::ADCcounts)
     , m_type(TileFragHash::Digitizer)
     , m_bsflags(0)
diff --git a/TileCalorimeter/TileEvent/doc/packagedoc.h b/TileCalorimeter/TileEvent/doc/packagedoc.h
index 60b43ed3a20c6b6ffeb956dee1ec9a0bb18a52ca..8f61a0878c070d515f2e7f5857c92a6ec63b9476 100644
--- a/TileCalorimeter/TileEvent/doc/packagedoc.h
+++ b/TileCalorimeter/TileEvent/doc/packagedoc.h
@@ -143,4 +143,3 @@ contains information about dead cells and channels.
 @section TileEvent_TileEventRecData Reconstruction EDM
 
 */
-
diff --git a/TileCalorimeter/TileExample/TileRecEx/share/JetTileD3PDMaker_topOptions.py b/TileCalorimeter/TileExample/TileRecEx/share/JetTileD3PDMaker_topOptions.py
deleted file mode 100644
index ab1bcebfea9151267e7abee4ed59e2c4d75be49b..0000000000000000000000000000000000000000
--- a/TileCalorimeter/TileExample/TileRecEx/share/JetTileD3PDMaker_topOptions.py
+++ /dev/null
@@ -1,116 +0,0 @@
-# $Id: JetTileD3PDMaker_topOptions.py 445872 2011-06-28 11:07:15Z scole $
-#
-# @file   JetD3PDMaker/share/
-# @author Haifeng Li <Haifeng.Li@cern.ch>
-# @date   Feb. 11, 2009
-# @brief  Top Job Option for Jet D3PD production. 
-#
-
-
-###################################################################3
-# Define the input file here.
-#
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-# TD start
-athenaCommonFlags.FilesInput= ["data11_7TeV.00180124.physics_JetTauEtmiss.recon.ESD.f368._lb0334._SFO-12._0002.1"]
-#athenaCommonFlags.FilesInput= ["/localscratch2/davidek/data11_7TeV.00180124.physics_JetTauEtmiss.recon.ESD.f368/data11_7TeV.00180124.physics_JetTauEtmiss.recon.ESD.f368._lb0504._SFO-10._0001.1"]
-
-
-###################################################################3
-# Define the output file here.
-#
-
-if not globals().get('tupleFileOutput'):
-    tupleFileOutput = 'JetD3PD_moje.root'
-
-
-###################################################################3
-# Define other job options here.
-#
-
-athenaCommonFlags.EvtMax = -1
-
-# Example of changing D3PD maker flags.
-from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
-# TD start
-D3PDMakerFlags.DoTrigger = False
-# TD end
-
-###################################################################3
-# Configure RecExCommon.
-#
-
-from RecExConfig.RecFlags import rec
-rec.doCBNT.set_Value_and_Lock(False)
-rec.doWriteESD.set_Value_and_Lock(False)
-rec.doWriteAOD.set_Value_and_Lock(False)
-rec.doAOD.set_Value_and_Lock(False)
-rec.doESD.set_Value_and_Lock(False)
-rec.doDPD.set_Value_and_Lock(False)
-rec.doWriteTAG.set_Value_and_Lock(False)
-include ("RecExCommon/RecExCommon_topOptions.py")
-rec.AutoConfiguration=['everything']
-#########################################################
-#
-# Configure the goodrunslist selector tool
-#
-## This Athena job consists of algorithms that loop over events;
-## here, the (default) top sequence is used:
-from AthenaCommon.AlgSequence import AlgSequence, AthSequencer
-job = AlgSequence()
-job += AthSequencer("ModSequence1")
-
-from GoodRunsLists.GoodRunsListsConf import *
-ToolSvc += GoodRunsListSelectorTool()
-# GoodRunsListSelectorTool.GoodRunsListVec = [ 'GRL_162690.xml' ]
-# GoodRunsListSelectorTool.GoodRunsListVec = [ 'data10_1658xx_sasha_grl.xml' ]
-# GoodRunsListSelectorTool.GoodRunsListVec = [ 'GRL_jetetmiss_repro.xml' ]
-# GoodRunsListSelectorTool.GoodRunsListVec = [ 'GRL_2011_timing.xml' ]
-GoodRunsListSelectorTool.GoodRunsListVec = [ 'data11_7TeV.periodAllYear__JetEtMiss.xml' ]
-
-from GoodRunsListsUser.GoodRunsListsUserConf import *
-job.ModSequence1 += GRLTriggerSelectorAlg('GRLTriggerAlg1')
-# job.ModSequence1.GRLTriggerAlg1.GoodRunsListArray = [ 'MyLBCollection' ]
-# job.ModSequence1.GRLTriggerAlg1.GoodRunsListArray = [ 'jetetmiss_7TeV' ]
-# job.ModSequence1.GRLTriggerAlg1.GoodRunsListArray = [ 'SMjet_nomuon_7TeV_combined' ]
-#job.ModSequence1.GRLTriggerAlg1.GoodRunsListArray = [ 'TD_stable_beams' ]
-job.ModSequence1.GRLTriggerAlg1.GoodRunsListArray = [ 'JetEtMiss' ]
-
-###################################################################3
-# Make the D3PD.
-#
-
-###################################################################
-#### Include the stuff by Toshi
-####
-from JetRec.JetGetters import *
-from JetRec.JetRecConf import *
-from JetRec.JetRecFlags import jetFlags
-from JetRec.JetRec_defaults import *
-from JetCalibTools.JetCalibToolsConf import *
-from JetCalibTools.MakeCalibSequences import *
-from JetCalibTools.SetupJetCalibrators import doJetOriginCorrection
-
-from QcdD3PDMaker.QcdBeamSpotD3PDObject                 import QcdBeamSpotD3PDObject
-
-#Use the minPt value below to set a minimum threshold on jet Pt
-make_StandardJetGetter('AntiKt',0.4,'Topo', doEMCut=False, minPt=7*GeV, doCalib=True, calibName='EM:OFFSET_ORIGIN_ETAJES', addJetQualityMoments=True, writeMoments=True, outputCollectionName='AntiKt4TopoEMNewJets')
-#make_StandardJetGetter('AntiKt',0.6,'Topo', doEMCut=False, minPt=7*GeV, doCalib=True, calibName='EM:OFFSET_ORIGIN_ETAJES', addJetQualityMoments=True, writeMoments=True, outputCollectionName='AntiKt6TopoEMNewJets')
-
-from JetD3PDMaker.JetTileD3PD import JetTileD3PD
-from JetD3PDMaker.JetTileD3PDObject import *
-from JetD3PDMaker import JetD3PDMakerConf
-#Use the following options to control the input collection and region cut#########
-JetTileD3PD.inputSGkey='AntiKt4TopoEMNewJets'
-JetD3PDMakerConf.JetTileFilterAlg.jetEtaMin=-2.0
-JetD3PDMakerConf.JetTileFilterAlg.jetEtaMax=2.0
-JetD3PDMakerConf.JetTileFilterAlg.jetPhiMin=-4.0
-JetD3PDMakerConf.JetTileFilterAlg.jetPhiMax=4.0
-#Note: Cut limits are set as [min,max)
-
-#JetD3PDMaker.JetTileCellFillerTool.OutputLevel = DEBUG
-#JetD3PDMaker.JetTileFilterAlg.OutputLevel = DEBUG
-#from TileConditions.TileCondToolConf import *
-#############
-alg = JetTileD3PD ( tupleFileOutput )
diff --git a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py
index a6966b27a0e121c5369aee40ebca68e39cd8f374..325ccdce07c965a5fd5a56d46ea6a75a2cab1356 100644
--- a/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py
+++ b/TileCalorimeter/TileExample/TileRecEx/share/jobOptions_TileCalibRec.py
@@ -774,8 +774,8 @@ jobproperties.TileRecFlags.doTileOverflowFit = doTileOverflowFit
 # but only for physics runs, i.e. it will be wrong for cis or laser runs.
 # so, we set them to false here, but then load proper OFC and phases
 # for every type of run
-jobproperties.TileRecFlags.OfcFromCOOL = False
-jobproperties.TileRecFlags.BestPhaseFromCOOL = False
+jobproperties.TileRecFlags.OfcFromCOOL = OfcFromCOOL
+jobproperties.TileRecFlags.BestPhaseFromCOOL = PhaseFromCOOL
 
 jobproperties.print_JobProperties('tree&value')
 
@@ -801,25 +801,11 @@ print tileInfoConfigurator
 #=== configure TileCondToolOfcCool
 #============================================================
 OfcFromCoolOF1 = doTileOF1 and OfcFromCOOL and (conddb.GetInstance() == 'CONDBR2') # there are OFCs for OF1 only in CONDBR2
-if not ReadPool or OfcFromCOOL or doTileMF:
-    if TileLasPulse:
-        tileCondToolOfcCool = getTileCondToolOfcCool('COOL', 'LAS')
-        if OfcFromCoolOF1: tileCondToolOfcCoolOF1 = getTileCondToolOfcCool('COOL', 'LAS', 'OF1', 'TileCondToolOfcCoolOF1')
-    elif TileCisPulse:
-        tileCondToolOfcCool = getTileCondToolOfcCool('COOL', 'CIS')
-        if OfcFromCoolOF1: tileCondToolOfcCoolOF1 = getTileCondToolOfcCool('COOL', 'CIS','OF1', 'TileCondToolOfcCoolOF1')
-    else:
-        tileCondToolOfcCool = getTileCondToolOfcCool('COOL', 'PHY')
-        if OfcFromCoolOF1: tileCondToolOfcCoolOF1 = getTileCondToolOfcCool('COOL', 'PHY', 'OF1', 'TileCondToolOfcCoolOF1')
-
-    from AthenaCommon.AppMgr import ToolSvc
-    ToolSvc += tileCondToolOfcCool
-    if OfcFromCoolOF1: ToolSvc += tileCondToolOfcCoolOF1
 
 #============================================================
 #=== configure TileCondToolOfc
 #============================================================
-if doTileOpt2 or doTileOptATLAS or doTileOF1:
+if not OfcFromCOOL and (doTileOpt2 or doTileOptATLAS or doTileOF1):
     from TileConditions.TileConditionsConf import TileCondToolOfc
     tileCondToolOfc = TileCondToolOfc()
     tileCondToolOfc.nSamples = TileFrameLength # default = 7
@@ -827,13 +813,9 @@ if doTileOpt2 or doTileOptATLAS or doTileOF1:
     tileCondToolOfc.CacheSize = 0 # (max phases per channel) 0-no cache (default)
     tileCondToolOfc.OutputLevel = OutputLevel
 
+    ToolSvc += tileCondToolOfc
+
     #  'LAS' or "CIS" or 'PHY' pulse shape
-    if TileLasPulse:
-        tileCondToolOfc.TileCondToolPulseShape = getTileCondToolPulseShape('COOL','LAS')
-    elif TileCisPulse:
-        tileCondToolOfc.TileCondToolPulseShape = getTileCondToolPulseShape('COOL','CISPULSE100')
-    else:
-        tileCondToolOfc.TileCondToolPulseShape = getTileCondToolPulseShape('COOL','PHY')
 
     print tileCondToolOfc
 
@@ -855,11 +837,16 @@ if not ReadPool:
 
     from TileByteStream.TileByteStreamConf import TileROD_Decoder
     ToolSvc += TileROD_Decoder()
-    ToolSvc.TileROD_Decoder.TileCondToolOfcCool = tileCondToolOfcCool
     ToolSvc.TileROD_Decoder.TileCondToolTiming = tileInfoConfigurator.TileCondToolTiming
     if TileCompareMode:
         ToolSvc.TileROD_Decoder.useFrag5Raw  = True
         ToolSvc.TileROD_Decoder.useFrag5Reco = True
+
+        TilePulseTypes = {0 : 'PHY', 1 : 'PHY', 2 : 'LAS', 4 : 'PHY', 8 : 'CIS'}
+        TilePulse = TilePulseTypes[jobproperties.TileRecFlags.TileRunType()]
+
+        tileInfoConfigurator.setupCOOLOFC(type = TilePulse)
+        ToolSvc.TileROD_Decoder.TileCondToolOfcCool = ToolSvc.TileCondToolOfcCool
 else:
     if ReadDigits:
         from TileRecUtils.TileRawChannelGetter import *
@@ -878,22 +865,11 @@ if doTileFit:
 
 if doTileFitCool:
     ToolSvc.TileRawChannelBuilderFitFilterCool.MaxTimeFromPeak = 250.0; # recover behaviour of rel 13.0.30  
-    if TileLasPulse:
-        ToolSvc.TileRawChannelBuilderFitFilterCool.TileCondToolPulseShape = getTileCondToolPulseShape('COOL','LAS','TileCondToolPulseShape')
-    elif TileCisPulse:
-        ToolSvc.TileRawChannelBuilderFitFilterCool.TileCondToolLeak100Shape = getTileCondToolPulseShape('COOL','CISLEAK100','TileCondToolLeak100Shape')
-        ToolSvc.TileRawChannelBuilderFitFilterCool.TileCondToolLeak5p2Shape = getTileCondToolPulseShape('COOL','CISLEAK5P2','TileCondToolLeak5p2Shape')
-        ToolSvc.TileRawChannelBuilderFitFilterCool.TileCondToolPulse5p2Shape = getTileCondToolPulseShape('COOL','CISPULSE5P2','TileCondToolPulse5p2Shape')
-        ToolSvc.TileRawChannelBuilderFitFilterCool.TileCondToolPulseShape = getTileCondToolPulseShape('COOL','CISPULSE100','TileCondToolPulseShape')
-    else:
-        ToolSvc.TileRawChannelBuilderFitFilterCool.TileCondToolPulseShape = getTileCondToolPulseShape('COOL','PHYS','TileCondToolPulseShape')
     ToolSvc.TileRawChannelBuilderFitFilterCool.UseDSPCorrection = not TileBiGainRun
     
     print ToolSvc.TileRawChannelBuilderFitFilterCool
 
 if doTileOpt2:
-    if OfcFromCOOL:
-        ToolSvc.TileRawChannelBuilderOpt2Filter.TileCondToolOfc = tileCondToolOfcCool
 
     if TileMonoRun or TileRampRun:
         ToolSvc.TileRawChannelBuilderOpt2Filter.MaxIterations = 3 # 3 iterations to match DSP reco
@@ -907,9 +883,6 @@ if doTileOptATLAS:
     if ReadPool:
         ToolSvc.TileRawChannelBuilderOptATLAS.TileRawChannelContainer = "TileRawChannelFixed"
 
-    if OfcFromCOOL:
-        ToolSvc.TileRawChannelBuilderOptATLAS.TileCondToolOfc = tileCondToolOfcCool
-
     if PhaseFromCOOL:
         ToolSvc.TileRawChannelBuilderOptATLAS.TileCondToolTiming = tileInfoConfigurator.TileCondToolTiming
         ToolSvc.TileRawChannelBuilderOptATLAS.correctTime = False; # do not need to correct time with best phase
@@ -922,8 +895,6 @@ if doTileOptATLAS:
     print ToolSvc.TileRawChannelBuilderOptATLAS
     
 if doTileMF:
-    if OfcFromCOOL:
-        ToolSvc.TileRawChannelBuilderMF.TileCondToolOfc = tileCondToolOfcCool
 
     if PhaseFromCOOL:
         ToolSvc.TileRawChannelBuilderMF.TileCondToolTiming = tileInfoConfigurator.TileCondToolTiming
@@ -937,9 +908,6 @@ if doTileMF:
 if doTileOF1:
     ToolSvc.TileRawChannelBuilderOF1.PedestalMode = TileOF1Ped  
 
-    if OfcFromCoolOF1:
-        ToolSvc.TileRawChannelBuilderOF1.TileCondToolOfc = tileCondToolOfcCoolOF1
-
     if PhaseFromCOOL:
         ToolSvc.TileRawChannelBuilderOF1.TileCondToolTiming = tileInfoConfigurator.TileCondToolTiming
         ToolSvc.TileRawChannelBuilderOF1.correctTime = False # do not need to correct time with best phase
@@ -1045,7 +1013,7 @@ if (doTileNtuple or doD3PD):
     exec 'svcMgr.THistSvc.Output += [ "AANT DATAFILE=\'%(dir)s/tile_%(RunNum).f_%(Version)s.aan.root\' OPT=\'RECREATE\' " ] ' %  {'dir': OutputDirectory, 'RunNum': RunNumber, 'Version': Version }
     svcMgr.THistSvc.MaxFileSize = 32768
 
-    from AnalysisTools.AnalysisToolsConf import AANTupleStream
+    from AnalysisTools.AthAnalysisToolsConf import AANTupleStream
     topSequence += AANTupleStream( "AANTupleStream1" )
     AANTupleStream1 = topSequence.AANTupleStream1
     AANTupleStream1.ExtraRefNames = [ "StreamESD","StreamRDO" ]
diff --git a/TileCalorimeter/TileFastCaloSim/CMakeLists.txt b/TileCalorimeter/TileFastCaloSim/CMakeLists.txt
index 411b709fbd43070d2a025c5ce98612cb4551905b..28f7046ab98dc538ba5811b519bcb3351cb53490 100644
--- a/TileCalorimeter/TileFastCaloSim/CMakeLists.txt
+++ b/TileCalorimeter/TileFastCaloSim/CMakeLists.txt
@@ -19,7 +19,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimEvent
                           TileCalorimeter/TileConditions
                           TileCalorimeter/TileDetDescr
-                          TileCalorimeter/TileG4/TileGeoG4SD
+                          TileCalorimeter/TileG4/TileG4Interfaces
+                          TileCalorimeter/TileGeoModel
                           TileCalorimeter/TileSimEvent )
 
 # External dependencies:
@@ -32,7 +33,7 @@ atlas_add_component( TileFastCaloSim
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel CxxUtils GaudiKernel ISF_FastCaloSimEvent TileConditionsLib TileDetDescr TileGeoG4SDLib TileSimEvent )
+                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} CaloEvent CaloIdentifier AthenaBaseComps AthenaKernel CxxUtils GaudiKernel ISF_FastCaloSimEvent TileConditionsLib TileDetDescr TileGeoModelLib TileSimEvent )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.cxx b/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.cxx
index 5bdca80e3d061553f01e359b2fae5ca1ab07c9c6..375b0c86391f4859c73541f4f29323b842991981 100644
--- a/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.cxx
+++ b/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.cxx
@@ -25,6 +25,9 @@
 #include "CLHEP/Units/SystemOfUnits.h"
 #include "CxxUtils/make_unique.h"
 
+#include "GeoModelInterfaces/IGeoModelSvc.h"
+#include "TileGeoModel/TileDetectorTool.h"
+
 // Calo includes
 #include "CaloIdentifier/TileID.h"
 #include "CaloEvent/CaloCellContainer.h"
@@ -34,11 +37,7 @@
 #include "TileConditions/TileInfo.h"
 #include "TileSimEvent/TileHitVector.h"
 #include "TileFCSmStepToTileHitVec.h"
-#include "TileGeoG4SD/TileGeoG4SDCalc.hh"
-
-// To get the SD and the options
-#include "G4SDManager.hh"
-#include "TileGeoG4SD/TileGeoG4SD.hh"
+#include "TileG4Interfaces/ITileCalculator.h"
 
 // ISF_FCS_Parametrization includes
 #include "ISF_FastCaloSimEvent/FCS_StepInfoCollection.h"
@@ -48,22 +47,26 @@
 //* Constructor
 //****************************************************************************
 TileFCSmStepToTileHitVec::TileFCSmStepToTileHitVec(const std::string& name, ISvcLocator* pSvcLocator)
-    : AthAlgorithm(name, pSvcLocator)
-    , m_tileID(0)
-    , m_tileInfo(0)
-    , m_tileMgr(0)
-    , m_calc(0)
-    , m_deltaT(0.5 * Gaudi::Units::nanosecond)
-    , m_allHits(0)
+  : AthAlgorithm(name, pSvcLocator)
+  , m_geoModSvc("GeoModelSvc",name)
+  , m_tileID(nullptr)
+  , m_tileInfo(nullptr)
+  , m_tileMgr(nullptr)
+  , m_calc("TileGeoG4SDCalc", name)
+  , m_deltaT(0.5 * Gaudi::Units::nanosecond)
+  , m_allHits(0)
+  , m_Ushape(-1)
 {
-    m_FCS_StepInfo  = "ZHMergedEventSteps";
-    m_hitVec        = "TileHitVec_FCS";
-    m_infoName      = "TileInfo";
+  m_FCS_StepInfo  = "MergedEventSteps";
+  m_hitVec        = "TileHitVec_FCS";
+  m_infoName      = "TileInfo";
 
-    declareProperty("ZHMergedEventSteps",   m_FCS_StepInfo, "Name of input container (default=TileHitCnt)");
-    declareProperty("TileHitVector",        m_hitVec,       "Name of output hit vector (default=TileHitVec)");
-    declareProperty("TileInfoName",         m_infoName,     "Name of TileInfo store (default=TileInfo");
-    declareProperty("DeltaT",               m_deltaT,       "Minimal Time granularity in TileHit (default=0.5ns)");
+  declareProperty( "GeoModelSvc", m_geoModSvc );
+  declareProperty( "TileCalculator", m_calc);
+  declareProperty("StepInfoCollection",   m_FCS_StepInfo, "Name of input container (default=TileHitCnt)");
+  declareProperty("TileHitVector",        m_hitVec,       "Name of output hit vector (default=TileHitVec)");
+  declareProperty("TileInfoName",         m_infoName,     "Name of TileInfo store (default=TileInfo");
+  declareProperty("DeltaT",               m_deltaT,       "Minimal Time granularity in TileHit (default=0.5ns)");
 
 }
 
@@ -80,12 +83,31 @@ TileFCSmStepToTileHitVec::~TileFCSmStepToTileHitVec()
 //****************************************************************************
 StatusCode TileFCSmStepToTileHitVec::initialize()
 {
-    // retrieve Tile detector manager, TileID helper and TileIfno from det store
-    CHECK( detStore()->retrieve(m_tileMgr) );
-    CHECK( detStore()->retrieve(m_tileID) );
-    CHECK( detStore()->retrieve(m_tileInfo, m_infoName) );
+  ATH_CHECK( m_calc.retrieve() );
+  // retrieve Tile detector manager, TileID helper and TileIfno from det store
+  ATH_CHECK( detStore()->retrieve(m_tileMgr) );
+  ATH_CHECK( detStore()->retrieve(m_tileID) );
+  ATH_CHECK( detStore()->retrieve(m_tileInfo, m_infoName) );
+  ATH_CHECK(m_geoModSvc.retrieve());
+  ATH_MSG_VERBOSE("GeoModelSvc initialized.");
+
+  m_Ushape = this->getUshapeFromGM();
+  if (m_Ushape < -2) {
+    ATH_MSG_WARNING("Changing U-shape from " << m_Ushape << " to -2");
+    m_Ushape = -2;
+  }
+  if (m_Ushape > 1 && m_Ushape < 10) {
+    ATH_MSG_WARNING("Changing U-shape from " << m_Ushape << " to 1");
+    m_Ushape = 1;
+  }
+
+  return StatusCode::SUCCESS;
+}
 
-    return StatusCode::SUCCESS;
+int TileFCSmStepToTileHitVec::getUshapeFromGM() const {
+  const TileDetectorTool* tileDetectorTool =
+    dynamic_cast<const TileDetectorTool *>(m_geoModSvc->getTool("TileDetectorTool"));
+  return (tileDetectorTool) ? tileDetectorTool->Ushape() : 0;
 }
 
 
@@ -94,267 +116,225 @@ StatusCode TileFCSmStepToTileHitVec::initialize()
 //****************************************************************************
 StatusCode TileFCSmStepToTileHitVec::execute()
 {
-    // Get the calculator from the SD
-    G4SDManager *sdManager = G4SDManager::GetSDMpointer();
-    TileGeoG4SD * tileSD = dynamic_cast<TileGeoG4SD*>( sdManager->FindSensitiveDetector("TileGeoG4SD") );
-    if (tileSD){
-      m_calc = tileSD->GetCalculator();
-    } else {
-      ATH_MSG_FATAL( "Could not find calculator!" );
-      return StatusCode::FAILURE;
-    }
+  ATH_MSG_DEBUG( "Execution beginning" );
+
+  m_allHits.clear();
+  m_allHits.resize(m_tileID->pmt_hash_max(),0);
+  int nHit = 0;
+  float Etot = 0.0;
+  int newHits = 0;
+  int sum_size = 0;
+  const double tile_radius[13] = { 2300.,
+                                   2400., 2500., 2600.,
+                                   2730., 2860., 2990.,
+                                   3140., 3290., 3440.,
+                                   3640., 3820.,
+                                   3820.01 };
+
+  const double M_PI_32 = M_PI/32.;
+  const double M_PI_64 = M_PI/64.;
+  const double TAN_PI_64 = tan(M_PI/64.);
+
+  // size is amaller than master plate and there is a gap between modules
+  const double size_correction = 2.75 + 1.5/2.;
+
+  const ISF_FCS_Parametrization::FCS_StepInfoCollection* inCollect;
+  std::unique_ptr<TileHitVector> FCS_hits = CxxUtils::make_unique<TileHitVector>();
+
+  // Get FCS_StepInfo from FCS_StepInfoCollection
+  ATH_CHECK(evtStore()->retrieve(inCollect,m_FCS_StepInfo)); //FIXME use a ReadHandle
+
+  IdContext pmt_context = m_tileID->pmt_context();
+
+  // Iterating over Steps, creating new TileHits
+  for(const ISF_FCS_Parametrization::FCS_StepInfo* stepInfo : *inCollect) {
+    Identifier hit_id = stepInfo->identify();
+    if (m_tileID->is_tile(hit_id)) {
+      double ene  = stepInfo->energy();
+      double time = stepInfo->time();
+
+      IdentifierHash hit_idhash;
+      m_tileID->get_hash(hit_id, hit_idhash, &pmt_context);
+
+      if (m_Ushape < 0) { // do not change anything for negative Ushape values
+
+        if ( ! m_allHits[hit_idhash] ) {
+          m_allHits[hit_idhash] = new TileHit(hit_id,ene,time);
+          ++newHits;
+          // ATH_MSG_INFO(
+          ATH_MSG_VERBOSE(
+                          "Iterating over Steps:   new hit with id " << m_tileID->to_string(hit_id,-1)
+                          << " nHit=" << nHit << "  energy=" << ene << "  time=" << time);
+        } else {
+          m_allHits[hit_idhash]->add(ene,time,m_deltaT);
+          // ATH_MSG_INFO(
+          ATH_MSG_VERBOSE(
+                          "Iterating over Steps: extra hit with id " << m_tileID->to_string(hit_id,-1)
+                          << " nHit=" << nHit << "  energy=" << ene << "  time=" << time);
+        }
 
-    ATH_MSG_DEBUG( "Execution beginning" );
-    // ATH_MSG_INFO( "Execution beginning" );
-
-    m_allHits.clear();
-    m_allHits.resize(m_tileID->pmt_hash_max(),0);
-    int nHit = 0;
-    float Etot = 0.0;
-    int newHits = 0;
-    int sum_size = 0;
-    const double tile_radius[13] = { 2300.,
-                                     2400., 2500., 2600.,
-                                     2730., 2860., 2990.,
-                                     3140., 3290., 3440.,
-                                     3640., 3820.,
-                                     3820.01 };
-
-    const double M_PI_32 = M_PI/32.;
-    const double M_PI_64 = M_PI/64.;
-    const double TAN_PI_64 = tan(M_PI/64.);
-
-    // size is amaller than master plate and there is a gap between modules
-    const double size_correction = 2.75 + 1.5/2.;
-
-    const ISF_FCS_Parametrization::FCS_StepInfoCollection* inCollect;
-    std::unique_ptr<TileHitVector> FCS_hits = CxxUtils::make_unique<TileHitVector>();
-
-    // Get FCS_StepInfo from FCS_StepInfoCollection
-    if ( evtStore()->retrieve(inCollect,m_FCS_StepInfo).isFailure() ) {
-        ATH_MSG_WARNING( "Could not find container " << m_FCS_StepInfo );
-        return StatusCode::FAILURE;
-    } else {
-        ISF_FCS_Parametrization::FCS_StepInfoCollection::const_iterator iter = inCollect->begin();
-        ISF_FCS_Parametrization::FCS_StepInfoCollection::const_iterator end  = inCollect->end();
-        IdContext pmt_context = m_tileID->pmt_context();
-
-        // Iterating over Steps, creating new TileHits
-        for( ; iter != end; ++iter) {
-            Identifier hit_id = (*iter)->identify();
-            if (m_tileID->is_tile(hit_id)) {
-                double ene  = (*iter)->energy();
-                double time = (*iter)->time();
-
-                IdentifierHash hit_idhash;
-                m_tileID->get_hash(hit_id, hit_idhash, &pmt_context);
-
-                if (m_calc->GetOptions().Ushape < 0) { // do not change anything for negative Ushape values
-
-                    if ( ! m_allHits[hit_idhash] ) {
-                        m_allHits[hit_idhash] = new TileHit(hit_id,ene,time);
-                        ++newHits;
-                        // ATH_MSG_INFO(
-                        ATH_MSG_VERBOSE(
-                            "Iterating over Steps:   new hit with id " << m_tileID->to_string(hit_id,-1)
-                            << " nHit=" << nHit << "  energy=" << ene << "  time=" << time);
-                    } else {
-                        m_allHits[hit_idhash]->add(ene,time,m_deltaT);
-                        // ATH_MSG_INFO(
-                        ATH_MSG_VERBOSE(
-                            "Iterating over Steps: extra hit with id " << m_tileID->to_string(hit_id,-1)
-                            << " nHit=" << nHit << "  energy=" << ene << "  time=" << time);
-                    }
-
-                } else {
-
-                    int section = m_tileID->section(hit_id);
-                    int side    = m_tileID->side(hit_id);
-                    int module  = m_tileID->module(hit_id);
-                    int sample  = m_tileID->sample(hit_id);
-
-                    bool Ecell = (sample == 3);
-                    bool spC10 = (section == 3 && sample == 1 &&
-                                 ((module >= 38 && module <= 41) || (module >= 54 && module <= 57)));
-
-                    if ( Ecell || spC10 ) {
-                        if ( ! m_allHits[hit_idhash] ) {
-                            m_allHits[hit_idhash] = new TileHit(hit_id,ene,time);
-                            // ATH_MSG_INFO(
-                            ATH_MSG_VERBOSE(
-                                "Iterating over Steps:   new E/C10 hit with id " << m_tileID->to_string(hit_id,-1)
-                                << "  nHit=" << nHit << "  energy=" << ene );
-                            ++newHits;
-                        } else {
-                            m_allHits[hit_idhash]->add(ene,time,m_deltaT);
-                            // ATH_MSG_INFO(
-                            ATH_MSG_VERBOSE(
-                                "Iterating over Steps: extra E/C10 hit with id " << m_tileID->to_string(hit_id,-1)
-                                << "  nHit=" << nHit << "  energy=" << ene );
-                        }
-
-                    } else {  //cell have two pmt
-
-                        double x    = (*iter)->x(); // coordinates of the hit
-                        double y    = (*iter)->y(); // coordinates of the hit
-                        int pmt     = m_tileID->pmt(hit_id); // original pmt index
-                        double      edep[2];
-                        Identifier  cell_id = m_tileID->cell_id(hit_id);
-
-                        double phi_module=(module + 0.5) * M_PI_32;
-                        double phi_hit = atan2(y,x);
-                        if (phi_hit<0) phi_hit += 2*M_PI;
-                        double dphi = phi_hit - phi_module; // should be in the range [-pi/64, pi/64]
-                        if (dphi < -M_PI_64 || dphi > M_PI_64) {
-                            ATH_MSG_ERROR( "Displaced hit with id " << m_tileID->to_string(hit_id,-1)
-                                           << " x " << x << " y " << y
-                                           << " phi_module " << phi_module  << " phi_hit " << phi_hit
-                                           << " dphi " << dphi );
-                            // correcting dphi
-                            dphi -= trunc(dphi/M_PI_64) * M_PI_64;
-                        }
-
-                        double radius = sqrt(x*x+y*y);
-                        double radius_corrected = radius * cos(dphi);
-                        double yLocal = radius * sin(dphi); // if negative, we are closer to pmt with index 0
-                        double zLocal = radius * cos(dphi);
-                        double halfYLocal = radius_corrected * TAN_PI_64 - size_correction;
-                        if (fabs(yLocal) > halfYLocal) {
-                            ATH_MSG_ERROR( "Displaced hit with id " << m_tileID->to_string(hit_id,-1)
-                                           << " x " << x << " y " << y
-                                           << " radius_corr " << radius_corrected
-                                           << " yLocal " << yLocal  << " halfYlocal_corr " << halfYLocal
-                                           << " delta " << fabs(yLocal) - halfYLocal );
-                            // correcting yLocal
-                            yLocal = copysign(halfYLocal,yLocal);
-                         }
-
-                        // tile row or tile index - number from 0 to 10
-                        int tile_ind = std::lower_bound (tile_radius, tile_radius+12,radius_corrected)-tile_radius-1;
-                        if (tile_ind < 0 || tile_ind > 10 ) {
-                            ATH_MSG_ERROR( "Displaced hit with id " << m_tileID->to_string(hit_id,-1)
-                                           << " x " << x << " y " << y
-                                           << " radius " << radius << " corrected " << radius_corrected
-                                           << " tile_index " << tile_ind );
-                            // correcting tile index
-                            if (tile_ind<0) tile_ind = 0;
-                            if (tile_ind>10) tile_ind = 10;
-                        }
-
-                        switch (m_calc->GetOptions().Ushape) {
-                        case 1:
-                            edep[0] = ene * m_calc->Tile_1D_profile         (tile_ind, yLocal, zLocal, 0, section, side);
-                            edep[1] = ene * m_calc->Tile_1D_profile         (tile_ind, yLocal, zLocal, 1, section, side);
-                            break;
-
-                        case 14:
-                            edep[0] = ene * m_calc->Tile_1D_profileRescaled (tile_ind, yLocal, zLocal, 0, section, side);
-                            edep[1] = ene * m_calc->Tile_1D_profileRescaled (tile_ind, yLocal, zLocal, 1, section, side);
-                            break;
-
-                        case 13:
-                            edep[0] = ene * m_calc->Tile_1D_profileFunc     (tile_ind, yLocal, zLocal, 0, section, side);
-                            edep[1] = ene * m_calc->Tile_1D_profileFunc     (tile_ind, yLocal, zLocal, 1, section, side);
-                            break;
-
-                        case 12:
-                            edep[0] = ene * m_calc->Tile_1D_profileSym      (tile_ind, yLocal, zLocal, 0, section, side);
-                            edep[1] = ene * m_calc->Tile_1D_profileSym      (tile_ind, yLocal, zLocal, 1, section, side);
-                            break;
-
-                        case 11:
-                            edep[0] = ene * m_calc->Tile_1D_profileAsym     (tile_ind, yLocal, zLocal, 0, section, side);
-                            edep[1] = ene * m_calc->Tile_1D_profileAsym     (tile_ind, yLocal, zLocal, 1, section, side);
-                            break;
-
-                        default:
-                            edep[0] = ene * ( 0.5 - 0.2 * yLocal/halfYLocal ); // should get 0.7 for yLocal = -halfYLocal
-                            edep[1] = ene - edep[0];
-                        }
-                        
-                        for (int pm=0; pm<2; ++pm) {
-                            // changing hit_id, - use proper pm index (0 or 1) for down/up pmt
-                            hit_id = m_tileID->pmt_id(cell_id,pm);
-                            m_tileID->get_hash(hit_id, hit_idhash, &pmt_context);
-
-                            double tim=time;
-                            if (pm != pmt) { // need to correct time
-                                const double ref_ind_tile = 1.59;
-                                const double inv_speed = ref_ind_tile / CLHEP::c_light;
-                                if (pmt) tim -= 2 * yLocal * inv_speed;
-                                else tim += 2 * yLocal * inv_speed;
-                            }
-
-                            if ( ! m_allHits[hit_idhash] ) {
-                                m_allHits[hit_idhash] = new TileHit(hit_id,edep[pm],tim,m_deltaT);
-                                ++newHits;
-                                // ATH_MSG_INFO(
-                                ATH_MSG_VERBOSE(
-                                    "Iterating over Steps:  new  hit with id " << m_tileID->to_string(hit_id,-1)
-                                    << "  nHit=" << nHit << "  pmt " << pmt << "  energy=" << edep[pm] << "  time="
-                                    << time << " + " << tim-time << " = " << tim);
-                            } else {
-                                m_allHits[hit_idhash]->add(edep[pm],tim,m_deltaT);
-                                // ATH_MSG_INFO(
-                                ATH_MSG_VERBOSE(
-                                    "Iterating over Steps: extra hit with id " << m_tileID->to_string(hit_id,-1)
-                                    << "  nHit=" << nHit << "  pmt " << pmt << "  energy=" << edep[pm] << "  time="
-                                    << time << " + " << tim-time << " = " << tim);
-                            }
-                        }
-
-                    }//cell have two pmt
-
-                }//m_UshapeType >= 0
-
-                ++nHit;
-                Etot += ene;
-            }//is_tile(hit_id)
-
-        }//Iterating over Steps
-
-        ATH_MSG_DEBUG( "End of Iterating over Steps:  nHit=" << nHit << "  newHits=" << newHits << "  Etot=" << Etot );
-        // ATH_MSG_INFO( "End of Iterating over Steps:  nHit=" << nHit << "  newHits=" << newHits << "  Etot=" << Etot );
-        nHit = 0;
-        Etot = 0.0;
-
-        // Addition of each TileHit to the TileHitVector
-        std::vector<TileHit*>::const_iterator curr = m_allHits.begin();
-        std::vector<TileHit*>::const_iterator iend = m_allHits.end();
-        for ( ; curr != iend; ++curr) {
-            if (*curr) {
-                TileHit *pHit = (*curr);
-
-                // ATH_MSG_INFO(
-                ATH_MSG_VERBOSE(
-                    "Iterating over Hits:  nHit=" << nHit << "  size="
-                    << pHit->size() << "  energy=" << pHit->energy() );
-                FCS_hits->push_back(*pHit);
-                ++nHit;
-                for (int ii=0; ii<pHit->size(); ++ii ) Etot += pHit->energy(ii);
-                sum_size += pHit->size();
+      } else {
+
+        int section = m_tileID->section(hit_id);
+        int side    = m_tileID->side(hit_id);
+        int module  = m_tileID->module(hit_id);
+        int sample  = m_tileID->sample(hit_id);
+
+        bool Ecell = (sample == 3);
+        bool spC10 = (section == 3 && sample == 1 &&
+                      ((module >= 38 && module <= 41) || (module >= 54 && module <= 57)));
+
+        if ( Ecell || spC10 ) {
+          if ( ! m_allHits[hit_idhash] ) {
+            m_allHits[hit_idhash] = new TileHit(hit_id,ene,time);
+            // ATH_MSG_INFO(
+            ATH_MSG_VERBOSE(
+                            "Iterating over Steps:   new E/C10 hit with id " << m_tileID->to_string(hit_id,-1)
+                            << "  nHit=" << nHit << "  energy=" << ene );
+            ++newHits;
+          } else {
+            m_allHits[hit_idhash]->add(ene,time,m_deltaT);
+            // ATH_MSG_INFO(
+            ATH_MSG_VERBOSE(
+                            "Iterating over Steps: extra E/C10 hit with id " << m_tileID->to_string(hit_id,-1)
+                            << "  nHit=" << nHit << "  energy=" << ene );
+          }
+
+        } else {  //cell have two pmt
+
+          double x    = stepInfo->x(); // coordinates of the hit
+          double y    = stepInfo->y(); // coordinates of the hit
+          int pmt     = m_tileID->pmt(hit_id); // original pmt index
+          double      edep[2];
+          Identifier  cell_id = m_tileID->cell_id(hit_id);
+
+          double phi_module=(module + 0.5) * M_PI_32;
+          double phi_hit = atan2(y,x);
+          if (phi_hit<0) phi_hit += 2*M_PI;
+          double dphi = phi_hit - phi_module; // should be in the range [-pi/64, pi/64]
+          if (dphi < -M_PI_64 || dphi > M_PI_64) {
+            ATH_MSG_ERROR( "Displaced hit with id " << m_tileID->to_string(hit_id,-1)
+                           << " x " << x << " y " << y
+                           << " phi_module " << phi_module  << " phi_hit " << phi_hit
+                           << " dphi " << dphi );
+            // correcting dphi
+            dphi -= trunc(dphi/M_PI_64) * M_PI_64;
+          }
+
+          double radius = sqrt(x*x+y*y);
+          double radius_corrected = radius * cos(dphi);
+          double yLocal = radius * sin(dphi); // if negative, we are closer to pmt with index 0
+          double zLocal = radius * cos(dphi);
+          double halfYLocal = radius_corrected * TAN_PI_64 - size_correction;
+          if (fabs(yLocal) > halfYLocal) {
+            ATH_MSG_ERROR( "Displaced hit with id " << m_tileID->to_string(hit_id,-1)
+                           << " x " << x << " y " << y
+                           << " radius_corr " << radius_corrected
+                           << " yLocal " << yLocal  << " halfYlocal_corr " << halfYLocal
+                           << " delta " << fabs(yLocal) - halfYLocal );
+            // correcting yLocal
+            yLocal = copysign(halfYLocal,yLocal);
+          }
+
+          // tile row or tile index - number from 0 to 10
+          int tile_ind = std::lower_bound (tile_radius, tile_radius+12,radius_corrected)-tile_radius-1;
+          if (tile_ind < 0 || tile_ind > 10 ) {
+            ATH_MSG_ERROR( "Displaced hit with id " << m_tileID->to_string(hit_id,-1)
+                           << " x " << x << " y " << y
+                           << " radius " << radius << " corrected " << radius_corrected
+                           << " tile_index " << tile_ind );
+            // correcting tile index
+            if (tile_ind<0) tile_ind = 0;
+            if (tile_ind>10) tile_ind = 10;
+          }
+          TileHitData hitData;
+          hitData.tileSize = tile_ind;
+          hitData.nDetector = section;
+          hitData.nSide = side;
+          m_calc->pmtEdepFromFCS_StepInfo(hitData, ene, yLocal, halfYLocal, zLocal, m_Ushape);
+          edep[0] = hitData.edep_down;
+          edep[1] = hitData.edep_up;
+
+          for (int pm=0; pm<2; ++pm) {
+            // changing hit_id, - use proper pm index (0 or 1) for down/up pmt
+            hit_id = m_tileID->pmt_id(cell_id,pm);
+            m_tileID->get_hash(hit_id, hit_idhash, &pmt_context);
+
+            double tim=time;
+            if (pm != pmt) { // need to correct time
+              const double ref_ind_tile = 1.59;
+              const double inv_speed = ref_ind_tile / CLHEP::c_light;
+              if (pmt) tim -= 2 * yLocal * inv_speed;
+              else tim += 2 * yLocal * inv_speed;
             }
-        }
 
-    }//retrieve(inCollect,m_FCS_StepInfo).isTrue()
+            if ( ! m_allHits[hit_idhash] ) {
+              m_allHits[hit_idhash] = new TileHit(hit_id,edep[pm],tim,m_deltaT);
+              ++newHits;
+              // ATH_MSG_INFO(
+              ATH_MSG_VERBOSE(
+                              "Iterating over Steps:  new  hit with id " << m_tileID->to_string(hit_id,-1)
+                              << "  nHit=" << nHit << "  pmt " << pmt << "  energy=" << edep[pm] << "  time="
+                              << time << " + " << tim-time << " = " << tim);
+            } else {
+              m_allHits[hit_idhash]->add(edep[pm],tim,m_deltaT);
+              // ATH_MSG_INFO(
+              ATH_MSG_VERBOSE(
+                              "Iterating over Steps: extra hit with id " << m_tileID->to_string(hit_id,-1)
+                              << "  nHit=" << nHit << "  pmt " << pmt << "  energy=" << edep[pm] << "  time="
+                              << time << " + " << tim-time << " = " << tim);
+            }
+          }
+
+        }//cell have two pmt
+
+      }//m_UshapeType >= 0
+
+      ++nHit;
+      Etot += ene;
+    }//is_tile(hit_id)
+
+  }//Iterating over Steps
+
+  ATH_MSG_DEBUG( "End of Iterating over Steps:  nHit=" << nHit << "  newHits=" << newHits << "  Etot=" << Etot );
+  // ATH_MSG_INFO( "End of Iterating over Steps:  nHit=" << nHit << "  newHits=" << newHits << "  Etot=" << Etot );
+  nHit = 0;
+  Etot = 0.0;
+
+  // Addition of each TileHit to the TileHitVector
+  std::vector<TileHit*>::const_iterator curr = m_allHits.begin();
+  std::vector<TileHit*>::const_iterator iend = m_allHits.end();
+  for ( ; curr != iend; ++curr) {
+    if (*curr) {
+      TileHit *pHit = (*curr);
+
+      // ATH_MSG_INFO(
+      ATH_MSG_VERBOSE(
+                      "Iterating over Hits:  nHit=" << nHit << "  size="
+                      << pHit->size() << "  energy=" << pHit->energy() );
+      FCS_hits->push_back(*pHit);
+      ++nHit;
+      for (int ii=0; ii<pHit->size(); ++ii ) Etot += pHit->energy(ii);
+      sum_size += pHit->size();
+    }
+  }
 
-    // Register the set of TileHits to the event store
-    CHECK( evtStore()->record(std::move(FCS_hits), m_hitVec, false ) );
+  // Register the set of TileHits to the event store
+  CHECK( evtStore()->record(std::move(FCS_hits), m_hitVec, false ) );
 
-    ATH_MSG_DEBUG( "Execution completed,  nHit=" << nHit << "  sum_size=" << sum_size << "  Etot=" << Etot );
-    // ATH_MSG_INFO( "Execution completed,  nHit=" << nHit << "  sum_size=" << sum_size << "  Etot=" << Etot );
+  ATH_MSG_DEBUG( "Execution completed,  nHit=" << nHit << "  sum_size=" << sum_size << "  Etot=" << Etot );
+  // ATH_MSG_INFO( "Execution completed,  nHit=" << nHit << "  sum_size=" << sum_size << "  Etot=" << Etot );
 
-    return StatusCode::SUCCESS;
+  return StatusCode::SUCCESS;
 }
 
-
 //****************************************************************************
 //* Finalize
 //****************************************************************************
 StatusCode TileFCSmStepToTileHitVec::finalize()
 {
-    ATH_MSG_INFO( "Finalized successfully" );
+  ATH_MSG_INFO( "Finalized successfully" );
 
-    return StatusCode::SUCCESS;
+  return StatusCode::SUCCESS;
 }
 
diff --git a/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.h b/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.h
index d4c0f84c2a19445dbd7f858b2d07607654714b45..0ccf919af0a4b8fe9dc764b109dfd429d148c7d2 100644
--- a/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.h
+++ b/TileCalorimeter/TileFastCaloSim/src/TileFCSmStepToTileHitVec.h
@@ -34,42 +34,44 @@ class TileHit;
 class TileInfo;
 class TileDetDescrManager;
 class TileGeoG4SDCalc;
-
+class ITileCalculator;
 class FCS_StepInfoCollection;
-
-#include "TileGeoG4SD/TileSDOptions.h"
+class IGeoModelSvc;
 
 // C++ STL includes
 #include <string>
 #include <vector>
 
 class TileFCSmStepToTileHitVec: public AthAlgorithm {
-  public:
-    // Constructor
-    TileFCSmStepToTileHitVec(const std::string& name, ISvcLocator* pSvcLocator);
+public:
+  // Constructor
+  TileFCSmStepToTileHitVec(const std::string& name, ISvcLocator* pSvcLocator);
+
+  // Destructor
+  virtual ~TileFCSmStepToTileHitVec();
 
-    // Destructor
-    virtual ~TileFCSmStepToTileHitVec();
+  // Gaudi Hooks
+  StatusCode initialize();
+  StatusCode execute();
+  StatusCode finalize();
 
-    // Gaudi Hooks
-    StatusCode initialize();
-    StatusCode execute();
-    StatusCode finalize();
+private:
+  int getUshapeFromGM() const;
 
-  private:
-    std::string m_FCS_StepInfo;
-    std::string m_hitVec;
-    std::string m_infoName;
+  ServiceHandle<IGeoModelSvc> m_geoModSvc;
+  std::string m_FCS_StepInfo;
+  std::string m_hitVec;
+  std::string m_infoName;
 
-    const TileID*               m_tileID;
-    const TileInfo*             m_tileInfo;
-    const TileDetDescrManager*  m_tileMgr;
-    TileGeoG4SDCalc*            m_calc;
+  const TileID*               m_tileID;
+  const TileInfo*             m_tileInfo;
+  const TileDetDescrManager*  m_tileMgr;
+  ServiceHandle<ITileCalculator> m_calc;
 
-    float   m_deltaT;
-    std::vector<TileHit*> m_allHits;
+  float   m_deltaT;
+  std::vector<TileHit*> m_allHits;
 
-    TileSDOptions m_options;
+  int m_Ushape;
 };
 
 #endif // TILERECALGS_TILEFCSMSTEPTOTILEHITVEC_H
diff --git a/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorConfig.py b/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorConfig.py
index 54343961590129333c3e731b4a119b44e53c3ce4..ad1193366c7515a9eccc907a2ceb3f79d01a4d7f 100644
--- a/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorConfig.py
+++ b/TileCalorimeter/TileG4/TileAncillary/MinBiasScintillator/python/MinBiasScintillatorConfig.py
@@ -1,9 +1,19 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
+
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+
+
 def getMinBiasScintillatorSD(name="MinBiasScintillatorSD", **kwargs):
+    bare_collection_name = "MBTSHits"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "MBTSHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["LArMgr::MBTS1", "LArMgr::MBTS2"])
-    kwargs.setdefault("OutputCollectionNames", ["MBTSHits"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
     from G4AtlasApps.SimFlags import simFlags
     from AthenaCommon.BeamFlags import jobproperties
     if jobproperties.Beam.beamType() == 'cosmics' or (hasattr(simFlags, "ReadTR") and simFlags.ReadTR.statusOn):
diff --git a/TileCalorimeter/TileG4/TileG4Interfaces/CMakeLists.txt b/TileCalorimeter/TileG4/TileG4Interfaces/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..d6441544b0666396eb5ea405ef57e7a43aa49321
--- /dev/null
+++ b/TileCalorimeter/TileG4/TileG4Interfaces/CMakeLists.txt
@@ -0,0 +1,19 @@
+################################################################################
+# Package: TileG4Interfaces
+################################################################################
+
+# Declare the package name:
+atlas_subdir( TileG4Interfaces )
+
+# Declare the package's dependencies:
+atlas_depends_on_subdirs( PUBLIC
+                          GaudiKernel
+                          DetectorDescription/Identifier
+                           )
+
+# External dependencies:
+find_package( Geant4 )
+
+# Install files from the package:
+atlas_install_headers( TileG4Interfaces )
+
diff --git a/TileCalorimeter/TileG4/TileG4Interfaces/TileG4Interfaces/ITileCalculator.h b/TileCalorimeter/TileG4/TileG4Interfaces/TileG4Interfaces/ITileCalculator.h
new file mode 100644
index 0000000000000000000000000000000000000000..105d8cbad4c8a265c09e63cce998aeb782a3062a
--- /dev/null
+++ b/TileCalorimeter/TileG4/TileG4Interfaces/TileG4Interfaces/ITileCalculator.h
@@ -0,0 +1,94 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+//************************************************************
+// Filename : TileGeoG4SDCalc.hh
+// Author   : Sergey Karpov <Sergey.Karpov@cern.ch>
+// Created  : July, 2013
+//
+// DESCRIPTION:
+//   Sensitive Detector initialisation for TileCal G4 simulations
+//   of both ordinary Hits and CalibHits
+//
+// HISTORY:
+//   Nov 2013 - Work with U-shape was added (Sasha Solodkov)
+//
+//************************************************************
+
+#ifndef TILEG4INTERFACES_ITILECALCULATOR_H
+#define TILEG4INTERFACES_ITILECALCULATOR_H
+
+// Geant4 headers
+#include "G4Types.hh"
+
+#include "GaudiKernel/IService.h"
+#include "Identifier/Identifier.h"
+
+class G4Step;
+class TileGeoG4Section;
+class TileGeoG4Cell;
+class TileGeoG4LookupBuilder;
+
+struct TileMicroHit {
+  Identifier pmt_up;
+  Identifier pmt_down;
+  G4double e_up;
+  G4double e_down;
+  double time_up;
+  double time_down;
+  //int         period,     tilerow; // prepared for future use
+};
+
+/// Variables to identify Hit objects
+struct TileHitData {
+  TileGeoG4Section *section = nullptr;
+  TileGeoG4Cell *cell = nullptr;
+  int nModule = 0;
+  int nDetector = 0;
+  int nTower = 0;
+  int nSample = 0;
+  int nSide = 0;
+  int nrOfPMT = 0;
+  int tileSize = 0;
+  int tilePeriod = 0;
+  double totalTimeUp = 0.0;
+  double totalTimeDown = 0.0;
+  bool isNegative = false;
+  Identifier pmtID_up;
+  Identifier pmtID_down;
+  G4double edep_up = 0.0;
+  G4double edep_down = 0.0;
+  double scin_Time_up = 0.0;
+  double scin_Time_down = 0.0;
+};
+
+class ITileCalculator : virtual public IService {
+  public:
+  ///
+  ITileCalculator() {}
+  ///
+  virtual ~ITileCalculator() {}
+  ///
+  static const InterfaceID& interfaceID() {
+    static const InterfaceID IID_ITileCalculator( "ITileCalculator" , 1 , 0 ) ;
+    return IID_ITileCalculator;
+  }
+
+  /// Search for the tilecal sub-section, its module and some identifiers
+  virtual G4bool FindTileScinSection(const G4Step*, TileHitData& hitData) const = 0;
+  /// Calculation of pmtID, edep and scin_Time with aStep (Sergey)
+  virtual G4bool MakePmtEdepTime(const G4Step*, TileHitData& hitData) const = 0;
+  /// Calculation of pmtID, edep and scin_Time with aStep (Sergey)
+  virtual G4bool ManageScintHit(TileHitData& hitData) const = 0;
+  /// Used by FastCaloSimParamAction
+  virtual TileMicroHit GetTileMicroHit(const G4Step*, TileHitData& hitData) const = 0;
+  ///
+  virtual TileGeoG4LookupBuilder* GetLookupBuilder() const = 0;
+  /// Method used by TileFastCaloSim/TileFCSmStepToTileHitVec
+  virtual void pmtEdepFromFCS_StepInfo(TileHitData& hitData, double ene, double yLocal, double halfYLocal, double zLocal, int Ushape) const = 0;
+
+};
+//class ITileCalculator
+
+#endif // not TILEG4INTERFACES_ITILECALCULATOR_H
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/CMakeLists.txt b/TileCalorimeter/TileG4/TileGeoG4Calib/CMakeLists.txt
index 8d4b87c38ab4552cdcc821215a8e77984349e86d..9b4d2a9b142268b27f9d5bd211d8bb6107e0e82f 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/CMakeLists.txt
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/CMakeLists.txt
@@ -23,6 +23,7 @@ atlas_depends_on_subdirs( PUBLIC
                           TileCalorimeter/TileDetDescr
                           TileCalorimeter/TileG4/TileGeoG4SD
                           TileCalorimeter/TileSimEvent
+                          TileCalorimeter/TileG4/TileG4Interfaces
                           Tools/PathResolver )
 
 # External dependencies:
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/doc/packagedoc.h b/TileCalorimeter/TileG4/TileGeoG4Calib/doc/packagedoc.h
index 6a52c141ade54306d033f4bafd89cfd1ebda2a0f..a30dad6974d41d3a77df2727203a7eaddf7559eb 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/doc/packagedoc.h
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/doc/packagedoc.h
@@ -20,17 +20,6 @@ TileEscapedEnergyProcessing  -  manages processing of those particles that were
 
 @author Gia Khoriauli <gia.khoriauli@cern.ch>
 
-@ref used_TileGeoG4Calib
 
-@ref requirements_TileGeoG4Calib
 
 */
-
-/**
-@page used_TileGeoG4Calib Used Packages
-*/
-
-/**
-@page requirements_TileGeoG4Calib Requirements
-*/
-
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileCalibDddbManager.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileCalibDddbManager.cc
index a5e74e404479bbc3bf3bfeddb57efed4f55f0ab3..c9b23ca8128fd26175859ad947415be64dc571bf 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileCalibDddbManager.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileCalibDddbManager.cc
@@ -22,8 +22,8 @@
 #include <sstream>
 
 TileCalibDddbManager::TileCalibDddbManager(ServiceHandle<IRDBAccessSvc> &access, std::string version_tag,
-    std::string version_node, const int verboseLevel)
-    : m_currentTile(0),
+                                           std::string version_node, const int verboseLevel)
+  : m_currentTile(0),
     m_currentSection(0),
     m_currentCell(0),
     m_currentPlateCell(0),
@@ -32,12 +32,10 @@ TileCalibDddbManager::TileCalibDddbManager(ServiceHandle<IRDBAccessSvc> &access,
     m_currentPlateCellInd( -1),
     m_currentGirderCellInd( -1),
     m_tag(version_tag),
-    m_node(version_node),
-    m_verboseLevel(verboseLevel)
+  m_node(version_node),
+  m_verboseLevel(verboseLevel)
 {
 
-  access->connect();
-
   m_tile = access->getRecordsetPtr("TILE", m_tag, m_node);
   m_nTile = m_tile->size();
 
@@ -55,8 +53,6 @@ TileCalibDddbManager::TileCalibDddbManager(ServiceHandle<IRDBAccessSvc> &access,
 
   m_switches = access->getRecordsetPtr("TileSwitches", m_tag, m_node);
 
-  access->disconnect();
-
 }
 
 // --------------------------- T I L E -------------------------
@@ -218,7 +214,7 @@ int TileCalibDddbManager::SetNextDetGirderCell() {
   int currentDetector = (*m_tileGirderCell)[m_currentGirderCellInd]->getInt("DETECTOR");
 
   if ( (++m_currentGirderCellInd == static_cast<int>(m_nTileGCell))
-      || ( (*m_tileGirderCell)[m_currentGirderCellInd]->getInt("DETECTOR") != currentDetector)) {
+       || ( (*m_tileGirderCell)[m_currentGirderCellInd]->getInt("DETECTOR") != currentDetector)) {
     m_currentGirderCellInd--;
     return 0;  // FAILURE
   }
@@ -429,15 +425,15 @@ double TileCalibDddbManager::GetPlateCellZBound() const {
     if (m_currentPlateCell->isFieldNull("ZBOUND")) {
       if (m_verboseLevel > 5)
         G4cout << "GetPlateCellZBound() - ZBOUND" << " in DETECTOR " << m_currentPlateCell->getInt("DETECTOR")
-        << " SAMPLE " << m_currentPlateCell->getInt("SAMPLE") << " TOWER " << m_currentPlateCell->getInt("TOWER")
-        << " is NULL, returning -9999.9" << G4endl;
+               << " SAMPLE " << m_currentPlateCell->getInt("SAMPLE") << " TOWER " << m_currentPlateCell->getInt("TOWER")
+               << " is NULL, returning -9999.9" << G4endl;
       return -9999.9;
     } else {
       return m_currentPlateCell->getDouble("ZBOUND");
     }
   } else {
     G4cout << "GetPlateCellZBound() - Current PlateCell not set, returning -9999.9"
-    << G4endl;
+           << G4endl;
     return -9999.9;
   }
 }
@@ -447,15 +443,15 @@ int TileCalibDddbManager::GetPlateCellNeighborPeriod() const {
     if (m_currentPlateCell->isFieldNull("NEIGHPERIOD")) {
       if (m_verboseLevel > 5)
         G4cout << "GetPlateCellNeighborPeriod() - NEIGHPERIOD " << " in DETECTOR "
-        << m_currentPlateCell->getInt("DETECTOR") << " SAMPLE " << m_currentPlateCell->getInt("SAMPLE")
-        << " TOWER " << m_currentPlateCell->getInt("TOWER") << " is NULL, returning -999" << G4endl;
+               << m_currentPlateCell->getInt("DETECTOR") << " SAMPLE " << m_currentPlateCell->getInt("SAMPLE")
+               << " TOWER " << m_currentPlateCell->getInt("TOWER") << " is NULL, returning -999" << G4endl;
       return -999;
     } else {
       return m_currentPlateCell->getInt("NEIGHPERIOD");
     }
   } else {
     G4cout << "GetPlateCellNeighborPeriod() - Current PlateCell not set, returning -999"
-    << G4endl;
+           << G4endl;
     return -999;
   }
 }
@@ -518,7 +514,7 @@ int TileCalibDddbManager::SetNextDetCell() {
   int currentDetector = (*m_tileCell)[m_currentCellInd]->getInt("DETECTOR");
 
   if ( (++m_currentCellInd == static_cast<int>(m_nTileCell)) || ( (*m_tileCell)[m_currentCellInd]->getInt("DETECTOR")
-       != currentDetector)) {
+                                                                  != currentDetector)) {
     m_currentCellInd--;
     return 0;  // FAILURE
   }
@@ -535,7 +531,7 @@ int TileCalibDddbManager::SetNextDetCellInSample() {
   int currentSample = (*m_tileCell)[m_currentCellInd]->getInt("SAMPLE");
 
   if ( (++m_currentCellInd == static_cast<int>(m_nTileCell)) || ( (*m_tileCell)[m_currentCellInd]->getInt("DETECTOR")
-       != currentDetector)
+                                                                  != currentDetector)
        || ( (*m_tileCell)[m_currentCellInd]->getInt("SAMPLE") != currentSample)) {
     m_currentCellInd--;
     return 0;  // FAILURE
@@ -558,14 +554,14 @@ int TileCalibDddbManager::GetNumOfPeriodsInCell(int period_set) const {
     if (m_currentCell->isFieldNull("PERIODS_" + indx)) {
       if (m_verboseLevel > 5)
         G4cout << "GetNumOfPeriodsInCell() - PERIODS_" << indx << " in DETECTOR " << m_currentCell->getInt("DETECTOR")
-        << " SAMPLE " << m_currentCell->getInt("SAMPLE") << " is NULL, returning -999" << G4endl;
+               << " SAMPLE " << m_currentCell->getInt("SAMPLE") << " is NULL, returning -999" << G4endl;
       return -999;
     } else {
       return m_currentCell->getInt("PERIODS", period_set);
     }
   } else {
     G4cout << "GetNumOfPeriodsInCell() - Current Cell not set, returning -999"
-    << G4endl;
+           << G4endl;
     return -999;
   }
 }
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileCalibDddbManager.h b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileCalibDddbManager.h
index ea1c738f5fa61e2e1927b9f546dfe2f0cf84bc98..dfc58c9cf8cbb83c79cdacb825a9eb76fbae4b7c 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileCalibDddbManager.h
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileCalibDddbManager.h
@@ -6,7 +6,7 @@
 //
 // Manager for Tile Calibration DB
 //
-// author: Gia Khoriauli  <gia@mail.cern.ch> 
+// author: Gia Khoriauli  <gia@mail.cern.ch>
 //
 // May, 2005
 //
@@ -22,129 +22,129 @@
 class IRDBRecord;
 
 class TileCalibDddbManager {
-  public:
-
-    TileCalibDddbManager(ServiceHandle<IRDBAccessSvc> &access, std::string version_tag, std::string version_node,
-                         const int verboseLevel);
-    // Default destructor is fine
-
-    enum TileCalibSections {
-      TILE_BARREL = 1,
-      TILE_EBARREL = 2,
-      TILE_PLUG1 = 3,
-      TILE_PLUG2 = 4,
-      TILE_PLUG3 = 5,
-      TILE_PLUG4 = 6
-    };
-
-    // ---------------- T I L E ---------------
-    int GetNumModules(int index) const;
-    bool GetSwitchPlateToCell() const;
-    // -------------- S E C T I O N --------------
-    void SetCurrentSection(unsigned int section);
-
-    int GetCurrentSection() const;
-    int GetNumSectPeriods() const;
-    int GetNumSectSamples() const;
-    int GetNumSectCells() const;
-    int GetNumSectPlateCells() const;
-    int GetNumSectGirderCells() const;
-
-    double GetSampleZBound(int index) const;
-
-    // ---------- G I R D E R   C E L L -----------
-    void SetCurrentGirderCell(unsigned int item);
-
-    int SetFirstDetGirderCell(int detector);
-    int SetNextDetGirderCell();
-
-    int GetGirderCellDetector() const;
-    int GetGirderCellNum() const;
-    int GetGirderCellTower() const;
-    int GetGirderCellSample() const;
-    double GetGirderCellEta() const;
-    double GetGirderCellDeta() const;
-    double GetGirderCellXBound() const;
-
-    // ------------ P L A T E  C E L L ----------
-    void SetCurrentPlateCell(unsigned int section);
-
-    int SetFirstDetPlateCell(int detector);
-    int SetFirstDetPlateCellInSample(int detector, int sample);
-    int SetNextDetPlateCell();
-    int SetNextDetPlateCellInSample();
-
-    int GetPlateCellDetector() const;
-    int GetPlateCellNum() const;
-    int GetPlateCellTower() const;
-    int GetPlateCellSample() const;
-    double GetPlateCellEta() const;
-    double GetPlateCellDeta() const;
-    double GetPlateCellXBound() const;
-    double GetPlateCellZBound() const;
-    int GetPlateCellNeighborPeriod() const;
-
-    // ----------------- C E L L -------------------
-
-    //  void SetCurrentCell(int detector, double sample, double tower);
-    void SetCurrentCell(unsigned int index);
-
-    // Find first Cell for given Tile Section (detector)
-    // 1 - success; 0 - doesn't exist any Cells for given Section
-    int SetFirstDetCell(int detector);
-
-    // Find first Cell for given Tile Section and Sample
-    // 1 - success; 0 - doesn't exist any such Cell
-    int SetFirstDetCellInSample(int detector, int sample);
-
-    // Move to the next Cell with the same Tile Section field
-    // 1 - success; 0 - the current is last one, it remains unchanged
-    int SetNextDetCell();
-
-    // Move to the next Cell with the same Tile Section and Sample fields
-    // 1 - success; 0 - the current is last one, it remains unchanged
-    int SetNextDetCellInSample();
-
-    int GetNumOfPeriodsInCell(int index) const;
-    int GetCellSample() const;
-    int GetCellDetector() const;
-
-    //Get IRDBRecordsets sizes
-    int GetTileIRDBRS_size() const;
-    int GetTileCalibSectionsIRDBRS_size() const;
-    int GetTileCalibCellsIRDBRS_size() const;
-    int GetTileCalibPlateCellsIRDBRS_size() const;
-    int GetTileCalibGirderCellsIRDBRS_size() const;
-
-  private:
-
-    IRDBRecordset_ptr m_tile;
-    IRDBRecordset_ptr m_tileSection;
-    IRDBRecordset_ptr m_tileCell;
-    IRDBRecordset_ptr m_tilePlateCell;
-    IRDBRecordset_ptr m_tileGirderCell;
-    IRDBRecordset_ptr m_switches;
-
-    unsigned int m_nTile;
-    unsigned int m_nTileSect;
-    unsigned int m_nTileCell;
-    unsigned int m_nTilePCell;
-    unsigned int m_nTileGCell;
-
-    const IRDBRecord* m_currentTile;
-    const IRDBRecord* m_currentSection;
-    const IRDBRecord* m_currentCell;
-    const IRDBRecord* m_currentPlateCell;
-    const IRDBRecord* m_currentGirderCell;
-
-    int m_currentCellInd;
-    int m_currentPlateCellInd;
-    int m_currentGirderCellInd;
-
-    std::string m_tag;
-    std::string m_node;
-
-    int m_verboseLevel;
+public:
+
+  TileCalibDddbManager(ServiceHandle<IRDBAccessSvc> &access, std::string version_tag, std::string version_node,
+                       const int verboseLevel);
+  // Default destructor is fine
+
+  enum TileCalibSections {
+    TILE_BARREL = 1,
+    TILE_EBARREL = 2,
+    TILE_PLUG1 = 3,
+    TILE_PLUG2 = 4,
+    TILE_PLUG3 = 5,
+    TILE_PLUG4 = 6
+  };
+
+  // ---------------- T I L E ---------------
+  int GetNumModules(int index) const;
+  bool GetSwitchPlateToCell() const;
+  // -------------- S E C T I O N --------------
+  void SetCurrentSection(unsigned int section);
+
+  int GetCurrentSection() const;
+  int GetNumSectPeriods() const;
+  int GetNumSectSamples() const;
+  int GetNumSectCells() const;
+  int GetNumSectPlateCells() const;
+  int GetNumSectGirderCells() const;
+
+  double GetSampleZBound(int index) const;
+
+  // ---------- G I R D E R   C E L L -----------
+  void SetCurrentGirderCell(unsigned int item);
+
+  int SetFirstDetGirderCell(int detector);
+  int SetNextDetGirderCell();
+
+  int GetGirderCellDetector() const;
+  int GetGirderCellNum() const;
+  int GetGirderCellTower() const;
+  int GetGirderCellSample() const;
+  double GetGirderCellEta() const;
+  double GetGirderCellDeta() const;
+  double GetGirderCellXBound() const;
+
+  // ------------ P L A T E  C E L L ----------
+  void SetCurrentPlateCell(unsigned int section);
+
+  int SetFirstDetPlateCell(int detector);
+  int SetFirstDetPlateCellInSample(int detector, int sample);
+  int SetNextDetPlateCell();
+  int SetNextDetPlateCellInSample();
+
+  int GetPlateCellDetector() const;
+  int GetPlateCellNum() const;
+  int GetPlateCellTower() const;
+  int GetPlateCellSample() const;
+  double GetPlateCellEta() const;
+  double GetPlateCellDeta() const;
+  double GetPlateCellXBound() const;
+  double GetPlateCellZBound() const;
+  int GetPlateCellNeighborPeriod() const;
+
+  // ----------------- C E L L -------------------
+
+  //  void SetCurrentCell(int detector, double sample, double tower);
+  void SetCurrentCell(unsigned int index);
+
+  // Find first Cell for given Tile Section (detector)
+  // 1 - success; 0 - doesn't exist any Cells for given Section
+  int SetFirstDetCell(int detector);
+
+  // Find first Cell for given Tile Section and Sample
+  // 1 - success; 0 - doesn't exist any such Cell
+  int SetFirstDetCellInSample(int detector, int sample);
+
+  // Move to the next Cell with the same Tile Section field
+  // 1 - success; 0 - the current is last one, it remains unchanged
+  int SetNextDetCell();
+
+  // Move to the next Cell with the same Tile Section and Sample fields
+  // 1 - success; 0 - the current is last one, it remains unchanged
+  int SetNextDetCellInSample();
+
+  int GetNumOfPeriodsInCell(int index) const;
+  int GetCellSample() const;
+  int GetCellDetector() const;
+
+  //Get IRDBRecordsets sizes
+  int GetTileIRDBRS_size() const;
+  int GetTileCalibSectionsIRDBRS_size() const;
+  int GetTileCalibCellsIRDBRS_size() const;
+  int GetTileCalibPlateCellsIRDBRS_size() const;
+  int GetTileCalibGirderCellsIRDBRS_size() const;
+
+private:
+
+  IRDBRecordset_ptr m_tile;
+  IRDBRecordset_ptr m_tileSection;
+  IRDBRecordset_ptr m_tileCell;
+  IRDBRecordset_ptr m_tilePlateCell;
+  IRDBRecordset_ptr m_tileGirderCell;
+  IRDBRecordset_ptr m_switches;
+
+  unsigned int m_nTile;
+  unsigned int m_nTileSect;
+  unsigned int m_nTileCell;
+  unsigned int m_nTilePCell;
+  unsigned int m_nTileGCell;
+
+  const IRDBRecord* m_currentTile;
+  const IRDBRecord* m_currentSection;
+  const IRDBRecord* m_currentCell;
+  const IRDBRecord* m_currentPlateCell;
+  const IRDBRecord* m_currentGirderCell;
+
+  int m_currentCellInd;
+  int m_currentPlateCellInd;
+  int m_currentGirderCellInd;
+
+  std::string m_tag;
+  std::string m_node;
+
+  int m_verboseLevel;
 };
 
 #endif // TILEGEOG4CALIB_TILECALIBDDDBMANAGER_H
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileEscapedEnergyProcessing.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileEscapedEnergyProcessing.cc
index c4bcb27fb7679348e7a96acc911f6daa8001e1c0..8aa95d3cf5878a84b36867fd2437b36f916d89fd 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileEscapedEnergyProcessing.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileEscapedEnergyProcessing.cc
@@ -23,10 +23,10 @@
 #include "G4VSensitiveDetector.hh"
 
 TileEscapedEnergyProcessing::TileEscapedEnergyProcessing(const int /*verboseLevel*/)
-    : m_escaped(false),
-      m_escapedEnergy(0),
-      m_energy5(0)//,
-      //m_verboseLevel(verboseLevel)
+  : m_escaped(false),
+    m_escapedEnergy(0),
+    m_energy5(0)//,
+    //m_verboseLevel(verboseLevel)
 {
   ;
 }
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileEscapedEnergyProcessing.h b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileEscapedEnergyProcessing.h
index bd3870570187b3e34961df3907559eece33e620e..d0e4d456e310d9cef2cbd161cb647d794718ed33 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileEscapedEnergyProcessing.h
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileEscapedEnergyProcessing.h
@@ -41,38 +41,38 @@
 class G4Step;
 
 class TileEscapedEnergyProcessing: public CaloG4::VEscapedEnergyProcessing {
-  public:
-    TileEscapedEnergyProcessing(const int verboseLevel);
-    virtual ~TileEscapedEnergyProcessing();
-
-    // Method: The G4TouchableHandle to the volume in which "point" is
-    // located; the value of "point" itself in case additional
-    // processing is necessary, and the amount of escaped energy.
-    virtual G4bool Process(G4TouchableHandle& handle, G4ThreeVector& point, G4double energy);
-
-    //After escaped particle is detected and its 'mother' step is created
-    //this method will retrieve the respective SD for the volume where escaped
-    //particle was created and invokes SD::ProcessHits() - method.
-    G4bool Call_SD_ProcessHits(G4Step* aStep, G4String &SDname);
-
-    void SetEscapedFlag(bool);
-    void SetEnergy5(double);
-    void SetEscapedEnergy(double);
-
-    bool GetEscapedFlag();
-    double GetEnergy5();
-    double GetEscapedEnergy();
-
-  private:
-    TileEscapedEnergyProcessing() = delete;
-    // takes the flag that particle has escaped,
-    // the 'mother' step of escaped particle and
-    // amount of that energy, which can't be calculated
-    // by Simulation energies
-    bool m_escaped;
-    double m_escapedEnergy;
-    double m_energy5;
-    //int m_verboseLevel;
+public:
+  TileEscapedEnergyProcessing(const int verboseLevel);
+  virtual ~TileEscapedEnergyProcessing();
+
+  // Method: The G4TouchableHandle to the volume in which "point" is
+  // located; the value of "point" itself in case additional
+  // processing is necessary, and the amount of escaped energy.
+  virtual G4bool Process(G4TouchableHandle& handle, G4ThreeVector& point, G4double energy);
+
+  //After escaped particle is detected and its 'mother' step is created
+  //this method will retrieve the respective SD for the volume where escaped
+  //particle was created and invokes SD::ProcessHits() - method.
+  G4bool Call_SD_ProcessHits(G4Step* aStep, G4String &SDname);
+
+  void SetEscapedFlag(bool);
+  void SetEnergy5(double);
+  void SetEscapedEnergy(double);
+
+  bool GetEscapedFlag();
+  double GetEnergy5();
+  double GetEscapedEnergy();
+
+private:
+  TileEscapedEnergyProcessing() = delete;
+  // takes the flag that particle has escaped,
+  // the 'mother' step of escaped particle and
+  // amount of that energy, which can't be calculated
+  // by Simulation energies
+  bool m_escaped;
+  double m_escapedEnergy;
+  double m_energy5;
+  //int m_verboseLevel;
 
 };
 
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc
index dcf5e0cc37d025b45575b235db0deec5e824680c..8d10741e501e76f379331ed07091b074ca7777c5 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.cc
@@ -22,7 +22,7 @@
 #include "TileGeoG4CalibSD.h"
 #include "TileGeoG4DMLookupBuilder.h"
 #include "TileEscapedEnergyProcessing.h"
-#include "TileGeoG4SD/TileGeoG4SDCalc.hh"
+#include "TileG4Interfaces/ITileCalculator.h"
 #include "TileGeoG4SD/TileGeoG4Lookup.hh"
 #include "TileGeoG4SD/TileGeoG4LookupBuilder.hh"
 #include "TileSimEvent/TileHitVector.h"
@@ -58,69 +58,69 @@
 #include <string>
 
 //CONSTRUCTOR
-TileGeoG4CalibSD::TileGeoG4CalibSD(const G4String& name, const std::vector<std::string>& outputCollectionNames,
+TileGeoG4CalibSD::TileGeoG4CalibSD(const G4String& name, const std::vector<std::string>& outputCollectionNames, ITileCalculator* tileCalculator,
                                    ServiceHandle<StoreGateSvc> &detStore, const TileSDOptions &opts)
-    : G4VSensitiveDetector(name),
-      m_tileActiveCellCalibHits(outputCollectionNames[1]),
-      m_tileInactiveCellCalibHits(outputCollectionNames[2]),
-      m_tileDeadMaterialCalibHits(outputCollectionNames[3]),
-      m_tileHits(outputCollectionNames[0]),
-      m_options(opts),
-      m_rdbSvc(opts.rDBAccessSvcName, name),
-      m_geoModSvc(opts.geoModelSvcName, name),
+: G4VSensitiveDetector(name),
+  m_tileActiveCellCalibHits(outputCollectionNames[1]),
+  m_tileInactiveCellCalibHits(outputCollectionNames[2]),
+  m_tileDeadMaterialCalibHits(outputCollectionNames[3]),
+  m_tileHits(outputCollectionNames[0]),
+  m_options(opts),
+  m_rdbSvc(opts.rDBAccessSvcName, name),
+  m_geoModSvc(opts.geoModelSvcName, name),
 #ifdef HITSINFO    //added by Sergey
-      m_ntuple("TileCalibHitNtuple/TileCalibHitNtuple"),
-      m_ntupleCnt("TileCalibHitCntNtup/TileCalibHitCntNtup"),
+  m_ntuple("TileCalibHitNtuple/TileCalibHitNtuple"),
+  m_ntupleCnt("TileCalibHitCntNtup/TileCalibHitCntNtup"),
 #endif
-      m_calc(0),
-      m_lookupDM(0),
-      m_simEn(0),
-      m_tile_eep(0),
-      m_E_tot(0.0),
-      m_E_em(0.0),
-      m_E_nonem(0.0),
-      m_E_invisible(0.0),
-      m_E_escaped(0.0),
-      m_E0(0.0),
-      m_E1(0.0),
-      m_E2(0.0),
-      m_E3(0.0),
-      m_stepTouchable(0),
-      m_stepPhysVol(0),
-      m_cSection(0),
-      m_cell(0),
-      m_pCell(0),
-      m_gCell(0),
-      m_result(),
-      m_id(),
-      m_id_pmt_up(),
-      m_id_pmt_down(),
-      m_calibHitType(0),
-      m_subCalo(0),
-      m_detector(0),
-      m_side(0),
-      m_module(0),
-      m_tower(0),
-      m_sample(0),
-      m_dm_subDet(0),
-      m_dm_type(0),
-      m_dm_sample(0),
-      m_dm_region(0),
-      m_dm_neta(0),
-      m_dm_nphi(0),
-      m_xGlobal(0.0),
-      m_yGlobal(0.0),
-      m_zGlobal(0.0),
-      m_phiGlobal(0.0),
-      m_cellNum(0),
+  m_calc(tileCalculator),
+  m_lookupDM(0),
+  m_simEn(0),
+  m_tile_eep(0),
+  m_E_tot(0.0),
+  m_E_em(0.0),
+  m_E_nonem(0.0),
+  m_E_invisible(0.0),
+  m_E_escaped(0.0),
+  m_E0(0.0),
+  m_E1(0.0),
+  m_E2(0.0),
+  m_E3(0.0),
+  m_stepTouchable(0),
+  m_stepPhysVol(0),
+  m_cSection(0),
+  m_cell(0),
+  m_pCell(0),
+  m_gCell(0),
+  m_result(),
+  m_id(),
+  m_id_pmt_up(),
+  m_id_pmt_down(),
+  m_calibHitType(0),
+  m_subCalo(0),
+  m_detector(0),
+  m_side(0),
+  m_module(0),
+  m_tower(0),
+  m_sample(0),
+  m_dm_subDet(0),
+  m_dm_type(0),
+  m_dm_sample(0),
+  m_dm_region(0),
+  m_dm_neta(0),
+  m_dm_nphi(0),
+  m_xGlobal(0.0),
+  m_yGlobal(0.0),
+  m_zGlobal(0.0),
+  m_phiGlobal(0.0),
+  m_cellNum(0),
 #ifdef HITSINFO    //added by Sergey
-      m_nEvent(1),
-      m_det_side(0),
+  m_nEvent(1),
+  m_det_side(0),
 #endif
-      m_defaultHit(false),
-      m_doBirkFlag(false),
-      m_isExtended(false),
-      m_isNegative(false)
+  m_defaultHit(false),
+  m_doBirkFlag(false),
+  m_isExtended(false),
+  m_isNegative(false)
 {
 
   m_simEn = new CaloG4::SimulationEnergies();
@@ -158,12 +158,6 @@ TileGeoG4CalibSD::TileGeoG4CalibSD(const G4String& name, const std::vector<std::
     abort();
   }
 
-//**************************************************************************************************
-  //Sensitive Detector initialisation for TileCal G4 simulations (Sergey)
-  // Owns this now
-  m_calc = new TileGeoG4SDCalc(m_options);
-//**************************************************************************************************
-
   // Grab the service handles
   if (m_rdbSvc.retrieve().isFailure()) {
     G4cout << "FATAL: Could not retrieve the RDB Svc" << G4endl;
@@ -175,7 +169,7 @@ TileGeoG4CalibSD::TileGeoG4CalibSD(const G4String& name, const std::vector<std::
   }
 
   //BUILD TILECAL ORDINARY AND CALIBRATION LOOK-UP TABLES
-  m_lookup = m_calc->lookup;
+  m_lookup = m_calc->GetLookupBuilder();
   m_lookupDM = new TileGeoG4DMLookupBuilder(m_lookup, m_rdbSvc, m_geoModSvc, detStore, verboseLevel);
 
   if (m_options.tileTB) {
@@ -202,7 +196,6 @@ TileGeoG4CalibSD::TileGeoG4CalibSD(const G4String& name, const std::vector<std::
 TileGeoG4CalibSD::~TileGeoG4CalibSD() {
   delete m_simEn;
   delete m_tile_eep;
-  delete m_lookup;
   delete m_lookupDM;
 }
 
@@ -227,7 +220,7 @@ void TileGeoG4CalibSD::Initialize(G4HCofThisEvent* /*HCE*/) {
 //  ProcessHits - CALLED AT EACH STEP INSIDE SENSITIVE VOLUMES
 //-----------------------------------------------------------------------------
 G4bool TileGeoG4CalibSD::ProcessHits(G4Step* step, G4TouchableHistory* /*ROhist*/) {
-  if (m_calc->GetOptions().doCalibHitParticleID && !m_event_info)
+  if (m_options.doCalibHitParticleID && !m_event_info)
     m_event_info = dynamic_cast<EventInformation*>(G4RunManager::GetRunManager()->GetCurrentEvent()->GetUserInformation());
 
   if (verboseLevel > 10) G4cout << "Process Hits" << G4endl;
@@ -286,20 +279,21 @@ G4bool TileGeoG4CalibSD::ProcessHits(G4Step* step, G4TouchableHistory* /*ROhist*
   //SOMEWHERE IN DEFAULT REGION, THEN THE STEP ENERGIES WILL GO
   //IN DEFAULT HIT IN BOTH CASES.
   //THIS MEANS THAT IDENTIFIER CAN'T BE DETERMINED -> RETURN DEFAULT ID
-  bool is_identifiable = FindTileCalibSection();
+  bool is_identifiable = this->FindTileCalibSection();
   if (!is_identifiable) {
     if (verboseLevel > 10) G4cout << "FindTileCalibSection: The Section can't be found, RETURN DEFAULT ID" << G4endl;
     m_defaultHit = true;
   } else if (nameVol.find("Scintillator") != G4String::npos) {//SENSITIVE MATERIAL CELL (SCINTILLATOR)
-    bool is_scin = m_calc->FindTileScinSection(m_aStep);
+    TileHitData hitData;
+    bool is_scin = m_calc->FindTileScinSection(m_aStep, hitData);
     if (is_scin) {
       //BESIDE A CALIBRATION HIT THERE ORDINARY
       //HITS SHOULD BE ALSO CREATED OR UPDATED
       if (m_doBirkFlag) {
-        m_calc->MakePmtEdepTime(m_aStep);  //calculation of pmtID, edep and scin_Time with aStep
-        m_calc->ManageScintHit();//create or update ordinary hit object in the collection
+        m_calc->MakePmtEdepTime(m_aStep, hitData);  //calculation of pmtID, edep and scin_Time with aStep
+        m_calc->ManageScintHit(hitData);//create or update ordinary hit object in the collection
       }
-      ScintIDCalculator();
+      this->ScintIDCalculator(hitData);
     } else {
       if (verboseLevel>10) G4cout << "ProcessHits: FindTileScinSection returns false" << G4endl;
       m_defaultHit = true;
@@ -316,14 +310,14 @@ G4bool TileGeoG4CalibSD::ProcessHits(G4Step* step, G4TouchableHistory* /*ROhist*
 
   //FRONT AND END PLATES
   else if((nameVol.find("Plate") != G4String::npos)
-           || (nameVol.find("IrUp") != G4String::npos)
-           || (nameVol.find("IrDw") != G4String::npos)
-           || (nameVol.find("IrBox") != G4String::npos)
-           || (nameVol.find("Iron1") != G4String::npos)
-           || (nameVol.find("Iron2") != G4String::npos)
-           || (nameVol.find("Iron3") != G4String::npos)
-           || (nameVol.find("Iron4") != G4String::npos)
-        /* || (nameVol.find("SaddleModule") != G4String::npos) */) {
+          || (nameVol.find("IrUp") != G4String::npos)
+          || (nameVol.find("IrDw") != G4String::npos)
+          || (nameVol.find("IrBox") != G4String::npos)
+          || (nameVol.find("Iron1") != G4String::npos)
+          || (nameVol.find("Iron2") != G4String::npos)
+          || (nameVol.find("Iron3") != G4String::npos)
+          || (nameVol.find("Iron4") != G4String::npos)
+          /* || (nameVol.find("SaddleModule") != G4String::npos) */) {
 
     PlateCellIDCalculator();
   } else if((nameVol.find("Girder") != G4String::npos)
@@ -336,52 +330,52 @@ G4bool TileGeoG4CalibSD::ProcessHits(G4Step* step, G4TouchableHistory* /*ROhist*
     GirderCellIDCalculator(); //GIRDER AND FINGER MATERIALS
   }  else {
 
-  //HIT IS IN THE VOLUME, WHICH  CAN'T BE IDENTIFIED
-  //FLAG IT TO BE PUT IN A DEFAULT CALIBHIT
+    //HIT IS IN THE VOLUME, WHICH  CAN'T BE IDENTIFIED
+    //FLAG IT TO BE PUT IN A DEFAULT CALIBHIT
 
     m_defaultHit = true;
   }
 
-//-----------------------------------------------------
-// --- M A N A G E   C A L I B R A T I O N   H I T ---
-//-----------------------------------------------------
+  //-----------------------------------------------------
+  // --- M A N A G E   C A L I B R A T I O N   H I T ---
+  //-----------------------------------------------------
 
   // --------------------------------------------------------------------------
   // G.P.: now comes new hit processing (see LArCalibHitMerger.cxx for details)
   // --------------------------------------------------------------------------
   int primary_id = 0;
-  if (m_calc->GetOptions().doCalibHitParticleID) {
+  if (m_options.doCalibHitParticleID) {
 
     if (m_event_info && m_event_info->GetCurrentPrimary()) primary_id = m_event_info->GetCurrentPrimary()->barcode();
     else throw std::runtime_error("CalibrationSensitiveDetector: Unable to retrieve barcode!");
 
     /*
-     else {
-
-     // normal steps should have a G4Track:
-     if (step->GetTrack()) {
-     const VTrackInformation* trackInfo=dynamic_cast<const VTrackInformation*>(step->GetTrack()->GetUserInformation());
-
-     if (trackInfo && trackInfo->GetISFParticle()) {
-     const ISF::ISFParticle* isfp = trackInfo->GetISFParticle();
-     m_primary_id = isfp->barcode();
-     }
-     else
-     throw std::runtime_error("CalibrationSensitiveDetector: Unable to retrieve barcode!");
-     }
-
-     // escaped energy have fake steps with no G4Track, so get particle from m_event_info (retrieving it first if not done already)
-     else {
-     if (NULL==m_event_info)
-     m_event_info = dynamic_cast<EventInformation*>(G4RunManager::GetRunManager()->GetCurrentEvent()->GetUserInformation());
-
-     if (m_event_info && m_event_info->GetCurrentISFPrimary())
-     m_primary_id = m_event_info->GetCurrentISFPrimary()->barcode();
-     else
-     throw std::runtime_error("CalibrationSensitiveDetector: Unable to retrieve barcode!");
-     }
-     }
-     */
+      else {
+
+      // normal steps should have a G4Track:
+      if (step->GetTrack()) {
+      const VTrackInformation* trackInfo=dynamic_cast<const VTrackInformation*>(step->GetTrack()->GetUserInformation());
+
+      if (trackInfo && trackInfo->GetISFParticle()) {
+      const ISF::ISFParticle* isfp = trackInfo->GetISFParticle();
+      m_primary_id = isfp->barcode();
+      }
+      else
+      throw std::runtime_error("CalibrationSensitiveDetector: Unable to retrieve barcode!");
+      }
+
+      // escaped energy have fake steps with no G4Track, so get particle from m_event_info (retrieving it first if not done already)
+      else {
+      if (NULL==m_event_info)
+      m_event_info = dynamic_cast<EventInformation*>(G4RunManager::GetRunManager()->GetCurrentEvent()->GetUserInformation());
+
+      if (m_event_info && m_event_info->GetCurrentISFPrimary())
+      m_primary_id = m_event_info->GetCurrentISFPrimary()->barcode();
+      else
+      throw std::runtime_error("CalibrationSensitiveDetector: Unable to retrieve barcode!");
+      }
+      }
+    */
   }
 
   Identifier id = m_id;
@@ -473,51 +467,51 @@ void TileGeoG4CalibSD::EndOfAthenaEvent() {
 
   //CREATE CALIBHITS FROME THEIR VECTORS AND
   //STORE THEM IN THE RESPECTIEVE CONTAINERS
-      m_calibrationHits_ptr_t it;
+  m_calibrationHits_ptr_t it;
 
   // Cell Active Material Container
-      m_tileActiveCellCalibHits->reserve(m_activeCalibrationHits.size());
-      for( auto &it : m_activeCalibrationHits ) {
-        m_tileActiveCellCalibHits->push_back(std::move(it));
-      }
+  m_tileActiveCellCalibHits->reserve(m_activeCalibrationHits.size());
+  for( auto &it : m_activeCalibrationHits ) {
+    m_tileActiveCellCalibHits->push_back(std::move(it));
+  }
 
-      // Cell Inactive Material Container
-      m_tileInactiveCellCalibHits->reserve(m_inactiveCalibrationHits.size());
-      for( auto &it : m_inactiveCalibrationHits ) {
-        m_tileInactiveCellCalibHits->push_back(std::move(it));
-      }
+  // Cell Inactive Material Container
+  m_tileInactiveCellCalibHits->reserve(m_inactiveCalibrationHits.size());
+  for( auto &it : m_inactiveCalibrationHits ) {
+    m_tileInactiveCellCalibHits->push_back(std::move(it));
+  }
 
-      // Tile Dead Material Container
-      m_tileDeadMaterialCalibHits->reserve(m_deadCalibrationHits.size());
-      for( auto &it : m_deadCalibrationHits ) {
-        m_tileDeadMaterialCalibHits->push_back(std::move(it));
-      }
+  // Tile Dead Material Container
+  m_tileDeadMaterialCalibHits->reserve(m_deadCalibrationHits.size());
+  for( auto &it : m_deadCalibrationHits ) {
+    m_tileDeadMaterialCalibHits->push_back(std::move(it));
+  }
 
-      // copy ordinary hits to tileHits vector and reset all pointers
-      m_lookup->ResetCells(&*m_tileHits);
+  // copy ordinary hits to tileHits vector and reset all pointers
+  m_lookup->ResetCells(&*m_tileHits);
 
 #ifdef HITSINFO  // added by Sergey
-      m_ntupleCnt->StoreCNT(&*m_tileActiveCellCalibHits,&*m_tileInactiveCellCalibHits,&*m_tileDeadMaterialCalibHits);
+  m_ntupleCnt->StoreCNT(&*m_tileActiveCellCalibHits,&*m_tileInactiveCellCalibHits,&*m_tileDeadMaterialCalibHits);
 #endif
 
-      //DEBUG CALIBHITS ENERGIES CALCULATED BY SIMPLE CALCULATOR
-      //AND DEBUG THE SAME ENERIES DIRECTLE FROM CALIBHITS. THEY
-      //MUST BE THE SAME IF EVERITHING WENT ON WELL
-      //
-      //NOTE: ATHENA DEBUGGING LEVEL SHOULD BE SET 'INFO' OR HIGHER
-      DebugEnergies();
+  //DEBUG CALIBHITS ENERGIES CALCULATED BY SIMPLE CALCULATOR
+  //AND DEBUG THE SAME ENERIES DIRECTLE FROM CALIBHITS. THEY
+  //MUST BE THE SAME IF EVERITHING WENT ON WELL
+  //
+  //NOTE: ATHENA DEBUGGING LEVEL SHOULD BE SET 'INFO' OR HIGHER
+  DebugEnergies();
 
-      m_activeCalibrationHits.clear();
-      m_inactiveCalibrationHits.clear();
-      m_deadCalibrationHits.clear();
+  m_activeCalibrationHits.clear();
+  m_inactiveCalibrationHits.clear();
+  m_deadCalibrationHits.clear();
 
-      //RESET CELL, GIRDER CELL AND
-      //PLATE CELL HITS COUNTER VECTORS
-      m_lookupDM->ResetCells();
+  //RESET CELL, GIRDER CELL AND
+  //PLATE CELL HITS COUNTER VECTORS
+  m_lookupDM->ResetCells();
 
 #ifdef HITSINFO  //INCREMENT OF EVENT COUNTER -- added by Sergey
-      if (doHitsNTup || doHitsTXT) m_nEvent++;
+  if (doHitsNTup || doHitsTXT) m_nEvent++;
 #endif
 
-    }
+}
 
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.h b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.h
index bf6927c1793ecd99f53755df5e0e323c0c1a44e7..765cb712970add7aa1a6e41fd574157455109f2b 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.h
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD.h
@@ -63,7 +63,7 @@ class TileCalibHitNtuple;
 class TileCalibHitCntNtup;
 #endif
 
-class TileGeoG4SDCalc;
+class ITileCalculator;
 class TileGeoG4LookupBuilder;
 class TileGeoG4DMLookupBuilder;
 
@@ -73,6 +73,8 @@ class TileGeoG4CalibSection;
 class TileGeoG4PlateCell;
 class TileGeoG4GirderCell;
 
+struct TileHitData;
+
 class G4TouchableHistory;
 class G4VPhysicalVolume;
 
@@ -83,199 +85,200 @@ class EventInformation;
 typedef std::vector<double> E_4;
 
 class TileGeoG4CalibSD: public G4VSensitiveDetector {
-  public:
-    TileGeoG4CalibSD(const G4String& name, const std::vector<std::string>& m_outputCollectionNames,
-                     ServiceHandle<StoreGateSvc> &detStore, const TileSDOptions &opts);
-    ~TileGeoG4CalibSD();
-
-    void InvokeUserRunAction();
-    void InvokeUserEventAction();
-    void InvokeUserTrackingAction();
-    void InvokeUserSteppingAction();
-
-    //SD MAIN METHODS FOR A STEP PROCESSING
-    void Initialize(G4HCofThisEvent*) override final;
-    G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
-    void EndOfAthenaEvent();
-
-    //METHOD FOR CLASSIFYING STEP ENERGY AND THE METHODS,
-    //WHICH CALCULATE IDENTIFIER FOR CELL OR DEAD MATERIAL
-    //CALIBRATION HITS ON THE CURRENT STEP
-    void ClassifyEnergy();bool FindTileCalibSection();
-    Identifier CellIDCalculator();
-    Identifier ScintIDCalculator();
-    Identifier GirderCellIDCalculator();
-    Identifier PlateCellIDCalculator();
-    Identifier DefaultHitIDCalculator();
-
-    //GET RESULT FOR THE STEP HIT ID AND CLASSIFYED ENERGIES
-    Identifier GetCellIDOnStep();
-    CaloG4::SimulationEnergies::ClassifyResult_t GetEnergiesOnStep();
-
-    //DEBUG CELL AND DM CELL ID FIELDS
-    void DebugCellIDFields();
-    void DebugDMCellIDFields(int);
-
-    //added by Sergey
-    void CellNumCorrectToHit(int, int);
+public:
+  TileGeoG4CalibSD(const G4String& name, const std::vector<std::string>& m_outputCollectionNames,
+                   ITileCalculator* tileCalculator, ServiceHandle<StoreGateSvc> &detStore,
+                   const TileSDOptions &opts);
+  ~TileGeoG4CalibSD();
+
+  void InvokeUserRunAction();
+  void InvokeUserEventAction();
+  void InvokeUserTrackingAction();
+  void InvokeUserSteppingAction();
+
+  //SD MAIN METHODS FOR A STEP PROCESSING
+  void Initialize(G4HCofThisEvent*) override final;
+  G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
+  void EndOfAthenaEvent();
+
+  //METHOD FOR CLASSIFYING STEP ENERGY AND THE METHODS,
+  //WHICH CALCULATE IDENTIFIER FOR CELL OR DEAD MATERIAL
+  //CALIBRATION HITS ON THE CURRENT STEP
+  void ClassifyEnergy();bool FindTileCalibSection();
+  Identifier CellIDCalculator();
+  Identifier ScintIDCalculator(TileHitData& hitData);
+  Identifier GirderCellIDCalculator();
+  Identifier PlateCellIDCalculator();
+  Identifier DefaultHitIDCalculator();
+
+  //GET RESULT FOR THE STEP HIT ID AND CLASSIFYED ENERGIES
+  Identifier GetCellIDOnStep();
+  CaloG4::SimulationEnergies::ClassifyResult_t GetEnergiesOnStep();
+
+  //DEBUG CELL AND DM CELL ID FIELDS
+  void DebugCellIDFields();
+  void DebugDMCellIDFields(int);
+
+  //added by Sergey
+  void CellNumCorrectToHit(int, int);
 #ifdef HITSINFO
-    void HitsInfoPrint (bool, int);
+  void HitsInfoPrint (bool, int);
 #endif
 
-    //RESET ALL CLASS MEMBER ID FIELDS, NEW & DEFAULT HIT FLAGS,
-    //SECTION & SIDE FLAGS, DEPOSITED ENERGIES IN SCINTILLATOR/PMTs
-    // ! THESE METHODS ARE NEEDED AT THE BEGGINING OF EACH STEP !
-    void ResetCellIDFields();
-    void ResetDMCellIDFields();
-    void ResetSectSideFlags();
+  //RESET ALL CLASS MEMBER ID FIELDS, NEW & DEFAULT HIT FLAGS,
+  //SECTION & SIDE FLAGS, DEPOSITED ENERGIES IN SCINTILLATOR/PMTs
+  // ! THESE METHODS ARE NEEDED AT THE BEGGINING OF EACH STEP !
+  void ResetCellIDFields();
+  void ResetDMCellIDFields();
+  void ResetSectSideFlags();
 
-  protected:
-    Identifier DM_ID_Maker(int det, int type, int sample, int region, int tower, int module);
+protected:
+  Identifier DM_ID_Maker(int det, int type, int sample, int region, int tower, int module);
 
-    //THIS METHOD IS USED BY IDENTIFIER CALCULATOR METHODS FOR FINDING TILE SECTION
-    //WHERE THE CURRENT STEP IS AND FOR DETERMINING SOME RELATED IDENTIFIER FIELD
-    //VALUES. ALSO, DETRMINES SOME FLAGS USED IN A FURTHER PROCESSING OF THE STEP
-    bool AreClassifiedEnergiesAllZero();
-    void SetEscapedEnergy(double escapedEnergy);
+  //THIS METHOD IS USED BY IDENTIFIER CALCULATOR METHODS FOR FINDING TILE SECTION
+  //WHERE THE CURRENT STEP IS AND FOR DETERMINING SOME RELATED IDENTIFIER FIELD
+  //VALUES. ALSO, DETRMINES SOME FLAGS USED IN A FURTHER PROCESSING OF THE STEP
+  bool AreClassifiedEnergiesAllZero();
+  void SetEscapedEnergy(double escapedEnergy);
 
-    void EnergiesSimpleCounter();
-    void DebugEnergies();
+  void EnergiesSimpleCounter();
+  void DebugEnergies();
 
-  private:
-    TileGeoG4CalibSD(const TileGeoG4CalibSD&);
-    TileGeoG4CalibSD& operator=(const TileGeoG4CalibSD&);
+private:
+  TileGeoG4CalibSD(const TileGeoG4CalibSD&);
+  TileGeoG4CalibSD& operator=(const TileGeoG4CalibSD&);
 
-    //CALIBRATION HIT CONTAINERS
-    SG::WriteHandle<CaloCalibrationHitContainer> m_tileActiveCellCalibHits;
-    SG::WriteHandle<CaloCalibrationHitContainer> m_tileInactiveCellCalibHits;
-    SG::WriteHandle<CaloCalibrationHitContainer> m_tileDeadMaterialCalibHits;
-    SG::WriteHandle<TileHitVector> m_tileHits;
+  //CALIBRATION HIT CONTAINERS
+  SG::WriteHandle<CaloCalibrationHitContainer> m_tileActiveCellCalibHits;
+  SG::WriteHandle<CaloCalibrationHitContainer> m_tileInactiveCellCalibHits;
+  SG::WriteHandle<CaloCalibrationHitContainer> m_tileDeadMaterialCalibHits;
+  SG::WriteHandle<TileHitVector> m_tileHits;
 
-    TileSDOptions m_options;
+  TileSDOptions m_options;
 
-    // Handles for later use
-    const CaloCell_ID* m_caloCell_ID;
-    const CaloDM_ID* m_caloDM_ID;
+  // Handles for later use
+  const CaloCell_ID* m_caloCell_ID;
+  const CaloDM_ID* m_caloDM_ID;
 
-    ServiceHandle<IRDBAccessSvc> m_rdbSvc;
-    ServiceHandle<IGeoModelSvc> m_geoModSvc;
+  ServiceHandle<IRDBAccessSvc> m_rdbSvc;
+  ServiceHandle<IGeoModelSvc> m_geoModSvc;
 
 #ifdef HITSINFO
-    ToolHandle<TileCalibHitNtuple> m_ntuple;
-    ToolHandle<TileCalibHitCntNtup> m_ntupleCnt;
+  ToolHandle<TileCalibHitNtuple> m_ntuple;
+  ToolHandle<TileCalibHitCntNtup> m_ntupleCnt;
 #endif
 
-    //ORDINARY AND CALIBRATION LOOKUP BUILDERS
-    TileGeoG4SDCalc* m_calc;
-    TileGeoG4LookupBuilder* m_lookup;
-    TileGeoG4DMLookupBuilder* m_lookupDM;
-
-    //CALIBRATION ENERGY CLASSIFYER
-    CaloG4::SimulationEnergies* m_simEn;
-    TileEscapedEnergyProcessing* m_tile_eep;
-
-    //ENERGY AND POSITION AT CURRENT STEP
-    G4Step* m_aStep;
-
-    //FOR SIMPLE ENERGY DEBUGGING
-    double m_E_tot;
-    double m_E_em;
-    double m_E_nonem;
-    double m_E_invisible;
-    double m_E_escaped;
-
-    //FOR ENERGY DEBUGGING DIRECTLY FROM
-    //CALIBHITS AT THE END OF EVENT
-    double m_E0;
-    double m_E1;
-    double m_E2;
-    double m_E3;
-
-    //STEP TOUCHABLE HISTORY AND VOLUME
-    G4TouchableHistory* m_stepTouchable;
-    G4VPhysicalVolume* m_stepPhysVol;
-
-    //CALIBRATION SECTION & CELLS
-    TileGeoG4CalibSection* m_cSection;
-    TileGeoG4Cell* m_cell;
-    TileGeoG4PlateCell* m_pCell;
-    TileGeoG4GirderCell* m_gCell;
-
-    //CLASSIFIED ENERGY VECTOR
-    CaloG4::SimulationEnergies::ClassifyResult_t m_result;
-
-    //IDENTIFIERS FOR CALIBRATION AND ORDINARY HITS
-    Identifier m_id, m_id_pmt_up, m_id_pmt_down;
-
-    //CELL ACTIVE || CELL INACTIVE || DM
-    int m_calibHitType;
-
-    //REAL CELL ID VALUES
-    int m_subCalo;
-    int m_detector;
-    int m_side;
-    int m_module;
-    int m_tower;
-    int m_sample;
-
-    //DM CELL ID VALUES
-    int m_dm_subDet;
-    int m_dm_type;
-    int m_dm_sample;
-    int m_dm_region;
-    int m_dm_neta;
-    int m_dm_nphi;
-
-    //GLOBAL HIT POSITION -- added by Sergey
-    double m_xGlobal;
-    double m_yGlobal;
-    double m_zGlobal;
-    double m_phiGlobal;
-    int m_cellNum;
+  //ORDINARY AND CALIBRATION LOOKUP BUILDERS
+  ITileCalculator* m_calc;
+  TileGeoG4LookupBuilder* m_lookup;
+  TileGeoG4DMLookupBuilder* m_lookupDM;
+
+  //CALIBRATION ENERGY CLASSIFYER
+  CaloG4::SimulationEnergies* m_simEn;
+  TileEscapedEnergyProcessing* m_tile_eep;
+
+  //ENERGY AND POSITION AT CURRENT STEP
+  G4Step* m_aStep;
+
+  //FOR SIMPLE ENERGY DEBUGGING
+  double m_E_tot;
+  double m_E_em;
+  double m_E_nonem;
+  double m_E_invisible;
+  double m_E_escaped;
+
+  //FOR ENERGY DEBUGGING DIRECTLY FROM
+  //CALIBHITS AT THE END OF EVENT
+  double m_E0;
+  double m_E1;
+  double m_E2;
+  double m_E3;
+
+  //STEP TOUCHABLE HISTORY AND VOLUME
+  G4TouchableHistory* m_stepTouchable;
+  G4VPhysicalVolume* m_stepPhysVol;
+
+  //CALIBRATION SECTION & CELLS
+  TileGeoG4CalibSection* m_cSection;
+  TileGeoG4Cell* m_cell;
+  TileGeoG4PlateCell* m_pCell;
+  TileGeoG4GirderCell* m_gCell;
+
+  //CLASSIFIED ENERGY VECTOR
+  CaloG4::SimulationEnergies::ClassifyResult_t m_result;
+
+  //IDENTIFIERS FOR CALIBRATION AND ORDINARY HITS
+  Identifier m_id, m_id_pmt_up, m_id_pmt_down;
+
+  //CELL ACTIVE || CELL INACTIVE || DM
+  int m_calibHitType;
+
+  //REAL CELL ID VALUES
+  int m_subCalo;
+  int m_detector;
+  int m_side;
+  int m_module;
+  int m_tower;
+  int m_sample;
+
+  //DM CELL ID VALUES
+  int m_dm_subDet;
+  int m_dm_type;
+  int m_dm_sample;
+  int m_dm_region;
+  int m_dm_neta;
+  int m_dm_nphi;
+
+  //GLOBAL HIT POSITION -- added by Sergey
+  double m_xGlobal;
+  double m_yGlobal;
+  double m_zGlobal;
+  double m_phiGlobal;
+  int m_cellNum;
 #ifdef HITSINFO
-    int m_nEvent;
-    int m_det_side;
+  int m_nEvent;
+  int m_det_side;
 #endif
 
-    //FLAG FOR DEFAULT HIT
-    bool m_defaultHit;
+  //FLAG FOR DEFAULT HIT
+  bool m_defaultHit;
 
-    /** @brief set to true to apply Birks' law for a given hit
-     this flag is set to false for DM hits and true for normal hits */
-    bool m_doBirkFlag;
+  /** @brief set to true to apply Birks' law for a given hit
+      this flag is set to false for DM hits and true for normal hits */
+  bool m_doBirkFlag;
 
-    /** @brief set to true if hit is in extended barrel */
-    bool m_isExtended;
+  /** @brief set to true if hit is in extended barrel */
+  bool m_isExtended;
 
-    /** @brief set to true if hit is in negative side */
-    bool m_isNegative;
+  /** @brief set to true if hit is in negative side */
+  bool m_isNegative;
 
-    /** @brief set to true if DM hit in end/front plate is added to a real cell (taken from DB) */
-    bool m_plateToCell;
+  /** @brief set to true if DM hit in end/front plate is added to a real cell (taken from DB) */
+  bool m_plateToCell;
 
-    /** @brief set to true if DM hit in front plate is added to a real cell 
-     (currently equal to _plateToCell) */
-    bool m_addToCell;
+  /** @brief set to true if DM hit in front plate is added to a real cell 
+      (currently equal to _plateToCell) */
+  bool m_addToCell;
 
-    /** @brief set to true if DM hit in absorber at outer radius is added to girder
-     (currently inverse of  _plateToCell) */
-    bool m_addToGirder;
+  /** @brief set to true if DM hit in absorber at outer radius is added to girder
+      (currently inverse of  _plateToCell) */
+  bool m_addToGirder;
 
-    /** variable used for producing calibration hits signed with primary particle ID */
-    EventInformation* m_event_info;
+  /** variable used for producing calibration hits signed with primary particle ID */
+  EventInformation* m_event_info;
 
-    class LessHit {
-      public:
-        bool operator()(CaloCalibrationHit* const & p, CaloCalibrationHit* const & q) const {
-          return p->Less(q);
-        }
-    };
-
-    typedef std::set<CaloCalibrationHit*, LessHit> m_calibrationHits_t;
-    typedef m_calibrationHits_t::iterator m_calibrationHits_ptr_t;
-    m_calibrationHits_t m_activeCalibrationHits;
-    m_calibrationHits_t m_inactiveCalibrationHits;
-    m_calibrationHits_t m_deadCalibrationHits;
+  class LessHit {
+  public:
+    bool operator()(CaloCalibrationHit* const & p, CaloCalibrationHit* const & q) const {
+      return p->Less(q);
+    }
+  };
+
+  typedef std::set<CaloCalibrationHit*, LessHit> m_calibrationHits_t;
+  typedef m_calibrationHits_t::iterator m_calibrationHits_ptr_t;
+  m_calibrationHits_t m_activeCalibrationHits;
+  m_calibrationHits_t m_inactiveCalibrationHits;
+  m_calibrationHits_t m_deadCalibrationHits;
 
 };
 //CLASS TileGeoG4CalibSD
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD2.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD2.cc
index 794519c3a69453a183194155eecbbcf5c4e90dd2..8a03173ece12bae18e48e375751adf8844743132 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD2.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSD2.cc
@@ -23,7 +23,7 @@
 #include "TileGeoG4DMLookupBuilder.h"
 #include "TileGeoG4DMLookup.h"
 #include "TileEscapedEnergyProcessing.h"
-#include "TileGeoG4SD/TileGeoG4SDCalc.hh"
+#include "TileG4Interfaces/ITileCalculator.h"
 #include "TileGeoG4SD/TileGeoG4Lookup.hh"
 #include "TileGeoG4SD/TileGeoG4LookupBuilder.hh"
 #include "TileSimEvent/TileHitVector.h"
@@ -237,8 +237,8 @@ Identifier TileGeoG4CalibSD::CellIDCalculator() {
 
   if ( (nameVol).find("Period") != G4String::npos) nPeriod = m_stepPhysVol->GetCopyNo();
   else
-  // Move up by one level to retrieve TilePeriod replica number
-  nPeriod = m_stepTouchable->GetVolume(1)->GetCopyNo();
+    // Move up by one level to retrieve TilePeriod replica number
+    nPeriod = m_stepTouchable->GetVolume(1)->GetCopyNo();
 
   // calculate z coordinate of the hit against the center of TilePeriod
   // or z coordinate of the TileWrapper's center against the center of TilePeriod
@@ -254,7 +254,7 @@ Identifier TileGeoG4CalibSD::CellIDCalculator() {
   // by using of 'zLocal' calculate Sample of the step corresponding Cell
   switch (m_detector) {
 
-    case 1:  // Barrel
+  case 1:  // Barrel
     {
       if (zLocal < m_cSection->sample_ZBound[0]) {//-48.0
 
@@ -274,7 +274,7 @@ Identifier TileGeoG4CalibSD::CellIDCalculator() {
       break;
     }
 
-    case 2:  // Ext.Barrel
+  case 2:  // Ext.Barrel
     {
       if (zLocal < m_cSection->sample_ZBound[0]) {//-48.0
 
@@ -291,7 +291,7 @@ Identifier TileGeoG4CalibSD::CellIDCalculator() {
       break;
     }
 
-    case 3:  // ITC
+  case 3:  // ITC
     {
       if (zLocal < m_cSection->sample_ZBound[3]) {//17.0
 
@@ -302,7 +302,7 @@ Identifier TileGeoG4CalibSD::CellIDCalculator() {
       break;
     }
 
-    case 4:  // Gap/Crack
+  case 4:  // Gap/Crack
     {
       if (zLocal < m_cSection->sample_ZBound[0]) { //1.4 - Gap,  -5.8 - Crack
 
@@ -356,12 +356,12 @@ Identifier TileGeoG4CalibSD::CellIDCalculator() {
 #ifdef HITSINFO    //added by Sergey
   if (IDcalc==0 || IDcalc==1) {
     if (m_cellNum < 0)
-    det_side = -abs(m_detector);
+      det_side = -abs(m_detector);
     else
-    det_side = m_detector;
-    if (doHitsTXT) HitsInfoPrint(false,1);  // 1-CellIDCalculator
+      det_side = m_detector;
+    if (doHitsTXT) this->HitsInfoPrint(false,1);  // 1-CellIDCalculator
     if (doHitsNTup) m_ntuple->storeHit(det_side,m_module,m_tower,m_sample,m_cellNum,
-        1,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
+                                       1,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
   }
 #endif
 
@@ -370,8 +370,8 @@ Identifier TileGeoG4CalibSD::CellIDCalculator() {
   return m_id;
 }
 
-Identifier TileGeoG4CalibSD::ScintIDCalculator() {
-  m_cell = m_calc->cell;  //retrieve Cell from TileGeoG4SDCalc
+Identifier TileGeoG4CalibSD::ScintIDCalculator(TileHitData& hitData) {
+  m_cell = hitData.cell;  //retrieve Cell from TileGeoG4SDCalc
   if (!m_cell) {
     G4cout << "ERROR: ScintIDCalculator: zero pointer to the current cell!" << G4endl;
     m_defaultHit = true;
@@ -385,32 +385,32 @@ Identifier TileGeoG4CalibSD::ScintIDCalculator() {
   m_calibHitType = 1;  //Cell Active CalibHit
 
   //determine remined ID fields
-  m_detector = m_calc->nDetector;
-  m_sample = m_calc->nSample - 1;
-  m_tower = m_calc->nTower - 1;
-  m_module = m_calc->nModule - 1;
-  m_side = m_calc->nSide;
+  m_detector = hitData.nDetector;
+  m_sample = hitData.nSample - 1;
+  m_tower = hitData.nTower - 1;
+  m_module = hitData.nModule - 1;
+  m_side = hitData.nSide;
   m_cellNum = m_cell->cellNum;
 
   //just a debugging of CaloCell ID fields
-  DebugCellIDFields();
+  this->DebugCellIDFields();
 
 #ifdef HITSINFO    //added by Sergey
   if (IDcalc==0 || IDcalc==2) {
     if (m_cellNum < 0)
-    det_side = -abs(m_detector);
+      det_side = -abs(m_detector);
     else
-    det_side = m_detector;
-    if (doHitsTXT) HitsInfoPrint(false,2);  // 2-ScintIDCalculator
+      det_side = m_detector;
+    if (doHitsTXT) this->HitsInfoPrint(false,2);  // 2-ScintIDCalculator
     if (doHitsNTup) m_ntuple->storeHit(det_side,m_module,m_tower,m_sample,m_cellNum,
-        2,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
+                                       2,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
   }
 #endif
 
   //reetrieve CaloCell & Tile IDs
   m_id = m_caloCell_ID->cell_id(m_subCalo, m_detector, m_side, m_module, m_tower, m_sample);
-  m_id_pmt_down = m_calc->pmtID_down;
-  m_id_pmt_up = m_calc->pmtID_up;
+  m_id_pmt_down = hitData.pmtID_down;
+  m_id_pmt_up = hitData.pmtID_up;
 
   return m_id;
 }
@@ -490,12 +490,12 @@ Identifier TileGeoG4CalibSD::PlateCellIDCalculator() {
     if (IDcalc==0 || IDcalc==3) {
       m_cellNum = m_cell->cellNum;
       if (m_cellNum < 0)
-      det_side = -abs(m_detector);
+        det_side = -abs(m_detector);
       else
-      det_side = m_detector;
+        det_side = m_detector;
       if (doHitsTXT) HitsInfoPrint(false,3);  // 3-PlateCellIDCalculator
       if (doHitsNTup) m_ntuple->storeHit(det_side,m_module,m_tower,m_sample,m_cellNum,
-          3,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
+                                         3,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
     }
 #endif
 
@@ -582,12 +582,12 @@ Identifier TileGeoG4CalibSD::PlateCellIDCalculator() {
     if (IDcalc==0 || IDcalc==3) {
       m_cellNum = m_cell->cellNum;
       if (m_cellNum < 0)
-      det_side = -abs(m_detector);
+        det_side = -abs(m_detector);
       else
-      det_side = m_detector;
+        det_side = m_detector;
       if (doHitsTXT) HitsInfoPrint(false,3);  // 3-PlateCellIDCalculator
       if (doHitsNTup) m_ntuple->storeHit(det_side,m_module,m_tower,m_sample,m_cellNum,
-          3,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
+                                         3,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
     }
 #endif
 
@@ -661,7 +661,7 @@ Identifier TileGeoG4CalibSD::PlateCellIDCalculator() {
     if (IDcalc==0 || IDcalc==3) {
       if (doHitsTXT) HitsInfoPrint(true,3);  // 3-PlateCellIDCalculator
       if (doHitsNTup) m_ntuple->storeHit(m_dm_subDet,m_dm_nphi,m_dm_neta,m_dm_sample,m_dm_region,
-          3,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
+                                         3,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
     }
 #endif
 
@@ -696,11 +696,11 @@ Identifier TileGeoG4CalibSD::GirderCellIDCalculator() {
     }
     nGirderCell = static_cast<int>( (m_cSection->girderCells).size());
     if (m_side > 0)
-    //Finger on the positive side
-    m_gCell = m_cSection->girderCells[nGirderCell - 1];
+      //Finger on the positive side
+      m_gCell = m_cSection->girderCells[nGirderCell - 1];
     else
-    //Finger on the negative side
-    m_gCell = m_cSection->girderCells[nGirderCell - 2];
+      //Finger on the negative side
+      m_gCell = m_cSection->girderCells[nGirderCell - 2];
   } else {
     //Extended Finger or Extended EndPlate's last cell
     nGirderCell = static_cast<int>( (m_cSection->girderCells).size());
@@ -741,7 +741,7 @@ Identifier TileGeoG4CalibSD::GirderCellIDCalculator() {
   if (IDcalc==0 || IDcalc==4) {
     if (doHitsTXT) HitsInfoPrint(true,4);  // 4-GirderCellIDCalculator
     if (doHitsNTup) m_ntuple->storeHit(m_dm_subDet,m_dm_nphi,m_dm_neta,m_dm_sample,m_dm_region,
-        4,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
+                                       4,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
   }
 #endif
 
@@ -826,7 +826,7 @@ Identifier TileGeoG4CalibSD::DefaultHitIDCalculator() {
     //barrel active zone
     isZinActiveRegion = true;
   } else if ( ( (m_zGlobal >= zEBarrelActiveMaxNeg) && (m_zGlobal <= zEBarrelActiveMinNeg))
-      || ( (m_zGlobal >= zEBarrelActiveMinPos) && (m_zGlobal <= zEBarrelActiveMaxPos))) {
+              || ( (m_zGlobal >= zEBarrelActiveMinPos) && (m_zGlobal <= zEBarrelActiveMaxPos))) {
     //ext.barrel active zone
     isZinActiveRegion = true;
   }
@@ -1070,7 +1070,7 @@ Identifier TileGeoG4CalibSD::DefaultHitIDCalculator() {
     if (IDcalc==0 || IDcalc==6) {
       if (doHitsTXT) HitsInfoPrint(true,6);  // 6-DefaultHitIDCalculator-DM hit
       if (doHitsNTup) m_ntuple->storeHit(m_dm_subDet,m_dm_nphi,m_dm_neta,m_dm_sample,m_dm_region,
-          6,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
+                                         6,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
     }
 #endif
 
@@ -1085,12 +1085,12 @@ Identifier TileGeoG4CalibSD::DefaultHitIDCalculator() {
 #ifdef HITSINFO    //added by Sergey
     if (IDcalc==0 || IDcalc==5) {
       if (m_cellNum < 0)
-      det_side = -abs(m_detector);
+        det_side = -abs(m_detector);
       else
-      det_side = m_detector;
+        det_side = m_detector;
       if (doHitsTXT) HitsInfoPrint(false,5);  // 5-DefaultHitIDCalculator-Cell hit
       if (doHitsNTup) m_ntuple->storeHit(det_side,m_module,m_tower,m_sample,m_cellNum,
-          5,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
+                                         5,nEvent,m_xGlobal,m_yGlobal,m_zGlobal,m_E_tot);
     }
 #endif
 
@@ -1126,11 +1126,11 @@ bool TileGeoG4CalibSD::AreClassifiedEnergiesAllZero() {
   if ((m_result.energy[CaloG4::SimulationEnergies::kEm] == 0.) && (m_result.energy[CaloG4::SimulationEnergies::kNonEm] == 0.)
       && (m_result.energy[CaloG4::SimulationEnergies::kInvisible0] == 0.)
       && (m_result.energy[CaloG4::SimulationEnergies::kEscaped] == 0.))
-  //All of them are zero
-  return true;
+    //All of them are zero
+    return true;
   else
-  //they aren't all zero
-  return false;
+    //they aren't all zero
+    return false;
 }
 
 void TileGeoG4CalibSD::SetEscapedEnergy(double escapedEnergy) {
@@ -1150,8 +1150,8 @@ void TileGeoG4CalibSD::EnergiesSimpleCounter() {
 
   // calculate E_tot for current event only
   m_E_tot = m_result.energy[CaloG4::SimulationEnergies::kEm] + m_result.energy[CaloG4::SimulationEnergies::kNonEm]
-            + m_result.energy[CaloG4::SimulationEnergies::kInvisible0]
-            + m_result.energy[CaloG4::SimulationEnergies::kEscaped];
+    + m_result.energy[CaloG4::SimulationEnergies::kInvisible0]
+    + m_result.energy[CaloG4::SimulationEnergies::kEscaped];
 }
 
 void TileGeoG4CalibSD::DebugCellIDFields() {
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.cc
index fad8e7dcd46f54b53e04ee698067ea35e41aa99a..837b8aca086978dabea912af46e0a406b45f2d24 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.cc
@@ -11,11 +11,14 @@
 
 #include "TileGeoG4CalibSDTool.h"
 #include "TileGeoG4CalibSD.h"
+#include "TileG4Interfaces/ITileCalculator.h"
 
 TileGeoG4CalibSDTool::TileGeoG4CalibSDTool(const std::string& type, const std::string& name, const IInterface* parent)
-    : SensitiveDetectorBase(type, name, parent) {
+  : SensitiveDetectorBase(type, name, parent)
+  , m_tileCalculator("TileGeoG4SDCalc", name)
+{
   declareInterface<ISensitiveDetector>(this);
-
+  declareProperty("TileCalculator", m_tileCalculator);
   declareProperty("DeltaTHit", m_options.deltaTHit);
   declareProperty("TimeCut", m_options.timeCut);
   declareProperty("TileTB", m_options.tileTB);
@@ -30,12 +33,18 @@ TileGeoG4CalibSDTool::TileGeoG4CalibSDTool(const std::string& type, const std::s
 
 }
 
+StatusCode TileGeoG4CalibSDTool::initialize()
+{
+  ATH_CHECK(m_tileCalculator.retrieve());
+  return StatusCode::SUCCESS;
+}
+
 G4VSensitiveDetector* TileGeoG4CalibSDTool::makeSD() {
   if (m_outputCollectionNames.size() < 4) {
     ATH_MSG_ERROR( "Expected 4 output collection names, found " << m_outputCollectionNames.size()
                    << ". Expect the job to crash when the SD is created.");
   }
-  return new TileGeoG4CalibSD(name(), m_outputCollectionNames, detStore(), m_options);
+  return new TileGeoG4CalibSD(name(), m_outputCollectionNames, &*m_tileCalculator, detStore(), m_options);
 }
 
 StatusCode TileGeoG4CalibSDTool::Gather() {
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.h b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.h
index dd355b787e80e18636bd7defbdc6baf1735ee8c3..33e156e239896e4fce3669095ac20353be8aef95 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.h
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4CalibSDTool.h
@@ -17,26 +17,33 @@
 // Uses
 #include <string>
 
+#include "TileGeoG4SD/TileSDOptions.h"
+
 // Members
 class G4VSensitiveDetector;
-#include "TileGeoG4SD/TileSDOptions.h"
+class ITileCalculator;
 
 class TileGeoG4CalibSDTool: public SensitiveDetectorBase {
-  public:
-    TileGeoG4CalibSDTool(const std::string& type, const std::string& name, const IInterface *parent);
-    // Default constructor is fine
-
-    /** End of an athena event */
-    StatusCode Gather() override final; //FIXME would be good to be able to avoid this.
-
-  private:
-    TileGeoG4CalibSDTool(const TileGeoG4CalibSDTool&) = delete;
-    TileGeoG4CalibSDTool& operator=(const TileGeoG4CalibSDTool&) = delete;
-    TileSDOptions m_options;
-
-  protected:
-    // Make me an SD!
-    G4VSensitiveDetector* makeSD() override final;
+public:
+  /// Constructor
+  TileGeoG4CalibSDTool(const std::string& type, const std::string& name, const IInterface *parent);
+  /// Default constructor is fine
+
+  ///
+  virtual StatusCode initialize() override final;
+
+  /// End of an athena event
+  StatusCode Gather() override final; //FIXME would be good to be able to avoid this.
+
+protected:
+  /// Make me an SD!
+  G4VSensitiveDetector* makeSD() override final;
+
+private:
+  /// Calculator Service
+  ServiceHandle<ITileCalculator> m_tileCalculator;
+  /// Options for the SD configuration
+  TileSDOptions m_options;
 
 };
 
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookup.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookup.cc
index 766a5e96fba45c555721b6568b4712fae8a67135..1e72258e8da0698fb238b9f4206edd086aa7d47a 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookup.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookup.cc
@@ -17,41 +17,41 @@
 #include "G4ios.hh"
 
 TileGeoG4CalibCell::TileGeoG4CalibCell()
-    : detector(0),
-      sample(0),
-      nrOfPeriodsInCell() {
+  : detector(0),
+    sample(0),
+    nrOfPeriodsInCell() {
 }
 
 TileGeoG4PlateCell::TileGeoG4PlateCell()
-    : detector(0),
-      tower(0),
-      sample(0),
-      neighbor(0),
-      eta(0),
-      dEta(0),
-      xBound(0),
-      zBound(0) {
+  : detector(0),
+    tower(0),
+    sample(0),
+    neighbor(0),
+    eta(0),
+    dEta(0),
+    xBound(0),
+    zBound(0) {
 }
 
 TileGeoG4GirderCell::TileGeoG4GirderCell()
-    : detector(0),
-      tower(0),
-      sample(0),
-      eta(0),
-      dEta(0),
-      xBound(0) {
+  : detector(0),
+    tower(0),
+    sample(0),
+    eta(0),
+    dEta(0),
+    xBound(0) {
 }
 
 TileGeoG4CalibSection::TileGeoG4CalibSection(const int verboseLevel)
-    : section(0),
-      nrOfPeriods(0),
-      nrOfSamples(0),
-      nrOfCells(0),
-      nrOfPlateCells(0),
-      nrOfGirderCells(0),
-      sample_ZBound(),
-      m_verboseLevel(verboseLevel) {
-}
+  : section(0),
+    nrOfPeriods(0),
+    nrOfSamples(0),
+    nrOfCells(0),
+    nrOfPlateCells(0),
+    nrOfGirderCells(0),
+    sample_ZBound(),
+    m_verboseLevel(verboseLevel) {
+    }
 
 void TileGeoG4CalibSection::DMToCell(bool gap_crack, TileGeoG4Section* tile_section) {
   int l_nSample = nrOfSamples;                    //Number of samples in the module
@@ -68,63 +68,63 @@ void TileGeoG4CalibSection::DMToCell(bool gap_crack, TileGeoG4Section* tile_sect
   // Current boundaries are number of periods for cells with the index 0
   if (!gap_crack)                                                               // if we aren't into gap or crack   //g
 
-  for (samp = 0; samp < l_nSample; samp++) {
-    if (l_nSample == 4 && samp >= 2) passed = true;                                          // forced by Barrel section
-    if (!passed) {            // if we are in the Barrel we DIDN'T PASSE the B subsample of bounded B & C cells yet!
-
-      l_indCurrentCell[samp] = 0;
-      l_currentBoundary[samp] = ( (samples[samp])->cells[0])->nrOfPeriodsInCell[0]; // A-Barrel or A,C,D-Ext. Barrel or ITC
-    } else {
-      if (samples[samp - 1]->cells[1]->nrOfPeriodsInCell[1] != 0) {                 //we ARE in the C subsample in Barrel
+    for (samp = 0; samp < l_nSample; samp++) {
+      if (l_nSample == 4 && samp >= 2) passed = true;                                          // forced by Barrel section
+      if (!passed) {            // if we are in the Barrel we DIDN'T PASSE the B subsample of bounded B & C cells yet!
 
         l_indCurrentCell[samp] = 0;
-        l_currentBoundary[samp] = ( (samples[samp - 1])->cells[0])->nrOfPeriodsInCell[1];   // C-Barrel
+        l_currentBoundary[samp] = ( (samples[samp])->cells[0])->nrOfPeriodsInCell[0]; // A-Barrel or A,C,D-Ext. Barrel or ITC
       } else {
-        l_indCurrentCell[samp] = 0;
-        l_currentBoundary[samp] = ( (samples[samp - 1])->cells[0])->nrOfPeriodsInCell[0];  // D-Barrel
+        if (samples[samp - 1]->cells[1]->nrOfPeriodsInCell[1] != 0) {                 //we ARE in the C subsample in Barrel
+
+          l_indCurrentCell[samp] = 0;
+          l_currentBoundary[samp] = ( (samples[samp - 1])->cells[0])->nrOfPeriodsInCell[1];   // C-Barrel
+        } else {
+          l_indCurrentCell[samp] = 0;
+          l_currentBoundary[samp] = ( (samples[samp - 1])->cells[0])->nrOfPeriodsInCell[0];  // D-Barrel
+        }
       }
-    }
 
-    //Loop through all periods and samples - fill m_DMToCell
-    //with the pointers to cells the current period of sample belongs to
-    for (per = 0; per < l_nPeriod; per++) {
+      //Loop through all periods and samples - fill m_DMToCell
+      //with the pointers to cells the current period of sample belongs to
+      for (per = 0; per < l_nPeriod; per++) {
 
-      if (per == l_currentBoundary[samp]) {
-      //Boundary reached - move to the next cell and next boundary
+        if (per == l_currentBoundary[samp]) {
+          //Boundary reached - move to the next cell and next boundary
 
-        if (!passed) {                      //If we are in Barrel, then we didn't passed B-subsample of BC sample yet.
+          if (!passed) {                      //If we are in Barrel, then we didn't passed B-subsample of BC sample yet.
 
-          if (++l_indCurrentCell[samp] < static_cast<int>( (samples[samp])->cells.size())) {
-            l_currentBoundary[samp] += ( (samples[samp])->cells[l_indCurrentCell[samp]])->nrOfPeriodsInCell[0];
-          }  // A,B-Barrel or A,b,C,D - Ext. Barrel or ITC
-        } else {                                                                                     // passed==true
-          if (samples[samp - 1]->cells[1]->nrOfPeriodsInCell[1] != 0) {                  // C-cell of Barrel
+            if (++l_indCurrentCell[samp] < static_cast<int>( (samples[samp])->cells.size())) {
+              l_currentBoundary[samp] += ( (samples[samp])->cells[l_indCurrentCell[samp]])->nrOfPeriodsInCell[0];
+            }  // A,B-Barrel or A,b,C,D - Ext. Barrel or ITC
+          } else {                                                                                     // passed==true
+            if (samples[samp - 1]->cells[1]->nrOfPeriodsInCell[1] != 0) {                  // C-cell of Barrel
 
-            if (++l_indCurrentCell[samp] < static_cast<int>( (samples[samp - 1])->cells.size())) {
-              l_currentBoundary[samp] += ( (samples[samp - 1])->cells[l_indCurrentCell[samp]])->nrOfPeriodsInCell[1];
-            }  // C subsample == 2 sample
-          } else {                                                                              // D-cells of Barrel
+              if (++l_indCurrentCell[samp] < static_cast<int>( (samples[samp - 1])->cells.size())) {
+                l_currentBoundary[samp] += ( (samples[samp - 1])->cells[l_indCurrentCell[samp]])->nrOfPeriodsInCell[1];
+              }  // C subsample == 2 sample
+            } else {                                                                              // D-cells of Barrel
 
-            if (++l_indCurrentCell[samp] < static_cast<int>( (samples[samp - 1])->cells.size())) {
-              l_currentBoundary[samp] += ( (samples[samp - 1])->cells[l_indCurrentCell[samp]])->nrOfPeriodsInCell[0];
-            }    // D sample == 3 sample   Barrel
+              if (++l_indCurrentCell[samp] < static_cast<int>( (samples[samp - 1])->cells.size())) {
+                l_currentBoundary[samp] += ( (samples[samp - 1])->cells[l_indCurrentCell[samp]])->nrOfPeriodsInCell[0];
+              }    // D sample == 3 sample   Barrel
+            }
           }
         }
-      }
 
-      if (!passed) {                                                    // didn't passed B-subsample of BC sample yet.
+        if (!passed) {                                                    // didn't passed B-subsample of BC sample yet.
 
-        if (l_indCurrentCell[samp] < static_cast<int>( (samples[samp])->cells.size())) {
-          m_DMToCell.push_back( (tile_section->samples[samp])->cells[l_indCurrentCell[samp]]);
-        }     // A,B - Barrel or A,B,C,D - Ext. Barrel or ITC
-      } else {                                     	                                                 // passed==true
-        if (l_indCurrentCell[samp] < static_cast<int>( (samples[samp - 1])->cells.size())) {
-          m_DMToCell.push_back( (tile_section->samples[samp - 1])->cells[l_indCurrentCell[samp]]);
-        }    // C,D - Barrel
-      }
+          if (l_indCurrentCell[samp] < static_cast<int>( (samples[samp])->cells.size())) {
+            m_DMToCell.push_back( (tile_section->samples[samp])->cells[l_indCurrentCell[samp]]);
+          }     // A,B - Barrel or A,B,C,D - Ext. Barrel or ITC
+        } else {                                     	                                                 // passed==true
+          if (l_indCurrentCell[samp] < static_cast<int>( (samples[samp - 1])->cells.size())) {
+            m_DMToCell.push_back( (tile_section->samples[samp - 1])->cells[l_indCurrentCell[samp]]);
+          }    // C,D - Barrel
+        }
 
-    }    //for(per)
-  }    //for(samp)
+      }    //for(per)
+    }    //for(samp)
 
   else {//Gap/Crack
 
@@ -177,7 +177,7 @@ TileGeoG4PlateCell* TileGeoG4CalibSection::GetTilePlateCell(double xHit, double
   int cell_ind = 0;
   
   switch (plate) {
-    case 1:  //FrontPlate
+  case 1:  //FrontPlate
     {
       sample = 0;
       for (int counter = 0; counter < static_cast<int>(samples[sample]->plateCells.size()); counter++) {
@@ -189,7 +189,7 @@ TileGeoG4PlateCell* TileGeoG4CalibSection::GetTilePlateCell(double xHit, double
       }
       break;
     }
-    case 2:  //EndPlate
+  case 2:  //EndPlate
     {
       for (unsigned int samp = 1; samp != samples.size(); ++samp) {
         if (zHit < (samples[samp]->plateCells[0])->zBound) {
@@ -207,25 +207,25 @@ TileGeoG4PlateCell* TileGeoG4CalibSection::GetTilePlateCell(double xHit, double
       }
       break;
     }
-    case 3:  //Iron1,Iron2,Iron3,IrBox
+  case 3:  //Iron1,Iron2,Iron3,IrBox
     {
       sample = 0;
       cell_ind = 0;
       break;
     }
-    case 4:  //IrUp, IrDw
+  case 4:  //IrUp, IrDw
     {
       sample = 0;
       cell_ind = static_cast<int>(samples[sample]->plateCells.size()) - 1;
       break;
     }
-    case 5:  //Saddle except neg. barrel
+  case 5:  //Saddle except neg. barrel
     {
       sample = samples.size() - 2;
       cell_ind = samples[sample]->plateCells.size() - 1;
       break;
     }
-    case 6:  //Saddle neg. barrel
+  case 6:  //Saddle neg. barrel
     {
       sample = samples.size() - 2;
       cell_ind = 0;
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookup.h b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookup.h
index 3526bdccd901dad88ad3ed677a9e0fc38099353c..64a84505c5fcc1d654e2ecf1b85a7d4cc3879c38 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookup.h
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookup.h
@@ -20,93 +20,93 @@ class TileGeoG4Cell;
 class TileGeoG4Section;
 
 class TileGeoG4CalibCell {
-  public:
+public:
 
-    int detector;
-    int sample;
-    int nrOfPeriodsInCell[2];
+  int detector;
+  int sample;
+  int nrOfPeriodsInCell[2];
 
-    TileGeoG4CalibCell();
+  TileGeoG4CalibCell();
 };
 
 class TileGeoG4PlateCell {
-  public:
+public:
 
-    int detector;
-    int tower;
-    int sample;
-    int neighbor;
-    double eta;
-    double dEta;
-    double xBound;
-    double zBound;
+  int detector;
+  int tower;
+  int sample;
+  int neighbor;
+  double eta;
+  double dEta;
+  double xBound;
+  double zBound;
 
-    std::vector<int> m_nPlateCellHit;
-    std::vector<int> m_nPlateCellHit_negative;
+  std::vector<int> m_nPlateCellHit;
+  std::vector<int> m_nPlateCellHit_negative;
 
-    TileGeoG4PlateCell();
+  TileGeoG4PlateCell();
 };
 
 class TileGeoG4GirderCell {
-  public:
+public:
 
-    int detector;
-    int tower;
-    int sample;
-    double eta;
-    double dEta;
-    double xBound;
+  int detector;
+  int tower;
+  int sample;
+  double eta;
+  double dEta;
+  double xBound;
 
-    std::vector<int> m_nGirderCellHit;
-    std::vector<int> m_nGirderCellHit_negative;
+  std::vector<int> m_nGirderCellHit;
+  std::vector<int> m_nGirderCellHit_negative;
 
-    TileGeoG4GirderCell();
+  TileGeoG4GirderCell();
 };
 
 struct TileGeoG4CalibSample {
-    std::vector<TileGeoG4CalibCell*> cells;
-    std::vector<TileGeoG4PlateCell*> plateCells;
+  std::vector<TileGeoG4CalibCell*> cells;
+  std::vector<TileGeoG4PlateCell*> plateCells;
 };
 
 class TileGeoG4CalibSection {
-  public:
+public:
 
-    TileGeoG4CalibSection(const int verboseLevel);
-    ~TileGeoG4CalibSection();
+  TileGeoG4CalibSection(const int verboseLevel);
+  ~TileGeoG4CalibSection();
 
-    int section;
-    int nrOfPeriods;
-    int nrOfSamples;
-    int nrOfCells;
-    int nrOfPlateCells;
-    int nrOfGirderCells;
-    double sample_ZBound[4];
+  int section;
+  int nrOfPeriods;
+  int nrOfSamples;
+  int nrOfCells;
+  int nrOfPlateCells;
+  int nrOfGirderCells;
+  double sample_ZBound[4];
 
-    std::vector<TileGeoG4CalibSample*> samples;
-    std::vector<TileGeoG4GirderCell*> girderCells;
+  std::vector<TileGeoG4CalibSample*> samples;
+  std::vector<TileGeoG4GirderCell*> girderCells;
 
-    //Builds correspondence between absorber materials and cells. fills m_DMToCell in
-    void DMToCell(bool gap_crack, TileGeoG4Section* tile_section);
+  //Builds correspondence between absorber materials and cells. fills m_DMToCell in
+  void DMToCell(bool gap_crack, TileGeoG4Section* tile_section);
 
-    //Returns the pointer to the cell corresponding to nPeriod-th period and sample
-    TileGeoG4Cell* GetCell(int nPeriod, int nSample);
+  //Returns the pointer to the cell corresponding to nPeriod-th period and sample
+  TileGeoG4Cell* GetCell(int nPeriod, int nSample);
 
-    //Returns the pointer to the Plate 'cell' corresponding to the Hits  x, z - coordinates
-    //and the kind of Plate, Front or End.
-    TileGeoG4PlateCell* GetTilePlateCell(double xHit, double zHit, int plate);
+  //Returns the pointer to the Plate 'cell' corresponding to the Hits  x, z - coordinates
+  //and the kind of Plate, Front or End.
+  TileGeoG4PlateCell* GetTilePlateCell(double xHit, double zHit, int plate);
 
-    //Returns the pointer to the Girder 'cell' corresponding to the Hits x - coordinate
-    TileGeoG4GirderCell* GetTileGirderCell(double xHit);
+  //Returns the pointer to the Girder 'cell' corresponding to the Hits x - coordinate
+  TileGeoG4GirderCell* GetTileGirderCell(double xHit);
 
-    //Initializes all arayes of all cells of all Tile sections
-    void AddModuleToCell(bool negative);
+  //Initializes all arayes of all cells of all Tile sections
+  void AddModuleToCell(bool negative);
 
-  private:
+private:
 
-    //for each unit of Absorber Material ("Period") in Tile modules
-    //contains pointer to the corresponding cell
-    std::vector<TileGeoG4Cell*> m_DMToCell;
-    int m_verboseLevel;
+  //for each unit of Absorber Material ("Period") in Tile modules
+  //contains pointer to the corresponding cell
+  std::vector<TileGeoG4Cell*> m_DMToCell;
+  int m_verboseLevel;
 
 };
 
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.cc b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.cc
index ff6824deaf4c12c41fa99475528c9bb0f786db00..f1c397ff28c280457c09e52f390330c64e96f778 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.cc
@@ -41,34 +41,34 @@
 /////////// C O N S T R U C T O R
 
 TileGeoG4DMLookupBuilder::TileGeoG4DMLookupBuilder(TileGeoG4LookupBuilder* lookup_builder,
-    ServiceHandle<IRDBAccessSvc> &raccess,
-    ServiceHandle<IGeoModelSvc> &geo_svc,
-    ServiceHandle<StoreGateSvc> &pDetStore, const int verboseLevel)
-    : rBMin(0),
-    rBMax(0),
-    zBarrMaxPos(0),
-    zBarrMaxNeg(0),
-    dzBarrMod(0),
-    dzExtBarrMod(0),
-    zLegngthITC(0),
-    dzBarrPeriod(0),
-    dzExtBarrPeriod(0),
-    rGirdMin(0),
-    dRFront(0),
-    dZEnd(0),
-    dZEndSh(0),
-    rP1Min(0),
-    rP2Min(0),
-    rGapMax(0),
-    rGapMin(0),
-    rCrMax(0),
-    rCrMin(0),
-    m_dbManager(0),
-    m_lookup_builder(lookup_builder),
-    m_sectionMap(0),
-    m_tdbManager(0),
-    m_verboseLevel(verboseLevel),
-    m_plateToCell(false)
+                                                   ServiceHandle<IRDBAccessSvc> &raccess,
+                                                   ServiceHandle<IGeoModelSvc> &geo_svc,
+                                                   ServiceHandle<StoreGateSvc> &pDetStore, const int verboseLevel)
+: rBMin(0),
+  rBMax(0),
+  zBarrMaxPos(0),
+  zBarrMaxNeg(0),
+  dzBarrMod(0),
+  dzExtBarrMod(0),
+  zLegngthITC(0),
+  dzBarrPeriod(0),
+  dzExtBarrPeriod(0),
+  rGirdMin(0),
+  dRFront(0),
+  dZEnd(0),
+  dZEndSh(0),
+  rP1Min(0),
+  rP2Min(0),
+  rGapMax(0),
+  rGapMin(0),
+  rCrMax(0),
+  rCrMin(0),
+  m_dbManager(0),
+  m_lookup_builder(lookup_builder),
+  m_sectionMap(0),
+  m_tdbManager(0),
+  m_verboseLevel(verboseLevel),
+  m_plateToCell(false)
 {
 
   const DataHandle<GeoModelExperiment> theExpt;
diff --git a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.h b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.h
index 2214fd345050fde5470f83b201e3d1ec07fdf52f..76cd04ffc1da0a88bc14b7b7fd57441a77286089 100644
--- a/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.h
+++ b/TileCalorimeter/TileG4/TileGeoG4Calib/src/TileGeoG4DMLookupBuilder.h
@@ -31,49 +31,49 @@ class IGeoModelSvc;
 class StoreGateSvc;
 
 class TileGeoG4DMLookupBuilder {
-  public:
-    TileGeoG4DMLookupBuilder(TileGeoG4LookupBuilder* tile_lookup_builder, ServiceHandle<IRDBAccessSvc> &access,
-                             ServiceHandle<IGeoModelSvc> &geo_svc, ServiceHandle<StoreGateSvc> &pDetStore,
-                             const int verboseLevel);
-    ~TileGeoG4DMLookupBuilder();
+public:
+  TileGeoG4DMLookupBuilder(TileGeoG4LookupBuilder* tile_lookup_builder, ServiceHandle<IRDBAccessSvc> &access,
+                           ServiceHandle<IGeoModelSvc> &geo_svc, ServiceHandle<StoreGateSvc> &pDetStore,
+                           const int verboseLevel);
+  ~TileGeoG4DMLookupBuilder();
 
-    void BuildLookup(bool test_beam = false);
-    void ResetCells();
-    TileGeoG4CalibSection* GetSection(TileCalibDddbManager::TileCalibSections key) const;
-    bool GetPlateToCell();
+  void BuildLookup(bool test_beam = false);
+  void ResetCells();
+  TileGeoG4CalibSection* GetSection(TileCalibDddbManager::TileCalibSections key) const;
+  bool GetPlateToCell();
 
-    //Geometry constans fo DH calculator
-    double rBMin, rBMax;
-    double zBarrMaxPos, zBarrMaxNeg;
-    double dzBarrMod, dzExtBarrMod;
-    double zLegngthITC;
-    double dzBarrPeriod, dzExtBarrPeriod;
-    double rGirdMin;
-    double dRFront;
-    double dZEnd, dZEndSh;
+  //Geometry constans fo DH calculator
+  double rBMin, rBMax;
+  double zBarrMaxPos, zBarrMaxNeg;
+  double dzBarrMod, dzExtBarrMod;
+  double zLegngthITC;
+  double dzBarrPeriod, dzExtBarrPeriod;
+  double rGirdMin;
+  double dRFront;
+  double dZEnd, dZEndSh;
 
-    double rP1Min, rP2Min, rGapMax, rGapMin, rCrMax, rCrMin;
+  double rP1Min, rP2Min, rGapMax, rGapMin, rCrMax, rCrMin;
 
-  private:
+private:
 
-    TileGeoG4DMLookupBuilder(const TileGeoG4DMLookupBuilder&);
-    TileGeoG4DMLookupBuilder& operator=(const TileGeoG4DMLookupBuilder&);
+  TileGeoG4DMLookupBuilder(const TileGeoG4DMLookupBuilder&);
+  TileGeoG4DMLookupBuilder& operator=(const TileGeoG4DMLookupBuilder&);
 
-    typedef std::map<TileCalibDddbManager::TileCalibSections, TileGeoG4CalibSection*,
-        std::less<TileCalibDddbManager::TileCalibSections> > TileGeoG4CalibSectionMap;
+  typedef std::map<TileCalibDddbManager::TileCalibSections, TileGeoG4CalibSection*,
+                   std::less<TileCalibDddbManager::TileCalibSections> > TileGeoG4CalibSectionMap;
 
-    void CreateGeoG4CalibSections(bool is_ctb);
+  void CreateGeoG4CalibSections(bool is_ctb);
 
-    TileCalibDddbManager* m_dbManager;
-    TileGeoG4LookupBuilder* m_lookup_builder;
-    TileGeoG4CalibSectionMap* m_sectionMap;
+  TileCalibDddbManager* m_dbManager;
+  TileGeoG4LookupBuilder* m_lookup_builder;
+  TileGeoG4CalibSectionMap* m_sectionMap;
 
-    const TileDetDescrManager* m_theManager;
-    TileDddbManager* m_tdbManager;
+  const TileDetDescrManager* m_theManager;
+  TileDddbManager* m_tdbManager;
 
-    int m_verboseLevel;
+  int m_verboseLevel;
 
-    bool m_plateToCell;
+  bool m_plateToCell;
 };
 
 #endif // TILEGEOG4CALIB_TILEGEOG4DMLOOKUPBUILDER_H
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/CMakeLists.txt b/TileCalorimeter/TileG4/TileGeoG4SD/CMakeLists.txt
index d242e46d4c77c20262e31168f3d5a98da63e92aa..59a4403f6b267b3cae53dd1ea7b9bb8e883648cc 100644
--- a/TileCalorimeter/TileG4/TileGeoG4SD/CMakeLists.txt
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/CMakeLists.txt
@@ -7,12 +7,13 @@ atlas_subdir( TileGeoG4SD )
 
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
-                          Calorimeter/CaloIdentifier
-                          Control/StoreGate
                           TileCalorimeter/TileDetDescr
                           TileCalorimeter/TileSimEvent
                           Tools/AtlasDoxygen
                           PRIVATE
+                          Calorimeter/CaloIdentifier
+                          Control/StoreGate
+                          TileCalorimeter/TileG4/TileG4Interfaces
                           Calorimeter/CaloDetDescr
                           Control/CxxUtils
                           DetectorDescription/GeoModel/GeoModelInterfaces
@@ -34,8 +35,8 @@ atlas_add_library( TileGeoG4SDLib
                    INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} CaloIdentifier TileDetDescr TileSimEvent StoreGateLib SGtests CaloDetDescrLib G4AtlasToolsLib TileGeoModelLib
-                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} CxxUtils GeoModelUtilities GaudiKernel PathResolver )
+                   LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} TileDetDescr TileSimEvent
+                   PRIVATE_LINK_LIBRARIES ${CLHEP_LIBRARIES} CaloIdentifier CxxUtils GeoModelUtilities GaudiKernel PathResolver StoreGateLib SGtests CaloDetDescrLib G4AtlasToolsLib TileGeoModelLib )
 
 atlas_add_component( TileGeoG4SD
                      src/components/*.cxx
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4Lookup.hh b/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4Lookup.hh
index c8c142ac41a98f2a33b8ce5238d0e3f70bf8dce7..b78636c84f678785b4032c11f19a3f5f16b0b9d9 100755
--- a/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4Lookup.hh
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4Lookup.hh
@@ -19,98 +19,98 @@
 class TileSimHit;
 
 class TileGeoG4Cell {
-  public:
-    int detector;            // 1-Barrel, 2-Extended Barrel, 3-ITC,
-                             // 4-gap/crack, 5-Mod0, 6-Prototype
+public:
+  int detector;            // 1-Barrel, 2-Extended Barrel, 3-ITC,
+  // 4-gap/crack, 5-Mod0, 6-Prototype
 
-    int cellNum;             // from -16 (A-16) to 16 (A16)
+  int cellNum;             // from -16 (A-16) to 16 (A16)
 
-    int tower;               // from -16 (A-16) to 16 (A16)
+  int tower;               // from -16 (A-16) to 16 (A16)
 
-    int sample;              // 1 - A, Proto1
-                             // 2 - B, BC, C, Proto2
-                             // 3 - D, Proto3
-                             // 4 - gap/crack, Proto4
+  int sample;              // 1 - A, Proto1
+  // 2 - B, BC, C, Proto2
+  // 3 - D, Proto3
+  // 4 - gap/crack, Proto4
 
-    double sinTh;    //added by Mike
-    double r;        //added by Mike
+  double sinTh;    //added by Mike
+  double r;        //added by Mike
 
-    int firstRow;
-    int lastRow;
-    std::vector<int> nrOfTilesInRow;
-    int nrOfPMT;
-    std::vector<int> holes;
+  int firstRow;
+  int lastRow;
+  std::vector<int> nrOfTilesInRow;
+  int nrOfPMT;
+  std::vector<int> holes;
 
-    double zMin, zMax, zMin2, zMax2;  //added by Sergey
+  double zMin, zMax, zMin2, zMax2;  //added by Sergey
 
-    // Two Vectors containing pointers to TileSimHit objects
-    // corresponding to the PMTs of current cell
-    // One vector contains information concerning Up PMT, another - Down PMT
-    // Index in the vector is module CopyNumber-1.
-    //
-    // If there is only one PMT for the cell (GAP/CRACK scintillators) just UP vector are filled in
+  // Two Vectors containing pointers to TileSimHit objects
+  // corresponding to the PMTs of current cell
+  // One vector contains information concerning Up PMT, another - Down PMT
+  // Index in the vector is module CopyNumber-1.
+  //
+  // If there is only one PMT for the cell (GAP/CRACK scintillators) just UP vector are filled in
 
-    std::vector<TileSimHit*> moduleToHitUp;
-    std::vector<TileSimHit*> moduleToHitDown;
-    std::vector<int> nCellHit;
+  std::vector<TileSimHit*> moduleToHitUp;
+  std::vector<TileSimHit*> moduleToHitDown;
+  std::vector<int> nCellHit;
 
-    //Same as previous pair, but corresponding to negative side of extended sections
-    std::vector<TileSimHit*> moduleToHitUpNegative;
-    std::vector<TileSimHit*> moduleToHitDownNegative;
-    std::vector<int> nCellHitNegative;
+  //Same as previous pair, but corresponding to negative side of extended sections
+  std::vector<TileSimHit*> moduleToHitUpNegative;
+  std::vector<TileSimHit*> moduleToHitDownNegative;
+  std::vector<int> nCellHitNegative;
 
-    TileGeoG4Cell();
+  TileGeoG4Cell();
     
 };
 
 class TileGeoG4Sample {
-  public:
-    int firstRow;
-    int lastRow;
-    std::vector<TileGeoG4Cell*> cells;
+public:
+  int firstRow;
+  int lastRow;
+  std::vector<TileGeoG4Cell*> cells;
 
-    TileGeoG4Sample();
+  TileGeoG4Sample();
 };
 
 class TileGeoG4Section {
-  public:
-    std::vector<TileGeoG4Sample*> samples;
+public:
+  std::vector<TileGeoG4Sample*> samples;
 
-    int nrOfModules;
-    int nrOfPeriods;
-    int nrOfScintillators;
+  int nrOfModules;
+  int nrOfPeriods;
+  int nrOfScintillators;
 
-    int nrOfPhysicalSections;
-    int nrOfPhysicalSections_negative;
+  int nrOfPhysicalSections;
+  int nrOfPhysicalSections_negative;
 
-    TileGeoG4Section(const int verboseLevel);
-    ~TileGeoG4Section();
+  TileGeoG4Section(const int verboseLevel);
+  ~TileGeoG4Section();
 
-    // Builds correspondence between scintillators and cells, i.e. fills m_ScinToCell
-    void ScinToCell(bool gap_crack, int rowShift);
+  // Builds correspondence between scintillators and cells, i.e. fills m_ScinToCell
+  void ScinToCell(bool gap_crack, int rowShift);
 
-    // Returns the pointer to the cell corresponding to nScin-th scintillator
-    TileGeoG4Cell* ScinToCell(int nScin);
+  // Returns the pointer to the cell corresponding to nScin-th scintillator
+  TileGeoG4Cell* ScinToCell(int nScin);
 
-    // Adds NULL in m_ModuleToHit vector for each cell of current section
-    void AddModuleToCell(bool negative = 0);
+  // Adds NULL in m_ModuleToHit vector for each cell of current section
+  void AddModuleToCell(bool negative = 0);
 
-    //Prints scin-cell correspondance information
-    void PrintScinToCell(std::string section_name);
+  //Prints scin-cell correspondance information
+  void PrintScinToCell(std::string section_name);
 
-  private:
-    //for each scintillator in the module contains pointer to the corresponding cell
-    std::vector<TileGeoG4Cell*> m_ScinToCell;
-    int m_verboseLevel;
+private:
+  //for each scintillator in the module contains pointer to the corresponding cell
+  std::vector<TileGeoG4Cell*> m_ScinToCell;
+  int m_verboseLevel;
 
 };
 
 class TileRow {
-  public:
-    std::vector<double> attLen[3]; // 3*11 values of lambda for barrel, ext bar, ITC
-    std::vector<double> OpticalRatio[3]; // 3*11 I0 valies for barrel, ext bar, ITC
+public:
+  std::vector<double> attLen[3]; // 3*11 values of lambda for barrel, ext bar, ITC
+  std::vector<double> OpticalRatio[3]; // 3*11 I0 valies for barrel, ext bar, ITC
 
-    TileRow(std::string& dataFile, std::string& ratioFile);
+  TileRow(std::string& dataFile, std::string& ratioFile);
 };
 
 #endif // TILEGEOG4SD_TILEGEOG4LOOKUP_H
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4LookupBuilder.hh b/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4LookupBuilder.hh
index c597dfc96b1f9b5701b9d494291a15dd0fc1e293..98e2a7351a481a730c78fda12146dbc2e5417994 100755
--- a/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4LookupBuilder.hh
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4LookupBuilder.hh
@@ -24,52 +24,52 @@ class TileGeoG4Section;
 class StoreGateSvc;
 
 class TileGeoG4LookupBuilder {
-  public:
-    TileGeoG4LookupBuilder(StoreGateSvc* pDetStore, const int verboseLevel);
-    ~TileGeoG4LookupBuilder();
-    void BuildLookup(bool test_beam = false);
-    TileGeoG4Section* GetSection(TileDddbManager::TileSections key) const;
+public:
+  TileGeoG4LookupBuilder(StoreGateSvc* pDetStore, const int verboseLevel);
+  ~TileGeoG4LookupBuilder();
+  void BuildLookup(bool test_beam = false);
+  TileGeoG4Section* GetSection(TileDddbManager::TileSections key) const;
 
-    // Method invoked at the end of each event by SD
-    // it copies all TileHits to TileHitVector and deletes them
-    void ResetCells(TileHitVector* tileHitsCollection);
-    // returns number of PMTs in C10 Cells
-    int TileGeoG4npmtC10(int side, int module) {
-      return m_npmtC10[side][module];
-    }
-    // returns number of PMTs in D4 Cells
-    int TileGeoG4npmtD4(int side, int module) {
-      return m_npmtD4[side][module];
-    }
-    // returns number of PMTs in E4' Cells
-    int TileGeoG4npmtE5(int side, int module) {
-      return m_npmtE5[side][module];
-    }
+  // Method invoked at the end of each event by SD
+  // it copies all TileHits to TileHitVector and deletes them
+  void ResetCells(TileHitVector* tileHitsCollection);
+  // returns number of PMTs in C10 Cells
+  int TileGeoG4npmtC10(int side, int module) {
+    return m_npmtC10[side][module];
+  }
+  // returns number of PMTs in D4 Cells
+  int TileGeoG4npmtD4(int side, int module) {
+    return m_npmtD4[side][module];
+  }
+  // returns number of PMTs in E4' Cells
+  int TileGeoG4npmtE5(int side, int module) {
+    return m_npmtE5[side][module];
+  }
 
-  private:
-    typedef std::map<std::string, TileGeoG4Cell*, std::less<std::string> > TileGeoG4CellMap;
-    typedef std::map<TileDddbManager::TileSections, TileGeoG4Section*, std::less<TileDddbManager::TileSections> > TileGeoG4SectionMap;
+private:
+  typedef std::map<std::string, TileGeoG4Cell*, std::less<std::string> > TileGeoG4CellMap;
+  typedef std::map<TileDddbManager::TileSections, TileGeoG4Section*, std::less<TileDddbManager::TileSections> > TileGeoG4SectionMap;
 
-    void CreateGeoG4Cells();
-    void CreateGeoG4Sections(bool is_tb);
-    // Fill array of number of PMTs for C10 Cells
-    void MakeTileGeoG4npmtC10();
-    // Fill array of number of PMTs for D4 Cells
-    void MakeTileGeoG4npmtD4();
-    // Fill array of number of PMTs for E4' Cells
-    void MakeTileGeoG4npmtE5();
+  void CreateGeoG4Cells();
+  void CreateGeoG4Sections(bool is_tb);
+  // Fill array of number of PMTs for C10 Cells
+  void MakeTileGeoG4npmtC10();
+  // Fill array of number of PMTs for D4 Cells
+  void MakeTileGeoG4npmtD4();
+  // Fill array of number of PMTs for E4' Cells
+  void MakeTileGeoG4npmtE5();
 
-    const TileDetDescrManager* m_theManager;
-    const TileID* m_tileID;
-    TileDddbManager* m_dbManager;
-    TileGeoG4CellMap* m_cellMap;
-    TileGeoG4SectionMap* m_sectionMap;
-    bool m_isE5;
-    int m_npmtC10[2][64]; //array of number of PMTs for C10 Cells
-    int m_npmtD4[2][64];  //array of number of PMTs for D4 Cells
-    int m_npmtE5[2][64];  //array of number of PMTs for E4' Cells
+  const TileDetDescrManager* m_theManager;
+  const TileID* m_tileID;
+  TileDddbManager* m_dbManager;
+  TileGeoG4CellMap* m_cellMap;
+  TileGeoG4SectionMap* m_sectionMap;
+  bool m_isE5;
+  int m_npmtC10[2][64]; //array of number of PMTs for C10 Cells
+  int m_npmtD4[2][64];  //array of number of PMTs for D4 Cells
+  int m_npmtE5[2][64];  //array of number of PMTs for E4' Cells
 
-    int m_verboseLevel; //!< Level of verbosity, passed in from above
+  int m_verboseLevel; //!< Level of verbosity, passed in from above
 };
 
 #endif // TILEGEOG4SD_TILEGEOG4LOOKUPBUILDER_H
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4SDCalc.hh b/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4SDCalc.hh
deleted file mode 100644
index 70ff2e4764ec66e9b454dff6165bba53da0ee4ef..0000000000000000000000000000000000000000
--- a/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4SDCalc.hh
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-//************************************************************
-// Filename : TileGeoG4SDCalc.hh
-// Author   : Sergey Karpov <Sergey.Karpov@cern.ch>
-// Created  : July, 2013
-//
-// DESCRIPTION:
-//   Sensitive Detector initialisation for TileCal G4 simulations
-//   of both ordinary Hits and CalibHits
-//
-// HISTORY:
-//   Nov 2013 - Work with U-shape was added (Sasha Solodkov)
-//
-//************************************************************
-
-#ifndef TILEGEOG4SD_TILEGEOG4SDCALC_H
-#define TILEGEOG4SD_TILEGEOG4SDCALC_H
-
-// package headers
-#include "TileGeoG4SD/TileSDOptions.h"
-
-// athena headers
-#include "CaloIdentifier/TileID.h"
-#include "CaloIdentifier/TileTBID.h"
-
-// Geant4 headers
-#include "G4Types.hh"
-
-// STL headers
-#include <vector>
-#include <memory>
-
-class TileGeoG4LookupBuilder;
-
-class G4Step;
-
-class TileRow;
-class TileGeoG4Section;
-class TileGeoG4Cell;
-
-class StoreGateSvc;
-
-struct TileMicroHit {
-    Identifier pmt_up, pmt_down;
-    G4double e_up, e_down;
-    double time_up, time_down;
-    //int         period,     tilerow; // prepared for future use
-};
-
-class TileGeoG4SDCalc {
-  public:
-    TileGeoG4SDCalc(TileSDOptions opts);
-    ~TileGeoG4SDCalc();
-
-    G4bool FindTileScinSection(const G4Step*);
-    G4bool MakePmtEdepTime(const G4Step*);
-    TileMicroHit GetTileMicroHit(const G4Step*);
-
-    G4bool ManageScintHit();
-    void CreateScintHit(int);
-    void UpdateScintHit(int);
-
-    /** @brief function to give PMT responce as a function of distance
-     from tile center in mm (along phi direction) */
-    static G4double Tile_1D_profileAsym(int row, G4double x, G4double y, int PMT, int nDetector, int nSide); //asymmetric U-shape
-    static G4double Tile_1D_profileSym(int row, G4double x, G4double y, int PMT, int nDetector, int nSide); //Single Lookup table is included; average of central 17 bins is normalized to 0.5
-    static G4double Tile_1D_profileFunc(int row, G4double x, G4double y, int PMT, int nDetector, int nSide); //Single Lookup table is included; average of all bins is normalized to 0.5
-    static G4double Tile_1D_profileRescaled(int row, G4double x, G4double y, int PMT, int nDetector, int nSide);
-    static G4double Tile_1D_profileRescaled_zeroBins(int row, G4double x, G4double y, int PMT, int nDetector, int nSide,
-        int nZeroBins = 0);
-
-    // the default function which is used in simulation in the case Ushape=1
-#define Tile_1D_profile Tile_1D_profileRescaled
-
-    StoreGateSvc* detStore; // used by TileGeoG4CalibSD.cc
-
-    TileGeoG4LookupBuilder* lookup;
-    TileGeoG4Section* section;
-    TileGeoG4Cell* cell;
-
-    //variables to identify Hit objects
-    int nModule;
-    int nDetector;
-    int nTower;
-    int nSample;
-    int nSide;
-
-    Identifier m_invalid_id;
-    Identifier pmtID_up, pmtID_down;
-    G4double edep_up, edep_down;
-    double scin_Time_up, scin_Time_down;
-
-    const TileSDOptions GetOptions() const {
-      return m_options;
-    }
-
-  private:
-    // Private copy-constructor
-    TileGeoG4SDCalc& operator=(const TileGeoG4SDCalc&) = delete;
-    TileGeoG4SDCalc(const TileGeoG4SDCalc&) = delete;
-
-    TileSDOptions m_options;
-
-    int m_nrOfPMT;
-    int m_tileSize;
-    int m_tilePeriod;
-    bool m_isNegative;
-    double m_totalTimeUp;
-    double m_totalTimeDown;
-
-    /** @brief granularity in time for hits */
-    double m_deltaT;
-
-    /** @brief function to calculate Birks correction */
-    G4double BirkLaw(const G4Step* aStep) const;
-
-    /** @brief Structure holding the attenuation lengths */
-    std::unique_ptr<TileRow> m_row;
-
-    /** @brief pointer to TileID helper class */
-    const TileID* m_tileID;
-
-    /** @brief pointer to TileTBID helper class */
-    const TileTBID* m_tileTBID;
-
-    /** @brief hits in different tile rows are shifted in time by this amount of ns */
-    double m_tileSizeDeltaT;
-
-    /** @brief time for hits which are above m_timeCut threshold
-     it is equal to m_tilesize_deltaT - m_deltaT */
-    double m_lateHitTime;
-
-    /** @brief function to provide correct deltaT bin width for given time */
-    inline double deltaT(double time) const {
-      unsigned int i = 0;
-      double delta = m_options.deltaTHit[i++];
-      while (i < m_options.deltaTHit.size()) {
-        if (time > m_options.deltaTHit[i++] && time < m_options.deltaTHit[i++]) break;
-        delta = m_options.deltaTHit[i++];
-      }
-      return delta;
-    }
-
-};
-//class TileGeoG4SDCalc
-
-#endif // not TILEGEOG4SD_TILEGEOG4SDCALC_H
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileSDOptions.h b/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileSDOptions.h
index c0739dea61b581871b82f63970a93397496e3c99..8be6bfbb7b4d6ac13c4675c8d58c9fe41432577b 100644
--- a/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileSDOptions.h
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileSDOptions.h
@@ -6,64 +6,75 @@
 #define TILESDOPTIONS_h
 
 /* This is a very simple struct for holding sensitive detector
- configuration options; formerly this was in
- TileCalorimeter/TileSimUtils/TileSimUtils/TileG4SimOptions.h
- But now that there are real tools, that setup is not necessary
- */
+   configuration options; formerly this was in
+   TileCalorimeter/TileSimUtils/TileSimUtils/TileG4SimOptions.h
+   But now that there are real tools, that setup is not necessary
+*/
 
 #include <string>
 #include <vector>
 
 struct TileSDOptions {
-    /** Setup defaults */
-    TileSDOptions()
-        : timeCut(350.5),
-          tileTB(false),
-          plateToCell(true),
-          Ushape(-1),
-          doBirk(true),
-          doTileRow(false),
-          doTOFCorrection(true),
-          doCalibHitParticleID(false),
-          verboseLevel(0),
-          rDBAccessSvcName("RDBAccessSvc"),
-          geoModelSvcName("GeoModelSvc")
-    {
-      deltaTHit = {0.5 , -75.25 , 75.25 , 5.};
-    }
-
-    /** A time granularity for G4 hits in TileHit
-     it can be just one number, e.g. 5.0 which means that the same
-     granularity is used everywhere or it can be a vector which contains
-     3*N+1 elements, e.g. 0.1,-5,5, 0.5,-75,75, 5.0 which means that
-     for [-5,5] ns interval granularity 0.1ns will be used
-     for [-75,75] ns interval granularity 0.5ns will be used
-     and 5ns granularity will be used for all other hits  */
-    std::vector<double> deltaTHit;
-    /** Time cut for hits, all hits go to one single time bin if time is above this cut */
-    double timeCut;
-    /** Flag to indicate TileCal TestBeam configuration */
-    bool tileTB;
-    /** Special flag for Calibration Hits. If true then Tile
-     Plates are the parts of the adjacent Tile cells.
-     If false then they are Dead Materials */
-    bool plateToCell;
-    /** Flag to enable simulation of light attenuation in tiles */
-    int Ushape;
-    /** Flag to enable Birk's law */
-    bool doBirk;
-    /** Flag to enable energy per tile row in TileHit */
-    bool doTileRow;
-    /** Flag to apply TOF correction (subtract Time Of Flight from ATLAS center) */
-    bool doTOFCorrection;
-    /** Flag to produce calibration hits signed with primary particle ID */
-    bool doCalibHitParticleID;
-    /** Helper to keep the same verbosity everywhere */
-    int verboseLevel;
-    //** Name of the RDBAccessSvc instance to use */
-    std::string rDBAccessSvcName;
-    //** Name of the GeoModelSvc instance to use */
-    std::string geoModelSvcName;
-  };
+  /** Setup defaults */
+  TileSDOptions()
+    : timeCut(350.5),
+      tileTB(false),
+      plateToCell(true),
+      Ushape(-1),
+      doBirk(true),
+      doTileRow(false),
+      doTOFCorrection(true),
+      doCalibHitParticleID(false),
+      verboseLevel(0),
+      rDBAccessSvcName("RDBAccessSvc"),
+      geoModelSvcName("GeoModelSvc")
+  {
+    deltaTHit = {0.5 , -75.25 , 75.25 , 5.};
+  }
+
+  /** A time granularity for G4 hits in TileHit
+      it can be just one number, e.g. 5.0 which means that the same
+      granularity is used everywhere or it can be a vector which contains
+      3*N+1 elements, e.g. 0.1,-5,5, 0.5,-75,75, 5.0 which means that
+      for [-5,5] ns interval granularity 0.1ns will be used
+      for [-75,75] ns interval granularity 0.5ns will be used
+      and 5ns granularity will be used for all other hits  */
+  std::vector<double> deltaTHit;
+
+  /** Time cut for hits, all hits go to one single time bin if time is above this cut */
+  double timeCut; /// used in TileGeoG4SDCalc only
+
+  /** Flag to indicate TileCal TestBeam configuration */
+  bool tileTB; // used in TileGeoG4CalibSD and TileGeoG4SDCalc
+
+  /** Special flag for Calibration Hits. If true then Tile
+      Plates are the parts of the adjacent Tile cells.
+      If false then they are Dead Materials */
+  bool plateToCell; /// Not used anywhere?!
+
+  /** Flag to enable simulation of light attenuation in tiles */
+  int Ushape; /// used in TileGeoG4SDCalc only
+
+  /** Flag to enable Birk's law */
+  bool doBirk; /// used in TileGeoG4SDCalc only
+
+  /** Flag to enable energy per tile row in TileHit */
+  bool doTileRow; /// used in TileGeoG4SDCalc only
+
+  /** Flag to apply TOF correction (subtract Time Of Flight from ATLAS center) */
+  bool doTOFCorrection; /// used in TileGeoG4SDCalc only
+
+  /** Flag to produce calibration hits signed with primary particle ID */
+  bool doCalibHitParticleID; /// used in TileGeoG4CalibSD only
+
+  /** Helper to keep the same verbosity everywhere */
+  int verboseLevel;
+
+  //** Name of the RDBAccessSvc instance to use */
+  std::string rDBAccessSvcName; /// used in TileGeoG4CalibSD only
+
+  //** Name of the GeoModelSvc instance to use */
+  std::string geoModelSvcName; /// used in TileGeoG4CalibSD only
+};
 
 #endif
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/doc/packagedoc.h b/TileCalorimeter/TileG4/TileGeoG4SD/doc/packagedoc.h
index a1a13a59e8e1a02f3b5db12adb8b78bd40c0884c..866cb248324979d868c84a6a484942e27cc0016e 100644
--- a/TileCalorimeter/TileG4/TileGeoG4SD/doc/packagedoc.h
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/doc/packagedoc.h
@@ -22,16 +22,6 @@ resets those tables at the end of every event.
 
 @author Vakho Tsulaia <Vakhtang.Tsulaia@cern.ch>
 
-@ref used_TileGeoG4SD
 
-@ref requirements_TileGeoG4SD
 
 */
-
-/**
-@page used_TileGeoG4SD Used Packages
-*/
-
-/**
-@page requirements_TileGeoG4SD Requirements
-*/
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfig.py b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfig.py
index 9aece04beb77722a7d11c4fc8d26e1e7e80a1789..f7a800593e6982a36fd8acd8216cdb49bd2de2d0 100644
--- a/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfig.py
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfig.py
@@ -1,9 +1,19 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon import CfgMgr
+
+from ISF_Algorithms.collection_merger_helpers import generate_mergeable_collection_name
+
+
 def getTileGeoG4SD(name="TileGeoG4SD", **kwargs):
+    bare_collection_name = "TileHitVec"
+    mergeable_collection_suffix = "_G4"
+    merger_input_property = "TileHits"
+    hits_collection_name = generate_mergeable_collection_name(bare_collection_name,
+                                                              mergeable_collection_suffix,
+                                                              merger_input_property)
     kwargs.setdefault("LogicalVolumeNames", ["Tile::Scintillator"])
-    kwargs.setdefault("OutputCollectionNames", ["TileHitVec"])
+    kwargs.setdefault("OutputCollectionNames", [hits_collection_name])
 
     from G4AtlasApps.SimFlags import simFlags
     from AthenaCommon.BeamFlags import jobproperties
@@ -16,4 +26,20 @@ def getTileGeoG4SD(name="TileGeoG4SD", **kwargs):
 def getTileCTBGeoG4SD(name="TileCTBGeoG4SD", **kwargs):
     kwargs.setdefault("LogicalVolumeNames", ["Tile::Scintillator"])
     kwargs.setdefault("OutputCollectionNames", ["TileHitVec"])
+    kwargs.setdefault("TileCalculator", "TileCTBGeoG4SDCalc")
     return CfgMgr.TileGeoG4SDTool(name, **kwargs)
+
+
+def getTileGeoG4SDCalc(name="TileGeoG4SDCalc", **kwargs):
+    from G4AtlasApps.SimFlags import simFlags
+    from AthenaCommon.BeamFlags import jobproperties
+    if jobproperties.Beam.beamType() == 'cosmics' or (hasattr(simFlags, "ReadTR") and simFlags.ReadTR.statusOn):
+        kwargs.setdefault("DeltaTHit", [1])
+        kwargs.setdefault("DoTOFCorrection", False)
+    return CfgMgr.TileGeoG4SDCalc(name, **kwargs)
+
+
+def getTileCTBGeoG4SDCalc(name="TileCTBGeoG4SDCalc", **kwargs):
+    return CfgMgr.TileGeoG4SDCalc(name, **kwargs)
+
+
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfigDb.py b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfigDb.py
index 796a09bd9bb199045a4a5c180398949264015aea..def4c08fb4c0a3f8e1c4d323d1901b22f109bda7 100644
--- a/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfigDb.py
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/python/TileGeoG4SDConfigDb.py
@@ -1,5 +1,7 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
-from AthenaCommon.CfgGetter import addTool
+from AthenaCommon.CfgGetter import addTool, addService
 addTool("TileGeoG4SD.TileGeoG4SDConfig.getTileGeoG4SD"         , "TileGeoG4SD" )
 addTool("TileGeoG4SD.TileGeoG4SDConfig.getTileCTBGeoG4SD"      , "TileCTBGeoG4SD" )
+addService("TileGeoG4SD.TileGeoG4SDConfig.getTileGeoG4SDCalc"  , "TileGeoG4SDCalc")
+addService("TileGeoG4SD.TileGeoG4SDConfig.getTileCTBGeoG4SDCalc"  , "TileCTBGeoG4SDCalc")
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4Lookup.cc b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4Lookup.cc
index f4b3bca3cc11c4fbc7d346d888f10158c51b7350..dd9fa030fc6cbfb0ce1b0ead17e2b8ce3e3a6050 100755
--- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4Lookup.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4Lookup.cc
@@ -42,35 +42,35 @@ TileRow::TileRow(std::string& datafile, std::string& ratiofile) {
 }
 
 TileGeoG4Cell::TileGeoG4Cell()
-    : detector(0),
-      cellNum(0),
-      tower(0),
-      sample(0),
-      sinTh(0.),
-      r(0.),
-      firstRow(0),
-      lastRow(0),
-      nrOfPMT(0),
-      zMin(0.),
-      zMax(0.),
-      zMin2(0.),
-      zMax2(0.)    //added by Sergey
+  : detector(0),
+    cellNum(0),
+    tower(0),
+    sample(0),
+    sinTh(0.),
+    r(0.),
+    firstRow(0),
+    lastRow(0),
+    nrOfPMT(0),
+    zMin(0.),
+    zMax(0.),
+    zMin2(0.),
+    zMax2(0.)    //added by Sergey
 {
 }
 
 TileGeoG4Sample::TileGeoG4Sample()
-    : firstRow(0),
-      lastRow(0)
+  : firstRow(0),
+    lastRow(0)
 {
 }
 
 TileGeoG4Section::TileGeoG4Section(const int verboseLevel)
-    : nrOfModules(0),
-      nrOfPeriods(0),
-      nrOfScintillators(0),
-      nrOfPhysicalSections(0),
-      nrOfPhysicalSections_negative(0),
-      m_verboseLevel(verboseLevel)
+  : nrOfModules(0),
+    nrOfPeriods(0),
+    nrOfScintillators(0),
+    nrOfPhysicalSections(0),
+    nrOfPhysicalSections_negative(0),
+    m_verboseLevel(verboseLevel)
 {
 }
 
@@ -95,11 +95,11 @@ void TileGeoG4Section::ScinToCell(bool gap_crack, int rowShift) {
   l_indCurrentSample = 0;
 
   if (!gap_crack) for (row = 1; row <= l_nRow; row++) {
-    if (row > (samples[l_indCurrentSample])->lastRow - rowShift) l_indCurrentSample++;
-    l_rowShiftInSample = row - ( (samples[l_indCurrentSample])->firstRow - rowShift);
-    l_indCurrentCell[row - 1] = 0;
-    l_currentBoundary[row - 1] = ( (samples[l_indCurrentSample])->cells[0])->nrOfTilesInRow[l_rowShiftInSample];
-  }
+      if (row > (samples[l_indCurrentSample])->lastRow - rowShift) l_indCurrentSample++;
+      l_rowShiftInSample = row - ( (samples[l_indCurrentSample])->firstRow - rowShift);
+      l_indCurrentCell[row - 1] = 0;
+      l_currentBoundary[row - 1] = ( (samples[l_indCurrentSample])->cells[0])->nrOfTilesInRow[l_rowShiftInSample];
+    }
 
   //Loop through all periods and scintillators - fill m_ScinToCell
   //with the pointers to cells the current scintillator belongs to
@@ -141,7 +141,7 @@ TileGeoG4Cell* TileGeoG4Section::ScinToCell(int nScin) {
     return 0;
   }
   else
-  return m_ScinToCell[nScin];
+    return m_ScinToCell[nScin];
 }
 
 void TileGeoG4Section::AddModuleToCell(bool negative) {
@@ -158,36 +158,36 @@ void TileGeoG4Section::AddModuleToCell(bool negative) {
       current_cell = current_sample->cells[l_nCell];
 
       switch (current_cell->nrOfPMT) {
-        case 1: {
-          // We are in GAP/CRACK Cell - use Up vectors only
-          if (negative) {
-            current_cell->moduleToHitDownNegative.push_back(0);
-            current_cell->nCellHitNegative.push_back(0);
-          } else {
-            current_cell->moduleToHitDown.push_back(0);
-            current_cell->nCellHit.push_back(0);
-          }
-          break;
-        }
-        case 2: {
-          // Standart cell and E5(E4')
-          if (negative) {
-            current_cell->moduleToHitUpNegative.push_back(0);
-            current_cell->moduleToHitDownNegative.push_back(0);
-            current_cell->nCellHitNegative.push_back(0);
-          } else {
-            current_cell->moduleToHitUp.push_back(0);
-            current_cell->moduleToHitDown.push_back(0);
-            current_cell->nCellHit.push_back(0);
-          }
-          break;
+      case 1: {
+        // We are in GAP/CRACK Cell - use Up vectors only
+        if (negative) {
+          current_cell->moduleToHitDownNegative.push_back(0);
+          current_cell->nCellHitNegative.push_back(0);
+        } else {
+          current_cell->moduleToHitDown.push_back(0);
+          current_cell->nCellHit.push_back(0);
         }
-        default: {
-          // Unknown cell type
-          G4cout << "ERROR: AddModuleToCell(): Unexpected number of PMTs in cell --> " << current_cell->nrOfPMT
-                 << G4endl;
-          return;
+        break;
+      }
+      case 2: {
+        // Standart cell and E5(E4')
+        if (negative) {
+          current_cell->moduleToHitUpNegative.push_back(0);
+          current_cell->moduleToHitDownNegative.push_back(0);
+          current_cell->nCellHitNegative.push_back(0);
+        } else {
+          current_cell->moduleToHitUp.push_back(0);
+          current_cell->moduleToHitDown.push_back(0);
+          current_cell->nCellHit.push_back(0);
         }
+        break;
+      }
+      default: {
+        // Unknown cell type
+        G4cout << "ERROR: AddModuleToCell(): Unexpected number of PMTs in cell --> " << current_cell->nrOfPMT
+               << G4endl;
+        return;
+      }
       }
     }
   }
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4LookupBuilder.cc b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4LookupBuilder.cc
index 17ea1db8dde3276d4b3109e5155aa5a8675c91d2..b9deca991547d29ff223f2271955b386a57c44e0 100755
--- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4LookupBuilder.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4LookupBuilder.cc
@@ -29,21 +29,21 @@
 namespace {
 
 
-std::string makeCellName (const std::string& prefix, int i)
-{
-  return prefix + CxxUtils::strformat ("%i", i);
-}
+  std::string makeCellName (const std::string& prefix, int i)
+  {
+    return prefix + CxxUtils::strformat ("%i", i);
+  }
 
 
 } // anonymous namespace
 
 TileGeoG4LookupBuilder::TileGeoG4LookupBuilder(StoreGateSvc* pDetStore, const int verboseLevel)
-    : m_tileID(0),
-      m_dbManager(0),
-      m_cellMap(0),
-      m_sectionMap(0),
-      m_isE5(false),
-      m_verboseLevel(verboseLevel) {
+  : m_tileID(0),
+    m_dbManager(0),
+    m_cellMap(0),
+    m_sectionMap(0),
+    m_isE5(false),
+    m_verboseLevel(verboseLevel) {
 
   const DataHandle<GeoModelExperiment> theExpt;
   StatusCode sc = pDetStore->retrieve(theExpt, "ATLAS");
@@ -65,7 +65,7 @@ TileGeoG4LookupBuilder::TileGeoG4LookupBuilder(StoreGateSvc* pDetStore, const in
     G4cout << "ERROR: Unable to retrieve TileID helper from DetectorStore" << G4endl;
     abort();
   }
-}
+    }
 
 TileGeoG4LookupBuilder::~TileGeoG4LookupBuilder() {
   delete m_cellMap;
@@ -85,13 +85,13 @@ void TileGeoG4LookupBuilder::BuildLookup(bool is_tb) {
   m_cellMap->clear();
 
   /*
-   // Debug printings
-   TileGeoG4SectionMap::const_iterator first = m_sectionMap->begin();
-   TileGeoG4SectionMap::const_iterator last = m_sectionMap->end();
-   for(;first!=last;first++)
-   first->second->PrintScinToCell("");
-   // ---------------- Debug printings
-   */
+  // Debug printings
+  TileGeoG4SectionMap::const_iterator first = m_sectionMap->begin();
+  TileGeoG4SectionMap::const_iterator last = m_sectionMap->end();
+  for(;first!=last;first++)
+  first->second->PrintScinToCell("");
+  // ---------------- Debug printings
+  */
 }
 
 TileGeoG4Section* TileGeoG4LookupBuilder::GetSection(TileDddbManager::TileSections key) const {
@@ -175,56 +175,56 @@ void TileGeoG4LookupBuilder::CreateGeoG4Cells() {
 
     //Create cell name depending of the detector and sample
     switch (static_cast<int>(m_dbManager->TICLdetector())) {
-      case 1:  // Central Barrel
+    case 1:  // Central Barrel
       {
         if (static_cast<int>(m_dbManager->TICLsample()) == 1) {
           cellPrefix = "A";
           if (m_dbManager->TICLncell() < 0)
-          cellPrefix += "neg";
+            cellPrefix += "neg";
           else
-          cellPrefix += "pos";
+            cellPrefix += "pos";
         } else if (static_cast<int>(m_dbManager->TICLsample()) == 2) {
           cellPrefix = "BC";
           if (m_dbManager->TICLncell() < 0)
-          cellPrefix += "neg";
+            cellPrefix += "neg";
           else
-          cellPrefix += "pos";
+            cellPrefix += "pos";
         } else if (static_cast<int>(m_dbManager->TICLsample()) == 3) {
           cellPrefix = "D";
           if (m_dbManager->TICLncell() < 0)
-          cellPrefix += "neg";
+            cellPrefix += "neg";
           else if (m_dbManager->TICLncell() > 0)
-          cellPrefix += "pos";
+            cellPrefix += "pos";
         }
         break;
       }
-      case 2:  // Extended Barrel
+    case 2:  // Extended Barrel
       {
         if (static_cast<int>(m_dbManager->TICLsample()) == 1)
-        cellPrefix = "A";
+          cellPrefix = "A";
         else if (static_cast<int>(m_dbManager->TICLsample()) == 2)
-        cellPrefix = "B";
+          cellPrefix = "B";
         else if (static_cast<int>(m_dbManager->TICLsample()) == 3)
-        cellPrefix = "D";
+          cellPrefix = "D";
         break;
       }
-      case 3:  // ITC
+    case 3:  // ITC
       {
         if (static_cast<int>(m_dbManager->TICLsample()) == 2)
-        cellPrefix = "C";
+          cellPrefix = "C";
         else if (static_cast<int>(m_dbManager->TICLsample()) == 3)
-        cellPrefix = "D";
+          cellPrefix = "D";
         break;
       }
-      case 4:  // Gap/Crack
+    case 4:  // Gap/Crack
       {
         cellPrefix = "E";
         break;
       }
-      default: {
-        G4cout << "ERROR: CreateGeoG4Cells() - Unexpected detector ---> " << m_dbManager->TICLdetector() << G4endl;
-        abort();
-      }
+    default: {
+      G4cout << "ERROR: CreateGeoG4Cells() - Unexpected detector ---> " << m_dbManager->TICLdetector() << G4endl;
+      abort();
+    }
     }
 
     nameCell = makeCellName (cellPrefix, abs(static_cast<int>(m_dbManager->TICLncell())));
@@ -245,16 +245,16 @@ void TileGeoG4LookupBuilder::CreateGeoG4Cells() {
 
     int mtower = std::min(abs(cell->tower), 16);
     if (cell->tower < 0)
-    mtower *= -1;
+      mtower *= -1;
     Identifier cell_id = m_tileID->cell_id(std::min(cell->detector, 3), (int)copysign(1.1, mtower), 0, abs(mtower) - 1, cell->sample - 1);
     CaloDetDescrElement * caloDDE = m_theManager->get_cell_element(cell_id);
     cell->sinTh = caloDDE->sinTh();
     cell->r = caloDDE->r();
     if (m_verboseLevel > 5)
-    G4cout << "  Cell " << nameCell
-           << ": cell_id=" << m_tileID->to_string(cell_id, -2)
-           << "  r=" << cell->r
-           << "  sinTh=" << cell->sinTh << G4endl;
+      G4cout << "  Cell " << nameCell
+             << ": cell_id=" << m_tileID->to_string(cell_id, -2)
+             << "  r=" << cell->r
+             << "  sinTh=" << cell->sinTh << G4endl;
 
     //added by Sergey
     TileCellDim* cellDim = m_theManager->get_cell_dim(cell_id);
@@ -282,23 +282,23 @@ void TileGeoG4LookupBuilder::CreateGeoG4Cells() {
       cell->sinTh = sin(theta);
       cell->r = z * tan(theta);
       if (m_verboseLevel > 5)
-      G4cout << "  Cell " << nameCell << " corrected values: "
-             << "  r=" << cell->r
-             << "  sinTh=" << cell->sinTh
-             << "  z=" << z
-             << "  eta=" << eta << G4endl;
+        G4cout << "  Cell " << nameCell << " corrected values: "
+               << "  r=" << cell->r
+               << "  sinTh=" << cell->sinTh
+               << "  z=" << z
+               << "  eta=" << eta << G4endl;
     }
 
     // (*m_log)<< MSG::DEBUG <<" Zmin="<<_cell->zMin<<"  Zmax="<<_cell->zMax
     // <<"  Zmin2="<<_cell->zMin2<<"  Zmax2="<<_cell->zMax2<<endmsg;
 
     for (i = 0; i <= (cell->lastRow - cell->firstRow); i++)
-    cell->nrOfTilesInRow.push_back(static_cast<int>(m_dbManager->TICLntilesrow(i)));
+      cell->nrOfTilesInRow.push_back(static_cast<int>(m_dbManager->TICLntilesrow(i)));
 
     cell->nrOfPMT = static_cast<int>(m_dbManager->TICLnpmt());
 
     for (i = 0; i < cell->nrOfPMT; i++)
-    cell->holes.push_back(static_cast<int>(m_dbManager->TICLholes(i)));
+      cell->holes.push_back(static_cast<int>(m_dbManager->TICLholes(i)));
 
     // Put it there...
     m_cellMap->operator[](nameCell) = cell;
@@ -328,7 +328,7 @@ void TileGeoG4LookupBuilder::CreateGeoG4Sections(bool is_tb) {
 
   int nSections = (is_tb) ? 4 : m_dbManager->GetNumTilb();
   if (m_dbManager->GetNumberOfEnv() == 1)
-  nSections = 1;
+    nSections = 1;
   nSections = std::min(6, nSections);
 
   int nModules = (is_tb) ? 3 : 64;
@@ -341,142 +341,142 @@ void TileGeoG4LookupBuilder::CreateGeoG4Sections(bool is_tb) {
     key = TileDddbManager::TileSections(counter);
 
     switch (key) {
-      case TileDddbManager::TILE_BARREL: {
-        // Collect all cells for this section
-        // SAMPLE A
-        cellPrefix = "Aneg";
-        for (j = 10; j > 0; j--) {
-          cellName = makeCellName (cellPrefix, j);
-          sectionCells.push_back(m_cellMap->operator[](cellName));
-        }
-        cellPrefix = "Apos";
-        for (j = 1; j < 11; j++) {
-          cellName = makeCellName (cellPrefix, j);
-          sectionCells.push_back(m_cellMap->operator[](cellName));
-        }
-
-        //SAMPLE BC
-        cellPrefix = "BCneg";
-        for (j = 9; j > 0; j--) {
-          cellName = makeCellName (cellPrefix, j);
-          sectionCells.push_back(m_cellMap->operator[](cellName));
-        }
-        cellPrefix = "BCpos";
-        for (j = 1; j < 10; j++) {
-          cellName = makeCellName (cellPrefix, j);
-          sectionCells.push_back(m_cellMap->operator[](cellName));
-        }
-
-        //SAMPLE D
-        cellPrefix = "Dneg";
-        for (j = 3; j > 0; j--) {
-          cellName = makeCellName (cellPrefix, j);
-          sectionCells.push_back(m_cellMap->operator[](cellName));
-        }
-        cellName = "D0";
+    case TileDddbManager::TILE_BARREL: {
+      // Collect all cells for this section
+      // SAMPLE A
+      cellPrefix = "Aneg";
+      for (j = 10; j > 0; j--) {
+        cellName = makeCellName (cellPrefix, j);
         sectionCells.push_back(m_cellMap->operator[](cellName));
-        cellPrefix = "Dpos";
-        for (j = 1; j < 4; j++) {
-          cellName = makeCellName (cellPrefix, j);
-          sectionCells.push_back(m_cellMap->operator[](cellName));
-        }
-        if (m_verboseLevel>5)
-        G4cout << " TILE_BARREL: samples A, BC, D are filled" << G4endl;
-        break;
-      }
-      case TileDddbManager::TILE_EBARREL: {
-        // Collect all cells for this section
-        // SAMPLE A
-        cellPrefix = "A";
-        for (j = 12; j < 17; j++) {
-          cellName = makeCellName (cellPrefix, j);
-          sectionCells.push_back(m_cellMap->operator[](cellName));
-        }
-
-        // SAMPLE B
-        cellPrefix = "B";
-        for (j = 11; j < 16; j++) {
-          cellName = makeCellName (cellPrefix, j);
-          sectionCells.push_back(m_cellMap->operator[](cellName));
-        }
-
-        // SAMPLE D
-        cellPrefix = "D";
-        for (j = 5; j < 7; j++) {
-          cellName = makeCellName (cellPrefix, j);
-          sectionCells.push_back(m_cellMap->operator[](cellName));
-        }
-        if (m_verboseLevel>5)
-        G4cout << " TILE_EBARREL: samples A, B, D are filled" << G4endl;
-        break;
       }
-      case TileDddbManager::TILE_PLUG1: {
-        // Collect all cells for this section
-        // Sample D
-        cellName = "D4";
+      cellPrefix = "Apos";
+      for (j = 1; j < 11; j++) {
+        cellName = makeCellName (cellPrefix, j);
         sectionCells.push_back(m_cellMap->operator[](cellName));
+      }
 
-        // filling PMT array for D4 Cells
-        MakeTileGeoG4npmtD4();
-        if (m_verboseLevel>5)
-        G4cout << " TILE_PLUG1: cell D4 is filled" << G4endl;
-        break;
+      //SAMPLE BC
+      cellPrefix = "BCneg";
+      for (j = 9; j > 0; j--) {
+        cellName = makeCellName (cellPrefix, j);
+        sectionCells.push_back(m_cellMap->operator[](cellName));
       }
-      case TileDddbManager::TILE_PLUG2: {
-        // Collect all cells for this section
-        // Sample C
-        cellName = "C10";
+      cellPrefix = "BCpos";
+      for (j = 1; j < 10; j++) {
+        cellName = makeCellName (cellPrefix, j);
         sectionCells.push_back(m_cellMap->operator[](cellName));
+      }
 
-        // filling PMT array for C10 Cells
-        MakeTileGeoG4npmtC10();
-        if (m_verboseLevel>5)
-        G4cout << " TILE_PLUG2: cell C10 is filled" << G4endl;
-        break;
+      //SAMPLE D
+      cellPrefix = "Dneg";
+      for (j = 3; j > 0; j--) {
+        cellName = makeCellName (cellPrefix, j);
+        sectionCells.push_back(m_cellMap->operator[](cellName));
       }
-      case TileDddbManager::TILE_PLUG3: {
-        // Collect all cells for this section
-        // Sample E
-        cellName = "E2";
+      cellName = "D0";
+      sectionCells.push_back(m_cellMap->operator[](cellName));
+      cellPrefix = "Dpos";
+      for (j = 1; j < 4; j++) {
+        cellName = makeCellName (cellPrefix, j);
         sectionCells.push_back(m_cellMap->operator[](cellName));
-        cellName = "E1";
+      }
+      if (m_verboseLevel>5)
+        G4cout << " TILE_BARREL: samples A, BC, D are filled" << G4endl;
+      break;
+    }
+    case TileDddbManager::TILE_EBARREL: {
+      // Collect all cells for this section
+      // SAMPLE A
+      cellPrefix = "A";
+      for (j = 12; j < 17; j++) {
+        cellName = makeCellName (cellPrefix, j);
         sectionCells.push_back(m_cellMap->operator[](cellName));
-        if (m_verboseLevel>5)
-        G4cout << " TILE_PLUG3: cells E2, E1 are filled" << G4endl;
-        break;
       }
-      case TileDddbManager::TILE_PLUG4: {
-        // Collect all cells for this section
-        // Sample E
-        cellName = "E4";
+
+      // SAMPLE B
+      cellPrefix = "B";
+      for (j = 11; j < 16; j++) {
+        cellName = makeCellName (cellPrefix, j);
         sectionCells.push_back(m_cellMap->operator[](cellName));
-        cellName = "E3";
+      }
+
+      // SAMPLE D
+      cellPrefix = "D";
+      for (j = 5; j < 7; j++) {
+        cellName = makeCellName (cellPrefix, j);
         sectionCells.push_back(m_cellMap->operator[](cellName));
-        if (m_verboseLevel>5)
+      }
+      if (m_verboseLevel>5)
+        G4cout << " TILE_EBARREL: samples A, B, D are filled" << G4endl;
+      break;
+    }
+    case TileDddbManager::TILE_PLUG1: {
+      // Collect all cells for this section
+      // Sample D
+      cellName = "D4";
+      sectionCells.push_back(m_cellMap->operator[](cellName));
+
+      // filling PMT array for D4 Cells
+      MakeTileGeoG4npmtD4();
+      if (m_verboseLevel>5)
+        G4cout << " TILE_PLUG1: cell D4 is filled" << G4endl;
+      break;
+    }
+    case TileDddbManager::TILE_PLUG2: {
+      // Collect all cells for this section
+      // Sample C
+      cellName = "C10";
+      sectionCells.push_back(m_cellMap->operator[](cellName));
+
+      // filling PMT array for C10 Cells
+      MakeTileGeoG4npmtC10();
+      if (m_verboseLevel>5)
+        G4cout << " TILE_PLUG2: cell C10 is filled" << G4endl;
+      break;
+    }
+    case TileDddbManager::TILE_PLUG3: {
+      // Collect all cells for this section
+      // Sample E
+      cellName = "E2";
+      sectionCells.push_back(m_cellMap->operator[](cellName));
+      cellName = "E1";
+      sectionCells.push_back(m_cellMap->operator[](cellName));
+      if (m_verboseLevel>5)
+        G4cout << " TILE_PLUG3: cells E2, E1 are filled" << G4endl;
+      break;
+    }
+    case TileDddbManager::TILE_PLUG4: {
+      // Collect all cells for this section
+      // Sample E
+      cellName = "E4";
+      sectionCells.push_back(m_cellMap->operator[](cellName));
+      cellName = "E3";
+      sectionCells.push_back(m_cellMap->operator[](cellName));
+      if (m_verboseLevel>5)
         G4cout << " TILE_PLUG4: cells E4, E3 are filled" << G4endl;
 
-        // filling PMT array for E4' Cells
-        MakeTileGeoG4npmtE5();
-        if (m_isE5) {
-          cellName = "E5";  //E4' cells
-          sectionCells.push_back(m_cellMap->operator[](cellName));
-          if (m_verboseLevel>5)
+      // filling PMT array for E4' Cells
+      MakeTileGeoG4npmtE5();
+      if (m_isE5) {
+        cellName = "E5";  //E4' cells
+        sectionCells.push_back(m_cellMap->operator[](cellName));
+        if (m_verboseLevel>5)
           G4cout << " TILE_PLUG4: special cells E5(E4') are filled" << G4endl;
-        }
-
-        break;
       }
-      default: { // Don't do anything
-        if (m_verboseLevel > 5)
+
+      break;
+    }
+    default: { // Don't do anything
+      if (m_verboseLevel > 5)
         G4cout << " counter=" << counter << "  key=" << key << "  Default: Don't do anything" << G4endl;
-        continue;
-      }
+      continue;
+    }
     }
 
     if (m_isE5 && key == 6)
-    m_dbManager->SetCurrentSection(key + 10);
+      m_dbManager->SetCurrentSection(key + 10);
     else
-    m_dbManager->SetCurrentSection(key);
+      m_dbManager->SetCurrentSection(key);
     section = new TileGeoG4Section(m_verboseLevel);
 
     section->nrOfModules = nModules;
@@ -484,11 +484,11 @@ void TileGeoG4LookupBuilder::CreateGeoG4Sections(bool is_tb) {
     section->nrOfScintillators = m_dbManager->TILBnscin();
 
     if (m_verboseLevel > 5)
-    G4cout << " counter=" << counter
-           << "  key=" << key
-           << "  nrOfModules=" << section->nrOfModules
-           << "  nrOfPeriods=" << section->nrOfPeriods
-           << "  nrOfScintillators=" << section->nrOfScintillators << G4endl;
+      G4cout << " counter=" << counter
+             << "  key=" << key
+             << "  nrOfModules=" << section->nrOfModules
+             << "  nrOfPeriods=" << section->nrOfPeriods
+             << "  nrOfScintillators=" << section->nrOfScintillators << G4endl;
 
     // iterate through all section cells and group them into samples
     cell = sectionCells[0];
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.cc b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.cc
index 56dd916f4e3c91c2c76ba8cdc698f37ab820d780..1fda319062a401efd42a5be44eef44c172e4b131 100755
--- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.cc
@@ -14,9 +14,9 @@
 //************************************************************
 
 // class header
-#include "TileGeoG4SD/TileGeoG4SD.hh"
+#include "TileGeoG4SD.hh"
 // package headers
-#include "TileGeoG4SD/TileGeoG4SDCalc.hh"
+#include "TileG4Interfaces/ITileCalculator.h"
 #include "TileGeoG4SD/TileGeoG4LookupBuilder.hh"
 #include "TileGeoG4SD/TileGeoG4Lookup.hh"
 // athena headers
@@ -24,23 +24,19 @@
 // Geant4 headers
 #include "G4Step.hh"
 
-TileGeoG4SD::TileGeoG4SD(G4String name, const std::string& hitCollectionName, const TileSDOptions opts)
-    : G4VSensitiveDetector(name),
-    m_options(opts),
-    m_HitColl(hitCollectionName)
+TileGeoG4SD::TileGeoG4SD(G4String name, const std::string& hitCollectionName, ITileCalculator* tileCalculator, const TileSDOptions opts)
+  : G4VSensitiveDetector(name)
+  , m_calc(tileCalculator)
+  , m_options(opts)
+  , m_HitColl(hitCollectionName)
 {
-  //Sensitive Detector initialisation for TileCal G4 simulations
-  m_calc = new TileGeoG4SDCalc(m_options);
-
   //build tilecal ordinary look-up table
-  m_lookup = m_calc->lookup;
+  m_lookup = m_calc->GetLookupBuilder();
   if (verboseLevel > 5)
     G4cout << "Lookup built for Tile" << G4endl;
 }
 
 TileGeoG4SD::~TileGeoG4SD() {
-  delete m_calc;
-  delete m_lookup;
 }
 
 void TileGeoG4SD::Initialize(G4HCofThisEvent* /*HCE*/) {
@@ -49,35 +45,36 @@ void TileGeoG4SD::Initialize(G4HCofThisEvent* /*HCE*/) {
 }
 
 G4bool TileGeoG4SD::ProcessHits(G4Step* aStep, G4TouchableHistory* /*ROhist*/) {
-  if (! (m_calc->FindTileScinSection(aStep))) { //Search for the tilecal sub-section, its module and some identifiers
+  TileHitData hitData;
+  if (! (m_calc->FindTileScinSection(aStep, hitData))) { //Search for the tilecal sub-section, its module and some identifiers
 
     if (verboseLevel > 5)
       G4cout << "ProcessHits: FindTileScinSection(aStep) is false!" << G4endl;
     return false;
   }
 
-  if ( !(m_calc->MakePmtEdepTime(aStep)) ) { //calculation of pmtID, edep and scin_Time with aStep (Sergey)
+  if ( !(m_calc->MakePmtEdepTime(aStep, hitData)) ) { //calculation of pmtID, edep and scin_Time with aStep (Sergey)
 
     if (verboseLevel > 10)
       G4cout << "ProcessHits: wrong pmtID_up,pmtID_down,edep_up,edep_down,"
-             << "scin_Time_up,scin_Time_down:\t" << m_calc->pmtID_up
-             << "\t" << m_calc->pmtID_down
-             << "\t" << m_calc->edep_up
-             << "\t" << m_calc->edep_down
-             << "\t" << m_calc->scin_Time_up
-             << "\t" << m_calc->scin_Time_down << G4endl;
+             << "scin_Time_up,scin_Time_down:\t" << hitData.pmtID_up
+             << "\t" << hitData.pmtID_down
+             << "\t" << hitData.edep_up
+             << "\t" << hitData.edep_down
+             << "\t" << hitData.scin_Time_up
+             << "\t" << hitData.scin_Time_down << G4endl;
     return false;
   }
 
-  if ( !(m_calc->ManageScintHit()) ) { //create or update hit object in the collection
+  if ( !(m_calc->ManageScintHit(hitData)) ) { //create or update hit object in the collection
 
     G4cout << "ProcessHits: TileHit can not be produced; pmtID_up,pmtID_down,edep_up,edep_down,"
-           << "scin_Time_up,scin_Time_down:\t" << m_calc->pmtID_up
-           << "\t" << m_calc->pmtID_down
-           << "\t" << m_calc->edep_up
-           << "\t" << m_calc->edep_down
-           << "\t" << m_calc->scin_Time_up
-           << "\t" << m_calc->scin_Time_down << G4endl;
+           << "scin_Time_up,scin_Time_down:\t" << hitData.pmtID_up
+           << "\t" << hitData.pmtID_down
+           << "\t" << hitData.edep_up
+           << "\t" << hitData.edep_down
+           << "\t" << hitData.scin_Time_up
+           << "\t" << hitData.scin_Time_down << G4endl;
     return false;
   }
 
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4SD.hh b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.hh
similarity index 54%
rename from TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4SD.hh
rename to TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.hh
index e405d6b657836865b25d6da886c31f6e665bad1a..1ed95b41c8170996865be27c99736c7f0afa9515 100755
--- a/TileCalorimeter/TileG4/TileGeoG4SD/TileGeoG4SD/TileGeoG4SD.hh
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SD.hh
@@ -24,7 +24,7 @@
 #include "StoreGate/WriteHandle.h"
 #include "TileSimEvent/TileHitVector.h"
 
-class TileGeoG4SDCalc;
+class ITileCalculator;
 class TileGeoG4LookupBuilder;
 
 class G4HCofThisEvent;
@@ -32,29 +32,29 @@ class G4Step;
 class G4String;
 
 class TileGeoG4SD: public G4VSensitiveDetector {
-  public:
-    TileGeoG4SD(G4String name, const std::string& hitCollectionName, const TileSDOptions opts);
-    ~TileGeoG4SD();
+public:
+  TileGeoG4SD(G4String name, const std::string& hitCollectionName, ITileCalculator* tileCalculator, const TileSDOptions opts);
+  ~TileGeoG4SD();
 
-    void Initialize(G4HCofThisEvent*) override final;
-    G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
-    void EndOfAthenaEvent();
+  void Initialize(G4HCofThisEvent*) override final;
+  G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
+  void EndOfAthenaEvent();
 
-    TileGeoG4SDCalc* GetCalculator() {
-      return m_calc;
-    }
+  ITileCalculator* GetCalculator() {
+    return m_calc;
+  }
 
-    // Don't leave copy constructors or assignment operators around
-    TileGeoG4SD(const TileGeoG4SD&) = delete;
-    TileGeoG4SD& operator=(const TileGeoG4SD&) = delete;
+  // Don't leave copy constructors or assignment operators around
+  TileGeoG4SD(const TileGeoG4SD&) = delete;
+  TileGeoG4SD& operator=(const TileGeoG4SD&) = delete;
 
-  private:
+private:
 
-    TileGeoG4SDCalc* m_calc;
-    TileGeoG4LookupBuilder* m_lookup;
-    const TileSDOptions m_options;
+  ITileCalculator* m_calc;
+  TileGeoG4LookupBuilder* m_lookup;
+  const TileSDOptions m_options;
 
-    SG::WriteHandle<TileHitVector> m_HitColl;
+  SG::WriteHandle<TileHitVector> m_HitColl;
 };
 
 #endif // TILEGEOG4SD_TILEGEOG4SD_H
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.cc b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.cc
index ef5c2fd8c4a40c4db3dede8bfe6e9f16e9dafbaf..d6564585f37a7af0e8980b00666425ec2f208527 100644
--- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.cc
@@ -17,11 +17,10 @@
 //************************************************************
 
 //class header
-#include "TileGeoG4SD/TileGeoG4SDCalc.hh"
+#include "TileGeoG4SDCalc.hh"
 //package headers
 #include "TileGeoG4SD/TileGeoG4LookupBuilder.hh"
 #include "TileGeoG4SD/TileGeoG4Lookup.hh"
-#include "TileGeoG4SD/TileGeoG4SD.hh"
 //Athena headers
 #include "CxxUtils/make_unique.h"
 #include "GeoModelInterfaces/IGeoModelSvc.h"
@@ -49,72 +48,61 @@
 #include <iostream>
 #include <string>
 #include <stdexcept>
+#include <memory>
 
-static const double tanPi64 = 0.049126849769467254105343321271314; //FIXME!!!!!
+namespace
+{
+  thread_local std::unique_ptr<TileGeoG4LookupBuilder> s_lookup(nullptr);
+}
 
-TileGeoG4SDCalc::TileGeoG4SDCalc(TileSDOptions opt)
-    : section(0),
-    cell(0),
-    nModule(0),
-    nDetector(0),
-    nTower(0),
-    nSample(0),
-    nSide(0),
-    pmtID_up(),
-    pmtID_down(),
-    edep_up(0),
-    edep_down(0),
-    scin_Time_up(0),
-    scin_Time_down(0),
-    m_options(opt),
-    m_nrOfPMT(0),
-    m_tileSize(0),
-    m_tilePeriod(0),
-    m_isNegative(0),
-    m_totalTimeUp(0),
-    m_totalTimeDown(0)
+static const double tanPi64 = 0.049126849769467254105343321271314; //FIXME!!!!!
 
+TileGeoG4SDCalc::TileGeoG4SDCalc(const std::string& name, ISvcLocator *pSvcLocator)
+  : AthService(name, pSvcLocator)
+  , m_detStore("DetectorStore",name)
+  , m_geoModSvc("GeoModelSvc",name)
 {
-  // Get MessageSvc pointers
-  ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap
+  declareProperty( "DetectorStore", m_detStore );
+  declareProperty( "GeoModelSvc", m_geoModSvc );
+  declareProperty( "DeltaTHit" , m_options.deltaTHit );
+  declareProperty( "TimeCut" , m_options.timeCut );
+  declareProperty( "TileTB" , m_options.tileTB );
+  declareProperty( "Ushape" , m_options.Ushape );
+  declareProperty( "DoBirk" , m_options.doBirk );
+  declareProperty( "DoTileRow" , m_options.doTileRow );
+  declareProperty( "DoTOFCorrection" , m_options.doTOFCorrection );
+}
+
+TileGeoG4SDCalc::~TileGeoG4SDCalc() {
+}
 
-  // Get DetectorStore pointers
-  if (svcLocator->service("DetectorStore", detStore).isFailure())
-    G4cout << "Unable to get pointer to DetectorStore Service" << G4endl;
-  else if (m_options.verboseLevel > 5)
-    G4cout << "DetectorStore Svc initialized." << G4endl;
+StatusCode TileGeoG4SDCalc::initialize() {
+
+  ATH_CHECK(m_detStore.retrieve());
+  ATH_MSG_DEBUG("DetectorStore Svc initialized.");
 
   // Retrieve TileID helper from DetectorStore
-  if (detStore->retrieve(m_tileID).isFailure())
-    G4cout << "Unable to retrieve TileID helper from DetectorStore" << G4endl;
-  else if (m_options.verboseLevel > 5)
-    G4cout << "TileID helper retrieved" << G4endl;
+  ATH_CHECK(m_detStore->retrieve(m_tileID));
+  ATH_MSG_VERBOSE("TileID helper retrieved");
 
   // Retrieve TileTBID helper from DetectorStore
-  if (detStore->retrieve(m_tileTBID).isFailure())
-    G4cout << "Unable to retrieve TileTBID helper from DetectorStore" << G4endl;
-  else if (m_options.verboseLevel > 5)
-    G4cout << "TileTBID helper retrieved" << G4endl;
-
-  IGeoModelSvc* geoModSvc;
-  if (svcLocator->service("GeoModelSvc", geoModSvc).isFailure())
-    G4cout << "GeoModelSvc not found!" << G4endl;
-  else if (m_options.verboseLevel > 5)
-    G4cout << "GeoModelSvc initialized." << G4endl;
+  ATH_CHECK(m_detStore->retrieve(m_tileTBID));
+  ATH_MSG_VERBOSE("TileTBID helper retrieved");
 
-  const TileDetectorTool* tileDetectorTool = dynamic_cast<const TileDetectorTool *>(geoModSvc->getTool(
-        "TileDetectorTool"));
+  ATH_CHECK(m_geoModSvc.retrieve());
+  ATH_MSG_VERBOSE("GeoModelSvc initialized.");
 
-  int UshapeFromGM = (tileDetectorTool) ? tileDetectorTool->Ushape() : 0;
+  const int UshapeFromGM = this->getUshapeFromGM();
 
   // Unpack TileG4SimOptions from DetectorStore
 
-  // Detemine time window for hit to be recorded
+  // Determine time window for hit to be recorded
   m_deltaT = m_options.deltaTHit[m_options.deltaTHit.size() - 1] * CLHEP::ns;
 
-  // Detemine variable time window for hit to be recorded
-  for (int i = m_options.deltaTHit.size() - 1; i > -1; --i)
+  // Determine variable time window for hit to be recorded
+  for (int i = m_options.deltaTHit.size() - 1; i > -1; --i) {
     m_options.deltaTHit[i] *= CLHEP::ns;
+  }
   // protection agaist wrong vector size
   if (m_options.deltaTHit.size() % 3 != 1 || m_deltaT <= 0.0) {
     m_options.deltaTHit.resize(1);
@@ -127,37 +115,35 @@ TileGeoG4SDCalc::TileGeoG4SDCalc(TileSDOptions opt)
   // Include or not tilecal optical model
   if (m_options.Ushape == -1) {
     m_options.Ushape = UshapeFromGM; // U-shape not set, take value from GeoModel
-    G4cout << "Using U-shape flag from GeoModel = "
-           << UshapeFromGM
-           << ( (m_options.Ushape > 0) ? "  Scintillator width is equal to width of master plate "
-                                       : "  Scintillator width is smaller than width of master plate ")
-    << G4endl;
+    ATH_MSG_INFO("Using U-shape flag from GeoModel = " << UshapeFromGM <<
+                 ( (m_options.Ushape > 0) ? "  Scintillator width is equal to width of master plate "
+                   : "  Scintillator width is smaller than width of master plate "));
   } else if (m_options.Ushape == UshapeFromGM) {
-    G4cout << "Using U-shape = " << m_options.Ushape
-           << ((m_options.Ushape > 0) ? "  Scintillator width is equal to width of master plate "
-                                      : "  Scintillator width is smaller than width of master plate ") << G4endl;
+    ATH_MSG_INFO("Using U-shape = " << m_options.Ushape <<
+                 ((m_options.Ushape > 0) ? "  Scintillator width is equal to width of master plate "
+                  : "  Scintillator width is smaller than width of master plate "));
   } else {
     if (UshapeFromGM > 0 && m_options.Ushape > 0) { // both are > 0, so it's fine to use value from SimOptions
-      G4cout << "Using U-shape from Simulation flags = " << m_options.Ushape
-             << "  Scintillator width is equal to width of master plate " << G4endl;
+      ATH_MSG_INFO("Using U-shape from Simulation flags = " << m_options.Ushape <<
+                   "  Scintillator width is equal to width of master plate ");
     } else if (UshapeFromGM == 0 && m_options.Ushape < -1) { // special case - negative value below -1
-      G4cout << "Using U-shape from Simulation flags = " << m_options.Ushape
-             << "  Scintillator width is smaller than width of master plate " << G4endl;
+      ATH_MSG_INFO("Using U-shape from Simulation flags = " << m_options.Ushape <<
+                   "  Scintillator width is smaller than width of master plate ");
     } else {
-      G4cout << "ERROR U-shape flag in GeoModel = " << UshapeFromGM << G4endl;
-      G4cout << "ERROR U-shape flag in Simulation = " << m_options.Ushape << G4endl;
-      G4cout << "Please, use correct GeoModel tag or make sure that you set both "
-             << "tileSimInfoConfigurator.Ushape and GeoModelSvc.DetectorTools[ \"TileDetectorTool\" ].Ushape to the same value"
-             << G4endl;
-      throw std::runtime_error( "Inconsistent U-shape parameters for TileCal" );
+      ATH_MSG_ERROR("U-shape flag in GeoModel = " << UshapeFromGM);
+      ATH_MSG_ERROR("U-shape flag in Simulation = " << m_options.Ushape);
+      ATH_MSG_ERROR("Please, use correct GeoModel tag or make sure that you set both " <<
+                    "tileSimInfoConfigurator.Ushape and GeoModelSvc.DetectorTools[ \"TileDetectorTool\" ].Ushape to the same value");
+      ATH_MSG_FATAL( "Inconsistent U-shape parameters for TileCal" );
+      return StatusCode::FAILURE;
     }
   }
   if (m_options.Ushape < -2) {
-    G4cout << "WARNING: Changing U-shape from " << m_options.Ushape << " to -2" << G4endl;
+    ATH_MSG_WARNING("Changing U-shape from " << m_options.Ushape << " to -2");
     m_options.Ushape = -2;
   }
   if (m_options.Ushape > 1 && m_options.Ushape < 10) {
-    G4cout << "WARNING: Changing U-shape from " << m_options.Ushape << " to 1" << G4endl;
+    ATH_MSG_WARNING("Changing U-shape from " << m_options.Ushape << " to 1");
     m_options.Ushape = 1;
   }
 
@@ -175,63 +161,86 @@ TileGeoG4SDCalc::TileGeoG4SDCalc(TileSDOptions opt)
     }
     G4cout << "and " << delta / CLHEP::ns << " ns outside this window" << G4endl;
   } else {
-    G4cout << "Using deltaTHit = " << m_deltaT / CLHEP::ns << " ns. " << G4endl;
+    ATH_MSG_INFO("Using deltaTHit = " << m_deltaT / CLHEP::ns << " ns. ");
+  }
+  ATH_MSG_INFO("Using timeCut = " << m_options.timeCut / CLHEP::ns << " ns. ");
+  ATH_MSG_INFO("Using doBirk = " << (m_options.doBirk ? "true" : "false"));
+  ATH_MSG_INFO("Using doTOFCorr = " << (m_options.doTOFCorrection ? "true" : "false"));
+  ATH_MSG_INFO("Using doTileRow = " << (m_options.doTileRow ? "true" : "false"));
+  ATH_MSG_INFO("Using doCalibHitParticleID = " << (m_options.doCalibHitParticleID ? "true" : "false"));
+
+  if (! (m_deltaT > 0.0)) {
+    ATH_MSG_WARNING("deltaT is not set, ignore hit time in ProcessHits()");
   }
-  G4cout << "Using timeCut = " << m_options.timeCut / CLHEP::ns << " ns. " << G4endl;
-  G4cout << "Using doBirk = " << (m_options.doBirk ? "true" : "false") << G4endl;
-  G4cout << "Using doTOFCorr = " << (m_options.doTOFCorrection ? "true" : "false") << G4endl;
-  G4cout << "Using doTileRow = " << (m_options.doTileRow ? "true" : "false") << G4endl;
-  G4cout << "Using doCalibHitParticleID = " << (m_options.doCalibHitParticleID ? "true" : "false") << G4endl;
-
-  if (! (m_deltaT > 0.0))
-    G4cout << "WARNING: deltaT is not set, ignore hit time in ProcessHits()" << G4endl;
 
   m_tileSizeDeltaT = 100000 * CLHEP::ns; // used for doTileRow
 
   if (m_options.timeCut > m_tileSizeDeltaT - m_deltaT) {
     m_options.timeCut = m_tileSizeDeltaT - m_deltaT;
-    G4cout << "WARNING: Reducing timeCut to " << m_options.timeCut / CLHEP::ns << " ns. " << G4endl;
+    ATH_MSG_WARNING("Reducing timeCut to " << m_options.timeCut / CLHEP::ns << " ns. ");
   } else if ( ! m_options.doTOFCorrection && m_options.timeCut < 1000*CLHEP::ns ) {
     // assuming that if TOF correction is disabled, then we are running cosmic simulation
     // and should not use too restrictive time cut
     m_options.timeCut = m_tileSizeDeltaT - m_deltaT;
-    G4cout << "WARNING: TOF correction is disabled, settting time cut to "
-           << m_options.timeCut / CLHEP::ns << " ns. " << G4endl;
+    ATH_MSG_WARNING("TOF correction is disabled, settting time cut to "
+                    << m_options.timeCut / CLHEP::ns << " ns. ");
   }
 
   m_lateHitTime = m_tileSizeDeltaT - m_deltaT;
-  G4cout << "All hits with time above " << m_options.timeCut / CLHEP::ns << " ns will be stored with time = "
-         << m_lateHitTime / CLHEP::ns << " ns." << G4endl;
+  ATH_MSG_INFO("All hits with time above " << m_options.timeCut / CLHEP::ns << " ns will be stored with time = "
+               << m_lateHitTime / CLHEP::ns << " ns.");
 
   // Read attenuation lengths from file and store them in tilerow
   // Variables to divide deposited energy in scintillators for Up and Down PMTs
   if (m_options.Ushape == -2) {
-    std::string attFileName = "TileAttenuation.dat";
-    std::string ratioFileName = "TileOpticalRatio.dat";
+    static const std::string attFileName = "TileAttenuation.dat";
+    static const std::string ratioFileName = "TileOpticalRatio.dat";
     std::string attFile = PathResolver::find_file(attFileName, "DATAPATH");
     std::string ratioFile = PathResolver::find_file(ratioFileName, "DATAPATH");
     m_row = CxxUtils::make_unique<TileRow>(attFile, ratioFile); //holds attenuation lengths for tiles
-    G4cout << "Using Optical Ratio = " << m_row->OpticalRatio[0].at(0) << G4endl;
+    ATH_MSG_INFO("Using Optical Ratio = " << m_row->OpticalRatio[0].at(0));
   }
 
-  //build tilecal ordinary look-up table
-  lookup = new TileGeoG4LookupBuilder(detStore, m_options.verboseLevel);
-  lookup->BuildLookup(opt.tileTB);
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TileGeoG4SDCalc::queryInterface(const InterfaceID& riid, void** ppvInterface)
+{
+  if ( ITileCalculator::interfaceID().versionMatch(riid) ) {
+    *ppvInterface = dynamic_cast<ITileCalculator*>(this);
+    addRef();
+    return StatusCode::SUCCESS;
+  }
+  // Interface is not directly available : try out a base class
+  return AthService::queryInterface(riid, ppvInterface);
+}
 
+int TileGeoG4SDCalc::getUshapeFromGM() const {
+  const TileDetectorTool* tileDetectorTool =
+    dynamic_cast<const TileDetectorTool *>(m_geoModSvc->getTool("TileDetectorTool"));
+  return (tileDetectorTool) ? tileDetectorTool->Ushape() : 0;
 }
 
-TileGeoG4SDCalc::~TileGeoG4SDCalc() {
-  delete lookup;
+TileGeoG4LookupBuilder* TileGeoG4SDCalc::GetLookupBuilder() const
+{
+  // Setup the lookup table if necessary
+  if(!s_lookup) {
+    s_lookup = std::make_unique<TileGeoG4LookupBuilder>(&*m_detStore, m_options.verboseLevel);
+    s_lookup->BuildLookup(m_options.tileTB);
+  }
+  return s_lookup.get();
 }
 
-G4bool TileGeoG4SDCalc::FindTileScinSection(const G4Step* aStep) {
-  if (m_options.verboseLevel > 10)
-    G4cout << "Process Hits" << G4endl;
+G4bool TileGeoG4SDCalc::FindTileScinSection(const G4Step* aStep, TileHitData& hitData) const
+{
+  ATH_MSG_VERBOSE("Process Hits");
+
+  // Get the lookup table
+  auto lookup = GetLookupBuilder();
 
-  G4double edep = aStep->GetTotalEnergyDeposit();
+  const G4double edep = aStep->GetTotalEnergyDeposit();
   if (edep == 0. && aStep->GetTrack()->GetDefinition() != G4Geantino::GeantinoDefinition()) {
-    if (m_options.verboseLevel > 10)
-      G4cout << "Edep=0" << G4endl;
+    ATH_MSG_VERBOSE("Edep=0");
     return false;
   }
 
@@ -245,94 +254,105 @@ G4bool TileGeoG4SDCalc::FindTileScinSection(const G4Step* aStep) {
   for (int i = 0; i < level; i++) {
     G4VPhysicalVolume* pv = theTouchable->GetVolume(i);
     G4LogicalVolume* lv = pv->GetLogicalVolume();
-    if (m_options.verboseLevel > 10)
-      G4cout << " Level--> " << i
-             << ", LogVol--> " << (lv->GetName()).c_str()
-             << ", PhysVol--> " << (pv->GetName()).c_str() << G4endl;
+    ATH_MSG_VERBOSE(" Level--> " << i <<
+                    ", LogVol--> " << (lv->GetName()).c_str() <<
+                    ", PhysVol--> " << (pv->GetName()).c_str());
   }
 
   // Find envelope of TileCal
   G4String nameLogiVol = theTouchable->GetVolume(level - 1)->GetLogicalVolume()->GetName();
-  while (nameLogiVol.find("Tile") == G4String::npos) {
+  static const G4String tileVolumeString("Tile");
+  while (nameLogiVol.find(tileVolumeString) == G4String::npos) {
     level--;
     nameLogiVol = theTouchable->GetVolume(level - 1)->GetLogicalVolume()->GetName();
   }
-  if (m_options.verboseLevel > 10)
-    G4cout << "Tile volume level --->" << level << G4endl;
+  ATH_MSG_VERBOSE("Tile volume level --->" << level);
 
   level--;  // Move to the level of sections Barrel, EBarrelPos, EBarrelNeg, Gap etc...
 
   // Check whether we have multiple tree tops in DD
   // If this is the case, move one level down
   nameLogiVol = theTouchable->GetVolume(level - 1)->GetLogicalVolume()->GetName();
-  if (nameLogiVol.find("CentralBarrel") != G4String::npos ||
-      nameLogiVol.find("EndcapPos") != G4String::npos ||
-      nameLogiVol.find("EndcapNeg") != G4String::npos )
+  static const G4String cenBarrelVolumeString("CentralBarrel");
+  static const G4String endcapPosVolumeString("EndcapPos");
+  static const G4String endcapNegVolumeString("EndcapNeg");
+  if (nameLogiVol.find(cenBarrelVolumeString) != G4String::npos ||
+      nameLogiVol.find(endcapPosVolumeString) != G4String::npos ||
+      nameLogiVol.find(endcapNegVolumeString) != G4String::npos ) {
     level--;
+  }
 
   // Determine physical volume for the step
-  G4VPhysicalVolume* physSection = theTouchable->GetVolume(level - 1);
-  G4String namePhysSection = physSection->GetName();
+  const G4VPhysicalVolume* physSection = theTouchable->GetVolume(level - 1);
+  const G4String namePhysSection = physSection->GetName();
 
   // Check current TileSectionDescription
+  static const G4String ebarrelVolumeString("EBarrel");
+  static const G4String barrelVolumeString("Barrel");
+  static const G4String itcVolumeString("ITC");
+  static const G4String gapVolumeString("Gap");
+  static const G4String crackVolumeString("Crack");
   int sect = 0;
-  if (namePhysSection.find("EBarrel") != G4String::npos) {
-    section = lookup->GetSection(TileDddbManager::TILE_EBARREL);
-    nDetector = 2;
+  if (namePhysSection.find(ebarrelVolumeString) != G4String::npos) {
+    hitData.section = lookup->GetSection(TileDddbManager::TILE_EBARREL);
+    hitData.nDetector = 2;
     sect = 2;
-  } else if (namePhysSection.find("Barrel") != G4String::npos) {
-    section = lookup->GetSection(TileDddbManager::TILE_BARREL);
-    nDetector = 1;
+  } else if (namePhysSection.find(barrelVolumeString) != G4String::npos) {
+    hitData.section = lookup->GetSection(TileDddbManager::TILE_BARREL);
+    hitData.nDetector = 1;
     sect = 1;
-  } else if (namePhysSection.find("ITC") != G4String::npos) {
-    nDetector = 3;
-    G4String namePlug = theTouchable->GetVolume(level - 3)->GetName();
-    if (namePlug.find("Plug1") != G4String::npos) {
-      section = lookup->GetSection(TileDddbManager::TILE_PLUG1);
+  } else if (namePhysSection.find(itcVolumeString) != G4String::npos) {
+    hitData.nDetector = 3;
+    static const G4String plug1VolumeString("Plug1");
+    const G4String namePlug = theTouchable->GetVolume(level - 3)->GetName();
+    if (namePlug.find(plug1VolumeString) != G4String::npos) {
+      hitData.section = lookup->GetSection(TileDddbManager::TILE_PLUG1);
       sect = 3;
     } else {
-      section = lookup->GetSection(TileDddbManager::TILE_PLUG2);
+      hitData.section = lookup->GetSection(TileDddbManager::TILE_PLUG2);
       sect = 4;
     }
-  } else if (namePhysSection.find("Gap") != G4String::npos) {
-    section = lookup->GetSection(TileDddbManager::TILE_PLUG3);
-    nDetector = 3;
+  } else if (namePhysSection.find(gapVolumeString) != G4String::npos) {
+    hitData.section = lookup->GetSection(TileDddbManager::TILE_PLUG3);
+    hitData.nDetector = 3;
     sect = 5;
-  } else if (namePhysSection.find("Crack") != G4String::npos) {
-    section = lookup->GetSection(TileDddbManager::TILE_PLUG4);
-    nDetector = 3;
+  } else if (namePhysSection.find(crackVolumeString) != G4String::npos) {
+    hitData.section = lookup->GetSection(TileDddbManager::TILE_PLUG4);
+    hitData.nDetector = 3;
     sect = 6;
   } else {
-    G4cout << "FATAL: Wrong name for tile scin section --> " << namePhysSection.c_str() << G4endl;
+    ATH_MSG_FATAL("Wrong name for tile scin section --> " << namePhysSection.c_str());
     return false;
   }
 
   // Check the copy number of the module (1-64)
-  // nModule = theTouchable->GetVolume(level-2)->GetCopyNo();
-  nModule = theTouchable->GetReplicaNumber(level - 2);
+  // hitData.nModule = theTouchable->GetVolume(level-2)->GetCopyNo();
+  hitData.nModule = theTouchable->GetReplicaNumber(level - 2);
   if (theTouchable->GetVolume(level - 2)->IsReplicated())
-    nModule++;
-  if (nModule > section->nrOfModules) {
-    G4cout << "FATAL: Wrong module index -->" << nModule << G4endl;
+    hitData.nModule++;
+  if (hitData.nModule > hitData.section->nrOfModules) {
+    ATH_MSG_FATAL("Wrong module index -->" << hitData.nModule);
     return false;
   }
 
   // Check the side
-  nSide = 1;
-  m_isNegative = false;
-  if ((namePhysSection.find("Barrel") != G4String::npos) &&
-    (namePhysSection.find("EBarrel") == G4String::npos) ) {}
+  hitData.nSide = 1;
+  hitData.isNegative = false;
+  static const G4String eBarrelVolumeString("EBarrel");
+  if ((namePhysSection.find(barrelVolumeString) != G4String::npos) &&
+      (namePhysSection.find(eBarrelVolumeString) == G4String::npos) ) {}
   else {
-    if (namePhysSection.find("Neg") != G4String::npos) {
-      nSide = -1;
-      m_isNegative = true;
+    static const G4String negVolumeString("Neg");
+    if (namePhysSection.find(negVolumeString) != G4String::npos) {
+      hitData.nSide = -1;
+      hitData.isNegative = true;
     }
   }
 
   // Get the number of scintillator inside module 0 - ...
-  G4VPhysicalVolume* physVol = theTouchable->GetVolume();
-  m_tileSize = physVol->GetCopyNo();
-  m_tilePeriod = theTouchable->GetReplicaNumber(2);
+  const G4VPhysicalVolume* physVol = theTouchable->GetVolume();
+  hitData.tileSize = physVol->GetCopyNo();
+  hitData.tilePeriod = theTouchable->GetReplicaNumber(2);
 
   // 1. Move to period volume check if it's replicated and take the replica number
   //    If the period is not replicated that means we are in the second Absorber Child
@@ -344,85 +364,89 @@ G4bool TileGeoG4SDCalc::FindTileScinSection(const G4Step* aStep) {
   // else
   // tileperiod = _section->nrOfPeriods - 1;
 
-  if (m_options.verboseLevel > 10) {
-    G4cout << "Section number: " << sect*nSide << G4endl;
-    G4cout << "Module number:  " << nModule << G4endl;
-    G4cout << "Period number:  " << m_tilePeriod << G4endl;
-    G4cout << "Scin Copy No:   " << m_tileSize << G4endl;
-  }
+  ATH_MSG_VERBOSE("Section number: " << sect*hitData.nSide);
+  ATH_MSG_VERBOSE("Module number:  " << hitData.nModule);
+  ATH_MSG_VERBOSE("Period number:  " << hitData.tilePeriod);
+  ATH_MSG_VERBOSE("Scin Copy No:   " << hitData.tileSize);
 
-  int nScin = m_tilePeriod * section->nrOfScintillators + m_tileSize;
-  cell = section->ScinToCell(nScin);
-  if (!cell) {
-    G4cout << "ERROR: Zero pointer to current cell, nScin=" << nScin << G4endl;
-    section->PrintScinToCell("ERROR in _cell");
+  int nScin = hitData.tilePeriod * hitData.section->nrOfScintillators + hitData.tileSize;
+  hitData.cell = hitData.section->ScinToCell(nScin);
+  if (!hitData.cell) {
+    ATH_MSG_ERROR("Zero pointer to current cell, nScin=" << nScin);
+    hitData.section->PrintScinToCell("ERROR in _cell");
     return false;
   }
 
-  m_nrOfPMT = cell->nrOfPMT;
-  if (m_options.verboseLevel > 10)
-    G4cout << "Number of PMTs: " << m_nrOfPMT << G4endl;
+  hitData.nrOfPMT = hitData.cell->nrOfPMT;
+  ATH_MSG_VERBOSE("Number of PMTs: " << hitData.nrOfPMT);
 
   // Attach special D4 cell to cell D5 in ext.barrel
   if (sect == 3) {
-    if ( lookup->TileGeoG4npmtD4(std::max(0, nSide), nModule - 1) == 0 ) {
-      section = lookup->GetSection(TileDddbManager::TILE_EBARREL);
-      nDetector = 2;  //ext.barrel
-      m_tileSize += 9;
-      nScin = m_tileSize; //last tile row in first period
-      cell = section->ScinToCell(nScin);
+    if ( lookup->TileGeoG4npmtD4(std::max(0, hitData.nSide), hitData.nModule - 1) == 0 ) {
+      hitData.section = lookup->GetSection(TileDddbManager::TILE_EBARREL);
+      hitData.nDetector = 2;  //ext.barrel
+      hitData.tileSize += 9;
+      nScin = hitData.tileSize; //last tile row in first period
+      hitData.cell = hitData.section->ScinToCell(nScin);
       if (m_options.verboseLevel > 10) {
         char nm[5] = {'X', 'A', 'B', 'D', 'E'};
         G4cout << "Disabling special D4, all energy goes to cell "
-        << nm[cell->sample] << cell->cellNum << G4endl;
+               << nm[hitData.cell->sample] << hitData.cell->cellNum << G4endl;
       }
     }
   } else if (sect == 4) {
     // Change number of PMTs in Special C10 Cells
-    m_nrOfPMT = lookup->TileGeoG4npmtC10(std::max(0, nSide), nModule - 1);
-    if (m_options.verboseLevel > 10 && m_nrOfPMT != 2) {
-      G4cout << "Changing number of PMTs in special C10 to " << m_nrOfPMT << G4endl;
+    hitData.nrOfPMT = lookup->TileGeoG4npmtC10(std::max(0, hitData.nSide), hitData.nModule - 1);
+    if (m_options.verboseLevel > 10 && hitData.nrOfPMT != 2) {
+      G4cout << "Changing number of PMTs in special C10 to " << hitData.nrOfPMT << G4endl;
     }
-  } else if (sect == 6 && cell->tower > 16) {
+  } else if (sect == 6 && hitData.cell->tower > 16) {
     // Check number of PMTs in Special E4' Cells (side C, modules 32,33)
-    m_nrOfPMT = lookup->TileGeoG4npmtE5(std::max(0, nSide), nModule - 1);
-    if (m_nrOfPMT != cell->nrOfPMT) {
-      G4cout << "WARNING: Changing number of PMTs in special E4' from " << cell->nrOfPMT << " to " << m_nrOfPMT << G4endl;
+    hitData.nrOfPMT = lookup->TileGeoG4npmtE5(std::max(0, hitData.nSide), hitData.nModule - 1);
+    if (hitData.nrOfPMT != hitData.cell->nrOfPMT) {
+      ATH_MSG_WARNING("Changing number of PMTs in special E4' from " << hitData.cell->nrOfPMT << " to " << hitData.nrOfPMT);
     }
   }
 
   // Determine tower and sample
-  nTower = cell->tower;
-  if (nTower < 0)
-    nTower *= -1;
-  nSample = cell->sample;
+  hitData.nTower = hitData.cell->tower;
+  if (hitData.nTower < 0) {
+    hitData.nTower *= -1;
+  }
+  hitData.nSample = hitData.cell->sample;
 
   // If that's central barrel then determine the side
-  if ((nDetector == 1) && (cell->cellNum < 0))
-    nSide = -1;
+  if ((hitData.nDetector == 1) && (hitData.cell->cellNum < 0)) {
+    hitData.nSide = -1;
+  }
 
   return true;
 }
 
-G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep) {
-  if (m_nrOfPMT == 0)
+G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep, TileHitData& hitData) const
+{
+  if (hitData.nrOfPMT == 0) {
     return false;
+  }
 
-  bool isE5 = (nTower > 16);  //special E5(E4') cells in EBC (should be in negative side only)
+  const bool isE5 = (hitData.nTower > 16);  //special E5(E4') cells in EBC (should be in negative side only)
 
   // Take into account Birk's saturation law in organic scintillators.
-  G4double edep;
-  if (m_options.doBirk)
-    edep = BirkLaw(aStep);
-  else
-    edep = aStep->GetTotalEnergyDeposit();
+  // G4double edep;
+  // if (m_options.doBirk)
+  //   edep = BirkLaw(aStep);
+  // else
+  //   edep = aStep->GetTotalEnergyDeposit();
+  const G4double edep = (m_options.doBirk) ? this->BirkLaw(aStep) : aStep->GetTotalEnergyDeposit();
 
-  double deltaT_up = 0, deltaT_down = 0;
-  double ref_ind_tile = 1.59, ref_ind_fiber = 1.59;  //refraction indexes of tiles and fibers
+  double deltaT_up = 0;
+  double deltaT_down = 0;
+  const double ref_ind_tile = 1.59;
+  const double ref_ind_fiber = 1.59;  //refraction indexes of tiles and fibers
 
-  G4TouchableHistory* theTouchable = (G4TouchableHistory*) (aStep->GetPreStepPoint()->GetTouchable());
-  G4VPhysicalVolume* physVol = theTouchable->GetVolume();
-  G4LogicalVolume* logiVol = physVol->GetLogicalVolume();
+  const G4TouchableHistory* theTouchable = (G4TouchableHistory*) (aStep->GetPreStepPoint()->GetTouchable());
+  const G4VPhysicalVolume* physVol = theTouchable->GetVolume();
+  const G4LogicalVolume* logiVol = physVol->GetLogicalVolume();
 
   G4Trd* scinSolid = dynamic_cast<G4Trd*>(logiVol->GetSolid());
   G4SubtractionSolid* booleanScin = dynamic_cast<G4SubtractionSolid*>(logiVol->GetSolid());
@@ -432,12 +456,12 @@ G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep) {
   G4ThreeVector localCoord = theTouchable->GetHistory()->GetTopTransform().TransformPoint(prestepPos);
   G4double yLocal = localCoord.y();
   G4double zLocal = localCoord.z();
-  if (nDetector == 1 || nSide > 0)
+  if (hitData.nDetector == 1 || hitData.nSide > 0)
     yLocal *= -1;  // LBA,LBC,EBA have yLocal inverse to the EBC one
 
-  if (scinSolid != 0 || booleanScin != 0) {
-    if (booleanScin != 0) {
-      scinSolid = 0;
+  if (scinSolid || booleanScin) {
+    if (booleanScin) {
+      scinSolid = nullptr;
       // The first step inside boolean solid
       G4VSolid* solid1 = booleanScin->GetConstituentSolid(0);
 
@@ -451,13 +475,13 @@ G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep) {
       scinSolid = dynamic_cast<G4Trd*>(solid1);
     }
 
-    if (scinSolid == 0) {  //----    error ----
-      G4cout << "FATAL !!! Scintillator solid is not G4TRD!" << G4endl;
+    if (!scinSolid) {  //----    error ----
+      ATH_MSG_FATAL("Scintillator solid is not G4TRD!");
       return false;
     }
 
     // Divide edep for Up and Down
-    if (m_nrOfPMT == 2) {
+    if (hitData.nrOfPMT == 2) {
       // Scintillator dimensions
       G4double dy1Scin = scinSolid->GetYHalfLength1();
       G4double dy2Scin = scinSolid->GetYHalfLength2();
@@ -472,105 +496,103 @@ G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep) {
 
       if (isE5) { //special E5(E4') cells in EBC (negative)
         if (yLocal >= 0.) {
-          edep_up = edep;
-          edep_down = 0.;
+          hitData.edep_up = edep;
+          hitData.edep_down = 0.;
         } else {
-          edep_up = 0.;
-          edep_down = edep;
+          hitData.edep_up = 0.;
+          hitData.edep_down = edep;
         }
       } else {
         switch (m_options.Ushape) {
 
-          case 1:  // using the best U-shape known up to now (see #define in header file)
-            edep_up = edep * Tile_1D_profile(m_tileSize, yLocal, zLocal, 1, nDetector, nSide);
-            edep_down = edep * Tile_1D_profile(m_tileSize, yLocal, zLocal, 0, nDetector, nSide);
-            break;
-
-          case 0:  // the same as default case below (i.e. no ushape at all)
-            edep_up = edep * (0.3 + 0.2 * dy1Local / halfYLocal);
-            edep_down = edep - edep_up;
-            break;
-
-          case 14:
-            edep_up = edep * Tile_1D_profileRescaled(m_tileSize, yLocal, zLocal, 1, nDetector, nSide);
-            edep_down = edep * Tile_1D_profileRescaled(m_tileSize, yLocal, zLocal, 0, nDetector, nSide);
-            break;
-
-          case 20:
-          case 21:
-          case 22:
-          case 23:
-            edep_up = edep * Tile_1D_profileRescaled_zeroBins(m_tileSize, yLocal, zLocal, 1, nDetector, nSide,
-                                                         m_options.Ushape - 20);
-            edep_down = edep * Tile_1D_profileRescaled_zeroBins(m_tileSize, yLocal, zLocal, 0, nDetector, nSide,
-                                                           m_options.Ushape - 20);
-            break;
-
-          case 13:
-            edep_up = edep * Tile_1D_profileFunc(m_tileSize, yLocal, zLocal, 1, nDetector, nSide);
-            edep_down = edep * Tile_1D_profileFunc(m_tileSize, yLocal, zLocal, 0, nDetector, nSide);
-            break;
-
-          case 12:
-            edep_up = edep * Tile_1D_profileSym(m_tileSize, yLocal, zLocal, 1, nDetector, nSide);
-            edep_down = edep * Tile_1D_profileSym(m_tileSize, yLocal, zLocal, 0, nDetector, nSide);
-            break;
-
-          case 11:
-            edep_up = edep * Tile_1D_profileAsym(m_tileSize, yLocal, zLocal, 1, nDetector, nSide);
-            edep_down = edep * Tile_1D_profileAsym(m_tileSize, yLocal, zLocal, 0, nDetector, nSide);
-            break;
-
-          case - 2: {
-              int ind = nDetector - 1;
-              if (1 == nDetector && 2 == nSample && 9 == nTower) { // read info about B-9 from ITC vector
-                ind = 2;                                          // because barrel vector contains info for
-              }                                                     // BC cells only (average over 6 rows)
-              double Izero = m_row->OpticalRatio[ind].at(m_tileSize);
-              double AttenuationLength = m_row->attLen[ind].at(m_tileSize);
-              if (m_options.verboseLevel > 10) {
-                G4cout << "Izero = " << Izero << G4endl;
-                G4cout << "Tile Row = " << m_tileSize << G4endl;
-                G4cout << "Attenuation Length = " << AttenuationLength << G4endl;
-              }
-              edep_up = edep * exp( -dy2Local / AttenuationLength) / Izero;
-              edep_down = edep * exp( -dy1Local / AttenuationLength) / Izero;
-              break;
-            }
-
-          default:
-            edep_up = edep * (0.3 + 0.2 * dy1Local / halfYLocal);
-            edep_down = edep - edep_up;
+        case 1:  // using the best U-shape known up to now (see #define in header file)
+          hitData.edep_up = edep * Tile_1D_profile(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide);
+          hitData.edep_down = edep * Tile_1D_profile(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide);
+          break;
+
+        case 0:  // the same as default case below (i.e. no ushape at all)
+          hitData.edep_up = edep * (0.3 + 0.2 * dy1Local / halfYLocal);
+          hitData.edep_down = edep - hitData.edep_up;
+          break;
+
+        case 14:
+          hitData.edep_up = edep * Tile_1D_profileRescaled(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide);
+          hitData.edep_down = edep * Tile_1D_profileRescaled(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide);
+          break;
+
+        case 20:
+        case 21:
+        case 22:
+        case 23:
+          hitData.edep_up = edep * Tile_1D_profileRescaled_zeroBins(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide,
+                                                                    m_options.Ushape - 20);
+          hitData.edep_down = edep * Tile_1D_profileRescaled_zeroBins(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide,
+                                                                      m_options.Ushape - 20);
+          break;
+
+        case 13:
+          hitData.edep_up = edep * Tile_1D_profileFunc(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide);
+          hitData.edep_down = edep * Tile_1D_profileFunc(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide);
+          break;
+
+        case 12:
+          hitData.edep_up = edep * Tile_1D_profileSym(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide);
+          hitData.edep_down = edep * Tile_1D_profileSym(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide);
+          break;
+
+        case 11:
+          hitData.edep_up = edep * Tile_1D_profileAsym(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide);
+          hitData.edep_down = edep * Tile_1D_profileAsym(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide);
+          break;
+
+        case - 2: {
+          int ind = hitData.nDetector - 1;
+          if (1 == hitData.nDetector && 2 == hitData.nSample && 9 == hitData.nTower) { // read info about B-9 from ITC vector
+            ind = 2;                                          // because barrel vector contains info for
+          }                                                     // BC cells only (average over 6 rows)
+          const double Izero = m_row->OpticalRatio[ind].at(hitData.tileSize);
+          const double AttenuationLength = m_row->attLen[ind].at(hitData.tileSize);
+          ATH_MSG_VERBOSE("Izero = " << Izero);
+          ATH_MSG_VERBOSE("Tile Row = " << hitData.tileSize);
+          ATH_MSG_VERBOSE("Attenuation Length = " << AttenuationLength);
+          hitData.edep_up = edep * exp( -dy2Local / AttenuationLength) / Izero;
+          hitData.edep_down = edep * exp( -dy1Local / AttenuationLength) / Izero;
+          break;
+        }
+
+        default:
+          hitData.edep_up = edep * (0.3 + 0.2 * dy1Local / halfYLocal);
+          hitData.edep_down = edep - hitData.edep_up;
         }
 
       }
 
-      deltaT_up = ref_ind_tile * (dy2Local - (cell->r * tanPi64)) / CLHEP::c_light;
-      deltaT_down = ref_ind_tile * (dy1Local - (cell->r * tanPi64)) / CLHEP::c_light;
+      deltaT_up = ref_ind_tile * (dy2Local - (hitData.cell->r * tanPi64)) / CLHEP::c_light;
+      deltaT_down = ref_ind_tile * (dy1Local - (hitData.cell->r * tanPi64)) / CLHEP::c_light;
 
     }
   } else {
-    G4cout << "FATAL !!! Scintillator solid is not G4TRD! or it is not Boolean Solid!" << G4endl;
+    ATH_MSG_FATAL("Scintillator solid is not G4TRD! or it is not Boolean Solid!");
     return false;
   }
 
   G4double totalTime = aStep->GetPostStepPoint()->GetGlobalTime();  //added by Mike
 
   if (m_deltaT > 0.0) {
-    G4ThreeVector position = aStep->GetPostStepPoint()->GetPosition();  //position of the hit
-    double cosTh_hit = position.cosTheta();
-    double magn_hit = position.mag();
-    double r_hit = position.perp();  //hit radius r = sqrt(x*x + y*y)
+    const G4ThreeVector position = aStep->GetPostStepPoint()->GetPosition();  //position of the hit
+    const double cosTh_hit = position.cosTheta();
+    const double magn_hit = position.mag();
+    const double r_hit = position.perp();  //hit radius r = sqrt(x*x + y*y)
     double correction(0.0);
 
     if (m_options.doTOFCorrection) {
-      correction = (cell->r * (1.0 * ref_ind_fiber - 2.0 / cell->sinTh)
+      correction = (hitData.cell->r * (1.0 * ref_ind_fiber - 2.0 / hitData.cell->sinTh)
                     + magn_hit * (1.0 - ref_ind_fiber * sqrt(1.0 - cosTh_hit * cosTh_hit)))
-                   / CLHEP::c_light;
+        / CLHEP::c_light;
       //now it is time with correction due to fiber length.
       //additional term "-1/_cell->sinTh" is distance to cell's center (TOF correction)
     } else {
-      correction = (cell->r - r_hit) * ref_ind_fiber / CLHEP::c_light;
+      correction = (hitData.cell->r - r_hit) * ref_ind_fiber / CLHEP::c_light;
     }
     totalTime += correction;
 
@@ -579,11 +601,11 @@ G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep) {
       G4cout << "Global time " << totalTime - correction << G4endl;
 
       if (m_options.doTOFCorrection) {
-        G4cout << " distance to ATLAS center " << cell->r / cell->sinTh / CLHEP::c_light << " ns" << G4endl;
+        G4cout << " distance to ATLAS center " << hitData.cell->r / hitData.cell->sinTh / CLHEP::c_light << " ns" << G4endl;
         G4cout << " correction " << correction << G4endl;
         G4cout << " after TOF correction " << totalTime << G4endl;
       } else {
-        G4cout << " distance to cell center " << (cell->r - r_hit) << G4endl;
+        G4cout << " distance to cell center " << (hitData.cell->r - r_hit) << G4endl;
         G4cout << " correction " << correction << G4endl;
         G4cout << " after cell time correction " << totalTime << G4endl;
       }
@@ -595,32 +617,32 @@ G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep) {
              << ", " << yLocal << G4endl;
 
       G4cout << " and cell:    magn, r, cosTh, Ycell/2 "
-             << cell->r / cell->sinTh
-             << ", " << cell->r << ", "
-             << sqrt(1 - cell->sinTh * cell->sinTh) << ", " << cell->r * tanPi64 << G4endl;
+             << hitData.cell->r / hitData.cell->sinTh
+             << ", " << hitData.cell->r << ", "
+             << sqrt(1 - hitData.cell->sinTh * hitData.cell->sinTh) << ", " << hitData.cell->r * tanPi64 << G4endl;
 
       if (totalTime != 0.0) {
         G4cout << "---- CELL INFO ----" << G4endl;
-        G4cout << "Detector >> " << cell->detector << G4endl;
-        G4cout << "CellNum  >> " << cell->cellNum << G4endl;
-        G4cout << "Tower    >> " << cell->tower << G4endl;
-        G4cout << "Sample   >> " << cell->sample << G4endl;
+        G4cout << "Detector >> " << hitData.cell->detector << G4endl;
+        G4cout << "CellNum  >> " << hitData.cell->cellNum << G4endl;
+        G4cout << "Tower    >> " << hitData.cell->tower << G4endl;
+        G4cout << "Sample   >> " << hitData.cell->sample << G4endl;
         G4cout << "---- CELL INFO ----" << G4endl;
 
         G4cout << "---- HIT INFO ----" << G4endl;
-        G4cout << "Detector >> " << nDetector << G4endl;
-        G4cout << "Side     >> " << nSide << G4endl;
+        G4cout << "Detector >> " << hitData.nDetector << G4endl;
+        G4cout << "Side     >> " << hitData.nSide << G4endl;
         if (isE5) {
-          G4cout << "Module-1 >> " << nModule - 1 << ((yLocal >= 0.0) ? " Up" : " Down") << G4endl;
-          G4cout << "Phi ind  >> " << (nModule - 32)*2 + ((yLocal >= 0.0) ? 1 : 0);
+          G4cout << "Module-1 >> " << hitData.nModule - 1 << ((yLocal >= 0.0) ? " Up" : " Down") << G4endl;
+          G4cout << "Phi ind  >> " << (hitData.nModule - 32)*2 + ((yLocal >= 0.0) ? 1 : 0);
           G4cout << "  E5 Y-coord global " << position.y() << " local " << yLocal << G4endl;
           G4cout << "Eta ind  >> 2" << G4endl;
         } else {
-          G4cout << "Module-1 >> " << nModule - 1 << G4endl;
-          G4cout << "Tower-1  >> " << nTower - 1 << G4endl;
-          G4cout << "Sample-1 >> " << nSample - 1 << G4endl;
+          G4cout << "Module-1 >> " << hitData.nModule - 1 << G4endl;
+          G4cout << "Tower-1  >> " << hitData.nTower - 1 << G4endl;
+          G4cout << "Sample-1 >> " << hitData.nSample - 1 << G4endl;
         }
-        G4cout << "Energy   >> " << edep << " (" << edep_up << "," << edep_down << ")" << G4endl;
+        G4cout << "Energy   >> " << edep << " (" << hitData.edep_up << "," << hitData.edep_down << ")" << G4endl;
         G4cout << "TotalTime>> " << totalTime << G4endl;
         G4cout << "---- HIT INFO ----" << G4endl;
       }
@@ -632,59 +654,58 @@ G4bool TileGeoG4SDCalc::MakePmtEdepTime(const G4Step* aStep) {
   if (totalTime + deltaT_up > m_options.timeCut || totalTime + deltaT_down > m_options.timeCut) {
     totalTime = m_lateHitTime;
     deltaT_up = deltaT_down = 0.0;
-    if (m_options.verboseLevel > 10)
-      G4cout << " hit time set to " << totalTime << G4endl;
+    ATH_MSG_VERBOSE(" hit time set to " << totalTime);
   }
   // calculate unique deltaT bin width for both up and down PMT, ignoring additional deltas
-  m_deltaT = deltaT(totalTime);
-  double scin_Time = totalTime + (m_tileSize + 1) * m_tileSizeDeltaT;
-  scin_Time_up = scin_Time_down = scin_Time;
-  m_totalTimeUp = m_totalTimeDown = totalTime;
+  m_deltaT = this->deltaT(totalTime);
+  const double scin_Time = totalTime + (hitData.tileSize + 1) * m_tileSizeDeltaT;
+  hitData.scin_Time_up = hitData.scin_Time_down = scin_Time;
+  hitData.totalTimeUp = hitData.totalTimeDown = totalTime;
 
   if (isE5) { //special E5(E4') cells in EBC (negative)
-    if (edep_up != 0.) {
-      pmtID_up = m_tileTBID->channel_id(nSide, (nModule - 32) * 2 + 1, 2);
-      pmtID_down = m_invalid_id;
-      scin_Time_down = 0.;
+    if (hitData.edep_up != 0.) {
+      hitData.pmtID_up = m_tileTBID->channel_id(hitData.nSide, (hitData.nModule - 32) * 2 + 1, 2);
+      hitData.pmtID_down = m_invalid_id;
+      hitData.scin_Time_down = 0.;
     } else {
-      pmtID_up = m_invalid_id;
-      pmtID_down = m_tileTBID->channel_id(nSide, (nModule - 32) * 2, 2);
-      scin_Time_up = 0.;
+      hitData.pmtID_up = m_invalid_id;
+      hitData.pmtID_down = m_tileTBID->channel_id(hitData.nSide, (hitData.nModule - 32) * 2, 2);
+      hitData.scin_Time_up = 0.;
     }
   } else {
-    pmtID_up = m_tileID->pmt_id(nDetector, nSide, nModule - 1, nTower - 1, nSample - 1, 1);
-    pmtID_down = m_tileID->pmt_id(nDetector, nSide, nModule - 1, nTower - 1, nSample - 1, 0);
-    if (m_nrOfPMT == 2) {
-      scin_Time_up += deltaT_up;
-      scin_Time_down += deltaT_down;
-      m_totalTimeUp += deltaT_up;
-      m_totalTimeDown += deltaT_down;
-    } else if (m_nrOfPMT == 1) {  //Gap/Crack has only one PMT. So, It's not needed to divide
-      pmtID_up = m_invalid_id;
-      scin_Time_up = 0.;
-      edep_up = 0.;
-      edep_down = edep;
+    hitData.pmtID_up = m_tileID->pmt_id(hitData.nDetector, hitData.nSide, hitData.nModule - 1, hitData.nTower - 1, hitData.nSample - 1, 1);
+    hitData.pmtID_down = m_tileID->pmt_id(hitData.nDetector, hitData.nSide, hitData.nModule - 1, hitData.nTower - 1, hitData.nSample - 1, 0);
+    if (hitData.nrOfPMT == 2) {
+      hitData.scin_Time_up += deltaT_up;
+      hitData.scin_Time_down += deltaT_down;
+      hitData.totalTimeUp += deltaT_up;
+      hitData.totalTimeDown += deltaT_down;
+    } else if (hitData.nrOfPMT == 1) {  //Gap/Crack has only one PMT. So, It's not needed to divide
+      hitData.pmtID_up = m_invalid_id;
+      hitData.scin_Time_up = 0.;
+      hitData.edep_up = 0.;
+      hitData.edep_down = edep;
     } else {
-      pmtID_down = m_invalid_id;
-      scin_Time_down = 0.;
-      edep_down = 0.;
-      edep_up = edep;
+      hitData.pmtID_down = m_invalid_id;
+      hitData.scin_Time_down = 0.;
+      hitData.edep_down = 0.;
+      hitData.edep_up = edep;
     }
   }
 
-  if (m_options.verboseLevel > 10)
-    G4cout << "MakePmtEdepTime: right pmtID_up,pmtID_down," << "edep_up,edep_down,scin_Time_up,scin_Time_down:\t"
-           << pmtID_up << "\t"
-           << pmtID_down << "\t"
-           << edep_up << "\t"
-           << edep_down << "\t"
-           << scin_Time_up << "\t"
-           << scin_Time_down << G4endl;
+  ATH_MSG_VERBOSE("MakePmtEdepTime: right pmtID_up,pmtID_down," << "edep_up,edep_down,scin_Time_up,scin_Time_down:\t"
+                  << hitData.pmtID_up << "\t"
+                  << hitData.pmtID_down << "\t"
+                  << hitData.edep_up << "\t"
+                  << hitData.edep_down << "\t"
+                  << hitData.scin_Time_up << "\t"
+                  << hitData.scin_Time_down);
 
   return true;
 }
 
-TileMicroHit TileGeoG4SDCalc::GetTileMicroHit(const G4Step* aStep) {
+TileMicroHit TileGeoG4SDCalc::GetTileMicroHit(const G4Step* aStep, TileHitData& hitData) const
+{
   TileMicroHit microHit;
   microHit.pmt_up = m_invalid_id;
   microHit.pmt_down = m_invalid_id;
@@ -694,151 +715,146 @@ TileMicroHit TileGeoG4SDCalc::GetTileMicroHit(const G4Step* aStep) {
   microHit.time_down = 0.0;
   //microHit.period  = 0;               microHit.tilerow   = 0; // prepared for future use
 
-  G4bool stat = FindTileScinSection(aStep);  //Search for the tilecal sub-section, its module and some identifiers
-  if (!stat) {
-    if (m_options.verboseLevel > 5)
-      G4cout << "GetTileMicroHit: FindTileScinSection(aStep) is false!" << G4endl;
+  //Search for the tilecal sub-section, its module and some identifiers
+  if (!this->FindTileScinSection(aStep, hitData)) {
+    ATH_MSG_DEBUG("GetTileMicroHit: FindTileScinSection(aStep) is false!");
     return microHit;
   }
 
-  stat = MakePmtEdepTime(aStep);  //calculation of pmtID, edep and scin_Time with aStep
-  if (!stat) {
-    if (m_options.verboseLevel > 5)
-      G4cout << "MakePmtEdepTime: wrong pmtID_up,pmtID_down,edep_up,"
-             << "edep_down,scin_Time_up,scin_Time_down:\t"
-             << pmtID_up << "\t"
-             << pmtID_down << "\t"
-             << edep_up << "\t"
-             << edep_down << "\t"
-             << scin_Time_up << "\t"
-             << scin_Time_down << G4endl;
+  //calculation of pmtID, edep and scin_Time with aStep
+  if (!this->MakePmtEdepTime(aStep, hitData)) {
+    ATH_MSG_DEBUG("MakePmtEdepTime: wrong pmtID_up,pmtID_down,edep_up,"
+                    << "edep_down,scin_Time_up,scin_Time_down:\t"
+                    << hitData.pmtID_up << "\t"
+                    << hitData.pmtID_down << "\t"
+                    << hitData.edep_up << "\t"
+                    << hitData.edep_down << "\t"
+                    << hitData.scin_Time_up << "\t"
+                    << hitData.scin_Time_down);
     return microHit;
   }
-  microHit.pmt_up = pmtID_up;
-  microHit.pmt_down = pmtID_down;
-  microHit.e_up = edep_up;
-  microHit.e_down = edep_down;
-  microHit.time_up = m_totalTimeUp;
-  microHit.time_down = m_totalTimeDown;
+  microHit.pmt_up = hitData.pmtID_up;
+  microHit.pmt_down = hitData.pmtID_down;
+  microHit.e_up = hitData.edep_up;
+  microHit.e_down = hitData.edep_down;
+  microHit.time_up = hitData.totalTimeUp;
+  microHit.time_down = hitData.totalTimeDown;
   //microHit.period  = tileperiod;      microHit.tilerow   = tilesize; // prepared for future use
   return microHit;
 }
 
-G4bool TileGeoG4SDCalc::ManageScintHit() {
-  //Having _cell and nModule (number of current module) we need to
+G4bool TileGeoG4SDCalc::ManageScintHit(TileHitData& hitData) const
+{
+  //Having hitData.cell and hitData.nModule (number of current module) we need to
   //determine if a Hit object already exists for this cell and module.
   //If YES: we just add energy to the existing hit object
   //If No: we create a new object, fill it and place in the collection
 
-  bool newTileHitUp = true, newTileHitDown = true;
+  bool newTileHitUp = true;
+  bool newTileHitDown = true;
 
   // Debugging of special E5(E4') cells
-  //if (nTower>16) G4cout <<" Cells E5: nModule="<<nModule
-  //                       <<"  edep_up="<<edep_up<<"  edep_down="<<edep_down
-  //                       <<"  pmtID_up="<<pmtID_up<<"  pmtID_down="<<pmtID_down<<G4endl;
-
-  if (m_isNegative) {
-    if (m_nrOfPMT == 2) {
-      if (cell->moduleToHitUpNegative[nModule - 1])
-        newTileHitUp = false;
-      if (cell->moduleToHitDownNegative[nModule - 1])
-        newTileHitDown = false;
-    } else if (m_nrOfPMT == 1) {
-      if (cell->moduleToHitDownNegative[nModule - 1])
-        newTileHitDown = false;
-    } else if (m_nrOfPMT == -1) {
-      if (cell->moduleToHitUpNegative[nModule - 1])
-        newTileHitUp = false;
+  //if (hitData.nTower>16) G4cout <<" Cells E5: hitData.nModule="<<hitData.nModule
+  //                       <<"  edep_up="<<hitData.edep_up<<"  edep_down="<<hitData.edep_down
+  //                       <<"  pmtID_up="<<hitData.pmtID_up<<"  pmtID_down="<<hitData.pmtID_down<<G4endl;
+
+  if (hitData.isNegative) {
+    if (hitData.nrOfPMT == 2) {
+      if (hitData.cell->moduleToHitUpNegative[hitData.nModule - 1]) { newTileHitUp = false; }
+      if (hitData.cell->moduleToHitDownNegative[hitData.nModule - 1]) { newTileHitDown = false; }
+    } else if (hitData.nrOfPMT == 1) {
+      if (hitData.cell->moduleToHitDownNegative[hitData.nModule - 1]) { newTileHitDown = false; }
+    } else if (hitData.nrOfPMT == -1) {
+      if (hitData.cell->moduleToHitUpNegative[hitData.nModule - 1]) { newTileHitUp = false; }
     } else {
-      G4cout << "FATAL ERROR: ManageScintHit: Unexpected number of PMTs in a Cell -->" << m_nrOfPMT << G4endl;
+      ATH_MSG_FATAL("ManageScintHit: Unexpected number of PMTs in a Cell -->" << hitData.nrOfPMT);
       return false;
     }
   } else { //positive
-    if (m_nrOfPMT == 2) {
-      if (cell->moduleToHitUp[nModule - 1])
-        newTileHitUp = false;
-      if (cell->moduleToHitDown[nModule - 1])
-        newTileHitDown = false;
-    } else if (m_nrOfPMT == 1) {
-      if (cell->moduleToHitDown[nModule - 1])
-        newTileHitDown = false;
-    } else if (m_nrOfPMT == -1) {
-      if (cell->moduleToHitUp[nModule - 1])
-        newTileHitUp = false;
+    if (hitData.nrOfPMT == 2) {
+      if (hitData.cell->moduleToHitUp[hitData.nModule - 1]) { newTileHitUp = false; }
+      if (hitData.cell->moduleToHitDown[hitData.nModule - 1]) { newTileHitDown = false; }
+    } else if (hitData.nrOfPMT == 1) {
+      if (hitData.cell->moduleToHitDown[hitData.nModule - 1]) { newTileHitDown = false; }
+    } else if (hitData.nrOfPMT == -1) {
+      if (hitData.cell->moduleToHitUp[hitData.nModule - 1]) { newTileHitUp = false; }
     } else {
-      G4cout << "FATAL ERROR: ManageScintHit: Unexpected number of PMTs in a Cell -->" << m_nrOfPMT << G4endl;
+      ATH_MSG_FATAL("ManageScintHit: Unexpected number of PMTs in a Cell -->" << hitData.nrOfPMT);
       return false;
     }
   }
 
-  if (edep_up != 0.) {
-    if (newTileHitUp)
-      CreateScintHit(1);
-    else
-      UpdateScintHit(1);
+  if (hitData.edep_up != 0.) {
+    if (newTileHitUp) { this->CreateScintHit(1, hitData); }
+    else { this->UpdateScintHit(1, hitData); }
   }
 
-  if (edep_down != 0.) {
-    if (newTileHitDown)
-      CreateScintHit(0);
-    else
-      UpdateScintHit(0);
+  if (hitData.edep_down != 0.) {
+    if (newTileHitDown) { this->CreateScintHit(0, hitData); }
+    else { this->UpdateScintHit(0, hitData); }
   }
 
   return true;
 }
 
-void TileGeoG4SDCalc::CreateScintHit(int pmt) {
-  TileSimHit* aHit;
-
-  if (pmt == 1) { //Uper PMT of Cell
-    aHit = new TileSimHit(pmtID_up, edep_up, m_totalTimeUp, m_deltaT);
-    if (m_options.doTileRow)
-      aHit->add(edep_up, scin_Time_up, m_deltaT);
-
-    if (m_isNegative)
-      cell->moduleToHitUpNegative[nModule - 1] = aHit;
-    else
-      cell->moduleToHitUp[nModule - 1] = aHit;
-
+void TileGeoG4SDCalc::CreateScintHit(int pmt, TileHitData& hitData) const
+{
+  if (pmt == 1) { //Upper PMT of Cell
+    std::unique_ptr<TileSimHit> aHit = std::make_unique<TileSimHit>(hitData.pmtID_up, hitData.edep_up, hitData.totalTimeUp, m_deltaT);
+    if (m_options.doTileRow) {
+      aHit->add(hitData.edep_up, hitData.scin_Time_up, m_deltaT);
+    }
+    if (hitData.isNegative) {
+      hitData.cell->moduleToHitUpNegative[hitData.nModule - 1] = aHit.release();
+    }
+    else {
+      hitData.cell->moduleToHitUp[hitData.nModule - 1] = aHit.release();
+    }
   } else { //Down PMT of Cell
-    aHit = new TileSimHit(pmtID_down, edep_down, m_totalTimeDown, m_deltaT);
-    if (m_options.doTileRow)
-      aHit->add(edep_down, scin_Time_down, m_deltaT);
-
-    if (m_isNegative)
-      cell->moduleToHitDownNegative[nModule - 1] = aHit;
-    else
-      cell->moduleToHitDown[nModule - 1] = aHit;
+    std::unique_ptr<TileSimHit> aHit = std::make_unique<TileSimHit>(hitData.pmtID_down, hitData.edep_down, hitData.totalTimeDown, m_deltaT);
+    if (m_options.doTileRow) {
+      aHit->add(hitData.edep_down, hitData.scin_Time_down, m_deltaT);
+    }
+    if (hitData.isNegative) {
+      hitData.cell->moduleToHitDownNegative[hitData.nModule - 1] = aHit.release();
+    }
+    else {
+      hitData.cell->moduleToHitDown[hitData.nModule - 1] = aHit.release();
+    }
   }
 }
 
-void TileGeoG4SDCalc::UpdateScintHit(int pmt) {
-  TileSimHit* aHit;
-
-  if (pmt == 1) { //Uper PMT of Cell
-    if (m_isNegative)
-      aHit = cell->moduleToHitUpNegative[nModule - 1];
-    else
-      aHit = cell->moduleToHitUp[nModule - 1];
-
-    aHit->add(edep_up, m_totalTimeUp, m_deltaT);
-    if (m_options.doTileRow)
-      aHit->add(edep_up, scin_Time_up, m_deltaT);
+void TileGeoG4SDCalc::UpdateScintHit(int pmt, TileHitData& hitData) const
+{
+  TileSimHit* aHit(nullptr);
 
+  if (pmt == 1) { //Upper PMT of Cell
+    if (hitData.isNegative) {
+      aHit = hitData.cell->moduleToHitUpNegative[hitData.nModule - 1];
+    }
+    else {
+      aHit = hitData.cell->moduleToHitUp[hitData.nModule - 1];
+    }
+    aHit->add(hitData.edep_up, hitData.totalTimeUp, m_deltaT);
+    if (m_options.doTileRow) {
+      aHit->add(hitData.edep_up, hitData.scin_Time_up, m_deltaT);
+    }
   } else { // Down PMT of Cell
-    if (m_isNegative)
-      aHit = cell->moduleToHitDownNegative[nModule - 1];
-    else
-      aHit = cell->moduleToHitDown[nModule - 1];
-
-    aHit->add(edep_down, m_totalTimeDown, m_deltaT);
-    if (m_options.doTileRow)
-      aHit->add(edep_down, scin_Time_down, m_deltaT);
+    if (hitData.isNegative) {
+      aHit = hitData.cell->moduleToHitDownNegative[hitData.nModule - 1];
+    }
+    else {
+      aHit = hitData.cell->moduleToHitDown[hitData.nModule - 1];
+    }
+    aHit->add(hitData.edep_down, hitData.totalTimeDown, m_deltaT);
+    if (m_options.doTileRow) {
+      aHit->add(hitData.edep_down, hitData.scin_Time_down, m_deltaT);
+    }
   }
 }
 
-G4double TileGeoG4SDCalc::BirkLaw(const G4Step* aStep) const {
+G4double TileGeoG4SDCalc::BirkLaw(const G4Step* aStep) const
+{
   // *** apply BIRK's saturation law to energy deposition ***
   // *** only organic scintillators implemented in this version MODEL=1
   //
@@ -859,12 +875,12 @@ G4double TileGeoG4SDCalc::BirkLaw(const G4Step* aStep) const {
   const G4double birk2 = 9.6e-6 * CLHEP::g / (CLHEP::MeV * CLHEP::cm2) * CLHEP::g / (CLHEP::MeV * CLHEP::cm2);
   G4double response = 0.;
 
-  G4double destep = aStep->GetTotalEnergyDeposit();
+  const G4double destep = aStep->GetTotalEnergyDeposit();
   //  doesn't work with shower parameterisation
   //  G4Material* material = aStep->GetTrack()->GetMaterial();
   //  G4double charge      = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
-  G4Material* material = aStep->GetPreStepPoint()->GetMaterial();
-  G4double charge = aStep->GetPreStepPoint()->GetCharge();
+  const G4Material* material = aStep->GetPreStepPoint()->GetMaterial();
+  const G4double charge = aStep->GetPreStepPoint()->GetCharge();
 
   // --- no saturation law for neutral particles ---
   // ---  and materials other than scintillator  ---
@@ -878,10 +894,9 @@ G4double TileGeoG4SDCalc::BirkLaw(const G4Step* aStep) const {
     if (aStep->GetStepLength() != 0) {
       G4double dedx = destep / (aStep->GetStepLength()) / (material->GetDensity());
       response = destep / (1. + rkb * dedx + birk2 * dedx * dedx);
-    } else {
-      if (m_options.verboseLevel > 5)
-        G4cout << "BirkLaw() - Current Step in scintillator has zero length." << "Ignore Birk Law for this Step"
-               << G4endl;
+    }
+    else {
+      ATH_MSG_DEBUG("BirkLaw() - Current Step in scintillator has zero length." << "Ignore Birk Law for this Step");
       response = destep;
     }
 
@@ -890,11 +905,48 @@ G4double TileGeoG4SDCalc::BirkLaw(const G4Step* aStep) const {
     // << " response after Birk: "  << response/CLHEP::keV << " keV" << G4endl;
     // }
     return response;
-  } else {
+  }
+  else {
     return destep;
   }
 }
 
+void TileGeoG4SDCalc::pmtEdepFromFCS_StepInfo(TileHitData& hitData, double ene, double yLocal, double halfYLocal, double zLocal, int Ushape) const
+{
+  /// Code moved here from TileFastCaloSim/src/TileFCSmStepToTileHitVec.cxx
+  switch (Ushape) {
+  case 1:
+    hitData.edep_down = ene * this->Tile_1D_profile(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide);
+    hitData.edep_up = ene * this->Tile_1D_profile(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide);
+    break;
+
+  case 14:
+    hitData.edep_down = ene * this->Tile_1D_profileRescaled(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide);
+    hitData.edep_up = ene * this->Tile_1D_profileRescaled(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide);
+    break;
+
+  case 13:
+    hitData.edep_down = ene * this->Tile_1D_profileFunc(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide);
+    hitData.edep_up = ene * this->Tile_1D_profileFunc(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide);
+    break;
+
+  case 12:
+    hitData.edep_down = ene * this->Tile_1D_profileSym(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide);
+    hitData.edep_up = ene * this->Tile_1D_profileSym(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide);
+    break;
+
+  case 11:
+    hitData.edep_down = ene * this->Tile_1D_profileAsym(hitData.tileSize, yLocal, zLocal, 0, hitData.nDetector, hitData.nSide);
+    hitData.edep_up = ene * this->Tile_1D_profileAsym(hitData.tileSize, yLocal, zLocal, 1, hitData.nDetector, hitData.nSide);
+    break;
+
+  default:
+    hitData.edep_down = ene * ( 0.5 - 0.2 * yLocal/halfYLocal ); // should get 0.7 for yLocal = -halfYLocal
+    hitData.edep_up = ene - hitData.edep_down;
+  }
+  return;
+}
+
 G4double TileGeoG4SDCalc::Tile_1D_profileAsym(int row, G4double x, G4double y, int PMT, int nDetector, int) {
 
   const double xlow = -0.0505; //dPhi low [rad]
@@ -1079,8 +1131,8 @@ G4double TileGeoG4SDCalc::Tile_1D_profileAsym(int row, G4double x, G4double y, i
   const double size2 = (double) size / 2.;
 
   if (row < 0 || row >= 11) return 0.0;
-  double phi = atan(x / (y + R[row]));
-  int index = int(phi * sizerange + size2);
+  const double phi = atan(x / (y + R[row]));
+  const int index = int(phi * sizerange + size2);
   if (index < 0 || index >= size) return 0.0;
 
   G4double amplitude = 0.0;
@@ -1256,8 +1308,8 @@ G4double TileGeoG4SDCalc::Tile_1D_profileSym(int row, G4double x, G4double y, in
   const double size2 = (double) size / 2.;
 
   if (row < 0 || row >= 11) return 0.0;
-  double phi = atan(x / (y + R[row]));
-  int index = int(phi * sizerange + size2);
+  const double phi = atan(x / (y + R[row]));
+  const int index = int(phi * sizerange + size2);
   if (index < 0 || index >= size) return 0.0;
 
   G4double amplitude = 0.0;
@@ -1441,8 +1493,8 @@ G4double TileGeoG4SDCalc::Tile_1D_profileFunc(int row, G4double x, G4double y, i
   const double size2 = (double) size / 2.;
 
   if (row < 0 || row >= 11) return 0.0;
-  double phi = atan(x / (y + R[row]));
-  int index = int(phi * sizerange + size2);
+  const double phi = atan(x / (y + R[row]));
+  const int index = int(phi * sizerange + size2);
   if (index < 0 || index >= size) return 0.0;
 
   G4double amplitude = 0.0;
@@ -1625,8 +1677,8 @@ G4double TileGeoG4SDCalc::Tile_1D_profileRescaled(int row, G4double x, G4double
   const double size2 = (double) size / 2.;
 
   if (row < 0 || row >= 11) return 0.0;
-  double phi = atan(x / (y + R[row]));
-  int index = int(phi * sizerange + size2);
+  const double phi = atan(x / (y + R[row]));
+  const int index = int(phi * sizerange + size2);
   if (index < 0 || index >= size) return 0.0;
 
   G4double amplitude = 0.0;
@@ -1810,8 +1862,8 @@ G4double TileGeoG4SDCalc::Tile_1D_profileRescaled_zeroBins(int row, G4double x,
   const double size2 = (double) size / 2.;
 
   if (row < 0 || row >= 11) return 0.0;
-  double phi = atan(x / (y + R[row]));
-  int index = int(phi * sizerange + size2);
+  const double phi = atan(x / (y + R[row]));
+  const int index = int(phi * sizerange + size2);
   if (index < nZeroBins || index >= size - nZeroBins) return 0.0;
 
   G4double amplitude = 0.0;
@@ -1852,3 +1904,4 @@ G4double TileGeoG4SDCalc::Tile_1D_profileRescaled_zeroBins(int row, G4double x,
 
   return amplitude;
 }
+
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh
new file mode 100644
index 0000000000000000000000000000000000000000..095329d7b1e3bc8f74f188f8096b3aaed4ef0fa6
--- /dev/null
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDCalc.hh
@@ -0,0 +1,140 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+//************************************************************
+// Filename : TileGeoG4SDCalc.hh
+// Author   : Sergey Karpov <Sergey.Karpov@cern.ch>
+// Created  : July, 2013
+//
+// DESCRIPTION:
+//   Sensitive Detector initialisation for TileCal G4 simulations
+//   of both ordinary Hits and CalibHits
+//
+// HISTORY:
+//   Nov 2013 - Work with U-shape was added (Sasha Solodkov)
+//
+//************************************************************
+
+#ifndef TILEGEOG4SD_TILEGEOG4SDCALC_H
+#define TILEGEOG4SD_TILEGEOG4SDCALC_H
+
+
+#include "TileG4Interfaces/ITileCalculator.h"
+#include "AthenaBaseComps/AthService.h"
+
+// package headers
+#include "TileGeoG4SD/TileSDOptions.h"
+
+// athena headers
+#include "CaloIdentifier/TileID.h"
+#include "CaloIdentifier/TileTBID.h"
+
+// Geant4 headers
+#include "G4Types.hh"
+
+// STL headers
+#include <vector>
+#include <memory>
+
+class TileGeoG4LookupBuilder;
+class G4Step;
+
+class TileRow;
+class TileGeoG4Section;
+class TileGeoG4Cell;
+
+class StoreGateSvc;
+class IGeoModelSvc;
+
+class TileGeoG4SDCalc: public AthService, virtual public ITileCalculator {
+public:
+  TileGeoG4SDCalc(const std::string& name, ISvcLocator * pSvcLocator);
+  virtual ~TileGeoG4SDCalc();
+
+  virtual StatusCode initialize() override final;
+
+  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface ) override final;
+
+  /// Search for the tilecal sub-section, its module and some identifiers
+  virtual G4bool FindTileScinSection(const G4Step*, TileHitData& hitData) const override final;
+  /// Calculation of pmtID, edep and scin_Time with aStep (Sergey)
+  virtual G4bool MakePmtEdepTime(const G4Step*, TileHitData& hitData) const override final;
+  /// Create or update hit object in the collection
+  virtual G4bool ManageScintHit(TileHitData& hitData) const override final;
+  /// Used by FastCaloSimParamAction
+  virtual TileMicroHit GetTileMicroHit(const G4Step*, TileHitData& hitData) const override final;
+  ///
+  virtual TileGeoG4LookupBuilder* GetLookupBuilder() const override final;
+
+  /// Method used by TileFastCaloSim/TileFCSmStepToTileHitVec
+  virtual void pmtEdepFromFCS_StepInfo(TileHitData& hitData, double ene, double yLocal, double halfYLocal, double zLocal, int Ushape) const override final;
+private:
+  void CreateScintHit(int pmt, TileHitData& hitData) const;
+  void UpdateScintHit(int pmt, TileHitData& hitData) const;
+
+  int getUshapeFromGM() const;
+
+  /** @brief function to calculate Birks correction */
+  G4double BirkLaw(const G4Step* aStep) const;
+
+  // Private copy-constructor
+  TileGeoG4SDCalc& operator=(const TileGeoG4SDCalc&) = delete;
+  TileGeoG4SDCalc(const TileGeoG4SDCalc&) = delete;
+
+  /** @brief function to give PMT responce as a function of distance
+      from tile center in mm (along phi direction) */
+  static G4double Tile_1D_profileAsym(int row, G4double x, G4double y, int PMT, int nDetector, int nSide); //asymmetric U-shape
+  static G4double Tile_1D_profileSym(int row, G4double x, G4double y, int PMT, int nDetector, int nSide); //Single Lookup table is included; average of central 17 bins is normalized to 0.5
+  static G4double Tile_1D_profileFunc(int row, G4double x, G4double y, int PMT, int nDetector, int nSide); //Single Lookup table is included; average of all bins is normalized to 0.5
+  static G4double Tile_1D_profileRescaled(int row, G4double x, G4double y, int PMT, int nDetector, int nSide);
+  static G4double Tile_1D_profileRescaled_zeroBins(int row, G4double x, G4double y, int PMT, int nDetector, int nSide,
+                                                   int nZeroBins = 0);
+
+  // the default function which is used in simulation in the case Ushape=1
+#define Tile_1D_profile Tile_1D_profileRescaled
+
+  ServiceHandle<StoreGateSvc> m_detStore; // used by TileGeoG4CalibSD.cc
+  ServiceHandle<IGeoModelSvc> m_geoModSvc;
+
+  Identifier m_invalid_id; /// FIXME just a default-constructed Identifier???
+
+  TileMicroHit m_microHit;
+
+  TileSDOptions m_options;
+
+
+  /** @brief granularity in time for hits */
+  mutable double m_deltaT; // FIXME set during initialize, then reset during MakePmtEdepTime
+
+  /** @brief Structure holding the attenuation lengths */
+  std::unique_ptr<TileRow> m_row;
+
+  /** @brief pointer to TileID helper class */
+  const TileID* m_tileID;
+
+  /** @brief pointer to TileTBID helper class */
+  const TileTBID* m_tileTBID;
+
+  /** @brief hits in different tile rows are shifted in time by this amount of ns */
+  double m_tileSizeDeltaT;
+
+  /** @brief time for hits which are above m_timeCut threshold
+      it is equal to m_tilesize_deltaT - m_deltaT */
+  double m_lateHitTime;
+
+  /** @brief function to provide correct deltaT bin width for given time */
+  inline double deltaT(double time) const {
+    unsigned int i = 0;
+    double delta = m_options.deltaTHit[i++];
+    while (i < m_options.deltaTHit.size()) {
+      if (time > m_options.deltaTHit[i++] && time < m_options.deltaTHit[i++]) break;
+      delta = m_options.deltaTHit[i++];
+    }
+    return delta;
+  }
+
+};
+//class TileGeoG4SDCalc
+
+#endif // not TILEGEOG4SD_TILEGEOG4SDCALC_H
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDTool.cc b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDTool.cc
index 31d3cbc321365c2c51e96001ab9f9d2e10e05624..0373b55aa63791fe3af5b2d505e15fbb8cd63264 100644
--- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDTool.cc
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDTool.cc
@@ -10,14 +10,15 @@
 //************************************************************
 
 #include "TileGeoG4SDTool.h"
-#include "TileGeoG4SD/TileGeoG4SD.hh"
-
+#include "TileGeoG4SD.hh"
+#include "TileG4Interfaces/ITileCalculator.h"
 
 TileGeoG4SDTool::TileGeoG4SDTool(const std::string& type, const std::string& name, const IInterface* parent)
-    : SensitiveDetectorBase(type,name,parent)
+  : SensitiveDetectorBase(type,name,parent)
+  , m_tileCalculator("TileGeoG4SDCalc", name)
 {
   declareInterface<ISensitiveDetector>(this);
-
+  declareProperty( "TileCalculator", m_tileCalculator);
   declareProperty( "DeltaTHit" , m_options.deltaTHit );
   declareProperty( "TimeCut" , m_options.timeCut );
   declareProperty( "TileTB" , m_options.tileTB );
@@ -30,6 +31,12 @@ TileGeoG4SDTool::TileGeoG4SDTool(const std::string& type, const std::string& nam
 
 }
 
+StatusCode TileGeoG4SDTool::initialize()
+{
+  ATH_CHECK(m_tileCalculator.retrieve());
+  return StatusCode::SUCCESS;
+}
+
 StatusCode TileGeoG4SDTool::Gather()
 {
   ATH_MSG_VERBOSE( "TileGeoG4SDTool::Gather()" );
@@ -56,6 +63,6 @@ G4VSensitiveDetector* TileGeoG4SDTool::makeSD()
   // Create a fresh SD
   if(msgLvl(MSG::VERBOSE))    { m_options.verboseLevel = 10; }
   else if(msgLvl(MSG::DEBUG)) { m_options.verboseLevel = 5;  }
-  return new TileGeoG4SD(name(), m_outputCollectionNames[0], m_options);
+  return new TileGeoG4SD(name(), m_outputCollectionNames[0], &*m_tileCalculator, m_options);
 }
 
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDTool.h b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDTool.h
index 09b63a1a40606ca75779625ec29dfc92b15a497c..98678518dd4ab99c283f1102ac24479ad7dbbc76 100644
--- a/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDTool.h
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/TileGeoG4SDTool.h
@@ -22,23 +22,30 @@
 #include <string>
 
 class G4VSensitiveDetector;
+class ITileCalculator;
 
 class TileGeoG4SDTool : public SensitiveDetectorBase
 {
 public:
-    TileGeoG4SDTool (const std::string& type, const std::string& name, const IInterface *parent);
-    // Default destructor is just fine
+  /// Constructor
+  TileGeoG4SDTool (const std::string& type, const std::string& name, const IInterface *parent);
+  /// Default destructor is just fine
 
-    /** End of an athena event */
-    StatusCode Gather() override final; //FIXME would be good to be able to avoid this.
+  ///
+  virtual StatusCode initialize() override final;
+
+  /// End of an athena event
+  virtual StatusCode Gather() override final; //FIXME would be good to be able to avoid this.
 
 protected:
-    // Make me an SD!
-    G4VSensitiveDetector* makeSD() override final;
+  /// Make me an SD!
+  G4VSensitiveDetector* makeSD() override final;
 
 private:
-    // Options for the SD configuration
-    TileSDOptions m_options;
+  /// Calculator Service
+  ServiceHandle<ITileCalculator> m_tileCalculator;
+  /// Options for the SD configuration
+  TileSDOptions m_options;
 
 };
 
diff --git a/TileCalorimeter/TileG4/TileGeoG4SD/src/components/TileGeoG4SD_entries.cxx b/TileCalorimeter/TileG4/TileGeoG4SD/src/components/TileGeoG4SD_entries.cxx
index eb7f9ced4ded718ee5cde5deec622ea822fe56d4..d8c63c5cd42facd000cd6d4e20fb8f7481c0fc3c 100644
--- a/TileCalorimeter/TileG4/TileGeoG4SD/src/components/TileGeoG4SD_entries.cxx
+++ b/TileCalorimeter/TileG4/TileGeoG4SD/src/components/TileGeoG4SD_entries.cxx
@@ -1,8 +1,11 @@
 #include "GaudiKernel/DeclareFactoryEntries.h"
 #include "../TileGeoG4SDTool.h"
+#include "../TileGeoG4SDCalc.hh"
 
 DECLARE_TOOL_FACTORY( TileGeoG4SDTool )
+DECLARE_SERVICE_FACTORY( TileGeoG4SDCalc )
 
 DECLARE_FACTORY_ENTRIES( TileGeoG4SD ) {
   DECLARE_TOOL( TileGeoG4SDTool )
+  DECLARE_SERVICE( TileGeoG4SDCalc )
 }
diff --git a/TileCalorimeter/TileGeoModel/doc/packagedoc.h b/TileCalorimeter/TileGeoModel/doc/packagedoc.h
index 00386357acbd2f1d15ef374620b2cb4335fe824a..83387ea576951f95d715e5835d940c568b9aba2d 100644
--- a/TileCalorimeter/TileGeoModel/doc/packagedoc.h
+++ b/TileCalorimeter/TileGeoModel/doc/packagedoc.h
@@ -41,10 +41,8 @@ This is the draft of TileGeoModel documentation, under construction ... us usual
   - TileGeoSectionBuilder: %Base class for section construction.
   - TileTBFactory: %Test Beam factory. 
 
-@section TileGeoModel_TileGeoModelReq Requirements
  
 
 */
 
 //- TileOracle: Interface for filling primary numbers with Python tools to the Detector Description Database.
- 
diff --git a/TileCalorimeter/TileGeoModel/share/jobOptions.intLength.py b/TileCalorimeter/TileGeoModel/share/jobOptions.intLength.py
index 9db761d85386e1c77dbde2b4f3bbc721def59000..0208660f8f6861996590e3855393eded395d1b25 100755
--- a/TileCalorimeter/TileGeoModel/share/jobOptions.intLength.py
+++ b/TileCalorimeter/TileGeoModel/share/jobOptions.intLength.py
@@ -89,9 +89,6 @@ from GaudiSvc.GaudiSvcConf import THistSvc
 ServiceMgr += THistSvc("THistSvc")
 ServiceMgr.THistSvc.Output  = ["intLen DATAFILE='intLength.root' OPT='NEW'"];
 
-from G4AtlasApps import PyG4Atlas
-IntLengthAction= PyG4Atlas.UserAction( 'G4UserActions','InteractionLengthIntegrator',['BeginOfEvent','EndOfEvent','Step'])
-
 from G4AtlasApps import SimKernel
 
 # enter interactive mode 
diff --git a/TileCalorimeter/TileIdentifier/TileIdentifier/TileRodIdHash.h b/TileCalorimeter/TileIdentifier/TileIdentifier/TileRodIdHash.h
index efcba800d687f4679818a5ff5e0802ef176fa461..bc58d80e769207436a6e3abff4a73b98d7aa660f 100755
--- a/TileCalorimeter/TileIdentifier/TileIdentifier/TileRodIdHash.h
+++ b/TileCalorimeter/TileIdentifier/TileIdentifier/TileRodIdHash.h
@@ -27,6 +27,9 @@ class TileRodIdHash  {
   /** initialize */
   void initialize(int offset ); 
 
+  /** new initialize for the HLT */
+  void initialize (int offset, const std::vector<ID>& rmod );
+
   /**Convert ID to int */
   int operator() (const ID& id) const ;
 
diff --git a/TileCalorimeter/TileIdentifier/src/TileRodIdHash.cxx b/TileCalorimeter/TileIdentifier/src/TileRodIdHash.cxx
index eee5bd22093b6f9cfcad826e05c8bcefb9bb4dfa..454203b53ccfaf42c275de0493906cc1767c8207 100755
--- a/TileCalorimeter/TileIdentifier/src/TileRodIdHash.cxx
+++ b/TileCalorimeter/TileIdentifier/src/TileRodIdHash.cxx
@@ -70,6 +70,31 @@ void TileRodIdHash::initialize( int offset )  {
   m_size = n; 
 }
 
+void TileRodIdHash::initialize( int offset, const std::vector<ID>& rmod )  {
+
+//
+
+  m_offset = offset;
+
+  std::vector<ID>::const_iterator
+    it = rmod.begin();
+  std::vector<ID>::const_iterator
+    it_end = rmod.end() ;
+
+  int n = 0;
+  for (; it!=it_end;++it) {
+    ID id = *it;
+    unsigned int i = id;
+    m_lookup[i] = n ;
+    m_int2id.push_back(id);
+    ++n;
+  }
+
+  m_size = n;
+}
+
+
+
 TileRodIdHash::ID TileRodIdHash::identifier(int index) const {
 
   return m_int2id[index] ; 
diff --git a/TileCalorimeter/TileL2Algs/doc/packagedoc.h b/TileCalorimeter/TileL2Algs/doc/packagedoc.h
index 347c30bf693d6a49a12d297ee186fea19e249c1a..5b2ed8529f5d4d93eaa7d99216ad4a7407a68001 100644
--- a/TileCalorimeter/TileL2Algs/doc/packagedoc.h
+++ b/TileCalorimeter/TileL2Algs/doc/packagedoc.h
@@ -58,15 +58,5 @@ It takes as input the raw channels from TileRawChannelContainer. The resulting T
 
 </ul>
 
-@ref used_TileL2Algs
 
-@ref requirements_TileL2Algs
-*/
-
-/**
-@page used_TileL2Algs Used Packages
-*/
-
-/**
-@page requirements_TileL2Algs Requirements
 */
diff --git a/TileCalorimeter/TileMonitoring/TileMonitoring/ITileStuckBitsProbsTool.h b/TileCalorimeter/TileMonitoring/TileMonitoring/ITileStuckBitsProbsTool.h
index cc1975e8736c0dd346452d198495e1d9ff624a71..b6cdd681eccf7856f8735abc272cdf4cc0078fc1 100644
--- a/TileCalorimeter/TileMonitoring/TileMonitoring/ITileStuckBitsProbsTool.h
+++ b/TileCalorimeter/TileMonitoring/TileMonitoring/ITileStuckBitsProbsTool.h
@@ -5,6 +5,9 @@
 #ifndef TILEMONITORING_ITILESTUCKBITSPROBSTOOL_H
 #define TILEMONITORING_ITILESTUCKBITSPROBSTOOL_H
 
+// Gaudi include(s):
+#include "GaudiKernel/IAlgTool.h"
+
 class TTree;
 
 class ITileStuckBitsProbsTool: virtual public IAlgTool {
diff --git a/TileCalorimeter/TileMonitoring/TileMonitoring/TileDQFragLWMonTool.h b/TileCalorimeter/TileMonitoring/TileMonitoring/TileDQFragLWMonTool.h
index 15c4e5e6ac50f9ab62c6908844de285488bc2738..2335db876c22b41e3d58888ec1712f19a7fa569a 100644
--- a/TileCalorimeter/TileMonitoring/TileMonitoring/TileDQFragLWMonTool.h
+++ b/TileCalorimeter/TileMonitoring/TileMonitoring/TileDQFragLWMonTool.h
@@ -110,7 +110,10 @@ class TileDQFragLWMonTool: public TileFatherMonTool {
 
     bool m_isFirstEvent;
 
-    static const int NERROR = 15;
+    static const int NERROR = 17;
+    static const int MASKEDERROR = NERROR - 3;
+    static const int DCSERROR = NERROR - 2;
+    static const int HVERROR = NERROR - 1;
     static const int NCORRUPTED = 13;
     static const int NDMU = 16;
 
diff --git a/TileCalorimeter/TileMonitoring/TileMonitoring/TileDQFragMonTool.h b/TileCalorimeter/TileMonitoring/TileMonitoring/TileDQFragMonTool.h
index c24504d5e2a6b3daf23c9ad524ad8358a0f5d91e..2c0f3ad927c1a410eecb2196668285f46bdfe0db 100644
--- a/TileCalorimeter/TileMonitoring/TileMonitoring/TileDQFragMonTool.h
+++ b/TileCalorimeter/TileMonitoring/TileMonitoring/TileDQFragMonTool.h
@@ -114,7 +114,10 @@ class TileDQFragMonTool: public TileFatherMonTool {
     TProfile* m_hist_error_lb[4][64];
 
 
-    static const int NERROR = 15;
+    static const int NERROR = 17;
+    static const int MASKEDERROR = NERROR - 3;
+    static const int DCSERROR = NERROR - 2;
+    static const int HVERROR = NERROR - 1;
     static const int NCORRUPTED = 13;
     static const int NDMU = 16;
 
diff --git a/TileCalorimeter/TileMonitoring/TileMonitoring/TilePaterMonTool.h b/TileCalorimeter/TileMonitoring/TileMonitoring/TilePaterMonTool.h
index 46603880d0382a4899d7c3a3e2e36f06658c7cdf..7af685d0905ee3422c033cf3276d1e078ef4ab33 100644
--- a/TileCalorimeter/TileMonitoring/TileMonitoring/TilePaterMonTool.h
+++ b/TileCalorimeter/TileMonitoring/TileMonitoring/TilePaterMonTool.h
@@ -60,7 +60,8 @@ class TilePaterMonTool: public ManagedMonitorToolBase
   ~TilePaterMonTool();
 
   StatusCode initialize();
-    
+
+  enum TileFragStatus {ALL_OK=0, CRC_ERR=1, ALL_FF=0x10, ALL_00=0x20, NO_FRAG=0x40, NO_ROB=0x80};
 
 protected:
 /// Implicit version of book1D 
diff --git a/TileCalorimeter/TileMonitoring/TileMonitoring/TileTBBeamMonTool.h b/TileCalorimeter/TileMonitoring/TileMonitoring/TileTBBeamMonTool.h
index 6265eca05e62fdf52e13035a4462b315cc0db9bf..d5582086b26cf4a7fdbdad4975eaa216c2715338 100644
--- a/TileCalorimeter/TileMonitoring/TileMonitoring/TileTBBeamMonTool.h
+++ b/TileCalorimeter/TileMonitoring/TileMonitoring/TileTBBeamMonTool.h
@@ -106,9 +106,9 @@ class TileTBBeamMonTool: public TileFatherMonTool {
     int m_muHalo;
     int m_muVeto;
 
-    float m_muBack[8]; // MUON/MuBack
+    float m_muBack[16]; // MUON/MuBack
 
-    int m_btdc[8];
+    int m_btdc[16];
 
     //PMT counters
     int m_pmt1cou;
diff --git a/TileCalorimeter/TileMonitoring/doc/packagedoc.h b/TileCalorimeter/TileMonitoring/doc/packagedoc.h
index e1e1c8504a1eb17d161adf7d3c8541b69e393e93..6ff8be1dd41739a71f6460935dedc1492ad2f81f 100644
--- a/TileCalorimeter/TileMonitoring/doc/packagedoc.h
+++ b/TileCalorimeter/TileMonitoring/doc/packagedoc.h
@@ -35,17 +35,5 @@ analysis
 @section TileMonitoring_TileCosmicViewer 
 TileCosmicViewer is a root-based tool developed by Luciano Filho to display Tile and LAr cells and TileMuonFitter objects.
 
-@ref used_TileMonitoring
-@ref requirements_TileMonitoring
 
 */
-
-/**
-@page used_TileMonitoring Used Packages
-*/
-
-/**
-@page requirements_TileMonitoring Requirements
-*/
-
-
diff --git a/TileCalorimeter/TileMonitoring/share/TileRec_FlagOptions.py b/TileCalorimeter/TileMonitoring/share/TileRec_FlagOptions.py
index 22239c039efe3a85b8856b99554c1aed9efd7aa1..7c5a5221d130d944a5c78dce21325154aef14a42 100644
--- a/TileCalorimeter/TileMonitoring/share/TileRec_FlagOptions.py
+++ b/TileCalorimeter/TileMonitoring/share/TileRec_FlagOptions.py
@@ -109,10 +109,10 @@ if not 'TileUseCOOL' in dir():
    
 if TileUseCOOL and not 'tileCOOLtag' in dir():
     if doOnline:
-        tileCOOLtag = "CONDBR2-HLTP-2016-01"
+        tileCOOLtag = "CONDBR2-HLTP-2017-03"
     else:
         if RunNumber > 232498:
-            tileCOOLtag = "CONDBR2-BLKPA-2016-11"
+            tileCOOLtag = "CONDBR2-BLKPA-2017-10"
         else:
             tileCOOLtag = "COMCOND-BLKPA-RUN1-06"
 
diff --git a/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py b/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py
index 11830146f9be3865dfb68a68eefff664001ef20a..6c66cd8e5fecdaf2387f088a42f27dfe35c0d3c0 100644
--- a/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py
+++ b/TileCalorimeter/TileMonitoring/share/TileRec_topOptions.py
@@ -8,7 +8,7 @@
 
 from os import system, popen
 
-def FindFile(path, runinput):
+def FindFile(path, runinput, filter):
 
     run = str(runinput)
 
@@ -19,15 +19,15 @@ def FindFile(path, runinput):
     fullname = []
 
     if path.startswith('/castor') :
-        for f in popen('nsls %(path)s | grep %(run)s' % {'path': path, 'run':run }):
+        for f in popen('nsls %(path)s | grep %(run)s | grep %(filt)s' % {'path': path, 'run':run, 'filt':filter }):
             files.append(f)
 
     elif path.startswith('/eos') :
-        for f in popen('eos ls %(path)s | grep %(run)s' % {'path': path, 'run':run }):
+        for f in popen('eos ls %(path)s | grep %(run)s | grep %(filt)s' % {'path': path, 'run':run, 'filt':filter }):
             files.append(f)
 
     else:
-        for f in popen('ls  %(path)s | grep %(run)s' % {'path': path, 'run':run }):
+        for f in popen('ls  %(path)s | grep %(run)s | grep %(filt)s' % {'path': path, 'run':run, 'filt':filter }):
             files.append(f)
             
 
@@ -114,10 +114,12 @@ if not athenaCommonFlags.isOnline():
        else:
            RunFromLocal = False
    
-    if not 'FileNameVec' in dir():
-        if not 'FileName' in dir():
+    if not 'FileNameVec' in dir() or len(FileNameVec) == 0 or len(FileNameVec[0]) == 0:
+        if not 'FileName' in dir() or len(FileName)==0:
 
-            tmp = FindFile(InputDirectory, RunNumber)
+            if not 'FileFilter' in dir():
+                FileFilter = "data"
+            tmp = FindFile(InputDirectory, RunNumber, FileFilter)
             FileNameVec = tmp[0]
             FormattedRunNumber = tmp[1]
             
diff --git a/TileCalorimeter/TileMonitoring/src/TileDQFragLWMonTool.cxx b/TileCalorimeter/TileMonitoring/src/TileDQFragLWMonTool.cxx
index 6555e2be50c50e3c37cb935dd29f538299174145..78ca956a783bf6ecbc3c6042bb6265c461b6ccf8 100644
--- a/TileCalorimeter/TileMonitoring/src/TileDQFragLWMonTool.cxx
+++ b/TileCalorimeter/TileMonitoring/src/TileDQFragLWMonTool.cxx
@@ -81,9 +81,12 @@ TileDQFragLWMonTool::TileDQFragLWMonTool(const std::string & type, const std::st
   m_errorsLabels.push_back("DOUBLE_STB");         // Error: 9
   m_errorsLabels.push_back("SINGLE_STB");         // Error: 10
   m_errorsLabels.push_back("GLOBAL_CRC");         // Error: 11
-  m_errorsLabels.push_back("MASKED");             // Error: 12
-  m_errorsLabels.push_back("ALL_M_BAD_DCS");      // Error: 13
-  m_errorsLabels.push_back("ANY_CH_BAD_HV");      // Error: 14
+  m_errorsLabels.push_back("DUMMY_FRAG");         // Error: 12
+  m_errorsLabels.push_back("NO_RECO_FFAG");       // Error: 13
+  m_errorsLabels.push_back("MASKED");             // Error: 14
+  m_errorsLabels.push_back("ALL_M_BAD_DCS");      // Error: 15
+  m_errorsLabels.push_back("ANY_CH_BAD_HV");      // Error: 16
+  assert( m_errorsLabels.size() == NERROR );
   // corrupted data
   m_errorsLabels.push_back("0 -> 1023");          // Error: NERROR - 1 + 1
   m_errorsLabels.push_back("Zeros");              // Error: NERROR - 1 + 2
@@ -98,6 +101,7 @@ TileDQFragLWMonTool::TileDQFragLWMonTool(const std::string & type, const std::st
   m_errorsLabels.push_back("Single Dn LG_s6");    // Error: NERROR - 1 + 11
   m_errorsLabels.push_back("Up LG_s0_s6 or Gap"); // Error: NERROR - 1 + 12
   m_errorsLabels.push_back("Dn LG_s0_s6 or Gap"); // Error: NERROR - 1 + 13
+  assert( m_errorsLabels.size() == (NERROR+NCORRUPTED) );
   
   m_partitionsLabels.push_back("LBA");
   m_partitionsLabels.push_back("LBC");
@@ -486,7 +490,10 @@ void TileDQFragLWMonTool::fillBadDrawer() {
           int channel = m_tileHWID->channel(adcId);
           int gain = m_tileHWID->adc(adcId);
 
-          if ((error = TileRawChannelBuilder::CorruptedData(ROS, drawer, channel, gain, pDigits->samples(), dmin, dmax)) > 0) {
+          error = TileRawChannelBuilder::CorruptedData(ROS, drawer, channel, gain, pDigits->samples(), dmin, dmax);
+
+          if ( (error > 0) &&
+              !(isDisconnected(ROS, drawer, channel) || m_tileBadChanTool->getAdcStatus(adcId).isBad()) ) {
             ++nBadCh;
             if (msgLvl(MSG::DEBUG)) {
               msg(MSG::DEBUG) << "LB " << getLumiBlock()
@@ -544,7 +551,6 @@ void TileDQFragLWMonTool::fillErrorsHistograms(unsigned int ros, unsigned int dr
 /*---------------------------------------------------------*/
 
 
-  bool hasErr = false;
   int n_error_nonmask_DMU = 0;
   unsigned int cur_lb = getLumiBlock();
 
@@ -554,9 +560,17 @@ void TileDQFragLWMonTool::fillErrorsHistograms(unsigned int ros, unsigned int dr
 
     m_errorsLB[ros][drawer]->Fill(cur_lb, -1.);
 
-    for (int idmu = 0; idmu < NDMU; ++idmu) fillOneError(ros, drawer, idmu, 13);
+    for (int idmu = 0; idmu < NDMU; ++idmu) fillOneError(ros, drawer, idmu, DCSERROR);
 
   } else {
+    int status = m_dqStatus->checkGlobalErr(ros + 1, drawer, 0);
+    int err = 0;
+    if (status & (TileFragStatus::ALL_FF | TileFragStatus::ALL_00)) {
+      err = 12;
+    } else if (status & (TileFragStatus::NO_FRAG | TileFragStatus::NO_ROB)) {
+      err = 13;
+    }
+
     for (int idmu = 0; idmu < NDMU; idmu++) { // loop over dmus
       int ichn = 3 * idmu;
 
@@ -572,15 +586,17 @@ void TileDQFragLWMonTool::fillErrorsHistograms(unsigned int ros, unsigned int dr
                   && !m_tileBadChanTool->getChannelStatus(drawerIdx, ichn + 2).contains(TileBchPrbs::NoHV)
                   && !m_tileBadChanTool->getChannelStatus(drawerIdx, ichn + 2).contains(TileBchPrbs::WrongHV)))) {
         
-        fillOneError(ros, drawer, idmu, 14);      
+        fillOneError(ros, drawer, idmu, HVERROR);
       }
 
       if (m_dqStatus->isChanDQgood(ros + 1, drawer, ichn)) {
         fillOneError(ros, drawer, idmu, 0);
       } else {
-        hasErr |= checkHasErrors(ros, drawer, idmu);
         if (checkHasErrors(ros, drawer, idmu)) n_error_nonmask_DMU++;
-        if (m_dqStatus->checkHeaderFormatErr(ros + 1, drawer, idmu, 0) != 0) { // in case of format errors, we only fill this one
+
+        if (err) {
+          fillOneError(ros, drawer, idmu, err);
+        } else if (m_dqStatus->checkHeaderFormatErr(ros + 1, drawer, idmu, 0) != 0) { // in case of format errors, we only fill this one
           fillOneError(ros, drawer, idmu, 1);
         } else {
           if (m_dqStatus->checkHeaderParityErr(ros + 1, drawer, idmu, 0) != 0) {
@@ -683,19 +699,19 @@ void TileDQFragLWMonTool::fillMasking() {
           sp_EB = false;
 
         if (status0.isBad() && status1.isBad() && status2.isBad()) {
-          m_errors[ros][drawer]->Fill(dmu, 12, 1);
+          m_errors[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if ((ros > 1) && ((ch == 18 && !sp_EB) || ch == 33)) { //disconnected channels for EBs
-          if (status2.isBad()) m_errors[ros][drawer]->Fill(dmu, 12, 1);
+          if (status2.isBad()) m_errors[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if ((ros < 2) && (ch == 30)) { //disconnected channels for LBs
-          if (status2.isBad()) m_errors[ros][drawer]->Fill(dmu, 12, 1);
+          if (status2.isBad()) m_errors[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if ((ros < 2) && (ch == 42)) { //disconnected channels for LBs
-          if (status0.isBad() && status2.isBad()) m_errors[ros][drawer]->Fill(dmu, 12, 1);
+          if (status0.isBad() && status2.isBad()) m_errors[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if ((ros > 1) && (ch == 24 || ch == 27 || ch == 42 || ch == 45)) { // void DMUs for EBs
-          m_errors[ros][drawer]->Fill(dmu, 12, 1);
+          m_errors[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if (sp_EB && (ch == 0)) { // void DMU 0 for EBA15, EBC18
-          m_errors[ros][drawer]->Fill(dmu, 12, 1);
+          m_errors[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if (sp_EB && (ch == 3)) { // disconnected PMT of DMU 1 for EBA15, EBC18
-          if (status1.isBad() && status2.isBad()) m_errors[ros][drawer]->Fill(dmu, 12, 1);
+          if (status1.isBad() && status2.isBad()) m_errors[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         }
       } //chan loop
     } // drawer loop
@@ -710,10 +726,10 @@ bool TileDQFragLWMonTool::checkHasErrors(unsigned int ros, unsigned int drawer,
 /*---------------------------------------------------------*/
 
   if (ros < 2) {
-    if (m_errors[ros][drawer]->GetBinContent(dmu + 1, 13) > 0) return false;
+    if (m_errors[ros][drawer]->GetBinContent(dmu + 1, MASKEDERROR + 1) > 0) return false;
   } else {
     if ((dmu == 8) || (dmu == 9) || (dmu == 14) || (dmu == 15)
-        || (m_errors[ros][drawer]->GetBinContent(dmu + 1, 13) > 0))
+        || (m_errors[ros][drawer]->GetBinContent(dmu + 1, MASKEDERROR + 1) > 0))
       return false;
     else if (((drawer == 14) && (ros == 2)) || ((drawer == 17) && (ros == 3))) {
       if (dmu == 0) return false;
@@ -835,5 +851,3 @@ int TileDQFragLWMonTool::findChannelErrors(const TileRawChannel *rch, int & gain
 }
 /*---------------------------------------------------------*/
 
-
-
diff --git a/TileCalorimeter/TileMonitoring/src/TileDQFragMonTool.cxx b/TileCalorimeter/TileMonitoring/src/TileDQFragMonTool.cxx
index 655946b969064a74cac9dd39ba857a3ed106b634..c0c048ca2babc89a93e6666abaa15aaae735d6ef 100644
--- a/TileCalorimeter/TileMonitoring/src/TileDQFragMonTool.cxx
+++ b/TileCalorimeter/TileMonitoring/src/TileDQFragMonTool.cxx
@@ -90,9 +90,12 @@ TileDQFragMonTool::TileDQFragMonTool(const std::string & type, const std::string
   m_ErrorsLabels.push_back("DOUBLE_STB");         // Error: 9
   m_ErrorsLabels.push_back("SINGLE_STB");         // Error: 10
   m_ErrorsLabels.push_back("GLOBAL_CRC");         // Error: 11
-  m_ErrorsLabels.push_back("MASKED");             // Error: 12
-  m_ErrorsLabels.push_back("ALL_M_BAD_DCS");      // Error: 13
-  m_ErrorsLabels.push_back("ANY_CH_BAD_HV");      // Error: 14
+  m_ErrorsLabels.push_back("DUMMY_FRAG");         // Error: 12
+  m_ErrorsLabels.push_back("NO_RECO_FFAG");       // Error: 13
+  m_ErrorsLabels.push_back("MASKED");             // Error: 14
+  m_ErrorsLabels.push_back("ALL_M_BAD_DCS");      // Error: 15
+  m_ErrorsLabels.push_back("ANY_CH_BAD_HV");      // Error: 16
+  assert( m_ErrorsLabels.size() == NERROR );
   // corrupted data
   m_ErrorsLabels.push_back("0 -> 1023");          // Error: NERROR - 1 + 1
   m_ErrorsLabels.push_back("Zeros");              // Error: NERROR - 1 + 2
@@ -107,6 +110,7 @@ TileDQFragMonTool::TileDQFragMonTool(const std::string & type, const std::string
   m_ErrorsLabels.push_back("Single Dn LG_s6");    // Error: NERROR - 1 + 11
   m_ErrorsLabels.push_back("Up LG_s0_s6 or Gap"); // Error: NERROR - 1 + 12
   m_ErrorsLabels.push_back("Dn LG_s0_s6 or Gap"); // Error: NERROR - 1 + 13
+  assert( m_ErrorsLabels.size() == (NERROR+NCORRUPTED) );
   
   m_PartitionsLabels.push_back("LBA");
   m_PartitionsLabels.push_back("LBC");
@@ -620,7 +624,10 @@ void TileDQFragMonTool::fillBadDrawer() {
           int channel = m_tileHWID->channel(adcId);
           int gain = m_tileHWID->adc(adcId);
 
-          if ((error = TileRawChannelBuilder::CorruptedData(ROS, drawer, channel, gain, pDigits->samples(), dmin, dmax)) > 0) {
+          error = TileRawChannelBuilder::CorruptedData(ROS, drawer, channel, gain, pDigits->samples(), dmin, dmax);
+
+          if ( (error > 0) &&
+              !(isDisconnected(ROS, drawer, channel) || m_tileBadChanTool->getAdcStatus(adcId).isBad()) ) {
             ++nBadCh;
             if (msgLvl(MSG::DEBUG)) {
               msg(MSG::DEBUG) << "LB " << getLumiBlock()
@@ -689,7 +696,6 @@ void TileDQFragMonTool::fillErrHist(int ros, int drawer) {
 /*---------------------------------------------------------*/
 
 
-  bool hasErr = false;
   int n_error_nonmask_DMU = 0;
   unsigned int cur_lb = getLumiBlock();
 
@@ -707,9 +713,17 @@ void TileDQFragMonTool::fillErrHist(int ros, int drawer) {
     if (m_doOnline) m_hist_error_lb[ros][drawer]->Fill(0., -1.);
     else m_hist_error_lb[ros][drawer]->Fill(cur_lb, -1.);
 
-    for (int idmu = 0; idmu < NDMU; ++idmu) fillOneErrHist(ros, drawer, idmu, 13);
+    for (int idmu = 0; idmu < NDMU; ++idmu) fillOneErrHist(ros, drawer, idmu, DCSERROR);
 
   } else {
+    int status = m_dqStatus->checkGlobalErr(ros + 1, drawer, 0);
+    int err = 0;
+    if (status & (TileFragStatus::ALL_FF | TileFragStatus::ALL_00)) {
+      err = 12;
+    } else if (status & (TileFragStatus::NO_FRAG | TileFragStatus::NO_ROB)) {
+      err = 13;
+    }
+
     for (int idmu = 0; idmu < NDMU; idmu++) { // loop over dmus
       int ichn = 3 * idmu;
 
@@ -725,15 +739,17 @@ void TileDQFragMonTool::fillErrHist(int ros, int drawer) {
                   && !m_tileBadChanTool->getChannelStatus(drawerIdx, ichn + 2).contains(TileBchPrbs::NoHV)
                   && !m_tileBadChanTool->getChannelStatus(drawerIdx, ichn + 2).contains(TileBchPrbs::WrongHV)))) {
 
-        fillOneErrHist(ros, drawer, idmu, 14);      
+        fillOneErrHist(ros, drawer, idmu, HVERROR);      
       }
 
       if (m_dqStatus->isChanDQgood(ros + 1, drawer, ichn)) {
         fillOneErrHist(ros, drawer, idmu, 0);
       } else {
-        hasErr |= CheckhasErr(ros, drawer, idmu);
         if (CheckhasErr(ros, drawer, idmu)) n_error_nonmask_DMU++;
-        if (m_dqStatus->checkHeaderFormatErr(ros + 1, drawer, idmu, 0) != 0) { // in case of format errors, we only fill this one
+        
+        if (err) {
+          fillOneErrHist(ros, drawer, idmu, err);
+        } else if (m_dqStatus->checkHeaderFormatErr(ros + 1, drawer, idmu, 0) != 0) { // in case of format errors, we only fill this one
           fillOneErrHist(ros, drawer, idmu, 1);
         } else {
           if (m_dqStatus->checkHeaderParityErr(ros + 1, drawer, idmu, 0) != 0) {
@@ -816,7 +832,7 @@ void TileDQFragMonTool::updateHistograms() {
   for (int ros = 0; ros < 4; ros++) {  //loop over ros...
     for (int drawer = 0; drawer < 64; ++drawer) {
       for (int dmu = 0; dmu < NDMU; dmu++) {
-        Int_t bin = m_hist_error[ros][drawer]->FindBin(dmu, NERROR - 3);
+        Int_t bin = m_hist_error[ros][drawer]->FindBin(dmu, MASKEDERROR);
         if (m_hist_error[ros][drawer]->GetBinContent(bin) > 0)
           m_hist_error[ros][drawer]->SetBinContent(bin, m_UpdateTotal);
         m_hist_error[ros][drawer]->SetEntries(m_UpdateTotal);
@@ -951,6 +967,7 @@ void TileDQFragMonTool::fillMasking()
     for (int drawer = 0; drawer < 64; ++drawer) {
       unsigned int idx = TileCalibUtils::getDrawerIdx(ros + 1, drawer);
       for (int ch = 0; ch < 48; ch += 3) {
+        int dmu = ch / 3;
         TileBchStatus status0 = m_tileBadChanTool->getAdcStatus(idx, ch, 1);
         status0 += m_tileBadChanTool->getAdcStatus(idx, ch, 0);
         TileBchStatus status1 = m_tileBadChanTool->getAdcStatus(idx, ch + 1, 1);
@@ -964,19 +981,19 @@ void TileDQFragMonTool::fillMasking()
           sp_EB = false;
 
         if (status0.isBad() && status1.isBad() && status2.isBad()) {
-          m_hist_error[ros][drawer]->Fill(ch / 3, 12, 1);
+          m_hist_error[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if ((ros > 1) && ((ch == 18 && !sp_EB) || ch == 33)) { //disconnected channels for EBs
-          if (status2.isBad()) m_hist_error[ros][drawer]->Fill(ch / 3, 12, 1);
+          if (status2.isBad()) m_hist_error[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if ((ros < 2) && (ch == 30)) { //disconnected channels for LBs
-          if (status2.isBad()) m_hist_error[ros][drawer]->Fill(ch / 3, 12, 1);
+          if (status2.isBad()) m_hist_error[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if ((ros < 2) && (ch == 42)) { //disconnected channels for LBs
-          if (status0.isBad() && status2.isBad()) m_hist_error[ros][drawer]->Fill(ch / 3, 12, 1);
+          if (status0.isBad() && status2.isBad()) m_hist_error[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if ((ros > 1) && (ch == 24 || ch == 27 || ch == 42 || ch == 45)) { // void DMUs for EBs
-          m_hist_error[ros][drawer]->Fill(ch / 3, 12, 1);
+          m_hist_error[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if (sp_EB && (ch == 0)) { // void DMU 0 for EBA15, EBC18
-          m_hist_error[ros][drawer]->Fill(ch / 3, 12, 1);
+          m_hist_error[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         } else if (sp_EB && (ch == 3)) { // disconnected PMT of DMU 1 for EBA15, EBC18
-          if (status1.isBad() && status2.isBad()) m_hist_error[ros][drawer]->Fill(ch / 3, 12, 1);
+          if (status1.isBad() && status2.isBad()) m_hist_error[ros][drawer]->Fill(dmu, MASKEDERROR, 1);
         }
       } //chan loop
     } // drawer loop
@@ -989,10 +1006,10 @@ bool TileDQFragMonTool::CheckhasErr(int ros, int drawer, int dmu) {
 /*---------------------------------------------------------*/
 
   if (ros < 2) {
-    if (m_hist_error[ros][drawer]->GetBinContent(dmu + 1, 13) > 0) return false;
+    if (m_hist_error[ros][drawer]->GetBinContent(dmu + 1, MASKEDERROR + 1) > 0) return false;
   } else {
     if ((dmu == 8) || (dmu == 9) || (dmu == 14) || (dmu == 15)
-        || (m_hist_error[ros][drawer]->GetBinContent(dmu + 1, 13) > 0))
+        || (m_hist_error[ros][drawer]->GetBinContent(dmu + 1, MASKEDERROR + 1) > 0))
       return false;
     else if (((drawer == 14) && (ros == 2)) || ((drawer == 17) && (ros == 3))) {
       if (dmu == 0) return false;
diff --git a/TileCalorimeter/TileMonitoring/src/TileDigitsMonTool.cxx b/TileCalorimeter/TileMonitoring/src/TileDigitsMonTool.cxx
index f6082c71410e4229b2caac1f4cf635e21e9daeac..72b8c1f9128023572cc0277f0eacff7418e94f8f 100644
--- a/TileCalorimeter/TileMonitoring/src/TileDigitsMonTool.cxx
+++ b/TileCalorimeter/TileMonitoring/src/TileDigitsMonTool.cxx
@@ -189,7 +189,7 @@ void TileDigitsMonTool::bookHists(int ros, int drawer)
     sStr << moduleName << " DMU Header " << gain[3 + gn] << " errors";
     histTitle = sStr.str();
 
-    m_hist2[ros][drawer][adc].push_back(book2F(subDir, histName, histTitle, 16, 0., 16., 6, -0.5, 5.5));
+    m_hist2[ros][drawer][adc].push_back(book2F(subDir, histName, histTitle, 16, 0., 16., 8, -0.5, 7.5));
   }
 
   for (int ch = 0; ch < 48; ++ch) {
@@ -353,6 +353,23 @@ StatusCode TileDigitsMonTool::fillHists()
       if (!m_bookAll) bookHists(ros, drawer);
     }
     
+    uint32_t status = digitsCollection->getFragStatus();
+    if (status != TileFragStatus::ALL_OK) {
+      float bin = 99.;
+      if (status & (TileFragStatus::ALL_FF | TileFragStatus::ALL_00)) {
+        bin = 6.;
+      } else if (status & (TileFragStatus::NO_FRAG | TileFragStatus::NO_ROB)) {
+        bin = 7.;
+      }
+      for (int dmu = 0; dmu < 16; dmu++) {
+        m_corrup[ros][drawer][0][dmu] = true;
+        m_corrup[ros][drawer][1][dmu] = true;
+        m_hist2[ros][drawer][0][0]->Fill(dmu + 0.5, bin, 1.);
+        m_hist2[ros][drawer][1][0]->Fill(dmu + 0.5, bin, 1.);
+      }
+      continue;
+    }
+
     std::vector<uint32_t> headerVec = digitsCollection->getFragChipHeaderWords();
 
     int headsize = headerVec.size();
@@ -1121,6 +1138,8 @@ void TileDigitsMonTool::drawHists(int ros, int drawer, std::string moduleName)
     m_hist2[ros][drawer][gain][0]->GetYaxis()->SetBinLabel(4, "Memory");
     m_hist2[ros][drawer][gain][0]->GetYaxis()->SetBinLabel(5, "SingleStr");
     m_hist2[ros][drawer][gain][0]->GetYaxis()->SetBinLabel(6, "DbleStr");
+    m_hist2[ros][drawer][gain][0]->GetYaxis()->SetBinLabel(7, "DummyFrag");
+    m_hist2[ros][drawer][gain][0]->GetYaxis()->SetBinLabel(8, "NoDataFrag");
     m_hist2[ros][drawer][gain][0]->GetYaxis()->SetTickLength(0.01);
     m_hist2[ros][drawer][gain][0]->GetYaxis()->SetLabelOffset(0.001);
     if (do_plots) {
@@ -1661,12 +1680,12 @@ bool TileDigitsMonTool::DMUheaderCheck(std::vector<uint32_t>* headerVec, int ros
   }
   if (((*headerVec)[dmu] >> 24) & 0x1) {
     //Single Strobe Error
-    m_hist2[ros][drawer][gain][0]->Fill(dmu + 0.5, 5., 1.);
+    m_hist2[ros][drawer][gain][0]->Fill(dmu + 0.5, 4., 1.);
     err = true;
   }
   if (((*headerVec)[dmu] >> 23) & 0x1) {
     //Double Strobe Error
-    m_hist2[ros][drawer][gain][0]->Fill(dmu + 0.5, 0., 1.);
+    m_hist2[ros][drawer][gain][0]->Fill(dmu + 0.5, 5., 1.);
     err = true;
   }
   if (!err) m_hist2[ros][drawer][gain][0]->Fill(dmu + 0.5, 0., 1.);
diff --git a/TileCalorimeter/TileMonitoring/src/TileTBBeamMonTool.cxx b/TileCalorimeter/TileMonitoring/src/TileTBBeamMonTool.cxx
index 6c255b805898206f72436b938be76685fb6d3863..122648547a3d885361de9f6d43d066f0210b28e0 100644
--- a/TileCalorimeter/TileMonitoring/src/TileTBBeamMonTool.cxx
+++ b/TileCalorimeter/TileMonitoring/src/TileTBBeamMonTool.cxx
@@ -112,6 +112,18 @@ TileTBBeamMonTool::TileTBBeamMonTool(const std::string & type, const std::string
   declareProperty("BC1Z", m_beamBC1Z  = 15600.0);
   declareProperty("BC2Z", m_beamBC2Z  = 2600.0); 
 
+  // June 2017 calibration, https://pcata007.cern.ch/elog/TB2017/550 (schae@cern.ch)
+  declareProperty("BC1HorizontalSlope", m_horizontal_slope1 = -0.175220);
+  declareProperty("BC1HorizontalOffset", m_horizontal_offset1 = 0.153584934082);
+  declareProperty("BC1VerticalSlope", m_vertical_slope1 = -0.176567356723);
+  declareProperty("BC1VerticalOffset", m_vertical_offset1 = -0.493246053303);
+
+  declareProperty("BC2HorizontalSlope", m_horizontal_slope2 = -0.176122);
+  declareProperty("BC2HorizontalOffset", m_horizontal_offset2 = 0.414611893278);
+  declareProperty("BC2VerticalSlope", m_vertical_slope2 = -0.173472808704);
+  declareProperty("BC2VerticalOffset", m_vertical_offset2 = 0.150807740888);
+
+  /*
   // Constant updated 29-09-26 by Joakim Olsson: https://pcata007.cern.ch/elog/TB2016/300
   declareProperty("BC1HorizontalSlope", m_horizontal_slope1 = -0.172098);
   declareProperty("BC1HorizontalOffset", m_horizontal_offset1 = 0.100857923042);
@@ -122,6 +134,7 @@ TileTBBeamMonTool::TileTBBeamMonTool(const std::string & type, const std::string
   declareProperty("BC2HorizontalOffset", m_horizontal_offset2 = 0.271555258578);
   declareProperty("BC2VerticalSlope", m_vertical_slope2 = -0.173805131744);
   declareProperty("BC2VerticalOffset", m_vertical_offset2 = 0.305483228502);
+  */
 
 //  //Constants updated 13-10-15 by Vincent & Michaela: https://pcata007.cern.ch/elog/TB2015/107
 //  declareProperty("BC1HorizontalSlope", m_horizontal_slope1 = -0.175666);
@@ -269,7 +282,7 @@ StatusCode TileTBBeamMonTool::storeBeamElements() {
 	  }
 
           if(cha < 6) {
-            m_muBack[cha] = amplitude;
+            m_muBack[8+cha] = amplitude;
             m_total_muon_energy += amplitude;
           }
 
@@ -279,7 +292,7 @@ StatusCode TileTBBeamMonTool::storeBeamElements() {
           
           FRAG_FOUND(frag, cha, dsize);
           
-          if (cha < 8) m_btdc[cha] = amplitude;
+          if (cha < 16) m_btdc[cha] = amplitude;
           else WRONG_CHANNEL(frag, cha);
           break;
           
diff --git a/TileCalorimeter/TileMuId/doc/packagedoc.h b/TileCalorimeter/TileMuId/doc/packagedoc.h
index fa480c8242eb0430cfd6f9e031e08fd3a093be75..a54350f8d9af14150ccc4cfca0cb3b0add95687a 100644
--- a/TileCalorimeter/TileMuId/doc/packagedoc.h
+++ b/TileCalorimeter/TileMuId/doc/packagedoc.h
@@ -46,15 +46,5 @@ takes as input the energy deposited in the TileCal cells.
   - TileMuToNtuple: dumps TileLookForMuAlg info into TileMuTag directory in
 the ntuple for analysis.
 
-@ref used_TileMuId
 
-@ref requirements_TileMuId
 */
-
-/**
-@page used_TileMuId Used Packages
-*/
-
-/**
-@page requirements_TileMuId Requirements
-*/ 
diff --git a/TileCalorimeter/TileRawUtils/CMakeLists.txt b/TileCalorimeter/TileRawUtils/CMakeLists.txt
index 3fd7290f3fce526d151c318f4e26b72dfb88052a..9f0f5b4f2786b9b3230f910eb06ac1715ba55972 100644
--- a/TileCalorimeter/TileRawUtils/CMakeLists.txt
+++ b/TileCalorimeter/TileRawUtils/CMakeLists.txt
@@ -18,13 +18,14 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/StoreGate
                           DetectorDescription/RegionSelector
                           TileCalorimeter/TileConditions
-                          TileCalorimeter/TileDetDescr )
+                          TileCalorimeter/TileDetDescr
+			  TileCalorimeter/TileSvc/TileByteStream )
 
 # Component(s) in the package:
 atlas_add_component( TileRawUtils
                      src/Tile*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES CaloIdentifier AthenaBaseComps Identifier GaudiKernel TileEvent TileIdentifier CaloDetDescrLib StoreGateLib SGtests RegionSelectorLib TileConditionsLib TileDetDescr )
+                     LINK_LIBRARIES CaloIdentifier AthenaBaseComps Identifier GaudiKernel TileEvent TileIdentifier CaloDetDescrLib StoreGateLib SGtests RegionSelectorLib TileConditionsLib TileDetDescr TileByteStreamLib )
 
 # Install files from the package:
 atlas_install_headers( TileRawUtils )
diff --git a/TileCalorimeter/TileRawUtils/TileRawUtils/TileRegionSelectorTable.h b/TileCalorimeter/TileRawUtils/TileRawUtils/TileRegionSelectorTable.h
index a2303a4da344a41e0bcc8a19f70ae83e4f7be51d..dcdf2a4690de0b69d66c2e350865bba616fcc3bb 100755
--- a/TileCalorimeter/TileRawUtils/TileRawUtils/TileRegionSelectorTable.h
+++ b/TileCalorimeter/TileRawUtils/TileRawUtils/TileRegionSelectorTable.h
@@ -12,6 +12,14 @@
 
 //#include "RegionSelector/IRegionLUT_Creator.h"
 #include "IRegionLUT_Creator.h"
+#include "TileByteStream/TileHid2RESrcID.h"
+#include "TileIdentifier/TileHWID.h"
+#include "TileCalibBlobObjs/TileCalibUtils.h"
+#include "CaloIdentifier/TileID.h"
+#include "TileDetDescr/TileDetDescrManager.h"
+#include "TileConditions/TileCablingService.h"
+#include "CaloDetDescr/CaloDetDescrElement.h"
+#include "TileByteStream/TileROD_Decoder.h"
 
 class RegionSelectorLUT;
 
diff --git a/TileCalorimeter/TileRawUtils/src/TileRegionSelectorTable.cxx b/TileCalorimeter/TileRawUtils/src/TileRegionSelectorTable.cxx
index e3e40ac388e1c8cd9c126768d81a8381c9c94dce..e62473582373020b2632e0de2079f9bcf1a99494 100755
--- a/TileCalorimeter/TileRawUtils/src/TileRegionSelectorTable.cxx
+++ b/TileCalorimeter/TileRawUtils/src/TileRegionSelectorTable.cxx
@@ -8,6 +8,8 @@
 #include "StoreGate/StoreGateSvc.h"
 
 #include <fstream>
+#include <iomanip>
+#include <cmath>
 
 #include "RegionSelector/RegionSelectorLUT.h" 
 #include "RegionSelector/StoreGateRS_ClassDEF.h" 
@@ -26,6 +28,9 @@
 //(const std::string& name, ISvcLocator* pSvcLocator): 
 //Service(name, pSvcLocator), 
 
+//#define USE_CELL_PHI 1
+//#define USE_MODULE_PHI 1
+
 TileRegionSelectorTable::TileRegionSelectorTable (const std::string& type,
 						  const std::string& name,
 						  const IInterface* parent)
@@ -95,7 +100,6 @@ TileRegionSelectorTable::getLUT(std::string subSyst) const
 
 }
 
-
 void
 TileRegionSelectorTable::fillMaps()
 {
@@ -103,59 +107,132 @@ TileRegionSelectorTable::fillMaps()
   std::string tileKey = "TileRegionSelectorLUT";
   StatusCode sc = detStore()->contains< RegionSelectorLUT >(tileKey);
   if (sc == StatusCode::SUCCESS ) {
-    ATH_MSG_ERROR ( " RegionSelectorLUT " << tileKey 
+    ATH_MSG_ERROR ( " RegionSelectorLUT " << tileKey
                     << " already exists => do nothing " );
     return;
   }
 
+  // Get the TileID helper from the detector store
+  const TileID* tileID;
+  if (detStore()->retrieve(tileID, "TileID").isFailure()) {
+    ATH_MSG_ERROR( "Could not get TileID helper !");
+    return;
+  }
+
+  // Get the TileHWID helper from the detector store
+  const TileHWID* tileHWID;
+  if (detStore()->retrieve(tileHWID, "TileHWID").isFailure()) {
+    ATH_MSG_ERROR( "Could not get TileHWID helper !");
+    return;
+  }
+
+  // Get pointer to TileDetDescrManager
+  const TileDetDescrManager* tileMgr;
+  if (detStore()->retrieve(tileMgr).isFailure()) {
+    ATH_MSG_ERROR( "Unable to retrieve TileDetDescrManager from DetectorStore" );
+    return;
+  }
+
+  ToolHandle<TileROD_Decoder> dec("TileROD_Decoder/TileROD_Decoder");
+  if((dec.retrieve()).isFailure()){
+    ATH_MSG_FATAL("Could not find TileRodDecoder");
+    return;
+  }
+
+  const TileHid2RESrcID* src = dec->getHid2reHLT();
+
   RegionSelectorLUT* ttLut= new RegionSelectorLUT (256);
 
   std::ofstream* ttmap=0;
 
   if(m_printTable) {
     ttmap = new std::ofstream(m_roiFileNameTile.c_str()) ;
-    *ttmap << 
+    *ttmap <<
       "# ROD_ID coll_id  hash_id   etamin       etamax       phimin       phimax" << std::endl;
   }
 
-
-  double dphi=0.09817477;
-
-  float etamin[4];
-  etamin[1]=-1.0; etamin[0]=-0.1; etamin[3]=-1.60943;  etamin[2]=+0.708779;
-  float etamax[4];
-  etamax[1]=+0.1; etamax[0]=+1.0; etamax[3]=-0.708779; etamax[2]=+1.60943;
-
-  int ROD[4];
-  ROD[0]=0x510000; ROD[1]=0x520000; ROD[2]=0x530000; ROD[3]=0x540000;
+  enum Partition { Ancillary = 0, LBA = 1, LBC = 2, EBA = 3, EBC = 4 };
+  // hard-coded etamin/etamax - ignoring slightly different positions of EBA end ENC partitions
+  std::vector<double> etamin(TileCalibUtils::MAX_ROS);
+  etamin[LBA]=-0.1;
+  etamin[LBC]=-1.0;
+  etamin[EBA]=+0.708779;
+  etamin[EBC]=-1.60943;
+  std::vector<double> etamax(TileCalibUtils::MAX_ROS);
+  etamax[LBA]=+1.0;
+  etamax[LBC]=+0.1;
+  etamax[EBA]=+1.60943;
+  etamax[EBC]=-0.708779;
+
+#if (defined USE_CELL_PHI)
+  TileCablingService* cabling = TileCablingService::getInstance();
+#elif (defined USE_MODULE_PHI)
+#else
+  double dphi = 2 * M_PI / TileCalibUtils::MAX_DRAWER; // 0.09817477;
+#endif
 
   int sam = 0; // ?
   int layer = 0; //?
+  int firstone = tileHWID->drawerIdx( tileHWID->drawer_id(LBA,0) ); // hash index of first real drawer (LBA01)
+  for (unsigned int ros = 0; ros < TileCalibUtils::MAX_ROS; ++ros) {
+    for (unsigned int drawer = 0; drawer < TileCalibUtils::MAX_DRAWER; ++drawer) {
 
-  for (int i =0; i < 4; ++i ) {
-    for (int j =0; j < 64; ++j ) {
-      //unsigned int rod=ROD[i]+j/4;
-      //unsigned int coll=(i+1)*256+j;
-      //unsigned int hash=i*64+j;
-
-      int rod=ROD[i]+j/4;
-      int coll=(i+1)*256+j;
-      int hash=i*64+j;
-
-      double phimin=j*dphi;
-      double phimax=(j+1)*dphi;
-      double etami = etamin[i];
-      double etama = etamax[i];
-
-      if (m_printTable) 
-	*ttmap << std::setw(7)  << std::hex << rod  << " "
-	       << std::setw(6)  << std::hex << coll << " "
-	       << std::setw(7)  << std::hex << hash << " "
-	       << std::ios::fixed << std::setw(12) << etami  << " "
-	       << std::ios::fixed << std::setw(12) << etama  << " "
-	       << std::ios::fixed << std::setw(12) << phimin << " "
-	       << std::ios::fixed << std::setw(12) << phimax << std::endl;
+      int hash = tileHWID->drawerIdx( tileHWID->drawer_id(ros,drawer) ) - firstone;
+      if (hash<0) continue;
       
+      int coll = tileHWID->frag(ros, drawer);
+      int rod = src->getRodID(coll);
+
+      double etami = etamin[ros];
+      double etama = etamax[ros];
+
+#if (defined USE_CELL_PHI)
+      Identifier cell_id;
+      int index, pmt;
+      for (int ch=0; ch<cabling->getMaxChannels(); ch++){
+         HWIdentifier channelID = tileHWID->channel_id(ros,drawer,ch);
+         cell_id = cabling->h2s_cell_id_index(channelID,index,pmt);
+         if ( index >= 0 ) break; // found a normal cell
+      }
+
+      int cell_hash = tileID->cell_hash(cell_id);
+      CaloDetDescrElement* DDE = tileMgr->get_cell_element((IdentifierHash) cell_hash);
+      double phimin = DDE->phi() - DDE->dphi()/2.0;
+      if ( phimin < 0.0 ) phimin+=2*M_PI;
+      double phimax = phimin + DDE->dphi();
+#elif (defined USE_MODULE_PHI)
+      // alternative approach
+      int section = (ros==LBA || ros==LBC) ? TileID::BARREL : TileID::EXTBAR;
+      int side = (ros==LBA || ros==EBA) ? TileID::POSITIVE : TileID::NEGATIVE;
+      Identifier moduleID = tileID->module_id(section,side,drawer);
+      CaloDetDescriptor *moduleDDE = tileMgr->get_module_element(moduleID);
+      double phimin = moduleDDE->calo_phi_min();
+      double phimax = moduleDDE->calo_phi_max();
+      if ( phimin < 0.0 ) {
+        phimin+=2*M_PI;
+        if ( phimax < phimin ) phimax+=2*M_PI;
+      }
+#else
+      // OLD method - we can predict phi boundaries from module number
+      double phimin = drawer * dphi;
+      double phimax = (drawer+1) * dphi;
+#endif
+
+      if (m_printTable){
+        ttmap->precision(7);
+        *ttmap << std::hex
+               << std::setw(7) << rod  << " "
+               << std::setw(6) << coll << " "
+               << std::setw(7) << hash << " "
+               << std::dec
+               << std::setw(12) << etami  << " "
+               << std::setw(12) << etama  << " ";
+        ttmap->precision(17);
+        *ttmap << std::setw(22) << phimin << " "
+               << std::setw(22) << phimax
+               << std::endl;
+      }
+
       ttLut->additem(etami,etama,phimin,phimax,sam,layer,hash,rod);
 
     }
@@ -165,10 +242,13 @@ TileRegionSelectorTable::fillMaps()
 
   recordMap(ttLut,tileKey).ignore();
 
-  if (m_printTable) 
+  if (m_printTable)
     delete ttmap;
+
+
 }
 
+
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 StatusCode 
diff --git a/TileCalorimeter/TileRecAlgs/CMakeLists.txt b/TileCalorimeter/TileRecAlgs/CMakeLists.txt
index d95068d7b1fd9f407c408c38e8e684adf0f21760..34ba5b2d6fb63063e81e30af7e6988df25b79da1 100644
--- a/TileCalorimeter/TileRecAlgs/CMakeLists.txt
+++ b/TileCalorimeter/TileRecAlgs/CMakeLists.txt
@@ -38,7 +38,7 @@ atlas_add_component( TileRecAlgs
                      src/MBTSTimeDiffEventInfoAlg.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps StoreGateLib SGtests GaudiKernel TileIdentifier CaloDetDescrLib CaloEvent AthenaKernel Identifier xAODEventInfo TileCalibBlobObjs TileConditionsLib TileDetDescr TileEvent TileRecUtilsLib TileSimEvent )
+                     LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} CaloIdentifier AthenaBaseComps StoreGateLib SGtests GaudiKernel TileIdentifier CaloDetDescrLib CaloEvent AthenaKernel Identifier xAODEventInfo TileCalibBlobObjs TileConditionsLib TileDetDescr TileEvent TileRecUtilsLib TileSimEvent EventContainers )
 
 
 atlas_add_test( TileDigitsThresholdFilter_test
diff --git a/TileCalorimeter/TileRecUtils/TileRecUtils/TileBeamInfoProvider.h b/TileCalorimeter/TileRecUtils/TileRecUtils/TileBeamInfoProvider.h
index 566ea05d8fe6562078e62acb12b1bcac4b7f41fc..98a269c161bc3328f48ff8ab43ace99281243c60 100644
--- a/TileCalorimeter/TileRecUtils/TileRecUtils/TileBeamInfoProvider.h
+++ b/TileCalorimeter/TileRecUtils/TileRecUtils/TileBeamInfoProvider.h
@@ -101,6 +101,10 @@ class TileDQstatus {
 	return (m_EmptyEventArray[partition][drawer][dmu][0]+((m_EmptyEventArray[partition][drawer][dmu][1]) << 1));
   }
   
+  /** @brief returns 1 if adc channel has any global error */
+  inline int checkGlobalErr(int partition, int drawer, int gain) const {
+    return m_GlobalCRCErrArray[partition][drawer][gain];
+  }
   /** @brief returns 1 if adc channel has global CRC error */
   inline int checkGlobalCRCErr(int partition, int drawer, int gain) const {
     return m_GlobalCRCErrArray[partition][drawer][gain] & 1;
diff --git a/TileCalorimeter/TileRecUtils/doc/packagedoc.h b/TileCalorimeter/TileRecUtils/doc/packagedoc.h
index 93ebb0a5c37cd88fbeb31a9331dbfefa64325ff0..65e95a690c1601c02d42ba5aa3a4960ccd3cbf4e 100644
--- a/TileCalorimeter/TileRecUtils/doc/packagedoc.h
+++ b/TileCalorimeter/TileRecUtils/doc/packagedoc.h
@@ -47,16 +47,5 @@ This package contains the algorithms and tools used for TileCal reconstruction
 
   - TileTowerBuilderTool: creates Tower-type cell clusters to be used in jet reconstruction
 
-@ref used_MyPackage
-
-@ref requirements_MyPackage
-*/
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
 
 */
diff --git a/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py b/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py
index 7b8b043d2fad5d4135b0f7add00f33ad68e9c296..b6e0d18c240641008cdfca369207eb9c1a6bae6d 100644
--- a/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py
+++ b/TileCalorimeter/TileRecUtils/python/TileRawChannelGetter.py
@@ -45,9 +45,9 @@ class TileRawChannelGetter ( Configured)  :
 
         # Configure TileInfoLoader
         from AthenaCommon.AppMgr import ServiceMgr
-        if not hasattr( ServiceMgr, "TileInfoLoader" ):
-            from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-            tileInfoConfigurator = TileInfoConfigurator()
+
+        from TileConditions.TileInfoConfigurator import TileInfoConfigurator
+        tileInfoConfigurator = TileInfoConfigurator()
 
         # register output in objKeyStore
         from RecExConfig.ObjKeyStore import objKeyStore
@@ -99,8 +99,6 @@ class TileRawChannelGetter ( Configured)  :
         if jobproperties.TileRecFlags.noiseFilter() == 1:
 
             if globalflags.DataSource() == 'data':
-                from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                tileInfoConfigurator = TileInfoConfigurator()
 
                 # check if there are DSP thresholds in DB
                 if jobproperties.TileRecFlags.zeroAmplitudeWithoutDigits() and not tileInfoConfigurator.setupCOOLDspThreshold():
@@ -139,6 +137,30 @@ class TileRawChannelGetter ( Configured)  :
         # run optimal filter only if readDigits is set
         if jobproperties.TileRecFlags.readDigits():
 
+            TilePulseTypes = {0 : 'PHY', 1 : 'PHY', 2 : 'LAS', 4 : 'PHY', 8 : 'CIS'}
+            TilePulse = TilePulseTypes[jobproperties.TileRecFlags.TileRunType()]
+
+            if (jobproperties.TileRecFlags.doTileFitCool()
+                or (not jobproperties.TileRecFlags.OfcFromCOOL()
+                    and (jobproperties.TileRecFlags.doTileMF()
+                         or jobproperties.TileRecFlags.doTileOF1()
+                         or jobproperties.TileRecFlags.doTileOpt2()
+                         or jobproperties.TileRecFlags.doTileOptATLAS()))):
+
+                    tileInfoConfigurator.setupCOOLPULSE(type = TilePulse)
+                    tileInfoConfigurator.setupCOOLAutoCr()
+
+            if jobproperties.TileRecFlags.OfcFromCOOL():
+                if (jobproperties.TileRecFlags.doTileMF()
+                    or jobproperties.TileRecFlags.doTileOpt2()
+                    or jobproperties.TileRecFlags.doTileOptATLAS()):
+
+                    tileInfoConfigurator.setupCOOLOFC(type = TilePulse)
+
+                if jobproperties.TileRecFlags.doTileOF1():
+                    tileInfoConfigurator.setupCOOLOFC(type = TilePulse, ofcType = 'OF1')
+
+
             if jobproperties.TileRecFlags.doTileQIE():
                 try:
                     from TileRecUtils.TileRecUtilsConf import TileRawChannelBuilderQIEFilter
@@ -147,17 +169,6 @@ class TileRawChannelGetter ( Configured)  :
                     mlog.error("could not get handle to TileRawChannelBuilderQIEFilter Quit")
                     print traceback.format_exc()
                     return False
-                
-                ## setup COOL to get OFCs
-                #if jobproperties.TileRecFlags.OfcFromCOOL():
-                #    from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                #    tileInfoConfigurator = TileInfoConfigurator()
-                #    tileInfoConfigurator.setupCOOLOFC()
-                #else:
-                #    from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                #    tileInfoConfigurator = TileInfoConfigurator()
-                #    tileInfoConfigurator.setupCOOLPHYPULSE()
-                #    tileInfoConfigurator.setupCOOLAutoCr()
                     
                 #TileRawChannelBuilderQIEFilter Options:
                 jobproperties.TileRecFlags.TileRawChannelContainer = "TileRawChannelQIE"
@@ -166,13 +177,7 @@ class TileRawChannelGetter ( Configured)  :
                 theTileRawChannelBuilderQIEFilter.calibrateEnergy = jobproperties.TileRecFlags.calibrateEnergy()
                 theTileRawChannelBuilderQIEFilter.correctTime     = jobproperties.TileRecFlags.correctTime()
                 theTileRawChannelBuilderQIEFilter.NoiseFilterTools= NoiseFilterTools
-                ##theTileRawChannelBuilderQIEFilter.BestPhase       = False; # no point to use best phase with interations
                 theTileRawChannelBuilderQIEFilter.PedestalMode = 1
-                ##theTileRawChannelBuilderQIEFilter.MaxIterations = 5
-                ##theTileRawChannelBuilderQIEFilter.Minus1Iteration = True
-                ##theTileRawChannelBuilderQIEFilter.AmplitudeCorrection = False; # don't need correction after iterations
-                #from TileConditions.TileCondToolConf import getTileCondToolPulseShape
-                #ToolSvc.TileCondToolOfc.TileCondToolPulseShape = getTileCondToolPulseShape('COOL','PHY')
       
                 mlog.info(" adding now TileRawChannelBuilderQIEFilter to ToolSvc")   
                 ToolSvc += theTileRawChannelBuilderQIEFilter
@@ -302,15 +307,7 @@ class TileRawChannelGetter ( Configured)  :
                                     
                 # setup COOL to get OFCs, needed for COF to retrieve pulse shape and derivatives
                 if jobproperties.TileRecFlags.OfcFromCOOL():
-                    from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                    tileInfoConfigurator = TileInfoConfigurator()
-                    tileInfoConfigurator.setupCOOLOFC()
                     theTileRawChannelBuilderMF.TileCondToolOfc = ToolSvc.TileCondToolOfcCool
-                else:
-                    from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                    tileInfoConfigurator = TileInfoConfigurator()
-                    tileInfoConfigurator.setupCOOLPHYPULSE()
-                    tileInfoConfigurator.setupCOOLAutoCr()
 
                 #TileRawChannelBuilderMF Options:
                 jobproperties.TileRecFlags.TileRawChannelContainer = "TileRawChannelMF"
@@ -376,16 +373,14 @@ class TileRawChannelGetter ( Configured)  :
                 
                 # setup COOL to get OFCs
                 if jobproperties.TileRecFlags.OfcFromCOOL():
-                    from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                    tileInfoConfigurator = TileInfoConfigurator()
-                    tileInfoConfigurator.setupCOOLOFC(ofcType = 'OF1')
-                    theTileRawChannelBuilderOF1.TileCondToolOfc = ToolSvc.TileCondToolOfcCoolOF1
-                else:
-                    from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                    tileInfoConfigurator = TileInfoConfigurator()
-                    tileInfoConfigurator.setupCOOLPHYPULSE()
-                    tileInfoConfigurator.setupCOOLAutoCr()
-                    
+                    if hasattr(ToolSvc, 'TileCondToolOfcCoolOF1'):
+                        theTileRawChannelBuilderOF1.TileCondToolOfc = ToolSvc.TileCondToolOfcCoolOF1
+                    else:
+                        # There are no OF1 OFC in the COOL
+                        # OFC will be calculated on the fly
+                        tileInfoConfigurator.setupCOOLPULSE(type = TilePulse)
+                        tileInfoConfigurator.setupCOOLAutoCr()
+
                 #TileRawChannelBuilderOF1 Options:
                 jobproperties.TileRecFlags.TileRawChannelContainer = "TileRawChannelOF1"
                 theTileRawChannelBuilderOF1.TileRawChannelContainer = "TileRawChannelOF1"
@@ -424,15 +419,7 @@ class TileRawChannelGetter ( Configured)  :
                 
                 # setup COOL to get OFCs
                 if jobproperties.TileRecFlags.OfcFromCOOL():
-                    from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                    tileInfoConfigurator = TileInfoConfigurator()
-                    tileInfoConfigurator.setupCOOLOFC()
                     theTileRawChannelBuilderOpt2Filter.TileCondToolOfc = ToolSvc.TileCondToolOfcCool
-                else:
-                    from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                    tileInfoConfigurator = TileInfoConfigurator()
-                    tileInfoConfigurator.setupCOOLPHYPULSE()
-                    tileInfoConfigurator.setupCOOLAutoCr()
                     
                 #TileRawChannelBuilderOpt2Filter Options:
                 jobproperties.TileRecFlags.TileRawChannelContainer = "TileRawChannelOpt2"
@@ -448,14 +435,11 @@ class TileRawChannelGetter ( Configured)  :
                 theTileRawChannelBuilderOpt2Filter.Minus1Iteration = True
                 theTileRawChannelBuilderOpt2Filter.AmplitudeCorrection = False; # don't need correction after iterations
                 theTileRawChannelBuilderOpt2Filter.TimeCorrection    = False; # don't need correction after iterations
-                #from TileConditions.TileCondToolConf import getTileCondToolPulseShape
-                #ToolSvc.TileCondToolOfc.TileCondToolPulseShape = getTileCondToolPulseShape('COOL','PHY')
       
                 mlog.info(" adding now TileRawChannelBuilderOpt2Filter to ToolSvc")   
                 ToolSvc += theTileRawChannelBuilderOpt2Filter
       
                 theTileRawChannelMaker.TileRawChannelBuilder += [ToolSvc.TileRawChannelBuilderOpt2Filter]
-
       
       
             if jobproperties.TileRecFlags.doTileOptATLAS():
@@ -469,15 +453,7 @@ class TileRawChannelGetter ( Configured)  :
                 
                 # setup COOL to get OFCs
                 if jobproperties.TileRecFlags.OfcFromCOOL():
-                    from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                    tileInfoConfigurator = TileInfoConfigurator()
-                    tileInfoConfigurator.setupCOOLOFC()
                     theTileRawChannelBuilderOptATLAS.TileCondToolOfc = ToolSvc.TileCondToolOfcCool
-                else:
-                    from TileConditions.TileInfoConfigurator import TileInfoConfigurator
-                    tileInfoConfigurator = TileInfoConfigurator()
-                    tileInfoConfigurator.setupCOOLPHYPULSE()
-                    tileInfoConfigurator.setupCOOLAutoCr()
                     
                 #TileRawChannelBuilderOptATLAS Options:
                 if globalflags.DataSource()=='data': # don't use the name which is used for reco data from DSP
@@ -512,8 +488,6 @@ class TileRawChannelGetter ( Configured)  :
                 theTileRawChannelMaker.TileRawChannelBuilder += [ToolSvc.TileRawChannelBuilderOptATLAS]
             
 
-
-
             # now add algorithm to topSequence
             # this should always come at the end
 
diff --git a/TileCalorimeter/TileRecUtils/src/TileRawChannelNoiseFilter.cxx b/TileCalorimeter/TileRecUtils/src/TileRawChannelNoiseFilter.cxx
index 8ec0510bc2456016b535c618a78abf5711a7468a..860b7b5b5167ffd17391e8d4cb35c3012e9721ec 100644
--- a/TileCalorimeter/TileRecUtils/src/TileRawChannelNoiseFilter.cxx
+++ b/TileCalorimeter/TileRecUtils/src/TileRawChannelNoiseFilter.cxx
@@ -142,9 +142,9 @@ StatusCode TileRawChannelNoiseFilter::process(const TileRawChannelContainer *rch
     memset(chanmap, 0, sizeof(chanmap));
 
     // iterate over all channels in a collection
-    TileRawChannelCollection* coll = (*collItr).getDataPtr();
-    TileRawChannelCollection::iterator rchItr = coll->begin();
-    TileRawChannelCollection::iterator lastRch = coll->end();
+    const TileRawChannelCollection* coll = *collItr;
+    TileRawChannelCollection::const_iterator rchItr = coll->cbegin();
+    TileRawChannelCollection::const_iterator lastRch = coll->cend();
 
     for (; rchItr != lastRch; ++rchItr) {
       const TileRawChannel* rch = (*rchItr);
diff --git a/TileCalorimeter/TileSimAlgs/doc/packagedoc.h b/TileCalorimeter/TileSimAlgs/doc/packagedoc.h
index 39874b9689553ceb831d2e804c86820115db2f23..8e6f9925bc828fc76cbc9413d780f526ce14ac16 100644
--- a/TileCalorimeter/TileSimAlgs/doc/packagedoc.h
+++ b/TileCalorimeter/TileSimAlgs/doc/packagedoc.h
@@ -31,16 +31,4 @@ is the default mode of running. It is possible to specify the 'cosmic' mode of r
 
   - TileTBHitToBeamElem: builds TileBeamElements from TileHits for testbeam simulation.
 
-@ref used_MyPackage
-
-@ref requirements_MyPackage
-*/
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-
 */
diff --git a/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py b/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py
index 87c734b65b56400f731dfafef8ac943ee5f84cdf..f5f4e41489191b33debd50fc62c89f2ca0788000 100644
--- a/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py
+++ b/TileCalorimeter/TileSimAlgs/python/TileDigitsGetter.py
@@ -23,6 +23,7 @@ class TileDigitsGetter ( Configured )  :
         mlog = logging.getLogger( 'TileDigitsGetter::configure:' )
         mlog.info ('entering')        
 
+
         # get handle to upstream object
         try:
             from TileSimAlgs.TileDigitsGetter import TileDigitsGetter
@@ -39,6 +40,10 @@ class TileDigitsGetter ( Configured )  :
             else:
                 mlog.error("TileDigitsGetter unusable. Continue nevertheless")
                 
+        from TileConditions.TileInfoConfigurator import TileInfoConfigurator
+        tileInfoConfigurator = TileInfoConfigurator()
+        tileInfoConfigurator.setupCOOLPHYPULSE()
+
         # Instantiation of the C++ algorithm
         try:        
             from TileSimAlgs.TileSimAlgsConf import TileDigitsMaker                
diff --git a/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx b/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx
index b172a31513311b71340a0920c11a2c3edea77bd9..c12f91609e6948d1001ebfc1ee77ac4b1da10ac3 100644
--- a/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx
+++ b/TileCalorimeter/TileSimAlgs/src/TileHitVecToCntTool.cxx
@@ -893,9 +893,9 @@ StatusCode TileHitVecToCntTool::mergeEvent() {
   TileHitContainer::const_iterator endcoll = m_hits->end();
 
   for (; collIt != endcoll; ++collIt) {
-    TileHitCollection* coll = (*collIt).getDataPtr();
-    TileHitCollection::iterator hitItr = coll->begin();
-    TileHitCollection::iterator hitEnd = coll->end();
+    const TileHitCollection* coll = *collIt;
+    TileHitCollection::const_iterator hitItr = coll->begin();
+    TileHitCollection::const_iterator hitEnd = coll->end();
     for (; hitItr != hitEnd; hitItr++) {
 
       double ehit = 0.0;
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileBeamElemContByteStreamCnv.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileBeamElemContByteStreamCnv.h
index 4d5011ef0175ea14a03b79c36fe2866bea1f36ad..80f37414801f6142600710005fc50ec19bc798b0 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileBeamElemContByteStreamCnv.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileBeamElemContByteStreamCnv.h
@@ -88,7 +88,7 @@ class TileBeamElemContByteStreamCnv
     std::vector<uint32_t> m_ROBID;
 
     /** Pointer to TileHid2RESrcID */
-    const TileHid2RESrcID * m_hid2re; 
+    const TileHid2RESrcID* m_hid2re;
 
     /** Pointer to TileBeamElemContainer */
     TileBeamElemContainer* m_container ; 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileCellCont.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileCellCont.h
index 75585c2a92ca1110068af9291b64f206673f2e7b..8db76b233e86c7561581bb3673d80335b276d519 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileCellCont.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileCellCont.h
@@ -11,6 +11,7 @@
 #include <vector>
 
 class TileCellCollection;
+class TileHid2RESrcID;
 
   
 /**
@@ -58,6 +59,8 @@ class TileCellCont : public std::vector<TileCellCollection*>
   
   StatusCode initialize( void ) ;
   StatusCode finalize( void ) ;
+  void setHashIdToROD ( const TileHid2RESrcID* p )
+       { m_src = p; }
 
   void eventNumber ( const unsigned int eN) { m_event=eN; };
   bool cached( const unsigned int&rodid ){
@@ -94,6 +97,8 @@ private:
 	std::map<unsigned int, unsigned int> m_mapMBTS;
 	int m_MBTS_channel;
 	std::vector<int> m_masked;
+        /** map Hash ID to ROD */
+        const TileHid2RESrcID* m_src;
   
 };
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileDigitsContByteStreamTool.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileDigitsContByteStreamTool.h
index 319a1c3a3b7046f0a6c3275078862c338343e623..34769bec6eb44cc5d2b9745802f1e698d4108a3c 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileDigitsContByteStreamTool.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileDigitsContByteStreamTool.h
@@ -54,15 +54,11 @@ class TileDigitsContByteStreamTool: public AthAlgTool {
 
     const TileHWID* m_tileHWID;
 
-    TileHid2RESrcID m_hid2re;
-    TileHid2RESrcID m_TileMuRcv_hid2re;
+    const TileHid2RESrcID* m_hid2re;
 
     bool m_verbose;
     bool m_doFragType1;
     bool m_doFragType5;
-
-    FullEventAssembler<TileHid2RESrcID> m_fea;
-    FullEventAssembler<TileHid2RESrcID> m_TileMuRcv_fea;
 };
 
 #endif
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileHid2RESrcID.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileHid2RESrcID.h
index 3061a1c6895c8dc48eb91ca53d8b2cf583ded18b..e56b3165d90af499e378eb99f1cf597f473d852d 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileHid2RESrcID.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileHid2RESrcID.h
@@ -79,7 +79,7 @@ private:
   const TileHWID* m_tileHWID;
   typedef std::map<int, uint32_t> FRAGRODMAP; 
   FRAGRODMAP m_frag2ROD, m_TileMuRcvFrag2ROD;
-  uint32_t m_runnum;
+  uint32_t m_runnum, m_TileMuRcvRunnum;
 };
 
 #endif 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileL2ContByteStreamTool.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileL2ContByteStreamTool.h
index 780a2cf01d156639fa4987d95ccea08c358c9b77..04719824a6a5f50fb86b084dce5e479e5dbe9123 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileL2ContByteStreamTool.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileL2ContByteStreamTool.h
@@ -64,12 +64,10 @@ class TileL2ContByteStreamTool: public AthAlgTool {
  private:
 
   const TileHWID* m_tileHWID;
-  TileHid2RESrcID m_hid2re; 
+  const TileHid2RESrcID* m_hid2re;
   bool m_verbose;
   bool m_doFragTypeMu;
   bool m_doFragTypeEt;
-
-  FullEventAssembler<TileHid2RESrcID> m_fea;
 };
 
 #endif
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileLaserObjByteStreamCnv.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileLaserObjByteStreamCnv.h
index 3a2fa1699ddaf870051742bdcd40248b6f202cdf..484d859622c066ec36fa092be0557035340d34d4 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileLaserObjByteStreamCnv.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileLaserObjByteStreamCnv.h
@@ -26,6 +26,7 @@ class IROBDataProviderSvc;
 class TileLaserObjByteStreamTool ; 
 class TileROD_Decoder;
 class TileLaserObject;
+class TileHid2RESrcID;
 
 #include <vector>
 #include <stdint.h>
@@ -74,6 +75,9 @@ class TileLaserObjByteStreamCnv
     
     std::vector<uint32_t> m_ROBID;
 
+    /** Pointer to TileHid2RESrcID */
+    const TileHid2RESrcID* m_hid2re;
+
     /* Pointer to TileLaserObject */
     TileLaserObject* m_container;
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileLaserObjByteStreamTool.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileLaserObjByteStreamTool.h
index b7741e3f53b749a0cd802415c1638662ffbf08cd..381362fd2da288533598f88a431307d2bdd8b151 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileLaserObjByteStreamTool.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileLaserObjByteStreamTool.h
@@ -46,10 +46,8 @@ class TileLaserObjByteStreamTool: public AthAlgTool {
   private:
 
     const TileHWID* m_tileHWID;
-    TileHid2RESrcID m_hid2re;
+    const TileHid2RESrcID* m_hid2re;
     bool m_verbose;
-
-    FullEventAssembler<TileHid2RESrcID> m_fea;
 };
 
 #endif
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileMuRcvContByteStreamCnv.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileMuRcvContByteStreamCnv.h
index 7d9c54520e4b9bfcdcb9fbd6ab9561869a501f2f..8502822d3b4ad9fdb4cc9e86162b33411090ae22 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileMuRcvContByteStreamCnv.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileMuRcvContByteStreamCnv.h
@@ -5,8 +5,14 @@
 #ifndef TILEBYTESTREAM_TILEMURCVCONTBYTESTREAMCNV_H
 #define TILEBYTESTREAM_TILEMURCVCONTBYTESTREAMCNV_H
 
+// Gaudi includes
 #include "GaudiKernel/Converter.h"
 #include "GaudiKernel/IIncidentListener.h"
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
+
+// Athena includes
+#include "AthenaBaseComps/AthMessaging.h"
 
 #include "TileEvent/TileContainer.h"
 
@@ -15,12 +21,10 @@ class StatusCode;
 class IAddressCreator;
 class IByteStreamEventAccess;
 class StoreGateSvc; 
-class MsgStream; 
 class IROBDataProviderSvc; 
 class TileMuRcvContByteStreamTool ; 
 class ByteStreamCnvSvc;
 class TileROD_Decoder;
-class TileHid2RESrcID;
 
 // Abstract factory to create the converter
 template <class TYPE> class CnvFactory;
@@ -37,8 +41,9 @@ extern long ByteStream_StorageType;
  */
 
 class TileMuRcvContByteStreamCnv
-  : public Converter,
-    public IIncidentListener
+  : public Converter
+  , public IIncidentListener
+  , public ::AthMessaging
 {
   friend class CnvFactory<TileMuRcvContByteStreamCnv>;
 
@@ -64,23 +69,26 @@ class TileMuRcvContByteStreamCnv
 
  private: 
 
-  /** Pointer to TileMuRcvContByteStreamTool */
-  BYTESTREAMTOOL* m_tool ; 
-
-  /** Pointer to TileROD_Decoder */
-  TileROD_Decoder* m_decoder;
+  std::string m_name;
 
-  /** Pointer to ByteStreamCnvSvc */
-  ByteStreamCnvSvc* m_ByteStreamEventAccess;
+  /** Pointer to TileMuRcvContByteStreamTool */
+  ToolHandle<BYTESTREAMTOOL> m_tool;
 
-  /** Pointer to TileMuRcvContainer */
-  TileMuonReceiverContainer* m_container ; 
+  ServiceHandle<IByteStreamEventAccess> m_byteStreamEventAccess;
+  ByteStreamCnvSvc* m_byteStreamCnvSvc;
 
   /** Pointer to StoreGateSvc */
-  StoreGateSvc* m_storeGate;
+  ServiceHandle<StoreGateSvc> m_storeGate;
 
   /** Pointer to IROBDataProviderSvc */
-  IROBDataProviderSvc *m_rdpSvc;
+  ServiceHandle<IROBDataProviderSvc> m_robSvc;
+
+  /** Pointer to TileROD_Decoder */
+  ToolHandle<TileROD_Decoder> m_decoder;
+
+  /** Pointer to TileMuRcvContainer */
+  TileMuonReceiverContainer* m_container;
+
 };
 #endif
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileMuRcvContByteStreamTool.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileMuRcvContByteStreamTool.h
index f4686d3e5dec5e3a45d2eaf35c1b4d1cb55aa8ed..05d9779c71f53b923e64b89cb8d148144a657b8b 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileMuRcvContByteStreamTool.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileMuRcvContByteStreamTool.h
@@ -60,11 +60,9 @@ class TileMuRcvContByteStreamTool: public AthAlgTool {
 
   const TileHWID* m_tileHWID;
 
-  TileHid2RESrcID m_hid2re; 
+  const TileHid2RESrcID* m_hid2re;
 
   //bool m_verbose;
-
-  FullEventAssembler<TileHid2RESrcID> m_fea;
 };
 
 #endif
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h
index a8b93bffc2b0a161cbeeb5e67eda665b20d7a74c..9bda9aaf76cc05e16a8cae8e92d4e863bae0ed33 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileROD_Decoder.h
@@ -142,6 +142,14 @@ class TileROD_Decoder: public AthAlgTool {
     void printErrorCounter(bool printIfNoError);
     int getErrorCounter();
 
+    void printWarningCounter(bool printIfNoWarning);
+    int getWarningCounter();
+
+    const TileHid2RESrcID * getHid2reHLT() {
+      if (!m_hid2reHLT) initHid2reHLT();
+      return m_hid2reHLT;
+    }
+
     const TileHid2RESrcID * getHid2re() {
       if (!m_hid2re) initHid2re();
       return m_hid2re;
@@ -173,6 +181,8 @@ class TileROD_Decoder: public AthAlgTool {
     void setUseFrag5Raw (bool f) { m_useFrag5Raw = f; }
     void setUseFrag5Reco (bool f) { m_useFrag5Reco = f; }
 
+  enum TileFragStatus {ALL_OK=0, CRC_ERR=1, ALL_FF=0x10, ALL_00=0x20, NO_FRAG=0x40, NO_ROB=0x80};
+
   private:
     friend class TileHid2RESrcID;
 
@@ -490,22 +500,27 @@ class TileROD_Decoder: public AthAlgTool {
     // Error reporting (needs to be mutable)
     mutable uint32_t m_error;
 
+    int m_maxWarningPrint;
     int m_maxErrorPrint;
 
     // Pointer to TileL2Builder
     TileL2Builder* m_L2Builder;
     std::string m_TileDefaultL2Builder;
 
+    int m_WarningCounter;
     int m_ErrorCounter;
     bool m_correctAmplitude;
 
     TileHid2RESrcID * m_hid2re;
+    TileHid2RESrcID * m_hid2reHLT;
 
     std::vector<int> m_list_of_masked_drawers;
     void initHid2re();
+    void initHid2reHLT();
     void initTileMuRcvHid2re();
 
     unsigned int m_maxChannels;
+    unsigned int m_fullTileRODs;
 
     const uint32_t * get_data(const ROBData * rob) {
       const uint32_t * p;
@@ -528,19 +543,43 @@ class TileROD_Decoder: public AthAlgTool {
         max_allowed_size = 0;
       if (size < 3 && size > 0) {
         if (rob->rod_source_id() > 0x50ffff) m_error |= 0x10000; // indicate error in frag size, but ignore error in laser ROD
-        if (m_ErrorCounter < (m_maxErrorPrint--)) {
-          ATH_MSG_ERROR("ROB " << std::hex << rob->source_id()
-              << " ROD " << std::hex << rob->rod_source_id() << std::dec
+        if (m_WarningCounter < (m_maxWarningPrint--)) {
+          ATH_MSG_WARNING("ROB " << MSG::hex << rob->source_id()
+              << " ROD " << rob->rod_source_id() << MSG::dec
               << " has unexpected data size: " << size << " - assuming zero size " );
         }
         return 0;
       } else if (size > max_allowed_size) {
         if (rob->rod_source_id() > 0x50ffff) m_error |= 0x10000; // indicate error in frag size, but ignore error in laser ROD
-        if ((m_ErrorCounter++) < m_maxErrorPrint) {
-          ATH_MSG_ERROR("ROB " << std::hex << rob->source_id()
-                        << " ROD " << std::hex << rob->rod_source_id() << std::dec
-                        << " has unexpected data size: " << size
-                        << " - assuming size = " << max_allowed_size << " words " );
+
+        if (size - rob->rod_trailer_size_word() < max_allowed_size) {
+          if ((m_WarningCounter++) < m_maxWarningPrint) {
+            ATH_MSG_WARNING("ROB " << MSG::hex << rob->source_id()
+                            << " ROD " << rob->rod_source_id() << MSG::dec
+                            << " data size " << size << " is longer than allowed size " << max_allowed_size
+                            << " - assuming that ROD trailer is shorter: "
+                            << rob->rod_trailer_size_word()-(size-max_allowed_size)
+                            << " words instead of " << rob->rod_trailer_size_word());
+          }
+          max_allowed_size = size;
+        } else if (size - rob->rod_trailer_size_word() == max_allowed_size) {
+          if ((m_WarningCounter++) < m_maxWarningPrint) {
+            ATH_MSG_WARNING("ROB " << MSG::hex << rob->source_id()
+                            << " ROD " << rob->rod_source_id() << MSG::dec
+                            << " data size " << size << " is longer than allowed size " << max_allowed_size
+                            << " - assuming that ROD trailer ("
+                            << rob->rod_trailer_size_word()
+                            << " words) is absent");
+          }
+          max_allowed_size = size;
+        } else {
+          max_allowed_size += rob->rod_trailer_size_word();
+          if ((m_WarningCounter++) < m_maxWarningPrint) {
+            ATH_MSG_WARNING("ROB " << MSG::hex << rob->source_id()
+                            << " ROD " << rob->rod_source_id() << MSG::dec
+                            << " has unexpected data size: " << size
+                            << " - assuming data size = " << max_allowed_size << " words and no ROD trailer at all" );
+          }
         }
         return max_allowed_size;
       } else {
@@ -582,10 +621,15 @@ void TileROD_Decoder::make_copy(const ROBData * rob, pDigiVec & pDigits, pRwChVe
   v.setDetEvType(rob->rod_detev_type());
   v.setRODBCID(rob->rod_bc_id());
 
+  uint32_t status = TileFragStatus::ALL_OK;
+  for (size_t j=0; j<m_digitsMetaData[6]->size(); ++j) {
+    status |= (*(m_digitsMetaData[6]))[j];
+  }
+
   if (v.size() > 0) {
     // Set meta data
     v.setFragSize((*(m_digitsMetaData[0]))[0]);
-    v.setFragBCID((*(m_digitsMetaData[0]))[2]);
+    v.setFragBCID((*(m_digitsMetaData[0]))[2] | (status<<16));
 
     v.setFragExtraWords(*(m_digitsMetaData[1]));
 
@@ -598,8 +642,14 @@ void TileROD_Decoder::make_copy(const ROBData * rob, pDigiVec & pDigits, pRwChVe
     }
     if (m_verbose) v.printExtra();
   } else if ( m_digitsMetaData[0]->size() == 0 ) {
-    v.setFragBCID(0xDEAD);
+    // no useful digi fragment or no data inside fragment
+    status |= TileFragStatus::NO_FRAG;
+    v.setFragBCID(0xDEAD | (status<<16));
+    v.setFragSize(0);
   }
+
+  if (status!=TileFragStatus::ALL_OK)
+    ATH_MSG_DEBUG( "Status for drawer 0x" << MSG::hex << v.identify() << " in Digi frag is 0x" << status << MSG::dec);
 }
 
 inline
@@ -629,7 +679,17 @@ void TileROD_Decoder::make_copy(const ROBData * rob, pDigiVec & pDigits, pRwChVe
       //m_RCBuilder->build(pDigits.begin(),pDigits.end(),(&v));
 
       delete_vec(pDigits); // Digits deleted
+
+    } else {
+      ATH_MSG_DEBUG( "data for drawer 0x" << MSG::hex << v.identify() << MSG::dec << " not found in BS" );
+    }
+    m_rawchannelMetaData[6]->push_back(TileFragStatus::NO_FRAG);
+    HWIdentifier drawerID = m_tileHWID->drawer_id(v.identify());
+    for (unsigned int ch = 0; ch < m_maxChannels; ++ch) {
+      HWIdentifier adcID = m_tileHWID->adc_id(drawerID, ch, 0);
+      v.push_back(new TileRawChannel(adcID, 0.0, -100.0, 31));
     }
+
   }
 
   v.setLvl1Id(rob->rod_lvl1_id());
@@ -650,7 +710,14 @@ void TileROD_Decoder::make_copy(const ROBData * rob, pDigiVec & pDigits, pRwChVe
     }
   }
 
-  v.setFragGlobalCRC((*(m_rawchannelMetaData[0]))[0]);
+  uint32_t status = ((*(m_rawchannelMetaData[0]))[0] & 0x1) ? TileFragStatus::CRC_ERR : TileFragStatus::ALL_OK ;
+  for (size_t j=0; j<m_rawchannelMetaData[6]->size(); ++j) {
+    status |= (*(m_rawchannelMetaData[6]))[j];
+  }
+  if (status>TileFragStatus::CRC_ERR)
+    ATH_MSG_DEBUG( "Status for drawer 0x" << MSG::hex << v.identify() << " is 0x" << status << MSG::dec);
+
+  v.setFragGlobalCRC(status);
   v.setFragDSPBCID((*(m_rawchannelMetaData[0]))[1]);
   v.setFragBCID((*(m_rawchannelMetaData[1]))[0]);
   v.setFragMemoryPar((*(m_rawchannelMetaData[1]))[1]);
@@ -718,8 +785,8 @@ void TileROD_Decoder::fillCollection(const ROBData * rob, COLLECTION & v) {
   //
   //  if (msgLvl(MSG::VERBOSE)) {
   //    msg(MSG::VERBOSE) << "ROD header info: " << endmsg
-  //    msg(MSG::VERBOSE) << " Format Vers.  " << std::hex << "0x" << rob->rod_version() << std::dec << endmsg;
-  //    msg(MSG::VERBOSE) << " Source ID     " << std::hex << "0x" << rob->rod_source_id() << std::dec << endmsg;
+  //    msg(MSG::VERBOSE) << " Format Vers.  " << MSG::hex << "0x" << rob->rod_version() << MSG::dec << endmsg;
+  //    msg(MSG::VERBOSE) << " Source ID     " << MSG::hex << "0x" << rob->rod_source_id() << MSG::dec << endmsg;
   //    msg(MSG::VERBOSE) << " Source ID str " << eformat::helper::SourceIdentifier(rob->source_id()).human().c_str() << endmsg;
   //    msg(MSG::VERBOSE) << " Run number    " << (int) rob->rod_run_no() << endmsg;
   //    msg(MSG::VERBOSE) << " Level1 ID     " << rob->rod_lvl1_id() << endmsg;
@@ -734,7 +801,7 @@ void TileROD_Decoder::fillCollection(const ROBData * rob, COLLECTION & v) {
   //    msg(MSG::VERBOSE) << " Status pos    " << rob->rod_status_position() << endmsg;
   //  }
 
-  uint32_t version = rob->rod_version() & 0xFF;
+  uint32_t version = rob->rod_version() & 0xFFFF;
 
   bool isBeamROD = false;
   // figure out which fragment we want to unpack
@@ -762,6 +829,11 @@ void TileROD_Decoder::fillCollection(const ROBData * rob, COLLECTION & v) {
   if (size) {
     bool V3format = (*(p) == 0xff1234ff); // additional frag marker since Sep 2005
     V3format |= (*(p) == 0x00123400); // additional frag marker since Sep 2005 (can appear in buggy ROD frags)
+    if (!V3format && version>0xff) {
+      V3format = true;
+      if ((m_WarningCounter++) < m_maxWarningPrint)
+        ATH_MSG_WARNING("fillCollection: corrupted frag separator 0x" << MSG::hex << (*p) << " instead of 0xff1234ff in ROB 0x" << rob->rod_source_id() << MSG::dec );
+    }
     if (V3format) {
       ++p; // skip frag marker
       m_sizeOverhead = 3;
@@ -796,7 +868,7 @@ void TileROD_Decoder::fillCollection(const ROBData * rob, COLLECTION & v) {
         }
       }
       if ((m_ErrorCounter++) < m_maxErrorPrint) {
-        msg(MSG::ERROR) << "Frag 0x" << std::hex << frag << std::dec
+        msg(MSG::ERROR) << "Frag 0x" << MSG::hex << frag << MSG::dec
                         << " has unexpected size: " << count;
         if (wc < size) {
           msg(MSG::ERROR) << "  skipping " << cnt << " words to the next frag" << endmsg;
@@ -856,7 +928,7 @@ void TileROD_Decoder::fillCollection(const ROBData * rob, COLLECTION & v) {
     pChannel.reserve(48);
 
     // initialize meta data storage
-    for (unsigned int i = 0; i < 6; ++i) {
+    for (unsigned int i = 0; i < 7; ++i) {
       m_digitsMetaData[i]->clear();
       m_rawchannelMetaData[i]->clear();
     }
@@ -876,8 +948,8 @@ void TileROD_Decoder::fillCollection(const ROBData * rob, COLLECTION & v) {
       uint32_t idAndType = *(p + 1);
       int type = (idAndType & 0x00FF0000) >> 16;
 
-      ATH_MSG_VERBOSE( "Unpacking frag: 0x" << std::hex << (idAndType & 0xFFFF)
-                      << " type " << type << std::dec );
+      ATH_MSG_VERBOSE( "Unpacking frag: 0x" << MSG::hex << (idAndType & 0xFFFF)
+                      << " type " << type << MSG::dec );
 
       createdFrom |= (1 << type);
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamTool.h b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamTool.h
index f3baaf6d2c897ef69b4b3d47cf3cee9ceeb8a114..6d4a730fb5005167469b3fb36e41a52c03ff85e4 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamTool.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/TileByteStream/TileRawChannelContByteStreamTool.h
@@ -58,16 +58,12 @@ class TileRawChannelContByteStreamTool: public AthAlgTool {
 
     const TileHWID* m_tileHWID;
 
-    TileHid2RESrcID m_hid2re;
-    TileHid2RESrcID m_TileMuRcv_hid2re;
+    const TileHid2RESrcID* m_hid2re;
 
     bool m_verbose;
     bool m_doFragType4;
     bool m_doFragType5;
 
-    FullEventAssembler<TileHid2RESrcID> m_fea;
-    FullEventAssembler<TileHid2RESrcID> m_TileMuRcv_fea;
-
     /** Handle to Tile calibration tool */
     ToolHandle<TileCondToolEmscale> m_tileToolEmscale;
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/doc/packagedoc.h b/TileCalorimeter/TileSvc/TileByteStream/doc/packagedoc.h
index a5681148f7b5e2f84ab7a23e0ab42ef4ca3e9225..238767697bbd760576a72de4b36d693d5e39a94d 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/doc/packagedoc.h
+++ b/TileCalorimeter/TileSvc/TileByteStream/doc/packagedoc.h
@@ -68,15 +68,5 @@ This package is used to decode and encode TileCal bytestream.
 
   - TileRawChannel2Bytes4: this class converts the TileRawChannel object into bytes as it is defined at the commissioning 2007.
 
-@ref used_TileByteStream
 
-@ref requirements_TileByteStream
-*/
-
-/**
-@page used_TileByteStream Used Packages
-*/
-
-/**
-@page requirements_TileByteStream Requirements
 */
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileBeamElemContByteStreamCnv.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileBeamElemContByteStreamCnv.cxx
index a512ea67f85549c233bc1d20306c614894a96b40..2fed9828a7144b2943d579d20b1c49d40e34b5a9 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileBeamElemContByteStreamCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileBeamElemContByteStreamCnv.cxx
@@ -54,7 +54,6 @@ StatusCode TileBeamElemContByteStreamCnv::initialize() {
   ATH_MSG_DEBUG( " initialize " );
 
   // retrieve Tool
-  
   CHECK( m_decoder.retrieve() );
   m_hid2re = m_decoder->getHid2re();
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileCellCont.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileCellCont.cxx
index 9aae95c40644e3b64644a34b1ee01f7de5ef505d..d9bb726933afb36269fdc32280af55d47d33c9a1 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileCellCont.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileCellCont.cxx
@@ -34,7 +34,8 @@ TileCellCont::TileCellCont()
   : m_it(0)
   , m_event(0)
   , m_MBTS(0)
-  , m_MBTS_channel(0) {
+  , m_MBTS_channel(0)
+  , m_src(0) {
 }
 
 StatusCode TileCellCont::initialize() {
@@ -88,21 +89,26 @@ StatusCode TileCellCont::initialize() {
     std::cout << "TileCellCont:initialize ERROR: Can not initialize TileBadChanTool" << std::endl;
     return StatusCode::FAILURE;
   }
+  if ( !m_src ){ // if nothing set, use 2017
+       std::cout << "TileCellCont::initialize ERROR : TileHid2RESrc has to be initialized before this" << std::endl;
+  }
 
   // Get pointer to TileCablingService
   TileCablingService* cabling = TileCablingService::getInstance();
   int maxChannels = cabling->getMaxChannels();
 
-  m_hash.initialize(0);
+  //m_hash.initialize(0);
   m_mbts_rods.clear();
   m_mbts_IDs.clear();
   int mbts_count = 0;
   int ID_of_Col = 0;
-  TileHid2RESrcID src(tileHWID);
+  std::vector<int> rodids;
   m_MBTS = new TileCellCollection(ID_of_Col, SG::OWN_ELEMENTS);
   for (unsigned int ros = 1; ros < TileCalibUtils::MAX_ROS; ++ros) {
     for (unsigned int drawer = 0; drawer < TileCalibUtils::MAX_DRAWER; ++drawer) {
       int frag = tileHWID->frag(ros, drawer);
+      int rodid = m_src->getRodID(frag);
+      rodids.push_back(rodid);
       m_mapMBTS[frag] = 0xFFFF;
       // One event number per collection
       m_eventNumber.push_back(0xFFFFFFFF);
@@ -120,7 +126,7 @@ StatusCode TileCellCont::initialize() {
         HWIdentifier channelID = tileHWID->channel_id(ros, drawer, channel);
         Identifier cell_id = cabling->h2s_cell_id_index(channelID, index, pmt);
         if (index == -2) { // MBTS cell, only one per drawer
-          m_mbts_rods.push_back(src.getRodID(frag));
+          m_mbts_rods.push_back(m_src->getRodID(frag));
           m_mbts_IDs.push_back(((ros - 1) * TileCalibUtils::MAX_DRAWER + drawer));
           CaloDetDescrElement * caloDDE = (mbtsMgr) ? mbtsMgr->get_element(cell_id) : NULL;
           TileCell* myMBTSCell = new TileCell(caloDDE, cell_id, 0.0, 0.0, 0, 0, CaloGain::TILEONELOW);
@@ -138,6 +144,7 @@ StatusCode TileCellCont::initialize() {
         }
       } // End of for over TileRawChannel
 
+
       // create new cell collection which will own all elements
       TileCellCollection* newColl = new TileCellCollection(frag, SG::OWN_ELEMENTS);
       this->push_back(newColl);
@@ -182,10 +189,13 @@ StatusCode TileCellCont::initialize() {
   for (unsigned int k = 0; k < m_mbts_rods.size(); k++)
     std::cout << " MBTS RODs : " << m_mbts_rods[k] << std::endl;
 #endif
+  m_hash.initialize(0,rodids);
 
 #ifndef NDEBUG
   for (int i = 0; i < m_hash.max(); ++i) {
-    std::cout << "TileCellCont\t\t DEBUG \t" << i << " " << std::hex << m_hash.identifier(i) << std::dec << std::endl;
+    TileCellCollection *aa = this->at(i);
+    TileCell* bb = aa->at(0);
+    std::cout << "TileCellCont\t\t DEBUG \t" << i << " " << std::hex << m_hash.identifier(i) << std::dec << " " << aa->identify() << " " << bb->eta() << " " <<  bb->phi() << std::endl;
     // A collection per ROD/ROB/HashId
   } // end of for id
 #endif
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileDigitsContByteStreamCnv.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileDigitsContByteStreamCnv.cxx
index 8a0d423b781c1eb1bcc9f39a5ce7c7e291027b0a..563b68b3c8552843d9e3063d040befb228ab9364 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileDigitsContByteStreamCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileDigitsContByteStreamCnv.cxx
@@ -34,6 +34,7 @@
 #include "TileByteStream/TileROD_Decoder.h"
 #include "TileByteStream/TileHid2RESrcID.h"
 #include "TileEvent/TileDigitsContainer.h"
+#include "TileByteStream/TileROD_Decoder.h"
 
 #include <vector> 
 #include <string> 
@@ -69,11 +70,11 @@ StatusCode TileDigitsContByteStreamCnv::initialize() {
   m_byteStreamCnvSvc = dynamic_cast<ByteStreamCnvSvc*>(&*m_byteStreamEventAccess);
 
   // retrieve Tool
-  CHECK( m_tool.retrieve() );
-
   CHECK( m_decoder.retrieve() );
   m_hid2re = m_decoder->getHid2re();
 
+  CHECK( m_tool.retrieve() );
+
   CHECK( m_robSvc.retrieve() );
 
   // create empty TileDigitsContainer and all collections inside
@@ -145,7 +146,9 @@ StatusCode TileDigitsContByteStreamCnv::createObj(IOpaqueAddress* pAddr, DataObj
         } else {
           m_decoder->fillCollection(robf[0], *digitsCollection);
         }
-      }  
+      } else {
+        digitsCollection->setFragBCID((TileROD_Decoder::NO_ROB)<<16);
+      }
     }
 
     ATH_MSG_DEBUG( "Creating digits container " << *(pRE_Addr->par()) );
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileDigitsContByteStreamTool.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileDigitsContByteStreamTool.cxx
index c787fac86b4b59614b50b08dedc99fbc07283319..977396f1e1f7f3d49d3b2d480005ec2ab8282e45 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileDigitsContByteStreamTool.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileDigitsContByteStreamTool.cxx
@@ -10,6 +10,7 @@
 
 // Tile includes
 #include "TileByteStream/TileDigitsContByteStreamTool.h"
+#include "TileByteStream/TileROD_Decoder.h"
 #include "TileByteStream/TileROD_Encoder.h"
 #include "TileEvent/TileDigitsCollection.h"
 #include "TileEvent/TileDigitsContainer.h"
@@ -33,6 +34,8 @@ const InterfaceID& TileDigitsContByteStreamTool::interfaceID( )
 TileDigitsContByteStreamTool::TileDigitsContByteStreamTool( const std::string& type
     , const std::string& name,const IInterface* parent )
   : AthAlgTool(type, name, parent)
+  , m_tileHWID(0)
+  , m_hid2re(0)
   , m_verbose(false)
 {
   declareInterface< TileDigitsContByteStreamTool >( this );
@@ -50,14 +53,10 @@ StatusCode TileDigitsContByteStreamTool::initialize() {
 
   CHECK( detStore()->retrieve(m_tileHWID, "TileHWID") );
 
-  // rodid 4 modules/rodid
-  m_hid2re.setTileHWID(m_tileHWID);
-  m_fea.idMap().setTileHWID(m_tileHWID);
-
-  // rodid 8 modules/rodid
-  m_TileMuRcv_hid2re.setTileMuRcvHWID(m_tileHWID);
-  m_TileMuRcv_fea.idMap().setTileMuRcvHWID(m_tileHWID);
+  ToolHandle<TileROD_Decoder> dec("TileROD_Decoder");
+  CHECK( dec.retrieve() );
 
+  m_hid2re = dec->getHid2reHLT();
 
   return StatusCode::SUCCESS;
 }
@@ -86,10 +85,10 @@ StatusCode TileDigitsContByteStreamTool::convert(DIGITS* digitsContainer, FullEv
     TileDigitsCollection::ID frag_id = digitsCollection->identify(); 
 
     if (isTMDB){  
-       reid = m_TileMuRcv_hid2re.getRodTileMuRcvID(frag_id);    
+       reid = m_hid2re->getRodTileMuRcvID(frag_id);
        mapEncoder[reid].setTileHWID(m_tileHWID);
     } else {
-       reid = m_hid2re.getRodID(frag_id);
+       reid = m_hid2re->getRodID(frag_id);
        mapEncoder[reid].setTileHWID(m_tileHWID, m_verbose, 1);
     }
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileHid2RESrcID.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileHid2RESrcID.cxx
index 33628e573d820b0f08f5aa16908996905804e8c2..9399952d32f695f884e865892ff6a11abbf719f7 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileHid2RESrcID.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileHid2RESrcID.cxx
@@ -30,7 +30,7 @@ TileHid2RESrcID::TileHid2RESrcID(const TileHWID* tileHWID, uint32_t runnum)
 {
   m_tileHWID = tileHWID;
   if (m_tileHWID) {
-    // make internal maps 
+    // make internal maps
     initialize(runnum);
     initializeMuRcv(runnum);
   }
@@ -38,19 +38,23 @@ TileHid2RESrcID::TileHid2RESrcID(const TileHWID* tileHWID, uint32_t runnum)
 
 void TileHid2RESrcID::setTileHWID(const TileHWID* tileHWID, uint32_t runnum)
 {
-  m_tileHWID = tileHWID;
-  if (m_tileHWID) {
-    // make internal maps 
-    initialize(runnum);
+  if ( m_tileHWID != tileHWID ||  m_runnum != runnum) {
+    m_tileHWID = tileHWID;
+    if (m_tileHWID) {
+      // make internal maps
+      initialize(runnum);
+    }
   }
 }
 
 void TileHid2RESrcID::setTileMuRcvHWID(const TileHWID* tileHWID, uint32_t runnum)
 {
-  m_tileHWID = tileHWID;
-  if (m_tileHWID) {
-    // make internal maps 
-    initializeMuRcv(runnum);
+  if ( m_tileHWID != tileHWID ||  m_TileMuRcvRunnum != runnum) {
+    m_tileHWID = tileHWID;
+    if (m_tileHWID) {
+      // make internal maps
+      initializeMuRcv(runnum);
+    }
   }
 }
 
@@ -111,7 +115,7 @@ void TileHid2RESrcID::initialize(uint32_t runnum)
 
 void TileHid2RESrcID::initializeMuRcv(uint32_t runnum)
 {
-  m_runnum = runnum;
+  m_TileMuRcvRunnum = runnum;
   eformat::SubDetector detid[6];
 
   detid[0] = eformat::TILECAL_LASER_CRATE;    // 0x50 - beam crate
@@ -269,11 +273,11 @@ void TileHid2RESrcID::setROD2ROBmap (const eformat::FullEventFragment<const uint
                   if ( (*it).second != ROBid ) {
                     log << MSG::INFO << "Frag 0x" << MSG::hex << fragid 
                         <<" remapping from ROB 0x" << (*it).second
-                        << " to 0x" << ROBid << endmsg;
+                        << " to 0x" << ROBid << MSG::dec << endmsg;
                   } else {
                     log << MSG::DEBUG << "Frag 0x" << MSG::hex << fragid 
                         <<" found in ROB 0x" << (*it).second
-                        << " as expected" << endmsg;
+                        << " as expected" << MSG::dec << endmsg;
                   }
                 }
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileL2ContByteStreamCnv.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileL2ContByteStreamCnv.cxx
index 629495b607d79afb601cba0eb50f17dc55ca2f77..52cf290aeed76165d8b419710ff43d7dc62b966e 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileL2ContByteStreamCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileL2ContByteStreamCnv.cxx
@@ -63,10 +63,10 @@ StatusCode TileL2ContByteStreamCnv::initialize() {
   m_byteStreamCnvSvc = dynamic_cast<ByteStreamCnvSvc*>(&*m_byteStreamEventAccess);
 
   // retrieve Tool
-  CHECK( m_tool.retrieve() );
-
   CHECK( m_decoder.retrieve() );
 
+  CHECK( m_tool.retrieve() );
+
   CHECK( m_robSvc.retrieve() );
   
   // create empty TileL2Container and all TileL2 inside
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileL2ContByteStreamTool.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileL2ContByteStreamTool.cxx
index 915ef298ffa4070bc72e0d28ebc84354b85866e7..2a1ae8764b7b80329a77e5105174a65c19c2a944 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileL2ContByteStreamTool.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileL2ContByteStreamTool.cxx
@@ -24,6 +24,7 @@
 
 // Tile includes
 #include "TileByteStream/TileL2ContByteStreamTool.h"
+#include "TileByteStream/TileROD_Decoder.h"
 #include "TileByteStream/TileROD_Encoder.h"
 #include "TileEvent/TileContainer.h"
 #include "TileEvent/TileL2.h"
@@ -46,7 +47,11 @@ const InterfaceID& TileL2ContByteStreamTool::interfaceID() {
 
 TileL2ContByteStreamTool::TileL2ContByteStreamTool(const std::string& type, const std::string& name,
     const IInterface* parent)
-    : AthAlgTool(type, name, parent), m_verbose(false) {
+  : AthAlgTool(type, name, parent)
+  , m_tileHWID(0)
+  , m_hid2re(0)
+  , m_verbose(false)
+{
   declareInterface<TileL2ContByteStreamTool>(this);
   declareProperty("DoFragTypeMu", m_doFragTypeMu = true);
   declareProperty("DoFragTypeEt", m_doFragTypeEt = true);
@@ -59,24 +64,15 @@ TileL2ContByteStreamTool::~TileL2ContByteStreamTool() {
 
 StatusCode TileL2ContByteStreamTool::initialize() {
 
+  ATH_MSG_INFO ("Initializing TileL2ContByteStreamTool");
+
   CHECK( detStore()->retrieve(m_tileHWID, "TileHWID") );
 
-  m_hid2re.setTileHWID(m_tileHWID);
-  m_fea.idMap().setTileHWID(m_tileHWID);
-  /*
-   IProperty* propertyServer(0);
-   sc = serviceLocator()->service("TileROD_Decoder", propertyServer);
-   if (sc.isSuccess() ) {
-
-   bool boolProp;
-   BooleanProperty boolProperty("VerboseOutput",boolProp);
-
-   sc = propertyServer->getProperty(&boolProperty);
-   if (sc.isSuccess()) {
-   m_verbose = boolProperty.value();
-   }
-   }
-   */
+  ToolHandle<TileROD_Decoder> dec("TileROD_Decoder");
+  CHECK( dec.retrieve() );
+
+  m_hid2re = dec->getHid2reHLT();
+
   return StatusCode::SUCCESS;
 }
 
@@ -89,7 +85,6 @@ StatusCode TileL2ContByteStreamTool::convert(TileL2Container* cont,
     FullEventAssembler<TileHid2RESrcID> *fea) {
 
   //fea->clear(); 
-  // m_fea.idMap().setTileHWID(m_tileHWID);
 
   FullEventAssembler<TileHid2RESrcID>::RODDATA* theROD;
   TileL2Container::const_iterator it_cont = cont->begin();
@@ -104,7 +99,7 @@ StatusCode TileL2ContByteStreamTool::convert(TileL2Container* cont,
 
     int frag_id = (*it_cont)->identify();
 
-    uint32_t reid = m_hid2re.getRodID(frag_id);
+    uint32_t reid = m_hid2re->getRodID(frag_id);
     mapEncoder[reid].setTileHWID(m_tileHWID, m_verbose, 0x12);
 
     const TileL2* l2 = *it_cont;
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileLaserObjByteStreamCnv.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileLaserObjByteStreamCnv.cxx
index 7c4da2fa5bf7aa5ededa56da018425f4d32ad0bd..7743d5ca30cd6eb6544ec62bc8d268a51ab6d1c1 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileLaserObjByteStreamCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileLaserObjByteStreamCnv.cxx
@@ -32,6 +32,7 @@
 #include "TileByteStream/TileHid2RESrcID.h"
 #include "TileIdentifier/TileTBFrag.h"
 #include "TileEvent/TileLaserObject.h"
+#include "TileByteStream/TileROD_Decoder.h"
 
 
 
@@ -43,6 +44,7 @@ TileLaserObjByteStreamCnv::TileLaserObjByteStreamCnv(ISvcLocator* svcloc)
   , m_decoder("TileROD_Decoder")
   , m_robFrag(0)
   , m_ROBID()
+  , m_hid2re(0)
   , m_container(0)
 {
 }
@@ -61,11 +63,12 @@ StatusCode TileLaserObjByteStreamCnv::initialize() {
   // retrieve Tool
   CHECK( m_decoder.retrieve() );
 
+  m_hid2re = m_decoder->getHid2re();
+
   m_ROBID.clear();
   // m_ROBID.push_back( 0x500000 );
   // m_ROBID.push_back( 0x520010 );
-  const TileHid2RESrcID* hid2re = m_decoder->getHid2re();
-  m_ROBID.push_back( hid2re->getRobFromFragID(LASER_OBJ_FRAG) );
+  m_ROBID.push_back( m_hid2re->getRobFromFragID(LASER_OBJ_FRAG) );
 
   return StatusCode::SUCCESS ;
 }
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileLaserObjByteStreamTool.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileLaserObjByteStreamTool.cxx
index 664d0b50616591024727a50765e7bc9fbd374357..fed4c6801c56476cf0f8958108418756c46b4b35 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileLaserObjByteStreamTool.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileLaserObjByteStreamTool.cxx
@@ -14,6 +14,7 @@
 
 // Tile includes
 #include "TileByteStream/TileLaserObjByteStreamTool.h"
+#include "TileByteStream/TileROD_Decoder.h"
 #include "TileByteStream/TileROD_Encoder.h"
 #include "TileEvent/TileLaserObject.h"
 #include "TileIdentifier/TileHWID.h"
@@ -33,6 +34,8 @@ const InterfaceID& TileLaserObjByteStreamTool::interfaceID() {
  TileLaserObjByteStreamTool::TileLaserObjByteStreamTool
 ( const std::string& type, const std::string& name,const IInterface* parent )
   : AthAlgTool(type,name,parent)
+  , m_tileHWID(0)
+  , m_hid2re(0)
   , m_verbose(false)
 {
   declareInterface< TileLaserObjByteStreamTool  >( this );
@@ -48,10 +51,15 @@ TileLaserObjByteStreamTool::~TileLaserObjByteStreamTool() {
 
 StatusCode TileLaserObjByteStreamTool::initialize() {
 
+  ATH_MSG_INFO ("Initializing TileLaserObjByteStreamTool");
+
   CHECK( detStore()->retrieve(m_tileHWID, "TileHWID") );
 
-  m_hid2re.setTileHWID(m_tileHWID);
-  m_fea.idMap().setTileHWID(m_tileHWID);
+  ToolHandle<TileROD_Decoder> dec("TileROD_Decoder");
+  CHECK( dec.retrieve() );
+
+  m_hid2re = dec->getHid2reHLT();
+
   return StatusCode::SUCCESS;
 }
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileMuRcvContByteStreamCnv.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileMuRcvContByteStreamCnv.cxx
index f719b79e17708413789fe7e811e2e7e415976265..0d9f6befdf8607faa6213fa6ffcaecfc293ab6ff 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileMuRcvContByteStreamCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileMuRcvContByteStreamCnv.cxx
@@ -2,16 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "TileByteStream/TileMuRcvContByteStreamCnv.h"
-#include "TileByteStream/TileMuRcvContByteStreamTool.h"
-#include "TileByteStream/TileROD_Decoder.h"
-
-#include "ByteStreamCnvSvc/ByteStreamCnvSvc.h"
-#include "ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h" 
-#include "ByteStreamCnvSvcBase/ByteStreamAddress.h" 
-#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h" 
-#include "ByteStreamData/RawEvent.h" 
-
+// Gaudi includes
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/CnvFactory.h"
 #include "GaudiKernel/StatusCode.h"
@@ -20,23 +11,39 @@
 #include "GaudiKernel/IIncidentSvc.h"
 #include "GaudiKernel/IToolSvc.h"
 
-#include "TileEvent/TileMuonReceiverObj.h"
-#include "TileEvent/TileContainer.h"
+// Athena includes
+#include "AthenaKernel/errorcheck.h"
+
+#include "ByteStreamCnvSvc/ByteStreamCnvSvc.h"
+#include "ByteStreamCnvSvcBase/ByteStreamCnvSvcBase.h"
+#include "ByteStreamCnvSvcBase/ByteStreamAddress.h"
+#include "ByteStreamCnvSvcBase/IROBDataProviderSvc.h"
+#include "ByteStreamData/RawEvent.h"
 
 #include "StoreGate/StoreGate.h"
 #include "StoreGate/StoreClearedIncident.h"
 #include "CLIDSvc/CLASS_DEF.h"
 
+// Tile includes
+#include "TileByteStream/TileMuRcvContByteStreamCnv.h"
+#include "TileByteStream/TileMuRcvContByteStreamTool.h"
+#include "TileByteStream/TileROD_Decoder.h"
+
+
 #include <string> 
 
-TileMuRcvContByteStreamCnv::TileMuRcvContByteStreamCnv(ISvcLocator* svcloc) :
-    Converter(ByteStream_StorageType, classID(),svcloc),
-    m_tool(0),
-    m_decoder(0),
-    m_ByteStreamEventAccess(0),
-    m_container(0),
-    m_storeGate(0),
-    m_rdpSvc(0)
+
+TileMuRcvContByteStreamCnv::TileMuRcvContByteStreamCnv(ISvcLocator* svcloc)
+  : Converter(ByteStream_StorageType, classID(),svcloc)
+  , ::AthMessaging(msgSvc(), "TileMuRcvContByteStreamCnv")
+  , m_name("TileMuRcvContByteStreamCnv")
+  , m_tool("TileMuRcvContByteStreamTool")
+  , m_byteStreamEventAccess("ByteStreamCnvSvc", m_name)
+  , m_byteStreamCnvSvc(0)
+  , m_storeGate("StoreGateSvc", m_name)
+  , m_robSvc("ROBDataProviderSvc", m_name)
+  , m_decoder("TileROD_Decoder")
+  , m_container(0)
 {
 }
 
@@ -46,67 +53,25 @@ return ClassID_traits<TileMuonReceiverContainer>::ID() ;
 
 StatusCode TileMuRcvContByteStreamCnv::initialize()
 {
-  StatusCode sc = Converter::initialize(); 
-
-  if (sc.isFailure()) {
-    return sc; 
-  } 
-
-  MsgStream log(msgSvc(), "TileMuRcvContByteStreamCnv");
-
-  log << MSG::DEBUG << " initialize() " << endmsg; 
+  CHECK(Converter::initialize());
 
-  // Get ByteStreamInputSvc
-  // 
-  IService* svc;
-  if(StatusCode::SUCCESS != serviceLocator()->getService("ROBDataProviderSvc",svc)){
-    log << MSG::WARNING << " Can't get ByteStreamInputSvc interface Reading of ByteStream Data not possible. " << endmsg;
-    m_rdpSvc=0;
-  }
-  else {
-    m_rdpSvc=dynamic_cast<IROBDataProviderSvc*>(svc);
-    if(m_rdpSvc == 0 ) {
-      log<<MSG::ERROR<< " Can't cast to  ByteStreamInputSvc " <<endmsg; 
-      return StatusCode::FAILURE;
-    }
-  }
-
-  // Get ByteStreamCnvSvc  [svc]
-  //
-  if(StatusCode::SUCCESS != serviceLocator()->getService("ByteStreamCnvSvc",svc)){
-    log << MSG::ERROR << " Can't get ByteStreamEventAccess interface " << endmsg;
-    return StatusCode::FAILURE;
-  }
-  m_ByteStreamEventAccess=dynamic_cast<ByteStreamCnvSvc*>(svc);
-  if (m_ByteStreamEventAccess==NULL)
-    {
-      log << MSG::ERROR << "  TileMuRcvContByteStreamCnv: Can't cast to  ByteStreamCnvSvc " << endmsg; 
-      return StatusCode::FAILURE ;
-    }
+  ATH_MSG_DEBUG(" initialize ");
 
-  // retrieve Tools        [m_tool,m_decoder]
-  //  
-  IToolSvc* toolSvc;
+  // Get ByteStreamCnvSvc
+  CHECK( m_byteStreamEventAccess.retrieve() );
+  m_byteStreamCnvSvc = dynamic_cast<ByteStreamCnvSvc*>(&*m_byteStreamEventAccess);
 
-  if(StatusCode::SUCCESS != service("ToolSvc",toolSvc)){
-    log << MSG::ERROR << " Can't get ToolSvc " << endmsg;
-    return StatusCode::FAILURE;
-  }
+  // retrieve Tool
+  CHECK( m_decoder.retrieve() );
 
-  if(StatusCode::SUCCESS != toolSvc->retrieveTool("TileMuRcvContByteStreamTool",m_tool)) {
-    log << MSG::ERROR << " Can't get ByteStreamTool " << endmsg;
-    return StatusCode::FAILURE;
-  }
+  CHECK( m_tool.retrieve() );
 
-  if(StatusCode::SUCCESS != toolSvc->retrieveTool("TileROD_Decoder",m_decoder)) {
-    log << MSG::ERROR << "Can't get TileROD_Decoder" << endmsg;
-    return StatusCode::FAILURE; 
-  }
+  CHECK( m_robSvc.retrieve() );
 
   // per event there is only one object per EB module 128
   //
   int cntsize = 128;
-  m_container = new TileMuonReceiverContainer(); 
+  m_container = new TileMuonReceiverContainer();
   m_container->reserve(cntsize);
 
   for( int i=0; i<cntsize; i++) {
@@ -116,129 +81,98 @@ StatusCode TileMuRcvContByteStreamCnv::initialize()
   }
 
   // Register incident handler
-  //
-  ServiceHandle<IIncidentSvc> incSvc( "IncidentSvc", "TileMuRcvContByteStreamCnv");
+  ServiceHandle<IIncidentSvc> incSvc("IncidentSvc", m_name);
   if ( !incSvc.retrieve().isSuccess() ) {
-    log << MSG::WARNING << "Unable to retrieve the IncidentSvc" << endmsg;
-  }
-  else {
-    incSvc->addListener(this,"StoreCleared");
+    ATH_MSG_WARNING( "Unable to retrieve the IncidentSvc" );
+  } else {
+    incSvc->addListener(this, "StoreCleared");
   }
 
-  log << MSG::DEBUG << " End of initialize() " << endmsg;
+  CHECK( m_storeGate.retrieve() );
 
-  return service("StoreGateSvc",m_storeGate) ;
+  return StatusCode::SUCCESS ;
 }
 
 
 StatusCode TileMuRcvContByteStreamCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj) 
 {
 
-  MsgStream log(msgSvc(), "TileMuRcvContByteStreamCnv");
-
-  log << MSG::DEBUG << " Executing createObj method" << endmsg;
+  ATH_MSG_DEBUG( " Executing createObj method" );
 
-  if (!m_rdpSvc) {
-    log << MSG::ERROR << " ROBDataProviderSvc not loaded. Can't read ByteStream." << endmsg;
-    return StatusCode::FAILURE;
-  }
-
-  ByteStreamAddress *pRE_Addr;
+  ByteStreamAddress* pRE_Addr;
   pRE_Addr = dynamic_cast<ByteStreamAddress*>(pAddr);
   if(!pRE_Addr) {
-    log << MSG::ERROR << " Can't cast to ByteStreamAddress " << endmsg ;
+    ATH_MSG_ERROR( " Can not cast to ByteStreamAddress " );
     return StatusCode::FAILURE;
   }
 
-  const RawEvent* re = m_rdpSvc->getEvent();
+  const RawEvent* re = m_robSvc->getEvent();
   if (!re) {
-    log << MSG::ERROR << "Could not get raw event from ByteStreamInputSvc" << endmsg;
+    ATH_MSG_ERROR( "Could not get raw event from ByteStreamInputSvc" );
     return StatusCode::FAILURE;
   }
 
   StatusCode sc=m_decoder->convertTMDBDecision(re,m_container);
   if (sc!=StatusCode::SUCCESS) {
-    log << MSG::WARNING << "Conversion tool returned an error. TileMuonReceiverContainer might be empty." << endmsg;
+    ATH_MSG_WARNING( "Conversion tool returned an error. TileMuonReceiverContainer might be empty." );
   }
 
   // new container will not own elements, i.e. TileMuonReceiverContainer will not be deleted
   TileMuonReceiverContainer * new_container = new TileMuonReceiverContainer(*m_container);
-  pObj = StoreGateSvc::asStorable( new_container );
+
+  pObj = SG::asStorable( new_container );
 
   return StatusCode::SUCCESS;
 }
 
 StatusCode TileMuRcvContByteStreamCnv::createRep(DataObject* pObj, IOpaqueAddress*& pAddr)
 {
-  // convert TileMuonsReceiverObj's in the container into ByteStream
-  //
-  MsgStream log(msgSvc(), "TileMuRcvContByteStreamCnv");
-  log << MSG::DEBUG << " Executing createRep method " << endmsg;
-
-  StatusCode sc;
+  ATH_MSG_DEBUG( " Executing createRep method" );
 
   // get Full Event Assembler
-  //
-  FullEventAssembler<TileHid2RESrcID> *fea = 0;
+  FullEventAssembler<TileHid2RESrcID>* fea = 0;
   std::string key("Tile");
-  sc=m_ByteStreamEventAccess->getFullEventAssembler(fea,key);
 
-  if (sc.isFailure()) {
-    log << MSG::ERROR << "Can't get full event assember with key \"Tile\" from ByteStreamEventAccess." << endmsg;
-    return sc;
-  }
+  CHECK( m_byteStreamCnvSvc->getFullEventAssembler(fea, key) );
 
   // create TileMuonReceiverContainer
   //
   TileMuonReceiverContainer* muRcvCont(0);
-  StoreGateSvc::fromStorable(pObj, muRcvCont );
-
+  SG::fromStorable(pObj, muRcvCont);
   if(!muRcvCont){
-    log << MSG::ERROR << " Can't cast to TileMuonReceiverContainer " << endmsg;
+    ATH_MSG_ERROR( " Can not cast to TileMuonReceiverContainer " );
     return StatusCode::FAILURE;
   }
 
-  std::string          nm = pObj->registry()->name();
+  std::string name = pObj->registry()->name();
+  ByteStreamAddress* addr = new ByteStreamAddress(classID(), name, "");
 
-  ByteStreamAddress* addr = new ByteStreamAddress(classID(),nm,"");
-
-  pAddr                   = addr;
+  pAddr = addr;
 
   // call TileMuRcvContByteStreamTool
-  //
-  sc = m_tool->convert(muRcvCont,fea);
-  if (sc.isFailure()) return sc;
+  CHECK( m_tool->convert(muRcvCont,fea) );
 
   return StatusCode::SUCCESS;
 }
 
 StatusCode TileMuRcvContByteStreamCnv::finalize()
 {
-  MsgStream log(msgSvc(), "TileMuRcvContByteStreamCnv");
-  log << MSG::DEBUG << " Clearing TileMuonReceiverContainer " << endmsg; 
+  ATH_MSG_DEBUG( " Clearing TileMuonReceiverContainer Container " );
 
   m_container->clear();
 
-  delete m_container; 
+  delete m_container;
 
-  return Converter::finalize(); 
+  return Converter::finalize();
 }
 
 void TileMuRcvContByteStreamCnv::handle(const Incident& incident)
 {
-  if (incident.type() == "StoreCleared")
-  {
-    if (const StoreClearedIncident* inc =
-        dynamic_cast<const StoreClearedIncident*> (&incident))
-    {
-      if (inc->store() == m_storeGate) {
-        TileMuonReceiverContainer::const_iterator collItr=m_container->begin();
-        TileMuonReceiverContainer::const_iterator lastColl=m_container->end();
-
-        for(; collItr!=lastColl; ++collItr) {
-          const TileMuonReceiverObj * constColl = (*collItr);
-          TileMuonReceiverObj * coll = (TileMuonReceiverObj *)constColl;
-          coll->clear();
+  if (incident.type() == "StoreCleared") {
+    if (const StoreClearedIncident* inc = dynamic_cast<const StoreClearedIncident*> (&incident)) {
+      if (inc->store() == &*m_storeGate) {
+        for (const TileMuonReceiverObj* tileMuObj : *m_container) {
+          const_cast<TileMuonReceiverObj*>(tileMuObj)->clear();
         }
       }
     }
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileMuRcvContByteStreamTool.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileMuRcvContByteStreamTool.cxx
index 272994dbac8c94952965a3c2948b0e53155e4ba3..7322bc94a2eae76233120889ec18bf087e403646 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileMuRcvContByteStreamTool.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileMuRcvContByteStreamTool.cxx
@@ -24,6 +24,7 @@
 
 // Tile includes
 #include "TileByteStream/TileMuRcvContByteStreamTool.h"
+#include "TileByteStream/TileROD_Decoder.h"
 #include "TileByteStream/TileROD_Encoder.h"
 #include "TileEvent/TileMuonReceiverObj.h"
 #include "TileEvent/TileContainer.h"
@@ -46,6 +47,7 @@ TileMuRcvContByteStreamTool::TileMuRcvContByteStreamTool(const std::string& type
     const IInterface* parent)
   : AthAlgTool(type, name, parent)
   , m_tileHWID(0)
+  , m_hid2re(0)
     //, m_verbose(false)
 {
   declareInterface<TileMuRcvContByteStreamTool>(this);
@@ -62,9 +64,10 @@ StatusCode TileMuRcvContByteStreamTool::initialize() {
 
   CHECK( detStore()->retrieve(m_tileHWID, "TileHWID") );
 
-  // rodid 8 modules/rodid
-  m_hid2re.setTileMuRcvHWID(m_tileHWID);
-  m_fea.idMap().setTileMuRcvHWID(m_tileHWID);
+  ToolHandle<TileROD_Decoder> dec("TileROD_Decoder");
+  CHECK( dec.retrieve() );
+
+  m_hid2re = dec->getHid2reHLT();
 
   return StatusCode::SUCCESS;
 }
@@ -95,7 +98,7 @@ StatusCode TileMuRcvContByteStreamTool::convert(TileMuonReceiverContainer* cont,
     {
       n++;
       frag_id = (*it_cont)->identify();
-      reid = m_hid2re.getRodTileMuRcvID(frag_id);
+      reid = m_hid2re->getRodTileMuRcvID(frag_id);
       mapEncoder[reid].setTileHWID(m_tileHWID);
       const TileMuonReceiverObj* tileMuRcv = *it_cont;	
       mapEncoder[reid].addTileMuRcvObj(tileMuRcv);
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx
index 945c294c4a88e46550a78d52c22962993d6558d0..6b8be9e62dfcc3245d316da5cf25bbdcaccbdb8b 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileROD_Decoder.cxx
@@ -46,7 +46,9 @@ TileROD_Decoder::TileROD_Decoder(const std::string& type, const std::string& nam
   , m_tileCondToolOfcCool("TileCondToolOfcCool")
   , m_tileToolEmscale("TileCondToolEmscale")
   , m_hid2re(0)
+  , m_hid2reHLT(0)
   , m_maxChannels(TileCalibUtils::MAX_CHAN)
+  , m_fullTileRODs(320000) // default 2017 full mode
 {
   declareInterface<TileROD_Decoder>(this);
   
@@ -68,17 +70,19 @@ TileROD_Decoder::TileROD_Decoder(const std::string& type, const std::string& nam
   declareProperty("calibrateEnergy", m_calibrateEnergy = true); // convert ADC counts to pCb for RawChannels
   declareProperty("suppressDummyFragments", m_suppressDummyFragments = false);
   declareProperty("maskBadDigits", m_maskBadDigits = false); // put -1 in digits vector for channels with bad BCID or CRC in unpack_frag0
+  declareProperty("MaxWarningPrint", m_maxWarningPrint = 1000);
   declareProperty("MaxErrorPrint", m_maxErrorPrint = 100);
 
   declareProperty("AllowedTimeMin", m_allowedTimeMin = -50.); // set amp to zero if time is below allowed time min
   declareProperty("AllowedTimeMax", m_allowedTimeMax =  50.); // set amp to zero if time is above allowed time max
+  declareProperty("fullTileMode", m_fullTileRODs); // run from which to take the cabling (for the moment, either 320000 - full 2017 mode - or 0 - 2016 mode)
 
   m_correctAmplitude = false;
   updateAmpThreshold(15.);
   m_timeMinThresh = -25;
   m_timeMaxThresh = 25;
   
-  for (unsigned int i = 0; i < 6; ++i) {
+  for (unsigned int i = 0; i < 7; ++i) {
     m_digitsMetaData.push_back(new std::vector<uint32_t>);
     m_digitsMetaData[i]->reserve(16);
     m_rawchannelMetaData.push_back(new std::vector<uint32_t>);
@@ -96,6 +100,7 @@ TileROD_Decoder::TileROD_Decoder(const std::string& type, const std::string& nam
   m_container = 0;
   m_MBTS = NULL;
   m_cell2Double.reserve(23); // Maximum number of cells in a drawer
+  m_WarningCounter = 0;
   m_ErrorCounter = 0;
   
   m_OFWeights.resize(4 * TileCalibUtils::MAX_DRAWERIDX, NULL);
@@ -110,11 +115,12 @@ void TileROD_Decoder::updateAmpThreshold(float ampMinThresh) {
 /** destructor
  */
 TileROD_Decoder::~TileROD_Decoder() {
-  for (unsigned int i = 0; i < 6; ++i) {
+  for (unsigned int i = 0; i < 7; ++i) {
     delete m_digitsMetaData[i];
     delete m_rawchannelMetaData[i];
   }
   if (m_hid2re) delete m_hid2re;
+  if (m_hid2reHLT) delete m_hid2reHLT;
   
   for (unsigned int id = 0; id < 4 * TileCalibUtils::MAX_DRAWERIDX; ++id)
     if (m_OFWeights[id]) delete m_OFWeights[id];
@@ -124,12 +130,22 @@ const InterfaceID& TileROD_Decoder::interfaceID() {
   return IID_ITileROD_Decoder;
 }
 
+void TileROD_Decoder::printWarningCounter(bool printIfNoWarning) {
+  if (printIfNoWarning || m_WarningCounter > 0) {
+    ATH_MSG_WARNING( "Found " << m_WarningCounter << " warnings in decoding words");
+  }
+}
+
 void TileROD_Decoder::printErrorCounter(bool printIfNoError) {
   if (printIfNoError || m_ErrorCounter > 0) {
     ATH_MSG_ERROR( "Found " << m_ErrorCounter << " errors in decoding words");
   }
 }
 
+int TileROD_Decoder::getWarningCounter() {
+  return m_WarningCounter;
+}
+
 int TileROD_Decoder::getErrorCounter() {
   return m_ErrorCounter;
 }
@@ -212,6 +228,7 @@ StatusCode TileROD_Decoder::finalize() {
     m_Rw2Pmt[i].clear();
   }
   m_list_of_masked_drawers.clear();
+  if (m_WarningCounter != 0) printWarningCounter(1);
   if (m_ErrorCounter != 0) printErrorCounter(1);
   return StatusCode::SUCCESS;
 }
@@ -250,12 +267,27 @@ void TileROD_Decoder::unpack_frag0(uint32_t version, const uint32_t* p, pDigiVec
   // Position of first data word, ignore 2 frag header words
   data = p + 2;
   
-  // check that fragment is not dummy
-  if (m_suppressDummyFragments) {
-    for (n = 0; n < size; ++n) {
-      if (data[n] != 0 && data[n] != 0xffffffff) break;
+  uint32_t all00 = TileFragStatus::ALL_00;
+  uint32_t allFF = TileFragStatus::ALL_FF;
+
+  for (int i = 0; i < size; ++i) {
+    uint32_t w = data[i];
+    if (allFF && w!=0xFFFFFFFF) {
+      allFF = TileFragStatus::ALL_OK;
+      if (all00 == TileFragStatus::ALL_OK) break;
+    }
+    if (all00 && w != 0) {
+      all00 = TileFragStatus::ALL_OK;
+      if (allFF == TileFragStatus::ALL_OK) break;
     }
-    if (n == size) return; // nothing reasonable found
+  }
+
+  uint32_t status = (all00 | allFF);
+  m_digitsMetaData[6]->push_back( status );
+
+  // check that fragment is not dummy
+  if (m_suppressDummyFragments && status != TileFragStatus::ALL_OK) {
+    return; // nothing reasonable found
   }
   
   // if (msgLvl(MSG::VERBOSE))
@@ -870,14 +902,18 @@ void TileROD_Decoder::unpack_frag4(uint32_t /* version */, const uint32_t* p,
   
   HWIdentifier drawerID = m_tileHWID->drawer_id(frag);
   TileRawChannel* rc;
-  
+  uint32_t all00 = TileFragStatus::ALL_00;
+  uint32_t allFF = TileFragStatus::ALL_FF;
+
   for (unsigned int ch = 0; ch < m_maxChannels; ++ch) {
     unsigned int w = (*p);
     
     int gain = m_rc2bytes4.gain(w);
     HWIdentifier adcID = m_tileHWID->adc_id(drawerID, ch, gain);
     
+    if (allFF && w!=0xFFFFFFFF) allFF = TileFragStatus::ALL_OK;
     if (w != 0) { // skip invalid channels
+      if (all00) all00 = TileFragStatus::ALL_OK;
       rc = new TileRawChannel(adcID
                               , m_rc2bytes4.amplitude(w)
                               , m_rc2bytes4.time(w)
@@ -900,6 +936,8 @@ void TileROD_Decoder::unpack_frag4(uint32_t /* version */, const uint32_t* p,
     ++p;
   }
   
+  m_rawchannelMetaData[6]->push_back( all00 | allFF );
+
   if (wc > count) {
     // check word count
     ATH_MSG_ERROR( "unpack_frag4 => Incorrect word count: "
@@ -996,18 +1034,30 @@ void TileROD_Decoder::unpack_frag6(uint32_t /*version*/, const uint32_t* p, pDig
   // pointer to current data word
   const uint32_t* data = p + 2;     // Position of first data word, 
 
-  // check that fragment is not dummy
-  if (m_suppressDummyFragments) {
-    int n = 0;
-    for (; n < size; ++n) {
-      if (data[n] != 0 && data[n] != 0xffffffff) break;
+  uint32_t all00 = TileFragStatus::ALL_00;
+  uint32_t allFF = TileFragStatus::ALL_FF;
+
+  for (int i = 0; i < size; ++i) {
+    uint32_t w = data[i];
+    if (allFF && w!=0xFFFFFFFF) {
+      allFF = TileFragStatus::ALL_OK;
+      if (all00 == TileFragStatus::ALL_OK) break;
     }
-    if (n == size) {// nothing reasonable found
-      ATH_MSG_WARNING("FRAG6: Suppress dummy fragment!!!");
-      return; 
+    if (all00 && w != 0) {
+      all00 = TileFragStatus::ALL_OK;
+      if (allFF == TileFragStatus::ALL_OK) break;
     }
   }
 
+  uint32_t status = (all00 | allFF);
+  m_digitsMetaData[6]->push_back( status );
+
+  // check that fragment is not dummy
+  if (m_suppressDummyFragments && status != TileFragStatus::ALL_OK) {
+    ATH_MSG_WARNING("FRAG6: Suppress dummy fragment!!!");
+    return; // nothing reasonable found
+  }
+
   unsigned int moduleID[4] = {0};
   unsigned int runType[4] = {0};
 
@@ -2338,7 +2388,7 @@ void TileROD_Decoder::unpack_frag17(uint32_t /* version */, const uint32_t* p,
   if (true) {
     int maxn=size+2-m_sizeOverhead;
     for(int n=0; n<maxn; ++n){
-      ATH_MSG_DEBUG("WORD " << n << " (" << n+11 << ") : (DEC) " << p[n] << "  (HEX) 0x" << std::hex << p[n] << std::dec );
+      ATH_MSG_DEBUG("WORD " << n << " (" << n+11 << ") : (DEC) " << p[n] << "  (HEX) 0x" << MSG::hex << p[n] << MSG::dec );
     }
   }
   
@@ -2352,7 +2402,7 @@ void TileROD_Decoder::unpack_frag17(uint32_t /* version */, const uint32_t* p,
   laserObject.setPLC(-99,-99,-99,-99,-99,-99);
   laserObject.setDaqType(int(p[2]));
   
-  ATH_MSG_DEBUG("SETTING DAQ TYPE IN DECODER = " << std::hex << "0x" << int(p[2]) << "  " << std::dec << int(p[2]));
+  ATH_MSG_DEBUG("SETTING DAQ TYPE IN DECODER = " << MSG::hex << "0x" << int(p[2]) << "  " << MSG::dec << int(p[2]));
   
   int countr = p[3];
   int idiode = (p[4]>>16);
@@ -2363,7 +2413,7 @@ void TileROD_Decoder::unpack_frag17(uint32_t /* version */, const uint32_t* p,
   if(laserObject.isLASERII()) ATH_MSG_DEBUG("LASERII VERSION IS " << laserObject.getVersion());
   else                        ATH_MSG_DEBUG("LASERI VERSION IS "  << laserObject.getVersion());
   
-  ATH_MSG_DEBUG("laserObject.setLaser: " << std::dec << "COUNTER=" << countr << " | "
+  ATH_MSG_DEBUG("laserObject.setLaser: " << MSG::dec << "COUNTER=" << countr << " | "
                 << "I_DIODE=" << idiode << " | "
                 << "FILTERN=" << filter << " | "
                 << "TIMINGD=" << timing << " | "
@@ -2463,8 +2513,8 @@ void TileROD_Decoder::unpack_frag17(uint32_t /* version */, const uint32_t* p,
           ATH_MSG_DEBUG("ALP CHAN=" << channel << " GAIN=LG" << " TYPE=" << laserObject.getType(channel,TileID::LOWGAIN,3) << " MEAN=" << laserObject.getMean(channel,TileID::LOWGAIN,3) << " SIGMA=" << laserObject.getSigma(channel,TileID::LOWGAIN,3) << " N=" << laserObject.getN(channel,TileID::LOWGAIN,3) << " isSet?=" << laserObject.isSet(channel,TileID::LOWGAIN,3) );
           ATH_MSG_DEBUG("ALP CHAN=" << channel << " GAIN=HG" << " TYPE=" << laserObject.getType(channel,TileID::HIGHGAIN,3) << " MEAN=" << laserObject.getMean(channel,TileID::HIGHGAIN,3) << " SIGMA=" << laserObject.getSigma(channel,TileID::HIGHGAIN,3) << " N=" << laserObject.getN(channel,TileID::HIGHGAIN,3) << " isSet?=" << laserObject.isSet(channel,TileID::HIGHGAIN,3) );
           
-          ATH_MSG_DEBUG(std::hex << msb0 << " + " << lsb0 << " => " << SSQ0 <<
-                        std::dec << "  >>>  D" << channel << "(HG)"
+          ATH_MSG_DEBUG(MSG::hex << msb0 << " + " << lsb0 << " => " << SSQ0 <<
+                        MSG::dec << "  >>>  D" << channel << "(HG)"
                         << " SUMX/N="
                         << sum[channel*2+HG]
                         << " / " << nevt
@@ -2475,8 +2525,8 @@ void TileROD_Decoder::unpack_frag17(uint32_t /* version */, const uint32_t* p,
                         << " / " << nevt
                         << " => STD="
                         << std[channel*2+0]);
-          ATH_MSG_DEBUG(std::hex << msb1 << " + " << lsb1 << " => " << SSQ1 <<
-                        std::dec << "  >>>  D" << channel << "(LG)"
+          ATH_MSG_DEBUG(MSG::hex << msb1 << " + " << lsb1 << " => " << SSQ1 <<
+                        MSG::dec << "  >>>  D" << channel << "(LG)"
                         << " SUMX/N="
                         << sum[channel*2+LG]
                         << " / " << nevt
@@ -2507,7 +2557,7 @@ void TileROD_Decoder::unpack_frag17(uint32_t /* version */, const uint32_t* p,
     }
     
   } else { // short fragment
-    ATH_MSG_DEBUG("SHORT FRAGMENT, size=" << p[0] << " type=0x" << std::hex << p[1] << std::dec);
+    ATH_MSG_DEBUG("SHORT FRAGMENT, size=" << p[0] << " type=0x" << MSG::hex << p[1] << MSG::dec);
     memset(ped,0,sizeof(ped));
     memset(std,0,sizeof(std));
   }
@@ -2809,7 +2859,7 @@ StatusCode TileROD_Decoder::convert(const RawEvent* re, TileL2Container* L2Cnt)
 }
 
 void TileROD_Decoder::fillCollectionL2(const ROBData * rob, TileL2Container & v) {
-  uint32_t version = rob->rod_version() & 0xFF;
+  uint32_t version = rob->rod_version() & 0xFFFF;
   
   uint32_t wc = 0;
   uint32_t size = data_size(rob);
@@ -2820,6 +2870,11 @@ void TileROD_Decoder::fillCollectionL2(const ROBData * rob, TileL2Container & v)
   
   if (size) {
     bool V3format = (*(p) == 0xff1234ff); // additional frag marker since Sep 2005
+    if (!V3format && version>0xff) {
+      V3format = true;
+      if ((m_WarningCounter++) < m_maxWarningPrint)
+        ATH_MSG_WARNING("fillCollectionL2( corrupted frag separator 0x" << MSG::hex << (*p) << " instead of 0xff1234ff in ROB 0x" << rob->rod_source_id() << MSG::dec );
+    }
     if (V3format) ++p; // skip frag marker
   }
   
@@ -3004,7 +3059,7 @@ StatusCode TileROD_Decoder::convertLaser(const RawEvent* re, TileLaserObject* la
 void TileROD_Decoder::fillTileLaserObj(const ROBData * rob, TileLaserObject & v) {
   // v.setBCID(-999);  // TileLaserObject default tag -> Laser only if BCID != -999
   
-  uint32_t version = rob->rod_version() & 0xFF;
+  uint32_t version = rob->rod_version() & 0xFFFF;
   
   uint32_t wc = 0;
   uint32_t size = data_size(rob);
@@ -3021,6 +3076,11 @@ void TileROD_Decoder::fillTileLaserObj(const ROBData * rob, TileLaserObject & v)
   }
   
   bool V3format = (*(p) == 0xff1234ff); // additional frag marker since Sep 2005
+  if (!V3format && version>0) {
+    V3format = true;
+    if ((m_WarningCounter++) < m_maxWarningPrint)
+      ATH_MSG_WARNING("fillTileLaserObj: corrupted frag separator 0x" << MSG::hex << (*p) << " instead of 0xff1234ff in ROB 0x" << rob->rod_source_id() << MSG::dec );
+  }
   if (V3format) {
     ++p; // skip frag marker
     m_sizeOverhead = 3;
@@ -3038,13 +3098,13 @@ void TileROD_Decoder::fillTileLaserObj(const ROBData * rob, TileLaserObject & v)
     int frag = *(p + 1) & 0xFFFF;
     int type = *(p + 1) >> 16;
     
-    msg(MSG::DEBUG) << wc << " / " << size << " HEX = 0x" << std::hex << count << " DEC = " << std::dec << count << " ( FRAG , TYPE ) = " << frag << " , " << type << endmsg;
+    msg(MSG::DEBUG) << wc << " / " << size << " HEX = 0x" << MSG::hex << count << " DEC = " << MSG::dec << count << " ( FRAG , TYPE ) = " << frag << " , " << type << endmsg;
     
     if (count < m_sizeOverhead || count > size - wc) {
       int cnt = 0;
       for (; wc < size; ++wc, ++cnt, ++p) {
         if ((*p) == 0xff1234ff) {
-          msg(MSG::DEBUG) << "DATA POINTER: HEX = " << std::hex << (*p) << " DEC = " << std::dec << (*p) << endmsg;
+          msg(MSG::DEBUG) << "DATA POINTER: HEX = " << MSG::hex << (*p) << " DEC = " << MSG::dec << (*p) << endmsg;
           ++cnt;
           ++wc;
           ++p;
@@ -3103,7 +3163,7 @@ void TileROD_Decoder::fillTileLaserObj(const ROBData * rob, TileLaserObject & v)
 } //end of FillLaserObj
 
 void TileROD_Decoder::fillCollectionHLT(const ROBData * rob, TileCellCollection & v) {
-  uint32_t version = rob->rod_version() & 0xFF;
+  uint32_t version = rob->rod_version() & 0xFFFF;
   // Resets error flag
   m_error = 0x0;
   
@@ -3125,6 +3185,11 @@ void TileROD_Decoder::fillCollectionHLT(const ROBData * rob, TileCellCollection
   
   if (size) {
     bool V3format = (*(p) == 0xff1234ff); // additional frag marker since Sep 2005
+    if (!V3format && version>0xff) {
+      V3format = true;
+      if ((m_WarningCounter++) < m_maxWarningPrint)
+        ATH_MSG_WARNING("fillCollectionHLT: corrupted frag separator 0x" << MSG::hex << (*p) << " instead of 0xff1234ff in ROB 0x" << rob->rod_source_id() << MSG::dec );
+    }
     if (V3format) {
       ++p; // skip frag marker
       m_sizeOverhead = 3;
@@ -3852,9 +3917,9 @@ void TileROD_Decoder::loadMBTS_Ptr(TileCellCollection* col,
 void TileROD_Decoder::initHid2re() {
   if (m_hid2re) return;
   
-  m_hid2re = new TileHid2RESrcID();
-  m_hid2re->setTileHWID(m_tileHWID);// setting a frag2RODmap
-  m_hid2re->setTileMuRcvHWID(m_tileHWID);// setting a different frag2RODmap dedicated to TMDB
+  ATH_MSG_DEBUG( "initHid2re() for run " << m_fullTileRODs );
+
+  m_hid2re = new TileHid2RESrcID(m_tileHWID,m_fullTileRODs); // setting normal frag2RODmap and map dedicated to TMDB
   
   // Check whether we want to overwrite default ROB IDs
   
@@ -3868,7 +3933,7 @@ void TileROD_Decoder::initHid2re() {
       
       if (vecProperty.value().size() % 2 == 1) {
         ATH_MSG_DEBUG( "Length of ROD2ROBmap is and odd value, "
-                      << " means that we'll scan event for all fragments to create proper map" );
+                       << " means that we'll scan event for all fragments to create proper map" );
         
         IROBDataProviderSvc* robSvc;
         if (service("ROBDataProviderSvc", robSvc).isSuccess()) {
@@ -3882,19 +3947,28 @@ void TileROD_Decoder::initHid2re() {
             m_hid2re->setROD2ROBmap(event, msg());
           }
         }
+      } else if (vecProperty.value().size() == 0) {
+        ATH_MSG_DEBUG( "Length of ROD2ROBmap vector is zero, "
+                       << " means that predefined mapping for run " << m_fullTileRODs << " will be used " );
       } else {
+        ATH_MSG_DEBUG( "Apply additional remapping for " << vecProperty.value().size()/2 << " fragments from jobOptions ");
         m_hid2re->setROD2ROBmap(vecProperty.value(), msg());
       }
     }
   }
 }
 
-void TileROD_Decoder::initTileMuRcvHid2re() {
-  if (m_hid2re) return;
+void TileROD_Decoder::initHid2reHLT() {
+  if (m_hid2reHLT) return;
 
-  m_hid2re = new TileHid2RESrcID();
-  m_hid2re->setTileMuRcvHWID(m_tileHWID);
+  ATH_MSG_DEBUG( "initHid2reHLT() for run " << m_fullTileRODs );
 
+  m_hid2reHLT = new TileHid2RESrcID(m_tileHWID,m_fullTileRODs); // setting a frag2RODmap and map dedicated to TMDB
+}
+
+void TileROD_Decoder::initTileMuRcvHid2re() {
+  ATH_MSG_DEBUG( "initTileMuRcvHid2re() for run " << m_fullTileRODs );
+  initHid2re();
 }
 
 uint32_t* TileROD_Decoder::getOFW(int fragId, int unit) {
@@ -3965,7 +4039,7 @@ void TileROD_Decoder::fillCollection_TileMuRcv_Digi(const ROBData* rob , TileDig
   bool b_sof      = false;
   bool b_digiTmdb = false;
 
-  uint32_t version  = rob->rod_version() & 0xFF;
+  uint32_t version  = rob->rod_version() & 0xFFFF;
   uint32_t sourceid = rob->rod_source_id();
   int size          = rob->rod_ndata();
 
@@ -4025,7 +4099,7 @@ void TileROD_Decoder::fillCollection_TileMuRcv_RawChannel(const ROBData* rob , T
   bool b_sof    = false;
   bool b_rcTmdb = false;
 
-  uint32_t version  = rob->rod_version() & 0xFF;
+  uint32_t version  = rob->rod_version() & 0xFFFF;
   uint32_t sourceid = rob->rod_source_id();
   int size          = rob->rod_ndata();
   int offset = 0;
@@ -4124,7 +4198,7 @@ void TileROD_Decoder::fillContainer_TileMuRcv_Decision(const ROBData* rob ,TileM
   bool b_sof      = false;
   bool b_deciTmdb = false;
 
-  uint32_t version  = rob->rod_version() & 0xFF;
+  uint32_t version  = rob->rod_version() & 0xFFFF;
   uint32_t sourceid = rob->rod_source_id();
   int size          = rob->rod_ndata();
   int offset        = 0;
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamCnv.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamCnv.cxx
index da0057722437b47625022c113894090bf2dea49c..48b32f62990b905c13a59a31da94b54f483d2673 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamCnv.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamCnv.cxx
@@ -66,11 +66,11 @@ StatusCode TileRawChannelContByteStreamCnv::initialize() {
   m_byteStreamCnvSvc = dynamic_cast<ByteStreamCnvSvc*>(&*m_byteStreamEventAccess);
 
   // retrieve Tool
-  CHECK( m_tool.retrieve() );
-
   CHECK( m_decoder.retrieve() );
   m_hid2re = m_decoder->getHid2re();
 
+  CHECK( m_tool.retrieve() );
+
   CHECK( m_robSvc.retrieve() );
 
   TileFragHash::TYPE type;
@@ -150,6 +150,8 @@ StatusCode TileRawChannelContByteStreamCnv::createObj(IOpaqueAddress* pAddr, Dat
         } else {
           m_decoder->fillCollection(robf[0], *rawChannelCollection);
         }
+      } else {
+        rawChannelCollection->setFragGlobalCRC(TileROD_Decoder::NO_ROB);
       }
     }
 
diff --git a/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamTool.cxx b/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamTool.cxx
index cccaa6d5a51898f6f77f0931d080c9bcdd77129e..53b1f130b1925f6ecc54dea57ef18441db3c4169 100644
--- a/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamTool.cxx
+++ b/TileCalorimeter/TileSvc/TileByteStream/src/TileRawChannelContByteStreamTool.cxx
@@ -18,6 +18,7 @@
 #include "TileConditions/TileCondToolEmscale.h"
 #include "TileConditions/ITileBadChanTool.h"
 #include "TileConditions/TileCablingService.h"
+#include "TileByteStream/TileROD_Decoder.h"
 
 #include <map> 
 #include <stdint.h>
@@ -34,6 +35,7 @@ TileRawChannelContByteStreamTool::TileRawChannelContByteStreamTool(const std::st
     const std::string& name, const IInterface* parent)
     : AthAlgTool(type, name, parent)
     , m_tileHWID(0)
+    , m_hid2re(0)
     , m_verbose(false)
     , m_tileToolEmscale("TileCondToolEmscale")
     , m_tileBadChanTool("TileBadChanTool")
@@ -56,13 +58,10 @@ StatusCode TileRawChannelContByteStreamTool::initialize() {
 
   CHECK( detStore()->retrieve(m_tileHWID, "TileHWID") );
 
-  // rodid 4 modules/rod
-  m_hid2re.setTileHWID(m_tileHWID);
-  m_fea.idMap().setTileHWID(m_tileHWID);
+  ToolHandle<TileROD_Decoder> dec("TileROD_Decoder");
+  CHECK( dec.retrieve() );
 
-  // rodid 8 modules/rod
-  m_TileMuRcv_hid2re.setTileMuRcvHWID(m_tileHWID);
-  m_TileMuRcv_fea.idMap().setTileMuRcvHWID(m_tileHWID);
+  m_hid2re = dec->getHid2reHLT();
 
   // get TileCondToolEmscale
   CHECK( m_tileToolEmscale.retrieve() );
@@ -107,8 +106,8 @@ StatusCode TileRawChannelContByteStreamTool::convert(CONTAINER* rawChannelContai
 
     TileRawChannelCollection::ID frag_id = rawChannelCollection->identify();
 
-    if (isTMDB) reid = m_TileMuRcv_hid2re.getRodTileMuRcvID(frag_id);
-    else reid = m_hid2re.getRodID(frag_id);
+    if (isTMDB) reid = m_hid2re->getRodTileMuRcvID(frag_id);
+    else reid = m_hid2re->getRodID(frag_id);
 
     mapEncoder[reid].setTileHWID(m_tileHWID, m_verbose, 4);
     mapEncoder[reid].setTypeAndUnit(contType, outputUnit);
diff --git a/TileCalorimeter/TileSvc/TileEventAthenaPool/doc/packagedoc.h b/TileCalorimeter/TileSvc/TileEventAthenaPool/doc/packagedoc.h
index 1c5a1b8769747715ca7a4b2576b5905dfb71b260..1cef269ee8efa342d8169190211565776eab3a30 100644
--- a/TileCalorimeter/TileSvc/TileEventAthenaPool/doc/packagedoc.h
+++ b/TileCalorimeter/TileSvc/TileEventAthenaPool/doc/packagedoc.h
@@ -44,12 +44,3 @@ Transient/Persistent separation. More details here:
 https://twiki.cern.ch/twiki/bin/view/Atlas/TransientPersistentSeparation
 
 */
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-
-*/
diff --git a/TileCalorimeter/TileSvc/TileSimEventAthenaPool/doc/packagedoc.h b/TileCalorimeter/TileSvc/TileSimEventAthenaPool/doc/packagedoc.h
index 759301c21b4032645b155de6c5bb1cc4bb1dc966..e98b8db9b816ef289df22fb42bb36e890d9f2112 100644
--- a/TileCalorimeter/TileSvc/TileSimEventAthenaPool/doc/packagedoc.h
+++ b/TileCalorimeter/TileSvc/TileSimEventAthenaPool/doc/packagedoc.h
@@ -35,12 +35,3 @@ Transient/Persistent separation. More details here:
 https://twiki.cern.ch/twiki/bin/view/Atlas/TransientPersistentSeparation
 
 */
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-
-*/
diff --git a/TileCalorimeter/TileSvc/TileSimEventTPCnv/doc/packagedoc.h b/TileCalorimeter/TileSvc/TileSimEventTPCnv/doc/packagedoc.h
index 4cf7a7258959f78ce6d83e88186b2ed010b435f6..cb57d0242b081e40dc40c17a1ff4b97bf3ba1f24 100644
--- a/TileCalorimeter/TileSvc/TileSimEventTPCnv/doc/packagedoc.h
+++ b/TileCalorimeter/TileSvc/TileSimEventTPCnv/doc/packagedoc.h
@@ -59,15 +59,5 @@ This package is used to provide the Transient/Persistent separation for TileCal
 
   - TileHitVectorCnv_p1
 
-@ref used_TileTPCnv
 
-@ref requirements_TileTPCnv
-*/
-
-/**
-@page used_TileTPCnv Used Packages
-*/
-
-/**
-@page requirements_TileTPCnv Requirements
 */
diff --git a/TileCalorimeter/TileSvc/TileTPCnv/doc/packagedoc.h b/TileCalorimeter/TileSvc/TileTPCnv/doc/packagedoc.h
index 391519635c8135a9eddb0c392682e0a24d02c3b1..2085bcea9ff19a3e8f9818b59cea30dfbf3eac54 100644
--- a/TileCalorimeter/TileSvc/TileTPCnv/doc/packagedoc.h
+++ b/TileCalorimeter/TileSvc/TileTPCnv/doc/packagedoc.h
@@ -79,15 +79,5 @@ This package is used to provide the Transient/Persistent separation for TileCal
   - TileCosmicMuonContainerCnv_p1
   - TileTTL1CellContainerCnv_p1
 
-@ref used_TileTPCnv
 
-@ref requirements_TileTPCnv
-*/
-
-/**
-@page used_TileTPCnv Used Packages
-*/
-
-/**
-@page requirements_TileTPCnv Requirements
 */
diff --git a/TileCalorimeter/TileTBRec/TileTBRec/TileTBAANtuple.h b/TileCalorimeter/TileTBRec/TileTBRec/TileTBAANtuple.h
index 4e82ebc155da5c17aba6e19f5277f4ce57054986..0534ae78e85646de53d510821dc0e3085431d309 100755
--- a/TileCalorimeter/TileTBRec/TileTBRec/TileTBAANtuple.h
+++ b/TileCalorimeter/TileTBRec/TileTBRec/TileTBAANtuple.h
@@ -308,6 +308,7 @@ class TileTBAANtuple: public AthAlgorithm {
     int* m_tof;
     int* m_btdc1;
     int* m_btdc2;
+    int m_tjitter;
 
     float m_xChN2;
     float m_yChN2;
diff --git a/TileCalorimeter/TileTBRec/doc/packagedoc.h b/TileCalorimeter/TileTBRec/doc/packagedoc.h
index c4b927931dfdd8fd15e502027c89d997f8a9ec4e..6b2c8270ff361f297436e76dcea96efc574d317f 100644
--- a/TileCalorimeter/TileTBRec/doc/packagedoc.h
+++ b/TileCalorimeter/TileTBRec/doc/packagedoc.h
@@ -31,17 +31,5 @@ TileTBStat produce statistics from the Byte Stream data fragment. This algorithm
 @section TileTBRec_TileTBAna 
 Obsolete algorithm to produce a testbeam summary ntuple.
 
-@ref used_TileTBRec
-@ref requirements_TileTBRec
 
 */
-
-/**
-@page used_TileTBRec Used Packages
-*/
-
-/**
-@page requirements_TileTBrec Requirements
-*/
-
-
diff --git a/TileCalorimeter/TileTBRec/src/TileTBAANtuple.cxx b/TileCalorimeter/TileTBRec/src/TileTBAANtuple.cxx
index cc13339e0dcfd84d0a5a31f6a842042160ec3ee5..5ec7868c3dd9fe567e3bb06660949a87b94582a6 100755
--- a/TileCalorimeter/TileTBRec/src/TileTBAANtuple.cxx
+++ b/TileCalorimeter/TileTBRec/src/TileTBAANtuple.cxx
@@ -172,6 +172,7 @@ TileTBAANtuple::TileTBAANtuple(std::string name, ISvcLocator* pSvcLocator)
   , m_tof(0)
   , m_btdc1(0)
   , m_btdc2(0)
+  , m_tjitter(0)
   , m_xChN2(0.0F)
   , m_yChN2(0.0F)
   , m_xChN1(0.0F)
@@ -392,7 +393,7 @@ StatusCode TileTBAANtuple::ntuple_initialize() {
 //      -------
 //      m_xCha1 = -0.0462586 + (-0.175666)*(m_btdc1[1] - m_btdc1[0]);
 //      m_yCha1 = -0.051923 + (-0.176809)*(m_btdc1[2] - m_btdc1[3]);
-//      
+//
 //      For BC2
 //      -------
 //      m_xCha2 = 0.25202 + (-0.18053)*(m_btdc1[5] - m_btdc1[4]);
@@ -420,25 +421,25 @@ StatusCode TileTBAANtuple::ntuple_initialize() {
 // Center : 610212
 // Left/up : 610210
 // Right/down : 610209
-// 
+//
 // BC2:
 // Center : 610256
 // Left/up : 610321
 // Right/down : 610320
-// 
+//
 // Here are the new constants :
-// 
+//
 // BC1
 // horizontal slope = -0.171928
 // horizontal offset = -0.047624
-// 
+//
 // vertical slope = -0.172942
 // vertical offset = -0.0958677
-// 
+//
 // BC2
 // horizontal slope = -0.175698
 // horizontal offset = -1.04599
-// 
+//
 // vertical slope = -0.174535
 // vertical offset = -3.10666
 
@@ -458,20 +459,33 @@ StatusCode TileTBAANtuple::ntuple_initialize() {
       //m_beamBC2Z  = 2760 /* 2600. */;
 
       // September 2016 calibration, https://pcata007.cern.ch/elog/TB2016/300 (joakim.olsson@cern.ch)
-      m_beamBC1X1 = 0.100857923042;
-      m_beamBC1X2 = -0.172098;
-      m_beamBC1Y1 = -0.133045996607;
-      m_beamBC1Y2 = -0.172855178323;
+      //m_beamBC1X1 = 0.100857923042;
+      //m_beamBC1X2 = -0.172098;
+      //m_beamBC1Y1 = -0.133045996607;
+      //m_beamBC1Y2 = -0.172855178323;
+      //m_beamBC1Z  = 13000. + 2760 /* 2600. */;
+      //
+      //m_beamBC2X1 = 0.271555258578 ;
+      //m_beamBC2X2 = -0.173463 ;
+      //m_beamBC2Y1 = 0.305483228502;
+      //m_beamBC2Y2 = -0.173805131744 ;
+      //m_beamBC2Z  = 2760 /* 2600. */;
+
+      // June 2017 calibration, https://pcata007.cern.ch/elog/TB2017/550 (schae@cern.ch)
+      m_beamBC1X1 =  0.153584934082;
+      m_beamBC1X2 = -0.175220;
+      m_beamBC1Y1 = -0.493246053303;
+      m_beamBC1Y2 = -0.176567356723;
       m_beamBC1Z  = 13000. + 2760 /* 2600. */;
 
-      m_beamBC2X1 = 0.271555258578 ;
-      m_beamBC2X2 = -0.173463 ;
-      m_beamBC2Y1 = 0.305483228502;
-      m_beamBC2Y2 = -0.173805131744 ;
+      m_beamBC2X1 = 0.414611893278;
+      m_beamBC2X2 = -0.176122;
+      m_beamBC2Y1 = 0.150807740888;
+      m_beamBC2Y2 = -0.173472808704;
       m_beamBC2Z  = 2760 /* 2600. */;
     }
   }
-  
+
   if (m_unpackAdder) {
     // get TileRawChannelBuilderFlatFilter for adder energy calculation
     CHECK( m_adderFilterAlgTool.retrieve() );
@@ -848,9 +862,11 @@ StatusCode TileTBAANtuple::storeBeamElements() {
       for (; beamItr != lastBeam; ++beamItr) {
         HWIdentifier id = (*beamItr)->adc_HWID();
         std::vector<uint32_t> digits = (*beamItr)->get_digits();
-        msg(MSG::VERBOSE) << " --- TileBeamElem -- Identifier " << m_tileHWID->to_string(id) << " ";
-        msg(MSG::VERBOSE) << (*beamItr)->get_digits().size() << " " << digits.size() << endmsg;
-        msg(MSG::VERBOSE) << MSG::VERBOSE << " --- TileBeamElem -- BeamElem : " << MSG::dec;
+        msg(MSG::VERBOSE) << " --- TileBeamElem -- Identifier " << m_tileHWID->to_string(id)
+                          << MSG::hex << " frag: 0x" << (*collItr)->identify()
+                          << MSG::dec << " channel " << m_tileHWID->channel(id)
+                          << " digits size " << digits.size() << endmsg;
+        msg(MSG::VERBOSE) << " --- TileBeamElem -- BeamElem : ";
         for (unsigned int k = 0; k < digits.size(); k++)
           msg(MSG::VERBOSE) << digits[k] << " ";
         msg(MSG::VERBOSE) << endmsg;
@@ -886,8 +902,8 @@ StatusCode TileTBAANtuple::storeBeamElements() {
 
         } else if ( dsize != 1              && frag != ADD_FADC_FRAG    &&
                     frag != BEAM_TDC_FRAG   && frag != COMMON_TDC1_FRAG &&
-                    frag != COMMON_TOF_FRAG && frag != COMMON_TDC2_FRAG && 
-		    !(frag == ECAL_ADC_FRAG && cha == 15)) {
+                    frag != COMMON_TOF_FRAG && frag != COMMON_TDC2_FRAG &&
+                    !(frag == ECAL_ADC_FRAG && cha == 15)) {
 
           WRONG_SAMPLE(frag,cha,dsize);
 
@@ -1024,29 +1040,29 @@ StatusCode TileTBAANtuple::storeBeamElements() {
 
           case ECAL_ADC_FRAG:
 
-	    if (m_TBperiod > 2015) {
+            if (m_TBperiod > 2015) {
 
-	      if(cha < 15) {
-		m_qdc[cha] = amplitude;
-	      } else if (cha == 15) {
-		for (int idx = 0; idx < dsize && idx < 18; ++idx) {
-		  m_qdc[idx + 15] = digits[idx];
-		}
-	      } else {
-		WRONG_CHANNEL(frag, cha);
-	      }
+              if(cha < 15) {
+                m_qdc[cha] = amplitude;
+              } else if (cha == 15) {
+                for (int idx = 0; idx < dsize && idx < 18; ++idx) {
+                  m_qdc[idx + 15] = digits[idx];
+                }
+              } else {
+                WRONG_CHANNEL(frag, cha);
+              }
 
-	    } else {
-	      if(cha < 8) m_ecal[cha] = amplitude;
-	      else WRONG_CHANNEL(frag, cha);
-	    }
+            } else {
+              if(cha < 8) m_ecal[cha] = amplitude;
+              else WRONG_CHANNEL(frag, cha);
+            }
 
             break;
 
           case DIGI_PAR_FRAG:
 
             if(cha < 16) m_cispar[cha] = amplitude; //m_cispar->at(cha)=amplitude;
-	          else WRONG_CHANNEL(frag,cha);
+            else WRONG_CHANNEL(frag,cha);
             break;
 
           case COMMON_ADC1_FRAG:
@@ -1115,8 +1131,8 @@ StatusCode TileTBAANtuple::storeBeamElements() {
               int idx = cha * 32;
               for (int ibit = 0; ibit < 32; ++ibit){
                 m_coincTrig1[idx++] = (amplitude >> ibit) & 1;
-	            }
-	          } else if (cha == 3) {
+              }
+            } else if (cha == 3) {
               m_coincFlag1 = amplitude;
             } else WRONG_CHANNEL(frag, cha);
 
@@ -1128,8 +1144,8 @@ StatusCode TileTBAANtuple::storeBeamElements() {
               int idx = cha * 32;
               for (int ibit=0; ibit < 32; ++ibit){
                 m_coincTrig2[idx++] = (amplitude >> ibit) & 1;
-	            }
-	          } else if (cha == 3) {
+              }
+            } else if (cha == 3) {
               m_coincFlag2 = amplitude;
             } else WRONG_CHANNEL(frag, cha);
 
@@ -1141,8 +1157,8 @@ StatusCode TileTBAANtuple::storeBeamElements() {
               int idx = cha * 32;
               for (int ibit = 0; ibit < 32; ++ibit){
                 m_coincTrig3[idx++] = (amplitude >> ibit) & 1;
-	            }
-	          } else if (cha == 3) {
+              }
+            } else if (cha == 3) {
               m_coincFlag3 = amplitude;
             } else WRONG_CHANNEL(frag,cha);
 
@@ -1154,8 +1170,8 @@ StatusCode TileTBAANtuple::storeBeamElements() {
               int idx = cha * 32;
               for (int ibit = 0; ibit < 32; ++ibit){
                 m_coincTrig4[idx++] = (amplitude >> ibit) & 1;
-	            }
-	          } else if (cha == 3) {
+              }
+            } else if (cha == 3) {
               m_coincFlag4 = amplitude;
             } else WRONG_CHANNEL(frag, cha);
 
@@ -1167,8 +1183,8 @@ StatusCode TileTBAANtuple::storeBeamElements() {
               int idx = cha * 32;
               for (int ibit = 0; ibit < 32; ++ibit){
                 m_coincTrig5[idx++] = (amplitude >> ibit) & 1;
-	            }
-	          } else if (cha == 3) {
+              }
+            } else if (cha == 3) {
               m_coincFlag5 = amplitude;
             } else WRONG_CHANNEL(frag, cha);
 
@@ -1180,8 +1196,8 @@ StatusCode TileTBAANtuple::storeBeamElements() {
               int idx = cha * 32;
               for (int ibit = 0; ibit < 32; ++ibit){
                 m_coincTrig6[idx++] = (amplitude >> ibit) & 1;
-	            }
-	          } else if (cha == 3) {
+              }
+            } else if (cha == 3) {
               m_coincFlag6 = amplitude;
             } else WRONG_CHANNEL(frag, cha);
 
@@ -1193,8 +1209,8 @@ StatusCode TileTBAANtuple::storeBeamElements() {
               int idx = cha * 32;
               for (int ibit = 0; ibit < 32; ++ibit){
                 m_coincTrig7[idx++] = (amplitude >> ibit) & 1;
-	            }
-	          } else if (cha == 3) {
+              }
+            } else if (cha == 3) {
               m_coincFlag7 = amplitude;
             } else WRONG_CHANNEL(frag,cha);
 
@@ -1206,8 +1222,8 @@ StatusCode TileTBAANtuple::storeBeamElements() {
               int idx = cha * 32;
               for (int ibit = 0; ibit < 32; ++ibit){
                 m_coincTrig8[idx++] = (amplitude >> ibit) & 1;
-	            }
-	          } else if (cha == 3) {
+              }
+            } else if (cha == 3) {
               m_coincFlag8 = amplitude;
             } else WRONG_CHANNEL(frag, cha);
 
@@ -1228,7 +1244,7 @@ StatusCode TileTBAANtuple::storeBeamElements() {
 //      -------
 //      m_xCha1 = -0.0462586 + (-0.175666)*(m_btdc1[1] - m_btdc1[0]);
 //      m_yCha1 = -0.051923 + (-0.176809)*(m_btdc1[2] - m_btdc1[3]);
-//      
+//
 //      For BC2
 //      -------
 //      m_xCha2 = 0.25202 + (-0.18053)*(m_btdc1[5] - m_btdc1[4]);
@@ -1239,6 +1255,8 @@ StatusCode TileTBAANtuple::storeBeamElements() {
       m_xCha2 = m_beamBC2X1 + m_beamBC2X2*(m_btdc1[5] - m_btdc1[4]);
       m_yCha2 = m_beamBC2Y1 + m_beamBC2Y2*(m_btdc1[6] - m_btdc1[7]);
 
+      m_tjitter = m_btdc1[8];
+
       m_xImp  = m_xCha2 + (m_xCha2 - m_xCha1)*m_beamBC2Z/(m_beamBC1Z - m_beamBC2Z);
       m_yImp  = m_yCha2 + (m_yCha2 - m_yCha1)*m_beamBC2Z/(m_beamBC1Z - m_beamBC2Z);
 
@@ -1373,7 +1391,7 @@ StatusCode TileTBAANtuple::storeRawChannels(std::string containerId
     ATH_MSG_DEBUG( "DSP flag is 0x" << MSG::hex << m_dspFlags << MSG::dec  << " DSP unit is " << m_dspUnit );
 
   } else if ((m_useDspUnits || m_finalUnit >= TileRawChannelUnit::OnlineADCcounts)
-	            && rChUnit != TileRawChannelUnit::ADCcounts) {
+             && rChUnit != TileRawChannelUnit::ADCcounts) {
 
       ATH_MSG_ERROR( "RawChannel units are not ADC counts, can't apply DSP-like calibration" );
       return StatusCode::FAILURE;
@@ -1451,22 +1469,22 @@ StatusCode TileTBAANtuple::storeRawChannels(std::string containerId
         }
 
         // cabling for testbeam (convert to pmt#-1)
-        if ((m_TBperiod < 2015 || 
+        if ((m_TBperiod < 2015 ||
              (m_TBperiod==2015 && fragType<3) ||
-             (m_TBperiod==2016 && (/* fragId != 0x100 && */(fragId&0xFF)<4 && fragId != 0x201)) ) 
+             (m_TBperiod==2016 && (/* fragId != 0x100 && */(fragId&0xFF)<4 && fragId != 0x201)) )
             && fragType > 0 && m_pmtOrder)
           channel = digiChannel2PMT(fragType, channel);
 
-        //	if  ( int((eneVec->at(index))->size()) < (channel+1) ) (eneVec->at(index))->resize(channel+1); //ugly
+        //     if  ( int((eneVec->at(index))->size()) < (channel+1) ) (eneVec->at(index))->resize(channel+1); //ugly
         (eneVec->at(index))[channel] = energy;
-        //	if  ( int((timeVec->at(index))->size()) < (channel+1) ) (timeVec->at(index))->resize(channel+1); //ugly
+        //     if  ( int((timeVec->at(index))->size()) < (channel+1) ) (timeVec->at(index))->resize(channel+1); //ugly
         (timeVec->at(index))[channel] = rch->time();
         if (chi2Vec != 0) {
-          //	  if  ( int((chi2Vec->at(index))->size()) < (channel+1) ) (chi2Vec->at(index))->resize(channel+1); //ugly
+          //     if  ( int((chi2Vec->at(index))->size()) < (channel+1) ) (chi2Vec->at(index))->resize(channel+1); //ugly
           (chi2Vec->at(index))[channel] = rch->quality();
         }
         if (pedVec != 0) {
-          //	  if  ( int((pedVec->at(index))->size()) < (channel+1) ) (pedVec->at(index))->resize(channel+1); //ugly
+          //     if  ( int((pedVec->at(index))->size()) < (channel+1) ) (pedVec->at(index))->resize(channel+1); //ugly
           (pedVec->at(index))[channel] = rch->pedestal();
         }
 
@@ -1667,13 +1685,13 @@ StatusCode TileTBAANtuple::storeDigits() {
             channel = m_tileHWID->channel(hwid);
             // cabling for testbeam (convert to pmt#-1)
 
-            if ((m_TBperiod < 2015 || 
+            if ((m_TBperiod < 2015 ||
                  (m_TBperiod==2015 && fragType<3) ||
-                 (m_TBperiod==2016 && (/* fragId != 0x100 && */ (fragId&0xFF)<4 && fragId != 0x201)) ) 
+                 (m_TBperiod==2016 && (/* fragId != 0x100 && */ (fragId&0xFF)<4 && fragId != 0x201)) )
                 && fragType > 0 && m_pmtOrder)
               channel = digiChannel2PMT(fragType, channel);
 
-            /*	    if  ( int((m_gainVec.at(type))->size()) < (channel+1) ) {
+            /*     if  ( int((m_gainVec.at(type))->size()) < (channel+1) ) {
              (m_gainVec.at(type))->resize(channel+1); //ugly
              }*/
 
@@ -1754,9 +1772,9 @@ StatusCode TileTBAANtuple::storeDigits() {
           // determine channel
           channel = m_tileHWID->channel(hwid);
           // cabling for testbeam
-          if ((m_TBperiod < 2015 || 
+          if ((m_TBperiod < 2015 ||
                (m_TBperiod==2015 && fragType<3) ||
-               (m_TBperiod==2016 && (/* fragId != 0x100 && */ (fragId&0xFF)<4 && fragId != 0x201)) ) 
+               (m_TBperiod==2016 && (/* fragId != 0x100 && */ (fragId&0xFF)<4 && fragId != 0x201)) )
               && fragType > 0 && m_pmtOrder)
             channel = digiChannel2PMT(fragType, channel);
 
@@ -1782,7 +1800,7 @@ StatusCode TileTBAANtuple::storeDigits() {
           }
 
           for (n = 0; n < siz; n++) {
-            //	    ((m_sampleVec.at(type))->at(channel)).push_back((int)sampleVec[n]);
+            //((m_sampleVec.at(type))->at(channel)).push_back((int)sampleVec[n]);
             //(*m_sampleVec[type])[channel][n] = sampleVec[n];
             (m_sampleVec.at(type))[channel][n] = (int) sampleVec[n];
           }
@@ -2184,11 +2202,11 @@ void TileTBAANtuple::getEta() {
 ///
 ///  - C : a character string terminated by the 0 character
 ///  - B : an 8 bit signed integer
-///  - b : an 8 bit unsigned integer			2^8=256
+///  - b : an 8 bit unsigned integer                    2^8=256
 ///  - S : a 16 bit signed integer (i.e. a "short")
-///  - s : a 16 bit unsigned integer			2^16=65536
+///  - s : a 16 bit unsigned integer                    2^16=65536
 ///  - I : a 32 bit signed integer (i.e an "int")
-///  - i : a 32 bit unsigned integer			2^32=4294967296
+///  - i : a 32 bit unsigned integer                    2^32=4294967296
 ///  - F : a 32 bit floating point (i.e. a "float")
 ///  - D : a 64 bit floating point (i.e. a "double")
 ///  - L : a 64 bit signed integer
@@ -2598,6 +2616,7 @@ void TileTBAANtuple::BEAM_addBranch(void) {
     if (m_beamIdList[COMMON_TDC1_FRAG]) {
       m_btdc1 = new int[16];
       m_ntuplePtr->Branch("btdc1", m_btdc1, "m_btdc1[8]/I");
+      m_ntuplePtr->Branch("tjitter", &m_tjitter, "m_tjitter/I");
     }
   } else if (!m_unpackAdder) {
     if (m_beamIdList[COMMON_ADC2_FRAG]) {
@@ -2874,7 +2893,7 @@ void TileTBAANtuple::DIGI_addBranch(void)
   std::ostringstream oss;
   oss << m_nSamples;
   std::string nSampStr=oss.str();
-  
+
   unsigned int listSize = std::min (m_nDrawers, static_cast<unsigned int>(m_drawerMap.size()) );
 
   if (listSize > 0) {
@@ -3084,7 +3103,7 @@ void TileTBAANtuple::DIGI_addBranch(void)
          m_ntuplePtr->Branch(("DMUMask"+suffixArr[i]).c_str(),m_dmuMaskVec.back(),("dmumask"+suffixArr[i]+"[2]/I").c_str()); // int
          m_ntuplePtr->Branch(("SlinkCRC"+suffixArr[i]).c_str(),m_slinkCRCVec.back(),("crc"+suffixArr[i]+"[2]/I").c_str()); // int
       }
-      
+
       m_ntuplePtr->Branch(("Gain"+suffixArr[i]).c_str(),m_gainVec.back(),("gain"+suffixArr[i]+"[48]/I").c_str()); // int
 
        if (m_nSamples > 0) {
@@ -3097,7 +3116,7 @@ void TileTBAANtuple::DIGI_addBranch(void)
           m_ntuplePtr->Branch(("feCRC" + suffixArr[i]).c_str(), m_feCRCVec.back(), ("fe_crc" + suffixArr[i] + "[16]/I").c_str()); // int
           m_ntuplePtr->Branch(("rodCRC" + suffixArr[i]).c_str(), m_rodCRCVec.back(), ("rod_crc" + suffixArr[i] + "[16]/I").c_str()); // int
         }
-        
+
         if (m_flatRawChannelContainer.size() > 0) {
 
           m_ntuplePtr->Branch(("Ene" + suffixArr[i]).c_str(), m_eneVec.back(), ("ene" + suffixArr[i] + "[48]/F").c_str()); // float
diff --git a/TileCalorimeter/TileTBRec/src/TileTBDump.cxx b/TileCalorimeter/TileTBRec/src/TileTBDump.cxx
index 26e3b6d6f68d05e29f8c7952d04886f23db5aa4c..0e87be69622e983913a486758cb0dc12024f14a3 100755
--- a/TileCalorimeter/TileTBRec/src/TileTBDump.cxx
+++ b/TileCalorimeter/TileTBRec/src/TileTBDump.cxx
@@ -327,7 +327,7 @@ StatusCode TileTBDump::execute() {
           
     unsigned int max_allowed_size = robf.rod_fragment_size_word();
     unsigned int delta = robf.rod_header_size_word() + robf.rod_trailer_size_word();
-    if (max_allowed_size > delta) {
+    if (max_allowed_size >= delta) {
       max_allowed_size -= delta;
     } else {
       std::cout << " Problem with ROD data: total length " << max_allowed_size
@@ -363,8 +363,24 @@ StatusCode TileTBDump::execute() {
 
       unsigned int size = robf.rod_ndata();
       if (size > max_allowed_size) {
-        size = max_allowed_size;
-        std::cout<<" Problem with data size - assuming " << size << " words"<<std::endl;
+        if (size - robf.rod_trailer_size_word() < max_allowed_size) {
+          std::cout<<" Problem with data size - assuming that trailer size is " << robf.rod_trailer_size_word()-(size-max_allowed_size)
+                   <<" words instead of " << robf.rod_trailer_size_word() << " and data size is " << size << " words " << std::endl;
+          max_allowed_size = size;
+        } else if (size - robf.rod_trailer_size_word() == max_allowed_size) {
+          std::cout<<" Problem with data size - assuming that trailer is absent "
+                   << " ROD size " << robf.rod_fragment_size_word()
+                   << " header size " << robf.rod_header_size_word()
+                   << " data size " << size << std::endl;
+          max_allowed_size = size;
+        } else {
+          max_allowed_size += robf.rod_trailer_size_word();
+          size = max_allowed_size;
+          std::cout<<" Problem with data size - assuming " << size << " words and no trailer at all"<<std::endl;
+        }
+        std::cout << std::endl << "Dump of whole ROB fragment 0x" << std::hex << robf.rod_source_id() << std::dec
+                  << " (" << robf.rod_fragment_size_word()+robf.header_size_word() << " words)" << std::endl;
+        dump_data(fprob, robf.rod_fragment_size_word()+robf.header_size_word(), version, verbosity);
       }
 
       if ( size > 0 ) {
@@ -389,9 +405,10 @@ StatusCode TileTBDump::execute() {
             dump_digi(subdet_id,data, size, version, verbosity, source_id);
           }
         }
-        
-        std::cout << std::endl;
+      } else {
+        std::cout << std::endl <<  std::hex << "NO DATA in ROB fragment 0x" << robf.rod_source_id() << std::dec << std::endl << std::endl;
       }
+      std::cout << std::endl;
     }
   }
 
@@ -443,14 +460,14 @@ std::ostream &setupPr4 (std::ostream &stream){
 void TileTBDump::dump_data(const uint32_t * data, unsigned int size, unsigned int /* version */, int /* verbosity */) {
 
   boost::io::ios_base_all_saver coutsave(std::cout);
-  std::cout << std::endl << " Fragment data as 4 byte words:" << std::hex << std::setw(8) << std::setprecision(8);
+  std::cout << std::endl << " Fragment data as 4 byte words:" << std::hex << std::setfill('0') ;
 
   for (unsigned int cnter = 0; cnter < size; ++cnter) {
     if (!(cnter % 8)) std::cout << std::endl;
-    std::cout << (*data++) << " ";
+    std::cout << std::setw(8) << (*data++) << " ";
   }
 
-  std::cout << std::dec << std::endl << std::endl;
+  std::cout <<std::setfill(' ') << std::dec << std::endl << std::endl;
 
 }
 
@@ -486,7 +503,7 @@ void TileTBDump::dump_digi(unsigned int subdet_id, const uint32_t* roddata, unsi
     version = 0; // reset version in COMMON BEAM ROD
                  // don't expect different versions there
   } else {
-    version &= 0xFF; // keep just minor version number
+    version &= 0xFFFF; // keep just minor version number
   }
 
   find_frag(roddata, rodsize, version, verbosity, frag, &nfrag);
@@ -1806,17 +1823,23 @@ void dump_it(unsigned int nw, unsigned int * data) {
 
 /* ------------------------------------------------------------------------ */
 
-void TileTBDump::find_frag(const uint32_t* data, unsigned int size, unsigned int /* version */
-                           , int /* verbosity */, T_RodDataFrag** frag, int* nfrag) {
+void TileTBDump::find_frag(const uint32_t* data, unsigned int size, unsigned int version
+                           , int verbosity, T_RodDataFrag** frag, int* nfrag) {
   unsigned int offset = 0;
   *nfrag = 0;
   m_v3Format = (*(data) == 0xff1234ff); // additional frag marker since Sep 2005
   m_v3Format |= (*(data) == 0x00123400); // another possible frag marker (can appear in buggy ROD frags)
-  if (m_v3Format) {
+  if (m_v3Format || (version > 0xff)) {
     m_sizeOverhead = 3;
     ++offset; // skip frag marker
-    std::cout << " *(p) = 0x" << std::hex << (*(data)) << std::dec << std::endl;
+    std::cout << " *(p) = 0x" << std::hex << (*(data)) << std::dec << ((m_v3Format)?"":" => ERROR Corrupted frag separator") << std::endl;
     std::cout << " v3Format = true" << std::endl;
+    if (!m_v3Format) {
+      m_v3Format = true;
+      std::cout << std::endl << "Dump of whole data fragment ("
+                << size << " words)" << std::endl;
+      dump_data(data, size, version, verbosity);
+    }
   } else {
     m_sizeOverhead = 2;
   }
diff --git a/TileCalorimeter/TileTBRec/src/TileTBStat.cxx b/TileCalorimeter/TileTBRec/src/TileTBStat.cxx
index 2bb56c4c8e2540bfa258991c34d06a5c245bc5b1..6ee6ad8defd50b0791cbe4ca6ff38e0649def8f7 100755
--- a/TileCalorimeter/TileTBRec/src/TileTBStat.cxx
+++ b/TileCalorimeter/TileTBRec/src/TileTBStat.cxx
@@ -255,8 +255,22 @@ StatusCode TileTBStat::execute() {
             
         unsigned int size = robf.rod_ndata();
         if (size > max_allowed_size) {
+
+          if (size - robf.rod_trailer_size_word() < max_allowed_size) {
+            ATH_MSG_ERROR( "Problem with data size - assuming that trailer size is " << robf.rod_trailer_size_word()-(size-max_allowed_size)
+                           <<" words instead of " << robf.rod_trailer_size_word() << " and data size is " << size << " words " );
+            max_allowed_size = size;
+          } else if (size - robf.rod_trailer_size_word() == max_allowed_size) {
+            ATH_MSG_ERROR( "Problem with data size - assuming that trailer is absent "
+                           << " ROD size " << robf.rod_fragment_size_word()
+                           << " header size " << robf.rod_header_size_word()
+                           << " data size " << size );
+            max_allowed_size = size;
+          } else {
+            max_allowed_size += robf.rod_trailer_size_word();
             size = max_allowed_size;
-            ATH_MSG_ERROR( "Problem with data size - assuming " << size << " words " );
+            ATH_MSG_ERROR( "Problem with data size - assuming " << size << " words and no trailer at all" );
+          }
         }
 
         if ( size > 0 ) {
diff --git a/Tools/ART/python/ART/art_base.py b/Tools/ART/python/ART/art_base.py
index 3fdbab8190d57da992396481b2289b1d0bf29ed4..add7561d6caee3e9cb29925a16b884f88093395d 100755
--- a/Tools/ART/python/ART/art_base.py
+++ b/Tools/ART/python/ART/art_base.py
@@ -10,7 +10,7 @@ import os
 import sys
 import yaml
 
-from art_misc import check, run_command
+from art_misc import run_command
 from art_header import ArtHeader
 
 
@@ -37,7 +37,7 @@ class ArtBase(object):
         """TBD."""
         self.not_implemented()
 
-    def list(self, package, type):
+    def list(self, package, type, json_format=False):
         """TBD."""
         self.not_implemented()
 
@@ -63,10 +63,14 @@ class ArtBase(object):
     #
     def compare_ref(self, file_name, ref_file, entries=-1):
         """TBD."""
-        out = check(run_command("acmd.py diff-root " + file_name + " " + ref_file + " --error-mode resilient --ignore-leaves RecoTimingObj_p1_HITStoRDO_timings RecoTimingObj_p1_RAWtoESD_mems RecoTimingObj_p1_RAWtoESD_timings RAWtoESD_mems RAWtoESD_timings ESDtoAOD_mems ESDtoAOD_timings HITStoRDO_timings RAWtoALL_mems RAWtoALL_timings RecoTimingObj_p1_RAWtoALL_mems RecoTimingObj_p1_RAWtoALL_timings --entries " + str(entries)))
+        (code, out, err) = run_command("acmd.py diff-root " + file_name + " " + ref_file + " --error-mode resilient --ignore-leaves RecoTimingObj_p1_HITStoRDO_timings RecoTimingObj_p1_RAWtoESD_mems RecoTimingObj_p1_RAWtoESD_timings RAWtoESD_mems RAWtoESD_timings ESDtoAOD_mems ESDtoAOD_timings HITStoRDO_timings RAWtoALL_mems RAWtoALL_timings RecoTimingObj_p1_RAWtoALL_mems RecoTimingObj_p1_RAWtoALL_timings --entries " + str(entries))
+        if code != 0:
+            print "Error:", code
+            print "StdErr:", err
+
         print out
         sys.stdout.flush()
-        return 0
+        return err
 
     #
     # Protected Methods
diff --git a/Tools/ART/python/ART/art_build.py b/Tools/ART/python/ART/art_build.py
index 761b837d225dddc6ceb20019840a526e579b226d..2721b1b02a141c0770dfc04d962f476b58fc0add 100644
--- a/Tools/ART/python/ART/art_build.py
+++ b/Tools/ART/python/ART/art_build.py
@@ -17,21 +17,26 @@ from art_header import ArtHeader
 from parallelScheduler import ParallelScheduler
 
 
-def run_job(art_directory, sequence_tag, script_directory, package, type, index, test_name):
+def run_job(art_directory, sequence_tag, script_directory, package, type, index, test_name, nightly_release, project, platform, nightly_tag):
     """TBD."""
-    # print "run_job", art_directory, sequence_tag, script_directory, package, type, index, test_name
-    (exit_code, out, err) = run_command(os.path.join(art_directory, './art-internal.py') + " job build " + script_directory + " " + package + " " + type + " " + sequence_tag + " " + str(index) + " " + "out")
+    print "job started", art_directory, sequence_tag, script_directory, package, type, index, test_name, nightly_release, project, platform, nightly_tag
+    (exit_code, out, err) = run_command(os.path.join(art_directory, './art-internal.py') + " job build " + script_directory + " " + package + " " + type + " " + sequence_tag + " " + str(index) + " " + "out" + " " + nightly_release + " " + project + " " + platform + " " + nightly_tag)
+    print "job ended", art_directory, sequence_tag, script_directory, package, type, index, test_name, nightly_release, project, platform, nightly_tag
     return (test_name, exit_code, out, err)
 
 
 class ArtBuild(ArtBase):
     """TBD."""
 
-    def __init__(self, art_directory, script_directory, max_jobs=0, ci=False):
+    def __init__(self, art_directory, nightly_release, project, platform, nightly_tag, script_directory, max_jobs=0, ci=False):
         """TBD."""
         # print "ArtBuild", art_directory, script_directory, max_jobs
         self.art_directory = art_directory
         self.script_directory = script_directory
+        self.nightly_release = nightly_release
+        self.project = project
+        self.platform = platform
+        self.nightly_tag = nightly_tag
         self.max_jobs = multiprocessing.cpu_count() if max_jobs <= 0 else max_jobs
         self.ci = ci
 
@@ -39,6 +44,9 @@ class ArtBuild(ArtBase):
         """TBD."""
         # print "task_list", type, sequence_tag
         test_directories = self.get_test_directories(self.script_directory)
+        if not test_directories:
+            print 'WARNING: No tests found in directories ending in "test"'
+
         status = collections.defaultdict(lambda: collections.defaultdict(lambda: collections.defaultdict()))
 
         for package, root in test_directories.items():
@@ -48,6 +56,7 @@ class ArtBuild(ArtBase):
                 status[package][job_result[0]]['out'] = job_result[2]
                 status[package][job_result[0]]['err'] = job_result[3]
 
+        mkdir_p(sequence_tag)
         with open(os.path.join(sequence_tag, "status.json"), 'w') as outfile:
             json.dump(status, outfile, sort_keys=True, indent=4, ensure_ascii=False)
 
@@ -62,9 +71,9 @@ class ArtBuild(ArtBase):
         index = 0
         for test_name in test_names:
             schedule_test = False
+            fname = os.path.join(self.get_test_directories(self.script_directory)[package], test_name)
             if self.ci:
                 branch_name = os.environ['AtlasBuildBranch']
-                fname = os.path.join(self.get_test_directories(self.script_directory)[package], test_name)
                 cis = ArtHeader(fname).get('art-ci')
                 for ci in cis:
                     if re.match(ci, branch_name):
@@ -73,8 +82,12 @@ class ArtBuild(ArtBase):
             else:
                 schedule_test = True
 
+            if not os.access(fname, os.X_OK):
+                schedule_test = False
+                print "job skipped, file not executable: ", fname
+
             if schedule_test:
-                scheduler.add_task(task_name="t" + str(index), dependencies=[], description="d", target_function=run_job, function_kwargs={'art_directory': self.art_directory, 'sequence_tag': sequence_tag, 'script_directory': self.script_directory, 'package': package, 'type': type, 'index': index, 'test_name': test_name})
+                scheduler.add_task(task_name="t" + str(index), dependencies=[], description="d", target_function=run_job, function_kwargs={'art_directory': self.art_directory, 'sequence_tag': sequence_tag, 'script_directory': self.script_directory, 'package': package, 'type': type, 'index': index, 'test_name': test_name, 'nightly_release': self.nightly_release, 'project': self.project, 'platform': self.platform, 'nightly_tag': self.nightly_tag})
             index += 1
 
         return scheduler.run()
@@ -89,7 +102,7 @@ class ArtBuild(ArtBase):
         work_directory = os.path.join(sequence_tag, package, os.path.splitext(test_name)[0])
         mkdir_p(work_directory)
 
-        (exit_code, output, err) = run_command(os.path.join(test_directory, test_name) + ' ' + '.' + ' ' + package + ' ' + type + ' ' + test_name, dir=work_directory)
+        (exit_code, output, err) = run_command(os.path.join(test_directory, test_name) + ' ' + '.' + ' ' + package + ' ' + type + ' ' + test_name + ' ' + self.nightly_release + ' ' + self.project + ' ' + self.platform + ' ' + self.nightly_tag, dir=work_directory)
 
         with open(os.path.join(work_directory, "stdout.txt"), "w") as text_file:
             text_file.write(output)
diff --git a/Tools/ART/python/ART/art_grid.py b/Tools/ART/python/ART/art_grid.py
index ec7bd2c50c020a80b672e46749c91b5f0b897597..d9d79429220b8c1786c1ce936a37c0890f044bac 100644
--- a/Tools/ART/python/ART/art_grid.py
+++ b/Tools/ART/python/ART/art_grid.py
@@ -4,12 +4,16 @@
 
 __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
 
+import atexit
 import datetime
+import glob
+import json
 import os
 import re
 import shutil
 import sys
 import tarfile
+import tempfile
 
 from art_base import ArtBase
 from art_misc import mkdir_p, make_executable, check, run_command
@@ -18,15 +22,18 @@ from art_misc import mkdir_p, make_executable, check, run_command
 class ArtGrid(ArtBase):
     """TBD."""
 
-    def __init__(self, art_directory, nightly_release, project, platform, nightly_tag):
+    def __init__(self, art_directory, nightly_release, project, platform, nightly_tag, script_directory=None, skip_setup=False, submit_directory=None):
         """TBD."""
         self.art_directory = art_directory
         self.nightly_release = nightly_release
         self.project = project
         self.platform = platform
         self.nightly_tag = nightly_tag
+        self.script_directory = script_directory
+        self.skip_setup = skip_setup
+        self.submit_directory = submit_directory
+
         self.cvmfs_directory = '/cvmfs/atlas-nightlies.cern.ch/repo/sw'
-        self.script_directory = None
 
     def get_script_directory(self):
         """On demand script directory, only to be called if directory exists."""
@@ -40,13 +47,12 @@ class ArtGrid(ArtBase):
     def task_list(self, type, sequence_tag):
         """TBD."""
         # job will be submitted from tmp directory
-        submit_directory = 'tmp'
+        submit_directory = tempfile.mkdtemp(dir='.')
 
-        # make sure tmp is removed
-        if os.path.exists(submit_directory):
-            shutil.rmtree(submit_directory)
+        # make sure tmp is removed afterwards
+        atexit.register(shutil.rmtree, submit_directory)
 
-        config = self.get_config()
+        config = None if self.skip_setup else self.get_config()
 
         # make sure script directory exist
         if not os.path.isdir(self.get_script_directory()):
@@ -58,7 +64,7 @@ class ArtGrid(ArtBase):
         # get the test_*.sh from the test directory
         test_directories = self.get_test_directories(self.get_script_directory())
         if not test_directories:
-            print 'No tests found in directories ending in "test"'
+            print 'WARNING: No tests found in directories ending in "test"'
             sys.stdout.flush()
 
         for package, root in test_directories.items():
@@ -85,7 +91,6 @@ class ArtGrid(ArtBase):
                     # get the path of the python classes and support scripts
                     art_python_directory = os.path.join(self.art_directory, '..', 'python', 'ART')
 
-                    # FIXME we need to know where all those files went in the Athena install
                     shutil.copy(os.path.join(self.art_directory, 'art.py'), run)
                     shutil.copy(os.path.join(self.art_directory, 'art-internal.py'), run)
                     shutil.copy(os.path.join(art_python_directory, '__init__.py'), ART)
@@ -102,7 +107,7 @@ class ArtGrid(ArtBase):
                     make_executable(os.path.join(run, 'art.py'))
                     make_executable(os.path.join(run, 'art-internal.py'))
 
-                    command = os.path.join(self.art_directory, 'art-internal.py') + ' task grid ' + package + ' ' + type + ' ' + sequence_tag + ' ' + self.nightly_release + ' ' + self.project + ' ' + self.platform + ' ' + self.nightly_tag
+                    command = os.path.join(self.art_directory, 'art-internal.py') + ' task grid ' + ('--skip-setup' if self.skip_setup else '') + ' ' + submit_directory + ' ' + self.get_script_directory() + ' ' + package + ' ' + type + ' ' + sequence_tag + ' ' + self.nightly_release + ' ' + self.project + ' ' + self.platform + ' ' + self.nightly_tag
                     print command
                     sys.stdout.flush()
                     out = check(run_command(command))
@@ -122,7 +127,7 @@ class ArtGrid(ArtBase):
 
         # run task from Bash Script as is needed in ATLAS setup
         # FIXME we need to parse the output
-        out = check(run_command(os.path.join(self.art_directory, 'art-task-grid.sh') + " " + package + " " + type + " " + sequence_tag + " " + str(number_of_tests) + " " + self.nightly_release + " " + self.project + " " + self.platform + " " + self.nightly_tag))
+        out = check(run_command(os.path.join(self.art_directory, 'art-task-grid.sh') + " " + ('--skip-setup' if self.skip_setup else '') + " " + self.submit_directory + " " + self.get_script_directory() + " " + package + " " + type + " " + sequence_tag + " " + str(number_of_tests) + " " + self.nightly_release + " " + self.project + " " + self.platform + " " + self.nightly_tag))
         print out
         sys.stdout.flush()
         return 0
@@ -168,14 +173,17 @@ class ArtGrid(ArtBase):
         tar_file.close()
         return 0
 
-    def list(self, package, type):
+    def list(self, package, type, json_format=False):
         """TBD."""
         jobs = self.get_list(self.get_script_directory(), package, type)
+        if json_format:
+            json.dump(jobs, sys.stdout, sort_keys=True, indent=4)
+            return 0
         i = 1
         for job in jobs:
             print str(i) + ' ' + job
-            sys.stdout.flush()
             i += 1
+        sys.stdout.flush()
         return 0
 
     def log(self, package, test_name):
@@ -205,21 +213,31 @@ class ArtGrid(ArtBase):
     def compare(self, package, test_name, days, file_names):
         """TBD."""
         previous_nightly_tag = self.get_previous_nightly_tag(days)
+        print "Previous Nightly Tag:", str(previous_nightly_tag)
+        if previous_nightly_tag is None:
+            print "ERROR: No previous nightly tag found"
+            return 1
 
         ref_dir = os.path.join('.', 'ref-' + previous_nightly_tag)
         mkdir_p(ref_dir)
 
         tar = self.get_tar(package, test_name, '_EXT0', previous_nightly_tag)
+        if tar is None:
+            print "ERROR: No comparison tar file found"
+            return 1
+
         for member in tar.getmembers():
             if member.name in file_names:
                 tar.extractall(path=ref_dir, members=[member])
         tar.close()
 
         for file_name in file_names:
-            print "art-compare: " + previous_nightly_tag + " " + file_name
             ref_file = os.path.join(ref_dir, file_name)
-
-            self.compare_ref(file_name, ref_file, 10)
+            if os.path.isfile(ref_file):
+                print "art-compare: " + previous_nightly_tag + " " + file_name
+                self.compare_ref(file_name, ref_file, 10)
+            else:
+                print "ERROR:", ref_file, "not found in tar file"
         return 0
 
     #
@@ -227,6 +245,9 @@ class ArtGrid(ArtBase):
     #
     def excluded(self, config, package):
         """Based on config, decide if a release is excluded from testing."""
+        if config is None:
+            return False
+
         if self.nightly_release not in config.keys():
             return True
 
@@ -247,25 +268,50 @@ class ArtGrid(ArtBase):
         if nightly_tag is None:
             nightly_tag = self.nightly_tag
 
-        type = self.get_type(self.get_test_directories(self.get_script_directory())[package], test_name)
-        index = self.get_list(self.get_script_directory(), package, type).index(test_name)
+        try:
+            type = self.get_type(self.get_test_directories(self.get_script_directory())[package], test_name)
+            print "Type:", type
+            index = self.get_list(self.get_script_directory(), package, type).index(test_name)
+            print "Index:", index
+        except KeyError:
+            print package, "does not exist in tests of ", self.get_script_directory()
+            return None
+
         # Grid counts from 1
         index += 1
 
-        container = 'user.artprod.' + self.nightly_release + '.' + self.project + '.' + self.platform + '.' + nightly_tag + '.*.' + package + extension
-        print container
-
-        out = check(run_command("rucio list-dids " + container + " --filter type=container | grep " + nightly_tag + " | sort -r | cut -d ' ' -f 2 | head -n 1"))
-        print out
-
-        out = check(run_command("rucio list-files --csv " + out + " | grep " + "{0:0>6}".format(index)))
-        print out
-
-        tar_name = out.split(',')[0]
-        out = check(run_command("rucio download " + tar_name))
-        print out
-
-        return tarfile.open(tar_name.replace(':', '/', 1))
+        try:
+            tmpdir = os.environ['TMPDIR']
+        except KeyError:
+            tmpdir = '.'
+        print "Using", tmpdir, "for tar file download"
+
+        container_list = 'user.artprod.atlas.' + self.nightly_release + '.' + self.project + '.' + self.platform + '.' + nightly_tag + '.*.' + package + extension
+        print "ContainerList:", container_list
+
+        # print "rucio list-dids"
+        (code, out, err) = run_command("rucio list-dids " + container_list + " --filter type=container | grep " + nightly_tag + " | sort -r | cut -d ' ' -f 2 | head -n 1", tmpdir)
+        if code != 0 or out == '':
+            return None
+        container = out.strip()
+        print "Container:", container
+
+        # print "rucio list-files"
+        (code, out, err) = run_command("rucio list-files --csv " + container + " | grep " + "_{0:0>6}.tar".format(index), tmpdir)
+        if code != 0 or out == '':
+            return None
+        entry = out.strip()
+        print "Entry:", entry
+
+        tar_name = entry.split(',')[0]
+        print "Tar Name:", tar_name
+        # print "rucio download"
+        (code, out, err) = run_command("rucio download " + tar_name, tmpdir)
+        if code != 0:
+            print code, out, err
+            return None
+
+        return tarfile.open(os.path.join(tmpdir, tar_name.replace(':', '/', 1)))
 
     def get_previous_nightly_tag(self, days):
         """TBD. 21:00 is cutoff time."""
@@ -273,7 +319,6 @@ class ArtGrid(ArtBase):
         tags = os.listdir(directory)
         tags.sort(reverse=True)
         tags = [x for x in tags if re.match(r'\d{4}-\d{2}-\d{2}T\d{2}\d{2}', x)]
-        # print tags
         found = False
         for tag in tags:
             if tag == self.nightly_tag:
@@ -286,6 +331,8 @@ class ArtGrid(ArtBase):
                 from_dt = nightly_tag_dt.replace(hour=0, minute=0, second=0, microsecond=0) - datetime.timedelta(days=days)
                 to_dt = from_dt + datetime.timedelta(days=1)
                 tag_dt = datetime.datetime.strptime(tag, fmt) + offset
-                if from_dt <= tag_dt and tag_dt < to_dt and os.path.isdir(os.path.join(directory, tag, self.project)):
+                within_days = from_dt <= tag_dt and tag_dt < to_dt
+                target_exists = len(glob.glob(os.path.join(directory, tag, self.project, '*', 'InstallArea', self.platform))) > 0
+                if within_days and target_exists:
                     return tag
         return None
diff --git a/Tools/ART/python/ART/art_misc.py b/Tools/ART/python/ART/art_misc.py
index e9a605304283fde3d2396bf3bebcf6ee11f82695..8a246440183a34313fceb131d05634742909e823 100644
--- a/Tools/ART/python/ART/art_misc.py
+++ b/Tools/ART/python/ART/art_misc.py
@@ -12,7 +12,7 @@ import subprocess
 
 def run_command(cmd, dir=None, shell=False):
     """Run the given command locally and returns the output, err and exit_code."""
-    print "Execute: " + cmd
+    # print "Execute: " + cmd
     if "|" in cmd:
         cmd_parts = cmd.split('|')
     else:
diff --git a/Tools/ART/scripts/art-get-tar.sh b/Tools/ART/scripts/art-get-tar.sh
new file mode 100755
index 0000000000000000000000000000000000000000..e5c1e302a2c852f2b2d58c4f5273371a3f86e754
--- /dev/null
+++ b/Tools/ART/scripts/art-get-tar.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+# NOTE do NOT run with /bin/bash -x as the output is too big for gitlab-ci
+# arguments:  PACKAGE INDEX EXTENSION NIGHTLY_RELEASE PROJECT PLATFORM NIGHTLY_TAG
+# env: ART_GRID_OPTIONS
+#
+# author : Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>
+#
+# example: Tier0ChainTests 4 _EXT0 21.0 Athena x86_64-slc6-gcc62-opt 2017-07-24T2151
+
+if [ $# -ne 7 ]; then
+    echo 'Usage: art-get-tar.sh PACKAGE INDEX EXTENSION NIGHTLY_RELEASE PROJECT PLATFORM NIGHTLY_TAG'
+    exit 1
+fi
+
+echo "Script executed by $(whoami) on $(date)"
+echo "User: ${USER}"
+ART_USER='artprod'
+
+PACKAGE=$1
+shift
+INDEX=$1
+shift
+EXTENSION=$1
+shift
+NIGHTLY_RELEASE=$1
+shift
+PROJECT=$1
+shift
+PLATFORM=$1
+shift
+NIGHTLY_TAG=$1
+shift
+
+#  Note: should be $USER
+#printf -v CONTAINER_LIST 'user.%s.atlas.%s.%s.%s.%s.*.%s%s' ${ART_USER} ${NIGHTLY_RELEASE} ${PROJECT} ${PLATFORM} ${NIGHTLY_TAG} ${PACKAGE} ${EXTENSION}
+printf -v CONTAINER_LIST 'user.%s.atlas.%s.%s.%s.%s.*.%s%s' 'artprod' ${NIGHTLY_RELEASE} ${PROJECT} ${PLATFORM} ${NIGHTLY_TAG} ${PACKAGE} ${EXTENSION}
+
+export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
+source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh
+
+unset ALRB_noGridMW
+
+lsetup -f rucio
+
+echo "ContainerList: ${CONTAINER_LIST}"
+
+# Do not use: rucio delivers warnings as exit code 127
+#set -e
+
+FILELIST =`rucio list-files --csv ${CONTAINER_LIST}`
+echo "Tar files in the Container: ${FILELIST}"
+
+CONTAINER=`rucio list-dids ${CONTAINER_LIST} --filter type=container | grep ${NIGHTLY_TAG} | sort -r | cut -d ' ' -f 2 | head -n 1`
+echo "Container: ${CONTAINER}"
+
+printf -v INDEX_FORMAT '_%06d.tar' ${INDEX}
+TAR_NAME=`rucio list-files --csv ${CONTAINER} | grep ${INDEX_FORMAT} | cut -d ',' -f 1`
+echo "Tar Name: ${TAR_NAME}"
+
+rucio download ${TAR_NAME}
+
+echo "TAR_NAME=${TAR_NAME}"
diff --git a/Tools/ART/scripts/art-internal.py b/Tools/ART/scripts/art-internal.py
index f604394f54e81bb19dc77df12a633033e347ce01..52984aa30306196fe0b2a7695aacbc4d00d542f2 100755
--- a/Tools/ART/scripts/art-internal.py
+++ b/Tools/ART/scripts/art-internal.py
@@ -4,15 +4,16 @@
 ART-internal - ATLAS Release Tester (internal command).
 
 Usage:
-  art-internal.py job build   [-v]  <script_directory> <package> <job_type> <sequence_tag> <index> <out>
-  art-internal.py job grid    [-v]  <package> <job_type> <sequence_tag> <index> <out> <nightly_release> <project> <platform> <nightly_tag>
-  art-internal.py task build  [-v]  <script_directory> <package> <job_type> <sequence_tag>
-  art-internal.py task grid   [-v]  <package> <job_type> <sequence_tag> <nightly_release> <project> <platform> <nightly_tag>
+  art-internal.py job build   [-v]  <script_directory> <package> <job_type> <sequence_tag> <index> <out> <nightly_release> <project> <platform> <nightly_tag>
+  art-internal.py job grid    [-v --skip-setup]  <script_directory> <package> <job_type> <sequence_tag> <index> <out> <nightly_release> <project> <platform> <nightly_tag>
+  art-internal.py task build  [-v]  <script_directory> <package> <job_type> <sequence_tag> <nightly_release> <project> <platform> <nightly_tag>
+  art-internal.py task grid   [-v --skip-setup]  <submit_directory> <script_directory> <package> <job_type> <sequence_tag> <nightly_release> <project> <platform> <nightly_tag>
 
 Options:
+  --skip-setup      Do not run atlas setup or voms
   -h --help         Show this screen.
-  --version         Show version.
   -v, --verbose     Show details.
+  --version         Show version.
 
 Sub-commands:
   job               Runs a single job, given a particular index
@@ -26,8 +27,9 @@ Arguments:
   package           Package of the test (e.g. Tier0ChainTests)
   platform          Platform (e.g. x86_64-slc6-gcc62-opt)
   project           Name of the project (e.g. Athena)
-  script_directory  Directory containing the packages with tests
+  script_directory  Directory containing the package(s) with tests
   sequence_tag      Sequence tag (e.g. 0 or PIPELINE_ID)
+  submit_directory  Temporary directory with all files for submission
   job_type          Type of job (e.g. grid, ci, build)
 """
 
@@ -42,39 +44,41 @@ from ART import ArtGrid, ArtBuild
 
 
 @dispatch.on('job', 'build')
-def job_build(script_directory, package, job_type, sequence_tag, index, out, **kwargs):
+def job_build(script_directory, package, job_type, sequence_tag, index, out, nightly_release, project, platform, nightly_tag, **kwargs):
     """TBD.
 
     Tests are called with the following parameters:
     SCRIPT_DIRECTORY, PACKAGE, TYPE, TEST_NAME
     """
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    exit(ArtBuild(art_directory, script_directory).job(package, job_type, sequence_tag, index, out))
+    exit(ArtBuild(art_directory, nightly_release, project, platform, nightly_tag, script_directory).job(package, job_type, sequence_tag, index, out))
 
 
 @dispatch.on('job', 'grid')
-def job_grid(package, job_type, sequence_tag, index, out, nightly_release, project, platform, nightly_tag, **kwargs):
+def job_grid(script_directory, package, job_type, sequence_tag, index, out, nightly_release, project, platform, nightly_tag, **kwargs):
     """TBD.
 
     Tests are called with the following parameters:
     SCRIPT_DIRECTORY, PACKAGE, TYPE, TEST_NAME, NIGHTLY_RELEASE, PROJECT, PLATFORM, NIGHTLY_TAG
     """
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).job(package, job_type, sequence_tag, index, out))
+    skip_setup = kwargs['skip_setup']
+    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, skip_setup).job(package, job_type, sequence_tag, index, out))
 
 
 @dispatch.on('task', 'build')
-def task_build(script_directory, job_type, sequence_tag, **kwargs):
+def task_build(script_directory, job_type, sequence_tag, nightly_release, project, platform, nightly_tag, **kwargs):
     """TBD."""
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    exit(ArtBuild(art_directory, script_directory).task(job_type, sequence_tag))
+    exit(ArtBuild(art_directory, nightly_release, project, platform, nightly_tag, script_directory).task(job_type, sequence_tag))
 
 
 @dispatch.on('task', 'grid')
-def task_grid(package, job_type, sequence_tag, nightly_release, project, platform, nightly_tag, **kwargs):
+def task_grid(submit_directory, script_directory, package, job_type, sequence_tag, nightly_release, project, platform, nightly_tag, **kwargs):
     """TBD."""
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).task(package, job_type, sequence_tag))
+    skip_setup = kwargs['skip_setup']
+    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, skip_setup, submit_directory).task(package, job_type, sequence_tag))
 
 
 if __name__ == '__main__':
diff --git a/Tools/ART/scripts/art-task-build.sh b/Tools/ART/scripts/art-task-build.sh
index be0fb4674d5fcac723315ce80571d2412725c59e..4acd19233ba207aeb2fd9f8c0948e5c9b3f25136 100755
--- a/Tools/ART/scripts/art-task-build.sh
+++ b/Tools/ART/scripts/art-task-build.sh
@@ -35,6 +35,6 @@ echo ${RESULT}
 # copy the test results to EOS area
 TARGETDIR=/eos/atlas/atlascerngroupdisk/art-build/${SUBDIR}
 if [[ ! -e ${TARGETDIR} ]]; then
-  eos mkdir -p ${TARGET}
+  eos mkdir -p ${TARGETDIR}
   xrdcp -vr $OUTDIR $TARGETDIR
 fi
diff --git a/Tools/ART/scripts/art-task-grid.sh b/Tools/ART/scripts/art-task-grid.sh
index 4e669aa92636ac65c1faf4dbcf762ebff2bcaf77..4801a8d9571ebc49ea3620f61d8e6ac79b44a617 100755
--- a/Tools/ART/scripts/art-task-grid.sh
+++ b/Tools/ART/scripts/art-task-grid.sh
@@ -2,45 +2,67 @@
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 #
 # NOTE do NOT run with /bin/bash -x as the output is too big for gitlab-ci
-# arguments: PACKAGE, SEQUENCE_TAG, NUMBER_OF_TESTS, NIGHTLY_RELEASE, PROJECT, PLATFORM, NIGHTLY_TAG
+# arguments: [options] SUBMIT_DIRECTORY SCRIPT_DIRECTORY PACKAGE SEQUENCE_TAG NUMBER_OF_TESTS NIGHTLY_RELEASE PROJECT PLATFORM NIGHTLY_TAG
 #
 # author : Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>
 #
-# example: Tier0ChainTests grid 316236 32 21.0 Athena x86_64-slc6-gcc62-opt 2017-02-26T2119
+# example: [--skip-setup] tmp /cvmfs/atlas-nightlies.cern.ch/sw/... Tier0ChainTests grid 316236 32 21.0 Athena x86_64-slc6-gcc62-opt 2017-02-26T2119
 #set -e
 
-USER=artprod
-
-whoami
-date
+echo "Script executed by $(whoami) on $(date)"
 
+SKIP_SETUP=0
+if [ $1 == "--skip-setup" ]; then
+  SKIP_SETUP=1
+  shift
+fi
+SUBMIT_DIRECTORY=$1
+shift
+SCRIPT_DIRECTORY=$1
+shift
 PACKAGE=$1
-TYPE=$2
-SEQUENCE_TAG=$3
-NUMBER_OF_TESTS=$4
-NIGHTLY_RELEASE=$5
-PROJECT=$6
-PLATFORM=$7
-NIGHTLY_TAG=$8
+shift
+TYPE=$1
+shift
+SEQUENCE_TAG=$1
+shift
+NUMBER_OF_TESTS=$1
+shift
+NIGHTLY_RELEASE=$1
+shift
+PROJECT=$1
+shift
+PLATFORM=$1
+shift
+NIGHTLY_TAG=$1
+shift
 
-export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
-source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh
+# change -VAL-Prod and others into -VAL
+NIGHTLY_RELEASE_SHORT=${NIGHTLY_RELEASE/-VAL-*/-VAL}
 
-export RUCIO_ACCOUNT=artprod
+if [ ${SKIP_SETUP} -eq 0 ]; then
+    echo "Setting up release: ${PLATFORM} ${NIGHTLY_RELEASE_SHORT} ${NIGHTLY_TAG} ${PROJECT}"
+    USER=artprod
 
-lsetup panda
+    export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
+    source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh
 
-voms-proxy-init --rfc -noregen -cert ./grid.proxy -voms atlas
+    export RUCIO_ACCOUNT=artprod
 
-# change -VAL-Prod and others into -VAL
-NIGHTLY_RELEASE_SHORT=${NIGHTLY_RELEASE/-VAL-*/-VAL}
+    voms-proxy-init --rfc -noregen -cert ./grid.proxy -voms atlas
+
+    lsetup "panda 0.5.85"
+
+    lsetup rucio
+
+    asetup --platform=${PLATFORM} ${NIGHTLY_RELEASE_SHORT},${NIGHTLY_TAG},${PROJECT}
 
-asetup --platform=${PLATFORM} ${NIGHTLY_RELEASE_SHORT},${NIGHTLY_TAG},${PROJECT}
+fi
 
 # NOTE: for art-internal.py the current dir can be used as it is copied there
-cd ./tmp/${PACKAGE}/run
+cd ${SUBMIT_DIRECTORY}/${PACKAGE}/run
 OUTFILE="user.${USER}.atlas.${NIGHTLY_RELEASE_SHORT}.${PROJECT}.${PLATFORM}.${NIGHTLY_TAG}.${SEQUENCE_TAG}.${PACKAGE}"
-CMD="pathena --noBuild --skipScout --trf \"./art-internal.py job grid ${PACKAGE} ${TYPE} ${SEQUENCE_TAG} %RNDM:0 %OUT.tar ${NIGHTLY_RELEASE_SHORT} ${PROJECT} ${PLATFORM} ${NIGHTLY_TAG}\" --split ${NUMBER_OF_TESTS} --outDS ${OUTFILE}"
+CMD="pathena --excludedSite=ANALY_TECHNION-HEP-CREAM --disableAutoRetry --noBuild --skipScout --trf \"./art-internal.py job grid ${SCRIPT_DIRECTORY} ${PACKAGE} ${TYPE} ${SEQUENCE_TAG} %RNDM:0 %OUT.tar ${NIGHTLY_RELEASE_SHORT} ${PROJECT} ${PLATFORM} ${NIGHTLY_TAG}\" --split ${NUMBER_OF_TESTS} --outDS ${OUTFILE}"
 #--site=ANALY_NIKHEF-ELPROD_SHORT,ANALY_NIKHEF-ELPROD"
 #--site=ANALY_FZK,ANALY_BNL,ANALY_RAL"
 echo ${CMD}
diff --git a/Tools/ART/scripts/art.py b/Tools/ART/scripts/art.py
index 489d799877698e4cd1b01f4f9951474d7af3042b..84e859b0c8bf4aced54fd5db0f8ea30e5872ee59 100755
--- a/Tools/ART/scripts/art.py
+++ b/Tools/ART/scripts/art.py
@@ -5,26 +5,29 @@ ART - ATLAS Release Tester.
 
 Usage:
   art.py run             [-v --type=<T> --max-jobs=<N> --ci]  <script_directory> <sequence_tag>
+  art.py grid            [-v --type=<T>]  <script_directory> <sequence_tag>
   art.py submit          [-v --type=<T>]  <sequence_tag> <nightly_release> <project> <platform> <nightly_tag>
   art.py validate        [-v]  <script_directory>
   art.py compare grid    [-v --days=<D>]  <nightly_release> <project> <platform> <nightly_tag> <package> <test_name> <file_name>...
   art.py compare ref     [-v]  <file_name> <ref_file>
-  art.py list grid       [-v]  <package> <job_type> <nightly_release> <project> <platform> <nightly_tag>
+  art.py list grid       [-v --json --type=<T>]  <package> <nightly_release> <project> <platform> <nightly_tag>
   art.py log grid        [-v]  <package> <test_name> <nightly_release> <project> <platform> <nightly_tag>
   art.py output grid     [-v]  <package> <test_name> <file_name> <nightly_release> <project> <platform> <nightly_tag>
 
 Options:
-  -h --help         Show this screen.
-  --version         Show version.
-  -v, --verbose     Show details.
-  --type=<T>        Type of job (e.g. grid, build)
+  --ci              Run Continuous Integration tests only (using env: AtlasBuildBranch)
   --days=<D>        Number of days ago to pick up reference for compare [default: 1]
+  --json            Output in json format
   --max-jobs=<N>    Maximum number of concurrent jobs to run
-  --ci              Run Continuous Integration tests only (using env: AtlasBuildBranch)
+  --type=<T>        Type of job (e.g. grid, build)
+  -h --help         Show this screen.
+  -v, --verbose     Show details.
+  --version         Show version.
 
 Sub-commands:
-  run               Run tests from a package in a local build
-  submit            Submit tests to the grid
+  run               Run jobs from a package in a local build (needs release and grid setup)
+  grid              Run jobs from a package on the grid (needs release and grid setup)
+  submit            Submit nightly jobs to the grid (NOT for users)
   validate          Check headers in tests
   compare           Compare the output of a job
   list              Lists the jobs of a package
@@ -40,17 +43,15 @@ Arguments:
   package           Package of the test (e.g. Tier0ChainTests)
   platform          Platform (e.g. x86_64-slc6-gcc62-opt)
   project           Name of the project (e.g. Athena)
-  script_directory  Directory containing the packages with tests
+  script_directory  Directory containing the package(s) with tests
   sequence_tag      Sequence tag (e.g. 0 or PIPELINE_ID)
   test_name         Name of the test inside the package (e.g. test_q322.sh)
   job_type          Type of job (e.g. grid, build)
 """
 
 __author__ = "Tulay Cuhadar Donszelmann <tcuhadar@cern.ch>"
-__version__ = '0.0.3'
+__version__ = '0.0.4'
 
-import re
-import requests
 import os
 import sys
 
@@ -59,27 +60,9 @@ from ART.docopt_dispatch import dispatch
 from ART import ArtBase, ArtGrid, ArtBuild
 
 
-@dispatch.on('submit')
-def submit_grid(sequence_tag, nightly_release, project, platform, nightly_tag, **kwargs):
-    """TBD."""
-    art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    type = 'grid' if kwargs['type'] is None else kwargs['type']
-    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).task_list(type, sequence_tag))
-
-
-@dispatch.on('run')
-def run(script_directory, sequence_tag, **kwargs):
-    """TBD."""
-    art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    type = 'build' if kwargs['type'] is None else kwargs['type']
-    exit(ArtBuild(art_directory, script_directory, max_jobs=kwargs['max_jobs'], ci=kwargs['ci']).task_list(type, sequence_tag))
-
-
-@dispatch.on('validate')
-def validate(script_directory, **kwargs):
-    """TBD."""
-    exit(ArtBase().validate(script_directory))
-
+#
+# First list the double commands
+#
 
 @dispatch.on('compare', 'ref')
 def compare_ref(file_name, ref_file, **kwargs):
@@ -97,10 +80,12 @@ def compare_grid(package, test_name, nightly_release, project, platform, nightly
 
 
 @dispatch.on('list', 'grid')
-def list(package, job_type, nightly_release, project, platform, nightly_tag, **kwargs):
+def list(package, nightly_release, project, platform, nightly_tag, **kwargs):
     """TBD."""
+    json_format = kwargs['json']
     art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
-    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).list(package, job_type))
+    job_type = 'grid' if kwargs['type'] is None else kwargs['type']
+    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).list(package, job_type, json_format))
 
 
 @dispatch.on('log', 'grid')
@@ -117,59 +102,51 @@ def output(package, test_name, file_name, nightly_release, project, platform, ni
     exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).output(package, test_name, file_name))
 
 
-@dispatch.on('retrieve')
-def retrieve(job_id, **kwargs):
+@dispatch.on('submit')
+def submit(sequence_tag, nightly_release, project, platform, nightly_tag, **kwargs):
     """TBD."""
-    url = 'http://bigpanda.cern.ch/task/' + job_id + '/?json'
-    print 'Running art retrieve on ' + url
-    sys.stdout.flush()
-
-    response = requests.get(url)
-    if response.status_code != 200:
-        print 'ERROR http status code ' + str(response.status_code)
-        sys.stdout.flush()
-        exit(1)
-
-    data = response.json()
-
-    task = data['taskparams']['taskName']
-    task_match = re.match(r'^(\w+)\.(\w+)\.(\w+)\.(\w+).([\w\.-]+)\.([\w-]+)\.([\w-]+)\.(\d+)/', task)
-    if not task_match:
-        print 'ERROR cannot decode task: ' + task
-        sys.stdout.flush()
-        exit(1)
-
-    # job_type = task_match.group(1)
-    # user = task_match.group(2)
-    # experiment = task_match.group(3)
-    # job = task_match.group(4)
-    # nightly_release = task_match.group(5)
-    # platform = task_match.group(6)
-    # nightly_release = task_match.group(7)
-    # build_id = task_match.group(8)
+    art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    type = 'grid' if kwargs['type'] is None else kwargs['type']
+    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag).task_list(type, sequence_tag))
 
-    status = data['task']['status']
-    dsinfo = data['task']['dsinfo']
-    print 'Total / Done / Failed:  ' + str(dsinfo['nfiles']) + ' / ' + str(dsinfo['nfilesfinished']) + ' / ' + str(dsinfo['nfilesfailed'])
-    sys.stdout.flush()
 
-    # Add other final states here
-    print 'Status: ' + status
-    sys.stdout.flush()
+@dispatch.on('grid')
+def grid(script_directory, sequence_tag, **kwargs):
+    """TBD."""
+    art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    try:
+        nightly_release = os.environ['AtlasBuildBranch']
+        project = os.environ['AtlasProject']
+        platform = os.environ['Athena_PLATFORM']
+        nightly_tag = os.environ['AtlasBuildStamp']
+    except KeyError, e:
+        print "Environment variable not set", e
+        sys.exit(1)
+    type = 'grid' if kwargs['type'] is None else kwargs['type']
+    exit(ArtGrid(art_directory, nightly_release, project, platform, nightly_tag, script_directory, True).task_list(type, sequence_tag))
 
-    if status in ['done']:
-        exit(0)
 
-    if status in ['finished', 'failed']:
-        exit(1)
+@dispatch.on('run')
+def run(script_directory, sequence_tag, **kwargs):
+    """TBD."""
+    art_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
+    try:
+        nightly_release = os.environ['AtlasBuildBranch']
+        project = os.environ['AtlasProject']
+        platform = os.environ['Athena_PLATFORM']
+        nightly_tag = os.environ['AtlasBuildStamp']
+    except KeyError, e:
+        print "Environment variable not set", e
+        sys.exit(1)
+    type = 'build' if kwargs['type'] is None else kwargs['type']
+    exit(ArtBuild(art_directory, nightly_release, project, platform, nightly_tag, script_directory, max_jobs=kwargs['max_jobs'], ci=kwargs['ci']).task_list(type, sequence_tag))
 
-    if status in ['broken', 'aborted']:
-        exit(2)
 
-    # please re-call later
-    exit(-1)
+@dispatch.on('validate')
+def validate(script_directory, **kwargs):
+    """TBD."""
+    exit(ArtBase().validate(script_directory))
 
 
 if __name__ == '__main__':
-    print "ART_PATH", os.path.dirname(os.path.realpath(sys.argv[0]))
     dispatch(__doc__, version=os.path.splitext(os.path.basename(__file__))[0] + ' ' + __version__)
diff --git a/Tools/ART/share/localSetupART.sh b/Tools/ART/share/localSetupART.sh
index 94d9403da6132a59fa2c2d840ffb24b380053c83..1d63e886b4dc5e663cd7d728877e5da1661f9759 100644
--- a/Tools/ART/share/localSetupART.sh
+++ b/Tools/ART/share/localSetupART.sh
@@ -1,2 +1,2 @@
 SCRIPTPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-export PYTHONPATH=${SCRIPTPATH}/python:${PYTHONPATH}
+export PYTHONPATH=${SCRIPTPATH}/../python:${PYTHONPATH}
diff --git a/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py b/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py
index d3e73219f4290a82e65c1b6890216bc7dec941b5..5fc50fc607f8e587cab9885108a433a76eb63f0c 100644
--- a/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py
+++ b/Tools/FullChainTransforms/share/skeleton.EVGENtoRDO.py
@@ -156,6 +156,12 @@ else:
 ## Don't use the SeedsG4 override
 simFlags.SeedsG4.set_Off()
 
+## Always enable the looper killer, unless it's been disabled
+if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
+    simFlags.OptionalUserActionList.addAction('G4UA::LooperKillerTool', ['Step'])
+else:
+    fast_chain_log.warning("The looper killer will NOT be run in this job.")
+
 
 ## Set the Run Number (if required)
 if hasattr(runArgs,"DataRunNumber"):
@@ -227,22 +233,6 @@ if hasattr(runArgs, "postSimExec"):
         fast_chain_log.info(cmd)
         exec(cmd)
 
-## Always enable the looper killer, unless it's been disabled
-if not hasattr(runArgs, "enableLooperKiller") or runArgs.enableLooperKiller:
-    try:
-        # Post UserAction Migration (ATLASSIM-1752)
-        from G4AtlasServices.G4AtlasUserActionConfig import UAStore
-        UAStore.addAction('LooperKiller',['Step']) # add default configurable
-    except:
-        # Pre UserAction Migration
-        def use_looperkiller():
-            from G4AtlasApps import PyG4Atlas, AtlasG4Eng
-            lkAction = PyG4Atlas.UserAction('G4UserActions', 'LooperKiller', ['BeginOfRun', 'EndOfRun', 'BeginOfEvent', 'EndOfEvent', 'Step'])
-            AtlasG4Eng.G4Eng.menu_UserActions.add_UserAction(lkAction)
-        simFlags.InitFunctions.add_function("postInit", use_looperkiller)
-else:
-    fast_chain_log.warning("The looper killer will NOT be run in this job.")
-
 ### End of Sim
 
 
diff --git a/Tools/LWHists/doc/packagedoc.h b/Tools/LWHists/doc/packagedoc.h
index 90e415ce27860da203e3459ed676637232339dca..a203bb47f9823ba552a73b4ec79baf73521b36f9 100644
--- a/Tools/LWHists/doc/packagedoc.h
+++ b/Tools/LWHists/doc/packagedoc.h
@@ -38,8 +38,4 @@ the provided histogram classes. The applications are <b>lwhists_benchmark.exe</b
 
 @author Thomas.Kittelmann@cern.ch
 
-@section LWHists_used_packagesLWHists Used Packages
-
-@section LWHists_requirements Requirements
-
 */
diff --git a/Tools/PROCTools/python/ExtractEvents.py b/Tools/PROCTools/python/ExtractEvents.py
index 0fd90a3d0c6a80ed845fa66f1c463718ce2cb110..745adb939c5207d226db33b5682f9251d6808598 100755
--- a/Tools/PROCTools/python/ExtractEvents.py
+++ b/Tools/PROCTools/python/ExtractEvents.py
@@ -18,7 +18,7 @@ import sys, os, argparse, subprocess, fnmatch
 # See more info here: https://cern.service-now.com/service-portal/view-request.do?n=RQF0492611
 #eospath = "/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select"
 # Update: https://cern.service-now.com/service-portal/view-incident.do?n=INC1004372
-eospath = "/afs/cern.ch/project/eos/installation/atlas/bin/eos.select"
+eospath = "eos"
 
 def validEventList(eventList):
     eventStrings = eventList.split(',')
diff --git a/Tools/PathResolver/Root/PathResolver.cxx b/Tools/PathResolver/Root/PathResolver.cxx
index 3fa34f64573200af3a5363308c87d6e85a80e6d5..b6be0d310503b2ec3de4408ee4f9bf4ab086509a 100644
--- a/Tools/PathResolver/Root/PathResolver.cxx
+++ b/Tools/PathResolver/Root/PathResolver.cxx
@@ -73,7 +73,7 @@ PathResolver::PR_find( const std::string& logical_file_name, const string& searc
       result = bf::system_complete(file).string();
       return true;
     }
-  } catch (bf::filesystem_error /*err*/) {
+  } catch (bf::filesystem_error& /*err*/) {
   }
 
   // assume that "." is always part of the search path, so check locally first
@@ -85,7 +85,7 @@ PathResolver::PR_find( const std::string& logical_file_name, const string& searc
       result = bf::system_complete(file).string();
       return true;
     }
-  } catch (bf::filesystem_error /*err*/) {
+  } catch (bf::filesystem_error& /*err*/) {
   }
 
    std::string locationToDownloadTo = "."; //will replace with first search location 
diff --git a/Tools/PmbUtils/python/CmtUtils.py b/Tools/PmbUtils/python/CmtUtils.py
deleted file mode 100644
index c60bda7a41a48ec60cf945543f18338da322e2a8..0000000000000000000000000000000000000000
--- a/Tools/PmbUtils/python/CmtUtils.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import datetime
-
-def dateToNightly(date):
-    if date==None:
-        return None
-    today=datetime.date.today()
-    if date>today:
-        return None
-    date_oneweekago = today+datetime.timedelta( -7 )
-    if date<=date_oneweekago:
-        return None
-    return date.isoweekday()%7
-
-def tagDiffs(date1,date2,tags):
-    tags=','.join(tags)
-    nightly1 = dateToNightly(date1)
-    nightly2 = dateToNightly(date2)
-    if nightly1==None or nightly2==None:
-        return ['<not available>']
-    if nightly1==nightly2:
-        return ['<same nightly>']
-    gettagproblem=False
-    try:
-        import PyCmt.Cmt
-        diffs=PyCmt.Cmt.get_tag_diff(tags+',rel_'+str(nightly1),tags+',rel_'+str(nightly2))
-    except:
-        try:
-            #old-style:
-            import PyUtils.Cmt
-            diffs=PyUtils.Cmt.get_tag_diff(tags+',rel_'+str(nightly1),tags+',rel_'+str(nightly2))
-        except:
-            gettagproblem=True
-            pass
-        pass
-    if gettagproblem:
-        return ['<problems retrieving tag differences>']
-    l=[]
-
-    def formatTag(s): return ('--------' if s=='None-00-00-00' else str(s)).ljust(11)
-    name2line={}#To get sorting by pkg name we use this
-    for diff in diffs:
-        fn=str(diff['full_name'])
-        if fn in name2line.keys(): print "WARNING: DUPLICATE TAG ",fn
-        name2line[fn]=formatTag(diff['ref'])+' '+formatTag(diff['chk'])+' '+fn
-    if not name2line:
-        return ['<no differences>']
-    names=name2line.keys()
-    names.sort()
-    for n in names:
-        l+=[name2line[n]]
-    return l
-
-def formatTagDiffs(date_transitions,tags):
-    lines=[]
-    for (day1,day2) in date_transitions:
-        if lines: lines+=['']
-        lines += ["[EXPERIMENTAL] Tag differences for %s -> %s:"%(day1,day2)]
-        lines+=['']
-        for l in tagDiffs(day1,day2,tags):
-            lines +=[str(l)]
-    return lines
diff --git a/Tools/PmbUtils/share/pmb-domain-analysertt.py b/Tools/PmbUtils/share/pmb-domain-analysertt.py
deleted file mode 100755
index d8d0975053fae02d47a21842cf5a2c185da7c2c4..0000000000000000000000000000000000000000
--- a/Tools/PmbUtils/share/pmb-domain-analysertt.py
+++ /dev/null
@@ -1,539 +0,0 @@
-#!/usr/bin/env python
-
-#  Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch)
-#  Initial version: August 2009
-
-import os,sys,getopt
-defaultType='rawtoesd_bs'
-
-__cachemap= {'prod':'AtlasProduction', 'tier0':'AtlasTier0','p1hlt':'AtlasP1HLT','cafhlt':'AtlasCAFHLT'}
-
-def usage(exitcode=0):
-    #assert False
-    if exitcode!=0:
-        print ""
-        print "Run with -h or --help for usage instructions."
-        print ""
-        sys.exit(exitcode)
-    if not 'calcnames' in dir():
-        from PmbUtils.DomainCalcLib import DomainCalcLib
-        calcnames=DomainCalcLib().getAllCalcNames(requireRTT=True)
-    print "Purpose:"
-    print "  This script allows the user to investigate the per-domain performance"
-    print "  (mem or cpu) based on the output of a number of RTT jobs."
-    print ""
-    print "Usage:"
-    print ""
-    print "  -h,--help : Display this help"
-    print ""
-    print "  --numberofdays=X : Number of days to go back [default 30]"
-    print "  --date=YYYY-MM-DD : If set, the script will return the same result as if it was"
-    print "                      run on the specified date rather than today. Useful"
-    print "                      for production of e.g. historical pie-charts."
-    print ""
-    print "  --table=X : Print table with results and save copy in file X"
-    print "               - put % in front of filename to suppress output to stdout"
-    print "               - use a filename of 'show' to just display to stdout"
-    print ""
-    print "  --histplot=X : Print history plot to image file X [extension determines image type]"
-    print "  --hp-log : Use log-scale in history plot."
-    print "  --hp-min=X : Set min of the vertical scale in history plot to X megabytes [default 0]."
-    print "  --hp-max=X : Set max of the vertical scale in history plot to X megabytes [default auto]."
-    print "  --nototal : Don't display an estimate of the total memory consumption."
-    print "  --totaloffset=X : Offset the total by X mb. 0 Turns off offsetting and 'auto' makes"
-    print "                    the program try to figure out a decent value by itself [default is auto]."
-    print ""
-    print "  --pie=X : Print pie-chart to image file X [extension determines image type]"
-    print ""
-    print "  --bar=filename:date1,date2,... : Produce bar chart in 'filename' comparing data at the given dates."
-    print "                                   Dates must be in the YYYY-MM-DD format, and --numberofdays"
-    print "                                   must be big enough that it includes all dates"
-    print ""
-    print "  --makestdoutput=dirname : Produce a variety of plots and tables in target directory (used for webpage)."
-    print "  --stdoutputpostfix=X : Extra postfix for files created with makestdoutput (default none)"
-    print ""
-    print "  --jobs : Show data for the raw jobs instead of the derived per-domain results"
-    print "  --cpu : Show cpu/evt usage rather than vmem."
-    print "  --malloc : Show malloc/evt usage rather than vmem."
-    print "  --memleak : Show memleak/evt rather than vmem."
-    print "  --si2k : Show Si2k constant for machine where job ran."
-    print "  --build=X : Look at data from build X. Example values are 'dev, 'devval', '15.3.X.Y-VAL', ... [default 'dev']"
-    print "  --cache=X : Look at data from cache type X ('%s') [default 'prod']"%("', '".join(__cachemap.keys()))
-    print "  --cmtconfig=X : Show data for cmtconfig X (default is i686-slc5-gcc43-opt)."
-    print ""
-    print "  --type=X : Type of jobs to look at Look at [default is "+defaultType+']'
-    print "             Available types are:"
-    for calcname in calcnames:
-        print "                                  --type="+calcname
-    print ""
-    print "  --noblacklist : Turn off the default blacklisting of certain failing jobs."
-    print ""
-    print "  --domainvmemwarnings=email1,email2,... : Check for suspicious increases in domain vmem"
-    print "                                           and send out warnings (for cron job). Put an entry 'show'"
-    print "                                           to display the warnings."
-    print "                                           Put to 'defaultlist' to send to the emails defined for the job"
-    print "                                           type (aborting silently if none)."
-    print "  --warnblockfile=X : Use file X to log emailed warnings and to block future duplicates sent."
-    print "  --lastdata=X : Output the last few days of job data into X (needed for cron job)."
-    print "  --dumpdb : Debug utility for dumping the contents of the RTT dozer DB and quitting."
-    print "  --nodefaultaction : Disable the behaviour where running without arguments defaults to showing a table in stdout."
-    print ""
-    print "Examples of flags:"
-    print ""
-    print "  1) Print and store in mytable.txt a table summarising the mem-per-domain"
-    print "      values based on RTT jobs going back as much as 20 days:"
-    print ""
-    print "      [cmdname] --table=mytable.txt --numberofdays=20"
-    print ""
-    print "  2) Make graph of the mem-per-domain evolution for the past 30 days, and store it in mygraph.png:"
-    print ""
-    print "      [cmdname] --histplot=mygraph.png --numberofdays=30"
-    print ""
-    print "  3) As in 2), but go back as far as possible, and also output a pie chart (using the last"
-    print "     available data-point for each sub-domain). This time the output is requested as .svg:"
-    print ""
-    print "      [cmdname] --histplot=mygraph.svg --numberofdays=99999 --pie=mypie.svg"
-    print ""
-    print "  4) As in 2), but go back as far as possible, and also output a pie chart (using the last"
-    print "     available data-point for each sub-domain). This time the output is requested as .svg:"
-    print ""
-    print "      [cmdname] --numberofdays=999999 --bar=mybarchart:2009-02-24,2009-05-08,2009-08-05"
-    print ""
-    print "Please send comments/questions/bug-reports to thomas.kittelmann@cern.ch"
-    sys.exit(exitcode)
-
-def getJobList(ndays,pretendDateStr,doBlackListing,rttType,rttCache,rttCMTCONFIG,jobcalc):
-    from PmbUtils.CoolDozerAccessUtils import CDTimeHelper, CDDataRetrievalHelper
-    from PmbUtils.ValuePerDomainCalcUtils import Job,JobList,TimeLabel
-    import os.path
-
-    dbjobkey=os.path.join(rttType,'build',rttCMTCONFIG,rttCache)
-    blacklist=[]
-    #if jobcalc.getName()=='rdotoesd':
-    #    #Fixme: To domain calc file
-    #    trigjob='idmuoncalomuoncombegammajettautrigger'
-    #    persjob='idmuoncalomuoncombegammajettautriggerpers'
-    #    for i in [trigjob,persjob]:
-    #        for d in ['2009-02-20','2009-02-21','2009-02-22','2009-02-26','2009-04-25',
-    #                  '2009-04-26','2009-04-27','2009-04-28','2009-06-17','2009-06-18',
-    #                  '2009-10-16','2009-10-17']:
-    #            blacklist+=[(i,d)]
-    #    for i in ['2009-08-14','2009-11-11','2009-11-12','2009-11-15','2009-11-23','2009-11-24','2009-11-26','2009-10-28','2009-10-30',
-    #              '2010-02-09','2010-01-12','2010-01-13','2010-01-14','2010-04-12','2010-04-13','2010-02-16']:
-    #        blacklist+=[(trigjob,i)]
-    #    blacklist+=[(persjob,'2009-06-25'),(None,'2010-03-08')]
-
-    #figure out time internal
-    if pretendDateStr==None:
-        from PmbUtils.ValuePerDomainCalcUtils import TimeLabel
-        pretendDateStr=TimeLabel(date=CDTimeHelper.now()).getLabel()
-    until=CDTimeHelper.fromDateString(pretendDateStr)
-
-    since=CDTimeHelper.nDaysBefore(ndays-1,until)
-
-    #Retrieve from DB and put in joblist:
-    joblist = JobList(jobcalc)
-    jobs=CDDataRetrievalHelper.getJobsFromDB(jobcalc.getCDJobDefinitions(dbjobkey),since=since,until=until)
-    for job in jobs:
-        ok=True
-        if doBlackListing:
-            i=job.getIDStr()
-            d=job.getTime().getLabel()
-            for b in blacklist:
-                if (i,d)==b or (b[0]==None and b[1]==d):
-                    ok=False
-                    break
-        if ok:
-            joblist.addJob(job)
-    return joblist
-
-def dateFormatOk(datestr):
-    from PmbUtils.CoolDozerAccessUtils import CDTimeHelper
-    return CDTimeHelper.fromDateString(datestr) != 0
-
-def main(argv):
-
-    from PmbUtils.DomainCalcLib import DomainCalcLib
-    calclib = DomainCalcLib()
-    calcnames=calclib.getAllCalcNames(requireRTT=True)
-
-    #######################
-    #  Parse command line #
-    #######################
-
-    if "-h" in argv or "--help" in argv:
-        usage(0)
-    try:
-        opts, args = getopt.getopt(argv, "h", ["help", "numberofdays=","date=","table=","histplot=","pie=",
-                                               "hp-log","hp-min=","hp-max=","nototal","totaloffset=",
-                                               "cpu","malloc","memleak","si2k","jobs","bar=","noblacklist",'domainvmemwarnings=',
-                                               'warnblockfile=','lastdata=',
-                                               'build=','cache=','cmtconfig=','type=','makestdoutput=','stdoutputpostfix=','dumpdb',
-                                               'nodefaultaction'])
-    except getopt.GetoptError:
-        usage(1)
-
-    tableFile=None
-    showTable=False
-    historyFile=None
-    pieFile=None
-    ndays=30
-    doLog=False
-    doDBDump=False
-    clipMinVal=None
-    clipMaxVal=None
-    doTotal=True
-    totalOffset='auto'
-    pretendDate=None
-    doJobsRatherThanDomains=False
-    doCPURatherThanVMEM=False
-    doMallocRatherThanVMEM=False
-    doMemleakRatherThanVMEM=False
-    doSi2KRatherThanVMEM=False
-    doBlackListing=True
-    barChartDates=None
-    barChartFileName=None
-    domainVMEMWarnings=None
-    warnBlockFile=None
-    lastDataFile=None
-    rttType=None
-    rttCacheShort=None
-    rttCMTCONFIG=None
-    datatype=None
-    optNoDefaultAction=False
-    #defaultType
-    optAddStdPlotsAndTablesDir=None
-    optStdPlotsAndTablesPostFix=''
-    #title=None gives a default title in all of the following
-    displayJobTables=[]#list of (showonstdout,filename,fieldname,title)#title=None gives a default title
-    displayDomainTables=[]#list of (showonstdout,filename,fieldname,dototal,title) #title=None gives a default title
-    displayDomainPieCharts=[]#List of (filename,label,fieldname,title) # label=None means a pie-chart using the most recent label for all domains
-    displayDomainHistPlots=[]#list of (filename,fieldname,totaloffset,clipmin,clipmax,title,domainoffsets) #clipmin/clipmax==None => ignored
-    displayJobHistPlots=[]#list of (filename,fieldname,clipmin,clipmax,title) #clipmin/clipmax==None => ignored
-    displaySingleFieldMultiLabelBarCharts=[]#list of (filename,fieldname,dojobs,totaloffset,timelabels,title)# timelabels=None for all, otherwise a list (strings or timelabels)
-
-    for opt, arg in opts:
-        if opt in ("-h", "--help"):
-            usage()
-        elif opt in ("--numberofdays"):
-            ndays = int(arg)
-        elif opt in ("--bar"):
-            barChartDates=[]
-            tmp=arg.split(':')
-            if len(tmp)!=2:
-                usage(1)
-            barChartFileName=tmp[0]
-            for datestr in tmp[1].split(','):
-                if dateFormatOk(datestr):
-                    barChartDates+=[datestr]
-                else:
-                    usage(1)
-        elif opt in ("--table"):
-            s=arg
-            if len(s)<1:
-                usage(1)
-            if s=='show':
-                showTable=True
-            else:
-                if s[0]=='%':
-                    tableFile=s[1:]
-                else:
-                    tableFile=s
-                    showTable=True
-        elif opt in ("--histplot"):
-            historyFile = arg
-        elif opt in ("--pie"):
-            pieFile = arg
-        elif opt in ("--hp-log"):
-            doLog = True
-        elif opt in ("--dumpdb"):
-            doDBDump = True
-        elif opt in ("--hp-min"):
-            clipMinVal=float(arg)
-        elif opt in ("--hp-max"):
-            clipMaxVal=float(arg)
-        elif opt in ("--nototal"):
-            doTotal=False
-        elif opt in ("--cpu"):
-            doCPURatherThanVMEM=True
-        elif opt in ("--malloc"):
-            doMallocRatherThanVMEM=True
-        elif opt in ("--memleak"):
-            doMemleakRatherThanVMEM=True
-        elif opt in ("--si2k"):
-            doSi2KRatherThanVMEM=True
-        elif opt in ("--noblacklist"):
-            doBlackListing=False
-        elif opt in ("--jobs"):
-            doJobsRatherThanDomains=True
-        elif opt in ("--totaloffset"):
-            totalOffset=int(arg) if arg!='auto' else 'auto'
-        elif opt in ("--date"):
-            pretendDate=arg
-        elif opt in ("--domainvmemwarnings"):
-            domainVMEMWarnings=arg
-        elif opt in ("--warnblockfile"):
-            warnBlockFile=arg
-        elif opt in ("--lastdata"):
-            lastDataFile=arg
-        elif opt in ("--build"):
-            if rttType!=None:
-                usage(1)
-            rttType=arg
-        elif opt in ("--cache"):
-            if rttCacheShort!=None:
-                usage(1)
-            rttCacheShort=arg
-        elif opt in ("--cmtconfig="):
-            if rttCMTCONFIG!=None:
-                usage(1)
-            rttCMTCONFIG=arg
-        elif opt in ("--type"):
-            if datatype!=None:
-                usage(1)
-            datatype=arg
-        elif opt in ("--stdoutputpostfix"):
-            if optStdPlotsAndTablesPostFix!='':
-                print "Old:",optStdPlotsAndTablesPostFix
-                usage(1)
-            optStdPlotsAndTablesPostFix=str(arg)
-        elif opt in ("--makestdoutput"):
-            if optAddStdPlotsAndTablesDir!=None:
-                usage(1)
-            optAddStdPlotsAndTablesDir=os.path.expanduser(arg)
-            if not os.path.isdir(optAddStdPlotsAndTablesDir):
-                print "Unknown directory",optAddStdPlotsAndTablesDir
-                usage(1)
-        elif opt in ("--nodefaultaction'"):
-            if optNoDefaultAction:
-                usage(1)
-            optNoDefaultAction=True
-
-    nvars=0
-    if doCPURatherThanVMEM: nvars+=1
-    if doMallocRatherThanVMEM: nvars+=1
-    if doMemleakRatherThanVMEM: nvars+=1
-    if doSi2KRatherThanVMEM: nvars+=1
-    if nvars>1:
-        usage(1)
-
-    if rttType==None:
-        rttType='dev'
-    if rttCacheShort==None:
-        rttCacheShort='prod'
-
-    if not rttCacheShort in __cachemap.keys():
-        inverted_map=dict((val,key) for key,val in __cachemap.items())
-        if rttCacheShort in inverted_map:
-            rttCacheShort=inverted_map[rttCacheShort]
-        else:
-            usage(1)
-    rttCache = __cachemap[rttCacheShort]
-
-    if doDBDump:
-        from PmbUtils.CoolDozerAccessUtils import CDDataRetrievalHelper
-        CDDataRetrievalHelper.dumpDBContents()
-        exit(0)
-
-    if datatype==None:
-        datatype=defaultType
-    if not datatype in calcnames:
-            print "Unknown argument to --type:",datatype
-            usage(1)
-    if rttCMTCONFIG==None:
-        rttCMTCONFIG='i686-slc5-gcc43-opt'
-    if len(args)!=0:
-        usage(1)
-    if ndays>9999:
-        ndays = 9999
-    if ndays<1:
-        usage(1)
-    if pretendDate!=None:
-        if not dateFormatOk(pretendDate):
-            usage(1)
-
-    if barChartDates!=None and (barChartFileName==None or len(barChartDates)==0):
-        usage(1)
-
-    calc=calclib.getCalcByName(datatype)
-    hasDomains = (len(calc.defineDomains())>0)
-
-    if not hasDomains and domainVMEMWarnings!=None:
-        print "No domains defined. Silently ignoring request for displaying/emailing warnings."
-        #FIXME: We should really allow warnings to be displayed/emailed based on jobs as well!
-        domainVMEMWarnings=None
-
-    if domainVMEMWarnings=='defaultlist':
-        domainVMEMWarnings=calc.getDefaultRTTEmailList(rttType,rttCache,rttCMTCONFIG)
-
-    if tableFile==None and (not showTable) and historyFile==None and pieFile==None and \
-           barChartDates==None and lastDataFile==None and domainVMEMWarnings==None and \
-           optAddStdPlotsAndTablesDir==None:
-        if optNoDefaultAction:
-            print "Nothing to do and running with --nodefaultaction. Ending."
-            exit(0)
-        #Default action: Show domain (or jobs) table:
-        showTable=True
-
-    if not doJobsRatherThanDomains and not hasDomains:
-        print "WARNING: No domains defined => Reverting to '--jobs' mode."
-        doJobsRatherThanDomains=True
-    if doJobsRatherThanDomains:
-        doTotal=False
-        if pieFile!=None:
-            print "Can't produce pie-chart when running with --jobs"
-            exit(1)
-
-    #A few helper vars:
-    varname = 'cpu/evt' if doCPURatherThanVMEM else ('malloc/evt' if doMallocRatherThanVMEM else ('memleak/evt' if doMemleakRatherThanVMEM else ('si2k' if doSi2KRatherThanVMEM else 'vmem')))
-    varname2pretty = {'cpu/evt':'CPU/Evt','vmem':'VMem','malloc/evt':'Malloc/Evt','memleak/evt':"MemLeak/Evt", 'si2k':'Si2K Constant'}#Fixme: To ... somewhere else
-
-    ###########################
-    #  Retrieve data from DB  #
-    ###########################
-
-    #(fixme: could do this after the next steps, if we define the jobcalc out here):
-    from PmbUtils.ValuePerDomainCalcUtils import JobList,JobListMultiOutputHelper
-    joblist=getJobList(ndays,pretendDate,doBlackListing,rttType,rttCache,rttCMTCONFIG,calc)
-    datatype_pretty=calc.getPrettyName()
-
-    ######################################
-    #  Add standard output if requested  #
-    ######################################
-    availablefields=joblist.getAllMeasurementNames()
-    availabletimelabels = joblist.getTimes()
-    if optAddStdPlotsAndTablesDir!=None:
-        #A bit of helper infrastructure to construct file names and
-        #make sure we don't overwrite anything by mistake:
-        f=[]
-        def absfilename(filelist,basename):
-            if optStdPlotsAndTablesPostFix!='':
-                basename=basename.replace('.txt','_'+optStdPlotsAndTablesPostFix+'.txt')
-                basename=basename.replace('.png','_'+optStdPlotsAndTablesPostFix+'.png')
-            basename=basename.replace('/','_')
-            thefile=os.path.join(optAddStdPlotsAndTablesDir,basename)
-            filelist+=[thefile]
-            return thefile
-        #Add a bunch of stuff for each field:
-        for fieldname in availablefields:
-            displayJobTables+=[(False,absfilename(f,'table_jobs_'+fieldname+'.txt'),fieldname,None)]
-            if hasDomains:
-                displayDomainTables+=[(False,absfilename(f,'table_domains_'+fieldname+'.txt'),fieldname,True,None)]
-            if len(availabletimelabels)>1:
-                displayJobHistPlots+=[(absfilename(f,'histplot_jobs_'+fieldname+'.png'),fieldname,None,None,None)]
-                if hasDomains:
-                    displayDomainHistPlots+=[(absfilename(f,'histplot_domains_'+fieldname+'.png'),fieldname,'auto',None,None,None,calc.domainOffsets())]
-            #A pie-chart of last measured contribution for each domain:
-            if hasDomains:
-                displayDomainPieCharts+=[(absfilename(f,'pie_domains_'+fieldname+'.png'),None,fieldname,None)]
-
-        #Check we didn't add an existing file.
-        for thefile in f:
-            if os.path.isfile(thefile):
-                print "ERROR: File",thefile,"already exists. Aborting."
-                usage(1)
-
-    #####################################
-    #  Add explicitly requested output  #
-    #####################################
-
-    if doJobsRatherThanDomains:
-        prettyTitle=varname2pretty[varname]+' of '+datatype_pretty+' RTT jobs'
-    else:
-        prettyTitle=varname2pretty[varname]+' contribution in '+datatype_pretty+' RTT jobs'
-
-    if tableFile!=None or showTable:
-        if doJobsRatherThanDomains:
-            displayJobTables+=[(showTable,tableFile,varname,prettyTitle)]
-        else:
-            displayDomainTables+=[(showTable,tableFile,varname,doTotal,prettyTitle)]
-    if historyFile!=None:
-        if doJobsRatherThanDomains:
-            displayJobHistPlots+=[(historyFile,varname,clipMinVal,clipMaxVal,prettyTitle)]
-        else:
-            displayDomainHistPlots+=[(historyFile,varname,totalOffset,clipMinVal,clipMaxVal,prettyTitle,calc.domainOffsets())]
-    if pieFile!=None:
-        displayDomainPieCharts+=[(pieFile,None,varname,prettyTitle)]
-    if barChartDates!=None:
-        displaySingleFieldMultiLabelBarCharts+=[(barChartFileName,varname,doJobsRatherThanDomains,totalOffset,barChartDates,prettyTitle)]
-
-    #############################
-    #  Actually produce output  #
-    #############################
-
-    JobListMultiOutputHelper.produceOutput(joblist,
-                                           jobTables=displayJobTables,
-                                           domainTables=displayDomainTables,
-                                           domainPieCharts=displayDomainPieCharts,
-                                           domainHistPlots=displayDomainHistPlots,
-                                           jobHistPlots=displayJobHistPlots,
-                                           singleFieldMultiLabelBarCharts=displaySingleFieldMultiLabelBarCharts)
-
-    if lastDataFile!=None:
-        lasttimes=joblist.getTimes()
-        if len(lasttimes)>5:
-            lasttimes=lasttimes[len(lasttimes)-5:]
-        pr_last = joblist.getPlottableResult_SpecificMeasurementPerJob('vmem',times=lasttimes)
-        from PmbUtils.ValuePerDomainCalcUtils import JobListPrinter
-        JobListPrinter().printTable(pr_last,toStdOut=False,outFile=os.path.expanduser(lastDataFile))
-
-    ##################################################
-    #  Possible display/mail warnings (for cron job) #
-    ##################################################
-
-    sendINFOMails=False
-    if domainVMEMWarnings!=None:
-        warnEmails=[]
-        warnToStdOut=False
-        warnDomain='vmem'
-        warnReplyTo=None
-        for e in domainVMEMWarnings.split(','):
-            if e=='show': warnToStdOut=True
-            elif e.startswith('REPLYTO:'):
-                assert not warnReplyTo
-                warnReplyTo=e.split(':')[1]
-            else: warnEmails+=[e]
-
-        infourl=None
-        if warnEmails:
-            infourl='http://atlas-pmb.web.cern.ch/atlas-pmb/rtt-mon/?build=%s&cmtconfig=%s&jobset=%s&cache=%s&var=%s' \
-                     %(rttType,rttCMTCONFIG,datatype,rttCacheShort,warnDomain)
-
-        from PmbUtils.CoolDozerAccessUtils import CDTimeHelper
-        warnDate=CDTimeHelper.fromDateString(pretendDate) if pretendDate!=None else CDTimeHelper.now()
-        import PmbUtils.WarningUtils
-        warndata=PmbUtils.WarningUtils.constructWarnData(joblist,warnDomain,build=rttType,cache=rttCacheShort,cmtconfig=rttCMTCONFIG,domains=True)
-        conciseChanges=warndata.getConciseChanges(thedate=warnDate,blockfile=warnBlockFile)
-        if sendINFOMails or conciseChanges['haswarning']:
-            level='WARNING' if conciseChanges['haswarning'] else 'INFO'
-            idstr='%s/%s/%s/%s'%(datatype,rttType,rttCache,rttCMTCONFIG)
-            title='%s %s changes in %s RTT jobs '%(level,warnDomain,idstr)
-            lines=[]
-            lines += ["Build   : %s"%idstr]
-            if warnEmails:
-                lines += ["Info    : %s"%infourl]
-                lines += ["Log     : https://twiki.cern.ch/twiki/bin/view/Atlas/PMBMemoryPerDomainEvolution"]
-            lines += ['']
-            lines.extend(PmbUtils.WarningUtils.formatConciseChanges(conciseChanges,blockfile=warnBlockFile))
-            lines+=['']
-            import PmbUtils.CmtUtils
-            lines.extend(PmbUtils.CmtUtils.formatTagDiffs(conciseChanges['date_transitions'],tags=[rttCache,rttType]))
-            if warnToStdOut:
-                print title+'\n'
-                for l in lines:
-                    print '  ',l
-            if warnEmails and conciseChanges['new_reports']:
-                import PmbUtils.MailUtils
-                subject='[AUTO] '+title
-                lines+=['']
-                lines+=['[This is an automated message]']
-                PmbUtils.MailUtils.sendEmail(warnEmails,subject,'Thomas.Kittelmann@cern.ch','  '+'\n  '.join(lines),replyto=warnReplyTo)
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
-
-#Ideas: Optional legend with numbers for pie-chart
-#       Option to explode a given of the domains in the pie-chart.
-#       Option for pretty-labels in plots?
-#       Vertical grid lines in hist plots should be with one week/one month intervals.
-
diff --git a/Tools/PyCmt/CMakeLists.txt b/Tools/PyCmt/CMakeLists.txt
deleted file mode 100644
index e9dac9272e131d013ca1a6c8643ba4ab64e7a09e..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################################################
-# Package: PyCmt
-################################################################################
-
-# Declare the package name:
-atlas_subdir( PyCmt )
-
-# External dependencies:
-find_package( PythonLibs )
-
-# this line failed automatic conversion in cmt2cmake :
-# cmtpath_pattern_reverse  macro_append includes ' $(ppcmd)"<path>/$(cmt_installarea_prefix)/$(CMTCONFIG)/include" '
-
-# Install files from the package:
-atlas_install_python_modules( python/*.py python/pyshell python/pkgbuild )
-atlas_install_scripts( bin/make_pkgbuild.py )
-
diff --git a/Tools/PyCmt/bin/make_pkgbuild.py b/Tools/PyCmt/bin/make_pkgbuild.py
deleted file mode 100755
index f0b6bb87dc6cb844984a01a82682e7ab64bd63fb..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/bin/make_pkgbuild.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-# @purpose: driver for the pkgbuild-based builders
-
-from __future__ import with_statement
-
-### imports -------------------------------------------------------------------
-import sys
-import os
-import optparse
-
-import PyCmt.pkgbuild as pkgbuild
-
-msg = pkgbuild.msg
-
-### functions -----------------------------------------------------------------
-def main():
-    parser = optparse.OptionParser(usage="usage: %prog pkgbuild.py")
-    p = parser.add_option
-    p("-f", "--file",
-      default = None,
-      dest = "fname",
-      help = "path to the pkgbuild.py file containing build instructions")
-    p("-p", "--pkg-root",
-      default = None,
-      dest = "pkg_root",
-      help = "directory containing the cmt/requirements file (so we can "+\
-             "query CMT for build environment and options)")
-
-    (opts, args) = parser.parse_args()
-
-    if opts.fname is None or opts.pkg_root is None:
-        parser.print_help()
-        return 1
-
-    import os.path as osp
-    def _norm_path(p):
-        p = osp.expanduser(osp.expandvars(p))
-        p = osp.realpath(osp.normpath(p))
-        return p
-    opts.fname = _norm_path(opts.fname)
-    opts.pkg_root = _norm_path(opts.pkg_root)
-
-    # may raise
-    os.access(opts.fname, os.R_OK)
-    os.access(opts.pkg_root, os.R_OK)
-    assert osp.isdir(opts.pkg_root)
-    assert osp.isfile(opts.fname)
-
-    env = os.environ.copy()
-    env['pkg_root'] = opts.pkg_root
-    return pkgbuild.build_package(opts.fname, env=env, msg=msg)
-
-if __name__ == "__main__":
-    import sys
-    sys.exit(main())
-    
-        
-    
-    
diff --git a/Tools/PyCmt/cmt/requirements b/Tools/PyCmt/cmt/requirements
deleted file mode 100644
index d2c5035f17903f428f687aecfa29148b6ac2fe7a..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package PyCmt
-
-author Sebastien Binet <binet@cern.ch>
-
-use AtlasPolicy AtlasPolicy-*
-use AtlasPython	AtlasPython-*	External -no_auto_imports
-
-branches python bin
-
-##################################
-# for pkgbuild-enabled packages...
-cmtpath_pattern_reverse \
- macro_append includes ' $(ppcmd)"<path>/$(cmt_installarea_prefix)/$(CMTCONFIG)/include" '
-##################################
-
-apply_pattern declare_scripts files="\
- -s=$(PyCmt_root)/bin \
- make_pkgbuild.py \
-"
-
-private
-
-apply_pattern declare_python_modules files="*.py pyshell pkgbuild"
-
-pattern make_pkgbuild \
- private ; \
- macro_append constituents " make_pkgbuild_<name>" ; \
- action make_pkgbuild_<name> "$(PyCmt_root)/bin/make_pkgbuild.py --pkg-root=$(<package>_root) --file=<file>" ; \
- end_private
-
-end_private
diff --git a/Tools/PyCmt/python/Cmt.py b/Tools/PyCmt/python/Cmt.py
deleted file mode 100755
index 8d16fd8051ff1d6d764dfc8b2bb35706858aa4d8..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/Cmt.py
+++ /dev/null
@@ -1,841 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-## @author: Sebastien Binet
-## @file :  Cmt.py
-## @purpose: a little wrapper around cmt.exe to provide fast(er) access to the
-##           list of clients of a given package. It also provides a mean to
-##           retrieve all these clients...
-from __future__ import with_statement
-
-__version__ = "$Revision$"
-__author__  = "Sebastien Binet"
-
-import os
-import commands
-import re
-import sys
-import subprocess
-
-### monkey-patch subprocess (fwd compat w/ py-3.x) ----------------------------
-import PyCmt.bwdcompat
-### ---------------------------------------------------------------------------
-
-
-from PyCmt.Decorators import memoize
-import PyCmt.Logging as L
-
-class CmtOptions(object):
-    ## the 'raw' names of the various Athena offline projects
-    ## -> note I am discarding AtlasPoint1, tdaq, dqm, LCGCMT and GAUDI
-    OfflineProjects = [
-        "AtlasCore",
-        "DetCommon",
-        "AtlasConditions",
-        "AtlasEvent",
-        "AtlasReconstruction",
-        "AtlasTrigger",
-        "AtlasAnalysis",
-        "AtlasSimulation",
-        "AtlasHLT",
-        "AtlasOffline",
-        "AtlasProduction",
-        "AtlasDerivation",
-        "AthAnalysisBase"
-        ]
-
-    ## number of spaces in the output of the 'cmt show uses' to represent
-    ## hierarchichal dependency
-    deltaIndent = 2
-    pass
-
-class CmtStrings:
-    CMTPATH        = 'CMTPATH'
-    CMTPROJECTPATH = 'CMTPROJECTPATH'
-    CMTDIR         = 'cmt'
-    CMTVERSIONFILE = 'version.cmt'
-    CMTREQFILE     = 'requirements'
-    CMTPROJFILE    = 'project.cmt'
-    CMTSITE        = 'CERN'
-    RELEASEROOT    = '/afs/cern.ch/atlas/software/builds'
-    ATLASVERSION   = 'AtlasVersion'
-    pass
-
-class PkgNode(object):
-    def __init__(self, pkg):
-        object.__init__(self)
-        self._pkg  = pkg
-        self._deps = {}
-        return
-
-    def addDep(self, pkgName):
-        self._deps[pkgName] = 1
-        return
-
-    def cmtPkg(self):
-        return self._pkg
-    
-    def keys(self):
-        return self._deps.keys()
-
-    def deps(self):
-        return self.keys()
-    
-    def __repr__(self):
-        return repr(self._deps)
-
-class PkgTree(object):
-
-    def __init__(self):
-        object.__init__(self)
-        self._pkgs = {}
-        self._types= {}
-        return
-
-    def addPkg(self, pkg, pkg_type = 1):
-        self._types[pkg.name] = pkg_type
-        if self._pkgs.has_key( pkg.name ):
-            return
-        self._pkgs[pkg.name] = PkgNode(pkg)
-        return
-
-    def getPkg(self, pkgName):
-        return self._pkgs[pkgName]
-
-    def pkgs(self):
-        return self._pkgs
-
-    def types(self):
-        return self._types
-
-    def __getitem__(self, n):
-        return self._pkgs.__getitem__ (n)
-    def __setitem__(self, n, v):
-        return self._pkgs.__setitem__ (n,v)
-    
-    pass # PkgTree
-
-
-def lineDecoder( line ):
-    depLine   = re.compile( "#\s*?use.*?")
-    if not re.match( depLine, line ):
-        return (None, None)
-
-    athenaDep = re.compile( "#(?P<PkgIndent>\s*?)use (?P<PkgName>\w*) (?P<PkgVers>.*?) (?P<PkgPath>.*?) (.*?)" )
-    gaudiDep  = re.compile( "#(?P<PkgIndent>\s*?)use (?P<PkgName>\w*) (?P<PkgVers>.*)" )
-    l = re.match( athenaDep, line ) or \
-        re.match( gaudiDep,  line )
-    if l:
-        pkgIndent = l.group('PkgIndent')
-        pkgName   = l.group('PkgName')
-        pkgVers   = l.group('PkgVers')
-        try:
-            pkgPath = l.group('PkgPath')
-        except:
-            pkgPath = None
-            pass
-    else:
-        raise RuntimeError, "No decoding !!"
-    return (len(pkgIndent)-1, CmtPkg( pkgName, pkgVers, pkgPath ))
-
-def buildDepGraph( fileName, pkgDb, msg ):
-    """ Build the dependency graph """
-    pkgTree = PkgTree()
-    pkgs = []
-    cmtFile = open( os.path.expanduser(os.path.expandvars(fileName)), 'r' )
-    for l in cmtFile.readlines():
-        l = l.strip()
-        indent, pkg = lineDecoder( l )
-        if not pkg:
-            continue
-        msg.verbose( "found [%3i] [%s]", indent, pkg.name )
-
-        # try to retrieve the 'right' version from the pkg Db
-        if pkgDb.has_key(pkg.name): pkg = pkgDb[pkg.name]
-        else: msg.warning( "[%s] is not in pkgDb !!", pkg.name )
-            
-        pkgTree.addPkg( pkg )
-        pkgs.append( { 'indent':indent, 'pkg': pkg } )
-        if indent == 0:
-            continue
-        for p in reversed(pkgs):
-            pIndent    = p['indent']
-            parentName = p['pkg'].name
-            msg.verbose( "   processing [%3i] [%s]", pIndent, parentName )
-            if pIndent == indent - CmtOptions.deltaIndent:
-                pkgTree.getPkg(parentName).addDep( pkg.name )
-                msg.verbose( "   ==> [%s] depends on [%s]",
-                             parentName, pkg.name )
-                break
-            pass
-        pass
-    return pkgTree
-
-def buildPkgDb( fileName, msg ):
-
-    pattern = re.compile(r'use (?P<PkgName>.*?) (?P<PkgVersion>.*?) (?P<PkgPath>.*?) [(].*[)]')
-    cmtFile = open( os.path.expanduser(os.path.expandvars(fileName)), 'r' )
-    pkgDb = { }
-    for l in cmtFile:
-        l = l.strip()
-        
-        l = re.match( pattern, l )
-        if l:
-            pkgName = l.group('PkgName')
-            pkgVers = l.group('PkgVersion')
-            pkgPath = l.group('PkgPath')  
-            msg.debug( "found [%s] [%s] [%s]", pkgName, pkgVers, pkgPath )
-            pkgDb[pkgName] = CmtPkg( pkgName, pkgVers, pkgPath )
-            pass
-    
-    return pkgDb
-
-def extract_uses(fname, msg):
-    cmtFile = open(os.path.expanduser(os.path.expandvars(fname)), 'r')
-    pkgDb = { }
-    for l in cmtFile:
-        if not l.startswith('use '):
-            continue
-        l = l.strip()
-        pkg = l[len('use '):].split()
-        if len(pkg) >= 1:
-            pkg_name = pkg[0].strip()
-            pkg_vers = '*'
-            if len(pkg) >= 2:
-                pkg_vers = pkg[1].strip()
-            pkg_path  = ''
-            if len(pkg)==3:
-                pkg_path = pkg[2].strip()    
-            msg.debug("found [%s] [%s] [%s]", pkg_name, pkg_vers, pkg_path)
-            cmtpkg = CmtPkg(pkg_name, pkg_vers, pkg_path)
-            pkgDb[cmtpkg.full_name] = cmtpkg
-            pass
-        else:
-            msg.error('unexpected line content: %s', pkg)
-    return pkgDb
-    
-class CmtPkg(object):
-    def __init__( self,
-                  pkgName,
-                  pkgVersion = None,
-                  pkgPath    = '',
-                  projName   = None):
-        object.__init__(self)
-        self.name = pkgName
-        self.version = pkgVersion
-        self.path    = pkgPath
-        self.project = projName
-        return
-
-    @property
-    def full_name(self):
-        return self.fullName()
-    
-    def fullName(self):
-        return os.path.join(self.path, self.name)
-    
-    def __repr__(self):
-        return '<CmtPkg(name=%s, version=%s)>' % (self.full_name, self.version)
-
-    def __str__( self ):
-       s = [ "Package: %s" % self.name,
-             "Version: %s" % self.version,
-             "Path:    %s" % self.path ]
-       return os.linesep.join(s)
-    
-class CmtProject(object):
-    def __init__(self, path=None, version=None):
-        self.path    = path
-        self.version = version
-        self.parents = []
-        self.children= []
-
-    @property
-    def name(self):
-        import os.path as osp
-        return osp.basename(osp.dirname(self.path))
-
-    def __repr__(self):
-        return '<CmtProject(name=%s, version=%s)>' % (self.name, self.version)
-
-    def __str__( self ):
-        s = [ "Project:  %s" % self.name,
-              "Version:  %s" % self.version,
-              "Path:     %s" % self.path,
-              "Parents:  %s" % self.parents,
-              "Children: %s" % self.children]
-        from os import linesep
-        return linesep.join(s)
-            
-class CmtWrapper(object):
-    """
-    A python wrapper around CMT
-    """
-
-    def __init__(self, lvl = L.logging.INFO, shell=None):
-        object.__init__(self)
-        self.msg = L.logging.getLogger("Cmt")
-        self.msg.setLevel(lvl)
-        if shell is None:
-            self.shell = subprocess
-        else:
-            self.shell = shell
-        sc,self.bin = self.shell.getstatusoutput("which cmt.exe")
-
-        # make sure we have a correct and sound CMT environment
-        assert len(self.projects())>0, "no projects found: corrupted CMT environment ?"
-        assert len(self.projects_dag())>0, "empty projects-DAG tree: corrupted CMT environment ?"
-        
-        return
-
-    def check_out(self, pkgFullName, pkgVersion = None):
-        """check a package out of the source repository
-         `pkgFullName` the complete and full path name to that pkg.
-                       e.g: 'Control/AthenaKernel'
-         `pkgVersion`  if specified, retrieve that version from the repo.
-                       leave it to None to retrieve the HEAD or trunk.
-        """
-        args = pkgFullName
-        cmd  = "%s co %s" % ( self.bin, pkgFullName )
-        if pkgVersion != None:
-            cmd = "%s co -r %s %s" % ( self.bin, pkgVersion, pkgFullName )
-            pass
-        
-        sc,out = self.shell.getstatusoutput( "%s" % cmd )
-        if sc != 0:
-            self.msg.warning( "Problem doing 'cmt co' !" )
-            self.msg.warning( "Failed to issue [%s]" % cmd )
-            self.msg.warning( out )
-            pass
-        else:
-            self.msg.info( "## %s [OK]" % pkgFullName )
-        return
-    # bwd compat
-    checkOut = check_out
-    
-    @memoize
-    def projects(self):
-        return [ p.path for p in self.project_tree().itervalues() ]
-
-    @memoize
-    def projects_tree(self):
-        """return an (unordered) tree of all the projects"""
-        dec = re.compile(r"(?P<ProjIndent>\s*?)"\
-                          "(?P<ProjName>[-_.\w]*?) "\
-                          "(?P<ProjVersion>[-_.\w/]*?) "\
-                          "[(]in (?P<ProjPath>.*?)[)]"\
-                          "(?P<ProjData>.*)" )
-        #from collections import defaultdict
-        proj_tree = {} #defaultdict(CmtProject)
-        projs = []
-
-        out = self.show (projects='')
-        for l in out.splitlines():
-            o = dec.match(l)
-            if o is None:
-                self.msg.warning("!! discarding: !!")
-                self.msg.warning(repr(l))
-                continue
-            g = o.group
-            self.msg.debug("%s %s %s %s [%s]",
-                           g('ProjIndent'),
-                           g('ProjName'),
-                           g('ProjVersion'),
-                           g('ProjPath'),
-                           g('ProjData'))
-            if g('ProjName') == 'CMTHOME':
-                # ignore that guy, it is a special (pain in the neck) one
-                # see bug #75846
-                # https://savannah.cern.ch/bugs/?75846
-                continue
-            if g('ProjName') == 'CMTUSERCONTEXT':
-                # ignore similar to CMTHOME above
-                continue
-            projs.append([len(g('ProjIndent')),
-                          g('ProjName'),
-                          g('ProjVersion'),
-                          g('ProjPath'),
-                          g('ProjData').strip().split()])
-
-        for i,iproj in enumerate(projs):
-            try:
-                proj = proj_tree[iproj[1]]
-            except KeyError:
-                proj = proj_tree[iproj[1]] = CmtProject()
-            proj.version = iproj[2]
-            proj.path    = iproj[3]
-
-            ###################################################################
-            ### hack for cmt-v21 ###
-            ### in cmt-21 the top-level 'current' project does't have
-            ### any dep against the other projects
-            if len(iproj[-1])==1 and iproj[-1][0] == "(current)":
-                try:
-                    proj.children.append(projs[i+1][1])
-                except IndexError:
-                    pass
-                continue
-            ### End-of-hack ###
-            ###################################################################
-            
-            for data in iproj[-1]:
-                if data.startswith('P='):
-                    parent_name=data[2:]
-                    if not parent_name in proj.parents:
-                        proj.parents.append(parent_name)
-                elif data.startswith('C='):
-                    child_name = data[2:]
-                    if not child_name in proj.children:
-                        proj.children.append(child_name)
-                else:
-                    pass
-        return proj_tree
-    project_tree = projects_tree
-    
-    @memoize
-    def project_deps (self, proj_name):
-        "return the list of projects a given project is depending upon"
-        proj_tree = self.project_tree()
-        deps = set()
-        def _collect_children (projs, proj_name, visited=None):
-            if visited is None:
-                visited=set([proj_name])
-            for c in projs[proj_name].children:
-                if c in visited:
-                    continue
-                visited.add (c)
-                yield c
-                for i in _collect_children (projs, c, visited):
-                    yield i
-        deps = set([c for c in _collect_children (proj_tree, proj_name)])
-        return list(deps)
-
-    @memoize
-    def project_release (self, proj_name):
-        """helper method to return the xyzRelease for a given project
-        this is to handle some idiosyncracies of different projects
-        """
-        if proj_name == "LCGCMT":         return "LCG_Release"
-        elif proj_name == "dqm-common":   return "DQMCRelease"
-        elif proj_name == "tdaq-common":  return "TDAQCRelease"
-        #elif proj_name == "GAUDI":        return "GaudiRelease"
-        else:
-            return "%sRelease"%proj_name
-
-    @memoize
-    def projects_dag(self):
-        """return the (flatten) directed acyclic graph of all the
-        currently used project(name)s
-        """
-        tree = self.project_tree()
-        root = [n for n,p in tree.iteritems() if len(p.parents)==0]
-        assert len(root)>=1, \
-               "project tree inconsistency (found [%i] root(s))" % (len(root),)
-        root = tree[root.pop()] # may raise.
-
-        def iter_tree(pkg):
-            yield pkg
-            for n in pkg.children:
-                for j in iter_tree(tree[n]):
-                    yield j
-
-        # keep a context around to prevent from building dups
-        projs = []
-        for proj in iter_tree(root):
-            if proj not in projs:
-                projs.append(proj)
-        return projs
-    # bwd compat
-    project_dag = projects_dag
-
-    @memoize
-    def release_metadata(self, project=None):
-        """return
-        """
-        return
-    
-    @memoize
-    def find_pkg(self, name):
-        """Find CMT package by (leaf)name.
-
-        Return: CmtPkg or None if not found
-        """
-        import os
-        osp = os.path
-        # Loop over all *Release/cmt/requirements files
-        for proj in self.projects_dag():
-            reqpath = os.path.join(proj.path,
-                                   self.project_release(proj.name),
-                                   CmtStrings.CMTDIR,
-                                   CmtStrings.CMTREQFILE)
-            if os.path.exists(reqpath):
-                pkgs = open(reqpath, 'r').readlines()
-                pkgs = (l.strip() for l in pkgs)
-                pkgs = (l for l in pkgs if l.startswith('use '))
-                pkgs = (l[len('use '):] for l in pkgs)
-                pkgs = (l.split() for l in pkgs if name in l)
-                for fields in pkgs:
-                    if len(fields)>0 and fields[0]==name:
-                        if len(fields)==3:
-                            return CmtPkg(fields[0],fields[1],fields[2])
-                        elif len(fields)==2:
-                            return CmtPkg(fields[0],fields[1],"")
-
-    @memoize
-    def get_pkg_version(self, fullPkgName):
-        """Return the package tag in the current release for `fullPkgName`.
-
-        Return: Tag or None
-        """
-        _cmd = "%s show versions %s" % (self.bin, fullPkgName)
-        self.msg.debug('running [%s]...', _cmd)
-        p = self.shell.Popen(_cmd, stdout = subprocess.PIPE, shell=True)
-        
-        version = None
-        testArea = os.environ.get("TestArea")
-        for cmtline in p.stdout:
-            if (testArea and cmtline.find(testArea)!=-1): continue
-            version = cmtline.split(" ")[1]
-            break
-
-        return version
-
-    
-    def get_latest_pkg_tag(self, fullPkgName):
-        """Return the most recent SVN tag of the package.
-
-        Return: Tag or None on error
-        """
-        from PyUtils.WorkAreaLib import get_latest_pkg_tag
-        return get_latest_pkg_tag(fullPkgName)
-
-
-    def show_clients(self, pkgName):
-        """return the list of clients of a given `pkgName` CMT package
-        Note: `pkgName` is the leaf name of a package (not its fullname)
-        """
-        if pkgName.count(os.sep):
-            raise RuntimeError, "pkgName contains a %s !!" % os.sep
-        clientList = []
-
-        proj_deps = self.project_deps('AtlasOffline') + ['AtlasOffline']
-        #proj_deps = ['AtlasOffline']
-        self.msg.info( "building dependencies..." )
-        self.msg.info( "projects used: %r", proj_deps )
-        
-        projReleases = [self.project_release(p) for p in proj_deps ]
-        ## create a temporary directory containing a CMT package 'use'-ing
-        ## all <AtlasProject>Release packages
-        import tempfile
-        tmpRoot = tempfile.mkdtemp()
-        cwd = os.getcwd()
-        os.chdir( tmpRoot )
-        cmtTmpDir = os.path.join( "Dep%s" % pkgName, "cmt" )
-        if not os.path.exists( cmtTmpDir ):
-            os.makedirs( cmtTmpDir )
-        os.chdir( cmtTmpDir )
-
-        with open( 'requirements', 'w' ) as req:
-            print >> req, "package Dep%s" % pkgName
-            print >> req, ""
-            print >> req, "author DependenciesViewer"
-            print >> req, ""
-            for p in projReleases:
-                print >> req, "use %s %s-*" % (p,p)
-            print >> req, ""
-            req.flush()
-
-        if 0:
-            print "+"*80
-            with open('requirements', 'r') as req:
-                for l in req:
-                    print l,
-            print "+"*80
-                
-        with open('version.cmt', 'w') as cmt_version:
-            print >> cmt_version, "Dep%s-00-00-00" % (pkgName,)
-            print >> cmt_version, ""
-            cmt_version.flush()
-
-        _cmd = "%s config >& /dev/null" % self.bin
-        self.msg.debug('running [%s]...', _cmd)
-        sc = self.shell.check_call(_cmd, shell=True)
-        if sc:
-            raise RuntimeError(
-                "could not configure Dep%s package" % (pkgName,)
-                )
-
-        f_use_name = os.path.join(tmpRoot,cmtTmpDir,pkgName)
-        f_use_name = "%s.cmt" % f_use_name
-        _cmd =  "%s show uses > %s" % (self.bin, f_use_name)# pkgName)
-        self.msg.debug('running [%s]...', _cmd)
-        sc = self.shell.call(_cmd, shell=True)
-        if sc:
-            self.msg.warning("problem running command [%s]", _cmd)
-            self.msg.warning("(ignoring it as I am resilient)")
-        del f_use_name
-        
-        self.msg.info( "building packages db..." )
-        pkgDb   = buildPkgDb( "%s.cmt" % pkgName, self.msg )
-
-        self.msg.info( "building packages dependency tree..." )
-        pkgTree = buildDepGraph( "%s.cmt" % pkgName, pkgDb, self.msg )
-        
-        os.chdir( cwd )
-        
-        pkgs = pkgTree.pkgs()
-        keys = sorted(pkgs.keys())
-        for k in keys:
-            self.msg.verbose("-> %s: %s",k,pkgs[k].deps())
-            if pkgName in pkgs[k].deps() and not k in clientList and \
-               not k in projReleases :
-                client = pkgTree.getPkg(k).cmtPkg()
-                clientList.append( client )
-                self.msg.info( "=> [%s] (%s)",
-                               client.fullName(), client.version )
-                pass
-        import shutil
-        shutil.rmtree( tmpRoot )
-        
-        self.msg.info( "Found [%i] clients for [%s]",
-                       len(clientList), pkgName )
-        return clientList
-    # bwd compat
-    showClients = show_clients
-    
-    def slowShowClients(self, pkgName):
-        if pkgName.count(os.sep):
-            raise RuntimeError, "pkgName contains a %s !!" % os.sep
-        clientList = []
-
-        projects = self.projects()
-
-        ## now we can actually retrieve the list of clients
-        cmd = "%s show clients %s" % ( self.bin, pkgName )
-        sc,out = self.shell.getstatusoutput( "%s" % cmd )
-        if sc != 0:
-            self.msg.warning( "Problem during [%s]" % cmd )
-            self.msg.warning( out )
-            return clientList
-
-        pattern = re.compile(r'# (?P<PkgName>.*?) (?P<PkgVersion>.*?) (?P<PkgPath>.*?) [(]use version (?P<UsedPkgVersion>.*?)[)]')
-        for l in out.splitlines():
-            match = re.match(pattern, l)
-            if not match:
-                continue
-            pkgPath = match.group('PkgPath')
-            for proj in projects:
-                pkgPath = pkgPath.replace( proj, "" )
-            if pkgPath.startswith(os.sep):
-                pkgPath = pkgPath[1:]
-            cmtPkg = CmtPkg( match.group('PkgName'),
-                             match.group('PkgVersion'),
-                             pkgPath )
-            clientList.append(cmtPkg)
-            pass
-
-        self.msg.info( "Found [%i] clients for [%s]",
-                       len(clientList), pkgName )
-        return clientList
-
-    def show(self, **kw):
-        cmd = "%s show " % self.bin
-        cmd = cmd + " ".join( "%s %s" % (k, kw[k]) for k in kw.keys() )
-
-        # only capture the stdout as stderr may have spurious ERRORs
-        # from wrong CMT environment or CMT-phase-of-the-moon pb...
-        with open(os.devnull, 'w') as devnull:
-            sc,out = self.shell.getstatusoutput(cmd, stderr=devnull)
-
-        if sc != 0:
-            self.msg.warning( "Problem during [%s]" % cmd )
-            self.msg.warning( out )
-        return out
-        
-class CmtMgr(object):
-    """a simple class to manage CMT environments"""
-    def __init__(self,
-                 project_name=None,
-                 cmt_root=None,
-                 cmt_version='v1r22',
-                 asetup=None,
-                 tags='16.0.0,gcc43,opt',
-                 verbose=False):
-        import os
-        if project_name is None:
-            project_name = os.getenv('AtlasProject', 'AtlasOffline')
-        if cmt_root is None and os.getenv('CMTROOT'):
-            cmt_setup = os.path.join(os.getenv('CMTROOT'), 'mgr', 'setup.sh')
-        else:
-            cmt_setup = os.path.join(cmt_root, cmt_version, 'mgr', 'setup.sh')
-        if not os.path.exists(cmt_setup):
-            raise OSError, "no such file [%s]"%cmt_setup
-
-        if asetup is None:
-            asetup = '/afs/cern.ch/atlas/software/dist/AtlasSetup'
-        self._asetup_root = asetup
-        
-        self.verbose = verbose
-        
-        self.project = project_name
-        import tempfile
-        self.top_dir = tempfile.mkdtemp()
-        from . import pyshell as ps
-        self.sh = ps.LocalShell()
-        # setup AtlasSetup
-        self.sh.environ['AtlasSetup'] = self._asetup_root
-        self._asetup_sh = os.path.join(self._asetup_root,
-                                       'scripts', 'asetup.sh')
-        
-        orig_dir = self.sh.getcwd()
-        self._create_asetup_cfg(tags)
-
-    def _create_asetup_cfg(self, tags):
-        
-        self.sh.chdir(self.top_dir)
-
-        asetup_cfg_name = os.path.join(self.top_dir, '.asetup.cfg')
-        import textwrap
-        asetup_cfg = open(asetup_cfg_name, "w")
-        asetup_cfg.write(
-            textwrap.dedent("""\
-            [defaults]
-            #default32 = True
-            opt = True
-            lang = C
-            hastest = True           # to prepend pwd to cmtpath
-            pedantic = True
-            runtime = True
-            setup = True
-            #project = AtlasOffline  # offline is already the default
-            save = True
-            #standalone = False   # prefer build area instead of kit-release
-            #standalone = True    # prefer release area instead of build-area
-            testarea=<pwd>        # have the current working directory be the testarea
-            """)
-            )
-        asetup_cfg.flush()
-        asetup_cfg.close()
-
-        # source-ing
-        args = ' '.join([
-            '--input=%s' % (asetup_cfg_name,),
-            tags
-            ])
-        sc = self.sh.source(self._asetup_sh,
-                            args=args)
-        if sc:
-            print "**ERROR** while running 'asetup %s'" % args
-            
-        sc,out = self.sh.getstatusoutput('cmt show path')
-        if sc:
-            print "**ERROR** while running cmd=[%s]:\n%s"%(cmt_setup,
-                                                           out)
-        else:
-            # if self.verbose:
-            #     print "$ cmt show path:\n%s\n===EOF===" % out
-            pass
-        
-        return
-    
-def get_tag_diff(ref, chk, verbose=False):
-    """return the list of tag differences between 2 releases
-    """
-    mgrs = {}
-    cmts = {}
-
-    if verbose:
-        print "::: setup reference env. [%s]..." % ref
-    mgrs['ref'] = CmtMgr(project_name='reference_rel', tags=ref,
-                         verbose=verbose)
-    cmts['ref'] = CmtWrapper(shell=mgrs['ref'].sh)
-
-    if verbose:
-        print "::: setup check env. [%s]..." % chk
-    mgrs['chk'] = CmtMgr(project_name='check_rel', tags=chk,
-                         verbose=verbose)
-    cmts['chk'] = CmtWrapper(shell=mgrs['chk'].sh)
-
-    # list of packages for each ref/chk
-    pkgdb = {}
-    # diff for each ref/chk
-    cmt_diffs = {}
-    diffs = []
-    
-    for rel in ('ref', 'chk'):
-        cmt = cmts[rel]
-        pkgdb[rel] = {}
-        
-        for proj in reversed(cmt.projects_dag()):
-            reldata = os.listdir(proj.path)
-            reldata = [p for p in reldata if p.endswith('Release')]
-            if len(reldata) != 1:
-                continue
-            reldata = reldata[0]
-            reldata = os.path.join(proj.path, reldata, 'cmt', 'requirements')
-            if not os.path.exists(reldata):
-                continue
-            uses = extract_uses(reldata, msg=cmt.msg)
-            for p in uses:
-                pname = proj.name
-                if pname.startswith('Atlas'):
-                    pname = pname[len('Atlas'):]
-                uses[p].project = pname
-            pkgdb[rel].update(uses)
-
-    def cmp_pkgs(a, b):
-        diffs = {}
-        pkg_fullnames = sorted(pkgdb[a].keys())
-        for pkg_fullname in pkg_fullnames:
-            if not (pkg_fullname in pkgdb[b]):
-                diffs[pkg_fullname] = {a: pkgdb[a][pkg_fullname],
-                                       b: CmtPkg('None',
-                                                 'None-00-00-00',
-                                                 '-')}
-            else:
-                a_vers = pkgdb[a][pkg_fullname].version
-                b_vers = pkgdb[b][pkg_fullname].version
-                if a_vers != b_vers:
-                    diffs[pkg_fullname] = {a: pkgdb[a][pkg_fullname],
-                                           b: pkgdb[b][pkg_fullname]}
-        return diffs
-    # first compare the list of packages registered in the reference
-    cmt_diffs.update(cmp_pkgs(a='ref', b='chk'))
-    # then compare the reverse
-    cmt_diffs.update(cmp_pkgs(a='chk', b='ref'))
-
-    if verbose:
-        print "::: found [%i] tags which are different" % (len(cmt_diffs),)
-    if len(cmt_diffs) == 0:
-        return cmt_diffs
-
-    fmt = "%-15s %-15s | %-15s %-15s | %-45s"
-    if verbose:
-        print fmt % ("ref", "ref-project", "chk", "chk-project", "pkg-name")
-        print "-"*120
-    pkg_fullnames = sorted(cmt_diffs.keys())
-    for pkg_fullname in pkg_fullnames:
-        diff = cmt_diffs[pkg_fullname]
-        if (not 'ref' in diff or
-            not 'chk' in diff):
-            print "** err **: pkg-fullname [%s] keys: %s" % (pkg_fullname, diff.keys())
-        pkg = diff['ref']
-        if pkg.name == 'None':
-            pkg = diff['chk']
-        full_name = pkg.full_name
-        out = dict(ref=diff['ref'].version.replace(pkg.name+'-',''),
-                   chk=diff['chk'].version.replace(pkg.name+'-',''),
-                   ref_proj=diff['ref'].project or 'N/A',
-                   chk_proj=diff['chk'].project or 'N/A',
-                   full_name=full_name)
-        diffs.append(out)
-        if verbose:
-            print fmt % (out['ref'], out['ref_proj'],
-                         out['chk'], out['chk_proj'],
-                         out['full_name'])
-
-    if verbose:
-        print "-"*120
-        print "::: found [%i] tags which are different" % (len(diffs),)
-
-    return diffs
-    
diff --git a/Tools/PyCmt/python/Decorators.py b/Tools/PyCmt/python/Decorators.py
deleted file mode 100644
index 5865453eb6711ac760a7237b04df07c431a5d655..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/Decorators.py
+++ /dev/null
@@ -1,209 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @author: Sebastien Binet <binet@cern.ch>
-# @date:   March 2008
-# @purpose: a set of decorators. Most of them (if not all) have been stolen
-#           from here:
-#           http://www.phyast.pitt.edu/~micheles/python/documentation.html
-#
-from __future__ import with_statement
-
-__version__ = "$Revision$"
-__author__  = "Sebastien Binet <binet@cern.ch>"
-
-__all__ = [
-    'memoize',
-    'forking',
-    'async',
-    ]
-
-import sys
-import os
-import itertools
-from decorator import *
-
-@decorator
-def memoize(func, *args):
-    """This decorator implements the memoize pattern, i.e. it caches the result
-    of a function in a dictionary, so that the next time the function is called
-    with the same input parameters the result is retrieved from the cache and
-    not recomputed.
-    """
-    try:
-        mem_dict = getattr(func, "_mem_dict")
-    except AttributeError:
-        # look-up failed so we have to build the cache holder
-        mem_dict = {}
-        setattr(func, "_mem_dict", mem_dict)
-    try:
-        return mem_dict[args]
-    except KeyError:
-        # look-up failed so we have to build the result the first time around
-        # then we cache
-        mem_dict[args] = result = func(*args)
-        return result
-
-# FIXME: does not work... func is an instance of FunctionMaker which cannot
-#        be pickled...
-import __builtin__
-@decorator
-def mp_forking(func, *args, **kwargs):
-    import multiprocessing as mp
-    ## pool = mp.Pool (processes=1)
-    ## return pool.apply (func, *args, **kwargs)
-
-    # create a local queue to fetch the results back
-    def wrapping(func):
-        q = mp.Queue()
-        def wrap_fct(*args, **kwargs):
-            try:
-                res = func(*args, **kwargs)
-            # catch *everything* and 're-raise'
-            except BaseException,err:
-                #import traceback; traceback.print_exc()
-                res = err
-            q.put(res)
-        wrap_fct.q = q
-        return wrap_fct
-
-    func = wrapping(func)
-    proc = mp.Process(target=func, args=args, kwargs=kwargs)
-    proc.start()
-    res = func.q.get()
-    proc.join()
-    proc.terminate()
-    if isinstance(res, BaseException):
-        #import traceback; traceback.print_exc()
-        raise res
-        #reraise_exception(exc,exc_info)
-    return res
-
-def reraise_exception(new_exc, exc_info=None):
-    if exc_info is None:
-        exc_info = sys.exc_info()
-    _exc_class, _exc, tb = exc_info
-    raise new_exc.__class__, new_exc, tb
-    
-@decorator
-def forking(func, *args, **kwargs):
-    """
-    This decorator implements the forking patterns, i.e. it runs the function
-    in a forked process.
-    see:
-     http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/511474
-    """
-    import os
-    try:
-        import cPickle as pickle
-    except ImportError:
-        import pickle
-        
-    # create a pipe which will be shared between parent and child
-    pread, pwrite = os.pipe()
-
-    # do fork
-    pid = os.fork()
-
-    ## parent ##
-    if pid > 0:
-        os.close(pwrite)
-        with os.fdopen(pread, 'rb') as f:
-            status, result = pickle.load(f)
-        os.waitpid(pid, 0)
-        if status == 0:
-            return result
-        else:
-            remote_exc = result[0]
-            reraise_exception(remote_exc)
-            
-    ## child ##
-    else:
-        os.close(pread)
-        try:
-            result = func(*args, **kwargs)
-            status = 0
-        except (Exception, KeyboardInterrupt), exc:
-            import traceback
-            exc_string = traceback.format_exc(limit=10)
-            for l in exc_string.splitlines():
-                print "[%d]"%os.getpid(),l.rstrip()
-            result = exc, exc_string
-            status = 1
-        with os.fdopen(pwrite, 'wb') as f:
-            try:
-                pickle.dump((status,result), f, pickle.HIGHEST_PROTOCOL)
-            except pickle.PicklingError, exc:
-                pickle.dump((2,exc), f, pickle.HIGHEST_PROTOCOL)
-        os._exit(0)
-    pass # forking
-
-            
-### a decorator converting blocking functions into asynchronous functions
-#   stolen from http://pypi.python.org/pypi/decorator/3.0.0
-def _async_on_success(result): # default implementation
-    "Called on the result of the function"
-    return result
-
-def _async_on_failure(exc_info): # default implementation
-    "Called if the function fails"
-    _exc_class, _exc, tb = exc_info
-    raise _exc_class, _exc, tb
-    pass
-
-def _async_on_closing(): # default implementation
-    "Called at the end, both in case of success and failure"
-    pass
-
-class Async(object):
-    """
-    A decorator converting blocking functions into asynchronous
-    functions, by using threads or processes. Examples:
-
-    async_with_threads =  Async(threading.Thread)
-    async_with_processes =  Async(multiprocessing.Process)
-    """
-
-    def __init__(self, threadfactory):
-        self.threadfactory = threadfactory
-
-    def __call__(self, func,
-                 on_success=_async_on_success,
-                 on_failure=_async_on_failure,
-                 on_closing=_async_on_closing):
-        # every decorated function has its own independent thread counter
-        func.counter = itertools.count(1)
-        func.on_success = on_success
-        func.on_failure = on_failure
-        func.on_closing = on_closing
-        return decorator(self.call, func)
-
-    def call(self, func, *args, **kw):
-        def func_wrapper():
-            try:
-                result = func(*args, **kw)
-            except:
-                func.on_failure(sys.exc_info())
-            else:
-                return func.on_success(result)
-            finally:
-                func.on_closing()
-        name = '%s-%s' % (func.__name__, func.counter.next())
-        thread = self.threadfactory(None, func_wrapper, name)
-        thread.start()
-        return thread
-
-# default async decorator: using processes
-def async(async_type='mp'):
-    if async_type in ("mp", "multiprocessing"):
-        from multiprocessing import Process
-        factory = Process
-    elif async_type in ("th", "threading"):
-        from threading import Thread
-        factory = Thread
-    else:
-        raise ValueError ("async_type must be either 'multiprocessing' "
-                          "or 'threading' (got: %s)"%async_type)
-    async_obj = Async (factory)
-    return async_obj
-        
-    
diff --git a/Tools/PyCmt/python/Logging.py b/Tools/PyCmt/python/Logging.py
deleted file mode 100644
index 9ad98606dd0146dddfff8faeafd7eb22226c67b7..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/Logging.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-## @author: Sebastien Binet
-## @file :  Logging.py
-## @purpose: try to import Logging from AthenaCommon.
-##           falls back on stdlib's one
-
-__version__ = "$Revision$"
-__author__  = "Sebastien Binet"
-
-__all__ = ['msg', 'logging']
-
-try:
-    import AthenaCommon.Logging as L
-    msg = L.log
-    logging = L.logging
-except ImportError:
-    import logging
-    logging.VERBOSE = logging.DEBUG - 1
-    logging.ALL     = logging.DEBUG - 2
-    logging.addLevelName( logging.VERBOSE, 'VERBOSE' )
-    logging.addLevelName( logging.ALL, 'ALL' )
-    logging.basicConfig(level=logging.INFO,
-                        format="Py:%(name)-14s%(levelname)8s %(message)s")
-    cls = logging.getLoggerClass()
-    def verbose(self, msg, *args, **kwargs):
-        if self.manager.disable >= logging.VERBOSE:
-            return
-        if logging.VERBOSE >= self.getEffectiveLevel():
-            apply(self._log, (logging.VERBOSE, msg, args), kwargs)
-    cls.verbose = verbose
-    del verbose
-    
-    log = msg = logging.getLogger("Athena")
-    
-            
diff --git a/Tools/PyCmt/python/__init__.py b/Tools/PyCmt/python/__init__.py
deleted file mode 100644
index 74583d364ec2ca794156596c7254d9b234a940c6..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/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/PyCmt/python/bwdcompat.py b/Tools/PyCmt/python/bwdcompat.py
deleted file mode 100644
index c70a52586a196abd65f1fb8b87278ec8bdb75b0a..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/bwdcompat.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import subprocess
-
-### monkey-patch subprocess (fwd compat w/ py-3.x) ----------------------------
-def getstatusoutput(cmd, *popenargs, **kwargs):
-    if isinstance(cmd, basestring):
-        cmd = cmd.split()
-    if 'stdout' in kwargs:
-        raise ValueError('stdout argument not allowed, it will be overridden.')
-    kwargs['stdout'] = subprocess.PIPE
-    p = subprocess.Popen(cmd, *popenargs, **kwargs)
-    sc = p.returncode
-    if sc is None:
-        sc = 0
-    fd = p.stdout
-    out= ''.join(list(fd.readlines()))
-    if out[-1:] == '\n': out = out[:-1]
-    return sc,out
-subprocess.getstatusoutput = getstatusoutput
-del getstatusoutput
-
-def getstatus(cmd, *popenargs, **kwargs):
-    return subprocess.getstatusoutput(cmd, *popenargs, **kwargs)[0]
-subprocess.getstatus = getstatus
-del getstatus
-
-def getoutput(cmd, *popenargs, **kwargs):
-    return subprocess.getstatusoutput(cmd, *popenargs, **kwargs)[1]
-subprocess.getoutput = getoutput
-del getoutput
-### ---------------------------------------------------------------------------
diff --git a/Tools/PyCmt/python/decorator.py b/Tools/PyCmt/python/decorator.py
deleted file mode 100644
index a7815ab535801da84af681369b80cbf22569860e..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/decorator.py
+++ /dev/null
@@ -1,209 +0,0 @@
-##########################     LICENCE     ###############################
-##
-##   Copyright (c) 2005-2011, Michele Simionato
-##   All rights reserved.
-##
-##   Redistributions of source code must retain the above copyright 
-##   notice, this list of conditions and the following disclaimer.
-##   Redistributions in bytecode form must reproduce the above copyright
-##   notice, this list of conditions and the following disclaimer in
-##   the documentation and/or other materials provided with the
-##   distribution. 
-
-##   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-##   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-##   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-##   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-##   HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-##   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-##   BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-##   OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-##   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-##   TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
-##   USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-##   DAMAGE.
-
-"""
-Decorator module, see http://pypi.python.org/pypi/decorator
-for the documentation.
-"""
-
-__version__ = '3.3.0'
-
-__all__ = ["decorator", "FunctionMaker", "partial"]
-
-import sys, re, inspect
-
-try:
-    from functools import partial
-except ImportError: # for Python version < 2.5
-    class partial(object):
-        "A simple replacement of functools.partial"
-        def __init__(self, func, *args, **kw):
-            self.func = func
-            self.args = args                
-            self.keywords = kw
-        def __call__(self, *otherargs, **otherkw):
-            kw = self.keywords.copy()
-            kw.update(otherkw)
-            return self.func(*(self.args + otherargs), **kw)
-
-if sys.version >= '3':
-    from inspect import getfullargspec
-else:
-    class getfullargspec(object):
-        "A quick and dirty replacement for getfullargspec for Python 2.X"
-        def __init__(self, f):
-            self.args, self.varargs, self.varkw, self.defaults = \
-                inspect.getargspec(f)
-            self.kwonlyargs = []
-            self.kwonlydefaults = None
-            self.annotations = getattr(f, '__annotations__', {})
-        def __iter__(self):
-            yield self.args
-            yield self.varargs
-            yield self.varkw
-            yield self.defaults
-
-DEF = re.compile('\s*def\s*([_\w][_\w\d]*)\s*\(')
-
-# basic functionality
-class FunctionMaker(object):
-    """
-    An object with the ability to create functions with a given signature.
-    It has attributes name, doc, module, signature, defaults, dict and
-    methods update and make.
-    """
-    def __init__(self, func=None, name=None, signature=None,
-                 defaults=None, doc=None, module=None, funcdict=None):
-        self.shortsignature = signature
-        if func:
-            # func can be a class or a callable, but not an instance method
-            self.name = func.__name__
-            if self.name == '<lambda>': # small hack for lambda functions
-                self.name = '_lambda_' 
-            self.doc = func.__doc__
-            self.module = func.__module__
-            if inspect.isfunction(func):
-                argspec = getfullargspec(func)
-                for a in ('args', 'varargs', 'varkw', 'defaults', 'kwonlyargs',
-                          'kwonlydefaults', 'annotations'):
-                    setattr(self, a, getattr(argspec, a))
-                for i, arg in enumerate(self.args):
-                    setattr(self, 'arg%d' % i, arg)
-                self.signature = inspect.formatargspec(
-                    formatvalue=lambda val: "", *argspec)[1:-1]
-                allargs = list(self.args)
-                if self.varargs:
-                    allargs.append('*' + self.varargs)
-                if self.varkw:
-                    allargs.append('**' + self.varkw)
-                try:
-                    self.shortsignature = ', '.join(allargs)
-                except TypeError: # exotic signature, valid only in Python 2.X
-                    self.shortsignature = self.signature
-                self.dict = func.__dict__.copy()
-        # func=None happens when decorating a caller
-        if name:
-            self.name = name
-        if signature is not None:
-            self.signature = signature
-        if defaults:
-            self.defaults = defaults
-        if doc:
-            self.doc = doc
-        if module:
-            self.module = module
-        if funcdict:
-            self.dict = funcdict
-        # check existence required attributes
-        assert hasattr(self, 'name')
-        if not hasattr(self, 'signature'):
-            raise TypeError('You are decorating a non function: %s' % func)
-
-    def update(self, func, **kw):
-        "Update the signature of func with the data in self"
-        func.__name__ = self.name
-        func.__doc__ = getattr(self, 'doc', None)
-        func.__dict__ = getattr(self, 'dict', {})
-        func.func_defaults = getattr(self, 'defaults', ())
-        callermodule = sys._getframe(3).f_globals.get('__name__', '?')
-        func.__module__ = getattr(self, 'module', callermodule)
-        func.__dict__.update(kw)
-
-    def make(self, src_templ, evaldict=None, addsource=False, **attrs):
-        "Make a new function from a given template and update the signature"
-        src = src_templ % vars(self) # expand name and signature
-        evaldict = evaldict or {}
-        mo = DEF.match(src)
-        if mo is None:
-            raise SyntaxError('not a valid function template\n%s' % src)
-        name = mo.group(1) # extract the function name
-        names = set([name] + [arg.strip(' *') for arg in 
-                             self.shortsignature.split(',')])
-        for n in names:
-            if n in ('_func_', '_call_'):
-                raise NameError('%s is overridden in\n%s' % (n, src))
-        if not src.endswith('\n'): # add a newline just for safety
-            src += '\n' # this is needed in old versions of Python
-        try:
-            code = compile(src, '<string>', 'single')
-            # print >> sys.stderr, 'Compiling %s' % src
-            exec code in evaldict
-        except:
-            print >> sys.stderr, 'Error in generated code:'
-            print >> sys.stderr, src
-            raise
-        func = evaldict[name]
-        if addsource:
-            attrs['__source__'] = src
-        self.update(func, **attrs)
-        return func
-
-    @classmethod
-    def create(cls, obj, body, evaldict, defaults=None,
-               doc=None, module=None, addsource=True,**attrs):
-        """
-        Create a function from the strings name, signature and body.
-        evaldict is the evaluation dictionary. If addsource is true an attribute
-        __source__ is added to the result. The attributes attrs are added,
-        if any.
-        """
-        if isinstance(obj, str): # "name(signature)"
-            name, rest = obj.strip().split('(', 1)
-            signature = rest[:-1] #strip a right parens            
-            func = None
-        else: # a function
-            name = None
-            signature = None
-            func = obj
-        self = cls(func, name, signature, defaults, doc, module)
-        ibody = '\n'.join('    ' + line for line in body.splitlines())
-        return self.make('def %(name)s(%(signature)s):\n' + ibody, 
-                        evaldict, addsource, **attrs)
-  
-def decorator(caller, func=None):
-    """
-    decorator(caller) converts a caller function into a decorator;
-    decorator(caller, func) decorates a function using a caller.
-    """
-    if func is not None: # returns a decorated function
-        evaldict = func.func_globals.copy()
-        evaldict['_call_'] = caller
-        evaldict['_func_'] = func
-        return FunctionMaker.create(
-            func, "return _call_(_func_, %(shortsignature)s)",
-            evaldict, undecorated=func)
-    else: # returns a decorator
-        if isinstance(caller, partial):
-            return partial(decorator, caller)
-        # otherwise assume caller is a function
-        first = inspect.getargspec(caller)[0][0] # first arg
-        evaldict = caller.func_globals.copy()
-        evaldict['_call_'] = caller
-        evaldict['decorator'] = decorator
-        return FunctionMaker.create(
-            '%s(%s)' % (caller.__name__, first), 
-            'return decorator(_call_, %s)' % first,
-            evaldict, undecorated=caller,
-            doc=caller.__doc__, module=caller.__module__)
diff --git a/Tools/PyCmt/python/pkgbuild/__init__.py b/Tools/PyCmt/python/pkgbuild/__init__.py
deleted file mode 100644
index c1bfa21d046107d9c577ce14783e954fdeb18860..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pkgbuild/__init__.py
+++ /dev/null
@@ -1,583 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# -*- python -*-
-# @file PyCmt/python/pkgbuild/__init__.py
-# @purpose a simple build system
-# @author Sebastien Binet <binet@cern.ch>
-
-from __future__ import with_statement
-
-__doc__ = "A simple build system"
-__author__ = "Sebastien Binet <binet@cern.ch>"
-__version__= "$Revision$"
-
-
-### imports -------------------------------------------------------------------
-import sys
-import os
-import os.path as osp
-import imp
-import inspect
-import re
-
-from PyCmt.Logging import logging
-
-### globals -------------------------------------------------------------------
-msg = logging.getLogger('PkgBuilder')
-msg.setLevel(logging.INFO)
-#msg.setLevel(logging.VERBOSE)
-
-# FIXME: should be more easily configurable
-_DO_RELOCATE = True
-#_DO_RELOCATE = False
-
-### utils ---------------------------------------------------------------------
-def relpath(path, start=osp.curdir):
-    """Return a relative version of a path"""
-
-    if not path:
-        raise ValueError("no path specified")
-
-    start_list = osp.abspath(start).split(osp.sep)
-    path_list = osp.abspath(path).split(osp.sep)
-
-    # Work out how much of the filepath is shared by start and path.
-    i = len(osp.commonprefix([start_list, path_list]))
-
-    rel_list = [osp.pardir] * (len(start_list)-i) + path_list[i:]
-    if not rel_list:
-        return osp.curdir
-    return osp.join(*rel_list)
-setattr(osp, 'relpath', relpath) # fwd-compat w/ 2.6
-del relpath
-
-def safe_symlink(src, dst):
-    """a safe version of os.symlink:
-    check if the destination `dst` exists (and remove it)
-    create a symbolic link pointing to `src` named `dst`
-    """
-    if osp.exists(dst):
-        os.remove(dst)
-    return os.symlink(src, dst)
-setattr(os, 'safe_symlink', safe_symlink)
-del safe_symlink
-
-def _remove(p, ignore_errors=False, onerror=None, msg=msg):
-    if not osp.exists(p):
-        return
-    msg.verbose("removing [%s]...", p)
-    import commands as com
-    sc,out = com.getstatusoutput("/bin/rm -rf %s" % p)
-    if sc:
-        msg.error(out)
-    """
-    if (not osp.isdir(p) or osp.islink(p)):
-        os.remove(p)
-    else:
-        import shutil
-        shutil.rmtree(p, ignore_errors=ignore_errors, onerror=onerror)
-    """
-    
-def _mkstemp(*args, **kwargs):
-    import tempfile
-    fd, fname = tempfile.mkstemp(*args, **kwargs)
-    import os
-    os.close(fd)
-    if os.path.exists(fname):
-        os.remove(fname)
-    return open(fname, 'w')
-
-def _mkdtemp(*args, **kwargs):
-    """wrapper for tempfile.mkdtemp to register the removal of the directory
-    """
-    import tempfile
-    dir_name = tempfile.mkdtemp(*args, **kwargs)
-    import atexit, shutil
-    ignore_errors = True
-    atexit.register(shutil.rmtree, dir_name, ignore_errors)
-    return dir_name
-
-def _uncompress(fname, outdir, msg=msg):
-    """uncompress the file `fname` under the directory `outdir`
-    """
-    import os
-    assert os.access(fname, os.R_OK), "could not access [%s]" % fname
-    fname = os.path.abspath(os.path.realpath(fname))
-    if not os.path.exists(outdir):
-        os.makedirs(outdir)
-    orig_dir = os.getcwd()
-    try:
-        os.chdir(outdir)
-        ext = os.path.splitext(fname)[1][1:] # drop the dot
-        if ext in ('gz', 'bz2'):
-            import tarfile
-            f = tarfile.open(fname, 'r:%s'%ext)
-            f.extractall()
-        else:
-            err = 'extension [%s] not handled (yet?)' % ext
-            msg.error(err)
-            raise ValueError(err)
-    finally:
-        os.chdir(orig_dir)
-
-def _cmt_to_autoconf(cmt):
-    """translate CMT macros, patterns and such into (a dict of) their
-    autoconf counterparts
-    """
-    f = cmt
-    def many(*args):
-        return ' '.join(args)
-    cmt = lambda x: f(macro_value=x)
-    
-    cfg_env = {
-        'LDFLAGS' : many(cmt('cpplinkflags'),
-                         cmt('cmt_installarea_linkopts'),
-                         ),
-        'LIBS':     cmt('use_linkopts'),
-        'CC':       cmt('cc'),
-        'compiler': cmt('cc'),
-        'gcc-version': cmt('gcc_config_version'),
-        # be more selective, set only if building for ICC or clang 'LD':       cmt('cc'),
-        'CFLAGS':   many(cmt('cflags'),
-                         cmt('cppflags'),
-                         cmt('pp_cppflags'),
-                         cmt('cppdebugflags')),
-        'CXX':      cmt('cpp'),
-        'CXXFLAGS': many(cmt('cppflags'),
-                         cmt('pp_cppflags'),
-                         cmt('cppdebugflags')),
-        'FC':       cmt('for'),
-        'FCFLAGS':  cmt('fflags'),
-
-        'CPPFLAGS': cmt('includes'),
-        }
-    if cfg_env['CC'].find ('clang')>=0 or cfg_env['CC'].find ('icc')>=0:
-        #cfg_env['LD']='ld'
-        cfg_env['LDSHARED']=cmt('cc') + ' -shared '
-
-    # use_linkopts introduces <package>_linkopts which may confuse 'autoconf'
-    pkg_name = cmt('package').strip()
-    pkg_linkopts = "%s_linkopts" % pkg_name
-    pkg_linkopts = cmt(pkg_linkopts)
-    if pkg_linkopts != '':
-        cfg_env['LIBS'] = cfg_env['LIBS'].replace(pkg_linkopts, ' ')
-    
-    # clean-up new-lines...:
-    # FIXME: be clever ? this might break embedded EOL...
-    for k in cfg_env:
-        cfg_env[k] = cfg_env[k].replace('\r\n', ' ')
-        cfg_env[k] = cfg_env[k].replace('\n', ' ')
-        cfg_env[k] = cfg_env[k].strip()
-        
-    # clean-up the various compiler options...
-    for compiler in ('CC', 'CXX', 'FC'):
-        cfg_env[compiler] = cfg_env[compiler].replace(
-            '-m32', '').strip()
-    cfg_env['CFLAGS'] = cfg_env['CFLAGS']\
-                        .replace("-Woverloaded-virtual ", " ")\
-                        .replace("-Wno-deprecated ", " ")\
-                        .replace("--ccache-skip ", " ")\
-                        .replace("-shared ", " ")\
-                        .replace("-std=c++11 ", " ")\
-                        .replace("`checker_gccplugins_args`", " ")
-
-    cfg_env['CXXFLAGS'] = cfg_env['CXXFLAGS']\
-                        .replace("-shared ", " ")\
-                        .replace("`checker_gccplugins_args`", " ")
-
-    cfg_env['CFLAGS'] = re.sub ('-fplugin[^ ]+', '', cfg_env['CFLAGS'])
-    cfg_env['CXXFLAGS'] = re.sub ('-fplugin[^ ]+', '', cfg_env['CXXFLAGS'])
-
-    # hack: remove -Werror as many 3rd-party packages won't compile with it
-    cfg_env['CFLAGS'] = cfg_env['CFLAGS']\
-                        .replace(" -Werror ", " ")
-
-    cfg_env['CXXFLAGS'] = cfg_env['CXXFLAGS']\
-                        .replace(" -Werror ", " ")
-    
-    # many C modules are buggy otherwise...
-    cfg_env['CFLAGS']  += " -fno-strict-aliasing"
-    cfg_env['FCFLAGS'] += " -fno-strict-aliasing"
-    cfg_env['CXXFLAGS']+= " -fno-strict-aliasing"
-
-    host_arch = 'x86_64' if 'x86_64' in os.environ['CMTCONFIG'] else 'i686'
-    host_plat = 'none'
-    if 'linux' in sys.platform:
-        host_plat = 'linux'
-    elif 'darwin' in sys.platform:
-        host_plat = 'darwin'
-    else:
-        pass
-    host = '%s-unknown-%s-%s' % (host_arch, host_plat, 'gnu')
-    cfg_env['pkg_host_triple'] = host
-
-    if 'darwin' in sys.platform:
-        for k in ('CFLAGS', 'CXXFLAGS'):
-            cfg_env[k] = cfg_env[k].replace(' -bundle ', ' ')
-            
-    # FIXME: HACK !!
-    cfg_env['LDFLAGS'] = cfg_env['LDFLAGS'].replace(
-        "-Wl,--as-needed", "").replace(
-        "-Wl,--no-undefined", "")
-    cfg_env['LIBS'] = cfg_env['LIBS'].replace(
-        "-Wl,--as-needed", "").replace(
-        "-Wl,--no-undefined", "")
-
-    # FIXME
-    # another hack: distcc may disturb some autoconf pkgs
-    # => disable it by default
-    cfg_env['CC'] = cfg_env['CC'].replace('distcc', '').strip()
-    cfg_env['CXX']= cfg_env['CXX'].replace('distcc','').strip()
-    cfg_env['FC'] = cfg_env['FC'].replace('distcc', '').strip()
-    cfg_env['compiler'] = cfg_env['compiler'].replace('distcc', '').strip()
-    
-    # Move any extra arguments.
-    def move_args (compiler, flags):
-        l = cfg_env[compiler].split()
-        if len(l) > 1:
-            cfg_env[flags] += ' ' + ' '.join(l[1:])
-            cfg_env[compiler] = l[0]
-        return
-    move_args ('CC', 'CFLAGS')
-    move_args ('compiler', 'CFLAGS')
-    move_args ('CXX', 'CXXFLAGS')
-    #move_args ('LD', 'LDFLAGS')
-    
-    cfg_env['F77'] = cfg_env['FC']
-    cfg_env['FFLAGS'] = cfg_env['FCFLAGS']
-    
-    # sanitize the CPPFLAGS
-    cfg_env['CPPFLAGS'] = cfg_env["CPPFLAGS"].replace('"','')
-
-    # sanitize LIBS: remove the <pkg>_linkopts
-    cfg_env['LIBS'] = cfg_env['LIBS'].replace(cmt('use_linkopts'), '').strip()
-
-    # remove C++-stuff from CFLAGS
-    # this is b/c we include CMT-'cppflags' into CFLAGS
-    # (but that's b/c the CMT-'cflags' isnt exhaustive...)
-    cfg_env['CFLAGS'] = cfg_env['CFLAGS'].replace(' -include cstdio ',' -include stdio.h ')
-
-    return cfg_env
-
-import contextlib
-@contextlib.contextmanager
-def _dir_restore(destdir, origdir=None):
-    if origdir is None:
-        origdir = os.getcwd()
-    os.chdir(destdir)
-    yield
-    os.chdir(origdir)
-
-def cpu_count():
-    try:
-        import multiprocessing as mp
-        return mp.cpu_count()
-    except Exception, err:
-        return 2
-    
-def build_package(fname, env=None, msg=msg):
-    msg.debug('building [%s]...', fname)
-
-    if env is None:
-        env = {}
-        
-    def plugin_filter(obj):
-        if inspect.isfunction(obj):
-            return obj.__name__ in ('configure', 'build', 'install')
-
-    pkg_infos = {}
-    configure_impl = lambda x: 0
-    build_impl = lambda x: 0
-    install_impl = lambda x: 0
-    
-    with open(fname, 'r') as plugin:
-        module = imp.load_source(osp.splitext(osp.basename(plugin.name))[0],
-                                 plugin.name,
-                                 plugin)
-        fcts = inspect.getmembers(module, plugin_filter)
-        assert (not fcts is None)
-
-        fct = [fct[1] for fct in fcts if fct[0] == 'configure']
-        if fct:
-            configure_impl = fct.pop(0)
-
-        # mandatory !
-        fct = [fct[1] for fct in fcts if fct[0] == 'build']
-        build_impl = fct.pop(0)
-
-        fct = [fct[1] for fct in fcts if fct[0] == 'install']
-        if fct:
-            install_impl = fct.pop(0)
-
-        pkg_infos = dict((k,v)
-                         for k,v in inspect.getmembers(module)
-                         if k.startswith('pkg_'))
-        pkg_infos['pkg_root'] = env.get('pkg_root', osp.dirname(fname))
-        pass
-
-    msg.debug('pkg_infos: %s', pkg_infos)
-    pkg = PkgBuilder(pkg=pkg_infos, env=env, msg=msg)
-    pkg.configure_impl = configure_impl.__get__(pkg)
-    pkg.build_impl     = build_impl.__get__(pkg)
-    pkg.install_impl   = install_impl.__get__(pkg)
-    sc = pkg.pkg_build()
-    return sc
-
-### classes -------------------------------------------------------------------
-
-class PkgBuilder(object):
-    """
-    """
-
-    def __init__(self, pkg, env=None, shell=os, msg=msg):
-        self.pkg_infos = pkg.copy()
-        self.pkg_name  = pkg['pkg_name']
-        self.pkg_ver   = pkg['pkg_ver']
-        self.pkg_src   = pkg['pkg_src']
-
-        self.pkg_install_dir = pkg['pkg_install_dir']
-        self.pkg_dest_dir    = pkg['pkg_install_dir'] # not a typo
-        self.pkg_installarea_dir = pkg['pkg_installarea_dir']
-        
-        self.pkg_build_dir   = osp.join(pkg['pkg_root'],
-                                        env['CMTCONFIG'],
-                                        'pkg-build-%s' % self.pkg_name)
-        
-        import PyCmt.Cmt as Cmt
-        self._cmt = Cmt.CmtWrapper()
-        self.msg = msg
-
-        self.sh = shell
-        self._orig_dir = self.sh.getcwd()
-
-        self.env = env.copy() if isinstance(env, dict) else {}
-        for k,v in self.pkg_infos.iteritems():
-            self.env[k] = v
-        self.env['pkg_install_dir'] = self.pkg_install_dir
-        self.env['pkg_build_dir']   = self.pkg_build_dir
-        self.env['pkg_dest_dir']    = self.pkg_dest_dir
-        
-        get = self.cmt
-        self.env['CMTINSTALLAREA'] = get(macro_value='CMTINSTALLAREA')
-        self.env['tag'] = get(macro_value='tag')
-        
-        self.env.update(_cmt_to_autoconf(self.cmt))
-        
-       
-        for k in self.env:
-            if k.startswith('pkg_'):
-                self.msg.debug('expanding [%s] => [%s]', k, self[k])
-                setattr(self, k, self[k])
-                
-
-    def _prepare_relocate(self):
-        """helper method to modify variables to support relocate-able
-        installations"""
-
-        if osp.exists(self.pkg_dest_dir):
-            _remove(self.pkg_dest_dir)
-        os.makedirs(self.pkg_dest_dir)
-        self.msg.debug('pkg-install-dir: %s', self.pkg_install_dir)
-        self.msg.debug('pkg-dest-dir:    %s', self.pkg_dest_dir)
-        return
-    
-    def _relocate(self):
-        verbose = self.msg.verbose
-        pkg_install_dir = self.pkg_installarea_dir
-        
-        verbose("relocating from [%s] to [%s]...",
-                self.pkg_dest_dir,
-                pkg_install_dir)
-        import shutil, glob
-        tmp_root = self.pkg_dest_dir # + pkg_install_dir
-        to_relocate = []
-        for root, dirs, files in os.walk(tmp_root):
-            for f in files:
-                f = osp.join(root, f)
-                _relpath = osp.relpath(f, tmp_root)
-                #verbose(" --> [%s]", _relpath)
-                to_relocate.append(_relpath)
-        for f in to_relocate:
-            dest = osp.join(pkg_install_dir, f)
-            verbose("[%s] --> [%s]", f, dest)
-            _remove(dest, ignore_errors=True)
-            if not osp.exists(osp.dirname(dest)):
-                os.makedirs(osp.dirname(dest))
-            src = osp.join(tmp_root,f)
-            delta_dir = osp.relpath(osp.dirname(src),
-                                    osp.dirname(osp.realpath(dest)))
-            rel_src = osp.join(delta_dir, osp.basename(src))
-            verbose("--> symlink: [%s]", src)
-            verbose("    symlink: [%s]", rel_src)
-            verbose(" delta:      [%s]", delta_dir)
-            verbose("    dest:    [%s]", dest)
-            with _dir_restore(osp.dirname(dest)):
-                try:
-                    os.remove(dest)
-                except OSError:
-                    pass
-                try:
-                    os.symlink(rel_src,
-                               osp.basename(dest))
-                except OSError, err:
-                    info("could not symlink [%s]:\n%s", dest, err)
-                    pass
-            if dest.endswith('.la'):
-                pass
-        return
-    
-    def run(self, cmd, *args, **kwds):
-        if 'PKGBUILD_VERBOSE' in self.env:
-            stdout = sys.stdout
-        else:
-            stdout = self._build_log
-        import subprocess as sub
-        import functools
-        run = sub.check_call
-        #run = sub.call
-        run = functools.partial(
-            run,
-            stdout=stdout,
-            stderr=stdout,
-            env=self.env,
-            *args, **kwds
-            )
-        if isinstance(cmd, str):
-            cmd = cmd.split()
-        self.msg.debug("==> [%s]", ' '.join(cmd))
-        try:
-            return run(cmd)
-        except sub.CalledProcessError, err:
-            self.msg.error('problem executing %s', err.cmd)
-            if stdout != sys.stdout:
-                self.msg.error('dumping build log:')
-                print >> sys.stdout, "="*80
-                stdout.flush()
-                for l in open(stdout.name):
-                    print >> sys.stdout, l,
-                print >> sys.stdout, "="*80
-            raise
-
-    def _eval(self, name, env=None):
-        if env is None:
-            env = self.env
-        v= self.env[name] % env
-        self.env[name] = v
-        return v
-
-    def __getitem__(self, n):
-        return self._eval(n)
-    
-    def cmt(self, *args, **kwds):
-        cmtdir = osp.join(self.env['pkg_root'],'cmt')
-        with _dir_restore(cmtdir):
-            return self._cmt.show(*args, **kwds)
-        
-    def pkg_build(self):
-        """the main kitchen-sink method
-        """
-        msg = self.msg
-        msg.info('building [%s-%s]... (%s)',
-                 self.pkg_name,
-                 self.pkg_ver,
-                 self.env['CMTCONFIG'])
-        msg.debug('build-dir: [%s]', self.pkg_build_dir)
-        msg.debug('install: [%s]', self.pkg_install_dir)
-        
-        _build_done = osp.join(osp.dirname(self.pkg_build_dir),
-                               'pkg-build-%(pkg_name)s.done' % self.env)
-
-        if not osp.exists(_build_done):
-
-            import time
-            start = time.asctime()
-            self.pre_build()
-            self.build()
-            self.post_build()
-            end   = time.asctime()
-
-            with open(_build_done, 'w') as f:
-                f.write('start: %s\n' % start)
-                f.write('done:  %s\n' % end)
-                f.flush()
-                pass
-
-        msg.debug('building [%s-%s]... (%s) [done]',
-                  self.pkg_name,
-                  self.pkg_ver,
-                  self.env['CMTCONFIG'])
-        return 0
-
-    def pre_build(self):
-        cmtconfig = self.env['CMTCONFIG']
-        assert cmtconfig != ''
-
-        pkg_install_dir = self.pkg_install_dir
-        # here we should get a snapshot of directory's content
-        if osp.exists(self.pkg_install_dir):
-            _remove(self.pkg_install_dir, ignore_errors=True)
-            self.msg.verbose('removed [%s]', self.pkg_install_dir)
-        else:
-            self.msg.verbose('no such dir [%s]', self.pkg_install_dir)
-            
-        self.sh.makedirs(self.pkg_install_dir)
-
-        # clean-up 'pkg-build-myname'
-        if osp.exists(self.pkg_build_dir):
-            _remove(self.pkg_build_dir, ignore_errors=True)
-            self.msg.verbose('removed [%s]', self.pkg_build_dir)
-        else:
-            self.msg.verbose('no such dir [%s]', self.pkg_build_dir)
-            
-        self.sh.makedirs(self.pkg_build_dir)
-        self.sh.chdir(self.pkg_build_dir)
-
-        _build_log = osp.join(osp.dirname(self.pkg_build_dir),
-                              'pkg-build-%(pkg_name)s.log' % self.env)
-        self._build_log = open(_build_log, 'a')
-        self.msg.debug('logging build into [%s]', self._build_log.name)
-
-        if _DO_RELOCATE:
-            self._prepare_relocate()
-        return
-
-    def build(self):
-        self.fetch_src()
-        self.configure_impl()
-        self.build_impl()
-        self.install_impl()
-        return 0
-    
-    def post_build(self):
-        if _DO_RELOCATE:
-            self._relocate()
-        # if we are here, then everything succeeded: remove temporary stuff
-        sh = self.sh
-        sh.chdir(self._orig_dir)
-        import shutil
-        shutil.rmtree(self.pkg_build_dir)
-        self._build_log.flush()
-        self._build_log.close()
-        sh.remove(self._build_log.name)
-        return
-
-    def fetch_src(self):
-        msg = self.msg
-        pkg_src = self.env['pkg_src']
-
-        if osp.isfile(pkg_src):
-            # may raise
-            os.symlink(pkg_src,
-                       osp.join(self.pkg_build_dir, osp.basename(pkg_src)))
-
-            msg.debug('uncompressing [%s]...', pkg_src)
-            _uncompress(pkg_src, self.sh.getcwd(), msg=msg)
-        elif osp.isdir(pkg_src):
-            # pkg_src is a directory holding the actual sources
-            import shutil
-            shutil.copytree(
-                pkg_src,
-                osp.join(self.pkg_build_dir, osp.basename(pkg_src)))
-        return
-    
-
diff --git a/Tools/PyCmt/python/pkgbuild/cmmi.py b/Tools/PyCmt/python/pkgbuild/cmmi.py
deleted file mode 100644
index 4f97e4a2ad914ceb43f79f46bcd8e2de8d07e5fd..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pkgbuild/cmmi.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# a set of defaults for configure-make-makeinstall packages
-
-import os
-import os.path as osp
-
-from PyCmt.pkgbuild import cpu_count
-
-pkg_name = "<not there>"
-pkg_ver  = "0.0"
-pkg_src  = "%(pkg_root)s/src/%(pkg_name)s-%(pkg_ver)s.tar.gz"
-pkg_installarea_dir = "%(CMTINSTALLAREA)s/%(CMTCONFIG)s"
-pkg_install_dir = "%(pkg_root)s/%(CMTCONFIG)s/pkg-build-install-%(pkg_name)s"
-
-def configure(self):
-    sh  = self.sh
-    msg = self.msg
-    env = self.env
-
-    msg.debug('configure...')
-    sh.chdir("%(pkg_build_dir)s/%(pkg_name)s-%(pkg_ver)s" % env)
-
-    cmd = [
-        "./configure",
-        "--prefix=%(pkg_install_dir)s" % env,
-        "--host=%(pkg_host_triple)s" % env
-        ]
-    self.run(cmd)
-
-def build(self):
-    sh  = self.sh
-    msg = self.msg
-    env = self.env
-
-    msg.debug('make...')
-    sh.chdir("%(pkg_build_dir)s/%(pkg_name)s-%(pkg_ver)s" % env)
-
-    cmd = "make -j%i" % cpu_count()
-
-    self.run(cmd)
-    
-def install(self):
-    sh  = self.sh
-    msg = self.msg
-    env = self.env
-
-    msg.debug('make install...')
-    sh.chdir("%(pkg_build_dir)s/%(pkg_name)s-%(pkg_ver)s" % env)
-
-    cmd = "make install"
-    self.run(cmd)
-    
diff --git a/Tools/PyCmt/python/pkgbuild/distutils_support.py b/Tools/PyCmt/python/pkgbuild/distutils_support.py
deleted file mode 100644
index 8ef929163eb22364e8dc0336c5a3cd6e75941270..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pkgbuild/distutils_support.py
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# a set of defaults for distutils-based packages
-
-import os
-import os.path as osp
-
-from PyCmt.pkgbuild import cpu_count
-
-# fix-up distutils, see bug #51501
-import platform
-if platform.architecture()[0] == '32bit':
-    import distutils.sysconfig as ds
-    ds.get_config_vars()['CFLAGS'] += ' -m32'
-    ds.get_config_vars()['LDSHARED'] += ' -m32'
-del platform
-
-import sys
-python_config_version = "%i.%i" % sys.version_info[:2]
-
-pkg_name = "<not there>"
-pkg_ver  = "0.0"
-pkg_src  = "%(pkg_root)s/src/%(pkg_name)s-%(pkg_ver)s.tar.gz"
-pkg_installarea_dir = "%(CMTINSTALLAREA)s/%(CMTCONFIG)s"
-pkg_install_dir = "%(pkg_root)s/%(CMTCONFIG)s/pkg-build-install-%(pkg_name)s"
-
-def configure(self):
-    sh  = self.sh
-    msg = self.msg
-    env = self.env
-
-    env['F77']= env['FC']
-    env['LDFLAGS'] += " ".join([self.cmt(macro_value="Python_linkopts"),
-                               "-shared"])
-
-    if 'darwin' in sys.platform:
-        env['LDFLAGS'] = env['LDFLAGS'].replace('-shared', '')
-
-    # FIXME
-    # setup.py does not honour the cross-compilation
-    # correctly, at least at link time...
-    if '-m32' in self.cmt(macro_value='cppflags'):
-        env['CC'] += ' -m32'
-        env['CXX'] += ' -m32'
-        pass
-
-    #env['CFLAGS'] += ' -std=c99'
-    
-    msg.debug('configure...')
-    sh.chdir("%(pkg_build_dir)s/%(pkg_name)s-%(pkg_ver)s" % env)
-
-    includes = self.cmt(macro_value="includes")
-    ppcmd = self.cmt(macro_value="ppcmd")
-    includes = [inc.strip() for inc in includes.split(ppcmd) if inc.strip()]
-    includes = ":".join(includes).replace('"','')
-    env['includes'] = includes
-
-    from textwrap import dedent
-    site_cfg = open("site.cfg", "a")
-    site_cfg.write(dedent("""\
-    [DEFAULT]
-    library_dirs = %(LD_LIBRARY_PATH)s:/usr/lib:/lib
-    include_dirs = %(includes)s
-    fcompiler    = %(FC)s
-    
-    """ % env))
-    site_cfg.flush()
-    site_cfg.close()
-    del site_cfg
-    return
-
-def build(self):
-    sh  = self.sh
-    msg = self.msg
-    env = self.env
-
-    # for python-eggs
-    import os.path as osp
-    os.environ['PYTHON_EGG_CACHE'] = osp.join(
-        "%(pkg_build_dir)s/%(pkg_name)s-%(pkg_ver)s"%env,
-        '.python-eggs'
-        )
-
-    msg.debug('build...')
-    sh.chdir("%(pkg_build_dir)s/%(pkg_name)s-%(pkg_ver)s" % env)
-
-    cmd = [
-        "python",
-        "setup.py",
-        "build"
-        ]
-    self.run(cmd)
-
-def install(self):
-    sh  = self.sh
-    msg = self.msg
-    env = self.env
-
-    msg.debug('install...')
-    sh.chdir("%(pkg_build_dir)s/%(pkg_name)s-%(pkg_ver)s" % env)
-
-    platlib = "%(pkg_install_dir)s/lib/python" % env + \
-                   python_config_version
-    purelib = "%(pkg_install_dir)s/lib/python" % env + \
-                   python_config_version
-    bindir  = "%(pkg_install_dir)s/bin" % env
-
-    import os
-    for d in (platlib, purelib, bindir):
-        if not os.path.exists(d):
-            os.makedirs(d)
-            
-    cmd = [
-        "python",
-        "setup.py",
-        "install",
-        "--force",
-        "--root=%(pkg_install_dir)s" % env,
-        ## '--install-platlib=%s' % platlib,
-        ## '--install-purelib=%s' % purelib,
-        ## '--install-scripts=%s' % bindir,
-        '--install-platlib=lib/python%s' % python_config_version,
-        '--install-purelib=lib/python%s' % python_config_version,
-        '--install-scripts=bin',
-        '--install-data=lib/python%s' % python_config_version,
-        ]
-    self.run(cmd)
-    
diff --git a/Tools/PyCmt/python/pyshell/__init__.py b/Tools/PyCmt/python/pyshell/__init__.py
deleted file mode 100644
index be36a837d2e2a018b34ef03b5bfa06ce41e9cda2..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pyshell/__init__.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-#
-
-"""Shell execution environments for programs to play in"""
-
-__all__ = [
-    'LocalShell',
-    'utils'
-    ]
-
-from .localshell import LocalShell
-from . import utils
-
diff --git a/Tools/PyCmt/python/pyshell/basicshell.py b/Tools/PyCmt/python/pyshell/basicshell.py
deleted file mode 100644
index 31963c871b02b3fa757765860a68713826c7ea92..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pyshell/basicshell.py
+++ /dev/null
@@ -1,281 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file: pyshell/basicshell.py
-
-"""Talk programmatically to a shell, via a pseudo-terminal"""
-
-import os, re, sys, thread, time
-import pty, select
-import logging
-
-import vt100
-import utils as shell_utils
-
-### data ----------------------------------------------------------------------
-__all__ = [
-    'BasicShell',
-    'wait_for_pattern',
-    ]
-
-msg = logging.getLogger ('basicshell')
-if len(msg.handlers)==0:
-    logging.basicConfig()
-
-PROMPT     = '_PY_SHELL_'
-SHELLLIST  = ['csh', 'sh']
-SLEEPTIME  = 0.01
-PCTIMEOUT  = 0.05
-USRTIMEOUT = 10.
-
-### read loops ----------------------------------------------------------------
-def wait_for_pattern (fd, timeout, patterns=None, initial_data=''):
-    """read data from file descriptor `fd` as it becomes available.
-    process it and search for matches among `patterns`.
-    return on `timeout` (in seconds) or when a pattern is found.
-    some `initial_data` on which to start searching may be given.
-
-    return (<residual data>, <found pattern>)
-    """
-
-    if patterns is None:
-        patterns = []
-
-    lapsed_time = 0.
-    data = initial_data
-
-    while 1:
-        # look for any data if no patterns are provided
-        if not patterns and 1<len(vt100.filter(data)): # allow for a newline
-            return data, None
-        elif data:
-            # scan for requested patterns in the data
-            for pattern in patterns:
-                pos = data.find(pattern)
-                if 0<=pos:
-                    return data[pos+len(pattern)+1:], pattern # found a pattern
-
-        # look for non-blocking reads
-        rfds, wfds, xfds = select.select ([fd, 0], [], [], PCTIMEOUT)
-        if fd in rfds:
-            data = data + os.read (fd, 1024)                  # safe read
-        else:
-            # check for timeout
-            lapsed_time = lapsed_time + PCTIMEOUT + SLEEPTIME
-            if timeout <= lapsed_time:
-                raise OSError, 'timed out while waiting for data (fd=%d)'%fd
-
-            # wait a bit
-            time.sleep (SLEEPTIME)
-
-def _read_dispatch_loop (fd, shell, alt_prompt='', initial_data=''):
-    """read data from file descriptor `fd` as it becomes available.
-    process it and send it to `shell` for output.
-    when a magic prompt (or alternative `alt_prompt` is encountered, `shell` is
-    unlocked. Some `initial_data` on which to start feeding the output may be
-    given.
-    """
-
-    prompt = PROMPT
-    if alt_prompt:
-        prompt += '|'+alt_prompt
-    promptrex = re.compile (prompt)
-
-    try:
-        data, cmd_absorbed = initial_data, 0
-
-        while 1:
-            rfds, wfds, xfds = select.select ([fd, 0], [], [], PCTIMEOUT)
-
-            if fd in rfds:
-                data = data + os.read (fd, 1024)
-
-                eolpos = data.find('\n')
-                while 0 <= eolpos:
-                    # pre-process the line
-                    line = vt100.filter (data[:eolpos])
-
-                    # special care for command lines
-                    res = promptrex.match (line)
-                    if not res:
-                        shell.output (line+os.linesep)
-                    else:
-                        shell.command (line[len(res.group()):])
-                        cmd_absorbed = 1
-                        
-                    # data leftover and new end of line position
-                    data = data[eolpos+1:]
-                    eolpos = data.find ('\n')
-
-                # outside line loop, scan for prompt (as start for new input)
-                line = vt100.filter (data)
-                if line and cmd_absorbed:
-                    res = promptrex.match (line)
-                    if res:
-                        prp = res.group()
-                        # allow for prompt printing
-                        shell.prompt (prp)
-                        shell.lock.release()
-
-                        # put the prompt back for command absorbtion
-                        data, cmd_absorbed = prp, 0
-            else:
-                time.sleep (SLEEPTIME)
-
-    except: #ok on exit, for debugging otherwise
-        try:
-            import traceback
-            traceback.print_exc()
-        except ImportError:
-            pass
-
-### abstract base class for shells --------------------------------------------
-class BasicShell (object):
-    """Base class for shells.
-
-    Subclasses need to implement prompt(self, prompt) and write(self, text)
-    """
-
-    # setup shell and read loop
-    def __init__ (self, master_fd, child_pid, alt_prompt):
-        # save file descriptor and process id
-        self.master_fd = master_fd
-        self.child_pid = child_pid
-
-        # allow only one process at a time
-        self.lock = thread.allocate_lock()
-
-        # no wrapped echo until reading starts
-        self.echo = 0
-        self.bug  = ''    # output buffer
-
-        # guess shell type
-        msg.debug ('guessing shell family...')
-        os.write (self.master_fd, 'echo $0\n')
-        try:
-            shellc = wait_for_pattern (self.master_fd, USRTIMEOUT, SHELLLIST)
-        except OSError, e:
-            msg.debug ('for shell testing: %s', e)
-            shellc = ('', 'bash')        # gambling...
-        msg.debug ('choosing [%s] shell family', shellc[1])
-
-        # set prompt
-        msg.debug ('setting magic prompt...')
-        if shellc[1] == 'csh':
-            self._shellc = 'c'
-            os.write (self.master_fd,
-                      'set prompt=%s\nexport TERM=vt100; echo $TERM\n'%PROMPT)
-        else:
-            self._shellc = ''
-            os.write (self.master_fd,
-                      'export PS1=%s\nexport TERM=vt100; echo $TERM\n'%PROMPT)
-
-        # empty buffer, there may or may not be a command echo
-        try:
-            data = '', None
-            while data[1] != 'vt100':
-                data = wait_for_pattern (self.master_fd, USRTIMEOUT,
-                                         patterns=['=vt100', 'vt100'],
-                                         initial_data=data[0])
-        except OSError, e:
-            msg.debug ('for command echo: %s', e)
-                
-        # remove leading new-lines
-        data = data[0].lstrip()
-
-        # start reading continuously
-        msg.debug ('setup done, firing up dispatch loop...')
-        self.echo = 1
-        thread.start_new_thread (_read_dispatch_loop,
-                                 (self.master_fd, self, alt_prompt, data))
-        msg.debug ('basic shell properly initialized')
-
-    # logout on destruction
-    def __del__ (self):
-        self._exec ('exit')
-
-    def _exec (self, cmd):
-        """execute a command"""
-        while not self.lock.acquire (0):
-            time.sleep (SLEEPTIME)
-        os.write (self.master_fd, cmd+os.linesep)
-        
-    def _wait_lock (self):
-        """wait for the lock to become available"""
-        while self.lock.locked():
-            self.while_waiting()
-
-    def set_echo (self, onoff):
-        """output control"""
-        self.echo = not not onoff
-
-    def reset_buffer (self):
-        self.buf = ''
-
-    @property
-    def buffer (self):
-        return self.buf
-
-    def output (self, data):
-        """dump output"""
-        if self.echo:
-            self.write (data)
-        else:
-            self.buf = self.buf + data
-
-    def system (self, cmd):
-        """execute a command and return the status code.
-        Similar to `os.system()`, except that there is no subshell
-        """
-
-        # execute the command and wait for it to be done
-        self._exec (cmd)
-        self._wait_lock()
-
-        if not self.interactive:
-            # retrieve status code for shell
-            echo, buf = self.echo, self.buf
-            self.echo, self.buf = 0, ''
-            self._exec ('echo $?')
-            self._wait_lock()
-
-            try:
-                status = int (self.buf)
-            except ValueError:
-                msg.debug ('process exit status can not be determined')
-                status = -1
-
-            self.echo = echo
-            self.buf  = buf
-        else:
-            # no way of really knowing...
-            status = 0
-            
-        # clean-up any waiting taskes
-        self.stop_waiting()
-
-        # done
-        return status
-
-    def while_waiting (self):
-        """wait processing"""
-        pass
-
-    def stop_waiting (self):
-        pass
-
-    @property
-    def shellc (self):
-        """return 'c' for csh or '' for bash (or equiv.)"""
-        return self._shellc
-
-    def source (self, script, args=''):
-        """source environment settings from `script`.
-        If `shell` is `os`, then an optional environment `env` can be given.
-        
-        return 0: all ok
-        return 1: `script` can not be located
-        return 2: sourcing of `script` failed
-        """
-        return shell_utils.source (script, shell=self, args=args)
-    
-            
diff --git a/Tools/PyCmt/python/pyshell/localshell.py b/Tools/PyCmt/python/pyshell/localshell.py
deleted file mode 100644
index cd536153d6c5030ff1a895966e9a6a4d7c22f56a..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pyshell/localshell.py
+++ /dev/null
@@ -1,249 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file: pyshell/localshell.py
-
-"""Talk programmatically to a local shell, via pseudo-terminal"""
-
-# stdlib imports
-import os, pty, sys
-import logging
-
-# project imports
-import basicshell
-
-### data ----------------------------------------------------------------------
-__all__ = [
-    'LocalShell',
-    ]
-msg = logging.getLogger ('LocalShell')
-if len(msg.handlers) == 0:
-    logging.basicConfig()
-
-### helpers -------------------------------------------------------------------
-class _EnvMapping (object):
-    """helper class to get and put environment variables"""
-    def __init__ (self, sh):
-        self.shell = sh
-    def __getitem__ (self, key):
-        value = self.shell.getenv (key)
-        if not value:
-            raise KeyError, key
-        return value
-    def __setitem__ (self, key, value):
-        self.shell.putenv (key, value)
-    def has_key (self, key):
-        try:
-            return not not self.shell.getenv (key)
-        except KeyError:
-            return False
-    def items (self):
-        d = {}
-        sc, out = self.shell.getstatusoutput ('env')
-        if sc:
-            return d
-        import re
-        pat = re.compile (r'(?P<EnvKey>.*?)=(?P<EnvValue>.*)')
-        for l in out.splitlines():
-            if l.count('=') <= 0:
-                continue
-            m = re.match (pat, l)
-            if m is None:
-                print "::: [%s]"%l
-                raise RuntimeError ("err")
-            assert m is not None, "%s"%m
-            m = m.groupdict()
-            d[m['EnvKey']] = m['EnvValue']
-        return d
-    
-class _PathMapping (object):
-    """helper class to mimic os.path"""
-    def __init__ (self, sh):
-        self.shell = sh
-    def exists (self, path):
-        status, output = self.shell.getstatusoutput('/bin/ls -ld '+path)
-        return not status
-    def __getattr__ (self, name):
-        try:
-            msg.debug ('selecting [%s] from os.path...', name)
-            return os.path.__dict__[name]
-        except KeyError:
-            raise AttributeError, name
-
-### local shell class ---------------------------------------------------------
-class LocalShell (basicshell.BasicShell):
-    """implementation of a local programmatic shell.
-    """
-
-    def __init__ (self):
-        """setup shell and read loop"""
-
-        # start a working shell and connect through a pseudo-terminal
-        pid, fd = pty.fork()
-
-        if pid == 0:                                                # child
-            os.execv ('/bin/sh', ['sh'])
-
-        # maintain front process state
-        self.interactive = 0
-
-        # environmental control
-        self.environ = _EnvMapping (self)
-
-        # mimic os.path
-        self.path = _PathMapping (self)
-        
-        # base class setup
-        super (LocalShell, self).__init__ (fd, pid, r'\S+> ') # parent
-        #basicshell.BasicShell.__init__ (self, fd, pid, r'\S+> ') # parent
-
-
-        # store the current work directory
-        self.cwd = ''
-        self.getcwd()
-        
-
-    # skip commands
-    def command (self, cmd):
-        pass
-
-    def run (self, cmd, verbose=False):
-        """shorthand for `getstatusoutput` with check of status
-        """
-        if verbose:
-            sc = self.system (cmd)
-            if sc:
-                err = 'could not run [%s] (sc=%d)'%(cmd,sc)
-                msg.error (err)
-                raise RuntimeError (err)
-        else:
-            sc,out = self.getstatusoutput (cmd)
-            if sc:
-                err = 'could not run [%s]:\n%s'%(cmd,out)
-                msg.error (err)
-                raise RuntimeError (err)
-        pass
-
-    def prompt (self, prompt):
-        """manage multiple prompts"""
-        if prompt != basicshell.PROMPT:
-            self.interactive = 1
-        else:
-            self.interactive = 0
-
-    def write (self, text):
-        """dump output"""
-        sys.stdout.write (text)
-
-    def getcwd (self):
-        """get the current directory.
-        Similar to `os.getcwd()`
-        """
-
-        # this protects against programming errors, not against races
-        if not self.lock.locked():
-            stat, out = self.getstatusoutput ('pwd')
-            if stat != 0:
-                raise OSError, 'could not determine current directory'
-
-            self.cwd = out.strip()
-        return self.cwd
-
-    def chdir (self, dir):
-        """change the current working directory.
-        Similar to `os.chdir()`
-        """
-        if self.cwd == dir or not dir or self.interactive:
-            return
-
-        # preliminary reset of cef
-        if dir[0] != os.sep:
-            self.cwd = os.path.normpath (os.path.join(self.cwd, dir))
-        else:
-            self.cwd = dir
-
-        if self.system ('cd '+dir) != 0:
-            raise OSError, 'can\'t enter [%s]'%dir
-
-        # reset current working directory cache
-        self.getcwd()
-
-    def mkdir (self, dir):
-        """create `dir` in the current working directory.
-        Similar to `os.mkdir()`
-        """
-        if self.system ('mkdir -p '+dir) != 0:
-            raise OSError, 'can\'t create [%s]'%dir
-
-    def remove (self, fn):
-        """remove `fn` from the current working directory.
-        Similar to `os.remove()`
-        """
-        if self.system ('rm -f '+fn) != 0:
-            raise OSError, 'can\'t remove [%s]'%fn
-        
-    def symlink (self, src, dst):
-        """make a symlink to `src` named `dst`.
-        Similar to `os.symlink()`
-        """
-        if self.system ('/bin/ln -sf %s %s'%(src, dst)):
-            raise OSError, 'can\'t symlink [%s] as [%s]' % (src, dst)
-
-    def getenv (self, name):
-        """get an environment variable"""
-        stat, out = self.getstatusoutput ('echo $%s'%name)
-
-        # env may contain an error message if the envvar does not exist
-        if stat == 0:
-            return out.strip() # strip new line
-        return ''
-
-    def putenv (self, name, value):
-        """set an environment variable"""
-        if self.shellc == 'c':
-            status = self.system ('setenv %s %s' % (name, value))
-        else:
-            status = self.system ('export %s=%s' % (name, value))
-        return status
-
-    def unsetenv (self, name):
-        """remove an environment variable"""
-        if self.shellc == 'c':
-            status = self.system ('unsetenv '+name)
-        else:
-            status = self.system ('unset '+name)
-        return status
-
-    def getstatusoutput (self, cmd, *args, **kwd):
-        """execute a command and return its status and output as a tuple.
-        Similar to `commands.getstatusoutput()`
-        """
-
-        # turn echo off, start with a fresh output buff
-        self.set_echo (onoff=0)
-        self.reset_buffer()
-
-        # execute command, output will be collected in the buffer
-        status = self.system (cmd)
-
-        # done: copy buffer and reset
-        buf = self.buffer
-        self.set_echo (onoff=1)
-        self.reset_buffer()
-
-        return status, buf.strip()
-
-    # use `os` for all other shell functionalities
-    def __getattr__ (self, name):
-        try:
-            msg.debug ('selecting [%s] from os...', name)
-            return os.__dict__[name]
-        except KeyError:
-            raise AttributeError, name
-
-    def __eq__ (self, other):
-        return repr(self) == repr(other)
-    
-    
-##     def while_waiting (self):
-##         msg.debug ("waiting for lock...")
-        
diff --git a/Tools/PyCmt/python/pyshell/pyshell_unittest.py b/Tools/PyCmt/python/pyshell/pyshell_unittest.py
deleted file mode 100644
index 1c85d2f0cc35bed19f5e36523a6e5241e36e6c06..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pyshell/pyshell_unittest.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file: pyshell_unittest.py
-
-"""unit tests for pyshell"""
-
-import logging, os, unittest
-
-import utils
-import localshell
-
-### data ----------------------------------------------------------------------
-msg = logging.getLogger ('pyshell-test')
-if len(msg.handlers)==0:
-    logging.basicConfig()
-
-### registration --------------------------------------------------------------
-class ShellUtilsTestCase (unittest.TestCase):
-    def setUp (self):
-        pass
-
-    def tearDown (self):
-        pass
-
-    def test1_shell_family (self):
-        """retrieving shell family"""
-        sf = utils.shell_family (os)
-        self.assert_ (sf==utils.BASH or sf==utils.CSH)
-
-class LocalShellTestCase (unittest.TestCase):
-    def setUp (self):
-        self.sh = localshell.LocalShell()
-
-    def tearDown (self):
-        pass
-
-    def test1_navigation (self):
-        """directory navigation in local shell"""
-        self.sh.chdir ("/tmp")
-        self.assertEqual (self.sh.getcwd(), "/tmp")
-
-    def test2_command (self):
-        """programmatic access to a local shell"""
-        stat, out = self.sh.getstatusoutput ("/bin/ls")
-        self.assert_ (stat==0)
-        msg.debug ('shell output of ls in %s:\n%s',
-                   self.sh.getcwd(), out[:-1])
-
-## run test in standalone mode
-if __name__ == '__main__':
-    unittest.main()
-    
diff --git a/Tools/PyCmt/python/pyshell/shellcmd.py b/Tools/PyCmt/python/pyshell/shellcmd.py
deleted file mode 100644
index 042ed7498502155990c0e89207ec092d4a02a3a0..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pyshell/shellcmd.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file: pyshell/shellcmd.py
-
-import getpass, os, sys
-import pyshell.localshell as localshell
-
-class ShellCMD (localshell.LocalShell):
-    def ask_user (self, question):
-        return raw_input (question)
-
-    def password (self):
-        return getpass.getpass()
-
-    def command (self, text):
-        pass
-
-    def prompt (self):
-        pass
-
-    def write (self, text):
-        sys.stdout.write (text)
-        
diff --git a/Tools/PyCmt/python/pyshell/test-pyshell.py b/Tools/PyCmt/python/pyshell/test-pyshell.py
deleted file mode 100644
index 7fdc39591445717a7c2085e3591be30fd0f618a6..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pyshell/test-pyshell.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-import logging,user
-logging.RootLogger.root.setLevel (logging.DEBUG)
-
-import localshell as ls
-sh = ls.LocalShell()
diff --git a/Tools/PyCmt/python/pyshell/utils.py b/Tools/PyCmt/python/pyshell/utils.py
deleted file mode 100644
index 608c8850905253d5a3c6b88f313e63d334774126..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pyshell/utils.py
+++ /dev/null
@@ -1,147 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-
-# @file: pyshell/utils.py
-
-"""Unix shell information and utilities"""
-
-import logging, os, re
-from PyCmt.bwdcompat import subprocess
-
-### data ----------------------------------------------------------------------
-__all__ = [
-    'BASH', 'CSH',
-    'shell_family', 'shell_ext',
-    'source',
-    ]
-
-BASH = 'bash'
-CSH  = 'csh'
-
-msg = logging.getLogger ('shellutils')
-if len(msg.handlers)==0:
-    logging.basicConfig()
-
-### shell information ---------------------------------------------------------
-_shell_prog = {}
-def shell_name (shell=os):
-    """return name of the `shell`"""
-    key = repr (shell)
-    if not (key in _shell_prog):
-        p = shell.popen ('echo $0')
-        fullname = p.readlines()[0][:-1]
-        p.close()
-
-        # use of 'sh' is hopefully appropriate
-        if fullname in ('/bin/sh', 'sh', '$'):
-            if shell.path.islink ('/bin/sh'):
-                fullname = shell.readlink ('/bin/sh')
-
-        _shell_prog[key] = shell.path.basename (fullname)
-
-    return _shell_prog[key]
-
-_shell_family = {}
-def shell_family (shell=os):
-    """return the family of `shell` (either bash, csh or java)"""
-    key = repr (shell)
-    if not (key in _shell_family):
-        if re.search ('csh', shell_name (shell)): #'csh' or 'tcsh'
-            _shell_family[key] = CSH
-        else:
-            _shell_family[key] = BASH
-    return _shell_family[key]
-
-_shell_ext = {}
-def shell_ext (shell=os):
-    """return the extension for `shell`, based on family (.csh or .sh)"""
-    key = repr (shell)
-    if not (key in _shell_ext):
-        if shell_family (shell) == CSH:
-            _shell_ext[key] = '.csh'
-        else:
-            _shell_ext[key] = '.sh'
-    return _shell_ext[key]
-
-_shell_no_login_flag = {}
-def shell_no_login_flag (shell=os):
-    """return the flag that prevents running the login scripts
-    on shell startup"""
-    key = repr (shell)
-    if not (key in _shell_no_login_flag):
-        if shell_name(shell) == 'bash':
-            _shell_no_login_flag[key] = '--noprofile'
-        else:
-            _shell_no_login_flag[key] = '-f'
-    return _shell_no_login_flag[key]
-
-### env. variables ------------------------------------------------------------
-def is_defined (name, env = None):
-    """verify the definition of variable `name` in environment `env`.
-    return 0: no non-empty value associated with `name`
-    return 1: `name` is defined and non-empty
-    """
-    if env is None:
-        env = os.environ
-    try:
-        return not not env[name]
-    except KeyError:
-        return 0
-
-def expand (name, shell=os):
-    """return the expansion of `name` on the environment of `shell`"""
-    return shell.path.expanduser (shell.path.expandvars(name))
-
-### source a file into the shell environment ----------------------------------
-def source (script, shell=os, env=None, args=''):
-    """source environment settings from `script`.
-    If `shell` is `os`, then an optional environment `env` can be given.
-
-    return 0: all ok
-    return 1: `script` can not be located
-    return 2: sourcing of `script` failed
-    """
-    global msg
-    
-    script = expand (script, shell)
-    if not shell.path.exists (script):
-        script = script + shell_ext (shell)
-        if not shell.path.exists (script):
-            msg.debug ('script [%s] does not exist', script)
-            return 1
-
-    msg.debug ('sourcing [%s]', script)
-    if shell is os:
-        # the following executes on 'os'
-        stat, out = subprocess.getstatusoutput (
-            'source '+script+' '+args+' && env')
-        # verify success (note CMT workaround...)
-        if stat != 0 or len(out)==0 or out.find('No such file')>=0:
-            msg.debug ('sourcing of [%s] failed (code %d)\n%s',
-                       script, stat, shell.linesep.join(out.splitlines()))
-            return 2
-
-        out = re.split (shell.linesep, out)
-        envre = re.compile (r'(\S+)\s*=\s*(\S+)')
-
-        # modify the environment (the sub-shell has exited)
-        if env is None:
-            env = shell.environ
-
-        msg.debug ('setting environment variables...')
-        for o in out:
-            res = envre.search (o)
-            if res:
-                g = res.groups()
-                env[g[0]] = g[1]
-
-    else:
-        # don't know how shell actually behaves,
-        # just go for it and cross fingers
-        rc = shell.system ('source %s %s' % (script, args))
-        if rc:
-            return 2
-
-    return 0
-
-    
diff --git a/Tools/PyCmt/python/pyshell/vt100.py b/Tools/PyCmt/python/pyshell/vt100.py
deleted file mode 100644
index 235c9c1fddebc90c5ab1d7a82d40d532d8b1e76e..0000000000000000000000000000000000000000
--- a/Tools/PyCmt/python/pyshell/vt100.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# File: pyshell/vt100.py
-
-"""vt100 decoder"""
-
-## removal of escape sequences and the like
-
-def filter(line_p):
-    """
-    remove non-printable characters from line <line_p>
-    return a printable string.
-    """
-    line, i, imax = '', 0, len(line_p)
-    while i<imax:
-        ac = ord(line_p[i])
-        if (32<=ac<127) or ac in (9,10): # printable, \t, \n
-            line += line_p[i]
-        elif ac == 27:                   # remove coded sequences
-            i += 1
-            while i<imax and line_p[i].lower() not in 'abcdhsujkm':
-                i += 1
-        elif ac == 8 or (ac==13 and
-                         line and line[-1] == ' '): # backspace or EOL spacing
-            if line:
-                line = line[:-1]
-        i += 1
-    return line
diff --git a/Tools/PyJobTransforms/python/trfArgs.py b/Tools/PyJobTransforms/python/trfArgs.py
index 076ed01870e9f971b6791bb221ecb71b9da0cedd..5a15e09115d288aee63f6bcfb98c48052caf79ae 100644
--- a/Tools/PyJobTransforms/python/trfArgs.py
+++ b/Tools/PyJobTransforms/python/trfArgs.py
@@ -107,11 +107,15 @@ def addAthenaArguments(parser, maxEventsDefaultSubstep='first', addValgrind=True
                         help='Set AthenaMP to fork after processing N events (default is to fork immediately after '
                         'initialisation')
     parser.add_argument('--checkpoint', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg = False),
-                        group='Athena',
+                        metavar='BOOL', group='Athena',
                         help='Checkpoint mode active')
     parser.add_argument('--restart', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg = False),
                         group='Athena',
                         help='Full path to the checkpoint image')
+    parser.add_argument('--sharedWriter', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=False),
+                        metavar='BOOL', group='Athena',
+                        help='SharedWriter mode active')
+
     if addValgrind:
         addValgrindArguments(parser)
 
diff --git a/Tools/PyJobTransforms/python/trfExe.py b/Tools/PyJobTransforms/python/trfExe.py
index fe1cb6bae80265c462d2dbabf1f384f8bc765806..a636a3ce64509af2f1f7b54736586d3162446bdf 100755
--- a/Tools/PyJobTransforms/python/trfExe.py
+++ b/Tools/PyJobTransforms/python/trfExe.py
@@ -461,7 +461,7 @@ class logscanExecutor(transformExecutor):
         self._logFileName = None
 
     def preExecute(self, input = set(), output = set()):
-        self.estPreExeStart()
+        self.setPreExeStart()
         msg.info('Preexecute for %s' % self._name)
         if 'logfile' in self.conf.argdict:
             self._logFileName = self.conf.argdict['logfile'].value
@@ -1040,7 +1040,7 @@ class athenaExecutor(scriptExecutor):
             skipFileChecks=False
             if 'eventService' in self.conf.argdict and self.conf.argdict['eventService'].value:
                 skipFileChecks=True
-            athenaMPOutputHandler(self._athenaMPFileReport, self._athenaMPWorkerTopDir, outputDataDictionary, self._athenaMP, skipFileChecks)
+            athenaMPOutputHandler(self._athenaMPFileReport, self._athenaMPWorkerTopDir, outputDataDictionary, self._athenaMP, skipFileChecks, self.conf.argdict)
             for dataType in self._output:
                 if self.conf.dataDictionary[dataType].io == "output" and len(self.conf.dataDictionary[dataType].value) > 1:
                     self._smartMerge(self.conf.dataDictionary[dataType])
@@ -1871,11 +1871,9 @@ class tagMergeExecutor(scriptExecutor):
 ## @brief Archive transform - use tar
 class archiveExecutor(scriptExecutor):
 
-    def __init__(self, name = 'Archiver', exe = 'zip'):
-        super(archiveExecutor, self).__init__(name=name, exe=exe, memMonitor=False)
-
     def preExecute(self, input = set(), output = set()):
         self.setPreExeStart()
+        self._memMonitor = False
 
         if 'exe' in self.conf.argdict:
             self._exe = self.conf.argdict['exe']
@@ -1892,6 +1890,8 @@ class archiveExecutor(scriptExecutor):
                     pass
         elif self._exe == 'zip':
             self._cmd = [self._exe]
+            if 'compressionLevel' in self.conf.argdict:
+                self._cmd.append(self.conf.argdict['compressionLevel'])
             self._cmd.extend([self.conf.argdict['outputArchFile'].value[0]])
             if '.' not in self.conf.argdict['outputArchFile'].value[0]:
                 errmsg = 'Output filename must end in ".", ".zip" or ".anyname" '
diff --git a/Tools/PyJobTransforms/python/trfFileUtils-lite.py b/Tools/PyJobTransforms/python/trfFileUtils-lite.py
index d14783db1ba6b0e752ce11062a37fa13f2fdf914..6f32dd893af51dcf5fa999cb9cbef0750c8badc8 100644
--- a/Tools/PyJobTransforms/python/trfFileUtils-lite.py
+++ b/Tools/PyJobTransforms/python/trfFileUtils-lite.py
@@ -10,7 +10,7 @@
 import logging
 msg = logging.getLogger(__name__)
 
-#  @note Use the PyCmt forking decorator to ensure that ROOT is run completely within 
+#  @note Use the PyUtils forking decorator to ensure that ROOT is run completely within 
 #  a child process and will not 'pollute' the parent python process with unthread-safe
 #  bits of code (otherwise strange hangs are observed on subsequent uses of ROOT)
 import PyUtils.Decorators as _decos
@@ -201,7 +201,7 @@ def AthenaLiteFileInfo(filename, filetype, retrieveKeys = athFileInterestingKeys
 #  @return 
 #  - Number of events.
 #  - @c None if the determination failed.
-#  @note Use the PyCmt forking decorator to ensure that ROOT is run completely within 
+#  @note Use the PyUtils forking decorator to ensure that ROOT is run completely within 
 #  a child process and will not 'pollute' the parent python process with unthread-safe
 #  bits of code (otherwise strange hangs are observed on subsequent uses of ROOT)
 @_decos.forking
@@ -299,7 +299,7 @@ def HISTEntries(fileName):
 #  @return 
 #  - Number of entries.
 #  - @c None if the determination failed.
-#  @note Use the PyCmt forking decorator to ensure that ROOT is run completely within 
+#  @note Use the PyUtils forking decorator to ensure that ROOT is run completely within 
 #  a child process and will not 'pollute' the parent python process with unthread-safe
 #  bits of code (otherwise strange hangs are observed on subsequent uses of ROOT)
 @_decos.forking
@@ -349,7 +349,7 @@ def NTUPEntries(fileName, treeNames):
 #  @details Use TFile.Open to retrieve a ROOT filehandle, which will
 #  deal with all non-posix filesystems. Return the GetSize() value.
 #  The option filetype=raw is added to ensure this works for non-ROOT files too (e.g. BS)
-#  @note Use the PyCmt forking decorator to ensure that ROOT is run completely within 
+#  @note Use the PyUtils forking decorator to ensure that ROOT is run completely within 
 #  a child process and will not 'pollute' the parent python process with unthread-safe
 #  bits of code (otherwise strange hangs are observed on subsequent uses of ROOT)
 #  @param filename Filename to get size of
diff --git a/Tools/PyJobTransforms/python/trfFileUtils.py b/Tools/PyJobTransforms/python/trfFileUtils.py
index 5c38309f44c90b1a187d761adb7a4854db736c8a..69b3cd949c7bfaefa6ce015ce033e69656020a75 100644
--- a/Tools/PyJobTransforms/python/trfFileUtils.py
+++ b/Tools/PyJobTransforms/python/trfFileUtils.py
@@ -10,7 +10,7 @@
 import logging
 msg = logging.getLogger(__name__)
 
-#  @note Use the PyCmt forking decorator to ensure that ROOT is run completely within 
+#  @note Use the PyUtils forking decorator to ensure that ROOT is run completely within 
 #  a child process and will not 'pollute' the parent python process with unthread-safe
 #  bits of code (otherwise strange hangs are observed on subsequent uses of ROOT)
 import PyUtils.Decorators as _decos
@@ -68,7 +68,7 @@ def AthenaLiteFileInfo(filename, filetype, retrieveKeys = athFileInterestingKeys
 #  @return 
 #  - Number of events.
 #  - @c None if the determination failed.
-#  @note Use the PyCmt forking decorator to ensure that ROOT is run completely within 
+#  @note Use the PyUtils forking decorator to ensure that ROOT is run completely within 
 #  a child process and will not 'pollute' the parent python process with unthread-safe
 #  bits of code (otherwise strange hangs are observed on subsequent uses of ROOT)
 @_decos.forking
@@ -166,7 +166,7 @@ def HISTEntries(fileName):
 #  @return 
 #  - Number of entries.
 #  - @c None if the determination failed.
-#  @note Use the PyCmt forking decorator to ensure that ROOT is run completely within 
+#  @note Use the PyUtils forking decorator to ensure that ROOT is run completely within 
 #  a child process and will not 'pollute' the parent python process with unthread-safe
 #  bits of code (otherwise strange hangs are observed on subsequent uses of ROOT)
 @_decos.forking
@@ -216,7 +216,7 @@ def NTUPEntries(fileName, treeNames):
 #  @details Use TFile.Open to retrieve a ROOT filehandle, which will
 #  deal with all non-posix filesystems. Return the GetSize() value.
 #  The option filetype=raw is added to ensure this works for non-ROOT files too (e.g. BS)
-#  @note Use the PyCmt forking decorator to ensure that ROOT is run completely within 
+#  @note Use the PyUtils forking decorator to ensure that ROOT is run completely within 
 #  a child process and will not 'pollute' the parent python process with unthread-safe
 #  bits of code (otherwise strange hangs are observed on subsequent uses of ROOT)
 #  @param filename Filename to get size of
diff --git a/Tools/PyJobTransforms/python/trfMPTools.py b/Tools/PyJobTransforms/python/trfMPTools.py
index f3bc860c58dce8a20b9f9985de4abebedfa16d8a..9e641eafb3c047986b3bc94913890b7e1cd4fce8 100644
--- a/Tools/PyJobTransforms/python/trfMPTools.py
+++ b/Tools/PyJobTransforms/python/trfMPTools.py
@@ -61,42 +61,49 @@ def detectAthenaMPProcs(argdict = {}):
 #  @param athenaMPworkers Number of AthenaMP workers
 #  @param skipFileChecks Switches off checks on output files
 #  @return @c None; side effect is the update of the @c dataDictionary
-def athenaMPOutputHandler(athenaMPFileReport, athenaMPWorkerTopDir, dataDictionary, athenaMPworkers, skipFileChecks):
+def athenaMPOutputHandler(athenaMPFileReport, athenaMPWorkerTopDir, dataDictionary, athenaMPworkers, skipFileChecks = False, argdict = {}):
     msg.debug("MP output handler called for report {0} and workers in {1}, data types {2}".format(athenaMPFileReport, athenaMPWorkerTopDir, dataDictionary.keys()))
     outputHasBeenHandled = dict([ (dataType, False) for dataType in dataDictionary.keys() if dataDictionary[dataType] ])
 
-    # First, see what AthenaMP told us
-    mpOutputs = ElementTree.ElementTree()
-    try:
-        mpOutputs.parse(athenaMPFileReport)
-    except IOError:
-        raise trfExceptions.TransformExecutionException(trfExit.nameToCode("TRF_OUTPUT_FILE_ERROR"), "Missing AthenaMP outputs file {0} (probably athena crashed)".format(athenaMPFileReport))
-    for filesElement in mpOutputs.getroot().getiterator(tag='Files'):
-        msg.debug('Examining element {0} with attributes {1}'.format(filesElement, filesElement.attrib))
-        originalArg = None 
-        startName = filesElement.attrib['OriginalName']
-        for dataType, fileArg in dataDictionary.iteritems():
-            if fileArg.value[0] == startName:
-                originalArg = fileArg
-                outputHasBeenHandled[dataType] = True
-                break
-        if originalArg is None:
-            msg.warning('Found AthenaMP output with name {0}, but no matching transform argument'.format(startName))
-            continue
-        
-        msg.debug('Found matching argument {0}'.format(originalArg))
-        fileNameList = []
-        for fileElement in filesElement.getiterator(tag='File'):
-            msg.debug('Examining element {0} with attributes {1}'.format(fileElement, fileElement.attrib))
-            fileNameList.append(path.relpath(fileElement.attrib['name']))
-            
-        athenaMPoutputsLinkAndUpdate(fileNameList, fileArg) 
+    # if sharedWriter mode is active ignore athenaMPFileReport
+    sharedWriter=False
+    if 'sharedWriter' in argdict and argdict['sharedWriter'].value:
+        sharedWriter=True
+        skipFileChecks=True
+
+    if not sharedWriter:
+        # First, see what AthenaMP told us
+        mpOutputs = ElementTree.ElementTree()
+        try:
+            mpOutputs.parse(athenaMPFileReport)
+        except IOError:
+            raise trfExceptions.TransformExecutionException(trfExit.nameToCode("TRF_OUTPUT_FILE_ERROR"), "Missing AthenaMP outputs file {0} (probably athena crashed)".format(athenaMPFileReport))
+        for filesElement in mpOutputs.getroot().getiterator(tag='Files'):
+            msg.debug('Examining element {0} with attributes {1}'.format(filesElement, filesElement.attrib))
+            originalArg = None 
+            startName = filesElement.attrib['OriginalName']
+            for dataType, fileArg in dataDictionary.iteritems():
+                if fileArg.value[0] == startName:
+                    originalArg = fileArg
+                    outputHasBeenHandled[dataType] = True
+                    break
+            if originalArg is None:
+                msg.warning('Found AthenaMP output with name {0}, but no matching transform argument'.format(startName))
+                continue
         
+            msg.debug('Found matching argument {0}'.format(originalArg))
+            fileNameList = []
+            for fileElement in filesElement.getiterator(tag='File'):
+                msg.debug('Examining element {0} with attributes {1}'.format(fileElement, fileElement.attrib))
+                fileNameList.append(path.relpath(fileElement.attrib['name']))
+
+            athenaMPoutputsLinkAndUpdate(fileNameList, fileArg)
+
     # Now look for additional outputs that have not yet been handled
     if len([ dataType for dataType in outputHasBeenHandled if outputHasBeenHandled[dataType] is False]):
         # OK, we have something we need to search for; cache the dirwalk here
         MPdirWalk = [ dirEntry for dirEntry in os.walk(athenaMPWorkerTopDir) ]
-        
+
         for dataType, fileArg in dataDictionary.iteritems():
             if outputHasBeenHandled[dataType]:
                 continue
@@ -108,6 +115,8 @@ def athenaMPOutputHandler(athenaMPFileReport, athenaMPWorkerTopDir, dataDictiona
             for entry in MPdirWalk:
                 if "evt_count" in entry[0]:
                     continue
+                if "range_scatterer" in entry[0]:
+                    continue
                 # N.B. AthenaMP may have made the output name unique for us, so 
                 # we need to treat the original name as a prefix
                 possibleOutputs = [ fname for fname in entry[2] if fname.startswith(startName) ]
@@ -123,7 +132,7 @@ def athenaMPOutputHandler(athenaMPFileReport, athenaMPWorkerTopDir, dataDictiona
                 pass
             elif len(fileNameList) != athenaMPworkers:
                 raise trfExceptions.TransformExecutionException(trfExit.nameToCode("TRF_OUTPUT_FILE_ERROR"), "Found {0} output files for {1}, expected {2} (found: {3})".format(len(fileNameList), dataType, athenaMPworkers, fileNameList))
-            
+
             # Found expected number of files - good!
             athenaMPoutputsLinkAndUpdate(fileNameList, fileArg) 
 
@@ -147,12 +156,19 @@ def athenaMPoutputsLinkAndUpdate(newFullFilenames, fileArg):
             
     for linkname, fname in zip(linkedNameList, newFullFilenames):
         if linkname:
-            try:
-                if path.lexists(linkname):
-                    os.unlink(linkname)
-                os.symlink(fname, linkname)
-            except OSError, e:  
-                raise trfExceptions.TransformExecutionException(trfExit.nameToCode("TRF_OUTPUT_FILE_ERROR"), "Failed to link {0} to {1}: {2}".format(fname, linkname, e))
+            if len(newFullFilenames) == 1:
+                try:
+                    os.rename(fname,fileArg.originalName)
+                    newFilenameValue[0]=fileArg.originalName
+                except OSError, e:
+                    raise trfExceptions.TransformExecutionException(trfExit.nameToCode("TRF_OUTPUT_FILE_ERROR"), "Failed to move {0} to {1}: {2}".format(fname, linkname, e))
+            else:
+                 try:
+                     if path.lexists(linkname):
+                         os.unlink(linkname)
+                     os.symlink(fname, linkname)
+                 except OSError, e:  
+                     raise trfExceptions.TransformExecutionException(trfExit.nameToCode("TRF_OUTPUT_FILE_ERROR"), "Failed to link {0} to {1}: {2}".format(fname, linkname, e))
 
     fileArg.multipleOK = True
     fileArg.value = newFilenameValue
diff --git a/Tools/PyJobTransforms/python/trfUtils.py b/Tools/PyJobTransforms/python/trfUtils.py
index 0948d6120b35c3a1669e137ed8ac85daa1d97515..514ddbfb08916d4d87e33ba787c12af062ea8178 100644
--- a/Tools/PyJobTransforms/python/trfUtils.py
+++ b/Tools/PyJobTransforms/python/trfUtils.py
@@ -309,7 +309,7 @@ def lineByLine(filename, strip = True, removeTimestamp = True):
     for line in f:
         linecounter += 1
         if removeTimestamp:
-            line = line.lstrip('0123456789:')
+            line = line.lstrip('0123456789:-, ') # Remove timestamps in both serial and MP mode.
         if strip:
             line = line.strip()
         yield line, linecounter
diff --git a/Tools/PyJobTransforms/scripts/Archive_tf.py b/Tools/PyJobTransforms/scripts/Archive_tf.py
index ee55654a43808a21a921ed86e297b2404f9de731..d8afd52958ddd7775b8d0785ed5bfb65837ea599 100755
--- a/Tools/PyJobTransforms/scripts/Archive_tf.py
+++ b/Tools/PyJobTransforms/scripts/Archive_tf.py
@@ -46,9 +46,10 @@ def addMyArgs(parser):
     # Use arggroup to get these arguments in their own sub-section (of --help)
     parser.defineArgGroup('Archive_tf', 'Archive transform options')
     parser.defineArgGroup('Tar archiver', 'Options')
-    # Do not add a default value to --exe, this is handled through the archiveExecutor
+    parser.defineArgGroup('Zip archiver', 'Options')
     parser.add_argument('--exe', group='Archive_tf',
-                        help='Archiving command. Default is zip', choices=['zip', 'tar'])
+                        help='Archiving command. Default is zip', choices=['zip', 'tar'],
+                        default='zip')
     parser.add_argument('--inputDataFile', '--inputFile', nargs='+', 
                         type=trfArgClasses.argFactory(trfArgClasses.argFile, io='input', type='misc'),
                         help='Input file(s)', group='Archive_tf')
@@ -56,8 +57,11 @@ def addMyArgs(parser):
                         type=trfArgClasses.argFactory(trfArgClasses.argFile, io='output', type='misc'),
                         help='Output archive file', group='Archive_tf')
     parser.add_argument('--compressionType', group='Tar archiver',
-                        help='Underlying compression type. Default is none', choices=['gzip', 'bzip2', 'none'],
+                        help='Underlying compression type of tar. Default is none', choices=['gzip', 'bzip2', 'none'],
                         default='none')
+    parser.add_argument('--compressionLevel', group='Zip archiver',
+                        help='Compression level of zip. Default is -0', choices=['-0', '-1', '-2', '-3',  '-4',  '-5', '-6', '-7', '-8', '-9'],
+                        default='-0')
 
 if __name__ == '__main__':
     main()
diff --git a/Tools/PyJobTransforms/test/test_trfArgClassesATLAS.py b/Tools/PyJobTransforms/test/test_trfArgClassesATLAS.py
index 7ddd9e09b999aa257dd1bd97db1b2d29776c7375..3263ce4978ecd48ed2f8661bc39d9a245f7952a1 100755
--- a/Tools/PyJobTransforms/test/test_trfArgClassesATLAS.py
+++ b/Tools/PyJobTransforms/test/test_trfArgClassesATLAS.py
@@ -21,20 +21,16 @@ from PyJobTransforms.trfArgClasses import *
 from PyJobTransforms.trfFileUtils import athFileInterestingKeys
 
 class argFileEOSTests(unittest.TestCase):
-    def test_SimExpansion(self):
-        hitsInputs = argFile('root://eosatlas//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc12a/mc12_8TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e1119_s1469_s1471/HITS.743321._000[029,200].pool.root.1,root://eosatlas//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc12a/mc12_8TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e1119_s1469_s1471/HITS.743321._000[614,817].pool.root.5', io='input')
-        self.assertEqual(len(hitsInputs.value), 4)
-        
     def test_SimGlobStar(self):
-        hitsInputs = argFile('root://eosatlas//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc12a/mc12_8TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e1119_s1469_s1471/HITS.*', io='input')
+        hitsInputs = argFile('/eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc12a/mc12_8TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e1119_s1469_s1471/HITS.*', io='input')
         self.assertEqual(len(hitsInputs.value), 4)        
 
     def test_SimGlobMatchSingle(self):
-        hitsInputs = argFile('root://eosatlas//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc12a/mc12_8TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e1119_s1469_s1471/HITS.743321._??????.pool.root.?', io='input')
+        hitsInputs = argFile('/eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc12a/mc12_8TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e1119_s1469_s1471/HITS.743321._??????.pool.root.?', io='input')
         self.assertEqual(len(hitsInputs.value), 4)        
 
     def test_SimGlobMatchBoth(self):
-        hitsInputs = argFile('root://eosatlas//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc12a/mc12_8TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e1119_s1469_s1471/HITS.743321._*.pool.root.?', io='input')
+        hitsInputs = argFile('/eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc12a/mc12_8TeV.119995.Pythia8_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e1119_s1469_s1471/HITS.743321._*.pool.root.?', io='input')
         self.assertEqual(len(hitsInputs.value), 4)        
 
 
diff --git a/Tools/PyJobTransforms/test/test_trfMPTools.py b/Tools/PyJobTransforms/test/test_trfMPTools.py
index 79b36bbcf0763bf392ecd55fffc9d9eee37c3409..b610de6ef0e76c95c717aac85a0972d984130c9e 100755
--- a/Tools/PyJobTransforms/test/test_trfMPTools.py
+++ b/Tools/PyJobTransforms/test/test_trfMPTools.py
@@ -126,7 +126,7 @@ class AthenaMPOutputParseTests(unittest.TestCase):
                     'DRAW_EGZ': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_EGZ.f594._lb0176._SFO-1._0002"),
                     'DRAW_TAUMUH': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_TAUMUH.f594._lb0176._SFO-1._0002"),
                     'DRAW_ZMUMU': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_ZMUMU.f594._lb0176._SFO-1._0002"),}
-        self.assertEqual(athenaMPOutputHandler("athenaMP-outputs-RAWtoESD-r2e", "athenaMP-workers-RAWtoESD-r2e", dataDict, 8, skipFileChecks=False), None)
+        self.assertEqual(athenaMPOutputHandler("athenaMP-outputs-RAWtoESD-r2e", "athenaMP-workers-RAWtoESD-r2e", dataDict, 8), None)
         
     def test_missingMPoutputs(self):
         dataDict = {'ESD': argFile("data15_13TeV.00267167.physics_Main.recon.ESD.f594._lb0176._SFO-1._0002"),
@@ -136,7 +136,7 @@ class AthenaMPOutputParseTests(unittest.TestCase):
                     'DRAW_TAUMUH': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_TAUMUH.f594._lb0176._SFO-1._0002"),
                     'DRAW_NOTHERE': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_NOTHERE.f594._lb0176._SFO-1._0002"),
                     'DRAW_ZMUMU': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_ZMUMU.f594._lb0176._SFO-1._0002"),}
-        self.assertRaises(trfExceptions.TransformExecutionException, athenaMPOutputHandler, "athenaMP-outputs-RAWtoESD-r2e", "athenaMP-workers-RAWtoESD-r2e", dataDict, 8, skipFileChecks=False)
+        self.assertRaises(trfExceptions.TransformExecutionException, athenaMPOutputHandler, "athenaMP-outputs-RAWtoESD-r2e", "athenaMP-workers-RAWtoESD-r2e", dataDict, 8)
 
     def test_wrongMPoutputs(self):
         dataDict = {'ESD': argFile("data15_13TeV.00267167.physics_Main.recon.ESD.f594._lb0176._SFO-1._0002"),
@@ -146,7 +146,7 @@ class AthenaMPOutputParseTests(unittest.TestCase):
                     'DRAW_TAUMUH': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_TAUMUH.f594._lb0176._SFO-1._0002"),
                     'DRAW_NOTHERE': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_NOTHERE.f594._lb0176._SFO-1._0002"),
                     'DRAW_ZMUMU': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_ZMUMU.f594._lb0176._SFO-1._0002"),}
-        self.assertRaises(trfExceptions.TransformExecutionException, athenaMPOutputHandler, "athenaMP-outputs-RAWtoESD-r2e", "athenaMP-workers-RAWtoESD-r2e", dataDict, 20, skipFileChecks=False)
+        self.assertRaises(trfExceptions.TransformExecutionException, athenaMPOutputHandler, "athenaMP-outputs-RAWtoESD-r2e", "athenaMP-workers-RAWtoESD-r2e", dataDict, 20)
         
     def test_wrongMPoutputDir(self):
         dataDict = {'ESD': argFile("data15_13TeV.00267167.physics_Main.recon.ESD.f594._lb0176._SFO-1._0002"),
@@ -156,7 +156,7 @@ class AthenaMPOutputParseTests(unittest.TestCase):
                     'DRAW_TAUMUH': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_TAUMUH.f594._lb0176._SFO-1._0002"),
                     'DRAW_NOTHERE': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_NOTHERE.f594._lb0176._SFO-1._0002"),
                     'DRAW_ZMUMU': argFile("data15_13TeV.00267167.physics_Main.recon.DRAW_ZMUMU.f594._lb0176._SFO-1._0002"),}
-        self.assertRaises(trfExceptions.TransformExecutionException, athenaMPOutputHandler, "athenaMP-outputs-RAWtoESD-r2e-missing", "athenaMP-workers-RAWtoESD-r2e", dataDict, 20, skipFileChecks=False)
+        self.assertRaises(trfExceptions.TransformExecutionException, athenaMPOutputHandler, "athenaMP-outputs-RAWtoESD-r2e-missing", "athenaMP-workers-RAWtoESD-r2e", dataDict, 20)
         
         
 if __name__ == '__main__':
diff --git a/Tools/PyJobTransforms/test/test_trfValidation.py b/Tools/PyJobTransforms/test/test_trfValidation.py
index cf1ccee4bdd23748b20095b1430ade990ade039f..7581d488322ad19965497b2b80dca6bd3332d7b9 100755
--- a/Tools/PyJobTransforms/test/test_trfValidation.py
+++ b/Tools/PyJobTransforms/test/test_trfValidation.py
@@ -210,6 +210,17 @@ class athenaLogFileReportTests(unittest.TestCase):
 09:36:22 Py:Athena            INFO including file "eflowRec/eflowRecESDList.py"
 09:36:22 Py:Athena            ERROR too many floobles'''
 
+        testLogExcerptMP = '''
+10:43:11 Thu Mar 30 10:43:11 CEST 2017
+10:47:28 2017-03-30 10:46:30,037 AthMpEvtLoopMgr.SharedEvtQueueProvider            INFO Logs redirected in the AthenaMP event event counter PID=18296
+10:47:29 2017-03-30 10:47:03,885 ToolSvc.InDetImpactPoint3dEstimator               WARNING  DeltaR and MomentumDir are not orthogonal'''
+
+        testErrorExcerptMP = '''
+10:43:11 Thu Mar 30 10:43:11 CEST 2017
+10:47:28 2017-03-30 10:46:30,037 AthMpEvtLoopMgr.SharedEvtQueueProvider            INFO Logs redirected in the AthenaMP event event counter PID=18296
+10:47:29 2017-03-30 10:47:03,885 ToolSvc.InDetImpactPoint3dEstimator               WARNING  DeltaR and MomentumDir are not orthogonal
+10:47:28 2017-03-30 10:47:14,698 DRAW_TOPSLMUKernel                                ERROR Incompatible vectors - different length'''
+
         testBadAlloc = '''
 22:41:12 EventCounter                                         INFO EventCounter:EventCounter::execute - seen events: 9800
 22:41:14 AthenaEventLoopMgr                                   INFO   ===>>>  start processing event #5328391, run #204158 9800 events processed so far  <<<===
@@ -513,6 +524,9 @@ class athenaLogFileReportTests(unittest.TestCase):
             print >> f8, testMissedBadAlloc
         with open('file9', 'w') as f9:
             print >> f9, testDbMonitor
+        with open('file10', 'w') as f10:
+            print >> f10, testLogExcerptMP
+            print >> f10, testErrorExcerptMP
 
         self.myFileReport1 = athenaLogFileReport('file1')
         self.myFileReport2 = athenaLogFileReport('file2')
@@ -523,9 +537,10 @@ class athenaLogFileReportTests(unittest.TestCase):
         self.myFileReport7 = athenaLogFileReport('file7')
         self.myFileReport8 = athenaLogFileReport('file8')
         self.myFileReport9 = athenaLogFileReport('file9')
+        self.myFileReport10 = athenaLogFileReport('file10')
 
     def tearDown(self):
-        for f in 'file1', 'file2', 'file3', 'file4', 'file5', 'file6', 'file7', 'file8', 'file9':
+        for f in 'file1', 'file2', 'file3', 'file4', 'file5', 'file6', 'file7', 'file8', 'file9', 'file10':
             try:
                 os.unlink(f)
             except OSError:
@@ -549,6 +564,11 @@ class athenaLogFileReportTests(unittest.TestCase):
                                                            'firstError': {'count': 1, 'firstLine': 15,
                                                                           'message': 'Py:Athena            ERROR too many floobles'},})
 
+    def test_logscanErrorMP(self):
+        self.assertEqual(self.myFileReport10.worstError(), {'level': 'ERROR', 'nLevel': logging.ERROR,
+                                                           'firstError': {'count': 1, 'firstLine': 9,
+                                                                          'message': 'DRAW_TOPSLMUKernel                                ERROR Incompatible vectors - different length'},})
+
     def test_badAlloc(self):
         self.assertEqual(self.myFileReport4.worstError(), {'level': 'CATASTROPHE', 'nLevel': stdLogLevels['CATASTROPHE'],
                                                            'firstError': {'count': 1, 'firstLine': 11,
diff --git a/Tools/PyUtils/CMakeLists.txt b/Tools/PyUtils/CMakeLists.txt
index 1fcae9b855ca5920b38df54c0291f9ac9b0ebc7c..baac4ffb2ccb7ff0351c4e096cf58bfa82ffb5cc 100644
--- a/Tools/PyUtils/CMakeLists.txt
+++ b/Tools/PyUtils/CMakeLists.txt
@@ -8,7 +8,7 @@ atlas_subdir( PyUtils )
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
                           Control/RootUtils
-                          Tools/PyCmt )
+                          )
 
 # External dependencies:
 find_package( PythonLibs )
@@ -16,7 +16,7 @@ find_package( ROOT COMPONENTS Core PyROOT Tree MathCore Hist RIO pthread )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py python/AthFile python/scripts )
-atlas_install_scripts( bin/abootstrap-wkarea.py bin/acmd.py bin/atl-gen-athena-d3pd-reader bin/avn.py bin/build_cmt_pkg_db.py bin/checkFile.py bin/checkPlugins.py bin/checkSG.py bin/checkMetaSG.py bin/checkTP.py bin/checkTag.py bin/checkxAOD.py bin/cmtClients.py bin/diff-athfile bin/diff-jobo-cfg.py bin/diffConfigs.py bin/diffPoolFiles.py bin/diffTAGTree.py bin/dlldep.py bin/dso-stats.py bin/dump-athfile.py bin/dumpAthfilelite.py bin/filter-and-merge-d3pd.py bin/getMetadata.py bin/gen-typereg-dso.py bin/gen_klass.py bin/get-tag-diff.py bin/gprof2dot bin/issues bin/lstags bin/magnifyPoolFile.py bin/merge-poolfiles.py bin/pep8.py bin/pkgco.py bin/pool_extractFileIdentifier.py bin/pool_insertFileToCatalog.py bin/print_auditor_callgraph.py bin/pyroot.py bin/setupWorkArea.py bin/tabnanny-checker.py bin/tcSubmitTag.py bin/vmem-sz.py )
+atlas_install_scripts( bin/acmd.py bin/atl-gen-athena-d3pd-reader bin/checkFile.py bin/checkPlugins.py bin/checkSG.py bin/checkMetaSG.py bin/checkTP.py bin/checkTag.py bin/checkxAOD.py bin/diff-athfile bin/diff-jobo-cfg.py bin/diffConfigs.py bin/diffPoolFiles.py bin/diffTAGTree.py bin/dlldep.py bin/dso-stats.py bin/dump-athfile.py bin/dumpAthfilelite.py bin/filter-and-merge-d3pd.py bin/getMetadata.py bin/gen_klass.py bin/get-tag-diff.py bin/gprof2dot bin/issues bin/magnifyPoolFile.py bin/merge-poolfiles.py bin/pep8.py bin/pool_extractFileIdentifier.py bin/pool_insertFileToCatalog.py bin/print_auditor_callgraph.py bin/pyroot.py bin/vmem-sz.py )
 
 # Aliases:
 atlas_add_alias( checkFile "checkFile.py" )
@@ -30,20 +30,13 @@ atlas_add_alias( avn "avn.py" )
 atlas_add_alias( diffPoolFiles "diffPoolFiles.py" )
 atlas_add_alias( print_auditor_callgraph "print_auditor_callgraph.py" )
 atlas_add_alias( dump-athfile "dump-athfile.py" )
-atlas_add_alias( tabnanny-checker "tabnanny-checker.py" )
-atlas_add_alias( abootstrap-wkarea "abootstrap-wkarea.py" )
 atlas_add_alias( pyroot "pyroot.py" )
 atlas_add_alias( checkTag "checkTag.py" )
 atlas_add_alias( diffTAGTree "diffTAGTree.py" )
 atlas_add_alias( checkxAOD "checkxAOD.py" )
 atlas_add_alias( get-tag-diff "get-tag-diff.py" )
-atlas_add_alias( tcSubmitTag "tcSubmitTag.py" )
-atlas_add_alias( pkgco "pkgco.py" )
 atlas_add_alias( checkSG "checkSG.py" )
 atlas_add_alias( diff-jobo-cfg "diff-jobo-cfg.py" )
 atlas_add_alias( acmd "acmd.py" )
 atlas_add_alias( vmem-sz "vmem-sz.py" )
-atlas_add_alias( build_cmt_pkg_db "build_cmt_pkg_db.py" )
-atlas_add_alias( setupWorkArea "setupWorkArea.py" )
-atlas_add_alias( tc-submit-tag "tcSubmitTag.py" )
 atlas_add_alias( getMetadata "getMetadata.py" )
diff --git a/Tools/PyUtils/bin/abootstrap-wkarea.py b/Tools/PyUtils/bin/abootstrap-wkarea.py
deleted file mode 100755
index 2535b4d39652254d09e235abbf4feb82a282cddb..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/bin/abootstrap-wkarea.py
+++ /dev/null
@@ -1,300 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-# @file: abootstrap-wkarea.py
-# @purpose: install all needed $(CMTCONFIG) directories into a temporary area
-#           so to not eat our precious AFS disk space.
-#           also creates a WorkArea CMT package to ease administration
-# @author: Sebastien Binet
-# @date: February 2007
-
-from __future__ import with_statement
-
-__version__ = "$Revision: 323486 $"
-
-import os
-import os.path as osp
-import glob
-import sys
-
-### basic logging and messages -----------------------------------------------
-from PyCmt.Logging import logging
-
-msg = logging.getLogger("AthBoot")
-
-##########################
-# recognized user options
-##########################
-import getopt
-
-_useropts = 'i:o:hl:v'
-_userlongopts = [ 'input-dir=',  'output-dir=',
-                  'help',     'loglevel=',
-                  'version' ]
-
-def _usage():
-   print """Accepted command line options (CLI):
-   -i, --input-dir <dir>      ...  directory where the original WorkArea is
-                                   sitting.
-   -o, --output-dir <dir>     ...  directory where to install the bin dirs
-   -h, --help                 ...  print this help message
-   -l, --loglevel <level>     ...  logging level (DEBUG, INFO, WARNING, ERROR, FATAL)
-   -v, --version              ...  print version number
-   """
-   return
-
-## Helper class to recursively find files
-import fnmatch
-class _GlobDirectoryWalker:
-   """a forward iterator that traverses a directory tree"""
-
-   def __init__(self, directory, pattern="*"):
-      self.stack = [directory]
-      if type(pattern) != type([]):
-         pattern = [ pattern ]
-      self.pattern = pattern
-      self.files = []
-      self.index = 0
-      return
-    
-   def __getitem__(self, index):
-      while 1:
-         try:
-            file = self.files[self.index]
-            self.index = self.index + 1
-         except IndexError:
-            # pop next directory from stack
-            self.directory = self.stack.pop()
-            self.files = os.listdir(self.directory)
-            self.index = 0
-         else:
-            # got a filename
-            fullname = osp.join(self.directory, file)
-            if osp.isdir(fullname) and not osp.islink(fullname):
-               self.stack.append(fullname)
-            for pattern in self.pattern:
-               if fnmatch.fnmatch(file, pattern):
-                  msg.debug(" --> %s",fullname)
-                  return fullname
-
-         pass
-      return
-   
-   pass # class _GlobDirectoryWalker
-
-## Helper function to find all the bin dirs to be installed
-def register_bin_dirs(top_dir = os.getcwd(),
-                      pattern = os.environ['CMTCONFIG']):
-   """helper function to find all 'bin' dirs to be installed in the temp space
-   """
-   top_dir = osp.abspath(osp.expanduser(osp.expandvars(top_dir)))
-   msg.info("registering 'bin dirs' [%s]..." % str(pattern))
-   msg.info("parsing [%s]..." % top_dir)
-   if not osp.exists(top_dir):
-      return []
-   bin_dirs = [ d for d in _GlobDirectoryWalker(top_dir, pattern) 
-                if osp.isdir(d) and not osp.islink(d)
-                and d.count("InstallArea") <= 0 ]
-
-   msg.info(" ==> found [%i] 'bin dirs' to process", len(bin_dirs))
-   return bin_dirs
-
-## Main entry point
-import shutil, glob
-def symlink_bin_dirs(input_dir, output_dir, bin_dirs):
-   input_dir = osp.abspath(input_dir)
-   output_dir= osp.abspath(output_dir)
-
-   msg.info("."*50)
-   msg.info("symlinking ...")
-   if not osp.exists(output_dir):
-      msg.warning("[%s] does NOT exists : creating it...", output_dir)
-      os.mkdir(output_dir)
-      pass
-   
-   for bin in bin_dirs:
-      bin = osp.abspath(bin)
-      root = osp.commonprefix([input_dir, bin]) + os.sep
-      out_bin = output_dir + os.sep + bin.split(root)[1]
-      msg.info(" -- %s", bin.split(root)[1])
-
-      ## remove the linked dir if it exists
-      ## (this assumes the registering of bin_dirs does not register already
-      ## symlinked bin_dirs !! Worse case scenario is to rebuild...)
-      if osp.exists(out_bin):
-         msg.debug("... removing [%s] ...", out_bin)
-         shutil.rmtree(out_bin)
-         pass
-
-      ## create all the parent path if it does not exist yet
-      if not osp.exists(osp.dirname(out_bin)):
-         os.makedirs(osp.dirname(out_bin))
-         pass
-      
-      # symlink the output bin...
-      shutil.move(bin, out_bin)
-      os.symlink(out_bin, bin)
-
-      # symlink the other directories so relative paths are also working
-      # and g++ -o bla ../src/Bla.cxx will work
-      pkg_dir = osp.dirname(bin)
-      other_dirs = [d for d in glob.glob(pkg_dir + os.sep + "*") 
-                    if d != bin and osp.isdir(d)]
-      #msg.debug(" symlinking [%r]", other_dirs)
-      for d in other_dirs:
-         symlink_dest = osp.join(output_dir, d.split(root)[1])
-         if osp.exists(symlink_dest):
-            os.remove(symlink_dest)
-         os.symlink(d, symlink_dest)
-
-   msg.info("symlinking [DONE]")
-   msg.info("."*50)
-   return
-
-class Options(object):
-   """a dummy class to collect options"""
-   pass
-
-def _processOptions(useropts, userlongopts):
-
-   # defaults
-   input_dir  = None
-   output_dir = None
-   lvl = logging.INFO
-   opts = Options()
-   
-   try:
-      optlist,args = getopt.getopt(sys.argv[1:],
-                                   useropts,
-                                   userlongopts)
-   except getopt.error:
-      msg.error(str(sys.exc_value))
-      _usage()
-      sys.exit(2)
-      pass
-   
-   for opt, arg in optlist:
-      if opt in ('-h', '--help'):
-         _usage()
-         sys.exit()
-      elif opt in ('-v', '--version'):
-         print "version:",__version__
-         print "By Sebastien Binet"
-         sys.exit()
-      elif opt in ('-i', '--input-dir'):
-         input_dir = osp.expanduser(osp.expandvars(arg))
-      elif opt in ('-o', '--output-dir'):
-         output_dir = osp.expanduser(osp.expandvars(arg))
-      elif opt in ('-l', '--loglevel'):
-         lvl = string.upper(arg)
-         logLevel = getattr(logging, lvl)
-         msg.setLevel(logLevel)
-         del lvl,logLevel
-         pass
-      else:
-         pass
-      pass
-
-   if input_dir  is None: input_dir = os.getcwd()
-
-   if output_dir is None:
-      fname = osp.join(os.getcwd(), ".abootstrap.cfg")
-      if osp.exists(fname):
-         # (try) to get them from a previous run of abootstrap-wrkarea
-         with open(fname, 'r') as sticky_file:
-            from ConfigParser import SafeConfigParser
-            cfg = SafeConfigParser()
-            cfg.readfp(sticky_file)
-            ath_cfg = dict(cfg.items('abootstrap'))
-            hostname   = ath_cfg['hostname']
-            input_dir  = ath_cfg['input-dir']
-            output_dir = ath_cfg['output-dir']
-            del cfg
-            pass
-
-      if output_dir is None:
-         # use parent-dir...
-         output_dir = osp.join('/tmp',
-                               '$USER',
-                               'aboot-tmp-'+osp.basename(os.getcwd()))
-   opts.input_dir = osp.abspath(osp.expanduser(osp.expandvars(input_dir)))
-   opts.output_dir= osp.abspath(osp.expanduser(osp.expandvars(output_dir)))
-
-   return opts
-    
-if __name__ == "__main__":
-
-   msg = logging.getLogger('AthBoot')
-   msg.setLevel(logging.INFO)
-
-   ## process user options
-   opts = _processOptions(_useropts, _userlongopts)
-
-   msg.info("#"*50)
-   msg.info(" input-dir:  [%s]", opts.input_dir)
-   msg.info(" output-dir: [%s]", opts.output_dir)
-   msg.info("#"*50)
-   msg.info("")
-
-   import shutil
-   
-   # removing output dir
-   if osp.exists(opts.output_dir):
-      shutil.rmtree(opts.output_dir)
-
-   # remove InstallArea if any
-   if osp.exists('InstallArea'):
-      shutil.rmtree('InstallArea')
-      
-   # create $CMTCONFIG directories...
-   msg.info("creating WorkArea...")
-   import commands as com
-   sc,out = com.getstatusoutput('setupWorkArea.py')
-   if sc:
-      print out
-      sys.exit(1)
-   
-   orig_dir = os.getcwd()
-   os.chdir('WorkArea/cmt')
-
-   ## msg.info("cmt bro cmt config...")
-   ## sc,out = com.getstatusoutput('cmt bro cmt config')
-   ## if sc:
-   ##    print out
-   ##    sys.exit(1)
-
-   msg.info("creating $CMTCONFIG directories...")
-   sc,out = com.getstatusoutput('cmt bro \"/bin/rm -rf ../$CMTCONFIG; /bin/mkdir -p ../$CMTCONFIG; echo 1\"')
-   if sc:
-      print out
-      sys.exit(1)
-
-   os.chdir(orig_dir)
-
-   msg.info('registering bin dirs...')
-   bin_dirs = register_bin_dirs(opts.input_dir)
-   msg.info('installing symlinks...')
-   symlink_bin_dirs(opts.input_dir, opts.output_dir, bin_dirs)
-
-   for d in ('python', os.environ['CMTCONFIG']):
-      d = osp.join('InstallArea', d)
-      if not osp.exists(d):
-         msg.info('creating [%s] (to prevent CMT bug)...', d)
-         os.makedirs(d)
-   
-
-   ## to remember where we put those binary files, in case we logged on a
-   ## different lxplus node...
-   with open(osp.join(opts.input_dir, ".abootstrap.cfg"), 'w') as f:
-      import socket
-      f.writelines([
-         "[abootstrap]\n",
-         "hostname   = %s\n" % socket.gethostname(),
-         "input-dir  = %s\n" % opts.input_dir,
-         "output-dir = %s\n" % opts.output_dir,
-         ])
-      pass
-   msg.info("## Bye.")
-   
-   sys.exit(0)
diff --git a/Tools/PyUtils/bin/avn.py b/Tools/PyUtils/bin/avn.py
deleted file mode 100755
index b9cfa04e6fef39fcaa2ce072d31b7fbed4b1df2d..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/bin/avn.py
+++ /dev/null
@@ -1,291 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file avn.py
-# @purpose an atlas oriented SVN helper script
-# @date October 2009
-
-# credits: Scott Snyder provided the first version.
-
-__doc__ = """
-an atlas oriented SVN helper script
------------------------------------
-
-examples of usage:
-$ cd Control/AthenaServices
-$ avn ci -m 'some interesting comment'
-$ avn tag AthenaServices-99-99-99 -m 'some interesting comment'
-$ avn diff @AthenaServices-66-66-66 @AthenaServices-99-99-99
-$ avn diff @AthenaServices-66-66-66/src @AthenaServices-99-99-99/src
-$ avn diff @AthenaServices-66-66-66/src/f.cxx @AthenaServices-99-99-99/src/f.cxx
-$ avn lstags
-$ avn switch @TRUNK
-$ avn switch @AthenaServices-01-33-06-branch
-$ avn up
-$ avn -n some_command # => dryrun (does not execute the command)
-
-"""
-__version__ = "$Revision: 508489 $"
-__author__ = "Sebastien Binet"
-
-import sys
-import os
-import commands
-import re
-import string
-import subprocess
-
-tagchars = string.ascii_letters + string.digits + '-' + '_'
-
-# patterns taken from atlas svn-hooks...
-_is_tag_name_valid_tc = re.compile("(^[A-Za-z_]+-[A-Za-z_]+-[0-9]{2}-[0-9]{2}-[0-9]{2}$)|(^[A-Za-z_]+-[A-Za-z_]+-[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{2}$)").match
-_is_tag_name_valid =    re.compile("(^[A-Za-z0-9_]+-[0-9]{2}-[0-9]{2}-[0-9]{2}$)|(^[A-Za-z0-9_]+-[0-9]{2}-[0-9]{2}-[0-9]{2}-[0-9]{2}$)").match
-        
-class AvnObject(object):
-    """dummy object to hold options and variables
-    """
-
-    @property
-    def url(self):
-        url = None
-        try:
-            url = self._url
-        except AttributeError:
-            lines = commands.getoutput('svn info').split('\n')
-            for l in lines:
-                if l.startswith('URL: '):
-                    url = self._url = l[5:]
-                    break
-        if url is None:
-            err = "Can't find svn URL."
-            print >> sys.stderr, err
-            raise RuntimeError(err)
-        return url
-
-    @property
-    def root(self):
-        root = None
-        try:
-            root = self._root
-        except AttributeError:
-            lines = commands.getoutput('svn info').split('\n')
-            for l in lines:
-                if l.startswith('Repository Root: '):
-                    root = self._root = l[17:]
-                    break
-        if root is None:
-            err = "Can't find svn repository root. will assume to be $SVNROOT"
-            print >> sys.stderr, err
-            root = self._root = os.environ['SVNROOT']
-        return root
-
-    @property
-    def testarea(self):
-        try:
-            return self._testarea
-        except AttributeError:
-            if not 'TestArea' in os.environ:
-                err = 'TestArea is not defined.'
-                print sys.stderr, err
-                raise RuntimeError(err)
-            self._testarea = os.path.realpath(os.environ['TestArea'])
-        return self._testarea
-
-    @property
-    def cwd(self):
-        cwd = os.getcwd()
-        if not cwd.startswith(self.testarea):
-            err = 'Current directory is not within TestArea.'
-            print >> sys.stderr, err
-            raise RuntimeError(err)
-        return cwd
-    
-    @property
-    def packpath(self):
-        try:
-            return self._packpath
-        except AttributeError:
-            testarea = self.testarea
-            packpath = self.cwd[len(testarea):]
-            if packpath.startswith('/'):
-                packpath = packpath[1:]
-
-            path = None
-            while not os.path.exists (os.path.join (testarea, packpath, 'cmt')):
-                comp = os.path.basename (packpath)
-                packpath = os.path.dirname (packpath)
-                if path is None:
-                    path = comp
-                else:
-                    path = os.path.join (comp, path)
-                if packpath == '':
-                    err = "Can't find cmt directory."
-                    print >> sys.stderr, err
-                    raise RuntimeError(err)
-            self._path = path
-            self._packpath = packpath
-        return self._packpath
-
-    @property
-    def path(self):
-        packpath = self.packpath # side-effect will compute self._path
-        return self._path
-        
-    pass # class AvnObject
-
-
-def mungtag(s, allow_use_cmt=False):
-    if allow_use_cmt:
-        try:
-            return mungtag(s)
-        except Exception:
-            import PyCmt.Cmt as Cmt
-            cmt = Cmt.CmtWrapper()
-            pkg = cmt.find_pkg(s.split('-')[0])
-            if pkg:
-                avn._packpath = os.path.join(pkg.path, pkg.name)
-                avn._path = None
-            
-    if s in ('HEAD','TRUNK'):
-        thisurl = os.path.join (avn.root, avn.packpath, 'trunk')
-    elif s == 'THIS':
-        thisurl = avn.url
-    elif s.endswith ('-branch'):
-        thisurl = os.path.join (avn.root, avn.packpath, 'branches', s)
-    else:
-        thisurl = os.path.join (avn.root, avn.packpath, 'tags', s)
-    if not (avn.path is None):
-        thisurl = os.path.join (thisurl, avn.path)
-    return thisurl
-
-def mungarg(s,do_mung=True):
-    if do_mung:
-        beg = 0
-        while True:
-            beg = s.find ('@', beg)
-            if beg < 0: break
-            end = beg + 1
-            while end < len(s) and s[end] in tagchars:
-                end += 1
-            if beg == end:
-                beg += 1
-                continue
-            s = s[:beg] + mungtag(s[beg+1:end], allow_use_cmt=True) + s[end:]
-    if s.find(' ') >= 0:
-        s = "'" + s + "'"
-    return s
-
-avn = AvnObject()
-"""the one and only one Atlas Svn helper object"""
-del AvnObject
-
-### ---------------------------------------------------------------------------
-### command functions
-
-def avn_help():
-    print __doc__
-    print "normal svn help output follows"
-    print "-"*80
-    print
-    return
-
-def avn_tag(args):
-    cmd_args = args[:]
-    for i,tag in enumerate(cmd_args):
-        if tag[0] == '-':
-            if tag.startswith(('-r', '--revision')):
-                has_r_switch = True
-            continue
-        if tag.find(':') < 0:
-            if tag[0] == '@':
-                tag = tag[1:]
-            
-            if _is_tag_name_valid(tag):
-                tag = mungtag(tag)
-                cmd_args[i] = tag
-                pass
-            pass
-        pass
-    cmd_args = ['cp', avn.url,] + cmd_args[1:]
-    return cmd_args
-
-def avn_lstags(args):
-    cmd_args = ['ls', os.path.join (avn.root, avn.packpath, 'tags'),
-                os.path.join (avn.root, avn.packpath, 'branches')]
-    return cmd_args
-
-def avn_ls(args):
-    cmd_args = args[:]
-    if cmd_args[1].find('//') < 0:
-        cmd_args[1] = os.path.join (avn.root, avn.packpath, cmd_args[1])
-    return cmd_args
-
-def avn_diff(args):
-    cmd_args = args[:]
-    ## if cmd_args[1][0] != '-' and cmd_args[2][0] != '-':
-    ##     rev_ref = mungtag(cmd_args[1], allow_use_cmt=True)
-    ##     rev_chk = mungtag(cmd_args[2], allow_use_cmt=True)
-    ##     if len(cmd_args) == 4:
-    ##         file_or_dir = cmd_args[3]
-    ##         rev_ref = '/'.join([rev_ref, file_or_dir])
-    ##         rev_chk = '/'.join([rev_chk, file_or_dir])
-    ##     cmd_args[:] = ['diff', rev_ref, rev_chk]
-    return cmd_args
-
-def main(args):
-    import os
-    
-    dryrun = False
-    if len(args)>0 and args[0] == '-n':
-        dryrun = True
-        args = args[1:]
-
-    if not os.environ.has_key ('TestArea'):
-        print >> sys.stderr, 'TestArea is not defined.'
-        return 1
-
-    avn.dryrun = dryrun
-    
-    ###
-
-    cmd_args = args[:]
-
-    ## command dispatch...
-    if '-h' in args or '--help' in args:
-        avn_help()
-        
-    if len(args)>=2 and args[0] == 'tag':
-        cmd_args = avn_tag(args)
-        
-    elif len(args)>=1 and args[0] == 'lstags':
-        cmd_args = avn_lstags(args)
-        pass
-
-    if len(args) >= 2 and args[0] == 'ls':
-        cmd_args = avn_ls(args)
-
-    if len(args) >= 3 and args[0] == 'diff':
-        cmd_args = avn_diff(args)
-
-    args = ['svn']
-    do_mung = True # remember if next arg has to munged or not
-    for s in cmd_args:
-        args.append(mungarg(s,do_mung=do_mung))
-        do_mung = True
-        if s in ('-m', '--message'):
-            do_mung = False
-
-    cmd = subprocess.list2cmdline(args)
-    print cmd
-    sc = 0
-    if not avn.dryrun:
-        sc = subprocess.call(args)
-
-    return sc
-
-if __name__ == "__main__":
-    import sys
-    args = sys.argv[1:]
-    sys.exit(main(args))
-    
diff --git a/Tools/PyUtils/bin/build_cmt_pkg_db.py b/Tools/PyUtils/bin/build_cmt_pkg_db.py
deleted file mode 100755
index e207f677100a6e2b6789e9ff96579bff30a29295..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/bin/build_cmt_pkg_db.py
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file:    PyUtils/bin/build_cmt_pkg_db.py
-# @purpose: build the static list of packages (and their dependencies) of a
-#           given project
-# @author:  Sebastien Binet <binet@cern.ch>
-# @date:    June 2008
-#
-# @example:
-#  build_cmt_pkg_db AtlasCore
-#  build_cmt_pkg_db -p AtlasCore -o atlas_core_cmt_db.pkl
-#  build_cmt_pkg_db --project AtlasCore -o atlas_core_cmt.db
-
-__version__ = "$Revision: 1.2 $"
-
-from optparse import OptionParser
-
-import os, sys, commands
-
-import PyCmt.Logging as L
-from PyCmt import Cmt
-
-if __name__ == "__main__":
-
-    parser = OptionParser(usage='usage: %prog [options] [-p] ProjectName [[-o] OutputDb]')
-    p = parser.add_option
-    p('-p', '--project',
-      dest='project',
-      help='name of the project to inspect and build the package-db')
-
-    p('-o', '--output',
-      dest='output',
-      help='name of the output file where to store the package-db (shelve)')
-
-    p('-l', '--level',
-      dest='log_lvl',
-      default='INFO',
-      help='logging level (aka verbosity)')
-
-    (options, args) = parser.parse_args()
-
-    if len(args) > 0 and args[0][0] != "-":
-        options.project = args[0]
-        pass
-
-    if len(args) > 1 and args[1][0] != "-":
-        options.output = args[1]
-        pass
-
-    if options.project is None:
-        str(parser.print_help() or '')
-        raise SystemExit(1)
-
-    if options.output is None:
-        options.output = 'proj_%s_cmt_pkg_shelve.db' % options.project.lower()
-    options.output = os.path.expanduser (options.output)
-    options.output = os.path.expandvars (options.output)
-    options.output = os.path.realpath   (options.output)
-    
-
-    options.log_lvl = options.log_lvl.upper()
-    if hasattr(L.logging, options.log_lvl):
-        lvl = getattr(L.logging, options.log_lvl)
-    else:
-        print "*"*80
-        print "BootStrap: Unknown logging level [%s] !!" % options.log_lvl
-        print "BootStrap: Defaulting to [INFO]..."
-        print "*"*80
-        lvl = L.logging.INFO
-
-    cmt = Cmt.CmtWrapper(lvl)
-    
-    msg = cmt.msg
-    msg.info ('building dependencies...')
-
-##     _allowed_output_db_formats = ('.pkl',)
-##     _ext = os.path.splitext (options.output)[1]
-##     if not _ext in _allowed_output_db_formats:
-##         msg.error ('unknown output-db format: [%s]', _ext)
-##         msg.error ('allowed formats are %r', _allowed_output_db_formats)
-##         raise SystemExit(1)
-
-##     if _ext == '.pkl':
-##         try:
-##             import cPickle as pickle
-##         except ImportError:
-##             import pickle
-##         ofile = open (options.output, 'w')
-##     else:
-##         pass
-    if os.path.exists (options.output):
-        os.unlink (options.output)
-    import shelve
-    out_db = shelve.open (options.output)
-    msg.info ('project used: %sRelease', options.project)
-    msg.info ('output-db:    %s',        options.output)
-
-    import tempfile,atexit,shutil
-    tmp_root = tempfile.mkdtemp()
-    atexit.register (shutil.rmtree, tmp_root)
-    cwd = os.getcwd()
-    os.chdir (tmp_root)
-
-    cmt_tmp_dir = os.path.join (os.path.realpath (tmp_root),
-                                'Dep%s'%options.project,
-                                'cmt')
-    if not os.path.exists (cmt_tmp_dir):
-        os.makedirs (cmt_tmp_dir)
-
-    os.chdir (cmt_tmp_dir)
-
-    proj_releases  = [cmt.project_release(options.project)]
-    proj_releases += [cmt.project_release(d)
-                      for d in cmt.project_deps(options.project)]
-    msg.debug('==> proj_releases: %s', proj_releases)
-    
-    req = open ('requirements', 'w')
-    req.writelines (os.linesep.join ([
-        "package Dep%s" % options.project,
-        "",
-        "author AtlasCollaboration",
-        ""
-        "".join( [ "use %s *\n" % p for p in proj_releases ] ),
-        ""
-        ]))
-    req.close()
-    sc, out = commands.getstatusoutput ('%s config'%cmt.bin)
-    if sc != 0:
-        err = "*** problem running [cmt config] ! ***\n%s" % out
-        raise RuntimeError(err)
-    else:
-        msg.debug ('[cmt config] cmd was OK')
-        
-    sc, out = commands.getstatusoutput ('%s show uses >| uses.%s.cmt'%\
-                                        (cmt.bin, options.project))
-    if sc != 0:
-        err = "*** problem running [cmt show uses] ! ***\n%s"%out
-        raise RuntimeError(err)
-    else:
-        msg.debug ('[cmt show uses >| uses.%s.cmt] cmd was OK',
-                   options.project)
-
-    msg.info ('building package db...')
-    pkg_db = Cmt.buildPkgDb ('uses.%s.cmt'%options.project, msg)
-
-    msg.info ('building dependency graph...')
-    db = Cmt.buildDepGraph ('uses.%s.cmt'%options.project, pkg_db, msg)
-    
-    os.chdir(cwd)
-    out_db[options.project] = db
-    out_db.close()
-
-    msg.info ('nbr of packages: %i', len(db.pkgs()))
-##     pkgs = db.pkgs().keys()[:10]
-##     for i in pkgs:
-##         msg.info('\t%s',i)
-    raise SystemExit(0)
-
diff --git a/Tools/PyUtils/bin/cmtClients.py b/Tools/PyUtils/bin/cmtClients.py
deleted file mode 100755
index 673aadafcb18e5de2ac447dcf24cb0cf7d569eeb..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/bin/cmtClients.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-## @author: Sebastien Binet
-## @file : cmtClients.py
-## @brief: A little wrapper around cmt.exe show clients
-
-__version__ = "$Revision: 1.4 $"
-__author__  = "Sebastien Binet"
-
-import sys
-from PyCmt import Cmt
-
-if __name__ == "__main__":
-
-    from optparse import OptionParser
-    parser = OptionParser(usage="usage: %prog [options] [-p] PkgName")
-    parser.add_option(
-        "-p",
-        "--pkg",
-        dest = "pkgName",
-        help = "The name of the package one wants to see the clients"
-        )
-    parser.add_option(
-        "--co",
-        action = "store_true",
-        dest   = "doCheckOut",
-        default= False,
-        help = "Switch to check out the list of client of the given package"
-        )
-    parser.add_option(
-        "-l",
-        "--level",
-        dest = "logLvl",
-        default = "INFO",
-        help = "Logging level (aka verbosity)"
-        )
-
-    (options, args) = parser.parse_args()
-
-    if len(args) > 0 and args[0][0] != "-":
-        options.pkgName = args[0]
-        pass
-    
-    if options.pkgName == None:
-        str(parser.print_help() or "")
-        sys.exit(1)
-
-    options.logLvl = options.logLvl.upper()
-    import PyCmt.Logging as L
-    if hasattr(L.logging, options.logLvl):
-        lvl = getattr(L.logging, options.logLvl)
-    else:
-        print "*"*80
-        print "BootStrap: Unknown logging level [%s] !!" % options.logLvl
-        print "BootStrap: Defaulting to [INFO]..."
-        print "*"*80
-        lvl = L.logging.INFO
-    
-    cmt = Cmt.CmtWrapper( lvl )
-    cmt.msg.info( "cmt show clients [%s]", options.pkgName )
-    clients = cmt.showClients( options.pkgName )
-
-    if options.doCheckOut:
-        def do_checkout (pkg):
-            cmt.checkOut (pkg.fullName(), pkg.version)
-        try:
-            import multiprocessing as mp
-            nworkers = min (mp.cpu_count(), 4)
-            workers = mp.Pool(processes=nworkers)
-            res = workers.map_async (func=do_checkout, iterable=clients)
-            res = res.get()
-        except ImportError: # no multiprocessing module
-            for client in clients:
-                res = do_checkout(client)
-        
-    sys.exit(0)
-    pass
-
diff --git a/Tools/PyUtils/bin/dump-athfile.py b/Tools/PyUtils/bin/dump-athfile.py
index 348ee0fb47efd7fb9a253e6d5ceadd8de1770f10..23423684cbb759e8e040c5bbea8251319c52836b 100755
--- a/Tools/PyUtils/bin/dump-athfile.py
+++ b/Tools/PyUtils/bin/dump-athfile.py
@@ -125,22 +125,24 @@ if __name__ == "__main__":
         print fmt % ('conditions tag', f.infos['conditions_tag'])
         _metadata = f.infos['metadata']
 
-        # ATEAM-162: determine if this is 25ns or 50ns sub-campaign
-        DigitizationParameters = _metadata['/Digitization/Parameters'] if '/Digitization/Parameters' in _metadata.keys() else {}
-        if 'bunchSpacing' in DigitizationParameters.keys() and 'BeamIntensityPattern' in DigitizationParameters.keys() :
-            bunchSlotLength = DigitizationParameters['bunchSpacing']
-            pattern = DigitizationParameters['BeamIntensityPattern']
-            firstBunch = pattern.index(1.0)
-            bunchCountInTwoFirstSlots = pattern[firstBunch:firstBunch+2].count(1.0)
-            if bunchCountInTwoFirstSlots == 1:
-                campaign = '50 ns'
-            elif bunchCountInTwoFirstSlots == 2:
-                campaign = '25 ns'
-            else:
-                campaign = None
-            print fmt % ('bunch spacing',   campaign + ' i.e. ..., ' + str(pattern[firstBunch:firstBunch+4])[1:-1] + ', ...')
-
-        _metadata = _metadata.keys() if isinstance(_metadata,dict) else None
+        if _metadata is not None:
+            # ATEAM-162: determine if this is 25ns or 50ns sub-campaign
+            DigitizationParameters = _metadata['/Digitization/Parameters'] if '/Digitization/Parameters' in _metadata.keys() else {}
+            if DigitizationParameters is not None and 'bunchSpacing' in DigitizationParameters.keys() and 'BeamIntensityPattern' in DigitizationParameters.keys() :
+                bunchSlotLength = DigitizationParameters['bunchSpacing']
+                pattern = DigitizationParameters['BeamIntensityPattern']
+                if pattern is not None:
+                    firstBunch = pattern.index(1.0)
+                    bunchCountInTwoFirstSlots = pattern[firstBunch:firstBunch+2].count(1.0)
+                    if bunchCountInTwoFirstSlots == 1:
+                        campaign = '50 ns'
+                    elif bunchCountInTwoFirstSlots == 2:
+                        campaign = '25 ns'
+                    else:
+                        campaign = None
+                    print fmt % ('bunch spacing',   campaign + ' i.e. ..., ' + str(pattern[firstBunch:firstBunch+4])[1:-1] + ', ...')
+
+            _metadata = _metadata.keys() if isinstance(_metadata,dict) else None
         print fmt % ('meta data',      _metadata)
 
         msg.info(':'*80)
diff --git a/Tools/PyUtils/bin/gen-typereg-dso.py b/Tools/PyUtils/bin/gen-typereg-dso.py
deleted file mode 100755
index 0e1b74e59724e28813bcdff2e7dc72b4e73cec04..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/bin/gen-typereg-dso.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils/bin/gen-typereg-dso.py
-# @purpose a python script to workaround various limitations of rootmap files
-#          and reflex/cint typename impedance mismatches
-# @author Sebastien Binet <binet@cern.ch>
-# @date   February 2009
-
-__doc__ = '''a python script to workaround various limitations of rootmap
-files and reflex/cint typename impedance mismatches.
-'''
-__version__ = '$Revision: 1.1 $'
-__author__ = 'Sebastien Binet <binet@cern.ch>'
-
-
-if __name__ == "__main__":
-    import sys
-    import os
-    import PyUtils.Dso as Dso
-    oname = 'typereg_dso_db.csv'
-    if len(sys.argv) > 1:
-        oname = sys.argv[1]
-    else:
-        from PyCmt.Cmt import CmtWrapper
-        project_root = CmtWrapper().projects()[0]
-        from PyUtils.path import path
-        oname = path(project_root) / "InstallArea" / "share" / oname
-        if not os.path.exists(oname.dirname()):
-            os.makedirs(oname.dirname())
-            pass
-    rflx_names = Dso.gen_typeregistry_dso(oname)
-    sys.exit(0)
diff --git a/Tools/PyUtils/bin/lstags b/Tools/PyUtils/bin/lstags
deleted file mode 100755
index 1b954e0d54c41bf7b499382703316af88f056f00..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/bin/lstags
+++ /dev/null
@@ -1,167 +0,0 @@
-#!/usr/bin/env python
-#
-# @file:    lstags
-# @purpose: List the version (tag) of the currently checked out packages.
-#           Optionally compare to the release version and most recent version.
-#           Inspired by BaBar's 'statusrel' command.
-# @author:  Frank Winklmeier
-#
-
-import sys, os
-from PyCmt import Cmt
-from PyUtils.WorkAreaLib import get_latest_pkg_tag
-from PyUtils.Decorators import memoize
-
-class Package:
-   def __init__(self, name, version = None, path = ''):
-      self.name = name
-      self.version = version
-      self.path = path
-
-
-@memoize
-def read_pkg_file(filename):
-   """Read a packages.txt file and cache the content if already read"""
-   try:
-      lines = open(filename).readlines()
-   except:
-      lines = []
-   pkgs = {}
-   for l in lines:
-      if l.startswith('#'): continue
-      name,tag = l.split()
-      pkgs[name] = tag
-   return pkgs
-   
-
-def cmake_get_pkg_version(fullPkgName):
-   """Get version of package in the release"""
-
-   cpath = os.environ.get('CMAKE_PREFIX_PATH','')
-   workDir = os.environ.get('WorkDir_DIR')
-   for cdir in cpath.split(os.pathsep):
-      if (workDir and cdir.find(workDir)!=-1): continue
-      pkgs = read_pkg_file(os.path.join(cdir,'packages.txt'))
-      if fullPkgName in pkgs:
-         return pkgs[fullPkgName]
-
-   return None
-   
-def get_pkg_version(fullPkgName, cmt=None):
-   if cmt==None:
-      v = cmake_get_pkg_version(fullPkgName)
-   else:
-      v = cmt.get_pkg_version(fullPkgName)
-   return v if v!=None else "NOT_FOUND"
-
-def cmt_get_packages(testArea, pkgSupList):
-   """Get locally checked out packages"""
-
-   from PyUtils.WorkAreaLib import scan
-   cmtPackages = scan( testArea, pkgSupList )
-   pkgs = [Package(p.name,p.version,p.path) for p in cmtPackages]
-   return pkgs
-
-def cmake_get_packages(testArea, pkgSupList):
-   """Get locally checked out packages"""
-
-   from PyUtils.WorkAreaLib import listCMakeDirs
-   pkgs = []
-   for p in listCMakeDirs(testArea):
-      name = os.path.basename(p)
-      path = os.path.dirname(p)
-      if name not in pkgSupList:
-         try:
-            version = open(os.path.join(p,'version.cmake')).read().strip()
-         except:
-            version = 'UNKNOWN'
-         pkgs.append(Package(name,version,path))
-   return pkgs
-
-def main():
-
-   import logging
-   logging.basicConfig(level = logging.WARNING)
-   log = logging.getLogger("lstags")
-   
-   import optparse
-   parser = optparse.OptionParser(description="List the version of the locally checked out packages.")
-   
-   parser.add_option("-d", "--differ", action="store_true", dest="differ",
-                     help="only show tags that differ")
-   parser.add_option("-r", "--recent", action="store_true", dest="recent",
-                     help="show most recent tag in SVN")
-   parser.add_option("-q", "--quiet", action="store_true", dest="quiet",
-                     help="only print package name (e.g. as input to pkgco/svnco)")
-   parser.add_option("-f", "--fullName", action="store_true", dest="fullName",
-                     help="print full package name including all containers")
-   parser.add_option("-c", "--coCmd", action="store_true", dest="coCmd",
-                     help="display checkout command")
-   parser.add_option("-n", "--nosupression", action="store_true", dest="nosup",
-                     help="do not use default package supression list")
-   
-   (opt, args) = parser.parse_args()
-
-   # Some consistency checks
-   if (opt.coCmd):
-      opt.fullName = True
-      opt.quiet = True
-      opt.recent = False
-      
-   if (opt.nosup): pkgSupList = []
-   else: pkgSupList = ["WorkArea"]
-
-   if 'CMAKE_PREFIX_PATH' in os.environ:
-      cmt = None
-   else:
-      cmt = Cmt.CmtWrapper()
-
-   testArea = os.environ.get("TestArea")
-   if testArea==None:
-      log.fatal("TestArea environment variable not set. Setup your test release first.")
-      return 1
-   
-   if cmt==None:
-      packages = cmake_get_packages(testArea, pkgSupList)
-   else:
-      packages = cmt_get_packages(testArea, pkgSupList)
-   
-   for pkg in packages:
-      pkgContainer = pkg.path.replace(testArea,"").lstrip("/")
-      fullPkgName = pkgContainer + "/" + pkg.name
-
-      if (opt.differ or not opt.quiet):    # Need to know the release version of pkg
-         testversion = get_pkg_version(fullPkgName,cmt)
-      
-      if (not opt.differ or testversion!=pkg.version):
-         prefix = ""
-         if (opt.fullName): prefix = pkgContainer+"/"
-
-         release = os.environ.get("AtlasVersion","Release")
-         msg = prefix+pkg.version;
-         
-         if (not opt.quiet):
-            msg += "  (%s uses %s)" % (release,testversion)
-            
-         if (opt.recent):
-            headversion = get_latest_pkg_tag(fullPkgName)   # this is just using SVN, not CMT
-            if headversion==None: headversion="NONE"
-            msg += "  (most recent %s)" % (headversion)
-
-         if (opt.coCmd):
-            if cmt==None:
-               msg = "svnco.py %s" % pkg.version
-            else:
-               msg = "cmt co -r %s %s" % (pkg.version,fullPkgName)
-            
-         print msg
-
-   return 0
-
-
-if __name__ == "__main__":
-   try:
-      sys.exit(main())
-   except KeyboardInterrupt:
-      sys.exit(1)
-      
diff --git a/Tools/PyUtils/bin/pkgco.py b/Tools/PyUtils/bin/pkgco.py
deleted file mode 100755
index 9d5ee1f95981fb7d8e7646d6e1b1dc347d3fd2aa..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/bin/pkgco.py
+++ /dev/null
@@ -1,262 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-# @file:    pkgco.py
-# @purpose: Checkout a given package. Find container names and release tag
-#           if not explicitly given (inspired by BaBar's 'addpkg' command).
-# @author:  Frank Winklmeier
-#
-# $Id: pkgco,v 1.4 2009/03/25 14:25:46 fwinkl Exp $
-
-__version__ = "$Revision: 1.4 $"
-__author__  = "Frank Winklmeier"
-
-import sys
-import os
-import getopt
-import string
-import subprocess
-from PyCmt import Cmt
-
-try:
-   import multiprocessing as mp
-except ImportError:
-   mp = None
-
-cmt = Cmt.CmtWrapper()
-
-def usage():
-   print """\
-Usage: pkgco.py [OPTION]... PACKAGE...
-
-Checkout PACKAGE from the release. Possible formats:
-  Package                  find container and checkout tag in release
-  Package-X-Y-Z            find container and checkout specified tag
-  Container/Package        checkout tag in release
-  Container/Package-X-Y-Z  checkout specified tag
-
-where OPTION is:
-  -A    checkout the HEAD/trunk of the package(s)
-  -f    FILE contains PACKAGE list (one per line)
-  -s    only show package version, no checkout
-  -r    show most recent version, no checkout
-"""
-   return
-
-def findPkg(pkg):
-  """Find package version in release."""
-
-  cmtPkg = cmt.find_pkg(name=pkg)
-  
-  if cmtPkg:
-    return os.path.join(cmtPkg.path,cmtPkg.name)
-  else:
-    raise RuntimeError, "Package '%s' does not exist" % pkg         
-
-
-def svn_tag_equals_trunk(pkg,tag):
-   """Do an SVN diff of pkg/tag with trunk
-
-   Return: True/False
-   """
-
-   env = dict(os.environ)
-   
-   svnroot = env.get("SVNROOT", None)
-   if svnroot is None:
-      raise RuntimeError, "SVNROOT is not set"
-
-   pkg_url = os.path.join(svnroot, pkg)
-   if pkg.startswith('Gaudi'):
-      env['GAUDISVN'] = env.get('GAUDISVN',
-                                'http://svn.cern.ch/guest/gaudi')
-      svnroot = env['SVNROOT'] = '${GAUDISVN}/Gaudi'
-      env['SVNTRUNK'] = 'trunk'
-      env['SVNTAGS'] = 'tags'
-      tag_url = '/'.join([svnroot, 'tags', pkg])
-      trunk_url = '/'.join([svnroot, 'trunk', pkg])
-   else:
-      tag_url = '/'.join([svnroot, pkg, 'tags', tag])
-      trunk_url= '/'.join([svnroot, pkg, 'trunk'])
-      pass
-   cmd = 'svn diff %(tag_url)s %(trunk_url)s' % {'tag_url':tag_url,
-                                                 'trunk_url':trunk_url}
-
-   p = subprocess.Popen(cmd, stdout = subprocess.PIPE, shell=True, env=env)
-   stdout,stderr = p.communicate()
-   if stderr!=None:
-      print stderr
-      return False
-   
-   return len(stdout)==0
-
-      
-def checkout(pkg, head, doCheckOut=True, showRecent=False):
-   """Checkout one package."""
-   
-   tag = ""
-   # If "-" in name, tag was given
-   if pkg.find('-') != -1:
-      tag = pkg.split('/')[-1]   # remove container packages
-      pkg = pkg.split('-',1)[0]  # package name
-      
-   # If no "/" in name, need to find full package path
-   if pkg.find('/')==-1: pkg = findPkg(pkg)      
-
-   # Remove leading "/" for CMT checkout
-   pkg = string.lstrip(pkg, "/")
-
-   # special treatment of Gaudi packages...
-   if pkg.startswith('Gaudi'):
-      env = dict(os.environ)
-      env['GAUDISVN'] = env.get('GAUDISVN',
-                                'http://svn.cern.ch/guest/gaudi')
-      env['SVNROOT'] = '%(GAUDISVN)s/Gaudi' % env
-      env['SVNTRUNK'] = 'trunk'
-      env['SVNTAGS'] = 'tags'
-
-      env['pkg'] = pkg
-      if head:
-         cmd = 'svn co %(SVNROOT)s/%(SVNTRUNK)s/%(pkg)s %(pkg)s' % env
-      else:
-         if len(tag)==0:
-            tag = cmt.get_pkg_version(pkg)      
-            if tag is None:
-               raise RuntimeError, "Could not find any tag for '%s'" % pkg
-         env['tag'] = tag
-         cmd = 'svn co %(SVNROOT)s/%(SVNTAGS)s/%(pkg)s/%(tag)s %(pkg)s' % env
-         pass
-      #print ">>> [%s]" % cmd
-      if doCheckOut:
-         subprocess.check_call(cmd,
-                               shell=True,
-                               env=env)
-         subprocess.check_call("cd %(pkg)s/cmt && cmt config" % env,
-                               shell=True,
-                               env=env)
-         
-      else:
-         msg = "%s %s" % (tag,pkg)
-         if (showRecent):
-            headversion = cmt.get_latest_pkg_tag(pkg)
-            if not (headversion is None):
-               istrunk = svn_tag_equals_trunk(pkg,headversion)
-            else:
-               istrunk = False
-               headversion="NONE"
-
-            msg += "  (most recent %s %s trunk)" % (headversion, "==" if istrunk else "!=")
-
-
-         print msg
-      return
-   
-   if head:
-      cmd = "cmt co %r" % pkg
-      subprocess.check_call(cmd, shell=True)
-      return
-   
-   if len(tag)==0:
-      tag = cmt.get_pkg_version(pkg)      
-      if tag is None:
-         raise RuntimeError, "Could not find any tag for '%s'" % pkg
-
-   if doCheckOut:
-      subprocess.check_call("cmt co -r %s %s" % (tag,pkg),
-                            shell=True)
-   else:
-      msg = "%s %s" % (tag,pkg)
-      if (showRecent):
-         headversion = cmt.get_latest_pkg_tag(pkg)
-         if headversion!=None:
-            istrunk = svn_tag_equals_trunk(pkg,headversion)
-         else:
-            istrunk = False
-            headversion="NONE"
-
-         msg += "  (most recent %s %s trunk)" % (headversion, "==" if istrunk else "!=")
-
-            
-      print msg
-      
-   return
-   
-def safe_checkout(args):
-   try:
-      checkout(*args)
-   except RuntimeError, e:
-      print e
-      
-def main():
-
-   try:
-      opts,args = getopt.gnu_getopt(sys.argv[1:], "hAsrf:v", ["help","version"])
-   except getopt.GetoptError, e:
-      print e
-      usage()
-      return 1
-
-   # Parse command line
-   head = False
-   pkgFile = None
-   doCheckOut = True
-   showRecent = False
-   for o,a in opts:
-      if o == "-A":
-         head = True
-      elif o == "-f":
-         pkgFile = a
-      elif o == "-s":
-         doCheckOut = False
-      elif o == "-r":
-         showRecent = True
-         doCheckOut = False
-      elif o in ("-h", "--help"):
-         usage()
-         return 0
-      elif o in ("-v", "--version"):
-         print __version__.strip("$")
-         return 0
-      
-   if (pkgFile is None) and (len(args)==0):
-      usage()
-      return 1
-
-   # Read optional file with package tags
-   pkgList = args
-   if pkgFile:
-      try:
-         f = open(pkgFile)
-      except IOError:
-         print "Cannot open file '%s'." % pkgFile
-         return 2
-         
-      for line in f: pkgList.append(line.strip())
-
-   # Checkout packages
-   args = zip(pkgList,
-              [head]*len(pkgList),
-              [doCheckOut]*len(pkgList),
-              [showRecent]*len(pkgList))
-
-   # allow to process multiple packages in parallel
-   if mp and len(pkgList)>1 and doCheckOut:
-      print "enabling parallel checkout..."
-      pool = mp.Pool()
-      res = pool.map_async(safe_checkout, args)
-      res.get()
-   else:
-      map(safe_checkout, args)
-
-   return 0
-
-if __name__ == "__main__":
-   try:   
-      sys.exit(main())
-   except RuntimeError, e:
-      print e
-      sys.exit(1)
-   except KeyboardInterrupt:
-      sys.exit(1)
-      
diff --git a/Tools/PyUtils/bin/pool_extractFileIdentifier.py b/Tools/PyUtils/bin/pool_extractFileIdentifier.py
index 47c784db0584cf7937ab1d1e593e5040d35345c5..5ddac8c665655ef2fc58efd8e248e522a8b35002 100755
--- a/Tools/PyUtils/bin/pool_extractFileIdentifier.py
+++ b/Tools/PyUtils/bin/pool_extractFileIdentifier.py
@@ -27,11 +27,8 @@ def pool_extract(files):
         print exe
         return 1
 
-    import PyUtils.Helpers as H
-    with H.restricted_ldenviron(projects=('AtlasCore',)):
-        
-        cmd = "%s %s" % (exe, " ".join(files))
-        sc, out = commands.getstatusoutput(cmd)
+     cmd = "%s %s" % (exe, " ".join(files))
+     sc, out = commands.getstatusoutput(cmd)
 
     out = os.linesep.join(
         [o for o in out.splitlines()
diff --git a/Tools/PyUtils/bin/pool_insertFileToCatalog.py b/Tools/PyUtils/bin/pool_insertFileToCatalog.py
index 5aa4b96e46fc6c55c20f3dcf7c3a363c42a388d4..6d089397a13b3059c0e794195f8d76b057731a5e 100755
--- a/Tools/PyUtils/bin/pool_insertFileToCatalog.py
+++ b/Tools/PyUtils/bin/pool_insertFileToCatalog.py
@@ -30,11 +30,9 @@ def pool_insert(files, catalog_name="xmlcatalog_file:PoolFileCatalog.xml"):
         print exe
         return 1
 
-    import PyUtils.Helpers as H
-    with H.restricted_ldenviron(projects=('AtlasCore',)):
-        os.environ['POOL_CATALOG'] = catalog_name
-        cmd = "%s %s" % (exe, " ".join(files))
-        sc, out = commands.getstatusoutput (cmd)
+    os.environ['POOL_CATALOG'] = catalog_name
+    cmd = "%s %s" % (exe, " ".join(files))
+    sc, out = commands.getstatusoutput (cmd)
         
     out = os.linesep.join(
         [o for o in out.splitlines()
diff --git a/Tools/PyUtils/bin/setupWorkArea.py b/Tools/PyUtils/bin/setupWorkArea.py
deleted file mode 100755
index 36acaa7c596c06d1404f23bded59ffd3cce7f241..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/bin/setupWorkArea.py
+++ /dev/null
@@ -1,279 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-# @file: setupWorkArea.py
-# @purpose: fill the stubs of the WorkArea package so that all the local
-#           CMT packages can be recompiled in one go.
-# @date: June 2006
-# @author: Sebastien Binet
-
-# /!\ Warning /!\
-# I am relying on the following assumption:
-#  - you have a working Release environment
-#     ==> a valid CMTPATH environment variable
-#     ==> python-2.4 (this needs to be addressed!!)
-
-# example0:
-# ./setupWorkArea.py
-# ==> will :
-#  - install a CMT package called WorkArea under the first directory found
-#    in the CMTPATH environment variable
-#  - put use statements for all the CMT packages (recursively) found under
-#    the first directory of the CMTPATH environment variable
-
-# example1:
-# ./setupWorkArea.py -i ~/Athena/dev -S ~/cmtSuppressList -w $CMTPATH
-# ==> will :
-#  - install a CMT package called WorkArea under the dir. ~/Athena/dev
-#  - put use statements for all the CMT packages (recursively) found under
-#    the ':' separated list of paths (=$CMTPATH)
-#  - and only if these packages are not found in the cmtSuppressList
-
-# example2:
-# ./setupWorkArea.py -s "['Foo']"
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - remove any 'use statement' for packages called "Foo"
-
-# example3:
-# ./setupWorkArea.py --suppress-list "['Foo']"
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - remove any 'use statement' for packages called "Foo"
-
-# example4:
-# ./setupWorkArea.py --suppress-list "['Foo']" --runtime Core
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - remove any 'use statement' for packages called "Foo"
-# - use only the AtlasCoreRunTime environment
-
-# example5:
-# ./setupWorkArea.py -r Core
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - use only the AtlasCoreRunTime environment
-
-# example6:
-# ./setupWorkArea.py -g (or --group-area)
-# - install a CMT package called WorkArea under the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the first dir of $CMTPATH
-# - put use statements for all the CMT packages (recursively) found under
-#   the $GroupArea environment variable
-# Note that one can specify the ':' separated list of Group areas directories:
-# --group-area=${SomeVariable}:${GroupArea}:${SomethingElse}
-# -g ${MyGroupArea}
-
-import sys
-import os
-import getopt
-import string
-
-from PyUtils.Logging import logging
-
-__version__ = "$Revision: 1.7 $"
-
-##########################
-# recognized user options
-##########################
-_useropts = 's:i:hl:S:w:r:gv'
-_userlongopts = [ 'suppress-list=',  'install-dir=',
-                  'help',            'loglevel=',
-                  'suppress-file=',
-                  'work-area=',
-                  'runtime=',
-                  'group-area',
-                  'version' ]
-
-def _usage():
-   print """Accepted command line options (CLI):
-   -s, --suppress-list <list> ...  list of package names to ignore.
-   -S, --suppress-file <file> ...  path to a file containing the suppress list.
-   -i, --install-dir <path>   ...  directory where to install the WorkArea pkg
-   -w, --work-area <dir1:d2>  ...  directories under which the packages for the
-                                   WorkArea pkg are installed.
-   -g, --group-area <dir1:d2> ...  directories under which the packages for the
-                                   GroupArea are looked for.
-                                   If no argument is given, it will try to
-                                   look for the $GroupArea environment
-                                   variable.
-   -r, --runtime <runtimePkg> ...  runtime package one wants to work with.
-                                   Default is AtlasOfflineRunTime.
-                                   Allowed values: core, event, conditions,
-                                                   simulation, reconstruction,
-                                                   trigger, analysis,
-                                                   production, point1,
-                                                   offline
-   -h, --help                 ...  print this help message
-   -l, --loglevel <level>     ...  logging level (DEBUG, INFO, WARNING, ERROR, FATAL)
-   -v, --version              ...  print version number
-   """
-   return
-
-from PyUtils.WorkAreaLib import *
-
-def _processOptions( useropts, userlongopts ):
-
-    log = logging.getLogger("WorkAreaMgr")
-
-    runTimePkgAllowedValues = [ "core",
-                                "event",
-                                "conditions",
-                                "simulation",
-                                "reconstruction",
-                                "trigger",
-                                "analysis",
-                                "production",
-                                "point1",
-                                "tier0",
-                                "hlt",
-                                "offline",
-                                "manacore",
-                                ]
-    # defaults
-    workAreas  = []
-    installDir = None
-    runTimePkg = None # --> "offline" or what is in .asetup.save's [summary:AtlasProject]
-    suppressList = []
-    lvl = logging.INFO
-    
-    try:
-        optlist,args = getopt.getopt( sys.argv[1:],
-                                      useropts,
-                                      userlongopts )
-    except getopt.error:
-        log.error( "%s" % sys.exc_value )
-        _usage()
-        sys.exit(2)
-
-    for opt, arg in optlist:
-        if opt in ('-h', '--help' ):
-            _usage()
-            sys.exit()
-        elif opt in ('-v', '--version'):
-            print WORKAREA_VERSION
-            print "By Sebastien Binet"
-            sys.exit()
-        elif opt in ('-i', '--install-dir'):
-            installDir = os.path.expanduser( os.path.expandvars(arg) )
-        elif opt in ('-s', '--suppress-list'):
-            exec( 'suppressList += %s' % arg )
-            #suppressList = arg
-        elif opt in ('-S', '--suppress-file'):
-            suppressFileName = os.path.expanduser( os.path.expandvars(arg) )
-            if os.path.exists( suppressFileName ):
-                suppressFile = open( suppressFileName, 'r' )
-                for line in suppressFile.readlines():
-                    for l in line.splitlines():
-                        suppressList.append( l.strip() )
-                        pass
-                    pass
-                pass
-            else:
-                log.error("Could NOT access this file [%s]" % suppressFileName)
-                pass
-        elif opt in ('-w', '--work-area'):
-            workAreaDirs = os.path.expanduser( os.path.expandvars(arg) )
-            if workAreaDirs.count(os.pathsep) > 0:
-               workAreaDirs = workAreaDirs.split(os.pathsep)
-               pass
-            for workAreaDir in workAreaDirs:
-                if os.path.exists( workAreaDir ):
-                    if os.access(workAreaDir, os.R_OK):
-                        workAreas.append( os.path.abspath(workAreaDir) )
-                        pass
-                    else:
-                        log.error( "Can't read from [%s] !!" % workAreaDir )
-                        pass
-                    pass
-                else:
-                    log.error("Directory does NOT exists [%s] !" % workAreaDir)
-                    pass
-                pass
-        elif opt in ('-g', '--group-area'):
-           if len(arg) == 0:
-              arg = os.environ.get("GroupArea") or ""
-              pass
-           groupAreaDirs = os.path.expanduser( os.path.expandvars(arg) )
-           if groupAreaDirs.count(os.pathsep) > 0:
-              groupAreaDirs = groupAreaDirs.split(os.pathsep)
-              pass
-           for groupAreaDir in groupAreaDirs:
-              if os.path.exists( groupAreaDir ):
-                 if os.access(groupAreaDir, os.R_OK):
-                    workAreas.append( groupAreaDir )
-                    pass
-                 else:
-                    log.error( "Can't read from [%s] !!" % groupAreaDir )
-                    pass
-                 pass
-              else:
-                 log.error("Directory does NOT exists [%s] !" % groupAreaDir)
-                 pass
-              pass
-        elif opt in ('-r', '--runtime'):
-           if arg.lower() in runTimePkgAllowedValues:
-              runTimePkg = arg
-           else:
-              log.error( "Unknown runtime package [%s]" % arg )
-              log.error( "Must be one of: %s" % str(runTimePkgAllowedValues) )
-              pass
-        elif opt in ('-l', '--loglevel'):
-            lvl = string.upper( arg )
-            logLevel = getattr(logging, lvl)
-            log.setLevel(logLevel)
-            del lvl,logLevel
-            pass
-        else:
-            pass
-        pass
-
-    if runTimePkg is None:
-       # try to get it from .asetup.save
-       if os.path.exists('.asetup.save'):
-          import ConfigParser as _cp
-          cfg = _cp.SafeConfigParser()
-          try:
-             cfg.read(['.asetup.save'])
-          except _cp.ParsingError, err:
-             # .asetup.save file does not, generally, conform to MS Windows INI files syntax
-             log.debug('got these non-fatal parsing errors:\n%s' % err)
-          else:
-             if (cfg.has_section('summary') and
-                 cfg.has_option('summary', 'AtlasProject')):
-                try:
-                   v = cfg.get('summary', 'AtlasProject')
-                   v = v.lower()
-                   if v.startswith('atlas'):
-                      v = v[len('atlas'):]
-                      runTimePkg = v
-                      log.info('taking runtime package [%s] from .asetup.save',
-                               runTimePkg)
-                except Exception, err:
-                   log.info('got this non-fatal parsing error:\n%s' % err)
-                   log.info('taking runtime package [AtlasOffline] by default')
-                   runTimePkg = None # offline
-
-       # failing to determine runTimePkg,
-       # take it from env-var AtlasProject,
-       # or 'offline'
-
-    return workAreas, installDir, runTimePkg, suppressList
-    
-if __name__ == "__main__":
-
-    msg = logging.getLogger('WorkAreaMgr')
-    msg.setLevel(logging.INFO)
-    
-    ## process user options
-    workAreas,  installDir,  \
-    runTimePkg, suppressList = _processOptions( _useropts, _userlongopts )
-
-    createWorkArea( workAreas, installDir, runTimePkg, suppressList )
-    pass
diff --git a/Tools/PyUtils/bin/tabnanny-checker.py b/Tools/PyUtils/bin/tabnanny-checker.py
deleted file mode 100755
index 33c0e99eaa49044e7b15ea123953c7332081f154..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/bin/tabnanny-checker.py
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file:    tabnanny-checker.py
-# @purpose: simple command-line utility wrapping tabnanny
-# @author:  Sebastien Binet <binet@cern.ch>
-# @date:    July 2009
-#
-# @example:
-# @code
-# tabnanny-checker
-# tabnanny-checker AtlasCore
-# @endcode
-#
-from __future__ import with_statement
-
-__version__ = "$Revision$"
-__author__  = "Sebastien Binet <binet@cern.ch>"
-
-import sys
-import os
-import tabnanny
-import StringIO
-
-from optparse import OptionParser
-
-import PyCmt.Logging as _L
-import PyCmt.Cmt as PyCmt
-
-def process_path(p):
-    stdout = sys.stdout
-    output = ''
-    try:
-        sys.stdout = StringIO.StringIO()
-        tabnanny.check(p)
-        output = sys.stdout.getvalue()
-    finally:
-        sys.stdout = stdout
-    return output
-
-if __name__ == "__main__":
-
-    parser = OptionParser(usage="usage: %prog [options] [--project] AtlasCore")
-    parser.add_option("--project",
-                      dest = "project_name",
-                      default=None,
-                      help = "The name of the project to inspect" )
-
-    sc = 0
-    report = []
-    
-    (options, args) = parser.parse_args()
-    msg = _L.logging.getLogger("TabNanny")
-    msg.setLevel(_L.logging.INFO)
-    msg.info('TabNanny checker')
-    
-    project_names = None
-    if len(args) > 0:
-        project_names = [ arg for arg in args if arg[0] != "-" ]
-        pass
-
-    cmt = PyCmt.CmtWrapper()
-    if options.project_name is None:
-        if project_names is None:
-            # take the top-root project name
-            options.project_name = cmt.projects_dag()[0].name
-        else:
-            # FIXME
-            # take the first one... 
-            options.project_name = str(project_names[0])
-
-    # also allows to give a filename: early exit...
-    import os.path as osp
-    if osp.exists(options.project_name):
-        path = options.project_name
-        msg.info(':'*80)
-        msg.info('checking [%s]...', path)
-        output = process_path(path)
-        if len(output) > 0:
-            lines = output.splitlines()
-            for l in lines:
-                print l
-                report.append(l)
-            sc = 1
-        else:
-            msg.info('all good.')
-
-    else:
-        # retrieve the list of project names on which the
-        # selected project depends
-        projects = cmt.project_deps(options.project_name)
-
-        for project_name in projects:
-            project = cmt.projects_tree()[project_name]
-            msg.info(':'*80)
-            msg.info('checking [%s]...', project.name)
-            output = process_path(project.path)
-            if len(output) > 0:
-                lines = output.splitlines()
-                report.append("::: [%s] ::: (%i pbs)" % (
-                    project_name, len(lines)))
-                for l in lines:
-                    print l
-                    report.append(l)
-                sc = 1
-            else:
-                msg.info('all good.')
-        pass
-    
-    with open('tabnanny.report.txt', 'w') as out:
-        print >> out, ':'*80
-        print >> out, "::: TabNanny report"
-        for l in report:
-            print >> out, l
-        print >> out, ':'*80
-        pass
-    
-    msg.info("Bye.")
-    sys.exit(sc)
diff --git a/Tools/PyUtils/bin/tcSubmitTag.py b/Tools/PyUtils/bin/tcSubmitTag.py
deleted file mode 100755
index 43b8bb122b106b309e99821170a1ac3b8c2d8680..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/bin/tcSubmitTag.py
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-acmd.py tc submit-tag "$@"
diff --git a/Tools/PyUtils/doc/packagedoc.h b/Tools/PyUtils/doc/packagedoc.h
index f07f06cc1827019ce8cb24f79f8b553b5db2d036..3262eaeecae918c570e67629bf024b191955e02c 100644
--- a/Tools/PyUtils/doc/packagedoc.h
+++ b/Tools/PyUtils/doc/packagedoc.h
@@ -109,31 +109,7 @@ lxplus> diffPoolFiles.py mc1.event.pool mc2.event.pool
 ## Comparison : [OK]
 @endcode
 
-  - @c cmtClients.py : a wrapper around the slow 'cmt show clients' command. It provides the same functionality than the CMT command, only it is just super fast. It will also allow you to check out from CVS all the clients in one go (useful to check that a change in your package does not impact compilation of your clients):
-@code
-lxplus> cmtClients.py --help
-lxplus> cmtClients.py AthenaKernel
-PyCmt   : INFO     cmt show clients [AthenaKernel]
-PyCmt   : INFO     building dependencies...
-PyCmt   : INFO     projects used: ['AtlasCore', 'AtlasConditions', 'AtlasEvent', 'AtlasReconstruction', 'AtlasTrigger', 'AtlasAnalysis', 'AtlasSimulation', 'AtlasOffline', 'AtlasProduction']
-PyCmt   : INFO     building packages db...
-PyCmt   : INFO     building packages dependency tree...
-PyCmt   : INFO     => [PhysicsAnalysis/AnalysisCommon/AnalysisAssociation] (AnalysisAssociation-00-04-01)
-PyCmt   : INFO     => [PhysicsAnalysis/AnalysisCommon/AnalysisUtils] (AnalysisUtils-00-02-01)
-[...snip...]
-PyCmt   : INFO     Found [149] clients for [AthenaKernel]
-@endcode
-
-@ref used_PyUtils
-
-@ref requirements_PyUtils
 
-*/
 
-/**
-@page used_PyUtils Used Packages
-*/
 
-/**
-@page requirements_PyUtils Requirements
 */
diff --git a/Tools/PyUtils/python/AthFile/__init__.py b/Tools/PyUtils/python/AthFile/__init__.py
index 38008220272d037ab28a66a734ad46ca5ad05d55..2cea4ece006872bc7c6859514107243d6cde5a41 100644
--- a/Tools/PyUtils/python/AthFile/__init__.py
+++ b/Tools/PyUtils/python/AthFile/__init__.py
@@ -29,7 +29,7 @@ import impl as _impl
 import tests as _tests
 AthFile = _impl.AthFile
 
-from PyCmt.decorator import decorator as _dec
+from decorator import decorator as _dec
 @_dec
 def _update_cache(fct, *args):
     res = fct(*args)
diff --git a/Tools/PyUtils/python/AthFile/impl.py b/Tools/PyUtils/python/AthFile/impl.py
index 44aff7ac914450106a1f571eda5b78398cb17b8a..6fead604b850af5af49c02ac1b7c35da2d7c5e75 100644
--- a/Tools/PyUtils/python/AthFile/impl.py
+++ b/Tools/PyUtils/python/AthFile/impl.py
@@ -404,28 +404,25 @@ class AthFileServer(object):
     def _root_open(self, fname):
         import PyUtils.Helpers as H
         # speed-up by tampering LD_LIBRARY_PATH to not load reflex-dicts
-        import re, os
-        restrictedProjects = ['AtlasCore']
-        if "AthAnalysisBase_DIR" in os.environ or "AthSimulation_DIR" in os.environ: restrictedProjects=[] #special cases
-        with H.restricted_ldenviron(projects=restrictedProjects):
-            with H.ShutUp(filters=[
-                re.compile(
-                    'TClass::TClass:0: RuntimeWarning: no dictionary for.*'),
-                re.compile(
-                    'Warning in <TEnvRec::ChangeValue>: duplicate entry.*'
-                    ),
-                ]):
-                root_open = self.pyroot.TFile.Open
-                protocol, _ = self.fname(fname)
-                if protocol == 'https':
-                    _setup_ssl(self.msg, self.pyroot)
-                    root_open = self.pyroot.TWebFile
-                    pass
-                f = root_open(fname+"?filetype=raw", "read")
-                if f is None or not f:
-                    raise IOError(errno.ENOENT, 'No such file or directory',
-                                  fname)
-                return f
+        import re
+        with H.ShutUp(filters=[
+            re.compile(
+                'TClass::TClass:0: RuntimeWarning: no dictionary for.*'),
+            re.compile(
+                'Warning in <TEnvRec::ChangeValue>: duplicate entry.*'
+                ),
+            ]):
+            root_open = self.pyroot.TFile.Open
+            protocol, _ = self.fname(fname)
+            if protocol == 'https':
+                _setup_ssl(self.msg, self.pyroot)
+                root_open = self.pyroot.TWebFile
+                pass
+            f = root_open(fname+"?filetype=raw", "read")
+            if f is None or not f:
+                raise IOError(errno.ENOENT, 'No such file or directory',
+                              fname)
+            return f
         return
 
     def pfopen(self, fnames, evtmax=1):
@@ -1036,38 +1033,34 @@ class FilePeeker(object):
 
     def _root_open(self, fname, raw=False):
         import PyUtils.Helpers as H
-        restrictedProjects = ['AtlasCore']
-        import os
-        if "AthAnalysisBase_DIR" in os.environ or "AthSimulation_DIR" in os.environ: restrictedProjects=[] #special cases
-        with H.restricted_ldenviron(projects=restrictedProjects):
-            root = self.pyroot
-            import re
-            with H.ShutUp(filters=[
-                re.compile('TClass::TClass:0: RuntimeWarning: no dictionary for class.*'),
-                re.compile("Error in <T.*?File::Init>:.*? not a ROOT file")]):
-                # for AttributeListLayout which uses CINT for its dict...
-                # first try the APR version
-                ooo = root.gSystem.Load('libRootCollection')
-                if ooo < 0:
-                    # then try the POOL one
-                    root.gSystem.Load('liblcg_RootCollection')
-                root_open = root.TFile.Open
-
-                # we need to get back the protocol b/c of the special
-                # case of secure-http which needs to open TFiles as TWebFiles...
-                protocol, _ = self.server.fname(fname)
-                if protocol == 'https':
-                    _setup_ssl(self.msg(), root)
-                    root_open = root.TWebFile
-                if raw:
-                    f = root_open(fname+'?filetype=raw', 'READ')
-                else:
-                    f = root_open(fname, 'READ')
-                if f is None or not f:
-                    raise IOError(errno.ENOENT,
-                                  'No such file or directory',
-                                  fname)
-                return f
+        root = self.pyroot
+        import re
+        with H.ShutUp(filters=[
+            re.compile('TClass::TClass:0: RuntimeWarning: no dictionary for class.*'),
+            re.compile("Error in <T.*?File::Init>:.*? not a ROOT file")]):
+            # for AttributeListLayout which uses CINT for its dict...
+            # first try the APR version
+            ooo = root.gSystem.Load('libRootCollection')
+            if ooo < 0:
+                # then try the POOL one
+                root.gSystem.Load('liblcg_RootCollection')
+            root_open = root.TFile.Open
+
+            # we need to get back the protocol b/c of the special
+            # case of secure-http which needs to open TFiles as TWebFiles...
+            protocol, _ = self.server.fname(fname)
+            if protocol == 'https':
+                _setup_ssl(self.msg(), root)
+                root_open = root.TWebFile
+            if raw:
+                f = root_open(fname+'?filetype=raw', 'READ')
+            else:
+                f = root_open(fname, 'READ')
+            if f is None or not f:
+                raise IOError(errno.ENOENT,
+                              'No such file or directory',
+                              fname)
+            return f
         
     def _is_tag_file(self, fname, evtmax):
         is_tag = False
@@ -1077,101 +1070,90 @@ class FilePeeker(object):
         runs=[]
         evts=[]
         import PyUtils.Helpers as H
-        restrictedProjects = ['AtlasCore']
-        import os
-        if "AthAnalysisBase_DIR" in os.environ or "AthSimulation_DIR" in os.environ: restrictedProjects=[] #special cases
-        with H.restricted_ldenviron(projects=restrictedProjects):
-            root = self.pyroot
-            do_close = True
-            if isinstance(fname, basestring):
-                f = self._root_open(fname, raw=False)
-            else:
-                f = fname
-                do_close = False
-            schema = f.Get('Schema') if f else None
-            if schema:
-                is_tag  = True
-                # note: we used to use .rstrip('\0') b/c of the change in
-                # semantics in PyROOT (char[] and const char* may not mean
-                # the same thing)
-                # see https://savannah.cern.ch/bugs/?100920 for the gory details
-                # but in the end, we use ctypes...
-                # see https://savannah.cern.ch/bugs/?101200 for the gory details
-                import ctypes
-                tag_ref = str(ctypes.c_char_p(schema.m_eventRefColumnName).value)
-            del schema
-            metadata= f.Get('CollectionMetadata') if f else None
-            if metadata:
-                nbytes = metadata.GetEntry(0)
-                # note: we used to use .rstrip('\0') b/c of the change in
-                # semantics in PyROOT (char[] and const char* may not mean
-                # the same thing)
-                # see https://savannah.cern.ch/bugs/?100920 for the gory details
-                # but in the end, we use ctypes...
-                # see https://savannah.cern.ch/bugs/?101200 for the gory details
-                # 
-                # make sure it is what we think it is
-                import ctypes
-                key_name = str(ctypes.c_char_p(metadata.Key).value)
-                assert key_name == 'POOLCollectionID' 
-                tag_guid = str(ctypes.c_char_p(metadata.Value).value)
-            del metadata
-            coll_tree = f.Get('POOLCollectionTree') if f else None
-            if coll_tree:
-                nentries = coll_tree.GetEntries()
-                if evtmax in (-1, None):
-                    evtmax = nentries
-                evtmax = int(evtmax)
-                for row in xrange(evtmax):
-                    if coll_tree.GetEntry(row) < 0:
-                        break
-                    # With root 5.34.22, trying to access leaves of a
-                    # fundamental type like this gives an error:
-                    #   TypeError: attempt to bind ROOT object w/o class
-                    # Rewrite like this for now to work around the problem.
-                    #runnbr = coll_tree.RunNumber
-                    runnbr = coll_tree.GetBranch('RunNumber').GetListOfLeaves()[0].GetValueLong64()
-                    runs.append(runnbr)
-                    #evtnbr = coll_tree.EventNumber
-                    evtnbr = coll_tree.GetBranch('EventNumber').GetListOfLeaves()[0].GetValueLong64()
-                    evts.append(evtnbr)
-            del coll_tree
-            if f and do_close:
-                f.Close()
-                del f
+        root = self.pyroot
+        do_close = True
+        if isinstance(fname, basestring):
+            f = self._root_open(fname, raw=False)
+        else:
+            f = fname
+            do_close = False
+        schema = f.Get('Schema') if f else None
+        if schema:
+            is_tag  = True
+            # note: we used to use .rstrip('\0') b/c of the change in
+            # semantics in PyROOT (char[] and const char* may not mean
+            # the same thing)
+            # see https://savannah.cern.ch/bugs/?100920 for the gory details
+            # but in the end, we use ctypes...
+            # see https://savannah.cern.ch/bugs/?101200 for the gory details
+            import ctypes
+            tag_ref = str(ctypes.c_char_p(schema.m_eventRefColumnName).value)
+        del schema
+        metadata= f.Get('CollectionMetadata') if f else None
+        if metadata:
+            nbytes = metadata.GetEntry(0)
+            # note: we used to use .rstrip('\0') b/c of the change in
+            # semantics in PyROOT (char[] and const char* may not mean
+            # the same thing)
+            # see https://savannah.cern.ch/bugs/?100920 for the gory details
+            # but in the end, we use ctypes...
+            # see https://savannah.cern.ch/bugs/?101200 for the gory details
+            # 
+            # make sure it is what we think it is
+            import ctypes
+            key_name = str(ctypes.c_char_p(metadata.Key).value)
+            assert key_name == 'POOLCollectionID' 
+            tag_guid = str(ctypes.c_char_p(metadata.Value).value)
+        del metadata
+        coll_tree = f.Get('POOLCollectionTree') if f else None
+        if coll_tree:
+            nentries = coll_tree.GetEntries()
+            if evtmax in (-1, None):
+                evtmax = nentries
+            evtmax = int(evtmax)
+            for row in xrange(evtmax):
+                if coll_tree.GetEntry(row) < 0:
+                    break
+                # With root 5.34.22, trying to access leaves of a
+                # fundamental type like this gives an error:
+                #   TypeError: attempt to bind ROOT object w/o class
+                # Rewrite like this for now to work around the problem.
+                #runnbr = coll_tree.RunNumber
+                runnbr = coll_tree.GetBranch('RunNumber').GetListOfLeaves()[0].GetValueLong64()
+                runs.append(runnbr)
+                #evtnbr = coll_tree.EventNumber
+                evtnbr = coll_tree.GetBranch('EventNumber').GetListOfLeaves()[0].GetValueLong64()
+                evts.append(evtnbr)
+        del coll_tree
+        if f and do_close:
+            f.Close()
+            del f
         return (is_tag, tag_ref, tag_guid, nentries, runs, evts)
 
     def _is_empty_pool_file(self, fname):
         is_empty = False
-        import PyUtils.Helpers as H
-        restrictedProjects = ['AtlasCore']
-        import os
-        if "AthAnalysisBase_DIR" in os.environ or "AthSimulation_DIR" in os.environ: restrictedProjects=[] #special cases
-        with H.restricted_ldenviron(projects=restrictedProjects):
-            root = self.pyroot
-            do_close = True
-            if isinstance(fname, basestring):
-                f = self._root_open(fname, raw=False)
-            else:
-                f = fname
-                do_close = False
-            payload = f.Get('CollectionTree') if f else None
-            if payload:
-                is_empty = False
-            else:
-                is_empty = True
-            del payload
+        root = self.pyroot
+        do_close = True
+        if isinstance(fname, basestring):
+            f = self._root_open(fname, raw=False)
+        else:
+            f = fname
+            do_close = False
+        payload = f.Get('CollectionTree') if f else None
+        if payload:
+            is_empty = False
+        else:
+            is_empty = True
+        del payload
 
-            if f and do_close:
-                f.Close()
-                del f
+        if f and do_close:
+            f.Close()
+            del f
         return is_empty
      
     def _process_call(self, fname, evtmax, projects=['AtlasCore']):
         import os
-        if "AthAnalysisBase_DIR" in os.environ or "AthSimulation_DIR" in os.environ: projects=[] #special cases
         msg = self.msg()
-        import PyUtils.Helpers as H
         f = _create_file_infos()
         protocol, _ = self.server.fname(fname)
         f_raw  = self._root_open(fname, raw=True)
@@ -1195,15 +1177,13 @@ class FilePeeker(object):
                 # POOL files are most nutritious when known to PoolFileCatalog.xml
                 # FIXME: best would be to do that in athfile_peeker.py but
                 #        athena.py closes sys.stdin when in batch, which confuses
-                #        PyCmt.Cmt:subprocess.getstatusoutput
+                #        PyUtils:subprocess.getstatusoutput
                 #
                 # ATEAM-192: avoid the PoolFileCatalog.xml conflict
                 #cmd = ['pool_insertFileToCatalog.py',
                 #       file_name,]
                 #subprocess.call(cmd, env=self._sub_env)
                 #
-                #with H.restricted_ldenviron(projects=None):
-                # MN: disabled clean environ to let ROOT6 find headers
                 if True:
                     is_tag, tag_ref, tag_guid, nentries, runs, evts = self._is_tag_file(f_root, evtmax)
                     if is_tag:
diff --git a/Tools/PyUtils/python/AthFileLite.py b/Tools/PyUtils/python/AthFileLite.py
index 58f388bb9e0fef35a9e944d5cc28a7af71106b58..d61aead09aa2c3ddc0a571e2ce789edd7cc6cbc6 100644
--- a/Tools/PyUtils/python/AthFileLite.py
+++ b/Tools/PyUtils/python/AthFileLite.py
@@ -13,7 +13,7 @@ import sys
 import uuid
 
 import PyUtils.dbsqlite as dbsqlite
-from PyCmt.Logging import msg, logging
+from PyUtils.Logging import msg, logging
 
 def _create_file_info_template():
     """simple helper function to create consistent dicts for the
diff --git a/Tools/PyUtils/python/Cmt.py b/Tools/PyUtils/python/Cmt.py
deleted file mode 100644
index e49319906ee33846761afaa71147549596276e88..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/Cmt.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-## @author: Sebastien Binet
-## @file :  Cmt.py
-## @purpose: a little wrapper around cmt.exe to provide fast(er) access to the
-##           list of clients of a given package. It also provides a mean to
-##           retrieve all these clients...
-from __future__ import with_statement
-
-__version__ = "$Revision$"
-__author__  = "Sebastien Binet"
-
-raise ImportError('PyUtils.Cmt is deprecated. Please use PyCmt.Cmt instead')
diff --git a/Tools/PyUtils/python/Decorators.py b/Tools/PyUtils/python/Decorators.py
index 085743eb57bebc0164f1ea18770f4a6cb2c802e1..5865453eb6711ac760a7237b04df07c431a5d655 100644
--- a/Tools/PyUtils/python/Decorators.py
+++ b/Tools/PyUtils/python/Decorators.py
@@ -17,4 +17,193 @@ __all__ = [
     'async',
     ]
 
-from PyCmt.Decorators import *
+import sys
+import os
+import itertools
+from decorator import *
+
+@decorator
+def memoize(func, *args):
+    """This decorator implements the memoize pattern, i.e. it caches the result
+    of a function in a dictionary, so that the next time the function is called
+    with the same input parameters the result is retrieved from the cache and
+    not recomputed.
+    """
+    try:
+        mem_dict = getattr(func, "_mem_dict")
+    except AttributeError:
+        # look-up failed so we have to build the cache holder
+        mem_dict = {}
+        setattr(func, "_mem_dict", mem_dict)
+    try:
+        return mem_dict[args]
+    except KeyError:
+        # look-up failed so we have to build the result the first time around
+        # then we cache
+        mem_dict[args] = result = func(*args)
+        return result
+
+# FIXME: does not work... func is an instance of FunctionMaker which cannot
+#        be pickled...
+import __builtin__
+@decorator
+def mp_forking(func, *args, **kwargs):
+    import multiprocessing as mp
+    ## pool = mp.Pool (processes=1)
+    ## return pool.apply (func, *args, **kwargs)
+
+    # create a local queue to fetch the results back
+    def wrapping(func):
+        q = mp.Queue()
+        def wrap_fct(*args, **kwargs):
+            try:
+                res = func(*args, **kwargs)
+            # catch *everything* and 're-raise'
+            except BaseException,err:
+                #import traceback; traceback.print_exc()
+                res = err
+            q.put(res)
+        wrap_fct.q = q
+        return wrap_fct
+
+    func = wrapping(func)
+    proc = mp.Process(target=func, args=args, kwargs=kwargs)
+    proc.start()
+    res = func.q.get()
+    proc.join()
+    proc.terminate()
+    if isinstance(res, BaseException):
+        #import traceback; traceback.print_exc()
+        raise res
+        #reraise_exception(exc,exc_info)
+    return res
+
+def reraise_exception(new_exc, exc_info=None):
+    if exc_info is None:
+        exc_info = sys.exc_info()
+    _exc_class, _exc, tb = exc_info
+    raise new_exc.__class__, new_exc, tb
+    
+@decorator
+def forking(func, *args, **kwargs):
+    """
+    This decorator implements the forking patterns, i.e. it runs the function
+    in a forked process.
+    see:
+     http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/511474
+    """
+    import os
+    try:
+        import cPickle as pickle
+    except ImportError:
+        import pickle
+        
+    # create a pipe which will be shared between parent and child
+    pread, pwrite = os.pipe()
+
+    # do fork
+    pid = os.fork()
+
+    ## parent ##
+    if pid > 0:
+        os.close(pwrite)
+        with os.fdopen(pread, 'rb') as f:
+            status, result = pickle.load(f)
+        os.waitpid(pid, 0)
+        if status == 0:
+            return result
+        else:
+            remote_exc = result[0]
+            reraise_exception(remote_exc)
+            
+    ## child ##
+    else:
+        os.close(pread)
+        try:
+            result = func(*args, **kwargs)
+            status = 0
+        except (Exception, KeyboardInterrupt), exc:
+            import traceback
+            exc_string = traceback.format_exc(limit=10)
+            for l in exc_string.splitlines():
+                print "[%d]"%os.getpid(),l.rstrip()
+            result = exc, exc_string
+            status = 1
+        with os.fdopen(pwrite, 'wb') as f:
+            try:
+                pickle.dump((status,result), f, pickle.HIGHEST_PROTOCOL)
+            except pickle.PicklingError, exc:
+                pickle.dump((2,exc), f, pickle.HIGHEST_PROTOCOL)
+        os._exit(0)
+    pass # forking
+
+            
+### a decorator converting blocking functions into asynchronous functions
+#   stolen from http://pypi.python.org/pypi/decorator/3.0.0
+def _async_on_success(result): # default implementation
+    "Called on the result of the function"
+    return result
+
+def _async_on_failure(exc_info): # default implementation
+    "Called if the function fails"
+    _exc_class, _exc, tb = exc_info
+    raise _exc_class, _exc, tb
+    pass
+
+def _async_on_closing(): # default implementation
+    "Called at the end, both in case of success and failure"
+    pass
+
+class Async(object):
+    """
+    A decorator converting blocking functions into asynchronous
+    functions, by using threads or processes. Examples:
+
+    async_with_threads =  Async(threading.Thread)
+    async_with_processes =  Async(multiprocessing.Process)
+    """
+
+    def __init__(self, threadfactory):
+        self.threadfactory = threadfactory
+
+    def __call__(self, func,
+                 on_success=_async_on_success,
+                 on_failure=_async_on_failure,
+                 on_closing=_async_on_closing):
+        # every decorated function has its own independent thread counter
+        func.counter = itertools.count(1)
+        func.on_success = on_success
+        func.on_failure = on_failure
+        func.on_closing = on_closing
+        return decorator(self.call, func)
+
+    def call(self, func, *args, **kw):
+        def func_wrapper():
+            try:
+                result = func(*args, **kw)
+            except:
+                func.on_failure(sys.exc_info())
+            else:
+                return func.on_success(result)
+            finally:
+                func.on_closing()
+        name = '%s-%s' % (func.__name__, func.counter.next())
+        thread = self.threadfactory(None, func_wrapper, name)
+        thread.start()
+        return thread
+
+# default async decorator: using processes
+def async(async_type='mp'):
+    if async_type in ("mp", "multiprocessing"):
+        from multiprocessing import Process
+        factory = Process
+    elif async_type in ("th", "threading"):
+        from threading import Thread
+        factory = Thread
+    else:
+        raise ValueError ("async_type must be either 'multiprocessing' "
+                          "or 'threading' (got: %s)"%async_type)
+    async_obj = Async (factory)
+    return async_obj
+        
+    
diff --git a/Tools/PyUtils/python/FilePeekerTool.py b/Tools/PyUtils/python/FilePeekerTool.py
index ae8f1339b4885cd30134775597dc67de10c07076..41bc7a00538a23833e4932071fae2ab645f668f7 100644
--- a/Tools/PyUtils/python/FilePeekerTool.py
+++ b/Tools/PyUtils/python/FilePeekerTool.py
@@ -357,8 +357,10 @@ class FilePeekerTool():
                 peeked_data['stream_tags'] = stream_tags
 
         # AtlasRelease - reproduce AthFile behavior
-        project = os.environ ['AtlasProject']
-        version = os.environ ['AtlasVersion']
+        from AthenaCommon.AppMgr import release_metadata
+        rel_metadata = release_metadata()
+        project = rel_metadata['project name']
+        version = rel_metadata['release']
         release = project + '-' + version
 
         ## -- taginfo
diff --git a/Tools/PyUtils/python/Helpers.py b/Tools/PyUtils/python/Helpers.py
index e0b2db98994f02600b27b5a03bdfab8978f3c18c..19cd0cd27ebe35a4f868faa736c0adb2b455b87c 100644
--- a/Tools/PyUtils/python/Helpers.py
+++ b/Tools/PyUtils/python/Helpers.py
@@ -118,94 +118,3 @@ class ShutUp(object):
     def __exit__(self,exc_type, exc_val, exc_tb):
         return self.unMute()
     
-###
-from contextlib import contextmanager
-@contextmanager
-def restricted_ldenviron(projects=None, msg=None):
-    """
-    a context helper to limit ROOT automatic loading of dictionaries
-    to a given set of cmt-projects (LCGCMT, AtlasCore, ...)
-    """
-
-    if projects is None:
-        # nothing to do.
-        # execute user stuff
-        yield
-        # end of story
-        return
-
-    # Bypass the rest of the function in case CMake is used and not CMT
-    import os
-    if os.environ.get( 'CMTPATH', '' ) == '':
-       yield
-       return
-
-    if isinstance(projects, str):
-        projects = [p.strip() for p in projects.split() if p.strip() != '']
-    if not isinstance(projects, (list, tuple)):
-        raise TypeError("projects has to be a list, tuple or space-separated"
-                        " string")
-
-    import os, sys
-    from PyCmt.Cmt import CmtWrapper
-    cmt = CmtWrapper()
-    def _get_projects_paths(project_names, cmt=cmt):
-        """return the list of paths of a project and its dependencies
-        """
-        if isinstance(project_names, str):
-            project_names = project_names.split()
-        projects = []
-        for proj_name in project_names:
-            projects.extend(cmt.project_deps(proj_name) + [proj_name])
-        projects = list(set(projects))
-        proj_paths = []
-        tree = cmt.project_tree()
-        for p in projects:
-            path = tree[p].path
-            proj_paths.append(path)
-        return proj_paths
-        
-    # select only projects user asked for (and their dependencies)
-    usr_projects = _get_projects_paths(projects)
-    # get the same thing for all the projects we are currently using
-    cur_projects = _get_projects_paths(cmt.projects_dag()[0].name)
-    # intersect:
-    blacklist = [p for p in cur_projects if p not in usr_projects]
-    
-    original_env = os.environ.copy()
-    orig_ld_path = os.environ.get('LD_LIBRARY_PATH', '')
-    orig_bin_path= os.environ.get('PATH', '')
-    
-    if 0:
-        print ":::cmt projects:",usr_projects
-        print ":::blacklist:",blacklist
-
-    def _slim_down(orig_path, blacklist=blacklist):
-        """helper method to slim down a path by removing every entry which
-        starts with some element of the blacklist
-        """
-        new_path = []
-        for d in orig_path.split(os.pathsep):
-            # removing every entry which is in the blacklist
-            burned = [p for p in blacklist if d.startswith(p)]
-            if len(burned) == 0:
-                new_path.append(d)
-        return os.pathsep.join(new_path)
-            
-    # slim-down LD_LIBRARY_PATH
-    new_ld_path = _slim_down(orig_ld_path)
-    # and the PATH (to keep everything consistent)
-    new_bin_path= _slim_down(orig_bin_path)
-    
-    # commit the new values
-    os.environ['LD_LIBRARY_PATH'] = new_ld_path
-    os.environ['PATH'] = new_bin_path
-
-    # execute user stuff...
-    try:
-        yield
-    finally:
-        # restore original environment
-        os.environ.update(original_env)
-    
-        
diff --git a/Tools/PyUtils/python/Logging.py b/Tools/PyUtils/python/Logging.py
index 7e231771faf6d57861044d7b236d822725237660..9ad98606dd0146dddfff8faeafd7eb22226c67b7 100644
--- a/Tools/PyUtils/python/Logging.py
+++ b/Tools/PyUtils/python/Logging.py
@@ -10,4 +10,27 @@ __author__  = "Sebastien Binet"
 
 __all__ = ['msg', 'logging']
 
-from PyCmt.Logging import msg, logging
+try:
+    import AthenaCommon.Logging as L
+    msg = L.log
+    logging = L.logging
+except ImportError:
+    import logging
+    logging.VERBOSE = logging.DEBUG - 1
+    logging.ALL     = logging.DEBUG - 2
+    logging.addLevelName( logging.VERBOSE, 'VERBOSE' )
+    logging.addLevelName( logging.ALL, 'ALL' )
+    logging.basicConfig(level=logging.INFO,
+                        format="Py:%(name)-14s%(levelname)8s %(message)s")
+    cls = logging.getLoggerClass()
+    def verbose(self, msg, *args, **kwargs):
+        if self.manager.disable >= logging.VERBOSE:
+            return
+        if logging.VERBOSE >= self.getEffectiveLevel():
+            apply(self._log, (logging.VERBOSE, msg, args), kwargs)
+    cls.verbose = verbose
+    del verbose
+    
+    log = msg = logging.getLogger("Athena")
+    
+            
diff --git a/Tools/PyUtils/python/PoolFile.py b/Tools/PyUtils/python/PoolFile.py
index 199e022ceab6dba03d7705525b47b53d8f9f69fc..12883590794f88dc66760310c3f1dd6ee1cf1bb3 100644
--- a/Tools/PyUtils/python/PoolFile.py
+++ b/Tools/PyUtils/python/PoolFile.py
@@ -564,13 +564,12 @@ class PoolFile(object):
         else:
             import PyUtils.Helpers as _H
             projects = 'AtlasCore' if PoolOpts.FAST_MODE else None
-            with _H.restricted_ldenviron (projects=projects):
-                if self.verbose==True:
-                    print "## opening file [%s]..." % str(fileName)
-                self.__openPoolFile( fileName )
-                if self.verbose==True:
-                    print "## opening file [OK]"
-                self.__processFile()
+            if self.verbose==True:
+                print "## opening file [%s]..." % str(fileName)
+            self.__openPoolFile( fileName )
+            if self.verbose==True:
+                print "## opening file [OK]"
+            self.__processFile()
             
         return
 
diff --git a/Tools/PyUtils/python/WorkAreaLib.py b/Tools/PyUtils/python/WorkAreaLib.py
deleted file mode 100644
index 12d281abf687b1b5d64ebefa55180d49ad084913..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/WorkAreaLib.py
+++ /dev/null
@@ -1,465 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.WorkAreaLib
-# @purpose factor out some useful methods out of setupWorkArea for clients
-# @author Sebastien Binet
-
-import os, sys
-import subprocess
-from string import rstrip
-from PyCmt.Logging import logging
-from PyCmt.Cmt import CmtPkg, CmtStrings
-
-__version__ = '$Revision$'
-__author__  = 'Sebastien Binet'
-
-WORKAREA_VERSION = "WorkArea-00-00-00"
-
-# a list of directory names one should not bother inspecting
-_ignore_dir_list = [
-    "i686-",
-    "x86_64-",
-    "CVS",
-    ".svn",
-    "o..pacman..o",
-    "InstallArea",
-    ]
-
-def _get_currentpath():
-    from PyCmt.Cmt import CmtWrapper
-    cmt = CmtWrapper()
-    installarea = cmt.show(macro_value='CMTINSTALLAREA')
-    prefix = cmt.show(macro_value='cmt_installarea_prefix')
-    return installarea.rstrip(prefix).rstrip(os.sep)
-
-def _is_in_ignore_dir_list(pathname):
-    return any(map(pathname.count, _ignore_dir_list))
-
-def listCmtDirs( path ):
-    """Return the list of paths pointing at 'cmt' directories, accessible
-    from the `path` path.
-    """
-
-    msg = logging.getLogger( "WorkAreaMgr" )
-    
-    cmtDirs = []
-    
-    # fill list of CMT directories
-    for root, dirs, files in os.walk(path):
-        for d in dirs[:]:
-            if _is_in_ignore_dir_list(d):
-                dirs.remove(d)
-        for d in dirs:
-            if d == CmtStrings.CMTDIR:
-                full_name = os.path.join(root, d)
-                msg.debug("\t==> found %s" % full_name)
-                cmtDirs.append(full_name)
-    return cmtDirs
-
-def listCMakeDirs( path ):
-    """Return the list of paths pointing at 'CMake' directories, accessible
-    from the `path` path.
-    """
-
-    msg = logging.getLogger( "WorkAreaMgr" )    
-    cmakeDirs = []
-    
-    # fill list of CMake directories
-    for root, dirs, files in os.walk(path):
-        if _is_in_ignore_dir_list(root): continue
-        if 'version.cmake' in files:
-            msg.debug("\t==> found %s" % root)
-            cmakeDirs.append(root)
-    return cmakeDirs
-
-
-def get_latest_pkg_tag(fullPkgName):
-    """Return the most recent SVN tag of the package.
-
-    Return: Tag or None on error
-    """
-
-    msg = logging.getLogger( "WorkAreaMgr" )
-    svnroot = os.environ.get("SVNROOT")
-    if svnroot==None:
-        msg.error("SVNROOT is not set.")
-        return None
-
-    _cmd = "svn ls %s" % os.path.join(svnroot, fullPkgName, "tags")
-    if fullPkgName.startswith('Gaudi'):
-        _cmd = "svn ls %s" % os.path.join(svnroot, 'tags', fullPkgName)
-    msg.debug('running [%s]...', _cmd)        
-    p = subprocess.Popen(_cmd, shell = True,
-                         stdout = subprocess.PIPE, stderr = subprocess.PIPE)
-    tags = p.communicate()[0].splitlines()
-    if len(tags)==0 or p.returncode!=0: return None
-
-    pkg_name = os.path.basename(fullPkgName)
-
-    # enforce atlas convention of tags (pkgname-xx-yy-zz-aa)
-    tags = [t for t in tags if t.startswith(pkg_name)]
-    latest_tag = rstrip(tags[-1],"/\n ")
-    return latest_tag
-
-
-def scan( scanDir = os.curdir, suppressList = ["WorkArea"] ):
-    """Search for CMT packages in the given directory and walk down the
-    directory tree.
-    Return the list of found CMT packages.
-    """
-    msg = logging.getLogger( "WorkAreaMgr" )
-    msg.info( "Scanning [%s]" % scanDir )
-    
-    # return value
-    cmtPackages = []
-    
-    # retrieve all cmt-ised directories in the scan directory
-    scanDir = os.path.abspath( scanDir )
-
-    cmtDirs = []
-    try:
-        cmtDirs = listCmtDirs(scanDir)
-    except KeyboardInterrupt:
-        msg.warning( "Scanning has been STOPPED ! (by you)" )
-        pass
-    
-    for cmtDir in cmtDirs:
-        cmtPkg = createCmtPkg(cmtDir)
-        if cmtPkg != None and \
-           cmtPkg.name not in suppressList:
-            cmtPackages.append( cmtPkg )
-        pass
-    
-    return cmtPackages
-
-def createCmtPkg( cmtDir ):
-    """
-    the cmtDir is assumed to be of the form Xyz/cmt
-    One has also to handle the case with or without version-directory
-    """
-    msg = logging.getLogger("WorkAreaMgr")
-    
-    pkgName = None
-    # the CMTREQFILE should provide the name of package
-    # so we extract it from this file
-    try:
-        reqFile = open( os.path.join( cmtDir, CmtStrings.CMTREQFILE ), 'r' )
-        for line in reqFile.readlines():
-            line = line.strip()
-            if len(line) > 0  and \
-               line[0] != "#" and \
-               line.count("package ") > 0:
-                pkgName = line.splitlines()[0]\
-                          .split("package ")[1]\
-                          .replace("\r","")\
-                          .split("#")[0]\
-                          .strip()
-                break
-            pass
-        reqFile.close()
-        del reqFile
-    except IOError:
-        ## No CMTREQFILE in this directory
-        ## ==> not a CMT package then ?
-        ## check if there is any CMT project file instead
-        if not os.path.exists( os.path.join(cmtDir, CmtStrings.CMTPROJFILE) ):
-            msg.warning( "[%s] does NOT contain any '%s' nor '%s' file !!" % \
-                         ( cmtDir,
-                           CmtStrings.CMTREQFILE,
-                           CmtStrings.CMTPROJFILE ) )
-        return None
-
-    if pkgName == None:
-        msg.warning( "No 'package Foo' stmt in %s of %s" % \
-                     ( CmtStrings.CMTREQFILE, cmtDir ) )
-        return None
-    
-    msg.debug( "\t\t==> Analysing [%s]" % cmtDir )
-    
-    # first we try the no-version-directory case as it is the ATLAS
-    # default now.
-    if CmtStrings.CMTVERSIONFILE in os.listdir(cmtDir):
-        version = open( os.path.join( cmtDir, CmtStrings.CMTVERSIONFILE ),
-                        'r' )\
-                        .readline()
-        version = version.splitlines()[0].strip()
-        pkgDir = os.path.split(cmtDir)[0].strip()
-        pkgPath = os.path.split(pkgDir)[0].strip()
-        pass
-
-    # Now we *MAY* be in the case where:
-    # /somePath/MyPkg/MyPkg-00-00-00/cmt
-    # or
-    # /somePath/MyPkg/v1r2p3/cmt
-    # however this is not supported anymore: warn and fallback to previous
-    # case anyway (as user might have screwed up)
-    else:
-        msg.warning("No [%s] file in [%s] directory",
-                    CmtStrings.CMTVERSIONFILE,
-                    cmtDir)
-        msg.warning("Can't reliably infer package version/dir!")
-        version = '*'
-        pkgDir  = os.path.split(cmtDir)[0].strip()
-        pkgPath = os.path.split(pkgDir)[0].strip()
-        msg.warning("Will use:")
-        msg.warning( "\t\t\t- name    = %s" % pkgName )
-        msg.warning( "\t\t\t- version = %s" % version )
-        msg.warning( "\t\t\t- path    = %s" % pkgPath )
-        pass
-
-    msg.debug( "\t\t\t- name    = %s" % pkgName )
-    msg.debug( "\t\t\t- version = %s" % version )
-    msg.debug( "\t\t\t- path    = %s" % pkgPath )
-
-    if pkgName.count(os.sep) > 0 :
-       msg.warning( "About to create a funny CMT package !" )
-       msg.warning( "'PkgName' contains '%s'. Please fix it!" % os.sep )
-       msg.warning( "\t- name    = %s" % pkgName )
-       msg.warning( "\t- version = %s" % version )
-       msg.warning( "\t- path    = %s" % pkgPath )
-       # Ok, so, I fix it - but user is warned...
-       pkgName = os.path.basename(pkgName)
-       pass
-
-    return CmtPkg( pkgName, version, pkgPath )
-
-def createUseList(workAreas, suppressList = ["WorkArea"]):
-
-   msg = logging.getLogger( "WorkAreaMgr" )
-   cmtPackages = []
-   uses        = []
-   
-   for workArea in workAreas:
-      cmtPackages.extend( scan( workArea, suppressList ) )
-      pass
-
-   # Handle duplicate CMT packages:
-   pkgs = {}
-   duplicates = {}
-   for cmtPkg in cmtPackages:
-      if not pkgs.has_key(cmtPkg.name):
-         pkgs[cmtPkg.name] = cmtPkg
-         pass
-      else:
-         # we found a duplicate...
-         # check that the new one has a more recent version
-         if pkgs[cmtPkg.name].version < cmtPkg.version:
-            pkgs[cmtPkg.name] = cmtPkg
-            pass
-         duplicates[cmtPkg.name] = pkgs[cmtPkg.name]
-         pass
-      pass
-   if len(duplicates) > 0:
-      msg.warning( "Found duplicate(s): (listing the ones we kept)" )
-      for k in duplicates.keys():
-         msg.warning( "--" )
-         msg.warning( " Package: %s" % duplicates[k].name )
-         msg.warning( " Version: %s" % duplicates[k].version )
-         msg.warning( " Path:    %s" % duplicates[k].path )
-         pass
-      pass
-
-   del duplicates
-   cmtPackages = [ pkg for pkg in pkgs.values() ]
-   del pkgs
-                      
-   msg.info( "Found %i packages in WorkArea" % len(cmtPackages) )
-   if len(suppressList) >= 1:
-      # -1 because WorkArea is removed by default
-      msg.info( "=> %i package(s) in suppression list" % \
-                int(len(suppressList) - 1) ) 
-
-   for cmtPkg in cmtPackages:
-      # swallow the WorkArea path so we have a "cmt path" to put
-      # in the req file
-      for workArea in workAreas:
-         cmtPkg.path = cmtPkg.path.replace( workArea+os.sep, '' )
-         cmtPkg.path = cmtPkg.path.replace( workArea,        '' )
-         pass
-
-      if cmtPkg.path.endswith( os.sep ):
-         cmtPkg.path = os.path.split(cmtPkg.path)
-         pass
-
-      use = "use %s \t%s \t%s -no_auto_imports" % \
-            ( cmtPkg.name,
-              "*", #cmtPkg.version,
-              cmtPkg.path )
-      msg.debug( "\t%s" % use )
-
-      uses.append( use )
-      pass
-
-   return uses
-
-def _translate_runtimepkg_name(n):
-    db = {
-        'hlt': 'AtlasHLT',
-        'manacore': 'ManaCore',
-        'detcommon': 'DetCommon',
-        'AthAnalysisBase': 'AthAnalysisBase',
-        'AthAnalysisSUSY': 'AthAnalysisSUSY',
-        'AthSimulationBase': 'AthSimulationBase'
-        }
-    if n in db:
-        return db[n]
-    else:
-        o = 'Atlas'+n[0].upper() + n[1:]
-        if o.startswith('AtlasAtlas'):
-            o = o[len('Atlas'):]
-        return o
-    
-def createWorkArea(workAreas = None, installDir = None,
-                   runTimePkg = None, suppressList = None):
-
-    msg = logging.getLogger("WorkAreaMgr")
-    if workAreas is None:
-        workAreas = []
-    if suppressList is None:
-       suppressList = [ "WorkArea" ]
-    else:
-       suppressList.append( "WorkArea" )
-       pass
-
-    if runTimePkg is None:
-        runTimePkg = os.getenv('AtlasProject', 'AtlasOffline')
-        pass
-    atlasRunTime = _translate_runtimepkg_name(runTimePkg)
-    
-    defaultWorkArea = _get_currentpath()
-    if len(workAreas) <= 0:
-        workAreas = [ defaultWorkArea ]
-    if installDir == None:
-        installDir = defaultWorkArea
-        pass
-
-    msg.info( 80*"#" )
-    msg.info( "Creating a WorkArea CMT package under: [%s] " % installDir )
-
-    try:
-        installWorkArea( installDir,
-                         CmtPkg( "WorkArea", WORKAREA_VERSION, "" ) )
-    except Exception,err:
-        msg.error( "Could NOT create WorkArea package !!" )
-        msg.error( "%r", err)
-        msg.info( 80*"#" )
-        sys.exit(3)
-        
-    except :
-        msg.error( "Could NOT create WorkArea package !!" )
-        msg.info( 80*"#" )
-        sys.exit(4)
-        
-    reqLines = [
-        "package WorkArea",
-        "",
-        "author Sebastien Binet <binet@cern.ch>",
-        "",
-        "######################################",
-        "## Don't edit this file !!          ##",
-        "## It is automatically generated... ##",
-        "######################################",
-        "",
-        "## Generic part...",
-        "use AtlasPolicy 	 \tAtlasPolicy-*",
-        "use %sRunTime \t%sRunTime-*" % (atlasRunTime, atlasRunTime),
-        "",
-        "branches run python",
-        "",
-        "## Install the python classes into InstallArea",
-        "apply_pattern declare_python_modules files=\"*.py\"",
-        "",
-        "",
-        "## execute the post-install targets...",
-        "private ",
-        " macro_append all_dependencies \"\\",
-        "  post_merge_rootmap \\", 
-        "  post_merge_genconfdb \\",
-        "  post_build_tpcnvdb \\",
-        "\"",
-        "end_private",
-        "",
-        "## Automatically generated part...",
-        "" ]
-
-    uses = createUseList(workAreas, suppressList)
-
-    reqLines.extend( uses )
-    reqLines.append( "" )
-    reqLines.append( "## End of generation." )
-    reqLines.append( "## EOF ##" )
-    
-    reqFile = open( os.path.join( installDir,
-                                  "WorkArea",
-                                  CmtStrings.CMTDIR,
-                                  CmtStrings.CMTREQFILE ),
-                    "w" )
-    for reqLine in reqLines:
-        reqFile.writelines( reqLine + os.linesep )
-        pass
-
-    msg.info( "Generation of %s done [OK]" % \
-              os.path.join( "WorkArea",
-                            CmtStrings.CMTDIR,
-                            CmtStrings.CMTREQFILE ) )
-    
-    reqFile.close()
-
-    msg.info( 80*"#" )
-    return
-
-def installWorkArea( installDir, cmtWorkAreaPkg ):
-    msg = logging.getLogger("WorkAreaMgr")
-
-    workAreaDir = os.path.join( installDir,  cmtWorkAreaPkg.name )
-    cmtDir      = os.path.join( workAreaDir, CmtStrings.CMTDIR   )
-
-    if os.path.exists(installDir):
-        if os.access(installDir, os.W_OK):
-            if os.path.exists( workAreaDir ):
-                if not os.path.exists( cmtDir ):
-                    os.mkdir( cmtDir )
-                    pass
-                pass
-            else:
-                os.makedirs( os.path.join( workAreaDir, cmtDir ) )
-            pass
-        else:
-            msg.error( "Can't write under [%s] !!" % installDir )
-            raise OSError
-        pass
-    else:
-        try:
-            os.makedirs(installDir)
-            installWorkArea( installDir, cmtWorkAreaPkg )
-        except OSError, what:
-            msg.error( "Install dir for WorkArea does NOT exist and can't create it !!" )
-            raise OSError, what
-        pass
-
-    msg.debug( "Creating a consistent version file for the WorkArea pkg..." )
-    cmtVersFile = open( os.path.join(cmtDir, CmtStrings.CMTVERSIONFILE), 'w' )
-    cmtVersFile.writelines( cmtWorkAreaPkg.version + os.linesep )
-    cmtVersFile.close()
-    msg.debug( "Create a dummy %s file for the WorkArea pkg..." % CmtStrings.CMTREQFILE ) 
-    cmtReqFile = open( os.path.join(cmtDir, CmtStrings.CMTREQFILE), 'w' )
-    cmtReqFile.writelines( "package %s %s" % (cmtWorkAreaPkg.name, os.linesep ) )
-    cmtReqFile.close()
-
-    msg.debug("creating python directories to workaround CMT bugs...")
-    install_area = os.path.join(installDir, 'InstallArea')
-    pydirs = [os.path.join(install_area, 'python'),
-              os.path.join(install_area, '${CMTCONFIG}', 'lib', 'python')]
-    pydirs = [os.path.expandvars(p) for p in pydirs]
-    
-    for p in pydirs:
-        if not os.path.exists(p):
-            try:
-                os.makedirs(p)
-            except OSError, what:
-                msg.error('could not create directory [%s]',p)
-                msg.error(what)
-    msg.debug("creating python directories to workaround CMT bugs... [ok]")
-                
-    return
-
diff --git a/Tools/PyUtils/python/acmdlib.py b/Tools/PyUtils/python/acmdlib.py
index 3101c75d1cd12f70ff5de09d2b141b8048ee53dd..dee104d6bf83e5b1722efa3b6f6d094f104e0f2d 100644
--- a/Tools/PyUtils/python/acmdlib.py
+++ b/Tools/PyUtils/python/acmdlib.py
@@ -25,8 +25,6 @@ import extensions as ext_plugins
 import argparse
 import textwrap
 
-from PyUtils.decorator import decorator
-
 ### globals -------------------------------------------------------------------
 ACMD_GROUPNAME = 'acmdlib.commands'
 """The name under which all commands are grouped
diff --git a/Tools/PyUtils/python/bwdcompat.py b/Tools/PyUtils/python/bwdcompat.py
index c6c7d9843ca76eddd499fe91aa161b56311be7a6..c70a52586a196abd65f1fb8b87278ec8bdb75b0a 100644
--- a/Tools/PyUtils/python/bwdcompat.py
+++ b/Tools/PyUtils/python/bwdcompat.py
@@ -3,5 +3,30 @@
 import subprocess
 
 ### monkey-patch subprocess (fwd compat w/ py-3.x) ----------------------------
-import PyCmt.bwdcompat
+def getstatusoutput(cmd, *popenargs, **kwargs):
+    if isinstance(cmd, basestring):
+        cmd = cmd.split()
+    if 'stdout' in kwargs:
+        raise ValueError('stdout argument not allowed, it will be overridden.')
+    kwargs['stdout'] = subprocess.PIPE
+    p = subprocess.Popen(cmd, *popenargs, **kwargs)
+    sc = p.returncode
+    if sc is None:
+        sc = 0
+    fd = p.stdout
+    out= ''.join(list(fd.readlines()))
+    if out[-1:] == '\n': out = out[:-1]
+    return sc,out
+subprocess.getstatusoutput = getstatusoutput
+del getstatusoutput
+
+def getstatus(cmd, *popenargs, **kwargs):
+    return subprocess.getstatusoutput(cmd, *popenargs, **kwargs)[0]
+subprocess.getstatus = getstatus
+del getstatus
+
+def getoutput(cmd, *popenargs, **kwargs):
+    return subprocess.getstatusoutput(cmd, *popenargs, **kwargs)[1]
+subprocess.getoutput = getoutput
+del getoutput
 ### ---------------------------------------------------------------------------
diff --git a/Tools/PyUtils/python/decorator.py b/Tools/PyUtils/python/decorator.py
deleted file mode 100644
index 0294c91346f0188050bace7b9580f894457a0159..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/decorator.py
+++ /dev/null
@@ -1,4 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# 
-from PyCmt.decorator import *
diff --git a/Tools/PyUtils/python/scripts/__init__.py b/Tools/PyUtils/python/scripts/__init__.py
index 9ad4c7039df940c4338d71c13b562e4d6614c83f..cdc7a6419f5fbeb69ff8086ccc06dbc0ff24e82d 100644
--- a/Tools/PyUtils/python/scripts/__init__.py
+++ b/Tools/PyUtils/python/scripts/__init__.py
@@ -13,24 +13,9 @@ acmdlib.register('ath-dump', 'PyUtils.scripts.ath_dump:main')
 acmdlib.register('chk-rflx', 'PyUtils.scripts.check_reflex:main')
 acmdlib.register('gen-klass', 'PyUtils.scripts.gen_klass:main')
 
-acmdlib.register('tc.find-pkg', 'PyUtils.scripts.tc_find_pkg:main')
-acmdlib.register('tc.find-tag', 'PyUtils.scripts.tc_find_tag:main')
-acmdlib.register('tc.submit-tag', 'PyUtils.scripts.tc_submit_tag:main')
-
-acmdlib.register('get-tag-diff', 'PyUtils.scripts.get_tag_diff:main')
-acmdlib.register('get-tagsvn-diff', 'PyUtils.scripts.get_tagsvn_diff:main')
-
 acmdlib.register('merge-files', 'PyUtils.scripts.merge_files:main')
 acmdlib.register('filter-files', 'PyUtils.scripts.filter_files:main')
 
-acmdlib.register('cmt.new-pkg', 'PyUtils.scripts.cmt_newpkg:main')
-acmdlib.register('cmt.new-alg', 'PyUtils.scripts.cmt_newalg:main')
-acmdlib.register('cmt.new-analysisalg', 'PyUtils.scripts.cmt_newanalysisalg:main')
-acmdlib.register('cmt.new-asgtool', 'PyUtils.scripts.cmt_newasgtool:main')
-acmdlib.register('cmt.new-pyalg', 'PyUtils.scripts.cmt_newpyalg:main')
-acmdlib.register('cmt.new-jobo', 'PyUtils.scripts.cmt_newjobo:main')
-acmdlib.register('cmt.new-analysisapp', 'PyUtils.scripts.cmt_newanalysisapp:main')
-
 acmdlib.register('jira.issues', 'PyUtils.scripts.jira_issues:main')
 # acmdlib.register('jira.issue', 'PyUtils.scripts.jira_issue:main')
 ##
diff --git a/Tools/PyUtils/python/scripts/cmt_newalg.py b/Tools/PyUtils/python/scripts/cmt_newalg.py
deleted file mode 100644
index 687472442aff450f6daf9787d5768cd3df6fdf9a..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/cmt_newalg.py
+++ /dev/null
@@ -1,274 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmt_newalg
-# @purpose streamline and ease the creation of new athena algs
-# @author Will Buttinger
-# @date September 2014
-
-#Note - this code could use a serious rewrite, I just hacked it together to get something working
-
-from __future__ import with_statement
-
-__version__ = "$Revision: 279982 $"
-__author__ = "Will Buttinger"
-__doc__ = "streamline and ease the creation of new algorithms"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import commands
-import PyUtils.acmdlib as acmdlib
-import fileinput
-
-class Templates:
-    alg_hdr_template = """\
-#ifndef %(guard)s
-#define %(guard)s 1
-
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include "GaudiKernel/ToolHandle.h" //included under assumption you'll want to use some tools! Remove if you don't!
-
-%(namespace_begin)s
-
-class %(klass)s: public ::AthAlgorithm { 
- public: 
-  %(klass)s( const std::string& name, ISvcLocator* pSvcLocator );
-  virtual ~%(klass)s(); 
-
-  virtual StatusCode  initialize();
-  virtual StatusCode  execute();
-  virtual StatusCode  finalize();
-
- private: 
-
-}; 
-%(namespace_end)s
-#endif //> !%(guard)s
-"""
-
-    alg_cxx_template = """\
-// %(pkg)s includes
-#include "%(namespace_klass)s.h"
-
-%(namespace_begin)s
-
-%(klass)s::%(klass)s( const std::string& name, ISvcLocator* pSvcLocator ) : AthAlgorithm( name, pSvcLocator ){
-
-  //declareProperty( "Property", m_nProperty ); //example property declaration
-
-}
-
-
-%(klass)s::~%(klass)s() {}
-
-
-StatusCode %(klass)s::initialize() {
-  ATH_MSG_INFO ("Initializing " << name() << "...");
-
-  return StatusCode::SUCCESS;
-}
-
-StatusCode %(klass)s::finalize() {
-  ATH_MSG_INFO ("Finalizing " << name() << "...");
-
-  return StatusCode::SUCCESS;
-}
-
-StatusCode %(klass)s::execute() {  
-  ATH_MSG_DEBUG ("Executing " << name() << "...");
-
-  return StatusCode::SUCCESS;
-}
-
-%(namespace_end)s
-"""
-
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmt.new-alg'
-    )
-@acmdlib.argument(
-    'algname',
-    help="name of the new alg"
-    )
-def main(args):
-    """create a new algorithm inside the current package. Call from within the package directory
-
-    ex:
-     $ acmd cmt new-alg MyAlg
-    """
-    sc = 0
-    
-    full_alg_name = args.algname
-
-    #determine the package from the cwd 
-    cwd = os.getcwd()
-    #check that cmt dir exists (i.e. this is a package)
-    if not os.path.isdir(cwd+"/cmt"):
-        print "ERROR you must call new-alg from within the package you want to add the algorithm to"
-        return -1
-    full_pkg_name = os.path.basename(cwd)
-    print textwrap.dedent("""\
-    ::: create alg [%(full_alg_name)s] in pkg [%(full_pkg_name)s]""" %locals())
-
-    
-    #first we must check that requirements file has the AthenaBaseComps use statement in it
-    foundBaseComps=False
-    hasLibraryLine=False
-    lastUse=0 
-    lineCount=0
-    for line in open('cmt/requirements'):
-        lineCount +=1 
-        if line.startswith("library") or line.startswith("apply_pattern dual_use_library"): hasLibraryLine=True
-        if not line.startswith("use "): continue
-        lastUse=lineCount
-        uu = line.split(" ")
-        if uu[1].startswith("AthenaBaseComps"): foundBaseComps=True
-        
-    if not foundBaseComps:
-        print ":::  INFO Adding AthenaBaseComps to requirements file"
-        #must add a use statement to the requirements file 
-        #put inside private blocks
-        lineCount=0
-        inPrivate=False
-        for line in fileinput.input('cmt/requirements', inplace=1):
-            lineCount+=1
-            if lineCount==lastUse+1:
-                if not inPrivate: print "private"
-                print "use AthenaBaseComps AthenaBaseComps-* Control"
-                if not inPrivate: print "end_private"
-            if line.startswith("private"): inPrivate=True
-            elif line.startswith("end_private"): inPrivate=False
-            print line,
-        #append library line if necessary
-    if not hasLibraryLine:
-      with open("cmt/requirements", "a") as myfile:
-         myfile.write("library %s *.cxx components/*.cxx\n" % (full_pkg_name))
-         myfile.write("apply_pattern component_library\n")
-    
-    #following code borrowed from gen_klass
-    hdr = getattr(Templates, 'alg_hdr_template')
-    cxx = getattr(Templates, 'alg_cxx_template')
-    
-    namespace_klass = full_alg_name.replace('::','__')
-    namespace_begin,namespace_end = "",""
-    namespace = ""
-    if full_alg_name.count("::")>0:
-        namespace    = full_alg_name.split("::")[0]
-        full_alg_name = full_alg_name.split("::")[1]
-        namespace_begin = "namespace %s {" % namespace
-        namespace_end   = "} //> end namespace %s" % namespace
-        pass
-
-    guard = "%s_%s_H" % (full_pkg_name.upper(), namespace_klass.upper())
-
-    d = dict( pkg=full_pkg_name,
-              klass=full_alg_name,
-              guard=guard,
-              namespace_begin=namespace_begin,
-              namespace_end=namespace_end,namespace_klass=namespace_klass,namespace=namespace
-              )
-    fname = os.path.splitext("src/%s"%namespace_klass)[0]
-    #first check doesn't exist 
-    if os.path.isfile(fname+'.h'):
-       print ":::  ERROR %s.h already exists" % fname
-       return -1
-    print ":::  INFO Creating %s.h" % fname
-    o_hdr = open(fname+'.h', 'w')
-    o_hdr.writelines(hdr%d)
-    o_hdr.flush()
-    o_hdr.close()
-
-    if os.path.isfile(fname+'.cxx'):
-       print ":::  ERROR %s.cxx already exists" % fname
-       return -1
-    print ":::  INFO Creating %s.cxx" % fname
-    o_cxx = open(fname+'.cxx', 'w')
-    o_cxx.writelines(cxx%d)
-    o_cxx.flush()
-    o_cxx.close()
-
-    #now add the algorithm to the _entries.cxx file in the components folder 
-    #first check they exist 
-    if not os.path.isfile("src/components/%s_load.cxx"%full_pkg_name):
-       print ":::  INFO Creating src/components/%s_load.cxx"%full_pkg_name
-       loadFile = open("src/components/%s_load.cxx"%full_pkg_name,'w')
-       loadFile.writelines(""" 
-#include "GaudiKernel/LoadFactoryEntries.h"
-LOAD_FACTORY_ENTRIES(%(pkg)s)
-"""%d)
-       loadFile.flush()
-       loadFile.close()
-      
-    if not os.path.isfile("src/components/%s_entries.cxx"%full_pkg_name):
-       print ":::  INFO Creating src/components/%s_entries.cxx"%full_pkg_name
-       loadFile = open("src/components/%s_entries.cxx"%full_pkg_name,'w')
-       if len(namespace_begin)>0:
-          d["namespace"] = args.algname.split("::")[0]
-          loadFile.writelines("""
-#include "GaudiKernel/DeclareFactoryEntries.h"
-
-#include "../%(namespace_klass)s.h"
-
-DECLARE_NAMESPACE_ALGORITHM_FACTORY(%(namespace)s, %(klass)s )
-
-DECLARE_FACTORY_ENTRIES( %(pkg)s ) 
-{
-  DECLARE_NAMESPACE_ALGORITHM(%(namespace)s, %(klass)s );
-}
-"""%d)
-       else:
-          loadFile.writelines("""
-#include "GaudiKernel/DeclareFactoryEntries.h"
-
-#include "../%(namespace_klass)s.h"
-
-DECLARE_ALGORITHM_FACTORY( %(klass)s )
-
-DECLARE_FACTORY_ENTRIES( %(pkg)s ) 
-{
-  DECLARE_ALGORITHM( %(klass)s );
-}
-"""%d)
-       loadFile.flush()
-       loadFile.close()
-    else:
-       #first check algorithm not already in _entries file 
-       inFile=False
-       for line in open("src/components/%s_entries.cxx"%full_pkg_name):
-          if len(namespace_begin)==0 and "DECLARE_ALGORITHM" in line and d["klass"] in line: inFile=True
-          if len(namespace_begin)>0 and "DECLARE_NAMESPACE_ALGORITHM" in line and d["klass"] in line and d["namespace"]: inFile=True
-          
-       if not inFile:
-         print ":::  INFO Adding %s to src/components/%s_entries.cxx"% (args.algname,full_pkg_name)
-         nextAdd=False
-         for line in fileinput.input("src/components/%s_entries.cxx"%full_pkg_name, inplace=1):
-            if nextAdd and not "{" in line:
-               nextAdd=False
-               if len(namespace_begin)>0:
-                  print """  DECLARE_NAMESPACE_ALGORITHM(%(namespace)s, %(klass)s );"""%d
-               else:
-                  print """  DECLARE_ALGORITHM( %(klass)s );"""%d
-            if line.startswith("DECLARE_FACTORY_ENTRIES"):
-               nextAdd=True
-               if len(namespace_begin)>0:
-                  
-                  print """
-#include "../%(namespace_klass)s.h"
-DECLARE_NAMESPACE_ALGORITHM_FACTORY( %(namespace)s, %(klass)s )
-"""%d
-               else:
-                  print """
-#include "../%(namespace_klass)s.h"
-DECLARE_ALGORITHM_FACTORY( %(klass)s )
-"""%d
-            print line,
-          
-    #to finish up, call cmt config so that the new algorithm will be captured and genconf run on it
-    cwd = os.getcwd()
-    try:
-        os.chdir('cmt')
-        _ = commands.getstatusoutput('cmt config')
-    finally:
-        os.chdir(cwd)
diff --git a/Tools/PyUtils/python/scripts/cmt_newanalysisalg.py b/Tools/PyUtils/python/scripts/cmt_newanalysisalg.py
deleted file mode 100644
index 42aa94528bb8bfeca4c3cee7b291dc2acbd389d4..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/cmt_newanalysisalg.py
+++ /dev/null
@@ -1,440 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmt_newanalysisalg
-# @purpose streamline and ease the creation of new athena algs
-# @author Will Buttinger
-# @date September 2014
-
-#Note - this code could use a serious rewrite, I just hacked it together to get something working
-
-from __future__ import with_statement
-
-__version__ = "$Revision: 774188 $"
-__author__ = "Will Buttinger"
-__doc__ = "streamline and ease the creation of new AthAnalysisAlgorithm"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import commands
-import PyUtils.acmdlib as acmdlib
-import fileinput
-
-class Templates:
-    alg_hdr_template = """\
-#ifndef %(guard)s
-#define %(guard)s 1
-
-#include "AthAnalysisBaseComps/AthAnalysisAlgorithm.h"
-
-%(namespace_begin)s
-
-class %(klass)s: public ::AthAnalysisAlgorithm { 
- public: 
-  %(klass)s( const std::string& name, ISvcLocator* pSvcLocator );
-  virtual ~%(klass)s(); 
-
-  virtual StatusCode  initialize();
-  virtual StatusCode  execute();
-  virtual StatusCode  finalize();
-  
-  virtual StatusCode beginInputFile();
-
- private: 
-
-}; 
-%(namespace_end)s
-#endif //> !%(guard)s
-"""
-
-    alg_cxx_template = """\
-// %(pkg)s includes
-#include "%(namespace_klass)s.h"
-
-//#include "xAODEventInfo/EventInfo.h"
-
-//uncomment the line below to use the HistSvc for outputting trees and histograms
-//#include "GaudiKernel/ITHistSvc.h"
-//#include "TTree.h"
-//#include "TH1D.h"
-
-%(namespace_begin)s
-
-%(klass)s::%(klass)s( const std::string& name, ISvcLocator* pSvcLocator ) : AthAnalysisAlgorithm( name, pSvcLocator ){
-
-  //declareProperty( "Property", m_nProperty ); //example property declaration
-
-}
-
-
-%(klass)s::~%(klass)s() {}
-
-
-StatusCode %(klass)s::initialize() {
-  ATH_MSG_INFO ("Initializing " << name() << "...");
-  //
-  //This is called once, before the start of the event loop
-  //Retrieves of tools you have configured in the joboptions go here
-  //
-
-  //HERE IS AN EXAMPLE
-  //We will create a histogram and a ttree and register them to the histsvc
-  //Remember to uncomment the configuration of the histsvc stream in the joboptions
-  //
-  //ServiceHandle<ITHistSvc> histSvc("THistSvc",name());
-  //TH1D* myHist = new TH1D("myHist","myHist",10,0,10);
-  //CHECK( histSvc->regHist("/MYSTREAM/myHist", myHist) ); //registers histogram to output stream (like SetDirectory in EventLoop)
-  //TTree* myTree = new TTree("myTree","myTree");
-  //CHECK( histSvc->regTree("/MYSTREAM/SubDirectory/myTree", myTree) ); //registers tree to output stream (like SetDirectory in EventLoop) inside a sub-directory
-
-
-  return StatusCode::SUCCESS;
-}
-
-StatusCode %(klass)s::finalize() {
-  ATH_MSG_INFO ("Finalizing " << name() << "...");
-  //
-  //Things that happen once at the end of the event loop go here
-  //
-
-
-  return StatusCode::SUCCESS;
-}
-
-StatusCode %(klass)s::execute() {  
-  ATH_MSG_DEBUG ("Executing " << name() << "...");
-  setFilterPassed(false); //optional: start with algorithm not passed
-
-
-
-  //
-  //Your main analysis code goes here
-  //If you will use this algorithm to perform event skimming, you
-  //should ensure the setFilterPassed method is called
-  //If never called, the algorithm is assumed to have 'passed' by default
-  //
-
-
-  //HERE IS AN EXAMPLE
-  //const xAOD::EventInfo* evtInfo = 0;
-  //CHECK( evtStore()->retrieve( evtInfo, "EventInfo" ) );
-  //ATH_MSG_INFO("eventNumber=" << evtInfo->eventNumber() );
-
-
-  setFilterPassed(true); //if got here, assume that means algorithm passed
-  return StatusCode::SUCCESS;
-}
-
-StatusCode %(klass)s::beginInputFile() { 
-  //
-  //This method is called at the start of each input file, even if
-  //the input file contains no events. Accumulate metadata information here
-  //
-
-  //example of retrieval of CutBookkeepers: (remember you will need to include the necessary header files and use statements in requirements file)
-  // const xAOD::CutBookkeeperContainer* bks = 0;
-  // CHECK( inputMetaStore()->retrieve(bks, "CutBookkeepers") );
-
-  //example of IOVMetaData retrieval (see https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AthAnalysisBase#How_to_access_file_metadata_in_C)
-  //float beamEnergy(0); CHECK( retrieveMetadata("/TagInfo","beam_energy",beamEnergy) );
-  //std::vector<float> bunchPattern; CHECK( retrieveMetadata("/Digitiation/Parameters","BeamIntensityPattern",bunchPattern) );
-
-
-
-  return StatusCode::SUCCESS;
-}
-
-%(namespace_end)s
-"""
-    testxml_template = """\
-   <TEST name="%(namespace_klass)s" type="athena" suite="ASGTests">
-      <options_atn>%(pkg)s/%(namespace_klass)sJobOptions.py</options_atn>
-      <timelimit>5</timelimit>
-      <author> PLEASE ENTER A NAME </author>
-      <mailto> PLEASEENTER@cern.ch </mailto>
-      <expectations>
-         <errorMessage> Athena exited abnormally </errorMessage>
-         <errorMessage>FAILURE (ERROR)</errorMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-"""
-
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmt.new-analysisalg'
-    )
-@acmdlib.argument(
-    'algname',
-    help="name of the new alg"
-    )
-@acmdlib.argument(
-    '--newJobo',
-    action='store_true',
-    default=False,
-    help='Create a skeleton joboption for execution of the new algorithm'
-    )
-@acmdlib.argument(
-    '--atnTest',
-    action='store_true',
-    default=False,
-    help='Register the skeleton joboption as an ATN test'
-    )
-def main(args):
-    """create a new AthAnalysisAlgorithm inside the current package. Call from within the package directory
-
-    ex:
-     $ acmd cmt new-analysisalg MyAlg
-    """
-    sc = 0
-    
-    full_alg_name = args.algname
-
-    #determine the package from the cwd 
-    cwd = os.getcwd()
-    #check that cmt dir exists (i.e. this is a package)
-    if not os.path.isdir(cwd+"/cmt"):
-        print "ERROR you must call new-analysisalg from within the package you want to add the algorithm to"
-        return -1
-   
-    if args.atnTest and not full_alg_name.startswith("Test::"):
-       print "::: INFO  Requested --atnTest option, so adding 'Test::' namespace to the alg"
-       args.algname = "Test::%s"%args.algname
-       full_alg_name = args.algname
-   
-    full_pkg_name = os.path.basename(cwd)
-    print textwrap.dedent("""\
-    ::: create alg [%(full_alg_name)s] in pkg [%(full_pkg_name)s]""" %locals())
-
-    
-    #first we must check that requirements file has the AthenaBaseComps use statement in it
-    foundBaseComps=False
-    hasxAODEventInfo=False
-    hasAtlasROOT=False
-    hasAsgTools=False
-    lastUse=0 
-    lineCount=0
-    hasLibraryLine=False
-    for line in open('cmt/requirements'):
-        lineCount +=1 
-        if line.startswith("library") or line.startswith("apply_pattern dual_use_library"): hasLibraryLine=True
-        if not line.startswith("use "): continue
-        lastUse=lineCount
-        uu = line.split(" ")
-        if uu[1].startswith("AthAnalysisBaseComps"): foundBaseComps=True
-        if uu[1].startswith("xAODEventInfo"): hasxAODEventInfo=True
-        if uu[1].startswith("AsgTools"): hasAsgTools=True
-        if uu[1].startswith("AtlasROOT"): hasAtlasROOT=True;
-        
-        
-    if not foundBaseComps:
-        print ":::  INFO Adding AthAnalysisBaseComps to requirements file"
-        #must add a use statement to the requirements file 
-        #put inside private blocks
-        lineCount=0
-        inPrivate=False
-        for line in fileinput.input('cmt/requirements', inplace=1):
-            lineCount+=1
-            if lineCount==lastUse+1:
-                if not inPrivate: print "private"
-                print ""
-                print "use AthAnalysisBaseComps AthAnalysisBaseComps-* Control"
-                print ""
-                if not hasAtlasROOT:
-                  print "#uncomment the next line to use ROOT libraries in your package"
-                  print "#use AtlasROOT AtlasROOT-* External"
-                  print ""
-                if not hasxAODEventInfo:
-                  print "#use xAODEventInfo xAODEventInfo-* Event/xAOD"
-                  print ""
-                if not hasAsgTools:
-                  print "#use AsgTools AsgTools-* Control/AthToolSupport"
-                  print ""
-                if not inPrivate: print "end_private"
-            if line.startswith("private"): inPrivate=True
-            elif line.startswith("end_private"): inPrivate=False
-            print line,
-    #append library line if necessary
-    if not hasLibraryLine:
-      with open("cmt/requirements", "a") as myfile:
-         myfile.write("library %s *.cxx components/*.cxx\n" % (full_pkg_name))
-         myfile.write("apply_pattern component_library\n")
-
-    
-    #following code borrowed from gen_klass
-    hdr = getattr(Templates, 'alg_hdr_template')
-    cxx = getattr(Templates, 'alg_cxx_template')
-    
-    namespace_klass = full_alg_name.replace('::','__')
-    namespace_begin,namespace_end = "",""
-    namespace = ""
-    if full_alg_name.count("::")>0:
-        namespace    = full_alg_name.split("::")[0]
-        full_alg_name = full_alg_name.split("::")[1]
-        namespace_begin = "namespace %s {" % namespace
-        namespace_end   = "} //> end namespace %s" % namespace
-        pass
-
-    guard = "%s_%s_H" % (full_pkg_name.upper(), namespace_klass.upper())
-
-    d = dict( pkg=full_pkg_name,
-              klass=full_alg_name,
-              guard=guard,
-              namespace_begin=namespace_begin,
-              namespace_end=namespace_end,namespace_klass=namespace_klass,namespace=namespace
-              )
-    fname = os.path.splitext("src/%s"%namespace_klass)[0]
-    #first check doesn't exist 
-    if os.path.isfile(fname+'.h'):
-       print ":::  ERROR %s.h already exists" % fname
-       return -1
-    print ":::  INFO Creating %s.h" % fname
-    o_hdr = open(fname+'.h', 'w')
-    o_hdr.writelines(hdr%d)
-    o_hdr.flush()
-    o_hdr.close()
-
-    if os.path.isfile(fname+'.cxx'):
-       print ":::  ERROR %s.cxx already exists" % fname
-       return -1
-    print ":::  INFO Creating %s.cxx" % fname
-    o_cxx = open(fname+'.cxx', 'w')
-    o_cxx.writelines(cxx%d)
-    o_cxx.flush()
-    o_cxx.close()
-
-    #now add the algorithm to the _entries.cxx file in the components folder 
-    #first check they exist 
-    if not os.path.isfile("src/components/%s_load.cxx"%full_pkg_name):
-       print ":::  INFO Creating src/components/%s_load.cxx"%full_pkg_name
-       loadFile = open("src/components/%s_load.cxx"%full_pkg_name,'w')
-       loadFile.writelines(""" 
-#include "GaudiKernel/LoadFactoryEntries.h"
-LOAD_FACTORY_ENTRIES(%(pkg)s)
-"""%d)
-       loadFile.flush()
-       loadFile.close()
-      
-    if not os.path.isfile("src/components/%s_entries.cxx"%full_pkg_name):
-       print ":::  INFO Creating src/components/%s_entries.cxx"%full_pkg_name
-       loadFile = open("src/components/%s_entries.cxx"%full_pkg_name,'w')
-       if len(namespace_begin)>0:
-          d["namespace"] = args.algname.split("::")[0]
-          loadFile.writelines("""
-#include "GaudiKernel/DeclareFactoryEntries.h"
-
-#include "../%(namespace_klass)s.h"
-
-DECLARE_NAMESPACE_ALGORITHM_FACTORY(%(namespace)s, %(klass)s )
-
-DECLARE_FACTORY_ENTRIES( %(pkg)s ) 
-{
-  DECLARE_NAMESPACE_ALGORITHM(%(namespace)s, %(klass)s );
-}
-"""%d)
-       else:
-          loadFile.writelines("""
-#include "GaudiKernel/DeclareFactoryEntries.h"
-
-#include "../%(namespace_klass)s.h"
-
-DECLARE_ALGORITHM_FACTORY( %(klass)s )
-
-DECLARE_FACTORY_ENTRIES( %(pkg)s ) 
-{
-  DECLARE_ALGORITHM( %(klass)s );
-}
-"""%d)
-       loadFile.flush()
-       loadFile.close()
-    else:
-       #first check algorithm not already in _entries file 
-       inFile=False
-       for line in open("src/components/%s_entries.cxx"%full_pkg_name):
-          if len(namespace_begin)==0 and "DECLARE_ALGORITHM" in line and d["klass"] in line: inFile=True
-          if len(namespace_begin)>0 and "DECLARE_NAMESPACE_ALGORITHM" in line and d["klass"] in line and d["namespace"]: inFile=True
-          
-       if not inFile:
-         print ":::  INFO Adding %s to src/components/%s_entries.cxx"% (args.algname,full_pkg_name)
-         nextAdd=False
-         for line in fileinput.input("src/components/%s_entries.cxx"%full_pkg_name, inplace=1):
-            if nextAdd and not "{" in line:
-               nextAdd=False
-               if len(namespace_begin)>0:
-                  print """  DECLARE_NAMESPACE_ALGORITHM(%(namespace)s, %(klass)s );"""%d
-               else:
-                  print """  DECLARE_ALGORITHM( %(klass)s );"""%d
-            if line.startswith("DECLARE_FACTORY_ENTRIES"):
-               nextAdd=True
-               if len(namespace_begin)>0:
-                  
-                  print """
-#include "../%(namespace_klass)s.h"
-DECLARE_NAMESPACE_ALGORITHM_FACTORY( %(namespace)s, %(klass)s )
-"""%d
-               else:
-                  print """
-#include "../%(namespace_klass)s.h"
-DECLARE_ALGORITHM_FACTORY( %(klass)s )
-"""%d
-            print line,
-   
-   
-    if args.atnTest or args.newJobo:
-      #make the joboptions file too
-      full_jobo_name = namespace_klass + "JobOptions"
-      full_alg_name = namespace_klass
-   
-      print textwrap.dedent("""\
-      ::: create jobo [%(full_jobo_name)s] for alg [%(full_alg_name)s]""" %locals())
-   
-      #following code borrowed from gen_klass
-      from cmt_newjobo import Templates as joboTemplates
-      jobo = getattr(joboTemplates, 'jobo_template')
-   
-      e = dict( klass=full_alg_name,
-               inFile=os.environ['ASG_TEST_FILE_MC'],
-               )
-      fname = 'share/%s.py' % full_jobo_name
-      #first check doesn't exist 
-      if os.path.isfile(fname):
-         print ":::  WARNING %s already exists .. will not overwrite" % fname
-      else:
-         o_hdr = open(fname, 'w')
-         o_hdr.writelines(jobo%e)
-         o_hdr.flush()
-         o_hdr.close()
-
-    if args.atnTest:
-      testxml = getattr(Templates, 'testxml_template')
-      #add the test joboptions to the atn test
-      #check we have a test directory with appropriate xml file in it
-      if not os.path.isdir("test"):
-         os.mkdir("test")
-      if not os.path.isfile("test/%s.xml"%full_pkg_name):
-         print ":::  INFO Creating test/%s.xml"%full_pkg_name
-         loadFile = open("test/%s.xml"%full_pkg_name,'w')
-         loadFile.writelines("<?xml version=\"1.0\"?>\n<atn>\n")
-         loadFile.writelines(testxml%d)
-         loadFile.writelines("</atn>\n")
-         loadFile.flush()
-         loadFile.close()
-      else:
-         print ":::  INFO Adding %s to test/%s.xml"%(namespace_klass + "JobOptions.py",full_pkg_name)
-         nextAdd=False
-         for line in fileinput.input("test/%s.xml"%full_pkg_name, inplace=1):
-            if nextAdd:
-               print(testxml%d)
-               nextAdd=False
-            if "<atn>" in line: nextAdd=True
-            print line,
-
-   
-    #to finish up, call cmt config so that the new algorithm will be captured and genconf run on it
-    cwd = os.getcwd()
-    try:
-        os.chdir('cmt')
-        _ = commands.getstatusoutput('cmt config')
-    finally:
-        os.chdir(cwd)
diff --git a/Tools/PyUtils/python/scripts/cmt_newanalysisapp.py b/Tools/PyUtils/python/scripts/cmt_newanalysisapp.py
deleted file mode 100644
index a1f1de2a4336d7c5c1952fc50584f40d4fe202b1..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/cmt_newanalysisapp.py
+++ /dev/null
@@ -1,205 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmt_newalg
-# @purpose streamline and ease the creation of new standalone applications
-# @author Will Buttinger
-# @date September 2014
-
-#Note - this code could use a serious rewrite, I just hacked it together to get something working
-
-from __future__ import with_statement
-
-__version__ = "$Revision: 774188 $"
-__author__ = "Will Buttinger"
-__doc__ = "streamline and ease the creation of new standalone applications"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import commands
-import PyUtils.acmdlib as acmdlib
-import fileinput
-
-class Templates:
-    app_template = """\
-    
-    
-#ifndef %(guard)s
-#define %(guard)s 1
-
-
-#include "AthAnalysisBaseComps/AthAnalysisHelper.h" //tool creation and configuration
-#include "POOLRootAccess/TEvent.h" //event looping
-#include "GaudiKernel/ToolHandle.h" //for better working with tools
-
-#include "AsgTools/MessageCheck.h" //messaging
-using namespace asg::msgUserCode;  //messaging
-
-//ROOT includes
-#include "TString.h"
-#include "TSystem.h"
-
-int main( int argc, char* argv[] ) {
-
-   IAppMgrUI* app = Gaudi::Init(); //important to do this first, for MessageSvc to exist properly for MSG_INFO macro
-
-   // Open the input file:
-   TString fileName = "$ASG_TEST_FILE_MC";
-   if( argc < 2 ) {
-      ANA_MSG_WARNING( "No file name received, using $ASG_TEST_FILE_MC" );
-   } else {
-      fileName = argv[1]; //use the user provided file
-   }
-   ANA_MSG_INFO("Opening file: " << gSystem->ExpandPathName(fileName.Data()) );
-
-   //Here's an example of how you would create a tool of type ToolType, and set a property on it
-   //The preferred way to create and configure the tool is with a ToolHandle:
-   //ToolHandle<IToolInterface> myTool("ToolType/myTool");
-   //AAH::setProperty( myTool, "MyProperty", value );
-   //myTool.retrieve(); //this will cause the tool to be created and initialized
-
-   //loop over input file with POOL 
-   POOL::TEvent evt(POOL::TEvent::kPOOLAccess); 
-
-   //read modes (constructor argument) are:
-   //kPOOLAccess = default (slowest but reads all POOL file types (including xAOD)), 
-   //kAthenaAccess, (just xAOD)
-   //kClassAccess, (just xAOD, but not some primary xAOD)
-   //kBranchAccess (just xAOD, fastest but might not always work)
-
-
-   evt.readFrom( fileName );
-
-   for(int i=0;i < evt.getEntries(); i++) {
-      if( evt.getEntry(i) < 0) { ANA_MSG_ERROR("Failed to read event " << i); continue; }
-
-      //put your code here
-      //e.g.
-      //const xAOD::EventInfo* evtInfo = 0;
-      //evt.retrieve( evtInfo );
-
-   }
-
-   app->finalize(); //optional trigger finalization of all services and tools created by the Gaudi Application
-   return 0;
-}
-
-#endif //> !%(guard)s
-"""
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmt.new-analysisapp'
-    )
-@acmdlib.argument(
-    'appname',
-    help="name of the new app"
-    )
-def main(args):
-    """create a new algorithm inside the current package. Call from within the package directory
-
-    ex:
-     $ acmd cmt new-alg MyAlg
-    """
-    sc = 0
-    
-    full_app_name = args.appname
-
-    #determine the package from the cwd 
-    cwd = os.getcwd()
-    #check that cmt dir exists (i.e. this is a package)
-    if not os.path.isdir(cwd+"/cmt"):
-        print "ERROR you must call new-analysisapp from within the package you want to add the app to"
-        return -1
-    full_pkg_name = os.path.basename(cwd)
-    print textwrap.dedent("""\
-    ::: create analysisapp [%(full_app_name)s] in pkg [%(full_pkg_name)s]""" %locals())
-
-    
-    #first we must check that requirements file has the AthAnalysisBaseComps use statement in it
-    #also need AsgTools and 
-    foundBaseComps=False    
-    foundAsgTools=False
-    foundPOOLRootAccess=False
-    foundROOT=False
-    lastUse=0 
-    lineCount=0
-    for line in open('cmt/requirements'):
-        lineCount +=1 
-        if not line.startswith("use "): continue
-        lastUse=lineCount
-        uu = line.split(" ")
-        if uu[1].startswith("AthAnalysisBaseComps"): foundBaseComps=True
-        if uu[1].startswith("AsgTools"): foundAsgTools=True
-        if uu[1].startswith("POOLRootAccess"): foundPOOLRootAccess=True
-        if uu[1].startswith("AtlasROOT"): foundROOT=True
-        
-    if not foundBaseComps or not foundAsgTools or not foundPOOLRootAccess or not foundROOT:
-        print ":::  INFO Adding dependencies to requirements file"
-        #must add a use statement to the requirements file 
-        #put inside private blocks
-        lineCount=0
-        inPrivate=False
-        for line in fileinput.input('cmt/requirements', inplace=1):
-            lineCount+=1
-            if lineCount==lastUse+1:
-                if not inPrivate: print "private"
-                print ""
-                if not foundBaseComps:
-                  print "use AthAnalysisBaseComps AthAnalysisBaseComps-* Control"
-                if not foundAsgTools:
-                  print "use AsgTools AsgTools-* Control/AthToolSupport"
-                if not foundPOOLRootAccess:
-                  print "use POOLRootAccess POOLRootAccess-* PhysicsAnalysis"
-                if not foundROOT:
-                  print "use AtlasROOT AtlasROOT-* External"
-                print ""
-                if not inPrivate: print "end_private"
-            if line.startswith("private"): inPrivate=True
-            elif line.startswith("end_private"): inPrivate=False
-            print line,
-     
-     #append application line
-    with open("cmt/requirements", "a") as myfile:
-         myfile.write("application %s %s.cxx\n" % (full_app_name,full_app_name))
-    
-    #following code borrowed from gen_klass
-    cxx = getattr(Templates, 'app_template')
-    
-    namespace_klass = full_app_name.replace('::','__')
-    namespace_begin,namespace_end = "",""
-    namespace = ""
-    if full_app_name.count("::")>0:
-        namespace    = full_app_name.split("::")[0]
-        full_alg_name = full_app_name.split("::")[1]
-        namespace_begin = "namespace %s {" % namespace
-        namespace_end   = "} //> end namespace %s" % namespace
-        pass
-
-    guard = "%s_%s_H" % (full_pkg_name.upper(), namespace_klass.upper())
-
-    d = dict( pkg=full_pkg_name,
-              klass=full_app_name,
-              guard=guard,
-              namespace_begin=namespace_begin,
-              namespace_end=namespace_end,namespace_klass=namespace_klass,namespace=namespace
-              )
-    fname = os.path.splitext("src/%s"%namespace_klass)[0]
-
-
-    if os.path.isfile(fname+'.cxx'):
-       print ":::  ERROR %s.cxx already exists" % fname
-       return -1
-    print ":::  INFO Creating %s.cxx" % fname
-    o_cxx = open(fname+'.cxx', 'w')
-    o_cxx.writelines(cxx%d)
-    o_cxx.flush()
-    o_cxx.close()
-
-    #to finish up, call cmt config so that the new algorithm will be captured and genconf run on it
-    cwd = os.getcwd()
-    try:
-        os.chdir('cmt')
-        _ = commands.getstatusoutput('cmt config')
-    finally:
-        os.chdir(cwd)
diff --git a/Tools/PyUtils/python/scripts/cmt_newasgtool.py b/Tools/PyUtils/python/scripts/cmt_newasgtool.py
deleted file mode 100644
index f52a363b923b556d621d9b40cce188eb30dce20c..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/cmt_newasgtool.py
+++ /dev/null
@@ -1,624 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmt_newasgtool
-# @purpose streamline and ease the creation of new asg tools
-# @author Will Buttinger
-# @date September 2014
-
-#Note - this code could use a serious rewrite, I just hacked it together to get something working
-
-from __future__ import with_statement
-
-__version__ = "$Revision: 756300 $"
-__author__ = "Will Buttinger"
-__doc__ = "streamline and ease the creation of new AsgTool"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import commands
-import PyUtils.acmdlib as acmdlib
-import fileinput
-
-class Templates:
-    tool_hdr_template = """\
-#ifndef %(guard)s
-#define %(guard)s 1
-
-///
-///Example usage code:
-///Athena only:
-///To configure the tool, add the following to your joboptions:
-/// myTool = CfgMgr.%(namespace_klass)s("ToolInstanceName",Property=4.0)
-/// import ROOT
-/// myTool.ENumProperty = ROOT.%(namespace_klass)s.Val2
-///To use the tool in your algorithm (can use regular ToolHandle or asg::AnaToolHandle):
-/// #include "%(pkg)s/I%(klass)s.h"
-/// ToolHandle<I%(klass)s> myTool("%(namespace2)s%(klass)s/ToolInstanceName")
-/// CHECK( myTool.retrieve() );
-/// myTool->isSelected(...); //or whatever methods are implemented in I%(klass)s
-///
-///Dual use: Alternative for c++ configuration and usage (with or without athena):
-/// #include "AsgTools/AnaToolHandle.h"
-/// #include "%(pkg)s/I%(klass)s.h"
-/// asg::AnaToolHandle<I%(klass)s> myTool("%(namespace2)s%(klass)s/ToolInstanceName");
-/// myTool.setProperty( "Property", 4.0 );
-/// myTool.setProperty( "ENumProperty", 
-/// myTool.initialize();
-/// myTool->isSelected(....); //or whatever methods are implemented in I%(klass)s
-
-
-
-#include "AsgTools/AsgTool.h"
-
-#include "%(pkg)s/I%(klass)s.h"
-
-%(namespace_begin)s
-
-class %(klass)s: public asg::AsgTool, public virtual I%(klass)s { 
- public: 
-   //constructor for athena can be created using special macro
-   //Note: if you add a second interface to your tool, you must use: ASG_TOOL_CLASS2( ToolName, Interface1, Interface2) 
-   ASG_TOOL_CLASS( %(klass)s , I%(klass)s )
-   //add another constructor for non-athena use cases
-   %(klass)s( const std::string& name );
-
-   /// Initialize is required by AsgTool base class
-   virtual StatusCode  initialize() override;
-
-   // Example code: (part of skeleton code, delete as necessary)
-   // Following method is required by I%(klass)s base class (part of skeleton code, delete as necessary)
-   // DO NOT put default argument values here ... only put them in the interface class
-   virtual bool isSelected(const xAOD::IParticle& particle, bool someAdditionalArgument) const override;
-
- private: 
-   double m_nProperty;
-   unsigned int m_enumProperty; //do not make the actual property an enum - not supported in athena
-}; 
-%(namespace_end)s
-#endif //> !%(guard)s
-"""
-
-    tool_cxx_template = """\
-// %(pkg)s includes
-#include "%(pkg)s/%(namespace_klass)s.h"
-
-%(namespace_begin)s
-
-%(klass)s::%(klass)s( const std::string& name ) : asg::AsgTool( name ){
-
-  declareProperty( "Property", m_nProperty = 3.0 , "Please describe the property here"); //example property declaration with it's default value
-  declareProperty( "ENumProperty", m_enumProperty = Val1 , "Please define enums inside your classes, not just in namespaces" );
-}
-
-
-StatusCode %(klass)s::initialize() {
-  ATH_MSG_INFO ("Initializing " << name() << "...");
-  //
-  //Make use of the property values to configure the tool
-  //Tools should be designed so that no method other than setProperty is called before initialize
-  //
-
-  return StatusCode::SUCCESS;
-}
-
-//
-//the lines below for the example interface method implementation
-//This example is for a tool that selects particles with |eta| < "Property" value .. using 'someAdditionalArgument' to flip the cut
-//
-bool %(klass)s::isSelected( const xAOD::IParticle& particle , bool someAdditionalArgument ) const {
-   if(someAdditionalArgument) return ( fabs(particle.eta()) >= m_nProperty );
-   return ( fabs(particle.eta()) < m_nProperty );
-}
-
-
-%(namespace_end)s
-"""
-
-    tool_interface_template = """\
-#ifndef %(guard)s
-#define %(guard)s 1
-
-#include "AsgTools/IAsgTool.h"
-
-#include "xAODBase/IParticle.h"
-
-class I%(klass)s : public virtual asg::IAsgTool {
-   public:
-      ASG_TOOL_INTERFACE( I%(klass)s ) //declares the interface to athena
-
-      //below is an example method, delete as necessary
-      //this is where you specify default values for additional arguments
-      virtual bool isSelected(const xAOD::IParticle& particle, bool someAdditionalArgument = false) const = 0;
-
-      //declare enums for properties here too, so that they are accessible through just the interface header
-      //example of an enum you might end up using for your properties .. please put enums in a class! (not just a namespace)
-      enum MyEnumProperty { Val1=1 , Val2=2 };
-
-};
-
-#endif //> !%(guard)s
-"""
-    tool_test_template = """ \
-<?xml version="1.0"?>
-<atn>
-   <TEST name="%(pkg)s_makeCheck" type="makecheck">
-      <package>%(fullpkgpath)s</package>
-      <timelimit>5</timelimit>
-      <author> PLEASE ENTER A NAME </author>
-      <mailto> PLEASEENTER@cern.ch </mailto>
-      <expectations>
-         <errorMessage> Athena exited abnormally </errorMessage>
-         <errorMessage>differ</errorMessage>
-         <returnValue>0</returnValue>
-      </expectations>
-   </TEST>
-</atn>
-"""
-
-    tool_testcpp_template = """ \
-   
-#include "AsgTools/AnaToolHandle.h"
-#include "%(pkg)s/I%(klass)s.h"
-
-//next line needed for using the concrete tool in this unit test
-//external users cannot do this
-#include "../Root/%(namespace_klass)s.cxx"
-
-using namespace asg::msgUserCode;
-
-int main() {
-  ANA_CHECK_SET_TYPE (int); //makes ANA_CHECK return ints if exiting function
-#ifdef ROOTCORE
-  StatusCode::enableFailure();
-  ANA_CHECK (xAOD::Init ());
-#endif
-
-   asg::AnaToolHandle<I%(klass)s> myTool("%(namespace2)s%(klass)s/ToolInstanceName");
-   ANA_CHECK( myTool.setProperty( "Property", 4.0 ) );
-   ANA_CHECK( myTool.setProperty( "EnumProperty", I%(klass)s::Val2 ) );
-   ANA_CHECK( myTool.initialize() );
-
-   //myTool->isSelected(....); put test code here
-
-   //next line is how to gain access to concrete instance of the tool ... only ok for unit tests
-   //%(namespace2)s%(klass)s* tool = dynamic_cast<%(namespace2)s%(klass)s*>(&*myTool);
-
-   return 0; //zero = success
-}
-"""
-
-    tool_testcppg_template = """ \
-    
-#include "AsgTools/AnaToolHandle.h"
-#include "%(pkg)s/I%(klass)s.h"
-
-#include "AsgTools/UnitTest.h"
-#include <gtest/gtest.h>
-
-//next line needed for using the concrete tool in this unit test                                                      
-//external users cannot do this                                                                                       
-#include "../Root/%(namespace_klass)s.cxx" 
-
-
-using namespace asg::msgUserCode;
-
-//first arg: name of fixture (if applicable), second arg: name of the test (special prefixes have special meanings)
-//see https://twiki.cern.ch/twiki/bin/view/AtlasComputing/RootCore#Unit_Tests for more details
-TEST (%(klass)sTest, basicTest) {
-   asg::AnaToolHandle<I%(klass)s> myTool("%(namespace2)s%(klass)s/ToolInstanceName");
-   ASSERT_SUCCESS (myTool.setProperty( "Property", 4.0 ));
-   ASSERT_SUCCESS (myTool.setProperty( "EnumProperty", I%(klass)s::Val2 ));
-   ASSERT_SUCCESS (myTool.initialize());
-
-//   ASSERT_TRUE( myTool->isSelected( ...goodObject.. ) );
-
-   //next line is how to gain access to concrete instance of the tool ... only ok for unit tests                      
-   //%(namespace2)s%(klass)s* tool = dynamic_cast<%(namespace2)s%(klass)s*>(&*myTool);                                
-                             
-
-
-}
-
-int main (int argc, char **argv)
-{
-  ANA_CHECK_SET_TYPE (int);
-#ifdef ROOTCORE
-  StatusCode::enableFailure();
-  ANA_CHECK (xAOD::Init ());
-#endif
-  ::testing::InitGoogleTest (&argc, argv);
-  return RUN_ALL_TESTS();
-}
-"""
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmt.new-asgtool'
-    )
-@acmdlib.argument(
-    'toolname',
-    help="name of the new tool"
-    )
-@acmdlib.argument(
-    '--googleTest',
-    action='store_true',
-    default=False,
-    help='Create a google test instead of a unit test'
-    )
-def main(args):
-    """create a new AsgTool inside the current package with a corresponding interface class. Call from within the package directory
-
-    ex:
-     $ acmd cmt new-asgtool MyTool
-    """
-    sc = 0
-    
-    full_tool_name = args.toolname
-
-    #determine the package from the cwd 
-    cwd = os.getcwd()
-    #check that cmt dir exists (i.e. this is a package)
-    if not os.path.isdir(cwd+"/cmt"):
-        print "ERROR you must call new-asgtool from within the package you want to add the tool to"
-        return -1
-    full_pkg_name = os.path.basename(cwd)
-    print textwrap.dedent("""\
-    ::: create asg tool [%(full_tool_name)s] in pkg [%(full_pkg_name)s]""" %locals())
-
-    full_pk_path = os.getcwd().replace(os.environ['TestArea']+'/',"")
-
-    
-    #first we must check that requirements file has the AsgTools use statement in it
-    #it must also have '../Root/*.cxx' in the library declaration
-    #so look for patterns of: library xxxx or apply_pattern dual_use_library ...
-    foundBaseComps=False
-    hasxAODBase=False
-    hasAtlasROOT=False
-    haslcgdict=False
-    lastUse=0 
-    lineCount=0
-    libraryLines = []
-    hasLibraryLine=False
-    for line in open('cmt/requirements'):
-        lineCount +=1 
-        if line.startswith("apply_pattern lcgdict"): haslcgdict=True
-        if line.startswith("library") or line.startswith("apply_pattern dual_use_library"): hasLibraryLine=True
-        if line.startswith("library "):
-           if not ("../Root/*.cxx" in line):
-              print ":::  INFO Adding Root directory to library compilation in requirements file (%s -> %s)" % (line.rstrip(), line.rstrip() + " ../Root/*.cxx")
-              libraryLines += [lineCount]
-        
-        if not line.startswith("use "): continue
-        lastUse=lineCount
-        uu = line.split(" ")
-        if uu[1].startswith("AsgTools"): foundBaseComps=True
-        if uu[1].startswith("xAODBase"): hasxAODBase=True
-        if uu[1].startswith("AtlasROOT"): hasAtlasROOT=True;
-    if not hasLibraryLine:
-      with open("cmt/requirements", "a") as myfile:
-         myfile.write("library %s *.cxx ../Root/*.cxx components/*.cxx\n" % (full_pkg_name))
-         myfile.write("apply_pattern component_library\n")
-    
-    if not foundBaseComps or len(libraryLines)>0 or not hasxAODBase or not hasAtlasROOT:
-        
-        #must add a use statement to the requirements file 
-        #put inside public blocks
-        lineCount=0
-        inPrivate=False
-        if not foundBaseComps: print ":::  INFO Adding AsgTools to requirements file"
-        if not hasAtlasROOT: print ":::  INFO Adding AtlasROOT to requirements file"
-        if not hasxAODBase: print ":::  INFO Adding xAODBase to requirements file"
-        for line in fileinput.input('cmt/requirements', inplace=1):
-            lineCount+=1
-            if (not foundBaseComps or not hasAtlasROOT or not hasxAODBase) and lineCount==lastUse+1:
-                if inPrivate: print "end_private"
-                if not foundBaseComps:
-                  print ""
-                  print "use AsgTools AsgTools-* Control/AthToolSupport"
-                  print ""
-                if not hasAtlasROOT:
-                  print "#uncomment the next line to use ROOT libraries in your package"
-                  print "#use AtlasROOT AtlasROOT-* External"
-                  print ""
-                if not hasxAODBase:
-                  print "#next line only needed for example code in asg tool...please remove if not using"
-                  print "use xAODBase xAODBase-* Event/xAOD"
-                  print ""
-                if inPrivate: print "private"
-            if line.startswith("private"): inPrivate=True
-            elif line.startswith("end_private"): inPrivate=False
-            if lineCount in libraryLines: print line.rstrip() + " ../Root/*.cxx\n",
-            else: print line,
-    
-    if not haslcgdict:
-       #append lcgdict pattern to requirements
-       print ":::  INFO Adding Reflex Dictionary pattern (lcgdict) to requirements file"
-       with open("cmt/requirements", "a") as myfile:
-         myfile.write("")
-         myfile.write("#Reflex Dictionary Generation:\n")
-         myfile.write("private\n")
-         myfile.write("use AtlasReflex AtlasReflex-* External\n")
-         myfile.write("apply_pattern lcgdict dict=%s selectionfile=selection.xml headerfiles=\"../%s/%sDict.h\"\n" % (full_pkg_name,full_pkg_name,full_pkg_name))
-         myfile.write("end_private\n")
-         myfile.flush()
-         myfile.close()
-
-
-
-    
-    #following code borrowed from gen_klass
-    hdr = getattr(Templates, 'tool_hdr_template')
-    cxx = getattr(Templates, 'tool_cxx_template')
-    iface = getattr(Templates, 'tool_interface_template')
-    testxml = getattr(Templates, 'tool_test_template')
-    testcpp = getattr(Templates,'tool_testcpp_template')
-    testcppg = getattr(Templates, 'tool_testcppg_template')
-    
-    namespace_klass = full_tool_name.replace('::','__')
-    namespace_begin,namespace_end = "",""
-    namespace = ""
-    if full_tool_name.count("::")>0:
-        namespace    = full_tool_name.split("::")[0]
-        full_tool_name = full_tool_name.split("::")[1]
-        namespace_begin = "namespace %s {" % namespace
-        namespace_end   = "} //> end namespace %s" % namespace
-        pass
-
-    guard = "%s_%s_H" % (full_pkg_name.upper(), namespace_klass.upper())
-    dictguard = "%s_%sDICT_H" % (full_pkg_name.upper(),full_pkg_name.upper())
-
-    d = dict( pkg=full_pkg_name, fullpkgpath=full_pk_path, 
-              klass=full_tool_name,
-              guard=guard,dictguard=dictguard,
-              namespace_begin=namespace_begin,
-              namespace_end=namespace_end,namespace_klass=namespace_klass,namespace=namespace,namespace2=namespace
-              )
-    if not namespace == "": d["namespace2"]+="::"
-
-    fname = os.path.splitext("%s/%s"%(full_pkg_name,namespace_klass))[0]
-    
-    #create package header folder if not existing already
-    if not os.path.isdir(full_pkg_name):
-       print ":::   INFO Creating %s folder" % full_pkg_name
-       os.mkdir(full_pkg_name)
-
-    #first check doesn't exist 
-    if os.path.isfile(fname+'.h'):
-       print ":::  WARNING %s.h already exists .. not overwriting" % fname
-    else:
-      print ":::  INFO Creating %s.h" % fname
-      o_hdr = open(fname+'.h', 'w')
-      o_hdr.writelines(hdr%d)
-      o_hdr.flush()
-      o_hdr.close()
-
-    d["guard"] = "%s_I%s_H" % (full_pkg_name.upper(), full_tool_name.upper())
-
-    fname = os.path.splitext("%s/I%s"%(full_pkg_name,full_tool_name))[0]
-    if os.path.isfile(fname+'.h'):
-       print ":::  WARNING %s.h already exists .. not overwriting" % fname
-    else:
-      print ":::  INFO Creating %s.h" % fname
-      o_iface = open(fname+'.h', 'w')
-      o_iface.writelines(iface%d)
-      o_iface.flush()
-      o_iface.close()
-
-    #create Root folder if not existing already
-    if not os.path.isdir("Root"):
-       os.mkdir("Root")
-
-    fname = os.path.splitext("Root/%s"%(namespace_klass))[0]
-    if os.path.isfile(fname+'.cxx'):
-       print ":::  WARNING %s.cxx already exists .. not overwriting" % fname
-    else:
-      print ":::  INFO Creating %s.cxx" % fname
-      o_cxx = open(fname+'.cxx', 'w')
-      o_cxx.writelines(cxx%d)
-      o_cxx.flush()
-      o_cxx.close()
-
-    #if lcgdict generating, create/add selection.xml and create/add MyPackageDict.h
-    if True:
-       if not os.path.isfile("%s/%sDict.h"%(full_pkg_name,full_pkg_name)):
-         print ":::  INFO Creating %s/%sDict.h" % (full_pkg_name,full_pkg_name)
-         loadFile = open("%s/%sDict.h" % (full_pkg_name,full_pkg_name),'w')
-         loadFile.writelines("""
-#ifndef %(dictguard)s
-#define %(dictguard)s
-
-#include "%(pkg)s/%(namespace_klass)s.h"
-
-#endif
-"""%d)
-         loadFile.flush()
-         loadFile.close()
-       else:
-         print ":::  INFO Adding %s to %s/%sDict.h" % (namespace_klass,full_pkg_name,full_pkg_name)
-         defineLine=False
-         doneLine=False
-         for line in fileinput.input("%s/%sDict.h"%(full_pkg_name,full_pkg_name), inplace=1):
-            if defineLine and not doneLine:
-               print """
-#include "%(pkg)s/%(namespace_klass)s.h"
-"""%d
-               doneLine=True
-            if line.startswith("#define"): defineLine=True
-            print line,
-         #FIXME: should check actually inserted it!
-       
-       if not os.path.isfile("%s/selection.xml"%(full_pkg_name)):
-         print ":::  INFO Creating %s/selection.xml" % (full_pkg_name)
-         loadFile = open("%s/selection.xml" % (full_pkg_name),'w')
-         if not namespace == "":
-            loadFile.writelines("""
-<lcgdict>
-   <namespace name="%(namespace)s" />
-      <class name="%(namespace)s::%(klass)s" />
-      <class name="I%(klass)s" />
-</lcgdict>
-"""%d)
-         else:
-            loadFile.writelines("""
-<lcgdict>
-   <class name="%(klass)s" />
-   <class name="I%(klass)s" />
-</lcgdict>
-"""%d)
-            loadFile.flush()
-            loadFile.close()
-       else:
-          print ":::  INFO Adding %s and I%s to %s/selection.xml" % (namespace_klass,full_tool_name,full_pkg_name)
-          doNamespace=False
-          if not namespace == "":
-             #check if namespace already defined in file
-             if ('<namespace name="%s"' % namespace) not in open(("%s/selection.xml" % (full_pkg_name))).read():
-                doNamespace=True
-          dictLine=False
-          done=False
-          for line in fileinput.input("%s/selection.xml"%(full_pkg_name), inplace=1):
-               if dictLine and not done:
-                  if doNamespace: print """
-   <namespace name="%(namespace)s" />"""%d
-                  if not namespace == "":
-                     print """
-      <class name="%(namespace)s::%(klass)s" />
-      <class name="I%(klass)s" />"""%d
-                  else:
-                      print """
-      <class name="%(klass)s" />
-      <class name="I%(klass)s" />"""%d
-                  done = True
-               if ((namespace=="" or doNamespace) and "<lcgdict>" in line) or (not namespace =="" and ('<namespace name="%s"' % namespace) in line):
-                  dictLine=True
-               print line,
-
-
-    #check we have a test directory with appropriate xml file in it
-    if not os.path.isdir("test"):
-       os.mkdir("test")
-    if not os.path.isfile("test/%s.xml"%full_pkg_name):
-       print ":::  INFO Creating test/%s.xml"%full_pkg_name
-       loadFile = open("test/%s.xml"%full_pkg_name,'w')
-       loadFile.writelines(testxml%d)
-       loadFile.flush()
-       loadFile.close()
-
-
-    print ":::  INFO Adding 'make check' test to requirements file"
-    with open("cmt/requirements", "a") as myfile:
-      myfile.write("")
-      myfile.write("#test for %s ... compile and execute it with 'make check' \n"%namespace_klass)
-      myfile.write("private\n")
-      myfile.write("use TestTools      TestTools-*         AtlasTest\n")
-      if args.googleTest: 
-         myfile.write("use AtlasGoogleTest AtlasGoogleTest-* External\n")
-         myfile.write("apply_pattern UnitTest_run unit_test=gt_%s\n"%namespace_klass)
-         myfile.write("macro_append gt_%s_test_dependencies \" %s %sMergeComponentsList \"\n" % (namespace_klass, full_pkg_name, full_pkg_name))
-      else:
-         myfile.write("apply_pattern UnitTest_run unit_test=ut_%s\n"%namespace_klass)
-         myfile.write("macro_append ut_%s_test_dependencies \" %s %sMergeComponentsList \"\n" % (namespace_klass, full_pkg_name, full_pkg_name))
-      myfile.write("end_private\n")
-      myfile.flush()
-      myfile.close()
-
-    if args.googleTest:
-       if not os.path.isfile("test/gt_%s_test.cxx" % namespace_klass):
-         print ":::  INFO Creating test/gt_%s_test.cxx" % namespace_klass
-         loadFile = open("test/gt_%s_test.cxx" % namespace_klass,'w')
-         loadFile.writelines(testcppg%d)
-         loadFile.flush()
-         loadFile.close()
-    else:
-      if not os.path.isfile("test/ut_%s_test.cxx" % namespace_klass):
-         print ":::  INFO Creating test/ut_%s_test.cxx" % namespace_klass
-         loadFile = open("test/ut_%s_test.cxx" % namespace_klass,'w')
-         loadFile.writelines(testcpp%d)
-         loadFile.flush()
-         loadFile.close()
-
-
-    #now add the tool to the _entries.cxx file in the components folder 
-    #first check they exist 
-    if not os.path.isfile("src/components/%s_load.cxx"%full_pkg_name):
-       print ":::  INFO Creating src/components/%s_load.cxx"%full_pkg_name
-       loadFile = open("src/components/%s_load.cxx"%full_pkg_name,'w')
-       loadFile.writelines(""" 
-#include "GaudiKernel/LoadFactoryEntries.h"
-LOAD_FACTORY_ENTRIES(%(pkg)s)
-"""%d)
-       loadFile.flush()
-       loadFile.close()
-      
-    if not os.path.isfile("src/components/%s_entries.cxx"%full_pkg_name):
-       print ":::  INFO Creating src/components/%s_entries.cxx"%full_pkg_name
-       loadFile = open("src/components/%s_entries.cxx"%full_pkg_name,'w')
-       if len(namespace_begin)>0:
-          d["namespace"] = args.toolname.split("::")[0]
-          loadFile.writelines("""
-#include "GaudiKernel/DeclareFactoryEntries.h"
-
-#include "%(pkg)s/%(namespace_klass)s.h"
-
-DECLARE_NAMESPACE_TOOL_FACTORY(%(namespace)s, %(klass)s )
-
-DECLARE_FACTORY_ENTRIES( %(pkg)s ) 
-{
-  DECLARE_NAMESPACE_TOOL(%(namespace)s, %(klass)s );
-}
-"""%d)
-       else:
-          loadFile.writelines("""
-#include "GaudiKernel/DeclareFactoryEntries.h"
-
-#include "%(pkg)s/%(namespace_klass)s.h"
-
-DECLARE_TOOL_FACTORY( %(klass)s )
-
-DECLARE_FACTORY_ENTRIES( %(pkg)s ) 
-{
-  DECLARE_TOOL( %(klass)s );
-}
-"""%d)
-       loadFile.flush()
-       loadFile.close()
-    else:
-       #first check tool not already in _entries file 
-       inFile=False
-       for line in open("src/components/%s_entries.cxx"%full_pkg_name):
-          if len(namespace_begin)==0 and "DECLARE_TOOL" in line and d["klass"] in line: inFile=True
-          if len(namespace_begin)>0 and "DECLARE_NAMESPACE_TOOL" in line and d["klass"] in line and d["namespace"]: inFile=True
-          
-       if not inFile:
-         print ":::  INFO Adding %s to src/components/%s_entries.cxx"% (args.toolname,full_pkg_name)
-         nextAdd=False
-         for line in fileinput.input("src/components/%s_entries.cxx"%full_pkg_name, inplace=1):
-            if nextAdd and not "{" in line:
-               nextAdd=False
-               if len(namespace_begin)>0:
-                  print """  DECLARE_NAMESPACE_TOOL(%(namespace)s, %(klass)s );"""%d
-               else:
-                  print """  DECLARE_TOOL( %(klass)s );"""%d
-            if line.startswith("DECLARE_FACTORY_ENTRIES"):
-               nextAdd=True
-               if len(namespace_begin)>0:
-                  
-                  print """
-#include "%(pkg)s/%(namespace_klass)s.h"
-DECLARE_NAMESPACE_TOOL_FACTORY( %(namespace)s, %(klass)s )
-"""%d
-               else:
-                  print """
-#include "%(pkg)s/%(namespace_klass)s.h"
-DECLARE_TOOL_FACTORY( %(klass)s )
-"""%d
-            print line,
-          
-    #to finish up, call cmt config so that the new tool will be captured and genconf run on it
-    cwd = os.getcwd()
-    try:
-        os.chdir('cmt')
-        _ = commands.getstatusoutput('cmt config')
-    finally:
-        os.chdir(cwd)
diff --git a/Tools/PyUtils/python/scripts/cmt_newjobo.py b/Tools/PyUtils/python/scripts/cmt_newjobo.py
deleted file mode 100644
index 1c12e3eb6987f8f15db1f1b209d6d51e28a01c03..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/cmt_newjobo.py
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmt_newalg
-# @purpose streamline and ease the creation of a skeleton joboption
-# @author Will Buttinger
-# @date March 2015
-
-#Note - this code could use a serious rewrite, I just hacked it together to get something working
-
-from __future__ import with_statement
-
-__version__ = "$Revision: 774188 $"
-__author__ = "Will Buttinger"
-__doc__ = "streamline and ease the creation of new skeleton joboption for analysis"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import commands
-import PyUtils.acmdlib as acmdlib
-import fileinput
-
-class Templates:
-    jobo_template = """\
-#Skeleton joboption for a simple analysis job
-
-#---- Minimal joboptions -------
-
-theApp.EvtMax=10                                         #says how many events to run over. Set to -1 for all events
-jps.AthenaCommonFlags.FilesInput = ["%(inFile)s"]   #insert your list of input files here (do this before next lines)
-
-import AthenaPoolCnvSvc.ReadAthenaPool                   #sets up reading of POOL files (e.g. xAODs)
-#import AthenaRootComps.ReadAthenaxAODHybrid             #alternative for FAST xAOD reading!
-
-algseq = CfgMgr.AthSequencer("AthAlgSeq")                #gets the main AthSequencer
-algseq += CfgMgr.%(klass)s()                                 #adds an instance of your alg to it
-
-#-------------------------------
-
-
-#note that if you edit the input files after this point you need to pass the new files to the EventSelector:
-#like this: svcMgr.EventSelector.InputCollections = ["new","list"] 
-
-
-
-
-
-##--------------------------------------------------------------------
-## This section shows up to set up a HistSvc output stream for outputing histograms and trees
-## See https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AthAnalysisBase#How_to_output_trees_and_histogra for more details and examples
-
-#if not hasattr(svcMgr, 'THistSvc'): svcMgr += CfgMgr.THistSvc() #only add the histogram service if not already present (will be the case in this jobo)
-#svcMgr.THistSvc.Output += ["MYSTREAM DATAFILE='myfile.root' OPT='RECREATE'"] #add an output root file stream
-
-##--------------------------------------------------------------------
-
-
-##--------------------------------------------------------------------
-## The lines below are an example of how to create an output xAOD
-## See https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AthAnalysisBase#How_to_create_an_output_xAOD for more details and examples
-
-#from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
-#xaodStream = MSMgr.NewPoolRootStream( "StreamXAOD", "xAOD.out.root" )
-
-##EXAMPLE OF BASIC ADDITION OF EVENT AND METADATA ITEMS
-##AddItem and AddMetaDataItem methods accept either string or list of strings
-#xaodStream.AddItem( ["xAOD::JetContainer#*","xAOD::JetAuxContainer#*"] ) #Keeps all JetContainers (and their aux stores)
-#xaodStream.AddMetaDataItem( ["xAOD::TriggerMenuContainer#*","xAOD::TriggerMenuAuxContainer#*"] )
-#ToolSvc += CfgMgr.xAODMaker__TriggerMenuMetaDataTool("TriggerMenuMetaDataTool") #MetaDataItems needs their corresponding MetaDataTool
-#svcMgr.MetaDataSvc.MetaDataTools += [ ToolSvc.TriggerMenuMetaDataTool ] #Add the tool to the MetaDataSvc to ensure it is loaded
-
-##EXAMPLE OF SLIMMING (keeping parts of the aux store)
-#xaodStream.AddItem( ["xAOD::ElectronContainer#Electrons","xAOD::ElectronAuxContainer#ElectronsAux.pt.eta.phi"] ) #example of slimming: only keep pt,eta,phi auxdata of electrons
-
-##EXAMPLE OF SKIMMING (keeping specific events)
-#xaodStream.AddAcceptAlgs( "%(klass)s" ) #will only keep events where 'setFilterPassed(false)' has NOT been called in the given algorithm
-
-##--------------------------------------------------------------------
-
-
-include("AthAnalysisBaseComps/SuppressLogging.py")              #Optional include to suppress as much athena output as possible. Keep at bottom of joboptions so that it doesn't suppress the logging of the things you have configured above
-
-"""
-
-
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmt.new-jobo'
-    )
-@acmdlib.argument(
-    'joboName',
-    help="name of the joboption"
-    )
-@acmdlib.argument(
-    'alg',
-    default='MyAlg',
-    help='name of the algorithm to add to sequence'
-    )
-@acmdlib.argument(
-    '--inFile',
-    default='my.pool.root',
-    help='name of an input file to add to EventSelector'
-    )
-def main(args):
-    """create a new algorithm inside the current package. Call from within the package directory
-
-    ex:
-     $ acmd cmt new-jobo myJobo MyAlg
-    """
-
-    full_jobo_name = args.joboName
-    full_alg_name = args.alg
-
-    print textwrap.dedent("""\
-    ::: create jobo [%(full_jobo_name)s] for alg [%(full_alg_name)s]""" %locals())
-
-    #following code borrowed from gen_klass
-    jobo = getattr(Templates, 'jobo_template')
-
-    d = dict( klass=args.alg,
-              inFile=args.inFile,
-              )
-    fname = args.joboName+'.py'
-    #first check doesn't exist 
-    if os.path.isfile(fname):
-       print ":::  ERROR %s already exists" % fname
-       return -1
-    o_hdr = open(fname, 'w')
-    o_hdr.writelines(jobo%d)
-    o_hdr.flush()
-    o_hdr.close()
-
diff --git a/Tools/PyUtils/python/scripts/cmt_newpkg.py b/Tools/PyUtils/python/scripts/cmt_newpkg.py
deleted file mode 100644
index c4aa37ddb136991945d3fa929c8a51c0be5062e0..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/cmt_newpkg.py
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmt_newpkg
-# @purpose streamline and ease the creation of new cmt packages
-# @author Sebastien Binet
-# @date February 2010
-
-from __future__ import with_statement
-
-__version__ = "$Revision: 734631 $"
-__author__ = "Sebastien Binet"
-__doc__ = "streamline and ease the creation of new cmt packages"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import commands
-import PyUtils.acmdlib as acmdlib
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmt.new-pkg'
-    )
-@acmdlib.argument(
-    'pkgname',
-    help="(fully qualified) name of the new package"
-    )
-@acmdlib.argument(
-    '--author',
-    default='${USER}',
-    help='name of the author of this new package'
-    )
-@acmdlib.argument(
-    '-r', '--runtime',
-    action='store_true',
-    default=False,
-    help='switch to make a package a runtime package',
-    )
-def main(args):
-    """create a new cmt package with sensible atlas-oriented defaults
-
-    ex:
-     $ acmd cmt new-pkg Control/MyContainer/NewPackage
-    """
-    sc = 0
-    
-    full_pkg_name = args.pkgname
-    if full_pkg_name[0] == '/':
-        full_pkg_name = full_pkg_name[1:]
-        
-    pkg_path = os.path.dirname(full_pkg_name)
-    pkg_name = os.path.basename(full_pkg_name)
-    pkg_vers = '%s-00-00-00' % pkg_name
-    author = os.path.expanduser(os.path.expandvars(args.author))
-
-    if os.path.exists(full_pkg_name):
-        print "ERROR: %s package already exists" % full_pkg_name
-        return 1
-        
-    print textwrap.dedent("""\
-    ::: creating package [%(full_pkg_name)s]...
-    :::   - pkg name:    %(pkg_name)s
-    :::   - pkg version: %(pkg_vers)s
-    :::   - pkg path:    %(pkg_path)s
-    :::   - author:      %(author)s""" % locals())
-    cmd = 'cmt create %(pkg_name)s %(pkg_vers)s %(pkg_path)s' % locals()
-    
-    sc, out = commands.getstatusoutput(cmd)
-    if sc != 0:
-        print "ERROR while running [%s]" % (cmd,)
-        print out
-        return sc
-
-    with open(os.path.join(full_pkg_name,'cmt','requirements'), 'w') as req:
-        print >> req, textwrap.dedent("""\
-        ## automatically generated CMT requirements file
-        package %(pkg_name)s
-        author  %(author)s
-
-        ## for athena policies: this has to be the first use statement
-        use AtlasPolicy \tAtlasPolicy-*
-
-        ## for gaudi tools, services and objects
-        use GaudiInterface \tGaudiInterface-* \tExternal
-
-        ## put here your package dependencies...
-
-        ##
-
-        branches src src/components doc python share
-
-        ## default is to make component library. See: https://twiki.cern.ch/twiki/bin/view/Main/LearningAthena#Libraries_in_CMT for alternatives
-        
-        
-        apply_pattern declare_joboptions files="*.py"
-        apply_pattern declare_python_modules files="*.py"
-
-        
-        """%locals())
-    print "::: creating package [%(full_pkg_name)s]... [done]" % locals()
-
-    cwd = os.getcwd()
-    try:
-        os.chdir(os.path.join(full_pkg_name,'cmt'))
-        _ = commands.getstatusoutput('cmt config')
-    finally:
-        os.chdir(cwd)
-
-    ## if sc != 0:
-    ##     print ":"*80
-    ##     print out
-    ##     return sc
-    
-    return sc
-
diff --git a/Tools/PyUtils/python/scripts/cmt_newpyalg.py b/Tools/PyUtils/python/scripts/cmt_newpyalg.py
deleted file mode 100644
index 0fd1af9c31037365c1373f2e9b82825eeb9c4c4d..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/cmt_newpyalg.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.cmt_newalg
-# @purpose streamline and ease the creation of new athena algs
-# @author Will Buttinger
-# @date September 2014
-
-#Note - this code could use a serious rewrite, I just hacked it together to get something working
-
-from __future__ import with_statement
-
-__version__ = "$Revision: 623437 $"
-__author__ = "Will Buttinger"
-__doc__ = "streamline and ease the creation of new python algorithms"
-
-### imports -------------------------------------------------------------------
-import os
-import textwrap
-import commands
-import PyUtils.acmdlib as acmdlib
-import fileinput
-
-class Templates:
-   pyalg_template = """\
-# @file:    %(pkg)s/python/%(fname)s
-# @purpose: <put some purpose here>
-# @author:  <put your name here>
-
-__doc__     = 'some documentation here'
-__version__ = '$Revision: 623437 $'
-__author__  = '<put your name here>'
-
-import AthenaCommon.SystemOfUnits as Units
-import AthenaPython.PyAthena as PyAthena
-from AthenaPython.PyAthena import StatusCode
-
-class %(klass)s (PyAthena.Alg):
-    'put some documentation here'
-    def __init__(self, name='%(klass)s', **kw):
-        ## init base class
-        kw['name'] = name
-        super(%(klass)s, self).__init__(**kw)
-
-        ## properties and data members
-        #self.foo = kw.get('foo', 10) # default value
-        return
-
-    def initialize(self):
-        self.msg.info('==> initialize...')
-        return StatusCode.Success
-
-    def execute(self):
-        #here's an example of how to loop over something from xAOD
-        #for electron in self.evtStore["ElectronCollection"]: print electron.pt()
-        
-        return StatusCode.Success
-
-    def finalize(self):
-        self.msg.info('==> finalize...')
-        return StatusCode.Success
-
-    # class %(klass)s
-"""
-
-
-### functions -----------------------------------------------------------------
-@acmdlib.command(
-    name='cmt.new-pyalg'
-    )
-@acmdlib.argument(
-    'algname',
-    help="name of the new pyalg"
-    )
-def main(args):
-    """create a new algorithm inside the current package. Call from within the package directory
-
-    ex:
-     $ acmd cmt new-alg MyAlg
-    """
-    sc = 0
-    
-    full_alg_name = args.algname
-
-    #determine the package from the cwd 
-    cwd = os.getcwd()
-    #check that cmt dir exists (i.e. this is a package)
-    if not os.path.isdir(cwd+"/cmt"):
-        print "ERROR you must call new-pyalg from within the package you want to add the algorithm to"
-        return -1
-    full_pkg_name = os.path.basename(cwd)
-    print textwrap.dedent("""\
-    ::: create pyalg [%(full_alg_name)s] in pkg [%(full_pkg_name)s]""" %locals())
-
-    
-    
-    #following code borrowed from gen_klass
-    hdr = getattr(Templates, 'pyalg_template')
-    
-    namespace_klass = full_alg_name.replace('::','__')
-    namespace_begin,namespace_end = "",""
-    namespace = ""
-    if full_alg_name.count("::")>0:
-        namespace    = full_alg_name.split("::")[0]
-        full_alg_name = full_alg_name.split("::")[1]
-        namespace_begin = "namespace %s {" % namespace
-        namespace_end   = "} //> end namespace %s" % namespace
-        pass
-
-    d = dict( pkg=full_pkg_name,
-              klass=full_alg_name,
-              namespace_begin=namespace_begin,
-              namespace_end=namespace_end,namespace_klass=namespace_klass,namespace=namespace,fname=namespace_klass+".py"
-              )
-    fname = os.path.splitext("python/%s"%namespace_klass)[0]
-    #first check doesn't exist 
-    if os.path.isfile(fname+'.u'):
-       print ":::  ERROR %s.py already exists" % fname
-       return -1
-    o_hdr = open(fname+'.py', 'w')
-    o_hdr.writelines(hdr%d)
-    o_hdr.flush()
-    o_hdr.close()
-    
-    #need to create a dummy cxx file in the src folder, if there is nothing in there 
-    import glob
-    if len(glob.glob('src/*.cxx'))==0:
-       #create a dummy file
-       o_hdr = open('src/dummy.cxx', 'w')
-       o_hdr.writelines('//dummy file created to keep cmt happy when compiling only with python algs')
-       o_hdr.flush()
-       o_hdr.close()
-
-    #to finish up, call cmt config so that the new algorithm will be captured and genconf run on it
-    cwd = os.getcwd()
-    try:
-        os.chdir('cmt')
-        _ = commands.getstatusoutput('cmt config')
-    finally:
-        os.chdir(cwd)
diff --git a/Tools/PyUtils/python/scripts/get_tag_diff.py b/Tools/PyUtils/python/scripts/get_tag_diff.py
deleted file mode 100644
index 558bc0dcfb7c4f7df5cd0f27d7fc6e77450c64ca..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/get_tag_diff.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.get_tag_diff
-# @purpose Get the list of tag differences between 2 releases (CERN centric)
-# @author Sebastien Binet
-# @date February 2010
-
-__version__ = "$Revision: 276362 $"
-__doc__ = "Get the list of tag differences between 2 releases (CERN centric)."
-__author__ = "Sebastien Binet"
-
-
-### imports -------------------------------------------------------------------
-import PyUtils.acmdlib as acmdlib
-
-@acmdlib.command(
-    name='get-tag-diff'
-    )
-@acmdlib.argument(
-    'old',
-    help="The description string of the reference release (eg: 12.0.X,rel_3,AtlasOffline)"
-    )
-@acmdlib.argument(
-    'new',
-    help="The description string of the to-be-compared release (eg: 12.0.X,rel_3 or 12.0.3)"
-    )
-def main(args):
-    """Get the list of tag differences between 2 releases (CERN centric)
-    """
-
-    import PyCmt.Cmt as Cmt
-    diffs = Cmt.get_tag_diff(ref=args.old,
-                             chk=args.new,
-                             verbose=True)
-
-    if len(diffs) > 0:
-        return 1
-    return 0
diff --git a/Tools/PyUtils/python/scripts/get_tagsvn_diff.py b/Tools/PyUtils/python/scripts/get_tagsvn_diff.py
deleted file mode 100644
index 67e9665e309fcd2e22ef5b910bc9d52a5082a7e8..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/get_tagsvn_diff.py
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.get_tag_diff
-# @purpose Get the list of tag differences between 2 releases (CERN centric)
-# @author Sebastien Binet
-# @date February 2010
-
-__version__ = "$Revision: 276362 $"
-__doc__ = "Get the list of the SVN differences between packages in 2 releases (CERN centric)."
-__author__ = "Edward Moyse"
-
-
-### imports -------------------------------------------------------------------
-import PyUtils.acmdlib as acmdlib
-from subprocess import check_call,CalledProcessError
-
-@acmdlib.command(
-    name='get-tagsvn-diff'
-    )
-@acmdlib.argument(
-    'old',
-    help="The description string of the reference release (eg: 12.0.X,rel_3,AtlasOffline)"
-    )
-@acmdlib.argument(
-    'new',
-    help="The description string of the to-be-compared release (eg: 12.0.X,rel_3 or 12.0.3)"
-    )
-    
-@acmdlib.argument(
-    '-d', '--domain',
-    help="Restrict to a given domain (e.g. MuonSpectrometer)"
-    )
-
-@acmdlib.argument(
-    '-p', '--project',
-    help="Restrict to a given project (e.g. Event)"
-    )
-    
-@acmdlib.argument(
-    '-k', '--package',
-    help="Restrict to a given package (e.g. MuonRecExample). This is incompatible with restricting to a given domain or project."
-    )
-
-@acmdlib.argument(
-    '-f', '--files', action='store_true', default=False,
-    help="Call 'svn diff' with '--depth files', which will typically just show ChangeLog differences."
-    )
-        
-def main(args):
-    """Get the list of tag differences between 2 releases (CERN centric)
-    """
-
-    print "===> Generating tag difference by calling CMT \n"
-    
-    import PyCmt.Cmt as Cmt
-    diffs = Cmt.get_tag_diff(ref=args.old,
-                             chk=args.new,
-                             verbose=False)
-
-    if (args.package):
-        print "===> Will now dump the SVN diff for ",args.package
-        args.domain=None
-        args.files=None
-    else:
-        print "===> Will now dump the SVN diff for the packages"
-    
-    if (args.domain):
-        print "Restricting to packages in the domain",args.domain
-    if (args.project):
-        print "Restricting to packages in the project",args.project
-    if (args.files):
-        print "... and will limit to file-level (i.e. ChangeLog) differences."
-        
-    for line in diffs:
-        oldTag = line['ref']
-        oldProject = line['ref_proj']
-        newTag = line['chk']
-        newProject = line['chk_proj']
-        if (args.project and args.project!=newProject):
-            continue
-                    
-        path = line['full_name']
-        domain = path.split('/')[0]
-        # print "domain=",domain
-        
-        if (args.domain and args.domain!=domain):
-            continue
-        package = path.split('/')[-1]
-        
-        if (args.package and package!=args.package):
-            continue
-        
-        if ('N/A' in newProject):
-            print "Package",package,"removed from release. Skipping. \n"
-            continue
-        
-        print
-        print '===> Getting SVN diff for package '+package+' at '+path+'\n'
-
-        path="svn+ssh://svn.cern.ch/reps/atlasoff/"+path
-        #path="$SVNOFF/"+path
-
-        if ('N/A' in oldProject):
-            print "New package, so showing diff from first version. \n"
-            oldTag = package+'-00-00-00' #TODO What if this isn't the first tag?
-        else:
-            oldTag=package+'-'+oldTag
-        newTag=package+'-'+newTag
-        # print path+'/tags/'+oldTag, path+'/tags/'+newTag
-        svnargs = ["svn", "diff", path+'/tags/'+oldTag, path+'/tags/'+newTag]
-        if (args.files):
-            svnargs.extend( ["--depth", "files"] )
-            
-        try:
-            svndiff = check_call(svnargs)
-            if (svndiff):
-                for svnline in svndiff:
-                   print svnline
-
-        except CalledProcessError:
-          print 'Some problem running SVN diff!'
-
-    if len(diffs) > 0:
-        return 1
-    return 0
diff --git a/Tools/PyUtils/python/scripts/tc_find_pkg.py b/Tools/PyUtils/python/scripts/tc_find_pkg.py
deleted file mode 100644
index ed7a43befe810475436c6df961d65f832fcbfa87..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/tc_find_pkg.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.tc_find_pkg
-# @purpose find a package using TC-2
-# @author Sebastien Binet, Graeme Stewart
-# @version $Id$
-
-import sys
-import PyUtils.acmdlib as acmdlib
-
-@acmdlib.command(name='tc.find-pkg')
-@acmdlib.argument('pkg',
-                  nargs='+',
-                  help='(list of) package(s) to find in TagCollector')
-def main(args):
-    """find a package using TagCollector-2"""
-
-    import PyUtils.AmiLib as amilib
-
-    try:
-        client = amilib.Client()
-        pkgs = args.pkg
-        if isinstance(pkgs, basestring):
-            pkgs = [pkgs]
-    
-        for pkg in pkgs:
-            client.msg.info('looking for [%s]...', pkg)
-            pkg = client.find_pkg(pkg, check_tag=False)
-            client.msg.info(' found: pkg= [%s]', pkg['packagePath']+pkg['packageName'])
-    
-        return 0
-    except amilib.PyUtilsAMIException, e:
-        print >>sys.stderr, e
-        sys.exit(1)
diff --git a/Tools/PyUtils/python/scripts/tc_find_tag.py b/Tools/PyUtils/python/scripts/tc_find_tag.py
deleted file mode 100644
index 3ff28bd67222042db2de4da9ab5396189e407ba2..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/tc_find_tag.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.tc_find_tag
-# @purpose Find package version taking into account project dependencies
-# @author Frank Winklmeier, Graeme Stewart
-# @version $Id$
-
-import sys
-import PyUtils.acmdlib as acmdlib
-
-@acmdlib.command(name='tc.find-tag')
-@acmdlib.argument(
-    'pkg',
-    nargs='+',
-    help='(list of) package(s) to find in TagCollector')
-@acmdlib.argument(
-    '-p', '--project',
-    action='store',
-    required=True,
-    help='Project')
-@acmdlib.argument(
-    '-r', '--release',
-    action='store',
-    help='Release [default: latest]')
-
-## @brief find package version taking into account project dependencies
-def main(args):
-
-    import PyUtils.AmiLib as amilib
-    
-    try:
-        client = amilib.Client()
-    
-        pkgs = args.pkg
-        if isinstance(pkgs, basestring):
-            pkgs = [pkgs]
-    
-        if not args.release:
-            rel = client.get_releases(args.project)
-            if len(rel)==0:
-                print >>sys.stderr, 'No release for project', args.project
-                sys.exit(1)
-            args.release = rel[-1]
-    
-        client.msg.info('searching package tags for [%s] in release [%s]' % (','.join(pkgs),args.release))
-        pkg_list = [client.get_version_of_pkg_with_deps(pkg, args.project, args.release) for pkg in pkgs]
-        pkg_list = sum(pkg_list,[])   # Flatten list in case more than one version per package
-        client.msg.info('Found %d package(s)' % len(pkg_list))
-        for p in pkg_list:
-            print(' '.join(p))
-    
-        return 0
-    
-    except amilib.PyUtilsAMIException, e:
-        print >>sys.stderr, e
-        sys.exit(1)
-
-
diff --git a/Tools/PyUtils/python/scripts/tc_show_clients.py b/Tools/PyUtils/python/scripts/tc_show_clients.py
deleted file mode 100644
index 2b057103845a8d55c6514dae87b598b33087ab39..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/tc_show_clients.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.tc_show_clients
-# @purpose show the clients of a package using TC-2
-# @author Sebastien Binet
-# @date May 2011
-
-__version__ = "$Revision: 636803 $"
-__doc__ = "show the clients of a package using TC-2"
-__author__ = "Sebastien Binet"
-
-
-### imports -------------------------------------------------------------------
-import os
-import PyUtils.acmdlib as acmdlib
-
-@acmdlib.command(name='tc.show-clients')
-@acmdlib.argument('pkg',
-                  nargs='+',
-                  help='(list of) package(s) to show clients of')
-@acmdlib.argument('-r', '--release',
-                  required=True,
-                  help='the release in which to show the clients (e.g: 17.0.1)')
-@acmdlib.argument('--co',
-                  action='store_true',
-                  default=False,
-                  help='enable the checkout of these clients')
-def main(args):
-    """show the clients of a package using TC-2"""
-
-    import PyUtils.AmiLib as amilib
-    client = amilib.Client()
-
-    pkgs = args.pkg
-    if isinstance(pkgs, basestring):
-        pkgs = [pkgs]
-
-    from collections import defaultdict
-    all_clients = defaultdict(list)
-    
-    for pkg in pkgs:
-        print
-        client.msg.info('showing clients of [%s]...', pkg)
-        # find the project for this pkg
-        projects = client.get_project_of_pkg(pkg, args.release)
-        pkg = client.find_pkg(pkg, check_tag=False)
-        fpkg = pkg['packagePath']+pkg['packageName']
-        if len(projects) > 1:
-            client.msg.info('pkg [%s] exists in more than 1 project: %s ==> will use last one' % (pkg['packageName'], projects))
-        elif len(projects) < 1:
-            continue
-        project = projects[-1]
-        clients = client.get_clients(project, args.release, fpkg)
-        for full_name,v,rel,grp in clients:
-            if full_name.startswith('Projects/'):
-                # remove "meta" packages
-                continue
-            v = v.strip()
-            if os.path.basename(full_name) == v:
-                # filter out container packages
-                continue
-            if '-%s-'%project not in v:
-                all_clients[full_name].append(v)
-        #client.msg.info('        tag= [%s]', tag)
-
-    _all_clients = dict(all_clients)
-    all_clients = []
-    for full_name in sorted(_all_clients.keys()):
-        v = _all_clients[full_name]
-        if len(v) > 1:
-            versions = client.get_pkg_info(full_name, args.release, resultKey="packageTag")
-            if len(versions) != 1:
-                client.msg.info('found multiple versions for package [%s]: %r',
-                                full_name, versions)
-                v = versions
-        print '%-40s' % v[0], full_name
-        all_clients.append(v[0])
-        
-    rc = 0
-    if args.co:
-        print
-        client.msg.info(":"*40)
-        client.msg.info(":: list of package to checkout:")
-        for c in all_clients:
-            print c
-        cmd = ['pkgco.py',]+all_clients
-        import subprocess
-        rc = subprocess.call(cmd)
-    return rc
-
diff --git a/Tools/PyUtils/python/scripts/tc_submit_tag.py b/Tools/PyUtils/python/scripts/tc_submit_tag.py
deleted file mode 100644
index d98ddc9dbf89a35f2bec4830642c99e4badc31af..0000000000000000000000000000000000000000
--- a/Tools/PyUtils/python/scripts/tc_submit_tag.py
+++ /dev/null
@@ -1,288 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-# @file PyUtils.scripts.tc_submit_pkg
-# @purpose Submit one or more TAGs to TagCollector.
-# @author Sebastien Binet
-# @date February 2010
-
-__version__ = "$Revision: 766754 $"
-__doc__ = "Submit one or more TAGs to TagCollector."
-__author__ = "Sebastien Binet, Frank Winklmeier"
-
-
-### imports -------------------------------------------------------------------
-import readline
-import getpass
-import os
-import os.path as osp
-import sys
-
-import PyUtils.acmdlib as acmdlib
-try:
-   import pyAMI.exception
-except ImportError:
-   pass #do nothing
-import PyCmt.Cmt as cmt
-
-### functions -----------------------------------------------------------------
-
-def query_option(opt_name):
-    """query option from user and set proper history files"""
-    history_file = None
-    _allowed_values = ('project', 'release', 'justification', 'bug',)
-    if opt_name not in _allowed_values:
-        raise ValueError(
-            "'opt_name' must be in %s (got %s)" %
-            _allowed_values,
-            opt_name
-            )
-    history_file = osp.expanduser('~/.tc_submit_tag.%s.history' % opt_name)
-    if osp.exists(history_file):
-        readline.read_history_file(history_file)
-
-    value = raw_input('%s: ' % opt_name)
-    if history_file:
-        readline.write_history_file(history_file)
-    readline.clear_history()
-
-    if value == '':
-        return None
-    return value
-    
-def query_project(projects, release, pkg):
-    """query the project(s) to submit to"""
-    if len(projects)==1:
-        return projects[0]
-
-    print "::: Available projects for package [%s] and release [%s]" % (
-        pkg,
-        release)
-    for p in projects:
-        print "   %s" % (p,)
-
-    readline.clear_history()
-    for r in reversed(projects):
-        readline.add_history(r)
-
-    choice = raw_input("Select (comma separated or '*' for all): ")
-
-    if choice=='*':
-        return ','.join(projects)
-    return choice
-
-def query_release(releases, project):
-    """query the release(s) to submit to"""
-
-    if len(releases)==1:
-        return releases[0]
-
-    print "::: Available releases for %s:" % (project,)
-    for r in releases:
-        print "  %s" % (r,)
-
-    readline.clear_history()
-    for r in reversed(releases):
-        readline.add_history(r)
-
-    choice = raw_input("Select (comma separated or '*' for all): ")
-
-    if choice=='*':
-        return ','.join(releases)
-    return choice
-   
-def submit_tag(client, args, pkg, tag, dryrun=None):
-    """Submit tag"""
-
-    cmd_args = {}
-    cmd_args['-action'] = 'update'
-    cmd_args['-fullPackageName'] = '"'+pkg+'"'
-    cmd_args['-packageTag'] = '"'+tag+'"'
-    cmd_args['-autoDetectChanges'] = 'yes'
-
-    if args.justification: cmd_args['-justification'] = '"'+args.justification+'"'
-    if args.bug: cmd_args['-bugReport'] = '"'+args.bug+'"'
-    if args.bundle: cmd_args['-bundleName'] = '"'+args.bundle+'"'
-    if args.no_mail: cmd_args['-noMail'] = ''
-   
-    for i,p in enumerate(args.project):
-        cmd_args['-groupName'] = '"'+p+'"'
-        cmd_args['-releaseName'] = args.release[i]
-        ok = client.exec_cmd(cmd='TCSubmitTagApproval', args=cmd_args, dryrun=dryrun)
-        if ok:
-            print "%s %s submitted to %s %s" % (pkg,tag,p,args.release[i])
-
-@acmdlib.command(name='tc.submit-tag')
-@acmdlib.argument(
-    '-p', '--project',
-    action='store',
-    help='(comma separated list of) project(s) to submit tags to')
-@acmdlib.argument(
-    '-r', '--release',
-    action='store',
-    help='(comma separated list of) release(s) to submit tags to')
-@acmdlib.argument(
-    '-j', '-m', '--justification',
-    action='store',
-    help='justification for tag request')
-@acmdlib.argument(
-    '-s', '--bug',
-    dest='bug',
-    action='store',
-    metavar='BUG',
-    help='Jira issue')
-@acmdlib.argument(
-    '-b','--bundle',
-    action='store',
-    help="bundle name (stays incomplete)")
-@acmdlib.argument(
-    '-n', '--no-mail',
-    action='store_true',
-    default=False,
-    help="do not send confirmation email")
-@acmdlib.argument(
-    '--dryrun',
-    action='store_true',
-    default=False,
-    help='switch to simulate the commands but not actually send the requests'
-    )
-@acmdlib.argument(
-    'pkgs',
-    nargs='+',
-    metavar='TAG',
-    help="""\
-    (list of package) tags to submit or a file containing that list""")
-
-def main(args):
-    """submit one or more package tags to TagCollector
-
-    TAG can be one of the following formats:
-      Container/Package-00-01-02
-      Package-00-01-02
-      Package --> will use latest package tag
-
-    All submitted tags need approval via the TagCollector web interface.
-    If several TAGs are given they will be submitted to the same release(s)
-    with the same justification, etc. Optionally a bundle name can be specified.
-    If no release number is given a list of available releases is presented.
-
-    For any required argument that is not specified on the command line,
-    an interactive query is presented. Some text fields support history (arrow keys).
-
-    Authentication is handled via pyAMI (see https://atlas-ami.cern.ch/AMI/pyAMI)
-    """
-
-    import PyUtils.AmiLib as amilib
-
-    try:
-        client = amilib.Client()
-    
-        # create a list of (pkg,tag) with full package path
-        pkgs = []
-    
-        for pkg in args.pkgs:
-            # a file ?
-            if osp.exists(pkg):
-                fname = pkg
-                print "::: taking tags from file [%s]..." % (fname,)
-                for l in open(fname, 'r'):
-                    l = l.strip()
-                    if l:
-                        print " - [%s]" % (l,)
-                        pkgs.append(l)
-            else:
-                pkgs.append(pkg)
-    
-        pkg_list = [client.find_pkg(pkg, check_tag=False) for pkg in pkgs]
-    
-        # setup history
-        readline.set_history_length(10)
-    
-        # query release if project is known
-        if args.project and not args.release:
-            for p in args.project.split(','):
-                rel = client.get_open_releases(p)
-                if len(rel)==0:
-                    continue
-                if not args.release:
-                    args.release = query_release(rel, p)
-                else:
-                    args.release += (',%s' % query_release(rel, p))
-        if args.release and len(args.release.split(',')) == 1:
-            _release = args.release.split(',')[0]
-            args.release = ','.join([_release]*len(pkg_list))
-            # adjust the project list too
-            if args.project and len(args.project.split(',')) == 1:
-                args.project = ','.join([args.project.split(',')[0]]*len(pkg_list))
-                
-        # query project if release is known
-        if args.release and not args.project:
-            _releases = args.release.split(',')
-            _projects = []
-            rel = _releases[0]
-            for pkg in pkg_list:
-                proj = client.get_pkg_info(pkg['packageName'], rel, resultKey="groupName")
-                if len(proj)==0:
-                    _projects.append(None)
-                    continue
-                v = query_project(proj, rel, pkg['packageName'])
-                _projects.append(v)
-                pass # pkgs
-            if not args.project:
-                args.project = ','.join(_projects)
-            else:
-                args.project += ','+','.join(_projects)
-            pass
-    
-        # Find latest tag if needed
-        print '-'*80
-        for p in pkg_list:
-            if not 'packageTag' in p:
-                pkg = (p['packagePath']+p['packageName']).strip('/') # CMTise path
-                #p['packageTag'] = cmt.CmtWrapper().get_latest_pkg_tag(pkg)
-                from PyUtils.WorkAreaLib import get_latest_pkg_tag
-                p['packageTag'] = get_latest_pkg_tag(pkg)
-                print 'Using latest tag %s' % (p['packageTag'])
-    
-        # query for missing options    
-        for o in ('project', 'release', 'justification', 'bug',):
-            value = getattr(args, o)
-            if value:
-                print '%s : %s' % (o, value)
-            else:
-                setattr(args, o, query_option(o))
-        print '-'*80
-    
-        args.project = args.project.split(',')
-        args.release = args.release.split(',')
-        if len(args.project) != len(args.release):
-            raise RuntimeError(
-                'Number of projects %s and releases %s do not match' %
-                (args.project, args.release)
-                )
-    
-        # If only one tag given, submit this tag to all releases
-        if len(pkg_list)==1: pkg_list = pkg_list*len(args.release)
-                        
-        choice = raw_input("Submit tag? [Y/n] ")      
-        ok = len(choice)==0 or choice.upper()=="Y"
-    
-        releases = args.release[:]
-        projects = args.project[:]
-    
-        exitcode = 0
-        if ok:
-            # Submit tag request
-            for p,rel,proj in zip(pkg_list, releases, projects):
-                args.release = [rel]
-                args.project = [proj]
-                submit_tag(client, args,
-                           p['packagePath']+p['packageName'],p['packageTag'], dryrun=args.dryrun)
-        else:
-            print "Tag submission aborted"
-            exitcode = 1
-            
-        return exitcode
-
-    except amilib.PyUtilsAMIException, e:
-        print >>sys.stderr, e
-        sys.exit(1)
diff --git a/Tools/RunTimeTester/releaseTools/logFileTailer.py b/Tools/RunTimeTester/releaseTools/logFileTailer.py
deleted file mode 100755
index abe1847cecbe77a832a72acaa8c810c5556a1bd7..0000000000000000000000000000000000000000
--- a/Tools/RunTimeTester/releaseTools/logFileTailer.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-from listFiles import listFiles
-import os.path
-
-class LogFileTailer:
-    def __init__(self, nlines, tailFile):
-        self.nlines = nlines
-        self.tailFile = open(tailFile, 'w')
-        self.ncalls = 0
-        
-    def tail(self,f):
-        self.ncalls += 1
-        lines = open(f,'r').readlines()
-        start = 0
-        if len(lines)>self.nlines: start = -self.nlines
-        self.tailFile.write('\n\n========== %s ========\n' % f)
-        [self.tailFile.write(l) for l in lines[start:]]
-
-    def finish(self): self.tailFile.close()
-        
-# root = '/afs/cern.ch/atlas/project/RTT/Work/rel_1/dev/build/i686-slc3-gcc323-opt'
-def getFiles1():
-    return 
-
-
-nlines = 50
-print 'looking for files'
-logfiles = listFiles(root, '*_log')
-print 'Found %d log files' % len(logfiles)
-
-ofn = '/afs/cern.ch/user/r/rtt/Scratch/logFileTails.txt'
-checker = LogFileTailer(nlines, ofn) 
-
-#logfiles = listFiles(root, '*_log')
-logfiles = listFiles(root, '*')
-[checker.tail(f) for f in logfiles]
-
-checker.finish()
-
-
-/afs/cern.ch/atlas/project/RTT/prod/Peter/logs/logfiles_8feb_18:28
diff --git a/Tools/RunTimeTester/share/AtlasEnvSetup.py b/Tools/RunTimeTester/share/AtlasEnvSetup.py
index 0e6cebb74c379b0b873970cdedeede4debc7166a..b651e37756684baae2825203be203dbc4256eeea 100644
--- a/Tools/RunTimeTester/share/AtlasEnvSetup.py
+++ b/Tools/RunTimeTester/share/AtlasEnvSetup.py
@@ -45,7 +45,7 @@ class AtlasEnvSetup:
             self.logger.debug('Output file: %s' % f)
 
         conts = readTemplate()
-        conts = conts.replace('%USER_MODULE_NAME%', self.userScript)
+        conts = conts.replace('USER_MODULE_NAME', self.userScript)
         conts = conts.replace('%RTT_SHARE_DIR%', self.RTTShare)
         conts = conts.replace('%RTT_SRC_DIR%', self.RTTSrc)
         conts = conts.replace('%USER_MODULE_LOCATION%', self.userScriptLoc)
diff --git a/Tools/RunTimeTester/share/UserScriptRunnerTemplate.py b/Tools/RunTimeTester/share/UserScriptRunnerTemplate.py
index 88a4bf76e52f21a02fdaf5ea34b56e1ab54ea798..784d9efcbb87e61c82d79f5da68df8df5d8d7cd8 100644
--- a/Tools/RunTimeTester/share/UserScriptRunnerTemplate.py
+++ b/Tools/RunTimeTester/share/UserScriptRunnerTemplate.py
@@ -10,8 +10,8 @@ class UserScriptRunner:
         sys.path.append("%RTT_SRC_DIR%")
 
         # sys.path = ["/afs/cern.ch/atlas/project/RTT/Results/dozer/api"] + sys.path
-        import %USER_MODULE_NAME%
-        inst = %USER_MODULE_NAME%.%USER_MODULE_NAME%(cPickle.load(file(picklefile)))
+        import USER_MODULE_NAME
+        inst = USER_MODULE_NAME.USER_MODULE_NAME(cPickle.load(file(picklefile)))
         inst.run()
 
 if __name__ == '__main__':
diff --git a/Tools/Scripts/share/get_files b/Tools/Scripts/share/get_files
index 1ccf16a931c47b025eeae1e9629a34bc3236fb67..df8767aa2efccd8fab69726ce41a8de257f7eee7 100755
--- a/Tools/Scripts/share/get_files
+++ b/Tools/Scripts/share/get_files
@@ -165,7 +165,9 @@ basic_linkcmd="ln -s -f -n"
 copycmd=${basic_copycmd}
 
 # Add 'exit' here to make script interruptable; do not trap signal 0.
-tempfile="/tmp/getfile_$$"
+if [ -z "$TMPDIR" ]; then tempfile="/tmp/getfile_$$"
+else tempfile="$TMPDIR/getfile_$$"; fi
+
 trap '/bin/rm -f ${tempfile}; exit 1' 1 2 15
 /bin/rm -f ${tempfile}
 
diff --git a/Tools/Tier0ChainTests/python/CastorFileTool.py b/Tools/Tier0ChainTests/python/CastorFileTool.py
index 5821a7f8bed950683fceef5a7ee82899dbb9eb4b..8234d810a8f8a410ffc42c55e831dd0a17fff299 100644
--- a/Tools/Tier0ChainTests/python/CastorFileTool.py
+++ b/Tools/Tier0ChainTests/python/CastorFileTool.py
@@ -188,7 +188,7 @@ class CastorFileTool:
     # dirs in given castor directory
     timenow = datetime.today().strftime("%d%b%y.%Hh%M")
     dirlist = "dirlist.temp" + timenow
-    os.system("/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select ls -l " + castorDir + " > " + dirlist)
+    os.system("eos ls -l " + castorDir + " > " + dirlist)
     FileList=open(dirlist,"r").readlines()
 
     # construct map with subdirectories
@@ -249,7 +249,7 @@ class CastorFileTool:
     if self.lumiBlock != None and ',' in self.lumiBlock:
       FileList = []
       for iblock in range(int(self.lumiBlock.split(',')[0]),int(self.lumiBlock.split(',')[1])+1):
-        cmd = "/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select ls -l " + castorDir
+        cmd = "eos ls -l " + castorDir
         for grepStr in streamStr:
           cmd += " | grep " + grepStr
           pass
@@ -261,7 +261,7 @@ class CastorFileTool:
         pass
     else:
       #cmd = "nsls -l " + castorDir
-      cmd = "/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select ls -l " + castorDir
+      cmd = "eos ls -l " + castorDir
       #for grepStr in streamStr:
       #  cmd += " | grep " + grepStr
       if self.lumiBlock != None: cmd += " | grep _lb%0.4d" % int(self.lumiBlock)
@@ -444,7 +444,7 @@ class CastorFileTool:
     return fileStr
 
   def TmpFilesCopyCommands(self, jobFileList,tmpFileList):
-    cpcommand = "time /afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select cp "
+    cpcommand = "time xrdcp root://eosatlas.cern.ch/"
     #cpcommand = "time rfcp "
     inprefix = ""
     outprefix = ""
diff --git a/Tools/Tier0ChainTests/scripts/PathConstants.py b/Tools/Tier0ChainTests/scripts/PathConstants.py
index 8bf02f810cac1aebdd2b3acabac3ae47cdfd88ca..b6d7763ff496fbc27fa116704e0480e30058bfa1 100644
--- a/Tools/Tier0ChainTests/scripts/PathConstants.py
+++ b/Tools/Tier0ChainTests/scripts/PathConstants.py
@@ -46,9 +46,10 @@ distArea = '/afs/cern.ch/atlas/software/builds'
 
 eosProjSitRTTPath = '/eos/atlas/atlascerngroupdisk/proj-sit/rtt'
 
-eosBinDir = '/afs/cern.ch/project/eos/installation/atlas/bin'
-eosLibDir = '/afs/cern.ch/project/eos/installation/atlas/lib64'
-eos = os.path.join(eosBinDir, 'eos.select')  # alias to the EOS command
+eosBinDir = '/afs/cern.ch/project/eos/installation/atlas/bin' # not needed any more? HAZ
+eosLibDir = '/afs/cern.ch/project/eos/installation/atlas/lib64'# not needed any more? HAZ
+#eos = os.path.join(eosBinDir, 'eos.select')  # alias to the EOS command
+eos = 'eos'
 
 
 # The path to the private file containing RTT connection params for AMI.
diff --git a/Tools/Tier0ChainTests/scripts/tct_recotrf.py b/Tools/Tier0ChainTests/scripts/tct_recotrf.py
index e3f6db03a6f45df4a9dd0fa1f56a48ddddbe4310..6d57594819a24176071cc9170a1ec6a704969486 100755
--- a/Tools/Tier0ChainTests/scripts/tct_recotrf.py
+++ b/Tools/Tier0ChainTests/scripts/tct_recotrf.py
@@ -88,7 +88,7 @@ def updateTCTCastor(runnumber,trigStream,castordir,nfiles,listlb):
         ffilelist = os.popen('xrd castoratlas ls %s' % (castordir))
     elif 'eos' in castordir:
         #ffilelist = os.popen('xrd eosatlas ls %s' % (castordir))
-	ffilelist = os.popen('/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select ls %s' % (castordir))
+	ffilelist = os.popen('eos ls %s' % (castordir))
     nGoodFiles = 0
     print "tct_recotrf.py : updateTCTCastor : look for files in:", castordir
     for ifile,filestr in enumerate(ffilelist):
diff --git a/Tools/Tier0ChainTests/test/test_digitizationtest.sh b/Tools/Tier0ChainTests/test/test_digitizationtest.sh
index 4b4b5892968775af338bb40e7182d777fcb7197c..bce6614ce821810274961b428a6b7c9bc30880a4 100755
--- a/Tools/Tier0ChainTests/test/test_digitizationtest.sh
+++ b/Tools/Tier0ChainTests/test/test_digitizationtest.sh
@@ -3,11 +3,10 @@
 # art-description: Run digitization on a fixed HITS file
 # art-type: grid
 
-Digi_tf.py --inputHITSFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.simul.HITS.e3099_s2578_tid04919495_00/HITS.04919495._0004*.pool.root*' --digiSeedOffset1 '1' --digiSeedOffset2 '2' --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-28' --DataRunNumber '222525' --maxEvents '50' --outputRDOFile 'MCtest_ttbar.digit.pool.root'
+Digi_tf.py --inputHITSFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.simul.HITS.e3099_s2578_tid04919495_00/HITS.04919495._0004*.pool.root*' --digiSeedOffset1 '1' --digiSeedOffset2 '2' --geometryVersion 'ATLAS-R2-2015-03-01-00' --conditionsTag 'OFLCOND-RUN12-SDR-28' --DataRunNumber '222525' --maxEvents '50' --outputRDOFile 'MCtest_ttbar.digit.pool.root' --imf False
 
 Reco_tf.py --outputTAGFile=myTAG_ttbar_2.root --outputHISTFile=myMergedMonitoring_ttbar_2.root --maxEvents=500 --outputESDFile=myESD_ttbar_2.pool.root --outputAODFile=myAOD_ttbar_2.AOD.pool.root --inputRDOFile=MCtest_ttbar.digit.pool.root --autoConfiguration=everything --triggerConfig=NONE --preExec 'rec.doTrigger=False;'
 
-lsetup rucio
 SCRIPT_DIRECTORY=$1 
 PACKAGE=$2
 TYPE=$3
@@ -17,4 +16,4 @@ PROJECT=$6
 PLATFORM=$7
 NIGHTLY_TAG=$8
 
-./art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_ttbar_2.AOD.pool.root myESD_ttbar_2.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_egammastream_run204073_pileup_30_collisions.sh b/Tools/Tier0ChainTests/test/test_egammastream_run204073_pileup_30_collisions.sh
index c31568595212f7362cd875ed62fb1d77860279b5..f7e5f34ee292bae14885b689466b9bafbbac6fc7 100755
--- a/Tools/Tier0ChainTests/test/test_egammastream_run204073_pileup_30_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_egammastream_run204073_pileup_30_collisions.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_Egamma_0.root --maxEvents=300 --outputESDFile=myESD_Egamma_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_Egamma_0.AOD.pool.root --outputTAGFile=myTAG_Egamma_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-05 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Egamma.merge.RAW._lb0144._SFO-5._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Egamma.merge.RAW._lb0145._SFO-5._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;'
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_Egamma_0.root --maxEvents=300 --outputESDFile=myESD_Egamma_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_Egamma_0.AOD.pool.root --outputTAGFile=myTAG_Egamma_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-05 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Egamma.merge.RAW._lb0144._SFO-5._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Egamma.merge.RAW._lb0145._SFO-5._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;' --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Egamma_0.AOD.pool.root myESD_Egamma_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_expressstream_1_run276689_collisions.sh b/Tools/Tier0ChainTests/test/test_expressstream_1_run276689_collisions.sh
index f9eecafa2c12e681af156894e8649a02bd8797c5..bd2f563816248c15e6ecae81dc712edc072fa4d9 100755
--- a/Tools/Tier0ChainTests/test/test_expressstream_1_run276689_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_expressstream_1_run276689_collisions.sh
@@ -3,6 +3,18 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_0.root --AMI=f628 --maxEvents=25 --outputESDFile=myESD_express_0.pool.root --outputAODFile=myAOD_express_0.AOD.pool.root --outputTAGFile=myTAG_express_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0220._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0221._SFO-ALL._0001.1
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_0.root --AMI=f628 --maxEvents=25 --outputESDFile=myESD_express_0.pool.root --outputAODFile=myAOD_express_0.AOD.pool.root --outputTAGFile=myTAG_express_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0220._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0221._SFO-ALL._0001.1 --imf False
 
 Reco_tf.py --inputAODFile myAOD_express_0.AOD.pool.root --outputTAGFile myTAG_express_0.root
+
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_0.AOD.pool.root myESD_express_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_expressstream_2_run276689_collisions.sh b/Tools/Tier0ChainTests/test/test_expressstream_2_run276689_collisions.sh
index 6e37d59543e8122715e4527086405885fe415ac1..743ab022b9223cf96ef2e6e1583aa1e90c98d610 100755
--- a/Tools/Tier0ChainTests/test/test_expressstream_2_run276689_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_expressstream_2_run276689_collisions.sh
@@ -3,6 +3,18 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_1.root --AMI=f628 --maxEvents=25 --outputESDFile=myESD_express_1.pool.root --outputAODFile=myAOD_express_1.AOD.pool.root --outputTAGFile=myTAG_express_1.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0222._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0223._SFO-ALL._0001.1
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_1.root --AMI=f628 --maxEvents=25 --outputESDFile=myESD_express_1.pool.root --outputAODFile=myAOD_express_1.AOD.pool.root --outputTAGFile=myTAG_express_1.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0222._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0223._SFO-ALL._0001.1 --imf False
 
 Reco_tf.py --inputAODFile myAOD_express_1.AOD.pool.root --outputTAGFile myTAG_express_1.root
+
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_1.AOD.pool.root myESD_express_1.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_expressstream_3_run276689_collisions.sh b/Tools/Tier0ChainTests/test/test_expressstream_3_run276689_collisions.sh
index 2ca3660633eef0e167d325db214768b02a0e2bfc..7fba7acb28925395a45adc7bed9f499cbbc32e64 100755
--- a/Tools/Tier0ChainTests/test/test_expressstream_3_run276689_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_expressstream_3_run276689_collisions.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_2.root --AMI=f628 --maxEvents=300 --outputESDFile=myESD_express_2.pool.root --outputAODFile=myAOD_express_2.AOD.pool.root --outputTAGFile=myTAG_express_2.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0224._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0225._SFO-ALL._0001.1
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_2.root --AMI=f628 --maxEvents=300 --outputESDFile=myESD_express_2.pool.root --outputAODFile=myAOD_express_2.AOD.pool.root --outputTAGFile=myTAG_express_2.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0224._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0225._SFO-ALL._0001.1 --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_2.AOD.pool.root myESD_express_2.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions.sh b/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions.sh
index a68ed711dfc29eb3ccc6c4d2c257698aae9cbf7f..17be41d1cdda93f3d0bc49ac17ff72ff1d658e4d 100755
--- a/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_3.root --AMI=f628 --maxEvents=30 --outputESDFile=myESD_express_3.pool.root --outputAODFile=myAOD_express_3.AOD.pool.root --outputTAGFile=myTAG_express_3.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0226._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0227._SFO-ALL._0001.1
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_3.root --AMI=f628 --maxEvents=30 --outputESDFile=myESD_express_3.pool.root --outputAODFile=myAOD_express_3.AOD.pool.root --outputTAGFile=myTAG_express_3.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0226._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0227._SFO-ALL._0001.1 --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_3.AOD.pool.root myESD_express_3.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions_rawtoall.sh b/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions_rawtoall.sh
index 21e19bb1b04911f931d3c82b438e19fd3c7c8c47..d9647739c1875d366c6dcacfe521a7a99909230f 100755
--- a/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions_rawtoall.sh
+++ b/Tools/Tier0ChainTests/test/test_expressstream_4_run276689_collisions_rawtoall.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_3.root --AMI=f628 --maxEvents=30 --outputESDFile=myESD_express_3.pool.root --outputAODFile=myAOD_express_3.AOD.pool.root --outputTAGFile=myTAG_express_3.root --ignoreErrors=False --steering=doRAWtoALL --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0226._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0227._SFO-ALL._0001.1
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_express_3.root --AMI=f628 --maxEvents=30 --outputESDFile=myESD_express_3.pool.root --outputAODFile=myAOD_express_3.AOD.pool.root --outputTAGFile=myTAG_express_3.root --ignoreErrors=False --steering=doRAWtoALL --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0226._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.express_express.merge.RAW._lb0227._SFO-ALL._0001.1 --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_express_3.AOD.pool.root myESD_express_3.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_jettauetmissstream_run204073_pileup_30_collisions.sh b/Tools/Tier0ChainTests/test/test_jettauetmissstream_run204073_pileup_30_collisions.sh
index 623ba7736ba2a26291385e8c1e66f81322e8a250..05312a6440d7b5f0177008c877c1ee522dc643ef 100755
--- a/Tools/Tier0ChainTests/test/test_jettauetmissstream_run204073_pileup_30_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_jettauetmissstream_run204073_pileup_30_collisions.sh
@@ -3,5 +3,16 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_JetTauEtmiss_0.root --AMI=q205 --maxEvents=300 --outputESDFile=myESD_JetTauEtmiss_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_JetTauEtmiss_0.AOD.pool.root --outputTAGFile=myTAG_JetTauEtmiss_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-07 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0144._SFO-5._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0145._SFO-7._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;'
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_JetTauEtmiss_0.root --AMI=q205 --maxEvents=300 --outputESDFile=myESD_JetTauEtmiss_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_JetTauEtmiss_0.AOD.pool.root --outputTAGFile=myTAG_JetTauEtmiss_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-07 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0144._SFO-5._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_JetTauEtmiss.merge.RAW._lb0145._SFO-7._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;' --imf False
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_JetTauEtmiss_0.AOD.pool.root myESD_JetTauEtmiss_0.pool.root
 
diff --git a/Tools/Tier0ChainTests/test/test_m11_cosmics.sh b/Tools/Tier0ChainTests/test/test_m11_cosmics.sh
index 6014623eadac3a13311ce34282b055c3e0935da2..badad13cede921000326063c70245c10f55d7b80 100755
--- a/Tools/Tier0ChainTests/test/test_m11_cosmics.sh
+++ b/Tools/Tier0ChainTests/test/test_m11_cosmics.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=x383 --maxEvents=50 --outputESDFile=myESD_Main_0.pool.root --geometryVersion=ATLAS-R2-2015-04-00-00 --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_cos.00289954.physics_Main.daq.RAW._lb0844._SFO-6._0001.data
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=x383 --maxEvents=50 --outputESDFile=myESD_Main_0.pool.root --geometryVersion=ATLAS-R2-2015-04-00-00 --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_cos.00289954.physics_Main.daq.RAW._lb0844._SFO-6._0001.data --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_0.AOD.pool.root myESD_Main_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions.sh b/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions.sh
index 74e6e8c0d2728844fcdb91c7fc6696d53897981a..e907ca77e2018b2c99f58a196e7f4db8f2058684 100755
--- a/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=f628 --maxEvents=375 --outputESDFile=myESD_Main_0.pool.root --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.physics_Main.daq.RAW._lb0220._SFO-1._0001.data,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.physics_Main.daq.RAW._lb0221._SFO-1._0001.data
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=f628 --maxEvents=375 --outputESDFile=myESD_Main_0.pool.root --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.physics_Main.daq.RAW._lb0220._SFO-1._0001.data,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.physics_Main.daq.RAW._lb0221._SFO-1._0001.data --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_0.AOD.pool.root myESD_Main_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions_withouthist.sh b/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions_withouthist.sh
index 82ddf5f9d5215049a701c44d9b14273c283ef162..20c9a5150665ca853ff4263da6afba847aef7853 100755
--- a/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions_withouthist.sh
+++ b/Tools/Tier0ChainTests/test/test_mainstream_run276689_collisions_withouthist.sh
@@ -3,6 +3,18 @@
 # art-description: RecoTrf with beamType=collisions
 # art-type: grid
 
-Reco_tf.py  --AMI=f628 --maxEvents=375 --outputESDFile=myESD_Main_2.pool.root --outputAODFile=myAOD_Main_2.AOD.pool.root --outputTAGFile=myTAG_Main_2.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.physics_Main.daq.RAW._lb0220._SFO-1._0001.data,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.physics_Main.daq.RAW._lb0221._SFO-1._0001.data
+Reco_tf.py  --AMI=f628 --maxEvents=375 --outputESDFile=myESD_Main_2.pool.root --outputAODFile=myAOD_Main_2.AOD.pool.root --outputTAGFile=myTAG_Main_2.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.physics_Main.daq.RAW._lb0220._SFO-1._0001.data,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_13TeV.00276689.physics_Main.daq.RAW._lb0221._SFO-1._0001.data --imf False
 
 Reco_tf.py --autoConfiguration=everything  --inputESDFile=myESD_Main_2.pool.root --outputTAGFile=myTAG_Main_3.root
+
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_2.AOD.pool.root myESD_Main_2.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_minbiasstream_run204073_pileup_30_collisions.sh b/Tools/Tier0ChainTests/test/test_minbiasstream_run204073_pileup_30_collisions.sh
index fc105e71390707630530a764121db67af136c8ca..43521e6554d77f70c596da7fa88786a290a6ba50 100755
--- a/Tools/Tier0ChainTests/test/test_minbiasstream_run204073_pileup_30_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_minbiasstream_run204073_pileup_30_collisions.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_MinBias_0.root --AMI=q205 --maxEvents=300 --outputESDFile=myESD_MinBias_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_MinBias_0.AOD.pool.root --outputTAGFile=myTAG_MinBias_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-07 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_MinBias.merge.RAW._lb0144._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_MinBias.merge.RAW._lb0145._SFO-ALL._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;'
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_MinBias_0.root --AMI=q205 --maxEvents=300 --outputESDFile=myESD_MinBias_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_MinBias_0.AOD.pool.root --outputTAGFile=myTAG_MinBias_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-07 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_MinBias.merge.RAW._lb0144._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_MinBias.merge.RAW._lb0145._SFO-ALL._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;' --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_MinBias_0.AOD.pool.root myESD_MinBias_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_muonsstream_run204073_pileup_30_collisions.sh b/Tools/Tier0ChainTests/test/test_muonsstream_run204073_pileup_30_collisions.sh
index afb82c9d84cfc856f8730f9a0a15e2c9ef5f1d84..b33533eee984ec9ab07f876cbabaf84c85f9991e 100755
--- a/Tools/Tier0ChainTests/test/test_muonsstream_run204073_pileup_30_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_muonsstream_run204073_pileup_30_collisions.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_Muons_0.root --AMI=q205 --maxEvents=300 --outputESDFile=myESD_Muons_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_Muons_0.AOD.pool.root --outputTAGFile=myTAG_Muons_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-07 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Muons.merge.RAW._lb0144._SFO-3._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Muons.merge.RAW._lb0145._SFO-9._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;'
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_Muons_0.root --AMI=q205 --maxEvents=300 --outputESDFile=myESD_Muons_0.pool.root --geometryVersion=ATLAS-R1-2012-03-00-00 --outputAODFile=myAOD_Muons_0.AOD.pool.root --outputTAGFile=myTAG_Muons_0.root --ignoreErrors=False --conditionsTag=COMCOND-BLKPA-RUN1-07 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Muons.merge.RAW._lb0144._SFO-3._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00204073.physics_Muons.merge.RAW._lb0145._SFO-9._0001.1 --autoConfiguration=everything --preExec='rec.doTrigger=False;' --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Muons_0.AOD.pool.root myESD_Muons_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_q220.sh b/Tools/Tier0ChainTests/test/test_q220.sh
index 1389e494aec7944359edeea0e9d0c4e9422e2a85..24f827a63f0dc05b97828573c42c482376eb975f 100755
--- a/Tools/Tier0ChainTests/test/test_q220.sh
+++ b/Tools/Tier0ChainTests/test/test_q220.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py --AMI=q220 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_cos.00251363.physics_IDCosmic.merge.RAW._lb0057._SFO-ALL._0001.1
+Reco_tf.py --AMI=q220 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_cos.00251363.physics_IDCosmic.merge.RAW._lb0057._SFO-ALL._0001.1 --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_q221.sh b/Tools/Tier0ChainTests/test/test_q221.sh
index 12d48ed09880e0897350368f9691c8e2086c796c..c558304c99991e736b2f38caae4108e29c24deee 100755
--- a/Tools/Tier0ChainTests/test/test_q221.sh
+++ b/Tools/Tier0ChainTests/test/test_q221.sh
@@ -3,7 +3,18 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py --AMI=q221 --outputRDOFile=myRDO.pool.root --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc15_13TeV.410500.PowhegPythia8EvtGen_A14_ttbar_hdamp172p5_nonallhad.simul.HITS.e4797_s2726.50events.pool.root
+Reco_tf.py --AMI=q221 --outputRDOFile=myRDO.pool.root --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc15_13TeV.410500.PowhegPythia8EvtGen_A14_ttbar_hdamp172p5_nonallhad.simul.HITS.e4797_s2726.50events.pool.root --imf False
 
-Reco_tf.py --validationFlags 'doExample,doMET,doPFlow,doTau,doTopoCluster,doEgamma,doBtag,doZee,doJet,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' --inputAODFile=myAOD.pool.root  --outputNTUP_PHYSVALFile=myNTUP_PHYSVAL.root
+Reco_tf.py --validationFlags 'doExample,doMET,doPFlow,doTau,doEgamma,doBtag,doZee,doJet,doMuon,doTrigMinBias,doTrigIDtrk,doTrigBphys,doTrigMET,doTrigJet,doTrigTau, doTrigEgamma,doTrigMuon,doTrigBjet,doTrigHLTResult' --preExec "all:from InDetPhysValMonitoring.addTruthJets import addTruthJetsIfNotExising; addTruthJetsIfNotExising(\"AntiKt4TruthJets\");" --inputAODFile=myAOD.pool.root  --outputNTUP_PHYSVALFile=myNTUP_PHYSVAL.root
 
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_q222.sh b/Tools/Tier0ChainTests/test/test_q222.sh
index 7fc4e4aef909eaf87d450e6111c91e4ea31d8f9e..503c686a73a298ed1a682a6ce00880de42a8d241 100755
--- a/Tools/Tier0ChainTests/test/test_q222.sh
+++ b/Tools/Tier0ChainTests/test/test_q222.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py --AMI=q222 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00209109.physics_JetTauEtmiss.merge.RAW._lb0186._SFO-1._0001.1
+Reco_tf.py --AMI=q222 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data12_8TeV.00209109.physics_JetTauEtmiss.merge.RAW._lb0186._SFO-1._0001.1 --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_q223.sh b/Tools/Tier0ChainTests/test/test_q223.sh
index 4571042c4805b4a8c9727ce5c521b00cc561d728..b4ccd59de987dd3976d925490bd30b219b91b76a 100755
--- a/Tools/Tier0ChainTests/test/test_q223.sh
+++ b/Tools/Tier0ChainTests/test/test_q223.sh
@@ -3,5 +3,16 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py --AMI=q223 --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_comm.00264034.physics_MinBias.daq.RAW._lb0644._SFO-6._0001.data
+Reco_tf.py --AMI=q223 --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data15_comm.00264034.physics_MinBias.daq.RAW._lb0644._SFO-6._0001.data --imf False
 
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_q431.sh b/Tools/Tier0ChainTests/test/test_q431.sh
index 6d6d20caf6b2a58f8e80f6dd52d545ead2f99acb..caffa6210469e0d94aa0c0f2634d3f5b9fd726a3 100755
--- a/Tools/Tier0ChainTests/test/test_q431.sh
+++ b/Tools/Tier0ChainTests/test/test_q431.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py --AMI=q431 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00297447.physics_Main.daq.RAW._lb0555._SFO-1._0001.data
+Reco_tf.py --AMI=q431 --outputTAGFile=myTAG.pool.root --outputAODFile=myAOD.pool.root --outputESDFile=myESD.pool.root --outputHISTFile=myHIST.root --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00297447.physics_Main.daq.RAW._lb0555._SFO-1._0001.data --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root 
diff --git a/Tools/Tier0ChainTests/test/test_reco_mc15_13tev.sh b/Tools/Tier0ChainTests/test/test_reco_mc15_13tev.sh
deleted file mode 100755
index 760009ee4e67b7d743d6c8a398453dcbfd065a67..0000000000000000000000000000000000000000
--- a/Tools/Tier0ChainTests/test/test_reco_mc15_13tev.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-#
-# art-description: RecoTrf
-# art-type: grid
-
-Reco_tf.py --inputHITSFile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.simul.HITS.e3099_s2578_tid04919495_00/HITS.04919495._0004*.pool.root*" --AMITag="r6594" --autoConfiguration="everything" --conditionsTag "default:OFLCOND-RUN12-SDR-28" --digiSeedOffset1="64" --digiSeedOffset2="64" --geometryVersion="default:ATLAS-R2-2015-03-01-00" --inputHighPtMinbiasHitsFile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/HITS.05098387._0023*.pool.root*" --inputLowPtMinbiasHitsFile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374._0021*.pool.root*" --jobNumber="64" --maxEvents="150" --numberOfCavernBkg="0" --numberOfHighPtMinBias="0.12268057" --numberOfLowPtMinBias="39.8773194" --outputAODFile="myAOD.pool.root" --outputESDFile="myESD.pool.root" --outputRDOFile="myRDO.pool.root" --outputTAGFile=myTAG.root --postExec "all:CfgMgr.MessageSvc().setError+=[\"HepMcParticleLink\"]" "HITtoRDO:job.StandardPileUpToolsAlg.PileUpTools[\"MergeMcEventCollTool\"].OnlySaveSignalTruth=True" "RAWtoESD:ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch="1"" "HITtoRDO:ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1" --postInclude "default:RecJobTransforms/UseFrontier.py" --preExec "all:rec.Commissioning.set_Value_and_Lock(True);rec.doTrigger.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 TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup=\"MC_pp_v6_loose_mc_prescale\";from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False" "ESDtoAOD:TriggerFlags.AODEDMSet=\"AODFULL\"" "RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup=\"MC_pp_v6_loose_mc_prescale\";" "HITtoRDO:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.bunchSpacing.set_Value_and_Lock(50);" --preInclude "HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_50ns_Config1.py,RunDependentSimData/configLumi_run222510.py" "RDOtoRDOTrigger:RecExPers/RecoOutputMetadataList_jobOptions.py" --runNumber="110401" --skipEvents="0" --steering "RAWtoESD:in-RDO,in+RDO_TRIG,in-BS" --pileupFinalBunch 6
-
diff --git a/Tools/Tier0ChainTests/test/test_reco_mc15_13tev_mp.sh b/Tools/Tier0ChainTests/test/test_reco_mc15_13tev_mp.sh
deleted file mode 100755
index 6e1e7f4b53028cf4c58128be1eeb3bc4b9654a98..0000000000000000000000000000000000000000
--- a/Tools/Tier0ChainTests/test/test_reco_mc15_13tev_mp.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-#
-# art-description: RecoTrf
-# art-type: grid
-
-Reco_tf.py --athenaopts='--nprocs=2' --inputHITSFile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.simul.HITS.e3099_s2578_tid04919495_00/HITS.04919495._0004*.pool.root*" --AMITag="r6594" --autoConfiguration="everything" --conditionsTag "default:OFLCOND-RUN12-SDR-28" --digiSeedOffset1="64" --digiSeedOffset2="64" --geometryVersion="default:ATLAS-R2-2015-03-01-00" --inputHighPtMinbiasHitsFile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/mc15_valid.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.merge.HITS.e3581_s2578_s2169_tid05098387_00/HITS.05098387._0023*.pool.root*" --inputLowPtMinbiasHitsFile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/mc15_valid.361034.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_low.merge.HITS.e3581_s2578_s2169_tid05098374_00/HITS.05098374._0021*.pool.root*" --jobNumber="64" --maxEvents="150" --numberOfCavernBkg="0" --numberOfHighPtMinBias="0.12268057" --numberOfLowPtMinBias="39.8773194" --outputAODFile="myAOD.pool.root" --outputESDFile="myESD.pool.root" --outputRDOFile="myRDO.pool.root" --outputTAGFile=myTAG.root --postExec "all:CfgMgr.MessageSvc().setError+=[\"HepMcParticleLink\"]" "HITtoRDO:job.StandardPileUpToolsAlg.PileUpTools[\"MergeMcEventCollTool\"].OnlySaveSignalTruth=True" "RAWtoESD:ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch="1"" "HITtoRDO:ToolSvc.LArAutoCorrTotalToolDefault.deltaBunch=1" --postInclude "default:RecJobTransforms/UseFrontier.py" --preExec "all:rec.Commissioning.set_Value_and_Lock(True);rec.doTrigger.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 TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup=\"MC_pp_v6_loose_mc_prescale\";from CaloRec.CaloCellFlags import jobproperties;jobproperties.CaloCellFlags.doLArCellEmMisCalib=False" "ESDtoAOD:TriggerFlags.AODEDMSet=\"AODFULL\"" "RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup=\"MC_pp_v6_loose_mc_prescale\";" "HITtoRDO:from AthenaCommon.BeamFlags import jobproperties;jobproperties.Beam.bunchSpacing.set_Value_and_Lock(50);" --preInclude "HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_50ns_Config1.py,RunDependentSimData/configLumi_run222510.py" "RDOtoRDOTrigger:RecExPers/RecoOutputMetadataList_jobOptions.py" --runNumber="110401" --skipEvents="0" --steering "RAWtoESD:in-RDO,in+RDO_TRIG,in-BS" --pileupFinalBunch 6
-
diff --git a/Tools/Tier0ChainTests/test/test_reco_mc16a.sh b/Tools/Tier0ChainTests/test/test_reco_mc16a.sh
index 0784ef72c1e346049610b1c7f8ad71c8693e0c88..2f188b3470e8bba5587e641bb0905fc7ccaa8474 100755
--- a/Tools/Tier0ChainTests/test/test_reco_mc16a.sh
+++ b/Tools/Tier0ChainTests/test/test_reco_mc16a.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py --digiSteeringConf 'StandardSignalOnlyTruth' --conditionsTag 'default:OFLCOND-MC16-SDR-16' --valid 'True' --pileupFinalBunch '6' --numberOfHighPtMinBias '0.152593389' --autoConfiguration 'everything' --numberOfLowPtMinBias '58.3474065525' --steering 'doRDO_TRIG' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_mc16a.py' --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'ESDtoAOD:fixedAttrib=[s if "CONTAINER_SPLITLEVEL = \"99\"" not in s else "" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib' 'RDOtoRDOTrigger:conddb.addOverride("/CALO/Ofl/Noise/PileUpNoiseLumi","CALOOflNoisePileUpNoiseLumi-mc15-mu30-dt25ns")' --postInclude 'default:PyJobTransforms/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)' 'all:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doWriteTracksToESD.set_Value_and_Lock(True)' 'ESDtoAOD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock("AODFULL");' 'RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v6_tight_mc_prescale");' 'RAWtoESD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v6_tight_mc_prescale");' 'all:from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config="2016"' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' --numberOfCavernBkg '0' --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/* --maxEvents=100 --outputAODFile=myAOD.pool.root --outputRDOFile="myRDO.pool.root" --outputESDFile="myESD.pool.root" --outputTAGFile="myTAG.root" --runNumber=410000 --jobNumber=1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/* --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/*
+Reco_tf.py --digiSteeringConf 'StandardSignalOnlyTruth' --conditionsTag 'default:OFLCOND-MC16-SDR-17' --valid 'True' --pileupFinalBunch '6' --numberOfHighPtMinBias '0.152593389' --autoConfiguration 'everything' --numberOfLowPtMinBias '58.3474065525' --steering 'doRDO_TRIG' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_mc16a.py' --postExec 'all:CfgMgr.MessageSvc().setError+=["HepMcParticleLink"]' 'ESDtoAOD:fixedAttrib=[s if "CONTAINER_SPLITLEVEL = \"99\"" not in s else "" for s in svcMgr.AthenaPoolCnvSvc.PoolAttributes];svcMgr.AthenaPoolCnvSvc.PoolAttributes=fixedAttrib' 'RDOtoRDOTrigger:conddb.addOverride("/CALO/Ofl/Noise/PileUpNoiseLumi","CALOOflNoisePileUpNoiseLumi-mc15-mu30-dt25ns")' --postInclude 'default:PyJobTransforms/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)' 'all:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doWriteTracksToESD.set_Value_and_Lock(True)' 'ESDtoAOD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock("AODFULL");' 'RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v6_tight_mc_prescale");' 'RAWtoESD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v6_tight_mc_prescale");' 'all:from TriggerJobOpts.TriggerFlags import TriggerFlags as TF;TF.run2Config="2016"' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' --numberOfCavernBkg '0' --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/* --maxEvents=100 --outputAODFile=myAOD.pool.root --outputRDOFile="myRDO.pool.root" --outputESDFile="myESD.pool.root" --outputTAGFile="myTAG.root" --runNumber=410000 --jobNumber=1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/* --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/* --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_reco_mc16b.sh b/Tools/Tier0ChainTests/test/test_reco_mc16b.sh
deleted file mode 100755
index c8d7a1d6fdc773052f9793fa495e9580106bf40e..0000000000000000000000000000000000000000
--- a/Tools/Tier0ChainTests/test/test_reco_mc16b.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-#
-# art-description: RecoTrf
-# art-type: grid
-
-Reco_tf.py --digiSteeringConf 'StandardSignalOnlyTruth' --conditionsTag 'default:OFLCOND-MC16-SDR-16' --valid 'True' --pileupFinalBunch '6' --numberOfHighPtMinBias '0.152593389' --autoConfiguration 'everything' --numberOfLowPtMinBias '58.3474065525' --steering 'doRDO_TRIG' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInclude.PileUpBunchTrainsMC15_2015_25ns_Config1.py,RunDependentSimData/configLumi_run284500_mc16b.py' --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:PyJobTransforms/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)' 'all:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doWriteTracksToESD.set_Value_and_Lock(True)' 'ESDtoAOD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock("AODFULL");' 'RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v7_tight_mc_prescale");' 'RAWtoESD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v7_tight_mc_prescale");' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' --numberOfCavernBkg '0' --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/* --maxEvents=100 --outputAODFile=myAOD.pool.root --outputRDOFile="myRDO.pool.root" --outputESDFile="myESD.pool.root" --outputTAGFile="myTAG.root" --runNumber=410000 --jobNumber=1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/* --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/*
-
diff --git a/Tools/Tier0ChainTests/test/test_reco_mc16c.sh b/Tools/Tier0ChainTests/test/test_reco_mc16c.sh
new file mode 100755
index 0000000000000000000000000000000000000000..6e84bfbec5751956ae045700646861cb8f4c03ad
--- /dev/null
+++ b/Tools/Tier0ChainTests/test/test_reco_mc16c.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# art-description: RecoTrf
+# art-type: grid
+
+Reco_tf.py --digiSteeringConf 'StandardSignalOnlyTruth' --conditionsTag 'default:OFLCOND-MC16-SDR-17' --valid 'True' --pileupFinalBunch '6' --numberOfHighPtMinBias '0.152593389' --autoConfiguration 'everything' --numberOfLowPtMinBias '58.3474065525' --steering 'doRDO_TRIG' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configLumi_run300000_mc16c.py' --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:PyJobTransforms/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)' 'all:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doWriteTracksToESD.set_Value_and_Lock(True)' 'ESDtoAOD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock("AODFULL");' 'RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v7_tight_mc_prescale");' 'RAWtoESD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v7_tight_mc_prescale");' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' --numberOfCavernBkg '0' --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/* --maxEvents=100 --outputAODFile=myAOD.pool.root --outputRDOFile="myRDO.pool.root" --outputESDFile="myESD.pool.root" --outputTAGFile="myTAG.root" --runNumber=410000 --jobNumber=1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/* --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/* --imf False
+
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_reco_mc16c_mp.sh b/Tools/Tier0ChainTests/test/test_reco_mc16c_mp.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d8a8446c698f49c0c6236ca4063a1ead53e190e8
--- /dev/null
+++ b/Tools/Tier0ChainTests/test/test_reco_mc16c_mp.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# art-description: RecoTrf
+# art-type: grid
+
+Reco_tf.py --athenaopts='--nprocs=2' --digiSteeringConf 'StandardSignalOnlyTruth' --conditionsTag 'default:OFLCOND-MC16-SDR-17' --valid 'True' --pileupFinalBunch '6' --numberOfHighPtMinBias '0.152593389' --autoConfiguration 'everything' --numberOfLowPtMinBias '58.3474065525' --steering 'doRDO_TRIG' --preInclude 'HITtoRDO:Digitization/ForceUseOfPileUpTools.py,SimulationJobOptions/preInlcude.PileUpBunchTrainsMC16c_2017_Config1.py,RunDependentSimData/configLumi_run300000_mc16c.py' --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:PyJobTransforms/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)' 'all:from InDetRecExample.InDetJobProperties import InDetFlags; InDetFlags.doWriteTracksToESD.set_Value_and_Lock(True)' 'ESDtoAOD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.AODEDMSet.set_Value_and_Lock("AODFULL");' 'RDOtoRDOTrigger:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v7_tight_mc_prescale");' 'RAWtoESD:from TriggerJobOpts.TriggerFlags import TriggerFlags;TriggerFlags.triggerMenuSetup.set_Value_and_Lock("MC_pp_v7_tight_mc_prescale");' --geometryVersion 'default:ATLAS-R2-2016-01-00-01' --numberOfCavernBkg '0' --inputHITSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/valid1.410000.PowhegPythiaEvtGen_P2012_ttbar_hdamp172p5_nonallhad.simul.HITS.e4993_s3091/* --maxEvents=100 --outputAODFile=myAOD.pool.root --outputRDOFile="myRDO.pool.root" --outputESDFile="myESD.pool.root" --outputTAGFile="myTAG.root" --runNumber=410000 --jobNumber=1 --inputLowPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361238.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_low.merge.HITS.e4981_s3087_s3089/* --inputHighPtMinbiasHitsFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/mc16_13TeV.361239.Pythia8EvtGen_A3NNPDF23LO_minbias_inelastic_high.merge.HITS.e4981_s3087_s3089/*
diff --git a/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs.sh b/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs.sh
index f9398323b66f57d42ea800fb287e7460b44b76ef..456686edb15158929a9f4cdf63565ac4dc63dfc7 100755
--- a/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs.sh
+++ b/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py --conditionsTag all:CONDBR2-BLKPA-2016-16 --ignoreErrors 'False' --autoConfiguration='everything' --maxEvents '250' --geometryVersion all:ATLAS-R2-2015-04-00-00 --steering='doRAWtoALL' --inputBSFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00306451.physics_Main.daq.RAW._lb0948._SFO-4._0001.data' --outputDRAW_EGZFile 'myDRAW_EGZ.data' --outputDESDM_IDALIGNFile 'myDESDM_IDALIGN.pool.root' --outputDESDM_SGLELFile 'myDESDM_SGLEL.pool.root' --outputDESDM_SLTTMUFile 'myDESDM_SLTTMU.pool.root' --outputDAOD_IDTRKVALIDFile 'myDAOD_IDTRKVALID.pool.root' --outputDRAW_ZMUMUFile 'myDRAW_ZMUMU.data' --outputAODFile 'myAOD.pool.root' --outputDRAW_TAUMUHFile 'myDRAW_TAUMUH.data' --outputDESDM_EGAMMAFile 'myDESDM_EGAMMA.pool.root' --outputDESDM_MCPFile 'myDESDM_MCP.pool.root' --outputDESDM_CALJETFile 'myDESDM_CALJET.pool.root' --outputDESDM_PHOJETFile 'myDESDM_PHOJET.pool.root' --outputDESDM_TILEMUFile 'myDESDM_TILEMU.pool.root' --outputDRAW_RPVLLFile 'myDRAW_RPVLL.data' --outputDESDM_EXOTHIPFile 'myDESDM_EXOTHIP.pool.root' --outputESDFile 'myESD.pool.root' --outputHISTFile 'myHIST.root' --outputDAOD_IDTIDEFile 'myDAOD_IDTIDE.pool.root'
+Reco_tf.py --conditionsTag all:CONDBR2-BLKPA-2017-05 --ignoreErrors 'False' --autoConfiguration='everything' --maxEvents '250' --geometryVersion all:ATLAS-R2-2015-04-00-00 --steering='doRAWtoALL' --inputBSFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00306451.physics_Main.daq.RAW._lb0948._SFO-4._0001.data' --outputDRAW_EGZFile 'myDRAW_EGZ.data' --outputDESDM_IDALIGNFile 'myDESDM_IDALIGN.pool.root' --outputDESDM_SGLELFile 'myDESDM_SGLEL.pool.root' --outputDESDM_SLTTMUFile 'myDESDM_SLTTMU.pool.root' --outputDAOD_IDTRKVALIDFile 'myDAOD_IDTRKVALID.pool.root' --outputDRAW_ZMUMUFile 'myDRAW_ZMUMU.data' --outputAODFile 'myAOD.pool.root' --outputDRAW_TAUMUHFile 'myDRAW_TAUMUH.data' --outputDESDM_EGAMMAFile 'myDESDM_EGAMMA.pool.root' --outputDESDM_MCPFile 'myDESDM_MCP.pool.root' --outputDESDM_CALJETFile 'myDESDM_CALJET.pool.root' --outputDESDM_PHOJETFile 'myDESDM_PHOJET.pool.root' --outputDESDM_TILEMUFile 'myDESDM_TILEMU.pool.root' --outputDRAW_RPVLLFile 'myDRAW_RPVLL.data' --outputDESDM_EXOTHIPFile 'myDESDM_EXOTHIP.pool.root' --outputESDFile 'myESD.pool.root' --outputHISTFile 'myHIST.root' --outputDAOD_IDTIDEFile 'myDAOD_IDTIDE.pool.root' --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD.pool.root myESD.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs_2.sh b/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs_2.sh
index c381eacd8f5e3e58da032d2cdbde6aae5772810c..4e89cea75a4ea76603f32deeb77fe64d58613615 100755
--- a/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs_2.sh
+++ b/Tools/Tier0ChainTests/test/test_reco_with_derived_outputs_2.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputDESDM_IDALIGNFile=IDALIGN_Main_0.pool.root --outputDESDM_SLTTMUFile=SLTTMU_Main_0.pool.root --outputDRAW_ZMUMUFile=ZMUMU_Main_0.data --outputDAOD_IDTIDEFile=IDTIDE_Main_0.AOD.pool.root --outputDESDM_MCPFile=MCP_Main_0.pool.root --outputDRAW_TOPSLMUFile=TOPSLMU_Main_0.data --outputDRAW_EGZFile=EGZ_Main_0.data --outputDESDM_PHOJETFile=PHOJET_Main_0.pool.root --outputDESDM_TILEMUFile=TILEMU_Main_0.pool.root --outputDRAW_RPVLLFile=RPVLL_Main_0.data --outputDAOD_IDTRKVALIDFile=IDTRKVALID_Main_0.AOD.pool.root --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=f739 --outputDESDM_EXOTHIPFile=EXOTHIP_Main_0.pool.root --outputDESDM_SGLELFile=SGLEL_Main_0.pool.root --maxEvents=500 --outputESDFile=myESD_Main_0.pool.root --outputDESDM_EGAMMAFile=EGAMMA_Main_0.pool.root --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --conditionsTag=CONDBR2-BLKPA-2016-25 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00304008.physics_Main.daq.RAW._lb0838._SFO-6._0001.data --outputDRAW_TAUMUHFile=TAUMUH_Main_0.data --outputDESDM_CALJETFile=CALJET_Main_0.pool.root
+Reco_tf.py  --outputDESDM_IDALIGNFile=IDALIGN_Main_0.pool.root --outputDESDM_SLTTMUFile=SLTTMU_Main_0.pool.root --outputDRAW_ZMUMUFile=ZMUMU_Main_0.data --outputDAOD_IDTIDEFile=IDTIDE_Main_0.AOD.pool.root --outputDESDM_MCPFile=MCP_Main_0.pool.root --outputDRAW_TOPSLMUFile=TOPSLMU_Main_0.data --outputDRAW_EGZFile=EGZ_Main_0.data --outputDESDM_PHOJETFile=PHOJET_Main_0.pool.root --outputDESDM_TILEMUFile=TILEMU_Main_0.pool.root --outputDRAW_RPVLLFile=RPVLL_Main_0.data --outputDAOD_IDTRKVALIDFile=IDTRKVALID_Main_0.AOD.pool.root --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=f739 --outputDESDM_EXOTHIPFile=EXOTHIP_Main_0.pool.root --outputDESDM_SGLELFile=SGLEL_Main_0.pool.root --maxEvents=500 --outputESDFile=myESD_Main_0.pool.root --outputDESDM_EGAMMAFile=EGAMMA_Main_0.pool.root --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --conditionsTag=CONDBR2-BLKPA-2017-05 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00304008.physics_Main.daq.RAW._lb0838._SFO-6._0001.data --outputDRAW_TAUMUHFile=TAUMUH_Main_0.data --outputDESDM_CALJETFile=CALJET_Main_0.pool.root --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Main_0.AOD.pool.root myESD_Main_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_reprocessing_with_derived_outputs.sh b/Tools/Tier0ChainTests/test/test_reprocessing_with_derived_outputs.sh
index 8d1edab8c55c29f50e1b6b3dc832a9eadf364e96..09e500d3f825bab81baccf87fee0e3e4d642d094 100755
--- a/Tools/Tier0ChainTests/test/test_reprocessing_with_derived_outputs.sh
+++ b/Tools/Tier0ChainTests/test/test_reprocessing_with_derived_outputs.sh
@@ -3,5 +3,4 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputDESDM_IDALIGNFile=IDALIGN_Main_0.pool.root --outputDESDM_SLTTMUFile=SLTTMU_Main_0.pool.root --outputDRAW_ZMUMUFile=ZMUMU_Main_0.data --outputDAOD_IDTIDEFile=IDTIDE_Main_0.AOD.pool.root --outputDESDM_MCPFile=MCP_Main_0.pool.root --outputDRAW_TOPSLMUFile=TOPSLMU_Main_0.data --outputDRAW_EGZFile=EGZ_Main_0.data --outputDESDM_PHOJETFile=PHOJET_Main_0.pool.root --outputDESDM_TILEMUFile=TILEMU_Main_0.pool.root --outputDRAW_RPVLLFile=RPVLL_Main_0.data --outputDAOD_IDTRKVALIDFile=IDTRKVALID_Main_0.AOD.pool.root --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=r9050 --outputDESDM_EXOTHIPFile=EXOTHIP_Main_0.pool.root --outputDESDM_SGLELFile=SGLEL_Main_0.pool.root --maxEvents=500 --outputESDFile=myESD_Main_0.pool.root --outputDESDM_EGAMMAFile=EGAMMA_Main_0.pool.root --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --conditionsTag=CONDBR2-BLKPA-2016-25 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00304008.physics_Main.daq.RAW._lb0838._SFO-6._0001.data --outputDRAW_TAUMUHFile=TAUMUH_Main_0.data --outputDESDM_CALJETFile=CALJET_Main_0.pool.root --athenaopts=--nprocs=4
-
+Reco_tf.py  --outputDESDM_IDALIGNFile=IDALIGN_Main_0.pool.root --outputDESDM_SLTTMUFile=SLTTMU_Main_0.pool.root --outputDRAW_ZMUMUFile=ZMUMU_Main_0.data --outputDAOD_IDTIDEFile=IDTIDE_Main_0.AOD.pool.root --outputDESDM_MCPFile=MCP_Main_0.pool.root --outputDRAW_TOPSLMUFile=TOPSLMU_Main_0.data --outputDRAW_EGZFile=EGZ_Main_0.data --outputDESDM_PHOJETFile=PHOJET_Main_0.pool.root --outputDESDM_TILEMUFile=TILEMU_Main_0.pool.root --outputDRAW_RPVLLFile=RPVLL_Main_0.data --outputDAOD_IDTRKVALIDFile=IDTRKVALID_Main_0.AOD.pool.root --outputHISTFile=myMergedMonitoring_Main_0.root --AMI=r9050 --outputDESDM_EXOTHIPFile=EXOTHIP_Main_0.pool.root --outputDESDM_SGLELFile=SGLEL_Main_0.pool.root --maxEvents=500 --outputESDFile=myESD_Main_0.pool.root --outputDESDM_EGAMMAFile=EGAMMA_Main_0.pool.root --outputAODFile=myAOD_Main_0.AOD.pool.root --outputTAGFile=myTAG_Main_0.root --ignoreErrors=False --conditionsTag=CONDBR2-BLKPA-2016-25 --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data16_13TeV.00304008.physics_Main.daq.RAW._lb0838._SFO-6._0001.data --outputDRAW_TAUMUHFile=TAUMUH_Main_0.data --outputDESDM_CALJETFile=CALJET_Main_0.pool.root --athenaopts=--nprocs=4 --imf False
diff --git a/Tools/Tier0ChainTests/test/test_run00183021_jettauetmiss0_collisions.sh b/Tools/Tier0ChainTests/test/test_run00183021_jettauetmiss0_collisions.sh
index fe9f58bc1ccb556c77a744e5c94d1115417de55f..fd2681cad949caac1845bdfcb02c06c2233b7194 100755
--- a/Tools/Tier0ChainTests/test/test_run00183021_jettauetmiss0_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_run00183021_jettauetmiss0_collisions.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf with beamType=collisions
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_JetTauEtmiss_0.root --maxEvents=500 --outputESDFile=myESD_JetTauEtmiss_0.pool.root --outputAODFile=myAOD_JetTauEtmiss_0.AOD.pool.root --outputTAGFile=myTAG_JetTauEtmiss_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_JetTauEtmiss.merge.RAW._lb0550._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_JetTauEtmiss.merge.RAW._lb0551._SFO-10._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_JetTauEtmiss.merge.RAW._lb0551._SFO-11._0001.1 --preExec='rec.doTrigger=False;'
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_JetTauEtmiss_0.root --maxEvents=500 --outputESDFile=myESD_JetTauEtmiss_0.pool.root --outputAODFile=myAOD_JetTauEtmiss_0.AOD.pool.root --outputTAGFile=myTAG_JetTauEtmiss_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_JetTauEtmiss.merge.RAW._lb0550._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_JetTauEtmiss.merge.RAW._lb0551._SFO-10._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_JetTauEtmiss.merge.RAW._lb0551._SFO-11._0001.1 --preExec='rec.doTrigger=False;' --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_JetTauEtmiss_0.AOD.pool.root myESD_JetTauEtmiss_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_run00183021_minbias0_collisions.sh b/Tools/Tier0ChainTests/test/test_run00183021_minbias0_collisions.sh
index eea8ff9923c3f11f3739796c5b040b742add8d15..6f3086a068c8353cd911f673470bc07c9e73ebbb 100755
--- a/Tools/Tier0ChainTests/test/test_run00183021_minbias0_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_run00183021_minbias0_collisions.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf with beamType=collisions
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_MinBias_0.root --maxEvents=500 --outputESDFile=myESD_MinBias_0.pool.root --outputAODFile=myAOD_MinBias_0.AOD.pool.root --outputTAGFile=myTAG_MinBias_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_MinBias.merge.RAW._lb0550._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_MinBias.merge.RAW._lb0551._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_MinBias.merge.RAW._lb0552._SFO-ALL._0001.1 --preExec='rec.doTrigger=False;'
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_MinBias_0.root --maxEvents=500 --outputESDFile=myESD_MinBias_0.pool.root --outputAODFile=myAOD_MinBias_0.AOD.pool.root --outputTAGFile=myTAG_MinBias_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_MinBias.merge.RAW._lb0550._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_MinBias.merge.RAW._lb0551._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_MinBias.merge.RAW._lb0552._SFO-ALL._0001.1 --preExec='rec.doTrigger=False;' --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_MinBias_0.AOD.pool.root myESD_MinBias_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_run00183021_muons_collisions.sh b/Tools/Tier0ChainTests/test/test_run00183021_muons_collisions.sh
index 02ca55e9b9934df19c64c8fe32ff9fbc03e73260..88af9b393b1ed425815a660b74e3261e38767703 100755
--- a/Tools/Tier0ChainTests/test/test_run00183021_muons_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_run00183021_muons_collisions.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf with beamType=collisions
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_Muons_0.root --maxEvents=500 --outputESDFile=myESD_Muons_0.pool.root --outputAODFile=myAOD_Muons_0.AOD.pool.root --outputTAGFile=myTAG_Muons_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_Muons.merge.RAW._lb0550._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_Muons.merge.RAW._lb0551._SFO-10._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_Muons.merge.RAW._lb0551._SFO-11._0001.1 --preExec='rec.doTrigger=False;'
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_Muons_0.root --maxEvents=500 --outputESDFile=myESD_Muons_0.pool.root --outputAODFile=myAOD_Muons_0.AOD.pool.root --outputTAGFile=myTAG_Muons_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_Muons.merge.RAW._lb0550._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_Muons.merge.RAW._lb0551._SFO-10._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00183021.physics_Muons.merge.RAW._lb0551._SFO-11._0001.1 --preExec='rec.doTrigger=False;' --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Muons_0.AOD.pool.root myESD_Muons_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_run00183904_cosmiccalo_nofield.sh b/Tools/Tier0ChainTests/test/test_run00183904_cosmiccalo_nofield.sh
index 8818e161dffe04448edda803534124710e2080bd..0d35331f062e676a5b4822e14e3ccf80123f4a64 100755
--- a/Tools/Tier0ChainTests/test/test_run00183904_cosmiccalo_nofield.sh
+++ b/Tools/Tier0ChainTests/test/test_run00183904_cosmiccalo_nofield.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_CosmicCalo_0.root --maxEvents=500 --outputESDFile=myESD_CosmicCalo_0.pool.root --outputAODFile=myAOD_CosmicCalo_0.AOD.pool.root --outputTAGFile=myTAG_CosmicCalo_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_comm.00183904.physics_CosmicCalo.merge.RAW._lb0006._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_comm.00183904.physics_CosmicCalo.merge.RAW._lb0007._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_comm.00183904.physics_CosmicCalo.merge.RAW._lb0008._SFO-10._0001.1 --preExec='rec.doTrigger=False;'
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_CosmicCalo_0.root --maxEvents=500 --outputESDFile=myESD_CosmicCalo_0.pool.root --outputAODFile=myAOD_CosmicCalo_0.AOD.pool.root --outputTAGFile=myTAG_CosmicCalo_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_comm.00183904.physics_CosmicCalo.merge.RAW._lb0006._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_comm.00183904.physics_CosmicCalo.merge.RAW._lb0007._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_comm.00183904.physics_CosmicCalo.merge.RAW._lb0008._SFO-10._0001.1 --preExec='rec.doTrigger=False;' --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_CosmicCalo_0.AOD.pool.root myESD_CosmicCalo_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_run00184074_idcosmic0.sh b/Tools/Tier0ChainTests/test/test_run00184074_idcosmic0.sh
index 685706ff5f0cab3d07a308cbb23166b199d562e2..8f5ce4b8b6474a4e857d1e33b253578e42198b76 100755
--- a/Tools/Tier0ChainTests/test/test_run00184074_idcosmic0.sh
+++ b/Tools/Tier0ChainTests/test/test_run00184074_idcosmic0.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_IDCosmic_0.root --maxEvents=500 --outputESDFile=myESD_IDCosmic_0.pool.root --outputAODFile=myAOD_IDCosmic_0.AOD.pool.root --outputTAGFile=myTAG_IDCosmic_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184074.physics_IDCosmic.merge.RAW._lb0100._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184074.physics_IDCosmic.merge.RAW._lb0101._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184074.physics_IDCosmic.merge.RAW._lb0102._SFO-ALL._0001.1 --preExec='rec.doTrigger=False;'
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_IDCosmic_0.root --maxEvents=500 --outputESDFile=myESD_IDCosmic_0.pool.root --outputAODFile=myAOD_IDCosmic_0.AOD.pool.root --outputTAGFile=myTAG_IDCosmic_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184074.physics_IDCosmic.merge.RAW._lb0100._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184074.physics_IDCosmic.merge.RAW._lb0101._SFO-ALL._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184074.physics_IDCosmic.merge.RAW._lb0102._SFO-ALL._0001.1 --preExec='rec.doTrigger=False;' --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_IDCosmic_0.AOD.pool.root myESD_IDCosmic_0.pool.root
diff --git a/Tools/Tier0ChainTests/test/test_run00184169_egamma_collisions.sh b/Tools/Tier0ChainTests/test/test_run00184169_egamma_collisions.sh
index 41caa8d7de02444b028ae280b84f1232639d0a3c..5b8878547033e71ffadb961e6a83389ed9387ec5 100755
--- a/Tools/Tier0ChainTests/test/test_run00184169_egamma_collisions.sh
+++ b/Tools/Tier0ChainTests/test/test_run00184169_egamma_collisions.sh
@@ -3,5 +3,15 @@
 # art-description: RecoTrf with beamType=collisions
 # art-type: grid
 
-Reco_tf.py  --outputHISTFile=myMergedMonitoring_Egamma_0.root --maxEvents=500 --outputESDFile=myESD_Egamma_0.pool.root --outputAODFile=myAOD_Egamma_0.AOD.pool.root --outputTAGFile=myTAG_Egamma_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184169.physics_Egamma.merge.RAW._lb0900._SFO-10._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184169.physics_Egamma.merge.RAW._lb0900._SFO-11._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184169.physics_Egamma.merge.RAW._lb0900._SFO-12._0001.1 --preExec='rec.doTrigger=False;'
+Reco_tf.py  --outputHISTFile=myMergedMonitoring_Egamma_0.root --maxEvents=500 --outputESDFile=myESD_Egamma_0.pool.root --outputAODFile=myAOD_Egamma_0.AOD.pool.root --outputTAGFile=myTAG_Egamma_0.root --ignoreErrors=False --inputBSFile=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184169.physics_Egamma.merge.RAW._lb0900._SFO-10._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184169.physics_Egamma.merge.RAW._lb0900._SFO-11._0001.1,/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests/data11_7TeV.00184169.physics_Egamma.merge.RAW._lb0900._SFO-12._0001.1 --preExec='rec.doTrigger=False;' --imf False
 
+SCRIPT_DIRECTORY=$1
+PACKAGE=$2
+TYPE=$3
+TEST_NAME=$4
+NIGHTLY_RELEASE=$5
+PROJECT=$6
+PLATFORM=$7
+NIGHTLY_TAG=$8
+
+art.py compare grid $NIGHTLY_RELEASE $PROJECT $PLATFORM $NIGHTLY_TAG $PACKAGE $TEST_NAME myAOD_Egamma_0.AOD.pool.root myESD_Egamma_0.pool.root
diff --git a/Tracking/TrkAlgorithms/TrkCollectionAliasAlg/doc/packagedoc.h b/Tracking/TrkAlgorithms/TrkCollectionAliasAlg/doc/packagedoc.h
index 3dbe0ff168be42a4ace085bd8e7bd83c61f16a31..88d2ba56be0f05873d66f840f315f27225cf1a24 100644
--- a/Tracking/TrkAlgorithms/TrkCollectionAliasAlg/doc/packagedoc.h
+++ b/Tracking/TrkAlgorithms/TrkCollectionAliasAlg/doc/packagedoc.h
@@ -9,7 +9,6 @@ This package contains the Algorithm TrkCollectionAliasAlg which generates a Stor
 
 @author Martin Siebel <Martin.Siebel@CERN.ch>
 
-@section TrkCollectionAliasAlg_TrkCollectionAliasAlgReq Requirements
 
 
 */
diff --git a/Tracking/TrkAlgorithms/TrkTrackCollectionMerger/doc/packagedoc.h b/Tracking/TrkAlgorithms/TrkTrackCollectionMerger/doc/packagedoc.h
index ad07e1ef91d4f36c7987073899dd2a29e0a2a810..8aea2f718f0f2a7edb8253ae8ca30d8afaee00d6 100644
--- a/Tracking/TrkAlgorithms/TrkTrackCollectionMerger/doc/packagedoc.h
+++ b/Tracking/TrkAlgorithms/TrkTrackCollectionMerger/doc/packagedoc.h
@@ -38,9 +38,7 @@ The TrkTrackCollectionMerger contains the following classes/files:
 
 - TrkTrackCollectionMerger.cxx...Main class calling all the necessary tools and producing the ouput track collection.
 
-@section TrkTrackCollectionMerger_TrkTrackCollectionMergerPackages Used Packages
 
 
-@section TrkTrackCollectionMerger_TrkTrackCollectionMergerReq Requirements file
 
 */
diff --git a/Tracking/TrkAlignment/TrkAlgebraUtils/doc/packagedoc.h b/Tracking/TrkAlignment/TrkAlgebraUtils/doc/packagedoc.h
index b7764b950aaf70e6d204a2a626ec06d46f416f63..f067a9229a7b0b146144aabe7f2779c7d37496ab 100644
--- a/Tracking/TrkAlignment/TrkAlgebraUtils/doc/packagedoc.h
+++ b/Tracking/TrkAlignment/TrkAlgebraUtils/doc/packagedoc.h
@@ -31,17 +31,6 @@ alignment of detector modules.
   - AlVec:  handles vector of doubles
   - IntVec:  handles vector of integers
 
-@ref used_TrkAlgebraUtils
 
-@ref requirements_TrkAlgebraUtils
 
 */
-
-/**
-@page used_TrkAlgebraUtils Used Packages
-*/
-
-/**
-@page requirements_TrkAlgebraUtils Requirements
-*/
-
diff --git a/Tracking/TrkAlignment/TrkAlignEvent/doc/packagedoc.h b/Tracking/TrkAlignment/TrkAlignEvent/doc/packagedoc.h
index 07ed13b9232ad24082904e7f57cc3c12b8c2610b..c5967127ecbd2876e14c675ed4ed3e1115060f2e 100644
--- a/Tracking/TrkAlignment/TrkAlignEvent/doc/packagedoc.h
+++ b/Tracking/TrkAlignment/TrkAlignEvent/doc/packagedoc.h
@@ -20,16 +20,6 @@ This package contains classes to be used for track-based alignment.
   - AlignTrack: collection of AlignTSOS and the original track from which the alignTSOS hits come from
   - AlignTrackCollection: collection of AlignTracks
 
-@ref used_TrkAlignEvent
 
-@ref requirements_TrkAlignEvent
 
 */
-
-/**
-@page used_TrkAlignEvent Used Packages
-*/
-
-/**
-@page requirements_TrkAlignEvent Requirements
-*/
diff --git a/Tracking/TrkAlignment/TrkAlignGenTools/doc/packagedoc.h b/Tracking/TrkAlignment/TrkAlignGenTools/doc/packagedoc.h
index 171ba0c8e4ea0110656606296047e990addccdaf..27db02f3332b89e3d101cb6904bf2e4565d41d6f 100644
--- a/Tracking/TrkAlignment/TrkAlignGenTools/doc/packagedoc.h
+++ b/Tracking/TrkAlignment/TrkAlignGenTools/doc/packagedoc.h
@@ -43,17 +43,6 @@ detector-specific tools.
     performing alignment and for writing final alignment parameters to the 
     database 
 
-@ref used_TrkAlignGenTools
 
-@ref requirements_TrkAlignGenTools
 
 */
-
-/**
-@page used_TrkAlignGenTools Used Packages
-*/
-
-/**
-@page requirements_TrkAlignGenTools Requirements
-*/
-
diff --git a/Tracking/TrkAlignment/TrkAlignInterfaces/doc/packagedoc.h b/Tracking/TrkAlignment/TrkAlignInterfaces/doc/packagedoc.h
index 2c11e8c99626f67b1ed3df7755792596b23f2f6d..3a33a4df19e44cb7c83bf58af40cce0724cb3df7 100644
--- a/Tracking/TrkAlignment/TrkAlignInterfaces/doc/packagedoc.h
+++ b/Tracking/TrkAlignment/TrkAlignInterfaces/doc/packagedoc.h
@@ -26,16 +26,6 @@ This package contains virtual interfaces for tools to be used for track-based al
   - IJacobianManagerTool: not yet used
   - ITrkAlignDBTool: used to read constants from the database and write constants (to ASCII file for now)
 
-@ref used_TrkAlignInterfaces
 
-@ref requirements_TrkAlignInterfaces
 
 */
-
-/**
-@page used_TrkAlignInterfaces Used Packages
-*/
-
-/**
-@page requirements_TrkAlignInterfaces Requirements
-*/
diff --git a/Tracking/TrkDetDescr/TrkDetDescrAlgs/doc/packagedoc.h b/Tracking/TrkDetDescr/TrkDetDescrAlgs/doc/packagedoc.h
index c839e3c75f78e02b54ff8f21dd2d2bb64c48e767..e39feae01a6895fbae24de3af766504fd91b5eef 100644
--- a/Tracking/TrkDetDescr/TrkDetDescrAlgs/doc/packagedoc.h
+++ b/Tracking/TrkDetDescr/TrkDetDescrAlgs/doc/packagedoc.h
@@ -27,7 +27,6 @@ the TrackingGeometry.
 @section TrkDetDescrAlgs_TrkDetDescrToolsIntro Introduction
 
 
-@section TrkDetDescrAlgs_TrkDetDescrToolsReq Requirements
 
 
 */
diff --git a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.h b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.h
index b0e9c04de5cc5ac6467205a4f72055435aeb7fa0..abf7b8896255930185444e08947fc30436eefaa1 100644
--- a/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.h
+++ b/Tracking/TrkDetDescr/TrkDetDescrAthenaPool/src/LayerMaterialMapCnv.h
@@ -15,7 +15,6 @@
 #undef protected
 
 #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
-#include "AthenaPoolCnvSvc/AthenaPoolCnvTPExtension.h"
 
 #include "TrkGeometry/LayerMaterialMap.h"
 #include "TrkDetDescrTPCnv/LayerMaterialMapCnv_tlp1.h"
@@ -30,9 +29,7 @@ typedef T_AthenaPoolCustomCnv<Trk::LayerMaterialMap, LayerMaterialMap_PERS> Laye
 //-----------------------------------------------------------------------------
 // Converter for TrackCollection object
 //-----------------------------------------------------------------------------
-class LayerMaterialMapCnv
-   : public LayerMaterialMapCnvBase,
-     public AthenaPoolCnvTPExtension
+class LayerMaterialMapCnv : public LayerMaterialMapCnvBase
 {
 friend class CnvFactory<LayerMaterialMapCnv>;
 
diff --git a/Tracking/TrkDetDescr/TrkDetDescrInterfaces/doc/packagedoc.h b/Tracking/TrkDetDescr/TrkDetDescrInterfaces/doc/packagedoc.h
index 0ac1caa6bc677d24628a1dc2f20070fe847a30e3..5397944b465ce0774a1a3ee3918f0973c0488e1e 100644
--- a/Tracking/TrkDetDescr/TrkDetDescrInterfaces/doc/packagedoc.h
+++ b/Tracking/TrkDetDescr/TrkDetDescrInterfaces/doc/packagedoc.h
@@ -34,7 +34,6 @@ The concrete implementations rely on very precise knowledge of the various sub-d
 to be found in the corresponding software repositories.
 
    
-@section TrkDetDescrInterfaces_TrkDetDescrInterfacesReq Requirements
 
 
 */
\ No newline at end of file
diff --git a/Tracking/TrkDetDescr/TrkDetDescrSvc/doc/packagedoc.h b/Tracking/TrkDetDescr/TrkDetDescrSvc/doc/packagedoc.h
index 658c93a54eec29d2904dacaf82c8b137d972fba9..d810ab7e1ecbd0c204f462d59f9ac64c1390c525 100644
--- a/Tracking/TrkDetDescr/TrkDetDescrSvc/doc/packagedoc.h
+++ b/Tracking/TrkDetDescr/TrkDetDescrSvc/doc/packagedoc.h
@@ -21,7 +21,6 @@ There are two services that can be used :
      
    - CalibrationTrackingGeometrySvc allows to apply additional distortions, material scaling.
 
-@section TrkDetDescrSvc_TrkDetDescrSvcReq Requirements
 
 
 */
diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/doc/packagedoc.h b/Tracking/TrkDetDescr/TrkDetDescrTools/doc/packagedoc.h
index 0258467ddf98adcc551e47271b179d4a015de9c0..2d86498dcd69c33a519405c56d88ae8882f0b614 100644
--- a/Tracking/TrkDetDescr/TrkDetDescrTools/doc/packagedoc.h
+++ b/Tracking/TrkDetDescr/TrkDetDescrTools/doc/packagedoc.h
@@ -29,7 +29,6 @@ the material information per layer into an nTuple.
    - Displaying
 The Trk::TrackingVolumeDisplayer writes ROOT scripts for a dedicated TrackingGeometry visualization.
 
-@section TrkDetDescrTools_TrkDetDescrToolsReq Requirements
 
 
 */
diff --git a/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinnedArrayArray.h b/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinnedArrayArray.h
index 7aa1a8e8b13c5e86da783bfaa36a0294605dd85a..7930ec9ae6f53b78da37525eda6d4ae07319e503 100644
--- a/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinnedArrayArray.h
+++ b/Tracking/TrkDetDescr/TrkDetDescrUtils/TrkDetDescrUtils/BinnedArrayArray.h
@@ -98,7 +98,7 @@ namespace Trk {
 
      /** Returns the pointer to the templated class object from the BinnedArrayArray
          it returns 0 if not defined, takes global position */
-     virtual const T* object(const Amg::Vector3D& gp) const {
+     virtual const T* object(const Amg::Vector3D& gp) const override {
          if (m_binUtility->inside(gp)) { 
              BinnedArray<T>* ba = m_binnedArrays[m_binUtility->bin(gp, 0)];
              if (ba) return ba->object(gp);
@@ -107,23 +107,23 @@ namespace Trk {
      }
 
      /** Returns the pointer to the templated class object from the BinnedArrayArray - entry point*/
-     virtual const T* entryObject(const Amg::Vector3D& gp) const
+     virtual const T* entryObject(const Amg::Vector3D& gp) const override
      { return object(gp); }
 
      /** Returns the pointer to the templated class object from the BinnedArrayArray, takes 3D position & direction */
-     virtual const T* nextObject(const Amg::Vector3D& gp, const Amg::Vector3D&, bool) const
+     virtual const T* nextObject(const Amg::Vector3D& gp, const Amg::Vector3D&, bool) const override
      { return object(gp); }
 
      /** Return all objects of the Array */
-     virtual const std::vector< const T* >& arrayObjects() const
+     virtual const std::vector< const T* >& arrayObjects() const override
      { return m_arrayObjects; }
 
      /** Number of Entries in the Array */
-     virtual unsigned int arrayObjectsNumber() const 
+     virtual unsigned int arrayObjectsNumber() const  override
      { return m_arrayObjects.size(); };
 
      /** Return the BinUtility*/
-     virtual const BinUtility* binUtility() const 
+     virtual const BinUtility* binUtility() const override
      { return m_binUtility; }
 
   private:
diff --git a/Tracking/TrkDetDescr/TrkDetDescrUtils/doc/packagedoc.h b/Tracking/TrkDetDescr/TrkDetDescrUtils/doc/packagedoc.h
index d7b1d6bd056da5743b10e6cc43b53b6e6cf27dd9..13d5ae4ee35f9b5d8f733f74ca457b13b0f63c2f 100644
--- a/Tracking/TrkDetDescr/TrkDetDescrUtils/doc/packagedoc.h
+++ b/Tracking/TrkDetDescr/TrkDetDescrUtils/doc/packagedoc.h
@@ -21,8 +21,6 @@ classes of different implementations.
 In addition it contains geometry statics and a reference counting class.
 
 
-@section TrkDetDescrUtils_TrkDetDescrReqReq Requirements
 
 
 */
-
diff --git a/Tracking/TrkDetDescr/TrkGeometry/doc/packagedoc.h b/Tracking/TrkDetDescr/TrkGeometry/doc/packagedoc.h
index 34c357f157c1cf5ee14c16a52e0a676574727942..c5f0a0c4f4960f286f30b93c5b9cde050aca1488 100644
--- a/Tracking/TrkDetDescr/TrkGeometry/doc/packagedoc.h
+++ b/Tracking/TrkDetDescr/TrkGeometry/doc/packagedoc.h
@@ -30,7 +30,6 @@ The TrkGeometry package contains following classes:
   - Trk::TrackingVolume: extends the Volume class from the TrkVolume package with pysical properties
   - Trk::TrackingGeometry: holder class of the highest TrackingVolume
    
-@section TrkGeometry_TrkGeometryReq Requirements
 
 
 */
diff --git a/Tracking/TrkDetDescr/TrkSurfaces/doc/packagedoc.h b/Tracking/TrkDetDescr/TrkSurfaces/doc/packagedoc.h
index 6ca3f8b295d9d49385ed690e2dafeb607c6c2578..4a3b4b5f2387eb03e91708757e4c61caeae7f1e6 100644
--- a/Tracking/TrkDetDescr/TrkSurfaces/doc/packagedoc.h
+++ b/Tracking/TrkDetDescr/TrkSurfaces/doc/packagedoc.h
@@ -49,6 +49,5 @@ are used from the GeoPrimitives package
 - Amg::Vector3D for 3D points and vectors
 - Amg::Vector2D for 2D points on a surface or the special local direction 
 
-@section TrkSurfaces_TrkSurfaceReq Requirements
 
 */
diff --git a/Tracking/TrkDetDescr/TrkVolumes/doc/packagedoc.h b/Tracking/TrkDetDescr/TrkVolumes/doc/packagedoc.h
index ebb9c8d547ac6eaf96c184b3d9eef04d518c21ea..c626cf8fcb85f69cd719641d3a0650e2616a5b66 100644
--- a/Tracking/TrkDetDescr/TrkVolumes/doc/packagedoc.h
+++ b/Tracking/TrkDetDescr/TrkVolumes/doc/packagedoc.h
@@ -34,15 +34,4 @@ to be used directly by the Extrapolator, resp. Propagators.
     
 @section TrkVolumes_ExtrasTrkVolumes Extra Pages
 
- - @ref UsedTrkVolumes
- - @ref RequirementsTrkVolumes
 */
-
-/**
-@page UsedTrkVolumes Used Packages
-*/
-
-/**
-@page RequirementsTrkVolumes Requirements
-*/
-
diff --git a/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/doc/packagedoc.h b/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/doc/packagedoc.h
index ea35851d32d8b3caa88efb4de93662d0a85f12d1..b5c7e8dcfe4470e731366552bbdf7ac277b320bc 100644
--- a/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkCompetingRIOsOnTrack/doc/packagedoc.h
@@ -30,14 +30,10 @@ by a Surface the CompetingRIOsOnTrack is expressed to and a vector of assignment
 
 @section TrkCompetingRIOsOnTrack_ExtrasTrkCompetingRIOsOnTrack Extra Pages
 
- - @ref UsedTrkCompetingRIOsOnTrack
- - @ref requirementsTrkCompetingRIOsOnTrack
 */
 
 /**
-@page UsedTrkCompetingRIOsOnTrack Used Packages
 */
 
 /**
-@page requirementsTrkCompetingRIOsOnTrack Requirements
 */
diff --git a/Tracking/TrkEvent/TrkEventPrimitives/doc/packagedoc.h b/Tracking/TrkEvent/TrkEventPrimitives/doc/packagedoc.h
index 3ed9fafb961fb618f371cac01851f6bcb9d41785..c5c437838d7be7c108f8ad59b94e9711f630800b 100644
--- a/Tracking/TrkEvent/TrkEventPrimitives/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkEventPrimitives/doc/packagedoc.h
@@ -65,23 +65,4 @@ Please send any comments to
 
 @section TrkEventPrimitives_TrkEventPrimPages Extra Pages
 
- - @ref TrkEventPrimUsedPkg
- - @ref TrkEventPrimRequirements
-*/
-
-/**
-@page TrkEventPrimUsedPkg Used Packages
-*/
-
-/**
-@page TrkEventPrimRequirements Requirements
-*/
-
-@section TrkEventPrimitives_used_packages Used Packages
-
-@section TrkEventPrimitives_requirements Requirements
-
-
-
-
 */
diff --git a/Tracking/TrkEvent/TrkEventUtils/doc/packagedoc.h b/Tracking/TrkEvent/TrkEventUtils/doc/packagedoc.h
index 74ca7d03ec8e6a8a1f0f52953c2b1134c2e6808d..726b1a9302645360478ff77348d242a8244ef247 100644
--- a/Tracking/TrkEvent/TrkEventUtils/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkEventUtils/doc/packagedoc.h
@@ -19,8 +19,4 @@ Please send any comments to
 @author Andreas.Salzburger@cern.ch
 @author Edward.Moyse@cern.ch
 
-@section TrkEventUtils_used_packages Used Packages
-
-@section TrkEventUtils_requirements Requirements
-
 */
diff --git a/Tracking/TrkEvent/TrkMaterialOnTrack/doc/packagedoc.h b/Tracking/TrkEvent/TrkMaterialOnTrack/doc/packagedoc.h
index 0e44f84d8daafbed24595ccd07824954a4af1e2b..47e6a7290946a7d5af3de90e10bc69d5a4ab25a6 100644
--- a/Tracking/TrkEvent/TrkMaterialOnTrack/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkMaterialOnTrack/doc/packagedoc.h
@@ -30,15 +30,4 @@ extensions to handle material effects in the ATLAS tracking EDM
 
 @section TrkMaterialOnTrack_ExtrasTrkMaterialOnTrack Extra Pages
 
- - @ref UsedTrkMaterialOnTrack
- - @ref RequirementsTrkMaterialOnTrack
 */
-
-/**
-@page UsedTrkMaterialOnTrack Used Packages
-*/
-
-/**
-@page RequirementsTrkMaterialOnTrack Requirements
-*/
-
diff --git a/Tracking/TrkEvent/TrkMeasurementBase/doc/packagedoc.h b/Tracking/TrkEvent/TrkMeasurementBase/doc/packagedoc.h
index 0b35d87e8d85c6f24da9f1faa9c8fe14d2d93165..fd4f1c9f70f0272e434411200bcca288331440d5 100644
--- a/Tracking/TrkEvent/TrkMeasurementBase/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkMeasurementBase/doc/packagedoc.h
@@ -26,7 +26,6 @@ The following child branches are (planned) to inherit from this one (only base c
 Please let me know of any errors, or if anything is unclear.
 @author Andreas.Salzburger@cern.ch
 
-@section TrkMeasurementBase_requirementsTrkMeasurementBase Requirements
 
 @namespace Trk
 A namespace to enclose the Tracking classes.
diff --git a/Tracking/TrkEvent/TrkNeutralParameters/doc/packagedoc.h b/Tracking/TrkEvent/TrkNeutralParameters/doc/packagedoc.h
index 8fed66c4b788ceee9c4965e8dbcc1f395fbd0382..30f28f17dd4bb1839a775bac63f9e3bb17b911ff 100644
--- a/Tracking/TrkEvent/TrkNeutralParameters/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkNeutralParameters/doc/packagedoc.h
@@ -48,7 +48,4 @@ should return a const pointer, set to NULL (i.e. 0) whenever the object is void.
 - Trk::LocalParameters are defined in TrkEventPrimitives
 
 @author Edward.Moyse@cern.ch, Andreas.Salzburger@cern.ch
-@section TrkNeutralParameters_used_packagesTkPara Used Packages
-
-@section TrkNeutralParameters_requirements Requirements
 */
diff --git a/Tracking/TrkEvent/TrkParameters/doc/packagedoc.h b/Tracking/TrkEvent/TrkParameters/doc/packagedoc.h
index e7bf8211ac58664c3836fad74755dc1a326b73b8..db5aecc6071f5a006b402b85fe2ecdf90acc2113 100644
--- a/Tracking/TrkEvent/TrkParameters/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkParameters/doc/packagedoc.h
@@ -49,9 +49,6 @@ should return a const pointer, set to NULL (i.e. 0) whenever the object is void.
 
 @author Edward.Moyse@cern.ch, Andreas.Salzburger@cern.ch
 
-@section TrkParameters_used_packagesTkPara Used Packages
-
-@section TrkParameters_requirements Requirements
 */
 
 /**
diff --git a/Tracking/TrkEvent/TrkParametersBase/doc/packagedoc.h b/Tracking/TrkEvent/TrkParametersBase/doc/packagedoc.h
index 1896b9a89c0b0ca48381251259d3593a8e5da478..210a2b20f4df21f17250f986bb9bc64c6ac567f9 100644
--- a/Tracking/TrkEvent/TrkParametersBase/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkParametersBase/doc/packagedoc.h
@@ -25,9 +25,6 @@ All local/global transformations are outsourced to the surfaces.
 
 Note that CurvilinearParameters make best sense on planar surfaces.
 
-@section TrkParametersBase_TrkParametersBaseReq Requirements file
 
 
 */
-
-
diff --git a/Tracking/TrkEvent/TrkPatternParameters/doc/packagedoc.h b/Tracking/TrkEvent/TrkPatternParameters/doc/packagedoc.h
index 9bb31609c9160e62db696afac744fb48071df4f7..793b27b849c38f9b7e2433f033b15dc90f0db7e7 100644
--- a/Tracking/TrkEvent/TrkPatternParameters/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkPatternParameters/doc/packagedoc.h
@@ -28,6 +28,5 @@ standard TrackParameters class and contains set converters which provide
 transformation information from TrackParameters to PatternParameteres and
 from PatternParameteres to TrackParameters.
 
-@section TrkPatternParameters_TrkPatternParametersReq Requirements file
 
 */
diff --git a/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawDataContainer.h b/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawDataContainer.h
index 9d7b93a12ca0f7225f18cc01aea596e82399d4f3..46c85485721428d90e3fc1573806c340d8478419 100755
--- a/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawDataContainer.h
+++ b/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawDataContainer.h
@@ -33,6 +33,9 @@ class PrepRawDataContainer
     /** Constructor with parameters:*/
     PrepRawDataContainer(unsigned int max);
     
+    /** Constructor with External Cache*/
+    PrepRawDataContainer(EventContainers::IdentifiableCache<CollectionT>*);
+
     /**default ctor - for POOL only*/
     PrepRawDataContainer();
     
diff --git a/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawDataContainer.icc b/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawDataContainer.icc
index 497d5ba3405572f2cf479a1c2abca1a7f31febda..7bf147ac416e8f1e93d32f7774e342eb8fac2437 100755
--- a/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawDataContainer.icc
+++ b/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawDataContainer.icc
@@ -23,10 +23,18 @@ PrepRawDataContainer< CollectionT>::PrepRawDataContainer(unsigned int max) :
 template< class CollectionT>
 // Constructor with parameters:
 PrepRawDataContainer< CollectionT>::PrepRawDataContainer() :
-	IdentifiableContainer<CollectionT>()
+	IdentifiableContainer<CollectionT>(0)
 {
 }
 
+template< class CollectionT>
+// Constructor with parameters:
+PrepRawDataContainer< CollectionT>::PrepRawDataContainer(EventContainers::IdentifiableCache<CollectionT>* cache) :
+	IdentifiableContainer<CollectionT>(cache)
+{
+}
+
+
 template< class CollectionT>
 // Destructor:
 PrepRawDataContainer< CollectionT>::~PrepRawDataContainer()
diff --git a/Tracking/TrkEvent/TrkPrepRawData/doc/packagedoc.h b/Tracking/TrkEvent/TrkPrepRawData/doc/packagedoc.h
index 226dd859f70982414c60ea20b202c83cc92ded45..e89894143afc17c6b8bab5383be416eaa546e14f 100644
--- a/Tracking/TrkEvent/TrkPrepRawData/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkPrepRawData/doc/packagedoc.h
@@ -24,8 +24,4 @@ This class is intended for use within the Trigger as well, and will probably und
 Please let me know of any errors, or if anything is unclear.
 Edward.Moyse@cern.ch
 
-@section TrkPrepRawData_used_packagesTkPara Used Packages
-
-@section TrkPrepRawData_requirements Requirements
 */
-
diff --git a/Tracking/TrkEvent/TrkPseudoMeasurementOnTrack/doc/packagedoc.h b/Tracking/TrkEvent/TrkPseudoMeasurementOnTrack/doc/packagedoc.h
index 2bcb9d4479334b1715e7dfeecfac5d0995b76163..d6a556ac14cfd3010395194a83ea2b3dfe7dff7d 100644
--- a/Tracking/TrkEvent/TrkPseudoMeasurementOnTrack/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkPseudoMeasurementOnTrack/doc/packagedoc.h
@@ -17,15 +17,4 @@ provides the class Trk::PseudoMeasurementOnTrack for the ATLAS tracking EDM.
  
 @section TrkPseudoMeasurementOnTrack_ExtrasTrkPseudoMeasurementOnTrack Extra Pages
 
- - @ref UsedTrkPseudoMeasurementOnTrack
- - @ref RequirementsTrkPseudoMeasurementOnTrack
 */
-
-/**
-@page UsedTrkPseudoMeasurementOnTrack Used Packages
-*/
-
-/**
-@page RequirementsTrkPseudoMeasurementOnTrack Requirements
-*/
-
diff --git a/Tracking/TrkEvent/TrkRIO_OnTrack/doc/packagedoc.h b/Tracking/TrkEvent/TrkRIO_OnTrack/doc/packagedoc.h
index 69010ef8da6933d1c31c9c44333691f5c15e9d95..68072f63bc12f0ef68f9267097ce451b03e27064 100644
--- a/Tracking/TrkEvent/TrkRIO_OnTrack/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkRIO_OnTrack/doc/packagedoc.h
@@ -24,11 +24,6 @@ Please let me know of any errors, or if anything is unclear.
 @author Edward.Moyse@cern.ch
 @author Andreas.Salzburger@cern.ch
 
-@section TrkRIO_OnTrack_used_packagesTrkRIO_OnTrack Used Packages
-
-@section TrkRIO_OnTrack_requirements Requirements
-
 @namespace Trk
 A namespace to enclose the Tracking classes.
 */
-
diff --git a/Tracking/TrkEvent/TrkRoad/doc/packagedoc.h b/Tracking/TrkEvent/TrkRoad/doc/packagedoc.h
index 858e9694ddee2178a3c44ce7c559ceb34b533cf3..8c455335e632820b2cce01ee9ed3ac0594bfe64f 100644
--- a/Tracking/TrkEvent/TrkRoad/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkRoad/doc/packagedoc.h
@@ -22,6 +22,5 @@ The class interface provides a constructor, accesss methods and stream operators
 
 The companion class TrackRoadCollection provides a persistent DataVector of TrkRoad objects. 
 
-@section TrkRoad_TrkRoadReq The requirements file
 
 */
diff --git a/Tracking/TrkEvent/TrkSegment/doc/packagedoc.h b/Tracking/TrkEvent/TrkSegment/doc/packagedoc.h
index 490ef4040ec71de00667c310485ad4e220391824..86643fcc280596b32d3a1f49e9a1a7bbb791811d 100644
--- a/Tracking/TrkEvent/TrkSegment/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkSegment/doc/packagedoc.h
@@ -22,7 +22,6 @@ polymorphic Trk::RIO_OnTrack objects stored through base class pointers.
 Please let me know of any errors, or if anything is unclear.
 @author Andreas.Salzburger@cern.ch
 
-@section TrkSegment_requirementsTrkSegment Requirements
 
 @namespace Trk
 A namespace to enclose the Tracking classes.
diff --git a/Tracking/TrkEvent/TrkSpacePoint/CMakeLists.txt b/Tracking/TrkEvent/TrkSpacePoint/CMakeLists.txt
index 8ad9259c7cf0c67718cc02c654419e4c07b96796..291f61a5aec224c4f782675cd3f7584b2b003118 100644
--- a/Tracking/TrkEvent/TrkSpacePoint/CMakeLists.txt
+++ b/Tracking/TrkEvent/TrkSpacePoint/CMakeLists.txt
@@ -24,6 +24,6 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_add_library( TrkSpacePoint
                    src/*.cxx
                    PUBLIC_HEADERS TrkSpacePoint
-                   LINK_LIBRARIES DataModel SGTools Identifier GaudiKernel TrkMeasurementBase
+                   LINK_LIBRARIES DataModel SGTools Identifier GaudiKernel TrkMeasurementBase EventContainers 
                    PRIVATE_LINK_LIBRARIES TrkDetElementBase TrkSurfaces TrkEventPrimitives TrkPrepRawData )
 
diff --git a/Tracking/TrkEvent/TrkSpacePoint/doc/packagedoc.h b/Tracking/TrkEvent/TrkSpacePoint/doc/packagedoc.h
index 1cc04f22cd9c8876ddbbe71b5d1bc10e4ba8db3a..3544ee6940fa396b34cbfd2e9677757e81022afb 100644
--- a/Tracking/TrkEvent/TrkSpacePoint/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkSpacePoint/doc/packagedoc.h
@@ -33,6 +33,5 @@ which have to be provided by the derived classes.
    - SpacePointOverlapCollection: Class to contain all the SCT overlap 
    SpacePoints, the other ones are in the SpacePointCollection.
  
-@section TrkSpacePoint_TrkSpacePointReq Requirements
 
 */
diff --git a/Tracking/TrkEvent/TrkTrackLink/doc/packagedoc.h b/Tracking/TrkEvent/TrkTrackLink/doc/packagedoc.h
index e2e498733558ad0d47ea129340be1ff0efe50cfc..77ba186cf4fb13474c09716e8e4c602ab93112e0 100644
--- a/Tracking/TrkEvent/TrkTrackLink/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkTrackLink/doc/packagedoc.h
@@ -18,7 +18,5 @@ in the Trk::VxTrackAtVertex class and resolves this circular depenency therefore
 The actual links which are used now are the classes Trk::LinkToTrack and Trk::LinkToTrackParticle which both inherit from Trk::ITrackLink
 and ElementLink< TrackCollection > or ElementLink< TrackParticleBaseContainer >, respectively.
 
-@section TrkTrackLink_UsedPackages Used Packages
-@section TrkTrackLink_MyPackageReq Requirements
 
 */
diff --git a/Tracking/TrkEvent/TrkTrackSummary/doc/packagedoc.h b/Tracking/TrkEvent/TrkTrackSummary/doc/packagedoc.h
index 52c6fbe170c63d476bb0359268038d840d2b3147..3cf67b802bd10346feaf81c9a057e9363a9b09c9 100644
--- a/Tracking/TrkEvent/TrkTrackSummary/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkTrackSummary/doc/packagedoc.h
@@ -11,8 +11,4 @@
 The TrkTrackSummary package contains the Trk::TrackSummary class, designed to provide summary information about a Trk::Track. It is generated using 
 the Trk::TrackSummaryTool of the package TrkTrackSummaryTool.
 
-@section TrkTrackSummary_used_packagesTkPara Used Packages
-
-@section TrkTrackSummary_requirements Requirements
-
 */
diff --git a/Tracking/TrkEvent/TrkTruthData/TrkTruthData/DetailedTrackTruthCollection.h b/Tracking/TrkEvent/TrkTruthData/TrkTruthData/DetailedTrackTruthCollection.h
index 4584e4a2fd3316863dfe4ee5c48dce57bc64ab5e..238eaff92365a94fa4b70886991aa381a8692639 100755
--- a/Tracking/TrkEvent/TrkTruthData/TrkTruthData/DetailedTrackTruthCollection.h
+++ b/Tracking/TrkEvent/TrkTruthData/TrkTruthData/DetailedTrackTruthCollection.h
@@ -23,6 +23,7 @@ class DetailedTrackTruthCollection : public std::multimap<Trk::TrackTruthKey, De
  public:
   DetailedTrackTruthCollection(const DataLink<TrackCollection> tracks) : m_trackCollection(tracks) {}
   DataLink<TrackCollection> trackCollectionLink() const { return m_trackCollection; }
+  void setTrackCollection(const DataLink<TrackCollection> tracks){m_trackCollection=tracks;}
 
   // for POOL
   DetailedTrackTruthCollection() {}
diff --git a/Tracking/TrkEvent/TrkTruthData/doc/packagedoc.h b/Tracking/TrkEvent/TrkTruthData/doc/packagedoc.h
index 9a703d6eba284fe4ddaea1765c4fdad0aa2c3b92..1b73982a181e815a898191716310e95ed7aff7f9 100644
--- a/Tracking/TrkEvent/TrkTruthData/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkTruthData/doc/packagedoc.h
@@ -26,6 +26,5 @@ creation of the reconstructed object.
   - SpacePointTruth: class to describe the truth of a given SpacePoint object
   - TrackTruth: class to describe the truth of a given Track object
 
-@section TrkTruthData_TrkTruthDataReq Requirements
 
 */
diff --git a/Tracking/TrkEvent/TrkV0Vertex/doc/packagedoc.h b/Tracking/TrkEvent/TrkV0Vertex/doc/packagedoc.h
index 99dff061e6b24d4c03ca5ea3d47b1dc06163eb0f..27c548f62d74a2302eaac670566aa6c48f32c1a4 100644
--- a/Tracking/TrkEvent/TrkV0Vertex/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkV0Vertex/doc/packagedoc.h
@@ -28,7 +28,5 @@ plus one or more mass constrained hypotheses (reconstructed from the same pair o
 It represents a collection of <i>Trk::V0Candidate<i>'s reconstructed by a V0 finding
 algorithm and written to the StoreGate for further use.
 
-@section TrkV0Vertex_requirementsTrkV0Vertex Requirements
 
 */
-
diff --git a/Tracking/TrkEvent/TrkVertexOnTrack/doc/packagedoc.h b/Tracking/TrkEvent/TrkVertexOnTrack/doc/packagedoc.h
index 8316284def0eace4447f12cf3b7974664d784a8e..dfa1125effc1098ec3b0da8f5703fe2ce562a47c 100644
--- a/Tracking/TrkEvent/TrkVertexOnTrack/doc/packagedoc.h
+++ b/Tracking/TrkEvent/TrkVertexOnTrack/doc/packagedoc.h
@@ -18,11 +18,6 @@ the alignment procedures.
 
 
 
-@section TrkVertexOnTrack_used_packagesTrkVertexOnTrack Used Packages
-
-@section TrkVertexOnTrack_requirements Requirements
-
 @namespace Trk
 A namespace to enclose the Tracking classes.
 */
-
diff --git a/Tracking/TrkEvent/VxMultiVertex/doc/packagedoc.h b/Tracking/TrkEvent/VxMultiVertex/doc/packagedoc.h
index 90e6a20dbde90aedf46b33a68ba4aaa897210d1a..1bb2b2968e2776ed80fb65bc015d83fb70b1dd87 100644
--- a/Tracking/TrkEvent/VxMultiVertex/doc/packagedoc.h
+++ b/Tracking/TrkEvent/VxMultiVertex/doc/packagedoc.h
@@ -37,6 +37,5 @@ an adaptive multi vertex fit.
 of <i>Trk::MVFVxCandidate </i>. It is not used so far, but might become 
 quite important if any of presently transient MVF-related stuff becomes
 persistent.
-@section VxMultiVertex_requirementsVxMultiVertex Requirements
 
 */
diff --git a/Tracking/TrkEvent/VxVertex/doc/packagedoc.h b/Tracking/TrkEvent/VxVertex/doc/packagedoc.h
index 7ea617ed1deaa4bf391a4fc5e107772b40d23c67..f7b25ddafdfcc8ef428c3a45870f09544155c664 100644
--- a/Tracking/TrkEvent/VxVertex/doc/packagedoc.h
+++ b/Tracking/TrkEvent/VxVertex/doc/packagedoc.h
@@ -56,6 +56,5 @@ vertex fit.
 <b><i>VxContainer</i></b>: A top level object of this package. This is
 a container of vertexes to be written to the StoreGate as a result of
 a vertex reconstruction.
-@section VxVertex_MyPackageReq Requirements
 
 */
diff --git a/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkTrackSummary/TrackSummaryCnv_p1.cxx b/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkTrackSummary/TrackSummaryCnv_p1.cxx
index 40259bf69dce74a94c2cfe4e04e9a4cfdaa8715f..30e28cb330ffb516e9d9c8cf69e0c995e3c080e3 100644
--- a/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkTrackSummary/TrackSummaryCnv_p1.cxx
+++ b/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkTrackSummary/TrackSummaryCnv_p1.cxx
@@ -12,6 +12,16 @@ void TrackSummaryCnv_p1::persToTrans( const Trk::TrackSummary_p1 *persObj,
    if (transObj->m_information.size() < Trk::numberOfTrackSummaryTypes)
      transObj->m_information.resize(Trk::numberOfTrackSummaryTypes,
                                     Trk::TrackSummary::SummaryTypeNotSet);
+    if (persObj->m_information.size() <= Trk::numberOfInnermostPixelLayerHits) {
+      transObj->m_information[Trk::numberOfInnermostPixelLayerHits] =
+        transObj->m_information[Trk::numberOfBLayerHits];
+    }
+
+    if (persObj->m_information.size() <= Trk::numberOfInnermostPixelLayerSharedHits) {
+      transObj->m_information[Trk::numberOfInnermostPixelLayerSharedHits] =
+        transObj->m_information[Trk::numberOfBLayerSharedHits];
+    }
+
    transObj->m_idHitPattern      = persObj->m_idHitPattern;
    transObj->m_eProbability      = persObj->m_eProbability;
    transObj->m_indetTrackSummary = createTransFromPStore( &m_indetSummaryCnv, persObj->m_indetTrackSummary, log );
diff --git a/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkTrackSummary/TrackSummaryCnv_p2.cxx b/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkTrackSummary/TrackSummaryCnv_p2.cxx
index 4b875eafe69cbc6dac2f68b544fe79f6ee828c72..16594b86dedc24007dacda64cc574e0ea5654fa0 100644
--- a/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkTrackSummary/TrackSummaryCnv_p2.cxx
+++ b/Tracking/TrkEventCnv/TrkEventTPCnv/src/TrkTrackSummary/TrackSummaryCnv_p2.cxx
@@ -61,6 +61,17 @@ void TrackSummaryCnv_p2::persToTrans( const Trk::TrackSummary_p2 *persObj, Trk::
       transObj->m_information.resize(Trk::numberOfTrackSummaryTypes,
                                      Trk::TrackSummary::SummaryTypeNotSet);
 
+    if (persObj->m_information.size() <= Trk::numberOfInnermostPixelLayerHits) {
+      transObj->m_information[Trk::numberOfInnermostPixelLayerHits] =
+        transObj->m_information[Trk::numberOfBLayerHits];
+    }
+
+    if (persObj->m_information.size() <= Trk::numberOfInnermostPixelLayerSharedHits) {
+      transObj->m_information[Trk::numberOfInnermostPixelLayerSharedHits] =
+        transObj->m_information[Trk::numberOfBLayerSharedHits];
+    }
+        
+
     transObj->m_idHitPattern      = persObj->m_idHitPattern;
     transObj->m_eProbability      = persObj->m_eProbability;
     transObj->m_dedx              = persObj->m_pixeldEdx;
diff --git a/Tracking/TrkEventCnv/TrkJiveXML/doc/packagedoc.h b/Tracking/TrkEventCnv/TrkJiveXML/doc/packagedoc.h
index 5e7e3fc1744897cdf39ff002d4fb08dc11835e00..a1bc1d4e6540332f002e228e03b313447e0f3e10 100644
--- a/Tracking/TrkEventCnv/TrkJiveXML/doc/packagedoc.h
+++ b/Tracking/TrkEventCnv/TrkJiveXML/doc/packagedoc.h
@@ -21,16 +21,5 @@ forward them to the formatting tool. Each tool implements the IDataRetriever int
 - JiveXML::VertexRetriever : @copydoc JiveXML::VertexRetriever
 
 @section TrkJiveXML_TrkJiveXMLEnv Environment
- - @ref used_TrkJiveXML
- - @ref requirements_TrkJiveXML
 
 */
-
-/**
-@page used_TrkJiveXML Used Packages
-*/
-
-/**
-@page requirements_TrkJiveXML Requirements
-*/
-
diff --git a/Tracking/TrkEventCnv/TrkJiveXML/src/TrackRetriever.cxx b/Tracking/TrkEventCnv/TrkJiveXML/src/TrackRetriever.cxx
index 4be154a42e6cd215b414ceda22472e3b1c0fd957..f8373470f370ef569acba155a932e0fc3fcd9f75 100644
--- a/Tracking/TrkEventCnv/TrkJiveXML/src/TrackRetriever.cxx
+++ b/Tracking/TrkEventCnv/TrkJiveXML/src/TrackRetriever.cxx
@@ -572,7 +572,7 @@ namespace JiveXML {
 					nSCTHits.push_back(DataType(0));
 					nTRTHits.push_back(DataType(0));
 				}else{
-					nBLayerHits.push_back(DataType(summary->get(Trk::numberOfBLayerHits)));
+					nBLayerHits.push_back(DataType(summary->get(Trk::numberOfInnermostPixelLayerHits)));
 					nPixHits.push_back(DataType(summary->get(Trk::numberOfPixelHits)));
 					nSCTHits.push_back(DataType(summary->get(Trk::numberOfSCTHits)));
 					nTRTHits.push_back(DataType(summary->get(Trk::numberOfTRTHits)));
diff --git a/Tracking/TrkExtrapolation/TrkExAlgs/doc/packagedoc.h b/Tracking/TrkExtrapolation/TrkExAlgs/doc/packagedoc.h
index eeb0e35459004fe690b2f11bcb5b9f93459cab4a..d6b91c65e9e39c236fca4d7cddd1aeec40b5f9b4 100644
--- a/Tracking/TrkExtrapolation/TrkExAlgs/doc/packagedoc.h
+++ b/Tracking/TrkExtrapolation/TrkExAlgs/doc/packagedoc.h
@@ -22,7 +22,6 @@ The validaiton algorithms that can be found in this package are:
 The algorithms can be steered through jobOptions files that are located in the
 TrkExExample package.
 
-@section TrkExAlgs_TrkExAlgsReq Requirements
 
 
 */
diff --git a/Tracking/TrkExtrapolation/TrkExExample/doc/packagedoc.h b/Tracking/TrkExtrapolation/TrkExExample/doc/packagedoc.h
index 446a9793ff593e0ef2ef5be4f90c89cbfc1a0024..ffd177e341e5feb05c9ce500edc5ef7305f443d9 100644
--- a/Tracking/TrkExtrapolation/TrkExExample/doc/packagedoc.h
+++ b/Tracking/TrkExtrapolation/TrkExExample/doc/packagedoc.h
@@ -17,7 +17,6 @@ matrices used in the various propagation tools (RiddersAlgorithm).
 @author Andreas.Salzburger@cern.ch
 
 
-@section TrkExExample_requirements Requirements
 The libaray type is a pure component library.
 */
 
@@ -25,4 +24,3 @@ The libaray type is a pure component library.
 \namespace Trk
 A namespace to enclose the new Track class, and related tools.
 */
-
diff --git a/Tracking/TrkExtrapolation/TrkExInterfaces/doc/packagedoc.h b/Tracking/TrkExtrapolation/TrkExInterfaces/doc/packagedoc.h
index 5f93800e299ae1f7f1fc46c652d6ee4f0f9447f5..405a93053ae1f8d156c5cdcaa10288e0ef9e4512 100644
--- a/Tracking/TrkExtrapolation/TrkExInterfaces/doc/packagedoc.h
+++ b/Tracking/TrkExtrapolation/TrkExInterfaces/doc/packagedoc.h
@@ -35,14 +35,5 @@ This package is not built as a library, it is a simple include package.
       
 @section TrkExInterfaces_ExtrasTrkExInterfaces Extra Pages
 
- - @ref UsedTrkExInterfaces
  - @ref reqsTrkExInterfaces
 */
-
-/**
-@page UsedTrkExInterfaces Used Packages
-*/
-
-/**
-@page reqsTrkExInterfaces Requirements
-*/
diff --git a/Tracking/TrkExtrapolation/TrkExRungeKuttaPropagator/doc/packagedoc.h b/Tracking/TrkExtrapolation/TrkExRungeKuttaPropagator/doc/packagedoc.h
index 92d4b837fa1f8fca7ef2f251e60c8cfb4c22ef0a..44581a551a73dd742bc78c6cf34e6156736959fb 100644
--- a/Tracking/TrkExtrapolation/TrkExRungeKuttaPropagator/doc/packagedoc.h
+++ b/Tracking/TrkExtrapolation/TrkExRungeKuttaPropagator/doc/packagedoc.h
@@ -26,4 +26,3 @@ Please let me know of any errors, or if anything is unclear.
 @author Igor.Gavrilenko@cern.ch
 
 */
-
diff --git a/Tracking/TrkExtrapolation/TrkExTools/doc/packagedoc.h b/Tracking/TrkExtrapolation/TrkExTools/doc/packagedoc.h
index 06225cf0ec60712ef0373bbb646883aa0b0dca6c..b5142bb936595e36e36fcda9589dfa3f9bc8dc4f 100644
--- a/Tracking/TrkExtrapolation/TrkExTools/doc/packagedoc.h
+++ b/Tracking/TrkExtrapolation/TrkExTools/doc/packagedoc.h
@@ -96,7 +96,6 @@ Please let me know of any errors, or if anything is unclear.
 @author Andreas.Salzburger@cern.ch
 
 
-@section TrkExTools_requirements Requirements
 The libaray type is a pure component library.
 */
 
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
index 299e9c6dc469914960aa36a5a14757bc6fd5ea57..680a97b44ec5228ff77e8ce673fd9b6de0c08c43 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/Extrapolator.cxx
@@ -691,7 +691,7 @@ Trk::Extrapolator::extrapolate(const IPropagator &prop,
 								      particle,
 								      matupmode);
       }
-      if (resultParameters){   
+      if (resultParameters){
         // destination reached : indicated through result parameters
         // set the model action of the material effects updators
         for (unsigned int imueot = 0; imueot < m_subUpdators.size(); ++imueot) {
@@ -901,6 +901,8 @@ Trk::Extrapolator::extrapolate(const IPropagator &prop,
   }
 
   // ---------------- extrapolation inside the Volume ----------------------------------------------------------
+  Trk::TrackParameters* finalNextParameters=nextParameters->clone();
+  ATH_MSG_DEBUG("create finalNextParameters "<<*finalNextParameters);
   if (nextVolume) {
     // chose the propagator fromt he geometry signature
     currentPropagator = subPropagator(*nextVolume);
@@ -920,8 +922,13 @@ Trk::Extrapolator::extrapolate(const IPropagator &prop,
   // ------------------------------------------------------------------------------------------------------------
   // the final - desperate backup --- just try to hit the surface
   if (!resultParameters && !m_stopWithNavigationBreak && !m_stopWithUpdateZero) {
+    if(finalNextParameters) ATH_MSG_DEBUG("propagate using parameters "<<*finalNextParameters);
+    else{
+      ATH_MSG_DEBUG("no finalNextParameters, bailing out of extrapolateDirectly");
+      return returnResult(0,refParameters);
+    }
     ATH_MSG_DEBUG("  [-] Fallback to extrapolateDirectly triggered ! ");
-    resultParameters = prop.propagate(*nextParameters,
+    resultParameters = prop.propagate(*finalNextParameters,
                                       sf,
                                       dir,
                                       bcheck,
@@ -930,6 +937,7 @@ Trk::Extrapolator::extrapolate(const IPropagator &prop,
                                       particle, false, startVolume);
   }
   // return whatever you have
+  delete finalNextParameters;
   return returnResult(resultParameters, refParameters);
 }
 
@@ -3279,8 +3287,8 @@ Trk::Extrapolator::insideVolumeStaticLayers(
     ATH_MSG_VERBOSE("  [+] In starting volume: check for eventual necessary postUpdate and overlapSearch.");
 
     // check if the parameter is on the layer
-    const Trk::Layer *parsLayer = &nextParameters->associatedSurface() ?
-                                  (nextParameters->associatedSurface()).associatedLayer() : 0;
+    const Trk::Layer *parsLayer = 
+      nextParameters->associatedSurface().associatedLayer();
     if ((parsLayer && parsLayer == associatedLayer)
         || associatedLayer->surfaceRepresentation().isOnSurface(parm.position(),
                                                                 false,
diff --git a/Tracking/TrkExtrapolation/TrkExTools/src/MaterialEffectsUpdator.cxx b/Tracking/TrkExtrapolation/TrkExTools/src/MaterialEffectsUpdator.cxx
index cb07c36ffc0149b500f6e85ecb502f702e450e58..1930b8eb1e7ba91b05a75417c418b0053ea54355 100755
--- a/Tracking/TrkExtrapolation/TrkExTools/src/MaterialEffectsUpdator.cxx
+++ b/Tracking/TrkExtrapolation/TrkExTools/src/MaterialEffectsUpdator.cxx
@@ -191,7 +191,7 @@ Trk::MaterialEffectsUpdator::update(const TrackParameters *parm,
   // TODO, if the parm doesn't have a surface (i.e. its in
   // curvilinear) then should we fall through?
   if (particle == Trk::geantino || particle == Trk::nonInteractingMuon || (!m_doMs && !m_doEloss) ||
-      !(&parm->associatedSurface()) || parm->associatedSurface() != meff.associatedSurface()) {
+      parm->associatedSurface() != meff.associatedSurface()) {
     return(parm);
   }
 
diff --git a/Tracking/TrkExtrapolation/TrkExUtils/doc/packagedoc.h b/Tracking/TrkExtrapolation/TrkExUtils/doc/packagedoc.h
index 97e742a7edee4adda4b9a3aedf0cddc0efa87e28..d3b1daf985d19b1bfc8b0e43fdd81161d4cdaea9 100644
--- a/Tracking/TrkExtrapolation/TrkExUtils/doc/packagedoc.h
+++ b/Tracking/TrkExtrapolation/TrkExUtils/doc/packagedoc.h
@@ -16,7 +16,6 @@ the extrapolation/propagation process.
 @author Andreas.Salzburger@cern.ch, Igor.Gavrilenko@cern.ch, Esben.Lund@cern.ch
 
 
-@section TrkExUtils_requirements Requirements
 */
 
 /**
diff --git a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/doc/packagedoc.h b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/doc/packagedoc.h
index fd1cdc438536292515d320d0688dc71fa6ff5193..1f3da06579018d7188ed934bb3bbc24e10a192b3 100644
--- a/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/doc/packagedoc.h
+++ b/Tracking/TrkFitter/TrkDeterministicAnnealingFilter/doc/packagedoc.h
@@ -30,15 +30,4 @@ a study of elastic tracking and non-linear filters</i>,  Computer Physics Commun
     
 @section TrkDeterministicAnnealingFilter_ExtrasTrkDeterministicAnnealingFilter Extra Pages
 
- - @ref UsedTrkDeterministicAnnealingFilter
- - @ref requirementsTrkDeterministicAnnealingFilter
 */
-
-/**
-@page UsedTrkDeterministicAnnealingFilter Used Packages
-*/
-
-/**
-@page requirementsTrkDeterministicAnnealingFilter Requirements
-*/
-
diff --git a/Tracking/TrkFitter/TrkDynamicNoiseAdjustor/doc/packagedoc.h b/Tracking/TrkFitter/TrkDynamicNoiseAdjustor/doc/packagedoc.h
index d7c246c91c1df2b916425a6e4bd5259cc10f2d9d..c64571cffb70c297f7ae0bf80c5ccabeddad72a0 100644
--- a/Tracking/TrkFitter/TrkDynamicNoiseAdjustor/doc/packagedoc.h
+++ b/Tracking/TrkFitter/TrkDynamicNoiseAdjustor/doc/packagedoc.h
@@ -18,7 +18,6 @@ of the covariance matrix during filtering. This noise term is calculated
 dynamically, whenever a local single-parameter fit suggests that a
 significant momentum loss has taken place at a given silicon layer.
 
-@section TrkDynamicNoiseAdjustor_requirementsTrkDynamicNoiseAdjustor Requirements
 
 
 */
diff --git a/Tracking/TrkFitter/TrkFitterInterfaces/doc/packagedoc.h b/Tracking/TrkFitter/TrkFitterInterfaces/doc/packagedoc.h
index b969e003380989e13d3025e71d6cb53c17feb21d..b20d379d29f73ff44d21b57e382462935078a755 100644
--- a/Tracking/TrkFitter/TrkFitterInterfaces/doc/packagedoc.h
+++ b/Tracking/TrkFitter/TrkFitterInterfaces/doc/packagedoc.h
@@ -27,7 +27,6 @@ The following interface classes are defined
 
 This package is not built as any library, it is a simple include package.   
 
-@section TrkFitterInterfaces_TrkFitterInterfacesReq Requirements
 
 
 */
diff --git a/Tracking/TrkFitter/TrkFitterUtils/doc/packagedoc.h b/Tracking/TrkFitter/TrkFitterUtils/doc/packagedoc.h
index dc97380a2e44c4536dac2d5fee498a404d92f16d..d2a2c07516f7f955fd13787fa58f84db199f4542 100644
--- a/Tracking/TrkFitter/TrkFitterUtils/doc/packagedoc.h
+++ b/Tracking/TrkFitter/TrkFitterUtils/doc/packagedoc.h
@@ -56,14 +56,4 @@ package, has been moved to a separate package: TrkFitterInterfaces.
 
 @section TrkFitterUtils_ExtrasTrkFitterUtils Extra Pages
 
- - @ref UsedTrkFitterUtils
- - @ref requirementsTrkFitterUtils
-*/
-
-/**
-@page UsedTrkFitterUtils Used Packages
-*/
-
-/**
-@page requirementsTrkFitterUtils Requirements
 */
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
index e35eef1e441aa0dccf445e4c306f2ae7e8b6b7d2..599dfabb153b491b8e77acc894e0079d51d38e46 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/TrkGlobalChi2Fitter/GlobalChi2Fitter.h
@@ -205,7 +205,6 @@ private:
   // mutable const Volume*    m_caloEntrance2; 
   mutable const TrackingVolume*    m_msEntrance; 
 
-  bool m_option_allowEmptyROT;
   bool m_signedradius;
   mutable bool m_calomat,m_extmat,m_idmat;
   bool m_fillderivmatrix; 
@@ -236,7 +235,6 @@ private:
   int m_maxit;
   mutable int m_nfits,m_nsuccessfits,m_matrixinvfailed,m_notenoughmeas,m_propfailed,m_invalidangles,m_notconverge,m_highchi2,m_lowmomentum;
   mutable FitterStatusCode m_fittercode;
-  mutable bool m_kinkallowed;
   mutable bool m_acceleration;
   mutable bool m_numderiv; 
   mutable int m_lastiter;
@@ -246,7 +244,6 @@ private:
   MagneticFieldProperties *m_fieldpropnofield;
   MagneticFieldProperties *m_fieldpropfullfield;
   mutable MagneticFieldProperties *m_fieldprop;
-  mutable int m_prefit;
   static std::vector<CLHEP::HepMatrix> m_derivpool;
   mutable TMatrixDSym m_a,m_ainv;
   ParticleMasses   m_particleMasses;
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/doc/packagedoc.h b/Tracking/TrkFitter/TrkGlobalChi2Fitter/doc/packagedoc.h
index dcffbbc466c4221073b8c7ff21dc481db4d49261..0a18f194d860ee9a195d549c15810b458c6b798d 100644
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/doc/packagedoc.h
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/doc/packagedoc.h
@@ -24,15 +24,4 @@ The TrkGlobalChi2Fitter package implements the global chi2 technique for track f
 
 @section TrkGlobalChi2Fitter_ExtrasTrkGlobalChi2Fitter Extra Pages
 
- - @ref UsedTrkGlobalChi2Fitter
- - @ref RequirementsTrkGlobalChi2Fitter
 */
-
-/**
-@page UsedTrkKalmanFitter Used Packages
-*/
-
-/**
-@page RequirementsTrkGlobalChi2Fitter Requirements
-*/
-
diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
index df49a49bad401e778e35e92247282b5ee7239066..4f821d7dc3f01a2458b1ea4cd4c86d8300ae5612 100755
--- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
+++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx
@@ -111,7 +111,6 @@ namespace Trk {
     m_trackingGeometry(nullptr),
     m_caloEntrance(nullptr),
     m_msEntrance(nullptr),
-    m_option_allowEmptyROT{},
     m_signedradius{},
     m_calomat{}, m_extmat{}, m_idmat{},
     m_derivmat(nullptr),
@@ -130,7 +129,6 @@ namespace Trk {
     m_maxit{},
     m_nfits{}, m_nsuccessfits{}, m_matrixinvfailed{}, m_notenoughmeas{}, m_propfailed{}, m_invalidangles{},
     m_notconverge{}, m_highchi2{}, m_lowmomentum{},
-    m_kinkallowed{},
     m_acceleration{},
     m_numderiv{},
     m_lastiter{},
@@ -140,7 +138,6 @@ namespace Trk {
     m_fieldpropnofield(nullptr),
     m_fieldpropfullfield(nullptr),
     m_fieldprop(nullptr),
-    m_prefit{},
     // m_derivpool{}, static member
     m_a{}, m_ainv{},
     m_particleMasses{},
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/doc/packagedoc.h b/Tracking/TrkFitter/TrkKalmanFitter/doc/packagedoc.h
index 83c923d540ac005ac6c7f6e3aae501c1719c34b1..8b47ce8f08ef3b2eedb71b16639532d6ea887257 100644
--- a/Tracking/TrkFitter/TrkKalmanFitter/doc/packagedoc.h
+++ b/Tracking/TrkFitter/TrkKalmanFitter/doc/packagedoc.h
@@ -604,15 +604,4 @@ functioning, a few points need to be taken into account.
 
 @section TrkKalmanFitter_ExtrasTrkKalmanFitter Extra Pages
 
- - @ref UsedTrkKalmanFitter
- - @ref RequirementsTrkKalmanFitter
 */
-
-/**
-@page UsedTrkKalmanFitter Used Packages
-*/
-
-/**
-@page RequirementsTrkKalmanFitter Requirements
-*/
-
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierLogic.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierLogic.cxx
index 70252fd2bb744dd5d2937428c1dab079f605d43e..03e4542c290db743cf7a577584177a3ccac8c9fe 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierLogic.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierLogic.cxx
@@ -375,7 +375,7 @@ bool Trk::KalmanOutlierLogic::reject(const Trk::FitQuality& fitQuality) const
     double prob = 1.0-Genfun::CumulativeChiSquare(fitQuality.numberDoF())(fitQuality.chiSquared());
     if ( prob < m_Trajectory_Chi2ProbCut) {
       ATH_MSG_DEBUG ("-O- trajectory with total chi2/ndf=" <<
-                     fitQuality.chiSquared()/fabs(fitQuality.numberDoF()) <<
+                     fitQuality.chiSquared()/std::abs(fitQuality.numberDoF()) <<
                      ", prob= " << prob << " fails quality cut" );
       return true;
     } else ATH_MSG_VERBOSE ("-O- trajectory passes quality cut, prob= " << prob);
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierRecovery_InDet.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierRecovery_InDet.cxx
index 138511ff4731e2639894fe9d7c35acc561b4bc02..c1ecc354a472b12b1a855db9802fc0d2fa09df15 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierRecovery_InDet.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanOutlierRecovery_InDet.cxx
@@ -569,7 +569,7 @@ bool Trk::KalmanOutlierRecovery_InDet::reject(const Trk::FitQuality& fitQuality)
     double prob = 1.0-Genfun::CumulativeChiSquare(fitQuality.numberDoF())(fitQuality.chiSquared());
     if ( prob < m_Trajectory_Chi2ProbCut) {
       ATH_MSG_DEBUG ("-O- trajectory with total chi2/ndf="
-				    << fitQuality.chiSquared()/fabs(fitQuality.numberDoF())
+                     << fitQuality.chiSquared()/std::abs(fitQuality.numberDoF())
                      << ", prob= " << prob << " fails quality cut" );
       return true;
     } else ATH_MSG_VERBOSE ( "-O- trajectory passes quality cut, prob= " << prob );
diff --git a/Tracking/TrkFitter/TrkRefitAlg/doc/packagedoc.h b/Tracking/TrkFitter/TrkRefitAlg/doc/packagedoc.h
index 83f8226a543e4b4a4fbdb7650ed3ec26c76c2341..384b4529eb75ebc35da5729b774b50b73b84009c 100644
--- a/Tracking/TrkFitter/TrkRefitAlg/doc/packagedoc.h
+++ b/Tracking/TrkFitter/TrkRefitAlg/doc/packagedoc.h
@@ -39,16 +39,4 @@ topSequence += MyReFitTrack
  
 @section TrkRefitAlg_ExtrasTrkRefitAlg Extra Pages
 
- - @ref UsedTrkRefitAlg
- - @ref RequirementsTrkRefitAlg
 */
-
-/**
-@page UsedTrkRefitAlg Used Packages
-*/
-
-/**
-@page RequirementsTrkRefitAlg Requirements
-*/
-
-
diff --git a/Tracking/TrkFitter/TrkRefitAlg/src/ReFitTrack.cxx b/Tracking/TrkFitter/TrkRefitAlg/src/ReFitTrack.cxx
index 6a032674956ef9998c8bdd35d0a84c6c312a1243..91398e0435b4f452052dfe7043a948046c36bafe 100755
--- a/Tracking/TrkFitter/TrkRefitAlg/src/ReFitTrack.cxx
+++ b/Tracking/TrkFitter/TrkRefitAlg/src/ReFitTrack.cxx
@@ -160,9 +160,9 @@ StatusCode Trk::ReFitTrack::execute()
   // clean up association tool
   m_assoTool->reset();
 
-  SG::ReadHandle<TrackCollection> m_tracks (m_TrackName);
+  SG::ReadHandle<TrackCollection> tracks (m_TrackName);
 
-  if (!m_tracks.isValid()){
+  if (!tracks.isValid()){
     msg(MSG::ERROR) <<"Track collection named " << m_TrackName.key() 
 		    << " not found, exit ReFitTrack." << endmsg;
     return StatusCode::SUCCESS;
@@ -218,7 +218,7 @@ StatusCode Trk::ReFitTrack::execute()
   SG::WriteHandle<TrackCollection> outputtracks (m_NewTrackName);
 
   // loop over tracks
-  for (TrackCollection::const_iterator itr  = (*m_tracks).begin(); itr < (*m_tracks).end(); itr++){
+  for (TrackCollection::const_iterator itr  = (*tracks).begin(); itr < (*tracks).end(); itr++){
 
     ATH_MSG_VERBOSE ("input track:" << **itr);
 
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorder.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorder.h
index e6679013edcd80780da8d77c75f0b1135d5c5d75..d87934ffe326d7fa588deaa30b2ae5b9f5855234 100755
--- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorder.h
+++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorder.h
@@ -12,11 +12,9 @@
 #include <string>
 #include <vector>
 
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/IEndRunAction.h"
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserRunAction.hh"
+#include "G4UserEventAction.hh"
+#include "G4UserSteppingAction.hh"
 
 /** @class EnergyLossRecorder
 
@@ -36,7 +34,7 @@ namespace Trk {
 
 namespace G4UA{
 
-  class EnergyLossRecorder: public IBeginRunAction,  public IEndRunAction,  public IBeginEventAction,  public IEndEventAction,  public ISteppingAction
+  class EnergyLossRecorder: public G4UserRunAction, public G4UserEventAction,  public G4UserSteppingAction
   {
 
   public:
@@ -47,11 +45,11 @@ namespace G4UA{
     };
 
     EnergyLossRecorder(const Config& config);
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void endOfRun(const G4Run*) override;
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void EndOfRunAction(const G4Run*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
   private:
     Config m_config;
     unsigned int                             m_entries;
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorderTool.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorderTool.h
index d8dddc3f7e3b03c56a5ed54bc0db017ff6c5277a..7773a5d576e52ed70d524147273b801d6f8f291d 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorderTool.h
+++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/EnergyLossRecorderTool.h
@@ -4,11 +4,9 @@
 
 #ifndef TRKG4USERACTIONS_G4UA__ENERGYLOSSRECORDERTOOL_H 
 #define TRKG4USERACTIONS_G4UA__ENERGYLOSSRECORDERTOOL_H 
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/IEndRunActionTool.h"
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "TrkG4UserActions/EnergyLossRecorder.h"
 namespace Trk {
@@ -28,7 +26,7 @@ namespace G4UA{
   class EnergyLossRecorderTool: 
 
   public ActionToolBase<EnergyLossRecorder>,
-    public IBeginRunActionTool,  public IEndRunActionTool,  public IBeginEventActionTool,  public IEndEventActionTool,  public ISteppingActionTool
+    public IG4RunActionTool, public IG4EventActionTool,  public IG4SteppingActionTool
   {
     
   public:
@@ -36,21 +34,15 @@ namespace G4UA{
     EnergyLossRecorderTool(const std::string& type, const std::string& name,const IInterface* parent);
     /// Athena initialize method
     virtual StatusCode initialize() override final;
-    /// gets the BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
-    /// gets the EoR action
-    virtual IEndRunAction* getEndRunAction() override final 
-    { return static_cast<IEndRunAction*>( getAction() ); }
-    /// gets the BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// gets the EoE action
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
+    /// gets the run action
+    virtual G4UserRunAction* getRunAction() override final 
+    { return static_cast<G4UserRunAction*>( getAction() ); }
+    /// gets the event action
+    virtual G4UserEventAction* getEventAction() override final 
+    { return static_cast<G4UserEventAction*>( getAction() ); }
     /// gets the stepping action
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final 
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     /// Gaudi interface manipulation
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollower.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollower.h
index 3ebdf21640c09abb578b16c1beae4893719444b1..79fd91f756bca52d68cfd16bcb0e0ebd85180375 100755
--- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollower.h
+++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollower.h
@@ -23,14 +23,13 @@ namespace Trk {
   class IGeantFollowerHelper;
 }
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
 namespace G4UA{
 
 
-  class GeantFollower: public IBeginEventAction,  public IEndEventAction,  public IBeginRunAction,  public ISteppingAction
+  class GeantFollower: public G4UserEventAction, public G4UserRunAction,  public G4UserSteppingAction
   {
 
   public:
@@ -41,10 +40,10 @@ namespace G4UA{
     };
 
     GeantFollower(const Config& config);
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
 
   private:
 
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMS.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMS.h
index bb667456c8ec2c6fb07ce4ec4414898f2b0c585a..0393a76481369e7592a099f14fcde272134f5cca 100755
--- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMS.h
+++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMS.h
@@ -15,10 +15,9 @@
 #include <string>
 #include <vector>
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
 
 /** @class GeantFollowerMS
 
@@ -33,7 +32,7 @@ namespace Trk {
 namespace G4UA{
 
 
-  class GeantFollowerMS: public IBeginEventAction,  public IEndEventAction,  public IBeginRunAction,  public ISteppingAction
+  class GeantFollowerMS: public G4UserEventAction, public G4UserRunAction,  public G4UserSteppingAction
   {
 
   public:
@@ -45,10 +44,10 @@ namespace G4UA{
     };
 
     GeantFollowerMS(const Config& config);
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
   private:
     Config m_config;
     /** tracking geometry */
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMSTool.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMSTool.h
index e1324c761cd70f0df8953a05d4b1d0dfc7b41ad3..7359610ef8e5008959342d824e2486626f4bd200 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMSTool.h
+++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerMSTool.h
@@ -4,16 +4,15 @@
 
 #ifndef TRKG4USERACTIONS_G4UA__GEANTFOLLOWERMSTOOL_H
 #define TRKG4USERACTIONS_G4UA__GEANTFOLLOWERMSTOOL_H
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "TrkG4UserActions/GeantFollowerMS.h"
 
 namespace G4UA{
 
-  /// @class AthenaStackingActionTool
+  /// @class GeantFollowerMSTool
   /// @brief Tool which manages the GeantFollowerMS action
   ///
   /// @author Andrea Di Simone
@@ -21,24 +20,21 @@ namespace G4UA{
 
   class GeantFollowerMSTool:
     public ActionToolBase<GeantFollowerMS>,
-    public IBeginEventActionTool,  public IEndEventActionTool,  public IBeginRunActionTool,  public ISteppingActionTool
+    public IG4EventActionTool, public IG4RunActionTool,  public IG4SteppingActionTool
   {
 
   public:
     /// Standard constructor
     GeantFollowerMSTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// Retrieve the BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// Retrieve the EoE action
-    virtual IEndEventAction* getEndEventAction() override final
-    { return static_cast<IEndEventAction*>( getAction() ); }
-    /// Retrieve the BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final
-    { return static_cast<IBeginRunAction*>( getAction() ); }
+    /// Retrieve the event action
+    virtual G4UserEventAction* getEventAction() override final
+    { return static_cast<G4UserEventAction*>( getAction() ); }
+    /// Retrieve the run action
+    virtual G4UserRunAction* getRunAction() override final
+    { return static_cast<G4UserRunAction*>( getAction() ); }
     /// Retrieve the stepping action
-    virtual ISteppingAction* getSteppingAction() override final
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
     /// Create an action for this thread
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerTool.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerTool.h
index c2bae8627b892ec4bc9c0131994f0e7dd821d8f5..5360a513562906fb920928a526aeedc935900dd9 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerTool.h
+++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/GeantFollowerTool.h
@@ -4,16 +4,15 @@
 
 #ifndef TRKG4USERACTIONS_G4UA__GEANTFOLLOWERTOOL_H 
 #define TRKG4USERACTIONS_G4UA__GEANTFOLLOWERTOOL_H 
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "TrkG4UserActions/GeantFollower.h"
 
 namespace G4UA{ 
 
-  /// @class AthenaStackingActionTool
+  /// @class GeantFollowerTool
   /// @brief Tool which manages the GeantFollower action
   ///
   /// @author Andrea Di Simone
@@ -21,24 +20,21 @@ namespace G4UA{
   
   class GeantFollowerTool: 
   public ActionToolBase<GeantFollower>,
-    public IBeginEventActionTool,  public IEndEventActionTool,  public IBeginRunActionTool,  public ISteppingActionTool
+    public IG4EventActionTool, public IG4RunActionTool,  public IG4SteppingActionTool
   {
     
   public:
     /// Standard constructor
     GeantFollowerTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// Retrieve the BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// Retrieve the EoE action
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
-    /// Retrieve the BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
+    /// Retrieve the event action
+    virtual G4UserEventAction* getEventAction() override final 
+    { return static_cast<G4UserEventAction*>( getAction() ); }
+    /// Retrieve the run action
+    virtual G4UserRunAction* getRunAction() override final 
+    { return static_cast<G4UserRunAction*>( getAction() ); }
     /// Retrieve the stepping action
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final 
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
     /// Create an action for this thread
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h
index 6bf8f4ef5a1bb1c0bf869b72b1a605bd51b70ae8..b28bd75b71f7316f82d4b9926c858ad86ad13c25 100755
--- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h
+++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorder.h
@@ -26,10 +26,9 @@ namespace Trk {
 
 #include "AthenaBaseComps/AthMessaging.h"
 
-#include "G4AtlasInterfaces/IBeginEventAction.h"
-#include "G4AtlasInterfaces/IEndEventAction.h"
-#include "G4AtlasInterfaces/IBeginRunAction.h"
-#include "G4AtlasInterfaces/ISteppingAction.h"
+#include "G4UserEventAction.hh"
+#include "G4UserRunAction.hh"
+#include "G4UserSteppingAction.hh"
 
 #include "TrkGeometry/MaterialStepCollection.h"
 #include "TrkGeometry/ElementTable.h"
@@ -38,15 +37,15 @@ namespace Trk {
 namespace G4UA{
 
 
-  class MaterialStepRecorder: public AthMessaging, public IBeginEventAction,  public IEndEventAction,  public IBeginRunAction,  public ISteppingAction
+  class MaterialStepRecorder: public AthMessaging, public G4UserEventAction,  public G4UserRunAction,  public G4UserSteppingAction
   {
 
   public:
     MaterialStepRecorder();
-    virtual void beginOfEvent(const G4Event*) override;
-    virtual void endOfEvent(const G4Event*) override;
-    virtual void beginOfRun(const G4Run*) override;
-    virtual void processStep(const G4Step*) override;
+    virtual void BeginOfEventAction(const G4Event*) override;
+    virtual void EndOfEventAction(const G4Event*) override;
+    virtual void BeginOfRunAction(const G4Run*) override;
+    virtual void UserSteppingAction(const G4Step*) override;
   private:
 
     typedef ServiceHandle<StoreGateSvc> StoreGateSvc_t;
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorderTool.h b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorderTool.h
index 95fd060f83c9554acb18a46838aae1f543439421..489c9bb2003de748d90bbdd46bb067547a37d3e6 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorderTool.h
+++ b/Tracking/TrkG4Components/TrkG4UserActions/TrkG4UserActions/MaterialStepRecorderTool.h
@@ -5,10 +5,9 @@
 #ifndef TRKG4USERACTIONS_G4UA__MATERIALSTEPRECORDERTOOL_H 
 #define TRKG4USERACTIONS_G4UA__MATERIALSTEPRECORDERTOOL_H 
 
-#include "G4AtlasInterfaces/IBeginEventActionTool.h"
-#include "G4AtlasInterfaces/IEndEventActionTool.h"
-#include "G4AtlasInterfaces/IBeginRunActionTool.h"
-#include "G4AtlasInterfaces/ISteppingActionTool.h"
+#include "G4AtlasInterfaces/IG4EventActionTool.h"
+#include "G4AtlasInterfaces/IG4RunActionTool.h"
+#include "G4AtlasInterfaces/IG4SteppingActionTool.h"
 #include "G4AtlasTools/ActionToolBase.h"
 #include "TrkG4UserActions/MaterialStepRecorder.h"
 
@@ -22,24 +21,21 @@ namespace G4UA{
 
   class MaterialStepRecorderTool: 
   public ActionToolBase<MaterialStepRecorder>,
-    public IBeginEventActionTool,  public IEndEventActionTool,  public IBeginRunActionTool,  public ISteppingActionTool
+    public IG4EventActionTool, public IG4RunActionTool,  public IG4SteppingActionTool
   {
     
   public:
     /// Standard constructor
     MaterialStepRecorderTool(const std::string& type, const std::string& name,const IInterface* parent);
-    /// Retrieve the BoE action
-    virtual IBeginEventAction* getBeginEventAction() override final 
-    { return static_cast<IBeginEventAction*>( getAction() ); }
-    /// Retrieve the EoE action
-    virtual IEndEventAction* getEndEventAction() override final 
-    { return static_cast<IEndEventAction*>( getAction() ); }
-    /// Retrieve the BoR action
-    virtual IBeginRunAction* getBeginRunAction() override final 
-    { return static_cast<IBeginRunAction*>( getAction() ); }
+    /// Retrieve the event action
+    virtual G4UserEventAction* getEventAction() override final 
+    { return static_cast<G4UserEventAction*>( getAction() ); }
+    /// Retrieve the run action
+    virtual G4UserRunAction* getRunAction() override final 
+    { return static_cast<G4UserRunAction*>( getAction() ); }
     /// Retrieve the stepping action
-    virtual ISteppingAction* getSteppingAction() override final 
-    { return static_cast<ISteppingAction*>( getAction() ); }
+    virtual G4UserSteppingAction* getSteppingAction() override final 
+    { return static_cast<G4UserSteppingAction*>( getAction() ); }
     virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface) override;
   protected:
     /// Create an action for this thread
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/share/EnergyLossSimulation_jobOptions.py b/Tracking/TrkG4Components/TrkG4UserActions/share/EnergyLossSimulation_jobOptions.py
index c163ac1fd28032e639eef76382aab2470b9001be..b71d6d9652cc83cf532120cc48247dff9ad2edd2 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/share/EnergyLossSimulation_jobOptions.py
+++ b/Tracking/TrkG4Components/TrkG4UserActions/share/EnergyLossSimulation_jobOptions.py
@@ -115,10 +115,8 @@ from G4AtlasApps.PyG4Atlas import PyG4AtlasAlg
 topSeq += PyG4AtlasAlg()
 
 from AthenaCommon.CfgGetter import getPublicTool
-ServiceMgr.UserActionSvc.BeginOfRunActions += [getPublicTool("EnergyLossRecorder")]
-ServiceMgr.UserActionSvc.EndOfRunActions += [getPublicTool("EnergyLossRecorder")]
-ServiceMgr.UserActionSvc.BeginOfEventActions += [getPublicTool("EnergyLossRecorder")]
-ServiceMgr.UserActionSvc.EndOfEventActions += [getPublicTool("EnergyLossRecorder")]
+ServiceMgr.UserActionSvc.RunActions += [getPublicTool("EnergyLossRecorder")]
+ServiceMgr.UserActionSvc.EventActions += [getPublicTool("EnergyLossRecorder")]
 ServiceMgr.UserActionSvc.SteppingActions += [getPublicTool("EnergyLossRecorder")]
 
 #--- End jobOptions.GeantinoMapping.py file  ------------------------------
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowingMS_jobOptions.py b/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowingMS_jobOptions.py
index 92e2495c49be90bea80b5ccefd227256abc40934..931c332ab511c5d2fd79a66f1237146758949cc1 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowingMS_jobOptions.py
+++ b/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowingMS_jobOptions.py
@@ -329,8 +329,7 @@ ToolSvc += GeantFollowerMSHelper
 # higher precision for stepping
 SimFlags.TightMuonStepping=True
 
-SimFlags.UseV2UserActions = True
-SimFlags.OptionalUserActionList.addAction('G4UA::GeantFollowerMSTool',['Step','BeginOfEvent','EndOfEvent','BeginOfRun'])
+SimFlags.OptionalUserActionList.addAction('G4UA::GeantFollowerMSTool',['Step','Event','Run'])
 
 ############### The output collection #######################
 
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowing_jobOptions.py b/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowing_jobOptions.py
index 769f6d83c5c19bececa008149ea347022832ae3d..124770bd511dbc79907cd860e1e68bb9d7f63abb 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowing_jobOptions.py
+++ b/Tracking/TrkG4Components/TrkG4UserActions/share/GeantFollowing_jobOptions.py
@@ -326,8 +326,7 @@ GeantFollowerHelper.ExtrapolateIncrementally = True
 GeantFollowerHelper.OutputLevel = VERBOSE
 ToolSvc += GeantFollowerHelper
 
-SimFlags.UseV2UserActions = True
-SimFlags.OptionalUserActionList.addAction('G4UA::GeantFollowerTool',['Step','BeginOfEvent','EndOfEvent','BeginOfRun'])
+SimFlags.OptionalUserActionList.addAction('G4UA::GeantFollowerTool',['Step','Event','Run'])
 
 ############### The output collection #######################
 
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/share/GeantinoMapping_jobOptions.py b/Tracking/TrkG4Components/TrkG4UserActions/share/GeantinoMapping_jobOptions.py
index 3f6c7ba95f42190506f51145293597db4e362c4c..88dbbce5fb7db53556d591ccb36710c9f7f93b9d 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/share/GeantinoMapping_jobOptions.py
+++ b/Tracking/TrkG4Components/TrkG4UserActions/share/GeantinoMapping_jobOptions.py
@@ -96,8 +96,7 @@ myAtRndmGenSvc.EventReseeding   = False
 ServiceMgr += myAtRndmGenSvc
 
 ## add the material step recording action
-SimFlags.UseV2UserActions = True
-SimFlags.OptionalUserActionList.addAction('G4UA::MaterialStepRecorderTool',['BeginOfRun','BeginOfEvent','EndOfEvent','Step'])
+SimFlags.OptionalUserActionList.addAction('G4UA::MaterialStepRecorderTool',['Run','Event','Step'])
 #SimFlags.UserActionConfig.addConfig('G4UA::MaterialStepRecorderTool','verboseLevel',1)
 #SimFlags.UserActionConfig.addConfig('G4UA::MaterialStepRecorderTool','recordELoss',1)
 #SimFlags.UserActionConfig.addConfig('G4UA::MaterialStepRecorderTool','recordMSc',1)
@@ -125,10 +124,8 @@ from G4AtlasApps.PyG4Atlas import PyG4AtlasAlg
 topSeq += PyG4AtlasAlg()
 
 from AthenaCommon.CfgGetter import getPublicTool
-ServiceMgr.UserActionSvc.BeginOfRunActions += [getPublicTool("MaterialStepRecorder")]
-ServiceMgr.UserActionSvc.EndOfRunActions += [getPublicTool("MaterialStepRecorder")]
-ServiceMgr.UserActionSvc.BeginOfEventActions += [getPublicTool("MaterialStepRecorder")]
-ServiceMgr.UserActionSvc.EndOfEventActions += [getPublicTool("MaterialStepRecorder")]
+ServiceMgr.UserActionSvc.RunActions += [getPublicTool("MaterialStepRecorder")]
+ServiceMgr.UserActionSvc.EventActions += [getPublicTool("MaterialStepRecorder")]
 ServiceMgr.UserActionSvc.SteppingActions += [getPublicTool("MaterialStepRecorder")]
 
 #--- End jobOptions.GeantinoMapping.py file  ------------------------------
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorder.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorder.cxx
index e2d9ae86d0464ed49ca748bf2527c890c730135e..329f8750fb4b0e3da62e526ea99e7ad5d6b234cd 100755
--- a/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorder.cxx
+++ b/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorder.cxx
@@ -31,22 +31,22 @@ namespace G4UA
 
   }
 
-  void EnergyLossRecorder::beginOfRun(const G4Run*)
+  void EnergyLossRecorder::BeginOfRunAction(const G4Run*)
   {
     return;
   }
 
-  void EnergyLossRecorder::endOfRun(const G4Run*)
+  void EnergyLossRecorder::EndOfRunAction(const G4Run*)
   {
     return;
   }
 
-  void EnergyLossRecorder::beginOfEvent(const G4Event*)
+  void EnergyLossRecorder::BeginOfEventAction(const G4Event*)
   {
     return;
   }
 
-  void EnergyLossRecorder::endOfEvent(const G4Event*)
+  void EnergyLossRecorder::EndOfEventAction(const G4Event*)
   {
     if (m_config.pmWriter)
       {
@@ -56,7 +56,7 @@ namespace G4UA
     return;
   }
 
-  void EnergyLossRecorder::processStep(const G4Step* aStep)
+  void EnergyLossRecorder::UserSteppingAction(const G4Step* aStep)
   {
     // kill secondary particles
     if (aStep->GetTrack()->GetParentID())
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorderTool.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorderTool.cxx
index 764d6c11f599bf9bdfa8f2ef18840a0cb5355b0c..5d7acaac3284632afa774d704674c735c11c4c3c 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorderTool.cxx
+++ b/Tracking/TrkG4Components/TrkG4UserActions/src/EnergyLossRecorderTool.cxx
@@ -31,28 +31,18 @@ namespace G4UA{
   }
   StatusCode EnergyLossRecorderTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndRunActionTool::interfaceID()) {
-      *ppvIf = (IEndRunActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollower.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollower.cxx
index c7b16adb2098d93ec45ac7b446c49217352fa7cd..e23c646b922395e92a3056ad8734979793b5e248 100755
--- a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollower.cxx
+++ b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollower.cxx
@@ -35,17 +35,17 @@ namespace G4UA{
     , m_helperPointer(nullptr)
   {}
 
-  void GeantFollower::beginOfEvent(const G4Event*)
+  void GeantFollower::BeginOfEventAction(const G4Event*)
   {
     m_helperPointer->beginEvent();
   }
 
-  void GeantFollower::endOfEvent(const G4Event*)
+  void GeantFollower::EndOfEventAction(const G4Event*)
   {
     m_helperPointer->endEvent();
   }
 
-  void GeantFollower::beginOfRun(const G4Run*)
+  void GeantFollower::BeginOfRunAction(const G4Run*)
   {
     if(m_config.helper.retrieve()!=StatusCode::SUCCESS)
       {
@@ -60,7 +60,7 @@ namespace G4UA{
     return;
   }
 
-  void GeantFollower::processStep(const G4Step* aStep)
+  void GeantFollower::UserSteppingAction(const G4Step* aStep)
   {
     // kill secondaries
     if (aStep->GetTrack()->GetParentID())
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMS.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMS.cxx
index 6762b37831628aa03344d94cb47596a589d5f319..bd81d8572e81a4297aa2b26f65e7530ce5c25f57 100755
--- a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMS.cxx
+++ b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMS.cxx
@@ -37,17 +37,17 @@ namespace G4UA{
     , m_helperPointer(nullptr)
   {}
 
-  void GeantFollowerMS::beginOfEvent(const G4Event*)
+  void GeantFollowerMS::BeginOfEventAction(const G4Event*)
   {
     m_helperPointer->beginEvent();
   }
 
-  void GeantFollowerMS::endOfEvent(const G4Event*)
+  void GeantFollowerMS::EndOfEventAction(const G4Event*)
   {
     m_helperPointer->endEvent();
   }
 
-  void GeantFollowerMS::beginOfRun(const G4Run*)
+  void GeantFollowerMS::BeginOfRunAction(const G4Run*)
   {
     if(m_config.helper.retrieve()!=StatusCode::SUCCESS)
       {
@@ -69,7 +69,7 @@ namespace G4UA{
     return;
   }
 
-  void GeantFollowerMS::processStep(const G4Step* aStep)
+  void GeantFollowerMS::UserSteppingAction(const G4Step* aStep)
   {
     // kill secondaries
     if (aStep->GetTrack()->GetParentID())
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSTool.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSTool.cxx
index aac628ea659c179229a9e66314bc32c46ded4b5d..5a9469f8c924add2b4c6376629d582622d72a823 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSTool.cxx
+++ b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerMSTool.cxx
@@ -22,23 +22,18 @@ namespace G4UA{
 
   StatusCode GeantFollowerMSTool::queryInterface(const InterfaceID& riid, void** ppvIf){
 
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerTool.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerTool.cxx
index a4ec9ba79e817ed357ec52a5e205ad990ce46181..9a462fc2b1da49e56cb5f2a37502067f64d34509 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerTool.cxx
+++ b/Tracking/TrkG4Components/TrkG4UserActions/src/GeantFollowerTool.cxx
@@ -21,23 +21,18 @@ namespace G4UA{
 
   StatusCode GeantFollowerTool::queryInterface(const InterfaceID& riid, void** ppvIf){
 
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorder.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorder.cxx
index 7287dc232ccddf5a551bb4412b76d9c2e0e1cee6..c8bd6a1d127612a7ee240c709d5360db2e5a2dc9 100755
--- a/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorder.cxx
+++ b/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorder.cxx
@@ -47,7 +47,7 @@ namespace G4UA{
   {
   }
 
-  void MaterialStepRecorder::beginOfEvent(const G4Event*){
+  void MaterialStepRecorder::BeginOfEventAction(const G4Event*){
 
 
     ATH_MSG_DEBUG(" BeginOfEventAction");
@@ -59,7 +59,7 @@ namespace G4UA{
 
   }
 
-  void MaterialStepRecorder::endOfEvent(const G4Event*){
+  void MaterialStepRecorder::EndOfEventAction(const G4Event*){
 
     ATH_MSG_DEBUG(" EndOfEventAction");
 
@@ -79,7 +79,7 @@ namespace G4UA{
 
   }
 
-  void MaterialStepRecorder::beginOfRun(const G4Run*){
+  void MaterialStepRecorder::BeginOfRunAction(const G4Run*){
 
     ATH_MSG_DEBUG(" BeginOfRunAction");
 
@@ -89,7 +89,7 @@ namespace G4UA{
 
   }
 
-  void MaterialStepRecorder::processStep(const G4Step* aStep)
+  void MaterialStepRecorder::UserSteppingAction(const G4Step* aStep)
   {
     // kill secondaries
     if (aStep->GetTrack()->GetParentID()) {
diff --git a/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorderTool.cxx b/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorderTool.cxx
index ea99a1fb79f2a553c165d9e1a63ed1ed8ca9ed41..0c8c3f0253f46691515f28abf9aaab1d027bf06e 100644
--- a/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorderTool.cxx
+++ b/Tracking/TrkG4Components/TrkG4UserActions/src/MaterialStepRecorderTool.cxx
@@ -17,23 +17,18 @@ namespace G4UA{
   }
   StatusCode MaterialStepRecorderTool::queryInterface(const InterfaceID& riid, void** ppvIf){
     
-    if(riid == IBeginEventActionTool::interfaceID()) {
-      *ppvIf = (IBeginEventActionTool*) this;
+    if(riid == IG4EventActionTool::interfaceID()) {
+      *ppvIf = (IG4EventActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IEndEventActionTool::interfaceID()) {
-      *ppvIf = (IEndEventActionTool*) this;
+    if(riid == IG4RunActionTool::interfaceID()) {
+      *ppvIf = (IG4RunActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
-    if(riid == IBeginRunActionTool::interfaceID()) {
-      *ppvIf = (IBeginRunActionTool*) this;
-      addRef();
-      return StatusCode::SUCCESS;
-    }
-    if(riid == ISteppingActionTool::interfaceID()) {
-      *ppvIf = (ISteppingActionTool*) this;
+    if(riid == IG4SteppingActionTool::interfaceID()) {
+      *ppvIf = (IG4SteppingActionTool*) this;
       addRef();
       return StatusCode::SUCCESS;
     }
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/CMakeLists.txt b/Tracking/TrkTools/TrkAmbiguityProcessor/CMakeLists.txt
index fe604fe59ec0e666bfa20da71d05c298114b894f..dc2dbfe0d858ddcabc44e88196dc385bda69fd1f 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/CMakeLists.txt
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/CMakeLists.txt
@@ -19,6 +19,7 @@ atlas_depends_on_subdirs( PRIVATE
                           Tracking/TrkEvent/TrkRIO_OnTrack
                           Tracking/TrkEvent/TrkTrack
                           Tracking/TrkEvent/TrkTrackSummary
+                          Tracking/TrkEvent/TrkTruthData
                           Tracking/TrkFitter/TrkFitterInterfaces
                           Tracking/TrkTools/TrkToolInterfaces
                           Tracking/TrkValidation/TrkValInterfaces
@@ -27,19 +28,20 @@ atlas_depends_on_subdirs( PRIVATE
 # External dependencies:
 find_package( CLHEP )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( HepPDT )
 
 # Component(s) in the package:
 atlas_add_library(   TrkAmbiguityProcessorLib
                      src/DenseEnvironmentsAmbiguityProcessorTool.cxx
                      PUBLIC_HEADERS TrkAmbiguityProcessor
                      PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AtlasDetDescr GaudiKernel InDetPrepRawData InDetRecToolInterfaces TrkDetElementBase TrkEventPrimitives TrkParameters TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkFitterInterfaces TrkToolInterfaces TrkValInterfaces TrkExInterfaces )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AtlasDetDescr GaudiKernel InDetPrepRawData InDetRecToolInterfaces TrkDetElementBase TrkEventPrimitives TrkParameters TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkTruthData TrkFitterInterfaces TrkToolInterfaces TrkValInterfaces TrkExInterfaces )
 
 atlas_add_component( TrkAmbiguityProcessor
                      src/SimpleAmbiguityProcessorTool.cxx  src/TrackScoringTool.cxx  src/TrackSelectionProcessorTool.cxx
                      src/components/*.cxx 
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} TrkAmbiguityProcessorLib )
+                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPPDT_LIBRARIES} TrkAmbiguityProcessorLib )
 
 # Install files from the package:
 atlas_install_headers( TrkAmbiguityProcessor )
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/doc/packagedoc.h b/Tracking/TrkTools/TrkAmbiguityProcessor/doc/packagedoc.h
index 8bba256dce4fdd9a16c101be6db85ebb61cafd3c..6990561fa3827f3a706eaf673a0b0ec6f22f416f 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/doc/packagedoc.h
@@ -14,16 +14,6 @@ There are two algtools provided:
    
 For more details see "A New Algorithm For Solving Tracking Ambiguities, Daniel Wicke"
 
-@ref used_MyPackage
 
-@ref requirements_MyPackage
 
 */
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-*/
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx
index d12048b8e929cd4e269d8ec59d5f13f2e7c02b3e..50efaa22e2baca7cc4085ed1a013521b8913f5e1 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.cxx
@@ -36,45 +36,6 @@
   #include "GeneratorObjects/McEventCollection.h"
 #endif
 
-namespace {
-	  std::ostream &operator<<(std::ostream &out, const AmgSymMatrix(5) &matrix) {
-	    out << std::endl;
-	    const unsigned int N=5;
-	     for (unsigned int i = 0; i < N; ++i) {
-	         for (unsigned int j = 0; j < N; ++j) {
-	           if (j==0) {
-	             if (i==0) {
-	               out << "/ ";
-	             }
-	             else if (i+1==N) {
-	               out << "\\ ";
-	             }
-	             else {
-	               out << "| ";
-	             }
-	
-	           }
-	           out << std::setw(14) << matrix(i,j) << " ";
-	           if (j+1==N) {
-	             if (i==0) {
-	               out << " \\ ";
-	             }
-	             else if (i+1==N) {
-	               out << " /";
-	             }
-	             else {
-	               out << " |";
-	             }
-	
-	           }
-	         }
-	         out << std::endl;
-	     }
-	     out << std::endl;
-	     return out;
-	  }
-}
-	
 bool Trk::DenseEnvironmentsAmbiguityProcessorTool::_checkTrack( const Trk::Track *track) const {
 	  if (!track )return true;
 	
@@ -156,21 +117,18 @@ Trk::DenseEnvironmentsAmbiguityProcessorTool::DenseEnvironmentsAmbiguityProcesso
   declareProperty("MonitorAmbiguitySolving"  , m_monitorTracks = false);
 
 #ifdef SIMPLEAMBIGPROCDEBUGCODE
-  declareProperty("TruthLocationTRT"       , m_truth_locationTRT     );  
-  declareProperty("ResolvedTrackConnection", m_resolvedTrackConnection = "SiSPS_ResolvedTrackConnection");
-  declareProperty("TruthCollection"        , m_truthCollection = "SiSPSeededTracksTruthCollection");
-  m_truth_locationTRT            = "PRD_MultiTruthTRT";
+  declareProperty("ResolvedTrackConnection", m_resolvedTrackConnection="SiSPS_ResolvedTrackConnection");
+  declareProperty("TruthCollection", m_truthCollection="SiSPSeededTracksTruthCollection");
   //to get brem truth
-  m_generatedEventCollectionName = "TruthEvent"       ;
-  
-  declareProperty("TruthLocationSCT"       ,m_truth_locationSCT     );
-  declareProperty("TruthLocationPixel"     ,m_truth_locationPixel   );
-  m_truth_locationPixel    = "PRD_MultiTruthPixel"    ;
-  m_truth_locationSCT      = "PRD_MultiTruthSCT"      ;
+  declareProperty("GeneratedEventCollection", m_generatedEventCollectionName="TruthEvent");
+
+  declareProperty("TruthLocationPixel", m_truth_locationPixel="PRD_MultiTruthPixel");
+  declareProperty("TruthLocationSCT", m_truth_locationSCT="PRD_MultiTruthSCT");
+  declareProperty("TruthLocationTRT", m_truth_locationTRT="PRD_MultiTruthTRT");
+
+  declare(m_write_resolvedTrackConnection);
 #endif
   declareProperty("RejectTracksWithInvalidCov"     ,m_rejectInvalidTracks   );
-
-  
 }
 //==================================================================================================
 
@@ -281,6 +239,17 @@ StatusCode Trk::DenseEnvironmentsAmbiguityProcessorTool::initialize()
     ATH_MSG_FATAL( "Could not get PixelID helper !" );
     return StatusCode::FAILURE;
   }
+
+  ATH_CHECK(m_truth_locationPixel.initialize());
+  ATH_CHECK(m_truth_locationSCT.initialize());
+  ATH_CHECK(m_truth_locationTRT.initialize());
+  ATH_CHECK(m_generatedEventCollectionName.initialize());
+  ATH_CHECK(m_truthCollection.initialize());
+  m_has_resolvedTrackConnection = m_resolvedTrackConnection.initialize().isSuccess();
+  if (!m_has_resolvedTrackConnection) {
+    m_write_resolvedTrackConnection = m_resolvedTrackConnection.key();
+    ATH_CHECK(m_write_resolvedTrackConnection.initialize());
+  }
 #endif
 
 
@@ -452,29 +421,11 @@ TrackCollection*  Trk::DenseEnvironmentsAmbiguityProcessorTool::process(const Tr
   
   using namespace std;
 
-
 #ifdef SIMPLEAMBIGPROCDEBUGCODE
-  StatusCode sc1;
-  
-  m_truthPIX  = 0;
-  m_truthSCT  = 0;
-  m_truthTRT  = 0;
-  
-  sc1 = evtStore()->retrieve(m_truthPIX,m_truth_locationPixel);
-  if (sc1.isFailure()) 
-    ATH_MSG_WARNING("Could not find TruthPixel");  
-  
-  sc1 = evtStore()->retrieve(m_truthSCT,m_truth_locationSCT);
-  if (sc1.isFailure()) 
-    ATH_MSG_WARNING("Could not find TruthSCT");
-
-  sc1 = evtStore()->retrieve(m_truthTRT,m_truth_locationTRT);
-  if (sc1.isFailure()) 
-    ATH_MSG_FATAL("Could not find TruthTRT");
+  m_truthPIX = SG::makeHandle(m_truth_locationPixel);
+  m_truthSCT = SG::makeHandle(m_truth_locationSCT);
+  m_truthTRT = SG::makeHandle(m_truth_locationTRT);
 #endif
-  
-
-
  
   ++m_Nevents; // statistics
 
@@ -1562,26 +1513,6 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::storeTrkDistanceMapdR( const
 //
 //==================================================================================================
 
-#ifdef SIMPLEAMBIGPROCNTUPLECODE
-void Trk::DenseEnvironmentsAmbiguityProcessorTool::fillValidationTree(const Trk::Track* track) const
-{     
-   // keep track of the track pointer
-    m_track = long(track);
-   // the good guess : we perigee 
-    const Trk::TrackParameters* tp = track->perigeeParameters();
-    m_perigeeInfo = tp ? 1 : 0;
-    if (!tp){
-      // take the first track parameter estimate for the validation
-      const DataVector<const Trk::TrackParameters>* tps = track->trackParameters();    
-      if (tps && tps->size()) tp = (*tps)[0];
-    }
-   // fill pt / eta / phi
-    m_pt  = tp ? float(tp->momentum().perp()) : m_pt;
-    m_eta = tp ? float(tp->momentum().eta())  : m_eta;
-    m_phi = tp ? float(tp->momentum().phi())  : m_phi;   
-}
-#endif
-
 //==================================================================================================
 // Part II : Truth association
 //==================================================================================================
@@ -1595,12 +1526,8 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::findTrueTracks(const TrackCol
   m_trackHistory.clear();
   m_tracksShared.clear();
 
-  ATH_MSG_DEBUG( "Accessing TrackTruthCollection " );
-  const TrackTruthCollection* truthMap  = 0;
-  if (evtStore()->retrieve(truthMap , m_truthCollection).isFailure()) 
-    ATH_MSG_WARNING( "No truth map present, abort TrueTrack search" );
-
-
+  ATH_MSG_DEBUG("Accessing TrackTruthCollection");
+  SG::ReadHandle<TrackTruthCollection> truthMap(m_truthCollection);
   
   std::map<int,std::pair<float,const Trk::Track*> > barcodeMap;
   float minProb =0.80;
@@ -1669,13 +1596,9 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::keepTrackOfTracks(const Trk::
 
 void Trk::DenseEnvironmentsAmbiguityProcessorTool::produceInputOutputConnection()
 {
-
-
-  const TrackCollectionConnection* dmp;
-  if (evtStore()->retrieve(dmp, m_resolvedTrackConnection).isFailure())
-  {
+  if (!m_has_resolvedTrackConnection) {
     // output map: SiSpSeededTrack, ResolvedTrack  
-    TrackCollectionConnection* siSP_ResolvedConnection = new TrackCollectionConnection();
+    TrackCollectionConnection siSP_ResolvedConnection;
     
     TrackCollection::const_iterator  itFinal = m_finalTracks->begin();
     TrackCollection::const_iterator endFinal = m_finalTracks->end();
@@ -1688,16 +1611,14 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::produceInputOutputConnection(
       if (pos == m_trackHistory.end())
         ATH_MSG_ERROR( "Track not found in history" );
       else
-        siSP_ResolvedConnection->insert(std::make_pair(pos->second,*itFinal));
+        siSP_ResolvedConnection.insert(std::make_pair(pos->second,*itFinal));
       
     }
       
-    StatusCode sc = evtStore()->record(siSP_ResolvedConnection, m_resolvedTrackConnection,false);
-      
-    if (sc.isFailure())
-      ATH_MSG_ERROR( "Could not record trackCollectionConnecton" );
-    else
-      ATH_MSG_VERBOSE( "Saved "<<siSP_ResolvedConnection->size()<<" track collection connections"); 
+    SG::WriteHandle<TrackCollectionConnection> h_write_resolvedTrackConnection(m_write_resolvedTrackConnection);
+    h_write_resolvedTrackConnection.record(std::make_unique<TrackCollectionConnection>(siSP_ResolvedConnection));
+
+    ATH_MSG_VERBOSE( "Saved "<<siSP_ResolvedConnection.size()<<" track collection connections"); 
   }
 }
 //============================================================================================
@@ -1842,18 +1763,10 @@ void Trk::DenseEnvironmentsAmbiguityProcessorTool::tsosTruth(const Trk::Track* t
 }
 
 //=======================================================================================
-StatusCode Trk::DenseEnvironmentsAmbiguityProcessorTool::getBremTruth(){
-
-  StatusCode sc;
-  
+StatusCode Trk::DenseEnvironmentsAmbiguityProcessorTool::getBremTruth()
+{
   // Retrieve McEventCollection from StoreGate
-  const McEventCollection* mcEventCollection = 0;
-  
-  sc = evtStore()->retrieve( mcEventCollection, m_generatedEventCollectionName );
-  
-  if ( sc.isFailure() ){
-    return StatusCode::FAILURE;
-  }
+  SG::ReadHandle<McEventCollection> mcEventCollection(m_generatedEventCollectionName);
   
   // Loop over all events in StoreGate
   McEventCollection::const_iterator event = mcEventCollection->begin();
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h
index 501aa57a95528254a2581129fe7a137f6b161bb1..8749b7c2d98ba8d7fe311ac783ad29e4d9a81929 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/DenseEnvironmentsAmbiguityProcessorTool.h
@@ -35,10 +35,17 @@
   // --------------- DEBUG CODE
   #include "HepMC/GenEvent.h"
   #include "TrkTruthData/PRD_MultiTruthCollection.h"
+  #include "GeneratorObjects/McEventCollection.h"
+  #include "TrkTruthData/TrackTruthCollection.h"
   typedef std::map<const Trk::Track*, const Trk::Track*> TrackCollectionConnection;
+
+#ifndef SIMPLEAMBIGPROCDEBUGCODE_CLASS_DEF
+#define SIMPLEAMBIGPROCDEBUGCODE_CLASS_DEF
   CLASS_DEF( TrackCollectionConnection , 148639440 , 1 )
 #endif
 
+#endif
+
 
 
 class AtlasDetectorID;
@@ -240,14 +247,15 @@ namespace Trk {
 //==================================================================================================
 
 #ifdef SIMPLEAMBIGPROCDEBUGCODE
-    const PRD_MultiTruthCollection   * m_truthPIX;
-    const PRD_MultiTruthCollection   * m_truthSCT;  
-    std::string                        m_truth_locationPixel    ;
-    std::string                        m_truth_locationSCT      ;  
-#endif
+    SG::ReadHandleKey<PRD_MultiTruthCollection> m_truth_locationPixel;
+    SG::ReadHandle<PRD_MultiTruthCollection> m_truthPIX;
 
+    SG::ReadHandleKey<PRD_MultiTruthCollection> m_truth_locationSCT;
+    SG::ReadHandle<PRD_MultiTruthCollection> m_truthSCT;
+
+    SG::ReadHandleKey<PRD_MultiTruthCollection>  m_truth_locationTRT;
+    SG::ReadHandle<PRD_MultiTruthCollection>  m_truthTRT;
 
-#ifdef SIMPLEAMBIGPROCDEBUGCODE
 //==================================================================================================
 // PART 2 : Output statistics
 //==================================================================================================
@@ -260,9 +268,13 @@ namespace Trk {
       void findTrueTracks(const TrackCollection* recTracks);
       void keepTrackOfTracks(const Trk::Track* oldTrack, const Trk::Track* newTrack);
       void produceInputOutputConnection();
- 
-      std::string m_resolvedTrackConnection;
-      std::string m_truthCollection;
+
+      SG::ReadHandleKey<McEventCollection> m_generatedEventCollectionName;
+      SG::ReadHandleKey<TrackTruthCollection> m_truthCollection;
+      SG::ReadHandleKey<TrackCollectionConnection> m_resolvedTrackConnection;
+      bool m_has_resolvedTrackConnection;
+      SG::WriteHandleKey<TrackCollectionConnection> m_write_resolvedTrackConnection;
+
       int n_trueFitFails;
       int n_fitFails;
       int numOutliersDiff;
@@ -294,10 +306,7 @@ namespace Trk {
       const std::vector<Amg::Vector3D> positionsOfBremVertices( const HepMC::GenEvent* genEvent ) const;
       bool vertexAssociatedWithOriginalTrack( HepMC::GenVertex* genVertex) const;
 
-      std::string                        m_generatedEventCollectionName; 
       Trk::ITruthToTrack*                m_truthToTrack         ;
-      const PRD_MultiTruthCollection   * m_truthTRT               ;    
-      std::string                        m_truth_locationTRT      ;
 
 #endif // DebugCode
       bool m_rejectInvalidTracks;
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx
index 599ef1261b16cd380f13b0f6e7678752972065b8..e15f0ddb9ce62e8b5d79836acec135741abe53f0 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.cxx
@@ -63,8 +63,6 @@ Trk::SimpleAmbiguityProcessorTool::SimpleAmbiguityProcessorTool(const std::strin
   m_validationTreeFolder("/val/AmbiProcessor"+n),
   m_validationTree(0),
   m_event(0),
-  m_trackSeedMap(0),
-  m_trackSeedMapLocation("TrackSeedMap"),
   m_trackTrackMap(0)
 #endif
 #ifdef SIMPLEAMBIGPROCDEBUGCODE
@@ -94,21 +92,24 @@ Trk::SimpleAmbiguityProcessorTool::SimpleAmbiguityProcessorTool(const std::strin
   declareProperty("pTminBrem"            , m_pTminBrem          = 1000.);
   declareProperty("etaBounds"            , m_etabounds,"eta intervals for internal monitoring");
 
+#ifdef SIMPLEAMBIGPROCNTUPLECODE
+  declareProperty("TrackSeedMap", m_trackSeedMapLocation = "TrackSeedMap");
+  declare(m_eventInfo_key = "EventInfo");
+#endif
+
 #ifdef SIMPLEAMBIGPROCDEBUGCODE
-  declareProperty("IsBackTracking"       , m_isBackTracking     = false);
-  declareProperty("TruthLocationTRT"       , m_truth_locationTRT     );  
-  declareProperty("ResolvedTrackConnection", m_resolvedTrackConnection = "SiSPS_ResolvedTrackConnection");
-  declareProperty("TruthCollection"        , m_truthCollection = "SiSPSeededTracksTruthCollection");
-  m_truth_locationTRT      = "PRD_MultiTruthTRT"              ;
+  declareProperty("ResolvedTrackConnection", m_resolvedTrackConnection="SiSPS_ResolvedTrackConnection");
+  declareProperty("TruthCollection", m_truthCollection="SiSPSeededTracksTruthCollection");
   //to get brem truth
-  m_generatedEventCollectionName = "TruthEvent"                ;
+  declareProperty("GeneratedEventCollection", m_generatedEventCollectionName="TruthEvent");
+  declare(m_write_resolvedTrackConnection);
 #endif
 
 #if defined SIMPLEAMBIGPROCNTUPLECODE || defined SIMPLEAMBIGPROCDEBUGCODE
-  declareProperty("TruthLocationSCT"       ,m_truth_locationSCT     );
-  declareProperty("TruthLocationPixel"     ,m_truth_locationPixel   );
-  m_truth_locationPixel    = "PRD_MultiTruthPixel"            ;
-  m_truth_locationSCT      = "PRD_MultiTruthSCT"              ;
+  declareProperty("IsBackTracking", m_isBackTracking=false);
+  declareProperty("TruthLocationPixel", m_truth_locationPixel="PRD_MultiTruthPixel");
+  declareProperty("TruthLocationSCT", m_truth_locationSCT="PRD_MultiTruthSCT");
+  declareProperty("TruthLocationTRT", m_truth_locationTRT="PRD_MultiTruthTRT");
 #endif
 
 
@@ -202,6 +203,11 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::initialize()
 
 #ifdef SIMPLEAMBIGPROCNTUPLECODE
 
+  ATH_CHECK(m_eventInfo_key.initialize());
+  m_has_trackSeedMap = m_trackSeedMapLocation.initialize().isSuccess();
+  if (!m_has_trackSeedMap)
+    ATH_MSG_DEBUG("Could not find TrackSeedMap, "
+		  "Seed validation needs to be run as well to have full output!");
   
   // retrieve the ParticleProperties handle
   if( m_particlePropSvc.retrieve().isFailure())
@@ -257,6 +263,14 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::initialize()
 #endif
 
 #ifdef SIMPLEAMBIGPROCDEBUGCODE
+  ATH_CHECK(m_generatedEventCollectionName.initialize());
+  ATH_CHECK(m_truthCollection.initialize());
+  m_has_resolvedTrackConnection = m_resolvedTrackConnection.initialize().isSuccess();
+  if (!m_has_resolvedTrackConnection) {
+    m_write_resolvedTrackConnection = m_resolvedTrackConnection.key();
+    ATH_CHECK(m_write_resolvedTrackConnection.initialize());
+  }
+
   // to get the brem truth
   IToolSvc* toolSvc;
   if ((sc=service("ToolSvc", toolSvc)).isFailure())  {
@@ -277,6 +291,12 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::initialize()
       return StatusCode::FAILURE;
     }
 #endif
+
+#if defined SIMPLEAMBIGPROCNTUPLECODE || defined SIMPLEAMBIGPROCDEBUGCODE
+  ATH_CHECK(m_truth_locationPixel.initialize());
+  ATH_CHECK(m_truth_locationSCT.initialize());
+  ATH_CHECK(m_truth_locationTRT.initialize());
+#endif
   
   return sc;
 }
@@ -461,157 +481,125 @@ TrackCollection*  Trk::SimpleAmbiguityProcessorTool::process(const TrackCollecti
   
   using namespace std;
 
+#if defined SIMPLEAMBIGPROCNTUPLECODE || defined SIMPLEAMBIGPROCDEBUGCODE
+  m_truthPIX = SG::makeHandle(m_truth_locationPixel);
+  m_truthSCT = SG::makeHandle(m_truth_locationSCT);
+  m_truthTRT = SG::makeHandle(m_truth_locationTRT);
+#endif
+
 #ifdef SIMPLEAMBIGPROCNTUPLECODE
-  const xAOD::EventInfo* eventInfo;
-  if (evtStore()->retrieve(eventInfo).isFailure()) 
-    msg(MSG::WARNING)<<"Could not get EventInfo object" << endmsg;  
-  else {
-    m_event = (int)eventInfo->eventNumber();
-  }
-  
-  m_truthPIX = 0;
-  m_truthSCT = 0;
-  // retrieve the multi-truth maps
-  if (evtStore()->contains<PRD_MultiTruthCollection>(m_truth_locationPixel) && evtStore()->retrieve(m_truthPIX,m_truth_locationPixel).isFailure())
-    msg(MSG::WARNING)<<"Could not find TruthPixel" << endmsg;  
-  
-  if (evtStore()->contains<PRD_MultiTruthCollection>(m_truth_locationSCT) && evtStore()->retrieve(m_truthSCT,m_truth_locationSCT).isFailure())
-    msg(MSG::WARNING)<<"Could not find TruthSCT" << endmsg;
-  
+  SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfo_key);
+  m_event = (int)eventInfo->eventNumber();
   
   m_trackBarcodeMap.clear();
   m_barcodeTrackMap.clear();
   // fill the truth maps
-  if (m_truthPIX && m_truthSCT){
     
-    TrackCollection::const_iterator trackIt    = tracks->begin();
-    TrackCollection::const_iterator trackItEnd = tracks->end();
+  TrackCollection::const_iterator trackIt    = tracks->begin();
+  TrackCollection::const_iterator trackItEnd = tracks->end();
     
-    for ( ; trackIt != trackItEnd ; ++trackIt)
-      {
-	std::map<int,int> barcodeOccurence;
-	std::map<int,const HepMC::GenParticle*> barcodeGenParticle;
-	int numhits         = 0;
-	int numbarcodes     = 0;
-	int numtruthlost    = 0;
-	int leadingbarcode  = 0;
-	int leadingnumhits  = 0;  
-	// prd iteration
-	const DataVector<const MeasurementBase>* measurements = (*trackIt)->measurementsOnTrack();
-	if (!measurements) continue;
-	DataVector<const MeasurementBase>::const_iterator rotIter    = measurements->begin();
-	DataVector<const MeasurementBase>::const_iterator rotIterEnd = measurements->end();
+  for ( ; trackIt != trackItEnd ; ++trackIt) {
+    std::map<int,int> barcodeOccurence;
+    std::map<int,const HepMC::GenParticle*> barcodeGenParticle;
+    int numhits         = 0;
+    int numbarcodes     = 0;
+    int numtruthlost    = 0;
+    int leadingbarcode  = 0;
+    int leadingnumhits  = 0;  
+    // prd iteration
+    const DataVector<const MeasurementBase>* measurements = (*trackIt)->measurementsOnTrack();
+    if (!measurements) continue;
+    DataVector<const MeasurementBase>::const_iterator rotIter    = measurements->begin();
+    DataVector<const MeasurementBase>::const_iterator rotIterEnd = measurements->end();
         
         
-	for ( ; rotIter != rotIterEnd; ++rotIter ){
-	  // get the prd from the ROT    
-	  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(*rotIter);
-	  if (!rot) continue;
-	  const Trk::PrepRawData* prd = (*rot).prepRawData();
-	  if (!prd) continue;
+    for ( ; rotIter != rotIterEnd; ++rotIter ){
+      // get the prd from the ROT    
+      const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(*rotIter);
+      if (!rot) continue;
+      const Trk::PrepRawData* prd = (*rot).prepRawData();
+      if (!prd) continue;
           
-	  // PIXEL / SCT
-	  const InDet::PixelCluster* pixCluster = dynamic_cast<const InDet::PixelCluster*>(prd);
-	  const InDet::SCT_Cluster*  sctCluster  = pixCluster ? 0 : dynamic_cast<const InDet::SCT_Cluster*>(prd);
-	  const InDet::SiCluster* siCluster = pixCluster;
-	  siCluster = siCluster ? siCluster : sctCluster;
-	  // get the right 
-	  const PRD_MultiTruthCollection* truthColll = pixCluster ? m_truthPIX : m_truthSCT;
-	  // one of the two worked
+      // PIXEL / SCT
+      const InDet::PixelCluster* pixCluster = dynamic_cast<const InDet::PixelCluster*>(prd);
+      const InDet::SCT_Cluster*  sctCluster  = pixCluster ? 0 : dynamic_cast<const InDet::SCT_Cluster*>(prd);
+      const InDet::SiCluster* siCluster = pixCluster;
+      siCluster = siCluster ? siCluster : sctCluster;
+      // get the right 
+      SG::ReadHandle<PRD_MultiTruthCollection> truthColll = pixCluster ? m_truthPIX : m_truthSCT;
+      // one of the two worked
           
-	  if (siCluster){
+      if (siCluster){
 	    
-	    ++numhits;            
-	    // get the rdo list and loop over it
-	    const std::vector<Identifier>& rdoList = siCluster->rdoList();
-	    std::vector<Identifier>::const_iterator rdoIter    = rdoList.begin();
-	    std::vector<Identifier>::const_iterator rdoIterEnd = rdoList.end();
+	++numhits;            
+	// get the rdo list and loop over it
+	const std::vector<Identifier>& rdoList = siCluster->rdoList();
+	std::vector<Identifier>::const_iterator rdoIter    = rdoList.begin();
+	std::vector<Identifier>::const_iterator rdoIterEnd = rdoList.end();
             
-	    for ( ; rdoIter != rdoIterEnd; ++rdoIter ){
-	      // find the GenParticle link : Pixels                                
-	      PRD_MultiTruthCollection::const_iterator hmcpIt      = m_truthPIX->end();
-	      std::pair<PRD_MultiTruthCollection::const_iterator, PRD_MultiTruthCollection::const_iterator> itpixRange = truthColll->equal_range(*rdoIter);
-	      for ( hmcpIt = itpixRange.first; hmcpIt != itpixRange.second; ++hmcpIt){
-		// get the HepMCParticleLink
-		HepMcParticleLink pLink = hmcpIt->second;
-		// get vertex and direction
-		const HepMC::GenParticle* particle = pLink.cptr();
-		if (particle){
-		  // get the particle barcode
-		  int barcode = particle->barcode();
-		  std::map<int,int>::iterator bcuIter = barcodeOccurence.find(barcode);
-		  if (barcode && bcuIter == barcodeOccurence.end()) {
-		    barcodeOccurence.insert(std::make_pair<int,int>(barcode,1));
-		    barcodeGenParticle.insert(std::make_pair<int,const HepMC::GenParticle*>(barcode,particle));
-		  }
-		  else if (barcode) ++barcodeOccurence[barcode];
-		  else ++numtruthlost; 
-		} else ++numtruthlost;
+	for ( ; rdoIter != rdoIterEnd; ++rdoIter ){
+	  // find the GenParticle link : Pixels                                
+	  PRD_MultiTruthCollection::const_iterator hmcpIt      = m_truthPIX->end();
+	  std::pair<PRD_MultiTruthCollection::const_iterator, PRD_MultiTruthCollection::const_iterator> itpixRange = truthColll->equal_range(*rdoIter);
+	  for ( hmcpIt = itpixRange.first; hmcpIt != itpixRange.second; ++hmcpIt){
+	    // get the HepMCParticleLink
+	    HepMcParticleLink pLink = hmcpIt->second;
+	    // get vertex and direction
+	    const HepMC::GenParticle* particle = pLink.cptr();
+	    if (particle){
+	      // get the particle barcode
+	      int barcode = particle->barcode();
+	      std::map<int,int>::iterator bcuIter = barcodeOccurence.find(barcode);
+	      if (barcode && bcuIter == barcodeOccurence.end()) {
+		barcodeOccurence.insert(std::make_pair(barcode,1));
+		barcodeGenParticle.insert(std::make_pair(barcode,particle));
+	      }
+	      else if (barcode) ++barcodeOccurence[barcode];
+	      else ++numtruthlost; 
+	    } else ++numtruthlost;
                 
-	      } // loop over GenParticles
-	    } // loop over rdos
-	  } // siCluster check 
-	} // prd Loop
-	numbarcodes = barcodeOccurence.size();
-	std::map<int,int>::iterator bcIter    = barcodeOccurence.begin();
-	std::map<int,int>::iterator bcIterEnd = barcodeOccurence.end();
-	for ( ; bcIter != bcIterEnd; ++bcIter){
-	  if ( (*bcIter).second > leadingnumhits ){
-	    leadingnumhits = (*bcIter).second;
-	    leadingbarcode = (*bcIter).first;
-	  }
-	}
-	if (leadingbarcode){
-	  // get the charge and the truth pt
-	  const HepMC::GenParticle* particle = barcodeGenParticle[leadingbarcode];
-	  m_pT_mc = particle ?  particle->momentum().perp() : 0.;
+	  } // loop over GenParticles
+	} // loop over rdos
+      } // siCluster check 
+    } // prd Loop
+    numbarcodes = barcodeOccurence.size();
+    std::map<int,int>::iterator bcIter    = barcodeOccurence.begin();
+    std::map<int,int>::iterator bcIterEnd = barcodeOccurence.end();
+    for ( ; bcIter != bcIterEnd; ++bcIter){
+      if ( (*bcIter).second > leadingnumhits ){
+	leadingnumhits = (*bcIter).second;
+	leadingbarcode = (*bcIter).first;
+      }
+    }
+    if (leadingbarcode){
+      // get the charge and the truth pt
+      const HepMC::GenParticle* particle = barcodeGenParticle[leadingbarcode];
+      m_pT_mc = particle ?  particle->momentum().perp() : 0.;
           
-	  int pdgCode = particle->pdg_id();
-	  int absPdgCode = abs(pdgCode);
+      int pdgCode = particle->pdg_id();
+      int absPdgCode = abs(pdgCode);
           
-	  // get the charge: ap->charge() is used later
-	  const HepPDT::ParticleData* ap =  m_particleDataTable->particle( absPdgCode);
-	  if( ap) m_charge_mc = ap->charge();
-	  // since the PDT table only has abs(PID) values for the charge
-	  m_charge_mc *= (pdgCode > 0.) ?  1. : -1.;
-	}
-	// create the stat object
-	TrackBarcodeStats tbcStats;
-	tbcStats.numhits        =  numhits       ;
-	tbcStats.numbarcodes    =  numbarcodes   ;
-	tbcStats.numtruthlost   =  numtruthlost  ;
-	tbcStats.leadingbarcode =  leadingbarcode;
-	tbcStats.leadingnumhits =  leadingnumhits;
-	// create the map entries
-	m_trackBarcodeMap.insert(std::make_pair<const Trk::Track*,TrackBarcodeStats>(*trackIt,tbcStats));
-	m_barcodeTrackMap.insert(std::make_pair<int,const Trk::Track*>(leadingbarcode,*trackIt));
+      // get the charge: ap->charge() is used later
+      const HepPDT::ParticleData* ap =  m_particleDataTable->particle( absPdgCode);
+      if( ap) m_charge_mc = ap->charge();
+      // since the PDT table only has abs(PID) values for the charge
+      m_charge_mc *= (pdgCode > 0.) ?  1. : -1.;
+    }
+    // create the stat object
+    TrackBarcodeStats tbcStats;
+    tbcStats.numhits        =  numhits       ;
+    tbcStats.numbarcodes    =  numbarcodes   ;
+    tbcStats.numtruthlost   =  numtruthlost  ;
+    tbcStats.leadingbarcode =  leadingbarcode;
+    tbcStats.leadingnumhits =  leadingnumhits;
+    // create the map entries
+    m_trackBarcodeMap.insert(std::make_pair(*trackIt,tbcStats));
+    m_barcodeTrackMap.insert(std::make_pair(leadingbarcode,*trackIt));
         
-      } // track loop
-    
-  } // MC case
+  } // track loop
   
 #endif
   
-#ifdef SIMPLEAMBIGPROCDEBUGCODE
-  StatusCode sc1;
-  
-  m_truthPIX  = 0;
-  m_truthSCT  = 0;
-  m_truthTRT  = 0;
-  
-  sc1 = evtStore()->retrieve(m_truthPIX,m_truth_locationPixel);
-  if (sc1.isFailure()) 
-    msg(MSG::WARNING)<<"Could not find TruthPixel"<<endmsg;  
-  
-  sc1 = evtStore()->retrieve(m_truthSCT,m_truth_locationSCT);
-  if (sc1.isFailure()) 
-    msg(MSG::WARNING)<<"Could not find TruthSCT"<<endmsg;
-
-  sc1 = evtStore()->retrieve(m_truthTRT,m_truth_locationTRT);
-  if (sc1.isFailure()) 
-    msg(MSG::FATAL)<<"Could not find TruthTRT"<<endmsg;
-#endif
-  
   ++m_Nevents; // statistics
 
   // clear all caches etc.
@@ -678,15 +666,7 @@ void Trk::SimpleAmbiguityProcessorTool::addNewTracks(const TrackCollection* trac
   TrackCollection::const_iterator trackItEnd = tracks->end();
 
 #ifdef SIMPLEAMBIGPROCNTUPLECODE          
-  if (!evtStore()->contains<TrackSeedMap>(m_trackSeedMapLocation)){
-    msg(MSG::DEBUG)<<"Could not find TrackSeedMap, Seed validation needs to be run as well to have full output!" << endmsg;
-    m_trackSeedMap = 0;	
-  } else if (evtStore()->retrieve(m_trackSeedMap,m_trackSeedMapLocation).isFailure()){
-    msg(MSG::WARNING)<<"Could not retrieve TrackSeedMap" << endmsg;		
-    m_trackSeedMap = 0;	
-  } else{
-    msg(MSG::DEBUG)<<"Retrieved TrackSeedMap" << endmsg;	
-  }
+
   if (m_trackTrackMap) delete m_trackTrackMap;
   m_trackTrackMap = new  std::map<const Trk::Track* , Trk::Track*> ;
 #endif
@@ -740,8 +720,8 @@ void Trk::SimpleAmbiguityProcessorTool::addNewTracks(const TrackCollection* trac
       // only if seed map has been found
       m_nseeds = 0;
       
-      if ( m_trackSeedMap ){
-	pair< TrackSeedMap::iterator,TrackSeedMap::iterator > seeds = m_trackSeedMap->equal_range((*trackIt));
+      if ( m_has_trackSeedMap ){
+	pair< TrackSeedMap::const_iterator,TrackSeedMap::const_iterator > seeds = m_trackSeedMap->equal_range((*trackIt));
 	TrackSeedMap::const_iterator tsmIter = seeds.first;
 	TrackSeedMap::const_iterator tsmIterEnd = seeds.second;
         
@@ -999,14 +979,14 @@ void Trk::SimpleAmbiguityProcessorTool::solveTracks()
 	  
 	  m_nseeds = 0;
 	  
-	  if (m_trackSeedMap) {
+	  if (m_has_trackSeedMap) {
 	    // find the original track
 	    std::map<const Trk::Track* , Trk::Track*>::iterator iter;
 	    const Trk::Track * tmpTrack = itnext->second.first;
 	    while((iter = m_trackTrackMap->find(tmpTrack)) != m_trackTrackMap->end()){
 	      tmpTrack = iter->second;
 	    }
-	    pair< TrackSeedMap::iterator,TrackSeedMap::iterator > seeds = m_trackSeedMap->equal_range((tmpTrack));
+	    pair< TrackSeedMap::const_iterator,TrackSeedMap::const_iterator > seeds = m_trackSeedMap->equal_range((tmpTrack));
             
 	    TrackSeedMap::const_iterator tsmIter = seeds.first;
 	    TrackSeedMap::const_iterator tsmIterEnd = seeds.second;
@@ -1413,11 +1393,7 @@ void Trk::SimpleAmbiguityProcessorTool::findTrueTracks(const TrackCollection* re
   m_tracksShared.clear();
 
   msg(MSG::DEBUG) << "Acessing TrackTruthCollection " << endmsg;
-  const TrackTruthCollection* truthMap  = 0;
-  if (evtStore()->retrieve(truthMap , m_truthCollection).isFailure()) 
-    msg(MSG::WARNING) << "No truth map present, abort TrueTrack search" << endmsg;
-
-
+  SG::ReadHandle<TrackTruthCollection> truthMap(m_truthCollection);
   
   std::map<int,std::pair<float,const Trk::Track*> > barcodeMap;
   float minProb =0.95;
@@ -1484,36 +1460,28 @@ void Trk::SimpleAmbiguityProcessorTool::keepTrackOfTracks(const Trk::Track* oldT
 
 void Trk::SimpleAmbiguityProcessorTool::produceInputOutputConnection()
 {
-
-
-  const TrackCollectionConnection* dmp;
-  if (evtStore()->retrieve(dmp, m_resolvedTrackConnection).isFailure())
-    {
-      // output map: SiSpSeededTrack, ResolvedTrack  
-      TrackCollectionConnection* siSP_ResolvedConnection = new TrackCollectionConnection();
+  if (!m_has_resolvedTrackConnection) {
+    // output map: SiSpSeededTrack, ResolvedTrack  
+    TrackCollectionConnection siSP_ResolvedConnection;
       
-      TrackCollection::const_iterator  itFinal = m_finalTracks->begin();
-      TrackCollection::const_iterator endFinal = m_finalTracks->end();
-      for ( ; itFinal != endFinal ; ++itFinal)
-	{
-	  std::map<const Trk::Track*, const Trk::Track*>::iterator pos = m_trackHistory.find(*itFinal);
-	  while (pos->first != pos->second && pos != m_trackHistory.end())
-	    pos = m_trackHistory.find(pos->second);
-	  
-	  if (pos == m_trackHistory.end())
-	    msg(MSG::ERROR) << "Track not found in history" << endmsg;
-	  else
-	    siSP_ResolvedConnection->insert(std::make_pair(pos->second,*itFinal));
+    TrackCollection::const_iterator  itFinal = m_finalTracks->begin();
+    TrackCollection::const_iterator endFinal = m_finalTracks->end();
+    for ( ; itFinal != endFinal ; ++itFinal)
+    {
+      std::map<const Trk::Track*, const Trk::Track*>::iterator pos = m_trackHistory.find(*itFinal);
+      while (pos->first != pos->second && pos != m_trackHistory.end())
+	pos = m_trackHistory.find(pos->second);
 	  
-	}
-      
-      StatusCode sc = evtStore()->record(siSP_ResolvedConnection, m_resolvedTrackConnection,false);
-      
-      if (sc.isFailure())
-	msg(MSG::ERROR) << "Could not record trackCollectionConnecton" << endmsg;
+      if (pos == m_trackHistory.end())
+	msg(MSG::ERROR) << "Track not found in history" << endmsg;
       else
-	msg(MSG::VERBOSE) << "Saved "<<siSP_ResolvedConnection->size()<<" track collection connections"<<endmsg; 
+	siSP_ResolvedConnection.insert(std::make_pair(pos->second,*itFinal));
+	  
     }
+
+    SG::WriteHandle<TrackCollectionConnection> h_write(m_write_resolvedTrackConnection);
+    h_write.record(std::make_unique<TrackCollectionConnection>(siSP_ResolvedConnection));
+  }
 }
 //============================================================================================
 
@@ -1639,7 +1607,7 @@ void Trk::SimpleAmbiguityProcessorTool::tsosTruth(const Trk::Track* track){
   DataVector<const TrackStateOnSurface>::const_iterator iTsos    = tsos->begin();
   DataVector<const TrackStateOnSurface>::const_iterator iTsosEnd = tsos->end();   
   for(; iTsos != iTsosEnd; ++iTsos){
-    msg(MSG::INFO)<< "the type of " << *iTsos << " is "<< (*iTsos)->type() << endmsg;
+    msg(MSG::INFO)<< "the type of " << *iTsos << " is "<< (*iTsos)->dumpType() << endmsg;
     const FitQualityOnSurface* fq = (*iTsos)->fitQualityOnSurface();
     if (fq)
       msg(MSG::INFO)<< "the chi2 of " << *iTsos << " is "<< fq->chiSquared() << endmsg;
@@ -1665,14 +1633,8 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::getBremTruth(){
   StatusCode sc;
   
   // Retrieve McEventCollection from StoreGate
-  const McEventCollection* mcEventCollection = 0;
-  
-  sc = evtStore()->retrieve( mcEventCollection, m_generatedEventCollectionName );
-  
-  if ( sc.isFailure() ){
-    return StatusCode::FAILURE;
-  }
-  
+  SG::ReadHandle<McEventCollection> mcEventCollection(m_generatedEventCollectionName);
+
   // Loop over all events in StoreGate
   McEventCollection::const_iterator event = mcEventCollection->begin();
   
@@ -1716,7 +1678,7 @@ StatusCode Trk::SimpleAmbiguityProcessorTool::getBremTruth(){
   return StatusCode::SUCCESS;
 }
 //======================================================================================================
-const double Trk::SimpleAmbiguityProcessorTool::originalMomentum( const HepMC::GenEvent* genEvent )
+double Trk::SimpleAmbiguityProcessorTool::originalMomentum( const HepMC::GenEvent* genEvent )
 {
 
   // Loop over all particles in the event (info on this from GenEvent documentation)
@@ -1730,8 +1692,8 @@ const double Trk::SimpleAmbiguityProcessorTool::originalMomentum( const HepMC::G
   //  msg(MSG::WARNING) << "Inconsistency between initial particle and initial vertex" << endmsg;
 
   //Hep3Vector& initial3Momentum = initialParticle->momentum();
- 
-  double initialMomentum = initialParticle->momentum().mag();
+
+  double initialMomentum = initialParticle->momentum().perp();
 
   //  const Trk::TrackParameters* initialPerigeeParameters = m_truthToTrack->makePerigeeParameters(initialParticle);
 
@@ -1739,7 +1701,7 @@ const double Trk::SimpleAmbiguityProcessorTool::originalMomentum( const HepMC::G
 
 }
 //==================================================================================================
-const double Trk::SimpleAmbiguityProcessorTool::momentumLostByBrem( const HepMC::GenEvent* genEvent ) const
+double Trk::SimpleAmbiguityProcessorTool::momentumLostByBrem( const HepMC::GenEvent* genEvent ) const
 {
 
  
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h
index 09a014dd24d89c979cd7aaad0bcc68b463b7bd0a..5e405cc4532e650e40e95e3c748c2cdd1b972eb6 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/SimpleAmbiguityProcessorTool.h
@@ -26,15 +26,24 @@
 
 #ifdef SIMPLEAMBIGPROCDEBUGCODE
 // --------------- DEBUG CODE
+#include "GeneratorObjects/McEventCollection.h"
+#include "CLHEP/Geometry/Point3D.h"
+typedef HepGeom::Point3D<double> HepPoint3D;
+#include "TrkTruthData/TrackTruthCollection.h"
+#include "xAODEventInfo/EventInfo.h"
 #include "HepMC/GenEvent.h"
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
      typedef std::map<const Trk::Track*, const Trk::Track*> TrackCollectionConnection;
+#ifndef SIMPLEAMBIGPROCDEBUGCODE_CLASS_DEF
+#define SIMPLEAMBIGPROCDEBUGCODE_CLASS_DEF
      CLASS_DEF( TrackCollectionConnection , 148639440 , 1 )
+#endif
 
 #endif
 
 #ifdef SIMPLEAMBIGPROCNTUPLECODE
 // --------------- DEBUG CODE
+#include "xAODEventInfo/EventInfo.h"
 #include "TrkTruthData/PRD_MultiTruthCollection.h"
 #include "GaudiKernel/ServiceHandle.h"
 #include "GaudiKernel/IPartPropSvc.h"
@@ -194,16 +203,20 @@ namespace Trk {
 //==================================================================================================
 
 #if defined SIMPLEAMBIGPROCNTUPLECODE || defined SIMPLEAMBIGPROCDEBUGCODE
-  const PRD_MultiTruthCollection   * m_truthPIX;
-  const PRD_MultiTruthCollection   * m_truthSCT;  
-  std::string                        m_truth_locationPixel    ;
-  std::string                        m_truth_locationSCT      ;  
+      SG::ReadHandleKey<PRD_MultiTruthCollection> m_truth_locationPixel;
+      SG::ReadHandle<PRD_MultiTruthCollection> m_truthPIX;
+      SG::ReadHandleKey<PRD_MultiTruthCollection> m_truth_locationSCT;
+      SG::ReadHandle<PRD_MultiTruthCollection> m_truthSCT;
+      SG::ReadHandleKey<PRD_MultiTruthCollection> m_truth_locationTRT;
+      SG::ReadHandle<PRD_MultiTruthCollection> m_truthTRT;
+
+      bool m_isBackTracking;
 #endif
 
 #ifdef SIMPLEAMBIGPROCNTUPLECODE
       
       /** determine if the ambiguity processor is being used for back tracking */
-      bool m_isBackTracking;
+      SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo_key;
     
       std::map<const Trk::Track*, TrackBarcodeStats>   m_trackBarcodeMap;
       std::multimap<int,const Trk::Track*>             m_barcodeTrackMap;
@@ -247,8 +260,9 @@ namespace Trk {
       mutable int                           m_leadingnumhits;
       mutable int                           m_barcodeDuplicates;    
       
-      mutable Trk::TrackSeedMap	*           m_trackSeedMap;
-      std::string			    m_trackSeedMapLocation;
+      SG::ReadHandle<Trk::TrackSeedMap> m_trackSeedMap;
+      SG::ReadHandleKey<Trk::TrackSeedMap> m_trackSeedMapLocation;
+      bool m_has_trackSeedMap;
       
       mutable int			    m_nseeds;
       mutable int                           m_seeds[MAXSEEDSPERTRACK];
@@ -262,6 +276,12 @@ namespace Trk {
 
     private:
 
+      SG::ReadHandleKey<McEventCollection> m_generatedEventCollectionName;
+      SG::ReadHandleKey<TrackTruthCollection> m_truthCollection;
+      SG::ReadHandleKey<TrackCollectionConnection> m_resolvedTrackConnection;
+      bool m_has_resolvedTrackConnection;
+      SG::WriteHandleKey<TrackCollectionConnection> m_write_resolvedTrackConnection;
+
       std::set<const Trk::Track*> m_trueTracks;
       std::map<const Trk::Track*, const Trk::Track*> m_trackHistory;
 
@@ -269,8 +289,6 @@ namespace Trk {
       void keepTrackOfTracks(const Trk::Track* oldTrack, const Trk::Track* newTrack);
       void produceInputOutputConnection();
  
-      std::string m_resolvedTrackConnection;
-      std::string m_truthCollection;
       int n_trueFitFails;
       int n_fitFails;
       int numOutliersDiff;
@@ -296,17 +314,13 @@ namespace Trk {
       std::map<const Trk::PrepRawData*, const Trk::Track*> m_tracksShared;
 
       StatusCode getBremTruth();
-      const double originalMomentum( const HepMC::GenEvent* genEvent );
-      const double momentumLostByBrem( const HepMC::GenEvent* genEvent ) const;
+      double originalMomentum( const HepMC::GenEvent* genEvent );
+      double momentumLostByBrem( const HepMC::GenEvent* genEvent ) const;
       const std::vector<double> fractionOfIncidentMomentumLostPerVertex( const HepMC::GenEvent* genEvent ) const;
       const std::vector<HepPoint3D> positionsOfBremVertices( const HepMC::GenEvent* genEvent ) const;
       bool vertexAssociatedWithOriginalTrack( HepMC::GenVertex* genVertex) const;
 
-      std::string                        m_generatedEventCollectionName; 
       Trk::ITruthToTrack*                m_truthToTrack         ;
-      const PRD_MultiTruthCollection   * m_truthTRT               ;    
-      std::string                        m_truth_locationTRT      ;
-
 #endif // DebugCode
 	
     };
diff --git a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.cxx b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.cxx
index d516323c3db9bb453a59b78c65f3d3f8a23201f4..18cf1bee0f6800754294430850094e2fdad52def 100644
--- a/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.cxx
+++ b/Tracking/TrkTools/TrkAmbiguityProcessor/src/TrackScoringTool.cxx
@@ -31,8 +31,8 @@ Trk::TrackScoringTool::TrackScoringTool(const std::string& t,
 	m_summaryTypeScore[Trk::numberOfPixelSharedHits]      = -10;  // a shared hit is only half the weight
 	m_summaryTypeScore[Trk::numberOfPixelHoles]	      = -10;  // a hole is bad
 
-	m_summaryTypeScore[Trk::numberOfBLayerHits]	      =  10;  // addition for being b-layer
-	m_summaryTypeScore[Trk::numberOfBLayerSharedHits]     =  -5;  // a shared hit is only half the weight
+	m_summaryTypeScore[Trk::numberOfInnermostPixelLayerHits]	      =  10;  // addition for being b-layer
+	m_summaryTypeScore[Trk::numberOfInnermostPixelLayerSharedHits]     =  -5;  // a shared hit is only half the weight
 
 	m_summaryTypeScore[Trk::numberOfGangedPixels]	      =  -5;  // decrease for being ganged
 
diff --git a/Tracking/TrkTools/TrkCompetingRIOsOnTrackTool/doc/packagedoc.h b/Tracking/TrkTools/TrkCompetingRIOsOnTrackTool/doc/packagedoc.h
index 59a2a97d26bc748aa8f0c6350d31ad7f29c93f8d..ac6b377bee377ecba78d1d1399fc850445cdba43 100644
--- a/Tracking/TrkTools/TrkCompetingRIOsOnTrackTool/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkCompetingRIOsOnTrackTool/doc/packagedoc.h
@@ -25,14 +25,4 @@ This package contains the tools to create Trk::CompetingRIOsOnTrack. This includ
   
 @section TrkCompetingRIOsOnTrackTool_ExtrasTrkCompetingRIOsOnTrackTool Extra Pages
 
- - @ref UsedTrkCompetingRIOsOnTrackTool
- - @ref requirementsTrkCompetingRIOsOnTrackTool
-*/
-
-/**
-@page UsedTrkCompetingRIOsOnTrackTool Used Packages
-*/
-
-/**
-@page requirementsTrkCompetingRIOsOnTrackTool Requirements
 */
diff --git a/Tracking/TrkTools/TrkMeasurementUpdator/doc/packagedoc.h b/Tracking/TrkTools/TrkMeasurementUpdator/doc/packagedoc.h
index 94e4f2aef235c00d7f4f0d457f65dac0f45e6b9e..f3c9777307eec3c42ef9c496e7474133e56fd652 100644
--- a/Tracking/TrkTools/TrkMeasurementUpdator/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkMeasurementUpdator/doc/packagedoc.h
@@ -34,15 +34,4 @@ R. Fruehwirth, et al., <i>Data Analysis Techniques for High-Energy Physics</i>,
 
 @section TrkMeasurementUpdator_ExtrasTrkMeasurementUpdator Extra Pages
 
- - @ref UsedTrkMeasurementUpdator
- - @ref requirementsTrkMeasurementUpdator
 */
-
-/**
-@page UsedTrkMeasurementUpdator Used Packages
-*/
-
-/**
-@page requirementsTrkMeasurementUpdator Requirements
-*/
-
diff --git a/Tracking/TrkTools/TrkMeasurementUpdator_xk/doc/packagedoc.h b/Tracking/TrkTools/TrkMeasurementUpdator_xk/doc/packagedoc.h
index 6e3097b5fa46ca60d627abdf1582165c99452063..dbb589a48e8230728e5ca5c9cf3e8afb6efcdbe8 100644
--- a/Tracking/TrkTools/TrkMeasurementUpdator_xk/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkMeasurementUpdator_xk/doc/packagedoc.h
@@ -34,15 +34,4 @@ R. Fruehwirth, et al., <i>Data Analysis Techniques for High-Energy Physics</i>,
 
 @section TrkMeasurementUpdator_xk_ExtrasTrkMeasurementUpdatorXK Extra Pages
 
- - @ref UsedTrkMeasurementUpdatorXK
- - @ref requirementsTrkMeasurementUpdatorXK
 */
-
-/**
-@page UsedTrkMeasurementUpdatorXK Used Packages
-*/
-
-/**
-@page requirementsTrkMeasurementUpdatorXK Requirements
-*/
-
diff --git a/Tracking/TrkTools/TrkParticleCreator/doc/packagedoc.h b/Tracking/TrkTools/TrkParticleCreator/doc/packagedoc.h
index e6a78b622f3b00016de0a0388925f0e42495d1a0..796a2f7d161b1ae5279285b149c4cf4286d3e158 100644
--- a/Tracking/TrkTools/TrkParticleCreator/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkParticleCreator/doc/packagedoc.h
@@ -11,8 +11,4 @@
 This package contains the Trk::ParticleCreatorTool which is used (mainly) by the InDet::ParticleCreator of the
 package InDetParticleCreation to construct Rec::TrackParticle objects.
 
-@section TrkParticleCreator_UsedPackages 
-
-@section TrkParticleCreator_Requirements 
-
 */
diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h b/Tracking/TrkTools/TrkRIO_OnTrackCreator/TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h
index 7f9f4efc12b9e96e67faf8596eed84dd86524e2f..81c75565e82b20db2df65e48f027e28566c09a92 100755
--- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h
+++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/TrkRIO_OnTrackCreator/RIO_OnTrackErrorScalingTool.h
@@ -21,6 +21,9 @@
 #include "TrkToolInterfaces/IRIO_OnTrackErrorScalingTool.h"
 #include "EventPrimitives/EventPrimitives.h"
 
+#include "StoreGate/ReadHandleKey.h"
+#include "xAODEventInfo/EventInfo.h"
+
 class PixelID;
 
 namespace Trk {
@@ -201,6 +204,9 @@ namespace Trk {
 
     //! conditions data handling: call-back entry to re-set scaling parameters when an IOV is new or changed.
     StatusCode callback( IOVSVC_CALLBACK_ARGS );
+
+    SG::ReadHandleKey<xAOD::EventInfo> m_readKey;
+
   };
 
   ///////////////////////////////////////////////////////////////////
diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/doc/packagedoc.h b/Tracking/TrkTools/TrkRIO_OnTrackCreator/doc/packagedoc.h
index 02d089e8e3cf3b0493cd96eaec9ea2b6c4a57387..a1d1c11eed4b210d27cc982b20ae1faa9860b7e8 100644
--- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/doc/packagedoc.h
@@ -193,14 +193,4 @@ This tool is operation since ATLAS offline release 8.3.0.
 
 @section TrkRIO_OnTrackCreator_ExtrasTrkRotCreator Extra Pages
 
- - @ref UsedTrkRotCreator
- - @ref RequirementsTrkRotCreator
-*/
-
-/**
-@page UsedTrkRotCreator Used Packages
-*/
-
-/**
-@page RequirementsTrkRotCreator Requirements
 */
diff --git a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx
index c263255a1309e867caca8ca1ad64ec2d57a41715..4e1f2525a9fe1ef61ec8ad448a98501847a239df 100755
--- a/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx
+++ b/Tracking/TrkTools/TrkRIO_OnTrackCreator/src/RIO_OnTrackErrorScalingTool.cxx
@@ -19,8 +19,6 @@
 #include "AthenaKernel/errorcheck.h"
 #include "InDetIdentifier/PixelID.h"
 
-#include "xAODEventInfo/EventInfo.h"
-
 #include <cmath>
 #include <stdexcept>
 #include <sstream>
@@ -90,7 +88,8 @@ Trk::RIO_OnTrackErrorScalingTool::RIO_OnTrackErrorScalingTool(const std::string&
      m_override_mu_term_trt_ecs(0.0),
      m_IncidentSvc("IncidentSvc",n),
      m_idFolder("/Indet/TrkErrorScaling"),
-     m_muonFolder("/MUON/TrkErrorScaling")
+     m_muonFolder("/MUON/TrkErrorScaling"),
+     m_readKey("EventInfo")
  {
    declareInterface<IRIO_OnTrackErrorScalingTool>(this);
    declareProperty("overrideDatabaseID",m_override_database_id_errors,"inflate ID errors by multiplicative scale factor, overriding any database values");
@@ -117,6 +116,7 @@ Trk::RIO_OnTrackErrorScalingTool::RIO_OnTrackErrorScalingTool(const std::string&
    declareProperty("overrideMuTRTBar",m_override_mu_term_trt_bar,"factor to change the mu dependent term of TRT errors (barrel)");
    declareProperty("overrideMuTRTECs",m_override_mu_term_trt_ecs,"factor to change the mu dependent term of TRT errors (endcaps)");
    declareProperty("IncidentService",m_IncidentSvc);
+   declareProperty("EventInfoKey",m_readKey);
    m_scaling_pix.resize(kNPixParamTypes);
 
    m_mu = 0;
@@ -234,6 +234,8 @@ StatusCode Trk::RIO_OnTrackErrorScalingTool::initialize()
     m_do_rpc = false;
     m_do_csc = false;
   }
+  
+  ATH_CHECK( m_readKey.initialize() );
 
   msg(MSG::INFO) << "initialize successful in " << name() << endmsg;
   return StatusCode::SUCCESS;
@@ -440,8 +442,8 @@ Trk::RIO_OnTrackErrorScalingTool::createScaledTrtCovariance
   (const Amg::MatrixX& inputCov, bool is_endcap) const
 {
   if(!m_hasBeenCalledThisEvent){
-    const xAOD::EventInfo* eventInfo;
-    if( evtStore()->retrieve(eventInfo).isFailure() ){
+    SG::ReadHandle< xAOD::EventInfo>  eventInfo (m_readKey);
+    if (!eventInfo.isValid()) {
       ATH_MSG_ERROR("Cant retrieve EventInfo"); m_mu = 0;
     } else {
       m_mu = eventInfo->averageInteractionsPerCrossing();
diff --git a/Tracking/TrkTools/TrkResidualPullCalculator/doc/packagedoc.h b/Tracking/TrkTools/TrkResidualPullCalculator/doc/packagedoc.h
index d0eb80deddd4353e957bf5b6dc94b0dba451fb7c..babb1a2acaac3e7fa9b39819377d71fda18ef387 100644
--- a/Tracking/TrkTools/TrkResidualPullCalculator/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkResidualPullCalculator/doc/packagedoc.h
@@ -15,18 +15,9 @@
   account by calling tools in the sub-detector realm.
   See details with Trk::IResidualPullCalculator interface description
 
-*/
 @section TrkResidualPullCalculator_TrkResidualPullCalculatorExtras Extra Pages
 
  - @ref TrkResidualPullCalculatorUsed
  - @ref TrkResidualPullCalculatorReqs
  
 */
-
-/**
-@page TrkResidualPullCalculatorUsed Used Packages
-*/
-
-/**
-@page TrkResidualPullCalculatorReqs Requirements
-*/
diff --git a/Tracking/TrkTools/TrkSegmentConverter/doc/packagedoc.h b/Tracking/TrkTools/TrkSegmentConverter/doc/packagedoc.h
index 2be27f3cf476a4def2a16664c3c9899b9d18aab2..ba76b97171a4778f4cc6df2422ae67fb7c954a76 100644
--- a/Tracking/TrkTools/TrkSegmentConverter/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkSegmentConverter/doc/packagedoc.h
@@ -11,7 +11,6 @@ This package implements the SegmentConverter interface. It uses a TrackFitter to
 @author Christian Schmitt <Christian.Schmitt@cern.ch>
 
 
-@section TrkSegmentConverter_TrkSegmentConverterReq Requirements
 
 
 */
diff --git a/Tracking/TrkTools/TrkToolInterfaces/doc/packagedoc.h b/Tracking/TrkTools/TrkToolInterfaces/doc/packagedoc.h
index fecacaa2d0ac5ccf5c119126b5555885d8ecf451..5c9725b9b077b812c8d26737aa2e75ecc48a178e 100644
--- a/Tracking/TrkTools/TrkToolInterfaces/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkToolInterfaces/doc/packagedoc.h
@@ -51,15 +51,4 @@ This package is not built as any library, it is a simple include package.
 
 @section TrkToolInterfaces_ExtrasTrkToolInterfaces Extra Pages
 
- - @ref UsedTrkToolInterfaces
- - @ref requirementsTrkToolInterfaces
 */
-
-/**
-@page UsedTrkToolInterfaces Used Packages
-*/
-
-/**
-@page requirementsTrkToolInterfaces Requirements
-*/
-
diff --git a/Tracking/TrkTools/TrkTrackSlimmingTool/doc/packagedoc.h b/Tracking/TrkTools/TrkTrackSlimmingTool/doc/packagedoc.h
index 54400745f97ccbec4440f16e4cd6549ad4190991..064f6c957762968f0722167824661df521f96d0c 100644
--- a/Tracking/TrkTools/TrkTrackSlimmingTool/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkTrackSlimmingTool/doc/packagedoc.h
@@ -40,15 +40,4 @@ storage.
 
 @section TrkTrackSlimmingTool_ExtrasTrkSlimmingTool Extra Pages
 
- - @ref UsedTrkTrackSlimmingTool
- - @ref requirementsTrkTrackSlimmingTool
 */
-
-/**
-@page UsedTrkTrackSlimmingTool Used Packages
-*/
-
-/**
-@page requirementsTrkTrackSlimmingTool Requirements
-*/
-
diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
index 82874f3a979ec7578eb79e015c08469d84b38748..a20cc21e4275b0dcb9579a2b398799855b7bc644 100755
--- a/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx
@@ -212,8 +212,6 @@ Trk::TrackSummaryTool::createSummary( const Track& track,
     if (m_pixelExists)
     {
       information [numberOfContribPixelLayers]   = 0; 
-      information [numberOfBLayerHits]           = 0;
-      information [numberOfBLayerOutliers]       = 0;
       information [numberOfInnermostPixelLayerHits] = 0;
       information [numberOfInnermostPixelLayerOutliers] = 0;
       information [numberOfNextToInnermostPixelLayerHits] = 0;
@@ -225,7 +223,6 @@ Trk::TrackSummaryTool::createSummary( const Track& track,
       information [numberOfPixelSpoiltHits]      = 0;
       information [numberOfGangedFlaggedFakes]   = 0;
       information [numberOfPixelSplitHits]       = 0;
-      information [numberOfBLayerSplitHits]      = 0;
       information [numberOfInnermostLayerSplitHits] = 0;
       information [numberOfNextToInnermostLayerSplitHits] = 0;
       if (track.info().trackFitter() != TrackInfo::Unknown && !m_dedxtool.empty()) {
@@ -254,7 +251,6 @@ Trk::TrackSummaryTool::createSummary( const Track& track,
   if (m_doSharedHits) {
     information [numberOfSCTSharedHits]      = 0;
     if (m_pixelExists) {
-      information [numberOfBLayerSharedHits] = 0;
       information [numberOfInnermostPixelLayerSharedHits] = 0;
       information [numberOfNextToInnermostPixelLayerSharedHits] = 0;
       information [numberOfPixelSharedHits]  = 0;
@@ -305,8 +301,7 @@ Trk::TrackSummaryTool::createSummary( const Track& track,
 
   if (!m_trt_dEdxTool.empty()) {
     if (information[Trk::numberOfTRTHits]+information[Trk::numberOfTRTOutliers]>=m_minTRThitsForTRTdEdx) {
-      ITRT_ToT_dEdx::EGasType gasType;
-      int nhits = static_cast<int>( m_trt_dEdxTool->usedHits(&track, gasType, m_TRTdEdx_DivideByL, m_TRTdEdx_useHThits) );
+      int nhits = static_cast<int>( m_trt_dEdxTool->usedHits(&track, m_TRTdEdx_DivideByL, m_TRTdEdx_useHThits) );
       double fvalue = (nhits>0 ? m_trt_dEdxTool->dEdx(&track, m_TRTdEdx_DivideByL, m_TRTdEdx_useHThits, m_TRTdEdx_corrected) : 0.0);
       eProbability.push_back(fvalue);
       information[ numberOfTRTHitsUsedFordEdx] = static_cast<uint8_t>(std::max(nhits,0));
@@ -387,8 +382,7 @@ void Trk::TrackSummaryTool::updateAdditionalInfo(Track& track) const
  
   if (!m_trt_dEdxTool.empty()) {
     if (tSummary->get(Trk::numberOfTRTHits)+tSummary->get(Trk::numberOfTRTOutliers)>=m_minTRThitsForTRTdEdx) {
-      ITRT_ToT_dEdx::EGasType gasType;
-      int nhits = static_cast<int>( m_trt_dEdxTool->usedHits(&track, gasType, m_TRTdEdx_DivideByL, m_TRTdEdx_useHThits) );
+      int nhits = static_cast<int>( m_trt_dEdxTool->usedHits(&track, m_TRTdEdx_DivideByL, m_TRTdEdx_useHThits) );
       double fvalue = (nhits>0 ? m_trt_dEdxTool->dEdx(&track, m_TRTdEdx_DivideByL, m_TRTdEdx_useHThits, m_TRTdEdx_corrected) : 0.0);
       eProbability.push_back(fvalue);
       if (!tSummary->update(Trk::numberOfTRTHitsUsedFordEdx, static_cast<uint8_t>(std::max(nhits,0)) )) {
diff --git a/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx b/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx
index 562d609fe3257b6cf50d08c5b94dd34987e1b66a..36a5736f7bbf07af51453e5af34d95c6826d6bf1 100644
--- a/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx
+++ b/Tracking/TrkTools/TrkTruthCreatorTools/src/DecayInFlyTruthTrajectoryBuilder.cxx
@@ -108,7 +108,7 @@ DecayInFlyTruthTrajectoryBuilder::truthTrajectoryCuts(const HepMC::GenVertex *vt
 	    }
 	  }
 	  // allow pi/k->mu decay
-	  else if(fabs(candidate->pdg_id()) == 13){
+	  else if(std::abs(candidate->pdg_id()) == 13){
 	    passed_cuts = candidate;
 	    ++num_passed_cuts;
 	  }
diff --git a/Tracking/TrkTools/TrkTruthToTrack/TrkTruthToTrack/TruthTrackRecordToTrack.h b/Tracking/TrkTools/TrkTruthToTrack/TrkTruthToTrack/TruthTrackRecordToTrack.h
index 49f29526d84477f00c4f9f8630fe11dd4cdd4de6..59090b926c722b225f6a9f4bb4dfa4a5cce01504 100755
--- a/Tracking/TrkTools/TrkTruthToTrack/TrkTruthToTrack/TruthTrackRecordToTrack.h
+++ b/Tracking/TrkTools/TrkTruthToTrack/TrkTruthToTrack/TruthTrackRecordToTrack.h
@@ -11,6 +11,8 @@
 
 #include "TrkParameters/TrackParameters.h"
 #include <string>
+#include "StoreGate/ReadHandleKey.h" 
+#include "TrackRecord/TrackRecordCollection.h"
 
 namespace HepPDT { class ParticleDataTable; }
 namespace HepMC  { class GenParticle;       }
@@ -63,7 +65,7 @@ namespace Trk {
   private:
     const HepPDT::ParticleDataTable *m_particleDataTable;
     ToolHandle<Trk::IExtrapolator> m_extrapolator;
-    std::string   m_reccollkey;
+    SG::ReadHandleKey<TrackRecordCollection> m_reccollkey;
     
     /** Forbid copying of Truth...ToTrack to not mess with the
         internal pointers. */ 
diff --git a/Tracking/TrkTools/TrkTruthToTrack/doc/packagedoc.h b/Tracking/TrkTools/TrkTruthToTrack/doc/packagedoc.h
index f6679bdbc086fc14d37532226e28b3cc56260153..f86cc1272fecd6c1b82ce33673f68c13718c48e2 100644
--- a/Tracking/TrkTools/TrkTruthToTrack/doc/packagedoc.h
+++ b/Tracking/TrkTools/TrkTruthToTrack/doc/packagedoc.h
@@ -13,17 +13,5 @@ This package provied a way to create a Trk::TrackParameters object
 from a HepMC::GenParticle. This allows to use Trk::Extrapolator for
 extrapolation of "true" track parameters.
 
-@ref used_TrkTruthToTrack
-@ref requirements_TrkTruthToTrack
 
 */
-
-/**
-@page used_TrkTruthToTrack Used Packages
-*/
-
-/**
-@page requirements_TrkTruthToTrack Requirements
-*/
-
-
diff --git a/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx b/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx
index deda16337fd9a89e8643bf86074b9588dc15df4f..6ee4eeb61a98588789f638ab5d1d5345ef03ebe0 100755
--- a/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx
+++ b/Tracking/TrkTools/TrkTruthToTrack/src/TruthTrackRecordToTrack.cxx
@@ -25,7 +25,7 @@
 //#include "TrkParameters/AtaPlane.h"
 #include "TrkExInterfaces/IExtrapolator.h"
 #include "TrackRecord/TrackRecord.h"
-#include "TrackRecord/TrackRecordCollection.h"
+
 
 //================================================================
 Trk::TruthTrackRecordToTrack::TruthTrackRecordToTrack(const std::string& type, const std::string& name,
@@ -57,8 +57,10 @@ StatusCode Trk::TruthTrackRecordToTrack::initialize() {
     return StatusCode::FAILURE;
   } else {
     ATH_MSG_INFO("Retrieved tool " << m_extrapolator);
-  }
-  
+  } 
+
+  ATH_CHECK( m_reccollkey.initialize() );
+
   return StatusCode::SUCCESS;
 }
 
@@ -91,10 +93,9 @@ const Trk::TrackParameters* Trk::TruthTrackRecordToTrack::makeProdVertexParamete
 
   }*/
 
-  const TrackRecordCollection* recordCollection;
+  SG::ReadHandle<TrackRecordCollection> recordCollection(m_reccollkey);
       
-  StatusCode sc=evtStore()->retrieve(recordCollection, m_reccollkey);
-  if (sc==StatusCode::FAILURE) {
+  if (recordCollection.isValid()) {
     ATH_MSG_ERROR ("Could not get track record!");
     return 0;
   }
@@ -162,12 +163,13 @@ const Trk::TrackParameters* Trk::TruthTrackRecordToTrack::makeProdVertexParamete
   double charge = 0.0;
   const HepPDT::ParticleData* pd = 0;
 
-  const TrackRecordCollection* recordCollection;      
-  StatusCode sc=evtStore()->retrieve(recordCollection, m_reccollkey);
-  if (sc==StatusCode::FAILURE) {
+   SG::ReadHandle<TrackRecordCollection> recordCollection(m_reccollkey);
+      
+  if (recordCollection.isValid()) {
     ATH_MSG_ERROR ("Could not get track record!");
     return 0;
   }
+
   ATH_MSG_DEBUG("reading from track record, size=" << recordCollection->size());
 
   if (recordCollection->size() == 0) ATH_MSG_WARNING ("action required but record size is 0");
diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackAlgs/src/TruthTrackCreation.cxx b/Tracking/TrkTruthTracks/TrkTruthTrackAlgs/src/TruthTrackCreation.cxx
index 3842e46fc46c5e5d47eb94e75c0ae321fd25215d..d14a2455ae83f655e38b65c5caf4e39274a69d4b 100644
--- a/Tracking/TrkTruthTracks/TrkTruthTrackAlgs/src/TruthTrackCreation.cxx
+++ b/Tracking/TrkTruthTracks/TrkTruthTrackAlgs/src/TruthTrackCreation.cxx
@@ -15,8 +15,6 @@
 #include "TrkToolInterfaces/IPRD_AssociationTool.h"
 #include "TrkToolInterfaces/ITrackSummaryTool.h"
 #include "TrkToolInterfaces/ITrackSelectorTool.h"
-#include "TrkTrack/TrackCollection.h"
-#include "TrkSegment/SegmentCollection.h"
 // HepMC
 #include "HepMC/GenParticle.h"
 #include "HepMC/SimpleVector.h"
@@ -26,26 +24,19 @@
 Trk::TruthTrackCreation::TruthTrackCreation(const std::string& name, ISvcLocator* pSvcLocator)
     :
     AthAlgorithm(name,pSvcLocator),
-    m_outputTrackCollectionName("TruthTracks"),
-    m_skippedTrackCollectionName("SkippedTruthTracks"),
     m_prdTruthTrajectoryBuilder("Trk::PRD_TruthTrajectoryBuilder/InDetPRD_TruthTrajectoryBuilder"),
     m_truthTrackBuilder("Trk::TruthTrackBuilder/InDetTruthTrackBuilder"),
     m_assoTool(""),
     m_trackSummaryTool("")
 {
     // Trk Truth Tools
-    declareProperty("PRD_TruthTrajectoryBuilder",   m_prdTruthTrajectoryBuilder);
-    declareProperty("TruthTrackBuilder",            m_truthTrackBuilder);
-    declareProperty("PRD_TruthTrajectorySelectors", m_prdTruthTrajectorySelectors);
+  declareProperty("PRD_TruthTrajectoryBuilder",   m_prdTruthTrajectoryBuilder, "Truth Trajectory Builder Tool");
+  declareProperty("TruthTrackBuilder",            m_truthTrackBuilder, "Truth Track Builder Tool");
+  declareProperty("PRD_TruthTrajectorySelectors", m_prdTruthTrajectorySelectors, "PRD truth trajectory selectors");
     // Trk Tools
-    declareProperty("TrackSelectors",               m_trackSelectors);
-    declareProperty("AssoTool",                     m_assoTool);
-    declareProperty("TrackSummaryTool",             m_trackSummaryTool);
-    // specify the output collection
-    declareProperty("OutputTrackCollection",        m_outputTrackCollectionName);
-    declareProperty("OutputSkippedTrackCollection", m_skippedTrackCollectionName);
-
-    declareProperty("OutputSegmentCollection",        m_outputSegmentCollectionName = "");
+  declareProperty("TrackSelectors",               m_trackSelectors, "Track selectors for a posteriori track selection");
+  declareProperty("AssoTool",                     m_assoTool, "Association tool for PRDs");
+  declareProperty("TrackSummaryTool",             m_trackSummaryTool, "Summary tool for completing the track with its summary info");
 }
 
 //================ Destructor =================================================
@@ -89,6 +80,9 @@ StatusCode Trk::TruthTrackCreation::initialize()
         return StatusCode::FAILURE;
     }
 
+    ATH_CHECK( m_outputTrackCollectionName.initialize() );
+    ATH_CHECK( m_skippedTrackCollectionName.initialize() );
+ 
     return StatusCode::SUCCESS;
 }
 
@@ -106,10 +100,11 @@ StatusCode Trk::TruthTrackCreation::execute()
 {
     if (!m_assoTool.empty()) m_assoTool->reset();
     // create the track collection
-    TrackCollection* outputTrackCollection = new TrackCollection;
-    TrackCollection* skippedTrackCollection = new TrackCollection;
-
-    SegmentCollection* outputSegmentCollection = m_outputSegmentCollectionName.empty() ? 0 : new SegmentCollection;
+    std::unique_ptr<TrackCollection> outputTrackCollection = std::make_unique<TrackCollection>();
+    std::unique_ptr<TrackCollection> skippedTrackCollection = std::make_unique<TrackCollection>();
+    SG::WriteHandle<TrackCollection> outputTrackCollectionHandle(m_outputTrackCollectionName);
+    SG::WriteHandle<TrackCollection> skippedTrackCollectionHandle(m_skippedTrackCollectionName);
+ 
 
     // set up the PRD trajectory builder
     if ( m_prdTruthTrajectoryBuilder->refreshEvent().isFailure() ){
@@ -142,7 +137,7 @@ StatusCode Trk::TruthTrackCreation::execute()
             if (!passed) continue;
         }
         // create the truth track
-        Trk::Track* truthTrack = m_truthTrackBuilder->createTrack(ttIter->second,outputSegmentCollection);
+        Trk::Track* truthTrack = m_truthTrackBuilder->createTrack(ttIter->second);
         if (!truthTrack){
             ATH_MSG_VERBOSE("Track creation for PRD truth trajectory with size " << (*ttIter).second.prds.size() << " failed. Skipping ...");
             continue;
@@ -185,31 +180,15 @@ StatusCode Trk::TruthTrackCreation::execute()
     }
 
     // ----------------------------------- record & cleanup ---------------------------------------------------------------    
-    if (evtStore()->record(outputTrackCollection,m_outputTrackCollectionName).isFailure()){
-      // the input track collection
-        ATH_MSG_WARNING("Could not record TrackCollection with name " << m_outputTrackCollectionName << ". Deleting it ..." );
-        delete outputTrackCollection;
-        return StatusCode::SUCCESS;
-    } 
+
+    ATH_CHECK(outputTrackCollectionHandle.record(std::move(outputTrackCollection)));
+
     ATH_MSG_VERBOSE("Truth TrackCollection with name " << m_outputTrackCollectionName << " and size " <<  outputTrackCollection->size() << " recorded.");
-    
-    if (evtStore()->record(skippedTrackCollection,m_skippedTrackCollectionName).isFailure()){
-      // the input track collection
-        ATH_MSG_WARNING("Could not record TrackCollection with name " << m_skippedTrackCollectionName << ". Deleting it ..." );
-        delete skippedTrackCollection;
-        return StatusCode::SUCCESS;
-    } 
+
+    ATH_CHECK(skippedTrackCollectionHandle.record(std::move(skippedTrackCollection)));
+ 
     ATH_MSG_VERBOSE("Truth TrackCollection with name " << m_skippedTrackCollectionName << " and size " <<  skippedTrackCollection->size() << " recorded.");
 
-    if ( !m_outputSegmentCollectionName.empty() ) {
-      if( evtStore()->record(outputSegmentCollection,m_outputSegmentCollectionName).isFailure()){
-	// the input track collection
-        ATH_MSG_WARNING("Could not record SegmentCollection with name " << m_outputSegmentCollectionName << ". Deleting it ..." );
-        delete outputSegmentCollection;
-        return StatusCode::SUCCESS;
-      } 
-      ATH_MSG_VERBOSE("Truth SegmentCollection with name " << m_outputSegmentCollectionName << " and size " <<  outputSegmentCollection->size() << " recorded.");
-    }
     // job done
     return StatusCode::SUCCESS;
 }
diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackAlgs/src/TruthTrackCreation.h b/Tracking/TrkTruthTracks/TrkTruthTrackAlgs/src/TruthTrackCreation.h
index 9c7a3284dbb4216ee6988956e377eaf442eb977e..a6ef64e3e498b4b80eacf47af8a6fec590f4f69a 100644
--- a/Tracking/TrkTruthTracks/TrkTruthTrackAlgs/src/TruthTrackCreation.h
+++ b/Tracking/TrkTruthTracks/TrkTruthTrackAlgs/src/TruthTrackCreation.h
@@ -16,6 +16,9 @@
 #include "GaudiKernel/ToolHandle.h"
 #include <string>
 
+#include "StoreGate/WriteHandleKey.h"
+#include "TrkTrack/TrackCollection.h"
+
 class AtlasDetectorID;
 
 namespace Trk 
@@ -57,10 +60,9 @@ namespace Trk
 
     private:
 
-        std::string                                         m_outputTrackCollectionName;      //!< output collection for truth tracks
-        std::string                                         m_skippedTrackCollectionName;     //!< output collection for skipped tracks
-        std::string                                         m_outputSegmentCollectionName;    //!< output collection for truths segments
-                                                            
+       Gaudi::Property<SG::WriteHandleKey<TrackCollection>> m_outputTrackCollectionName{this, "OutputTrackCollection", "TruthTracks", "Output Truth Track Collection"};
+       Gaudi::Property<SG::WriteHandleKey<TrackCollection>> m_skippedTrackCollectionName{this, "OutputSkippedTrackCollection", "SkippedTruthTracks", "Output Skipped Truth Track Collection"};    
+                                                
         ToolHandle<Trk::IPRD_TruthTrajectoryBuilder>        m_prdTruthTrajectoryBuilder;      //!< truth tools
         ToolHandle<Trk::ITruthTrackBuilder>                 m_truthTrackBuilder;              //!< truth tools
 
diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx
index 8446fc54011a3b2d59e53c9b1d870901a693177d..f4be6d77c4fd9152d68501224e3e813f6e184f0a 100644
--- a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx
+++ b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.cxx
@@ -9,7 +9,6 @@
 // package include
 #include "PRD_TruthTrajectoryBuilder.h"
 // Trk
-#include "TrkTruthData/PRD_MultiTruthCollection.h"
 #include "TrkToolInterfaces/IPRD_Provider.h"
 #include "TrkTruthTrackInterfaces/IPRD_TruthTrajectoryManipulator.h"
 //#include "TrkEventPrimitives/GlobalPosition.h"
@@ -20,27 +19,20 @@
 #include "HepMC/GenParticle.h"
 #include "HepMC/GenVertex.h"
 
+
 /** Constructor **/
 Trk::PRD_TruthTrajectoryBuilder::PRD_TruthTrajectoryBuilder(const std::string& t, const std::string& n, const IInterface* p) : 
   AthAlgTool(t,n,p),
   m_idHelper(0),
   m_idPrdProvider(""),
-  m_msPrdProvider(""),
-  m_minPt(400.),
-  m_geantinos(false)
+  m_msPrdProvider("")
 {
     declareInterface<Trk::IPRD_TruthTrajectoryBuilder>(this);
-    // the PRD multi truth collections this builder works on
-    declareProperty("PRD_MultiTruthCollections",  m_prdMultiTruthCollectionNames);
     // the PRD providers that turn Identifier -> IdentiferHash and get the PRD
     declareProperty("InDetPRD_Provider", m_idPrdProvider);
     declareProperty("MuonPRD_Provider",  m_msPrdProvider);
     // the PRD manipulators
     declareProperty("PRD_TruthTrajectoryManipulators", m_prdTruthTrajectoryManipulators);
-    // Minimum PT cut
-    declareProperty("MinimumPt",         m_minPt);
-    // Track geantinos
-    declareProperty("Geantinos",         m_geantinos);
 }
 
 // Athena algtool's Hooks - initialize
@@ -79,17 +71,16 @@ StatusCode Trk::PRD_TruthTrajectoryBuilder::refreshEvent()  {
    m_prdMultiTruthCollections.clear();
    m_prdMultiTruthCollections.reserve(m_prdMultiTruthCollectionNames.size());
    // load the PRD collections from SG
-   std::vector< std::string >::iterator pmtCollNameIter  = m_prdMultiTruthCollectionNames.begin();
-   std::vector< std::string >::iterator pmtCollNameIterE = m_prdMultiTruthCollectionNames.end();
-   for ( ;  pmtCollNameIter != pmtCollNameIterE; ++pmtCollNameIter ) {
-       // try to retrieve the PRD multi truth collection
-       const PRD_MultiTruthCollection* curColl = 0;
-       if ( evtStore()->retrieve(curColl,(*pmtCollNameIter)).isFailure() )
-           ATH_MSG_WARNING("Could not retrieve " << (*pmtCollNameIter) << ". Ignoring ... ");
-       else if (curColl){
-           ATH_MSG_VERBOSE("Added " << (*pmtCollNameIter) << " to collection list for truth track creation.");
-           m_prdMultiTruthCollections.push_back(curColl);
-       }
+   for(auto pmtCollNameIter:m_prdMultiTruthCollectionNames){
+     // try to retrieve the PRD multi truth collection
+     SG::ReadHandle<PRD_MultiTruthCollection> curColl (pmtCollNameIter);
+     if (!curColl.isValid()){
+       ATH_MSG_WARNING("Could not retrieve " << pmtCollNameIter << ". Ignoring ... ");
+     }
+     else{
+       ATH_MSG_VERBOSE("Added " << pmtCollNameIter << " to collection list for truth track creation.");
+       m_prdMultiTruthCollections.push_back(curColl.cptr());
+     }
    }
    // retrieve collection call to the PRD_Providers
    if (!m_idPrdProvider.empty() && m_idPrdProvider->retrieveCollection().isFailure()){
diff --git a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h
index e7caa296d457919d9f015f6cdf12d576c2362fcc..49ddf7258310960870181bc4f634a0ba12838cf7 100644
--- a/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h
+++ b/Tracking/TrkTruthTracks/TrkTruthTrackTools/src/PRD_TruthTrajectoryBuilder.h
@@ -15,9 +15,9 @@
 // Trk includes
 #include "TrkTruthTrackInterfaces/IPRD_TruthTrajectoryBuilder.h"
 #include "TrkTruthTrackInterfaces/PRD_TruthTrajectory.h"
+#include "TrkTruthData/PRD_MultiTruthCollection.h"
 
 class AtlasDetectorID;
-class PRD_MultiTruthCollection;  
 
 namespace HepMC {
   class GenParticle;
@@ -61,18 +61,18 @@ namespace Trk {
        StatusCode refreshEvent();
 
      private:
-        const AtlasDetectorID*                              m_idHelper;                         //! Helper to detect type of sub-detector from PRD->identify().
+       const AtlasDetectorID*                               m_idHelper;                         //! Helper to detect type of sub-detector from PRD->identify().
                                                                                                 
         ToolHandle<IPRD_Provider>                           m_idPrdProvider;                    //!< Identifier to PRD relation in the Inner Detector
         ToolHandle<IPRD_Provider>                           m_msPrdProvider;                    //!< Identifier to PRD relation in the Muons System
         
         ToolHandleArray<IPRD_TruthTrajectoryManipulator>    m_prdTruthTrajectoryManipulators;   //!< PRD truth tracjectory manipulators
         
-        std::vector<std::string>                            m_prdMultiTruthCollectionNames;     //!< PRD multi truth collection names this builder is working on
-        std::vector<const PRD_MultiTruthCollection*>        m_prdMultiTruthCollections;         //!< the retrieved PRD muli truth collections
+	SG::ReadHandleKeyArray<PRD_MultiTruthCollection> m_prdMultiTruthCollectionNames {this,"PRD_MultiTruthCollections",{"PixelClusterTruth","SCT_ClusterTruth","TRT_DriftCircleTruth"}, "PRD multi truth collection names this builder is working on"};
+	std::vector<const PRD_MultiTruthCollection*> m_prdMultiTruthCollections;         //!< the retrieved PRD muli truth collections
         
-        double                                              m_minPt;                            //!< minimum pT to be even considered
-        bool                                                m_geantinos;                        //!< Track geantinos or not        
+	Gaudi::Property<double>                             m_minPt {this,"MinimumPt",400.,"minimum pT to be even considered"};
+	Gaudi::Property<bool>                               m_geantinos {this,"Geantinos",false,"Track geantinos or not"};
         mutable std::map< const HepMC::GenParticle*, PRD_TruthTrajectory > m_gpPrdTruthTrajectories; //!< the cache for the return (cleared by Incident)
         
   };
diff --git a/Tracking/TrkValidation/TrkValAlgs/doc/packagedoc.h b/Tracking/TrkValidation/TrkValAlgs/doc/packagedoc.h
index e0b0af0d4509de115ee7838fd7e082cd5a3e1a57..804a3a34cbc22c537e019d1ff0eb69aae71ea7e6 100644
--- a/Tracking/TrkValidation/TrkValAlgs/doc/packagedoc.h
+++ b/Tracking/TrkValidation/TrkValAlgs/doc/packagedoc.h
@@ -33,15 +33,4 @@ The Trk::TrackValidationNtupleWriter needs a configured instance of the Trk::Bas
 
 @section TrkValAlgs_ExtrasTrkValAlgs Extra Pages
 
- - @ref UsedTrkValAlgs
- - @ref requirementsTrkValAlgs
 */
-
-/**
-@page UsedTrkValAlgs Used Packages
-*/
-
-/**
-@page requirementsTrkValAlgs Requirements
-*/
-
diff --git a/Tracking/TrkValidation/TrkValEvent/doc/packagedoc.h b/Tracking/TrkValidation/TrkValEvent/doc/packagedoc.h
index 44aadfbfa9695f45362122db7b9081731a87af21..d0d80ef7a7411e53e84b455b49a76bc903c2499c 100644
--- a/Tracking/TrkValidation/TrkValEvent/doc/packagedoc.h
+++ b/Tracking/TrkValidation/TrkValEvent/doc/packagedoc.h
@@ -31,15 +31,4 @@ The package follows the installed_library pattern.
       
 @section TrkValEvent_ExtrasTrkValEvent Extra Pages
 
- - @ref UsedTrkValEvent
- - @ref requirementsTrkValEvent
 */
-
-/**
-@page UsedTrkValEvent Used Packages
-*/
-
-/**
-@page requirementsTrkValEvent Requirements
-*/
-
diff --git a/Tracking/TrkValidation/TrkValHistUtils/Root/IDHitPlots.cxx b/Tracking/TrkValidation/TrkValHistUtils/Root/IDHitPlots.cxx
index 894b9e2c53c9702a8f735bf6a97afff0667d821d..1a8433b37234e9ad1b49ab89d46c97761a125810 100644
--- a/Tracking/TrkValidation/TrkValHistUtils/Root/IDHitPlots.cxx
+++ b/Tracking/TrkValidation/TrkValHistUtils/Root/IDHitPlots.cxx
@@ -87,7 +87,7 @@ namespace Trk {
     uint8_t iBLayerHits(0), iPixHits(0), iSctHits(0), iTrtHits(0);
     uint8_t iPixHoles(0), iSCTHoles(0), iTrtHTHits(0);
 
-    if (trk.summaryValue(iBLayerHits, xAOD::numberOfBLayerHits)) {
+    if (trk.summaryValue(iBLayerHits, xAOD::numberOfInnermostPixelLayerHits)) {
       nBLayerHits->Fill(iBLayerHits);
     }
     if (trk.summaryValue(iPixHits, xAOD::numberOfPixelHits)) {
@@ -116,13 +116,13 @@ namespace Trk {
       iPixelGangedFakes(0);
       uint8_t iSCTOutliers(0), iSCTDoubleHoles(0), iSCTShared(0);
       uint8_t iTRTOutliers(0), iTRTHTOutliers(0);
-      if (trk.summaryValue(iBLayerOutliers, xAOD::numberOfBLayerOutliers)) {
+      if (trk.summaryValue(iBLayerOutliers, xAOD::numberOfInnermostPixelLayerOutliers)) {
         nBLayerOutliers->Fill(iBLayerOutliers);
       }
-      if (trk.summaryValue(iBLayerShared, xAOD::numberOfBLayerSharedHits)) {
+      if (trk.summaryValue(iBLayerShared, xAOD::numberOfInnermostPixelLayerSharedHits)) {
         nBLayerSharedHits->Fill(iBLayerShared);
       }
-      if (trk.summaryValue(iBLayerSplit, xAOD::numberOfBLayerSplitHits)) {
+      if (trk.summaryValue(iBLayerSplit, xAOD::numberOfInnermostPixelLayerSplitHits)) {
         nBLayerSplitHits->Fill(iBLayerSplit);
       }
       if (trk.summaryValue(iPixelOutliers, xAOD::numberOfPixelOutliers)) {
diff --git a/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/ITruthNtupleTool.h b/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/ITruthNtupleTool.h
index 32cb894bbdbbb417738f244e20391cfdb2a83437..bc80fe72d29c415bc1b1c8d74b2a807d235d5876 100644
--- a/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/ITruthNtupleTool.h
+++ b/Tracking/TrkValidation/TrkValInterfaces/TrkValInterfaces/ITruthNtupleTool.h
@@ -37,7 +37,8 @@ static const InterfaceID IID_ITruthNtupleTool("ITruthNtupleTool",1,0);
     @author Sebastian.Fleischmann -at- cern.ch, Wolfgang.Liebig -at- cern.ch
 */
 
-struct ValidationTrackTruthData {
+class ValidationTrackTruthData {
+public:
     const HepMC::GenParticle*                   genParticle;
     const Trk::TrackParameters*                 truthPerigee;
     std::vector< std::vector<unsigned int> >    truthToTrackIndices;
diff --git a/Tracking/TrkValidation/TrkValInterfaces/doc/packagedoc.h b/Tracking/TrkValidation/TrkValInterfaces/doc/packagedoc.h
index 83e29ae5857015785116d0a3e0c0eefb3ad9c969..37649f661e6d78119978d9638d8318bb0ed9b8d5 100644
--- a/Tracking/TrkValidation/TrkValInterfaces/doc/packagedoc.h
+++ b/Tracking/TrkValidation/TrkValInterfaces/doc/packagedoc.h
@@ -21,15 +21,4 @@ This package contains the interfaces for common tracking validation tools.
       
 @section TrkValInterfaces_ExtrasTrkValInterfaces Extra Pages
 
- - @ref UsedTrkValInterfaces
- - @ref requirementsTrkValInterfaces
 */
-
-/**
-@page UsedTrkValInterfaces Used Packages
-*/
-
-/**
-@page requirementsTrkValInterfaces Requirements
-*/
-
diff --git a/Tracking/TrkValidation/TrkValTools/doc/packagedoc.h b/Tracking/TrkValidation/TrkValTools/doc/packagedoc.h
index fbc6b40eeab3d1ec2d1e5d0a324ce241b43399c5..97f141712ea064ca5ea9706070d5df32eec8e432 100644
--- a/Tracking/TrkValidation/TrkValTools/doc/packagedoc.h
+++ b/Tracking/TrkValidation/TrkValTools/doc/packagedoc.h
@@ -330,22 +330,11 @@ The TrackPlotter has a config file (<tt>trackplotter.conf</tt>) which allows to
 set the ntuple directories and trees. Depending on your runtime setup you may have
 to change the config file. In the config file you can also activate the plotting
 of PrepRawData, but in this case you also have to run the related algorithms from
-the package InDetTrackValidation (e.g. TRT_DriftCircleValidationNtupleWriter) to
+the package InDetTrackValidation to
 fill the RIO data into the ntuple.
 @image html TrackPlotterInDetXY.png
 @image html TrackPlotterInDetLarge.png
 
 @section TrkValTools_ExtrasTrkValTools Extra Pages
 
- - @ref UsedTrkValTools
- - @ref requirementsTrkValTools
 */
-
-/**
-@page UsedTrkValTools Used Packages
-*/
-
-/**
-@page requirementsTrkValTools Requirements
-*/
-
diff --git a/Tracking/TrkValidation/TrkVertexFitterValidationUtils/doc/packagedoc.h b/Tracking/TrkValidation/TrkVertexFitterValidationUtils/doc/packagedoc.h
index 0e932622536d37724962649f32ba3969e4d7c199..a81a357b0d1cb203641d283403d86557bde79f0f 100644
--- a/Tracking/TrkValidation/TrkVertexFitterValidationUtils/doc/packagedoc.h
+++ b/Tracking/TrkValidation/TrkVertexFitterValidationUtils/doc/packagedoc.h
@@ -26,6 +26,5 @@ number of correct tracks and their weights, number of
 pileup tracks and their weight etc.. The outlyer tracks are 
 defined as those coming from vertexes in the configurable region
 around  a primary collision in Monte Carlo.
-@section TrkVertexFitterValidationUtils_requirementsTrkVertexFitterValidationUtils Requirements
 
 */
diff --git a/Tracking/TrkVertexFitter/TrkV0Fitter/doc/packagedoc.h b/Tracking/TrkVertexFitter/TrkV0Fitter/doc/packagedoc.h
index a85ffe997852e44e55154a43f4053894e39b58ca..a8825f8a911cc1c96dc189394fb3a5958da09829 100644
--- a/Tracking/TrkVertexFitter/TrkV0Fitter/doc/packagedoc.h
+++ b/Tracking/TrkVertexFitter/TrkV0Fitter/doc/packagedoc.h
@@ -17,7 +17,6 @@ correlations is calculated and returned via Trk::ExtendedVxCandidate
 
 @section TrkV0Fitter_designTrkV0Fitter Design
 
-@section TrkV0Fitter_requirementsTrkV0Fitter Requirements
 
 
 */
diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtCore/doc/packagedoc.h b/Tracking/TrkVertexFitter/TrkVKalVrtCore/doc/packagedoc.h
index a2b8ca4ab02b8a9ff67648fbcec6a5815b223c2f..b2e2b3fca7193ba1c5e1ccec243081eacfc3fdc8 100644
--- a/Tracking/TrkVertexFitter/TrkVKalVrtCore/doc/packagedoc.h
+++ b/Tracking/TrkVertexFitter/TrkVKalVrtCore/doc/packagedoc.h
@@ -28,17 +28,6 @@ Neutral and charged tracks may be mixed together.
  Software related issues may be viewed in
  https://twiki.cern.ch/twiki/bin/view/Atlas/VKalVrt .
   
-@ref used_TrkVKalVrtCore
 
-@ref requirements_TrkVKalVrtCore
 
 */
-
-/**
-@page used_TrkVKalVrtCore Used Packages
-*/
-
-/**
-@page requirements_TrkVKalVrtCore Requirements
-*/
-
diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/doc/packagedoc.h b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/doc/packagedoc.h
index e9e9ee917f42c331cc1760ef35fa4442e683490b..74694a75d27488375b686431de2c1e88c83fd7c8 100644
--- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/doc/packagedoc.h
+++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/doc/packagedoc.h
@@ -22,17 +22,6 @@ This package contains ATHENA interfaces to VKalVrt.
  Software related issues may be viewed in
  https://twiki.cern.ch/twiki/bin/view/Atlas/VKalVrt .
   
-@ref used_TrkVKalVrtFitter
 
-@ref requirements_TrkVKalVrtFitter
 
 */
-
-/**
-@page used_TrkVKalVrtFitter Used Packages
-*/
-
-/**
-@page requirements_TrkVKalVrtFitter Requirements
-*/
-
diff --git a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx
index 367725398864326720e9e3c853fb3d51410c2f32..5200c84d31a44885a50916e49346e55db095fc5e 100755
--- a/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx
+++ b/Tracking/TrkVertexFitter/TrkVKalVrtFitter/src/TrkCascadeFitter.cxx
@@ -329,7 +329,7 @@ VxCascadeInfo * TrkVKalVrtFitter::fitCascade(const Vertex* primVrt, bool FirstDe
     }
 //
     long int ntrk=0;
-    StatusCode sc;
+    StatusCode sc; sc.setChecked();
     std::vector<const TrackParameters*> baseInpTrk;
     if(m_firstMeasuredPoint){               //First measured point strategy
        std::vector<const xAOD::TrackParticle*>::const_iterator   i_ntrk;
@@ -721,11 +721,11 @@ VxCascadeInfo * TrkVKalVrtFitter::fitCascade(const Vertex* primVrt, bool FirstDe
        if( m_makeExtendedVertex ) {
   	 Amg::MatrixX tmpCovMtx(NRealT*3+3,NRealT*3+3);                      // New Eigen based EDM
          tmpCovMtx=genCOV.similarity(*fullDeriv);
-         floatErrMtx.resize(NRealT*3+3);
+         floatErrMtx.resize((NRealT*3+3)*(NRealT*3+3+1)/2);
          int ivk=0;
          for(int i=0;i<NRealT*3+3;i++){
            for(int j=0;j<=i;j++){
-               floatErrMtx[ivk++]=tmpCovMtx(i,j);
+               floatErrMtx.at(ivk++)=tmpCovMtx(i,j);
            }
 	 }
        }else{
@@ -733,7 +733,7 @@ VxCascadeInfo * TrkVKalVrtFitter::fitCascade(const Vertex* primVrt, bool FirstDe
          for(int i=0; i<6; i++) floatErrMtx[i]=covVertices[iv][i];
        }
        tmpXAODVertex->setCovariance(floatErrMtx);
-       std::vector<VxTrackAtVertex> xaodVTAV=tmpXAODVertex->vxTrackAtVertex();
+       std::vector<VxTrackAtVertex> & xaodVTAV=tmpXAODVertex->vxTrackAtVertex();
        xaodVTAV.swap(*tmpVTAV);
        for(int itvk=0; itvk<(int)xaodVTAV.size(); itvk++) {
           ElementLink<xAOD::TrackParticleContainer> TEL;  TEL.setElement( m_partListForCascade[itvk] );
@@ -787,7 +787,6 @@ VxCascadeInfo * TrkVKalVrtFitter::fitCascade(const Vertex* primVrt, bool FirstDe
        }
     }    
 //
-    
 //
 //    VxCascadeInfo * recCascade= new VxCascadeInfo(vxVrtList,particleMoms,particleCovs, NDOF ,fullChi2);
     VxCascadeInfo * recCascade= new VxCascadeInfo(xaodVrtList,particleMoms,particleCovs, NDOF ,fullChi2);
diff --git a/Tracking/TrkVertexFitter/TrkVertexAnalysisUtils/doc/packagedoc.h b/Tracking/TrkVertexFitter/TrkVertexAnalysisUtils/doc/packagedoc.h
index 40572ee23a60c5410f41e2d98cde90f862afe205..90565c554824724a5d921a76e031951289e43daf 100644
--- a/Tracking/TrkVertexFitter/TrkVertexAnalysisUtils/doc/packagedoc.h
+++ b/Tracking/TrkVertexFitter/TrkVertexAnalysisUtils/doc/packagedoc.h
@@ -47,7 +47,6 @@ Trk::RecVertex, Trk::Vertex and CLHEP::Hep3Vector
 
 <br><br>
 
-@section TrkVertexAnalysisUtils_requirementsTrkVertexAnalysisUtils Requirements
 
 
 */
diff --git a/Tracking/TrkVertexFitter/TrkVertexBilloirTools/doc/packagedoc.h b/Tracking/TrkVertexFitter/TrkVertexBilloirTools/doc/packagedoc.h
index 3cd9534e6b1f398e0d518b509ec59f2dfd9ef640..125b96060cf5a61b09123f46361b4abaa3d0b5f9 100644
--- a/Tracking/TrkVertexFitter/TrkVertexBilloirTools/doc/packagedoc.h
+++ b/Tracking/TrkVertexFitter/TrkVertexBilloirTools/doc/packagedoc.h
@@ -32,9 +32,7 @@ VxBilloirTools contains the following files/classes:
 - FastVertexFitter.cxx ... the fast version. Calculates only the vertex position. Track parameters are untouched.
 - FullVertexFitter.cxx ... the slower version. Calculates both: vertex position and track parameters.
 
-@section TrkVertexBilloirTools_used_packagesInDetPriVxFinder used packages
 
-@section TrkVertexBilloirTools_requirements Requirements
 
 \namespace Trk
 A namespace for all vertexing packages and related stuff.
diff --git a/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/doc/packagedoc.h b/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/doc/packagedoc.h
index b5227bf566c6ed533539d33c7a5ad833ea68af5c..55b13df4fd796c5b7cbc0d6ce0e41392886f585f 100644
--- a/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/doc/packagedoc.h
+++ b/Tracking/TrkVertexFitter/TrkVertexFitterInterfaces/doc/packagedoc.h
@@ -69,7 +69,6 @@ Interface for kinematic vertex-fitting.
 <b><i>Trk::IKinematicConstraint</i></b>
 Abstract class used for implementing constraint-equations used
 by the kinematic vertex-fitting methods.
-@section TrkVertexFitterInterfaces_requirementsTrkVertexFitterInterfaces Requirements
 
 
 */
diff --git a/Tracking/TrkVertexFitter/TrkVertexFitterUtils/TrkVertexFitterUtils/Chi2TrackCompatibilityEstimator.h b/Tracking/TrkVertexFitter/TrkVertexFitterUtils/TrkVertexFitterUtils/Chi2TrackCompatibilityEstimator.h
index e285bdfa2ea99ac82c4b6332b0ca404e8b31dfa5..965770494cc8eee5e3f7bbc746369c70c049aa53 100755
--- a/Tracking/TrkVertexFitter/TrkVertexFitterUtils/TrkVertexFitterUtils/Chi2TrackCompatibilityEstimator.h
+++ b/Tracking/TrkVertexFitter/TrkVertexFitterUtils/TrkVertexFitterUtils/Chi2TrackCompatibilityEstimator.h
@@ -58,8 +58,6 @@ namespace Trk
     
   private:  
   
-     mutable unsigned int                        m_outputLevel;
-
     /**
     * Compatibility method returning the compatibility value
     */  
diff --git a/Tracking/TrkVertexFitter/TrkVertexFitterUtils/src/FullLinearizedTrackFactory.cxx b/Tracking/TrkVertexFitter/TrkVertexFitterUtils/src/FullLinearizedTrackFactory.cxx
index 5f0fa11fa2d466529c843a9fb1d96db8faf2b869..00ebf23943fba82845239147765b0fbfeeec03a2 100755
--- a/Tracking/TrkVertexFitter/TrkVertexFitterUtils/src/FullLinearizedTrackFactory.cxx
+++ b/Tracking/TrkVertexFitter/TrkVertexFitterUtils/src/FullLinearizedTrackFactory.cxx
@@ -157,13 +157,13 @@ namespace Trk
     double phiAtEp;
     int sgnY = (Y<0)? -1:1;
     int sgnX = (X<0)? -1:1;  
-    double m_pi = TMath::Pi();//acos(-1.);
+    double pi = TMath::Pi();//acos(-1.);
     
     if(fabs(X)>fabs(Y)) phiAtEp = sgn_h*sgnX* acos(-sgn_h * Y / S);
     else
     {
      phiAtEp = asin(sgn_h * X / S);    
-     if( (sgn_h * sgnY)> 0) phiAtEp =  sgn_h * sgnX * m_pi - phiAtEp;
+     if( (sgn_h * sgnY)> 0) phiAtEp =  sgn_h * sgnX * pi - phiAtEp;
     }
     
     parAtExpansionPoint[2] = phiAtEp;   
diff --git a/Tracking/TrkVertexFitter/TrkVertexFitterUtils/src/TrackToVertexIPEstimator.cxx b/Tracking/TrkVertexFitter/TrkVertexFitterUtils/src/TrackToVertexIPEstimator.cxx
index 2f217a5bc9df49df37c48482ddd092de601a3bb6..d67a5ba749a2dbf772e59744bfd2908bbe1ca3ee 100644
--- a/Tracking/TrkVertexFitter/TrkVertexFitterUtils/src/TrackToVertexIPEstimator.cxx
+++ b/Tracking/TrkVertexFitter/TrkVertexFitterUtils/src/TrackToVertexIPEstimator.cxx
@@ -210,8 +210,8 @@ namespace Trk
    {
      msg(MSG::WARNING) << " The contribution to z0_err: " << vrtZZCov << " from PV is negative: critical error in PV error matrix! Removing contribution from PV ... "  << endmsg;     
      newIPandSigma->IPz0SinTheta=z0*sin(theta);
-     double _temp = (IPz0JacZ0Theta.transpose()*(covPerigeeZ0Theta*IPz0JacZ0Theta));
-     newIPandSigma->sigmaz0SinTheta=sqrt(_temp);
+     double temp = (IPz0JacZ0Theta.transpose()*(covPerigeeZ0Theta*IPz0JacZ0Theta));
+     newIPandSigma->sigmaz0SinTheta=sqrt(temp);
      newIPandSigma->PVsigmaz0SinTheta=0;
      
      newIPandSigma->IPz0 = z0;
diff --git a/Tracking/TrkVertexFitter/TrkVertexKinematicFitterUtils/doc/packagedoc.h b/Tracking/TrkVertexFitter/TrkVertexKinematicFitterUtils/doc/packagedoc.h
index 05a67a8261508ee6c8d1bb49c775a2a58595e468..bd9fd874041e69af115ad42bd314b278a8f317f8 100644
--- a/Tracking/TrkVertexFitter/TrkVertexKinematicFitterUtils/doc/packagedoc.h
+++ b/Tracking/TrkVertexFitter/TrkVertexKinematicFitterUtils/doc/packagedoc.h
@@ -27,14 +27,4 @@ of the athena components, therefore the package follows the installed_library pa
 
 @section TrkVertexKinematicFitterUtils_ExtrasTrkKinUtils Extra Pages
 
- - @ref UsedTrkKinUtils
- - @ref requirementsTrkKinUtils
-*/
-
-/**
-@page UsedTrkKinUtils Used Packages
-*/
-
-/**
-@page requirementsTrkKinUtils Requirements
 */
diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/TrkVertexSeedFinderTools/CrossDistancesSeedFinder.h b/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/TrkVertexSeedFinderTools/CrossDistancesSeedFinder.h
index 4fa1b9a3958b0770656b107a5a7c14d7b2fb1d18..23820050e238834588beb08474362903ae4275ff 100755
--- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/TrkVertexSeedFinderTools/CrossDistancesSeedFinder.h
+++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/TrkVertexSeedFinderTools/CrossDistancesSeedFinder.h
@@ -65,7 +65,6 @@ namespace Trk
   private:
 
     bool m_useweights;
-    int m_typeofweight;
     float m_trackdistcutoff;
     int m_trackdistexppower;
     float m_constraintcutoff;
diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/MCTrueSeedFinder.cxx b/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/MCTrueSeedFinder.cxx
index bfd020016977c6b9519080e91e19ed68c044bd93..a274a25720e8bee0a2e1f6aa2fa4de6735c20edb 100755
--- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/MCTrueSeedFinder.cxx
+++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderTools/src/MCTrueSeedFinder.cxx
@@ -250,10 +250,10 @@ namespace Trk
       if( evt == *iter ) break;
     }
 
-    if( ( gotzero == 1 ) && m_removeInTimePileUp ) return false;
-    if( ( gotzero == 2 ) ) return false; //remove2BCPileUp
-    if( ( gotzero == 3 ) ) return false; //remove800nsPileUp
-    if( ( gotzero == 4 ) ) return false; //removeCavernBkg
+    if( gotzero == 1 && m_removeInTimePileUp ) return false;
+    if( gotzero == 2 ) return false; //remove2BCPileUp
+    if( gotzero == 3 ) return false; //remove800nsPileUp
+    if( gotzero == 4 ) return false; //removeCavernBkg
 
     return true;
   }
diff --git a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/share/ImagingSeedTuningAlg_jobOptions.py b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/share/ImagingSeedTuningAlg_jobOptions.py
index 90f0e7d49c1e50d642c2a6165f9fdf636c03b84d..44f0ae150a080ab6fbcdd5e8a4c89d9ce31f07d4 100644
--- a/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/share/ImagingSeedTuningAlg_jobOptions.py
+++ b/Tracking/TrkVertexFitter/TrkVertexSeedFinderUtils/share/ImagingSeedTuningAlg_jobOptions.py
@@ -50,9 +50,7 @@ InDetFlags.doTrkNtuple        = False
 InDetFlags.doPixelTrkNtuple   = False
 InDetFlags.doSctTrkNtuple     = False
 InDetFlags.doTrtTrkNtuple     = False
-InDetFlags.doPixelClusterNtuple = False
 InDetFlags.doSctClusterNtuple   = False
-InDetFlags.doTrtDriftCircleNtuple = False
 InDetFlags.doVtxNtuple        = False
 InDetFlags.doConvVtxNtuple    = False
 InDetFlags.doV0VtxNtuple      = False
diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/cmt/requirements b/Trigger/TrigAlgorithms/TrigCaloRec/cmt/requirements
deleted file mode 100755
index 36cbd0dc25fa2b3998cc780cd8d1b91dc339cadd..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigCaloRec/cmt/requirements
+++ /dev/null
@@ -1,59 +0,0 @@
-package TrigCaloRec
-
-# =====================================================================
-#
-# This is the Trigger EF Calorimeter Cluster algorithm package.
-#
-# =====================================================================
-
-author Cibran Santamarina <Cibran.Santamarina.Rios@cern.ch>
-
-# =====================================================================
-
-use AtlasPolicy             AtlasPolicy-*
-use GaudiInterface          GaudiInterface-*             External
-use CaloEvent               CaloEvent-*                  Calorimeter
-use CaloInterface 	    CaloInterface-* 		 Calorimeter
-use TrigSteeringEvent       TrigSteeringEvent-*          Trigger/TrigEvent
-use TrigInterfaces          TrigInterfaces-* 		 Trigger/TrigSteer
-use TrigTimeAlgs            TrigTimeAlgs-*               Trigger/TrigTools
-use TrigT2CaloCommon        TrigT2CaloCommon-*           Trigger/TrigAlgorithms
-use AthenaMonitoring	    AthenaMonitoring-*	 	 Control
-use TrigCaloEvent           TrigCaloEvent-*              Trigger/TrigEvent
-use CLIDSvc		    CLIDSvc-*			 Control
-use AthenaKernel            AthenaKernel-*               Control
-use AthenaBaseComps         AthenaBaseComps-*            Control
-use xAODCaloEvent           xAODCaloEvent-*              Event/xAOD
-use IRegionSelector         IRegionSelector-*            DetectorDescription
-# =====================================================================
-
-
-apply_pattern dual_use_library files=*.cxx
-
-#apply_pattern declare_runtime_extras extras="*.txt *.xml *.sh *.cfg"
-
-#apply_pattern declare_joboptions files="jobOfragment_*.py TriggerConfig_*.py"
-
-apply_pattern declare_python_modules files="*.py"
-
-private
-use EventKernel             EventKernel-*                Event
-use NavFourMom              NavFourMom-*                 Event
-use CaloDetDescr            CaloDetDescr-*               Calorimeter
-use CaloUtils               CaloUtils-*                  Calorimeter
-use TrigT1Interfaces        TrigT1Interfaces-*           Trigger/TrigT1
-use TrigT1CaloByteStream    TrigT1CaloByteStream-*	 Trigger/TrigT1
-use CaloGeoHelpers          CaloGeoHelpers-*             Calorimeter
-use CaloRec                 CaloRec-*                    Calorimeter
-use CaloIdentifier          CaloIdentifier-*             Calorimeter
-#use GeoModelSvc             GeoModelSvc-*                DetectorDescription/GeoModel
-use GeoModelInterfaces      GeoModelInterfaces-*         DetectorDescription/GeoModel
-use LArIdentifier           LArIdentifier-*              LArCalorimeter
-use LArCabling              LArCabling-*                 LArCalorimeter
-use xAODTrigL1Calo	    xAODTrigL1Calo-*		 Event/xAOD
-use xAODTrigCalo	    xAODTrigCalo-*		 Event/xAOD
-use xAODHIEvent             xAODHIEvent-*                Event/xAOD
-
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigL1FCALTTSumFex.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigL1FCALTTSumFex.cxx
index f1a11a8494920b75d688dcfc9ad625cef32bca1f..940c632e720ea0ca303debdda6809321b368af5a 100644
--- a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigL1FCALTTSumFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigL1FCALTTSumFex.cxx
@@ -64,7 +64,7 @@ HLT::ErrorCode TrigL1FCALTTSumFex::hltExecute(
        const xAOD::TriggerTower* tt = container->at(i);
        double etaTower = tt->eta();
        count_all++;
-       if ( fabsf(etaTower) < 3.1 ) continue;
+       if ( std::abs(etaTower) < 3.1 ) continue;
        count_fcal++;
        if ( etaTower > 0 ) {
 	if ( etaTower < eta_min_pos ) eta_min_pos = etaTower;
diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/cmt/requirements b/Trigger/TrigAlgorithms/TrigDetCalib/cmt/requirements
deleted file mode 100644
index 558d46c6379b84fd78af4ab4c467b9fcd5939ee2..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigDetCalib/cmt/requirements
+++ /dev/null
@@ -1,30 +0,0 @@
-package TrigDetCalib
-
-use     AtlasPolicy             AtlasPolicy-*
-use     AtlasROOT               AtlasROOT-*           External
-use     DataCollection          DataCollection-*      External
-use     GaudiInterface          GaudiInterface-*      External
-use     TrigSteeringEvent       TrigSteeringEvent-*   Trigger/TrigEvent
-use     TrigInDetEvent          TrigInDetEvent-*      Trigger/TrigEvent
-use 	IRegionSelector      	IRegionSelector-*     DetectorDescription
-
-private
-use     AthenaBaseComps         AthenaBaseComps-*     Control
-use     EventInfo               EventInfo-*           Event
-use     xAODEventInfo           xAODEventInfo-*       Event/xAOD
-use     AthenaKernel            AthenaKernel-*        Control
-use     TrkTrack                TrkTrack-*            Tracking/TrkEvent
-use     TrigSteering            TrigSteering*         Trigger/TrigSteer
-use     TrigTimeAlgs            TrigTimeAlgs-*        Trigger/TrigTools
-use     TrigInterfaces          TrigInterfaces-*      Trigger/TrigSteer
-use     TrigT1Result            TrigT1Result-*        Trigger/TrigT1
-end_private
-
-library TrigDetCalib *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
-
-private
-apply_tag ROOTMathLibs
-end_private
diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.cxx b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.cxx
index e28768d0d131ae3f64c87737f66e291494cc2be7..e29d0c03cafa3fbc7a8cf4058fe567772719e3dd 100755
--- a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.cxx
+++ b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.cxx
@@ -48,9 +48,9 @@ TrigCheckForTracks::TrigCheckForTracks(const std::string& name, ISvcLocator* pSv
   declareProperty("eta_Width",    m_etaWidth = 0.1);
   declareProperty("etaEdge",      m_etaEdge = 5.0, "Upper limit of |eta| range");
   declareProperty("etaLowEdge",   m_etaLowEdge = 0.0, "Lower limit of |eta| range");
-  declareProperty("tracksName",   tracksName = "HLT_TrigFastTrackFinder_Tau");  
-  declareProperty("doNotPass",           doNotPass = false);        // pass through flag for initial beam items.
-  declareProperty("lookForAnyTracks",    lookForAnyTracks = false); // any vs isolated. any is needed for initial beam items.
+  declareProperty("tracksName",   m_tracksName = "HLT_TrigFastTrackFinder_Tau");  
+  declareProperty("doNotPass",           m_doNotPass = false);        // pass through flag for initial beam items.
+  declareProperty("lookForAnyTracks",    m_lookForAnyTracks = false); // any vs isolated. any is needed for initial beam items.
   declareProperty("AddCTPResult", m_addCTPResult = false, "Add the CTP result to the list of ROBs");
   declareProperty("AddL2Result",  m_addL2Result = false,  "Add the L2 result to the list of ROBs");
   declareProperty("AddEFResult",  m_addEFResult = false,  "Add the EF result to the list of ROBs");
@@ -66,7 +66,7 @@ TrigCheckForTracks::TrigCheckForTracks(const std::string& name, ISvcLocator* pSv
   declareMonitoredStdContainer("phi_tracks",     m_phi);
   declareMonitoredStdContainer("eta_tracks_ISO", m_ROB_eta);
   declareMonitoredStdContainer("phi_tracks_ISO", m_ROB_phi);
-  declareMonitoredVariable("iso_Tracks",         n_IsoTracks);
+  declareMonitoredVariable("iso_Tracks",         m_n_IsoTracks);
 
 }
 
@@ -82,8 +82,8 @@ HLT::ErrorCode TrigCheckForTracks::hltInitialize()
   // Initialize timing service
   //------------------------------
   if( service( "TrigTimerSvc", m_timerSvc).isFailure() ) {
-    msg() << MSG::WARNING << name()
-	<< ": Unable to locate TrigTimer Service" << endmsg;
+    ATH_MSG_WARNING( name()
+                     << ": Unable to locate TrigTimer Service"  );
   }
   if (m_timerSvc)    
     m_timers.push_back(m_timerSvc->addItem("TrigCheckForTracks.TrigCheckForTracksTot"));
@@ -111,7 +111,7 @@ HLT::ErrorCode TrigCheckForTracks::hltBeginRun()
 HLT::ErrorCode TrigCheckForTracks::hltFinalize(){
 // ----------------------------------------------------------------------
 
-  msg() << MSG::INFO << "Events accepted/rejected/errors:  "<< m_acceptedEvts <<" / "<< m_rejectedEvts << " / "<< m_errorEvts << endmsg;
+  ATH_MSG_INFO( "Events accepted/rejected/errors:  "<< m_acceptedEvts <<" / "<< m_rejectedEvts << " / "<< m_errorEvts  );
   return HLT::OK;
 }
 
@@ -121,23 +121,18 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 // ----------------------------------------------------------------------
 
   if (m_executedEvent) {
-    if (msgLvl() <= MSG::DEBUG) {
-      msg() << MSG::DEBUG << "*** Not Executing this TrigCheckForTracks " << name() << ", already executed"  << endmsg;
-    }
-
+    ATH_MSG_DEBUG( "*** Not Executing this TrigCheckForTracks " << name() << ", already executed"   );
     return HLT::OK;
   }
 
-  if (msgLvl() <= MSG::DEBUG) {
-    msg() << MSG::DEBUG << "***  Executing this TrigCheckForTracks : " << name() << endmsg;
-  }
+  ATH_MSG_DEBUG( "***  Executing this TrigCheckForTracks : " << name()  );
 
 
   //--> PEB Related Stuff
 
   PartialEventBuildingInfo* pebInfo = config()->getPEBI();
   if(!pebInfo){
-    if (msgLvl() <= MSG::DEBUG) msg() << "*** Not Executing this TrigCheckForTracks " << name() << ", not a calib chain" << endmsg;
+    ATH_MSG_DEBUG( "*** Not Executing this TrigCheckForTracks " << name() << ", not a calib chain" );
     return HLT::OK;
   }
   //--< PEB Related Stuff
@@ -161,34 +156,25 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 
   const TrackCollection* tracks = 0;
 
-  if (evtStore()->transientContains<TrackCollection>(tracksName)) {
-    if (msgLvl() <= MSG::DEBUG ) {
-      msg()  << MSG::DEBUG << "*** TrackCollection with name "<< tracksName <<" found in StoreGate (transientContains)" << endmsg;
-    }
+  if (evtStore()->transientContains<TrackCollection>(m_tracksName)) {
+    ATH_MSG_DEBUG( MSG::DEBUG << "*** TrackCollection with name "<< m_tracksName <<" found in StoreGate (transientContains)"  );
   }
   else {
-    if (msgLvl() <= MSG::DEBUG ) {
-      msg()  << MSG::DEBUG << "*** No TrackCollection with name" << tracksName << " found in StoreGate (transientContains)" << endmsg;
-    }
+    ATH_MSG_DEBUG( "*** No TrackCollection with name" << m_tracksName << " found in StoreGate (transientContains)"  );
     return HLT::OK;
   }
   
-  StatusCode sc = evtStore()->retrieve(tracks,tracksName);
+  StatusCode sc = evtStore()->retrieve(tracks,m_tracksName);
   
-  msg()  << MSG::DEBUG << "***** Status code: "<< sc << " for key: " << tracksName << endmsg;
+  ATH_MSG_DEBUG( "***** Status code: "<< sc << " for key: " << m_tracksName  );
 
   if (sc.isFailure()) {
-    if (msgLvl() <= MSG::DEBUG ) {
-      msg()  << MSG::DEBUG << "No TrackCollection with name "<<tracksName<<" found in StoreGate" << endmsg;
-    }
+    ATH_MSG_DEBUG( "No TrackCollection with name "<<m_tracksName<<" found in StoreGate"  );
     m_errorEvts++;
     m_rejectedEvts++;
   } else {
-    if (msgLvl() <= MSG::DEBUG ) {
-      msg()  << MSG::DEBUG << "TrackCollection with name "<<tracksName<<" found in StoreGate" << endmsg;
-      msg()  << MSG::DEBUG << "Retrieved "<< tracks->size() <<" reconstructed tracks from StoreGate" << endmsg;
-    }
-    
+    ATH_MSG_DEBUG( "TrackCollection with name "<<m_tracksName<<" found in StoreGate"  );
+    ATH_MSG_DEBUG( "Retrieved "<< tracks->size() <<" reconstructed tracks from StoreGate"  );
 
     // Have found tracks...
     // Now loop over the tracks to find the isolated ones.
@@ -216,7 +202,7 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 	  
 	  bool gotIsoTrack = true;
 	  
-	  if (!lookForAnyTracks) 
+	  if (!m_lookForAnyTracks) 
 	    {
 
 	      for (TrackCollection::const_iterator jt = tracks->begin(); jt!=tracks->end(); ++jt)
@@ -225,8 +211,6 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 
 		  const Trk::Perigee *jp = (*jt)->perigeeParameters();
 		  
-		  //	      msg() << MSG::INFO << "pT " << jp->pT() << " eta " << jp->eta() << endmsg;
-		  
 
 		  double dphi = fabs(ip->parameters()[Trk::phi] - jp->parameters()[Trk::phi]);
 		  if(dphi>M_PI) dphi = 2*M_PI-dphi;
@@ -234,8 +218,6 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 		  double dR = sqrt(pow((ip->eta() - jp->eta()),2) + pow(dphi,2));
 		  m_dR.push_back(dR);
 		  
-		  //	      msg() << MSG::INFO << "DR Tracks " << dR << endmsg; 
-		  
 		  if ((fabs(jp->pT()) > m_pT_min_iso) && (dR > m_dR0_overlap) && (dR < m_dR0 ) ) {
 		    gotIsoTrack = false;	      
 		    continue;
@@ -260,10 +242,10 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 	    while (phiMIN < 0)      phiMIN += 2*M_PI;
 	    while (phiMAX > 2*M_PI) phiMAX -= 2*M_PI;
 	    
-	    TrigRoiDescriptor _roi( ip->eta(), etaMIN, etaMAX, ip->parameters()[Trk::phi], phiMIN, phiMAX );
+	    TrigRoiDescriptor roi( ip->eta(), etaMIN, etaMAX, ip->parameters()[Trk::phi], phiMIN, phiMAX );
 
 	    // now add ROBs
-	    HLT::ErrorCode ec = m_robSelector->fillPEBInfo(*pebInfo, _roi, &m_dets, &m_nROBs);
+	    HLT::ErrorCode ec = m_robSelector->fillPEBInfo(*pebInfo, roi, &m_dets, &m_nROBs);
 	    if (ec != HLT::OK) return ec;
 	    
 	    
@@ -274,7 +256,7 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
             if(m_trigResults.size()!=0)
                 pebInfo->addSubDetector(m_trigResults);
 
-	    if (!doNotPass){
+	    if (!m_doNotPass){
 	      //generate output here
 	      //addRoI(output);
               HLT::TriggerElement* te = addRoI(output);
@@ -286,8 +268,8 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 	}
     
       m_acceptedEvts++;
-      n_IsoTracks = count_IsoTracks ;  
-      msg() << MSG::DEBUG << "Found "<< n_IsoTracks <<" Isolated ("<< lookForAnyTracks  <<") Tracks" << endmsg;
+      m_n_IsoTracks = count_IsoTracks ;  
+      ATH_MSG_DEBUG( "Found "<< m_n_IsoTracks <<" Isolated ("<< m_lookForAnyTracks  <<") Tracks"  );
     }
     else {
       m_rejectedEvts++;
diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.h b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.h
index 698210574ce8bb4f68f43aac76127c6c7baaee3f..3e15cf1273d39b93b7984c9a6480dc0120cf41f5 100644
--- a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.h
+++ b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.h
@@ -60,7 +60,7 @@ ToolHandle<ITrigROBSelector> m_robSelector;
 
   // Switch on Monitoring:
 
-  int                           n_IsoTracks ;
+  int                           m_n_IsoTracks ;
   std::vector<double>           m_pT ;
   std::vector<double>           m_pT_Iso ;
   std::vector<double>           m_dR ;
@@ -80,9 +80,9 @@ ToolHandle<ITrigROBSelector> m_robSelector;
   double           m_etaLowEdge ;
   double           m_etaWidth ;
   double           m_phiWidth ;
-  std::string      tracksName ;
-  bool             doNotPass ;
-  bool             lookForAnyTracks ;
+  std::string      m_tracksName ;
+  bool             m_doNotPass ;
+  bool             m_lookForAnyTracks ;
 
   
   std::string m_pebLabel;
diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBListWriter.cxx b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBListWriter.cxx
index 7d4fac88258cc0103d9f1e19141a8613325cc71c..0fed097e8d7dedeae3d439d8187c40652a02f040 100755
--- a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBListWriter.cxx
+++ b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBListWriter.cxx
@@ -124,10 +124,10 @@ HLT::ErrorCode TrigROBListWriter::hltExecute(const HLT::TriggerElement* te_in,
   while (phiMin < 0)      phiMin += 2*M_PI;
   while (phiMax > 2*M_PI) phiMax -= 2*M_PI;  // AH HA!! This is wrong! Need in the range -pi .. pi
   
-  TrigRoiDescriptor _roi( roIDescriptor->eta(), etaMin, etaMax, roIDescriptor->phi(), phiMin, phiMax );
+  TrigRoiDescriptor roi( roIDescriptor->eta(), etaMin, etaMax, roIDescriptor->phi(), phiMin, phiMax );
 
   // now add ROBs
-  HLT::ErrorCode ec = m_robSelector->fillPEBInfo(*pebInfo, _roi, &m_dets, &m_nROBs);
+  HLT::ErrorCode ec = m_robSelector->fillPEBInfo(*pebInfo, roi, &m_dets, &m_nROBs);
   if (ec != HLT::OK) return ec;
 
   // Add extra ROBs
diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigSubDetListWriter.h b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigSubDetListWriter.h
index b303300d8396433a23cdc069c5a1cab4e8311a76..97a49cf9235b2a5e50a06f23b81c6fde5fcabe56 100755
--- a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigSubDetListWriter.h
+++ b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigSubDetListWriter.h
@@ -120,14 +120,6 @@ class TrigSubDetListWriter : public HLT::AllTEAlgo
 
     std::string m_outputpath;
 
-    TH1I *m_httemrob;
-    TH1I *m_htthecrob;
-    TH1I *m_htilerob;
-    TH1I *m_hfcalrob;
-    TH1I *m_hpixrob;
-    TH1I *m_hsctrob;
-    TH1I *m_htrtrob;
-
     bool m_rejectAll;
     /** detector mask */
   typedef SimpleProperty< std::vector<uint32_t> > Uint32ArrayProperty;
diff --git a/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/cmt/Makefile b/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/cmt/Makefile
deleted file mode 100644
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/cmt/install.history b/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/cmt/install.history
deleted file mode 100644
index d6ecd72d94175fd2a55800816e362a25a80ff5e1..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/cmt/install.history
+++ /dev/null
@@ -1,27 +0,0 @@
-(i__main__
-LogFile
-p0
-(dp1
-S'_installed_files'
-p2
-(dp3
-S'../../Trigger/TrigAlgorithms/TrigEFLongLivedParticles/genConf/TrigEFLongLivedParticles'
-p4
-(dp5
-S'../../../Trigger/TrigAlgorithms/TrigEFLongLivedParticles/genConf/TrigEFLongLivedParticles/TrigEFLongLivedParticlesConf.py'
-p6
-S'../../../../InstallArea/python/TrigEFLongLivedParticles/TrigEFLongLivedParticlesConf.py'
-p7
-sS'../../../Trigger/TrigAlgorithms/TrigEFLongLivedParticles/genConf/TrigEFLongLivedParticles/TrigEFLongLivedParticles_confDb.py'
-p8
-S'../../../../InstallArea/python/TrigEFLongLivedParticles/TrigEFLongLivedParticles_confDb.py'
-p9
-ssS'../../../../../../../atlas/software/releases/16.6.2/GAUDI/v21r9p3a/GaudiPolicy/cmt/fragments/__init__.py'
-p10
-S'../../../../InstallArea/python/TrigEFLongLivedParticles/__init__.py'
-p11
-sS'../../../../../../afs/cern.ch/atlas/software/releases/16.1.2/GAUDI/v21r9p3a/GaudiPolicy/cmt/fragments/__init__.py'
-p12
-S'../../../../InstallArea/python/TrigEFLongLivedParticles/__init__.py'
-p13
-ssb.
\ No newline at end of file
diff --git a/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/cmt/requirements b/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/cmt/requirements
deleted file mode 100644
index 56b5b8cc0615daa376d7c7ea9d2355fe77a351cf..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/cmt/requirements
+++ /dev/null
@@ -1,39 +0,0 @@
-package TrigEFLongLivedParticles
-
-# =====================================================================
-#
-# This is the Trigger EF Long Lived Particles algorithm package.
-#
-# =====================================================================
-
-author Antonio Policicchio <apolici@cern.ch>
-
-# =====================================================================
-
-use AtlasPolicy             AtlasPolicy-*
-
-use JetEvent                JetEvent-*                   Reconstruction/Jet
-use TrigParticle            TrigParticle-*               Trigger/TrigEvent
-use TrigSteeringEvent       TrigSteeringEvent-*          Trigger/TrigEvent
-use TrigInterfaces          TrigInterfaces-*             Trigger/TrigSteer
-use TrigCaloEvent           TrigCaloEvent-*              Trigger/TrigEvent
-
-private
-use AthenaKernel            AthenaKernel-*               Control
-use GaudiInterface          GaudiInterface-*             External
-use FourMomUtils            FourMomUtils-*               Event
-use xAODJet		    xAODJet-*			 Event/xAOD
-use CaloEvent               CaloEvent-*                  Calorimeter
-use TrigTimeAlgs            TrigTimeAlgs-*               Trigger/TrigTools
-use TrigParticle	    TrigParticle-*		 Trigger/TrigEvent
-
-
-# =====================================================================
-
-apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_runtime_extras extras="*.txt *.xml *.sh *.cfg"
-
-apply_pattern declare_joboptions files="*.txt *.py"
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/doc/packagedoc.h
index 4c90e73abf2011ebd87ccfb099da24edbd690f72..0e273e13b0f63c397e64d1e5c691d7b717cd6f88 100644
--- a/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigEFLongLivedParticles/doc/packagedoc.h
@@ -14,16 +14,6 @@ The TrigLoFRemoval is accessing the EF jet collection and the cal cell container
 It saves the cells associated in PHI with the leading jets for LoF removal in the HYPO
 algorithm TrigLongLivedParticlesHypo/LoFRemovalHypo.h 
 
-@ref used_TrigEFLongLivedParticles
 
-@ref requirements_TrigEFLongLivedParticles
 
 */
-
-/**
-@page used_TrigEFLongLivedParticles Used Packages
-*/
-
-/**
-@page requirements_TrigEFLongLivedParticles Requirements
-*/
diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/cmt/requirements b/Trigger/TrigAlgorithms/TrigEFMissingET/cmt/requirements
deleted file mode 100644
index a31ed500f4b3ebe92d8a6a5ab1e53ca0b6fe6f93..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/cmt/requirements
+++ /dev/null
@@ -1,51 +0,0 @@
-package TrigEFMissingET
-	
-author Kyle Cranmer <cranmer@cern.ch>
-author Rashid Djilkibaev <rd47@nyu.edu>
-author Diego Casadei <Diego.Casadei@cern.ch>
-author Venkat Kaushik <Venkat.Kaushik@cern.ch>
-author Florian U. Bernlochner <florian.bernlochner@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  AtlasROOT                  AtlasROOT-*                     External
-use  CaloDetDescr               CaloDetDescr-*                  Calorimeter
-use  CaloEvent                  CaloEvent-*                     Calorimeter
-use  CaloGeoHelpers             CaloGeoHelpers-*                Calorimeter
-use  CaloIdentifier             CaloIdentifier-*                Calorimeter
-use  CaloInterface              CaloInterface-*                 Calorimeter
-use  GaudiInterface             GaudiInterface-*                External
-use  LArIdentifier              LArIdentifier-*                 LArCalorimeter
-use  LArCabling                 LArCabling-*                    LArCalorimeter
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  TrigMissingEtEvent         TrigMissingEtEvent-*            Trigger/TrigEvent
-use  TrigT2CaloCommon           TrigT2CaloCommon-*              Trigger/TrigAlgorithms
-use  TrigTimeAlgs               TrigTimeAlgs-*                  Trigger/TrigTools
-use  xAODCaloEvent              xAODCaloEvent-*                 Event/xAOD
-use  TrigCaloEvent              TrigCaloEvent-*                 Trigger/TrigEvent
-use  xAODTrigMissingET          xAODTrigMissingET-*                 Event/xAOD
-	
-use  TrigParticle               TrigParticle-*                  Trigger/TrigEvent
-	
-use  xAODJet                    xAODJet-*                       Event/xAOD
-private
-use  CxxUtils                   CxxUtils-*                      Control
-use  DataCollection             DataCollection-*                External
-use  xAODEventInfo              xAODEventInfo-*                 Event/xAOD
-use  EventKernel                EventKernel-*                   Event
-use  Identifier                 Identifier-*                    DetectorDescription
-use  TrigMuonEvent              TrigMuonEvent-*                 Trigger/TrigEvent
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigT1Interfaces           TrigT1Interfaces-*              Trigger/TrigT1
-	
-use  JetEvent                   JetEvent-*                      Reconstruction/Jet
-end_private
-
-
-apply_pattern dual_use_library files=*.cxx
-#apply_pattern declare_runtime
-#apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-
diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigEFMissingET/doc/packagedoc.h
index bd3af7b51766f56d7009ffa4b1e69394ed4b525d..bc5ce84769fc8e7176e1398f54ef48a301afd606 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/doc/packagedoc.h
@@ -126,11 +126,3 @@ EFMissingETFromFEBHeader::EFMissingETFromFEBHeader
 "useFullCollection"        [true]          Use calorimeter load full collection T/F
 
 */
-
-/**
-@page used_TrigEFMissingET Used Packages
-*/
-
-/**
-@page requirements_TrigEFMissingET Requirements
-*/
diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/cmt/requirements b/Trigger/TrigAlgorithms/TrigEgammaRec/cmt/requirements
deleted file mode 100755
index 452e9d40aed5f0f2c2d438e6dbe8bdb43910ed9a..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigEgammaRec/cmt/requirements
+++ /dev/null
@@ -1,47 +0,0 @@
-package TrigEgammaRec
-
-# =====================================================================
-#
-# This is an specific wrapper to execute the egammaRec offline algorithm
-# as an HLT algorithm.
-#
-# =====================================================================
-author Phillip Urquijo <Phillip.Urquijo@cern.ch>
-author (xAOD) Ryan Mackenzie White <ryan.white@cern.ch>
-# =====================================================================
-
-use AtlasPolicy		        AtlasPolicy-* 
-use GaudiInterface              GaudiInterface-*              External
-
-use TrigInterfaces              TrigInterfaces-*	      Trigger/TrigSteer
-use TrigSteeringEvent           TrigSteeringEvent-*           Trigger/TrigEvent
-use egammaInterfaces            egammaInterfaces-*            Reconstruction/egamma
-use egammaRecEvent              egammaRecEvent-*                 Reconstruction/egamma
-use xAODEgamma                  xAODEgamma-*                    Event/xAOD
-# needed for StorageDefinitions template instatiations
-use TrigCaloEvent		TrigCaloEvent-*		      Trigger/TrigEvent
-use TrigParticle		TrigParticle-*		      Trigger/TrigEvent
-
-use RecoToolInterfaces RecoToolInterfaces-* Reconstruction/RecoTools
-use xAODPrimitives     xAODPrimitives-*     Event/xAOD
-use LumiBlockComps          LumiBlockComps-*             LumiBlock
-private
-use egammaEvent                 egammaEvent-*                 Reconstruction/egamma
-use xAODCaloEvent               xAODCaloEvent-*                 Event/xAOD
-use xAODTracking                xAODTracking-*                  Event/xAOD
-use xAODEgammaCnv               xAODEgammaCnv-*                 Event/xAOD
-use CaloEvent                   CaloEvent-*                   Calorimeter
-use TrigTimeAlgs                TrigTimeAlgs-*                Trigger/TrigTools
-use AtlasROOT                   AtlasROOT-*                   External
-use ElectronPhotonSelectorTools ElectronPhotonSelectorTools-* PhysicsAnalysis/ElectronPhotonID
-use xAODEventShape              xAODEventShape-*                Event/xAOD
-public
-# =====================================================================
-
-apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_runtime_extras extras="*.txt *.xml *.sh *.cfg"
-
-apply_pattern declare_joboptions files="*.txt *.py"
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigEgammaRec/doc/packagedoc.h
index 1d93ac87731d63e7cd2b16fb673a8dd57361b3e4..22edadd894f68580c3e87b27f85404aaba731c50 100644
--- a/Trigger/TrigAlgorithms/TrigEgammaRec/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigEgammaRec/doc/packagedoc.h
@@ -14,4 +14,3 @@ This package contains the Event Filter reconstruction trigger algorithms for the
 
 
 */
-
diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py
index 918db58fdf81964acaa30238cc63666b74bf0a9f..f9da70835ae257769e6761176bf51c07163928d7 100644
--- a/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py
+++ b/Trigger/TrigAlgorithms/TrigEgammaRec/python/TrigEgammaToolFactories.py
@@ -143,6 +143,7 @@ from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags
 from egammaMVACalib import egammaMVACalibConf 
 mlog.info("MVA version version %s"%EgammaSliceFlags.calibMVAVersion() )
 mlog.info("Cluster Correction version %s"%EgammaSliceFlags.clusterCorrectionVersion() )
+EgammaSliceFlags.calibMVAVersion.set_On()
 TrigEgammaMVACalibTool = ToolFactory(egammaMVACalibConf.egammaMVATool,name="TrigEgammaMVACalibTool",
         folder=EgammaSliceFlags.calibMVAVersion(),use_layer_corrected = False)
 
diff --git a/Trigger/TrigAlgorithms/TrigEgammaRec/src/TrigEgammaRec.cxx b/Trigger/TrigAlgorithms/TrigEgammaRec/src/TrigEgammaRec.cxx
index ab004f700c9860700d202944816493f8e49ef820..f2a009dc5e61e9997ea1a7e4ca697ad6f58a7bc7 100755
--- a/Trigger/TrigAlgorithms/TrigEgammaRec/src/TrigEgammaRec.cxx
+++ b/Trigger/TrigAlgorithms/TrigEgammaRec/src/TrigEgammaRec.cxx
@@ -204,7 +204,7 @@ TrigEgammaRec::TrigEgammaRec(const std::string& name,ISvcLocator* pSvcLocator):
     
     //Track-related monitoring accesible from xAOD::Electron
     declareMonitoredCollection("nBLayerHits",	         *my_pp_cast <xAODElectronDV_type>(&m_electron_container), &getTrackSummary_numberOfInnermostPixelLayerHits);
-    declareMonitoredCollection("expectBLayerHit",	         *my_pp_cast <xAODElectronDV_type>(&m_electron_container), &getTrackSummary_expectInnermostPixelLayerHit);
+    declareMonitoredCollection("expectInnermostPixelLayerHit",	         *my_pp_cast <xAODElectronDV_type>(&m_electron_container), &getTrackSummary_expectInnermostPixelLayerHit);
     declareMonitoredCollection("nPixelHits",	         *my_pp_cast <xAODElectronDV_type>(&m_electron_container), &getTrackSummary_numberOfPixelHits);
     declareMonitoredCollection("nSCTHits",	         *my_pp_cast <xAODElectronDV_type>(&m_electron_container), &getTrackSummary_numberOfSCTHits);
     declareMonitoredCollection("nBLayerOutliers",	         *my_pp_cast <xAODElectronDV_type>(&m_electron_container), &getTrackSummary_numberOfInnermostPixelLayerOutliers);
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigFastTrackFinder/CMakeLists.txt
index eaecc261b06dcffc0c1504987616ae37158680ed..43e6f51cf3f07361b299dce10e9cb542b6c3700f 100644
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/CMakeLists.txt
+++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/CMakeLists.txt
@@ -15,7 +15,6 @@ atlas_depends_on_subdirs( PUBLIC
                           Trigger/TrigTools/TrigInDetPattRecoTools
                           PRIVATE
                           Control/AthenaBaseComps
-                          Control/CxxUtils
                           Control/StoreGate
                           DetectorDescription/IRegionSelector
                           InnerDetector/InDetConditions/InDetBeamSpotService
@@ -42,7 +41,7 @@ atlas_add_component( TrigFastTrackFinder
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${TBB_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${TBB_LIBRARIES} GaudiKernel TrkEventPrimitives TrigInDetEvent TrigSteeringEvent TrigInterfacesLib TrigInDetPattRecoTools AthenaBaseComps CxxUtils IRegionSelector InDetIdentifier InDetPrepRawData InDetRIO_OnTrack SiSpacePointsSeed InDetRecToolInterfaces TrkParameters TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkToolInterfaces TrigInDetPattRecoEvent FTK_DataProviderInterfaces TrigTimeAlgsLib )
+                     LINK_LIBRARIES ${TBB_LIBRARIES} GaudiKernel TrkEventPrimitives TrigInDetEvent TrigSteeringEvent TrigInterfacesLib TrigInDetPattRecoTools AthenaBaseComps IRegionSelector InDetIdentifier InDetPrepRawData InDetRIO_OnTrack SiSpacePointsSeed InDetRecToolInterfaces TrkParameters TrkRIO_OnTrack TrkTrack TrkTrackSummary TrkToolInterfaces TrigInDetPattRecoEvent FTK_DataProviderInterfaces TrigTimeAlgsLib )
 
 # Install files from the package:
 atlas_install_headers( TrigFastTrackFinder )
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/cmt/requirements b/Trigger/TrigAlgorithms/TrigFastTrackFinder/cmt/requirements
deleted file mode 100644
index 557601407a7e8b7f791420874b8f14466ad9afda..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/cmt/requirements
+++ /dev/null
@@ -1,53 +0,0 @@
-package TrigFastTrackFinder
-
-# =====================================================================
-
-public
-
-# General
-use AtlasPolicy			AtlasPolicy-*
-use GaudiInterface		GaudiInterface-*     External
-
-# Trigger
-use TrigInterfaces              TrigInterfaces-*	 Trigger/TrigSteer
-use TrigInDetEvent		TrigInDetEvent-*	 Trigger/TrigEvent
-use TrigSteeringEvent           TrigSteeringEvent-*      Trigger/TrigEvent
-use TrigInDetPattRecoTools      TrigInDetPattRecoTools-*   Trigger/TrigTools
-
-use TrkEventPrimitives   TrkEventPrimitives-*   Tracking/TrkEvent
-
-# =====================================================================
-
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern component_library
-
-library TrigFastTrackFinder  *.cxx components/*.cxx 
-
-private
-
-# Tracking
-
-use     AtlasTBB                        AtlasTBB-*                      External
-use     CxxUtils            CxxUtils-*         Control
-use     StoreGate            StoreGate-*         Control
-use TrigInDetPattRecoEvent	TrigInDetPattRecoEvent-*   Trigger/TrigEvent
-use 	TrkRIO_OnTrack			TrkRIO_OnTrack-*		Tracking/TrkEvent 
-use     InDetRIO_OnTrack                InDetRIO_OnTrack-*              InnerDetector/InDetRecEvent 
-use	TrkParameters			TrkParameters-*			Tracking/TrkEvent 
-use TrkToolInterfaces           TrkToolInterfaces-*           Tracking/TrkTools
-
-use	InDetRecToolInterfaces		InDetRecToolInterfaces-* 	InnerDetector/InDetRecTools 
-use	IRegionSelector			IRegionSelector-*		DetectorDescription
-use     InDetIdentifier                 InDetIdentifier-*               InnerDetector/InDetDetDescr
-
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-*  Trigger/TrigTools
-use TrkTrack		        TrkTrack-* 		   Tracking/TrkEvent
-use TrigTimeAlgs		TrigTimeAlgs-*		   Trigger/TrigTools
-use InDetBeamSpotService        InDetBeamSpotService-*     InnerDetector/InDetConditions
-use TrkTrackSummary            TrkTrackSummary-*          Tracking/TrkEvent
-
-use AthenaBaseComps              AthenaBaseComps-*	   Control
-use InDetPrepRawData     	 InDetPrepRawData-*	   InnerDetector/InDetRecEvent 
-use SiSpacePointsSeed            SiSpacePointsSeed-*       InnerDetector/InDetRecEvent 
-use   	FTK_DataProviderInterfaces    FTK_DataProviderInterfaces-*    Trigger/TrigFTK
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinderMT_Config.py b/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinderMT_Config.py
deleted file mode 100644
index c4962327944e70101573fda4e8ea390ee8145dce..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/python/TrigFastTrackFinderMT_Config.py
+++ /dev/null
@@ -1,209 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-from TrigFastTrackFinder.TrigFastTrackFinderConf import TrigFastTrackFinderMT
-class TrigFastTrackFinderMTBase(TrigFastTrackFinderMT):
-    __slots__ = []
-    def __init__(self, name="FTF", type= "eGamma"):
-        TrigFastTrackFinderMT.__init__(self,name)
-        remapped_type = "electron"
-        from TrigOnlineSpacePointTool.TrigOnlineSpacePointToolConf import TrigL2LayerNumberTool
-
-        self.retrieveBarCodes = False#Look at truth information for spacepoints from barcodes
-        #self.SignalBarCodes = [10001] #single particles
-        self.SignalBarCodes = [11 ,12] #z->mumu
-        
-        self.useNewLayerNumberScheme = True
-        
-        self.OutputCollectionSuffix = type
-        from AthenaCommon.AppMgr import ToolSvc
-
-        numberingTool = TrigL2LayerNumberTool(name = "TrigL2LayerNumberTool_FTF")
-        numberingTool.UseNewLayerScheme = self.useNewLayerNumberScheme
-        ToolSvc += numberingTool
-        self.LayerNumberTool = numberingTool
-        
-        from InDetTrigRecExample.InDetTrigSliceSettings import InDetTrigSliceSettings
-        if type=="FTK" or type=="FTKRefit":
-          from TrigFTK_RecExample.TrigFTKLoadTools import theFTK_DataProviderSvc
-          self.FTK_DataProviderSvc = theFTK_DataProviderSvc
-          self.FTK_Mode=True
-        if type=="FTKRefit":    
-          self.FTK_Refit=True
-        else:
-          #Spacepoint conversion
-          from TrigOnlineSpacePointTool.TrigOnlineSpacePointToolConf import TrigSpacePointConversionTool
-          spTool = TrigSpacePointConversionTool().clone('TrigSpacePointConversionTool_' + remapped_type)
-          spTool.DoPhiFiltering = InDetTrigSliceSettings[('doSpPhiFiltering',remapped_type)]
-          spTool.UseNewLayerScheme = self.useNewLayerNumberScheme
-          spTool.UseBeamTilt = False
-          spTool.PixelSP_ContainerName = 'PixelSpacePoints'
-          spTool.SCT_SP_ContainerName = 'SCT_SpacePoints'
-          spTool.layerNumberTool = numberingTool
-          ToolSvc += spTool
-          self.SpacePointProviderTool=spTool
-          self.MinSPs = 5 #Only process RoI with more than 5 spacepoints 
-          
-          self.Triplet_MinPtFrac = 1
-          self.Triplet_nMaxPhiSlice = 53
-          if remapped_type=="cosmics":
-            self.Triplet_nMaxPhiSlice = 2 #Divide detector in 2 halves for cosmics
-          
-          self.Triplet_MaxBufferLength = 3
-          self.doSeedRedundancyCheck = InDetTrigSliceSettings[('checkRedundantSeeds',remapped_type)]
-          self.Triplet_D0Max        = InDetTrigSliceSettings[('d0SeedMax',remapped_type)]
-          self.Triplet_D0_PPS_Max   = InDetTrigSliceSettings[('d0SeedPPSMax',remapped_type)] 
-          self.TrackInitialD0Max   = InDetTrigSliceSettings[('d0TrackInitialMax',remapped_type)] 
-          self.TripletDoPSS   = False
-          self.pTmin = InDetTrigSliceSettings[('pTmin',remapped_type)]
-          self.DoubletDR_Max = InDetTrigSliceSettings[('dRdoubletMax',remapped_type)]
-          self.SeedRadBinWidth = InDetTrigSliceSettings[('seedRadBinWidth',remapped_type)]
-          self.doTrigInDetTrack = InDetTrigSliceSettings[('doTrigInDetTrack',remapped_type)]
-
-          if remapped_type=="cosmics":
-            self.Doublet_FilterRZ = False
-
-
-          from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCuts
-          TrackingCuts = EFIDTrackingCuts
-          if remapped_type=="cosmics":
-            from InDetTrigRecExample.ConfiguredNewTrackingTrigCuts import EFIDTrackingCutsCosmics
-            TrackingCuts = EFIDTrackingCutsCosmics
-
-          from InDetRecExample.InDetKeys import InDetKeys
-          from TrkExRungeKuttaPropagator.TrkExRungeKuttaPropagatorConf import Trk__RungeKuttaPropagator as Propagator
-          InDetPatternPropagator = Propagator(name = 'InDetPatternPropagator')
-          ToolSvc += InDetPatternPropagator
-          from TrkMeasurementUpdator_xk.TrkMeasurementUpdator_xkConf import Trk__KalmanUpdator_xk
-          InDetPatternUpdator = Trk__KalmanUpdator_xk(name = 'InDetPatternUpdator')
-          ToolSvc += InDetPatternUpdator
-
-          from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__PixelClusterOnTrackTool
-          PixelClusterOnTrackToolDigital = InDet__PixelClusterOnTrackTool("InDetPixelClusterOnTrackToolDigital",
-                                                                   DisableDistortions = False,
-                                                                   applyNNcorrection = False,
-                                                                   NNIBLcorrection = False,
-                                                                   SplitClusterAmbiguityMap = "",
-                                                                   RunningTIDE_Ambi = False,
-                                                                   ErrorStrategy = 2,
-                                                                   PositionStrategy = 1 
-                                                                   )
-
-          ToolSvc += PixelClusterOnTrackToolDigital
-          from SiClusterOnTrackTool.SiClusterOnTrackToolConf import InDet__SCT_ClusterOnTrackTool
-          SCT_ClusterOnTrackTool = InDet__SCT_ClusterOnTrackTool ("InDetSCT_ClusterOnTrackTool",
-                                                                  CorrectionStrategy = 0,  # do correct position bias
-                                                                  ErrorStrategy      = 2)  # do use phi dependent errors
-          ToolSvc += SCT_ClusterOnTrackTool
-          from TrkRIO_OnTrackCreator.TrkRIO_OnTrackCreatorConf import Trk__RIO_OnTrackCreator
-          InDetRotCreatorDigital = Trk__RIO_OnTrackCreator(name             = 'InDetRotCreatorDigital',
-                                                    ToolPixelCluster = PixelClusterOnTrackToolDigital,
-                                                    ToolSCT_Cluster  = SCT_ClusterOnTrackTool,
-                                                    Mode             = 'indet')
-          ToolSvc += InDetRotCreatorDigital
-          from InDetAssociationTools.InDetAssociationToolsConf import InDet__InDetPRD_AssociationToolGangedPixels
-          InDetPrdAssociationTool = InDet__InDetPRD_AssociationToolGangedPixels(name                           = "InDetPrdAssociationTool",
-                                                                                PixelClusterAmbiguitiesMapName = InDetKeys.GangedPixelMap(),
-                                                                                addTRToutliers                 = True)
-          ToolSvc += InDetPrdAssociationTool
-
-          from AthenaCommon.DetFlags import DetFlags
-          from SiCombinatorialTrackFinderTool_xk.SiCombinatorialTrackFinderTool_xkConf import InDet__SiCombinatorialTrackFinder_xk
-          InDetSiComTrackFinder = InDet__SiCombinatorialTrackFinder_xk(name                  = 'InDetSiComTrackFinder',
-                                                                       PropagatorTool        = InDetPatternPropagator,
-                                                                       UpdatorTool           = InDetPatternUpdator,
-                                                                       RIOonTrackTool        = InDetRotCreatorDigital,
-                                                                       AssosiationTool       = InDetPrdAssociationTool,
-                                                                       usePixel              = True,#DetFlags.haveRIO.pixel_on(),
-                                                                       useSCT                = True,#DetFlags.haveRIO.SCT_on(),
-                                                                       PixManagerLocation    = InDetKeys.PixelManager(),
-                                                                       SCTManagerLocation    = InDetKeys.SCT_Manager(),
-                                                                       PixelClusterContainer = InDetKeys.PixelClusters(),
-                                                                       SCT_ClusterContainer  = InDetKeys.SCT_Clusters())
-          ToolSvc += InDetSiComTrackFinder
-          from SiDetElementsRoadTool_xk.SiDetElementsRoadTool_xkConf import InDet__SiDetElementsRoadMaker_xk
-          InDetSiDetElementsRoadMaker = InDet__SiDetElementsRoadMaker_xk(name               = 'InDetSiRoadMaker_'+remapped_type,
-                                                                         PropagatorTool     = InDetPatternPropagator,
-                                                                         usePixel           = True,#DetFlags.haveRIO.pixel_on(),
-                                                                         PixManagerLocation = InDetKeys.PixelManager(),
-                                                                         useSCT             = True,#DetFlags.haveRIO.SCT_on(), 
-                                                                         SCTManagerLocation = InDetKeys.SCT_Manager(),         
-                                                                         RoadWidth          = 10.0)
-          print InDetSiDetElementsRoadMaker
-          ToolSvc += InDetSiDetElementsRoadMaker
-
-          from SiTrackMakerTool_xk.SiTrackMakerTool_xkConf import InDet__SiTrackMaker_xk as SiTrackMaker
-          TrackMaker_FTF = SiTrackMaker(name                      = 'InDetTrigSiTrackMaker_FTF_'+remapped_type,
-                                           RoadTool                  = InDetSiDetElementsRoadMaker,
-                                           CombinatorialTrackFinder  = InDetSiComTrackFinder,
-                                           pTmin          = InDetTrigSliceSettings[('pTmin',remapped_type)],
-                                           nClustersMin   = TrackingCuts.minClusters(),
-                                           nHolesMax      = TrackingCuts.nHolesMax(),
-                                           nHolesGapMax   = TrackingCuts.nHolesGapMax(),
-                                           SeedsFilterLevel = 0, # Do not use built-in seeds filter
-                                           Xi2max         = TrackingCuts.Xi2max(),
-                                           Xi2maxNoAdd    = TrackingCuts.Xi2maxNoAdd(),
-                                           nWeightedClustersMin= TrackingCuts.nWeightedClustersMin(),
-                                           Xi2maxMultiTracks         = TrackingCuts.Xi2max(),
-                                           UseAssociationTool       = False)
-
-          from InDetRecExample.InDetJobProperties import InDetFlags
-          if not InDetFlags.doCaloSeededBrem():
-            TrackMaker_FTF.InputClusterContainerName = ""
-            TrackMaker_FTF.InputHadClusterContainerName = ""
-
-          from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-          if type=='eGamma' and InDetTrigFlags.doBremRecovery():
-            TrackMaker_FTF.useBremModel = True
-  
-          if remapped_type=="cosmics":
-            TrackMaker_FTF.RoadTool.CosmicTrack=True
-
-          ToolSvc += TrackMaker_FTF
-          self.initialTrackMaker = TrackMaker_FTF
-
-          from TrigInDetTrackFitter.TrigInDetTrackFitterConf import TrigInDetTrackFitter
-          theTrigInDetTrackFitter = TrigInDetTrackFitter()
-          #theTrigInDetTrackFitter.correctClusterPos = False #Flag to control whether to correct cluster position
-          theTrigInDetTrackFitter.correctClusterPos = True  #temporarily to true to improve err(z0) estimates
-
-            
-
-          theTrigInDetTrackFitter.ROTcreator = InDetRotCreatorDigital
-          ToolSvc += theTrigInDetTrackFitter
-          self.trigInDetTrackFitter = theTrigInDetTrackFitter
-          from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-          if type=='eGamma' and InDetTrigFlags.doBremRecovery():
-            theTrigInDetTrackFitterBrem = TrigInDetTrackFitter(name='theTrigInDetTrackFitterBrem',
-                                                               doBremmCorrection = True)
-            ToolSvc += theTrigInDetTrackFitterBrem
-            self.trigInDetTrackFitter = theTrigInDetTrackFitterBrem
-
-          self.doZFinder = InDetTrigSliceSettings[('doZFinder',remapped_type)]
-          if (self.doZFinder):
-            from IDScanZFinder.IDScanZFinderConf import TrigZFinder
-            theTrigZFinder = TrigZFinder()
-            theTrigZFinder.NumberOfPeaks = 3
-            theTrigZFinder.LayerNumberTool=numberingTool
-            
-            theTrigZFinder.FullScanMode = True #TODO: know this from the RoI anyway - should set for every event
-            ToolSvc += theTrigZFinder
-            self.trigZFinder = theTrigZFinder
-            self.doFastZVertexSeeding = True
-            self.zVertexResolution = 7.5
-          
-          from TrigInDetConf.TrigInDetRecCommonTools import InDetTrigFastTrackSummaryTool
-          self.TrackSummaryTool = InDetTrigFastTrackSummaryTool
-
-          if remapped_type == "tauCore":
-            from TrigInDetConf.TrigInDetRecCommonTools import InDetTrigTrackSummaryToolWithHoleSearch
-            self.TrackSummaryTool = InDetTrigTrackSummaryToolWithHoleSearch
-
-          from TrigInDetTrackFitter.TrigInDetTrackFitterConf import TrigL2ResidualCalculator
-          resCalc = TrigL2ResidualCalculator(OfflineClusters=False)
-          ToolSvc += resCalc
-          self.TrigL2ResidualCalculator = resCalc
-          self.doCloneRemoval = InDetTrigSliceSettings[('doCloneRemoval',remapped_type)]
-
-class TrigFastTrackFinderMT_eGamma(TrigFastTrackFinderMTBase):
-  def __init__(self, name = "TrigFastTrackFinderMT_eGamma"):
-    TrigFastTrackFinderMTBase.__init__(self, "TrigFastTrackFinderMT_eGamma","eGamma")
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx
index 2aa8b4311d698e28eaa2e0af9b753169606d09ea..b9ba44fc7e6122e946799c5c73fbea74d23c48ba 100644
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx
+++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.cxx
@@ -15,6 +15,7 @@
 #include <iostream>
 #include <algorithm>
 #include <array>
+#include <memory>
 
 #include <tbb/parallel_for.h>
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
@@ -70,9 +71,8 @@
 #include "TrigInDetToolInterfaces/ITrigZFinder.h"
 
 #include "SiSpacePointsSeed/SiSpacePointsSeed.h"
-#include "TrigFastTrackFinder/TrigFastTrackFinder.h"
+#include "src/TrigFastTrackFinder.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
-#include "CxxUtils/make_unique.h"
 
 TrigFastTrackFinder::TrigFastTrackFinder(const std::string& name, ISvcLocator* pSvcLocator) : 
 
@@ -440,7 +440,6 @@ StatusCode TrigFastTrackFinder::execute() {
   m_countTotalRoI++;
   m_tcs.roiDescriptor = &internalRoI;
 
-  m_outputTracksKey = m_attachedFeatureName;
   SG::WriteHandle<TrackCollection> outputTracks(m_outputTracksKey);
   outputTracks = std::make_unique<TrackCollection>();
 
@@ -518,7 +517,7 @@ StatusCode TrigFastTrackFinder::findTracks(const TrigRoiDescriptor& roi,
       m_countRoIwithEnoughHits++;
       m_countRoIwithTracks++;
       // fill vectors of quantities to be monitored
-      fillMon(outputTracks);
+      fillMon(outputTracks, roi);
     }
     m_nTracks=outputTracks.size();
 
@@ -545,7 +544,7 @@ StatusCode TrigFastTrackFinder::findTracks(const TrigRoiDescriptor& roi,
 
     m_currentStage = 2;
     
-    std::unique_ptr<TrigRoiDescriptor> superRoi = CxxUtils::make_unique<TrigRoiDescriptor>();
+    std::unique_ptr<TrigRoiDescriptor> superRoi = std::make_unique<TrigRoiDescriptor>();
 
     if (m_doZFinder) {
       if (m_doFTKZFinder ) {
@@ -846,7 +845,7 @@ StatusCode TrigFastTrackFinder::findTracks(const TrigRoiDescriptor& roi,
       m_countRoIwithTracks++;
 
     ///////////// fill vectors of quantities to be monitored
-    fillMon(outputTracks);
+    fillMon(outputTracks, roi);
 
     m_currentStage = 7;
 
@@ -1073,12 +1072,6 @@ HLT::ErrorCode TrigFastTrackFinder::getRoI(const HLT::TriggerElement* outputTE,
   }
 
   roi = externalRoI;
-  m_roiEta = roi->eta();
-  m_roiEtaWidth = roi->etaPlus() - roi->etaMinus();
-  m_roiPhi = roi->phi();
-  m_roiPhiWidth = HLT::wrapPhi(roi->phiPlus() - roi->phiMinus());
-  m_roiZ = roi->zed();
-  m_roiZ_Width = roi->zedPlus() - roi->zedMinus();
   ATH_MSG_DEBUG("REGTEST / RoI" << *roi);
 
   return HLT::OK;
@@ -1168,7 +1161,7 @@ void TrigFastTrackFinder::calculateRecoEfficiency(const std::vector<TrigSiSpaceP
   } 
 }
 
-void TrigFastTrackFinder::fillMon(const TrackCollection& tracks) {
+void TrigFastTrackFinder::fillMon(const TrackCollection& tracks, const TrigRoiDescriptor& roi) {
   size_t size = tracks.size();
   m_trk_pt.reserve(size);
   m_trk_a0.reserve(size);
@@ -1182,6 +1175,15 @@ void TrigFastTrackFinder::fillMon(const TrackCollection& tracks) {
   m_trk_a0beam.reserve(size);
   m_trk_dPhi0.reserve(size);
   m_trk_dEta.reserve(size);
+
+  m_roiEta = roi.eta();
+  m_roiEtaWidth = roi.etaPlus() - roi.etaMinus();
+  m_roiPhi = roi.phi();
+  m_roiPhiWidth = HLT::wrapPhi(roi.phiPlus() - roi.phiMinus());
+  m_roiZ = roi.zed();
+  m_roiZ_Width = roi.zedPlus() - roi.zedMinus();
+
+
   for (auto track : tracks) {
     const Trk::TrackParameters* trackPars = track->perigeeParameters();
     if(trackPars==nullptr) {
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/TrigFastTrackFinder/TrigFastTrackFinder.h b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h
similarity index 98%
rename from Trigger/TrigAlgorithms/TrigFastTrackFinder/TrigFastTrackFinder/TrigFastTrackFinder.h
rename to Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h
index d0b05209244f648adeb66f527d9dbaa877d64cb6..93b28643868daa702b1527987d1518552af4b9e5 100644
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/TrigFastTrackFinder/TrigFastTrackFinder.h
+++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinder.h
@@ -165,7 +165,7 @@ protected:
 
   int m_roi_nSPs;
 
-  double m_roiPhi, m_roiEta, m_roiZ;  
+  double m_roiPhi, m_roiEta, m_roiZ;
   double m_roiPhiWidth, m_roiEtaWidth, m_roiZ_Width;  
   double m_timePattReco;
 
@@ -226,7 +226,7 @@ protected:
 
   // Monitoring member functions 
 
-  void fillMon(const TrackCollection& tracks);
+  void fillMon(const TrackCollection& tracks, const TrigRoiDescriptor& roi);
   void runResidualMonitoring(const Trk::Track& track);
 
   void calculateRecoEfficiency(const std::vector<TrigSiSpacePointBase>&,
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinderMT.cxx b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinderMT.cxx
deleted file mode 100644
index 9db45cd8ec4b270b0b1bedecf92c52c81d07504a..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinderMT.cxx
+++ /dev/null
@@ -1,1297 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/////////////////////////////////////////////////////////////////////////////////
-// TrigFastTrackFinder.cxx
-// -------------------------------
-// ATLAS Collaboration
-//
-// package created 16/04/2013 by Dmitry Emeliyanov (see ChangeLog for more details)
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include <cmath>
-#include <iostream>
-#include <algorithm>
-#include <memory>
-#include <array>
-
-#include <tbb/parallel_for.h>
-#include "TrigSteeringEvent/TrigRoiDescriptor.h"
-#include "TrigSteeringEvent/PhiHelper.h"
-
-#include "TrigTimeAlgs/TrigTimerSvc.h"
-
-#include "TrigInDetEvent/TrigVertex.h"
-#include "TrigInDetEvent/TrigVertexCollection.h"
-
-#include "TrkTrack/TrackCollection.h"
-#include "TrkTrack/Track.h"
-#include "TrkRIO_OnTrack/RIO_OnTrack.h"
-#include "InDetPrepRawData/SCT_Cluster.h"
-#include "InDetPrepRawData/PixelCluster.h"
-#include "InDetRIO_OnTrack/SiClusterOnTrack.h" 
-
-#include "TrkParameters/TrackParameters.h" 
-#include "TrkTrack/Track.h" 
-#include "TrkTrack/TrackInfo.h" 
-
-#include "TrkTrackSummary/TrackSummary.h"
-#include "TrkToolInterfaces/ITrackSummaryTool.h"
-#include "FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h"
-
-#include "IRegionSelector/IRegSelSvc.h"
-
-#include "TrigInDetEvent/TrigSiSpacePointBase.h"
-
-#include "InDetBeamSpotService/IBeamCondSvc.h"
-
-#include "InDetIdentifier/SCT_ID.h"
-#include "InDetIdentifier/PixelID.h" 
-
-#include "TrigInDetPattRecoEvent/TrigL2TimeoutException.h"
-#include "TrigInDetPattRecoEvent/TrigInDetTriplet.h"
-
-
-#include "InDetRecToolInterfaces/ISiTrackMaker.h" 
-#include "TrigInDetPattRecoTools/TrigCombinatorialSettings.h"
-#include "TrigInDetPattRecoTools/TrigTrackSeedGenerator.h"
-
-#include "TrigInDetToolInterfaces/ITrigL2LayerNumberTool.h"
-#include "TrigInDetToolInterfaces/ITrigSpacePointConversionTool.h"
-#include "TrigInDetToolInterfaces/ITrigL2SpacePointTruthTool.h"
-#include "TrigInDetToolInterfaces/ITrigL2ResidualCalculator.h"
-#include "TrigInDetToolInterfaces/TrigL2HitResidual.h"
-
-#include "TrigInDetToolInterfaces/ITrigInDetTrackFitter.h"
-#include "TrigInDetToolInterfaces/ITrigZFinder.h"
-
-#include "SiSpacePointsSeed/SiSpacePointsSeed.h"
-#include "../src/TrigFastTrackFinderMT.h"
-#include "AthenaBaseComps/AthMsgStreamMacros.h"
-
-TrigFastTrackFinderMT::TrigFastTrackFinderMT(const std::string& name, ISvcLocator* pSvcLocator) : 
-
-  HLT::FexAlgo(name, pSvcLocator), 
-  m_numberingTool("TrigL2LayerNumberTool"), 
-  m_spacePointTool("TrigSpacePointConversionTool"),
-  m_TrigL2SpacePointTruthTool("TrigL2SpacePointTruthTool"),
-  m_trigL2ResidualCalculator("TrigL2ResidualCalculator"),
-  m_trackMaker("InDet::SiTrackMaker_xk/InDetTrigSiTrackMaker"),
-  m_trigInDetTrackFitter("TrigInDetTrackFitter"),
-  m_trigZFinder("TrigZFinder"),
-  m_trackSummaryTool("Trk::ITrackSummaryTool/ITrackSummaryTool"),
-  m_ftkDataProviderSvc("TrigFTK_DataProviderSvc",name),
-  m_shift_x(0.0),
-  m_shift_y(0.0),
-  m_doCloneRemoval(true),
-  m_ftkMode(false),
-  m_ftkRefit(false),
-  m_useBeamSpot(true),
-  m_nfreeCut(5), 
-  m_iBeamCondSvc(nullptr),
-  m_nTracks(0),
-  m_nPixSPsInRoI(0),
-  m_nSCTSPsInRoI(0),
-  m_currentStage(-1),
-  m_SpacePointConversionTimer(nullptr),
-  m_ZFinderTimer(nullptr),
-  m_PatternRecoTimer(nullptr), 
-  m_TripletMakingTimer(nullptr), 
-  m_CombTrackingTimer(nullptr), 
-  m_TrackFitterTimer(nullptr), 
-  m_attachedFeatureName(""),
-  m_attachedFeatureName_TIDT(""),
-  m_outputCollectionSuffix(""),
-  m_countTotalRoI(0),
-  m_countRoIwithEnoughHits(0),
-  m_countRoIwithTracks(0),
-  m_nSignalPresent(0),
-  m_nSignalDetected(0),
-  m_nSignalTracked(0),
-  m_nSignalClones(0),
-  m_minSignalSPs(0),
-  m_pixelId(0),
-  m_sctId(0),
-  m_idHelper(0),
-  m_particleHypothesis(Trk::pion),
-  m_useNewLayerNumberScheme(false)
-{
-
-  /** Doublet finding properties. */
-  declareProperty("Doublet_FilterRZ",            m_tcs.m_doubletFilterRZ = true);
-  declareProperty("DoubletDR_Max",            m_tcs.m_doublet_dR_Max = 270.0);
-  declareProperty("SeedRadBinWidth",            m_tcs.m_seedRadBinWidth = 2.0);
-
-  /** Triplet finding properties. */
-
-  declareProperty("Triplet_D0Max",            m_tcs.m_tripletD0Max      = 4.0);
-  declareProperty("Triplet_D0_PPS_Max",       m_tcs.m_tripletD0_PPS_Max = 1.7);
-  declareProperty("Triplet_nMaxPhiSlice",     m_tcs.m_nMaxPhiSlice = 53);
-  declareProperty("Triplet_MaxBufferLength",     m_tcs.m_maxTripletBufferLength = 3);
-  declareProperty("TripletDoPSS",            m_tcs.m_tripletDoPSS = false);
-
-  declareProperty("Triplet_DtCut",            m_tcs.m_tripletDtCut      = 10.0);//i.e. 10*sigma_MS
-
-  declareProperty( "VertexSeededMode",    m_vertexSeededMode = false);
-  declareProperty( "doZFinder",           m_doZFinder = true);
-   declareProperty( "doFTKZFinder",           m_doFTKZFinder = false);
-   declareProperty( "doFTKFastVtxFinder",           m_doFTKFastVtxFinder = false);
-
-  declareProperty( "doFastZVertexSeeding",           m_doFastZVseeding = true);
-  declareProperty( "zVertexResolution",           m_tcs.m_zvError = 10.0);
-
-  declareProperty("Triplet_MinPtFrac",        m_tripletMinPtFrac = 0.3);
-  declareProperty("pTmin",                    m_pTmin = 1000.0);
-  declareProperty("TrackInitialD0Max",            m_initialD0Max      = 10.0);
-
-  declareProperty("doSeedRedundancyCheck",            m_checkSeedRedundancy = false);
-
-  declareProperty( "MinHits",               m_minHits = 5 );
-
-  declareProperty( "OutputCollectionSuffix",m_outputCollectionSuffix = "");
-  declareProperty("TracksName", 
-                  m_outputTracksKey = std::string("TrigFastTrackFinder_Tracks"),
-                  "TrackCollection name");
-
-  declareProperty("RoIs", m_roiCollectionKey = std::string("OutputRoIs"), "RoIs to read in");
- 
-  declareProperty( "UseBeamSpot",           m_useBeamSpot = true);
-  declareProperty( "FreeClustersCut"   ,m_nfreeCut      );
-  declareProperty( "SpacePointProviderTool", m_spacePointTool  );
-  declareProperty( "LayerNumberTool", m_numberingTool  );
-
-  declareProperty( "initialTrackMaker", m_trackMaker);
-  declareProperty( "trigInDetTrackFitter",   m_trigInDetTrackFitter );
-  declareProperty( "trigZFinder",   m_trigZFinder );
-
-  declareProperty("TrackSummaryTool", m_trackSummaryTool);
-  declareProperty( "TrigL2SpacePointTruthTool", m_TrigL2SpacePointTruthTool);
-  declareProperty( "retrieveBarCodes", m_retrieveBarCodes = false);
-  declareProperty( "SignalBarCodes", m_vSignalBarCodes);
-  declareProperty( "MinSignalSPs", m_minSignalSPs = 3);
-  declareProperty( "doResMon",       m_doResMonitoring = true);
-
-  declareProperty("doCloneRemoval", m_doCloneRemoval = true);
-
-  declareProperty("FTK_Mode",            m_ftkMode = false);
-  declareProperty("FTK_DataProviderService",             m_ftkDataProviderSvc);
-  declareProperty("FTK_Refit",           m_ftkRefit = false);
-
-  declareProperty("useNewLayerNumberScheme", m_useNewLayerNumberScheme = false);
-
-  // declare monitoring histograms
-
-  declareMonitoredStdContainer("trk_pt",         m_trk_pt);
-  declareMonitoredStdContainer("trk_a0",         m_trk_a0);
-  declareMonitoredStdContainer("trk_z0",         m_trk_z0);
-  declareMonitoredStdContainer("trk_phi0",       m_trk_phi0);
-  declareMonitoredStdContainer("trk_eta",        m_trk_eta);
-  declareMonitoredStdContainer("trk_chi2dof",    m_trk_chi2dof);
-  declareMonitoredStdContainer("trk_nSiHits",    m_trk_nSiHits);
-  declareMonitoredStdContainer("trk_nPIXHits",   m_trk_nPIXHits);
-  declareMonitoredStdContainer("trk_nSCTHits",   m_trk_nSCTHits);
-  declareMonitoredStdContainer("trk_a0beam",     m_trk_a0beam);
-  declareMonitoredStdContainer("trk_dPhi0",      m_trk_dPhi0);
-  declareMonitoredStdContainer("trk_dEta" ,      m_trk_dEta);
-
-  declareMonitoredVariable("roi_nSeeds",m_nSeeds);
-  declareMonitoredVariable("roi_nTracks",m_nTracks);
-  declareMonitoredVariable("roi_nSPsPIX",m_nPixSPsInRoI);
-  declareMonitoredVariable("roi_nSPsSCT",m_nSCTSPsInRoI);
-  declareMonitoredVariable("roi_lastStageExecuted",m_currentStage);
-  declareMonitoredVariable("roi_eta", m_roiEta);
-  declareMonitoredVariable("roi_etaWidth", m_roiEtaWidth);
-  declareMonitoredVariable("roi_phi", m_roiPhi);
-  declareMonitoredVariable("roi_phiWidth", m_roiPhiWidth);
-  declareMonitoredVariable("roi_z", m_roiZ);
-  declareMonitoredVariable("roi_zWidth", m_roiZ_Width);
-  declareMonitoredVariable("roi_nSPs", m_roi_nSPs);
-  declareMonitoredVariable("time_PattRecoOnly",m_timePattReco);
-
-  // Z-vertexing 
-  declareMonitoredVariable("roi_nZvertices",m_nZvertices);
-  declareMonitoredStdContainer("roi_zVertices",m_zVertices);
-  declareMonitoredStdContainer("roi_nTrk_zVtx",m_nTrk_zVtx);
-  ////Spacepoints
-  //declareMonitoredStdContainer("sp_x" ,m_sp_x);
-  //declareMonitoredStdContainer("sp_y" ,m_sp_y);
-  //declareMonitoredStdContainer("sp_z" ,m_sp_z);
-  //declareMonitoredStdContainer("sp_r" ,m_sp_r);
-
-  //Unbiased residuals
-  declareMonitoredStdContainer("hit_IBLPhiResidual",m_iblResPhi);
-  declareMonitoredStdContainer("hit_IBLEtaResidual",m_iblResEta);
-  declareMonitoredStdContainer("hit_IBLPhiPull",    m_iblPullPhi);
-  declareMonitoredStdContainer("hit_IBLEtaPull",    m_iblPullEta);
-  declareMonitoredStdContainer("hit_PIXBarrelPhiResidual",m_pixResPhiBarrel);
-  declareMonitoredStdContainer("hit_PIXBarrelEtaResidual",m_pixResEtaBarrel);
-  declareMonitoredStdContainer("hit_PIXBarrelPhiPull",    m_pixPullPhiBarrel);
-  declareMonitoredStdContainer("hit_PIXBarrelEtaPull",    m_pixPullEtaBarrel);
-  declareMonitoredStdContainer("hit_SCTBarrelResidual",   m_sctResBarrel);
-  declareMonitoredStdContainer("hit_SCTBarrelPull",       m_sctPullBarrel);
-  declareMonitoredStdContainer("hit_PIXEndCapPhiResidual",m_pixResPhiEC);
-  declareMonitoredStdContainer("hit_PIXEndCapEtaResidual",m_pixResEtaEC);
-  declareMonitoredStdContainer("hit_PIXEndCapPhiPull",    m_pixPullPhiEC);
-  declareMonitoredStdContainer("hit_PIXEndCapEtaPull",    m_pixPullEtaEC);
-  declareMonitoredStdContainer("hit_SCTEndCapResidual",   m_sctResEC);
-  declareMonitoredStdContainer("hit_SCTEndCapPull",       m_sctPullEC);
-
-  declareMonitoredStdContainer("hit_PIXBarrelL1PhiResidual",m_pixResPhiBarrelL1);
-  declareMonitoredStdContainer("hit_PIXBarrelL1EtaResidual",m_pixResEtaBarrelL1);
-  declareMonitoredStdContainer("hit_PIXBarrelL2PhiResidual",m_pixResPhiBarrelL2);
-  declareMonitoredStdContainer("hit_PIXBarrelL2EtaResidual",m_pixResEtaBarrelL2);
-  declareMonitoredStdContainer("hit_PIXBarrelL3PhiResidual",m_pixResPhiBarrelL3);
-  declareMonitoredStdContainer("hit_PIXBarrelL3EtaResidual",m_pixResEtaBarrelL3);
-
-  declareMonitoredStdContainer("hit_PIXEndCapL1PhiResidual",m_pixResPhiECL1);
-  declareMonitoredStdContainer("hit_PIXEndCapL1EtaResidual",m_pixResEtaECL1);
-  declareMonitoredStdContainer("hit_PIXEndCapL2PhiResidual",m_pixResPhiECL2);
-  declareMonitoredStdContainer("hit_PIXEndCapL2EtaResidual",m_pixResEtaECL2);
-  declareMonitoredStdContainer("hit_PIXEndCapL3PhiResidual",m_pixResPhiECL3);
-  declareMonitoredStdContainer("hit_PIXEndCapL3EtaResidual",m_pixResEtaECL3);
-
-  
-}
-
-//--------------------------------------------------------------------------
-
-TrigFastTrackFinderMT::~TrigFastTrackFinderMT() {}
-
-//-----------------------------------------------------------------------
-//
-
-
-//-------------------------------------------------------------------------
-
-HLT::ErrorCode TrigFastTrackFinderMT::hltInitialize() {
-
-  if (m_roiCollectionKey.initialize().isFailure() ) {
-    return HLT::BAD_JOB_SETUP;
-  }
-  if (m_outputTracksKey.initialize().isFailure() ) {
-    return HLT::BAD_JOB_SETUP;
-  }
-
-  if ( timerSvc() ) {
-    m_SpacePointConversionTimer = addTimer("SpacePointConversion"); 
-    m_ZFinderTimer              = addTimer("ZFinder"); 
-    m_PatternRecoTimer          = addTimer("PattReco","PattReco_nSP");
-    m_TripletMakingTimer        = addTimer("Triplets","Triplets_nSP");
-    m_CombTrackingTimer         = addTimer("CmbTrack","CmbTrack_nTr");
-    m_TrackFitterTimer          = addTimer("TrackFitter","TrackFitter_nTracks");
-  }
-
-  if(m_ftkMode) {
-    StatusCode sc= m_ftkDataProviderSvc.retrieve();
-    if(sc.isFailure()) {
-      ATH_MSG_ERROR("unable to locate FTK_DataProviderSvc" << m_ftkDataProviderSvcName);
-      return HLT::BAD_JOB_SETUP;
-    } else {
-      ATH_MSG_INFO("Configured to retrieve FTK tracks from " << m_ftkDataProviderSvcName);
-    }
-  } else {
-
-    StatusCode sc= m_trackSummaryTool.retrieve();
-    if(sc.isFailure()) {
-      ATH_MSG_ERROR("unable to locate track summary tool");
-      return HLT::BAD_JOB_SETUP;
-    }
-    
-    ATH_MSG_DEBUG(" TrigFastTrackFinder : MinHits set to " << m_minHits);
-    
-    if (m_useBeamSpot) {
-      StatusCode scBS = service("BeamCondSvc", m_iBeamCondSvc);
-      if (scBS.isFailure() || m_iBeamCondSvc == 0) {
-	m_iBeamCondSvc = 0;
-	ATH_MSG_WARNING("Could not retrieve Beam Conditions Service. ");
-      }
-    }
-    
-    sc=m_numberingTool.retrieve(); 
-    if(sc.isFailure()) { 
-      ATH_MSG_ERROR("Could not retrieve "<<m_numberingTool); 
-      return HLT::BAD_JOB_SETUP;
-    } 
-    
-    sc = m_spacePointTool.retrieve();
-    if(sc.isFailure()) { 
-      ATH_MSG_ERROR("Could not retrieve "<<m_spacePointTool); 
-      return HLT::BAD_JOB_SETUP;
-    }
-    
-    sc = m_trackMaker.retrieve();
-    if(sc.isFailure()) {
-      ATH_MSG_ERROR("Could not retrieve "<<m_trackMaker); 
-      return HLT::BAD_JOB_SETUP;
-    }
-    sc = m_trigInDetTrackFitter.retrieve();
-    if(sc.isFailure()) {
-      ATH_MSG_ERROR("Could not retrieve "<<m_trigInDetTrackFitter); 
-      return HLT::BAD_JOB_SETUP;
-    }
-    
-    ATH_MSG_DEBUG("In Initialize m_doZFinder, m_doFTKZFinder " << m_doZFinder << " " << m_doFTKZFinder);
-
-    if (m_doZFinder) {
-      sc = m_trigZFinder.retrieve();
-      if(sc.isFailure()) {
-	ATH_MSG_ERROR("Could not retrieve "<<m_trigZFinder); 
-	return HLT::BAD_JOB_SETUP;
-      }
-    }
-    if(m_doFTKZFinder ) {
-      StatusCode sc= m_ftkDataProviderSvc.retrieve();
-      if(sc.isFailure()) {
-        ATH_MSG_ERROR("unable to locate FTK_DataProviderSvc" << m_ftkDataProviderSvcName);
-        return HLT::BAD_JOB_SETUP;
-      } else {
-        ATH_MSG_INFO("Configured to retrieve FTK tracks from " << m_ftkDataProviderSvcName);
-      }
-    }
-
-
-    sc = m_trigL2ResidualCalculator.retrieve();
-    if ( sc.isFailure() ) {
-      msg() << MSG::FATAL <<"Unable to locate Residual calculator tool " << m_trigL2ResidualCalculator << endmsg;
-      return HLT::BAD_JOB_SETUP;
-    }
-  }
-
-  //Get ID helper
-  if (detStore()->retrieve(m_idHelper, "AtlasID").isFailure()) {
-    ATH_MSG_ERROR("Could not get AtlasDetectorID helper AtlasID");
-    return HLT::BAD_JOB_SETUP;
-  }
-  
-  if (detStore()->retrieve(m_pixelId, "PixelID").isFailure()) {
-    ATH_MSG_ERROR("Could not get Pixel ID helper");
-    return HLT::BAD_JOB_SETUP;
-  }
-  
-  if (detStore()->retrieve(m_sctId, "SCT_ID").isFailure()) { 
-    ATH_MSG_ERROR("Could not get Pixel ID helper");
-    return StatusCode::FAILURE;
-  }
-
-  
-  if ( m_outputCollectionSuffix != "" ) {
-    m_attachedFeatureName = std::string("TrigFastTrackFinder_") + m_outputCollectionSuffix;
-    m_attachedFeatureName_TIDT = std::string("TrigFastTrackFinder_TrigInDetTrack") + m_outputCollectionSuffix;
-  }
-  else {
-    m_attachedFeatureName      = std::string("TrigFastTrackFinder_");
-    m_attachedFeatureName_TIDT = std::string("TrigFastTrackFinder_TrigInDetTrack");
-  }
-
-  if (m_retrieveBarCodes) {
-    m_nSignalPresent=0;
-    m_nSignalDetected=0;
-    m_nSignalTracked=0;
-    m_nSignalClones=0;
-    StatusCode sc = m_TrigL2SpacePointTruthTool.retrieve();
-    if ( sc.isFailure() ) {
-      ATH_MSG_FATAL("Unable to locate SpacePoint-to-Truth associator tool " << m_TrigL2SpacePointTruthTool);
-      return HLT::BAD_JOB_SETUP;
-    }
-  }
-  
-  ATH_MSG_DEBUG(" Feature set recorded with Key " << m_attachedFeatureName);
-  ATH_MSG_DEBUG(" Feature set recorded with Key " << m_attachedFeatureName_TIDT);
-  ATH_MSG_DEBUG(" doResMon " << m_doResMonitoring);
-  ATH_MSG_DEBUG(" Initialized successfully"); 
-  return HLT::OK;
-}
-
-
-//-------------------------------------------------------------------------
-
-HLT::ErrorCode TrigFastTrackFinderMT::hltBeginRun()
-{
-  ATH_MSG_DEBUG("At BeginRun of " << name());
-
-  //getting magic numbers from the layer numbering tool
-
-  m_tcs.m_maxBarrelPix    = m_numberingTool->offsetBarrelSCT();
-  m_tcs.m_minEndcapPix    = m_numberingTool->offsetEndcapPixels(); 
-  m_tcs.m_maxEndcapPix    = m_numberingTool->offsetEndcapSCT();
-  m_tcs.m_maxSiliconLayer = m_numberingTool->maxSiliconLayerNum();
-  m_tcs.m_layerGeometry.clear();
-
-  if(m_useNewLayerNumberScheme) {
-    const std::vector<TRIG_INDET_SI_LAYER>* pVL = m_numberingTool->layerGeometry();
-    std::copy(pVL->begin(),pVL->end(),std::back_inserter(m_tcs.m_layerGeometry));
-  }
-
-  return HLT::OK;
-}
-
-//-------------------------------------------------------------------------
-
-StatusCode TrigFastTrackFinderMT::execute() {
-  //RoI preparation/update 
-  SG::ReadHandle<TrigRoiDescriptorCollection> roiCollection(m_roiCollectionKey);
-  ATH_CHECK(roiCollection.isValid());
-  TrigRoiDescriptorCollection::const_iterator roi = roiCollection->begin();
-  TrigRoiDescriptorCollection::const_iterator roiE = roiCollection->end();
-  TrigRoiDescriptor internalRoI;
-  for (; roi != roiE; ++roi) {
-    internalRoI.push_back(*roi);
-  }
-  internalRoI.manageConstituents(false);//Don't try to delete RoIs at the end
-  m_currentStage = 1;
-  m_countTotalRoI++;
-  m_tcs.roiDescriptor = &internalRoI;
-
-  m_outputTracksKey = m_attachedFeatureName;
-  SG::WriteHandle<TrackCollection> outputTracks(m_outputTracksKey);
-  outputTracks = std::make_unique<TrackCollection>();
-
-  ATH_CHECK(findTracks(internalRoI, *outputTracks));
-  
-  return StatusCode::SUCCESS;
-}
-
-HLT::ErrorCode TrigFastTrackFinderMT::hltExecute(const HLT::TriggerElement* /*inputTE*/,
-    HLT::TriggerElement* outputTE) {
-  const IRoiDescriptor* internalRoI;
-  HLT::ErrorCode ec = getRoI(outputTE, internalRoI);
-  m_tcs.roiDescriptor = internalRoI;
-  if(ec != HLT::OK) {
-    return ec;
-  }
-  TrackCollection* outputTracks = new TrackCollection();
-  StatusCode sc = findTracks(internalRoI, *outputTracks);
-  if (sc != StatusCode::SUCCESS) {
-    return HLT::ERROR;
-  }
-  HLT::ErrorCode code = attachFeature(outputTE, outputTracks, m_attachedFeatureName);
-  if (code != HLT::OK) {
-    return code;
-  }
-  return HLT::OK;
-}
-
-HLT::ErrorCode TrigFastTrackFinderMT::getRoI(const HLT::TriggerElement* outputTE, const IRoiDescriptor*& roi)
-{
-
-  const TrigRoiDescriptor* externalRoI = nullptr;
-  HLT::ErrorCode ec = getFeature(outputTE, externalRoI);
-  if(ec != HLT::OK) {
-    ATH_MSG_ERROR("REGTEST / Failed to find RoiDescriptor");
-    return HLT::NAV_ERROR;
-  }
-
-  if(externalRoI==nullptr) {
-    ATH_MSG_ERROR("REGTEST / null RoiDescriptor");
-    return HLT::NAV_ERROR;
-  }
-
-  roi = externalRoI;
-  m_roiEta = roi->eta();
-  m_roiEtaWidth = roi->etaPlus() - roi->etaMinus();
-  m_roiPhi = roi->phi();
-  m_roiPhiWidth = HLT::wrapPhi(roi->phiPlus() - roi->phiMinus());
-  m_roiZ = roi->zed();
-  m_roiZ_Width = roi->zedPlus() - roi->zedMinus();
-  ATH_MSG_DEBUG("REGTEST / RoI" << *roi);
-
-  return HLT::OK;
-}
-  
-   
-
-StatusCode TrigFastTrackFinderMT::findTracks(const TrigRoiDescriptor& roi,
-                                      TrackCollection& fittedTracks) {
-
-  m_shift_x=0.0;
-  m_shift_y=0.0;
-  if(m_useBeamSpot && m_iBeamCondSvc) {
-    getBeamSpot();
-
-  }
-  else {
-    m_vertex = Amg::Vector3D(0.0,0.0,0.0);
-  }
-    if ( timerSvc() ) m_SpacePointConversionTimer->start();
-    std::vector<TrigSiSpacePointBase> convertedSpacePoints;
-    convertedSpacePoints.reserve(5000);
-    ATH_CHECK(m_spacePointTool->getSpacePoints( roi, convertedSpacePoints, m_nPixSPsInRoI, m_nSCTSPsInRoI));
-    
-    
-    m_roi_nSPs = convertedSpacePoints.size();
-    if ( timerSvc() ) m_SpacePointConversionTimer->stop();
-    
-    if( m_roi_nSPs >= m_minHits ) {
-      ATH_MSG_DEBUG("REGTEST / Found " << m_roi_nSPs << " space points.");
-      m_countRoIwithEnoughHits++;
-    }
-    else {
-      ATH_MSG_DEBUG("No tracks found - too few hits in ROI to run " << m_roi_nSPs);
-      return StatusCode::SUCCESS;
-    }
-
-    m_currentStage = 2;
-    
-    std::unique_ptr<TrigRoiDescriptor> superRoi = CxxUtils::make_unique<TrigRoiDescriptor>();
-    
-    if (m_doZFinder) {
-     if (m_doFTKZFinder ) {
-       if ( timerSvc() ) m_ZFinderTimer->start();
-       m_tcs.m_vZv.clear();
-       superRoi->setComposite(true);
-
-       xAOD::VertexContainer* vertexCollection = new xAOD::VertexContainer();
-       xAOD::VertexAuxContainer    theVertexAux;
-       vertexCollection->setStore(&theVertexAux);
-       bool useRefittedTracks=false;
-       if (m_doFTKFastVtxFinder) {
-         vertexCollection = m_ftkDataProviderSvc->getFastVertices(ftk::RawTrack);
-       } else {
-         StatusCode sc = m_ftkDataProviderSvc->getVertexContainer( vertexCollection, useRefittedTracks);
-         if (sc != StatusCode::SUCCESS) {
-           ATH_MSG_DEBUG (" Error getting VertexContainer StatusCode is " << sc );
-         }
-       }
-
-       ATH_MSG_DEBUG("vertexCollection->size(): " << vertexCollection->size());
-
-      //      std::sort(vertexCollection->begin(), vertexCollection->end(), vertexSort);
-      //      std::sort(vertexCollection->begin(), vertexCollection->end(), 
-      //          [](xAOD::Vertex* a, xAOD::Vertex* b){return a->vxTrackAtVertex().size() > b->vxTrackAtVertex().size();});
-
-
-      unsigned int MaxNumVertex=100;
-
-      for (auto vertex : *vertexCollection) {
-        if (m_zVertices.size() == MaxNumVertex) continue;
-        ATH_MSG_DEBUG("REGTEST / FTK ZFinder vertex: x,y,z, nTrack  type"   << vertex->x()  << " " <<  vertex->y() << " "  << vertex->z() << "  " << vertex->vxTrackAtVertex().size() << "  " << vertex->vertexType() );
-        // test to compare with Tyler's numbers
-        if (vertex->vxTrackAtVertex().size() < 3 ) continue;
-
-        float z = vertex->z();
-        float zMinus = z - 7.0;
-        float zPlus  = z + 7.0;
-        ATH_MSG_DEBUG("REGTEST / FTK ZFinder vertex: z,zplus,zminus  " << z << " "  << zPlus  << " "  << zMinus );
-        TrigRoiDescriptor* zFinderRoi =  new TrigRoiDescriptor(roi.eta(), roi.etaMinus(), roi.etaPlus(), 
-            roi.phi(), roi.phiMinus(), roi.phiPlus(), z, zMinus, zPlus);
-        superRoi->push_back(zFinderRoi);
-        m_zVertices.push_back(z);
-        m_nTrk_zVtx.push_back( vertex->vxTrackAtVertex().size());
-        m_tcs.m_vZv.push_back(z);
-
-      } // end loop over vertices
-      m_tcs.roiDescriptor = superRoi.get();
-      ATH_MSG_DEBUG("REGTEST / superRoi: " << *superRoi);
-      delete vertexCollection;
-      if ( timerSvc() ) m_ZFinderTimer->stop();
-     } else {
-      if ( timerSvc() ) m_ZFinderTimer->start();
-      m_tcs.m_vZv.clear();
-      superRoi->setComposite(true);
-
-      TrigVertexCollection* vertexCollection = m_trigZFinder->findZ( convertedSpacePoints, roi);
-
-      ATH_MSG_DEBUG("vertexCollection->size(): " << vertexCollection->size());
-
-      for (auto vertex : *vertexCollection) {
-        ATH_MSG_DEBUG("REGTEST / ZFinder vertex: " << *vertex);
-        float z = vertex->z();
-        float zMinus = z - 7.0;
-        float zPlus  = z + 7.0;
-        TrigRoiDescriptor* vertexRoi =  new TrigRoiDescriptor(roi.eta(), roi.etaMinus(), roi.etaPlus(), 
-            roi.phi(), roi.phiMinus(), roi.phiPlus(), z, zMinus, zPlus);
-        superRoi->push_back(vertexRoi);
-        m_zVertices.push_back(z);
-        m_tcs.m_vZv.push_back(z);
-      }
-      m_tcs.roiDescriptor = superRoi.get();
-      ATH_MSG_DEBUG("REGTEST / superRoi: " << *superRoi);
-      delete vertexCollection;
-      if ( timerSvc() ) m_ZFinderTimer->stop();
-     }
-    }
-    
-    m_currentStage = 3;
-        
-    if (m_retrieveBarCodes) {
-      std::vector<int> vBar;
-      m_TrigL2SpacePointTruthTool->getBarCodes(convertedSpacePoints,vBar);
-      
-      //for(auto barCode : vBar) std::cout<<"SP bar code = "<<barCode<<std::endl;
-    } 
-    
-    m_tcs.m_tripletPtMin = m_tripletMinPtFrac*m_pTmin;
-    ATH_MSG_VERBOSE("m_tcs.m_tripletPtMin: " << m_tcs.m_tripletPtMin);
-    ATH_MSG_VERBOSE("m_pTmin: " << m_pTmin);
-    
-    if ( timerSvc() ) m_PatternRecoTimer->start();
-    
-    std::map<int, int> nGoodRejected;
-    std::map<int, int> nGoodAccepted;
-    std::map<int, int> nGoodTotal;
-    if(m_retrieveBarCodes) {
-      for(auto barCode : m_vSignalBarCodes) {
-        nGoodRejected.insert(std::pair<int,int>(barCode,0));
-        nGoodAccepted.insert(std::pair<int,int>(barCode,0));
-        nGoodTotal.insert(std::pair<int,int>(barCode,0));
-      }
-    }
-    
-    int iSeed=0;
-
-    
-    if ( timerSvc() ) m_TripletMakingTimer->start();
-    
-    TRIG_TRACK_SEED_GENERATOR seedGen(m_tcs);
-
-    seedGen.loadSpacePoints(convertedSpacePoints);
-
-    if (m_doZFinder && m_doFastZVseeding) seedGen.createSeedsZv();
-    else seedGen.createSeeds();
-    
-    std::vector<TrigInDetTriplet*> triplets;
-    seedGen.getSeeds(triplets);
-    
-    ATH_MSG_DEBUG("number of triplets: " << triplets.size());
-    
-    if ( timerSvc() ) {
-      m_TripletMakingTimer->stop();
-      m_TripletMakingTimer->propVal(m_roi_nSPs);
-    }
-    m_currentStage = 4;
-    
-    if ( timerSvc() ) m_CombTrackingTimer->start();
-    
-    // 8. Combinatorial tracking
-    
-    std::vector<int> vTBarCodes(triplets.size(),-1);
-    
-    if(m_retrieveBarCodes) {
-      assignTripletBarCodes(triplets, vTBarCodes);
-    }
-    
-    std::vector<std::tuple<bool, double,Trk::Track*>> qualityTracks; //bool used for later filtering
-    qualityTracks.reserve(triplets.size());
-    
-    m_nSeeds  = 0;
-    iSeed=0;
-    
-    long int trackIndex=0;
-    
-    if(m_checkSeedRedundancy) m_siClusterMap.clear();
-    
-    bool PIX = true;
-    bool SCT = true;
-    
-    m_trackMaker->newTrigEvent(PIX,SCT);
-    
-    for(unsigned int tripletIdx=0;tripletIdx!=triplets.size();tripletIdx++) {
-      
-      TrigInDetTriplet* seed = triplets[tripletIdx];
-      
-      const Trk::SpacePoint* osp1 = seed->s1().offlineSpacePoint();
-      const Trk::SpacePoint* osp2 = seed->s2().offlineSpacePoint();
-      const Trk::SpacePoint* osp3 = seed->s3().offlineSpacePoint();
-      
-      if(m_checkSeedRedundancy) {
-      //check if clusters do not belong to any track
-        std::vector<Identifier> clusterIds;
-        extractClusterIds(osp1, clusterIds);
-        extractClusterIds(osp2, clusterIds);
-        extractClusterIds(osp3, clusterIds);
-        if(usedByAnyTrack(clusterIds, m_siClusterMap)) {
-          continue;
-        }
-      }
-      
-      std::list<const Trk::SpacePoint*> spList = {osp1, osp2, osp3};
-      
-      bool trackFound=false;
-      
-      ++m_nSeeds;
-      
-      const std::list<Trk::Track*>& tracks = m_trackMaker->getTracks(spList);
-      
-      for(std::list<Trk::Track*>::const_iterator t=tracks.begin(); t!=tracks.end(); ++t) {
-        if((*t)) {
-          float d0 = (*t)->perigeeParameters()==0 ? 10000.0 : (*t)->perigeeParameters()->parameters()[Trk::d0]; 
-          if (fabs(d0) > m_initialD0Max) {
-            ATH_MSG_DEBUG("REGTEST / Reject track with d0 = " << d0 << " > " << m_initialD0Max);
-            qualityTracks.push_back(std::make_tuple(false,0,(*t)));//Flag track as bad, but keep in vector for later deletion
-            continue;
-          }
-          if(m_checkSeedRedundancy) {
-            //update clusterMap 
-            updateClusterMap(trackIndex++, (*t), m_siClusterMap);
-          }
-          if(m_doCloneRemoval) {
-            qualityTracks.push_back(std::make_tuple(true, -trackQuality((*t)), (*t)));
-          }
-          else {
-            qualityTracks.push_back(std::make_tuple(true, 0, (*t)));
-          }
-        }
-      }  
-      iSeed++;
-      ATH_MSG_VERBOSE("Found "<<tracks.size()<<" tracks using triplet");
-      if(!tracks.empty()) {
-        trackFound = true;
-      }
-
-      if(m_retrieveBarCodes) {
-        bool goodTriplet=false;
-        int foundBarCode=-1;
-
-        for(auto barCode : m_vSignalBarCodes) {
-          if (vTBarCodes[tripletIdx] == barCode) {
-            foundBarCode=barCode;
-            goodTriplet=true;break;
-          }
-        }
-
-        if(goodTriplet) {
-          (*nGoodTotal.find(foundBarCode)).second++;
-          if(trackFound) (*nGoodAccepted.find(foundBarCode)).second++;
-          else (*nGoodRejected.find(foundBarCode)).second++;
-        }
-      }
-    }
-
-    m_trackMaker->endEvent();
-    for(auto& seed : triplets) delete seed;
-
-    //clone removal
-    if(m_doCloneRemoval) {
-      filterSharedTracks(qualityTracks);
-    }
-
-    TrackCollection* initialTracks = new TrackCollection;
-    initialTracks->reserve(qualityTracks.size());
-    for(const auto& q : qualityTracks) {
-      if (std::get<0>(q)==true) {
-        initialTracks->push_back(std::get<2>(q));
-      }
-      else {
-        delete std::get<2>(q);
-      }
-    }
-    qualityTracks.clear();
-
-    ATH_MSG_DEBUG("After clone removal "<<initialTracks->size()<<" tracks left");
-
-
-    if ( timerSvc() ) {
-      m_CombTrackingTimer->stop();
-      m_CombTrackingTimer->propVal(iSeed);
-      m_PatternRecoTimer->propVal( initialTracks->size() );
-      m_PatternRecoTimer->stop();
-      m_timePattReco = m_PatternRecoTimer->elapsed();
-    }
-    m_currentStage = 5;
-
-
-
-    if (m_retrieveBarCodes) {
-      //reco. efficiency analysis
-      calculateRecoEfficiency(convertedSpacePoints, nGoodTotal, nGoodAccepted);
-    }
-
-    if ( timerSvc() ) m_TrackFitterTimer->start();
-
-    fittedTracks = *(m_trigInDetTrackFitter->fit(*initialTracks, m_particleHypothesis));
-    delete initialTracks;
-
-    if( fittedTracks.empty() ) {
-      ATH_MSG_DEBUG("REGTEST / No tracks fitted");
-    }
-
-    for (auto fittedTrack = fittedTracks.begin(); fittedTrack!=fittedTracks.end(); ++fittedTrack) {
-      (*fittedTrack)->info().setPatternRecognitionInfo(Trk::TrackInfo::FastTrackFinderSeed);
-      ATH_MSG_VERBOSE("Updating fitted track: " << **fittedTrack);
-      m_trackSummaryTool->updateTrack(**fittedTrack);
-      ATH_MSG_VERBOSE("Updated track: " << **fittedTrack);
-    }
-
-    if ( timerSvc() ) { 
-      m_TrackFitterTimer->propVal(fittedTracks.size() );
-      m_TrackFitterTimer->stop();
-    }
-
-    if( fittedTracks.empty() ) {
-      ATH_MSG_DEBUG("REGTEST / No tracks reconstructed");
-    }
-    m_currentStage = 6;
-
-    //monitor Z-vertexing
-
-    m_nZvertices=m_zVertices.size();
-
-    //monitor number of tracks
-    m_nTracks=fittedTracks.size();
-    ATH_MSG_DEBUG("REGTEST / Found " << m_nTracks << " tracks");
-    if( !fittedTracks.empty() )
-      m_countRoIwithTracks++;
-
-    ///////////// fill vectors of quantities to be monitored
-    fillMon(fittedTracks);
-    return StatusCode::SUCCESS;
-
-}
-
-double TrigFastTrackFinderMT::trackQuality(const Trk::Track* Tr) {
-
-  DataVector<const Trk::TrackStateOnSurface>::const_iterator  
-    m  = Tr->trackStateOnSurfaces()->begin(), 
-       me = Tr->trackStateOnSurfaces()->end  ();
-
-  double quality = 0. ;
-  const double W       = 17.;
-
-  for(; m!=me; ++m) {
-    const Trk::FitQualityOnSurface* fq =  (*m)->fitQualityOnSurface();
-    if(!fq) continue;
-
-    double x2 = fq->chiSquared();
-    double q;
-    if(fq->numberDoF() == 2) q = (1.2*(W-x2*.5)); 
-    else                     q =      (W-x2    );
-    if(q < 0.) q = 0.;
-    quality+=q;
-  }
-  return quality;
-}
-
-void TrigFastTrackFinderMT::filterSharedTracks(std::vector<std::tuple<bool, double,Trk::Track*>>& QT) {
-
-  std::set<const Trk::PrepRawData*> clusters;
-
-  const Trk::PrepRawData* prd[100];
-
-  std::sort(QT.begin(), QT.end(),
-      [](const std::tuple<bool, double, Trk::Track*>& lhs, const std::tuple<bool, double, Trk::Track*>& rhs) {
-      return std::get<1>(lhs) < std::get<1>(rhs); } );
-
-  for (auto& q : QT) {
-    DataVector<const Trk::MeasurementBase>::const_iterator 
-      m  = std::get<2>(q)->measurementsOnTrack()->begin(), 
-         me = std::get<2>(q)->measurementsOnTrack()->end  ();
-
-    int nf = 0, nc = 0; 
-    for(; m!=me; ++m ) {
-
-      const Trk::PrepRawData* pr = ((const Trk::RIO_OnTrack*)(*m))->prepRawData();
-      if(pr) {
-        ++nc;
-        if(clusters.find(pr)==clusters.end()) {prd[nf++]=pr; if(nf==100) break;}
-      }
-    }
-    if((nf >= m_nfreeCut) || (nf == nc) ) {
-      for(int n=0; n!=nf; ++n) clusters.insert(prd[n]);
-    }
-    else  {
-      std::get<0>(q) = false;
-    }
-  }
-}
-
-//---------------------------------------------------------------------------
-
-
-void TrigFastTrackFinderMT::updateClusterMap(long int trackIdx, const Trk::Track* pTrack, std::map<Identifier, std::vector<long int> >& clusterMap) {
-  //loop over clusters
-
-  for(auto tMOT = pTrack->measurementsOnTrack()->begin(); tMOT != pTrack->measurementsOnTrack()->end(); ++tMOT) { 
-
-    const InDet::SiClusterOnTrack* siCLOT = dynamic_cast<const InDet::SiClusterOnTrack*>(*tMOT); 
-    if (siCLOT==nullptr) continue;
-    const InDet::SiCluster* siCL = dynamic_cast<const InDet::SiCluster*>(siCLOT->prepRawData()); 
-    if (siCL==nullptr) continue;
-    Identifier id = siCL->identify(); 
-    clusterMap[id].push_back(trackIdx);
-    //no sorting is needed as the vectors are sorted by the algorithm design
-    //due to monotonically increasing trackIdx
-    // std::map<Identifier, std::vector<long int> >::iterator itm = clusterMap.find(id);
-    //std::sort((*itm).second.begin(),(*itm).second.end());
-    //std::copy((*itm).second.begin(),(*itm).second.end(),std::ostream_iterator<long int>(std::cout," "));
-    //std::cout<<std::endl;
-  }
-}
-
-void TrigFastTrackFinderMT::extractClusterIds(const Trk::SpacePoint* pSP, std::vector<Identifier>& vIds) {
-  const InDet::SiCluster* pCL = dynamic_cast<const InDet::SiCluster*>(pSP->clusterList().first);
-  if(pCL!=nullptr) vIds.push_back(pCL->identify());
-  //check second cluster : SCT uv clusters only !
-  pCL = dynamic_cast<const InDet::SiCluster*>(pSP->clusterList().second);
-  if(pCL!=nullptr) vIds.push_back(pCL->identify());
-}
-
-bool TrigFastTrackFinderMT::usedByAnyTrack(const std::vector<Identifier>& vIds, std::map<Identifier, std::vector<long int> >& clusterMap) {
-
-  std::vector<long int> xSection;
-  //initializing
-  std::map<Identifier, std::vector<long int> >::iterator itm0 = clusterMap.find(*vIds.begin());
-  if(itm0 == clusterMap.end()) return false;
-  xSection.reserve((*itm0).second.size());
-  std::copy((*itm0).second.begin(), (*itm0).second.end(), std::back_inserter(xSection));
-  std::vector<Identifier>::const_iterator it = vIds.begin();it++;
-  for(;it!=vIds.end();++it) {
-    std::map<Identifier, std::vector<long int> >::iterator itm1 = clusterMap.find(*it);
-    if(itm1 == clusterMap.end()) return false;
-    std::vector<long int> tmp;
-    std::set_intersection(xSection.begin(), xSection.end(), (*itm1).second.begin(),(*itm1).second.end(), std::back_inserter(tmp));
-    if(tmp.empty()) return false;
-    //update xSection
-    xSection.clear();
-    xSection.reserve(tmp.size());
-    std::copy(tmp.begin(), tmp.end(), std::back_inserter(xSection));
-  }
-  return !xSection.empty();
-}
-
-int TrigFastTrackFinderMT::findBarCodeInData(int barCode, const std::vector<TrigSiSpacePointBase>& vSP) {
-  int nFound=0;
-  std::set<int> layerSet;
-  for(auto sp : vSP) {
-    if(barCode==sp.barCode()) {
-      nFound++;
-      layerSet.insert(sp.layer());
-    }
-  }
-  if(int(layerSet.size())<m_minSignalSPs) {//less than N unique layers
-    nFound=0;
-  }
-  return nFound;
-}
-
-void TrigFastTrackFinderMT::showBarCodeInData(int barCode, const std::vector<TrigSiSpacePointBase>& vSP) {
-  for(auto sp : vSP) {
-    if(barCode==sp.barCode()) {
-      ATH_MSG_DEBUG("L="<<sp.layer()<<" r="<<sp.r()<<" z="<<sp.z());
-    }
-  }
-}
-
-int TrigFastTrackFinderMT::findBarCodeInTriplets(int barCode, const std::vector<std::shared_ptr<TrigInDetTriplet>>& vTR) {
-  int nFound=0;
-  for(auto tr : vTR) {
-    bool found = (barCode == tr->s1().barCode()) && (barCode == tr->s2().barCode()) && (barCode == tr->s3().barCode());
-    if(found) {
-      nFound++;
-    }
-  }
-  return nFound;
-}
-
-void TrigFastTrackFinderMT::assignTripletBarCodes(const std::vector<std::shared_ptr<TrigInDetTriplet>>& vTR, std::vector<int>& vBar) {
-  int iTR=0;
-  for(auto tr : vTR) {
-    bool good = (tr->s1().barCode() == tr->s2().barCode()) && (tr->s3().barCode() == tr->s2().barCode());
-    good = good && (tr->s1().barCode() > 0);
-    if(good) {
-      vBar[iTR] = tr->s1().barCode();
-    }
-    iTR++;
-  }
-}
-
-void TrigFastTrackFinderMT::assignTripletBarCodes(const std::vector<TrigInDetTriplet*>& vTR, std::vector<int>& vBar) {
-  int iTR=0;
-  for(auto tr : vTR) {
-    bool good = (tr->s1().barCode() == tr->s2().barCode()) && (tr->s3().barCode() == tr->s2().barCode());
-    good = good && (tr->s1().barCode() > 0);
-    if(good) {
-      vBar[iTR] = tr->s1().barCode();
-    }
-    iTR++;
-  }
-}
-
-void TrigFastTrackFinderMT::getBeamSpot() {
-  m_vertex = m_iBeamCondSvc->beamPos();
-  ATH_MSG_VERBOSE("Beam spot position " << m_vertex);
-  double xVTX = m_vertex.x();
-  double yVTX = m_vertex.y();
-  double zVTX = m_vertex.z();
-  double tiltXZ = m_iBeamCondSvc->beamTilt(0);
-  double tiltYZ = m_iBeamCondSvc->beamTilt(1);
-  m_shift_x = xVTX - tiltXZ*zVTX;//correction for tilt
-  m_shift_y = yVTX - tiltYZ*zVTX;//correction for tilt
-  ATH_MSG_VERBOSE("Beam center position:  " << m_shift_x <<"  "<< m_shift_y);
-}
-
-void TrigFastTrackFinderMT::clearMembers() {
-  m_nTracks = 0;
-  m_zVertices.clear();
-
-  m_trk_pt.clear();
-  m_trk_a0.clear();
-  m_trk_z0.clear();
-  m_trk_phi0.clear();
-  m_trk_eta.clear();
-  m_trk_chi2dof.clear();
-  m_trk_nSiHits.clear();
-  m_trk_nPIXHits.clear();
-  m_trk_nSCTHits.clear();
-  m_trk_a0beam.clear();
-  m_trk_dPhi0.clear();
-  m_trk_dEta.clear();
-
-  //m_sp_x.clear();
-  //m_sp_y.clear();
-  //m_sp_z.clear();
-  //m_sp_r.clear();
-
-  m_iblResPhi.clear();
-  m_iblResEta.clear();
-  m_iblPullPhi.clear();
-  m_iblPullEta.clear();
-  m_pixResPhiBarrel.clear();
-  m_pixResEtaBarrel.clear();
-  m_pixPullPhiBarrel.clear();
-  m_pixPullEtaBarrel.clear();
-  m_sctResBarrel.clear();
-  m_sctPullBarrel.clear();
-  m_pixResPhiEC.clear();
-  m_pixResEtaEC.clear();
-  m_pixPullPhiEC.clear();
-  m_pixPullEtaEC.clear();
-  m_sctResEC.clear();
-  m_sctPullEC.clear();
-
-
-
-  m_nPixSPsInRoI=0;
-  m_nSCTSPsInRoI=0;
-  m_currentStage=0;
-  m_roi_nSPs=0;
-  m_nZvertices=0;
-}
-
-void TrigFastTrackFinderMT::calculateRecoEfficiency(const std::vector<TrigSiSpacePointBase>& convertedSpacePoints,
-    const std::map<int,int>& nGoodTotal, 
-    const std::map<int,int>& nGoodAccepted) {
-
-  //reco. efficiency analysis
-  for(auto barCode : m_vSignalBarCodes) {
-    int nSignalSPs = findBarCodeInData(barCode, convertedSpacePoints);
-    if(nSignalSPs<m_minSignalSPs) continue;
-    m_nSignalPresent+=1;
-    int nSignalTracks = (*nGoodTotal.find(barCode)).second;
-    if(nSignalTracks==0) {
-      continue;
-    }
-    m_nSignalDetected+=1;
-    m_nSignalClones+=nSignalTracks;
-
-    int nGoodTripletsAccepted = (*nGoodAccepted.find(barCode)).second;
-    if(nGoodTripletsAccepted==0) continue;
-    m_nSignalTracked+=1;
-  } 
-}
-
-void TrigFastTrackFinderMT::fillMon(const TrackCollection& tracks) {
-  size_t size = tracks.size();
-  m_trk_pt.reserve(size);
-  m_trk_a0.reserve(size);
-  m_trk_z0.reserve(size);
-  m_trk_phi0.reserve(size);
-  m_trk_eta.reserve(size);
-  m_trk_chi2dof.reserve(size);
-  m_trk_nSiHits.reserve(size);
-  m_trk_nPIXHits.reserve(size);
-  m_trk_nSCTHits.reserve(size);
-  m_trk_a0beam.reserve(size);
-  m_trk_dPhi0.reserve(size);
-  m_trk_dEta.reserve(size);
-  for (auto track : tracks) {
-    const Trk::TrackParameters* trackPars = track->perigeeParameters();
-    if(trackPars==nullptr) {
-      continue;
-    }
-
-    if(trackPars->covariance()==nullptr) {
-      continue;
-    }
-
-    float a0 = trackPars->parameters()[Trk::d0]; 
-    m_trk_a0.push_back(a0);
-    float z0 = trackPars->parameters()[Trk::z0]; 
-    m_trk_z0.push_back(z0);
-    float phi0 = trackPars->parameters()[Trk::phi0]; 
-    m_trk_phi0.push_back(phi0);
-    m_trk_a0beam.push_back(a0+m_shift_x*sin(phi0)-m_shift_y*cos(phi0));
-    float dPhi0 = HLT::wrapPhi(phi0 - m_roiPhi);
-    m_trk_dPhi0.push_back(dPhi0);
-    float theta = trackPars->parameters()[Trk::theta]; 
-    float eta = -log(tan(0.5*theta)); 
-    m_trk_eta.push_back(eta);
-    m_trk_dEta.push_back(eta - m_roiEta);
-
-    float qOverP = trackPars->parameters()[Trk::qOverP]; 
-    if (qOverP==0) {
-      ATH_MSG_DEBUG("REGTEST / q/p == 0, adjusting to 1e-12");
-      qOverP = 1e-12;
-    }
-    float pT=sin(theta)/qOverP;
-    m_trk_pt.push_back(pT);
-
-    const Trk::FitQuality* fq = track->fitQuality();
-    float chi2 = 1e8;
-    if (fq) {
-      ATH_MSG_VERBOSE("Fitted chi2: " << fq->chiSquared());
-      ATH_MSG_VERBOSE("Fitted ndof: " << fq->numberDoF());
-      if(fq->numberDoF()!=0) {
-        chi2 = fq->chiSquared()/fq->numberDoF();
-      }
-    }
-    m_trk_chi2dof.push_back(chi2);
-    int nPix=0, nSct=0;
-
-    for(auto tSOS = track->trackStateOnSurfaces()->begin();  
-        tSOS!=track->trackStateOnSurfaces()->end(); ++tSOS) { 
-      if ((*tSOS)->type(Trk::TrackStateOnSurface::Perigee) == false) {
-        const Trk::FitQualityOnSurface* fq =  (*tSOS)->fitQualityOnSurface(); 
-        if(!fq) continue; 
-        int nd = fq->numberDoF(); 
-        if(nd==2) nPix++;
-        if(nd==1) nSct++;
-      }
-    }
-    if (m_ftkMode) {
-      const Trk::TrackSummary* summary = track->trackSummary();
-      if( summary != nullptr){
-        nPix = summary->get(Trk::numberOfPixelHits);
-        nSct = summary->get(Trk::numberOfSCTHits);
-      }
-    }
-    m_trk_nPIXHits.push_back(nPix); 
-    m_trk_nSCTHits.push_back(nSct/2); 
-    m_trk_nSiHits.push_back(nPix + nSct/2); 
-
-    ATH_MSG_DEBUG("REGTEST / track npix/nsct/phi0/pt/eta/d0/z0/chi2: " <<
-        nPix   << " / "  << 
-        nSct/2 << " / "  << 
-        phi0   << " / "  << 
-        pT     << " / " << 
-        eta    << " / " << 
-        a0     << " / " <<
-        z0     << " / " <<
-        chi2);
-    // tighter selection for unbiased residuals
-    bool goodTrack = std::fabs(pT)>1000. && (nPix + nSct/2) > 3 && nSct > 0;
-    if (goodTrack && m_doResMonitoring) {
-      runResidualMonitoring(*track);
-    }
-  }
-}
-
-HLT::ErrorCode TrigFastTrackFinderMT::hltFinalize()
-{
-
-  ATH_MSG_INFO("=========================================================");
-  ATH_MSG_INFO("TrigFastTrackFinderMT::finalize() - TrigFastTrackFinder Statistics: ");
-  ATH_MSG_INFO("RoI processed: " <<  m_countTotalRoI);
-  ATH_MSG_INFO("RoI with enough SPs : " <<  m_countRoIwithEnoughHits);
-  ATH_MSG_INFO("RoI with Track(s)  Total/goodZvertex/badZvertex: " << m_countRoIwithTracks);
-  if (m_retrieveBarCodes) {
-    ATH_MSG_INFO("Number of signal tracks present " << m_nSignalPresent);
-    ATH_MSG_INFO("Number of signal seeds  found   " << m_nSignalDetected);
-    ATH_MSG_INFO("Number of signal tracks found   " << m_nSignalTracked);
-    if(m_nSignalPresent!=0) {
-      ATH_MSG_INFO("Track seeding  efficiency      " << (100.0*m_nSignalDetected/m_nSignalPresent) <<" % ");
-      ATH_MSG_INFO("Track seeding  redundancy      " << (100.0*m_nSignalClones/m_nSignalPresent) << " %");
-      ATH_MSG_INFO("Track finding efficiency       " << (100.0*m_nSignalTracked/m_nSignalPresent) << " %");
-    }
-  }
-  ATH_MSG_INFO("=========================================================");
-
-  return HLT::OK;
-}
-
-void TrigFastTrackFinderMT::runResidualMonitoring(const Trk::Track& track) {
-  std::vector<TrigL2HitResidual> vResid;
-  vResid.clear();
-  StatusCode scRes = m_trigL2ResidualCalculator->getUnbiassedResiduals(track,vResid);
-  if(!scRes.isSuccess()) return;
-  for(std::vector<TrigL2HitResidual>::iterator it=vResid.begin();it!=vResid.end();++it) {
-    Identifier id = it->identify();
-    int pixlayer= (m_pixelId->layer_disk(id) );
-    int sctlayer= (m_sctId->layer_disk(id) );
-
-    switch(it->regionId()) {
-      case Region::PixBarrel :
-        m_PixB_layer.push_back(pixlayer);
-        ATH_MSG_DEBUG("Pixel Barrel "  );
-        m_pixResPhiBarrel.push_back(it->phiResidual());
-        m_pixPullPhiBarrel.push_back(it->phiPull());
-        if (pixlayer == 1) {
-          m_pixResPhiBarrelL1.push_back(it->phiResidual());
-          m_pixResEtaBarrelL1.push_back(it->etaResidual());
-        }
-        if (pixlayer == 2) {
-          m_pixResPhiBarrelL2.push_back(it->phiResidual());
-          m_pixResEtaBarrelL2.push_back(it->etaResidual());
-        }
-        if (pixlayer == 3) {
-          m_pixResPhiBarrelL3.push_back(it->phiResidual());
-          m_pixResEtaBarrelL3.push_back(it->etaResidual());
-        }
-        m_pixResEtaBarrel.push_back(it->etaResidual());
-        m_pixPullEtaBarrel.push_back(it->etaPull());
-        break;
-      case Region::PixEndcap :
-        ATH_MSG_DEBUG("Pixel Endcap "  );
-        m_PixEC_layer.push_back(pixlayer);
-        m_pixResPhiEC.push_back(it->phiResidual());
-        m_pixPullPhiEC.push_back(it->phiPull());
-        if (pixlayer == 0) {
-          m_pixResPhiECL1.push_back(it->phiResidual());
-          m_pixResEtaECL1.push_back(it->etaResidual());
-        }
-        if (pixlayer == 1) {
-          m_pixResPhiECL2.push_back(it->phiResidual());
-          m_pixResEtaECL2.push_back(it->etaResidual());
-        }
-        if (pixlayer == 2) {
-          m_pixResPhiECL3.push_back(it->phiResidual());
-          m_pixResEtaECL3.push_back(it->etaResidual());
-        }
-        m_pixResEtaEC.push_back(it->etaResidual());
-        m_pixPullEtaEC.push_back(it->etaPull());
-        break;
-      case Region::SctBarrel :
-        m_SCTB_layer.push_back(sctlayer);
-        ATH_MSG_DEBUG("SCT Barrel"  );
-        m_sctResBarrel.push_back(it->phiResidual());
-        m_sctPullBarrel.push_back(it->phiPull());
-        break;
-      case Region::SctEndcap :
-        m_SCTEC_layer.push_back(sctlayer);
-        ATH_MSG_DEBUG("SCT Endcap"  );
-        m_sctResEC.push_back(it->phiResidual());
-        m_sctPullEC.push_back(it->phiPull());
-        break;
-      case Region::IBL :
-        m_IBL_layer.push_back(pixlayer);
-        if (m_tcs.m_maxSiliconLayer==32) {
-          m_iblResPhi.push_back(it->phiResidual());
-          m_iblPullPhi.push_back(it->phiPull());
-          m_iblResEta.push_back(it->etaResidual());
-          m_iblPullEta.push_back(it->etaPull());
-        }
-        else {//No IBL, fill pixel histograms instead
-          ATH_MSG_DEBUG("IBL wrong region"  );
-          m_pixResPhiBarrel.push_back(it->phiResidual());
-          m_pixPullPhiBarrel.push_back(it->phiPull());
-          m_pixResEtaBarrel.push_back(it->etaResidual());
-          m_pixPullEtaBarrel.push_back(it->etaPull());
-        }
-        break;
-      case Region::Undefined :
-        ATH_MSG_DEBUG("Undefined ID region");
-        break;
-    }
-  }
-}
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinderMT.h b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinderMT.h
deleted file mode 100644
index b5bd12bcead1eb440461439fbe8fdf2be51863b2..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/TrigFastTrackFinderMT.h
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-////////////////////////////////////////////////////////////////////////////////
-//
-// filename: TrigFastTrackFinderMT.h
-// 
-// Description: a part of L2+EF HLT ID tracking
-// 
-// date: 16/04/2013
-// 
-// -------------------------------
-// ATLAS Collaboration
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef TRIGFASTTRACKFINDER_TRIGFASTTRACKFINDERMT_H
-#define TRIGFASTTRACKFINDER_TRIGFASTTRACKFINDERMT_H
-
-#include<string>
-#include<vector>
-#include<map>
-//#include<algorithm>
-
-#include "GaudiKernel/ToolHandle.h"
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include "StoreGate/ReadHandleKey.h"
-#include "StoreGate/WriteHandleKey.h"
-#include "TrigInterfaces/FexAlgo.h"
-
-
-#include "TrkEventPrimitives/ParticleHypothesis.h"
-
-#include "TrigInDetPattRecoTools/TrigCombinatorialSettings.h"
-
-class ITrigL2LayerNumberTool;
-class ITrigL2LayerSetPredictorTool;
-class ITrigSpacePointConversionTool;
-class ITrigL2SpacePointTruthTool;
-class ITrigL2ResidualCalculator;
-class ITrigInDetTrackFitter;
-class ITrigZFinder;
-class IRegSelSvc;
-class TrigRoiDescriptor;
-class TrigSiSpacePointBase;
-class Identifier;
-namespace InDet { 
-  class SiSpacePointsSeed;
-  class ISiTrackMaker; 
-}
-
-namespace Trk {
-  class ITrackSummaryTool;
-  class SpacePoint;
-}
-
-class IFTK_DataProviderSvc;
-
-class TrigL2LayerSetLUT;
-class TrigSpacePointStorage;
-class TrigInDetTriplet;
-class IBeamCondSvc;
-//class EventID;
-class PixelID;
-class SCT_ID;
-class AtlasDetectorID;
-
-class TrigFastTrackFinderMT : public HLT::FexAlgo {
-
- public:
-  
-  TrigFastTrackFinderMT(const std::string& name, ISvcLocator* pSvcLocator);
-  ~TrigFastTrackFinderMT();
-
-  StatusCode execute();
-  HLT::ErrorCode hltInitialize();
-  HLT::ErrorCode hltFinalize();
-  HLT::ErrorCode hltBeginRun();
-
-  HLT::ErrorCode hltExecute(const HLT::TriggerElement* inputTE,
-			    HLT::TriggerElement* outputTE);
-
-  double trackQuality(const Trk::Track* Tr);
-  void filterSharedTracks(std::vector<std::tuple<bool, double, Trk::Track*>>& QT);
-  void convertToTrigInDetTrack(const TrackCollection& offlineTracks, TrigInDetTrackCollection& trigInDetTracks);
-  HLT::ErrorCode getRoI(const HLT::TriggerElement* outputTE, const IRoiDescriptor*& roi);
-  StatusCode findTracks(const TrigRoiDescriptor& roi, TrackCollection& fittedTracks);
-
-protected: 
-
-  void updateClusterMap(long int, const Trk::Track*, std::map<Identifier, std::vector<long int> >&);
-  void extractClusterIds(const Trk::SpacePoint*, std::vector<Identifier>&);
-  bool usedByAnyTrack(const std::vector<Identifier>&, std::map<Identifier, std::vector<long int> >&);
-
-  int findBarCodeInData(int, const std::vector<TrigSiSpacePointBase>&);
-  void showBarCodeInData(int, const std::vector<TrigSiSpacePointBase>&);
-  int findBarCodeInTriplets(int, const std::vector<std::shared_ptr<TrigInDetTriplet>>&);
-  void assignTripletBarCodes(const std::vector<std::shared_ptr<TrigInDetTriplet>>&, std::vector<int>&);
-  void assignTripletBarCodes(const std::vector<TrigInDetTriplet*>&, std::vector<int>&);
-  
- private:
-
-  // AlgTools and Services
-
-  ToolHandle<ITrigL2LayerNumberTool> m_numberingTool;
-  ToolHandle<ITrigSpacePointConversionTool> m_spacePointTool;
-  ToolHandle<ITrigL2SpacePointTruthTool> m_TrigL2SpacePointTruthTool;
-  ToolHandle<ITrigL2ResidualCalculator> m_trigL2ResidualCalculator;
-  ToolHandle<InDet::ISiTrackMaker> m_trackMaker;   // Track maker 
-  ToolHandle<ITrigInDetTrackFitter> m_trigInDetTrackFitter;
-  ToolHandle<ITrigZFinder> m_trigZFinder;
-  ToolHandle< Trk::ITrackSummaryTool > m_trackSummaryTool;
-  ServiceHandle<IFTK_DataProviderSvc > m_ftkDataProviderSvc;
-  std::string m_ftkDataProviderSvcName;
-  SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey;
-  SG::WriteHandleKey<TrackCollection> m_outputTracksKey;
-
- 
-  double m_shift_x, m_shift_y;
-
-  // Control flags
-
-  bool m_doCloneRemoval;
-  bool m_ftkMode;//If True: Retrieve FTK tracks
-  bool m_ftkRefit;//If True: Refit FTK tracks
-  bool m_useBeamSpot; 
-  bool m_vertexSeededMode;
-  bool m_doZFinder;
-  bool m_doFTKZFinder;
-  bool m_doFTKFastVtxFinder;
-  bool m_doFastZVseeding;
-  bool m_doResMonitoring;
-
-  // Cuts and settings
-  TrigCombinatorialSettings m_tcs;
-
-  int  m_minHits;
-
-  int                     m_nSeeds;       //!< Number seeds 
-  int                     m_nfreeCut;     // Min number free clusters 
-
-
-  bool m_retrieveBarCodes;
-
-  float m_tripletMinPtFrac;
-  float m_pTmin;
-  float m_initialD0Max;
-
-  bool m_checkSeedRedundancy;
-
-  // Names of IDCs with input data 
-  //
-  //
-  // Vertex (from beamspot)
-  Amg::Vector3D m_vertex;
-
- 
-  // Reconstructed tracks 
-
-  IBeamCondSvc* m_iBeamCondSvc;
-  
-  // Data members for monitoring
-
-  int m_nTracks;
-  int m_nPixSPsInRoI;  // Total number of (filtered) pixel SPs in the RoI
-  int m_nSCTSPsInRoI;  // Total number of (filtered) SCT SPs in the RoI
-  int m_currentStage;  // The last stage reached during the processing of a given RoI
-
-  int m_roi_nSPs;
-
-  double m_roiPhi, m_roiEta, m_roiZ;  
-  double m_roiPhiWidth, m_roiEtaWidth, m_roiZ_Width;  
-  double m_timePattReco;
-
-  int m_nZvertices; 
-  std::vector<float> m_zVertices; 
-  std::vector<float> m_nTrk_zVtx; 
-
-  std::vector<float> m_trk_pt;
-  std::vector<float> m_trk_a0;
-  std::vector<float> m_trk_z0;
-  std::vector<float> m_trk_phi0;
-  std::vector<float> m_trk_eta;
-  std::vector<float> m_trk_chi2dof;
-  std::vector<float> m_trk_nSiHits;
-  std::vector<float> m_trk_nPIXHits;
-  std::vector<float> m_trk_nSCTHits;
-  std::vector<float> m_trk_a0beam;
-  std::vector<float> m_trk_dPhi0;
-  std::vector<float> m_trk_dEta;
-  //std::vector<double> m_sp_x, m_sp_y, m_sp_z, m_sp_r;//Spacepoint coordinates
-
-  std::vector<float> m_IBL_layer;
-  std::vector<float> m_PixB_layer;
-  std::vector<float> m_PixEC_layer;
-  std::vector<float> m_SCTB_layer;
-  std::vector<float> m_SCTEC_layer;
-
-  std::vector<double> m_iblResPhi;
-  std::vector<double> m_iblResEta;
-  std::vector<double> m_iblPullPhi;
-  std::vector<double> m_iblPullEta;
-  std::vector<double> m_pixResPhiBarrel;
-  std::vector<double> m_pixResEtaBarrel;
-  std::vector<double> m_pixPullPhiBarrel;
-  std::vector<double> m_pixPullEtaBarrel;
-  std::vector<double> m_sctResBarrel;
-  std::vector<double> m_sctPullBarrel;
-  std::vector<double> m_pixResPhiEC;
-  std::vector<double> m_pixResEtaEC;
-  std::vector<double> m_pixPullPhiEC;
-  std::vector<double> m_pixPullEtaEC;
-  std::vector<double> m_sctResEC;
-  std::vector<double> m_sctPullEC;
-
-  std::vector<double> m_pixResPhiBarrelL1;
-  std::vector<double> m_pixResEtaBarrelL1;
-  std::vector<double> m_pixResPhiBarrelL2;
-  std::vector<double> m_pixResEtaBarrelL2;
-  std::vector<double> m_pixResPhiBarrelL3;
-  std::vector<double> m_pixResEtaBarrelL3;
-
-  std::vector<double> m_pixResPhiECL1;
-  std::vector<double> m_pixResEtaECL1;
-  std::vector<double> m_pixResPhiECL2;
-  std::vector<double> m_pixResEtaECL2;
-  std::vector<double> m_pixResPhiECL3;
-  std::vector<double> m_pixResEtaECL3;
-
-  // Monitoring member functions 
-
-  void fillMon(const TrackCollection& tracks);
-  void runResidualMonitoring(const Trk::Track& track);
-
-  void calculateRecoEfficiency(const std::vector<TrigSiSpacePointBase>&,
-			       const std::map<int,int>&,
-			       const std::map<int,int>&);
-
-
-  //Setup functions
-  void clearMembers();
-  void getBeamSpot();
-
-  // Timers 
-  //
-  TrigTimer* m_SpacePointConversionTimer;
-  TrigTimer* m_ZFinderTimer;
-  TrigTimer* m_PatternRecoTimer; 
-  TrigTimer* m_TripletMakingTimer; 
-  TrigTimer* m_CombTrackingTimer; 
-  TrigTimer* m_TrackFitterTimer; 
-
-  // Internal bookkeeping
-
-  std::string m_instanceName, m_attachedFeatureName, m_attachedFeatureName_TIDT,
-    m_outputCollectionSuffix;
-
-  unsigned int m_countTotalRoI;
-  unsigned int m_countRoIwithEnoughHits;
-  unsigned int m_countRoIwithTracks;
-
-  //efficiency calculations
-  std::vector<int> m_vSignalBarCodes;
-
-  int m_nSignalPresent;
-  int m_nSignalDetected;
-  int m_nSignalTracked;
-  int m_nSignalClones;
-  int m_minSignalSPs;
-
-  const PixelID* m_pixelId;
-  const SCT_ID* m_sctId;
-  const AtlasDetectorID* m_idHelper;
-
-
-  Trk::ParticleHypothesis m_particleHypothesis;//particle hypothesis to attach to each track - usually pion, can be set to other values
-
-  std::map<Identifier, std::vector<long int> > m_siClusterMap;
-
-  bool m_useNewLayerNumberScheme;
-
-};
-
-#endif
diff --git a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/components/TrigFastTrackFinder_entries.cxx b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/components/TrigFastTrackFinder_entries.cxx
index 1b2dd129eb65d7c9ac00f1738a818c6e80ea42b0..6a9692bb3706cc9d060bae3d8fb31fe2347c3034 100644
--- a/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/components/TrigFastTrackFinder_entries.cxx
+++ b/Trigger/TrigAlgorithms/TrigFastTrackFinder/src/components/TrigFastTrackFinder_entries.cxx
@@ -1,12 +1,9 @@
 #include "GaudiKernel/DeclareFactoryEntries.h"
 
-#include "TrigFastTrackFinder/TrigFastTrackFinder.h"
-#include "../TrigFastTrackFinderMT.h"
+#include "../TrigFastTrackFinder.h"
 
 DECLARE_ALGORITHM_FACTORY( TrigFastTrackFinder)
-DECLARE_ALGORITHM_FACTORY( TrigFastTrackFinderMT)
 DECLARE_FACTORY_ENTRIES( TrigFastTrackFinder )
 {
   DECLARE_ALGORITHM( TrigFastTrackFinder )
-  DECLARE_ALGORITHM( TrigFastTrackFinderMT )
 }
diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/cmt/requirements b/Trigger/TrigAlgorithms/TrigGenericAlgs/cmt/requirements
deleted file mode 100755
index b6a460c0c081d52b27bf9530026540e7728912df..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/cmt/requirements
+++ /dev/null
@@ -1,39 +0,0 @@
-package TrigGenericAlgs
-
-author Tomasz Bold <Tomasz.Bold@cern.ch>
-author Till Eifert <Till.Eifert@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use TrigSteeringEvent	TrigSteeringEvent-*          Trigger/TrigEvent
-use TrigInterfaces        TrigInterfaces-*             Trigger/TrigSteer
-use TrigT1Interfaces    TrigT1Interfaces-*       Trigger/TrigT1
-use TrigMuonRoITools    TrigMuonRoITools-*       Trigger/TrigTools
-use TrigConfInterfaces         TrigConfInterfaces-*            Trigger/TrigConfiguration
-use TrigCaloEvent        TrigCaloEvent-*                 Trigger/TrigEvent
-use xAODTrigL1Calo          xAODTrigL1Calo-*             Event/xAOD
-use xAODTrigMuon           xAODTrigMuon-*		 Event/xAOD
-use TrigMuonEvent               TrigMuonEvent-*                 Trigger/TrigEvent
-use xAODTrigger             xAODTrigger-*                   Event/xAOD
-use TrigL2MuonSA	TrigL2MuonSA-*	Trigger/TrigAlgorithms
-
-private
-use TrigT1Result	  TrigT1Result-*               Trigger/TrigT1
-use TrigConfL1Data        TrigConfL1Data-*             Trigger/TrigConfiguration
-use AthenaKernel          AthenaKernel-*               Control
-use GaudiInterface        GaudiInterface-*             External
-use AtlasBoost            AtlasBoost-*                 External
-use AtlasCLHEP            AtlasCLHEP-*                 External
-use ByteStreamCnvSvcBase  ByteStreamCnvSvcBase-*       Event
-use TrigNavigation        TrigNavigation-*             Trigger/TrigEvent
-use TrigSteeringEvent     TrigSteeringEvent-*          Trigger/TrigEvent
-use IRegionSelector       IRegionSelector-*            DetectorDescription
-use CTPfragment      v*
-
-library TrigGenericAlgs *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
-
-macro_append shlibflags " -lCTPfragment -lTrigL2MuonSA"
-
diff --git a/Trigger/TrigAlgorithms/TrigHIRec/cmt/requirements b/Trigger/TrigAlgorithms/TrigHIRec/cmt/requirements
deleted file mode 100755
index fb55fae02f8b8a5a6854c681984fb5fc32b1ab49..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigHIRec/cmt/requirements
+++ /dev/null
@@ -1,32 +0,0 @@
-package TrigHIRec
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use TrigCaloEvent       TrigCaloEvent-*         Trigger/TrigEvent
-use GaudiInterface	GaudiInterface-*        External
-use AtlasROOT           AtlasROOT-*             External
-
-private
-use StoreGate 	        StoreGate-*             Control
-use AsgTools            AsgTools-*              Control/AthToolSupport
-use NavFourMom          NavFourMom-*            Event
-use Navigation          Navigation-*            Control
-use TrigInterfaces      TrigInterfaces-*	Trigger/TrigSteer
-use CaloEvent           CaloEvent-*             Calorimeter
-use CaloUtils           CaloUtils-*             Calorimeter
-use JetInterface        JetInterface-*          Reconstruction/Jet
-use xAODJet             xAODJet-*               Event/xAOD
-use xAODCore            xAODCore-*              Event/xAOD
-use xAODHIEvent         xAODHIEvent-*           Event/xAOD
-use xAODCaloEvent	xAODCaloEvent-*         Event/xAOD
-use HIEventUtils        HIEventUtils-*          PhysicsAnalysis/HeavyIonPhys
-use HIGlobal            HIGlobal-*              Reconstruction/HeavyIonRec
-use HIJetRec            HIJetRec-*              Reconstruction/HeavyIonRec
-#use TrigCaloRec    	TrigCaloRec-*           Trigger/TrigAlgorithms
-
-
-library TrigHIRec *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py "
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Trigger/TrigAlgorithms/TrigHIRec/cmt/version.cmt b/Trigger/TrigAlgorithms/TrigHIRec/cmt/version.cmt
deleted file mode 100644
index 909068b46d4987789c7274089f4ce4280f0a8b6b..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigHIRec/cmt/version.cmt
+++ /dev/null
@@ -1 +0,0 @@
-TrigHIRec-00-00-20
diff --git a/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.h b/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.h
index f52a8cb0a507a7356232f3785e5da0cd3f40b76a..60a7e330eac82821c7c09d6a3e7381ed18dad18b 100644
--- a/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.h
+++ b/Trigger/TrigAlgorithms/TrigHIRec/src/TrigHIEventShapeJetIteration.h
@@ -12,8 +12,8 @@ AUTHOR:  martin.spousta@cern.ch
 
 ********************************************************************/
 
-#ifndef __TrigHIEventShapeJetIteration_H__
-#define __TrigHIEventShapeJetIteration_H__
+#ifndef TRIGHIREC_TRIGHIEVENTSHAPEJETITERATION_H
+#define TRIGHIREC_TRIGHIEVENTSHAPEJETITERATION_H
 
 #include "AsgTools/AsgTool.h"
 #include <string>
@@ -65,8 +65,6 @@ private:
 
   mutable bool m_isInit;
 
-  bool m_do_remodulation;
-  unsigned int m_modulation_scheme;
   std::string m_modulation_key;
 };
 
diff --git a/Trigger/TrigAlgorithms/TrigHLTJetHemisphereRec/cmt/requirements b/Trigger/TrigAlgorithms/TrigHLTJetHemisphereRec/cmt/requirements
deleted file mode 100755
index 81e4f97a3fa30e458dfbe7fdadaa99c1d0e1f3e6..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigHLTJetHemisphereRec/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-package TrigHLTJetHemisphereRec
-
-author Valentinos Christodoulou <valentinos.christodoulou@cern.ch>
-
-public
-use AtlasPolicy    	AtlasPolicy-*
-use GaudiInterface 	GaudiInterface-* 	External
-use AtlasFastJet   	AtlasFastJet-*        	External
-
-#use JetInterface   	JetInterface-*          Reconstruction/Jet
-#use JetRec         	JetRec-*      	    	Reconstruction/Jet
-use TrigInterfaces 	TrigInterfaces-*        Trigger/TrigSteer
-use TrigCaloEvent  	TrigCaloEvent-*         Trigger/TrigEvent
-use TrigTimeAlgs        TrigTimeAlgs-*          Trigger/TrigTools
-use AtlasROOT      	AtlasROOT-*             External
-
-use TrigParticle   	TrigParticle-*	    	Trigger/TrigEvent
-use xAODJet        	xAODJet-*               Event/xAOD
-use TrigSteeringEvent	TrigSteeringEvent-*     Trigger/TrigEvent
-
-
-# apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_python_modules files="*.py"
-
-library TrigHLTJetHemisphereRec *.cxx -s=components *.cxx                              
-apply_pattern component_library                                              
-
-
-private
-#use CaloEvent      CaloEvent-*              Calorimeter
-use xAODCaloEvent  xAODCaloEvent-*          Event/xAOD
-use JetEDM         	JetEDM-*      	    	Reconstruction/Jet
-
diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/cmt/requirements b/Trigger/TrigAlgorithms/TrigHLTJetRec/cmt/requirements
deleted file mode 100644
index e8316c12e018531f3db3050430ff471c3d676c28..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigHLTJetRec/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package TrigHLTJetRec
-
-author Valentinos Christodoulou <valentinos.christodoulou@cern.ch>
-author P sherwood <peter.sherwood@cern.ch>
-
-public
-use AtlasPolicy    	  AtlasPolicy-*
-use GaudiInterface 	  GaudiInterface-*       External
-use AtlasFastJet   	  AtlasFastJet-*         External
-use StoreGate         StoreGate-*            Control
-
-use JetInterface   	  JetInterface-*         Reconstruction/Jet
-use JetRec         	  JetRec-*      	     Reconstruction/Jet
-use TrigInterfaces 	  TrigInterfaces-*       Trigger/TrigSteer
-use TrigCaloEvent  	  TrigCaloEvent-*        Trigger/TrigEvent
-use AtlasROOT      	  AtlasROOT-*            External
-
-use JetEDM         	  JetEDM-*      	     Reconstruction/Jet
-use TrigParticle   	  TrigParticle-*	     Trigger/TrigEvent
-use xAODJet        	  xAODJet-*              Event/xAOD
-use TrigSteeringEvent TrigSteeringEvent-*    Trigger/TrigEvent
-
-use xAODCaloEvent  	  xAODCaloEvent-*        Event/xAOD
-use TrigNavStructure  TrigNavStructure-*     Trigger/TrigEvent
-use AthenaBaseComps   AthenaBaseComps-*      Control
-
-use xAODBase          xAODBase-*             Event/xAOD
-use xAODTrigL1Calo    xAODTrigL1Calo-*       Event/xAOD
-
-# apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_python_modules files="*.py"
-
-library TrigHLTJetRec *.cxx -s=components *.cxx                              
-apply_pattern component_library                                              
-
-
-private
-#use xAODCaloEvent  xAODCaloEvent-*         Event/xAOD
-use CaloEvent      	CaloEvent-*             Calorimeter
-use EventShapeTools EventShapeTools-*       Reconstruction/EventShapes 
-use xAODEventShape  xAODEventShape-*        Event/xAOD
diff --git a/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py b/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py
index 6e7d5fcc4fcbc0508bfe8dda434fad83e004b802..bd4765bde6b376a34eccb34059e90c50526a7d8b 100644
--- a/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py
+++ b/Trigger/TrigAlgorithms/TrigHLTJetRec/python/TrigHLTJetRecConfig.py
@@ -114,8 +114,9 @@ def _getTrimmedJetCalibrationModifier(jet_calib,int_merge_param,cluster_calib,rc
         raise RuntimeError(error%("only R=1.0 is supported"))
 
     # We only have calibrations for rclus=0.2, ptfrac=0.05
-    if rclus != 0.2 or ptfrac != 0.05:
-        raise RuntimeError(error%("only rclus=0.2 and ptfrac=0.05 are supported"))
+    # However, we use ptfrac=0.04 to avoid resolution problems with the ptfrac=0.05 calibrations
+    if rclus != 0.2 or ptfrac != 0.04:
+        raise RuntimeError(error%("only rclus=0.2 and ptfrac=0.04 (in place of 0.05) are supported"))
     
     # If we got here, everything checks out
     # Do a generic build from the arguments
@@ -123,7 +124,8 @@ def _getTrimmedJetCalibrationModifier(jet_calib,int_merge_param,cluster_calib,rc
 
     alg="AntiKt"
     rad=float(int_merge_param)/10.
-    inp="%sTopoTrimmedPtFrac%sSmallR%s"%(cluster_calib,str(int(ptfrac*100+0.1)),str(int(rclus*100+0.1)))
+    #inp="%sTopoTrimmedPtFrac%sSmallR%s"%(cluster_calib,str(int(ptfrac*100+0.1)),str(int(rclus*100+0.1)))
+    inp="%sTopoTrimmedPtFrac%sSmallR%s"%(cluster_calib,str(int(0.05*100+0.1)),str(int(rclus*100+0.1))) #hardcoded for now due to 0.04 vs 0.05 choice
     seq="jm"
     config="triggerTrim"
     evsprefix="HLTKt4"
@@ -143,6 +145,13 @@ def _getTrimmedJetCalibrationModifier(jet_calib,int_merge_param,cluster_calib,rc
     return calibmod
 
 
+
+def _getIsData():
+    # From Joerg on trig dev list, July 12 2017
+    from AthenaCommon.GlobalFlags import globalflags
+    return globalflags.DataSource() == 'data'
+
+
 def _getJetBuildTool(merge_param,
                      ptmin,
                      ptminFilter,
@@ -173,11 +182,15 @@ def _getJetBuildTool(merge_param,
     jtm.gettersMap["mygetters"] = mygetters
     # print jtm.gettersMap.keys()
 
+    # in situ calibration step is only for data, not MC
+    # this string here allows the following code to be data/MC unaware
+    inSitu = 'i' if _getIsData() else ''
+
     # tell the offline code which calibration is requested
     calib_str = {'jes': 'calib:j:triggerNoPileup:HLTKt4',
                  'subjes': 'calib:aj:trigger:HLTKt4',
                  'sub': 'calib:a:trigger:HLTKt4',
-                 'subjesIS': 'calib:ajgi:trigger2016:HLTKt4'}.get(jet_calib, '')
+                 'subjesIS': 'calib:ajg%s:trigger2016:HLTKt4'%(inSitu)}.get(jet_calib, '')
 
     # with S Schramm very early 18/4/2016
     mymods = [jtm.jetens]
@@ -597,7 +610,7 @@ class TrigHLTJetRecGroomer(TrigHLTJetRecConf.TrigHLTJetRecGroomer):
                  output_collection_label='defaultJetCollection',
                  pseudojet_labelindex_arg='PseudoJetLabelMapTriggerFromCluster',
                  rclus= 0.2,
-                 ptfrac= 0.05,
+                 ptfrac= 0.04,
                  ):
         
         TrigHLTJetRecConf.TrigHLTJetRecGroomer.__init__(self, name = name)
diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/cmt/requirements b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/cmt/requirements
deleted file mode 100644
index 64e142ef08793e6abebe17a303f0ceebadc9ff98..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package TrigL2LongLivedParticles
-
-author Antonio Policicchio <antonio.policicchio@cern.ch>
-author Stefano Giagu <stefano.giagu@cern.ch>
-
-# ============================================================================================
-public
-use	AtlasPolicy		AtlasPolicy-*
-use	TrigMuonEvent		TrigMuonEvent-*			Trigger/TrigEvent
-use	TrigInterfaces		TrigInterfaces-*		Trigger/TrigSteer
-use	TrigTimeAlgs		TrigTimeAlgs-*			Trigger/TrigTools
-use	TrigT1Interfaces	TrigT1Interfaces-*		Trigger/TrigT1
-use     xAODTrigger             xAODTrigger-*                   Event/xAOD
-
-# ============================================================================================
-private
-use	CaloEvent		CaloEvent-*			Calorimeter
-use     AthContainers           AthContainers-*                 Control
-use     FourMomUtils            FourMomUtils-*                  Event
-use	xAODJet			xAODJet-*			Event/xAOD
-use     xAODTracking            xAODTracking-*                  Event/xAOD
-use	AtlasCLHEP		AtlasCLHEP-*			External
-use	AtlasROOT		AtlasROOT-*			External
-use	GaudiInterface		GaudiInterface-*		External
-use     JetEvent                JetEvent-*              	Reconstruction/Jet
-use	PathResolver		PathResolver*			Tools
-use	TrigCaloEvent		TrigCaloEvent-*			Trigger/TrigEvent
-use 	TrigNavigation		TrigNavigation-*		Trigger/TrigEvent
-use	TrigParticle		TrigParticle-*			Trigger/TrigEvent
-use	TrigSteeringEvent	TrigSteeringEvent-*		Trigger/TrigEvent
-use     CxxUtils                CxxUtils-*                      Control
-
-private
-apply_tag ROOTMathLibs
-end_private
-
-# ============================================================================================
-library TrigL2LongLivedParticles *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/doc/packagedoc.h
index 17559a9fc87b840b84c99196ae4587a7cd050234..ed5f90a48ec07c143c7f493e049f3ff36c5eb062 100644
--- a/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigL2LongLivedParticles/doc/packagedoc.h
@@ -25,16 +25,6 @@ algorithm computes the number
 of tracks with a Pt > 1 GeV in a region etaxphi 0.2x0.2 
 around the jet direction. No feature is written for this algorithm.
 
-@ref used_TrigL2LongLivedParticles
 
-@ref requirements_TrigL2LongLivedParticles
 
 */
-
-/**
-@page used_TrigL2LongLivedParticles Used Packages
-*/
-
-/**
-@page requirements_TrigL2LongLivedParticles Requirements
-*/
diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/cmt/requirements b/Trigger/TrigAlgorithms/TrigL2MissingET/cmt/requirements
deleted file mode 100755
index 7987385c49d8cf45c18a23a7dbbd52b7ddffdaa7..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigL2MissingET/cmt/requirements
+++ /dev/null
@@ -1,36 +0,0 @@
-package TrigL2MissingET
-
-author Kyle Cranmer <Kyle.Cranmer@cern.ch>
-author Till Eifert  <Till.Eifert@cern.ch>
-author Diego Casadei <Diego.Casadei@cern.ch>
-
-
-use AtlasPolicy         AtlasPolicy-*
-use TrigInterfaces      TrigInterfaces-*             Trigger/TrigSteer
-use TrigSteeringEvent	TrigSteeringEvent-*          Trigger/TrigEvent
-use DataCollection      DataCollection-*             External
-use IRegionSelector     IRegionSelector-*            DetectorDescription
-use LArRecEvent         LArRecEvent-*                LArCalorimeter
-use GaudiInterface      GaudiInterface-*             External
-use CaloIdentifier      CaloIdentifier-*             Calorimeter
-use LArIdentifier       LArIdentifier-*              LArCalorimeter
-use LArCabling          LArCabling-*                 LArCalorimeter
-use xAODTrigMissingET   xAODTrigMissingET-*          Event/xAOD
- 
-private
-use TrigT2CaloCommon    TrigT2CaloCommon-*           Trigger/TrigAlgorithms
-use TrigMissingEtEvent  TrigMissingEtEvent-*         Trigger/TrigEvent
-use TrigCaloEvent	TrigCaloEvent-*    	     Trigger/TrigEvent
-use TrigNavigation      TrigNavigation-*             Trigger/TrigEvent
-use TrigT1Interfaces    TrigT1Interfaces-*           Trigger/TrigT1
-use AtlasCLHEP          AtlasCLHEP-*                 External
-use CxxUtils            CxxUtils-*                   Control
-use  xAODEventInfo      xAODEventInfo-*              Event/xAOD
-end_private
-
-
-#apply_pattern component_library
-apply_pattern dual_use_library files=*.cxx
-#apply_pattern declare_runtime files="*.dtd *.xml *.car *.config"
-#apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigL2MissingET/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigL2MissingET/doc/packagedoc.h
index b149d0ee8ef964ca9ff65511a3e40dd331f62d83..347a2d9fe8a44e7262a70fc8888140a9e7a6e16f 100644
--- a/Trigger/TrigAlgorithms/TrigL2MissingET/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigL2MissingET/doc/packagedoc.h
@@ -48,20 +48,3 @@ property                [default]                 meaning
 As eta is not available from LVL1, the last two properties are not used.
 
 */
-
-/**
-@page used_TrigL2MissingET Used Packages
-*/
-
-/**
-@page requirements_TrigL2MissingET Requirements
-*/
-
-
-
-
-
-
-
-
-
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h
index 8144f4f332313227dba745130a039085152a028e..5dc507b393d75d885df96003d94cb249345502ee 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/MuFastSteering.h
@@ -25,6 +25,13 @@
 #include "TrigL2MuonSA/CscSegmentMaker.h"
 #include "TrigL2MuonSA/CscRegUtils.h"
 
+//adding a part of DataHandle for AthenaMT
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "StoreGate/ReadHandleKey.h"    
+#include "StoreGate/WriteHandleKey.h"   
+#include "TrigMuonEvent/MuonFeature.h"
+#include "TrigMuonEvent/MuonFeatureDetails.h"
+
 #include "xAODTrigMuon/L2StandAloneMuonContainer.h"
 #include "xAODTrigger/TrigCompositeAuxContainer.h"
 #include "xAODTrigger/TrigCompositeContainer.h"
@@ -69,7 +76,11 @@ class MuFastSteering : public HLT::FexAlgo,
   /** hltExecute(), main code of the algorithm */
   HLT::ErrorCode hltExecute(const HLT::TriggerElement* inputTE, 
 			    HLT::TriggerElement* outputTE);
-  
+
+  //adding a part of DataHandle for AthenaMT
+  /** execute(), main code of the algorithm for AthenaMT*/
+  StatusCode execute();
+
   int L2MuonAlgoMap(const std::string& name);
   
   /** A function which clears internal data for a new event */
@@ -178,7 +189,23 @@ class MuFastSteering : public HLT::FexAlgo,
   DoubleProperty m_rWidth_TGC_Failed;
 
   DoubleProperty m_winPt;
-  
+
+  //adding a part of DataHandle for AthenaMT
+  //ReadHandle L1MURoIs
+  SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey;    
+  SG::ReadHandle<TrigRoiDescriptorCollection> m_roiCollection;		
+
+  //WriteHandle MuonFeature 
+  SG::WriteHandleKey<MuonFeature> m_muFeContainerKey;			
+  SG::WriteHandle<MuonFeature> m_muFeContainer;  			
+
+  //WriteHandle MuonFeatureDetails
+  SG::WriteHandleKey<MuonFeatureDetails> m_muFeDeContainerKey;		
+  SG::WriteHandle<MuonFeatureDetails> m_muFeDeContainer;  		
+
+  //Test Value to confirm to record with WriteHandle
+  MuonFeatureDetails muFeDeTestValue;					
+
   //Monitored variables
   float m_inner_mdt_hits;
   float m_middle_mdt_hits;
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h
index 71c2f03e5a35d99d73c8c79464f3633f4b9e3e3e..a1b584d2addbe43a09106d5a11dca75e10f3386c 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/RpcDataPreparator.h
@@ -33,6 +33,7 @@
 
 #include "TrigSteeringEvent/TrigRoiDescriptor.h"
 
+
 class StoreGateSvc;
 class ActiveStoreSvc;
 class RpcIdHelper;
@@ -77,7 +78,7 @@ class RpcDataPreparator: public AthAlgTool
       bool isFakeRoi() { return m_isFakeRoi; }
 
       void setRoIBasedDataAccess(bool use_RoIBasedDataAccess);
-      
+
  private:
 		       
       // Reference to StoreGateSvc;
@@ -97,9 +98,11 @@ class RpcDataPreparator: public AthAlgTool
 
       // handles to the RoI driven data access
       ToolHandle<Muon::IMuonRdoToPrepDataTool> m_rpcPrepDataProvider;
-
+      
       ToolHandle <Muon::MuonIdHelperTool>  m_idHelperTool;  //!< Pointer to concrete tool
 
+      // Declare the keys used to access the data: one for reading and one
+      // for writing.
       bool m_use_RoIBasedDataAccess;
       bool m_isFakeRoi;
 };
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h
index 421da05d59b2ae65e54eab2e2caeff7a336a6ddb..8e4b5b0c08f668eb6cc0fdf5d2bc1d92bdba59aa 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/TrigL2MuonSA/TgcDataPreparator.h
@@ -89,6 +89,7 @@ class TgcDataPreparator: public AthAlgTool
       const MuonGM::TgcReadoutElement* m_tgcReadout;
       const TgcIdHelper* m_tgcIdHelper;
       ActiveStoreSvc* m_activeStore;
+
       // vector of the TGC hash ID list
       std::vector<IdentifierHash> m_tgcHashList;         
 
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/cmt/requirements b/Trigger/TrigAlgorithms/TrigL2MuonSA/cmt/requirements
deleted file mode 100644
index 1b515f5f9cffac4e1f83eb978c861132f1f26a52..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/cmt/requirements
+++ /dev/null
@@ -1,72 +0,0 @@
-#################################################
-package TrigL2MuonSA
-
-author Kunihiro Nagano <Kunihiro.Nagano@cern.ch>
-
-use AtlasPolicy            AtlasPolicy-*
-use AthenaBaseComps        AthenaBaseComps-*          Control
-use AtlasROOT              AtlasROOT-*                External
-use GaudiInterface         GaudiInterface-*           External
-
-use TrigT1RPCRecRoiSvc     TrigT1RPCRecRoiSvc-*       Trigger/TrigT1
-use TrigT1Interfaces       TrigT1Interfaces-*         Trigger/TrigT1
-use TrigInterfaces         TrigInterfaces-*           Trigger/TrigSteer
-use TrigSteeringEvent      TrigSteeringEvent-*        Trigger/TrigEvent
-use TrigTimeAlgs           TrigTimeAlgs-*             Trigger/TrigTools
-
-use RegionSelector         RegionSelector-*           DetectorDescription
-use Identifier             Identifier-*               DetectorDescription
-use ByteStreamCnvSvcBase   ByteStreamCnvSvcBase-*     Event
-use MuonCnvToolInterfaces  MuonCnvToolInterfaces-*    MuonSpectrometer/MuonCnv
-
-use MuonMDT_Cabling	   MuonMDT_Cabling-*	      MuonSpectrometer/MuonCablings
-use MuonTGC_Cabling        MuonTGC_Cabling-*          MuonSpectrometer/MuonCablings
-use MuonRPC_Cabling        MuonRPC_Cabling-*          MuonSpectrometer/MuonCablings
-use RPCcablingInterface    RPCcablingInterface-*      MuonSpectrometer/MuonCablings
-
-use MuonRecToolInterfaces  MuonRecToolInterfaces-*    MuonSpectrometer/MuonReconstruction/MuonRecTools
-use CscClusterization      CscClusterization-*        MuonSpectrometer/MuonReconstruction/MuonDataPrep
-use MuonPrepRawData        MuonPrepRawData-*          MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use MuonIdHelpers          MuonIdHelpers-*            MuonSpectrometer
-use MuonRDO                MuonRDO-*                  MuonSpectrometer
-use GeoPrimitives	   GeoPrimitives-*	      DetectorDescription
-
-use TrigMuonEvent          TrigMuonEvent-*            Trigger/TrigEvent
-use MdtCalibSvc            MdtCalibSvc-*              MuonSpectrometer/MuonCalib/MdtCalib
-
-use TrigMuonBackExtrapolator  TrigMuonBackExtrapolator-*  Trigger/TrigTools
-
-use xAODTrigMuon   	   xAODTrigMuon-*       Event/xAOD
-use xAODTrigger		   xAODTrigger-*	      Event/xAOD
-
-##use MuonCnvExample	   MuonCnvExample-*	      MuonSpectrometer/MuonCnv
-
-private
-
-use StoreGate              StoreGate-*                Control
-use AtlasCLHEP             *                          External
-use AtlasGSL               *                          External
-use PathResolver           PathResolver-*             Tools
-use EventInfo              EventInfo-*                Event
-use MuonCalibEvent         MuonCalibEvent-*           MuonSpectrometer/MuonCalib
-use MuonContainerManager   MuonContainerManager-*     MuonSpectrometer/MuonCnv
-
-use MuonReadoutGeometry	   MuonReadoutGeometry-*      MuonSpectrometer/MuonDetDescr
-use MuonIdHelpers          MuonIdHelpers-*            MuonSpectrometer
-use MuonCablingData	   MuonCablingData-*	      MuonSpectrometer/MuonCablings
-
-macro_append TrigL2MuonSA_linkopts " -lcirc_proc -lMuCalDecode"
-
-end_private
-
-# Specify the required tdaq-common components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(tdaq-common COMPONENTS MuCalDecode circ_proc)"
-
-library TrigL2MuonSA *.cxx -s=components *.cxx
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_runtime files="pt_barrel.lut pt_barrelSP.lut pt_barrelSP_new.lut pt_barrel.mc10.lut pt_endcap.lut pt_endcap.mc10.lut dZ_barrel.lut pt_endcap_small_large.lut pt_endcap_run2.lut pt_comb_mean.lut pt_comb_sigma.lut"
-
-#################################################
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py
index 01d52a9de5da199c65e771f0f060995fc7851e74..daf2518846395996e141e1130d26fe44b660c2c2 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/python/TrigL2MuonSAConfig.py
@@ -31,7 +31,6 @@ ToolSvc += MuonBackExtrapolatorForData()
 ToolSvc += TrigL2MuonSA__CscSegmentMaker()
 ToolSvc += TrigL2MuonSA__CscRegDict()
 
-
 class PtBarrelLUTSvc(TrigL2MuonSA__PtBarrelLUTSvc):
     def __init__(self,name = 'PtBarrelLUTSvc'):
         super(PtBarrelLUTSvc ,self).__init__(name)
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
index 02a9928d08e55c66f6656f897b17a431ac5285f4..ff5b164040a244cad1aef92ebc6c56bc0cec5d5f 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastSteering.cxx
@@ -24,6 +24,7 @@
 
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 
+using namespace SG;
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
@@ -46,6 +47,9 @@ MuFastSteering::MuFastSteering(const std::string& name, ISvcLocator* svc)
     m_rpcFitResult(), m_tgcFitResult(),
     m_mdtHits_normal(), m_mdtHits_overlap(),
     m_cscHits(),
+    m_roiCollection("L1MURoIs"),		//ReadHandle L1MuRoIs to read in
+    m_muFeContainer("MuonFeature"),		//WriteHandle MuonFeature to record
+    m_muFeDeContainer("MuonFeatureDetails"),    //WriteHandle MuonFeatureDetails to record
     m_jobOptionsSvc(0), m_trigCompositeContainer(0)
 {
   declareProperty("DataPreparator",    m_dataPreparator,    "data preparator");
@@ -110,6 +114,12 @@ MuFastSteering::MuFastSteering(const std::string& name, ISvcLocator* svc)
   declareMonitoredStdContainer("TrackPhi", m_track_phi);
   declareMonitoredStdContainer("FailedRoIEta", m_failed_eta);
   declareMonitoredStdContainer("FailedRoIPhi", m_failed_phi);
+
+  //adding a part of DataHandle for AthenaMT
+  declareProperty("MuRoIs", m_roiCollectionKey = std::string("L1MURoIs"), "L1MuRoIs to read in"); 
+  declareProperty("MuonFeature",m_muFeContainerKey = std::string("MuonFeature"),"MuonFeature to record");	
+  declareProperty("MuonFeatureDetails",m_muFeDeContainerKey = std::string("MuonFeatureDetails"),"MuonFeatureDetails to record");
+
 }
 
 // --------------------------------------------------------------------------------
@@ -166,7 +176,8 @@ HLT::ErrorCode MuFastSteering::hltInitialize()
   
   // 
   if (m_patternFinder.retrieve().isFailure()) {
-    ATH_MSG_ERROR("Cannot retrieve Tool DataPreparator");
+   
+ATH_MSG_ERROR("Cannot retrieve Tool DataPreparator");
     return HLT::BAD_JOB_SETUP;
   }
 
@@ -199,8 +210,6 @@ HLT::ErrorCode MuFastSteering::hltInitialize()
     ATH_MSG_ERROR("Could not retrieve " << m_cscsegmaker);
     return HLT::BAD_JOB_SETUP;
   }
-
-
   // Set service tools
   m_trackExtrapolator->setExtrapolatorTool(&m_backExtrapolatorTool);
   m_dataPreparator->setExtrapolatorTool(&m_backExtrapolatorTool);
@@ -276,15 +285,23 @@ HLT::ErrorCode MuFastSteering::hltInitialize()
       p_incidentSvc->addListener(this,"UpdateAfterFork",pri);
       p_incidentSvc.release().ignore();
     }
-  }
-
-
-
-
+  } 
 
+  //adding a part of DataHandle for AThenaMT
+  if (m_roiCollectionKey.initialize().isFailure() ) { 
+    ATH_MSG_ERROR("ReadHandleKey for L1MURoIs initialize Failure!");
+    return HLT::BAD_JOB_SETUP;   
+  }
+  if (m_muFeContainerKey.initialize().isFailure() ) {
+    ATH_MSG_ERROR("WriteHandleKey for MuonFeature initialize Failure!");
+    return HLT::BAD_JOB_SETUP;
+  }
+  if (m_muFeDeContainerKey.initialize().isFailure() ) {
+    ATH_MSG_ERROR("WriteHandleKey for MuonFeatureDetails initialize Failure!");
+    return HLT::BAD_JOB_SETUP;
+  }
   
   ATH_MSG_DEBUG("initialize success");
-  
   return HLT::OK;
 }
 
@@ -311,6 +328,61 @@ HLT::ErrorCode MuFastSteering::hltEndRun() {
    return HLT::OK;
 }
 
+//adding a part of DataHandel for AthenaMT
+StatusCode MuFastSteering::execute() {
+
+  ATH_MSG_DEBUG("StatusCode MuFastSteering::execute() start");
+
+  //ReadHandle:L1MURoIs to read in 
+  auto roiCollectionHandle = SG::makeHandle( m_roiCollectionKey );
+  const TrigRoiDescriptorCollection *roiCollection = roiCollectionHandle.cptr();
+  if (!roiCollectionHandle.isValid()){
+    ATH_MSG_ERROR("ReadHandle for L1MURoIs isn't Valid");
+    return StatusCode::FAILURE;
+  }
+  const TrigRoiDescriptor* roiDescriptor = 0;
+  TrigRoiDescriptorCollection::const_iterator roiIn = roiCollection->begin();
+  TrigRoiDescriptorCollection::const_iterator roiEn = roiCollection->end(); 
+  for(; roiIn != roiEn; ++roiIn){
+	roiDescriptor = *roiIn;
+	float roieta = roiDescriptor->eta();
+        float roiphi = roiDescriptor->phi();
+        ATH_MSG_DEBUG("L1MURoIs eta/phi = " << roieta << "/" << roiphi);
+  }
+  ATH_MSG_DEBUG("ReadHandle for L1MURoIs success");
+
+  //WriteHandle:MuonFeature to record
+  SG::WriteHandle<MuonFeature> muFeContainerHandle(m_muFeContainerKey);
+  muFeContainerHandle = std::make_unique<MuonFeature>();
+  if(!muFeContainerHandle.isValid()){
+        ATH_MSG_ERROR("ReadHandle for MuonFeature isn't Valid");
+        return StatusCode::FAILURE;
+  }
+//  ATH_MSG_DEBUG("muFeContainer Pt/Alpha/Beta= " << muFeContainerHandle->Pt() << "/" << muFeContainerHandle->Alpha() << "/" << muFeContainerHandle->Beta());
+  ATH_MSG_DEBUG("WriteHandle for MuonFeature success");
+
+  //Test Value defined
+  float muFeDePt = 1.52;
+  float muFeDeAlpha = 1.23;
+  float muFeDeBeta = -1.15;
+  muFeDeTestValue.setPt(muFeDePt);
+  muFeDeTestValue.setAlpha(muFeDeAlpha);
+  muFeDeTestValue.setBeta(muFeDeBeta);
+  
+  //WriteHandle:MuonFeatureDetails to record
+  SG::WriteHandle<MuonFeatureDetails> muFeDeContainerHandle(m_muFeDeContainerKey);
+  muFeDeContainerHandle = std::make_unique<MuonFeatureDetails>(muFeDeTestValue);
+  if(!muFeDeContainerHandle.isValid()){
+        ATH_MSG_ERROR("ReadHandle for MuonFeatureDetails isn't Valid");
+        return StatusCode::FAILURE;
+  }
+  ATH_MSG_DEBUG("muFeDeContainer Pt/Alpha/Beta= " << muFeDeContainerHandle->Pt() << "/" << muFeDeContainerHandle->Alpha() << "/" << muFeDeContainerHandle->Beta());
+  ATH_MSG_DEBUG("WriteHandle for MuonFeatureDetails success");
+
+  ATH_MSG_DEBUG("StatusCode MuFastSteering::execute() success");
+  return StatusCode::SUCCESS;
+}
+
 HLT::ErrorCode MuFastSteering::hltFinalize() {
   ATH_MSG_DEBUG("hltFinalize()");
    return HLT::OK;
@@ -352,7 +424,7 @@ HLT::ErrorCode MuFastSteering::hltExecute(const HLT::TriggerElement* inputTE,
     }
   }
   clearEvent();
-  
+ 
   if (m_timerSvc) m_timers[ITIMER_TOTAL_PROCESSING]->resume();
   if (m_timerSvc) m_timers[ITIMER_DATA_PREPARATOR]->resume();
   
@@ -395,7 +467,7 @@ HLT::ErrorCode MuFastSteering::hltExecute(const HLT::TriggerElement* inputTE,
 
     if ( m_recMuonRoIUtils.isBarrel(*p_roi) ) { // Barrel
       ATH_MSG_DEBUG("Barrel");
-      
+     
       m_muonRoad.setScales(m_scaleRoadBarrelInner,
                            m_scaleRoadBarrelMiddle,
                            m_scaleRoadBarrelOuter);      
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx
index 1d91362e76ac60c33ce4a875f4c1682136f7e53b..ce4a94e90a055a9cad2b79f64e0f8156f01b2830 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/RpcDataPreparator.cxx
@@ -26,6 +26,7 @@
 
 using namespace Muon;
 using namespace MuonGM;
+using namespace SG;
 
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
@@ -49,6 +50,7 @@ TrigL2MuonSA::RpcDataPreparator::RpcDataPreparator(const std::string& type,
 {
    declareInterface<TrigL2MuonSA::RpcDataPreparator>(this);
    declareProperty("RpcPrepDataProvider", m_rpcPrepDataProvider);
+
 }
 
 // --------------------------------------------------------------------------------
@@ -236,8 +238,8 @@ StatusCode TrigL2MuonSA::RpcDataPreparator::prepareData(const TrigRoiDescriptor*
      const RpcPrepDataContainer* rpcPrds = 0;
      std::string rpcKey = "RPC_Measurements";
      
-     if (m_activeStore) {
-       StatusCode sc = (*m_activeStore)->retrieve(rpcPrds, rpcKey);
+     if (m_activeStore) {		//m_activeStore->m_storeGateSvc
+       StatusCode sc = (*m_activeStore)->retrieve(rpcPrds, rpcKey);	//m_activeStore->m_storeGateSvc
        if ( sc.isFailure() ) {
          ATH_MSG_ERROR(" Cannot retrieve RPC PRD Container " << rpcKey);
          return StatusCode::FAILURE;;
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
index 37d862be4b756e2e1c05c528d11d9882be1572a3..72c3485f6a196e80b413e49c66eb7acb7a522955 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/TgcDataPreparator.cxx
@@ -53,6 +53,7 @@ TrigL2MuonSA::TgcDataPreparator::TgcDataPreparator(const std::string& type,
    declareProperty("TGC_RawDataProvider", m_tgcRawDataProvider);
 }
 
+
 // --------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------
 
@@ -177,7 +178,7 @@ StatusCode TrigL2MuonSA::TgcDataPreparator::prepareData(const LVL1::RecMuonRoI*
    int channel;
    
    bool isLowPt = m_recMuonRoIUtils.isLowPt(p_roi);
-   
+
    // Select the eta cut based on ROI Pt.
    double mid_eta_test = (isLowPt) ? m_options.roadParameters().deltaEtaAtMiddleForLowPt()
      : m_options.roadParameters().deltaEtaAtMiddleForHighPt();
diff --git a/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/cmt/requirements b/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/cmt/requirements
deleted file mode 100755
index a307e5fcb9deea7f3809186ed3eafe5dd6eefbc5..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigL2SiTrackFinder/cmt/requirements
+++ /dev/null
@@ -1,54 +0,0 @@
-
-package TrigL2SiTrackFinder
-
-# =====================================================================
-
-public
-
-# General
-use AtlasPolicy			AtlasPolicy-*
-#use AtlasROOT                   AtlasROOT-02-*          External
-use GaudiInterface		GaudiInterface-*     External
-
-
-# For detector masking
-use DataCollection		DataCollection-*	External
-
-
-
-# Trigger
-use TrigInterfaces              TrigInterfaces-*	Trigger/TrigSteer
-use TrigInDetEvent		TrigInDetEvent-*	Trigger/TrigEvent
-use TrigSteeringEvent           TrigSteeringEvent-*     Trigger/TrigEvent
-
-# Tracking
-use TrkTrack		        TrkTrack-* 		Tracking/TrkEvent
-
-use IRegionSelector             IRegionSelector-*       DetectorDescription
-# use RegionSelector            RegionSelector-*        DetectorDescription
-# use RoiDescriptor             RoiDescriptor-*         DetectorDescription   
-
-
-# =====================================================================
-
-#apply_pattern declare_runtime_extras   extras="*.xml"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern component_library
-
-library TrigL2SiTrackFinder  *.cxx components/*.cxx 
-
-private
-
-use TrigSiSpacePointTool	TrigSiSpacePointTool-*	Trigger/TrigTools
-use TrigTimeAlgs		TrigTimeAlgs-*		Trigger/TrigTools
-
-use StoreGate			StoreGate-*		Control
-
-use InDetBeamSpotService        InDetBeamSpotService-*  InnerDetector/InDetConditions
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-*  Trigger/TrigTools
-use TrigInDetRecoTools          TrigInDetRecoTools-*    Trigger/TrigTools
-use TrkToolInterfaces           TrkToolInterfaces-*           Tracking/TrkTools
-use InDetPrepRawData 		InDetPrepRawData-* 	InnerDetector/InDetRecEvent
-use InDetIdentifier             InDetIdentifier-*            InnerDetector/InDetDetDescr
-use InDetRIO_OnTrack    InDetRIO_OnTrack-*	InnerDetector/InDetRecEvent 
diff --git a/Trigger/TrigAlgorithms/TrigL2TRTSegFinder/cmt/requirements b/Trigger/TrigAlgorithms/TrigL2TRTSegFinder/cmt/requirements
deleted file mode 100644
index 2164556d1a74011ed7f6e627f37d0070c0352fc5..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigL2TRTSegFinder/cmt/requirements
+++ /dev/null
@@ -1,59 +0,0 @@
-package TrigL2TRTSegFinder
-
-private
-
-use InDetRIO_OnTrack            InDetRIO_OnTrack-*   InnerDetector/InDetRecEvent
-#use StoreGate			StoreGate-*		Control
-use TrigSteeringEvent           TrigSteeringEvent-*     Trigger/TrigEvent
-use TrkParameters TrkParameters-* Tracking/TrkEvent
-use TrkSurfaces TrkSurfaces-* Tracking/TrkDetDescr
-use IRegionSelector          	IRegionSelector-*                DetectorDescription
-use MagFieldInterfaces    MagFieldInterfaces-*    MagneticField
-
-
-end_private
-
-public
-
-# General
-use AtlasPolicy			AtlasPolicy-*
-use GaudiInterface		GaudiInterface-*     External
-
-use AthenaBaseComps		AthenaBaseComps-*	Control
-
-use ByteStreamCnvSvcBase        ByteStreamCnvSvcBase-*      Event
-use RegionSelector              RegionSelector-*        DetectorDescription
-
-use TrigInDetEvent              TrigInDetEvent-*       	Trigger/TrigEvent
-use TrigTimeAlgs                TrigTimeAlgs-*          Trigger/TrigTools
-use InDetPrepRawData            InDetPrepRawData-*   InnerDetector/InDetRecEvent
-
-
-
-use TrigInterfaces              TrigInterfaces-*        Trigger/TrigSteer
-use TrigInDetToolInterfaces TrigInDetToolInterfaces-*   Trigger/TrigTools
-
-# SegmentFinder:
-use TrkSegment                   TrkSegment-*             Tracking/TrkEvent
-use InDetRecToolInterfaces       InDetRecToolInterfaces-* InnerDetector/InDetRecTools
-use TrkExInterfaces        TrkExInterfaces-*        Tracking/TrkExtrapolation
-use TrkGeometry            TrkGeometry-*            Tracking/TrkDetDescr
-
-# =====================================================================
-
-library TrigL2TRTSegFinder TrigTRTSegFinder.cxx components/TrigL2TRTSegFinder_load.cxx components/TrigL2TRTSegFinder_entries.cxx
-#apply_pattern dual_use_library files=*.cxx
- 
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
-
- 
-#apply_pattern dual_use_library files=*.cxx
-
-
-
-
-
-
diff --git a/Trigger/TrigAlgorithms/TrigMinBias/cmt/requirements b/Trigger/TrigAlgorithms/TrigMinBias/cmt/requirements
deleted file mode 100644
index a7f820ce3d8efb6b60f5cedc54dfa855eccbc21b..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigMinBias/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package TrigMinBias
-
-author Regina Kwee <Regina.Kwee@cern.ch>
-
-public
-
-use AtlasPolicy 	        AtlasPolicy-*
-
-use TrigInterfaces              TrigInterfaces-*        Trigger/TrigSteer
-use TrkTrack                    TrkTrack-*              Tracking/TrkEvent
-use TrigInDetEvent		TrigInDetEvent-*	Trigger/TrigEvent
-use xAODTracking		xAODTracking-*		Event/xAOD
-use xAODTrigMinBias		xAODTrigMinBias-*	Event/xAOD
-private
-
-use GaudiInterface              GaudiInterface-*        External
-use StoreGate                   StoreGate-*             Control
-use TrigTimeAlgs                TrigTimeAlgs-*          Trigger/TrigTools
-use TrkParameters               TrkParameters-*         Tracking/TrkEvent
-
-public
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_runtime files="*.dtd *.xml *.car *.config"
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Trigger/TrigAlgorithms/TrigMissingETMuon/cmt/requirements b/Trigger/TrigAlgorithms/TrigMissingETMuon/cmt/requirements
deleted file mode 100755
index b07db79415257aca0a33082144558a332eb46d5f..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigMissingETMuon/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package TrigMissingETMuon
-
-author Kyle Cranmer <Kyle.Cranmer@cern.ch>
-author Till Eifert  <Till.Eifert@cern.ch>
-author Diego Casadei <Diego.Casadei@cern.ch>
-author Allen Mincer <allen.mincer@nyu.edu>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  xAODTrigMissingET	        xAODTrigMissingET-*	        Event/xAOD
-private
-use  AtlasCLHEP                 AtlasCLHEP-*                    External
-use  CxxUtils                   CxxUtils-*                      Control
-use  DataCollection             DataCollection-*                External
-use  EventInfo                  EventInfo-*                     Event
-use  GaudiInterface             GaudiInterface-*                External
-use  TrigMissingEtEvent         TrigMissingEtEvent-*            Trigger/TrigEvent
-use  TrigMuonEvent              TrigMuonEvent-*                 Trigger/TrigEvent
-use  TrigNavigation             TrigNavigation-*                Trigger/TrigEvent
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigT1Interfaces           TrigT1Interfaces-*              Trigger/TrigT1
-use  xAODMuon                   xAODMuon-*                      Event/xAOD
-end_private
-
-
-#apply_pattern component_library
-apply_pattern dual_use_library files=*.cxx
-#apply_pattern declare_runtime files="*.dtd *.xml *.car *.config"
-#apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigMissingETMuon/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigMissingETMuon/doc/packagedoc.h
index f3a63fea21a8db88ef349d14018c4dbfb7023443..676c85c4021a57640aa6359a84b3b0ac99fdd334 100644
--- a/Trigger/TrigAlgorithms/TrigMissingETMuon/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigMissingETMuon/doc/packagedoc.h
@@ -48,20 +48,3 @@ property                [default]                 meaning
 As eta is not available from LVL1, the last two properties are not used.
 
 */
-
-/**
-@page used_TrigMissingETMuon Used Packages
-*/
-
-/**
-@page requirements_TrigMissingETMuon Requirements
-*/
-
-
-
-
-
-
-
-
-
diff --git a/Trigger/TrigAlgorithms/TrigMuSuperEF/cmt/requirements b/Trigger/TrigAlgorithms/TrigMuSuperEF/cmt/requirements
deleted file mode 100644
index 27e33f481995d0b96bc94eec06f0db9623f57090..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigMuSuperEF/cmt/requirements
+++ /dev/null
@@ -1,70 +0,0 @@
-package TrigMuSuperEF
-
-author Martin Woudstra <martin.woudstra@cern.ch>
-author Joel Klinger <joel.klinger@hep.manchester.ac.uk>
-
-private
-# generalities 
-use AtlasPolicy	      AtlasPolicy-* 
-use GaudiInterface    GaudiInterface-*			  External
-use CxxUtils          CxxUtils-*                          Control
-use AthenaKernel      AthenaKernel-*                      Control
-
-# trigger generalities
-use TrigInterfaces              TrigInterfaces-*                Trigger/TrigSteer
-use TrigSteeringEvent           TrigSteeringEvent-*             Trigger/TrigEvent
-use TrigTimeAlgs         	TrigTimeAlgs-*          	Trigger/TrigTools
-use TrigConfHLTData             TrigConfHLTData-*               Trigger/TrigConfiguration
-#use TrigNavigation           	TrigNavigation-*            	Trigger/TrigEvent
-
-use TrigMuonEvent               TrigMuonEvent-*                 Trigger/TrigEvent
-#use EventInfo                   EventInfo-*                    Event
-
-# tracking generalities
-use TrkSegment			TrkSegment-*			Tracking/TrkEvent
-#use TrkTrack			TrkTrack-*			Tracking/TrkEvent
-
-# Muon Reco EDM
-use MuonPattern				MuonPattern-*				MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use MuonSegment				MuonSegment-*				MuonSpectrometer/MuonReconstruction/MuonRecEvent
-
-#Sub-algorithms
-#use TrigMuonEF			TrigMuonEF-*			Trigger/TrigAlgorithms/
-#use TrigMuGirl			TrigMuGirl-*			Trigger/TrigAlgorithms/
-
-private 
-
-use MuidEvent			MuidEvent-*			Reconstruction/MuonIdentification
-use MuonRecToolInterfaces               MuonRecToolInterfaces-*                 MuonSpectrometer/MuonReconstruction/MuonRecTools
-use MuonCombinedEvent           MuonCombinedEvent-*             Reconstruction/MuonIdentification
-use MuonCombinedToolInterfaces  MuonCombinedToolInterfaces-*	Reconstruction/MuonIdentification
-
-use TrigMuonToolInterfaces      TrigMuonToolInterfaces-*        Trigger/TrigTools
-use CaloEvent                   CaloEvent-*                     Calorimeter
-use TrigNavigation              TrigNavigation-*                Trigger/TrigEvent
-use Particle                    Particle-*                      Reconstruction
-use TrkToolInterfaces		TrkToolInterfaces-*             Tracking/TrkTools
-
-use xAODMuon			xAODMuon-*			Event/xAOD
-use xAODTracking		xAODTracking-*			Event/xAOD
-
-#use xAODCore                    xAODCore-*                      Event/xAOD
-# Inform cmake that this package has private header files (transparent to CMT)
-apply_pattern cmake_add_command command="include_directories(src)"
-
-#-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-public
-
-library TrigMuSuperEF *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions     files="test_TrigMuSuperEF.py TrigMuSuperEF_debug_postOptions.py"
-apply_pattern declare_python_modules files="*.py"
-
-
-#-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-
-# to build in dbg mode this package while using an opt build uncomment the following 
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/cmt/requirements b/Trigger/TrigAlgorithms/TrigMuonEF/cmt/requirements
deleted file mode 100644
index 48d045bbdbe3886d4dc1e02dc7c40b18ea9cfd64..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigMuonEF/cmt/requirements
+++ /dev/null
@@ -1,103 +0,0 @@
-package TrigMuonEF
-
-author Sergio Grancagnolo <sergio.grancagnolo@le.infn.it>
-author Stefania Spagnolo <stefania.spagnolo@le.infn.it>
-
-public 
-# generalities 
-use AtlasPolicy	      AtlasPolicy-* 
-
-# trigger generalities
-use TrigSteeringEvent           TrigSteeringEvent-*             Trigger/TrigEvent
-use TrigMuonEvent               TrigMuonEvent-*                 Trigger/TrigEvent
-use TrigInDetEvent              TrigInDetEvent-*                Trigger/TrigEvent
-
-#use EventInfo                   EventInfo-*                    Event
-
-private 
-
-#For ConstDataVector:use AthContainers               AthContainers-*                 Control
-use GaudiInterface    GaudiInterface-*			  External
-
-use IRegionSelector             IRegionSelector-*               DetectorDescription
-
-use TrigInterfaces              TrigInterfaces-*                Trigger/TrigSteer
-
-
-# MoMu
-use MuonPattern				MuonPattern-*				MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use MuonSegment				MuonSegment-*				MuonSpectrometer/MuonReconstruction/MuonRecEvent
-
-# tracking generalities
-use TrkSegment			TrkSegment-*			Tracking/TrkEvent
-use TrkTrack			TrkTrack-*			Tracking/TrkEvent
-
-use AtlasCLHEP		  AtlasCLHEP-*                External
-use AthenaBaseComps		AthenaBaseComps-*		Control
-use CscClusterization           CscClusterization-*             MuonSpectrometer/MuonReconstruction/MuonDataPrep
-use MuidInterfaces		MuidInterfaces-*		Reconstruction/MuonIdentification
-use MuonCombinedToolInterfaces	MuonCombinedToolInterfaces-*	Reconstruction/MuonIdentification
-use MuonCnvToolInterfaces	MuonCnvToolInterfaces-*         MuonSpectrometer/MuonCnv
-use MuonReadoutGeometry MuonReadoutGeometry-* MuonSpectrometer/MuonDetDescr
-use MuonIdHelpers		MuonIdHelpers-*			MuonSpectrometer
-use MuonPrepRawData		MuonPrepRawData-*               MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use MuonRIO_OnTrack             MuonRIO_OnTrack-*               MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use MuonRecToolInterfaces               MuonRecToolInterfaces-*                 MuonSpectrometer/MuonReconstruction/MuonRecTools
-use MuonSegmentCombinerToolInterfaces   MuonSegmentCombinerToolInterfaces-*	MuonSpectrometer/MuonReconstruction/MuonSegmentCombiners/MuonSegmentCombinerTools
-use MuonCombinedToolInterfaces  MuonCombinedToolInterfaces-*	Reconstruction/MuonIdentification
-use MuonCombinedEvent           MuonCombinedEvent-*             Reconstruction/MuonIdentification
-use Particle			Particle-*			Reconstruction
-use TrigConfHLTData             TrigConfHLTData-*               Trigger/TrigConfiguration
-use TrigTimeAlgs         	TrigTimeAlgs-*          	Trigger/TrigTools
-use TrkTrackSummary		TrkTrackSummary-*		Tracking/TrkEvent
-use TrkParameters		TrkParameters-*			Tracking/TrkEvent
-use TrkEventPrimitives		TrkEventPrimitives-*		Tracking/TrkEvent
-use TrkToolInterfaces		TrkToolInterfaces-*             Tracking/TrkTools
-use StoreGate         		StoreGate-*              	Control
-use AthenaKernel         	AthenaKernel-*         		Control
-use FourMomUtils		FourMomUtils-*			Event
-use TrigNavigation           	TrigNavigation-*            	Trigger/TrigEvent
-use TrigInDetEvent           	TrigInDetEvent-*            	Trigger/TrigEvent
-use TrigMuonToolInterfaces      TrigMuonToolInterfaces-*        Trigger/TrigTools
-use xAODTracking		xAODTracking-*			Event/xAOD
-use xAODMuon			xAODMuon-*			Event/xAOD
-use xAODTrigMuon          	xAODTrigMuon-*                  Event/xAOD
-use xAODCaloEvent		xAODCaloEvent-*			Event/xAOD
-use RecoToolInterfaces	       RecoToolInterfaces-*	       Reconstruction/RecoTools
-use CaloEvent                  CaloEvent-*                     Calorimeter
-use AtlasROOT		       AtlasROOT-*		       External
-use TrigCaloEvent              TrigCaloEvent-*                 Trigger/TrigEvent
-
-#-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-public
-
-# Inform cmake that this package has private header files (transparent to CMT)
-apply_pattern cmake_add_command command="include_directories(src)"
-
-library TrigMuonEF \
-"SegmentCache.cxx\
- TrigMuonEFStandaloneTrackTool.cxx\
- TrigMuonEFTrackIsolation.cxx\
- TrigMuonEFTrackIsolationTool.cxx\
- TrigMuonEFRoiAggregator.cxx\
- InDetTrkRoiMaker.cxx\
- TrigMuonEFFSRoiMaker.cxx\
- TrigMuonEFRoiUtils.cxx\
- TrigMuonEFCaloIsolation.cxx\
- components/*.cxx"
-
-apply_pattern component_library
-
-                                      
-apply_pattern declare_joboptions     files="test_TrigMuonEF.py"
-apply_pattern declare_python_modules files="TrigMuonEFConfig.py TrigMuonEFCosmicConfig.py TrigMuonEFMonitoring.py TrigMuonEFConfigDb.py"
-
-
-#-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-
-# to build in dbg mode this package while using an opt build uncomment the following 
-private
-use EventPrimitives		 EventPrimitives-*		Event
-
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
diff --git a/Trigger/TrigAlgorithms/TrigMuonEF/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigMuonEF/doc/packagedoc.h
index a2ffade33c8aebc600f098132f26af34c5f4fe07..51b568da621a3f7eb1a041c8c228155916dea66d 100644
--- a/Trigger/TrigAlgorithms/TrigMuonEF/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigMuonEF/doc/packagedoc.h
@@ -9,17 +9,6 @@
 
 This package provides the implementation of EF wrappers for the offline muon reconstruction algorithms.
 
-@ref used_TrigMuonEF
 
-@ref requirements_TrigMuonEF
 
 */
-
-/**
-@page used_TrigMuonEF Used Packages
-*/
-
-/**
-@page requirements_TrigMuonEF Requirements
-*/
-
diff --git a/Trigger/TrigAlgorithms/TrigSecVtxFinder/cmt/requirements b/Trigger/TrigAlgorithms/TrigSecVtxFinder/cmt/requirements
deleted file mode 100644
index 15480da608b24c69548f0dc815c6cde0d8e2b455..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigSecVtxFinder/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigSecVtxFinder
-
-author Xinlu Huang <xinlu.huang@cern.ch>
-
-public
-use	AtlasPolicy		AtlasPolicy-*
-use	GaudiInterface		GaudiInterface-*		External
-use	TrigInterfaces		TrigInterfaces-*		Trigger/TrigSteer
-use	TrigTimeAlgs		TrigTimeAlgs-*			Trigger/TrigTools
-use	TrigTrackJetFinderTool	TrigTrackJetFinderTool-*	Trigger/TrigTools
-use     TrigInDetVxInJetTool	TrigInDetVxInJetTool-*		Trigger/TrigTools
-
-private
-use	GeoPrimitives		GeoPrimitives-*			DetectorDescription
-use     InDetBeamSpotService    InDetBeamSpotService-*		InnerDetector/InDetConditions
-use 	TrigInDetEvent          TrigInDetEvent-*		Trigger/TrigEvent
-use 	TrigSteeringEvent       TrigSteeringEvent-*		Trigger/TrigEvent
-
-end_private
-
-public
-
-library TrigSecVtxFinder *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_python_modules files ="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigSecVtxFinder/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigSecVtxFinder/doc/packagedoc.h
index a6611b7ed32493e0d91babd977c7af66fa2ca694..207c8db9afa72a816416d24638ee009670340696 100644
--- a/Trigger/TrigAlgorithms/TrigSecVtxFinder/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigSecVtxFinder/doc/packagedoc.h
@@ -7,6 +7,5 @@
 
 @author Xinlu Huang
 
-@section TrigSecVtxFinder_TrigSecVtxFinderReq Requirements
 
 */
diff --git a/Trigger/TrigAlgorithms/TrigT2BeamSpot/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2BeamSpot/cmt/requirements
deleted file mode 100644
index be5f91c5bdfca1855028f34da84f6f8ebb00584a..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2BeamSpot/cmt/requirements
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# $Id: requirements 793164 2017-01-20 03:59:26Z ssnyder $
-#
-
-package TrigT2BeamSpot
-
-author Rainer Bartoldus    <bartoldu@slac.stanford.edu>
-author David W. Miller     <David.W.Miller@cern.ch>
-author Su Dong             <sudong@slac.stanford.edu>
-
-#------------------------------
-# Public Requirements
-#------------------------------
-
-public
-
-use AtlasPolicy             AtlasPolicy-*
-
-use TrigInterfaces          TrigInterfaces-*          Trigger/TrigSteer
-use TrigSteeringEvent       TrigSteeringEvent-*       Trigger/TrigEvent
-
-#------------------------------
-# Private Requirements
-#------------------------------
-
-private
-
-use TrigInDetEvent          TrigInDetEvent-*          Trigger/TrigEvent
-use TrkTrack		            TrkTrack-* 		            Tracking/TrkEvent
-use TrkParameters	          TrkParameters-*           Tracking/TrkEvent
-use EventPrimitives         EventPrimitives-*         Event
-use GaudiInterface          GaudiInterface-*          External
-use AtlasROOT               AtlasROOT-*               External
-use EventInfo               EventInfo-*               Event
-use InDetBeamSpotService    InDetBeamSpotService-*    InnerDetector/InDetConditions
-use TrigNavigation          TrigNavigation-*          Trigger/TrigEvent
-use TrigTimeAlgs            TrigTimeAlgs-*            Trigger/TrigTools
-use AthContainers           AthContainers-*           Control
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-* Trigger/TrigTools
-use TrkTrackSummary            TrkTrackSummary-*          Tracking/TrkEvent
-#------------------------------------------------------------------
-
-apply_pattern component_library
-library TrigT2BeamSpot *.cxx components/TrigT2*.cxx
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h
index 908fe6ae24b93e28b9363d3f1991ebfedbde4b7d..cbe4e2178dab52e7e98718d72a7f1f4cc79cf824 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/TrigT2CaloCommon/IAlgToolCalo.h
@@ -209,7 +209,7 @@ class IAlgToolCalo: public virtual IAlgTool,
         CaloCellContainer** m_CaloCellContPoint;
         // Objects that the Tools should not worry about
   protected:
-	bool lardecoded, tiledecoded;
+	bool m_lardecoded, m_tiledecoded;
 	/** error control */
         uint32_t m_error;
         /** caloDDE (of the cluster 2nd layer hottest cell) */
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2CaloCommon/cmt/requirements
deleted file mode 100755
index 93f214ca17efdc3e1aeba5036fd05994aba4ab98..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/cmt/requirements
+++ /dev/null
@@ -1,58 +0,0 @@
-package TrigT2CaloCommon
-
-author Denis Oliveira <Denis.Oliveira.Damazio@cern.ch>
-author Carlos Osuna <Carlos.Osuna.Escamilla@cern.ch>
-author Xin Wu <Xin.Wu@cern.ch>
-author Pilar Casado <casado@ifae.es>
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*             External
-use AthenaKernel	AthenaKernel-*		     Control
-use AthenaBaseComps     AthenaBaseComps-*	     Control
-use DataCollection      DataCollection-*             External
-
-use StoreGate           StoreGate-*                  Control
-
-use CaloGeoHelpers      CaloGeoHelpers-*             Calorimeter
-use LArByteStream       LArByteStream-*              LArCalorimeter/LArCnv
-use TileByteStream      TileByteStream-*             TileCalorimeter/TileSvc
-use LArRecEvent         LArRecEvent-*                LArCalorimeter
-use LArRawUtils         LArRawUtils-*                LArCalorimeter
-use LArRecEvent         LArRecEvent-*                LArCalorimeter
-use LArCabling          LArCabling-*                 LArCalorimeter
-
-use TileEvent           TileEvent-*                  TileCalorimeter
-use Identifier          Identifier-*                 DetectorDescription
-use CaloIdentifier      CaloIdentifier-*             Calorimeter
-use CaloEvent           CaloEvent-*                  Calorimeter
-use xAODTrigCalo        xAODTrigCalo-*               Event/xAOD
-
-use TrigInterfaces      TrigInterfaces-*             Trigger/TrigSteer
-use IRegionSelector     IRegionSelector-*            DetectorDescription
-use TrigSteeringEvent   TrigSteeringEvent-*          Trigger/TrigEvent
-use TrigTimeAlgs        TrigTimeAlgs-*               Trigger/TrigTools
-use CaloInterface       CaloInterface-*              Calorimeter
-
-use ByteStreamCnvSvcBase ByteStreamCnvSvcBase-*      Event
-use EventInfo		EventInfo-* 		     Event
-
-use ZdcByteStream	ZdcByteStream-*		     ForwardDetectors/ZDC/ZdcCnv
-use ZdcEvent		ZdcEvent-*		     ForwardDetectors/ZDC
-use ZdcRec		ZdcRec-*		     ForwardDetectors/ZDC
-
-private
-use ByteStreamData      ByteStreamData-*             Event
-use CaloDetDescr        CaloDetDescr-*               Calorimeter
-use LArRecUtils         LArRecUtils-*                LArCalorimeter
-use LArRecConditions    LArRecConditions-*           LArCalorimeter
-use TrigT1Interfaces    TrigT1Interfaces-*           Trigger/TrigT1
-use CaloUtils           CaloUtils-*                  Calorimeter
-use AthenaPoolUtilities AthenaPoolUtilities-*        Database/AthenaPOOL
-use LArIdentifier       LArIdentifier-*              LArCalorimeter
-use LArElecCalib	LArElecCalib-*		     LArCalorimeter
-
-public
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigT2CaloCommon/doc/packagedoc.h
index 2067191b5dcc10efafcc8c5aa15c99be9b9565f9..0c0e2b4744bcf8bfbf5a7d287ec43641e9e65e0b 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/doc/packagedoc.h
@@ -13,17 +13,6 @@ This package provides data access classes and bytestream converters
 objects for calorimeter reconstruction algorithms for L2 trigger.
 In addition it contains classes for (EM) calibration and geometry helpers.
 
-@ref used_TrigT2CaloCommon
 
-@ref requirements_TrigT2CaloCommon
 
 */
-
-/**
-@page used_TrigT2CaloCommon Used Packages
-*/
-
-/**
-@page requirements_TrigT2CaloCommon Requirements
-*/
-
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx
index e2e5759757dcb2f6a5b71e3650aea9a25d1f6ba2..710a935465a3806c9cabc4f0cba0423f3a084df9 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/IAlgToolCalo.cxx
@@ -41,7 +41,7 @@ StatusCode IAlgToolCalo::initialize()
 
         // Initialize timing service in order to perform some measures
         // of performance
-        if( (m_timersvc.retrieve()).isFailure() ) {
+        if( !m_timersvc.empty() && m_timersvc.retrieve().isFailure() ) {
           ATH_MSG_WARNING( name() <<
                            ": Unable to locate TrigTimer Service" );
 	  // Does not need to fail the Algorithm if no timing service is found
@@ -80,8 +80,8 @@ StatusCode IAlgToolCalo::initialize()
 	if ( m_limit.size() != 0 ){
 		m_calib->initialize(m_limit,m_dimension,m_correction);
 	}
-        lardecoded=true;
-        tiledecoded=true;
+        m_lardecoded=true;
+        m_tiledecoded=true;
 
 	return StatusCode::SUCCESS;
 } // End of initialize
@@ -392,14 +392,14 @@ void IAlgToolCalo::storeCells( void ) {
              }
         } // End of if retrieve
         // Now I have a LAr container
-        if ( lardecoded )
+        if ( m_lardecoded )
         for ( m_it = m_iBegin; m_it != m_iEnd; ++m_it) {
                 CaloCell* larcell = (CaloCell*)(*m_it)->clone();
                 ContainerLAr->push_back(larcell);
         }
         ATH_MSG_DEBUG( "LAr Container size : " << ContainerLAr->size() );
         // Now I have a Tile container
-        if ( tiledecoded )
+        if ( m_tiledecoded )
 	  for ( m_itt = m_itBegin; m_itt != m_itEnd; ++m_itt) {
 	    CaloCell* tilecell = (CaloCell*)(*m_itt)->clone();
 	    ContainerTile->push_back(tilecell);
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
index 55e27555b7d8516d79d84d81f18de76cc6018a6c..63953db095c806d9f37c91086014c3cef331dee9 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigDataAccess.cxx
@@ -220,6 +220,7 @@ StatusCode TrigDataAccess::beginRunHandle(IOVSVC_CALLBACK_ARGS){
           m_selfcalem = new LArTT_Selector<LArCellCont>(m_roiMap,m_larcell);
         }
 	m_tilecell = new TileCellCont();
+        m_tilecell->setHashIdToROD( m_tiledecoder->getHid2reHLT() );
         if ( (m_tilecell->initialize()).isFailure() ){
 	      ATH_MSG_FATAL("Could not init tilecell");
         }
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCosmic/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2CaloCosmic/cmt/requirements
deleted file mode 100755
index 9b0fa05e24b2637da6777b38ae3c72b60193cfde..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2CaloCosmic/cmt/requirements
+++ /dev/null
@@ -1,39 +0,0 @@
-package TrigT2CaloCosmic
-
-author Denis Oliveira <Denis.Oliveira.Damazio@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*             External
-#use AtlasAIDA           AtlasAIDA-00-*               External
-#use StoreGate           StoreGate-*                  Control
-
-#use ByteStreamData      ByteStreamData-*             Event
-#use LArByteStream       LArByteStream-*              LArCalorimeter/LArCnv
-#use LArRecEvent         LArRecEvent-*                LArCalorimeter
-#use LArRawUtils         LArRawUtils-*                LArCalorimeter
-#use LArRecEvent         LArRecEvent-*                LArCalorimeter
-#use TileEvent           TileEvent-*                  TileCalorimeter
-#use Identifier          Identifier-*                 DetectorDescription
-#use CaloEvent           CaloEvent-*                  Calorimeter
-use TrigCaloEvent       TrigCaloEvent-*              Trigger/TrigEvent
-use TrigT2CaloCommon    TrigT2CaloCommon-*           Trigger/TrigAlgorithms
- 
-#use TrigInterfaces      TrigInterfaces-*             Trigger/TrigSteer
-#use RegionSelector      RegionSelector-*          DetectorDescription
-use TrigSteeringEvent   TrigSteeringEvent-*          Trigger/TrigEvent
-#use TrigTimeAlgs        TrigTimeAlgs-*               Trigger/TrigTools
-#use TrigMonitorBase     TrigMonitorBase-*            Trigger/TrigMonitoring
-#use ByteStreamCnvSvcBase ByteStreamCnvSvcBase-*      Event
-
-use IRegionSelector      IRegionSelector-*            DetectorDescription 
-      
-private
-use CaloIdentifier      CaloIdentifier-*             Calorimeter
-use CaloGeoHelpers      CaloGeoHelpers-*             Calorimeter
-use TrigT1Interfaces    TrigT1Interfaces-*           Trigger/TrigT1
-
-apply_pattern dual_use_library files=*.cxx
-#apply_pattern declare_runtime
-#apply_pattern declare_joboptions files="*.txt *.py"
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCosmic/src/CosmicHadEnFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCosmic/src/CosmicHadEnFex.cxx
index 6aa4a3eff2b65aa0c753b63bb22de74678f1c400..35192b4467d27b1378a9fd30cb291a935434be16 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloCosmic/src/CosmicHadEnFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCosmic/src/CosmicHadEnFex.cxx
@@ -44,8 +44,8 @@ CosmicHadEnFex::~CosmicHadEnFex(){
 StatusCode CosmicHadEnFex::execute(TrigEMCluster &rtrigEmCluster,double etamin,
 		double etamax, double phimin, double phimax){
 
-	lardecoded=false;
-	tiledecoded=false;
+	m_lardecoded=false;
+	m_tiledecoded=false;
         // Time total AlgTool time
         if (!m_timersvc.empty()) m_timer[0]->start();
 
@@ -100,7 +100,7 @@ StatusCode CosmicHadEnFex::execute(TrigEMCluster &rtrigEmCluster,double etamin,
 	// For the others no
         if ( m_data->LoadCollections(m_itBegin,m_itEnd,iR,!iR).isFailure() )
                 return StatusCode::FAILURE;
-	tiledecoded=true;
+	m_tiledecoded=true;
 	if ( m_saveCells ) IAlgToolCalo::storeCells();
         // Finished to access Collection
         if (!m_timersvc.empty()) m_timer[2]->pause();
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCosmic/src/CosmicSamp2Fex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCosmic/src/CosmicSamp2Fex.cxx
index 85d2d215f6a09e5be9f2ec45be5b58e12883a379..ea92895a3e1e4d3e2958243ff9a687b59ebf7906 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloCosmic/src/CosmicSamp2Fex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCosmic/src/CosmicSamp2Fex.cxx
@@ -39,8 +39,8 @@ CosmicSamp2Fex::~CosmicSamp2Fex(){
 StatusCode CosmicSamp2Fex::execute(TrigEMCluster &rtrigEmCluster,
 				   const IRoiDescriptor& roi ) { 
   
-	lardecoded=false;
-	tiledecoded=false;
+        m_lardecoded=false;
+	m_tiledecoded=false;
 	// Time total AlgTool time 
 	if (!m_timersvc.empty()) m_timer[0]->start();      
 
@@ -62,7 +62,7 @@ StatusCode CosmicSamp2Fex::execute(TrigEMCluster &rtrigEmCluster,
 
 	if ( m_data->LoadCollections(m_iBegin,m_iEnd).isFailure() )
 		return StatusCode::FAILURE;
-	lardecoded=true;
+	m_lardecoded=true;
 	if ( m_saveCells ) IAlgToolCalo::storeCells();
 	// Finished to access Collection
 	if (!m_timersvc.empty()) m_timer[2]->stop();      
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/TrigT2CaloEgamma/EgammaHadEnFex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/TrigT2CaloEgamma/EgammaHadEnFex.h
index 206582b57cbf700e8662b4be862b6d93b9bf7438..784fe9022e7fdae5fd23c53c8b4318db8541173f 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/TrigT2CaloEgamma/EgammaHadEnFex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/TrigT2CaloEgamma/EgammaHadEnFex.h
@@ -51,7 +51,7 @@ class EgammaHadEnFex: public IAlgToolCalo {
                         << MSG::FATAL
                         << "Could not init base class IAlgTooCalo" << endmsg;
                 }
-                if (m_timersvc) {
+                if (!m_timersvc.empty()) {
                         m_timer[0]->propName("T2CaEm_NCells");
                 }
                 return StatusCode::SUCCESS;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/TrigT2CaloEgamma/EgammaSamp2Fex.h b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/TrigT2CaloEgamma/EgammaSamp2Fex.h
index 1566c8eeb80babc98a5cfdb4217632efda994838..094050296ef070ac64ddb338c0765b4c07fd282e 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/TrigT2CaloEgamma/EgammaSamp2Fex.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/TrigT2CaloEgamma/EgammaSamp2Fex.h
@@ -58,7 +58,7 @@ class EgammaSamp2Fex: public IAlgToolCalo {
                 std::string basename(name().substr(25,5)+".");
 		//std::string basename(name().substr(6,1)+name().substr(name().find("Fex",0)-5,5));
                 //basename+=(name().substr(6,1)+name().substr(name().find("Fex",0)-5,5));
-		if (m_timersvc) {
+		if (!m_timersvc.empty()) {
                 	m_timer[0]->propName(basename+"Eta");
 		}
                 return StatusCode::SUCCESS;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/cmt/requirements
deleted file mode 100755
index a614b15ef02b10c7ffcae15646d8fe41a16b153a..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package TrigT2CaloEgamma 
-
-author Pilar Casado <casado@ifae.es>
-author Denis Oliveira <Denis.Oliveira.Damazio@cern.ch>
-author Carlos Osuna <Carlos.Osuna.Escamilla@cern.ch>
-author Xin Wu <Xin.Wu@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*             External
-
-#use LArRawUtils         LArRawUtils-*                LArCalorimeter
-#use LArRecEvent         LArRecEvent-*                LArCalorimeter
-#use Identifier          Identifier-*                 DetectorDescription
-use AthenaBaseComps	AthenaBaseComps-*		Control
-
-
-use CaloEvent           CaloEvent-*                  Calorimeter
-use CaloGeoHelpers      CaloGeoHelpers-*             Calorimeter
-use xAODTrigCalo        xAODTrigCalo-*               Event/xAOD
-use xAODTrigRinger      xAODTrigRinger-*             Event/xAOD
-use TrigT2CaloCommon    TrigT2CaloCommon-*           Trigger/TrigAlgorithms
-#use TrigInterfaces     TrigInterfaces-*             Trigger/TrigSteer
-use TrigSteeringEvent   TrigSteeringEvent-*          Trigger/TrigEvent
-use egammaInterfaces	  egammaInterfaces-*	         Reconstruction/egamma
-use DataModel           DataModel-*                  Control
-use CLIDSvc             CLIDSvc-*                    Control
-
-
-private
-use IRegionSelector     IRegionSelector-*            DetectorDescription
-use AthLinks            AthLinks-*                   Control
-use TrigT1Interfaces    TrigT1Interfaces-*           Trigger/TrigT1
-use CaloIdentifier      CaloIdentifier-*             Calorimeter
-use TrigT2CaloCalibration  TrigT2CaloCalibration-*   Trigger/TrigTools
-use TrigTimeAlgs        TrigTimeAlgs-*               Trigger/TrigTools
-use CaloDetDescr    CaloDetDescr-*   Calorimeter 
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_runtime
-apply_pattern declare_joboptions files="*.txt *.py"
-
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/share/FFL2CaloEgamma.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/share/FFL2CaloEgamma.py
index 6d0eaa2c1058790e9b2f957da2d9f90951f2364c..2cb7f7d508f070920cbcf2e5c86f9efdf6fa762a 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/share/FFL2CaloEgamma.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/share/FFL2CaloEgamma.py
@@ -2,19 +2,25 @@
 #  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 #
 
+
 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 from AthenaCommon.AlgScheduler import AlgScheduler
 AlgScheduler.CheckDependencies( True )
-AlgScheduler.OutputLevel( VERBOSE )
-AlgScheduler.ShowDataDependencies( True )
+#AlgScheduler.OutputLevel( VERBOSE )
+#AlgScheduler.ShowDataDependencies( True )
 AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
 
-
-## get a handle on the ServiceManager
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
+
 from SGComps.SGCompsConf import SGInputLoader
-topSequence += SGInputLoader( )
+topSequence += SGInputLoader()
+
+
+#print topSequence
+#print kaboom
+
+
 
 from AthenaCommon.GlobalFlags import globalflags;
 globalflags.DataSource.set_Value_and_Lock("data");
@@ -24,8 +30,11 @@ globalflags.DetDescrVersion.set_Value_and_Lock(DetDescrVersion);
 globalflags.InputFormat.set_Value_and_Lock("bytestream");
 globalflags.ConditionsTag.set_Value_and_Lock(ConditionsTag)
 globalflags.DatabaseInstance.set_Value_and_Lock('CONDBR2')
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags;
+athenaCommonFlags.BSRDOInput = [ "/afs/cern.ch/atlas/project/trigger/pesa-sw/validation/atn-test/data15_13TeV.00266904.physics_EnhancedBias.merge.RAW._lb0452._SFO-1._0001.1" ]
+#FilesInput 
 
-include ("RecExRecoTest/RecExRecoTest_RTT_common.py")
+#include ("RecExRecoTest/RecExRecoTest_RTT_common.py")
 
 #jp.AthenaCommonFlags.PoolESDOutput="id_ESD.pool.root"
 rec.doTrigger=False
@@ -62,9 +71,27 @@ larRODFlags.doLArFebErrorSummary.set_Value_and_Lock(False)
 #DetFlags.Print()
 
 # main jobOption
+
+
+#include ("RecExRecoTest/RecExRecoTest_RTT_common_postOptions.py")
+
+## get a handle on the ServiceManager
+
+topSequence.SGInputLoader.Load = [ ('ROIB::RoIBResult','StoreGateSvc+RoIBResult'), ('AthenaAttributeList','StoreGateSvc+Input') ]
+topSequence.SGInputLoader.FailIfNoProxy=False
+#topSequence.CondInputLoader.Load = [('AthenaAttributeList','ConditionStore+Input')]
+
+#from IOVSvc.IOVSvcConf import CondInputLoader
+#topSequence += CondInputLoader( "CondInputLoader", OutputLevel=DEBUG )
+
 include ("RecExCommon/RecExCommon_topOptions.py")
 
-include ("RecExRecoTest/RecExRecoTest_RTT_common_postOptions.py")
+#remove RecExCommon 
+# topSequence = AlgSequence()
+# for i in topSequence:
+#   log.info('removing '+ i.getName())
+#   if i.getName() not in [ "SGInputLoader", "CondInputLoader" ]: # list of what we want to keep
+#     topSequence.remove(i)
 
 
 
@@ -102,10 +129,7 @@ if nThreads >= 1:
 #import AthenaCommon.AtlasUnixGeneratorJob
 
 ## get a handle on the default top-level algorithm sequence
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/atlas/project/trigger/pesa-sw/validation/atn-test/data15_13TeV.00266904.physics_EnhancedBias.merge.RAW._lb0452._SFO-1._0001.1" ]
+#svcMgr.ByteStreamInputSvc.FullFileName = 
 
 svcMgr.ByteStreamInputSvc.ValidateEvent = True
 svcMgr.EventSelector.ProcessBadEvent = True
@@ -126,20 +150,54 @@ l1svc.XMLMenuFile = findFileInXMLPATH(TriggerFlags.inputLVL1configFile())
 svcMgr += l1svc
 
 
+from TriggerJobOpts.TriggerFlags import TriggerFlags
+TriggerFlags.enableMonitoring = ['Validation', 'Time']
+
+if not hasattr(svcMgr, 'THistSvc'):
+  from GaudiSvc.GaudiSvcConf import THistSvc
+  svcMgr += THistSvc()
+svcMgr.THistSvc.Output = ["EXPERT DATAFILE='expert-monitoring.root', OPT='RECREATE'"]
+
 # This is the list of proxies to set up so that retrieval attempt will trigger the BS conversion
-svcMgr.ByteStreamAddressProviderSvc.TypeNames += [
-    "ROIB::RoIBResult/RoIBResult" ]
+svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "ROIB::RoIBResult/RoIBResult" ]
 
 #--------------------------------------------------------------
 # Private Application Configuration options
 #--------------------------------------------------------------
 # Load "user algorithm" top algorithms to be run, and the libraries that house them
 
-#Run calo decoder
-from L1Decoder.L1DecoderConf import L1CaloDecoder
-caloDecoder = L1CaloDecoder() # by default it is steered towards the RoIBResult of the name above
-caloDecoder.OutputLevel=VERBOSE
-topSequence += caloDecoder
+
+
+
+#from AthenaCommon.CFElements import parOR, seqAND
+#TopHLTSeq = seqAND("TopHLTSeq")
+#topSequence += TopHLTSeq
+
+
+from L1Decoder.L1DecoderMonitoring import CTPUnpackingMonitoring, RoIsUnpackingMonitoring
+from L1Decoder.L1DecoderConf import CTPUnpackingTool, EMRoIsUnpackingTool, L1Decoder, MURoIsUnpackingTool
+from L1Decoder.L1DecoderConf import CTPUnpackingEmulationTool, RoIsUnpackingEmulationTool
+l1Decoder = L1Decoder( OutputLevel=DEBUG )
+ctpUnpacker = CTPUnpackingTool( OutputLevel =  DEBUG, ForceEnableAllChains=True )
+
+allChains = [ "HLT_e5_perf", "HLT_e5_lhloose", "HLT_e5_tight", "HLT_e7_perf" ]
+
+l1Decoder.ctpUnpacker = ctpUnpacker
+l1Decoder.ctpUnpacker.MonTool = CTPUnpackingMonitoring(512, 200)
+#l1Decoder.ctpUnpacker.CTPToChainMapping = ["0:HLT_e3",  "0:HLT_g5", "1:HLT_e7", "2:HLT_2e3", "15:HLT_mu6", "33:HLT_2mu6", "15:HLT_mu6idperf", "42:HLT_e15mu4"] # this are real IDs of L1_* items in pp_v5 menu
+
+l1Decoder.ctpUnpacker.CTPToChainMapping = [ "0:"+c for c in allChains  ] # CAVEAT this needs real mapping from chain to CTP ID
+emUnpacker = EMRoIsUnpackingTool( OutputLevel=DEBUG, OutputTrigRoIs="StoreGateSvc+EMRoIs" )
+emUnpacker.ThresholdToChainMapping = ["EM3 : "+c for c in allChains ]  # CAVEAT this needs real mapping to from the chain to L1 threshold
+
+emUnpacker.MonTool = RoIsUnpackingMonitoring( prefix="EM", maxCount=30 )
+
+l1Decoder.roiUnpackers = [emUnpacker]
+l1Decoder.Chains="HLTChainsResult"
+
+topSequence += l1Decoder
+
+
 
 #Dumper
 #from ViewAlgs.ViewAlgsConf import DumpDecisions
@@ -156,8 +214,26 @@ svcMgr.ToolSvc+=TrigDataAccess()
 svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False
 
 from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_FastAlgo
-topSequence+=T2CaloEgamma_FastAlgo("testFastAlgo")
-topSequence.testFastAlgo.OutputLevel=VERBOSE
+algo=T2CaloEgamma_FastAlgo("testFastAlgo")
+algo.RoIs="StoreGateSvc+EMRoIs"
+algo.OutputLevel=VERBOSE
+#TopHLTSeq += algo
+topSequence += algo
+
+
+
+from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlg
+from TrigEgammaHypo.TrigL2CaloHypoTool import TrigL2CaloHypoToolFromName
+hypoAlg = TrigL2CaloHypoAlg()
+hypoAlg.RoIs="StoreGateSvc+EMRoIs"
+hypoAlg.OutputLevel=VERBOSE
+topSequence += hypoAlg
+# this should come from the menu, but let's see if it falls apart wiht a full single electron menu
+hypoTools = [ TrigL2CaloHypoToolFromName(chain) for chain in allChains ] 
+
+hypoAlg.HypoTools = hypoTools
+hypoAlg += hypoTools
+
 
 #--------------------------------------------------------------
 # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
@@ -186,10 +262,14 @@ from CaloRec.CaloRecConf import CaloCellMaker
 topSequence.remove(CaloCellMaker('CaloCellMaker'))
 from xAODCaloEventCnv.xAODCaloEventCnvConf import ClusterCreator
 topSequence.remove(ClusterCreator('CaloCluster2xAOD'))
+#topSequence.remove(CondInputLoader("CondInputLoader"))
 
 
 theApp.EvtMax = 100
 
+#print topSequence
+#print fail
+
 
 #
 # End of job options file
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaFastAlgo.cxx b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaFastAlgo.cxx
index 32e09aa2fcec189eaebbcd4d0c6ab4c11c5160fd..51b63eea6d625aa33fdea6c799796aa6d527f37a 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaFastAlgo.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/src/T2CaloEgammaFastAlgo.cxx
@@ -65,7 +65,7 @@ StatusCode T2CaloEgammaFastAlgo::initialize()
 
 
   m_emAlgTools.retrieve().ignore();
-  ATH_CHECK(m_regionSelector.retrieve());
+  ATH_CHECK( m_regionSelector.retrieve());
   ATH_CHECK( m_clusterContainerKey.initialize() );
   ATH_CHECK( m_roiCollectionKey.initialize() );
   ATH_MSG_DEBUG( "Initialize done !" );
@@ -86,17 +86,20 @@ StatusCode T2CaloEgammaFastAlgo::execute()
   (*m_log) << MSG::INFO << "in execute()" << endmsg;
 #endif
 
+  m_trigEmClusterCollection = SG::WriteHandle<xAOD::TrigEMClusterContainer>( m_clusterContainerKey, getContext() );
   ATH_CHECK( m_trigEmClusterCollection.record( CxxUtils::make_unique<xAOD::TrigEMClusterContainer>(), CxxUtils::make_unique<xAOD::TrigEMClusterAuxContainer>() ) );
 
-  ATH_CHECK(m_roiCollection.isValid());
+  auto roisHandle = SG::makeHandle( m_roiCollectionKey );
+  const TrigRoiDescriptorCollection* roiCollection = roisHandle.cptr();
+  //  ATH_CHECK(m_roiCollectionKey.isValid());
 
 
   const TrigRoiDescriptor* roiDescriptor = 0;
   //TrigRoiDescriptor* roiDescriptor = 0;
 
   // datahandle 
-  TrigRoiDescriptorCollection::const_iterator  roiCollectionIt  = m_roiCollection->begin(); 
-  for(; roiCollectionIt!=m_roiCollection->end(); ++roiCollectionIt){
+  TrigRoiDescriptorCollection::const_iterator  roiCollectionIt  = roiCollection->begin(); 
+  for(; roiCollectionIt != roiCollection->end(); ++roiCollectionIt){
 	roiDescriptor = *roiCollectionIt;
 
   float etaL1, phiL1;
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloJet/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2CaloJet/cmt/requirements
deleted file mode 100755
index 8cc425c5cf71aa8592070ef6f4ac944f6dad74cf..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2CaloJet/cmt/requirements
+++ /dev/null
@@ -1,57 +0,0 @@
-package TrigT2CaloJet 
-
-author Kyle Cranmer <cranmer@cern.ch>
-author Pilar Casado <casado@ifae.es>
-author Denis Oliveira <Denis.Oliveira.Damazio@cern.ch>
-author Carlos Osuna <Carlos.Osuna.Escamilla@cern.ch>
-author Xin Wu <Xin.Wu@cern.ch>
-author Matthew Tamsett <tamsett@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*                    External
-use AthContainers       AthContainers-*                     Control
-use TrigT2CaloCommon    TrigT2CaloCommon-*                  Trigger/TrigAlgorithms 
-use TrigSteeringEvent   TrigSteeringEvent-*                 Trigger/TrigEvent
-use TrigCaloEvent       TrigCaloEvent-*                     Trigger/TrigEvent
-use TrigTimeAlgs        TrigTimeAlgs-*                      Trigger/TrigTools
-
-#use TrigT1CaloUtils             TrigT1CaloUtils-*           Trigger/TrigT1
-
-use TrigInterfaces              TrigInterfaces-*            Trigger/TrigSteer
-use TrigT2CaloCalibration       TrigT2CaloCalibration-*     Trigger/TrigTools
-use CaloInterface               CaloInterface-*             Calorimeter
-use CaloRec                     CaloRec-*                   Calorimeter
-
-# fast jet for full scan
-use AtlasFastJet                AtlasFastJet-*              External
-# TrigParticles
-use TrigParticle                TrigParticle-*              Trigger/TrigEvent
-
-use IRegionSelector             IRegionSelector-*           DetectorDescription
-
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_python_modules files="*.py"
-
-private 
-use AtlasBoost			AtlasBoost-*		    External
-use AtlasROOT			AtlasROOT-*		    External
-#use CaloEvent                   CaloEvent-*                 Calorimeter
-use CaloGeoHelpers      	CaloGeoHelpers-*            Calorimeter
-use TrigT1Interfaces            TrigT1Interfaces-*          Trigger/TrigT1
-use TrigT1CaloEvent             TrigT1CaloEvent-*           Trigger/TrigT1
-use AthenaKernel                AthenaKernel-*              Control
-use TrigT1CaloByteStream        TrigT1CaloByteStream-*      Trigger/TrigT1
-use TrigT1CaloToolInterfaces    TrigT1CaloToolInterfaces-*  Trigger/TrigT1
-use TrigT1Interfaces            TrigT1Interfaces-*          Trigger/TrigT1
-
-### dict generation ###
-private
-use AtlasReflex  AtlasReflex-*  External -no_auto_imports
- 
-apply_pattern lcgdict dict=T2L1Tools \
- selectionfile=selection.xml \
- headerfiles="../TrigT2CaloJet/T2L1ToolsDict.h"
- 
-end_private
-
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloTau/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2CaloTau/cmt/requirements
deleted file mode 100755
index 65310caf1b92b9bca5c2e00b8616d2bf8d40631a..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2CaloTau/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package TrigT2CaloTau 
-
-author Pilar Casado <casado@ifae.es>
-author Denis Oliveira <Denis.Oliveira.Damazio@cern.ch>
-author Carlos Osuna <Carlos.Osuna.Escamilla@cern.ch>
-author Xin Wu <Xin.Wu@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*             External
-#use AtlasAIDA           AtlasAIDA-00-*               External
-#use StoreGate           StoreGate-*                  Control
-
-use AtlasROOT 		AtlasROOT-* 			External
-
-#use ByteStreamData      ByteStreamData-*             Event
-#use LArByteStream       LArByteStream-*              LArCalorimeter/LArCnv
-#use LArRecEvent         LArRecEvent-*                LArCalorimeter
-#use LArRawUtils         LArRawUtils-*                LArCalorimeter
-#use LArRecEvent         LArRecEvent-*                LArCalorimeter
-#use TileEvent           TileEvent-*                  TileCalorimeter
-#use Identifier          Identifier-*                 DetectorDescription
-use CaloInterface       CaloInterface-*              Calorimeter
-use TrigT2CaloCommon    TrigT2CaloCommon-*           Trigger/TrigAlgorithms
- 
-use TrigInterfaces      TrigInterfaces-*             Trigger/TrigSteer
-#use RegionSelector      RegionSelector-*          DetectorDescription
-use TrigSteeringEvent   TrigSteeringEvent-*          Trigger/TrigEvent
-use TrigCaloEvent       TrigCaloEvent-*              Trigger/TrigEvent
-#use TrigTimeAlgs        TrigTimeAlgs-*               Trigger/TrigTools
-#use TrigMonitorBase     TrigMonitorBase-*            Trigger/TrigMonitoring
-#use ByteStreamCnvSvcBase ByteStreamCnvSvcBase-*      Event
-use TrigT2CaloCalibration TrigT2CaloCalibration-*    Trigger/TrigTools
-
-private
-use AthenaKernel	AthenaKernel-*		     Control
-use CaloEvent           CaloEvent-*                  Calorimeter
-use CaloGeoHelpers      CaloGeoHelpers-*             Calorimeter
-use CaloIdentifier      CaloIdentifier-*             Calorimeter
-use TrigT1Interfaces    TrigT1Interfaces-*           Trigger/TrigT1
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloTau/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigT2CaloTau/doc/packagedoc.h
index 3f61316755d54f6bcf045537eacd1d5ab4af2eaa..2f753fb3ea30da8b78676709301a2957e023f48f 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloTau/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigT2CaloTau/doc/packagedoc.h
@@ -16,18 +16,6 @@ the trigger LVL2 for taus. It builds a set of shower shape variables
 to discriminate jet and taus.
 Deposited energy is available in 3 different window sizes for all sampling.
 
-@ref used_TrigT2CaloTau
-
-@ref requirements_TrigT2CaloTau
-
-*/
-
-/**
-@page used_TrigT2CaloTau Used Packages
-*/
-
-/**
-@page requirements_TrigT2CaloTau Requirements
 
 
 */
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloTileMon/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2CaloTileMon/cmt/requirements
deleted file mode 100644
index bd78da5999634e53b64a9b73cc5a3734fe05599b..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2CaloTileMon/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigT2CaloTileMon
-author Denis Oliveira Damazio <damazio@mail.cern.ch>
-author Pavel Weber <pavel@kip.uni-heidelberg.de>
-author victor Lendermann <victor@mail.desy.de>
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*             External
-
-#use CaloIdentifier      CaloIdentifier-*             Calorimeter
-#use CaloEvent           CaloEvent-*                  Calorimeter
-use TrigCaloEvent       TrigCaloEvent-*              Trigger/TrigEvent
-use TrigT2CaloCommon    TrigT2CaloCommon-*           Trigger/TrigAlgorithms
-
-use TrigSteeringEvent   TrigSteeringEvent-*          Trigger/TrigEvent
-use AtlasROOT		AtlasROOT-*		     External
-
-private
-use TrigT1Interfaces    TrigT1Interfaces-*           Trigger/TrigT1
-use CaloGeoHelpers      CaloGeoHelpers-*	     Calorimeter
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_runtime
-apply_pattern declare_joboptions files="*.txt *.py"
-
-apply_pattern declare_python_modules files="*.py"
-                                                     
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloTileMon/src/TileMonHadEnFex.cxx b/Trigger/TrigAlgorithms/TrigT2CaloTileMon/src/TileMonHadEnFex.cxx
index f3dc56cb79b46b7def99a486c16a240c9341d87a..ec5551a799c1138646b0fa670bae934f973d002c 100755
--- a/Trigger/TrigAlgorithms/TrigT2CaloTileMon/src/TileMonHadEnFex.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2CaloTileMon/src/TileMonHadEnFex.cxx
@@ -273,7 +273,7 @@ StatusCode TileMonHadEnFex::execute(TrigEMCluster &/*rtrigEmCluster*/,double eta
 
   // If there was a problem in configuration, stop now
   if ( !m_configured ) return StatusCode::SUCCESS;
-        tiledecoded=false;
+        m_tiledecoded=false;
         // Time total AlgTool time
         if (!m_timersvc.empty()) m_timer[0]->start();
 
diff --git a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/cmt/requirements
deleted file mode 100755
index 0973c242e70f52b535f2767fa9ae44e3904536a5..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-package TrigT2HistoPrmVtx
-
-author Andrea Coccaro <Andrea.Coccaro@ge.infn.it>
-
-
-# ============================================================================================
-public
-
-use     AtlasPolicy             AtlasPolicy-*
-use     TrigInterfaces          TrigInterfaces-*                Trigger/TrigSteer
-use     xAODTracking            xAODTracking-*              	Event/xAOD
-
-# ============================================================================================
-private
-
-use     EventPrimitives         EventPrimitives-*               Event
-use     EventInfo               EventInfo-*             	Event
-use 	AtlasROOT      		AtlasROOT-*         		External
-use     GaudiInterface          GaudiInterface-*                External
-use     InDetBeamSpotService    InDetBeamSpotService-*          InnerDetector/InDetConditions
-use     Particle		Particle-*			Reconstruction	
-use     TrigInDetEvent          TrigInDetEvent-*                Trigger/TrigEvent
-use     TrigSteeringEvent       TrigSteeringEvent-*             Trigger/TrigEvent
-use	TrigNavigation		TrigNavigation-*		Trigger/TrigEvent
-use     TrigTimeAlgs            TrigTimeAlgs-*                  Trigger/TrigTools
-use     xAODBase                xAODBase-*                  	Event/xAOD
-
-# ============================================================================================
-public
-
-library TrigT2HistoPrmVtx *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-
diff --git a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/doc/packagedoc.h
index 97c194cc65e87acae33040c199cd25d412adbb41..6450f7729cad6955a086688fc56203cf471dd019 100644
--- a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/doc/packagedoc.h
@@ -18,6 +18,3 @@ using longitudinal impact parameter needs the estimation of the primary vertex Z
 
 
 */
-
-
-
diff --git a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtxBase.cxx b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtxBase.cxx
index ebd496289ed0110bc8888e5c92611934818da42a..3449556b3369a83f5def82cb09fed0cd0b12c012 100755
--- a/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtxBase.cxx
+++ b/Trigger/TrigAlgorithms/TrigT2HistoPrmVtx/src/TrigT2HistoPrmVtxBase.cxx
@@ -283,9 +283,9 @@ bool TrigT2HistoPrmVtxBase::efTrackSel(const xAOD::TrackParticle*& track, unsign
   uint8_t nSCT  = 0; 
 
   uint8_t expBL  = 0;
-  track->summaryValue(expBL, xAOD::expectBLayerHit);
+  track->summaryValue(expBL, xAOD::expectInnermostPixelLayerHit);
 
-  track->summaryValue(nBlay, xAOD::numberOfBLayerHits);
+  track->summaryValue(nBlay, xAOD::numberOfInnermostPixelLayerHits);
   track->summaryValue(nPix,  xAOD::numberOfPixelHits);
   track->summaryValue(nSCT,  xAOD::numberOfSCTHits);
 
diff --git a/Trigger/TrigAlgorithms/TrigT2IDTau/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2IDTau/cmt/requirements
deleted file mode 100644
index a4a691c9fa30a311adbb3ae7e07b8dc297792cc4..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2IDTau/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-package TrigT2IDTau
-author Olga Igonkina
-
-public
-use     AtlasPolicy             AtlasPolicy-*
-use     AtlasROOT               AtlasROOT-*             External
-use     GaudiInterface          GaudiInterface-*        External
-use     TrigInDetEvent          TrigInDetEvent-*        Trigger/TrigEvent
-use     TrigSteeringEvent       TrigSteeringEvent-*     Trigger/TrigEvent
-use     TrigInterfaces          TrigInterfaces-*        Trigger/TrigSteer
-
-private
-use     Particle                Particle-*              Reconstruction
-#use     VxVertex                VxVertex-*              Tracking/TrkEvent
-use     TrigParticle            TrigParticle-*          Trigger/TrigEvent
-
-public 
- 
-apply_pattern dual_use_library files=*.cxx
-#apply_pattern declare_runtime
-#apply_pattern declare_joboptions files="TriggerConfig_*.py jobOfragment_*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigT2MinBias/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2MinBias/cmt/requirements
deleted file mode 100644
index 235c843c6b61af70487d16bbf8c9d81460b6557f..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2MinBias/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-package TrigT2MinBias
-
-author William H. Bell <W.Bell@cern.ch>
-author Regina Kwee <Regina.Kwee@cern.ch>
-author Samir Ferrag <s.ferrag@physics.gla.ac.uk>
-
-use AtlasPolicy 		AtlasPolicy-*
-use DataCollection              DataCollection-*            External
-use GaudiInterface 		GaudiInterface-* 	    External
-use TileEvent                   TileEvent-*                 TileCalorimeter
-use TrigCaloEvent               TrigCaloEvent-*             Trigger/TrigEvent
-use TrigInDetEvent              TrigInDetEvent-*            Trigger/TrigEvent
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-*   Trigger/TrigTools
-use TrigInterfaces              TrigInterfaces-*            Trigger/TrigSteer
-use TrigT2CaloCommon            TrigT2CaloCommon-*          Trigger/TrigAlgorithms
-use ZdcEvent                    ZdcEvent-*                  ForwardDetectors/ZDC
-use xAODTrigMinBias		xAODTrigMinBias-*	    Event/xAOD
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_runtime files="*.dtd *.xml *.car *.config"
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
-
-private
-
-use xAODEventInfo               xAODEventInfo-*             Event/xAOD
-use InDetIdentifier             InDetIdentifier-*           InnerDetector/InDetDetDescr
-use InDetPrepRawData            InDetPrepRawData-*          InnerDetector/InDetRecEvent
-use InDetRawData                InDetRawData-*              InnerDetector/InDetRawEvent
-use TrkSpacePoint               TrkSpacePoint-*             Tracking/TrkEvent
-use TileIdentifier              TileIdentifier-*            TileCalorimeter
-#use TrigSiSpacePointTool        TrigSiSpacePointTool-*      Trigger/TrigTools
-use TrigTimeAlgs                TrigTimeAlgs-*              Trigger/TrigTools
-use TrigSteeringEvent	TrigSteeringEvent-*	Trigger/TrigEvent
-use ZdcConditions		ZdcConditions-*	ForwardDetectors/ZDC
-use ZdcIdentifier		ZdcIdentifier-*	ForwardDetectors/ZDC
-use TrigSteeringEvent           TrigSteeringEvent-*         Trigger/TrigEvent
-use IRegionSelector             IRegionSelector-*        DetectorDescription
diff --git a/Trigger/TrigAlgorithms/TrigT2Tau/cmt/requirements b/Trigger/TrigAlgorithms/TrigT2Tau/cmt/requirements
deleted file mode 100755
index 2d8a7c7e8ae7f934f96ab86761f5ae2971fe5f29..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigT2Tau/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package TrigT2Tau
-
-use     AtlasPolicy             AtlasPolicy-*
-use     GaudiInterface          GaudiInterface-*        External
-use     AthenaBaseComps         AthenaBaseComps-*       Control
-use     TrigCaloEvent           TrigCaloEvent-*         Trigger/TrigEvent
-use     TrigInDetEvent          TrigInDetEvent-*        Trigger/TrigEvent
-use     TrigSteeringEvent       TrigSteeringEvent-*     Trigger/TrigEvent
-use     TrigParticle            TrigParticle-*          Trigger/TrigEvent
-use     TrigInterfaces          TrigInterfaces-*        Trigger/TrigSteer
-
-private
-use     FourMom                 FourMom-*               Event
-end_private
-
- 
- 
-apply_pattern dual_use_library files=*.cxx
-#apply_pattern declare_runtime
-#apply_pattern declare_joboptions files="TriggerConfig_*.py jobOfragment_*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigT2Tau/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigT2Tau/doc/packagedoc.h
index f97dd5402a26cd94f718dc3f5444167f08fd45f7..6f31c7a225bac19457c5f0bfa1b565831b70b13e 100644
--- a/Trigger/TrigAlgorithms/TrigT2Tau/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigT2Tau/doc/packagedoc.h
@@ -12,16 +12,6 @@
 This package contains L2 tau trigger FEX algorithm which combines
 tracking and calorimeter reconstruction information and fills TrigTau object.
 
-@ref used_TrigT2Tau
 
-@ref requirements_TrigT2Tau
 
 */
-
-/**
-@page used_TrigT2Tau Used Packages
-*/
-
-/**
-@page requirements_TrigT2Tau Requirements
-*/
diff --git a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/CMakeLists.txt b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/CMakeLists.txt
index ca009cc44d9c428454b528b3805cace89a76d028..9866464579148544440d293bde2d2f95d5795c7a 100644
--- a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/CMakeLists.txt
+++ b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/CMakeLists.txt
@@ -30,5 +30,5 @@ atlas_add_component( TrigTRTHighTHitCounter
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} GaudiKernel GeoPrimitives Identifier xAODTrigRinger InDetIdentifier InDetPrepRawData TrigCaloEvent TrigSteeringEvent TrigInterfacesLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} GaudiKernel GeoPrimitives Identifier xAODTrigRinger InDetIdentifier InDetPrepRawData TrigCaloEvent TrigSteeringEvent TrigInterfacesLib EventContainers)
 
diff --git a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/cmt/requirements b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/cmt/requirements
deleted file mode 100644
index dea18569fc745c46289fb5ad8ae46bd41a8014c4..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/cmt/requirements
+++ /dev/null
@@ -1,45 +0,0 @@
-## automatically generated CMT requirements file
-package TrigTRTHighTHitCounter
-author  Jiri Masik
-
-## for athena policies: this has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## for gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-
-## put here your package dependencies...
-
-##
-
-branches src src/components doc python share
-
-# Inform cmake that this package has private header files (transparent to CMT)
-apply_pattern cmake_add_command command="include_directories(src)"
-
-private
-
-use TrigInterfaces              TrigInterfaces-*        Trigger/TrigSteer
-use InDetIdentifier             InDetIdentifier-*       InnerDetector/InDetDetDescr
-use InDetPrepRawData            InDetPrepRawData-*      InnerDetector/InDetRecEvent
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-*   Trigger/TrigTools
-use Identifier                  Identifier-*            DetectorDescription
-use TrigSteeringEvent           TrigSteeringEvent-*     Trigger/TrigEvent
-use TrigCaloEvent               TrigCaloEvent-*         Trigger/TrigEvent
-use AtlasROOT                   AtlasROOT-*             External
-use GeoPrimitives               GeoPrimitives-* DetectorDescription
-use xAODTrigRinger     xAODTrigRinger-*     Event/xAOD
-## default is to make component library
-apply_pattern component_library
-library TrigTRTHighTHitCounter *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-#needed for a header in src
-macro_append includes " -I../src "
-
-end_private
-
-
diff --git a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHhypo.cxx b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHhypo.cxx
index 41f9627aabb4ed8fd7547af76a6980d939c7e6f1..8c7e633895ed93ef2de1ff8474583f991570a36c 100644
--- a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHhypo.cxx
+++ b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHhypo.cxx
@@ -12,8 +12,7 @@ TrigTRTHTHhypo::TrigTRTHTHhypo(const std::string& name, ISvcLocator* pSvcLocator
   m_minTRTHTHitsWedge(0),
   m_minHTratioWedge(0.),
   m_doWedge(0),
-  m_doRoad(0),
-  m_minCaloE(0.)
+  m_doRoad(0)
 {
   declareProperty("AcceptAll",         m_acceptAll = false ); 
   declareProperty("MinTRTHTHitsRoad",  m_minTRTHTHitsRoad = 20); 
diff --git a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHhypo.h b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHhypo.h
index c1e49397497986c5df4bdad95e0226a98ac2ddce..f47b83f0aef2d188a3caa626e60e1f8605f26199 100644
--- a/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHhypo.h
+++ b/Trigger/TrigAlgorithms/TrigTRTHighTHitCounter/src/TrigTRTHTHhypo.h
@@ -38,6 +38,5 @@ class TrigTRTHTHhypo: public HLT::HypoAlgo {
   float        m_minHTratioWedge;
   unsigned int m_doWedge;
   unsigned int m_doRoad;
-  float        m_minCaloE;
 };
 #endif
diff --git a/Trigger/TrigAlgorithms/TrigTauDiscriminant/cmt/requirements b/Trigger/TrigAlgorithms/TrigTauDiscriminant/cmt/requirements
deleted file mode 100755
index 29cd8061f72da43bc2397f558d2b7ff72a9e7c40..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigTauDiscriminant/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package TrigTauDiscriminant
-
-# =====================================================================
-#
-# This is the Trigger EF tau ID algorithm package.
-#
-# =====================================================================
-
-author Marcus Morgenstern <marcus.matthias.morgenstern@cern.ch>
-
-# =====================================================================
-
-public
-use AtlasPolicy             AtlasPolicy-*
-use GaudiInterface          GaudiInterface-*             External
-use TauDiscriminant         TauDiscriminant-*       	 PhysicsAnalysis/TauID
-use TrigInterfaces          TrigInterfaces-*             Trigger/TrigSteer
-use TrigTimeAlgs            TrigTimeAlgs-*               Trigger/TrigTools
-
-private
-use TrigSteeringEvent       TrigSteeringEvent-*          Trigger/TrigEvent
-use TrigT1Interfaces        TrigT1Interfaces-*           Trigger/TrigT1
-use xAODTau                 xAODTau-*                    Event/xAOD
-use TrigParticle	    TrigParticle-*		 Trigger/TrigEvent 
-
-# =====================================================================
-apply_pattern dual_use_library files="*.cxx"
-apply_pattern declare_runtime files="../share/*.root ../share/*.bin ../share/*.txt"
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_calib files="../share"
\ No newline at end of file
diff --git a/Trigger/TrigAlgorithms/TrigTauRec/cmt/requirements b/Trigger/TrigAlgorithms/TrigTauRec/cmt/requirements
deleted file mode 100755
index d15128e852dd17ec145025545f4e92aa3aaf0682..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigTauRec/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package TrigTauRec
-
-# =====================================================================
-#
-# This is the Trigger EF tau algorithm package.
-#
-# =====================================================================
-
-author Richard Soluk <soluk@phys.ualberta.ca>
-
-# =====================================================================
-
-public
-use AtlasPolicy             AtlasPolicy-*
-use GaudiInterface          GaudiInterface-*             External
-use tauRecTools             tauRecTools-*                Reconstruction
-use TrigSteeringEvent       TrigSteeringEvent-*          Trigger/TrigEvent
-use TrigParticle 	    TrigParticle-*	         Trigger/TrigEvent
-use TrigInterfaces          TrigInterfaces-*             Trigger/TrigSteer
-use TrigSteeringEvent       TrigSteeringEvent-*          Trigger/TrigEvent
-use TrigTimeAlgs            TrigTimeAlgs-*               Trigger/TrigTools
-
-use LumiBlockComps          LumiBlockComps-*             LumiBlock
-use InDetBeamSpotService    InDetBeamSpotService-*	 InnerDetector/InDetConditions
-
-private
-use CaloEvent		CaloEvent-*		Calorimeter
-use EventKernel		EventKernel-*		Event
-use NavFourMom		NavFourMom-*		Event
-use Particle		Particle-*		Reconstruction
-use TrigT1Interfaces	TrigT1Interfaces-*	Trigger/TrigT1
-use VxVertex		VxVertex-*		Tracking/TrkEvent
-use xAODTau		xAODTau-*		Event/xAOD
-use xAODJet		xAODJet-*		Event/xAOD
-use xAODTracking	xAODTracking-*		Event/xAOD
-
-# =====================================================================
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_runtime_extras extras="*.txt *.xml *.sh *.cfg ../share/*.root"
-#apply_pattern declare_runtime files="*.root"	
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigTileMuId/cmt/requirements b/Trigger/TrigAlgorithms/TrigTileMuId/cmt/requirements
deleted file mode 100755
index 0e225606fbe2770ed50f58a67f80577a75c8878d..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigTileMuId/cmt/requirements
+++ /dev/null
@@ -1,39 +0,0 @@
-package TrigTileMuId
-
-author Giulio Usai <Giulio.usai@pi.infn.it>
-author Aranzazu Ruiz <Aranzazu.Ruiz.Martinez@cern.ch>
-author Heuijin Lim <hjlim@hep.anl.gov>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  MagFieldInterfaces         MagFieldInterfaces-*            MagneticField
-use  GaudiInterface             GaudiInterface-*                External
-use  AthenaBaseComps		AthenaBaseComps-*		Control
-use  TileByteStream             TileByteStream-*                TileCalorimeter/TileSvc
-use  TileEvent                  TileEvent-*                     TileCalorimeter
-use  TrigInDetEvent             TrigInDetEvent-*                Trigger/TrigEvent
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  TrigMuonEvent              TrigMuonEvent-*                 Trigger/TrigEvent
-use  TrigT2CaloCommon           TrigT2CaloCommon-*              Trigger/TrigAlgorithms
-use  TrigTimeAlgs               TrigTimeAlgs-*                  Trigger/TrigTools
-private
-use  AthenaKernel               AthenaKernel-*                  Control
-use  AthenaMonitoring           AthenaMonitoring-*              Control
-use  ByteStreamCnvSvcBase       ByteStreamCnvSvcBase-*          Event
-use  ByteStreamData             ByteStreamData-*                Event
-use  CaloIdentifier             CaloIdentifier-*                Calorimeter
-use  GeneratorObjects           GeneratorObjects-*              Generators
-use  RegionSelector             RegionSelector-*                DetectorDescription
-use  TrigInDetToolInterfaces    TrigInDetToolInterfaces-*       Trigger/TrigTools
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigT1Interfaces           TrigT1Interfaces-*              Trigger/TrigT1
-end_private
-
-apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_joboptions files="*jobOptions*.txt *.py"
-
-apply_pattern declare_python_modules files="*.py"
-
-private
-
diff --git a/Trigger/TrigAlgorithms/TrigTileMuId/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigTileMuId/doc/packagedoc.h
index 02180453a7aa046cb31b4cd51924c11f56686553..91e48bc7b5a8a0297becd601e56e60ff74305487 100644
--- a/Trigger/TrigAlgorithms/TrigTileMuId/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigTileMuId/doc/packagedoc.h
@@ -30,15 +30,5 @@ The TrigTileMuId package contains the following classes:
 
   - TrigTileMuToNtuple: dumps TrigTileLookForMuAlg info into TileMuTag directory in the ntuple for analysis.
 
-@ref used_TrigTileMuId
 
-@ref requirements_TrigTileMuId
-*/
-
-/**
-@page used_TrigTileMuId Used Packages
-*/
-
-/**
-@page requirements_TrigTileMuId Requirements
 */
diff --git a/Trigger/TrigAlgorithms/TrigmuComb/cmt/requirements b/Trigger/TrigAlgorithms/TrigmuComb/cmt/requirements
deleted file mode 100755
index cf76522893a74d669b62f7fb675d89334772bb20..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigmuComb/cmt/requirements
+++ /dev/null
@@ -1,44 +0,0 @@
-package TrigmuComb
-
-author Stefano Giagu        <Stefano.Giagu@cern.ch>
-author Patrizia Barria      <patrizia.barria@roma1.infn.it>
-author Alessandro Di Mattia <dimattia@mail.cern.ch>
-
-use AtlasPolicy               AtlasPolicy-*
-use GaudiInterface            GaudiInterface-*               External
-use TrigInterfaces            TrigInterfaces-*               Trigger/TrigSteer
-use TrigTimeAlgs              TrigTimeAlgs-*                 Trigger/TrigTools
-use TrigMuonEvent             TrigMuonEvent-*                Trigger/TrigEvent
-use TrigInDetEvent	      TrigInDetEvent-*               Trigger/TrigEvent
-use MagFieldInterfaces        MagFieldInterfaces-*           MagneticField 
-#use ByteStreamCnvSvcBase      ByteStreamCnvSvcBase-*         Event
-use TrkExInterfaces	      TrkExInterfaces-*	             Tracking/TrkExtrapolation
-use xAODTrigMuon              xAODTrigMuon-*                 Event/xAOD
-use xAODTracking              xAODTracking-*                 Event/xAOD
-
-private
-use AtlasCLHEP                AtlasCLHEP-*                   External
-use AthenaKernel              AthenaKernel-*                 Control
-use PathResolver              PathResolver-*                 Tools
-use StoreGate 	              StoreGate-*      		     Control
-use TrigSiSpacePointTool      TrigSiSpacePointTool-*         Trigger/TrigTools	
-use TrigT1Interfaces          TrigT1Interfaces-*             Trigger/TrigT1
-use TrigConfHLTData           TrigConfHLTData-*              Trigger/TrigConfiguration
-end_private
-
-#########################################################
-# ATHENA librariy build                                 #
-#########################################################
-
-#macro lib_TrigmuComb_pp_cppflags " -DTIMEMUCOMB "
-
-apply_pattern component_library
-
-library TrigmuComb *.cxx -s=../src/components *.cxx
-
-
-#apply_pattern declare_runtime files=""
-
-apply_pattern declare_joboptions files=" *.py"
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigmuComb/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigmuComb/doc/packagedoc.h
index 73ac2dbfc57acc9197d6939dc35add79b172fdc8..a89285f3cab7ea2c08205df182e8bbb8cbb4537f 100644
--- a/Trigger/TrigAlgorithms/TrigmuComb/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigmuComb/doc/packagedoc.h
@@ -17,16 +17,6 @@ to the primary vertex and by comparing the extrapolated eta and phi with the one
 The combined muon informations ar saved in a CombinedMuonFeature object atatched to the 
 event record for further analysis.
 
-@ref used_TrigmuComb
 
-@ref requirements_TrigmuComb
 
 */
-
-/**
-@page used_TrigmuComb Used Packages
-*/
-
-/**
-@page requirements_TrigmuComb Requirements
-*/
diff --git a/Trigger/TrigAlgorithms/TrigmuIso/cmt/requirements b/Trigger/TrigAlgorithms/TrigmuIso/cmt/requirements
deleted file mode 100755
index 7362f58c07ec85591f6b5bf837c3174a57069fd3..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigmuIso/cmt/requirements
+++ /dev/null
@@ -1,38 +0,0 @@
-package TrigmuIso
-
-author Stefano Giagu <stefano.Giagu@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-use GaudiInterface        GaudiInterface-*            External
-use DataCollection        DataCollection-*            External
-use StoreGate             StoreGate-*                 Control
-
-use TrigMuonEvent         TrigMuonEvent-*             Trigger/TrigEvent
-use TrigInDetEvent	  TrigInDetEvent-*            Trigger/TrigEvent
-use TrigInterfaces        TrigInterfaces-*            Trigger/TrigSteer
-use TrigSteeringEvent     TrigSteeringEvent-*         Trigger/TrigEvent
-use TrigTimeAlgs          TrigTimeAlgs-*              Trigger/TrigTools
-
-use xAODTrigMuon              xAODTrigMuon-*                 Event/xAOD
-
-private 
-use AtlasCLHEP                AtlasCLHEP-*                   External
-use xAODEventInfo         xAODEventInfo-*             Event/xAOD
-use xAODTracking              xAODTracking-*                 Event/xAOD
-use AthenaKernel          AthenaKernel-*              Control
-use TrigT1Interfaces      TrigT1Interfaces-*          Trigger/TrigT1
-use TrigConfHLTData           TrigConfHLTData-*              Trigger/TrigConfiguration
-end_private
-
-
-#apply_pattern dual_use_library files=*.cxx
-
-apply_pattern component_library
-
-library TrigmuIso *.cxx -s=../src/components *.cxx
-
-#apply_pattern declare_runtime files=""
-
-apply_pattern declare_joboptions files="*.txt *.py"
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAlgorithms/TrigmuIso/doc/packagedoc.h b/Trigger/TrigAlgorithms/TrigmuIso/doc/packagedoc.h
index 9e6289c0841e4f1ba00a3a28180daa68920b4b30..fa1b73525622d234cbaf13dfcc8a645305b2929b 100644
--- a/Trigger/TrigAlgorithms/TrigmuIso/doc/packagedoc.h
+++ b/Trigger/TrigAlgorithms/TrigmuIso/doc/packagedoc.h
@@ -15,16 +15,6 @@ informations in DeltaR cones around the muon directions and save
 the isolation quantities in a IsoMuonFeature object atatched to the 
 event record for further analysis.
 
-@ref used_TrigmuIso
 
-@ref requirements_TrigmuIso
 
 */
-
-/**
-@page used_TrigmuIso Used Packages
-*/
-
-/**
-@page requirements_TrigmuIso Requirements
-*/
diff --git a/Trigger/TrigAlgorithms/TrigmuIso/src/muIso.cxx b/Trigger/TrigAlgorithms/TrigmuIso/src/muIso.cxx
index 179ac2bf1ad07830239c8be12d9d3016579e4cf7..19d31db17e1c8c3839c78b8b8fe0c19a686cf669 100755
--- a/Trigger/TrigAlgorithms/TrigmuIso/src/muIso.cxx
+++ b/Trigger/TrigAlgorithms/TrigmuIso/src/muIso.cxx
@@ -81,17 +81,15 @@ muIso::~muIso()
 HLT::ErrorCode muIso::hltInitialize()
 {
 
-   msg() << MSG::DEBUG << "on initialize()" << endmsg;
+  ATH_MSG_DEBUG( "on initialize()"  );
 
-   msg() << MSG::INFO << "Initializing " << name() << " - package version " << PACKAGE_VERSION << endmsg;
+  ATH_MSG_INFO( "Initializing " << name() << " - package version " << PACKAGE_VERSION  );
 
    m_pStoreGate = store();
    // Timer Service
    m_pTimerService = 0;
 
-   msg() << MSG::DEBUG
-         << "Initialization completed successfully"
-         << endmsg;
+   ATH_MSG_DEBUG( "Initialization completed successfully" );
 
    return HLT::OK;
 }
@@ -99,7 +97,7 @@ HLT::ErrorCode muIso::hltInitialize()
 HLT::ErrorCode muIso::hltFinalize()
 {
 
-   msg() << MSG::DEBUG << "in finalize()" << endmsg;
+   ATH_MSG_DEBUG( "in finalize()"  );
 
    return HLT::OK;
 }
@@ -107,8 +105,8 @@ HLT::ErrorCode muIso::hltFinalize()
 HLT::ErrorCode muIso::hltBeginRun()
 {
 
-   msg() << MSG::INFO << "At BeginRun of " << name() << " - package version "
-         << PACKAGE_VERSION << endmsg;
+   ATH_MSG_INFO( "At BeginRun of " << name() << " - package version "
+                 << PACKAGE_VERSION  );
 
    return HLT::OK;
 }
@@ -116,7 +114,7 @@ HLT::ErrorCode muIso::hltBeginRun()
 HLT::ErrorCode muIso::hltExecute(const HLT::TriggerElement* inputTE, HLT::TriggerElement* outputTE)
 {
 
-   msg() << MSG::DEBUG << "in execute()" << endmsg;
+   ATH_MSG_DEBUG( "in execute()"  );
 
    //Initalize Monitored variables
    m_ErrorFlagMI = 0;
@@ -136,36 +134,27 @@ HLT::ErrorCode muIso::hltExecute(const HLT::TriggerElement* inputTE, HLT::Trigge
    StatusCode sc = m_pStoreGate->retrieve(pEvent);
    if (sc.isFailure()) {
       m_ErrorFlagMI = 1;
-      msg() << MSG::ERROR << "Could not find xAOD::EventInfo object" << endmsg;
+      ATH_MSG_ERROR( "Could not find xAOD::EventInfo object"  );
       return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::NAV_ERROR);
    }
 
-   auto m_current_run_id = pEvent->runNumber();
-   auto m_current_event_id = pEvent->eventNumber();
-   auto m_current_bcg_id = pEvent->bcid();
-
-   if (msgLvl() <= MSG::DEBUG) {
-      msg() << MSG::DEBUG << " ---> Run Number       : "
-            << m_current_run_id << endmsg;
-      msg() << MSG::DEBUG << " ---> Event Number     : " << std::hex
-            << m_current_event_id << std::dec << endmsg;
-      msg() << MSG::DEBUG << " ---> Bunch Crossing ID: " << std::hex
-            << m_current_bcg_id << std::dec << endmsg;
-   }
+   auto current_run_id = pEvent->runNumber();
+   auto current_event_id = pEvent->eventNumber();
+   auto current_bcg_id = pEvent->bcid();
 
-   if (msgLvl() <= MSG::DEBUG) {
-      msg() << MSG::DEBUG << "Configured to fex ID:   " << endmsg;
-      msg() << MSG::DEBUG << "R ID:                   " << m_RID           << endmsg;
-      msg() << MSG::DEBUG << "PtMin ID:               " << m_PtMinTrk      << endmsg;
-      msg() << MSG::DEBUG << "AbsEtaMax ID:           " << m_EtaMaxTrk     << endmsg;
-      msg() << MSG::DEBUG << "AbsDeltaZeta Max ID:    " << m_DzetaMax      << endmsg;
-   }
+   ATH_MSG_DEBUG( " ---> Run Number       : " << current_run_id  );
+   ATH_MSG_DEBUG( " ---> Event Number     : " << std::hex << current_event_id << std::dec  );
+   ATH_MSG_DEBUG( " ---> Bunch Crossing ID: " << std::hex << current_bcg_id << std::dec  );
+
+   ATH_MSG_DEBUG( "Configured to fex ID:   "  );
+   ATH_MSG_DEBUG( "R ID:                   " << m_RID            );
+   ATH_MSG_DEBUG( "PtMin ID:               " << m_PtMinTrk       );
+   ATH_MSG_DEBUG( "AbsEtaMax ID:           " << m_EtaMaxTrk      );
+   ATH_MSG_DEBUG( "AbsDeltaZeta Max ID:    " << m_DzetaMax       );
 
    // Some debug output:
-   if (msgLvl() <= MSG::DEBUG) {
-      msg() << MSG::DEBUG << "inputTE->ID():  " << inputTE->getId() << endmsg;
-      msg() << MSG::DEBUG << "outputTE->ID(): " << outputTE->getId() << endmsg;
-   }
+   ATH_MSG_DEBUG( "inputTE->ID():  " << inputTE->getId()  );
+   ATH_MSG_DEBUG( "outputTE->ID(): " << outputTE->getId()  );
 
    // Start Trigger Element Processing
 
@@ -178,12 +167,11 @@ HLT::ErrorCode muIso::hltExecute(const HLT::TriggerElement* inputTE, HLT::Trigge
    HLT::ErrorCode status = getFeature(outputTE, const_muonColl);
    muonColl = const_cast<xAOD::L2CombinedMuonContainer*>(const_muonColl);
    if (status != HLT::OK || ! muonColl) {
-      msg() << MSG::ERROR << " L2CombinedMuonContainer not found --> ABORT" << endmsg;
+      ATH_MSG_ERROR( " L2CombinedMuonContainer not found --> ABORT"  );
       return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE);
    }
 
    xAOD::L2CombinedMuonContainer::iterator muonCB_it(muonColl->begin());
-   xAOD::L2CombinedMuonContainer::iterator muonCB_end(muonColl->end());
    muonCB = *muonCB_it;
 
    // Create Iso muon
@@ -197,7 +185,7 @@ HLT::ErrorCode muIso::hltExecute(const HLT::TriggerElement* inputTE, HLT::Trigge
 
    if (muonCB->pt() == 0.) {
       m_ErrorFlagMI = 1;
-      if (msgLvl() <= MSG::DEBUG) msg() << MSG::DEBUG << " L2CombinedMuon pt = 0 --> stop processing RoI" << endmsg;
+      ATH_MSG_DEBUG( " L2CombinedMuon pt = 0 --> stop processing RoI"  );
       muonIS->setErrorFlag(m_ErrorFlagMI);
       muonISColl->push_back(muonIS);
       return muIsoSeed(outputTE, muonISColl);
@@ -217,14 +205,10 @@ HLT::ErrorCode muIso::hltExecute(const HLT::TriggerElement* inputTE, HLT::Trigge
    double phi      = muonCB->phi();
    double zeta     = muonCB->idTrack()->z0();
 
-   if (msgLvl() <= MSG::DEBUG)
-      msg() << MSG::DEBUG
-            << "Input L2CombinedMuon pt (GeV) = " << pt
-            << " / eta = "                    << eta
-            << " / phi = "                    << phi
-            << " / z = "                      << zeta
-            << endmsg;
-
+   ATH_MSG_DEBUG( "Input L2CombinedMuon pt (GeV) = " << pt
+                  << " / eta = "                    << eta
+                  << " / phi = "                    << phi
+                  << " / z = "                      << zeta );
 
    // ID tracks Decoding
    std::string algoId = m_ID_algo_to_use;
@@ -232,14 +216,12 @@ HLT::ErrorCode muIso::hltExecute(const HLT::TriggerElement* inputTE, HLT::Trigge
    status = getFeature(outputTE, idTrackParticles, algoId);
 
    if (status != HLT::OK) {
-      if (msgLvl() <= MSG::DEBUG)
-         msg() << MSG::DEBUG << " Failed to get " << algoId << " xAOD::TrackParticleContainer --> ABORT" << endmsg;
+      ATH_MSG_DEBUG( " Failed to get " << algoId << " xAOD::TrackParticleContainer --> ABORT"  );
       m_ErrorFlagMI = 2;
       return HLT::ErrorCode(HLT::Action::ABORT_CHAIN, HLT::Reason::MISSING_FEATURE);
    }
    if (!idTrackParticles) {
-      if (msgLvl() <= MSG::DEBUG)
-         msg() << MSG::DEBUG << "Pointer to xAOD::TrackParticleContainer[" << algoId << "] = 0" << endmsg;
+      ATH_MSG_DEBUG( "Pointer to xAOD::TrackParticleContainer[" << algoId << "] = 0"  );
       m_ErrorFlagMI = 2;
       muonIS->setErrorFlag(m_ErrorFlagMI);
       muonIS->setSumPt01(0.0);
@@ -250,7 +232,7 @@ HLT::ErrorCode muIso::hltExecute(const HLT::TriggerElement* inputTE, HLT::Trigge
       return muIsoSeed(outputTE, muonISColl);
    }
 
-   if (msgLvl() <= MSG::DEBUG) msg() << MSG::DEBUG << " Got xAOD::TrackParticleContainer with size: " << idTrackParticles->size() << endmsg;
+   ATH_MSG_DEBUG( " Got xAOD::TrackParticleContainer with size: " << idTrackParticles->size()  );
 
    //ID based isolation
    float  sumpt01 = 0.0;
@@ -269,12 +251,10 @@ HLT::ErrorCode muIso::hltExecute(const HLT::TriggerElement* inputTE, HLT::Trigge
       double pt_id    = (*trkit)->pt() * q_id;
       double z_id     = (*trkit)->z0();
 
-      if (msgLvl() <= MSG::DEBUG)
-         msg() << MSG::DEBUG << "Found track: "
-               << "  with pt (GeV) = " << pt_id / CLHEP::GeV
-               << ", eta =" << eta_id
-               << ", phi =" << phi_id
-               << endmsg;
+      ATH_MSG_DEBUG( "Found track: "
+                     << "  with pt (GeV) = " << pt_id / CLHEP::GeV
+                     << ", eta =" << eta_id
+                     << ", phi =" << phi_id );
 
       if ((fabs(pt_id) / CLHEP::GeV) < m_PtMinTrk)       continue;
       if (fabs(eta_id)               > m_EtaMaxTrk)      continue;
@@ -282,17 +262,15 @@ HLT::ErrorCode muIso::hltExecute(const HLT::TriggerElement* inputTE, HLT::Trigge
       double dzeta    = z_id - zeta;
       if (fabs(dzeta) > m_DzetaMax)       continue;
 
-      if (msgLvl() <= MSG::DEBUG) msg() << MSG::DEBUG << "Track selected " << endmsg;
+      ATH_MSG_DEBUG( "Track selected "  );
 
-      if (msgLvl() <= MSG::DEBUG)
-         msg() << MSG::DEBUG << "Found track: "
-               << m_ID_algo_to_use
-               << "  with pt = " << pt_id
-               << ", eta = " << eta_id
-               << ", phi = " << phi_id
-               << ", Zid = " << z_id
-               << ", DZeta = " << dzeta
-               << endmsg;
+      ATH_MSG_DEBUG( "Found track: "
+                     << m_ID_algo_to_use
+                     << "  with pt = " << pt_id
+                     << ", eta = " << eta_id
+                     << ", phi = " << phi_id
+                     << ", Zid = " << z_id
+                     << ", DZeta = " << dzeta );
 
       //see if is in cone
       double deta = fabs(eta_id - eta);
@@ -315,12 +293,11 @@ HLT::ErrorCode muIso::hltExecute(const HLT::TriggerElement* inputTE, HLT::Trigge
    sumpt03 -= muonCB->idTrack()->pt();
    sumpt04 -= muonCB->idTrack()->pt();
 
-   msg() << MSG::DEBUG << " REGTEST ID ALGO: ntrk / pt / sumpt02 / iso"
-         << " / " << ntrk
-         << " / " << pt
-         << " / " << sumpt02
-         << " / " << sumpt02 / pt
-         << endmsg;
+   ATH_MSG_DEBUG( " REGTEST ID ALGO: ntrk / pt / sumpt02 / iso"
+                  << " / " << ntrk
+                  << " / " << pt
+                  << " / " << sumpt02
+                  << " / " << sumpt02 / pt );
 
    // updated monitored variables
    m_NTRK     = ntrk;
@@ -354,15 +331,11 @@ HLT::ErrorCode muIso::muIsoSeed(HLT::TriggerElement* outputTE, xAOD::L2IsoMuonCo
    if (status != HLT::OK) {
       outputTE->setActiveState(false);
       delete muon_cont;
-      msg() << MSG::ERROR
-            << " Record of xAOD::L2IsoMuonContainer in TriggerElement failed"
-            << endmsg;
+      ATH_MSG_ERROR( " Record of xAOD::L2IsoMuonContainer in TriggerElement failed"
+                     );
       return status;
    } else {
-      if (msgLvl() <= MSG::DEBUG)
-         msg() << MSG::DEBUG
-               << " xAOD::L2IsoMuonContainer attached to the TriggerElement"
-               << endmsg;
+     ATH_MSG_DEBUG( " xAOD::L2IsoMuonContainer attached to the TriggerElement" );
    }
    outputTE->setActiveState(true);
    return HLT::OK;
diff --git a/Trigger/TrigAlgorithms/TrigmuRoI/cmt/requirements b/Trigger/TrigAlgorithms/TrigmuRoI/cmt/requirements
deleted file mode 100755
index d20837757f3e5fc3f186e4b1b9a528c38fdd98f6..0000000000000000000000000000000000000000
--- a/Trigger/TrigAlgorithms/TrigmuRoI/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-package TrigmuRoI
-
-author Alessandro Di Mattia <dimattia@cern.ch>
-
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*         External
-
-use TrigT1Interfaces    TrigT1Interfaces-*       Trigger/TrigT1
-use TrigInterfaces      TrigInterfaces-*         Trigger/TrigSteer
-use TrigSteeringEvent   TrigSteeringEvent-*      Trigger/TrigEvent
-
-use TrigMuonRoITools	TrigMuonRoITools-*	 Trigger/TrigTools
-
-
-private
-use TrigT1Result        TrigT1Result-*           Trigger/TrigT1
-use TrigNavigation      TrigNavigation-*         Trigger/TrigEvent
-end_private
-
-#########################################################
-# ATHENA librariy build                                 #
-#########################################################
-
-
-library TrigmuRoI *.cxx -s=../src/components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigAnalysis/TrigAnalysisExamples/cmt/requirements b/Trigger/TrigAnalysis/TrigAnalysisExamples/cmt/requirements
deleted file mode 100644
index 1b55380e590828ec3c648e114418906c277ab1e0..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigAnalysisExamples/cmt/requirements
+++ /dev/null
@@ -1,73 +0,0 @@
-package TrigAnalysisExamples
-
-author Michael Begel
-author Joerg Stelzer
-author Tomasz Bold
-
-use AtlasPolicy                 AtlasPolicy-*
-use TestPolicy                  TestPolicy-*
-
-
-
-# for AthenaPython
-use AthenaPython                AthenaPython-*          Control -no_auto_imports
-
-# for example EDM access test
-# use TrigParticle                TrigParticle-*          Trigger/TrigEvent
-
-
-private
-
-# xAOD
-use xAODTrigger                 xAODTrigger-*           Event/xAOD
-use xAODEgamma                 xAODEgamma-*           Event/xAOD
-use xAODTrigEgamma                 xAODTrigEgamma-*           Event/xAOD
-use xAODTau                 xAODTau-*           Event/xAOD
-use xAODCaloEvent                 xAODCaloEvent-*           Event/xAOD
-use xAODMuon                    xAODMuon-*              Event/xAOD
-use xAODBase                    xAODBase-*              Event/xAOD
-use xAODEventInfo               xAODEventInfo-*         Event/xAOD
-use xAODJet                     xAODJet-*               Event/xAOD
-use xAODTrigCalo               xAODTrigCalo-*          Event/xAOD
-
-# tools for analysis
-use FourMomUtils                FourMomUtils-*          Event
-use AthenaBaseComps             AthenaBaseComps-*       Control
-use AthenaKernel                AthenaKernel-*          Control
-
-use AtlasBoost                  AtlasBoost-*            External
-use GaudiInterface              GaudiInterface-*        External
-
-use StoreGate                   StoreGate-*             Control
-# For the TrigBunchCrossingTool example:
-use TrigAnalysisInterfaces      TrigAnalysisInterfaces-* Trigger/TrigAnalysis
-use EventInfo                   EventInfo-*             Event
-# for TrigDecisionTool test
-use TrigDecisionTool            TrigDecisionTool-*      Trigger/TrigAnalysis
-use TriggerMatchingTool          TriggerMatchingTool-*    Trigger/TrigAnalysis
-use TrigConfHLTData             TrigConfHLTData-*       Trigger/TrigConfiguration
-# for TrigMatchExamples
-# for application
-use POOLRootAccess POOLRootAccess-* PhysicsAnalysis
-
-use AthAnalysisBaseComps        AthAnalysisBaseComps-*  Control
-use TrigT1Interfaces            TrigT1Interfaces-*      Trigger/TrigT1
-
-public
-
-# library	
-library TrigAnalysisExamples *.cxx components/*.cxx
-apply_pattern component_library
-
-branches src python share doc exec
-
-apply_pattern declare_python_modules files="*.py"
-# declare test job options
-apply_pattern declare_joboptions files="*.py"
-
-private
-use AtlasROOT			        AtlasROOT-*                  External
-use TrigSteeringEvent           TrigSteeringEvent-*          Trigger/TrigEvent
-end_private
-
-application TrigAnalysisExApp TrigAnalysisExApp.cxx
diff --git a/Trigger/TrigAnalysis/TrigAnalysisInterfaces/cmt/Makefile.RootCore b/Trigger/TrigAnalysis/TrigAnalysisInterfaces/cmt/Makefile.RootCore
deleted file mode 100644
index e641c02eb118100931dd1be62d712f7016054605..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigAnalysisInterfaces/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,11 +0,0 @@
-# Dear emacs, this is a -*- Makefile -*-
-# Author: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-# TrigAnalysisInterfaces makefile for the RootCore environment
-
-PACKAGE          = TrigAnalysisInterfaces
-PACKAGE_PRELOAD  =
-PACKAGE_CXXFLAGS =
-PACKAGE_LDFLAGS  =
-PACKAGE_DEP      = AsgTools
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigAnalysis/TrigAnalysisInterfaces/cmt/requirements b/Trigger/TrigAnalysis/TrigAnalysisInterfaces/cmt/requirements
deleted file mode 100644
index 88729a35563e83810af0e1057cac793722711ddc..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigAnalysisInterfaces/cmt/requirements
+++ /dev/null
@@ -1,17 +0,0 @@
-package TrigAnalysisInterfaces
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-
-# Gaudi/Athena package(s):
-use AtlasPolicy      AtlasPolicy-*
-
-use AsgTools         AsgTools-*         Control/AthToolSupport
-
-# Generate Reflex dictionaries for the Athena interfaces:
-private
-use AtlasReflex     AtlasReflex-*     External -no_auto_imports
-
-apply_pattern lcgdict dict=TrigAnalysisInterfaces selectionfile=selection.xml \
-                      headerfiles="../TrigAnalysisInterfaces/TrigAnalysisInterfacesDict.h"
-
-end_private
-
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossingToolBase.cxx b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossingToolBase.cxx
index f98f25c5e6c53607d04809fb48180222885bb507..f512daa6c9a7c99d162432cb7814113a23c837cc 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossingToolBase.cxx
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/Root/BunchCrossingToolBase.cxx
@@ -26,7 +26,7 @@ namespace Trig {
         m_bunchTrains() {
 
       /// Declare the properties of the tool:
-      declareProperty( "MaxBunchSpacing", m_maxBunchSpacing = 150 );
+      declareProperty( "MaxBunchSpacing", m_maxBunchSpacing = 75 );
       declareProperty( "FrontLength", m_frontLength = 300 );
       declareProperty( "TailLength", m_tailLength = 300 );
    }
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/cmt/Makefile.RootCore b/Trigger/TrigAnalysis/TrigBunchCrossingTool/cmt/Makefile.RootCore
deleted file mode 100644
index 7fa7ef60b4c17adfbcb0f0ca2b9b2e9151763acd..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,12 +0,0 @@
-# Dear emacs, this is a -*- Makefile -*-
-# Author: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-# TrigBunchCrossingTool makefile for the RootCore environment
-
-PACKAGE          = TrigBunchCrossingTool
-PACKAGE_PRELOAD  = Net Tree
-PACKAGE_CXXFLAGS =
-PACKAGE_LDFLAGS  =
-PACKAGE_DEP      = AsgTools TrigAnalysisInterfaces TrigConfInterfaces TrigConfL1Data xAODRootAccess xAODEventInfo xAODTrigger
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/cmt/requirements b/Trigger/TrigAnalysis/TrigBunchCrossingTool/cmt/requirements
deleted file mode 100644
index 4f8410c5bb3c3ac76cd23d737a9920d9d602ea74..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/cmt/requirements
+++ /dev/null
@@ -1,64 +0,0 @@
-package TrigBunchCrossingTool
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-
-public
-
-# Base Gaudi/Athena package(s):
-use AtlasPolicy     AtlasPolicy-*
-use GaudiInterface  GaudiInterface-*  External
-use AsgTools        AsgTools-*        Control/AthToolSupport
-
-# Trigger package(s):
-use TrigAnalysisInterfaces TrigAnalysisInterfaces-* Trigger/TrigAnalysis
-use TrigConfInterfaces     TrigConfInterfaces-*     Trigger/TrigConfiguration
-
-end_public
-
-private
-
-# Base Gaudi/Athena package(s):
-use AthenaKernel    AthenaKernel-*    Control
-
-# External package(s):
-use AtlasROOT       AtlasROOT-*       External
-
-# For reading file/DB metadata:
-use AthenaPoolUtilities AthenaPoolUtilities-* Database/AthenaPOOL
-use AtlasCORAL          AtlasCORAL-*          External
-
-# Trigger package(s):
-use TrigConfL1Data         TrigConfL1Data-*         Trigger/TrigConfiguration
-
-# xAOD include(s):
-use xAODEventInfo          xAODEventInfo-*          Event/xAOD
-use xAODTrigger            xAODTrigger-*            Event/xAOD
-
-# To get access to TSocket:
-apply_tag ROOTNetLibs
-
-# Specify the required ROOT components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS Net)"
-
-end_private
-
-# Declare the different components of the package:
-library TrigBunchCrossingTool *.cxx ../Root/*.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_python_modules files=*.py
-
-private
-
-use TestTools       TestTools-*       AtlasTest
-
-# Compile unit tests for the package:
-apply_pattern UnitTest_run unit_test=ut_static_bunch_tool \
-                                 extra_sources="../Root/BunchCrossing.cxx \
-                                                ../Root/BunchTrain.cxx \
-                                                ../Root/BunchCrossingToolBase.cxx \
-                                                ../Root/StaticBunchCrossingTool.cxx"
-apply_pattern UnitTest_run unit_test=ut_web_bunch_tool \
-                                 extra_sources="../Root/BunchCrossing.cxx \
-                                                ../Root/BunchTrain.cxx \
-                                                ../Root/BunchCrossingToolBase.cxx \
-                                                ../Root/WebBunchCrossingTool.cxx"
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/python/BunchCrossingTool.py b/Trigger/TrigAnalysis/TrigBunchCrossingTool/python/BunchCrossingTool.py
index abcf3ceaee0800076c1a4767ea2fc65f3316b57d..f407688fd0f27142b3be7b6c184b8542d145bc72 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/python/BunchCrossingTool.py
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/python/BunchCrossingTool.py
@@ -120,7 +120,7 @@ def TrigConfBunchCrossingTool():
     __tool = Trig__TrigConfBunchCrossingTool( __defaultToolName )
 
     # Create a default configuration for it:
-    __tool.MaxBunchSpacing = 150
+    __tool.MaxBunchSpacing = 75
     __tool.FrontLength = 300
     __tool.TailLength = 300
 #    __tool.FilledBunchNames = [ "Paired", "Filled" ]
@@ -187,7 +187,7 @@ def MCBunchCrossingTool():
     __tool = Trig__MCBunchCrossingTool( __defaultToolName )
 
     # Create a default configuration for it:
-    __tool.MaxBunchSpacing = 150
+    __tool.MaxBunchSpacing = 75
     __tool.FrontLength = 300
     __tool.TailLength = 300
     __tool.MinBunchIntensity = 0.1
@@ -252,7 +252,7 @@ def LHCBunchCrossingTool():
     __tool = Trig__LHCBunchCrossingTool( __defaultToolName )
 
     # Create a default configuration for it:
-    __tool.MaxBunchSpacing = 150
+    __tool.MaxBunchSpacing = 75
     __tool.FrontLength = 300
     __tool.TailLength = 300
     __tool.IntensityChannel = 1
@@ -309,7 +309,7 @@ def WebBunchCrossingTool():
     __tool = Trig__WebBunchCrossingTool( __defaultToolName )
 
     # Create a default configuration for it:
-    __tool.MaxBunchSpacing = 150
+    __tool.MaxBunchSpacing = 75
     __tool.FrontLength = 300
     __tool.TailLength = 300
     __logger.info( "Set the default values for the WebBunchCrossingTool configuration" )
@@ -350,7 +350,7 @@ def StaticBunchCrossingTool():
     __tool = Trig__StaticBunchCrossingTool( __defaultToolName )
 
     # Create a default configuration for it:
-    __tool.MaxBunchSpacing = 150
+    __tool.MaxBunchSpacing = 75
     __tool.FrontLength = 300
     __tool.TailLength = 300
 
@@ -388,7 +388,7 @@ def D3PDBunchCrossingTool():
     __tool = Trig__D3PDBunchCrossingTool( __defaultToolName )
 
     # Create a default configuration for it:
-    __tool.MaxBunchSpacing = 150
+    __tool.MaxBunchSpacing = 75
     __tool.FrontLength = 300
     __tool.TailLength = 300
 
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/test/ut_static_bunch_tool_test.cxx b/Trigger/TrigAnalysis/TrigBunchCrossingTool/test/ut_static_bunch_tool_test.cxx
index 0e96031f8ce4373a1a0c3a3baff75d103d903223..97ca65670599f20400372ac5be4eb20f4beb6116 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/test/ut_static_bunch_tool_test.cxx
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/test/ut_static_bunch_tool_test.cxx
@@ -35,6 +35,7 @@ int main() {
    // Create the tool to be tested:
    Trig::StaticBunchCrossingTool tool;
    SIMPLE_CHECK( tool.setProperty( "OutputLevel", MSG::DEBUG ) );
+   SIMPLE_CHECK( tool.setProperty( "MaxBunchSpacing", 150 ) );
 
    // Try to load some configurations:
    SIMPLE_CHECK( tool.loadConfig( 1 ) );
diff --git a/Trigger/TrigAnalysis/TrigBunchCrossingTool/test/ut_web_bunch_tool_test.cxx b/Trigger/TrigAnalysis/TrigBunchCrossingTool/test/ut_web_bunch_tool_test.cxx
index b7b85b93c2259eeaab89470ecaa9d6cb8460309d..d4ec6c001c6411e209cde3e9aa562793c1b00cf9 100644
--- a/Trigger/TrigAnalysis/TrigBunchCrossingTool/test/ut_web_bunch_tool_test.cxx
+++ b/Trigger/TrigAnalysis/TrigBunchCrossingTool/test/ut_web_bunch_tool_test.cxx
@@ -43,6 +43,7 @@ int main() {
    SIMPLE_CHECK( tool.setProperty( "OutputLevel", MSG::DEBUG ) );
    SIMPLE_CHECK( tool.setProperty( "ServerAddress",
                                    "atlas-trigconf.cern.ch" ) );
+   SIMPLE_CHECK( tool.setProperty( "MaxBunchSpacing", 150 ) );
 
    // Try to load some configurations by key:
    SIMPLE_CHECK( tool.loadConfig( 104 ) );
diff --git a/Trigger/TrigAnalysis/TrigDecisionMaker/cmt/requirements b/Trigger/TrigAnalysis/TrigDecisionMaker/cmt/requirements
deleted file mode 100644
index da3138f6ed0eb40fc85b3af916688b5fce199209..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigDecisionMaker/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-package TrigDecisionMaker
-
-
-author Ricardo Goncalo <r.goncalo@rhul.ac.uk>
-
-# General stuff
-use AtlasPolicy	 	AtlasPolicy-*
-private
-use GaudiInterface     	GaudiInterface-*   	External
-use StoreGate      	StoreGate-*  		Control
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use EventInfo        	EventInfo-*        	Event
-
-# Trigger-specific: level 1...
-use TrigT1Result        TrigT1Result-*   	Trigger/TrigT1
-
-# ...and steering
-use TrigSteeringEvent	TrigSteeringEvent-*     Trigger/TrigEvent
-use TrigDecisionEvent	TrigDecisionEvent-*   	Trigger/TrigEvent
-
-use TrigSteering     	TrigSteering-*          Trigger/TrigSteer
-use TrigConfL1Data	TrigConfL1Data-*	Trigger/TrigConfiguration
-use TrigConfInterfaces	TrigConfInterfaces-*	Trigger/TrigConfiguration
-end_private
-
-
-# Library
-library TrigDecisionMaker *.cxx components/*.cxx
-apply_pattern component_library
-
-# Declare job options file(s)
-apply_pattern declare_joboptions files="jobOfragment*.py"
-
-apply_pattern declare_python_modules files="__init__.py TrigDecisionMakerConfig.py"
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/cmt/Makefile.RootCore b/Trigger/TrigAnalysis/TrigDecisionTool/cmt/Makefile.RootCore
deleted file mode 100644
index 2caffe9e3775d4cd43f79bc19f2210fa9aa92649..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigDecisionTool/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,25 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = TrigDecisionTool
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS =
-PACKAGE_DEP = TrigNavStructure TrigConfxAOD AsgTools TrigDecisionInterface TrigSteeringEvent xAODRootAccess Asg_Boost xAODBase TrigRoiConversion
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 1
-
-include $(ROOTCOREDIR)/Makefile-common
-
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/cmt/requirements b/Trigger/TrigAnalysis/TrigDecisionTool/cmt/requirements
deleted file mode 100644
index afd90a1acacd891883e75e71a7ca7fdf7be787d8..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigDecisionTool/cmt/requirements
+++ /dev/null
@@ -1,84 +0,0 @@
-package TrigDecisionTool
-author Michael Begel <Michael.Begel@cern.ch>
-author Nicolas Berger <Nicolas.Berger@cern.ch>
-author Tomasz Bold <Tomasz.Bold@cern.ch>
-author Joerg Stelzer <Joerg.Stelzer@cern.ch>
-
-use  AtlasPolicy                AtlasPolicy-*
-
-public
-use  GaudiInterface             GaudiInterface-*                External
-use_ifndef pplist="XAOD_ANALYSIS" pkg="Trigger/TrigEvent/TrigNavigation"
-
-use  AtlasBoost                 AtlasBoost-*                    External
-use  AtlasROOT                  AtlasROOT-*                     External
-#use  AthenaKernel               AthenaKernel-*                  Control
-use  StoreGate                  StoreGate-*                     Control
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  TrigRoiConversion          TrigRoiConversion-*		Trigger/TrigEvent
-use  TrigConfInterfaces         TrigConfInterfaces-*            Trigger/TrigConfiguration
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigConfHLTData            TrigConfHLTData-*               Trigger/TrigConfiguration
-use  TrigConfL1Data             TrigConfL1Data-*                Trigger/TrigConfiguration
-use  TrigDecisionInterface      TrigDecisionInterface-*         Trigger/TrigEvent
-#use  AnalysisTriggerEvent       AnalysisTriggerEvent-*          PhysicsAnalysis/AnalysisTrigger
-use_ifndef pplist="XAOD_ANALYSIS" pkg="PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent"
-use  xAODTrigger		xAODTrigger-*			Event/xAOD
-use  AsgTools                   AsgTools-*                      Control/AthToolSupport
-#use  TrigStorageDefinitions     TrigStorageDefinitions-*        Trigger/TrigEvent
-use_ifndef pplist="XAOD_ANALYSIS" pkg="Trigger/TrigEvent/TrigStorageDefinitions"
-use  TrigNavStructure		TrigNavStructure-*		Trigger/TrigEvent
-use  xAODBase			xAODBase-*			Event/xAOD
-use_ifndef pplist="XAOD_ANALYSIS" pkg="Trigger/TrigEvent/TrigDecisionEvent"
-use  EventInfo			EventInfo-*			Event
-end_public
-
-private
-#use  AthenaKernel               AthenaKernel-*                  Control
-use  AthenaBaseComps		AthenaBaseComps-*		Control
-#use  CxxUtils                   CxxUtils-*                      Control
-#use  AthContainers              AthContainers-*                 Control
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-#use  TrigMuonEvent              TrigMuonEvent-*                 Trigger/TrigEvent
-use_ifndef pplist="XAOD_ANALYSIS" pkg="Trigger/TrigEvent/TrigMuonEvent"
-
-end_private
-
-# Build a dual-use library:
-apply_pattern dual_use_library files="../Root/*.cxx ../src/*.cxx"
-
-private 
-
-# 
-apply_pattern declare_scripts files="checkTriggerEDM.py checkTriggerProcessingErrors.py -s=$(PyUtils_root)/share"
-
-use AtlasReflex   AtlasReflex-*   External -no_auto_imports
-
-
-# Pattern to build the dict lib. User should create a single header
-# file: <package>Dict.h which includes all other .h files. See MissingETDict
-# A selection file must be created by hand. This file lists the
-# classes to be added to the dictionary, and which fields are
-# transient. It should be put in ../<package> dir and is conventionally called
-# selection.xml.
-apply_pattern   lcgdict     dict=TrigDecisionTool \
-                            selectionfile=selection.xml \
-                            headerfiles="../TrigDecisionTool/TrigDecisionToolDict.h"
-
-use TestTools      TestTools-*         AtlasTest
-
-# this can be used to test if templated code compiles ... but it is not easy to setup running env for it to realy complete
-apply_pattern UnitTest_run unit_test=Templates extrapatterns=".*" 
-#apply_pattern UnitTest_run unit_test=ChainGroup extrapatterns=".*" 
-
-macro TrigDecisionTool_extralibs "-lPyROOT"
-macro_append TrigDecisionToolLiblinkopts " $(TrigDecisionTool_extralibs) "
-macro_append TrigDecisionToolLib_shlibflags " $(TrigDecisionTool_extralibs) "
-
-end_private
-
-apply_pattern declare_python_modules files="*.py"
-
-# Declare the library's dependency on PyROOT for CMake:
-apply_pattern cmake_add_command command="find_package( ROOT COMPONENTS PyROOT )"
-
diff --git a/Trigger/TrigAnalysis/TrigEffJpsiTools/cmt/requirements b/Trigger/TrigAnalysis/TrigEffJpsiTools/cmt/requirements
deleted file mode 100644
index f6fa1faca2e5f0515cbabd11101e4f864f6a746c..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigEffJpsiTools/cmt/requirements
+++ /dev/null
@@ -1,56 +0,0 @@
-package TrigEffJpsiTools
-
-manager Takanori Kono <Takanori.Kohno@cern.ch>
-author Hironori Kiyamura <kiyamura@phys.sci.kobe-u.ac.jp>
-author Takashi Matsushita <Takashi.Matsushita@cern.ch>
-
-private
-use AnalysisTriggerEvent      AnalysisTriggerEvent-*      PhysicsAnalysis/AnalysisTrigger
-use AthenaKernel              AthenaKernel-*              Control
-use AthenaBaseComps           AthenaBaseComps-*           Control
-use AtlasROOT                 AtlasROOT-*                 External
-use EventInfo                 EventInfo-*                 Event
-use EventKernel               EventKernel-*               Event
-use MuonIdHelpers             MuonIdHelpers-*             MuonSpectrometer
-use MuonReadoutGeometry       MuonReadoutGeometry-*       MuonSpectrometer/MuonDetDescr
-use Particle                  Particle-*                  Reconstruction
-use RPCcablingInterface       RPCcablingInterface-*       MuonSpectrometer/MuonCablings
-use StoreGate                 StoreGate-*                 Control
-use TrigDecisionTool          TrigDecisionTool-*          Trigger/TrigAnalysis
-use TrigMuonEvent             TrigMuonEvent-*             Trigger/TrigEvent
-use TrigParticle              TrigParticle-*              Trigger/TrigEvent
-use TrigSteeringEvent         TrigSteeringEvent-*         Trigger/TrigEvent
-use TrigT1RPCRecRoiSvc        TrigT1RPCRecRoiSvc-*        Trigger/TrigT1
-use TrigT1TGCRecRoiSvc        TrigT1TGCRecRoiSvc-*        Trigger/TrigT1
-use TrigT1Result              TrigT1Result-*              Trigger/TrigT1
-use TrigT1Interfaces          TrigT1Interfaces-*          Trigger/TrigT1
-use TrigConfL1Data            TrigConfL1Data-*            Trigger/TrigConfiguration
-use TrkEventUtils             TrkEventUtils-*             Tracking/TrkEvent
-use TrkExInterfaces           TrkExInterfaces-*           Tracking/TrkExtrapolation
-use TrkParameters             TrkParameters-*             Tracking/TrkEvent
-use TrkRIO_OnTrack            TrkRIO_OnTrack-*            Tracking/TrkEvent
-use TrkTrack                  TrkTrack-*                  Tracking/TrkEvent
-use TrkSurfaces               TrkSurfaces-*               Tracking/TrkDetDescr
-
-#use BPhysAnalysisObjects      BPhysAnalysisObjects-*      PhysicsAnalysis/BPhys
-
-#use TrkVertexAnalysisUtils    TrkVertexAnalysisUtils-*     Tracking/TrkVertexFitter
-#use TrkVKalVrtFitter          TrkVKalVrtFitter-*           Tracking/TrkVertexFitter
-
-use muonEvent                 muonEvent-*                  Reconstruction/MuonIdentification
- 
-use TrigInDetAnalysis         TrigInDetAnalysis-*     Trigger/TrigAnalysis/
-use TrigInDetAnalysisUtils    TrigInDetAnalysisUtils-*     Trigger/TrigAnalysis/
-
-apply_tag ROOTMathLibs
-
-public
-use AtlasPolicy               AtlasPolicy-*
-use GaudiInterface            GaudiInterface-*            External
-use GeoPrimitives             GeoPrimitives-*             DetectorDescription
-
-library TrigEffJpsiTools *.cxx components/*.cxx
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-
-# eof
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaAnalysisBaseTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaAnalysisBaseTool.cxx
index 99ff0e83c9c3f24957a629cab3e9411d4078caf8..74d6bcf195f73250261f32def4a7368b279aacf4 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaAnalysisBaseTool.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaAnalysisBaseTool.cxx
@@ -446,7 +446,13 @@ bool TrigEgammaAnalysisBaseTool::splitTriggerName(const std::string trigger, std
   boost::split(strs,hltinfo,boost::is_any_of("_"));
 
   if((strs.at(0))[0]=='2'){
-    ((p1trigger+=((strs.at(0)).substr(1,(int)strs.at(0).find_last_of(strs.at(0)))))+="_")+=strs.at(1);
+    ((p1trigger+=("HLT_"+((strs.at(0)).substr(1,(int)strs.at(0).find_last_of(strs.at(0)))))+="_"));
+
+    for(unsigned int i=1; i<strs.size();i++){
+      if(strs.at(i)=="Jpsiee") continue;
+      (p1trigger+="_")+=strs.at(i); 
+    }
+
     p2trigger=p1trigger;
     return true;
   }
@@ -456,11 +462,25 @@ bool TrigEgammaAnalysisBaseTool::splitTriggerName(const std::string trigger, std
       return false;
     }
 
-    ((p1trigger+=strs.at(0))+="_")+=strs.at(1);
-    ((p2trigger+=strs.at(2))+="_")+=strs.at(3);
+    int index=-1;
+    p1trigger+=("HLT_"+strs.at(0));
+    
+    for(int i=1; index<0;i++)
+      {
+        (p1trigger+="_")+=strs.at(i); 
+        
+        if(strs.at(i+1)[0]=='e' || strs.at(i+1)[0]=='g') index=(i+1);
+      } 
+    
+    p2trigger+=("HLT_"+strs.at(index));
+    
+    for(unsigned int i=index+1; i< strs.size();i++){
+      if(strs.at(i)=="Jpsiee") continue;
+      (p2trigger+="_")+=strs.at(i); 
+    }
     return true;
   }
-
+  
 
 }
 
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavNtuple.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavNtuple.cxx
index f8d357aac02e6b4374705a9b0b5eeca1fb5ca725..b8bdf691fcdf4cce3bd8c3ef34a7de485dddacb7 100755
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavNtuple.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavNtuple.cxx
@@ -568,8 +568,8 @@ bool TrigEgammaNavNtuple::fillElectron( const xAOD::Electron *el ){
     m_el_charge               = el->charge();
     
     track->summaryValue( m_el_eprobht            , xAOD::SummaryType::eProbabilityHT );
-    track->summaryValue( m_el_nblayerhits        , xAOD::SummaryType::numberOfBLayerHits );
-    track->summaryValue( m_el_nblayerolhits      , xAOD::SummaryType::numberOfBLayerOutliers );
+    track->summaryValue( m_el_nblayerhits        , xAOD::SummaryType::numberOfInnermostPixelLayerHits );
+    track->summaryValue( m_el_nblayerolhits      , xAOD::SummaryType::numberOfInnermostPixelLayerOutliers );
     track->summaryValue( m_el_npixhits           , xAOD::SummaryType::numberOfPixelHits );
     track->summaryValue( m_el_npixolhits         , xAOD::SummaryType::numberOfPixelOutliers );
     track->summaryValue( m_el_nscthits           , xAOD::SummaryType::numberOfSCTHits );
@@ -579,7 +579,7 @@ bool TrigEgammaNavNtuple::fillElectron( const xAOD::Electron *el ){
     track->summaryValue( m_el_ntrthighthresolhits, xAOD::SummaryType::numberOfTRTHighThresholdOutliers );
     track->summaryValue( m_el_ntrtolhits         , xAOD::SummaryType::numberOfTRTOutliers );
     track->summaryValue( m_el_ntrtxenonhits      , xAOD::SummaryType::numberOfTRTXenonHits );
-    //track->summaryValue( m_el_expectblayerhit    , xAOD::SummaryType::expectBLayerHit );
+    //track->summaryValue( m_el_expectblayerhit    , xAOD::SummaryType::expectInnermostPixelLayerHit );
     track->summaryValue( m_el_npixdeadsensors    , xAOD::SummaryType::numberOfPixelDeadSensors);
     track->summaryValue( m_el_nsctdeadsensors    , xAOD::SummaryType::numberOfSCTDeadSensors);
 
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPBaseTool.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPBaseTool.cxx
index c7230e5369fd056bf6dd5a41cb7951479edb5e4b..19570ccafe36e54bce4634a0fb02ae3b3ef24ba0 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPBaseTool.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPBaseTool.cxx
@@ -340,10 +340,10 @@ bool TrigEgammaNavTPBaseTool::isTagElectron(const xAOD::Electron *el){
           std::string p1trigger;
           std::string p2trigger;
           if(splitTriggerName(tag,p1trigger,p2trigger)){
-            if(fabs(p1trigger.find("tight"))<10) tag=p1trigger;
-            if(fabs(p2trigger.find("tight"))<10) tag=p2trigger;
+            if(fabs(p1trigger.find("tight"))<14) tag=p1trigger;
+            if(fabs(p2trigger.find("tight"))<14) tag=p2trigger;
           }
-          if( match()->match(el,"HLT_"+tag) )
+          if( match()->match(el,tag) )
             tagPassed=true;
         }
         else{
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPNtuple.cxx b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPNtuple.cxx
index 2f0981a9ac13ff2c7e99c123682642ed8c3bf613..62484f0cc05dbe118cb2a2b27b97b48ee06069dd 100755
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPNtuple.cxx
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/Root/TrigEgammaNavTPNtuple.cxx
@@ -494,8 +494,8 @@ bool TrigEgammaNavTPNtuple::fillElectron( const xAOD::Electron *el ){
     m_el_charge               = el->charge();
     
     track->summaryValue( m_el_eprobht            , xAOD::SummaryType::eProbabilityHT );
-    track->summaryValue( m_el_nblayerhits        , xAOD::SummaryType::numberOfBLayerHits );
-    track->summaryValue( m_el_nblayerolhits      , xAOD::SummaryType::numberOfBLayerOutliers );
+    track->summaryValue( m_el_nblayerhits        , xAOD::SummaryType::numberOfInnermostPixelLayerHits );
+    track->summaryValue( m_el_nblayerolhits      , xAOD::SummaryType::numberOfInnermostPixelLayerOutliers );
     track->summaryValue( m_el_npixhits           , xAOD::SummaryType::numberOfPixelHits );
     track->summaryValue( m_el_npixolhits         , xAOD::SummaryType::numberOfPixelOutliers );
     track->summaryValue( m_el_nscthits           , xAOD::SummaryType::numberOfSCTHits );
@@ -505,7 +505,7 @@ bool TrigEgammaNavTPNtuple::fillElectron( const xAOD::Electron *el ){
     track->summaryValue( m_el_ntrthighthresolhits, xAOD::SummaryType::numberOfTRTHighThresholdOutliers );
     track->summaryValue( m_el_ntrtolhits         , xAOD::SummaryType::numberOfTRTOutliers );
     track->summaryValue( m_el_ntrtxenonhits      , xAOD::SummaryType::numberOfTRTXenonHits );
-    //track->summaryValue( m_el_expectblayerhit    , xAOD::SummaryType::expectBLayerHit );
+    //track->summaryValue( m_el_expectblayerhit    , xAOD::SummaryType::expectInnermostPixelLayerHit );
     track->summaryValue( m_el_npixdeadsensors    , xAOD::SummaryType::numberOfPixelDeadSensors);
     track->summaryValue( m_el_nsctdeadsensors    , xAOD::SummaryType::numberOfSCTDeadSensors);
 
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/cmt/requirements b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/cmt/requirements
deleted file mode 100644
index bc3eddfc8f6811b325abdaac35055a020d7523ed..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/cmt/requirements
+++ /dev/null
@@ -1,51 +0,0 @@
-package TrigEgammaAnalysisTools
-
-public
-use AtlasPolicy                AtlasPolicy-*                   
-use AsgTools                   AsgTools-*                      Control/AthToolSupport
-use AtlasROOT                   AtlasROOT-*                     External
-
-
-use TrigDecisionTool            TrigDecisionTool-*              Trigger/TrigAnalysis
-use TrigConfHLTData             TrigConfHLTData-*               Trigger/TrigConfiguration
-#use TrigNavigation              TrigNavigation-*                Trigger/TrigEvent
-use TrigSteeringEvent           TrigSteeringEvent-*             Trigger/TrigEvent
-use     TrigHLTMonitoring       TrigHLTMonitoring-*             Trigger/TrigMonitoring
-use LumiBlockComps          LumiBlockComps-*             LumiBlock
-use PATCore                     PATCore-*                       PhysicsAnalysis/AnalysisCommon
-use xAODTrigger                 xAODTrigger-*                   Event/xAOD
-use xAODEgamma                  xAODEgamma-*                    Event/xAOD
-use xAODTrigEgamma              xAODTrigEgamma-*                Event/xAOD
-use xAODTracking                xAODTracking-*                  Event/xAOD
-use xAODTrigCalo                xAODTrigCalo-*                  Event/xAOD
-use xAODJet                     xAODJet-*                       Event/xAOD
-use xAODCaloEvent               xAODCaloEvent-*                 Event/xAOD
-use ElectronPhotonSelectorTools ElectronPhotonSelectorTools-* PhysicsAnalysis/ElectronPhotonID
-use egammaMVACalib              egammaMVACalib-*                Reconstruction/egamma
-use TrigEgammaMatchingTool      TrigEgammaMatchingTool-*        Trigger/TrigAnalysis/
-use TrigEgammaEmulationTool     TrigEgammaEmulationTool-*       Trigger/TrigAnalysis/
-use xAODEventInfo               xAODEventInfo-*                 Event/xAOD
-use xAODTruth                   xAODTruth-*                     Event/xAOD
-use xAODTrigRinger              xAODTrigRinger-*                Event/xAOD
-#use xAODCaloRings               xAODCaloRings-*                 Event/xAOD
-
-
-# Added for Track Isolation Emulation
-use PATCore                     PATCore-*                       PhysicsAnalysis/AnalysisCommon
-
-private
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  GaudiInterface             GaudiInterface-*                External
-use     AthenaMonitoring        AthenaMonitoring-*              Control
-use StoreGate                   StoreGate-*                     Control
-use TrigConfxAOD                TrigConfxAOD-*                  Trigger/TrigConfiguration
-use AtlasBoost                  AtlasBoost-*                    External
-end_private
-
-apply_pattern declare_joboptions files="test*.py"
-apply_pattern declare_python_modules files="TrigEgamma*.py"
-apply_pattern declare_scripts files="../share/*.sh \
-                                     ../share/trigEgammaDQ.py"
-#apply_pattern generic_declare_for_link kind=binaries files="-s=../macros trigEgammaDQ.py get_trigEgammaDQ.sh" prefix=share/bin
-library TrigEgammaAnalysisTools *.cxx ../Root/*.cxx -s=components *.cxx
-apply_pattern component_library
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaAnalysisToolsConfig.py b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaAnalysisToolsConfig.py
index 61bf006ed56a30164731c675470af43f16a142d2..43ad26ab734849dfde7a8d91a2c6f62455529eb4 100644
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaAnalysisToolsConfig.py
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/python/TrigEgammaAnalysisToolsConfig.py
@@ -190,7 +190,7 @@ TrigEgammaNavTPJpsieeAnalysisTool = ToolFactory(TrigEgammaAnalysisToolsConf.Trig
         OppositeCharge=True,
         doJpsiee=True,
         doEmulation=False,
-        TPTrigger=True,
+        TPTrigger=False,
         OfflineTagMinEt=5,
         RemoveCrack=True,
         TagTriggerList=["e5_tight"],
diff --git a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/get_trigEgammaDQ.sh b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/get_trigEgammaDQ.sh
index c04ac7f09e22fba5fdbc700a57e51cd020e8af94..188c97de752b3f2676c03509a0d2811ce3d95787 100755
--- a/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/get_trigEgammaDQ.sh
+++ b/Trigger/TrigAnalysis/TrigEgammaAnalysisTools/share/get_trigEgammaDQ.sh
@@ -42,13 +42,12 @@ echo $run $data $stream $refrun
 source /afs/cern.ch/project/eos/installation/atlas/etc/setup.sh
 
 BASE=/eos/atlas/atlastier0/rucio/${data}/${stream}/00${run}
-EOSPATH=/afs/cern.ch/project/eos/installation/pro/bin
 echo $BASE 
 #echo eos ls ${BASE} | grep HIST.x
 #echo eos ls ${BASE} | grep HIST.f
 
-DIR1=`$EOSPATH/eos.select ls ${BASE} | grep HIST.x`
-DIR2=`$EOSPATH/eos.select ls ${BASE} | grep HIST.f`
+DIR1=`eos ls ${BASE} | grep HIST.x`
+DIR2=`eos ls ${BASE} | grep HIST.f`
 #DIR1=`eos ls ${BASE} | grep HIST.x`
 #DIR2=`eos ls ${BASE} | grep HIST.f`
 echo "Found $DIR1 $DIR2"
@@ -56,14 +55,14 @@ echo "Found $DIR1 $DIR2"
 if [ -n "$DIR1" ]; then
     echo "TRY $BASE $DIR1"
     echo "${BASE}/${DIR1}" 
-    FILETOCOPY1=`$EOSPATH/eos.select ls ${BASE}/${DIR1} | grep HIST`
+    FILETOCOPY1=`eos ls ${BASE}/${DIR1} | grep HIST`
     echo $FILETOCOPY1
     echo "TEST ${BASE}/${DIR1}/${FILETOCOPY1}"
     xrdcp ${BASE}/${DIR1}/${FILETOCOPY1} .
 else
     echo "TRY $BASE $DIR2"
     echo "${BASE}/${DIR2}" 
-    FILETOCOPY1=`$EOSPATH/eos.select ls ${BASE}/${DIR2} | grep HIST`
+    FILETOCOPY1=`eos ls ${BASE}/${DIR2} | grep HIST`
     echo $FILETOCOPY1
     echo "TEST ${BASE}/${DIR2}/${FILETOCOPY1}"
     xrdcp ${BASE}/${DIR2}/${FILETOCOPY1} .
diff --git a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/cmt/requirements b/Trigger/TrigAnalysis/TrigEgammaEmulationTool/cmt/requirements
deleted file mode 100644
index c3f09424206c934d673d182388effa55591d121e..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaEmulationTool/cmt/requirements
+++ /dev/null
@@ -1,73 +0,0 @@
-package TrigEgammaEmulationTool
-
-public
-use AtlasPolicy                 AtlasPolicy-*                   
-use AsgTools                    AsgTools-*                      Control/AthToolSupport
-use AtlasROOT                   AtlasROOT-*                     External
-
-
-use TrigDecisionTool            TrigDecisionTool-*              Trigger/TrigAnalysis
-use TrigEgammaMatchingTool      TrigEgammaMatchingTool-*        Trigger/TrigAnalysis/
-use TrigConfHLTData             TrigConfHLTData-*               Trigger/TrigConfiguration
-#use TrigNavigation             TrigNavigation-*                Trigger/TrigEvent
-use TrigSteeringEvent           TrigSteeringEvent-*             Trigger/TrigEvent
-use TrigMultiVarHypo            TrigMultiVarHypo-*              Trigger/TrigHypothesis
-#use TrigHLTMonitoring           TrigHLTMonitoring-*             Trigger/TrigMonitoring
-use LumiBlockComps              LumiBlockComps-*                LumiBlock
-use PATCore                     PATCore-*                       PhysicsAnalysis/AnalysisCommon
-
-
-
-use xAODBase                    xAODBase-*                      Event/xAOD
-use xAODTrigger                 xAODTrigger-*                   Event/xAOD
-use xAODEgamma                  xAODEgamma-*                    Event/xAOD
-use xAODTrigEgamma              xAODTrigEgamma-*                Event/xAOD
-use xAODTracking                xAODTracking-*                  Event/xAOD
-use xAODTrigCalo                xAODTrigCalo-*                  Event/xAOD
-use xAODCaloEvent               xAODCaloEvent-*                 Event/xAOD
-use xAODTrigRinger              xAODTrigRinger-*                Event/xAOD
-
-#use xAODCaloRings               xAODCaloRings-*                 Event/xAOD
-#use xAODTruth                   xAODTruth-*                     Event/xAOD
-#use xAODEventInfo               xAODEventInfo-*                 Event/xAOD
-#use xAODJet                     xAODJet-*                       Event/xAOD
-
-#safedeepcopy staff
-#use xAODCore                     xAODCore-*                      Event/xAOD
-
-
-
-use ElectronPhotonSelectorTools ElectronPhotonSelectorTools-*   PhysicsAnalysis/ElectronPhotonID
-#use egammaMVACalib              egammaMVACalib-*                Reconstruction/egamma
-use AtlasCLHEP                  AtlasCLHEP-*            External
-
-# For track isolation emulation
-#use InDetTrackSelectionTool     InDetTrackSelectionTool-*       InnerDetector/InDetRecTools
-#use RecoToolInterfaces          RecoToolInterfaces-*            Reconstruction/RecoTools
-#use xAODPrimitives              xAODPrimitives-*                Event/xAOD
-use AthContainers           AthContainers-*           Control
-
-private
-use TrigEgammaMatchingTool      TrigEgammaMatchingTool-*        Trigger/TrigAnalysis/
-use AthenaBaseComps             AthenaBaseComps-*               Control
-use GaudiInterface              GaudiInterface-*                External
-use AtlasBoost                  AtlasBoost-*                    External
-use StoreGate                   StoreGate-*                     Control
-
-
-end_private
-
-apply_pattern declare_calib files="../data/*.root ../data/*.conf ../data/*.pic.gz"
-
-pattern declare_python_submodule \
-   apply_pattern generic_declare_for_link kind=python_modules files='-s=../python/<submodule>/<subsubmodule> <files>' prefix=python/<package>/<submodule>/<subsubmodule> name=<submodule><subsubmodule> ; \
-   private ; \
-   macro_append <package>_python_init_dependencies " install_<submodule><subsubmodule>python_modules " ; \
-   end_private
-
-apply_pattern declare_joboptions       files="test*.py"
-apply_pattern declare_python_modules   files="TrigEgamma*.py"
-apply_pattern declare_python_submodule files="*.py" submodule=util
-
-library TrigEgammaEmulationTool *.cxx ../Root/*.cxx  -s=components *.cxx
-apply_pattern component_library
diff --git a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/cmt/Makefile.RootCore b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/cmt/Makefile.RootCore
deleted file mode 100644
index 1b71065a3db35c4ec8d9baaab1e8179725429546..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,17 +0,0 @@
-PACKAGE          = TrigEgammaMatchingTool
-PACKAGE_PRELOAD  =
-PACKAGE_CXXFLAGS =
-PACKAGE_OBJFLAGS =
-PACKAGE_LDFLAGS  =
-PACKAGE_BINFLAGS =
-PACKAGE_LIBFLAGS =
-PACKAGE_DEP      = AsgTools xAODRootAccess xAODTrigger xAODEgamma xAODTrigEgamma xAODCaloEvent xAODTrigCalo xAODTracking TrigDecisionTool TrigSteeringEvent
-PACKAGE_TRYDEP   =
-PACKAGE_CLEAN    =
-PACKAGE_NOGRID   =
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 0
-	
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/cmt/requirements b/Trigger/TrigAnalysis/TrigEgammaMatchingTool/cmt/requirements
deleted file mode 100644
index 377f0328456a6abe9051064561d9e3244f6cd7e4..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigEgammaMatchingTool/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package TrigEgammaMatchingTool
-
-author Ryan Mackenzie White <ryan.white@cern.ch>
-public
-use AtlasPolicy                AtlasPolicy-*
-use AsgTools                   AsgTools-*                      Control/AthToolSupport
-use AtlasROOT                   AtlasROOT-*                     External
-
-use TrigDecisionTool            TrigDecisionTool-*              Trigger/TrigAnalysis
-use TrigConfHLTData             TrigConfHLTData-*               Trigger/TrigConfiguration
-use TrigSteeringEvent           TrigSteeringEvent-*             Trigger/TrigEvent
-
-
-use xAODTrigger                 xAODTrigger-*                   Event/xAOD
-use xAODEgamma                  xAODEgamma-*                    Event/xAOD
-use xAODTrigEgamma              xAODTrigEgamma-*                Event/xAOD
-use xAODTracking                xAODTracking-*                  Event/xAOD
-use xAODTrigCalo                xAODTrigCalo-*                  Event/xAOD
-use xAODCaloEvent               xAODCaloEvent-*                 Event/xAOD
-
-private
-use AtlasROOT           AtlasROOT-*             External
-use GaudiInterface      GaudiInterface-*        External
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use xAODTrigger         xAODTrigger-*           Event/xAOD
-use xAODTau                  xAODTau-*                    Event/xAOD
-use xAODMuon                  xAODMuon-*                    Event/xAOD
-end_private
- 
-apply_pattern dual_use_library files="*.cxx ../Root/*.cxx"
-apply_pattern declare_joboptions files=../share/*.py
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/TIDAEvent.h b/Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/TIDAEvent.h
index 6b8eba188db067d13e66d00bcf512bf79263786d..78ade983d972c6f0cbae3514032afdbed07d7551 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/TIDAEvent.h
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysis/TrigInDetAnalysis/TIDAEvent.h
@@ -37,15 +37,15 @@ public:
   virtual ~Event();
 
   /// accessors
-  void run_number(unsigned  r)    { m_run_number     = r; }  
-  void event_number(unsigned e)   { m_event_number   = e; }  
+  void run_number(unsigned  r)              { m_run_number     = r; }  
+  void event_number(unsigned long long e)   { m_event_number   = e; }  
   void lumi_block(unsigned lb)    { m_lumi_block     = lb; }  
   void time_stamp(unsigned t)     { m_time_stamp     = t; }  
   void bunch_crossing_id(unsigned b) { m_bunch_crossing_id = b; }  
 	void mu(double m) { m_mu = m;}
 
-  unsigned run_number()     const { return m_run_number;   } 
-  unsigned event_number()   const { return m_event_number; }  
+  unsigned run_number()               const { return m_run_number;   } 
+  unsigned long long event_number()   const { return m_event_number; }  
   unsigned lumi_block()     const { return m_lumi_block;   }  
   unsigned time_stamp()     const { return m_time_stamp;   }  
   unsigned bunch_crossing_id() const { return m_bunch_crossing_id;  }  
@@ -104,7 +104,7 @@ public:
 private:
  
   unsigned m_run_number; 
-  unsigned m_event_number;  
+  unsigned long long m_event_number;  
   unsigned m_lumi_block;
   unsigned m_time_stamp;
 
@@ -116,7 +116,7 @@ private:
 
   std::vector<TIDA::Vertex> m_vertices;
   
-  ClassDef(TIDA::Event,3)
+  ClassDef(TIDA::Event,4)
 
 };
 
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysis/cmt/requirements b/Trigger/TrigAnalysis/TrigInDetAnalysis/cmt/requirements
deleted file mode 100755
index c295dbe4c072fd3d0bbbbe2ac7cea108a363bef4..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigInDetAnalysis/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package TrigInDetAnalysis
-
-
-# ============================================================================================
-public
-
-use 	AtlasPolicy		AtlasPolicy-*
-# use 	GaudiInterface		GaudiInterface-*		External
-use 	AtlasROOT		AtlasROOT-*			External
-# use   TrigDecisionTool      TrigDecisionTool-*          Trigger/TrigAnalysis
-# use   TrigSteeringEvent     TrigSteeringEvent-*         Trigger/TrigEvent
-# use 	TrigInDetTruthEvent		TrigInDetTruthEvent-*       Trigger/TrigTruthEvent
-# use   AtlasHepMC      AtlasHepMC-*       External
-# use   RoiDescriptor   RoiDescriptor-*     DetectorDescription
-
-# Specify the required ROOT components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS Cint)"
-
-# ============================================================================================
-private
-
-# use TrigInDetEvent TrigInDetEvent-* Trigger/TrigEvent
-# use AtlasReflex  AtlasReflex-*  External -no_auto_imports
-
-# apply_pattern lcgdict dict = TrigInDetAnalysis \
-#	selectionfile=selection.xml \
-#	headerfiles="../TrigInDetAnalysis/TrigInDetAnalysisDict.h"
-
-end_private
-
-# ============================================================================================
-public
-
-
-library TrigInDetAnalysis *.cxx components/*.cxx
-apply_pattern installed_library
-#macro_append TrigInDetAnalysis_dependencies " TrigInDetAnalysisDict "
-#macro_append TrigInDetAnalysis_dependencies " TrigInDetAnalysisDict TrigInDetAnalysissetup.make "
-
-
-apply_pattern have_root_headers root_headers=" TIDARoi.h TIDAEvent.h TIDAChain.h TIDAVertex.h Track.h TIDARoiDescriptor.h  TIDARoiParameters.h TrackTrigObject.h TFileString.h TrigInDetAnalysisLinkDef.h " \
-                                headers_lib="TrigInDetAnalysis" 
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/Analysis_Tier0.h b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/Analysis_Tier0.h
index e6377596ac17b99f0119b98601b58f1e15c9d89f..1201390133350a94b3302c5b798d8633443f8eef 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/Analysis_Tier0.h
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/Analysis_Tier0.h
@@ -183,7 +183,7 @@ class Analysis_Tier0 : public TrackAnalysis {
 
   bool     m_debug;
 
-  unsigned m_eventid;
+  unsigned long long m_eventid;
 
   VtxAnalysis* m_vtxanal;
 
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfig_Tier0.h b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfig_Tier0.h
index 91f91b8791e3390b008d552c608f7a37edaa1770..f95192590be47e6c7cbc044b7609d3dc7dba924a 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfig_Tier0.h
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/TrigInDetAnalysisExample/T_AnalysisConfig_Tier0.h
@@ -366,7 +366,7 @@ protected:
     const xAOD::EventInfo* pEventInfo;
 #endif
     unsigned run_number        = 0;
-    unsigned event_number      = 0;
+    unsigned long long event_number      = 0;
     unsigned lumi_block        = 0;
     unsigned bunch_crossing_id = 0;
     unsigned time_stamp = 0;
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/cmt/requirements b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/cmt/requirements
deleted file mode 100755
index c219f38cd1aa96ba6b164c29b9656fe605362619..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/cmt/requirements
+++ /dev/null
@@ -1,78 +0,0 @@
-package TrigInDetAnalysisExample
-
-# ============================================================================================
-public
-
-# use 	AthenaBaseComps 	AthenaBaseComps-* 		Control
-# use 	GaudiInterface		GaudiInterface-*		External
-# use 	CBNT_Utils		CBNT_Utils-*			Reconstruction
-# use 	Particle		Particle-*			Reconstruction
-# use   TrigNavigation          TrigNavigation-*                Trigger/TrigEvent
-
-use 	AtlasPolicy		AtlasPolicy-*
-
-use 	AtlasROOT            	AtlasROOT-*            		External
-use 	AtlasROOT		AtlasROOT-*			External
-use     InDetBeamSpotService    InDetBeamSpotService-*          InnerDetector/InDetConditions
-use     TrigHLTMonitoring       TrigHLTMonitoring-*             Trigger/TrigMonitoring
-use     TrigInDetAnalysis       TrigInDetAnalysis-*             Trigger/TrigAnalysis
-use     TrigInDetAnalysisUtils  TrigInDetAnalysisUtils-*        Trigger/TrigAnalysis
-use     TrigInDetEvent          TrigInDetEvent-*                Trigger/TrigEvent
-use  	egammaEvent         	egammaEvent-*                   Reconstruction/egamma
-use     muonEvent               muonEvent-*                     Reconstruction/MuonIdentification
-use     tauEvent                tauEvent-*                      Reconstruction
-
-# use   TrigInDetTruthAlgs      TrigInDetTruthAlgs-*            Trigger/TrigAnalysis
-# use   TrigInDetTruthEvent     TrigInDetTruthEvent-*           Trigger/TrigTruthEvent
-# use	AtlasReflex		AtlasReflex-*			External -no_auto_imports
-
-use     AtlasHepMC              AtlasHepMC-*                    External
-use     EventInfo               EventInfo-*             	Event
-use     xAODEventInfo           xAODEventInfo-*             	Event/xAOD
-use 	GeneratorObjects 	GeneratorObjects-* 		Generators
-use     McParticleEvent         McParticleEvent-*               PhysicsAnalysis/TruthParticleID
-
-use     TrigDecisionTool        TrigDecisionTool-*              Trigger/TrigAnalysis
-use 	TrigSteeringEvent       TrigSteeringEvent-*		Trigger/TrigEvent
-use     TrkParticleCreator      TrkParticleCreator-*            Tracking/TrkTools
-use     VxVertex                VxVertex-*                      Tracking/TrkEvent
-
-
-# ============================================================================================
-private
-
-use 	GaudiInterface		GaudiInterface-*		External
-use     AthenaMonitoring        AthenaMonitoring-*              Control
-
-
-use     TrkTrack                   TrkTrack-*                   Tracking/TrkEvent
-use     TrkParameters              TrkParameters-*              Tracking/TrkEvent
-
-# use 	AtlasAnalysisRunTime 	AtlasAnalysisRunTime-*
-# use 	StoreGate           	StoreGate-*                     Control
-# use     TrkTrackSummary		TrkTrackSummary-*               Tracking/TrkEvent
-# use    JetEvent                JetEvent-*                      Reconstruction/Jet
-
-
-# ============================================================================================
-public
-
-#library TrigInDetAnalysisExample *.cxx components/*.cxx
-
-# apply_tag  ROOTBasicLibs
-# apply_tag  ROOTMathLibs
-# apply_tag  ROOTSTLDictLibs
-# apply_tag  ROOTGraphicsLibs
-# apply_tag  ROOTTableLibs
-
-#apply_pattern component_library
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-#private
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-# why isn't there a command line argument to disable checkreq 
-# action checkreq " echo 'disabling checkreq!!' " 
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/AnalysisConfig_Ntuple.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/AnalysisConfig_Ntuple.cxx
index 51a025d38b1805ebe86346fac0775e36872b28ac..cc29c5848ebf34cd342cc3adcdbe80a7913d2518 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/AnalysisConfig_Ntuple.cxx
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisExample/src/AnalysisConfig_Ntuple.cxx
@@ -298,8 +298,8 @@ void AnalysisConfig_Ntuple::loop() {
 	const xAOD::EventInfo* pEventInfo = 0;
 #endif
 
-	unsigned run_number         = 0;
-	unsigned event_number       = 0;
+	unsigned run_number                   = 0;
+	unsigned long long event_number       = 0;
 
 	unsigned lumi_block         = 0;
 	unsigned bunch_crossing_id  = 0;
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/dataset.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/dataset.h
index 1931bd2c425a7cd647433ec5ef849b343b47b5d0..30bee7d459e52b42fb366c0bd1ba9c55b3cd6dc6 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/dataset.h
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/Analysis/src/dataset.h
@@ -36,7 +36,7 @@ public:
     if ( s.find("root://eos")!=std::string::npos ) { 
       /// need to open on eos
       
-      std::string  _cmd = "/afs/cern.ch/project/eos/installation/0.3.84-aquamarine/bin/eos.select ls "+s+"/";
+      std::string  _cmd = "eos ls "+s+"/";
       std::system( (_cmd+" > .eosfiles.log").c_str() );
 
       std::string   cmd = "export EOSFILES=$("+_cmd+")";
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/cmt/requirements b/Trigger/TrigAnalysis/TrigInDetAnalysisUser/cmt/requirements
deleted file mode 100755
index f409aa47914b45dc23270459bfc1c8e491d79265..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUser/cmt/requirements
+++ /dev/null
@@ -1,104 +0,0 @@
-package TrigInDetAnalysisUser
-
-
-# ============================================================================================
-public
-
-use 	AtlasPolicy		  AtlasPolicy-*
-
-# ============================================================================================
-private
-
-use 	AtlasROOT            	  AtlasROOT-*                   External
-use     TrigInDetAnalysis         TrigInDetAnalysis-*           Trigger/TrigAnalysis
-use     TrigInDetAnalysisUtils    TrigInDetAnalysisUtils-*      Trigger/TrigAnalysis
-use     TrigInDetAnalysisExample  TrigInDetAnalysisExample-*    Trigger/TrigAnalysis
-
-# ============================================================================================
-public
-
-# Specify the required ROOT components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS Graf Gpad)"
-
-# Inform cmake that this package has private header files (transparent to CMT)
-apply_pattern cmake_add_command command="include_directories(Resplot/src Readcards/src)"
-
-library Resplot   " ../Resplot/src/Resplot.cxx       ../Resplot/src/generate.cxx    ../Resplot/src/rmsFrac.cxx" "
-apply_pattern have_root_headers root_headers="../Resplot/src/Resplot.h" headers_lib="Resplot"
-
-library Readcards " ../Readcards/src/IReadCards.cxx  ../Readcards/src/ReadCards.cxx ../Readcards/src/Value.cxx ../Readcards/src/utils.cxx"
-macro_append Readcards_cppflags    "-D_DIR_=$(shell pwd)/../Analysis/run "
-
-# Extend the files in the TIDA library in order to satisfy the unresolved references
-apply_pattern cmake_add_generated_files library=TIDA files=Analysis/src/rmain.cxx
-
-library TIDA          " ../Analysis/src/ConfAnalysis.cxx ../Analysis/src/ConfVtxAnalysis.cxx ../Analysis/src/PurityAnalysis.cxx"
-library TIDAcomputils " ../Analysis/src/computils.cxx"
-
-
-macro_append TIDA_cppflags           " -I../Readcards/src -I../Resplot/src "
-macro_append TIDAcomputils_cppflags  " -I../Readcards/src -I../Resplot/src "
-
-application  TIDAreader          "../Analysis/src/reader.cxx
-macro_append TIDAreader_cppflags " -I../Readcards/src"
-
-application  TIDArdict               "../Analysis/src/rmain.cxx ../Analysis/src/computils.cxx 
-macro_append TIDArdict_cppflags      " -I../Resplot/src -I../Readcards/src "
-macro_append TIDArdictlinkopts       " -lResplot -lReadcards -lTIDA -lXrdPosix "
-macro_append TIDArdict_dependencies  " Resplot Readcards TIDA "
-
-application  TIDAcomparitor               "../Analysis/src/comparitor.cxx ../Analysis/src/AtlasStyle.cxx ../Analysis/src/AtlasLabels.cxx"
-macro_append TIDAcomparitor_cppflags      " -I../Resplot/src -I../Readcards/src"
-macro_append TIDAcomparitorlinkopts       " -lResplot -lReadcards -lTIDA  -lTIDAcomputils "
-macro_append TIDAcomparitor_dependencies  " Resplot Readcards TIDA TIDAcomputils"
-
-application  TIDAcpucost               "../Analysis/src/cpucost.cxx "
-macro_append TIDAcpucost_cppflags      " -I../Readcards/src"
-macro_append TIDAcpucostlinkopts       " -lReadcards -lTIDA   -lTIDAcomputils "
-macro_append TIDAcpucost_dependencies  " Readcards TIDA TIDAcomputils"
-
-application  TIDAchains   "../Analysis/src/chains.cxx"
-
-application  TIDAskim          "../Analysis/src/skim.cxx"
-macro_append TIDAskim_cppflags " -I../Readcards/src"
-
-application  TIDAfastadd   "../Analysis/src/fastadd.cxx"
-
-application  TIDArefit  "../Analysis/src/refit.cxx"
-macro_append TIDArefit_cppflags      " -I../Resplot/src "
-macro_append TIDArefitlinkopts       " -lResplot  -lTIDA"
-macro_append TIDArefit_dependencies  " Resplot TIDA "
-
-application  TIDAlistroot  "../Analysis/src/listroot.cxx"
-macro_append TIDAlistroot_cppflags      " -I../Readcards/src "
-macro_append TIDAlistrootlinkopts       " -lReadcards "
-macro_append TIDAlistroot_dependencies  " Readcards " 
-
-application  TIDAruntool  "../Analysis/src/runtool.cxx ../Analysis/src/computils.cxx ""
-macro_append TIDAruntool_cppflags      " -I../Readcards/src "
-macro_append TIDArunntoollinkopts       " -lReadcards "
-macro_append TIDAruntool_dependencies  " Readcards " 
-
-# macro_append TIDAlistrootlinkopts       " -lResplot  -lTIDA"
-# macro_append TIDAlistroot_dependencies  " Resplot TIDA "
-
-application  TIDAsb  "../Analysis/src/chainparser.cxx"
-macro_append TIDAsb_cppflags      " -I../Readcards/src "
-macro_append TIDAsblinkopts       " -lReadcards"
-macro_append TIDAsb_dependencies  " Readcards "
-
-
-
-
-application  TIDAmakeSmallRefFile       "../Analysis/src/makeSmallRefFile.cxx "
-macro_append TIDAmakeSmallRefFile_cppflags     " "
-macro_append TIDAmakeSmallRefFilelinkopts      " "
-macro_append TIDAmakeSmallRefFile_dependencies " "
-
-apply_pattern declare_scripts files="../scripts/TIDA*.sh"
-
-apply_pattern declare_runtime extras="../share/TIDA*.dat ../share/TIDA*.py ../share/Test_*.dat"
-
-
-
-
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/CMakeLists.txt b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/CMakeLists.txt
index 5c88320763d996907060ae6d8eda0ad798598968..398dedf0996e7d5d1f9d8b9af090eaf659a0970c 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/CMakeLists.txt
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/CMakeLists.txt
@@ -14,9 +14,9 @@ atlas_depends_on_subdirs( PUBLIC
                           Reconstruction/MuonIdentification/muonEvent
                           Reconstruction/egamma/egammaEvent
                           Reconstruction/tauEvent
-			  xAOD/xAODMuon
-			  xAOD/xAODEgamma
-			  xAOD/xAODTau
+			  Event/xAOD/xAODMuon
+			  Event/xAOD/xAODEgamma
+			  Event/xAOD/xAODTau
                           Tracking/TrkEvent/TrkParameters
                           Tracking/TrkEvent/TrkTrack
                           Tracking/TrkEvent/TrkTrackSummary
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/Converter.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/Converter.h
index 7fd6ad79d44772bd0df32872f0b903d4964476b7..a6c4db1dfb255ca7af554896761d2d53ce01b34f 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/Converter.h
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/Converter.h
@@ -129,13 +129,13 @@ class Converter {
       // 2 "hits" and an offline SCT "hit" is really a 1D cluster, so two intersetcting
       // stereo clusters making a spacepoint are two "hits"
       const Trk::TrackSummary *summary = (*trackitr)->trackSummary();
-      int nBlayerHits = 2*summary->get(Trk::numberOfBLayerHits); 
+      int nBlayerHits = 2*summary->get(Trk::numberOfInnermostPixelLayerHits);
       int nPixelHits  = 2*summary->get(Trk::numberOfPixelHits);  
       int nSctHits    = summary->get(Trk::numberOfSCTHits); 
       int nStrawHits  = summary->get(Trk::numberOfTRTHits);
       int nTrHits     = summary->get(Trk::numberOfTRTHighThresholdHits);
       int nSiHits     = nPixelHits + nSctHits;
-      bool expectBL   = summary->get(Trk::expectBLayerHit);
+      bool expectBL   = summary->get(Trk::expectInnermostPixelLayerHit);
 
       const Trk::FitQuality *quality   = (*trackitr)->fitQuality();
       double chi2 = quality->chiSquared();
@@ -201,7 +201,7 @@ class Converter {
       // 2 "hits" and an offline SCT "hit" is really a 1D cluster, so two intersetcting
       // stereo clusters making a spacepoint are two "hits"
       const Trk::TrackSummary *summary = trackitr->trackSummary();
-      int nBlayerHits = 2*summary->get(Trk::numberOfBLayerHits); 
+      int nBlayerHits = 2*summary->get(Trk::numberOfInnermostPixelLayerHits);
       int nPixelHits  = 2*summary->get(Trk::numberOfPixelHits);  
       int nSctHits    = summary->get(Trk::numberOfSCTHits); 
       int nStrawHits  = summary->get(Trk::numberOfTRTHits);
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/T_AnalysisConfig.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/T_AnalysisConfig.h
index 42c4bd394c909b7387aaa702f713f3b1d173824e..3bae5e85a48bea9a8525a1a34a15b26b40aa4283 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/T_AnalysisConfig.h
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/T_AnalysisConfig.h
@@ -83,6 +83,9 @@ public:
     m_associator(associator),
     m_analysis(analysis),
     m_mcTruth(false),
+    m_beamX(0),
+    m_beamY(0),
+    m_beamZ(0),
     m_genericFlag(true),
     m_releaseData(""),
     m_keepAllEvents(false),
@@ -147,6 +150,8 @@ public:
     m_genericFlag(true),
     m_releaseData(""),
     m_keepAllEvents(false),
+    m_useHighestPT(false),
+    m_vtxIndex(-1),
     m_filterOnRoi(true),
     m_requireDecision(false)
   {
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector_old.h b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector_old.h
index d8c39f824803f79ef783bb3b1f263594e9c93a9a..4c99b2d80066a0c68fd836b7974a0471ec75a03b 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector_old.h
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/TrigInDetAnalysisUtils/TrigTrackSelector_old.h
@@ -191,14 +191,14 @@ public:
       // 2 "hits" and an offline SCT "hit" is really a 1D cluster, so two intersetcting
       // stereo clusters making a spacepoint are two "hits"
       const Trk::TrackSummary *summary = track->trackSummary();
-      int nBlayerHits = 2*summary->get(Trk::numberOfBLayerHits); 
+      int nBlayerHits = 2*summary->get(Trk::numberOfInnermostPixelLayerHits);
       int nPixelHits  = 2*summary->get(Trk::numberOfPixelHits);  
       int nSctHits    = summary->get(Trk::numberOfSCTHits); 
       int nStrawHits  = summary->get(Trk::numberOfTRTHits);
       int nTrHits     = summary->get(Trk::numberOfTRTHighThresholdHits);
 
       int nSiHits     = nPixelHits + nSctHits;
-      bool expectBL   = summary->get(Trk:: expectBLayerHit);
+      bool expectBL   = summary->get(Trk:: expectInnermostPixelLayerHit);
 
       const Trk::FitQuality *quality   = track->fitQuality();
       double chi2 = quality->chiSquared();
@@ -619,13 +619,13 @@ public:
             std::cout << "Could not create TrackSummary  - Track will likely fail hits requirements" << std::endl;
 	}    
 	else{      
-            nBlayerHits = 2*summary->get(Trk::numberOfBLayerHits); 
+            nBlayerHits = 2*summary->get(Trk::numberOfInnermostPixelLayerHits);
             nPixelHits  = 2*summary->get(Trk::numberOfPixelHits);  
 	    nSctHits    = summary->get(Trk::numberOfSCTHits); 
             nStrawHits  = summary->get(Trk::numberOfTRTHits);
             nTrHits     = summary->get(Trk::numberOfTRTHighThresholdHits);
 	    nSiHits     = nPixelHits + nSctHits;
-	    expectBL    = summary->get(Trk::expectBLayerHit);
+	    expectBL    = summary->get(Trk::expectInnermostPixelLayerHit);
 	    for ( int ih=0 ; ih<20 ; ih++ ) {
 	      if ( summary->isHit(Trk::DetectorType(ih)) ) bitmap |= ( 1<<hpmap[ih] ); 	
 	    }
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/cmt/requirements b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/cmt/requirements
deleted file mode 100755
index 2f9d4079fe12c7a71a89e33899f74c21a12d6b4e..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/cmt/requirements
+++ /dev/null
@@ -1,58 +0,0 @@
-package TrigInDetAnalysisUtils
-
-
-# ============================================================================================
-public
-
-use 	AtlasPolicy		AtlasPolicy-*
-use 	AtlasROOT            	AtlasROOT-*            		External
-use 	GaudiInterface		GaudiInterface-*		External
-
-use     AtlasHepMC              AtlasHepMC-*                    External
-use     McParticleEvent         McParticleEvent-*               PhysicsAnalysis/TruthParticleID
-
-use 	StoreGate           	StoreGate-*                     Control
-use 	Particle		Particle-*			Reconstruction
-
-use  	egammaEvent         	egammaEvent-*                   Reconstruction/egamma
-use 	muonEvent		muonEvent-*			Reconstruction/MuonIdentification
-use     tauEvent                tauEvent-*                      Reconstruction
-
-use  	xAODEgamma         	xAODEgamma-*                    Event/xAOD
-use 	xAODMuon		xAODMuon-*			Event/xAOD
-use     xAODTau                 xAODTau-*                       Event/xAOD
-
-use     TrigDecisionTool        TrigDecisionTool-*              Trigger/TrigAnalysis
-use     TrkParticleCreator      TrkParticleCreator-*            Tracking/TrkTools   
-
-use     TrigInDetAnalysis       TrigInDetAnalysis-*             Trigger/TrigAnalysis
-
-use 	TrigInDetEvent		TrigInDetEvent-*                Trigger/TrigEvent
-use     TrigInDetTruthEvent     TrigInDetTruthEvent-*           Trigger/TrigTruthEvent
-
-use     TrigSteeringEvent       TrigSteeringEvent-*		Trigger/TrigEvent
-use     TrkParameters           TrkParameters-*                 Tracking/TrkEvent
-use     TrkTrack                TrkTrack-*                      Tracking/TrkEvent
-use     TrkTrackSummary         TrkTrackSummary-*               Tracking/TrkEvent
-use     TrkToolInterfaces       TrkToolInterfaces-*		Tracking/TrkTools
-
-
-# ============================================================================================
-private
-
-# use 	AtlasAnalysisRunTime 	AtlasAnalysisRunTime-*
-# use   AthenaMonitoring        AthenaMonitoring-*              Control
-
-
-# ============================================================================================
-public
-
-library TrigInDetAnalysisUtils *.cxx 
-
-# apply_tag  ROOTBasicLibs
-# apply_tag  ROOTMathLibs
-# apply_tag  ROOTSTLDictLibs
-# apply_tag  ROOTGraphicsLibs
-# apply_tag  ROOTTableLibs
-
-apply_pattern installed_library
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/OfflineObjectSelection.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/OfflineObjectSelection.cxx
index 46584edd2af28fbee6678ec045aec866e27d634f..ca65fd3c64f3973a204e521562019b5b084bd70d 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/OfflineObjectSelection.cxx
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/OfflineObjectSelection.cxx
@@ -110,9 +110,9 @@ bool TIDA::isGoodOffline(const Analysis::Muon& muon) {
     /// maybe select all these track based quantitied om the TIDA::Track, so we dont 
     /// have to fuss with is it xAOD/is it not xAOD etc
     // B-Layer hits
-    int numberOfBLayerHits = summary->get(Trk::numberOfBLayerHits);
-    bool expectBLayerHit = summary->get(Trk::expectBLayerHit);
-    if (expectBLayerHit && numberOfBLayerHits<1) return false;
+    int numberOfInnermostPixelLayerHits = summary->get(Trk::numberOfInnermostPixelLayerHits);
+    bool expectInnermostPixelLayerHit = summary->get(Trk::expectInnermostPixelLayerHit);
+    if (expectInnermostPixelLayerHit && numberOfInnermostPixelLayerHits<1) return false;
     
     // Pix hits
     int nPixelHits = summary->get(Trk::numberOfPixelHits);
diff --git a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TrigTrackSelector.cxx b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TrigTrackSelector.cxx
index e8d75e75fcdec365d01693ed9cd014730a391a66..69ccfa1aa46507a139251954f3698dffa6e4bbb1 100644
--- a/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TrigTrackSelector.cxx
+++ b/Trigger/TrigAnalysis/TrigInDetAnalysisUtils/src/TrigTrackSelector.cxx
@@ -162,14 +162,14 @@ void TrigTrackSelector::selectTrack( const Rec::TrackParticle* track ) {
       // 2 "hits" and an offline SCT "hit" is really a 1D cluster, so two intersetcting
       // stereo clusters making a spacepoint are two "hits"
       const Trk::TrackSummary *summary = track->trackSummary();
-      int nBlayerHits = 2*summary->get(Trk::numberOfBLayerHits); 
+      int nBlayerHits = 2*summary->get(Trk::numberOfInnermostPixelLayerHits);
       int nPixelHits  = 2*summary->get(Trk::numberOfPixelHits);  
       int nSctHits    = summary->get(Trk::numberOfSCTHits); 
       int nStrawHits  = summary->get(Trk::numberOfTRTHits);
       int nTrHits     = summary->get(Trk::numberOfTRTHighThresholdHits);
 
       int nSiHits     = nPixelHits + nSctHits;
-      bool expectBL   = summary->get(Trk:: expectBLayerHit);
+      bool expectBL   = summary->get(Trk:: expectInnermostPixelLayerHit);
 
       const Trk::FitQuality *quality   = track->fitQuality();
       double chi2 = quality->chiSquared();
@@ -612,13 +612,13 @@ void TrigTrackSelector::selectTrack( const Trk::Track* track ) {
             std::cerr << "Could not create TrackSummary  - Track will likely fail hits requirements" << std::endl;
 	}    
 	else{      
-            nBlayerHits = 2*summary->get(Trk::numberOfBLayerHits); 
+            nBlayerHits = 2*summary->get(Trk::numberOfInnermostPixelLayerHits);
             nPixelHits  = 2*summary->get(Trk::numberOfPixelHits);  
 	    nSctHits    = summary->get(Trk::numberOfSCTHits); 
             nStrawHits  = summary->get(Trk::numberOfTRTHits);
             nTrHits     = summary->get(Trk::numberOfTRTHighThresholdHits);
 	    nSiHits     = nPixelHits + nSctHits;
-	    expectBL    = summary->get(Trk::expectBLayerHit);
+	    expectBL    = summary->get(Trk::expectInnermostPixelLayerHit);
 	    for ( int ih=0 ; ih<20 ; ih++ ) {
 	      if ( summary->isHit(Trk::DetectorType(ih)) ) bitmap |= ( 1<<hpmap[ih] ); 	
 	    }
@@ -752,7 +752,7 @@ void TrigTrackSelector::selectTrack( const xAOD::TrackParticle* track, void* ) {
       // stereo clusters making a spacepoint are two "hits"
       
       uint8_t sum_nBlayerHits = 0;
-      track->summaryValue( sum_nBlayerHits, xAOD::numberOfBLayerHits);
+      track->summaryValue( sum_nBlayerHits, xAOD::numberOfInnermostPixelLayerHits);
       int nBlayerHits = 2*sum_nBlayerHits;
       
       uint8_t  sum_nPixelHits = 0;
@@ -773,7 +773,7 @@ void TrigTrackSelector::selectTrack( const xAOD::TrackParticle* track, void* ) {
       
 
       uint8_t sum_expectBL  = 0;
-      track->summaryValue( sum_expectBL, xAOD::expectBLayerHit);
+      track->summaryValue( sum_expectBL, xAOD::expectInnermostPixelLayerHit);
 
       bool expectBL = ( sum_expectBL ? true : false );
 
diff --git a/Trigger/TrigAnalysis/TrigInDetTruthAlgs/cmt/requirements b/Trigger/TrigAnalysis/TrigInDetTruthAlgs/cmt/requirements
deleted file mode 100644
index bc7a20ad643bd163ae87b22da77461c9f6f0dd41..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigInDetTruthAlgs/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-package TrigInDetTruthAlgs
-
-author Ricardo Goncalo <r.goncalo@rhul.ac.uk>
-
-use AtlasPolicy             AtlasPolicy-*
-use TrigInDetEvent          TrigInDetEvent-*       Trigger/TrigEvent
-
-
-private
-use AthenaBaseComps         AthenaBaseComps-*      Control
-use GaudiInterface          GaudiInterface-*       External
-use AtlasHepMC              AtlasHepMC-*           External
-use GenzModuleEvent         GenzModuleEvent-*      Generators
-
-use InDetIdentifier         InDetIdentifier-*   InnerDetector/InDetDetDescr
-
-use InDetSimData            InDetSimData-*            InnerDetector/InDetRawEvent
-use InDetPrepRawData        InDetPrepRawData-*        InnerDetector/InDetRecEvent 
-use TrigInDetTruthEvent     TrigInDetTruthEvent-*     Trigger/TrigTruthEvent
-use TrigInDetToolInterfaces TrigInDetToolInterfaces-* Trigger/TrigTools
-# offline track-truth association edm
-use TrkTruthData            TrkTruthData-*         Tracking/TrkEvent
-
-public
-library TrigInDetTruthAlgs *.cxx components/*.cxx
-apply_pattern component_library
-
-
-# declare job options file(s)
-apply_pattern declare_joboptions files="jobOfragment*.py"
-
-# declare python module (configurables)
-apply_pattern declare_python_modules files="__init__.py TrigInDetTruthAlgsConfig.py"
-
diff --git a/Trigger/TrigAnalysis/TrigInDetTruthAlgs/doc/packagedoc.h b/Trigger/TrigAnalysis/TrigInDetTruthAlgs/doc/packagedoc.h
index 5e40324259255df6c4b6043a78585e17117e54c5..8d135cf3e251bf6668153b7480871fbd2f6babde 100644
--- a/Trigger/TrigAnalysis/TrigInDetTruthAlgs/doc/packagedoc.h
+++ b/Trigger/TrigAnalysis/TrigInDetTruthAlgs/doc/packagedoc.h
@@ -19,15 +19,5 @@ fills a TrigInDetTrackTruthMap with them.
 
 @section TrigInDetTruthAlgs_extras_TrigInDetTruthAlgs Extra Pages
 
-  - @ref used_TrigInDetTruthAlgs
-  - @ref requirements_TrigInDetTruthAlgs
 
 */
-
-/**
-@page used_TrigInDetTruthAlgs Used Packages
-*/
-
-/**
-@page requirements_TrigInDetTruthAlgs Requirements
-*/
diff --git a/Trigger/TrigAnalysis/TrigJiveXML/cmt/requirements b/Trigger/TrigAnalysis/TrigJiveXML/cmt/requirements
deleted file mode 100755
index d1e19cc6aa51f795c6ae556f6984f3bced50c27c..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigJiveXML/cmt/requirements
+++ /dev/null
@@ -1,35 +0,0 @@
-package TrigJiveXML
-
-use AtlasPolicy           AtlasPolicy-* 
-
-use JiveXML               JiveXML-*                  graphics
-
-private
-
-use InDetIdentifier       InDetIdentifier-*       InnerDetector/InDetDetDescr
-use InDetReadoutGeometry  InDetReadoutGeometry-*  InnerDetector/InDetDetDescr
-use InDetPrepRawData      InDetPrepRawData-*      InnerDetector/InDetRecEvent	
-use AnalysisTriggerEvent  AnalysisTriggerEvent-*  PhysicsAnalysis/AnalysisTrigger
-use TrigInDetEvent        TrigInDetEvent-*        Trigger/TrigEvent
-use TrigT1CaloEvent       TrigT1CaloEvent-*          Trigger/TrigT1
-#use TrigSteering        TrigSteering-*          Trigger/TrigSteer
-use TrigSteeringEvent   TrigSteeringEvent-*     Trigger/TrigEvent
-use TrigT1Interfaces      TrigT1Interfaces-*      Trigger/TrigT1
-
-use xAODTrigger           xAODTrigger-*           Event/xAOD
-use xAODTrigL1Calo        xAODTrigL1Calo-*        Event/xAOD
-
-use EventInfo             EventInfo-*             Event
-use GaudiInterface        GaudiInterface-*        External
-use AtlasCLHEP            AtlasCLHEP-*            External
-
-public
-
-use TrkPrepRawData        TrkPrepRawData-*        Tracking/TrkEvent
-use TrigDecisionTool      TrigDecisionTool-*      Trigger/TrigAnalysis
-use AthenaBaseComps       AthenaBaseComps-*       Control
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern component_library
-library TrigJiveXML *.cxx components/*.cxx
-
diff --git a/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/cmt/requirements b/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/cmt/requirements
deleted file mode 100644
index 25b55c4165be47dc607d3a349ff945fe4199c305..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonCoinHierarchy/cmt/requirements
+++ /dev/null
@@ -1,33 +0,0 @@
-package TrigMuonCoinHierarchy
-
-author Susumu Oda <Susumu.Oda@cern.ch>
-
-public
-use AnalysisTriggerEvent	AnalysisTriggerEvent-*		PhysicsAnalysis/AnalysisTrigger
-use AthenaBaseComps		AthenaBaseComps-*		Control
-use AtlasPolicy			AtlasPolicy-*			
-use GaudiInterface		GaudiInterface-*		External
-use MuonPrepRawData		MuonPrepRawData-*		MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use MuonRDO                     MuonRDO-*                       MuonSpectrometer 
-use MuonTrigCoinData		MuonTrigCoinData-*		MuonSpectrometer/MuonReconstruction/MuonRecEvent
-
-private
-use AtlasROOT        		AtlasROOT-*        		External
-use EventInfo        		EventInfo-*        		Event
-use muonEvent                   muonEvent-*                     Reconstruction/MuonIdentification
-use MuonIdHelpers		MuonIdHelpers-*			MuonSpectrometer
-use MuonReadoutGeometry         MuonReadoutGeometry-*           MuonSpectrometer/MuonDetDescr
-use PathResolver        	PathResolver-*          	Tools
-use TGCcablingInterface		TGCcablingInterface-* 		MuonSpectrometer/MuonCablings 
-use TrigT1Result		TrigT1Result-*			Trigger/TrigT1
-use TrkCompetingRIOsOnTrack 	TrkCompetingRIOsOnTrack-*    	Tracking/TrkEvent
-use TrkEventUtils		TrkEventUtils-*			Tracking/TrkEvent
-use TrkTrack			TrkTrack-*			Tracking/TrkEvent
-use TrkRIO_OnTrack		TrkRIO_OnTrack-*		Tracking/TrkEvent
-
-public 
-#library TrigMuonCoinHierarchy *.cxx components/*.cxx 
-#apply_pattern component_library
-apply_pattern dual_use_library files="*.cxx"
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_runtime files="mask2/*.txt"
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/00ReadMe b/Trigger/TrigAnalysis/TrigMuonEfficiency/00ReadMe
deleted file mode 100644
index abb2670498e8a4818fe25881477ef14eadad4edd..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/00ReadMe
+++ /dev/null
@@ -1 +0,0 @@
-*see https://twiki.cern.ch/twiki/bin/viewauth/Atlas/TrigMuonEfficiency
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/ElectronHypothesis.cxx b/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/ElectronHypothesis.cxx
deleted file mode 100644
index 7a1f0820011ff83271452e20f984641c4fcd2dbe..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/ElectronHypothesis.cxx
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @author Takashi Matsushita
- */
-
-#include "TrigMuonEfficiency/ElectronThresholds.h"
-#include <iostream>
-#include <cmath>
-
-
-
-bool
-ElectronHypothesis::EF_isPassed(const float et,
-                                const std::string& chain)
-{
-  const double threshold = getThresholds(chain);
-  if (not threshold) {
-    std::cerr << "ElectronHypothesis\t" << "ERROR\t"
-              << "Cannot get thresholds for chain " << chain
-              << ". Please check ElectronThresholds.h(or Electronhypothesis::getThresholds)" << std::endl;
-    return false;
-  }
-  return EF_isPassed(et, threshold);
-}
-
-
-bool
-ElectronHypothesis::EF_isPassed(const float et,
-                                const double threshold)
-{
-  std::cout << "DEBUG: EF_isPassed: " << (threshold <= et) << " " << threshold << " " << et << "\n";
-  return threshold <= et;
-}
-
-
-double
-ElectronHypothesis::getThresholds(const std::string& chain)
-{
-  EF_thresholdMap::const_iterator cit;
-  const EF_thresholdMap *thresholds = &ElectronHypoThresholds::ef_el_map;
-
-  if (chain.find("EF_e7") != std::string::npos) {
-    if (thresholds->count("7GeV")) return thresholds->find("7GeV")->second;
-
-  } else if (chain.find("EF_e12") != std::string::npos) {
-    if (thresholds->count("12GeV")) return thresholds->find("12GeV")->second;
-
-  } else if (chain.find("EF_e24") != std::string::npos) {
-    if (thresholds->count("24GeV")) return thresholds->find("24GeV")->second;
-
-  } else {
-    std::cerr << "ElectronHypothesis\t" << "ERROR\t"
-              << "Cannot get thresholds. " << chain << " is not defined in getThresholds()" << std::endl;
-  }
-
-  return 0.;
-}
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/ElectronTriggerMatching.cxx b/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/ElectronTriggerMatching.cxx
deleted file mode 100644
index 0eaccc54807fe1740f6dded15a512aacbe7bfc05..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/ElectronTriggerMatching.cxx
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/*=================================================================* 
- * Implementation of ElectronTriggerMatching
- *=================================================================*/
-#include "TrigMuonEfficiency/ChainEntry.h"
-#include "TrigMuonEfficiency/ElectronTriggerMatching.h"
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <TMath.h>
-#include <cmath>
-
-/*=================================================================* 
- * public methods
- *=================================================================*/
-bool
-ElectronTriggerMatching::match(const double eta,
-                               const double phi,
-                               const std::string& chain)
-{
-  EFelectron efelectron, dummy;
-  matchedTrackDetail(efelectron, dummy, eta, phi, chain);
-  return efelectron.valid;
-}
-
-
-
-bool
-ElectronTriggerMatching::matchDielectron(const TLorentzVector& electron1,
-                                         const TLorentzVector& electron2,
-                                         const std::string& chain,
-                                         bool& result1,
-                                         bool& result2)
-{
-  DielectronChainInfo chainInfo(chain);
-  if (not decodeDielectronChain(chainInfo)) {
-    std::cerr << "ElectronTriggerMatching\t" << "ERROR\t"
-              << "Failed to decode chain(" << chain
-              << "matchDielectron can accept only chains named EF_2eXX_YY." << std::endl;
-              return false;
-  }
-
-  if (not chainInfo.isSymmetric) {
-    std::cerr << "ElectronTriggerMatching\t" << "ERROR\t"
-              << "use matchDielectron with different signature" << std::endl;
-              return false;
-  }
-
-  std::pair<bool, bool> rc;
-  rc = matchDielectron(electron1, electron2, chainInfo);
-
-  result1 = rc.first;
-  result2 = rc.second;
-
-  return true;
-}
-
-
-
-bool
-ElectronTriggerMatching::matchDielectron(const TLorentzVector& electron1,
-                                         const TLorentzVector& electron2,
-                                         const std::string& chain,
-                                         std::pair<bool, bool>& result1,
-                                         std::pair<bool, bool>& result2)
-{
-  DielectronChainInfo chainInfo(chain);
-  if (not decodeDielectronChain(chainInfo)) {
-    std::cerr << "ElectronTriggerMatching\t" << "ERROR\t"
-              << "Failed to decode chain(" << chain
-              << "matchDielectron can accept only chains named EF_2eXX[_YY] or EF_eWW_XX_eYY_ZZ." << std::endl;
-    return false;
-  }
-
-  std::pair<bool, bool> rc12, rc21;
-  rc12 = matchDielectron(electron1, electron2, chainInfo);
-  if (chainInfo.isSymmetric) {
-    rc21.first = rc12.second; rc21.second = rc12.first;
-  } else {
-    rc21 = matchDielectron(electron2, electron1, chainInfo);
-  }
-
-  result1.first = rc12.first; result1.second = rc21.second;
-  result2.first = rc21.first; result2.second = rc12.second;
-
-  return true;
-}
-
-
-
-bool
-ElectronTriggerMatching::matchElectronMuon(const TLorentzVector& electron,
-                                           const TLorentzVector& muon,
-                                           const std::string& chain)
-{
-
-  std::string muonChain;
-  if (not decodeElectronMuonChain(chain, muonChain)) {
-    std::cerr << "ElectronTriggerMatching\t" << "ERROR\t"
-              << "Failed to decode chain(" << chain
-              << "matchElectronMuon can accept only chains named EF_eXX_muYY." << std::endl;
-              return false;
-  }
-
-  EFelectron efElectron, efElectronDummy;
-  EFmuon efMuon, efMuonDummy;
-  double dR_electron = m_matchingDr;
-  double dR_muon = m_matchingDr;
-
-  const int chainIndex = getChainIndex(chain);
-  if (chainIndex < 0) return false;
-
-  const std::vector<int> RoIIndex = m_d3pd->trig_Nav_chain_RoIIndex->at(chainIndex);
-  const std::vector<int> RoIType = m_d3pd->trig_Nav_chain_RoIType->at(chainIndex);
-
-  for (size_t iRoI = 0; iRoI < RoIIndex.size(); ++iRoI) {
-    if (RoIType.at(iRoI) == ChainEntry::kRoIType_EF_e) {
-      const int index = RoIIndex.at(iRoI);
-      const std::vector<int>& container = m_d3pd->trig_RoI_EF_e_egammaContainer_egamma_Electrons->at(index);
-      const std::vector<int>& status = m_d3pd->trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus->at(index);
-
-      double dr = LeptonTriggerMatching::matchedTrackDetail(efElectron, efElectronDummy, electron.Eta(), electron.Phi(), container, status);
-      if (dr < dR_electron) dR_electron = dr;
-
-    } else if (RoIType.at(iRoI) == ChainEntry::kRoIType_EF_mu) {
-      efMuon.roi_index = RoIIndex.at(iRoI);
-      const std::vector<int>& container = m_d3pd->trig_RoI_EF_mu_TrigMuonEFInfoContainer->at(efMuon.roi_index);
-      const std::vector<int>& status = m_d3pd->trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus->at(efMuon.roi_index);
-
-      double dr = LeptonTriggerMatching::matchedTrackDetail(efMuon, efMuonDummy, muonChain, muon.Eta(), muon.Phi(), container, status);
-      if (dr < dR_muon) dR_muon = dr;
-    }
-  }
-
-  if ((dR_electron < m_matchingDr) and (dR_muon < m_matchingDr)) return true;
-
-  return false; 
-}
-
-
-
-/*=================================================================* 
- * private methods
- *=================================================================*/
-double
-ElectronTriggerMatching::matchedTrackDetail(EFelectron& efElectronId,
-                                            const EFelectron& usedEfElectronId,
-                                            const double eta,
-                                            const double phi,
-                                            const std::string& chainForEventTrigger,
-                                            const std::string& threshold)
-{
-  efElectronId.valid = false;
-  double dR_min = m_matchingDr;
-
-  const int chainIndex = getChainIndex(chainForEventTrigger);
-  if (chainIndex < 0) return false;
-
-  const std::vector<int> RoIIndex = m_d3pd->trig_Nav_chain_RoIIndex->at(chainIndex);
-  const std::vector<int> RoIType = m_d3pd->trig_Nav_chain_RoIType->at(chainIndex);
-
-  efElectronId.threshold = threshold;
-  efElectronId.useThreshold = (not threshold.empty());
-  if (efElectronId.useThreshold and m_d3pd->trig_EF_el_Et == 0) {
-    std::cout << "ERROR: threshold cut requested but trig_EF_el_Et == 0" << std::endl;
-    throw "NotImplementedError";
-  }
-
-  for (size_t iRoI = 0; iRoI < RoIIndex.size(); ++iRoI) {
-    if (RoIType.at(iRoI) != ChainEntry::kRoIType_EF_e) continue;
-
-    efElectronId.roi_index = RoIIndex.at(iRoI);
-    if (usedEfElectronId.valid) {
-      if (isEqual(usedEfElectronId.roi_index, efElectronId.roi_index)) continue;
-    }
-
-    const std::vector<int> container = m_d3pd->trig_RoI_EF_e_egammaContainer_egamma_Electrons->at(efElectronId.roi_index);
-    const std::vector<int> status = m_d3pd->trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus->at(efElectronId.roi_index);
-
-    double dr = LeptonTriggerMatching::matchedTrackDetail(efElectronId, usedEfElectronId, eta, phi, container, status);
-    if (dr < dR_min) dR_min = dr;
-  }
-
-  return dR_min;
-}
-
-
-
-std::pair<bool, bool>
-ElectronTriggerMatching::matchDielectron(const TLorentzVector& electron1,
-                                         const TLorentzVector& electron2,
-                                         const DielectronChainInfo& chainInfo)
-{
-  EFelectron efElectron1, efElectron2, dummy;
-  const double dr1 = matchedTrackDetail(efElectron1, dummy, electron1.Eta(), electron1.Phi(), chainInfo.chain, chainInfo.isSymmetric ? "" : chainInfo.thresholds.first);
-  const double dr2 = matchedTrackDetail(efElectron2, dummy, electron2.Eta(), electron2.Phi(), chainInfo.chain, chainInfo.isSymmetric ? "" : chainInfo.thresholds.second);
-
-  if (efElectron1.valid and efElectron2.valid and
-      isEqual(efElectron1.eta, efElectron2.eta) and
-      isEqual(efElectron1.phi, efElectron2.phi)) {
-
-    if (dr1 > dr2) {
-      matchedTrackDetail(efElectron1, efElectron2, electron1.Eta(), electron1.Phi(), chainInfo.chain, chainInfo.isSymmetric ? "" : chainInfo.thresholds.first);
-
-    } else {
-      matchedTrackDetail(efElectron2, efElectron1, electron2.Eta(), electron2.Phi(), chainInfo.chain, chainInfo.isSymmetric ? "" : chainInfo.thresholds.second);
-    }
-  }
-
-  return std::pair<bool, bool>(efElectron1.valid, efElectron2.valid);
-}
-
-
-
-bool
-ElectronTriggerMatching::decodeDielectronChain(DielectronChainInfo& chainInfo)
-{
-
-  chainInfo.isValid = false;
-
-  std::map<std::string, DielectronChainInfo>::const_iterator p = m_DielectronChainMap.find(chainInfo.chain);
-  if (p != m_DielectronChainMap.end()) {
-    chainInfo = p->second;
-    return chainInfo.isValid;
-  }
-
-
-  std::vector<std::string> tokens;
-  tokenize(chainInfo.chain, tokens, "_");
-
-  if (tokens.size() < 2) return false;
-  if (tokens[0] != "EF") return false;
-
-  chainInfo.isSymmetric = (tokens[1].substr(0, 2) == "2e");
-
-  if (chainInfo.isSymmetric) {
-    chainInfo.thresholds.first = "EF_" + tokens[1].substr(1);
-    chainInfo.thresholds.second = chainInfo.thresholds.first;
-    if (tokens.size() == 3) chainInfo.tightness = tokens[2];
-    chainInfo.isValid = true;
-
-  } else {
-    if (tokens.size() != 5) return false;
-    if ((tokens[1].substr(0,1) != "e") or (tokens[3].substr(0,1) != "e")) return false;
-    chainInfo.thresholds.first = "EF_" + tokens[1] + "_" + tokens[2];
-    chainInfo.thresholds.second = "EF_" + tokens[3] + "_" + tokens[4];
-    chainInfo.isValid = true;
-  }
-
-  m_DielectronChainMap[chainInfo.chain] = chainInfo;
-
-  return chainInfo.isValid;
-}
-
-
-
-bool
-ElectronTriggerMatching::decodeElectronMuonChain(const std::string& chain,
-                                                 std::string& threshold)
-{
-  std::vector<std::string> tokens;
-  tokenize(chain, tokens, "_");
-
-  if (tokens.size() != 4) return false;
-  if (tokens[0] != "EF") return false;
-  if (not (tokens[1].substr(0, 1) == "e")) return false;
-
-  int index = -1;
-  for (size_t ii = 2; ii < tokens.size(); ii++) {
-    if (tokens[ii].substr(0,2) == "mu") {
-      index = ii;
-      break;
-    }
-  }
-  if (index < 0) return false;
-
-  threshold = "EF_" + tokens[index];
-
-  return true;
-}
-
-#include "TrigMuonEfficiency/ElectronChainIdMap.h"
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/HSG3TrigLeptonSFTool.cxx b/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/HSG3TrigLeptonSFTool.cxx
deleted file mode 100644
index 3be76c98973bb7838d3441b908a11b809b51f346..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/HSG3TrigLeptonSFTool.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// $Id: HSG3TrigLeptonSFTool.cxx 523458 2012-10-27 01:18:33Z takashi $
-
-// ROOT include(s):
-#include "TError.h"
-
-// Local include(s):
-#include "TrigMuonEfficiency/HSG3TrigLeptonSFTool.h"
-#include "TrigMuonEfficiency/LeptonTriggerSF.h"
-
-HSG3TrigLeptonSFTool::HSG3TrigLeptonSFTool( const std::string& dir,
-                                            Double_t intLumiJ = 226.391, 
-                                            Double_t intLumiK = 590.36, 
-                                            Double_t intLumiL = 1404.79, 
-                                            Double_t intLumiM = 1026.94 )
- : fLeptonTriggerSF( new LeptonTriggerSF( dir ) ),
-   fIntLumiJ( intLumiJ ), fIntLumiK( intLumiK ),
-   fIntLumiL( intLumiL ), fIntLumiM( intLumiM ) {
-
-   ::Info( "HSG3TrigLeptonSFTool::HSG3TrigLeptonSFTool", "Initialized" );
-}
-
-HSG3TrigLeptonSFTool::~HSG3TrigLeptonSFTool() {
-
-   delete fLeptonTriggerSF;
-}
-
-Double_t HSG3TrigLeptonSFTool::MuEff_CB_HSG3( const std::string& /*period*/, Bool_t /*isData*/,
-                                              const TLorentzVector& /*muon*/ ) const{
-
-   Double_t efficiency = 0;
-
-  /*  if( period == "per2011B2_I" ) {
-    efficiency = fLeptonTriggerSF->MuEff_CB( per2011B2_I, isData, muon);
-  }else if( period == "per2011J_M" ) {
-    efficiency = fLeptonTriggerSF->MuEff_CB( per2011J_M, isData, muon);
-  }else if( period == "per2011J" ) {
-    efficiency = fLeptonTriggerSF->MuEff_CB( per2011J, isData, muon);
-  }else if( period == "per2011K" ) {
-    efficiency = fLeptonTriggerSF->MuEff_CB( per2011K, isData, muon);
-  }else if( period == "per2011J_K" ) {
-    Double_t eff1 = fLeptonTriggerSF->MuEff_CB( per2011J, isData, muon);
-    Double_t eff2 = fLeptonTriggerSF->MuEff_CB( per2011K, isData, muon);
-    efficiency = (fIntLumiJ*eff1 + fIntLumiK*eff2)/(fIntLumiJ + fIntLumiK); 
-  }else if( period == "per2011L_M" ) {
-    Double_t eff1 = fLeptonTriggerSF->MuEff_CB( per2011L, isData, muon);
-    Double_t eff2 = fLeptonTriggerSF->MuEff_CB( per2011M, isData, muon);
-    efficiency = (fIntLumiL*eff1 + fIntLumiM*eff2)/(fIntLumiL + fIntLumiM); 
-    }*/
-
-   return efficiency;
-}
-
-std::pair< Double_t, Double_t >
-HSG3TrigLeptonSFTool::MuEffErr_CB_HSG3( const std::string& period, Bool_t isData,
-                                        const TLorentzVector& muon ) const{
-
-   Double_t efficiency = 0;
-   Double_t error = 0;
-
-   if( period == "per2011B2_I" ) {
-      efficiency = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011B_I, isData, muon, combined ).first;
-      error      = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011B_I, isData, muon, combined ).second;
-   } else if( period == "per2011J_M" ) {
-      efficiency = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011J_M, isData, muon, combined ).first;
-      error      = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011J_M, isData, muon, combined ).second;
-   } else if( period == "per2011J" ) {
-      efficiency = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011J, isData, muon, combined ).first;
-      error      = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011J, isData, muon, combined ).second;
-   } else if( period == "per2011K" ) {
-      efficiency = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011K, isData, muon, combined ).first;
-      error      = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011K, isData, muon, combined ).second;
-   } else if( period == "per2011J_K" ) {
-      efficiency = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011J_K, isData, muon, combined ).first;
-      error      = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011J_K, isData, muon, combined ).second;
-   } else if( period == "per2011L_M" ) {
-      efficiency = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011L_M, isData, muon, combined ).first;
-      error      = fLeptonTriggerSF->MuEff( TrigMuonEff::per2011L_M, isData, muon, combined ).second;
-   } else {
-      ::Error( "HSG3TrigLeptonSFTool::MuEffErr_CB_HSG3",
-               "Period name (\"%s\") not recognized", period.c_str() );
-   }
-
-   return std::make_pair( efficiency, error );
-}
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/LeptonTriggerMatching.cxx b/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/LeptonTriggerMatching.cxx
deleted file mode 100644
index 9066da3edde27460b64a54b44a68e941362e6bcf..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/LeptonTriggerMatching.cxx
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/*=================================================================* 
- * Implementation of LeptonTriggerMatching
- *=================================================================*/
-#include "TrigMuonEfficiency/LeptonTriggerMatching.h"
-#include "TrigMuonEfficiency/ChainEntry.h"
-#include "TrigMuonEfficiency/ElectronHypothesis.h"
-#include "TrigMuonEfficiency/MuonHypothesis.h"
-
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <TMath.h>
-#include <cmath>
-
-
-
-/*=================================================================* 
- * public methods
- *=================================================================*/
-/*-----------------------------------------------------------------* 
- * for developers
- *-----------------------------------------------------------------*/
-void
-LeptonTriggerMatching::showSMKeys()
-{
-  std::map<int, std::map<std::string, int> >::const_iterator p;
-  std::cout << "LeptonTriggerMatching\t" << "INFO\t" << "SMKeys:";
-  for (p = m_MapOfChainIdMap.begin(); p != m_MapOfChainIdMap.end(); ++p) {
-    std::cout << p->first << ", ";
-  }
-  std::cout << std::endl;
-}
-
-
-
-void
-LeptonTriggerMatching::dumpChainIdMap(const int SMK)
-{
-  if (m_MapOfChainIdMap.find(SMK) == m_MapOfChainIdMap.end()) {
-    std::cerr << "LeptonTriggerMatching\t" << "ERROR\t"
-              << "ChainIdMap for SMK = " << SMK << " is not stored." << std::endl;
-    return;
-  }
-
-  std::map<std::string, int> ChainIdMap = m_MapOfChainIdMap[SMK];
-  std::map<std::string, int>::const_iterator p;
-  std::cout << "LeptonTriggerMatching\t" << "INFO\t"
-            << "dump ChainIdMap for SMKeys:" << SMK << std::endl;
-
-  for (p = ChainIdMap.begin(); p != ChainIdMap.end(); ++p) {
-    std::cout << p->first << "\t" << p->second << std::endl;
-  }
-}
-
-
-
-void
-LeptonTriggerMatching::createChainIdMapFile(const int SMK,
-                                            const std::string& fileName)
-{
-  if (m_MapOfChainIdMap.find(SMK) == m_MapOfChainIdMap.end()) {
-    std::cerr << "LeptonTriggerMatching\t" << "ERROR\t"
-              << "ChainIdMap for SMK = " << SMK << " is not stored." << std::endl;
-    return;
-  }
-
-  std::map<std::string, int> ChainIdMap = m_MapOfChainIdMap[SMK];
-  std::map<std::string, int>::const_iterator p;
-
-  std::ofstream ofs(fileName.c_str());
-  ofs << "void LeptonTriggerMatching::createChainIdMapFromFile() {" << "\n";
-  ofs << "  " << "std::map<std::string, int> ChainIdMap;" << "\n";
-  for (p = ChainIdMap.begin(); p != ChainIdMap.end(); ++p) {
-    ofs << "  " << "ChainIdMap.insert(std::pair<std::string, int>(\"" << p->first << "\", " << p->second << "));" << "\n";
-  }
-  ofs << "  " << "m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(-1, ChainIdMap));" << "\n";
-  ofs << "}" << std::endl;
-}
-
-
-
-/*=================================================================* 
- * protected methods
- *=================================================================*/
-double
-LeptonTriggerMatching::matchedTrackDetail(EFmuon& efMuonId,
-                                          const EFmuon& usedEfMuonId,
-                                          const std::string& threshold,
-                                          const double eta,
-                                          const double phi,
-                                          const std::vector<int>& container,
-                                          const std::vector<int>& status)
-{
-  double dR_min = m_matchingDr;
-
-  if (m_debug) std::cout << "DEBUG: # of muon container = " << container.size() << "\n";
-  for (size_t iCont = 0; iCont < container.size(); ++iCont) {
-    if (not status.at(iCont)) continue;
-
-    if (efMuonId.isIso) {
-      if (m_d3pd->trig_RoI_EF_mu_TrigMuonEFIsolationContainer == 0) throw "trig_RoI_EF_mu_TrigMuonEFIsolationContainer == 0";
-      if (m_d3pd->trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus == 0) throw "trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus == 0";
-
-      const std::vector<int>& vIsoContainer __attribute__((unused)) = (m_d3pd->trig_RoI_EF_mu_TrigMuonEFIsolationContainer)->at(efMuonId.roi_index);
-      const std::vector<int>& vIsoStatus = (m_d3pd->trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus)->at(efMuonId.roi_index);
-
-      if (not vIsoStatus.at(iCont)) continue;
-    }
-
-    const int container_index = container.at(iCont);
-    const size_t container_size = (efMuonId.chain_type == CHAIN_MG) ? MUGIRL_CB(pt)->size() :
-                                   ((efMuonId.chain_type == CHAIN_SA) ? MUONEF_SA(pt)->size() : MUONEF_CB(pt)->size());
-    if (m_debug) {
-      if (MUGIRL_CB(pt)) std::cout << "DEBUG: container_size (MG) = " << MUGIRL_CB(pt)->size() << "\n";
-      if (MUONEF_SA(pt)) std::cout << "DEBUG: container_size (SA) = " << MUONEF_SA(pt)->size() << "\n";
-      if (MUONEF_CB(pt)) std::cout << "DEBUG: container_size (CB) = " << MUONEF_CB(pt)->size() << "\n";
-    }
-
-    if ((container_index < 0) or (container_index >= (int) container_size)) {
-      std::cerr << "ERROR: invalid container_index: container_size = " << container_size
-                << " container_index = " << container_index << std::endl;
-      throw "NotImplementedError";
-    }
-
-    const std::vector<float>& v_pt = (efMuonId.chain_type == CHAIN_MG) ? MUGIRL_CB(pt)->at(container_index) :
-      ((efMuonId.chain_type == CHAIN_SA) ? MUONEF_SA(pt)->at(container_index) : MUONEF_CB(pt)->at(container_index));
-    const std::vector<float>& v_eta = (efMuonId.chain_type == CHAIN_MG) ? MUGIRL_CB(eta)->at(container_index) :
-      ((efMuonId.chain_type == CHAIN_SA) ? MUONEF_SA(eta)->at(container_index) : MUONEF_CB(eta)->at(container_index));
-    const std::vector<float>& v_phi = (efMuonId.chain_type == CHAIN_MG) ? MUGIRL_CB(phi)->at(container_index) :
-      ((efMuonId.chain_type == CHAIN_SA) ? MUONEF_SA(phi)->at(container_index) : MUONEF_CB(phi)->at(container_index));
-
-    if (m_debug) std::cout << "DEBUG: # of tracks = " << v_pt.size() << "\n";
-
-    for (size_t iTrk = 0; iTrk < v_pt.size(); ++iTrk) {
-      if (m_debug) std::cout << "DEBUG: (pt, eta, phi) = ("
-                             << v_pt.at(iTrk) << ", " << v_eta.at(iTrk) << ", " << v_phi.at(iTrk) << ")\n";
-
-      if (usedEfMuonId.valid and
-          isEqual(usedEfMuonId.pt, v_pt.at(iTrk)) and
-          isEqual(usedEfMuonId.eta, v_eta.at(iTrk)) and
-          isEqual(usedEfMuonId.phi, v_phi.at(iTrk))) continue;
-
-      if (not MuonHypothesis::EF_isPassed(v_pt.at(iTrk), v_eta.at(iTrk), threshold)) continue;
-      double dR_tmp = dR(eta, phi, v_eta.at(iTrk), v_phi.at(iTrk));
-      if (not (dR_tmp < dR_min)) continue;
-      dR_min = dR_tmp;
-
-      efMuonId.valid = true;
-      efMuonId.pt = v_pt.at(iTrk);
-      efMuonId.eta = v_eta.at(iTrk);
-      efMuonId.phi = v_phi.at(iTrk);
-      efMuonId.indicies.first = container_index;
-      efMuonId.indicies.second = iTrk;
-    }
-  }
-
-  return dR_min;
-}
-
-
-
-double
-LeptonTriggerMatching::matchedTrackDetail(EFelectron& efElectronId,
-                                          const EFelectron& usedEfElectronId,
-                                          const double eta,
-                                          const double phi,
-                                          const std::vector<int>& container,
-                                          const std::vector<int>& status)
-{
-  double dR_min = m_matchingDr;
-
-  for (size_t iCont = 0; iCont < container.size(); ++iCont) {
-    if (not status.at(iCont)) continue;
-    const int id = container.at(iCont);
-    const double el_Et = efElectronId.useThreshold ? m_d3pd->trig_EF_el_Et->at(id) : 0.;
-    const double el_eta = m_d3pd->trig_EF_el_eta->at(id);
-    const double el_phi = m_d3pd->trig_EF_el_phi->at(id);
-
-    if (usedEfElectronId.valid) {
-      if (isEqual(usedEfElectronId.eta, el_eta) and
-          isEqual(usedEfElectronId.phi, el_phi)) continue;
-    }
-
-    if (efElectronId.useThreshold and not ElectronHypothesis::EF_isPassed(el_Et, efElectronId.threshold)) continue;
-    double dr = dR(eta, phi, el_eta, el_phi);
-    if (not (dr < dR_min)) continue;
-    dR_min = dr;
-
-    efElectronId.valid = true;
-    efElectronId.eta = el_eta;
-    efElectronId.phi = el_phi;
-  }
-
-  return dR_min;
-}
-
-
-
-double
-LeptonTriggerMatching::index_match(const double eta,
-                                   const double phi,
-                                   const std::string& chain,
-                                   const std::string& threshold,
-                                   EFmuon& efMuonId,
-                                   const EFmuon& usedEfMuonId)
-{
-  efMuonId.valid = false;
-  double dR_min = m_matchingDr;
-
-  if (not m_isIndexMatchUsed) {
-    m_isIndexMatchUsed = true;
-    std::cout << "INFORMATION: index_match is used" << std::endl;
-  }
-
-  const std::vector<int>* status = 0;
-  if (chain.compare("EF_mu24i_tight") == 0) {
-    status = m_d3pd->trig_EF_trigmuonef_EF_mu24i_tight;
-
-  } else if (chain.compare("EF_mu36_tight") == 0) {
-    status = m_d3pd->trig_EF_trigmuonef_EF_mu36_tight;
-
-  } else if (chain.compare("EF_mu18_tight_mu8_EFFS") == 0) {
-    status = m_d3pd->trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS;
-
-  } else if (chain.compare("EF_2mu13") == 0) {
-    status = m_d3pd->trig_EF_trigmuonef_EF_2mu13;
-
-  } else if (chain.compare("EF_mu15") == 0) {
-    status = m_d3pd->trig_EF_trigmuonef_EF_mu15;
-
-  } else if (chain.compare("EF_mu8") == 0) {
-    status = m_d3pd->trig_EF_trigmuonef_EF_mu8;
-
-  } else if (chain.compare("EF_mu40_MSonly_barrel_tight") == 0) {
-    status = m_d3pd->trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight;
-  }
-
-  if (not status) {
-    std::cout << "WARNING: index_match: not supported: " << chain << std::endl;
-    return false;
-  }
-
-  if (status->size() != MUONEF_CB(pt)->size()) {
-    std::cout << "ERROR: index_match: length mismatch: " << std::endl;
-    return false;
-  }
-
-
-  for (size_t ii = 0; ii < status->size(); ii++) {
-    if (not status->at(ii)) continue;
-
-    const std::vector<float>& v_pt = MUONEF_CB(pt)->at(ii);
-    const std::vector<float>& v_eta = MUONEF_CB(eta)->at(ii);
-    const std::vector<float>& v_phi = MUONEF_CB(phi)->at(ii);
-
-    for (size_t iTrk = 0; iTrk < v_pt.size(); ++iTrk) {
-      if (usedEfMuonId.valid and
-          isEqual(usedEfMuonId.pt, v_pt.at(iTrk)) and
-          isEqual(usedEfMuonId.eta, v_eta.at(iTrk)) and
-          isEqual(usedEfMuonId.phi, v_phi.at(iTrk))) continue;
-
-      if (not MuonHypothesis::EF_isPassed(v_pt.at(iTrk), v_eta.at(iTrk), threshold)) continue;
-      double dR_tmp = dR(eta, phi, v_eta.at(iTrk), v_phi.at(iTrk));
-      if (not (dR_tmp < dR_min)) continue;
-      dR_min = dR_tmp;
-
-      efMuonId.valid = true;
-      efMuonId.pt = v_pt.at(iTrk);
-      efMuonId.eta = v_eta.at(iTrk);
-      efMuonId.phi = v_phi.at(iTrk);
-      efMuonId.indicies.first = ii;
-      efMuonId.indicies.second = iTrk;
-    }
-  }
-
-  return dR_min;
-}
-
-
-
-bool
-LeptonTriggerMatching::L1_isPassed(const int iRoI,
-                                 const std::string& l1item)
-{
-  if (iRoI < 0) return false;
-  return getL1pt(m_d3pd->trig_L1_mu_thrName->at(iRoI)) >= getL1pt(l1item);
-}
-
-
-
-int
-LeptonTriggerMatching::getL1pt(const std::string& l1item)
-{
-  int rc = -1;
-
-  std::vector<std::string> tokens;
-  tokenize(l1item, tokens, "_");
-  std::string pt;
-  if (tokens.size() == 1) {
-    pt = tokens.at(0);
-
-  } else if ((tokens.size() == 2 ) and (tokens.at(0) == "L1")) {
-    pt = tokens.at(1);
-
-  } else {
-    std::cerr << "LeptonTriggerMatching::getL1pt: cannot parse: " << l1item << std::endl;
-    return rc;
-  }
-
-  const size_t index = pt.find("MU");
-  if (index != std::string::npos) {
-    std::istringstream iss(pt.substr(index + 2));
-    iss >> rc;
-  } else {
-    std::cerr << "LeptonTriggerMatching::getL1pt: cannot parse: " << l1item << std::endl;
-  }
-
-  return rc;
-}
-
-
-
-void
-LeptonTriggerMatching::readTrigConfTree(TTree* TrigConfTree,
-                                        const std::vector<std::string>& skip)
-{
-  int smk=-9999;
-  std::map<std::string, int>* hltmap=0;
-
-  TrigConfTree->SetBranchAddress("SMK", &smk);
-  TrigConfTree->SetBranchAddress("HLTNameMap", &hltmap);
-
-  TrigConfTree->GetEntry(0);
-  if (not ((smk != -9999) and hltmap)) {
-    std::cerr << "LeptonTriggerMatching\t" << "ERROR\t"
-              << "TrigConfTree does exist, but could not SetBranchAddress for SMK and HLTNameMap." << std::endl;
-    return;
-  }
-
-  std::map<std::string, int>::const_iterator p;
-  for (int iEntry = 0; iEntry < TrigConfTree->GetEntries(); ++iEntry) {
-    TrigConfTree->GetEntry(iEntry);
-    if (m_MapOfChainIdMap.count(smk)) continue;
-
-    std::map<std::string, int> ChainIdMap;
-    for (p = hltmap->begin(); p != hltmap->end(); ++p) {
-      bool keep = false;
-      for (std::vector<std::string>::const_iterator exp = skip.begin(); exp != skip.end(); exp++) {
-        keep |= (p->first.find(*exp) == 0);
-      }
-      if (not keep) continue;
-
-      int id = p->second;
-      if (p->first.find("EF_") == 0) id += ChainEntry::kEFChainIdOffset;
-      ChainIdMap.insert(std::pair<std::string, int>(p->first, id));
-    }
-    m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(smk, ChainIdMap));
-  }
-}
-
-
-
-int
-LeptonTriggerMatching::getChainIndex(const std::string& chain)
-{
-  if (not m_d3pd->isValid()) std::cerr << "LeptonTriggerMatching\tWARNING\tPlease check initialisation setting of TriggerNavigationVariables\n";
-
-  int smk = static_cast<int>(*(m_d3pd->trig_DB_SMK));
-  std::map<std::string, int> ChainIdMap = (m_MapOfChainIdMap.count(smk)) ? m_MapOfChainIdMap[smk] : m_MapOfChainIdMap[-1];
-
-  if (ChainIdMap.find(chain) == ChainIdMap.end()) {
-    if (m_NotFoundChain.find(chain) == m_NotFoundChain.end()) {
-      std::cerr << "LeptonTriggerMatching\t" << "ERROR\t"
-                << chain << " does not exist in ChainIdMap for SMK = " << smk
-                << " (if SMK = -1, it means the Map is created from TrigMuonEfficiency/XxxxChainIdMap.h)" << std::endl;
-      m_NotFoundChain.insert(chain);
-    }
-    return -1;
-  }
-
-  const short ChainId = static_cast<short>(ChainIdMap[chain]);
-  if (m_debug) std::cout << "DEBUG: ChainId = " << ChainId << " for " << chain << " [SMK = " << smk << "]\n";
-  for (int iChain = 0; iChain < *(m_d3pd->trig_Nav_n); ++iChain) {
-    if (m_d3pd->trig_Nav_chain_ChainId->at(iChain) == ChainId) return iChain;
-  }
-
-  if (m_NotFoundChain.find(chain) == m_NotFoundChain.end()) {
-    std::cerr << "LeptonTriggerMatching\t" << "ERROR\t"
-              << chain << " does not exist in Flat Navigation Branch." << std::endl;
-    m_NotFoundChain.insert(chain);
-  }
-  return -1;
-}
-
-
-
-void
-LeptonTriggerMatching::tokenize(const std::string& str,
-                              std::vector<std::string>& tokens,
-                              const std::string& delimiters)
-{
-  tokens.clear();
-  std::string::size_type lastPos = str.find_first_not_of(delimiters, 0);
-  std::string::size_type pos = str.find_first_of(delimiters, lastPos);
-
-  while ((std::string::npos != pos) or (std::string::npos != lastPos)) {
-    tokens.push_back(str.substr(lastPos, pos - lastPos));
-    lastPos = str.find_first_not_of(delimiters, pos);
-    pos = str.find_first_of(delimiters, lastPos);
-  }
-}
-
-
-
-bool
-LeptonTriggerMatching::isEqual(const double x,
-                             const double y)
-{
-  if (fabs(x - y) < std::numeric_limits<float>::epsilon()) return true;
-  return false;
-}
-
-
-
-double
-LeptonTriggerMatching::dR(const double eta1,
-                        const double phi1,
-                        const double eta2,
-                        const double phi2)
-{
-  double deta = fabs(eta1 - eta2);
-  double dphi = fabs(phi1 - phi2) < TMath::Pi() ? fabs(phi1 - phi2) : 2*TMath::Pi() - fabs(phi1 - phi2);
-  return sqrt(deta*deta + dphi*dphi);
-}
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/LeptonTriggerSF.cxx b/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/LeptonTriggerSF.cxx
deleted file mode 100644
index dcee97091e2956cdad8b6431db494dd02c96bbfb..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/LeptonTriggerSF.cxx
+++ /dev/null
@@ -1,2693 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// STL include(s):
-#include <stdexcept>
-#include <sstream>
-#include <iostream>
-
-// Local include(s):
-#include "TrigMuonEfficiency/LeptonTriggerSF.h"
-#include "ElectronEfficiencyCorrection/TElectronEfficiencyCorrectionTool.h"
-
-
-// ROOT include(s):
-#include "TFile.h"
-#include "TSystem.h"
-#include "TROOT.h"
-#include "TRandom.h"
-#include "TDirectory.h"
-#include "TLorentzVector.h"
-#include "TH2.h"
-
-//
-// Constant declaration(s):
-//
-static const double commonSystMTSG = 0.01;
-static const double muon_barrel_endcap_boundary = 1.05;
-static const double electron_maximum_eta = 2.47;
-static const double GeVtoMeV = 1000.;
-
-
-
-/// Helper macro for printing nice error messages
-/**
- * This macro is used to print some pretty error messages that specify
- * the file name and line number. This can be very useful when debugging
- * problems.
- *
- * It can be placed into a ROOT print function like this:
- *
- * <code>
- *  ::Error( "ThisFunction", ERROR_MESSAGE( "My message with an int %i" ), myInt );
- * </code>
- *
- * @param MESSAGE The message to "make pretty"
- */
-#define ERROR_MESSAGE( MESSAGE )                \
-   "%s:%i " MESSAGE, __FILE__, __LINE__
-
-
-
-/*=================================================================* 
- * constructor/destructor
- *=================================================================*/
-LeptonTriggerSF::LeptonTriggerSF(const std::string& directory,
-                                 const std::string& directoryElectron,
-                                 const std::string& electronFileVersion)
-  : m_year(2011),
-    m_efficiencyMap(),
-    m_phiBoundaryBarrel(0.0),
-    m_phiBoundaryEndcap(0.0),
-    m_IsAFII(false)
-{
-  m_electronFileVersion = electronFileVersion;
-  initialise(directory, "", std::vector<std::string>(), directoryElectron);
-}
-
-
-
-LeptonTriggerSF::LeptonTriggerSF(const int year,
-                                 const std::string& directory,
-                                 const std::string& fileName,
-                                 const std::string& directoryElectron,
-                                 const std::string& electronFileVersion)
-  : m_year(year),
-    m_efficiencyMap(),
-    m_phiBoundaryBarrel(0.0),
-    m_phiBoundaryEndcap(0.0),
-    m_IsAFII(false)
-{
-  m_electronFileVersion = electronFileVersion;
-  initialise(directory, fileName, std::vector<std::string>(), directoryElectron);
-}
-
-
-
-LeptonTriggerSF::LeptonTriggerSF(const int year,
-                                 const std::vector<std::string>& qualities,
-                                 const std::string& directory,
-                                 const std::string& fileName,
-                                 const std::string& directoryElectron,
-                                 const std::string& electronFileVersion)
-  : m_year(year),
-    m_efficiencyMap(),
-    m_phiBoundaryBarrel(0.0),
-    m_phiBoundaryEndcap(0.0),
-    m_IsAFII(false)
-{
-  m_electronFileVersion = electronFileVersion;
-  initialise(directory, fileName, qualities, directoryElectron);
-}
-
-
-
-LeptonTriggerSF::~LeptonTriggerSF()
-{
-  for (EfficiencyMap::const_iterator cit = m_efficiencyMap.begin();
-       cit != m_efficiencyMap.end();
-       cit++) {
-    delete cit->second;
-  }
-
-  for (ElectronEfficiencyToolMap::const_iterator cit = m_electronSF.begin();
-       cit != m_electronSF.end();
-       cit++) {
-    delete cit->second;
-  }
-}
-
-
-
-/*=================================================================* 
- * public methods
- *=================================================================*/
-std::pair<double, double>
-LeptonTriggerSF::GetTriggerSF(const int runNumber,
-                              const bool useGeV,
-                              const std::vector<TLorentzVector>& muons, 
-                              const MuonQuality muonQuality,
-                              const int systematicVariation,
-                              TrigMuonEff::Configuration* config) const
-{
-  std::vector< MuonQuality > muonsQuality(muons.size(), muonQuality);
-  std::vector<TLorentzVector> electrons;
-  std::vector<ElectronQuality> electronsQuality;
-
-  TrigMuonEff::Configuration configuration;
-  configuration.runNumber = runNumber;
-  configuration.useGeV = useGeV;
-  configuration.setByUser = false;
-  configuration.isAFII = m_IsAFII;
-  configuration.systematics = systematicVariation;
-
-  if (config) {
-    configuration.setByUser = true;
-    configuration.trigger = config->trigger;
-    configuration.period = config->period;
-    configuration.binning = config->binning;
-  }
-
-  return GetTriggerSF(configuration, muons, muonsQuality, electrons, electronsQuality);
-}
-
-
-
-std::pair<double, double>
-LeptonTriggerSF::GetTriggerSF(const int runNumber,
-                              const bool useGeV,
-                              const std::vector<TLorentzVector>& muons,
-                              const std::vector<MuonQuality>& muonsQuality,
-                              const int systematicVariation,
-                              TrigMuonEff::Configuration* config) const
-{
-  std::vector<TLorentzVector> electrons;
-  std::vector<ElectronQuality> electronsQuality;
-
-  TrigMuonEff::Configuration configuration;
-  configuration.runNumber = runNumber;
-  configuration.useGeV = useGeV;
-  configuration.setByUser = false;
-  configuration.isAFII = m_IsAFII;
-  configuration.systematics = systematicVariation;
-
-  if (config) {
-    configuration.setByUser = true;
-    configuration.trigger = config->trigger;
-    configuration.period = config->period;
-    configuration.binning = config->binning;
-  }
-
-  return GetTriggerSF(configuration, muons, muonsQuality, electrons, electronsQuality);
-}
-
-
-
-std::pair<double, double>
-LeptonTriggerSF::GetTriggerSF(const int runNumber,
-                              const bool useGeV,
-                              const std::vector<TLorentzVector>& muons,
-                              const std::vector<MuonQuality>& muonsQuality,
-                              const std::string& trigger,
-                              const int systematicVariation,
-                              TrigMuonEff::Configuration* config) const
-{
-  TrigMuonEff::Configuration configuration;
-  configuration.runNumber = runNumber;
-  configuration.useGeV = useGeV;
-  configuration.systematics = systematicVariation;
-  configuration.setByUser = false;
-  configuration.isAFII = m_IsAFII;
-
-  if (config) {
-    configuration.setByUser = true;
-    configuration.trigger = config->trigger;
-    configuration.period = config->period;
-    configuration.binning = config->binning;
-  }
-
-  return GetTriggerSF(configuration, muons, muonsQuality, trigger);
-}
-
-std::pair<double, double>
-LeptonTriggerSF::GetTriggerSF(const int runNumber,
-                              const bool useGeV,
-                              const std::vector<TLorentzVector>& electrons,
-                              const std::vector<ElectronQuality>& electronsQuality,
-                              const std::string& trigger,
-                              const int systematicVariation,
-                              TrigMuonEff::Configuration* config) const
-{
-  TrigMuonEff::Configuration configuration;
-  configuration.runNumber = runNumber;
-  configuration.useGeV = useGeV;
-  configuration.systematics = systematicVariation;
-  configuration.setByUser = false;
-  configuration.isAFII = m_IsAFII;
-
-  if (config) {
-    configuration.setByUser = true;
-    configuration.trigger = config->trigger;
-    configuration.period = config->period;
-    configuration.binning = config->binning;
-  }
-
-  return GetTriggerSF(configuration, electrons, electronsQuality, trigger);
-}
-
-
-
-std::pair<double, double>
-LeptonTriggerSF::GetTriggerSF(const int runNumber,
-                              const bool useGeV,
-                              const std::vector<TLorentzVector>& muons,
-                              const MuonQuality muonQuality,
-                              const std::vector<TLorentzVector>& electrons,
-                              const ElectronQuality electronQuality,
-                              const int systematicVariation,
-                              TrigMuonEff::Configuration* config) const
-{
-  std::vector<MuonQuality> muonsQuality(muons.size(), muonQuality);
-  std::vector<ElectronQuality> electronsQuality(electrons.size(), electronQuality);
-
-  TrigMuonEff::Configuration configuration;
-  configuration.runNumber = runNumber;
-  configuration.useGeV = useGeV;
-  configuration.setByUser = false;
-  configuration.isAFII = m_IsAFII;
-  configuration.systematics = systematicVariation;
-
-  if (config) {
-    configuration.setByUser = true;
-    configuration.trigger = config->trigger;
-    configuration.period = config->period;
-    configuration.binning = config->binning;
-  }
-
-  return GetTriggerSF(configuration, muons, muonsQuality, electrons, electronsQuality);
-}
-
-
-
-std::pair<double, double>
-LeptonTriggerSF::GetTriggerSF(const int runNumber,
-                              const bool useGeV,
-                              const std::vector<TLorentzVector>& muons,
-                              const std::vector<MuonQuality>& muonsQuality,
-                              const std::vector<TLorentzVector>& electrons,
-                              const std::vector<ElectronQuality>& electronsQuality,
-                              const int systematicVariation,
-                              TrigMuonEff::Configuration* config) const
-{
-  TrigMuonEff::Configuration configuration;
-  configuration.runNumber = runNumber;
-  configuration.useGeV = useGeV;
-  configuration.systematics = systematicVariation;
-  configuration.setByUser = false;
-  configuration.isAFII = m_IsAFII;
-
-  if (config) {
-    configuration.setByUser = true;
-    configuration.trigger = config->trigger;
-    configuration.period = config->period;
-    configuration.binning = config->binning;
-  }
-
-  return GetTriggerSF(configuration, muons, muonsQuality, electrons, electronsQuality);
-}
-
-
-std::pair<double, double>
-LeptonTriggerSF::GetTriggerSF(const int runNumber,
-                              const bool useGeV,
-                              const std::vector<TLorentzVector>& muons,
-                              const std::vector<MuonQuality>& muonsQuality,
-                              const std::vector<TLorentzVector>& electrons,
-                              const std::vector<ElectronQuality>& electronsQuality,
-			      const std::string& trigger,
-                              const int systematicVariation,
-                              TrigMuonEff::Configuration* config) const
-{
-  TrigMuonEff::Configuration configuration;
-  configuration.runNumber = runNumber;
-  configuration.useGeV = useGeV;
-  configuration.systematics = systematicVariation;
-  configuration.setByUser = false;
-  configuration.isAFII = m_IsAFII;
-  configuration.trigger = trigger;
-
-  if (config) {
-    configuration.setByUser = true;
-    configuration.trigger = config->trigger;
-    configuration.period = config->period;
-    configuration.binning = config->binning;
-  }
-
-  return GetTriggerSF(configuration, muons, muonsQuality, electrons, electronsQuality);
-}
-
-
-std::pair<double, double>
-LeptonTriggerSF::GetTriggerSF(const TrigMuonEff::Configuration    & configuration,
-                              const std::vector< TLorentzVector > & muons,
-                              const std::vector< MuonQuality >    & muonsQuality,
-                              const std::vector< TLorentzVector > & electrons,
-                              const std::vector< ElectronQuality >& electronsQuality) const
-{
-  // Get the offline muon and electron thresholds:
-  const std::pair< double, double > threshold = getThresholds(configuration);
-
-  double rate_not_fired_data = 1.;
-  double rate_not_fired_mc   = 1.;
-
-  // needed for uncertainty calculation
-  double inv_sq_eff_data    = 0.;
-  double inv_sq_eff_mc      = 0.;
-  double inv_sq_eff_data_el = 0.;
-  double inv_sq_eff_mc_el   = 0.;
-  double inv_sq_eff_data_mu = 0.;
-  double inv_sq_eff_mc_mu   = 0.;
-
-  DileptonTriggerName dilep_name = kNoTrig;
-  const bool is_e12Tvh_medium1_mu8 = (configuration.trigger.find("e12Tvh_medium1_mu8") != std::string::npos);
-  if(is_e12Tvh_medium1_mu8) dilep_name = EF_e12Tvh_medium1_mu8;
-  for (size_t ielec = 0; ielec < electrons.size(); ++ielec) {
-
-    const int set_data = getElectronQuality(configuration.runNumber, electronsQuality.at(ielec), true,  (dilep_name!=kNoTrig), dilep_name);
-    const int set_mc   = getElectronQuality(configuration.runNumber, electronsQuality.at(ielec), false, (dilep_name!=kNoTrig), dilep_name);
-
-    double eff_data = 0., eff_mc = 0.;    
-    double err_data = 0., err_mc = 0.;    
-
-    if (((electrons.at(ielec)).Pt() < threshold.second) or
-        (fabs((electrons.at(ielec)).Eta()) >= electron_maximum_eta)) {
-
-      eff_data = 0.;
-      eff_mc   = 0.;
-      err_data = 0.;
-      err_mc   = 0.;
-
-    } else {
-
-      // get efficiency from data
-      std::pair<double, double> rc;
-      rc = ElEff_Data(electrons.at(ielec), set_mc, set_data, m_year, configuration);
-      eff_data = rc.first;
-      err_data = rc.second;
-
-      // get efficiency from MC
-      rc = ElEff_MC(electrons.at(ielec), set_mc, m_year, configuration);
-      eff_mc = rc.first;
-      err_mc = rc.second;
-
-    }
-    if (eff_data==1.0) eff_data=1.0-1.0E-10; // to avoid division by 0 
-    if (eff_mc==1.0) eff_mc=1.0-1.0E-10; // to avoid division by 0 
-
-    rate_not_fired_data *= (1. - eff_data);
-    rate_not_fired_mc   *= (1. - eff_mc);
-
-    // needed for uncertainty calculation
-    if (eff_data) {
-      const double c = err_data/( 1. - eff_data );
-      inv_sq_eff_data += c*c;
-      inv_sq_eff_data_el += c*c; // contribution only due to electron trigger
-    }
-
-    if (eff_mc) {
-      const double c = err_mc/( 1. - eff_mc );
-      inv_sq_eff_mc += c*c;
-      inv_sq_eff_mc_el += c*c; // contribution only due to electron trigger
-    }
-  }
-
-  for (size_t imuon = 0; imuon < muons.size(); ++imuon) {
-
-    double eff_data = 0., eff_mc = 0.;
-    double err_data = 0., err_mc = 0.;
-
-    if ((muons.at(imuon)).Pt() < threshold.first) {
-
-      eff_data = 0.;
-      eff_mc   = 0.;
-      err_data = 0.;
-      err_mc   = 0.;
-
-    } else {
-
-      if (not configuration.setByUser) {
-        if (not setConfiguration(const_cast<TrigMuonEff::Configuration&>(configuration))) {
-          return std::make_pair( 0., 0. );
-        }
-      }
-
-
-      if (muonsQuality.at(imuon) == CaloMuon) continue;
-      std::string muon_trigger_name = "";
-      if(is_e12Tvh_medium1_mu8) muon_trigger_name = "mu8";
-      // get efficiency from data
-      configuration.isData = true;
-      std::pair<double, double> rc;
-      rc = getMuonEfficiency(configuration, muons.at(imuon), muonsQuality.at(imuon), muon_trigger_name);
-      eff_data = rc.first;
-      err_data = rc.second;
-
-      // get efficiency from MC
-      configuration.isData = false;
-      rc = getMuonEfficiency(configuration, muons.at(imuon), muonsQuality.at(imuon), muon_trigger_name);
-      eff_mc = rc.first;
-      err_mc = rc.second;
-
-    }
-
-    rate_not_fired_data *= ( 1. - eff_data );
-    rate_not_fired_mc   *= ( 1. - eff_mc );
-
-    // needed for uncertainty calculation
-    if (eff_data) {
-      const double c = err_data/( 1. - eff_data );
-      inv_sq_eff_data += c*c;
-      inv_sq_eff_data_mu += c*c; // contribution only due to muon trigger
-    }
-
-    if (eff_mc) {
-      const double c = err_mc/( 1. - eff_mc );
-      inv_sq_eff_mc += c*c;
-      inv_sq_eff_mc_mu += c*c; // contribution only due to muon trigger
-    }
-  }
-
-  double event_SF = 1.;
-  double event_SF_err = 0.;
-  double event_SF_err_el = 0.;
-  double event_SF_err_mu = 0.;
-
-  // prevent events with no triggered electrons or muons
-  if ((electrons.size() or muons.size()) and
-      (fabs(1. - rate_not_fired_mc) > 0.0001)) {
-
-    event_SF        = ( 1. - rate_not_fired_data ) / ( 1. - rate_not_fired_mc );
-
-    event_SF_err    = getSfError( rate_not_fired_data, rate_not_fired_mc,
-                                  inv_sq_eff_data, inv_sq_eff_mc );
-    event_SF_err_el = getSfError( rate_not_fired_data, rate_not_fired_mc,
-                                  inv_sq_eff_data_el, inv_sq_eff_mc_el );
-    event_SF_err_mu = getSfError( rate_not_fired_data, rate_not_fired_mc,
-                                    inv_sq_eff_data_mu, inv_sq_eff_mc_mu );
-  }
-  
-
-  switch (configuration.systematics) {
-    case noVariation:
-    case statisticalOnlyMuon:
-      return std::make_pair( event_SF, event_SF_err ); 
-
-    case plusOneSigma:
-      return std::make_pair( event_SF + event_SF_err, event_SF_err );
-
-    case minusOneSigma:
-      return std::make_pair( event_SF - event_SF_err, event_SF_err ); 
-
-    case plusOneSigmaElectron:
-      return std::make_pair( event_SF + event_SF_err_el, event_SF_err ); 
-
-    case minusOneSigmaElectron:
-      return std::make_pair( event_SF - event_SF_err_el, event_SF_err ); 
-
-    case plusOneSigmaMuon:
-      return std::make_pair( event_SF + event_SF_err_mu, event_SF_err ); 
-
-    case minusOneSigmaMuon:
-      return std::make_pair( event_SF - event_SF_err_mu, event_SF_err ); 
-
-    default:
-      ::Warning("LeptonTriggerSF::GetTriggerSF",
-                "unknown systematics option '%i' given: no systematic variation used", configuration.systematics);
-      return std::make_pair( event_SF, event_SF_err ); 
-  }
-}
-
-
-
-std::pair<double, double>
-LeptonTriggerSF::GetTriggerSF(const TrigMuonEff::Configuration& configuration,
-                              const std::vector<TLorentzVector>& muons,
-                              const std::vector<MuonQuality>& muonsQuality,
-                              const std::string& trigger) const
-{
-  if (muons.size() != 2) {
-    ::Fatal("LeptonTriggerSF::GetTriggerSF",
-            ERROR_MESSAGE("Currently dimuon trigger chains only implemented for events with exactly 2 muons."));
-    throw std::runtime_error("Muon vector has wrong size");
-  }
-
-  double eff_data = 0., eff_mc = 0.;
-  double eff_data_err = 0., eff_mc_err = 0.;
-    
-  if (not configuration.setByUser) {
-    if (not setConfiguration(const_cast<TrigMuonEff::Configuration&>(configuration))) {
-      return std::make_pair( 0., 0. );
-    }
-  }
-
-  const bool is_mu24i_tight_or_mu36_tight = (trigger.find("mu24i_tight_or_mu36_tight") != std::string::npos);
-  const bool is_mu18_tight_mu8_EFFS = (trigger.find("mu18_tight_mu8_EFFS") != std::string::npos);
-  const bool is_2mu13 = (trigger.find("2mu13") != std::string::npos);
-
-  // get efficiency from data
-  configuration.isData = true;
-  if ((is_mu24i_tight_or_mu36_tight and is_mu18_tight_mu8_EFFS) or
-      (is_mu24i_tight_or_mu36_tight and is_2mu13)) { // single OR dimuon
-    eff_data = getSingleOrDimuonEfficiency(configuration, muons, muonsQuality, trigger).first;    
-    eff_data_err = getSingleOrDimuonEfficiency(configuration, muons, muonsQuality, trigger).second;    
-
-  } else if (is_mu18_tight_mu8_EFFS or is_2mu13) {
-    eff_data = getDimuonEfficiency(configuration, muons, muonsQuality, trigger).first; // dimuon only
-    eff_data_err = getDimuonEfficiency(configuration, muons, muonsQuality, trigger).second;
-
-  } else {
-    ::Fatal("LeptonTriggerSF::GetTriggerSF",
-            ERROR_MESSAGE("unknown trigger combination: %s"), trigger.c_str());
-    throw std::runtime_error("unknown trigger combination");
-  }
-
-  /// get efficiency from MC
-  configuration.isData = false;
-  if ((is_mu24i_tight_or_mu36_tight and is_mu18_tight_mu8_EFFS) or
-      (is_mu24i_tight_or_mu36_tight and is_2mu13)) { // single OR dimuon
-    eff_mc = getSingleOrDimuonEfficiency(configuration, muons, muonsQuality, trigger).first;
-    eff_mc_err = getSingleOrDimuonEfficiency(configuration, muons, muonsQuality, trigger).second;
-
-  } else if (is_mu18_tight_mu8_EFFS or is_2mu13) {
-    eff_mc = getDimuonEfficiency(configuration, muons, muonsQuality, trigger).first; // dimuon only     
-    eff_mc_err = getDimuonEfficiency(configuration, muons, muonsQuality, trigger).second;
-  }
-
-  double event_SF = 1.;
-  double event_SF_err = 0.;
-    
-  // prevent events with no triggered muons
-  if (( muons.size()) and (fabs(eff_mc) > 0.0001)){
-    const double d = eff_data;
-    const double de = eff_data_err;
-    const double m = eff_mc;
-    const double me = eff_mc_err;
-    event_SF = d / m;
-    event_SF_err = sqrt( ( de*de / m*m ) + ( d*d*me*me / m*m*m*m ) );
-  }
-  /*std::cout << "eff_data = " << eff_data << ", eff_mc = " << eff_mc << std::endl;
-  std::cout << "Muon 1: pT = " << muons[0].Pt() << ", eta = " << muons[0].Eta() << ", phi = " << muons[0].Phi() << std::endl;
-  std::cout << "Muon 2: pT = " << muons[1].Pt() << ", eta = " << muons[1].Eta() << ", phi = " << muons[1].Phi() << std::endl;*/
-
-  switch (configuration.systematics) {
-  case noVariation:
-  case statisticalOnlyMuon:
-    return std::make_pair( event_SF, event_SF_err ); 
-
-  case plusOneSigma:
-    return std::make_pair( event_SF + event_SF_err, event_SF_err );
-
-  case minusOneSigma:
-    return std::make_pair( event_SF - event_SF_err, event_SF_err ); 
-
-  default:
-    ::Warning("LeptonTriggerSF::GetTriggerSF",
-	      "unknown systematics option '%i' given: no systematic variation used", configuration.systematics);
-    return std::make_pair( event_SF, event_SF_err ); 
-  }
-}
-
-std::pair<double, double>
-LeptonTriggerSF::GetTriggerSF(const TrigMuonEff::Configuration& configuration,
-                              const std::vector<TLorentzVector>& electrons,
-                              const std::vector<ElectronQuality>& electronsQuality,
-                              const std::string& trigger) const
-{
-  if (electrons.size() != 2) {
-    ::Fatal("LeptonTriggerSF::GetTriggerSF",
-            ERROR_MESSAGE("Currently dielectron trigger chains only implemented for events with exactly 2 electrons."));
-    throw std::runtime_error("Electron vector has wrong size");
-  }
-
-  double eff_data = 0., eff_mc = 0.;
-  double eff_data_err = 0., eff_mc_err = 0.;
-    
-  if (not configuration.setByUser) {
-    if (not setConfiguration(const_cast<TrigMuonEff::Configuration&>(configuration))) {
-      return std::make_pair( 0., 0. );
-    }
-  }
-
-  const bool is_e24vhi_medium1_or_e60_medium1 = (trigger.find("e24vhi_medium1_or_e60_medium1") != std::string::npos);
-  const bool is_2e12Tvh_loose1 = (trigger.find("2e12Tvh_loose1") != std::string::npos);
-
-  // get efficiency from data
-  configuration.isData = true;
-  if ((is_e24vhi_medium1_or_e60_medium1 and is_2e12Tvh_loose1)) { // single OR dielectron
-    eff_data = getSingleOrDielectronEfficiency(configuration, electrons, electronsQuality, trigger).first;     
-    eff_data_err = getSingleOrDielectronEfficiency(configuration, electrons, electronsQuality, trigger).second;     
-
-  } else if (is_2e12Tvh_loose1) { // dielectron only
-    eff_data = getDielectronEfficiency(configuration, electrons, electronsQuality, trigger).first;
-    eff_data_err = getDielectronEfficiency(configuration, electrons, electronsQuality, trigger).second;
-
-  } else {
-    ::Fatal("LeptonTriggerSF::GetTriggerSF",
-            ERROR_MESSAGE("unknown trigger combination: %s"), trigger.c_str());
-    throw std::runtime_error("unknown trigger combination");
-  }
-
-  /// get efficiency from MC
-  configuration.isData = false;
-  if ((is_e24vhi_medium1_or_e60_medium1 and is_2e12Tvh_loose1)) { // single OR dielectron
-    eff_mc = getSingleOrDielectronEfficiency(configuration, electrons, electronsQuality, trigger).first;
-    eff_mc_err = getSingleOrDielectronEfficiency(configuration, electrons, electronsQuality, trigger).second;
-
-  } else if (is_2e12Tvh_loose1) { // dimuon only     
-    eff_mc = getDielectronEfficiency(configuration, electrons, electronsQuality, trigger).first;
-    eff_mc_err = getDielectronEfficiency(configuration, electrons, electronsQuality, trigger).second;
-  }
-
-  double event_SF = 1.;
-  double event_SF_err = 0.;
-    
-  // prevent events with no triggered electrons
-  if (( electrons.size()) and (fabs(eff_mc) > 0.0001)){
-    const double d = eff_data;
-    const double de = eff_data_err;
-    const double m = eff_mc;
-    const double me = eff_mc_err;
-    event_SF = d / m;
-    event_SF_err = sqrt( ( de*de / m*m ) + ( d*d*me*me / m*m*m*m ) );
-  }
-  /*std::cout << "eff_data = " << eff_data << ", eff_mc = " << eff_mc << std::endl;
-  std::cout << "Electron 1: pT = " << electrons[0].Pt() << ", eta = " << electrons[0].Eta() << ", phi = " << electrons[0].Phi() << std::endl;
-  std::cout << "Electron 2: pT = " << electrons[1].Pt() << ", eta = " << electrons[1].Eta() << ", phi = " << electrons[1].Phi() << std::endl;*/
-
-  switch (configuration.systematics) {
-  case noVariation:
-    return std::make_pair( event_SF, event_SF_err ); 
-    
-  case plusOneSigma:
-    return std::make_pair( event_SF + event_SF_err, event_SF_err );
-    
-  case minusOneSigma:
-    return std::make_pair( event_SF - event_SF_err, event_SF_err ); 
-    
-  default:
-    ::Warning("LeptonTriggerSF::GetTriggerSF",
-	      "unknown systematics option '%i' given: no systematic variation used", configuration.systematics);
-    return std::make_pair( event_SF, event_SF_err ); 
-  }
-}
-
-
-
-std::pair<double, double>
-LeptonTriggerSF::getMuonEfficiency(const TrigMuonEff::Configuration& configuration,
-                                   const TLorentzVector& muon,
-                                   const MuonQuality muonQuality,
-                                   const std::string& trigger) const
-{
-  if (muonQuality == CaloMuon) return std::make_pair(0.0, 0.0);
-
-  const double mu_eta = muon.Eta();
-  const double mu_phi = fixPhiRange(muon);
-
-  const std::string type = (configuration.isData ? "_data" : "_mc");
-  const std::string region = ((fabs(mu_eta) < muon_barrel_endcap_boundary) ? "_barrel" : "_endcap" );
-  const std::string quality = getMuonQuality(muonQuality);
-  const std::string chain = (trigger.empty() ? configuration.trigger : trigger);
-
-  const std::string histname = "_MuonTrigEff_" + configuration.period + ((m_year > 2011) ? chain + "_" : "") + quality +
-                               "_EtaPhi_" + configuration.binning + region + type;
-
-  const EfficiencyMap* map = &m_efficiencyMap;
-
-  if (configuration.replicaIndex >= 0) {
-    if (configuration.replicaIndex < (int) m_efficiencyMapReplicaArray.size()) {
-      map = &m_efficiencyMapReplicaArray.at(configuration.replicaIndex);
-
-    } else {
-      ::Fatal("LeptonTriggerSF::getMuonEfficiency",
-              ERROR_MESSAGE("index for replicated histograms is out of range. %d"), configuration.replicaIndex);
-      throw std::runtime_error( "Internal coding error detected" );
-    }
-  }
-
-  EfficiencyMap::const_iterator cit = map->find(histname);
-  if (cit == map->end()) {
-    ::Fatal("LeptonTriggerSF::getMuonEfficiency",
-            ERROR_MESSAGE("Could not find what you are looking for in the efficiency map. \"%s\" "
-                          "This is either a bug or you are not using the right .root file, please double check."),
-                          histname.c_str() );
-    throw std::runtime_error( "Internal coding error detected" );
-  }
-
-  const int bin = (cit->second)->FindFixBin(mu_eta, mu_phi);
-  const double efficiency = (cit->second)->GetBinContent(bin);
-  const double statisticalError = (cit->second)->GetBinError(bin);
-
-  const double systematicError = commonSystMTSG * efficiency;
-  double uncertainty = 0;
-  switch (configuration.systematics) {
-    case statisticalOnlyMuon:
-      uncertainty = statisticalError;
-      break;
-
-    case systematicOnlyMuon:
-      uncertainty = systematicError;
-      break;
-
-    default:
-      uncertainty = sqrt(statisticalError*statisticalError + systematicError*systematicError);
-      //std::cout << "Error: " << efficiency << " Stat error: " << statisticalError << " SYst: " << systematicError << std::endl;
-      break;
-  };
-
-  return std::make_pair(efficiency, uncertainty);
-}
-
-
-
-std::pair<double, double>
-LeptonTriggerSF::getDimuonEfficiency(const TrigMuonEff::Configuration& configuration,
-                                     const std::vector<TLorentzVector>& muons,
-                                     const std::vector<MuonQuality>& muonsQuality,
-                                     const std::string& chain) const
-{
-  DileptonThresholds thresholds;
-  getDileptonThresholds(configuration, thresholds);
-
-  double threshold_leg1 = 0.;
-  double threshold_leg2 = 0.;
-
-  if (chain.find("mu18_tight_mu8_EFFS") != std::string::npos) {
-    threshold_leg1 = thresholds.mu18_tight;
-    threshold_leg2 = thresholds.mu8_EFFS;
-
-  } else if (chain.find("2mu13") != std::string::npos) {
-    threshold_leg1 = thresholds.mu13;
-    threshold_leg2 = thresholds.mu13;
-
-  } else {
-    ::Error("LeptonTriggerSF::getDimuonEfficiency",
-      ERROR_MESSAGE("Invalid dimuon or combination of single and dimuon trigger chain name given"));
-  }
-
-  double eff_mu1_leg1 = 0.;
-  double eff_mu2_leg1 = 0.;
-  double eff_mu1_leg2 = 0.;
-  double eff_mu2_leg2 = 0.;
-  double eff_mu1_bothlegs = 0.;
-  double eff_mu2_bothlegs = 0.;
-  double eff_mu1_leg1_err = 0.;
-  double eff_mu2_leg1_err = 0.;
-  double eff_mu1_leg2_err = 0.;
-  double eff_mu2_leg2_err = 0.;
-  double eff_mu1_bothlegs_err = 0.;
-  double eff_mu2_bothlegs_err = 0.;
-
-  DileptonTrigger dimuon;
-  getDileptonLegs(chain, dimuon);
-
-  enum {
-    Leg1 = 0,
-    Leg2 = 1
-  };
-
-  if ((muons.at(Leg1)).Pt() >= threshold_leg1) {
-    eff_mu1_leg1 = getMuonEfficiency(configuration, muons.at(Leg1), muonsQuality.at(Leg1), dimuon.leg1).first;
-    eff_mu1_leg1_err = getMuonEfficiency(configuration, muons.at(Leg1), muonsQuality.at(Leg1), dimuon.leg1).second;
-    eff_mu1_bothlegs = getMuonEfficiency(configuration, muons.at(Leg1), muonsQuality.at(Leg1), dimuon.bothLegs).first;
-    eff_mu1_bothlegs_err = getMuonEfficiency(configuration, muons.at(Leg1), muonsQuality.at(Leg1), dimuon.bothLegs).second;
-  }
-
-  if ((muons.at(Leg2)).Pt() >= threshold_leg1) {
-    eff_mu2_leg1 = getMuonEfficiency(configuration, muons.at(Leg2), muonsQuality.at(Leg2), dimuon.leg1).first;
-    eff_mu2_leg1_err = getMuonEfficiency(configuration, muons.at(Leg2), muonsQuality.at(Leg2), dimuon.leg1).second;
-    eff_mu2_bothlegs = getMuonEfficiency(configuration, muons.at(Leg2), muonsQuality.at(Leg2), dimuon.bothLegs).first;
-    eff_mu2_bothlegs_err = getMuonEfficiency(configuration, muons.at(Leg2), muonsQuality.at(Leg2), dimuon.bothLegs).second;
-  }
-
-  if ((muons.at(Leg1)).Pt() >= threshold_leg2){
-    eff_mu1_leg2 = getMuonEfficiency(configuration, muons.at(Leg1), muonsQuality.at(Leg1), dimuon.leg2).first;
-    eff_mu1_leg2_err = getMuonEfficiency(configuration, muons.at(Leg1), muonsQuality.at(Leg1), dimuon.leg2).second;
-  }
-  if ((muons.at(Leg2)).Pt() >= threshold_leg2){ 
-    eff_mu2_leg2 = getMuonEfficiency(configuration, muons.at(Leg2), muonsQuality.at(Leg2), dimuon.leg2).first;
-    eff_mu2_leg2_err = getMuonEfficiency(configuration, muons.at(Leg2), muonsQuality.at(Leg2), dimuon.leg2).second;
-  }
-
-  /*if(configuration.isData){
-    std::cout << "DATA: di_eff_mu1 = " << eff_mu1_leg1 << std::endl;
-    std::cout << "DATA: di_eff_mu2 = " << eff_mu2_leg1 << std::endl;
-  } else{
-    std::cout << "MC: di_eff_mu1 = " << eff_mu1_leg1 << std::endl;
-    std::cout << "MC: di_eff_mu2 = " << eff_mu2_leg1 << std::endl;
-    }*/
-
-  const double thedieff = eff_mu1_leg1*eff_mu2_leg2 + eff_mu2_leg1*eff_mu1_leg2 - eff_mu1_bothlegs*eff_mu2_bothlegs;
-  const double thedieff_err = getDiError(eff_mu1_leg1, eff_mu1_leg1_err,
-					 eff_mu2_leg1, eff_mu2_leg1_err,
-					 eff_mu1_leg2, eff_mu1_leg2_err,
-					 eff_mu2_leg2, eff_mu2_leg2_err,
-					 eff_mu1_bothlegs, eff_mu1_bothlegs_err,
-					 eff_mu2_bothlegs, eff_mu2_bothlegs_err);
-
-  return std::make_pair(thedieff, thedieff_err);
-
-}
-
-std::pair<double, double>
-LeptonTriggerSF::getDielectronEfficiency(const TrigMuonEff::Configuration& configuration,
-                                     const std::vector<TLorentzVector>& electrons,
-                                     const std::vector<ElectronQuality>& electronsQuality,
-                                     const std::string& chain) const
-{
-  DileptonThresholds thresholds;
-  getDileptonThresholds(configuration, thresholds);
-
-  double threshold_leg1 = 0.;
-  double threshold_leg2 = 0.;
-  DileptonTriggerName dilep_name = kNoTrig;
-  if (chain.find("2e12Tvh_loose1") != std::string::npos) {
-    threshold_leg1 = thresholds.e12Tvh_loose1;
-    threshold_leg2 = thresholds.e12Tvh_loose1;
-    dilep_name = EF_2e12Tvh_loose1;
-  } else {
-    ::Error("LeptonTriggerSF::getDielectronEfficiency",
-      ERROR_MESSAGE("Invalid dielectron or combination of single and dielectron trigger chain name given"));
-  }
-
-  double eff_el1_leg1 = 0.;
-  double eff_el2_leg1 = 0.;
-  double eff_el1_leg2 = 0.;
-  double eff_el2_leg2 = 0.;
-  double eff_el1_bothlegs = 0.;
-  double eff_el2_bothlegs = 0.;
-  double eff_el1_leg1_err = 0.;
-  double eff_el2_leg1_err = 0.;
-  double eff_el1_leg2_err = 0.;
-  double eff_el2_leg2_err = 0.;
-  double eff_el1_bothlegs_err = 0.;
-  double eff_el2_bothlegs_err = 0.;
-
-  DileptonTrigger dielectron;
-  getDileptonLegs(chain, dielectron);
-
-  enum {
-    Leg1 = 0,
-    Leg2 = 1
-  };
-
-  const int set_data_leg1 = getElectronQuality(configuration.runNumber, electronsQuality.at(Leg1), true,  true, dilep_name);
-  const int set_mc_leg1   = getElectronQuality(configuration.runNumber, electronsQuality.at(Leg1), false, true, dilep_name);
-  const int set_data_leg2 = getElectronQuality(configuration.runNumber, electronsQuality.at(Leg2), true,  true, dilep_name);
-  const int set_mc_leg2   = getElectronQuality(configuration.runNumber, electronsQuality.at(Leg2), false, true, dilep_name);
-
-  if(configuration.isData){
-    if ((electrons.at(Leg1)).Pt() >= threshold_leg1) {
-      // these two lines are the same for the electron case for now, but coded so that implementation of asymmetric dielectron trigger will be easier
-      eff_el1_leg1 = ElEff_Data(electrons.at(Leg1), set_mc_leg1, set_data_leg1, m_year, configuration).first;
-      eff_el1_leg1_err = ElEff_Data(electrons.at(Leg1), set_mc_leg1, set_data_leg1, m_year, configuration).second;
-      eff_el1_bothlegs = ElEff_Data(electrons.at(Leg1), set_mc_leg1, set_data_leg1, m_year, configuration).first;
-      eff_el1_bothlegs_err = ElEff_Data(electrons.at(Leg1), set_mc_leg1, set_data_leg1, m_year, configuration).second;
-    }
-
-    if ((electrons.at(Leg2)).Pt() >= threshold_leg1) {
-      eff_el2_leg1 = ElEff_Data(electrons.at(Leg2), set_mc_leg2, set_data_leg2, m_year, configuration).first;
-      eff_el2_leg1_err = ElEff_Data(electrons.at(Leg2), set_mc_leg2, set_data_leg2, m_year, configuration).second;
-      eff_el2_bothlegs = ElEff_Data(electrons.at(Leg2), set_mc_leg2, set_data_leg2, m_year, configuration).first;
-      eff_el2_bothlegs_err = ElEff_Data(electrons.at(Leg2), set_mc_leg2, set_data_leg2, m_year, configuration).second;
-    }
-
-    if ((electrons.at(Leg1)).Pt() >= threshold_leg2){
-      eff_el1_leg2 = ElEff_Data(electrons.at(Leg1), set_mc_leg1, set_data_leg1, m_year, configuration).first;
-      eff_el1_leg2_err = ElEff_Data(electrons.at(Leg1), set_mc_leg1, set_data_leg1, m_year, configuration).second;
-    }
-    if ((electrons.at(Leg2)).Pt() >= threshold_leg2){
-      eff_el2_leg2 = ElEff_Data(electrons.at(Leg2), set_mc_leg2, set_data_leg2, m_year, configuration).first;
-      eff_el2_leg2_err = ElEff_Data(electrons.at(Leg2), set_mc_leg2, set_data_leg2, m_year, configuration).second;
-    }
-  } else{
-    if ((electrons.at(Leg1)).Pt() >= threshold_leg1) {
-      eff_el1_leg1 = ElEff_MC(electrons.at(Leg1), set_mc_leg1, m_year, configuration).first;
-      eff_el1_leg1_err = ElEff_MC(electrons.at(Leg1), set_mc_leg1, m_year, configuration).second;
-      eff_el1_bothlegs = ElEff_MC(electrons.at(Leg1), set_mc_leg1, m_year, configuration).first;
-      eff_el1_bothlegs_err = ElEff_MC(electrons.at(Leg1), set_mc_leg1, m_year, configuration).second;
-    }
-
-    if ((electrons.at(Leg2)).Pt() >= threshold_leg1) {
-      eff_el2_leg1 = ElEff_MC(electrons.at(Leg2), set_mc_leg2, m_year, configuration).first;
-      eff_el2_leg1_err = ElEff_MC(electrons.at(Leg2), set_mc_leg2, m_year, configuration).second;
-      eff_el2_bothlegs = ElEff_MC(electrons.at(Leg2), set_mc_leg2, m_year, configuration).first;
-      eff_el2_bothlegs_err = ElEff_MC(electrons.at(Leg2), set_mc_leg2, m_year, configuration).second;
-    }
-
-    if ((electrons.at(Leg1)).Pt() >= threshold_leg2){
-      eff_el1_leg2 = ElEff_MC(electrons.at(Leg1), set_mc_leg1, m_year, configuration).first;
-      eff_el1_leg2_err = ElEff_MC(electrons.at(Leg1), set_mc_leg1, m_year, configuration).second;
-    }
-    if ((electrons.at(Leg2)).Pt() >= threshold_leg2){
-      eff_el2_leg2 = ElEff_MC(electrons.at(Leg2), set_mc_leg2, m_year, configuration).first;
-      eff_el2_leg2_err = ElEff_MC(electrons.at(Leg2), set_mc_leg2, m_year, configuration).second;
-    }
-  }
-
-  /*if(configuration.isData){
-    std::cout << "DATA: di_eff_el1 = " << eff_el1_leg1 << std::endl;
-    std::cout << "DATA: di_eff_el2 = " << eff_el2_leg1 << std::endl;
-  } else{
-    std::cout << "MC: di_eff_el1 = " << eff_el1_leg1 << std::endl;
-    std::cout << "MC: di_eff_el2 = " << eff_el2_leg1 << std::endl;
-    }*/
-
-  const double thedieff = eff_el1_leg1*eff_el2_leg2 + eff_el2_leg1*eff_el1_leg2 - eff_el1_bothlegs*eff_el2_bothlegs;
-  const double thedieff_err = getDiError(eff_el1_leg1, eff_el1_leg1_err,
-					 eff_el2_leg1, eff_el2_leg1_err,
-					 eff_el1_leg2, eff_el1_leg2_err,
-					 eff_el2_leg2, eff_el2_leg2_err,
-					 eff_el1_bothlegs, eff_el1_bothlegs_err,
-					 eff_el2_bothlegs, eff_el2_bothlegs_err);
-
-  return std::make_pair(thedieff, thedieff_err);
-
-}
-
-
-std::pair<double, double>
-LeptonTriggerSF::getSingleOrDimuonEfficiency(const TrigMuonEff::Configuration& config,
-                                             const std::vector<TLorentzVector>& muons,
-                                             const std::vector<MuonQuality>& muonsQuality,
-                                             const std::string& chain) const
-{
-  if (config.trigger.compare("mu24i_tight_or_EF_mu36_tight") != 0) {
-    ::Fatal("LeptonTriggerSF::getSingleOrDimuonEfficiency",
-            ERROR_MESSAGE("Currently dimuon trigger only with (mu24i_tight_or_mu_36_tight) trigger is supported: %s"),
-            config.trigger.c_str());
-    throw std::runtime_error("Currently dimuon trigger only with (mu24i_tight_or_mu_36_tight) trigger is supported");
-  }
-
-  const std::pair<double, double> threshold = getThresholds(config);
-
-  DileptonThresholds thresholds;
-  getDileptonThresholds(config, thresholds);
-
-  double threshold_leg1 = 0.;
-  double threshold_leg2 = 0.;
-
-  if (chain.find("mu18_tight_mu8_EFFS") != std::string::npos) {
-    threshold_leg1 = thresholds.mu18_tight;
-    threshold_leg2 = thresholds.mu8_EFFS;
-
-  } else if (chain.find("2mu13") != std::string::npos) {
-    threshold_leg1 = thresholds.mu13;
-    threshold_leg2 = thresholds.mu13;
-
-  } else {
-    ::Error("LeptonTriggerSF::getDimuonEfficiency",
-      ERROR_MESSAGE("Invalid dimuon or combination of single and dimuon trigger chain name given"));
-  }
-
-  double single_eff_tmp = 0.;
-  double dimuon_eff_tmp = 0.;
-  double overlap_term = 0.;
-
-  double mu1_eff = getMuonEfficiency(config, muons.at(0), muonsQuality.at(0)).first;
-  double mu1_eff_err = getMuonEfficiency(config, muons.at(0), muonsQuality.at(0)).second;
-  double mu2_eff = getMuonEfficiency(config, muons.at(1), muonsQuality.at(1)).first;
-  double mu2_eff_err = getMuonEfficiency(config, muons.at(1), muonsQuality.at(1)).second;
-  
-  const bool is_mu18_tight_mu8_EFFS = (chain.find("mu18_tight_mu8_EFFS") != std::string::npos);
-  const bool is_2mu13 = (chain.find("2mu13") != std::string::npos);
-
-  if (is_mu18_tight_mu8_EFFS) {
-    dimuon_eff_tmp = getDimuonEfficiency(config, muons, muonsQuality, "mu18_tight_mu8_EFFS").first;
-
-  } else if (is_2mu13) {
-    dimuon_eff_tmp = getDimuonEfficiency(config, muons, muonsQuality, "2mu13").first;
-
-  } else {
-    ::Error("LeptonTriggerSF::getSingleOrDimuonEfficiency",
-      ERROR_MESSAGE("Invalid dimuon chain name given: %s"), chain.c_str());
-    return std::make_pair(-1., -1.);
-  }
-
-  const bool is_mu1_above_threshold = ((muons.at(0)).Pt() >= threshold.first);
-  const bool is_mu2_above_threshold = ((muons.at(1)).Pt() >= threshold.first);
-
-  // all above threshold
-  //if (is_mu1_above_threshold and is_mu2_above_threshold) {
-  //
-  //  if (is_mu18_tight_mu8_EFFS) {
-  //    overlap_term = getMuonEfficiency(config, muons.at(0), muonsQuality.at(0), "mu18_tight").first*
-  //                   getMuonEfficiency(config, muons.at(1), muonsQuality.at(1), "mu18_tight").first; // this still needs to be checked!
-  //
-  //  } else {
-  //    // check whether mu13 or mu24i_tight_or_mu36_tight is more efficient
-  //    double higher_mu1 = 0;
-  //    double higher_mu2 = 0;
-  //    double eff = getMuonEfficiency(config, muons.at(0), muonsQuality.at(0), "mu13").first;
-  //    higher_mu1 = (mu1_eff > eff) ? mu1_eff : eff;
-  //
-  //    eff = getMuonEfficiency(config, muons.at(1), muonsQuality.at(1), "mu13").first;
-  //    higher_mu2 = (mu2_eff > eff) ? mu2_eff : eff;
-  //
-  //    overlap_term = higher_mu1*higher_mu2;
-  //  }
-  //
-  //// one above, one below threshold
-  //} else if (((not is_mu1_above_threshold) and is_mu2_above_threshold) or
-  //           ((not is_mu2_above_threshold) and is_mu1_above_threshold)) {
-  //  if (is_mu1_above_threshold){
-  //    mu2_eff = 0.;
-  //    mu2_eff_err = 0.;
-  //  }
-  //  if (is_mu2_above_threshold){
-  //    mu1_eff = 0.;
-  //    mu1_eff_err = 0.;
-  //  }
-  //  if (chain.find("mu18_tight_mu8_EFFS") != std::string::npos ) {
-  //    overlap_term = getMuonEfficiency(config, muons.at(0), muonsQuality.at(0), "mu18_tight").first*
-  //                   getMuonEfficiency(config, muons.at(1), muonsQuality.at(1), "mu18_tight").first; // this still needs to be checked!
-  //  } else {
-  //    overlap_term = single_eff_tmp*dimuon_eff_tmp;
-  //  }
-  //}
-
-  single_eff_tmp = mu1_eff + mu2_eff - mu1_eff*mu2_eff;
-    
-  /*if(config.isData){
-    std::cout << "DATA: single_eff = " << single_eff_tmp << ", di_eff = " << dimuon_eff_tmp << ", overlap_term = " << overlap_term << std::endl;
-    std::cout << "DATA: single_eff_mu1 = " << mu1_eff << " +- " << getMuonEfficiency(config, muons[0], muonq[0]).second << std::endl;
-    std::cout << "DATA: single_eff_mu2 = " << mu2_eff << " +- " << getMuonEfficiency(config, muons[1], muonq[1]).second << std::endl;
-  } else{
-    std::cout << "MC: single_eff = " << single_eff_tmp << ", di_eff = " << dimuon_eff_tmp << ", overlap_term = " << overlap_term << std::endl;
-    std::cout << "MC: single_eff_mu1 = " << mu1_eff << " +- " << getMuonEfficiency(config, muons[0], muonq[0]).second << std::endl;
-    std::cout << "MC: single_eff_mu2 = " << mu2_eff << " +- " << getMuonEfficiency(config, muons[1], muonq[1]).second << std::endl;
-    }*/
-
-  const double thesingleordieff = single_eff_tmp + dimuon_eff_tmp - overlap_term;
-  double thesingleordieff_err = 0.;
-
-  DileptonTrigger dimuon;
-  getDileptonLegs(chain, dimuon);
-  
-  enum {
-    Leg1 = 0,
-    Leg2 = 1
-  };
-  
-  if (chain.find("mu18_tight_mu8_EFFS") != std::string::npos ){
-
-    std::pair<double, double> mu1_leg1_pair, mu2_leg1_pair, mu1_leg2_pair, mu2_leg2_pair;
-
-    if ((muons.at(Leg1)).Pt() >= threshold_leg1) {
-      mu1_leg1_pair = getMuonEfficiency(config, muons.at(Leg1), muonsQuality.at(Leg1), dimuon.leg1);
-    }
-    if ((muons.at(Leg2)).Pt() >= threshold_leg1) {
-      mu2_leg1_pair = getMuonEfficiency(config, muons.at(Leg2), muonsQuality.at(Leg2), dimuon.leg1);
-    }
-    
-    if ((muons.at(Leg1)).Pt() >= threshold_leg2){
-      mu1_leg2_pair = getMuonEfficiency(config, muons.at(Leg1), muonsQuality.at(Leg1), dimuon.leg2);
-    }
-    if ((muons.at(Leg2)).Pt() >= threshold_leg2){ 
-      mu2_leg2_pair = getMuonEfficiency(config, muons.at(Leg2), muonsQuality.at(Leg2), dimuon.leg2);
-    }
-    
-    //const std::pair<double, double> mu1_leg1_pair = getMuonEfficiency(config, muons.at(0), muonsQuality.at(0), "mu18_tight");
-    //const std::pair<double, double> mu2_leg1_pair = getMuonEfficiency(config, muons.at(1), muonsQuality.at(1), "mu18_tight");
-    //const std::pair<double, double> mu1_leg2_pair = getMuonEfficiency(config, muons.at(0), muonsQuality.at(0), "mu8_EFFS");
-    //const std::pair<double, double> mu2_leg2_pair = getMuonEfficiency(config, muons.at(1), muonsQuality.at(1), "mu8_EFFS");
-    thesingleordieff_err = getSingleOrDiError_asym(mu1_eff, mu1_eff_err, 
-						   mu2_eff, mu2_eff_err,
-						   mu1_leg1_pair.first, mu1_leg1_pair.second,
-						   mu2_leg1_pair.first, mu2_leg1_pair.second,
-						   mu1_leg2_pair.first, mu1_leg2_pair.second,
-						   mu2_leg2_pair.first, mu2_leg2_pair.second,
-						   mu1_leg1_pair.first, mu1_leg1_pair.second, // should be eff(bothlegs) but approximated to mu18_tight for now
-						   mu2_leg1_pair.first, mu2_leg1_pair.second); // should be eff(bothlegs) but approximated to mu18_tight for now
-  } else{
-    std::pair<double, double> mu1_pair, mu2_pair;
-    if (is_mu1_above_threshold){
-      mu1_pair  = getMuonEfficiency(config, muons.at(0), muonsQuality.at(0), "mu13");
-    }
-    if(is_mu2_above_threshold){
-      mu2_pair = getMuonEfficiency(config, muons.at(1), muonsQuality.at(1), "mu13");
-    }
-    thesingleordieff_err = getSingleOrDiError_sym(mu1_eff, mu1_eff_err, 
-						  mu2_eff, mu2_eff_err, 
-						  mu1_pair.first, mu1_pair.second,
-						  mu2_pair.first, mu2_pair.second,
-						  is_mu1_above_threshold, is_mu2_above_threshold);
-  }
-
-  return std::make_pair(thesingleordieff, thesingleordieff_err);
-
-}
-
-std::pair<double, double>
-LeptonTriggerSF::getSingleOrDielectronEfficiency(const TrigMuonEff::Configuration& config,
-                                             const std::vector<TLorentzVector>& electrons,
-                                             const std::vector<ElectronQuality>& electronsQuality,
-                                             const std::string& chain) const
-{
-  if (!(chain.find("e24vhi_medium1_or_e60_medium1") != std::string::npos)) {
-    ::Fatal("LeptonTriggerSF::getSingleOrDielectronEfficiency",
-            ERROR_MESSAGE("Currently dielectron trigger only with (e24vhi_medium1_or_e60_medium1) trigger is supported."));
-    throw std::runtime_error("Currently dielectron trigger only with (e24vhi_medium1_or_e60_medium1) trigger is supported");
-  }
-
-  const std::pair<double, double> threshold_singleLep = getThresholds(config);
-
-  DileptonThresholds thresholds;
-  getDileptonThresholds(config, thresholds);
-
-  double single_eff_tmp = 0.;
-  double dielectron_eff_tmp = 0.;
-  double overlap_term = 0.;
-
-  // Set single lepton trigger efficiencies and pt plateau
-  const int set_data_el1 = getElectronQuality(config.runNumber, electronsQuality.at(0), true,  false, kNoTrig);
-  const int set_mc_el1   = getElectronQuality(config.runNumber, electronsQuality.at(0), false, false, kNoTrig);
-  const int set_data_el2 = getElectronQuality(config.runNumber, electronsQuality.at(1), true,  false, kNoTrig);
-  const int set_mc_el2   = getElectronQuality(config.runNumber, electronsQuality.at(1), false, false, kNoTrig);
-  double el1_eff = 0.;
-  double el1_eff_err = 0.;
-  double el2_eff = 0.;
-  double el2_eff_err = 0.;
-  const bool is_el1_above_threshold = ((electrons.at(0)).Pt() >= threshold_singleLep.first);
-  const bool is_el2_above_threshold = ((electrons.at(1)).Pt() >= threshold_singleLep.first);
-
-  if(config.isData){
-    if(is_el1_above_threshold){
-      el1_eff = ElEff_Data(electrons.at(0), set_mc_el1, set_data_el1, m_year, config).first;
-      el1_eff_err = ElEff_Data(electrons.at(0), set_mc_el1, set_data_el1, m_year, config).second;
-    }
-    if(is_el2_above_threshold){
-      el2_eff = ElEff_Data(electrons.at(1), set_mc_el2, set_data_el2, m_year, config).first;
-      el2_eff_err = ElEff_Data(electrons.at(1), set_mc_el2, set_data_el2, m_year, config).second;
-    }
-  } else{
-    if(is_el1_above_threshold){
-      el1_eff = ElEff_MC(electrons.at(0), set_mc_el1, m_year, config).first;
-      el1_eff_err = ElEff_MC(electrons.at(0), set_mc_el1, m_year, config).second;
-    }
-    if(is_el2_above_threshold){
-      el2_eff = ElEff_MC(electrons.at(1), set_mc_el2, m_year, config).first;
-      el2_eff_err = ElEff_MC(electrons.at(1), set_mc_el2, m_year, config).second;
-    }
-  }
-  
-  single_eff_tmp = el1_eff + el2_eff - el1_eff*el2_eff;
-
-  const bool is_2e12Tvh_loose1 = (chain.find("2e12Tvh_loose1") != std::string::npos);
-  DileptonTriggerName dilep_name = kNoTrig;
-  if (is_2e12Tvh_loose1) {
-    dielectron_eff_tmp = getDielectronEfficiency(config, electrons, electronsQuality, "2e12Tvh_loose1").first;
-    dilep_name = EF_2e12Tvh_loose1;
-  } else {
-    ::Error("LeptonTriggerSF::getSingleOrDielectronEfficiency",
-      ERROR_MESSAGE("Invalid dielectron chain name given: %s"), chain.c_str());
-    return std::make_pair(-1., -1);
-  }
-
-  const int set_data_el1_low = getElectronQuality(config.runNumber, electronsQuality.at(0), true,  true, dilep_name);
-  const int set_mc_el1_low   = getElectronQuality(config.runNumber, electronsQuality.at(0), false, true, dilep_name);
-  const int set_data_el2_low = getElectronQuality(config.runNumber, electronsQuality.at(1), true,  true, dilep_name);
-  const int set_mc_el2_low   = getElectronQuality(config.runNumber, electronsQuality.at(1), false, true, dilep_name);
-  
-  //if(thresholds.e12Tvh_loose1>electrons.at(0).Pt()){
-  //  if(config.isData){
-  //    eff = ElEff_Data(electrons.at(0), set_mc_el1_low, set_data_el1_low, m_year, config).first;
-  //  } else{
-  //    eff = ElEff_MC(electrons.at(0), set_mc_el1_low, m_year, config).first;
-  //  }
-  //}
-  //higher_el1 = (el1_eff > eff) ? el1_eff : eff;
-  //if(thresholds.e12Tvh_loose1>electrons.at(1).Pt()){
-  //  if(config.isData){
-  //    eff = ElEff_Data(electrons.at(1), set_mc_el2_low, set_data_el2_low, m_year, config).first;
-  //  } else{
-  //    eff = ElEff_MC(electrons.at(1), set_mc_el2_low, m_year, config).first;
-  //  }
-  //}
-
-  // all above threshold
-  //if (is_el1_above_threshold and is_el2_above_threshold) {
-  //
-  //  // check whether e12Tvh_loose1 or e24vhi_medium1_or_e60_medium1 is more efficient
-  //  double higher_el1 = 0;
-  //  double higher_el2 = 0;
-  //  double eff = 0.;
-  //  if(thresholds.e12Tvh_loose1>electrons.at(0).Pt()){
-  //    if(config.isData){
-  //	eff = ElEff_Data(electrons.at(0), set_mc_el1_low, set_data_el1_low, m_year, config).first;
-  //    } else{
-  //	eff = ElEff_MC(electrons.at(0), set_mc_el1_low, m_year, config).first;
-  //    }
-  //  }
-  //  higher_el1 = (el1_eff > eff) ? el1_eff : eff;
-  //  if(thresholds.e12Tvh_loose1>electrons.at(1).Pt()){
-  //    if(config.isData){
-  //	eff = ElEff_Data(electrons.at(1), set_mc_el2_low, set_data_el2_low, m_year, config).first;
-  //    } else{
-  //	eff = ElEff_MC(electrons.at(1), set_mc_el2_low, m_year, config).first;
-  //    }
-  //  }
-  //  higher_el2 = (el2_eff > eff) ? el2_eff : eff;
-  //  
-  //  overlap_term = higher_el1*higher_el2;
-  //  
-  //// one above, one below threshold
-  //} else if (((not is_el1_above_threshold) and is_el2_above_threshold) or
-  //           ((not is_el2_above_threshold) and is_el1_above_threshold)) {
-  //  if (is_el1_above_threshold){
-  //    el2_eff = 0.;
-  //    el2_eff_err = 0.;
-  //  }
-  //  if (is_el2_above_threshold){
-  //    el1_eff = 0.;
-  //    el1_eff_err = 0.;
-  //  }
-  //  overlap_term = single_eff_tmp*dielectron_eff_tmp;
-  //}
-
-  overlap_term = single_eff_tmp*dielectron_eff_tmp;
-
-  const double thesingleordieff = single_eff_tmp + dielectron_eff_tmp - overlap_term;
-  double thesingleordieff_err = 0.;
-  std::pair<double, double> el1_pair = std::make_pair(0., 0.);
-  std::pair<double, double> el2_pair = std::make_pair(0., 0.);
-  if(config.isData){
-    if(thresholds.e12Tvh_loose1<electrons.at(0).Pt())
-      el1_pair = ElEff_Data(electrons.at(0), set_mc_el1_low, set_data_el1_low, m_year, config);
-    if(thresholds.e12Tvh_loose1<electrons.at(1).Pt())
-      el2_pair = ElEff_Data(electrons.at(1), set_mc_el2_low, set_data_el2_low, m_year, config);
-  } else{
-    if(thresholds.e12Tvh_loose1<electrons.at(0).Pt())
-      el1_pair = ElEff_MC(electrons.at(0), set_mc_el1_low, m_year, config);
-    if(thresholds.e12Tvh_loose1<electrons.at(1).Pt())
-      el2_pair = ElEff_MC(electrons.at(1), set_mc_el2_low, m_year, config);
-  }
-  thesingleordieff_err = getSingleOrDiError_sym(el1_eff, el1_eff_err, 
-						el2_eff, el2_eff_err, 
-						el1_pair.first, el1_pair.second,
-						el2_pair.first, el2_pair.second,
-						is_el1_above_threshold, is_el2_above_threshold);
-  
-  return std::make_pair(thesingleordieff, thesingleordieff_err);
-
-}
-
-
-std::pair<double, double>
-LeptonTriggerSF::getElectronSF(const TLorentzVector& electron,
-                               const int combination,
-                               const int /* year : not needed for ElectronEfficiencyCorrection */,
-                               const TrigMuonEff::Configuration& config) const
-{
-  const double eta = electron.Eta();
-  double pt = electron.Pt();
-  if (config.useGeV) pt *= GeVtoMeV;
-
-  if (not m_electronSF[combination]) throw std::runtime_error("getElectronSF: m_electronSF[..] is not initialised for the given combination.");
-  const Root::TResult& rc = m_electronSF[combination]->calculate(config.isAFII ? PATCore::ParticleDataType::Fast : PATCore::ParticleDataType::Full, config.runNumber, eta, pt);
-
-  return std::pair<double, double>(rc.getScaleFactor(), rc.getTotalUncertainty());
-}
-
-
-
-std::pair<double, double>
-LeptonTriggerSF::ElEff_Data(const TLorentzVector& electron,
-                            const int combinationSF,
-                            const int combinationEfficiency,
-                            const int year,
-                            const TrigMuonEff::Configuration& config) const
-{
-  std::pair<double, double> sf = getElectronSF(electron, combinationSF, year, config);
-  std::pair<double, double> mcEfficiency = getElectronSF(electron, combinationEfficiency, year, config);
-
-  const double efficiency = sf.first * mcEfficiency.first;
-  const double par1 = sf.second / sf.first;
-  const double par2 = mcEfficiency.second / mcEfficiency.first;
-  const double error = efficiency * sqrt(par1*par1 + par2*par2);
-
-  return std::make_pair(efficiency, error);
-}
-
-
-
-void
-LeptonTriggerSF::createMcReplicaMuon(const int n,
-                                     const std::string& trigger)
-{
-  const bool filter = not trigger.empty();
-  m_efficiencyMapReplicaArray.clear();
-
-  // create n replica maps
-  for (int ii = 0; ii < n; ii++) {
-    EfficiencyMap map;
-    for (EfficiencyMap::const_iterator cit = m_efficiencyMap.begin();
-        cit != m_efficiencyMap.end();
-        cit++) {
-      const std::string& name = cit->first;
-      TH2* th2 = cit->second;
-
-      if (filter and (name.find(trigger) == std::string::npos)) continue;
-      if (not th2) {
-        ::Fatal("LeptonTriggerSF::createMcReplicaMuon",
-                ERROR_MESSAGE("An internal coding error detected"));
-        throw std::runtime_error("An internal coding error detected");
-      }
-
-      TH2* hcopy = dynamic_cast<TH2*>(th2->Clone());
-      if (not hcopy) {
-        ::Fatal("LeptonTriggerSF::createMcReplicaMuon",
-                ERROR_MESSAGE("Couldn't make copy of histogram \"%s\""), name.c_str());
-        throw std::runtime_error(("Couldn't make copy of histogram " + name ).c_str());
-      }
-
-      std::pair<EfficiencyMap::iterator, bool> rc = map.insert(EfficiencyPair(name, hcopy));
-      if (not rc.second) {
-        ::Fatal("LeptonTriggerSF::createMcReplicaMuon",
-                ERROR_MESSAGE("histogram \"%s\" duplicated"), name.c_str());
-        throw std::runtime_error(("histogram duplication: " + name).c_str());
-      }
-    }
-    m_efficiencyMapReplicaArray.push_back(map);
-  }
-
-
-  // fill n replica maps
-  for (EfficiencyMap::const_iterator cit = m_efficiencyMap.begin();
-      cit != m_efficiencyMap.end();
-      cit++) {
-
-    const std::string& name = cit->first;
-    TH2* th2 = cit->second;
-
-    if (filter and (name.find(trigger) == std::string::npos)) continue;
-
-    if (not th2) {
-      ::Fatal("LeptonTriggerSF::createMcReplicaMuon",
-              ERROR_MESSAGE("An internal coding error detected"));
-      throw std::runtime_error("An internal coding error detected");
-    }
-
-
-    for (int ii = 1; ii <= th2->GetNbinsX(); ii++) {
-      for (int jj = 1; jj <= th2->GetNbinsY(); jj++) {
-        const double efficiency = th2->GetBinContent(ii, jj);
-        const double statisticalError = th2->GetBinError(ii, jj);
-        TRandom random = TRandom();
-
-        for (int kk = 0; kk < n; kk++) {
-          EfficiencyMap &map = m_efficiencyMapReplicaArray.at(kk);
-          EfficiencyMap::const_iterator itr = map.find(name);
-          if (itr == map.end()) {
-            ::Fatal("LeptonTriggerSF::createMcReplicaMuon",
-                    ERROR_MESSAGE("Could not find what you are looking for in the efficiency map. \"%s\" "
-                                  "This is either a bug or you are not using the right .root file, please double check."),
-                                  name.c_str());
-            throw std::runtime_error("Internal coding error detected");
-          }
-          const double v = random.Gaus(efficiency, statisticalError);
-          (itr->second)->SetBinContent(ii, jj, v);
-        }
-      }
-    }
-  }
-}
-
-
-
-std::pair<double, double>
-LeptonTriggerSF::getSfReplicaMuon(const int runNumber,
-                                  const bool useGeV,
-                                  const std::vector<TLorentzVector>& muons,
-                                  const std::vector<MuonQuality>& muonsQuality,
-                                  const int index,
-                                  TrigMuonEff::Configuration* config) const
-{
-  std::vector<TLorentzVector> electrons;
-  std::vector<ElectronQuality> electronsQuality;
-
-  TrigMuonEff::Configuration configuration;
-  configuration.runNumber = runNumber;
-  configuration.useGeV = useGeV;
-  configuration.setByUser = false;
-  configuration.replicaIndex = index;
-  configuration.isAFII = m_IsAFII;
-
-  if (config) {
-    configuration.setByUser = true;
-    configuration.trigger = config->trigger;
-    configuration.period = config->period;
-    configuration.binning = config->binning;
-  }
-
-  return GetTriggerSF(configuration, muons, muonsQuality, electrons, electronsQuality);
-}
-
-
-
-/*=================================================================* 
- * private methods
- *=================================================================*/
-void
-LeptonTriggerSF::prepareForElectronSF(const std::string& directory)
-{
-  std::string path = directory;
-  if (path.empty()) {
-    const char *tmparea = gSystem->Getenv("TestArea");
-    if (tmparea) {
-      path = std::string(tmparea) + "/InstallArea/XML/ElectronEfficiencyCorrection/";
-      ::Info("LeptonTriggerSF::prepareForElectronSF", "Using default directory: %s", path.c_str());
-
-    } else {
-      ::Warning("LeptonTriggerSF::prepareForElectronSF",
-                "You are not running in Athena but also did not set a directory to the root file." );
-    }
-
-  } else {
-    ::Info("LeptonTriggerSF::prepareForElectronSF", "Using user defined directory: %s", path.c_str());
-  }
-
-
-  m_fileNameMap.clear();
-  // 2011 Trigger
-  if (m_electronFileVersion=="rel17p0.v02"){
-    // old v01 version since we don't have for now a v02 version !!!
-    m_fileNameMap[27] = path + "/" + "efficiencySF.e20_medium.Loose.2011.7TeV.rel17p0.v01.root";
-    m_fileNameMap[20] = path + "/" + "efficiency.e20_medium.Loose.2011.7TeV.rel17p0.v01.root";
-    
-    m_fileNameMap[8]  = path + "/" + "efficiencySF.e20_medium.Medium.2011.7TeV.rel17p0.v01.root";
-    m_fileNameMap[9]  = path + "/" + "efficiency.e20_medium.Medium.2011.7TeV.rel17p0.v01.root";
-    
-    m_fileNameMap[10] = path + "/" + "efficiencySF.e20_medium.Tight.2011.7TeV.rel17p0.v01.root";
-    m_fileNameMap[11] = path + "/" + "efficiency.e20_medium.Tight.2011.7TeV.rel17p0.v01.root";
-    
-    m_fileNameMap[28] = path + "/" + "efficiencySF.e22_medium1.Loose.2011.7TeV.rel17p0.v01.root";
-    m_fileNameMap[21] = path + "/" + "efficiency.e22_medium1.Loose.2011.7TeV.rel17p0.v01.root";
-    
-    m_fileNameMap[12] = path + "/" + "efficiencySF.e22_medium.Medium.2011.7TeV.rel17p0.v01.root";
-    m_fileNameMap[13] = path + "/" + "efficiency.e22_medium.Medium.2011.7TeV.rel17p0.v01.root";
-    
-    m_fileNameMap[14] = path + "/" + "efficiencySF.e22_medium.Tight.2011.7TeV.rel17p0.v01.root";
-    m_fileNameMap[15] = path + "/" + "efficiency.e22_medium.Tight.2011.7TeV.rel17p0.v01.root";
-    
-    m_fileNameMap[29] = path + "/" + "efficiencySF.e22vh_medium1.Loose.2011.7TeV.rel17p0.v01.root";
-    m_fileNameMap[22] = path + "/" + "efficiency.e22vh_medium1.Loose.2011.7TeV.rel17p0.v01.root";
-    
-    m_fileNameMap[16] = path + "/" + "efficiencySF.e22vh_medium1.Medium.2011.7TeV.rel17p0.v01.root";
-    m_fileNameMap[17] = path + "/" + "efficiency.e22vh_medium1.Medium.2011.7TeV.rel17p0.v01.root";
-    
-    m_fileNameMap[18] = path + "/" + "efficiencySF.e22vh_medium1.Tight.2011.7TeV.rel17p0.v01.root";
-    m_fileNameMap[19] = path + "/" + "efficiency.e22vh_medium1.Tight.2011.7TeV.rel17p0.v01.root";
-    
-  }else{
-    m_fileNameMap[27] = path + "/" + "efficiencySF.e20_medium.Loose.2011.7TeV." + m_electronFileVersion + ".root";
-    m_fileNameMap[20] = path + "/" + "efficiency.e20_medium.Loose.2011.7TeV." + m_electronFileVersion + ".root";
-    
-    m_fileNameMap[8]  = path + "/" + "efficiencySF.e20_medium.Medium.2011.7TeV." + m_electronFileVersion + ".root";
-    m_fileNameMap[9]  = path + "/" + "efficiency.e20_medium.Medium.2011.7TeV." + m_electronFileVersion + ".root";
-    
-    m_fileNameMap[10] = path + "/" + "efficiencySF.e20_medium.Tight.2011.7TeV." + m_electronFileVersion + ".root";
-    m_fileNameMap[11] = path + "/" + "efficiency.e20_medium.Tight.2011.7TeV." + m_electronFileVersion + ".root";
-    
-    m_fileNameMap[28] = path + "/" + "efficiencySF.e22_medium1.Loose.2011.7TeV." + m_electronFileVersion + ".root";
-    m_fileNameMap[21] = path + "/" + "efficiency.e22_medium1.Loose.2011.7TeV." + m_electronFileVersion + ".root";
-    
-    m_fileNameMap[12] = path + "/" + "efficiencySF.e22_medium.Medium.2011.7TeV." + m_electronFileVersion + ".root";
-    m_fileNameMap[13] = path + "/" + "efficiency.e22_medium.Medium.2011.7TeV." + m_electronFileVersion + ".root";
-    
-    m_fileNameMap[14] = path + "/" + "efficiencySF.e22_medium.Tight.2011.7TeV." + m_electronFileVersion + ".root";
-    m_fileNameMap[15] = path + "/" + "efficiency.e22_medium.Tight.2011.7TeV." + m_electronFileVersion + ".root";
-    
-    m_fileNameMap[29] = path + "/" + "efficiencySF.e22vh_medium1.Loose.2011.7TeV." + m_electronFileVersion + ".root";
-    m_fileNameMap[22] = path + "/" + "efficiency.e22vh_medium1.Loose.2011.7TeV." + m_electronFileVersion + ".root";
-    
-    m_fileNameMap[16] = path + "/" + "efficiencySF.e22vh_medium1.Medium.2011.7TeV." + m_electronFileVersion + ".root";
-    m_fileNameMap[17] = path + "/" + "efficiency.e22vh_medium1.Medium.2011.7TeV." + m_electronFileVersion + ".root";
-    
-    m_fileNameMap[18] = path + "/" + "efficiencySF.e22vh_medium1.Tight.2011.7TeV." + m_electronFileVersion + ".root";
-    m_fileNameMap[19] = path + "/" + "efficiency.e22vh_medium1.Tight.2011.7TeV." + m_electronFileVersion + ".root";
-  }
-
-  // 2012 Trigger
-  m_fileNameMap[31] = path + "/" + "efficiencySF.e24vhi_medium1_e60_medium1.Loose.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[32] = path + "/" + "efficiency.e24vhi_medium1_e60_medium1.Loose.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_fileNameMap[33] = path + "/" + "efficiencySF.e24vhi_medium1_e60_medium1.Medium.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[34] = path + "/" + "efficiency.e24vhi_medium1_e60_medium1.Medium.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_fileNameMap[35] = path + "/" + "efficiencySF.e24vhi_medium1_e60_medium1.Tight.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[36] = path + "/" + "efficiency.e24vhi_medium1_e60_medium1.Tight.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_fileNameMap[37] = path + "/" + "efficiencySF.e24vhi_medium1_e60_medium1.Multilepton.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[38] = path + "/" + "efficiency.e24vhi_medium1_e60_medium1.Multilepton.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_fileNameMap[39] = path + "/" + "efficiencySF.e12Tvh_loose1.Loose.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[40] = path + "/" + "efficiency.e12Tvh_loose1.Loose.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_fileNameMap[41] = path + "/" + "efficiencySF.e12Tvh_loose1.Medium.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[42] = path + "/" + "efficiency.e12Tvh_loose1.Medium.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_fileNameMap[43] = path + "/" + "efficiencySF.e12Tvh_loose1.Tight.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[44] = path + "/" + "efficiency.e12Tvh_loose1.Tight.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_fileNameMap[45] = path + "/" + "efficiencySF.e12Tvh_loose1.Multilepton.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[46] = path + "/" + "efficiency.e12Tvh_loose1.Multilepton.2012.8TeV." + m_electronFileVersion + ".root";
-
-  // new egamma likelihood ID
-
-  // LLH Loose
-  m_fileNameMap[50] = path + "/" + "efficiencySF.e24vhi_medium1_e60_medium1.LooseLLH.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[51] = path + "/" + "efficiency.e24vhi_medium1_e60_medium1.LooseLLH.2012.8TeV." + m_electronFileVersion + ".root";
- 
-  m_fileNameMap[52] = path + "/" + "efficiencySF.e12Tvh_loose1.LooseLLH.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[53] = path + "/" + "efficiency.e12Tvh_loose1.LooseLLH.2012.8TeV." + m_electronFileVersion + ".root";
-
-  // LLH VeryTight
-  m_fileNameMap[54] = path + "/" + "efficiencySF.e24vhi_medium1_e60_medium1.VeryTightLLH.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[55] = path + "/" + "efficiency.e24vhi_medium1_e60_medium1.VeryTightLLH.2012.8TeV." + m_electronFileVersion + ".root";
- 
-  m_fileNameMap[56] = path + "/" + "efficiencySF.e12Tvh_loose1.VeryTightLLH.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[57] = path + "/" + "efficiency.e12Tvh_loose1.VeryTightLLH.2012.8TeV." + m_electronFileVersion + ".root";
-
-  // the medium1 e12Tvh_medium1
-  m_fileNameMap[70] = path + "/" + "efficiencySF.e12Tvh_medium1.Loose.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[71] = path + "/" + "efficiency.e12Tvh_medium1.Loose.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_fileNameMap[72] = path + "/" + "efficiencySF.e12Tvh_medium1.Medium.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[73] = path + "/" + "efficiency.e12Tvh_medium1.Medium.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_fileNameMap[74] = path + "/" + "efficiencySF.e12Tvh_medium1.Tight.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[75] = path + "/" + "efficiency.e12Tvh_medium1.Tight.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_fileNameMap[76] = path + "/" + "efficiencySF.e12Tvh_medium1.Multilepton.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[77] = path + "/" + "efficiency.e12Tvh_medium1.Multilepton.2012.8TeV." + m_electronFileVersion + ".root";
-
-  // LLH Loose e12Tvh_medium1
-  m_fileNameMap[78] = path + "/" + "efficiencySF.e12Tvh_medium1.LooseLLH.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[79] = path + "/" + "efficiency.e12Tvh_medium1.LooseLLH.2012.8TeV." + m_electronFileVersion + ".root";
-
-  // LLH VeryTight e12Tvh_medium1
-  m_fileNameMap[80] = path + "/" + "efficiencySF.e12Tvh_medium1.VeryTightLLH.2012.8TeV." + m_electronFileVersion + ".root";
-  m_fileNameMap[81] = path + "/" + "efficiency.e12Tvh_medium1.VeryTightLLH.2012.8TeV." + m_electronFileVersion + ".root";
-
-  m_electronSF.clear();
-
-}
-
-std::string
-LeptonTriggerSF::getPathName(const std::string& directory,
-                             const std::string& fileName) const
-{
-  //
-  // construct a path to a root file
-  //
-  std::string path = directory;
-  if (path.empty()) { // default to InstallArea/share for the files if running in Athena
-    const char *tmparea = gSystem->Getenv("TestArea");
-    if (tmparea) {
-      path = std::string(tmparea) + "/InstallArea/share/";
-      ::Info("LeptonTriggerSF::getPathName", "Using default directory: %s", path.c_str());
-
-    } else {
-      ::Warning("LeptonTriggerSF::getPathName",
-                "You are not running in Athena but also did not set a directory to the root file." );
-    }
-
-  } else {
-    ::Info("LeptonTriggerSF::getPathName", "Using user defined directory: %s", path.c_str());
-  }
-
-
-  std::string name = fileName;
-  if (fileName.empty()) {
-    if (m_year == 2011) {
-      name = "muon_trigger_sf_mc11c.root";
-      ::Info("LeptonTriggerSF::getPathName", "Using default file for 2011: %s", name.c_str());
-
-    } else if (m_year == 2012) {
-      name = "muon_trigger_sf_2012_AtoL.p1328.root";
-      ::Info("LeptonTriggerSF::getPathName", "Using default file for 2012: %s", name.c_str());
-
-    } else {
-      ::Error("LeptonTriggerSF::getPathName",
-              "unknown year specified. cannot define default file.");
-      throw std::runtime_error("Unknown year: cannot define default file.");
-    }
-
-  } else {
-    ::Info("LeptonTriggerSF::getPathName", "Using user defined file name: %s", name.c_str());
-  }
-
-  return path + "/" + name;
-}
-
-void
-LeptonTriggerSF::setStorage(Storage& storage) const
-{
-  //
-  // Constants used in the file reading:
-  //
-  static const std::string type_[] = {"data", "mc"};
-  static const std::vector<std::string> type(type_, type_ + sizeof(type_)/sizeof(std::string));
-
-  static const std::string region_[]  = {"barrel", "endcap"};
-  static const std::vector<std::string> region(region_, region_ + sizeof(region_)/sizeof(std::string));
-
-
-  static std::vector<std::string> quality2011, quality2012;
-  if ((not m_qualities.empty()) and ((m_qualities.size() != 2) and (m_qualities.size() != 1))) {
-    ::Fatal("LeptonTriggerSF::setStorage",
-            ERROR_MESSAGE("If giving a muon qualities vector, it needs to be of size 2."));
-    throw std::runtime_error("Muon qualities vector has wrong size ");
-
-  } else if ((m_qualities.size() == 2) or (m_qualities.size() == 1)) {
-    quality2011 = m_qualities;
-    quality2012 = m_qualities;
-
-  } else {
-    // If multiple instances of the tool are initialized within the same
-    // process, we have to be careful not to fill these vectors multiple
-    // times:
-    quality2011.clear();
-    quality2012.clear();
-    quality2011.push_back("loose");
-    quality2011.push_back("combined");
-    quality2012.push_back("loose");
-    quality2012.push_back("combined");
-  }
-
-
-  // 2011
-  static const std::string bins2011_[]    = {"fine", "coarse"};
-  static const std::vector<std::string> bins2011(bins2011_, bins2011_ + sizeof(bins2011_)/sizeof(std::string));
-
-  static const std::string trigger2011_[] = {"mu18_MG", "mu18_MG_medium", "mu18_MG_medium",
-                                             "mu18_MG_medium", "mu18_MG_medium", "mu18_MG_medium", "mu18_MG_medium", "mu18_MG_medium"};
-  static const std::vector<std::string> trigger2011(trigger2011_, trigger2011_ + sizeof(trigger2011_)/sizeof(std::string));
-
-  static const std::string period2011_[] = {"BtoI", "JtoMwoL3toL4", "L3toL4",
-                                            "J", "K", "JtoK", "JtoM", "LtoM"};
-  static const std::vector<std::string> period2011(period2011_, period2011_ + sizeof(period2011_)/sizeof(std::string));
-
-
-  // 2012
-  static const std::string bins2012_[]    = {"fine", "coarse"};
-  static const std::vector<std::string> bins2012(bins2012_, bins2012_ + sizeof(bins2012_)/sizeof(std::string));
-
-  static const std::string trigger2012_[] = {"mu24i_tight_or_EF_mu36_tight", "mu24i_tight_or_EF_mu36_tight", "mu24i_tight_or_EF_mu36_tight", "mu24i_tight_or_EF_mu36_tight", "mu24i_tight_or_EF_mu36_tight",
-                                             "mu24i_tight", "mu24i_tight", "mu24i_tight", "mu24i_tight", "mu24i_tight",
-                                             "mu18_tight", "mu18_tight", "mu18_tight", "mu18_tight", "mu18_tight",
-                                             "mu36_tight", "mu36_tight", "mu36_tight", "mu36_tight", "mu36_tight",
-                                             "mu8_EFFS", "mu8_EFFS", "mu8_EFFS", "mu8_EFFS", "mu8_EFFS",
-                                             "mu8", "mu8", "mu8", "mu8", "mu8",
-                                             "mu13", "mu13", "mu13", "mu13", "mu13"};
-  static const std::vector<std::string> trigger2012(trigger2012_, trigger2012_ + sizeof(trigger2012_)/sizeof(std::string));
-
-  static const std::string period2012_[] = {"A", "B", "CtoE", "G", "HtoL",
-                                            "A", "B", "CtoE", "G", "HtoL",
-                                            "A", "B", "CtoE", "G", "HtoL",
-                                            "A", "B", "CtoE", "G", "HtoL",
-                                            "A", "B", "CtoE", "G", "HtoL",
-                                            "A", "B", "CtoE", "G", "HtoL",
-                                            "A", "B", "CtoE", "G", "HtoL"};
-  static const std::vector<std::string> period2012(period2012_, period2012_ + sizeof(period2012_)/sizeof(std::string));
-
-
-  storage.type = &type;
-  storage.region = &region;
-  switch (m_year) {
-    case 2011:
-      storage.trigger = &trigger2011;
-      storage.period = &period2011;
-      storage.quality = &quality2011;
-      storage.bins = &bins2011;
-      break;
-
-    case 2012:
-      storage.trigger = &trigger2012;
-      storage.period = &period2012;
-      storage.quality = &quality2012;
-      storage.bins = &bins2012;
-      break;
-
-    default:
-      ::Fatal("LeptonTriggerSF::setStorage",
-              ERROR_MESSAGE("Unknown year: %d"), m_year);
-      throw std::runtime_error("unknown year");
-      break;
-  }
-
-  if (storage.period->size() != storage.trigger->size()) {
-    ::Fatal("LeptonTriggerSF::setStorage",
-            ERROR_MESSAGE("size of period and trigger is different: check configuration"));
-    throw std::runtime_error("size of period and trigger is different: check configuration");
-  }
-
-  ::Info("LeptonTriggerSF::setStorage",
-         "Year = %d, nperiods = %u", m_year, (unsigned int)storage.period->size());
-  ::Info("LeptonTriggerSF::setStorage",
-         "nquality = %u, nbins = %u, ntype = %u, nregion = %u",
-         (unsigned int)storage.quality->size(), (unsigned int)storage.bins->size(), (unsigned int)storage.type->size(), (unsigned int)storage.region->size());
-
-  return;
-}
-
-
-
-TDirectory*
-LeptonTriggerSF::getTemporaryDirectory(void) const
-{
-  //
-  // Create a unique directory in memory to hold the histograms:
-  //
-  gROOT->cd();
-  TDirectory* tempDir = 0;
-  int counter = 0;
-  while (not tempDir) {
-    // First, let's find a directory name that doesn't exist yet:
-    std::stringstream dirname;
-    dirname << "LeptonTriggerSFTempDir_%i" << counter;
-    if (gROOT->GetDirectory((dirname.str()).c_str())) {
-      ++counter;
-      continue;
-    }
-    // Let's try to make this directory:
-    tempDir = gROOT->mkdir((dirname.str()).c_str());
-    if (not tempDir) {
-      ::Fatal("LeptonTriggerSF::getTemporaryDirectory",
-              ERROR_MESSAGE("Temporary directory could not be created"));
-      throw std::runtime_error("Temporary directory could not be created");
-    }
-  }
-
-  return tempDir;
-}
-
-
-
-void
-LeptonTriggerSF::initialise(const std::string& directory,
-                            const std::string& fileName,
-                            const std::vector<std::string>& qualities,
-                            const std::string& directoryElectron)
-{
-  prepareForElectronSF(directoryElectron);
-
-  m_max_period = TrigMuonEff::period_undefined;
-
-  m_qualities = qualities;
-
-  // Remember which TDirectory the system is in at the beginning of the method:
-  TDirectory* origDir = gDirectory;
-
-  // set parameters for reading a root file
-  Storage storage;
-  setStorage(storage);
-
-  // Open the efficiency file:
-  const std::string filePath = getPathName(directory, fileName);
-  TFile* file = TFile::Open(filePath.c_str());
-
-  if (not file) {
-    ::Fatal("LeptonTriggerSF::initialise", ERROR_MESSAGE("Couldn't open file \"%s\""), filePath.c_str());
-    throw std::runtime_error(("Couldn't open file \"" + filePath + "\". input root files are available at "
-                              "https://twiki.cern.ch/twiki/bin/viewauth/Atlas/TrigMuonEfficiency "
-                              "or in /afs/cern.ch/user/t/takashi/public/SF2012/").c_str());
-  }
-
-  ::Info("LeptonTriggerSF::initialise", "File \"%s\" opened", file->GetName());
-
-
-  // Create a unique directory in memory to hold the histograms:
-  TDirectory* tempDir = getTemporaryDirectory();
-  tempDir->cd();
-
-  //
-  // Read in the histograms:
-  //
-  for (size_t iqu = 0; iqu < storage.quality->size(); ++iqu) {
-    for (size_t ibins = 0; ibins < storage.bins->size(); ++ibins) {
-      for (size_t iperiod = 0; iperiod < storage.period->size(); ++iperiod) {
-        for (size_t iregion = 0; iregion < storage.region->size(); ++iregion) {
-          for (size_t itype = 0; itype < storage.type->size(); ++itype) {
-
-            // Construct the histogram name:
-            std::string histname = ("_MuonTrigEff_" + storage.period->at(iperiod) + "_" +
-                                    ((m_year > 2011) ? storage.trigger->at(iperiod) + "_" : "") +
-                                    storage.quality->at(iqu) +
-                                    "_EtaPhi_" +
-                                    storage.bins->at(ibins) + "_" +
-                                    storage.region->at(iregion) + "_" +
-                                    storage.type->at(itype));
-            // Try to access the histogram:
-            std::string path = (storage.quality->at(iqu) + "/" +
-                                storage.bins->at(ibins) + "/" +
-                                storage.trigger->at(iperiod) + "_" + storage.period->at(iperiod) + "/" +
-                                "etaphi_" + storage.region->at(iregion) + "_eff_" + storage.type->at(itype) + "_period" +
-                                storage.period->at(iperiod) + "_EF_" + storage.trigger->at(iperiod));
-            TH2* hist = dynamic_cast<TH2*>(file->Get(path.c_str()));
-            if (not hist) {
-              ::Warning("LeptonTriggerSF::initialise",
-                        "%s not available in %s", path.c_str(), filePath.c_str());
-              continue;
-            }
-            // Make a copy of the histogram into the in-memory directory:
-            TH2* hcopy = dynamic_cast<TH2*>(hist->Clone());
-            if (not hcopy) {
-              ::Fatal("LeptonTriggerSF::initialise",
-                      ERROR_MESSAGE("Couldn't make copy of histogram \"%s\""), histname.c_str());
-              throw std::runtime_error(("Couldn't make copy of histogram " + histname ).c_str());
-            }
-
-            // Now, remember this histogram:
-            // std::cout << "DEBUG: " << path << " = " << histname << "\n";
-            std::pair<EfficiencyMap::iterator, bool> rc = m_efficiencyMap.insert(EfficiencyPair(histname, hcopy));
-            if (not rc.second) {
-              ::Fatal("LeptonTriggerSF::initialise",
-                      ERROR_MESSAGE("histogram \"%s\" duplicated"), histname.c_str());
-              throw std::runtime_error(("histogram duplication: " + histname).c_str());
-            }
-          }
-        }
-      }
-    }
-  }
-
-
-  //
-  // Set the phi boundaries:
-  //
-  if (m_year == 2011) {
-    setPhiBoundary2011(storage.period);
-
-  } else {
-    setPhiBoundary(file);
-  }
-
-  // Now we can close the file:
-  file->Close();
-  delete file;
-
-  // Return to the directory we were in before the function call:
-  origDir->cd();
-
-  ::Info("LeptonTriggerSF::initialise",
-         "Initialization successful");
-
-  return;
-}
-
-std::string
-LeptonTriggerSF::getMuonQuality(const MuonQuality quality)
-{
-  std::string name;
-  switch (quality) {
-    case loose:
-      name = "loose";
-      break;
-
-    case combined:
-      name = "combined";
-      break;
-
-    default:
-      ::Error("LeptonTriggerSF::getMuonQuality",
-              ERROR_MESSAGE("Unknown muon quality (%i) received; Using loose muon as default"),
-              quality );
-      name = "loose";
-   }
-
-   return name;
-}
-
-int
-LeptonTriggerSF::getElectronQuality(const int runNumber,
-                                    const ElectronQuality quality,
-                                    const bool isSF,
-                                    const bool isditrig,
-				    const DileptonTriggerName dilepName) const
-{
-  int combination = 0;
-
-  if (runNumber <= 186755) { // e20_medium
-    switch (quality) {
-      case loosepp:
-        combination = isSF ? 27 : 20;
-
-        initialiseElectronTool(27);
-        initialiseElectronTool(20);
-        break;
-
-      case mediumpp:
-        combination = isSF ? 8 : 9;
-
-        initialiseElectronTool(8);
-        initialiseElectronTool(9);
-        break;
-
-      case tightpp:
-        combination = isSF ? 10 : 11;
-
-        initialiseElectronTool(10);
-        initialiseElectronTool(11);
-        break;
-
-      default:
-        ::Error("LeptonTriggerSF::getElectronQuality",
-                ERROR_MESSAGE("Unknown electron quality (%i) received; Using loose++ electron as default" ),
-                quality );
-        combination = isSF ? 27 : 20;
-
-        initialiseElectronTool(27);
-        initialiseElectronTool(20);
-    }
-      
-  } else if (runNumber <= 187815) { // e22_medium
-    switch (quality) {
-      case loosepp:
-        combination = isSF ? 28 : 21;
-
-        initialiseElectronTool(28);
-        initialiseElectronTool(21);
-        break;
-
-      case mediumpp:
-        combination = isSF ? 12 : 13;
-
-        initialiseElectronTool(12);
-        initialiseElectronTool(13);
-        break;
-
-      case tightpp:
-        combination = isSF ? 14 : 15;
-
-        initialiseElectronTool(14);
-        initialiseElectronTool(15);
-        break;
-
-      default:
-        ::Error("LeptonTriggerSF::getElectronQuality",
-                ERROR_MESSAGE("Unknown electron quality (%i) received; Using loose++ electron as default" ),
-                quality );
-        combination = isSF ? 28 : 21;
-
-        initialiseElectronTool(28);
-        initialiseElectronTool(21);
-    }
-
-  } else if (runNumber <= 191933 ) { // e22vh_medium1
-    switch (quality) {
-      case loosepp:
-        combination = isSF ? 29 : 22;
-
-        initialiseElectronTool(29);
-        initialiseElectronTool(22);
-        break;
-
-      case mediumpp:
-        combination = isSF ? 16 : 17;
-
-        initialiseElectronTool(16);
-        initialiseElectronTool(17);
-        break;
-
-      case tightpp:
-        combination = isSF ? 18 : 19;
-
-        initialiseElectronTool(18);
-        initialiseElectronTool(19);
-        break;
-
-      default:
-        ::Error("LeptonTriggerSF::getElectronQuality",
-                ERROR_MESSAGE("Unknown electron quality (%i) received; Using loose++ electron as default" ),
-                quality );
-        combination = isSF ? 29 : 22;
-
-        initialiseElectronTool(29);
-        initialiseElectronTool(22);
-    }
-
-  } else if (runNumber <=  9999999) { 
-    if(!isditrig){ // e24vhi_medium1 || e60_medium1
-      switch (quality) {
-      case loosepp:
-        combination = isSF ? 31 : 32;
-	
-        initialiseElectronTool(31);
-        initialiseElectronTool(32);
-        break;
-	
-      case mediumpp:
-        combination = isSF ? 33 : 34;
-	
-        initialiseElectronTool(33);
-        initialiseElectronTool(34);
-        break;
-
-      case tightpp:
-        combination = isSF ? 35 : 36;
-
-        initialiseElectronTool(35);
-        initialiseElectronTool(36);
-        break;
-
-      case ML:
-        combination = isSF ? 37 : 38;
-
-        initialiseElectronTool(37);
-        initialiseElectronTool(38);
-        break;
-
-      case LooseLLH:
-        combination = isSF ? 50 : 51;
-
-        initialiseElectronTool(50);
-        initialiseElectronTool(51);
-        break;
-
-      case VeryTightLLH:
-        combination = isSF ? 54 : 55;
-
-        initialiseElectronTool(54);
-        initialiseElectronTool(55);
-        break;
-
-      default:
-        ::Error("LeptonTriggerSF::getElectronQuality",
-                ERROR_MESSAGE("Unknown electron quality (%i) received; Using loose++ electron as default" ),
-                quality );
-        combination = isSF ? 31 : 32;
-
-        initialiseElectronTool(31);
-        initialiseElectronTool(32);
-      }
-    }  else if(dilepName==EF_e12Tvh_medium1_mu8){ // e12Tvh_medium1
-      switch (quality) {
-      case loosepp:
-        combination = isSF ? 70 : 71;
-	
-        initialiseElectronTool(70);
-        initialiseElectronTool(71);
-        break;
-	
-      case mediumpp:
-        combination = isSF ? 72 : 73;
-	
-        initialiseElectronTool(72);
-        initialiseElectronTool(73);
-        break;
-
-      case tightpp:
-        combination = isSF ? 74 : 75;
-
-        initialiseElectronTool(74);
-        initialiseElectronTool(75);
-        break;
-
-      case ML:
-        combination = isSF ? 78 : 79;
-
-        initialiseElectronTool(78);
-        initialiseElectronTool(79);
-        break;
-
-      case LooseLLH:
-        combination = isSF ? 80 : 81;
-
-        initialiseElectronTool(80);
-        initialiseElectronTool(81);
-        break;
-
-      case VeryTightLLH:
-        combination = isSF ? 82 : 83;
-
-        initialiseElectronTool(82);
-        initialiseElectronTool(83);
-        break;
-
-      default:
-        ::Error("LeptonTriggerSF::getElectronQuality",
-                ERROR_MESSAGE("Unknown electron quality (%i) received; Using loose++ electron as default" ),
-                quality );
-        combination = isSF ? 70 : 71;
-
-        initialiseElectronTool(70);
-        initialiseElectronTool(71);
-      } 
-    } else { //else if(dilepName==EF_2e12Tvh_loose1){ // e12Tvh_loose1 -- default for backward compatibility
-      
-      switch (quality) {
-      case loosepp:
-	combination = isSF ? 39 : 40;
-	
-	initialiseElectronTool(39);
-	initialiseElectronTool(40);
-	break;
-	
-      case mediumpp:
-	combination = isSF ? 41 : 42;
-	
-	initialiseElectronTool(41);
-	initialiseElectronTool(42);
-	break;
-	
-      case tightpp:
-	combination = isSF ? 43 : 44;
-	
-	initialiseElectronTool(43);
-	initialiseElectronTool(44);
-	break;
-	  
-      case ML:
-	combination = isSF ? 45 : 46;
-	
-	initialiseElectronTool(45);
-	initialiseElectronTool(46);
-	break;
-	
-      case LooseLLH:
-	combination = isSF ? 52 : 53;
-	
-	initialiseElectronTool(52);
-	initialiseElectronTool(53);
-	break;
-	
-      case VeryTightLLH:
-	  combination = isSF ? 56 : 57;
-	
-	initialiseElectronTool(56);
-	initialiseElectronTool(57);
-	break;
-	
-      default:
-	::Error("LeptonTriggerSF::getElectronQuality",
-		ERROR_MESSAGE("Unknown electron quality (%i) received; Using loose++ electron as default" ),
-		quality );
-	combination = isSF ? 39 : 40;
-	
-	initialiseElectronTool(39);
-	initialiseElectronTool(40);
-      } 
-    }
-  } else {
-    ::Error("LeptonTriggerSF::getElectronQuality",
-	    ERROR_MESSAGE( "Bad run number (%i) received" ), runNumber);
-  }
-  
-  return combination;
-}
-
-
-
-
-std::pair<double, double>
-LeptonTriggerSF::getThresholds(const TrigMuonEff::Configuration& config)
-{
-  std::pair<double, double> result(20., 21.);  // (muon, electron)
-
-  if (config.runNumber <= 186755) {
-    result.second = 21.;
-
-  } else if (config.runNumber <= 191933) {
-    result.second = 23.;
-
-  } else if ((200804 <= config.runNumber) and (config.runNumber <= 9999999)) {
-    result.first = 25.;  // muon
-    result.second = 25.; // electron
-
-    if (config.trigger.find("e12Tvh_medium1_mu8") != std::string::npos){
-      result.first = 10.;  // muon
-      result.second = 14.; // electron
-    }
-
-  } else {
-    ::Error("LeptonTriggerSF::getThresholds",
-            ERROR_MESSAGE( "Unknown run number (%i) received" ), config.runNumber);
-    return result;
-  }
-
-  if (not config.useGeV ) {
-    result.first  *= GeVtoMeV;
-    result.second *= GeVtoMeV;
-  }
-
-  return result;
-}
-
-
-
-void
-LeptonTriggerSF::getDileptonThresholds(const TrigMuonEff::Configuration& config,
-                                     DileptonThresholds& thresholds)
-{
-  thresholds.mu18_tight = 20;
-  thresholds.mu8_EFFS = 10;
-  thresholds.mu13 = 15;
-  thresholds.e12Tvh_loose1 = 14;
-
-  if (not config.useGeV) {
-    thresholds.mu18_tight *= GeVtoMeV;
-    thresholds.mu8_EFFS *= GeVtoMeV;
-    thresholds.mu13 *= GeVtoMeV;
-    thresholds.e12Tvh_loose1 *= GeVtoMeV;
-  }
-}
-
-
-
-TrigMuonEff::DataPeriod
-LeptonTriggerSF::getDataPeriod(int runNumber)
-{
-  if (runNumber < 178044) return TrigMuonEff::period_undefined;
-  if (runNumber <= 186493) return TrigMuonEff::period_2011_BtoI;
-  if ((runNumber <= 189090) or
-      (runNumber >= 189639 and runNumber <= 191933)) return TrigMuonEff::period_2011_JtoMwithoutL3L4;
-  if ((runNumber >= 189184) and (runNumber <= 189610)) return TrigMuonEff::period_2011_L3toL4;
-  if ((runNumber >= 200804) and (runNumber <= 201556)) return TrigMuonEff::period_2012_A;
-  if ((runNumber >= 202660) and (runNumber <= 205113)) return TrigMuonEff::period_2012_B;
-  if ((runNumber >= 206248) and (runNumber <= 210308)) return TrigMuonEff::period_2012_CtoE;
-  if ((runNumber >= 211522) and (runNumber <= 212272)) return TrigMuonEff::period_2012_G;
-  if ((runNumber >= 212619) and (runNumber <= 215643)) return TrigMuonEff::period_2012_HtoL;
-
-  ::Error("LeptonTriggerSF::getDataPeriod",
-          ERROR_MESSAGE( "Can't associate run number (%i) to a period" ), runNumber);
-  return TrigMuonEff::period_undefined;
-}
-
-
-
-double
-LeptonTriggerSF::getSfError(const double a,
-                            const double b,
-                            const double c,
-                            const double d)
-{
-  const double a2 = a*a;
-  const double b2 = b*b;
-  const double p1 = (1 - a);
-  const double p2 = (1 - b);
-  const double p12 = p1*p1;
-  const double p22 = p2*p2;
-  const double p24 = p22*p22;
-
-  return sqrt( ( a2 / p22 ) * c + ( ( b2 * p12 ) / p24 ) * d );
-}
-
-
-double
-LeptonTriggerSF::getDiError(const double a1, const double a2,
-			    const double b1, const double b2,
-			    const double c1, const double c2,
-			    const double d1, const double d2,
-			    const double e1, const double e2,
-			    const double f1, const double f2)
-{
-  const double T1 = ( d1 * a2 ) * ( d1 * a2 );
-  const double T2 = ( a1 * d2 ) * ( a1 * d2 );
-  const double T3 = ( c1 * b2 ) * ( c1 * b2 );
-  const double T4 = ( b1 * c2 ) * ( b1 * c2 );
-  const double T5 = ( f1 * e2 ) * ( f1 * e2 );
-  const double T6 = ( e1 * f2 ) * ( e1 * f2 );
-
-  return sqrt( T1 + T2 + T3 + T4 + T5 + T6 );
-}
-
-double
-LeptonTriggerSF::getSingleOrDiError_asym(const double a1, const double a2, // lepton 1, single trigger eff+unc
-					 const double b1, const double b2, // lepton 2, single trigger eff+unc
-					 const double c1, const double c2, // lepton 1, single trigger leg1 for dilepton eff+unc
-					 const double d1, const double d2, // lepton 2, single trigger leg1 for dilepton eff+unc
-					 const double e1, const double e2, // lepton 1, single trigger leg2 for dilepton eff+unc
-					 const double f1, const double f2, // lepton 2, single trigger leg2 for dilepton eff+unc
-					 const double g1, const double g2, // lepton 1, single trigger leg1 and leg2 for dilepton eff+unc
-					 const double h1, const double h2) // lepton 2, single trigger leg1 and leg2 for dilepton eff+unc
-{
-  const double eff_single = a1+b1 -a1*b1;
-  //const double eff_double = c1*f1+d1*e1 - c1*f1*d1*e1;
-  //const double T1 = ( (1.0-b1) * (1.0-eff_double) * a2 )*( (1.0-b1) * (1.0-eff_double) * a2 ) + ( (1.0-a1) * (1.0-eff_double) * b2 )*( (1.0-a1) * (1.0-eff_double) * b2 ); // vary the single trigger uncertainties
-  ////const double T2 = ( ( (d1+f1) * c2) * ( (d1+f1) * c2) ) + ( ( (c1+e1) * d2) * ( (c1+e1) * d2) );
-  //const double T2  =  ( (f1*(1.0-d1*e1)) * (1.0 - eff_single) * c2)* ( (f1*(1.0-d1*e1)) * (1.0 - eff_single) * c2) +  ((c1*(1.0-e1*d1)) * (1.0 - eff_single) * f2)*((c1*(1.0-e1*d1)) * (1.0 - eff_single) * f2);
-  //const double T2b =  ( (d1*(1.0-c1*f1)) * (1.0 - eff_single) * e2)*( (d1*(1.0-c1*f1)) * (1.0 - eff_single) * e2) +  ((e1*(1.0-c1*f1)) * (1.0 - eff_single) * d2)* ((e1*(1.0-c1*f1)) * (1.0 - eff_single) * d2);
-  ////const double T3 = d1*e2*d1*e2 + c1*f2*c1*f2;
-  ////const double T4 = h1*g2*h1*g2 + g1*h2*g1*h2;
-  //		      
-  ////std::cout << "OR error: " << T1 << " T2: " << T2 << " T3: " << T3 << " T4: " << T4 << std::endl;
-  //std::cout << "a2: " << a2 << " b2: " << b2 << " c2: " << c2 << " d2: " << d2 << std::endl;
-  //std::cout << "e2: " << e2 << " f2: " << f2 << " g2: " << g2 << " h2: " << h2 << std::endl;
-  //std::cout << "a1: " << a1 << " b1: " << b1 << " c1: " << c1 << " d1: " << d1 << std::endl;
-  //std::cout << "e1: " << e1 << " f1: " << f1 << " g1: " << g1 << " h1: " << h1 << std::endl;
-  //std::cout <<"error: " << sqrt( T1 + T2 + T2b) << std::endl;
-  //return sqrt( T1 + T2 + T2b);
-
-  // correlate the lead lepton 
-  //double T1 = a2*(1-b1)+c2*f1*(1.0-d1*e1)-(a2*(1-b1)*eff_double+c2*eff_single*f1*(1.0-d1*e1));
-  //T1*=T1; // treat mu18 and mu24i/mu36 as correlated
-  //double T2 = b2*(1-a1)+d2*e1*(1.0-c1*f1)-(b2*(1-a1)*eff_double+d2*eff_single*e1*(1.0-c1*f1));
-  //T2*=T2; // treat mu18 and mu24i/mu36 as correlated
-  double T1 = c2*(1.0-d1);
-  T1*=T1;
-  double T2 = d2*(1.0-c1);
-  T2*=T2;
-  double T3 = e2*d1*(1.0-c1*f1)*(1.0-eff_single); 
-  T3*=T3; // treat mu8 and mu24i/mu36 as uncorrelated
-  double T4 = f2*c1*(1.0-d1*e1)*(1.0-eff_single); 
-  T4*=T4; // treat mu8 and mu24i/mu36 as uncorrelated
-
-  //std::cout << "OR error: " << T1 << " T2: " << T2 << " T3: " << T3 << " T4: " << T4 << std::endl;
-  //std::cout <<"error: " << sqrt( T1 + T2 + T3 + T4) << std::endl;
-  return sqrt( T1 + T2 + T3 + T4);
-}
-
-double
-LeptonTriggerSF::getSingleOrDiError_sym(const double a1, const double a2, // lepton 1, single trigger eff+unc
-					const double b1, const double b2, // lepton 2, single trigger eff+unc
-					const double c1, const double c2, // lepton 1, single trigger leg for dilepton eff+unc
-					const double d1, const double d2, // lepton 2, single trigger leg for dilepton eff+unc
-					bool ispT1above, bool ispT2above)
-{
-
-  //double a1=0.0, a2=0.0, b1=0.0, b2=0.0, c1=0.0, c2=0.0, d1=0.0, d2=0.0; 
-  //if(ispT1above){
-  //  a1=ai1; a2=ai2; c1=ci1; c2=ci2;
-  //}
-  //if(ispT2above){
-  //  b1=bi1; b2=bi2; d1=di1; d2=di2;
-  //}
-
-  const double single_eff = a1+b1-a1*b1;
-  const double dil_eff    = c1*d1;
-
-  double T1 = a2*(1.0-b1)*(1.0-dil_eff) + c2*d1*(1.0-single_eff);
-  T1*=T1;
-  double T2 = b2*(1.0-a1)*(1.0-dil_eff) + d2*c1*(1.0-single_eff);
-  T2*=T2;
-
-  //std::cout << "a1: " << a1 << " a2: " << a2 << " b1: " << b1 << " b2: " << b2
-  //	    << " c1: " << c1 << " c2: " << c2 << " d1: " << d1 << " d2: " << d2
-  //	    << " T1: " << T1 << " T2: " << T2 << std::endl;
-  //
-  return sqrt( T1 + T2 );
-  //if(ispT1above and ispT2above){
-  //  if(a1 > c1){
-  //    if(b1 > d1){
-  //	const double T1 = ( (1-b1-b1) * a2 ) * ( (1-b1-b1) * a2 );
-  //	const double T2 = ( (1-a1-a1) * b2 ) * ( (1-a1-a1) * b2 );
-  //	const double T3 = ( d1*c2 ) * ( d1*c2 );
-  //	const double T4 = ( c1*d2 ) * ( c1*d2 );
-  //	return sqrt( T1 + T2 + T3 + T4 );
-  //    } else{
-  //	const double T1 = ( (1-b1-d1) * a2 ) * ( (1-b1-d1) * a2 );
-  //	const double T2 = ( (1-a1) * b2 ) * ( (1-a1) * b2 );
-  //	const double T3 = ( d1*c2 ) * ( d1*c2 );
-  //	const double T4 = ( (c1-a1) * d2 ) * ( (c1-a1) * d2 );
-  //	return sqrt( T1 + T2 + T3 + T4 );
-  //    }
-  //  } else{
-  //    if(b1 > d1){
-  //	const double T1 = ( (1-b1) * a2 ) * ( (1-b1) * a2 );
-  //	const double T2 = ( (1-a1-c1) * b2 ) * ( (1-a1-c1) * b2 );
-  //	const double T3 = ( (d1-b1) * c2 ) * ( (d1-b1) * c2 );
-  //	const double T4 = ( c1*d2 ) * ( c1*d2 );
-  //	return sqrt( T1 + T2 + T3 + T4 );
-  //    } else{
-  //	const double T1 = ( (1-b1) * a2 ) * ( (1-b1) * a2 );
-  //	const double T2 = ( (1-a1) * b2 ) * ( (1-a1) * b2 );
-  //	return sqrt( T1 + T2 );
-  //    }
-  //  }
-  //} else if( ((not ispT1above) and ispT2above) or ((not ispT2above) and ispT1above) ){
-  //  const double T1 = ( (1-b1) * ( 1-(c1 * d1) ) * a2 ) * ( (1-b1) * ( 1-(c1 * d1) ) * a2 );
-  //  const double T2 = ( (1-a1) * ( 1-(c1 * d1) ) * b2 ) * ( (1-a1) * ( 1-(c1 * d1) ) * b2 );
-  //  const double T3 = ( d1 * ( 1-a1-b1+(a1*b1) ) * c2) * ( d1 * ( 1-a1-b1+(a1*b1) ) * c2);
-  //  const double T4 = ( c1 * ( 1-a1-b1+(a1*b1) ) * d2) * ( c1 * ( 1-a1-b1+(a1*b1) ) * d2);
-  //  return sqrt( T1 + T2 + T3 + T4 );
-  //} else{
-  //  return 0.;
-  //}
-}
-
-
-void
-LeptonTriggerSF::getDileptonLegs(const std::string& chain,
-				 DileptonTrigger& dilepton)
-{
-
-  if (chain.find("mu18_tight_mu8_EFFS") != std::string::npos) {
-    dilepton.leg1 = "mu18_tight";
-    dilepton.leg2 = "mu8_EFFS";
-    dilepton.bothLegs = "mu18_tight"; // for now, eventually should be mu18i_tight_or_mu8_EFFS
-
-  } else if (chain.find("2mu13") != std::string::npos) {
-    dilepton.leg1 = "mu13";
-    dilepton.leg2 = "mu13";
-    dilepton.bothLegs = "mu13";
-
-  } else if (chain.find("2e12Tvh_loose1") != std::string::npos) {
-    dilepton.leg1 = "e12Tvh_loose1";
-    dilepton.leg2 = "e12Tvh_loose1";
-    dilepton.bothLegs = "e12Tvh_loose1";
-
-  } else if (chain.find("e12Tvh_medium1_mu8") != std::string::npos) {
-    dilepton.leg1 = "e12Tvh_medium1";
-    dilepton.leg2 = "mu8";
-    dilepton.bothLegs = "e12Tvh_medium1"; // should be an OR. Not implemented yet
-
-  } else {
-    dilepton.leg1 = "";
-    dilepton.leg2 = "";
-    dilepton.bothLegs = "";
-    ::Error( "LeptonTriggerSF::getDileptonLegs",
-      ERROR_MESSAGE("Invalid dilepton or combination of single and dilepton trigger chain name given"));
-  }
-}
-
-
-bool
-LeptonTriggerSF::setConfiguration(TrigMuonEff::Configuration& config,
-                                  TrigMuonEff::DataPeriod period) const
-{
-  if (period == TrigMuonEff::period_undefined) {
-    period = getDataPeriod(config.runNumber);
-    if (m_max_period != TrigMuonEff::period_undefined) {
-      if (period > m_max_period) {
-        static bool hasWarned = false;
-        if (not hasWarned) {
-          ::Warning("LeptonTriggerSF::period out of range:", "setting it to %d", period);
-          hasWarned = true;
-        }
-        period = m_max_period;
-      }
-    }
-
-    if (period == TrigMuonEff::period_undefined) {
-      ::Error( "LeptonTriggerSF::setConfiguration",
-      ERROR_MESSAGE("RunNumber is not in 2011 or 2012 dataset. No scale factors calculated. "
-                    "Please use RunNumber between 178044-191933 for 2011 data, or "
-                    "above 200804 (upper run number limit removed for now) for 2012 data. %d" ), config.runNumber );
-      return false;
-    }
-  }
-
-  switch (period) {
-    case TrigMuonEff::period_2011_BtoI:
-      config.period = "BtoI_";
-      config.binning = "fine";
-      break;
-
-    case TrigMuonEff::period_2011_JtoMwithoutL3L4:
-      config.period = "JtoMwoL3toL4_";
-      config.binning = "fine";
-      break;
-
-    case TrigMuonEff::period_2011_L3toL4:
-      config.period = "L3toL4_";
-      config.binning = "coarse";
-      break;
-
-    case TrigMuonEff::per2012A:
-      config.period = "A_";
-      config.binning = "fine";
-      config.trigger = "mu24i_tight_or_EF_mu36_tight";
-      break;
-
-    case TrigMuonEff::per2012B:
-      config.period = "B_";
-      config.binning = "fine";
-      config.trigger = "mu24i_tight_or_EF_mu36_tight";
-      break;
-
-    case TrigMuonEff::per2012CtoE:
-      config.period = "CtoE_";
-      config.binning = "fine";
-      config.trigger = "mu24i_tight_or_EF_mu36_tight";
-      break;
-
-    case TrigMuonEff::per2012G:
-      config.period = "G_";
-      config.binning = "fine";
-      config.trigger = "mu24i_tight_or_EF_mu36_tight";
-      break;
-
-    case TrigMuonEff::per2012HtoL:
-      config.period = "HtoL_";
-      config.binning = "fine";
-      config.trigger = "mu24i_tight_or_EF_mu36_tight";
-      break;
-
-    // speical cases
-    case TrigMuonEff::per2011J:
-      config.period = "J_";
-      config.binning = "coarse";
-      break;
-
-    case TrigMuonEff::per2011K:
-      config.period = "K_";
-      config.binning = "coarse";
-      break;
-
-   case TrigMuonEff::per2011J_K:
-      config.period = "JtoK_";
-      config.binning = "coarse";
-      break;
-
-   case TrigMuonEff::per2011J_M:
-      config.period = "JtoM_";
-      config.binning = "coarse";
-      break;
-
-   case TrigMuonEff::per2011L_M:
-      config.period = "LtoM_";
-      config.binning = "coarse";
-      break;
-
-    default:
-      ::Error("LeptonTriggerSF::setConfiguration",
-      ERROR_MESSAGE("Unknown data period (%i) requested"), period);
-      return false;
-   }
-
-   return true;
-}
-
-
-
-void
-LeptonTriggerSF::setPhiBoundary2011(const std::vector<std::string> *period)
-{
-  m_phiBoundaryBarrel = M_PI;
-  m_phiBoundaryEndcap = M_PI;
-
-  EfficiencyMap::const_iterator itr = m_efficiencyMap.begin();
-  EfficiencyMap::const_iterator end = m_efficiencyMap.end();
-
-  for (; itr != end; ++itr) {
-    if (not itr->second) {
-      ::Fatal("LeptonTriggerSF::setPhiBoundary2011",
-              ERROR_MESSAGE("An internal coding error detected"));
-      throw std::runtime_error("An internal coding error detected");
-    }
-
-    // setting lower phi to account for unusual binning
-    std::string string = "_MuonTrigEff_" + period->at(0) + "_loose_EtaPhi_fine_barrel_data";
-    if (itr->first.find( string ) != std::string::npos) {
-      m_phiBoundaryBarrel = itr->second->GetYaxis()->GetXmin();
-    } 
-    string = "_MuonTrigEff_" + period->at(0) + "_loose_EtaPhi_fine_endcap_data";
-    if (itr->first.find(string) != std::string::npos) {
-      m_phiBoundaryEndcap = itr->second->GetYaxis()->GetXmin();
-    }
-    if (m_phiBoundaryBarrel < -M_PI) m_phiBoundaryBarrel += 2. * M_PI;
-    if (m_phiBoundaryEndcap < -M_PI) m_phiBoundaryEndcap += 2. * M_PI;
- }
-
- return;
-
-}
-
-
-
-void
-LeptonTriggerSF::setPhiBoundary(TFile* file)
-{
-  gROOT->cd();
-
-  m_phiBoundaryBarrel = M_PI;
-  m_phiBoundaryEndcap = M_PI;
-
-  TH2* hist = 0;
-
-  const char* barrel = "binning_barrel";
-  hist = dynamic_cast< TH2* >(file->Get(barrel));
-  if (not hist) {
-    ::Warning("LeptonTriggerSF::setPhiBoundary", "%s not available", barrel);
-
-  } else {
-    m_phiBoundaryBarrel = hist->GetYaxis()->GetXmin();
-  }
-
-  const char* endcap = "binning_endcap";
-  hist = dynamic_cast< TH2* >(file->Get(endcap));
-  if (not hist) {
-    ::Warning("LeptonTriggerSF::setPhiBoundary", "%s not available", endcap);
-
-  } else {
-    m_phiBoundaryEndcap = hist->GetYaxis()->GetXmin();
-  }
-
-
-  if (m_phiBoundaryBarrel < -M_PI) m_phiBoundaryBarrel += 2. * M_PI;
-  if (m_phiBoundaryEndcap < -M_PI) m_phiBoundaryEndcap += 2. * M_PI;
-
-  return;
-}
-
-
-
-double
-LeptonTriggerSF::fixPhiRange(const TLorentzVector& muon) const
-{
-  double phi = muon.Phi();
-
-  if (phi > M_PI) {
-    ::Warning("LeptonTriggerSF::fixPhiRange",
-              "Muon phi %4.2f > pi! Using (phi-2*pi)", phi);
-    phi -= 2 * M_PI;
-
-  } else if (phi < -M_PI) {
-    ::Warning("LeptonTriggerSF::fixPhiRange",
-              "Muon phi %4.2f < -pi! Using (phi+2*pi)", phi);
-    phi += 2 * M_PI;
-  }
-
-
-  if (fabs(muon.Eta()) < muon_barrel_endcap_boundary) {  // barrel
-    if (m_phiBoundaryBarrel < 0.) {
-      if (phi < m_phiBoundaryBarrel) {
-        phi += 2 * M_PI;
-      }
-    } else {
-      if (phi >= m_phiBoundaryBarrel) {
-        phi -= 2 * M_PI;
-      }
-    }
-  } else {  // endcap
-    if (m_phiBoundaryEndcap < 0.) {
-      if (phi < m_phiBoundaryEndcap) {
-        phi += 2 * M_PI;
-      }
-    } else {
-      if (phi >= m_phiBoundaryEndcap ) {
-        phi -= 2 * M_PI;
-      }
-    }
-  }
-
-  return phi;
-}
-
-
-
-void
-LeptonTriggerSF::initialiseElectronTool(const int key) const
-{
-  if (m_electronSF.find(key) == m_electronSF.end()) {
-    Root::TElectronEfficiencyCorrectionTool *tool = new Root::TElectronEfficiencyCorrectionTool;
-    if (m_fileNameMap.find(key) == m_fileNameMap.end()) throw std::runtime_error("initialiseElectronTool: key error");
-    tool->addFileName(m_fileNameMap[key]);
-    tool->initialize();
-    m_electronSF.insert(ElectronEfficiencyToolPair(key, tool));
-  }
-}
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/LinkDef.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/LinkDef.h
deleted file mode 100644
index ae8d0e829de587b97791bcf14eb92c692282b55e..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/LinkDef.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef __TrigMuonEfficiencyLinkDef_h__
-#define __TrigMuonEfficiencyLinkDef_h__
-
-#include "TrigMuonEfficiency/MuonHypothesis.h"
-#include "TrigMuonEfficiency/LeptonTriggerSF.h"
-#include "TrigMuonEfficiency/HSG3TrigLeptonSFTool.h"
-#include "TrigMuonEfficiency/MuonTriggerMatching.h" 
-#include "TrigMuonEfficiency/ElectronTriggerMatching.h" 
-#include "TrigMuonEfficiency/TriggerNavigationVariables.h" 
-
-#ifdef __CINT__
-
-#pragma link off all globals;
-#pragma link off all classes;
-#pragma link off all functions;
-#pragma link C++ nestedclass;
-
-#pragma link C++ class MuonHypothesis+;
-#pragma link C++ class LeptonTriggerSF+;
-#pragma link C++ class HSG3TrigLeptonSFTool+;
-
-#pragma link C++ class MuonTriggerMatching+; 
-#pragma link C++ class ElectronTriggerMatching+; 
-#pragma link C++ class TriggerNavigationVariables+;
-
-#endif
-
-#endif
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/MuonHypothesis.cxx b/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/MuonHypothesis.cxx
deleted file mode 100644
index 687172990ed1c2dcc4bad8c96b38898fcb80a17b..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/MuonHypothesis.cxx
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @author Toyonobu Okuyama
- * @author Takashi Matsushita
- */
-
-#include "TrigMuonEfficiency/MuonThresholds.h"
-#include <iostream>
-#include <cmath>
-
-
-MuonHypothesis::MuonHypothesis() {
-}
-
-
-MuonHypothesis::~MuonHypothesis() {
-}
-
-
-bool
-MuonHypothesis::EF_isPassed(const float pt,
-                            const float eta,
-                            const std::string& chain)
-{
-  const double *threshold = getThresholds(chain);
-  if (not threshold) {
-    std::cerr << "MuonHypothesis\t" << "ERROR\t"
-              << "Cannot get thresholds for chain " << chain
-              << ". Please check MuonThresholds.h(or Muonhypothesis::getThresholds)" << std::endl;
-    return false;
-  }
-  return EF_isPassed(pt*0.001, eta, threshold);
-}
-
-
-bool
-MuonHypothesis::EF_isPassed(const float pt,
-                            const float eta,
-                            const double* threshold)
-{
-  const size_t hypo_binsize = MuonHypoThresholds::hypo_binsize;
-  const float* hypo_etaregion = MuonHypoThresholds::hypo_etaregion;
-  
-  size_t etabin = 0;
-  for (; etabin < hypo_binsize; etabin++) {
-    if (fabs(eta) < hypo_etaregion[etabin]) break;
-  }
-
-  if (etabin == hypo_binsize) {
-    std::cerr << "MuonHypothesis\t" << "Invalid Argument\t"
-              << "Input eta for EF_isPassed is larger than 9.9!! (eta = " << eta << ")" << std::endl;
-    return false;
-  }
-  return threshold[etabin] <= pt;
-}
-
-
-const double*
-MuonHypothesis::getThresholds(const std::string& chain)
-{
-  EF_thresholdMap::const_iterator cit;
-  const EF_thresholdMap *thresholds = (chain.find("_MSonly") != std::string::npos) 
-    ? &MuonHypoThresholds::ef_sa_map : &MuonHypoThresholds::ef_cb_map; 
-
-  if (chain.find("EF_mu18") != std::string::npos) {
-    if (thresholds->count("18GeV")) return thresholds->find("18GeV")->second;
-
-  } else if (chain.find("EF_mu40") != std::string::npos) {
-    if (chain.find("EF_mu40_MSonly_barrel") != std::string::npos) {
-      if (thresholds->count("40GeV_barrelOnly")) return thresholds->find("40GeV_barrelOnly")->second;
-
-    } else {
-      if (thresholds->count("40GeV")) return thresholds->find("40GeV")->second;
-    }
-
-  } else if (chain.find("EF_mu50_MSonly_barrel") != std::string::npos) {
-    if (thresholds->count("50GeV_barrelOnly")) return thresholds->find("50GeV_barrelOnly")->second;
-
-  } else if (chain.find("EF_mu36") != std::string::npos) {
-    if (thresholds->count("36GeV")) return thresholds->find("36GeV")->second;
-
-  } else if (chain.find("EF_mu24") != std::string::npos) {
-    if (thresholds->count("24GeV")) return thresholds->find("24GeV")->second;
-
-  } else if (chain.find("EF_mu15") != std::string::npos) {
-    if (thresholds->count("15GeV")) return thresholds->find("15GeV")->second;
-
-  } else if (chain.find("EF_mu13") != std::string::npos) {
-    if (thresholds->count("13GeV")) return thresholds->find("13GeV")->second;
-
-  } else if (chain.find("EF_mu10") != std::string::npos) {
-    if (thresholds->count("10GeV")) return thresholds->find("10GeV")->second;
-
-  } else if (chain.find("EF_mu8") != std::string::npos) {
-    if (thresholds->count("8GeV")) return thresholds->find("8GeV")->second;
-
-  } else if (chain.find("EF_mu6") != std::string::npos) {
-    if (thresholds->count("6GeV")) return thresholds->find("6GeV")->second;
-
-  } else if (chain.find("EF_mu4") != std::string::npos) {
-    if (thresholds->count("4GeV")) return thresholds->find("4GeV")->second;
-
-  } else {
-    std::cerr << "MuonHypothesis\t" << "ERROR\t"
-              << "Cannot get thresholds. " << chain << " is not defined in getThresholds()" << std::endl;
-  }
-
-  return 0;
-}
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/MuonTriggerMatching.cxx b/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/MuonTriggerMatching.cxx
deleted file mode 100644
index 69f605aa91ee028d402d78b416c5d3d29aa1b354..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/Root/MuonTriggerMatching.cxx
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/*=================================================================* 
- * Implementation of MuonTriggerMatching
- *=================================================================*/
-#include "TrigMuonEfficiency/ChainEntry.h"
-#include "TrigMuonEfficiency/MuonTriggerMatching.h"
-#include "TrigMuonEfficiency/MuonHypothesis.h"
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <TMath.h>
-#include <cmath>
-
-
-/*=================================================================* 
- * public methods
- *=================================================================*/
-bool
-MuonTriggerMatching::match(const double eta,
-                           const double phi,
-                           const std::string& chain,
-                           const std::string& l1item)
-{
-  EFmuon efmuon, dummy;
-  if (m_index) {
-    matchedTrackDetail_index(efmuon, dummy, eta, phi, chain, l1item);
-  } else {
-    matchedTrackDetail(efmuon, dummy, eta, phi, chain, l1item);
-  }
-  return efmuon.valid;
-}
-
-
-std::pair<int, int>
-MuonTriggerMatching::matchedTrack(const double eta,
-                                  const double phi,
-                                  const std::string& chain,
-                                  const std::string& l1item)
-{
-  EFmuon efmuon, dummy;
-  if (m_index) {
-    matchedTrackDetail_index(efmuon, dummy, eta, phi, chain, l1item);
-  } else {
-    matchedTrackDetail(efmuon, dummy, eta, phi, chain, l1item);
-  }
-  return efmuon.indicies;
-}
-
-
-bool
-MuonTriggerMatching::matchDimuon(const TLorentzVector& muon1,
-                                 const TLorentzVector& muon2,
-                                 const std::string& chain,
-                                 std::pair<bool, bool>& result1,
-                                 std::pair<bool, bool>& result2)
-{
-  DimuonChainInfo chainInfo(chain);
-  if (not decodeDimuonChain(chainInfo)) {
-    std::cerr << "MuonTriggerMatching\t" << "ERROR\t"
-              << "Failed to decode chain(" << chain
-              << "matchDimuon can accept only chains named EF_2muXX_YY or EF_muXX_muYY_ZZ." << std::endl;
-    return false;
-  }
-
-  std::pair<bool, bool> rc12, rc21;
-  rc12 = matchDimuon(muon1, muon2, chainInfo);
-  if (chainInfo.isSymmetric) {
-    rc21.first = rc12.second; rc21.second = rc12.first;
-  } else {
-    rc21 = matchDimuon(muon2, muon1, chainInfo);
-  }
-
-  result1.first = rc12.first; result1.second = rc21.second;
-  result2.first = rc21.first; result2.second = rc12.second;
-  return true;
-}
-
-
-
-/*=================================================================* 
- * private methods
- *=================================================================*/
-bool
-MuonTriggerMatching::checkSeed_index(const double eta,
-                                     const double phi,
-                                     const std::string& chain)
-{
-  const std::vector<int>* status = 0;
-  if (chain.compare("EF_mu18_tight") == 0) {
-    status = m_d3pd->trig_EF_trigmuonef_EF_mu18_tight;
-  }
-
-  if (not status) {
-    std::cout << "WARNING: checkSeed_index: not supported: " << chain << std::endl;
-    return false;
-  }
-
-  if (not m_d3pd->trig_EF_trigmuonef_track_MuonType) {
-    std::cout << "ERROR: full-scan trigger matching requested but trig_EF_trigmuonef_track_MuonType == 0" << std::endl;
-    return false;
-  }
-
-  double efdr = 0.05;
-
-  bool found = false;
-  for (size_t ii = 0; ii < status->size(); ii++) {
-    if (not status->at(ii)) continue;
-
-    const std::vector<float>& v_pt = MUONEF_CB(pt)->at(ii);
-    const std::vector<float>& v_eta = MUONEF_CB(eta)->at(ii);
-    const std::vector<float>& v_phi = MUONEF_CB(phi)->at(ii);
-    const std::vector<int>& v_type = m_d3pd->trig_EF_trigmuonef_track_MuonType->at(ii);
-
-    for (size_t iTrk = 0; iTrk < v_pt.size(); ++iTrk) {
-      if (v_type.at(iTrk) != 1) continue; // !MuonTypeEFMuon
-      if (not MuonHypothesis::EF_isPassed(v_pt.at(iTrk), v_eta.at(iTrk), chain)) continue;
-      double dr = dR(eta, phi, v_eta.at(iTrk), v_phi.at(iTrk));
-      if (not (dr < efdr)) continue;
-      efdr = dr;
-      found = true;
-    }
-  }
-  return found;
-}
-
-
-
-bool
-MuonTriggerMatching::checkSeedL2(const double eta,
-                                 const double phi,
-                                 const std::string& chain,
-                                 double l2dr,
-                                 double l1dr)
-{
-  const int chainIndex = getChainIndex(chain);
-  if (chainIndex < 0) return false;
-
-  const std::vector<int>& RoIIndex = m_d3pd->trig_Nav_chain_RoIIndex->at(chainIndex);
-  const std::vector<int>& RoIType = m_d3pd->trig_Nav_chain_RoIType->at(chainIndex);
-
-  for (size_t iRoI = 0; iRoI < RoIIndex.size(); ++iRoI) {
-    if (RoIType.at(iRoI) != ChainEntry::kRoIType_L2_mu) continue;
-    if (not m_d3pd->trig_RoI_L2_mu_CombinedMuonFeatureStatus->at(RoIIndex.at(iRoI))) continue;
-
-    double minDr = l2dr;
-    const int muComb = m_d3pd->trig_RoI_L2_mu_CombinedMuonFeature->at(RoIIndex.at(iRoI));
-    double trigEta = m_d3pd->trig_L2_combmuonfeature_eta->at(muComb);
-    double trigPhi = m_d3pd->trig_L2_combmuonfeature_phi->at(muComb);
-
-    // L2 ID tracks can be truncated after trigger decision,
-    // as a consequence (eta,phi) of CombinedMuonFeature become (0,0)
-    // We use MuonFeature in this case.
-    if (isEqual(trigEta, 0.) and isEqual(trigPhi, 0.)) {
-      const int muFast = m_d3pd->trig_RoI_L2_mu_MuonFeature->at(RoIIndex.at(iRoI));
-      trigEta = m_d3pd->trig_L2_muonfeature_eta->at(muFast);
-      trigPhi = m_d3pd->trig_L2_muonfeature_phi->at(muFast);
-    }
-
-    // pathlogical case, use L1 for matching
-    if (isEqual(trigEta, 0.) and isEqual(trigPhi, 0.)) {
-      const int muRoI = m_d3pd->trig_RoI_L2_mu_Muon_ROI->at(RoIIndex.at(iRoI));
-      trigEta = m_d3pd->trig_L1_mu_eta->at(muRoI);
-      trigPhi = m_d3pd->trig_L1_mu_phi->at(muRoI);
-      minDr = l1dr;
-    }
-
-    if (not (dR(eta, phi, trigEta, trigPhi) < minDr)) continue;
-    return true;
-  }
-
-  return false;
-}
-
-
-
-bool
-MuonTriggerMatching::checkSeedEF(const double eta,
-                                 const double phi,
-                                 const std::string& chain)
-{
-  double efdr = 0.05;
-  const int chainIndex = getChainIndex(chain);
-  if (chainIndex < 0) {
-    return checkSeed_index(eta, phi, chain);
-  }
-
-  const std::vector<int>& RoIIndex = m_d3pd->trig_Nav_chain_RoIIndex->at(chainIndex);
-  const std::vector<int>& RoIType = m_d3pd->trig_Nav_chain_RoIType->at(chainIndex);
-
-  if ((chain.find("_MSonly") != std::string::npos) or
-      (chain.find("_MG") != std::string::npos) or
-      (chain.find("i_") != std::string::npos)) {
-    std::cout << "MuonTriggerMatching::checkSeedEF: " << chain << "\n";
-    throw "NotImplementedError";
-  }
-
-  if (not m_d3pd->trig_EF_trigmuonef_track_MuonType) {
-    std::cout << "ERROR: full-scan trigger matching requested but trig_EF_trigmuonef_track_MuonType == 0" << std::endl;
-    return false;
-  }
-
-
-  for (size_t iRoI = 0; iRoI < RoIIndex.size(); ++iRoI) {
-    if (RoIType.at(iRoI) != ChainEntry::kRoIType_EF_mu) continue;
-    const int roi_index = RoIIndex.at(iRoI);
-
-    const std::vector<int>& EFmuonCont = m_d3pd->trig_RoI_EF_mu_TrigMuonEFInfoContainer->at(roi_index);
-    const std::vector<int>& status = m_d3pd->trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus->at(roi_index);
-
-    for (size_t iCont = 0; iCont < EFmuonCont.size(); ++iCont) {
-      if (not status.at(iCont)) continue;
-
-      const int container_index = EFmuonCont.at(iCont);
-      const std::vector<float>& v_pt = MUONEF_CB(pt)->at(container_index);
-      const std::vector<float>& v_eta = MUONEF_CB(eta)->at(container_index);
-      const std::vector<float>& v_phi = MUONEF_CB(phi)->at(container_index);
-      const std::vector<int>& v_type = m_d3pd->trig_EF_trigmuonef_track_MuonType->at(container_index);
-
-      for (size_t iTrk = 0; iTrk < v_pt.size(); ++iTrk) {
-        if (v_type.at(iTrk) != 1) continue; // !MuonTypeEFMuon
-        if (not MuonHypothesis::EF_isPassed(v_pt.at(iTrk), v_eta.at(iTrk), chain)) continue;
-        double dr = dR(eta, phi, v_eta.at(iTrk), v_phi.at(iTrk));
-        if (not (dr < efdr)) continue;
-        efdr = dr;
-        return true;
-      }
-    }
-  }
-
-  return false;
-}
-
-
-double
-MuonTriggerMatching::matchedTrackDetail(EFmuon& efMuonId,
-                                        const EFmuon& usedEfMuonId,
-                                        const double eta,
-                                        const double phi,
-                                        const std::string& chainForThisMuon,
-                                        const std::string& l1item,
-                                        const std::string& chainForEventTrigger)
-{
-  if (m_debug) std::cout << "DEBUG: matchedTrackDetail: (eta, phi) = (" << eta << ", " << phi << ") "
-                         << chainForThisMuon << " " << l1item << " " << chainForEventTrigger << "\n";
-
-  efMuonId.indicies.first = -1;
-  efMuonId.indicies.second = -1;
-  efMuonId.iso_index = -1;
-  efMuonId.valid = false;
-  efMuonId.isIso = false;
-  efMuonId.chain_type = CHAIN_CB;
-  double dR_min = m_matchingDr;
-
-  const std::string eventTrigger = chainForEventTrigger.empty() ? chainForThisMuon : chainForEventTrigger;
-  const int chainIndex = getChainIndex(eventTrigger);
-  if (chainIndex < 0) {
-    return index_match(eta, phi, eventTrigger, chainForThisMuon, efMuonId, usedEfMuonId);
-  }
-
-  if (not m_isNavigationMatchUsed) {
-    m_isNavigationMatchUsed = true;
-    std::cout << "INFORMATION: navigation is used" << std::endl;
-  }
-
-  const std::vector<int>& RoIIndex = m_d3pd->trig_Nav_chain_RoIIndex->at(chainIndex);
-  const std::vector<int>& RoIType = m_d3pd->trig_Nav_chain_RoIType->at(chainIndex);
-  
-  if (chainForThisMuon.find("_MSonly") != std::string::npos) efMuonId.chain_type = CHAIN_SA;
-  if (chainForThisMuon.find("_MG") != std::string::npos) efMuonId.chain_type = CHAIN_MG;
-  if (chainForThisMuon.find("i_") != std::string::npos) efMuonId.isIso = true;
-
-  if (m_debug) std::cout << "DEBUG: chain_type = " << efMuonId.chain_type << " (SA = " << CHAIN_SA << "  MG = " << CHAIN_MG << ")\n";
-  if (m_debug) std::cout << "DEBUG: " << (efMuonId.isIso ? "" : "not ") << "Isolated Trigger\n";
-
-  if (efMuonId.isIso) {
-    if (m_d3pd->trig_RoI_EF_mu_TrigMuonEFIsolationContainer == 0) {
-      std::cerr << "ERROR: matching with isolated muon trigger required but trig_RoI_EF_mu_TrigMuonEFIsolationContainer == 0" << std::endl;
-      return dR_min;
-    }
-    if (m_d3pd->trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus == 0) {
-      std::cerr << "ERROR: matching with isolated muon trigger required but trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus == 0" << std::endl;
-      return dR_min;
-    }
-  }
-
-
-  if (m_debug) std::cout << "DEBUG: # of RoI = " << RoIIndex.size() << "\n";
-
-  for (size_t iRoI = 0; iRoI < RoIIndex.size(); ++iRoI) {
-    if (RoIType.at(iRoI) != ChainEntry::kRoIType_EF_mu) continue;
-    efMuonId.roi_index = RoIIndex.at(iRoI);
-
-    if (not l1item.empty()) {
-      if (not L1_isPassed(m_d3pd->trig_RoI_EF_mu_Muon_ROI->at(efMuonId.roi_index), l1item)) continue;
-    }
-
-    const std::vector<int>& container = m_d3pd->trig_RoI_EF_mu_TrigMuonEFInfoContainer->at(efMuonId.roi_index);
-    const std::vector<int>& status = m_d3pd->trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus->at(efMuonId.roi_index);
-
-    double dr = LeptonTriggerMatching::matchedTrackDetail(efMuonId, usedEfMuonId, chainForThisMuon, eta, phi, container, status);
-    if (dr < dR_min) dR_min = dr;
-  }
-
-  return dR_min;
-}
-
-
-
-double
-MuonTriggerMatching::matchedTrackDetail_index(EFmuon& efMuonId,
-                                              const EFmuon& usedEfMuonId,
-                                              const double eta,
-                                              const double phi,
-                                              const std::string& chainForThisMuon,
-                                              const std::string& /*l1item*/,
-                                              const std::string& chainForEventTrigger)
-{
-  efMuonId.indicies.first = -1;
-  efMuonId.indicies.second = -1;
-  efMuonId.iso_index = -1;
-  efMuonId.valid = false;
-  efMuonId.isIso = false;
-
-  const std::string eventTrigger = chainForEventTrigger.empty() ? chainForThisMuon : chainForEventTrigger;
-  return index_match(eta, phi, eventTrigger, chainForThisMuon, efMuonId, usedEfMuonId);
-}
-
-
-
-std::pair<bool, bool>
-MuonTriggerMatching::matchDimuon(const TLorentzVector& muon1,
-                                 const TLorentzVector& muon2,
-                                 const DimuonChainInfo& chainInfo)
-{
-  EFmuon trkId1, trkId2, dummy;
-  const double dr1 = m_index ? matchedTrackDetail_index(trkId1, dummy, muon1.Eta(), muon1.Phi(), chainInfo.thresholds.first, "", chainInfo.chain) :
-                                     matchedTrackDetail(trkId1, dummy, muon1.Eta(), muon1.Phi(), chainInfo.thresholds.first, "", chainInfo.chain);
-  if (chainInfo.isEFFS and trkId1.valid) {
-    if (chainInfo.is2011) {
-      trkId1.valid = checkSeedL2(muon1.Eta(), muon1.Phi(), chainInfo.l2seed);
-    } else {
-      trkId1.valid = m_index ? checkSeed_index(trkId1.eta, trkId1.phi, chainInfo.efseed) :
-                                   checkSeedEF(trkId1.eta, trkId1.phi, chainInfo.efseed);
-    }
-  }
-  const double dr2 = m_index ? matchedTrackDetail_index(trkId2, dummy, muon2.Eta(), muon2.Phi(), chainInfo.thresholds.second, "", chainInfo.chain) :
-                                     matchedTrackDetail(trkId2, dummy, muon2.Eta(), muon2.Phi(), chainInfo.thresholds.second, "", chainInfo.chain);
-
-  if (trkId1.valid and trkId2.valid and
-      isEqual(trkId1.pt, trkId2.pt) and
-      isEqual(trkId1.eta, trkId2.eta) and
-      isEqual(trkId1.phi, trkId2.phi)) {
-    if (dr1 > dr2) {
-      if (m_index) {
-        matchedTrackDetail_index(trkId1, trkId2, muon1.Eta(), muon1.Phi(), chainInfo.thresholds.first, "", chainInfo.chain);
-      } else {
-        matchedTrackDetail(trkId1, trkId2, muon1.Eta(), muon1.Phi(), chainInfo.thresholds.first, "", chainInfo.chain);
-      }
-      if (chainInfo.isEFFS and trkId1.valid) {
-        if (chainInfo.is2011) {
-          trkId1.valid = checkSeedL2(muon1.Eta(), muon1.Phi(), chainInfo.l2seed);
-        } else {
-          trkId1.valid = m_index ? checkSeed_index(trkId1.eta, trkId1.phi, chainInfo.efseed) :
-                                       checkSeedEF(trkId1.eta, trkId1.phi, chainInfo.efseed);
-        }
-      }
-
-    } else {
-      if (m_index) {
-        matchedTrackDetail_index(trkId2, trkId1, muon2.Eta(), muon2.Phi(), chainInfo.thresholds.second, "", chainInfo.chain);
-
-      } else {
-        matchedTrackDetail(trkId2, trkId1, muon2.Eta(), muon2.Phi(), chainInfo.thresholds.second, "", chainInfo.chain);
-      }
-    }
-  }
-  return std::pair<bool, bool>(trkId1.valid, trkId2.valid);
-}
-
-
-
-bool
-MuonTriggerMatching::decodeDimuonChain(DimuonChainInfo& chainInfo)
-{
-  chainInfo.isValid = false;
-
-  std::map<std::string, DimuonChainInfo >::const_iterator p = m_DimuonChainMap.find(chainInfo.chain);
-  if (p != m_DimuonChainMap.end()) {
-    chainInfo = p->second;
-    return chainInfo.isValid;
-  }
-
-  std::vector<std::string> tokens;
-  tokenize(chainInfo.chain, tokens, "_");
-  if (tokens.size() < 2) return false;
-  if (tokens[0] != "EF") return false;
-  chainInfo.isSymmetric = (tokens[1].substr(0, 3) == "2mu");
-
-  if (chainInfo.isSymmetric) {
-    std::string threshold = std::string("EF_" + tokens[1].substr(1));
-    chainInfo.thresholds.first = threshold;
-    chainInfo.thresholds.second = threshold;
-    chainInfo.isValid = true;
-    if (tokens.size() == 3) chainInfo.tightness = tokens[2];
-
-  } else {
-    if (tokens.size() < 4) return false;
-
-    if (tokens[3] == "EFFS") {  // 2011
-      if ((tokens[1].substr(0,2) != "mu") or (tokens[2].substr(0,2) != "mu")) return false;
-      std::string threshold1 = std::string("EF_" + tokens[1]);
-      std::string threshold2 = std::string("EF_" + tokens[2]);
-      chainInfo.isEFFS = true;
-      chainInfo.thresholds.first = threshold1;
-      chainInfo.thresholds.second = threshold2;
-      if (tokens.size() == 5) chainInfo.tightness = tokens[4];
-      chainInfo.l2seed = "L2_" + tokens[1] + (chainInfo.tightness.empty() ? "" : "_" + chainInfo.tightness);
-      chainInfo.is2011 = true;
-      chainInfo.isValid = true; 
-
-    } else if (tokens[4] == "EFFS") { // 2012
-      if ((tokens[1].substr(0,2) != "mu") or (tokens[3].substr(0,2) != "mu")) return false;
-      std::string threshold1 = std::string("EF_" + tokens[1]);
-      std::string threshold2 = std::string("EF_" + tokens[3]);
-      chainInfo.isEFFS = true;
-      chainInfo.thresholds.first = threshold1;
-      chainInfo.thresholds.second = threshold2;
-      if (tokens.size() == 5) chainInfo.tightness = tokens[2];
-      chainInfo.efseed = "EF_" + tokens[1] + (chainInfo.tightness.empty() ? "" : "_" + chainInfo.tightness);
-      chainInfo.is2011 = false;
-      chainInfo.isValid = true; 
-
-    } else {
-      return false;
-    }
-  }
-
-  m_DimuonChainMap[chainInfo.chain] = chainInfo;
-
-  return chainInfo.isValid;
-}
-#include "TrigMuonEfficiency/MuonChainIdMap.h"
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ChainEntry.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ChainEntry.h
deleted file mode 100644
index ab2ce171ea8838915a50e8361815fa4cf2505043..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ChainEntry.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef ChainEntry_h
-#define ChainEntry_h
-// defined in Trigger/TrigAnalaysis/TriggerMenuNtuple/ChainEntry.h
-namespace ChainEntry {
-  enum RoIType {
-    kUnknown = 0,
-    kMuonRoIType = 1,
-    kElectronRoIType = 2,
-    kTauRoIType = 3,
-    kJetRoIType = 4,
-    kBjetRoIType = 5,
-    kMETRoIType = 6,
-    kBphysicsRoIType = 7,
-
-    kRoIType_L2_mu = 1001,
-    kRoIType_L2_e = 1002,
-    kRoIType_L2_tau = 1003,
-    kRoIType_L2_j = 1004,
-    kRoIType_L2_b = 1005,
-    kRoIType_L2_xe = 1006,
-    kRoIType_L2_DiMu = 1007,
-    kRoIType_L2_TileMu = 1010,
-
-    kRoIType_EF_mu = 2001,
-    kRoIType_EF_e = 2002,
-    kRoIType_EF_tau = 2003,
-    kRoIType_EF_j = 2004,
-    kRoIType_EF_b = 2005,
-    kRoIType_EF_xe = 2006,
-    kRoIType_EF_DiMu = 2007,
-    kRoIType_EF_TileMu = 2010
-  };
-  const int kEFChainIdOffset = 10000;
-}
-#endif
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronChainIdMap.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronChainIdMap.h
deleted file mode 100644
index 12d63d9050799b819fbd93e19691fdf20f42b10e..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronChainIdMap.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef ElectronChainIdMap_h
-#define ElectronChainIdMap_h
-void ElectronTriggerMatching::createChainIdMapFromFile() {
-  std::cerr << "ElectronTriggerMatching\t" << "inf> " << "Create ChainIdMap from TrigMuonEfficiency/ElectronChainIdMap.h.\n";
-  std::cerr << std::endl;
-
-  std::map<std::string, int> ChainIdMap;
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e20_medium",    10297));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e22_medium",    10528));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e22vh_medium1", 10049));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e45_medium1",   10547));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_2e12_medium",   10361));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_2e12T_medium",  10718));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e22vh_medium",  10528));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e22vh_medium1", 10049));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_2e12Tvh_medium",10718));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e24vhi_medium1",10178));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e24vh_medium1", 10179));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e45_medium1",   10547));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e60_medium1",   10676));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_2e12Tvh_loose1",10719));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_e10_medium_mu6",10541));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(-1, ChainIdMap));
-
-  std::map<std::string, int> ChainIdMap295;
-  ChainIdMap295.insert(std::pair<std::string, int>("EF_e20_medium",  10297));
-  ChainIdMap295.insert(std::pair<std::string, int>("EF_e22_medium",  10528));
-  ChainIdMap295.insert(std::pair<std::string, int>("EF_e22_medium1", 10049));
-  ChainIdMap295.insert(std::pair<std::string, int>("EF_e45_medium1", 10547));
-  ChainIdMap295.insert(std::pair<std::string, int>("EF_2e12_medium", 10361));
-  ChainIdMap295.insert(std::pair<std::string, int>("EF_2e12T_medium",10718));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(295, ChainIdMap295));
-
-  std::map<std::string, int> ChainIdMap308;
-  ChainIdMap308.insert(std::pair<std::string, int>("EF_e15_medium",  10003));
-  ChainIdMap308.insert(std::pair<std::string, int>("EF_e20_medium",  10297));
-  ChainIdMap308.insert(std::pair<std::string, int>("EF_e22_medium",  10528));
-  ChainIdMap308.insert(std::pair<std::string, int>("EF_e22_medium1", 10049));
-  ChainIdMap308.insert(std::pair<std::string, int>("EF_e45_medium1", 10547));
-  ChainIdMap308.insert(std::pair<std::string, int>("EF_2e12_medium", 10361));
-  ChainIdMap308.insert(std::pair<std::string, int>("EF_2e12T_medium",10718));
-  ChainIdMap308.insert(std::pair<std::string, int>("EF_e10_medium_mu6",10541));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(308,  ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1190, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1187, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1176, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1172, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1170, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1168, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1164, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1163, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1161, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1141, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1137, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1132, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1127, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1123, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1122, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1101, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1096, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1094, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1087, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1085, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1082, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1078, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1053, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1052, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1051, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1048, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1044, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1043, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1039, ChainIdMap308));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1038, ChainIdMap308));
-
-  std::map<std::string, int> ChainIdMap310;
-  ChainIdMap310.insert(std::pair<std::string, int>("EF_e15vh_medium",  10003));
-  ChainIdMap310.insert(std::pair<std::string, int>("EF_e22vh_medium",  10528));
-  ChainIdMap310.insert(std::pair<std::string, int>("EF_e22vh_medium1", 10049));
-  ChainIdMap310.insert(std::pair<std::string, int>("EF_e45_medium1",   10547));
-  ChainIdMap310.insert(std::pair<std::string, int>("EF_e22vh_medium",  10528));
-  ChainIdMap310.insert(std::pair<std::string, int>("EF_e22vh_medium1", 10049));
-  ChainIdMap310.insert(std::pair<std::string, int>("EF_2e12Tvh_medium",10718));
-  ChainIdMap310.insert(std::pair<std::string, int>("EF_e10_medium_mu6",10541));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(310,  ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1259, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1255, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1254, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1237, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1236, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1232, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1231, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1228, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1223, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1216, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1215, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1213, ChainIdMap310));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1208, ChainIdMap310));
-  
-  std::map<std::string, int> ChainIdMap325;
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_e22vh_medium1",  10049));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_e24vhi_medium1", 10178));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_e24vh_medium1",  10179));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_e45_medium1",    10547));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_e60_medium1",    10676));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_2e12Tvh_loose1", 10719));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_2e12Tvh_loose1_L2StarB", 10426));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_e24vh_medium1_e7_medium1", 10789));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_e12Tvh_medium1_mu8", 10126));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_e24vhi_loose1_mu8",  10543));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(325,  ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1369, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1370, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1372, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1373, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1374, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1375, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1388, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1389, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1393, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1396, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1398, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1399, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1404, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1407, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1409, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1413, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1428, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1430, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1433, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1439, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1441, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1443, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1445, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1446, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1453, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1459, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1487, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1505, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1511, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1514, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1518, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1522, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1529, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1532, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1534, ChainIdMap325));
-
-}
-#endif
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronHypothesis.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronHypothesis.h
deleted file mode 100644
index 9e440a8a1a47e6c9aef351e7770649aafe0c3577..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronHypothesis.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef ElectronHypotheis_h
-#define ElectronHypotheis_h
-/**
- * @author  Takashi Matsushita
- */
-
-
-#include <map>
-#include <string>
-
-/**
- *  This class implements methods to apply pt thresholds for EF muon trigger object
- */
-class ElectronHypothesis {
-  public:
-    ElectronHypothesis() {};
-    virtual ~ElectronHypothesis() {};
-
-    /** tests if the combination of given pt [in MeV] and eta passes eta dependent thresholds of the given chain
-     *
-     * @param pt [in] et of an EF electron trigger object in MeV
-     * @param chain [in] EF chain name.
-     */
-    static bool EF_isPassed(const float et,
-                            const std::string& chain);
-
-    typedef std::pair<const std::string, const double> EF_thresholdPair;
-    typedef std::map<const std::string, const double> EF_thresholdMap;
-
-    static bool EF_isPassed(const float et,
-                            const double threshold);
-
-  private:
-    static double getThresholds(const std::string& chain);
-};
-#endif
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronThresholds.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronThresholds.h
deleted file mode 100644
index 5a9e6bfd9ff533ff4ef1683663a014b740981f6d..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronThresholds.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef ElectronThresholds_h
-#define ElectronThresholds_h
-
-#include "TrigMuonEfficiency/ElectronHypothesis.h"
-
-namespace ElectronHypoThresholds {
-
-// EF electron
-const ElectronHypothesis::EF_thresholdPair ef_el_pair[] = {
-  ElectronHypothesis::EF_thresholdPair("7GeV",   7000.),
-  ElectronHypothesis::EF_thresholdPair("12GeV", 12000.),
-  ElectronHypothesis::EF_thresholdPair("24GeV", 24000.),
-};
-
-const ElectronHypothesis::EF_thresholdMap ef_el_map(ef_el_pair, ef_el_pair + sizeof(ef_el_pair)/sizeof(ef_el_pair[0]));
-}
-
-#endif
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronTriggerMatching.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronTriggerMatching.h
deleted file mode 100644
index f553ef855e3beee8dbda2a88b5bb3a60d04f9b89..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/ElectronTriggerMatching.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef __ElectronTriggerMatching_h__
-#define __ElectronTriggerMatching_h__
-/**
- * @author  Toyonobu Okuyama
- * @author  Takashi Matsushita
- */
-
-
-#include <string>
-#include <map>
-#include <set>
-#include "TTree.h"
-#include "TLorentzVector.h"
-
-#include "TrigMuonEfficiency/LeptonTriggerMatching.h"
-
-/**
- *  This class implements method for electron trigger matching with navigation information in ntuple analysis.
- *
- *  Validated on NTUP_SMWZ. Should work on any ntuples which contains trigger navigation information
- */
-class ElectronTriggerMatching : public LeptonTriggerMatching {
-  public:
-    struct DielectronChainInfo {
-      public:
-        std::string chain;
-        std::pair<std::string, std::string> thresholds;
-        std::string tightness;
-        bool isSymmetric;
-        bool isValid;
-
-        DielectronChainInfo(const std::string& chain_="") :
-          chain(chain_), thresholds(), tightness(), isSymmetric(false), isValid(false) { }
-
-        
-        void dump() const {
-          std::cout << "DielectronChainInfo: chain = " << chain
-                << " thresholds.first = " << thresholds.first << " thresholds.second = " << thresholds.second
-                << " isSymmetric = " << isSymmetric << " isValid = " << isValid << "\n";
-        }
-    };
-
-    /** default constructor
-     *
-     * @param d3pd [in] class object used for the given ntuple analysis
-     * @param TrigConfTree [in] pointer of physicsMeta/TrigConfTree block [optional]
-     */
-    ElectronTriggerMatching(const MTT__D3PDEvent *d3pd,
-                            TTree *TrigConfTree=0)
-      : LeptonTriggerMatching(d3pd, TrigConfTree),
-        m_DielectronChainMap()
-    {
-      if (TrigConfTree) {
-        std::vector<std::string> skip;
-        skip.push_back("EF_e");
-        skip.push_back("EF_2e");
-        readTrigConfTree(TrigConfTree, skip);
-
-      } else {
-        createChainIdMapFromFile();
-      }
-    }
-    virtual ~ElectronTriggerMatching(){}
-
-
-
-    /** look for matching EF electron trigger object
-     *
-     * @param eta [in] eta of an offline electron
-     * @param phi [in] phi of an offline electron
-     * @param chain [in] single electron EF chain name. ex) "EF_mu18"
-     * @return true if matching EF object was found false otherwise.
-     */
-    bool match(const double eta,
-               const double phi,
-               const std::string& chain);
-
-    /** look for matching EF di-electron trigger object
-     *
-     * @param electron1 [in] TLorentzVector of electron
-     * @param electron2 [in] TLorentzVector of electron
-     * @param chain [in] di-electron EF chain name. ex) "EF_2e12"
-     * @param result1 [out] bool values indicating if electron1 passed the di-muon trigger.
-     * @param result2 [out] bool values indicating if electron2 passed the di-muon trigger.
-     * @return true if matching EF object was found false otherwise.
-     */
-    bool matchDielectron(const TLorentzVector& electron1,
-                         const TLorentzVector& electron2,
-                         const std::string& chain,
-                         bool& result1,
-                         bool& result2);
-
-    bool matchDielectron(const TLorentzVector& electron1,
-                         const TLorentzVector& electron2,
-                         const std::string& chain,
-                         std::pair<bool, bool>& result1,
-                         std::pair<bool, bool>& result2);
-
-    int matchDielectron_python(const TLorentzVector& electron1,
-                               const TLorentzVector& electron2,
-                               const std::string& chain)
-    {
-      std::pair<bool, bool> result1, result2;
-      matchDielectron(electron1, electron2, chain, result1, result2);
-      return (result1.second << 3 | result2.first << 2 | result2.second << 1 | result1.first << 0);
-    }
-
-
-
-    /** look for matching e/mu combined trigger object
-     *
-     * @param electron [in] TLorentzVector of electron
-     * @param muon [in] TLorentzVector of muon
-     * @param chain [in] electron-muon EF chain name. ex) "EF_e12TVh_medium1_mu8"
-     * @return true if matching EF object was found false otherwise.
-     */
-    bool matchElectronMuon(const TLorentzVector& electron,
-                           const TLorentzVector& muon,
-                           const std::string& chain);
-
-
-
-  private:
-    std::map<std::string, DielectronChainInfo> m_DielectronChainMap; // [chain - <threshold1, threshold2>]
-
-    double matchedTrackDetail(EFelectron& efElectronId,
-                              const EFelectron& usedEfElectronId,
-                              const double eta,
-                              const double phi,
-                              const std::string& chainEventTrigger,
-                              const std::string& threshold = std::string());
-
-
-    std::pair<bool, bool> matchDielectron(const TLorentzVector& electron1,
-                                          const TLorentzVector& electron2,
-                                          const DielectronChainInfo& chainInfo);
-
-    bool decodeDielectronChain(DielectronChainInfo& chainInfo);
-
-    bool decodeElectronMuonChain(const std::string& chain,
-                                 std::string& threshold);
-
-    void createChainIdMapFromFile(); //implementation in ElectronChainIdMap.h
-};
-
-#endif //__ElectronTriggerMatching_h__
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/HSG3TrigLeptonSFTool.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/HSG3TrigLeptonSFTool.h
deleted file mode 100644
index 8337087e50d2d84a2bdfa081eabe788033c12f79..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/HSG3TrigLeptonSFTool.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Dear emacs, this is -*- c++ -*-
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// $Id: HSG3TrigLeptonSFTool.h 523458 2012-10-27 01:18:33Z takashi $
-#ifndef TRIGMUONEFFICIENCY_HSG3TrigLeptonSFTool_H
-#define TRIGMUONEFFICIENCY_HSG3TrigLeptonSFTool_H
-
-// STL include(s):
-#include <utility>
-#include <string>
-
-// ROOT include(s):
-#include "Rtypes.h"
-
-// Forward declaration(s):
-class TLorentzVector;
-class LeptonTriggerSF;
-
-/**
- *  @short Short description for the class
- *
- *         Longer description for the class...
- *
- * $Revision: 523458 $
- * $Date: 2012-10-27 03:18:33 +0200 (Sat, 27 Oct 2012) $
- */
-class HSG3TrigLeptonSFTool {
-
-public:
-   HSG3TrigLeptonSFTool( const std::string& dir, Double_t intLumiJ, Double_t intLumiK,
-                         Double_t intLumiL, Double_t intLumiM );
-   ~HSG3TrigLeptonSFTool();
-
-   Double_t MuEff_CB_HSG3( const std::string& period, Bool_t isData, const TLorentzVector& muon ) const;
-   std::pair< Double_t, Double_t >
-   MuEffErr_CB_HSG3( const std::string& period, Bool_t isData, const TLorentzVector& muon ) const;
-
-private:
-   LeptonTriggerSF* fLeptonTriggerSF;
-
-   Double_t fIntLumiJ;
-   Double_t fIntLumiK;
-   Double_t fIntLumiL;
-   Double_t fIntLumiM;
-
-}; // class HSG3TrigLeptonSFTool
-
-#endif // TRIGMUONEFFICIENCY_HSG3TrigLeptonSFTool_H
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/LeptonTriggerMatching.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/LeptonTriggerMatching.h
deleted file mode 100644
index bf421ea71cde87eb89e3cec07d5a2177668d99da..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/LeptonTriggerMatching.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef __LeptonTriggerMatching_h__
-#define __LeptonTriggerMatching_h__
-/**
- * @author  Takashi Matsushita
- */
-
-
-#include <string>
-#include <map>
-#include <set>
-#include "TTree.h"
-#include "TLorentzVector.h"
-
-#define MUONEF_CB(x) m_d3pd->trig_EF_trigmuonef_track_CB_##x
-#define MUONEF_SA(x) m_d3pd->trig_EF_trigmuonef_track_SA_##x
-#define MUGIRL_CB(x) m_d3pd->trig_EF_trigmugirl_track_CB_##x
-
-#include "TrigMuonEfficiency/TriggerNavigationVariables.h"
-typedef TriggerNavigationVariables MTT__D3PDEvent;
-
-/**
- *  This class implements method for lepton trigger matching with navigation information in ntuple analysis.
- *
- *  Validated on NTUP_SMWZ. Should work on any ntuples which contains TrigMuonD3PDMaker block
- */
-class LeptonTriggerMatching {
-  public:
-    enum MuonChainType {
-      CHAIN_CB = 0, // TrigMuonEF combined chain
-      CHAIN_SA = 1, // TrigMuonEF standalone chain
-      CHAIN_MG = 2  // TrigMuGirl
-    };
-
-    struct EFmuon {
-      bool valid;
-      bool isIso;
-      int iso_index;
-      int roi_index;
-      unsigned int chain_type;
-      std::pair<int, int> indicies;
-      float charge;
-      float pt;
-      float eta;
-      float phi;
-
-      EFmuon() : valid(false), isIso(false), iso_index(-1), roi_index(-1), chain_type(CHAIN_CB), indicies(),
-                 charge(0.), pt(-1.e30), eta(-1.e30), phi(-1.e30) {}
-    };
-
-    struct EFelectron {
-      bool valid;
-      bool useThreshold;
-      float charge;
-      int roi_index;
-      float eta;
-      float phi;
-      std::string threshold;
-
-      EFelectron() : valid(false), useThreshold(false), charge(0.), roi_index(-1), eta(-1.e30), phi(-1.e30), threshold() {}
-    };
-
-
-
-    /** default constructor
-     *
-     * @param d3pd [in] class object used for the given ntuple analysis
-     * @param TrigConfTree [in] pointer of physicsMeta/TrigConfTree block [optional]
-     */
-    LeptonTriggerMatching(const MTT__D3PDEvent *d3pd,
-                          TTree* /*TrigConfTree*/ = 0)
-      : m_d3pd(d3pd),
-        m_matchingDr(0.1),
-        m_debug(false),
-        m_MapOfChainIdMap(),
-        m_NotFoundChain(),
-        m_isIndexMatchUsed(false),
-        m_isNavigationMatchUsed(false)
-    {}
-    virtual ~LeptonTriggerMatching(){}
-
-
-    /** returns minimum distance required for offline lepton and trigger object matching
-     *
-     * @return m_matchingDr
-     */
-    double getDeltaR() const {return m_matchingDr;}
-
-
-    /** set minimum distance required for offline lepton and trigger object matching
-     *
-     * @param dr [in] matching distance for offline lepton and trigger object matching
-     */
-    void setDeltaR(const double dr) {m_matchingDr = dr;}
-
-
-    void setTriggerNavigationVariables(const MTT__D3PDEvent *d3pd) {m_d3pd = d3pd;}
-
-    // for developers
-    void setDebug(bool x) {m_debug = x;}
-    void showSMKeys();
-    void dumpChainIdMap(const int SMK);
-    void createChainIdMapFile(const int SMK,
-                              const std::string& fileName);
-
-
-
-  protected:
-    const MTT__D3PDEvent* m_d3pd; 
-    double m_matchingDr;
-    bool m_debug;
-    std::map<int, std::map<std::string, int> > m_MapOfChainIdMap; // [SMK - [ChainName - ChainId] ]
-    std::set<std::string> m_NotFoundChain;
-    bool m_isIndexMatchUsed;
-    bool m_isNavigationMatchUsed;
-  
-    
-    double matchedTrackDetail(EFelectron& efElectronId,
-                              const EFelectron& usedEfElectronId,
-                              const double eta,
-                              const double phi,
-                              const std::vector<int>& container,
-                              const std::vector<int>& status);
-
-    double matchedTrackDetail(EFmuon& efMuonId,
-                              const EFmuon& usedEfMuonId,
-                              const std::string& threshold,
-                              const double eta,
-                              const double phi,
-                              const std::vector<int>& container,
-                              const std::vector<int>& status);
-
-    double index_match(const double eta,
-                       const double phi,
-                       const std::string& chain,
-                       const std::string& threshold,
-                       EFmuon& efMuonId,
-                       const EFmuon& usedEfMuonId);
-
-    bool L1_isPassed(const int iRoI,
-                     const std::string& l1item);
-
-    int getL1pt(const std::string& l1item);
-
-    int getChainIndex(const std::string& chain);
-
-    void readTrigConfTree(TTree* TrigConfTree,
-                          const std::vector<std::string>& skip);
-
-    double dR(const double eta1,
-              const double phi1,
-              const double eta2,
-              const double phi2);
-
-    void tokenize(const std::string& str,
-                  std::vector<std::string>& tokens,
-                  const std::string& delimiters);
-
-    bool isEqual(const double x,
-                 const double y);
-};
-#endif //__LeptonTriggerMatching_h__
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/LeptonTriggerSF.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/LeptonTriggerSF.h
deleted file mode 100644
index ece3398659d626280de0c425ac5e438c03825322..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/LeptonTriggerSF.h
+++ /dev/null
@@ -1,1038 +0,0 @@
-// Dear emacs, this is -*- c++ -*-
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// $Id: LeptonTriggerSF.h 564936 2013-10-10 17:46:00Z schae $
-#ifndef TrigMuonEfficiency_LeptonTriggerSF_H
-#define TrigMuonEfficiency_LeptonTriggerSF_H
-
-/** 
- * @author  Junjie Zhu (junjie@umich.edu) [original stand-alone code]
- * @author  Marilyn Marx (marx@cern.ch)   [major changes for the TrigMuonEfficiency package / updates]
- * @author  Takashi Matsushita (takashi@cern.ch)   [addition of functionalities / code refactoring]
- * 
- *
- * How to use:
- *
- * pair<double, double>
- * GetTriggerSF(int runnumber, bool useGeV, vector<TLorentzVector> muons, MuonQuality q, vector<TLorentzVector> electrons, ElectronQuality p, int var)
- *
- * where runnumber is an int associating to a real data runnumber in mc,                                
- * useGeV is a bool you set depending on whether quantities are in MeV (useGeV=false) or GeV (useGeV=true) in your code,
- * vector<TLorentzVector> should be filled (separately for muons and electrons) with all good leptons passing your object selection cuts,
- * (N.B. make sure CLUSTER eta is used in the electron TLorentzVector)
- * MuonQuality is an enum, for q enter either loose or combined,
- * ElectronQuality is an enum, for p enter either loosepp, mediumpp, tightpp or ML (multilepton).
- * var is an int for systematic studies, leave out or set to 0 for central SF, set to 1 or 2 for +1 or -1 sigma variation on the SF
- *
- * GetTriggerSF().first returns the event SF
- * GetTriggerSF().second returns the uncertainty (stat and syst) on the event SF
- *
- * Note for analyses that use different lepton qualities for different leptons, use:
- * pair<double, double>
- * GetTriggerSF(int runnumber, bool useGeV, vector<TLorentzVector> muons, vector<MuonQuality> vecq, vector<TLorentzVector> electrons, vector<ElectronQuality> vecp, int var)
- */
-
-// STL include(s):
-#include <vector>
-#include <map>
-#include <string>
-
-// Forward declaration(s):
-class TLorentzVector;
-class TH2;
-class TFile;
-class TDirectory;
-
-namespace Root {
-  class TElectronEfficiencyCorrectionTool;
-}
-
-
-namespace TrigMuonEff {
-
-  /**
-   *  strcuture to hold variables to configure behaviour of the tool
-   */
-  struct Configuration {
-    mutable bool isData;
-    bool isAFII;          /**<  use AFII scale factor for electron trigger or not */
-    bool useGeV;          /**<  use a unit of GeV or not */
-    bool setByUser;       /**<  true if the structure is set by user */
-    int replicaIndex;     /**<  index of replicated histograms to access */
-    int runNumber;        /**<  run number */
-    int systematics;      /**<  flag for systematics */
-    std::string trigger;  /**<  trigger */
-    std::string period;   /**<  data taking period */
-    std::string binning;  /**<  binning of the scale factor map */
-
-    Configuration(const bool isData_ = true,
-                  const bool isAFII_ = false,
-                  const bool useGeV_ = false,
-                  const bool setByUser_ = false,
-                  const int replicaIndex_ = -1,
-                  const int runNumber_ = 0,
-                  const int systematics_ = 0,
-                  const std::string& trigger_ = "",
-                  const std::string& period_ = "",
-                  const std::string& binning_ = "") :
-      isData(isData_),
-      isAFII(isAFII_),
-      useGeV(useGeV_),
-      setByUser(setByUser_),
-      replicaIndex(replicaIndex_),
-      runNumber(runNumber_),
-      systematics(systematics_),
-      trigger(trigger_), 
-      period(period_),
-      binning(binning_) {}
-  };
-
-
-  /**
-   *  Helper enumeration defining the data periods understood by the tool
-   */
-  typedef enum DataPeriod {
-    period_undefined = -1,            perUnDefined      = -1,
-    period_2011_BtoI =  0,            per2011B_I        = 0, 
-    period_2011_JtoMwithoutL3L4 = 1,  per2011J_MwoL3_L4 = 1, 
-    period_2011_L3toL4 = 2,           per2011L3_L4      = 2,
-    
-    //for HSG3 specific use
-    per2011J   = 3,
-    per2011K   = 4,
-    per2011J_K = 5,
-    per2011J_M = 6,
-    per2011L_M = 7,
-    
-    // 2012
-    period_2012_A = 8,      per2012A = 8,
-    period_2012_B = 9,      per2012B = 9,
-    period_2012_CtoE = 10,  per2012CtoE = 10,
-    period_2012_G = 11,  per2012G = 11,
-    period_2012_HtoL = 12,  per2012HtoL = 12
-  } SFDataPeriod;
-}
-
-
-
-/**
- * Helper enumeration defining the muon quality types
- */
-typedef enum MuonQuality {
-  loose    = 0,
-  combined = 1,
-  CaloMuon = 2
-} muon_quality;
-
-/**
- * Helper enumeration defining the electron quality types
- */
-typedef enum ElectronQuality {
-  loosepp = 0,      /**< Loose++ */
-  mediumpp = 1,     /**< Medium++ */
-  tightpp = 2,      /**< Tight++ */
-  MultiLepton = 3,  /**< MultiLepton */
-  ML = 3,           /**< alias for MultiLepton */
-  LooseLLH = 4,     /**< Likelihood loose  */
-  VeryTightLLH = 5  /**< Likelihood very tight */
-} electron_quality;
-
-/**
- * Helper enumeration defining the muon quality types
- */
-typedef enum DileptonTriggerName {
-  kNoTrig    = 0,
-  EF_e12Tvh_medium1_mu8    = 1,
-  EF_2e12Tvh_loose1 = 2,
-  EF_mu18_mu8_EFFS = 3
-} dilepton_trigger_name;
-
-/**
- * Helper enumeration for systematics study
- */
-enum SystematicVariation {
-  noVariation = 0,            /**< no variation */
-  plusOneSigma = 1,           /**< +1 sigma: where sigma is the full error on the SF */
-  minusOneSigma = 2,          /**< -1 sigma: where sigma is the full error on the SF */
-  plusOneSigmaElectron = 3,   /**< +1 sigma: where sigma is the error on the SF only due to electron trigger contributions */
-  minusOneSigmaElectron = 4,  /**< -1 sigma: where sigma is the error on the SF only due to electron trigger contributions */
-  plusOneSigmaMuon = 5,       /**< +1 sigma: where sigma is the error on the SF only due to muon trigger contributions */
-  minusOneSigmaMuon = 6,      /**< -1 sigma: where sigma is the error on the SF only due to muon trigger contributions */
-  statisticalOnlyMuon = 7,    /**< statistical component of uncertainty from muons are used for total uncertainty */
-  systematicOnlyMuon = 8      /**< systematic component of uncertainty from muons are used for total uncertainty */
-};
-
-
-
-/**
- *  @short Class providing trigger scale factors for analyses using electrons and muons
- *
- *         This tool can be used to get the scale factors and their uncertainties in
- *         events with multiple electrons/muons.
- *
- * $Revision: 564936 $
- * $Date: 2013-10-10 19:46:00 +0200 (Thu, 10 Oct 2013) $
- */
-class LeptonTriggerSF {
-public:
-  struct Storage {
-    const std::vector<std::string> *type;
-    const std::vector<std::string> *region;
-    const std::vector<std::string> *quality;
-    const std::vector<std::string> *bins;
-    const std::vector<std::string> *trigger;
-    const std::vector<std::string> *period;
-
-    Storage(const std::vector<std::string> *type_=0,
-            const std::vector<std::string> *region_=0,
-            const std::vector<std::string> *quality_=0,
-            const std::vector<std::string> *bins_=0,
-            const std::vector<std::string> *trigger_=0,
-            const std::vector<std::string> *period_=0) :
-      type(type_),
-      region(region_),
-      quality(quality_),
-      bins(bins_),
-      trigger(trigger_),
-      period(period_) {}
-  };
-
-  /** constructor
-   *  The constructor expects the directory name under which the efficiency file(s) can
-   *  be found, when running in stand-alone ROOT mode. When running in an Athena job it
-   *  can try to guess the correct location, but it may need some help even in that case.
-   *
-   *  The directory can be any directory that ROOT understands, so you can point the tool to a
-   *  DCAP, XRootD or even a web server if you want to.
-   *
-   *  @param directory [in] path to the directory that contains efficiency file(s)
-   *  @param directoryElectron [in] path to the directory that contains efficiency files for ElectronEfficiencyCorrection
-   *  @param electronFileVersion [in] version string of the efficiency files for ElectronEfficiencyCorrection
-   */
-  LeptonTriggerSF(const std::string& directory = "",
-                  const std::string& directoryElectron = "",
-                  const std::string& electronFileVersion = "rel17p2.v02");
-
-  /** constructor
-   *  @param year [in] year in 4 digits
-   *  @param directory [in] path to the directory that contains efficiency file(s)
-   *  @param fileName [in] name of the ROOT file
-   *  @param directoryElectron [in] path to the directory that contains efficiency files for ElectronEfficiencyCorrection
-   *  @param electronFileVersion [in] version string of the efficiency files for ElectronEfficiencyCorrection
-   */
-  LeptonTriggerSF(const int year,
-                  const std::string& directory = "",
-                  const std::string& fileName = "",
-                  const std::string& directoryElectron = "",
-                  const std::string& electronFileVersion = "rel17p2.v02");
-
-  /** constructor
-   *  @param year [in] year in 4 digits
-   *  @param quality [in] year in 4 digits
-   *  @param directory [in] path to the directory that contains efficiency file(s)
-   *  @param fileName [in] name of the ROOT file
-   *  @param directoryElectron [in] path to the directory that contains efficiency files for ElectronEfficiencyCorrection
-   *  @param electronFileVersion [in] version string of the efficiency files for ElectronEfficiencyCorrection
-   */
-  LeptonTriggerSF(const int year,
-                  const std::vector<std::string>& qualities,
-                  const std::string& directory = "",
-                  const std::string& fileName = "",
-                  const std::string& directoryElectron = "",
-                  const std::string& electronFileVersion = "rel17p2.v02");
-
-  /** Destructor */
-  ~LeptonTriggerSF();
-
-
-
-  /** get the trigger scale factor for muons of uniform quality
-    *
-    * @param runNumber [in] run number
-    * @param useGeV [in] use GeV if true, otherwise use MeV
-    * @param muons [in] TLorentzVector array of muons
-    * @param muonQuality [in] muon quality
-    * @param systematicVariation [in] systematic variation
-    * @param configuration [in] configuration
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  GetTriggerSF(const int runNumber,
-               const bool useGeV,
-               const std::vector<TLorentzVector>& muons,
-               const MuonQuality muonQuality,
-               const int systematicVariation = 0,
-               TrigMuonEff::Configuration* configuration = 0) const;
-
-
-
-  /** get the trigger scale factor for muons with non-uniform quality
-    *
-    * @param runNumber [in] run number
-    * @param useGeV [in] use GeV if true, otherwise use MeV
-    * @param muons [in] TLorentzVector array of muons
-    * @param muonsQuality [in] array of muon qualities
-    * @param systematicVariation [in] systematic variation
-    * @param configuration [in] configuration
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  GetTriggerSF(const int runNumber,
-               const bool useGeV,
-               const std::vector<TLorentzVector>& muons,
-               const std::vector<MuonQuality>& muonsQuality,
-               const int systematicVariation = 0,
-               TrigMuonEff::Configuration* configuration = 0) const;
-
-
-
-  /** get the trigger scale factor for muons with non-uniform quality for given trigger
-    *
-    * @param runNumber [in] run number
-    * @param useGeV [in] use GeV if true, otherwise use MeV
-    * @param muons [in] TLorentzVector array of muons
-    * @param muonsQuality [in] array of muon qualities
-    * @param trigger [in] trigger chain
-    * @param systematicVariation [in] systematic variation
-    * @param configuration [in] configuration
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  GetTriggerSF(const int runNumber,
-               const bool useGeV,
-               const std::vector<TLorentzVector>& muons,
-               const std::vector<MuonQuality>& muonsQuality,
-               const std::string& trigger,
-               const int systematicVariation = 0,
-               TrigMuonEff::Configuration* configuration = 0) const;
-
-/** get the trigger scale factor for electrons with non-uniform quality for given trigger
-    *
-    * @param runNumber [in] run number
-    * @param useGeV [in] use GeV if true, otherwise use MeV
-    * @param electrons [in] TLorentzVector array of electrons
-    * @param electronsQuality [in] array of electron qualities
-    * @param trigger [in] trigger chain
-    * @param systematicVariation [in] systematic variation
-    * @param configuration [in] configuration
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  GetTriggerSF(const int runNumber,
-               const bool useGeV,
-               const std::vector<TLorentzVector>& electrons,
-               const std::vector<ElectronQuality>& electronsQuality,
-               const std::string& trigger,
-               const int systematicVariation = 0,
-               TrigMuonEff::Configuration* configuration = 0) const;
-
-  /** get the trigger scale factor for leptons of uniform quality
-    *
-    * @param runNumber [in] run number
-    * @param useGeV [in] use GeV if true, otherwise use MeV
-    * @param muons [in] TLorentzVector array of muons
-    * @param muonQuality [in] muon quality
-    * @param electrons [in] TLorentzVector array of electrons
-    * @param electronQuality [in] electron quality
-    * @param systematicVariation [in] systematic variation
-    * @param configuration [in] configuration
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  GetTriggerSF(const int runNumber,
-               const bool useGeV,
-               const std::vector<TLorentzVector>& muons,
-               const MuonQuality muonQuality,
-               const std::vector<TLorentzVector>& electrons,
-               const ElectronQuality electronQuality,
-               const int systematicVariation = 0,
-               TrigMuonEff::Configuration* configuration = 0) const;
-
-
-
-  /** get the trigger scale factor for leptons with non-uniform quality
-    *
-    * @param runNumber [in] run number
-    * @param useGeV [in] use GeV if true, otherwise use MeV
-    * @param muons [in] TLorentzVector array of muons
-    * @param muonsQuality [in] array of muon qualities
-    * @param electrons [in] TLorentzVector array of electron
-    * @param electronsQuality [in] array of electron qualities
-    * @param systematicVariation [in] systematic variation
-    * @param configuration [in] configuration
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  GetTriggerSF(const int runNumber,
-               const bool useGeV,
-               const std::vector<TLorentzVector>& muons,
-               const std::vector<MuonQuality>& muonsQuality,
-               const std::vector<TLorentzVector>& electrons,
-               const std::vector<ElectronQuality>& electronsQuality,
-               const int systematicVariation = 0,
-               TrigMuonEff::Configuration* configuration = 0) const;
-
-
-  /** get the trigger scale factor for leptons with non-uniform quality
-    *
-    * @param runNumber [in] run number
-    * @param useGeV [in] use GeV if true, otherwise use MeV
-    * @param muons [in] TLorentzVector array of muons
-    * @param muonsQuality [in] array of muon qualities
-    * @param electrons [in] TLorentzVector array of electron
-    * @param electronsQuality [in] array of electron qualities
-    * @param trigger [in] trigger chain
-    * @param systematicVariation [in] systematic variation
-    * @param configuration [in] configuration
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  GetTriggerSF(const int runNumber,
-               const bool useGeV,
-               const std::vector<TLorentzVector>& muons,
-               const std::vector<MuonQuality>& muonsQuality,
-               const std::vector<TLorentzVector>& electrons,
-               const std::vector<ElectronQuality>& electronsQuality,
-	       const std::string& trigger,
-               const int systematicVariation = 0,
-               TrigMuonEff::Configuration* configuration = 0) const;
-
-  /** get the trigger scale factor for leptons with non-uniform quality
-    *
-    * @param configuration [in] configuration
-    * @param muons [in] TLorentzVector array of muons
-    * @param muonsQuality [in] array of muon qualities
-    * @param electrons [in] TLorentzVector array of electron
-    * @param electronsQuality [in] array of electron qualities
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  GetTriggerSF(const TrigMuonEff::Configuration& configuration,
-               const std::vector< TLorentzVector >& muons,
-               const std::vector< MuonQuality >& muonsQuality,
-               const std::vector< TLorentzVector >& electrons,
-               const std::vector< ElectronQuality >& electronsQuality) const;
-
-
-
-  /** get the di-muon trigger scale factor for di-muons with non-uniform quality
-    *
-    * @param configuration [in] configuration
-    * @param muons [in] TLorentzVector array of muons
-    * @param muonsQuality [in] array of muon qualities
-    * @param trigger [in] trigger chain
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  GetTriggerSF(const TrigMuonEff::Configuration& configuration,
-               const std::vector<TLorentzVector>& muons,
-               const std::vector<MuonQuality>& muonsQuality,
-               const std::string& trigger) const;
-
-  /** get the di-electron trigger scale factor for di-electrons with non-uniform quality
-    *
-    * @param configuration [in] configuration
-    * @param electrons [in] TLorentzVector array of electrons
-    * @param electronsQuality [in] array of electron qualities
-    * @param trigger [in] trigger chain
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  GetTriggerSF(const TrigMuonEff::Configuration& configuration,
-               const std::vector<TLorentzVector>& electrons,
-               const std::vector<ElectronQuality>& electronsQuality,
-               const std::string& trigger) const;
-
-  /** get the trigger efficiency for a single muon
-    *
-    * @param configuration [in] configuration
-    * @param muon [in] TLorentzVector of muon
-    * @param muonQuality [in] muon quality
-    * @param trigger [in] trigger
-    * @return pair->first : efficiency, pair->second : uncertainty on the efficiency
-    */
-  std::pair<double, double>
-  getMuonEfficiency(const TrigMuonEff::Configuration& configuration,
-                    const TLorentzVector& muon,
-                    const MuonQuality muonQuality,
-                    const std::string& trigger = "") const;
-
-  std::pair<double, double>
-  MuEff(const TrigMuonEff::Configuration& configuration,
-        const TLorentzVector& muon,
-        const MuonQuality muonQuality,
-        const std::string& trigger = "") const
-  {return getMuonEfficiency(configuration, muon, muonQuality, trigger);}
-
-
-
-  /** get the trigger efficiency for a single muon
-    *
-    * @param period [in] data period
-    * @param isData [in] set it to true if data, false for MC
-    * @param muonQuality [in] muon quality
-    * @return pair->first : efficiency, pair->second : uncertainty on the efficiency
-    */
-  std::pair<double, double>
-  getMuonEfficiency(const TrigMuonEff::DataPeriod period,
-                    const bool isData,
-                    const TLorentzVector& muon,
-                    const MuonQuality muonQuality) const
-  {
-    TrigMuonEff::Configuration config;
-    config.isData = isData;
-
-    setConfiguration(config, period);
-    return getMuonEfficiency(config, muon, muonQuality);
-  };
-
-  std::pair<double, double>
-  MuEff(const TrigMuonEff::DataPeriod period,
-        const bool isData,
-        const TLorentzVector& muon,
-        const MuonQuality muonQuality) const
-  {return getMuonEfficiency(period, isData, muon, muonQuality);}
-
-
-
-  /** get the trigger efficiency for a single muon
-    *
-    * @param runNumber [in] run number
-    * @param isData [in] true for data, false for MC
-    * @param useGeV [in] use GeV if true, otherwise use MeV
-    * @param muon [in] TLorentzVector of muon
-    * @param muonQuality [in] muon quality
-    * @param uncertainty [in] optional: statisticalOnlyMuon or systematicOnlyMuon
-    * @param configuration [in] configuration
-    * @return pair->first : muon trigger efficiency, pair->second : uncertainty on the trigger efficiency
-    */
-  std::pair<double, double>
-  getMuonEfficiency(const int runNumber,
-                    const bool isData,
-                    const bool useGeV,
-                    const TLorentzVector& muon,
-                    const MuonQuality muonQuality,
-                    const int uncertainty = 0,
-                    TrigMuonEff::Configuration* configuration = 0) const
-  {
-    TrigMuonEff::Configuration config;
-    config.runNumber = runNumber;
-    config.isData = isData;
-    config.useGeV = useGeV;
-    config.setByUser = false;
-    config.isAFII = m_IsAFII;
-    config.systematics = uncertainty;
-
-    if (configuration) {
-      config.setByUser = true;
-      config.trigger = configuration->trigger;
-      config.period = configuration->period;
-      config.binning = configuration->binning;
-
-    } else {
-      setConfiguration(config);
-    }
-
-    return getMuonEfficiency(config, muon, muonQuality);
-  }
-
-
-
-  /** get the di-muon trigger efficiency
-    *
-    * @param config [in] configuration
-    * @param muons [in] array of TLorentzVector for muons
-    * @param muonsQuality [in] array of muon quality
-    * @param chain [in] trigger chain name
-    * @return pair->first : dimuon trigger efficiency, pair->second : uncertainty on the trigger efficiency
-    */
-  std::pair<double, double>
-  getDimuonEfficiency(const TrigMuonEff::Configuration& config,
-                      const std::vector<TLorentzVector>& muons,
-                      const std::vector<MuonQuality>& muonsQuality,
-                      const std::string& chain) const;
-
- /** get the di-electron trigger efficiency
-    *
-    * @param config [in] configuration
-    * @param muons [in] array of TLorentzVector for electrons
-    * @param muonsQuality [in] array of electron quality
-    * @param chain [in] trigger chain name
-    * @return pair->first : dielectron trigger efficiency, pair->second : uncertainty on the trigger efficiency
-    */
-  std::pair<double, double>
-  getDielectronEfficiency(const TrigMuonEff::Configuration& config,
-                      const std::vector<TLorentzVector>& electrons,
-                      const std::vector<ElectronQuality>& electronsQuality,
-                      const std::string& chain) const;
-
-
-
-  /** get the OR'ed efficiency of single and dimuon triggers
-    *
-    * @param config [in] configuration
-    * @param muons [in] array of TLorentzVector for muons
-    * @param muonsQuality [in] array of muon quality
-    * @param chain [in] trigger chain name
-    * @return pair->first : single or dimuon trigger efficiency, pair->second : uncertainty on the trigger efficiency
-    */
-  std::pair<double, double>
-  getSingleOrDimuonEfficiency(const TrigMuonEff::Configuration& config,
-                              const std::vector<TLorentzVector>& muons,
-                              const std::vector<MuonQuality>& muonsQuality,
-                              const std::string& chain) const;
-
-  /** get the OR'ed efficiency of single and dielectron triggers
-    *
-    * @param config [in] configuration
-    * @param electrons [in] array of TLorentzVector for electrons
-    * @param electronsQuality [in] array of electron quality
-    * @param chain [in] trigger chain name
-    * @return pair->first : single or dielectron trigger efficiency, pair->second : uncertainty on the trigger efficiency
-    */
-  std::pair<double, double>
-  getSingleOrDielectronEfficiency(const TrigMuonEff::Configuration& config,
-                              const std::vector<TLorentzVector>& electrons,
-                              const std::vector<ElectronQuality>& electronsQuality,
-                              const std::string& chain) const;
-
-  /** get electron trigger SF or efficiency
-    *
-    * @param electron [in] TLorentzVector of electron
-    * @param combination [in] trigger/offline combination
-    * @param year [in] year
-    * @param configuration [in] configuration
-    * @return pair->first : efficiency or SF, pair->second : uncertainty
-    */
-  std::pair<double, double>
-  getElectronSF(const TLorentzVector& electron,
-                const int combination,
-                const int year,
-                const TrigMuonEff::Configuration& configuration) const;
-
-
-
-  /** get electron efficiency for MC
-    *
-    * @param electron [in] TLorentzVector of electron
-    * @param combination [in] trigger/offline combination
-    * @param year [in] year
-    * @param configuration [in] configuration
-    * @return pair->first : efficiency or SF, pair->second : uncertainty
-    */
-  std::pair<double, double>
-  ElEff_MC(const TLorentzVector& electron,
-           const int combination,
-           const int year,
-           const TrigMuonEff::Configuration& configuration) const
-  {return getElectronSF(electron, combination, year, configuration);}
-
-
-
-  /** get electron trigger efficiency for MC
-    *
-    * @param electron [in] TLorentzVector of electron
-    * @param combination [in] trigger/offline combination
-    * @param useGeV [in] true for GeV, false for MeV
-    * @param year [in] year
-    * @param runNumber [in] Run number
-    * @return pair->first : efficiency, pair->second : uncertainty
-    */
-  std::pair<double, double>
-  ElEff_MC(const TLorentzVector& electron,
-           const int combination,
-           const bool useGeV = false,
-           const int year = 2011,
-           const int runNumber = 200804) const
-  {
-    TrigMuonEff::Configuration configuration;
-    configuration.runNumber = runNumber;
-    configuration.useGeV = useGeV;
-    configuration.setByUser = false;
-    configuration.isAFII = m_IsAFII;   
-    return getElectronSF(electron, combination, year, configuration);
-  }
-
-
-
-  /** get electron trigger efficiency for data
-    *
-    * @param electron [in] TLorentzVector of electron
-    * @param combinationSF [in] trigger/offline combination
-    * @param combinationEfficiency [in] trigger/offline combination
-    * @param year [in] year
-    * @param configuration [in] configuration
-    * @return pair->first : efficiency, pair->second : uncertainty
-    */
-  std::pair<double, double>
-  ElEff_Data(const TLorentzVector& electron,
-             const int combinationSF,
-             const int combinationEfficiency,
-             const int year,
-             const TrigMuonEff::Configuration& config) const;
-
-
-
-  /** get electron trigger efficiency for data
-    *
-    * @param electron [in] TLorentzVector of electron
-    * @param combinationSF [in] trigger/offline combination
-    * @param combinationEfficiency [in] trigger/offline combination
-    * @param useGeV [in] true for GeV, false for MeV
-    * @param year [in] year
-    * @param runNumber [in] Run number
-    * @return pair->first : efficiency, pair->second : uncertainty
-    */
-  std::pair<double, double>
-  ElEff_Data(const TLorentzVector& electron,
-             const int combinationSF,
-             const int combinationEfficiency,
-             const bool useGeV = false,
-             const int year = 2011,
-             const int runNumber = 200804) const
-  {
-    TrigMuonEff::Configuration configuration;
-    configuration.runNumber = runNumber;
-    configuration.useGeV = useGeV;
-    configuration.setByUser = false;
-    configuration.isAFII = m_IsAFII;   
-    return ElEff_Data(electron, combinationSF, combinationEfficiency, year, configuration);
-  }
-
-
-
-  /** flag for AtlFast II sample
-   *
-   * @param flag [in] true for AtlFast II sample, false otherwise
-   */
-  void setAFII(const bool flag=true) {m_IsAFII = flag;};
-
-  void setMaxPeriod(const TrigMuonEff::DataPeriod x) {m_max_period = x;};
-
-
-  /** Creates MC replica of efficiency maps
-   *
-   * n Efficiency maps are created. MC replica has eff_ij[n] where eff_ij[n] is generated
-   * with Gaussian using parameters, mu = efficiency at bin [ij] with sigma = statistical
-   * error of the bin [ij]
-   *
-   * @param n [in] number of replica to be created
-   * @param trigger [in] trigger to be replicated
-   */
-  void
-  createMcReplicaMuon(const int n,
-                      const std::string& trigger = std::string());
-
-
-
-  /** get the trigger scale factor for muons with non-uniform quality
-    *
-    * @param runNumber [in] run number
-    * @param useGeV [in] use GeV if true, otherwise use MeV
-    * @param muons [in] TLorentzVector array of muons
-    * @param muonsQuality [in] array of muon qualities
-    * @param index [in] index of replicated histograms to access
-    * @param configuration [in] configuration
-    * @return pair->first : scale factor, pair->second : uncertainty on the scale factor
-    */
-  std::pair<double, double>
-  getSfReplicaMuon(const int runNumber,
-                   const bool useGeV,
-                   const std::vector<TLorentzVector>& muons,
-                   const std::vector<MuonQuality>& muonsQuality,
-                   const int index = 0,
-                   TrigMuonEff::Configuration* configuration = 0) const;
- 
-  /** Translate the electron quality enumeration into a value used internally by the tool
-    *
-    * @param runNumber [in] run number
-    * @param quality [in] electron quality 
-    * @param isSF [in] true for SF, false for efficiency
-    * @param isditrig [in] true if not just default single electron triggers are used 
-    * @return name
-    */
-  int
-  getElectronQuality(const int runNumber,
-                     const ElectronQuality quality,
-                     const bool isSF,
-                     const bool isditrig,
-		     const DileptonTriggerName dilepName = kNoTrig) const;
-
-
-private:
-  void
-  prepareForElectronSF(const std::string& directory);
-
-
-
-  /** get the path name for a root file
-    *
-    * @param directory [in] directory name
-    * @param fileName [in] file name
-    * @return file name
-    */
-  std::string
-  getPathName(const std::string& directory,
-              const std::string& fileName) const;
-
-
-
-  /** set parameters for reading a root file
-    *
-    * @param storage [in] storage parameter
-    */
-  void
-  setStorage(Storage& storage) const;
-
-
-
-  /** get temporary directory
-    *
-    */
-  TDirectory*
-  getTemporaryDirectory(void) const;
-
-
-
-  /** Initialisation method
-   *
-   * The initialisation takes care of reading in all the efficiency histograms from the ROOT
-   * file found in the package. It makes a copy of every histogram in memory, and takes
-   * ownership of them. It then needs to delete each one of them in its destructor.
-   *
-   * @param directory [in] path to the directory that contains efficiency file(s)
-   * @param fileName [in] file name of the efficiency file
-   * @param qualities [in] an array specifing offline muon quality
-   */
-  void
-  initialise(const std::string& directory,
-             const std::string& fileName = "muon_trigger_sf.root",
-             const std::vector<std::string>& qualities = std::vector<std::string>(),
-             const std::string& directoryElectron = "");
-  
-
-
-  /** Translate the muon quality enumeration into a value used internally by the tool
-    *
-    * @param quality [in] muon quality 
-    * @return name
-    */
-  static std::string
-  getMuonQuality(const MuonQuality quality);
-
-
-
-  /** Get the minimum offline electron and muon pT thresholds for a given run
-    *
-    * @param configuration [in] configuration
-    * @return pair->first : muon, pair->second : electron
-    */
-  static std::pair<double, double>
-  getThresholds(const TrigMuonEff::Configuration& configuration);
-
-
-
-  struct DileptonThresholds {
-    double mu18_tight;
-    double mu8_EFFS;
-    double mu8;
-    double mu13;
-    double e12Tvh_loose1;
-    double e12Tvh_medium1;
-    // for backward compatibility
-    DileptonThresholds(const double mu18_tight_ = 20,
-		       const double mu8_EFFS_ = 10,
-		       const double mu13_ = 15,
-		       const double e12Tvh_loose1_ = 14) :
-      mu18_tight(mu18_tight_), mu8_EFFS(mu8_EFFS_), mu8(mu8_EFFS_), mu13(mu13_), e12Tvh_loose1(e12Tvh_loose1_), e12Tvh_medium1(e12Tvh_loose1_) {}
-
-    //DileptonThresholds(const double mu18_tight_ = 20,
-    //		       const double mu8_EFFS_ = 10,
-    //		       const double mu13_ = 15,
-    //		       const double e12Tvh_loose1_ = 14,
-    //		       const double mu8_ = 10,
-    //		       const double e12Tvh_medium1_ = 14) :
-    //  mu18_tight(mu18_tight_), mu8_EFFS(mu8_EFFS_), mu8(mu8_), mu13(mu13_), e12Tvh_loose1(e12Tvh_loose1_), e12Tvh_medium1(e12Tvh_medium1_) {}
-  };
-
-  /** Get the minimum offline muon and electron pT thresholds for dimuon and dielectron chains
-    *
-    * @param configuration [in] configuration
-    * @param thresholds [out] DileptonThresholds structure
-    */
-  static void
-  getDileptonThresholds(const TrigMuonEff::Configuration& config,
-			DileptonThresholds& thresholds);
-
-
-
-  /** Translate a run number to a data period
-    *
-    * @param configuration [in] configuration
-    * @return pair->first : muon, pair->second : electron
-    */
-  static TrigMuonEff::DataPeriod
-  getDataPeriod(int runNumber);
-
-
-
-  /** Function to calculate the uncertainty on the SF
-    *
-    * @param a [in] parameter
-    * @param b [in] parameter
-    * @param c [in] parameter
-    * @param d [in] parameter
-    * @return uncertainty
-    */
-  static double
-  getSfError(const double a,
-             const double b,
-             const double c,
-             const double d);
-
-  /** Function to calculate the uncertainty on the dilepton efficiency
-    *
-    * @param a1 [in] parameter
-    * @param a2 [in] parameter
-    * @param b1 [in] parameter
-    * @param b2 [in] parameter
-    * @param c1 [in] parameter
-    * @param c2 [in] parameter
-    * @param d1 [in] parameter
-    * @param d2 [in] parameter
-    * @param e1 [in] parameter
-    * @param e2 [in] parameter
-    * @param f1 [in] parameter
-    * @param f2 [in] parameter
-    * @return uncertainty
-    */
-  static double
-  getDiError(const double a1, const double a2,
-             const double b1, const double b2,
-             const double c1, const double c2,
-             const double d1, const double d2,
-             const double e1, const double e2,
-             const double f1, const double f2);
-
-/** Function to calculate the uncertainty on the single or dilepton efficiency for asymmetric dilepton triggers
-    *
-    * @param a1 [in] parameter
-    * @param a2 [in] parameter
-    * @param b1 [in] parameter
-    * @param b2 [in] parameter
-    * @param c1 [in] parameter
-    * @param c2 [in] parameter
-    * @param d1 [in] parameter
-    * @param d2 [in] parameter
-    * @param e1 [in] parameter
-    * @param e2 [in] parameter
-    * @param f1 [in] parameter
-    * @param f2 [in] parameter
-    * @param g1 [in] parameter
-    * @param g2 [in] parameter
-    * @param h1 [in] parameter
-    * @param h2 [in] parameter
-    * @return uncertainty
-    */
-  static double
-  getSingleOrDiError_asym(const double a1, const double a2,
-			  const double b1, const double b2,
-			  const double c1, const double c2,
-			  const double d1, const double d2,
-			  const double e1, const double e2,
-			  const double f1, const double f2,
-			  const double g1, const double g2,
-			  const double h1, const double h2);
-
-
-  /** Function to calculate the uncertainty on the single or dilepton efficiency for symmetric dilepton triggers
-    *
-    * @param a1 [in] parameter
-    * @param a2 [in] parameter
-    * @param b1 [in] parameter
-    * @param b2 [in] parameter
-    * @param c1 [in] parameter
-    * @param c2 [in] parameter
-    * @param d1 [in] parameter
-    * @param d2 [in] parameter
-    * @param ispT1above [in] parameter
-    * @param ispT2above [in] parameter
-    * @return uncertainty
-    */
-  static double
-  getSingleOrDiError_sym(const double a1, const double a2,
-			 const double b1, const double b2,
-			 const double c1, const double c2,
-			 const double d1, const double d2,
-			 bool ispT1above, bool ispT2above);
-
-
-  struct DileptonTrigger {
-    std::string leg1;
-    std::string leg2;
-    std::string bothLegs;
-    DileptonTrigger(const std::string& leg1_ = std::string(),
-		    const std::string& leg2_ = std::string(),
-		    const std::string& bothLegs_ = std::string()) :
-      leg1(leg1_), leg2(leg2_), bothLegs(bothLegs_) {}
-  };
-
-  /** Function to calculate the uncertainty on the SF
-    *
-    * @param chain [in] trigger chain name
-    * @param legs [out] DileptonTrigger structure
-    */
-  static void
-  getDileptonLegs(const std::string& chain,
-                DileptonTrigger& legs);
-
-
-  bool
-  setConfiguration(TrigMuonEff::Configuration& config,
-                   TrigMuonEff::DataPeriod period = TrigMuonEff::period_undefined) const;
-
-  void
-  setPhiBoundary2011(const std::vector<std::string> *period);
-
-  void
-  setPhiBoundary(TFile* file);
-
-
-  /** fix phi range to match for the detector configuration
-    *
-    * @param muon [in] TLorentzVector of muon
-    * @return phi
-    */
-  double
-  fixPhiRange(const TLorentzVector& muon) const;
-
-
-  void
-  initialiseElectronTool(const int key) const;
-
-
-  int m_year;
-  std::vector<std::string> m_qualities;
-  typedef std::map<std::string, TH2*> EfficiencyMap;
-  typedef std::pair<std::string, TH2*> EfficiencyPair;
-  EfficiencyMap m_efficiencyMap; /**< The main efficiency storage location */
-  std::vector<EfficiencyMap> m_efficiencyMapReplicaArray; /**< The replica efficiency storage location */
-  
-  double m_phiBoundaryBarrel; /**< Muon phi boundary in the barrel region */
-  double m_phiBoundaryEndcap; /**< Muon phi boundary in the endcap region */
-  
-  typedef std::map<int, Root::TElectronEfficiencyCorrectionTool*> ElectronEfficiencyToolMap;
-  typedef std::pair<int, Root::TElectronEfficiencyCorrectionTool*> ElectronEfficiencyToolPair;
-  mutable ElectronEfficiencyToolMap m_electronSF;
-  mutable std::map<int, std::string> m_fileNameMap;
-
-  bool m_IsAFII;
-  TrigMuonEff::DataPeriod m_max_period;
-  std::string m_electronFileVersion;
-
-}; // class LeptonTriggerSF
-
-#endif // TrigMuonEfficiency_LeptonTriggerSF_H
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonChainIdMap.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonChainIdMap.h
deleted file mode 100644
index 428fcef273186e1c3f30a08bf1bd2bee4a9fecf9..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonChainIdMap.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef MuonChainIdMap_h
-#define MuonChainIdMap_h
-void MuonTriggerMatching::createChainIdMapFromFile() {
-  std::cerr << "MuonTriggerMatching\t" << "inf> " << "Create ChainIdMap from TrigMuonEfficiency/MuonChainIdMap.h.\n";
-  std::cerr << std::endl;
-
-  std::map<std::string, int> ChainIdMap;
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu18",                      10937));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu18_medium",               10941));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu18_MG",                   10975));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu18_MG_medium",            10824));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu40_MSonly_barrel",        10944));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu40_MSonly_barrel_medium", 10874));
-  ChainIdMap.insert(std::pair<std::string, int>("L2_mu15",                      131));
-  ChainIdMap.insert(std::pair<std::string, int>("L2_mu15_medium",               957));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu15",                      10131));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu15_mu10_EFFS",            10943));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu15_mu10_EFFS_medium",     10845));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_2mu4",                      10288));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_2mu4T",                     10288));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_2mu6",                      10135));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_2mu10",                     10914));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_2mu10_loose",               10274));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu20it_tight",              10970));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu24i_tight",               10785));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu36_tight",                10950));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu40_MSonly_barrel_tight",  10870));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_mu18_tight_mu8_EFFS",       10545));
-  ChainIdMap.insert(std::pair<std::string, int>("EF_2mu13",                     10823));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(-1, ChainIdMap));
-
-  std::map<std::string, int> ChainIdMap1051;
-  ChainIdMap1051.insert(std::pair<std::string, int>("EF_mu18",               10937));
-  ChainIdMap1051.insert(std::pair<std::string, int>("EF_mu18_MG",            10975));
-  ChainIdMap1051.insert(std::pair<std::string, int>("EF_mu40_MSonly_barrel", 10944));
-  ChainIdMap1051.insert(std::pair<std::string, int>("L2_mu15",                 943));
-  ChainIdMap1051.insert(std::pair<std::string, int>("EF_mu15",               10131));
-  ChainIdMap1051.insert(std::pair<std::string, int>("EF_mu15_mu10_EFFS",     10943));
-  ChainIdMap1051.insert(std::pair<std::string, int>("EF_2mu4",               10288));
-  ChainIdMap1051.insert(std::pair<std::string, int>("EF_2mu4T",              10288));
-  ChainIdMap1051.insert(std::pair<std::string, int>("EF_2mu6",               10135));
-  ChainIdMap1051.insert(std::pair<std::string, int>("EF_2mu10",              10914));
-  ChainIdMap1051.insert(std::pair<std::string, int>("EF_2mu10_loose",        10274));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1051, ChainIdMap1051));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1052, ChainIdMap1051));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1053, ChainIdMap1051));
-  
-  std::map<std::string, int> ChainIdMap1122;
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_mu18",                      10937));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_mu18_medium",               10941));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_mu18_MG",                   10975));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_mu18_MG_medium",            10824));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_mu40_MSonly_barrel",        10944));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_mu40_MSonly_barrel_medium", 10874));
-  ChainIdMap1122.insert(std::pair<std::string, int>("L2_mu15",                        131));
-  ChainIdMap1122.insert(std::pair<std::string, int>("L2_mu15_medium",                 136));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_mu15",                      10131));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_mu15_mu10_EFFS",            10943));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_mu15_mu10_EFFS_medium",     10845));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_2mu4",                      10288));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_2mu4T",                     10288));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_2mu6",                      10135));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_2mu10",                     10914));
-  ChainIdMap1122.insert(std::pair<std::string, int>("EF_2mu10_loose",               10274));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(295,  ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(308,  ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(310,  ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1259, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1255, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1254, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1237, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1236, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1232, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1231, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1228, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1223, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1216, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1215, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1213, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1208, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1187, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1190, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1187, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1176, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1172, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1170, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1168, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1164, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1163, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1161, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1141, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1137, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1132, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1127, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1123, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1122, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1101, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1096, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1094, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1087, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1085, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1082, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1078, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1053, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1052, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1051, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1048, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1044, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1043, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1039, ChainIdMap1122));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1038, ChainIdMap1122));
-  
-  std::map<std::string, int> ChainIdMap325;
-  ChainIdMap325.insert(std::pair<std::string, int>("L2_mu18_tight"  ,               943));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu8",                      10815));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu18_tight"  ,             10943));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu15",                     10840));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu18",                       850));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu20it_tight",             10970));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu24_tight",               10944));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu24i_tight",              10785));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu36_tight",               10950));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu40_MSonly_barrel_tight", 10870));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu18_tight_mu8_EFFS",      10545));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_2mu13",                    10823));
-  ChainIdMap325.insert(std::pair<std::string, int>("EF_mu24_j65_a4tchad_EFxe40_tclcw", 10109));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(325,  ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1369, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1370, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1372, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1373, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1374, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1375, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1388, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1389, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1393, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1396, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1398, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1399, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1404, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1407, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1409, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1413, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1428, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1430, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1433, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1439, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1441, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1443, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1445, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1446, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1453, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1459, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1487, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1505, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1511, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1514, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1518, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1522, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1529, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1532, ChainIdMap325));
-  m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(1534, ChainIdMap325));
-  
-}
-#endif
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonHypothesis.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonHypothesis.h
deleted file mode 100644
index 21713e0ee4996ffd3fb0aa967d11e1a6821c3527..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonHypothesis.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef MuonHypotheis_h
-#define MuonHypotheis_h
-/**
- * @author  Toyonobu Okuyama
- * @author  Takashi Matsushita
- */
-
-
-#include <map>
-#include <string>
-
-/**
- *  This class implements methods to apply pt thresholds for EF muon trigger object
- */
-class MuonHypothesis {
-  public:
-    MuonHypothesis();
-    virtual ~MuonHypothesis();
-
-    /** tests if the combination of given pt [in MeV] and eta passes eta dependent thresholds of the given chain
-     *
-     * @param pt [in] pt of an EF muon trigger object in MeV
-     * @param eta [in] eta of an EF muon trigger object
-     * @param chain [in] EF chain name. ex) "EF_mu18"
-     */
-    static bool EF_isPassed(const float pt,
-                            const float eta,
-                            const std::string& chain);
-
-    typedef std::pair<const std::string, const double *> EF_thresholdPair;
-    typedef std::map<const std::string, const double *> EF_thresholdMap;
-
-  private:
-    static const double* getThresholds(const std::string& chain);
-    static bool EF_isPassed(const float pt,
-                            const float eta,
-                            const double* threshold);
-};
-#endif
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonThresholds.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonThresholds.h
deleted file mode 100644
index 2ae0a364fe2a38a35ba557eddf54f0babaf5cf26..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonThresholds.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef MuonThresholds_h
-#define MuonThresholds_h
-
-#include "TrigMuonEfficiency/MuonHypothesis.h"
-
-namespace MuonHypoThresholds {
-
-const float hypo_etaregion[] = {1.05, 1.5, 2.0, 9.9};
-size_t hypo_binsize = sizeof(hypo_etaregion)/sizeof(hypo_etaregion[0]);
-
-// EF combined muon
-const double ef_cb_4[]  =  {  3.93,  3.91,  3.88,  3.88};
-const double ef_cb_6[]  =  {  5.88,  5.81,  5.78,  5.76};
-const double ef_cb_8[]  =  {  7.82,  7.74,  7.70,  7.72};
-const double ef_cb_10[] =  {  9.77,  9.67,  9.62,  9.57};
-const double ef_cb_13[] =  { 12.67, 12.55, 12.49, 12.46};
-const double ef_cb_15[] =  { 14.63, 14.49, 14.42, 14.38};
-const double ef_cb_18[] =  { 17.53, 17.39, 17.34, 17.28};
-const double ef_cb_24[] =  { 23.34, 23.19, 23.14, 23.06};
-const double ef_cb_36[] =  { 34.96, 34.78, 34.69, 34.63};
-const double ef_cb_40[] =  { 38.76, 38.54, 38.38, 38.31};
-
-const MuonHypothesis::EF_thresholdPair ef_cb_pair[] = {
-  MuonHypothesis::EF_thresholdPair("4GeV",   ef_cb_4),
-  MuonHypothesis::EF_thresholdPair("6GeV",   ef_cb_6),
-  MuonHypothesis::EF_thresholdPair("8GeV",   ef_cb_8),
-  MuonHypothesis::EF_thresholdPair("10GeV",  ef_cb_10),
-  MuonHypothesis::EF_thresholdPair("13GeV",  ef_cb_13),
-  MuonHypothesis::EF_thresholdPair("15GeV",  ef_cb_15),
-  MuonHypothesis::EF_thresholdPair("18GeV",  ef_cb_18),
-  MuonHypothesis::EF_thresholdPair("24GeV",  ef_cb_24),
-  MuonHypothesis::EF_thresholdPair("36GeV",  ef_cb_36),
-  MuonHypothesis::EF_thresholdPair("40GeV",  ef_cb_40),
-};
-
-const MuonHypothesis::EF_thresholdMap ef_cb_map(ef_cb_pair, ef_cb_pair + sizeof(ef_cb_pair)/sizeof(ef_cb_pair[0]));
-
-
-
-
-// EF stand-alone muon
-const double ef_sa_40[] =            { 31.5, 30.0, 28.5, 32.5};
-const double ef_sa_40_barrelOnly[] = { 31.5,1000.0,1000.0,1000.0};
-const double ef_sa_40_uptoEC2[] =    { 31.5, 30.0, 28.5,  1000.0};
-const double ef_sa_50_barrelOnly[] = { 45.0,1000.0,1000.0,1000.0};
-
-const MuonHypothesis::EF_thresholdPair ef_sa_pair[] = {
-  MuonHypothesis::EF_thresholdPair("40GeV",            ef_sa_40),
-  MuonHypothesis::EF_thresholdPair("40GeV_barrelOnly", ef_sa_40_barrelOnly),
-  MuonHypothesis::EF_thresholdPair("40GeV_uptoEC2",    ef_sa_40_uptoEC2),
-  MuonHypothesis::EF_thresholdPair("50GeV_barrelOnly", ef_sa_50_barrelOnly),
-};
-
-const MuonHypothesis::EF_thresholdMap ef_sa_map(ef_sa_pair, ef_sa_pair + sizeof(ef_sa_pair)/sizeof(ef_sa_pair[0]));
-}
-#endif
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonTriggerMatching.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonTriggerMatching.h
deleted file mode 100644
index 6c8e5ca2cf0e4d1b0f1c37e61d0c249e753e07e8..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/MuonTriggerMatching.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef __MuonTriggerMatching_h__
-#define __MuonTriggerMatching_h__
-/**
- * @author  Toyonobu Okuyama
- * @author  Takashi Matsushita
- */
-
-
-#include <string>
-#include <map>
-#include <set>
-#include "TTree.h"
-#include "TLorentzVector.h"
-
-#include "TrigMuonEfficiency/LeptonTriggerMatching.h"
-
-/**
- *  This class implements method for muon trigger matching with navigation information in ntuple analysis.
- *
- *  Validated on NTUP_SMWZ. Should work on any ntuples which contains TrigMuonD3PDMaker block
- */
-class MuonTriggerMatching : public LeptonTriggerMatching {
-  public:
-    /** default constructor
-     *
-     * @param d3pd [in] class object used for the given ntuple analysis
-     * @param TrigConfTree [in] pointer of physicsMeta/TrigConfTree block [optional]
-     */
-    MuonTriggerMatching(const MTT__D3PDEvent *d3pd,
-                        TTree *TrigConfTree=0)
-      : LeptonTriggerMatching(d3pd, TrigConfTree),
-        m_index(false),
-        m_DimuonChainMap()
-    {
-      if (TrigConfTree) {
-        std::vector<std::string> skip;
-        skip.push_back("EF_mu");
-        skip.push_back("EF_2mu");
-        skip.push_back("L2_mu15");
-        skip.push_back("L2_mu18");
-        skip.push_back("L2_mu20");
-        skip.push_back("L2_mu24");
-        readTrigConfTree(TrigConfTree, skip);
-
-      } else {
-        createChainIdMapFromFile();
-      }
-    }
-    virtual ~MuonTriggerMatching(){}
-
-
-    /** look for matching EF muon trigger object
-     *
-     * @param eta [in] eta of an offline muon
-     * @param phi [in] phi of an offline muon
-     * @param chain [in] single muon EF chain name. ex) "EF_mu18"
-     * @param l1item [in] optional: minimum level1 threshold required for seed of the matching EF chain ex) "L1_MU11"
-     * @return true if matching EF object was found false otherwise.
-     */
-    bool match(const double eta,
-               const double phi,
-               const std::string& chain,
-               const std::string& l1item="");
-
-
-    /** look for matching EF muon trigger object
-     *
-     * @param eta [in] eta of an offline muon
-     * @param phi [in] phi of an offline muon
-     * @param chain [in] single muon EF chain name. ex) "EF_mu18"
-     * @param EFmuon [out] to be used for accessing the matched EF trigger object
-     * @param l1item [in] optional: minimum level1 threshold required for seed of the matching EF chain ex) "L1_MU11"
-     * @return pair of int to access trigger object
-     * 
-    */
-    std::pair<int, int>
-    matchedTrack(const double eta,
-                 const double phi,
-                 const std::string& chain,
-                 const std::string& l1item="");
-
-
-    /** look for matching EF di-muon trigger object
-     *
-     * @param muon1 [in] TLorentzVector of muon
-     * @param muon2 [in] TLorentzVector of muon
-     * @param chain [in] di-muon EF chain name. ex) "EF_2mu10"
-     * @param result1 [out] bool values indicating if muon1 passed the first/second thresholds of the di-muon trigger.
-     * @param result2 [out] bool values indicating if muon2 passed the first/second thresholds of the di-muon trigger.
-     * @return true if matching EF object was found false otherwise.
-     */
-    bool matchDimuon(const TLorentzVector& muon1,
-                     const TLorentzVector& muon2,
-                     const std::string& chain,
-                     std::pair<bool, bool>& result1,
-                     std::pair<bool, bool>& result2);
-
-
-    int matchDimuon_python(const TLorentzVector& muon1,
-                           const TLorentzVector& muon2,
-                           const std::string& chain)
-    {
-      std::pair<bool, bool> result1, result2;
-      matchDimuon(muon1, muon2, chain, result1, result2);
-      return (result1.second << 3 | result2.first << 2 | result2.second << 1 | result1.first << 0);
-    }
-
-
-
-    // for developers
-    void useIndex(bool x) {m_index = x;}
-
-
-    /**
-     *  stores information needed for di-muon trigger matching
-     */
-    struct DimuonChainInfo {
-      public:
-        std::string chain;
-        std::string tightness;
-        std::pair<std::string, std::string> thresholds;
-        std::string l2seed;
-        std::string efseed;
-        bool is2011;
-        bool isEFFS;
-        bool isSymmetric;
-        bool isValid;
-
-        DimuonChainInfo(const std::string& chain_="") :
-          chain(chain_), tightness(""), thresholds(), l2seed(""), efseed(""),
-          is2011(false), isEFFS(false), isSymmetric(false), isValid(false) {}
-
-        void dump() {
-          std::cout << "DimuonChainInfo: chain = " << chain << " tightness = " << tightness
-                << " thresholds.first = " << thresholds.first << " thresholds.second = " << thresholds.second
-                << " l2seed = " << l2seed << " efseed = " << efseed << " is2011 = " << is2011
-                << " isEFFS = " << isEFFS << " isSymmetric = " << isSymmetric << " isValid = " << isValid << "\n";
-        }
-    };
-
-  private:
-    bool m_index;
-    std::map<std::string, DimuonChainInfo> m_DimuonChainMap; // [chain - <threshold1, threshold2>]
-  
-    double matchedTrackDetail_index(EFmuon& efMuonId,
-                                    const EFmuon& usedEfMuonId,
-                                    const double eta,
-                                    const double phi,
-                                    const std::string& chainForThisMuon,
-                                    const std::string& l1item = std::string(),
-                                    const std::string& chainEventTrigger = std::string());
-
-    double matchedTrackDetail(EFmuon& efMuonId,
-                              const EFmuon& usedEfMuonId,
-                              const double eta,
-                              const double phi,
-                              const std::string& chainForThisMuon,
-                              const std::string& l1item = std::string(),
-                              const std::string& chainEventTrigger = std::string());
-
-    std::pair<bool, bool> matchDimuon(const TLorentzVector& muon1,
-                                      const TLorentzVector& muon2,
-                                      const DimuonChainInfo& chain);
-
-    void createChainIdMapFromFile(); //implementation in MuonChainIdMap.h
-
-    bool decodeDimuonChain(DimuonChainInfo& chainInfo);
-
-    bool checkSeedL2(const double eta,
-                     const double phi,
-                     const std::string& chain,
-                     double l2dr=0.15,
-                     double l1dr=0.20);
-
-    bool checkSeedEF(const double eta,
-                     const double phi,
-                     const std::string& chain);
-
-    bool checkSeed_index(const double eta,
-                         const double phi,
-                         const std::string& chain);
-};
-
-
-#endif //__MuonTriggerMatching_h__
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/TriggerNavigationVariables.h b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/TriggerNavigationVariables.h
deleted file mode 100644
index 65396b6ef170bed39f641225d8b2801095f5224a..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/TriggerNavigationVariables.h
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef __TriggerNavigationVariables_h__
-#define __TriggerNavigationVariables_h__
-
-#include <vector>
-#include <limits>
-#include <iostream>
-
-
-
-class TriggerNavigationVariables
-{
-  public:
-    TriggerNavigationVariables() :
-      hasSetVariables(false),
-      hasIsolationVariables(false),
-      isFirstCall(true),
-      trig_DB_SMK(0),
-      trig_Nav_n(0),
-      trig_Nav_chain_ChainId(0),
-      trig_Nav_chain_RoIType(0),
-      trig_Nav_chain_RoIIndex(0),
-      /* electron */
-      trig_RoI_EF_e_egammaContainer_egamma_Electrons(0),
-      trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus(0),
-      trig_EF_el_n(0),
-      trig_EF_el_eta(0),
-      trig_EF_el_phi(0),
-      trig_EF_el_Et(0),
-      /* muon */
-      trig_RoI_EF_mu_Muon_ROI(0),
-      trig_RoI_EF_mu_TrigMuonEFInfoContainer(0),
-      trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus(0),
-      trig_RoI_L2_mu_CombinedMuonFeature(0),
-      trig_RoI_L2_mu_CombinedMuonFeatureStatus(0),
-      trig_RoI_L2_mu_MuonFeature(0),
-      trig_RoI_L2_mu_Muon_ROI(0),
-      trig_EF_trigmuonef_track_CB_pt(0),
-      trig_EF_trigmuonef_track_CB_eta(0),
-      trig_EF_trigmuonef_track_CB_phi(0),
-      trig_EF_trigmuonef_track_SA_pt(0),
-      trig_EF_trigmuonef_track_SA_eta(0),
-      trig_EF_trigmuonef_track_SA_phi(0),
-      trig_EF_trigmugirl_track_CB_pt(0),
-      trig_EF_trigmugirl_track_CB_eta(0),
-      trig_EF_trigmugirl_track_CB_phi(0),
-      trig_EF_trigmuonef_track_MuonType(0),
-      trig_L2_combmuonfeature_eta(0),
-      trig_L2_combmuonfeature_phi(0),
-      trig_L2_muonfeature_eta(0),
-      trig_L2_muonfeature_phi(0),
-      trig_L1_mu_eta(0),
-      trig_L1_mu_phi(0),
-      trig_L1_mu_thrName(0),
-      /* muon isolation */
-      trig_RoI_EF_mu_TrigMuonEFIsolationContainer(0),
-      trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus(0),
-      /* workaround for TriggerMenuAnalysis-00-02-86 */
-      trig_EF_trigmuonef_EF_mu8(0),
-      trig_EF_trigmuonef_EF_mu15(0),
-      trig_EF_trigmuonef_EF_mu24i_tight(0),
-      trig_EF_trigmuonef_EF_mu36_tight(0),
-      trig_EF_trigmuonef_EF_mu18_tight(0),
-      trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS(0),
-      trig_EF_trigmuonef_EF_2mu13(0),
-      trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight(0),
-      trig_EF_trigmuonef_EF_mu24_tight(0),
-      trig_EF_trigmuonef_EF_mu20it_tight(0)
-      {}
-
-    TriggerNavigationVariables(
-      unsigned int &trig_DB_SMK_,
-      int &trig_Nav_n_,
-      std::vector<short> *&trig_Nav_chain_ChainId_,
-      std::vector<std::vector<int> > *&trig_Nav_chain_RoIType_,
-      std::vector<std::vector<int> > *&trig_Nav_chain_RoIIndex_,
-      /* electron */
-      std::vector<std::vector<int> > *&trig_RoI_EF_e_egammaContainer_egamma_Electrons_,
-      std::vector<std::vector<int> > *&trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus_,
-      int &trig_EF_el_n_,
-      std::vector<float> *&trig_EF_el_eta_,
-      std::vector<float> *&trig_EF_el_phi_,
-      std::vector<float> *&trig_EF_el_Et_,
-      /* muon */
-      std::vector<int> *&trig_RoI_EF_mu_Muon_ROI_,
-      std::vector<std::vector<int> > *&trig_RoI_EF_mu_TrigMuonEFInfoContainer_,
-      std::vector<std::vector<int> > *&trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus_,
-      std::vector<int> *&trig_RoI_L2_mu_CombinedMuonFeature_,
-      std::vector<int> *&trig_RoI_L2_mu_CombinedMuonFeatureStatus_,
-      std::vector<int> *&trig_RoI_L2_mu_MuonFeature_,
-      std::vector<int> *&trig_RoI_L2_mu_Muon_ROI_,
-      std::vector<std::vector<float> > *&trig_EF_trigmuonef_track_CB_pt_,
-      std::vector<std::vector<float> > *&trig_EF_trigmuonef_track_CB_eta_,
-      std::vector<std::vector<float> > *&trig_EF_trigmuonef_track_CB_phi_,
-      std::vector<std::vector<float> > *&trig_EF_trigmuonef_track_SA_pt_,
-      std::vector<std::vector<float> > *&trig_EF_trigmuonef_track_SA_eta_,
-      std::vector<std::vector<float> > *&trig_EF_trigmuonef_track_SA_phi_,
-      std::vector<std::vector<float> > *&trig_EF_trigmugirl_track_CB_pt_,
-      std::vector<std::vector<float> > *&trig_EF_trigmugirl_track_CB_eta_,
-      std::vector<std::vector<float> > *&trig_EF_trigmugirl_track_CB_phi_,
-      std::vector<float> *&trig_L2_combmuonfeature_eta_,
-      std::vector<float> *&trig_L2_combmuonfeature_phi_,
-      std::vector<float> *&trig_L2_muonfeature_eta_,
-      std::vector<float> *&trig_L2_muonfeature_phi_,
-      std::vector<float> *&trig_L1_mu_eta_,
-      std::vector<float> *&trig_L1_mu_phi_,
-      std::vector<std::string> *&trig_L1_mu_thrName_,
-      /* muon isolation */
-      std::vector<std::vector<int> > *&trig_RoI_EF_mu_TrigMuonEFIsolationContainer_,
-      std::vector<std::vector<int> > *&trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus_
-    ) :
-      hasSetVariables(true),
-      trig_DB_SMK(&trig_DB_SMK_),
-      trig_Nav_n(&trig_Nav_n_),
-      trig_Nav_chain_ChainId(trig_Nav_chain_ChainId_),
-      trig_Nav_chain_RoIType(trig_Nav_chain_RoIType_),
-      trig_Nav_chain_RoIIndex(trig_Nav_chain_RoIIndex_),
-      /* electron */
-      trig_RoI_EF_e_egammaContainer_egamma_Electrons(trig_RoI_EF_e_egammaContainer_egamma_Electrons_),
-      trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus(trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus_),
-      trig_EF_el_n(&trig_EF_el_n_),
-      trig_EF_el_eta(trig_EF_el_eta_),
-      trig_EF_el_phi(trig_EF_el_phi_),
-      trig_EF_el_Et(trig_EF_el_Et_),
-      /* muon */
-      trig_RoI_EF_mu_Muon_ROI(trig_RoI_EF_mu_Muon_ROI_),
-      trig_RoI_EF_mu_TrigMuonEFInfoContainer(trig_RoI_EF_mu_TrigMuonEFInfoContainer_),
-      trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus(trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus_),
-      trig_RoI_L2_mu_CombinedMuonFeature(trig_RoI_L2_mu_CombinedMuonFeature_),
-      trig_RoI_L2_mu_CombinedMuonFeatureStatus(trig_RoI_L2_mu_CombinedMuonFeatureStatus_),
-      trig_RoI_L2_mu_MuonFeature(trig_RoI_L2_mu_MuonFeature_),
-      trig_RoI_L2_mu_Muon_ROI(trig_RoI_L2_mu_Muon_ROI_),
-      trig_EF_trigmuonef_track_CB_pt(trig_EF_trigmuonef_track_CB_pt_),
-      trig_EF_trigmuonef_track_CB_eta(trig_EF_trigmuonef_track_CB_eta_),
-      trig_EF_trigmuonef_track_CB_phi(trig_EF_trigmuonef_track_CB_phi_),
-      trig_EF_trigmuonef_track_SA_pt(trig_EF_trigmuonef_track_SA_pt_),
-      trig_EF_trigmuonef_track_SA_eta(trig_EF_trigmuonef_track_SA_eta_),
-      trig_EF_trigmuonef_track_SA_phi(trig_EF_trigmuonef_track_SA_phi_),
-      trig_EF_trigmugirl_track_CB_pt(trig_EF_trigmugirl_track_CB_pt_),
-      trig_EF_trigmugirl_track_CB_eta(trig_EF_trigmugirl_track_CB_eta_),
-      trig_EF_trigmugirl_track_CB_phi(trig_EF_trigmugirl_track_CB_phi_),
-      trig_L2_combmuonfeature_eta(trig_L2_combmuonfeature_eta_),
-      trig_L2_combmuonfeature_phi(trig_L2_combmuonfeature_phi_),
-      trig_L2_muonfeature_eta(trig_L2_muonfeature_eta_),
-      trig_L2_muonfeature_phi(trig_L2_muonfeature_phi_),
-      trig_L1_mu_eta(trig_L1_mu_eta_),
-      trig_L1_mu_phi(trig_L1_mu_phi_),
-      trig_L1_mu_thrName(trig_L1_mu_thrName_),
-      /* muon isolation */
-      trig_RoI_EF_mu_TrigMuonEFIsolationContainer(trig_RoI_EF_mu_TrigMuonEFIsolationContainer_),
-      trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus(trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus_)
-      {}
-
-    ~TriggerNavigationVariables() {}
- 
-
-    void set_trig_DB_SMK(unsigned int &x) {trig_DB_SMK = &x;}
-    void set_trig_Nav_n(int &x) {trig_Nav_n = &x;}
-    void set_trig_Nav_chain_ChainId(std::vector<short> *&x) {trig_Nav_chain_ChainId = x;}
-    void set_trig_Nav_chain_RoIType(std::vector<std::vector<int> > *&x) {trig_Nav_chain_RoIType = x;}
-    void set_trig_Nav_chain_RoIIndex(std::vector<std::vector<int> > *&x) {trig_Nav_chain_RoIIndex = x;}
-
-    /* electron */
-    void set_trig_RoI_EF_e_egammaContainer_egamma_Electrons(std::vector<std::vector<int> > *&x) {trig_RoI_EF_e_egammaContainer_egamma_Electrons = x;}
-    void set_trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus(std::vector<std::vector<int> > *&x) {trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus = x;}
-    void set_trig_EF_el_n(int &x) {trig_EF_el_n = &x;}
-    void set_trig_EF_el_eta(std::vector<float> *&x) {trig_EF_el_eta = x;}
-    void set_trig_EF_el_phi(std::vector<float> *&x) {trig_EF_el_phi = x;}
-    void set_trig_EF_el_Et(std::vector<float> *&x) {trig_EF_el_Et = x;}
-
-    /* muon */
-    void set_trig_RoI_EF_mu_Muon_ROI(std::vector<int> *&x) {trig_RoI_EF_mu_Muon_ROI = x;}
-    void set_trig_RoI_EF_mu_TrigMuonEFInfoContainer(std::vector<std::vector<int> > *&x) {trig_RoI_EF_mu_TrigMuonEFInfoContainer = x;}
-    void set_trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus(std::vector<std::vector<int> > *&x) {trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus = x;}
-    void set_trig_RoI_L2_mu_CombinedMuonFeature(std::vector<int> *&x) {trig_RoI_L2_mu_CombinedMuonFeature = x;}
-    void set_trig_RoI_L2_mu_CombinedMuonFeatureStatus(std::vector<int> *&x) {trig_RoI_L2_mu_CombinedMuonFeatureStatus = x;}
-    void set_trig_RoI_L2_mu_MuonFeature(std::vector<int> *&x) {trig_RoI_L2_mu_MuonFeature = x;}
-    void set_trig_RoI_L2_mu_Muon_ROI(std::vector<int> *&x) {trig_RoI_L2_mu_Muon_ROI = x;}
-    void set_trig_EF_trigmuonef_track_CB_pt(std::vector<std::vector<float> > *&x) {trig_EF_trigmuonef_track_CB_pt = x;}
-    void set_trig_EF_trigmuonef_track_CB_eta(std::vector<std::vector<float> > *&x) {trig_EF_trigmuonef_track_CB_eta = x;}
-    void set_trig_EF_trigmuonef_track_CB_phi(std::vector<std::vector<float> > *&x) {trig_EF_trigmuonef_track_CB_phi = x;}
-    void set_trig_EF_trigmuonef_track_SA_pt(std::vector<std::vector<float> > *&x) {trig_EF_trigmuonef_track_SA_pt = x;}
-    void set_trig_EF_trigmuonef_track_SA_eta(std::vector<std::vector<float> > *&x) {trig_EF_trigmuonef_track_SA_eta = x;}
-    void set_trig_EF_trigmuonef_track_SA_phi(std::vector<std::vector<float> > *&x) {trig_EF_trigmuonef_track_SA_phi = x;}
-    void set_trig_EF_trigmugirl_track_CB_pt(std::vector<std::vector<float> > *&x) {trig_EF_trigmugirl_track_CB_pt = x;}
-    void set_trig_EF_trigmugirl_track_CB_eta(std::vector<std::vector<float> > *&x) {trig_EF_trigmugirl_track_CB_eta = x;}
-    void set_trig_EF_trigmugirl_track_CB_phi(std::vector<std::vector<float> > *&x) {trig_EF_trigmugirl_track_CB_phi = x;}
-    void set_trig_EF_trigmuonef_track_MuonType(std::vector<std::vector<int> > *&x) {trig_EF_trigmuonef_track_MuonType = x;}
-    void set_trig_L2_combmuonfeature_eta(std::vector<float> *&x) {trig_L2_combmuonfeature_eta = x;}
-    void set_trig_L2_combmuonfeature_phi(std::vector<float> *&x) {trig_L2_combmuonfeature_phi = x;}
-    void set_trig_L2_muonfeature_eta(std::vector<float> *&x) {trig_L2_muonfeature_eta = x;}
-    void set_trig_L2_muonfeature_phi(std::vector<float> *&x) {trig_L2_muonfeature_phi = x;}
-    void set_trig_L1_mu_eta(std::vector<float> *&x) {trig_L1_mu_eta = x;}
-    void set_trig_L1_mu_phi(std::vector<float> *&x) {trig_L1_mu_phi = x;}
-    void set_trig_L1_mu_thrName(std::vector<std::string> *&x) {trig_L1_mu_thrName = x;}
-    /* muon isolation */
-    void set_trig_RoI_EF_mu_TrigMuonEFIsolationContainer(std::vector<std::vector<int> > *&x) {trig_RoI_EF_mu_TrigMuonEFIsolationContainer = x;}
-    void set_trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus(std::vector<std::vector<int> > *&x) {trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus = x;}
-
-    /* workaround for TriggerMenuAnalysis-00-02-86 */
-    void set_trig_EF_trigmuonef_EF_mu8(std::vector<int> *&x) {trig_EF_trigmuonef_EF_mu8 = x;}
-    void set_trig_EF_trigmuonef_EF_mu15(std::vector<int> *&x) {trig_EF_trigmuonef_EF_mu15 = x;}
-    void set_trig_EF_trigmuonef_EF_mu24i_tight(std::vector<int> *&x) {trig_EF_trigmuonef_EF_mu24i_tight = x;}
-    void set_trig_EF_trigmuonef_EF_mu36_tight(std::vector<int> *&x) {trig_EF_trigmuonef_EF_mu36_tight = x;}
-    void set_trig_EF_trigmuonef_EF_mu18_tight(std::vector<int> *&x) {trig_EF_trigmuonef_EF_mu18_tight = x;}
-    void set_trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS(std::vector<int> *&x) {trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS = x;}
-    void set_trig_EF_trigmuonef_EF_2mu13(std::vector<int> *&x) {trig_EF_trigmuonef_EF_2mu13 = x;}
-    void set_trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight(std::vector<int> *&x) {trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight = x;}
-    void set_trig_EF_trigmuonef_EF_mu24_tight(std::vector<int> *&x) {trig_EF_trigmuonef_EF_mu24_tight = x;}
-    void set_trig_EF_trigmuonef_EF_mu20it_tight(std::vector<int> *&x) {trig_EF_trigmuonef_EF_mu20it_tight = x;}
-    
-    bool isValid() const {
-      if (hasSetVariables) return true;
-
-      if (trig_DB_SMK == 0) return false;
-      if (trig_Nav_n == 0) return false;
-      if (trig_Nav_chain_ChainId == 0) return false;
-      if (trig_Nav_chain_RoIType == 0) return false;
-      if (trig_Nav_chain_RoIIndex == 0) return false;
-      /* electron */
-      if (trig_RoI_EF_e_egammaContainer_egamma_Electrons == 0) return false;
-      if (trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus == 0) return false;
-      if (trig_EF_el_n == 0) return false;
-      if (trig_EF_el_eta == 0) return false;
-      if (trig_EF_el_phi == 0) return false;
-      /* muon */
-      if (trig_RoI_EF_mu_Muon_ROI == 0) return false;
-      if (trig_RoI_EF_mu_TrigMuonEFInfoContainer == 0) return false;
-      if (trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus == 0) return false;
-      if (trig_RoI_L2_mu_CombinedMuonFeature == 0) return false;
-      if (trig_RoI_L2_mu_CombinedMuonFeatureStatus == 0) return false;
-      if (trig_RoI_L2_mu_MuonFeature == 0) return false;
-      if (trig_RoI_L2_mu_Muon_ROI == 0) return false;
-      if (trig_EF_trigmuonef_track_CB_pt == 0) return false;
-      if (trig_EF_trigmuonef_track_CB_eta == 0) return false;
-      if (trig_EF_trigmuonef_track_CB_phi == 0) return false;
-      if (trig_EF_trigmuonef_track_SA_pt == 0) return false;
-      if (trig_EF_trigmuonef_track_SA_eta == 0) return false;
-      if (trig_EF_trigmuonef_track_SA_phi == 0) return false;
-      if (trig_EF_trigmugirl_track_CB_pt == 0) return false;
-      if (trig_EF_trigmugirl_track_CB_eta == 0) return false;
-      if (trig_EF_trigmugirl_track_CB_phi == 0) return false;
-      if (trig_L2_combmuonfeature_eta == 0) return false;
-      if (trig_L2_combmuonfeature_phi == 0) return false;
-      if (trig_L2_muonfeature_eta == 0) return false;
-      if (trig_L2_muonfeature_phi == 0) return false;
-      if (trig_L1_mu_eta == 0) return false;
-      if (trig_L1_mu_phi == 0) return false;
-      if (trig_L1_mu_thrName == 0) return false;
-
-      /* for asymmetric di-electron trigger */
-      if (trig_EF_el_Et == 0) {
-        if (isFirstCall) std::cout << "INFORMATION: variables needed for asymmetric di-electron triggers not set "
-                                      "(trig_EF_el_Et)\n";
-      }
-
-      /* for full-scan trigger in 2012 */
-      if (trig_EF_trigmuonef_track_MuonType == 0) {
-        if (isFirstCall) std::cout << "INFORMATION: variables needed for full scan di-muon triggers in 2012 not set "
-                                      "(trig_EF_trigmuonef_track_MuonType)\n";
-      }
-
-      /* muon isolation */
-      if ((trig_RoI_EF_mu_TrigMuonEFIsolationContainer == 0) or
-          (trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus  == 0))
-      {
-        if (isFirstCall) std::cout << "INFORMATION: variables needed for isolated muon triggers not set "
-                                      "(trig_RoI_EF_mu_TrigMuonEFIsolationContainer) and/or "
-                                      "(trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus)\n";
-      } else {
-        hasIsolationVariables = true;
-      }
-
-      /* workaround for TriggerMenuAnalysis-00-02-86 */
-      if ((trig_EF_trigmuonef_EF_mu24i_tight != 0) or
-          (trig_EF_trigmuonef_EF_mu36_tight != 0) or
-          (trig_EF_trigmuonef_EF_mu18_tight != 0) or
-          (trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS != 0) or
-          (trig_EF_trigmuonef_EF_2mu13 != 0) or
-          (trig_EF_trigmuonef_EF_mu8 != 0) or
-          (trig_EF_trigmuonef_EF_mu15 != 0) or
-          (trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight != 0)) {
-        if (isFirstCall) std::cout << "INFORMATION: variables needed for workaround for TriggerMenuAnalysis-00-02-86 available "
-                                      "(trig_EF_trigmuonef_EF_mu24i_tight) and/or "
-                                      "(trig_EF_trigmuonef_EF_mu36_tight) and/or "
-                                      "(trig_EF_trigmuonef_EF_mu18_tight) and/or "
-                                      "(trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS) and/or "
-                                      "(trig_EF_trigmuonef_EF_2mu13) and/or "
-                                      "(trig_EF_trigmuonef_EF_mu8) and/or "
-                                      "(trig_EF_trigmuonef_EF_mu15) and/or "
-                                      "(trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight)\n";
-      }
-
-      hasSetVariables = true;
-      isFirstCall = false;
-      return true;
-    };
-
-
-
-  private:
-    bool mutable hasSetVariables;
-    bool mutable hasIsolationVariables;
-    bool mutable isFirstCall;
-
-  public:
-    const unsigned int *trig_DB_SMK;
-    const int *trig_Nav_n;
-    const std::vector<short> *trig_Nav_chain_ChainId;
-    const std::vector<std::vector<int> > *trig_Nav_chain_RoIType;
-    const std::vector<std::vector<int> > *trig_Nav_chain_RoIIndex;
-
-    /* electron */
-    const std::vector<std::vector<int> > *trig_RoI_EF_e_egammaContainer_egamma_Electrons;
-    const std::vector<std::vector<int> > *trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus;
-    const int *trig_EF_el_n;
-    const std::vector<float> *trig_EF_el_eta;
-    const std::vector<float> *trig_EF_el_phi;
-    const std::vector<float> *trig_EF_el_Et;
-
-    /* muon */
-    const std::vector<int> *trig_RoI_EF_mu_Muon_ROI;
-    const std::vector<std::vector<int> > *trig_RoI_EF_mu_TrigMuonEFInfoContainer;
-    const std::vector<std::vector<int> > *trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus;
-    const std::vector<int> *trig_RoI_L2_mu_CombinedMuonFeature;
-    const std::vector<int> *trig_RoI_L2_mu_CombinedMuonFeatureStatus;
-    const std::vector<int> *trig_RoI_L2_mu_MuonFeature;
-    const std::vector<int> *trig_RoI_L2_mu_Muon_ROI;
-    const std::vector<std::vector<float> > *trig_EF_trigmuonef_track_CB_pt;
-    const std::vector<std::vector<float> > *trig_EF_trigmuonef_track_CB_eta;
-    const std::vector<std::vector<float> > *trig_EF_trigmuonef_track_CB_phi;
-    const std::vector<std::vector<float> > *trig_EF_trigmuonef_track_SA_pt;
-    const std::vector<std::vector<float> > *trig_EF_trigmuonef_track_SA_eta;
-    const std::vector<std::vector<float> > *trig_EF_trigmuonef_track_SA_phi;
-    const std::vector<std::vector<float> > *trig_EF_trigmugirl_track_CB_pt;
-    const std::vector<std::vector<float> > *trig_EF_trigmugirl_track_CB_eta;
-    const std::vector<std::vector<float> > *trig_EF_trigmugirl_track_CB_phi;
-    const std::vector<std::vector<int> > *trig_EF_trigmuonef_track_MuonType;
-    const std::vector<float> *trig_L2_combmuonfeature_eta;
-    const std::vector<float> *trig_L2_combmuonfeature_phi;
-    const std::vector<float> *trig_L2_muonfeature_eta;
-    const std::vector<float> *trig_L2_muonfeature_phi;
-    const std::vector<float> *trig_L1_mu_eta;
-    const std::vector<float> *trig_L1_mu_phi;
-    const std::vector<std::string> *trig_L1_mu_thrName;
-
-    /* muon isolation */
-    const std::vector<std::vector<int> > *trig_RoI_EF_mu_TrigMuonEFIsolationContainer;
-    const std::vector<std::vector<int> > *trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus;
-
-    /* workaround for TriggerMenuAnalysis-00-02-86 */
-    const std::vector<int> *trig_EF_trigmuonef_EF_mu8;
-    const std::vector<int> *trig_EF_trigmuonef_EF_mu15;
-    const std::vector<int> *trig_EF_trigmuonef_EF_mu24i_tight;
-    const std::vector<int> *trig_EF_trigmuonef_EF_mu36_tight;
-    const std::vector<int> *trig_EF_trigmuonef_EF_mu18_tight;
-    const std::vector<int> *trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS;
-    const std::vector<int> *trig_EF_trigmuonef_EF_2mu13;
-    const std::vector<int> *trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight;
-    const std::vector<int> *trig_EF_trigmuonef_EF_mu24_tight;
-    const std::vector<int> *trig_EF_trigmuonef_EF_mu20it_tight;
-
-#include "TriggerNavigationVariables.i"
-};
-#endif // __TriggerNavigationVariables_h__
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/TriggerNavigationVariables.i b/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/TriggerNavigationVariables.i
deleted file mode 100644
index f97143a7c184ec7500134cb1f2be8f664648e839..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/TrigMuonEfficiency/TriggerNavigationVariables.i
+++ /dev/null
@@ -1,323 +0,0 @@
-#ifndef __TriggerNavigationVariables_i__
-#define __TriggerNavigationVariables_i__
-
-    //
-    // variables & methods for python users
-    //
-
-    unsigned int trig_DB_SMK_python;
-    int trig_Nav_n_python;
-    std::vector<short> trig_Nav_chain_ChainId_python;
-    std::vector<std::vector<int> > trig_Nav_chain_RoIType_python;
-    std::vector<std::vector<int> > trig_Nav_chain_RoIIndex_python;
-
-    /* electron */
-    std::vector<std::vector<int> > trig_RoI_EF_e_egammaContainer_egamma_Electrons_python;
-    std::vector<std::vector<int> > trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus_python;
-    int trig_EF_el_n_python;
-    std::vector<float> trig_EF_el_eta_python;
-    std::vector<float> trig_EF_el_phi_python;
-    std::vector<float> trig_EF_el_Et_python;
-
-    /* muon */
-    std::vector<int> trig_RoI_EF_mu_Muon_ROI_python;
-    std::vector<std::vector<int> > trig_RoI_EF_mu_TrigMuonEFInfoContainer_python;
-    std::vector<std::vector<int> > trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus_python;
-    std::vector<int> trig_RoI_L2_mu_CombinedMuonFeature_python;
-    std::vector<int> trig_RoI_L2_mu_CombinedMuonFeatureStatus_python;
-    std::vector<int> trig_RoI_L2_mu_MuonFeature_python;
-    std::vector<int> trig_RoI_L2_mu_Muon_ROI_python;
-    std::vector<std::vector<float> > trig_EF_trigmuonef_track_CB_pt_python;
-    std::vector<std::vector<float> > trig_EF_trigmuonef_track_CB_eta_python;
-    std::vector<std::vector<float> > trig_EF_trigmuonef_track_CB_phi_python;
-    std::vector<std::vector<float> > trig_EF_trigmuonef_track_SA_pt_python;
-    std::vector<std::vector<float> > trig_EF_trigmuonef_track_SA_eta_python;
-    std::vector<std::vector<float> > trig_EF_trigmuonef_track_SA_phi_python;
-    std::vector<std::vector<float> > trig_EF_trigmugirl_track_CB_pt_python;
-    std::vector<std::vector<float> > trig_EF_trigmugirl_track_CB_eta_python;
-    std::vector<std::vector<float> > trig_EF_trigmugirl_track_CB_phi_python;
-    std::vector<std::vector<int> > trig_EF_trigmuonef_track_MuonType_python;
-    std::vector<float> trig_L2_combmuonfeature_eta_python;
-    std::vector<float> trig_L2_combmuonfeature_phi_python;
-    std::vector<float> trig_L2_muonfeature_eta_python;
-    std::vector<float> trig_L2_muonfeature_phi_python;
-    std::vector<float> trig_L1_mu_eta_python;
-    std::vector<float> trig_L1_mu_phi_python;
-    std::vector<std::string> trig_L1_mu_thrName_python;
-
-    /* muon isolation */
-    std::vector<std::vector<int> > trig_RoI_EF_mu_TrigMuonEFIsolationContainer_python;
-    std::vector<std::vector<int> > trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus_python;
-
-    /* workaround for TriggerMenuAnalysis-00-02-86 */
-    std::vector<int> trig_EF_trigmuonef_EF_mu8_python;
-    std::vector<int> trig_EF_trigmuonef_EF_mu15_python;
-    std::vector<int> trig_EF_trigmuonef_EF_mu24i_tight_python;
-    std::vector<int> trig_EF_trigmuonef_EF_mu36_tight_python;
-    std::vector<int> trig_EF_trigmuonef_EF_mu18_tight_python;
-    std::vector<int> trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS_python;
-    std::vector<int> trig_EF_trigmuonef_EF_2mu13_python;
-    std::vector<int> trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight_python;
-    std::vector<int> trig_EF_trigmuonef_EF_mu24_tight_python;
-    std::vector<int> trig_EF_trigmuonef_EF_mu20it_tight_python;
-
-
-    void set_trig_DB_SMK_python(unsigned int x) {
-      trig_DB_SMK_python = x;
-      trig_DB_SMK        = &trig_DB_SMK_python;
-      }
-    void set_trig_Nav_n_python(int x) {
-      trig_Nav_n_python = x;
-      trig_Nav_n        = &trig_Nav_n_python;
-      }
-    void set_trig_Nav_chain_ChainId_python(std::vector<short> &x) {
-      trig_Nav_chain_ChainId_python = x;
-      trig_Nav_chain_ChainId        = &trig_Nav_chain_ChainId_python;
-      }
-    void set_trig_Nav_chain_RoIType_python(std::vector<std::vector<int> > &x) {
-      trig_Nav_chain_RoIType_python = x;
-      trig_Nav_chain_RoIType        = &trig_Nav_chain_RoIType_python;
-      }
-    void set_trig_Nav_chain_RoIIndex_python(std::vector<std::vector<int> > &x) {
-      trig_Nav_chain_RoIIndex_python = x;
-      trig_Nav_chain_RoIIndex        = &trig_Nav_chain_RoIIndex_python;
-      }
-
-    /* electron */
-    void set_trig_RoI_EF_e_egammaContainer_egamma_Electrons_python(std::vector<std::vector<int> > &x) {
-      trig_RoI_EF_e_egammaContainer_egamma_Electrons_python = x;
-      trig_RoI_EF_e_egammaContainer_egamma_Electrons        = &trig_RoI_EF_e_egammaContainer_egamma_Electrons_python;
-      }
-    void set_trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus_python(std::vector<std::vector<int> > &x) {
-      trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus_python = x;
-      trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus        = &trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus_python;
-      }
-    void set_trig_EF_el_n_python(int x) {
-      trig_EF_el_n_python = x;
-      trig_EF_el_n        = &trig_EF_el_n_python;
-      }
-    void set_trig_EF_el_eta_python(std::vector<float> &x) {
-      trig_EF_el_eta_python = x;
-      trig_EF_el_eta        = &trig_EF_el_eta_python;
-      }
-    void set_trig_EF_el_phi_python(std::vector<float> &x) {
-      trig_EF_el_phi_python = x;
-      trig_EF_el_phi        = &trig_EF_el_phi_python;
-      }
-    void set_trig_EF_el_Et_python(std::vector<float> &x) {
-      trig_EF_el_Et_python = x;
-      trig_EF_el_Et        = &trig_EF_el_Et_python;
-      }
-
-    /* muon */
-    void set_trig_RoI_EF_mu_Muon_ROI_python(std::vector<int> &x) {
-      trig_RoI_EF_mu_Muon_ROI_python = x;
-      trig_RoI_EF_mu_Muon_ROI        = &trig_RoI_EF_mu_Muon_ROI_python;
-      }
-    void set_trig_RoI_EF_mu_TrigMuonEFInfoContainer_python(std::vector<std::vector<int> > &x) {
-      trig_RoI_EF_mu_TrigMuonEFInfoContainer_python = x;
-      trig_RoI_EF_mu_TrigMuonEFInfoContainer        = &trig_RoI_EF_mu_TrigMuonEFInfoContainer_python;
-      }
-    void set_trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus_python(std::vector<std::vector<int> > &x) {
-      trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus_python = x;
-      trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus        = &trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus_python;
-      }
-    void set_trig_RoI_L2_mu_CombinedMuonFeature_python(std::vector<int> &x) {
-      trig_RoI_L2_mu_CombinedMuonFeature_python = x;
-      trig_RoI_L2_mu_CombinedMuonFeature        = &trig_RoI_L2_mu_CombinedMuonFeature_python;
-      }
-    void set_trig_RoI_L2_mu_CombinedMuonFeatureStatus_python(std::vector<int> &x) {
-      trig_RoI_L2_mu_CombinedMuonFeatureStatus_python = x;
-      trig_RoI_L2_mu_CombinedMuonFeatureStatus        = &trig_RoI_L2_mu_CombinedMuonFeatureStatus_python;
-      }
-    void set_trig_RoI_L2_mu_MuonFeature_python(std::vector<int> &x) {
-      trig_RoI_L2_mu_MuonFeature_python = x;
-      trig_RoI_L2_mu_MuonFeature        = &trig_RoI_L2_mu_MuonFeature_python;
-      }
-    void set_trig_RoI_L2_mu_Muon_ROI_python(std::vector<int> &x) {
-      trig_RoI_L2_mu_Muon_ROI_python = x;
-      trig_RoI_L2_mu_Muon_ROI        = &trig_RoI_L2_mu_Muon_ROI_python;
-      }
-    void set_trig_EF_trigmuonef_track_CB_pt_python(std::vector<std::vector<float> > &x) {
-      trig_EF_trigmuonef_track_CB_pt_python = x;
-      trig_EF_trigmuonef_track_CB_pt        = &trig_EF_trigmuonef_track_CB_pt_python;
-      }
-    void set_trig_EF_trigmuonef_track_CB_eta_python(std::vector<std::vector<float> > &x) {
-      trig_EF_trigmuonef_track_CB_eta_python = x;
-      trig_EF_trigmuonef_track_CB_eta        = &trig_EF_trigmuonef_track_CB_eta_python;
-      }
-    void set_trig_EF_trigmuonef_track_CB_phi_python(std::vector<std::vector<float> > &x) {
-      trig_EF_trigmuonef_track_CB_phi_python = x;
-      trig_EF_trigmuonef_track_CB_phi        = &trig_EF_trigmuonef_track_CB_phi_python;
-      }
-    void set_trig_EF_trigmuonef_track_SA_pt_python(std::vector<std::vector<float> > &x) {
-      trig_EF_trigmuonef_track_SA_pt_python = x;
-      trig_EF_trigmuonef_track_SA_pt        = &trig_EF_trigmuonef_track_SA_pt_python;
-      }
-    void set_trig_EF_trigmuonef_track_SA_eta_python(std::vector<std::vector<float> > &x) {
-      trig_EF_trigmuonef_track_SA_eta_python = x;
-      trig_EF_trigmuonef_track_SA_eta        = &trig_EF_trigmuonef_track_SA_eta_python;
-      }
-    void set_trig_EF_trigmuonef_track_SA_phi_python(std::vector<std::vector<float> > &x) {
-      trig_EF_trigmuonef_track_SA_phi_python = x;
-      trig_EF_trigmuonef_track_SA_phi        = &trig_EF_trigmuonef_track_SA_phi_python;
-      }
-    void set_trig_EF_trigmugirl_track_CB_pt_python(std::vector<std::vector<float> > &x) {
-      trig_EF_trigmugirl_track_CB_pt_python = x;
-      trig_EF_trigmugirl_track_CB_pt        = &trig_EF_trigmugirl_track_CB_pt_python;
-      }
-    void set_trig_EF_trigmugirl_track_CB_eta_python(std::vector<std::vector<float> > &x) {
-      trig_EF_trigmugirl_track_CB_eta_python = x;
-      trig_EF_trigmugirl_track_CB_eta        = &trig_EF_trigmugirl_track_CB_eta_python;
-      }
-    void set_trig_EF_trigmugirl_track_CB_phi_python(std::vector<std::vector<float> > &x) {
-      trig_EF_trigmugirl_track_CB_phi_python = x;
-      trig_EF_trigmugirl_track_CB_phi        = &trig_EF_trigmugirl_track_CB_phi_python;
-      }
-    void set_trig_EF_trigmuonef_track_MuonType_python(std::vector<std::vector<int> > &x) {
-      trig_EF_trigmuonef_track_MuonType_python = x;
-      trig_EF_trigmuonef_track_MuonType        = &trig_EF_trigmuonef_track_MuonType_python;
-      }
-    void set_trig_L2_combmuonfeature_eta_python(std::vector<float> &x) {
-      trig_L2_combmuonfeature_eta_python = x;
-      trig_L2_combmuonfeature_eta        = &trig_L2_combmuonfeature_eta_python;
-      }
-    void set_trig_L2_combmuonfeature_phi_python(std::vector<float> &x) {
-      trig_L2_combmuonfeature_phi_python = x;
-      trig_L2_combmuonfeature_phi        = &trig_L2_combmuonfeature_phi_python;
-      }
-    void set_trig_L2_muonfeature_eta_python(std::vector<float> &x) {
-      trig_L2_muonfeature_eta_python = x;
-      trig_L2_muonfeature_eta        = &trig_L2_muonfeature_eta_python;
-      }
-    void set_trig_L2_muonfeature_phi_python(std::vector<float> &x) {
-      trig_L2_muonfeature_phi_python = x;
-      trig_L2_muonfeature_phi        = &trig_L2_muonfeature_phi_python;
-      }
-    void set_trig_L1_mu_eta_python(std::vector<float> &x) {
-      trig_L1_mu_eta_python = x;
-      trig_L1_mu_eta        = &trig_L1_mu_eta_python;
-      }
-    void set_trig_L1_mu_phi_python(std::vector<float> &x) {
-      trig_L1_mu_phi_python = x;
-      trig_L1_mu_phi        = &trig_L1_mu_phi_python;
-      }
-    void set_trig_L1_mu_thrName_python(std::vector<std::string> &x) {
-      trig_L1_mu_thrName_python = x;
-      trig_L1_mu_thrName        = &trig_L1_mu_thrName_python;
-      }
-    /* muon isolation */
-    void set_trig_RoI_EF_mu_TrigMuonEFIsolationContainer_python(std::vector<std::vector<int> > &x) {
-      trig_RoI_EF_mu_TrigMuonEFIsolationContainer_python = x;
-      trig_RoI_EF_mu_TrigMuonEFIsolationContainer        = &trig_RoI_EF_mu_TrigMuonEFIsolationContainer_python;
-      }
-    void set_trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus_python(std::vector<std::vector<int> > &x) {
-      trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus_python = x;
-      trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus        = &trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus_python;
-      }
-
-    /* workaround for TriggerMenuAnalysis-00-02-86 */
-    void set_trig_EF_trigmuonef_EF_mu8_python(std::vector<int> &x) {
-      trig_EF_trigmuonef_EF_mu8_python = x;
-      trig_EF_trigmuonef_EF_mu8        = &trig_EF_trigmuonef_EF_mu8_python;
-      }
-    void set_trig_EF_trigmuonef_EF_mu15_python(std::vector<int> &x) {
-      trig_EF_trigmuonef_EF_mu15_python = x;
-      trig_EF_trigmuonef_EF_mu15        = &trig_EF_trigmuonef_EF_mu15_python;
-      }
-    void set_trig_EF_trigmuonef_EF_mu24i_tight_python(std::vector<int> &x) {
-      trig_EF_trigmuonef_EF_mu24i_tight_python = x;
-      trig_EF_trigmuonef_EF_mu24i_tight        = &trig_EF_trigmuonef_EF_mu24i_tight_python;
-      }
-    void set_trig_EF_trigmuonef_EF_mu36_tight_python(std::vector<int> &x) {
-      trig_EF_trigmuonef_EF_mu36_tight_python = x;
-      trig_EF_trigmuonef_EF_mu36_tight        = &trig_EF_trigmuonef_EF_mu36_tight_python;
-      }
-    void set_trig_EF_trigmuonef_EF_mu18_tight_python(std::vector<int> &x) {
-      trig_EF_trigmuonef_EF_mu18_tight_python = x;
-      trig_EF_trigmuonef_EF_mu18_tight = &trig_EF_trigmuonef_EF_mu18_tight_python;
-      }
-    void set_trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS_python(std::vector<int> &x) {
-      trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS_python = x;
-      trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS        = &trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS_python;
-      }
-    void set_trig_EF_trigmuonef_EF_2mu13_python(std::vector<int> &x) {
-      trig_EF_trigmuonef_EF_2mu13_python = x;
-      trig_EF_trigmuonef_EF_2mu13        = &trig_EF_trigmuonef_EF_2mu13_python;
-      }
-    void set_trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight_python(std::vector<int> &x) {
-      trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight_python = x;
-      trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight        = &trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight_python;
-      }
-    void set_trig_EF_trigmuonef_EF_mu24_tight_python(std::vector<int> &x) {
-      trig_EF_trigmuonef_EF_mu24_tight_python = x;
-      trig_EF_trigmuonef_EF_mu24_tight        = &trig_EF_trigmuonef_EF_mu24_tight_python;
-      }
-    void set_trig_EF_trigmuonef_EF_mu20it_tight_python(std::vector<int> &x) {
-      trig_EF_trigmuonef_EF_mu20it_tight_python = x;
-      trig_EF_trigmuonef_EF_mu20it_tight        = &trig_EF_trigmuonef_EF_mu20it_tight_python;
-      }
-
-    
-    void config_python() {};
-
-
-    //
-    //  methods for athena users
-    //
-    void set_trig_DB_SMK(const unsigned int *x) {trig_DB_SMK = x;}
-    void set_trig_Nav_n(const int *x) {trig_Nav_n = x;}
-    void set_trig_Nav_chain_ChainId(const std::vector<short> *x) {trig_Nav_chain_ChainId = x;}
-    void set_trig_Nav_chain_RoIType(const std::vector<std::vector<int> > *x) {trig_Nav_chain_RoIType = x;}
-    void set_trig_Nav_chain_RoIIndex(const std::vector<std::vector<int> > *x) {trig_Nav_chain_RoIIndex = x;}
-
-    /* electron */
-    void set_trig_RoI_EF_e_egammaContainer_egamma_Electrons(const std::vector<std::vector<int> > *x) {trig_RoI_EF_e_egammaContainer_egamma_Electrons = x;}
-    void set_trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus(const std::vector<std::vector<int> > *x) {trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus = x;}
-    void set_trig_EF_el_n(const int *x) {trig_EF_el_n = x;}
-    void set_trig_EF_el_eta(const std::vector<float> *x) {trig_EF_el_eta = x;}
-    void set_trig_EF_el_phi(const std::vector<float> *x) {trig_EF_el_phi = x;}
-    void set_trig_EF_el_Et(const std::vector<float> *x) {trig_EF_el_Et = x;}
-
-    /* muon */
-    void set_trig_RoI_EF_mu_Muon_ROI(const std::vector<int> *x) {trig_RoI_EF_mu_Muon_ROI = x;}
-    void set_trig_RoI_EF_mu_TrigMuonEFInfoContainer(const std::vector<std::vector<int> > *x) {trig_RoI_EF_mu_TrigMuonEFInfoContainer = x;}
-    void set_trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus(const std::vector<std::vector<int> > *x) {trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus = x;}
-    void set_trig_RoI_L2_mu_CombinedMuonFeature(const std::vector<int> *x) {trig_RoI_L2_mu_CombinedMuonFeature = x;}
-    void set_trig_RoI_L2_mu_CombinedMuonFeatureStatus(const std::vector<int> *x) {trig_RoI_L2_mu_CombinedMuonFeatureStatus = x;}
-    void set_trig_RoI_L2_mu_MuonFeature(const std::vector<int> *x) {trig_RoI_L2_mu_MuonFeature = x;}
-    void set_trig_RoI_L2_mu_Muon_ROI(const std::vector<int> *x) {trig_RoI_L2_mu_Muon_ROI = x;}
-    void set_trig_EF_trigmuonef_track_CB_pt(const std::vector<std::vector<float> > *x) {trig_EF_trigmuonef_track_CB_pt = x;}
-    void set_trig_EF_trigmuonef_track_CB_eta(const std::vector<std::vector<float> > *x) {trig_EF_trigmuonef_track_CB_eta = x;}
-    void set_trig_EF_trigmuonef_track_CB_phi(const std::vector<std::vector<float> > *x) {trig_EF_trigmuonef_track_CB_phi = x;}
-    void set_trig_EF_trigmuonef_track_SA_pt(const std::vector<std::vector<float> > *x) {trig_EF_trigmuonef_track_SA_pt = x;}
-    void set_trig_EF_trigmuonef_track_SA_eta(const std::vector<std::vector<float> > *x) {trig_EF_trigmuonef_track_SA_eta = x;}
-    void set_trig_EF_trigmuonef_track_SA_phi(const std::vector<std::vector<float> > *x) {trig_EF_trigmuonef_track_SA_phi = x;}
-    void set_trig_EF_trigmugirl_track_CB_pt(const std::vector<std::vector<float> > *x) {trig_EF_trigmugirl_track_CB_pt = x;}
-    void set_trig_EF_trigmugirl_track_CB_eta(const std::vector<std::vector<float> > *x) {trig_EF_trigmugirl_track_CB_eta = x;}
-    void set_trig_EF_trigmugirl_track_CB_phi(const std::vector<std::vector<float> > *x) {trig_EF_trigmugirl_track_CB_phi = x;}
-    void set_trig_EF_trigmuonef_track_MuonType(const std::vector<std::vector<int> > *x) {trig_EF_trigmuonef_track_MuonType = x;}
-    void set_trig_L2_combmuonfeature_eta(const std::vector<float> *x) {trig_L2_combmuonfeature_eta = x;}
-    void set_trig_L2_combmuonfeature_phi(const std::vector<float> *x) {trig_L2_combmuonfeature_phi = x;}
-    void set_trig_L2_muonfeature_eta(const std::vector<float> *x) {trig_L2_muonfeature_eta = x;}
-    void set_trig_L2_muonfeature_phi(const std::vector<float> *x) {trig_L2_muonfeature_phi = x;}
-    void set_trig_L1_mu_eta(const std::vector<float> *x) {trig_L1_mu_eta = x;}
-    void set_trig_L1_mu_phi(const std::vector<float> *x) {trig_L1_mu_phi = x;}
-    void set_trig_L1_mu_thrName(const std::vector<std::string> *x) {trig_L1_mu_thrName = x;}
-    /* muon isolation */
-    void set_trig_RoI_EF_mu_TrigMuonEFIsolationContainer(const std::vector<std::vector<int> > *x) {trig_RoI_EF_mu_TrigMuonEFIsolationContainer = x;}
-    void set_trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus(const std::vector<std::vector<int> > *x) {trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus = x;}
-
-    /* workaround for TriggerMenuAnalysis-00-02-86 */
-    void set_trig_EF_trigmuonef_EF_mu8(const std::vector<int> *x) {trig_EF_trigmuonef_EF_mu8 = x;}
-    void set_trig_EF_trigmuonef_EF_mu15(const std::vector<int> *x) {trig_EF_trigmuonef_EF_mu15 = x;}
-    void set_trig_EF_trigmuonef_EF_mu24i_tight(const std::vector<int> *x) {trig_EF_trigmuonef_EF_mu24i_tight = x;}
-    void set_trig_EF_trigmuonef_EF_mu36_tight(const std::vector<int> *x) {trig_EF_trigmuonef_EF_mu36_tight = x;}
-    void set_trig_EF_trigmuonef_EF_mu18_tight(const std::vector<int> *x) {trig_EF_trigmuonef_EF_mu18_tight = x;}
-    void set_trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS(const std::vector<int> *x) {trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS = x;}
-    void set_trig_EF_trigmuonef_EF_2mu13(const std::vector<int> *x) {trig_EF_trigmuonef_EF_2mu13 = x;}
-    void set_trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight(const std::vector<int> *x) {trig_EF_trigmuonef_EF_mu40_MSonly_barrel_tight = x;}
-    void set_trig_EF_trigmuonef_EF_mu24_tight(const std::vector<int> *x) {trig_EF_trigmuonef_EF_mu24_tight = x;}
-    void set_trig_EF_trigmuonef_EF_mu20it_tight(const std::vector<int> *x) {trig_EF_trigmuonef_EF_mu20it_tight = x;}
-
-#endif // __TriggerNavigationVariables_i__
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/cmt/Makefile.RootCore b/Trigger/TrigAnalysis/TrigMuonEfficiency/cmt/Makefile.RootCore
deleted file mode 100644
index 1ce77d5ecb3e3b7829859b63028b0298acfece16..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,13 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-PACKAGE          = TrigMuonEfficiency
-PACKAGE_PRELOAD  = RIO
-PACKAGE_CXXFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_DEP      = PATCore ElectronEfficiencyCorrection
-PACKAGE_NOOPT    = 0
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/cmt/Makefile.StandAlone b/Trigger/TrigAnalysis/TrigMuonEfficiency/cmt/Makefile.StandAlone
deleted file mode 100644
index 61bf93fd5ad0c2c527ea799130cb19b4483550b8..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/cmt/Makefile.StandAlone
+++ /dev/null
@@ -1,77 +0,0 @@
-# TrigMuonEfficiency root stand-alone makefile
-
-include $(ROOTSYS)/test/Makefile.arch
-
-# -------------------------------------------------------------
-# General flags
-# -------------------------------------------------------------
-PACKAGE    = TrigMuonEfficiency
-OUTPUTDIR  = ../Root
-
-MFLAGS     = -MM -Wall -W -Woverloaded-virtual -pedantic -ansi
-INCLUDES   += -I${ROOTSYS}/include -I.. -I../Root -I../TrigMuonEfficiency -I../../egammaAnalysisUtils -I../../ElectronEfficiencyCorrection -I../../PATCore
-
-# Need these to avoid loading dependent libraries when ROOT starts
-LINKLIBS = -L${ROOTSYS}/lib
-
-CCLIST     = $(wildcard ../Root/*.cxx)
-
-HLIST      = $(wildcard ../TrigMuonEfficiency/*.h)
-OLIST      = $(patsubst %.cxx,%.o,$(CCLIST))
-DLIST      = $(patsubst %.h,%.d,$(HLIST))
-
-# -------------------------------------------------------------
-# Libraries
-# -------------------------------------------------------------
-SHLIBFILE  = $(OUTPUTDIR)/libTrigMuonEfficiency.so
-
-ifeq ($(PLATFORM),macosx)
-EXTRALDFLAGS = -install_name @rpath/$(SHLIBFILE)
-endif
-
-# get libraries of ROOT
-define ldlinksuffixROOT
-   $(addsuffix $(LDLINKSUFFIX),$(Lib)) $(shell if [ "$(findstring -Ldlink2,$(OPTIONS))" ]; then echo $(addsuffix _pkgid_$(ROOTVER),$(Lib)); fi)
-endef
-
-# -------------------------------------------------------------
-# Compilation
-# -------------------------------------------------------------
-
-default: shlib
-
-# Implicit rule making all dependency Makefiles included at the end of this makefile
-%.d: %.cxx $(HLIST)
-	@echo "Making $@"
-	@set -e; $(CC) $(MFLAGS) $(CXXFLAGS) $< \
-		| awk '{ sub("^$(notdir $*).o:","$*.o $@:") ; print }' > $@ ;\
-		[ -s $@ ] || rm -f $@
-
-# Implicit rule to compile all classes
-%.o : %.cxx
-	@echo "Compiling $<"
-	@$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $*.o 
-
-# Rule to combine objects into a shared library
-$(SHLIBFILE): $(OLIST)
-	@echo "Linking $(SHLIBFILE)"
-	@mkdir -p $(OUTPUTDIR)
-	@mkdir -p ../StandAlone
-	@rm -f $(SHLIBFILE)
-	@$(LD) $(CXXFLAGS) $(SOFLAGS) $(LINKLIBS) $(EXTRALDFLAGS) $(OLIST) -o $(SHLIBFILE) 
-	@rm -f $(OUTPUTDIR)/TrigMuonEfficiencyLib.so
-	@rm -f ../StandAlone/libTrigMuonEfficiency.so
-	@ln -s $(SHLIBFILE) $(OUTPUTDIR)/TrigMuonEfficiencyLib.so 
-	@ln -s $(SHLIBFILE) ../StandAlone/libTrigMuonEfficiency.so
-
--include $(DLIST)
-
-shlib: $(SHLIBFILE)
-
-clean:
-	@rm -f ../*/*.o ../*/*.d
-	@rm -f ../Root/TrigMuonEfficiencyDict.h
-	@rm -f ../Root/TrigMuonEfficiencyDict.cxx
-	@rm -f $(SHLIBFILE)
-	@rm -f $(OUTPUTDIR)/TrigMuonEfficiencyLib.so
-	@rm -f ../StandAlone/libTrigMuonEfficiency.so
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/cmt/requirements b/Trigger/TrigAnalysis/TrigMuonEfficiency/cmt/requirements
deleted file mode 100644
index 435ce525fb638b1605b0956d2677cb2946015798..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package TrigMuonEfficiency
-
-	author Takashi Matsushita <Takashi.Matsushita@cern.ch>
-  author Lynn Marx <Lynn.Marx@hep.manchester.ac.uk>
-	
-	public
-	
-	use AtlasPolicy         AtlasPolicy-*
-	use AtlasROOT           AtlasROOT-*           External
-  use egammaAnalysisUtils egammaAnalysisUtils-*  Reconstruction/egamma/egammaAnalysis
-  use ElectronEfficiencyCorrection ElectronEfficiencyCorrection-* PhysicsAnalysis/ElectronPhotonID
-
-	apply_tag ROOTMathLibs
-	apply_tag ROOTGraphicsLibs
-	
-	apply_pattern installed_library	
-	library TrigMuonEfficiency "../Root/*.cxx"	
-	apply_pattern declare_runtime files="*.root"	
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/doc/ElectronTriggerMatching.txt b/Trigger/TrigAnalysis/TrigMuonEfficiency/doc/ElectronTriggerMatching.txt
deleted file mode 100644
index e1a78206f03d8f67f35396c34f5a54c8715859c3..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/doc/ElectronTriggerMatching.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-*********************************************************************
-*** standalone electron trigger matching code for ntuple analysis ***
-*********************************************************************
-
-The package will work on NTUP_SMWZ or any other ntuples which
-includes TrigEgammaD3PDObject.
-
-- e-mu trigger is under consideration
-
-Installation
-============
-0) change directory to util
-
-1) type "setup.sh <path to header file>"
-     where <path to header file> is the path to the header file generated by
-     a) MakeSelector() / MakeChain()
-       or
-     b) D3PDMakerReader for trigger variables
-
-     [the generated header file by MakeSelector() / MakeChain() or D3PDMakerReader
-      should contain the following variables
-      - trig_DB_SMK
-      - trig_Nav_n
-      - trig_Nav_chain_ChainId
-      - trig_Nav_chain_RoIType
-      - trig_Nav_chain_RoIIndex
-      - trig_RoI_EF_e_egammaContainer_egamma_Electrons
-      - trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus
-      - trig_EF_el_n
-      - trig_EF_el_eta
-      - trig_EF_el_phi
-     ]
-
-2) type ...
-   a) "make Makefile.StandAlone" for analysis based on MakeSelector() / MakeChain()
-   b) "make Makefile.RootCore" for analysis based on D3PDMakerReader
-
-
-Usage
-=====
-0) in your root analysis macro, include the following line
-   "gSystem->Load("<path to TrigMuonEfficiency>/lib/libTrigMuonEfficiency.so");"
-
-1) in your analysis code, include the following line
-   #include "TrigMuonEfficiency/ElectronTriggerMatching.h"
-
-2) in your analysis code, make a ElectronTriggerMatching object by
-    ElectronTriggerMatching tool = ElectronTriggerMatching(<class object>);
-   where <class object> is an instance of the class defined in header file
-   produced by "MakeClass()" / "MakeSelector()" or pointer to D3PDReader object for trigger variables
-
-   RECOMMENDED: if you have "physicsMeta/TrigConfTree" available in your
-   analysis job try the following
-    ElectronTriggerMatching tool = ElectronTriggerMatching(<class object>, <TTree pointer for physicsMeta/TrigConfTree);
-
-3) single electron trigger:
-   in event loop, call
-    tool.match(<eta>, <phi>, <chain name>);
-   where <eta>, <phi> are offline electron information and <chain name> is an
-   EF electron trigger name, ex. "EF_e20_medium"
-   the method returns true if matching trigger object is found false otherwise
-
-
-
-List of triggers available for matching
-with the following constructor
- tool = ElectronTriggerMatching(<class object>)
-=======================================
-EF_e20_medium
-EF_e22_medium
-EF_e22vh_medium1
-
-# eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/doc/MuonTriggerMatching.txt b/Trigger/TrigAnalysis/TrigMuonEfficiency/doc/MuonTriggerMatching.txt
deleted file mode 100644
index 82b5a11f201c44f2e851433303c8eda491d23f07..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/doc/MuonTriggerMatching.txt
+++ /dev/null
@@ -1,98 +0,0 @@
-*****************************************************************
-*** standalone muon trigger matching code for ntuple analysis ***
-*****************************************************************
-
-The package will work on NTUP_SMWZ or any other ntuples which
-includes MuonTriggerD3PDMaker blocks.
-
-- e-mu trigger is under consideration
-
-Installation
-============
-0) change directory to util
-
-1) type "setup.sh <path to header file>"
-     where <path to header file> is the path to the header file generated by
-     a) MakeSelector() / MakeChain()
-       or
-     b) D3PDMakerReader for trigger variables
-
-     [the generated header file by MakeSelector() / MakeChain() or D3PDMakerReader
-      should contain the following variables
-      - trig_DB_SMK
-      - trig_Nav_n
-      - trig_Nav_chain_ChainId
-      - trig_Nav_chain_RoIType
-      - trig_Nav_chain_RoIIndex
-      - trig_RoI_EF_mu_Muon_ROI
-      - trig_RoI_EF_mu_TrigMuonEFInfoContainer
-      - trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus
-      - trig_RoI_L2_mu_CombinedMuonFeature;
-      - trig_RoI_L2_mu_CombinedMuonFeatureStatus;
-      - trig_RoI_L2_mu_MuonFeature;
-      - trig_RoI_L2_mu_Muon_ROI;
-      - trig_EF_trigmuonef_track_CB_pt
-      - trig_EF_trigmuonef_track_CB_eta
-      - trig_EF_trigmuonef_track_CB_phi
-      - trig_EF_trigmuonef_track_SA_pt
-      - trig_EF_trigmuonef_track_SA_eta
-      - trig_EF_trigmuonef_track_SA_phi
-      - trig_EF_trigmugirl_track_CB_pt
-      - trig_EF_trigmugirl_track_CB_eta
-      - trig_EF_trigmugirl_track_CB_phi
-      - trig_L2_combmuonfeature_eta;
-      - trig_L2_combmuonfeature_phi;
-      - trig_L2_muonfeature_eta;
-      - trig_L2_muonfeature_phi;
-      - trig_L1_mu_eta;
-      - trig_L1_mu_phi;
-      - trig_L1_mu_thrName
-     ]
-
-2) type ...
-   a) "make Makefile.StandAlone" for analysis based on MakeSelector() / MakeChain()
-   b) "make Makefile.RootCore" for analysis based on D3PDMakerReader
-
-
-Usage
-=====
-0) in your root analysis macro, include the following line
-   "gSystem->Load("<path to TrigMuonEfficiency>/lib/libTrigMuonEfficiency.so");"
-
-1) in your analysis code, include the following line
-   #include "TrigMuonEfficiency/MuonTriggerMatching.h"
-
-2) in your analysis code, make a MuonTriggerMatching object by
-    MuonTriggerMatching tool = MuonTriggerMatching(<class object>);
-   where <class object> is an instance of the class defined in header file
-   produced by "MakeClass()" / "MakeSelector()" or pointer to D3PDReader object for trigger variables
-
-   RECOMMENDED: if you have "physicsMeta/TrigConfTree" available in your
-   analysis job try the following
-    MuonTriggerMatching tool = MuonTriggerMatching(<class object>, <TTree pointer for physicsMeta/TrigConfTree);
-
-3) single muon trigger:
-   in event loop, call
-    tool.match(<eta>, <phi>, <chain name>);
-   where <eta>, <phi> are offline muon information and <chain name> is an EF muon trigger name, ex. "EF_mu18_MG"
-
-   if you need to use an EF chain with different level1 threshold, try
-    tool.match(<eta>, <phi>, <chain name>, <level1 threshold>);
-   where <level1 threshol> is Level1 muon threshold name, ex. "L1_MU11"
-
-   the method returns true if matching trigger object is found false otherwise
-
-
-
-List of triggers available for matching
-with the following constructor
- tool = MuonTriggerMatching(<class object>)
-=======================================
-EF_mu18
-EF_mu18_medium
-EF_mu18_MG
-EF_mu18_MG_medium
-EF_mu40_MSonly_barrel
-EF_mu40_MSonly_barrel_medium
-
-# eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/ElectronTriggerMatching_cxx b/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/ElectronTriggerMatching_cxx
deleted file mode 100644
index f8d205631d1a891eabf7187f9071d9759ceba6da..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/ElectronTriggerMatching_cxx
+++ /dev/null
@@ -1,296 +0,0 @@
-/*=================================================================* 
- * Implementation of ElectronTriggerMatching
- *=================================================================*/
-#include "TrigMuonEfficiency/ChainEntry.h"
-#include "TrigMuonEfficiency/ElectronTriggerMatching.h"
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <TMath.h>
-#include <cmath>
-
-/*=================================================================* 
- * public methods
- *=================================================================*/
-bool
-ElectronTriggerMatching::match(const double eta,
-                               const double phi,
-                               const std::string& chain)
-{
-  EFelectron efelectron, dummy;
-  matchedTrackDetail(efelectron, dummy, eta, phi, chain);
-  return efelectron.valid;
-}
-
-bool
-ElectronTriggerMatching::matchDielectron(const TLorentzVector& electron1,
-                                         const TLorentzVector& electron2,
-                                         const std::string& chain,
-                                         bool& result1,
-                                         bool& result2)
-{
-  if (not decodeDielectronChain(chain)) {
-    std::cerr << "ElectronTriggerMatching\t" << "ERROR\t"
-              << "Failed to decode chain(" << chain
-              << "matchDielectron can accept only chains named EF_2eXX_YY." << std::endl;
-              return false;
-  }
-
-  EFelectron trkId1, trkId2, dummy;
-  const double dr1 = matchedTrackDetail(trkId1, dummy, electron1.Eta(), electron1.Phi(), chain);
-  const double dr2 = matchedTrackDetail(trkId2, dummy, electron2.Eta(), electron2.Phi(), chain);
-
-  if (trkId1.valid and trkId2.valid) {
-    if (isEqual(trkId1.roi, trkId2.roi) or 
-        (isEqual(trkId1.eta, trkId2.eta) and
-         isEqual(trkId1.phi, trkId2.phi))) {
-      if (dr1 > dr2) 
-        matchedTrackDetail(trkId1, trkId2, electron1.Eta(), electron1.Phi(), chain);
-      else
-        matchedTrackDetail(trkId2, trkId1, electron2.Eta(), electron2.Phi(), chain);
-    }
-  }
-  
-  result1 = trkId1.valid; 
-  result2 = trkId2.valid; 
-  return true; 
-}
-
-
-/*-----------------------------------------------------------------* 
- * for developers
- *-----------------------------------------------------------------*/
-void
-ElectronTriggerMatching::showSMKeys()
-{
-  std::map<int, std::map<std::string, int> >::const_iterator p;
-  std::cout << "ElectronTriggerMatching\t" << "INFO\t" << "SMKeys:";
-  for (p = m_MapOfChainIdMap.begin(); p != m_MapOfChainIdMap.end(); ++p) {
-    std::cout << p->first << ", ";
-  }
-  std::cout << std::endl;
-}
-
-
-void
-ElectronTriggerMatching::dumpChainIdMap(const int SMK)
-{
-  if (m_MapOfChainIdMap.find(SMK) == m_MapOfChainIdMap.end()) {
-    std::cerr << "ElectronTriggerMatching\t" << "ERROR\t"
-              << "ChainIdMap for SMK = " << SMK << " is not stored." << std::endl;
-    return;
-  }
-
-  std::map<std::string, int> ChainIdMap = m_MapOfChainIdMap[SMK];
-  std::map<std::string, int>::const_iterator p;
-  std::cout << "ElectronTriggerMatching\t" << "INFO\t"
-            << "dump ChainIdMap for SMKeys:" << SMK << std::endl;
-
-  for (p = ChainIdMap.begin(); p != ChainIdMap.end(); ++p) {
-    std::cout << p->first << "\t" << p->second << std::endl;
-  }
-}
-
-
-void
-ElectronTriggerMatching::createChainIdMapFile(const int SMK)
-{
-  if (m_MapOfChainIdMap.find(SMK) == m_MapOfChainIdMap.end()) {
-    std::cerr << "ElectronTriggerMatching\t" << "ERROR\t"
-              << "ChainIdMap for SMK = " << SMK << " is not stored." << std::endl;
-    return;
-  }
-
-  std::map<std::string, int> ChainIdMap = m_MapOfChainIdMap[SMK];
-  std::map<std::string, int>::const_iterator p;
-
-  std::ofstream ofs("ElectronChainIdMap.h");
-  ofs << "void ElectronTriggerMatching::createChainIdMapFromFile() {" << "\n";
-  ofs << "  " << "std::map<std::string, int> ChainIdMap;" << "\n";
-  for (p = ChainIdMap.begin(); p != ChainIdMap.end(); ++p) {
-    ofs << "  " << "ChainIdMap.insert(std::pair<std::string, int>(\"" << p->first << "\", " << p->second << "));" << "\n";
-  }
-  ofs << "  " << "m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(-1, ChainIdMap));" << "\n";
-  ofs << "}" << std::endl;
-}
-
-
-/*=================================================================* 
- * private methods
- *=================================================================*/
-double
-ElectronTriggerMatching::matchedTrackDetail(EFelectron& efElectronId,
-                                            const EFelectron& usedEfElectronId,
-                                            const double eta,
-                                            const double phi,
-                                            const std::string& chainForEventTrigger)
-{
-  efElectronId.valid = false;
-  double dR_min = m_matchingDr;
-
-  const int chainIndex = getChainIndex(chainForEventTrigger);
-  if (chainIndex < 0) return false;
-
-  const std::vector<int> RoIIndex = MTT_CPP__trig_Nav_chain_RoIIndex->at(chainIndex);
-  const std::vector<int> RoIType = MTT_CPP__trig_Nav_chain_RoIType->at(chainIndex);
-
-  for (size_t iRoI = 0; iRoI < RoIIndex.size(); ++iRoI) {
-    if (RoIType.at(iRoI) != ChainEntry::kRoIType_EF_e) continue;
-
-    const int index = RoIIndex.at(iRoI);
-    const std::vector<int> container = MTT_CPP__trig_RoI_EF_e_egammaContainer_egamma_Electrons->at(index);
-    const std::vector<int> status = MTT_CPP__trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus->at(index);
-
-    for (size_t iCont = 0; iCont < container.size(); ++iCont) {
-      if (not status.at(iCont)) continue;
-      const int id = container.at(iCont);
-      const double  el_eta = MTT_CPP__trig_EF_el_eta->at(id);
-      const double  el_phi = MTT_CPP__trig_EF_el_phi->at(id);
-      const int     el_roi = index;
-
-      if (usedEfElectronId.valid) {
-        if (isEqual(usedEfElectronId.roi, el_roi)) continue;
-        if (isEqual(usedEfElectronId.eta, el_eta) and
-            isEqual(usedEfElectronId.phi, el_phi)) continue;
-      }
-      double dr = dR(eta, phi, el_eta, el_phi);
-      if (not (dr < dR_min)) continue;
-      dR_min = dr;
-
-      efElectronId.valid = true;
-      efElectronId.eta = el_eta;
-      efElectronId.phi = el_phi;
-    }
-  }
-
-  return dR_min;
-}
-
-
-int
-ElectronTriggerMatching::getChainIndex(const std::string& chain)
-{
-  int smk = static_cast<int>(MTT_CPP__trig_DB_SMK);
-  std::map<std::string, int> ChainIdMap = (m_MapOfChainIdMap.count(smk)) ? m_MapOfChainIdMap[smk] : m_MapOfChainIdMap[-1];
-
-  if (ChainIdMap.find(chain) == ChainIdMap.end()) {
-    if (m_NotFoundChain.find(chain) == m_NotFoundChain.end()) {
-      std::cerr << "ElectronTriggerMatching\t" << "ERROR\t"
-                << chain << " does not exist in ChainIdMap for SMK = " << smk
-                << " (if SMK = -1, it means the Map is created from TrigMuonEfficiency/ElectronChainIdMap.h)" << std::endl;
-      m_NotFoundChain.insert(chain);
-    }
-    return -1;
-  }
-
-  const short ChainId = static_cast<short>(ChainIdMap[chain]);
-  for (int iChain = 0; iChain < MTT_CPP__trig_Nav_n; ++iChain) {
-    if (MTT_CPP__trig_Nav_chain_ChainId->at(iChain) == ChainId) return iChain;
-  }
-
-  if (m_NotFoundChain.find(chain) == m_NotFoundChain.end()) {
-    std::cerr << "ElectronTriggerMatching\t" << "ERROR\t"
-              << chain << " does not exist in Flat Navigation Branch." << std::endl;
-    m_NotFoundChain.insert(chain);
-  }
-  return -1;
-}
-
-
-void
-ElectronTriggerMatching::readTrigConfTree(TTree* TrigConfTree)
-{
-  int smk=-9999;
-  std::map<std::string, int>* hltmap=0;
-
-  if (TrigConfTree) {
-    TrigConfTree->SetBranchAddress("SMK", &smk);
-    TrigConfTree->SetBranchAddress("HLTNameMap", &hltmap);
-
-    TrigConfTree->GetEntry(0);
-    if (not ((smk != -9999) and hltmap)) {
-      std::cerr << "ElectronTriggerMatching\t" << "ERROR\t"
-                << "TrigConfTree does exist, but could not SetBranchAddress for SMK and HLTNameMap." << std::endl;
-      return;
-    }
-
-    std::map<std::string, int>::const_iterator p;
-    for (int iEntry = 0; iEntry < TrigConfTree->GetEntries(); ++iEntry) {
-      TrigConfTree->GetEntry(iEntry);
-      if (m_MapOfChainIdMap.count(smk)) continue;
-
-      std::map<std::string, int> ChainIdMap;
-      for (p = hltmap->begin(); p != hltmap->end(); ++p) {
-        if ((p->first.find("EF_e") != 0) and
-            (p->first.find("EF_2e") != 0)) continue;
-
-        int id = p->second;
-        if (p->first.find("EF_") == 0) id += ChainEntry::kEFChainIdOffset;
-        ChainIdMap.insert(std::pair<std::string, int>(p->first, id));
-      }
-      m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(smk, ChainIdMap));
-    }
-
-  } else {
-    std::cerr << "ElectronTriggerMatching\t" << "inf> " << "Create ChainIdMap from TrigMuonEfficiency/ElectronChainIdMap.h.\n";
-    std::cerr << std::endl;
-    createChainIdMapFromFile();
-  }
-}
-
-
-void
-ElectronTriggerMatching::tokenize(const std::string& str,
-                                  std::vector<std::string>& tokens,
-                                  const std::string& delimiters)
-{
-  tokens.clear();
-  std::string::size_type lastPos = str.find_first_not_of(delimiters, 0);
-  std::string::size_type pos = str.find_first_of(delimiters, lastPos);
-
-  while ((std::string::npos != pos) or (std::string::npos != lastPos)) {
-    tokens.push_back(str.substr(lastPos, pos - lastPos));
-    lastPos = str.find_first_not_of(delimiters, pos);
-    pos = str.find_first_of(delimiters, lastPos);
-  }
-}
-
-
-bool
-ElectronTriggerMatching::decodeDielectronChain(const std::string& chain)
-{
-  std::vector<std::string> tokens;
-  tokenize(chain, tokens, "_");
-
-  if (tokens.size() < 2) return false;
-  if (tokens.size() > 3) return false;
-  if (tokens[0] != "EF") return false;
-  if (not (tokens[1].substr(0, 2) == "2e")) return false;
-
-  return true;
-}
-
-
-bool
-ElectronTriggerMatching::isEqual(const double x,
-                                 const double y)
-{
-  if (fabs(x - y) < std::numeric_limits<float>::epsilon()) return true;
-  return false;
-}
-
-
-double
-ElectronTriggerMatching::dR(const double eta1,
-                            const double phi1,
-                            const double eta2,
-                            const double phi2)
-{
-  double deta = fabs(eta1 - eta2);
-  double dphi = fabs(phi1 - phi2) < TMath::Pi() ? fabs(phi1 - phi2) : 2*TMath::Pi() - fabs(phi1 - phi2);
-  return sqrt(deta*deta + dphi*dphi);
-}
-
-
-#include "TrigMuonEfficiency/ElectronChainIdMap.h"
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/ElectronTriggerMatching_h b/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/ElectronTriggerMatching_h
deleted file mode 100644
index 70dc2ad95e0e09b824b88f4965b84b896dba4f3f..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/ElectronTriggerMatching_h
+++ /dev/null
@@ -1,153 +0,0 @@
-#ifndef __ElectronTriggerMatching_h__
-#define __ElectronTriggerMatching_h__
-/**
- * @author  Toyonobu Okuyama
- * @author  Takashi Matsushita
- */
-
-
-#include <string>
-#include <map>
-#include <set>
-#include "TTree.h"
-#include "TLorentzVector.h"
-
-#ifdef __USE_TRIGROOTANALYSIS__
-#include "TrigRootAnalysis/DataAccess.h"
-#endif
-
-/**
- *  This class implements method for electron trigger matching with navigation information in ntuple analysis.
- *
- *  Validated on NTUP_SMWZ. Should work on any ntuples which contains TrigMuonD3PDMaker block
- */
-class ElectronTriggerMatching {
-  public:
-    struct EFelectron {
-      bool valid;
-      float charge;
-      int roi;
-      float eta;
-      float phi;
-
-      EFelectron() : valid(false), charge(0.), roi(-1), eta(-1.e30), phi(-1.e30) {}
-    };
-
-    /** default constructor
-     *
-     * @param d3pd [in] class object used for the given ntuple analysis
-#ifdef __USE_TRIGROOTANALYSIS__
-     * @param tdt  [in] TrigRootAnalysis D3PD::Trig::DataAccess tool (to obtain SMK info for the current event)
-#endif
-     * @param TrigConfTree [in] pointer of physicsMeta/TrigConfTree block [optional]
-     */
-    ElectronTriggerMatching(const MTT__D3PDEvent *d3pd,
-#ifdef __USE_TRIGROOTANALYSIS__
-                            const D3PD::Trig::DataAccess *tdt,
-#endif
-                            TTree *TrigConfTree=0)
-      : m_d3pd(d3pd),
-#ifdef __USE_TRIGROOTANALYSIS__
-        m_tdt(tdt),
-#endif
-        m_matchingDr(0.15),
-        m_MapOfChainIdMap(),
-        m_NotFoundChain() {
-      readTrigConfTree(TrigConfTree);
-    }
-    virtual ~ElectronTriggerMatching(){}
-
-
-    /** returns minimum distance required for offline electron and trigger object matching
-     *
-     * @return m_matchingDr
-     */
-    double getDeltaR() const {return m_matchingDr;}
-
-
-    /** set minimum distance required for offline electron and trigger object matching
-     *
-     * @param dr [in] matching distance for offline electron and trigger object matching
-     */
-    void setDeltaR(const double dr) {m_matchingDr = dr;}
-
-
-    /** look for matching EF electron trigger object
-     *
-     * @param eta [in] eta of an offline electron
-     * @param phi [in] phi of an offline electron
-     * @param chain [in] single electron EF chain name. ex) "EF_mu18"
-     * @return true if matching EF object was found false otherwise.
-     */
-    bool match(const double eta,
-               const double phi,
-               const std::string& chain);
-
-    /** look for matching EF di-electron trigger object
-     *
-     * @param electron1 [in] TLorentzVector of electron
-     * @param electron2 [in] TLorentzVector of electron
-     * @param chain [in] di-electron EF chain name. ex) "EF_2e12"
-     * @param result1 [out] bool values indicating if electron1 passed the di-muon trigger.
-     * @param result2 [out] bool values indicating if electron2 passed the di-muon trigger.
-     * @return true if matching EF object was found false otherwise.
-     */
-    bool matchDielectron(const TLorentzVector& electron1,
-                         const TLorentzVector& electron2,
-                         const std::string& chain,
-                         bool& result1,
-                         bool& result2);
-
-    bool matchDielectron(const TLorentzVector& electron1,
-                         const TLorentzVector& electron2,
-                         const std::string& chain,
-                         std::pair<bool, bool>& result1,
-                         std::pair<bool, bool>& result2) {
-      bool valid = false, rc1 = false, rc2 = false;
-      valid = matchDielectron(electron1, electron2, chain, rc1, rc2);
-      result1.first = result1.second = rc1;
-      result2.first = result2.second = rc2;
-
-      return valid;
-    }
-
-
-    // for developers
-    void showSMKeys();
-    void dumpChainIdMap(const int SMK);
-    void createChainIdMapFile(const int SMK);
-
-
-  private:
-    const MTT__D3PDEvent* m_d3pd; 
-#ifdef __USE_TRIGROOTANALYSIS__
-    const D3PD::Trig::DataAccess* m_tdt; 
-#endif
-    double m_matchingDr;
-    std::map<int, std::map<std::string, int> > m_MapOfChainIdMap; // [SMK - [ChainName - ChainId] ]
-    std::set<std::string> m_NotFoundChain;
- 
-    double matchedTrackDetail(EFelectron& efElectronId,
-                              const EFelectron& usedEfElectronId,
-                              const double eta,
-                              const double phi,
-                              const std::string& chainEventTrigger);
-
-
-    int getChainIndex(const std::string& chain);
-    void readTrigConfTree(TTree* TrigConfTree);
-    double dR(const double eta1,
-              const double phi1,
-              const double eta2,
-              const double phi2);
-    void createChainIdMapFromFile(); //implementation in ChainIdMap.h
-    void tokenize(const std::string& str,
-                  std::vector<std::string>& tokens,
-                  const std::string& delimiters);
-    bool decodeDielectronChain(const std::string& chain);
-    bool isEqual(const double x,
-                 const double y);
-};
-
-#endif //__ElectronTriggerMatching_h__
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/MuonTriggerMatching_cxx b/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/MuonTriggerMatching_cxx
deleted file mode 100644
index eabce3baf0e9fbadabb9e1599f728b786a6ecf2b..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/MuonTriggerMatching_cxx
+++ /dev/null
@@ -1,749 +0,0 @@
-/*=================================================================* 
- * Implementation of MuonTriggerMatching
- *=================================================================*/
-#include "TrigMuonEfficiency/ChainEntry.h"
-#include "TrigMuonEfficiency/MuonTriggerMatching.h"
-#include "TrigMuonEfficiency/MuonHypothesis.h"
-#include <iostream>
-#include <fstream>
-#include <sstream>
-#include <TMath.h>
-#include <cmath>
-
-
-/*=================================================================* 
- * public methods
- *=================================================================*/
-bool
-MuonTriggerMatching::match(const double eta,
-                           const double phi,
-                           const std::string& chain,
-                           const std::string& l1item)
-{
-  EFmuon efmuon, dummy;
-  if (m_index) {
-    matchedTrackDetail_index(efmuon, dummy, eta, phi, chain, l1item);
-  } else {
-    matchedTrackDetail(efmuon, dummy, eta, phi, chain, l1item);
-  }
-  return efmuon.valid;
-}
-
-
-std::pair<int, int>
-MuonTriggerMatching::matchedTrack(const double eta,
-                                  const double phi,
-                                  const std::string& chain,
-                                  const std::string& l1item)
-{
-  EFmuon efmuon, dummy;
-  if (m_index) {
-    matchedTrackDetail_index(efmuon, dummy, eta, phi, chain, l1item);
-  } else {
-    matchedTrackDetail(efmuon, dummy, eta, phi, chain, l1item);
-  }
-  return efmuon.indicies;
-}
-
-
-bool
-MuonTriggerMatching::matchDimuon(const TLorentzVector& muon1,
-                                 const TLorentzVector& muon2,
-                                 const std::string& chain,
-                                 std::pair<bool, bool>& result1,
-                                 std::pair<bool, bool>& result2)
-{
-  DimuonChainInfo chainInfo(chain);
-  if (not decodeDimuonChain(chainInfo)) {
-    std::cerr << "MuonTriggerMatching\t" << "ERROR\t"
-              << "Failed to decode chain(" << chain
-              << "matchDimuon can accept only chains named EF_2muXX_YY or EF_muXX_muYY_ZZ." << std::endl;
-    return false;
-  }
-
-  std::pair<bool, bool> rc12, rc21;
-  rc12 = matchDimuon(muon1, muon2, chainInfo);
-  if (chainInfo.is2MuXX) {
-    rc21.first = rc12.second; rc21.second = rc12.first;
-  } else {
-    rc21 = matchDimuon(muon2, muon1, chainInfo);
-  }
-
-  result1.first = rc12.first; result1.second = rc21.second;
-  result2.first = rc21.first; result2.second = rc12.second;
-  return true;
-}
-
-
-/*-----------------------------------------------------------------* 
- * for developers
- *-----------------------------------------------------------------*/
-void
-MuonTriggerMatching::showSMKeys()
-{
-  std::map<int, std::map<std::string, int> >::const_iterator p;
-  std::cout << "MuonTriggerMatching\t" << "INFO\t" << "SMKeys:";
-  for (p = m_MapOfChainIdMap.begin(); p != m_MapOfChainIdMap.end(); ++p) {
-    std::cout << p->first << ", ";
-  }
-  std::cout << std::endl;
-}
-
-
-void
-MuonTriggerMatching::dumpChainIdMap(const int SMK)
-{
-  if (m_MapOfChainIdMap.find(SMK) == m_MapOfChainIdMap.end()) {
-    std::cerr << "MuonTriggerMatching\t" << "ERROR\t"
-              << "ChainIdMap for SMK = " << SMK << " is not stored." << std::endl;
-    return;
-  }
-
-  std::map<std::string, int> ChainIdMap = m_MapOfChainIdMap[SMK];
-  std::map<std::string, int>::const_iterator p;
-  std::cout << "MuonTriggerMatching\t" << "INFO\t"
-            << "dump ChainIdMap for SMKeys:" << SMK << std::endl;
-
-  for (p = ChainIdMap.begin(); p != ChainIdMap.end(); ++p) {
-    std::cout << p->first << "\t" << p->second << std::endl;
-  }
-}
-
-
-void
-MuonTriggerMatching::createChainIdMapFile(const int SMK)
-{
-  if (m_MapOfChainIdMap.find(SMK) == m_MapOfChainIdMap.end()) {
-    std::cerr << "MuonTriggerMatching\t" << "ERROR\t"
-              << "ChainIdMap for SMK = " << SMK << " is not stored." << std::endl;
-    return;
-  }
-
-  std::map<std::string, int> ChainIdMap = m_MapOfChainIdMap[SMK];
-  std::map<std::string, int>::const_iterator p;
-
-  std::ofstream ofs("MuonChainIdMap.h");
-  ofs << "void MuonTriggerMatching::createChainIdMapFromFile() {" << "\n";
-  ofs << "  " << "std::map<std::string, int> ChainIdMap;" << "\n";
-  for (p = ChainIdMap.begin(); p != ChainIdMap.end(); ++p) {
-    ofs << "  " << "ChainIdMap.insert(std::pair<std::string, int>(\"" << p->first << "\", " << p->second << "));" << "\n";
-  }
-  ofs << "  " << "m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(-1, ChainIdMap));" << "\n";
-  ofs << "}" << std::endl;
-}
-
-
-/*=================================================================* 
- * private methods
- *=================================================================*/
-bool
-MuonTriggerMatching::index_match(const double eta,
-                                 const double phi,
-                                 const std::string& chain,
-                                 const std::string& threshold,
-                                 EFmuon& efMuonId,
-                                 const EFmuon& usedEfMuonId)
-{
-  efMuonId.valid = false;
-  double dR_min = m_matchingDr;
-
-  if (not m_isIndexMatchUsed) {
-    m_isIndexMatchUsed = true;
-    std::cout << "INFORMATION: index_match is used" << std::endl;
-  }
-
-  std::vector<int>* status = 0;
-  if (chain.compare("EF_mu24i_tight") == 0) {
-    status = MTT_CPP__trig_EF_trigmuonef_EF_mu24i_tight;
-
-  } else if (chain.compare("EF_mu36_tight") == 0) {
-    status = MTT_CPP__trig_EF_trigmuonef_EF_mu36_tight;
-
-  } else if (chain.compare("EF_mu18_tight_mu8_EFFS") == 0) {
-    status = MTT_CPP__trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS;
-
-  } else if (chain.compare("EF_mu15") == 0) {
-    status = MTT_CPP__trig_EF_trigmuonef_EF_mu15;
-
-  } else if (chain.compare("EF_mu8") == 0) {
-    status = MTT_CPP__trig_EF_trigmuonef_EF_mu8;
-  }
-
-  if (not status) {
-    std::cout << "WARNING: index_match: not supported: " << chain << std::endl;
-    return false;
-  }
-
-  if (status->size() != _CB_BR_(pt)->size()) {
-    std::cout << "ERROR: index_match: length mismatch: " << std::endl;
-    return false;
-  }
-
-
-  for (size_t ii = 0; ii < status->size(); ii++) {
-    if (not status->at(ii)) continue;
-
-    const std::vector<float>& v_pt = _CB_BR_(pt)->at(ii);
-    const std::vector<float>& v_eta = _CB_BR_(eta)->at(ii);
-    const std::vector<float>& v_phi = _CB_BR_(phi)->at(ii);
-
-    for (size_t iTrk = 0; iTrk < v_pt.size(); ++iTrk) {
-      if (usedEfMuonId.valid and
-          isEqual(usedEfMuonId.pt, v_pt.at(iTrk)) and
-          isEqual(usedEfMuonId.eta, v_eta.at(iTrk)) and
-          isEqual(usedEfMuonId.phi, v_phi.at(iTrk))) continue;
-
-      if (not MuonHypothesis::EF_isPassed(v_pt.at(iTrk), v_eta.at(iTrk), threshold)) continue;
-      double dR_tmp = dR(eta, phi, v_eta.at(iTrk), v_phi.at(iTrk));
-      if (not (dR_tmp < dR_min)) continue;
-      dR_min = dR_tmp;
-
-      efMuonId.valid = true;
-      efMuonId.pt = v_pt.at(iTrk);
-      efMuonId.eta = v_eta.at(iTrk);
-      efMuonId.phi = v_phi.at(iTrk);
-      efMuonId.indicies.first = ii;
-      efMuonId.indicies.second = iTrk;
-    }
-  }
-
-  return dR_min;
-}
-
-
-
-bool
-MuonTriggerMatching::checkSeed_index(const double eta,
-                                     const double phi,
-                                     const std::string& chain)
-{
-  std::vector<int>* status = 0;
-  if (chain.compare("EF_mu18_tight") == 0) {
-    status = MTT_CPP__trig_EF_trigmuonef_EF_mu18_tight;
-  }
-
-  if (not status) {
-    std::cout << "WARNING: checkSeed_index: not supported: " << chain << std::endl;
-    return false;
-  }
-
-  double efdr = 0.05;
-
-  bool found = false;
-  for (size_t ii = 0; ii < status->size(); ii++) {
-    if (not status->at(ii)) continue;
-
-    const std::vector<float>& v_pt = _CB_BR_(pt)->at(ii);
-    const std::vector<float>& v_eta = _CB_BR_(eta)->at(ii);
-    const std::vector<float>& v_phi = _CB_BR_(phi)->at(ii);
-    const std::vector<int>& v_type = MTT_CPP__trig_EF_trigmuonef_track_MuonType->at(ii);
-
-    for (size_t iTrk = 0; iTrk < v_pt.size(); ++iTrk) {
-      if (v_type.at(iTrk) != 1) continue; // !MuonTypeEFMuon
-      if (not MuonHypothesis::EF_isPassed(v_pt.at(iTrk), v_eta.at(iTrk), chain)) continue;
-      double dr = dR(eta, phi, v_eta.at(iTrk), v_phi.at(iTrk));
-      if (not (dr < efdr)) continue;
-      efdr = dr;
-      found = true;
-    }
-  }
-  return found;
-}
-
-
-bool
-MuonTriggerMatching::checkSeedL2(const double eta,
-                                 const double phi,
-                                 const std::string& chain,
-                                 double l2dr,
-                                 double l1dr)
-{
-  const int chainIndex = getChainIndex(chain);
-  if (chainIndex < 0) return false;
-
-  const std::vector<int> RoIIndex = MTT_CPP__trig_Nav_chain_RoIIndex->at(chainIndex);
-  const std::vector<int> RoIType = MTT_CPP__trig_Nav_chain_RoIType->at(chainIndex);
-
-  for (size_t iRoI = 0; iRoI < RoIIndex.size(); ++iRoI) {
-    if (RoIType.at(iRoI) != ChainEntry::kRoIType_L2_mu) continue;
-    if (not MTT_CPP__trig_RoI_L2_mu_CombinedMuonFeatureStatus->at(RoIIndex.at(iRoI))) continue;
-
-    double minDr = l2dr;
-    const int muComb = MTT_CPP__trig_RoI_L2_mu_CombinedMuonFeature->at(RoIIndex.at(iRoI));
-    double trigEta = MTT_CPP__trig_L2_combmuonfeature_eta->at(muComb);
-    double trigPhi = MTT_CPP__trig_L2_combmuonfeature_phi->at(muComb);
-
-    // L2 ID tracks can be truncated after trigger decision,
-    // as a consequence (eta,phi) of CombinedMuonFeature become (0,0)
-    // We use MuonFeature in this case.
-    if (isEqual(trigEta, 0.) and isEqual(trigPhi, 0.)) {
-      const int muFast = MTT_CPP__trig_RoI_L2_mu_MuonFeature->at(RoIIndex.at(iRoI));
-      trigEta = MTT_CPP__trig_L2_muonfeature_eta->at(muFast);
-      trigPhi = MTT_CPP__trig_L2_muonfeature_phi->at(muFast);
-    }
-
-    // pathlogical case, use L1 for matching
-    if (isEqual(trigEta, 0.) and isEqual(trigPhi, 0.)) {
-      const int muRoI = MTT_CPP__trig_RoI_L2_mu_Muon_ROI->at(RoIIndex.at(iRoI));
-      trigEta = MTT_CPP__trig_L1_mu_eta->at(muRoI);
-      trigPhi = MTT_CPP__trig_L1_mu_phi->at(muRoI);
-      minDr = l1dr;
-    }
-
-    if (not (dR(eta, phi, trigEta, trigPhi) < minDr)) continue;
-    return true;
-  }
-
-  return false;
-}
-
-
-
-bool
-MuonTriggerMatching::checkSeedEF(const double eta,
-                                 const double phi,
-                                 const std::string& chain)
-{
-  double efdr = 0.05;
-  const int chainIndex = getChainIndex(chain);
-  if (chainIndex < 0) {
-    return checkSeed_index(eta, phi, chain);
-  }
-
-  const std::vector<int>& RoIIndex = MTT_CPP__trig_Nav_chain_RoIIndex->at(chainIndex);
-  const std::vector<int>& RoIType = MTT_CPP__trig_Nav_chain_RoIType->at(chainIndex);
-
-  if ((chain.find("_MSonly") != std::string::npos) or
-      (chain.find("_MG") != std::string::npos) or
-      (chain.find("i_") != std::string::npos)) {
-    std::cout << "MuonTriggerMatching::checkSeedEF: " << chain << "\n";
-    throw "NotImplementedError";
-  }
-
-  for (size_t iRoI = 0; iRoI < RoIIndex.size(); ++iRoI) {
-    if (RoIType.at(iRoI) != ChainEntry::kRoIType_EF_mu) continue;
-    const int roi_index = RoIIndex.at(iRoI);
-
-    const std::vector<int>& EFmuonCont = MTT_CPP__trig_RoI_EF_mu_TrigMuonEFInfoContainer->at(roi_index);
-    const std::vector<int>& status = MTT_CPP__trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus->at(roi_index);
-
-    for (size_t iCont = 0; iCont < EFmuonCont.size(); ++iCont) {
-      if (not status.at(iCont)) continue;
-
-      const int container_index = EFmuonCont.at(iCont);
-      const std::vector<float>& v_pt = _CB_BR_(pt)->at(container_index);
-      const std::vector<float>& v_eta = _CB_BR_(eta)->at(container_index);
-      const std::vector<float>& v_phi = _CB_BR_(phi)->at(container_index);
-      const std::vector<int>& v_type = MTT_CPP__trig_EF_trigmuonef_track_MuonType->at(container_index);
-
-      for (size_t iTrk = 0; iTrk < v_pt.size(); ++iTrk) {
-        if (v_type.at(iTrk) != 1) continue; // !MuonTypeEFMuon
-        if (not MuonHypothesis::EF_isPassed(v_pt.at(iTrk), v_eta.at(iTrk), chain)) continue;
-        double dr = dR(eta, phi, v_eta.at(iTrk), v_phi.at(iTrk));
-        if (not (dr < efdr)) continue;
-        efdr = dr;
-        return true;
-      }
-    }
-  }
-
-  return false;
-}
-
-
-
-double
-MuonTriggerMatching::matchedTrackDetail_index(EFmuon& efMuonId,
-                                              const EFmuon& usedEfMuonId,
-                                              const double eta,
-                                              const double phi,
-                                              const std::string& chainForThisMuon,
-                                              const std::string& l1item,
-                                              const std::string& chainForEventTrigger)
-{
-  efMuonId.indicies.first = -1;
-  efMuonId.indicies.second = -1;
-  efMuonId.iso_index = -1;
-  efMuonId.valid = false;
-  efMuonId.isIso = false;
-
-  const std::string eventTrigger = chainForEventTrigger.empty() ? chainForThisMuon : chainForEventTrigger;
-  return index_match(eta, phi, eventTrigger, chainForThisMuon, efMuonId, usedEfMuonId);
-}
-
-
-
-double
-MuonTriggerMatching::matchedTrackDetail(EFmuon& efMuonId,
-                                        const EFmuon& usedEfMuonId,
-                                        const double eta,
-                                        const double phi,
-                                        const std::string& chainForThisMuon,
-                                        const std::string& l1item,
-                                        const std::string& chainForEventTrigger)
-{
-  efMuonId.indicies.first = -1;
-  efMuonId.indicies.second = -1;
-  efMuonId.iso_index = -1;
-  efMuonId.valid = false;
-  efMuonId.isIso = false;
-  double dR_min = m_matchingDr;
-
-  const std::string eventTrigger = chainForEventTrigger.empty() ? chainForThisMuon : chainForEventTrigger;
-  const int chainIndex = getChainIndex(eventTrigger);
-  if (chainIndex < 0) {
-    return index_match(eta, phi, eventTrigger, chainForThisMuon, efMuonId, usedEfMuonId);
-  }
-
-  if (not m_isNavigationMatchUsed) {
-    m_isNavigationMatchUsed = true;
-    std::cout << "INFORMATION: navigation is used" << std::endl;
-  }
-
-  const std::vector<int> RoIIndex = MTT_CPP__trig_Nav_chain_RoIIndex->at(chainIndex);
-  const std::vector<int> RoIType = MTT_CPP__trig_Nav_chain_RoIType->at(chainIndex);
-  
-  unsigned int chain_type = CB;
-  if (chainForThisMuon.find("_MSonly") != std::string::npos) chain_type = SA;
-  if (chainForThisMuon.find("_MG") != std::string::npos) chain_type = MG;
-  if (chainForThisMuon.find("i_") != std::string::npos) efMuonId.isIso = true;
-
-  if (efMuonId.isIso) {
-    if (MTT_CPP__trig_RoI_EF_mu_TrigMuonEFIsolationContainer == 0) {
-      std::cerr << "ERROR: matching with isolated muon trigger required but trig_RoI_EF_mu_TrigMuonEFIsolationContainer == 0" << std::endl;
-      return dR_min;
-    }
-    if (MTT_CPP__trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus == 0) {
-      std::cerr << "ERROR: matching with isolated muon trigger required but trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus == 0" << std::endl;
-      return dR_min;
-    }
-  }
-
-
-  for (size_t iRoI = 0; iRoI < RoIIndex.size(); ++iRoI) {
-    if (RoIType.at(iRoI) != ChainEntry::kRoIType_EF_mu) continue;
-    const int roi_index = RoIIndex.at(iRoI);
-
-    if (not l1item.empty()) {
-      if (not L1_isPassed(MTT_CPP__trig_RoI_EF_mu_Muon_ROI->at(roi_index), l1item)) continue;
-    }
-
-    const std::vector<int> EFmuonCont = MTT_CPP__trig_RoI_EF_mu_TrigMuonEFInfoContainer->at(roi_index);
-    const std::vector<int> status = MTT_CPP__trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus->at(roi_index);
-
-    for (size_t iCont = 0; iCont < EFmuonCont.size(); ++iCont) {
-      if (not status.at(iCont)) continue;
-
-      if (efMuonId.isIso) {
-        const std::vector<int>& vIsoContainer = (MTT_CPP__trig_RoI_EF_mu_TrigMuonEFIsolationContainer)->at(roi_index);
-        const std::vector<int>& vIsoStatus = (MTT_CPP__trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus)->at(roi_index);
-        if (not vIsoStatus.at(iCont)) continue;
-      }
-
-      const int container_index = EFmuonCont.at(iCont);
-      const std::vector<float>& v_pt = (chain_type == MG) ? _MG_BR_(pt)->at(container_index) :
-        ((chain_type == SA) ? _SA_BR_(pt)->at(container_index) : _CB_BR_(pt)->at(container_index));
-      const std::vector<float>& v_eta = (chain_type == MG) ? _MG_BR_(eta)->at(container_index) :
-        ((chain_type == SA) ? _SA_BR_(eta)->at(container_index) : _CB_BR_(eta)->at(container_index));
-      const std::vector<float>& v_phi = (chain_type == MG) ? _MG_BR_(phi)->at(container_index) :
-        ((chain_type == SA) ? _SA_BR_(phi)->at(container_index) : _CB_BR_(phi)->at(container_index));
-
-      for (size_t iTrk = 0; iTrk < v_pt.size(); ++iTrk) {
-        if (usedEfMuonId.valid and
-            isEqual(usedEfMuonId.pt, v_pt.at(iTrk)) and
-            isEqual(usedEfMuonId.eta, v_eta.at(iTrk)) and
-            isEqual(usedEfMuonId.phi, v_phi.at(iTrk))) continue;
-
-        if (not MuonHypothesis::EF_isPassed(v_pt.at(iTrk), v_eta.at(iTrk), chainForThisMuon)) continue;
-        double dR_tmp = dR(eta, phi, v_eta.at(iTrk), v_phi.at(iTrk));
-        if (not (dR_tmp < dR_min)) continue;
-        dR_min = dR_tmp;
-
-        efMuonId.valid = true;
-        efMuonId.pt = v_pt.at(iTrk);
-        efMuonId.eta = v_eta.at(iTrk);
-        efMuonId.phi = v_phi.at(iTrk);
-        efMuonId.indicies.first = container_index;
-        efMuonId.indicies.second = iTrk;
-      }
-    }
-  }
-
-  return dR_min;
-}
-
-
-std::pair<bool, bool>
-MuonTriggerMatching::matchDimuon(const TLorentzVector& muon1,
-                                 const TLorentzVector& muon2,
-                                 const DimuonChainInfo& chainInfo)
-{
-  EFmuon trkId1, trkId2, dummy;
-  const double dr1 = m_index ? matchedTrackDetail_index(trkId1, dummy, muon1.Eta(), muon1.Phi(), chainInfo.thresholds.first, "", chainInfo.chain) :
-                                     matchedTrackDetail(trkId1, dummy, muon1.Eta(), muon1.Phi(), chainInfo.thresholds.first, "", chainInfo.chain);
-  if (chainInfo.isEFFS and trkId1.valid) {
-    if (chainInfo.is2011) {
-      trkId1.valid = checkSeedL2(muon1.Eta(), muon1.Phi(), chainInfo.l2seed);
-    } else {
-      trkId1.valid = m_index ? checkSeed_index(trkId1.eta, trkId1.phi, chainInfo.efseed) :
-                                   checkSeedEF(trkId1.eta, trkId1.phi, chainInfo.efseed);
-    }
-  }
-  const double dr2 = m_index ? matchedTrackDetail_index(trkId2, dummy, muon2.Eta(), muon2.Phi(), chainInfo.thresholds.second, "", chainInfo.chain) :
-                                     matchedTrackDetail(trkId2, dummy, muon2.Eta(), muon2.Phi(), chainInfo.thresholds.second, "", chainInfo.chain);
-
-  if (trkId1.valid and trkId2.valid and
-      isEqual(trkId1.pt, trkId2.pt) and
-      isEqual(trkId1.eta, trkId2.eta) and
-      isEqual(trkId1.phi, trkId2.phi)) {
-    if (dr1 > dr2) {
-      if (m_index) {
-        matchedTrackDetail_index(trkId1, trkId2, muon1.Eta(), muon1.Phi(), chainInfo.thresholds.first, "", chainInfo.chain);
-      } else {
-        matchedTrackDetail(trkId1, trkId2, muon1.Eta(), muon1.Phi(), chainInfo.thresholds.first, "", chainInfo.chain);
-      }
-      if (chainInfo.isEFFS and trkId1.valid) {
-        if (chainInfo.is2011) {
-          trkId1.valid = checkSeedL2(muon1.Eta(), muon1.Phi(), chainInfo.l2seed);
-        } else {
-          trkId1.valid = m_index ? checkSeed_index(trkId1.eta, trkId1.phi, chainInfo.efseed) :
-                                       checkSeedEF(trkId1.eta, trkId1.phi, chainInfo.efseed);
-        }
-      }
-
-    } else {
-      if (m_index) {
-        matchedTrackDetail_index(trkId2, trkId1, muon2.Eta(), muon2.Phi(), chainInfo.thresholds.second, "", chainInfo.chain);
-
-      } else {
-        matchedTrackDetail(trkId2, trkId1, muon2.Eta(), muon2.Phi(), chainInfo.thresholds.second, "", chainInfo.chain);
-      }
-    }
-  }
-  return std::pair<bool, bool>(trkId1.valid, trkId2.valid);
-}
-
-
-
-bool
-MuonTriggerMatching::L1_isPassed(const int iRoI,
-                                 const std::string& l1item)
-{
-  if (iRoI < 0) return false;
-  return getL1pt(MTT_CPP__trig_L1_mu_thrName->at(iRoI)) >= getL1pt(l1item);
-}
-
-
-
-int
-MuonTriggerMatching::getL1pt(const std::string& l1item)
-{
-  int rc = -1;
-
-  std::vector<std::string> tokens;
-  tokenize(l1item, tokens, "_");
-  std::string pt;
-  if (tokens.size() == 1) {
-    pt = tokens.at(0);
-
-  } else if ((tokens.size() == 2 ) and (tokens.at(0) == "L1")) {
-    pt = tokens.at(1);
-
-  } else {
-    std::cerr << "MuonTriggerMatching::getL1pt: cannot parse: " << l1item << std::endl;
-    return rc;
-  }
-
-  const size_t index = pt.find("MU");
-  if (index != std::string::npos) {
-    std::istringstream iss(pt.substr(index + 2));
-    iss >> rc;
-  } else {
-    std::cerr << "MuonTriggerMatching::getL1pt: cannot parse: " << l1item << std::endl;
-  }
-
-  return rc;
-}
-
-
-
-void
-MuonTriggerMatching::tokenize(const std::string& str,
-                              std::vector<std::string>& tokens,
-                              const std::string& delimiters)
-{
-  tokens.clear();
-  std::string::size_type lastPos = str.find_first_not_of(delimiters, 0);
-  std::string::size_type pos = str.find_first_of(delimiters, lastPos);
-
-  while ((std::string::npos != pos) or (std::string::npos != lastPos)) {
-    tokens.push_back(str.substr(lastPos, pos - lastPos));
-    lastPos = str.find_first_not_of(delimiters, pos);
-    pos = str.find_first_of(delimiters, lastPos);
-  }
-}
-
-
-
-bool
-MuonTriggerMatching::decodeDimuonChain(DimuonChainInfo& chainInfo)
-{
-  chainInfo.isValid = false;
-
-  std::map<std::string, DimuonChainInfo >::const_iterator p = m_DimuonChainMap.find(chainInfo.chain);
-  if (p != m_DimuonChainMap.end()) {
-    chainInfo = p->second;
-    return chainInfo.isValid;
-  }
-
-  std::vector<std::string> tokens;
-  tokenize(chainInfo.chain, tokens, "_");
-  if (tokens.size() < 2) return false;
-  if (tokens[0] != "EF") return false;
-  chainInfo.is2MuXX = (tokens[1].substr(0, 3) == "2mu");
-
-  if (chainInfo.is2MuXX) {
-    std::string threshold = std::string("EF_" + tokens[1].substr(1));
-    chainInfo.thresholds.first = threshold;
-    chainInfo.thresholds.second = threshold;
-    chainInfo.isValid = true;
-    if (tokens.size() == 3) chainInfo.tightness = tokens[2];
-
-  } else {
-    if (tokens.size() < 4) return false;
-
-    if (tokens[3] == "EFFS") {  // 2011
-      if ((tokens[1].substr(0,2) != "mu") or (tokens[2].substr(0,2) != "mu")) return false;
-      std::string threshold1 = std::string("EF_" + tokens[1]);
-      std::string threshold2 = std::string("EF_" + tokens[2]);
-      chainInfo.isEFFS = true;
-      chainInfo.thresholds.first = threshold1;
-      chainInfo.thresholds.second = threshold2;
-      if (tokens.size() == 5) chainInfo.tightness = tokens[4];
-      chainInfo.l2seed = "L2_" + tokens[1] + (chainInfo.tightness.empty() ? "" : "_" + chainInfo.tightness);
-      chainInfo.is2011 = true; 
-      chainInfo.isValid = true; 
-
-    } else if (tokens[4] == "EFFS") { // 2012
-      if ((tokens[1].substr(0,2) != "mu") or (tokens[3].substr(0,2) != "mu")) return false;
-      std::string threshold1 = std::string("EF_" + tokens[1]);
-      std::string threshold2 = std::string("EF_" + tokens[3]);
-      chainInfo.isEFFS = true;
-      chainInfo.thresholds.first = threshold1;
-      chainInfo.thresholds.second = threshold2;
-      if (tokens.size() == 5) chainInfo.tightness = tokens[2];
-      chainInfo.efseed = "EF_" + tokens[1] + (chainInfo.tightness.empty() ? "" : "_" + chainInfo.tightness);
-      chainInfo.is2011 = false; 
-      chainInfo.isValid = true; 
-
-    } else {
-      return false;
-    }
-  }
-
-  m_DimuonChainMap[chainInfo.chain] = chainInfo;
-
-  return chainInfo.isValid;
-}
-
-
-
-bool
-MuonTriggerMatching::isEqual(const double x,
-                             const double y)
-{
-  if (fabs(x - y) < std::numeric_limits<float>::epsilon()) return true;
-  return false;
-}
-
-
-double
-MuonTriggerMatching::dR(const double eta1,
-                        const double phi1,
-                        const double eta2,
-                        const double phi2)
-{
-  double deta = fabs(eta1 - eta2);
-  double dphi = fabs(phi1 - phi2) < TMath::Pi() ? fabs(phi1 - phi2) : 2*TMath::Pi() - fabs(phi1 - phi2);
-  return sqrt(deta*deta + dphi*dphi);
-}
-
-
-
-int
-MuonTriggerMatching::getChainIndex(const std::string& chain)
-{
-  int smk = static_cast<int>(MTT_CPP__trig_DB_SMK);
-  std::map<std::string, int> ChainIdMap = (m_MapOfChainIdMap.count(smk)) ? m_MapOfChainIdMap[smk] : m_MapOfChainIdMap[-1];
-
-  if (ChainIdMap.find(chain) == ChainIdMap.end()) {
-    if (m_NotFoundChain.find(chain) == m_NotFoundChain.end()) {
-      std::cerr << "MuonTriggerMatching\t" << "ERROR\t"
-                << chain << " does not exist in ChainIdMap for SMK = " << smk
-                << " (if SMK = -1, it means the Map is created from TrigMuonEfficiency/MuonChainIdMap.h)" << std::endl;
-      m_NotFoundChain.insert(chain);
-    }
-    return -1;
-  }
-
-  const short ChainId = static_cast<short>(ChainIdMap[chain]);
-  for (int iChain = 0; iChain < MTT_CPP__trig_Nav_n; ++iChain) {
-    if (MTT_CPP__trig_Nav_chain_ChainId->at(iChain) == ChainId) return iChain;
-  }
-
-  if (m_NotFoundChain.find(chain) == m_NotFoundChain.end()) {
-    std::cerr << "MuonTriggerMatching\t" << "ERROR\t"
-              << chain << " does not exist in Flat Navigation Branch." << std::endl;
-    m_NotFoundChain.insert(chain);
-  }
-  return -1;
-}
-
-
-
-void
-MuonTriggerMatching::readTrigConfTree(TTree* TrigConfTree)
-{
-  int smk=-9999;
-  std::map<std::string, int>* hltmap=0;
-
-  if (TrigConfTree) {
-    TrigConfTree->SetBranchAddress("SMK", &smk);
-    TrigConfTree->SetBranchAddress("HLTNameMap", &hltmap);
-
-    TrigConfTree->GetEntry(0);
-    if (not ((smk != -9999) and hltmap)) {
-      std::cerr << "MuonTriggerMatching\t" << "ERROR\t"
-                << "TrigConfTree does exist, but could not SetBranchAddress for SMK and HLTNameMap." << std::endl;
-      return;
-    }
-
-    std::map<std::string, int>::const_iterator p;
-    for (int iEntry = 0; iEntry < TrigConfTree->GetEntries(); ++iEntry) {
-      TrigConfTree->GetEntry(iEntry);
-      if (m_MapOfChainIdMap.count(smk)) continue;
-
-      std::map<std::string, int> ChainIdMap;
-      for (p = hltmap->begin(); p != hltmap->end(); ++p) {
-        if ((p->first.find("EF_mu") != 0) and
-            (p->first.find("EF_2mu") != 0) and
-            (p->first.find("L2_mu15") != 0) and
-            (p->first.find("L2_mu20") != 0)) continue;
-
-        int id = p->second;
-        if (p->first.find("EF_") == 0) id += ChainEntry::kEFChainIdOffset;
-        ChainIdMap.insert(std::pair<std::string, int>(p->first, id));
-      }
-      m_MapOfChainIdMap.insert(std::pair<int, std::map<std::string, int> >(smk, ChainIdMap));
-    }
-
-  } else {
-    std::cerr << "MuonTriggerMatching\t" << "inf> " << "Create ChainIdMap from TrigMuonEfficiency/MuonChainIdMap.h.\n";
-    std::cerr << std::endl;
-    createChainIdMapFromFile();
-  }
-}
-
-
-#include "TrigMuonEfficiency/MuonChainIdMap.h"
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/MuonTriggerMatching_h b/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/MuonTriggerMatching_h
deleted file mode 100644
index aa14d5ecf58cebfc504f14c28441e674ee982208..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/MuonTriggerMatching_h
+++ /dev/null
@@ -1,241 +0,0 @@
-#ifndef __MuonTriggerMatching_h__
-#define __MuonTriggerMatching_h__
-/**
- * @author  Toyonobu Okuyama
- * @author  Takashi Matsushita
- */
-
-
-#include <string>
-#include <map>
-#include <set>
-#include "TTree.h"
-#include "TLorentzVector.h"
-
-#ifdef __USE_TRIGROOTANALYSIS__
-#include "TrigRootAnalysis/DataAccess.h"
-#endif
-
-
-/**
- *  This class implements method for muon trigger matching with navigation information in ntuple analysis.
- *
- *  Validated on NTUP_SMWZ. Should work on any ntuples which contains TrigMuonD3PDMaker block
- */
-class MuonTriggerMatching {
-  public:
-    struct EFmuon {
-      bool valid;
-      bool isIso;
-      int iso_index;
-      std::pair<int, int> indicies;
-      float charge;
-      float pt;
-      float eta;
-      float phi;
-
-      EFmuon() : valid(false), isIso(false), iso_index(-1), indicies(), charge(0.), pt(-1.e30), eta(-1.e30), phi(-1.e30) {}
-    };
-
-
-    enum ChainType {
-      CB = 0, // TrigMuonEF combined chain
-      SA = 1, // TrigMuonEF standalone chain
-      MG = 2  // TrigMuGirl
-    };
-
-
-    /** default constructor
-     *
-     * @param d3pd [in] class object used for the given ntuple analysis
-#ifdef __USE_TRIGROOTANALYSIS__
-     * @param tdt  [in] TrigRootAnalysis D3PD::Trig::DataAccess tool (to obtain SMK info for the current event)
-#endif
-     * @param TrigConfTree [in] pointer of physicsMeta/TrigConfTree block [optional]
-     */
-    MuonTriggerMatching(const MTT__D3PDEvent *d3pd,
-#ifdef __USE_TRIGROOTANALYSIS__
-                        const D3PD::Trig::DataAccess *tdt,
-#endif
-                        TTree *TrigConfTree=0)
-      : m_d3pd(d3pd),
-#ifdef __USE_TRIGROOTANALYSIS__
-        m_tdt(tdt),
-#endif
-        m_matchingDr(0.1),
-        m_isIndexMatchUsed(false),
-        m_MapOfChainIdMap(),
-        m_NotFoundChain() {
-      readTrigConfTree(TrigConfTree);
-    }
-    virtual ~MuonTriggerMatching(){}
-
-
-    /** returns minimum distance required for offline muon and trigger object matching
-     *
-     * @return m_matchingDr
-     */
-    double getDeltaR() const {return m_matchingDr;}
-
-
-    /** set minimum distance required for offline muon and trigger object matching
-     *
-     * @param dr [in] matching distance for offline muon and trigger object matching
-     */
-    void setDeltaR(const double dr) {m_matchingDr = dr;}
-
-
-    /** look for matching EF muon trigger object
-     *
-     * @param eta [in] eta of an offline muon
-     * @param phi [in] phi of an offline muon
-     * @param chain [in] single muon EF chain name. ex) "EF_mu18"
-     * @param l1item [in] optional: minimum level1 threshold required for seed of the matching EF chain ex) "L1_MU11"
-     * @return true if matching EF object was found false otherwise.
-     */
-    bool match(const double eta,
-               const double phi,
-               const std::string& chain,
-               const std::string& l1item="");
-
-
-    /** look for matching EF muon trigger object
-     *
-     * @param eta [in] eta of an offline muon
-     * @param phi [in] phi of an offline muon
-     * @param chain [in] single muon EF chain name. ex) "EF_mu18"
-     * @param EFmuon [out] to be used for accessing the matched EF trigger object
-     * @param l1item [in] optional: minimum level1 threshold required for seed of the matching EF chain ex) "L1_MU11"
-     * @return pair of int to access trigger object
-     * 
-    */
-    std::pair<int, int>
-    matchedTrack(const double eta,
-                 const double phi,
-                 const std::string& chain,
-                 const std::string& l1item="");
-
-
-    /** look for matching EF di-muon trigger object
-     *
-     * @param muon1 [in] TLorentzVector of muon
-     * @param muon2 [in] TLorentzVector of muon
-     * @param chain [in] di-muon EF chain name. ex) "EF_2mu10"
-     * @param result1 [out] bool values indicating if muon1 passed the first/second thresholds of the di-muon trigger.
-     * @param result2 [out] bool values indicating if muon2 passed the first/second thresholds of the di-muon trigger.
-     * @return true if matching EF object was found false otherwise.
-     */
-    bool matchDimuon(const TLorentzVector& muon1,
-                     const TLorentzVector& muon2,
-                     const std::string& chain,
-                     std::pair<bool, bool>& result1,
-                     std::pair<bool, bool>& result2);
-
-
-    // for developers
-    void showSMKeys();
-    void dumpChainIdMap(const int SMK);
-    void createChainIdMapFile(const int SMK);
-    void setDebug(bool x) {m_debug = x;}
-    void useIndex(bool x) {m_index = x;}
-
-
-    /**
-     *  stores information needed for di-muon trigger matching
-     */
-    struct DimuonChainInfo {
-      public:
-        std::string chain;
-        std::string tightness;
-        std::pair<std::string, std::string> thresholds;
-        std::string l2seed;
-        std::string efseed;
-        bool is2011;
-        bool isEFFS;
-        bool is2MuXX;
-        bool isValid;
-
-        DimuonChainInfo(const std::string& chain_="") :
-          chain(chain_), tightness(""), thresholds(), l2seed(""), efseed(""),
-          is2011(false), isEFFS(false), is2MuXX(false), isValid(false) {}
-    };
-
-
-  private:
-    const MTT__D3PDEvent* m_d3pd; 
-#ifdef __USE_TRIGROOTANALYSIS__
-    const D3PD::Trig::DataAccess* m_tdt; 
-#endif 
-    double m_matchingDr;
-    bool m_isIndexMatchUsed;
-    bool m_isNavigationMatchUsed;
-    bool m_debug;
-    bool m_index;
-    std::map<int, std::map<std::string, int> > m_MapOfChainIdMap; // [SMK - [ChainName - ChainId] ]
-    std::set<std::string> m_NotFoundChain;
-    std::map<std::string, DimuonChainInfo> m_DimuonChainMap; // [chain - <threshold1, threshold2>]
-  
-    double matchedTrackDetail_index(EFmuon& efMuonId,
-                                    const EFmuon& usedEfMuonId,
-                                    const double eta,
-                                    const double phi,
-                                    const std::string& chainForThisMuon,
-                                    const std::string& l1item="",
-                                    const std::string& chainEventTrigger="");
-
-    double matchedTrackDetail(EFmuon& efMuonId,
-                              const EFmuon& usedEfMuonId,
-                              const double eta,
-                              const double phi,
-                              const std::string& chainForThisMuon,
-                              const std::string& l1item="",
-                              const std::string& chainEventTrigger="");
-
-    std::pair<bool, bool> matchDimuon(const TLorentzVector& muon1,
-                                      const TLorentzVector& muon2,
-                                      const DimuonChainInfo& chain);
-
-    int getChainIndex(const std::string& chain);
-    void readTrigConfTree(TTree* TrigConfTree);
-    bool L1_isPassed(const int iRoI,
-                     const std::string& l1item);
-    int getL1pt(const std::string& l1item);
-    double dR(const double eta1,
-              const double phi1,
-              const double eta2,
-              const double phi2);
-    void createChainIdMapFromFile(); //implementation in MuonChainIdMap.h
-
-    void tokenize(const std::string& str,
-                  std::vector<std::string>& tokens,
-                  const std::string& delimiters);
-    bool decodeDimuonChain(DimuonChainInfo& chainInfo);
-
-    bool checkSeedL2(const double eta,
-                     const double phi,
-                     const std::string& chain,
-                     double l2dr=0.15,
-                     double l1dr=0.20);
-
-    bool checkSeedEF(const double eta,
-                     const double phi,
-                     const std::string& chain);
-
-    bool checkSeed_index(const double eta,
-                         const double phi,
-                         const std::string& chain);
-
-    double index_match(const double eta,
-                       const double phi,
-                       const std::string& chain,
-                       const std::string& threshold,
-                       EFmuon& efMuonId,
-                       const EFmuon& usedEfMuonId);
-
-    bool isEqual(const double x,
-                 const double y);
-};
-
-
-#endif //__MuonTriggerMatching_h__
-// eof
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/d3pdreader_h b/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/d3pdreader_h
deleted file mode 100644
index 81ee9364069884cd604fd55ba5dee7d0e1f6ce7d..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/d3pdreader_h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef __USE_TRIGROOTANALYSIS__
-#define MTT_CPP__trig_DB_SMK (m_d3pd->trig_DB.SMK())
-#else
-#define MTT_CPP__trig_DB_SMK (m_tdt->GetSMK())
-#endif
-
-#define MTT_CPP__trig_Nav_n (m_d3pd->trig_Nav.n())
-#define MTT_CPP__trig_Nav_chain_ChainId (m_d3pd->trig_Nav.chain_ChainId())
-#define MTT_CPP__trig_Nav_chain_RoIType (m_d3pd->trig_Nav.chain_RoIType())
-#define MTT_CPP__trig_Nav_chain_RoIIndex (m_d3pd->trig_Nav.chain_RoIIndex())
-#define MTT_CPP__trig_RoI_EF_mu_Muon_ROI (m_d3pd->trig_RoI_EF_mu.Muon_ROI())
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFInfoContainer (m_d3pd->trig_RoI_EF_mu.TrigMuonEFInfoContainer())
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus (m_d3pd->trig_RoI_EF_mu.TrigMuonEFInfoContainerStatus())
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFIsolationContainer (m_d3pd->trig_RoI_EF_mu.TrigMuonEFIsolationContainer())
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus (m_d3pd->trig_RoI_EF_mu.TrigMuonEFIsolationContainerStatus())
-#define MTT_CPP__trig_RoI_L2_mu_CombinedMuonFeature (m_d3pd->trig_RoI_L2_mu.CombinedMuonFeature())
-#define MTT_CPP__trig_RoI_L2_mu_CombinedMuonFeatureStatus (m_d3pd->trig_RoI_L2_mu.CombinedMuonFeatureStatus())
-#define MTT_CPP__trig_RoI_L2_mu_MuonFeature (m_d3pd->trig_RoI_L2_mu.MuonFeature())
-#define MTT_CPP__trig_RoI_L2_mu_Muon_ROI (m_d3pd->trig_RoI_L2_mu.Muon_ROI())
-#define _CB_BR_(x) (m_d3pd->trig_EF_trigmuonef.track_CB_##x())
-#define _SA_BR_(x) (m_d3pd->trig_EF_trigmuonef.track_SA_##x())
-#define _MG_BR_(x) (m_d3pd->trig_EF_trigmugirl.track_CB_##x())
-#define MTT_CPP__trig_L2_combmuonfeature_eta (m_d3pd->trig_L2_combmuonfeature.eta())
-#define MTT_CPP__trig_L2_combmuonfeature_phi (m_d3pd->trig_L2_combmuonfeature.phi())
-#define MTT_CPP__trig_L2_muonfeature_eta (m_d3pd->trig_L2_muonfeature.eta())
-#define MTT_CPP__trig_L2_muonfeature_phi (m_d3pd->trig_L2_muonfeature.phi())
-#define MTT_CPP__trig_L1_mu_eta (m_d3pd->trig_L1_mu.eta())
-#define MTT_CPP__trig_L1_mu_phi (m_d3pd->trig_L1_mu.phi())
-#define MTT_CPP__trig_L1_mu_thrName (m_d3pd->trig_L1_mu.thrName())
-
-#define MTT_CPP__trig_RoI_EF_e_egammaContainer_egamma_Electrons (m_d3pd->trig_RoI_EF_e.egammaContainer_egamma_Electrons())
-#define MTT_CPP__trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus (m_d3pd->trig_RoI_EF_e.egammaContainer_egamma_ElectronsStatus())
-#define MTT_CPP__trig_EF_el_n (m_d3pd->trig_EF_el.n())
-#define MTT_CPP__trig_EF_el_eta (m_d3pd->trig_EF_el.eta())
-#define MTT_CPP__trig_EF_el_phi (m_d3pd->trig_EF_el.phi())
-
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu8 (m_d3pd->trig_EF_trigmuonef.EF_mu8())
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu15 (m_d3pd->trig_EF_trigmuonef.EF_mu15())
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu18_tight (m_d3pd->trig_EF_trigmuonef.EF_mu18_tight())
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS (m_d3pd->trig_EF_trigmuonef.EF_mu18_tight_mu8_EFFS())
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu24i_tight (m_d3pd->trig_EF_trigmuonef.EF_mu24i_tight())
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu36_tight (m_d3pd->trig_EF_trigmuonef.EF_mu36_tight())
-#define MTT_CPP__trig_EF_trigmuonef_track_MuonType (m_d3pd->trig_EF_trigmuonef.track_MuonType())
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/d3pdreader_hsg3_h b/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/d3pdreader_hsg3_h
deleted file mode 100644
index 7bfd7296ee70484b50f0d52728c7e9bae0ce7292..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/d3pdreader_hsg3_h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef __USE_TRIGROOTANALYSIS__
-#define MTT_CPP__trig_DB_SMK (m_d3pd->trig_DB_SMK())
-#else
-#define MTT_CPP__trig_DB_SMK (m_tdt->GetSMK())
-#endif
-
-#define MTT_CPP__trig_Nav_n (m_d3pd->trig_Nav_n())
-#define MTT_CPP__trig_Nav_chain_ChainId (m_d3pd->trig_Nav_chain_ChainId())
-#define MTT_CPP__trig_Nav_chain_RoIType (m_d3pd->trig_Nav_chain_RoIType())
-#define MTT_CPP__trig_Nav_chain_RoIIndex (m_d3pd->trig_Nav_chain_RoIIndex())
-#define MTT_CPP__trig_RoI_EF_mu_Muon_ROI (m_d3pd->trig_RoI_EF_mu_Muon_ROI())
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFInfoContainer (m_d3pd->trig_RoI_EF_mu_TrigMuonEFInfoContainer())
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus (m_d3pd->trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus())
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFIsolationContainer (m_d3pd->trig_RoI_EF_mu_TrigMuonEFIsolationContainer())
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus (m_d3pd->trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus())
-#define MTT_CPP__trig_RoI_L2_mu_CombinedMuonFeature (m_d3pd->trig_RoI_L2_mu_CombinedMuonFeature())
-#define MTT_CPP__trig_RoI_L2_mu_CombinedMuonFeatureStatus (m_d3pd->trig_RoI_L2_mu_CombinedMuonFeatureStatus())
-#define MTT_CPP__trig_RoI_L2_mu_MuonFeature (m_d3pd->trig_RoI_L2_mu_MuonFeature())
-#define MTT_CPP__trig_RoI_L2_mu_Muon_ROI (m_d3pd->trig_RoI_L2_mu_Muon_ROI())
-#define _CB_BR_(x) (m_d3pd->trig_EF_trigmuonef_track_CB_##x())
-#define _SA_BR_(x) (m_d3pd->trig_EF_trigmuonef_track_SA_##x())
-#define _MG_BR_(x) (m_d3pd->trig_EF_trigmugirl_track_CB_##x())
-#define MTT_CPP__trig_L2_combmuonfeature_eta (m_d3pd->trig_L2_combmuonfeature_eta())
-#define MTT_CPP__trig_L2_combmuonfeature_phi (m_d3pd->trig_L2_combmuonfeature_phi())
-#define MTT_CPP__trig_L2_muonfeature_eta (m_d3pd->trig_L2_muonfeature_eta())
-#define MTT_CPP__trig_L2_muonfeature_phi (m_d3pd->trig_L2_muonfeature_phi())
-#define MTT_CPP__trig_L1_mu_eta (m_d3pd->trig_L1_mu_eta())
-#define MTT_CPP__trig_L1_mu_phi (m_d3pd->trig_L1_mu_phi())
-#define MTT_CPP__trig_L1_mu_thrName (m_d3pd->trig_L1_mu_thrName())
-
-#define MTT_CPP__trig_RoI_EF_e_egammaContainer_egamma_Electrons (m_d3pd->trig_RoI_EF_e_egammaContainer_egamma_Electrons())
-#define MTT_CPP__trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus (m_d3pd->trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus())
-#define MTT_CPP__trig_EF_el_n (m_d3pd->trig_EF_el_n())
-#define MTT_CPP__trig_EF_el_eta (m_d3pd->trig_EF_el_eta())
-#define MTT_CPP__trig_EF_el_phi (m_d3pd->trig_EF_el_phi())
-
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu8 (m_d3pd->trig_EF_trigmuonef_EF_mu8())
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu15 (m_d3pd->trig_EF_trigmuonef_EF_mu15())
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu18_tight (m_d3pd->trig_EF_trigmuonef_EF_mu18_tight())
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS (m_d3pd->trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS())
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu24i_tight (m_d3pd->trig_EF_trigmuonef_EF_mu24i_tight())
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu36_tight (m_d3pd->trig_EF_trigmuonef_EF_mu36_tight())
-#define MTT_CPP__trig_EF_trigmuonef_track_MuonType (m_d3pd->trig_EF_trigmuonef_track_MuonType())
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/standard_h b/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/standard_h
deleted file mode 100644
index 8c80ba194657c958eebb74ed42d7ba19ebc3df29..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/skeleton/standard_h
+++ /dev/null
@@ -1,38 +0,0 @@
-#define MTT_CPP__trig_DB_SMK m_d3pd->trig_DB_SMK
-#define MTT_CPP__trig_Nav_n m_d3pd->trig_Nav_n
-#define MTT_CPP__trig_Nav_chain_ChainId m_d3pd->trig_Nav_chain_ChainId
-#define MTT_CPP__trig_Nav_chain_RoIType m_d3pd->trig_Nav_chain_RoIType
-#define MTT_CPP__trig_Nav_chain_RoIIndex m_d3pd->trig_Nav_chain_RoIIndex
-#define MTT_CPP__trig_RoI_EF_mu_Muon_ROI m_d3pd->trig_RoI_EF_mu_Muon_ROI
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFInfoContainer m_d3pd->trig_RoI_EF_mu_TrigMuonEFInfoContainer
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus m_d3pd->trig_RoI_EF_mu_TrigMuonEFInfoContainerStatus
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFIsolationContainer m_d3pd->trig_RoI_EF_mu_TrigMuonEFIsolationContainer
-#define MTT_CPP__trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus m_d3pd->trig_RoI_EF_mu_TrigMuonEFIsolationContainerStatus
-#define MTT_CPP__trig_RoI_L2_mu_CombinedMuonFeature m_d3pd->trig_RoI_L2_mu_CombinedMuonFeature
-#define MTT_CPP__trig_RoI_L2_mu_CombinedMuonFeatureStatus m_d3pd->trig_RoI_L2_mu_CombinedMuonFeatureStatus
-#define MTT_CPP__trig_RoI_L2_mu_MuonFeature m_d3pd->trig_RoI_L2_mu_MuonFeature
-#define MTT_CPP__trig_RoI_L2_mu_Muon_ROI m_d3pd->trig_RoI_L2_mu_Muon_ROI
-#define _CB_BR_(x) m_d3pd->trig_EF_trigmuonef_track_CB_##x
-#define _SA_BR_(x) m_d3pd->trig_EF_trigmuonef_track_SA_##x
-#define _MG_BR_(x) m_d3pd->trig_EF_trigmugirl_track_CB_##x
-#define MTT_CPP__trig_L2_combmuonfeature_eta m_d3pd->trig_L2_combmuonfeature_eta
-#define MTT_CPP__trig_L2_combmuonfeature_phi m_d3pd->trig_L2_combmuonfeature_phi
-#define MTT_CPP__trig_L2_muonfeature_eta m_d3pd->trig_L2_muonfeature_eta
-#define MTT_CPP__trig_L2_muonfeature_phi m_d3pd->trig_L2_muonfeature_phi
-#define MTT_CPP__trig_L1_mu_eta m_d3pd->trig_L1_mu_eta
-#define MTT_CPP__trig_L1_mu_phi m_d3pd->trig_L1_mu_phi
-#define MTT_CPP__trig_L1_mu_thrName m_d3pd->trig_L1_mu_thrName
-
-#define MTT_CPP__trig_RoI_EF_e_egammaContainer_egamma_Electrons m_d3pd->trig_RoI_EF_e_egammaContainer_egamma_Electrons
-#define MTT_CPP__trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus m_d3pd->trig_RoI_EF_e_egammaContainer_egamma_ElectronsStatus
-#define MTT_CPP__trig_EF_el_n m_d3pd->trig_EF_el_n
-#define MTT_CPP__trig_EF_el_eta m_d3pd->trig_EF_el_eta
-#define MTT_CPP__trig_EF_el_phi m_d3pd->trig_EF_el_phi
-
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu8 m_d3pd->trig_EF_trigmuonef_EF_mu8
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu15 m_d3pd->trig_EF_trigmuonef_EF_mu15
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu18_tight m_d3pd->trig_EF_trigmuonef_EF_mu18_tight
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS m_d3pd->trig_EF_trigmuonef_EF_mu18_tight_mu8_EFFS
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu24i_tight m_d3pd->trig_EF_trigmuonef_EF_mu24i_tight
-#define MTT_CPP__trig_EF_trigmuonef_EF_mu36_tight m_d3pd->trig_EF_trigmuonef_EF_mu36_tight
-#define MTT_CPP__trig_EF_trigmuonef_track_MuonType m_d3pd->trig_EF_trigmuonef_track_MuonType
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/util/GetSMK_from_COOL.py b/Trigger/TrigAnalysis/TrigMuonEfficiency/util/GetSMK_from_COOL.py
deleted file mode 100644
index 3d11c9eb1ff1b89ec55bb61f2dad1b2ba62c811f..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/util/GetSMK_from_COOL.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-## ------------------------------------
-## E.Gallas May 2012
-##
-## function to return a dictionary of SMKs keyed by Run number
-## ------------------------------------
-import sys
-from PyCool import cool
-
-def Get_SMK_by_Run_Range(run1,run2):
-  """For the input Run number range, fill a dictionary with SMKs keyed by Run"""
-  ##
-  ## COOL Connections
-  ##
-  dbSvc=cool.DatabaseSvcFactory.databaseService()
-  coolname = 'COOLONL_TRIGGER/COMP200'
-  cooldb=dbSvc.openDatabase(coolname)
-  ##
-  folder_SMK = cooldb.getFolder('/TRIGGER/HLT/HltConfigKeys')
-  ##
-  CoolChAll = cool.ChannelSelection.all()
-  itr = folder_SMK.browseObjects(run1<<32,run2<<32,CoolChAll)
-  ##
-  ## loop over iterator, filling dictionary of SMK keyed by Run
-  ##
-  SMK_DICT = {}
-  while itr.goToNext():
-    obj     = itr.currentRef()
-    run     = int(obj.since() >> 32)
-    payload = obj.payload()
-    SMK = payload['MasterConfigurationKey']
-    SMK_DICT[run] = int(SMK)
-  ##
-  ## close the iterator
-  ##
-  itr.close()
-  ##
-  ## close the COOL connection
-  ##
-  cooldb.closeDatabase()
-  ##
-  ## return the dictionary
-  ##
-  return SMK_DICT
-##
-## ------------------------------------
-if __name__ == '__main__':
-  run1 = 191373
-  run2 = 200220
-  SMK_DICT = Get_SMK_by_Run_Range(run1,run2+1)
-  print str(SMK_DICT)
-  sys.exit('\n\tNormal successful completion.\n')
-
diff --git a/Trigger/TrigAnalysis/TrigMuonEfficiency/util/setup.sh b/Trigger/TrigAnalysis/TrigMuonEfficiency/util/setup.sh
deleted file mode 100755
index 4adb485b188bb01d0dcfe175c1c7e9a9e3d3bca7..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonEfficiency/util/setup.sh
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/bin/sh
-
-EXTERNAL_HEADER_PATH=
-USE_TDT=0
-FOR_HSG3=0
-if [ $# -eq 1 ]; then
-  EXTERNAL_HEADER_PATH=$1
-  EXTERNAL_HEADER_NAME=`basename ${EXTERNAL_HEADER_PATH}`
-  CLASS_NAME=${EXTERNAL_HEADER_NAME%.h}
-  grep "D3PDReader" $1 > /dev/null
-  NOT_D3PD_READER=$?
-elif [ $# -eq 2 ]; then
-    EXTERNAL_HEADER_PATH=$1
-    EXTERNAL_HEADER_NAME=`basename ${EXTERNAL_HEADER_PATH}`
-    CLASS_NAME=${EXTERNAL_HEADER_NAME%.h}
-    grep "D3PDReader" $1 > /dev/null
-    NOT_D3PD_READER=$?
-  if [ "$2" == "TDT" ]; then
-    USE_TDT=1
-  elif [ "$2" == "HSG3" ]; then
-    FOR_HSG3=1
-  else
-    echo "usage> $0 <path to header file> [optional: TDT or HSG3]"
-    exit 1
-  fi
-else
-  echo "usage> $0 <path to header file> <optional: TDT or HSG3>"
-  exit 1
-fi
-
-
-if [ $NOT_D3PD_READER = 1 ]; then
-#------------------------------------------------------------------#
-# for root analysis with direct access to ntuple variables
-#------------------------------------------------------------------#
-  cat > tmp.header <<EOF
-#include <vector>
-#include <string>
-using namespace std;
-EOF
-
-  cat ${EXTERNAL_HEADER_PATH} >> tmp.header
-  mv tmp.header ${EXTERNAL_HEADER_PATH}
-
-  for ii in MuonTriggerMatching ElectronTriggerMatching
-  do
-    cat > ../TrigMuonEfficiency/${ii}.h <<EOF
-#include "${EXTERNAL_HEADER_PATH}"
-typedef ${CLASS_NAME} MTT__D3PDEvent;
-EOF
-  cat ../skeleton/standard_h > ../Root/${ii}.cxx
-
-  done
-
-else
-#------------------------------------------------------------------#
-# for root analysis with D3PDReader to access ntuple variables
-#------------------------------------------------------------------#
-  for ii in MuonTriggerMatching ElectronTriggerMatching
-  do
-    if [ ${USE_TDT} -eq 1 ]; then
-      PRELIMINARY_DEFS="#define __USE_TRIGROOTANALYSIS__"
-    else
-      PRELIMINARY_DEFS=""
-    fi
-    cat > ../TrigMuonEfficiency/${ii}.h <<EOF
-#ifndef __TrigMuonEfficiency_h_preheader__
-#define __TrigMuonEfficiency_h_preheader__
-${PRELIMINARY_DEFS}
-namespace D3PDReader {
-  class ${CLASS_NAME};
-}
-#define MTT__D3PDEvent D3PDReader::${CLASS_NAME}
-#include "${EXTERNAL_HEADER_PATH}"
-#endif
-EOF
-    echo ${PRELIMINARY_DEFS} > ../Root/${ii}.cxx
-    if [ ${FOR_HSG3} -eq 1 ]; then
-      cat ../skeleton/d3pdreader_hsg3_h >> ../Root/${ii}.cxx
-    else
-      cat ../skeleton/d3pdreader_h >> ../Root/${ii}.cxx
-    fi
-  done
-
-  cat > tmp__h << EOF
-#ifndef LEPTON_TRIGGER_MATCHING
-#define LEPTON_TRIGGER_MATCHING
-#include "TrigMuonEfficiency/MuonTriggerMatching.h" 
-#include "TrigMuonEfficiency/ElectronTriggerMatching.h" 
-#endif
-EOF
-  cat ../Root/LinkDef.h >> tmp__h
-  mv tmp__h ../Root/LinkDef.h
-fi
-
-for ii in MuonTriggerMatching ElectronTriggerMatching
-do
-  cat ../skeleton/${ii}_cxx >> ../Root/${ii}.cxx
-  cat ../skeleton/${ii}_h >> ../TrigMuonEfficiency/${ii}.h
-done
-
-# eof
diff --git a/Trigger/TrigAnalysis/TrigMuonMatching/cmt/Makefile.RootCore b/Trigger/TrigAnalysis/TrigMuonMatching/cmt/Makefile.RootCore
deleted file mode 100644
index 20bc78f28bb220d5ef1dbd8544a1527d4bdcdb93..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonMatching/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,17 +0,0 @@
-PACKAGE          = TrigMuonMatching
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = AsgTools PATCore xAODRootAccess xAODEventInfo xAODMuon TrigDecisionTool TrigConfxAOD xAODTrigMuon
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 0
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigAnalysis/TrigMuonMatching/cmt/requirements b/Trigger/TrigAnalysis/TrigMuonMatching/cmt/requirements
deleted file mode 100644
index f460de2d4fb87e69812def77cf7dc50c86b128a3..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigMuonMatching/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package TrigMuonMatching
-
-author Kota Kasahara <kota.kasahara@cern.ch>
-
-public
-
-use AtlasPolicy		AtlasPolicy-*	
-use AsgTools        	AsgTools-*		Control/AthToolSupport
-use xAODMuon        	xAODMuon-*		Event/xAOD
-use TrigDecisionTool 	TrigDecisionTool-*	Trigger/TrigAnalysis
-
-private
-use AtlasROOT		AtlasROOT-*		External
-use TrigConfxAOD	TrigConfxAOD-*		Trigger/TrigConfiguration
-use GaudiInterface	GaudiInterface-*	External
-use AthenaBaseComps	AthenaBaseComps-*	Control
-use xAODTrigger		xAODTrigger-*		Event/xAOD
-use xAODTrigMuon	xAODTrigMuon-*		Event/xAOD
-
-end_private
-
-apply_pattern dual_use_library files="*.cxx ../Root/*.cxx"
-apply_pattern declare_joboptions files=../share/*.py
diff --git a/Trigger/TrigAnalysis/TrigNtupleBase/cmt/requirements b/Trigger/TrigAnalysis/TrigNtupleBase/cmt/requirements
deleted file mode 100644
index 2a96e3ebb7d2c1b7a5ab4c070d92f95dad9e1515..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigNtupleBase/cmt/requirements
+++ /dev/null
@@ -1,17 +0,0 @@
-####################################################################
-
-package TrigNtupleBase
-
-author w.bell <W.Bell@cern.ch>
-
-use AtlasPolicy 	AtlasPolicy-*
-use GaudiInterface 	GaudiInterface-*  	External
-use StoreGate   	StoreGate-*        	Control
-use TrigDecisionTool    TrigDecisionTool-*	Trigger/TrigAnalysis
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AtlasROOT		AtlasROOT-*		External
-
-####################################################################
-
-library TrigNtupleBase *.cxx 
-apply_pattern installed_library
diff --git a/Trigger/TrigAnalysis/TrigObjectMatching/cmt/requirements b/Trigger/TrigAnalysis/TrigObjectMatching/cmt/requirements
deleted file mode 100644
index 44d33568f211b274b8dd15f57d77c6aaa987b8a3..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigObjectMatching/cmt/requirements
+++ /dev/null
@@ -1,40 +0,0 @@
-package TrigObjectMatching
-author Ben Smith <bcsmith@fas.harvard.edu>
-
-use AtlasPolicy             AtlasPolicy-*
-use GaudiInterface          GaudiInterface-*          External
-use AtlasBoost              AtlasBoost-*              External
-use CxxUtils                CxxUtils-*                Control
-use DataModel               DataModel-*               Control
-use AthenaKernel            AthenaKernel-*            Control
-use AthenaBaseComps         AthenaBaseComps-*         Control
-
-use TrigDecisionTool        TrigDecisionTool-*        Trigger/TrigAnalysis
-
-use TrigSteeringEvent       TrigSteeringEvent-*       Trigger/TrigEvent
-use TrigCaloEvent           TrigCaloEvent-*           Trigger/TrigEvent
-use TrigMuonEvent           TrigMuonEvent-*           Trigger/TrigEvent
-use TrigParticle            TrigParticle-*            Trigger/TrigEvent
-
-use tauEvent                tauEvent-*                Reconstruction
-use JetEvent                JetEvent-*                Reconstruction/Jet
-use egammaEvent             egammaEvent-*             Reconstruction/egamma
-
-#library TrigObjectMatching *.cxx -s=components *.cxx
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.py"
-
-private
-
-# for building ARA dictionaries
-use EventKernel             EventKernel-*             Event
-use AnalysisTriggerEvent    AnalysisTriggerEvent-*    PhysicsAnalysis/AnalysisTrigger
-use muonEvent               muonEvent-*               Reconstruction/MuonIdentification
-
-use AtlasReflex             AtlasReflex-*             External -no_auto_imports
-
-apply_pattern lcgdict   dict=TrigObjectMatching \
-                             selectionfile=selection.xml \
-                             headerfiles="../TrigObjectMatching/TrigObjectMatchingDict.h"
-
-                             end_private
diff --git a/Trigger/TrigAnalysis/TrigRootAnalysis/cmt/Makefile.RootCore b/Trigger/TrigAnalysis/TrigRootAnalysis/cmt/Makefile.RootCore
deleted file mode 100644
index 520e31f5a9f3344f9957ff1edf73b2996ae5dd0f..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigRootAnalysis/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,12 +0,0 @@
-# Dear emacs, this is a -*- Makefile -*-
-# Author: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-# TrigRootAnalysis makefile for the RootCore environment
-
-PACKAGE          = TrigRootAnalysis
-PACKAGE_PRELOAD  = Tree
-PACKAGE_CXXFLAGS =
-PACKAGE_LDFLAGS  =
-PACKAGE_DEP      =
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigAnalysis/TrigRootAnalysis/cmt/Makefile.standalone b/Trigger/TrigAnalysis/TrigRootAnalysis/cmt/Makefile.standalone
deleted file mode 100644
index e7a6d8877f69ffdb831fc8c8cf4523b16a0070e8..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigRootAnalysis/cmt/Makefile.standalone
+++ /dev/null
@@ -1,148 +0,0 @@
-# Dear emacs, this is a -*- Makefile -*-
-#
-# $Id: Makefile.standalone 502443 2012-05-25 10:43:25Z krasznaa $
-#
-# Makefile for compiling the library in a complately standalone
-# fashion
-#
-# author: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-#
-
-#
-# Include the architecture definitions from the ROOT sources
-#
-#  Makefile.arch can be in a number of different locations depending on the system
-#  you're compiling on. The Fink installed version of ROOT for instance has this file
-#  in a different location than the "normally installed" ROOT versions...
-#
-ARCH_LOC_1 := $(wildcard $(shell root-config --prefix)/test/Makefile.arch)
-ARCH_LOC_2 := $(wildcard $(shell root-config --prefix)/share/root/test/Makefile.arch)
-ARCH_LOC_3 := $(wildcard $(shell root-config --prefix)/share/doc/root/test/Makefile.arch)
-ARCH_LOC_4 := $(wildcard $(shell root-config --prefix)/etc/Makefile.arch)
-ARCH_LOC_5 := $(wildcard $(shell root-config --prefix)/etc/root/Makefile.arch)
-ifneq ($(strip $(ARCH_LOC_1)),)
-  $(info Using $(ARCH_LOC_1))
-  include $(ARCH_LOC_1)
-else
-  ifneq ($(strip $(ARCH_LOC_2)),)
-    $(info Using $(ARCH_LOC_2))
-    include $(ARCH_LOC_2)
-  else
-    ifneq ($(strip $(ARCH_LOC_3)),)
-      $(info Using $(ARCH_LOC_3))
-      include $(ARCH_LOC_3)
-    else
-      ifneq ($(strip $(ARCH_LOC_4)),)
-        $(info Using $(ARCH_LOC_4))
-        include $(ARCH_LOC_4)
-      else
-        ifneq ($(strip $(ARCH_LOC_5)),)
-          $(info Using $(ARCH_LOC_5))
-          include $(ARCH_LOC_5)
-        else
-          $(error Could not find Makefile.arch!)
-        endif
-      endif
-    endif
-  endif
-endif 
-
-# Name of the library to create:
-LIBRARY = TrigRootAnalysis
-
-# Set the locations of some files
-OBJDIR = ../standalone
-DEPDIR = $(OBJDIR)/dep
-DICTHEAD  = $(LIBRARY)_Dict.h
-DICTFILE  = $(LIBRARY)_Dict.$(SrcSuf)
-DICTOBJ   = $(OBJDIR)/$(LIBRARY)_Dict.$(ObjSuf)
-DICTLDEF  = ../Root/LinkDef.h
-INCLUDES += -I../
-SKIPCPPLIST = $(DICTFILE)
-SKIPHLIST   = $(DICTHEAD) $(DICTLDEF)
-SHLIBFILE   = ../standalone/lib$(LIBRARY).$(DllSuf)
-LIBFILE     = ../standalone/lib$(LIBRARY).a
-VPATH  += $(OBJDIR) ../Root
-
-# To get C++11 support with GCC:
-#CXXFLAGS += -std=c++0x -std=gnu++0x
-
-# To get C++11 support with clang:
-#CXX       = clang++
-#LD        = clang++
-#CXXFLAGS += -std=c++0x -stdlib=libc++
-
-# List of all header and source files to build
-HLIST   = ../TrigRootAnalysis/ChainGroup.h ../TrigRootAnalysis/ChainGroupHandling.h \
-			 ../TrigRootAnalysis/Conditions.h ../TrigRootAnalysis/ConfigAccess.h \
-			 ../TrigRootAnalysis/DataAccess.h ../TrigRootAnalysis/IConfigAccess.h \
-			 ../TrigRootAnalysis/IDataAccess.h ../TrigRootAnalysis/IITrigConfigSvcD3PD.h \
-			 ../TrigRootAnalysis/TrigDecisionFunctions.h \
-			 ../TrigRootAnalysis/PyTrigDecisionToolD3PD.h \
-			 ../TrigRootAnalysis/TrigConfigSvcD3PD.h \
-			 ../TrigRootAnalysis/TrigDecisionToolD3PD.h ../TrigRootAnalysis/VarHandle.h
-CPPLIST = $(filter-out $(SKIPCPPLIST),$(wildcard ../Root/*.$(SrcSuf)))
-
-# List of all object files to build
-OLIST = $(patsubst %.$(SrcSuf),%.o,$(notdir $(CPPLIST)))
-
-# The default is to create the shared library:
-default: $(SHLIBFILE) $(LIBFILE)
-
-%.$(ObjSuf): %.$(SrcSuf)
-	@echo "Compiling $<"
-	@mkdir -p $(OBJDIR)
-	@$(CXX) $(CXXFLAGS) -Wall -c $< -o $(OBJDIR)/$(notdir $@) $(INCLUDES)
-
-# Rule to create the dictionary
-$(DICTFILE): $(HLIST) $(DICTLDEF)
-	@echo "Generating dictionary $@"
-	@$(shell root-config --exec-prefix)/bin/rootcint -f $(DICTFILE) -c -p $(INCLUDES) $^
-
-# Rule to comile the dictionary
-$(DICTOBJ): $(DICTFILE)
-	@echo "Compiling $<"
-	@mkdir -p $(OBJDIR)
-	@$(CXX) $(CXXFLAGS) -Wall -c $(INCLUDES) -o $@ $<
-
-# Rule to link the shared library
-$(SHLIBFILE): $(OLIST) $(DICTOBJ)
-	@echo "Making shared library: $(SHLIBFILE)"
-	@rm -f $(SHLIBFILE)
-ifneq (,$(findstring macosx,$(ARCH)))
-	@$(LD) $(LDFLAGS) -dynamiclib -single_module -undefined dynamic_lookup -O2 $(addprefix $(OBJDIR)/,$(OLIST)) $(DICTOBJ) -o $(SHLIBFILE)
-else
-	@$(LD) $(LDFLAGS) $(SOFLAGS) -Wall $(addprefix $(OBJDIR)/,$(OLIST)) $(DICTOBJ) -o $(SHLIBFILE)
-endif
-
-# Rule to create the static library
-$(LIBFILE): $(OLIST) $(DICTOBJ)
-	@echo "Making static library: $(LIBFILE)"
-	@rm -f $(LIBFILE)
-	@ar rcs $@ $(addprefix $(OBJDIR)/,$(OLIST)) $(DICTOBJ)
-
-# Rule to clean the directory
-clean:
-	@rm -f $(OBJDIR)/*.$(ObjSuf)
-	@rm -f $(DICTOBJ)
-	@rm -f $(DICTFILE) $(DICTHEAD)
-	@rm -f $(SHLIBFILE)
-
-distclean: clean
-	@rm -rf $(OBJDIR)
-
-#
-# Calculate the dependencies for all the source files:
-#
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),distclean)
--include $(foreach var,$(notdir $(CPPLIST:.$(SrcSuf)=.d)),$(DEPDIR)/$(var))
-endif
-endif
-
-$(DEPDIR)/%.d: %.$(SrcSuf)
-	@mkdir -p $(DEPDIR)
-	@if test -f $< ; then \
-		echo "Making $(@F)"; \
-		$(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $(INCLUDES) $< | sed '\''/Cstd\/rw/d'\'' > $@'; \
-	fi
diff --git a/Trigger/TrigAnalysis/TrigRootAnalysis/cmt/requirements b/Trigger/TrigAnalysis/TrigRootAnalysis/cmt/requirements
deleted file mode 100644
index ee5bbd9c7a6c558db715e9be40ef7fb246f1a540..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigRootAnalysis/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-package TrigRootAnalysis
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-
-# Base Gaudi/Athena package(s):
-use AtlasPolicy     AtlasPolicy-*
-use GaudiInterface  GaudiInterface-*  External
-
-# External package(s):
-use AtlasROOT       AtlasROOT-*       External
-
-private
-
-# Athena package(s):
-use AthenaBaseComps AthenaBaseComps-* Control
-use AthenaKernel    AthenaKernel-*    Control
-use StoreGate       StoreGate-*       Control
-
-# Specify the required ROOT components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS RIO)"
-
-library TrigRootAnalysis ../Root/*.cxx ../src/*.cxx
-apply_pattern installed_library
-
-apply_pattern have_root_headers root_headers="IDataAccess.h \
-                                              IConfigAccess.h \
-                                              IITrigConfigSvcD3PD.h \
-                                              IITrigDecisionToolD3PD.h \
-                                              TrigConfigSvcD3PD.h \
-                                              DataAccess.h \
-                                              ConfigAccess.h \
-                                              ChainGroupHandling.h \
-                                              TrigDecisionFunctions.h \
-                                              TrigDecisionToolD3PD.h \
-                                              PyTrigDecisionToolD3PD.h \
-                                              ChainGroup.h \
-                                              ../Root/LinkDef.h" \
-              headers_lib=TrigRootAnalysis
diff --git a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauEmulation/cmt/Makefile.RootCore b/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauEmulation/cmt/Makefile.RootCore
deleted file mode 100644
index e72d9769ded3d63d5851d4fbfcdb04f0f31982b4..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauEmulation/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,60 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-
-# the name of the package:
-PACKAGE              = TrigTauEmulation
-
-# the libraries to link with this one:
-PACKAGE_PRELOAD      = 
-
-# additional compilation flags to pass (not propagated to dependent packages):
-PACKAGE_CXXFLAGS     =  
-
-# additional compilation flags to pass (propagated to dependent packages):
-PACKAGE_OBJFLAGS     = -D__STANDALONE -DASGTOOL_STANDALONE -DXAOD_STANDALONE -DXAOD_ANALYSIS
-
-# additional linker flags to pass (for compiling the library):
-PACKAGE_LDFLAGS      = 
-
-# additional linker flags to pass (for compiling binaries):
-PACKAGE_BINFLAGS     = 
-
-# additional linker flags to pass (propagated to client libraries):
-PACKAGE_LIBFLAGS     = 
-
-# the list of packages we depend on:
-PACKAGE_DEP = EventLoop AsgTools PATInterfaces PATCore xAODEventInfo xAODTrigger xAODTau xAODTracking xAODJet AssociationUtils TrigDecisionTool PathResolver
-
-# the list of packages we use if present, but that we can work without :
-PACKAGE_TRYDEP       = 
-
-# list pattern of scripts to link directly into binary path:
-PACKAGE_SCRIPTS      = scripts/run_trigger_emulation_on_grid.py
-
-# whether to use pedantic compilation:
-PACKAGE_PEDANTIC     = 1
-
-# whether to turn *off* optimization (set to dict to do it only for
-# dictionaries):
-PACKAGE_NOOPT        = 0
-
-# whether to build no library (needs to be set if no source files are
-# present):
-PACKAGE_NOCC         = 0
-
-# whether we build a reflex dictionary:
-PACKAGE_REFLEX       = 1
-
-# the list of all unit tests that should be called in recursive testing,
-# i.e. in unit tests that call other unit tests
-# for that unit tests need to pass on all machines, and run very fast
-PACKAGE_RECURSIVE_UT = 
-
-
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauEmulation/cmt/requirements b/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauEmulation/cmt/requirements
deleted file mode 100644
index dbb0bf91a32bdfa0416e0337040bcc859fbcc05d..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauEmulation/cmt/requirements
+++ /dev/null
@@ -1,47 +0,0 @@
-package TrigTauEmulation
-author Quentin Buat <quentin.buat@no.spam.cern.ch>
-author Geert-Jan Besjes <geert-jan.besjes@no.spam.cern.ch>
-
-public 
-
-use AtlasPolicy         AtlasPolicy-*
- 
-use AtlasROOT           AtlasROOT-*             External
-use AsgTools            AsgTools-*              Control/AthToolSupport
-use PATInterfaces       PATInterfaces-*         PhysicsAnalysis/AnalysisCommon
-use PATCore             PATCore-*               PhysicsAnalysis/AnalysisCommon
-
-use TrigDecisionTool    TrigDecisionTool-*      Trigger/TrigAnalysis
-
-use xAODTau             xAODTau-*               Event/xAOD
-use xAODTrigger         xAODTrigger-*           Event/xAOD  
-use xAODTracking        xAODTracking-*          Event/xAOD
-use xAODEventInfo       xAODEventInfo-*         Event/xAOD
-
-private
-use xAODBase            xAODBase-*              Event/xAOD
-use xAODCore            xAODCore-*              Event/xAOD
-use xAODJet             xAODJet-*               Event/xAOD
-end_private
-
-private
-use GaudiInterface      GaudiInterface-*        External       
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AthContainers       AthContainers-*         Control
-end_private
-
-
-## create a component library
-library TrigTauEmulation *.cxx ../Root/*.cxx components/*.cxx
-apply_pattern component_library
-
-#apply_pattern dual_use_library files="*.cxx ../Root/*.cxx"
-
-## install the python modules
-apply_pattern declare_python_modules files="*.py"
-
-## Generate dictionaries
-private
-use AtlasReflex         AtlasReflex-*           External -no-auto-imports
-apply_pattern lcgdict dict=TrigTauEmulation selectionfile=selection.xml headerfiles="../TrigTauEmulation/TrigTauEmulationDict.h"
-end_private
diff --git a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching/cmt/Makefile.RootCore b/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching/cmt/Makefile.RootCore
deleted file mode 100644
index 358e02680eff630b701e15ae4372034fdf0bd217..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,60 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-
-# the name of the package:
-PACKAGE              = TrigTauMatching
-
-# the libraries to link with this one:
-PACKAGE_PRELOAD      = 
-
-# additional compilation flags to pass (not propagated to dependent packages):
-PACKAGE_CXXFLAGS     = 
-
-# additional compilation flags to pass (propagated to dependent packages):
-PACKAGE_OBJFLAGS     = -DASGTOOL_STANDALONE
-
-# additional linker flags to pass (for compiling the library):
-PACKAGE_LDFLAGS      = 
-
-# additional linker flags to pass (for compiling binaries):
-PACKAGE_BINFLAGS     = 
-
-# additional linker flags to pass (propagated to client libraries):
-PACKAGE_LIBFLAGS     = 
-
-# the list of packages we depend on:
-PACKAGE_DEP          = AsgTools PATInterfaces PATCore xAODEventInfo xAODTrigger xAODTau xAODTracking xAODJet TrigDecisionTool
-
-# the list of packages we use if present, but that we can work without :
-PACKAGE_TRYDEP       = 
-
-# list pattern of scripts to link directly into binary path:
-PACKAGE_SCRIPTS      = 
-
-# whether to use pedantic compilation:
-PACKAGE_PEDANTIC     = 1
-
-# whether to turn *off* optimization (set to dict to do it only for
-# dictionaries):
-PACKAGE_NOOPT        = 0
-
-# whether to build no library (needs to be set if no source files are
-# present):
-PACKAGE_NOCC         = 0
-
-# whether we build a reflex dictionary:
-PACKAGE_REFLEX       = 1
-
-# the list of all unit tests that should be called in recursive testing,
-# i.e. in unit tests that call other unit tests
-# for that unit tests need to pass on all machines, and run very fast
-PACKAGE_RECURSIVE_UT = 
-
-
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching/cmt/requirements b/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching/cmt/requirements
deleted file mode 100644
index c57aa5e3206ba40e3d8f3c88715fcd44f7db0769..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TrigTauAnalysis/TrigTauMatching/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package TrigTauMatching
-
-author Henrik Ohman <ohman@cern.ch>
-
-public
-
-use AtlasPolicy		AtlasPolicy-*	
-use AsgTools        	AsgTools-*		Control/AthToolSupport
-use xAODTau        	xAODTau-*		Event/xAOD
-use TrigDecisionTool 	TrigDecisionTool-*	Trigger/TrigAnalysis
-use xAODTrigger		xAODTrigger-*		Event/xAOD
-
-private
-use AtlasROOT		AtlasROOT-*		External
-use TrigConfxAOD	TrigConfxAOD-*		Trigger/TrigConfiguration
-use GaudiInterface	GaudiInterface-*	External
-use AthenaBaseComps	AthenaBaseComps-*	Control
-end_private
-
-apply_pattern dual_use_library files="*.cxx ../Root/*.cxx"
-apply_pattern declare_joboptions files=../share/*.py
diff --git a/Trigger/TrigAnalysis/TriggerMatchingTool/cmt/Makefile.RootCore b/Trigger/TrigAnalysis/TriggerMatchingTool/cmt/Makefile.RootCore
deleted file mode 100644
index 7400da22852ffae7d7ddaa663aa751bafef68d7c..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TriggerMatchingTool/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,60 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-
-# the name of the package:
-PACKAGE              = TriggerMatchingTool
-
-# the libraries to link with this one:
-PACKAGE_PRELOAD      = 
-
-# additional compilation flags to pass (not propagated to dependent packages):
-PACKAGE_CXXFLAGS     = 
-
-# additional compilation flags to pass (propagated to dependent packages):
-PACKAGE_OBJFLAGS     = 
-
-# additional linker flags to pass (for compiling the library):
-PACKAGE_LDFLAGS      = 
-
-# additional linker flags to pass (for compiling binaries):
-PACKAGE_BINFLAGS     = 
-
-# additional linker flags to pass (propagated to client libraries):
-PACKAGE_LIBFLAGS     = 
-
-# the list of packages we depend on:
-PACKAGE_DEP          = AsgTools TrigDecisionTool xAODBase FourMomUtils
-
-# the list of packages we use if present, but that we can work without :
-PACKAGE_TRYDEP       = 
-
-# list pattern of scripts to link directly into binary path:
-PACKAGE_SCRIPTS      = 
-
-# whether to use pedantic compilation:
-PACKAGE_PEDANTIC     = 1
-
-# whether to turn *off* optimization (set to dict to do it only for
-# dictionaries):
-PACKAGE_NOOPT        = 0
-
-# whether to build no library (needs to be set if no source files are
-# present):
-PACKAGE_NOCC         = 0
-
-# whether we build a reflex dictionary:
-PACKAGE_REFLEX       = 1
-
-# the list of all unit tests that should be called in recursive testing,
-# i.e. in unit tests that call other unit tests
-# for that unit tests need to pass on all machines, and run very fast
-PACKAGE_RECURSIVE_UT = 
-
-
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigAnalysis/TriggerMatchingTool/cmt/requirements b/Trigger/TrigAnalysis/TriggerMatchingTool/cmt/requirements
deleted file mode 100644
index 95d0bd73441841966dabc6c8e07c6a06d860f583..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TriggerMatchingTool/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-package TriggerMatchingTool
-author Lukas Heinrich <lukas.heinrich@cern.ch>
-author Will Buttinger <will@cern.ch>
-
-use  AtlasPolicy                AtlasPolicy-*
-
-
-
-public
-use  GaudiInterface             GaudiInterface-*                External
-use AsgTools		AsgTools-*		Control/AthToolSupport
-use TrigDecisionTool	TrigDecisionTool-*	Trigger/TrigAnalysis
-use TrigNavStructure	TrigNavStructure-*	Trigger/TrigEvent
-use xAODBase		xAODBase-*		Event/xAOD
-
-private
-use AtlasBoost          AtlasBoost-*            External
-use FourMomUtils        FourMomUtils-*          Event
-
-use AthAnalysisBaseComps AthAnalysisBaseComps-* Control
-
-#uncomment the next line to use ROOT libraries in your package
-use AtlasROOT AtlasROOT-* External
-
-#use xAODEventInfo xAODEventInfo-* Event/xAOD
-
-end_private
-
-
-apply_pattern dual_use_library files="../Root/*.cxx ../src/*.cxx"
-
-#Reflex Dictionary Generation:
-private
-use AtlasReflex AtlasReflex-* External
-apply_pattern lcgdict dict=TriggerMatchingTool selectionfile=selection.xml headerfiles="../TriggerMatchingTool/TriggerMatchingToolDict.h"
-end_private
-
diff --git a/Trigger/TrigAnalysis/TriggerMenuNtuple/cmt/requirements b/Trigger/TrigAnalysis/TriggerMenuNtuple/cmt/requirements
deleted file mode 100644
index c61e99cdfcec1b842636ba157388b9e47758e822..0000000000000000000000000000000000000000
--- a/Trigger/TrigAnalysis/TriggerMenuNtuple/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-package TriggerMenuNtuple
-
-author Takanori Kono <Takanori.Kohno@cern.ch>
-
-use AtlasPolicy    AtlasPolicy-*
-use GaudiInterface GaudiInterface-* External
-use AtlasROOT      AtlasROOT-*      External
-
-#use EventInfo          EventInfo-*          Event
-use TrigSteeringEvent  TrigSteeringEvent-*  Trigger/TrigEvent
-use TrigMuonEvent      TrigMuonEvent-*      Trigger/TrigEvent
-use TrigCaloEvent      TrigCaloEvent-*      Trigger/TrigEvent
-use TrigInDetEvent     TrigInDetEvent-*     Trigger/TrigEvent
-use TrigParticle       TrigParticle-*       Trigger/TrigEvent
-
-
-# apply_pattern dual_use_library files=*.cxx
-apply_pattern installed_library
-library TriggerMenuNtuple *.cxx
-
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
-
-private
-use AtlasReflex AtlasReflex-* External -no_auto_imports
-apply_pattern lcgdict dict=TriggerMenuNtuple selectionfile=selection.xml \
-        headerfiles="../TriggerMenuNtuple/TriggerMenuNtupleDict.h"
-end_private
diff --git a/Trigger/TrigConfiguration/TrigConfBase/cmt/Makefile.RootCore b/Trigger/TrigConfiguration/TrigConfBase/cmt/Makefile.RootCore
deleted file mode 100644
index 34774c24fac2549820bd66fc9657bcc68c8d6b4a..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfBase/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,54 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-
-# the name of the package:
-PACKAGE          = TrigConfBase
-
-# the libraries to link with this one:
-PACKAGE_PRELOAD  = 
-
-# additional compilation flags to pass (not propagated to dependent packages):
-PACKAGE_CXXFLAGS = 
-
-# additional compilation flags to pass (propagated to dependent packages):
-PACKAGE_OBJFLAGS = 
-
-# additional linker flags to pass (for compiling the library):
-PACKAGE_LDFLAGS  = 
-
-# additional linker flags to pass (for compiling binaries):
-PACKAGE_BINFLAGS = 
-
-# additional linker flags to pass (propagated to client libraries):
-PACKAGE_LIBFLAGS = 
-
-# the list of packages we depend on:
-PACKAGE_DEP      = 
-
-# the list of packages we use if present, but that we can work without :
-PACKAGE_TRYDEP   = 
-
-# list pattern of scripts to link directly into binary path:
-PACKAGE_SCRIPTS  = 
-
-# whether to use pedantic compilation:
-PACKAGE_PEDANTIC = 1
-
-# whether to turn *off* optimization (set to dict to do it only for
-# dictionaries):
-PACKAGE_NOOPT    = 0
-
-# whether to build no library (needs to be set if no source files are
-# present):
-PACKAGE_NOCC     = 0
-
-# whether we build a reflex dictionary:
-PACKAGE_REFLEX   = 0
-
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigConfiguration/TrigConfBase/cmt/requirements b/Trigger/TrigConfiguration/TrigConfBase/cmt/requirements
deleted file mode 100644
index 520aadfc7611113b789c8df728e6bcdd33925a43..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfBase/cmt/requirements
+++ /dev/null
@@ -1,56 +0,0 @@
-#============================================================================
-# $ Id:$
-#============================================================================
-package TrigConfBase
-
-author  Frank Winklmeier
-author  ricardo.abreu@cern.ch
-#============================================================================
-
-#============================================================================
-# Public dependencies
-#============================================================================
-use DetCommonPolicy *
-use AtlasDoxygen * Tools
-
-#============================================================================
-# Private dependencies
-#============================================================================\
-use Boost v* LCG_Interfaces
-
-apply_pattern cmake_add_command command="find_package(Boost COMPONENTS program_options regex)"
-
-#============================================================================
-# Build rules
-#============================================================================
-
-#
-# build shared library from .cxx files in src
-#
-apply_pattern detcommon_shared_generic_library files="*.cxx ../Root/*.cxx"
-
-#
-# ignore patterns from LCG_Policy
-#
-apply_pattern detcommon_ignores
-
-# link header files into InstallArea, and include the corresponding
-# directory in the compiler options
-#
-apply_pattern detcommon_header_installer
-
-#============================================================================
-private
-#============================================================================
-
-#
-# Test applications (not built by default)
-#
-apply_pattern cmake_conditional_target target=trigconf_msgsvc_test type=application
-
-application trigconf_msgsvc_test ../test/trigconf_msgsvc_test.cxx
-macro_append trigconf_msgsvc_test_dependencies TrigConfBase
-macro_remove constituents trigconf_msgsvc_test
-
-# link against boost::regex
-macro_append TrigConfBase_use_linkopts " $(Boost_linkopts_regex) "
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/cmt/fragments/install_pylib_header b/Trigger/TrigConfiguration/TrigConfDBConnection/cmt/fragments/install_pylib_header
deleted file mode 100755
index 0cd8cb1e534af244bfbae04d87c52ea24bc60794..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/cmt/fragments/install_pylib_header
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-${CONSTITUENT} ::
-	@echo "${CONSTITUENT}: installing ${file} in ${install_dir} as ${package}/${target}"
-	@if test ! -d ${install_dir}/${package}; then mkdir -p ${install_dir}/${package}; fi ; \
-	cd ${install_dir}/${package} ; \
-	ln -sf ${file} ${target}; 
-
-${CONSTITUENT}clean ::
-	@if test -d ${install_dir}; then \
-	  cd ${install_dir}; \
-	fi
-
-
-
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/cmt/requirements b/Trigger/TrigConfiguration/TrigConfDBConnection/cmt/requirements
deleted file mode 100755
index bf10a2f59b53545b7b63908ecfbf7509bb1b7b67..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-package TrigConfDBConnection
-author Joerg.Stelzer@cern.ch
-manager Joerg.Stelzer@cern.ch
-
-public
-
-use  AtlasPolicy                AtlasPolicy-*
-
-private
-
-use  Frontier_Client            v*                              LCG_Interfaces
-use  AtlasBoost                 AtlasBoost-*                    External
-use  AtlasPython                AtlasPython-*                   External
-
-make_fragment install_pylib_header
-make_fragment install_pylib -header=install_pylib_header
-
-pattern install_pylib \
-    macro lib_python_path "$(CMTINSTALLAREA)/python" ; \
-    document install_pylib "<package>install_pylib" install_dir=$(lib_python_path) file=$(TrigConfDBConnection_root)/$(tag)/lib<package>.so target=<target>
-
-macro_append TrigConfDBConnection_use_linkopts " $(Boost_linkopts_python) "
-
-#macro hello_shlibflags $(TrigConfDBConnection_shlibflags)
-#library hello *.cxx
-
-library TrigConfDBConnection *.cxx
-
-apply_pattern installed_library
-
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern install_pylib target=libfrontier_client.so
-
-application TriggerFrontierClientTest ../src/exe/TriggerFrontierClientTest.cxx
-macro_append TriggerFrontierClientTest_dependencies TrigConfDBConnection
-
diff --git a/Trigger/TrigConfiguration/TrigConfDBConnection/python/frontier_client.py b/Trigger/TrigConfiguration/TrigConfDBConnection/python/frontier_client.py
index 97f94c21b595b494843bd5a27dd1949f27b67529..648f944770c400e69c00c58f702a5df44e4b1577 100755
--- a/Trigger/TrigConfiguration/TrigConfDBConnection/python/frontier_client.py
+++ b/Trigger/TrigConfiguration/TrigConfDBConnection/python/frontier_client.py
@@ -83,7 +83,10 @@ class Session:
             self.__fieldNames     += [self.__session.assignString()]
             self.__fieldTypeStr     += [self.__session.assignString()]
             if self.__fieldTypeStr[-1].startswith("NUMBER"):
-                self.__fieldType += [int]
+                if ",0" in .__fieldTypeStr[-1]:
+                    self.__fieldType += [int]
+                else:
+                    self.__fieldType += [float]
             elif self.__fieldTypeStr[-1].startswith("VARCHAR"):
                 self.__fieldType += [str]
             else:
diff --git a/Trigger/TrigConfiguration/TrigConfHLTData/cmt/Makefile.RootCore b/Trigger/TrigConfiguration/TrigConfHLTData/cmt/Makefile.RootCore
deleted file mode 100644
index 17bb8f5fae0525c21aa2f191725d32f3e576c80e..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfHLTData/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,54 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-
-# the name of the package:
-PACKAGE          = TrigConfHLTData
-
-# the libraries to link with this one:
-PACKAGE_PRELOAD  = boost_system
-
-# additional compilation flags to pass (not propagated to dependent packages):
-PACKAGE_CXXFLAGS = 
-
-# additional compilation flags to pass (propagated to dependent packages):
-PACKAGE_OBJFLAGS = 
-
-# additional linker flags to pass (for compiling the library):
-PACKAGE_LDFLAGS  = 
-
-# additional linker flags to pass (for compiling binaries):
-PACKAGE_BINFLAGS = 
-
-# additional linker flags to pass (propagated to client libraries):
-PACKAGE_LIBFLAGS = 
-
-# the list of packages we depend on:
-PACKAGE_DEP      = Asg_Boost TrigConfL1Data
-
-# the list of packages we use if present, but that we can work without :
-PACKAGE_TRYDEP   = 
-
-# list pattern of scripts to link directly into binary path:
-PACKAGE_SCRIPTS  = 
-
-# whether to use pedantic compilation:
-PACKAGE_PEDANTIC = 1
-
-# whether to turn *off* optimization (set to dict to do it only for
-# dictionaries):
-PACKAGE_NOOPT    = 0
-
-# whether to build no library (needs to be set if no source files are
-# present):
-PACKAGE_NOCC     = 0
-
-# whether we build a reflex dictionary:
-PACKAGE_REFLEX   = 1
-
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigConfiguration/TrigConfHLTData/cmt/requirements b/Trigger/TrigConfiguration/TrigConfHLTData/cmt/requirements
deleted file mode 100644
index 6e2f95930ab3dec0928a4219841354c1270f16d6..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfHLTData/cmt/requirements
+++ /dev/null
@@ -1,48 +0,0 @@
-package TrigConfHLTData
-
-author  David.Berge@cern.ch, Joerg.Stelzer@cern.ch
-manager Joerg.Stelzer@cern.ch
-
-
-use DetCommonPolicy   *
-use Boost             v*                LCG_Interfaces
-use TrigConfL1Data    TrigConfL1Data-*  Trigger/TrigConfiguration
-#private
-#end_private
-
-
-#============================================================================
-# Build rules
-#============================================================================
-
-#macro_append TrigConfHLTData_extra_shlibflags " $(Boost_linkopts_system) "
-macro_append TrigConfHLTData_use_linkopts " $(Boost_linkopts_system) "
-
-apply_pattern detcommon_shared_generic_library files=../Root/*.cxx
-apply_pattern detcommon_ignores
-apply_pattern detcommon_header_installer
-
-
-#============================================================================
-private
-#============================================================================
-
-#apply_pattern detcommon_lcgdict dict=TrigConfHLTData selectionfile=selection.xml headerfiles="../TrigConfHLTData/TrigConfHLTDataDict.h"
-
-
-macro use_1 "" AthAnalysisBase "AtlasPolicy AtlasPolicy-*"
-macro use_2 "" AthAnalysisBase "AtlasROOT AtlasROOT-* External"
-macro use_3 "" AthAnalysisBase "AtlasBoost AtlasBoost-* External"
-macro use_4 "" AthAnalysisBase "AtlasReflex AtlasReflex-* External"
-macro patt_1 "dummy" AthAnalysisBase "lcgdict"	 
-
-end_private
-use $(use_1)
-private
-use $(use_2)
-use $(use_3)
-use $(use_4)
-apply_pattern $(patt_1) dict=TrigConfHLTData selectionfile=selection.xml headerfiles="../TrigConfHLTData/TrigConfHLTDataDict.h"
-
-#macro_append TrigConfHLTDataDict_use_linkopts "  $(Boost_linkopts_system) "
-
diff --git a/Trigger/TrigConfiguration/TrigConfInterfaces/cmt/Makefile.RootCore b/Trigger/TrigConfiguration/TrigConfInterfaces/cmt/Makefile.RootCore
deleted file mode 100644
index 0d87cd3938df01202bf1715492064fa75be2686c..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfInterfaces/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,54 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-
-# the name of the package:
-PACKAGE          = TrigConfInterfaces
-
-# the libraries to link with this one:
-PACKAGE_PRELOAD  = 
-
-# additional compilation flags to pass (not propagated to dependent packages):
-PACKAGE_CXXFLAGS = 
-
-# additional compilation flags to pass (propagated to dependent packages):
-PACKAGE_OBJFLAGS = 
-
-# additional linker flags to pass (for compiling the library):
-PACKAGE_LDFLAGS  = 
-
-# additional linker flags to pass (for compiling binaries):
-PACKAGE_BINFLAGS = 
-
-# additional linker flags to pass (propagated to client libraries):
-PACKAGE_LIBFLAGS = 
-
-# the list of packages we depend on:
-PACKAGE_DEP      = AsgTools
-
-# the list of packages we use if present, but that we can work without :
-PACKAGE_TRYDEP   = 
-
-# list pattern of scripts to link directly into binary path:
-PACKAGE_SCRIPTS  = 
-
-# whether to use pedantic compilation:
-PACKAGE_PEDANTIC = 1
-
-# whether to turn *off* optimization (set to dict to do it only for
-# dictionaries):
-PACKAGE_NOOPT    = 0
-
-# whether to build no library (needs to be set if no source files are
-# present):
-PACKAGE_NOCC     = 1
-
-# whether we build a reflex dictionary:
-PACKAGE_REFLEX   = 1
-
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigConfiguration/TrigConfInterfaces/cmt/requirements b/Trigger/TrigConfiguration/TrigConfInterfaces/cmt/requirements
deleted file mode 100644
index e4a76e707661bc96e98b1e2c8f02aaf5b565e112..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfInterfaces/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package TrigConfInterfaces
-# $Id: requirements 749937 2016-05-26 15:34:24Z krasznaa $
-
-author Joerg Stelzer        <stelzer@cern.ch>
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-
-public
-
-use AtlasPolicy      AtlasPolicy-*
-use GaudiInterface   GaudiInterface-*   External
-use AsgTools         AsgTools-*         Control/AthToolSupport
-
-private
-
-use AtlasReflex      AtlasReflex-*      External -no_auto_import
-
-apply_pattern lcgdict dict=TrigConfInterfaces selectionfile=selection.xml \
-              headerfiles="../TrigConfInterfaces/TrigConfInterfacesDict.h"
-
-end_private
-
diff --git a/Trigger/TrigConfiguration/TrigConfJobOptData/cmt/requirements b/Trigger/TrigConfiguration/TrigConfJobOptData/cmt/requirements
deleted file mode 100755
index 2b651c6264a2e04c3c9f3aacfc79f63e022d2864..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfJobOptData/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-#============================================================================
-# $ Id:$
-#============================================================================
-package TrigConfJobOptData
-
-author  David.Berge@cern.ch,Joerg.Stelzer@cern.ch
-manager David.Berge@cern.ch,Joerg.Stelzer@cern.ch
-#============================================================================
-
-#============================================================================
-# Public dependencies
-#============================================================================
-use DetCommonPolicy *
-use TrigConfL1Data      TrigConfL1Data-*     Trigger/TrigConfiguration
-
-#============================================================================
-# Build rules
-#============================================================================
-apply_pattern detcommon_shared_library
-apply_pattern detcommon_ignores
-apply_pattern detcommon_header_installer
-
-#============================================================================
-private
-#============================================================================
diff --git a/Trigger/TrigConfiguration/TrigConfL1Data/cmt/Makefile.RootCore b/Trigger/TrigConfiguration/TrigConfL1Data/cmt/Makefile.RootCore
deleted file mode 100644
index 177d54dc65d426d4bc432bea0a84522089068fbd..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfL1Data/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,54 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-
-# the name of the package:
-PACKAGE          = TrigConfL1Data
-
-# the libraries to link with this one:
-PACKAGE_PRELOAD  = 
-
-# additional compilation flags to pass (not propagated to dependent packages):
-PACKAGE_CXXFLAGS = 
-
-# additional compilation flags to pass (propagated to dependent packages):
-PACKAGE_OBJFLAGS = 
-
-# additional linker flags to pass (for compiling the library):
-PACKAGE_LDFLAGS  = 
-
-# additional linker flags to pass (for compiling binaries):
-PACKAGE_BINFLAGS = 
-
-# additional linker flags to pass (propagated to client libraries):
-PACKAGE_LIBFLAGS = 
-
-# the list of packages we depend on:
-PACKAGE_DEP      = Asg_Boost TrigConfBase
-
-# the list of packages we use if present, but that we can work without :
-PACKAGE_TRYDEP   = 
-
-# list pattern of scripts to link directly into binary path:
-PACKAGE_SCRIPTS  = 
-
-# whether to use pedantic compilation:
-PACKAGE_PEDANTIC = 1
-
-# whether to turn *off* optimization (set to dict to do it only for
-# dictionaries):
-PACKAGE_NOOPT    = 0
-
-# whether to build no library (needs to be set if no source files are
-# present):
-PACKAGE_NOCC     = 0
-
-# whether we build a reflex dictionary:
-PACKAGE_REFLEX   = 1
-
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigConfiguration/TrigConfL1Data/cmt/requirements b/Trigger/TrigConfiguration/TrigConfL1Data/cmt/requirements
deleted file mode 100644
index 881c17266865fce7697ca7832cf035d66d531f97..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfL1Data/cmt/requirements
+++ /dev/null
@@ -1,49 +0,0 @@
-package TrigConfL1Data
-
-author  David.Berge@cern.ch,Joerg.Stelzer@cern.ch
-manager Joerg.Stelzer@cern.ch
-
-
-use DetCommonPolicy   *
-use Boost             v*                LCG_Interfaces
-private
-use TrigConfBase      TrigConfBase-*    Trigger/TrigConfiguration
-end_private
-
-#============================================================================
-# Build rules
-#============================================================================
-
-# build shared library
-apply_pattern detcommon_shared_generic_library files=../Root/*.cxx
-
-
-# ignore patterns from LCG_Policy
-apply_pattern detcommon_ignores
-
-
-# link header files into InstallArea, and include the corresponding
-# directory in the compiler options
-apply_pattern detcommon_header_installer
-
-
-private
-
-macro use_1 "" AthAnalysisBase "AtlasPolicy AtlasPolicy-*"
-macro use_2 "" AthAnalysisBase "AtlasROOT AtlasROOT-* External"
-macro use_3 "" AthAnalysisBase "AtlasBoost AtlasBoost-* External"
-macro use_4 "" AthAnalysisBase "AtlasReflex AtlasReflex-* External"
-macro patt_1 "dummy" AthAnalysisBase "lcgdict"	 
-
-
-
-end_private
-use $(use_1)
-private
-use $(use_2)
-use $(use_3)
-use $(use_4)
-apply_pattern $(patt_1) dict=TrigConfL1Data selectionfile=selection.xml headerfiles="../TrigConfL1Data/TrigConfL1DataDict.h"
-
-#disable checkreq
-action checkreq true
\ No newline at end of file
diff --git a/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MuctpiXMLParser.h b/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MuctpiXMLParser.h
index 8432fa85ee3ba1fdab3ade71b5577fae53902dd0..a03d47d29ac368e2ef4d317cb3d86e5e81594a62 100644
--- a/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MuctpiXMLParser.h
+++ b/Trigger/TrigConfiguration/TrigConfMuctpi/TrigConfMuctpi/MuctpiXMLParser.h
@@ -70,7 +70,6 @@ private:
   
   
   // input validation variables
-  bool m_isValidConfigurtion {false};
   int  m_verbosity {0};
   
   // configuration variables
diff --git a/Trigger/TrigConfiguration/TrigConfMuctpi/cmt/requirements b/Trigger/TrigConfiguration/TrigConfMuctpi/cmt/requirements
deleted file mode 100644
index 29d38bcd8288280203b7459dfd6085186c5ff7de..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfMuctpi/cmt/requirements
+++ /dev/null
@@ -1,32 +0,0 @@
-package TrigConfMuctpi
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-author Joerg Stelzer
-
-# Policy package(s):
-use DetCommonPolicy    *
-use TrigConfStorage     TrigConfStorage-*     Trigger/TrigConfiguration
-
-# External package(s):
-use XercesC            *   LCG_Interfaces
-
-private
-use Boost              *   LCG_Interfaces
-end_private
-
-# Compile the library:
-apply_pattern detcommon_shared_library
-apply_pattern detcommon_header_installer
-
-apply_pattern trigconf_application name=ReadWriteMuCTPiGeometry
-macro_append TrigConfReadWriteMuCTPiGeometrylinkopts " $(Boost_linkopts_filesystem) "
-
-
-# Install the LUTs:
-apply_pattern detcommon_link_files kind=XML files="-s=../data *.dtd" \
-                                   prefix=XML/TrigConfMuctpi
-
-apply_pattern detcommon_link_files kind=scripts files="-s=../scripts *.py" \
-                                   prefix=share/bin
-
-apply_pattern detcommon_link_files kind=python_modules files="-s=../python *.py" \
-                                   prefix=python/TrigConfMuctpi
diff --git a/Trigger/TrigConfiguration/TrigConfOffline/cmt/requirements b/Trigger/TrigConfiguration/TrigConfOffline/cmt/requirements
deleted file mode 100644
index 168c0271359630b4f825844f4d86a16208c36fd9..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfOffline/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package TrigConfOffline
-
-author  Joerg.Stelzer@cern.ch
-
-use AtlasPolicy      *
-use AtlasReflex      AtlasReflex-*       External                   -no_auto_imports
-private
-use TrigConfL1Data   TrigConfL1Data-*    Trigger/TrigConfiguration
-use TrigConfHLTData  TrigConfHLTData-*   Trigger/TrigConfiguration
-use TrigConfStorage  TrigConfStorage-*   Trigger/TrigConfiguration
-end_private
-
-
-
-#============================================================================
-# Build rules
-#============================================================================
-
-#============================================================================
-# Install
-#============================================================================
-apply_pattern declare_python_modules files="*.py"
-
-#apply_pattern declare_joboptions files="test*.py"
-
-apply_pattern declare_scripts files="LoadTriggerMenuFromXML.py"
-
-#apply_pattern generic_declare_for_link kind=xmls files="-s=../xml *.xml" prefix="XML/<package>"
-
-
-
-#============================================================================
-# Build trigger configuration dictionaries
-#============================================================================
-
-private
-macro_append TrigConfOffline_extra_shlibflags " $(Boost_linkopts_system) "
-apply_pattern lcgdict dict=TrigConfL1Data  selectionfile=selectionL1Data.xml  headerfiles="../TrigConfOffline/TrigConfL1DataDict.h"
-apply_pattern lcgdict dict=TrigConfHLTData selectionfile=selectionHLTData.xml headerfiles="../TrigConfOffline/TrigConfHLTDataDict.h"
-apply_pattern lcgdict dict=TrigConfStorage selectionfile=selectionStorage.xml headerfiles="../TrigConfOffline/TrigConfStorageDict.h"
-end_private
-
-
diff --git a/Trigger/TrigConfiguration/TrigConfStorage/cmt/requirements b/Trigger/TrigConfiguration/TrigConfStorage/cmt/requirements
deleted file mode 100755
index ba5c0a8e0e46fef3a94bf08e76b4f3397eefa3e7..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfStorage/cmt/requirements
+++ /dev/null
@@ -1,104 +0,0 @@
-#============================================================================
-# $ Id:$
-#============================================================================
-package TrigConfStorage
-
-author  David.Berge@cern.ch,Joerg.Stelzer@cern.ch
-manager David.Berge@cern.ch,Joerg.Stelzer@cern.ch
-#============================================================================
-
-#============================================================================
-# Public dependencies
-#============================================================================
-use DetCommonPolicy *
-
-use COOL v* LCG_Interfaces
-use CORAL v* LCG_Interfaces
-use Reflex v* LCG_Interfaces
-use Boost v* LCG_Interfaces
-
-use TrigConfBase        TrigConfBase-*       Trigger/TrigConfiguration
-use TrigConfL1Data      TrigConfL1Data-*     Trigger/TrigConfiguration
-use TrigConfHLTData     TrigConfHLTData-*    Trigger/TrigConfiguration
-
-private
-use TDAQCPolicyExt      v*                   TDAQCPolicy
-use TrigConfJobOptData  TrigConfJobOptData-* Trigger/TrigConfiguration
-use L1TopoConfig        L1TopoConfig-*       Trigger/TrigT1/L1Topo
-end_private
-
-#============================================================================
-# Build rules
-#============================================================================
-
-#
-# build shared library from .cxx files in src
-#
-apply_pattern detcommon_shared_library
-
-#
-# ignore patterns from LCG_Policy
-#
-apply_pattern detcommon_ignores
-
-# link header files into InstallArea, and include the corresponding
-# directory in the compiler options
-#
-apply_pattern detcommon_header_installer
-
-private
-
-macro_append TrigConfStorage_linkopts " $(Boost_linkopts_regex) \
--lboost_unit_test_framework-$(Boost_compiler_version)-mt-$(Boost_debug)$(Boost_file_version) "
-
-#============================================================================
-# Build applications
-#============================================================================
-
-apply_pattern trigconf_application name=2COOLApp
-apply_pattern trigconf_application name=ConsistencyChecker
-apply_pattern trigconf_application name=ReadWrite
-apply_pattern trigconf_application name=CoolFix
-apply_pattern trigconf_application name=TestTriggerDBCoolMix
-
-#============================================================================
-# Reflection
-#============================================================================
-
-#apply_pattern detcommon_lcgdict dict=TrigConfStorage selectionfile=selection.xml headerfiles="../TrigConfStorage/TrigConfStorageDict.h"
-
-
-#============================================================================
-# Install scripts
-#============================================================================
-apply_pattern detcommon_link_files kind=scripts name=python_scripts files="-s=../scripts *.py" prefix=share/bin
-
-apply_pattern detcommon_link_files kind=python_modules name=python_mods files="-s=../python *.py" prefix=python/TrigConfStorage
-
-#============================================================================
-private
-apply_tag  NEEDS_CORAL_BASE
-
-#needed for COOL
-apply_tag NEEDS_COOL_FACTORY
-
-#============================================================================
-# Unit tests
-#============================================================================
-
-private
-
-#use TestTools      TestTools-*         AtlasTest
-#apply_pattern UnitTest_run unit_test=TrigConfUnitTest_CoolIO extrapatterns=".*"
-
-end_private
-
-#============================================================================
-# Documentation
-#============================================================================
-
-private
-
-macro_append DOXYGEN_INPUT " ../doc"
-
-end_private
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/CMakeLists.txt b/Trigger/TrigConfiguration/TrigConfigSvc/CMakeLists.txt
index 177f22b017642c927dea8a8be7b83962be8b8f27..7d91bdfd0a8eab9ba1f347b93b3e982cc09dbe83 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/CMakeLists.txt
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/CMakeLists.txt
@@ -36,7 +36,7 @@ atlas_add_library( TrigConfigSvcLib
                    src/*.cxx
                    PUBLIC_HEADERS TrigConfigSvc
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${COOL_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaBaseComps GaudiKernel TrigConfHLTData TrigConfL1Data TrigSteeringEvent StoreGateLib SGtests TrigMonitorBaseLib
+                   LINK_LIBRARIES AthenaBaseComps GaudiKernel TrigConfHLTData TrigConfL1Data TrigSteeringEvent StoreGateLib SGtests TrigMonitorBaseLib EventContainers
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${COOL_LIBRARIES} AthenaKernel AthenaPoolUtilities IOVDbDataModel EventInfo PathResolver TrigConfBase TrigConfJobOptData TrigConfStorage L1TopoConfig )
 
 atlas_add_component( TrigConfigSvc
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/cmt/requirements b/Trigger/TrigConfiguration/TrigConfigSvc/cmt/requirements
deleted file mode 100644
index e990be3295eeafe3c3858e860fe5e4bfcf76fb02..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfigSvc/cmt/requirements
+++ /dev/null
@@ -1,63 +0,0 @@
-package TrigConfigSvc
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-manager Joerg.Stelzer@cern.ch
-
-use  AtlasPolicy                AtlasPolicy-*
-
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  StoreGate                  StoreGate-*                     Control
-use  GaudiInterface             GaudiInterface-*                External
-use  AthenaKernel               AthenaKernel-*                  Control
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigConfL1Data             TrigConfL1Data-*                Trigger/TrigConfiguration
-use  TrigConfHLTData            TrigConfHLTData-*               Trigger/TrigConfiguration
-use  TrigConfInterfaces         TrigConfInterfaces-*            Trigger/TrigConfiguration
-
-private
-use  AthenaKernel               AthenaKernel-*                  Control
-use  IOVDbDataModel             IOVDbDataModel-*                Database
-use  AthenaPoolUtilities        AthenaPoolUtilities-*           Database/AthenaPOOL
-use  AtlasBoost                 AtlasBoost-*                    External
-use  AtlasCOOL                  AtlasCOOL-*                     External
-use  AtlasROOT                  AtlasROOT-*                     External
-use  EventInfo                  EventInfo-*                     Event
-use  PathResolver               PathResolver-*                  Tools
-use  TrigConfJobOptData         TrigConfJobOptData-*            Trigger/TrigConfiguration
-use  TrigConfStorage            TrigConfStorage-*               Trigger/TrigConfiguration
-use  TrigConfBase               TrigConfBase-*                  Trigger/TrigConfiguration
-use  TrigMonitorBase            TrigMonitorBase-*               Trigger/TrigMonitoring
-use  L1TopoConfig               L1TopoConfig-*                  Trigger/TrigT1/L1Topo
-end_private
-
-## temporarily, for getting the executable script: checkTrigger.py 
-use AtlasPyROOT	AtlasPyROOT-*	External -no_auto_imports
-apply_pattern declare_scripts files="checkTrigger.py checkTriggerConfig.py -s=$(PyUtils_root)/bin"
-# some handy aliases
-alias checkTrigger     checkTrigger.py
-
-
-apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_joboptions files="*.py"
-
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_xmls
-apply_pattern install_xmls
-
-private
-## reflection has been moved to TrigConfigOffline
-#use     AtlasReflex               AtlasReflex-*          External -no_auto_import
-#apply_pattern lcgdict dict=TrigConfigSvc selectionfile=selection.xml \
-#        headerfiles="../TrigConfigSvc/TrigConfigSvcDict.h"
-
-#application TrigConfigARATest "test/TrigConfigARATest.cxx" 	 
-#macro_append TrigConfigARATest_dependencies TrigConfigSvcLib
-#apply_pattern application_alias TrigConfigARATest
-
-#application MetaDataChainLoad "test/MetaDataChainLoad.cxx"
-#macro_append MetaDataChainLoad_dependencies TrigConfigSvcLib
-
-#macro_append ROOT_linkopts " -lPyROOT"
-
-end_private
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py
index 3cc4abbc13cf5bfc550bad07003a9f1189bdf4d6..a63215f09f86df5af679c45c338fedefb754f7ea 100755
--- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfFrontier.py
@@ -50,7 +50,10 @@ class FrontierCursor2:
         for var,val in bindvars.items():
             if query.find(":%s" % var)<0:
                 raise NameError("variable '%s' is not a bound variable in this query: %s" % (var, query) )
-            query = query.replace(":%s" % var,"%r" % val)
+            if type(val) == long:
+                query = query.replace(":%s" % var,"%s" % val)
+            else:
+                query = query.replace(":%s" % var,"%r" % val)
             log.debug("Resolving bound variable '%s' with %r" % (var,val))
         log.debug("Resolved query: %s" % query)
         return query
@@ -218,7 +221,17 @@ Refresh cache:  %s""" % (self.url, self.refreshFlag)
                 fields = [x for i,x in enumerate(firstRow.split()) if i%2==0]
                 types = [x for i,x in enumerate(firstRow.split()) if i%2==1]
                 Nfields = len(fields)
-                ptypes = [int if t.startswith("NUMBER") else str for t in types]
+                ptypes = []
+                for t in types:
+                    if t.startswith("NUMBER"):
+                        if ",0" in t:
+                            ptypes.append(int)
+                        else:
+                            ptypes.append(float)
+                    else:
+                        ptypes.append(str)
+
+
                 log.debug("Fields      : %r" % fields)
                 log.debug("DB Types    : %r" % types)
                 log.debug("Python Types: %r" % ptypes)
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcUtils.py b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcUtils.py
index 937b68c1ff0ef144b82f4641256bc890c2f79cfa..ae53ebaca9287148ea52b1e45d8c012d837c0372 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcUtils.py
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/python/TrigConfigSvcUtils.py
@@ -610,9 +610,15 @@ def getChainsAndStreams(connection, smk):
 
 def getChains(connection, smk):
     cursor,schemaname = getTriggerDBCursor(connection)
-        
-    output = ['TC.HTC_ID', 'TC.HTC_CHAIN_COUNTER', 'TC.HTC_NAME', 'TC.HTC_L2_OR_EF']
+       
+    isrun2 = isRun2(cursor,schemaname)
+
+    output = []
     
+    if isrun2:
+        output = ['TC.HTC_ID', 'TC.HTC_CHAIN_COUNTER', 'TC.HTC_NAME']
+    else:
+        output = ['TC.HTC_ID', 'TC.HTC_CHAIN_COUNTER', 'TC.HTC_NAME', 'TC.HTC_L2_OR_EF']
     tables = {}
     tables['SM']    = 'SUPER_MASTER_TABLE'
     tables['M2C']   = 'HLT_TM_TO_TC'
@@ -631,8 +637,11 @@ def getChains(connection, smk):
     chainsl2 = {}
     chainsef = {}
     for x in res:
-        if x[3]=='L2': chainsl2[x[1]] = x[2]
-        else: chainsef[x[1]] = x[2]
+        if isrun2:
+            chainsef[x[1]] = x[2]
+        else:
+            if x[3]=='L2': chainsl2[x[1]] = x[2]
+            else: chainsef[x[1]] = x[2]
 
     return chainsl2, chainsef
 
@@ -802,6 +811,72 @@ def getExpressStreamPrescales(connection,psk):
     return name, [(r[1],r[3]) for r in res if r[0]=='express']
 
 
+def getHLTPrescalesRun2(connection,psk):
+    """returns set name, prescale and passthrough 
+    values for a given HLT prescale key 
+    @connection - connection string, e.g. TRIGGERDB
+    @psk - HLT prescale key
+    @return (ps name, [('L2/EF',chainId,prescale,pass-through),...])
+    """
+
+    res = queryHLTPrescaleTableRun2(connection,psk)
+
+    return [(r) for r in res if r[3]!='express']
+
+def getExpressStreamPrescalesRun2(connection,psk):
+    """returns the express stream prescales for a given HLT prescale key
+    @connection - connection string, e.g. TRIGGERDB
+    @psk - HLT prescale key
+    @return (ps name, [chainId,prescale),...])
+    """
+
+    res = queryHLTPrescaleTableRun2(connection,psk)
+
+    return [(r) for r in res if r[3]=='express']
+
+
+def queryHLTPrescaleTableRun2(connection,psk):
+
+    cursor,schemaname = getTriggerDBCursor(connection)
+
+    output = [ "HTC.HTC_NAME", "PS.HPR_CHAIN_COUNTER", "PS.HPR_TYPE", "PS.HPR_CONDITION" , "PS.HPR_VALUE"]
+
+    tables = {}
+    tables['PS'] = 'HLT_PRESCALE' 
+    tables['HTC'] = 'HLT_TRIGGER_CHAIN'
+
+    condition = [ "PS.HPR_PRESCALE_SET_ID = :psk",
+                  "HTC.HTC_CHAIN_COUNTER = PS.HPR_CHAIN_COUNTER"
+                  ]
+
+    bindvars = { "psk": psk }
+
+    res = executeQuery(cursor, output, condition, schemaname, tables, bindvars)
+
+    return res
+
+def getHLTPrescalesFromSMK(connection, smk):
+
+    cursor,schemaname = getTriggerDBCursor(connection)
+
+    tables = {}
+    tables['HPS']   = 'HLT_PRESCALE_SET'
+    tables['TM2PS'] = 'HLT_TM_TO_PS'
+    tables['HTM']  = 'HLT_TRIGGER_MENU'
+    tables['HMT']    = 'HLT_MASTER_TABLE'
+    tables['SM']    = 'SUPER_MASTER_TABLE'
+
+    output = ['TM2PS.HTM2PS_PRESCALE_SET_ID']
+    condition = [ "TM2PS.HTM2PS_TRIGGER_MENU_ID = HTM.HTM_ID",
+                  "HTM.HTM_ID = HMT.HMT_TRIGGER_MENU_ID",
+                  "HMT.HMT_ID = SM.SMT_HLT_MASTER_TABLE_ID",
+                  "SM.SMT_ID = %s" % smk ]
+
+    hltpsk  = executeQuery(cursor, output, condition, schemaname, tables)
+
+    return hltpsk
+
+
 def test():
     log.setLevel(logging.DEBUG)
 
diff --git a/Trigger/TrigConfiguration/TrigConfxAOD/cmt/Makefile.RootCore b/Trigger/TrigConfiguration/TrigConfxAOD/cmt/Makefile.RootCore
deleted file mode 100644
index c1bee3f700b759ab0046b526f7a22b5336d8f992..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfxAOD/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,54 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-
-# the name of the package:
-PACKAGE          = TrigConfxAOD
-
-# the libraries to link with this one:
-PACKAGE_PRELOAD  = 
-
-# additional compilation flags to pass (not propagated to dependent packages):
-PACKAGE_CXXFLAGS = 
-
-# additional compilation flags to pass (propagated to dependent packages):
-PACKAGE_OBJFLAGS = 
-
-# additional linker flags to pass (for compiling the library):
-PACKAGE_LDFLAGS  = 
-
-# additional linker flags to pass (for compiling binaries):
-PACKAGE_BINFLAGS = 
-
-# additional linker flags to pass (propagated to client libraries):
-PACKAGE_LIBFLAGS = 
-
-# the list of packages we depend on:
-PACKAGE_DEP      = AsgTools TrigConfL1Data TrigConfHLTData TrigConfInterfaces xAODTrigger
-
-# the list of packages we use if present, but that we can work without :
-PACKAGE_TRYDEP   = 
-
-# list pattern of scripts to link directly into binary path:
-PACKAGE_SCRIPTS  = scripts/checkTriggerConfig.py
-
-# whether to use pedantic compilation:
-PACKAGE_PEDANTIC = 1
-
-# whether to turn *off* optimization (set to dict to do it only for
-# dictionaries):
-PACKAGE_NOOPT    = 0
-
-# whether to build no library (needs to be set if no source files are
-# present):
-PACKAGE_NOCC     = 0
-
-# whether we build a reflex dictionary:
-PACKAGE_REFLEX   = 1
-
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigConfiguration/TrigConfxAOD/cmt/requirements b/Trigger/TrigConfiguration/TrigConfxAOD/cmt/requirements
deleted file mode 100644
index e4b71f420a04d756593d610585e87f85f4cee64d..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigConfxAOD/cmt/requirements
+++ /dev/null
@@ -1,35 +0,0 @@
-package TrigConfxAOD
-# $Id: requirements 612011 2014-08-15 13:43:57Z krasznaa $
-
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-
-# Basic Gaudi/Athena package(s):
-use AtlasPolicy         AtlasPolicy-*
-
-# Infrastructure package(s):
-use AsgTools                AsgTools-*                Control/AthToolSupport
-
-# Trigger configuration package(s):
-use TrigConfL1Data          TrigConfL1Data-*          Trigger/TrigConfiguration
-use TrigConfHLTData         TrigConfHLTData-*         Trigger/TrigConfiguration
-use TrigConfInterfaces      TrigConfInterfaces-*      Trigger/TrigConfiguration
-
-# xAOD package(s):
-use xAODTrigger             xAODTrigger-*             Event/xAOD
-
-private
-
-# Basic Gaudi/Athena package(s):
-use GaudiInterface          GaudiInterface-*          External
-use AthenaBaseComps         AthenaBaseComps-*         Control
-use AthenaKernel            AthenaKernel-*            Control
-use StoreGate               StoreGate-*               Control
-
-end_private
-
-# Build the library:
-library TrigConfxAOD *.cxx ../Root/*.cxx components/*.cxx
-apply_pattern component_library
-
-# Install the additional files from the package:
-apply_pattern declare_joboptions files="*.py"
diff --git a/Trigger/TrigConfiguration/TrigDbHltUpload/cmt/requirements b/Trigger/TrigConfiguration/TrigDbHltUpload/cmt/requirements
deleted file mode 100644
index 52671cf2186a1a658dd4d2b6899584e416174d63..0000000000000000000000000000000000000000
--- a/Trigger/TrigConfiguration/TrigDbHltUpload/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-#============================================================================
-# $ Id:$
-#============================================================================
-package TrigDbHltUpload
-
-author  Joerg.Stelzer@cern.ch
-manager Joerg.Stelzer@cern.ch
-#============================================================================
-
-#============================================================================
-# Public dependencies
-#============================================================================
-use DetCommonPolicy *
-use oracle v* LCG_Interfaces
-
-#set ORACLE_HOME $(oracle_home)
-
-#============================================================================
-# ignore patterns from LCG_Policy
-#============================================================================
-apply_pattern detcommon_ignores
-
-#============================================================================
-# Install stuff
-#============================================================================
-apply_pattern detcommon_link_files kind=python name=python_modules files="\
-	-s=../python *.py" prefix=python/TrigDbHltUpload
-
-apply_pattern detcommon_link_files kind=scripts name=python_scripts files="\
-	-s=../share ConvertHLTSetup_txt2xml.py prepareOnlineTriggerConfig.py oldPrepareOnlineTriggerConfig.py menumerge.py *.sh" prefix=share/bin
-
-apply_pattern detcommon_link_files kind=XML name=XML files="\
-	-s=../XML *.dtd" prefix=XML/TrigDbHltUpload
-
diff --git a/Trigger/TrigCost/TrigCostD3PD/cmt/Makefile.RootCore b/Trigger/TrigCost/TrigCostD3PD/cmt/Makefile.RootCore
deleted file mode 100644
index b6cd2cad5be680871066aaeed9bc74a1a5aebee6..0000000000000000000000000000000000000000
--- a/Trigger/TrigCost/TrigCostD3PD/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,14 +0,0 @@
-# $Id: Helpers.py 530000 2012-12-11 15:45:53Z krasznaa $
-
-PACKAGE          = TrigCostD3PD
-PACKAGE_PRELOAD  = Tree
-# Add the option -DACTIVATE_BRANCHES if your analysis framework
-# disables all branches by default.
-# Remove the COLLECT_D3PD_READING_STATISTICS option to gain a bit
-# of performance...
-#PACKAGE_CXXFLAGS = -DCOLLECT_D3PD_READING_STATISTICS
-PACKAGE_LDFLAGS  =
-PACKAGE_DEP      =
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigCost/TrigCostD3PD/cmt/requirements b/Trigger/TrigCost/TrigCostD3PD/cmt/requirements
deleted file mode 100644
index ec3fc01f89f4ccce9eab40295d41ecd86abc7a04..0000000000000000000000000000000000000000
--- a/Trigger/TrigCost/TrigCostD3PD/cmt/requirements
+++ /dev/null
@@ -1,12 +0,0 @@
-package TrigCostD3PD
-
-use AtlasPolicy  AtlasPolicy-*
-use AtlasROOT    AtlasROOT-*    External
-
-library TrigCostD3PD ../Root/*.cxx
-apply_pattern installed_library
- 
-apply_pattern have_root_headers root_headers="*.h ../Root/LinkDef.h" headers_lib=TrigCostD3PD
-
-
-
diff --git a/Trigger/TrigCost/TrigCostPython/cmt/requirements b/Trigger/TrigCost/TrigCostPython/cmt/requirements
deleted file mode 100644
index 88deb684c9ea75d2e88672b345375c34bf7bbc3b..0000000000000000000000000000000000000000
--- a/Trigger/TrigCost/TrigCostPython/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package TrigCostPython
-author Rustem Ospanov 
-author Elliot Lipeles
-author Tae Min Hong
-
-use AtlasPolicy         AtlasPolicy-*
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
-
-private
-
-apply_pattern declare_xmls
-apply_pattern install_xmls
-
-apply_pattern generic_declare_for_link kind=data files="-s=../data *.html *.js" prefix=share/TrigCostPython
-
-apply_pattern generic_declare_for_link kind=binaries files="-s=../macros *.py getfile.sh" prefix=share/bin
-#apply_pattern generic_declare_for_link kind=binaries files="-s=../macros getfile.sh" prefix=share/bin
-
-#macro_append TrigMonCosts_use_linkopts " -lprofiler"
-#macro_append TrigMonCosts_use_linkopts " -ltcmalloc"
-
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-end_private
diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/cmt/Makefile.RootCore b/Trigger/TrigCost/TrigCostRootAnalysis/cmt/Makefile.RootCore
deleted file mode 100644
index 7a38e9bc7b89d709467996f3108ff470dd00eaa1..0000000000000000000000000000000000000000
--- a/Trigger/TrigCost/TrigCostRootAnalysis/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,23 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = TrigCostRootAnalysis
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = `root-config --libs` -lXMLIO -lXMLParser
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = TrigCostD3PD TrigRootAnalysis
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_PEDANTIC = 1
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 0
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigCost/TrigCostRootAnalysis/cmt/requirements b/Trigger/TrigCost/TrigCostRootAnalysis/cmt/requirements
deleted file mode 100644
index 8e208b69f13a1c98e6d7d10307ed6f4513dc0aa8..0000000000000000000000000000000000000000
--- a/Trigger/TrigCost/TrigCostRootAnalysis/cmt/requirements
+++ /dev/null
@@ -1,55 +0,0 @@
-package TrigCostRootAnalysis
-
-public
-
-use AtlasPolicy  AtlasPolicy-*
-use AtlasROOT    AtlasROOT-*    External
-
-use TrigCostD3PD     TrigCostD3PD-*     Trigger/TrigCost
-
-private
-
-use TrigRootAnalysis TrigRootAnalysis-* Trigger/TrigAnalysis
-use  PathResolver    PathResolver-*     Tools
-
-####################################### end basics
-
-############## compile
-
-# Suggested - but I have problems
-#apply_pattern dual_use_library files="../Root/*.cxx"
-
-# Better luck with this method:
-library TrigCostRootAnalysisLib "../Root/*.cxx"
-apply_pattern named_installed_library library=TrigCostRootAnalysisLib
-
-############## access to data
-
-apply_pattern declare_runtime extras = "../data/*.xml"
-
-############## Link
-# (including ROOT XML library, the apply_tag options from External/AtlasROOT did not work here)
-# (Manually specify other packages to link against)
-
-# Inform cmake of the required ROOT and xml components (invisible to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS Graf Gpad MathCore XMLIO XMLParser)"
-apply_pattern cmake_add_command command="find_package(xml)"
-
-private
-macro_append TrigCostRootAnalysisLib_cppflags " `xml2-config --cflags`"
-## xml libraries
-macro_append TrigCostRootAnalysisLib_use_linkopts " -L$(ROOTSYS)/lib \
-        -lCore -lTree -lpthread -lMathCore -lHist \
-        -lMathMore -lMinuit -lMinuit2 -lMatrix -lPhysics -lHistPainter -lHist -lRint \
-        -lGraf -lGraf3d -lGpad -lHtml -lPostscript -lGui -lGX11TTF -lGX11 \
-        -lXMLIO -lXMLParser \
-        -lTrigRootAnalysis -lTrigCostD3PD"
-macro_append TrigCostRootAnalysisLib_use_linkopts " -lxml2" slc4-gcc34 " /usr/lib/libxml2.so.2"
-end_private
-
-############# exec
-
-application RunTrigCostD3PD ../util/RunTrigCostD3PD.cxx
-application TrigCostD3PD_UserSkeleton ../util/TrigCostD3PD_UserSkeleton.cxx
-macro_append RunTrigCostD3PD_dependencies " TrigCostRootAnalysisLib"
-macro_append TrigCostD3PD_UserSkeleton_dependencies " TrigCostRootAnalysisLib"
diff --git a/Trigger/TrigDataAccess/TrigDataAccessMonitoring/cmt/requirements b/Trigger/TrigDataAccess/TrigDataAccessMonitoring/cmt/requirements
deleted file mode 100644
index 8dd0e9eed800edc3e1c9e67ff8bdfa7338ecffb9..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigDataAccessMonitoring/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package TrigDataAccessMonitoring
-
-author Werner Wiedenmann <Werner.Wiedenmann@cern.ch>
-
-use AtlasPolicy               AtlasPolicy-*
-use DataModel 		      DataModel-*  		  Control
-use CLIDSvc                   CLIDSvc-*                   Control
-use DataCollection            DataCollection-*            External
-use GaudiInterface            GaudiInterface-*            External
-use ByteStreamCnvSvcBase      ByteStreamCnvSvcBase-*      Event
-use ByteStreamData            ByteStreamData-*            Event
-
-private
-use AtlasROOT                 AtlasROOT-*                 External
-use StoreGate                 StoreGate-*                 Control
-end_private
-
-apply_pattern dual_use_library files="*.cxx"
-
-apply_pattern declare_joboptions files="*.py"
-
-private 
-
-use TestTools           TestTools-*             AtlasTest
-apply_pattern UnitTest_run unit_test=Methods extrapatterns=".*"
diff --git a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/cmt/requirements b/Trigger/TrigDataAccess/TrigROBDataProviderSvc/cmt/requirements
deleted file mode 100644
index 303280c95257cc6fc0d0b4654910dd7abd1936b7..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigROBDataProviderSvc/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package TrigROBDataProviderSvc
-
-author W. Wiedenmann  <Werner.Wiedenmann@cern.ch>
-
-use AtlasPolicy               AtlasPolicy-*
-use GaudiInterface            GaudiInterface-*            External
-use ByteStreamData            ByteStreamData-*            Event
-use DataCollection            DataCollection-*            External
-
-private
-use AtlasROOT                 AtlasROOT-*                 External
-use CxxUtils                  CxxUtils-*                  Control
-use StoreGate                 StoreGate-*                 Control
-use TrigMonitorBase           TrigMonitorBase-*           Trigger/TrigMonitoring
-use ByteStreamCnvSvcBase      ByteStreamCnvSvcBase-*      Event
-use TrigDataAccessMonitoring  TrigDataAccessMonitoring-*  Trigger/TrigDataAccess
-end_private
-
-apply_pattern dual_use_library files="*.cxx"
-
-apply_pattern declare_joboptions files="*.py"
-
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_scripts files="../python/scripts/*.py"
diff --git a/Trigger/TrigDataAccess/TrigSerializeCnvSvc/cmt/requirements b/Trigger/TrigDataAccess/TrigSerializeCnvSvc/cmt/requirements
deleted file mode 100644
index d4284842ebfb027e2588e0622fc956b72fb4fa05..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeCnvSvc/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package TrigSerializeCnvSvc
-
-use AtlasPolicy    AtlasPolicy-*
-
-use GaudiInterface       GaudiInterface-*       External
-use AthenaBaseComps      AthenaBaseComps-*      Control 
-use SGTools              SGTools-*              Control
-use StoreGate            StoreGate-*            Control
-use  AthContainers              AthContainers-*                 Control
-
-apply_pattern dual_use_library files=*.cxx
-
-private
-use AtlasROOT            AtlasROOT-*            External
-use AtlasPOOL            AtlasPOOL-*            External
-use AthenaKernel         AthenaKernel-*         Control
-use DataModelRoot        DataModelRoot-*        Control
-use PersistentDataModel  PersistentDataModel-*  Database
-
-use TrigSerializeResult  TrigSerializeResult-*  Trigger/TrigDataAccess
-use TrigSerializeTP      TrigSerializeTP-*      Trigger/TrigDataAccess
-
-end_private
-
diff --git a/Trigger/TrigDataAccess/TrigSerializeResult/cmt/requirements b/Trigger/TrigDataAccess/TrigSerializeResult/cmt/requirements
deleted file mode 100755
index d9cf576c50ebdbb47537c9f6df44206295891bba..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeResult/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-package TrigSerializeResult
-
-author Comune Gianluca <gianluca.comune@cern.ch>
-author Simon George <S.George@rhul.ac.uk>
-author Jiri Masik <Jiri.Masik@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*             External
-use CLIDSvc 		CLIDSvc-* 		     Control
-
-apply_pattern dual_use_library files="*.cxx"
-apply_pattern declare_runtime files="bs-streamerinfos*.root"
-
-private
-
-use AthenaKernel        AthenaKernel-*               Control
-use AthenaBaseComps     AthenaBaseComps-*            Control
-use AtlasReflex	        AtlasReflex-*	             External 
-use DataModelRoot	DataModelRoot-*              Control
-use AtlasROOT	        AtlasROOT-*	             External 
-use PathResolver        PathResolver-*               Tools
-
-# Setup the required ROOT components for cmake
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS RIO)"
-
-## Generate dictionary
-apply_pattern lcgdict dict=TrigSerializeResult \
-        selectionfile="selection.xml" \
-        headerfiles="../TrigSerializeResult/TrigSerializeResultDict.h"
-
-## Uncomment the following to compile/run StringSerializer_test
-use TestTools      TestTools-*         AtlasTest
-#apply_pattern UnitTest_run unit_test=StringSerializer extrapatterns=".*"
-apply_pattern UnitTest_run unit_test=remap extrapatterns=".*"
diff --git a/Trigger/TrigDataAccess/TrigSerializeTP/cmt/requirements b/Trigger/TrigDataAccess/TrigSerializeTP/cmt/requirements
deleted file mode 100644
index 29c0890df055616854a90d9c659a1aa3cbda29bf..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeTP/cmt/requirements
+++ /dev/null
@@ -1,13 +0,0 @@
-package TrigSerializeTP
-
-use AtlasPolicy          AtlasPolicy-*    
-use GaudiInterface       GaudiInterface-*       External   
-use AthenaBaseComps      AthenaBaseComps-*      Control
-use AthenaKernel         AthenaKernel-*         Control
-
-apply_pattern dual_use_library files=*.cxx
-
-private
-use CxxUtils         CxxUtils-*         Control
-use AtlasROOT        AtlasROOT-*        External
-end_private
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/CMakeLists.txt b/Trigger/TrigDataAccess/TrigSerializeUtils/CMakeLists.txt
deleted file mode 100644
index 5dcc749cfe44b3b7afe041570519291cb23c3c4b..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-################################################################################
-# Package: TrigSerializeUtils
-################################################################################
-
-# Declare the package name:
-atlas_subdir( TrigSerializeUtils )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          TestPolicy )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExampleClassSerCnv.cxx b/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExampleClassSerCnv.cxx
deleted file mode 100755
index a1300eb9e243e83a8512fa4de4f5b6f684adf2c5..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExampleClassSerCnv.cxx
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file ${name}SerCnv.cxx
- * @brief Generated implementation file which includes header files needed by ${name}SerCnv
- * @author Jiri Masik <Jiri.Masik@cern.ch>
- * a copy of poolcnv by RD Schaffer <R.D.Schaffer@cern.ch>
- * $Id: ExampleClassSerCnv.cxx,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
- */
-
-#include "${name}SerCnv.h"
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExampleClassSerCnv.h b/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExampleClassSerCnv.h
deleted file mode 100755
index 3407aae380d3085af6f0ed214fc34a68c40892bf..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExampleClassSerCnv.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/** 
- * @file ${name}SerCnv.h
- * @brief Generated header file which defines a typedef for templated converter class
- * @author Jiri Masik <Jiri.Masik@cern.ch>
- * a copy of poolcnv by RD Schaffer <R.D. Schaffer@cern.ch>
- * $Id: ExampleClassSerCnv.h,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
- */
-
-#ifndef ${name}SerCnv_H
-#define ${name}SerCnv_H
-
-#include "TrigSerializeCnvSvc/TrigSerializeConverter.h"
-#include "${package}/${name}.h"
-
-typedef TrigSerializeConverter<${type}> ${libtag}${name}SerCnv;
-
-#endif
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_entries.cxx b/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_entries.cxx
deleted file mode 100755
index d78116a066937f6c13d151c7e9e01258f19cedfd..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_entries.cxx
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file ExamplePackageSerCnv_entries.cxx
- * @brief Declares component instantiation factories for an example converter 
- * @author Jiri Masik <Jiri.Masik@cern.ch>
- * a copy of poolcnv by RD Schaffer <R.D.Schaffer@cern.ch>
- * $Id: ExamplePackageSerCnv_entries.cxx,v 1.2 2008-06-22 11:51:14 masik Exp $
- */
-
-#include "${libtag}${package}SerCnv_entries.h"
-
-DECLARE_FACTORY_ENTRIES(${libtag}${package}SerCnv) {
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_entries.h b/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_entries.h
deleted file mode 100755
index 9884fd08c3bdc25ce456cea3adf1d187966c837c..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_entries.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file ExamplePackageCnv_entries.h
- * @brief Includes header files needed by ExamplePackageCnv_entries.cxx
- * @author Jiri Masik <Jiri.Masik@cern.ch>
- * a copy of poolcnv by @author RD Schaffer <R.D.Schaffer@cern.ch>
- * $Id: ExamplePackageSerCnv_entries.h,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
- */
-
-#include "GaudiKernel/DeclareFactoryEntries.h"
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_entries_element.cxx b/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_entries_element.cxx
deleted file mode 100755
index 5159d7e8b070fe018b4216ced268764ff0bb5375..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_entries_element.cxx
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file ExamplePackageSerCnv_entries_element.cxx
- * @brief Declares component instantiation factories for a converter
- * @author Jiri Masik <Jiri.Masik@cern.ch>
- * a copy of poolcnv by RD Schaffer <R.D.Schaffer@cern.ch>
- * $Id: ExamplePackageSerCnv_entries_element.cxx,v 1.1 2008-06-12 23:32:27 masik Exp $
- */
-
-   DECLARE_CONVERTER(${name}SerCnv);
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_load.cxx b/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_load.cxx
deleted file mode 100755
index 7d8bebec3ac59d08bf955813dfabd86ca04e0433..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/ExamplePackageSerCnv_load.cxx
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
- * @file ExamplePackageCnv_load.cxx
- * @brief Loads component instantiation factories for an example SerCnv converter
- * @author Jiri Masik <Jiri.Masik@cern.ch>
- * a copy of poolcnv by @author RD Schaffer <R.D.Schaffer@cern.ch>
- * $Id: ExamplePackageSerCnv_load.cxx,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
- */
-
-#include "GaudiKernel/LoadFactoryEntries.h"
-
-LOAD_FACTORY_ENTRIES(${package}SerCnv)
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/sercnv.mk b/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/sercnv.mk
deleted file mode 100755
index 5f36d0579df88ecf7aee2367511170232cbfe6a4..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/sercnv.mk
+++ /dev/null
@@ -1,74 +0,0 @@
-##
-## @file sercnvcnv.mk
-##
-## @brief This makefile fragment generates C++ code for Trigger
-## converters for serialization 
-##
-##
-## @author Jiri Masik <Jiri.Masik@cern.ch>
-## a copy of poolcnv by RD Schaffer <R.D.Schaffer@cern.ch>
-##
-## $Id: sercnv.mk,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
-##
-
-../sercnv${libtag}/${CONSTITUENT}SerCnv.stamp :: ../sercnv${libtag}/${libtag}${NAME}SerCnv.h.stamp
-	@touch ../sercnv${libtag}/${CONSTITUENT}SerCnv.stamp
-
-# Setup a reset stamp to trigger a cleanup each time a new header file
-# is added
-../sercnv${libtag}/${CONSTITUENT}SerCnvReset.stamp :: $(bin)${libtag}${NAME}SerCnv.stamp  $(sercnvcnv_reset_stamp)
-	@echo "----- RESET sercnv converter generation -----"
-	@/bin/rm -rf ../sercnv${libtag}
-	@if test ! -d ../sercnv${libtag} ; then mkdir -p ../sercnv${libtag}; fi
-	@touch ../sercnv${libtag}/${CONSTITUENT}SerCnvReset.stamp
-
-# Stamp per input .h file - used for reset
-$(bin)${libtag}${NAME}SerCnv.stamp :: dirs
-	@if test ! -f $(bin)${libtag}${NAME}SerCnv.stamp ; then touch $(bin)${libtag}${NAME}SerCnv.stamp; fi
-
-
-# For each file, add converter and a line in _entries.cxx
-../sercnv${libtag}/${libtag}${NAME}SerCnv.h.stamp :: ../sercnv${libtag}/${CONSTITUENT}SerCnvBegin.stamp  
-	@echo "----- Create Sercnv converter for ${NAME} --------"
-	@echo "----- 		        fullname ${FULLNAME} --------"
-	@echo "----- 		     constituent ${CONSTITUENT} --------"
-	@echo "----- types: ${types_with_namespace_${libtag}} --------"
-	@if test ! -f ${FULLNAME}; then echo "===> ERROR: file ${FULLNAME} does not exist"; \
-	exit 1; fi
-	@if test ! -d ../sercnv${libtag} ; then mkdir -p ../sercnv${libtag}; fi
-	@PKG=`dirname ${FULLNAME}`; PKG=`basename $${PKG}`; \
-        NAMESPACE="" ; \
-	if test ! -z "${types_with_namespace_${libtag}}" ; then \
-	    for class_name in ${types_with_namespace_${libtag}} ; do  \
-		TYPE=`echo $${class_name} | sed 's/^[a-zA-Z_0-9]*:://'` ; \
-	        if test $${TYPE} = ${NAME} ; then \
-	            NAMESPACE=`echo $${class_name} | sed 's/::[a-zA-Z_0-9]*$$/::/'` ; \
-	        fi ; \
-	    done ; \
-	fi ; \
-	if test ! -z "${mult_chan_types_}" ; then \
-	    for class_name in ${mult_chan_types_} ; do  \
-		TYPE=`echo $${class_name} | sed 's/^[a-zA-Z_0-9]*:://'` ; \
-	        if test $${TYPE} = ${NAME} ; then \
-	            MULTCHANTYPE="true" ; \
-	        fi ; \
-	    done ; \
-	fi ; \
-	if test ! -z "$${NAMESPACE}" ; then echo "Using namespace $${NAMESPACE}" ; fi ; \
-	if test ! -z "$${MULTCHANTYPE}" ; then echo "----- Generating CondMultChanCollection converter for ${NAME} --------" ; fi ; \
-	if test ! -f ../src/${NAME}SerCnv.cxx ;  then \
-	    if test ! -z "$${MULTCHANTYPE}" ; then \
-	        $(cmtexe) expand model "<ExampleMultChanClassSerCnv.h type=$${NAMESPACE}${NAME} name=${libtag}${NAME} package=$${PKG} />" >| ../sercnv${libtag}/${libtag}${NAME}SerCnv.h ; \
-	    else \
-	        $(cmtexe) expand model "<ExampleClassSerCnv.h type=$${NAMESPACE}${NAME} libtag=${libtag} name=${NAME} package=$${PKG} />" >| ../sercnv${libtag}/${libtag}${NAME}SerCnv.h ; \
-	    fi ; \
-	fi ; \
-	#$(cmtexe) expand model "<ExampleItemList_joboptions.py item=$${NAMESPACE}${NAME} />" >> ../sercnv${libtag}/${package}ItemList_joboptions.py
-	@if test ! -f ../src/${libtag}${NAME}SerCnv.cxx ;  then $(cmtexe) expand model '<ExampleClassSerCnv.cxx name=${libtag}${NAME} />' >| ../sercnv${libtag}/${libtag}${NAME}SerCnv.cxx ; fi 
-	@$(cmtexe) expand model '<ExamplePackageSerCnv_entries_element.cxx libtag=${libtag} name=${libtag}${NAME} />' >> ../sercnv${libtag}/${libtag}${package}SerCnv_entries.cxx 
-	@echo "#include \"${libtag}${NAME}SerCnv.h\"" >> ../sercnv${libtag}/${libtag}${package}SerCnv_entries.h
-	@echo 'DECLARE_CONVERTER_FACTORY(${libtag}${NAME}SerCnv)' >> ../sercnv${libtag}/${libtag}${package}SerCnv_entries.h
-	@echo "----- OK for ${NAME} converter --------"
-	@touch ../sercnv${libtag}/${libtag}${NAME}SerCnv.h.stamp
-
-
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/sercnv_header.mk b/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/sercnv_header.mk
deleted file mode 100755
index 44a3f6bf3f3158fdb39dbc128a335bc846d7a3fc..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/sercnv_header.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-##
-## @file sercnvcnv_header.mk
-##
-## @brief This makefile fragment generates C++ code for trigger converters 
-##     for serialization
-##
-## There are three files: sercnv_header.mk, sercnv_trailer.mk, and
-## sercnv.mk. The header does the global initialization, e.g. the
-## creation of the first part of files. The sercnv.mk processes each
-## file (${NAME}) listed in the document statement in the
-## requirements file. The trailer defines the clean target. 
-##
-## @author Jiri Masik <Jiri.Masik@cern.ch>
-## a copy of poolcnv @author RD Schaffer <R.D.Schaffer@cern.ch>
-##
-## $Id: sercnv_header.mk,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
-##
-
-#template_dir = ${ATLASPOOLROOT}/cmt/templates
-
-${CONSTITUENT} :: ../sercnv${libtag}/${CONSTITUENT}SerCnvEnd.stamp
-
-#Begin: create dir and first part of required files
-../sercnv${libtag}/${CONSTITUENT}SerCnvBegin.stamp ::  ../sercnv${libtag}/${CONSTITUENT}SerCnvReset.stamp
-	@echo "----- BEGIN sercnv converter generation -----"
-	@if test ! -d ../sercnv${libtag} ; then mkdir -p ../sercnv${libtag}; fi
-	@$(cmtexe) expand model '<ExamplePackageSerCnv_entries.h/>' >| ../sercnv${libtag}/${libtag}${package}SerCnv_entries.h
-	@$(cmtexe) expand model '<ExamplePackageSerCnv_entries.cxx libtag=${libtag} package=${package} />' >| ../sercnv${libtag}/${libtag}${package}SerCnv_entries.cxx
-	@$(cmtexe) expand model '<ExamplePackageSerCnv_load.cxx package=${package} />' >| ../sercnv${libtag}/${libtag}${package}SerCnv_load.cxx
-	@if test ! -f ../share/${libtag}${package}_joboptions.py ;  then \
-	    echo '# Just a dummy joboption - cnvs are auto-loaded' >> ../sercnv${libtag}/${libtag}${package}_joboptions.py ; \
-	fi ; 
-	@touch ../sercnv${libtag}/${CONSTITUENT}SerCnvBegin.stamp
-
-
-#End: create final part of required files
-../sercnv${libtag}/${CONSTITUENT}SerCnvEnd.stamp :: ../sercnv${libtag}/${CONSTITUENT}SerCnv.stamp 
-	@echo "----- END sercnv converter generation -----"
-	@echo '}' >> ../sercnv${libtag}/${libtag}${package}SerCnv_entries.cxx
-	@touch ../sercnv${libtag}/${CONSTITUENT}SerCnvEnd.stamp
-
-
-#=============================================
-# begin
-# nameSerCnv
-# const
-# End
-#=============================================
-
-
-#=============================================
-# P_SerCnv_entries.h : H F F ...
-#
-# P_SerCnv_entries.cxx : H F F ... T
-#
-# P_SerCnv_load.cxx : H
-#
-# N_SerCnv.h : F
-# N_SerCnv.cxx : F
-#=============================================
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/sercnv_trailer.mk b/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/sercnv_trailer.mk
deleted file mode 100755
index 8a2057c37959ae1b48608af1134d10046e14aed9..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/fragments/sercnv_trailer.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-##
-## @file poolcnv.mk
-##
-## @brief This makefile fragment generates C++ code for AthenaPOOL
-## converters and POOL IO handlers needed for element links
-##
-## See complete documentation in poolcnv_header.mk
-## @author Jiri Masik <Jiri.Masik@cern.ch>
-## a copy of poolcnv by @author RD Schaffer <R.D.Schaffer@cern.ch>
-##
-## $Id: sercnv_trailer.mk,v 1.1.1.1 2008-05-22 21:33:31 masik Exp $
-##
-
-${CONSTITUENT}clean ::
-	/bin/rm -rf ../sercnv${libtag}
-
-
diff --git a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/requirements b/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/requirements
deleted file mode 100755
index c982b125b9c6dd5eca5dfa29e71376bca56915d1..0000000000000000000000000000000000000000
--- a/Trigger/TrigDataAccess/TrigSerializeUtils/cmt/requirements
+++ /dev/null
@@ -1,189 +0,0 @@
-package TrigSerializeUtils
-
-author Jiri Masik <Jiri.Masik@cern.ch>
-
-# based on AthenaPoolUtilities from 
-#     author RD Schaffer <R.D.Schaffer@cern.ch>
-#     author Christian Arnault <arnault@lal.in2p3.fr>
-#     author Kyle Cranmer <cranmer@cern.ch>
-#     author Kristo Karr <Kristo.Karr@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-#use CLIDSvc               CLIDSvc-*          Control
-#use DataModel             DataModel-*        Control
-
-#apply_tag NEEDS_CORAL_BASE
-
-#-----------------------------------------------------------------------------
-#
-# Pattern for creating pool converters
-#
-# apply_pattern sercnv [typesWithNamespace="..."] [multChanTypes="..."] files="..." \
-#                       [extraFilesToCompile="..."]
-#
-#  where:
-#
-#   typesWithNamespace     optional list of types, used to specify the namespace.
-#		           For example:  "NS1::MyType1 NS1::MyType2 NS2::MyType3"
-#                          Needed for those files where the file name is the
-#                          types w/o namespace.
-#
-#   multChanTypes          optional list of types which are CondMultChanCollections 
-#
-#   files                  gives the list of header files with the declarations
-#		           of the data objects, i.e. the ones with the CLASS_DEF
-#		           macro 
-#
-#   extraFilesToCompile    gives an optional list of extra files to compile into 
-#                          the converter library, e.g. 
-#                          extraFilesToCompile="-s=../src/myExtraDir *.cxx"
-#
-#     CONVENTION: there must be ONLY ONE class defined in each header file.
-#
-#  > With this pattern, 
-#
-#     + directory ../pool/src
-#     + a library lib<package>SerCnv.so 
-#
-#     will be created for the package
-#
-#  > Two constituents <package>SerCnvGen and  <package>SerCnv are generated 
-#    by this pattern
-#
-#  > Two macros can also be used to specify additional options for the serCnv
-#    generator:
-#
-#     $(sercnv_options)             global options
-#     $(<package>_sercnv_options)   options specific to this package
-#
-#-----------------------------------------------------------------------------
-
-#-----------------------------------------------------------------------------
-#
-# Definitions for the sercnv generator
-make_fragment sercnv.mk -header=sercnv_header.mk -trailer=sercnv_trailer.mk -dependencies
-
-make_fragment ExampleClassSerCnv.cxx
-make_fragment ExampleClassSerCnv.h
-make_fragment ExampleMultChanClassSerCnv.h
-make_fragment ExamplePackageSerCnv_load.cxx
-make_fragment ExamplePackageSerCnv_entries.cxx
-make_fragment ExamplePackageSerCnv_entries.h
-make_fragment ExamplePackageSerCnv_entries_element.cxx
-#make_fragment SerExampleItemList_joboptions.py
-#make_fragment SerExampleItemList_joboptionsHdr.py
-
-pattern sercnv \
-  private ; \
-  use TrigSerializeCnvSvc TrigSerializeCnvSvc-00-* Trigger/TrigDataAccess ; \
-  use GaudiInterface   GaudiInterface-*      External ; \
-  document sercnv.mk <package><libtag>SerCnvGen libtag=<libtag> <files> ; \
-  library      <package><libtag>SerCnv                 "*.cxx -s=../sercnv<libtag> *.cxx <extraFilesToCompile> " ; \
-  apply_pattern optdebug_library name=<package><libtag>SerCnv ; \ 
-  macro	        types_with_namespace_<libtag>            " <typesWithNamespace> " ; \
-  macro		mult_chan_types_                 " <multChanTypes> " ; \
-  macro        sercnv_include_extras           " ../src" ; \
-  include_dirs                                  " $(sercnv_include_extras) " ; \
-  macro_append <package><libtag>SerCnv_dependencies    " <package><libtag>SerCnvGen " ; \
-  macro_append <package><libtag>SerCnvGen_dependencies " <package> <package>Dict " ; \
-  macro        sercnv_reset_stamp              " $(bin)<package>setup.make " ; \
-  macro        <package><libtag>SerCnv_shlibflags      "$(componentshr_linkopts) -L$(bin) $(use_linkopts) $(use_dict_linkopts) " ; \
-  macro        dummy_for_library                "<library>" ; \
-  macro_append <package>_named_libraries        " <package><libtag>SerCnv " ; \
-  apply_pattern generate_componentslist library=<package><libtag>SerCnv group=<group> ; \
-  macro_append <package>_joboptions ' -s=../sercnv<libtag> *.py ' ; \
-  macro_append install_pool_joboptions_dependencies " <package><libtag>SerCnv" ; \
-  document data_installer install_pool_joboptions prefix=jobOptions "-s=../sercnv<libtag> *.py"
-
-
-#-----------------------------------------------------------------------------
-#
-# Pattern for creating IO handers for element links
-#
-# apply_pattern pooliohandler [typesWithNamespace=""] [typesWithDataLinkOnly="..."] handlerFiles="..." 
-#
-#   where:
-#
-#     typesWithNamespace   optional list of types, used to specify the namespace.
-#		           For example:  "NS1::MyType1 NS1::MyType2 NS2::MyType3"
-#                          Needed for those files where the file name is the
-#                          types w/o namespace.
-#
-#     handlerFiles  gives the list of header files with the declarations
-#		    of the data objects, i.e. the ones with the CLASS_DEF
-#		    macro 
-#
-#   typesWithDataLinkOnly  optional list of types for which only
-#                          DataLinks should be created.  
-#                           Note, ElementLink and ElementLinkVector
-#                           require the class to be a subclass of DataVector, 
-#                           but DataLink does not.
-#
-#     CONVENTION: there must be ONLY ONE class defined in each header file.
-#
-#  > With this pattern, 
-#
-#     + directory ../pool_plugins 
-#     + a library lib<package>PoolIOHandler.so 
-#
-#     will be created for the package
-#
-#  > Two constituents <package>PoolIOHandlerGen and  <package>IOHandlers are generated 
-#    by this pattern
-#
-#-----------------------------------------------------------------------------
-
-#-----------------------------------------------------------------------------
-#
-# Definitions for the pool io handler generator
-
-# make_fragment pooliohandler.mk -header=pooliohandler_header.mk -dependencies
-
-# make_fragment SerExampleClassIOHandler.h
-# make_fragment SerExampleClassElementLinkIOHandler.cxx
-# make_fragment SerExampleClassDataLinkIOHandler.cxx
-# make_fragment SerExampleClassIOHandlerHdr.cxx
-
-# pattern pooliohandler \
-#   private ; \
-#   use AthenaPoolCnvSvc AthenaPoolCnvSvc-00-* Database/AthenaPOOL ; \
-#   use GaudiInterface   GaudiInterface-*      External ; \
-#   use DataModel        DataModel-00-*        Control ; \
-#   use AtlasPOOL        AtlasPOOL-00-*        External ; \
-#   use AtlasReflex      AtlasReflex-00-*      External ; \
-#   use AtlasSEAL        AtlasSEAL-00-*        External ; \
-#   document pooliohandler.mk <package>PoolIOHandlerGen <handlerFiles> ; \
-#   macro_append types_with_namespace " <typesWithNamespace> " ; \
-#   macro_append types_with_datalink_only " <typesWithDataLinkOnly> " ; \
-#   apply_pattern module_generic_library name=<package>IOHandlers files= "../pool_plugins/*.cxx" ; \
-#   macro_append <package>IOHandlers_dependencies " <package>PoolIOHandlerGen " ; \
-#   macro        poolhdlr_reset_stamp             " $(bin)<package>setup.make " ; \
-#   end_private 
-
-
-private
-#use AthenaKernel          AthenaKernel-*           Control
-#use AtlasReflex             AtlasReflex-*              External
-use TestPolicy            TestPolicy-*
-
-#apply_pattern installed_library
-#apply_pattern component_library
-#library AthenaPoolUtilities SeekableCollection.cxx SeekableCollectionIterator.cxx 
-
-apply_pattern install_runtime method=-symlink
-
-#apply_pattern declare_runtime files="*.sql"
-
-#apply_pattern lcg_module_register module=TrigSerializeUtils
-
-
-# The following use is to get the lcgdict pattern.
-# This is "hidden" behind "private" and "no_auto_imports" to keep 
-# clients of IOVDbTestConditions from seeing excess dependencies
-private
-use AtlasReflex	     AtlasReflex-*        External -no_auto_imports
-
-# Pattern to build the dict lib. User should create a single header
-# file: <package>Dict.h which includes all other .h files. See EventInfoDict
-#apply_tag no_extra_dict_deps
-#apply_pattern lcgdict dict=AthenaPoolUtilities  selectionfile=selection.xml headerfiles="../AthenaPoolUtilities/AthenaPoolUtilitiesDict.h"
diff --git a/Trigger/TrigEvent/TrigBSExtraction/cmt/requirements b/Trigger/TrigEvent/TrigBSExtraction/cmt/requirements
deleted file mode 100755
index 6008cc6da2f911cd2a0a1311e5dc7b73493c9cc1..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigBSExtraction/cmt/requirements
+++ /dev/null
@@ -1,71 +0,0 @@
-package TrigBSExtraction
-author Tomasz Bold
-
-use AtlasPolicy AtlasPolicy-*
-use GaudiInterface GaudiInterface-* External
-use StoreGate      StoreGate-*  Control
-use AthenaBaseComps		AthenaBaseComps-*	Control
-
-use TrigNavigation        TrigNavigation-*        Trigger/TrigEvent
-use TrigSteeringEvent     TrigSteeringEvent-*     Trigger/TrigEvent
-use TrigSerializeCnvSvc	  TrigSerializeCnvSvc-*	  Trigger/TrigDataAccess
-
-public
-
-use xAODTauCnv			xAODTauCnv-*		Event/xAOD
-use xAODTrigMuonCnv		xAODTrigMuonCnv-*	Event/xAOD
-use xAODJetCnv			xAODJetCnv-*		Event/xAOD
-# use xAODTrigRingerCnv		xAODTrigRingerCnv-*	Event/xAOD # not configurable algtool
-use xAODTrigCaloCnv		xAODTrigCaloCnv-*	Event/xAOD
-use xAODBTaggingCnv		xAODBTaggingCnv-*	Event/xAOD 
-use xAODTrigBphysCnv		xAODTrigBphysCnv-*	Event/xAOD
-# use xAODTrigEgammaCnv		xAODTrigEgammaCnv-*	Event/xAOD # not in devval yet
-use xAODTrigMissingETCnv	xAODTrigMissingETCnv-*	Event/xAOD
-use xAODTrigMinBiasCnv		xAODTrigMinBiasCnv-*	Event/xAOD
-use xAODTrackingCnv             xAODTrackingCnv-*       Event/xAOD
-use xAODEgammaCnv               xAODEgammaCnv-*         Event/xAOD
-use xAODCaloEventCnv		xAODCaloEventCnv-*      Event/xAOD
-use xAODTriggerCnv              xAODTriggerCnv-*        Event/xAOD
-
-private
-
-
-use Particle		  Particle-*		  Reconstruction
-
-use JetEvent		  JetEvent-*		  Reconstruction/Jet
-
-use xAODJet		  xAODJet-*		  Event/xAOD
-use xAODTrigCalo	  xAODTrigCalo-*	  Event/xAOD
-use xAODTrigMissingET	  xAODTrigMissingET-*	  Event/xAOD
-#use xAODTrigEgamma	  xAODTrigEgamma-*	  Event/xAOD
-use xAODMuon		  xAODMuon-*		  Event/xAOD
-use xAODTracking	  xAODTracking-*	  Event/xAOD
-use xAODTrigMuon	  xAODTrigMuon-*	  Event/xAOD
-use xAODTrigBphys	  xAODTrigBphys-*	  Event/xAOD
-use xAODTrigMinBias	  xAODTrigMinBias-*	  Event/xAOD
-use xAODTau               xAODTau-*               Event/xAOD
-use xAODCaloEvent	  xAODCaloEvent-*	  Event/xAOD
-use xAODEgamma            xAODEgamma-*            Event/xAOD
-use xAODTrigger           xAODTrigger-*           Event/xAOD
-use xAODBTagging          xAODBTagging-*          Event/xAOD
-
-use TrigStorageDefinitions TrigStorageDefinitions-* Trigger/TrigEvent
-use TrigMissingEtEvent	  TrigMissingEtEvent-*	  Trigger/TrigEvent
-use TrigParticle	  TrigParticle-*	  Trigger/TrigEvent
-use TrigCaloEvent	  TrigCaloEvent-*	  Trigger/TrigEvent
-use TrigMuonEvent	  TrigMuonEvent-*	  Trigger/TrigEvent
-use TrigInDetEvent	  TrigInDetEvent-*	  Trigger/TrigEvent
-use TrkTrack              TrkTrack-*              Tracking/TrkEvent
-use tauEvent              tauEvent-*              Reconstruction
-use egammaEvent           egammaEvent-*           Reconstruction/egamma
-use CaloEvent		  CaloEvent-*		  Calorimeter
-
-
-use TrigParticle	  TrigParticle-*	  Trigger/TrigEvent
-
-public
-library TrigBSExtraction *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-
diff --git a/Trigger/TrigEvent/TrigBphysicsEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigBphysicsEvent/CMakeLists.txt
index f7ea59bfb691d8a4eea2f43ef1b441fffba79ff2..4abda5257d544ef88015aa8acdd0583302585472 100644
--- a/Trigger/TrigEvent/TrigBphysicsEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigBphysicsEvent/CMakeLists.txt
@@ -14,7 +14,6 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           Control/DataModel
                           Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigDataAccess/TrigSerializeUtils
                           Trigger/TrigEvent/TrigNavigation )
 
 # External dependencies:
diff --git a/Trigger/TrigEvent/TrigBphysicsEvent/cmt/requirements b/Trigger/TrigEvent/TrigBphysicsEvent/cmt/requirements
deleted file mode 100755
index 1a2c4da13668858d420d7135b6d6f5caf0eb8bcf..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigBphysicsEvent/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package TrigBphysicsEvent
-
-author Natalia Panikashvili <Natalia.Panikashvili@cern.ch>
-
-use	AtlasPolicy		AtlasPolicy-*
-use	AtlasCLHEP		AtlasCLHEP-*		External
-use	CLIDSvc			CLIDSvc-*		Control 
-
-use	TrigInDetEvent		TrigInDetEvent-*	Trigger/TrigEvent
-use     TrigMuonEvent		TrigMuonEvent-*		Trigger/TrigEvent
-
-apply_pattern installed_library 
-library TrigBphysicsEvent *.cxx -s=components *.cxx
-
-private
-use 	DataModel           	DataModel-*             Control
-use 	TrigSerializeUtils  	TrigSerializeUtils-*    Trigger/TrigDataAccess
-use 	AtlasReflex   		AtlasReflex-*   	External -no_auto_imports
-
-use TrigNavigation        TrigNavigation-*     Trigger/TrigEvent
-
-apply_pattern lcgdict dict=TrigBphysicsEvent selectionfile=selection.xml headerfiles="../TrigBphysicsEvent/TrigBphysicsEventDict.h"
-
-#the list should be kept in sync with TrigParticleStorageDefinitions.cxx
-apply_pattern sercnv \
-libtag="xAOD" \
-typesWithNamespace="xAOD::TrigBphysContainer xAOD::TrigBphysAuxContainer" \
-    files="-s=${xAODTrigBphys_root}/xAODTrigBphys TrigBphysContainer.h TrigBphysAuxContainer.h"
diff --git a/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt
index 9970b2a87f3d488c89851b84a1ae3600582534c5..9458c430b0a3a6c1faf73497f05570705ab2cf59 100644
--- a/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigCaloEvent/CMakeLists.txt
@@ -26,7 +26,6 @@ atlas_depends_on_subdirs( PUBLIC
                           Event/xAOD/xAODTrigMinBias
                           Event/xAOD/xAODTrigRinger
                           Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigDataAccess/TrigSerializeUtils
                           Trigger/TrigEvent/TrigNavigation )
 
 # External dependencies:
diff --git a/Trigger/TrigEvent/TrigCaloEvent/cmt/requirements b/Trigger/TrigEvent/TrigCaloEvent/cmt/requirements
deleted file mode 100755
index a2ab462b7a83e2da36e350751bd9b173fa8a90f8..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigCaloEvent/cmt/requirements
+++ /dev/null
@@ -1,87 +0,0 @@
-package TrigCaloEvent
-
-author Denis Oliveira Damazio <Denis.Oliveira.Damazio@cern.ch>
-author Kyle Cranmer <cranmer@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-
-use GaudiInterface      GaudiInterface-*	External
-use DataModel		DataModel-*		Control
-use Navigation          Navigation-*		Control
-use EventKernel         EventKernel-*		Event
-use FourMom             FourMom-*		Event
-use CLIDSvc		CLIDSvc-*		Control
-use CaloGeoHelpers      CaloGeoHelpers-*        Calorimeter
-use AtlasDoxygen	AtlasDoxygen-*		Tools
-use SGTools             SGTools-*		Control
-
-
-
-# for backward compat:
-use TrigMissingEtEvent	TrigMissingEtEvent-*	Trigger/TrigEvent
-
-private
-use CaloEvent           CaloEvent-*		Calorimeter
-use xAODTrigCalo	xAODTrigCalo-*		Event/xAOD
-use xAODTrigL1Calo	xAODTrigL1Calo-*	Event/xAOD
-use xAODCaloEvent       xAODCaloEvent-*         Event/xAOD
-use xAODTrigMinBias     xAODTrigMinBias-*       Event/xAOD
-use xAODTrigRinger      xAODTrigRinger-*        Event/xAOD
-use xAODHIEvent         xAODHIEvent-*           Event/xAOD
-end_private
-
-library TrigCaloEvent *.cxx -s=components *.cxx
-
-apply_pattern installed_library
-
-private
-use AtlasReflex	AtlasReflex-*	External -no_auto_imports
-use TrigSerializeUtils     TrigSerializeUtils-*   Trigger/TrigDataAccess
-use TrigNavigation      TrigNavigation-*        Trigger/TrigEvent
-
-
-apply_pattern lcgdict dict=TrigCaloEvent \
-selectionfile=selection.xml \
-headerfiles="../TrigCaloEvent/TrigCaloEventDict.h" \
-dataLinks="TrigCaloCluster TrigEMCluster TrigT2Jet TrigTauCluster TrigTauClusterDetails RingerRings TrigRNNOutput" \
-elementLinks="TrigEMClusterContainer RingerRingsContainer TrigTauClusterContainer TrigTauClusterDetailsContainer TrigRNNOutputContainer"
-
-apply_pattern sercnv files="-s=${TrigCaloEvent_root}/TrigCaloEvent TrigCaloCluster.h TrigCaloClusterContainer.h\
-                               TrigEMCluster.h TrigEMClusterContainer.h \
-			       RingerRings.h RingerRingsContainer.h \
-                               TrigTauCluster.h TrigTauClusterContainer.h \
-                               TrigTauClusterDetails.h TrigTauClusterDetailsContainer.h \
-                               TrigT2Jet.h TrigT2JetContainer.h Trig3Momentum.h \
-                               TrigT2MbtsBits.h TrigT2MbtsBitsContainer.h \
-                               TrigT2ZdcSignals.h TrigT2ZdcSignalsContainer.h \
-                               TrigRNNOutput.h TrigRNNOutputContainer.h \
-                            -s=${CaloEvent_root}/CaloEvent CaloCellContainer.h CaloClusterContainer.h \
-                               CaloShowerContainer.h CaloTowerContainer.h CaloCellLinkContainer.h"
-apply_pattern sercnv \ 
-libtag="xAOD" \
-typesWithNamespace="xAOD::CaloCluster xAOD::CaloClusterContainer xAOD::CaloClusterAuxContainer xAOD::CaloClusterTrigAuxContainer \
-                    xAOD::TrigCaloCluster xAOD::TrigCaloClusterContainer xAOD::TrigCaloClusterAuxContainer \
-		    xAOD::TrigEMCluster xAOD::TrigEMClusterContainer xAOD::TrigEMClusterAuxContainer \
-		    xAOD::TrigT2MbtsBits xAOD::TrigT2MbtsBitsContainer xAOD::TrigT2MbtsBitsAuxContainer \	
-                    xAOD::TrigRingerRings xAOD::TrigRingerRingsContainer xAOD::TrigRingerRingsAuxContainer\
-                    xAOD::TrigRNNOutput xAOD::TrigRNNOutputContainer xAOD::TrigRNNOutputAuxContainer\
-		    xAOD::TrigT2ZdcSignals xAOD::TrigT2ZdcSignalsContainer xAOD::TrigT2ZdcSignalsAuxContainer\                   
-		    xAOD::TriggerTower xAOD::TriggerTowerContainer xAOD::TriggerTowerAuxContainer \
-		    xAOD::HIEventShape xAOD::HIEventShapeContainer xAOD::HIEventShapeAuxContainer " \
-       files="-s=${xAODTrigCalo_root}/xAODTrigCalo TrigCaloCluster.h TrigCaloClusterContainer.h TrigCaloClusterAuxContainer.h \
-                                TrigEMCluster.h TrigEMClusterContainer.h TrigEMClusterAuxContainer.h \
-				CaloClusterTrigAuxContainer.h \
-       -s=${xAODTrigL1Calo_root}/xAODTrigL1Calo TriggerTower.h TriggerTowerContainer.h TriggerTowerAuxContainer.h \
-       -s=${xAODTrigRinger_root}/xAODTrigRinger TrigRingerRings.h TrigRingerRingsContainer.h TrigRingerRingsAuxContainer.h \
-                                  TrigRNNOutput.h TrigRNNOutputContainer.h TrigRNNOutputAuxContainer.h \
-       -s=${xAODTrigMinBias_root}/xAODTrigMinBias TrigT2MbtsBits.h TrigT2MbtsBitsContainer.h TrigT2MbtsBitsAuxContainer.h \
-                                  TrigT2ZdcSignals.h TrigT2ZdcSignalsContainer.h TrigT2ZdcSignalsAuxContainer.h \
-       -s=${xAODCaloEvent_root}/xAODCaloEvent CaloCluster.h CaloClusterContainer.h CaloClusterAuxContainer.h \
-       -s=${xAODHIEvent_root}/xAODHIEvent HIEventShape.h HIEventShapeContainer.h HIEventShapeAuxContainer.h" 
-
-
-# Doxygen switches
-macro DOXYGEN_UML_LOOK "YES"
-
-end_private
-
diff --git a/Trigger/TrigEvent/TrigCaloEventTPCnv/cmt/requirements b/Trigger/TrigEvent/TrigCaloEventTPCnv/cmt/requirements
deleted file mode 100644
index 63c557f5d95d4b077a658645a349e53503e9dfb0..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigCaloEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,63 +0,0 @@
-package TrigCaloEventTPCnv
-
-author Andrew Hamilton     <Andrew.Hamilton@cern.ch>
-author Fabrizio Salvatore  <P.F.Salvatore@sussex.ac.uk>
-
-use AtlasPolicy          AtlasPolicy-*
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use AthenaPoolUtilities  AthenaPoolUtilities-*	    Database/AthenaPOOL
-use DataModel		 DataModel-*		    Control
-use DataModelAthenaPool  DataModelAthenaPool-*      Control
-use TrigCaloEvent        TrigCaloEvent-*            Trigger/TrigEvent
-
-branches TrigCaloEventTPCnv src
-
-library TrigCaloEventTPCnv *.cxx
-apply_pattern tpcnv_library
-
-
-private
-
-use AtlasReflex		     AtlasReflex-*		    External
-use GaudiInterface           GaudiInterface-*               External
-use AtlasCLHEP               AtlasCLHEP-*                   External
-use AthenaKernel             AthenaKernel-*         	    Control
-use CxxUtils                 CxxUtils-*                     Control
-use SGTools                  SGTools-*                      Control
-
-# Create a dictionary for the persistent representation 
-# of transient classes.  If we make a single dictionary,
-# the compiler runs out of memory on the generated source.
-
-apply_pattern lcgdict dict=TrigCaloEventTPCnv  \
-  selectionfile=selection.xml \
-  headerfiles="../TrigCaloEventTPCnv/TrigCaloEventTPCnvDict.h"
-
-end_private
-
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=TrigCaloClusterCnv_p1
-apply_pattern UnitTest_run unit_test=TrigCaloClusterCnv_p2
-apply_pattern UnitTest_run unit_test=TrigCaloClusterCnv_p3
-apply_pattern UnitTest_run unit_test=RingerRingsCnv_p1
-apply_pattern UnitTest_run unit_test=RingerRingsCnv_p2
-apply_pattern UnitTest_run unit_test=TrigEMClusterCnv_p2
-apply_pattern UnitTest_run unit_test=TrigEMClusterCnv_p3
-apply_pattern UnitTest_run unit_test=TrigEMClusterCnv_p4
-apply_pattern UnitTest_run unit_test=TrigRNNOutputCnv_p1
-apply_pattern UnitTest_run unit_test=TrigRNNOutputCnv_p2
-apply_pattern UnitTest_run unit_test=TrigT2JetCnv_p2
-apply_pattern UnitTest_run unit_test=TrigT2JetCnv_p3
-apply_pattern UnitTest_run unit_test=TrigT2MbtsBitsCnv_p1
-apply_pattern UnitTest_run unit_test=TrigT2MbtsBitsCnv_p2
-apply_pattern UnitTest_run unit_test=TrigT2MbtsBitsCnv_p3
-apply_pattern UnitTest_run unit_test=TrigT2ZdcSignalsCnv_p1
-apply_pattern UnitTest_run unit_test=TrigTauClusterCnv_p2
-apply_pattern UnitTest_run unit_test=TrigTauClusterCnv_p3
-apply_pattern UnitTest_run unit_test=TrigTauClusterCnv_p4
-apply_pattern UnitTest_run unit_test=TrigTauClusterCnv_p5
-apply_pattern UnitTest_run unit_test=TrigTauClusterDetailsCnv_p1
-apply_pattern UnitTest_run unit_test=TrigTauClusterDetailsCnv_p2
-
diff --git a/Trigger/TrigEvent/TrigCombinedEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigCombinedEvent/CMakeLists.txt
index 5dbaf5fdb7f7becc5c5240efc9ea0bb798a4e24c..1f84f1c91322c1c69711444cd222800528839dd1 100644
--- a/Trigger/TrigEvent/TrigCombinedEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigCombinedEvent/CMakeLists.txt
@@ -16,8 +16,7 @@ atlas_depends_on_subdirs( PUBLIC
                           AtlasTest/TestTools
                           Control/CxxUtils
                           Control/AthenaKernel
-                          Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigDataAccess/TrigSerializeUtils )
+                          Trigger/TrigDataAccess/TrigSerializeCnvSvc )
 
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
diff --git a/Trigger/TrigEvent/TrigCombinedEvent/cmt/requirements b/Trigger/TrigEvent/TrigCombinedEvent/cmt/requirements
deleted file mode 100755
index e175c38b4956513f26702e01e69444b48cbd5bda..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigCombinedEvent/cmt/requirements
+++ /dev/null
@@ -1,57 +0,0 @@
-package TrigCombinedEvent
-	
-author Camille B.-Champagne <camille.belanger-champagne@cern.ch>
-
-# general stuff:
-use AtlasPolicy         AtlasPolicy-*
-use CLIDSvc             CLIDSvc-*            Control
-use DataModel           DataModel-*          Control
-use GaudiInterface      GaudiInterface-*     External
-use AtlasBoost		AtlasBoost-*		External
-
-
-# Trigger Navigation
-use TrigNavigation      TrigNavigation-*        Trigger/TrigEvent
-	
-
-use SGTools             SGTools-*               Control
-#
-
-# library
-library TrigCombinedEvent *.cxx
-
-apply_pattern installed_library
-
-# Pattern to build the dict lib.
-private
-use AtlasReflex         AtlasReflex-*        External -no_auto_imports
-use TrigSerializeUtils  TrigSerializeUtils-*    Trigger/TrigDataAccess
-use AthenaKernel 	AthenaKernel-*          Control
-use CxxUtils            CxxUtils-*           Control
-
-#use TrigSerializeCnvSvc TrigSerializeCnvSvc-*   Trigger/TrigDataAccess
-
-#apply_pattern lcgdict dict=TrigParticle selectionfile=selection.xml headerfiles="../TrigParticle/TrigParticleDict.h" \
-#    dataLinks="TrigTau TrigPhotonContainer TrigEFBjetContainer TrigL2BjetContainer" \
-#    elementLinks="TrigL2BphysContainer TrigEFBphysContainer TrigElectronContainer"
-
-apply_pattern lcgdict dict=TrigCombinedEvent \
-	selectionfile=selection.xml\
-	headerfiles="../TrigCombinedEvent/TrigCombinedEventDict.h" \
-	dataLinks="TrigComposite" \
-	elementLinks="TrigCompositeContainer"
-
-#the list should be kept in sync with TrigParticleStorageDefinitions.cxx
-apply_pattern sercnv  files="-s=${TrigCombinedEvent_root}/TrigCombinedEvent TrigComposite.h TrigCompositeContainer.h  "
-
-#Storage has also  DataVector<INavigable4Momentum>
-
-#Debug stuff, taken out for checkreq
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-
-use TestTools      TestTools-*         AtlasTest
-apply_pattern UnitTest_run unit_test=TrigComposite extrapatterns=".*"
-
-end_private
\ No newline at end of file
diff --git a/Trigger/TrigEvent/TrigCombinedEventTPCnv/cmt/requirements b/Trigger/TrigEvent/TrigCombinedEventTPCnv/cmt/requirements
deleted file mode 100644
index 4768e7e766d27b29a81df58391e76081d07a1c24..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigCombinedEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,39 +0,0 @@
-package TrigCombinedEventTPCnv
-	
-author Camille B.-Champagne <camille.belanger-champagne@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*    
-use  AthenaPoolCnvSvc           AthenaPoolCnvSvc-*              Database/AthenaPOOL
-use  AthenaPoolUtilities        AthenaPoolUtilities-*           Database/AthenaPOOL
-use  TrigCombinedEvent          TrigCombinedEvent-*             Trigger/TrigEvent
-use  TrigNavigation             TrigNavigation-*                Trigger/TrigEvent
-private
-use  AthenaKernel               AthenaKernel-*                  Control
-use  GaudiInterface             GaudiInterface-*                External
-use  AtlasBoost                 AtlasBoost-*                    External
-use  AtlasReflex                AtlasReflex-*                   External
-end_private
-
-branches TrigCombinedEventTPCnv src
-
-library TrigCombinedEventTPCnv *.cxx
-apply_pattern tpcnv_library
-	
-	
-private
-
-# Create a dictionary for the persistent representation
-# of transient classes.  If we make a single dictionary,
-# the compiler runs out of memory on the generated source.
-
-apply_pattern lcgdict dict=TrigCombinedEventTPCnv \
-  selectionfile=selection.xml \
-  headerfiles="../TrigCombinedEventTPCnv/TrigCombinedEventTPCnvDict.h"
-	
-end_private
-
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=TrigCompositeCnv_p1
diff --git a/Trigger/TrigEvent/TrigDecision/cmt/requirements b/Trigger/TrigEvent/TrigDecision/cmt/requirements
deleted file mode 100755
index 03b3aea51813fe2dcca686a0ee5d93e79123c778..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigDecision/cmt/requirements
+++ /dev/null
@@ -1,10 +0,0 @@
-package TrigDecision
-
-author Till Eifert <Till.Eifert@cern.ch>
-author Nicolas Berger <Nicolas.Berger@cern.ch>
-author Ricardo Goncalo <r.goncalo@rhul.ac.uk>
-
-use AtlasPolicy 	AtlasPolicy-*
-
-apply_pattern declare_python_modules files="__init__.py TrigDecisionConfig.py"
-
diff --git a/Trigger/TrigEvent/TrigDecision/doc/packagedoc.h b/Trigger/TrigEvent/TrigDecision/doc/packagedoc.h
index 131405a205eca9dcb80e4c5ae5b336a1ca5edc37..7ede74014514c733ec31b67404f61fd3c76f4e10 100644
--- a/Trigger/TrigEvent/TrigDecision/doc/packagedoc.h
+++ b/Trigger/TrigEvent/TrigDecision/doc/packagedoc.h
@@ -14,6 +14,3 @@ The package is obsolete. PLease look inti TrigDecisionTool.
 
 
 */
-
-
-
diff --git a/Trigger/TrigEvent/TrigDecisionEvent/cmt/requirements b/Trigger/TrigEvent/TrigDecisionEvent/cmt/requirements
deleted file mode 100755
index 1ba324b5a4322ecb7323169cc148304283c731ef..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigDecisionEvent/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package TrigDecisionEvent
-
-author Till Eifert <Till.Eifert@cern.ch>
-author Nicolas Berger <Nicolas.Berger@cern.ch>
-author Ricardo Goncalo <r.goncalo@rhul.ac.uk>
-author Fabrizio Salvatore <p.f.salvatore@sussex.ac.uk>
-
-use AtlasPolicy 	AtlasPolicy-*
-
-use CLIDSvc		CLIDSvc-* 		Control
-use AthLinks            AthLinks-*              Control
-
-use TrigSteeringEvent	TrigSteeringEvent-*  	Trigger/TrigEvent
-#use TrigNavigation      TrigNavigation-*        Trigger/TrigEvent
-#use TrigConfHLTData     TrigConfHLTData-*       Trigger/TrigConfiguration
-
-library TrigDecisionEvent *.cxx
-apply_pattern installed_library
-
-private 
-use AtlasReflex         AtlasReflex-*         External
-
-# Pattern to build the dict lib. User should create a single header
-# file: <package>Dict.h which includes all other .h files. See MissingETDict
-# A selection file must be created by hand. This file lists the
-# classes to be added to the dictionary, and which fields are
-# transient. It should be put in ../<package> dir and is conventionally called
-# selection.xml.
-apply_pattern lcgdict dict=TrigDecisionEvent selectionfile=selection.xml \
-        dataLinks="HLT::HLTResult" \
-        headerfiles="../TrigDecisionEvent/TrigDecisionEventDict.h"
-
-use TestTools      TestTools-*         AtlasTest
-# this can be used to test if templated code compiles ... but it is not easy to setup running env for it to realy complete
-#apply_pattern UnitTest_run unit_test=Templates extrapatterns=".*" 
-
-
-#macro DOXYGEN_IMAGE_PATH "../doc/images"
-end_private
-
-#apply_pattern declare_python_modules files="__init__.py TrigDecisionConfig.py"
-
diff --git a/Trigger/TrigEvent/TrigDecisionEventTPCnv/cmt/requirements b/Trigger/TrigEvent/TrigDecisionEventTPCnv/cmt/requirements
deleted file mode 100644
index b9e33a1650abf5cdb3294817ad89af8559c41337..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigDecisionEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,48 +0,0 @@
-package TrigDecisionEventTPCnv
-
-author Andrew Hamilton     <Andrew.Hamilton@cern.ch>
-author Fabrizio Salvatore  <P.F.Salvatore@sussex.ac.uk>
-
-use AtlasPolicy          AtlasPolicy-*
-
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use DataModelAthenaPool  DataModelAthenaPool-*      Control
-use TrigSteeringEventTPCnv TrigSteeringEventTPCnv-*  Trigger/TrigEvent
-
-branches TrigDecisionEventTPCnv src
-
-library TrigDecisionEventTPCnv *.cxx
-apply_pattern tpcnv_library
-
-private
-
-use GaudiInterface       GaudiInterface-*           External
-use AtlasReflex		 AtlasReflex-*		    External
-use AthenaKernel         AthenaKernel-*             Control
-use SGTools              SGTools-*                  Control
-use TrigDecisionEvent    TrigDecisionEvent-*        Trigger/TrigEvent
-use TrigSteeringEvent    TrigSteeringEvent-*        Trigger/TrigEvent
-
-# Create a dictionary for the persistent representation 
-# of transient classes.  If we make a single dictionary,
-# the compiler runs out of memory on the generated source.
-
-apply_pattern lcgdict dict=TrigDecisionEventTPCnv \
-  selectionfile=selection.xml \
-  headerfiles="../TrigDecisionEventTPCnv/TrigDecisionEventTPCnvDict.h"
-
-apply_pattern lcgdict dict=OLD_TrigDecisionEventTPCnv \
-  selectionfile=OLD_selection.xml \
-  headerfiles="../TrigDecisionEventTPCnv/TrigDecisionEventTPCnvDict.h"
-
-end_private
-
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=TrigDecisionCnv_p1
-apply_pattern UnitTest_run unit_test=TrigDecisionCnv_p2
-apply_pattern UnitTest_run unit_test=TrigDecisionCnv_p3
-apply_pattern UnitTest_run unit_test=TrigDecisionCnv_p4
-apply_pattern UnitTest_run unit_test=TrigDecisionCnv_p5
-
diff --git a/Trigger/TrigEvent/TrigDecisionInterface/cmt/Makefile.RootCore b/Trigger/TrigEvent/TrigDecisionInterface/cmt/Makefile.RootCore
deleted file mode 100644
index 0655abd53088302ae353f75b71e55a192459215e..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigDecisionInterface/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,24 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = TrigDecisionInterface
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP = AsgTools
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 0
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 1
-PACKAGE_REFLEX   = 0
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigEvent/TrigDecisionInterface/cmt/requirements b/Trigger/TrigEvent/TrigDecisionInterface/cmt/requirements
deleted file mode 100644
index f07ef8948428ccec4d7f12ae6b391f9ca1525fb3..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigDecisionInterface/cmt/requirements
+++ /dev/null
@@ -1,5 +0,0 @@
-package TrigDecisionInterface
-# $Id: requirements 750298 2016-05-27 13:03:48Z krasznaa $
-
-use AtlasPolicy      AtlasPolicy-*
-use AsgTools         AsgTools-*         Control/AthToolSupport
diff --git a/Trigger/TrigEvent/TrigEventAthenaPool/cmt/requirements b/Trigger/TrigEvent/TrigEventAthenaPool/cmt/requirements
deleted file mode 100755
index 8c215286edf52869b4ff9063e809255f1438a3e5..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigEventAthenaPool/cmt/requirements
+++ /dev/null
@@ -1,160 +0,0 @@
-package TrigEventAthenaPool
-author Monika Wielers       <Monika.Wielers@cern.ch>
-author Nicolas Berger       <Nicolas.Berger@cern.ch>
-author Fabrizio Salvatore   <P.F.Salvatore@sussex.ac.uk>
-
-use AtlasPolicy          AtlasPolicy-*
-use GaudiInterface       GaudiInterface-*        External
-use AthenaPoolUtilities  AthenaPoolUtilities-*   Database/AthenaPOOL
-
-private
-use RootConversions      RootConversions-*       Database/AthenaPOOL
-
-# use statements for data packages
-use TrigDecisionEvent    TrigDecisionEvent-*     Trigger/TrigEvent
-use TrigInDetEvent       TrigInDetEvent-*        Trigger/TrigEvent
-use TrigParticle         TrigParticle-*          Trigger/TrigEvent
-use TrigMissingEtEvent   TrigMissingEtEvent-*    Trigger/TrigEvent
-use TrigMuonEvent        TrigMuonEvent-*         Trigger/TrigEvent
-use TrigCaloEvent        TrigCaloEvent-*         Trigger/TrigEvent
-use TrigBphysicsEvent    TrigBphysicsEvent-*     Trigger/TrigEvent
-use TrigMonitoringEvent  TrigMonitoringEvent-*   Trigger/TrigEvent
-use TrigTopoEvent        TrigTopoEvent-*         Trigger/TrigEvent
-use TrigCombinedEvent  TrigCombinedEvent-*   Trigger/TrigEvent
-use TrigFTK_RawData      TrigFTK_RawData-*       Trigger/TrigFTK
-
-# use statement for converters
-use TrigDecisionEventTPCnv    TrigDecisionEventTPCnv-*     Trigger/TrigEvent
-use TrigInDetEventTPCnv       TrigInDetEventTPCnv-*        Trigger/TrigEvent
-use TrigParticleTPCnv         TrigParticleTPCnv-*          Trigger/TrigEvent
-use TrigMissingEtEventTPCnv   TrigMissingEtEventTPCnv-*    Trigger/TrigEvent
-use TrigMuonEventTPCnv        TrigMuonEventTPCnv-*         Trigger/TrigEvent
-use TrigCaloEventTPCnv        TrigCaloEventTPCnv-*         Trigger/TrigEvent
-use TrigMonitoringEventTPCnv  TrigMonitoringEventTPCnv-*   Trigger/TrigEvent
-use TrigTopoEventTPCnv        TrigTopoEventTPCnv-*         Trigger/TrigEvent
-use TrigCombinedEventTPCnv  TrigCombinedEventTPCnv-*   Trigger/TrigEvent
-use TrigFTK_RawDataTPCnv      TrigFTK_RawDataTPCnv-*       Trigger/TrigFTK
-end_private
-
-apply_pattern poolcnv typesWithNamespace="TrigDec::TrigDecision" \
-      files="-s=${TrigParticle_root}/TrigParticle TrigL2BphysContainer.h \ 
-            -s=${TrigParticle_root}/TrigParticle TrigElectronContainer.h \ 
-            -s=${TrigParticle_root}/TrigParticle TrigTauContainer.h \ 
-            -s=${TrigParticle_root}/TrigParticle TrigTau.h \
-            -s=${TrigParticle_root}/TrigParticle TrigL2BjetContainer.h \
-            -s=${TrigParticle_root}/TrigParticle TrigEFBjetContainer.h \
-            -s=${TrigParticle_root}/TrigParticle TrigPhotonContainer.h \
-            -s=${TrigParticle_root}/TrigParticle TrigEFBphysContainer.h \
-            -s=${TrigDecisionEvent_root}/TrigDecisionEvent TrigDecision.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigInDetTrackCollection.h \ 
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigVertexCollection.h \ 
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTauTracksInfo.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTauTracksInfoCollection.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigHisto1D.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigHisto2D.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigSpacePointCounts.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigSpacePointCountsCollection.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTrtHitCounts.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTrtHitCountsCollection.h \ 
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTrackCounts.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTrackCountsCollection.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigVertexCounts.h \
-            -s=${TrigInDetEvent_root}/TrigInDetEvent TrigVertexCountsCollection.h \
-            -s=${TrigCombinedEvent_root}/TrigCombinedEvent TrigComposite.h \
-            -s=${TrigCombinedEvent_root}/TrigCombinedEvent TrigCompositeContainer.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent MuonFeature.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent MuonFeatureContainer.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent MuonFeatureDetails.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent MuonFeatureDetailsContainer.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent CombinedMuonFeature.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent CombinedMuonFeatureContainer.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent IsoMuonFeature.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent IsoMuonFeatureContainer.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent TrigMuonClusterFeature.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent TrigMuonClusterFeatureContainer.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent TileMuFeature.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent TileMuFeatureContainer.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent TileTrackMuFeature.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent TileTrackMuFeatureContainer.h \ 
-            -s=${TrigMuonEvent_root}/TrigMuonEvent TrigMuonEFContainer.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent TrigMuonEFInfoContainer.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent TrigMuonEFIsolationContainer.h \
-            -s=${TrigMuonEvent_root}/TrigMuonEvent TrigCombDiMuonContainer.h \
-            -s=${TrigBphysicsEvent_root}/TrigBphysicsEvent TrigJpsi.h \
-            -s=${TrigBphysicsEvent_root}/TrigBphysicsEvent TrigJpsiContainer.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigEMCluster.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigEMClusterContainer.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigTauCluster.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigTauClusterContainer.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigTauClusterDetails.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigTauClusterDetailsContainer.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigT2MbtsBits.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigT2MbtsBitsContainer.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigT2ZdcSignals.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigT2ZdcSignalsContainer.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigT2Jet.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigT2JetContainer.h \
-            -s=${TrigMissingEtEvent_root}/TrigMissingEtEvent TrigMissingET.h \
-            -s=${TrigMissingEtEvent_root}/TrigMissingEtEvent TrigMissingETContainer.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent RingerRings.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent RingerRingsContainer.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigRNNOutput.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigRNNOutputContainer.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigCaloCluster.h \
-            -s=${TrigCaloEvent_root}/TrigCaloEvent TrigCaloClusterContainer.h \
-            -s=${TrigTopoEvent_root}/TrigTopoEvent ElectronMuonTopoInfo.h \
-            -s=${TrigTopoEvent_root}/TrigTopoEvent ElectronMuonTopoInfoContainer.h \
-            -s=${TrigMonitoringEvent_root}/TrigMonitoringEvent TrigMonEvent.h \
-            -s=${TrigMonitoringEvent_root}/TrigMonitoringEvent TrigMonEventCollection.h \
-            -s=${TrigMonitoringEvent_root}/TrigMonitoringEvent TrigMonConfig.h \
-            -s=${TrigMonitoringEvent_root}/TrigMonitoringEvent TrigMonConfigCollection.h \
-            -s=${TrigFTK_RawData_root}/TrigFTK_RawData FTK_RawTrackContainer.h"
-
-apply_pattern declare_joboptions files="*.py"
-
-
-
-private
-use TestTools            TestTools-*                AtlasTest -no_auto_imports
-
-
-apply_pattern athenarun_test \
-   name="TrigEventAthenaPool_15.6.1" \
-   options="TrigEventAthenaPool/TrigEventAthenaPool_15.6.1_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigEventAthenaPool_15.6.1" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigEventAthenaPool_15.6.1"
-
-
-apply_pattern athenarun_test \
-   name="TrigEventAthenaPool_15.6.13.2" \
-   options="TrigEventAthenaPool/TrigEventAthenaPool_15.6.13.2_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigEventAthenaPool_15.6.13.2" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigEventAthenaPool_15.6.13.2"
-
-
-apply_pattern athenarun_test \
-   name="TrigEventAthenaPool_16.0.3.3" \
-   options="TrigEventAthenaPool/TrigEventAthenaPool_16.0.3.3_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigEventAthenaPool_16.0.3.3" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigEventAthenaPool_16.0.3.3"
-
-
-apply_pattern athenarun_test \
-   name="TrigEventAthenaPool_17.0.6" \
-   options="TrigEventAthenaPool/TrigEventAthenaPool_17.0.6_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigEventAthenaPool_17.0.6" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigEventAthenaPool_17.0.6"
-
-
-apply_pattern athenarun_test \
-   name="TrigEventAthenaPool_18.0.0" \
-   options="TrigEventAthenaPool/TrigEventAthenaPool_18.0.0_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigEventAthenaPool_18.0.0" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigEventAthenaPool_18.0.0"
-
-
-apply_pattern athenarun_test \
-   name="TrigEventAthenaPool_20.1.7.2" \
-   options="TrigEventAthenaPool/TrigEventAthenaPool_20.1.7.2_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigEventAthenaPool_20.1.7.2" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigEventAthenaPool_20.1.7.2"
diff --git a/Trigger/TrigEvent/TrigInDetEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigInDetEvent/CMakeLists.txt
index 367f0d2e2254a6a690066310f867c4f72fe8a9a8..e2acfb7c2e7a4202087ee238507187125d373ba1 100644
--- a/Trigger/TrigEvent/TrigInDetEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigInDetEvent/CMakeLists.txt
@@ -30,7 +30,6 @@ atlas_depends_on_subdirs( PUBLIC
                           Tracking/TrkEvent/VxSecVertex
                           Tracking/TrkEvent/VxVertex
                           Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigDataAccess/TrigSerializeUtils
                           Trigger/TrigEvent/TrigNavigation )
 
 # External dependencies:
diff --git a/Trigger/TrigEvent/TrigInDetEvent/cmt/requirements b/Trigger/TrigEvent/TrigInDetEvent/cmt/requirements
deleted file mode 100755
index d5fe96c187357908a4c154839cd54e0f6f5307ee..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigInDetEvent/cmt/requirements
+++ /dev/null
@@ -1,107 +0,0 @@
-package TrigInDetEvent
-
-public
-
-use     AtlasCLHEP         AtlasCLHEP-*		   External
-use     AtlasPolicy        AtlasPolicy-*
-use     CLIDSvc            CLIDSvc*                Control
-use     DataModel          DataModel-*             Control
-use     EventKernel        EventKernel-*           Event
-use     FourMom            FourMom*                Event
-use     GaudiInterface     GaudiInterface-*        External
-use     Identifier         Identifier-*            DetectorDescription
-use     InDetPrepRawData   InDetPrepRawData-*      InnerDetector/InDetRecEvent
-use     Navigation         Navigation-*            Control
-use     SGTools            SGTools-*               Control
-use     TrkPrepRawData     TrkPrepRawData-*        Tracking/TrkEvent
-use     TrkTrack           TrkTrack-*              Tracking/TrkEvent
-use     TrkSpacePoint      TrkSpacePoint-*         Tracking/TrkEvent
-
-private
-
-use     Particle           Particle-*              Reconstruction
-use     ParticleTruth      ParticleTruth-*         Reconstruction
-
-use	TrigNavigation	   TrigNavigation-*	   Trigger/TrigEvent
-
-use     TrkSegment         TrkSegment-*            Tracking/TrkEvent
-use     TrkTruthData       TrkTruthData-*          Tracking/TrkEvent
-use     VxSecVertex        VxSecVertex-*           Tracking/TrkEvent
-use     VxVertex           VxVertex-*              Tracking/TrkEvent
-
-
-use     TrkParameters      TrkParameters-*         Tracking/TrkEvent
-
-use	xAODTracking	   xAODTracking-*	   Event/xAOD
-use	xAODTrigMinBias	   xAODTrigMinBias-*	   Event/xAOD
-
-
-public
-
-library TrigInDetEvent *.cxx
-apply_pattern installed_library
-
-#apply_pattern declare_non_standard_include name=doc
-
-private 
-# need AtlasSeal
-use 	AtlasReflex   		AtlasReflex*   		External -no_auto_imports
-use     TrigSerializeUtils      TrigSerializeUtils-*    Trigger/TrigDataAccess
-
-
-# Pattern to build the dict lib. User should create a single header
-# file: <package>Dict.h which includes all other .h files. See MissingETDict
-# A selection file must be created by hand. This file lists the
-# classes to be added to the dictionary, and which fields are
-# transient. It should be put in ../<package> dir and is conventionally called
-# selection.xml.
-#macro_append reflex_dict_options --debug 
-
-apply_pattern lcgdict dict=TrigInDetEvent_c selectionfile=selection_c.xml \
-	headerfiles="../TrigInDetEvent/TrigInDetEvent_cDict.h"
-
-apply_pattern lcgdict dict=TrigInDetEvent selectionfile=selection.xml \
-	headerfiles="../TrigInDetEvent/TrigInDetEventDict.h" \
-	elementLinks="TrigInDetTrackCollection" \
-        dataLinks="TrigTrackCounts TrigVertexCounts TrigTauTracksInfo TrigSpacePointCounts TrigTrtHitCounts TrigVertexCollection"
-
-apply_pattern sercnv  typesWithNamespace="Rec::TrackParticleContainer Trk::SegmentCollection " \
-	      files="-s=${TrigInDetEvent_root}/TrigInDetEvent TrigInDetTrack.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigInDetTrackCollection.h \
-   	             -s=${TrigInDetEvent_root}/TrigInDetEvent TrigInDetTrackFitPar.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigVertex.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigVertexCollection.h \
-	             -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTrackCounts.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTrackCountsCollection.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigVertexCounts.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigVertexCountsCollection.h \ 
-	             -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTauTracksInfo.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTauTracksInfoCollection.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigHisto1D.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigHisto2D.h \
-	             -s=${TrigInDetEvent_root}/TrigInDetEvent TrigSpacePointCounts.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigSpacePointCountsCollection.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTrtHitCounts.h \
-                     -s=${TrigInDetEvent_root}/TrigInDetEvent TrigTrtHitCountsCollection.h \
-		     -s=${TrkTrack_root}/TrkTrack TrackCollection.h TrackExtensionMap.h \ 			 
-	             -s=${VxVertex_root}/VxVertex VxContainer.h \
-	             -s=${TrkSegment_root}/TrkSegment SegmentCollection.h \
-		     -s=${Particle_root}/Particle TrackParticleContainer.h " 
-
-apply_pattern sercnv \
-libtag="xAOD" \
-typesWithNamespace="xAOD::TrackParticle	xAOD::TrackParticleContainer xAOD::TrackParticleAuxContainer \
-		    xAOD::Vertex xAOD::VertexContainer xAOD::VertexAuxContainer \
-		    xAOD::TrigSpacePointCounts xAOD::TrigSpacePointCountsContainer xAOD::TrigSpacePointCountsAuxContainer \
-		    xAOD::TrigHisto2D xAOD::TrigHisto2DContainer xAOD::TrigHisto2DAuxContainer \
-		    xAOD::TrigVertexCounts xAOD::TrigVertexCountsContainer xAOD::TrigVertexCountsAuxContainer \
-		    xAOD::TrigTrackCounts xAOD::TrigTrackCountsContainer xAOD::TrigTrackCountsAuxContainer" \
-    files="-s=${xAODTracking_root}/xAODTracking VertexContainer.h VertexAuxContainer.h \
-    						TrackParticleContainer.h TrackParticleAuxContainer.h \
-	   -s=${xAODTrigMinBias_root}/xAODTrigMinBias TrigSpacePointCounts.h TrigSpacePointCountsContainer.h TrigSpacePointCountsAuxContainer.h \
-                                 TrigHisto2D.h TrigHisto2DContainer.h TrigHisto2DAuxContainer.h \
-                              TrigVertexCounts.h TrigVertexCountsContainer.h TrigVertexCountsAuxContainer.h \
-                              TrigTrackCounts.h TrigTrackCountsContainer.h TrigTrackCountsAuxContainer.h"
-
-end_private
-
diff --git a/Trigger/TrigEvent/TrigInDetEvent/doc/packagedoc.h b/Trigger/TrigEvent/TrigInDetEvent/doc/packagedoc.h
index 2404ece65bc591b162e14c4da16fa6f728f100a5..f21ba6d0d10e696360aac2afa281698dbf48f1bd 100644
--- a/Trigger/TrigEvent/TrigInDetEvent/doc/packagedoc.h
+++ b/Trigger/TrigEvent/TrigInDetEvent/doc/packagedoc.h
@@ -36,7 +36,6 @@ The following classes are defined
 
 This package also contains selection.xml - a file for lcgdict generation
       
-@section TrigInDetEvent_TrigInDetEventReq Requirements
 
 
 */
diff --git a/Trigger/TrigEvent/TrigInDetEventTPCnv/cmt/requirements b/Trigger/TrigEvent/TrigInDetEventTPCnv/cmt/requirements
deleted file mode 100644
index 02f523e89b8b6eee2510c9f0ea7f700f3c8bc58c..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigInDetEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,83 +0,0 @@
-package TrigInDetEventTPCnv
-
-author Andrew Hamilton     <Andrew.Hamilton@cern.ch>
-author Fabrizio Salvatore  <P.F.Salvatore@sussex.ac.uk>
-
-use AtlasPolicy          AtlasPolicy-*
-
-#use CLIDSvc              CLIDSvc-*                  Control
-
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use AthenaPoolUtilities  AthenaPoolUtilities-*	    Database/AthenaPOOL
-use EventCommonTPCnv     EventCommonTPCnv-*         Event
-use InDetIdentifier      InDetIdentifier-*          InnerDetector/InDetDetDescr
-use StoreGate            StoreGate-*                Control
-#use DataModel		 DataModel-*		    Control
-#use DataModelAthenaPool  DataModelAthenaPool-*      Control
-use RootConversions      RootConversions-*          Database/AthenaPOOL
-
-# use Identifier           Identifier-*               DetectorDescription
-
-
-# use statements for data packages
-# use FourMom              FourMom-*               Event
-use TrigInDetEvent	 TrigInDetEvent-*	 Trigger/TrigEvent
-use TrigCaloEventTPCnv	 TrigCaloEventTPCnv-*	 Trigger/TrigEvent
-
-#use Particle		Particle-*		Reconstruction
-#use TrackParticleTPCnv	TrackParticleTPCnv-*	Reconstruction
-
-private
-use GaudiInterface GaudiInterface-*  External
-use AtlasCLHEP     AtlasCLHEP-*      External
-use CxxUtils       CxxUtils-*        Control
-use IdDictParser   IdDictParser-*    DetectorDescription
-end_private
-
-branches TrigInDetEventTPCnv src
-
-library TrigInDetEventTPCnv *.cxx
-apply_pattern tpcnv_library
-
-
-private
-
-use AthenaKernel         AthenaKernel-*             Control
-use AtlasReflex		     AtlasReflex-*		        External
-
-# Create a dictionary for the persistent representation 
-# of transient classes.  If we make a single dictionary,
-# the compiler runs out of memory on the generated source.
-
-apply_pattern lcgdict dict=TrigInDetEventTPCnv \
-  selectionfile=selection.xml \
-  headerfiles="../TrigInDetEventTPCnv/TrigInDetEventTPCnvDict.h"
-
-end_private
-
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=TrigHisto1DCnv_p1
-apply_pattern UnitTest_run unit_test=TrigHisto2DCnv_p1
-apply_pattern UnitTest_run unit_test=TrigInDetTrackCnv_p1
-apply_pattern UnitTest_run unit_test=TrigInDetTrackCnv_p2
-apply_pattern UnitTest_run unit_test=TrigInDetTrackCnv_p3
-apply_pattern UnitTest_run unit_test=TrigInDetTrackCnv_p4
-apply_pattern UnitTest_run unit_test=TrigInDetTrackCnv_p5
-apply_pattern UnitTest_run unit_test=TrigInDetTrackCollectionCnv_p1
-apply_pattern UnitTest_run unit_test=TrigInDetTrackFitParCnv_p1
-apply_pattern UnitTest_run unit_test=TrigInDetTrackFitParCnv_p2
-apply_pattern UnitTest_run unit_test=TrigInDetTrackFitParCnv_p3
-apply_pattern UnitTest_run unit_test=TrigSpacePointCountsCnv_p1
-apply_pattern UnitTest_run unit_test=TrigSpacePointCountsCnv_p2
-apply_pattern UnitTest_run unit_test=TrigSpacePointCountsCnv_p3
-apply_pattern UnitTest_run unit_test=TrigSpacePointCountsCnv_p4
-apply_pattern UnitTest_run unit_test=TrigTauTracksInfoCnv_p1
-apply_pattern UnitTest_run unit_test=TrigTauTracksInfoCnv_p2
-apply_pattern UnitTest_run unit_test=TrigTrackCountsCnv_p2
-apply_pattern UnitTest_run unit_test=TrigTrtHitCountsCnv_p1
-apply_pattern UnitTest_run unit_test=TrigTrtHitCountsCnv_p2
-apply_pattern UnitTest_run unit_test=TrigVertexCnv_p1
-apply_pattern UnitTest_run unit_test=TrigVertexCnv_p2
-apply_pattern UnitTest_run unit_test=TrigVertexCountsCnv_p1
diff --git a/Trigger/TrigEvent/TrigInDetPattRecoEvent/cmt/requirements b/Trigger/TrigEvent/TrigInDetPattRecoEvent/cmt/requirements
deleted file mode 100755
index 8f7cf89754e98bf18ecf9ac76c256cd974a04625..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigInDetPattRecoEvent/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package TrigInDetPattRecoEvent
-
-public
-
-#use     AtlasCLHEP		AtlasCLHEP-00-*			External
-use     AtlasPolicy	    	AtlasPolicy-*
-use     TrigInDetEvent      	TrigInDetEvent-*		Trigger/TrigEvent
-use     TrigSteeringEvent   	TrigSteeringEvent-*		Trigger/TrigEvent
-
-#use     TrkEventPrimitives  	TrkEventPrimitives-*		Tracking/TrkEvent
-use 	 GeoPrimitives      	GeoPrimitives-*    		DetectorDescription
-
-use     TrkParameters          	TrkParameters-*                 Tracking/TrkEvent
-
-library TrigInDetPattRecoEvent *.cxx
-apply_pattern installed_library
-
-#apply_pattern declare_non_standard_include name=doc
-
-private
-
diff --git a/Trigger/TrigEvent/TrigMissingEtEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigMissingEtEvent/CMakeLists.txt
index 45dfa2123e85c93ac70abedd472a197aea3ca4aa..cdafcac759c435a3b5171f0028d091d9a3f45dc7 100644
--- a/Trigger/TrigEvent/TrigMissingEtEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigMissingEtEvent/CMakeLists.txt
@@ -15,7 +15,6 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           Event/xAOD/xAODTrigMissingET
                           Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigDataAccess/TrigSerializeUtils
                           Trigger/TrigEvent/TrigNavigation )
 
 # External dependencies:
diff --git a/Trigger/TrigEvent/TrigMissingEtEvent/cmt/requirements b/Trigger/TrigEvent/TrigMissingEtEvent/cmt/requirements
deleted file mode 100755
index 569c67cebfe667b73587c5b96f21adad0ca39501..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigMissingEtEvent/cmt/requirements
+++ /dev/null
@@ -1,47 +0,0 @@
-package TrigMissingEtEvent
-
-author Fabrizio Salvatore <P.F.Salvatore@sussex.ac.uk>
-author Diego Casadei <diego.casadei@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-
-use DataModel		DataModel-*		Control
-use CLIDSvc		CLIDSvc-*		Control
-use AtlasDoxygen	AtlasDoxygen-*		Tools
-#use TrigRingerTools	TrigRingerTools-* 	Trigger/TrigTools
-use SGTools             SGTools-*               Control
-
-use GaudiInterface GaudiInterface-* External
-#use GaudiKernel GaudiKernel-* External
-
-library TrigMissingEtEvent *.cxx -s=components *.cxx
-
-apply_pattern installed_library
-
-private
-use TrigNavigation	TrigNavigation-*	Trigger/TrigEvent
-use AtlasReflex	AtlasReflex-*	External -no_auto_imports
-use TrigSerializeUtils     TrigSerializeUtils-*   Trigger/TrigDataAccess
-use xAODTrigMissingET	   xAODTrigMissingET-*	  Event/xAOD
-
-apply_pattern lcgdict dict=TrigMissingEtEvent \
-selectionfile=selection.xml \
-headerfiles="../TrigMissingEtEvent/TrigMissingEtEventDict.h" \
-dataLinks="TrigMissingET"
-#elementLinks="TrigEMClusterContainer RingerRingsContainer TrigTauClusterContainer TrigTauClusterDetailsContainer"
-
-apply_pattern sercnv files="-s=${TrigMissingEtEvent_root}/TrigMissingEtEvent TrigMissingET.h\
-                               TrigMissingETContainer.h TrigMissingEtComponent.h "
-
-apply_pattern sercnv \
-libtag="xAOD" \
-typesWithNamespace="xAOD::TrigMissingETContainer xAOD::TrigMissingETAuxContainer" \
-    files="-s=${xAODTrigMissingET_root}/xAODTrigMissingET TrigMissingETContainer.h TrigMissingETAuxContainer.h"
-
-
-
-# Doxygen switches
-macro DOXYGEN_UML_LOOK "YES"
-
-end_private
-
diff --git a/Trigger/TrigEvent/TrigMissingEtEvent/doc/packagedoc.h b/Trigger/TrigEvent/TrigMissingEtEvent/doc/packagedoc.h
index 02ead7764f3d53a2472ca6daa5625749471c0fc4..ffdfcc49b4b42a10c3c398ffa677424d5d1def42 100644
--- a/Trigger/TrigEvent/TrigMissingEtEvent/doc/packagedoc.h
+++ b/Trigger/TrigEvent/TrigMissingEtEvent/doc/packagedoc.h
@@ -41,16 +41,6 @@ The TrigMissingEtEvent package contains of following classes:
 
 
 
-@ref used_TrigMissingEtEvent
 
-@ref requirements_TrigMissingEtEvent
 
 */
-
-/**
-@page used_TrigMissingEtEvent Used Packages
-*/
-
-/**
-@page requirements_TrigMissingEtEvent Requirements
-*/
diff --git a/Trigger/TrigEvent/TrigMissingEtEventTPCnv/cmt/requirements b/Trigger/TrigEvent/TrigMissingEtEventTPCnv/cmt/requirements
deleted file mode 100644
index 3fd7701eb0cbcebae1fc047f76cd1590ec2eebea..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigMissingEtEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,36 +0,0 @@
-package TrigMissingEtEventTPCnv
-
-author Andrew Hamilton     <Andrew.Hamilton@cern.ch>
-author Fabrizio Salvatore  <P.F.Salvatore@sussex.ac.uk>
-
-use AtlasPolicy          AtlasPolicy-*
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use AthenaPoolUtilities  AthenaPoolUtilities-*	    Database/AthenaPOOL
-use TrigMissingEtEvent   TrigMissingEtEvent-*    Trigger/TrigEvent
-
-branches TrigMissingEtEventTPCnv src
-
-library TrigMissingEtEventTPCnv *.cxx
-apply_pattern tpcnv_library
-
-
-private
-
-use GaudiInterface       GaudiInterface-*   External
-use AtlasReflex		 AtlasReflex-*	    External
-use AthenaKernel         AthenaKernel-*     Control
-
-# Create a dictionary for the persistent representation 
-# of transient classes.  If we make a single dictionary,
-# the compiler runs out of memory on the generated source.
-
-apply_pattern lcgdict dict=TrigMissingEtEventTPCnv \
-  selectionfile=selection.xml \
-  headerfiles="../TrigMissingEtEventTPCnv/TrigMissingEtEventTPCnvDict.h"
-
-end_private
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=TrigMissingETCnv_p2
-apply_pattern UnitTest_run unit_test=TrigMissingETCnv_p3
diff --git a/Trigger/TrigEvent/TrigMonitoringEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigMonitoringEvent/CMakeLists.txt
index 42f1089aa0882e80af74d2d35733324fcd45e8aa..cfcd3914d597614c63bdd2b3a45dcd642c9b85fe 100644
--- a/Trigger/TrigEvent/TrigMonitoringEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigMonitoringEvent/CMakeLists.txt
@@ -14,7 +14,6 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           Control/AthenaKernel
                           Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigDataAccess/TrigSerializeUtils
                           Trigger/TrigEvent/TrigNavigation )
 
 # External dependencies:
diff --git a/Trigger/TrigEvent/TrigMonitoringEvent/cmt/requirements b/Trigger/TrigEvent/TrigMonitoringEvent/cmt/requirements
deleted file mode 100644
index ce4f4eb121c117f2a42c9dea366d623c53f4e0d1..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigMonitoringEvent/cmt/requirements
+++ /dev/null
@@ -1,35 +0,0 @@
-package TrigMonitoringEvent
-author Rustem Ospanov
-
-public
-
-use AtlasPolicy         AtlasPolicy-*
-use CLIDSvc             CLIDSvc-*                Control
-use DataModel           DataModel-*              Control
-use DataCollection      DataCollection-*         External
-
-use TrigSteeringEvent   TrigSteeringEvent-*      Trigger/TrigEvent
-
-apply_pattern installed_library
-library TrigMonitoringEvent *.cxx
-
-private
-
-use AthenaKernel        AthenaKernel-*           Control
-use AtlasReflex         AtlasReflex-*            External -no_auto_import
-use TrigNavigation      TrigNavigation-*         Trigger/TrigEvent
-use TrigSerializeUtils  TrigSerializeUtils-*     Trigger/TrigDataAccess
-
-apply_pattern sercnv files="-s=${TrigMonitoringEvent_root}/TrigMonitoringEvent TrigMonEvent.h \
-                            -s=${TrigMonitoringEvent_root}/TrigMonitoringEvent TrigMonEventCollection.h \
-                            -s=${TrigMonitoringEvent_root}/TrigMonitoringEvent TrigMonConfig.h \
-                            -s=${TrigMonitoringEvent_root}/TrigMonitoringEvent TrigMonConfigCollection.h "
-
-apply_pattern lcgdict dict=TrigMonitoringEvent \
-              selectionfile=selection.xml \
-              headerfiles="../TrigMonitoringEvent/TrigMonitoringEventDict.h"
-
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-end_private
diff --git a/Trigger/TrigEvent/TrigMonitoringEvent/src/TrigMonL1Item.cxx b/Trigger/TrigEvent/TrigMonitoringEvent/src/TrigMonL1Item.cxx
index 61fc9a120423bcc9dfbd2ac10789606379b28e44..8cd94530e0636e3826e15cf7789780c6f4531eda 100644
--- a/Trigger/TrigEvent/TrigMonitoringEvent/src/TrigMonL1Item.cxx
+++ b/Trigger/TrigEvent/TrigMonitoringEvent/src/TrigMonL1Item.cxx
@@ -12,7 +12,7 @@
 namespace L1Bits
 {
   const uint32_t maskCtpId = 0x0fff;  // mask ctpid bits
-  const uint32_t maskDecis = 0x7000;  // mask decision bits
+  //const uint32_t maskDecis = 0x7000;  // mask decision bits
 }
 
 namespace MSGService
diff --git a/Trigger/TrigEvent/TrigMonitoringEvent/src/TrigMonRoi.cxx b/Trigger/TrigEvent/TrigMonitoringEvent/src/TrigMonRoi.cxx
index f891f509a18a9e47f4a95ff2bce5b461fadf24c0..e4cd76a808649092067ad1ea2d687af4fa8f6138 100644
--- a/Trigger/TrigEvent/TrigMonitoringEvent/src/TrigMonRoi.cxx
+++ b/Trigger/TrigEvent/TrigMonitoringEvent/src/TrigMonRoi.cxx
@@ -16,12 +16,12 @@ namespace RoiBits
   const uint32_t maskId   = 0x000000ff;
   const uint32_t maskType = 0x00000f00;
   const uint32_t maskL1   = 0x000ff000;
-  const uint32_t maskFree = 0xfff00000;
+  //const uint32_t maskFree = 0xfff00000;
   
   const uint32_t shiftId   = 0;
   const uint32_t shiftType = 8;
   const uint32_t shiftL1   = 12;
-  const uint32_t shiftFree = 20;
+  //const uint32_t shiftFree = 20;
 }
 
 namespace MSGService
diff --git a/Trigger/TrigEvent/TrigMonitoringEventTPCnv/cmt/Makefile b/Trigger/TrigEvent/TrigMonitoringEventTPCnv/cmt/Makefile
deleted file mode 100644
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigMonitoringEventTPCnv/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Trigger/TrigEvent/TrigMonitoringEventTPCnv/cmt/requirements b/Trigger/TrigEvent/TrigMonitoringEventTPCnv/cmt/requirements
deleted file mode 100644
index 255f750b783c35bd526eef34ac6c0a745717cbd2..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigMonitoringEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-package TrigMonitoringEventTPCnv 
-
-use AtlasPolicy          AtlasPolicy-*
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use AthenaPoolUtilities  AthenaPoolUtilities-*	    Database/AthenaPOOL
-use TrigMonitoringEvent	 TrigMonitoringEvent-*	    Trigger/TrigEvent
-
-branches TrigMonitoringEventTPCnv src
-
-library TrigMonitoringEventTPCnv *.cxx
-apply_pattern tpcnv_library
-
-private
-
-use AthenaKernel         AthenaKernel-*             Control
-use AtlasReflex		 AtlasReflex-*		    External
-
-apply_pattern lcgdict dict=TrigMonitoringEventTPCnv  \
-  selectionfile=selection.xml \
-  headerfiles="../TrigMonitoringEventTPCnv/TrigMonitoringEventTPCnvDict.h"
-
-end_private
diff --git a/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt
index 296fea023c720105fa646cc1b5b077473d716c36..9c76ededf78a16a95e7a7a15a4f1d02f2f8ad527 100644
--- a/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigMuonEvent/CMakeLists.txt
@@ -25,7 +25,6 @@ atlas_depends_on_subdirs( PUBLIC
                           MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment
                           Reconstruction/MuonIdentification/MuidEvent
                           Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigDataAccess/TrigSerializeUtils
                           Trigger/TrigEvent/TrigNavigation )
 
 # External dependencies:
diff --git a/Trigger/TrigEvent/TrigMuonEvent/cmt/requirements b/Trigger/TrigEvent/TrigMuonEvent/cmt/requirements
deleted file mode 100755
index c3eaa798d8a1a8a4844fd9960e230e64c07c42fa..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigMuonEvent/cmt/requirements
+++ /dev/null
@@ -1,70 +0,0 @@
-package TrigMuonEvent
-
-author Alessandro Di Mattia <alessandro.dimattia@roma1.infn.it>
-author Stefano Giagu        <stefano.giagu@cern.ch>
-
-use	AtlasPolicy	AtlasPolicy-*
-use     GaudiInterface  GaudiInterface-*    External
-use	CLIDSvc		CLIDSvc-*	    Control
-use	EventKernel	EventKernel-*	    Event
-use	FourMom		FourMom-*	    Event
-use	Particle	Particle-*	    Reconstruction
-use	Navigation	Navigation-*	    Control
-use	TrigInDetEvent  TrigInDetEvent-*    Trigger/TrigEvent
-use 	DataModel       DataModel-*         Control
-use     SGTools         SGTools-*           Control
-
-
-library TrigMuonEvent *.cxx
-
-apply_pattern installed_library 
-
-
-private
-use	AtlasReflex		AtlasReflex-*		External -no_auto_imports
-use  MuonSegment        MuonSegment-*           MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use  MuonPattern        MuonPattern-*           MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use  MuidEvent          MuidEvent-*             Reconstruction/MuonIdentification
-use  TrigNavigation        TrigNavigation-*        Trigger/TrigEvent
-use  xAODMuon		   xAODMuon-*		   Event/xAOD
-use  xAODTrigMuon		   xAODTrigMuon-*		   Event/xAOD
-
-#do not remove dependency on TrigSerialize* from the private section of the requirements
-#it is needed for generating of the convertors (checkreq should not complain about it anymore)
-use TrigSerializeUtils  TrigSerializeUtils-*    Trigger/TrigDataAccess
-
-#
-
-use  AthenaKernel       AthenaKernel-*          Control         
-
-apply_pattern lcgdict dict=TrigMuonEvent_c selectionfile=selection_c.xml \
-	headerfiles="../TrigMuonEvent/TrigMuonEvent_cDict.h"
-
-apply_pattern lcgdict dict=TrigMuonEvent selectionfile=selection.xml \
-	headerfiles="../TrigMuonEvent/TrigMuonEventDict.h" \
-    dataLinks="MuonFeature CombinedMuonFeature IsoMuonFeature TrigMuonClusterFeature TrigMuonEFContainer TileMuFeature TileTrackMuFeature TrigMuonEFIsolationContainer"  \
-	elementLinks="MuonFeatureContainer CombinedMuonFeatureContainer IsoMuonFeatureContainer TrigMuonClusterFeatureContainer TileMuFeatureContainer TileTrackMuFeatureContainer TrigMuonEFInfoContainer"
-
-apply_pattern sercnv \
-files="-s=${TrigMuonEvent_root}/TrigMuonEvent MuonFeature.h MuonFeatureContainer.h \
-					      CombinedMuonFeature.h CombinedMuonFeatureContainer.h \
-					      IsoMuonFeature.h IsoMuonFeatureContainer.h \
-					      TrigMuonClusterFeature.h TrigMuonClusterFeatureContainer.h \
-					      TrigMuonEF.h TrigMuonEFContainer.h \
-					      TileMuFeature.h TileMuFeatureContainer.h \
-					      TileTrackMuFeature.h TileTrackMuFeatureContainer.h \
-					      TrigMuonEFTrack.h TrigMuonEFCbTrack.h \
-					      TrigMuonEFInfo.h TrigMuonEFInfoContainer.h \
-					      TrigMuonEFInfoTrack.h TrigMuonEFInfoTrackContainer.h  \
-					      TrigMuonEFIsolation.h TrigMuonEFIsolationContainer.h \
-					      MuonFeatureDetails.h MuonFeatureDetailsContainer.h" 
-
-apply_pattern sercnv \
-libtag="xAOD" \
-typesWithNamespace="xAOD::MuonContainer xAOD::MuonAuxContainer xAOD::L2StandAloneMuonContainer xAOD::L2StandAloneMuonAuxContainer xAOD::L2CombinedMuonContainer xAOD::L2CombinedMuonAuxContainer xAOD::L2IsoMuonContainer xAOD::L2IsoMuonAuxContainer" \
-files="-s=${xAODMuon_root}/xAODMuon MuonContainer.h MuonAuxContainer.h \
-       -s=${xAODTrigMuon_root}/xAODTrigMuon L2StandAloneMuonContainer.h L2StandAloneMuonAuxContainer.h L2CombinedMuonContainer.h L2CombinedMuonAuxContainer.h L2IsoMuonContainer.h L2IsoMuonAuxContainer.h"
-
-use TestTools      TestTools-*         AtlasTest
-apply_pattern UnitTest_run unit_test=Operators extrapatterns=".*"
-end_private
diff --git a/Trigger/TrigEvent/TrigMuonEvent/doc/packagedoc.h b/Trigger/TrigEvent/TrigMuonEvent/doc/packagedoc.h
index cf012b0033c34bb23aa8456f2602344b5a75a8f3..653be12f80477983dd89eba8aa8779541734e878 100644
--- a/Trigger/TrigEvent/TrigMuonEvent/doc/packagedoc.h
+++ b/Trigger/TrigEvent/TrigMuonEvent/doc/packagedoc.h
@@ -33,16 +33,6 @@ storage.
   - TrigMuonEFInfoTrackContainer : container for TrigMuonEFInfo
 
 
-@ref used_TrigMuonEvent
 
-@ref requirements_TrigMuonEvent
 
 */
-
-/**
-@page used_TrigMuonEvent Used Packages
-*/
-
-/**
-@page requirements_TrigMuonEvent Requirements
-*/
diff --git a/Trigger/TrigEvent/TrigMuonEventTPCnv/cmt/requirements b/Trigger/TrigEvent/TrigMuonEventTPCnv/cmt/requirements
deleted file mode 100644
index 07d9d727e11e1de0907bbb5dee72b2a81fb66be8..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigMuonEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,76 +0,0 @@
-package TrigMuonEventTPCnv
-
-author Andrew Hamilton     <Andrew.Hamilton@cern.ch>
-author Fabrizio Salvatore  <P.F.Salvatore@sussex.ac.uk>
-
-use AtlasPolicy          AtlasPolicy-*
-
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use AthenaPoolUtilities  AthenaPoolUtilities-*	    Database/AthenaPOOL
-use EventCommonTPCnv     EventCommonTPCnv-*         Event
-use DataModel		 DataModel-*		    Control
-use DataModelAthenaPool  DataModelAthenaPool-*      Control
-use FourMom              FourMom-*                  Event
-use TrigMuonEvent        TrigMuonEvent-*            Trigger/TrigEvent
-use TrigInDetEventTPCnv  TrigInDetEventTPCnv-*      Trigger/TrigEvent
-use Particle		 Particle-*		    Reconstruction
-use TrigInDetEventTPCnv  TrigInDetEventTPCnv-*   Trigger/TrigEvent
-
-branches TrigMuonEventTPCnv src
-
-library TrigMuonEventTPCnv *.cxx
-apply_pattern tpcnv_library
-
-
-private
-
-use GaudiInterface       GaudiInterface-*           External
-use AtlasReflex		 AtlasReflex-*		    External
-use AthenaKernel         AthenaKernel-*             Control
-use CxxUtils             CxxUtils-*                 Control
-use SGTools              SGTools-*                  Control
-
-# Create a dictionary for the persistent representation 
-# of transient classes.  If we make a single dictionary,
-# the compiler runs out of memory on the generated source.
-
-apply_pattern lcgdict dict=TrigMuonEventTPCnv  \
-  selectionfile=selection.xml \
-  headerfiles="../TrigMuonEventTPCnv/TrigMuonEventTPCnvDict.h"
-
-apply_pattern lcgdict dict=OLD_TrigMuonEventTPCnv  \
-  selectionfile=OLD_selection.xml \
-  headerfiles="../TrigMuonEventTPCnv/TrigMuonEventTPCnvDict.h"
-
-end_private
-
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=CombinedMuonFeatureCnv_p2
-apply_pattern UnitTest_run unit_test=CombinedMuonFeatureCnv_p3
-apply_pattern UnitTest_run unit_test=CombinedMuonFeatureCnv_p4
-apply_pattern UnitTest_run unit_test=IsoMuonFeatureCnv_p3
-apply_pattern UnitTest_run unit_test=MuonFeatureCnv_p1
-apply_pattern UnitTest_run unit_test=MuonFeatureCnv_p2
-apply_pattern UnitTest_run unit_test=MuonFeatureCnv_p3
-apply_pattern UnitTest_run unit_test=MuonFeatureDetailsCnv_p1
-apply_pattern UnitTest_run unit_test=MuonFeatureDetailsCnv_p2
-apply_pattern UnitTest_run unit_test=TileMuFeatureCnv_p1
-apply_pattern UnitTest_run unit_test=TileMuFeatureCnv_p2
-apply_pattern UnitTest_run unit_test=TileTrackMuFeatureCnv_p2
-apply_pattern UnitTest_run unit_test=TileTrackMuFeatureCnv_p3
-apply_pattern UnitTest_run unit_test=TrigMuonClusterFeatureCnv_p1
-apply_pattern UnitTest_run unit_test=TrigMuonEFCbTrackCnv_p5
-apply_pattern UnitTest_run unit_test=TrigMuonEFCbTrackCnv_p6
-apply_pattern UnitTest_run unit_test=TrigMuonEFCbTrackCnv_p7
-apply_pattern UnitTest_run unit_test=TrigMuonEFCnv_p1
-apply_pattern UnitTest_run unit_test=TrigMuonEFCnv_p2
-apply_pattern UnitTest_run unit_test=TrigMuonEFInfoCnv_p4
-apply_pattern UnitTest_run unit_test=TrigMuonEFInfoCnv_p5
-apply_pattern UnitTest_run unit_test=TrigMuonEFInfoTrackCnv_p1
-apply_pattern UnitTest_run unit_test=TrigMuonEFIsolationCnv_p1
-apply_pattern UnitTest_run unit_test=TrigMuonEFIsolationCnv_p2
-apply_pattern UnitTest_run unit_test=TrigMuonEFTrackCnv_p5
-apply_pattern UnitTest_run unit_test=TrigMuonEFTrackCnv_p6
-
diff --git a/Trigger/TrigEvent/TrigNavStructure/cmt/Makefile.RootCore b/Trigger/TrigEvent/TrigNavStructure/cmt/Makefile.RootCore
deleted file mode 100644
index 97bb5e3ff56ad8bcfaeb27734b1b1ac12e1fa810..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigNavStructure/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,24 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = TrigNavStructure
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = -lboost_regex
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = Asg_Boost AsgTools
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 0
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 0
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigEvent/TrigNavStructure/cmt/requirements b/Trigger/TrigEvent/TrigNavStructure/cmt/requirements
deleted file mode 100644
index 336f8a876a41d08d92826a8a1191f140851a4447..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigNavStructure/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigNavStructure
-author  Tomasz Bold
-
-## for athena policies: this has to be the first use statement
-use AtlasPolicy    AtlasPolicy-*
-use AtlasBoost     AtlasBoost-*        External
-use AsgTools	   AsgTools-*	       Control/AthToolSupport
-#use xAODCore	   xAODCore-*	       Event/xAOD
-use AthContainers  AthContainers-*     Control
-
-## Build an installed library:
-library TrigNavStructure ../Root/*.cxx
-apply_pattern installed_library
-
-private
-
-# Private dependencies:
-
-# Set up the package's unit tests:
-use TestTools      TestTools-*         AtlasTest
-#apply_pattern UnitTest_run unit_test=ut_build_trignav extrapatterns=".*"
-#apply_pattern UnitTest_run unit_test=ut_features extrapatterns=".*"
-#apply_pattern UnitTest_run unit_test=ut_serializer extrapatterns=".*"
-apply_pattern UnitTest_run unit_test=ut_iterators extrapatterns=".*"
-
-end_private
diff --git a/Trigger/TrigEvent/TrigNavTools/cmt/requirements b/Trigger/TrigEvent/TrigNavTools/cmt/requirements
deleted file mode 100755
index 0271ce6e5c615106eec4522d7c6d755dfbb10686..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigNavTools/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-package TrigNavTools
-
-author Ben Smith <bcsmith@fas.harvard.edu> 
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  AthenaKernel               AthenaKernel-*                  Control
-use  TrigNavigation             TrigNavigation-*                Trigger/TrigEvent
-use  TrigDecisionTool           TrigDecisionTool-*              Trigger/TrigAnalysis
-
-
-
-private
-use  AtlasBoost                 AtlasBoost-*                    External
-use  GaudiInterface             GaudiInterface-*                External
-use  StoreGate                  StoreGate-*                     Control
-use  TrigConfHLTData            TrigConfHLTData-*               Trigger/TrigConfiguration
-
-
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  xAODTrigger          	xAODTrigger-*             	Event/xAOD
-use DerivationFrameworkInterfaces   DerivationFrameworkInterfaces-*    PhysicsAnalysis/DerivationFramework
-end_private
-
-#library
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="__init__.py TrigNavToolsConfig.py"
diff --git a/Trigger/TrigEvent/TrigNavTools/doc/packagedoc.h b/Trigger/TrigEvent/TrigNavTools/doc/packagedoc.h
index 2d46df3830b86c2333f1b3fc404f107437e4e1f8..3ac68b93ba0f1c8e9ac7c2bfb1a590350bf36e50 100644
--- a/Trigger/TrigEvent/TrigNavTools/doc/packagedoc.h
+++ b/Trigger/TrigEvent/TrigNavTools/doc/packagedoc.h
@@ -17,4 +17,3 @@
   share directory
 
 */
-
diff --git a/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.h b/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.h
index cd69956551c34f12698ee419910b85dd461c84d8..6a05d611459f3c049bb8ad36884d6de4537ed816 100644
--- a/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.h
+++ b/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.h
@@ -29,7 +29,7 @@ public:
   
   // specifics of ITrigNavigationThinningSvc
 
-  StatusCode doSlimming( std::vector<uint32_t>& slimmed_and_serialized ) override
+  virtual StatusCode doSlimming( std::vector<uint32_t>& slimmed_and_serialized ) override
  { return m_slimmingTool->doSlimming(slimmed_and_serialized);  }
   
   // forwards of ThinningSvc
diff --git a/Trigger/TrigEvent/TrigNavigation/TrigNavigation/NavigationCore.icc b/Trigger/TrigEvent/TrigNavigation/TrigNavigation/NavigationCore.icc
index 73224e9e9632fc30acf1742f1c94db88756c48d8..0d78f22864d67c1b3567741c21d4daafcaa6251c 100644
--- a/Trigger/TrigEvent/TrigNavigation/TrigNavigation/NavigationCore.icc
+++ b/Trigger/TrigEvent/TrigNavigation/TrigNavigation/NavigationCore.icc
@@ -92,6 +92,9 @@ bool HLT::NavigationCore::getFeature( const TriggerElement* te, const T*&  featu
   TriggerElement::ObjectIndex objectIndex(fea.getIndex());
   
   HLTNavDetails::Holder<T>* holder = getHolder<T>(objectIndex.subTypeIndex());
+  if (!holder) {
+    return false;
+  }
   
   if ( holder->get(feature, objectIndex) == false ) {
     MLOG(WARNING) << "getFeature: problems while getting objects #" << objectIndex
diff --git a/Trigger/TrigEvent/TrigNavigation/cmt/requirements b/Trigger/TrigEvent/TrigNavigation/cmt/requirements
deleted file mode 100644
index f79c2eecd423680d56373df9dfc0a9ca6990b16c..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigNavigation/cmt/requirements
+++ /dev/null
@@ -1,62 +0,0 @@
-package TrigNavigation
-author Tomasz.Bold@cern.ch
-
-use  AtlasPolicy                AtlasPolicy-*
-
-use  AtlasBoost                 AtlasBoost-*                    External
-use  AtlasROOT                  AtlasROOT-*                     External
-use  GaudiInterface             GaudiInterface-*                External
-use  CLIDSvc                    CLIDSvc-*                       Control
-use  StoreGate                  StoreGate-*                     Control
-use  SGTools                    SGTools-*                       Control
-use  AthContainers              AthContainers-*                 Control
-use  AthLinks                   AthLinks-*                      Control
-use  AthenaKernel               AthenaKernel-*                  Control
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  TrigStorageDefinitions     TrigStorageDefinitions-*        Trigger/TrigEvent
-use  TrigNavStructure           TrigNavStructure-*              Trigger/TrigEvent
-use  AsgTools			AsgTools-*			Control/AthToolSupport
-private
-use  TrigSerializeResult        TrigSerializeResult-*           Trigger/TrigDataAccess
-use  AthContainersInterfaces    AthContainersInterfaces-*       Control
-use  CxxUtils                   CxxUtils-*                      Control
-
-
-public
-apply_pattern dual_use_library files=*.cxx
-#library TrigNavigation *.cxx
-#apply_pattern installed_library
-#apply_pattern declare_non_standard_include name=doc
-apply_pattern declare_python_modules files="*.py"
-
-
-private
-use     TrigConfHLTData     TrigConfHLTData-*       Trigger/TrigConfiguration
-use     xAODCore                  xAODCore-*        Event/xAOD # for tests only
-use     TrigSerializeCnvSvc TrigSerializeCnvSvc-*   Trigger/TrigDataAccess
-use     AtlasReflex               AtlasReflex-*          External -no_auto_import
-use     RootUtils           RootUtils-*             Control
-use     AthContainersRoot   AthContainersRoot-*     Control
-
-
-
-
-# UnitTest programs
-apply_pattern declare_joboptions files="test.txt navigation2dot.py"
-
-use TestTools      TestTools-*         AtlasTest
-apply_pattern UnitTest_run unit_test=TriggerElement
-apply_pattern UnitTest_run unit_test=Holder extrapatterns="^ClassIDSvc *VERBOSE|added entry for CLID|TStreamerInfo for|no dictionary for class"
-apply_pattern UnitTest_run unit_test=Registration extrapatterns="when retrieved"
-
-apply_pattern UnitTest_run unit_test=Ownership extrapatterns="when retrieved"
-
-apply_pattern UnitTest_run unit_test=HLTNavigation extrapatterns="when retrieved"
-apply_pattern UnitTest_run unit_test=RoICache extrapatterns="when retrieved"
-
-
-
-apply_pattern lcgdict dict=TrigNavigation selectionfile=selection.xml headerfiles="../TrigNavigation/TrigNavigationDict.h" \
-  extralibfiles=../test/dict/*.cxx
-
-end_private
diff --git a/Trigger/TrigEvent/TrigParticle/CMakeLists.txt b/Trigger/TrigEvent/TrigParticle/CMakeLists.txt
index 7ac5143b76b3872768c4c4ec205d29e84df47017..c551e23aacecd0bf6a7bc09546b698e1ccfac562 100644
--- a/Trigger/TrigEvent/TrigParticle/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigParticle/CMakeLists.txt
@@ -29,7 +29,6 @@ atlas_depends_on_subdirs( PUBLIC
                           Reconstruction/egamma/egammaEvent
                           Reconstruction/tauEvent
                           Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigDataAccess/TrigSerializeUtils
                           Trigger/TrigEvent/TrigNavigation )
 
 # External dependencies:
diff --git a/Trigger/TrigEvent/TrigParticle/cmt/requirements b/Trigger/TrigEvent/TrigParticle/cmt/requirements
deleted file mode 100755
index fe85e5116db74beac824b6723516247f1110f6d3..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigParticle/cmt/requirements
+++ /dev/null
@@ -1,107 +0,0 @@
-package TrigParticle
-
-author Ricardo Goncalo <r.goncalo@rhul.ac.uk>
-
-# general stuff:
-use AtlasPolicy	 	AtlasPolicy-*
-use CLIDSvc		CLIDSvc-* 		Control
-use AthContainers 	AthContainers-*      Control
-use AthLinks 	        AthLinks-*           Control
-use Navigation          Navigation-*         Control
-use EventKernel         EventKernel-*        Event
-use FourMom             FourMom-*            Event
-
-# TrigInDetTrack:
-use TrigInDetEvent 	TrigInDetEvent-* 	Trigger/TrigEvent
-
-# TrigEMCluster:
-use TrigCaloEvent	TrigCaloEvent-*   	Trigger/TrigEvent
-
-
-# for TrigEFBjet:
-use Particle		Particle-*		Reconstruction
-use VxVertex		VxVertex-*		Tracking/TrkEvent
-
-public
-
-use SGTools             SGTools-*               Control
-# 
-
-# library
-library TrigParticle *.cxx
-
-apply_pattern installed_library
-
-# Pattern to build the dict lib. 
-private	
-use AtlasReflex   	AtlasReflex-*   	External -no_auto_imports
-use TrigSerializeUtils  TrigSerializeUtils-*    Trigger/TrigDataAccess
-
-# Trigger Navigation
-use TrigNavigation	TrigNavigation-* 	Trigger/TrigEvent
-
-# TrigEMCluster:
-use CaloGeoHelpers      CaloGeoHelpers-*        Calorimeter
-
-# EF storage items
-use JetEvent 		JetEvent-* 		Reconstruction/Jet
-use egammaEvent         egammaEvent-*		Reconstruction/egamma
-use tauEvent		tauEvent-*		Reconstruction
-
-use xAODTau             xAODTau-*               Event/xAOD
-use xAODJet             xAODJet-*               Event/xAOD
-use xAODTrigEgamma      xAODTrigEgamma-*        Event/xAOD
-use xAODEgamma		xAODEgamma-*		Event/xAOD
-use xAODBTagging        xAODBTagging-*          Event/xAOD
-
-
-apply_pattern lcgdict dict=TrigParticle selectionfile=selection.xml headerfiles="../TrigParticle/TrigParticleDict.h" \
-    dataLinks="TrigTau TrigPhotonContainer TrigEFBjetContainer TrigL2BjetContainer" \
-    elementLinks="TrigL2BphysContainer TrigEFBphysContainer TrigElectronContainer"
-
-
-#the list should be kept in sync with TrigParticleStorageDefinitions.cxx
-apply_pattern sercnv \
-typesWithNamespace="Analysis::TauJetContainer Analysis::TauDetailsContainer" \
-files="-s=${TrigParticle_root}/TrigParticle TrigElectron.h TrigElectronContainer.h \
-                                            TrigPhoton.h TrigPhotonContainer.h \
-                                            TrigTau.h TrigTauContainer.h \
-                                            TrigL2Bjet.h TrigL2BjetContainer.h \
-                                            TrigEFBjet.h TrigEFBjetContainer.h \
-                                            TrigL2Bphys.h TrigL2BphysContainer.h \
-                                            TrigEFBphys.h TrigEFBphysContainer.h \
-           -s=${egammaEvent_root}/egammaEvent egammaContainer.h egDetailContainer.h \
-           -s=${tauEvent_root}/tauEvent TauJetContainer.h TauDetailsContainer.h \
-           -s=${JetEvent_root}/JetEvent JetCollection.h \
-           -s=${JetEvent_root}/JetEvent JetMomentMap.h JetMomentMapCollection.h \
-           -s=${JetEvent_root}/JetEvent JetKeyDescriptor.h JetKeyDescriptorCollection.h"
-
-#the list should be kept in sync with TrigParticleStorageDefinitions.cxx
-apply_pattern sercnv \
-libtag="xAOD" \
-typesWithNamespace="xAOD::TauJetContainer xAOD::TauJetAuxContainer \
-                    xAOD::TauTrackContainer xAOD::TauTrackAuxContainer \
-                    xAOD::JetContainer xAOD::JetTrigAuxContainer \
-                    xAOD::TrigPhotonContainer xAOD::TrigPhotonAuxContainer \
-                    xAOD::TrigElectronContainer xAOD::TrigElectronAuxContainer \
-                    xAOD::ElectronContainer xAOD::ElectronAuxContainer \
-                    xAOD::PhotonContainer xAOD::PhotonAuxContainer \
-		    xAOD::ElectronTrigAuxContainer xAOD::PhotonTrigAuxContainer \
-		    xAOD::BTaggingContainer xAOD::BTaggingTrigAuxContainer \
-                    xAOD::BTagVertexContainer xAOD::BTagVertexAuxContainer" \
-    files="-s=${xAODTau_root}/xAODTau TauJetContainer.h TauJetAuxContainer.h TauTrackContainer.h TauTrackAuxContainer.h \
-           -s=${xAODJet_root}/xAODJet JetContainer.h JetTrigAuxContainer.h \
-           -s=${xAODTrigEgamma_root}/xAODTrigEgamma TrigPhotonContainer.h TrigPhotonAuxContainer.h \
-	   					    TrigElectronContainer.h TrigElectronAuxContainer.h \
-						    ElectronTrigAuxContainer.h PhotonTrigAuxContainer.h \
-           -s=${xAODEgamma_root}/xAODEgamma ElectronContainer.h ElectronAuxContainer.h \
-	   				    PhotonContainer.h PhotonAuxContainer.h \
-           -s=${xAODBTagging_root}/xAODBTagging BTaggingContainer.h BTaggingTrigAuxContainer.h \
-						BTagVertexContainer.h BTagVertexAuxContainer.h"
-
-
-#Storage has also  DataVector<INavigable4Momentum>
-
-
-end_private
-
diff --git a/Trigger/TrigEvent/TrigParticle/doc/packagedoc.h b/Trigger/TrigEvent/TrigParticle/doc/packagedoc.h
index 0397b80c390dbabe016882f6aa2507fc29adafd0..8dc9231e3ae25e4a38d5617c0772b4bdb2ede1ff 100644
--- a/Trigger/TrigEvent/TrigParticle/doc/packagedoc.h
+++ b/Trigger/TrigEvent/TrigParticle/doc/packagedoc.h
@@ -21,16 +21,6 @@ This package contains the diverse TrigParticle classes
   - TrigEFBjet   : stores EF Bjet candidates      (Andrea.Coccaro@ge.infn.it)
   - TrigTau      : stores the Tau candidates      (casado@ifae.es)
 
-@ref used_TrigParticle
 
-@ref requirements_TrigParticle
 
 */
-
-/**
-@page used_TrigParticle Used Packages
-*/
-
-/**
-@page requirements_TrigParticle Requirements
-*/
diff --git a/Trigger/TrigEvent/TrigParticleTPCnv/cmt/requirements b/Trigger/TrigEvent/TrigParticleTPCnv/cmt/requirements
deleted file mode 100644
index 3614e5c9fe5d66beefbed7f335ead51e34d3cea0..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigParticleTPCnv/cmt/requirements
+++ /dev/null
@@ -1,76 +0,0 @@
-package TrigParticleTPCnv
-
-author Andrew Hamilton     <Andrew.Hamilton@cern.ch>
-author Fabrizio Salvatore  <P.F.Salvatore@sussex.ac.uk>
-
-use AtlasPolicy          AtlasPolicy-*
-#use CLIDSvc              CLIDSvc-*                  Control
-
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use AthenaPoolUtilities  AthenaPoolUtilities-*	    Database/AthenaPOOL
-use EventCommonTPCnv     EventCommonTPCnv-*         Event
-#use DataModel		 DataModel-*		    Control
-use DataModelAthenaPool  DataModelAthenaPool-*      Control
-#use RootConversions      RootConversions-*          Database/AthenaPOOL
-
-
-# use statements for data packages
-use FourMom              FourMom-*               Event
-use TrigParticle	 TrigParticle-*	         Trigger/TrigEvent
-use TrigCaloEvent	 TrigCaloEvent-*	 Trigger/TrigEvent
-use TrigInDetEvent	 TrigInDetEvent-*	 Trigger/TrigEvent
-use TrigCaloEventTPCnv	 TrigCaloEventTPCnv-*    Trigger/TrigEvent
-use TrigInDetEventTPCnv	 TrigInDetEventTPCnv-*   Trigger/TrigEvent
-
-use Particle		Particle-*		Reconstruction
-use TrackParticleTPCnv	TrackParticleTPCnv-*	Reconstruction
-
-branches TrigParticleTPCnv src
-
-library TrigParticleTPCnv *.cxx
-apply_pattern tpcnv_library
-
-
-private
-
-use AtlasReflex		 AtlasReflex-*		    External
-use GaudiInterface       GaudiInterface-*           External
-use AtlasCLHEP           AtlasCLHEP-*               External
-use AthenaKernel         AthenaKernel-*             Control
-use SGTools              SGTools-*                  Control
-
-# Create a dictionary for the persistent representation 
-# of transient classes.  If we make a single dictionary,
-# the compiler runs out of memory on the generated source.
-
-apply_pattern lcgdict dict=TrigParticleTPCnv \
-  selectionfile=selection.xml \
-  headerfiles="../TrigParticleTPCnv/TrigParticleTPCnvDict.h"
-
-
-apply_pattern lcgdict dict=OLD_TrigParticleTPCnv  \
-  selectionfile=OLD_selection.xml \
-  headerfiles="../TrigParticleTPCnv/TrigParticleTPCnvDict.h"
-
-end_private
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=TrigEFBjetCnv_p1
-apply_pattern UnitTest_run unit_test=TrigEFBjetCnv_p2
-apply_pattern UnitTest_run unit_test=TrigEFBphysCnv_p1
-apply_pattern UnitTest_run unit_test=TrigEFBphysCnv_p2
-apply_pattern UnitTest_run unit_test=TrigEFBphysCnv_p3
-apply_pattern UnitTest_run unit_test=TrigElectronCnv_p2
-apply_pattern UnitTest_run unit_test=TrigElectronCnv_p3
-apply_pattern UnitTest_run unit_test=TrigL2BjetCnv_p1
-apply_pattern UnitTest_run unit_test=TrigL2BjetCnv_p2
-apply_pattern UnitTest_run unit_test=TrigL2BjetCnv_p3
-apply_pattern UnitTest_run unit_test=TrigL2BphysCnv_p1
-apply_pattern UnitTest_run unit_test=TrigL2BphysCnv_p2
-apply_pattern UnitTest_run unit_test=TrigL2BphysCnv_p3
-apply_pattern UnitTest_run unit_test=TrigPhotonCnv_p2
-apply_pattern UnitTest_run unit_test=TrigPhotonCnv_p3
-apply_pattern UnitTest_run unit_test=TrigTauCnv_p1
-apply_pattern UnitTest_run unit_test=TrigTauCnv_p2
-apply_pattern UnitTest_run unit_test=TrigTauCnv_p3
diff --git a/Trigger/TrigEvent/TrigRoiConversion/cmt/Makefile.RootCore b/Trigger/TrigEvent/TrigRoiConversion/cmt/Makefile.RootCore
deleted file mode 100644
index 486a7c6b5725f720614c82f4e5ffa043e509a403..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigRoiConversion/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,51 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-# the name of the package:
-PACKAGE          = TrigRoiConversion
-
-# the list of packages we depend on:
-PACKAGE_DEP      = TrigSteeringEvent xAODTrigger
-
-# the libraries to link with this one:
-PACKAGE_PRELOAD  = 
-
-# additional compilation flags to pass (not propagated to dependent packages):
-PACKAGE_CXXFLAGS = 
-
-# additional compilation flags to pass (propagated to dependent packages):
-PACKAGE_OBJFLAGS = 
-
-# additional linker flags to pass (for compiling the library):
-PACKAGE_LDFLAGS  = 
-
-# additional linker flags to pass (for compiling binaries):
-PACKAGE_BINFLAGS = 
-
-# additional linker flags to pass (propagated to client libraries):
-PACKAGE_LIBFLAGS = 
-
-# the list of packages we use if present, but that we can work without :
-PACKAGE_TRYDEP   = 
-
-# list pattern of scripts to link directly into binary path:
-PACKAGE_SCRIPTS  = 
-
-# whether to use pedantic compilation:
-PACKAGE_PEDANTIC = 1
-
-# whether to turn *off* optimization (set to dict to do it only for
-# dictionaries):
-PACKAGE_NOOPT    = 0
-
-# whether to build no library (needs to be set if no source files are
-# present):
-PACKAGE_NOCC     = 0
-
-# whether we build a reflex dictionary:
-PACKAGE_REFLEX   = 0
-
-include $(ROOTCOREDIR)/Makefile-common
\ No newline at end of file
diff --git a/Trigger/TrigEvent/TrigRoiConversion/cmt/requirements b/Trigger/TrigEvent/TrigRoiConversion/cmt/requirements
deleted file mode 100644
index e63eb8437cc9ffa7f220196f7c90daddb1ddde4d..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigRoiConversion/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-package TrigRoiConversion
-
-author Mark Sutton <sutt@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-use TrigSteeringEvent	  TrigSteeringEvent-*            Trigger/TrigEvent
-# use IRegionSelector     IRegionSelector-*            DetectorDescription
-
-use AsgTools            AsgTools-*                      Control/AthToolSupport
-
-private
-
-use AthenaBaseComps	AthenaBaseComps-*		Control
-
-# use AthenaKernel          AthenaKernel-*               Control
-use GaudiInterface          GaudiInterface-*             External
-# use AtlasBoost            AtlasBoost-*                 External
-# use AtlasCLHEP            AtlasCLHEP-*                 External
-# use ByteStreamCnvSvcBase  ByteStreamCnvSvcBase-*       Event
-# use TrigNavigation        TrigNavigation-*             Trigger/TrigEvent
-# use RoiDescriptor         RoiDescriptor-*              DetectorDescription
-use xAODTrigger             xAODTrigger-*                Event/xAOD
-
-
-# library TrigRoiConversion *.cxx ../Root/*.cxx components/*.cxx
-apply_pattern dual_use_library files="../Root/*.cxx ../src/*.cxx"
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
diff --git a/Trigger/TrigEvent/TrigSteeringEvent/cmt/Makefile.RootCore b/Trigger/TrigEvent/TrigSteeringEvent/cmt/Makefile.RootCore
deleted file mode 100644
index 9f5690e00e8965ac035d62a49eb9173ef7281996..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigSteeringEvent/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,25 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = TrigSteeringEvent
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP = EventLoop TrigConfL1Data AsgTools TrigConfHLTData RoiDescriptor
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOGRID   = 
-PACKAGE_PEDANTIC = 0
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_REFLEX   = 0
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigEvent/TrigSteeringEvent/cmt/requirements b/Trigger/TrigEvent/TrigSteeringEvent/cmt/requirements
deleted file mode 100644
index 39acad3e383ca8ddbc9f749d8ac1c4a724ceb3ae..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigSteeringEvent/cmt/requirements
+++ /dev/null
@@ -1,79 +0,0 @@
-package TrigSteeringEvent
-
-use AtlasPolicy         AtlasPolicy-*
-use CLIDSvc             CLIDSvc-*                Control
-use GaudiInterface      GaudiInterface-*         External
-use SGTools             SGTools-*                Control
-use TrigConfHLTData     TrigConfHLTData-*        Trigger/TrigConfiguration
-
-use_ifndef pplist="XAOD_ANALYSIS" pkg="External/DataCollection"
-# use_ifndef pplist="XAOD_ANALYSIS" pkg="DetectorDescription/RoiDescriptor"
-use RoiDescriptor       RoiDescriptor-*          DetectorDescription
-
-use xAODCore		xAODCore-*		 Event/xAOD
-use AsgTools		AsgTools-*		 Control/AthToolSupport
-use AthContainers	AthContainers-*		 Control
-
-library TrigSteeringEvent ../Root/*.cxx *.cxx
-apply_pattern installed_library
-#apply_pattern dual_use_library files="../Root/*.cxx ../src/*.cxx"
-
-macro_prepend TrigSteeringEvent_linkopts " $(notAsNeeded_linkopt)"
-macro_append  TrigSteeringEvent_linkopts " $(asNeeded_linkopt)"
-
-use AthenaKernel        AthenaKernel-*           Control
-
-private
-#use xAODTrigger         xAODTrigger-*            Event/xAOD 
-use_ifndef pplist="XAOD_ANALYSIS" pkg="Event/xAOD/xAODTrigger"
-
-use AtlasReflex         AtlasReflex-*            External -no_auto_import
-use_ifndef pplist="XAOD_ANALYSIS" pkg="Trigger/TrigDataAccess/TrigSerializeUtils"
-use_ifndef pplist="XAOD_ANALYSIS" pkg="Trigger/TrigT1/TrigT1Interfaces"
-use_ifndef pplist="XAOD_ANALYSIS" pkg="Trigger/TrigEvent/TrigNavigation"
-
-
-pattern dummypattern \
-  macro dummymacro "dummyvalue_<selectionfile>_<dict>_<headerfiles>_<dataLinks>_<files>_<typesWithNamespace>_<libtag>"
-
-#macro dictpatternname			"lcgdict" \
-#		      AthAnalysisBase		"dummypattern"
-
-macro sercnvpatternname			"sercnv" \
-		      AthAnalysisBase	"dummypattern"
-      		  
-
-apply_pattern lcgdict dict=TrigSteeringEvent selectionfile="selection.xml" \
-        headerfiles="../TrigSteeringEvent/TrigSteeringEventDict.h" \
-        dataLinks="TrigRoiDescriptor TrigSuperRoi"
-
-apply_pattern $(sercnvpatternname) typesWithNamespace="LVL1::RecJetRoI LVL1::RecJetEtRoI LVL1::RecEmTauRoI LVL1::RecEnergyRoI LVL1::RecMuonRoI \
-	      			   	xAOD::TrigCompositeContainer xAOD::TrigCompositeAuxContainer" \
-                                         files="-s=${TrigSteeringEvent_root}/TrigSteeringEvent TrigRoiDescriptor.h TrigSuperRoi.h \
-                                         TrigPassFlags.h  TrigPassFlagsCollection.h \
-                                         TrigRoiDescriptorCollection.h\
-                                         TrigSuperRoiCollection.h\
-                                         TrigOperationalInfo.h TrigOperationalInfoCollection.h \
-                                         TrigPassBits.h TrigPassBitsCollection.h \
-                                         -s=${TrigT1Interfaces_root}/TrigT1Interfaces RecJetRoI.h RecEmTauRoI.h \
-                                         RecEnergyRoI.h RecJetEtRoI.h RecMuonRoI.h \
-					 -s=${xAODTrigger_root}/xAODTrigger TrigCompositeContainer.h TrigCompositeAuxContainer.h"
-
-apply_pattern $(sercnvpatternname) \
-libtag="xAOD" \
-typesWithNamespace="xAOD::TrigPassBits xAOD::TrigPassBitsContainer xAOD::TrigPassBitsAuxContainer" \
-files="-s=${xAODTrigger_root}/xAODTrigger TrigPassBitsContainer.h TrigPassBitsAuxContainer.h"
-
-
-use TestTools      TestTools-*         AtlasTest
-apply_pattern UnitTest_run unit_test=Enums
-apply_pattern UnitTest_run unit_test=Operators
-apply_pattern UnitTest_run unit_test=Truncation
-apply_pattern UnitTest_run unit_test=TrigPassBits
-apply_pattern UnitTest_run unit_test=HLTExtraData
-apply_pattern UnitTest_run unit_test=StringSerializer
-
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-end_private
diff --git a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/cmt/requirements b/Trigger/TrigEvent/TrigSteeringEventAthenaPool/cmt/requirements
deleted file mode 100644
index 698f479a3ff6eda003cefc5ee3cc0b67823e396b..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigSteeringEventAthenaPool/cmt/requirements
+++ /dev/null
@@ -1,48 +0,0 @@
-package TrigSteeringEventAthenaPool
-author NLAA
-author will
-
-use AtlasPolicy          AtlasPolicy-*
-use GaudiInterface       GaudiInterface-*        External
-use AthenaPoolUtilities  AthenaPoolUtilities-*   Database/AthenaPOOL
-
-# use statements for data packages
-use TrigSteeringEvent    TrigSteeringEvent-*     Trigger/TrigEvent
-
-# use statement for converters
-private
-use TrigSteeringEventTPCnv    TrigSteeringEventTPCnv-*     Trigger/TrigEvent
-end_private
-
-macro TrigSteeringEventAthenaPool_whattocompile "TrigRoiDescriptor.h TrigRoiDescriptorCollection.h TrigPassBits.h TrigPassBitsCollection.h TrigPassFlags.h TrigPassFlagsCollection.h GenericResult.h Lvl1Result.h HLTResult.h TrigOperationalInfo.h TrigOperationalInfoCollection.h" AthAnalysisBase "TrigRoiDescriptor.h TrigRoiDescriptorCollection.h  TrigPassBits.h TrigPassBitsCollection.h TrigPassFlags.h TrigPassFlagsCollection.h TrigOperationalInfo.h TrigOperationalInfoCollection.h"
-
-
-apply_pattern poolcnv typesWithNamespace="HLT::HLTResult LVL1CTP::Lvl1Result" \
-      files="-s=${TrigSteeringEvent_root}/TrigSteeringEvent $(TrigSteeringEventAthenaPool_whattocompile)"
-
-apply_pattern declare_joboptions files="*.py"
-
-private
-use TestTools            TestTools-*                AtlasTest -no_auto_imports
-
-
-apply_pattern athenarun_test \
-   name="TrigSteeringEventAthenaPool_15.6.1" \
-   options="TrigSteeringEventAthenaPool/TrigSteeringEventAthenaPool_15.6.1_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigSteeringEventAthenaPool_15.6.1" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigSteeringEventAthenaPool_15.6.1"
-
-
-apply_pattern athenarun_test \
-   name="TrigSteeringEventAthenaPool_18.0.0" \
-   options="TrigSteeringEventAthenaPool/TrigSteeringEventAthenaPool_18.0.0_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigSteeringEventAthenaPool_18.0.0" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigSteeringEventAthenaPool_18.0.0"
-
-
-apply_pattern athenarun_test \
-   name="TrigSteeringEventAthenaPool_20.1.7.2" \
-   options="TrigSteeringEventAthenaPool/TrigSteeringEventAthenaPool_20.1.7.2_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigSteeringEventAthenaPool_20.1.7.2" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigSteeringEventAthenaPool_20.1.7.2"
-
diff --git a/Trigger/TrigEvent/TrigSteeringEventTPCnv/cmt/requirements b/Trigger/TrigEvent/TrigSteeringEventTPCnv/cmt/requirements
deleted file mode 100644
index 88d7472589886a6598bcea9584228e7625e5fbe2..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigSteeringEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,67 +0,0 @@
-package TrigSteeringEventTPCnv
-
-author Andrew Hamilton     <Andrew.Hamilton@cern.ch>
-author Fabrizio Salvatore  <P.F.Salvatore@sussex.ac.uk>
-
-use AtlasPolicy          AtlasPolicy-*
-private
-use AtlasReflex		     AtlasReflex-*              External
-use AthenaKernel         AthenaKernel-*             Control
-end_private
-#use CLIDSvc              CLIDSvc-*                  Control
-
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use AthenaPoolUtilities  AthenaPoolUtilities-*	    Database/AthenaPOOL
-#use EventCommonTPCnv     EventCommonTPCnv-*         Event
-#use DataModel		 DataModel-*		    Control
-#use DataModelAthenaPool  DataModelAthenaPool-*      Control
-#use RootConversions      RootConversions-*          Database/AthenaPOOL
-
-
-# use statements for data packages
-#use FourMom              FourMom-*               Event
-use TrigSteeringEvent    TrigSteeringEvent-*     Trigger/TrigEvent
-
-#use Particle		Particle-*		Reconstruction
-#use TrackParticleTPCnv	TrackParticleTPCnv-*	Reconstruction
-
-
-private
-use GaudiInterface	  GaudiInterface-*              External
-end_private
-
-branches TrigSteeringEventTPCnv src
-
-macro TrigSteeringEventTPCnv_whattocompile "*.cxx"
-
-library TrigSteeringEventTPCnv $(TrigSteeringEventTPCnv_whattocompile)
-apply_pattern tpcnv_library
-
-
-private
-
-# Create a dictionary for the persistent representation 
-# of transient classes.  If we make a single dictionary,
-# the compiler runs out of memory on the generated source.
-
-apply_pattern lcgdict dict=TrigSteeringEventTPCnv \
-  selectionfile=selection.xml \
-  headerfiles="../TrigSteeringEventTPCnv/TrigSteeringEventTPCnvDict.h"
-
-apply_pattern lcgdict dict=OLD_TrigSteeringEventTPCnv \
-  selectionfile=OLD_selection.xml \
-  headerfiles="../TrigSteeringEventTPCnv/TrigSteeringEventTPCnvDict.h"
-
-end_private
-
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=HLTResultCnv_p1
-apply_pattern UnitTest_run unit_test=Lvl1ResultCnv_p2
-apply_pattern UnitTest_run unit_test=TrigOperationalInfoCnv_p1
-apply_pattern UnitTest_run unit_test=TrigPassBitsCnv_p1
-apply_pattern UnitTest_run unit_test=TrigPassFlagsCnv_p1
-apply_pattern UnitTest_run unit_test=TrigRoiDescriptorCnv_p1
-apply_pattern UnitTest_run unit_test=TrigRoiDescriptorCnv_p2
-apply_pattern UnitTest_run unit_test=TrigRoiDescriptorCnv_p3
diff --git a/Trigger/TrigEvent/TrigStorageDefinitions/cmt/requirements b/Trigger/TrigEvent/TrigStorageDefinitions/cmt/requirements
deleted file mode 100644
index fb3d0109f004e8992e108d4fc20d9cb67e96d5f2..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigStorageDefinitions/cmt/requirements
+++ /dev/null
@@ -1,40 +0,0 @@
-package TrigStorageDefinitions
-
-author lukas.heinrich@cern.ch
-
-public
-use  AtlasPolicy                AtlasPolicy-*
-use  AthLinks                   AthLinks-*                      Control
-use  AthContainers              AthContainers-*                 Control
-use  Navigation                 Navigation-*                    Control
-use  AtlasBoost                 AtlasBoost-*                    External
-use  xAODCaloEvent              xAODCaloEvent-*                 Event/xAOD
-use  xAODEgamma                 xAODEgamma-*                    Event/xAOD
-use  xAODTracking		        xAODTracking-*			        Event/xAOD
-use  xAODMuon			        xAODMuon-*			            Event/xAOD
-use  xAODTau			        xAODTau-*			            Event/xAOD
-use  xAODJet			        xAODJet-*			            Event/xAOD
-use  xAODTrigBphys              xAODTrigBphys-*                 Event/xAOD
-use  xAODTrigMissingET          xAODTrigMissingET-*             Event/xAOD
-use  xAODTrigEgamma		        xAODTrigEgamma-*		        Event/xAOD
-use  xAODTrigMuon               xAODTrigMuon-*                  Event/xAOD
-use  xAODTrigCalo		        xAODTrigCalo-*                  Event/xAOD
-use  xAODTrigMinBias		    xAODTrigMinBias-*               Event/xAOD
-use  xAODBTagging               xAODBTagging-*                  Event/xAOD
-use  xAODTrigRinger             xAODTrigRinger-*                Event/xAOD
-use  xAODTrigger                xAODTrigger-*                   Event/xAOD
-use  xAODTrigL1Calo             xAODTrigL1Calo-*                   Event/xAOD
-use  xAODHIEvent             xAODHIEvent-*                   Event/xAOD
-
-private
-use TestTools                   TestTools-*                     AtlasTest
-
-# Inform cmake that this package is a metalibrary so that its clients have access to the
-# libraries and headerfiles of packages that this one depends on. Transparent to CMT.
-apply_pattern cmake_add_command command=metalibrary
-
-apply_pattern UnitTest_run unit_test=TypeInformation
-apply_pattern UnitTest_run unit_test=ListMap
-apply_pattern UnitTest_run unit_test=NewEDMMap
-apply_pattern UnitTest_run unit_test=Basic
-
diff --git a/Trigger/TrigEvent/TrigThinning/cmt/requirements b/Trigger/TrigEvent/TrigThinning/cmt/requirements
deleted file mode 100644
index 76c8cdad0f021da84e892d229f50bcbf62fad75b..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigThinning/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package TrigThinning
-author  Tomasz Bold
-
-## for athena policies: this has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-branches src src/components python
-
-private
-use AthenaBaseComps AthenaBaseComps-* Control
-use DerivationFrameworkInterfaces   DerivationFrameworkInterfaces-*    PhysicsAnalysis/DerivationFramework
-use AthenaKernel               AthenaKernel-*                  Control
-use GaudiInterface GaudiInterface-* External
-
-# for EDM on which we work
-use xAODTrigEgamma xAODTrigEgamma-* Event/xAOD
-
-
-library TrigThinning *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-end_private
-
-
diff --git a/Trigger/TrigEvent/TrigThinning/cmt/version.cmt b/Trigger/TrigEvent/TrigThinning/cmt/version.cmt
deleted file mode 100644
index 680d6fa7316042fb56aa6cf36a9335aebafc7d1a..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigThinning/cmt/version.cmt
+++ /dev/null
@@ -1 +0,0 @@
-TrigThinning-r615256
diff --git a/Trigger/TrigEvent/TrigThinning/doc/packagedoc.h b/Trigger/TrigEvent/TrigThinning/doc/packagedoc.h
index 2298acdeb1092567af4e6b0e3d194a7184f22b62..81fe6daaa0369e931e2ea8f890da993ab8180b01 100644
--- a/Trigger/TrigEvent/TrigThinning/doc/packagedoc.h
+++ b/Trigger/TrigEvent/TrigThinning/doc/packagedoc.h
@@ -1,4 +1,3 @@
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
-
diff --git a/Trigger/TrigEvent/TrigTopoEvent/CMakeLists.txt b/Trigger/TrigEvent/TrigTopoEvent/CMakeLists.txt
index ecc179908f76b5ae266de178cddcbbd29f16a723..33a201accc68d85c0ce2bfe4c98b663b52f52682 100644
--- a/Trigger/TrigEvent/TrigTopoEvent/CMakeLists.txt
+++ b/Trigger/TrigEvent/TrigTopoEvent/CMakeLists.txt
@@ -20,7 +20,6 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           Event/EventPrimitives
                           Trigger/TrigDataAccess/TrigSerializeCnvSvc
-                          Trigger/TrigDataAccess/TrigSerializeUtils
                           Trigger/TrigEvent/TrigNavigation )
 
 # External dependencies:
diff --git a/Trigger/TrigEvent/TrigTopoEvent/cmt/requirements b/Trigger/TrigEvent/TrigTopoEvent/cmt/requirements
deleted file mode 100644
index 7fac554943c9cf0a955a9778af6f4720d7d07a58..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigTopoEvent/cmt/requirements
+++ /dev/null
@@ -1,57 +0,0 @@
-package TrigTopoEvent
-author Pavel Jez <Pavel.Jez@cern.ch>
-
-# general stuff:
-use AtlasPolicy         AtlasPolicy-*
-use CLIDSvc             CLIDSvc-*               Control
-use DataModel           DataModel-*             Control
-use GaudiInterface      GaudiInterface-*        External
-
-# TrigInDetTrack:
-use TrigInDetEvent      TrigInDetEvent-*        Trigger/TrigEvent
-
-# TrigEMCluster:
-use TrigCaloEvent       TrigCaloEvent-*         Trigger/TrigEvent
-
-# EF storage items
-use egammaEvent         egammaEvent-*           Reconstruction/egamma
-use TrigParticle        TrigParticle-*          Trigger/TrigEvent
-
-#EgMuTopoInfo
-use TrigMuonEvent       TrigMuonEvent-*         Trigger/TrigEvent
-
-#Tau
-use tauEvent            tauEvent-*              Reconstruction
-
-use SGTools             SGTools-*               Control
-# 
-
-private
-
-use EventPrimitives     EventPrimitives-*       Event
-use TrigNavigation        TrigNavigation-*        Trigger/TrigEvent
-
-public
-
-# library
-library TrigTopoEvent *.cxx
-
-apply_pattern installed_library
-
-# Pattern to build the dict lib. 
-private
-use AtlasReflex         AtlasReflex-*           External -no_auto_imports
-use TrigSerializeUtils  TrigSerializeUtils-*    Trigger/TrigDataAccess
-
-apply_pattern lcgdict dict=TrigTopoEvent selectionfile=selection.xml  headerfiles="../TrigTopoEvent/TrigTopoEventDict.h" \
-              dataLinks="ElectronMuonTopoInfo" elementLinks="ElectronMuonTopoInfoContainer"
-
-#the list should be kept in sync with TrigParticleStorageDefinitions.cxx                                                                                                                                                                                                             
-apply_pattern sercnv files="-s=${TrigTopoEvent_root}/TrigTopoEvent ElectronMuonTopoInfo.h ElectronMuonTopoInfoContainer.h"
-#Storage has also  DataVector<INavigable4Momentum>                                                                                                                                                                                                                                   
-                                                                                                                                                                                                                                                                                     
-end_private  
-
-
-
-
diff --git a/Trigger/TrigEvent/TrigTopoEventTPCnv/cmt/Makefile b/Trigger/TrigEvent/TrigTopoEventTPCnv/cmt/Makefile
deleted file mode 100644
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigTopoEventTPCnv/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Trigger/TrigEvent/TrigTopoEventTPCnv/cmt/requirements b/Trigger/TrigEvent/TrigTopoEventTPCnv/cmt/requirements
deleted file mode 100644
index 5e6cd37d21f531b555f75e5b8ede295b70417658..0000000000000000000000000000000000000000
--- a/Trigger/TrigEvent/TrigTopoEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,33 +0,0 @@
-package TrigTopoEventTPCnv
-author Olga Igonkina
-
-use AtlasPolicy          AtlasPolicy-*
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use TrigTopoEvent        TrigTopoEvent-*         Trigger/TrigEvent
-
-
-branches TrigTopoEventTPCnv src
-
-library TrigTopoEventTPCnv *.cxx
-apply_pattern tpcnv_library
-
-private
-use AtlasReflex		 AtlasReflex-*		External
-use AtlasCLHEP           AtlasCLHEP-*           External
-use GaudiInterface       GaudiInterface-*       External
-use AthenaKernel         AthenaKernel-*         Control
-
-# Create a dictionary for the persistent representation 
-# of transient classes.  If we make a single dictionary,
-# the compiler runs out of memory on the generated source.
-
-apply_pattern lcgdict dict=TrigTopoEventTPCnv \
-  selectionfile=selection.xml \
-  headerfiles="../TrigTopoEventTPCnv/TrigTopoEventTPCnvDict.h"
-
-end_private
-
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=ElectronMuonTopoInfoCnv_p1
diff --git a/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h b/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h
index 201a4323693efda8f4e06c86ae38d9e6d4cbdfe0..4db70748e782edd1724eeb31a0da7b74020bc612 100644
--- a/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h
+++ b/Trigger/TrigFTK/FTK_DataProviderInterfaces/FTK_DataProviderInterfaces/IFTK_DataProviderSvc.h
@@ -43,10 +43,15 @@ public:
   static const InterfaceID& interfaceID() { return IID_IFTK_DataProviderSvc; }
   
   virtual TrackCollection* getTracks(const bool withRefit) = 0;
+  virtual TrackCollection* getTracks(const bool withRefit, unsigned int& nErrors) = 0;
+
   virtual TrackCollection* getTracksInRoi(const IRoiDescriptor&, const bool withRefit) = 0;
+  virtual TrackCollection* getTracksInRoi(const IRoiDescriptor&, const bool withRefit, unsigned int& nErrors) = 0;
 
   virtual xAOD::TrackParticleContainer* getTrackParticles(const bool withRefit) = 0;
+  virtual xAOD::TrackParticleContainer* getTrackParticles(const bool withRefit, unsigned int& nErrors) = 0;
   virtual xAOD::TrackParticleContainer* getTrackParticlesInRoi(const IRoiDescriptor&, const bool withRefit) = 0;
+  virtual xAOD::TrackParticleContainer* getTrackParticlesInRoi(const IRoiDescriptor&, const bool withRefit, unsigned int& nErrors) = 0;
 
   virtual xAOD::VertexContainer* getFastVertices(const ftk::FTK_TrackType trackType=ftk::RawTrack) =0;
 
@@ -64,6 +69,18 @@ public:
 
   virtual std::string getFastVertexCacheName(const bool withRefit)=0;
 
+  virtual std::vector<unsigned int> nMissingSCTClusters()=0;
+  virtual std::vector<unsigned int> nMissingPixelClusters()=0;
+  virtual std::vector<unsigned int> nFailedSCTClusters()=0;
+  virtual std::vector<unsigned int> nFailedPixelClusters()=0;
+
+  virtual unsigned int nRawTracks()=0;
+  virtual unsigned int nTracks(const bool withRefit)=0;
+  virtual unsigned int nTrackParticles(const bool withRefit)=0;
+  virtual unsigned int nTrackErrors(const bool withRefit)=0;
+  virtual unsigned int nTrackParticleErrors(const bool withRefit)=0;
+ 
+
 };
 
 #endif
diff --git a/Trigger/TrigFTK/FTK_DataProviderInterfaces/cmt/requirements b/Trigger/TrigFTK/FTK_DataProviderInterfaces/cmt/requirements
deleted file mode 100644
index 5c30997cc9e27d394f1b84eb7433078ed14c26e8..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/FTK_DataProviderInterfaces/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-################################################
-package FTK_DataProviderInterfaces
-
-author Jay Howarth <jhowarth@cern.ch>
-
-public
-use AtlasPolicy		AtlasPolicy-*          
-use AthenaKernel        AthenaKernel-*          Control
-use GaudiInterface	GaudiInterface-*	External
-use AtlasROOT		AtlasROOT-*		External
-use PyJobTransforms 	PyJobTransforms-* 	Tools
-use IRegionSelector     IRegionSelector-*        DetectorDescription
-
-use AtlasReconstructionRunTime AtlasReconstructionRunTime-*
-use AtlasPolicy                AtlasPolicy-*
-use GaudiInterface             GaudiInterface-*           External
-use TrigFTK_RawData	       TrigFTK_RawData-*          Trigger/TrigFTK
-use TrkTrack		       TrkTrack-*		  Tracking/TrkEvent
-use xAODTracking        xAODTracking-*          Event/xAOD 
-
-# Create an interface library in the CMake build:
-apply_pattern cmake_add_command command=metalibrary
diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
index c420638fb8c5a4e82fad9c679d2a722ab21f0e38..9a161d563921673ec4f58f92e18efa2ad62367e6 100644
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
+++ b/Trigger/TrigFTK/FTK_DataProviderSvc/FTK_DataProviderSvc/FTK_DataProviderSvc.h
@@ -87,9 +87,16 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
  virtual StatusCode initialize();
  virtual StatusCode finalize();
  virtual TrackCollection* getTracksInRoi(const IRoiDescriptor&, const bool withRefit);
+ virtual TrackCollection* getTracksInRoi(const IRoiDescriptor&, const bool withRefit, unsigned int& nErrors);
+
  virtual TrackCollection* getTracks(const bool withRefit);
+ virtual TrackCollection* getTracks(const bool withRefit,unsigned int& nErrors);
+
  virtual xAOD::TrackParticleContainer* getTrackParticles(const bool withRefit);
+ virtual xAOD::TrackParticleContainer* getTrackParticles(const bool withRefit, unsigned int& nErrors);
+
  virtual xAOD::TrackParticleContainer* getTrackParticlesInRoi(const IRoiDescriptor&, const bool withRefit);
+ virtual xAOD::TrackParticleContainer* getTrackParticlesInRoi(const IRoiDescriptor&, const bool withRefit, unsigned int& nErrors);
 
  virtual  xAOD::VertexContainer* getFastVertices(const ftk::FTK_TrackType trackType=ftk::RawTrack);
  
@@ -107,6 +114,20 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
 
  virtual void handle( const Incident &incident );
 
+ virtual unsigned int nRawTracks();
+ virtual unsigned int nTracks(const bool withRefit);
+ virtual unsigned int nTrackParticles(const bool withRefit);
+ virtual unsigned int nTrackErrors(const bool withRefit);
+ virtual unsigned int nTrackParticleErrors(const bool withRefit);
+ 
+ virtual std::vector<unsigned int> nMissingSCTClusters();
+ virtual std::vector<unsigned int> nMissingPixelClusters();
+ virtual std::vector<unsigned int> nFailedSCTClusters();
+ virtual std::vector<unsigned int> nFailedPixelClusters();
+ 
+
+ private:
+
  void getFTK_RawTracksFromSG();
  Trk::Track* ConvertTrack(const unsigned int track);
  Trk::Track* getCachedTrack(const unsigned int track, const bool do_refit);
@@ -115,13 +136,8 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
  StatusCode fillTrackCache(bool do_refit);
  StatusCode fillTrackParticleCache(const bool withRefit);
 
-
-
  bool fillVertexContainerCache(bool withRefit, xAOD::TrackParticleContainer*);
 
-
- protected:
-
  
  const Trk::RIO_OnTrack* createPixelCluster(const FTK_RawPixelCluster& raw_pixel_cluster,  const Trk::TrackParameters& trkPerigee);
  const Trk::RIO_OnTrack* createSCT_Cluster( const FTK_RawSCT_Cluster& raw_sct_cluster, const Trk::TrackParameters& trkPerigee);
@@ -244,6 +260,12 @@ class FTK_DataProviderSvc : public virtual IFTK_DataProviderSvc, virtual public
   std::vector<float>  m_pixelEndCapPhiOffsets;
   std::vector<float> m_pixelEndCapEtaOffsets;
 
+  unsigned int  m_nErrors;
+  std::vector<unsigned int> m_nFailedSCTClusters;
+  std::vector<unsigned int> m_nFailedPixelClusters;
+  std::vector<unsigned int> m_nMissingSCTClusters;
+  std::vector<unsigned int> m_nMissingPixelClusters;
+
 };
 
 inline bool compareFTK_Clusters (const Trk::RIO_OnTrack* cl1, const Trk::RIO_OnTrack* cl2) {
diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/cmt/requirements b/Trigger/TrigFTK/FTK_DataProviderSvc/cmt/requirements
deleted file mode 100644
index 70abfbe6d53bbae2dac8965eee44c2a99bd0daea..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/cmt/requirements
+++ /dev/null
@@ -1,57 +0,0 @@
-################################################
-package FTK_DataProviderSvc
-
-author Jay Howarth <jhowarth@cern.ch>
-
-public
-use AtlasPolicy			AtlasPolicy-*
-use GaudiInterface		GaudiInterface-*		External
-use AtlasROOT			AtlasROOT-*			External
-use AthenaBaseComps     	AthenaBaseComps-*       	Control
-use StoreGate           	StoreGate-*             	Control
-use PyJobTransforms 		PyJobTransforms-* 		Tools
-#use InDetPrepRawData     	InDetPrepRawData-*     		InnerDetector/InDetRecEvent
-
-use AtlasReconstructionRunTime 	AtlasReconstructionRunTime-*
-use AtlasPolicy                	AtlasPolicy-*
-use GaudiInterface             	GaudiInterface-*        	External
-use TrigFTK_RawData	       	TrigFTK_RawData-*       	Trigger/TrigFTK
-use FTK_DataProviderInterfaces 	FTK_DataProviderInterfaces-* 	Trigger/TrigFTK
-#TrkTrack and VxVertec need to be public for Collection typedef 
-use TrkTrack		       	TrkTrack-*		    	Tracking/TrkEvent
-#use TrkViews		       	TrkViews-*		    	Tracking/TrkEvent
-use xAODTracking                xAODTracking-*            	Event/xAOD
-#use xAODViews                	xAODViews-*           		Event/xAOD
-use InDetPrepRawData 		InDetPrepRawData-* 		InnerDetector/InDetRecEvent
-use InDetRIO_OnTrack           	InDetRIO_OnTrack-*         	InnerDetector/InDetRecEvent
-
-private
-use AtlasCLHEP      		AtlasCLHEP-*        	External
-use EventInfo                  EventInfo-*                Event
-use AtlasDetDescr              AtlasDetDescr-*            DetectorDescription
-use GeoPrimitives              GeoPrimitives-*            DetectorDescription
-use InDetIdentifier            InDetIdentifier-*          InnerDetector/InDetDetDescr
-use InDetReadoutGeometry       InDetReadoutGeometry-*     InnerDetector/InDetDetDescr
-use TrkEventPrimitives         TrkEventPrimitives-*       Tracking/TrkEvent
-use TrkParameters              TrkParameters-*            Tracking/TrkEvent
-use TrkRIO_OnTrack             TrkRIO_OnTrack-*           Tracking/TrkEvent
-use PixelConditionsServices    PixelConditionsServices-*  InnerDetector/InDetConditions
-use TrkFitterInterfaces        TrkFitterInterfaces-*      Tracking/TrkFitter 
-use TrkFitterUtils             TrkFitterUtils-*           Tracking/TrkFitter 
-use TrkToolInterfaces		TrkToolInterfaces-*        Tracking/TrkTools
-use TrkTrackSummary            TrkTrackSummary-*          Tracking/TrkEvent
-use InDetRecToolInterfaces InDetRecToolInterfaces-* InnerDetector/InDetRecTools
-use TrkTruthData                TrkTruthData-*               Tracking/TrkEvent
-use GeneratorObjects            GeneratorObjects-*           Generators 
-use AtlasHepMC                  AtlasHepMC-*                 External 
-use FTK_RecToolInterfaces      FTK_RecToolInterfaces-*     Trigger/TrigFTK
-use IRegionSelector            IRegionSelector-*           DetectorDescription 
-use RoiDescriptor              RoiDescriptor-*             DetectorDescription 
-
-# Add transform
-apply_pattern declare_job_transforms tfs='*_tf.py' jo='skeleton.*.py'
-#end_private
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_xmls extras="-s=../share *.dtd *.xml"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
index a95041703c8ed2ce5918f7b0f7128c8ba9e2e033..2f8e36e8fa55a7a3058a4ec380585259fb759a9f 100644
--- a/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
+++ b/Trigger/TrigFTK/FTK_DataProviderSvc/src/FTK_DataProviderSvc.cxx
@@ -150,7 +150,8 @@ FTK_DataProviderSvc::FTK_DataProviderSvc(const std::string& name, ISvcLocator* s
   m_pTscaleFactor(1.),
   m_rejectBadTracks(false),
   m_dPhiCut(0.4),
-  m_dEtaCut(0.6)
+  m_dEtaCut(0.6),
+  m_nErrors(0)
 {
   m_pixelBarrelPhiOffsets.reserve(4);
   m_pixelBarrelEtaOffsets.reserve(4);
@@ -164,6 +165,19 @@ FTK_DataProviderSvc::FTK_DataProviderSvc(const std::string& name, ISvcLocator* s
     m_pixelEndCapPhiOffsets.push_back(0.); 
     m_pixelEndCapEtaOffsets.push_back(0.);
   }
+  m_nFailedSCTClusters.reserve(8);
+  m_nMissingSCTClusters.reserve(8);
+  m_nFailedPixelClusters.reserve(4);
+  m_nMissingPixelClusters.reserve(4);
+  for (int ie=0; ie<4; ie++){
+    m_nFailedPixelClusters.push_back(0);
+    m_nMissingPixelClusters.push_back(0);
+  }
+  for (int ie=0; ie<8; ie++){
+    m_nFailedSCTClusters.push_back(0);
+    m_nMissingSCTClusters.push_back(0);
+  }
+
   declareProperty("TrackCollectionName",m_trackCacheName);
   declareProperty("TrackParticleContainerName",m_trackParticleCacheName);
   declareProperty("VertexContainerName",m_vertexCacheName);
@@ -207,6 +221,23 @@ FTK_DataProviderSvc::~FTK_DataProviderSvc(){
 }
 
 
+std::vector<unsigned int> FTK_DataProviderSvc::nMissingSCTClusters() {
+  return m_nMissingSCTClusters;
+}
+
+std::vector<unsigned int> FTK_DataProviderSvc::nMissingPixelClusters() {
+  return m_nMissingPixelClusters;
+}
+
+std::vector<unsigned int> FTK_DataProviderSvc::nFailedSCTClusters() {
+  return m_nFailedSCTClusters;
+}
+
+std::vector<unsigned int> FTK_DataProviderSvc::nFailedPixelClusters() {
+  return m_nFailedPixelClusters;
+}
+
+
 std::string FTK_DataProviderSvc::getTrackParticleCacheName(const bool withRefit) {
   return (withRefit? m_trackParticleCacheName+"Refit": m_trackParticleCacheName);
 }
@@ -295,6 +326,81 @@ StatusCode FTK_DataProviderSvc::finalize() {
 }
 
 
+unsigned int FTK_DataProviderSvc::nTrackParticleErrors(const bool withRefit) {
+
+  unsigned int nErrors=0;
+
+  if (withRefit) {
+    for (auto& it : m_refit_tp_map) 
+      if (it==-2) nErrors++;
+  } else {
+    for (auto& it : m_conv_tp_map) 
+      if (it==-2) nErrors++;
+  }    
+  return nErrors;
+
+}
+
+
+unsigned int FTK_DataProviderSvc::nRawTracks() {
+  if (!m_gotRawTracks) getFTK_RawTracksFromSG();
+  return m_ftk_tracks->size();
+}
+
+
+unsigned int FTK_DataProviderSvc::nTracks(const bool withRefit) {
+
+  unsigned int nTrk=0;
+
+  if (withRefit) {
+    for (auto& it : m_refit_track_map) 
+      if (it>=0) nTrk++;
+  } else {
+    for (auto& it : m_conv_track_map) 
+      if (it>=0) nTrk++;
+  }    
+  return nTrk;
+
+}
+
+unsigned int FTK_DataProviderSvc::nTrackParticles(const bool withRefit) {
+
+  unsigned int nTrk=0;
+
+  if (withRefit) {
+    for (auto& it : m_refit_tp_map) 
+      if (it>=0) nTrk++;
+  } else {
+    for (auto& it : m_conv_tp_map) 
+      if (it>=0) nTrk++;
+  }    
+  return nTrk;
+
+}
+
+unsigned int FTK_DataProviderSvc::nTrackErrors(const bool withRefit) {
+
+  unsigned int nErrors=0;
+
+  if (withRefit) {
+    for (auto& it : m_refit_track_map) 
+      if (it==-2) nErrors++;
+  } else {
+    for (auto& it : m_conv_track_map) 
+      if (it==-2) nErrors++;
+  }    
+  return nErrors;
+
+}
+
+
+xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticlesInRoi(const IRoiDescriptor& roi, const bool withRefit, unsigned int& nErrors){
+  m_nErrors=0;
+  xAOD::TrackParticleContainer* tracks = this->getTrackParticlesInRoi(roi, withRefit);
+  nErrors = m_nErrors;
+  return tracks;
+}
+
 xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticlesInRoi(const IRoiDescriptor& roi, const bool withRefit){
 
   ATH_MSG_DEBUG("FTK_DataProviderSvc::getTrackParticlesInRoi called with Refit " << withRefit);
@@ -342,10 +448,12 @@ xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticlesInRoi(const
             } else { //trackLink not valid
               ATH_MSG_ERROR ("invalid ElementLink to m_refit_track_map["<<ftk_track_index<<"] = " << m_refit_track_map[ftk_track_index]);
               m_refit_tp_map[ftk_track_index]=-2;
+	      m_nErrors++;
             }
           } else { // track==nullptr
             ATH_MSG_VERBOSE("Setting m_refit_tp_map["<<  ftk_track_index <<"]=-2");
             m_refit_tp_map[ftk_track_index]=-2;
+	    m_nErrors++;
           }
         }
       }
@@ -382,11 +490,13 @@ xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticlesInRoi(const
               } else {
                 ATH_MSG_ERROR ("invalid ElementLink to m_refit_conv_map["<<ftk_track_index<<"] = " <<m_conv_track_map[ftk_track_index]);
                 m_refit_tp_map[ftk_track_index]=-2;
+		m_nErrors++;
               }
             }
           } else { // track==nullptr
             ATH_MSG_VERBOSE("Setting m_conv_tp_map["<<  ftk_track_index <<"]=-2");
             m_conv_tp_map[ftk_track_index] = -2;
+	    m_nErrors++;
           }
         }
       }
@@ -481,6 +591,17 @@ StatusCode FTK_DataProviderSvc::fillTrackParticleCache(const bool withRefit){
   return  StatusCode::SUCCESS;
 }
 
+
+xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticles(const bool withRefit, unsigned int& nErrors){
+
+  // Return TrackParticleCollection plus number of missing tracks du to errors 
+
+  m_nErrors=0;
+  xAOD::TrackParticleContainer* tracks=this->getTrackParticles(withRefit);
+  nErrors=m_nErrors;
+  return tracks;
+}
+
 xAOD::TrackParticleContainer* FTK_DataProviderSvc::getTrackParticles(const bool withRefit){
 
 #ifdef  FTK_useViewVector
@@ -720,6 +841,7 @@ xAOD::VertexContainer* FTK_DataProviderSvc::getVertexContainer(const bool withRe
 #endif
 
   if (fillTrackParticleCache(withRefit).isFailure()) {
+
     // must always create a VertexContainer in StroreGate
 
     std::string cacheName= m_vertexCacheName;
@@ -829,6 +951,14 @@ StatusCode FTK_DataProviderSvc::getVertexContainer(xAOD::VertexContainer* userVe
 }
 
 
+
+TrackCollection* FTK_DataProviderSvc::getTracks(const bool withRefit, unsigned int& nErrors){
+  m_nErrors=0;
+  TrackCollection* tracks = this->getTracks(withRefit);
+  nErrors=m_nErrors;
+  return tracks;
+}
+
 TrackCollection* FTK_DataProviderSvc::getTracks(const bool withRefit){
 
 #ifdef  FTK_useViewVector
@@ -848,7 +978,6 @@ TrackCollection* FTK_DataProviderSvc::getTracks(const bool withRefit){
   ATH_MSG_DEBUG( "getTracks: Raw FTK Container Size = " << m_ftk_tracks->size());
   ATH_MSG_VERBOSE( "getTracks: Converting Tracks");
   for (unsigned int ftk_track_index = 0; ftk_track_index != m_ftk_tracks->size(); ++ftk_track_index){
-
     Trk::Track* track = this->getCachedTrack(ftk_track_index, withRefit);
     if (track != nullptr) userTracks->push_back(track);
   }
@@ -862,6 +991,13 @@ TrackCollection* FTK_DataProviderSvc::getTracks(const bool withRefit){
 
 }
 
+TrackCollection* FTK_DataProviderSvc::getTracksInRoi(const IRoiDescriptor& roi, const bool withRefit, unsigned int& nErrors){
+  m_nErrors=0;
+  TrackCollection* tracks = this->getTracksInRoi(roi,withRefit);
+  nErrors=m_nErrors;
+  return tracks;
+}
+
 TrackCollection* FTK_DataProviderSvc::getTracksInRoi(const IRoiDescriptor& roi, const bool withRefit){
 
 #ifdef  FTK_useViewVector
@@ -888,7 +1024,12 @@ TrackCollection* FTK_DataProviderSvc::getTracksInRoi(const IRoiDescriptor& roi,
     if (roi.isFullscan() || (RoiUtil::containsPhi(roi,ftk_track->getPhi()) && RoiUtil::contains(roi,ftk_track->getZ0(), ftk_track->getCotTh()))) {
     //if (roi.isFullscan() || (roi.containsPhi(ftk_track->getPhi()) && roi.contains(ftk_track->getZ0(), ftk_track->getCotTh()))) {
       Trk::Track* track = this->getCachedTrack(ftk_track_index, withRefit);
-      if (track != nullptr) userTracks->push_back(track);
+      if (track != nullptr) {
+	userTracks->push_back(track);
+      } else {
+	m_nErrors++;
+      } 
+
     }
   }
   if (withRefit) {
@@ -1009,29 +1150,33 @@ void FTK_DataProviderSvc::getFTK_RawTracksFromSG(){
 
   // new event - get the tracks from StoreGate
   if (!m_storeGate->contains<FTK_RawTrackContainer>(m_RDO_key)) {
-	  ATH_MSG_DEBUG( "getFTK_RawTracksFromSG: FTK tracks  "<< m_RDO_key <<" not found in StoreGate !");
-	  return;
+    
+    ATH_MSG_DEBUG( "getFTK_RawTracksFromSG: FTK tracks  "<< m_RDO_key <<" not found in StoreGate !");
+    return;
   } else {    
-	  if (m_remove_duplicates){//get all tracks, and then call duplicate removal tool
-		  const FTK_RawTrackContainer* temporaryTracks=nullptr;
-		  StatusCode sc = m_storeGate->retrieve(temporaryTracks, m_RDO_key);
-		  ATH_MSG_DEBUG( "getFTK_RawTracksFromSG:  Got " << temporaryTracks->size() << " raw FTK tracks (RDO) from  StoreGate ");
-		  m_ftk_tracks = m_DuplicateTrackRemovalTool->removeDuplicates(temporaryTracks);
-		  if (sc.isFailure()) {
-			  ATH_MSG_WARNING( "getFTK_RawTracksFromSG: Failed to get FTK Tracks Container when using removeDumplicates ");
-			  return;
-		  }
-	  }
-	  else{//the original way
-		  ATH_MSG_VERBOSE( "getFTK_RawTracksFromSG:  Doing storegate retrieve");
-		  StatusCode sc = m_storeGate->retrieve(m_ftk_tracks, m_RDO_key);
-		  if (sc.isFailure()) {
-			  ATH_MSG_WARNING( "getFTK_RawTracksFromSG: Failed to get FTK Tracks Container");
-			  return;
-		  }
-	  }
-	  ATH_MSG_DEBUG( "getFTK_RawTracksFromSG:  Got " << m_ftk_tracks->size() << " raw FTK tracks");
-	  m_gotRawTracks = true;
+    if (m_remove_duplicates){//get all tracks, and then call duplicate removal tool
+      const FTK_RawTrackContainer* temporaryTracks=nullptr;
+      StatusCode sc = m_storeGate->retrieve(temporaryTracks, m_RDO_key);
+      ATH_MSG_DEBUG( "getFTK_RawTracksFromSG:  Got " << temporaryTracks->size() << " raw FTK tracks (RDO) from  StoreGate ");
+      m_ftk_tracks = m_DuplicateTrackRemovalTool->removeDuplicates(temporaryTracks);
+      if (sc.isFailure()) {
+	ATH_MSG_WARNING( "getFTK_RawTracksFromSG: Failed to get FTK Tracks Container when using removeDumplicates ");
+	return;
+      }
+    } else{//the original way
+      ATH_MSG_VERBOSE( "getFTK_RawTracksFromSG:  Doing storegate retrieve");
+      StatusCode sc = m_storeGate->retrieve(m_ftk_tracks, m_RDO_key);
+      if (sc.isFailure()) {
+	ATH_MSG_WARNING( "getFTK_RawTracksFromSG: Failed to get FTK Tracks Container");
+	return;
+      }
+    }
+  }
+  if (m_ftk_tracks->size()==0){
+    ATH_MSG_VERBOSE( "no FTK Tracks in the event");
+  } else {
+    ATH_MSG_DEBUG( "getFTK_RawTracksFromSG:  Got " << m_ftk_tracks->size() << " raw FTK tracks (RDO) from  StoreGate ");
+    m_gotRawTracks = true;
   }
   
   // Creating collection for pixel clusters
@@ -1120,7 +1265,9 @@ StatusCode FTK_DataProviderSvc::initTrackParticleCache(bool withRefit) {
   bool gotTracks=false;
   getFTK_RawTracksFromSG();
   if (m_gotRawTracks) {
-    if (!initTrackCache(withRefit).isFailure()) {  gotTracks=true; }
+    if (!initTrackCache(withRefit).isFailure()) {  
+      gotTracks=true; 
+    } 
   }
 
   if (withRefit) {
@@ -1287,6 +1434,7 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
     if ( track.isMissingPixelLayer(cluster_number)) {
 
       ATH_MSG_VERBOSE( " No hit for layer " << cluster_number);
+      m_nMissingPixelClusters[cluster_number]++;
       continue;
     }
     if (raw_pixel_cluster.getModuleID()==0){
@@ -1296,6 +1444,7 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
     const Trk::RIO_OnTrack* pixel_cluster_on_track = createPixelCluster(raw_pixel_cluster,*trkPerigee);
     if (pixel_cluster_on_track==nullptr){
       ATH_MSG_WARNING(" PixelClusterOnTrack failed to create cluster " << cluster_number);
+      m_nFailedPixelClusters[cluster_number]++;
     } else {
 
       clusters.push_back(pixel_cluster_on_track);
@@ -1322,6 +1471,7 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
     FTK_RawSCT_Cluster raw_cluster = track.getSCTCluster(cluster_number);
     if ( track.isMissingSCTLayer(cluster_number)) {
       ATH_MSG_VERBOSE( "  No SCT Hit for layer "  << cluster_number);
+      m_nMissingSCTClusters[cluster_number]++;
       continue;
     }
     const Trk::RIO_OnTrack* sct_cluster_on_track = createSCT_Cluster(raw_cluster, *trkPerigee);
@@ -1329,6 +1479,7 @@ Trk::Track* FTK_DataProviderSvc::ConvertTrack(const unsigned int iTrack){
 	
     if (sct_cluster_on_track==nullptr){
       ATH_MSG_WARNING(" SCT_ClusterOnTrack failed to create cluster " <<  cluster_number);
+      m_nFailedSCTClusters[cluster_number]++;
     } else {
       
       ATH_MSG_VERBOSE( cluster_number << ": r= " << std::sqrt(std::pow(sct_cluster_on_track->globalPosition().x(),2)+std::pow(sct_cluster_on_track->globalPosition().y(),2))
@@ -1621,7 +1772,7 @@ const Trk::RIO_OnTrack*  FTK_DataProviderSvc::createPixelCluster(const FTK_RawPi
 
   ATH_MSG_VERBOSE( "FTK_DataProviderSvc::createPixelCluster: raw FTK cluster position: " <<
       " Row(phi): " <<  raw_pixel_cluster.getRowCoord() << " Col(eta): " << raw_pixel_cluster.getColCoord() <<
-      " RowWidth: " << raw_pixel_cluster.getRowWidth()+1 << " ColWidth: " << raw_pixel_cluster.getColWidth()+1);
+      " RowWidth: " << raw_pixel_cluster.getRowWidth() << " ColWidth: " << raw_pixel_cluster.getColWidth());
 
   unsigned int layer = m_pixelId->layer_disk(wafer_id);
   bool isBarrel = (m_pixelId->barrel_ec(wafer_id)==0);
@@ -1693,8 +1844,8 @@ const Trk::RIO_OnTrack*  FTK_DataProviderSvc::createPixelCluster(const FTK_RawPi
   Identifier pixel_id = m_pixelId->pixel_id(wafer_id, phi_index, eta_index);
 
 
-  int phiWidth    = raw_pixel_cluster.getRowWidth()+1;
-  int etaWidth    = raw_pixel_cluster.getColWidth()+1;
+  int phiWidth    = std::max(raw_pixel_cluster.getRowWidth(),1u);
+  int etaWidth    = std::max(raw_pixel_cluster.getColWidth(),1u);
 
   int colMin = (int)(eta_index-0.5*etaWidth);
   int colMax = colMin+etaWidth;
@@ -1962,5 +2113,11 @@ void FTK_DataProviderSvc::handle(const Incident& incident) {
     m_got_fast_vertex_refit = false;
     m_got_fast_vertex_conv = false;
     m_got_fast_vertex_raw = false;
+    m_nErrors=0;
+    for (auto& it :  m_nFailedSCTClusters) it=0;
+    for (auto& it :  m_nFailedPixelClusters) it=0;
+    for (auto& it :  m_nMissingSCTClusters) it=0;
+    for (auto& it :  m_nMissingPixelClusters) it=0;
+
   }
 }
diff --git a/Trigger/TrigFTK/FTK_RecExample/cmt/requirements b/Trigger/TrigFTK/FTK_RecExample/cmt/requirements
deleted file mode 100755
index e8f887d6d989b6f52814b48157d1b7c6866d3b3d..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/FTK_RecExample/cmt/requirements
+++ /dev/null
@@ -1,13 +0,0 @@
-package FTK_RecExample
-
-author John Baines <John.Baines@cern.ch>
-
-use AtlasPolicy AtlasPolicy-*
-
-
-apply_pattern declare_python_modules files="*.py"
-
-branches run share
-
-apply_pattern declare_joboptions files="**.py"
-
diff --git a/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py b/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py
index 98d452462c73853984648d619393b6eb296569d4..ff4fd2ee41acbc261a731454b24b980445bc7cf6 100644
--- a/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py
+++ b/Trigger/TrigFTK/FTK_RecExample/share/FTKRec_jobOptions.py
@@ -2,38 +2,44 @@ include.block('FTK_RecExample/FTKRec_jobOptions.py')
 
 
 from RecExConfig.RecFlags import rec
+from AthenaCommon.GlobalFlags import GlobalFlags
 
+if rec.doFTK() and globalflags.InputFormat() == 'bytestream':
+    ByteStreamAddressProviderSvc = Service( "ByteStreamAddressProviderSvc")
+    ByteStreamAddressProviderSvc.TypeNames += [ "FTK_RawTrackContainer/FTK_RDO_Tracks"]
+    
 if rec.doFTK():
- from TrigFTK_RecExample.TrigFTK_DataProviderSvc_Config import TrigFTK_DataProviderSvc
- theFTK_DataProviderSvc = TrigFTK_DataProviderSvc("TrigFTK_DataProviderSvc")
- ServiceMgr += theFTK_DataProviderSvc
-
- from TrigFTK_RawDataAlgs.TrigFTK_RawDataAlgsConf import FTK_RDO_ReaderAlgo
-
- FTK_RDO_Reader = FTK_RDO_ReaderAlgo( "FTK_RDO_ReaderAlgo")
- FTK_RDO_Reader.FTK_DataProvider=theFTK_DataProviderSvc
- FTK_RDO_Reader.RDO_CollectionName="FTK_RDO_Tracks"
- FTK_RDO_Reader.fillHists=False
- FTK_RDO_Reader.fillTree=False
- FTK_RDO_Reader.GetTracks=True
- FTK_RDO_Reader.GetTrackParticles=True
- FTK_RDO_Reader.GetVertex=True
- FTK_RDO_Reader.GetRefitTracks=True
- FTK_RDO_Reader.GetRefitTrackParticles=True
- FTK_RDO_Reader.GetRefitVertex=True
- FTK_RDO_Reader.GetTruthVertex=False
-
- from AthenaCommon.AlgSequence import AlgSequence
-
- alg = AlgSequence() 
- alg += FTK_RDO_Reader 
-
-
- if rec.doTruth():
-     include ('FTK_RecExample/ConfiguredFTK_TrackTruth.py')
-     FTK_TracksTruth = ConfiguredFTK_TrackTruth(Tracks="TrigFTK_TrackCollection",
-                                                TracksTruth = "FTK_Tracks_TruthCollection",
-                                                DetailedTruth = "FTK_Tracks_DetailedTruthCollection")
-     FTK_RefitTracksTruth = ConfiguredFTK_TrackTruth(Tracks="TrigFTK_TrackCollectionRefit", 
+    
+    from TrigFTK_RecExample.TrigFTK_DataProviderSvc_Config import TrigFTK_DataProviderSvc
+    theFTK_DataProviderSvc = TrigFTK_DataProviderSvc("TrigFTK_DataProviderSvc")
+    ServiceMgr += theFTK_DataProviderSvc
+    
+    from TrigFTK_RawDataAlgs.TrigFTK_RawDataAlgsConf import FTK_RDO_ReaderAlgo
+    
+    FTK_RDO_Reader = FTK_RDO_ReaderAlgo( "FTK_RDO_ReaderAlgo")
+    FTK_RDO_Reader.FTK_DataProvider=theFTK_DataProviderSvc
+    FTK_RDO_Reader.RDO_CollectionName="FTK_RDO_Tracks"
+    FTK_RDO_Reader.fillHists=False
+    FTK_RDO_Reader.fillTree=False
+    FTK_RDO_Reader.GetTracks=True
+    FTK_RDO_Reader.GetTrackParticles=True
+    FTK_RDO_Reader.GetVertex=True
+    FTK_RDO_Reader.GetRefitTracks=True
+    FTK_RDO_Reader.GetRefitTrackParticles=True
+    FTK_RDO_Reader.GetRefitVertex=True
+    FTK_RDO_Reader.GetTruthVertex=False
+    
+    from AthenaCommon.AlgSequence import AlgSequence
+    
+    alg = AlgSequence() 
+    alg += FTK_RDO_Reader 
+    
+    
+    if rec.doTruth():
+        include ('FTK_RecExample/ConfiguredFTK_TrackTruth.py')
+        FTK_TracksTruth = ConfiguredFTK_TrackTruth(Tracks="TrigFTK_TrackCollection",
+                                                   TracksTruth = "FTK_Tracks_TruthCollection",
+                                                   DetailedTruth = "FTK_Tracks_DetailedTruthCollection")
+        FTK_RefitTracksTruth = ConfiguredFTK_TrackTruth(Tracks="TrigFTK_TrackCollectionRefit", 
                                                      TracksTruth = "FTK_RefitTracks_TruthCollection",
                                                      DetailedTruth = "FTK_RefitTracks_DetailedTruthCollection")
diff --git a/Trigger/TrigFTK/FTK_RecToolInterfaces/cmt/requirements b/Trigger/TrigFTK/FTK_RecToolInterfaces/cmt/requirements
deleted file mode 100644
index 234dc57470877d6a6e53950c8de783cf9ce90c0e..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/FTK_RecToolInterfaces/cmt/requirements
+++ /dev/null
@@ -1,17 +0,0 @@
-################################################
-package FTK_RecToolInterfaces
-
-author Rui Wang <Rui.Wang@cern.ch>
-
-public
-use AtlasPolicy		AtlasPolicy-*          
-use GaudiInterface	GaudiInterface-*	External
-use AtlasROOT		AtlasROOT-*		External
-use PyJobTransforms 	PyJobTransforms-* 	Tools
-
-use AtlasReconstructionRunTime AtlasReconstructionRunTime-*
-use AtlasPolicy                AtlasPolicy-*
-use GaudiInterface             GaudiInterface-*           External
-use TrigFTK_RawData	           TrigFTK_RawData-*          Trigger/TrigFTK
-use TrkTrack		               TrkTrack-*		              Tracking/TrkEvent
-use xAODTracking               xAODTracking-*             Event/xAOD 
diff --git a/Trigger/TrigFTK/FTK_RecTools/cmt/requirements b/Trigger/TrigFTK/FTK_RecTools/cmt/requirements
deleted file mode 100644
index b64c4e8e9b9eea7dffabf4f1a18896df37bba38b..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/FTK_RecTools/cmt/requirements
+++ /dev/null
@@ -1,36 +0,0 @@
-################################################
-package FTK_RecTools
-
-author Rui Wang <Rui.Wang@cern.ch>
-
-public
-use AtlasPolicy		AtlasPolicy-*
-use GaudiInterface	GaudiInterface-*	External
-use AtlasROOT		AtlasROOT-*		External
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use PyJobTransforms 	PyJobTransforms-* 	Tools
-use FTK_RecToolInterfaces FTK_RecToolInterfaces-* Trigger/TrigFTK
-#use AtlasReconstructionRunTime AtlasReconstructionRunTime-*
-#use AtlasPolicy                AtlasPolicy-*
-use GaudiInterface             GaudiInterface-*           External
-use TrigFTK_RawData	           TrigFTK_RawData-*          Trigger/TrigFTK
-use FTK_DataProviderInterfaces FTK_DataProviderInterfaces-* Trigger/TrigFTK
-########use FTK_DataProviderSvc FTK_DataProviderSvc-* Trigger/TrigFTK
-
-#TrkTrack and VxVertec need to be public for Collection typedef 
-use TrkTrack		               TrkTrack-*		  Tracking/TrkEvent
-use VxVertex                   VxVertex-*       Tracking/TrkEvent
-use xAODTracking               xAODTracking-*             Event/xAOD 
-use TrkVxEdmCnv                TrkVxEdmCnv-*              Tracking/TrkVertexFitter
-
-private
-use TrkParameters    TrkParameters-*   Tracking/TrkEvent
-
-# Add transform
-apply_pattern declare_job_transforms tfs='*_tf.py' jo='skeleton.*.py'
-#end_private
-#####apply_pattern declare_runtime extras="../share/FTK_DataProviderLoad.py"
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_xmls extras="-s=../share *.dtd *.xml"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/CMakeLists.txt b/Trigger/TrigFTK/FastTrackSimWrap/CMakeLists.txt
index 696fee50a2ab749e8edd33d3f2c3461ac4db630e..001168b4770ea81cd220ef44bebe48e20f43ea46 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/CMakeLists.txt
+++ b/Trigger/TrigFTK/FastTrackSimWrap/CMakeLists.txt
@@ -12,6 +12,7 @@ atlas_depends_on_subdirs( PUBLIC
                           InnerDetector/InDetConditions/InDetConditionsSummaryService
                           InnerDetector/InDetDetDescr/InDetIdentifier
                           InnerDetector/InDetRecEvent/InDetPrepRawData
+                          InnerDetector/InDetRecEvent/InDetRIO_OnTrack
                           Tracking/TrkEvent/TrkTrack
                           Tracking/TrkEvent/TrkTruthData
                           Tracking/TrkTools/TrkToolInterfaces
@@ -55,7 +56,7 @@ atlas_add_library( FastTrackSimWrapLib
                    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
                    LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaBaseComps GeneratorObjects InDetIdentifier InDetPrepRawData TrkTrack TrkTruthData TrkToolInterfaces TrigCaloEvent TrigDecisionToolLib TrigFTKSimLib StoreGateLib SGtests SCT_CablingLib
-                   PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${HEPMC_LIBRARIES} AtlasDetDescr IdDict IdDictDetDescr Identifier EventInfo EventPrimitives GaudiKernel InDetReadoutGeometry InDetRawData InDetSimData TileIdentifier TrkRIO_OnTrack TrkSpacePoint VxVertex TrkFitterInterfaces PixelCablingLib )
+                   PRIVATE_LINK_LIBRARIES ${HEPPDT_LIBRARIES} ${HEPMC_LIBRARIES} AtlasDetDescr IdDict IdDictDetDescr Identifier EventInfo EventPrimitives GaudiKernel InDetReadoutGeometry InDetRawData InDetSimData TileIdentifier TrkRIO_OnTrack TrkSpacePoint VxVertex TrkFitterInterfaces PixelCablingLib InDetRIO_OnTrack )
 
 atlas_add_component( FastTrackSimWrap
                      src/components/*.cxx
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h
index 48207e279a53f88d7ca59c00d09e7292c47cb304..289450b56461d27dde0dffe7af7702a7048bf26f 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h
+++ b/Trigger/TrigFTK/FastTrackSimWrap/FastTrackSimWrap/FTKRegionalWrapper.h
@@ -14,6 +14,8 @@
 #include "InDetPrepRawData/SCT_ClusterContainer.h"
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
+#include "InDetReadoutGeometry/SiDetectorManager.h"
+#include "InDetReadoutGeometry/PixelDetectorManager.h"
 
 #include "TrigFTKToolInterfaces/ITrigFTKClusterConverterTool.h"
 #include "TrigFTKTrackConverter/TrigFTKClusterConverterTool.h"
@@ -33,6 +35,7 @@ class IPixelCablingSvc;
 class ISCT_CablingSvc;
 class StoreGateSvc; 
 class PixelID; 
+class AtlasDetector;
 class SCT_ID;
 class SCT_OnlineId;
 class IdentifierHash;
@@ -63,6 +66,9 @@ private:
   StoreGateSvc*  m_evtStore;
   const PixelID * m_pixelId;
   const SCT_ID * m_sctId;
+  const AtlasDetectorID* m_idHelper;
+  const InDetDD::SiDetectorManager*  m_PIX_mgr;
+  const InDetDD::SiDetectorManager*  m_SCT_mgr;
 
   // variables to manage the distribution of the hits
   int m_IBLMode; //  global FTK setup variable to handle IBL
@@ -95,10 +101,14 @@ private:
   unsigned int m_PixelClusteringMode; /*  1 means ToT information is used
                                           && 400/600um pixels are accounted for
 					  0 is default used up to 2013 */
+  bool m_Ibl3DRealistic; //If true, use HWlike clustering in IBL 3D mod
   bool m_DuplicateGanged;
   bool m_GangedPatternRecognition;
   bool m_WriteClustersToESD;  //write the clusters to the ESD
 
+  bool m_getOffline;
+  std::string m_offlineName;
+
   // variables related to the output fiels
   std::string m_outpath; // output path
   TFile *m_outfile; // ROOT file descriptor
@@ -154,6 +164,24 @@ private:
 
   std::vector<int> m_L1ID_to_save; // vector of L1ID to save, if empty save all
 
+  //offline clusters
+  std::vector<float>   *offline_locX;
+  std::vector<float>   *offline_locY;
+  std::vector<int>     *offline_isPixel;
+  std::vector<int>     *offline_isBarrel;
+  std::vector<int>     *offline_layer;
+  std::vector<int>     *offline_resAssociatedTrack;
+  std::vector<int>     *offline_clustID;
+  std::vector<int>     *offline_trackNumber;
+
+  //offline tracks
+  std::vector<float>   *offline_pt;
+  std::vector<float>   *offline_eta;
+  std::vector<float>   *offline_phi;
+
+
+  TTree *m_offline_cluster_tree;
+
 };
 
 #endif // FTKRegionalWrapper_h
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/cmt/requirements b/Trigger/TrigFTK/FastTrackSimWrap/cmt/requirements
deleted file mode 100644
index 6971b93c784e548e133e49d7ff558691cf59bb7a..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/FastTrackSimWrap/cmt/requirements
+++ /dev/null
@@ -1,85 +0,0 @@
-package FastTrackSimWrap
-
-# This algorithm is used to extract all needed information from
-# Athena for use in the standalone FTK simulation. Eventually an
-# Athena-based FTK simulation will exist and this code will
-# disappear.
-
-author Monica Dunford <mdunford@hep.uchicago.edu>
-author Antonio Boveia <boveia@hep.uchicago.edu>
-author Guido Volpi <guido.volpi@cern.ch>
-
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AtlasROOT		AtlasROOT-*		External
-use TrigFTKSim		TrigFTKSim-*		Trigger/TrigFTK
-use AtlasReconstructionRunTime AtlasReconstructionRunTime-*
-use AtlasPolicy                AtlasPolicy-*
-use GeneratorObjects           GeneratorObjects-*         Generators
-#use TruthHelper                TruthHelper-*              Generators/GenAnalysisTools
-#use HepMC                      HepMC-*                    Simulation
-use InDetPrepRawData           InDetPrepRawData-*         InnerDetector/InDetRecEvent
-use TrigCaloEvent              TrigCaloEvent-*            Trigger/TrigEvent
-use TrigDecisionTool           TrigDecisionTool-*         Trigger/TrigAnalysis
-use TrkTrack                   TrkTrack-*                 Tracking/TrkEvent
-use TrkTruthData               TrkTruthData-*             Tracking/TrkEvent
-#use TrkTruthToTrack            TrkTruthToTrack-*          Tracking/TrkTools
-use TrkTrackSummaryTool        TrkTrackSummaryTool-*      Tracking/TrkTools
-use TrkToolInterfaces          TrkToolInterfaces-*        Tracking/TrkTools
-#use TruthTools                 TruthTools-*               Generators/GenAnalysisTools
-#use Particle                   Particle-*                 Reconstruction
-#use iPatRecEvent               iPatRecEvent-*             Reconstruction/iPat
-#use iPatTruthTrajectory        iPatTruthTrajectory-*      Reconstruction/iPat
-#use iPatTrackParameters        iPatTrackParameters-*      Reconstruction/iPat
-#use iPatInterfaces             iPatInterfaces-*           Reconstruction/iPat
-#use iPatTrajectory             iPatTrajectory-*           Reconstruction/iPat
-use InDetConditionsSummaryService InDetConditionsSummaryService-* InnerDetector/InDetConditions
-#use Boost                     v*                         LCG_Interfaces
-use AtlasBoost		       AtlasBoost-*		  External
-use TrigFTKToolInterfaces     TrigFTKToolInterfaces-*     Trigger/TrigTools
-use TrigFTKTrackConverter     TrigFTKTrackConverter-*     Trigger/TrigTools
-use InDetIdentifier            InDetIdentifier-*          InnerDetector/InDetDetDescr
-
-#use dcache_client             v*                         LCG_Interfaces
-
-private 
-use GaudiInterface             GaudiInterface-*           External
-use AtlasDetDescr              AtlasDetDescr-*            DetectorDescription
-use AtlasHepMC                 AtlasHepMC-*               External
-use EventInfo                  EventInfo-*                Event
-use HepPDT                     v*                         LCG_Interfaces
-use IdDict                     IdDict-*                   DetectorDescription
-use InDetBeamSpotService       InDetBeamSpotService-*     InnerDetector/InDetConditions
-use InDetRawData               InDetRawData-*             InnerDetector/InDetRawEvent
-use InDetReadoutGeometry       InDetReadoutGeometry-*     InnerDetector/InDetDetDescr
-use InDetSimData               InDetSimData-*             InnerDetector/InDetRawEvent
-use IdDictDetDescr             IdDictDetDescr-*           DetectorDescription
-use Identifier                 Identifier-*               DetectorDescription
-use StoreGate                  StoreGate-*                Control
-use TileIdentifier             TileIdentifier-*           TileCalorimeter
-use TrkSpacePoint              TrkSpacePoint-*            Tracking/TrkEvent
-use EventPrimitives            EventPrimitives-*          Event
-#use TrkParameters              TrkParameters-*            Tracking/TrkEvent
-use TrkRIO_OnTrack             TrkRIO_OnTrack-*           Tracking/TrkEvent
-use VxVertex                   VxVertex-*                 Tracking/TrkEvent
-
-use PixelCabling               PixelCabling-*             InnerDetector/InDetDetDescr
-use SCT_Cabling                SCT_Cabling-*              InnerDetector/InDetDetDescr
-end_private
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*jobOptions*.py"
-apply_pattern declare_runtime files="*.dat"
-
-# fix missing libboost_iostreams interface in LCGCMT in 13.0.40
-#macro Boost_linkopts_iostreams " -lboost_iostreams-gcc-mt-$(Boost_file_version) " \
-#      Darwin                         " -lboost_iostreams-d-$(Boost_file_version) " \
-#      WIN32                          "  boost_iostreams-vc71-mt-$(Boost_file_version).lib "
-
-# fix missing libboost_iostreams in LCGCMT in 15.2.0 
-#macro Boost_linkopts_iostreams " -lboost_iostreams-$(Boost_compiler_version)-mt " \
-#      target-darwin            " -lboost_iostreams-$(Boost_compiler_version)-$(Boost_file_version) " \
-#      target-winxp             "  boost_iostreams-$(Boost_compiler_version)-$(Boost_file_version).lib "
-
-private
-macro_append Boost_linkopts " $(Boost_linkopts_iostreams) "
-
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_32TowersIBL3DTest_DFTestVectors_jobOptions.py b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_32TowersIBL3DTest_DFTestVectors_jobOptions.py
index 851cd4529c8c12a48b4e5dd4b17571a950e2b9f3..7cf4af52e4c323199af6b42273f655ba2b3536de 100755
--- a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_32TowersIBL3DTest_DFTestVectors_jobOptions.py
+++ b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_32TowersIBL3DTest_DFTestVectors_jobOptions.py
@@ -43,6 +43,7 @@ wrapper.IBLMode = 2
 wrapper.HitInputTool = FTKSGInput
 wrapper.Clustering = True
 wrapper.PixelClusteringMode=101
+wrapper.Ibl3DRealistic=False
 wrapper.SavePerPlane=True
 wrapper.EmulateDF = True
 wrapper.SaveRawHits = True
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL3D_HWModeID2_jobOptions.py b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL3D_HWModeID2_jobOptions.py
index 3c955ad12ac3e80a1b80efe7b0e2ece4d24ff07e..bf03f291b01c3ddbd5305ab52e313e837dcdb9ea 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL3D_HWModeID2_jobOptions.py
+++ b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL3D_HWModeID2_jobOptions.py
@@ -40,6 +40,7 @@ wrapper.IBLMode = 2
 wrapper.FixEndcapL0 = False
 wrapper.HitInputTool = FTKSGInput
 wrapper.PixelClusteringMode = 101
+wrapper.Ibl3DRealistic = False
 wrapper.SctClustering = True
 wrapper.Clustering = True
 
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_DFTestVectors_jobOptions.py b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_DFTestVectors_jobOptions.py
index 1c95c9dfa192f07202356731eec49c8f8aa3d41a..7e2935267c5f4d5aec75649deaceb7377067b276 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_DFTestVectors_jobOptions.py
+++ b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_64TowersIBL_DFTestVectors_jobOptions.py
@@ -46,6 +46,7 @@ wrapper.IBLMode = 1
 wrapper.HitInputTool = FTKSGInput
 wrapper.Clustering = True
 wrapper.PixelClusteringMode=100
+wrapper.Ibl3DRealistic=False
 wrapper.SavePerPlane=True
 wrapper.EmulateDF = True
 wrapper.SaveRawHits = True
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_Run2GEO_jobOptions.py b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_Run2GEO_jobOptions.py
index 1eb9a9f93d2494099e3ccd2f6a5ab78342a4e151..580dab30bd6e48f946162ff368c62d56585ed85c 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_Run2GEO_jobOptions.py
+++ b/Trigger/TrigFTK/FastTrackSimWrap/share/FastTrackSimRegionalWrap_Run2GEO_jobOptions.py
@@ -7,9 +7,9 @@
 # Helper function from transforms 
 from PyJobTransforms.trfUtils import findFile
 #pmap_path = findFile(os.environ['DATAPATH'], 'ftk_configuration/map_files/raw_12LiblHW_Run2GEO.pmap')#HW
-pmap_path = findFile(os.environ['DATAPATH'], 'ftk_configuration/map_files/raw_12Libl3D.pmap')#offline
+pmap_path = findFile(os.environ['DATAPATH'], 'ftk_configuration/map_files/raw_12LiblHW3D.pmap')#offline
 print "Using PMAP:", pmap_path
-rmap_path = findFile(os.environ['DATAPATH'], 'ftk_configuration/map_files/raw_12Libl64TmodB_3D_t1.tmap')#new!
+rmap_path = findFile(os.environ['DATAPATH'], 'ftk_configuration/map_files/raw_12Libl64TmodB_3D_t13.tmap')#new!
 #rmap_path = findFile(os.environ['DATAPATH'], 'ftk_configuration/map_files/raw_12Libl3DTempv0.tmap')#old
 print "Using RMAP:", rmap_path
 
@@ -40,6 +40,7 @@ wrapper = FTKRegionalWrapper(OutputLevel = DEBUG,
                              OutFileName = OutputNTUP_FTKIPFile)
 wrapper.IBLMode = 2
 wrapper.HitInputTool = FTKSGInput
+wrapper.FixEndcapL0 = True
 #wrapper.Clustering = True
 theJob += wrapper
 
diff --git a/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx b/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx
index f1c63d7390283fe4d54838de905f3f39ad19798a..d7c92f6d1702d1bdeb70e9839388d57f1f507c1a 100644
--- a/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx
+++ b/Trigger/TrigFTK/FastTrackSimWrap/src/FTKRegionalWrapper.cxx
@@ -1,7 +1,7 @@
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
-
+#include "xAODTracking/TrackParticleContainer.h"
 #include "FastTrackSimWrap/FTKRegionalWrapper.h"
 #include "TrigFTKSim/FTKDataInput.h"
 #include "TrigFTKSim/atlClustering.h"
@@ -14,6 +14,7 @@
 #include "PixelCabling/IPixelCablingSvc.h"
 #include "SCT_Cabling/ISCT_CablingSvc.h"
 #include "SCT_Cabling/SCT_OnlineId.h"
+#include "InDetRIO_OnTrack/SiClusterOnTrack.h"
 
 #include "InDetIdentifier/PixelID.h"
 #include "InDetIdentifier/SCT_ID.h"
@@ -36,6 +37,9 @@ FTKRegionalWrapper::FTKRegionalWrapper (const std::string& name, ISvcLocator* pS
   m_evtStore(0 ),
   m_pixelId(0),
   m_sctId(0),
+  m_idHelper(0),
+  m_PIX_mgr(0),
+  m_SCT_mgr(0),
   m_IBLMode(0),
   m_fixEndcapL0(false),
   m_ITkMode(false),
@@ -55,9 +59,12 @@ FTKRegionalWrapper::FTKRegionalWrapper (const std::string& name, ISvcLocator* pS
   m_DiagClustering(true),
   m_SctClustering(false),
   m_PixelClusteringMode(1),
+  m_Ibl3DRealistic(false),
   m_DuplicateGanged(true),
   m_GangedPatternRecognition(false),
   m_WriteClustersToESD(false),
+  m_getOffline(false),
+  m_offlineName("InDetTrackParticles"),
   m_outpath("ftksim_smartwrapper.root"),
   m_outfile(0x0),
   m_hittree(0x0),
@@ -102,7 +109,18 @@ FTKRegionalWrapper::FTKRegionalWrapper (const std::string& name, ISvcLocator* pS
   m_ftkPixelTruthName("PRD_MultiTruthPixel_FTK"),
   m_ftkSctTruthName("PRD_MultiTruthSCT_FTK"),
   m_mcTruthName("TruthEvent"),
-  m_L1ID_to_save(std::vector<int>())
+  m_L1ID_to_save(std::vector<int>()),
+  offline_locX(nullptr),
+  offline_locY(nullptr),
+  offline_isPixel(nullptr),
+  offline_isBarrel(nullptr),
+  offline_layer(nullptr),
+  offline_clustID(nullptr),
+  offline_trackNumber(nullptr),
+  offline_pt(nullptr),
+  offline_eta(nullptr),
+  offline_phi(nullptr),
+  m_offline_cluster_tree(nullptr)
 {
   
   declareProperty("TrigFTKClusterConverterTool", m_clusterConverterTool);
@@ -124,12 +142,16 @@ FTKRegionalWrapper::FTKRegionalWrapper (const std::string& name, ISvcLocator* pS
   declareProperty("SavePerPlane",m_SavePerPlane);
   declareProperty("DumpTestVectors",m_DumpTestVectors);
   
+  declareProperty("GetOffline",m_getOffline);
+  declareProperty("OfflineName",m_offlineName);
+
   // clustering options
   declareProperty("Clustering",m_Clustering);
   declareProperty("SaveClusterContent",m_SaveClusterContent);
   declareProperty("DiagClustering",m_DiagClustering);
   declareProperty("SctClustering",m_SctClustering);
   declareProperty("PixelClusteringMode",m_PixelClusteringMode);
+  declareProperty("Ibl3DRealistic",m_Ibl3DRealistic);
   declareProperty("DuplicateGanged",m_DuplicateGanged);
   declareProperty("GangedPatternRecognition",m_GangedPatternRecognition);
 
@@ -255,7 +277,23 @@ StatusCode FTKRegionalWrapper::initialize()
     return StatusCode::FAILURE;
   }
 
+  if( m_detStore->retrieve(m_idHelper, "AtlasID").isFailure() ) {
+    log << MSG::ERROR << "Unable to retrieve AtlasDetector helper from DetectorStore" << endmsg;
+    return StatusCode::FAILURE;
+  }
   
+  if( m_detStore->retrieve(m_PIX_mgr, "Pixel").isFailure() ) {
+    log << MSG::ERROR << "Unable to retrieve Pixel manager from DetectorStore" << endmsg;
+    return StatusCode::FAILURE;
+  }
+
+  if( m_detStore->retrieve(m_SCT_mgr, "SCT").isFailure() ) {
+    log << MSG::ERROR << "Unable to retrieve SCT manager from DetectorStore" << endmsg;
+    return StatusCode::FAILURE;
+  }
+  
+
+
   // Write clusters in InDetCluster format to ESD for use in Pseudotracking
   if (m_WriteClustersToESD){
     StatusCode sc = service("StoreGateSvc", m_storeGate);
@@ -326,6 +364,7 @@ StatusCode FTKRegionalWrapper::initialize()
   DIAG_CLUSTERING = m_DiagClustering;
   SCT_CLUSTERING = m_SctClustering;
   PIXEL_CLUSTERING_MODE = m_PixelClusteringMode;
+  IBL3D_REALISTIC = m_Ibl3DRealistic;
   DUPLICATE_GANGED = m_DuplicateGanged;
   GANGED_PATTERN_RECOGNITION = m_GangedPatternRecognition;
 
@@ -428,8 +467,8 @@ StatusCode FTKRegionalWrapper::initOutputFile() {
 
   m_evtinfo->Branch("LB",&m_LB,"LB/I");
   m_evtinfo->Branch("BCID",&m_BCID,"BCID/I");
-  m_evtinfo->Branch("ExtendedLevel1ID",&m_extendedLevel1ID,"ExtendedLevel1ID/I");
-  m_evtinfo->Branch("Level1TriggerType",&m_level1TriggerType,"Level1TriggerType/I");
+  m_evtinfo->Branch("ExtendedLevel1ID",&m_extendedLevel1ID,"ExtendedLevel1ID/i");
+  m_evtinfo->Branch("Level1TriggerType",&m_level1TriggerType,"Level1TriggerType/i");
   m_evtinfo->Branch("Level1TriggerInfo",&m_level1TriggerInfo);
   m_evtinfo->Branch("AverageInteractionsPerCrossing",&m_averageInteractionsPerCrossing,"AverageInteractionsPerCrossing/F");
   m_evtinfo->Branch("ActualInteractionsPerCrossing",&m_actualInteractionsPerCrossing,"ActualInteractionsPerCrossing/F");  
@@ -439,6 +478,34 @@ StatusCode FTKRegionalWrapper::initOutputFile() {
   m_hittree = new TTree("ftkhits","Raw hits for the FTK simulation");
   m_hittree_perplane = new TTree("ftkhits_perplane","Raw hits for the FTK simulation");
   
+
+  if (m_getOffline) {
+    offline_locX = new std::vector<float>;
+    offline_locY = new std::vector<float>;
+    offline_isPixel = new std::vector<int>;
+    offline_isBarrel = new std::vector<int>;
+    offline_layer = new std::vector<int>;
+    offline_clustID = new std::vector<int>;
+    offline_trackNumber = new std::vector<int>;
+    offline_pt = new std::vector<float>;
+    offline_eta = new std::vector<float>;
+    offline_phi = new std::vector<float>;
+
+    m_offline_cluster_tree = new TTree("offline_cluster_tree","offline_cluster_tree");
+    m_offline_cluster_tree->Branch("offline_locX",&offline_locX);
+    m_offline_cluster_tree->Branch("offline_locY",&offline_locY);
+    m_offline_cluster_tree->Branch("offline_is_Pixel",&offline_isPixel);
+    m_offline_cluster_tree->Branch("offline_is_Barrel",&offline_isBarrel);
+    m_offline_cluster_tree->Branch("offline_layer",&offline_layer);
+    m_offline_cluster_tree->Branch("offline_clustID",&offline_clustID);
+    
+    m_offline_cluster_tree->Branch("offline_trackNumber",&offline_trackNumber);
+    m_offline_cluster_tree->Branch("offline_pt",&offline_pt);
+    m_offline_cluster_tree->Branch("offline_eta",&offline_eta);
+    m_offline_cluster_tree->Branch("offline_phi",&offline_phi);
+  }
+
+
   // prepare a branch for each tower
   m_ntowers = m_rmap->getNumRegions();
 
@@ -503,6 +570,19 @@ StatusCode FTKRegionalWrapper::execute()
     }
   }
 
+  if (m_getOffline) {
+    offline_locX->clear();
+    offline_locY->clear();
+    offline_isPixel->clear();
+    offline_isBarrel->clear();
+    offline_layer->clear(); 
+    offline_clustID->clear();
+    offline_trackNumber->clear(); 
+    offline_pt->clear(); 
+    offline_eta->clear();
+    offline_phi->clear();
+  }
+
   // ask to read the data in the current event
   datainput->readData();
 
@@ -614,6 +694,67 @@ StatusCode FTKRegionalWrapper::execute()
     atlClusteringLNF(fulllist);
   }
 
+  if (m_getOffline) {
+    const xAOD::TrackParticleContainer *offlineTracks = nullptr;
+    if(m_storeGate->retrieve(offlineTracks,m_offlineName).isFailure()) {
+      ATH_MSG_ERROR("Failed to retrieve Offline Tracks " << m_offlineName);
+      return StatusCode::FAILURE;
+    }
+    if(offlineTracks->size()!=0){
+      auto track_it   = offlineTracks->begin();
+      auto last_track = offlineTracks->end();
+      for (int iTrk=0 ; track_it!= last_track; track_it++, iTrk++){
+	auto track = (*track_it)->track();
+	offline_pt->push_back((*track_it)->pt()*(*track_it)->charge());
+	offline_eta->push_back((*track_it)->eta());
+	offline_phi->push_back((*track_it)->phi());
+	const DataVector<const Trk::TrackStateOnSurface>* trackStates=track->trackStateOnSurfaces();   
+	if(!trackStates)     ATH_MSG_ERROR("trackStatesOnSurface troubles");
+	DataVector<const Trk::TrackStateOnSurface>::const_iterator it=trackStates->begin();
+	DataVector<const Trk::TrackStateOnSurface>::const_iterator it_end=trackStates->end();
+	if (!(*it)) {
+	  ATH_MSG_WARNING("TrackStateOnSurface == Null" << endl);
+	  continue;
+	}
+	for (; it!=it_end; it++) {
+	  const Trk::TrackStateOnSurface* tsos=(*it);       
+	  if (tsos == 0) continue;
+	  if ((*it)->type(Trk::TrackStateOnSurface::Measurement) ){
+	    const Trk::MeasurementBase *measurement = (*it)->measurementOnTrack();
+	    if(  (*it)->trackParameters() !=0 &&
+		 (*it)->trackParameters()->associatedSurface().associatedDetectorElement() != nullptr &&
+		 (*it)->trackParameters()->associatedSurface().associatedDetectorElement()->identify() !=0
+		 ){
+	      const Trk::RIO_OnTrack* hit = dynamic_cast <const Trk::RIO_OnTrack*>(measurement);
+	      const Identifier & hitId = hit->identify();
+
+	      if (m_idHelper->is_pixel(hitId)) {
+		offline_isPixel->push_back(1);
+		offline_isBarrel->push_back(int(m_pixelId->is_barrel(hitId)));
+		const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(hitId);
+		offline_clustID->push_back(sielement->identifyHash());
+		offline_trackNumber->push_back(iTrk);
+		offline_layer->push_back(m_pixelId->layer_disk(hitId));
+		offline_locX->push_back((float)measurement->localParameters()[Trk::locX]);
+		offline_locY->push_back((float)measurement->localParameters()[Trk::locY]);
+	      }
+	      else if (m_idHelper->is_sct(hitId)) {
+		offline_isPixel->push_back(0);
+		offline_isBarrel->push_back(int(m_sctId->is_barrel(hitId)));
+		const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(hitId);
+		offline_clustID->push_back(sielement->identifyHash());
+		offline_trackNumber->push_back(iTrk);
+		offline_layer->push_back(m_sctId->layer_disk(hitId));
+		offline_locX->push_back((float)measurement->localParameters()[Trk::locX]);
+		offline_locY->push_back(-99999.9);
+	      }
+	    }
+	  }
+	}
+      }
+    }
+  }
+
   //get all the containers to write clusters
   if(m_WriteClustersToESD){
     if(!m_storeGate->contains<PRD_MultiTruthCollection>(m_ftkSctTruthName)) { 
@@ -743,6 +884,9 @@ StatusCode FTKRegionalWrapper::execute()
 
   // fill the branches
   m_hittree->Fill();
+
+  if (m_getOffline) m_offline_cluster_tree->Fill();
+
   if (m_SavePerPlane) { m_hittree_perplane->Fill(); }
   
   // get the list of the truth tracks
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/TrigFTKBankGen/FTKBankGenAlgo.h b/Trigger/TrigFTK/TrigFTKBankGen/TrigFTKBankGen/FTKBankGenAlgo.h
index 78fd4e1a00ed15ea72eb88cb2d55b10e7e779799..79cae0b532768aad998b3f1f2b482ae6a3e8bbee 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/TrigFTKBankGen/FTKBankGenAlgo.h
+++ b/Trigger/TrigFTK/TrigFTKBankGen/TrigFTKBankGen/FTKBankGenAlgo.h
@@ -117,6 +117,7 @@ private:
   unsigned int m_PixelClusteringMode; // 1 means ToT information is used
                                       //   && 400/600um pixels are accounted for
                                       // 0 is default used up to 2013
+  bool m_Ibl3DRealistic;
   bool m_DuplicateGanged;
   bool m_GangedPatternRecognition;
 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/scripts/FTKMatrixReduction_tf.py b/Trigger/TrigFTK/TrigFTKBankGen/scripts/FTKMatrixReduction_tf.py
index 890f94a06e8dab3295f936bdefd02c6d14362435..3f21c7eaf26c41df6d1d0c756b4d30959072c3f9 100755
--- a/Trigger/TrigFTK/TrigFTKBankGen/scripts/FTKMatrixReduction_tf.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/scripts/FTKMatrixReduction_tf.py
@@ -69,5 +69,8 @@ def addFTKPattGenArgs(parser):
     parser.add_argument('--inputFTKMatrixFile', type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile,runarg=True), 
                        help="input matrix file", group="FTKMatrixReduction" )
 
+    parser.add_argument('--ITkMode', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True), 
+                        help='Use ITk geometry', group='FTKMatrixReduction')
+
 if __name__ == '__main__':
     main()
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/FTKBankGen_joboptions.py b/Trigger/TrigFTK/TrigFTKBankGen/share/FTKBankGen_joboptions.py
index 3158cab53be3632aff52b7ba97e7b45025bcc2f9..21dde229450317d8077ad371e26250b73f4a59d0 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/FTKBankGen_joboptions.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/FTKBankGen_joboptions.py
@@ -278,6 +278,7 @@ FTKBankGen.SaveClusterContent = False;
 FTKBankGen.DiagClustering = True;
 #FTKBankGen.SctClustering = False;
 FTKBankGen.PixelClusteringMode = 1;
+FTKBankGen.Ibl3DRealistic = False;
 FTKBankGen.DuplicateGanged = True;
 FTKBankGen.GangedPatternRecognition = False;
 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_32TModB_HWMode2_joboptions.py b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_32TModB_HWMode2_joboptions.py
index 9fcdbb0a32e3bb2de836573b330002a792d36538..ff747541249bad17e0b5309b8f4da9030e191edd 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_32TModB_HWMode2_joboptions.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_32TModB_HWMode2_joboptions.py
@@ -64,6 +64,7 @@ FTKBankGen.SaveClusterContent = False;
 FTKBankGen.DiagClustering = True;
 #FTKBankGen.SctClustering = False;
 FTKBankGen.PixelClusteringMode = 1;
+FTKBankGen.Ibl3DRealistic = False;
 FTKBankGen.DuplicateGanged = True;
 FTKBankGen.GangedPatternRecognition = False;
 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_32TModB_joboptions.py b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_32TModB_joboptions.py
index 42144409982b818ea7d4e09b3a7fd543c5338f43..a1acdb252ade898b95ae6d04596ba9b6cd29df53 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_32TModB_joboptions.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_32TModB_joboptions.py
@@ -64,6 +64,7 @@ FTKBankGen.SaveClusterContent = False;
 FTKBankGen.DiagClustering = True;
 #FTKBankGen.SctClustering = False;
 FTKBankGen.PixelClusteringMode = 1;
+FTKBankGen.Ibl3DRealistic = False;
 FTKBankGen.DuplicateGanged = True;
 FTKBankGen.GangedPatternRecognition = False;
 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_64TModB_HWMode2_joboptions.py b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_64TModB_HWMode2_joboptions.py
index 74ce9e2aa560e878c7cd7523b3bcf3d0b8a5a2d0..22b5e82153b79b11356d8e21cbefe5263691e8eb 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_64TModB_HWMode2_joboptions.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_64TModB_HWMode2_joboptions.py
@@ -64,6 +64,7 @@ FTKBankGen.SaveClusterContent = False;
 FTKBankGen.DiagClustering = True;
 #FTKBankGen.SctClustering = False;
 FTKBankGen.PixelClusteringMode = 1;
+FTKBankGen.Ibl3DRealsitic = False;
 FTKBankGen.DuplicateGanged = True;
 FTKBankGen.GangedPatternRecognition = False;
 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_64TModB_joboptions.py b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_64TModB_joboptions.py
index 3562b5009ab04f22784601dbb44e65301c49f2bf..561ae891b7f68e0b5682cabba5c0b5b4d2b11d25 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_64TModB_joboptions.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_64TModB_joboptions.py
@@ -64,6 +64,7 @@ FTKBankGen.SaveClusterContent = False;
 FTKBankGen.DiagClustering = True;
 #FTKBankGen.SctClustering = False;
 FTKBankGen.PixelClusteringMode = 1;
+FTKBankGen.Ibl3DRealistic = False;
 FTKBankGen.DuplicateGanged = True;
 FTKBankGen.GangedPatternRecognition = False;
 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_HWMode2_joboptions.py b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_HWMode2_joboptions.py
index a25e80e147a3063b8be680d609b988b520fb65d6..5a3a42fb7d2420989c7fb696a247bb285dba37f6 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_HWMode2_joboptions.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_HWMode2_joboptions.py
@@ -64,6 +64,7 @@ FTKBankGen.SaveClusterContent = False;
 FTKBankGen.DiagClustering = True;
 #FTKBankGen.SctClustering = False;
 FTKBankGen.PixelClusteringMode = 1;
+FTKBankGen.Ibl3DRealistic = False;
 FTKBankGen.DuplicateGanged = True;
 FTKBankGen.GangedPatternRecognition = False;
 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_Run2GEO_32TModB_joboptions.py b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_Run2GEO_32TModB_joboptions.py
index 7fa0e9ac42c8424e586dd20eb9f7455943f08dac..8ead03fe7e6b9e5379737f14ecfcf04936e7580a 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_Run2GEO_32TModB_joboptions.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenIBL_Run2GEO_32TModB_joboptions.py
@@ -66,6 +66,7 @@ FTKBankGen.SaveClusterContent = False;
 FTKBankGen.DiagClustering = True;
 #FTKBankGen.SctClustering = False;
 FTKBankGen.PixelClusteringMode = 1;
+FTKBankGen.Ibl3DRealistic = False;
 FTKBankGen.DuplicateGanged = True;
 FTKBankGen.GangedPatternRecognition = False;
 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenITk_joboptions.py b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenITk_joboptions.py
index 6d48addfdae33752de7a85777070dee02c84f8c9..72d5fdfa92cfe5b30186e15b59b1cb671ea66060 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenITk_joboptions.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGenITk_joboptions.py
@@ -27,6 +27,7 @@ FTKBankGen.Clustering               = False;
 FTKBankGen.SaveClusterContent       = False;
 FTKBankGen.DiagClustering           = True;
 FTKBankGen.PixelClusteringMode      = 0;
+FTKBankGen.Ibl3DRealistic           = False;
 FTKBankGen.DuplicateGanged          = True;
 FTKBankGen.GangedPatternRecognition = False;
 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGen_joboptions.py b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGen_joboptions.py
index 0888cb8fe6abc71f5d4541488cf0e7fe65daf24d..f05675ab6de7a758df4e90fdd90dccdb3ae650ad 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGen_joboptions.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/r2e_FTKBankGen_joboptions.py
@@ -63,6 +63,7 @@ FTKBankGen.SaveClusterContent = False;
 FTKBankGen.DiagClustering = True;
 #FTKBankGen.SctClustering = False;
 FTKBankGen.PixelClusteringMode = 1;
+FTKBankGen.Ibl3DRealistic = False;
 FTKBankGen.DuplicateGanged = True;
 FTKBankGen.GangedPatternRecognition = False;
 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/skeleton.FTKConstantGen.py b/Trigger/TrigFTK/TrigFTKBankGen/share/skeleton.FTKConstantGen.py
index 3232e8a442d2b39b7eabeb63590f5d6ba11bc5b8..23565cfe48644f6848da86e197276e740e0af747 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/skeleton.FTKConstantGen.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/skeleton.FTKConstantGen.py
@@ -36,6 +36,11 @@ FTKConstGenAlgo.nbank=runArgs.NBanks
 #     setattr(runArgs, "allregions", False)
 # FTKConstGenAlgo.allregion = runArgs.allregions 
 
+if not hasattr(runArgs, "ITkMode") :
+    setattr(runArgs, "ITkMode", False)
+FTKConstGenAlgo.ITkMode= runArgs.ITkMode
+
+
 if not hasattr(runArgs, "bankregion") :
     setattr(runArgs, "bankregion", 0)
 FTKConstGenAlgo.region=runArgs.bankregion # if the previous option is True this line is not important
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/share/skeleton.FTKMatrixReduction.py b/Trigger/TrigFTK/TrigFTKBankGen/share/skeleton.FTKMatrixReduction.py
index c5303250b7e764c33eea7d633e0e571f69625468..e8ee908f08c2a665d4f72847895c63b2527455c7 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/share/skeleton.FTKMatrixReduction.py
+++ b/Trigger/TrigFTK/TrigFTKBankGen/share/skeleton.FTKMatrixReduction.py
@@ -32,6 +32,10 @@ FTKConstGenAlgo.eightLayer= runArgs.eightLayer
 
 FTKConstGenAlgo.nbank=runArgs.NBanks
 
+if not hasattr(runArgs, "ITkMode") :
+    setattr(runArgs, "ITkMode", False)
+FTKConstGenAlgo.ITkMode= runArgs.ITkMode
+
 if not hasattr(runArgs, "allregions") :
     setattr(runArgs, "allregions", False)
 FTKConstGenAlgo.allregion = runArgs.allregions 
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/src/FTKBankGenAlgo.cxx b/Trigger/TrigFTK/TrigFTKBankGen/src/FTKBankGenAlgo.cxx
index 2524898f61d06cc5931c575f237d7ec884206793..cfc1d3b518092f388157d25a27c5c8d8b06e4a55 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/src/FTKBankGenAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTKBankGen/src/FTKBankGenAlgo.cxx
@@ -49,6 +49,7 @@ FTKBankGenAlgo::FTKBankGenAlgo(const std::string& name, ISvcLocator* pSvcLocator
   m_DiagClustering(true),
   m_SctClustering(false),
   m_PixelClusteringMode(1),
+  m_Ibl3DRealistic(false),
   m_DuplicateGanged(true),
   m_GangedPatternRecognition(false),
   m_UseIdentifierHash(false),
@@ -111,6 +112,7 @@ FTKBankGenAlgo::FTKBankGenAlgo(const std::string& name, ISvcLocator* pSvcLocator
   declareProperty("DiagClustering",m_DiagClustering);
   declareProperty("SctClustering",m_SctClustering);
   declareProperty("PixelClusteringMode",m_PixelClusteringMode);
+  declareProperty("Ibl3DRealistic",m_Ibl3DRealistic);
   declareProperty("DuplicateGanged",m_DuplicateGanged);
   declareProperty("GangedPatternRecognition",m_GangedPatternRecognition);
 
@@ -197,6 +199,7 @@ StatusCode FTKBankGenAlgo::initialize(){
   /* initialize the clustering global variables, decalred in TrigFTKSim/atlClusteringLNF.h */
   //hitinput->setClustering(m_Clustering);
   hitinput->setPixelClusteringMode(m_PixelClusteringMode);
+  hitinput->setIbl3DRealistic(m_Ibl3DRealistic);
   hitinput->setSctClustering(m_SctClustering);
   /*
   SAVE_CLUSTER_CONTENT = m_SaveClusterContent;
diff --git a/Trigger/TrigFTK/TrigFTKBankGen/src/FTKConstGenAlgo.cxx b/Trigger/TrigFTK/TrigFTKBankGen/src/FTKConstGenAlgo.cxx
index 39664e44eebd36834d7be2a12e9cafde78c72676..673ef46820ba23f3c8010a926e635d752a9f3fc9 100644
--- a/Trigger/TrigFTK/TrigFTKBankGen/src/FTKConstGenAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTKBankGen/src/FTKConstGenAlgo.cxx
@@ -137,7 +137,7 @@ StatusCode FTKConstGenAlgo::initialize(){
 
     // These 6 counters will evolve in each step of map building
     // to generalize to 1st/2nd stage extrapolation.
-    endcap_inversion = new bool[12];
+    endcap_inversion = new bool[nplane];
 
     plane_index_1st_stage = 0;
     plane_index_2nd_stage = 0;
@@ -879,6 +879,7 @@ void FTKConstGenAlgo::constantgen()
   maxvals[2]= maxvals[2]*M_PI;
   minvals[2]= minvals[2]*M_PI;
 
+  // Hardcoded resolutions need to be fixed
   double resolutions[14] = {0.04, 0.08265625, 0.04, 0.08265625, 0.04, 0.08265625, 0.04515625, 0.04515625, 0.04515625, 0.04515625, 0.04515625, 0.04515625, 0.04515625, 0.04515625};
 #ifdef DEBUG_NOISE
   float n[30];
@@ -1504,8 +1505,8 @@ void FTKConstGenAlgo::extract_1stStage()
   double *tmpxZ;
   double *tmpcovx;
 
-  int ndim8 = 11;
-  int ndim2_8 = 11*11;
+  int ndim8 = m_pmap_8L->getTotalDim();;
+  int ndim2_8 = ndim8*ndim8;
   int nth_dim8 = 0;
   int nth_dim8_2 = 0;
   int idx_cov8 = 0;
@@ -1648,10 +1649,16 @@ void FTKConstGenAlgo::extract_1stStage()
       Mtmp.Coto=tmpCoto, Mtmp.Z=tmpZ,Mtmp.nhit=nhit;
 
       // check if the module belongs to endcap (for endcap inversion.).
-      bool isEndcap[12]={0};
+      bool isEndcap[nplane]={0};
 
       for(int plane_idx_2nd_stage = 0;plane_idx_2nd_stage<nplane;plane_idx_2nd_stage++){
-      	if(sectorID[plane_idx_2nd_stage]%1000>20) isEndcap[plane_idx_2nd_stage]=true;
+	if(m_ITkMode){
+	  if((sectorID[plane_idx_2nd_stage]%100) / 10 != 2 ){
+	    isEndcap[plane_idx_2nd_stage]=true;
+	  }
+	}else{
+	  if(sectorID[plane_idx_2nd_stage]%1000>20) isEndcap[plane_idx_2nd_stage]=true;
+	}
       }
 
       // main function extract 1st stage (8L) from 2nd stage (12L)
diff --git a/Trigger/TrigFTK/TrigFTKByteStream/cmt/requirements b/Trigger/TrigFTK/TrigFTKByteStream/cmt/requirements
deleted file mode 100644
index 0eb0f29ce1793cfc0f601d65b90ee4e7963f7d57..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/TrigFTKByteStream/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-package TrigFTKByteStream
-
-author Bartosz Mindur <bartosz.mindur@cern.ch>
-author Tomasz Bold <tomasz.bold@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-use GaudiInterface        GaudiInterface-*             External
-use DataCollection        DataCollection-*	       External
-
-use AthenaBaseComps      AthenaBaseComps-*             Control
-use ByteStreamCnvSvcBase ByteStreamCnvSvcBase-*        Event
-use ByteStreamData       ByteStreamData-*              Event
-use TrigFTK_RawData      TrigFTK_RawData-*             Trigger/TrigFTK
-
-use PyJobTransforms 	PyJobTransforms-* 	Tools
-
-# Specify the required tdaq-common components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(tdaq-common COMPONENTS eformat_write DataWriter)"
-
-library TrigFTKByteStream *.cxx components/*.cxx
-apply_pattern component_library
-
-
-private
-use AthenaKernel          AthenaKernel-*          Control
-use StoreGate             StoreGate-*             Control
-use TestPolicy            TestPolicy-*
-use TestTools             TestTools-*             AtlasTest
-apply_pattern CppUnit name=FTKEncodeDecode_test files="-s=../test FTKEncodeDecode_CppUnit.cxx"
-
-apply_pattern declare_job_transforms tfs='*_tf.py' jo='skeleton.*.py'
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_xmls extras="-s=../share *.dtd *.xml"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigFTK/TrigFTKPool/cmt/requirements b/Trigger/TrigFTK/TrigFTKPool/cmt/requirements
deleted file mode 100644
index 73c72152339d942f141df6330b9470df3dd9ce41..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/TrigFTKPool/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-package TrigFTKPool
-
-author Guido Volpi <guido.volpi@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-use CLIDSvc               CLIDSvc-*               Control
-use DataModel             DataModel-*             Control
-
-private
-use AthenaPoolCnvSvc      AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use AthenaPoolUtilities   AthenaPoolUtilities-*      Database/AthenaPOOL
-use AtlasROOT             AtlasROOT-*                External
-end_private
-
-# Specify required ROOT components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS MathCore)"
-
-library TrigFTKPool *.cxx
-apply_pattern installed_library
-
-macro_append TrigFTKPoolPoolCnv_dependencies " TrigFTKPool "
-
-private
-use AtlasReflex             AtlasReflex-*            External -no_auto_imports
-
-#apply_pattern lcgdict dict=TrigFTKEventPool selectionfile=selection.xml navigables="ExampleHitContainer" headerfiles="-s=${TrigFTKEventPool_root}/TrigFTKEventPool TrigFTKEventPoolDict.h"
-apply_pattern lcgdict dict=TrigFTKPool selectionfile=selection.xml headerfiles="-s=${TrigFTKPool_root}/TrigFTKPool TrigFTKPoolDict.h"
-
-apply_pattern poolcnv files="-s=${TrigFTKPool_root}/TrigFTKPool FTKTestData.h FTKAthTrackContainer.h FTKTrackFitterStats.h"
\ No newline at end of file
diff --git a/Trigger/TrigFTK/TrigFTKPool/doc/packagedoc.h b/Trigger/TrigFTK/TrigFTKPool/doc/packagedoc.h
deleted file mode 100644
index 2d922ed63eddd445cd7e27e0b0ceb64e1b3db4d7..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/TrigFTKPool/doc/packagedoc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-@page TrigFTKPool_page TrigFTKEventPool Package
-
->> Please enter an overview of the created package here: What does it contain?
-
-@author Guido Volpi <guido.volpi@cern.ch>
-
-@section TrigFTKPool_TrigFTKEventPoolIntro Introduction
-
->> Please enter a brief description of the package here.
-
-@section TrigFTKPool_TrigFTKEventPoolReq Requirements
-
-
-*/
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDataInput.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDataInput.h
index c20e7f618b73863cb39f7e2ed140518cf1bfe472..67aa0ece810bf39f5e0d35a7a70dae7ffe7a21e0 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDataInput.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKDataInput.h
@@ -71,6 +71,7 @@ protected:
   unsigned int m_PixelClusteringMode; // 1 means ToT information is used
                                       //   && 400/600um pixels are accounted for
                                       // 0 is default used up to 2013
+  bool m_Ibl3DRealistic; // If true, use HWlike clustering in IBL 3D mod
   bool m_DuplicateGanged;
   bool m_GangedPatternRecognition;
 
@@ -159,6 +160,9 @@ public:
   void setPixelClusteringMode(unsigned int v) { m_PixelClusteringMode = v; }
   bool getPixelClusteringMode() const { return m_PixelClusteringMode; }
 
+  void setIbl3DRealistic(bool v) { m_Ibl3DRealistic = v; }
+  bool getIbl3DRealistic() const { return m_Ibl3DRealistic; }
+
   void setDuplicateGanged(bool v) { m_DuplicateGanged = v; }
   bool getDuplicateGanged() const { return m_DuplicateGanged; }
 
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadFileInput.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadFileInput.h
index 6e680f5d1816aa17fcc2972f2c2a291ecd7423bb..cacffdd38746d485a3c89f4224190480b975face 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadFileInput.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadFileInput.h
@@ -36,6 +36,7 @@ class FTKRoadFileInput : public FTKRoadInput, public FTKObjectInput<FTKRoadStrea
 
   int nextEvent(); // read the next event
   const FTKRoad* nextRoad(int); // move to the next road and return the pointer
+  const FTKRoad* firstRoad(int); // move to the first road and return the pointer
   const FTKSS& getSS(const unsigned int&,const unsigned int&,const unsigned int&) const; // retrieve superstrip by (bank,plane,ssid)
   const FTKSS& getUnusedSS(const unsigned int&,const unsigned int&,const unsigned int&) const; // retrieve superstrip by (bank,plane,ssid)
   FTKRoad* getRoad(int region,int roadid,int bankid); // retrieve road by its indices
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadFinderAlgo.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadFinderAlgo.h
index 45f2f5c38b13b691fb9f2034d9ae79d4777c37fb..5bf3cf29544adc3b105ab13007bebfdc8ed39937 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadFinderAlgo.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadFinderAlgo.h
@@ -64,6 +64,7 @@ private:
   double m_ss_offset_fraction;
 
   int m_PixelClusteringMode; // clustering mode: 0 left edge, 1 center (also use ToT and correct for different lenght of pixels)
+  bool m_Ibl3DRealistic; //If true, use HWlike clustering in IBL 3D mod
   int m_DuplicateGanged; // duplicate ganged pixels to remove efficiency loss
   int m_GangedPatternRecognition;  // pattern recognition to remove duplicates
   int m_SctClustering;       // SCT clustering: 0 disabled, 1 enabled
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadInput.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadInput.h
index 3fb69ffe5714dac50f530403d1bcc90c8846437c..83fdf4ceda37e1d249ff6a31f5b86aec10330f84 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadInput.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadInput.h
@@ -33,6 +33,7 @@ class FTKRoadInput {
   virtual unsigned long eventNumber(const unsigned int& ibank) const  = 0;
 
   virtual const FTKRoad* nextRoad(int) = 0; // move to the next road and return the pointer
+  virtual const FTKRoad* firstRoad(int) = 0; // move to the first road and return the pointer
   virtual const FTKSS& getSS(const unsigned int&,const unsigned int&,const unsigned int&) const = 0; // retrieve superstrip by (bank,plane,ssid)
   virtual const FTKSS& getUnusedSS(const unsigned int&,const unsigned int&,const unsigned int&) const = 0; // retrieve superstrip by (bank,plane,ssid)
   virtual FTKRoad* getRoad(int region,int roadid,int bankid) = 0; // retrieve road by its indices
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadStream.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadStream.h
index 6001eeb26413715b3b9e72fe0ce9f4ad524e18cc..f822dacb0b238b4e35cc8be9ae5f3104bd7cfe3c 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadStream.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKRoadStream.h
@@ -196,6 +196,7 @@ public:
 
   unsigned prepareFitList(); // make the list end return the begin  
   FTKRoad* fetchRoad(); // get the current road and point to the next
+  FTKRoad* fetchFirstRoad(); // get the first road and point to the it
   void rewindFitList() { m_fit_iter = m_fit_list.begin(); }
 
   ClassDef(FTKRoadStream,12)
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKTrackFitterAlgo.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKTrackFitterAlgo.h
index caa4cbb5cfd61562a831b171e8d68db67138bfbb..41abbef8a66c9d6fe6cd3f2b7ca7e6f5cc39935c 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKTrackFitterAlgo.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTKTrackFitterAlgo.h
@@ -63,6 +63,7 @@ private:
   bool m_doAuxFW;
  
   int m_HitWarrior;
+  int m_HitWarrior_first;
   int m_KeepRejected; 
   int m_FitRemoved;
   int m_DoMajority;
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_RoadMarketIO.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_RoadMarketIO.h
index bc7cf9a5a8d0bb6afbe74c78f0537cea83271e2e..656dea7a7dfbcf51ba77f16902008932c68eb685 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_RoadMarketIO.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/FTK_RoadMarketIO.h
@@ -39,6 +39,7 @@ public:
   virtual unsigned long eventNumber(const unsigned int& ibank) const;
 
   virtual const FTKRoad* nextRoad(int); // move to the next road and return the pointer
+  virtual const FTKRoad* firstRoad(int); // move to the first road and return the pointer
   virtual const FTKSS& getSS(const unsigned int&,const unsigned int&,const unsigned int&) const; // retrieve superstrip by (bank,plane,ssid)
   virtual const FTKSS& getUnusedSS(const unsigned int&,const unsigned int&,const unsigned int&) const; // retrieve superstrip by (bank,plane,ssid)
   virtual FTKRoad* getRoad(int region,int roadid,int bankid); // retrieve road by its indices
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/TrackFitter.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/TrackFitter.h
index 83285a4683b8d308669330fec1a5ae9a7f2c02bc..59f580740deabe282a900b99898b27c2140a87fd 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/TrackFitter.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/TrackFitter.h
@@ -35,6 +35,8 @@ protected:
 
   int m_HitWarrior; // 1 means in-road HW enabled, 2 mean global HW (default)
 
+  int m_HitWarrior_first; // 0 means no HW in the 1st stage, 1 means HW within the same raod (default), and 2 means HW within the same sector
+
   int m_HW_ndiff; // maximum number of different points
 
   float *m_HW_dev; //[m_ncoords] tolerances for the HW
@@ -82,6 +84,10 @@ protected:
 
   std::list<FTKTrack> m_tracks; // list of output tracks
   std::list<FTKTrack> m_tracks_pre_hw; // list of output tracks before HW filter
+  std::list<FTKTrack> m_sector_tracks; // list of first stage tracks in the same sector
+  std::list<FTKTrack> m_tracks_first; // list of first stage tracks
+
+  int m_processor_stage; // It tells processor() which part to work on for HW within the same sector
 
   int m_ncombs; // number of combinations
   int m_nfits; // number of fits tryied in a road
@@ -108,6 +114,8 @@ protected:
 
   bool m_identify_badhit; // the flag enables the identification of the bad hits for the recovery
 
+  bool m_saveIncompleteTracks; // true if you want to save incompelte tracks
+
   virtual void processor_init(int);
   virtual void processor(const FTKRoad &);
   virtual void processor_end(int);
@@ -142,6 +150,9 @@ public:
   void setHitWarrior(int v) { m_HitWarrior = v; }
   int getHitWarrior() const { return m_HitWarrior; }
 
+  void setHitWarriorFirst(int v) { m_HitWarrior_first = v; }
+  int getHitWarriorFirst() const { return m_HitWarrior_first; }
+
   void setHWNDiff(int v) { m_HW_ndiff = v; }
   int getHWNDiff() const { return m_HW_ndiff; }
 
@@ -192,6 +203,10 @@ public:
     { m_trackoutput_pre_hw = module; }
   FTKTrackOutput* getTrackOutputModule() { return m_trackoutput; }
   FTKTrackOutput* getTrackOutputModulePreHW() { return m_trackoutput_pre_hw; }
+
+  void setSaveIncompleteTracks(bool flag) { m_saveIncompleteTracks = flag; }
+  bool getSaveIncompeteTracks() const { return m_saveIncompleteTracks; }
+
   // output for firmware tests
   //void setFirmwareOutputModule(FTKFirmwareOutput *module) { m_fwoutput = module; }
   //void setNSectorsFWO( int v ) { m_maxsectors_fwo = v; }
diff --git a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/atlClustering.h b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/atlClustering.h
index b6e698d3bef13301c4b32aa2d08c4f91abab6f47..888a85bf40f0d43491f3b753a1da05fade0fbe29 100644
--- a/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/atlClustering.h
+++ b/Trigger/TrigFTK/TrigFTKSim/TrigFTKSim/atlClustering.h
@@ -57,6 +57,7 @@ const int PIXEL_CLUSTERING_IDEAL_APRIL_2014_FIX=2;
 const int PIXEL_CLUSTERING_MIXED=100;
 const int PIXEL_CLUSTERING_REALISTIC=101;
 const int  PIXEL_CLUSTERING_HARDWARE = 200; 
+extern bool IBL3D_REALISTIC;
 extern bool DUPLICATE_GANGED;
 extern bool GANGED_PATTERN_RECOGNITION;
 extern bool SPLIT_BLAYER_MODULES;
diff --git a/Trigger/TrigFTK/TrigFTKSim/cmt/requirements b/Trigger/TrigFTK/TrigFTKSim/cmt/requirements
deleted file mode 100644
index 0fa583984b5ec3eacb01ac08590d1bf71ff9c9ad..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/TrigFTKSim/cmt/requirements
+++ /dev/null
@@ -1,155 +0,0 @@
-################################################
-package TrigFTKSim 
-
-author Guido Volpi <guido.volpi@cern.ch>
-
-use AtlasPolicy AtlasPolicy-*
-use GaudiInterface GaudiInterface-* External
-use AtlasROOT		AtlasROOT-*		External
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use HepPDT                     v*                         LCG_Interfaces
-use StoreGate	StoreGate-*	Control
-use PileUpTools	 	PileUpTools-*	Control
-use InDetBeamSpotService       InDetBeamSpotService-*     InnerDetector/InDetConditions
-use TrigFTKPool TrigFTKPool-* Trigger/TrigFTK
-use PyJobTransforms PyJobTransforms-* Tools
-
-use AtlasReconstructionRunTime AtlasReconstructionRunTime-*
-use AtlasPolicy                AtlasPolicy-*
-use GaudiInterface             GaudiInterface-*           External
-use InDetIdentifier            InDetIdentifier-*          InnerDetector/InDetDetDescr
-use InDetPrepRawData           InDetPrepRawData-*         InnerDetector/InDetRecEvent
-use InDetReadoutGeometry       InDetReadoutGeometry-*     InnerDetector/InDetDetDescr
-use StoreGate                  StoreGate-*                Control
-use TrkParticleBase	       TrkParticleBase-*	  Tracking/TrkEvent
-
-use TrkTruthData               TrkTruthData-*             Tracking/TrkEvent
-use TrkTrackSummaryTool        TrkTrackSummaryTool-*      Tracking/TrkTools
-use TrkToolInterfaces          TrkToolInterfaces-*        Tracking/TrkTools
-use TrkExInterfaces 	       TrkExInterfaces-*          Tracking/TrkExtrapolation
-use TrkParameters	       TrkParameters-*		  Tracking/TrkEvent
-use Particle                   Particle-*                 Reconstruction
-use InDetConditionsSummaryService InDetConditionsSummaryService-* InnerDetector/InDetConditions
-use TrigInDetEvent 	       TrigInDetEvent-*		  Trigger/TrigEvent
-use AtlasBoost		       AtlasBoost-*		  External
-
-use AtlasTBB        AtlasTBB-*     External
-
-use TrkTrack	TrkTrack-* Tracking/TrkEvent
-use AtlasEigen     AtlasEigen-*        External
-
-private
-use NavFourMom         NavFourMom-*            Event
-#use TrkEventPrimitives	       TrkEventPrimitives-*	  Tracking/TrkEvent
-use TrkMeasurementBase 		TrkMeasurementBase-* 		Tracking/TrkEvent
-use TrkRIO_OnTrack		TrkRIO_OnTrack-*	Tracking/TrkEvent
-use IdDictDetDescr             IdDictDetDescr-*           DetectorDescription
-use AtlasHepMC                 AtlasHepMC-*               External
-use EventInfo                  EventInfo-*                Event
-use GeneratorObjects           GeneratorObjects-*         Generators
-use InDetRawData               InDetRawData-*             InnerDetector/InDetRawEvent
-use InDetSimData               InDetSimData-*             InnerDetector/InDetRawEvent
-
-use TrigFTKToolInterfaces      TrigFTKToolInterfaces-*    Trigger/TrigTools
-
-end_private
-
-apply_tag  ROOTBasicLibs
-apply_tag  ROOTMathLibs
-apply_tag  ROOTSTLDictLibs
-apply_tag  ROOTGraphicsLibs
-apply_tag  ROOTTableLibs
-
-# Specify the required ROOT components (cmake-specific)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS Matrix)"
-
-# Declare that Boost iostreams are available (cmake-specific)
-apply_pattern cmake_add_command command="add_definitions(-DHAVE_BOOST_IOSTREAMS)"
-
-## install librariesz`
-#apply_pattern component_library
-
-apply_pattern declare_joboptions files="-k=.*job[Oo]ptions.py *.py"
-apply_pattern generic_declare_for_link kind=ftkmapfiles prefix=share/ftk_configuration/map_files files="../config/map_file/raw_7L.pmap ../config/map_file/raw_7L_unused.pmap ../config/map_file/raw_8Lc.pmap ../config/map_file/raw_8Lc_unused.pmap ../config/map_file/raw_11L.pmap ../config/map_file/raw_7L.rmap ../config/map_file/raw_11L.rmap   ../config/map_file/raw_11L.tmap  ../config/map_file/raw_8LcIbl123.pmap ../config/map_file/raw_8LcIbl3D123.pmap ../config/map_file/raw_12Libl.pmap ../config/map_file/raw_8LcIbl123_unused.pmap ../config/map_file/raw_12Libl.tmap ../config/map_file/raw_12LiblHW.pmap ../config/map_file/raw_8LcIbl123.moduleidmap ../config/map_file/raw_12LiblHW.moduleidmap ../config/map_file/raw_12Libl.moduleidmap ../config/map_file/raw_12Libl3D.pmap ../config/map_file//raw_12Libl3D.tmap ../config/map_file/raw_12Libl3DTempv0.tmap ../config/map_file/raw_12Libl3D_WA.tmap ../config/map_file/raw_12Libl64TmodB_3D_t1.tmap ../config/map_file/raw_12LiblHW3D.pmap ../config/map_file/raw_12Libl32TmodB.tmap ../config/map_file/raw_12Libl64TmodB.tmap ../config/map_file/raw_12Libl32TmodB_3D_t13.tmap ../config/map_file/raw_12Libl64TmodB_3D_t13.tmap ../config/map_file/raw_12LiblHW_32.moduleidmap ../config/map_file/raw_8LcIbl123_32.moduleidmap ../config/map_file/raw_ITkExample.tmap ../config/map_file/raw_ITkExample.pmap ../config/map_file/raw_8LcIbl3D123.moduleidmap ../config/map_file/raw_12Libl3D.moduleidmap"
-apply_pattern generic_declare_for_link kind=ftkssdefs prefix=share/ftk_configuration/ss_files files="../config/ss_file/raw_24x20x36.ss ../config/ss_file/raw_30x32x72Ibl-p567x64.ss ../config/ss_file/raw_48x40x36.ss ../config/ss_file/raw_unused.ss ../config/ss_file/raw_15x16x36.ss ../config/ss_file/raw_15x16x36unused.ss  ../config/ss_file/raw_30x32x36.ss ../config/ss_file/raw_30x32x72.ss ../config/ss_file/raw_50x64x14412LIblunused.ss ../config/ss_file/raw_50x64x14412LIbl.ss ../config/ss_file/raw_15x16x36Ibl.ss ../config/ss_file/raw_15x16x38Ibl.ss ../config/ss_file/raw_30x32x72Ibl.ss ../config/ss_file/raw_15x16x36Iblunused.ss ../config/ss_file/raw_8LcIBL123_unusedmedium.ss ../config/ss_file/raw_8LcIBL123_unusedsmall.ss ../config/ss_file/raw_8LcIBL123_i8s4_unused.ss ../config/ss_file/raw_60x32a64p2x72Ibl.ss ../config/ss_file/raw_60x64x72Ibl.ss ../config/ss_file/raw_30x64x72Ibl.ss ../config/ss_file/raw_ITkExample.ss ../config/ss_file/raw_30x128x72Ibl.ss"
-apply_pattern generic_declare_for_link kind=ftkhwdef prefix=share/ftk_configuration/hwsdev_file files="../config/hwsdev_file/raw_7L.hw ../config/hwsdev_file/raw_11L.hw ../config/hwsdev_file/raw_8Lc.hw ../config/hwsdev_file/raw_8LcIbl123.hw ../config/hwsdev_file/raw_12L.hw ../config/hwsdev_file/raw_ITkExample.hw"
-apply_pattern generic_declare_for_link kind=ftkbadmod prefix=share/ftk_configuration/bad_modules files="../config/bad_modules/empty.bmap"
-
-# Add transform
-#private
-apply_pattern declare_job_transforms tfs='*_tf.py' jo='skeleton.*.py'
-apply_pattern generic_declare_for_link kind=json files="../share/$(package)Signatures.json" prefix=share/JobTransforms
-#end_private
-
-
-################################################
-#Truth Algs
-apply_pattern declare_python_modules files="__init__.py TrigFTKTruthAlgsConfig.py QueryFTKdb.py findInputs.py FTKSimOptions.py"
-
-#################################################
-
-apply_pattern dual_use_library files="FTKRoadFinderAlgo.cxx FTKDumpCondAlgo.cxx \
-	RoadFinder.cxx FTK_SGHitInput.cxx \
-	FTKDetectorTool.cxx FTK_SGRoadOutput.cxx FTK_SGTrackOutput.cxx \
-	FTK_RoadMarketTool.cxx FTK_RoadMarketIO.cxx \
-	FTK_RegionalRawInput.cxx \
-	FTKSplitEncoder.cxx FTKSetup.cxx PatternBank.cxx \
-	FTK_AMBank.cxx atlClustering.cxx FTKRoadFileOutput.cxx \
-	FTKConstantBank.cxx FTKTrackInput.cxx FTKRoadFileInput.cxx \
-	FTK_RawInput.cxx FTKTruthTrack.cxx FTKRawHit.cxx FTKDataInput.cxx \
-	ftkdefs.cxx FTKPMap.cxx FTKRegionMap.cxx FTKSectorMap.cxx \
-	FTKSSMap.cxx ftk_dcap.cxx \
-	FTKRoad.cxx FTKHit.cxx FTKTrack.cxx \
-	FTKRoadStream.cxx FTKRoadKDTree.cxx FTKTrackStream.cxx \
-	FTKSS.cxx MultiTruth.cxx FTKPattern.cxx \
-	tsp/*.cxx FTKMergerAlgo.cxx \
-	TrackFitter.cxx TrackFitter711.cxx \
-        FTKSector711DB.cxx \	
-        FTKTrackFileOutput.cxx FTKTrackFitterAlgo.cxx  \
-        FTKLogging.cxx FTKPatternOneSector.cxx FTKPatternBySector.cxx \
-        FTKPatternWithCoverage.cxx FTKRootFile.cxx FTKMergeRoot.cxx \
-        FTK_AMsimulation_base.cxx FTK_CompressedAMBank.cxx \
-        FTKSteering.cxx"
-
-#########################
-#Stuff for RTT
-#include the TestConfig file
-macro TrigFTKSim_TestConfiguration "../test/TrigFTKSim_TestConfiguration.xml"
-#install all the files for RTT where it can find them (may be redundant for some files?)
-apply_pattern declare_runtime extras= "../test/TrigFTKSim_TestConfiguration.xml ../scripts/rtt_compare.py ../scripts/TrigFTKSM4Un_tf.py ../standalone/plot_simple_dataflow.C ../scripts/TrigFTKTM64SM4Un_tf.py ../scripts/TrigFTKSimITk_tf.py"
-#########################
-
-# the following two lines are required to enable the debug flags
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-application trigftk_efficiency ../standalone/efficiency.cc
-macro_append trigftk_efficiency_dependencies "TrigFTKSimLib"
-
-application trigftk_dataflow ../standalone/dataflow.cc
-macro_append trigftk_dataflow_dependencies "TrigFTKSimLib"
-
-application trigftk_partitionbalancing ../standalone/partitionbalancing.cc
-macro_append trigftk_partitionbalancing_dependencies "TrigFTKSimLib"
-
-private
-
-macro_append Boost_linkopts " $(Boost_linkopts_iostreams) $(Boost_linkopts_program_options) $(Boost_linkopts_filesystem)  "
-macro_append TrigFTKSim_pp_cppflags "-DHAVE_BOOST_IOSTREAMS "
-
-
-#action ftkstandalone_dict "( $(ROOTSYS)/bin/rootcint -f $(bin)TrigFTKSimRootDict.cxx -c -I../TrigFTKSim ../TrigFTKSim/FTKRoad.h ../TrigFTKSim/FTKTruthTrack.h ../TrigFTKSim/FTKRawHit.h ../TrigFTKSim/FTKHit.h ../TrigFTKSim/FTKTrack.h ../TrigFTKSim/FTKRoadStream.h ../TrigFTKSim/FTKTrackStream.h ../TrigFTKSim/FTKSS.h ../TrigFTKSim/MultiTruth.h ../TrigFTKSim/FTKPattern.h ../TrigFTKSim/TrigFTKSimLinkDef.h )"
-#macro_append all_dependencies " ftkstandalone_dict "
-#macro_append TrigFTKSim_dependencies " ftkstandalone_dict "
-#macro_append TrigFTKSimLib_dependencies " ftkstandalone_dict "
-apply_pattern have_root_headers \
-    root_headers="FTKRoad.h FTKTruthTrack.h FTKRawHit.h FTKHit.h FTKTrack.h \
-		  FTKRoadStream.h FTKTrackStream.h FTKSS.h MultiTruth.h \
-		  FTKPattern.h TrigFTKSimLinkDef.h" \
-    headers_lib=TrigFTKSimLib
-
-# Make trf prodsys signatures
-action makeTrfSignatures "makeTrfSignatures.py --output ../share/$(package)Signatures.json"
-macro_append makeTrfSignatures_dependencies " install_tfs_jop "
-macro_append all_dependencies " makeTrfSignatures "
-macro_append check_install_json_dependencies " makeTrfSignatures "
diff --git a/Trigger/TrigFTK/TrigFTKSim/python/FTKSimOptions.py b/Trigger/TrigFTK/TrigFTKSim/python/FTKSimOptions.py
index 2631c5757d16213053433dcc4ddf902ba986151a..6cee1653741ef873a56d88834acd3a0496be3117 100644
--- a/Trigger/TrigFTK/TrigFTKSim/python/FTKSimOptions.py
+++ b/Trigger/TrigFTK/TrigFTKSim/python/FTKSimOptions.py
@@ -1,10 +1,18 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 import PyJobTransforms.trfExceptions as trfExceptions
 import PyJobTransforms.trfArgClasses as trfArgClasses
 
+
+def addTrigFTKAthenaOptions(parser):
+    parser.defineArgGroup('Athena', 'General Athena Options')
+    parser.add_argument('--asetup', group='Athena', type=trfArgClasses.argFactory(trfArgClasses.argSubstep, runarg=False), nargs='+', metavar='substep:ASETUP',
+                        help='asetup command string to be run before this substep is executed')
+    return None
+
 def addTrigFTKSimOptions(parser,nsubregions=4):
     parser.defineArgGroup('TrigFTKSim', 'Fast tracker simulation generic options')
+
     parser.add_argument('--NBanks', type=trfArgClasses.argFactory(trfArgClasses.argInt, runarg=True),
                         help='Number of pattern banks', group='TrigFTKSim')
     # Here we set a default value as the merger wants this explicitly
@@ -152,6 +160,8 @@ def addTrigFTKSimRFOptions(parser):
 
     parser.add_argument("--PixelClusteringMode",type=trfArgClasses.argFactory(trfArgClasses.argInt,runarg=True),
                         help="Set the pixel clustering mode: 0 default, 1 ToT+pixel center",group="TrigFTKRoadFinder")
+    parser.add_argument("--Ibl3DRealistic",type=trfArgClasses.argFactory(trfArgClasses.argBool,runarg=True),
+                        help="Do the IBL 3D realistic(HWlike) clustering? Default is false",group="TrigFTKRoadFinder")
     parser.add_argument('--SctClustering',type=trfArgClasses.argFactory(trfArgClasses.argInt,runarg=True),
                         help="Set the SCT clustering [def: False]", group="TrigFTKRoadFinder")
 
@@ -205,6 +215,8 @@ def addTrigFTKSimTFOptions(parser):
                         help="Hit Warrior threshold", group='TrigFTKTrackFitter')
     parser.add_argument('--HitWarrior', type=trfArgClasses.argFactory(trfArgClasses.argInt, runarg=True),
                         help="Hit Warrior type: 0 none, 1 local, 2 global (def)", group='TrigFTKTrackFitter')
+    parser.add_argument('--FirstStageHitWarrior', type=trfArgClasses.argFactory(trfArgClasses.argInt, runarg=True),
+                        help="First Stage Hit Warrior type: 0 No First Stage Overlap Removal, 1 Overlap Removal within the Same Road (def), 2 Overlap Removal within the Same Sector", group='TrigFTKTrackFitter')
     parser.add_argument('--HitWarriorMerger', type=trfArgClasses.argFactory(trfArgClasses.argInt, runarg=True),
                         help="Hit Warrior Merger (merge) type", group='TrigFTKTrackFitter')
 
diff --git a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKSM4_tf.py b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKSM4_tf.py
index 1c13be21b9d2efa790a394e950a72af2e32ee7b2..266d9f13688782fc54ef18bf26a212227168b5e1 100755
--- a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKSM4_tf.py
+++ b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKSM4_tf.py
@@ -127,6 +127,8 @@ def addFTKSimulationArgs(parser):
 
     parser.add_argument("--PixelClusteringMode",type=trfArgClasses.argFactory(trfArgClasses.argInt,runarg=True),
                         help="Set the pixel clustering mode: 0 default, 1 ToT+pixel center",group="TrigFTKSim")
+    parser.add_argument("--Ibl3DRealistic",type=trfArgClasses.argFactory(trfArgClasses.argBool,runarg=True),
+                        help="Do the IBL 3D realistic(HWlike) clustering? Default is false",group="TrigFTKSim")
     parser.add_argument('--SctClustering',type=trfArgClasses.argFactory(trfArgClasses.argBool,runarg=False),
                         help="Set the SCT clustering [def: False]", group="TrigFTKSim")
 
diff --git a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKSim_tf.py b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKSim_tf.py
index 9210adc7d1ca10fd68180d6c1feec6b4d39073f5..2642ed93ef00a4c762fcf87f5a4188b92fdc7a89 100755
--- a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKSim_tf.py
+++ b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKSim_tf.py
@@ -138,6 +138,8 @@ def addFTKSimulationArgs(parser):
                         help="Prints hardware-style SSB constants", group='TrigFTKSim')
     parser.add_argument("--PixelClusteringMode",type=trfArgClasses.argFactory(trfArgClasses.argInt,runarg=True),
                         help="Set the pixel clustering mode: 0 default, 1 ToT+pixel center",group="TrigFTKSim")
+    parser.add_argument("--Ibl3DRealistic",type=trfArgClasses.argFactory(trfArgClasses.argBool,runarg=True),
+                        help="Do the IBL 3D realistic(HWlike) clustering? Default is false",group="TrigFTKSim")
     parser.add_argument('--SctClustering',type=trfArgClasses.argFactory(trfArgClasses.argBool,runarg=False),
                                 help="Set the SCT clustering [def: False]", group="TrigFTKSim")
 
diff --git a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM32SM1Un_tf.py b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM32SM1Un_tf.py
index eedc64f93b64aca8d8a7a3a45d13ccb43c04c1cf..2359842feeb7f333b4a5b46f995df2e3723f32e2 100755
--- a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM32SM1Un_tf.py
+++ b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM32SM1Un_tf.py
@@ -18,7 +18,7 @@ msg.info('logging set in %s' % sys.argv[0])
 from PyJobTransforms.trfExitCodes import trfExit
 from PyJobTransforms.transform import transform
 from PyJobTransforms.trfExe import athenaExecutor
-from PyJobTransforms.trfArgs import addAthenaArguments
+from PyJobTransforms.trfArgs import addDetectorArguments
 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
 
 import PyJobTransforms.trfExceptions as trfExceptions
@@ -127,7 +127,8 @@ def getTransform():
                                 'subregions merge and final merge.'.format(
                                     ntowers, subregions))
 
-    #addAthenaArguments(trf.parser)
+    addTrigFTKAthenaOptions(trf.parser)
+    addDetectorArguments(trf.parser)
     addTrigFTKSimOptions(trf.parser, nsubregions=subregions)
     addTrigFTKSimMergeOptions(trf.parser);
     addTrigFTKSimTFOptions(trf.parser)
diff --git a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM32SM4Un_tf.py b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM32SM4Un_tf.py
index 5456c1fe6632015db1ce9009b6539a1207a345f2..e0537a92d9361f7d9354246882db7448790693cf 100755
--- a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM32SM4Un_tf.py
+++ b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM32SM4Un_tf.py
@@ -18,7 +18,7 @@ msg.info('logging set in %s' % sys.argv[0])
 from PyJobTransforms.trfExitCodes import trfExit
 from PyJobTransforms.transform import transform
 from PyJobTransforms.trfExe import athenaExecutor
-from PyJobTransforms.trfArgs import addAthenaArguments
+from PyJobTransforms.trfArgs import addDetectorArguments
 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
 
 import PyJobTransforms.trfExceptions as trfExceptions
@@ -141,7 +141,8 @@ def getTransform():
                                 'subregions merge and final merge.'.format(
                                     ntowers, subregions))
 
-    #addAthenaArguments(trf.parser)
+    addTrigFTKAthenaOptions(trf.parser)
+    addDetectorArguments(trf.parser)
     addTrigFTKSimOptions(trf.parser, nsubregions=subregions)
     addTrigFTKSimMergeOptions(trf.parser);
     addTrigFTKSimTFOptions(trf.parser)
diff --git a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM64SM1Un_tf.py b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM64SM1Un_tf.py
index e3b68bfec7a8deb58bae1c88cbb2d42456fd2729..31042b102ba6437109312b37617fac9ff433c976 100755
--- a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM64SM1Un_tf.py
+++ b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM64SM1Un_tf.py
@@ -18,7 +18,8 @@ msg.info('logging set in %s' % sys.argv[0])
 from PyJobTransforms.trfExitCodes import trfExit
 from PyJobTransforms.transform import transform
 from PyJobTransforms.trfExe import athenaExecutor
-from PyJobTransforms.trfArgs import addAthenaArguments
+from PyJobTransforms.trfArgs import addDetectorArguments
+
 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
 
 import PyJobTransforms.trfExceptions as trfExceptions
@@ -127,7 +128,8 @@ def getTransform():
                                 'subregions merge and final merge.'.format(
                                     ntowers, subregions))
 
-    #addAthenaArguments(trf.parser)
+    addTrigFTKAthenaOptions(trf.parser)
+    addDetectorArguments(trf.parser)
     addTrigFTKSimOptions(trf.parser, nsubregions=subregions)
     addTrigFTKSimMergeOptions(trf.parser);
     addTrigFTKSimTFOptions(trf.parser)
diff --git a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM64SM4Un_tf.py b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM64SM4Un_tf.py
index 7724e668011b95c79b4f318ee9551b000a3292ce..c02cdb8e2c47503f402ca7b677b9ebdc9b7f0e27 100755
--- a/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM64SM4Un_tf.py
+++ b/Trigger/TrigFTK/TrigFTKSim/scripts/TrigFTKTM64SM4Un_tf.py
@@ -18,8 +18,8 @@ msg.info('logging set in %s' % sys.argv[0])
 from PyJobTransforms.trfExitCodes import trfExit
 from PyJobTransforms.transform import transform
 from PyJobTransforms.trfExe import athenaExecutor
-from PyJobTransforms.trfArgs import addAthenaArguments
 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
+from PyJobTransforms.trfArgs import addDetectorArguments
 
 import PyJobTransforms.trfExceptions as trfExceptions
 import PyJobTransforms.trfArgClasses as trfArgClasses
@@ -150,12 +150,14 @@ def getTransform():
                                 'subregions merge and final merge.'.format(
                                     ntowers, subregions))
 
-    #addAthenaArguments(trf.parser)
+    addTrigFTKAthenaOptions(trf.parser)
+    addDetectorArguments(trf.parser)
     addTrigFTKSimOptions(trf.parser, nsubregions=subregions)
     addTrigFTKSimMergeOptions(trf.parser);
     addTrigFTKSimTFOptions(trf.parser)
     addTrigFTKSimRFOptions(trf.parser)
     addFTKSimulationArgs(trf.parser)
+    
     return trf
 
 
diff --git a/Trigger/TrigFTK/TrigFTKSim/share/skeleton.BS_FTK_Creator.py b/Trigger/TrigFTK/TrigFTKSim/share/skeleton.BS_FTK_Creator.py
index 252856bcd68f748b20572c9d779c044ca69f1396..241859de0f56dd1bf52fcc11fbf0cff37433738d 100755
--- a/Trigger/TrigFTK/TrigFTKSim/share/skeleton.BS_FTK_Creator.py
+++ b/Trigger/TrigFTK/TrigFTKSim/share/skeleton.BS_FTK_Creator.py
@@ -39,12 +39,15 @@ if hasattr(runArgs, "skipEvents"):
 elif hasattr(runArgs, "firstEvent"):
     athenaCommonFlags.SkipEvents.set_Value_and_Lock(runArgs.firstEvent)
 
+from AthenaCommon.GlobalFlags import jobproperties
 from AthenaCommon.GlobalFlags import globalflags
 globalflags.InputFormat="bytestream"
-from AthenaCommon.GlobalFlags import jobproperties
-###jobproperties.Global.ConditionsTag.set_Value_and_Lock ('CONDBR2-BLKPA-2015-11')
-###jobproperties.Global.DetDescrVersion.set_Value_and_Lock("ATLAS-R2-2015-03-01-00")
+if hasattr(runArgs,"geometryVersion"):
+   globalflags.DetDescrVersion.set_Value_and_Lock(runArgs.geometryVersion)
 
+if hasattr(runArgs,"conditionsTag"):
+   globalflags.ConditionsTag.set_Value_and_Lock(runArgs.conditionsTag)
+   
 inputNTUP_FTKFile = runArgs.inputNTUP_FTKFile
 
 from TrigFTK_RawDataAlgs.TrigFTK_RawDataAlgsConf import FTK_RDO_CreatorAlgo
@@ -84,7 +87,6 @@ jobproperties.LArRODFlags.doLArFebErrorSummary.set_Value_and_Lock(False)
 # main jobOption
 include ("RecExCommon/RecExCommon_topOptions.py")
 
-
 StreamBSFileOutput.ItemList = ["FTK_RawTrackContainer#*"]
 
 # Merge with original bytestream
diff --git a/Trigger/TrigFTK/TrigFTKSim/share/skeleton.FTKStandaloneSim.py b/Trigger/TrigFTK/TrigFTKSim/share/skeleton.FTKStandaloneSim.py
index a74b0b1a722f3ae84814bde2d83618a00c228de2..9ab03a704a9741145d5df9de7949c85a89645242 100644
--- a/Trigger/TrigFTK/TrigFTKSim/share/skeleton.FTKStandaloneSim.py
+++ b/Trigger/TrigFTK/TrigFTKSim/share/skeleton.FTKStandaloneSim.py
@@ -68,6 +68,7 @@ FTKRoadFinder.MaxMissingSCTPairs = 1
 #FTKRoadFinderAlgo.NSubRegions = NSubRegions
 #FTKRoadFinderAlgo.OutputLevel
 FTKRoadFinder.PixelClusteringMode = 1
+FTKRoadFinder.Ibl3DRealistic = False
 FTKRoadFinder.RegionalWrapper = True
 FTKRoadFinder.RestrictSctPairLayer = True
 FTKRoadFinder.RestrictSctPairModule = True
@@ -135,6 +136,7 @@ runArgsFromTrfOptionalRF = {
     'FixEndCapL0': False,
     'ITkMode': False,
     'PixelClusteringMode': 0,
+    'Ibl3DRealistic': False,
     'GangedPatternReco' : 0,
     'DuplicateGanged' : 1,
     'SctClustering': 0,
@@ -161,6 +163,7 @@ runArgsFromTrfOptionalTF = {
     'Chi2DofCut': 4, # if >0 the previous values are ignored
     'Chi2Cut_VetoMaj': -1, # no majority veto by default
     'HitWarrior': 2,
+    'FirstStageHitWarrior': 1,
     'KeepRejected': 0,
     'FitRemoved': 0,
     'HWNDiff': 6,
@@ -293,7 +296,7 @@ FTKTagOptions['SectorsAsPatterns32Tower12L3D'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_30x64x72Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_12L.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 101,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 101, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True,
     'MaxNcomb': 1024,
     'MaxNhitsPerPlane': 8,
@@ -307,7 +310,7 @@ FTKTagOptions['SectorsAsPatterns32Tower8L3D'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_30x64x72Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_12L.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 101,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 101, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True,
     'MaxNcomb': 1024,
     'MaxNhitsPerPlane': 8,
@@ -339,7 +342,7 @@ FTKTagOptions["HWMode2Test32Tower"] = {
     'MaxNcomb': 1024,
     'MaxNhitsPerPlane': 8,
     'HWModeSS': 2,
-    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1,
+    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'MaxMissingSCTPairs': 0,
     'GangedPatternReco': 0, 'DuplicateGanged': 1
     }
@@ -367,7 +370,7 @@ FTKTagOptions["HWMode2Test64Tower"] = {
     'MaxNcomb': 1024,
     'MaxNhitsPerPlane': 8,
     'HWModeSS': 2,
-    'FixEndCapL0': True, 'IBLMode': 2, 'PixelClusteringMode': 101,
+    'FixEndCapL0': True, 'IBLMode': 2, 'PixelClusteringMode': 101, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1
     }
 
@@ -395,7 +398,7 @@ FTKTagOptions["64Tower2017.v1.ECFix"] = {
     'MaxNcomb': 1024,
     'MaxNhitsPerPlane': 8,
     'HWModeSS': 2,
-    'FixEndCapL0': True, 'IBLMode': 2, 'PixelClusteringMode': 101,
+    'FixEndCapL0': True, 'IBLMode': 2, 'PixelClusteringMode': 101, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1,
     'badmap_path': 'empty.bmap',
     'badmap_path_for_hit': 'empty.bmap'
@@ -425,7 +428,7 @@ FTKTagOptions["64Tower2018.v1.ECFix"] = {
     'MaxNcomb': 1024,
     'MaxNhitsPerPlane': 8,
     'HWModeSS': 2,
-    'FixEndCapL0': True, 'IBLMode': 2, 'PixelClusteringMode': 101,
+    'FixEndCapL0': True, 'IBLMode': 2, 'PixelClusteringMode': 101, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1,
     'badmap_path': 'empty.bmap',
     'badmap_path_for_hit': 'empty.bmap'
@@ -456,7 +459,7 @@ FTKTagOptions["64Tower2017.v1"] = {
     'MaxNcomb': 1024,
     'MaxNhitsPerPlane': 8,
     'HWModeSS': 2,
-    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 101,
+    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 101, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1,
     'badmap_path': 'empty.bmap',
     'badmap_path_for_hit': 'empty.bmap'
@@ -486,7 +489,7 @@ FTKTagOptions["64Tower2017.v2"] = {
     'MaxNcomb': 1024,
     'MaxNhitsPerPlane': 8,
     'HWModeSS': 2,
-    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 101,
+    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 101, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1,
     'badmap_path': 'empty.bmap',
     'badmap_path_for_hit': 'empty.bmap'
@@ -527,7 +530,7 @@ FTKTagOptions["TDAQTDRv0"] = {
     'loadHWConf_path': 'raw_12L.hw', 'pmapcomplete_path': 'raw_12Libl.pmap',
     'SetAMSize': 2, 'SecondStageFit': True, 'TRACKFITTER_MODE': 1,
     'SSFMultiConnection': True, 'SSFNConnections': 4,
-    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1
+    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False
     }
 FTKTagOptions["TDAQTDRv1"] = {
     'NBanks': 64, 'NSubRegions': 4,
@@ -543,7 +546,7 @@ FTKTagOptions["TDAQTDRv1"] = {
     'SSFMultiConnection': True, 'SSFNConnections': 4,
     'SSFAllowExtraMiss': 0, 'SSFTRDefn': 1,
     'SSFTRMaxEta': 1.4, 'SSFTRMinEta': 1.0,
-    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1
+    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     }
 FTKTagOptions["TDAQTDRv2"] = {
     'NBanks': 64, 'NSubRegions': 4,
@@ -559,7 +562,7 @@ FTKTagOptions["TDAQTDRv2"] = {
     'SSFMultiConnection': True, 'SSFNConnections': 4,
     'SSFAllowExtraMiss': 1, 'SSFTRDefn': 1, 'SSFTRMaxEta': 1.4,
     'SSFTRMinEta': 1.0,
-    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1
     }
 FTKTagOptions["TDAQTDRv2_testFederico"] = {
@@ -576,7 +579,7 @@ FTKTagOptions["TDAQTDRv2_testFederico"] = {
     'TRACKFITTER_MODE': 3, 'SSFMultiConnection': True, 'SSFNConnections': 4,
     'SSFAllowExtraMiss': 1, 'SSFTRDefn': 1, 'SSFTRMaxEta': 1.4,
     'SSFTRMinEta': 1.0,
-    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1
     }
 FTKTagOptions["Run2v0"] = {
@@ -592,7 +595,7 @@ FTKTagOptions["Run2v0"] = {
     'SSFMultiConnection': True, 'SSFNConnections': 4,
     'SSFAllowExtraMiss': 1, 'SSFTRDefn': 1, 'SSFTRMaxEta': 1.4,
     'SSFTRMinEta': 1.0,
-    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1,
+    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1
     }
 FTKTagOptions["Run2v1"] = {
@@ -608,7 +611,7 @@ FTKTagOptions["Run2v1"] = {
     'SSFMultiConnection': True, 'SSFNConnections': 4,
     'SSFAllowExtraMiss': 1, 'SSFTRDefn': 1, 'SSFTRMaxEta': 1.4,
     'SSFTRMinEta': 1.0,
-    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1,
+    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1
     }
 
@@ -633,7 +636,7 @@ FTKTagOptions["Run2TempMapv0"] = {
     'SSFAllowExtraMiss': 1, 'SSFTRDefn': 1, 'SSFTRMaxEta': 1.4,
     'SSFTRMinEta': 1.0,
     'CachedBank': True,
-    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1,
+    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1
     }
 FTKTagOptions["TDAQTDRv2HWMode2"] = {
@@ -650,7 +653,7 @@ FTKTagOptions["TDAQTDRv2HWMode2"] = {
     'SSFMultiConnection': True, 'SSFNConnections': 4,
     'SSFAllowExtraMiss': 1, 'SSFTRDefn': 1, 'SSFTRMaxEta': 1.4,
     'SSFTRMinEta': 1.0,
-    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'GangedPatternReco': 0, 'DuplicateGanged': 1
     }
 FTKTagOptions['SectorsAsPatterns3D'] = {
@@ -662,7 +665,7 @@ FTKTagOptions['SectorsAsPatterns3D'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmaptsp_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_8Lc.hw','SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True
     }
 FTKTagOptions['SectorsAsPatterns12L3D'] = {
@@ -671,7 +674,7 @@ FTKTagOptions['SectorsAsPatterns12L3D'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_12L.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True
     }
 FTKTagOptions['SectorsAsPatterns3Dv2'] = {
@@ -683,7 +686,7 @@ FTKTagOptions['SectorsAsPatterns3Dv2'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmaptsp_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_8Lc.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True
     }
 FTKTagOptions['SectorsAsPatterns12L3Dv2'] = {
@@ -692,7 +695,7 @@ FTKTagOptions['SectorsAsPatterns12L3Dv2'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_12L.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True
     }
 FTKTagOptions['SectorsAsPatterns12L'] = {
@@ -701,7 +704,7 @@ FTKTagOptions['SectorsAsPatterns12L'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_12L.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True
     }
 FTKTagOptions['SectorsAsPatterns'] = {
@@ -713,7 +716,7 @@ FTKTagOptions['SectorsAsPatterns'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmaptsp_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_8Lc.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True
     }
 FTKTagOptions['SectorsAsPatterns12LHWMode2'] = {
@@ -722,7 +725,7 @@ FTKTagOptions['SectorsAsPatterns12LHWMode2'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_12L.hw','SecondStageFit': False,
-    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'SectorsAsPatterns': 1,
+    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False, 'SectorsAsPatterns': 1,
     'MaxMissingSCTPairs': 0,
     'HWModeSS': 2,'ModuleLUTPath': 'raw_12Libl.moduleidmap',
     'SaveRoads': True
@@ -733,7 +736,7 @@ FTKTagOptions['SectorsAsPatternsHWMode2'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_8Lc.hw','SecondStageFit': False,
-    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'SectorsAsPatterns': 1,
+    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False, 'SectorsAsPatterns': 1,
     'MaxMissingSCTPairs': 0,
     'HWModeSS': 2,'ModuleLUTPath': 'raw_8LcIbl123.moduleidmap',
     'SaveRoads': True
@@ -745,7 +748,7 @@ FTKTagOptions['SectorsAsPatterns12L64b3DHWMode2'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False, \
     'loadHWConf_path': 'raw_12L.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'MaxMissingSCTPairs': 1,
     'HWModeSS': 2, 'ModuleLUTPath': 'raw_12Libl.moduleidmap',
     'SaveRoads': True
@@ -757,7 +760,7 @@ FTKTagOptions['SectorsAsPatterns8L64b3DHWMode2'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_8Lc.hw','SecondStageFit': False,
-    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'SectorsAsPatterns': 1,
+    'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False, 'SectorsAsPatterns': 1,
     'MaxMissingSCTPairs': 0,
     'HWModeSS': 2,'ModuleLUTPath': 'raw_8LcIbl123.moduleidmap',
     'SaveRoads': True
@@ -768,13 +771,13 @@ FTKTagOptions['SectorsAsPatterns12L32b3DHWMode2'] = \
     {'NBanks': 32, 'NSubRegions': 1, 'pmap_path': 'raw_12LiblHW3D.pmap', 'rmap_path': 'raw_12Libl32TmodB_3D_t13.tmap', 'bankpatterns': [-1]*NumberOfSubregions, \
      'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False, \
      'loadHWConf_path': 'raw_12L.hw','SecondStageFit': False, 'TRACKFITTER_MODE': 1,
-     'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'SectorsAsPatterns': 1 , 'MaxMissingSCTPairs': 1, 'HWModeSS': 2,'ModuleLUTPath': 'raw_12Libl.moduleidmap', 'SaveRoads': True}
+     'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False, 'SectorsAsPatterns': 1 , 'MaxMissingSCTPairs': 1, 'HWModeSS': 2,'ModuleLUTPath': 'raw_12Libl.moduleidmap', 'SaveRoads': True}
 FTKTagOptions['SectorsAsPatterns8L32b3DHWMode2'] = \
     {'NBanks': 32, 'NSubRegions': 1, 'pmap_path': 'raw_8LcIbl3D123.pmap', 'rmap_path': 'raw_12Libl32TmodB_3D_t13.tmap',
      'bankpatterns': [-1]*NumberOfSubregions, \
      'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False, \
      'loadHWConf_path': 'raw_8Lc.hw','SecondStageFit': False,
-     'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'SectorsAsPatterns': 1,
+     'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False, 'SectorsAsPatterns': 1,
      'MaxMissingSCTPairs': 0,
      'HWModeSS': 2,'ModuleLUTPath': 'raw_8LcIbl123.moduleidmap', 'SaveRoads': True}
 
@@ -782,13 +785,13 @@ FTKTagOptions['SectorsAsPatterns12L32b3D'] = \
     {'NBanks': 32, 'NSubRegions': 1, 'pmap_path': 'raw_12LiblHW3D.pmap', 'rmap_path': 'raw_12Libl32TmodB_3D_t13.tmap', 'bankpatterns': [-1]*NumberOfSubregions, \
      'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False, \
      'loadHWConf_path': 'raw_12L.hw','SecondStageFit': False, 'TRACKFITTER_MODE': 1,
-     'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'SectorsAsPatterns': 1 , 'SaveRoads': True}
+     'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False, 'SectorsAsPatterns': 1 , 'SaveRoads': True}
 FTKTagOptions['SectorsAsPatterns8L32b3D'] = \
     {'NBanks': 32, 'NSubRegions': 1, 'pmap_path': 'raw_8LcIbl3D123.pmap', 'rmap_path': 'raw_12Libl32TmodB_3D_t13.tmap',
      'bankpatterns': [-1]*NumberOfSubregions, \
      'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False, \
      'loadHWConf_path': 'raw_8Lc.hw','SecondStageFit': False,
-     'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'SectorsAsPatterns': 1, 'SaveRoads': True}
+     'FixEndCapL0': False, 'IBLMode': 2, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False, 'SectorsAsPatterns': 1, 'SaveRoads': True}
 
 FTKTagOptions['SectorsAsPatterns12L64b'] = {
     'NBanks': 64, 'NSubRegions': 1,
@@ -796,7 +799,7 @@ FTKTagOptions['SectorsAsPatterns12L64b'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_12L.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1, 'SaveRoads': True
     }
 FTKTagOptions['SectorsAsPatterns8L64b'] = {
@@ -805,7 +808,7 @@ FTKTagOptions['SectorsAsPatterns8L64b'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_8Lc.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True
     }
 FTKTagOptions['SectorsAsPatterns12L64bHWMode2'] = {
@@ -814,7 +817,7 @@ FTKTagOptions['SectorsAsPatterns12L64bHWMode2'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_12L.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'MaxMissingSCTPairs': 1, 'HWModeSS': 2,
     'ModuleLUTPath': 'raw_12Libl.moduleidmap', 'SaveRoads': True
     }
@@ -824,7 +827,7 @@ FTKTagOptions['SectorsAsPatterns8L64bHWMode2'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_8Lc.hw','SecondStageFit': False,
-    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'SectorsAsPatterns': 1,
+    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False, 'SectorsAsPatterns': 1,
     'MaxMissingSCTPairs': 0,
     'HWModeSS': 2,'ModuleLUTPath': 'raw_8LcIbl123.moduleidmap',
     'SaveRoads': True
@@ -835,7 +838,7 @@ FTKTagOptions['SectorsAsPatterns12L32b'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_12L.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True
     }
 FTKTagOptions['SectorsAsPatterns8L32b'] = {
@@ -844,7 +847,7 @@ FTKTagOptions['SectorsAsPatterns8L32b'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_8Lc.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'SaveRoads': True
     }
 FTKTagOptions['SectorsAsPatterns12L32bHWMode2'] = {
@@ -853,7 +856,7 @@ FTKTagOptions['SectorsAsPatterns12L32bHWMode2'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_12L.hw', 'SecondStageFit': False,
-    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1,
+    'TRACKFITTER_MODE': 1, 'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1 , 'HWModeSS': 2,
     'ModuleLUTPath': 'raw_12Libl.moduleidmap', 'SaveRoads': True
     }
@@ -863,7 +866,7 @@ FTKTagOptions['SectorsAsPatterns8L32bHWMode2'] = {
     'bankpatterns': [-1]*NumberOfSubregions,
     'ssmap_path': 'raw_15x16x36Ibl.ss', 'UseTSPBank': False,
     'loadHWConf_path': 'raw_8Lc.hw', 'SecondStageFit': False,
-    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'SectorsAsPatterns': 1,
+    'FixEndCapL0': False, 'IBLMode': 1, 'PixelClusteringMode': 1, 'Ibl3DRealistic': False, 'SectorsAsPatterns': 1,
     'MaxMissingSCTPairs': 0,
     'HWModeSS': 2,'ModuleLUTPath': 'raw_8LcIbl123.moduleidmap',
     'SaveRoads': True
@@ -880,6 +883,7 @@ FTKTagOptions['FitITk'] = {
     'FixEndCapL0': False, 'IBLMode': 0,
     'ITkMode': True,
     'PixelClusteringMode': 1,
+    'Ibl3DRealistic': False,
     'SectorsAsPatterns': 0,
     'SetAMSplit': 0,
     'SaveRoads': True }
@@ -895,6 +899,7 @@ FTKTagOptions['FitITkSaP'] = {
     'IBLMode': 0,
     'ITkMode': True,
     'PixelClusteringMode': 1,
+    'Ibl3DRealistic': False,
     'SectorsAsPatterns': 1,
     'SetAMSplit': 0,
     'SaveRoads': True }
@@ -911,6 +916,7 @@ FTKTagOptions['FitITkDC'] = {
     'IBLMode': 0,
     'ITkMode': True,
     'PixelClusteringMode': 1,
+    'Ibl3DRealistic': False,
     'SectorsAsPatterns': 0,
     'SetAMSplit': 0,
     'SetAMSize': 2,
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKConstantBank.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKConstantBank.cxx
index f3d703ec960557b6b862febf5e0931584a907a57..74e733fd446c86eed9c255b337c4be0a32be9b59 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKConstantBank.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKConstantBank.cxx
@@ -1169,6 +1169,8 @@ void FTKConstantBank::printExtrapolationConstant(int secid, vector<int> moduleid
     myfile << hex << setw(8) << word  << endl;
     word = floatToReg27(Constants[52]);
     myfile << hex << setw(8) << word  << endl;
+    word = floatToReg27(Constants[53]);
+    myfile << hex << setw(8) << word  << endl;
     word = floatToReg27(Constants[54]);
     myfile << hex << setw(8) << word  << endl;
     word = floatToReg27(Constants[55]);
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKDataInput.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKDataInput.cxx
index 76aa2a6f0aefe83d61a7cbe95a79f69909ec2e91..761beb20ef7409977ed183f18e6189af63bcccbf 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKDataInput.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKDataInput.cxx
@@ -19,7 +19,7 @@ FTKDataInput::FTKDataInput() :
   m_original_reghits(0), m_nplanes(0), m_nregions(0), m_nsubregions(0),
   m_ncoords(0), m_region(-1), m_subregion(-1), 
   m_Clustering(true), m_SaveClusterContent(false),
-  m_DiagClustering(true), m_SctClustering(false), m_PixelClusteringMode(0), m_DuplicateGanged(true), 
+  m_DiagClustering(true), m_SctClustering(false), m_PixelClusteringMode(0), m_Ibl3DRealistic(false), m_DuplicateGanged(true),
   m_GangedPatternRecognition(false),
   m_SplitBlayerModules(false),  
   m_init(false), m_save_unused(false), m_read_clusters(false),
@@ -36,7 +36,7 @@ FTKDataInput::FTKDataInput(const FTKPlaneMap *pmap, const FTKPlaneMap *pmap_unus
   m_nplanes(m_pmap->getNPlanes()), m_nregions(0), m_nsubregions(0),
   m_ncoords(0), m_region(-1), m_subregion(-1), 
   m_Clustering(true), m_SaveClusterContent(false),
-  m_DiagClustering(true), m_SctClustering(false), m_PixelClusteringMode(0), m_DuplicateGanged(true), 
+  m_DiagClustering(true), m_SctClustering(false), m_PixelClusteringMode(0), m_Ibl3DRealistic(false), m_DuplicateGanged(true),
   m_GangedPatternRecognition(false),
   m_SplitBlayerModules(false),  
   m_init(false), m_save_unused(false), m_read_clusters(false),
@@ -67,6 +67,7 @@ void FTKDataInput::initClustering()
   DIAG_CLUSTERING = m_DiagClustering;
   SCT_CLUSTERING = m_SctClustering;
   PIXEL_CLUSTERING_MODE = m_PixelClusteringMode;
+  IBL3D_REALISTIC = m_Ibl3DRealistic;
   DUPLICATE_GANGED = m_DuplicateGanged;
   GANGED_PATTERN_RECOGNITION = m_GangedPatternRecognition;
   SPLIT_BLAYER_MODULES = m_SplitBlayerModules;
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKMergerAlgo.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKMergerAlgo.cxx
index 607b89de53bdaf9da9b8009a0d062d53f0901e4f..4696b4be0057532f3325d2148cfaa45976570a10 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKMergerAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKMergerAlgo.cxx
@@ -1933,16 +1933,16 @@ Rec::TrackParticle* FTKMergerAlgo::createTrackParticle(const Trk::Track* track,
     }
             
 
-    tracksum[Trk::numberOfBLayerHits]  = bitmask&(1<<0);
+    tracksum[Trk::numberOfInnermostPixelLayerHits]  = bitmask&(1<<0);
     tracksum[Trk::numberOfPixelHits]   = npixel;
     tracksum[Trk::numberOfPixelHoles]  = npixelholes;
     tracksum[Trk::numberOfSCTHits]     = nsct;
     tracksum[Trk::numberOfSCTHoles]    = nsctholes;
-    tracksum[Trk::expectBLayerHit]     =  1.0;
+    tracksum[Trk::expectInnermostPixelLayerHit]     =  1.0;
 
 
-    tracksum[Trk::numberOfBLayerOutliers          ] = 0;
-    tracksum[Trk::numberOfBLayerSharedHits        ] = 0;
+    tracksum[Trk::numberOfInnermostPixelLayerOutliers          ] = 0;
+    tracksum[Trk::numberOfInnermostPixelLayerSharedHits        ] = 0;
     tracksum[Trk::numberOfPixelOutliers           ] = 0;
     tracksum[Trk::numberOfPixelSharedHits         ] = 0;
     tracksum[Trk::numberOfGangedPixels            ] = 0;
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadFileInput.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadFileInput.cxx
index 5895cd58fc4e1b8763afaaea6da69c6bb98d1948..b7a8359afaf5a3405bbe2eb4952811f852a03656 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadFileInput.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadFileInput.cxx
@@ -70,6 +70,29 @@ const FTKRoad* FTKRoadFileInput::nextRoad(int ibank)
   return m_cur_object[ibank];
 }
 
+/** this function go to the first road and return the pointer to the
+    current road. return 0 if all the roads were used */
+const FTKRoad* FTKRoadFileInput::firstRoad(int ibank)
+{
+  // if the bank isn't active a NULL is returned
+  if (!m_data[ibank]) return 0x0;
+
+  // get the road
+  m_cur_object[ibank] = m_data[ibank]->fetchFirstRoad();
+  m_cur_iobject[ibank] = 0; 
+
+  // check if the bank has enough roads
+  if (!m_cur_object[ibank]) {
+    m_cur_object[ibank] = 0;
+  }
+  else {
+    // increment road counter
+    m_cur_iobject[ibank] += 1; 
+  }
+
+  return m_cur_object[ibank];
+}
+
 // retrieve superstrip by (bank,plane,ssid)
 const FTKSS&
 FTKRoadFileInput::getSS(const unsigned int& ibank,const unsigned int& iplane,const unsigned int& ssid) const
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadFinderAlgo.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadFinderAlgo.cxx
index ad7c427aae7bd6f6d5595553ec9d1146da979586..f190b57bf30d3494cd0bf1a0d03ba53a9daa5d0c 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadFinderAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadFinderAlgo.cxx
@@ -37,6 +37,7 @@ FTKRoadFinderAlgo::FTKRoadFinderAlgo(const std::string& name, ISvcLocator* pSvcL
   m_ITkMode(false),
   m_ss_offset_fraction(0),
   m_PixelClusteringMode(0),
+  m_Ibl3DRealistic(false),
   m_DuplicateGanged(1),
   m_GangedPatternRecognition(0),
   m_SctClustering(0),
@@ -98,6 +99,7 @@ FTKRoadFinderAlgo::FTKRoadFinderAlgo(const std::string& name, ISvcLocator* pSvcL
   declareProperty("ITkMode",m_ITkMode);
 
   declareProperty("PixelClusteringMode",m_PixelClusteringMode,"Pixel clustering correction: 0 simple default, 1 channel center and linear ToT interpolation and account for different pixel lengths");
+  declareProperty("Ibl3DRealistic",m_Ibl3DRealistic,"Do IBL 3D realistic(HWlike) clustering? Default is false");
   declareProperty("DuplicateGanged",m_DuplicateGanged,"Duplicate ganged pixels so we don't lose efficiency");
   declareProperty("GangedPatternReco", m_GangedPatternRecognition,"Pattern recognition to partially remove duplication");
   declareProperty("SctClustering",m_SctClustering,"Enable SCT clustering: 0 disabled, 1 enabled");
@@ -332,6 +334,7 @@ StatusCode FTKRoadFinderAlgo::initialize(){
 
   // Set options related to the input: clustering or other features
   m_rfobj.getDataInputModule()->setPixelClusteringMode(m_PixelClusteringMode);
+  m_rfobj.getDataInputModule()->setIbl3DRealistic(m_Ibl3DRealistic);
   m_rfobj.getDataInputModule()->setSctClustering(m_SctClustering);
   m_rfobj.getDataInputModule()->setDuplicateGanged(m_DuplicateGanged);
   m_rfobj.getDataInputModule()->setGangedPatternRecognition(m_GangedPatternRecognition);
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadStream.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadStream.cxx
index d1352b365a65160dec266b1681ba39c9cfda5590..e8e4957c1c85ebc93ae21cbbeabfd9a94b8a422f 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadStream.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKRoadStream.cxx
@@ -581,6 +581,23 @@ FTKRoad* FTKRoadStream:: fetchRoad()
   return res;
 }
 
+/** get the first road and move the cursor to the next road */
+FTKRoad* FTKRoadStream:: fetchFirstRoad()
+{
+  FTKRoad *res = 0x0;
+  m_fit_iter = m_fit_list.begin();
+  if (m_fit_iter!=m_fit_list.end()) {
+    res = (*m_fit_iter)();
+    ++m_fit_iter;
+  }
+  else if (m_nroads>0) {
+    // clean the last road, if there are roads
+    detachHits(m_nroads-1);
+  }
+
+  return res;
+}
+
 
 /** Expand the sub-roads of this road and if these are final roads are apppended to the fit list,
     if there are further level the navigation continues  */
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKSSMap.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKSSMap.cxx
index aaf59e1eec1808f1d5d9f43f88de01af101423b0..3ef4e02e5a5d21d135c81829fa82d2817412fefa 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKSSMap.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKSSMap.cxx
@@ -1532,7 +1532,7 @@ FTKSSMap::get_lookup_table(const int plane,const int section, const int id) cons
           tmp[1] = iy;
           tmp.setPlane(plane);
           tmp.setSector(0);
-          ssid = compressed_ssid_word_pixel(tmp,0);//localModuleID=0
+          ssid = compressed_ssid_word_pixel(0,tmp.getPlane(),0,tmp[0],tmp[1],0);
         }
       } else {
         // SCT
@@ -1541,7 +1541,7 @@ FTKSSMap::get_lookup_table(const int plane,const int section, const int id) cons
           tmp[0] = ix;
           tmp.setPlane(plane);
           tmp.setSector(0);
-          ssid = compressed_ssid_word_strip(tmp,0);//localModuleID=0
+          ssid = compressed_ssid_word_strip(0,tmp.getPlane(),0,tmp[0]);
         }
       }
       //cout << " ix=" << ix << " iy=" << iy << " ilut=" << lut_offset << " ssid=" << ssid << endl;
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKTrackFitterAlgo.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKTrackFitterAlgo.cxx
index df8b8a9deca32cb519544cb341c2967497e63ffc..a02f99d2b287782cf8fdd2a4d87695f4267813f0 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKTrackFitterAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKTrackFitterAlgo.cxx
@@ -38,6 +38,7 @@ FTKTrackFitterAlgo::FTKTrackFitterAlgo(const std::string& name, ISvcLocator* pSv
   m_chi2dofcut(4),
   m_doAuxFW(false),
   m_HitWarrior(2),
+  m_HitWarrior_first(1),
   m_KeepRejected(0), 
   m_FitRemoved(0),
   m_DoMajority(1),
@@ -82,6 +83,7 @@ FTKTrackFitterAlgo::FTKTrackFitterAlgo(const std::string& name, ISvcLocator* pSv
   declareProperty("Chi2DofCut",m_chi2dofcut);
   declareProperty("doAuxFW", m_doAuxFW);
   declareProperty("HitWarrior", m_HitWarrior);
+  declareProperty("FirstStageHitWarrior", m_HitWarrior_first);
   declareProperty("KeepRejected", m_KeepRejected);
   declareProperty("FitRemoved", m_FitRemoved);
   declareProperty("DoMajority",m_DoMajority);
@@ -341,6 +343,7 @@ StatusCode FTKTrackFitterAlgo::initialize(){
   // set parameter object to TrackFitter
   m_tfpobj->setChi2Cut(m_chi2cut);
   m_tfpobj->setHitWarrior(m_HitWarrior);
+  m_tfpobj->setHitWarriorFirst(m_HitWarrior_first);
   m_tfpobj->setChi2Cut_maj(m_chi2cut_maj);
   m_tfpobj->setChi2Cut_vetomaj(m_chi2cut_vetmaj);
   m_tfpobj->setChi2DofCut(m_chi2dofcut);
@@ -393,9 +396,9 @@ StatusCode FTKTrackFitterAlgo::initialize(){
     else
       dynamic_cast<TrackFitter711*>(m_tfpobj)->setSuperExtrapolateMode(false);
     if (m_save_1stStageTrks)
-      dynamic_cast<TrackFitter711*>(m_tfpobj)->setSaveIncompleteTracks(true);
+      dynamic_cast<TrackFitter*>(m_tfpobj)->setSaveIncompleteTracks(true);
     else
-      dynamic_cast<TrackFitter711*>(m_tfpobj)->setSaveIncompleteTracks(false);
+      dynamic_cast<TrackFitter*>(m_tfpobj)->setSaveIncompleteTracks(false);
 
     dynamic_cast<TrackFitter711*>(m_tfpobj)->setUseSectorDB(true);
     dynamic_cast<TrackFitter711*>(m_tfpobj)->setUseMultipleConn(m_SSF_multiconn);
@@ -483,7 +486,10 @@ StatusCode FTKTrackFitterAlgo::initialize(){
 	vector<vector<int>> moduleIDvec;
 	moduleIDvec.clear();
 
-	for(Int_t isec=0;isec<bank8->getNSectors();isec++){
+	Int_t Max_1stStage_sectors = 16383;
+        for(Int_t isec=0;isec<Max_1stStage_sectors;isec++){
+	  
+	  if((int)sector->getNSimilarSectors(isec) == 0 )break;
 
 	  for(Int_t Nconn=0; Nconn< (int)sector->getNSimilarSectors(isec); Nconn++){
 	    if(Nconn >3 ) break;
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTK_RoadMarketIO.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTK_RoadMarketIO.cxx
index e22523106017a99bdc53b896bc6df0e350a09388..4e3fb424abcecfc27e5de1bee4f29f96fa411d1e 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTK_RoadMarketIO.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTK_RoadMarketIO.cxx
@@ -85,6 +85,27 @@ const FTKRoad* FTK_RoadMarketInput::nextRoad(int ibank)
   return m_cur_road[ibank];
 }
 
+/** this function go to the first road and return the pointer to
+    the current road. return 0 if all the roads were used */
+const FTKRoad* FTK_RoadMarketInput::firstRoad(int ibank)
+{
+
+  // get the road
+  m_cur_road[ibank] = m_market->getStream(ibank)->fetchFirstRoad();
+  m_cur_iroad[ibank] = 0;
+
+  // check if the bank has enough roads
+  if (!m_cur_road[ibank]) {
+    m_cur_road[ibank] = 0;
+  }
+  else {
+    // increment road counter
+    m_cur_iroad[ibank] += 1; 
+  }
+
+  return m_cur_road[ibank];
+}
+
 
 const FTKSS& FTK_RoadMarketInput::getSS(const unsigned int &ibank, const unsigned int &iplane, const unsigned int &ssid) const
 {
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx
index d8cf0342829b4ad0a884c5e99391f0ee28140b53..21623352d0ae206d5d17c65e8c30bd75e7b73fab 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTK_SGHitInput.cxx
@@ -425,7 +425,7 @@ FTK_SGHitInput::read_raw_silicon( HitIndexMap& hitIndexMap, HitIndexMap& pixelCl
 
 	bool isIBL = (m_pixelId->barrel_ec(rdoId) == 0 && m_pixelId->layer_disk(rdoId) == 0) ? true : false;
 	bool isIBL3D = (isIBL && FTKSetup::getFTKSetup().getIBLMode() == 2 && 
-			(abs(m_pixelId->eta_module(rdoId)) >= 7)) ? true : false;
+			(m_pixelId->eta_module(rdoId) <= -7 || m_pixelId->eta_module(rdoId) >= 6)) ? true : false;
 
 	if (isIBL3D)
 	  tmpSGhit.setModuleType(ftk::MODULETYPE_IBL3D);
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/TrackFitter.cxx b/Trigger/TrigFTK/TrigFTKSim/src/TrackFitter.cxx
index 23df0c950fdda4d2ff78cb73f0b3b495385fe9c1..964a8b225688563c3684406ae4648e2193cffb7b 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/TrackFitter.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/TrackFitter.cxx
@@ -19,7 +19,7 @@ using namespace std;
 TrackFitter::TrackFitter() :
   m_ncoords(0), m_nplanes(0), m_npars(5),
   m_Chi2Cut(0), m_Chi2Cut_maj(0), m_Chi2Cut_vetomaj(-1), m_Chi2DofCut(-1),
-  m_HitWarrior(2), m_HW_ndiff(3), m_HW_dev(0),
+  m_HitWarrior(2), m_HitWarrior_first(1), m_HW_ndiff(3), m_HW_dev(0),
   m_keep_rejected(0), m_fit_removed(0),
   m_max_ncomb(10000), m_max_nhitsperplane(-1), m_max_trkout(2000000), m_norecovery_nhits(-1),
   m_one_per_road(false), m_require_first(true), m_do_majority(1),
@@ -49,7 +49,8 @@ TrackFitter::TrackFitter() :
   m_position(0),
   m_endlist(0),
   m_hitcnt(0),
-  m_identify_badhit(false)
+  m_identify_badhit(false),
+  m_saveIncompleteTracks(false)
 {
   // nothing to do
 #ifdef DEBUG_HITEXTRAPOLATION
@@ -283,14 +284,70 @@ int TrackFitter::nextEvent()
     // m_trackoutput_pre_hw->setEventNumber( ibank , m_roadinput->eventNumber(ibank) );
 
     const FTKRoad *cur_road = m_roadinput->nextRoad(ibank);
-    while (cur_road) {
-      processor(*cur_road);
-#if 0 // debug just a limited fraction
-      if (m_nfits>=10000000)
-	break;
-#endif
-      cur_road = m_roadinput->nextRoad(ibank);
+
+    if (m_HitWarrior_first != 2) {
+
+      while (cur_road) {
+        processor(*cur_road);
+        #if 0 // debug just a limited fraction
+              if (m_nfits>=10000000)
+        	break;
+        #endif
+        cur_road = m_roadinput->nextRoad(ibank);
+      }
+    }
+    else {
+
+      vector<int> vSectorID;
+
+      while (cur_road) {
+        if (std::find(vSectorID.begin(), vSectorID.end(), cur_road->getSectorID()) == vSectorID.end()) vSectorID.push_back(cur_road->getSectorID());
+        cur_road = m_roadinput->nextRoad(ibank);
+      }
+
+      for (unsigned int i = 0; i < vSectorID.size(); i++) {
+        cur_road = m_roadinput->firstRoad(ibank);
+
+        while (cur_road) {
+          if (cur_road->getSectorID() == vSectorID[i]) {
+            m_processor_stage = 1;
+            processor(*cur_road);
+          }
+          cur_road = m_roadinput->nextRoad(ibank);
+        }
+
+        cur_road = m_roadinput->firstRoad(ibank);
+
+        while (cur_road) {
+          if (cur_road->getSectorID() == vSectorID[i]) {
+            m_processor_stage = 2;
+            processor(*cur_road);
+          }
+          cur_road = m_roadinput->nextRoad(ibank);
+        }
+
+        m_tracks_first.splice(m_tracks_first.end(), m_sector_tracks);
+
+      }
+
+      vSectorID.clear();
+      m_sector_tracks.clear();
+
     }
+
+    if (m_saveIncompleteTracks) {
+      for (list<FTKTrack>::iterator it = m_tracks_first.begin(); it != m_tracks_first.end(); it++) {
+        int region = it->getRegion();
+        m_trackoutput->addTrackI(region,*it);
+      }
+      // itrack = road_tracks_pre_hw.begin();
+      // for (;itrack!=road_tracks_pre_hw.end();++itrack) {
+      //   m_trackoutput_pre_hw->addTrackI(region,*itrack);
+      // }
+    }
+
+    m_tracks_first.clear();
+    
     // now that all roads in the bank are processed, associate geant
     // truth data with the resulting tracks.
 
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/TrackFitter711.cxx b/Trigger/TrigFTK/TrigFTKSim/src/TrackFitter711.cxx
index cea1dadb13a359b28f12809f634ce107e8fb4e4a..d59ba14ced35d6dc2b59c95769af3e51a60b9695 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/TrackFitter711.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/TrackFitter711.cxx
@@ -32,7 +32,7 @@ TrackFitter711::TrackFitter711() :
   m_ext_parmask(1<<3), m_idpars(0),
   m_histores_hitcoord_PXL(0),
   m_histores_hitcoord_SCT(0),
-  m_use_SectorDB(false), m_use_multiple_conn(false), m_use_n_conn(999), m_saveIncompleteTracks(false),
+  m_use_SectorDB(false), m_use_multiple_conn(false), m_use_n_conn(999),
   m_resolution_mode(false), m_super_extrapolate(true),
   m_CImap(0), m_CIlayermap(0x0),
   m_resfile(0),
@@ -629,47 +629,60 @@ void TrackFitter711::processor_end(int ibank)
  * Comment:   Called once per road (aka pattern) from a loop in nextEvent()
 *******************************************/
 void TrackFitter711::processor(const FTKRoad &road) {
-  if (m_resolution_mode) {
 
-    list<FTKTrack> road_tracks; // list 7L tracks for this road
-//    list<FTKTrack> road_tracks_pre_hw; // list 7L tracks before the HW filter
+  if (m_resolution_mode) {
+    if (m_HitWarrior_first != 2) {
+      list<FTKTrack> road_tracks; // list 7L tracks for this road
+      // list<FTKTrack> road_tracks_pre_hw; // list 7L tracks before the HW filter
 
-    processor_Incomplete(road,road_tracks);
-//    processor_Incomplete(road,road_tracks, road_tracks_pre_hw);
+      processor_Incomplete(road,road_tracks);
+      // processor_Incomplete(road,road_tracks, road_tracks_pre_hw);
 
-    // JAAA not used anymore
-    //    processor_ResolutionMode(road,road_tracks);
+      // JAAA not used anymore
+      // processor_ResolutionMode(road,road_tracks);
+    }
+    else{
+      if (m_processor_stage == 1) {
+        processor_Incomplete(road,m_sector_tracks);
+        // JAAA not used anymore
+        // processor_ResolutionMode(road,m_sector_tracks);
+      }
+    }
   }
   else {     // performe the fits of the incomplete set of constants
-    list<FTKTrack> road_tracks; // list 7L tracks for this road
-//    list<FTKTrack> road_tracks_pre_hw; // list 7L tracks before the HW filter
 
-    // perfom the incomplete fit
-    processor_Incomplete(road,road_tracks);
-//    processor_Incomplete(road,road_tracks, road_tracks_pre_hw);
+    if (m_HitWarrior_first != 2) {
+      list<FTKTrack> road_tracks; // list 7L tracks for this road
+      // list<FTKTrack> road_tracks_pre_hw; // list 7L tracks before the HW filter
 
-    if (road_tracks.empty()) return;
+      // perfom the incomplete fit
+      processor_Incomplete(road,road_tracks);
+      // processor_Incomplete(road,road_tracks, road_tracks_pre_hw);
+
+      if (road_tracks.empty()) return;
+
+      // extrapolate and complete the fit
+      if (!m_super_extrapolate)
+        processor_Extrapolate(road,road_tracks);
+      else
+        processor_SuperExtrapolate(road,road_tracks);
+
+      m_tracks_first.splice(m_tracks_first.end(), road_tracks);
 
-    if (m_saveIncompleteTracks) {
-      int region = road.getRegion();
-      list<FTKTrack>::iterator itrack = road_tracks.begin();
-      for (;itrack!=road_tracks.end();++itrack) {
-        m_trackoutput->addTrackI(region,*itrack);
-      }
-      // itrack = road_tracks_pre_hw.begin();
-      // for (;itrack!=road_tracks_pre_hw.end();++itrack) {
-      //   m_trackoutput_pre_hw->addTrackI(region,*itrack);
-      //      }
     }
-    // extrapolate and complete the  fit
-    if (!m_super_extrapolate){
-      processor_Extrapolate(road,road_tracks);
+    else {
+      if (m_processor_stage == 1) 
+        processor_Incomplete(road,m_sector_tracks);
+      else if (m_processor_stage == 2) {
+        if (m_sector_tracks.empty()) return;
+        if (!m_super_extrapolate)
+          processor_Extrapolate(road,m_sector_tracks);
+        else 
+          processor_SuperExtrapolate(road,m_sector_tracks);
+      }
     }
-    else{
-      processor_SuperExtrapolate(road,road_tracks);
   }
 }
-}
 
 
 /** this method is derived from the standard processor method in the
@@ -1035,7 +1048,7 @@ void TrackFitter711::processor_Incomplete(const FTKRoad &road,
 
        int accepted(0);
        // Disable hitwarrior, auto-accept every track
-       if (m_HitWarrior!=0)
+       if (m_HitWarrior!=0 && m_HitWarrior_first!=0)
          accepted = doHitWarriorFilter(m_newtrkI,road_tracks);
 
        if (accepted>=0) { // track accepted, no hits shared with already fitted tracks
@@ -3000,6 +3013,7 @@ void TrackFitter711::processor_SuperExtrapolate(const FTKRoad &road, list<FTKTra
   list<FTKTrack>::iterator itrack = road_tracks.begin();
 
   for (;itrack!=road_tracks.end();++itrack) {
+    if (itrack->getRoadID() != road.getRoadID()) continue;
     m_newtrkI = *itrack;
     m_passedExtrapolation = false; ///reset this
     extrapolateIncompleteTrack(road);
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/atlClustering.cxx b/Trigger/TrigFTK/TrigFTKSim/src/atlClustering.cxx
index 7ece3ebbcd970acdfa688bf46017b00c6a9e0abf..15216953e9a0fa80dbd4d38912a80f66b406b92a 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/atlClustering.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/atlClustering.cxx
@@ -70,6 +70,7 @@ bool SAVE_CLUSTER_CONTENT;
 bool DIAG_CLUSTERING;
 bool SCT_CLUSTERING;
 int PIXEL_CLUSTERING_MODE;
+bool IBL3D_REALISTIC; //If this boolean is "true", you can get the same IBL 3D centorid as the FTK_IM FW.
 bool DUPLICATE_GANGED;
 bool GANGED_PATTERN_RECOGNITION;
 bool SPLIT_BLAYER_MODULES;
@@ -997,6 +998,7 @@ void averageCluster(cluster &clu) {
     // always count IBL as layer0 and BLayer as layer1
     int layer = first->getLayer();
     bool isIBLmodule  = hitOnIBLmodule(*first);
+    bool isIBL_Planar = false;
     bool isPixelmodule = !isIBLmodule;
     if (FTKSetup::getFTKSetup().getIBLMode()==0)
         layer++; 
@@ -1023,9 +1025,12 @@ void averageCluster(cluster &clu) {
         pixYScaleFactor = ftk::clustering::yScaleFactorIbl; ///<multiply by 10 to count in unit of 25um
         pixXScaleFactor = ftk::clustering::xScaleFactorIbl;
         etaModule = first->getEtaModule()-8;
-        //float sensorThickness = 230*micrometer; // 3D sensors
-        //pixelModuleActiveLength = 80*0.25;  // 3D sesors ???
-        //numberOfEtaPixelsInModule = 80; // 3D sesors ???
+	isIBL_Planar = (first->getEtaModule() >= -6 && first->getEtaModule() <= 5 ? true : false);
+	if(!isIBL_Planar && IBL3D_REALISTIC){ // 3D
+	  sensorThickness = 230*ftk::micrometer; // 3D
+	  moduleActiveLength = 80*250; // 3D
+	  numberOfEtaPixelsInModule = 80; // 3D
+	}
     }
     bool hasGanged = false;
 
@@ -1182,17 +1187,19 @@ void averageCluster(cluster &clu) {
                     int orig_col = col;
                     col *= pixYScaleFactor; // use units of 25um
                     col += pixYScaleFactor/2; // add half a pixel to align to pixel center
-                    if (orig_col==0) col += pixYScaleFactor/2; // add half pixel (500um pixel in col0)
-                    if (orig_col>0) col += pixYScaleFactor; // add a pixel (500um pixel in col0)
-
-                    // for 3D modules only
-                    // if (orig_col==79) col += pixYScaleFactor*5/10; // add 5/10 of pixel i.e. 100um (500um pixel in col79)
-
-                    // for planar modules only
-                    if (orig_col==79) col += pixYScaleFactor*4/10; // add 4/10 of pixel i.e. 100um (450um pixel in col79)
-                    if (orig_col==80) col += pixYScaleFactor*12/10; // add 12/10 of pixel i.e. 300um (450um pixel in col79 and col80)
-                    if (orig_col>80) col += pixYScaleFactor*16/10; // add 16/10 of pixel i.e. 400um (450um pixel in col79 and col80)
-                    if (orig_col==159) col += pixYScaleFactor/2; // add half pixel (500um pixel in col159)
+		    if((isIBL_Planar && IBL3D_REALISTIC) || !IBL3D_REALISTIC){
+		      if (orig_col==0) col += pixYScaleFactor/2; // add half pixel (500um pixel in col0)
+		      if (orig_col>0) col += pixYScaleFactor; // add a pixel (500um pixel in col0)
+
+		      // for 3D modules only
+		      // if (orig_col==79) col += pixYScaleFactor*5/10; // add 5/10 of pixel i.e. 100um (500um pixel in col79)
+
+		      // for planar modules only
+		      if (orig_col==79) col += pixYScaleFactor*4/10; // add 4/10 of pixel i.e. 100um (450um pixel in col79)
+		      if (orig_col==80) col += pixYScaleFactor*12/10; // add 12/10 of pixel i.e. 300um (450um pixel in col79 and col80)
+		      if (orig_col>80) col += pixYScaleFactor*16/10; // add 16/10 of pixel i.e. 400um (450um pixel in col79 and col80)
+		      if (orig_col==159) col += pixYScaleFactor/2; // add half pixel (500um pixel in col159)
+		    }
                 }
                 row *= pixXScaleFactor;
 
diff --git a/Trigger/TrigFTK/TrigFTKSim/standalone/road_finder.cc b/Trigger/TrigFTK/TrigFTKSim/standalone/road_finder.cc
index ce12a2a03502a5adc89367858819d2d998e5eedd..d512225493c9f412d8795b08fc24547960c511f3 100644
--- a/Trigger/TrigFTK/TrigFTKSim/standalone/road_finder.cc
+++ b/Trigger/TrigFTK/TrigFTKSim/standalone/road_finder.cc
@@ -783,6 +783,21 @@ int read_commands()
 
             dinput->setPixelClusteringMode(ival);
         }
+        else if (key == "IBL3D_REALISTIC")
+        {
+            int ival;
+            sline >> ival;
+            FTKDataInput *dinput = rfobj.getDataInputModule();
+
+            if (ival > 0)
+            {
+                dinput->setIbl3DRealistic(true);
+            }
+            else
+            {
+                dinput->setIbl3DRealistic(false);
+            }
+        }
         else if (key == "DUPLICATE_GANGED")
         {
             int ival;
diff --git a/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/RunValidation.py b/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/RunValidation.py
index b7feea910fdacb2698d37a6c9a2b36dd8c1686fa..89bd2e0b43ed030e0371efc04ef77046f97cef44 100644
--- a/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/RunValidation.py
+++ b/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/RunValidation.py
@@ -95,8 +95,8 @@ WRKDIR=$PWD
 REGID=$((LSB_JOBINDEX-1))
 
 # common commands
-EOSCP="/afs/cern.ch/project/eos/installation/atlas/bin/eos.select cp"
-EOSLS="/afs/cern.ch/project/eos/installation/atlas/bin/eos.select ls"
+EOSCP="eos cp"
+EOSLS="eos ls"
 
 #BANKDS=/afs/cern.ch/user/g/gvolpi/public/user.annovi.raw_8LcIbl123_15x16x36Ibl_8LextFrom12Lcache.ftk.2013_11_19_14_51_50.list
 BANKDS=/eos/atlas/user/g/gvolpi/HWPrepBanks/PU40Bank
diff --git a/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/generate_connection/make_conn/process_conn.sh b/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/generate_connection/make_conn/process_conn.sh
index 8623981ce38b49ac13717a5f32d6ab6780d16b09..779858c4f1ed8b53c3576ebecb31462d9458af77 100644
--- a/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/generate_connection/make_conn/process_conn.sh
+++ b/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/generate_connection/make_conn/process_conn.sh
@@ -8,7 +8,7 @@
 #
 ##############################################################################
 
-EOSCOMMAND="/afs/cern.ch/project/eos/installation/0.2.31/bin/eos.select"
+EOSCOMMAND="eos"
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 # Help
diff --git a/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/local_ftksim_tool.sh b/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/local_ftksim_tool.sh
index cb93c1c64e1cafc41f85bbf3107ce558604d0bbc..4092848256c0bfd040e318d60c2366db7199ee20 100644
--- a/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/local_ftksim_tool.sh
+++ b/Trigger/TrigFTK/TrigFTKSim/standalone_scripts/local_ftksim_tool.sh
@@ -8,7 +8,7 @@
 #
 ##############################################################################
 
-EOSCOMMAND="/afs/cern.ch/project/eos/installation/0.2.31/bin/eos.select"
+EOSCOMMAND="eos"
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 # Default values
diff --git a/Trigger/TrigFTK/TrigFTK_Monitoring/cmt/requirements b/Trigger/TrigFTK/TrigFTK_Monitoring/cmt/requirements
deleted file mode 100644
index 44d9d1f9ece452a33496c8a910f2ed46137fdb11..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/TrigFTK_Monitoring/cmt/requirements
+++ /dev/null
@@ -1,33 +0,0 @@
-## automatically generated CMT requirements file
-package TrigFTK_Monitoring
-author  abolz
-
-# public dependencies
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  FTK_DataProviderInterfaces FTK_DataProviderInterfaces-*    Trigger/TrigFTK
-use  TrigInDetAnalysis          TrigInDetAnalysis-*             Trigger/TrigAnalysis
-use  TrigInDetAnalysisUtils     TrigInDetAnalysisUtils-*        Trigger/TrigAnalysis
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  xAODTracking               xAODTracking-*                  Event/xAOD
-
-# private dependencies
-private
-use  EventInfo                  EventInfo-*                     Event
-use  GaudiInterface             GaudiInterface-*                External
-use  TrigNavigation             TrigNavigation-*                Trigger/TrigEvent
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigTimeAlgs               TrigTimeAlgs-*                  Trigger/TrigTools
-end_private
-
-branches src src/components doc python share TrigFTK_Monitoring
-
-## default is to make component library. See: https://twiki.cern.ch/twiki/bin/view/Main/LearningAthena#Libraries_in_CMT for alternatives
-library TrigFTK_Monitoring *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-
-
diff --git a/Trigger/TrigFTK/TrigFTK_RawData/cmt/requirements b/Trigger/TrigFTK/TrigFTK_RawData/cmt/requirements
deleted file mode 100644
index 32d052abaf049c811f2cc52eee724307d9b9d12c..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/TrigFTK_RawData/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package TrigFTK_RawData
-
-author Jay Howarth <jhowarth@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-use AtlasROOT             AtlasROOT-*             External
-use CLIDSvc               CLIDSvc-*               Control
-use DataModel             DataModel-*             Control
-use SGTools               SGTools-*               Control
-
-private
-use AtlasROOT             AtlasROOT-*                External
-end_private
-
-library TrigFTK_RawData *.cxx
-apply_pattern installed_library
-
-private
-use AtlasReflex             AtlasReflex-*            External -no_auto_imports
-
-apply_pattern lcgdict dict=TrigFTK_RawData \
-	      selectionfile=selection.xml \
-	      headerfiles="../TrigFTK_RawData/TrigFTK_RawDataDict.h" \
-	      dataLinks="FTK_RawTrack FTK_RawPixelCluster FTK_RawSCT_Cluster" \
-	      elementLinks="FTK_RawTrackContainer"
\ No newline at end of file
diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/cmt/requirements b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/cmt/requirements
deleted file mode 100644
index 4967beac71edb53774240d626967737d9714a16d..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/cmt/requirements
+++ /dev/null
@@ -1,51 +0,0 @@
-################################################
-package TrigFTK_RawDataAlgs
-
-author Jay Howarth <jhowarth@cern.ch>
-
-public
-use AtlasPolicy		AtlasPolicy-*          
-#use AthenaKernel        AthenaKernel-*          Control
-use GaudiInterface	GaudiInterface-*	External
-use AtlasROOT		AtlasROOT-*		External
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use PileUpTools	 	PileUpTools-*		Control
-#use StoreGate           StoreGate-*             Control
-use TrigFTKPool 	TrigFTKPool-* 		Trigger/TrigFTK
-use PyJobTransforms 	PyJobTransforms-* 	Tools
-#use InDetPrepRawData     InDetPrepRawData-*     InnerDetector/InDetRecEvent
-
-use AtlasReconstructionRunTime AtlasReconstructionRunTime-*
-use AtlasPolicy                AtlasPolicy-*
-use GaudiInterface             GaudiInterface-*           External
-use TrigFTKSim		       TrigFTKSim-*         	  Trigger/TrigFTK
-use TrigFTK_RawData	       TrigFTK_RawData-*          Trigger/TrigFTK
-use FTK_DataProviderInterfaces FTK_DataProviderInterfaces-* Trigger/TrigFTK
-
-#use PixelConditionsServices    PixelConditionsServices-*  InnerDetector/InDetConditions
-#use TrkFitterUtils             TrkFitterUtils-*           Tracking/TrkFitter 
-#use TrkFitterInterfaces        TrkFitterInterfaces-*      Tracking/TrkFitter 
-use TrkEventPrimitives         TrkEventPrimitives-*       Tracking/TrkEvent
-#use TrkParameters              TrkParameters-*            Tracking/TrkEvent
-
-private
-use EventInfo                  EventInfo-*                Event
-use TrkTrack		       TrkTrack-*		  Tracking/TrkEvent
-use TrkTrackSummary            TrkTrackSummary-*          Tracking/TrkEvent
-use AtlasDetDescr              AtlasDetDescr-*            DetectorDescription
-#use GeoPrimitives              GeoPrimitives-*            DetectorDescription
-use InDetIdentifier            InDetIdentifier-*          InnerDetector/InDetDetDescr
-#use InDetRIO_OnTrack           InDetRIO_OnTrack-*         InnerDetector/InDetRecEvent
-use InDetReadoutGeometry       InDetReadoutGeometry-*     InnerDetector/InDetDetDescr
-#use TrkRIO_OnTrack             TrkRIO_OnTrack-*           Tracking/TrkEvent
-use xAODTracking                xAODTracking-*            Event/xAOD
-use xAODTruth                xAODTruth-*            Event/xAOD
-
-# Add transform
-apply_pattern declare_job_transforms tfs='*_tf.py' jo='skeleton.*.py'
-#end_private
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_xmls extras="-s=../share *.dtd *.xml"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_ReaderAlgo.cxx b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_ReaderAlgo.cxx
index 0a3867560de57bafdf73c3f331c2840734e33e16..8f41a63b187f3abec9cf9ea222dceb80c9cb37e2 100644
--- a/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_ReaderAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTK_RawDataAlgs/src/FTK_RDO_ReaderAlgo.cxx
@@ -290,13 +290,13 @@ StatusCode FTK_RDO_ReaderAlgo::execute() {
       int itpr=0;
       for ( auto ptpr =  tpr->begin(); ptpr !=  tpr->end(); ptpr++, itpr++) {
 	double p = 1.e10;
-	if ((*ptpr)->qOverP()!=0.) p = 1./(*ptpr)->qOverP();
+	if (fabs((*ptpr)->qOverP())>1.e-9) p = 1./(*ptpr)->qOverP();
 	//uint8_t NumOfPixHits = 0;
 	//uint8_t NumOfSCTHits = 0;
 	//if (!(*ptpr)->summaryValue(NumOfSCTHits, xAOD::numberOfSCTHits) ) athlog << MSG::DEBUG << "Could not retrieve number of SCT hits");
 	//if (!(*ptpr)->summaryValue(NumOfPixHits, xAOD::numberOfPixelHits) ) athlog << MSG::DEBUG << "Could not retrieve number of Pixel hits");
 	ATH_MSG_VERBOSE( itpr << ": q*pT " << (*ptpr)->pt()*(*ptpr)->charge() << " eta " << (*ptpr)->eta() << " phi " << (*ptpr)->phi0() <<
-			 " d0: " << (*ptpr)->d0() << " z0: " << " q*p: " << p << (*ptpr)->z0() );
+			 " d0: " << (*ptpr)->d0() << " z0: " << " q*p: " << p << " z0 " << (*ptpr)->z0() );
       }
       delete (tpr);
     }
diff --git a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/cmt/requirements b/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/cmt/requirements
deleted file mode 100644
index 9620ac3bf4150e0e2ceed19bfbc992ba0b36f97e..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/TrigFTK_RawDataTPCnv/cmt/requirements
+++ /dev/null
@@ -1,46 +0,0 @@
-package TrigFTK_RawDataTPCnv
-
-author James Howarth     <jhowarth@cern.ch>
-
-use AtlasPolicy          AtlasPolicy-*
-
-use AthenaPoolCnvSvc     AthenaPoolCnvSvc-*         Database/AthenaPOOL
-use AthenaPoolUtilities  AthenaPoolUtilities-*	    Database/AthenaPOOL
-#use EventCommonTPCnv     EventCommonTPCnv-*         Event
-#use InDetIdentifier      InDetIdentifier-*          InnerDetector/InDetDetDescr
-#use StoreGate            StoreGate-*                Control
-#use RootConversions      RootConversions-*          Database/AthenaPOOL
-#use Identifier           Identifier-*               DetectorDescription
-
-# use statements for data packages
-#use FourMom              FourMom-*               Event
-use TrigFTK_RawData            TrigFTK_RawData-*          Trigger/TrigFTK
-
-#private
-#use IdDictParser   IdDictParser-*    DetectorDescription
-#end_private
-
-branches TrigFTK_RawDataTPCnv src
-
-library TrigFTK_RawDataTPCnv *.cxx
-apply_pattern tpcnv_library
-
-private
-
-use AthenaKernel         AthenaKernel-*             Control
-use GaudiInterface           GaudiInterface-*                   External
-use AtlasReflex		     AtlasReflex-*		        External
-
-# Create a dictionary for the persistent representation 
-# of transient classes.  If we make a single dictionary,
-# the compiler runs out of memory on the generated source.
-
-apply_pattern lcgdict dict=TrigFTK_RawDataTPCnv \
-  selectionfile=selection.xml \
-  headerfiles="../TrigFTK_RawDataTPCnv/TrigFTK_RawDataTPCnvDict.h"
-
-end_private
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=FTK_RawTrackCnv_p1
diff --git a/Trigger/TrigFTK/TrigFTK_RecAlgs/cmt/requirements b/Trigger/TrigFTK/TrigFTK_RecAlgs/cmt/requirements
deleted file mode 100755
index d13746a08a94fce81b5130a3fca3b255ce112951..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/TrigFTK_RecAlgs/cmt/requirements
+++ /dev/null
@@ -1,38 +0,0 @@
-package TrigFTK_RecAlgs
-
-author Patricia Conde Muino <Patricia.Conde.Munio@cern.ch>
-
-use AtlasPolicy AtlasPolicy-*
-use GaudiInterface     GaudiInterface-* External
-
-# Trigger dependencies:
-use TrigInterfaces      TrigInterfaces-*           Trigger/TrigSteer
-use FTK_DataProviderInterfaces FTK_DataProviderInterfaces-* Trigger/TrigFTK
-
-library TrigFTK_RecAlgs *.cxx components/*.cxx
-
-
-private
-#use AtlasCLHEP              AtlasCLHEP-*          External
-use EventPrimitives      EventPrimitives-*    Event
-use TrkTrack           TrkTrack-*       Tracking/TrkEvent
-use TrkParticleBase    TrkParticleBase-* Tracking/TrkEvent
-use TrkParameters      TrkParameters-*  Tracking/TrkEvent
-use TrkEventPrimitives TrkEventPrimitives-*  Tracking/TrkEvent
-use xAODTracking                xAODTracking-*            Event/xAOD
-
-# dependencies on other vertexing packages
-use VxVertex            VxVertex-*       Tracking/TrkEvent
-
-#linkage of TrigStorage
-use TrigParticle        TrigParticle-*          Trigger/TrigEvent
-
-#apply_pattern dual_use_library files="*.cxx"
-apply_pattern component_library
-apply_pattern declare_python_modules files ="*.py"
-
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-end_private
-##
diff --git a/Trigger/TrigFTK/TrigFTK_RecAlgs/src/TrigFTK_VxPrimary.cxx b/Trigger/TrigFTK/TrigFTK_RecAlgs/src/TrigFTK_VxPrimary.cxx
index e757ac4ce27959ba6aa48fe83e4e635d269daca4..8f73b7e6f13e6c14c207e39dbb0f50e49c906cf9 100755
--- a/Trigger/TrigFTK/TrigFTK_RecAlgs/src/TrigFTK_VxPrimary.cxx
+++ b/Trigger/TrigFTK/TrigFTK_RecAlgs/src/TrigFTK_VxPrimary.cxx
@@ -122,15 +122,31 @@ HLT::ErrorCode TrigFTK_VxPrimary::hltExecute(const HLT::TriggerElement*, HLT::Tr
   if(outputLevel <= MSG::DEBUG)
     msg() << MSG::DEBUG << " In execHLTAlgorithm()" << endmsg;
   
-  xAOD::VertexContainer* theVertexContainer = nullptr;
+  xAOD::VertexContainer* viewVertexContainer = nullptr;
   if (m_useFastVertexTool) {
-    theVertexContainer = m_DataProviderSvc->getFastVertices(m_trackType);
+    viewVertexContainer = m_DataProviderSvc->getFastVertices(m_trackType);
   } else {
-    theVertexContainer = m_DataProviderSvc->getVertexContainer(m_useRefittedTracks);
+    viewVertexContainer = m_DataProviderSvc->getVertexContainer(m_useRefittedTracks);
   }
+  
+
+  // view collection is returned. Create a new collection that is not a view so that it can be persitified
+  // This can be removed once the conversion to use ViewVectors is completed.
+
+  xAOD::VertexContainer* theVertexContainer = new xAOD::VertexContainer();
+  xAOD::VertexAuxContainer    theVertexContainerAux;
+  theVertexContainer->setStore(&theVertexContainerAux);
+  if (viewVertexContainer != nullptr) {
+    for (auto pv =  viewVertexContainer->begin(); pv !=  viewVertexContainer->end(); ++pv) {
+      xAOD::Vertex* vert = new xAOD::Vertex(*(*pv));
+      theVertexContainer->push_back(vert);
+    }
+    delete  viewVertexContainer;
+  }
+
   if ( HLT::OK !=  attachFeature(outputTE, theVertexContainer, m_vertexContainerName) ) {
     msg() << MSG::ERROR << "Could not attach feature to the TE" << endmsg;
-    
+    delete theVertexContainer;
     return HLT::NAV_ERROR;
   }
   
@@ -139,7 +155,8 @@ HLT::ErrorCode TrigFTK_VxPrimary::hltExecute(const HLT::TriggerElement*, HLT::Tr
     msg() << MSG::DEBUG << "Container recorded in StoreGate." << endmsg;
     msg() << MSG::DEBUG << "REGTEST: Container size :" << m_nVertices << endmsg;
   }    
-  
+
+
   size_t privtxcount(0), pileupvtxcount(0);
   unsigned int iv = 0;
   for (auto pv =  theVertexContainer->begin(); pv !=  theVertexContainer->end(); pv++, iv++) {
diff --git a/Trigger/TrigFTK/TrigFTK_RecExample/cmt/requirements b/Trigger/TrigFTK/TrigFTK_RecExample/cmt/requirements
deleted file mode 100755
index 3a3a768d1a05c71004947b34f3e958f8d4b716d4..0000000000000000000000000000000000000000
--- a/Trigger/TrigFTK/TrigFTK_RecExample/cmt/requirements
+++ /dev/null
@@ -1,13 +0,0 @@
-package TrigFTK_RecExample
-
-author John Baines <John.Baines@cern.ch>
-
-use AtlasPolicy AtlasPolicy-*
-
-
-apply_pattern declare_python_modules files="*.py"
-
-branches run share
-
-apply_pattern declare_joboptions files="**.py"
-
diff --git a/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py b/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py
index eaaa94a6adb406e4184d076fc18b4c214593023d..8ae18846b51dc4b477ac780ec97361d079eccf8d 100644
--- a/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py
+++ b/Trigger/TrigFTK/TrigFTK_RecExample/python/TrigFTK_DataProviderSvc_Config.py
@@ -8,161 +8,32 @@ class TrigFTK_DataProviderSvc(FTK_DataProviderSvc) :
     def __init__(self, name = "TrigFTK_DataProviderSvc"):
         print "In FTK_DataProviderSvc_Config.py"  
         FTK_DataProviderSvc.__init__(self, name) 
-        # Track Fitter
-        from TrkGlobalChi2Fitter.TrkGlobalChi2FitterConf import Trk__GlobalChi2Fitter
-        from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator, InDetTrigNavigator, InDetTrigPropagator, \
-             InDetTrigRefitRotCreator,InDetTrigBroadInDetRotCreator, InDetTrigBroadSCT_ClusterOnTrackTool, \
-             InDetTrigUpdator, InDetTrigMaterialUpdator, InDetTrigUpdator, InDetTrigMaterialUpdator
-        from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc
 
-        from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup
         from AthenaCommon.AppMgr import ToolSvc
 
 
-        from TrigInDetConf.TrigInDetRecToolsFTK import InDetTrigTrackFitterFTK, InDetTrigRotCreatorFTK
-
-
-        #from TrkDistributedKalmanFilter.DistributedKalmanFilter_Config import ConfiguredDistributedKalmanFilter
-        #TrigFTK_TrackFitter = ConfiguredDistributedKalmanFilter("TrigFTK_TrackFitter",
-        #    ExtrapTool=InDetTrigExtrapolator,
-        #    ROTCreator=InDetTrigBroadInDetRotCreator,
-        #    )
-
-
-        from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator,InDetTrigTrackSelectorTool,InDetTrigHoleSearchTool
-        from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigTrackSummaryToolSharedHits, InDetTrigPrdAssociationTool 
-
-
-        from InDetTrackSummaryHelperTool.InDetTrackSummaryHelperToolConf import InDet__InDetTrackSummaryHelperTool
-        TrigFTK_TrackSummaryHelperTool = InDet__InDetTrackSummaryHelperTool(name = "TrigFTK_TrackSummaryHelperTool",
-                                                                AssoTool     = InDetTrigPrdAssociationTool,
-                                                                DoSharedHits = False,
-                                                                HoleSearch   = InDetTrigHoleSearchTool,
-                                                                TestBLayerTool = None,
-                                                                PixelToTPIDTool = None,
-                                                                usePixel=True,
-                                                                useSCT=True,
-                                                                useTRT=False
-                                                                )
-
-        ToolSvc += TrigFTK_TrackSummaryHelperTool
-        print "added TrigFTK_TrackSummaryHelperTool to ToolSvc"
-        
-
-        
-        from TrkTrackSummaryTool.TrkTrackSummaryToolConf import Trk__TrackSummaryTool
-        TrigFTK_TrackSummaryTool = Trk__TrackSummaryTool(name = "TrigFTK_TrackSummaryTool",
-                                             InDetSummaryHelperTool = TrigFTK_TrackSummaryHelperTool,
-                                             InDetHoleSearchTool    = None,
-                                             doSharedHits           = False,
-                                             TRT_ElectronPidTool    = None
-                                             )
-        ToolSvc += TrigFTK_TrackSummaryTool
-        print "added TrigFTK_TrackSummaryTool to ToolSvc"
-
-
-        from TrkParticleCreator.TrkParticleCreatorConf import Trk__TrackParticleCreatorTool
-
-
-        TrigFTK_TrackParticleCreatorTool = Trk__TrackParticleCreatorTool( name = "TrigFTK_ParticleCreatorTool",
-                                                         Extrapolator = InDetTrigExtrapolator,
-                                                         TrackSummaryTool = TrigFTK_TrackSummaryTool,
-                                                         KeepParameters = True,
-                                                         ForceTrackSummaryUpdate = False,  #summary update moved (in the slimmer now)
-                                                         )
-        
-        ToolSvc += TrigFTK_TrackParticleCreatorTool
-        print TrigFTK_TrackParticleCreatorTool
-        print " added TrigFTK_TrackParticleCreatorTool to ToolSvc"
-
-        
-        from TrigInDetConf.TrigInDetRecVtxTools import InDetTrigLinFactory, InDetTrigVxEdmCnv
-        from TrigInDetConf.TrigInDetRecVtxTools import InDetTrigLinFactory, InDetTrigVxEdmCnv
-
-        from TrkVertexSeedFinderTools.TrkVertexSeedFinderToolsConf import Trk__ZScanSeedFinder
-        TrigFTK_VtxSeedFinder = Trk__ZScanSeedFinder(name = "TrigFTK_ZScanSeedFinder"
-                                                    #Mode1dFinder = # default, no setting needed
-                                                    )
-        ToolSvc += TrigFTK_VtxSeedFinder
- 
-        from TrkVertexFitterUtils.TrkVertexFitterUtilsConf import Trk__ImpactPoint3dEstimator, Trk__DetAnnealingMaker
-    
-        TrigFTK_ImpactPoint3dEstimator = Trk__ImpactPoint3dEstimator(name         = "TrigFTK_TrkImpactPoint3dEstimator",
-                                                         Extrapolator = InDetTrigExtrapolator,
-                                                         )
+        from TrigInDetConf.TrigInDetRecToolsFTK import InDetTrigTrackFitterFTK, InDetTrigRotCreatorFTK, \
+        TrigFTK_UncertaintyTool,TrigFTK_RawVertexFinderTool,InDetTrigTrackParticleCreatorToolFTK,InDetTrigTrackSummaryToolFTK
+        from InDetTrigRecExample.InDetTrigConfigRecLoadToolsPost import InDetTrigPriVxFinderTool
         
-        ToolSvc += TrigFTK_ImpactPoint3dEstimator
-
- 
-        TrigFTK_AnnealingMaker = Trk__DetAnnealingMaker(name = "TrigFTK_TrkAnnealingMaker")
-        TrigFTK_AnnealingMaker.SetOfTemperatures = [64.,16.,4.,2.,1.5,1.] # not default
-        ToolSvc += TrigFTK_AnnealingMaker
-
-
-        from TrkVertexFitters.TrkVertexFittersConf import Trk__SequentialVertexSmoother
-        TrigFTK_VertexSmoother =  Trk__SequentialVertexSmoother(name="TrigFTK_SequentialVertexSmoother")
-        ToolSvc += TrigFTK_VertexSmoother
-
-
-        from TrkVertexFitters.TrkVertexFittersConf import Trk__AdaptiveVertexFitter
-        TrigFTK_VxFitterTool = Trk__AdaptiveVertexFitter(name                         = "TrigFTK_AdaptiveVxFitterTool",
-                                             SeedFinder                   = TrigFTK_VtxSeedFinder,
-                                             LinearizedTrackFactory       = InDetTrigLinFactory,
-                                             ImpactPoint3dEstimator       = TrigFTK_ImpactPoint3dEstimator,
-                                             AnnealingMaker               = TrigFTK_AnnealingMaker,
-                                             #TrackCompatibilityEstimator = 
-                                             VertexSmoother = TrigFTK_VertexSmoother,
-                                             #VertexUpdator = ,  #does not use any tools?
-                                             #onlyzseed = ,
-                                             )
-
-        TrigFTK_VxFitterTool.XAODConverter = InDetTrigVxEdmCnv
-        ToolSvc += TrigFTK_VxFitterTool
-        
-        from InDetPriVxFinderTool.InDetPriVxFinderToolConf import InDet__InDetIterativePriVxFinderTool
-        TrigFTK_PriVxFinderTool = InDet__InDetIterativePriVxFinderTool(name             = "TrigFTK_PriVxFinderTool",
-                                                                   VertexFitterTool = TrigFTK_VxFitterTool,
-                                                                   TrackSelector    = InDetTrigTrackSelectorTool,
-                                                                   SeedFinder = TrigFTK_VtxSeedFinder,
-                                                                   ImpactPoint3dEstimator = TrigFTK_ImpactPoint3dEstimator,
-                                                                   LinearizedTrackFactory = InDetTrigLinFactory,
-                                                                   useBeamConstraint = True,
-                                                                   significanceCutSeeding = 12,
-                                                                   maximumChi2cutForSeeding = 49,
-                                                                   maxVertices = 200,
-                                                                   InternalEdmFactory =InDetTrigVxEdmCnv
-                                                                   )
-        ToolSvc += TrigFTK_PriVxFinderTool
-
-
-        from FTK_DataProviderSvc.FTK_DataProviderSvcConf import FTK_UncertaintyTool
-        theTrigFTK_UncertaintyTool= FTK_UncertaintyTool(name="TrigFTK_UncertaintyTool")
-        ToolSvc+=theTrigFTK_UncertaintyTool
-
-        from FTK_RecTools.FTK_RecToolsConf import FTK_VertexFinderTool
-        TrigFTK_RawVertexFinderTool=  FTK_VertexFinderTool(name="TrigFTK_RawVertexFinderTool",
-                                                           VertexInternalEdmFactory=InDetTrigVxEdmCnv)
-        ToolSvc+=TrigFTK_RawVertexFinderTool
-
-
-        self.TrackCollectionName= "TrigFTK_TrackCollection"
-        self.TrackParticleContainerName= "TrigFTK_TrackParticleCollection"
-        self.VxContainerName="TrigFTK_VxContainer"
-        self.VertexContainerName="TrigFTK_VertexContainer"	  
-        self.PixelTruthName="TrigFTK_PRD_MultiTruthPixel"
-        self.SctTruthName="TrigFTK_PRD_MultiTruthSCT"
-        self.PixelClusterContainerName= "TrigFTK_PixelClusterContainer"
-        self.SCT_ClusterContainerName= "TrigFTK_SCT_ClusterContainer"
+        self.TrackCollectionName= "FTK_TrackCollection"
+        self.TrackParticleContainerName= "FTK_TrackParticleContainer"
+        self.VxContainerName="notused"
+        self.VertexContainerName="FTK_VertexContainer"	  
+        self.PixelTruthName="FTK_PRD_MultiTruthPixel"
+        self.SctTruthName="FTK_PRD_MultiTruthSCT"
+        self.PixelClusterContainerName= "FTK_PixelClusterContainer"
+        self.SCT_ClusterContainerName= "FTK_SCT_ClusterContainer"
         self.CorrectPixelClusters=True
         self.CorrectSCTClusters=True
         
         
         self.TrackFitter = InDetTrigTrackFitterFTK
-        self.UncertaintyTool=theTrigFTK_UncertaintyTool
-        self.TrackSummaryTool=TrigFTK_TrackSummaryTool
-        self.TrackParticleCreatorTool=TrigFTK_TrackParticleCreatorTool
+        self.UncertaintyTool=TrigFTK_UncertaintyTool
+        self.TrackSummaryTool=InDetTrigTrackSummaryToolFTK
+        self.TrackParticleCreatorTool=InDetTrigTrackParticleCreatorToolFTK
         self.RawVertexFinderTool=TrigFTK_RawVertexFinderTool
-        self.VertexFinderTool=TrigFTK_PriVxFinderTool
+        self.VertexFinderTool=InDetTrigPriVxFinderTool
         self.ROTcreatorTool= InDetTrigRotCreatorFTK 
 
 
diff --git a/Trigger/TrigFake/cmt/requirements b/Trigger/TrigFake/cmt/requirements
deleted file mode 100755
index 1ff2e033af2496bc8b30a1d1530e3b5980f64780..0000000000000000000000000000000000000000
--- a/Trigger/TrigFake/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigFake
-
-author John Baines <j.baines@rl.ac.uk>
-
-use     AtlasPolicy         AtlasPolicy-*
-use     GaudiInterface      GaudiInterface-*        External
-use     TrigSteeringEvent   TrigSteeringEvent-*     Trigger/TrigEvent
-use     TrigSteering        TrigSteering-*          Trigger/TrigSteer
-use     TrigInDetEvent      TrigInDetEvent-*        Trigger/TrigEvent
-#use     EventInfo           EventInfo-*            Event
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-
-private
-use     AtlasCLHEP          AtlasCLHEP-*            External
-use     AtlasHepMC          AtlasHepMC-*            External
-use     StoreGate           StoreGate-*             Control
-use 	TrigConfHLTData     TrigConfHLTData-*       Trigger/TrigConfiguration
-use 	TrigNavigation      TrigNavigation-*        Trigger/TrigEvent
-use     TrigInterfaces      TrigInterfaces-*        Trigger/TrigSteer
-use     TrigT1Interfaces    TrigT1Interfaces-*      Trigger/TrigT1
-use     TrigT1Result        TrigT1Result-*          Trigger/TrigT1
-use     GeneratorObjects    GeneratorObjects-*      Generators
-
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="jobOfragment_TrigFake.*"
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigBjetHypo/CMakeLists.txt
index d7a60622c0413f81bfadfe373c03a0b9479753ca..3bf3fcc3ab1a15868430a868c9b797c9db326a00 100644
--- a/Trigger/TrigHypothesis/TrigBjetHypo/CMakeLists.txt
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/CMakeLists.txt
@@ -35,7 +35,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Trigger/TrigEvent/TrigMuonEvent
                           Trigger/TrigEvent/TrigNavigation
                           Trigger/TrigEvent/TrigParticle
-                          Trigger/TrigEvent/TrigSteeringEvent )
+                          Trigger/TrigEvent/TrigSteeringEvent 
+ 			  Trigger/TrigSteer/DecisionHandling )
 
 # External dependencies:
 find_package( Eigen )
@@ -46,7 +47,7 @@ atlas_add_component( TrigBjetHypo
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} xAODBase xAODTracking GaudiKernel Particle VxSecVertex TrigInDetEvent TrigInterfacesLib AthContainers GeoPrimitives EventInfo EventPrimitives FourMomUtils xAODBTagging xAODCore xAODJet xAODMuon BTaggingLib JetEvent VxVertex TrigCaloEvent TrigMuonEvent TrigNavigationLib TrigParticle TrigSteeringEvent )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${EIGEN_LIBRARIES} xAODBase xAODTracking GaudiKernel Particle VxSecVertex TrigInDetEvent TrigInterfacesLib AthContainers GeoPrimitives EventInfo EventPrimitives FourMomUtils xAODBTagging xAODCore xAODJet xAODMuon BTaggingLib JetEvent VxVertex TrigCaloEvent TrigMuonEvent TrigNavigationLib TrigParticle TrigSteeringEvent DecisionHandlingLib)
 
 # Install files from the package:
 atlas_install_headers( TrigBjetHypo )
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigBjetHypo/cmt/requirements
deleted file mode 100755
index e937f078e489b445b2384edcfed38c54a1423b47..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigBjetHypo/cmt/requirements
+++ /dev/null
@@ -1,51 +0,0 @@
-package TrigBjetHypo
-
-author Andrea Coccaro <Andrea.Coccaro@ge.infn.it>
-
-
-# ============================================================================================
-public
-
-use 	AtlasPolicy         	AtlasPolicy-*
-use 	GaudiInterface 		GaudiInterface-* 		External
-use     TrigInterfaces          TrigInterfaces-*                Trigger/TrigSteer
-use 	TrigTrackJetFinderTool  TrigTrackJetFinderTool-*	Trigger/TrigTools
-use     Particle		Particle-*			Reconstruction
-use     VxSecVertex             VxSecVertex-*                   Tracking/TrkEvent
-use     TrigInDetEvent          TrigInDetEvent-*                Trigger/TrigEvent
-use     xAODBase                xAODBase-*                  	Event/xAOD
-use     xAODTracking            xAODTracking-*             	Event/xAOD
-use     JetCalibTools           JetCalibTools-*                 Reconstruction/Jet
-
-# ============================================================================================
-private
-
-use     EventInfo               EventInfo-*             	Event
-use     AthContainers           AthContainers-*                 Control
-use	GeoPrimitives		GeoPrimitives-*			DetectorDescription
-use	EventPrimitives		EventPrimitives-*		Event
-use     FourMomUtils            FourMomUtils-*                  Event
-use 	AtlasROOT      		AtlasROOT-*         		External
-use     InDetBeamSpotService    InDetBeamSpotService-*          InnerDetector/InDetConditions
-use     JetEvent                JetEvent-*              	Reconstruction/Jet
-use 	VxVertex  	        VxVertex-* 	      		Tracking/TrkEvent
-use	TrigCaloEvent		TrigCaloEvent-*			Trigger/TrigEvent
-use     TrigMuonEvent           TrigMuonEvent-*                 Trigger/TrigEvent
-use     TrigParticle	        TrigParticle-*                  Trigger/TrigEvent
-use 	TrigSteeringEvent       TrigSteeringEvent-*		Trigger/TrigEvent
-use 	TrigNavigation		TrigNavigation-*		Trigger/TrigEvent
-use     xAODJet                 xAODJet-*                       Event/xAOD
-use     xAODMuon                xAODMuon-*                       Event/xAOD
-use     xAODBTagging            xAODBTagging-*              	Event/xAOD
-use 	xAODCore		xAODCore-*			Event/xAOD  
-use     BTagging                BTagging-*                      PhysicsAnalysis/JetTagging/JetTagAlgs
-use     xAODTrigger             xAODTrigger-*                   Event/xAOD/
-
-# ============================================================================================
-public
-
-library TrigBjetHypo *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/doc/packagedoc.h b/Trigger/TrigHypothesis/TrigBjetHypo/doc/packagedoc.h
index 088b59a2451483fc709d9597ff52ee449f900218..78a952e94cc800ea8b8c27b43bf1e8fb951b1a4a 100644
--- a/Trigger/TrigHypothesis/TrigBjetHypo/doc/packagedoc.h
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/doc/packagedoc.h
@@ -32,4 +32,3 @@ In order to optimize b-tagging performance keeping the reconstruction efficiency
 
 
 */
-
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetHypoTool.py b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetHypoTool.py
new file mode 100644
index 0000000000000000000000000000000000000000..d89ef71307322593ab7e888de9e4e6be5f9ea2d5
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/python/TrigBjetHypoTool.py
@@ -0,0 +1,166 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+from TrigBjetHypo.TrigBjetHypoConf import TrigBjetHypoTool
+
+from AthenaCommon.Logging import logging
+from AthenaCommon.SystemOfUnits import GeV
+
+#### Not sure how to deal with instances here, I left only "split" since these are used now, and for simplicity
+def getBjetHypoSplitNoCutInstance( instance):
+    return BjetHypoSplitNoCut( instance=instance, name=instance+"BjetHypoSplitNoCut" )
+
+def getBjetHypoSplitInstance( instance, version, cut ):
+    return BjetHypoSplit( instance=instance, cut=cut, version=version, name=instance+"BjetHypoSplit"+"_"+cut+"_"+version )
+
+
+
+
+### Split instances
+
+class BjetHypoSplitNoCut (TrigBjetHypo):
+    __slots__ = []
+    
+    def __init__(self, instance, name):
+        super( BjetHypoSplitNoCut, self ).__init__( name )
+        
+        mlog = logging.getLogger('BjetHypoConfig.py')
+                
+        AllowedInstances = ["EF", "MuJetChain"]
+
+##        self.JetKey = "SplitJet"
+        
+        if instance in AllowedInstances :
+
+## Let's leave mu-jet chains for later if needed            
+##            if instance=="MuJetChain" :
+##                self.JetKey = "FarawayJet"
+##                instance = "EF"
+                
+            if instance=="EF" :
+                self.AcceptAll             = True
+                self.Instance              = "EF"
+                self.UseBeamSpotFlag       = False
+                self.OverrideBeamSpotValid = True
+                from TrigBjetHypo.TrigBjetHypoMonitoring import TrigEFBjetHypoValidationMonitoring, TrigEFBjetHypoOnlineMonitoring
+                validation = TrigEFBjetHypoValidationMonitoring()
+                online     = TrigEFBjetHypoOnlineMonitoring()
+        
+            from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
+            time = TrigTimeHistToolConfig("TimeHistogramForTrigBjetHypo")
+            time.TimerHistLimits = [0,0.4]
+
+            self.AthenaMonTools = [ time, validation, online ]
+
+        else :
+            mlog.error("Instance "+instance+" is not supported!")
+            return None
+
+
+
+class BjetHypoSplit (TrigBjetHypo):
+    __slots__ = []
+    
+    def __init__(self, instance, version, cut, name):
+        super( BjetHypoSplit, self ).__init__( name )
+        
+        mlog = logging.getLogger('BjetHypoConfig.py')
+        
+        AllowedCuts      = ["loose","medium","tight","offloose","offmedium","offtight",
+                            "mv2c2040","mv2c2050","mv2c2060","mv2c2070","mv2c2077","mv2c2085",
+                            "mv2c1040","mv2c1050","mv2c1060","mv2c1070","mv2c1077","mv2c1085" ]
+        AllowedVersions  = ["2012","2015","2017"]
+        AllowedInstances = ["EF", "MuJetChain"]
+        
+        if instance not in AllowedInstances :
+            mlog.error("Instance "+instance+" is not supported!")
+            return None
+        
+        if version not in AllowedVersions :
+            mlog.error("Version "+version+" is not supported!")
+            return None
+        
+        if cut not in AllowedCuts :
+            mlog.error("Cut "+cut+" is not supported!")
+            return None
+
+        self.JetKey = "SplitJet"
+        if instance=="MuJetChain" :
+            self.JetKey = "FarawayJet"
+            instance = "EF"
+
+        if instance=="EF" :
+            self.AcceptAll       = False
+            self.Instance        = "EF"
+            self.UseBeamSpotFlag = False
+        
+        if instance=="EF" :
+            from TrigBjetHypo.TrigBjetHypoMonitoring import TrigEFBjetHypoValidationMonitoring, TrigEFBjetHypoOnlineMonitoring
+            validation = TrigEFBjetHypoValidationMonitoring()
+            online     = TrigEFBjetHypoOnlineMonitoring()
+        
+        from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
+        time = TrigTimeHistToolConfig("TimeHistogramForTrigBjetHypo")
+        time.TimerHistLimits = [0,0.4]
+        
+        self.AthenaMonTools = [ time, validation, online ]
+            
+        if instance=="EF" :
+            if version=="2012" :
+                self.MethodTag = "COMB"
+                if cut=="loose":
+                    self.CutXCOMB = 0.25
+                elif cut=="medium":
+                    self.CutXCOMB = 1.25
+                elif cut=="tight":
+                    self.CutXCOMB = 2.65
+
+            if version=="2015" :
+                self.MethodTag = "MV2c20"
+                # These are the offline working points
+                if cut=="mv2c2040":
+                    # Actually XX% efficient
+                    self.CutMV2c20 =  0.75
+                elif cut=="mv2c2050":
+                    # Actually XX% efficient
+                    self.CutMV2c20 =  0.5
+                elif cut=="mv2c2060":
+                    # Actually 62% efficient
+                    self.CutMV2c20 = -0.0224729
+                elif cut=="mv2c2070":
+                    # Actually 72% efficient
+                    self.CutMV2c20 = -0.509032
+                elif cut=="mv2c2077":
+                    # Actually 79% efficient
+                    self.CutMV2c20 = -0.764668
+                elif cut=="mv2c2085":
+                    # Actually 87% efficient
+                    self.CutMV2c20 = -0.938441
+
+            if version=="2017" :
+                self.MethodTag = "MV2c10"
+                # These are the offline working points
+                if cut=="mv2c1040":
+                    # Actually ~45% efficient
+                    self.CutMV2c10 =  0.978
+                elif cut=="mv2c1050":
+                    # Actually ~55% efficient
+                    self.CutMV2c10 =  0.948
+                elif cut=="mv2c1060":
+                    # Actually ~65% efficient
+                    self.CutMV2c10 =  0.847
+                elif cut=="mv2c1070":
+                    # Actually ~75% efficient
+                    self.CutMV2c10 =  0.580
+                elif cut=="mv2c1077":
+                    # Actually ~80% efficient
+                    self.CutMV2c10 =  0.162
+                elif cut=="mv2c1085":
+                    # Actually ~90% efficient
+                    self.CutMV2c10 = -0.494
+
+                    
+
+
+
+
+
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetFex.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetFex.cxx
index edc6939a07936b1a1b2d0138342811c0dc1433cf..be6591590861fecb9b653d0effae6352f656b3e1 100755
--- a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetFex.cxx
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetFex.cxx
@@ -723,7 +723,7 @@ bool TrigBjetFex::trackSel(const xAOD::TrackParticle*& track, unsigned int i, in
   uint8_t nPixHits    = 0;  
   uint8_t nSCTHits    = 0; 
 
-  //track->summaryValue(nBlayerHits,          xAOD::numberOfBLayerHits);
+  //track->summaryValue(nBlayerHits,          xAOD::numberOfInnermostPixelLayerHits);
   track->summaryValue(nInnermostHits,       xAOD::numberOfInnermostPixelLayerHits);
   track->summaryValue(nNextToInnermostHits, xAOD::numberOfNextToInnermostPixelLayerHits);
   track->summaryValue(nPixHits,             xAOD::numberOfPixelHits);
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..be58107a9fd076a2eb99d736f297335c14d11fb4
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.cxx
@@ -0,0 +1,96 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "GaudiKernel/Property.h"
+#include "TrigBjetHypoAlg.h"
+
+using namespace TrigCompositeUtils;
+
+TrigBjetHypoAlg::TrigBjetHypoAlg( const std::string& name, 
+				      ISvcLocator* pSvcLocator ) : 
+  ::AthReentrantAlgorithm( name, pSvcLocator ),
+  m_hypoTools( this ),
+  m_roisKey( "RoIs" ),
+  m_bTagKey( "BTagging" ),
+  m_decisionsKey( "BjetHypoDecisions" ) {
+
+  declareProperty( "HypoTools", m_hypoTools );
+  declareProperty( "BTagging", m_bTagKey );
+  declareProperty( "RoIs", m_roisKey );
+  declareProperty( "Decisions", m_decisionsKey ); 
+}
+
+TrigBjetHypoAlg::~TrigBjetHypoAlg()
+{}
+
+StatusCode TrigBjetHypoAlg::initialize()
+{
+  ATH_MSG_INFO ( "Initializing " << name() << "..." );
+  CHECK( m_hypoTools.retrieve() );
+  CHECK( m_bTagKey.initialize() );
+  CHECK( m_roisKey.initialize() );
+  CHECK( m_decisionsKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigBjetHypoAlg::finalize()
+{
+  ATH_MSG_INFO ( "Finalizing " << name() << "..." );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigBjetHypoAlg::execute_r( const EventContext& context ) const
+{  
+  ATH_MSG_DEBUG ( "Executing " << name() << "..." );
+  auto bTagHandle = SG::makeHandle( m_bTagKey, context );
+  auto roisHandle = SG::makeHandle( m_roisKey, context );
+  
+  auto decisions = std::make_unique<DecisionContainer>();
+  auto aux = std::make_unique<DecisionAuxContainer>();
+  decisions->setStore( aux.get() );
+
+  // prepare decision storage ( we could simplify it )
+  // Lidija: should be checked once more
+  size_t counter = 0;
+  // ---->>>>>>
+  for ( auto bTagIter =   bTagHandle->begin();  bTagIter != bTagHandle->end(); ++bTagIter, ++counter ) {
+    auto d = newDecisionIn( decisions.get() );
+    d->setObjectLink( "feature", ElementLink<xAOD::BTaggingContainer>( m_bTagKey.key(), counter ) );
+    d->setObjectLink( "roi", ElementLink<TrigRoiDescriptorCollection>( m_roisKey.key(), counter ) );
+  }
+
+
+  size_t index = 0;
+  for ( ; index < decisions->size(); ++index ) {
+
+    auto bTag = bTagHandle->at( index );
+    auto roiDescriptor = roisHandle->at( index );
+    auto decision = decisions->at( index );
+
+
+    for ( auto tool : m_hypoTools ) {
+      // interface of the tool needs to be suitable for current system, so no TrigComposite
+      // also no support for the multi-electrons yet ( will be additional method )
+      if ( tool->decide( bTag, roiDescriptor ) ) {   
+	addDecisionID( tool->decisionId(), decision );	  
+	ATH_MSG_DEBUG( " + " << tool->name() );
+      } else {
+	ATH_MSG_DEBUG( " - " << tool->name() );
+      }
+    }
+    
+  }
+
+  {
+    auto handle =  SG::makeHandle( m_decisionsKey, context );
+    CHECK( handle.record( std::move( decisions ), std::move( aux ) ) );
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
+
+
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.h b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..121959384ec393b12049fbc27ad683889e09eeaf
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoAlg.h
@@ -0,0 +1,50 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef TRIGBJETHYPO_TRIGBJETHYPOALG_H
+#define TRIGBJETHYPO_TRIGBJETHYPOALG_H 1
+
+#include <string>
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+
+#include "xAODBTagging/BTaggingAuxContainer.h"
+#include "xAODBTagging/BTaggingContainer.h"
+#include "xAODBTagging/BTagging.h"
+
+
+#include "TrigBjetHypoTool.h"
+
+/**
+ * @class Implements b-jet selection for the new HLT framework
+ * @brief 
+ **/
+
+class TrigBjetHypoAlg
+  : public ::AthReentrantAlgorithm
+{ 
+ public: 
+
+  TrigBjetHypoAlg( const std::string& name, ISvcLocator* pSvcLocator );
+
+  virtual ~TrigBjetHypoAlg(); 
+
+  virtual StatusCode  initialize() override;
+  virtual StatusCode  execute_r( const EventContext& context ) const override;
+  virtual StatusCode  finalize() override;
+ 
+ private: 
+  TrigBjetHypoAlg();
+  ToolHandleArray< TrigBjetHypoTool > m_hypoTools;
+
+  // ----->>>>>>>
+  SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roisKey;
+  SG::ReadHandleKey< xAOD::BTaggingContainer> m_bTagKey;
+  SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_decisionsKey;
+ 
+}; 
+
+
+#endif //> !TRIGBJETHYPO_TRIGBJETHYPOALG_H
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoTool.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoTool.cxx
new file mode 100755
index 0000000000000000000000000000000000000000..20e173de479f5adf5c662151a53b76cca3cd684f
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoTool.cxx
@@ -0,0 +1,230 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ************************************************
+//
+// NAME:     TrigBjetHypoTool.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigBjetHypoTool
+//
+// AUTHOR:   Lidija Zivkovic
+// EMAIL:    Lidija.Zivkovic@cern.ch
+// 
+// ************************************************
+
+#include "DecisionHandling/HLTIdentifier.h"
+
+#include "TrigBjetHypoTool.h"
+#include "InDetBeamSpotService/IBeamCondSvc.h"
+
+
+TrigBjetHypoTool::TrigBjetHypoTool( const std::string& type, 
+		    const std::string& name, 
+		    const IInterface* parent ) :
+  AthAlgTool( type, name, parent ),
+  m_id( name ),
+  m_monTool( "GenericMonitoringTool/MOnTool", this )
+{
+  declareProperty ("AcceptAll", m_acceptAll         );
+  //  declareProperty ("JetKey",    m_jetKey     = ""   ); //"EFJet" or "" needed for default config, "SplitJet" for new config - not sure if needed, with some changes new configuration may be established
+  declareProperty ("CutMV2c20", m_xcutMV2c20 = -20  );
+  declareProperty ("CutMV2c10", m_xcutMV2c10 = -20  );
+  declareProperty ("MethodTag", m_methodTag  = ""   );
+  declareProperty ("Instance",  m_instance          );
+
+  declareProperty ("UseBeamSpotFlag", m_useBeamSpotFlag = false);
+  declareProperty ("OverrideBeamSpotValid", m_overRideBeamSpotValid = false);
+
+  declareProperty( "MonTool", m_monTool=ToolHandle<GenericMonitoringTool>( "", this ) );
+
+
+}
+
+
+// -----------------------------------------------------------------------------------------------------------------
+
+
+TrigBjetHypoTool::~TrigBjetHypoTool() {}
+
+
+// -----------------------------------------------------------------------------------------------------------------
+
+StatusCode TrigBjetHypoTool::initialize()  {
+
+  // Get message service 
+ 
+  ATH_MSG_INFO("Initializing TrigBjetHypoTool");
+
+ 
+  ATH_MSG_DEBUG(  "declareProperty review:"  );
+  ATH_MSG_DEBUG(  " AcceptAll = "   <<     m_acceptAll        ); 
+  ATH_MSG_DEBUG(  " MethodTag = "   <<     m_methodTag        ); 
+  ATH_MSG_DEBUG(  " Instance = "    <<     m_instance         ); 
+  ATH_MSG_DEBUG(  " UseBeamSpotFlag = " <<  m_useBeamSpotFlag  ); 
+  //  ATH_MSG_DEBUG(  " JetKey = "     <<      m_jetKey           ); 
+
+  if (m_xcutMV2c20 != -20) ATH_MSG_DEBUG( " CutMV2c20 = " <<  m_xcutMV2c20  ); 
+  if (m_xcutMV2c10 != -20) ATH_MSG_DEBUG( " CutMV2c10 = " <<  m_xcutMV2c10  ); 
+ 
+  ATH_MSG_DEBUG( "Tool configured for chain/id: " << m_id  );
+  return StatusCode::SUCCESS;
+
+}
+
+
+// ----------------------------------------------------------------------------------------------------------------- 
+
+////    I am here
+bool TrigBjetHypoTool::decide(  const xAOD::BTagging* bTag, const TrigRoiDescriptor* roiDescriptor )  const {
+//bool TrigBjetHypoTool::decide(  const xAOD::BTaggingContainer* trigBTaggingContainer, const TrigRoiDescriptor* roiDescriptor )  const {
+  bool pass = false;
+
+  ATH_MSG_DEBUG(  "Executing TrigBjetHypoTool"  );
+
+  using namespace Monitored;
+  // initialise monitoring variables 
+  auto PassedCuts   = MonitoredScalar::declare<int>( "CutCounter", -1 );
+  auto monitorIt = MonitoredScope::declare( m_monTool, PassedCuts );
+  // when leaving scope it will ship data to monTool
+  PassedCuts = PassedCuts + 1; //got called (data in place)
+
+  // AcceptAll declare property setting - no need to save it in TrigPassBit, but instead it will go into decission, where we can save also properties and attach them to objects
+    if (m_acceptAll) 
+      ATH_MSG_DEBUG(  "REGTEST: AcceptAll property is set: taking all events"  );
+    else 
+      ATH_MSG_DEBUG(  "REGTEST: AcceptAll property not set: applying the selection"  );
+  
+
+  // Retrieve beamspot information - check if this is going to be changed
+  if (m_useBeamSpotFlag) {
+
+    IBeamCondSvc* iBeamCondSvc; 
+    StatusCode sc = service("BeamCondSvc", iBeamCondSvc);
+    
+    if (sc.isFailure() || iBeamCondSvc == 0) {
+      
+      ATH_MSG_WARNING(  "Could not retrieve Beam Conditions Service. "  );
+      
+    } else {
+
+      int beamSpotStatus = 0;
+      int beamSpotBitMap = iBeamCondSvc->beamStatus();    
+
+      beamSpotStatus = ((beamSpotBitMap & 0x4) == 0x4);  
+      if (beamSpotStatus) beamSpotStatus = ((beamSpotBitMap & 0x3) == 0x3);
+      
+      if (!beamSpotStatus && !m_overRideBeamSpotValid) {
+
+	PassedCuts=0;
+	pass = false;
+	
+	return pass;
+      }
+    }
+  }
+
+  // to protect if there is no RoI? Our RoI is jet, one should be careful here
+
+  ATH_MSG_DEBUG( "RoI ID = "   << roiDescriptor->roiId()
+                 << ": Eta = "      << roiDescriptor->eta()
+                 << ", Phi = "      << roiDescriptor->phi() );
+
+  //  here
+  bool result = false;
+
+
+  // Need to check if Btagging is retereived
+
+  // to separate bad input TE and true behaviour 
+  PassedCuts=1;
+ 
+  // Let's try without a loop over container and see if this is done in Alg? 
+  //  auto trigBTagging = trigBTaggingContainer->begin();
+  //  auto trigBTaggingEnd = trigBTaggingContainer->end();
+
+  // Loop over EFBjets and perform cut 
+// Loop over EFBjets and perform cut 
+  if (m_methodTag == "MV2c20") {
+
+    //    for ( ; trigBTagging != trigBTaggingEnd; trigBTagging++) { 
+
+    //     double x = (*trigBTagging)->auxdata<double>("MV2c20_discriminant");
+    double x = bTag->auxdata<double>("MV2c20_discriminant");
+
+      ATH_MSG_DEBUG(" MV2c20 x =  " << x);
+       if(x>m_xcutMV2c20) {
+	//HLT::markPassing(bitsEF, (*trigBTagging), trigBTaggingContainer);
+	 //	xBits->markPassing((*trigBTagging),trigBTaggingContainer,true);
+	ATH_MSG_DEBUG("  ==> Passed ");
+	result = true;
+      }
+      else {
+	ATH_MSG_DEBUG("  ==> Failed ");
+      }
+    }
+  //  }
+  else if (m_methodTag == "MV2c10") {
+
+    //    for ( ; trigBTagging != trigBTaggingEnd; trigBTagging++) {
+
+    //      double x = (*trigBTagging)->auxdata<double>("MV2c10_discriminant");
+    double x = bTag->auxdata<double>("MV2c10_discriminant");
+
+       ATH_MSG_DEBUG(" MV2c10 x =  " << x);
+      if(x>m_xcutMV2c10) {
+        //HLT::markPassing(bitsEF, (*trigBTagging), trigBTaggingContainer);
+	//        xBits->markPassing((*trigBTagging),trigBTaggingContainer,true);
+	ATH_MSG_DEBUG("  ==> Passed ");
+        result = true;
+      }
+      else {
+	ATH_MSG_DEBUG("  ==> Failed ");
+      }
+    }
+  //  } 
+ 
+
+  if(result) PassedCuts=PassedCuts+1;
+  pass = result;
+  
+  // Print trigger decision 
+  if (m_acceptAll) {
+    ATH_MSG_DEBUG("REGTEST: Trigger decision is 1");
+  } else {
+    ATH_MSG_DEBUG("REGTEST: Trigger decision is " << pass);
+  }
+
+
+  if (m_acceptAll) {
+    PassedCuts = 2;
+    pass = true;
+    //xBits->markPassing((*trigBTagging),trigBTaggingContainer,true);
+    //return pass;
+  //   for ( ; trigBTagging != trigBTaggingEnd; trigBTagging++)
+  //     xBits->markPassing((*trigBTagging),trigBTaggingContainer,true);
+   }
+
+  // Print TrigPassBits to outputTE 
+  //if (attachBits(outputTE, bitsEF, "EFBjets") != pass) {
+  //  msg() << MSG::ERROR << "Problem attaching TrigPassBits for b-jets" << );
+  //}
+    //   if(attachFeature(outputTE, xBits.release(),"passbits") != pass)
+   //  ATH_MSG_ERROR("Could not store TrigPassBits! ");
+
+   // if (msgLvl() <= ATH_MSG_DEBUG()
+   //    msg() << ATH_MSG_DEBUG( << "TrigPassBits was saved" << ); 
+
+
+  return pass;
+}
+
+
+// -----------------------------------------------------------------------------------------------------------------
+
+
+StatusCode TrigBjetHypoTool::finalize()  {
+
+  ATH_MSG_INFO( "Finalizing TrigBjetHypoTool" );
+  return StatusCode::SUCCESS;
+}
+
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoTool.h b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoTool.h
new file mode 100755
index 0000000000000000000000000000000000000000..5907547b17ba95071f2f8ee9cc2c38751c23dbd6
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/TrigBjetHypoTool.h
@@ -0,0 +1,132 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ************************************************
+//
+// NAME:     TrigBjetHypoTool.h
+// PACKAGE:  Trigger/TrigHypothesis/TrigBjetHypo
+//
+// AUTHOR:   Lidija Zivkovic
+// EMAIL:    Lidija.Zivkovic@ge.infn.it
+// 
+// ************************************************
+
+#ifndef TRIGBJETHYPO_TRIGBJETHYPOTOOL_H
+#define TRIGBJETHYPO_TRIGBJETHYPOTOOL_H 1
+
+// This is in current hypo, not sure if needed
+//#include "TrigInterfaces/HypoAlgo.h"
+
+#include "CLHEP/Units/SystemOfUnits.h"
+#include "TrigSteeringEvent/TrigRoiDescriptor.h"
+#include "AthenaMonitoring/GenericMonitoringTool.h"
+#include "xAODBTagging/BTaggingAuxContainer.h"
+#include "xAODBTagging/BTaggingContainer.h"
+#include "xAODBTagging/BTagging.h"
+
+// Are these new?
+#include "DecisionHandling/HLTIdentifier.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+#include "AthenaBaseComps/AthAlgTool.h" 
+
+
+//Not sure if these are needed, thus commeneted
+/* class TrigEFBjetContainer; */
+/* class TrigTimerSvc; */
+/* class TriggerElement; */
+
+
+static const InterfaceID IID_TrigBjetHypoTool("TrigBjetHypoTool", 1, 0);
+
+
+/**
+ * @brief Hypo class for HLT b-jet selection.
+ *
+ * @author Andrea Coccaro <Andrea.Coccaro@ge.infn.it>
+ *
+ * This is the base hypothesis class for the b-jet selection. 
+ * Selection can be performed using different likelihood methods or a track-based chi2 method (CHI2), all implemented in the TrigBjetFex class.
+ *
+ * The different likelihood methods implemented are:
+ * - significance of longitudinal impact parameter (IP1D);
+ * - significance of transverese impact parameter (IP2D);
+ * - 2D combination of the track-based methods (IP3D);
+ * - invariant mass of tracks linked to the secondary vertex (MVTX);
+ * - energy fraction of the secondary vertex (EVTX);
+ * - number of tracks lined to the secondary vertex (NVTX);
+ * - 3D combination of the vertex-based methods (SVTX);
+ * - combination of the two likelihoods based on tracks and secondary vertex informations (COMB).
+ *
+ * Selection can be performed using these different taggers: CHI2, IP2D, IP3D or COMB.
+ */
+
+
+class TrigBjetHypoTool : virtual public ::AthAlgTool {
+
+ public:
+
+  /** @brief Constructor. */
+  TrigBjetHypoTool (const std::string& type,
+		const std::string& name,
+		const IInterface* parent );
+  /** @brief Destructor. */
+  virtual ~TrigBjetHypoTool ();
+
+  StatusCode initialize() override;
+  StatusCode finalize() override;
+
+  static const InterfaceID& interfaceID();
+
+  TrigCompositeUtils::DecisionID decisionId() const {
+    return m_id.numeric();
+  }
+
+ /**
+   * @brief decides upon a single object
+   * Note it is for a reason a non-virtual method, it is an interface in gaudi sense and implementation.
+   * There will be many tools called often to perform this quick operation and we do not want to pay for polymorphism which we do not need to use.
+   **/
+  bool decide(  const xAOD::BTagging* bTag, const TrigRoiDescriptor* roiDescriptor )  const;  
+  //  bool decide(  const xAOD::BTaggingContainer* trigBTaggingContainer, const TrigRoiDescriptor* roiDescriptor )  const;  
+
+
+ private:
+
+  HLT::Identifier m_id;
+
+  //  std::string m_jetKey; // not sure if needed, with some changes new configuration may be established
+
+  /** @brief DeclareProperty: if acceptAll flag is set to true, every event is taken. */ 
+  bool m_acceptAll;
+  /** @brief DeclareProperty: list of likelihood methods to be effectively used to perform the selection. */
+  std::string m_methodTag; 
+  /** @brief DeclareProperty: lower bound of the discriminant variable to be selected (if flag acceptAll is set to false) for MV2 tagger. */
+  float m_xcutMV2c20;
+  float m_xcutMV2c10;
+
+
+  // Not sure if needed
+  /** @brief DeclareProperty: string corresponding to the trigger level in which the algorithm is running. */
+  std::string m_instance;
+
+  /** @brief to check the beam spot flag status. */
+  bool m_useBeamSpotFlag;
+
+ /** @brief Overide the requirement that the BS is valid. */
+  /** @brief Used to not apply the correction to the GSC chains */
+  bool m_overRideBeamSpotValid;
+
+
+  /** @brief DeclareProperty: to monitor method used to perform the cut. */
+  //  float m_monitorMethod;
+  ToolHandle<GenericMonitoringTool> m_monTool;
+};
+
+inline const InterfaceID& TrigBjetHypoTool::interfaceID()
+{
+   return IID_TrigBjetHypoTool;
+}
+
+#endif // !TRIGBJETHYPO_TRIGBJETHYPOTOOL_H
+
diff --git a/Trigger/TrigHypothesis/TrigBjetHypo/src/components/TrigBjetHypo_entries.cxx b/Trigger/TrigHypothesis/TrigBjetHypo/src/components/TrigBjetHypo_entries.cxx
index d1dd5e581129c7226b6f5070c36059755aaf3ebb..9af8473249c07f86fd6929b036c5fd584f16735d 100755
--- a/Trigger/TrigHypothesis/TrigBjetHypo/src/components/TrigBjetHypo_entries.cxx
+++ b/Trigger/TrigHypothesis/TrigBjetHypo/src/components/TrigBjetHypo_entries.cxx
@@ -10,6 +10,9 @@
 #include "TrigBjetHypo/TrigSuperRoiBuilderAllTE.h"
 #include "TrigBjetHypo/TrigBjetEtHypo.h"
 #include "TrigBjetHypo/TrigFarawayJetFinderAllTE.h"
+#include "../TrigBjetHypoAlg.h"
+#include "../TrigBjetHypoTool.h"
+
 
 DECLARE_ALGORITHM_FACTORY( TrigBjetHypo )
 DECLARE_ALGORITHM_FACTORY( TrigBjetFex )
@@ -22,6 +25,9 @@ DECLARE_ALGORITHM_FACTORY( TrigJetSplitterAllTE )
 DECLARE_ALGORITHM_FACTORY( TrigSuperRoiBuilderAllTE )
 DECLARE_ALGORITHM_FACTORY( TrigBjetEtHypo )
 DECLARE_ALGORITHM_FACTORY( TrigFarawayJetFinderAllTE )
+DECLARE_ALGORITHM_FACTORY( TrigBjetHypoAlg )
+DECLARE_TOOL_FACTORY( TrigBjetHypoTool )
+
 
 DECLARE_FACTORY_ENTRIES( TrigBjetHypo ) { 
 
@@ -36,5 +42,8 @@ DECLARE_FACTORY_ENTRIES( TrigBjetHypo ) {
     DECLARE_ALGORITHM( TrigSuperRoiBuilderAllTE )
     DECLARE_ALGORITHM( TrigBjetEtHypo )
     DECLARE_ALGORITHM( TrigFarawayJetFinderAllTE )
+    DECLARE_ALGORITHM( TrigBjetHypoAlg )
+    DECLARE_TOOL( TrigBjetHypoTool )
+
 
 }
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigBphysHypo/cmt/requirements
deleted file mode 100755
index e7817c6797cacf7419fd40d5e80e4048e8590935..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigBphysHypo/cmt/requirements
+++ /dev/null
@@ -1,57 +0,0 @@
-package TrigBphysHypo
-
-author Natalia Panikashvili <Natalia.Panikashvili@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-private
-use  GaudiInterface             GaudiInterface-*                External
-use  DataModel                DataModel-*                Control
-use  TrigCaloEvent              TrigCaloEvent-*                 Trigger/TrigEvent
-use  TrigInDetEvent             TrigInDetEvent-*                Trigger/TrigEvent
-use  TrigInDetToolInterfaces    TrigInDetToolInterfaces-*       Trigger/TrigTools
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  TrigMuonEvent              TrigMuonEvent-*                 Trigger/TrigEvent
-use  TrigParticle               TrigParticle-*                  Trigger/TrigEvent
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigT1Interfaces           TrigT1Interfaces-*              Trigger/TrigT1
-use  TrigNavigation             TrigNavigation-*                Trigger/TrigEvent
-use  xAODTrigMuon               xAODTrigMuon-*                  Event/xAOD
-use  xAODTrigger                xAODTrigger-*                   Event/xAOD
-#private
-use  TrigTimeAlgs               TrigTimeAlgs-*                  Trigger/TrigTools
-use  TrkTrack                   TrkTrack-*                      Tracking/TrkEvent
-use  xAODMuon                   xAODMuon-*                      Event/xAOD
-use xAODTrigBphys          xAODTrigBphys-*          Event/xAOD
-use TrigBphysicsEvent   TrigBphysicsEvent-*          Trigger/TrigEvent
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  AthenaKernel               AthenaKernel-*                  Control
-use  AtlasCLHEP                 AtlasCLHEP-*                    External
-use  AtlasROOT                  AtlasROOT-*                     External
-use  EventInfo                  EventInfo-*                     Event
-use  GeneratorObjects           GeneratorObjects-*              Generators
-use  GeoPrimitives              GeoPrimitives-*                 DetectorDescription
-use  InDetBeamSpotService       InDetBeamSpotService-*          InnerDetector/InDetConditions
-use  Particle                   Particle-*                      Reconstruction
-use  StoreGate                  StoreGate-*                     Control
-use  TrkParameters              TrkParameters-*                 Tracking/TrkEvent
-use  TrkVKalVrtFitter           TrkVKalVrtFitter-*              Tracking/TrkVertexFitter
-use  VxVertex                   VxVertex-*                      Tracking/TrkEvent
-use  xAODEventInfo              xAODEventInfo-*                 Event/xAOD
-use  xAODTracking               xAODTracking-*                  Event/xAOD
-use  FourMomUtils	        FourMomUtils-*		        Event
-use  xAODBase 			xAODBase-*   			Event/xAOD
-end_private
-
-
-
-#branches TrigBphysHypo src
-
-library TrigBphysHypo *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_runtime_extras extras="*.xml *.sh *.cfg *.data"
-apply_pattern declare_joboptions files="TriggerConfig*.py TrigBphysHypo*.py jobO*.py"
-apply_pattern declare_python_modules files="*.py"
-
-
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/doc/packagedoc.h b/Trigger/TrigHypothesis/TrigBphysHypo/doc/packagedoc.h
index 8d802284ea7ae8163f0dcee512cd35e55a26679b..3d2c23724fd708725ce9b4e2e24542bc48582b8e 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/doc/packagedoc.h
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/doc/packagedoc.h
@@ -20,20 +20,6 @@ TrigL2JpsieeFex.cxx and TrigL2JpsieeHypo.cxx :      Select B decays with Jpsi->e
 
 JpsiHypo.cxx  :                   Select Jpsi->mumu decays after TrigDiMuon from MuonHypo package.
 
-@ref used_TrigBphysHypo
 
-@ref requirements_TrigBphysHypo
 
 */
-
-/**
-@page used_TrigBphysHypo Used Packages
-*/
-
-/**
-@page requirements_TrigBphysHypo Requirements
-*/
-
-
-
-
diff --git a/Trigger/TrigHypothesis/TrigCaloHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigCaloHypo/cmt/requirements
deleted file mode 100644
index 30ddc833615de8e0782622255c1e75ffd176db00..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigCaloHypo/cmt/requirements
+++ /dev/null
@@ -1,57 +0,0 @@
-
-package TrigCaloHypo
-
-author Denis Oliveira Damazio <Denis.Oliveira.Damazio@cern.ch>
-
-use     AtlasPolicy             AtlasPolicy-*
-#use    AtlasAIDA               AtlasAIDA-*             External
-#use    CLIDSvc CLIDSvc-*       Control
-use     GaudiInterface          GaudiInterface-*        External
-#use    TrigData                TrigData-*              Trigger/TrigSteer
-use     TrigSteeringEvent       TrigSteeringEvent-*     Trigger/TrigEvent
-
-
-use     TrigTimeAlgs            TrigTimeAlgs-*          Trigger/TrigTools
-#use    TrigT1Interfaces        TrigT1Interfaces-*      Trigger/TrigT1
-#use    TrigSteering            TrigSteering-*          Trigger/TrigSteer
-
-use TrigCaloEvent       TrigCaloEvent-*              Trigger/TrigEvent
-use TrigParticle            TrigParticle-*              Trigger/TrigEvent
-
-#use     JetEvent                JetEvent-*              Reconstruction/Jet
-use     TrigInterfaces          TrigInterfaces-*        Trigger/TrigSteer
-#use     xAODJet                 xAODJet-*                Event/xAOD
-
-#use     TrigSerializeResult     TrigSerializeResult-*   Trigger/TrigDataAccess
-#use     AnalysisTriggerEvent    AnalysisTriggerEvent-*  PhysicsAnalysis/AnalysisTrigger
-use     CaloInterface           CaloInterface-*         Calorimeter
-#use DataCollection     DataCollection-*        External
-
-#apply_pattern cmake_add_command command="find_package(tdaq-common)"
-
-apply_pattern dual_use_library files="*.cxx"
-
-apply_pattern declare_runtime
-apply_pattern declare_joboptions files="jobOfragment_*.py TriggerConfig_*.py"
-apply_pattern declare_python_modules files="*.py"
-
-macro_append TrigCaloHypo_linkopts " $(tdaqc_linkopts) -lhltinterface"
-
-private
-#use     AtlasCLHEP              AtlasCLHEP-*            External
-#use     EventKernel             EventKernel-*           Event
-
-#use     FourMomUtils            FourMomUtils-*          Event
-#use     TrigNavigation          TrigNavigation-*        Trigger/TrigEvent
-#use     TrigMissingEtEvent      TrigMissingEtEvent-*    Trigger/TrigEvent
-use     xAODCaloEvent           xAODCaloEvent-*          Event/xAOD
-use     xAODEventInfo           xAODEventInfo-*         Event/xAOD
-use     LArCellRec              LArCellRec-*            LArCalorimeter
-use     LArRecEvent             LArRecEvent-*           LArCalorimeter
-#use     CaloGeoHelpers          CaloGeoHelpers-*        Calorimeter
-#use     HLTtdaqcommon          *               HLT/HLTExternal
-use     TDAQCPolicy             *
-macro_append TrigCaloHypoLib_shlibflags " $(tdaqc_linkopts) -lhltinterface"
-
-apply_pattern cmake_add_command command="find_package( tdaq-common COMPONENTS hltinterface )"
-
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigEgammaHypo/CMakeLists.txt
index a4048e73c7fad405045d2125df4824f2348e59cf..44f4539d0405897cad8712e25ac9e914f6eb9d57 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/CMakeLists.txt
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/CMakeLists.txt
@@ -7,6 +7,7 @@ atlas_subdir( TrigEgammaHypo )
 
 # Declare the package's dependencies:
 atlas_depends_on_subdirs( PUBLIC
+                          Control/AthenaBaseComps
                           Calorimeter/CaloUtils
                           Control/DataModel
                           Control/StoreGate
@@ -41,7 +42,10 @@ atlas_depends_on_subdirs( PUBLIC
                           Tracking/TrkEvent/TrkCaloExtension
                           Trigger/TrigAlgorithms/TrigCaloRec
                           Trigger/TrigEvent/TrigMissingEtEvent
-                          Trigger/TrigEvent/TrigNavigation )
+                          Trigger/TrigEvent/TrigNavigation 
+			  Trigger/TrigSteer/DecisionHandling
+			  Control/AthViews
+			  Control/AthContainers )
 
 # External dependencies:
 find_package( AIDA )
@@ -53,7 +57,7 @@ atlas_add_component( TrigEgammaHypo
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${AIDA_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloUtilsLib DataModel StoreGateLib SGtests xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma GaudiKernel LumiBlockCompsLib PATCoreLib ElectronPhotonSelectorToolsLib TrkSurfaces VxVertex TrigCaloEvent TrigInDetEvent TrigParticle TrigSteeringEvent TrigInterfacesLib TrigT1Interfaces TrigTimeAlgsLib CaloEvent CxxUtils ITrackToVertex RecoToolInterfaces egammaEvent egammaMVACalibLib TrkCaloExtension TrigCaloRecLib TrigMissingEtEvent TrigNavigationLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} CaloUtilsLib DataModel AthenaBaseComps StoreGateLib SGtests xAODCaloEvent xAODEgamma xAODTracking xAODTrigCalo xAODTrigEgamma GaudiKernel LumiBlockCompsLib PATCoreLib ElectronPhotonSelectorToolsLib TrkSurfaces VxVertex TrigCaloEvent TrigInDetEvent TrigParticle TrigSteeringEvent TrigInterfacesLib TrigT1Interfaces TrigTimeAlgsLib CaloEvent CxxUtils ITrackToVertex RecoToolInterfaces egammaEvent egammaMVACalibLib TrkCaloExtension TrigCaloRecLib TrigMissingEtEvent TrigNavigationLib DecisionHandlingLib AthViews )
 
 # Install files from the package:
 atlas_install_headers( TrigEgammaHypo )
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigEgammaHypo/cmt/requirements
deleted file mode 100755
index ecec68cf30b2f72f7deebd7c4892407e61631746..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/cmt/requirements
+++ /dev/null
@@ -1,69 +0,0 @@
-package TrigEgammaHypo
-
-# General
-use 	AtlasPolicy         	AtlasPolicy-*
-use 	AtlasAIDA 		AtlasAIDA-* 		External
-use 	GaudiInterface 		GaudiInterface-* 	External
-use 	StoreGate       	StoreGate-*             Control
-use 	DataModel       	DataModel-*             Control
-use     AtlasROOT               AtlasROOT-*             External
-
-# Trigger 
-use     TrigTimeAlgs            TrigTimeAlgs-*          Trigger/TrigTools
-use     TrigT1Interfaces    	TrigT1Interfaces-*      Trigger/TrigT1
-use     TrigInterfaces    	TrigInterfaces-*        Trigger/TrigSteer
-use     TrigSteeringEvent     	TrigSteeringEvent-*     Trigger/TrigEvent
-
-# Egamma
-use xAODEgamma                  xAODEgamma-*                    Event/xAOD
-use PATCore                     PATCore-*                     PhysicsAnalysis/AnalysisCommon
-use ElectronPhotonSelectorTools ElectronPhotonSelectorTools-*   PhysicsAnalysis/ElectronPhotonID
-use egammaInterfaces            egammaInterfaces-*            Reconstruction/egamma
-
-# Tracking
-use VxVertex                    VxVertex-*                    Tracking/TrkEvent
-use TrkSurfaces                 TrkSurfaces-*                 Tracking/TrkDetDescr
-#use TrkTrack                   TrkTrack-*              Tracking/TrkEvent
-
-# Calo
-use xAODCaloEvent               xAODCaloEvent-*                 Event/xAOD
-use CaloUtils                  CaloUtils-*             Calorimeter
-
-# Lumi <mu>
-use LumiBlockComps          LumiBlockComps-*             LumiBlock
-
-private
-apply_tag ROOTMathLibs
-
-use     egammaEvent             egammaEvent-*           Reconstruction/egamma
-use     TrigCaloRec                 TrigCaloRec-*           Trigger/TrigAlgorithms
-use     CaloEvent               CaloEvent-*             Calorimeter
-use     CxxUtils                CxxUtils-*              Control
-use     egammaMVACalib              egammaMVACalib-*        Reconstruction/egamma
-use     ITrackToVertex          ITrackToVertex-*        Reconstruction/RecoTools 
-use     RecoToolInterfaces      RecoToolInterfaces-*    Reconstruction/RecoTools
-use     xAODEgammaCnv               xAODEgammaCnv-*                 Event/xAOD
-
-use     TrigMissingEtEvent TrigMissingEtEvent-* Trigger/TrigEvent
-use     TrigNavigation     TrigNavigation-*     Trigger/TrigEvent
-use	TrkCaloExtension	TrkCaloExtension-*	Tracking/TrkEvent
-
-#need to import egammaPID
-use AtlasROOT                   AtlasROOT-*                   External
-
-public
-# To produce TrigElectrons
-use     TrigCaloEvent           TrigCaloEvent-*         Trigger/TrigEvent
-use     TrigInDetEvent     	TrigInDetEvent-*     	Trigger/TrigEvent
-use     TrigParticle            TrigParticle-*          Trigger/TrigEvent
-use     xAODTrigCalo            xAODTrigCalo-*          Event/xAOD
-use     xAODTracking     	xAODTracking-*     	Event/xAOD
-use     xAODTrigEgamma          xAODTrigEgamma-*        Event/xAOD
-use     xAODTrigger             xAODTrigger-*           Event/xAOD
-use     AtlasCLHEP              AtlasCLHEP-*            External
-
-library TrigEgammaHypo *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-#apply_pattern declare_joboptions files="TriggerConfig_*.py jobOfragment_*.py"
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/doc/packagedoc.h b/Trigger/TrigHypothesis/TrigEgammaHypo/doc/packagedoc.h
index 8002c94c9e9b5476ea0dac85e7726b4defef2d2d..07ddf7dae55b9f9bc22c74014aab02e9c78db5e8 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/doc/packagedoc.h
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/doc/packagedoc.h
@@ -29,4 +29,3 @@ electron and photon trigger menus.
 
 
 */
-
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPidTools.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPidTools.py
index 052cd51236e3809d69a34e6026e49d8b3cad43b1..8fdf9edd0eee16dcf6c3abe32f532274638eb8bb 100644
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPidTools.py
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigEgammaPidTools.py
@@ -41,6 +41,7 @@ from ElectronPhotonSelectorTools.TrigEGammaPIDdefs import SelectionDefPhoton
 mlog = logging.getLogger ('TrigEgammaPidTools')
 # Path for versioned configuration
 from TriggerMenu.egamma.EgammaSliceFlags import EgammaSliceFlags
+EgammaSliceFlags.pidVersion.set_On()
 mlog.info("TrigEgammaPidTools version %s"%EgammaSliceFlags.pidVersion())
 ConfigFilePath = EgammaSliceFlags.pidVersion() 
 
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2CaloHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2CaloHypoTool.py
new file mode 100644
index 0000000000000000000000000000000000000000..4097991ba8ec323b15024d50298a516489cdb9dc
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2CaloHypoTool.py
@@ -0,0 +1,142 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+import re
+__pattern = "e(?P<threshold>\d+)"
+__cpattern = re.compile( __pattern )
+
+from AthenaCommon.SystemOfUnits import GeV
+
+from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoTool
+def TrigL2CaloHypoToolFromName( name ):
+    """ decode the name ( chain ) and figure out the threshold and selection from it """
+
+    assert name.startswith( "HLT_e" ), "Not a single electron chain"+name+" can't handle it yet"
+    bname = name.split('_')
+    m = __cpattern.match( bname[1] )
+    assert m, "The chain name part 1 "+name+" does not match pattern "+__pattern
+
+    # print m.groups()
+    threshold = int( m.group( "threshold" ) )
+    sel = bname[2]
+    
+ #   print "configuring threshold " , threshold , " slection " , sel
+
+    from TrigL2CaloHypoCutDefs import L2CaloCutMaps    
+    possibleSel = L2CaloCutMaps( threshold ).MapsHADETthr.keys()
+    
+
+    tool = TrigL2CaloHypoTool( name ) 
+    tool.AcceptAll = False
+    tool.MonTool = ""
+    from TriggerJobOpts.TriggerFlags import TriggerFlags
+    print "monitoring", TriggerFlags.enableMonitoring()
+
+
+    if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in  TriggerFlags.enableMonitoring():
+        from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
+        monTool = GenericMonitoringTool("MonTool"+name)
+        monTool.Histograms = [ defineHistogram('dEta', type='TH1F', title="L2Calo Hypo #Delta#eta_{L2 L1}; #Delta#eta_{L2 L1}", xbins=80, xmin=-0.01, xmax=0.01),
+                               defineHistogram('dPhi', type='TH1F', title="L2Calo Hypo #Delta#phi_{L2 L1}; #Delta#phi_{L2 L1}", xbins=80, xmin=-0.01, xmax=0.01),
+                               defineHistogram('Et_em', type='TH1F', title="L2Calo Hypo cluster E_{T}^{EM};E_{T}^{EM} [MeV]", xbins=50, xmin=-2000, xmax=100000),
+                               defineHistogram('Eta', type='TH1F', title="L2Calo Hypo entries per Eta;Eta", xbins=100, xmin=-2.5, xmax=2.5),
+                               defineHistogram('Phi', type='TH1F', title="L2Calo Hypo entries per Phi;Phi", xbins=128, xmin=-3.2, xmax=3.2) ]
+
+        cuts=['Input','has one TrigEMCluster', '#Delta #eta L2-L1', '#Delta #phi L2-L1','eta','rCore',
+              'eRatio','E_{T}^{EM}', 'E_{T}^{Had}','f_{1}','Weta2','Wstot','F3']
+
+        labelsDescription = ''
+        for c in cuts:
+            labelsDescription +=  c+':'
+            
+        monTool.Histograms += [ defineHistogram('CutCounter', type='TH1I', title="L2Calo Hypo Passed Cuts;Cut",
+                                             xbins=13, xmin=-1.5, xmax=12.5,  opt="kCumulative", labels=labelsDescription) ]
+
+        if 'Validation' in TriggerFlags.enableMonitoring():
+            monTool.Histograms += [ defineHistogram('Et_had', type='TH1F', title="L2Calo Hypo E_{T}^{had} in first layer;E_{T}^{had} [MeV]", xbins=50, xmin=-2000, xmax=100000),
+                                    defineHistogram('Rcore', type='TH1F', title="L2Calo Hypo R_{core};E^{3x3}/E^{3x7} in sampling 2", xbins=48, xmin=-0.1, xmax=1.1),
+                                    defineHistogram('Eratio', type='TH1F', title="L2Calo Hypo E_{ratio};E^{max1}-E^{max2}/E^{max1}+E^{max2} in sampling 1 (excl.crack)", xbins=64, xmin=-0.1, xmax=1.5),
+                                    defineHistogram('EtaBin', type='TH1I', title="L2Calo Hypo entries per Eta bin;Eta bin no.", xbins=11, xmin=-0.5, xmax=10.5),
+                                    defineHistogram('F1', type='TH1F', title="L2Calo Hypo f_{1};f_{1}", xbins=34, xmin=-0.5, xmax=1.2),                                    
+                                    defineHistogram('Weta2', type='TH1F', title="L2Calo Hypo Weta2; E Width in sampling 2", xbins=96, xmin=-0.1, xmax=0.61),     
+                                    defineHistogram('Wstot', type='TH1F', title="L2Calo Hypo Wstot; E Width in sampling 1", xbins=48, xmin=-0.1, xmax=11.),
+                                    defineHistogram('F3', type='TH1F', title="L2Calo Hypo F3; E3/(E0+E1+E2+E3)", xbins=96, xmin=-0.1, xmax=1.1) ]        
+            
+        monTool.HistPath = 'L2CaloHypo/'+tool.name()
+        tool.MonTool = monTool
+        tool += monTool
+
+
+        
+
+    tool.EtaBins        = [0.0, 0.6, 0.8, 1.15, 1.37, 1.52, 1.81, 2.01, 2.37, 2.47]
+    def same( val ):
+        return [val]*( len( tool.EtaBins ) - 1 )
+
+    tool.ETthr          = same( float(threshold) )
+    tool.dETACLUSTERthr = 0.1
+    tool.dPHICLUSTERthr = 0.1
+    tool.F1thr          = same( 0.005 )
+    tool.ET2thr         = same( 90.0*GeV )
+    tool.HADET2thr      = same( 999.0 )
+    tool.HADETthr       = same( 0.058 ) 
+    tool.WETA2thr       = same( 99999. ) 
+    tool.WSTOTthr       = same( 99999. )
+    tool.F3thr          = same( 99999. )
+    tool.CARCOREthr     = same( -9999. ) 
+    tool.CAERATIOthr    = same( -9999. )
+
+    if sel == 'nocut':
+        tool.AcceptAll = True
+        tool.ETthr          = same( float( threshold )*GeV ) 
+        tool.dETACLUSTERthr = 9999.
+        tool.dPHICLUSTERthr = 9999.
+        tool.F1thr          = same( 0.0 )
+        tool.HADETthr       = same( 9999. )
+        tool.CARCOREthr     = same( -9999. ) 
+        tool.CAERATIOthr    = same( -9999. )
+
+    elif sel == "etcut":
+        tool.ETthr          = same( ( float( threshold ) -  3 )*GeV ) 
+        # No other cuts applied
+        tool.dETACLUSTERthr = 9999.
+        tool.dPHICLUSTERthr = 9999.
+        tool.F1thr          = same( 0.0 )
+        tool.HADETthr       = same( 9999. )
+        tool.CARCOREthr     = same( -9999. )
+        tool.CAERATIOthr    = same( -9999. )
+
+    elif sel in possibleSel: # real selection
+        tool.ETthr       = same( ( float( threshold ) - 3 )*GeV )
+        tool.HADETthr    = L2CaloCutMaps( threshold ).MapsHADETthr[sel]
+        tool.CARCOREthr  = L2CaloCutMaps( threshold ).MapsCARCOREthr[sel]
+        tool.CAERATIOthr = L2CaloCutMaps( threshold ).MapsCAERATIOthr[sel]
+
+    
+    etaBinsLen = len( tool.EtaBins ) - 1
+    for prop in "ETthr HADETthr CARCOREthr CARCOREthr F1thr F3thr WSTOTthr WETA2thr HADETthr HADETthr ET2thr".split():
+        propLen = len( getattr( tool, prop ) ) 
+        assert propLen == etaBinsLen , "In " + name + " " + prop + " has length " + str( propLen ) + " which is different from EtaBins which has length " + str( etaBinsLen )
+        
+
+            
+            #    assert  __l( EtaBins, tool.ETthr, tool.HADETthr, tool.CARCOREthr, tool.CARCOREthr ) , "All list properties should have equal length ( as EtaBins )"
+    #print tool
+    return tool
+
+if __name__ == "__main__":    
+    from TriggerJobOpts.TriggerFlags import TriggerFlags
+    TriggerFlags.enableMonitoring=['Validation']
+    t = TrigL2CaloHypoToolFromName( "HLT_e10_nocut" )
+    assert t, "cant configure NoCut"    
+    print t
+    t = TrigL2CaloHypoToolFromName( "HLT_e10_etcut" )
+    assert t, "cant configure EtCut"
+    print t
+    t  = TrigL2CaloHypoToolFromName( "HLT_e10_tight" )
+    assert t, "cant configure rel selection - tight"
+    print t    
+
+    t  = TrigL2CaloHypoToolFromName( "HLT_e0_perf" )
+    assert t, "cant configure rel selection - perf"
+    print t    
+
+    print ( "\n\nALL OK\n\n" )
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2ElectronFexMTConfig.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2ElectronFexMTConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..179fcc3edb9202a60a0de95b439d0cbf13d0cfe7
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2ElectronFexMTConfig.py
@@ -0,0 +1,81 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+##############################
+# L2 Electron Fex Algorithm Configuration:
+# Phillip Urquijo <Phillip.Urquijo@cern.ch>
+##############################
+
+from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2ElectronFexMT 
+from AthenaCommon.SystemOfUnits import GeV, mm
+
+from AthenaCommon.AppMgr import ToolSvc
+
+# ---------------------------------------------------------------
+# class for common setups (like monitoring)
+class L2ElectronFexBase(TrigL2ElectronFexMT):
+    __slots__ = []
+    def __init__(self, name):
+        super(L2ElectronFexBase,self).__init__(name)
+#        from TrigEgammaHypo.TrigL2ElectronHypoMonitoring import TrigL2ElectronFexValidationMonitoring, TrigL2ElectronFexOnlineMonitoring
+#        validation = TrigL2ElectronFexValidationMonitoring()
+#        online     = TrigL2ElectronFexOnlineMonitoring()
+#        from TrigTimeMonitor.TrigTimeHistToolConfig import TrigTimeHistToolConfig
+#        time = TrigTimeHistToolConfig("Time")
+
+#        self.AthenaMonTools = [ time, validation, online ]
+
+        # Tracking cuts
+        self.TrackPt = 1.0 * GeV
+        self.TrackPtHighEt = 2.0 * GeV
+        self.ClusEt = 20.0 * GeV
+        self.CaloTrackdEtaNoExtrap = 0.5
+        self.CaloTrackdEtaNoExtrapHighEt = 0.1
+        # Calo-Tracking matching cuts
+        self.CaloTrackdETA = 0.5
+        self.CaloTrackdPHI = 0.5
+        self.CaloTrackdEoverPLow  = 0.0
+        self.CaloTrackdEoverPHigh = 999.0
+
+# ---------------------------------------------------------------
+# TrigL2ElectronFex configurations
+# ---------------------------------------------------------------
+
+class L2ElectronFex_all(L2ElectronFexBase):
+    __slots__ = []
+    def __init__(self,name="L2ElectronFex_all"):
+        super(L2ElectronFex_all, self).__init__(name)
+
+        # AcceptAll flag: if true take events regardless of cuts
+        self.AcceptAll = False
+
+        # Co-ordinates of calorimeter face for extrapolation 
+        self.RCalBarrelFace = 1470.0*mm
+        self.ZCalEndcapFace = 3800.0*mm
+
+class L2ElectronFex_1(L2ElectronFex_all):
+    __slots__ = []
+    def __init__(self,name="L2ElectronFex_1"):
+        super(L2ElectronFex_1, self).__init__(name)
+        self.AcceptAll = True
+        
+class L2ElectronFex_Clean(L2ElectronFex_all):
+    __slots__ = []
+    def __init__(self,name="L2ElectronFex_Clean"):
+        super(L2ElectronFex_Clean, self).__init__(name)
+        self.AcceptAll = False
+        self.CaloTrackdETA = 0.2
+        self.CaloTrackdPHI = 0.3
+
+class L2ElectronFex_LowPt(L2ElectronFex_all):
+    __slots__ = []
+    def __init__(self,name="L2ElectronFex_LowPt"):
+        super(L2ElectronFex_1, self).__init__(name)
+        self.AcceptAll = False
+
+class L2ElectronFex_HighPt(L2ElectronFex_all):
+    __slots__ = []
+    def __init__(self,name="L2ElectronFex_HighPt"):
+        super(L2ElectronFex_1, self).__init__(name)
+        self.AcceptAll = False
+        self.TrackPt = 2.0 * GeV
+
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2ElectronHypoTool.py b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2ElectronHypoTool.py
new file mode 100644
index 0000000000000000000000000000000000000000..9e88963e784879401d86ed0c7fbc489a2872bc7d
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/python/TrigL2ElectronHypoTool.py
@@ -0,0 +1,59 @@
+
+
+
+def TrigL2ElectronHypoToolFromName( name ):
+    """ provides configuration of the hypo tool giben the chain name
+    The argument will be replaced by "parsed" chain dict. For now it only serves simplest chain HLT_eXYZ.
+    """
+    assert name.startswith("HLT_e"), "The chain name does not start from HLT_e"
+
+    bname = name.split('_')
+    threshold = int(bname[1][1:])
+    assert str(threshold) == bname[1][1:], "Threshold definition is not a simple int"
+    from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2ElectronHypoTool
+
+    tool = TrigL2ElectronHypoTool(name)
+    tool.MonTool = ""
+    from TriggerJobOpts.TriggerFlags import TriggerFlags
+    if 'Validation' in TriggerFlags.enableMonitoring() or 'Online' in  TriggerFlags.enableMonitoring():
+        from AthenaMonitoring.AthenaMonitoringConf import GenericMonitoringTool
+        from AthenaMonitoring.DefineHistogram import defineHistogram
+        monTool = GenericMonitoringTool("MonTool"+name)
+        monTool.Histograms = [         
+            defineHistogram('CutCounter', type='TH1I', title="L2Electron Hypo Cut Counter;Cut Counter", xbins=8, xmin=-1.5, xmax=7.5, opt="kCumulative", labels=labelsDescription),
+            defineHistogram('CaloTrackdEta', type='TH1F', title="L2Electron Hypo #Delta #eta between cluster and track;#Delta #eta;Nevents", xbins=80, xmin=-0.4, xmax=0.4),
+            defineHistogram('CaloTrackdPhi', type='TH1F', title="L2Electron Hypo #Delta #phi between cluster and track;#Delta #phi;Nevents", xbins=80, xmin=-0.4, xmax=0.4),
+            defineHistogram('CaloTrackEoverP', type='TH1F', title="L2Electron Hypo E/p;E/p;Nevents", xbins=120, xmin=0, xmax=12),
+            defineHistogram('PtTrack', type='TH1F', title="L2Electron Hypo p_{T}^{track} [MeV];p_{T}^{track} [MeV];Nevents", xbins=50, xmin=0, xmax=100000),
+            defineHistogram('PtCalo', type='TH1F', title="L2Electron Hypo p_{T}^{calo} [MeV];p_{T}^{calo} [MeV];Nevents", xbins=50, xmin=0, xmax=100000),
+            defineHistogram('CaloEta', type='TH1F', title="L2Electron Hypo #eta^{calo} ; #eta^{calo};Nevents", xbins=200, xmin=-2.5, xmax=2.5),
+            defineHistogram('CaloPhi', type='TH1F', title="L2Electron Hypo #phi^{calo} ; #phi^{calo};Nevents", xbins=320, xmin=-3.2, xmax=3.2) ]        
+
+        monTool.HistPath = 'L2ElectronHypo/'+tool.name()
+        tool.MonTool = monTool
+        tool += monTool
+
+    from AthenaCommon.SystemOfUnits import GeV    
+    tool.TrackPt = [ 1.0 * GeV ] 
+    tool.CaloTrackdETA = [ 0.2 ]
+    tool.CaloTrackdPHI = [ 999. ]
+    tool.CaloTrackdEoverPLow = [ 0.0 ]
+    tool.CaloTrackdEoverPHigh = [ 999.0 ]
+    tool.TRTRatio = [ -999. ]
+
+    if float(threshold) < 15:
+        tool.TrackPt = [ 1.0 * GeV ]
+    elif float(threshold) >= 15 and float(threshold) < 20:
+        tool.TrackPt = [ 2.0 * GeV ]
+    elif float(threshold) >= 20 and float(threshold) < 50:
+        tool.TrackPt = [ 3.0 * GeV ]
+    elif float(threshold) >= 50:
+        tool.TrackPt = [ 5.0 * GeV ]
+        tool.CaloTrackdETA = [ 999. ]
+        tool.CaloTrackdPHI = [ 999. ]
+    else:
+        raise RuntimeError('No threshold: Default cut configured')
+    return tool
+
+if __name__ == "__main__":
+    tool = TrigL2ElectronHypoToolFromName("HLT_e4")    
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlg.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b382273c70ff11ceda5f4afbcc56c0a6ba9860c1
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlg.cxx
@@ -0,0 +1,96 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "GaudiKernel/Property.h"
+#include "TrigL2CaloHypoAlg.h"
+
+using namespace TrigCompositeUtils;
+
+TrigL2CaloHypoAlg::TrigL2CaloHypoAlg( const std::string& name, 
+				      ISvcLocator* pSvcLocator ) : 
+  ::AthReentrantAlgorithm( name, pSvcLocator ) {}
+
+TrigL2CaloHypoAlg::~TrigL2CaloHypoAlg()
+{}
+
+StatusCode TrigL2CaloHypoAlg::initialize()
+{
+  ATH_MSG_INFO ( "Initializing " << name() << "..." );
+  CHECK( m_hypoTools.retrieve() );
+
+  CHECK( m_viewsKey.initialize() );
+
+  renounce( m_clustersKey );
+  CHECK( m_clustersKey.initialize() );
+
+  renounce( m_roisKey );
+  CHECK( m_roisKey.initialize() );
+
+  CHECK( m_decisionsKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigL2CaloHypoAlg::finalize()
+{
+  ATH_MSG_INFO ( "Finalizing " << name() << "..." );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigL2CaloHypoAlg::execute_r( const EventContext& context ) const
+{  
+  ATH_MSG_DEBUG ( "Executing " << name() << "..." );
+  auto viewsHandle = SG::makeHandle( m_viewsKey, context );
+  
+  auto decisions = std::make_unique<DecisionContainer>();
+  auto aux = std::make_unique<DecisionAuxContainer>();
+  decisions->setStore( aux.get() );
+
+
+  std::vector<TrigL2CaloHypoTool::Input> toolInput;
+  // exploit knowledge that there is one cluster in the view
+  size_t counter = 0;
+  for ( auto view: *viewsHandle ) {
+    auto d = newDecisionIn( decisions.get() );
+    
+    auto roiHandle =  SG::makeHandle( m_roisKey, context );
+    CHECK( roiHandle.setProxyDict( view ) );
+
+    auto clusterHandle =  SG::makeHandle( m_clustersKey, context );
+    CHECK( clusterHandle.setProxyDict( view ) );
+    
+    toolInput.emplace_back( d, roiHandle.cptr()->at(0), clusterHandle.cptr()->at(0) );
+
+
+    {
+      auto el = ElementLink<xAOD::TrigEMClusterContainer>( view->name()+"_"+clusterHandle.key(), 0 ); // 0 because there is only one obj in per-view collection
+      CHECK( el.isValid() );
+      d->setObjectLink( "feature",  el );
+    }
+    {
+      auto el = ElementLink<TrigRoiDescriptorCollection>( view->name()+"_"+m_roisKey.key(), 0 );
+      CHECK( el.isValid() );
+      d->setObjectLink( "roi", el );
+    }
+    {
+      auto el = ElementLink< std::vector<SG::View*> >( m_viewsKey.key(), counter );
+      CHECK( el.isValid() );
+      d->setObjectLink( "view", el );
+    }
+  }
+  
+  for ( auto& tool: m_hypoTools ) {
+    CHECK( tool->decide( toolInput ) );
+  }
+
+ 
+  {
+    auto handle =  SG::makeHandle( m_decisionsKey, context );
+    CHECK( handle.record( std::move( decisions ), std::move( aux ) ) );
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlg.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..92b6069138059dfaf03bb0628b5a180162e394ad
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoAlg.h
@@ -0,0 +1,47 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef TRIGEGAMMAHYPO_TRIGL2CALOHYPOALG_H
+#define TRIGEGAMMAHYPO_TRIGL2CALOHYPOALG_H 1
+
+#include <string>
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "AthViews/View.h"
+#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
+#include "xAODTrigCalo/TrigEMClusterContainer.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+
+#include "TrigL2CaloHypoTool.h"
+
+/**
+ * @class Implements egamma calo selection for the new HLT framework
+ * @brief 
+ **/
+
+class TrigL2CaloHypoAlg
+  : public ::AthReentrantAlgorithm
+{ 
+ public: 
+
+  TrigL2CaloHypoAlg( const std::string& name, ISvcLocator* pSvcLocator );
+
+  virtual ~TrigL2CaloHypoAlg(); 
+
+  StatusCode  initialize() override;
+  StatusCode  execute_r( const EventContext& context ) const override;
+  StatusCode  finalize() override;
+ 
+ private: 
+  TrigL2CaloHypoAlg();
+  ToolHandleArray< TrigL2CaloHypoTool > m_hypoTools { this, "HypoTools", {}, "Hypo tools" };
+  
+  SG::ReadHandleKey< std::vector< SG::View* > > m_viewsKey { this, "Views", "Unspecified", "Input Views" };
+  SG::ReadHandleKey< xAOD::TrigEMClusterContainer > m_clustersKey { this, "CaloClusters", "CaloClusters", "CaloClusters in view" };
+  SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roisKey { this, "RoIs", "RoIs", "RoIs key in the view" };
+  SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_decisionsKey { this, "Decisions", "Unspecified", "Decisions" };
+ 
+}; 
+
+
+#endif //> !TRIGEGAMMAHYPO_TRIGL2CALOHYPOALG_H
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3cab44a27d6af299611c39923eac92dea228d381
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoTool.cxx
@@ -0,0 +1,280 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#include "DecisionHandling/HLTIdentifier.h"
+
+#include "TrigL2CaloHypoTool.h"
+
+
+
+TrigL2CaloHypoTool::TrigL2CaloHypoTool( const std::string& type, 
+		    const std::string& name, 
+		    const IInterface* parent ) :
+  AthAlgTool( type, name, parent ),
+  m_decisionId( HLT::Identifier::fromToolName( name ) ) {}
+
+StatusCode TrigL2CaloHypoTool::initialize()  {
+  ATH_MSG_DEBUG( "Initialization completed successfully"   );   
+  ATH_MSG_DEBUG( "AcceptAll           = " << ( m_acceptAll==true ? "True" : "False" ) ); 
+  ATH_MSG_DEBUG( "EtaBins        = " << m_etabin      );
+  ATH_MSG_DEBUG( "ETthr          = " << m_eTthr    << "( lo )/" << m_eT2thr    << "( hi )" );  
+  ATH_MSG_DEBUG( "HADETthr       = " << m_hadeTthr << "( lo )/" << m_hadeT2thr << "( hi )" );
+  ATH_MSG_DEBUG( "CARCOREthr     = " << m_carcorethr  );
+  ATH_MSG_DEBUG( "CAERATIOthr    = " << m_caeratiothr );
+  ATH_MSG_DEBUG( "dPHICLUSTERthr = " << m_dphicluster );
+  ATH_MSG_DEBUG( "dETACLUSTERthr = " << m_detacluster );
+  ATH_MSG_DEBUG( "WETA2thr     = "   << m_WETA2thr  );
+  ATH_MSG_DEBUG( "WSTOTthr     = "   << m_WSTOTthr  );
+  ATH_MSG_DEBUG( "F3thr     = "      << m_F3thr  );
+  
+  if ( m_etabin.size() == 0 ) {
+    ATH_MSG_ERROR(  " There are no cuts set (EtaBins property is an empty list)" );
+    return StatusCode::FAILURE;
+  }
+
+  unsigned int nEtaBin=m_etabin.size();
+#define CHECK_SIZE( __n) if ( m_##__n.size() != nEtaBin - 1 )		\
+    { ATH_MSG_DEBUG(" __n size is " << m_##__n.size() << " but needs to be " << nEtaBin - 1 ); \
+      return StatusCode::FAILURE; }
+
+  CHECK_SIZE( eTthr );
+  CHECK_SIZE( eT2thr );
+  CHECK_SIZE( hadeTthr );
+  CHECK_SIZE( hadeT2thr );
+  CHECK_SIZE( carcorethr );
+  CHECK_SIZE( caeratiothr );
+  CHECK_SIZE( WETA2thr );
+  CHECK_SIZE( WSTOTthr ); 
+  CHECK_SIZE( F3thr );
+
+  ATH_MSG_DEBUG( "Tool configured for chain/id: " << m_decisionId  );
+
+  if ( not m_monTool.name().empty() ) 
+    CHECK( m_monTool.retrieve() );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigL2CaloHypoTool::finalize()  {
+  return StatusCode::SUCCESS;
+}
+
+TrigL2CaloHypoTool::~TrigL2CaloHypoTool()
+{}
+
+
+bool TrigL2CaloHypoTool::singleObjectDecision( const Input& input, int selectionIndex ) const {
+
+  bool pass = false;
+
+  using namespace Monitored;
+  // TB Not sure if anything else than the CutCounter should monitored it in every cut tool, 
+  // Should  quantitities be filled only after the succesful selection?
+
+  auto dEta         = MonitoredScalar::declare( "dEta", -1. ); 
+  auto dPhi         = MonitoredScalar::declare( "dPhi", -1. );
+  auto eT_T2Calo    = MonitoredScalar::declare( "Et_em"   , -1.0 );
+  auto hadET_T2Calo = MonitoredScalar::declare( "Et_had", -1.0 );
+  auto rCore        = MonitoredScalar::declare( "RCore"       , -1.0 );
+  auto energyRatio  = MonitoredScalar::declare( "ERatio" , -1.0 );
+  auto etaBin       = MonitoredScalar::declare( "EtaBin", -1. );
+  auto monEta       = MonitoredScalar::declare( "Eta", -99. ); 
+  auto monPhi       = MonitoredScalar::declare( "Phi", -99. );
+  auto F1           = MonitoredScalar::declare( "F1"          , -1.0 );  
+  auto Weta2        = MonitoredScalar::declare( "Weta2"       , -1.0 );
+  auto Wstot        = MonitoredScalar::declare( "Wstot"       , -1.0 );
+  auto F3           = MonitoredScalar::declare( "F3"          , -1.0 );
+  auto PassedCuts   = MonitoredScalar::declare<int>( "CutCounter", -1 );  
+  auto monitorIt    = MonitoredScope::declare( m_monTool, 
+					       dEta, dPhi, eT_T2Calo, hadET_T2Calo,
+					       rCore, energyRatio, etaBin, monEta,
+					       monPhi, F1, Weta2, Wstot, F3, PassedCuts );
+  // when leaving scope it will ship data to monTool
+  PassedCuts = PassedCuts + 1; //got called (data in place)
+
+  if ( m_acceptAll ) {
+    pass = true;
+    ATH_MSG_DEBUG( "AcceptAll property is set: taking all events" );
+  } else {
+    pass = false;
+    ATH_MSG_DEBUG( "AcceptAll property not set: applying selection" );
+  }
+  auto roiDescriptor = input.roi;
+
+
+  if ( fabs( roiDescriptor->eta() ) > 2.6 ) {
+      ATH_MSG_DEBUG( "The cluster had eta coordinates beyond the EM fiducial volume : " << roiDescriptor->eta() << "; stop the chain now" );
+      pass=false; // special case 
+      return pass;
+  } 
+
+  ATH_MSG_DEBUG( "; RoI ID = " << roiDescriptor->roiId()
+  		 << ": Eta = " << roiDescriptor->eta()
+  		 << ", Phi = " << roiDescriptor->phi() );
+
+  // fill local variables for RoI reference position
+  double etaRef = roiDescriptor->eta();
+  double phiRef = roiDescriptor->phi();
+  // correct phi the to right range ( probably not needed anymore )   
+  if ( fabs( phiRef ) > M_PI ) phiRef -= 2*M_PI; // correct phi if outside range
+
+
+  auto pClus = input.cluster;
+  
+  float absEta = fabs( pClus->eta() );
+  etaBin = -1;
+  monEta = pClus->eta();
+  monPhi = pClus->phi();
+  for ( std::size_t iBin = 0; iBin < m_etabin.size()-1; iBin++ )
+    if ( absEta > m_etabin[iBin] && absEta < m_etabin[iBin+1] ) etaBin = iBin; 
+ 
+  const size_t etaIndex = etaBin + ( m_etabin.size()/m_multiplicity ) * selectionIndex;
+  // find if electron is in calorimeter crack
+  bool inCrack = ( absEta > 2.37 || ( absEta > 1.37 && absEta < 1.52 ) );
+
+  
+  dEta =  pClus->eta() - etaRef;
+  //  Deal with angle diferences greater than Pi
+  dPhi =  fabs( pClus->phi() - phiRef );
+  dPhi = ( dPhi < M_PI ? dPhi : 2*M_PI - dPhi ); // TB why only <
+
+
+  // calculate cluster quantities // definition taken from TrigElectron constructor     
+  if ( pClus->emaxs1() + pClus->e2tsts1() > 0 ) 
+    energyRatio = ( pClus->emaxs1() - pClus->e2tsts1() ) / ( pClus->emaxs1() + pClus->e2tsts1() );
+
+  // ( VD ) here the definition is a bit different to account for the cut of e277 @ EF 
+  if ( pClus->e277()!= 0. ) rCore = pClus->e237() / pClus->e277();
+
+  //fraction of energy deposited in 1st sampling
+
+  if ( fabs( pClus->energy() ) > 0.00001 ) F1 = ( pClus->energy( CaloSampling::EMB1 )+pClus->energy( CaloSampling::EME1 ) )/pClus->energy();
+
+  eT_T2Calo  = pClus->et();
+  
+  if ( eT_T2Calo!=0 && pClus->eta()!=0 ) hadET_T2Calo = pClus->ehad1()/cosh( fabs( pClus->eta() ) )/eT_T2Calo;
+ 
+
+  //extract Weta2 varable
+  Weta2 = pClus->weta2();
+
+  //extract Wstot varable
+  Wstot = pClus->wstot();
+
+  //extract F3 ( backenergy i EM calorimeter
+  float e0 = pClus->energy( CaloSampling::PreSamplerB ) + pClus->energy( CaloSampling::PreSamplerE );
+  float e1 = pClus->energy( CaloSampling::EMB1 ) + pClus->energy( CaloSampling::EME1 );
+  float e2 = pClus->energy( CaloSampling::EMB2 ) + pClus->energy( CaloSampling::EME2 );
+  float e3 = pClus->energy( CaloSampling::EMB3 ) + pClus->energy( CaloSampling::EME3 );
+  float eallsamples = e0+e1+e2+e3;
+  F3 = fabs( eallsamples )>0. ? e3/eallsamples : 0.; 
+
+  // apply cuts: DeltaEta( clus-ROI )
+  ATH_MSG_DEBUG( "TrigEMCluster: eta="  << pClus->eta()
+  		 << " roi eta=" << etaRef << " DeltaEta=" << dEta
+  		 << " cut: <"   << m_detacluster          );
+  
+  if ( fabs( pClus->eta() - etaRef ) > m_detacluster ) return pass;
+  PassedCuts = PassedCuts + 1; //Deta
+  
+  // DeltaPhi( clus-ROI )
+  ATH_MSG_DEBUG( ": phi="  << pClus->phi()
+  		 << " roi phi="<< phiRef    << " DeltaPhi="<< dPhi
+  		 << " cut: <"  << m_dphicluster );
+  
+  if( dPhi > m_dphicluster ) return pass;
+  PassedCuts = PassedCuts + 1; //DPhi
+
+  // eta range
+  if ( etaBin==-1 ) {  // VD
+    ATH_MSG_DEBUG( "Cluster eta: " << absEta << " outside eta range " << m_etabin[m_etabin.size()-1] );
+    return pass;
+  } else { 
+    ATH_MSG_DEBUG( "eta bin used for cuts " << etaIndex );
+  }
+  PassedCuts = PassedCuts + 1; // passed eta cut
+  
+  // Rcore
+  ATH_MSG_DEBUG ( "TrigEMCluster: Rcore=" << rCore 
+		  << " cut: >"  << m_carcorethr[etaIndex] );
+  if ( rCore < m_carcorethr[etaIndex] )  return pass;
+  PassedCuts = PassedCuts + 1; //Rcore
+
+  // Eratio
+  ATH_MSG_DEBUG( " cut: >"  << m_caeratiothr[etaIndex] );   
+  if ( inCrack || F1 < m_F1thr[0] ) {
+    ATH_MSG_DEBUG ( "TrigEMCluster: InCrack= " << inCrack << " F1=" << F1 );
+  } else {
+    if ( energyRatio < m_caeratiothr[etaIndex] ) return pass;
+  }
+  PassedCuts = PassedCuts + 1; //Eratio
+  if( inCrack ) energyRatio = -1; //Set default value in crack for monitoring.
+  
+  // ET_em
+  ATH_MSG_DEBUG( "TrigEMCluster: ET_em=" << eT_T2Calo << " cut: >"  << m_eTthr[etaIndex] );
+  if ( eT_T2Calo < m_eTthr[etaIndex] ) return pass;
+  PassedCuts = PassedCuts + 1; // ET_em
+ 
+  float hadET_cut = 0.0;  
+  // find which ET_had to apply	: this depends on the ET_em and the eta bin
+  if ( eT_T2Calo >  m_eT2thr[etaIndex] ) {
+    hadET_cut = m_hadeT2thr[etaIndex] ;
+
+    ATH_MSG_DEBUG ( "ET_em>"     << m_eT2thr[etaIndex] << ": use high ET_had cut: <" << hadET_cut );
+  } else {
+    hadET_cut = m_hadeTthr[etaIndex];
+
+    ATH_MSG_DEBUG ( "ET_em<"    << m_eT2thr[etaIndex] << ": use low ET_had cut: <" << hadET_cut );
+  }
+  
+  // ET_had
+  ATH_MSG_DEBUG ( "TrigEMCluster: ET_had=" << hadET_T2Calo << " cut: <" << hadET_cut );
+
+  if ( hadET_T2Calo > hadET_cut ) return pass;
+  PassedCuts = PassedCuts + 1; //ET_had
+  
+  // F1
+  ATH_MSG_DEBUG ( "TrigEMCluster: F1=" << F1 << " cut: >"  << m_F1thr[0] );
+  // if ( m_F1 < m_F1thr[0] ) return pass;  //( VD ) not cutting on this variable, only used to select whether to cut or not on eRatio
+  PassedCuts = PassedCuts + 1; //F1
+
+
+  //Weta2
+  ATH_MSG_DEBUG ( "TrigEMCluster: Weta2=" << Weta2 << " cut: <"  << m_WETA2thr[etaIndex] ); 
+  if ( Weta2 > m_WETA2thr[etaIndex] ) return pass;
+  PassedCuts = PassedCuts + 1; //Weta2
+
+
+  //Wstot
+  ATH_MSG_DEBUG ( "TrigEMCluster: Wstot=" <<Wstot << " cut: <"  << m_WSTOTthr[etaIndex] ); 
+  if ( Wstot >= m_WSTOTthr[etaIndex] ) return pass;
+  PassedCuts = PassedCuts + 1; //Wstot
+
+  //F3
+  ATH_MSG_DEBUG( "TrigEMCluster: F3=" << F3 << " cut: <"  << m_F3thr[etaIndex] ); 
+  if ( F3 > m_F3thr[etaIndex] ) return pass;
+  PassedCuts = PassedCuts + 1; //F3
+
+  // got this far => passed!
+  pass = true;
+
+  // Reach this point successfully  
+  ATH_MSG_DEBUG( "pass = " << pass );
+
+  return pass;
+}
+
+
+StatusCode TrigL2CaloHypoTool::decide( std::vector<Input>& input )  const {
+
+  if ( m_multiplicity == 1 ) {
+    for ( auto& i: input ) {
+      if ( singleObjectDecision( i ) ) {
+	TrigCompositeUtils::addDecisionID( m_decisionId, i.decision );
+      }
+    }
+  }
+  return StatusCode::SUCCESS;
+}
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..50a84c9dc45ca9ca537e34d11a474d4af0e06986
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2CaloHypoTool.h
@@ -0,0 +1,91 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef TRIGEGAMMAHYPO_TRIGL2CALOHYPOTOOL_H
+#define TRIGEGAMMAHYPO_TRIGL2CALOHYPOTOOL_H 1
+
+//#include "GaudiKernel/IAlgTool.h"
+#include "CLHEP/Units/SystemOfUnits.h"
+#include "xAODTrigCalo/TrigEMCluster.h"
+#include "TrigSteeringEvent/TrigRoiDescriptor.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "AthenaMonitoring/GenericMonitoringTool.h"
+#include "DecisionHandling/HLTIdentifier.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+
+
+static const InterfaceID IID_TrigL2CaloHypoTool("TrigL2CaloHypoTool", 1, 0);
+
+/**
+ * @class Implementation of the Egamma selection for CaloClusters
+ * @brief 
+ **/
+
+
+
+class TrigL2CaloHypoTool
+  : virtual public ::AthAlgTool
+{ 
+ public: 
+
+
+  TrigL2CaloHypoTool( const std::string& type, 
+		      const std::string& name, 
+		      const IInterface* parent );
+
+  virtual ~TrigL2CaloHypoTool();
+  StatusCode initialize() override;
+  StatusCode finalize() override;
+
+  static const InterfaceID& interfaceID();
+
+  struct Input {
+    Input(TrigCompositeUtils::Decision* d, const TrigRoiDescriptor* r, const xAOD::TrigEMCluster* c)
+    : decision(d), roi(r), cluster(c) {}
+    TrigCompositeUtils::Decision* decision;
+    const TrigRoiDescriptor* roi;
+    const xAOD::TrigEMCluster* cluster;
+  };
+
+  /**
+   * @brief decides upon all clusters
+   * Note it is for a reason a non-virtual method, it is an interface in gaudi sense and implementation.
+   * There will be many tools called often to perform this quick operation and we do not want to pay for polymorphism which we do not need to use.
+   * Will actually see when N obj hypos will enter the scene
+   **/
+  StatusCode decide( std::vector<Input>& input )  const;
+  
+ private:
+  HLT::Identifier m_decisionId;
+
+  
+  bool singleObjectDecision( const Input& i, int selectionIndex = 0 ) const;
+
+
+  //Calorimeter electron ID  cuts
+  Gaudi::Property< std::vector<float> > m_etabin { this, "EtaBins", {} , "Bins of eta" }; //!<  selection variable for L2 calo selection:eta bins
+  Gaudi::Property< std::vector<float> > m_eTthr { this, "ETthr", {}, "ET Threshold" };
+  Gaudi::Property< std::vector<float> > m_eT2thr { this, "ET2thr", {}, "Second layer ET threshold" };
+  Gaudi::Property< std::vector<float> > m_hadeTthr { this, "HADETthr", {}, "" };
+  Gaudi::Property< std::vector<float> > m_hadeT2thr { this, "HADET2thr", {}, "" };
+  Gaudi::Property< std::vector<float> > m_carcorethr { this, "CARCOREthr", {}, "" };
+  Gaudi::Property< std::vector<float> > m_caeratiothr { this, "CAERATIOthr", {}, "" };
+  Gaudi::Property< std::vector<float> > m_F1thr { this, "F1thr", {}, "" };
+  Gaudi::Property< std::vector<float> > m_WETA2thr { this, "WETA2thr", {}, "" };
+  Gaudi::Property< std::vector<float> > m_WSTOTthr { this, "WSTOTthr", {}, "" };
+  Gaudi::Property< std::vector<float> > m_F3thr { this, "F3thr", {}, "" };
+  Gaudi::Property< float > m_detacluster { this, "dETACLUSTERthr", 0. , "" };
+  Gaudi::Property< float > m_dphicluster { this, "dPHICLUSTERthr", 0. , "" };  
+  Gaudi::Property< bool > m_acceptAll { this, "AcceptAll", false , "Ignore selection" };
+  Gaudi::Property< int > m_multiplicity { this, "Multiplicity", 1, "Multiplicity, when >1 all the cuts need to be duplicated" };
+
+  ToolHandle<GenericMonitoringTool> m_monTool { this, "MonTool", "GenericMonitoringTool/MonTool", "Monitoring tool" };
+}; 
+
+inline const InterfaceID& TrigL2CaloHypoTool::interfaceID() 
+{ 
+   return IID_TrigL2CaloHypoTool; 
+}
+
+
+#endif //> !TRIGEGAMMAHYPO_TRIGL2CALOHYPOTOOL_H
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..3749267d4d52da9c9ef1f56523c1ea9fa5cedad8
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.cxx
@@ -0,0 +1,367 @@
+// -*- C++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**************************************************************************
+ **
+ **   File: Trigger/TrigHypothesis/TrigEgammaHypo/TrigL2ElectronFexMT.cxx
+ **
+ **   Description: Hypothesis algorithms to be run at Level 2 after
+ **                tracking algorithms: creates TrigElectrons
+ **
+ **   Author: R.Goncalo <r.goncalo@rhul.ac.uk> Thu Jan 20 22:02:43 BST 2005
+ **            P.Urquijo <Phillip.Urquijo@cern.ch>
+ **
+ **   Created:      Sat Mar  1 19:55:56 GMT 2005
+ **   Modified:     RG 18 Mar 06 - fix to always generate TrigElectrons
+ **                              - use key2keyStore for collection names
+ **                 N.Berger Dec.06 - migrate to new steering (RG)
+ **************************************************************************/
+
+#include "RecoToolInterfaces/IParticleCaloExtensionTool.h" 
+#include "TrkCaloExtension/CaloExtensionHelpers.h" 
+#include "TrigL2ElectronFexMT.h"
+#include "xAODTrigCalo/TrigEMClusterContainer.h"
+#include "xAODTrigCalo/TrigEMClusterAuxContainer.h"
+class ISvcLocator;
+
+template <class SRC>
+inline const DataVector<xAOD::TrigElectron>** dvec_cast(SRC** ptr) { 
+  return (const DataVector<xAOD::TrigElectron>**)(ptr); 
+} 
+
+
+TrigL2ElectronFexMT::TrigL2ElectronFexMT(const std::string & name, ISvcLocator* pSvcLocator)
+    : AthAlgorithm(name, pSvcLocator),
+      m_caloExtensionTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"),
+      m_roiCollectionKey(""),
+      m_TrigEMClusterContainerKey(""),
+      m_TrackParticleContainerKey(""),
+      m_outputElectronsKey("")
+
+{
+    declareProperty( "AcceptAll",            m_acceptAll  = false );
+    declareProperty( "ClusEt",              m_clusEtthr = 20.0*CLHEP::GeV );
+    declareProperty( "TrackPt",              m_trackPtthr = 5.0*CLHEP::GeV );
+    declareProperty( "CaloTrackdEtaNoExtrap",        m_calotrkdeta_noextrap );
+    declareProperty( "TrackPtHighEt",              m_trackPtthr = 2.0*CLHEP::GeV );
+    declareProperty( "CaloTrackdEtaNoExtrapHighEt",        m_calotrkdeta_noextrap_highet = 0);
+    declareProperty( "CaloTrackdETA",        m_calotrackdeta = 0);
+    declareProperty( "CaloTrackdPHI",        m_calotrackdphi = 0); 
+    declareProperty( "CaloTrackdEoverPLow",  m_calotrackdeoverp_low = 0);
+    declareProperty( "CaloTrackdEoverPHigh", m_calotrackdeoverp_high = 0);
+    declareProperty( "RCalBarrelFace",       m_RCAL = 1470.0*CLHEP::mm );
+    declareProperty( "ZCalEndcapFace",       m_ZCAL = 3800.0*CLHEP::mm );
+    declareProperty( "ParticleCaloExtensionTool",    m_caloExtensionTool);
+    declareProperty("TrackParticlesName", 
+                  m_TrackParticleContainerKey = std::string("Tracks"),
+                  "TrackParticle container");
+    declareProperty("ElectronsName", 
+                  m_outputElectronsKey = std::string("Electrons"),
+                  "Electron container");
+    declareProperty("RoIs", 
+                  m_roiCollectionKey = std::string("rois"),
+                  "RoI Collection");
+
+    declareProperty("TrigEMClusterName", 
+                  m_TrigEMClusterContainerKey = std::string("clusters"),
+                  "TrigEMCluster Container");
+
+
+
+    //    declareMonitoredStdContainer("PtCalo",m_calopt_mon);
+    //declareMonitoredStdContainer("PtTrack",m_trackpt_mon);
+    //declareMonitoredStdContainer("CaloTrackdEta",m_calotrackdeta_mon); 
+    //declareMonitoredStdContainer("CaloTrackdPhi",m_calotrackdphi_mon); 
+    //declareMonitoredStdContainer("CaloTrackEoverP",m_calotrackdeoverp_mon);
+    //declareMonitoredStdContainer("CaloTrackdEtaNoExtrapMon",m_calotrkdeta_noextrap_mon);
+    // initialize error counter
+    m_extrapolator_failed = 0;
+}
+
+
+TrigL2ElectronFexMT::~TrigL2ElectronFexMT()
+{}
+
+
+StatusCode TrigL2ElectronFexMT::initialize()
+{
+  ATH_MSG_DEBUG("Initialization:");
+
+
+  ATH_CHECK( m_roiCollectionKey.initialize() );
+
+  ATH_CHECK( m_TrigEMClusterContainerKey.initialize() );
+  ATH_CHECK( m_TrackParticleContainerKey.initialize() );
+  ATH_CHECK( m_outputElectronsKey.initialize() );
+
+  // initialize error counter
+  m_extrapolator_failed = 0;
+
+  if ( m_caloExtensionTool.retrieve().isFailure() ) {  
+        ATH_MSG_ERROR("Unable to locate TrackExtrapolator tool ");
+        return StatusCode::FAILURE; 
+  }  
+
+  // print out settings
+  ATH_MSG_DEBUG("Initialization completed successfully:"); 
+  ATH_MSG_DEBUG( "AcceptAll            = "<< 
+          (m_acceptAll==true ? "True" : "False")); 
+  ATH_MSG_DEBUG("TrackPt              = " << m_trackPtthr);          
+  ATH_MSG_DEBUG("TrackPtHighEt        = " << m_trackPtthr_highet);          
+  ATH_MSG_DEBUG("ClusEt               = " << m_clusEtthr);          
+  ATH_MSG_DEBUG("CaloTrackdEtaNoExtrap= " << m_calotrkdeta_noextrap);        
+  ATH_MSG_DEBUG("CaloTrackdEtaNoExtrapHighEt= " << m_calotrkdeta_noextrap_highet);        
+  ATH_MSG_DEBUG("CaloTrackdETA        = " << m_calotrackdeta);        
+  ATH_MSG_DEBUG("CaloTrackdPHI        = " << m_calotrackdphi);        
+  ATH_MSG_DEBUG("CaloTrackdEoverPLow  = " << m_calotrackdeoverp_low); 
+  ATH_MSG_DEBUG("CaloTrackdEoverPHigh = " << m_calotrackdeoverp_high);
+
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigL2ElectronFexMT::finalize()
+{
+    ATH_MSG_INFO("in finalize()");
+
+    if (m_extrapolator_failed) 
+        ATH_MSG_INFO("track extrapolation failed " << m_extrapolator_failed << " times");
+
+    return  StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigL2ElectronFexMT::execute() {
+
+  // Collection may be never used. Better only create if necessary
+  // NULL value is specially important to avoid crashs in monitoring
+  //m_trigElecColl = NULL;
+
+  auto ctx = getContext();
+
+  auto trigElecColl =   SG::makeHandle (m_outputElectronsKey, ctx);
+  ATH_CHECK( trigElecColl.record (std::make_unique<xAOD::TrigElectronContainer>(),
+                           std::make_unique<xAOD::TrigEMClusterAuxContainer>()) );
+
+  auto roiCollection = SG::makeHandle(m_roiCollectionKey, ctx);
+
+  //JTB For the moment assume 1 RoI (as in TrigL2ElectronFex) - could change to SuperRoI later
+
+  //TrigRoiDescriptorCollection::const_iterator roiDescriptor = roiCollection->begin();
+  //TrigRoiDescriptorCollection::const_iterator roiE = roiCollection->end();
+
+  if (roiCollection->size()==0) {
+    ATH_MSG_DEBUG(" RoI collection size = 0");
+    return StatusCode::SUCCESS;
+  }
+
+  TrigRoiDescriptor* roiDescriptor = *(roiCollection->begin());
+
+  ATH_MSG_DEBUG(" RoI ID = "   << (roiDescriptor)->roiId()
+		<< ": Eta = "      << (roiDescriptor)->eta()
+		<< ", Phi = "      << (roiDescriptor)->phi());
+  
+  float calo_eta(999), calo_phi(999), calo_et(-1);
+
+  auto clusContainer = SG::makeHandle (m_TrigEMClusterContainerKey, ctx);
+  
+  
+  //JTB Should only be 1 cluster in each RoI 
+
+  const xAOD::TrigEMCluster *el_t2calo_clus=(*clusContainer->begin());
+  ElementLink<xAOD::TrigEMClusterContainer> clusEL=ElementLink<xAOD::TrigEMClusterContainer> (*clusContainer,0);
+
+  // copy relevant quantities to local variables
+  calo_eta = el_t2calo_clus->eta();
+  calo_phi = el_t2calo_clus->phi();
+  calo_et  = el_t2calo_clus->et();
+
+
+  // Transverse em energy
+  ATH_MSG_DEBUG("Cluster: ET=" << calo_et);
+  ATH_MSG_DEBUG("searching a matching track: loop over tracks");
+
+
+
+  SG::ReadHandle<xAOD::TrackParticleContainer> tracks(m_TrackParticleContainerKey, ctx);
+
+
+  if (tracks->size() < 1){
+      ATH_MSG_ERROR("No track collection, vector < 1");
+      return StatusCode::SUCCESS; //HLT::MISSING_FEATURE;
+  }
+  
+  size_t coll_size = tracks->size();
+  trigElecColl->reserve(coll_size);
+
+  // loop over tracks
+
+  unsigned int track_index=0;
+  for(const auto trkIter:(*tracks)){
+      ATH_MSG_VERBOSE("AlgoId = " << (trkIter)->patternRecoInfo());
+      ATH_MSG_VERBOSE("At perigee:");
+      ATH_MSG_VERBOSE(" Pt  = " << fabs((trkIter)->pt())); 
+      ATH_MSG_VERBOSE(" phi = " << fabs((trkIter)->phi0()));
+      ATH_MSG_VERBOSE(" eta = " << fabs((trkIter)->eta())); 
+      ATH_MSG_VERBOSE(" z0  = " << fabs((trkIter)->z0()));  
+
+      // ============================================= //
+      // Pt cut
+      float trkPt = fabs((trkIter)->pt());
+      float etoverpt = fabs(calo_et/trkPt);
+      float calotrkdeta_noextrap = (trkIter)->eta() - calo_eta;
+      
+      double etaAtCalo=999.;
+      double phiAtCalo=999.;
+      if(m_acceptAll){
+	if(!extrapolate(el_t2calo_clus,trkIter,etaAtCalo,phiAtCalo)){
+              ATH_MSG_VERBOSE("extrapolator failed");
+              continue; 
+          }
+          else{
+              ATH_MSG_VERBOSE("REGTEST: TrigElectron: cluster index = " << clusEL.index() <<
+                      " track = "     << trkIter << " eta = " << etaAtCalo << " phi = " << phiAtCalo); 
+              xAOD::TrigElectron* trigElec = new xAOD::TrigElectron();
+              trigElecColl->push_back(trigElec);
+	      ElementLink<xAOD::TrackParticleContainer> trackEL = ElementLink<xAOD::TrackParticleContainer> (*tracks, track_index);
+	      
+              trigElec->init(  roiDescriptor->roiWord(),
+                      etaAtCalo, phiAtCalo,  etoverpt,        
+                      clusEL,
+                      trackEL);
+              m_calotrackdeta_mon.push_back(trigElec->trkClusDeta()); 
+              m_calotrackdphi_mon.push_back(trigElec->trkClusDphi()); 
+              m_calotrackdeoverp_mon.push_back(trigElec->etOverPt());
+              m_trackpt_mon.push_back(getTkPt(trigElec));
+              m_calopt_mon.push_back(getCaloPt(trigElec));
+              m_calotrkdeta_noextrap_mon.push_back(calotrkdeta_noextrap);
+          }
+      }
+      else {  
+          ATH_MSG_DEBUG("Apply cuts");
+          if(trkPt < m_trackPtthr){
+              ATH_MSG_DEBUG("Failed track pt cut " << trkPt);
+              continue;
+          }
+          if(fabs(calotrkdeta_noextrap) > m_calotrkdeta_noextrap){
+              ATH_MSG_DEBUG("Failed pre extrapolation calo track deta " << calotrkdeta_noextrap);
+              continue;
+          }
+          if(calo_et > m_clusEtthr){
+              if(trkPt < m_trackPtthr_highet){
+                  ATH_MSG_DEBUG("Failed track pt cut for high et cluster");
+                  continue;
+              }
+              if(calotrkdeta_noextrap > m_calotrkdeta_noextrap_highet){
+                  ATH_MSG_DEBUG("Failed pre extrapolation calo track deta for high et");
+                  continue;
+              }
+          } 
+          if (etoverpt < m_calotrackdeoverp_low){ 
+              ATH_MSG_DEBUG("failed low cut on ET/PT");
+              continue;
+          }
+          if (etoverpt > m_calotrackdeoverp_high){ 
+              ATH_MSG_DEBUG("failed high cut on ET/PT");
+              continue;
+          }
+          if(!extrapolate(el_t2calo_clus,trkIter,etaAtCalo,phiAtCalo)){
+              ATH_MSG_DEBUG("extrapolator failed 1");
+              continue; 
+          }
+          // all ok: do track-matching cuts
+          ATH_MSG_DEBUG("extrapolated eta/phi=" << etaAtCalo << "/" << phiAtCalo);
+          // match in eta
+          float dEtaCalo = fabs(etaAtCalo - calo_eta);
+          ATH_MSG_DEBUG("deta = " << dEtaCalo); 
+          if ( dEtaCalo > m_calotrackdeta){ 
+              ATH_MSG_DEBUG("failed eta match cut " << dEtaCalo);
+              continue;
+          }
+
+          // match in phi: deal with differences larger than Pi
+          float dPhiCalo =  fabs(phiAtCalo - calo_phi);
+          dPhiCalo       = ( dPhiCalo < M_PI ? dPhiCalo : 2*M_PI - dPhiCalo );
+          ATH_MSG_DEBUG("dphi = " << dPhiCalo); 
+          if ( dPhiCalo > m_calotrackdphi) {
+              ATH_MSG_DEBUG("failed phi match cut " << dPhiCalo);
+              continue;
+          }
+          // all cuts passed
+
+          /** Create a TrigElectron corresponding to this candidate
+            assume cluster quantities give better estimate of transverse energy
+            (probably a safe assumption for large pT) and that track parameters
+            at perigee give better estimates of angular quantities */
+
+	  ElementLink<xAOD::TrackParticleContainer> trackEL = ElementLink<xAOD::TrackParticleContainer> (*tracks, track_index);
+          ATH_MSG_DEBUG("REGTEST: TrigElectron: cluster index = " << clusEL.index() <<
+                  " track = "     << trkIter << " eta = " << 
+                  etaAtCalo << " phi = " << phiAtCalo << 
+                  " deta = " << dEtaCalo << "dphi = " << dPhiCalo);
+
+          xAOD::TrigElectron* trigElec = new xAOD::TrigElectron();
+          trigElecColl->push_back(trigElec);
+          trigElec->init( roiDescriptor->roiWord(),
+                  etaAtCalo, phiAtCalo,  etoverpt,        
+                  clusEL,
+                  trackEL);
+          ATH_MSG_DEBUG(" deta = " << dEtaCalo << " deta = " << trigElec->trkClusDeta() 
+                  << " dphi = " << dPhiCalo << " dphi = " << trigElec->trkClusDphi()
+                  << " caloEta = " << calo_eta << " caloEta = " << trigElec->caloEta()
+                  << " caloPhi = " << calo_phi << " calophi = " << trigElec->caloPhi()
+                  << " etaAtCalo = " << etaAtCalo << " etaAtCalo = " << trigElec->trkEtaAtCalo()
+                  << " phiAtCalo = " << phiAtCalo << " phiAtCalo = " << trigElec->trkPhiAtCalo()
+                  );
+
+          m_calotrackdeta_mon.push_back(trigElec->trkClusDeta()); 
+          m_calotrackdphi_mon.push_back(trigElec->trkClusDphi()); 
+          m_calotrackdeoverp_mon.push_back(trigElec->etOverPt());
+          m_trackpt_mon.push_back(getTkPt(trigElec));
+          m_calopt_mon.push_back(getCaloPt(trigElec));
+          m_calotrkdeta_noextrap_mon.push_back(calotrkdeta_noextrap);
+      }
+      track_index++;
+  }
+
+
+  ATH_MSG_DEBUG("REGTEST:  returning an xAOD::TrigElectronContainer with size "<< trigElecColl->size() << ".");
+  
+  return StatusCode::SUCCESS;
+}
+
+bool TrigL2ElectronFexMT::extrapolate(const xAOD::TrigEMCluster *clus, const xAOD::TrackParticle *trk, double &etaAtCalo, double &phiAtCalo){
+    CaloExtensionHelpers::LayersToSelect layersToSelect; 
+    layersToSelect.insert(CaloSampling::CaloSample::EMB2); 
+    layersToSelect.insert(CaloSampling::CaloSample::EME2); 
+    // extrapolate track using tool
+    // get calo extension 
+    const Trk::CaloExtension* caloExtension = 0; 
+    bool useCaching = false; 
+
+    if( !m_caloExtensionTool->caloExtension(*trk,caloExtension,useCaching) || caloExtension->caloLayerIntersections().empty() ) {
+        ATH_MSG_VERBOSE("extrapolator failed 1");
+        m_extrapolator_failed++;  
+        return false;
+    }  
+    // extract eta/phi in EM2 
+    CaloExtensionHelpers::EtaPhiPerLayerVector intersections; 
+    CaloExtensionHelpers::midPointEtaPhiPerLayerVector( *caloExtension, intersections, &layersToSelect ); 
+    if( intersections.empty() ) { 
+        ATH_MSG_VERBOSE("extrapolator failed 2");
+        m_extrapolator_failed++;  
+        return false;
+    }  
+    // pick the correct sample in case of ambiguity 
+    std::tuple<CaloSampling::CaloSample, double, double> etaPhiTuple = intersections.front(); 
+    if( intersections.size() == 2 )  
+        if ( clus->energy(CaloSampling::CaloSample::EME2) > clus->energy(CaloSampling::CaloSample::EMB2) ) 
+            etaPhiTuple=intersections.back(); 
+    etaAtCalo = std::get<1>(etaPhiTuple); 
+    phiAtCalo = std::get<2>(etaPhiTuple); 
+
+    return true;
+}
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.h
new file mode 100755
index 0000000000000000000000000000000000000000..313588f5843ce9d03850522825c590d1e653cf46
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronFexMT.h
@@ -0,0 +1,134 @@
+// -*- C++ -*-
+
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+/**************************************************************************
+ **
+ **   File: Trigger/TrigHypothesis/TrigEgammaHypo/TrigL2ElectronFexMT.h
+ **
+ **   Description: Fex algo to be run before TrigL2ElectronHypo
+ **
+ **   Authors: R. Goncalo     <r.goncalo@rhul.ac.uk>
+ **            V. Perez-Reale <perezr@mail.cern.ch>
+ **            N. Berger      <Nicolas.Berger@cern.ch> Tue Nov 28 0:56:50 CET 2006
+ **            P. Urquijo     <Phillip.Urquijo@cern.ch>
+ **
+ **   Created:  27 Jul 2017
+ **************************************************************************/ 
+
+#ifndef TRIG_TrigL2ElectronFexMT_H 
+#define TRIG_TrigL2ElectronFexMT_H
+
+// standard stuff
+#include <vector>
+#include <cmath> 
+
+// general athena stuff
+#include "GaudiKernel/IToolSvc.h"
+
+//Gaudi
+#include "GaudiKernel/ToolHandle.h"
+#include "GaudiKernel/ServiceHandle.h"
+// Base class
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "StoreGate/ReadHandleKey.h"
+#include "StoreGate/WriteHandleKey.h"
+
+#include "TrigT1Interfaces/RecEmTauRoI.h"
+#include "TrigSteeringEvent/TrigRoiDescriptor.h"
+
+#include "xAODTracking/TrackParticleContainer.h"
+#include "xAODTrigCalo/TrigEMCluster.h"
+#include "xAODTrigEgamma/TrigElectron.h"
+#include "xAODTrigEgamma/TrigElectronContainer.h"
+
+namespace Trk
+{ class IParticleCaloExtensionTool; } 
+
+/**
+ * \class TrigL2ElectronFexMT 
+ * \brief TrigL2ElectronFexMT is a Trigger Fex Algorithm that retrieves the L2 TrigEMCluster
+ * container and the L2 TrackCollection containers and then creates a TrigElectron Container 
+ * with a subset of calorimeter-ID selection variables that are calculated (eg. E/p)
+ * TrigL2ElectronFexMT will apply some very loose selection cuts to the TrigElectronContainer created
+ * which is of TrigParticle type TrigElectron
+ * The TrigElectron conatiner will then be retrieved by the hypothesis algorithm TrigL2ElectronHypo
+ * that will perform the corresponding L2 electron selection
+ *
+ * Cleanup / Update for Run2
+ * Remove m_calo_algoID; m_trackalgoID -- only 1 type of track
+ * Remove deta/dphi cluster -- this is checked at L2Calo
+ * Remove track pt for TRT tracks -- TRT only not used
+ * Remove m_calotrackdeta/dphiTRT -- not cutting on TRT tracks
+ * calotrack deta/dphi and eoverp cuts flat (not as function of eta)
+ */
+
+class TrigL2ElectronFexMT : public AthAlgorithm  {
+  
+ public:
+
+  TrigL2ElectronFexMT(const std::string & name, ISvcLocator* pSvcLocator);
+  ~TrigL2ElectronFexMT();
+
+  StatusCode initialize();
+  StatusCode finalize();
+  StatusCode execute();
+
+
+ private:
+  
+  //tracking cut
+  float  m_trackPtthr;
+  float  m_trackPtthr_highet; //!< track pt cut for high et cluster (20 GeV)
+  float  m_clusEtthr; //!< cluster Et threshold for high et cuts
+  float m_calotrkdeta_noextrap; //!< preselection between track eta and cluster before extrapolation 
+  float m_calotrkdeta_noextrap_highet; //!< preselection between track eta and cluster before extrapolation for high et cluster
+  //calo-tracking cuts
+
+  float m_calotrackdeta; //!<  deta between calo and track
+  float m_calotrackdphi; //!<  dphi between calo and track
+  float m_calotrackdeoverp_low; //!<  E/p lower cut between calo and track
+  float m_calotrackdeoverp_high; //!<  E/p upper cut  between calo and track
+  
+  //radius and Z of calorimeter face
+  float m_RCAL;  //!<  radious of calorimeter face
+  float m_ZCAL;  //!<  Z of calorimeter face
+  
+  // build electrons for all tracks  
+  bool m_acceptAll;
+
+  // for extrapolating TrigInDetTracks to calorimeter surface
+  ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtensionTool; 
+
+  // track-extrapolation error counter
+  unsigned long m_extrapolator_failed;
+
+  ///Static getter methods for monitoring of TrigElectron container
+  static inline double getCaloPt(const xAOD::TrigElectron* aElectron){
+    if(!aElectron) return -999.0;
+    return aElectron->pt();
+  }
+
+  static inline double getTkPt(const xAOD::TrigElectron* aElectron){
+      if(!aElectron) return -999.0;
+      return (aElectron->trackParticle() ? aElectron->trackParticle()->pt()   : -999);
+  }
+
+  bool extrapolate(const xAOD::TrigEMCluster *, const xAOD::TrackParticle *, double &, double &);
+
+  std::vector<float> m_calotrkdeta_noextrap_mon; //!< monitor preselection between track eta and cluster before extrapolation 
+  std::vector<float> m_calotrackdeta_mon; 
+  std::vector<float> m_calotrackdphi_mon; 
+  std::vector<float> m_calotrackdeoverp_mon;
+  std::vector<float> m_trackpt_mon;
+  std::vector<float> m_calopt_mon;
+
+  SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey;
+  SG::ReadHandleKey<xAOD::TrigEMClusterContainer> m_TrigEMClusterContainerKey;
+  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_TrackParticleContainerKey;
+  SG::WriteHandleKey<xAOD::TrigElectronContainer> m_outputElectronsKey;
+};
+
+#endif
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlg.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlg.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..db88035a298cf694da63a48d06c0d945efbf864a
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlg.cxx
@@ -0,0 +1,124 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#include <map>
+#include "GaudiKernel/Property.h"
+#include "TrigL2ElectronHypoAlg.h"
+
+
+
+TrigL2ElectronHypoAlg::TrigL2ElectronHypoAlg( const std::string& name, 
+			  ISvcLocator* pSvcLocator ) : 
+  ::AthReentrantAlgorithm( name, pSvcLocator )
+{
+  //declareProperty( "Property", m_nProperty );
+
+}
+
+TrigL2ElectronHypoAlg::~TrigL2ElectronHypoAlg()
+{}
+
+StatusCode TrigL2ElectronHypoAlg::initialize()
+{
+  ATH_MSG_INFO ( "Initializing " << name() << "..." );
+  ATH_CHECK( m_hypoTools.retrieve() );
+  
+  ATH_CHECK( m_views.initialize() );
+  ATH_CHECK( m_decisionsKey.initialize() );
+  ATH_CHECK( m_clusterDecisionsKey.initialize() );
+  
+  renounce( m_electronsKey );  
+  ATH_CHECK( m_electronsKey.initialize() );
+
+
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigL2ElectronHypoAlg::finalize()
+{
+  ATH_MSG_INFO ( "Finalizing " << name() << "..." );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigL2ElectronHypoAlg::execute_r( const EventContext& context ) const
+{  
+  ATH_MSG_DEBUG ( "Executing " << name() << "..." );
+  // obtain electrons
+
+
+  
+  // prepare decisions container and link back to the clusters, and decision on clusters
+  auto decisions = std::make_unique<DecisionContainer>();
+  auto aux = std::make_unique<DecisionAuxContainer>();
+  decisions->setStore( aux.get() );
+
+  // // extract mapping of cluster pointer to an index in the cluster decision collection
+  auto clusterDecisions = SG::makeHandle( m_clusterDecisionsKey, context );
+  std::map<const xAOD::TrigEMCluster*, size_t> clusterToIndexMap;
+  size_t clusterCounter = 0;
+  for ( auto clusterDecisionIter = clusterDecisions->begin(); 
+  	clusterDecisionIter != clusterDecisions->end(); 
+  	++clusterDecisionIter, ++clusterCounter ) {
+
+    ATH_CHECK( ( *clusterDecisionIter )->hasObjectLink( "feature" ) );
+    const xAOD::TrigEMCluster* cluster = ( *clusterDecisionIter )->object<xAOD::TrigEMCluster>( "feature" );
+    //    ATH_CHECK( clusterLink.isValid() );    
+    //    auto cluster = clusterLink.getDataPtr();
+    clusterToIndexMap.insert( std::make_pair( cluster, clusterCounter ) );
+  }
+  ATH_MSG_DEBUG( "Cluster ptr to decision map has size " << clusterToIndexMap.size() );
+
+  // prepare imput for tools
+  std::vector<TrigL2ElectronHypoTool::Input> hypoToolInput;
+  
+  auto viewsHandle = SG::makeHandle( m_views, context );
+  for ( auto view: *viewsHandle ) {
+    size_t electronCounter = 0;
+    auto electronsHandle = SG::makeHandle( m_electronsKey, context );  
+    CHECK( electronsHandle.setProxyDict( view ) );
+    CHECK( electronsHandle.isValid() );
+
+    for ( auto electronIter = electronsHandle->begin(); electronIter != electronsHandle->end(); ++electronIter, electronCounter++ ) {
+      auto d = newDecisionIn( decisions.get() );
+      d->setObjectLink( "feature", ElementLink<xAOD::TrigElectronContainer>( view->name()+"_"+m_electronsKey.key(), electronCounter ) );
+      
+      auto clusterPtr = (*electronIter)->emCluster();
+      CHECK( clusterPtr != nullptr );
+
+      // now find matching cluster 
+      // could use geometric matching but in fact the cluster owned by the decision object and the cluster owned by the electron should be the same
+      // since we have a map made in advance we can make use of the index lookup w/o the need for additional loop 
+      auto origCluster = clusterToIndexMap.find( clusterPtr );
+      ATH_CHECK( origCluster != clusterToIndexMap.end() );
+      linkToPrevious( d, m_clusterDecisionsKey.key(), origCluster->second );
+      
+      // now we have DecisionObject ready to be passed to hypo tool. it has link to electron, 
+      // and decisions on clusters
+      // we shall avoid calling the tools for chains which were already rejected on certain cluster, but this is left to hypo tools
+      DecisionIDContainer clusterDecisionIDs;
+      decisionIDs( clusterDecisions->at( origCluster->second ), clusterDecisionIDs );
+      
+      hypoToolInput.emplace_back( TrigL2ElectronHypoTool::Input{ d, *electronIter,  origCluster->first, clusterDecisionIDs } );
+    }
+  }
+  
+
+  for ( auto & tool: m_hypoTools ) {
+    ATH_CHECK( tool->decide( hypoToolInput ) );
+    
+  } 
+
+  
+
+  {
+    auto handle =  SG::makeHandle( m_decisionsKey, context );
+    CHECK( handle.record( std::move( decisions ), std::move( aux ) ) );
+  }
+
+
+  return StatusCode::SUCCESS;
+}
+
+
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlg.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlg.h
new file mode 100644
index 0000000000000000000000000000000000000000..4ad9b8e33cc3d3a467919a9ef96b33f6de65e174
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoAlg.h
@@ -0,0 +1,55 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef TRIGEGAMMAHYPO_TRIGL2ELECTRONHYPOALG_H
+#define TRIGEGAMMAHYPO_TRIGL2ELECTRONHYPOALG_H 1
+
+#include <string>
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "xAODTrigEgamma/TrigElectronContainer.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+#include "AthViews/View.h"
+
+#include "TrigL2ElectronHypoTool.h"
+
+/**
+ * @class Implements Hypo selection on L2 electrons
+ * @brief 
+ **/
+using namespace TrigCompositeUtils;
+
+class TrigL2ElectronHypoAlg
+  : public ::AthReentrantAlgorithm
+{ 
+ public: 
+
+  TrigL2ElectronHypoAlg( const std::string& name, ISvcLocator* pSvcLocator );
+
+  virtual ~TrigL2ElectronHypoAlg(); 
+
+
+  //TrigL2ElectronHypoAlg &operator=(const TrigL2ElectronHypoAlg &alg); 
+
+  StatusCode  initialize() override;
+  StatusCode  execute_r(const EventContext& context) const override;
+  StatusCode  finalize() override;
+ 
+ private: 
+  TrigL2ElectronHypoAlg();
+  ToolHandleArray< TrigL2ElectronHypoTool > m_hypoTools {this, "HypoTools", {}, "Tools to perfrom selection"};
+
+
+  SG::ReadHandleKey< std::vector<SG::View*> > m_views {this, "Views", "Unspecified", "Views to read electrons from" };
+  SG::WriteHandleKey< DecisionContainer > m_decisionsKey {this, "ElectronDecisions", "ElectronDecisions", "Output decisions"};
+  SG::ReadHandleKey< DecisionContainer > m_clusterDecisionsKey {this, "ClusterDecisions", "L2ClusterContainer", "Decisions for clusters"};
+
+  // internally used to getch from views
+  SG::ReadHandleKey< xAOD::TrigElectronContainer > m_electronsKey {this, "Electrons", "L2ElectronContainer", "Input"};
+
+
+
+}; 
+
+
+#endif //> !TRIGEGAMMAHYPO_TRIGL2ELECTRONHYPOALG_H
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoTool.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..9ab60cf8eae1acff4308fd6cd4062eafad8b4700
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoTool.cxx
@@ -0,0 +1,208 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+
+#include "DecisionHandling/HLTIdentifier.h"
+#include "DecisionHandling/Combinators.h"
+
+#include "TrigL2ElectronHypoTool.h"
+
+using namespace TrigCompositeUtils;
+
+TrigL2ElectronHypoTool::TrigL2ElectronHypoTool( const std::string& type, 
+		    const std::string& name, 
+		    const IInterface* parent ) :
+  AthAlgTool( type, name, parent ),
+  m_decisionId( HLT::Identifier::fromToolName( name ) )
+{}
+
+StatusCode TrigL2ElectronHypoTool::initialize()  {
+  
+  if ( !m_monTool.empty() ) CHECK( m_monTool.retrieve() );
+
+  ATH_MSG_DEBUG( "Initialization completed successfully:" );
+  ATH_MSG_DEBUG( "AcceptAll            = " 
+		<< ( m_acceptAll==true ? "True" : "False" ) ); 
+  ATH_MSG_DEBUG( "TrackPt              = " << m_trackPt           ); 
+  ATH_MSG_DEBUG( "CaloTrackdETA        = " << m_caloTrackDEta        );
+  ATH_MSG_DEBUG( "CaloTrackdPHI        = " << m_caloTrackDPhi        );
+  ATH_MSG_DEBUG( "CaloTrackdEoverPLow  = " << m_caloTrackdEoverPLow );
+  ATH_MSG_DEBUG( "CaloTrackdEoverPHigh = " << m_caloTrackdEoverPHigh );
+  ATH_MSG_DEBUG( "TRTRatio = " << m_trtRatio );
+
+  std::vector<size_t> sizes( {m_trackPt.size(), m_caloTrackDEta.size(), m_caloTrackDPhi.size(), m_caloTrackdEoverPLow.size(), m_caloTrackdEoverPHigh.size(), m_trtRatio.size() } );
+
+
+
+  if ( *std::min_element( sizes.begin(), sizes.end() ) != *std::max_element( sizes.begin(), sizes.end() )  ) {
+    ATH_MSG_ERROR( "Missconfiguration, cut properties listed above ( when DEBUG ) have different dimensions shortest: " <<  *std::min_element( sizes.begin(), sizes.end() ) << " longest " << *std::max_element( sizes.begin(), sizes.end() ) );
+    return StatusCode::FAILURE;
+  }
+
+  m_multiplicity = m_trackPt.size();
+  ATH_MSG_DEBUG( "Tool configured for chain/id: " << m_decisionId  );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigL2ElectronHypoTool::finalize()  {
+  return StatusCode::SUCCESS;
+}
+
+TrigL2ElectronHypoTool::~TrigL2ElectronHypoTool()
+{}
+
+bool TrigL2ElectronHypoTool::decideOnSingleObject( const xAOD::TrigElectron* electron, 
+						   size_t cutIndex ) const {
+  using namespace Monitored;
+  auto cutCounter = MonitoredScalar::declare<int>( "CutCounter", -1 );  
+  auto cutIndexM  = MonitoredScalar::declare<int>( "CutIndex", cutIndex );  // one can do 2D plots for each cut independently
+  auto ptCalo     = MonitoredScalar::declare( "PtCalo", -999. );
+  auto ptTrack    = MonitoredScalar::declare( "PtTrack", -999. );
+  auto dEtaCalo   = MonitoredScalar::declare( "CaloTrackEta", -1. );
+  auto dPhiCalo   = MonitoredScalar::declare( "CaloTrackPhi", -1. );
+  auto eToverPt   = MonitoredScalar::declare( "CaloTrackEoverP", -1. );
+  auto caloEta    = MonitoredScalar::declare( "CaloEta", -100. );
+  auto caloPhi    = MonitoredScalar::declare( "CaloEta", -100. );
+  auto monitorIt  = MonitoredScope::declare( m_monTool, 
+					     cutCounter, cutIndexM,
+					     ptCalo, ptTrack,    
+					     dEtaCalo, dPhiCalo,   
+					     eToverPt,   
+					     caloEta, caloPhi );
+
+  const xAOD::TrackParticle* trkIter = electron-> trackParticle();
+  if ( trkIter == 0 )  // disconsider candidates without track
+    return  false;
+  cutCounter++;
+
+  // Retrieve all quantities
+  dPhiCalo    = electron->trkClusDphi();
+  dEtaCalo    = electron->trkClusDeta();
+  ptCalo      = electron->pt();	  
+  eToverPt    = electron->etOverPt();	  
+
+  caloEta     = electron->caloEta();
+  caloPhi     = electron->caloPhi();
+
+  float NTRHits     = ( float )( electron->nTRTHits() );
+  float NStrawHits  = ( float )( electron->nTRTHiThresholdHits() );
+  float TRTHitRatio = NStrawHits == 0 ? 1e10 : NTRHits/NStrawHits;
+
+  ATH_MSG_VERBOSE("Cut index " << cutIndex );
+  if ( ptCalo < m_trackPt[cutIndex] ){ 
+    ATH_MSG_VERBOSE( "Fails pt cut" << ptCalo << " < " << m_trackPt[cutIndex] );
+    return  false;
+  }
+  cutCounter++;
+
+  if ( dEtaCalo > m_caloTrackDEta[cutIndex] ) {
+    ATH_MSG_VERBOSE( "Fails dEta cut " << dEtaCalo << " < " << m_caloTrackDEta[cutIndex] );
+    return  false;
+  }
+  cutCounter++;
+  if ( dPhiCalo > m_caloTrackDPhi[cutIndex] ) {
+    ATH_MSG_VERBOSE( "Fails dPhi cut " << dPhiCalo << " < " << m_caloTrackDPhi[cutIndex] );
+    return  false;
+  }
+
+  cutCounter++;
+  if( eToverPt <  m_caloTrackdEoverPLow[cutIndex] ) {
+    ATH_MSG_VERBOSE( "Fails eoverp low cut " << eToverPt << " < " <<  m_caloTrackdEoverPLow[cutIndex] );
+    return  false;
+  }
+  cutCounter++;
+  if ( eToverPt > m_caloTrackdEoverPHigh[cutIndex] ) {
+    ATH_MSG_VERBOSE( "Fails eoverp high cut " << eToverPt << " < " << m_caloTrackdEoverPHigh[cutIndex] );
+    return  false;
+  }
+  cutCounter++;
+  if ( TRTHitRatio < m_trtRatio[cutIndex] ){
+    ATH_MSG_VERBOSE( "Fails TRT cut " << TRTHitRatio << " < " << m_trtRatio[cutIndex] );
+    return  false;
+  }
+  cutCounter++;
+  ATH_MSG_DEBUG("Passed selection");
+  return  true;
+
+}
+
+StatusCode TrigL2ElectronHypoTool::inclusiveSelection( std::vector<Input>& input ) const {
+    for ( auto i: input ) {
+      if ( m_respectPreviousDecision 
+	   and ( i.previousDecisionIDs.count( m_decisionId.numeric() ) == 0 ) ) continue; // the decision was negative or not even made in previous stage
+
+      auto objDecision = decideOnSingleObject( i.electron, 0 );
+      if ( objDecision == true ) {
+	addDecisionID( m_decisionId.numeric(), i.decision );
+      }
+    }
+    return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigL2ElectronHypoTool::markPassing( std::vector<Input>& input, const std::set<size_t>& passing ) const {
+
+  for ( auto idx: passing ) 
+    addDecisionID( m_decisionId.numeric(), input[idx].decision );
+  return StatusCode::SUCCESS;
+}
+
+
+StatusCode TrigL2ElectronHypoTool::multiplicitySelection( std::vector<Input>& input ) const {
+  HLT::Index2DVec passingSelection( m_multiplicity );
+  
+  for ( size_t cutIndex = 0; cutIndex < m_multiplicity; ++ cutIndex ) {
+    size_t elIndex;
+    for ( auto elIter =  input.begin(); elIter != input.end(); ++elIter, ++elIndex ) {
+      if ( m_respectPreviousDecision 
+	   and ( elIter->previousDecisionIDs.count( m_decisionId.numeric() ) == 0 ) ) continue;
+
+      if ( decideOnSingleObject( elIter->electron, cutIndex ) ) 
+	passingSelection[cutIndex].push_back( elIndex );
+    }
+    // checking if by chance noe of the objects passed the single obj selection, if so there will be no valid combination and we can skip
+    if ( passingSelection[cutIndex].empty() ) {
+      ATH_MSG_DEBUG( "No object passed selection " << cutIndex << " rejecting" );
+      return StatusCode::SUCCESS;
+    }
+  }
+  
+  // go to the tedious counting
+  std::set<size_t> passingIndices;
+  if ( m_decisionPerCluster ) {            
+    // additional constrain has to be applied for each combination
+    // from each combination we extract set of clustusters associated to it
+    // if all are distinct then size of the set should be == size of combination, 
+    // if size of clusters is smaller then the combination consists of electrons from the same RoI
+    // and ought to be ignored
+    auto notFromSameRoI = [&]( const HLT::Index1DVec& comb ) {
+      std::set<const xAOD::TrigEMCluster*> setOfClusters;
+      for ( auto index: comb ) {
+	setOfClusters.insert( input[index].cluster );
+      }
+      return setOfClusters.size() == comb.size();
+    };
+
+    HLT::elementsInUniqueCombinations( passingSelection, passingIndices, notFromSameRoI );    
+  } else {
+    HLT::elementsInUniqueCombinations( passingSelection, passingIndices );
+  }
+  
+  return markPassing( input, passingIndices );
+}
+
+StatusCode TrigL2ElectronHypoTool::decide(  std::vector<Input>& input )  const{
+  // handle the simplest and most common case ( multiplicity == 1 ) in easiest possible manner
+  if ( m_trackPt.size() == 1 ) {
+    return inclusiveSelection( input );
+
+  } else {    
+    return multiplicitySelection( input );    
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoTool.h b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..f7b728ba0682c97410d0af7842aafd5080d1c8d4
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/TrigL2ElectronHypoTool.h
@@ -0,0 +1,104 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef TRIGEGAMMAHYPO_TRIGL2ELECTRONHYPOTOOL_H
+#define TRIGEGAMMAHYPO_TRIGL2ELECTRONHYPOTOOL_H 1
+
+#include "GaudiKernel/Property.h"
+#include "CLHEP/Units/SystemOfUnits.h"
+#include "xAODTrigCalo/TrigEMCluster.h"
+#include "xAODTrigEgamma/TrigElectronContainer.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "AthenaMonitoring/GenericMonitoringTool.h"
+#include "DecisionHandling/HLTIdentifier.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+
+
+static const InterfaceID IID_TrigL2ElectronHypoTool("TrigL2ElectronHypoTool", 1, 0);
+
+/**
+ * @class Implementation of the Egamma selection for CaloClusters
+ * @brief 
+ **/
+
+
+using namespace TrigCompositeUtils;
+
+class TrigL2ElectronHypoTool
+  : virtual public ::AthAlgTool
+{ 
+ public: 
+  TrigL2ElectronHypoTool( const std::string& type, 
+			  const std::string& name, 
+			  const IInterface* parent );
+
+  virtual ~TrigL2ElectronHypoTool();
+  StatusCode initialize() override;
+  StatusCode finalize() override;
+
+  static const InterfaceID& interfaceID();
+
+
+  struct Input {
+    Decision* decision;
+    const xAOD::TrigElectron* electron;
+    const xAOD::TrigEMCluster* cluster;
+    const DecisionIDContainer previousDecisionIDs;
+  };
+
+  /**
+   * @brief decides upon a collection of electrons
+   **/
+  StatusCode decide( std::vector<Input>& decisions )  const;
+
+  /**
+   * @brief Auxiluary method, single electron selection
+   **/
+  bool decideOnSingleObject( const xAOD::TrigElectron* electron, size_t cutIndex ) const;
+
+  /**
+   * @brief actual implementation of decide, in case of inclusive selection (one object cut)
+   **/
+  StatusCode inclusiveSelection( std::vector<Input>& input ) const;
+
+  /**
+   * @brief actual implementation of decide, in case of multiple objects selection (independentone)
+   **/
+  StatusCode multiplicitySelection( std::vector<Input>& input ) const;
+
+  /**
+   * @brief stores decisions for all object passing multiple cuts
+   * The passsingSelection inner vectors have to have size == input size
+   **/
+  StatusCode markPassing( std::vector<Input>& input, const std::set<size_t>& passing ) const;
+
+
+
+
+  
+ private:
+  HLT::Identifier m_decisionId;
+  Gaudi::Property<bool>  m_decisionPerCluster{ this, "DecisionPerCluster", true, "Is multiplicity requirement refering to electrons (false) or RoIs/clusters with electrons (false), relevant only in when multiplicity > 1" };
+
+  Gaudi::Property<bool>  m_respectPreviousDecision{ this, "RespectPreviousDecision", false, "If false, (do not even check), the decision made for the cluster" };
+  Gaudi::Property<bool>  m_acceptAll{ this, "AcceptAll", false, "Ignore selection" };
+  Gaudi::Property< std::vector<float> > m_trackPt{ this, "TrackPt",  { float(5.0*CLHEP::GeV) }, "Track pT requirement (separate threshold for each electron)" };
+  Gaudi::Property< std::vector<float> > m_caloTrackDEta{ this,  "CaloTrackdETA", {0}, "Delta Eta between the track and cluster"      }; //loose cut
+  Gaudi::Property< std::vector<float> > m_caloTrackDPhi{ this,  "CaloTrackdPHI", {0}, "Delta Phi between track and cluster"     }; //loose cut
+  Gaudi::Property< std::vector<float> > m_caloTrackdEoverPLow{ this,  "CaloTrackdEoverPLow", {0}, "Min E over Pt cut "};
+  Gaudi::Property< std::vector<float> > m_caloTrackdEoverPHigh{ this,  "CaloTrackdEoverPHigh", {0}, "Max E over pT cut" };
+  Gaudi::Property< std::vector<float> > m_trtRatio{ this,  "TRTRatio", {0}, "TRT HT ratio" };
+
+  
+  size_t m_multiplicity = 1;
+
+  ToolHandle<GenericMonitoringTool> m_monTool{ this, "MonTool", "", "Monitoring tool" };
+}; 
+
+inline const InterfaceID& TrigL2ElectronHypoTool::interfaceID() 
+{ 
+   return IID_TrigL2ElectronHypoTool; 
+}
+
+
+#endif //> !TRIGEGAMMAHYPO_TRIGL2CALOHYPOTOOL_H
diff --git a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx
index 55203c33d3dad7fc282247958743e61846772f9f..edabee8140ceacd1551f8e459864888201a6e443 100755
--- a/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx
+++ b/Trigger/TrigHypothesis/TrigEgammaHypo/src/components/TrigEgammaHypo_entries.cxx
@@ -14,11 +14,18 @@
 #include "TrigEgammaHypo/TrigL2PhotonFex.h"
 #include "TrigEgammaHypo/TrigL2CaloLayersHypo.h"
 
+#include "../TrigL2CaloHypoAlg.h"
+#include "../TrigL2CaloHypoTool.h"
+#include "../TrigL2ElectronFexMT.h"
+#include "../TrigL2ElectronHypoAlg.h"
+#include "../TrigL2ElectronHypoTool.h"
+
 #include "GaudiKernel/DeclareFactoryEntries.h"
 
 
 DECLARE_ALGORITHM_FACTORY( TrigL2CaloHypo )
 DECLARE_ALGORITHM_FACTORY( TrigL2ElectronFex )
+DECLARE_ALGORITHM_FACTORY( TrigL2ElectronFexMT )
 DECLARE_ALGORITHM_FACTORY( TrigL2ElectronHypo )
 DECLARE_ALGORITHM_FACTORY( TrigL2PhotonFex )
 DECLARE_ALGORITHM_FACTORY( TrigL2PhotonHypo )
@@ -31,10 +38,15 @@ DECLARE_ALGORITHM_FACTORY( TrigEFElectronHypo )
 DECLARE_ALGORITHM_FACTORY( TrigEFPhotonHypo )
 DECLARE_ALGORITHM_FACTORY( TrigEFTrackHypo )
 DECLARE_ALGORITHM_FACTORY( TrigL2CaloLayersHypo )
+DECLARE_ALGORITHM_FACTORY( TrigL2CaloHypoAlg )
+DECLARE_TOOL_FACTORY( TrigL2CaloHypoTool )
+DECLARE_ALGORITHM_FACTORY( TrigL2ElectronHypoAlg )
+DECLARE_TOOL_FACTORY( TrigL2ElectronHypoTool )
 
 DECLARE_FACTORY_ENTRIES( TrigEgammaHypo ) {
     DECLARE_ALGORITHM( TrigL2CaloHypo )
     DECLARE_ALGORITHM( TrigL2ElectronFex )
+    DECLARE_ALGORITHM( TrigL2ElectronFexMT )
     DECLARE_ALGORITHM( TrigL2ElectronHypo )
     DECLARE_ALGORITHM( TrigL2PhotonFex )
     DECLARE_ALGORITHM( TrigL2PhotonHypo )
@@ -47,5 +59,10 @@ DECLARE_FACTORY_ENTRIES( TrigEgammaHypo ) {
     DECLARE_ALGORITHM( TrigEFPhotonHypo )
     DECLARE_ALGORITHM( TrigEFTrackHypo )
     DECLARE_ALGORITHM( TrigL2CaloLayersHypo )
+    DECLARE_ALGORITHM( TrigL2CaloHypoAlg )
+    DECLARE_TOOL( TrigL2CaloHypoTool )
+    DECLARE_ALGORITHM( TrigL2ElectronHypoAlg )
+    DECLARE_TOOL( TrigL2ElectronHypoTool )
+
 }
 
diff --git a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/cmt/requirements
deleted file mode 100755
index fc19581772a3b519022e0f351a11ff7d14ee6325..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigEgammaMuonCombHypo/cmt/requirements
+++ /dev/null
@@ -1,44 +0,0 @@
-package TrigEgammaMuonCombHypo
-author Pavel Jez <Pavel.Jez@cern.ch>
-
-# General
-use 	AtlasPolicy         	AtlasPolicy-*
-use 	GaudiInterface 		GaudiInterface-* 	External
-use 	StoreGate       	StoreGate-*             Control
-#use 	DataModel       	DataModel-*             Control
-use  GeoPrimitives              GeoPrimitives-*                 DetectorDescription
-
-# Trigger 
-use     TrigInterfaces    	TrigInterfaces-*        Trigger/TrigSteer
-use     TrigSteeringEvent     	TrigSteeringEvent-*     Trigger/TrigEvent
-use     egammaEvent             egammaEvent-*           Reconstruction/egamma
-use     TrigTopoEvent		TrigTopoEvent-*		Trigger/TrigEvent
-
-
-# To produce TrigElectrons
-use     TrigCaloEvent           TrigCaloEvent-*         Trigger/TrigEvent
-use     TrigInDetEvent     	TrigInDetEvent-*     	Trigger/TrigEvent
-use     TrigParticle            TrigParticle-*          Trigger/TrigEvent
-use 	TrigMuonEvent           TrigMuonEvent-*         Trigger/TrigEvent
-
-#use 	SGTools            	 SGTools-*               	Control
-
-
-library TrigEgammaMuonCombHypo *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="TriggerConfig_*.py jobOfragment_*.py"
-
-private	
-use     AtlasReflex   	AtlasReflex-*   	External -no_auto_imports
-use     CxxUtils                CxxUtils-*              Control 
-use     ITrackToVertex          ITrackToVertex-*        Reconstruction/RecoTools  
-use     MuidEvent               MuidEvent-*             Reconstruction/MuonIdentification 
-use     VxVertex                VxVertex-*              Tracking/TrkEvent 
-
-use     xAODEgamma              xAODEgamma-*            Event/xAOD
-use 	xAODMuon                xAODMuon-*              Event/xAOD
-#use	xAODTracking            xAODTracking-*          Event/xAOD
-
-end_private
diff --git a/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.cxx b/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.cxx
index 94bb8c4b7df75ce745b2eb327c54026ba3a817ab..af9d6a814dd6696a1b266d0324272503cbfd3e78 100644
--- a/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.cxx
@@ -1,17 +1,5 @@
 /*
   Copyright (C) 1995-2017 CERN for the benefit of the ATLAS collaboration
-  
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
 */
 
 #include "TrigFTKAvailableHypo.h"
diff --git a/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.h b/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.h
index eed88f2a69ed747809f599b4bab00c3344d83ec8..e0f75798fda53b9378aa42c635c8ca579bb54205 100644
--- a/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.h
+++ b/Trigger/TrigHypothesis/TrigFTKHypo/src/TrigFTKAvailableHypo.h
@@ -1,17 +1,5 @@
 /*
   Copyright (C) 1995-2017 CERN for the benefit of the ATLAS collaboration
-  
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
 */
 
 /** @class TrigFTKAvailableHypo                                                                                                            
diff --git a/Trigger/TrigHypothesis/TrigHIHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigHIHypo/cmt/requirements
deleted file mode 100755
index 5bddbae22923790c2b693fa30f1d4d9ca11cb257..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigHIHypo/cmt/requirements
+++ /dev/null
@@ -1,41 +0,0 @@
-package TrigHIHypo
-author  Tomasz Bold <Tomasz.Bold@cern.ch>
-
-use AtlasPolicy 	AtlasPolicy-*
-
-#use     AtlasAIDA               AtlasAIDA-*             External
-
-
-use TrigCaloEvent       TrigCaloEvent-*         Trigger/TrigEvent
-use TrigInDetEvent      TrigInDetEvent-*        Trigger/TrigEvent
-use TrigSteeringEvent   TrigSteeringEvent-*     Trigger/TrigEvent
-#use TrigTimeAlgs        TrigTimeAlgs-*          Trigger/TrigTools
-
-library TrigHIHypo *.cxx components/*.cxx
-apply_pattern component_library
-
-#apply_pattern declare_joboptions files="*.py "
-apply_pattern declare_python_modules files="*.py"
-
-private
-use AtlasCLHEP          AtlasCLHEP-*            External
-use GaudiInterface      GaudiInterface-*        External
-use TrigInterfaces      TrigInterfaces-*        Trigger/TrigSteer
-use TrigMissingEtEvent  TrigMissingEtEvent-*    Trigger/TrigEvent
-use TrigMuonEvent  	TrigMuonEvent-*    	Trigger/TrigEvent
-use TrigT1Interfaces    TrigT1Interfaces-*      Trigger/TrigT1
-use Particle            Particle-*              Reconstruction
-use TrigParticle        TrigParticle-*          Trigger/TrigEvent
-use TrkParameters       TrkParameters-*         Tracking/TrkEvent
-use CaloEvent           CaloEvent-*             Calorimeter
-use CaloInterface       CaloInterface-*         Calorimeter
-use HIGlobal            HIGlobal-*              Reconstruction/HeavyIonRec
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use AthenaKernel        AthenaKernel-*          Control
-use xAODHIEvent         xAODHIEvent-*           Event/xAOD
-use xAODMuon            xAODMuon-*              Event/xAOD
-use xAODTracking        xAODTracking-*          Event/xAOD
-#use CaloGeoHelpers      CaloGeoHelpers-*        Calorimeter
-#use TestTools           TestTools-*             AtlasTest
-
-#apply_pattern UnitTest_run unit_test=HIEventShapeHelper extrapatterns=".*"
diff --git a/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx b/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx
index 3a8edd9344dfd96f8772def7c915a889cfaa98d4..46b3a0c962af1c3bc1dca8ffd5cd503cf7f603fe 100755
--- a/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx
+++ b/Trigger/TrigHypothesis/TrigHIHypo/src/TrigHIEFTrackHypo.cxx
@@ -184,7 +184,7 @@ HLT::ErrorCode TrigHIEFTrackHypo::hltExecute(const HLT::TriggerElement* outputTE
     bool ok=true;
     if (m_applyTrackCut) {
       //    int ncontrib_pixel = summary->get(Trk::numberOfContribPixelLayers);
-      int nblayer = summary->get(Trk::numberOfBLayerHits);
+      int nblayer = summary->get(Trk::numberOfInnermostPixelLayerHits);
       int npixel = summary->get(Trk::numberOfPixelHits);
       int nsct = summary->get(Trk::numberOfSCTHits);
       int ntrt = summary->get(Trk::numberOfTRTHits);
@@ -201,7 +201,7 @@ HLT::ErrorCode TrigHIEFTrackHypo::hltExecute(const HLT::TriggerElement* outputTE
       if (perigee) d0 = perigee->parameters()[Trk::d0];
       float pt = (*trkIt)->pt();
       
-//       if (summary->get(Trk::expectBLayerHit) && 
+//       if (summary->get(Trk::expectInnermostPixelLayerHit) &&
 // 	  nblayer < m_numBLayerHits) ok = false;
       if (nblayer < m_numBLayerHits) ok = false;
       if (npixel < m_numPixelHits) ok = false;
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/CMakeLists.txt b/Trigger/TrigHypothesis/TrigHLTJetHypo/CMakeLists.txt
index 6657a93f70f4f22c0d5dc4b7741b7fc7853135bd..76dc1f7dc4e78f374b142d214051c01bcead28c9 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/CMakeLists.txt
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/CMakeLists.txt
@@ -13,7 +13,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Trigger/TrigEvent/TrigParticle
                           Trigger/TrigEvent/TrigSteeringEvent
                           Trigger/TrigSteer/TrigInterfaces
-                          Trigger/TrigTools/TrigTimeAlgs )
+                          Trigger/TrigTools/TrigTimeAlgs
+                          Trigger/TrigSteer/DecisionHandling )
 
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
@@ -24,13 +25,13 @@ atlas_add_library( TrigHLTJetHypoLib
                    src/TrigHLTJetHypoUtils/*.cxx
                    PUBLIC_HEADERS TrigHLTJetHypo
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES xAODJet GaudiKernel TrigParticle TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib
+                   LINK_LIBRARIES xAODJet GaudiKernel TrigParticle TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib DecisionHandlingLib
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_component( TrigHLTJetHypo
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} xAODJet GaudiKernel TrigParticle TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib TrigHLTJetHypoLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} xAODJet GaudiKernel TrigParticle TrigSteeringEvent TrigInterfacesLib TrigTimeAlgsLib TrigHLTJetHypoLib DecisionHandlingLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py ) 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/ITrigHLTJetHypoTool.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/ITrigHLTJetHypoTool.h
new file mode 100755
index 0000000000000000000000000000000000000000..26c1bfd45baf7c842a84aa52a647e46f83acb844
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/ITrigHLTJetHypoTool.h
@@ -0,0 +1,24 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_ITRIGHLTJETHYPOTOOL_H
+#define TRIGHLTJETHYPO_ITRIGHLTJETHYPOTOOL_H
+
+#include "GaudiKernel/IAlgTool.h"
+#include "xAODJet/JetContainer.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+
+class ITrigHLTJetHypoTool : virtual public IAlgTool {
+public:
+   static const InterfaceID& interfaceID() {
+     static const InterfaceID _ITrigHLTJetHypoToolID("ITrigHLTJetHypoTool", 
+                                                     1, 
+                                                     0 );
+     return _ITrigHLTJetHypoToolID;
+   }
+
+  virtual StatusCode decide(const xAOD::JetContainer*, bool&) const = 0;
+  virtual TrigCompositeUtils::DecisionID decisionId() const = 0; 
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo2.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo2.h
index 163e8443239806603071f586d4558f164996f6a1..e1ebc95ad7adf37d9aaac056481ec85585a55091 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo2.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo2.h
@@ -47,6 +47,7 @@ class TrigHLTJetHypo2 : public HLT::HypoAlgo {
   bool checkTLAStrategy();
   bool checkDijetMassDEtaStrategy();
   bool checkHTStrategy();
+  bool checksinglemassStrategy();
 
   void setCleaner();
 
@@ -55,9 +56,12 @@ class TrigHLTJetHypo2 : public HLT::HypoAlgo {
   bool setTLAConditions();
   bool setDijetMassDEtaConditions();
   bool setHTConditions();
+  bool setsinglemassConditions();
 
   bool setJetGrouper(HypoStrategy);
 
+  std::vector<double> getStringBoundaries (const std::vector<std::string>& stv);
+
   HLT::ErrorCode checkJets(const xAOD::JetContainer*);
   void publishResult(const TrigHLTJetHypoHelper&, bool,
                      const xAOD::JetContainer*&);
@@ -79,6 +83,8 @@ class TrigHLTJetHypo2 : public HLT::HypoAlgo {
   // vectors with Et thresholds, eta nins and eta maxs
   // (thresh, eta min, eta max) triplets will bbe converted to Conditon objs.
   std::vector<double> m_EtThresholds;
+  std::vector<std::string> m_JetMassMin;
+  std::vector<std::string> m_JetMassMax;
   std::vector<double> m_etaMins;
   std::vector<double> m_etaMaxs;
   std::vector<int> m_asymmetricEtas;
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoBase.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoBase.h
new file mode 100644
index 0000000000000000000000000000000000000000..44230bc840e54032aa796fdc82399503cef36448
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoBase.h
@@ -0,0 +1,158 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_TRIGHLTJETHYPOBASE_H
+#define TRIGHLTJETHYPO_TRIGHLTJETHYPOBASE_H
+/********************************************************************
+ *
+ * NAME:     TrigHLTJetHypoBase.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ * CREATED:  February 13, 2017
+ *           
+ *
+ *********************************************************************/
+
+#include "TrigInterfaces/HypoAlgo.h"
+#include "TrigTimeAlgs/TrigTimerSvc.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerBridge.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+#include <memory>
+#include <chrono>
+
+class TriggerElement;
+class TrigHLTJetHypoHelper;
+
+using namespace std::chrono;
+
+class TrigHLTJetHypoBase : public HLT::HypoAlgo {
+
+ public:
+
+  TrigHLTJetHypoBase(const std::string& name, ISvcLocator* pSvcLocator);
+  ~TrigHLTJetHypoBase();
+
+  HLT::ErrorCode hltInitialize();
+  HLT::ErrorCode hltFinalize();
+  HLT::ErrorCode hltExecute(const HLT::TriggerElement* outputTE, bool& pass);
+
+ protected:
+
+  // set values provided by sub classes
+  void setConditions();
+  void setJetGrouper();
+
+  virtual std::vector<std::shared_ptr<ICleaner>> getCleaners() const = 0;  // sub class provides                                                                                                       
+  virtual std::shared_ptr<IJetGrouper> getJetGrouper() const = 0 ; // subclass provides
+  virtual Conditions getConditions() const = 0;  // sub class provides
+  virtual bool checkVals()  const = 0;  // sub class provides
+
+  void addCleaner(const CleanerBridge&);
+
+ private:
+  
+  void setCleaners();
+
+  HLT::ErrorCode checkJets(const xAOD::JetContainer*);
+  void publishResult(const TrigHLTJetHypoHelper&, bool,
+                     const xAOD::JetContainer*&);
+  void bumpCounters(bool, int);
+  void monitorLeadingJet(const xAOD::Jet* jet);
+  void writeDebug(bool,
+                  const HypoJetVector&,
+                  const HypoJetVector&) const;
+
+  HLT::ErrorCode 
+    markAndStorePassingJets(const TrigHLTJetHypoHelper&,
+                            const xAOD::JetContainer*,
+                            const HLT::TriggerElement*);
+  void resetCounters();
+
+  void accumulateTime(nanoseconds) noexcept;
+
+  std::string m_chainName;  // used for configuration of dimass chains
+
+
+  // Dijets
+  /*double m_invm;
+    double m_deta;*/
+
+  int m_accepted;
+  int m_rejected;
+  int m_errors;
+
+  // Switch to accept all the events.
+
+  bool m_acceptAll;
+
+  // Switch on Monitoring:
+  
+  bool m_doMonitoring;
+
+  int m_cutCounter;
+  double m_njet;
+  double m_et;
+  double m_eta;
+  double m_phi;
+  
+  
+  // switch on cleaning
+  
+  std::string m_cleaningAlg;  // determines cleaner obj
+  std::string m_matchingAlg;  // determines matcher obj;
+
+
+  // Cleaning parameters
+  //basic cleaning
+  float m_n90Threshold;
+  float m_presamplerThreshold;
+  float m_hecFThreshold;
+  float m_hecQThreshold;
+  float m_qmeanThreshold;
+  float m_negativeEThreshold;
+  float m_emFThreshold;
+  float m_larQThreshold;
+  //loose cleaning
+  float m_fSampMaxLooseThreshold;
+  float m_etaLooseThreshold;
+  float m_emfLowLooseThreshold;
+  float m_emfHighLooseThreshold;
+  float m_hecfLooseThreshold;
+  //Tight cleaning
+  float m_fSampMaxTightThreshold;
+  float m_etaTightThreshold;
+  float m_emfLowTightThreshold;
+  float m_emfHighTightThreshold;
+  float m_hecfTightThreshold;
+  //Long-lived particle cleaning
+  float m_fSampMaxLlpThreshold;
+  float m_negELlpThreshold;
+  float m_hecfLlpThreshold;
+  float m_hecqLlpThreshold;
+  float m_avLarQFLlpThreshold;
+
+
+  std::vector<CleanerBridge> m_cleaners;
+  std::shared_ptr<IJetGrouper> m_grouper;
+  Conditions m_conditions;
+    
+  // Timing:
+
+  ITrigTimerSvc*            m_timersvc;
+  std::vector<TrigTimer*>   m_timers;
+
+ // local code fragment timing
+
+  double m_chainTimeAv{0.}; //std::chrono
+  // double m_chainTimeSquareAv{0.}; //std::chrono
+  unsigned int m_nCalls{0};
+
+  bool m_dumpJets{false};
+};
+
+std::vector<double> getEtThresholds(const std::vector<double>& dEtas,
+                                    const std::vector<double>& etThresholds);
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetMassCondition.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetMassCondition.h
new file mode 100644
index 0000000000000000000000000000000000000000..6d04491e80c7a538ff8881c80f7351c4d5946c4e
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetMassCondition.h
@@ -0,0 +1,42 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_SINGLEJETMASSCONDITION_H
+#define TRIGHLTJETHYPO_SINGLEJETMASSCONDITION_H
+
+/********************************************************************
+ *
+ * NAME:     SingleJetMassCondition.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ * CREATED:  March 21, 2015
+ *           
+ *
+ *  Headers file for visible classes used by TrigHLTJEtHypo
+ *********************************************************************/
+
+#include <string>
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/EtaEtCondition.h"
+
+
+class SingleJetMassCondition: public EtaEtCondition{
+ public:
+  SingleJetMassCondition(double etaMin, double etaMax, double threshold, double massMin, double massMax);
+  ~SingleJetMassCondition() override {}
+
+  bool isSatisfied(const HypoJetVector&) const override;
+  bool isSatisfied(const pHypoJet&) const;
+
+  double orderingParameter() const noexcept override;
+
+  std::string toString() const noexcept override;
+
+ private:
+
+  double m_massMin;
+  double m_massMax;
+};
+
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.h
new file mode 100644
index 0000000000000000000000000000000000000000..a62e8702ba0e9ceb4da4f311aa8fe70e77f37dd3
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.h
@@ -0,0 +1,57 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_TRIGHLTJETHYPOHELPER2_H
+#define TRIGHLTJETHYPO_TRIGHLTJETHYPOHELPER2_H
+
+/**
+ * A configurable helper class to implement Jet Trigger algorithms.
+ * Initial jet removal from incomming container is done using the ICleaner predicates.
+ * The surviving jets are grouped into subsets by the IJetGroup object.
+ *
+ * The IMatcher objector owns a set of Conditions objects. The MAtcher determines 
+ * wether the container of jet groups satisfies the Conditions. If so,
+ * the event passes, otherwise it fails.
+ *
+ */
+
+#include <vector>
+#include <memory>
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerBridge.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IGroupsMatcher.h"
+
+class TrigHLTJetHypoHelper2{
+
+ public:
+  TrigHLTJetHypoHelper2(const std::vector<CleanerBridge>&,
+                      std::unique_ptr<IJetGrouper>,
+                      std::unique_ptr<IGroupsMatcher>
+                      );
+  
+  bool pass(HypoJetVector&);  // not const as updates passed and failed jets
+  
+  HypoJetVector passedJets() const noexcept;
+  HypoJetVector failedJets() const noexcept;
+  Conditions getConditions() const noexcept;
+
+  std::string toString() const;
+
+ private:
+
+  // Object to make jet groups. Jet groups
+  // are vectors of jets selected from a jet vector
+  // which is, in this case, the incoming jet vector.
+  std::unique_ptr<IJetGrouper> m_grouper;
+
+  // Object that matchs jet groups with Conditions
+  std::unique_ptr<IGroupsMatcher> m_matcher;
+
+  // Bridge objects to ICleaner predicate function objects to allow polymorphic
+  // pointers to be used with the STL (pass by value).
+  std::vector<CleanerBridge> m_cleaners;  
+
+};
+
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h
index 4653d1bd2c1e8ab94e71b85973e71ad77eb4252b..e55828494a669f9ac714eb68b34027938383b70e 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h
@@ -23,6 +23,13 @@ Conditions conditionsFactoryEtaEt(const std::vector<double>& etasMin,
                                   const std::vector<double>& thresholds,
                                   const std::vector<int>& asymmetricEtas);
 
+
+Conditions conditionsFactorysinglemass(const std::vector<double>& etasMin,
+                                  const std::vector<double>& etasMax,
+                                  const std::vector<double>& thresholds,
+                                  const std::vector<double>& jetMassMin,
+                                  const std::vector<double>& jetMassMax);
+
 // for conditionsFactory2
 Conditions conditionsFactoryDijetEtaMass(const std::vector<double>& etasMin,
                                          const std::vector<double>& etasMax,
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/getEtThresholds.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/getEtThresholds.h
new file mode 100644
index 0000000000000000000000000000000000000000..1cf827dd2eb6af61ae4dcf84c72e66fcf9f85fed
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypoUtils/getEtThresholds.h
@@ -0,0 +1,11 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_GETETTHRESHOLDS_H
+#define TRIGHLTJETHYPO_GETETTHRESHOLDS_H
+
+#include <vector>
+std::vector<double> getEtThresholds(const std::vector<double>& dEtas,
+                                    const std::vector<double>& etThresholds);
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_DijetMassDEta.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_DijetMassDEta.h
new file mode 100644
index 0000000000000000000000000000000000000000..54d8e357853a66186dcd1707427d1bc6576df2b4
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_DijetMassDEta.h
@@ -0,0 +1,47 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_DIJETMASSDETA_H
+#define TRIGHLTJETHYPO_DIJETMASSDETA_H
+/********************************************************************
+ *
+ * NAME:     Trighltjethypo_DijetMassDeta.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ *           
+ *
+ *********************************************************************/
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoBase.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+
+class TrigHLTJetHypo_DijetMassDEta : public TrigHLTJetHypoBase {
+
+ public:
+
+  TrigHLTJetHypo_DijetMassDEta(const std::string& name, 
+                               ISvcLocator* pSvcLocator);
+
+  ~TrigHLTJetHypo_DijetMassDEta();
+
+  
+  std::vector<std::shared_ptr<ICleaner>> getCleaners() const override;
+  Conditions getConditions() const override;
+  std::shared_ptr<IJetGrouper> getJetGrouper() const override;
+  bool checkVals()  const override;
+
+ private:
+
+  std::vector<double> m_EtThresholds;
+  std::vector<double> m_etaMins;
+  std::vector<double> m_etaMaxs;
+  std::vector<int> m_asymmetricEtas;
+  std::vector<double> m_massMins;
+  std::vector<double> m_massMaxs;
+  std::vector<double> m_dEtaMins;
+  std::vector<double> m_dEtaMaxs;
+
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_EtaEt.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_EtaEt.h
new file mode 100644
index 0000000000000000000000000000000000000000..7aef60b47ffc51e21051d5012d3231f616eccc50
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_EtaEt.h
@@ -0,0 +1,41 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRGHLTJETHYPO_ETAET_H
+#define TRIGHLTJETHYPO_ETAET_H
+/********************************************************************
+ *
+ * NAME:     Trighltjethypo_EtaEt.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ *           
+ *
+ *********************************************************************/
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoBase.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+
+class TrigHLTJetHypo_EtaEt : public TrigHLTJetHypoBase {
+
+ public:
+
+  TrigHLTJetHypo_EtaEt(const std::string& name, ISvcLocator* pSvcLocator);
+  ~TrigHLTJetHypo_EtaEt();
+
+  std::vector<std::shared_ptr<ICleaner>> getCleaners() const override;
+  std::shared_ptr<IJetGrouper> getJetGrouper() const override;
+  Conditions getConditions() const override;
+  bool checkVals()  const override;
+
+ private:
+  // vectors with Et thresholds, eta mins and eta maxs
+  // (thresh, eta min, eta max) triplets will bbe converted to Conditon objs.
+  std::vector<double> m_EtThresholds;
+  std::vector<double> m_etaMins;
+  std::vector<double> m_etaMaxs;
+  std::vector<int> m_asymmetricEtas;
+
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_HT.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_HT.h
new file mode 100644
index 0000000000000000000000000000000000000000..d4594fa5d4da04b41f9ca5e942b1eb34998d10b2
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_HT.h
@@ -0,0 +1,42 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_HT_H
+#define TRIGHLTJETHYPO_HT_H
+/********************************************************************
+ *
+ * NAME:     Trighltjethypo_HT.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ *           
+ *
+ *********************************************************************/
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoBase.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+
+class TrigHLTJetHypo_HT : public TrigHLTJetHypoBase {
+
+ public:
+
+  TrigHLTJetHypo_HT(const std::string& name,  ISvcLocator* pSvcLocator);
+
+  ~TrigHLTJetHypo_HT();
+
+  std::vector<std::shared_ptr<ICleaner>> getCleaners() const override;
+  std::shared_ptr<IJetGrouper> getJetGrouper() const override;
+  Conditions getConditions() const override;
+  bool checkVals()  const override;
+  
+ private:
+
+  std::vector<double> m_EtThresholds;
+  std::vector<double> m_etaMins;
+  std::vector<double> m_etaMaxs;
+
+  double m_htMin;
+
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_SMC.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_SMC.h
new file mode 100644
index 0000000000000000000000000000000000000000..8ec4d62d9d05ceed5a077a1f75027b53f1a70e8c
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_SMC.h
@@ -0,0 +1,47 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRGHLTJETHYPO_SMC_H
+#define TRIGHLTJETHYPO_SMC_H
+/********************************************************************
+ *
+ * NAME:     Trighltjethypo_SMC.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   G. Marceca
+ *           
+ *
+ *********************************************************************/
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoBase.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+
+class TrigHLTJetHypo_SMC : public TrigHLTJetHypoBase {
+
+ public:
+
+  TrigHLTJetHypo_SMC(const std::string& name, ISvcLocator* pSvcLocator);
+  ~TrigHLTJetHypo_SMC();
+
+  std::vector<std::shared_ptr<ICleaner>> getCleaners() const override;
+  std::shared_ptr<IJetGrouper> getJetGrouper() const override;
+  Conditions getConditions() const override;
+  bool checkVals()  const override;
+  
+  std::vector<double> getStringBoundaries (const std::vector<std::string>& stv) const;
+
+ private:
+  // vectors with Et thresholds, eta mins, eta maxs, mass min and mass max
+  // (thresh, eta min, eta max, mass min, mass max) triplets will bbe converted to Conditon objs.
+  std::vector<double> m_EtThresholds;
+  std::vector<double> m_etaMins;
+  std::vector<double> m_etaMaxs;
+  std::vector<std::string> m_JetMassMin;
+  std::vector<std::string> m_JetMassMax;
+  std::vector<int> m_asymmetricEtas;
+
+  float GeV = 1000.;
+
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_TLA.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_TLA.h
new file mode 100644
index 0000000000000000000000000000000000000000..df00a270a84dd3a18e50746c8da7883900d2530f
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/TrigHLTJetHypo/TrigHLTJetHypo_TLA.h
@@ -0,0 +1,45 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRGHLTJETHYPO_TLA_H
+#define TRIGHLTJETHYPO_TLA_H
+/********************************************************************
+ *
+ * NAME:     Trighltjethypo_TLA.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ *           
+ *
+ *********************************************************************/
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoBase.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+
+class TrigHLTJetHypo_TLA : public TrigHLTJetHypoBase {
+
+ public:
+
+  TrigHLTJetHypo_TLA(const std::string& name, ISvcLocator* pSvcLocator);
+  ~TrigHLTJetHypo_TLA();
+
+  std::vector<std::shared_ptr<ICleaner>> getCleaners() const override;
+  std::shared_ptr<IJetGrouper> getJetGrouper() const override;
+  Conditions getConditions() const override;
+  bool checkVals()  const override;
+
+ private:
+
+  // vector of indices find ofssets into the jet vector,
+  // and other Condition variables used for TLA style hypos.
+  std::vector<double> m_ystarMins;
+  std::vector<double> m_ystarMaxs;
+  std::vector<double> m_massMins;
+  std::vector<double> m_massMaxs;
+  std::vector<double> m_etaMins;
+  std::vector<double> m_etaMaxs;
+  std::vector<unsigned int> m_jetvec_indices; //indexed jets
+
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigHLTJetHypo/cmt/requirements
deleted file mode 100755
index 774a3689e30949263a6048353d362f7a369c9cfa..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/cmt/requirements
+++ /dev/null
@@ -1,45 +0,0 @@
-package TrigHLTJetHypo
-
-author P Sherwood <peter.sherwood@cern.ch>
-author Nuno Anjos <anjos@cern.ch>
-
-use 	AtlasPolicy         	AtlasPolicy-*
-use 	GaudiInterface 		GaudiInterface-* 	External
-use     TrigSteeringEvent      	TrigSteeringEvent-* 	Trigger/TrigEvent
-use     TrigTimeAlgs            TrigTimeAlgs-*          Trigger/TrigTools
-use     TrigInterfaces          TrigInterfaces-*        Trigger/TrigSteer
-use     xAODJet                 xAODJet-*               Event/xAOD
-use     TrigParticle            TrigParticle-*          Trigger/TrigEvent
-
-apply_pattern dual_use_library files="*.cxx TrigHLTJetHypoUtils/*.cxx"
-
-apply_pattern declare_runtime
-apply_pattern declare_joboptions files="jobOfragment_*.py TriggerConfig_*.py"
-apply_pattern declare_python_modules files="*.py"
-
-macro_append TrigHLTJetHypo_include_dirs /TrigHLTJetHypoUtils
-
-# remove tests due to coverity complaints
-# application TrigHLTJetHypoTests TrigHLTJetHypoTests.cxx
-# macro_append  TrigHLTJetHypoTests_dependencies TrigHLTJetHypoLib
-
-
-private
-# for TLorentzVector
-use     AtlasROOT               AtlasROOT-*             External
-
-# for TrigEFHLTHTHypo, TrigEFHLTJetHypo, TrigEFHLTJetMassDEta, 
-#     TrigEFHLTRazorAllTEHypo
-use     AtlasCLHEP              AtlasCLHEP-*            External
-
-# for TrigEFHLTHTHypo, TrigEFHLTJetMassDEta, TrigEFHLTRazorAllTEHypo
-# use     FourMomUtils            FourMomUtils-*          Event
-
-# for TrigEFHLTRazorAllTEHypo
-# use     JetEvent                JetEvent-*              Reconstruction/Jet
-use     TrigMissingEtEvent      TrigMissingEtEvent-*    Trigger/TrigEvent
-
-# for TrigEFHLTJetHypo, TrigEFHLTJetMassDEta, 
-# use     JetUtils                JetUtils-*              Reconstruction/Jet
-
-use   xAODTrigger             xAODTrigger-*            Event/xAOD             
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo2.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo2.cxx
index 5116ef4e1f15987f84dc1389dfa61f206a1b9427..ae781ca9de194b92b810d0707b3e6db2e640e69b 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo2.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo2.cxx
@@ -15,6 +15,7 @@
 #include <algorithm>
 #include <sstream>
 #include <stdexcept>
+#include <stdlib.h>
 #include <memory>
 #include <limits>
 //
@@ -29,6 +30,8 @@
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerFactory.h"
 
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/getEtThresholds.h"
+
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h"
@@ -47,7 +50,9 @@
 #include <map>
 #include <fstream> // debugging
 
-enum class HypoStrategy{EtaEt, HT, TLA, DijetMassDEta};
+float GeV = 1000.;
+
+enum class HypoStrategy{EtaEt, HT, TLA, DijetMassDEta, singlemass};
 
 HypoStrategy getStrategy(const std::string& s){
 
@@ -55,7 +60,8 @@ HypoStrategy getStrategy(const std::string& s){
     {"EtaEt", HypoStrategy::EtaEt},
     {"HT", HypoStrategy::HT},
     {"TLA", HypoStrategy::TLA},
-    {"DijetMassDEta", HypoStrategy::DijetMassDEta}
+    {"DijetMassDEta", HypoStrategy::DijetMassDEta},
+    {"singlemass", HypoStrategy::singlemass}
   };
 
  return m.at(s);  // throws if not found
@@ -96,6 +102,9 @@ TrigHLTJetHypo2::TrigHLTJetHypo2(const std::string& name,
   // HT parameter
   declareProperty("htMin", m_htMin = 0);
 
+  // singlemass parameter
+  declareProperty("smc_mins", m_JetMassMin);
+  declareProperty("smc_maxs", m_JetMassMax);
 
   // Dimass, Deta parameters
   //declareProperty("invm", m_invm);
@@ -353,9 +362,9 @@ HLT::ErrorCode TrigHLTJetHypo2::checkJets(const xAOD::JetContainer* outJets){
      monitorLeadingJet(*leading_jet);
    }
 
-   if(m_dumpJets){
+   //if(m_dumpJets){ //FIXME
      writeDebug(pass, helper.passedJets(), helper.failedJets());
-   }
+   //}
 
    bumpCounters(pass, helper.passedJets().size());
  }
@@ -397,16 +406,19 @@ void
     std::cout<<"\nHYPODUMP passed TrigHLTJetHypo2 Et: " 
              << p4.Et() 
              << " eta " 
-             << j->eta() 
-             << " px "
-             << p4.Px()
-             << " py "
-             << p4.Py()
-             << " pz "
-             << p4.Pz()
-             << " E "
-             << p4.E()
+             << j->eta()
+             << " mass "
+             << j->m()
              << '\n';
+        //     << " px "
+        //     << p4.Px()
+        //     << " py "
+        //     << p4.Py()
+        //     << " pz "
+        //     << p4.Pz()
+        //     << " E "
+        //     << p4.E()
+        //     << '\n';
   }
   
   for (auto j :  failedJets) {
@@ -414,16 +426,20 @@ void
     std::cout<<"\nHYPODUMP failed TrigHLTJetHypo2 Et: " 
              << p4.Et() 
              << " eta " 
-             << j->eta() 
-             << " px "
-             << p4.Px()
-             << " py "
-             << p4.Py()
-             << " pz "
-             << p4.Pz()
-             << " E "
-             << p4.E()
-               << '\n';
+             << j->eta()
+             << " mass "
+             << j->m()
+             << '\n';
+
+   //          << " px "
+   //          << p4.Px()
+   //          << " py "
+   //          << p4.Py()
+   //          << " pz "
+   //          << p4.Pz()
+   //          << " E "
+   //          << p4.E()
+   //            << '\n';
   }
   
 }
@@ -469,6 +485,7 @@ bool TrigHLTJetHypo2::checkStrategy(HypoStrategy s){
   if (s == HypoStrategy::TLA) {return checkTLAStrategy();}
   if (s == HypoStrategy::DijetMassDEta) { return checkDijetMassDEtaStrategy();}
   if (s == HypoStrategy::HT){return checkHTStrategy();}
+  if (s == HypoStrategy::singlemass){return checksinglemassStrategy();}
 
   ATH_MSG_ERROR(name() << ": no strategy checking for " << m_hypoStrategy);
   return false;
@@ -494,6 +511,27 @@ bool TrigHLTJetHypo2::checkEtaEtStrategy(){
   return true;
 }
 
+bool TrigHLTJetHypo2::checksinglemassStrategy(){
+  if (m_EtThresholds.size() != m_etaMins.size() or
+      m_EtThresholds.size() != m_etaMaxs.size() or
+      m_JetMassMin.size() != m_EtThresholds.size() or
+      m_JetMassMax.size() != m_EtThresholds.size()) {
+      
+    ATH_MSG_ERROR(name()
+                  << ": mismatch between number of thresholds, "
+                  << " eta_min, eta_max, JetMassMin, JetMassMax boundaries: "
+                  << m_EtThresholds.size() << " "
+                  << m_etaMins.size() << " "
+                  << m_etaMaxs.size() << " "
+                  << m_JetMassMin.size() << " "
+                  << m_JetMassMin.size() << " "
+                  );
+    
+    return false;
+  }
+  return true;
+}
+
 bool TrigHLTJetHypo2::checkTLAStrategy(){
     
   if (1 != m_etaMins.size() or
@@ -611,6 +649,7 @@ bool TrigHLTJetHypo2::setConditions(HypoStrategy s){
   if (s == HypoStrategy::TLA){return setTLAConditions();}
   if (s == HypoStrategy::DijetMassDEta){return setDijetMassDEtaConditions();}
   if (s == HypoStrategy::HT) {return setHTConditions();}
+  if (s == HypoStrategy::singlemass) {return setsinglemassConditions();}
 
   ATH_MSG_ERROR(name()
                 << ": no specification to set up conditions for hypo strategy: "
@@ -631,6 +670,20 @@ bool TrigHLTJetHypo2::setEtaEtConditions(){
 }
 
 
+bool TrigHLTJetHypo2::setsinglemassConditions(){
+
+  std::vector<double> m_JetMassMin_d = getStringBoundaries(m_JetMassMin);
+  std::vector<double> m_JetMassMax_d = getStringBoundaries(m_JetMassMax);
+
+  m_conditions = conditionsFactorysinglemass(m_etaMins,
+                                        m_etaMaxs,
+                                        m_EtThresholds,
+                                        m_JetMassMin_d,
+                                        m_JetMassMax_d);
+  std::sort(m_conditions.begin(), m_conditions.end(), ConditionsSorter());
+  return true;
+}
+
 bool TrigHLTJetHypo2::setTLAConditions(){
 
   m_conditions = conditionsFactoryTLA(m_etaMins, m_etaMaxs,
@@ -641,29 +694,51 @@ bool TrigHLTJetHypo2::setTLAConditions(){
   return true;
 }
 
-std::vector<double> getEtThresholds(const std::vector<double>& dEtas,
-                                    const std::vector<double>& etThresholds){
-  // Emulate the python code setup by TM
-  for (auto dEta : dEtas){
-    if (dEta > 0.) {
-      auto etThreshold = 
-        std::min(40000., 
-                 *std::min_element(etThresholds.cbegin(), 
-                                   etThresholds.cend()));
-
-      // The TM python code chooses the Alg class corresponding
-      // to the etThreshold. This class sets the threshold.
-      // It is not clear what happened if the class did not exist - 
-      // probably a crash. Here we let any threshold be  used (ie
-      // no crash on an unknown threshold)
-      return std::vector<double> {etThreshold, etThreshold};
+//std::vector<double> getEtThresholds(const std::vector<double>& dEtas,
+//                                    const std::vector<double>& etThresholds){
+//  // Emulate the python code setup by TM
+//  for (auto dEta : dEtas){
+//    if (dEta > 0.) {
+//      auto etThreshold = 
+//        std::min(40000., 
+//                 *std::min_element(etThresholds.cbegin(), 
+//                                   etThresholds.cend()));
+//
+//      // The TM python code chooses the Alg class corresponding
+//      // to the etThreshold. This class sets the threshold.
+//      // It is not clear what happened if the class did not exist - 
+//      // probably a crash. Here we let any threshold be  used (ie
+//      // no crash on an unknown threshold)
+//      return std::vector<double> {etThreshold, etThreshold};
+//    }
+//  }
+//
+//  // For invariant mass hypos without dEta cuts
+//  return std::vector<double> {0., 0.};
+//}
+
+std::vector<double> TrigHLTJetHypo2::getStringBoundaries (const std::vector<std::string>& stv) {
+
+    std::vector<double> JetMassLimit;
+
+    for (auto st : stv){
+
+      //  if (st.find("inf") != std::string::npos) {JetMassLimit.push_back(std::numeric_limits<double>::max());} 
+      //  else {JetMassLimit.push_back(std::stod(st)*GeV);}
+    
+        if (st.find("-INF") != std::string::npos) {JetMassLimit.push_back(std::numeric_limits<double>::lowest());}
+
+        else if (st.find("INF") != std::string::npos) {JetMassLimit.push_back(std::numeric_limits<double>::max());}
+
+        else {JetMassLimit.push_back(std::stod(st)*GeV);}
+    
     }
-  }
 
-  // For invariant mass hypos without dEta cuts
-  return std::vector<double> {0., 0.};
+    return JetMassLimit;
+
 }
 
+
 bool TrigHLTJetHypo2::setDijetMassDEtaConditions(){
   // emulate old behaviour of TriggerMenu to set the min Et for the jets.
   // These limits are being set in the C++ code to discourage
@@ -715,6 +790,11 @@ bool TrigHLTJetHypo2::setJetGrouper(HypoStrategy s){
     return true;
   }
 
+  if (s == HypoStrategy::singlemass){
+      m_grouper = std::make_shared<SingleJetGrouper>();
+      return true;
+  }
+
   if (s == HypoStrategy::HT){
     m_grouper = std::make_shared<AllJetsGrouper>();
     return true;
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoBase.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoBase.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..aa988305d47f8130149ed7a84107c35f6670e989
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoBase.cxx
@@ -0,0 +1,470 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     TrigHLTJetHypoBase.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+//
+// AUTHOR:   P Sherwood
+//
+// ********************************************************************
+//
+
+#include <algorithm>
+#include <sstream>
+#include <stdexcept>
+#include <memory>
+#include <limits>
+//
+// #include "GaudiKernel/MsgStream.h"
+#include "GaudiKernel/StatusCode.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoBase.h"
+
+#include "xAODJet/JetContainer.h"
+#include "xAODJet/Jet.h"
+
+#include "xAODTrigger/TrigPassBits.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerFactory.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/getEtThresholds.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/lineSplitter.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/xAODJetAsIJet.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/groupsMatcherFactory.h"
+
+#include <map>
+#include <fstream> // debugging
+
+
+TrigHLTJetHypoBase::TrigHLTJetHypoBase(const std::string& name,
+			       ISvcLocator* pSvcLocator):
+  HLT::HypoAlgo(name, pSvcLocator) {
+
+  m_accepted=0;
+  m_rejected=0;
+  m_errors=0;
+  m_timersvc = nullptr;
+
+  declareProperty("doMonitoring", m_doMonitoring = false );
+  declareProperty("AcceptAll",      m_acceptAll=false);
+  declareProperty("chain_name",      m_chainName="Unknown");
+
+  // cleaning
+  declareProperty("cleaningAlg", m_cleaningAlg = "noCleaning");
+
+  // matching. Legal: maximumBipartite, orderedCollections, selectedJets
+  declareProperty("matchingAlg", m_matchingAlg = "maximumBipartite");
+ 
+ //basic cleaning  
+  declareProperty("n90CleaningThreshold", m_n90Threshold = 2 );
+  declareProperty("presamplerCleaningThreshold", m_presamplerThreshold = 0.9 );
+  declareProperty("negativeECleaningThreshold", m_negativeEThreshold = -60e3 ); // 60 GeV
+  declareProperty("qmeanCleaningThreshold", m_qmeanThreshold = 0.8 );
+  declareProperty("HECQCleaningThreshold", m_hecQThreshold = 0.5 );
+  declareProperty("HECfCleaningThreshold", m_hecFThreshold = 0.5 );
+  declareProperty("LArQCleaningThreshold", m_larQThreshold = 0.8 );
+  declareProperty("EMfCleaningThreshold", m_emFThreshold = 0.95 );
+  //loose cleaning
+  declareProperty("fracSamplingMaxLooseThreshold", m_fSampMaxLooseThreshold = 0.8 );
+  declareProperty("etaLooseThreshold", m_etaLooseThreshold = 2.0 );
+  declareProperty("EMfLowLooseThreshold", m_emfLowLooseThreshold = 0.10 );
+  declareProperty("EMfHighLooseThreshold", m_emfHighLooseThreshold = 0.99 );
+  declareProperty("HECfLooseThreshold", m_hecfLooseThreshold = 0.85 );
+  //tight cleaning
+  declareProperty("fracSamplingMaxTightThreshold", m_fSampMaxTightThreshold = 0.8 );
+  declareProperty("etaTightThreshold", m_etaTightThreshold = 2.0 );
+  declareProperty("EMfLowTightThreshold", m_emfLowTightThreshold = 0.10 );
+  declareProperty("EMfHighTightThreshold", m_emfHighTightThreshold = 0.99 );
+  declareProperty("HECfTightThreshold", m_hecfTightThreshold = 0.85 );
+  //long-lived particle cleaning
+  declareProperty("fracSamplingMaxLlpThreshold", m_fSampMaxLlpThreshold = 0.85 );
+  declareProperty("negativeELlpThreshold", m_negELlpThreshold = 10e3 ); // 10 GeV
+  declareProperty("HECfLlpThreshold", m_hecfLlpThreshold = 0.5 );
+  declareProperty("HECQLlpThreshold", m_hecqLlpThreshold = 0.5 );
+  declareProperty("AverageLArQFLlpThreshold", m_avLarQFLlpThreshold = 0.8*65535 );
+ 
+
+  // Monitored variables...
+  declareMonitoredVariable("CutCounter", m_cutCounter);
+
+  declareMonitoredVariable("NJet", m_njet);
+  declareMonitoredVariable("Et", m_et);
+  declareMonitoredVariable("Eta", m_eta);
+  declareMonitoredVariable("Phi", m_phi);
+
+}
+
+TrigHLTJetHypoBase::~TrigHLTJetHypoBase(){
+}
+
+HLT::ErrorCode TrigHLTJetHypoBase::hltInitialize()
+{
+  ATH_MSG_INFO("in initialize()");
+
+  // Initialize timing service
+  //------------------------------
+  if( service( "TrigTimerSvc", m_timersvc).isFailure() ) {
+    ATH_MSG_WARNING(name() << ": Unable to locate TrigTimer Service");
+  }
+
+  if (m_timersvc) {
+    TrigTimer* tmp = m_timersvc->addItem("TrigHLTJetHypoBase.TrigHLTJetHypoBaseTot");
+    m_timers.push_back(tmp);
+  }
+
+  // make and store the jet cleaners
+  setCleaners();
+
+  
+  if (!checkVals()){
+    return HLT::ErrorCode(HLT::Action::ABORT_JOB,HLT::Reason::BAD_JOB_SETUP);
+  }
+
+  setConditions();
+  setJetGrouper();
+
+  if (m_conditions.empty()){
+    ATH_MSG_ERROR("Hypo set up with no conditions");
+    return HLT::ErrorCode(HLT::Action::ABORT_JOB,HLT::Reason::BAD_JOB_SETUP);
+  } 
+
+  auto matcher = groupsMatcherFactory(m_conditions);
+  auto helper = TrigHLTJetHypoHelper(m_cleaners, m_grouper, std::move(matcher));
+
+
+  // print out the TrigHLTJetHypoHelper configuration
+  ATH_MSG_INFO("TrigHLTJetHypoBase : TrigHLTJetHypoHelper for chain " 
+               << m_chainName);
+  std::string line = helper.toString();
+  std::vector<std::string> lines = lineSplitter(line, '\n');
+
+  for(auto l : lines){
+    ATH_MSG_INFO(l);
+  }
+
+  return HLT::OK;
+  
+}
+
+// ----------------------------------------------------------------------
+HLT::ErrorCode TrigHLTJetHypoBase::hltFinalize(){
+  // ----------------------------------------------------------------------
+
+  ATH_MSG_INFO("in finalize()");
+  ATH_MSG_INFO("Events accepted/rejected/errors:  "
+               << m_accepted  << " / " << m_rejected << " / "<< m_errors);
+
+
+  /*
+  double sd = 0;
+  if (m_nCalls > 0 ){
+    sd = std::sqrt( (m_chainTimeSquareAv - m_chainTimeAv)/m_chainTimeAv);
+  }
+  */
+
+  ATH_MSG_INFO("Chain "
+               << m_chainName
+               <<" TrigHLTHelper duration (us) "
+               << m_chainTimeAv
+               << " "
+               << m_nCalls);
+  
+  return HLT::OK;
+}
+
+class xAODJetAsIJetFactory{
+  /* Create a HypoJet::IJet from a xAODJet while remembering index info
+     (for example position in a Data vector of the xAODJet) */
+
+public:
+  xAODJetAsIJetFactory(): m_ind(-1){}
+  pHypoJet operator() (const xAOD::Jet* j){
+    return new HypoJet::xAODJetAsIJet(j, ++m_ind);}
+private:
+  unsigned int m_ind;
+};
+  
+// ----------------------------------------------------------------------
+HLT::ErrorCode TrigHLTJetHypoBase::hltExecute(const HLT::TriggerElement* outputTE,
+                                         bool& pass) {
+
+  ATH_MSG_DEBUG("Executing " << name() << "...");
+  ATH_MSG_DEBUG("outputTE->getId(): " << outputTE->getId());
+
+  pass=false;
+
+  resetCounters();
+  const xAOD::JetContainer* outJets(0);
+  auto status = getFeature(outputTE, outJets);
+  if (status != HLT::OK){ATH_MSG_ERROR("Jet retrieval failed"); return status;}
+
+  status = checkJets(outJets) != HLT::OK;
+  if (status != HLT::OK){
+    ATH_MSG_ERROR("Jet checks failed"); 
+    return status;
+  }
+
+  /* copy the jets to a non-constant container */
+  std::vector<const xAOD::Jet*> inJets(outJets->begin(), outJets->end());
+  
+  HypoJetVector hypoJets(outJets->size());
+
+  std::transform(outJets -> begin(),
+		 outJets -> end(),
+		 hypoJets.begin(),
+		 xAODJetAsIJetFactory());
+ 
+  // make clean matcher evey event - this sees the jets of the event.
+  auto matcher = groupsMatcherFactory(m_conditions);
+  auto helper = TrigHLTJetHypoHelper(m_cleaners, m_grouper, std::move(matcher));
+
+   /* apply cleaning and hypotheis alg */
+  ATH_MSG_DEBUG("hypo helper start... " << name() << "...");
+  ATH_MSG_DEBUG("no of jets ... " << inJets.size() << "...");
+
+  steady_clock::time_point t =  steady_clock::now();
+
+  try{
+    pass = !inJets.empty() && (m_acceptAll || helper.pass(hypoJets));
+  } catch(std::exception& e){
+    ATH_MSG_ERROR("Exception raised by the TrigHLTJetHypoHelper(: " 
+                  << e.what());
+    return HLT::ERROR;
+  }
+
+  accumulateTime(steady_clock::now() - t);
+
+  ATH_MSG_DEBUG("hypo testing done... " << name() << "...");
+
+  
+  publishResult(helper, pass, outJets);
+  status = markAndStorePassingJets(helper, outJets, outputTE);
+  if (status != HLT::OK){
+    ATH_MSG_ERROR("Trig bits storage failed"); 
+     return status;}
+  
+  // delete the xAOD::Jet wrappers
+  for(auto i : hypoJets){delete i;}
+
+  return HLT::OK;
+}
+
+HLT::ErrorCode TrigHLTJetHypoBase::checkJets(const xAOD::JetContainer* outJets){
+
+   ATH_MSG_DEBUG("Obtained JetContainer");
+
+   m_cutCounter = 0;
+
+   if(outJets == 0){
+     ATH_MSG_WARNING("Jet collection pointer is 0");
+     ++m_errors;
+     if (m_acceptAll){m_cutCounter = 1;}
+     return HLT::ERROR;
+   } else {
+     ATH_MSG_DEBUG("No of jets in: " << outJets->size());
+     return HLT::OK;
+   }
+ }
+
+
+ void 
+ TrigHLTJetHypoBase::publishResult(const TrigHLTJetHypoHelper& helper,
+			       bool pass,
+			       const xAOD::JetContainer*& outJets){
+   ATH_MSG_DEBUG("Publishing " << name() << "...");
+
+   /* The jets used to satisfy the hypo conditions may not contain 
+      the leading jet, so find this now */
+
+   if(pass){
+     auto leading_jet = std::max_element(outJets->begin(),
+                                 outJets->end(),
+                                 [](const xAOD::Jet* j0,
+                                    const xAOD::Jet* j1){
+                                   return j0->p4().Et() < j1->p4().Et();});
+
+     monitorLeadingJet(*leading_jet);
+   }
+
+   if(m_dumpJets){
+     writeDebug(pass, helper.passedJets(), helper.failedJets());
+   }
+
+   bumpCounters(pass, helper.passedJets().size());
+ }
+
+
+void TrigHLTJetHypoBase::bumpCounters(bool pass, int multiplicity){
+   if (pass){
+     ++m_accepted;
+     m_cutCounter=1;
+     m_njet = multiplicity;
+   } else {
+     ++m_rejected;
+   }
+ }
+
+void TrigHLTJetHypoBase::monitorLeadingJet(const xAOD::Jet* jet){
+   ATH_MSG_DEBUG("monitoringLeadingJet " << name() << "...");
+   m_et = jet->p4().Et();
+   m_eta = jet->eta();
+   m_phi = jet->phi();
+   ATH_MSG_DEBUG("monitoringLeadingJet done " << name() << "...");
+ }
+
+void 
+ TrigHLTJetHypoBase::writeDebug(bool pass,
+                             const HypoJetVector& passedJets,
+                             const HypoJetVector& failedJets
+                             ) const{
+  ATH_MSG_INFO("Writing debug start" << name() << "...");
+  
+  if(pass){
+    std::cout<<name()<< " event passed \n";
+  } else {
+    std::cout<<name()<< " event failed \n";
+  }
+
+  for (auto j :  passedJets) {
+    auto p4 = j->p4();
+    std::cout<<"\nHYPODUMP passed TrigHLTJetHypoBase Et: " 
+             << p4.Et() 
+             << " eta " 
+             << j->eta() 
+             << " px "
+             << p4.Px()
+             << " py "
+             << p4.Py()
+             << " pz "
+             << p4.Pz()
+             << " E "
+             << p4.E()
+             << '\n';
+  }
+  
+  for (auto j :  failedJets) {
+    auto p4 = j->p4();
+    std::cout<<"\nHYPODUMP failed TrigHLTJetHypoBase Et: " 
+             << p4.Et() 
+             << " eta " 
+             << j->eta() 
+             << " px "
+             << p4.Px()
+             << " py "
+             << p4.Py()
+             << " pz "
+             << p4.Pz()
+             << " E "
+             << p4.E()
+               << '\n';
+  }
+  
+}
+
+HLT::ErrorCode
+TrigHLTJetHypoBase::markAndStorePassingJets(const TrigHLTJetHypoHelper& helper,
+                                        const xAOD::JetContainer* outJets,
+                                        const HLT::TriggerElement* outputTE
+                                        ){
+  // TrigPassBits* bits = HLT::makeTrigPassBits(outJets);
+  std::unique_ptr<xAOD::TrigPassBits> xBits = 
+    xAOD::makeTrigPassBits<xAOD::JetContainer>(outJets);
+
+  for(auto i : helper.passedJets())
+    {
+      // HLT::markPassing( bits, (*outJets)[i->position()], outJets );
+      xBits->markPassing((*outJets)[i->position()], outJets, true); 
+    }
+  
+  // attach the trigger bits to the output trigger element
+  // return  attachBits(outputTE, bits);
+  auto sc = attachFeature(outputTE, xBits.release(), "passbits");
+  if(sc != HLT::OK) {
+    ATH_MSG_ERROR("Could not store TrigPassBits! ");
+    return sc;
+  }
+  return HLT::OK;
+}
+
+void
+TrigHLTJetHypoBase::resetCounters(){
+  m_cutCounter = -1;
+  m_njet = 0.0;
+  m_et = -99000.;
+  m_eta = -99.;
+  m_phi = -99.;
+}
+
+
+void  TrigHLTJetHypoBase::setCleaners() {
+
+  if (m_cleaningAlg != "noCleaning"){
+
+    CleanerFactory cleanerFactory(//basic cleaning
+                                  m_n90Threshold, 
+                                  m_presamplerThreshold,
+                                  m_negativeEThreshold,
+                                  //loose cleaning
+                                  m_fSampMaxLooseThreshold,
+                                  m_etaLooseThreshold,
+                                  m_emfLowLooseThreshold,
+                                  m_emfHighLooseThreshold,
+                                  m_hecfLooseThreshold,
+                                  //tight cleaning
+                                  m_fSampMaxTightThreshold,
+                                  m_etaTightThreshold,
+                                  m_emfLowTightThreshold,
+                                  m_emfHighTightThreshold,
+                                  m_hecfTightThreshold,
+                                  //long-lived particle cleaning
+                                  m_fSampMaxLlpThreshold,
+                                  m_negELlpThreshold,
+                                  m_hecfLlpThreshold,
+                                  m_hecqLlpThreshold,
+                                  m_avLarQFLlpThreshold,
+                                  m_cleaningAlg);
+    
+    m_cleaners.push_back(cleanerFactory.make());
+  }
+
+  auto cleaners = getCleaners();  // sub class supplied cleaners
+  m_cleaners.insert(m_cleaners.end(), cleaners.begin(), cleaners.end());
+  ATH_MSG_INFO("No of Cleaners " << m_cleaners.size());
+}
+  
+
+void  TrigHLTJetHypoBase::accumulateTime(nanoseconds duration) noexcept{
+
+  auto dtime = duration_cast<microseconds>(duration);
+  auto counts = dtime.count();
+  //  countssq = counts*counts;
+
+  if (m_nCalls == 0){
+    m_nCalls = 1;
+    m_chainTimeAv = counts;
+    // m_chainTimeSquareAv = countssq;
+    return;
+  }
+  
+  m_nCalls += 1;
+  m_chainTimeAv = (m_chainTimeAv * (m_nCalls - 1) +  counts)/m_nCalls;
+  //m_chainTimeSquareAv += 
+  //  (m_chainTimeSquareAv * (m_nCalls - 1) + countssq)/m_nCalls;
+}
+
+
+void  TrigHLTJetHypoBase::setConditions() {
+  m_conditions = getConditions();
+}
+
+void  TrigHLTJetHypoBase::setJetGrouper() {
+  m_grouper = getJetGrouper();
+}
+
+  
+  
+
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoTool.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..9d6c40753777a09ffc291c9e6d98cb6b20cc7975
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoTool.cxx
@@ -0,0 +1,322 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TrigHLTJetHypoTool.h"
+#include "xAODJet/JetContainer.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/xAODJetAsIJet.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/groupsMatcherFactory.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/lineSplitter.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerFactory.h"
+
+#include <limits>
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+class xAODJetAsIJetFactory{
+  /* Create a HypoJet::IJet from a xAODJet while remembering index info
+     (for example position in a Data vector of the xAODJet) */
+
+public:
+  xAODJetAsIJetFactory(): m_ind(-1){}
+  pHypoJet operator() (const xAOD::Jet* j){
+    return new HypoJet::xAODJetAsIJet(j, ++m_ind);}
+private:
+  unsigned int m_ind;
+};
+
+TrigHLTJetHypoTool::TrigHLTJetHypoTool( const std::string& type, 
+                                        const std::string& name,
+                                        const IInterface* parent ): AthAlgTool( type, name, parent ), m_id(name) {
+
+  declareProperty("AcceptAll",      m_acceptAll=false);
+  declareProperty("chain_name",      m_chainName="Unknown");
+  
+  // cleaning
+  declareProperty("cleaningAlg", m_cleaningAlg = "noCleaning");
+  
+  // matching. Legal: maximumBipartite, orderedCollections, selectedJets
+  declareProperty("matchingAlg", m_matchingAlg = "maximumBipartite");
+ 
+ //basic cleaning  
+  declareProperty("n90CleaningThreshold", m_n90Threshold = 2 );
+  declareProperty("presamplerCleaningThreshold", m_presamplerThreshold = 0.9 );
+  declareProperty("negativeECleaningThreshold", m_negativeEThreshold = -60e3 ); // 60 GeV
+  declareProperty("qmeanCleaningThreshold", m_qmeanThreshold = 0.8 );
+  declareProperty("HECQCleaningThreshold", m_hecQThreshold = 0.5 );
+  declareProperty("HECfCleaningThreshold", m_hecFThreshold = 0.5 );
+  declareProperty("LArQCleaningThreshold", m_larQThreshold = 0.8 );
+  declareProperty("EMfCleaningThreshold", m_emFThreshold = 0.95 );
+  //loose cleaning
+  declareProperty("fracSamplingMaxLooseThreshold", m_fSampMaxLooseThreshold = 0.8 );
+  declareProperty("etaLooseThreshold", m_etaLooseThreshold = 2.0 );
+  declareProperty("EMfLowLooseThreshold", m_emfLowLooseThreshold = 0.10 );
+  declareProperty("EMfHighLooseThreshold", m_emfHighLooseThreshold = 0.99 );
+  declareProperty("HECfLooseThreshold", m_hecfLooseThreshold = 0.85 );
+  //tight cleaning
+  declareProperty("fracSamplingMaxTightThreshold", m_fSampMaxTightThreshold = 0.8 );
+  declareProperty("etaTightThreshold", m_etaTightThreshold = 2.0 );
+  declareProperty("EMfLowTightThreshold", m_emfLowTightThreshold = 0.10 );
+  declareProperty("EMfHighTightThreshold", m_emfHighTightThreshold = 0.99 );
+  declareProperty("HECfTightThreshold", m_hecfTightThreshold = 0.85 );
+  //long-lived particle cleaning
+  declareProperty("fracSamplingMaxLlpThreshold", m_fSampMaxLlpThreshold = 0.85 );
+  declareProperty("negativeELlpThreshold", m_negELlpThreshold = 10e3 ); // 10 GeV
+  declareProperty("HECfLlpThreshold", m_hecfLlpThreshold = 0.5 );
+  declareProperty("HECQLlpThreshold", m_hecqLlpThreshold = 0.5 );
+  declareProperty("AverageLArQFLlpThreshold", m_avLarQFLlpThreshold = 0.8*65535 );
+ 
+
+  // Monitored variables...
+  /*
+  declareMonitoredVariable("NJet", m_njet);
+  declareMonitoredVariable("Et", m_et);
+  declareMonitoredVariable("Eta", m_eta);
+  declareMonitoredVariable("Phi", m_phi);
+  */
+}
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+StatusCode TrigHLTJetHypoTool::queryInterface( const InterfaceID& riid, 
+                                               void** ppvIf )
+{
+  if ( riid == ITrigHLTJetHypoTool::interfaceID() )  {
+    *ppvIf = (ITrigHLTJetHypoTool*)this;
+    addRef();
+    return StatusCode::SUCCESS;
+  }
+
+  return AthAlgTool::queryInterface( riid, ppvIf );
+}
+
+StatusCode TrigHLTJetHypoTool::initialize(){
+  ATH_MSG_INFO("in initialize()");
+  
+  // make and store the jet cleaners
+  setCleaners();
+
+  
+  ATH_CHECK(checkVals());
+  
+  setConditions();
+  // setJetGrouper();
+
+  ATH_CHECK(!m_conditions.empty());
+
+  auto matcher = groupsMatcherFactory(m_conditions);
+  auto grouper = getJetGrouper();
+  auto helper = TrigHLTJetHypoHelper2(m_cleaners, 
+                                      std::move(grouper), 
+                                      std::move(matcher));
+
+
+  // print out the TrigHLTJetHypoHelper configuration
+  ATH_MSG_INFO("Initializing TrigHLTJetHypoTool for chain " 
+               << m_chainName);
+  std::string line = helper.toString();
+  std::vector<std::string> lines = lineSplitter(line, '\n');
+  
+  for(auto l : lines){
+    ATH_MSG_INFO(l);
+  }
+
+  ATH_MSG_DEBUG("Tool configured for chain/id: " << m_id);
+
+  return StatusCode::SUCCESS;
+}
+
+
+
+StatusCode 
+TrigHLTJetHypoTool::decide(const xAOD::JetContainer* jets, 
+                               bool& pass) const {
+  ATH_MSG_DEBUG("Executing " << name() << "...");
+  ATH_CHECK(jets != nullptr);
+
+  // resetCounters();
+
+  HypoJetVector hypoJets(jets->size());
+
+  std::transform(jets -> begin(),
+                 jets -> end(),
+                 hypoJets.begin(),
+                 xAODJetAsIJetFactory());
+ 
+  // make a new CleanerMatcher every event
+  auto matcher = groupsMatcherFactory(m_conditions);
+  auto grouper = getJetGrouper();
+  auto helper = TrigHLTJetHypoHelper2(m_cleaners, 
+                                      std::move(grouper), 
+                                      std::move(matcher));
+
+   /* apply cleaning and hypothesis alg */
+  ATH_MSG_DEBUG("hypo helper start... " 
+                << name() 
+                << " no of jets ... " 
+                << jets->size() 
+                << "...");
+
+  // steady_clock::time_point t =  steady_clock::now();
+
+  try{
+    pass = !jets->empty() && (m_acceptAll || helper.pass(hypoJets));
+  } catch(std::exception& e){
+    ATH_MSG_ERROR("Exception raised by the TrigHLTJetHypoHelper2: " 
+                  << e.what());
+    return StatusCode::FAILURE;
+  }
+
+  // accumulateTime(steady_clock::now() - t);
+  
+  ATH_MSG_DEBUG("hypo testing done... " << name() << "...");
+  
+  if(m_dumpJets){writeDebug(pass, helper.passedJets(), helper.failedJets());}
+
+  // delete the xAOD::Jet wrappers
+  for(auto i : hypoJets){delete i;}
+
+  return StatusCode::SUCCESS;
+}
+
+
+void  TrigHLTJetHypoTool::setCleaners() {
+
+  if (m_cleaningAlg != "noCleaning"){
+
+    CleanerFactory cleanerFactory(//basic cleaning
+                                  m_n90Threshold, 
+                                  m_presamplerThreshold,
+                                  m_negativeEThreshold,
+                                  //loose cleaning
+                                  m_fSampMaxLooseThreshold,
+                                  m_etaLooseThreshold,
+                                  m_emfLowLooseThreshold,
+                                  m_emfHighLooseThreshold,
+                                  m_hecfLooseThreshold,
+                                  //tight cleaning
+                                  m_fSampMaxTightThreshold,
+                                  m_etaTightThreshold,
+                                  m_emfLowTightThreshold,
+                                  m_emfHighTightThreshold,
+                                  m_hecfTightThreshold,
+                                  //long-lived particle cleaning
+                                  m_fSampMaxLlpThreshold,
+                                  m_negELlpThreshold,
+                                  m_hecfLlpThreshold,
+                                  m_hecqLlpThreshold,
+                                  m_avLarQFLlpThreshold,
+                                  m_cleaningAlg);
+    
+    m_cleaners.push_back(cleanerFactory.make());
+  }
+
+  auto cleaners = getCleaners();  // sub class supplied cleaners
+  m_cleaners.insert(m_cleaners.end(), cleaners.begin(), cleaners.end());
+  ATH_MSG_INFO("No of Cleaners " << m_cleaners.size());
+}
+
+/*
+void TrigHLTJetHypoTool::bumpCounters(bool pass, int multiplicity){
+   if (pass){
+     ++m_accepted;
+     m_njet = multiplicity;
+   } else {
+     ++m_rejected;
+   }
+ }
+*/
+
+void TrigHLTJetHypoTool::writeDebug(bool pass,
+                                    const HypoJetVector& passedJets,
+                                    const HypoJetVector& failedJets
+                                    ) const{
+  ATH_MSG_INFO("Writing debug start" << name() << "...");
+  
+  if(pass){
+    std::cout<<name()<< " event passed \n";
+  } else {
+    std::cout<<name()<< " event failed \n";
+  }
+
+  for (auto j :  passedJets) {
+    auto p4 = j->p4();
+    std::cout<<"\nHYPODUMP passed TrigHLTJetHypoTool Et: " 
+             << p4.Et() 
+             << " eta " 
+             << j->eta() 
+             << " px "
+             << p4.Px()
+             << " py "
+             << p4.Py()
+             << " pz "
+             << p4.Pz()
+             << " E "
+             << p4.E()
+             << '\n';
+  }
+  
+  for (auto j :  failedJets) {
+    auto p4 = j->p4();
+    std::cout<<"\nHYPODUMP failed TrigHLTJetHypoTool Et: " 
+             << p4.Et() 
+             << " eta " 
+             << j->eta() 
+             << " px "
+             << p4.Px()
+             << " py "
+             << p4.Py()
+             << " pz "
+             << p4.Pz()
+             << " E "
+             << p4.E()
+               << '\n';
+  }
+  
+}
+
+/*
+void TrigHLTJetHypoTool::resetCounters(){
+  m_njet = std::numeric_limits<int>::max();
+  m_et = std::numeric_limits<double>::max();
+  m_eta = std::numeric_limits<double>::max();
+  m_phi = std::numeric_limits<double>::max();
+}
+
+void  TrigHLTJetHypoTool::accumulateTime(nanoseconds duration) noexcept{
+
+  auto dtime = duration_cast<microseconds>(duration);
+  auto counts = dtime.count();
+  //  countssq = counts*counts;
+
+  if (m_nCalls == 0){
+    m_nCalls = 1;
+    m_chainTimeAv = counts;
+    // m_chainTimeSquareAv = countssq;
+    return;
+  }
+  
+  m_nCalls += 1;
+  m_chainTimeAv = (m_chainTimeAv * (m_nCalls - 1) +  counts)/m_nCalls;
+*/
+/* error in here somewhere
+  m_chainTimeSquareAv += 
+    (m_chainTimeSquareAv * (m_nCalls - 1) + countssq)/m_nCalls;
+*/
+/*
+}
+*/
+void  TrigHLTJetHypoTool::setConditions() {
+  m_conditions = getConditions();
+}
+
+TrigCompositeUtils::DecisionID TrigHLTJetHypoTool::decisionId() const{
+  return m_id.numeric();
+}  
+
+
+
+/*
+void  TrigHLTJetHypoTool::setJetGrouper() {
+  m_grouper = getJetGrouper();
+}
+*/
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoTool.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoTool.h
new file mode 100755
index 0000000000000000000000000000000000000000..e6b7821b1fab2d0b8daed1bd8cbb0945cd38d9da
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoTool.h
@@ -0,0 +1,123 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_TRIGHLTJETHYPOTOOL_H
+#define TRIGHLTJETHYPO_TRIGHLTJETHYPOTOOL_H
+
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "TrigHLTJetHypo/ITrigHLTJetHypoTool.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ICleaner.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerBridge.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HypoJetDefs.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJetGrouper.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.h"
+#include "DecisionHandling/HLTIdentifier.h"
+
+#include "xAODJet/Jet.h"
+
+#include <string>
+#include <chrono>
+
+using namespace std::chrono;
+using namespace TrigCompositeUtils;
+
+class TrigHLTJetHypoTool : virtual public ITrigHLTJetHypoTool, 
+// virtual public AthAlgTool {
+  public AthAlgTool {
+ public:
+  TrigHLTJetHypoTool(const std::string&, 
+                     const std::string&, 
+                     const IInterface* );
+  
+  // to allow access to the IHelloTool interface
+  StatusCode queryInterface( const InterfaceID& riid, void** ppvIf );
+  StatusCode initialize() override;
+  StatusCode decide(const xAOD::JetContainer*, bool&) const override;
+
+  DecisionID decisionId() const override;
+
+ protected:
+  
+  // set values provided by sub classes
+  void setConditions();
+  // void setJetGrouper();
+  
+  // methods provided by subclasses:
+  virtual std::vector<std::shared_ptr<ICleaner>> getCleaners() const = 0;
+  virtual std::unique_ptr<IJetGrouper> getJetGrouper() const = 0;
+  virtual Conditions getConditions() const = 0;
+  virtual StatusCode checkVals() const = 0;
+
+  void addCleaner(const CleanerBridge&);
+
+ private:
+  
+  void setCleaners();
+
+  void writeDebug(bool,
+                  const HypoJetVector&,
+                  const HypoJetVector&) const;
+
+  void accumulateTime(nanoseconds) noexcept;
+
+  std::string m_chainName;  // used for configuration of dimass chains
+
+  // Switch to accept all the events.
+  bool m_acceptAll{false};
+
+  // Switch on Monitoring:
+  bool m_doMonitoring{false};
+
+  // switch on cleaning
+  std::string m_cleaningAlg;  // determines cleaner obj
+  std::string m_matchingAlg;  // determines matcher obj;
+
+
+  // Cleaning parameters
+  //basic cleaning
+  float m_n90Threshold{0.};
+  float m_presamplerThreshold{0.};
+  float m_hecFThreshold{0.};
+  float m_hecQThreshold{0.};
+  float m_qmeanThreshold{0.};
+  float m_negativeEThreshold{0.};
+  float m_emFThreshold{0.};
+  float m_larQThreshold{0.};
+  //loose cleaning
+  float m_fSampMaxLooseThreshold{0.};
+  float m_etaLooseThreshold{0.};
+  float m_emfLowLooseThreshold{0.};
+  float m_emfHighLooseThreshold{0.};
+  float m_hecfLooseThreshold{0.};
+  //Tight cleaning
+  float m_fSampMaxTightThreshold{0.};
+  float m_etaTightThreshold{0.};
+  float m_emfLowTightThreshold{0.};
+  float m_emfHighTightThreshold{0.};
+  float m_hecfTightThreshold{0.};
+  //Long-lived particle cleaning
+  float m_fSampMaxLlpThreshold{0.};
+  float m_negELlpThreshold{0.};
+  float m_hecfLlpThreshold{0.};
+  float m_hecqLlpThreshold{0.};
+  float m_avLarQFLlpThreshold{0.};
+
+  HLT::Identifier m_id;
+
+  std::vector<CleanerBridge> m_cleaners;
+  // std::shared_ptr<IJetGrouper> m_grouper;
+  Conditions m_conditions;
+    
+  double m_chainTimeAv{0.}; //std::chrono
+  // double m_chainTimeSquareAv{0.}; //std::chrono
+  unsigned int m_nCalls{0};
+  
+  bool m_dumpJets{false};
+};
+
+std::vector<double> getEtThresholds(const std::vector<double>& dEtas,
+                                    const std::vector<double>& etThresholds);
+
+
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/SingleJetMassCondition.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/SingleJetMassCondition.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..dd7965d65b814bfbae29f736ef27a29fb85feb1c
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/SingleJetMassCondition.cxx
@@ -0,0 +1,54 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetMassCondition.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IJet.h"
+
+#include <sstream>
+#include <cmath>
+#include <TLorentzVector.h>
+
+
+SingleJetMassCondition::SingleJetMassCondition(
+        double etaMin, 
+        double etaMax, 
+        double threshold,
+        double massMin,
+        double massMax) : EtaEtCondition(etaMin, etaMax, threshold),
+m_massMin(massMin),m_massMax(massMax){}
+
+
+bool SingleJetMassCondition::isSatisfied(const pHypoJet& ip) const {
+
+  if (!EtaEtCondition::isSatisfied(ip)) 
+      return false;
+
+  auto mass = ip->m();
+  return 
+    m_massMin <= mass and
+    m_massMax > mass;
+}
+
+
+bool 
+SingleJetMassCondition::isSatisfied(const HypoJetVector& ips) 
+  const {
+  return isSatisfied(ips[0]);
+}
+
+
+std::string SingleJetMassCondition::toString() const noexcept {
+  std::stringstream ss;
+  ss << EtaEtCondition::toString()
+     << " Mass Window: massMin "
+     << m_massMin
+     << " massMax: "
+     << m_massMax
+     <<'\n';
+
+  return ss.str();
+}
+
+
+double SingleJetMassCondition::orderingParameter() const noexcept {return m_massMin;}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..bcbac1762c1c285363afd6b4d38acf2b237a8f60
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.cxx
@@ -0,0 +1,64 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/TrigHLTJetHypoHelper2.h"
+#include <algorithm>
+#include <sstream>
+
+TrigHLTJetHypoHelper2::TrigHLTJetHypoHelper2(const std::vector<CleanerBridge>& 
+                                             cleaners,
+                                             std::unique_ptr<IJetGrouper>
+                                             grouper,
+                                             std::unique_ptr<IGroupsMatcher> 
+                                             matcher) :
+  m_grouper(std::move(grouper)), 
+  m_matcher(std::move(matcher)), 
+  m_cleaners(cleaners){
+}
+
+bool TrigHLTJetHypoHelper2::pass(HypoJetVector& jets){
+  
+  HypoJetIter begin = jets.begin(); 
+  HypoJetIter end = jets.end(); 
+  for(auto cleaner: m_cleaners){end = std::partition(begin, end, cleaner);}
+
+  auto jetGroups = m_grouper->group(begin, end);
+
+  m_matcher->match(jetGroups.begin(), jetGroups.end());
+
+  return m_matcher->pass();
+
+}
+
+HypoJetVector TrigHLTJetHypoHelper2::passedJets() const noexcept{
+  return m_matcher->passedJets();
+}
+
+HypoJetVector TrigHLTJetHypoHelper2::failedJets() const noexcept{
+  return m_matcher->failedJets();
+}
+
+Conditions TrigHLTJetHypoHelper2::getConditions() const noexcept{
+  return m_matcher->getConditions();
+}
+    
+  
+std::string TrigHLTJetHypoHelper2::toString() const {
+
+  std::stringstream ss;
+
+  ss << "TrigHLTJetHypo Helper2"
+     << " Cleaners ";
+  for(auto cleaner : m_cleaners) {
+    ss << cleaner.toString() 
+       << '\n';
+  }
+
+  ss << "\n Grouper: " << m_grouper->toString() << '\n';
+
+  ss << "\n Matcher: \n";
+  ss << m_matcher -> toString();
+
+  return ss.str();
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/conditionsFactory2.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/conditionsFactory2.cxx
index a5085863d6ba81c051054d984de9eee596d2788b..d4554ca037889112e6696a4e5a974d40967f8b0f 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/conditionsFactory2.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/conditionsFactory2.cxx
@@ -14,6 +14,7 @@
 
 
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/EtaEtCondition.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetMassCondition.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/EtaEtAsymmetricCondition.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/DijetDEtaMassCondition.h"
 #include "TrigHLTJetHypo/TrigHLTJetHypoUtils/HTCondition.h"
@@ -42,6 +43,28 @@ Conditions conditionsFactoryEtaEt(const std::vector<double>& etaMins,
 }
 
 
+Conditions conditionsFactorysinglemass(const std::vector<double>& etaMins,
+                                  const std::vector<double>& etaMaxs,
+                                  const std::vector<double>& thresholds,
+                                  const std::vector<double>& jetMassMin,
+                                  const std::vector<double>& jetMassMax){
+
+  Conditions conditions;
+  for (std::size_t i = 0; i != thresholds.size(); ++i){
+    
+    std::shared_ptr<ICondition> pCondition(nullptr);
+
+//    if (asymmetricEtas[i] != 0){
+//      pCondition.reset(new EtaEtAsymmetricCondition(etaMins[i], etaMaxs[i], thresholds[i]));
+//    } else {
+      pCondition.reset(new SingleJetMassCondition(etaMins[i], etaMaxs[i], thresholds[i], jetMassMin[i], jetMassMax[i]));
+//    }
+
+    conditions.push_back(ConditionBridge(pCondition));      
+  }
+  return conditions;
+}
+
 Conditions conditionsFactoryDijetEtaMass(const std::vector<double>& etaMins,
                                          const std::vector<double>& etaMaxs,
                                          const std::vector<double>& etMins,
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/getEtThresholds.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/getEtThresholds.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..40d700156c716be40a99a141b465c35183215b15
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypoUtils/getEtThresholds.cxx
@@ -0,0 +1,30 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/getEtThresholds.h"
+#include <algorithm>
+
+
+std::vector<double> getEtThresholds(const std::vector<double>& dEtas,
+                                    const std::vector<double>& etThresholds){
+  // Emulate the python code setup by TM
+  for (auto dEta : dEtas){
+    if (dEta > 0.) {
+      auto etThreshold = 
+        std::min(40000., 
+                 *std::min_element(etThresholds.cbegin(), 
+                                   etThresholds.cend()));
+
+      // The TM python code chooses the Alg class corresponding
+      // to the etThreshold. This class sets the threshold.
+      // It is not clear what happened if the class did not exist - 
+      // probably a crash. Here we let any threshold be  used (ie
+      // no crash on an unknown threshold)
+      return std::vector<double> {etThreshold, etThreshold};
+    }
+  }
+
+  // For invariant mass hypos without dEta cuts
+  return std::vector<double> {0., 0.};
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_DijetMassDEta.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_DijetMassDEta.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..06ae5f3324e3dd27abc3c352698979f8a624962f
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_DijetMassDEta.cxx
@@ -0,0 +1,132 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     TrigHLTJet_DijetMassDEta.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+//
+// AUTHOR: P Sherwood
+//
+// ********************************************************************
+
+#include "GaudiKernel/StatusCode.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypo_DijetMassDEta.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h"
+
+
+TrigHLTJetHypo_DijetMassDEta::TrigHLTJetHypo_DijetMassDEta(const std::string& name,
+			       ISvcLocator* pSvcLocator):
+TrigHLTJetHypoBase(name, pSvcLocator) {
+
+  //Dimass dEta
+  declareProperty("EtThresholds",   m_EtThresholds );
+  declareProperty("dEta_mins", m_dEtaMins);
+  declareProperty("dEta_maxs", m_dEtaMaxs);
+  declareProperty("eta_mins", m_etaMins);
+  declareProperty("eta_maxs", m_etaMaxs);
+  declareProperty("mass_mins", m_massMins);
+  declareProperty("mass_maxs", m_massMaxs);
+  declareProperty("asymmetricEtas",   m_asymmetricEtas);
+
+}
+
+TrigHLTJetHypo_DijetMassDEta::~TrigHLTJetHypo_DijetMassDEta(){
+}
+
+
+ Conditions TrigHLTJetHypo_DijetMassDEta::getConditions() const {
+   
+   // emulate old behaviour of TriggerMenu to set the min Et for the jets.
+   // These limits are being set in the C++ code to discourage
+   // firther changes. A new hypo strategy is under development to replce this
+   // one.
+   auto dmax = std::numeric_limits<double>::max();
+
+   std::vector<double> etaMins {0., 0.};  // default from the run 1 hypo
+   std::vector<double> etaMaxs {dmax, dmax}; // C++ default from Run 1
+   std::vector<double> etThresholds = getEtThresholds(m_dEtaMins, 
+                                                      m_EtThresholds);
+   ATH_MSG_DEBUG("in setDijetMassDEtaConditions dEtamins:");
+   for(auto em : m_dEtaMins){ATH_MSG_DEBUG(em);}
+   ATH_MSG_DEBUG("in setDijetMassDEtaConditions m_EtThresholds:");
+   for(auto et : m_EtThresholds){ATH_MSG_DEBUG(et);}
+   ATH_MSG_DEBUG("in setDijetMassDEtaConditions etThresholds:");
+   for(auto et : etThresholds){ATH_MSG_DEBUG(et);}
+
+
+   auto conditions = conditionsFactoryDijetEtaMass(etaMins, etaMaxs,
+                                                   etThresholds,
+                                                   m_dEtaMins, m_dEtaMaxs,
+                                                   m_massMins, m_massMaxs);
+   
+   std::sort(conditions.begin(), conditions.end(), ConditionsSorter());
+   return conditions;
+ }
+
+
+ 
+std::shared_ptr<IJetGrouper> TrigHLTJetHypo_DijetMassDEta::getJetGrouper()  const{
+
+  return std::make_shared<CombinationsGrouper>(2);
+}
+
+
+bool TrigHLTJetHypo_DijetMassDEta::checkVals() const {
+
+  if (m_EtThresholds.size() != m_etaMins.size() or
+      m_EtThresholds.size() != m_etaMaxs.size() or
+      m_asymmetricEtas.size() != m_etaMaxs.size()){
+      
+    ATH_MSG_ERROR(name()
+                  << ": mismatch between number of thresholds "
+                  << "and eta min, max boundaries or asymmetric eta flags: "
+                  << m_EtThresholds.size() << " "
+                  << m_etaMins.size() << " "
+                  << m_etaMaxs.size() << " "
+                  << m_asymmetricEtas.size() << " "
+                  );
+    
+    return false;
+  }
+
+  bool multOK = m_EtThresholds.size() > 1;
+  bool ystarOK = (m_dEtaMins.size() < 2);
+  bool massOK = (m_massMins.size() < 2);
+  bool atLeastOne = m_dEtaMins.size() > 0 or m_massMins.size() > 0;
+  
+  if (not multOK){
+    ATH_MSG_ERROR(name() << ": size error, expect >= 2 ");
+    ATH_MSG_ERROR(name() << "Et thresholds " << m_EtThresholds);
+  }
+  
+  if (not ystarOK){
+    ATH_MSG_ERROR(name() << ": size error, expect 0 or 1");
+    ATH_MSG_ERROR(name() << " dEta_mins " <<  m_dEtaMins.size());
+    ATH_MSG_ERROR(name() << " dEta_maxs " <<  m_dEtaMaxs.size());
+  }
+  
+  if (not massOK){
+    ATH_MSG_ERROR(name() << ": size error, expect 0 or 1");
+    ATH_MSG_ERROR(name() << " mass_mins " <<  m_massMins.size());
+    ATH_MSG_ERROR(name() << " mass_maxs " <<  m_massMaxs.size());
+  }
+  
+  
+  if(not atLeastOne){
+    ATH_MSG_ERROR(name() << " neither mass nor deta limits given");
+  }
+  
+  return multOK and ystarOK and massOK and atLeastOne;
+}
+
+
+std::vector<std::shared_ptr<ICleaner>> TrigHLTJetHypo_DijetMassDEta::getCleaners () const {
+  std::vector<std::shared_ptr<ICleaner>> v;
+  return v;
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_DijetMassDEtaTool.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_DijetMassDEtaTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..2baa6a0ed8e652557574969f373d562c4a5da856
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_DijetMassDEtaTool.cxx
@@ -0,0 +1,132 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     TrigHLTJet_DijetMassDEtaTool.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+//
+// AUTHOR: P Sherwood
+//
+// ********************************************************************
+
+#include "GaudiKernel/StatusCode.h"
+#include "TrigHLTJetHypo_DijetMassDEtaTool.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CombinationsGrouper.h"
+
+
+TrigHLTJetHypo_DijetMassDEtaTool::TrigHLTJetHypo_DijetMassDEtaTool(const std::string& type,
+                                                                   const std::string& name,
+                                                                   const IInterface* parent):
+  TrigHLTJetHypoTool(type, name, parent) {
+
+  declareProperty("EtThresholds",   m_EtThresholds );
+  declareProperty("dEta_mins", m_dEtaMins);
+  declareProperty("dEta_maxs", m_dEtaMaxs);
+  declareProperty("eta_mins", m_etaMins);
+  declareProperty("eta_maxs", m_etaMaxs);
+  declareProperty("mass_mins", m_massMins);
+  declareProperty("mass_maxs", m_massMaxs);
+  declareProperty("asymmetricEtas",   m_asymmetricEtas);
+}
+
+TrigHLTJetHypo_DijetMassDEtaTool::~TrigHLTJetHypo_DijetMassDEtaTool(){
+}
+
+
+ Conditions TrigHLTJetHypo_DijetMassDEtaTool::getConditions() const {
+   
+   // emulate old behaviour of TriggerMenu to set the min Et for the jets.
+   // These limits are being set in the C++ code to discourage
+   // firther changes. A new hypo strategy is under development to replce this
+   // one.
+   auto dmax = std::numeric_limits<double>::max();
+
+   std::vector<double> etaMins {0., 0.};  // default from the run 1 hypo
+   std::vector<double> etaMaxs {dmax, dmax}; // C++ default from Run 1
+   std::vector<double> etThresholds = getEtThresholds(m_dEtaMins, 
+                                                      m_EtThresholds);
+   ATH_MSG_DEBUG("in setDijetMassDEtaConditions dEtamins:");
+   for(auto em : m_dEtaMins){ATH_MSG_DEBUG(em);}
+   ATH_MSG_DEBUG("in setDijetMassDEtaConditions m_EtThresholds:");
+   for(auto et : m_EtThresholds){ATH_MSG_DEBUG(et);}
+   ATH_MSG_DEBUG("in setDijetMassDEtaConditions etThresholds:");
+   for(auto et : etThresholds){ATH_MSG_DEBUG(et);}
+
+
+   auto conditions = conditionsFactoryDijetEtaMass(etaMins, etaMaxs,
+                                                   etThresholds,
+                                                   m_dEtaMins, m_dEtaMaxs,
+                                                   m_massMins, m_massMaxs);
+   
+   std::sort(conditions.begin(), conditions.end(), ConditionsSorter());
+   return conditions;
+ }
+
+
+ 
+std::unique_ptr<IJetGrouper> TrigHLTJetHypo_DijetMassDEtaTool::getJetGrouper()  const{
+
+  return std::make_unique<CombinationsGrouper>(2);
+}
+
+
+StatusCode TrigHLTJetHypo_DijetMassDEtaTool::checkVals() const {
+
+  if (m_EtThresholds.size() != m_etaMins.size() or
+      m_EtThresholds.size() != m_etaMaxs.size() or
+      m_asymmetricEtas.size() != m_etaMaxs.size()){
+      
+    ATH_MSG_ERROR(name()
+                  << ": mismatch between number of thresholds "
+                  << "and eta min, max boundaries or asymmetric eta flags: "
+                  << m_EtThresholds.size() << " "
+                  << m_etaMins.size() << " "
+                  << m_etaMaxs.size() << " "
+                  << m_asymmetricEtas.size() << " "
+                  );
+    
+    return false;
+  }
+
+  bool multOK = m_EtThresholds.size() > 1;
+  bool ystarOK = (m_dEtaMins.size() < 2);
+  bool massOK = (m_massMins.size() < 2);
+  bool atLeastOne = m_dEtaMins.size() > 0 or m_massMins.size() > 0;
+  
+  if (not multOK){
+    ATH_MSG_ERROR(name() << ": size error, expect >= 2 ");
+    ATH_MSG_ERROR(name() << "Et thresholds " << m_EtThresholds);
+  }
+  
+  if (not ystarOK){
+    ATH_MSG_ERROR(name() << ": size error, expect 0 or 1");
+    ATH_MSG_ERROR(name() << " dEta_mins " <<  m_dEtaMins.size());
+    ATH_MSG_ERROR(name() << " dEta_maxs " <<  m_dEtaMaxs.size());
+  }
+  
+  if (not massOK){
+    ATH_MSG_ERROR(name() << ": size error, expect 0 or 1");
+    ATH_MSG_ERROR(name() << " mass_mins " <<  m_massMins.size());
+    ATH_MSG_ERROR(name() << " mass_maxs " <<  m_massMaxs.size());
+  }
+  
+  
+  if(not atLeastOne){
+    ATH_MSG_ERROR(name() << " neither mass nor deta limits given");
+  }
+  
+  return multOK and ystarOK and massOK and atLeastOne;
+}
+
+
+std::vector<std::shared_ptr<ICleaner>> 
+TrigHLTJetHypo_DijetMassDEtaTool::getCleaners () const {
+  std::vector<std::shared_ptr<ICleaner>> v;
+  return v;
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_DijetMassDEtaTool.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_DijetMassDEtaTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..9099ed0f3e33e6dbb0a65791475550d7253caa4c
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_DijetMassDEtaTool.h
@@ -0,0 +1,49 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRIGHLTJETHYPO_DIJETMASSDETATOOL_H
+#define TRIGHLTJETHYPO_DIJETMASSDETATOOL_H
+/********************************************************************
+ *
+ * NAME:     Trighltjethypo_DijetMassDetaTool.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ *           
+ *
+ *********************************************************************/
+
+#include "TrigHLTJetHypoTool.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+
+class TrigHLTJetHypo_DijetMassDEtaTool : virtual public ITrigHLTJetHypoTool,
+  private TrigHLTJetHypoTool {
+
+ public:
+
+  TrigHLTJetHypo_DijetMassDEtaTool(const std::string& type, 
+                                   const std::string& name,
+                                   const IInterface* parent);
+
+  ~TrigHLTJetHypo_DijetMassDEtaTool();
+
+  
+  std::vector<std::shared_ptr<ICleaner>> getCleaners() const override;
+  Conditions getConditions() const override;
+  std::unique_ptr<IJetGrouper> getJetGrouper() const override;
+
+ private:
+
+  std::vector<double> m_EtThresholds;
+  std::vector<double> m_etaMins;
+  std::vector<double> m_etaMaxs;
+  std::vector<int> m_asymmetricEtas;
+  std::vector<double> m_massMins;
+  std::vector<double> m_massMaxs;
+  std::vector<double> m_dEtaMins;
+  std::vector<double> m_dEtaMaxs;
+
+  StatusCode checkVals()  const override;
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_EtaEt.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_EtaEt.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..93dacee0008c21f7825adb93d0ea2095d22149c5
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_EtaEt.cxx
@@ -0,0 +1,75 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     TrigHLTJet_EtaEt.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+//
+// AUTHOR:
+//
+// ********************************************************************
+
+#include "GaudiKernel/StatusCode.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypo_EtaEt.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h"
+
+
+TrigHLTJetHypo_EtaEt::TrigHLTJetHypo_EtaEt(const std::string& name,
+			       ISvcLocator* pSvcLocator):
+TrigHLTJetHypoBase(name, pSvcLocator) {
+
+  declareProperty("EtThresholds",   m_EtThresholds ); // Default: 40 GeV
+  declareProperty("eta_mins",   m_etaMins);
+  declareProperty("eta_maxs",   m_etaMaxs);
+  declareProperty("asymmetricEtas",   m_asymmetricEtas);
+}
+
+
+TrigHLTJetHypo_EtaEt::~TrigHLTJetHypo_EtaEt(){
+}
+
+
+Conditions TrigHLTJetHypo_EtaEt::getConditions() const {
+   auto conditions = conditionsFactoryEtaEt(m_etaMins,
+                                            m_etaMaxs,
+                                            m_EtThresholds,
+                                            m_asymmetricEtas);
+   std::sort(conditions.begin(), conditions.end(), ConditionsSorter());
+   
+   return conditions;
+ }
+
+ 
+std::shared_ptr<IJetGrouper> TrigHLTJetHypo_EtaEt::getJetGrouper() const {
+  return std::make_shared<SingleJetGrouper>();
+}
+
+bool TrigHLTJetHypo_EtaEt::checkVals() const {
+  if (m_EtThresholds.size() != m_etaMins.size() or
+      m_EtThresholds.size() != m_etaMaxs.size() or
+      m_asymmetricEtas.size() != m_etaMaxs.size()){
+      
+    ATH_MSG_ERROR(name()
+                  << ": mismatch between number of thresholds "
+                  << "and eta min, max boundaries or asymmetric eta flags: "
+                  << m_EtThresholds.size() << " "
+                  << m_etaMins.size() << " "
+                  << m_etaMaxs.size() << " "
+                  << m_asymmetricEtas.size() << " "
+                  );
+    
+    return false;
+  }
+  return true;
+}
+
+std::vector<std::shared_ptr<ICleaner>> TrigHLTJetHypo_EtaEt::getCleaners() const {
+  std::vector<std::shared_ptr<ICleaner>> v;
+  return v;
+} 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_EtaEtTool.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_EtaEtTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..b169143c8a8c9170296a30e4850a5058f160a35a
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_EtaEtTool.cxx
@@ -0,0 +1,78 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     TrigHLTJet_EtaEtTool.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+//
+// AUTHOR: P Sherwood
+//
+// ********************************************************************
+
+#include "TrigHLTJetHypo_EtaEtTool.h"
+
+#include "GaudiKernel/StatusCode.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h"
+
+
+TrigHLTJetHypo_EtaEtTool::TrigHLTJetHypo_EtaEtTool(const std::string& type,
+                                                   const std::string& name,
+                                                   const IInterface* parent):
+  TrigHLTJetHypoTool(type, name, parent) {
+
+  declareProperty("EtThresholds",   m_EtThresholds ); // Default: 40 GeV
+  declareProperty("eta_mins",   m_etaMins);
+  declareProperty("eta_maxs",   m_etaMaxs);
+  declareProperty("asymmetricEtas",   m_asymmetricEtas);
+}
+
+
+TrigHLTJetHypo_EtaEtTool::~TrigHLTJetHypo_EtaEtTool(){
+}
+
+
+Conditions TrigHLTJetHypo_EtaEtTool::getConditions() const {
+  auto conditions = conditionsFactoryEtaEt(m_etaMins,
+                                           m_etaMaxs,
+                                           m_EtThresholds,
+                                           m_asymmetricEtas);
+  std::sort(conditions.begin(), conditions.end(), ConditionsSorter());
+  
+  return conditions;
+ }
+
+ 
+std::unique_ptr<IJetGrouper> TrigHLTJetHypo_EtaEtTool::getJetGrouper() const {
+  return std::make_unique<SingleJetGrouper>();
+}
+
+StatusCode TrigHLTJetHypo_EtaEtTool::checkVals() const {
+  if (m_EtThresholds.size() != m_etaMins.size() or
+      m_EtThresholds.size() != m_etaMaxs.size() or
+      m_asymmetricEtas.size() != m_etaMaxs.size()){
+    
+    ATH_MSG_ERROR(name()
+                  << ": mismatch between number of thresholds "
+                  << "and eta min, max boundaries or asymmetric eta flags: "
+                  << m_EtThresholds.size() << " "
+                  << m_etaMins.size() << " "
+                  << m_etaMaxs.size() << " "
+                  << m_asymmetricEtas.size() << " "
+                  );
+    
+    return false;
+  }
+  return true;
+}
+
+std::vector<std::shared_ptr<ICleaner>> 
+TrigHLTJetHypo_EtaEtTool::getCleaners() const {
+  std::vector<std::shared_ptr<ICleaner>> v;
+  return v;
+} 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_EtaEtTool.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_EtaEtTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..b7bf687350f5c61f05ede4a4a22e6108ce444574
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_EtaEtTool.h
@@ -0,0 +1,44 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRGHLTJETHYPO_ETAETTOOL_H
+#define TRIGHLTJETHYPO_ETAETTOOL_H
+/********************************************************************
+ *
+ * NAME:     Trighltjethypo_EtaEtTool.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ *           
+ *
+ *********************************************************************/
+
+#include "TrigHLTJetHypoTool.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+
+class TrigHLTJetHypo_EtaEtTool: virtual public ITrigHLTJetHypoTool,
+  private TrigHLTJetHypoTool {
+ public:
+
+  TrigHLTJetHypo_EtaEtTool(const std::string& type, 
+                           const std::string& name,
+                           const IInterface* parent);
+  ~TrigHLTJetHypo_EtaEtTool();
+
+  std::vector<std::shared_ptr<ICleaner>> getCleaners() const override;
+  std::unique_ptr<IJetGrouper> getJetGrouper() const override;
+  Conditions getConditions() const override;
+
+ private:
+  // vectors with Et thresholds, eta mins and eta maxs
+  // (thresh, eta min, eta max) triplets will be converted to Conditon objs.
+  std::vector<double> m_EtThresholds;
+  std::vector<double> m_etaMins;
+  std::vector<double> m_etaMaxs;
+  std::vector<int> m_asymmetricEtas;
+
+  StatusCode checkVals()  const override;
+
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_HT.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_HT.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..cb2c8d9ae4407063f5d79114e400bf4ac9eea658
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_HT.cxx
@@ -0,0 +1,82 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     TrigHLTJet_HT.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+//
+// AUTHOR: P Sherwood
+//
+// ********************************************************************
+
+#include "GaudiKernel/StatusCode.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypo_HT.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/CleanerFactory.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/AllJetsGrouper.h"
+
+#include <limits>
+
+TrigHLTJetHypo_HT::TrigHLTJetHypo_HT(const std::string& name,
+			       ISvcLocator* pSvcLocator):
+TrigHLTJetHypoBase(name, pSvcLocator) {
+
+  declareProperty("EtThresholds",   m_EtThresholds );
+  declareProperty("eta_mins", m_etaMins);
+  declareProperty("eta_maxs", m_etaMaxs);
+  declareProperty("htMin", m_htMin = 0);
+}
+
+TrigHLTJetHypo_HT::~TrigHLTJetHypo_HT(){
+}
+
+std::vector<std::shared_ptr<ICleaner>>  TrigHLTJetHypo_HT::getCleaners()  const{
+
+  // treat the kinematic cut applied to each jet as a cleaner.                                            
+  // Wether these arre handled as a cleaner, or in the condition is                                       
+  // aribtrary, but handling them with a cleaner makes debugging easier.                                  
+  std::vector<std::shared_ptr<ICleaner>> v  {
+    makeEtaEtCleaner(m_etaMins[0],
+                     m_etaMaxs[0],
+                     m_EtThresholds[0],
+                     std::numeric_limits<double>::max())
+      };
+  return v;
+}
+
+
+Conditions TrigHLTJetHypo_HT::getConditions()  const{
+
+   auto conditions = conditionsFactoryHT(m_htMin);
+   std::sort(conditions.begin(), conditions.end(), ConditionsSorter());
+   return conditions;
+ }
+
+ 
+std::shared_ptr<IJetGrouper> TrigHLTJetHypo_HT::getJetGrouper() const {
+  return std::make_shared<AllJetsGrouper>();
+}
+
+bool TrigHLTJetHypo_HT::checkVals() const {
+  if (1 != m_etaMins.size() or
+      1 != m_etaMaxs.size() or
+      1 != m_EtThresholds.size() or
+      0. > m_htMin){
+    
+    
+    ATH_MSG_ERROR(name()
+                  << ": size != 1 or htMin illegal: "
+                  << "eta_mins" <<  m_etaMins.size() << " "
+                  << "eta_maxs" <<  m_etaMaxs.size() << " "
+                  << "et thresholds " << m_EtThresholds.size() << " "
+                  << "m_htMin " << m_htMin);
+    return false;
+  }
+  return true;
+}
+
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_SMC.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_SMC.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..670b1684066586347a880e5b3c6cd685d06f3483
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_SMC.cxx
@@ -0,0 +1,103 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     TrigHLTJet_SMC.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+//
+// AUTHOR: G. Marceca
+//
+// ********************************************************************
+
+#include "GaudiKernel/StatusCode.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypo_SMC.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h"
+
+
+TrigHLTJetHypo_SMC::TrigHLTJetHypo_SMC(const std::string& name,
+			       ISvcLocator* pSvcLocator):
+TrigHLTJetHypoBase(name, pSvcLocator) {
+
+    declareProperty("EtThresholds",   m_EtThresholds );
+    declareProperty("eta_mins",   m_etaMins);
+    declareProperty("eta_maxs",   m_etaMaxs);
+    declareProperty("asymmetricEtas",   m_asymmetricEtas);
+    declareProperty("smc_mins",   m_JetMassMin );
+    declareProperty("smc_maxs",   m_JetMassMax);
+}
+
+
+TrigHLTJetHypo_SMC::~TrigHLTJetHypo_SMC(){
+}
+
+
+Conditions TrigHLTJetHypo_SMC::getConditions() const {
+
+    std::vector<double> m_JetMassMin_d = getStringBoundaries(m_JetMassMin);
+    std::vector<double> m_JetMassMax_d = getStringBoundaries(m_JetMassMax);
+
+    auto conditions = conditionsFactorysinglemass(m_etaMins,
+            m_etaMaxs,
+            m_EtThresholds,
+            m_JetMassMin_d,
+            m_JetMassMax_d);
+    std::sort(conditions.begin(), conditions.end(), ConditionsSorter());
+
+    return conditions;
+}
+
+std::vector<double> TrigHLTJetHypo_SMC::getStringBoundaries (const std::vector<std::string>& stv) const {
+
+    std::vector<double> JetMassLimit;
+
+    for (auto st : stv){
+
+        if (st.find("-INF") != std::string::npos) {JetMassLimit.push_back(std::numeric_limits<double>::lowest());}
+
+        else if (st.find("INF") != std::string::npos) {JetMassLimit.push_back(std::numeric_limits<double>::max());}
+
+        else {JetMassLimit.push_back(std::stod(st)*GeV);}
+
+    }
+
+    return JetMassLimit;
+
+}
+
+
+ 
+std::shared_ptr<IJetGrouper> TrigHLTJetHypo_SMC::getJetGrouper() const {
+  return std::make_shared<SingleJetGrouper>();
+}
+
+bool TrigHLTJetHypo_SMC::checkVals() const {
+
+    if (m_EtThresholds.size() != m_etaMins.size() or
+            m_EtThresholds.size() != m_etaMaxs.size() or
+            m_JetMassMin.size() != m_EtThresholds.size() or
+            m_JetMassMax.size() != m_EtThresholds.size()) {
+
+        ATH_MSG_ERROR(name()
+                << ": mismatch between number of thresholds, "
+                << " eta_min, eta_max, JetMassMin, JetMassMax boundaries: "
+                << m_EtThresholds.size() << " "
+                << m_etaMins.size() << " "
+                << m_etaMaxs.size() << " "
+                << m_JetMassMin.size() << " "
+                << m_JetMassMin.size() << " "
+                );
+        return false;
+    }
+    return true;
+}
+    
+std::vector<std::shared_ptr<ICleaner>> TrigHLTJetHypo_SMC::getCleaners() const {
+  std::vector<std::shared_ptr<ICleaner>> v;
+  return v;
+} 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_SMCTool.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_SMCTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..181d7af6e33ab76c528b47f9290fcbd87ea58b4b
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_SMCTool.cxx
@@ -0,0 +1,103 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     TrigHLTJet_SMCTool.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+//
+//
+// ********************************************************************
+
+#include "GaudiKernel/StatusCode.h"
+#include "TrigHLTJetHypo_SMCTool.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/SingleJetGrouper.h"
+
+
+TrigHLTJetHypo_SMCTool::TrigHLTJetHypo_SMCTool(const std::string& type,
+                                               const std::string& name,
+                                               const IInterface* parent):
+  TrigHLTJetHypoTool(type, name, parent) {
+
+    declareProperty("EtThresholds",   m_EtThresholds );
+    declareProperty("eta_mins",   m_etaMins);
+    declareProperty("eta_maxs",   m_etaMaxs);
+    declareProperty("asymmetricEtas",   m_asymmetricEtas);
+    declareProperty("smc_mins",   m_JetMassMin );
+    declareProperty("smc_maxs",   m_JetMassMax);
+}
+
+
+TrigHLTJetHypo_SMCTool::~TrigHLTJetHypo_SMCTool(){
+}
+
+
+Conditions TrigHLTJetHypo_SMCTool::getConditions() const {
+
+    std::vector<double> m_JetMassMin_d = getStringBoundaries(m_JetMassMin);
+    std::vector<double> m_JetMassMax_d = getStringBoundaries(m_JetMassMax);
+
+    auto conditions = conditionsFactorysinglemass(m_etaMins,
+            m_etaMaxs,
+            m_EtThresholds,
+            m_JetMassMin_d,
+            m_JetMassMax_d);
+    std::sort(conditions.begin(), conditions.end(), ConditionsSorter());
+
+    return conditions;
+}
+
+std::vector<double> TrigHLTJetHypo_SMCTool::getStringBoundaries (const std::vector<std::string>& stv) const {
+
+    std::vector<double> JetMassLimit;
+
+    for (auto st : stv){
+
+        if (st.find("-INF") != std::string::npos) {JetMassLimit.push_back(std::numeric_limits<double>::lowest());}
+
+        else if (st.find("INF") != std::string::npos) {JetMassLimit.push_back(std::numeric_limits<double>::max());}
+
+        else {JetMassLimit.push_back(std::stod(st)*GeV);}
+
+    }
+
+    return JetMassLimit;
+
+}
+
+
+ 
+std::unique_ptr<IJetGrouper> TrigHLTJetHypo_SMCTool::getJetGrouper() const {
+  return std::make_unique<SingleJetGrouper>();
+}
+
+StatusCode TrigHLTJetHypo_SMCTool::checkVals() const {
+
+    if (m_EtThresholds.size() != m_etaMins.size() or
+            m_EtThresholds.size() != m_etaMaxs.size() or
+            m_JetMassMin.size() != m_EtThresholds.size() or
+            m_JetMassMax.size() != m_EtThresholds.size()) {
+
+        ATH_MSG_ERROR(name()
+                << ": mismatch between number of thresholds, "
+                << " eta_min, eta_max, JetMassMin, JetMassMax boundaries: "
+                << m_EtThresholds.size() << " "
+                << m_etaMins.size() << " "
+                << m_etaMaxs.size() << " "
+                << m_JetMassMin.size() << " "
+                << m_JetMassMin.size() << " "
+                );
+        return false;
+    }
+    return true;
+}
+    
+std::vector<std::shared_ptr<ICleaner>> TrigHLTJetHypo_SMCTool::getCleaners() const {
+  std::vector<std::shared_ptr<ICleaner>> v;
+  return v;
+} 
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_SMCTool.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_SMCTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..0029e8467f300fbfb624b7364e75053902a9f00e
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_SMCTool.h
@@ -0,0 +1,49 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRGHLTJETHYPO_SMCTOOL_H
+#define TRIGHLTJETHYPO_SMCTOOL_H
+/********************************************************************
+ *
+ * NAME:     Trighltjethypo_SMC.h
+ * PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+ *
+ * AUTHOR:   G. Marceca
+ *           
+ *
+ *********************************************************************/
+
+#include "TrigHLTJetHypoTool.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+
+class TrigHLTJetHypo_SMCTool : public TrigHLTJetHypoTool {
+
+ public:
+
+  TrigHLTJetHypo_SMCTool(const std::string& type, 
+                         const std::string& name, 
+                         const IInterface* parent);
+  ~TrigHLTJetHypo_SMCTool();
+
+  std::vector<std::shared_ptr<ICleaner>> getCleaners() const override;
+  std::unique_ptr<IJetGrouper> getJetGrouper() const override;
+  Conditions getConditions() const override;
+  StatusCode checkVals()  const override;
+  
+  std::vector<double> getStringBoundaries (const std::vector<std::string>& stv) const;
+
+ private:
+  // vectors with Et thresholds, eta mins, eta maxs, mass min and mass max
+  // (thresh, eta min, eta max, mass min, mass max) triplets will bbe converted to Conditon objs.
+  std::vector<double> m_EtThresholds;
+  std::vector<double> m_etaMins;
+  std::vector<double> m_etaMaxs;
+  std::vector<std::string> m_JetMassMin;
+  std::vector<std::string> m_JetMassMax;
+  std::vector<int> m_asymmetricEtas;
+
+  float GeV = 1000.;
+
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_TLA.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_TLA.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..195d0a41d6b0927806fab23d854fb82335cf7d88
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_TLA.cxx
@@ -0,0 +1,84 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     TrigHLTJet_TLA.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+//
+// AUTHOR: P Sherwood
+//
+// ********************************************************************
+
+#include "GaudiKernel/StatusCode.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypo_TLA.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IndexedJetsGrouper.h"
+
+
+TrigHLTJetHypo_TLA::TrigHLTJetHypo_TLA(const std::string& name,
+			       ISvcLocator* pSvcLocator):
+TrigHLTJetHypoBase(name, pSvcLocator) {
+
+  //TLA style jet indices
+  declareProperty("ystar_mins", m_ystarMins);
+  declareProperty("ystar_maxs", m_ystarMaxs);
+  declareProperty("eta_mins", m_etaMins);
+  declareProperty("eta_maxs", m_etaMaxs);
+  declareProperty("mass_mins", m_massMins);
+  declareProperty("mass_maxs", m_massMaxs);
+  declareProperty("jetvec_indices",   m_jetvec_indices);
+}
+
+TrigHLTJetHypo_TLA::~TrigHLTJetHypo_TLA(){
+}
+
+
+Conditions TrigHLTJetHypo_TLA::getConditions() const {
+   
+
+   auto conditions = conditionsFactoryTLA(m_etaMins, m_etaMaxs,
+                                          m_ystarMins, m_ystarMaxs,
+                                          m_massMins, m_massMaxs);
+   
+   std::sort(conditions.begin(), conditions.end(), ConditionsSorter());
+   return conditions;
+ }
+
+ 
+std::shared_ptr<IJetGrouper> TrigHLTJetHypo_TLA::getJetGrouper() const {
+  return std::make_shared<IndexedJetsGrouper>(m_jetvec_indices);
+}
+
+
+bool TrigHLTJetHypo_TLA::checkVals() const {
+  
+  if (1 != m_etaMins.size() or
+      1 != m_etaMaxs.size() or
+      1 != m_ystarMins.size() or
+      1 != m_ystarMaxs.size() or
+      1 != m_massMins.size() or
+      1 != m_massMaxs.size()){
+      
+      
+    ATH_MSG_ERROR(name()
+                  << ": size != 1: "
+                  << "eta_mins" <<  m_etaMins.size() << " "
+                  << "eta_maxs" <<  m_etaMaxs.size() << " "
+                  << "ystar_mins" <<  m_ystarMins.size() << " "
+                  << "ystar_maxs" <<  m_ystarMaxs.size() << " "
+                  << "mass_mins" <<  m_massMins.size() << " "
+                  << "mass_maxs" <<  m_massMaxs.size());
+    return false;
+  }
+  return true;
+}
+
+std::vector<std::shared_ptr<ICleaner>> TrigHLTJetHypo_TLA::getCleaners () const {
+  std::vector<std::shared_ptr<ICleaner>> v;
+  return v;
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_TLATool.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_TLATool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..17eacbc615ff8f50dd22e93507c5e92a0f3e942c
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_TLATool.cxx
@@ -0,0 +1,86 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// ********************************************************************
+//
+// NAME:     TrigHLTJet_TLATool.cxx
+// PACKAGE:  Trigger/TrigHypothesis/TrigHLTJetHypo
+//
+// AUTHOR: P Sherwood
+//
+// ********************************************************************
+
+#include "GaudiKernel/StatusCode.h"
+#include "TrigHLTJetHypo_TLATool.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/conditionsFactory2.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsSorter.h"
+
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/IndexedJetsGrouper.h"
+
+
+TrigHLTJetHypo_TLATool::TrigHLTJetHypo_TLATool(const std::string& type,
+                                               const std::string& name,
+                                               const IInterface* parent):
+  TrigHLTJetHypoTool(type, name, parent) {
+
+
+  //TLA style jet indices
+  declareProperty("ystar_mins", m_ystarMins);
+  declareProperty("ystar_maxs", m_ystarMaxs);
+  declareProperty("eta_mins", m_etaMins);
+  declareProperty("eta_maxs", m_etaMaxs);
+  declareProperty("mass_mins", m_massMins);
+  declareProperty("mass_maxs", m_massMaxs);
+  declareProperty("jetvec_indices",   m_jetvec_indices);
+}
+
+TrigHLTJetHypo_TLATool::~TrigHLTJetHypo_TLATool(){
+}
+
+
+Conditions TrigHLTJetHypo_TLATool::getConditions() const {
+   
+
+   auto conditions = conditionsFactoryTLA(m_etaMins, m_etaMaxs,
+                                          m_ystarMins, m_ystarMaxs,
+                                          m_massMins, m_massMaxs);
+   
+   std::sort(conditions.begin(), conditions.end(), ConditionsSorter());
+   return conditions;
+ }
+
+ 
+std::unique_ptr<IJetGrouper> TrigHLTJetHypo_TLATool::getJetGrouper() const {
+  return std::make_unique<IndexedJetsGrouper>(m_jetvec_indices);
+}
+
+
+StatusCode TrigHLTJetHypo_TLATool::checkVals() const {
+  
+  if (1 != m_etaMins.size() or
+      1 != m_etaMaxs.size() or
+      1 != m_ystarMins.size() or
+      1 != m_ystarMaxs.size() or
+      1 != m_massMins.size() or
+      1 != m_massMaxs.size()){
+      
+      
+    ATH_MSG_ERROR(name()
+                  << ": size != 1: "
+                  << "eta_mins" <<  m_etaMins.size() << " "
+                  << "eta_maxs" <<  m_etaMaxs.size() << " "
+                  << "ystar_mins" <<  m_ystarMins.size() << " "
+                  << "ystar_maxs" <<  m_ystarMaxs.size() << " "
+                  << "mass_mins" <<  m_massMins.size() << " "
+                  << "mass_maxs" <<  m_massMaxs.size());
+    return false;
+  }
+  return true;
+}
+
+std::vector<std::shared_ptr<ICleaner>> TrigHLTJetHypo_TLATool::getCleaners () const {
+  std::vector<std::shared_ptr<ICleaner>> v;
+  return v;
+}
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_TLATool.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_TLATool.h
new file mode 100644
index 0000000000000000000000000000000000000000..4e23656667fcd65a735d3ab498857404781f950a
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigHLTJetHypo_TLATool.h
@@ -0,0 +1,48 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef TRGHLTJETHYPO_TLATOOL_H
+#define TRIGHLTJETHYPO_TLATOOL_H
+/********************************************************************
+ *
+ * NAME:     Trighltjethypo_TLATool.h
+ * PACKAGE:  Trigger/TrigHypothesisg/TrigHLTJetHypo
+ *
+ * AUTHOR:   P. Sherwood
+ *           
+ *
+ *********************************************************************/
+
+#include "TrigHLTJetHypoTool.h"
+#include "TrigHLTJetHypo/TrigHLTJetHypoUtils/ConditionsDefs.h"
+
+class TrigHLTJetHypo_TLATool : virtual public ITrigHLTJetHypoTool,
+  private TrigHLTJetHypoTool {
+
+ public:
+
+  TrigHLTJetHypo_TLATool(const std::string& type,
+                         const std::string& name,
+                         const IInterface* parent);
+  ~TrigHLTJetHypo_TLATool();
+
+  std::vector<std::shared_ptr<ICleaner>> getCleaners() const override;
+  std::unique_ptr<IJetGrouper> getJetGrouper() const override;
+  Conditions getConditions() const override;
+  StatusCode checkVals()  const override;
+
+ private:
+
+  // vector of indices find ofssets into the jet vector,
+  // and other Condition variables used for TLA style hypos.
+  std::vector<double> m_ystarMins;
+  std::vector<double> m_ystarMaxs;
+  std::vector<double> m_massMins;
+  std::vector<double> m_massMaxs;
+  std::vector<double> m_etaMins;
+  std::vector<double> m_etaMaxs;
+  std::vector<unsigned int> m_jetvec_indices; //indexed jets
+
+};
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypo.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypo.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..35dd734f0737277ebf0f13f35cd8c0603126d102
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypo.cxx
@@ -0,0 +1,71 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "GaudiKernel/Property.h"
+#include "TrigJetHypo.h"
+
+TrigJetHypo::TrigJetHypo( const std::string& name, 
+                          ISvcLocator* pSvcLocator ) : 
+  ::AthReentrantAlgorithm( name, pSvcLocator ),
+  m_hypoTools(this){
+  declareProperty("HypoTools", m_hypoTools);
+}
+
+TrigJetHypo::~TrigJetHypo(){
+}
+
+StatusCode TrigJetHypo::initialize() {
+  ATH_MSG_INFO ( "Initializing " << name() << "..." );
+  CHECK(m_hypoTools.retrieve());
+  CHECK(m_jetsKey.initialize());
+  CHECK(m_decisionsKey.initialize());
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigJetHypo::finalize() {
+  ATH_MSG_INFO ( "Finalizing " << name() << "..." );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigJetHypo::execute_r( const EventContext& context ) const {  
+  ATH_MSG_DEBUG ( "Executing " << name() << "..." );
+  auto jetsHandle = SG::makeHandle(m_jetsKey, context);
+  
+  auto decisions = std::make_unique<DecisionContainer>();
+  auto aux = std::make_unique<DecisionAuxContainer>();
+  decisions->setStore(aux.get());
+  
+  // prepare decision storage
+  auto decision = newDecisionIn(decisions.get());
+  constexpr std::size_t roiCounter = 0;  // other signatures have >1 ROIs
+  decision->setObjectLink( "feature", 
+                           ElementLink<xAOD::JetContainer>(m_jetsKey.key(), 
+                                                           roiCounter));
+
+  auto jets = jetsHandle.cptr();
+
+  // loop over hypo tools (one per chain) and report acceptances.
+  for (auto tool : m_hypoTools) {
+    bool accept{false};
+    ATH_CHECK(tool->decide(jets, accept));
+
+    if (accept) {   
+      addDecisionID(tool->decisionId(), decision);
+      ATH_MSG_DEBUG( " + " << tool->name() );
+    } else {
+      ATH_MSG_DEBUG( " - " << tool->name() );
+    }
+  }
+  
+  
+  {
+    auto handle =  SG::makeHandle(m_decisionsKey, context);
+    CHECK(handle.record(std::move(decisions), std::move(aux)));
+  }
+
+  return StatusCode::SUCCESS;
+}
+
+
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypo.h b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypo.h
new file mode 100644
index 0000000000000000000000000000000000000000..45c9221151fbe59cf086f5aea74b8facb5119d15
--- /dev/null
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/TrigJetHypo.h
@@ -0,0 +1,63 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+  This initial version of TrigJetHypo is not yet production code.
+  In particular, it can read in a jet collection at given (default or
+  configured) store address, whereas different chains may require
+  different jet collections (constructed with different jet reco paramters).
+
+  Either there will need to be more than one instance of TrigJetRec,
+  or an association between chain name and collection name will ned tobe set
+  up.
+*/
+#ifndef TRIGHLTJETHYPO_TRIGJETHYPO_H
+#define TRIGHLTJETHYPO_TRIGJETHYPO_H
+
+#include <string>
+
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "TrigHLTJetHypo/ITrigHLTJetHypoTool.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+/**
+ * @class Implements jet selection for the new HLT framework
+ * @brief 
+ **/
+
+using namespace TrigCompositeUtils;
+
+
+class TrigJetHypo
+  : public ::AthReentrantAlgorithm
+{ 
+ public: 
+
+  TrigJetHypo( const std::string& name, ISvcLocator* pSvcLocator );
+
+  virtual ~TrigJetHypo(); 
+
+  StatusCode  initialize() override;
+  StatusCode  execute_r( const EventContext& context ) const override;
+  StatusCode  finalize() override;
+
+
+ private: 
+
+  ToolHandleArray<ITrigHLTJetHypoTool> m_hypoTools;
+
+  SG::ReadHandleKey<xAOD::JetContainer> m_jetsKey{
+    this, 
+      "JetCollection",  // name of python instance attribute 
+      "JetCollection",  // default store key name 
+      "jet container name in store" // doc
+      };
+
+  SG::WriteHandleKey<DecisionContainer> m_decisionsKey{
+    this,
+      "JetHypoDecisions", // name of python instance attribute
+      "JetHypoDecisions", // default store key name 
+      "name of jet hypo decisions object in store" // doc
+      };
+};
+
+
+#endif
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx
index c5423e74ca1280acac2309963a094bfa75195cc9..7846d09732437d8cdbf76cf6fec21afbb9ca89dc 100755
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/src/components/TrigHLTJetHypo_entries.cxx
@@ -3,15 +3,35 @@
 #include "TrigHLTJetHypo/TrigHLTJetHypo2.h"
 #include "TrigHLTJetHypo/TrigEFRazorAllTE.h"
 #include "TrigHLTJetHypo/TrigEFDPhiMetJetAllTE.h"
+// #include "TrigHLTJetHypo/TrigHLTJetHypo_HT.h"
+
+#include "../TrigHLTJetHypo_EtaEtTool.h"
+#include "../TrigHLTJetHypo_DijetMassDEtaTool.h"
+#include "../TrigHLTJetHypo_SMCTool.h"
+#include "../TrigHLTJetHypo_TLATool.h"
+#include "../TrigJetHypo.h"
 
 DECLARE_ALGORITHM_FACTORY(TrigHLTJetHypo2)
+DECLARE_ALGORITHM_FACTORY(TrigJetHypo)
 
 DECLARE_ALGORITHM_FACTORY(TrigEFRazorAllTE)
 DECLARE_ALGORITHM_FACTORY(TrigEFDPhiMetJetAllTE)
 
 DECLARE_FACTORY_ENTRIES(TrigHLTJetHypo) {
   DECLARE_ALGORITHM(TrigHLTJetHypo2)
+    DECLARE_ALGORITHM(TrigJetHypo)
+    // DECLARE_ALGORITHM(TrigHLTJetHypo_EtaEt)
+    // DECLARE_ALGORITHM(TrigHLTJetHypo_HT)
     DECLARE_ALGORITHM(TrigEFRazorAllTE)
     DECLARE_ALGORITHM(TrigEFDPhiMetJetAllTE)
+    DECLARE_TOOL(TrigHLTJetHypo_EtaEtTool)
+    DECLARE_TOOL(TrigHLTJetHypo_DijetDEtaMassTool)
+    DECLARE_TOOL(TrigHLTJetHypo_SMCTool)
+    DECLARE_TOOL(TrigHLTJetHypo_TLATool)
 }
 
+DECLARE_TOOL_FACTORY(TrigHLTJetHypo_EtaEtTool)
+DECLARE_TOOL_FACTORY(TrigHLTJetHypo_DijetMassDEtaTool)
+DECLARE_TOOL_FACTORY(TrigHLTJetHypo_SMCTool)
+DECLARE_TOOL_FACTORY(TrigHLTJetHypo_TLATool)
+
diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/cmt/requirements b/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/cmt/requirements
deleted file mode 100644
index 3b38b1ab7efe17c4dcf8be1bc51d794503a2c792..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigHLTJetHypoUnitTests/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package TrigHLTJetHypoUnitTests
-
-use 	AtlasPolicy         	AtlasPolicy-*
-use     AtlasGoogleTest         AtlasGoogleTest-*      External
-
-
-## application gtest1 gtest1.cxx square_root.cxx
-
-application TrigHLTJetHypoTimerTest Timer.cxx
-
-application TrigHLTJetHypoUnitTests all_tests.cxx \
-	    CombinationsGenTest.cxx \
-	    DijetDEtaMassConditionTest.cxx \
-	    EtaEtConditionTest.cxx \
-	    FlowEdgeTest.cxx \
-	    FlowNetworkTest.cxx \
-	    LlpCleanerTest.cxx \
-	    LooseCleanerTest.cxx \
-	    MaximumBipartiteMatcherTest.cxx \
-	    MultiJetMatcherTest.cxx \
-	    OrderedCollectionsMatcherTest.cxx \
-	    SelectedJetsMatcherTest.cxx \
-	    TLorentzVectorFactoryTest.cxx \
-	    TightCleanerTest.cxx
-
-# application FlowNetworkTest FlowNetworkTest.cxx
-
-private
-use TrigHLTJetHypo TrigHLTJetHypo-* Trigger/TrigHypothesis
-use AtlasROOT AtlasROOT-* External
-
diff --git a/Trigger/TrigHypothesis/TrigHypoCommonTools/cmt/requirements b/Trigger/TrigHypothesis/TrigHypoCommonTools/cmt/requirements
deleted file mode 100755
index 2ae8fa8cf81a2cfc1731497d35d10c591f857276..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigHypoCommonTools/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package TrigHypoCommonTools
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AtlasROOT                  AtlasROOT-*                     External
-use  TrigInDetEvent             TrigInDetEvent-*                Trigger/TrigEvent
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  TrigSteering               TrigSteering-*                  Trigger/TrigSteer
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  ByteStreamCnvSvcBase       ByteStreamCnvSvcBase-*          Event
-use  TrigConfInterfaces         TrigConfInterfaces-*            Trigger/TrigConfiguration
-private
-use  EventInfo                  EventInfo-*                     Event
-use  GaudiInterface             GaudiInterface-*                External
-use  PathResolver               PathResolver-*                  Tools
-use  RegionSelector             RegionSelector-*                DetectorDescription
-use  TrigT1Result               TrigT1Result-*                  Trigger/TrigT1
-end_private
-
-apply_pattern component_library
-library TrigHypoCommonTools *.cxx components/*.cxx
-
-apply_pattern declare_python_modules files="*.py"
-
-
diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/cmt/requirements
deleted file mode 100644
index 3933acaac7c8035cc77155ddea06fde1f9f327c6..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/cmt/requirements
+++ /dev/null
@@ -1,45 +0,0 @@
-package TrigLongLivedParticlesHypo
-
-author Andrea Coccaro <andrea.coccaro AT cern.ch>
-author Antonio Policicchio <antonio.policicchio AT cern.ch>
-author Stefano Giagu <stefano.giagu AT cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-
-use TrigMuonEvent	TrigMuonEvent-*		Trigger/TrigEvent
-use TrigSteeringEvent	TrigSteeringEvent-*	Trigger/TrigEvent
-use TrigInterfaces      TrigInterfaces-* 	Trigger/TrigSteer
-use TrigInDetEvent      TrigInDetEvent-*	Trigger/TrigEvent
-use TrigTimeAlgs        TrigTimeAlgs-*          Trigger/TrigTools
-use TrigCaloEvent       TrigCaloEvent-*         Trigger/TrigEvent
-
-private
-
-use DataCollection	DataCollection-*	External
-use InDetIdentifier	InDetIdentifier-*	InnerDetector/InDetDetDescr
-use InDetPrepRawData	InDetPrepRawData-*	InnerDetector/InDetRecEvent
-use IRegionSelector	IRegionSelector-*	DetectorDescription
-use TrkSpacePoint	TrkSpacePoint-*		Tracking/TrkEvent
-use xAODEventInfo	xAODEventInfo-*		Event/xAOD
-
-use xAODJet             xAODJet-*               Event/xAOD
-use xAODTracking        xAODTracking-*          Event/xAOD
-use AtlasCLHEP          AtlasCLHEP-*            External
-use AtlasROOT           AtlasROOT-*             External
-use GaudiInterface      GaudiInterface-*        External
-use CaloEvent           CaloEvent-*             Calorimeter
-use CxxUtils            CxxUtils-*              Control
-use TrigParticle	TrigParticle-*		Trigger/TrigEvent
-use xAODTrigger		xAODTrigger-*		Event/xAOD
-
-private
-apply_tag ROOTMathLibs
-end_private
-
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern component_library
-library TrigLongLivedParticlesHypo *.cxx components/*.cxx
-
diff --git a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/doc/packagedoc.h b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/doc/packagedoc.h
index aad363b1bdf06495aef0ef2e90020861aa169208..f3e3dec112335fca3373989c3396448de000093f 100644
--- a/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/doc/packagedoc.h
+++ b/Trigger/TrigHypothesis/TrigLongLivedParticlesHypo/doc/packagedoc.h
@@ -19,16 +19,6 @@ algorithm computes the number
 of tracks with a Pt > 1 GeV in a region etaxphi 0.2x0.2 
 around the jet direction. Moreover the jet has to be the non-standard value for Log(Ehad/Eem)>1.  
 
-@ref used_TrigLongLivedParticlesHypo
 
-@ref requirements_TrigLongLivedParticlesHypo
 
 */
-
-/**
-@page used_TrigLongLivedParticlesHypo Used Packages
-*/
-
-/**
-@page requirements_TrigLongLivedParticlesHypo Requirements
-*/
diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigMissingETHypo/cmt/requirements
deleted file mode 100755
index 0bf4cc18f8ef47b1ead7105fdedc31b5df1e29d8..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigMissingETHypo/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package TrigMissingETHypo
-
-author Kyle Cranmer <cranmer@cern.ch>
-author Diego Casadei <Diego.Casadei@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  TrigTimeAlgs               TrigTimeAlgs-*                  Trigger/TrigTools
-private
-use  AtlasCLHEP                 AtlasCLHEP-*                    External
-use  GaudiInterface             GaudiInterface-*                External
-use  TrigMissingEtEvent         TrigMissingEtEvent-*            Trigger/TrigEvent
-use  xAODTrigMissingET	        xAODTrigMissingET-*	            Event/xAOD
-
-end_private
-
-
-apply_tag ROOTMathLibs
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_runtime
-apply_pattern declare_joboptions files="jobOfragment_*.py TriggerConfig_*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigHypothesis/TrigMissingETHypo/doc/packagedoc.h b/Trigger/TrigHypothesis/TrigMissingETHypo/doc/packagedoc.h
index 39674f03aac8062ee35760ed9348b079c7e4431c..7e12b853d366c414c0c85832ec61ed53842bd95e 100644
--- a/Trigger/TrigHypothesis/TrigMissingETHypo/doc/packagedoc.h
+++ b/Trigger/TrigHypothesis/TrigMissingETHypo/doc/packagedoc.h
@@ -88,15 +88,4 @@ of the TrigMissingET class, containing two kinds of information:
 
 Both TrigMissingET and TrigMissingEtComponent are defined and implemented in 
 the  Trigger/TrigEvent/TrigMissingEtEvent package.
-
-@ref UsedTrigMissingETHypo
-
-@ref RequirementsTrigMissingETHypo
-
-/**
-@page UsedTrigMissingETHypo Used Packages
-*/
-
-/**
-@page RequirementsTrigMissingETHypo Requirements
 */
diff --git a/Trigger/TrigHypothesis/TrigMultiVarHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigMultiVarHypo/cmt/requirements
deleted file mode 100755
index 43a081cf65cd5339ba38d2d1b58ac82a31752a59..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigMultiVarHypo/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package TrigMultiVarHypo
-
-author Andre dos Anjos <Andre.dos.Anjos@cern.ch>
-manager Rodrigo Coura Torres <Rodrigo.Torres@cern.ch>
-
-# General
-use 	AtlasPolicy         	AtlasPolicy-*
-
-# Trigger 
-#use    TrigT1Interfaces    	  TrigT1Interfaces-*      Trigger/TrigT1
-use     TrigInterfaces    	    TrigInterfaces-*        Trigger/TrigSteer
-use     TrigSteeringEvent     	TrigSteeringEvent-*     Trigger/TrigEvent
-use     TrigCaloEvent		        TrigCaloEvent-*	        Trigger/TrigEvent
-use     TrigTimeAlgs            TrigTimeAlgs-*          Trigger/TrigTools
-use     xAODTrigRinger          xAODTrigRinger-*        Event/xAOD
-use     xAODTrigCalo            xAODTrigCalo-*          Event/xAOD
-
-
-public
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_python_modules files="*.py"
-
-private
-use 	GaudiInterface 		GaudiInterface-* 	External
diff --git a/Trigger/TrigHypothesis/TrigMuonHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigMuonHypo/cmt/requirements
deleted file mode 100755
index a728d0b82770814e722d016c56fc2aa9730f032d..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigMuonHypo/cmt/requirements
+++ /dev/null
@@ -1,39 +0,0 @@
-package TrigMuonHypo
-
-author Simon George <S.George@rhul.ac.uk>
-
-use AtlasPolicy			AtlasPolicy-*
-
-use MuonRecHelperTools          MuonRecHelperTools-*            MuonSpectrometer/MuonReconstruction/MuonRecTools
-use MuonIdHelpers          	MuonIdHelpers-*            	MuonSpectrometer
-
-use xAODTrigMuon                xAODTrigMuon-*                  Event/xAOD
-use TrigMuonEvent		TrigMuonEvent-*			Trigger/TrigEvent
-use TrigSteeringEvent		TrigSteeringEvent-*		Trigger/TrigEvent
-use TrigInDetEvent      	TrigInDetEvent-*		Trigger/TrigEvent
-use TrigInterfaces      	TrigInterfaces-* 		Trigger/TrigSteer
-use TrigMuonBackExtrapolator  	TrigMuonBackExtrapolator*  	Trigger/TrigTools
-use TrigMuonRoITools		TrigMuonRoITools-*	 	Trigger/TrigTools
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern component_library
-library TrigMuonHypo *.cxx components/*.cxx
-
-
-private
-
-use AtlasCLHEP                  AtlasCLHEP-*                    External
-use GaudiInterface              GaudiInterface-*                External
-
-use MuonSegment                 MuonSegment-*                   MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use MuonSegmentMakerUtils       MuonSegmentMakerUtils-*         MuonSpectrometer/MuonReconstruction/MuonSegmentMakers
-
-use TrigConfHLTData             TrigConfHLTData-*               Trigger/TrigConfiguration
-use TrigT1Interfaces            TrigT1Interfaces-*              Trigger/TrigT1
-use TrigT1Result                TrigT1Result-*                  Trigger/TrigT1
-
-use xAODMuon			xAODMuon-*			Event/xAOD
-use xAODTracking                xAODTracking-*                  Event/xAOD
-use xAODTrigger                 xAODTrigger-*                   Event/xAOD
diff --git a/Trigger/TrigHypothesis/TrigTauHypo/cmt/requirements b/Trigger/TrigHypothesis/TrigTauHypo/cmt/requirements
deleted file mode 100755
index 8989b0be1313f271d749765437fb7b81a2f36c4b..0000000000000000000000000000000000000000
--- a/Trigger/TrigHypothesis/TrigTauHypo/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package TrigTauHypo
-
-use     AtlasPolicy             AtlasPolicy-*
-use     GaudiInterface          GaudiInterface-*     	External
-use     TrigCaloEvent           TrigCaloEvent-*      	Trigger/TrigEvent
-use     TrigInDetEvent          TrigInDetEvent-*     	Trigger/TrigEvent
-use     TrigParticle            TrigParticle-*       	Trigger/TrigEvent
-use     TrigSteeringEvent     	TrigSteeringEvent-*     Trigger/TrigEvent
-use     TrigInterfaces          TrigInterfaces-*        Trigger/TrigSteer
-use     AtlasROOT               AtlasROOT-*             External
-use     StoreGate               StoreGate-*             Control
-
-use     tauEvent                tauEvent-*              Reconstruction
-use     TrigTopoEvent           TrigTopoEvent-*         Trigger/TrigEvent
-use     egammaEvent             egammaEvent-*           Reconstruction/egamma
-use     TrigMuonEvent           TrigMuonEvent-*         Trigger/TrigEvent
-
-use     ITrackToVertex          ITrackToVertex-*        Reconstruction/RecoTools
-use     MuidEvent               MuidEvent-*             Reconstruction/MuonIdentification
-use     VxVertex                VxVertex-*              Tracking/TrkEvent
-use     Particle                Particle-*              Reconstruction
-use     xAODTrigger             xAODTrigger-*           Event/xAOD
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="jobOfragment_*.py TriggerConfig_*.py"
-apply_pattern declare_python_modules files="*.py"
-
-private
-use  	AthContainers           AthContainers-*         Control
-use  	AthenaBaseComps         AthenaBaseComps-*       Control
-use     EventInfo               EventInfo-*             Event
-use     PathResolver            PathResolver-*          Tools
-use     TrigCaloEvent           TrigCaloEvent-*         Trigger/TrigEvent
-use     TrkTrack                TrkTrack-*              Tracking/TrkEvent
-use     TrkTrackSummary         TrkTrackSummary-*       Tracking/TrkEvent
-use	xAODJet                 xAODJet-*               Event/xAOD
-use	xAODCaloEvent           xAODCaloEvent-*         Event/xAOD
-use	xAODTau                 xAODTau-*		Event/xAOD
-use     xAODEgamma              xAODEgamma-*            Event/xAOD
-use 	xAODTracking            xAODTracking-*          Event/xAOD
-use     CaloEvent               CaloEvent-*             Calorimeter
-use  	TrigNavStructure        TrigNavStructure-*      Trigger/TrigEvent
-end_private
diff --git a/Trigger/TrigL1Upgrade/TrigL1CaloUpgrade/cmt/requirements b/Trigger/TrigL1Upgrade/TrigL1CaloUpgrade/cmt/requirements
deleted file mode 100644
index f06f12815ec05a930078f71a1fb8a26f263eae42..0000000000000000000000000000000000000000
--- a/Trigger/TrigL1Upgrade/TrigL1CaloUpgrade/cmt/requirements
+++ /dev/null
@@ -1,35 +0,0 @@
-package TrigL1CaloUpgrade
-
-author Denis Oliveira Damazio <Denis.Oliveira.Damazio@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-#use StoreGate StoreGate-* Control
-
-use GaudiInterface      GaudiInterface-*             External
-
-private
-use AthenaBaseComps AthenaBaseComps-*      Control
-use CaloEvent       CaloEvent-*         Calorimeter
-use LArRawEvent		LArRawEvent-*	LArCalorimeter
-use xAODTrigL1Calo	xAODTrigL1Calo-*	Event/xAOD
-use AtlasROOT	AtlasROOT-*		External/
-use CaloIdentifier              CaloIdentifier-*                Calorimeter
-#use CaloTriggerTool             CaloTriggerTool-*               Calorimeter
-use CaloDetDescr                CaloDetDescr-*                  Calorimeter
-use xAODTrigCalo	xAODTrigCalo-*		Event/xAOD
-use xAODTruth	xAODTruth-*		Event/xAOD
-use xAODEgamma	xAODEgamma-*		Event/xAOD
-use xAODTracking	xAODTracking-*	Event/xAOD
-use xAODTrigger	xAODTrigger-*		Event/xAOD
-use LArTools          LArTools-*    LArCalorimeter
-use LArCabling        LArCabling-*    LArCalorimeter
-
-library TrigL1CaloUpgrade *.cxx components/*.cxx
-apply_pattern component_library
-#apply_pattern dual_use_library files="*.cxx"
-#apply_pattern installed_library files="*.cxx"
-#apply_pattern library files="*.cxx"
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-end_private
-
diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigBjetMonitoring/cmt/requirements
deleted file mode 100644
index c7678947589b54b3b1ea025f0d4288b1858b68c9..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigBjetMonitoring/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package TrigBjetMonitoring
-
-
-# ============================================================================================
-public
-
-use 	AtlasPolicy          	AtlasPolicy-*
-use 	AtlasROOT            	AtlasROOT-*             	External
-use 	GaudiInterface       	GaudiInterface-*        	External
-use     TrigTrackJetFinderTool  TrigTrackJetFinderTool-*        Trigger/TrigTools
-use 	TrigHLTMonitoring   	TrigHLTMonitoring-*      	Trigger/TrigMonitoring
-use     TrigDecisionTool        TrigDecisionTool-*              Trigger/TrigAnalysis
-
-# ============================================================================================
-private
-
-use 	AthenaMonitoring     	AthenaMonitoring-*      	Control
-use	GeoPrimitives		GeoPrimitives-*			DetectorDescription
-use	EventPrimitives		EventPrimitives-*		Event
-use     FourMomUtils            FourMomUtils-*                  Event
-use     InDetBeamSpotService    InDetBeamSpotService-*          InnerDetector/InDetConditions
-use     JetEvent		JetEvent-*			Reconstruction/Jet
-use     JetUtils                JetUtils-*                      Reconstruction/Jet
-use     muonEvent		muonEvent-*			Reconstruction/MuonIdentification
-use     Particle                Particle-*                      Reconstruction
-use     TrigInDetEvent          TrigInDetEvent-*                Trigger/TrigEvent
-use 	TrigParticle         	TrigParticle-*          	Trigger/TrigEvent
-use 	TrigSteeringEvent	TrigSteeringEvent-*	 	Trigger/TrigEvent
-use 	TrigMuonEvent		TrigMuonEvent-*         	Trigger/TrigEvent
-#use     xAODJet                 xAODJet-*                       Event/xAOD
-use     xAODBTagging            xAODBTagging-*                  Event/xAOD
-#use     xAODCore                xAODCore-*                      Event/xAOD 
-#use     BTagging                BTagging-*                      PhysicsAnalysis/JetTagging/JetTagAlgs
-use     xAODTracking            xAODTracking-*                  Event/xAOD
-use     xAODEventInfo           xAODEventInfo-*                 Event/xAOD
-
-
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
-
diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/python/TrigBjetMonitCategory.py b/Trigger/TrigMonitoring/TrigBjetMonitoring/python/TrigBjetMonitCategory.py
index eca81a1e1c8f5971c095593826317b9059730fc4..ca6294c635d7a1ae20661b802ddb8ebffb7c233d 100644
--- a/Trigger/TrigMonitoring/TrigBjetMonitoring/python/TrigBjetMonitCategory.py
+++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/python/TrigBjetMonitCategory.py
@@ -4,7 +4,8 @@
 
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 
-monitoring_bjet_FTK = ["S_HLT_j35_boffperf_split_FTK", "E_HLT_j35_boffperf_split_FTKVtx", "E_HLT_j35_boffperf_split_FTKRefit"]
+#monitoring_bjet_FTK = ["S_HLT_j35_boffperf_split_FTK", "E_HLT_j35_boffperf_split_FTKVtx", "E_HLT_j35_boffperf_split_FTKRefit"]
+monitoring_bjet_FTK = ["S_HLT_j35_boffperf_split_FTK_L1J15_FTK", "E_HLT_j35_boffperf_split_FTKVtx_L1J15_FTK", "E_HLT_j35_boffperf_split_FTKRefit_L1J15_FTK"]
 
 
 # Used for combination MC, collisions or cosmics
@@ -12,29 +13,41 @@ monitoring_bjet_FTK = ["S_HLT_j35_boffperf_split_FTK", "E_HLT_j35_boffperf_split
 
 #General trigger chains  -  default values
 
-monitoring_bjet      = ["E_HLT_j35_boffperf_split", "E_HLT_j55_boffperf", "S_HLT_j55_boffperf_split", "E_HLT_j320_boffperf", "S_HLT_j320_boffperf_split",
-                        "S_HLT_j225_gsc360_boffperf_split"]
+#monitoring_bjet      = ["E_HLT_j35_boffperf_split", "E_HLT_j55_boffperf", "S_HLT_j55_boffperf_split", "E_HLT_j320_boffperf", "S_HLT_j320_boffperf_split",
+#                        "S_HLT_j225_gsc360_boffperf_split"]
+#monitoring_bjet      = ["S_HLT_j35_gsc55_boffperf_split", "E_HLT_j55_boffperf", "E_HLT_j55_boffperf_split", "S_HLT_j60_gsc110_boffperf_split", "E_HLT_j225_gsc320_boffperf_split"]
+monitoring_bjet      = ["E_HLT_j55_boffperf_split","S_HLT_j60_gsc110_boffperf_split","S_HLT_j35_gsc55_boffperf_split","E_HLT_j225_gsc300_boffperf_split","E_HLT_j55_boffperf"]
+
 
 #if TriggerFlags.doFTK():
 monitoring_bjet += monitoring_bjet_FTK
 
-monitoring_mujet     = ["S_HLT_mu4_j55_bperf_split_dr05_dz02", "E_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15", "E_HLT_mu6_j110_bperf_split_dr05_dz02"]
+#monitoring_mujet     = ["S_HLT_mu4_j55_bperf_split_dr05_dz02", "E_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15", "E_HLT_mu6_j110_bperf_split_dr05_dz02"]
+#monitoring_mujet     = ["S_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02", "E_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20", "E_HLT_mu6_j110_boffperf_split_dr05_dz02"]
+monitoring_mujet     = ["S_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02","E_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20","E_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02",
+                        "E_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02"]
 
 # triggers in pp collisions   -  used for q431 test
 
-monitoring_bjet_pp    = ["E_HLT_j35_boffperf_split", "E_HLT_j55_boffperf", "S_HLT_j55_boffperf_split", "E_HLT_j320_boffperf", "S_HLT_j320_boffperf_split",
-                         "S_HLT_j225_gsc360_boffperf_split"]
+#monitoring_bjet_pp    = ["E_HLT_j35_boffperf_split", "E_HLT_j55_boffperf", "S_HLT_j55_boffperf_split", "E_HLT_j320_boffperf", "S_HLT_j320_boffperf_split",
+#                         "S_HLT_j225_gsc360_boffperf_split"]
+#monitoring_bjet_pp      = ["S_HLT_j35_gsc55_boffperf_split", "E_HLT_j55_boffperf", "E_HLT_j55_boffperf_split", "S_HLT_j60_gsc110_boffperf_split", "E_HLT_j225_gsc320_boffperf_split"]
+monitoring_bjet_pp      = ["E_HLT_j55_boffperf_split","S_HLT_j60_gsc110_boffperf_split","S_HLT_j35_gsc55_boffperf_split","E_HLT_j225_gsc300_boffperf_split","E_HLT_j55_boffperf"]
 
 #if TriggerFlags.doFTK():
 monitoring_bjet_pp += monitoring_bjet_FTK
 
-monitoring_mujet_pp   = ["S_HLT_mu4_j55_bperf_split_dr05_dz02", "E_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15", "E_HLT_mu6_j110_bperf_split_dr05_dz02"]
+#monitoring_mujet_pp   = ["S_HLT_mu4_j55_bperf_split_dr05_dz02", "E_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15", "E_HLT_mu6_j110_bperf_split_dr05_dz02"]
+#monitoring_mujet_pp   = ["S_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02", "E_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20", "E_HLT_mu6_j110_boffperf_split_dr05_dz02"]
+monitoring_mujet_pp  = ["S_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02","E_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20","E_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02",
+                        "E_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02"]
 
 ################################
 
 #  cosmics triggers
 
-monitoring_bjet_cosmic = ["S_HLT_j0_perf_bperf_L1RD0_EMPTY", "S_HLT_j0_perf_bperf_L1J12_EMPTY", "S_HLT_j0_perf_bperf_L1MU10"]
+#monitoring_bjet_cosmic = ["S_HLT_j0_perf_bperf_L1RD0_EMPTY", "S_HLT_j0_perf_bperf_L1J12_EMPTY", "S_HLT_j0_perf_bperf_L1MU10"]
+monitoring_bjet_cosmic = ["S_HLT_j0_perf_boffperf_L1RD0_EMPTY", "S_HLT_j0_perf_boffperf_L1J12_EMPTY", "S_HLT_j0_perf_boffperf_L1MU10"]
 
 
 # triggers for HI runs    -  used for q314 test
@@ -49,11 +62,16 @@ monitoring_mujet_hi    = ["E_HLT_mu4_j20_ion_dr05", "S_HLT_mu4_j60_ion_dr05", "S
 
 # Triggers for MC  -  used for q221 test
 
-monitoring_bjet_validation = ["E_HLT_j35_boffperf_split", "E_HLT_j55_boffperf", "S_HLT_j55_boffperf_split", "E_HLT_j320_boffperf", "S_HLT_j320_boffperf_split",
-                              "S_HLT_j225_gsc360_boffperf_split"]
+#monitoring_bjet_validation = ["E_HLT_j35_boffperf_split", "E_HLT_j55_boffperf", "S_HLT_j55_boffperf_split", "E_HLT_j320_boffperf", "S_HLT_j320_boffperf_split",
+#                              "S_HLT_j225_gsc360_boffperf_split"]
+#monitoring_bjet_validation = ["S_HLT_j35_gsc55_boffperf_split", "E_HLT_j55_boffperf", "E_HLT_j55_boffperf_split", "S_HLT_j60_gsc110_boffperf_split", "E_HLT_j225_gsc320_boffperf_split"]
+monitoring_bjet_validation  = ["E_HLT_j55_boffperf_split","S_HLT_j60_gsc110_boffperf_split","S_HLT_j35_gsc55_boffperf_split","E_HLT_j225_gsc300_boffperf_split","E_HLT_j55_boffperf"]
 
 #if TriggerFlags.doFTK():
 monitoring_bjet_validation += monitoring_bjet_FTK
 
 
-monitoring_mujet_validation     = ["S_HLT_mu4_j55_bperf_split_dr05_dz02", "E_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15", "E_HLT_mu6_j110_bperf_split_dr05_dz02"]
+#monitoring_mujet_validation     = ["S_HLT_mu4_j55_bperf_split_dr05_dz02", "E_HLT_mu4_j55_bperf_split_dr05_dz02_L1BTAG-MU4J15", "E_HLT_mu6_j110_bperf_split_dr05_dz02"]
+#monitoring_mujet_validation  = ["S_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02", "E_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20", "E_HLT_mu6_j110_boffperf_split_dr05_dz02"]
+monitoring_mujet_validation = ["S_HLT_mu4_j35_gsc55_boffperf_split_dr05_dz02","E_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02_L1BTAG-MU6J20","E_HLT_mu6_j110_gsc150_boffperf_split_dr05_dz02",
+                               "E_HLT_mu6_j60_gsc85_boffperf_split_dr05_dz02"]
diff --git a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx
index 7b909399ffed04d26fd64cd89c32d0683e1f83a3..76c4c184f65b473d39641ed102394c510f7fbc60 100755
--- a/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx
+++ b/Trigger/TrigMonitoring/TrigBjetMonitoring/src/HLTBjetMonTool.cxx
@@ -672,7 +672,7 @@ StatusCode HLTBjetMonTool::book(){
     const xAOD::VertexContainer* offlinepvFTK = 0;
     if ( evtStore()->contains<xAOD::VertexContainer>("FTK_VertexContainer") ) {
       ATH_CHECK( evtStore()->retrieve(offlinepvFTK, "FTK_VertexContainer") );
-      ATH_MSG_DEBUG("RETRIEVED OFFLINE PV  - size: " << offlinepvFTK->size());
+      ATH_MSG_DEBUG("RETRIEVED OFFLINE FTK PV  - size: " << offlinepvFTK->size());
       if ( offlinepvFTK->size() ) {
 	EofflinepvFTK = true;
 	offlinepvzFTK = offlinepvFTK->front()->z();
@@ -695,6 +695,8 @@ StatusCode HLTBjetMonTool::book(){
 
     // Get online combinations
 
+    bool SplitKey;
+
     //  unsigned int ichain = 0;
     // Loop on trigger items
     for (const auto & trigItem:FiredChainNames){        // Shaun Roe 21/9/16
@@ -711,30 +713,41 @@ StatusCode HLTBjetMonTool::book(){
       HistExt = "_"+trigItem;
       ATH_MSG_DEBUG(" HistDir " << HistDir << " HistExt " << HistExt );
       // Set container names (2016/03/03) see TrigBtagEmulation.cxx
-      // Non split input chaines
+      // Set keys
+      // HLT non split input chaines
+      SplitKey = false;
       std::string m_jetKey = "";
       std::string m_priVtxKey = "EFHistoPrmVtx";
       std::string m_trackKey  = "";
-      // Split input chaines
+      // HLT split input chaines
       std::size_t found = trigItem.find("split");
       if (found!=std::string::npos) {
+	SplitKey =true;
 	m_jetKey = "SplitJet";
 	m_priVtxKey = "xPrimVx";
 	m_trackKey  = "InDetTrigTrackingxAODCnv_Bjet_IDTrig";
       }
+      // FTK input chains: John Baines and Julie Hart 
       std::size_t found1 = trigItem.find("FTK");
       if (found1!=std::string::npos) {
-	std::size_t found2 = trigItem.find("Refit");
+	m_priVtxKey = "HLT_PrimVertexFTK";
+	m_trackKey  = "InDetTrigTrackingxAODCnv_Bjet_FTK_IDTrig";
+	std::size_t found2 = trigItem.find("FTKRefit");
         if (found2!=std::string::npos) {
-          m_priVtxKey = "HLT_PrimVertexFTKRefit";
           m_trackKey  = "InDetTrigTrackingxAODCnv_Bjet_FTKRefit_IDTrig";
         }//found2
-	else {
-          m_priVtxKey = "HLT_PrimVertexFTK";
-          m_trackKey  = "InDetTrigTrackingxAODCnv_Bjet_FTK_IDTrig";
-        }//else
+	std::size_t found3 = trigItem.find("FTKVtx");
+        if (found3!=std::string::npos) {
+          m_trackKey  = "InDetTrigTrackingxAODCnv_Bjet_IDTrig";
+        }//found3
       }//found1
-      ATH_MSG_DEBUG( " Trigger chain name: " << trigItem << " m_jetKey: " << m_jetKey << " m_priVtxKey: " << m_priVtxKey << " m_trackKey: " << m_trackKey );
+      // gsc input chains: Ruch Gupta 2017/08/02 
+      std::size_t found4 = trigItem.find("gsc");
+      if (found4!=std::string::npos) {
+	m_jetKey = "GSCJet";
+      } // if found4
+      ATH_MSG_DEBUG( " Trigger chain name: " << trigItem << " m_jetKey: " << m_jetKey << " m_priVtxKey: " << m_priVtxKey 
+		    << " m_trackKey: " << m_trackKey << " SplitKey: " << SplitKey );
       ATH_MSG_DEBUG("PROCESSING TRIGITEM  -  " << trigItem);
       // Set flag MuJet
       bool MuJet = false;
@@ -764,7 +777,7 @@ StatusCode HLTBjetMonTool::book(){
 	ATH_MSG_DEBUG("RETRIEVED PV  -   size: " << onlinepvs.size());
 	if ( not onlinepvs.empty() ) {
 	  const xAOD::VertexContainer* onlinepv = onlinepvs[0].cptr();
-	  ATH_MSG_DEBUG("                 -   nVert: " << onlinepv->size());
+	  ATH_MSG_DEBUG("   for VertexContainer: " << m_priVtxKey << " nVert: " << onlinepv->size());
 	  if( not onlinepv->empty()) {
             if ( (*(onlinepv))[0]->vertexType() == xAOD::VxType::VertexType:: PriVtx ) { // test that PriVtx is not dummy (JA)
 	      if(HistPV) hist("PVx_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill((*(onlinepv))[0]->x());
@@ -786,13 +799,13 @@ StatusCode HLTBjetMonTool::book(){
 	    if (!DummyVtx && HistPV) hist("nPV_tr"+HistExt,"HLT/BjetMon/"+HistDir)->Fill(onlinepv->size());
 	  }  // if onlinepv not empty
 	} // if onlinepvs not empty
-	if ( (m_jetKey == "SplitJet") && DummyVtx ) {
+	if ( SplitKey && DummyVtx ) {
 	  // for SplitJets and DummyVtx monitor Vtx with Histogram algorithm
 	  const std::vector< Trig::Feature<xAOD::VertexContainer> >onlinepvsd = comb.get<xAOD::VertexContainer>("EFHistoPrmVtx");
 	  ATH_MSG_DEBUG("RETRIEVED PV with Histo algo for Split chains when Dummy vtx found with xPrimVx algo-   size: " << onlinepvsd.size());
 	  if ( not onlinepvsd.empty() ) {
 	    const xAOD::VertexContainer* onlinepv = onlinepvsd[0].cptr();
-	    ATH_MSG_DEBUG("                 -   nVert: " << onlinepv->size());
+	    ATH_MSG_DEBUG(" for VertexContainer EFHistoPrmVtx  - nVert: " << onlinepv->size());
 	    if( not onlinepv->empty()) {
 	      if ( (*(onlinepv))[0]->vertexType() == xAOD::VxType::VertexType:: PriVtx ) { // test that PriVtx is not dummy (JA)
 		if(HistPV) hist("PVx_tr_Hist"+HistExt,"HLT/BjetMon/"+HistDir)->Fill((*(onlinepv))[0]->x());
@@ -807,7 +820,7 @@ StatusCode HLTBjetMonTool::book(){
 	  continue; // if vertex is dummy skip reading out the other quntities for this trigger combination (EN)
 	} // if DummyVtx
 
-	ATH_MSG_DEBUG(" PV histograms are stored successfully !");
+	ATH_MSG_DEBUG(" PV histograms are investigated ");
 
 	// Get online jet
 	const std::vector< Trig::Feature<xAOD::JetContainer> > onlinejets = comb.get<xAOD::JetContainer>(m_jetKey);
diff --git a/Trigger/TrigMonitoring/TrigBphysMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigBphysMonitoring/cmt/requirements
deleted file mode 100644
index daccc0fdd2bde56baaa9c99eebdde6ff6d14bd16..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigBphysMonitoring/cmt/requirements
+++ /dev/null
@@ -1,40 +0,0 @@
-package TrigBphysMonitoring
-
-author Martin zur Nedden <nedden@mail.cern.ch>
-author Denis Oliveira Damazio <damazio@mail.cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  TrigHLTMonitoring          TrigHLTMonitoring-*             Trigger/TrigMonitoring
-use  xAODTracking               xAODTracking-*                  Event/xAOD
-use  TrigDecisionTool           TrigDecisionTool-*              Trigger/TrigAnalysis
-private
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  xAODTrigBphys              xAODTrigBphys-*                 Event/xAOD
-use  AthenaMonitoring           AthenaMonitoring-*              Control
-use  AtlasCLHEP                 AtlasCLHEP-*                    External
-use  AtlasROOT                  AtlasROOT-*                     External
-use  GaudiInterface             GaudiInterface-*                External
-#use  TrigConfxAOD               TrigConfxAOD-*                  Trigger/TrigConfiguration
-#use  TrigNavStructure           TrigNavStructure-*              Trigger/TrigEvent
-use  TrigMuonEvent              TrigMuonEvent-*                 Trigger/TrigEvent
-use  TrigParticle               TrigParticle-*                  Trigger/TrigEvent
-use  TrkParameters              TrkParameters-*                 Tracking/TrkEvent
-use  TrkParametersBase          TrkParametersBase-*             Tracking/TrkEvent
-use  VxVertex                   VxVertex-*                      Tracking/TrkEvent
-use  xAODMuon                   xAODMuon-*                      Event/xAOD
-use  xAODTrigMuon               xAODTrigMuon-*                  Event/xAOD
-use  TrkVertexAnalysisUtils     TrkVertexAnalysisUtils-*        Tracking/TrkVertexFitter
-use CxxUtils        CxxUtils-*          Control
-use xAODEventInfo    xAODEventInfo-*  Event/xAOD
-use     AtlasBoost              AtlasBoost-*                    External
-end_private
-
-private
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-end_private
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
diff --git a/Trigger/TrigMonitoring/TrigBphysMonitoring/python/TrigBphysMonitCategory.py b/Trigger/TrigMonitoring/TrigBphysMonitoring/python/TrigBphysMonitCategory.py
index fec2307b1f21670c99df1dd77b3d2ea3df7ea00b..dc6a0284f9439c571a92c5daca4ac25785cf416f 100644
--- a/Trigger/TrigMonitoring/TrigBphysMonitoring/python/TrigBphysMonitCategory.py
+++ b/Trigger/TrigMonitoring/TrigBphysMonitoring/python/TrigBphysMonitCategory.py
@@ -8,6 +8,7 @@ monitoring_bphys = [
                     'HLT_2mu6_bJpsimumu_L1BPH-2M9-2MU6_BPH-2DR15-2MU6', 
                     'HLT_2mu6_bUpsimumu_L1BPH-8M15-2MU6_BPH-0DR22-2MU6', 
                     'HLT_mu11_mu6noL1_bTau_L1MU11_2MU6', 
+                    'HLT_mu11_mu6_bTau', 
                     'HLT_2mu6_bDimu_L1BPH-2M9-2MU6_BPH-2DR15-2MU6', 
                     'HLT_mu11_mu6_bDimu_novtx_noos', 
                     'HLT_mu11_mu6_bJpsimumu',
@@ -31,7 +32,7 @@ primary_bphys = [
                  'HLT_mu20_bJpsi_Trkloose', 
                  'HLT_2mu6_bJpsimumu_L1BPH-2M9-2MU6_BPH-2DR15-2MU6', 
                  'HLT_2mu6_bUpsimumu_L1BPH-8M15-2MU6_BPH-0DR22-2MU6', 
-                 'HLT_mu11_mu6noL1_bTau_L1MU11_2MU6', 
+                 'HLT_mu11_mu6_bTau', 
                  'HLT_2mu6_bDimu_L1BPH-2M9-2MU6_BPH-2DR15-2MU6', 
                  'HLT_mu11_mu6_bDimu_novtx_noos', 
                  ]
diff --git a/Trigger/TrigMonitoring/TrigBphysMonitoring/share/testBphysMonitoring.py b/Trigger/TrigMonitoring/TrigBphysMonitoring/share/testBphysMonitoring.py
index 9ce63c3edb06e8510990d20dae77dd8be9a31bf5..c468865bdb0a2866fee466a44446c9fddf101992 100644
--- a/Trigger/TrigMonitoring/TrigBphysMonitoring/share/testBphysMonitoring.py
+++ b/Trigger/TrigMonitoring/TrigBphysMonitoring/share/testBphysMonitoring.py
@@ -7,7 +7,8 @@ from RecExConfig.RecFlags import rec
 from AthenaCommon.AthenaCommonFlags import athenaCommonFlags as acf
 
 if not ('fileList' in dir()):
-  fileList=['root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/rtt/prod/rtt/rel_2/20.7.X.Y-VAL/x86_64-slc6-gcc49-opt/offline/TriggerTest/Bphysics_toAOD/AOD.pool.root']
+  fileList=['/afs/cern.ch/atlas/project/RTT/prod/Results/rtt/rel_0/21.1/build/x86_64-slc6-gcc62-opt/AthenaP1/TriggerTest/Bphysics_toAOD/AOD.pool.root']
+  #fileList=['/afs/cern.ch/atlas/project/RTT/prod/Results/rtt/rel_0/21.1/build/x86_64-slc6-gcc62-opt/AthenaP1/TriggerTest/BphysExo_toAOD/AOD.pool.root']
 
 # allow this to work in RTT
 if not fileList == []:
diff --git a/Trigger/TrigMonitoring/TrigBphysMonitoring/src/HLTXAODBphysMonTool.cxx b/Trigger/TrigMonitoring/TrigBphysMonitoring/src/HLTXAODBphysMonTool.cxx
index 9da428e3a55c436a2d1f636ad37b6598579e0953..2fd04965fcb290c15a96ef6777f730fee298e991 100755
--- a/Trigger/TrigMonitoring/TrigBphysMonitoring/src/HLTXAODBphysMonTool.cxx
+++ b/Trigger/TrigMonitoring/TrigBphysMonitoring/src/HLTXAODBphysMonTool.cxx
@@ -1449,7 +1449,7 @@ void HLTXAODBphysMonTool::fillTrigBphysHists(const xAOD::TrigBphys *bphysItem, c
         float etaTrk1    = ptl1->eta();
         
         uint8_t tmpValue(0);
-        int bLayerHitsTrk1 = ptl1->summaryValue(tmpValue,xAOD::numberOfBLayerHits) ?  tmpValue : -99;
+        int bLayerHitsTrk1 = ptl1->summaryValue(tmpValue,xAOD::numberOfInnermostPixelLayerHits) ?  tmpValue : -99;
         int sctHitsTrk1    = ptl1->summaryValue(tmpValue,xAOD::numberOfSCTHits)    ?  tmpValue : -99;
         int pixHitsTrk1    = ptl1->summaryValue(tmpValue,xAOD::numberOfPixelHits)  ?  tmpValue : -99;
         int trtHitsTrk1    = ptl1->summaryValue(tmpValue,xAOD::numberOfTRTHits)    ?  tmpValue : -99;
@@ -1492,7 +1492,7 @@ void HLTXAODBphysMonTool::fillTrigBphysHists(const xAOD::TrigBphys *bphysItem, c
                 float etaTrk2    = ptl2->eta();
                 
                 tmpValue = 0;
-                int bLayerHitsTrk2 = ptl2->summaryValue(tmpValue,xAOD::numberOfBLayerHits) ?  tmpValue : -99;
+                int bLayerHitsTrk2 = ptl2->summaryValue(tmpValue,xAOD::numberOfInnermostPixelLayerHits) ?  tmpValue : -99;
                 int sctHitsTrk2    = ptl2->summaryValue(tmpValue,xAOD::numberOfSCTHits)    ?  tmpValue : -99;
                 int pixHitsTrk2    = ptl2->summaryValue(tmpValue,xAOD::numberOfPixelHits)  ?  tmpValue : -99;
                 int trtHitsTrk2    = ptl2->summaryValue(tmpValue,xAOD::numberOfTRTHits)    ?  tmpValue : -99;
diff --git a/Trigger/TrigMonitoring/TrigBphysMonitoring/src/HLTXAODBphysMonTool_orig.cpp b/Trigger/TrigMonitoring/TrigBphysMonitoring/src/HLTXAODBphysMonTool_orig.cpp
index 67c1d25907395da0780beda3efa5b34b99aa7fa6..bdf6482845302ea9d95a7d90195134e2ad3a0acc 100755
--- a/Trigger/TrigMonitoring/TrigBphysMonitoring/src/HLTXAODBphysMonTool_orig.cpp
+++ b/Trigger/TrigMonitoring/TrigBphysMonitoring/src/HLTXAODBphysMonTool_orig.cpp
@@ -596,7 +596,7 @@ void HLTXAODBphysMonTool::fillHist(const xAOD::TrigBphys *bphysItem, const std::
         float etaTrk1    = ptl1->eta();
         
         uint8_t tmpValue(0);
-        int bLayerHitsTrk1 = ptl1->summaryValue(tmpValue,xAOD::numberOfBLayerHits) ?  tmpValue : -99;
+        int bLayerHitsTrk1 = ptl1->summaryValue(tmpValue,xAOD::numberOfInnermostPixelLayerHits) ?  tmpValue : -99;
         int sctHitsTrk1    = ptl1->summaryValue(tmpValue,xAOD::numberOfSCTHits)    ?  tmpValue : -99;
         int pixHitsTrk1    = ptl1->summaryValue(tmpValue,xAOD::numberOfPixelHits)  ?  tmpValue : -99;
         int trtHitsTrk1    = ptl1->summaryValue(tmpValue,xAOD::numberOfTRTHits)    ?  tmpValue : -99;
@@ -625,7 +625,7 @@ void HLTXAODBphysMonTool::fillHist(const xAOD::TrigBphys *bphysItem, const std::
         float etaTrk2    = ptl2->eta();
         
         tmpValue = 0;
-        int bLayerHitsTrk2 = ptl2->summaryValue(tmpValue,xAOD::numberOfBLayerHits) ?  tmpValue : -99;
+        int bLayerHitsTrk2 = ptl2->summaryValue(tmpValue,xAOD::numberOfInnermostPixelLayerHits) ?  tmpValue : -99;
         int sctHitsTrk2    = ptl2->summaryValue(tmpValue,xAOD::numberOfSCTHits)    ?  tmpValue : -99;
         int pixHitsTrk2    = ptl2->summaryValue(tmpValue,xAOD::numberOfPixelHits)  ?  tmpValue : -99;
         int trtHitsTrk2    = ptl2->summaryValue(tmpValue,xAOD::numberOfTRTHits)    ?  tmpValue : -99;
@@ -752,7 +752,7 @@ void HLTXAODBphysMonTool::fillHistEff(const xAOD::TrigBphys *bphysItem, const st
         float etaTrk1    = ptl1->eta();
         
         uint8_t tmpValue(0);
-        //        int bLayerHitsTrk1 = ptl1->summaryValue(tmpValue,xAOD::numberOfBLayerHits) ?  tmpValue : -99;
+        //        int bLayerHitsTrk1 = ptl1->summaryValue(tmpValue,xAOD::numberOfInnermostPixelLayerHits) ?  tmpValue : -99;
         int sctHitsTrk1    = ptl1->summaryValue(tmpValue,xAOD::numberOfSCTHits)    ?  tmpValue : -99;
         //        int pixHitsTrk1    = ptl1->summaryValue(tmpValue,xAOD::numberOfPixelHits)  ?  tmpValue : -99;
         //        int trtHitsTrk1    = ptl1->summaryValue(tmpValue,xAOD::numberOfTRTHits)    ?  tmpValue : -99;
@@ -782,7 +782,7 @@ void HLTXAODBphysMonTool::fillHistEff(const xAOD::TrigBphys *bphysItem, const st
         float etaTrk2    = ptl2->eta();
         
         //tmpValue = 0;
-        //        int bLayerHitsTrk2 = ptl2->summaryValue(tmpValue,xAOD::numberOfBLayerHits) ?  tmpValue : -99;
+        //        int bLayerHitsTrk2 = ptl2->summaryValue(tmpValue,xAOD::numberOfInnermostPixelLayerHits) ?  tmpValue : -99;
         //        int sctHitsTrk2    = ptl2->summaryValue(tmpValue,xAOD::numberOfSCTHits)    ?  tmpValue : -99;
         //        int pixHitsTrk2    = ptl2->summaryValue(tmpValue,xAOD::numberOfPixelHits)  ?  tmpValue : -99;
         //        int trtHitsTrk2    = ptl2->summaryValue(tmpValue,xAOD::numberOfTRTHits)    ?  tmpValue : -99;
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigCaloMonitoring/cmt/requirements
deleted file mode 100644
index c281f7f86cfd4ea2a45696f30bd7f76c44786a9a..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/cmt/requirements
+++ /dev/null
@@ -1,36 +0,0 @@
-package TrigCaloMonitoring
-
-author Denis Oliveira Damazio <damazio@mail.cern.ch>
-
-use AtlasPolicy          AtlasPolicy-*
-use GaudiInterface       GaudiInterface-*        External
-
-
-use AtlasROOT            AtlasROOT-*             External
-use TrigHLTMonitoring	TrigHLTMonitoring-*	Trigger/TrigMonitoring
-use LArRecEvent 	 LArRecEvent-*		 LArCalorimeter
-#use egammaInterfaces	 egammaInterfaces-*      Reconstruction/egamma
-
-private
-use StoreGate            StoreGate-*             Control
-use CaloEvent            CaloEvent-*             Calorimeter
-use CaloInterface	 CaloInterface-*	 Calorimeter
-use CaloIdentifier	 CaloIdentifier-*	 Calorimeter
-use CaloGeoHelpers       CaloGeoHelpers-*        Calorimeter
-use TrigCaloRec           TrigCaloRec-*           Trigger/TrigAlgorithms
-use LArIdentifier	 LArIdentifier-*	 LArCalorimeter
-use LArCabling		 LArCabling-*		 LArCalorimeter
-use egammaEvent		 egammaEvent-*		 Reconstruction/egamma
-
-use TrigT2CaloCommon	TrigT2CaloCommon-*	Trigger/TrigAlgorithms
-use TrigCaloEvent	TrigCaloEvent-*		Trigger/TrigEvent
-use TrigSteeringEvent	TrigSteeringEvent-*	Trigger/TrigEvent
-
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-end_private
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
-
diff --git a/Trigger/TrigMonitoring/TrigCostMonitor/cmt/requirements b/Trigger/TrigMonitoring/TrigCostMonitor/cmt/requirements
deleted file mode 100644
index 8571e3f669b7c21667fba999e172e934c9eb868f..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigCostMonitor/cmt/requirements
+++ /dev/null
@@ -1,76 +0,0 @@
-package TrigCostMonitor
-author Rustem Ospanov
-
-use AtlasPolicy              AtlasPolicy-*
-use AtlasCOOL                AtlasCOOL-*                External 
-use GaudiInterface           GaudiInterface-*           External
-use DataCollection           DataCollection-*           External
-use AthenaMonitoring         AthenaMonitoring-*         Control
-use StoreGate                StoreGate-*                Control
-use AthenaBaseComps          AthenaBaseComps-*          Control
-use CoolLumiUtilities        CoolLumiUtilities-*        Database
-use xAODEventInfo            xAODEventInfo-*            Event/xAOD
-
-
-use TrigConfInterfaces       TrigConfInterfaces-*       Trigger/TrigConfiguration
-use TrigConfJobOptData       TrigConfJobOptData-*       Trigger/TrigConfiguration
-use TrigDecisionTool         TrigDecisionTool-*         Trigger/TrigAnalysis
-use TrigMonitoringEvent      TrigMonitoringEvent-*      Trigger/TrigEvent
-use TrigSteering             TrigSteering-*             Trigger/TrigSteer
-use TrigTimeAlgs             TrigTimeAlgs-*             Trigger/TrigTools
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_python_modules files="TrigCost*.py"
-apply_pattern declare_joboptions files="*.py"
-
-apply_pattern declare_runtime extras = "../share/*.xml"
-
-
-private
-
-apply_tag NEEDS_CORAL_BASE
-apply_tag NEEDS_COOL_FACTORY
-
-apply_tag       ROOTBasicLibs
-apply_tag       ROOTMathLibs
-
-use AtlasReflex              AtlasReflex-*              External -no_auto_import
-use AtlasROOT                AtlasROOT-*                External
-use AtlasCORAL               AtlasCORAL-*               External 
-use AtlasBoost               AtlasBoost-*               External
-use AthenaKernel             AthenaKernel-*             Control
-#use AthenaPoolKernel        AthenaPoolKernel-*         Database/AthenaPOOL
-use GeneratorObjects         GeneratorObjects-*         Generators
-use TruthHelper              TruthHelper-*              Generators/GenAnalysisTools
-use PathResolver             PathResolver-*             Tools
-
-use TrigConfL1Data           TrigConfL1Data-*           Trigger/TrigConfiguration
-use TrigConfHLTData          TrigConfHLTData-*          Trigger/TrigConfiguration
-use TrigConfStorage          TrigConfStorage-*          Trigger/TrigConfiguration
-
-use CTPfragment              *
-
-use TrigDataAccessMonitoring TrigDataAccessMonitoring-* Trigger/TrigDataAccess
-use TrigInterfaces           TrigInterfaces-*           Trigger/TrigSteer
-use TrigNavigation           TrigNavigation-*           Trigger/TrigEvent
-use TrigSteeringEvent        TrigSteeringEvent-*        Trigger/TrigEvent
-use TrigT1Interfaces	     TrigT1Interfaces-*         Trigger/TrigT1
-use TrigT1Result	         TrigT1Result-*             Trigger/TrigT1
-use TrigSerializeResult      TrigSerializeResult-*      Trigger/TrigDataAccess
-
-
-macro_append TrigCostMonitorLib_cppflags " `xml2-config --cflags`"
-macro_append TrigCostMonitorLib_use_linkopts " -L$(ROOTSYS)/lib -lXMLIO -lXMLParser"
-macro_append TrigCostMonitorLib_use_linkopts " -lxml2" slc4-gcc34 " /usr/lib/libxml2.so.2"
-macro_append TrigCostMonitorLib_use_linkopts " -lCTPfragment "
-
-apply_pattern lcgdict dict=TrigCostMonitor \
-	              selectionfile=selection.xml \
-	              headerfiles="../TrigCostMonitor/TrigCostMonitorDict.h"
-
-#macro cppdebugflags '$(cppdebugflags_s)'
-end_private
-
-# Following needs to be public
-macro_append TrigCostMonitorLib_use_linkopts " -lers -leformat -leformat_write "
-
diff --git a/Trigger/TrigMonitoring/TrigEgammaMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigEgammaMonitoring/cmt/requirements
deleted file mode 100644
index 5df5b8166ece207b3d93e34c6c558699e211b0b3..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigEgammaMonitoring/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package TrigEgammaMonitoring
-
-author Martin zur Nedden <nedden@mail.cern.ch>
-author Denis Oliveira Damazio <damazio@mail.cern.ch>
-author Alessandro Tricoli <alessandro.tricoli@mail.cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-
-private
-
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-
-end_private
-
-use AtlasROOT           AtlasROOT-*             External
-use TrigInDetEvent      TrigInDetEvent-*        Trigger/TrigEvent
-use TrigCaloEvent	TrigCaloEvent-*	        Trigger/TrigEvent
-use TrigParticle        TrigParticle-*          Trigger/TrigEvent
-use TrigSteeringEvent   TrigSteeringEvent-*     Trigger/TrigEvent
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-#apply_pattern dual_use_library files=*.cxx
-
diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigHLTMonitoring/cmt/requirements
deleted file mode 100644
index e1b9ffc30674e8afed88a538a065299ec5850fbe..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigHLTMonitoring/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package TrigHLTMonitoring
-
-author Martin zur Nedden <nedden@mail.cern.ch>
-
-use AtlasPolicy             AtlasPolicy-*
-use GaudiInterface          GaudiInterface-*        External
-
-private
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-end_private
-
-use StoreGate               StoreGate-*             Control
-use AthenaMonitoring        AthenaMonitoring-*      Control
-
-use TrigSteeringEvent       TrigSteeringEvent-*     Trigger/TrigEvent
-use TrigDecisionTool        TrigDecisionTool-*      Trigger/TrigAnalysis
-#use TrigDecision           TrigDecision-*          Trigger/TrigEvent
-use TrigConfigSvc           TrigConfigSvc-*         Trigger/TrigConfiguration
-use TrigConfInterfaces      TrigConfInterfaces-*    Trigger/TrigConfiguration
-
-use LumiCalc                LumiCalc-*        	    LumiBlock
-use xAODLuminosity          xAODLuminosity-*        Event/xAOD
-
-private
-use AthenaKernel            AthenaKernel-*          Control
-use AtlasBoost              AtlasBoost-*            External
-use AtlasROOT               AtlasROOT-*             External
-use EventInfo               EventInfo-*             Event
-use xAODTrigger             xAODTrigger-*           Event/xAOD
-end_private
-
-
-
-#use AnalysisTriggerEvent AnalysisTriggerEvent-*  PhysicsAnalysis/AnalysisTrigger
-
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_scripts files="../python/scripts/*.py ../python/scripts/*.sh ../java/TrigMaMGUI_TRIGGERDBREPR.sh"
-apply_pattern generic_declare_for_copy kind=javagui prefix="share/java" \
-  files="../java/GUI/TrigMaMGUI.java"
diff --git a/Trigger/TrigMonitoring/TrigHLTMonitoring/src/HLTMonTool.cxx b/Trigger/TrigMonitoring/TrigHLTMonitoring/src/HLTMonTool.cxx
index 5ab5fd23c85e98d1122096a99c26920ea8050066..146099812546f6d8ee5583c1b8f4f36d47aa893f 100755
--- a/Trigger/TrigMonitoring/TrigHLTMonitoring/src/HLTMonTool.cxx
+++ b/Trigger/TrigMonitoring/TrigHLTMonitoring/src/HLTMonTool.cxx
@@ -548,6 +548,10 @@ StatusCode HLTMonTool::fillForChain(const std::string& chain){
 	  // ------------ Fill RoI Histograms ---------------
 	  if (rsIt->first=="RAW" && isHLTChain) {
 	    std::vector<Trig::Feature<TrigRoiDescriptor> >::const_iterator roiIt;
+      //Hack to avoid combinatorics from GSC chains ATR-16670
+      if (chain.find("gsc") != std::string::npos) {
+        continue;
+      }
 	    const std::vector<Trig::Feature<TrigRoiDescriptor> > rois = (getTDT()->features(chain)).get<TrigRoiDescriptor>("initialRoI"); 
 	    for (roiIt=rois.begin(); roiIt!=rois.end(); ++roiIt) {
 	      const TrigRoiDescriptor* roi = roiIt->cptr();
diff --git a/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/TrigIDJpsiMonitoring/AnalysisConfig_Jpsi.h b/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/TrigIDJpsiMonitoring/AnalysisConfig_Jpsi.h
index ff9db3d3d5d9510dccaae7c9e5c17018483b1432..4e39b3a047bd5194bd0bd1eff532b877775cdfc3 100644
--- a/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/TrigIDJpsiMonitoring/AnalysisConfig_Jpsi.h
+++ b/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/TrigIDJpsiMonitoring/AnalysisConfig_Jpsi.h
@@ -504,14 +504,14 @@ namespace TrigInDetAnalysis {
               // 2 "hits" and an offline SCT "hit" is really a 1D cluster, so two intersetcting
               // stereo clusters making a spacepoint are two "hits"
               const Trk::TrackSummary *summary = track->trackSummary();
-              int nBlayerHits = 2*summary->get(Trk::numberOfBLayerHits); 
+              int nBlayerHits = 2*summary->get(Trk::numberOfInnermostPixelLayerHits);
               int nPixelHits  = 2*summary->get(Trk::numberOfPixelHits);  
               int nSctHits    = summary->get(Trk::numberOfSCTHits); 
               int nStrawHits  = summary->get(Trk::numberOfTRTHits);
               int nTrHits     = summary->get(Trk::numberOfTRTHighThresholdHits);
 
               int nSiHits     = nPixelHits + nSctHits;
-              bool expectBL   = summary->get(Trk::expectBLayerHit);
+              bool expectBL   = summary->get(Trk::expectInnermostPixelLayerHit);
 
               const Trk::FitQuality *quality = track->fitQuality();
               double chi2 = quality->chiSquared();
diff --git a/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/cmt/requirements
deleted file mode 100755
index b7649f318313253aff044220d9b7b59ba8bd5ca9..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/cmt/requirements
+++ /dev/null
@@ -1,50 +0,0 @@
-package TrigIDJpsiMonitoring
-
-
-# ============================================================================================
-public
-
-use   AtlasPolicy             AtlasPolicy-*
-use   AtlasROOT		      AtlasROOT-*			          External
-
-use   TrigSteeringEvent       TrigSteeringEvent-*       Trigger/TrigEvent
-use   TrigMuonEvent   	      TrigMuonEvent-*         	Trigger/TrigEvent
-use   TrigParticle            TrigParticle-*         	Trigger/TrigEvent
-#use  RecoToolInterfaces      RecoToolInterfaces-*      Reconstruction/RecoTools
-#use  TrigInDetTrackExtrapolator TrigInDetTrackExtrapolator-*	Trigger/TrigTools
-
-use   EventInfo               EventInfo-*             	Event
-use   InDetBeamSpotService    InDetBeamSpotService-*    InnerDetector/InDetConditions
-use   Particle		      Particle-*	        Reconstruction
-use   TrigDecisionTool        TrigDecisionTool-*        Trigger/TrigAnalysis
-use   TrigHLTMonitoring       TrigHLTMonitoring-*       Trigger/TrigMonitoring
-use   TrigInDetAnalysis       TrigInDetAnalysis-*       Trigger/TrigAnalysis
-use   TrigInDetAnalysisUtils  TrigInDetAnalysisUtils-*	Trigger/TrigAnalysis
-use   TrigJPsiTools           TrigJPsiTools-*		Trigger/TrigTools
-
-# ============================================================================================
-private
-
-use   GaudiInterface	      GaudiInterface-*	        External
-use   AthenaKernel            AthenaKernel-*            Control
-use   AthenaMonitoring        AthenaMonitoring-*        Control
-use   TrigInDetEvent	      TrigInDetEvent-*          Trigger/TrigEvent
-use   muonEvent		      muonEvent-*	        Reconstruction/MuonIdentification
-use   egammaEvent	      egammaEvent-*	        Reconstruction/egamma
-use   VxVertex		      VxVertex-*	        Tracking/TrkEvent	
-use   TrigInDetTruthEvent     TrigInDetTruthEvent-*     Trigger/TrigTruthEvent
-
-# ============================================================================================
-public
-
-library TrigIDJpsiMonitoring *.cxx components/*.cxx
-
-apply_tag  ROOTMathLibs
-# apply_tag  ROOTBasicLibs
-# apply_tag  ROOTSTLDictLibs
-# apply_tag  ROOTGraphicsLibs
-# apply_tag  ROOTTableLibs
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/src/AnalysisConfig_Jpsi.cxx b/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/src/AnalysisConfig_Jpsi.cxx
index 6cd546675413c04474faf4f413651ddd5d671622..bdd8c00a764c93269823a075eb9084c23d0527cb 100644
--- a/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/src/AnalysisConfig_Jpsi.cxx
+++ b/Trigger/TrigMonitoring/TrigIDJpsiMonitoring/src/AnalysisConfig_Jpsi.cxx
@@ -708,7 +708,7 @@ void AnalysisConfig_Jpsi::loop() {
        
         if(closestProbe) {
           const Trk::TrackSummary *summary = closestProbe->trackSummary();
-          int nBlayerHits = 2*summary->get(Trk::numberOfBLayerHits); 
+          int nBlayerHits = 2*summary->get(Trk::numberOfInnermostPixelLayerHits);
           int nPixelHits  = 2*summary->get(Trk::numberOfPixelHits);  
           int nSctHits    = summary->get(Trk::numberOfSCTHits); 
           //int nStrawHits  = summary->get(Trk::numberOfTRTHits);
@@ -725,7 +725,7 @@ void AnalysisConfig_Jpsi::loop() {
         }
         if(closestTag) {
           const Trk::TrackSummary *summary = closestTag->trackSummary();
-          int nBlayerHits = 2*summary->get(Trk::numberOfBLayerHits); 
+          int nBlayerHits = 2*summary->get(Trk::numberOfInnermostPixelLayerHits);
           int nPixelHits  = 2*summary->get(Trk::numberOfPixelHits);  
           int nSctHits    = summary->get(Trk::numberOfSCTHits); 
           //int nStrawHits  = summary->get(Trk::numberOfTRTHits);
diff --git a/Trigger/TrigMonitoring/TrigIDTPMonitor/cmt/requirements b/Trigger/TrigMonitoring/TrigIDTPMonitor/cmt/requirements
deleted file mode 100644
index c773063a64c5201af062f0a9171ae1db2ba35494..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigIDTPMonitor/cmt/requirements
+++ /dev/null
@@ -1,35 +0,0 @@
-package TrigIDTPMonitor
-
-author Johnny Raine <johnny.raine@cern.ch>
-
-use AtlasPolicy		AtlasPolicy-*
-
-private
-use GaudiInterface      GaudiInterface-*        External
-use EventInfo		EventInfo-*		Event
-use AthLinks		AthLinks-*		Control
-
-use TrigSteeringEvent	TrigSteeringEvent-*	Trigger/TrigEvent
-use TrigBphysicsEvent	TrigBphysicsEvent-*	Trigger/TrigEvent
-use TrigInterfaces	TrigInterfaces-*	Trigger/TrigSteer
-use TrigConfHLTData	TrigConfHLTData-*	Trigger/TrigConfiguration
-use TrigParticle	TrigParticle-*		Trigger/TrigEvent
-
-use xAODMuon		xAODMuon-*		Event/xAOD
-use xAODTrigBphys   	xAODTrigBphys-*		Event/xAOD
-use xAODEventInfo	xAODEventInfo-*		Event/xAOD
-use xAODTracking	xAODTracking-*		Event/xAOD
-use xAODCaloEvent       xAODCaloEvent-*         Event/xAOD
-use xAODEgamma		xAODEgamma-*		Event/xAOD
-#use xAODTrigEgamma      xAODTrigEgamma-*        Event/xAOD
-#use xAODTrigger         xAODTrigger-*           Event/xAOD
-
-#use egammaEvent         egammaEvent-*           Reconstruction/egamma
-
-end_private
-
-library TrigIDTPMonitor *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigMonitoring/TrigIDtrkMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigIDtrkMonitoring/cmt/requirements
deleted file mode 100644
index 82e66390941a03ce4c0112c984fa9c135fe6d784..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigIDtrkMonitoring/cmt/requirements
+++ /dev/null
@@ -1,64 +0,0 @@
-package TrigIDtrkMonitoring
-
-author Martin zur Nedden <nedden@mail.cern.ch>
-author Denis Oliveira Damazio <damazio@mail.cern.ch>
-author Jay Howarth <jhowarth@cern.ch> #Tag and Probe only
-
-# ===================================================================
-
-
-public
-
-use AtlasPolicy           	AtlasPolicy-*
-use GaudiInterface        	GaudiInterface-*       		External
-use AtlasROOT             	AtlasROOT-*             	External
-
-use StoreGate             	StoreGate-*             	Control
-use AthenaMonitoring      	AthenaMonitoring-*      	Control
-
-use Particle              	Particle-*              	Reconstruction
-# use tauEvent              	tauEvent-*              	Reconstruction
-
-use TrigHLTMonitoring	  	TrigHLTMonitoring-*	  	Trigger/TrigMonitoring
-use TrigDecisionTool      	TrigDecisionTool-*      	Trigger/TrigAnalysis
-# use TrigInDetAnalysis           TrigInDetAnalysis-*             Trigger/TrigAnalysis
-# use TrigInDetAnalysisUtils      TrigInDetAnalysisUtils-*        Trigger/TrigAnalysis
-# use TrigInDetAnalysisExample    TrigInDetAnalysisExample-*      Trigger/TrigAnalysis
-use TrigInDetEvent        	TrigInDetEvent-*        	Trigger/TrigEvent
-use TrigCaloEvent         	TrigCaloEvent-*         	Trigger/TrigEvent
-use TrigInDetToolInterfaces 	TrigInDetToolInterfaces-* 	Trigger/TrigTools
-
-use CaloEvent           	CaloEvent-*                     Calorimeter
-use CaloGeoHelpers         	CaloGeoHelpers-*         	Calorimeter
-
-use RecoToolInterfaces     	RecoToolInterfaces-*    	Reconstruction/RecoTools
-
-use egammaEvent           	egammaEvent-*           	Reconstruction/egamma
-use egammaInterfaces      	egammaInterfaces-*      	Reconstruction/egamma
-
-# =======================================================================
-
-private
-
-use TrigSteeringEvent     	TrigSteeringEvent-*     	Trigger/TrigEvent
-use TrigParticle          	TrigParticle-*          	Trigger/TrigEvent
-
-use EventInfo             	EventInfo-*             	Event
-
-# use TrkTrack              	TrkTrack-*              	Tracking/TrkEvent
-# use InDetBeamSpotService      InDetBeamSpotService-*          InnerDetector/InDetConditions
-
-
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-apply_tag ROOTBasicLibs
-apply_tag ROOTSTLDictLibs
-apply_tag ROOTTableLibs
-
-# =====================================================================
-
-public
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
diff --git a/Trigger/TrigMonitoring/TrigJetMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigJetMonitoring/cmt/requirements
deleted file mode 100644
index 357445f957c8d80c9ac4d95ea7eb5026b40f1853..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigJetMonitoring/cmt/requirements
+++ /dev/null
@@ -1,33 +0,0 @@
-
-package TrigJetMonitoring
-
-author Venkatesh Kaushik <venkat.kaushik@cern.ch>
-author Xiaowen Lei <Xiaowen.Lei@cern.ch>
-
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*            External
-
-use TrigHLTMonitoring           TrigHLTMonitoring-*         Trigger/TrigMonitoring
-use TrigCaloEvent	        TrigCaloEvent-*	            Trigger/TrigEvent
-use AnalysisTriggerEvent        AnalysisTriggerEvent-*      PhysicsAnalysis/AnalysisTrigger
-use xAODJet                     xAODJet-*                   Event/xAOD
-use xAODTrigger			xAODTrigger-*               Event/xAOD
-
-use xAODEventInfo               xAODEventInfo-*             Event/xAOD
-
-private
-use AtlasBoost                  AtlasBoost-*                External
-use AtlasROOT                   AtlasROOT-*                 External
-use StoreGate                   StoreGate-*                 Control
-use TrigSteeringEvent           TrigSteeringEvent-*         Trigger/TrigEvent
-use TrigDecisionTool            TrigDecisionTool-*          Trigger/TrigAnalysis
-
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-
-end_private
-
-
-#apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
diff --git a/Trigger/TrigMonitoring/TrigMETMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigMETMonitoring/cmt/requirements
deleted file mode 100644
index afd1ea5c0d7c008ddc784f2495ce4845f6710154..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigMETMonitoring/cmt/requirements
+++ /dev/null
@@ -1,35 +0,0 @@
-package TrigMETMonitoring
-
-author Venkatesh Kaushik <venkat.kaushik at CERN.CH>
-author Xiaowen Lei <Xiaowen.Lei at CERN.CH>
-
-
-use AtlasPolicy             AtlasPolicy-*
-use TrigSteeringEvent       TrigSteeringEvent-*     Trigger/TrigEvent
-use TrigMissingEtEvent      TrigMissingEtEvent-*    Trigger/TrigEvent
-use MissingETEvent          MissingETEvent-*        Reconstruction
-use TrigHLTMonitoring       TrigHLTMonitoring-*	    Trigger/TrigMonitoring
-use xAODTrigger             xAODTrigger-*           Event/xAOD
-use xAODTrigMissingET       xAODTrigMissingET-*     Event/xAOD
-use xAODMissingET           xAODMissingET-*         Event/xAOD
-use xAODMuon                xAODMuon-*              Event/xAOD
-use xAODEgamma              xAODEgamma-*            Event/xAOD
-
-private
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-end_private
-
-private
-use AtlasCLHEP           AtlasCLHEP-*            External
-use AtlasROOT            AtlasROOT-*             External
-use StoreGate            StoreGate-*             Control
-use TrigConfL1Data       TrigConfL1Data-*        Trigger/TrigConfiguration
-use GaudiInterface       GaudiInterface-*        External
-end_private
-
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
-
diff --git a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigMinBiasMonitoring/cmt/requirements
deleted file mode 100644
index e3f8a57022ab405b7424683956c1df4bc7007ae5..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigMinBiasMonitoring/cmt/requirements
+++ /dev/null
@@ -1,47 +0,0 @@
-package TrigMinBiasMonitoring
-
-author Martin zur Nedden <nedden@mail.cern.ch>
-author Denis Oliveira Damazio <damazio@mail.cern.ch>
-author Alexander Paramonov <Alexander.Paramonov@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AthenaMonitoring           AthenaMonitoring-*              Control
-use  AtlasROOT                  AtlasROOT-*                     External
-use  CaloIdentifier             CaloIdentifier-*                Calorimeter
-use  GaudiInterface             GaudiInterface-*                External
-use  TrigDecisionTool           TrigDecisionTool-*              Trigger/TrigAnalysis
-use  TrigHLTMonitoring          TrigHLTMonitoring-*             Trigger/TrigMonitoring
-
-use  TrigInDetEvent             TrigInDetEvent-*                Trigger/TrigEvent
-
-use  ZdcIdentifier              ZdcIdentifier-*                 ForwardDetectors/ZDC
-
-use  xAODEventInfo              xAODEventInfo-*                 Event/xAOD
-
-use	 InDetTrackSelectionTool	InDetTrackSelectionTool-*		InnerDetector/InDetRecTools
-
-private
-use  InDetBCM_RawData           InDetBCM_RawData-*              InnerDetector/InDetRawEvent
-use  LUCID_RawEvent             LUCID_RawEvent-*                ForwardDetectors/LUCID
-use  TileEvent                  TileEvent-*                     TileCalorimeter
-use  TrigCaloEvent              TrigCaloEvent-*                 Trigger/TrigEvent
-use  TrigInDetEvent             TrigInDetEvent-*                Trigger/TrigEvent
-use  CaloEvent                  CaloEvent-*                     Calorimeter
-use  CaloGeoHelpers             CaloGeoHelpers-*                Calorimeter
-use  ZdcEvent                   ZdcEvent-*                      ForwardDetectors/ZDC
-
-use  xAODTrigMinBias	        xAODTrigMinBias-*				Event/xAOD
-use  xAODTracking				xAODTracking-*					Event/xAOD
-
-end_private
-
-private
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-end_private
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
-
diff --git a/Trigger/TrigMonitoring/TrigMonitorBase/cmt/requirements b/Trigger/TrigMonitoring/TrigMonitorBase/cmt/requirements
deleted file mode 100755
index 269773dd01405606bbdd25953fea00799dca51db..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigMonitorBase/cmt/requirements
+++ /dev/null
@@ -1,20 +0,0 @@
-package TrigMonitorBase
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*      External
-use AtlasBoost          AtlasBoost-*          External
-
-use AthenaMonitoring    AthenaMonitoring-*    Control
-use AthenaBaseComps     AthenaBaseComps-*     Control
-use AtlasROOT           AtlasROOT-*           External
-
-apply_pattern declare_python_modules files="__init__.py TrigGenericMonitoringToolConfig.py"
-apply_pattern dual_use_library files=*.cxx
-
-private
-use TrigInterfaces      TrigInterfaces-*      Trigger/TrigSteer
-
-use TestTools           TestTools-*           AtlasTest
-#apply_pattern UnitTest_run unit_test=MonitoredAlgo
-apply_pattern UnitTest_run unit_test=HistoOperationLock
-apply_pattern UnitTest_run unit_test=LBNHist
diff --git a/Trigger/TrigMonitoring/TrigMonitorBase/python/TrigGenericMonitoringToolConfig.py b/Trigger/TrigMonitoring/TrigMonitorBase/python/TrigGenericMonitoringToolConfig.py
index ef91cf401263d354ce6b36cd79d7ae5e3b7d4e2b..14e678dbbe1a9fa721e2a182cb6c3a0e1434d3dc 100755
--- a/Trigger/TrigMonitoring/TrigMonitorBase/python/TrigGenericMonitoringToolConfig.py
+++ b/Trigger/TrigMonitoring/TrigMonitorBase/python/TrigGenericMonitoringToolConfig.py
@@ -19,7 +19,7 @@ else:
         as TrigGenericMonitoringTool
     log.info("Using thread-safe TrigGenericMonitoringTool")
 
-from AthenaMonitoring.DefineHistogram import defineHistogram as __defineHistogram
+from AthenaMonitoring.GenericMonitoringTool import defineHistogram as __defineHistogram
 defineHistogram = __defineHistogram
 
 
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigMuonMonitoring/cmt/requirements
deleted file mode 100644
index 288489429d01538f09ecd941311118cb4b6e8014..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigMuonMonitoring/cmt/requirements
+++ /dev/null
@@ -1,46 +0,0 @@
-
-package TrigMuonMonitoring
-
-author Martin zur Nedden <nedden@mail.cern.ch>
-author Denis Oliveira Damazio <damazio@mail.cern.ch>
-
-use AtlasPolicy          AtlasPolicy-*
-
-private
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-use AthenaMonitoring     AthenaMonitoring-*      Control
-use AtlasCLHEP           AtlasCLHEP-*            External
-use GaudiInterface       GaudiInterface-*        External
-use TrigConfHLTData      TrigConfHLTData-*       Trigger/TrigConfiguration
-use TrigDecisionTool      TrigDecisionTool-*      Trigger/TrigAnalysis
-use TrigObjectMatching    TrigObjectMatching-*    Trigger/TrigAnalysis
-use muonEvent            muonEvent-*             Reconstruction/MuonIdentification
-use EventInfo            EventInfo-*             Event
-use TrigSteeringEvent    TrigSteeringEvent-*     Trigger/TrigEvent
-use AnalysisTriggerEvent AnalysisTriggerEvent-*  PhysicsAnalysis/AnalysisTrigger
-use VxVertex             VxVertex-*              Tracking/TrkEvent
-use xAODTrigger			xAODTrigger-*            	Event/xAOD 
-use xAODMuon			xAODMuon-*            		Event/xAOD 
-use xAODTrigMuon		xAODTrigMuon-*            		Event/xAOD 
-use xAODPrimitives		xAODPrimitives-*            		Event/xAOD 
-use xAODTracking		xAODTracking-*            		Event/xAOD 
-end_private
-
-use AtlasROOT            AtlasROOT-*             External
-
-#use StoreGate            StoreGate-*             Control
-
-use TrigMuonEvent         TrigMuonEvent-*         Trigger/TrigEvent
-use TrigInDetEvent        TrigInDetEvent-*        Trigger/TrigEvent
-use TrigAnalysisInterfaces   TrigAnalysisInterfaces-* Trigger/TrigAnalysis
-
-use TrigHLTMonitoring           TrigHLTMonitoring-*             Trigger/TrigMonitoring
-#use MuonCombinedToolInterfaces  MuonCombinedToolInterfaces-*    Reconstruction/MuonIdentification
-# use MuonCombinedSelectorTools   MuonCombinedSelectorTools-*     Reconstruction/MuonIdentification
-
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="../python/*.py"
-apply_pattern dual_use_library files=*.cxx
-
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/HLTMuonMonTool.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/HLTMuonMonTool.cxx
index 819c309806f5ecc44bcbba298a69f5229b1659e2..0c83ec6435047c8e95c95ee31e29bd7b2694e79b 100755
--- a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/HLTMuonMonTool.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/HLTMuonMonTool.cxx
@@ -239,9 +239,9 @@ StatusCode HLTMuonMonTool::init()
     m_FS_pre_trigger = "HLT_mu4";
     m_FS_pre_trigger = "HLT_mu10";
   }else{
-    m_FS_pre_trigger = "HLT_mu18";
+    m_FS_pre_trigger = "HLT_mu20";
   }
-  m_FS_pre_trigger_second = "HLT_mu24_imedium";
+  m_FS_pre_trigger_second = "HLT_mu26_ivarmedium";
   for(unsigned int ich = 0; ich < m_chainsEFFS.size(); ich++){
 	if(ich > 0) continue;
 	m_histChainEFFS.push_back("muChainEFFS");
diff --git a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuZTPMon.cxx b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuZTPMon.cxx
index 1d9c090b51b4e4050448f3b2b41851784ae0c6c6..70ad8a5c3beccdb088d631016ddf918777681c02 100644
--- a/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuZTPMon.cxx
+++ b/Trigger/TrigMonitoring/TrigMuonMonitoring/src/MuZTPMon.cxx
@@ -302,8 +302,8 @@ StatusCode HLTMuonMonTool::fillMuZTPDQA()
   //StatusCode sc_ztp = evtStore()->retrieve(VertexContainer,"VxPrimaryCandidate");
   StatusCode sc_ztp = evtStore()->retrieve(VertexContainer,"HLT_xAOD__VertexContainer_xPrimVx");
   if(sc_ztp.isFailure()) {
-    ATH_MSG_INFO("VxPrimaryCandidate" << " Container Unavailable");
-    return StatusCode::SUCCESS;
+    ATH_MSG_DEBUG("VxPrimaryCandidate" << " Container Unavailable");
+    //return StatusCode::SUCCESS;
   }
 
   //REQUIREMENTS FOR GOOD PRIMARY VERTEX   
@@ -314,7 +314,8 @@ StatusCode HLTMuonMonTool::fillMuZTPDQA()
     ////if ((*vertexIter)->vxTrackAtVertex().size()>2 && fabs((*vertexIter)->z()) < 150) HasGoodPV = true;                                             
   }
   if (HasGoodPV == false){ 
-    return StatusCode::SUCCESS;
+  ATH_MSG_DEBUG(" ===== HLT Muon has no goodpv ===== "); 
+  //  return StatusCode::SUCCESS;
   }
 
   // ---------------------------------------------------------------
@@ -456,7 +457,8 @@ StatusCode HLTMuonMonTool::fillMuZTPDQA()
 	    if (
 		("L1_MU10"==m_ztp_l1map[itmap->first] && ((*it)->thrName() == "MU10" || (*it)->thrName() == "MU15" || (*it)->thrName() == "MU20")) || 
 		("L1_MU15"==m_ztp_l1map[itmap->first] && ((*it)->thrName() == "MU15" || (*it)->thrName() == "MU20")) || 
-		("L1_MU20"==m_ztp_l1map[itmap->first] && ((*it)->thrName() == "MU20"))
+		("L1_MU20,L1_MU21"==m_ztp_l1map[itmap->first] && ((*it)->thrName() == "MU21")) ||
+		("L1_MU21"==m_ztp_l1map[itmap->first] && ((*it)->thrName() == "MU21"))
 	       ) {
 	      L1pt.push_back((*it)->thrValue());
 	      L1eta.push_back((*it)->eta());
diff --git a/Trigger/TrigMonitoring/TrigStatsFromCool/cmt/Makefile b/Trigger/TrigMonitoring/TrigStatsFromCool/cmt/Makefile
deleted file mode 100644
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigStatsFromCool/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Trigger/TrigMonitoring/TrigStatsFromCool/cmt/requirements b/Trigger/TrigMonitoring/TrigStatsFromCool/cmt/requirements
deleted file mode 100644
index b592ab458b1e2531ee96edf6443a2bab761dcf0d..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigStatsFromCool/cmt/requirements
+++ /dev/null
@@ -1,63 +0,0 @@
-package TrigStatsFromCool
-
-author  Joerg.Stelzer@cern.ch
-manager Joerg.Stelzer@cern.ch
-#============================================================================
-
-#============================================================================
-# Public dependencies
-#============================================================================
-use DetCommonPolicy *
-
-private
-
-##  use POOL v* LCG_Interfaces
-##  use COOL v* LCG_Interfaces
-##  use CORAL v* LCG_Interfaces
-##  use XercesC v* LCG_Interfaces
-##  use Reflex v* LCG_Interfaces
-##  use Boost v* LCG_Interfaces
-##  
-##  use TrigConfL1Data      TrigConfL1Data-*     Trigger/TrigConfiguration
-##  use TrigConfJobOptData  TrigConfJobOptData-* Trigger/TrigConfiguration
-##  use TrigConfHLTData     TrigConfHLTData-*    Trigger/TrigConfiguration
-
-#============================================================================
-# Build rules
-#============================================================================
-
-##  #
-##  # ignore patterns from LCG_Policy
-##  #
-##  apply_pattern detcommon_ignores
-##  
-##  # link header files into InstallArea, and include the corresponding
-##  # directory in the compiler options
-##  #
-##  apply_pattern detcommon_header_installer
-
-#============================================================================
-# Build applications
-#============================================================================
-
-##  apply_pattern trigconf_application name=Lvl1TriggerApp
-##  apply_pattern trigconf_application name=Lvl1TriggerApp2
-##  #apply_pattern trigconf_application name=JobOptTriggerApp
-##  apply_pattern trigconf_application name=2COOLApp
-##  apply_pattern trigconf_application name=2XMLApp
-##  apply_pattern trigconf_application name=PrescaleCollLoad
-##  #apply_pattern trigconf_application name=TestLogicParser
-##  #apply_pattern trigconf_application name=HltApp
-##  apply_pattern trigconf_application name=ConsistencyChecker
-##  apply_pattern trigconf_application name=RttTest
-
-#============================================================================
-# Install scripts and modules
-#============================================================================
-
-##  apply_pattern detcommon_link_files kind=scripts name=python_scripts files="\
-##  	-s=../scripts *.py" prefix=share/bin
-##  
-
-apply_pattern detcommon_link_files kind=python_modules name=python_mods files="\
-        -s=../python *.py" prefix=python/$(package)
diff --git a/Trigger/TrigMonitoring/TrigSteerMonitor/cmt/requirements b/Trigger/TrigMonitoring/TrigSteerMonitor/cmt/requirements
deleted file mode 100755
index 2d5d91d7da19efe7cef3bc663195006ae170be60..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigSteerMonitor/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-package TrigSteerMonitor
-
-author Martin zur Nedden
-
-public
-use  AtlasPolicy                AtlasPolicy-*
-use  GaudiInterface             GaudiInterface-*                External
-private
-use  AtlasROOT                  AtlasROOT-*                     External
-use  AthenaKernel               AthenaKernel-*                  Control
-use  AthenaMonitoring           AthenaMonitoring-*              Control
-use  AtlasBoost                 AtlasBoost-*                    External
-use  DataCollection             DataCollection-*                External
-use  EventInfo                  EventInfo-*                     Event
-use  MagFieldInterfaces         MagFieldInterfaces-*            MagneticField
-use  StoreGate                  StoreGate-*                     Control
-use  xAODEventInfo              xAODEventInfo-*                 Event/xAOD
-use  TrigConfHLTData            TrigConfHLTData-*               Trigger/TrigConfiguration
-use  TrigConfL1Data             TrigConfL1Data-*                Trigger/TrigConfiguration
-use  TrigConfInterfaces         TrigConfInterfaces-*            Trigger/TrigConfiguration
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  TrigSteering               TrigSteering-*                  Trigger/TrigSteer
-use  TrigNavigation             TrigNavigation-*                Trigger/TrigEvent
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigT1Interfaces           TrigT1Interfaces-*              Trigger/TrigT1
-use  TrigT1Result               TrigT1Result-*                  Trigger/TrigT1
-use  TrigDataAccessMonitoring   TrigDataAccessMonitoring-*      Trigger/TrigDataAccess
-use  TrigMonitorBase            TrigMonitorBase-*               Trigger/TrigMonitoring
-use  LumiBlockComps             LumiBlockComps-*                LumiBlock
-end_private
-
-
-library TrigSteerMonitor *.cxx -s=components *.cxx
-apply_pattern component_library 
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/cmt/requirements b/Trigger/TrigMonitoring/TrigTauMonitoring/cmt/requirements
deleted file mode 100644
index d50a945ab79bf1cc551c6efd19548737c08bfd54..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/cmt/requirements
+++ /dev/null
@@ -1,53 +0,0 @@
-package TrigTauMonitoring
-
-author Martin zur Nedden <nedden@mail.cern.ch>
-author Denis Oliveira Damazio <damazio@mail.cern.ch>
-
-
-private
-
-apply_tag ROOTGraphicsLibs
-apply_tag ROOTMathLibs
-
-##use AnalysisTriggerEvent  AnalysisTriggerEvent-*  PhysicsAnalysis/AnalysisTrigger
-use AnalysisUtils         AnalysisUtils-*         PhysicsAnalysis/AnalysisCommon
-use AthenaMonitoring      AthenaMonitoring-*      Control
-use AthenaKernel          AthenaKernel-*          Control
-use AtlasROOT             AtlasROOT-*             External
-use EventInfo             EventInfo-*             Event
-use GaudiInterface        GaudiInterface-*        External
-use StoreGate             StoreGate-*             Control
-use TrigDecisionInterface TrigDecisionInterface-* Trigger/TrigEvent
-use TrigDecisionTool      TrigDecisionTool-*      Trigger/TrigAnalysis
-use TrigTauEmulation      TrigTauEmulation-*      Trigger/TrigAnalysis/TrigTauAnalysis
-use TrigHLTMonitoring     TrigHLTMonitoring-*     Trigger/TrigMonitoring
-use tauEvent              tauEvent-*              Reconstruction
-use VxVertex              VxVertex-*              Tracking/TrkEvent
-##use TrigConfHLTData       TrigConfHLTData-*       Trigger/TrigConfiguration
-use TrigConfL1Data        TrigConfL1Data-*        Trigger/TrigConfiguration
-use LumiBlockComps        LumiBlockComps-*        LumiBlock
-
-use xAODTau		  xAODTau-*		  Event/xAOD
-use xAODTrigger		  xAODTrigger-*		  Event/xAOD
-use xAODTruth             xAODTruth-*             Event/xAOD 
-use xAODEventInfo	  xAODEventInfo-*	  Event/xAOD
-use xAODTracking          xAODTracking-*          Event/xAOD
-use xAODMissingET         xAODMissingET-*         Event/xAOD
-use xAODMuon              xAODMuon-*              Event/xAOD
-use xAODEgamma            xAODEgamma-*            Event/xAOD
-use xAODJet               xAODJet-*               Event/xAOD
-public
-
-use AtlasPolicy           AtlasPolicy-*
-use TrigInDetEvent        TrigInDetEvent-*        Trigger/TrigEvent
-use TrigCaloEvent         TrigCaloEvent-*         Trigger/TrigEvent
-#use MissingETEvent       MissingETEvent-00-*     Reconstruction
-use TrigParticle          TrigParticle-*          Trigger/TrigEvent
-use TrigSteeringEvent     TrigSteeringEvent-*     Trigger/TrigEvent
-
-
-#apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-library TrigTauMonitoring *.cxx components/*.cxx
-apply_pattern component_library
-
diff --git a/Trigger/TrigMonitoring/TrigTauMonitoring/share/EOSlist.py b/Trigger/TrigMonitoring/TrigTauMonitoring/share/EOSlist.py
index 81afb85bfdddeb1406361cfb0fdc67e6fe21a298..625c171653fe981d6cf1bae9e48a6c6582937361 100644
--- a/Trigger/TrigMonitoring/TrigTauMonitoring/share/EOSlist.py
+++ b/Trigger/TrigMonitoring/TrigTauMonitoring/share/EOSlist.py
@@ -6,7 +6,7 @@ if(len(sys.argv)>1):
     
     print "looking for EOS files in ",sys.argv[1]
     dsName = sys.argv[1]
-    cmd  = '/afs/cern.ch/project/eos/installation/pro/bin/eos.select ls %s/ ' % (dsName)
+    cmd  = 'eos ls %s/ ' % (dsName)
     files = []
     count_files = 0
     print cmd
diff --git a/Trigger/TrigMonitoring/TrigTimeMonitor/CMakeLists.txt b/Trigger/TrigMonitoring/TrigTimeMonitor/CMakeLists.txt
index 6e6a49952d4b6b98048d018a5ea17d3174a4037f..ea331c56bab541683432b1a533459d11077a98dc 100644
--- a/Trigger/TrigMonitoring/TrigTimeMonitor/CMakeLists.txt
+++ b/Trigger/TrigMonitoring/TrigTimeMonitor/CMakeLists.txt
@@ -20,8 +20,8 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 atlas_add_component( TrigTimeMonitor
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} AthenaMonitoringLib GaudiKernel TrigMonitorBaseLib TrigTimeAlgsLib )
+                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} 
+                     LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaMonitoringLib GaudiKernel TrigMonitorBaseLib TrigTimeAlgsLib )
 
 # Install files from the package:
 atlas_install_headers( TrigTimeMonitor )
diff --git a/Trigger/TrigMonitoring/TrigTimeMonitor/cmt/requirements b/Trigger/TrigMonitoring/TrigTimeMonitor/cmt/requirements
deleted file mode 100755
index 17e6fdf12ab90f7b5c444bb9735a8adc04b27bea..0000000000000000000000000000000000000000
--- a/Trigger/TrigMonitoring/TrigTimeMonitor/cmt/requirements
+++ /dev/null
@@ -1,19 +0,0 @@
-package TrigTimeMonitor
-
-author Tomasz Bold <Tomasz.Bold@cern.ch>
-
-use GaudiInterface      GaudiInterface-*             External
-use AtlasPolicy         AtlasPolicy-*
-use TrigTimeAlgs        TrigTimeAlgs-*               Trigger/TrigTools
-use AthenaMonitoring    AthenaMonitoring-*    	     Control
-use TrigMonitorBase     TrigMonitorBase-*            Trigger/TrigMonitoring
-use AtlasROOT           AtlasROOT-*                  External
-use AtlasBoost          AtlasBoost-*                 External
-
-private
-
-library TrigTimeMonitor *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="jobOfragment_TrigTimeMonitor.py"
diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/Combinators.h b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/Combinators.h
index d3b7d522842dd861bae84eca7ba3af1243e7dd83..d6ac0dfd32b098f6c40a981815bba45be5f73772 100644
--- a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/Combinators.h
+++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/Combinators.h
@@ -7,10 +7,14 @@
 #define DECISIONHANDLING_COMBINATORS_H
 
 #include <vector>
+#include <set>
+#include <functional>
+
 namespace HLT {
   /**
    * @class CombinationsGenerator helper to generate all possible combinations of objects
-   * Provided size of all collections from which the objects shoudl be combined it allws to get all 
+   * @warning The class is not making any assumption as if the this are combinations with objets repeated, i.e. it works on set of indices.
+   * For unique combinations there see utility functions below.
    **/
   class CombinationGenerator {
   public:
@@ -75,6 +79,34 @@ namespace HLT {
   private:
     CombinationGenerator m_generator;
   };  
+
+
+  /**
+   * Unique combinations for case when one can not repeat the index (i.e. for N same-object kind of triggers)
+   **/
+  /**
+   * @brief Function find all elements of the decisions which take part in succesfull unique combinations
+   * The combinations are formed from the content of each of the "indices" subvector. 
+   * The index never repeats in the combination.
+   *
+   * @arg decsions - stores indices of objects which succesfully pass selection
+   * @arg participants - set of indices which contribute to any valid combination found (useful tor marking passing RoIs)
+   * @arg filter - additional combinations filter (can be used to implement additional constraint on the objects)
+   * Another approach would be to make a generator object like above, we shall see which approach works better.
+   **/
+  typedef std::vector<size_t>  Index1DVec;
+  typedef std::vector< Index1DVec > Index2DVec;
+
+  void elementsInUniqueCombinations( const Index2DVec& indices,  std::set<size_t>& participants, std::function<bool(const Index1DVec&)> filter = [](const Index1DVec&){ return true; } );
+  
+  /**
+   * @brief Creates unique combinations of elements 
+   * @arg combinations - all calid combinations
+   * For desciption @see elementsInUnuqueCombinations, this method is different as it exposes all combinations formed    
+   **/
+  void findUniqueCombinations( const Index2DVec& indices,  std::vector<std::vector<size_t> >& combinations, std::function<bool(const Index1DVec&)> filter = [](const Index1DVec&){ return true; } );
+
+
   
 }
 
diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/HLTIdentifier.h b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/HLTIdentifier.h
index 662917a2557c96a4264c43480384a210735822a7..e56c2d27a44d8e2fba0471654802db7a901e8887 100644
--- a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/HLTIdentifier.h
+++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/HLTIdentifier.h
@@ -24,6 +24,8 @@ public:
    **/
   static void reportStringIDs( bool report ) { s_reportStringIDs = report; }
   static bool reportStringIDs() { return s_reportStringIDs; }
+  
+  static HLT::Identifier fromToolName( const std::string& tname );
   /**
    * @brief constructs identifier from human redable name
    **/  
@@ -42,7 +44,8 @@ public:
   /**
    * @brief numeric ID
    **/    
-  unsigned numeric() const { return m_id; }
+  inline unsigned numeric() const { return m_id; }
+  inline operator unsigned () const { return numeric(); }
   /**
    *  @brief comparisons, for containers of identifiers
    **/      
diff --git a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.h b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.h
index 0f15777328ad6974c5f9866d96bc3067a2a12a0c..7f41320f4980748fb2331a00e43a7e0e6f6dd2df 100644
--- a/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.h
+++ b/Trigger/TrigSteer/DecisionHandling/DecisionHandling/TrigCompositeUtils.h
@@ -60,9 +60,13 @@ namespace TrigCompositeUtils {
   /**
    * @brief Extracts DecisionIDs stored in the Decsion object 
    **/
-  void decisionIDs(const Decision* d, DecisionIDContainer& id );
-
+  void decisionIDs( const Decision* d, DecisionIDContainer& id );
 
+  /**
+   * @brief return true if thre is no positive decision stored
+   **/
+  bool allFailed( const Decision* d );
+  
   /**
    * @brief Checks if any of the DecisionIDs passed in arg required is availble in Decision object
    **/
diff --git a/Trigger/TrigSteer/DecisionHandling/src/Combinators.cxx b/Trigger/TrigSteer/DecisionHandling/src/Combinators.cxx
index 6e7d3408a05a10f1e300f9173d31c31eeca9319f..fb8f67fe62ea9da6cc3a59d22c6418d4579ba461 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/Combinators.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/Combinators.cxx
@@ -3,6 +3,7 @@
 */
 #include <algorithm>
 #include <iostream>
+#include <iterator>
 #include "DecisionHandling/Combinators.h"
 
 
@@ -42,3 +43,47 @@ CombinationGenerator::operator bool() const {
     return false;
   return true;
 }
+
+
+
+namespace {
+  
+  void combMaker( const Index2DVec& indices, std::function<void (const Index1DVec&) > handle, std::function<bool (const Index1DVec&) > filter, size_t rank=0, Index1DVec combination={} ) {
+
+    for ( auto position: indices[rank] ) {
+      // found an element matching to this combination
+      if ( std::find( combination.begin(), combination.end(), position ) == combination.end() ) {
+	//	      std::cout << "rank " << rank << " adding or replacing " << position << " to a combination containing so far ";
+	      //	      std::copy( combination.begin(), combination.end(), std::ostream_iterator<size_t>(std::cout, " ") );
+	      //	      std::cout << "\n";
+	if ( combination.size() == rank ) 
+	  combination.push_back( position );
+	else
+	  combination[rank] = position;
+ 
+	if ( combination.size() == indices.size() ) { // end of recursion
+	  if ( filter( combination ) )
+	    handle( combination );	  
+	} else {
+	  combMaker( indices, handle, filter, rank+1, combination);
+	}
+      }      
+    }    
+  }  
+}
+
+namespace HLT {
+  void elementsInUniqueCombinations( const Index2DVec& indices,  std::set<size_t>& participants, std::function<bool(const Index1DVec&)> filter ) {
+    auto handle = [&](const Index1DVec& combination ) {  for ( auto el: combination ) participants.insert(participants.begin(), el); };
+    combMaker( indices, handle, filter );
+  }
+  
+  void findUniqueCombinations( const Index2DVec& indices,  std::vector<std::vector<size_t> >& combinations, std::function<bool(const Index1DVec&)> filter ) {
+    auto handle = [&](const Index1DVec& combination ) {  combinations.push_back( combination ); };
+    combMaker( indices, handle, filter );  
+  }
+}
+
+
+
+
diff --git a/Trigger/TrigSteer/DecisionHandling/src/HLTIdentifier.cxx b/Trigger/TrigSteer/DecisionHandling/src/HLTIdentifier.cxx
index 032e482604343c994384309045e5f7659ef09b59..4bf0a683281447fa45d998bb56a8f9b932627cfd 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/HLTIdentifier.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/HLTIdentifier.cxx
@@ -25,3 +25,8 @@ MsgStream& operator<< ( MsgStream& m, const HLT::Identifier& id ) {
   }
   return m;
 }
+
+
+Identifier Identifier::fromToolName( const std::string& tname ) {
+  return Identifier(  tname.substr( tname.find('.') + 1 ) );
+}
diff --git a/Trigger/TrigSteer/DecisionHandling/src/TrigCompositeUtils.cxx b/Trigger/TrigSteer/DecisionHandling/src/TrigCompositeUtils.cxx
index ef257e0565174a4145c586dcf41a229379c4900a..4d2c911655ca7e4c74acef9d25df65077d1da67d 100644
--- a/Trigger/TrigSteer/DecisionHandling/src/TrigCompositeUtils.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/src/TrigCompositeUtils.cxx
@@ -42,6 +42,11 @@ namespace TrigCompositeUtils {
     destination.insert( decisions.begin(), decisions.end() );
   }
 
+  bool allFailed( const Decision* d ) {
+    const std::vector<int>& decisions = readOnlyAccessor( *d );    
+    return decisions.empty();
+  }
+
   bool passingIDs( const Decision* d,  const DecisionIDContainer& required ) {
     for ( auto id : readOnlyAccessor( *d ) ) {
       if ( required.count( id ) > 0 )
diff --git a/Trigger/TrigSteer/DecisionHandling/test/Combinators_test.cxx b/Trigger/TrigSteer/DecisionHandling/test/Combinators_test.cxx
index b67c50bc703983cc7e5551e0174fdf4d748dee2c..58426f12c2089088ae19c5813166dd43acda89da 100644
--- a/Trigger/TrigSteer/DecisionHandling/test/Combinators_test.cxx
+++ b/Trigger/TrigSteer/DecisionHandling/test/Combinators_test.cxx
@@ -67,10 +67,91 @@ void endCombination() {
 
 
 
+void checkElementsIn(const Index2DVec& inp, const Index1DVec& exp, 
+		     std::function<bool(const Index1DVec&)> filter = [](const Index1DVec&){ return true; } ) {
+  std::cout << "\n";
+  std::set<size_t> part;
+  elementsInUniqueCombinations(inp, part, filter);
+
+  for ( auto& v: inp ) {
+
+    for ( auto el: v ) {
+      std::cout << " " << el;
+    }
+    std::cout << " | ";
+  }
+  std::cout << ".... result is: >";
+  for ( auto el: part ) {
+    std::cout << " " << el;
+  }
+  std::cout << " <";
+  
+  VALUE ( part == std::set<size_t>( exp.begin(), exp.end() ) ) EXPECTED( true );
+
+}
+
+
+void checkCombinations(const Index2DVec& inp, const Index2DVec& exp ) {
+  std::cout << "\n";
+  Index2DVec allCombs;
+  findUniqueCombinations(inp, allCombs);
+
+  for ( auto& v: inp ) {
+    for ( auto el: v ) 
+      std::cout << " " << el;    
+    std::cout << " | ";
+  }
+  std::cout << ".... result is: > ";
+  for ( auto comb: allCombs ) {
+    for ( auto el: comb ) 
+      std::cout << " " << el;
+    std::cout << " | ";
+  }
+  std::cout << " <";
+  VALUE(allCombs == exp ) EXPECTED( true );
+}
+
+void uniqueCombElements() {
+  std::cout << "\nelements in unique combinations";
+  checkElementsIn( {{0, 3}, {0}}, {0, 3} );
+  checkElementsIn( {{1}, {1}}, {} );
+  checkElementsIn( {{}, {0}}, {} );
+  checkElementsIn( {{}, {1}}, {} );
+  checkElementsIn( {{0,3}, {1}}, {0,1,3} );
+  checkElementsIn( {{0,3}, {0, 3}}, {0,3} );
+
+  // 3 el combinations
+  checkElementsIn( { {1}, {1}, {1} }, {} );
+  checkElementsIn( { {1}, {1}, {2} }, {} );
+  checkElementsIn( { {0}, {1}, {2} }, {0,1,2} );
+  checkElementsIn( { {2}, {0,2,3}, {3} }, {0, 2, 3} );
+  checkElementsIn( { {2}, {2,3}, {3} }, {} );
+  checkElementsIn( { {3}, {1,2}, {3} }, {} );
+
+  // with filtering
+  //
+  std::cout << "\nelements in unique combinations with filtering";
+  checkElementsIn( {{0,1},{1,2,3}}, {1,2,3}, [](const Index1DVec& comb){ return comb[0] != 0; } );
+}
+
+void uniqueComb() {
+  std::cout << "\nunique combinations";
+  checkCombinations( { {0, 3}, {0}}, {{3, 0} }  ); 
+  checkCombinations( { {0}, {0}}, {}  ); 
+  checkCombinations( { {0,3}, {1,3}}, {{0, 1}, {0,3}, {3, 1} } );
+  checkCombinations( { {0}, {1}, {2} }, {{0,1,2} } );
+  checkCombinations( { {2}, {0,2,3}, {3} }, { {2, 0, 3} } );
+  checkCombinations( { {2}, {0,2,3}, {1,3} }, { {2, 0, 1}, {2, 0, 3}, {2, 3, 1} } );
+}
+
+
 int main() {
 
   smallCombination();
   endCombination();
+
+  uniqueCombElements();
+  uniqueComb();
   
   //  CombinationGenerator g( {2, 3} );
   // this will come
diff --git a/Trigger/TrigSteer/L1Decoder/CMakeLists.txt b/Trigger/TrigSteer/L1Decoder/CMakeLists.txt
index 560d50baa503ddbae48d812599c90a21f352d657..b9bb0dbfa7925b7bf8ecb370cf8289705cb6f3a4 100644
--- a/Trigger/TrigSteer/L1Decoder/CMakeLists.txt
+++ b/Trigger/TrigSteer/L1Decoder/CMakeLists.txt
@@ -13,8 +13,8 @@ atlas_depends_on_subdirs( PUBLIC
                           PRIVATE
                           Control/AthViews
                           Control/AthenaBaseComps
-			  # not needed now                          Control/AthenaMonitoring
                           Control/CxxUtils
+                          Control/AthenaMonitoring
                           Event/xAOD/xAODTrigger
                           Trigger/TrigConfiguration/TrigConfHLTData
                           Trigger/TrigConfiguration/TrigConfInterfaces
@@ -22,34 +22,20 @@ atlas_depends_on_subdirs( PUBLIC
                           Trigger/TrigEvent/TrigSteeringEvent
                           Trigger/TrigT1/TrigT1Interfaces
                           Trigger/TrigT1/TrigT1Result
-			  Trigger/TrigMonitoring/TrigMonitorBase
-			  Trigger/TrigSteer/DecisionHandling )
-
-# External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+			              Trigger/TrigSteer/DecisionHandling )
 
 # Component(s) in the package:
 atlas_add_library( L1DecoderLib
                    src/*.cxx
                    PUBLIC_HEADERS L1Decoder
-                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES}
-		   GaudiKernel AthViews AthenaBaseComps  CxxUtils
-		   xAODTrigger TrigConfHLTData TrigConfL1Data
-		   TrigSteeringEvent TrigT1Interfaces TrigT1Result
-		   TrigMonitorBaseLib DecisionHandlingLib
+                   LINK_LIBRARIES GaudiKernel AthViews AthenaBaseComps AthenaMonitoringLib 
+                   CxxUtils xAODTrigger TrigConfHLTData TrigConfL1Data
+		           TrigSteeringEvent TrigT1Interfaces TrigT1Result DecisionHandlingLib
                    )
                    
 atlas_add_component( L1Decoder
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES}
-                     ${ROOT_LIBRARIES} GaudiKernel AthViews
-                     AthenaBaseComps CxxUtils xAODTrigger
-                     TrigConfHLTData TrigConfL1Data TrigSteeringEvent
-                     TrigT1Interfaces TrigT1Result
-		     L1DecoderLib	
+                     LINK_LIBRARIES L1DecoderLib
                      )
 
 atlas_install_python_modules( python/*.py)
diff --git a/Trigger/TrigSteer/L1Decoder/cmt/requirements b/Trigger/TrigSteer/L1Decoder/cmt/requirements
deleted file mode 100644
index ada769d5b4f84d00994bc18d0681c7c686c34e4a..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/L1Decoder/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-package L1Decoder
-
-use AtlasPolicy     AtlasPolicy-*
-use GaudiInterface  GaudiInterface-*  External
-
-private
-use AtlasROOT           AtlasROOT-*           External
-use AtlasBoost          AtlasBoost-*          External
-use AthenaBaseComps     AthenaBaseComps-*     Control
-use AthenaMonitoring    AthenaMonitoring-*    Control
-use TrigSteeringEvent   TrigSteeringEvent-*   Trigger/TrigEvent
-use xAODTrigger         xAODTrigger-*         Event/xAOD
-use TrigT1Interfaces    TrigT1Interfaces-*    Trigger/TrigT1
-use TrigT1Result        TrigT1Result-*        Trigger/TrigT1
-use TrigConfL1Data      TrigConfL1Data-*      Trigger/TrigConfiguration
-use TrigConfHLTData     TrigConfHLTData-*     Trigger/TrigConfiguration
-use TrigConfInterfaces  TrigConfInterfaces-*  Trigger/TrigConfiguration
-use CxxUtils            CxxUtils-*            Control
-use AthViews            AthViews-*            Control
-#use ViewAlgs            ViewAlgs-*            Trigger/TrigSteer
-end_private
-
-
-library L1Decoder *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_runtime extras="../share/*"
-apply_pattern declare_joboptions files="*.py"
\ No newline at end of file
diff --git a/Trigger/TrigSteer/L1Decoder/python/L1DecoderMonitoring.py b/Trigger/TrigSteer/L1Decoder/python/L1DecoderMonitoring.py
index 913e33b7532315729d31cf2d4386264fadbd3514..6a445da2819f3e50157e9a480cb0f46b3938eef3 100644
--- a/Trigger/TrigSteer/L1Decoder/python/L1DecoderMonitoring.py
+++ b/Trigger/TrigSteer/L1Decoder/python/L1DecoderMonitoring.py
@@ -1,13 +1,12 @@
 #
 #  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 #
-from AthenaMonitoring.AthenaMonitoringConf import GenericMonitoringTool
-from AthenaMonitoring.DefineHistogram import defineHistogram
+from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
 import math
 
 def CTPUnpackingMonitoring( maxItems, maxChains ):
     tool = GenericMonitoringTool( 'CTPUnpackingMonitoring' )
-    tool.HistogramsGroupName="L1Decoder";
+    tool.HistPath="L1Decoder";
     tool.Histograms = [defineHistogram( 'TAVItems', path='EXPERT', type='TH1F', title='Number of active L1 TAV items;N Items;N Events',
                                        xbins=maxItems, xmin=0, xmax=maxItems ),
                        defineHistogram( 'Chains', path='EXPERT', type='TH1F', title='Number of activated Chains;N Chains;N Events',
@@ -17,7 +16,7 @@ def CTPUnpackingMonitoring( maxItems, maxChains ):
 
 def RoIsUnpackingMonitoring( prefix, maxCount, maxEta=3. ):    
     tool = GenericMonitoringTool( prefix+'RoIsUnpackingMonitoring' )
-    tool.HistogramsGroupName="L1Decoder/RoIs"+prefix;
+    tool.HistPath="L1Decoder/RoIs"+prefix;
     tool.Histograms = [ defineHistogram( 'count', path='EXPERT', type='TH1F', title='Number of RoIs;N RoIs;N Events',
                                         xbins=maxCount, xmin=0, xmax=maxCount ),
                         defineHistogram( 'eta', path='EXPERT', type='TH1F', title='Eta distribution;eta;N RoIs',
diff --git a/Trigger/TrigSteer/L1Decoder/share/decodeBS.py b/Trigger/TrigSteer/L1Decoder/share/decodeBS.py
deleted file mode 100755
index 01d567c389b9c4515ccb03761e70fe49e75a1b3e..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/L1Decoder/share/decodeBS.py
+++ /dev/null
@@ -1,183 +0,0 @@
-#
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-
-#
-# get_files LVL1config_Physics_pp_v5.xml
-# ln -s /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/atn-test/data15_13TeV.00266904.physics_EnhancedBias.merge.RAW._lb0452._SFO-1._0001.1 input.data
-# exact config for this data is: https://atlas-trigconf.cern.ch/run2/smkey/2142/l1key/1077/hltkey/765/
-
-import os.path
-assert os.path.isfile('input.data'), 'No input file: see the JO to see how to get it'
-
-## @file L1Topo_ReadBS_test.py
-## @brief Example job options file to read BS file to test a converter
-## $Id: decodeBS.parallel.py 717359 2016-01-12 14:40:21Z bwynne $
-###############################################################
-#
-# This Job option:
-# ----------------
-# 1. Read ByteStream test data file and decode the L1Topo part
-#
-#==============================================================
-
-
-## basic job configuration
-import AthenaCommon.AtlasUnixStandardJob
-#import AthenaCommon.AtlasThreadedJob
-
-include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
-
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.InputFormat='bytestream'  # default for athenaMT/PT
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-athenaCommonFlags.BSRDOInput=["input.data"]
-
-# Input format and file for athena running
-
-from TriggerJobOpts.TriggerFlags import TriggerFlags
-TriggerFlags.doMuon=True
-
-include("TriggerRelease/jobOfragment_ReadBS_standalone.py")
-
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.detdescr.Muon_setOn()
-
-
-# Setup IOVDbSvc
-from IOVDbSvc.CondDB import conddb
-svcMgr.IOVDbSvc.GlobalTag=globalflags.ConditionsTag()
-
-# ----------------------------------------------------------------
-# Setting detector geometry
-# ----------------------------------------------------------------
-include ("RecExCond/AllDet_detDescr.py")
-#include("TriggerRelease/Trigger_topOptions_standalone.py")
-import MuonCnvExample.MuonCablingConfig
-import MuonRecExample.MuonReadCalib
-
-
-include ("MuonRecExample/MuonRecLoadTools.py")
-
-## get a handle on the ServiceManager
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-
-#Determine whether we're running in threaded mode (threads= >=1)
-from AthenaCommon.ConcurrencyFlags import jobproperties as jp
-nThreads = jp.ConcurrencyFlags.NumThreads()
-
-if nThreads >= 1:
-  ## get a handle on the Scheduler
-  from AthenaCommon.AlgScheduler import AlgScheduler
-  AlgScheduler.CheckDependencies( True )
-
-# Use McEventSelector so we can run with AthenaMP
-#import AthenaCommon.AtlasUnixGeneratorJob
-
-## get a handle on the default top-level algorithm sequence
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-# older file, has wrong ROD id: svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/m/mzinser/public/l1calo-event.sim"]
-#svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/m/mzinser/public/InputSimon/Mode7/l1calo-event.sim" ]
-svcMgr.ByteStreamInputSvc.FullFileName = [ "./input.data" ]
-#svcMgr.ByteStreamInputSvc.FullFileName = [ "/afs/cern.ch/user/s/sgeorge/atlaspublic/L1TopoCnv/mergedsim._0001.data" ]
-
-svcMgr.ByteStreamInputSvc.ValidateEvent = True
-svcMgr.EventSelector.ProcessBadEvent = True
-
-
-
-if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ):
-    from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc 
-    svcMgr += ByteStreamAddressProviderSvc()
-
-if not hasattr(svcMgr, 'THistSvc'):
-  from GaudiSvc.GaudiSvcConf import THistSvc
-  svcMgr += THistSvc()
-svcMgr.THistSvc.Output = ["EXPERT DATAFILE='expert-monitoring.root', OPT='RECREATE'"]
-
-
-from TrigConfigSvc.TrigConfigSvcConf import TrigConf__LVL1ConfigSvc
-l1svc = TrigConf__LVL1ConfigSvc("LVL1ConfigSvc")
-l1svc.XMLMenuFile = "LVL1config_Physics_pp_v5.xml"
-svcMgr += l1svc
-
-
-# This is the list of proxies to set up so that retrieval attempt will trigger the BS conversion
-svcMgr.ByteStreamAddressProviderSvc.TypeNames += [
-    "ROIB::RoIBResult/RoIBResult" ]
-
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-# Load "user algorithm" top algorithms to be run, and the libraries that house them
-
-
-if nThreads >= 1:
-  #Retrieve input data
-  from SGComps.SGCompsConf import SGInputLoader
-  topSequence += SGInputLoader( OutputLevel=INFO, ShowEventDump=False )
-  topSequence.SGInputLoader.Load = [ ('ROIB::RoIBResult','RoIBResult') ]
-
-from L1Decoder.L1DecoderMonitoring import CTPUnpackingMonitoring, RoIsUnpackingMonitoring
-from L1Decoder.L1DecoderConf import CTPUnpackingTool, EMRoIsUnpackingTool, L1Decoder, MURoIsUnpackingTool
-from L1Decoder.L1DecoderConf import CTPUnpackingEmulationTool, RoIsUnpackingEmulationTool
-l1Decoder = L1Decoder( OutputLevel=DEBUG )
-ctpUnpacker = CTPUnpackingTool( OutputLevel =  DEBUG, ForceEnableAllChains=True )
-
-
-l1Decoder.ctpUnpacker = ctpUnpacker
-l1Decoder.ctpUnpacker.MonTool = CTPUnpackingMonitoring(512, 200)
-l1Decoder.ctpUnpacker.CTPToChainMapping = ["0:HLT_e3",  "0:HLT_g5", "1:HLT_e7", "2:HLT_2e3", "15:HLT_mu6", "33:HLT_2mu6", "15:HLT_mu6idperf", "42:HLT_e15mu4"] # this are real IDs of L1_* items in pp_v5 menu
-
-emUnpacker = EMRoIsUnpackingTool( OutputLevel=DEBUG )
-emUnpacker.ThresholdToChainMapping = ["EM3 : HLT_e3", "EM3 : HLT_g5",  "EM7 : HLT_e7", "EM15 : HLT_e15mu4" ]
-emUnpacker.MonTool = RoIsUnpackingMonitoring( prefix="EM", maxCount=30 )
-
-muUnpacker = MURoIsUnpackingTool( OutputLevel=DEBUG )
-muUnpacker.ThresholdToChainMapping = ["MU6 : HLT_mu6", "MU6 : HLT_mu6idperf", "MU4 : HLT_e15mu4"] 
-muUnpacker.MonTool = RoIsUnpackingMonitoring( prefix="MU", maxCount=20 )
-# do not know yet how to configure the services for it
-
-l1Decoder.roiUnpackers = [emUnpacker, muUnpacker]
-l1Decoder.Chains="HLTChainsResult"
-topSequence += l1Decoder
-#Run calo decoder
-
-from DecisionHandling.DecisionHandlingConf import DumpDecisions
-emDecisionsDumper = DumpDecisions("DumpEML1RoIs", OutputLevel=DEBUG)
-emDecisionsDumper.Decisions = "EMRoIDecisions"
-topSequence += emDecisionsDumper
-
-chainSeedingDumper = DumpDecisions("ChainSeedingDumper", OutputLevel=DEBUG)
-chainSeedingDumper.Decisions = "HLTChainsResult"
-topSequence += chainSeedingDumper
-
-
-#--------------------------------------------------------------
-# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
-#--------------------------------------------------------------
-svcMgr.MessageSvc.OutputLevel = INFO
-svcMgr.MessageSvc.Format = "% F%42W%S%7W%R%T %0W%M"
-svcMgr.MessageSvc.verboseLimit = 0
-svcMgr.StoreGateSvc.OutputLevel = INFO
-svcMgr.StoreGateSvc.Dump=False #This is required to avoid a bug in bytestream decoding in AthenaMT mode
-svcMgr.ByteStreamAddressProviderSvc.OutputLevel = INFO
-svcMgr.ByteStreamCnvSvc.OutputLevel = INFO
-svcMgr.ByteStreamInputSvc.OutputLevel = INFO
-svcMgr.AthDictLoaderSvc.OutputLevel = INFO
-svcMgr.EventPersistencySvc.OutputLevel = INFO
-svcMgr.ROBDataProviderSvc.OutputLevel = INFO
-print svcMgr
-
-
-theApp.EvtMax = 100
-
-
-print "topSequence dump:", topSequence
-#
-# End of job options file
-#
-###############################################################
diff --git a/Trigger/TrigSteer/L1Decoder/share/fakeRun.py b/Trigger/TrigSteer/L1Decoder/share/fakeRun.py
index 283b8b4b891c013a45a0abfdda5ea298ee03718b..fa063f53f891c0242efcecafca1cd2c0589de077 100755
--- a/Trigger/TrigSteer/L1Decoder/share/fakeRun.py
+++ b/Trigger/TrigSteer/L1Decoder/share/fakeRun.py
@@ -26,15 +26,9 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
-
-
-
-from TrigConfigSvc.TrigConfigSvcConf import TrigConf__LVL1ConfigSvc
-l1svc = TrigConf__LVL1ConfigSvc("LVL1ConfigSvc")
-l1svc.XMLMenuFile = "LVL1config_Physics_pp_v5.xml"
-svcMgr += l1svc
-
-
+from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc, findFileInXMLPATH
+svcMgr += LVL1ConfigSvc()
+svcMgr.LVL1ConfigSvc.XMLMenuFile = findFileInXMLPATH("LVL1config_Physics_pp_v5.xml")
 
 
 #--------------------------------------------------------------
@@ -51,13 +45,6 @@ fakeRoI.InputFilename="testData.dat"
 topSequence += fakeRoI
 
 
-#Dumper
-from ViewAlgs.ViewAlgsConf import DumpDecisions
-dumper = DumpDecisions("L1CaloDecisions")
-dumper.OutputLevel=VERBOSE
-topSequence += dumper
-
-
 #--------------------------------------------------------------
 # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
 #--------------------------------------------------------------
@@ -70,13 +57,13 @@ print svcMgr
 
 theApp.EvtMax = 10
 
-from TrigMonitorBase.TrigGenericMonitoringToolConfig import defineHistogram, TrigGenericMonitoringToolConfig
+from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
 
-mt = TrigGenericMonitoringToolConfig("CaloRoIsMonitor")
+mt = GenericMonitoringTool("CaloRoIsMonitor")
 mt.OutputLevel=VERBOSE
-mt.Histograms += [defineHistogram('roiCount', type='TH1F', title="RoIs count;#RoIs;events", xbins=30, xmin=0, xmax=30)]
-fakeRoI.monTools = [mt]
-
+mt.Histograms += [defineHistogram('roiCount', type='TH1F', title="RoIs count;#RoIs;events", 
+                                  xbins=30, xmin=0, xmax=30)]
+fakeRoI.MonTool = mt
 
 
 from GaudiSvc.GaudiSvcConf import THistSvc
diff --git a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingEmulationTool.h b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingEmulationTool.h
index bc23a73138f440c558a26dc5fe88dff6a8229fc5..f6416f3a4f867a847d76d0f5940e049a2d7fe91b 100644
--- a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingEmulationTool.h
+++ b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingEmulationTool.h
@@ -52,7 +52,6 @@ private:
   // @brief returns names oc the chains (iner vector) to activate for each event (outer vector) 
   //  std::vector < std::set< size_t > > m_events; // list of CTPID enabled, per event
   std::vector < HLT::IDVec > m_events;
-  size_t m_event = 0;
   StatusCode parseInputFile() ;
 
 }; 
diff --git a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.cxx
index d15026af6fba21510c912480740446f2d83d58cd..06285d05aaf16d5f567f942e5d9eecf592df47dc 100644
--- a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.cxx
@@ -11,20 +11,26 @@ using namespace HLT;
 CTPUnpackingTool::CTPUnpackingTool( const std::string& type,
 				    const std::string& name, 
 				    const IInterface* parent ) 
-  : AthAlgTool(type, name, parent),
-    m_monTool("GenericMonitoringTool/MonTool", this) {  
+  : AthAlgTool(type, name, parent) {
   declareProperty("CTPToChainMapping", m_ctpToChainProperty, "Mapping of the form: '34:HLT_x', '35:HLT_y', ..., both CTP ID and chain may appear many times");
   declareProperty("ForceEnableAllChains", m_forceEnable=false, "Enables all chains in each event, testing mode");
-  declareProperty("MonTool", m_monTool=ToolHandle<GenericMonitoringTool>("", this), "Basic Monitoring");
+  declareProperty("MonTool", m_monTool=VoidMonitoringTool(this), "Basic Monitoring");
 }
 
 CTPUnpackingTool::~CTPUnpackingTool()
 {}
 
 StatusCode CTPUnpackingTool::initialize() {   
-  if ( not m_monTool.name().empty() ) 
-    CHECK( m_monTool.retrieve() );
-  return decodeCTPToChainMapping(); 
+  if ( !m_monTool.empty() ) CHECK( m_monTool.retrieve() );
+  CHECK( decodeCTPToChainMapping() ); 
+  if ( m_ctpToChain.empty() ) {
+    ATH_MSG_WARNING( "Empty CTP to chains mapping " );
+    ATH_MSG_WARNING( "Property confoguring it: " << m_ctpToChainProperty );
+  } 
+  for ( auto m: m_ctpToChain ) {
+    ATH_MSG_INFO( "Mapping of CTP bit: " << m.first << " to chains " << m.second );
+  }
+  return StatusCode::SUCCESS;
 }
 
 
diff --git a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.h
index 3c4f412affa6a37c4874f8b1c92eab713d3ac99b..12d51aebed7a1c4cbc000dda918e6d6149e2cdfa 100644
--- a/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.h
+++ b/Trigger/TrigSteer/L1Decoder/src/CTPUnpackingTool.h
@@ -1,4 +1,3 @@
-// -*- c++ -*-
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
diff --git a/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.cxx
index 65d600ca06610b048fe92d8afb7f949f6fbb515f..bd0ffa3c9ed7b927c271363a9f712800dbb40a1a 100644
--- a/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.cxx
@@ -45,23 +45,43 @@ StatusCode EMRoIsUnpackingTool::initialize() {
     ATH_MSG_ERROR( "Failed to decode threshold to chains mapping, is the format th : chain?" );
     return StatusCode::FAILURE;
   }
+  if ( m_thresholdToChainMapping.empty() ) {
+    ATH_MSG_WARNING( "None of the chains configured to require EM thresholds" );
+    ATH_MSG_WARNING( "The property configuring that is: " << m_thresholdToChainProperty );
+  }
+  for ( auto el: m_thresholdToChainMapping ) {
+    ATH_MSG_INFO( "Threshold " << el.first << " mapped to chains " << el.second );
+  }
+
+
   return StatusCode::SUCCESS;
 }
 
 StatusCode EMRoIsUnpackingTool::updateConfiguration() {
   using namespace TrigConf;
 
+  m_emThresholds.clear();
+
   const ThresholdConfig* thresholdConfig = m_configSvc->thresholdConfig();
   auto filteredThresholds= thresholdConfig->getThresholdVector( L1DataDef::EM );
   ATH_MSG_DEBUG( "Number of filtered thresholds " << filteredThresholds.size() );
   for ( auto th :  filteredThresholds ) {
     if ( th != nullptr ) {
-      ATH_MSG_DEBUG( "Found threshold in the configuration: " << th->name() << " of ID: " << HLT::Identifier( th->name() ).numeric() ); 
+      ATH_MSG_INFO( "Found threshold in the configuration: " << th->name() << " of ID: " << HLT::Identifier( th->name() ).numeric() ); 
       m_emThresholds.push_back( th );
     } else {
       ATH_MSG_DEBUG( "Nullptr to the threshold" ); 
     }
   }
+  
+  if ( m_emThresholds.empty() ) {
+    ATH_MSG_WARNING( "No EM thresholds configured" );
+  } else {
+    ATH_MSG_INFO( "Configured " << m_emThresholds.size() << " thresholds" );
+  }
+
+  
+
   return StatusCode::SUCCESS;
 }
 
@@ -112,6 +132,7 @@ StatusCode EMRoIsUnpackingTool::unpack( const EventContext& ctx,
 	}
       }
       
+
       // TODO would be nice to have this. Requires modifying the TC class: decision->setDetail( "Thresholds", passedThresholds ); // record passing threshold names ( for easy debugging )            
       decision->setObjectLink( "initialRoI", ElementLink<TrigRoiDescriptorCollection>( m_trigRoIsKey.key(), trigRoIs->size()-1 ) );
       decision->setObjectLink( "initialRecRoI", ElementLink<DataVector<LVL1::RecEmTauRoI>>( m_recRoIsKey.key(), recRoIs->size()-1 ) );
@@ -129,6 +150,7 @@ StatusCode EMRoIsUnpackingTool::unpack( const EventContext& ctx,
     MonitoredScope::declare( m_monTool,  RoIsCount, RoIsEta, RoIsPhi );
   }
 
+  ATH_MSG_DEBUG( "Unpacked " <<  trigRoIs->size() << " RoIs" );
   // recording
   {
     SG::WriteHandle<TrigRoiDescriptorCollection> handle( m_trigRoIsKey, ctx );
@@ -142,6 +164,7 @@ StatusCode EMRoIsUnpackingTool::unpack( const EventContext& ctx,
     auto handle = SG::makeHandle( m_decisionsKey, ctx );
     CHECK ( handle.record( std::move( decisionOutput ), std::move( decisionAux )  ) );
   }
+
   return StatusCode::SUCCESS; // what else
   
 
diff --git a/Trigger/TrigSteer/L1Decoder/src/FakeRoI.cxx b/Trigger/TrigSteer/L1Decoder/src/FakeRoI.cxx
index 4b03b963d5cd11239619cddec193c288745a1397..73c1f98dd23e2ed3e398a4911e52cdcfb023fe3a 100644
--- a/Trigger/TrigSteer/L1Decoder/src/FakeRoI.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/FakeRoI.cxx
@@ -29,9 +29,7 @@ FakeRoI::FakeRoI(const std::string& name, ISvcLocator* pSvcLocator)
 	m_decisions("OutputDecisions"),
 	m_decisionsAux("OutputDecisionsAux."),
 	  //	m_view("View"),
-	  m_configSvc("TrigConf::LVL1ConfigSvc/LVL1ConfigSvc", name),
-	  m_monTools(this)
-	  
+	  m_configSvc("TrigConf::LVL1ConfigSvc/LVL1ConfigSvc", name)
 {
 	// outputs
 	declareProperty("OutputRoIs", m_trigRoIs, "Name of the RoIs object produced by the unpacker");
@@ -47,14 +45,12 @@ FakeRoI::FakeRoI(const std::string& name, ISvcLocator* pSvcLocator)
 
 	// services
 	declareProperty("LVL1ConfigSvc", m_configSvc, "LVL1 Config Service");
-	declareProperty("monTools", m_monTools, "Monitoring tools array");
+    declareProperty("MonTool", m_monTool=VoidMonitoringTool(this), "Monitoring");
 }
 
 StatusCode FakeRoI::initialize() {
   CHECK( m_configSvc.retrieve() );
-  CHECK( m_monTools.retrieve() );
-
-  for (auto m : m_monTools) ATH_CHECK(m->bookHists());
+  if (!m_monTool.empty()) CHECK( m_monTool.retrieve() );
 
   return StatusCode::SUCCESS;
 }
@@ -125,10 +121,14 @@ StatusCode FakeRoI::execute() {
 	m_decisionsAux = CxxUtils::make_unique< xAOD::TrigCompositeAuxContainer>();
 	m_decisions->setStore(m_decisionsAux.ptr());
 
-	size_t roiCount{};
-	declareMonitoredVariable("roiCount", roiCount, m_monTools);
+
+    using namespace Monitored;
+    auto roiCount = MonitoredScalar::declare<int>("roiCount",0);
+    auto monitorit = MonitoredScope::declare(m_monTool, roiCount);
+
 	for (auto& fakeRoI : m_inputData[m_currentRowNumber]) {
-	  roiCount++;
+        roiCount += 1;
+        ATH_MSG_INFO(roiCount);
 		auto recRoI = new LVL1::RecEmTauRoI(fakeRoI.word, &m_emtauThresholds);
 		m_recEMTauRoIs->push_back(recRoI);
 
@@ -158,8 +158,6 @@ StatusCode FakeRoI::execute() {
 	++m_currentRowNumber;
 	m_currentRowNumber %= m_inputData.size();
 
-	for ( auto t: m_monTools ) 
-	  CHECK(t->fillHists());
 	return StatusCode::SUCCESS;
 }
 
diff --git a/Trigger/TrigSteer/L1Decoder/src/FakeRoI.h b/Trigger/TrigSteer/L1Decoder/src/FakeRoI.h
index b6b721d398ba31772af1ceea4378fb07f1dac406..f0261afdf7106c42c70a4183018089b7f2b40a8d 100644
--- a/Trigger/TrigSteer/L1Decoder/src/FakeRoI.h
+++ b/Trigger/TrigSteer/L1Decoder/src/FakeRoI.h
@@ -10,6 +10,7 @@
 #define L1Decoder_FakeRoI_h
 
 #include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaMonitoring/GenericMonitoringTool.h"
 
 #include "TrigConfInterfaces/ILVL1ConfigSvc.h"
 #include "TrigConfL1Data/ThresholdConfig.h"
@@ -20,7 +21,6 @@
 #include "TrigT1Interfaces/RecEmTauRoI.h"
 #include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
 #include "TrigT1Result/RoIBResult.h"
-#include "TrigMonitorBase/IExtMonitorTool.h"
 
 //#include "AthViews/View.h"
 
@@ -58,7 +58,7 @@ private:
 	std::string m_inputFilename;
 	std::vector<std::vector<FakeRoI::SingleFakeRoI>> m_inputData;
 	unsigned m_currentRowNumber;
-	ToolHandleArray<IExtMonitorTool> m_monTools;
+    ToolHandle<GenericMonitoringTool> m_monTool;
 };
 
 #endif
diff --git a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h
index 6ec9b71e888255d703921977df1375767b27405a..2ef72e4f4f7460badd8706608cba5a36db74bfad 100644
--- a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h
+++ b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h
@@ -38,8 +38,8 @@ class JRoIsUnpackingTool
   virtual ~JRoIsUnpackingTool(); 
   StatusCode  updateConfiguration() override { return StatusCode::SUCCESS; }
   // Athena algtool's Hooks
-  virtual StatusCode  initialize();
-  virtual StatusCode  finalize();
+  virtual StatusCode  initialize() override;
+  virtual StatusCode  finalize() override;
 
  private: 
 
diff --git a/Trigger/TrigSteer/L1Decoder/src/L1Decoder.cxx b/Trigger/TrigSteer/L1Decoder/src/L1Decoder.cxx
index 3f0338fb28ec26888e5b70c194436c097bd4475d..35cb6c3d9318d2af0342dd70e126b26df4ceef24 100644
--- a/Trigger/TrigSteer/L1Decoder/src/L1Decoder.cxx
+++ b/Trigger/TrigSteer/L1Decoder/src/L1Decoder.cxx
@@ -1,3 +1,4 @@
+
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
@@ -16,21 +17,28 @@ L1Decoder::L1Decoder(const std::string& name, ISvcLocator* pSvcLocator)
 }
 
 StatusCode L1Decoder::initialize() {
-  CHECK( m_RoIBResultKey.initialize( not m_RoIBResultKey.key().empty() )  );
+  ATH_MSG_INFO( "Reading RoIB infromation from: "<< m_RoIBResultKey.objKey() << " : " << m_RoIBResultKey.fullKey() << " : " << m_RoIBResultKey.key() );
+
+  if (  m_RoIBResultKey.objKey().empty() )
+    renounce( m_RoIBResultKey );
+  else
+    CHECK( m_RoIBResultKey.initialize( ) );
+  
   CHECK( m_chainsKey.initialize() );
 
   CHECK( m_ctpUnpacker.retrieve() );
   CHECK( m_roiUnpackers.retrieve() );
   //  CHECK( m_prescaler.retrieve() );
 
+  // this code should be in th ebeginRun but the later does not seem to be called
+  for ( auto t: m_roiUnpackers )
+    CHECK( t->updateConfiguration() );
   
 
   return StatusCode::SUCCESS;
 }
 
 StatusCode L1Decoder::beginRun() {
-  for ( auto t: m_roiUnpackers )
-    CHECK( t->updateConfiguration() );
   return StatusCode::SUCCESS;
 }
 
diff --git a/Trigger/TrigSteer/L1Decoder/src/L1Decoder.h b/Trigger/TrigSteer/L1Decoder/src/L1Decoder.h
index 22d405f99c453f5cf7b6ae1f6734fd5661d1d2cb..3dceb76a428f8409112309e0d8c5c5a7b9762d49 100644
--- a/Trigger/TrigSteer/L1Decoder/src/L1Decoder.h
+++ b/Trigger/TrigSteer/L1Decoder/src/L1Decoder.h
@@ -25,10 +25,10 @@
 class L1Decoder : public AthReentrantAlgorithm {
 public:
   L1Decoder(const std::string& name, ISvcLocator* pSvcLocator);
-  StatusCode initialize();
-  StatusCode beginRun();
-  StatusCode execute_r (const EventContext& ctx) const override;
-  StatusCode finalize();
+  virtual StatusCode initialize() override;
+  virtual StatusCode beginRun() override;
+  virtual StatusCode execute_r (const EventContext& ctx) const override;
+  virtual StatusCode finalize() override;
 
 protected: // protected to support unit testing
   //  StatusCode flagPassingRoIs(TrigCompositeUtils::DecisionContainer* rois,
diff --git a/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.h
index aeed27a4f01b8b384004b9c00fc4c373509e06ad..fd0fa06e689755769ad56995035056c0ea1d9a7f 100644
--- a/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.h
+++ b/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.h
@@ -40,8 +40,8 @@ class TAURoIsUnpackingTool
   virtual ~TAURoIsUnpackingTool(); 
   StatusCode  updateConfiguration() override { return StatusCode::SUCCESS; }
   // Athena algtool's Hooks
-  virtual StatusCode  initialize();
-  virtual StatusCode  finalize();
+  virtual StatusCode  initialize() override;
+  virtual StatusCode  finalize() override;
 
   /////////////////////////////////////////////////////////////////// 
   // Const methods: 
diff --git a/Trigger/TrigSteer/TrigHLTResultByteStream/cmt/requirements b/Trigger/TrigSteer/TrigHLTResultByteStream/cmt/requirements
deleted file mode 100755
index 90ef21ed9d38d712c593715fcb8f3a4272e6560c..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/TrigHLTResultByteStream/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package TrigHLTResultByteStream
-
-use AtlasPolicy          AtlasPolicy-*
-use StoreGate            StoreGate-*            Control
-use CLIDSvc              CLIDSvc-*              Control
-use ByteStreamCnvSvcBase ByteStreamCnvSvcBase-* Event
-use ByteStreamData       ByteStreamData-*       Event
-use TrigSteeringEvent    TrigSteeringEvent-*    Trigger/TrigEvent
-use GaudiInterface       GaudiInterface-*       External
-use DataCollection       DataCollection-*       External
-use AthenaBaseComps      AthenaBaseComps-*      Control
-
-author Nicolas Berger <Nicolas.Berger@cern.ch>
-
-# Specify the required tdaq-common components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(tdaq-common COMPONENTS eformat_write)"
-
-apply_pattern dual_use_library files="*.cxx"
diff --git a/Trigger/TrigSteer/TrigInterfaces/cmt/requirements b/Trigger/TrigSteer/TrigInterfaces/cmt/requirements
deleted file mode 100755
index ac003840aee3c88df35527d6f29a6730c852e75f..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/TrigInterfaces/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package TrigInterfaces
-author Gianluca Comune <Gianluca.Comune@cern.ch>
-
-public
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*             External
-use AthenaBaseComps     AthenaBaseComps-*            Control
-use AthenaMonitoring    AthenaMonitoring-*           Control
-use TrigSteeringEvent   TrigSteeringEvent-*          Trigger/TrigEvent
-use AthContainers       AthContainers-*		     Control
-use AthLinks            AthLinks-*		     Control
-use DataCollection      DataCollection-*             External
-
-
-# this is for linkage only
-# use TrigParticle    TrigParticle-*                Trigger/TrigEvent
-# use TrigCaloEvent   TrigCaloEvent-*               Trigger/TrigEvent
-# use TrigMuonEvent   TrigMuonEvent-*               Trigger/TrigEvent
-# use TrigCosmicEvent TrigCosmicEvent-*             Trigger/TrigEvent
-# use TrigInDetEvent  TrigInDetEvent-*              Trigger/TrigEvent
-
-
-apply_pattern dual_use_library files=*.cxx
-
-use TrigNavigation      TrigNavigation-*             Trigger/TrigEvent
-use TrigStorageDefinitions      TrigStorageDefinitions-*             Trigger/TrigEvent
-
-
-private
-
-use AthenaKernel        AthenaKernel-*               Control
-use StoreGate           StoreGate-*                  Control
-use TrigTimeAlgs        TrigTimeAlgs-*               Trigger/TrigTools
-use xAODTrigger	    	xAODTrigger-*		         Event/xAOD
-
-# UnitTest programs
-
-use TestTools      TestTools-*         AtlasTest
-apply_pattern UnitTest_run unit_test=Templates extrapatterns=".*"
-apply_pattern UnitTest_run unit_test=MonitoredAlgo extrapatterns=".*"
-apply_pattern UnitTest_run unit_test=HLTCheck extrapatterns=".*"
diff --git a/Trigger/TrigSteer/TrigSteering/cmt/requirements b/Trigger/TrigSteer/TrigSteering/cmt/requirements
deleted file mode 100755
index 408334b5d2b45210982781ff9faa9a66d7ad2beb..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/TrigSteering/cmt/requirements
+++ /dev/null
@@ -1,81 +0,0 @@
-package TrigSteering
-
-
-# author Till Eifert <Till.Eifert@cern.ch>
-# author Nicolas Berger <Nicolas.Berger@cern.ch>
-author Tomasz Bold <Tomasz.Bold@cern.ch>
-author Rustem Ospanov <Rustem.Ospanov@cern.ch>
-author Frank Winklmeier  <fwinkl@cern>
-author Joerg Stelzer  <stelzer@cern>
-
-
-public
-use  AtlasPolicy                AtlasPolicy-*
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  AthenaKernel               AthenaKernel-*                  Control
-use  AthenaMonitoring           AthenaMonitoring-*              Control
-use  EventInfo                  EventInfo-*                     Event
-use  GaudiInterface             GaudiInterface-*                External
-use  StoreGate                  StoreGate-*                     Control
-use  TrigConfHLTData            TrigConfHLTData-*               Trigger/TrigConfiguration
-use  TrigConfInterfaces         TrigConfInterfaces-*            Trigger/TrigConfiguration
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-use  TrigT1Result               TrigT1Result-*                  Trigger/TrigT1
-use  TrigTimeAlgs               TrigTimeAlgs-*                  Trigger/TrigTools
-use  DataModel                  DataModel-*                     Control
-use  TrigT1CaloEvent            TrigT1CaloEvent-*               Trigger/TrigT1
-use  TrigT1CaloToolInterfaces   TrigT1CaloToolInterfaces-*      Trigger/TrigT1
-use  TrigROBDataProviderSvc     TrigROBDataProviderSvc-*        Trigger/TrigDataAccess
-use  L1TopoCoreSim              L1TopoCoreSim-*                 Trigger/TrigT1/L1Topo
-use  L1TopoEvent                L1TopoEvent-*                   Trigger/TrigT1/L1Topo
-use  L1TopoAlgorithms           L1TopoAlgorithms-*              Trigger/TrigT1/L1Topo
-use  L1TopoSimulation           L1TopoSimulation-*              Trigger/TrigT1/L1Topo
-use  TrigConfBase               TrigConfBase-*                  Trigger/TrigConfiguration
-use  xAODEventInfo              xAODEventInfo-*                 Event/xAOD
-
-private
-use  AtlasBoost                 AtlasBoost-*                    External
-use  AtlasCLHEP                 AtlasCLHEP-*                    External
-use  AtlasROOT                  AtlasROOT-*                     External
-use  AtlasReflex                AtlasReflex-*                   External
-use  ByteStreamCnvSvcBase       ByteStreamCnvSvcBase-*          Event
-use  DataCollection             DataCollection-*                External
-use  TestTools                  TestTools-*                     AtlasTest
-use  TrigConfL1Data             TrigConfL1Data-*                Trigger/TrigConfiguration
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  TrigMonitorBase            TrigMonitorBase-*               Trigger/TrigMonitoring
-use  TrigNavigation             TrigNavigation-*                Trigger/TrigEvent
-use  TrigSerializeResult        TrigSerializeResult-*           Trigger/TrigDataAccess
-use  TrigT1Interfaces           TrigT1Interfaces-*              Trigger/TrigT1
-use  L1TopoCommon               L1TopoCommon-*                  Trigger/TrigT1/L1Topo
-use  L1TopoConfig               L1TopoConfig-*                  Trigger/TrigT1/L1Topo
-use  TrigStorageDefinitions     TrigStorageDefinitions-*        Trigger/TrigEvent
-use  xAODTrigger                xAODTrigger-*                   Event/xAOD
-use  CTPfragment                *  
-end_private
-
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.py Lvl1Results.txt"
-apply_pattern declare_xmls extras="-s=../share *.dtd *.xml"
-
-
-apply_pattern declare_python_modules files="*.py"
-
-private
-
-# the following lines are needed for the unitTests:
-apply_tag  NEEDS_CORAL_BASE
-apply_tag NEEDS_COOL_FACTORY
-
-use TestTools      TestTools-*         AtlasTest
-apply_pattern install_runtime
-
-apply_pattern UnitTest_run unit_test=Signature extrapatterns=".*"
-
-# documentation
-macro_append DOXYGEN_INPUT " ../doc"
-
-apply_pattern lcgdict dict=TrigSteering selectionfile=selection.xml headerfiles="../TrigSteering/TrigSteeringDict.h"
-
-end_private
diff --git a/Trigger/TrigSteer/TrigSteering/doc/packagedoc.h b/Trigger/TrigSteer/TrigSteering/doc/packagedoc.h
index 0ff978fe7b82771fa2bddd42a8408dbd60373d23..487450af4352af28fbb59a150c1c62f2ac9e1c8c 100644
--- a/Trigger/TrigSteer/TrigSteering/doc/packagedoc.h
+++ b/Trigger/TrigSteer/TrigSteering/doc/packagedoc.h
@@ -34,16 +34,6 @@ algorithms.
   - HLT::LvlXConverter : various tools to do the trigger level conversion
   - Scaler : various classes which provide scaler engines for both: pass-throughs and prescales
 
-@ref used_TrigSteering
 
-@ref requirements_TrigSteering
 
 */
-
-/**
-@page used_TrigSteering Used Packages
-*/
-
-/**
-@page requirements_TrigSteering Requirements
-*/
diff --git a/Trigger/TrigSteer/TrigSteeringTest/cmt/requirements b/Trigger/TrigSteer/TrigSteeringTest/cmt/requirements
deleted file mode 100755
index b0b22ace8a482ec2cc75734e36e3b5ff3106218b..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/TrigSteeringTest/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package TrigSteeringTest
-
-author Gianluca Comune <Gianluca.Comune@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*             External
-#use StoreGate      	StoreGate-*  		     Control
-
-use TrigInterfaces      TrigInterfaces-*             Trigger/TrigSteer
-use TrigSteeringEvent	TrigSteeringEvent-*          Trigger/TrigEvent
-
-library TrigSteeringTest *.cxx -s=components *.cxx
-apply_pattern component_library
-
-private
-use xAODTrigger		xAODTrigger-*		     Event/xAOD
-use AthenaKernel 	AthenaKernel-* 		     Control
-use AthContainers       AthContainers-* 	     Control
-use TrigNavigation      TrigNavigation-*             Trigger/TrigEvent
-use TrigTimeAlgs	TrigTimeAlgs-*               Trigger/TrigTools
-use  TrigT1Interfaces           TrigT1Interfaces-*              Trigger/TrigT1
-
-#apply_pattern lcgdict dict=TrigSteeringTest selectionfile=selection.xml headerfiles="../TrigSteeringTest/TrigSteeringTestDict.h"
-
-apply_pattern declare_python_modules files="*.py"
-
-end_private
diff --git a/Trigger/TrigSteer/TrigSteeringTest/doc/packagedoc.h b/Trigger/TrigSteer/TrigSteeringTest/doc/packagedoc.h
index ba680c3de1ccaa6f2c95c37977fe273526ff9ddb..cdf531766d24f16e899b3242a6ae7f01b307dc60 100644
--- a/Trigger/TrigSteer/TrigSteeringTest/doc/packagedoc.h
+++ b/Trigger/TrigSteer/TrigSteeringTest/doc/packagedoc.h
@@ -14,20 +14,6 @@
 This package provides some dummy algorithm to test the HLT Steering w/o any real or MC data!
 
 
-@ref used_TrigSteeringTest
-
-@ref requirements_TrigSteeringTest
-
-*/
-
-/**
-@page used_TrigSteeringTest Used Packages
-*/
-
-/**
-@page requirements_TrigSteeringTest Requirements
-*/
-
 
 
 */
diff --git a/Trigger/TrigSteer/TrigSteeringTestAthenaPool/cmt/requirements b/Trigger/TrigSteer/TrigSteeringTestAthenaPool/cmt/requirements
deleted file mode 100755
index a7e6287cf791f20b7419ddb71d9dbd21b09c703c..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/TrigSteeringTestAthenaPool/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package TrigSteeringTestAthenaPool
-
-author Gianluca Comune <gianluca.comune@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use AtlasReflex           AtlasReflex-00-*        External
-use GaudiInterface      GaudiInterface-*      External
-use AthenaPoolUtilities AthenaPoolUtilities-* Database/AthenaPOOL
-use AthenaPoolCnvSvc    AthenaPoolCnvSvc-*    Database/AthenaPOOL
-#use TrigSteeringTest    TrigSteeringTest-*    Trigger/TrigSteer
-
-#macro_append TrigEventAthenaPool_dict_linkopts "-lTrigSteeringTestDict"
-
-# apply_pattern poolcnv files="-s=${TrigSteeringTest_root}/TrigSteeringTest \
-#                                   dummyPoolObj.h \ 
-#                              -s=${TrigSteeringTest_root}/TrigSteeringTest \
-#                                   dummySealObj2.h \ 
-#                              -s=${TrigSteeringTest_root}/TrigSteeringTest \
-#                                  dummySealObj1.h "
-
-
-# apply_pattern declare_joboptions files="*.py"
-
diff --git a/Trigger/TrigSteer/ViewAlgs/CMakeLists.txt b/Trigger/TrigSteer/ViewAlgs/CMakeLists.txt
index 8bc50dc12b5839c725857dd131ac9e16a51db270..36220443e49e1f8e260bef13b1f95998efc1657a 100644
--- a/Trigger/TrigSteer/ViewAlgs/CMakeLists.txt
+++ b/Trigger/TrigSteer/ViewAlgs/CMakeLists.txt
@@ -11,6 +11,8 @@ atlas_depends_on_subdirs( PUBLIC
                           GaudiKernel
 			  Control/AthContainers
 			  Control/AthLinks 
+                          Event/xAOD/xAODTrigCalo
+                          Event/xAOD/xAODTrigEgamma
                           PRIVATE
                           Control/AthViews
                           Control/StoreGate
@@ -18,15 +20,15 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/CxxUtils
                           Trigger/TrigConfiguration/TrigConfHLTData
                           Trigger/TrigEvent/TrigSteeringEvent
-                          Trigger/TrigSteer/L1Decoder )
+                          Trigger/TrigSteer/DecisionHandling )
 
 # Component(s) in the package:
 atlas_add_library( ViewAlgsLib
                    src/*.cxx
                    PUBLIC_HEADERS ViewAlgs
-                   LINK_LIBRARIES xAODTrigger GaudiKernel AthViews
-                   PRIVATE_LINK_LIBRARIES AthenaBaseComps CxxUtils TrigConfHLTData TrigSteeringEvent )
+                   LINK_LIBRARIES xAODTrigger GaudiKernel AthViews xAODTrigCalo xAODTrigEgamma
+                   PRIVATE_LINK_LIBRARIES AthenaBaseComps CxxUtils TrigConfHLTData TrigSteeringEvent DecisionHandlingLib )
 
 atlas_add_component( ViewAlgs
                      src/components/*.cxx
-                     LINK_LIBRARIES xAODTrigger GaudiKernel AthViews AthenaBaseComps CxxUtils TrigConfHLTData TrigSteeringEvent ViewAlgsLib )
+                     LINK_LIBRARIES xAODTrigger GaudiKernel AthViews AthenaBaseComps CxxUtils TrigConfHLTData TrigSteeringEvent ViewAlgsLib DecisionHandlingLib )
diff --git a/Trigger/TrigSteer/ViewAlgs/cmt/requirements b/Trigger/TrigSteer/ViewAlgs/cmt/requirements
deleted file mode 100644
index 1e231eebbbe347b06578c80acdc24aae84c0344c..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/ViewAlgs/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package ViewAlgs
-
-use AtlasPolicy          AtlasPolicy-*
-use GaudiInterface       GaudiInterface-*    External
-
-
-apply_pattern dual_use_library files="*.cxx"
-
-apply_pattern declare_python_modules files="*.py"
-
-
-use xAODTrigger       	    xAODTrigger-*  	 Event/xAOD
-use AthContainers      AthContainers-*          Control
-use AthLinks        AthLinks-*           Control
-
-
-private
-use AthenaBaseComps      AthenaBaseComps-*   Control
-use TrigSteeringEvent       TrigSteeringEvent-*  Trigger/TrigEvent
-use L1Decoder       L1Decoder-*  Trigger/TrigSteer
-use StoreGate       StoreGate-*   Control/StoreGate
-use TrigConfHLTData TrigConfHLTData-* 		 Trigger/TrigConfiguration
-
-
-use CxxUtils			CxxUtils-* 			Control
-use AthViews            AthViews-*         Control
-
diff --git a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..41560e597b06ab61c0a9c2fa65af20054c13d2b4
--- /dev/null
+++ b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.cxx
@@ -0,0 +1,112 @@
+/*
+  General-purpose view creation algorithm <bwynne@cern.ch>
+  
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "./EventViewCreatorAlgorithm.h"
+
+#include "StoreGate/ReadHandle.h"
+#include "StoreGate/WriteHandle.h"
+#include "CxxUtils/make_unique.h"
+#include "AthContainers/ConstDataVector.h"
+#include "AthViews/ViewHelper.h"
+
+
+EventViewCreatorAlgorithm::EventViewCreatorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
+  : AthAlgorithm( name, pSvcLocator ) {
+}
+
+StatusCode EventViewCreatorAlgorithm::initialize()
+{
+  CHECK( m_inputDecisionsKey.initialize() );
+  CHECK( m_viewsKey.initialize() );
+
+  renounce( m_inViewRoIs );
+  CHECK( m_inViewRoIs.initialize() );
+  renounce( m_inViewDecisions );
+  CHECK( m_inViewDecisions.initialize() );
+
+  //  CHECK( m_viewAlgorithmsPool.retrieve() );
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode EventViewCreatorAlgorithm::execute()
+{
+#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT
+  const EventContext& ctx = getContext();
+#else
+  const EventContext& ctx = *getContext();
+#endif
+
+  auto inputDecisions = SG::makeHandle( m_inputDecisionsKey );
+
+  auto viewVector = std::make_unique<std::vector<SG::View*>>();
+  auto contexts = std::vector<EventContext>( );
+
+  unsigned int viewCounter = 0;
+  unsigned int conditionsRun = getContext().getExtension<Atlas::ExtendedEventContext>()->conditionsRun();
+
+  const TrigRoiDescriptor* previousRoI = 0;
+
+  ATH_MSG_DEBUG( "Preparing " << inputDecisions.cptr()->size() << " views" );
+
+
+  for ( auto decision: *inputDecisions ) {
+    if ( TrigCompositeUtils::allFailed( decision ) ) {
+      ATH_MSG_DEBUG( "Skipping, as all decisions are negative" );
+      continue;
+    } 
+    ATH_MSG_DEBUG( "Positive decisions on RoI, peparing view" );
+    // pull RoI descriptor
+    CHECK( decision->hasObjectLink( m_roisLink ) );    
+    auto roiDescriptorEL = decision->objectLink<TrigRoiDescriptorCollection>( m_roisLink );
+    CHECK( roiDescriptorEL.isValid() );
+
+    auto roiDescriptor = *roiDescriptorEL;
+    ATH_MSG_DEBUG( "Placing TrigRoiDescriptor " << *roiDescriptor );
+
+    if ( previousRoI == roiDescriptor ) continue; 
+    // TODO here code supporting the case wnen we have many decisions associated to a single RoI
+    previousRoI = roiDescriptor;
+
+    auto oneRoIColl = std::make_unique< ConstDataVector<TrigRoiDescriptorCollection> >();    
+    oneRoIColl->clear( SG::VIEW_ELEMENTS ); //Don't delete the RoIs
+    oneRoIColl->push_back( roiDescriptor );
+
+    // make the view
+    viewVector->push_back( ViewHelper::makeView( name()+"_view", viewCounter++ ) );
+    contexts.emplace_back( ctx );
+    contexts.back().setExtension( Atlas::ExtendedEventContext( viewVector->back(), conditionsRun ) );
+    
+    // see if there is a view linked to the decision object, if so link it to the view that is just made
+    if ( decision->hasObjectLink( "view" ) ) {
+      auto viewEL = decision->objectLink< std::vector<SG::View*> >( "view" );
+      CHECK( viewEL.isValid() );
+      auto parentView = *viewEL;
+      viewVector->back()->linkParent( parentView );
+      ATH_MSG_DEBUG( "Parent view linked" );
+    }
+
+    auto handle = SG::makeHandle( m_inViewRoIs, contexts.back() );
+    CHECK( handle.setProxyDict( viewVector->back() ) );
+    CHECK( handle.record( std::move( oneRoIColl ) ) );
+
+    // TODO recording decisions related to the current view
+
+  }
+  ATH_MSG_DEBUG( "Launching execution in " << viewVector->size() << " views" );
+  // Run the views
+  CHECK( ViewHelper::runInViews( contexts,				// Vector containing views
+				 m_viewAlgorithmNames,			// Algorithms to run in each view
+				 serviceLocator()->service( m_algPoolName ) ) );	// Service to retrieve algorithms by name
+  
+  // store views
+  auto viewsHandle = SG::makeHandle( m_viewsKey );
+  CHECK( viewsHandle.record(  std::move( viewVector ) ) );
+    
+
+  return StatusCode::SUCCESS;
+}
+
diff --git a/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.h b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.h
new file mode 100644
index 0000000000000000000000000000000000000000..569b77792a06d68db7e569371c6d2f6f81ada260
--- /dev/null
+++ b/Trigger/TrigSteer/ViewAlgs/src/EventViewCreatorAlgorithm.h
@@ -0,0 +1,51 @@
+/*
+  General-purpose view creation algorithm <bwynne@cern.ch>
+
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef ViewAlgs_EventViewCreatorAlgorithm_h
+#define ViewAlgs_EventViewCreatorAlgorithm_h
+
+#include <vector>
+#include <string>
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthContainers/ConstDataVector.h"
+#include "DecisionHandling/TrigCompositeUtils.h"
+#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
+
+#include "GaudiKernel/IAlgResourcePool.h"
+#include "AthViews/View.h"
+
+class EventViewCreatorAlgorithm : public AthAlgorithm
+{
+  public:
+    EventViewCreatorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
+    StatusCode initialize();
+    StatusCode execute();
+
+  private:
+    //Input trig composite collection to split into views
+    SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_inputDecisionsKey{ this, "Decisions", "Unspecified", "The name of decision container to use in making views" };
+
+    //Output views for merging
+    SG::WriteHandleKey< std::vector< SG::View* > > m_viewsKey{ this, "Views", "Unspecified", "The key of views collection produced" };
+
+    // auxiliary handles
+    SG::WriteHandleKey< ConstDataVector<TrigRoiDescriptorCollection> > m_inViewRoIs{ this, "InViewRoIs", "Unspecified", "Name with which the RoIs shoudl be inserted into the views" };
+    SG::WriteHandleKey< ConstDataVector<TrigCompositeUtils::DecisionContainer> > m_inViewDecisions{ this, "InViewDecisions", "Unspecified", "The name of decision container placed in the view" };
+
+
+    Gaudi::Property< std::vector<std::string> > m_viewAlgorithmNames{ this, "AlgorithmNameSequence", std::vector<std::string>(), "Algorithms to run in each view" };
+
+
+
+    Gaudi::Property<bool> m_viewPerRoI{ this, "ViewPerRoI", false, "Create one View per RoI as opposed to one View per Decision object, needs to be true when multiple decisions per RoI exists" };
+    
+    Gaudi::Property< std::string > m_algPoolName{ this, "AlgPoolName", "ViewAlgPool", "" };
+    Gaudi::Property< std::string > m_roisLink{ this, "RoIsLink", "Unspecified", "Name of EL to RoI object lined to the decision" };
+};
+
+#endif
+
diff --git a/Trigger/TrigSteer/ViewAlgs/src/MenuAlgView.cxx b/Trigger/TrigSteer/ViewAlgs/src/MenuAlgView.cxx
deleted file mode 100644
index 5e9eb6fa3fc4ebd18dbe539403b3932d2995de20..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/ViewAlgs/src/MenuAlgView.cxx
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include <sstream>
-#include "CxxUtils/make_unique.h"
-#include "L1Decoder/TrigIdentifiers.h"
-
-#include "MenuAlgView.h"
-
-using namespace TrigConf;
-
-namespace AthViews {
-
-MenuAlgView::MenuAlgView(const std::string& name, ISvcLocator* pSvcLocator) 
-   :  AthViewAlgorithm(name, pSvcLocator),
-//  : AthAlgorithm(name, pSvcLocator), 
-    m_inputChainDecisions("MenuInput"), 
-    m_outputChainDecisions("MenuOutput"), 
-    m_outputChainDecisionsAux("MenuOutputAux."),
-
-    m_inputProxyDecisions("ProxyInput"),    
-    m_outputProxyDecisions("ProxyOutput"), 
-    m_outputProxyDecisionsAux("ProxyOutputAux.") 
-{
-  declareProperty("InputChainDecisions", m_inputChainDecisions, "Name of the decisions object of previous stages of the chains");
-  declareProperty("OutputChainDecisions", m_outputChainDecisions, "Name of the decisions object which contains decisions for chains");
-  declareProperty("OutputChainDecisionsAux", m_outputChainDecisionsAux, "Aux");
-
-  declareProperty("HypoDecisions", m_inputProxyDecisions, "Name of the decisions object which contains decisions of hypo algorithms");
-  declareProperty("OutputDecisions", m_outputProxyDecisions, "Name of the decisions object which are to be produced");
-  declareProperty("OutputDecisionsAux", m_outputProxyDecisionsAux, "Aux");
-  declareProperty("Required", m_requiredConf, "List of required signatures, each specified by: chain_name = hypo_name x multiplicity ... (nonuniform chains not supported yet)" );
-}
-
-StatusCode MenuAlgView::initialize() { 
-  //decode property
-  std::istringstream input;
-  // decode format HLT_em25 = L2_em20_calo x 1
-  for ( auto requirement : m_requiredConf ) {
-    input.clear();
-    input.str(requirement);
-    std::string chain;
-    std::string eqSign;
-    std::string hypo;
-   std::string xChar;
-    size_t multiplicity;
-    input >> chain >> eqSign >> hypo >> xChar >> multiplicity;    
-    if ( xChar != "x" or eqSign != "=" ) {
-      ATH_MSG_WARNING("Ubable to decode " << requirement <<  " it shoudl be of form 'chain = hypo x N'"   );
-      return StatusCode::FAILURE;
-    }
-    m_required.push_back({HLTUtils::string2hash(chain, "chain"), HLTUtils::string2hash(hypo), multiplicity});    
-    ATH_MSG_DEBUG( "Will require " << hypo << " x " << multiplicity << " for the chain: " << chain);
-  }
-  return StatusCode::SUCCESS;
-}
-
-
-
-
-
-StatusCode MenuAlgView::execute() {
-  // harvest all the hypo decisions
-  if ( not m_inputProxyDecisions.isValid() ) {
-    ATH_MSG_ERROR("No Proxy " <<m_inputProxyDecisions.name()<<" from previous hypos");
-    return StatusCode::FAILURE;
-  }
-
-  std::map<HLTHash, size_t> hypoPassedObjectsMultiplicity;
-  {
-    for ( const auto roiComposite: *m_inputProxyDecisions.cptr() ) {
-      std::vector<TriggerElementID> passedHypoIDs;
-      roiComposite->getDetail("Passed", passedHypoIDs);
-      for ( auto id: passedHypoIDs ) {
-	hypoPassedObjectsMultiplicity[HLTHash(id)] += 1;
-      } 
-    }
-  }
-
-
-  if ( not m_inputChainDecisions.isValid() ) {
-    ATH_MSG_ERROR("No chain decisions object prom previous stage, with name "<< m_inputChainDecisions.name());
-    return StatusCode::FAILURE;
-  }
-  std::set<HLTHash> chainsSurvivingPreviousStage;
-  {
-    //neeed to filter out chains not requiring this stepAlgo (stored in m_required)!!
-    std::vector<int> passedChainIDs;
-    for ( const auto chainComposite : *m_inputChainDecisions.cptr() ) {
-      int id = 0;
-      chainComposite->getDetail("ID", id);
-      int decision = 0;
-      chainComposite->getDetail("Decision", decision);
-      if ( decision != 0 ) {
-	chainsSurvivingPreviousStage.insert(HLTHash(id));      
-	ATH_MSG_DEBUG("Noticied that the chain " << HLTUtils::hash2string(HLTHash(id), "chain") << " passed at the previous stage");
-      } else {
-	ATH_MSG_VERBOSE("Noticied that the chain " << HLTUtils::hash2string(HLTHash(id), "chain") << " rejected at the previous stage ");
-      }
-    }
-  }
-  
-
-  m_outputChainDecisions = CxxUtils::make_unique< xAOD::TrigCompositeContainer >();
-  m_outputChainDecisionsAux = CxxUtils::make_unique< xAOD::TrigCompositeAuxContainer>();  
-  m_outputChainDecisions->setStore(m_outputChainDecisionsAux.ptr());
-
-  ATH_MSG_DEBUG("Checking menu, got " << m_required.size() 
-		<< " chains to decide on, previous stage passed " << chainsSurvivingPreviousStage.size() 
-		<< " chains, hypos passed " << hypoPassedObjectsMultiplicity.size()  );
-
-  std::set<HLTHash> tesOfPassingChains;
-  size_t passingChainsCount = 0;
-
-  // loop over the requirements
-  for ( const auto req: m_required ) {
-    // check if the chain was not already rejected, if so simply ignore it in further consideration
-    if ( chainsSurvivingPreviousStage.count(req.chain) != 1  ) {
-      ATH_MSG_DEBUG("Chain rejected at the previous stage "<< HLTUtils::hash2string(req.chain, "chain"));
-      continue;
-    }
-    
-    // irrespecively of the decision we store the information
-    xAOD::TrigComposite * chainDecision  = new xAOD::TrigComposite();
-    m_outputChainDecisions->push_back(chainDecision);
-    chainDecision->setDetail("ID", ChainID(req.chain));
-
-    const int satisfied = hypoPassedObjectsMultiplicity[req.hypo] >= req.multiplicity ? 1 : 0;     // chain pass condition
-    ATH_MSG_DEBUG("Chain ID:" << req.chain << " " << HLTUtils::hash2string(req.chain, "chain") << "  decision " << satisfied);
-    chainDecision->setDetail("Decision", satisfied);
-    tesOfPassingChains.insert(req.hypo);
-    passingChainsCount += satisfied;
-  }
-  
-  // iterate over hypo decisions and create decision object for those which are interested from the menu standpoint
-
-  m_outputProxyDecisions = CxxUtils::make_unique< xAOD::TrigCompositeContainer >();
-  m_outputProxyDecisionsAux = CxxUtils::make_unique< xAOD::TrigCompositeAuxContainer>();  
-  m_outputProxyDecisions->setStore(m_outputProxyDecisionsAux.ptr());
-    
-  if ( passingChainsCount > 0) {
-    ATH_MSG_DEBUG("Event passed this step");
-    size_t nRoI=0;
-    for ( const auto roiComposite: *m_inputProxyDecisions.cptr() ) {
-      if ( hasTE( roiComposite,  tesOfPassingChains) ) {
-	xAOD::TrigComposite * teDecision  = new xAOD::TrigComposite();
-	m_outputProxyDecisions->push_back(teDecision);
-	teDecision->setObjectLink("seed", ElementLink<xAOD::TrigCompositeContainer>(m_inputProxyDecisions.name(), nRoI) );
-      }
-      nRoI ++;
-    }
-  } else {
-    ATH_MSG_DEBUG("Event rejected at this step");
-  }
-
-   
-  return StatusCode::SUCCESS;
-}
-
-
-bool MenuAlgView::hasTE(const xAOD::TrigComposite* c, const std::set<HLTHash>& passing) const {
-  std::vector<TriggerElementID> passedHypoIDs;
-  c->getDetail("Passed", passedHypoIDs);
-  for ( auto id: passedHypoIDs ) {
-    if ( passing.count(HLTHash(id)) == 1 )
-      return true;
-  } 
-  return false;
-}
-
-
-}
diff --git a/Trigger/TrigSteer/ViewAlgs/src/MenuAlgView.h b/Trigger/TrigSteer/ViewAlgs/src/MenuAlgView.h
deleted file mode 100644
index 301720466a5c3441bf9fc33e864ac150df4cd865..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/ViewAlgs/src/MenuAlgView.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef ViewAlgs_MenuAlgView_h
-#define ViewAlgs_MenuAlgView_h
-#include <string>
-//#include "AthenaBaseComps/AthAlgorithm.h"
-#include "AthViews/AthViewAlgorithm.h"
-
-#include "xAODTrigger/TrigCompositeContainer.h"
-#include "xAODTrigger/TrigCompositeAuxContainer.h"
-
-#include "AthViews/View.h"
-#include "TrigConfHLTData/HLTUtils.h"
-
-namespace AthViews {
-
-class MenuAlgView : public ::AthViewAlgorithm  {
-
- public:
-
-  MenuAlgView(const std::string& name, ISvcLocator* pSvcLocator);
-  StatusCode initialize();
-  StatusCode execute();
-
-  struct Requirement {
-    TrigConf::HLTHash chain; 
-    TrigConf::HLTHash hypo; 
-    size_t multiplicity;
-  };
-
-
- private:
-  std::vector<std::string> m_requiredConf;
-  std::vector<Requirement> m_required;
-  SG::ReadHandle< xAOD::TrigCompositeContainer > m_inputChainDecisions;
-  SG::WriteHandle< xAOD::TrigCompositeContainer > m_outputChainDecisions;
-  SG::WriteHandle< xAOD::TrigCompositeAuxContainer > m_outputChainDecisionsAux;
-
-
-  SG::ReadHandle< xAOD::TrigCompositeContainer > m_inputProxyDecisions;
-  SG::WriteHandle< xAOD::TrigCompositeContainer > m_outputProxyDecisions;
-  SG::WriteHandle< xAOD::TrigCompositeAuxContainer > m_outputProxyDecisionsAux;
-
-
-  bool hasTE(const xAOD::TrigComposite*, const std::set<TrigConf::HLTHash>&) const;
-
-
-
-};
-
-}
-
-#endif 
diff --git a/Trigger/TrigSteer/ViewAlgs/src/MergeViews.cxx b/Trigger/TrigSteer/ViewAlgs/src/MergeViews.cxx
index 2298acdeb1092567af4e6b0e3d194a7184f22b62..c715b5a04c9f5a062261634faa4a30f5f99fe6c6 100644
--- a/Trigger/TrigSteer/ViewAlgs/src/MergeViews.cxx
+++ b/Trigger/TrigSteer/ViewAlgs/src/MergeViews.cxx
@@ -1,4 +1,23 @@
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
+#include "MergeViews.h"
 
+MergeViews::MergeViews(const std::string& name, ISvcLocator* pSvcLocator)
+  : AthReentrantAlgorithm( name, pSvcLocator ) {}
+
+StatusCode MergeViews::initialize() {
+  CHECK( m_viewsKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+StatusCode MergeViews::execute_r( const EventContext& context ) const {
+  auto viewsHandle = SG::makeHandle( m_viewsKey, context );
+  const std::vector<SG::View*>& viewsRef = *viewsHandle;
+
+  for ( auto & tool : m_mergingTools ) {
+    CHECK( tool->merge( context, viewsRef ) );
+  }
+
+  return StatusCode::SUCCESS;
+}
diff --git a/Trigger/TrigSteer/ViewAlgs/src/MergeViews.h b/Trigger/TrigSteer/ViewAlgs/src/MergeViews.h
index 2298acdeb1092567af4e6b0e3d194a7184f22b62..1960bbfc3c0e95f2d3dbcb0b0a309a6f7d718b8f 100644
--- a/Trigger/TrigSteer/ViewAlgs/src/MergeViews.h
+++ b/Trigger/TrigSteer/ViewAlgs/src/MergeViews.h
@@ -2,3 +2,15 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
+#include "AthViews/IViewsMergerTool.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+
+class MergeViews : virtual public AthReentrantAlgorithm {
+public:
+  MergeViews(const std::string& name, ISvcLocator* pSvcLocator);
+  StatusCode initialize() override;
+  StatusCode execute_r( const EventContext& context ) const override;
+private:
+  SG::ReadHandleKey<std::vector<SG::View*> > m_viewsKey { this, "Views", "Views", "Collection of views to read from" };  
+  ToolHandleArray<IViewsMergerTool> m_mergingTools {this, "MergingTools", {}, "Merging tools used to perform the merging action" };
+};
diff --git a/Trigger/TrigSteer/ViewAlgs/src/TrigL2CaloViewsMergerTool.cxx b/Trigger/TrigSteer/ViewAlgs/src/TrigL2CaloViewsMergerTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..e962750f0dea35267d2aa1043d792105a9bd07b1
--- /dev/null
+++ b/Trigger/TrigSteer/ViewAlgs/src/TrigL2CaloViewsMergerTool.cxx
@@ -0,0 +1,37 @@
+#include "TrigL2CaloViewsMergerTool.h"
+
+
+TrigL2CaloViewsMergerTool::TrigL2CaloViewsMergerTool( const std::string& type, 
+							      const std::string& name, 
+							      const IInterface* parent ) 
+  : AthAlgTool( type, name, parent ) {}
+
+StatusCode TrigL2CaloViewsMergerTool::initialize() {
+  CHECK( m_mergedClustersKey.initialize() );
+  renounce( m_inViewClustersKey ); // this is an input no to be seen by scheduler
+  CHECK( m_inViewClustersKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigL2CaloViewsMergerTool::merge( const EventContext& context, const std::vector<SG::View*>& views ) const {
+
+  auto output = std::make_unique< ConstDataVector< xAOD::TrigEMClusterContainer > >();
+  output->clear( SG::VIEW_ELEMENTS );
+
+  for ( auto view : views ) {
+    // make input electrons 
+    EventContext viewContext( context );
+    viewContext.setExtension(  Atlas::ExtendedEventContext( view ) );
+    auto clustersInViewHandle = SG::makeHandle( m_inViewClustersKey, viewContext );
+    CHECK ( clustersInViewHandle.isValid() );
+    ATH_MSG_DEBUG( "Found: "<< clustersInViewHandle->size() << "clusters in view" );
+    for ( auto electron: *clustersInViewHandle ) {
+      output->push_back( electron );
+    }
+  }
+  ATH_MSG_DEBUG( "Output clusters container size: " << output->size() );
+  
+  auto outputHandle = SG::makeHandle( m_mergedClustersKey, context );
+  CHECK( outputHandle.record( std::move( output ) ) );  
+  return StatusCode::SUCCESS;
+}
diff --git a/Trigger/TrigSteer/ViewAlgs/src/TrigL2CaloViewsMergerTool.h b/Trigger/TrigSteer/ViewAlgs/src/TrigL2CaloViewsMergerTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..f036160716dda2e14638aa55f8d0cbe725227f29
--- /dev/null
+++ b/Trigger/TrigSteer/ViewAlgs/src/TrigL2CaloViewsMergerTool.h
@@ -0,0 +1,26 @@
+#ifndef TrigEgammaHypo_TrigL2CaloViewsMergeTool_h
+#define TrigEgammaHypo_TrigL2CaloViewsMergeTool_h
+
+
+#include "AthViews/IViewsMergerTool.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+
+#include "AthViews/View.h"
+#include "AthContainers/ConstDataVector.h"
+#include "xAODTrigCalo/TrigEMClusterContainer.h"
+
+class TrigL2CaloViewsMergerTool : virtual public IViewsMergerTool, virtual public AthAlgTool {
+public:
+  TrigL2CaloViewsMergerTool( const std::string& type, 
+				 const std::string& name, 
+				 const IInterface* parent );
+  StatusCode initialize() override;
+  StatusCode merge( const EventContext& context, const std::vector<SG::View*>& ) const override;
+
+private:
+  SG::ReadHandleKey< xAOD::TrigEMClusterContainer > m_inViewClustersKey {this, "InViewClusters", "L2CaloClustersInView", "Input"};
+  SG::WriteHandleKey< ConstDataVector<xAOD::TrigEMClusterContainer> > m_mergedClustersKey {this, "MergedClusters", "L2CaloClustersMerged", "Output"};
+};
+
+
+#endif
diff --git a/Trigger/TrigSteer/ViewAlgs/src/TrigL2ElectronViewsMergerTool.cxx b/Trigger/TrigSteer/ViewAlgs/src/TrigL2ElectronViewsMergerTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..f24444f31d36f8440e8212a89ede52916bf42450
--- /dev/null
+++ b/Trigger/TrigSteer/ViewAlgs/src/TrigL2ElectronViewsMergerTool.cxx
@@ -0,0 +1,37 @@
+#include "TrigL2ElectronViewsMergerTool.h"
+
+
+TrigL2ElectronViewsMergerTool::TrigL2ElectronViewsMergerTool( const std::string& type, 
+							      const std::string& name, 
+							      const IInterface* parent ) 
+  : AthAlgTool( type, name, parent ) {}
+
+StatusCode TrigL2ElectronViewsMergerTool::initialize() {
+  CHECK( m_mergedElectronsKey.initialize() );
+  renounce( m_inViewElectronsKey ); // this is an input no to be seen by scheduler
+  CHECK( m_inViewElectronsKey.initialize() );
+  return StatusCode::SUCCESS;
+}
+
+StatusCode TrigL2ElectronViewsMergerTool::merge( const EventContext& context, const std::vector<SG::View*>& views ) const {
+
+  auto output = std::make_unique< ConstDataVector< xAOD::TrigElectronContainer > >();
+  output->clear( SG::VIEW_ELEMENTS );
+
+  for ( auto view : views ) {
+    // make input electrons 
+    EventContext viewContext( context );
+    viewContext.setExtension(  Atlas::ExtendedEventContext( view ) );
+    auto electronsInViewHandle = SG::makeHandle( m_inViewElectronsKey, viewContext );
+    CHECK ( electronsInViewHandle.isValid() );
+    ATH_MSG_DEBUG( "Found: "<< electronsInViewHandle->size() << "electrons in view" );
+    for ( auto electron: *electronsInViewHandle ) {
+      output->push_back( electron );
+    }
+  }
+  ATH_MSG_DEBUG( "Output electrons container size: " << output->size() );
+  
+  auto outputHandle = SG::makeHandle( m_mergedElectronsKey, context );
+  CHECK( outputHandle.record( std::move( output ) ) );  
+  return StatusCode::SUCCESS;
+}
diff --git a/Trigger/TrigSteer/ViewAlgs/src/TrigL2ElectronViewsMergerTool.h b/Trigger/TrigSteer/ViewAlgs/src/TrigL2ElectronViewsMergerTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..fc22dfadcb322eaccc88020edd5b6aef23f69b14
--- /dev/null
+++ b/Trigger/TrigSteer/ViewAlgs/src/TrigL2ElectronViewsMergerTool.h
@@ -0,0 +1,27 @@
+#ifndef TrigEgammaHypo_TrigL2ElectronViewsMergeTool_h
+#define TrigEgammaHypo_TrigL2ElectronViewsMergeTool_h
+
+
+#include "AthViews/IViewsMergerTool.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+
+#include "AthViews/View.h"
+#include "AthContainers/ConstDataVector.h"
+#include "xAODTrigEgamma/TrigElectronContainer.h"
+
+
+class TrigL2ElectronViewsMergerTool : virtual public IViewsMergerTool, virtual public AthAlgTool {
+public:
+  TrigL2ElectronViewsMergerTool( const std::string& type, 
+				 const std::string& name, 
+				 const IInterface* parent );
+  StatusCode initialize() override;
+  StatusCode merge( const EventContext& context, const std::vector<SG::View*>& ) const override;
+
+private:
+  SG::ReadHandleKey< xAOD::TrigElectronContainer > m_inViewElectronsKey {this, "InViewElectrons", "L2ElectronContainerInView", "Input"};
+  SG::WriteHandleKey< ConstDataVector<xAOD::TrigElectronContainer> > m_mergedElectronsKey {this, "MergedElectrons", "L2ElectronContainerMerged", "Output"};
+};
+
+
+#endif
diff --git a/Trigger/TrigSteer/ViewAlgs/src/components/ViewAlgs_entries.cxx b/Trigger/TrigSteer/ViewAlgs/src/components/ViewAlgs_entries.cxx
index 5cb2b25addbbb82bd38dbda75f2cfca924160699..9d1627a13bdac609680ad1f8bcbd1d6eeb9deaa3 100644
--- a/Trigger/TrigSteer/ViewAlgs/src/components/ViewAlgs_entries.cxx
+++ b/Trigger/TrigSteer/ViewAlgs/src/components/ViewAlgs_entries.cxx
@@ -1,14 +1,23 @@
 
 #include "GaudiKernel/DeclareFactoryEntries.h"
 
-#include "../MenuAlgView.h"
+#include "../EventViewCreatorAlgorithm.h"
+#include "../MergeViews.h"
+#include "../TrigL2ElectronViewsMergerTool.h"
+#include "../TrigL2CaloViewsMergerTool.h"
 
 
-DECLARE_NAMESPACE_ALGORITHM_FACTORY( AthViews,MenuAlgView )
+DECLARE_ALGORITHM_FACTORY( EventViewCreatorAlgorithm )
+DECLARE_ALGORITHM_FACTORY( MergeViews )
+DECLARE_TOOL_FACTORY( TrigL2ElectronViewsMergerTool )
+DECLARE_TOOL_FACTORY( TrigL2CaloViewsMergerTool )
+
 
 DECLARE_FACTORY_ENTRIES( ViewAlgs )
 {
-
-  DECLARE_NAMESPACE_ALGORITHM( AthViews, MenuAlgView )
+  DECLARE_ALGORITHM( EventViewCreatorAlgorithm )
+  DECLARE_ALGORITHM( MergeViews )
+  DECLARE_TOOL( TrigL2ElectronViewsMerger )
+  DECLARE_TOOL( TrigL2CaloViewsMerger )
 }
 
diff --git a/Trigger/TrigSteer/ViewAlgsTest/CMakeLists.txt b/Trigger/TrigSteer/ViewAlgsTest/CMakeLists.txt
index 127e848e2e6a3ad8af7ac31b5e7ad4135525d191..19ee62c45dd3588fc9102263d44e33c06bc16a02 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/CMakeLists.txt
+++ b/Trigger/TrigSteer/ViewAlgsTest/CMakeLists.txt
@@ -39,8 +39,10 @@ atlas_install_xmls( data/*.xml )
 
 atlas_add_test( creatingEVTest 
 		SCRIPT scripts/creatingEVTest.sh
-		EXTRA_PATTERNS AthenaHiveEventLoopMgr )
+		POST_EXEC_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/post_with_filter.sh creatingEVTest"
+		ENVIRONMENT PATTERNS=EMViewsMaker algInView "start processing")
 
 atlas_add_test( mergingEVTest 
-		SCRIPT scripts/mergingEVTest.sh 
-		EXTRA_PATTERNS AthenaHiveEventLoopMgr )
+		SCRIPT scripts/mergingEVTest.sh
+ 		POST_EXEC_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/post_with_filter.sh mergingEVTest"
+		ENVIRONMENT PATTERNS=EMViewsMaker algInView EMViewsMerger "start processing" )
diff --git a/Trigger/TrigSteer/ViewAlgsTest/cmt/requirements b/Trigger/TrigSteer/ViewAlgsTest/cmt/requirements
deleted file mode 100644
index 13ec472b1b25b5677436337dd7ca163931c04976..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/ViewAlgsTest/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package ViewAlgsTest
-
-use AtlasPolicy          AtlasPolicy-*
-use GaudiInterface       GaudiInterface-*    External
-
-library ViewAlgsTest *.cxx -s=components *.cxx
-
-
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_runtime extras="../share/*"
-
-private
-use xAODTrigger       	 xAODTrigger-*  	 Event/xAOD
-use xAODTracking       	 xAODTracking-*  	 Event/xAOD
-use FourMomUtils       	 FourMomUtils-*  	 Event/FourMomUtils
-use AthenaBaseComps      AthenaBaseComps-*       Control
-use AthContainers      AthContainers-*       Control
-use TrigSteeringEvent    TrigSteeringEvent-*     Trigger/TrigEvent
-use L1Decoder            L1Decoder-*             Trigger/TrigSteer
-use ViewAlgs             ViewAlgs-*              Trigger/TrigSteer
-#use GaudiKernel          GaudiKernel-*           External
-use TrigConfHLTData      TrigConfHLTData-* 	 Trigger/TrigConfiguration
-use CxxUtils		     CxxUtils-* 		 Control
-use AthViews             AthViews-*              Control
-use AthLinks            AthLinks-*           Control
-use TrkTrack            TrkTrack-*             Tracking/TrkEvent
-use StoreGate		StoreGate-*	       Control
-
-
diff --git a/Trigger/TrigSteer/ViewAlgsTest/scripts/post_with_filter.sh b/Trigger/TrigSteer/ViewAlgsTest/scripts/post_with_filter.sh
new file mode 100755
index 0000000000000000000000000000000000000000..559020af9c903e83f770975380da71e18d6fbbef
--- /dev/null
+++ b/Trigger/TrigSteer/ViewAlgsTest/scripts/post_with_filter.sh
@@ -0,0 +1,22 @@
+
+test=$1
+log=$1.log
+echo "patterns" $PATTERNS
+
+filter="grep -e ${PATTERNS// / -e }"
+${filter} ${log} > relevant_lines_from_execution_${test}.log
+${filter} ../share/${test}.ref > relevant_lines_from_reference_${test}.log
+
+echo "< ref"
+echo "> new"
+
+diff relevant_lines_from_reference_${test}.log relevant_lines_from_execution_${test}.log
+status=$?
+echo "DIFF status" ${status}
+if [ ${status} = 1 ]
+then
+    echo ".. new output differ from the reference"
+    echo ".. if expected update reference by copying the file : " relevant_lines_from_reference_${log} "as ${test}.ref"
+fi
+
+exit ${status}
diff --git a/Trigger/TrigSteer/ViewAlgsTest/share/EVTest.py b/Trigger/TrigSteer/ViewAlgsTest/share/EVTest.py
index 60d8ef22e92b2a1fb24078144580e2ec8acb084e..a1fbdd666ddeb2975dbcebb55c054d54a7490097 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/share/EVTest.py
+++ b/Trigger/TrigSteer/ViewAlgsTest/share/EVTest.py
@@ -25,7 +25,7 @@ data['ctp'] = ['HLT_e8',
 from TrigUpgradeTest.TestUtils import writeEmulationFiles
 writeEmulationFiles(data)
 
-from TrigUpgradeTest.CFElements import *
+from AthenaCommon.CFElements import seqAND, parOR, stepSeq
 TopHLTSeq = seqAND("TopHLTSeq")
 topSequence += TopHLTSeq
 
diff --git a/Trigger/TrigSteer/ViewAlgsTest/share/creatingEVTest.ref b/Trigger/TrigSteer/ViewAlgsTest/share/creatingEVTest.ref
index dae931a618a047a9aabc7947ee78232a9f50a233..9112aecc6bea1b01f64e3fc0ef560015aace89dc 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/share/creatingEVTest.ref
+++ b/Trigger/TrigSteer/ViewAlgsTest/share/creatingEVTest.ref
@@ -1,234 +1,22 @@
-Tue Jun 27 14:34:33 CEST 2017
-Preloading tcmalloc_minimal.so
-Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.0] [x86_64-slc6-gcc62-opt] [22.0-test-of-views-merging-algorithm/e2c8a88ea9] -- built on [2017-06-27T1428]
-Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
-Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
-Py:Athena            INFO executing ROOT6Setup
-[?1034hPy:Athena            INFO configuring AthenaHive with [1] concurrent threads
-Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 1 threads
-Py:Athena            INFO including file "AthenaCommon/Execution.py"
-Py:Athena            INFO including file "ViewAlgsTest/EVTest.py"
-Py:Athena            INFO including file "TrigUpgradeTest/HLTCF.py"
-Py:ConfigurableDb    INFO Read module info for 5349 configurables from 5 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
-MessageSvc           INFO Activating in a separate thread
-ApplicationMgr    SUCCESS 
-====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
-                                          running on lxplus053.cern.ch on Tue Jun 27 14:35:00 2017
-====================================================================================================================================
-ApplicationMgr       INFO Successfully loaded modules : AthenaServices
-ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-AthDictLoaderSvc                                   INFO in initialize...
-AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 2843 CLIDRegistry entries for module ALL
-ChronoStatSvc                                      INFO  Number of skipped events for MemStat-1
-CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
-CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                         INFO  getRegistryEntries: read 8484 CLIDRegistry entries for module ALL
-L1Decoder                                         DEBUG Property update for OutputLevel : new value = 2
-L1Decoder.CTPUnpackingEmulationTool               DEBUG Property update for OutputLevel : new value = 2
-L1Decoder.CTPUnpackingEmulationTool               DEBUG In input file ctp.dat found 4 chain sets
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Property update for OutputLevel : new value = 2
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Read in 4 pseudo events from rois.dat
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Input file parsed successfully. Data:
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Event
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Eta: -0.600000, Phi: 0.200000, Word: 1, PassedThresholdIDs: EM3, EM7, EM15, EM20, EM50, EM100, 
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Eta: 1.000000, Phi: -1.100000, Word: 1, PassedThresholdIDs: EM3, EM7, EM15, EM20, EM50, 
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Event
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Eta: 0.000000, Phi: 0.000000, Word: 0, PassedThresholdIDs: 
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Event
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Eta: -0.600000, Phi: 1.500000, Word: 2, PassedThresholdIDs: EM3, EM7, 
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Event
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Eta: -1.000000, Phi: -1.000000, Word: 3, PassedThresholdIDs: EM3, EM7, EM15, EM20, EM50, EM100, 
-L1Decoder                                         DEBUG input handles: 1
-L1Decoder                                         DEBUG output handles: 1
-L1Decoder                                         DEBUG Registering all Tools in ToolHandleArray roiUnpackers
-L1Decoder                                         DEBUG Adding private ToolHandle tool L1Decoder.EMRoIsUnpackingTool (RoIsUnpackingEmulationTool) from ToolHandleArray roiUnpackers
-L1Decoder                                         DEBUG Adding private ToolHandle tool L1Decoder.CTPUnpackingEmulationTool (CTPUnpackingEmulationTool)
-L1Decoder                                         DEBUG Data Deps for L1Decoder
-  + INPUT IGNORED ('ROIB::RoIBResult','')
-  + OUTPUT ('TrigRoiDescriptorCollection','L1EMRoIs')
-  + OUTPUT ('xAOD::TrigCompositeContainer','HLTChains')
-  + OUTPUT ('xAOD::TrigCompositeContainer','L1EM')
-alwaysPass                                         INFO Initializing alwaysPass...
-alwaysPass                                         INFO initialize ==> pass:  'PercentPass':100.00000
-ClassIDSvc                                         INFO  getRegistryEntries: read 775 CLIDRegistry entries for module ALL
-alwaysFail                                         INFO Initializing alwaysFail...
-alwaysFail                                         INFO initialize ==> pass:  'PercentPass':0.0000000
-algInView                                         DEBUG Property update for OutputLevel : new value = 2
-algInView                                         DEBUG input handles: 1
-algInView                                         DEBUG output handles: 1
-algInView                                         DEBUG Data Deps for algInView
-  + INPUT  ('TrigRoiDescriptorCollection','InViewRoI')
-  + OUTPUT ('xAOD::TrigCompositeContainer','ViewClusters')
-F_Step0EM                                         DEBUG Property update for OutputLevel : new value = 2
-F_Step0EM                                          INFO Initializing F_Step0EM...
-F_Step0EM                                         DEBUG Will consume the input data: [L1EM] and produce [step0EM]
-F_Step0EM                                         DEBUG input handles: 0
-F_Step0EM                                         DEBUG output handles: 0
-F_Step0EM                                         DEBUG Data Deps for F_Step0EM
-ClassIDSvc                                         INFO  getRegistryEntries: read 513 CLIDRegistry entries for module ALL
 EMViewsMaker                                      DEBUG Property update for OutputLevel : new value = 2
 EMViewsMaker                                      DEBUG input handles: 1
 EMViewsMaker                                      DEBUG output handles: 2
 EMViewsMaker                                      DEBUG Data Deps for EMViewsMaker
-  + INPUT  ('TrigRoiDescriptorCollection','L1EMRoIs')
-  + OUTPUT ('TrigRoiDescriptorCollection','InViewRoI')
-  + OUTPUT ('std::vector< SG::View* >','EMClusterViews')
-ThreadPoolSvc                                      INFO no thread init tools attached
-AvalancheSchedulerSvc                              INFO Activating scheduler in a separate thread
-AvalancheSchedulerSvc                              INFO Waiting for AvalancheSchedulerSvc to activate
-AvalancheSchedulerSvc                              INFO Start checking the actionsQueue
-AvalancheSchedulerSvc                              INFO Found 10 algorithms
-AvalancheSchedulerSvc                              INFO No unmet INPUT data dependencies were found
-AvalancheSchedulerSvc                              INFO Concurrency level information:
-AvalancheSchedulerSvc                              INFO  o Number of events in flight: 1
-AvalancheSchedulerSvc                              INFO  o TBB thread pool size:  'ThreadPoolSize':1
-HistogramPersistencySvc                         WARNING Histograms saving not required.
-ApplicationMgr                                     INFO Application Manager Initialized successfully
-ApplicationMgr                                     INFO Application Manager Started successfully
-AthenaHiveEventLoopMgr                             INFO Starting loop on events
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start of run 1    <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #0, run #1 on slot 0,  0 events processed so far  <<<===
-L1Decoder                               0   0      INFO No prescaling information for the chain, enabling it HLT_e8 ID#1906825600
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Getting RoIs for event 0
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG RoI word: 0x       1
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM3 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM7 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM15 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM20 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM50 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM100 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG RoI word: 0x       1
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM3 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM7 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM15 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM20 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM50 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG RoI Eta: -0.6 Phi: 0.2 RoIWord: 1
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG RoI Eta: 1 Phi: -1.1 RoIWord: 1
-L1Decoder                               0   0     DEBUG Recording chains
-alwaysPass                              0   0      INFO execute ==> filter passed
-alwaysFail                              0   0      INFO execute ==> filter failed
-F_Step0EM                               0   0     DEBUG Executing F_Step0EM...
-F_Step0EM                               0   0     DEBUG Processing input L1EM
-F_Step0EM                               0   0     DEBUG A positive decision for object: HLT_e8 ID#1906825600
-F_Step0EM                               0   0     DEBUG A positive decision for object: HLT_e8 ID#1906825600
-F_Step0EM                               0   0     DEBUG Saving output step0EM
-F_Step0EM                               0   0     DEBUG The overall decision is : positive
 EMViewsMaker                            0   0     DEBUG Placed RoICollection with a single RoI  RoIid: 0 RoIword: 1	 z: 0 (-225 - 225) eta: -0.6 (-0.7 - -0.5) phi: 0.2 (0.1 - 0.3) in the view EMViewsMaker_view 0
 EMViewsMaker                            0   0     DEBUG Placed RoICollection with a single RoI  RoIid: 0 RoIword: 1	 z: 0 (-225 - 225) eta: 1 (0.9 - 1.1) phi: -1.1 (-1.2 - -1) in the view EMViewsMaker_view 1
 algInView                               0   0     DEBUG .. The alg operates on the view EMViewsMaker_view 0
-algInView                               0   0      INFO .. Launching processing for View with RoIs
-algInView                               0   0     DEBUG  ...  RoIid: 0 RoIword: 1	 z: 0 (-225 - 225) eta: -0.6 (-0.7 - -0.5) phi: 0.2 (0.1 - 0.3) added a cluster at slightly varried position compared to RoI and fake Et: -4
-algInView                               0   0      INFO .. finished processing view
 algInView                               0   0     DEBUG .. The alg operates on the view EMViewsMaker_view 1
-algInView                               0   0      INFO .. Launching processing for View with RoIs
-algInView                               0   0     DEBUG  ...  RoIid: 0 RoIword: 1	 z: 0 (-225 - 225) eta: 1 (0.9 - 1.1) phi: -1.1 (-1.2 - -1) added a cluster at slightly varried position compared to RoI and fake Et: -1
-algInView                               0   0      INFO .. finished processing view
 EMViewsMaker                            0   0     DEBUG Execution in 2 Views performed
 EMViewsMaker                            0   0     DEBUG Cluster of ET -4
 EMViewsMaker                            0   0     DEBUG Cluster of ET -1
 EMViewsMaker                            0   0     DEBUG Recorded views under the key: EMClusterViews
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #0, run #1 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #1, run #1 on slot 0,  1 events processed so far  <<<===
-L1Decoder                               1   0      INFO No prescaling information for the chain, enabling it HLT_e8 ID#1906825600
-L1Decoder                               1   0      INFO No prescaling information for the chain, enabling it HLT_e20 ID#4230506138
-L1Decoder.EMRoIsUnpackingTool           1   0     DEBUG Getting RoIs for event 1
-L1Decoder.EMRoIsUnpackingTool           1   0     DEBUG RoI word: 0x       0
-L1Decoder.EMRoIsUnpackingTool           1   0     DEBUG RoI Eta: 0 Phi: 0 RoIWord: 0
-L1Decoder                               1   0     DEBUG Recording chains
-alwaysPass                              1   0      INFO execute ==> filter passed
-alwaysFail                              1   0      INFO execute ==> filter failed
-F_Step0EM                               1   0     DEBUG Executing F_Step0EM...
-F_Step0EM                               1   0     DEBUG Processing input L1EM
-F_Step0EM                               1   0     DEBUG Skipping object as it passed no chain of interest to this filter
-F_Step0EM                               1   0     DEBUG None of the decisions in the input L1EM passed, skipping recording output 
-F_Step0EM                               1   0     DEBUG The overall decision is : negative
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1, run #1 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #2, run #1 on slot 0,  2 events processed so far  <<<===
-L1Decoder                               2   0      INFO No prescaling information for the chain, enabling it HLT_e8 ID#1906825600
-L1Decoder.EMRoIsUnpackingTool           2   0     DEBUG Getting RoIs for event 2
-L1Decoder.EMRoIsUnpackingTool           2   0     DEBUG RoI word: 0x       2
-L1Decoder.EMRoIsUnpackingTool           2   0     DEBUG Passed Threshold EM3 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           2   0     DEBUG Passed Threshold EM7 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           2   0     DEBUG RoI Eta: -0.6 Phi: 1.5 RoIWord: 2
-L1Decoder                               2   0     DEBUG Recording chains
-alwaysPass                              2   0      INFO execute ==> filter passed
-alwaysFail                              2   0      INFO execute ==> filter failed
-F_Step0EM                               2   0     DEBUG Executing F_Step0EM...
-F_Step0EM                               2   0     DEBUG Processing input L1EM
-F_Step0EM                               2   0     DEBUG A positive decision for object: HLT_e8 ID#1906825600
-F_Step0EM                               2   0     DEBUG Saving output step0EM
-F_Step0EM                               2   0     DEBUG The overall decision is : positive
 EMViewsMaker                            2   0     DEBUG Placed RoICollection with a single RoI  RoIid: 0 RoIword: 2	 z: 0 (-225 - 225) eta: -0.6 (-0.7 - -0.5) phi: 1.5 (1.4 - 1.6) in the view EMViewsMaker_view 0
 algInView                               2   0     DEBUG .. The alg operates on the view EMViewsMaker_view 0
-algInView                               2   0      INFO .. Launching processing for View with RoIs
-algInView                               2   0     DEBUG  ...  RoIid: 0 RoIword: 2	 z: 0 (-225 - 225) eta: -0.6 (-0.7 - -0.5) phi: 1.5 (1.4 - 1.6) added a cluster at slightly varried position compared to RoI and fake Et: 9
-algInView                               2   0      INFO .. finished processing view
 EMViewsMaker                            2   0     DEBUG Execution in 1 Views performed
 EMViewsMaker                            2   0     DEBUG Cluster of ET 9
 EMViewsMaker                            2   0     DEBUG Recorded views under the key: EMClusterViews
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #2, run #1 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #3, run #1 on slot 0,  3 events processed so far  <<<===
-L1Decoder                               3   0      INFO No prescaling information for the chain, enabling it HLT_e20 ID#4230506138
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Getting RoIs for event 3
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG RoI word: 0x       3
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM3 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM7 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM15 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM20 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM50 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM100 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG RoI Eta: -1 Phi: -1 RoIWord: 3
-L1Decoder                               3   0     DEBUG Recording chains
-alwaysPass                              3   0      INFO execute ==> filter passed
-alwaysFail                              3   0      INFO execute ==> filter failed
-F_Step0EM                               3   0     DEBUG Executing F_Step0EM...
-F_Step0EM                               3   0     DEBUG Processing input L1EM
-F_Step0EM                               3   0     DEBUG A positive decision for object: HLT_e20 ID#4230506138
-F_Step0EM                               3   0     DEBUG Saving output step0EM
-F_Step0EM                               3   0     DEBUG The overall decision is : positive
 EMViewsMaker                            3   0     DEBUG Placed RoICollection with a single RoI  RoIid: 0 RoIword: 3	 z: 0 (-225 - 225) eta: -1 (-1.1 - -0.9) phi: -1 (-1.1 - -0.9) in the view EMViewsMaker_view 0
 algInView                               3   0     DEBUG .. The alg operates on the view EMViewsMaker_view 0
-algInView                               3   0      INFO .. Launching processing for View with RoIs
-algInView                               3   0     DEBUG  ...  RoIid: 0 RoIword: 3	 z: 0 (-225 - 225) eta: -1 (-1.1 - -0.9) phi: -1 (-1.1 - -0.9) added a cluster at slightly varried position compared to RoI and fake Et: -20
-algInView                               3   0      INFO .. finished processing view
 EMViewsMaker                            3   0     DEBUG Execution in 1 Views performed
 EMViewsMaker                            3   0     DEBUG Cluster of ET -20
 EMViewsMaker                            3   0     DEBUG Recorded views under the key: EMClusterViews
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #3, run #1 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 0.185241
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-alwaysPass                                         INFO finalize : 
-alwaysPass                                         INFO   - total  events: 4
-alwaysPass                                         INFO   - passed events: 4
-alwaysFail                                         INFO finalize : 
-alwaysFail                                         INFO   - total  events: 4
-alwaysFail                                         INFO   - passed events: 0
-F_Step0EM                                          INFO Finalizing F_Step0EM...
-IncidentProcAlg2                                   INFO Finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
-AvalancheSchedulerSvc                   3   0      INFO Terminating thread-pool resources
-TimelineSvc                                        INFO Outputting timeline with 39 entries to file  'TimelineFile':timeline.csv
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-L1Decoder.CTPUnpackingEmulationTool               DEBUG Calling destructor
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Calling destructor
-*****Chrono*****                                   INFO ****************************************************************************************************
-*****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
-*****Chrono*****                                   INFO ****************************************************************************************************
-ChronoStatSvc                                      INFO Time User   : Tot= 1.35  [s]                                             #=  1
-*****Chrono*****                                   INFO ****************************************************************************************************
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
-Py:Athena            INFO leaving with code 0: "successful run"
diff --git a/Trigger/TrigSteer/ViewAlgsTest/share/mergingEVTest.ref b/Trigger/TrigSteer/ViewAlgsTest/share/mergingEVTest.ref
index 2491a056fc33800a1075de5b435009b2382712e0..fea4db0703b6a3e68ab71d22e1af7c258cb27a4f 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/share/mergingEVTest.ref
+++ b/Trigger/TrigSteer/ViewAlgsTest/share/mergingEVTest.ref
@@ -1,253 +1,26 @@
-Tue Jun 27 14:31:45 CEST 2017
-Preloading tcmalloc_minimal.so
-Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.0] [x86_64-slc6-gcc62-opt] [22.0-test-of-views-merging-algorithm/e2c8a88ea9] -- built on [2017-06-27T1428]
-Py:Athena            INFO including file "AthenaCommon/Bootstrap.py"
-Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
-Py:Athena            INFO executing ROOT6Setup
-[?1034hPy:Athena            INFO executing CLI (-c) command: "doMerging=True"
-Py:Athena            INFO configuring AthenaHive with [1] concurrent threads
-Py:AlgScheduler      INFO setting up AvalancheSchedulerSvc/AvalancheSchedulerSvc with 1 threads
-Py:Athena            INFO including file "AthenaCommon/Execution.py"
-Py:Athena            INFO including file "ViewAlgsTest/EVTest.py"
-Py:Athena            INFO including file "TrigUpgradeTest/HLTCF.py"
-Py:ConfigurableDb    INFO Read module info for 5349 configurables from 5 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
-MessageSvc           INFO Activating in a separate thread
-ApplicationMgr    SUCCESS 
-====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v28r2)
-                                          running on lxplus053.cern.ch on Tue Jun 27 14:32:07 2017
-====================================================================================================================================
-ApplicationMgr       INFO Successfully loaded modules : AthenaServices
-ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr                                     INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-AthDictLoaderSvc                                   INFO in initialize...
-AthDictLoaderSvc                                   INFO acquired Dso-registry
-ClassIDSvc                                         INFO  getRegistryEntries: read 2843 CLIDRegistry entries for module ALL
-ChronoStatSvc                                      INFO  Number of skipped events for MemStat-1
-CoreDumpSvc                                        INFO install f-a-t-a-l handler... (flag = -1)
-CoreDumpSvc                                        INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-AthenaHiveEventLoopMgr                             INFO Initializing AthenaHiveEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc                                         INFO  getRegistryEntries: read 8484 CLIDRegistry entries for module ALL
-L1Decoder                                         DEBUG Property update for OutputLevel : new value = 2
-L1Decoder.CTPUnpackingEmulationTool               DEBUG Property update for OutputLevel : new value = 2
-L1Decoder.CTPUnpackingEmulationTool               DEBUG In input file ctp.dat found 4 chain sets
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Property update for OutputLevel : new value = 2
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Read in 4 pseudo events from rois.dat
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Input file parsed successfully. Data:
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Event
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Eta: -0.600000, Phi: 0.200000, Word: 1, PassedThresholdIDs: EM3, EM7, EM15, EM20, EM50, EM100, 
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Eta: 1.000000, Phi: -1.100000, Word: 1, PassedThresholdIDs: EM3, EM7, EM15, EM20, EM50, 
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Event
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Eta: 0.000000, Phi: 0.000000, Word: 0, PassedThresholdIDs: 
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Event
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Eta: -0.600000, Phi: 1.500000, Word: 2, PassedThresholdIDs: EM3, EM7, 
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Event
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Eta: -1.000000, Phi: -1.000000, Word: 3, PassedThresholdIDs: EM3, EM7, EM15, EM20, EM50, EM100, 
-L1Decoder                                         DEBUG input handles: 1
-L1Decoder                                         DEBUG output handles: 1
-L1Decoder                                         DEBUG Registering all Tools in ToolHandleArray roiUnpackers
-L1Decoder                                         DEBUG Adding private ToolHandle tool L1Decoder.EMRoIsUnpackingTool (RoIsUnpackingEmulationTool) from ToolHandleArray roiUnpackers
-L1Decoder                                         DEBUG Adding private ToolHandle tool L1Decoder.CTPUnpackingEmulationTool (CTPUnpackingEmulationTool)
-L1Decoder                                         DEBUG Data Deps for L1Decoder
-  + INPUT IGNORED ('ROIB::RoIBResult','')
-  + OUTPUT ('TrigRoiDescriptorCollection','L1EMRoIs')
-  + OUTPUT ('xAOD::TrigCompositeContainer','HLTChains')
-  + OUTPUT ('xAOD::TrigCompositeContainer','L1EM')
-alwaysPass                                         INFO Initializing alwaysPass...
-alwaysPass                                         INFO initialize ==> pass:  'PercentPass':100.00000
-ClassIDSvc                                         INFO  getRegistryEntries: read 775 CLIDRegistry entries for module ALL
-alwaysFail                                         INFO Initializing alwaysFail...
-alwaysFail                                         INFO initialize ==> pass:  'PercentPass':0.0000000
-algInView                                         DEBUG Property update for OutputLevel : new value = 2
-algInView                                         DEBUG input handles: 1
-algInView                                         DEBUG output handles: 1
-algInView                                         DEBUG Data Deps for algInView
-  + INPUT  ('TrigRoiDescriptorCollection','InViewRoI')
-  + OUTPUT ('xAOD::TrigCompositeContainer','ViewClusters')
-F_Step0EM                                         DEBUG Property update for OutputLevel : new value = 2
-F_Step0EM                                          INFO Initializing F_Step0EM...
-F_Step0EM                                         DEBUG Will consume the input data: [L1EM] and produce [step0EM]
-F_Step0EM                                         DEBUG input handles: 0
-F_Step0EM                                         DEBUG output handles: 0
-F_Step0EM                                         DEBUG Data Deps for F_Step0EM
-ClassIDSvc                                         INFO  getRegistryEntries: read 513 CLIDRegistry entries for module ALL
 EMViewsMaker                                      DEBUG Property update for OutputLevel : new value = 2
 EMViewsMaker                                      DEBUG input handles: 1
 EMViewsMaker                                      DEBUG output handles: 2
 EMViewsMaker                                      DEBUG Data Deps for EMViewsMaker
-  + INPUT  ('TrigRoiDescriptorCollection','L1EMRoIs')
-  + OUTPUT ('TrigRoiDescriptorCollection','InViewRoI')
-  + OUTPUT ('std::vector< SG::View* >','EMClusterViews')
-EMViewsMerger                                     DEBUG Property update for OutputLevel : new value = 2
-EMViewsMerger                                     DEBUG input handles: 1
-EMViewsMerger                                     DEBUG output handles: 1
-EMViewsMerger                                     DEBUG Data Deps for EMViewsMerger
-  + INPUT  ('std::vector< SG::View* >','EMClusterViews')
-  + OUTPUT ('xAOD::TrigCompositeContainer','EMClusters')
-ThreadPoolSvc                                      INFO no thread init tools attached
-AvalancheSchedulerSvc                              INFO Activating scheduler in a separate thread
-AvalancheSchedulerSvc                              INFO Waiting for AvalancheSchedulerSvc to activate
-AvalancheSchedulerSvc                              INFO Start checking the actionsQueue
-AvalancheSchedulerSvc                              INFO Found 11 algorithms
-AvalancheSchedulerSvc                              INFO No unmet INPUT data dependencies were found
-AvalancheSchedulerSvc                              INFO Concurrency level information:
-AvalancheSchedulerSvc                              INFO  o Number of events in flight: 1
-AvalancheSchedulerSvc                              INFO  o TBB thread pool size:  'ThreadPoolSize':1
-HistogramPersistencySvc                         WARNING Histograms saving not required.
-ApplicationMgr                                     INFO Application Manager Initialized successfully
-ApplicationMgr                                     INFO Application Manager Started successfully
-AthenaHiveEventLoopMgr                             INFO Starting loop on events
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start of run 1    <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #0, run #1 on slot 0,  0 events processed so far  <<<===
-L1Decoder                               0   0      INFO No prescaling information for the chain, enabling it HLT_e8 ID#1906825600
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Getting RoIs for event 0
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG RoI word: 0x       1
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM3 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM7 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM15 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM20 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM50 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM100 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG RoI word: 0x       1
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM3 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM7 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM15 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM20 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG Passed Threshold EM50 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG RoI Eta: -0.6 Phi: 0.2 RoIWord: 1
-L1Decoder.EMRoIsUnpackingTool           0   0     DEBUG RoI Eta: 1 Phi: -1.1 RoIWord: 1
-L1Decoder                               0   0     DEBUG Recording chains
-alwaysPass                              0   0      INFO execute ==> filter passed
-alwaysFail                              0   0      INFO execute ==> filter failed
-F_Step0EM                               0   0     DEBUG Executing F_Step0EM...
-F_Step0EM                               0   0     DEBUG Processing input L1EM
-F_Step0EM                               0   0     DEBUG A positive decision for object: HLT_e8 ID#1906825600
-F_Step0EM                               0   0     DEBUG A positive decision for object: HLT_e8 ID#1906825600
-F_Step0EM                               0   0     DEBUG Saving output step0EM
-F_Step0EM                               0   0     DEBUG The overall decision is : positive
 EMViewsMaker                            0   0     DEBUG Placed RoICollection with a single RoI  RoIid: 0 RoIword: 1	 z: 0 (-225 - 225) eta: -0.6 (-0.7 - -0.5) phi: 0.2 (0.1 - 0.3) in the view EMViewsMaker_view 0
 EMViewsMaker                            0   0     DEBUG Placed RoICollection with a single RoI  RoIid: 0 RoIword: 1	 z: 0 (-225 - 225) eta: 1 (0.9 - 1.1) phi: -1.1 (-1.2 - -1) in the view EMViewsMaker_view 1
 algInView                               0   0     DEBUG .. The alg operates on the view EMViewsMaker_view 0
-algInView                               0   0      INFO .. Launching processing for View with RoIs
-algInView                               0   0     DEBUG  ...  RoIid: 0 RoIword: 1	 z: 0 (-225 - 225) eta: -0.6 (-0.7 - -0.5) phi: 0.2 (0.1 - 0.3) added a cluster at slightly varried position compared to RoI and fake Et: -4
-algInView                               0   0      INFO .. finished processing view
 algInView                               0   0     DEBUG .. The alg operates on the view EMViewsMaker_view 1
-algInView                               0   0      INFO .. Launching processing for View with RoIs
-algInView                               0   0     DEBUG  ...  RoIid: 0 RoIword: 1	 z: 0 (-225 - 225) eta: 1 (0.9 - 1.1) phi: -1.1 (-1.2 - -1) added a cluster at slightly varried position compared to RoI and fake Et: -1
-algInView                               0   0      INFO .. finished processing view
 EMViewsMaker                            0   0     DEBUG Execution in 2 Views performed
 EMViewsMaker                            0   0     DEBUG Cluster of ET -4
 EMViewsMaker                            0   0     DEBUG Cluster of ET -1
 EMViewsMaker                            0   0     DEBUG Recorded views under the key: EMClusterViews
 EMViewsMerger                           0   0     DEBUG Reading fromt he view: EMViewsMaker_view 0
-EMViewsMerger                           0   0     DEBUG Found clusters
-EMViewsMerger                           0   0     DEBUG Et -4 eta -0.59 phi 0.15
 EMViewsMerger                           0   0     DEBUG Reading fromt he view: EMViewsMaker_view 1
-EMViewsMerger                           0   0     DEBUG Found clusters
-EMViewsMerger                           0   0     DEBUG Et -1 eta 1.01 phi -1.15
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #0, run #1 on slot 0,  1 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #1, run #1 on slot 0,  1 events processed so far  <<<===
-L1Decoder                               1   0      INFO No prescaling information for the chain, enabling it HLT_e8 ID#1906825600
-L1Decoder                               1   0      INFO No prescaling information for the chain, enabling it HLT_e20 ID#4230506138
-L1Decoder.EMRoIsUnpackingTool           1   0     DEBUG Getting RoIs for event 1
-L1Decoder.EMRoIsUnpackingTool           1   0     DEBUG RoI word: 0x       0
-L1Decoder.EMRoIsUnpackingTool           1   0     DEBUG RoI Eta: 0 Phi: 0 RoIWord: 0
-L1Decoder                               1   0     DEBUG Recording chains
-alwaysPass                              1   0      INFO execute ==> filter passed
-alwaysFail                              1   0      INFO execute ==> filter failed
-F_Step0EM                               1   0     DEBUG Executing F_Step0EM...
-F_Step0EM                               1   0     DEBUG Processing input L1EM
-F_Step0EM                               1   0     DEBUG Skipping object as it passed no chain of interest to this filter
-F_Step0EM                               1   0     DEBUG None of the decisions in the input L1EM passed, skipping recording output 
-F_Step0EM                               1   0     DEBUG The overall decision is : negative
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #1, run #1 on slot 0,  2 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #2, run #1 on slot 0,  2 events processed so far  <<<===
-L1Decoder                               2   0      INFO No prescaling information for the chain, enabling it HLT_e8 ID#1906825600
-L1Decoder.EMRoIsUnpackingTool           2   0     DEBUG Getting RoIs for event 2
-L1Decoder.EMRoIsUnpackingTool           2   0     DEBUG RoI word: 0x       2
-L1Decoder.EMRoIsUnpackingTool           2   0     DEBUG Passed Threshold EM3 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           2   0     DEBUG Passed Threshold EM7 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           2   0     DEBUG RoI Eta: -0.6 Phi: 1.5 RoIWord: 2
-L1Decoder                               2   0     DEBUG Recording chains
-alwaysPass                              2   0      INFO execute ==> filter passed
-alwaysFail                              2   0      INFO execute ==> filter failed
-F_Step0EM                               2   0     DEBUG Executing F_Step0EM...
-F_Step0EM                               2   0     DEBUG Processing input L1EM
-F_Step0EM                               2   0     DEBUG A positive decision for object: HLT_e8 ID#1906825600
-F_Step0EM                               2   0     DEBUG Saving output step0EM
-F_Step0EM                               2   0     DEBUG The overall decision is : positive
 EMViewsMaker                            2   0     DEBUG Placed RoICollection with a single RoI  RoIid: 0 RoIword: 2	 z: 0 (-225 - 225) eta: -0.6 (-0.7 - -0.5) phi: 1.5 (1.4 - 1.6) in the view EMViewsMaker_view 0
 algInView                               2   0     DEBUG .. The alg operates on the view EMViewsMaker_view 0
-algInView                               2   0      INFO .. Launching processing for View with RoIs
-algInView                               2   0     DEBUG  ...  RoIid: 0 RoIword: 2	 z: 0 (-225 - 225) eta: -0.6 (-0.7 - -0.5) phi: 1.5 (1.4 - 1.6) added a cluster at slightly varried position compared to RoI and fake Et: 9
-algInView                               2   0      INFO .. finished processing view
 EMViewsMaker                            2   0     DEBUG Execution in 1 Views performed
 EMViewsMaker                            2   0     DEBUG Cluster of ET 9
 EMViewsMaker                            2   0     DEBUG Recorded views under the key: EMClusterViews
 EMViewsMerger                           2   0     DEBUG Reading fromt he view: EMViewsMaker_view 0
-EMViewsMerger                           2   0     DEBUG Found clusters
-EMViewsMerger                           2   0     DEBUG Et 9 eta -0.59 phi 1.45
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #2, run #1 on slot 0,  3 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO   ===>>>  start processing event #3, run #1 on slot 0,  3 events processed so far  <<<===
-L1Decoder                               3   0      INFO No prescaling information for the chain, enabling it HLT_e20 ID#4230506138
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Getting RoIs for event 3
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG RoI word: 0x       3
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM3 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM7 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM15 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM20 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM50 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG Passed Threshold EM100 enabling respective chains
-L1Decoder.EMRoIsUnpackingTool           3   0     DEBUG RoI Eta: -1 Phi: -1 RoIWord: 3
-L1Decoder                               3   0     DEBUG Recording chains
-alwaysPass                              3   0      INFO execute ==> filter passed
-alwaysFail                              3   0      INFO execute ==> filter failed
-F_Step0EM                               3   0     DEBUG Executing F_Step0EM...
-F_Step0EM                               3   0     DEBUG Processing input L1EM
-F_Step0EM                               3   0     DEBUG A positive decision for object: HLT_e20 ID#4230506138
-F_Step0EM                               3   0     DEBUG Saving output step0EM
-F_Step0EM                               3   0     DEBUG The overall decision is : positive
 EMViewsMaker                            3   0     DEBUG Placed RoICollection with a single RoI  RoIid: 0 RoIword: 3	 z: 0 (-225 - 225) eta: -1 (-1.1 - -0.9) phi: -1 (-1.1 - -0.9) in the view EMViewsMaker_view 0
 algInView                               3   0     DEBUG .. The alg operates on the view EMViewsMaker_view 0
-algInView                               3   0      INFO .. Launching processing for View with RoIs
-algInView                               3   0     DEBUG  ...  RoIid: 0 RoIword: 3	 z: 0 (-225 - 225) eta: -1 (-1.1 - -0.9) phi: -1 (-1.1 - -0.9) added a cluster at slightly varried position compared to RoI and fake Et: -20
-algInView                               3   0      INFO .. finished processing view
 EMViewsMaker                            3   0     DEBUG Execution in 1 Views performed
 EMViewsMaker                            3   0     DEBUG Cluster of ET -20
 EMViewsMaker                            3   0     DEBUG Recorded views under the key: EMClusterViews
 EMViewsMerger                           3   0     DEBUG Reading fromt he view: EMViewsMaker_view 0
-EMViewsMerger                           3   0     DEBUG Found clusters
-EMViewsMerger                           3   0     DEBUG Et -20 eta -0.99 phi -1.05
-AthenaHiveEventLoopMgr                             INFO   ===>>>  done processing event #3, run #1 on slot 0,  4 events processed so far  <<<===
-AthenaHiveEventLoopMgr                             INFO ---> Loop Finished (seconds): 0.0441663
-ApplicationMgr                                     INFO Application Manager Stopped successfully
-IncidentProcAlg1                                   INFO Finalize
-alwaysPass                                         INFO finalize : 
-alwaysPass                                         INFO   - total  events: 4
-alwaysPass                                         INFO   - passed events: 4
-alwaysFail                                         INFO finalize : 
-alwaysFail                                         INFO   - total  events: 4
-alwaysFail                                         INFO   - passed events: 0
-F_Step0EM                                          INFO Finalizing F_Step0EM...
-IncidentProcAlg2                                   INFO Finalize
-AvalancheSchedulerSvc                              INFO Joining Scheduler thread
-AvalancheSchedulerSvc                   3   0      INFO Terminating thread-pool resources
-TimelineSvc                                        INFO Outputting timeline with 42 entries to file  'TimelineFile':timeline.csv
-EventDataSvc                                       INFO Finalizing EventDataSvc - package version StoreGate-00-00-00
-AthDictLoaderSvc                                   INFO in finalize...
-ToolSvc                                            INFO Removing all tools created by ToolSvc
-L1Decoder.CTPUnpackingEmulationTool               DEBUG Calling destructor
-L1Decoder.EMRoIsUnpackingTool                     DEBUG Calling destructor
-*****Chrono*****                                   INFO ****************************************************************************************************
-*****Chrono*****                                   INFO  The Final CPU consumption ( Chrono ) Table (ordered)
-*****Chrono*****                                   INFO ****************************************************************************************************
-ChronoStatSvc                                      INFO Time User   : Tot= 1.26  [s]                                             #=  1
-*****Chrono*****                                   INFO ****************************************************************************************************
-ChronoStatSvc.finalize()                           INFO  Service finalized successfully 
-ApplicationMgr                                     INFO Application Manager Finalized successfully
-ApplicationMgr                                     INFO Application Manager Terminated successfully
-Py:Athena            INFO leaving with code 0: "successful run"
diff --git a/Trigger/TrigSteer/ViewAlgsTest/src/EventViewCreatorAlgorithm.cxx b/Trigger/TrigSteer/ViewAlgsTest/src/EventViewCreatorAlgorithm.cxx
deleted file mode 100644
index 1b49500cd6046b8d30c7f06d0489dfef19e22426..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/ViewAlgsTest/src/EventViewCreatorAlgorithm.cxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-  General-purpose view creation algorithm <bwynne@cern.ch>
-
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#include "./EventViewCreatorAlgorithm.h"
-
-#include "StoreGate/ReadHandle.h"
-#include "StoreGate/WriteHandle.h"
-#include "CxxUtils/make_unique.h"
-#include "AthContainers/ConstDataVector.h"
-#include "AthViews/ViewHelper.h"
-
-
-EventViewCreatorAlgorithm::EventViewCreatorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
-  : AthAlgorithm( name, pSvcLocator ),
-    m_viewsKey( "EventViews" ),
-    m_inputKey( "InputCollection" ),
-    m_inputAuxKey( "InputCollectionAux" ),
-    m_outputKey( "OutputCollection" ),
-    m_outputAuxKey( "OutputCollectionAux" ),
-    m_viewAlgorithmPool( "ViewAlgPool" )
-{
-  //VarHandleKeys
-  declareProperty( "OutputViewCollection", m_viewsKey, "Name of output event view collection" );
-  declareProperty( "WithinViewCollection", m_outputKey, "Name of the collection to make inside views" );
-  declareProperty( "WithinViewAuxCollection", m_outputAuxKey, "Name of the aux collection to make inside views" );
-  declareProperty( "InputCollection", m_inputKey, "Name of the collection to split into views" );
-  declareProperty( "InputAuxCollection", m_inputAuxKey, "Name of the aux collection to split into views" );
-
-  //Other properties
-  declareProperty( "ViewAlgorithmNames", m_viewAlgorithmNames, "Names of algorithms to run in the views" );
-  declareProperty( "ViewAlgorithmPool", m_viewAlgorithmPool, "Name of algorithm pool for views" );
-}
-
-StatusCode EventViewCreatorAlgorithm::initialize()
-{
-  //Initialize VarHandleKeys
-  CHECK( m_viewsKey.initialize() );
-  CHECK( m_outputKey.initialize() );
-  CHECK( m_outputAuxKey.initialize() );
-  CHECK( m_inputKey.initialize() );
-  CHECK( m_inputAuxKey.initialize() );
-
-  return StatusCode::SUCCESS;
-}
-
-StatusCode EventViewCreatorAlgorithm::execute()
-{
-#ifdef GAUDI_SYSEXECUTE_WITHCONTEXT
-  const EventContext& ctx = getContext();
-#else
-  const EventContext& ctx = *getContext();
-#endif
-
-  //Load input data
-  SG::ReadHandle< xAOD::TrigCompositeContainer > inputHandle( m_inputKey, ctx );
-  SG::ReadHandle< xAOD::TrigCompositeAuxContainer > inputAuxHandle( m_inputAuxKey, ctx );
-  if ( !inputHandle.isValid() || !inputAuxHandle.isValid() )
-  {
-    ATH_MSG_ERROR( "Unable to load input data for view creation" );
-    return StatusCode::FAILURE;
-  }
-  //CHECK( inputHandle->setStore( inputAuxHandle.ptr() ) );
-  
-  //Split into views
-  std::vector< SG::View* > viewVector;
-  std::vector< xAOD::TrigCompositeContainer > viewCollections;
-  std::vector< xAOD::TrigCompositeAuxContainer > viewAuxCollections;
-  for ( const auto input: *inputHandle.cptr() )
-  {
-    xAOD::TrigCompositeContainer oneInput;
-    xAOD::TrigCompositeAuxContainer oneAuxInput;
-    oneInput.setStore( oneAuxInput );
-    oneInput.clear( SG::VIEW_ELEMENTS );
-    oneInput.push_back( input );
-    viewCollections.push_back( oneInput );
-    viewAuxCollections.push_back( oneAuxInput );
-  }
-
-  //Make the views
-  SG::WriteHandle< xAOD::TrigCompositeContainer > viewHandle( m_outputKey, ctx );
-  CHECK( ViewHelper::MakeAndPopulate( name() + "_view",		// Base name for all views to use
-                                      viewVector,		// Vector to store views
-                                      viewHandle,		// A writehandle to use to access the views (the handle itself, not the contents)
-                                      viewCollections ) );	// Data to initialise each view - one view will be made per entry
-
-  //Add the aux collections
-  SG::WriteHandle< xAOD::TrigCompositeAuxContainer > viewAuxHandle( m_outputAuxKey, ctx );
-  CHECK( ViewHelper::Populate( viewVector,		// Vector containing views
-                               viewAuxHandle,		// A writehandle to use to access the views (the handle itself, not the contents)
-                               viewAuxCollections ) );	// Data to add to each view - vector must be same length as view vector
-
-  // Run the views
-  CHECK( ViewHelper::RunViews( viewVector,				// Vector containing views
-                               m_viewAlgorithmNames,			// Algorithms to run in each view
-                               ctx,					// Context to attach the views to
-                               serviceLocator()->service( m_viewAlgorithmPool ) ) );	// Service to retrieve algorithms by name
-
-  // Store the views for re-use/book-keeping
-  SG::WriteHandle< std::vector< SG::View* > > viewsHandle( m_viewsKey, ctx );
-  viewsHandle = CxxUtils::make_unique< std::vector< SG::View* > >( viewVector );
-
-  return StatusCode::SUCCESS;
-}
-
diff --git a/Trigger/TrigSteer/ViewAlgsTest/src/EventViewCreatorAlgorithm.h b/Trigger/TrigSteer/ViewAlgsTest/src/EventViewCreatorAlgorithm.h
deleted file mode 100644
index 87720929ddf6b0cc68c2ba046b4415278c221755..0000000000000000000000000000000000000000
--- a/Trigger/TrigSteer/ViewAlgsTest/src/EventViewCreatorAlgorithm.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-  General-purpose view creation algorithm <bwynne@cern.ch>
-
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef ViewAlgs_EventViewCreatorAlgorithm_h
-#define ViewAlgs_EventViewCreatorAlgorithm_h
-
-#include <vector>
-#include <string>
-
-#include "AthenaBaseComps/AthAlgorithm.h"
-#include "StoreGate/ReadHandleKey.h"
-#include "StoreGate/WriteHandleKey.h"
-#include "xAODTrigger/TrigCompositeContainer.h"
-#include "xAODTrigger/TrigCompositeAuxContainer.h"
-#include "AthViews/View.h"
-
-class EventViewCreatorAlgorithm : public AthAlgorithm
-{
-  public:
-    EventViewCreatorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
-    StatusCode initialize();
-    StatusCode execute();
-
-  private:
-    //Output views for merging
-    SG::WriteHandleKey< std::vector< SG::View* > > m_viewsKey;
-
-    //Input trig composite collection to split into views
-    SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_inputKey;
-    SG::ReadHandleKey< xAOD::TrigCompositeAuxContainer > m_inputAuxKey;
-
-    //Output the split composite collection into views
-    SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_outputKey;
-    SG::WriteHandleKey< xAOD::TrigCompositeAuxContainer > m_outputAuxKey;
-
-    //Algorithms to run in views
-    std::vector< std::string > m_viewAlgorithmNames;
-
-    //Name of view algorithm pool
-    std::string m_viewAlgorithmPool;
-};
-
-#endif
-
diff --git a/Trigger/TrigSteer/ViewAlgsTest/src/TestViewDriver.cxx b/Trigger/TrigSteer/ViewAlgsTest/src/TestViewDriver.cxx
index 7fd202f6108c83fd8c663bdc701681e8a4de459d..b332d8388ea5d96b9f0b81d180410c935201a23f 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/src/TestViewDriver.cxx
+++ b/Trigger/TrigSteer/ViewAlgsTest/src/TestViewDriver.cxx
@@ -53,11 +53,13 @@ StatusCode TestViewDriver::execute( ) {
   auto contexts = std::vector<EventContext>( );
   auto viewVector = std::make_unique<std::vector<SG::View*>>( );
   unsigned int viewCounter = 0;
+  unsigned int conditionsRun = getContext().getExtension<Atlas::ExtendedEventContext>()->conditionsRun();
   for ( const auto roi: *roisContainer.cptr( ) ) {
 
     contexts.push_back( getContext( ) );    
     viewVector->push_back( ViewHelper::makeView( name( )+"_view", viewCounter++ ) );
-    contexts.back( ).setExtension( Atlas::ExtendedEventContext( viewVector->back( ) ));
+    contexts.back( ).setExtension( Atlas::ExtendedEventContext( viewVector->back( ),
+                                                                conditionsRun));
 
     
     auto oneRoIColl = std::make_unique< ConstDataVector<TrigRoiDescriptorCollection> >( );    
diff --git a/Trigger/TrigSteer/ViewAlgsTest/src/components/ViewAlgsTest_entries.cxx b/Trigger/TrigSteer/ViewAlgsTest/src/components/ViewAlgsTest_entries.cxx
index 1678c2c866f60bac9454ad24fdb31dde699cf1cb..c19a112fb8157b0171d2efd994a99331ac8fe877 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/src/components/ViewAlgsTest_entries.cxx
+++ b/Trigger/TrigSteer/ViewAlgsTest/src/components/ViewAlgsTest_entries.cxx
@@ -9,7 +9,6 @@
 #include "../MergeRoIsAlg.h"
 #include "../TestViewDriver.h"
 #include "../TestViewMerger.h"
-#include "../EventViewCreatorAlgorithm.h"
 #include "../SchedulerProxyAlg.h"
 #include "../TestCombiner.h"
 
@@ -21,7 +20,6 @@ DECLARE_ALGORITHM_FACTORY( TestSplitAlg )
 DECLARE_ALGORITHM_FACTORY( MergeRoIsAlg )
 DECLARE_ALGORITHM_FACTORY( TestViewDriver )
 DECLARE_ALGORITHM_FACTORY( TestViewMerger )
-DECLARE_ALGORITHM_FACTORY( EventViewCreatorAlgorithm )
 DECLARE_ALGORITHM_FACTORY( SchedulerProxyAlg )
 DECLARE_ALGORITHM_FACTORY( TestCombiner )
 
@@ -34,7 +32,6 @@ DECLARE_FACTORY_ENTRIES( ViewAlgsTest )
   DECLARE_ALGORITHM( MergeRoIsAlg )
   DECLARE_ALGORITHM( TestViewDriver )
   DECLARE_ALGORITHM( TestViewMerger )
-  DECLARE_ALGORITHM( EventViewCreatorAlgorithm )
   DECLARE_ALGORITHM( SchedulerProxyAlg )
   DECLARE_ALGORITHM( TestCombiner )
 }
diff --git a/Trigger/TrigT1/L1Common/cmt/fragments/l1common_files_header b/Trigger/TrigT1/L1Common/cmt/fragments/l1common_files_header
deleted file mode 100644
index 8f1e016c350afcba6f0bae2f8b832e72af04d3bd..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Common/cmt/fragments/l1common_files_header
+++ /dev/null
@@ -1,11 +0,0 @@
-
-${CONSTITUENT} : ${FILEPATH}${FILENAME}
-	python ${LOC}/XMLtoHeader.py -i ${FILEPATH}${FILENAME} -o ${CONSTITUENT}
-	/bin/mv ${CONSTITUENT}*.h ${INC}/
-	/bin/mv ${CONSTITUENT}*.py ${PY}/
-	#/bin/mv ${CONSTITUENT}*.java ${JAV}/
-
-${CONSTITUENT}clean ::
-	/bin/rm -f ${INC}/${CONSTITUENT}*.h
-	#/bin/rm -f ${JAV}/${CONSTITUENT}*.java
-	/bin/rm -f ${PY}/${CONSTITUENT}*.py
diff --git a/Trigger/TrigT1/L1Common/cmt/requirements b/Trigger/TrigT1/L1Common/cmt/requirements
deleted file mode 100644
index 9a86f1260d26a70147616e84dbc06517d41c35ad..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Common/cmt/requirements
+++ /dev/null
@@ -1,17 +0,0 @@
-package L1Common
-
-author ruth.poettgen@cern.ch
-
-use  DetCommonPolicy  *
-
-make_fragment l1common_files -header=l1common_files_header
-
-document l1common_files L1Common FILEPATH=../schema/ FILENAME=L1Specifications.xml INC=../L1Common PY=../python LOC=../scripts
-
-apply_pattern detcommon_ignores
-
-apply_pattern detcommon_header_installer
-
-apply_pattern detcommon_link_files kind=python_modules name=python_mods files="-s=../python *.py" prefix=python/L1Common
-
-macro_prepend install_python_modspython_modules_dependencies " L1Common "
diff --git a/Trigger/TrigT1/L1CommonCore/cmt/Makefile b/Trigger/TrigT1/L1CommonCore/cmt/Makefile
deleted file mode 100644
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1CommonCore/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Trigger/TrigT1/L1CommonCore/cmt/requirements b/Trigger/TrigT1/L1CommonCore/cmt/requirements
deleted file mode 100644
index 67830a9ce28f1cfada358a8b82d4766f0d5bc3f4..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1CommonCore/cmt/requirements
+++ /dev/null
@@ -1,12 +0,0 @@
-package L1CommonCore
-
-author ruth.poettgen@cern.ch
-
-#use TDAQCPolicy *
-use DetCommonPolicy *
-use CTPfragment *
-
-apply_pattern detcommon_ignores
-apply_pattern detcommon_header_installer
-
-private
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx
index e2c8ec6230ba870b827f43fcce72371854370c6b..5bece99bc547dcff0fddfe0cf873c0fcc89b3707 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl1.cxx
@@ -116,7 +116,6 @@ TCS::DeltaEtaIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *>
 
 {
    if(input.size() == 1) {
-       std::vector<bool> iaccept(numberOutputBits());
        unsigned int nLeading = p_NumberLeading1;
        unsigned int nLeading2 = p_NumberLeading2;
        for( TOBArray::const_iterator tob1 = input[0]->begin();
@@ -141,16 +140,18 @@ TCS::DeltaEtaIncl1::processBitCorrect( const std::vector<TCS::TOBArray const *>
                          << " , eta=" << (*tob2)->eta() 
                          << ", DeltaEta = " << deltaEta << " -> ";
                    accept = deltaEta >= p_DeltaEtaMin[i] && deltaEta <= p_DeltaEtaMax[i];
+                   const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                   const bool fillReject = fillHistos() and not fillAccept;
+                   const bool alreadyFilled = decision.bit(i);
                    if( accept ) {
                        decision.setBit(i, true);
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
-                       if (!(iaccept[i])) {
-                           iaccept[i]=1;
-                           m_histAcceptDEta1[i]->Fill((float)deltaEta/10.);
-                       }
                    }
-                   else
-                       m_histRejectDEta1[i]->Fill((float)deltaEta/10.);
+                   if(fillAccept and not alreadyFilled) {
+                       m_histAcceptDEta1[i]->Fill((float)deltaEta*0.10);
+                   } else if(fillReject) {
+                       m_histRejectDEta1[i]->Fill((float)deltaEta*0.10);
+                   }
                    msgss << (accept?"pass":"fail") << "|";
                    TRG_MSG_DEBUG(msgss.str());
                    }
@@ -168,7 +169,6 @@ TCS::DeltaEtaIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                              Decision & decision )
 {
    if(input.size() == 1) {
-       std::vector<bool> iaccept (numberOutputBits());
        //LOG << "input size     : " << input[0]->size() << endl;
        unsigned int nLeading = p_NumberLeading1;
        unsigned int nLeading2 = p_NumberLeading2;
@@ -194,16 +194,18 @@ TCS::DeltaEtaIncl1::process( const std::vector<TCS::TOBArray const *> & input,
                          << " , eta=" << (*tob2)->eta()
                          << ", DeltaEta = " << deltaEta << " -> ";
                    accept = deltaEta >= p_DeltaEtaMin[i] && deltaEta <= p_DeltaEtaMax[i];
+                   const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                   const bool fillReject = fillHistos() and not fillAccept;
+                   const bool alreadyFilled = decision.bit(i);
                    if( accept ) {
                        decision.setBit(i, true);
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
-                       if (!(iaccept[i])) {
-                           iaccept[i]=1;
-                           m_histAcceptDEta1[i]->Fill((float)deltaEta/10.);
-                       }
                    }
-                   else
-                       m_histRejectDEta1[i]->Fill((float)deltaEta/10.);
+                   if(fillAccept and not alreadyFilled) {
+                       m_histAcceptDEta1[i]->Fill((float)deltaEta*0.10);
+                   } else if(fillReject) {
+                       m_histRejectDEta1[i]->Fill((float)deltaEta*0.10);
+                   }
                    msgss << (accept?"pass":"fail") << "|";
                    TRG_MSG_DEBUG(msgss.str());
                    }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx
index d81f96ca6d8e1589001f135554dcbab5058e0f9c..1167f0c680bfa6c450fce83f587572a2f2d36306 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/DeltaEtaIncl2.cxx
@@ -116,7 +116,6 @@ TCS::DeltaEtaIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *>
 
 {
     if( input.size() == 2) {
-        std::vector<bool> iaccept(numberOutputBits());
         for( TOBArray::const_iterator tob1 = input[0]->begin(); 
              tob1 != input[0]->end() && distance(input[0]->begin(), tob1) < p_NumberLeading1;
              ++tob1)
@@ -131,16 +130,18 @@ TCS::DeltaEtaIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *>
                         if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
                         if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
                         accept = deltaEta >= p_DeltaEtaMin[i] && deltaEta <= p_DeltaEtaMax[i];
+                        const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                        const bool fillReject = fillHistos() and not fillAccept;
+                        const bool alreadyFilled = decision.bit(i);
                         if( accept ) {
                             decision.setBit(i, true);
-                            output[i]->push_back(TCS::CompositeTOB(*tob1, *tob2));
-                            if (!(iaccept[i])) {
-                                iaccept[i]=1;
-                                m_histAcceptDEta2[i]->Fill(deltaEta);
-                            }
+                            output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+                        }
+                        if(fillAccept and not alreadyFilled) {
+                            m_histAcceptDEta2[i]->Fill((float)deltaEta*0.10);
+                        } else if(fillReject) {
+                            m_histRejectDEta2[i]->Fill((float)deltaEta*0.10);
                         }
-                        else 
-                            m_histRejectDEta2[i]->Fill(deltaEta);
                         TRG_MSG_DEBUG("DeltaEta = " << deltaEta << " -> accept bit  " << i << " -> "
                                       << (accept?"pass":"fail"));
                     }
@@ -158,7 +159,6 @@ TCS::DeltaEtaIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                              Decision & decision )
 {
     if( input.size() == 2) {
-        std::vector<bool> iaccept (numberOutputBits());
         for( TOBArray::const_iterator tob1 = input[0]->begin(); 
              tob1 != input[0]->end() && distance(input[0]->begin(), tob1) < p_NumberLeading1;
              ++tob1)
@@ -173,16 +173,18 @@ TCS::DeltaEtaIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                         if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
                         if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
                         accept = deltaEta >= p_DeltaEtaMin[i] && deltaEta <= p_DeltaEtaMax[i];
+                        const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                        const bool fillReject = fillHistos() and not fillAccept;
+                        const bool alreadyFilled = decision.bit(i);
                         if( accept ) {
                             decision.setBit(i, true);
-                            output[i]->push_back(TCS::CompositeTOB(*tob1, *tob2));
-                            if (!(iaccept[i])) {
-                                iaccept[i]=1;
-                                m_histAcceptDEta2[i]->Fill(deltaEta);
-                            }
+                            output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+                        }
+                        if(fillAccept and not alreadyFilled) {
+                            m_histAcceptDEta2[i]->Fill((float)deltaEta*0.10);
+                        } else if(fillReject) {
+                            m_histRejectDEta2[i]->Fill((float)deltaEta*0.10);
                         }
-                        else 
-                            m_histRejectDEta2[i]->Fill(deltaEta);
                         TRG_MSG_DEBUG("DeltaEta = " << deltaEta << " -> accept bit  " << i << " -> " 
                                       << (accept?"pass":"fail"));
                     } 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx
index cfd88719e92c99b9bc928abb086bb16aa0b2d9a3..dc34560b453d565e5dda145038fad0449942fd77 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive1.cxx
@@ -103,22 +103,16 @@ TCS::InvariantMassInclusive1::initialize() {
    }
    TRG_MSG_INFO("number output : " << numberOutputBits());
 
-   // create strings for histogram names
-   std::vector<std::ostringstream> MyAcceptHist(numberOutputBits());
-   std::vector<std::ostringstream> MyRejectHist(numberOutputBits());
-   
-   for (unsigned int i=0;i<numberOutputBits();i++) {
-     MyAcceptHist[i] << "Accept" << sqrt(p_InvMassMin[i]) << "INVM"; 
-     MyRejectHist[i] << "Reject" << sqrt(p_InvMassMin[i]) << "INVM";
-   }
-
    for (unsigned int i=0; i<numberOutputBits();i++) {
-
-     const std::string& MyTitle1 = MyAcceptHist[i].str();
-     const std::string& MyTitle2 = MyRejectHist[i].str();
-     
-     registerHist(m_histAcceptINV1[i] = new TH1F(MyTitle1.c_str(),MyTitle1.c_str(),100,0,1+sqrt(p_InvMassMax[i])));
-     registerHist(m_histRejectINV1[i] = new TH1F(MyTitle2.c_str(),MyTitle2.c_str(),100,0,2*sqrt(p_InvMassMin[i])));
+       const int buf_len = 512;
+       char hname_accept[buf_len], hname_reject[buf_len];
+       int mass_min = sqrt(p_InvMassMin[i]);
+       int mass_max = sqrt(p_InvMassMax[i]);
+       // mass histograms
+       snprintf(hname_accept, buf_len, "Accept_%s_%s_bit%d_%dM%d", name().c_str(), className().c_str(), i, mass_min, mass_max);
+       snprintf(hname_reject, buf_len, "Reject_%s_%s_bit%d_%dM%d", name().c_str(), className().c_str(), i, mass_min, mass_max);
+       registerHist(m_histAcceptINV1[i] = new TH1F(hname_accept, hname_accept, 100, 0.0, 2*mass_max));
+       registerHist(m_histRejectINV1[i] = new TH1F(hname_reject, hname_reject, 100, 0.0, 2*mass_max));
    }
 
  
@@ -130,13 +124,11 @@ TCS::InvariantMassInclusive1::initialize() {
 TCS::StatusCode
 TCS::InvariantMassInclusive1::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
 
    if(input.size() == 1) {     
      
-      std::vector<bool> iaccept (numberOutputBits());
-
       for( TOBArray::const_iterator tob1 = input[0]->begin(); 
            tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < p_NumberLeading1;
            ++tob1) 
@@ -159,17 +151,19 @@ TCS::InvariantMassInclusive1::processBitCorrect( const std::vector<TCS::TOBArray
                    if( parType_t((*tob1)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
                    if( parType_t((*tob2)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
                    if( (parType_t((*tob1)->Et()) <= max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= max(p_MinET1[i],p_MinET2[i]))) continue;
-                   accept = invmass2 >= p_InvMassMin[i] && invmass2 <= p_InvMassMax[i]; // 
+                   accept = invmass2 >= p_InvMassMin[i] && invmass2 <= p_InvMassMax[i]; //
+                   const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                   const bool fillReject = fillHistos() and not fillAccept;
+                   const bool alreadyFilled = decision.bit(i);
                    if( accept ) {
-                       decison.setBit(i, true);  
+                       decision.setBit(i, true);
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
-                       if (!(iaccept[i])) {
-                           iaccept[i]=1;
-                           m_histAcceptINV1[i]->Fill(sqrt((float)invmass2));
-                       }
                    }
-                   else
+                   if(fillAccept and not alreadyFilled) {
+                       m_histAcceptINV1[i]->Fill(sqrt((float)invmass2));
+                   } else if(fillReject) {
                        m_histRejectINV1[i]->Fill(sqrt((float)invmass2));
+                   }
                    TRG_MSG_INFO("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2);
                }
             }
@@ -187,13 +181,10 @@ TCS::InvariantMassInclusive1::processBitCorrect( const std::vector<TCS::TOBArray
 TCS::StatusCode
 TCS::InvariantMassInclusive1::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
 
    if(input.size() == 1) {     
-     
-      std::vector<bool> iaccept (numberOutputBits());
-
       for( TOBArray::const_iterator tob1 = input[0]->begin(); 
            tob1 != input[0]->end() && distance( input[0]->begin(), tob1) < p_NumberLeading1;
            ++tob1) 
@@ -220,16 +211,18 @@ TCS::InvariantMassInclusive1::process( const std::vector<TCS::TOBArray const *>
                   if( parType_t((*tob2)->Et()) <= min(p_MinET1[i],p_MinET2[i])) continue; // ET cut
                   if( (parType_t((*tob1)->Et()) <= max(p_MinET1[i],p_MinET2[i])) && (parType_t((*tob2)->Et()) <= max(p_MinET1[i],p_MinET2[i]))) continue;
                   accept = invmass2 >= p_InvMassMin[i] && invmass2 <= p_InvMassMax[i]; // 
+                  const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                  const bool fillReject = fillHistos() and not fillAccept;
+                  const bool alreadyFilled = decision.bit(i);
                   if( accept ) {
-                     decison.setBit(i, true);  
-                     output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
-                     if (!(iaccept[i])) {
-                         iaccept[i]=1;
-                         m_histAcceptINV1[i]->Fill(sqrt((float)invmass2));
-                     }
+                      decision.setBit(i, true);
+                      output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
                   }
-                  else
+                  if(fillAccept and not alreadyFilled) {
+                      m_histAcceptINV1[i]->Fill(sqrt((float)invmass2));
+                  } else if(fillReject) {
                       m_histRejectINV1[i]->Fill(sqrt((float)invmass2));
+                  }
                   TRG_MSG_INFO("Decision " << i << ": " << (accept?"pass":"fail") << " invmass2 = " << invmass2);
                }
             }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx
index e52c21ddbea25a479b20e552b71eb88551125fc5..4a1b94bc3fe9bb8844cb24a644d25e689671fdb3 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/InvariantMassInclusive2.cxx
@@ -135,7 +135,7 @@ TCS::InvariantMassInclusive2::initialize() {
 TCS::StatusCode
 TCS::InvariantMassInclusive2::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
 
    if( input.size() == 2) {
@@ -162,13 +162,17 @@ TCS::InvariantMassInclusive2::processBitCorrect( const std::vector<TCS::TOBArray
                       ((aeta1 < p_MinEta1 || aeta1 > p_MaxEta1 ) ||
                        (aeta2 < p_MinEta2 || aeta2 > p_MaxEta2 ) ))  continue;
                    accept = invmass2 >= p_InvMassMin[i] && invmass2 <= p_InvMassMax[i];
+                   const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                   const bool fillReject = fillHistos() and not fillAccept;
+                   const bool alreadyFilled = decision.bit(i);
                    if( accept ) {
-                       decison.setBit(i, true);
+                       decision.setBit(i, true);
                        output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+                   }
+                   if(fillAccept and not alreadyFilled) {
                        m_histAcceptM[i]->Fill(sqrt((float)invmass2));
                        m_histAcceptEta1Eta2[i]->Fill(eta1, eta2);
-
-                   } else {
+                   } else if(fillReject) {
                        m_histRejectM[i]->Fill(sqrt((float)invmass2));
                        m_histRejectEta1Eta2[i]->Fill(eta1, eta2);
                    }
@@ -188,7 +192,7 @@ TCS::InvariantMassInclusive2::processBitCorrect( const std::vector<TCS::TOBArray
 TCS::StatusCode
 TCS::InvariantMassInclusive2::process( const std::vector<TCS::TOBArray const *> & input,
                              const std::vector<TCS::TOBArray *> & output,
-                             Decision & decison )
+                             Decision & decision )
 {
 
 
@@ -207,21 +211,26 @@ TCS::InvariantMassInclusive2::process( const std::vector<TCS::TOBArray const *>
                 const unsigned int aeta1 = std::abs(eta1);
                 const unsigned int aeta2 = std::abs(eta2);
                for(unsigned int i=0; i<numberOutputBits(); ++i) {
-                  if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
-                  if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
+                   if( parType_t((*tob1)->Et()) <= p_MinET1[i]) continue; // ET cut
+                   if( parType_t((*tob2)->Et()) <= p_MinET2[i]) continue; // ET cut
                    if(p_ApplyEtaCut &&
                       ((aeta1 < p_MinEta1 || aeta1 > p_MaxEta1 ) ||
                        (aeta2 < p_MinEta2 || aeta2 > p_MaxEta2 ) )) continue;
-                  bool accept = invmass2 >= p_InvMassMin[i] && invmass2 <= p_InvMassMax[i];
-                  if( accept ) {
-                     decison.setBit(i, true);
-                     output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
-                     m_histAcceptM[i]->Fill(sqrt((float)invmass2));
-                     m_histAcceptEta1Eta2[i]->Fill(eta1, eta2);
-                  } else {
-                     m_histRejectM[i]->Fill(sqrt((float)invmass2));
-                     m_histRejectEta1Eta2[i]->Fill(eta1, eta2);
-                  }
+                   bool accept = invmass2 >= p_InvMassMin[i] && invmass2 <= p_InvMassMax[i];
+                   const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+                   const bool fillReject = fillHistos() and not fillAccept;
+                   const bool alreadyFilled = decision.bit(i);
+                   if( accept ) {
+                       decision.setBit(i, true);
+                       output[i]->push_back( TCS::CompositeTOB(*tob1, *tob2) );
+                   }
+                   if(fillAccept and not alreadyFilled) {
+                       m_histAcceptM[i]->Fill(sqrt((float)invmass2));
+                       m_histAcceptEta1Eta2[i]->Fill(eta1, eta2);
+                   } else if(fillReject) {
+                       m_histRejectM[i]->Fill(sqrt((float)invmass2));
+                       m_histRejectEta1Eta2[i]->Fill(eta1, eta2);
+                   }
                   TRG_MSG_DEBUG("Decision " << i << ": " << (accept ?"pass":"fail") << " invmass2 = " << invmass2);
                }
             }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx
index d5a7954c0d2609a3cf419ed95851308eabc98044..45bbe08dd16f6e2137d8589c652222f859c1a6d3 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/JetHT.cxx
@@ -130,16 +130,19 @@ TCS::JetHT::process( const std::vector<TCS::TOBArray const *> & input,
    for(unsigned int i=0; i<numberOutputBits(); ++i) {
 
       bool accept = sumET > p_HT[i];
-
+      const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+      const bool fillReject = fillHistos() and not fillAccept;
+      const bool alreadyFilled = decision.bit(i);
       decision.setBit( i, accept );
 
       if(accept) {
          output[i]->push_back( CompositeTOB( GenericTOB::createOnHeap( GenericTOB(sumET,0,0) ) ));
-	 m_histAcceptHT[i]->Fill(sumET);
       }
-      else
-	m_histRejectHT[i]->Fill(sumET);
-
+      if(fillAccept and not alreadyFilled) {
+          m_histAcceptHT[i]->Fill(sumET);
+      } else if(fillReject) {
+          m_histRejectHT[i]->Fill(sumET);
+      }
 
       TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " HT = " << sumET);
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx
index 6ef96ff0753f6b5a13b1b6f64349ebcea88bcbe2..d2960db1046d353f9ccf573cdb4a9c6f5e696cbb 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/MinDeltaPhiIncl2.cxx
@@ -92,7 +92,7 @@ TCS::MinDeltaPhiIncl2::initialize() {
 TCS::StatusCode
 TCS::MinDeltaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const *> & input,
                             const std::vector<TCS::TOBArray *> & output,
-                            Decision & decison )
+                            Decision & decision )
 {
 
    // mindphi 
@@ -140,13 +140,18 @@ TCS::MinDeltaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const
 
       for(unsigned int i=0; i<numberOutputBits(); ++i) {
           bool accept = mindphi > p_DeltaPhiMin[i] ;
+          const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+          const bool fillReject = fillHistos() and not fillAccept;
+          const bool alreadyFilled = decision.bit(i);
           if( accept ) {
-              decison.setBit(i, true);
+              decision.setBit(i, true);
               output[i]->push_back(TCS::CompositeTOB(*tobmin1, *tobmin2));
-              m_histAcceptMinDPhi2[i]->Fill((float)mindphi/10.);
-              TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " mindphi = " << mindphi << "phi1= " << (*tobmin1)->phiDouble()<< "phi2= " <<(*tobmin2)->phiDouble() );
-          } else
-              m_histRejectMinDPhi2[i]->Fill((float)mindphi/10.);
+          }
+          if(fillAccept and not alreadyFilled){
+              m_histAcceptMinDPhi2[i]->Fill((float)mindphi*0.10);
+          } else if(fillReject){
+              m_histRejectMinDPhi2[i]->Fill((float)mindphi*0.10);
+          }
           TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail"));
       } // for(i)
    } else {
@@ -159,7 +164,7 @@ TCS::MinDeltaPhiIncl2::processBitCorrect( const std::vector<TCS::TOBArray const
 TCS::StatusCode
 TCS::MinDeltaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input,
                             const std::vector<TCS::TOBArray *> & output,
-                            Decision & decison )
+                            Decision & decision )
 {
 
    // mindphi 
@@ -205,27 +210,24 @@ TCS::MinDeltaPhiIncl2::process( const std::vector<TCS::TOBArray const *> & input
             }
          }
 
-      bool accept[3];
       for(unsigned int i=0; i<numberOutputBits(); ++i) {
-         accept[i] = mindphi > p_DeltaPhiMin[i] ;
-         if( accept[i] ) {
-            decison.setBit(i, true);
-            output[i]->push_back(TCS::CompositeTOB(*tobmin1, *tobmin2));
-	    m_histAcceptMinDPhi2[i]->Fill((float)mindphi/10.);
-
-            TRG_MSG_DEBUG("Decision " << i << ": " << (accept[i]?"pass":"fail") << " mindphi = " << mindphi << "phi1= " << (*tobmin1)->phiDouble()<< "phi2= " <<(*tobmin2)->phiDouble() );
-         }
-	 else
-	   m_histRejectMinDPhi2[i]->Fill((float)mindphi/10.);
-
-         TRG_MSG_DEBUG("Decision " << i << ": " << (accept[i]?"pass":"fail"));
+          bool accept = mindphi > p_DeltaPhiMin[i] ;
+          const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+          const bool fillReject = fillHistos() and not fillAccept;
+          const bool alreadyFilled = decision.bit(i);
+          if( accept) {
+              decision.setBit(i, true);
+              output[i]->push_back(TCS::CompositeTOB(*tobmin1, *tobmin2));
+          }
+          if(fillAccept and not alreadyFilled){
+              m_histAcceptMinDPhi2[i]->Fill((float)mindphi*0.10);
+          } else if(fillReject) {
+              m_histRejectMinDPhi2[i]->Fill((float)mindphi*0.10);
+          }
+          TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail"));
       }
-
-
    } else {
-
       TCS_EXCEPTION("MinDeltaPhiIncl2 alg must have 2 inputs, but got " << input.size());
-
    }
 
    return TCS::StatusCode::SUCCESS;
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx
index f3f2f350cfd15ef0344cdfe2325c9e9356989db0..7c92941760a335a5b44582c3a5f58843920fd7f6 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/Root/SimpleCone.cxx
@@ -132,9 +132,9 @@ TCS::SimpleCone::process( const std::vector<TCS::TOBArray const *> & input,
 	 ++tob1) {
 	  
       if( tob1 == tob ) continue; // Avoid double counting of central jet 
-      if( parType_t(fabs((*tob1)->eta())) > p_EtaMax ) continue; // Eta cut                                                                                           
-      if( parType_t(fabs((*tob1)->eta())) < p_EtaMin ) continue; // Eta cut                                                                                              
-      if( parType_t((*tob1)->Et()) <= p_MinET ) continue; // E_T cut    
+      if( parType_t(fabs((*tob1)->eta())) > p_EtaMax ) continue; // Eta cut
+      if( parType_t(fabs((*tob1)->eta())) < p_EtaMin ) continue; // Eta cut
+      if( parType_t((*tob1)->Et()) <= p_MinET ) continue; // E_T cut
       
       double deta = ( (*tob)->etaDouble() - (*tob1)->etaDouble() );
       double dphi = fabs( (*tob)->phiDouble() - (*tob1)->phiDouble() );
@@ -152,15 +152,17 @@ TCS::SimpleCone::process( const std::vector<TCS::TOBArray const *> & input,
   for(unsigned int i=0; i<numberOutputBits(); ++i) {
 
     bool accept = leadingET > p_MinSumET[i];
-    
+    const bool fillAccept = fillHistos() and (fillHistosBasedOnHardware() ? getDecisionHardwareBit(i) : accept);
+    const bool fillReject = fillHistos() and not fillAccept;
     decision.setBit( i, accept );
     
     if(accept) {
       output[i]->push_back( CompositeTOB( GenericTOB::createOnHeap( GenericTOB(leadingET,0,0) ) ));
-      m_histAcceptSimpleCone[i]->Fill(leadingET);
     }
-    else
-      m_histRejectSimpleCone[i]->Fill(leadingET);
+    if(fillAccept)
+        m_histAcceptSimpleCone[i]->Fill(leadingET);
+    else if(fillReject)
+        m_histRejectSimpleCone[i]->Fill(leadingET);
     
     
     TRG_MSG_DEBUG("Decision " << i << ": " << (accept?"pass":"fail") << " SimpleCone = " << leadingET);
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/Makefile.RootCore b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/Makefile.RootCore
deleted file mode 100644
index 4ad9e0545883a92ab27811595d86ba44b582a30d..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,22 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = L1TopoAlgorithms
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = L1TopoInterfaces Asg_Boost
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/fragments/l1topo_pygen_header b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/fragments/l1topo_pygen_header
deleted file mode 100644
index fc3e8203797007a7c91dd0a93f57df20c29e9ad3..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/fragments/l1topo_pygen_header
+++ /dev/null
@@ -1,20 +0,0 @@
-# ========================= l1topo_pygen_header ======================
-
-${CONSTITUENT}PY       = $(bin)${CONSTITUENT}_Config.py
-${CONSTITUENT}stamp    = $(bin)${CONSTITUENT}.stamp
-${CONSTITUENT}exec     = TrigConfL1TopoGenPyAlg
-${CONSTITUENT}gendir   = ../pygen
-
-gendirs ::
-	@if test ! -d $(${CONSTITUENT}gendir) ; then $(mkdir) -p $(${CONSTITUENT}gendir) ; fi
-
-${CONSTITUENT} :: $(${CONSTITUENT}PY)
-	@/bin/echo ${CONSTITUENT} ok
-
-$(${CONSTITUENT}PY) :: gendirs
-	cd $(${CONSTITUENT}gendir); \
-	$(${CONSTITUENT}exec); \
-	cat /dev/null > $(${CONSTITUENT}stamp)
-
-
-# ========================= end l1topo_pygen_header ==================
diff --git a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/requirements
deleted file mode 100644
index 5788d481968769d1cf961beca1513551ce6b4d0b..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoAlgorithms/cmt/requirements
+++ /dev/null
@@ -1,35 +0,0 @@
-package L1TopoAlgorithms
-
-# General dependencies
-use  DetCommonPolicy    *
-
-# Trigger dependencies
-use L1TopoInterfaces    *      Trigger/TrigT1/L1Topo
-use L1TopoEvent         *      Trigger/TrigT1/L1Topo
-use L1TopoSimulationUtils         *      Trigger/TrigT1/L1Topo
-
-private
-use  ROOT                   *   LCG_Interfaces
-use  Boost                  *   LCG_Interfaces
-use  L1TopoSimulationUtils  *   Trigger/TrigT1/L1Topo
-
-
-macro_append ROOT_linkopts " -lHist "
-end_private
-
-
-# CMT package configuration
-apply_pattern detcommon_shared_generic_library files=../Root/*.cxx
-apply_pattern trigconf_application name=L1TopoGenPyAlg
-
-
-make_fragment l1topo_pygen_header
-make_fragment l1topo_pygen -header=l1topo_pygen_header
-
-document l1topo_pygen PyGen -s=../Root *.cxx
-macro_append PyGen_dependencies " TrigConfL1TopoGenPyAlg"
-
-apply_pattern detcommon_link_files kind=python_modules name=l1topoalg files="-s=../pygen *.py" prefix=python/L1TopoAlgorithms
-apply_pattern detcommon_link_files kind=python_modules files="-s=../python *.py" prefix=python/L1TopoAlgorithms
-
-macro_append install_l1topoalgpython_modules_dependencies " PyGen"
diff --git a/Trigger/TrigT1/L1Topo/L1TopoByteStream/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoByteStream/cmt/requirements
deleted file mode 100644
index 599d966f7da4e0adffc31664d4ff49a6980eaf8b..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoByteStream/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package L1TopoByteStream
-
-author Simon George <S.George@rhul.ac.uk>
-
-public
-use AtlasPolicy          AtlasPolicy-*
-use GaudiInterface       GaudiInterface-*       External
-
-
-
-private
-use AthenaKernel         AthenaKernel-*         Control
-use StoreGate            StoreGate-*            Control
-use DataCollection       DataCollection-*       External
-use ByteStreamCnvSvcBase ByteStreamCnvSvcBase-* Event
-use ByteStreamData       ByteStreamData-*       Event
-use AthenaBaseComps      AthenaBaseComps-*      Control
-use L1TopoRDO            L1TopoRDO-*            Trigger/TrigT1/L1Topo
-use SGTools              SGTools-*              Control
-use xAODTrigL1Calo       xAODTrigL1Calo-*       Event/xAOD
-end_private
-
-# Specify the required tdaq-common components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(tdaq-common COMPONENTS eformat_write)"
-
-library L1TopoByteStream *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Trigger/TrigT1/L1Topo/L1TopoByteStream/doc/packagedoc.h b/Trigger/TrigT1/L1Topo/L1TopoByteStream/doc/packagedoc.h
deleted file mode 100644
index 96f7dee17908aa6cebab481e0818d4378a0eb811..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoByteStream/doc/packagedoc.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-
- <i>This page has been automatically generated by the tool. Please remove this line when you start creating your own mainpage</i>
-
-@page L1TopoByteStream_page 
-
-
-
-*/
diff --git a/Trigger/TrigT1/L1Topo/L1TopoCommon/cmt/Makefile.RootCore b/Trigger/TrigT1/L1Topo/L1TopoCommon/cmt/Makefile.RootCore
deleted file mode 100644
index 44fec8637aecafe9e0d885ae9b6911d1900224d9..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoCommon/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,22 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = L1TopoCommon
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = Asg_Boost
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigT1/L1Topo/L1TopoCommon/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoCommon/cmt/requirements
deleted file mode 100644
index 00b579cffeadc82160c5697de723306cbbee1446..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoCommon/cmt/requirements
+++ /dev/null
@@ -1,10 +0,0 @@
-package L1TopoCommon
-
-# General dependencies
-use  DetCommonPolicy    *
-use  Boost              *      LCG_Interfaces
-
-# Trigger dependencies
-
-# CMT package configuration
-apply_pattern detcommon_shared_generic_library files=../Root/*.cxx
diff --git a/Trigger/TrigT1/L1Topo/L1TopoConfig/cmt/Makefile.RootCore b/Trigger/TrigT1/L1Topo/L1TopoConfig/cmt/Makefile.RootCore
deleted file mode 100644
index 64d4b4279fb9d583ae0201bf9e778ce333a14839..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoConfig/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,22 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = L1TopoConfig
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = Asg_Boost
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigT1/L1Topo/L1TopoConfig/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoConfig/cmt/requirements
deleted file mode 100644
index 64905f3ab74c1004fcd256650990ed3ae22de76a..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoConfig/cmt/requirements
+++ /dev/null
@@ -1,19 +0,0 @@
-package L1TopoConfig
-	
-# General dependencies
-
-use  DetCommonPolicy    *
-use  Boost              *   LCG_Interfaces
-use  L1TopoCommon       *   Trigger/TrigT1/L1Topo
-use  TrigConfBase       *   Trigger/TrigConfiguration
-
-private
-# Trigger dependencies
-end_private
-
-# CMT package configuration
-apply_pattern detcommon_shared_generic_library files="../Root/*.cxx ../src/*.cxx"
-apply_pattern trigconf_application name=TopoReader
-
-# xml files
-apply_pattern detcommon_link_files kind=xml files="-s=../data *.xml" prefix=XML/L1TopoConfig
diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/GlobalDecision.h b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/GlobalDecision.h
index cf5fba8a6c97df6765eeeb2048333280182f68f3..ccf6cf34923ef35dc1356c6fb7e85efd2157acf8 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/GlobalDecision.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/GlobalDecision.h
@@ -52,7 +52,6 @@ namespace TCS {
       StatusCode collectDecision(const std::set<DecisionConnector*> & outconn);
 
       StatusCode resetDecision();
-      
       void print() const;
 
    private:
@@ -62,7 +61,6 @@ namespace TCS {
       uint64_t m_decision[3] {0,0,0};
       // 64 bit overflow bit field
       uint64_t m_overflow[3] {0,0,0};
-
       // flags if the decision field is up to date
       // set by @collectDecision(), unset by @resetDecision()
       bool m_valid {false};
diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/StandaloneL1TopoHistSvc.h b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/StandaloneL1TopoHistSvc.h
index 22e3e1c55b9c4f0252fcf9e48bf445c1f5194e4a..7c0d94853d8dd6ef99efb1195340c0b43f4e6e59 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/StandaloneL1TopoHistSvc.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/StandaloneL1TopoHistSvc.h
@@ -15,9 +15,9 @@ public:
 
    virtual TH1 * findHist(const std::string & histName) override;
 
-   virtual void setBaseDir(const std::string & baseDir);
+   virtual void setBaseDir(const std::string & baseDir) override;
 
-   virtual void save();
+   virtual void save() override;
 
 private:
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteering.h b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteering.h
index bfb9d7865099bcc233e0bd4bf1c06bde080eb45f..abd78702286745abaa83704ef64f256c850f7ce0 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteering.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/L1TopoCoreSim/TopoSteering.h
@@ -6,6 +6,7 @@
 #ifndef __L1TopoCoreSimulation__TopoSteering__
 #define __L1TopoCoreSimulation__TopoSteering__
 
+#include <bitset>
 #include <iostream>
 #include <memory>
 #include <vector>
@@ -90,6 +91,33 @@ namespace TCS {
 
       StatusCode saveHist();
 
+      static const unsigned int numberOfL1TopoBits = 128;
+      /**
+         @brief cache the decision/overflow bits from hardware
+         These bits are propagated to the algorithms with propagateHardwareBitsToAlgos.
+       */
+      void setHardwareBits(const std::bitset<numberOfL1TopoBits> &triggerBits,
+                           const std::bitset<numberOfL1TopoBits> &ovrflowBits);
+      /**
+         @brief propagate the bits from hardware to each simulated decision algo.
+         They will then be used to fill the accept/reject monitoring histograms.
+       */
+      void propagateHardwareBitsToAlgos();
+      /**
+         @brief tell output algos to fill accept/reject histos based on hdw decision.
+
+         In this case you will need to call setHardwareBits +
+         propagateHardwareBitsToAlgos at each event.
+       */
+      void setOutputAlgosFillBasedOnHardware(const bool &value);
+      /**
+         @brief skip filling the histos
+
+         When filling the histograms based on the hdw decision we want
+         to skip filling them if we didn't fetch the hdw bits from the
+         ROS. The flag is then toggled on/off depending on the prescaler.
+       */
+      void setOutputAlgosSkipHistograms(const bool &value);
    private:
 
       // execution
@@ -115,7 +143,7 @@ namespace TCS {
       TopoInputEvent         m_inputEvent;       // the input event
 
       TopoCoreSimResult      m_simulationResult; // the result of the execution
-
+      
       TopoSteeringStructure  m_structure;
 
       unsigned int m_evtCounter = {1};
@@ -124,8 +152,10 @@ namespace TCS {
 
       std::shared_ptr<IL1TopoHistSvc>  m_histSvc;
 
+      std::bitset<numberOfL1TopoBits> m_triggerHdwBits;
+      std::bitset<numberOfL1TopoBits> m_ovrflowHdwBits;
    };
-   
+
    
 } // end of namespace TCS
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/GlobalDecision.cxx b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/GlobalDecision.cxx
index fb43b76ce340a80e41838c37c49331f11bb15328..e3162457e6bb53c2387fdc1cfc63ab08787c58e5 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/GlobalDecision.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/GlobalDecision.cxx
@@ -8,6 +8,7 @@
 #include "L1TopoCoreSim/GlobalDecision.h"
 #include "L1TopoCoreSim/DecisionConnector.h"
 #include "L1TopoCommon/Exception.h"
+#include "L1TopoInterfaces/DecisionAlg.h"
 
 using namespace std;
 using namespace TCS;
@@ -112,8 +113,7 @@ operator<<(std::ostream& o, const TCS::GlobalDecision & dec) {
    
    return o;
 }
-
-
+//----------------------------------------------------------
 void
 GlobalDecision::print() const {
 
@@ -133,6 +133,4 @@ GlobalDecision::print() const {
    }
    
 }
-
-
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteering.cxx b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteering.cxx
index 374b38bc2e0732181527e38a2888d894d0726e86..58f6de62f075e45f08dd0a4c2fa276ba92612728 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteering.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/Root/TopoSteering.cxx
@@ -140,7 +140,7 @@ TopoSteering::executeEvent() {
 
    TRG_MSG_INFO("LateMuonTOB::heap().size = "<<LateMuonTOB::heap().size());
    inputEvent().print();
-         
+
    // execute all connectors
    StatusCode sc = StatusCode::SUCCESS;
    TRG_MSG_INFO("Going to execute " << m_structure.outputConnectors().size() << " connectors");
@@ -321,7 +321,9 @@ TopoSteering::executeSortingAlgorithm(TCS::SortingAlg *alg,
                                       TCS::InputConnector* inputConnector,
                                       TCS::TOBArray * & sortedOutput) {
                                            
-   TRG_MSG_DEBUG("  ... executing sorting alg '" << alg->fullname() << "'");
+    //TRG_MSG_DEBUG
+    TRG_MSG_ALWAYS("  ... executing sorting alg '" << alg->fullname() << "'"
+                   <<(m_useBitwise?" (bitwise)":""));
 
    const InputTOBArray * input = inputConnector->outputData();
 
@@ -339,7 +341,9 @@ TopoSteering::executeDecisionAlgorithm(TCS::DecisionAlg *alg,
                                        const std::vector<TCS::TOBArray *> & output,
                                        TCS::Decision & decision) {
 
-   TRG_MSG_INFO("  ... executing decision alg '" << alg->fullname() << "'");
+   // TRG_MSG_INFO("  ... executing decision alg '" << alg->fullname() << "'");
+   TRG_MSG_ALWAYS("  ... executing decision alg '" << alg->fullname() << "'"
+                  <<(m_useBitwise?" (bitwise)":""));
 
    if(inputConnectors.size()<1) {
       TCS_EXCEPTION("L1Topo Steering: Decision algorithm expects at least 1 input array but got 0");
@@ -417,3 +421,59 @@ TopoSteering::setAlgMsgLevel( TrigConf::MSGTC::Level lvl ) {
       alg->msg().setLevel(lvl);
    }
 }
+//----------------------------------------------------------
+void TopoSteering::setHardwareBits(const std::bitset<numberOfL1TopoBits> &triggerBits,
+                                   const std::bitset<numberOfL1TopoBits> &ovrflowBits)
+{
+    m_triggerHdwBits = triggerBits;
+    m_ovrflowHdwBits = ovrflowBits;
+}
+//----------------------------------------------------------
+void TopoSteering::propagateHardwareBitsToAlgos()
+{
+   for(auto connector : m_structure.outputConnectors()) {
+       const string &connectorName = connector.first;
+       TCS::DecisionConnector *outCon = connector.second;
+        outCon->decisionAlgorithm()->resetHardwareBits();
+        unsigned int pos = 0; // for multi-output algorithms pos is the output index
+        for(const TXC::TriggerLine &trigger : outCon->triggers()){
+            unsigned int bitNumber = trigger.counter();
+            outCon->decisionAlgorithm()->setHardwareBits(pos,
+                                                         m_triggerHdwBits[bitNumber],
+                                                         m_ovrflowHdwBits[bitNumber]);
+            pos++;
+            TRG_MSG_DEBUG("propagating hardware bit (dec/ovr) "<<bitNumber
+                          <<" to algo "<<connectorName<<"["<<pos<<"]"
+                          <<" "<<m_triggerHdwBits[bitNumber]<<" /"
+                          <<" "<<m_ovrflowHdwBits[bitNumber]);
+
+        }
+   }
+}
+//----------------------------------------------------------
+void TopoSteering::setOutputAlgosFillBasedOnHardware(const bool &value)
+{
+   for(auto connector : m_structure.outputConnectors()) {
+       const string &connectorName = connector.first;
+       TCS::DecisionConnector *outCon = connector.second;
+       if(outCon) {
+           outCon->decisionAlgorithm()->setFillHistosBasedOnHardware(value);
+       } else {
+           TRG_MSG_DEBUG("skipping invalid DecisionConnector '"<<connectorName<<"'");
+       }
+   }
+}
+//----------------------------------------------------------
+void TopoSteering::setOutputAlgosSkipHistograms(const bool &value)
+{
+   for(auto connector : m_structure.outputConnectors()) {
+       const string &connectorName = connector.first;
+       TCS::DecisionConnector *outCon = connector.second;
+       if(outCon) {
+           outCon->decisionAlgorithm()->setSkipHistos(value);
+       } else {
+           TRG_MSG_DEBUG("skipping invalid DecisionConnector '"<<connectorName<<"'");
+       }
+   }
+}
+//----------------------------------------------------------
diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/cmt/Makefile.RootCore b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/cmt/Makefile.RootCore
deleted file mode 100644
index c77c5cb51b9fbc1a25b8ceb977ebe4271c726299..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,22 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = L1TopoCoreSim
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = L1TopoConfig L1TopoEvent L1TopoAlgorithms Asg_Boost
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoCoreSim/cmt/requirements
deleted file mode 100644
index ab1b293e3bd0a58648e75b6b2fbfbc7541a03c46..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoCoreSim/cmt/requirements
+++ /dev/null
@@ -1,30 +0,0 @@
-package L1TopoCoreSim
-
-public
-
-# General dependencies
-use  DetCommonPolicy            DetCommonPolicy-*               
-
-# Trigger dependencies
-use  L1TopoConfig               L1TopoConfig-*                  Trigger/TrigT1/L1Topo
-use  L1TopoCommon               L1TopoCommon-*                  Trigger/TrigT1/L1Topo
-use  L1TopoEvent                L1TopoEvent-*                   Trigger/TrigT1/L1Topo
-use  L1TopoInterfaces           L1TopoInterfaces-*              Trigger/TrigT1/L1Topo
-
-private
-use  TrigConfBase               TrigConfBase-*                  Trigger/TrigConfiguration
-use  L1TopoAlgorithms           L1TopoAlgorithms-*              Trigger/TrigT1/L1Topo
-use  L1TopoHardware             L1TopoHardware-*                Trigger/TrigT1/L1Topo
-use  Boost                      *                               LCG_Interfaces
-use  ROOT                       *                               LCG_Interfaces
-end_private
-
-
-# CMT package configuration
-apply_pattern detcommon_shared_generic_library files=../Root/*.cxx
-apply_pattern trigconf_application name=TopoStandAlone
-apply_pattern trigconf_application name=TopoTestSteeringConfig
-
-macro_append TrigConfTopoTestSteeringConfiglinkopts ' -lL1TopoAlgorithms'
-
-macro_append ROOT_linkopts ' -lHist'
diff --git a/Trigger/TrigT1/L1Topo/L1TopoEvent/L1TopoEvent/BaseTOB.h b/Trigger/TrigT1/L1Topo/L1TopoEvent/L1TopoEvent/BaseTOB.h
index 99186d6f06f40f7fa043e548654e964423205160..1b584c5a5d146f85009def77b1780db0482df74d 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoEvent/L1TopoEvent/BaseTOB.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoEvent/L1TopoEvent/BaseTOB.h
@@ -14,6 +14,7 @@ namespace TCS {
    class BaseTOB {
    public:
       BaseTOB(int roiWord);
+      virtual ~BaseTOB() {}
 
       virtual void print(std::ostream&) const = 0;
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoEvent/cmt/Makefile.RootCore b/Trigger/TrigT1/L1Topo/L1TopoEvent/cmt/Makefile.RootCore
deleted file mode 100644
index f6a090485459e7cc7b7c943aa913114005d52d84..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoEvent/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,22 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = L1TopoEvent
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = L1TopoCommon Asg_Boost
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigT1/L1Topo/L1TopoEvent/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoEvent/cmt/requirements
deleted file mode 100644
index 7577797f703a3fa7e95ead2e10f951d12e63d529..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoEvent/cmt/requirements
+++ /dev/null
@@ -1,13 +0,0 @@
-package L1TopoEvent
-
-# General dependencies
-use  DetCommonPolicy    *
-use  Boost              *      LCG_Interfaces
-
-# Trigger dependencies
-use L1TopoCommon        *      Trigger/TrigT1/L1Topo
-use TrigConfBase        *      Trigger/TrigConfiguration
-
-
-# CMT package configuration
-apply_pattern detcommon_shared_generic_library files=../Root/*.cxx
diff --git a/Trigger/TrigT1/L1Topo/L1TopoHardware/cmt/fragments/l1topohw_pygen_header b/Trigger/TrigT1/L1Topo/L1TopoHardware/cmt/fragments/l1topohw_pygen_header
deleted file mode 100644
index f4a64222e49aa0d96f4a47d4b6990c8f2339936d..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoHardware/cmt/fragments/l1topohw_pygen_header
+++ /dev/null
@@ -1,20 +0,0 @@
-# ========================= l1topo_pygen_header ======================
-
-${CONSTITUENT}PY       = $(bin)${CONSTITUENT}_Config.py
-${CONSTITUENT}stamp    = $(bin)${CONSTITUENT}.stamp
-${CONSTITUENT}exec     = TrigConfL1TopoGenPyHardware
-${CONSTITUENT}gendir   = ../pygen
-
-gendirs ::
-	@if test ! -d $(${CONSTITUENT}gendir) ; then $(mkdir) -p $(${CONSTITUENT}gendir) ; fi
-
-${CONSTITUENT} :: $(${CONSTITUENT}PY)
-	@/bin/echo ${CONSTITUENT} ok
-
-$(${CONSTITUENT}PY) :: gendirs
-	cd $(${CONSTITUENT}gendir); \
-	$(${CONSTITUENT}exec); \
-	cat /dev/null > $(${CONSTITUENT}stamp)
-
-
-# ========================= end l1topo_pygen_header ==================
diff --git a/Trigger/TrigT1/L1Topo/L1TopoHardware/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoHardware/cmt/requirements
deleted file mode 100644
index 100d943fc5437c68924b98411dad0e250190f412..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoHardware/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package L1TopoHardware
-
-public
-
-# General dependencies
-use  DetCommonPolicy            DetCommonPolicy-*               
-
-# Trigger dependencies
-
-private
-end_private
-
-# CMT package configuration
-apply_pattern detcommon_shared_generic_library files=../Root/*.cxx
-apply_pattern trigconf_application name=L1TopoGenPyHardware
-
-
-make_fragment l1topohw_pygen_header
-make_fragment l1topohw_pygen -header=l1topohw_pygen_header
-document l1topohw_pygen PyGenHW -s=../Root *.cxx
-macro_append PyGenHW_dependencies " TrigConfL1TopoGenPyHardware"
-apply_pattern detcommon_link_files kind=python_modules name=l1topohw files="-s=../pygen *.py" prefix=python/L1TopoHardware
-apply_pattern detcommon_link_files kind=python_modules files="-s=../python *.py" prefix=python/L1TopoHardware
-macro_append install_l1topohwpython_modules_dependencies " PyGenHW"
diff --git a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/DecisionAlg.h b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/DecisionAlg.h
index 36b6e9b0f15b518b1ec5c80787a8efb7245457e8..82af27af3d6b7e44cc76e5cc80da59755a1f54f7 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/DecisionAlg.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/L1TopoInterfaces/DecisionAlg.h
@@ -36,6 +36,36 @@ namespace TCS {
 
       unsigned int numberOutputBits() const { return m_numberOutputBits; }
       void setNumberOutputBits(unsigned int numberOutputBits) { m_numberOutputBits = numberOutputBits; }
+      /**
+         @brief propagate the hardware decision bits for each output bit of this algo
+
+         These bits are used only to fill the monitoring histograms.
+         They do not have any use in the L1TopoSimulation itself.         
+       */
+      DecisionAlg& setHardwareBits(const unsigned int &bitNumber,
+                                   const bool &valueDecision,
+                                   const bool &valueOverflow);
+      ///! reset all hardware bits for this algo
+      DecisionAlg& resetHardwareBits();
+      ///! get one hardware decision bit from this algo
+      bool getDecisionHardwareBit(const unsigned int &bitNumber) const;
+      ///! get one hardware overflow bit from this algo
+      bool getOverflowHardwareBit(const unsigned int &bitNumber) const;
+      ///! toggle m_fillHistosBasedOnHardware
+      DecisionAlg& setFillHistosBasedOnHardware(const bool &value);
+      ///! getter
+      bool fillHistosBasedOnHardware() const;
+      ///! toggle m_skipHistos (see TopoSteering::setOutputAlgosSkipHistograms)
+      DecisionAlg& setSkipHistos(const bool &value);
+      ///! getter
+      bool skipHistos() const;
+      /**
+         @brief whether the monitoring histograms should be filled
+
+         Either we are filling based on the simulated decision,
+         or based on the hdw decision with skipHistos==false.
+      */
+      bool fillHistos() const;
 
    private:
 
@@ -45,7 +75,14 @@ namespace TCS {
 
       // generic parameter
       unsigned int m_numberOutputBits {1};
-
+      ///! decision bits from hardware (assume the algo won't have >31 output bits)
+      uint32_t m_hardwareDecisionBits {0};
+      ///! overflow bits from hardware (assume the algo won't have >31 output bits)
+      uint32_t m_hardwareOverflowBits {0};
+      ///! fill accept/reject monitoring histos based on hdw decision
+      bool m_fillHistosBasedOnHardware {0};
+      ///! skip filling monitoring histos, used only when m_fillHistosBasedOnHardware==true
+      bool m_skipHistos {0};
    };
 
 }
diff --git a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/DecisionAlg.cxx b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/DecisionAlg.cxx
index ef5b8ed89e9eb1819509f78d6c7c1bac6c3d4aca..30c8837cb5d0c6175b5dd3249864a9d0442ce355 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/DecisionAlg.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/Root/DecisionAlg.cxx
@@ -20,3 +20,83 @@ TCS::DecisionAlg::processBitCorrect( const std::vector<TCS::TOBArray const *> &
    return process(input,output,decision);
 }
 
+TCS::DecisionAlg& TCS::DecisionAlg::setHardwareBits(const unsigned int &bitNumber,
+                                                    const bool &valueDecision,
+                                                    const bool &valueOverflow)
+{
+    if(bitNumber<m_numberOutputBits){
+        if(valueDecision)
+            m_hardwareDecisionBits |= (1 << bitNumber);
+        if(valueOverflow)
+            m_hardwareOverflowBits |= (1 << bitNumber);
+    } else if(bitNumber<32) {
+        TRG_MSG_WARNING("Cannot set hardware bits for bit number "<<bitNumber
+                        <<" > "<<m_numberOutputBits<<" N output bits "
+                        <<" for algo "<<name());
+    } else {
+        TRG_MSG_WARNING("Cannot set hardware bits for bit number "<<bitNumber
+                        <<" > 31 N output bits for algo "<<name());
+    }
+    return *this;
+}
+//----------------------------------------------------------
+TCS::DecisionAlg& TCS::DecisionAlg::resetHardwareBits()
+{
+    m_hardwareDecisionBits = 0;
+    m_hardwareOverflowBits = 0;
+    return *this;
+}
+//----------------------------------------------------------
+bool TCS::DecisionAlg::getDecisionHardwareBit(const unsigned int &bitNumber) const
+{
+    bool value = false;
+    if(bitNumber<m_numberOutputBits){
+        value = (m_hardwareDecisionBits >> bitNumber) & 1;
+    } else {
+        TRG_MSG_WARNING("Cannot get hardware decision bit "<<bitNumber
+                        <<" > "<<m_numberOutputBits<<" N output bits "
+                        <<" for algo "<<name());
+    }
+    return value;
+}
+//----------------------------------------------------------
+bool TCS::DecisionAlg::getOverflowHardwareBit(const unsigned int &bitNumber) const
+{
+    bool value = false;
+    if(bitNumber<m_numberOutputBits){
+        value = (m_hardwareOverflowBits >> bitNumber) & 1;
+    } else {
+        TRG_MSG_WARNING("Cannot get hardware overflow bit "<<bitNumber
+                        <<" > "<<m_numberOutputBits<<" N output bits "
+                        <<" for algo "<<name());
+    }
+    return value;
+}
+//----------------------------------------------------------
+TCS::DecisionAlg& TCS::DecisionAlg::setFillHistosBasedOnHardware(const bool &value)
+{
+    m_fillHistosBasedOnHardware = value;
+    return *this;
+}
+//----------------------------------------------------------
+bool TCS::DecisionAlg::fillHistosBasedOnHardware() const
+{
+    return m_fillHistosBasedOnHardware;
+}
+//----------------------------------------------------------
+TCS::DecisionAlg& TCS::DecisionAlg::setSkipHistos(const bool &value)
+{
+    m_skipHistos = value;
+    return *this;
+}
+//----------------------------------------------------------
+bool TCS::DecisionAlg::skipHistos() const
+{
+    return m_skipHistos;
+}
+//----------------------------------------------------------
+bool TCS::DecisionAlg::fillHistos() const
+{
+    return (not m_fillHistosBasedOnHardware or not m_skipHistos);
+}
+//----------------------------------------------------------
diff --git a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/cmt/Makefile.RootCore b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/cmt/Makefile.RootCore
deleted file mode 100644
index 75ccee8123b8fe0da814cd63799e5271a97d91f8..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,22 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = L1TopoInterfaces
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = L1TopoEvent Asg_Boost
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoInterfaces/cmt/requirements
deleted file mode 100644
index 98d5da04b1b93453976ced3bd38b64120ae4f778..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoInterfaces/cmt/requirements
+++ /dev/null
@@ -1,15 +0,0 @@
-package L1TopoInterfaces
-
-# General dependencies
-use  DetCommonPolicy    *
-use  Boost              *      LCG_Interfaces
-use  ROOT               *      LCG_Interfaces
-
-# Trigger dependencies
-use TrigConfBase        *      Trigger/TrigConfiguration
-use L1TopoCommon        *      Trigger/TrigT1/L1Topo
-use L1TopoEvent         *      Trigger/TrigT1/L1Topo
-
-
-# CMT package configuration
-apply_pattern detcommon_shared_generic_library files=../Root/*.cxx
diff --git a/Trigger/TrigT1/L1Topo/L1TopoMonitoring/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoMonitoring/cmt/requirements
deleted file mode 100755
index 5cdcc0049a7691b781aa3c52ee3159315f2e2e53..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoMonitoring/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package L1TopoMonitoring
-
-author Simon George
-
-public
-use AtlasPolicy                AtlasPolicy-*                   
-
-private
-use AthenaBaseComps            AthenaBaseComps-*       Control
-use GaudiInterface             GaudiInterface-*        External
-use TrigT1Result               TrigT1Result-*          Trigger/TrigT1
-use L1TopoRDO	     	       L1TopoRDO-*	       Trigger/TrigT1/L1Topo
-use L1TopoConfig               L1TopoConfig-*          Trigger/TrigT1/L1Topo
-use TrigConfInterfaces         TrigConfInterfaces-*    Trigger/TrigConfiguration
-end_private
-
-library L1TopoMonitoring *.cxx components/*.cxx
-apply_pattern component_library 
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigT1/L1Topo/L1TopoMonitoring/doc/packagedoc.h b/Trigger/TrigT1/L1Topo/L1TopoMonitoring/doc/packagedoc.h
deleted file mode 100644
index cbb4c3c20d9387b25f204e9f1b4f2e4a12e9f286..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoMonitoring/doc/packagedoc.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-
- <i>This page has been automatically generated by the tool. Please remove this line when you start creating your own mainpage</i>
-
-@page L1TopoMonitoring_page 
-
-
-
-*/
diff --git a/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/Helpers.h b/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/Helpers.h
index 36b43291bb8d77bb92de703f3e0c0a9ab68819f5..8531a07b8098cda7b71ea35bd6ffa45611312c7b 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/Helpers.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoRDO/L1TopoRDO/Helpers.h
@@ -37,7 +37,8 @@ namespace L1Topo {
   //! OUT OF DATE DO NOT USE Helper to calculate the index needed to pack trigger bits into the full 128-bit decision. See 4-bit part of L1Topo TOB definition in https://twiki.cern.ch/twiki/pub/Atlas/L1CaloUpgrade/ROD_data_format_v1.0.4.xlsx
   unsigned int triggerBitIndex(uint32_t moduleId, L1Topo::L1TopoTOB);
 
-  //! Helper to calculate the index needed to pack trigger bits into the full 128-bit decision. See 4-bit part of L1Topo TOB definition in https://twiki.cern.ch/twiki/pub/Atlas/L1CaloUpgrade/ROD_data_format_v1.0.4.xlsx
+  //! Helper to calculate the index needed to pack trigger bits into the full 128-bit decision. See 4-bit part of L1Topo TOB definition in https://twiki.cern.ch/twiki/pub/Atlas/L1CaloUpgrade/ROD_data_format_v1.0.4.xlsx ; same as TriggerLine::calcCounter()?
+
   unsigned int triggerBitIndexNew(uint32_t moduleId, L1Topo::L1TopoTOB, unsigned int bitIdx);
 
   //! Get the trigger decision and overflow bits from the L1Topo ROI data block 'L1Topo TOB' and order them correctly in a bitset. Reference needed for layout.
diff --git a/Trigger/TrigT1/L1Topo/L1TopoRDO/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoRDO/cmt/requirements
deleted file mode 100644
index db3b4fe3ab96f6cac28106e5048f53aba0605a7e..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoRDO/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package L1TopoRDO
-
-author Simon George <S.George@rhul.ac.uk>
-
-use  AtlasPolicy                AtlasPolicy-*                   
-use  CLIDSvc                    CLIDSvc-*                       Control
-use  DataModel                  DataModel-*                     Control
-use  SGTools                    SGTools-*                       Control
-use  TestTools                  TestTools-*                     AtlasTest
-
-private
-use  AtlasBoost                 AtlasBoost-*                    External
-end_private
-
-library L1TopoRDO *.cxx
-apply_pattern installed_library
-
-apply_pattern UnitTest_run unit_test=L1TopoRDO
diff --git a/Trigger/TrigT1/L1Topo/L1TopoRDO/doc/packagedoc.h b/Trigger/TrigT1/L1Topo/L1TopoRDO/doc/packagedoc.h
deleted file mode 100644
index db4b6513887a0dd640fc703e897e0c63b9dc819a..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoRDO/doc/packagedoc.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-
- <i>This page has been automatically generated by the tool. Please remove this line when you start creating your own mainpage</i>
-
-@page L1TopoRDO_page 
-
-
-
-*/
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoSimulation/cmt/requirements
deleted file mode 100644
index 6a69e2d065c7436dae837bc992c4ef7687466802..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package L1TopoSimulation
-
-author Joerg Stelzer
-
-public
-use  AtlasPolicy                AtlasPolicy-*
-private
-use  L1TopoInterfaces           L1TopoInterfaces-*              Trigger/TrigT1/L1Topo
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  AtlasROOT                  AtlasROOT-*                     External
-use  TrigConfL1Data             TrigConfL1Data-*                Trigger/TrigConfiguration
-use  TrigConfBase               TrigConfBase-*                  Trigger/TrigConfiguration
-use  AthenaMonitoring           AthenaMonitoring-*              Control
-use  TrigT1Result               TrigT1Result-*                  Trigger/TrigT1
-use  GaudiInterface             GaudiInterface-*                External
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-#use  TrigSteering               TrigSteering-*                  Trigger/TrigSteer
-use  TrigConfInterfaces         TrigConfInterfaces-*            Trigger/TrigConfiguration
-use  L1TopoConfig               L1TopoConfig-*                  Trigger/TrigT1/L1Topo
-use  L1TopoCoreSim              L1TopoCoreSim-*                 Trigger/TrigT1/L1Topo
-use  L1TopoEvent                L1TopoEvent-*                   Trigger/TrigT1/L1Topo
-use  TrigT1CaloEvent            TrigT1CaloEvent-*               Trigger/TrigT1
-use  TrigT1CaloUtils            TrigT1CaloUtils-*               Trigger/TrigT1
-use  TrigT1Interfaces           TrigT1Interfaces-*              Trigger/TrigT1
-use  EventInfo                  EventInfo-*                     Event
-end_private
-
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProvider.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProvider.cxx
index 0a64ad692df2546595158c71d1d6f438938a2c91..b0624ab1401a6243e6fb48f9ea15119da42d1f15 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProvider.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProvider.cxx
@@ -11,7 +11,7 @@
 #include "GaudiKernel/ITHistSvc.h"
 
 #include "TrigT1CaloEvent/EmTauROI_ClassDEF.h"
-#include "TrigT1CaloEvent/CPCMXTopoData.h"
+
 
 #include "TrigT1Interfaces/CPRoIDecoder.h"
 
@@ -45,6 +45,8 @@ EMTauInputProvider::initialize() {
    incidentSvc->addListener(this,"BeginRun", 100);
    incidentSvc.release().ignore();
 
+   CHECK(m_emTauLocation.initialize());
+
    return StatusCode::SUCCESS;
 }
 
@@ -90,11 +92,9 @@ EMTauInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
 
    // Retrieve EMTAU RoIs (they are built by EMTAUTrigger)
 
-   DataVector<CPCMXTopoData> * emtau = 0;
-   if( evtStore()->contains<DataVector<CPCMXTopoData>>(m_emTauLocation) ) {
-      CHECK( evtStore()->retrieve(emtau, m_emTauLocation) );
-   } else {
-      ATH_MSG_WARNING("No CPCMXTopoDataCollection with SG key '" << m_emTauLocation.toString() << "' found in the event. No EM or TAU input for the L1Topo simulation.");
+   SG::ReadHandle<DataVector < CPCMXTopoData> > emtau(m_emTauLocation);
+   if( !emtau.isValid() ) {
+      ATH_MSG_WARNING("No CPCMXTopoDataCollection with SG key '" << m_emTauLocation.key() << "' found in the event. No EM or TAU input for the L1Topo simulation.");
       return StatusCode::RECOVERABLE;
    }
 
@@ -136,11 +136,12 @@ EMTauInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
 
 void 
 EMTauInputProvider::CalculateCoordinates(int32_t roiWord, double & eta, double & phi) const {
-   static CPRoIDecoder get;
-   static double TwoPI = 2 * M_PI;
+   CPRoIDecoder get;
+   constexpr double TwoPI = 2 * M_PI;
    CoordinateRange coordRange = get.coordinate( roiWord );
    
    eta = coordRange.eta();
    phi = coordRange.phi();
    if( phi > M_PI ) phi -= TwoPI;
 }
+
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProvider.h b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProvider.h
index 66eca9c9ed66f7440d114fe0b3e7874b223b6906..30f40226a9e5a5980846a17e5982112c78bdc753 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProvider.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EMTauInputProvider.h
@@ -8,7 +8,7 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "L1TopoSimulation/IInputTOBConverter.h"
 #include "GaudiKernel/IIncidentListener.h"
-
+#include "TrigT1CaloEvent/CPCMXTopoData.h"
 class TH1I;
 class TH2I;
 
@@ -36,7 +36,7 @@ namespace LVL1 {
 
       ServiceHandle<ITHistSvc> m_histSvc;
 
-      StringProperty m_emTauLocation;    //!<  EMTAU ROI SG key
+      SG::ReadHandleKey<DataVector<LVL1::CPCMXTopoData>> m_emTauLocation;    //!<  EMTAU ROI SG key
 
       TH1I * m_hEMEt {nullptr};
       TH2I * m_hEMEtaPhi {nullptr};
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EnergyInputProvider.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EnergyInputProvider.cxx
index 84398f5b47a25a1de970a3f21945b2c8ed078f27..aa2f926aade62ddb8492fee623eb1e4b1c470b86 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EnergyInputProvider.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EnergyInputProvider.cxx
@@ -13,8 +13,6 @@
 #include "TrigT1CaloEvent/EnergyRoI_ClassDEF.h"
 #include "TrigT1Interfaces/TrigT1CaloDefs.h"
 
-#include "TrigT1CaloEvent/EnergyTopoData.h"
-
 #include "L1TopoEvent/ClusterTOB.h"
 #include "L1TopoEvent/TopoInputEvent.h"
 
@@ -45,7 +43,9 @@ EnergyInputProvider::initialize() {
    CHECK(incidentSvc.retrieve());
    incidentSvc->addListener(this,"BeginRun", 100);
    incidentSvc.release().ignore();
-  
+
+   CHECK(m_energyLocation.initialize());  
+
    return StatusCode::SUCCESS;
 }
 
@@ -95,12 +95,10 @@ EnergyInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
 //                  << ", word2 = " << hex << energyROI->roiWord2());
 
 
-   const EnergyTopoData* topoData = 0;
+   SG::ReadHandle< EnergyTopoData > topoData (m_energyLocation);
 
-   if( evtStore()->contains<EnergyTopoData>(m_energyLocation) ) {
-      CHECK( evtStore()->retrieve(topoData, m_energyLocation) );
-   } else {
-      ATH_MSG_WARNING("No EnergyTopoData with SG key '" << m_energyLocation.toString() << "' found in the event. No MET input for the L1Topo simulation.");
+   if( !topoData.isValid()){
+      ATH_MSG_WARNING("No EnergyTopoData with SG key '" << m_energyLocation.key() << "' found in the event. No MET input for the L1Topo simulation.");
       return StatusCode::RECOVERABLE;
    }
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EnergyInputProvider.h b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EnergyInputProvider.h
index 1fea90cdcbba90c7ffde5e9a90e6d06fc9926965..58fdc52aa9ae3ce4942a09d93bfafb51e682941f 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EnergyInputProvider.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/EnergyInputProvider.h
@@ -8,6 +8,7 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "L1TopoSimulation/IInputTOBConverter.h"
 #include "GaudiKernel/IIncidentListener.h"
+#include "TrigT1CaloEvent/EnergyTopoData.h"
 
 class TH1I;
 
@@ -32,7 +33,7 @@ namespace LVL1 {
 
       ServiceHandle<ITHistSvc> m_histSvc;
 
-      StringProperty m_energyLocation;    //!<  EnergyROI SG key
+      SG::ReadHandleKey< LVL1::EnergyTopoData > m_energyLocation;    //!<  EnergyROI SG key
 
       TH1I * m_hPt {nullptr};
       TH1I * m_hPhi {nullptr};
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/JetInputProvider.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/JetInputProvider.cxx
index 4913e5fc32751f243d709913050140b2205136be..dc82afbd64e589270d497e6a5e6e66a9ec8d1f3e 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/JetInputProvider.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/JetInputProvider.cxx
@@ -12,7 +12,7 @@
 #include "TrigT1CaloEvent/JetROI_ClassDEF.h"
 #include "L1TopoEvent/ClusterTOB.h"
 #include "L1TopoEvent/TopoInputEvent.h"
-#include "TrigT1CaloEvent/JetCMXTopoDataCollection.h"
+
 
 using namespace std;
 using namespace LVL1;
@@ -40,6 +40,8 @@ JetInputProvider::initialize() {
    incidentSvc->addListener(this,"BeginRun", 100);
    incidentSvc.release().ignore();
 
+   CHECK(m_jetLocation.initialize()); 
+
    return StatusCode::SUCCESS;
 }
 
@@ -75,12 +77,11 @@ JetInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
    // https://indico.cern.ch/conferenceDisplay.py?confId=284687
    
 
-   DataVector<JetCMXTopoData> * jettobdata = 0;
 
-   if( evtStore()->contains<DataVector<JetCMXTopoData>>(m_jetLocation) ) {
-      CHECK( evtStore()->retrieve(jettobdata, m_jetLocation));
-   } else {
-      ATH_MSG_WARNING("No DataVector<JetCMXTopoData> with SG key '" << m_jetLocation.toString() << "' found in the event. No JET input for the L1Topo simulation.");
+   SG::ReadHandle< DataVector<JetCMXTopoData> > jettobdata (m_jetLocation);
+
+   if(!jettobdata.isValid()){
+      ATH_MSG_WARNING("No DataVector<JetCMXTopoData> with SG key '" << m_jetLocation.key() << "' found in the event. No JET input for the L1Topo simulation.");
       return StatusCode::RECOVERABLE;
    }
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/JetInputProvider.h b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/JetInputProvider.h
index d87369e0f1d26b38f125924143f5f61c28b70de7..2d5f82f1acc6f834a6fb18015a0d3b667702353f 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/JetInputProvider.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/JetInputProvider.h
@@ -8,6 +8,7 @@
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "L1TopoSimulation/IInputTOBConverter.h"
 #include "GaudiKernel/IIncidentListener.h"
+#include "TrigT1CaloEvent/JetCMXTopoDataCollection.h"
 
 class TH1I;
 class TH2I;
@@ -33,7 +34,7 @@ namespace LVL1 {
 
       ServiceHandle<ITHistSvc> m_histSvc;
 
-      StringProperty m_jetLocation;    //!<  Jet ROIs SG key
+      SG::ReadHandleKey< DataVector<JetCMXTopoData> >  m_jetLocation;    //!<  Jet ROIs SG key
 
       TH1I * m_hPt1 {nullptr};
       TH1I * m_hPt2 {nullptr};
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.cxx
index 8872f6770b5e768ed0b62448d8286f1e03598ce2..9a3e8e1275ab8927b22e9f742356d4541468b836 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.cxx
@@ -21,9 +21,15 @@
 #include "L1TopoInterfaces/IL1TopoHistSvc.h"
 #include "TrigT1Interfaces/TrigT1StoreGateKeys.h"
 #include "TrigT1Interfaces/TrigT1CaloDefs.h"
-#include "TrigT1Interfaces/FrontPanelCTP.h"
 #include "TrigT1CaloEvent/EmTauROI_ClassDEF.h"
 
+#include "L1TopoRDO/BlockTypes.h"
+#include "L1TopoRDO/Header.h"
+#include "L1TopoRDO/Helpers.h"
+#include "L1TopoRDO/L1TopoTOB.h"
+#include "L1TopoRDO/L1TopoRDOCollection.h"
+
+
 // #include "TrigSteering/Scaler.h"
 #include "./PeriodicScaler.h"
 
@@ -66,6 +72,7 @@ L1TopoSimulation::L1TopoSimulation(const std::string &name, ISvcLocator *pSvcLoc
    m_jetInputProvider("LVL1::JetInputProvider/JetInputProvider", this),
    m_energyInputProvider("LVL1::EnergyInputProvider/EnergyInputProvider", this),
    m_muonInputProvider("LVL1::MuonInputProvider/MuonInputProvider", this),
+//   m_EventInfoKey("EventInfo"),
    m_topoSteering( unique_ptr<TCS::TopoSteering>(new TCS::TopoSteering()) )
 {
    declareProperty( "TrigConfigSvc", m_l1topoConfigSvc, "Service to provide the L1Topo menu");
@@ -78,12 +85,15 @@ L1TopoSimulation::L1TopoSimulation(const std::string &name, ISvcLocator *pSvcLoc
    declareProperty( "MonHistBaseDir", m_histBaseDir = "L1TopoAlgorithms", "Base directory for monitoring histograms will be /EXPERT/<MonHistBaseDir>" );
    declareProperty( "EnableInputDump", m_enableInputDump, "Boolean to enable writing of input data for standalone running");
    declareProperty( "UseBitwise", m_enableBitwise, "Boolean to enable the bitwise version of software algorithms");
+   declareProperty("FillHistoBasedOnHardware", m_fillHistogramsBasedOnHardwareDecision=true,
+                   "Boolean to fill accept/reject histograms based on hdw; default based on sim");
    declareProperty( "InputDumpFile", m_inputDumpFile, "File name for dumping input data");
    declareProperty( "TopoCTPLocation", m_topoCTPLocation = LVL1::DEFAULT_L1TopoCTPLocation, "StoreGate key of topo decision output for CTP" );
    declareProperty( "TopoOverflowCTPLocation", m_topoOverflowCTPLocation = LVL1::DEFAULT_L1TopoOverflowCTPLocation, "StoreGate key of topo overflow output for CTP" );
    declareProperty( "TopoOutputLevel", m_topoOutputLevel, "OutputLevel for L1Topo algorithms" );
    declareProperty( "TopoSteeringOutputLevel", m_topoSteeringOutputLevel, "OutputLevel for L1Topo steering" );
    declareProperty("Prescale", m_prescale = 1, "Internal prescale factor for this algorithm, implemented with a periodic scaler: so 1 means run every time, N means run every 1 in N times it is called; the other times it will exit without doing anything");
+   declareProperty("PrescaleDAQROBAccess", m_prescaleForDAQROBAccess = 4, "Prescale factor for requests for DAQ ROBs: can be used to avoid overloading ROS. Zero means disabled, 1 means always, N means sample only 1 in N events");
 
 
    const TCS::GlobalDecision & dec = m_topoSteering->simulationResult().globalDecision();
@@ -126,7 +136,21 @@ L1TopoSimulation::initialize() {
    ATH_MSG_DEBUG("retrieving " << m_muonInputProvider);
    CHECK( m_muonInputProvider.retrieve() );
 
+   CHECK(m_topoCTPLocation.initialize());
+   CHECK(m_topoOverflowCTPLocation.initialize());
+//   CHECK(m_EventInfoKey.initialize());
+
    ATH_MSG_DEBUG("Prescale factor set to " << m_prescale);
+   ATH_MSG_DEBUG("PrescaleDAQROBAccess factor set to " << m_prescaleForDAQROBAccess);
+   ATH_MSG_DEBUG("FillHistoBasedOnHardware " << m_fillHistogramsBasedOnHardwareDecision);
+   if(m_fillHistogramsBasedOnHardwareDecision and
+      (m_prescaleForDAQROBAccess % m_prescale)) {
+      ATH_MSG_FATAL("PrescaleDAQROBAccess must be a multiple of Prescale"
+                    <<" : current values :"
+                    <<" "<<m_prescaleForDAQROBAccess
+                    <<", "<<m_prescale);
+      return StatusCode::FAILURE;
+   }
    ATH_MSG_DEBUG("Output trigger key property " << m_topoCTPLocation);
    ATH_MSG_DEBUG("Output overflow key property " << m_topoOverflowCTPLocation);
 
@@ -147,6 +171,8 @@ L1TopoSimulation::initialize() {
    }
 
    m_topoSteering->setAlgMsgLevel( TrigConf::MSGTC::Level(m_topoOutputLevel) );
+   m_topoSteering->setOutputAlgosFillBasedOnHardware(m_fillHistogramsBasedOnHardwareDecision);
+
 
    std::shared_ptr<IL1TopoHistSvc> topoHistSvc = std::shared_ptr<IL1TopoHistSvc>( new AthenaL1TopoHistSvc(m_histSvc) );
    topoHistSvc->setBaseDir("/EXPERT/" + m_histBaseDir.value());
@@ -215,7 +241,7 @@ StatusCode
 L1TopoSimulation::execute() {
   
 
-   if (m_prescale>1 && m_scaler->decision(m_prescale)){
+   if (m_prescale>1 && not m_scaler->decision(m_prescale)){
       ATH_MSG_DEBUG( "This event not processed due to prescale");
       return StatusCode::SUCCESS;
       // do not record dummy output: 
@@ -234,6 +260,9 @@ L1TopoSimulation::execute() {
    TCS::TopoInputEvent & inputEvent = m_topoSteering->inputEvent();
 
    // Event Info
+//ReadHandle doesn't seem to work yet for eventinfo
+//   SG::ReadHandle< EventInfo > evt(m_EventInfoKey);
+//   CHECK(evt.isValid());
    const EventInfo *evt;
    CHECK(evtStore()->retrieve(evt));
    inputEvent.setEventInfo(evt->event_ID()->run_number(),evt->event_ID()->event_number(),evt->event_ID()->lumi_block(),evt->event_ID()->bunch_crossing_id());
@@ -253,6 +282,16 @@ L1TopoSimulation::execute() {
    ATH_MSG_DEBUG("" << inputEvent);
 
    inputEvent.dump();
+   
+   if(m_fillHistogramsBasedOnHardwareDecision){
+       if(m_scaler->decision(m_prescaleForDAQROBAccess) and
+          retrieveHardwareDecision()){
+           m_topoSteering->propagateHardwareBitsToAlgos();
+           m_topoSteering->setOutputAlgosSkipHistograms(false);
+       } else {
+           m_topoSteering->setOutputAlgosSkipHistograms(true);
+       }
+   }
 
    // execute the toposteering
    m_topoSteering->executeEvent();
@@ -270,8 +309,8 @@ L1TopoSimulation::execute() {
     */
 
    const TCS::GlobalDecision & dec = m_topoSteering->simulationResult().globalDecision();
-   LVL1::FrontPanelCTP * topoDecision2CTP = new LVL1::FrontPanelCTP();
-   LVL1::FrontPanelCTP * topoOverflow2CTP = new LVL1::FrontPanelCTP();
+   auto topoDecision2CTP = std::make_unique< LVL1::FrontPanelCTP >();
+   auto topoOverflow2CTP = std::make_unique< LVL1::FrontPanelCTP >();
    for(unsigned int clock=0; clock<2; ++clock) {
       topoDecision2CTP->setCableWord0( clock, 0 ); // ALFA
       topoDecision2CTP->setCableWord1( clock, dec.decision( 0, clock) );  // TOPO 0
@@ -280,8 +319,10 @@ L1TopoSimulation::execute() {
       topoOverflow2CTP->setCableWord1( clock, dec.overflow( 0, clock) );  // TOPO 0
       topoOverflow2CTP->setCableWord2( clock, dec.overflow( 1, clock) );  // TOPO 1
    } 
-   CHECK(evtStore()->record( topoDecision2CTP, m_topoCTPLocation ));
-   CHECK(evtStore()->record( topoOverflow2CTP, m_topoOverflowCTPLocation ));
+   
+   CHECK(SG::makeHandle(m_topoCTPLocation)        .record(std::move(topoDecision2CTP)));
+   CHECK(SG::makeHandle(m_topoOverflowCTPLocation).record(std::move(topoOverflow2CTP)));
+   
 
    // TODO: get the output combination data and put into SG
 
@@ -305,3 +346,59 @@ L1TopoSimulation::finalize() {
 
    return StatusCode::SUCCESS;
 }
+
+StatusCode L1TopoSimulation::retrieveHardwareDecision()
+{
+    // some duplication with L1TopoRDO::Helpers
+    // getDecisionAndOverflowBits() ?
+    StatusCode sc = StatusCode::SUCCESS;
+    std::bitset<TCS::TopoSteering::numberOfL1TopoBits> hardwareDaqRobTriggerBits;
+    std::bitset<TCS::TopoSteering::numberOfL1TopoBits> hardwareDaqRobOvrflowBits;
+    bool prescalForDAQROBAccess = true; // DG-2017-06-30 decide what to do when the hdw dec is not to be retrieved
+    if (prescalForDAQROBAccess){
+        std::vector<L1Topo::L1TopoTOB> daqTobsBC0;
+        std::vector<uint32_t> tobsbc0SourceIds; // to compute bit indices
+        const DataHandle<L1TopoRDOCollection> rdos = 0;
+        sc = evtStore()->retrieve(rdos);
+        if (sc.isFailure() or 0 == rdos) {
+            ATH_MSG_INFO ( "Could not retrieve L1Topo DAQ RDO collection from StoreGate" );
+        } else if (rdos->empty()) {
+            ATH_MSG_INFO ( "L1Topo DAQ RDO collection is empty" );
+        } else {
+            for (auto & rdo : *rdos){
+                const std::vector<uint32_t> cDataWords = rdo->getDataWords();
+                // initialise header: set version 15, BCN -7, which is unlikely
+                L1Topo::Header header(0xf,0,0,0,0,1,0x7);
+                for (auto word : cDataWords){
+                    switch (L1Topo::blockType(word)){
+                    case L1Topo::BlockTypes::HEADER: {
+                        header = L1Topo::Header(word);
+                        break;
+                    }
+                    case L1Topo::BlockTypes::L1TOPO_TOB: {
+                        auto tob = L1Topo::L1TopoTOB(word);
+                        if (header.bcn_offset()==0){
+                            daqTobsBC0.push_back(tob);
+                            tobsbc0SourceIds.push_back(rdo->getSourceID());
+                        }
+                        break;
+                    }
+                    default: break;
+                    }
+                } // for(word)
+            } // for(rdo)
+        }
+        for(uint32_t iTob=0; iTob<daqTobsBC0.size(); ++iTob){
+            const L1Topo::L1TopoTOB &tob = daqTobsBC0[iTob];
+            const uint32_t &sourceId = tobsbc0SourceIds[iTob];
+            for(unsigned int i=0; i<8; ++i){
+                unsigned int index = L1Topo::triggerBitIndexNew(sourceId, tob, i);
+                hardwareDaqRobTriggerBits[index] = (tob.trigger_bits()>>i)&1;
+                hardwareDaqRobOvrflowBits[index] = (tob.overflow_bits()>>i)&1;
+            }
+        }
+        m_topoSteering->setHardwareBits(hardwareDaqRobTriggerBits,
+                                        hardwareDaqRobOvrflowBits);
+    }
+    return sc;
+}
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.h b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.h
index 5ea8d76dc4c2d975a2a3ae2f2d8bf2d94bbda92c..a2aec627fd2bf5d7d41fc47fbe3d811022cf28d3 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/L1TopoSimulation.h
@@ -18,6 +18,8 @@
 
 #include <memory>
 
+#include "TrigT1Interfaces/FrontPanelCTP.h"
+
 class TH1;
 class IMonitorToolBase;
 class ITHistSvc;
@@ -54,6 +56,14 @@ namespace LVL1 {
       virtual StatusCode execute() override;
 
       virtual StatusCode finalize() override;
+      /**
+         @brief Retrieve the L1Topo hardware bits from the DAQ RODs
+         
+         No need to cache them within this AthAlgorithm; just pass
+         them to TopoSteering, which will then do all the work with
+         them.
+      */
+      StatusCode retrieveHardwareDecision();
 
    private:
 
@@ -77,10 +87,10 @@ namespace LVL1 {
 
       BooleanProperty m_enableInputDump { false }; // for enabling input dumping
       BooleanProperty m_enableBitwise { false }; // for enabling bitwise algorithms
-
       StringProperty  m_inputDumpFile { "inputdump.txt" }; // input dump file
-      StringProperty  m_topoCTPLocation { "" }; ///< SG key of decision bits for CTP
-      StringProperty  m_topoOverflowCTPLocation { "" }; ///< SG key of overflow bits for CTP
+//      SG::ReadHandleKey<EventInfo> m_EventInfoKey;
+      SG::WriteHandleKey<LVL1::FrontPanelCTP>  m_topoCTPLocation { "" }; ///< SG key of decision bits for CTP
+      SG::WriteHandleKey<LVL1::FrontPanelCTP>  m_topoOverflowCTPLocation { "" }; ///< SG key of overflow bits for CTP
       int m_topoOutputLevel{TrigConf::MSGTC::WARNING};                                  // property to set the outputlevel of the topo algorithms
       int m_topoSteeringOutputLevel{TrigConf::MSGTC::WARNING};                          // property to set the outputlevel of the topo steering
 
@@ -88,12 +98,13 @@ namespace LVL1 {
 
       TH1 *  m_DecisionHist[3] { nullptr, nullptr, nullptr };
 
+      BooleanProperty m_fillHistogramsBasedOnHardwareDecision { false }; // default: fill based on simulation
+      UnsignedIntegerProperty m_prescaleForDAQROBAccess {4}; ///< read hdw bits every N events (used only when m_fillHistogramsBasedOnHardwareDecision is true)
       UnsignedIntegerProperty m_prescale; //! property for prescale factor
       LVL1::PeriodicScaler* m_scaler; //! prescale decision tool
 
       StringProperty m_histBaseDir; //! sets base dir for monitoring histograms
-
-   };
+  };
 
 }
 #endif
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.cxx
index 276db3e0251d2631205ae844288a1f866efe2c2d..38a60f1cb0089770d5fac6a62de06bf991023577 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.cxx
@@ -14,14 +14,12 @@
 #include "L1TopoEvent/TopoInputEvent.h"
 #include "TrigT1Interfaces/RecMuonRoI.h"
 #include "TrigT1Interfaces/TrigT1StoreGateKeys.h"
-#include "TrigT1Interfaces/MuCTPIToRoIBSLink.h"
 #include "TrigT1Interfaces/RecMuonRoiSvc.h"
 #include "TrigT1Interfaces/MuCTPIL1Topo.h"
 #include "TrigT1Interfaces/MuCTPIL1TopoCandidate.h"
 #include "TrigT1Interfaces/IMuctpiSimTool.h"
 
 #include "TrigT1Result/MuCTPIRoI.h"
-#include "TrigT1Result/RoIBResult.h"
 #include "TrigT1Result/Header.h"
 #include "TrigT1Result/Trailer.h"
 
@@ -36,6 +34,7 @@ using namespace LVL1;
 MuonInputProvider::MuonInputProvider( const std::string& type, const std::string& name, 
                                       const IInterface* parent) :
    base_class(type, name, parent),
+   m_roibLocation(""),
    m_histSvc("THistSvc", name),
    m_configSvc( "TrigConf::TrigConfigSvc/TrigConfigSvc", name ),
    m_recRPCRoiSvc( LVL1::ID_RecRpcRoiSvc, name ),
@@ -43,7 +42,8 @@ MuonInputProvider::MuonInputProvider( const std::string& type, const std::string
    m_MuctpiSimTool("LVL1MUCTPI::L1MuctpiTool/LVL1MUCTPI__L1MuctpiTool"),
    m_muonROILocation( LVL1MUCTPI::DEFAULT_MuonRoIBLocation ),
    m_MuonEncoding(0),
-   m_MuCTPItoL1TopoLocation ()
+   m_MuCTPItoL1TopoLocation (LVL1MUCTPI::DEFAULT_MuonL1TopoLocation),
+   m_MuCTPItoL1TopoLocationPlusOne("")
 {
    declareInterface<LVL1::IInputTOBConverter>( this );
    declareProperty( "ROIBResultLocation", m_roibLocation, "Storegate key for the reading the ROIBResult" );
@@ -52,9 +52,11 @@ MuonInputProvider::MuonInputProvider( const std::string& type, const std::string
    declareProperty( "RecTgcRoiSvc", m_recTGCRoiSvc, "TGC Rec Roi Service");
    declareProperty( "MuonROILocation", m_muonROILocation, "Storegate key for the Muon ROIs" );
 
-   declareProperty( "MuonEncoding", m_MuonEncoding = 0, "0=full granularity Mu ROIs, 1=MuCTPiToTopo granularity");
-   declareProperty( "locationMuCTPItoL1Topo", m_MuCTPItoL1TopoLocation = LVL1MUCTPI::DEFAULT_MuonL1TopoLocation, "Storegate key for MuCTPItoL1Topo ");
+   declareProperty( "MuonEncoding", m_MuonEncoding, "0=full granularity Mu ROIs, 1=MuCTPiToTopo granularity");
+   declareProperty( "locationMuCTPItoL1Topo", m_MuCTPItoL1TopoLocation, "Storegate key for MuCTPItoL1Topo ");
    declareProperty( "MuctpiSimTool", m_MuctpiSimTool,"Tool for MUCTPIsimulation");
+
+   declareProperty("BCPlusOneLocation", m_MuCTPItoL1TopoLocationPlusOne);
 }
 
 MuonInputProvider::~MuonInputProvider()
@@ -85,6 +87,19 @@ MuonInputProvider::initialize() {
    ATH_MSG_DEBUG("Retrieving MuctpiToolHandle " << m_MuctpiSimTool);
    CHECK( m_MuctpiSimTool.retrieve() );
 
+
+   //This is a bit ugly but I've done it so the job options can be used to determine 
+   //use of storegate
+   CHECK(m_MuCTPItoL1TopoLocation.initialize(!m_MuCTPItoL1TopoLocation.key().empty()));
+   
+   if(!m_MuCTPItoL1TopoLocationPlusOne.key().empty())
+      m_MuCTPItoL1TopoLocationPlusOne = m_MuCTPItoL1TopoLocation.key()+std::to_string(1);
+   
+   CHECK(m_MuCTPItoL1TopoLocationPlusOne.initialize(!m_MuCTPItoL1TopoLocationPlusOne.key().empty()));
+
+   CHECK(m_muonROILocation.initialize(!m_muonROILocation.key().empty()));
+   CHECK(m_roibLocation.initialize(!m_roibLocation.key().empty()));
+
    return StatusCode::SUCCESS;
 }
 
@@ -182,15 +197,27 @@ MuonInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
 
     const L1MUINT::MuCTPIToRoIBSLink* muctpi_slink {nullptr};
 
-    if( evtStore()->contains<L1MUINT::MuCTPIToRoIBSLink>(LVL1MUCTPI::DEFAULT_MuonRoIBLocation) ) {
-      CHECK( evtStore()->retrieve( muctpi_slink, LVL1MUCTPI::DEFAULT_MuonRoIBLocation ) );
-    } else if( evtStore()->contains<ROIB::RoIBResult>(m_roibLocation) ) {
-      CHECK( evtStore()->retrieve(roibResult, m_roibLocation) );
-    } else {
-      ATH_MSG_WARNING("Neither a MuCTPIToRoIBSLink with SG key " << LVL1MUCTPI::DEFAULT_MuonRoIBLocation << " nor an RoIBResult were found in the event. No muon input for the L1Topo simulation.");
+
+    if(m_muonROILocation.key().empty()==false){
+       SG::ReadHandle<L1MUINT::MuCTPIToRoIBSLink> MuCTPIHandle(m_muonROILocation);//LVL1MUCTPI::DEFAULT_MuonRoIBLocation)
+       if( MuCTPIHandle.isValid() ){
+           muctpi_slink = MuCTPIHandle.cptr();
+       }
+    }
+
+    if(muctpi_slink == nullptr && not m_roibLocation.key().empty()){
+       SG::ReadHandle<ROIB::RoIBResult> roib (m_roibLocation);
+       if( roib.isValid() ){
+           roibResult = roib.cptr(); 
+       }
+    }
+
+    if(!muctpi_slink && !roibResult) {
+      ATH_MSG_WARNING("Neither a MuCTPIToRoIBSLink with SG key " << m_muonROILocation.key() << " nor an RoIBResult were found in the event. No muon input for the L1Topo simulation.");
       return StatusCode::RECOVERABLE;
     }
 
+
     if( roibResult ) {
 
       const std::vector< ROIB::MuCTPIRoI >& rois = roibResult->muCTPIResult().roIVec();
@@ -235,9 +262,16 @@ MuonInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
 
     // first see if L1Muctpi simulation already ran and object is in storegate, if not
     // call tool version of the L1MuctpiSimulation and create it on the fly
-    if( evtStore()->contains<LVL1::MuCTPIL1Topo>(m_MuCTPItoL1TopoLocation) ) {
-      LVL1::MuCTPIL1Topo* l1topo  {nullptr};
-      CHECK( evtStore()->retrieve( l1topo, m_MuCTPItoL1TopoLocation ) );      
+
+    const LVL1::MuCTPIL1Topo* l1topo  {nullptr};
+
+    if(m_MuCTPItoL1TopoLocation.key().empty()==false){
+        SG::ReadHandle<LVL1::MuCTPIL1Topo> l1topoh(m_MuCTPItoL1TopoLocation);
+        if( l1topoh.isValid() ) l1topo = l1topoh.cptr();
+    }
+
+    if( l1topo ) {
+      
       ATH_MSG_DEBUG("Use MuCTPiToTopo granularity Muon ROIs: retrieve from SG");
 
       // std::cout << "TW: MuonInputProvider print l1topo candidates from SG" << std::endl; 
@@ -274,20 +308,20 @@ MuonInputProvider::fillTopoInputEvent(TCS::TopoInputEvent& inputEvent) const {
     
     //BC+1 ... this can only come from simulation, in data taking this is collected by the L1Topo at its input
     // so no need to do anything else here
-    if( evtStore()->contains<LVL1::MuCTPIL1Topo>(m_MuCTPItoL1TopoLocation.toString()+std::to_string(1)) ) {
-      LVL1::MuCTPIL1Topo* l1topoBC1  {nullptr};
-      CHECK( evtStore()->retrieve( l1topoBC1,m_MuCTPItoL1TopoLocation.toString()+std::to_string(1)));
-      ATH_MSG_DEBUG( "Contains L1Topo LateMuons L1Muctpi object from StoreGate!" );
-      //      l1topoBC1->print();
+    if(m_MuCTPItoL1TopoLocationPlusOne.key().empty()==false){
+      SG::ReadHandle<LVL1::MuCTPIL1Topo> l1topoBC1(m_MuCTPItoL1TopoLocationPlusOne);
+      if( l1topoBC1.isValid() ) {
+        ATH_MSG_DEBUG( "Contains L1Topo LateMuons L1Muctpi object from StoreGate!" );
       
-      std::vector<MuCTPIL1TopoCandidate> candList = l1topoBC1->getCandidates();
-      for(  std::vector<MuCTPIL1TopoCandidate>::const_iterator iMuCand = candList.begin(); iMuCand != candList.end(); iMuCand++)
+        std::vector<MuCTPIL1TopoCandidate> candList = l1topoBC1->getCandidates();
+        for(  std::vector<MuCTPIL1TopoCandidate>::const_iterator iMuCand = candList.begin(); iMuCand != candList.end(); iMuCand++)
 	{
 	  //or would it be better to create muon and dynamic_cast?
 	  ATH_MSG_DEBUG("MuonInputProvider addLateMuon ");
 	  inputEvent.addLateMuon( MuonInputProvider::createLateMuonTOB( *iMuCand ) );	   
 	}
-     }  
+     }
+    }
   }
 
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.h b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.h
index 193bd351273950be4376a6cfa2dc32fdeb518a63..511af9672cc83b8cf51aa354c91c8c1c928cd20a 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/MuonInputProvider.h
@@ -11,6 +11,8 @@
 #include "GaudiKernel/ToolHandle.h"
 #include "TrigT1Interfaces/MuCTPIL1Topo.h"
 #include <vector>
+#include "TrigT1Result/RoIBResult.h"
+#include "TrigT1Interfaces/MuCTPIToRoIBSLink.h"
 
 class TH1I;
 class TH2I;
@@ -55,7 +57,7 @@ namespace LVL1 {
       TCS::MuonTOB createMuonTOB(const MuCTPIL1TopoCandidate & roi) const;
       TCS::LateMuonTOB createLateMuonTOB(const MuCTPIL1TopoCandidate & roi) const;
 
-      StringProperty m_roibLocation;
+      SG::ReadHandleKey<ROIB::RoIBResult> m_roibLocation;
 
       ServiceHandle<ITHistSvc> m_histSvc;
 
@@ -68,13 +70,14 @@ namespace LVL1 {
 
       std::vector< TrigConf::TriggerThreshold* > m_MuonThresholds;
 
-      StringProperty m_muonROILocation;    //!<  Muon ROIs SG key
+      SG::ReadHandleKey<L1MUINT::MuCTPIToRoIBSLink> m_muonROILocation;    //!<  Muon ROIs SG key
 
       TH1I * m_hPt {nullptr};
       TH2I * m_hEtaPhi {nullptr};
 
-     int m_MuonEncoding; //!< Use 0 for full granularity; 1 for MuCTPiToTopo muon granularity
-     StringProperty m_MuCTPItoL1TopoLocation;
+      int m_MuonEncoding; //!< Use 0 for full granularity; 1 for MuCTPiToTopo muon granularity
+      SG::ReadHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPItoL1TopoLocation;
+      SG::ReadHandleKey<LVL1::MuCTPIL1Topo> m_MuCTPItoL1TopoLocationPlusOne;
    };
 }
 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/RoiB2TopoInputDataCnv.cxx b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/RoiB2TopoInputDataCnv.cxx
index c620c8de5c7d03cc52703d0f5598bf87672ea8e4..bab864c7c790c9c7415bde96ad9a8410d329da5e 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/RoiB2TopoInputDataCnv.cxx
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/RoiB2TopoInputDataCnv.cxx
@@ -15,16 +15,12 @@
 #include "GaudiKernel/Property.h"
 
 #include "TrigT1Interfaces/TrigT1CaloDefs.h"
-#include "TrigT1Result/RoIBResult.h"
 
-#include "TrigT1CaloEvent/EnergyTopoData.h"
-#include "TrigT1CaloEvent/CPCMXTopoData.h"
-#include "TrigT1CaloEvent/JetCMXTopoDataCollection.h"
 
 // Constructor
 LVL1::RoiB2TopoInputDataCnv::RoiB2TopoInputDataCnv( const std::string& name, 
                                                     ISvcLocator* pSvcLocator ) : 
-   ::AthAlgorithm( name, pSvcLocator ),
+   ::AthReentrantAlgorithm( name, pSvcLocator ),
    datamaker( new LVL1::L1TopoDataMaker() ),
    m_roibLocation( "RoIBResult" ),
    m_emTauLocation( TrigT1CaloDefs::EmTauTopoTobLocation ),
@@ -44,67 +40,57 @@ LVL1::RoiB2TopoInputDataCnv::~RoiB2TopoInputDataCnv()
    delete datamaker;
 }
 
-
-// Athena Algorithm's Hooks
 StatusCode
 LVL1::RoiB2TopoInputDataCnv::initialize()
 {
-   ATH_MSG_INFO ("Initializing " << name() << "...");
-   
-   return StatusCode::SUCCESS;
-}
+   ATH_CHECK(m_roibLocation.initialize());
+   ATH_CHECK(m_emTauLocation.initialize());
+   ATH_CHECK(m_jetLocation.initialize());
+   ATH_CHECK(m_energyLocation.initialize());
 
-StatusCode
-LVL1::RoiB2TopoInputDataCnv::finalize()
-{
-   ATH_MSG_INFO ("Finalizing " << name() << "...");
-   
    return StatusCode::SUCCESS;
 }
 
 StatusCode
-LVL1::RoiB2TopoInputDataCnv::execute()
+LVL1::RoiB2TopoInputDataCnv::execute_r (const EventContext& ctx) const
 {  
    ATH_MSG_DEBUG ("Executing " << name() << "...");
    
-   const ROIB::RoIBResult* roibResult{nullptr};
+   SG::ReadHandle<ROIB::RoIBResult> roibResult(m_roibLocation, ctx);
 
-   if( evtStore()->contains<ROIB::RoIBResult>(m_roibLocation) ) {
-      CHECK( evtStore()->retrieve(roibResult, m_roibLocation) );
-   } else {
-      ATH_MSG_WARNING("No RoIBResults with SG key '" << m_roibLocation.toString() << "' found in the event. Can not create any information needed for L1Topo simulation.");
+   if( !roibResult.isValid() ) {
+      ATH_MSG_WARNING("No RoIBResults with SG key '" << m_roibLocation.key() << "' found in the event. Can not create any information needed for L1Topo simulation.");
       return StatusCode::RECOVERABLE;
    }
 
-
+   SG::WriteHandle<DataVector<CPCMXTopoData>> emtauTopoData(m_emTauLocation, ctx);
    // emtau
-   if(evtStore()->contains<DataVector<CPCMXTopoData>>(m_emTauLocation)) {
-      ATH_MSG_WARNING("DataVector<CPCMXTopoData> with SG key '" << m_emTauLocation.toString() << "' already exists in SG, will not create a new one.");
+   if(emtauTopoData.isPresent()) {
+      ATH_MSG_WARNING("DataVector<CPCMXTopoData> with SG key '" << m_emTauLocation.key() << "' already exists in SG, will not create a new one.");
    } else {
-      DataVector<CPCMXTopoData>* emtauTopoData(new DataVector<CPCMXTopoData>());
-      datamaker->makeCPCMXTopoData(roibResult, emtauTopoData);
-      ATH_MSG_DEBUG("Recording DataVector<CPCMXTopoData> with SG key '" << m_emTauLocation.toString() << "'.");
-      CHECK(evtStore()->record( emtauTopoData, m_emTauLocation ));
+      ATH_MSG_DEBUG("Recording DataVector<CPCMXTopoData> with SG key '" << m_emTauLocation.key() << "'.");
+      emtauTopoData.record(std::make_unique< DataVector<CPCMXTopoData> >());
+      datamaker->makeCPCMXTopoData(roibResult.cptr(), emtauTopoData.ptr());
    }
    
    // jet
-   if(evtStore()->contains<DataVector<JetCMXTopoData>>(m_jetLocation)) {
-      ATH_MSG_WARNING("DataVector<JetCMXTopoData> with SG key '" << m_jetLocation.toString() << "' already exists in SG, will not create a new one.");
+   SG::WriteHandle<DataVector<JetCMXTopoData>> jetTopoData(m_jetLocation, ctx);
+   if(jetTopoData.isPresent()) {
+      ATH_MSG_WARNING("DataVector<JetCMXTopoData> with SG key '" << m_jetLocation.key() << "' already exists in SG, will not create a new one.");
    } else {
-      DataVector<JetCMXTopoData>* jetTopoData(new DataVector<JetCMXTopoData>());
-      datamaker->makeJetCMXTopoData(roibResult, jetTopoData);
-      ATH_MSG_DEBUG("Recording DataVector<JetCMXTopoData> with SG key '" << m_jetLocation.toString() << "'.");
-      CHECK(evtStore()->record( jetTopoData, m_jetLocation ));
+      ATH_MSG_DEBUG("Recording DataVector<JetCMXTopoData> with SG key '" << m_jetLocation.key() << "'.");
+      jetTopoData.record(std::make_unique<DataVector<JetCMXTopoData>>());
+      datamaker->makeJetCMXTopoData(roibResult.cptr(), jetTopoData.ptr());
    }
 
    // energy
-   if(evtStore()->contains<EnergyTopoData>(m_energyLocation)) {
-      ATH_MSG_WARNING("EnergyTopoData with SG key '" << m_energyLocation.toString() << "' already exists in SG, will not create a new one.");
+   SG::WriteHandle<EnergyTopoData> energyTopoData(m_energyLocation, ctx);
+   if(energyTopoData.isPresent()) {
+      ATH_MSG_WARNING("EnergyTopoData with SG key '" << m_energyLocation.key() << "' already exists in SG, will not create a new one.");
    } else {
-      EnergyTopoData* energyTopoData(new EnergyTopoData());
-      datamaker->makeEnergyTopoData(roibResult, energyTopoData);
-      ATH_MSG_DEBUG("Recording EnergyTopoData with SG key '" << m_energyLocation.toString() << "'.");
-      CHECK(evtStore()->record( energyTopoData, m_energyLocation ));
+      ATH_MSG_DEBUG("Recording EnergyTopoData with SG key '" << m_energyLocation.key() << "'.");
+      energyTopoData.record(std::make_unique<EnergyTopoData>());
+      datamaker->makeEnergyTopoData(roibResult.cptr(), energyTopoData.ptr());
    }
 
    return StatusCode::SUCCESS;
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/RoiB2TopoInputDataCnv.h b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/RoiB2TopoInputDataCnv.h
index 581bf62d5d1f8a4956425abdaa038a8019e5ea89..7866bc110fc8d82d45848c4887026d9032bd1632 100644
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/RoiB2TopoInputDataCnv.h
+++ b/Trigger/TrigT1/L1Topo/L1TopoSimulation/src/RoiB2TopoInputDataCnv.h
@@ -15,13 +15,18 @@
 #include <string>
 
 // FrameWork includes
-#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "TrigT1Result/RoIBResult.h"
+#include "TrigT1CaloEvent/EnergyTopoData.h"
+#include "TrigT1CaloEvent/CPCMXTopoData.h"
+#include "TrigT1CaloEvent/JetCMXTopoDataCollection.h"
+
 
 namespace LVL1 {
 
    class L1TopoDataMaker;
 
-   class RoiB2TopoInputDataCnv : public ::AthAlgorithm 
+   class RoiB2TopoInputDataCnv : public ::AthReentrantAlgorithm 
    { 
    public: 
 
@@ -30,9 +35,9 @@ namespace LVL1 {
       virtual ~RoiB2TopoInputDataCnv(); 
 
       // Athena algorithm's Hooks
-      virtual StatusCode  initialize();
-      virtual StatusCode  execute();
-      virtual StatusCode  finalize();
+      virtual StatusCode  execute_r (const EventContext& ctx) const override;
+      virtual StatusCode  initialize() override;
+      //Finalize not overriden because no work is required
 
    private: 
 
@@ -41,10 +46,10 @@ namespace LVL1 {
 
       L1TopoDataMaker * datamaker { nullptr };
 
-      StringProperty m_roibLocation;
-      StringProperty m_emTauLocation;
-      StringProperty m_jetLocation;
-      StringProperty m_energyLocation;
+      SG::ReadHandleKey<ROIB::RoIBResult>             m_roibLocation;
+      SG::WriteHandleKey<DataVector<CPCMXTopoData>>   m_emTauLocation;
+      SG::WriteHandleKey<DataVector<JetCMXTopoData>>  m_jetLocation;
+      SG::WriteHandleKey<EnergyTopoData>              m_energyLocation;
 
    }; 
 } 
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/cmt/Makefile b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/cmt/Makefile
deleted file mode 100644
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/cmt/Makefile.RootCore b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/cmt/Makefile.RootCore
deleted file mode 100644
index 829f9b753072cc1ffc315e2d466dd1682b722909..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,22 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-PACKAGE          = L1TopoSimulationUtils
-PACKAGE_PRELOAD  = 
-PACKAGE_CXXFLAGS = 
-PACKAGE_OBJFLAGS = 
-PACKAGE_LDFLAGS  = 
-PACKAGE_BINFLAGS = 
-PACKAGE_LIBFLAGS = 
-PACKAGE_DEP      = Asg_Boost
-PACKAGE_TRYDEP   = 
-PACKAGE_CLEAN    = 
-PACKAGE_NOOPT    = 0
-PACKAGE_NOCC     = 0
-PACKAGE_PEDANTIC = 1
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/cmt/requirements
deleted file mode 100644
index 747a50885c3d91d2d297bb5114543705e79e203c..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoSimulationUtils/cmt/requirements
+++ /dev/null
@@ -1,12 +0,0 @@
-package L1TopoSimulationUtils
-
-
-# General dependencies
-use  DetCommonPolicy    *
-use  Boost              *      LCG_Interfaces
-
-# Trigger dependencies
-use L1TopoEvent         *      Trigger/TrigT1/L1Topo
-
-# CMT package configuration
-apply_pattern detcommon_shared_generic_library files=../Root/*.cxx
diff --git a/Trigger/TrigT1/L1Topo/L1TopoValidation/L1TopoValDataCnv/cmt/requirements b/Trigger/TrigT1/L1Topo/L1TopoValidation/L1TopoValDataCnv/cmt/requirements
deleted file mode 100644
index ed1e9d1a3978800ae0316a68a6bbc0bde5709b52..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/L1Topo/L1TopoValidation/L1TopoValDataCnv/cmt/requirements
+++ /dev/null
@@ -1,19 +0,0 @@
-package L1TopoValDataCnv
-
-author Werner Wiedenmann <Werner.Wiedenmann@cern.ch>
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-
-library L1TopoValDataCnv *.cxx -s=components *.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-
-private
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  GaudiInterface             GaudiInterface-*                External
-use  AthenaKernel               AthenaKernel-*                  Control
-use  xAODTrigger                xAODTrigger-*                   Event/xAOD
-use  TrigT1Result               TrigT1Result-*                  Trigger/TrigT1
\ No newline at end of file
diff --git a/Trigger/TrigT1/TrigT1BCM/cmt/requirements b/Trigger/TrigT1/TrigT1BCM/cmt/requirements
deleted file mode 100644
index 236782fbf4145dc13e86df6e408b40e2c710f7d8..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1BCM/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package TrigT1BCM
-author B. Demirkoz <demirkoz@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use GaudiInterface      GaudiInterface-*        External
-
-# BCM Simulation
-use InDetBCM_RawData    InDetBCM_RawData-*     InnerDetector/InDetRawEvent
-
-# Trigger configuration packages
-use TrigConfInterfaces  TrigConfInterfaces-*    Trigger/TrigConfiguration
-#use TrigConfL1Data      TrigConfL1Data-*        Trigger/TrigConfiguration
-
-# LVL1 simulation
-#use TrigT1Interfaces    TrigT1Interfaces-*      Trigger/TrigT1
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.py"
-
-private
-use TrigConfL1Data      TrigConfL1Data-*        Trigger/TrigConfiguration
-use TrigT1Interfaces    TrigT1Interfaces-*      Trigger/TrigT1
-end_private
diff --git a/Trigger/TrigT1/TrigT1CTMonitoring/cmt/requirements b/Trigger/TrigT1/TrigT1CTMonitoring/cmt/requirements
deleted file mode 100644
index 94877f4f000e74d9cd948ac9568e5d4d2d498413..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CTMonitoring/cmt/requirements
+++ /dev/null
@@ -1,44 +0,0 @@
-package TrigT1CTMonitoring
-# $Id: requirements 767189 2016-08-10 09:17:01Z krasznaa $
-
-author David Berge <David.Berge@cern.ch>
-
-public
-
-use  AtlasPolicy                AtlasPolicy-*                   
-use  GaudiInterface             GaudiInterface-*                External
-
-private
-
-use  TrigConfInterfaces         TrigConfInterfaces-*            Trigger/TrigConfiguration
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  TrigT1Interfaces           TrigT1Interfaces-*              Trigger/TrigT1
-use  AthenaMonitoring           AthenaMonitoring-*              Control
-use  AtlasCOOL                  AtlasCOOL-*                     External
-use  MuonTrigCoinData           MuonTrigCoinData-*              MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use  MuonDigitContainer         MuonDigitContainer-*            MuonSpectrometer
-use  MuonRDO                    MuonRDO-*                       MuonSpectrometer
-use  AthenaPoolUtilities        AthenaPoolUtilities-*           Database/AthenaPOOL
-use  AtlasCORAL                 AtlasCORAL-*                    External
-use  AtlasROOT                  AtlasROOT-*                     External
-use  CoraCool                   CoraCool-*                      Database
-use  EventInfo			EventInfo-*			Event
-use  AtlasBoost                 AtlasBoost-*                    External
-use  LWHists                    LWHists-*                       Tools
-use  TrigConfL1Data             TrigConfL1Data-*                Trigger/TrigConfiguration
-use  TrigConfStorage            TrigConfStorage-*               Trigger/TrigConfiguration
-use  TrigT1CTP                  TrigT1CTP-*                     Trigger/TrigT1
-use  TrigT1CaloEvent            TrigT1CaloEvent-*               Trigger/TrigT1
-use  TrigT1Result               TrigT1Result-*                  Trigger/TrigT1
-
-end_private
-
-library TrigT1CTMonitoring *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_xmls
-apply_pattern install_xmls
-apply_pattern generic_declare_for_link kind=data files="-s=../scripts *.py" prefix=share/bin
diff --git a/Trigger/TrigT1/TrigT1CTP/cmt/requirements b/Trigger/TrigT1/TrigT1CTP/cmt/requirements
deleted file mode 100755
index 56a0ff9f394f7c723104834107e116bcd7c281dc..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CTP/cmt/requirements
+++ /dev/null
@@ -1,40 +0,0 @@
-package TrigT1CTP
-
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-author Wolfgang Ehrenfeld <Wolfgang.Ehrenfeld@desy.de>
-
-public
-use  AtlasPolicy                AtlasPolicy-*
-use  StoreGate                  StoreGate-*                     Control
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  GaudiInterface             GaudiInterface-*                External
-use  DataCollection             DataCollection-*                External
-use  TrigInterfaces             TrigInterfaces-*                Trigger/TrigSteer
-use  TrigConfL1Data             TrigConfL1Data-*                Trigger/TrigConfiguration
-use  TrigConfInterfaces         TrigConfInterfaces-*            Trigger/TrigConfiguration
-use  CTPfragment                v*
-
-private
-use  AthenaKernel               AthenaKernel-*                  Control
-use  AtlasCLHEP                 AtlasCLHEP-*                    External
-use  EventInfo                  EventInfo-*                     Event
-use  AtlasBoost                 AtlasBoost-*                    External
-use  AtlasROOT                  AtlasROOT-*                     External
-use  L1TopoConfig               L1TopoConfig-*                  Trigger/TrigT1/L1Topo
-use  PathResolver               PathResolver-*                  Tools
-use  AthenaPoolUtilities        AthenaPoolUtilities-*           Database/AthenaPOOL
-use  TrigConfStorage            TrigConfStorage-*               Trigger/TrigConfiguration
-use  TrigT1Interfaces           TrigT1Interfaces-*              Trigger/TrigT1
-use  TrigT1Result               TrigT1Result-*                  Trigger/TrigT1
-use  AthenaMonitoring           AthenaMonitoring-*              Control
-
-
-private
-
-library TrigT1CTP *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern generic_declare_for_link kind=data files="-s=../data *.cfg" prefix=share/TrigT1CTP
-
diff --git a/Trigger/TrigT1/TrigT1CTP/doc/packagedoc.h b/Trigger/TrigT1/TrigT1CTP/doc/packagedoc.h
index 8c8b857ca60f48d215192df683f7068ca8c9f30e..95c2e65b7136a161862e4b090e890befb789fd13 100644
--- a/Trigger/TrigT1/TrigT1CTP/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1CTP/doc/packagedoc.h
@@ -52,14 +52,4 @@ triggers are simulated: random trigger, prescaled clock trigger and bunch group
 
 @section TrigT1CTP_TrigT1CTP Extra Pages
 
-- @ref used_TrigT1CTP
-- @ref requirements_TrigT1CTP
-*/
-
-/**
-   @page used_TrigT1CTP Used Packages
-*/
-
-/**
-   @page requirements_TrigT1CTP Requirements
 */
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/cmt/requirements b/Trigger/TrigT1/TrigT1CaloByteStream/cmt/requirements
deleted file mode 100755
index 0a17aeadb3199aa61ee7531672199fff2e915e8f..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloByteStream/cmt/requirements
+++ /dev/null
@@ -1,47 +0,0 @@
-package TrigT1CaloByteStream
-
-use AtlasPolicy          AtlasPolicy-*
-use DataModel            DataModel-*            Control
-use GaudiInterface       GaudiInterface-*       External
-
-author Alexander Mazurov <alexander.mazurov@cern.ch>
-author Peter Faulkner <P.J.W.Faulkner@bham.ac.uk>
-
-apply_pattern cmake_add_command command="find_package(tdaq-common COMPONENTS eformat_write)"
-
-# use this line to exclude test algorithms
-library TrigT1CaloByteStream *.cxx xaod/*.cxx components/*.cxx
-# use this line to include test algorithms
-#library TrigT1CaloByteStream  ../test/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-
-use DataCollection       DataCollection-*       External
-use AsgTools             AsgTools-*             Control/AthToolSupport
-use xAODTrigL1Calo       xAODTrigL1Calo-*       Event/xAOD
-
-private
-use AthenaBaseComps      AthenaBaseComps-*      Control
-use AthenaKernel         AthenaKernel-*         Control
-use AthContainers        AthContainers-*        Control
-use ByteStreamCnvSvcBase ByteStreamCnvSvcBase-* Event 
-use ByteStreamData       ByteStreamData-*       Event
-use StoreGate            StoreGate-*            Control
-use SGTools              SGTools-*              Control
-use EventInfo            EventInfo-*            Event
-use TrigT1CaloEvent      TrigT1CaloEvent-*      Trigger/TrigT1
-use TrigT1CaloUtils      TrigT1CaloUtils-*      Trigger/TrigT1
-use TrigT1CaloMappingToolInterfaces TrigT1CaloMappingToolInterfaces-* Trigger/TrigT1
-use ZdcByteStream	 ZdcByteStream-*	ForwardDetectors/ZDC/ZdcCnv
-
-use TrigT1Interfaces     TrigT1Interfaces-*     Trigger/TrigT1
-
-# Only needed for test algorithms
-use TrigT1Interfaces     TrigT1Interfaces-*     Trigger/TrigT1
-#use StoreGate            StoreGate-*            Control
-
-use AtlasReflex  AtlasReflex-*  External -no_auto_imports
-apply_pattern lcgdict dict=TrigT1CaloByteStream selectionfile=selection.xml headerfiles="../TrigT1CaloByteStream/TrigT1CaloByteStreamDict.h"
-  
-macro_append DOXYGEN_FILE_PATTERNS    " *.icc"
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/doc/packagedoc.h b/Trigger/TrigT1/TrigT1CaloByteStream/doc/packagedoc.h
index 47bf58a0a3416cffdeb94a09e2b40bc6eb1f8b44..635254911d330ddc8c6a80b53fdbdd8a3d6d0586 100644
--- a/Trigger/TrigT1/TrigT1CaloByteStream/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/doc/packagedoc.h
@@ -31,17 +31,5 @@ Implemented so far: PPM, CPM, JEM, CMM-CP, CMM-Jet, CMM-Energy DAQ;
 
 @author Peter Faulkner
 
-@ref used_TrigT1CaloByteStream
-@ref requirements_TrigT1CaloByteStream
 
 */
-
-/**
-@page used_TrigT1CaloByteStream Used Packages
-*/
-
-/**
-@page requirements_TrigT1CaloByteStream Requirements
-*/
-
-
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamTool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamTool.cxx
index 26e0d84203624ed855529bf71f5c3e61e89ec13c..73bcb78f9632e6c3485a27ef207ddcb552a9043e 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamTool.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamTool.cxx
@@ -141,9 +141,8 @@ StatusCode CpByteStreamTool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::CPMTower>* const ttCollection)
 {
-  m_ttCollection = ttCollection;
-  m_ttMap.clear();
-  return convertBs(robFrags, CPM_TOWERS);
+  CpmTowerData data (ttCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CPM hits
@@ -152,9 +151,8 @@ StatusCode CpByteStreamTool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::CPMHits>* const hitCollection)
 {
-  m_hitCollection = hitCollection;
-  m_hitsMap.clear();
-  return convertBs(robFrags, CPM_HITS);
+  CpmHitsData data (hitCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMM-CP hits
@@ -163,9 +161,8 @@ StatusCode CpByteStreamTool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::CMMCPHits>* const hitCollection)
 {
-  m_cmmHitCollection = hitCollection;
-  m_cmmHitsMap.clear();
-  return convertBs(robFrags, CMM_CP_HITS);
+  CmmHitsData data (hitCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion of CP container to bytestream
@@ -471,7 +468,7 @@ const std::vector<uint32_t>& CpByteStreamTool::sourceIDs(
 
 StatusCode CpByteStreamTool::convertBs(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
-                            const CollectionType collection)
+                            CpByteStreamToolData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -599,8 +596,8 @@ StatusCode CpByteStreamTool::convertBs(
 	    m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
 	    break;
           }
-	  if (collection == CMM_CP_HITS) {
-	    decodeCmmCp(m_cmmCpSubBlock, trigCmm);
+	  if (data.m_collection == CMM_CP_HITS) {
+	    decodeCmmCp(m_cmmCpSubBlock, trigCmm, static_cast<CmmHitsData&>(data));
 	    if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
 	      if (debug) msg() << "decodeCmmCp failed" << endmsg;
 	      break;
@@ -622,8 +619,8 @@ StatusCode CpByteStreamTool::convertBs(
 	  m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
 	  break;
         }
-	if (collection == CPM_TOWERS || collection == CPM_HITS) {
-	  decodeCpm(m_cpmSubBlock, trigCpm, collection);
+	if (data.m_collection == CPM_TOWERS || data.m_collection == CPM_HITS) {
+	  decodeCpm(m_cpmSubBlock, trigCpm, data);
 	  if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
 	    if (debug) msg() << "decodeCpm failed" << endmsg;
 	    break;
@@ -640,7 +637,8 @@ StatusCode CpByteStreamTool::convertBs(
 
 // Unpack CMM-CP sub-block
 
-void CpByteStreamTool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm)
+void CpByteStreamTool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm,
+                                   CmmHitsData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -727,7 +725,7 @@ void CpByteStreamTool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm)
       errorBits.set(LVL1::DataError::SubStatusWord, subStatus);
       err = errorBits.error();
       if (hits || err) {
-        LVL1::CMMCPHits* ch = findCmmCpHits(crate, dataID);
+        LVL1::CMMCPHits* ch = findCmmCpHits(data, crate, dataID);
 	if ( ! ch ) {   // create new CMM hits
 	  m_hitsVec0.assign(timeslices, 0);
 	  m_hitsVec1.assign(timeslices, 0);
@@ -740,11 +738,12 @@ void CpByteStreamTool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm)
 	    m_hitsVec1[slice] = hits;
 	    m_errVec1[slice]  = err;
 	  }
-	  ch = new LVL1::CMMCPHits(swCrate, dataID, m_hitsVec0, m_hitsVec1,
-	                                    m_errVec0, m_errVec1, trigCmm);
+          auto chp =
+            std::make_unique<LVL1::CMMCPHits>(swCrate, dataID, m_hitsVec0, m_hitsVec1,
+                                              m_errVec0, m_errVec1, trigCmm);
           const int key = crate*100 + dataID;
-	  m_cmmHitsMap.insert(std::make_pair(key, ch));
-	  m_cmmHitCollection->push_back(ch);
+	  data.m_cmmHitsMap.insert(std::make_pair(key, chp.get()));
+	  data.m_cmmHitCollection->push_back(std::move(chp));
         } else {
 	  m_hitsVec0 = ch->HitsVec0();
 	  m_hitsVec1 = ch->HitsVec1();
@@ -783,7 +782,7 @@ void CpByteStreamTool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm)
 // Unpack CPM sub-block
 
 void CpByteStreamTool::decodeCpm(CpmSubBlock* subBlock,
-                                 int trigCpm, const CollectionType collection)
+                                 int trigCpm, CpByteStreamToolData& data)
 {
   const bool debug   = msgLvl(MSG::DEBUG);
   const bool verbose = msgLvl(MSG::VERBOSE);
@@ -839,7 +838,8 @@ void CpByteStreamTool::decodeCpm(CpmSubBlock* subBlock,
   const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
   for (int slice = sliceBeg; slice < sliceEnd; ++slice) {
 
-    if (collection == CPM_TOWERS) {
+    if (data.m_collection == CPM_TOWERS) {
+      CpmTowerData& tdata = static_cast<CpmTowerData&> (data);
 
       // Loop over tower channels and fill CPM towers
 
@@ -870,7 +870,7 @@ void CpByteStreamTool::decodeCpm(CpmSubBlock* subBlock,
 	  if (m_cpmMaps->mapping(crate, module, chan, eta, phi, layer)) {
 	    if (layer == m_coreOverlap) {
 	      const unsigned int key = m_towerKey->ttKey(phi, eta);
-	      LVL1::CPMTower* tt = findCpmTower(key);
+	      LVL1::CPMTower* tt = findCpmTower(tdata, key);
 	      if ( ! tt ) {   // create new CPM tower
 	        m_emVec.assign(timeslices, 0);
 	        m_hadVec.assign(timeslices, 0);
@@ -880,10 +880,11 @@ void CpByteStreamTool::decodeCpm(CpmSubBlock* subBlock,
 	        m_hadVec[slice]    = had;
 	        m_emErrVec[slice]  = emErr1;
 	        m_hadErrVec[slice] = hadErr1;
-	        tt = new LVL1::CPMTower(phi, eta, m_emVec, m_emErrVec,
-	                                          m_hadVec, m_hadErrVec, trigCpm);
-	        m_ttMap.insert(std::make_pair(key, tt));
-	        m_ttCollection->push_back(tt);
+                auto ttp = 
+                  std::make_unique<LVL1::CPMTower>(phi, eta, m_emVec, m_emErrVec,
+                                                   m_hadVec, m_hadErrVec, trigCpm);
+	        tdata.m_ttMap.insert(std::make_pair(key, ttp.get()));
+	        tdata.m_ttCollection->push_back(std::move(ttp));
               } else {
 	        m_emVec     = tt->emEnergyVec();
 	        m_hadVec    = tt->hadEnergyVec();
@@ -923,22 +924,24 @@ void CpByteStreamTool::decodeCpm(CpmSubBlock* subBlock,
 	  msg(MSG::DEBUG);
         }
       }
-    } else if (collection == CPM_HITS) {
+    } else if (data.m_collection == CPM_HITS) {
+      CpmHitsData& hdata = static_cast<CpmHitsData&> (data);
 
       // Get CPM hits
 
       const unsigned int hits0 = subBlock->hits0(slice);
       const unsigned int hits1 = subBlock->hits1(slice);
       if (hits0 || hits1) {
-        LVL1::CPMHits* ch = findCpmHits(crate, module);
+        LVL1::CPMHits* ch = findCpmHits(hdata, crate, module);
 	if ( ! ch ) {   // create new CPM hits
 	  m_hitsVec0.assign(timeslices, 0);
 	  m_hitsVec1.assign(timeslices, 0);
 	  m_hitsVec0[slice] = hits0;
 	  m_hitsVec1[slice] = hits1;
-	  ch = new LVL1::CPMHits(swCrate, module, m_hitsVec0, m_hitsVec1, trigCpm);
-	  m_hitsMap.insert(std::make_pair(crate*m_modules+module-1, ch));
-	  m_hitCollection->push_back(ch);
+          auto chp = 
+            std::make_unique<LVL1::CPMHits>(swCrate, module, m_hitsVec0, m_hitsVec1, trigCpm);
+	  hdata.m_hitsMap.insert(std::make_pair(crate*m_modules+module-1, chp.get()));
+	  hdata.m_hitCollection->push_back(std::move(chp));
         } else {
 	  m_hitsVec0 = ch->HitsVec0();
 	  m_hitsVec1 = ch->HitsVec1();
@@ -971,36 +974,60 @@ void CpByteStreamTool::decodeCpm(CpmSubBlock* subBlock,
 
 // Find a CPM tower for given key
 
-LVL1::CPMTower* CpByteStreamTool::findCpmTower(const unsigned int key)
+const
+LVL1::CPMTower* CpByteStreamTool::findCpmTower(const unsigned int key) const
+{
+  ConstCpmTowerMap::const_iterator mapIter = m_ttMap.find(key);
+  if (mapIter != m_ttMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CPMTower* CpByteStreamTool::findCpmTower(const CpmTowerData& data,
+                                               const unsigned int key) const
 {
-  LVL1::CPMTower* tt = 0;
-  CpmTowerMap::const_iterator mapIter;
-  mapIter = m_ttMap.find(key);
-  if (mapIter != m_ttMap.end()) tt = mapIter->second;
-  return tt;
+  CpmTowerMap::const_iterator mapIter = data.m_ttMap.find(key);
+  if (mapIter != data.m_ttMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CPM hits for given crate, module
 
-LVL1::CPMHits* CpByteStreamTool::findCpmHits(const int crate, const int module)
+const
+LVL1::CPMHits* CpByteStreamTool::findCpmHits(const int crate, const int module) const
 {
-  LVL1::CPMHits* hits = 0;
-  CpmHitsMap::const_iterator mapIter;
-  mapIter = m_hitsMap.find(crate*m_modules + module - 1);
-  if (mapIter != m_hitsMap.end()) hits = mapIter->second;
-  return hits;
+  ConstCpmHitsMap::const_iterator mapIter =
+    m_hitsMap.find(crate*m_modules + module - 1);
+  if (mapIter != m_hitsMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CPMHits* CpByteStreamTool::findCpmHits(const CpmHitsData& data,
+                                             const int crate, const int module) const
+{
+  CpmHitsMap::const_iterator mapIter =
+    data.m_hitsMap.find(crate*m_modules + module - 1);
+  if (mapIter != data.m_hitsMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CMM-CP hits for given crate, dataID
 
+const
 LVL1::CMMCPHits* CpByteStreamTool::findCmmCpHits(const int crate,
-                                                 const int dataID)
+                                                 const int dataID) const
+{
+  ConstCmmCpHitsMap::const_iterator mapIter = m_cmmHitsMap.find(crate*100 + dataID);
+  if (mapIter != m_cmmHitsMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CMMCPHits* CpByteStreamTool::findCmmCpHits(const CmmHitsData& data,
+                                                 const int crate,
+                                                 const int dataID) const
 {
-  LVL1::CMMCPHits* hits = 0;
-  CmmCpHitsMap::const_iterator mapIter;
-  mapIter = m_cmmHitsMap.find(crate*100 + dataID);
-  if (mapIter != m_cmmHitsMap.end()) hits = mapIter->second;
-  return hits;
+  CmmCpHitsMap::const_iterator mapIter = data.m_cmmHitsMap.find(crate*100 + dataID);
+  if (mapIter != data.m_cmmHitsMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Set up CPM tower map
@@ -1013,7 +1040,7 @@ void CpByteStreamTool::setupCpmTowerMap(const CpmTowerCollection*
     CpmTowerCollection::const_iterator pos  = ttCollection->begin();
     CpmTowerCollection::const_iterator pose = ttCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CPMTower* const tt = *pos;
+      const LVL1::CPMTower* const tt = *pos;
       const unsigned int key = m_towerKey->ttKey(tt->phi(), tt->eta());
       m_ttMap.insert(std::make_pair(key, tt));
     }
@@ -1030,7 +1057,7 @@ void CpByteStreamTool::setupCpmHitsMap(const CpmHitsCollection*
     CpmHitsCollection::const_iterator pos  = hitCollection->begin();
     CpmHitsCollection::const_iterator pose = hitCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CPMHits* const hits = *pos;
+      const LVL1::CPMHits* const hits = *pos;
       const int crate = hits->crate() - m_crateOffsetSw;
       const int key   = m_modules * crate + hits->module() - 1;
       m_hitsMap.insert(std::make_pair(key, hits));
@@ -1048,7 +1075,7 @@ void CpByteStreamTool::setupCmmCpHitsMap(const CmmCpHitsCollection*
     CmmCpHitsCollection::const_iterator pos  = hitCollection->begin();
     CmmCpHitsCollection::const_iterator pose = hitCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CMMCPHits* const hits = *pos;
+      const LVL1::CMMCPHits* const hits = *pos;
       const int crate = hits->crate() - m_crateOffsetSw;
       const int key   = crate*100 + hits->dataID();
       m_cmmHitsMap.insert(std::make_pair(key, hits));
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamTool.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamTool.h
index 11ce0ad1b9d4e94b181f7ff0d2767b0463990e51..7d1d1b9a5ab520d2ba3e508be40ac022b7ac3f64 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamTool.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamTool.h
@@ -85,26 +85,61 @@ class CpByteStreamTool : public AthAlgTool {
    typedef DataVector<LVL1::CPMHits>                     CpmHitsCollection;
    typedef DataVector<LVL1::CMMCPHits>                   CmmCpHitsCollection;
    typedef std::map<unsigned int, LVL1::CPMTower*>       CpmTowerMap;
+   typedef std::map<unsigned int, const LVL1::CPMTower*> ConstCpmTowerMap;
    typedef std::map<int, LVL1::CPMHits*>                 CpmHitsMap;
+   typedef std::map<int, const LVL1::CPMHits*>           ConstCpmHitsMap;
    typedef std::map<int, LVL1::CMMCPHits*>               CmmCpHitsMap;
+   typedef std::map<int, const LVL1::CMMCPHits*>         ConstCmmCpHitsMap;
    typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      ROBPointer;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      RODPointer;
 
+   struct CpByteStreamToolData
+   {
+     CpByteStreamToolData (const CollectionType collection)
+       : m_collection(collection){}
+     const CollectionType m_collection;
+   };
+   struct CpmTowerData : public CpByteStreamToolData
+   {
+     CpmTowerData (CpmTowerCollection* const ttCollection)
+       : CpByteStreamToolData (CPM_TOWERS), m_ttCollection (ttCollection) {}
+     CpmTowerCollection* const m_ttCollection;
+     CpmTowerMap  m_ttMap;
+   };
+   struct CpmHitsData : public CpByteStreamToolData
+   {
+     CpmHitsData (CpmHitsCollection* const hitCollection)
+       : CpByteStreamToolData (CPM_HITS), m_hitCollection (hitCollection) {}
+     CpmHitsCollection* const m_hitCollection;
+     CpmHitsMap   m_hitsMap;
+   };
+   struct CmmHitsData : public CpByteStreamToolData
+   {
+     CmmHitsData (CmmCpHitsCollection* const hitCollection)
+       : CpByteStreamToolData (CMM_CP_HITS), m_cmmHitCollection (hitCollection) {}
+     CmmCpHitsCollection* const m_cmmHitCollection;
+     CmmCpHitsMap m_cmmHitsMap;
+   };
+
    /// Convert bytestream to given container type
    StatusCode convertBs(const IROBDataProviderSvc::VROBFRAG& robFrags,
-                        CollectionType collection);
+                        CpByteStreamToolData& data);
    /// Unpack CMM-CP sub-block
-   void decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm);
+   void decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm, CmmHitsData& data);
    /// Unpack CPM sub-block
-   void decodeCpm(CpmSubBlock* subBlock, int trigCpm, CollectionType collection);
+   void decodeCpm(CpmSubBlock* subBlock, int trigCpm, CpByteStreamToolData& data);
 
    /// Find a CPM tower for given key
-   LVL1::CPMTower*  findCpmTower(unsigned int key);
+   const LVL1::CPMTower*  findCpmTower(unsigned int key) const;
+   LVL1::CPMTower*  findCpmTower(const CpmTowerData& data, unsigned int key) const;
    /// Find CPM hits for given crate, module
-   LVL1::CPMHits*   findCpmHits(int crate, int module);
+   const LVL1::CPMHits*   findCpmHits(int crate, int module) const;
+   LVL1::CPMHits*   findCpmHits(const CpmHitsData& data, int crate, int module) const;
    /// Find CMM-CP hits for given crate, data ID
-   LVL1::CMMCPHits* findCmmCpHits(int crate, int dataID);
+   const LVL1::CMMCPHits* findCmmCpHits(int crate, int dataID) const;
+   LVL1::CMMCPHits* findCmmCpHits(const CmmHitsData& data,
+                                  int crate, int dataID) const;
 
    /// Set up CPM tower map
    void setupCpmTowerMap(const CpmTowerCollection* ttCollection);
@@ -180,18 +215,12 @@ class CpByteStreamTool : public AthAlgTool {
    DataVector<CmmCpSubBlock> m_cmmHit0Blocks;
    /// Vector for current CMM-CP hit1 sub-blocks
    DataVector<CmmCpSubBlock> m_cmmHit1Blocks;
-   /// Current CPM tower collection
-   CpmTowerCollection*  m_ttCollection;
-   /// Current CPM hits collection
-   CpmHitsCollection*   m_hitCollection;
-   /// Current CMM-CP hits collection
-   CmmCpHitsCollection* m_cmmHitCollection;
    /// CPM tower map
-   CpmTowerMap  m_ttMap;
+   ConstCpmTowerMap  m_ttMap;
    /// CPM hits map
-   CpmHitsMap   m_hitsMap;
+   ConstCpmHitsMap   m_hitsMap;
    /// CMM-CP hits map
-   CmmCpHitsMap m_cmmHitsMap;
+   ConstCmmCpHitsMap m_cmmHitsMap;
    /// ROD Status words
    std::vector<uint32_t>* m_rodStatus;
    /// ROD status map
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Tool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Tool.cxx
index fba80862490c6c1797c9319f08a7f7719f137578..72f6127c1af30a1938e038add25cc6e8a5f7eef5 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Tool.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Tool.cxx
@@ -147,9 +147,8 @@ StatusCode CpByteStreamV1Tool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::CPMTower>* const ttCollection)
 {
-  m_ttCollection = ttCollection;
-  m_ttMap.clear();
-  return convertBs(robFrags, CPM_TOWERS);
+  CpmTowerData data (ttCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CPM hits
@@ -158,9 +157,8 @@ StatusCode CpByteStreamV1Tool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::CPMHits>* const hitCollection)
 {
-  m_hitCollection = hitCollection;
-  m_hitsMap.clear();
-  return convertBs(robFrags, CPM_HITS);
+  CpmHitsData data (hitCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMM-CP hits
@@ -169,9 +167,8 @@ StatusCode CpByteStreamV1Tool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::CMMCPHits>* const hitCollection)
 {
-  m_cmmHitCollection = hitCollection;
-  m_cmmHitsMap.clear();
-  return convertBs(robFrags, CMM_CP_HITS);
+  CmmHitsData data (hitCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion of CP container to bytestream
@@ -477,7 +474,7 @@ const std::vector<uint32_t>& CpByteStreamV1Tool::sourceIDs(
 
 StatusCode CpByteStreamV1Tool::convertBs(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
-                            const CollectionType collection)
+                            CpByteStreamToolData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -615,8 +612,8 @@ StatusCode CpByteStreamV1Tool::convertBs(
 	    m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
 	    break;
           }
-	  if (collection == CMM_CP_HITS) {
-	    decodeCmmCp(m_cmmCpSubBlock, trigCmm);
+	  if (data.m_collection == CMM_CP_HITS) {
+	    decodeCmmCp(m_cmmCpSubBlock, trigCmm, static_cast<CmmHitsData&>(data));
 	    if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
 	      if (debug) msg() << "decodeCmmCp failed" << endmsg;
 	      break;
@@ -637,8 +634,8 @@ StatusCode CpByteStreamV1Tool::convertBs(
 	  m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
 	  break;
         }
-	if (collection == CPM_TOWERS || collection == CPM_HITS) {
-	  decodeCpm(m_cpmSubBlock, trigCpm, collection);
+	if (data.m_collection == CPM_TOWERS || data.m_collection == CPM_HITS) {
+	  decodeCpm(m_cpmSubBlock, trigCpm, data);
 	  if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
 	    if (debug) msg() << "decodeCpm failed" << endmsg;
 	    break;
@@ -655,7 +652,8 @@ StatusCode CpByteStreamV1Tool::convertBs(
 
 // Unpack CMM-CP sub-block
 
-void CpByteStreamV1Tool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm)
+void CpByteStreamV1Tool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm,
+                                     CmmHitsData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -742,7 +740,7 @@ void CpByteStreamV1Tool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm)
       errorBits.set(LVL1::DataError::SubStatusWord, subStatus);
       err = errorBits.error();
       if (hits || err) {
-        LVL1::CMMCPHits* ch = findCmmCpHits(crate, dataID);
+        LVL1::CMMCPHits* ch = findCmmCpHits(data, crate, dataID);
 	if ( ! ch ) {   // create new CMM hits
 	  m_hitsVec0.assign(timeslices, 0);
 	  m_hitsVec1.assign(timeslices, 0);
@@ -755,11 +753,12 @@ void CpByteStreamV1Tool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm)
 	    m_hitsVec1[slice] = hits;
 	    m_errVec1[slice]  = err;
 	  }
-	  ch = new LVL1::CMMCPHits(swCrate, dataID, m_hitsVec0, m_hitsVec1,
-	                                    m_errVec0, m_errVec1, trigCmm);
+	  auto chp =
+            std::make_unique<LVL1::CMMCPHits>(swCrate, dataID, m_hitsVec0, m_hitsVec1,
+                                              m_errVec0, m_errVec1, trigCmm);
           const int key = crate*100 + dataID;
-	  m_cmmHitsMap.insert(std::make_pair(key, ch));
-	  m_cmmHitCollection->push_back(ch);
+	  data.m_cmmHitsMap.insert(std::make_pair(key, chp.get()));
+	  data.m_cmmHitCollection->push_back(std::move(chp));
         } else {
 	  m_hitsVec0 = ch->HitsVec0();
 	  m_hitsVec1 = ch->HitsVec1();
@@ -798,7 +797,7 @@ void CpByteStreamV1Tool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm)
 // Unpack CPM sub-block
 
 void CpByteStreamV1Tool::decodeCpm(CpmSubBlockV1* subBlock,
-                                   int trigCpm, const CollectionType collection)
+                                   int trigCpm, CpByteStreamToolData& data)
 {
   const bool debug   = msgLvl(MSG::DEBUG);
   const bool verbose = msgLvl(MSG::VERBOSE);
@@ -854,7 +853,8 @@ void CpByteStreamV1Tool::decodeCpm(CpmSubBlockV1* subBlock,
   const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
   for (int slice = sliceBeg; slice < sliceEnd; ++slice) {
 
-    if (collection == CPM_TOWERS) {
+    if (data.m_collection == CPM_TOWERS) {
+      CpmTowerData& tdata = static_cast<CpmTowerData&> (data);
 
       // Loop over tower channels and fill CPM towers
 
@@ -885,7 +885,7 @@ void CpByteStreamV1Tool::decodeCpm(CpmSubBlockV1* subBlock,
 	  if (m_cpmMaps->mapping(crate, module, chan, eta, phi, layer)) {
 	    if (layer == m_coreOverlap) {
 	      const unsigned int key = m_towerKey->ttKey(phi, eta);
-	      LVL1::CPMTower* tt = findCpmTower(key);
+	      LVL1::CPMTower* tt = findCpmTower(tdata, key);
 	      if ( ! tt ) {   // create new CPM tower
 	        m_emVec.assign(timeslices, 0);
 	        m_hadVec.assign(timeslices, 0);
@@ -895,10 +895,11 @@ void CpByteStreamV1Tool::decodeCpm(CpmSubBlockV1* subBlock,
 	        m_hadVec[slice]    = had;
 	        m_emErrVec[slice]  = emErr1;
 	        m_hadErrVec[slice] = hadErr1;
-	        tt = new LVL1::CPMTower(phi, eta, m_emVec, m_emErrVec,
-	                                          m_hadVec, m_hadErrVec, trigCpm);
-	        m_ttMap.insert(std::make_pair(key, tt));
-	        m_ttCollection->push_back(tt);
+	        auto ttp =
+                  std::make_unique<LVL1::CPMTower>(phi, eta, m_emVec, m_emErrVec,
+                                                   m_hadVec, m_hadErrVec, trigCpm);
+	        tdata.m_ttMap.insert(std::make_pair(key, ttp.get()));
+                tdata.m_ttCollection->push_back(std::move(ttp));
               } else {
 	        m_emVec     = tt->emEnergyVec();
 	        m_hadVec    = tt->hadEnergyVec();
@@ -938,22 +939,24 @@ void CpByteStreamV1Tool::decodeCpm(CpmSubBlockV1* subBlock,
 	  msg(MSG::DEBUG);
         }
       }
-    } else if (collection == CPM_HITS) {
+    } else if (data.m_collection == CPM_HITS) {
+      CpmHitsData& hdata = static_cast<CpmHitsData&> (data);
 
       // Get CPM hits
 
       const unsigned int hits0 = subBlock->hits0(slice);
       const unsigned int hits1 = subBlock->hits1(slice);
       if (hits0 || hits1) {
-        LVL1::CPMHits* ch = findCpmHits(crate, module);
+        LVL1::CPMHits* ch = findCpmHits(hdata, crate, module);
 	if ( ! ch ) {   // create new CPM hits
 	  m_hitsVec0.assign(timeslices, 0);
 	  m_hitsVec1.assign(timeslices, 0);
 	  m_hitsVec0[slice] = hits0;
 	  m_hitsVec1[slice] = hits1;
-	  ch = new LVL1::CPMHits(swCrate, module, m_hitsVec0, m_hitsVec1, trigCpm);
-	  m_hitsMap.insert(std::make_pair(crate*m_modules+module-1, ch));
-	  m_hitCollection->push_back(ch);
+	  auto chp =
+            std::make_unique<LVL1::CPMHits>(swCrate, module, m_hitsVec0, m_hitsVec1, trigCpm);
+	  hdata.m_hitsMap.insert(std::make_pair(crate*m_modules+module-1, chp.get()));
+	  hdata.m_hitCollection->push_back(std::move(chp));
         } else {
 	  m_hitsVec0 = ch->HitsVec0();
 	  m_hitsVec1 = ch->HitsVec1();
@@ -986,36 +989,60 @@ void CpByteStreamV1Tool::decodeCpm(CpmSubBlockV1* subBlock,
 
 // Find a CPM tower for given key
 
-LVL1::CPMTower* CpByteStreamV1Tool::findCpmTower(const unsigned int key)
+const
+LVL1::CPMTower* CpByteStreamV1Tool::findCpmTower(const unsigned int key) const
+{
+  ConstCpmTowerMap::const_iterator mapIter = m_ttMap.find(key);
+  if (mapIter != m_ttMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CPMTower* CpByteStreamV1Tool::findCpmTower(const CpmTowerData& data,
+                                               const unsigned int key) const
 {
-  LVL1::CPMTower* tt = 0;
-  CpmTowerMap::const_iterator mapIter;
-  mapIter = m_ttMap.find(key);
-  if (mapIter != m_ttMap.end()) tt = mapIter->second;
-  return tt;
+  CpmTowerMap::const_iterator mapIter = data.m_ttMap.find(key);
+  if (mapIter != data.m_ttMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CPM hits for given crate, module
 
-LVL1::CPMHits* CpByteStreamV1Tool::findCpmHits(const int crate, const int module)
+const
+LVL1::CPMHits* CpByteStreamV1Tool::findCpmHits(const int crate, const int module) const
 {
-  LVL1::CPMHits* hits = 0;
-  CpmHitsMap::const_iterator mapIter;
-  mapIter = m_hitsMap.find(crate*m_modules + module - 1);
-  if (mapIter != m_hitsMap.end()) hits = mapIter->second;
-  return hits;
+  ConstCpmHitsMap::const_iterator mapIter =
+    m_hitsMap.find(crate*m_modules + module - 1);
+  if (mapIter != m_hitsMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CPMHits* CpByteStreamV1Tool::findCpmHits(const CpmHitsData& data,
+                                             const int crate, const int module) const
+{
+  CpmHitsMap::const_iterator mapIter =
+    data.m_hitsMap.find(crate*m_modules + module - 1);
+  if (mapIter != data.m_hitsMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CMM-CP hits for given crate, dataID
 
+const
 LVL1::CMMCPHits* CpByteStreamV1Tool::findCmmCpHits(const int crate,
-                                                   const int dataID)
+                                                 const int dataID) const
+{
+  ConstCmmCpHitsMap::const_iterator mapIter = m_cmmHitsMap.find(crate*100 + dataID);
+  if (mapIter != m_cmmHitsMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CMMCPHits* CpByteStreamV1Tool::findCmmCpHits(const CmmHitsData& data,
+                                                 const int crate,
+                                                 const int dataID) const
 {
-  LVL1::CMMCPHits* hits = 0;
-  CmmCpHitsMap::const_iterator mapIter;
-  mapIter = m_cmmHitsMap.find(crate*100 + dataID);
-  if (mapIter != m_cmmHitsMap.end()) hits = mapIter->second;
-  return hits;
+  CmmCpHitsMap::const_iterator mapIter = data.m_cmmHitsMap.find(crate*100 + dataID);
+  if (mapIter != data.m_cmmHitsMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Set up CPM tower map
@@ -1028,7 +1055,7 @@ void CpByteStreamV1Tool::setupCpmTowerMap(const CpmTowerCollection*
     CpmTowerCollection::const_iterator pos  = ttCollection->begin();
     CpmTowerCollection::const_iterator pose = ttCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CPMTower* const tt = *pos;
+      const LVL1::CPMTower* const tt = *pos;
       const unsigned int key = m_towerKey->ttKey(tt->phi(), tt->eta());
       m_ttMap.insert(std::make_pair(key, tt));
     }
@@ -1045,7 +1072,7 @@ void CpByteStreamV1Tool::setupCpmHitsMap(const CpmHitsCollection*
     CpmHitsCollection::const_iterator pos  = hitCollection->begin();
     CpmHitsCollection::const_iterator pose = hitCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CPMHits* const hits = *pos;
+      const LVL1::CPMHits* const hits = *pos;
       const int crate = hits->crate() - m_crateOffsetSw;
       const int key   = m_modules * crate + hits->module() - 1;
       m_hitsMap.insert(std::make_pair(key, hits));
@@ -1063,7 +1090,7 @@ void CpByteStreamV1Tool::setupCmmCpHitsMap(const CmmCpHitsCollection*
     CmmCpHitsCollection::const_iterator pos  = hitCollection->begin();
     CmmCpHitsCollection::const_iterator pose = hitCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CMMCPHits* const hits = *pos;
+      const LVL1::CMMCPHits* const hits = *pos;
       const int crate = hits->crate() - m_crateOffsetSw;
       const int key   = crate*100 + hits->dataID();
       m_cmmHitsMap.insert(std::make_pair(key, hits));
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Tool.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Tool.h
index f1653634171e9808c66f199dcccfb2ce552232b6..905be01d1afbb1c345ab9938d98e34662ef0c58b 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Tool.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV1Tool.h
@@ -84,27 +84,62 @@ class CpByteStreamV1Tool : public AthAlgTool {
    typedef DataVector<LVL1::CPMTower>                    CpmTowerCollection;
    typedef DataVector<LVL1::CPMHits>                     CpmHitsCollection;
    typedef DataVector<LVL1::CMMCPHits>                   CmmCpHitsCollection;
+   typedef std::map<unsigned int, const LVL1::CPMTower*> ConstCpmTowerMap;
    typedef std::map<unsigned int, LVL1::CPMTower*>       CpmTowerMap;
+   typedef std::map<int, const LVL1::CPMHits*>           ConstCpmHitsMap;
    typedef std::map<int, LVL1::CPMHits*>                 CpmHitsMap;
+   typedef std::map<int, const LVL1::CMMCPHits*>         ConstCmmCpHitsMap;
    typedef std::map<int, LVL1::CMMCPHits*>               CmmCpHitsMap;
    typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      ROBPointer;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      RODPointer;
 
+   struct CpByteStreamToolData
+   {
+     CpByteStreamToolData (const CollectionType collection)
+       : m_collection(collection){}
+     const CollectionType m_collection;
+   };
+   struct CpmTowerData : public CpByteStreamToolData
+   {
+     CpmTowerData (CpmTowerCollection* const ttCollection)
+       : CpByteStreamToolData (CPM_TOWERS), m_ttCollection (ttCollection) {}
+     CpmTowerCollection* const m_ttCollection;
+     CpmTowerMap  m_ttMap;
+   };
+   struct CpmHitsData : public CpByteStreamToolData
+   {
+     CpmHitsData (CpmHitsCollection* const hitCollection)
+       : CpByteStreamToolData (CPM_HITS), m_hitCollection (hitCollection) {}
+     CpmHitsCollection* const m_hitCollection;
+     CpmHitsMap   m_hitsMap;
+   };
+   struct CmmHitsData : public CpByteStreamToolData
+   {
+     CmmHitsData (CmmCpHitsCollection* const hitCollection)
+       : CpByteStreamToolData (CMM_CP_HITS), m_cmmHitCollection (hitCollection) {}
+     CmmCpHitsCollection* const m_cmmHitCollection;
+     CmmCpHitsMap m_cmmHitsMap;
+   };
+
    /// Convert bytestream to given container type
    StatusCode convertBs(const IROBDataProviderSvc::VROBFRAG& robFrags,
-                        CollectionType collection);
+                        CpByteStreamToolData& data);
    /// Unpack CMM-CP sub-block
-   void decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm);
+   void decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm, CmmHitsData& data);
    /// Unpack CPM sub-block
-   void decodeCpm(CpmSubBlockV1* subBlock, int trigCpm, CollectionType collection);
+   void decodeCpm(CpmSubBlockV1* subBlock, int trigCpm, CpByteStreamToolData& data);
 
    /// Find a CPM tower for given key
-   LVL1::CPMTower*  findCpmTower(unsigned int key);
+   const LVL1::CPMTower*  findCpmTower(unsigned int key) const;
+   LVL1::CPMTower*  findCpmTower(const CpmTowerData& data, unsigned int key) const;
    /// Find CPM hits for given crate, module
-   LVL1::CPMHits*   findCpmHits(int crate, int module);
+   const LVL1::CPMHits*   findCpmHits(int crate, int module) const;
+   LVL1::CPMHits*   findCpmHits(const CpmHitsData& data, int crate, int module) const;
    /// Find CMM-CP hits for given crate, data ID
-   LVL1::CMMCPHits* findCmmCpHits(int crate, int dataID);
+   const LVL1::CMMCPHits* findCmmCpHits(int crate, int dataID) const;
+   LVL1::CMMCPHits* findCmmCpHits(const CmmHitsData& data,
+                                  int crate, int dataID) const;
 
    /// Set up CPM tower map
    void setupCpmTowerMap(const CpmTowerCollection* ttCollection);
@@ -184,18 +219,12 @@ class CpByteStreamV1Tool : public AthAlgTool {
    DataVector<CmmCpSubBlock> m_cmmHit0Blocks;
    /// Vector for current CMM-CP hit1 sub-blocks
    DataVector<CmmCpSubBlock> m_cmmHit1Blocks;
-   /// Current CPM tower collection
-   CpmTowerCollection*  m_ttCollection;
-   /// Current CPM hits collection
-   CpmHitsCollection*   m_hitCollection;
-   /// Current CMM-CP hits collection
-   CmmCpHitsCollection* m_cmmHitCollection;
    /// CPM tower map
-   CpmTowerMap  m_ttMap;
+   ConstCpmTowerMap  m_ttMap;
    /// CPM hits map
-   CpmHitsMap   m_hitsMap;
+   ConstCpmHitsMap   m_hitsMap;
    /// CMM-CP hits map
-   CmmCpHitsMap m_cmmHitsMap;
+   ConstCmmCpHitsMap m_cmmHitsMap;
    /// ROD Status words
    std::vector<uint32_t>* m_rodStatus;
    /// ROD status map
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.cxx
index 637202d9ca80ad1b4d0c457975a91b6b2ae68285..aa146ebe7e0fa4649bbae00a8cc6ef0a7703ed73 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.cxx
@@ -154,9 +154,8 @@ StatusCode CpByteStreamV2Tool::convert(
     const IROBDataProviderSvc::VROBFRAG &robFrags,
     DataVector<LVL1::CPMTower> *const ttCollection)
 {
-    m_ttCollection = ttCollection;
-    m_ttMap.clear();
-    return convertBs(robFrags, CPM_TOWERS);
+    CpmTowerData data (ttCollection);
+    return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMX-CP TOBs
@@ -176,9 +175,8 @@ StatusCode CpByteStreamV2Tool::convert(
     const IROBDataProviderSvc::VROBFRAG &robFrags,
     DataVector<LVL1::CMXCPTob> *const tobCollection)
 {
-    m_tobCollection = tobCollection;
-    m_tobMap.clear();
-    return convertBs(robFrags, CMX_CP_TOBS);
+    CmxCpTobData data (tobCollection);
+    return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMX-CP hits
@@ -198,9 +196,8 @@ StatusCode CpByteStreamV2Tool::convert(
     const IROBDataProviderSvc::VROBFRAG &robFrags,
     DataVector<LVL1::CMXCPHits> *const hitCollection)
 {
-    m_hitCollection = hitCollection;
-    m_hitsMap.clear();
-    return convertBs(robFrags, CMX_CP_HITS);
+    CmxCpHitsData data (hitCollection);
+    return convertBs(robFrags, data);
 }
 
 // Conversion of CP container to bytestream
@@ -532,7 +529,7 @@ const std::vector<uint32_t> &CpByteStreamV2Tool::sourceIDs(
 
 StatusCode CpByteStreamV2Tool::convertBs(
     const IROBDataProviderSvc::VROBFRAG &robFrags,
-    const CollectionType collection)
+    CpByteStreamToolData& data)
 {
     const bool debug = msgLvl(MSG::DEBUG);
     if (debug) msg(MSG::DEBUG);
@@ -681,9 +678,9 @@ StatusCode CpByteStreamV2Tool::convertBs(
                         break;
                     }
 
-                    if (collection == CMX_CP_TOBS || collection == CMX_CP_HITS)
+                    if (data.m_collection == CMX_CP_TOBS || data.m_collection == CMX_CP_HITS)
                     {
-                        decodeCmxCp(m_cmxCpSubBlock, trigCpm, collection);
+                        decodeCmxCp(m_cmxCpSubBlock, trigCpm, data);
                         if (m_rodErr != L1CaloSubBlock::ERROR_NONE)
                         {
                             if (debug) msg() << "decodeCmxCp failed" << endmsg;
@@ -710,9 +707,9 @@ StatusCode CpByteStreamV2Tool::convertBs(
                     m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
                     break;
                 }
-                if (collection == CPM_TOWERS)
+                if (data.m_collection == CPM_TOWERS)
                 {
-                    decodeCpm(m_cpmSubBlock, trigCpm);
+                    decodeCpm(m_cpmSubBlock, trigCpm, static_cast<CpmTowerData&>(data));
                     if (m_rodErr != L1CaloSubBlock::ERROR_NONE)
                     {
                         if (debug) msg() << "decodeCpm failed" << endmsg;
@@ -732,7 +729,7 @@ StatusCode CpByteStreamV2Tool::convertBs(
 // Unpack CMX-CP sub-block
 
 void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm,
-                                     CollectionType collection)
+                                     CpByteStreamToolData& data)
 {
     const bool debug = msgLvl(MSG::DEBUG);
     if (debug) msg(MSG::DEBUG);
@@ -794,8 +791,9 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm,
     for (int slice = sliceBeg; slice < sliceEnd; ++slice)
     {
 
-        if (collection == CMX_CP_TOBS)
+        if (data.m_collection == CMX_CP_TOBS)
         {
+            CmxCpTobData& tdata = static_cast<CmxCpTobData&> (data);
 
             // TOBs
 
@@ -823,7 +821,7 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm,
                     }
                     error = errBits.error();
                     const int key = tobKey(crate, cmx, cpm, chip, loc);
-                    LVL1::CMXCPTob *tb = findCmxCpTob(key);
+                    LVL1::CMXCPTob *tb = findCmxCpTob(tdata, key);
                     if ( ! tb )   // create new CMX TOB
                     {
                         m_energyVec.assign(timeslices, 0);
@@ -834,11 +832,12 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm,
                         m_isolVec[slice]   = isolation;
                         m_errorVec[slice]  = error;
                         m_presenceMapVec[slice] = presenceMap;
-                        tb = new LVL1::CMXCPTob(swCrate, cmx, cpm, chip, loc,
-                                                m_energyVec, m_isolVec, m_errorVec,
-                                                m_presenceMapVec, trigCpm);
-                        m_tobMap.insert(std::make_pair(key, tb));
-                        m_tobCollection->push_back(tb);
+                        auto tbp =
+                          std::make_unique<LVL1::CMXCPTob>(swCrate, cmx, cpm, chip, loc,
+                                                           m_energyVec, m_isolVec, m_errorVec,
+                                                           m_presenceMapVec, trigCpm);
+                        tdata.m_tobMap.insert(std::make_pair(key, tbp.get()));
+                        tdata.m_tobCollection->push_back(std::move(tbp));
                     }
                     else
                     {
@@ -871,8 +870,9 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm,
             }
 
         }
-        else if (collection == CMX_CP_HITS)
+        else if (data.m_collection == CMX_CP_HITS)
         {
+            CmxCpHitsData& hdata = static_cast<CmxCpHitsData&> (data);
 
             // Hit/Topo counts
 
@@ -899,7 +899,7 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm,
                 if (hits0 || hits1 || err0 || err1)
                 {
                     const int key = hitsKey(crate, cmx, source);
-                    LVL1::CMXCPHits *ch = findCmxCpHits(key);
+                    LVL1::CMXCPHits *ch = findCmxCpHits(hdata, key);
                     if ( ! ch )     // create new CMX hits
                     {
                         m_hitsVec0.assign(timeslices, 0);
@@ -910,11 +910,12 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm,
                         m_hitsVec1[slice] = hits1;
                         m_errVec0[slice]  = err0;
                         m_errVec1[slice]  = err1;
-                        ch = new LVL1::CMXCPHits(swCrate, cmx, source,
-                                                 m_hitsVec0, m_hitsVec1,
-                                                 m_errVec0, m_errVec1, trigCpm);
-                        m_hitsMap.insert(std::make_pair(key, ch));
-                        m_hitCollection->push_back(ch);
+                        auto chp =
+                          std::make_unique<LVL1::CMXCPHits>(swCrate, cmx, source,
+                                                            m_hitsVec0, m_hitsVec1,
+                                                            m_errVec0, m_errVec1, trigCpm);
+                        hdata.m_hitsMap.insert(std::make_pair(key, chp.get()));
+                        hdata.m_hitCollection->push_back(std::move(chp));
                     }
                     else
                     {
@@ -953,7 +954,8 @@ void CpByteStreamV2Tool::decodeCmxCp(CmxCpSubBlock *subBlock, int trigCpm,
 
 // Unpack CPM sub-block
 
-void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm)
+void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm,
+                                   CpmTowerData& data)
 {
     const bool debug   = msgLvl(MSG::DEBUG);
     const bool verbose = msgLvl(MSG::VERBOSE);
@@ -1049,7 +1051,7 @@ void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm)
                     if (layer == m_coreOverlap)
                     {
                         const unsigned int key = m_towerKey->ttKey(phi, eta);
-                        LVL1::CPMTower *tt = findCpmTower(key);
+                        LVL1::CPMTower *tt = findCpmTower(data, key);
                         if ( ! tt )     // create new CPM tower
                         {
                             m_emVec.assign(timeslices, 0);
@@ -1060,10 +1062,11 @@ void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm)
                             m_hadVec[slice]    = had;
                             m_emErrVec[slice]  = emErr1;
                             m_hadErrVec[slice] = hadErr1;
-                            tt = new LVL1::CPMTower(phi, eta, m_emVec, m_emErrVec,
-                                                    m_hadVec, m_hadErrVec, trigCpm);
-                            m_ttMap.insert(std::make_pair(key, tt));
-                            m_ttCollection->push_back(tt);
+                            auto ttp =
+                              std::make_unique<LVL1::CPMTower>(phi, eta, m_emVec, m_emErrVec,
+                                                               m_hadVec, m_hadErrVec, trigCpm);
+                            data.m_ttMap.insert(std::make_pair(key, ttp.get()));
+                            data.m_ttCollection->push_back(std::move(ttp));
                         }
                         else
                         {
@@ -1118,35 +1121,56 @@ void CpByteStreamV2Tool::decodeCpm(CpmSubBlockV2 *subBlock, int trigCpm)
 
 // Find a CPM tower for given key
 
-LVL1::CPMTower *CpByteStreamV2Tool::findCpmTower(const unsigned int key)
+const
+LVL1::CPMTower *CpByteStreamV2Tool::findCpmTower(const unsigned int key) const
+{
+    ConstCpmTowerMap::const_iterator mapIter = m_ttMap.find(key);
+    if (mapIter != m_ttMap.end()) return mapIter->second;
+    return nullptr;
+}
+
+LVL1::CPMTower *CpByteStreamV2Tool::findCpmTower(const CpmTowerData& data,
+                                                 const unsigned int key) const
 {
-    LVL1::CPMTower *tt = 0;
-    CpmTowerMap::const_iterator mapIter;
-    mapIter = m_ttMap.find(key);
-    if (mapIter != m_ttMap.end()) tt = mapIter->second;
-    return tt;
+    CpmTowerMap::const_iterator mapIter = data.m_ttMap.find(key);
+    if (mapIter != data.m_ttMap.end()) return mapIter->second;
+    return nullptr;
 }
 
 // Find CMX-CP TOB for given key
 
-LVL1::CMXCPTob *CpByteStreamV2Tool::findCmxCpTob(const int key)
+const
+LVL1::CMXCPTob *CpByteStreamV2Tool::findCmxCpTob(const int key) const
 {
-    LVL1::CMXCPTob *tob = 0;
-    CmxCpTobMap::const_iterator mapIter;
-    mapIter = m_tobMap.find(key);
-    if (mapIter != m_tobMap.end()) tob = mapIter->second;
-    return tob;
+    ConstCmxCpTobMap::const_iterator mapIter = m_tobMap.find(key);
+    if (mapIter != m_tobMap.end()) return mapIter->second;
+    return nullptr;
+}
+
+LVL1::CMXCPTob *CpByteStreamV2Tool::findCmxCpTob(const CmxCpTobData& data,
+                                                 const int key) const
+{
+    CmxCpTobMap::const_iterator mapIter = data.m_tobMap.find(key);
+    if (mapIter != data.m_tobMap.end()) return mapIter->second;
+    return nullptr;
 }
 
 // Find CMX-CP hits for given key
 
-LVL1::CMXCPHits *CpByteStreamV2Tool::findCmxCpHits(const int key)
+const
+LVL1::CMXCPHits *CpByteStreamV2Tool::findCmxCpHits(const int key) const
+{
+    ConstCmxCpHitsMap::const_iterator mapIter = m_hitsMap.find(key);
+    if (mapIter != m_hitsMap.end()) return mapIter->second;
+    return nullptr;
+}
+
+LVL1::CMXCPHits *CpByteStreamV2Tool::findCmxCpHits(const CmxCpHitsData& data,
+                                                   const int key) const
 {
-    LVL1::CMXCPHits *hits = 0;
-    CmxCpHitsMap::const_iterator mapIter;
-    mapIter = m_hitsMap.find(key);
-    if (mapIter != m_hitsMap.end()) hits = mapIter->second;
-    return hits;
+    CmxCpHitsMap::const_iterator mapIter = data.m_hitsMap.find(key);
+    if (mapIter != data.m_hitsMap.end()) return mapIter->second;
+    return nullptr;
 }
 
 // Set up CPM tower map
@@ -1161,7 +1185,7 @@ void CpByteStreamV2Tool::setupCpmTowerMap(const CpmTowerCollection *
         CpmTowerCollection::const_iterator pose = ttCollection->end();
         for (; pos != pose; ++pos)
         {
-            LVL1::CPMTower *const tt = *pos;
+            const LVL1::CPMTower *const tt = *pos;
             const unsigned int key = m_towerKey->ttKey(tt->phi(), tt->eta());
             m_ttMap.insert(std::make_pair(key, tt));
         }
@@ -1180,7 +1204,7 @@ void CpByteStreamV2Tool::setupCmxCpTobMap(const CmxCpTobCollection *
         CmxCpTobCollection::const_iterator pose = tobCollection->end();
         for (; pos != pose; ++pos)
         {
-            LVL1::CMXCPTob *const tob = *pos;
+            const LVL1::CMXCPTob *const tob = *pos;
             const int crate = tob->crate() - m_crateOffsetSw;
             const int cmx = tob->cmx();
             const int cpm = tob->cpm();
@@ -1204,7 +1228,7 @@ void CpByteStreamV2Tool::setupCmxCpHitsMap(const CmxCpHitsCollection *
         CmxCpHitsCollection::const_iterator pose = hitCollection->end();
         for (; pos != pose; ++pos)
         {
-            LVL1::CMXCPHits *const hits = *pos;
+            const LVL1::CMXCPHits *const hits = *pos;
             const int crate = hits->crate() - m_crateOffsetSw;
             const int cmx = hits->cmx();
             const int source = hits->source();
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.h
index 30ece2c6aca9fb1af915bc65a219df2318663ad6..2843ffa580e9a3814d5bcab01475a682b5880902 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/CpByteStreamV2Tool.h
@@ -90,27 +90,60 @@ class CpByteStreamV2Tool : public AthAlgTool {
    typedef DataVector<LVL1::CMXCPTob>                    CmxCpTobCollection;
    typedef DataVector<LVL1::CMXCPHits>                   CmxCpHitsCollection;
    typedef std::map<unsigned int, LVL1::CPMTower*>       CpmTowerMap;
+   typedef std::map<unsigned int, const LVL1::CPMTower*> ConstCpmTowerMap;
    typedef std::map<int, LVL1::CMXCPTob*>                CmxCpTobMap;
+   typedef std::map<int, const LVL1::CMXCPTob*>          ConstCmxCpTobMap;
    typedef std::map<int, LVL1::CMXCPHits*>               CmxCpHitsMap;
+   typedef std::map<int, const LVL1::CMXCPHits*>         ConstCmxCpHitsMap;
    typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      ROBPointer;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      RODPointer;
 
+   struct CpByteStreamToolData
+   {
+     CpByteStreamToolData (const CollectionType collection)
+       : m_collection(collection){}
+     const CollectionType m_collection;
+   };
+   struct CpmTowerData : public CpByteStreamToolData
+   {
+     CpmTowerData (CpmTowerCollection* const ttCollection)
+       : CpByteStreamToolData (CPM_TOWERS), m_ttCollection (ttCollection) {}
+     CpmTowerCollection* const m_ttCollection;
+     CpmTowerMap  m_ttMap;
+   };
+   struct CmxCpTobData : public CpByteStreamToolData
+   {
+     CmxCpTobData (CmxCpTobCollection* const tobCollection)
+       : CpByteStreamToolData (CMX_CP_TOBS), m_tobCollection (tobCollection) {}
+     CmxCpTobCollection* const m_tobCollection;
+     CmxCpTobMap  m_tobMap;
+   };
+   struct CmxCpHitsData : public CpByteStreamToolData
+   {
+     CmxCpHitsData (CmxCpHitsCollection* const hitCollection)
+       : CpByteStreamToolData (CMX_CP_HITS), m_hitCollection (hitCollection) {}
+     CmxCpHitsCollection* const m_hitCollection;
+     CmxCpHitsMap m_hitsMap;
+   };
+
    /// Convert bytestream to given container type
    StatusCode convertBs(const IROBDataProviderSvc::VROBFRAG& robFrags,
-                        CollectionType collection);
+                        CpByteStreamToolData& data);
    /// Unpack CMX-CP sub-block
-   void decodeCmxCp(CmxCpSubBlock* subBlock, int trigCpm,
-                                             CollectionType collection);
+   void decodeCmxCp(CmxCpSubBlock* subBlock, int trigCpm, CpByteStreamToolData& data);
    /// Unpack CPM sub-block
-   void decodeCpm(CpmSubBlockV2* subBlock, int trigCpm);
+   void decodeCpm(CpmSubBlockV2* subBlock, int trigCpm, CpmTowerData& data);
 
    /// Find a CPM tower for given key
-   LVL1::CPMTower*  findCpmTower(unsigned int key);
+   const LVL1::CPMTower*  findCpmTower(unsigned int key) const;
+   LVL1::CPMTower*  findCpmTower(const CpmTowerData& data, unsigned int key) const;
    /// Find CMX-CP TOB for given key
-   LVL1::CMXCPTob*  findCmxCpTob(int key);
+   const LVL1::CMXCPTob*  findCmxCpTob(int key) const;
+   LVL1::CMXCPTob*  findCmxCpTob(const CmxCpTobData& data, int key) const;
    /// Find CMX-CP hits for given key
-   LVL1::CMXCPHits* findCmxCpHits(int key);
+   const LVL1::CMXCPHits* findCmxCpHits(int key) const;
+   LVL1::CMXCPHits* findCmxCpHits(const CmxCpHitsData& data, int key) const;
 
    /// Set up CPM tower map
    void setupCpmTowerMap(const CpmTowerCollection* ttCollection);
@@ -209,18 +242,12 @@ class CpByteStreamV2Tool : public AthAlgTool {
    DataVector<CpmSubBlockV2> m_cpmBlocks;
    /// Vector for current CMX-CP sub-blocks
    DataVector<CmxCpSubBlock> m_cmxBlocks;
-   /// Current CPM tower collection
-   CpmTowerCollection*  m_ttCollection;
-   /// Current CMX-CP TOB collection
-   CmxCpTobCollection*  m_tobCollection;
-   /// Current CMX-CP hits collection
-   CmxCpHitsCollection* m_hitCollection;
    /// CPM tower map
-   CpmTowerMap  m_ttMap;
+   ConstCpmTowerMap  m_ttMap;
    /// CMX-CP TOB map
-   CmxCpTobMap  m_tobMap;
+   ConstCmxCpTobMap  m_tobMap;
    /// CMX-CP hits map
-   CmxCpHitsMap m_hitsMap;
+   ConstCmxCpHitsMap m_hitsMap;
    /// ROD Status words
    std::vector<uint32_t>* m_rodStatus;
    /// ROD status map
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.cxx
index 71eb74a82a00b04b7bd010433044afdc47c32639..5d2a3274cee2879b32f0c8c94016dd31290cf9fb 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.cxx
@@ -148,9 +148,8 @@ StatusCode JepByteStreamTool::convert(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
   DataVector<LVL1::JetElement>* const jeCollection)
 {
-  m_jeCollection = jeCollection;
-  m_jeMap.clear();
-  return convertBs(robFrags, JET_ELEMENTS);
+  JetElementData data (jeCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to jet hits
@@ -159,9 +158,8 @@ StatusCode JepByteStreamTool::convert(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
   DataVector<LVL1::JEMHits>* const hitCollection)
 {
-  m_hitCollection = hitCollection;
-  m_hitsMap.clear();
-  return convertBs(robFrags, JET_HITS);
+  JetHitsData data (hitCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to energy sums
@@ -170,9 +168,8 @@ StatusCode JepByteStreamTool::convert(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
   DataVector<LVL1::JEMEtSums>* const etCollection)
 {
-  m_etCollection = etCollection;
-  m_etMap.clear();
-  return convertBs(robFrags, ENERGY_SUMS);
+  EnergySumsData data (etCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMM hits
@@ -181,9 +178,8 @@ StatusCode JepByteStreamTool::convert(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
   DataVector<LVL1::CMMJetHits>* const hitCollection)
 {
-  m_cmmHitCollection = hitCollection;
-  m_cmmHitsMap.clear();
-  return convertBs(robFrags, CMM_HITS);
+  CmmHitsData data (hitCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMM energy sums
@@ -192,9 +188,8 @@ StatusCode JepByteStreamTool::convert(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
   DataVector<LVL1::CMMEtSums>* const etCollection)
 {
-  m_cmmEtCollection = etCollection;
-  m_cmmEtMap.clear();
-  return convertBs(robFrags, CMM_SUMS);
+  CmmSumsData data (etCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion of JEP container to bytestream
@@ -588,7 +583,7 @@ const std::vector<uint32_t>& JepByteStreamTool::sourceIDs(
 
 StatusCode JepByteStreamTool::convertBs(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
-  const CollectionType collection)
+  JepByteStreamToolData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -716,8 +711,8 @@ StatusCode JepByteStreamTool::convertBs(
             m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
             break;
           }
-          if (collection == CMM_HITS) {
-            decodeCmmJet(m_cmmJetSubBlock, trigCmm);
+          if (data.m_collection == CMM_HITS) {
+            decodeCmmJet(m_cmmJetSubBlock, trigCmm, static_cast<CmmHitsData&>(data));
             if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
               if (debug) msg() << "decodeCmmJet failed" << endmsg;
               break;
@@ -732,8 +727,8 @@ StatusCode JepByteStreamTool::convertBs(
             m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
             break;
           }
-          if (collection == CMM_SUMS) {
-            decodeCmmEnergy(m_cmmEnergySubBlock, trigCmm);
+          if (data.m_collection == CMM_SUMS) {
+            decodeCmmEnergy(m_cmmEnergySubBlock, trigCmm, static_cast<CmmSumsData&>(data));
             if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
               if (debug) msg() << "decodeCmmEnergy failed" << endmsg;
               break;
@@ -754,9 +749,9 @@ StatusCode JepByteStreamTool::convertBs(
           m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
           break;
         }
-        if (collection == JET_ELEMENTS || collection == JET_HITS ||
-            collection == ENERGY_SUMS) {
-          decodeJem(m_jemSubBlock, trigJem, collection);
+        if (data.m_collection == JET_ELEMENTS || data.m_collection == JET_HITS ||
+            data.m_collection == ENERGY_SUMS) {
+          decodeJem(m_jemSubBlock, trigJem, data);
           if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
             if (debug) msg() << "decodeJem failed" << endmsg;
             break;
@@ -774,7 +769,8 @@ StatusCode JepByteStreamTool::convertBs(
 // Unpack CMM-Energy sub-block
 
 void JepByteStreamTool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
-                                        int trigCmm)
+                                        int trigCmm,
+                                        CmmSumsData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -883,7 +879,7 @@ void JepByteStreamTool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
       eyErr = eyErrBits.error();
       etErr = etErrBits.error();
       if (ex || ey || et || exErr || eyErr || etErr) {
-        LVL1::CMMEtSums* sums = findCmmSums(crate, dataID);
+        LVL1::CMMEtSums* sums = findCmmSums(data, crate, dataID);
         if ( ! sums ) {   // create new CMM energy sums
           m_exVec.assign(timeslices, 0);
           m_eyVec.assign(timeslices, 0);
@@ -897,11 +893,12 @@ void JepByteStreamTool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
           m_exErrVec[slice] = exErr;
           m_eyErrVec[slice] = eyErr;
           m_etErrVec[slice] = etErr;
-          sums = new LVL1::CMMEtSums(swCrate, dataID, m_etVec, m_exVec, m_eyVec,
-                                     m_etErrVec, m_exErrVec, m_eyErrVec, trigCmm);
+          auto sumsp = 
+            std::make_unique<LVL1::CMMEtSums>(swCrate, dataID, m_etVec, m_exVec, m_eyVec,
+                                              m_etErrVec, m_exErrVec, m_eyErrVec, trigCmm);
           const int key = crate * 100 + dataID;
-          m_cmmEtMap.insert(std::make_pair(key, sums));
-          m_cmmEtCollection->push_back(sums);
+          data.m_cmmEtMap.insert(std::make_pair(key, sumsp.get()));
+          data.m_cmmEtCollection->push_back(std::move(sumsp));
         } else {
           m_exVec = sums->ExVec();
           m_eyVec = sums->EyVec();
@@ -942,18 +939,19 @@ void JepByteStreamTool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
       const unsigned int missEt = subBlock->missingEtHits(slice);
       if ( missEt || ssError ) {
         const int dataID = LVL1::CMMEtSums::MISSING_ET_MAP;
-        LVL1::CMMEtSums* map = findCmmSums(crate, dataID);
+        LVL1::CMMEtSums* map = findCmmSums(data, crate, dataID);
         if ( ! map ) {
           m_etVec.assign(timeslices, 0);
           m_etErrVec.assign(timeslices, 0);
           m_etVec[slice]    = missEt;
           m_etErrVec[slice] = ssError;
-          map = new LVL1::CMMEtSums(swCrate, dataID,
-                                    m_etVec, m_etVec, m_etVec,
-                                    m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
+          auto mapp =
+            std::make_unique<LVL1::CMMEtSums>(swCrate, dataID,
+                                              m_etVec, m_etVec, m_etVec,
+                                              m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
           const int key = crate * 100 + dataID;
-          m_cmmEtMap.insert(std::make_pair(key, map));
-          m_cmmEtCollection->push_back(map);
+          data.m_cmmEtMap.insert(std::make_pair(key, mapp.get()));
+          data.m_cmmEtCollection->push_back(std::move(mapp));
         } else {
           m_etVec    = map->EtVec();
           m_etErrVec = map->EtErrorVec();
@@ -979,18 +977,19 @@ void JepByteStreamTool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
       const unsigned int sumEt = subBlock->sumEtHits(slice);
       if ( sumEt || ssError ) {
         const int dataID = LVL1::CMMEtSums::SUM_ET_MAP;
-        LVL1::CMMEtSums* map = findCmmSums(crate, dataID);
+        LVL1::CMMEtSums* map = findCmmSums(data, crate, dataID);
         if ( ! map ) {
           m_etVec.assign(timeslices, 0);
           m_etErrVec.assign(timeslices, 0);
           m_etVec[slice]    = sumEt;
           m_etErrVec[slice] = ssError;
-          map = new LVL1::CMMEtSums(swCrate, dataID,
-                                    m_etVec, m_etVec, m_etVec,
-                                    m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
+          auto mapp =
+            std::make_unique<LVL1::CMMEtSums>(swCrate, dataID,
+                                              m_etVec, m_etVec, m_etVec,
+                                              m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
           const int key = crate * 100 + dataID;
-          m_cmmEtMap.insert(std::make_pair(key, map));
-          m_cmmEtCollection->push_back(map);
+          data.m_cmmEtMap.insert(std::make_pair(key, mapp.get()));
+          data.m_cmmEtCollection->push_back(std::move(mapp));
         } else {
           m_etVec    = map->EtVec();
           m_etErrVec = map->EtErrorVec();
@@ -1017,18 +1016,19 @@ void JepByteStreamTool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
         const unsigned int missEtSig = subBlock->missingEtSigHits(slice);
         if ( missEtSig || ssError ) {
           const int dataID = LVL1::CMMEtSums::MISSING_ET_SIG_MAP;
-          LVL1::CMMEtSums* map = findCmmSums(crate, dataID);
+          LVL1::CMMEtSums* map = findCmmSums(data, crate, dataID);
           if ( ! map ) {
             m_etVec.assign(timeslices, 0);
             m_etErrVec.assign(timeslices, 0);
             m_etVec[slice]    = missEtSig;
             m_etErrVec[slice] = ssError;
-            map = new LVL1::CMMEtSums(swCrate, dataID,
-                                      m_etVec, m_etVec, m_etVec,
-                                      m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
+            auto mapp = 
+              std::make_unique<LVL1::CMMEtSums>(swCrate, dataID,
+                                                m_etVec, m_etVec, m_etVec,
+                                                m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
             const int key = crate * 100 + dataID;
-            m_cmmEtMap.insert(std::make_pair(key, map));
-            m_cmmEtCollection->push_back(map);
+            data.m_cmmEtMap.insert(std::make_pair(key, mapp.get()));
+            data.m_cmmEtCollection->push_back(std::move(mapp));
           } else {
             m_etVec    = map->EtVec();
             m_etErrVec = map->EtErrorVec();
@@ -1061,7 +1061,8 @@ void JepByteStreamTool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
 
 // Unpack CMM-Jet sub-block
 
-void JepByteStreamTool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm)
+void JepByteStreamTool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm,
+                                     CmmHitsData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -1153,16 +1154,17 @@ void JepByteStreamTool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm)
                   subBlock->jetHitsError(slice, source));
       const int err = errBits.error();
       if (hits || err) {
-        LVL1::CMMJetHits* jh = findCmmHits(crate, dataID);
+        LVL1::CMMJetHits* jh = findCmmHits(data, crate, dataID);
         if ( ! jh ) {   // create new CMM hits
           m_hitsVec.assign(timeslices, 0);
           m_errVec.assign(timeslices, 0);
           m_hitsVec[slice] = hits;
           m_errVec[slice]  = err;
-          jh = new LVL1::CMMJetHits(swCrate, dataID, m_hitsVec, m_errVec, trigCmm);
+          auto jhp =
+            std::make_unique<LVL1::CMMJetHits>(swCrate, dataID, m_hitsVec, m_errVec, trigCmm);
           const int key = crate * 100 + dataID;
-          m_cmmHitsMap.insert(std::make_pair(key, jh));
-          m_cmmHitCollection->push_back(jh);
+          data.m_cmmHitsMap.insert(std::make_pair(key, jhp.get()));
+          data.m_cmmHitCollection->push_back(std::move(jhp));
         } else {
           m_hitsVec = jh->HitsVec();
           m_errVec  = jh->ErrorVec();
@@ -1180,7 +1182,7 @@ void JepByteStreamTool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm)
           }
           m_hitsVec[slice] = hits;
           m_errVec[slice]  = err;
-          jh->addHits(m_hitsVec, m_errVec);
+	  jh->addHits(m_hitsVec, m_errVec);
         }
       }
     }
@@ -1191,16 +1193,17 @@ void JepByteStreamTool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm)
       const unsigned int etMap = subBlock->jetEtMap(slice);
       if ( etMap || ssError ) {
         const int dataID = LVL1::CMMJetHits::ET_MAP;
-        LVL1::CMMJetHits* map = findCmmHits(crate, dataID);
+        LVL1::CMMJetHits* map = findCmmHits(data, crate, dataID);
         if ( ! map ) {
           m_hitsVec.assign(timeslices, 0);
           m_errVec.assign(timeslices, 0);
           m_hitsVec[slice] = etMap;
           m_errVec[slice]  = ssError;
-          map = new LVL1::CMMJetHits(swCrate, dataID, m_hitsVec, m_errVec, trigCmm);
+          auto mapp =
+            std::make_unique<LVL1::CMMJetHits>(swCrate, dataID, m_hitsVec, m_errVec, trigCmm);
           const int key = crate * 100 + dataID;
-          m_cmmHitsMap.insert(std::make_pair(key, map));
-          m_cmmHitCollection->push_back(map);
+          data.m_cmmHitsMap.insert(std::make_pair(key, mapp.get()));
+          data.m_cmmHitCollection->push_back(std::move(mapp));
         } else {
           m_hitsVec = map->HitsVec();
           m_errVec  = map->ErrorVec();
@@ -1218,7 +1221,7 @@ void JepByteStreamTool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm)
           }
           m_hitsVec[slice] = etMap;
           m_errVec[slice]  = ssError;
-          map->addHits(m_hitsVec, m_errVec);
+	  map->addHits(m_hitsVec, m_errVec);
         }
       }
     }
@@ -1230,7 +1233,7 @@ void JepByteStreamTool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm)
 // Unpack JEM sub-block
 
 void JepByteStreamTool::decodeJem(JemSubBlock* subBlock, int trigJem,
-                                  const CollectionType collection)
+                                  JepByteStreamToolData& data)
 {
   const bool debug   = msgLvl(MSG::DEBUG);
   const bool verbose = msgLvl(MSG::VERBOSE);
@@ -1282,7 +1285,8 @@ void JepByteStreamTool::decodeJem(JemSubBlock* subBlock, int trigJem,
   const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
   for (int slice = sliceBeg; slice < sliceEnd; ++slice) {
 
-    if (collection == JET_ELEMENTS) {
+    if (data.m_collection == JET_ELEMENTS) {
+      JetElementData& jedata = static_cast<JetElementData&>(data);
 
       // Loop over jet element channels and fill jet elements
 
@@ -1294,13 +1298,15 @@ void JepByteStreamTool::decodeJem(JemSubBlock* subBlock, int trigJem,
           int layer = 0;
           if (m_jemMaps->mapping(crate, module, chan, eta, phi, layer)) {
             if (layer == m_coreOverlap) {
-              LVL1::JetElement* je = findJetElement(eta, phi);
+              LVL1::JetElement* je = findJetElement(jedata, eta, phi);
               if ( ! je ) {   // create new jet element
                 const unsigned int key = m_elementKey->jeKey(phi, eta);
-                je = new LVL1::JetElement(phi, eta, dummy, dummy, key,
-                                          dummy, dummy, dummy, trigJem);
-                m_jeMap.insert(std::make_pair(key, je));
-                m_jeCollection->push_back(je);
+                auto jep = 
+                  std::make_unique<LVL1::JetElement>(phi, eta, dummy, dummy, key,
+                                                     dummy, dummy, dummy, trigJem);
+                je = jep.get();
+                jedata.m_jeMap.insert(std::make_pair(key, jep.get()));
+                jedata.m_jeCollection->push_back(std::move(jep));
               } else {
                 const std::vector<int>& emEnergy(je->emEnergyVec());
                 const std::vector<int>& hadEnergy(je->hadEnergyVec());
@@ -1330,7 +1336,7 @@ void JepByteStreamTool::decodeJem(JemSubBlock* subBlock, int trigJem,
               emErrBits.set(LVL1::DataError::LinkDown, linkError);
               hadErrBits.set(LVL1::DataError::Parity, jetEle.hadParity());
               hadErrBits.set(LVL1::DataError::LinkDown, linkError >> 1);
-              je->addSlice(slice, jetEle.emData(), jetEle.hadData(),
+	      je->addSlice(slice, jetEle.emData(), jetEle.hadData(),
                            emErrBits.error(), hadErrBits.error(),
                            linkError);
             }
@@ -1345,19 +1351,21 @@ void JepByteStreamTool::decodeJem(JemSubBlock* subBlock, int trigJem,
           msg(MSG::DEBUG);
         }
       }
-    } else if (collection == JET_HITS) {
+    } else if (data.m_collection == JET_HITS) {
+      JetHitsData& jhdata = static_cast<JetHitsData&>(data);
 
       // Get jet hits
 
       const unsigned int hits = subBlock->jetHits(slice);
       if (hits) {
-        LVL1::JEMHits* jh = findJetHits(crate, module);
+        LVL1::JEMHits* jh = findJetHits(jhdata, crate, module);
         if ( ! jh ) {   // create new jet hits
           m_hitsVec.assign(timeslices, 0);
           m_hitsVec[slice] = hits;
-          jh = new LVL1::JEMHits(swCrate, module, m_hitsVec, trigJem);
-          m_hitsMap.insert(std::make_pair(crate * m_modules + module, jh));
-          m_hitCollection->push_back(jh);
+          auto jhp =
+            std::make_unique<LVL1::JEMHits>(swCrate, module, m_hitsVec, trigJem);
+          jhdata.m_hitsMap.insert(std::make_pair(crate * m_modules + module, jhp.get()));
+          jhdata.m_hitCollection->push_back(std::move(jhp));
         } else {
           m_hitsVec = jh->JetHitsVec();
           const int nsl = m_hitsVec.size();
@@ -1376,7 +1384,7 @@ void JepByteStreamTool::decodeJem(JemSubBlock* subBlock, int trigJem,
             return;
           }
           m_hitsVec[slice] = hits;
-          jh->addJetHits(m_hitsVec);
+	  jh->addJetHits(m_hitsVec);
         }
       } else if (verbose) {
         msg(MSG::VERBOSE) << "No jet hits data for crate/module/slice "
@@ -1384,7 +1392,8 @@ void JepByteStreamTool::decodeJem(JemSubBlock* subBlock, int trigJem,
                           << endmsg;
         msg(MSG::DEBUG);
       }
-    } else if (collection == ENERGY_SUMS) {
+    } else if (data.m_collection == ENERGY_SUMS) {
+      EnergySumsData& sumdata = static_cast<EnergySumsData&>(data);
 
       // Get energy subsums
 
@@ -1392,7 +1401,7 @@ void JepByteStreamTool::decodeJem(JemSubBlock* subBlock, int trigJem,
       const unsigned int ey = subBlock->ey(slice);
       const unsigned int et = subBlock->et(slice);
       if (ex | ey | et) {
-        LVL1::JEMEtSums* sums = findEnergySums(crate, module);
+        LVL1::JEMEtSums* sums = findEnergySums(sumdata, crate, module);
         if ( ! sums ) {   // create new energy sums
           m_exVec.assign(timeslices, 0);
           m_eyVec.assign(timeslices, 0);
@@ -1400,10 +1409,11 @@ void JepByteStreamTool::decodeJem(JemSubBlock* subBlock, int trigJem,
           m_exVec[slice] = ex;
           m_eyVec[slice] = ey;
           m_etVec[slice] = et;
-          sums = new LVL1::JEMEtSums(swCrate, module, m_etVec, m_exVec, m_eyVec,
-                                     trigJem);
-          m_etMap.insert(std::make_pair(crate * m_modules + module, sums));
-          m_etCollection->push_back(sums);
+          auto sumsp =
+            std::make_unique<LVL1::JEMEtSums>(swCrate, module, m_etVec, m_exVec, m_eyVec,
+                                              trigJem);
+          sumdata.m_etMap.insert(std::make_pair(crate * m_modules + module, sumsp.get()));
+          sumdata.m_etCollection->push_back(std::move(sumsp));
         } else {
           m_exVec = sums->ExVec();
           m_eyVec = sums->EyVec();
@@ -1443,63 +1453,104 @@ void JepByteStreamTool::decodeJem(JemSubBlock* subBlock, int trigJem,
 
 // Find a jet element given eta, phi
 
+const 
 LVL1::JetElement* JepByteStreamTool::findJetElement(const double eta,
-    const double phi)
+                                                    const double phi) const
 {
-  LVL1::JetElement* tt = 0;
   const unsigned int key = m_elementKey->jeKey(phi, eta);
-  JetElementMap::const_iterator mapIter;
-  mapIter = m_jeMap.find(key);
-  if (mapIter != m_jeMap.end()) tt = mapIter->second;
-  return tt;
+  ConstJetElementMap::const_iterator mapIter = m_jeMap.find(key);
+  if (mapIter != m_jeMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::JetElement* JepByteStreamTool::findJetElement(const JetElementData& data,
+                                                    const double eta,
+                                                    const double phi) const
+{
+  const unsigned int key = m_elementKey->jeKey(phi, eta);
+  JetElementMap::const_iterator mapIter = data.m_jeMap.find(key);
+  if (mapIter != data.m_jeMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find jet hits for given crate, module
 
+const
 LVL1::JEMHits* JepByteStreamTool::findJetHits(const int crate,
-    const int module)
+                                              const int module) const
 {
-  LVL1::JEMHits* hits = 0;
-  JetHitsMap::const_iterator mapIter;
-  mapIter = m_hitsMap.find(crate * m_modules + module);
-  if (mapIter != m_hitsMap.end()) hits = mapIter->second;
-  return hits;
+  ConstJetHitsMap::const_iterator mapIter = m_hitsMap.find(crate * m_modules + module);
+  if (mapIter != m_hitsMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::JEMHits* JepByteStreamTool::findJetHits(const JetHitsData& data,
+                                              const int crate,
+                                              const int module) const
+{
+  JetHitsMap::const_iterator mapIter = data.m_hitsMap.find(crate * m_modules + module);
+  if (mapIter != data.m_hitsMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find energy sums for given crate, module
 
+const
 LVL1::JEMEtSums* JepByteStreamTool::findEnergySums(const int crate,
-    const int module)
+                                                   const int module) const
 {
-  LVL1::JEMEtSums* sums = 0;
-  EnergySumsMap::const_iterator mapIter;
-  mapIter = m_etMap.find(crate * m_modules + module);
-  if (mapIter != m_etMap.end()) sums = mapIter->second;
-  return sums;
+  ConstEnergySumsMap::const_iterator mapIter = m_etMap.find(crate * m_modules + module);
+  if (mapIter != m_etMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::JEMEtSums* JepByteStreamTool::findEnergySums(const EnergySumsData& data,
+                                                   const int crate,
+                                                   const int module) const
+{
+  EnergySumsMap::const_iterator mapIter = data.m_etMap.find(crate * m_modules + module);
+  if (mapIter != data.m_etMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CMM hits for given crate, dataID
 
+const
 LVL1::CMMJetHits* JepByteStreamTool::findCmmHits(const int crate,
-    const int dataID)
+                                                 const int dataID) const
+{
+  ConstCmmHitsMap::const_iterator mapIter = m_cmmHitsMap.find(crate * 100 + dataID);
+  if (mapIter != m_cmmHitsMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CMMJetHits* JepByteStreamTool::findCmmHits(const CmmHitsData& data,
+                                                 const int crate,
+                                                 const int dataID) const
 {
-  LVL1::CMMJetHits* hits = 0;
-  CmmHitsMap::const_iterator mapIter;
-  mapIter = m_cmmHitsMap.find(crate * 100 + dataID);
-  if (mapIter != m_cmmHitsMap.end()) hits = mapIter->second;
-  return hits;
+  CmmHitsMap::const_iterator mapIter = data.m_cmmHitsMap.find(crate * 100 + dataID);
+  if (mapIter != data.m_cmmHitsMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CMM energy sums for given crate, module, dataID
 
+const
 LVL1::CMMEtSums* JepByteStreamTool::findCmmSums(const int crate,
-    const int dataID)
+                                                const int dataID) const
+{
+  ConstCmmSumsMap::const_iterator mapIter = m_cmmEtMap.find(crate * 100 + dataID);
+  if (mapIter != m_cmmEtMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CMMEtSums* JepByteStreamTool::findCmmSums(const CmmSumsData& data,
+                                                const int crate,
+                                                const int dataID) const
 {
-  LVL1::CMMEtSums* sums = 0;
-  CmmSumsMap::const_iterator mapIter;
-  mapIter = m_cmmEtMap.find(crate * 100 + dataID);
-  if (mapIter != m_cmmEtMap.end()) sums = mapIter->second;
-  return sums;
+  CmmSumsMap::const_iterator mapIter = data.m_cmmEtMap.find(crate * 100 + dataID);
+  if (mapIter != data.m_cmmEtMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Set up jet element map
@@ -1512,7 +1563,7 @@ void JepByteStreamTool::setupJeMap(const JetElementCollection*
     JetElementCollection::const_iterator pos  = jeCollection->begin();
     JetElementCollection::const_iterator pose = jeCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::JetElement* const je = *pos;
+      const LVL1::JetElement* const je = *pos;
       const unsigned int key = m_elementKey->jeKey(je->phi(), je->eta());
       m_jeMap.insert(std::make_pair(key, je));
     }
@@ -1529,7 +1580,7 @@ void JepByteStreamTool::setupHitsMap(const JetHitsCollection*
     JetHitsCollection::const_iterator pos  = hitCollection->begin();
     JetHitsCollection::const_iterator pose = hitCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::JEMHits* const hits = *pos;
+      const LVL1::JEMHits* const hits = *pos;
       const int crate = hits->crate() - m_crateOffsetSw;
       const int key   = m_modules * crate + hits->module();
       m_hitsMap.insert(std::make_pair(key, hits));
@@ -1547,7 +1598,7 @@ void JepByteStreamTool::setupEtMap(const EnergySumsCollection*
     EnergySumsCollection::const_iterator pos  = etCollection->begin();
     EnergySumsCollection::const_iterator pose = etCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::JEMEtSums* const sums = *pos;
+      const LVL1::JEMEtSums* const sums = *pos;
       const int crate = sums->crate() - m_crateOffsetSw;
       const int key   = m_modules * crate + sums->module();
       m_etMap.insert(std::make_pair(key, sums));
@@ -1565,7 +1616,7 @@ void JepByteStreamTool::setupCmmHitsMap(const CmmHitsCollection*
     CmmHitsCollection::const_iterator pos  = hitCollection->begin();
     CmmHitsCollection::const_iterator pose = hitCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CMMJetHits* const hits = *pos;
+      const LVL1::CMMJetHits* const hits = *pos;
       const int crate = hits->crate() - m_crateOffsetSw;
       const int key   = crate * 100 + hits->dataID();
       m_cmmHitsMap.insert(std::make_pair(key, hits));
@@ -1583,7 +1634,7 @@ void JepByteStreamTool::setupCmmEtMap(const CmmSumsCollection*
     CmmSumsCollection::const_iterator pos  = etCollection->begin();
     CmmSumsCollection::const_iterator pose = etCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CMMEtSums* const sums = *pos;
+      const LVL1::CMMEtSums* const sums = *pos;
       const int crate = sums->crate() - m_crateOffsetSw;
       const int key   = crate * 100 + sums->dataID();
       m_cmmEtMap.insert(std::make_pair(key, sums));
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.h
index 8e307e6ec5e60f3f23278fb880a24989a7d804ab..7e253dcdf7cbc66f3a0c30e9789aceb89ce0e352 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.h
@@ -96,35 +96,87 @@ class JepByteStreamTool : public AthAlgTool {
    typedef DataVector<LVL1::CMMJetHits>                  CmmHitsCollection;
    typedef DataVector<LVL1::CMMEtSums>                   CmmSumsCollection;
    typedef std::map<unsigned int, LVL1::JetElement*>     JetElementMap;
+   typedef std::map<unsigned int, const LVL1::JetElement*> ConstJetElementMap;
    typedef std::map<int, LVL1::JEMHits*>                 JetHitsMap;
+   typedef std::map<int, const LVL1::JEMHits*>           ConstJetHitsMap;
    typedef std::map<int, LVL1::JEMEtSums*>               EnergySumsMap;
+   typedef std::map<int, const LVL1::JEMEtSums*>         ConstEnergySumsMap;
    typedef std::map<int, LVL1::CMMJetHits*>              CmmHitsMap;
+   typedef std::map<int, const LVL1::CMMJetHits*>        ConstCmmHitsMap;
    typedef std::map<int, LVL1::CMMEtSums*>               CmmSumsMap;
+   typedef std::map<int, const LVL1::CMMEtSums*>         ConstCmmSumsMap;
    typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      ROBPointer;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      RODPointer;
 
+   struct JepByteStreamToolData
+   {
+     JepByteStreamToolData (const CollectionType collection)
+       : m_collection(collection){}
+     const CollectionType m_collection;
+   };
+   struct JetElementData : public JepByteStreamToolData
+   {
+     JetElementData (JetElementCollection* const jeCollection)
+       : JepByteStreamToolData (JET_ELEMENTS), m_jeCollection (jeCollection) {}
+     JetElementCollection* const m_jeCollection;
+     JetElementMap m_jeMap;
+   };
+   struct JetHitsData : public JepByteStreamToolData
+   {
+     JetHitsData (JetHitsCollection* const hitCollection)
+       : JepByteStreamToolData (JET_HITS), m_hitCollection (hitCollection) {}
+     JetHitsCollection* const m_hitCollection;
+     JetHitsMap    m_hitsMap;
+   };
+   struct EnergySumsData : public JepByteStreamToolData
+   {
+     EnergySumsData (EnergySumsCollection* const etCollection)
+       : JepByteStreamToolData (ENERGY_SUMS), m_etCollection (etCollection) {}
+     EnergySumsCollection* const m_etCollection;
+     EnergySumsMap m_etMap;
+   };
+   struct CmmHitsData : public JepByteStreamToolData
+   {
+     CmmHitsData (CmmHitsCollection* const cmmHitCollection)
+       : JepByteStreamToolData (CMM_HITS), m_cmmHitCollection (cmmHitCollection) {}
+     CmmHitsCollection* const m_cmmHitCollection;
+     CmmHitsMap    m_cmmHitsMap;
+   };
+   struct CmmSumsData : public JepByteStreamToolData
+   {
+     CmmSumsData (CmmSumsCollection* const cmmEtCollection)
+       : JepByteStreamToolData (CMM_SUMS), m_cmmEtCollection (cmmEtCollection) {}
+     CmmSumsCollection* const m_cmmEtCollection;
+     CmmSumsMap    m_cmmEtMap;
+   };
+
    /// Convert bytestream to given container type
    StatusCode convertBs(const IROBDataProviderSvc::VROBFRAG& robFrags,
-                        CollectionType collection);
+                        JepByteStreamToolData& data);
    /// Unpack CMM-Energy sub-block
-   void decodeCmmEnergy(CmmEnergySubBlock* subBlock, int trigCmm);
+   void decodeCmmEnergy(CmmEnergySubBlock* subBlock, int trigCmm, CmmSumsData& data);
    /// Unpack CMM-Jet sub-block
-   void decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm);
+   void decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm, CmmHitsData& data);
    /// Unpack JEM sub-block
    void decodeJem(JemSubBlock* subBlock, int trigJem,
-                                         CollectionType collection);
+                  JepByteStreamToolData& data);
 
    /// Find a jet element given eta, phi
-   LVL1::JetElement* findJetElement(double eta, double phi);
+   const LVL1::JetElement* findJetElement(double eta, double phi) const;
+   LVL1::JetElement* findJetElement(const JetElementData& data, double eta, double phi) const;
    /// Find jet hits for given crate, module
-   LVL1::JEMHits*    findJetHits(int crate, int module);
+   const LVL1::JEMHits*    findJetHits(int crate, int module) const;
+   LVL1::JEMHits*    findJetHits(const JetHitsData& data, int crate, int module) const;
    /// Find energy sums for given crate, module
-   LVL1::JEMEtSums*  findEnergySums(int crate, int module);
+   const LVL1::JEMEtSums*  findEnergySums(int crate, int module) const;
+   LVL1::JEMEtSums*  findEnergySums(const EnergySumsData& data, int crate, int module) const;
    /// Find CMM hits for given crate, data ID
-   LVL1::CMMJetHits* findCmmHits(int crate, int dataID);
+   const LVL1::CMMJetHits* findCmmHits(int crate, int dataID) const;
+   LVL1::CMMJetHits* findCmmHits(const CmmHitsData& data, int crate, int dataID) const;
    /// Find CMM energy sums for given crate, data ID
-   LVL1::CMMEtSums*  findCmmSums(int crate, int dataID);
+   const LVL1::CMMEtSums*  findCmmSums(int crate, int dataID) const;
+   LVL1::CMMEtSums*  findCmmSums(const CmmSumsData& data, int crate, int dataID) const;
 
    /// Set up jet element map
    void setupJeMap(const JetElementCollection* jeCollection);
@@ -206,26 +258,16 @@ class JepByteStreamTool : public AthAlgTool {
    DataVector<CmmEnergySubBlock> m_cmmEnergyBlocks;
    /// Vector for current CMM-Jet sub-blocks
    DataVector<CmmJetSubBlock> m_cmmJetBlocks;
-   /// Current jet elements collection
-   JetElementCollection* m_jeCollection;
-   /// Current jet hits collection
-   JetHitsCollection*    m_hitCollection;
-   /// Current energy sums collection
-   EnergySumsCollection* m_etCollection;
-   /// Current CMM hits collection
-   CmmHitsCollection*    m_cmmHitCollection;
-   /// Current CMM energy sums collection
-   CmmSumsCollection*    m_cmmEtCollection;
    /// Jet element map
-   JetElementMap m_jeMap;
+   ConstJetElementMap m_jeMap;
    /// Jet hits map
-   JetHitsMap    m_hitsMap;
+   ConstJetHitsMap    m_hitsMap;
    /// Energy sums map
-   EnergySumsMap m_etMap;
+   ConstEnergySumsMap m_etMap;
    /// CMM hits map
-   CmmHitsMap    m_cmmHitsMap;
+   ConstCmmHitsMap    m_cmmHitsMap;
    /// CMM energy sums map
-   CmmSumsMap    m_cmmEtMap;
+   ConstCmmSumsMap    m_cmmEtMap;
    /// ROD Status words
    std::vector<uint32_t>* m_rodStatus;
    /// ROD status map
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.cxx
index 80f60a2fd29fab5ddfabe404d18eb15dcc757a1a..4ebb89cb44a498db8313fe463e39747622420467 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.cxx
@@ -154,9 +154,8 @@ StatusCode JepByteStreamV1Tool::convert(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
   DataVector<LVL1::JetElement>* const jeCollection)
 {
-  m_jeCollection = jeCollection;
-  m_jeMap.clear();
-  return convertBs(robFrags, JET_ELEMENTS);
+  JetElementData data (jeCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to jet hits
@@ -165,9 +164,8 @@ StatusCode JepByteStreamV1Tool::convert(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
   DataVector<LVL1::JEMHits>* const hitCollection)
 {
-  m_hitCollection = hitCollection;
-  m_hitsMap.clear();
-  return convertBs(robFrags, JET_HITS);
+  JetHitsData data (hitCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to energy sums
@@ -176,9 +174,8 @@ StatusCode JepByteStreamV1Tool::convert(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
   DataVector<LVL1::JEMEtSums>* const etCollection)
 {
-  m_etCollection = etCollection;
-  m_etMap.clear();
-  return convertBs(robFrags, ENERGY_SUMS);
+  EnergySumsData data (etCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMM hits
@@ -187,9 +184,8 @@ StatusCode JepByteStreamV1Tool::convert(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
   DataVector<LVL1::CMMJetHits>* const hitCollection)
 {
-  m_cmmHitCollection = hitCollection;
-  m_cmmHitsMap.clear();
-  return convertBs(robFrags, CMM_HITS);
+  CmmHitsData data (hitCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMM energy sums
@@ -198,9 +194,8 @@ StatusCode JepByteStreamV1Tool::convert(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
   DataVector<LVL1::CMMEtSums>* const etCollection)
 {
-  m_cmmEtCollection = etCollection;
-  m_cmmEtMap.clear();
-  return convertBs(robFrags, CMM_SUMS);
+  CmmSumsData data (etCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion of JEP container to bytestream
@@ -597,7 +592,7 @@ const std::vector<uint32_t>& JepByteStreamV1Tool::sourceIDs(
 
 StatusCode JepByteStreamV1Tool::convertBs(
   const IROBDataProviderSvc::VROBFRAG& robFrags,
-  const CollectionType collection)
+  JepByteStreamToolData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -731,8 +726,8 @@ StatusCode JepByteStreamV1Tool::convertBs(
             m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
             break;
           }
-          if (collection == CMM_HITS) {
-            decodeCmmJet(m_cmmJetSubBlock, trigCmm);
+          if (data.m_collection == CMM_HITS) {
+            decodeCmmJet(m_cmmJetSubBlock, trigCmm, static_cast<CmmHitsData&>(data));
             if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
               if (debug) msg() << "decodeCmmJet failed" << endmsg;
               break;
@@ -747,8 +742,8 @@ StatusCode JepByteStreamV1Tool::convertBs(
             m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
             break;
           }
-          if (collection == CMM_SUMS) {
-            decodeCmmEnergy(m_cmmEnergySubBlock, trigCmm);
+          if (data.m_collection == CMM_SUMS) {
+            decodeCmmEnergy(m_cmmEnergySubBlock, trigCmm, static_cast<CmmSumsData&>(data));
             if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
               if (debug) msg() << "decodeCmmEnergy failed" << endmsg;
               break;
@@ -769,9 +764,9 @@ StatusCode JepByteStreamV1Tool::convertBs(
           m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
           break;
         }
-        if (collection == JET_ELEMENTS || collection == JET_HITS ||
-            collection == ENERGY_SUMS) {
-          decodeJem(m_jemSubBlock, trigJem, collection);
+        if (data.m_collection == JET_ELEMENTS || data.m_collection == JET_HITS ||
+            data.m_collection == ENERGY_SUMS) {
+          decodeJem(m_jemSubBlock, trigJem, data);
           if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
             if (debug) msg() << "decodeJem failed" << endmsg;
             break;
@@ -789,7 +784,8 @@ StatusCode JepByteStreamV1Tool::convertBs(
 // Unpack CMM-Energy sub-block
 
 void JepByteStreamV1Tool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
-    int trigCmm)
+                                          int trigCmm,
+                                          CmmSumsData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -892,7 +888,7 @@ void JepByteStreamV1Tool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
       eyErr = eyErrBits.error();
       etErr = etErrBits.error();
       if (ex || ey || et || exErr || eyErr || etErr) {
-        LVL1::CMMEtSums* sums = findCmmSums(crate, dataID);
+        LVL1::CMMEtSums* sums = findCmmSums(data, crate, dataID);
         if ( ! sums ) {   // create new CMM energy sums
           m_exVec.assign(timeslices, 0);
           m_eyVec.assign(timeslices, 0);
@@ -906,11 +902,12 @@ void JepByteStreamV1Tool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
           m_exErrVec[slice] = exErr;
           m_eyErrVec[slice] = eyErr;
           m_etErrVec[slice] = etErr;
-          sums = new LVL1::CMMEtSums(swCrate, dataID, m_etVec, m_exVec, m_eyVec,
-                                     m_etErrVec, m_exErrVec, m_eyErrVec, trigCmm);
+          auto sumsp =
+            std::make_unique<LVL1::CMMEtSums>(swCrate, dataID, m_etVec, m_exVec, m_eyVec,
+                                              m_etErrVec, m_exErrVec, m_eyErrVec, trigCmm);
           const int key = crate * 100 + dataID;
-          m_cmmEtMap.insert(std::make_pair(key, sums));
-          m_cmmEtCollection->push_back(sums);
+          data.m_cmmEtMap.insert(std::make_pair(key, sumsp.get()));
+          data.m_cmmEtCollection->push_back(std::move(sumsp));
         } else {
           m_exVec = sums->ExVec();
           m_eyVec = sums->EyVec();
@@ -951,18 +948,19 @@ void JepByteStreamV1Tool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
       const unsigned int missEt = subBlock->missingEtHits(slice);
       if ( missEt || ssError ) {
         const int dataID = LVL1::CMMEtSums::MISSING_ET_MAP;
-        LVL1::CMMEtSums* map = findCmmSums(crate, dataID);
+        LVL1::CMMEtSums* map = findCmmSums(data, crate, dataID);
         if ( ! map ) {
           m_etVec.assign(timeslices, 0);
           m_etErrVec.assign(timeslices, 0);
           m_etVec[slice]    = missEt;
           m_etErrVec[slice] = ssError;
-          map = new LVL1::CMMEtSums(swCrate, dataID,
-                                    m_etVec, m_etVec, m_etVec,
-                                    m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
+          auto mapp =
+            std::make_unique<LVL1::CMMEtSums>(swCrate, dataID,
+                                              m_etVec, m_etVec, m_etVec,
+                                              m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
           const int key = crate * 100 + dataID;
-          m_cmmEtMap.insert(std::make_pair(key, map));
-          m_cmmEtCollection->push_back(map);
+          data.m_cmmEtMap.insert(std::make_pair(key, mapp.get()));
+          data.m_cmmEtCollection->push_back(std::move(mapp));
         } else {
           m_etVec    = map->EtVec();
           m_etErrVec = map->EtErrorVec();
@@ -988,18 +986,19 @@ void JepByteStreamV1Tool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
       const unsigned int sumEt = subBlock->sumEtHits(slice);
       if ( sumEt || ssError ) {
         const int dataID = LVL1::CMMEtSums::SUM_ET_MAP;
-        LVL1::CMMEtSums* map = findCmmSums(crate, dataID);
+        LVL1::CMMEtSums* map = findCmmSums(data, crate, dataID);
         if ( ! map ) {
           m_etVec.assign(timeslices, 0);
           m_etErrVec.assign(timeslices, 0);
           m_etVec[slice]    = sumEt;
           m_etErrVec[slice] = ssError;
-          map = new LVL1::CMMEtSums(swCrate, dataID,
-                                    m_etVec, m_etVec, m_etVec,
-                                    m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
+          auto mapp =
+            std::make_unique<LVL1::CMMEtSums>(swCrate, dataID,
+                                              m_etVec, m_etVec, m_etVec,
+                                              m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
           const int key = crate * 100 + dataID;
-          m_cmmEtMap.insert(std::make_pair(key, map));
-          m_cmmEtCollection->push_back(map);
+          data.m_cmmEtMap.insert(std::make_pair(key, mapp.get()));
+          data.m_cmmEtCollection->push_back(std::move(mapp));
         } else {
           m_etVec    = map->EtVec();
           m_etErrVec = map->EtErrorVec();
@@ -1026,18 +1025,19 @@ void JepByteStreamV1Tool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
         const unsigned int missEtSig = subBlock->missingEtSigHits(slice);
         if ( missEtSig || ssError ) {
           const int dataID = LVL1::CMMEtSums::MISSING_ET_SIG_MAP;
-          LVL1::CMMEtSums* map = findCmmSums(crate, dataID);
+          LVL1::CMMEtSums* map = findCmmSums(data, crate, dataID);
           if ( ! map ) {
             m_etVec.assign(timeslices, 0);
             m_etErrVec.assign(timeslices, 0);
             m_etVec[slice]    = missEtSig;
             m_etErrVec[slice] = ssError;
-            map = new LVL1::CMMEtSums(swCrate, dataID,
-                                      m_etVec, m_etVec, m_etVec,
-                                      m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
+            auto mapp =
+              std::make_unique<LVL1::CMMEtSums>(swCrate, dataID,
+                                                m_etVec, m_etVec, m_etVec,
+                                                m_etErrVec, m_etErrVec, m_etErrVec, trigCmm);
             const int key = crate * 100 + dataID;
-            m_cmmEtMap.insert(std::make_pair(key, map));
-            m_cmmEtCollection->push_back(map);
+            data.m_cmmEtMap.insert(std::make_pair(key, mapp.get()));
+            data.m_cmmEtCollection->push_back(std::move(mapp));
           } else {
             m_etVec    = map->EtVec();
             m_etErrVec = map->EtErrorVec();
@@ -1070,7 +1070,8 @@ void JepByteStreamV1Tool::decodeCmmEnergy(CmmEnergySubBlock* subBlock,
 
 // Unpack CMM-Jet sub-block
 
-void JepByteStreamV1Tool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm)
+void JepByteStreamV1Tool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm,
+                                       CmmHitsData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -1165,16 +1166,17 @@ void JepByteStreamV1Tool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm)
                   subBlock->jetHitsError(slice, source));
       const int err = errBits.error();
       if (hits || err) {
-        LVL1::CMMJetHits* jh = findCmmHits(crate, dataID);
+        LVL1::CMMJetHits* jh = findCmmHits(data, crate, dataID);
         if ( ! jh ) {   // create new CMM hits
           m_hitsVec.assign(timeslices, 0);
           m_errVec.assign(timeslices, 0);
           m_hitsVec[slice] = hits;
           m_errVec[slice]  = err;
-          jh = new LVL1::CMMJetHits(swCrate, dataID, m_hitsVec, m_errVec, trigCmm);
+          auto jhp =
+            std::make_unique<LVL1::CMMJetHits>(swCrate, dataID, m_hitsVec, m_errVec, trigCmm);
           const int key = crate * 100 + dataID;
-          m_cmmHitsMap.insert(std::make_pair(key, jh));
-          m_cmmHitCollection->push_back(jh);
+          data.m_cmmHitsMap.insert(std::make_pair(key, jhp.get()));
+          data.m_cmmHitCollection->push_back(std::move(jhp));
         } else {
           m_hitsVec = jh->HitsVec();
           m_errVec  = jh->ErrorVec();
@@ -1203,16 +1205,17 @@ void JepByteStreamV1Tool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm)
       const unsigned int etMap = subBlock->jetEtMap(slice);
       if ( etMap || ssError ) {
         const int dataID = LVL1::CMMJetHits::ET_MAP;
-        LVL1::CMMJetHits* map = findCmmHits(crate, dataID);
+        LVL1::CMMJetHits* map = findCmmHits(data, crate, dataID);
         if ( ! map ) {
           m_hitsVec.assign(timeslices, 0);
           m_errVec.assign(timeslices, 0);
           m_hitsVec[slice] = etMap;
           m_errVec[slice]  = ssError;
-          map = new LVL1::CMMJetHits(swCrate, dataID, m_hitsVec, m_errVec, trigCmm);
+          auto mapp =
+            std::make_unique<LVL1::CMMJetHits>(swCrate, dataID, m_hitsVec, m_errVec, trigCmm);
           const int key = crate * 100 + dataID;
-          m_cmmHitsMap.insert(std::make_pair(key, map));
-          m_cmmHitCollection->push_back(map);
+          data.m_cmmHitsMap.insert(std::make_pair(key, mapp.get()));
+          data.m_cmmHitCollection->push_back(std::move(mapp));
         } else {
           m_hitsVec = map->HitsVec();
           m_errVec  = map->ErrorVec();
@@ -1242,7 +1245,7 @@ void JepByteStreamV1Tool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm)
 // Unpack JEM sub-block
 
 void JepByteStreamV1Tool::decodeJem(JemSubBlockV1* subBlock, int trigJem,
-                                    const CollectionType collection)
+                                    JepByteStreamToolData& data)
 {
   const bool debug   = msgLvl(MSG::DEBUG);
   const bool verbose = msgLvl(MSG::VERBOSE);
@@ -1294,7 +1297,8 @@ void JepByteStreamV1Tool::decodeJem(JemSubBlockV1* subBlock, int trigJem,
   const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
   for (int slice = sliceBeg; slice < sliceEnd; ++slice) {
 
-    if (collection == JET_ELEMENTS) {
+    if (data.m_collection == JET_ELEMENTS) {
+      JetElementData& jedata = static_cast<JetElementData&>(data);
 
       // Loop over jet element channels and fill jet elements
 
@@ -1306,13 +1310,15 @@ void JepByteStreamV1Tool::decodeJem(JemSubBlockV1* subBlock, int trigJem,
           int layer = 0;
           if (m_jemMaps->mapping(crate, module, chan, eta, phi, layer)) {
             if (layer == m_coreOverlap) {
-              LVL1::JetElement* je = findJetElement(eta, phi);
+	      LVL1::JetElement* je = findJetElement(jedata, eta, phi);
               if ( ! je ) {   // create new jet element
                 const unsigned int key = m_elementKey->jeKey(phi, eta);
-                je = new LVL1::JetElement(phi, eta, dummy, dummy, key,
-                                          dummy, dummy, dummy, trigJem);
-                m_jeMap.insert(std::make_pair(key, je));
-                m_jeCollection->push_back(je);
+                auto jep =
+                  std::make_unique<LVL1::JetElement>(phi, eta, dummy, dummy, key,
+                                                     dummy, dummy, dummy, trigJem);
+                je = jep.get();
+                jedata.m_jeMap.insert(std::make_pair(key, jep.get()));
+                jedata.m_jeCollection->push_back(std::move(jep));
               } else {
                 const std::vector<int>& emEnergy(je->emEnergyVec());
                 const std::vector<int>& hadEnergy(je->hadEnergyVec());
@@ -1357,19 +1363,21 @@ void JepByteStreamV1Tool::decodeJem(JemSubBlockV1* subBlock, int trigJem,
           msg(MSG::DEBUG);
         }
       }
-    } else if (collection == JET_HITS) {
+    } else if (data.m_collection == JET_HITS) {
+      JetHitsData& jhdata = static_cast<JetHitsData&>(data);
 
       // Get jet hits
 
       const unsigned int hits = subBlock->jetHits(slice);
       if (hits) {
-        LVL1::JEMHits* jh = findJetHits(crate, module);
+        LVL1::JEMHits* jh = findJetHits(jhdata, crate, module);
         if ( ! jh ) {   // create new jet hits
           m_hitsVec.assign(timeslices, 0);
           m_hitsVec[slice] = hits;
-          jh = new LVL1::JEMHits(swCrate, module, m_hitsVec, trigJem);
-          m_hitsMap.insert(std::make_pair(crate * m_modules + module, jh));
-          m_hitCollection->push_back(jh);
+          auto jhp =
+            std::make_unique<LVL1::JEMHits>(swCrate, module, m_hitsVec, trigJem);
+          jhdata.m_hitsMap.insert(std::make_pair(crate * m_modules + module, jhp.get()));
+          jhdata.m_hitCollection->push_back(std::move(jhp));
         } else {
           m_hitsVec = jh->JetHitsVec();
           const int nsl = m_hitsVec.size();
@@ -1396,7 +1404,8 @@ void JepByteStreamV1Tool::decodeJem(JemSubBlockV1* subBlock, int trigJem,
                           << endmsg;
         msg(MSG::DEBUG);
       }
-    } else if (collection == ENERGY_SUMS) {
+    } else if (data.m_collection == ENERGY_SUMS) {
+      EnergySumsData& sumdata = static_cast<EnergySumsData&>(data);
 
       // Get energy subsums
 
@@ -1404,7 +1413,7 @@ void JepByteStreamV1Tool::decodeJem(JemSubBlockV1* subBlock, int trigJem,
       const unsigned int ey = subBlock->ey(slice);
       const unsigned int et = subBlock->et(slice);
       if (ex | ey | et) {
-        LVL1::JEMEtSums* sums = findEnergySums(crate, module);
+	LVL1::JEMEtSums* sums = findEnergySums(sumdata, crate, module);
         if ( ! sums ) {   // create new energy sums
           m_exVec.assign(timeslices, 0);
           m_eyVec.assign(timeslices, 0);
@@ -1412,10 +1421,11 @@ void JepByteStreamV1Tool::decodeJem(JemSubBlockV1* subBlock, int trigJem,
           m_exVec[slice] = ex;
           m_eyVec[slice] = ey;
           m_etVec[slice] = et;
-          sums = new LVL1::JEMEtSums(swCrate, module, m_etVec, m_exVec, m_eyVec,
-                                     trigJem);
-          m_etMap.insert(std::make_pair(crate * m_modules + module, sums));
-          m_etCollection->push_back(sums);
+          auto sumsp =
+            std::make_unique<LVL1::JEMEtSums>(swCrate, module, m_etVec, m_exVec, m_eyVec,
+                                              trigJem);
+          sumdata.m_etMap.insert(std::make_pair(crate * m_modules + module, sumsp.get()));
+          sumdata.m_etCollection->push_back(std::move(sumsp));
         } else {
           m_exVec = sums->ExVec();
           m_eyVec = sums->EyVec();
@@ -1455,63 +1465,104 @@ void JepByteStreamV1Tool::decodeJem(JemSubBlockV1* subBlock, int trigJem,
 
 // Find a jet element given eta, phi
 
+const 
 LVL1::JetElement* JepByteStreamV1Tool::findJetElement(const double eta,
-    const double phi)
+                                                      const double phi) const
 {
-  LVL1::JetElement* tt = 0;
   const unsigned int key = m_elementKey->jeKey(phi, eta);
-  JetElementMap::const_iterator mapIter;
-  mapIter = m_jeMap.find(key);
-  if (mapIter != m_jeMap.end()) tt = mapIter->second;
-  return tt;
+  ConstJetElementMap::const_iterator mapIter = m_jeMap.find(key);
+  if (mapIter != m_jeMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::JetElement* JepByteStreamV1Tool::findJetElement(const JetElementData& data,
+                                                      const double eta,
+                                                      const double phi) const
+{
+  const unsigned int key = m_elementKey->jeKey(phi, eta);
+  JetElementMap::const_iterator mapIter = data.m_jeMap.find(key);
+  if (mapIter != data.m_jeMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find jet hits for given crate, module
 
+const
 LVL1::JEMHits* JepByteStreamV1Tool::findJetHits(const int crate,
-    const int module)
+                                                const int module) const
+{
+  ConstJetHitsMap::const_iterator mapIter = m_hitsMap.find(crate * m_modules + module);
+  if (mapIter != m_hitsMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::JEMHits* JepByteStreamV1Tool::findJetHits(const JetHitsData& data,
+                                                const int crate,
+                                                const int module) const
 {
-  LVL1::JEMHits* hits = 0;
-  JetHitsMap::const_iterator mapIter;
-  mapIter = m_hitsMap.find(crate * m_modules + module);
-  if (mapIter != m_hitsMap.end()) hits = mapIter->second;
-  return hits;
+  JetHitsMap::const_iterator mapIter = data.m_hitsMap.find(crate * m_modules + module);
+  if (mapIter != data.m_hitsMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find energy sums for given crate, module
 
+const
 LVL1::JEMEtSums* JepByteStreamV1Tool::findEnergySums(const int crate,
-    const int module)
+                                                     const int module) const
+{
+  ConstEnergySumsMap::const_iterator mapIter = m_etMap.find(crate * m_modules + module);
+  if (mapIter != m_etMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::JEMEtSums* JepByteStreamV1Tool::findEnergySums(const EnergySumsData& data,
+                                                     const int crate,
+                                                     const int module) const
 {
-  LVL1::JEMEtSums* sums = 0;
-  EnergySumsMap::const_iterator mapIter;
-  mapIter = m_etMap.find(crate * m_modules + module);
-  if (mapIter != m_etMap.end()) sums = mapIter->second;
-  return sums;
+  EnergySumsMap::const_iterator mapIter = data.m_etMap.find(crate * m_modules + module);
+  if (mapIter != data.m_etMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CMM hits for given crate, dataID
 
+const
 LVL1::CMMJetHits* JepByteStreamV1Tool::findCmmHits(const int crate,
-    const int dataID)
+                                                   const int dataID) const
 {
-  LVL1::CMMJetHits* hits = 0;
-  CmmHitsMap::const_iterator mapIter;
-  mapIter = m_cmmHitsMap.find(crate * 100 + dataID);
-  if (mapIter != m_cmmHitsMap.end()) hits = mapIter->second;
-  return hits;
+  ConstCmmHitsMap::const_iterator mapIter = m_cmmHitsMap.find(crate * 100 + dataID);
+  if (mapIter != m_cmmHitsMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CMMJetHits* JepByteStreamV1Tool::findCmmHits(const CmmHitsData& data,
+                                                   const int crate,
+                                                   const int dataID) const
+{
+  CmmHitsMap::const_iterator mapIter = data.m_cmmHitsMap.find(crate * 100 + dataID);
+  if (mapIter != data.m_cmmHitsMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CMM energy sums for given crate, module, dataID
 
+const
 LVL1::CMMEtSums* JepByteStreamV1Tool::findCmmSums(const int crate,
-    const int dataID)
+                                                  const int dataID) const
 {
-  LVL1::CMMEtSums* sums = 0;
-  CmmSumsMap::const_iterator mapIter;
-  mapIter = m_cmmEtMap.find(crate * 100 + dataID);
-  if (mapIter != m_cmmEtMap.end()) sums = mapIter->second;
-  return sums;
+  ConstCmmSumsMap::const_iterator mapIter = m_cmmEtMap.find(crate * 100 + dataID);
+  if (mapIter != m_cmmEtMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CMMEtSums* JepByteStreamV1Tool::findCmmSums(const CmmSumsData& data,
+                                                  const int crate,
+                                                  const int dataID) const
+{
+  CmmSumsMap::const_iterator mapIter = data.m_cmmEtMap.find(crate * 100 + dataID);
+  if (mapIter != data.m_cmmEtMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Set up jet element map
@@ -1531,6 +1582,7 @@ void JepByteStreamV1Tool::setupJeMap(const JetElementCollection*
   }
 }
 
+
 // Set up jet hits map
 
 void JepByteStreamV1Tool::setupHitsMap(const JetHitsCollection*
@@ -1541,7 +1593,7 @@ void JepByteStreamV1Tool::setupHitsMap(const JetHitsCollection*
     JetHitsCollection::const_iterator pos  = hitCollection->begin();
     JetHitsCollection::const_iterator pose = hitCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::JEMHits* const hits = *pos;
+      const LVL1::JEMHits* const hits = *pos;
       const int crate = hits->crate() - m_crateOffsetSw;
       const int key   = m_modules * crate + hits->module();
       m_hitsMap.insert(std::make_pair(key, hits));
@@ -1559,7 +1611,7 @@ void JepByteStreamV1Tool::setupEtMap(const EnergySumsCollection*
     EnergySumsCollection::const_iterator pos  = etCollection->begin();
     EnergySumsCollection::const_iterator pose = etCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::JEMEtSums* const sums = *pos;
+      const LVL1::JEMEtSums* const sums = *pos;
       const int crate = sums->crate() - m_crateOffsetSw;
       const int key   = m_modules * crate + sums->module();
       m_etMap.insert(std::make_pair(key, sums));
@@ -1577,7 +1629,7 @@ void JepByteStreamV1Tool::setupCmmHitsMap(const CmmHitsCollection*
     CmmHitsCollection::const_iterator pos  = hitCollection->begin();
     CmmHitsCollection::const_iterator pose = hitCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CMMJetHits* const hits = *pos;
+      const LVL1::CMMJetHits* const hits = *pos;
       const int crate = hits->crate() - m_crateOffsetSw;
       const int key   = crate * 100 + hits->dataID();
       m_cmmHitsMap.insert(std::make_pair(key, hits));
@@ -1595,7 +1647,7 @@ void JepByteStreamV1Tool::setupCmmEtMap(const CmmSumsCollection*
     CmmSumsCollection::const_iterator pos  = etCollection->begin();
     CmmSumsCollection::const_iterator pose = etCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CMMEtSums* const sums = *pos;
+      const LVL1::CMMEtSums* const sums = *pos;
       const int crate = sums->crate() - m_crateOffsetSw;
       const int key   = crate * 100 + sums->dataID();
       m_cmmEtMap.insert(std::make_pair(key, sums));
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.h
index 85e61f68d1eba84d6fcaad58f27076768511f1e7..7eda9a1ff53b2a59cf4f767317764cbea1b36d2f 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.h
@@ -96,35 +96,87 @@ class JepByteStreamV1Tool : public AthAlgTool {
    typedef DataVector<LVL1::CMMJetHits>                  CmmHitsCollection;
    typedef DataVector<LVL1::CMMEtSums>                   CmmSumsCollection;
    typedef std::map<unsigned int, LVL1::JetElement*>     JetElementMap;
+   typedef std::map<unsigned int, const LVL1::JetElement*> ConstJetElementMap;
    typedef std::map<int, LVL1::JEMHits*>                 JetHitsMap;
+   typedef std::map<int, const LVL1::JEMHits*>           ConstJetHitsMap;
    typedef std::map<int, LVL1::JEMEtSums*>               EnergySumsMap;
+   typedef std::map<int, const LVL1::JEMEtSums*>         ConstEnergySumsMap;
    typedef std::map<int, LVL1::CMMJetHits*>              CmmHitsMap;
+   typedef std::map<int, const LVL1::CMMJetHits*>        ConstCmmHitsMap;
    typedef std::map<int, LVL1::CMMEtSums*>               CmmSumsMap;
+   typedef std::map<int, const LVL1::CMMEtSums*>         ConstCmmSumsMap;
    typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      ROBPointer;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      RODPointer;
 
+   struct JepByteStreamToolData
+   {
+     JepByteStreamToolData (const CollectionType collection)
+       : m_collection(collection){}
+     const CollectionType m_collection;
+   };
+   struct JetElementData : public JepByteStreamToolData
+   {
+     JetElementData (JetElementCollection* const jeCollection)
+       : JepByteStreamToolData (JET_ELEMENTS), m_jeCollection (jeCollection) {}
+     JetElementCollection* const m_jeCollection;
+     JetElementMap m_jeMap;
+   };
+   struct JetHitsData : public JepByteStreamToolData
+   {
+     JetHitsData (JetHitsCollection* const hitCollection)
+       : JepByteStreamToolData (JET_HITS), m_hitCollection (hitCollection) {}
+     JetHitsCollection* const m_hitCollection;
+     JetHitsMap    m_hitsMap;
+   };
+   struct EnergySumsData : public JepByteStreamToolData
+   {
+     EnergySumsData (EnergySumsCollection* const etCollection)
+       : JepByteStreamToolData (ENERGY_SUMS), m_etCollection (etCollection) {}
+     EnergySumsCollection* const m_etCollection;
+     EnergySumsMap m_etMap;
+   };
+   struct CmmHitsData : public JepByteStreamToolData
+   {
+     CmmHitsData (CmmHitsCollection* const cmmHitCollection)
+       : JepByteStreamToolData (CMM_HITS), m_cmmHitCollection (cmmHitCollection) {}
+     CmmHitsCollection* const m_cmmHitCollection;
+     CmmHitsMap    m_cmmHitsMap;
+   };
+   struct CmmSumsData : public JepByteStreamToolData
+   {
+     CmmSumsData (CmmSumsCollection* const cmmEtCollection)
+       : JepByteStreamToolData (CMM_SUMS), m_cmmEtCollection (cmmEtCollection) {}
+     CmmSumsCollection* const m_cmmEtCollection;
+     CmmSumsMap    m_cmmEtMap;
+   };
+
    /// Convert bytestream to given container type
    StatusCode convertBs(const IROBDataProviderSvc::VROBFRAG& robFrags,
-                        CollectionType collection);
+                        JepByteStreamToolData& data);
    /// Unpack CMM-Energy sub-block
-   void decodeCmmEnergy(CmmEnergySubBlock* subBlock, int trigCmm);
+   void decodeCmmEnergy(CmmEnergySubBlock* subBlock, int trigCmm, CmmSumsData& data);
    /// Unpack CMM-Jet sub-block
-   void decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm);
+   void decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm, CmmHitsData& data);
    /// Unpack JEM sub-block
    void decodeJem(JemSubBlockV1* subBlock, int trigJem,
-                                         CollectionType collection);
+                  JepByteStreamToolData& data);
 
    /// Find a jet element given eta, phi
-   LVL1::JetElement* findJetElement(double eta, double phi);
+   const LVL1::JetElement* findJetElement(double eta, double phi) const;
+   LVL1::JetElement* findJetElement(const JetElementData& data, double eta, double phi) const;
    /// Find jet hits for given crate, module
-   LVL1::JEMHits*    findJetHits(int crate, int module);
+   const LVL1::JEMHits*    findJetHits(int crate, int module) const;
+   LVL1::JEMHits*    findJetHits(const JetHitsData& data, int crate, int module) const;
    /// Find energy sums for given crate, module
-   LVL1::JEMEtSums*  findEnergySums(int crate, int module);
+   const LVL1::JEMEtSums*  findEnergySums(int crate, int module) const;
+   LVL1::JEMEtSums*  findEnergySums(const EnergySumsData& data, int crate, int module) const;
    /// Find CMM hits for given crate, data ID
-   LVL1::CMMJetHits* findCmmHits(int crate, int dataID);
+   const LVL1::CMMJetHits* findCmmHits(int crate, int dataID) const;
+   LVL1::CMMJetHits* findCmmHits(const CmmHitsData& data, int crate, int dataID) const;
    /// Find CMM energy sums for given crate, data ID
-   LVL1::CMMEtSums*  findCmmSums(int crate, int dataID);
+   const LVL1::CMMEtSums*  findCmmSums(int crate, int dataID) const;
+   LVL1::CMMEtSums*  findCmmSums(const CmmSumsData& data, int crate, int dataID) const;
 
    /// Set up jet element map
    void setupJeMap(const JetElementCollection* jeCollection);
@@ -210,26 +262,16 @@ class JepByteStreamV1Tool : public AthAlgTool {
    DataVector<CmmEnergySubBlock> m_cmmEnergyBlocks;
    /// Vector for current CMM-Jet sub-blocks
    DataVector<CmmJetSubBlock> m_cmmJetBlocks;
-   /// Current jet elements collection
-   JetElementCollection* m_jeCollection;
-   /// Current jet hits collection
-   JetHitsCollection*    m_hitCollection;
-   /// Current energy sums collection
-   EnergySumsCollection* m_etCollection;
-   /// Current CMM hits collection
-   CmmHitsCollection*    m_cmmHitCollection;
-   /// Current CMM energy sums collection
-   CmmSumsCollection*    m_cmmEtCollection;
    /// Jet element map
-   JetElementMap m_jeMap;
+   ConstJetElementMap m_jeMap;
    /// Jet hits map
-   JetHitsMap    m_hitsMap;
+   ConstJetHitsMap    m_hitsMap;
    /// Energy sums map
-   EnergySumsMap m_etMap;
+   ConstEnergySumsMap m_etMap;
    /// CMM hits map
-   CmmHitsMap    m_cmmHitsMap;
+   ConstCmmHitsMap    m_cmmHitsMap;
    /// CMM energy sums map
-   CmmSumsMap    m_cmmEtMap;
+   ConstCmmSumsMap    m_cmmEtMap;
    /// ROD Status words
    std::vector<uint32_t>* m_rodStatus;
    /// ROD status map
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Tool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Tool.cxx
index 32a045b365109f54704efbea075ea75589b754fe..5c29b9cfbcde64ca686671063aad32011ed47ff3 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Tool.cxx
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Tool.cxx
@@ -168,9 +168,8 @@ StatusCode JepByteStreamV2Tool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::JetElement>*  jeCollection)
 {
-  m_jeCollection = jeCollection;
-  m_jeMap.clear();
-  return convertBs(robFrags, JET_ELEMENTS);
+  JetElementData data (jeCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to energy sums
@@ -190,9 +189,8 @@ StatusCode JepByteStreamV2Tool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::JEMEtSums>*  etCollection)
 {
-  m_etCollection = etCollection;
-  m_etMap.clear();
-  return convertBs(robFrags, ENERGY_SUMS);
+  EnergySumsData data (etCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMX TOBs
@@ -212,9 +210,8 @@ StatusCode JepByteStreamV2Tool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::CMXJetTob>*  tobCollection)
 {
-  m_cmxTobCollection = tobCollection;
-  m_cmxTobMap.clear();
-  return convertBs(robFrags, CMX_TOBS);
+  CmxTobData data (tobCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMX hits
@@ -234,9 +231,8 @@ StatusCode JepByteStreamV2Tool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::CMXJetHits>*  hitCollection)
 {
-  m_cmxHitCollection = hitCollection;
-  m_cmxHitsMap.clear();
-  return convertBs(robFrags, CMX_HITS);
+  CmxHitsData data (hitCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion bytestream to CMX energy sums
@@ -257,9 +253,8 @@ StatusCode JepByteStreamV2Tool::convert(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
                             DataVector<LVL1::CMXEtSums>*  etCollection)
 {
-  m_cmxEtCollection = etCollection;
-  m_cmxEtMap.clear();
-  return convertBs(robFrags, CMX_SUMS);
+  CmxSumsData data (etCollection);
+  return convertBs(robFrags, data);
 }
 
 // Conversion of JEP container to bytestream
@@ -668,7 +663,7 @@ const std::vector<uint32_t>& JepByteStreamV2Tool::sourceIDs(
 
 StatusCode JepByteStreamV2Tool::convertBs(
                             const IROBDataProviderSvc::VROBFRAG& robFrags,
-                            const CollectionType collection)
+                            JepByteStreamToolData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -794,8 +789,8 @@ StatusCode JepByteStreamV2Tool::convertBs(
 	    m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
 	    break;
           }
-	  if (collection == CMX_HITS || collection == CMX_TOBS) {
-	    decodeCmxJet(m_cmxJetSubBlock, trigJem, collection);
+	  if (data.m_collection == CMX_HITS || data.m_collection == CMX_TOBS) {
+	    decodeCmxJet(m_cmxJetSubBlock, trigJem, data);
 	    if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
 	      if (debug) msg() << "decodeCmxJet failed" << endmsg;
 	      break;
@@ -810,8 +805,8 @@ StatusCode JepByteStreamV2Tool::convertBs(
 	    m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
 	    break;
           }
-	  if (collection == CMX_SUMS) {
-	    decodeCmxEnergy(m_cmxEnergySubBlock, trigJem);
+	  if (data.m_collection == CMX_SUMS) {
+	    decodeCmxEnergy(m_cmxEnergySubBlock, trigJem, static_cast<CmxSumsData&>(data));
 	    if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
 	      if (debug) msg() << "decodeCmxEnergy failed" << endmsg;
 	      break;
@@ -832,8 +827,8 @@ StatusCode JepByteStreamV2Tool::convertBs(
 	  m_rodErr = L1CaloSubBlock::ERROR_CRATE_NUMBER;
 	  break;
         }
-	if (collection == JET_ELEMENTS || collection == ENERGY_SUMS) {
-	  decodeJem(m_jemSubBlock, trigJem, collection);
+	if (data.m_collection == JET_ELEMENTS || data.m_collection == ENERGY_SUMS) {
+	  decodeJem(m_jemSubBlock, trigJem, data);
 	  if (m_rodErr != L1CaloSubBlock::ERROR_NONE) {
 	    if (debug) msg() << "decodeJem failed" << endmsg;
 	    break;
@@ -851,7 +846,8 @@ StatusCode JepByteStreamV2Tool::convertBs(
 // Unpack CMX-Energy sub-block
 
 void JepByteStreamV2Tool::decodeCmxEnergy(CmxEnergySubBlock* subBlock,
-                                                                 int trigJem)
+                                          int trigJem,
+                                          CmxSumsData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -970,7 +966,7 @@ void JepByteStreamV2Tool::decodeCmxEnergy(CmxEnergySubBlock* subBlock,
       eyErr = eyErrBits.error();
       etErr = etErrBits.error();
       if (ex || ey || et || exErr || eyErr || etErr) {
-        LVL1::CMXEtSums* sums = findCmxSums(crate, source);
+        LVL1::CMXEtSums* sums = findCmxSums(data, crate, source);
 	if ( ! sums ) {   // create new CMX energy sums
 	  exVec.assign(timeslices, 0);
 	  eyVec.assign(timeslices, 0);
@@ -984,11 +980,12 @@ void JepByteStreamV2Tool::decodeCmxEnergy(CmxEnergySubBlock* subBlock,
 	  exErrVec[slice] = exErr;
 	  eyErrVec[slice] = eyErr;
 	  etErrVec[slice] = etErr;
-	  sums = new LVL1::CMXEtSums(swCrate, source, etVec, exVec, eyVec,
-				     etErrVec, exErrVec, eyErrVec, trigJem);
+	  auto sumsp =
+            std::make_unique<LVL1::CMXEtSums>(swCrate, source, etVec, exVec, eyVec,
+                                              etErrVec, exErrVec, eyErrVec, trigJem);
           const int key = crate*100 + source;
-	  m_cmxEtMap.insert(std::make_pair(key, sums));
-	  m_cmxEtCollection->push_back(sums);
+	  data.m_cmxEtMap.insert(std::make_pair(key, sumsp.get()));
+	  data.m_cmxEtCollection->push_back(std::move(sumsp));
         } else {
 	  exVec = sums->ExVec();
 	  eyVec = sums->EyVec();
@@ -1030,7 +1027,7 @@ void JepByteStreamV2Tool::decodeCmxEnergy(CmxEnergySubBlock* subBlock,
 // Unpack CMX-Jet sub-block
 
 void JepByteStreamV2Tool::decodeCmxJet(CmxJetSubBlock* subBlock, int trigJem,
-                                             const CollectionType collection)
+                                       JepByteStreamToolData& data)
 {
   const bool debug = msgLvl(MSG::DEBUG);
   if (debug) msg(MSG::DEBUG);
@@ -1095,7 +1092,8 @@ void JepByteStreamV2Tool::decodeCmxJet(CmxJetSubBlock* subBlock, int trigJem,
 
     // Jet TOBs
 
-    if (collection == CMX_TOBS) {
+    if (data.m_collection == CMX_TOBS) {
+      CmxTobData& tdata = static_cast<CmxTobData&> (data);
 
       for (int jem = 0; jem < m_modules; ++jem) {
         const unsigned int presenceMap = subBlock->presenceMap(slice, jem);
@@ -1119,7 +1117,7 @@ void JepByteStreamV2Tool::decodeCmxJet(CmxJetSubBlock* subBlock, int trigJem,
           }
 	  error = errBits.error();
 	  const int key = tobKey(crate, jem, frame, loc);
-	  LVL1::CMXJetTob* tb = findCmxTob(key);
+	  LVL1::CMXJetTob* tb = findCmxTob(tdata, key);
 	  if ( ! tb ) { // create new CMX TOB
 	    energyLgVec.assign(timeslices, 0);
 	    energySmVec.assign(timeslices, 0);
@@ -1129,11 +1127,12 @@ void JepByteStreamV2Tool::decodeCmxJet(CmxJetSubBlock* subBlock, int trigJem,
 	    energySmVec[slice] = energySmall;
 	    errorVec[slice]    = error;
 	    presenceMapVec[slice] = presenceMap;
-	    tb = new LVL1::CMXJetTob(swCrate, jem, frame, loc,
-	                             energyLgVec, energySmVec, errorVec,
-				     presenceMapVec, trigJem);
-	    m_cmxTobMap.insert(std::make_pair(key, tb));
-	    m_cmxTobCollection->push_back(tb);
+	    auto tbp =
+              std::make_unique<LVL1::CMXJetTob>(swCrate, jem, frame, loc,
+                                                energyLgVec, energySmVec, errorVec,
+                                                presenceMapVec, trigJem);
+	    tdata.m_cmxTobMap.insert(std::make_pair(key, tbp.get()));
+	    tdata.m_cmxTobCollection->push_back(std::move(tbp));
           } else {
 	    energyLgVec = tb->energyLgVec();
 	    energySmVec = tb->energySmVec();
@@ -1164,7 +1163,8 @@ void JepByteStreamV2Tool::decodeCmxJet(CmxJetSubBlock* subBlock, int trigJem,
 
     // Jet hit counts and topo info
 
-    else if (collection == CMX_HITS) {
+    else if (data.m_collection == CMX_HITS) {
+      CmxHitsData& hdata = static_cast<CmxHitsData&> (data);
 
       for (int source = 0; source < maxSource; ++source) {
         if (summing == CmxSubBlock::CRATE && 
@@ -1187,7 +1187,7 @@ void JepByteStreamV2Tool::decodeCmxJet(CmxJetSubBlock* subBlock, int trigJem,
 	err0 = err0Bits.error();
 	err1 = err1Bits.error();
 	if (hit0 || hit1 || err0 || err1) {
-          LVL1::CMXJetHits* jh = findCmxHits(crate, source);
+          LVL1::CMXJetHits* jh = findCmxHits(hdata, crate, source);
 	  if ( ! jh ) {   // create new CMX hits
 	    hit0Vec.assign(timeslices, 0);
 	    hit1Vec.assign(timeslices, 0);
@@ -1197,11 +1197,12 @@ void JepByteStreamV2Tool::decodeCmxJet(CmxJetSubBlock* subBlock, int trigJem,
 	    hit1Vec[slice] = hit1;
 	    err0Vec[slice] = err0;
 	    err1Vec[slice] = err1;
-	    jh = new LVL1::CMXJetHits(swCrate, source, hit0Vec, hit1Vec,
-	                              err0Vec, err1Vec, trigJem);
+	    auto jhp =
+              std::make_unique<LVL1::CMXJetHits>(swCrate, source, hit0Vec, hit1Vec,
+                                                 err0Vec, err1Vec, trigJem);
             const int key = crate*100 + source;
-	    m_cmxHitsMap.insert(std::make_pair(key, jh));
-	    m_cmxHitCollection->push_back(jh);
+	    hdata.m_cmxHitsMap.insert(std::make_pair(key, jhp.get()));
+	    hdata.m_cmxHitCollection->push_back(std::move(jhp));
           } else {
 	    hit0Vec = jh->hitsVec0();
 	    hit1Vec = jh->hitsVec1();
@@ -1237,7 +1238,7 @@ void JepByteStreamV2Tool::decodeCmxJet(CmxJetSubBlock* subBlock, int trigJem,
 // Unpack JEM sub-block
 
 void JepByteStreamV2Tool::decodeJem(JemSubBlockV2* subBlock, int trigJem,
-                                        const CollectionType collection)
+                                    JepByteStreamToolData& data)
 {
   const bool debug   = msgLvl(MSG::DEBUG);
   const bool verbose = msgLvl(MSG::VERBOSE);
@@ -1292,7 +1293,8 @@ void JepByteStreamV2Tool::decodeJem(JemSubBlockV2* subBlock, int trigJem,
   const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
   for (int slice = sliceBeg; slice < sliceEnd; ++slice) {
 
-    if (collection == JET_ELEMENTS) {
+    if (data.m_collection == JET_ELEMENTS) {
+      JetElementData& jedata = static_cast<JetElementData&> (data);
 
       // Loop over jet element channels and fill jet elements
 
@@ -1304,13 +1306,15 @@ void JepByteStreamV2Tool::decodeJem(JemSubBlockV2* subBlock, int trigJem,
 	  int layer = 0;
 	  if (m_jemMaps->mapping(crate, module, chan, eta, phi, layer)) {
 	    if (layer == m_coreOverlap) {
-	      LVL1::JetElement* je = findJetElement(eta, phi);
+	      LVL1::JetElement* je = findJetElement(jedata, eta, phi);
 	      if ( ! je ) {   // create new jet element
 	        const unsigned int key = m_elementKey->jeKey(phi, eta);
-	        je = new LVL1::JetElement(phi, eta, dummy, dummy, key,
-	                                  dummy, dummy, dummy, trigJem);
-	        m_jeMap.insert(std::make_pair(key, je));
-	        m_jeCollection->push_back(je);
+                auto jep =
+                  std::make_unique<LVL1::JetElement>(phi, eta, dummy, dummy, key,
+                                                     dummy, dummy, dummy, trigJem);
+                je = jep.get();
+	        jedata.m_jeMap.insert(std::make_pair(key, jep.get()));
+	        jedata.m_jeCollection->push_back(std::move(jep));
               } else {
 	        const std::vector<int>& emEnergy(je->emEnergyVec());
 		const std::vector<int>& hadEnergy(je->hadEnergyVec());
@@ -1355,7 +1359,8 @@ void JepByteStreamV2Tool::decodeJem(JemSubBlockV2* subBlock, int trigJem,
 	  msg(MSG::DEBUG);
         }
       }
-    } else if (collection == ENERGY_SUMS) {
+    } else if (data.m_collection == ENERGY_SUMS) {
+      EnergySumsData& sumdata = static_cast<EnergySumsData&> (data);
 
       // Get energy subsums
 
@@ -1363,7 +1368,7 @@ void JepByteStreamV2Tool::decodeJem(JemSubBlockV2* subBlock, int trigJem,
       const unsigned int ey = subBlock->ey(slice);
       const unsigned int et = subBlock->et(slice);
       if (ex | ey | et) {
-	LVL1::JEMEtSums* sums = findEnergySums(crate, module);
+	LVL1::JEMEtSums* sums = findEnergySums(sumdata, crate, module);
 	if ( ! sums ) {   // create new energy sums
 	  exVec.assign(timeslices, 0);
 	  eyVec.assign(timeslices, 0);
@@ -1371,10 +1376,11 @@ void JepByteStreamV2Tool::decodeJem(JemSubBlockV2* subBlock, int trigJem,
 	  exVec[slice] = ex;
 	  eyVec[slice] = ey;
 	  etVec[slice] = et;
-	  sums = new LVL1::JEMEtSums(swCrate, module, etVec, exVec, eyVec,
-	                                                          trigJem);
-          m_etMap.insert(std::make_pair(crate*m_modules+module, sums));
-	  m_etCollection->push_back(sums);
+	  auto sumsp =
+            std::make_unique<LVL1::JEMEtSums>(swCrate, module, etVec, exVec, eyVec,
+                                              trigJem);
+          sumdata.m_etMap.insert(std::make_pair(crate*m_modules+module, sumsp.get()));
+	  sumdata.m_etCollection->push_back(std::move(sumsp));
         } else {
 	  exVec = sums->ExVec();
 	  eyVec = sums->EyVec();
@@ -1422,62 +1428,102 @@ int JepByteStreamV2Tool::tobKey(const int crate, const int jem,
 
 // Find a jet element given eta, phi
 
+const
 LVL1::JetElement* JepByteStreamV2Tool::findJetElement(const double eta,
-                                                      const double phi)
+                                                      const double phi) const
 {
-  LVL1::JetElement* tt = 0;
   const unsigned int key = m_elementKey->jeKey(phi, eta);
-  JetElementMap::const_iterator mapIter;
-  mapIter = m_jeMap.find(key);
-  if (mapIter != m_jeMap.end()) tt = mapIter->second;
-  return tt;
+  ConstJetElementMap::const_iterator mapIter = m_jeMap.find(key);
+  if (mapIter != m_jeMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::JetElement* JepByteStreamV2Tool::findJetElement(const JetElementData& data,
+                                                      const double eta,
+                                                      const double phi) const
+{
+  const unsigned int key = m_elementKey->jeKey(phi, eta);
+  JetElementMap::const_iterator mapIter = data.m_jeMap.find(key);
+  if (mapIter != data.m_jeMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find energy sums for given crate, module
 
+const
 LVL1::JEMEtSums* JepByteStreamV2Tool::findEnergySums(const int crate,
-                                                     const int module)
+                                                     const int module) const
 {
-  LVL1::JEMEtSums* sums = 0;
-  EnergySumsMap::const_iterator mapIter;
-  mapIter = m_etMap.find(crate*m_modules + module);
-  if (mapIter != m_etMap.end()) sums = mapIter->second;
-  return sums;
+  ConstEnergySumsMap::const_iterator mapIter = m_etMap.find(crate*m_modules + module);
+  if (mapIter != m_etMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::JEMEtSums* JepByteStreamV2Tool::findEnergySums(const EnergySumsData& data,
+                                                     const int crate,
+                                                     const int module) const
+{
+  EnergySumsMap::const_iterator mapIter = data.m_etMap.find(crate*m_modules + module);
+  if (mapIter != data.m_etMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CMX TOB for given crate, jem, frame, loc
 
-LVL1::CMXJetTob* JepByteStreamV2Tool::findCmxTob(const int key)
+const
+LVL1::CMXJetTob* JepByteStreamV2Tool::findCmxTob(const int key) const
 {
-  LVL1::CMXJetTob* tob = 0;
-  CmxTobMap::const_iterator mapIter;
-  mapIter = m_cmxTobMap.find(key);
-  if (mapIter != m_cmxTobMap.end()) tob = mapIter->second;
-  return tob;
+  ConstCmxTobMap::const_iterator mapIter = m_cmxTobMap.find(key);
+  if (mapIter != m_cmxTobMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CMXJetTob* JepByteStreamV2Tool::findCmxTob(const CmxTobData& data,
+                                                 const int key) const
+{
+  CmxTobMap::const_iterator mapIter = data.m_cmxTobMap.find(key);
+  if (mapIter != data.m_cmxTobMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CMX hits for given crate, source
 
+const
 LVL1::CMXJetHits* JepByteStreamV2Tool::findCmxHits(const int crate,
-                                                   const int source)
+                                                   const int source) const
+{
+  ConstCmxHitsMap::const_iterator mapIter = m_cmxHitsMap.find(crate*100 + source);
+  if (mapIter != m_cmxHitsMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CMXJetHits* JepByteStreamV2Tool::findCmxHits(const CmxHitsData& data,
+                                                   const int crate,
+                                                   const int source) const
 {
-  LVL1::CMXJetHits* hits = 0;
-  CmxHitsMap::const_iterator mapIter;
-  mapIter = m_cmxHitsMap.find(crate*100 + source);
-  if (mapIter != m_cmxHitsMap.end()) hits = mapIter->second;
-  return hits;
+  CmxHitsMap::const_iterator mapIter = data.m_cmxHitsMap.find(crate*100 + source);
+  if (mapIter != data.m_cmxHitsMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Find CMX energy sums for given crate, module, source
 
+const
 LVL1::CMXEtSums* JepByteStreamV2Tool::findCmxSums(const int crate,
-                                                  const int source)
+                                                  const int source) const
+{
+  ConstCmxSumsMap::const_iterator mapIter = m_cmxEtMap.find(crate*100 + source);
+  if (mapIter != m_cmxEtMap.end()) return mapIter->second;
+  return nullptr;
+}
+
+LVL1::CMXEtSums* JepByteStreamV2Tool::findCmxSums(const CmxSumsData& data,
+                                                  const int crate,
+                                                  const int source) const
 {
-  LVL1::CMXEtSums* sums = 0;
-  CmxSumsMap::const_iterator mapIter;
-  mapIter = m_cmxEtMap.find(crate*100 + source);
-  if (mapIter != m_cmxEtMap.end()) sums = mapIter->second;
-  return sums;
+  CmxSumsMap::const_iterator mapIter = data.m_cmxEtMap.find(crate*100 + source);
+  if (mapIter != data.m_cmxEtMap.end()) return mapIter->second;
+  return nullptr;
 }
 
 // Set up jet element map
@@ -1490,7 +1536,7 @@ void JepByteStreamV2Tool::setupJeMap(const JetElementCollection*
     JetElementCollection::const_iterator pos  = jeCollection->begin();
     JetElementCollection::const_iterator pose = jeCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::JetElement* const je = *pos;
+      const LVL1::JetElement* const je = *pos;
       const unsigned int key = m_elementKey->jeKey(je->phi(), je->eta());
       m_jeMap.insert(std::make_pair(key, je));
     }
@@ -1507,7 +1553,7 @@ void JepByteStreamV2Tool::setupEtMap(const EnergySumsCollection*
     EnergySumsCollection::const_iterator pos  = etCollection->begin();
     EnergySumsCollection::const_iterator pose = etCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::JEMEtSums* const sums = *pos;
+      const LVL1::JEMEtSums* const sums = *pos;
       const int crate = sums->crate() - m_crateOffsetSw;
       const int key   = m_modules * crate + sums->module();
       m_etMap.insert(std::make_pair(key, sums));
@@ -1525,7 +1571,7 @@ void JepByteStreamV2Tool::setupCmxTobMap(const CmxTobCollection*
     CmxTobCollection::const_iterator pos  = tobCollection->begin();
     CmxTobCollection::const_iterator pose = tobCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CMXJetTob* const tob = *pos;
+      const LVL1::CMXJetTob* const tob = *pos;
       const int crate = tob->crate() - m_crateOffsetSw;
       const int jem   = tob->jem();
       const int frame = tob->frame();
@@ -1546,7 +1592,7 @@ void JepByteStreamV2Tool::setupCmxHitsMap(const CmxHitsCollection*
     CmxHitsCollection::const_iterator pos  = hitCollection->begin();
     CmxHitsCollection::const_iterator pose = hitCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CMXJetHits* const hits = *pos;
+      const LVL1::CMXJetHits* const hits = *pos;
       const int crate = hits->crate() - m_crateOffsetSw;
       const int key   = crate*100 + hits->source();
       m_cmxHitsMap.insert(std::make_pair(key, hits));
@@ -1564,7 +1610,7 @@ void JepByteStreamV2Tool::setupCmxEtMap(const CmxSumsCollection*
     CmxSumsCollection::const_iterator pos  = etCollection->begin();
     CmxSumsCollection::const_iterator pose = etCollection->end();
     for (; pos != pose; ++pos) {
-      LVL1::CMXEtSums* const sums = *pos;
+      const LVL1::CMXEtSums* const sums = *pos;
       const int crate = sums->crate() - m_crateOffsetSw;
       const int key   = crate*100 + sums->source();
       m_cmxEtMap.insert(std::make_pair(key, sums));
diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Tool.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Tool.h
index 571f34cd17bd73193438cc6fe1583154a6d0730b..e5a65dddb851bcafa4b5dfc6390b354c284cfdbd 100755
--- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Tool.h
+++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV2Tool.h
@@ -107,39 +107,91 @@ class JepByteStreamV2Tool : public AthAlgTool {
    typedef DataVector<LVL1::CMXJetHits>                  CmxHitsCollection;
    typedef DataVector<LVL1::CMXEtSums>                   CmxSumsCollection;
    typedef std::map<unsigned int, LVL1::JetElement*>     JetElementMap;
+   typedef std::map<unsigned int, const LVL1::JetElement*> ConstJetElementMap;
    typedef std::map<int, LVL1::JEMEtSums*>               EnergySumsMap;
+   typedef std::map<int, const LVL1::JEMEtSums*>         ConstEnergySumsMap;
    typedef std::map<int, LVL1::CMXJetTob*>               CmxTobMap;
+   typedef std::map<int, const LVL1::CMXJetTob*>         ConstCmxTobMap;
    typedef std::map<int, LVL1::CMXJetHits*>              CmxHitsMap;
+   typedef std::map<int, const LVL1::CMXJetHits*>        ConstCmxHitsMap;
    typedef std::map<int, LVL1::CMXEtSums*>               CmxSumsMap;
+   typedef std::map<int, const LVL1::CMXEtSums*>         ConstCmxSumsMap;
 
    typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      ROBPointer;
    typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType      RODPointer;
 
+   struct JepByteStreamToolData
+   {
+     JepByteStreamToolData (const CollectionType collection)
+       : m_collection(collection){}
+     const CollectionType m_collection;
+   };
+   struct JetElementData : public JepByteStreamToolData
+   {
+     JetElementData (JetElementCollection* const jeCollection)
+       : JepByteStreamToolData (JET_ELEMENTS), m_jeCollection (jeCollection) {}
+     JetElementCollection* const m_jeCollection;
+     JetElementMap m_jeMap;
+   };
+   struct EnergySumsData : public JepByteStreamToolData
+   {
+     EnergySumsData (EnergySumsCollection* const etCollection)
+       : JepByteStreamToolData (ENERGY_SUMS), m_etCollection (etCollection) {}
+     EnergySumsCollection* const m_etCollection;
+     EnergySumsMap m_etMap;
+   };
+   struct CmxTobData : public JepByteStreamToolData
+   {
+     CmxTobData (CmxTobCollection* const tobCollection)
+       : JepByteStreamToolData (CMX_TOBS), m_cmxTobCollection (tobCollection) {}
+     CmxTobCollection* const m_cmxTobCollection;
+     CmxTobMap     m_cmxTobMap;
+   };
+   struct CmxHitsData : public JepByteStreamToolData
+   {
+     CmxHitsData (CmxHitsCollection* const hitCollection)
+       : JepByteStreamToolData (CMX_HITS), m_cmxHitCollection (hitCollection) {}
+     CmxHitsCollection* const m_cmxHitCollection;
+     CmxHitsMap    m_cmxHitsMap;
+   };
+   struct CmxSumsData : public JepByteStreamToolData
+   {
+     CmxSumsData (CmxSumsCollection* const etCollection)
+       : JepByteStreamToolData (CMX_SUMS), m_cmxEtCollection (etCollection) {}
+     CmxSumsCollection* const m_cmxEtCollection;
+     CmxSumsMap    m_cmxEtMap;
+   };
+
    /// Convert bytestream to given container type
    StatusCode convertBs(const IROBDataProviderSvc::VROBFRAG& robFrags,
-                        CollectionType collection);
+                        JepByteStreamToolData& data);
    /// Unpack CMX-Energy sub-block
-   void decodeCmxEnergy(CmxEnergySubBlock* subBlock, int trigJem);
+   void decodeCmxEnergy(CmxEnergySubBlock* subBlock, int trigJem, CmxSumsData& data);
    /// Unpack CMX-Jet sub-block
    void decodeCmxJet(CmxJetSubBlock* subBlock, int trigJem,
-                                         CollectionType collection);
+                     JepByteStreamToolData& data);
    /// Unpack JEM sub-block
    void decodeJem(JemSubBlockV2* subBlock, int trigJem,
-                                         CollectionType collection);
+                  JepByteStreamToolData& data);
 
    /// Find TOB map key for given crate, jem, frame, loc
    int tobKey(int crate, int jem, int frame, int loc);
    /// Find a jet element given eta, phi
-   LVL1::JetElement* findJetElement(double eta, double phi);
+   const LVL1::JetElement* findJetElement(double eta, double phi) const;
+   LVL1::JetElement* findJetElement(const JetElementData& data, double eta, double phi) const;
    /// Find energy sums for given crate, module
-   LVL1::JEMEtSums*  findEnergySums(int crate, int module);
+   const LVL1::JEMEtSums*  findEnergySums(int crate, int module) const;
+   LVL1::JEMEtSums*  findEnergySums(const EnergySumsData& data, int crate, int module) const;
    /// Find CMX TOB for given key
-   LVL1::CMXJetTob*  findCmxTob(int key);
+   const LVL1::CMXJetTob*  findCmxTob(int key) const;
+   LVL1::CMXJetTob*  findCmxTob(const CmxTobData& data, int key) const;
    /// Find CMX hits for given crate, source
-   LVL1::CMXJetHits* findCmxHits(int crate, int source);
+   const LVL1::CMXJetHits* findCmxHits(int crate, int source) const;
+   LVL1::CMXJetHits* findCmxHits(const CmxHitsData& data, int crate, int source) const;
    /// Find CMX energy sums for given crate, source
-   LVL1::CMXEtSums*  findCmxSums(int crate, int source);
+   const LVL1::CMXEtSums*  findCmxSums(int crate, int source) const;
+   LVL1::CMXEtSums*  findCmxSums(const CmxSumsData& data, int crate, int source) const;
 
    /// Set up jet element map
    void setupJeMap(const JetElementCollection* jeCollection);
@@ -235,26 +287,16 @@ class JepByteStreamV2Tool : public AthAlgTool {
    DataVector<CmxEnergySubBlock> m_cmxEnergyBlocks;
    /// Vector for current CMX-Jet sub-blocks
    DataVector<CmxJetSubBlock> m_cmxJetBlocks;
-   /// Current jet elements collection
-   JetElementCollection* m_jeCollection;
-   /// Current energy sums collection
-   EnergySumsCollection* m_etCollection;
-   /// Current CMX TOB collection
-   CmxTobCollection*     m_cmxTobCollection;
-   /// Current CMX hits collection
-   CmxHitsCollection*    m_cmxHitCollection;
-   /// Current CMX energy sums collection
-   CmxSumsCollection*    m_cmxEtCollection;
    /// Jet element map
-   JetElementMap m_jeMap;
+   ConstJetElementMap m_jeMap;
    /// Energy sums map
-   EnergySumsMap m_etMap;
+   ConstEnergySumsMap m_etMap;
    /// CMX TOB map
-   CmxTobMap     m_cmxTobMap;
+   ConstCmxTobMap     m_cmxTobMap;
    /// CMX hits map
-   CmxHitsMap    m_cmxHitsMap;
+   ConstCmxHitsMap    m_cmxHitsMap;
    /// CMX energy sums map
-   CmxSumsMap    m_cmxEtMap;
+   ConstCmxSumsMap    m_cmxEtMap;
    /// ROD Status words
    std::vector<uint32_t>* m_rodStatus;
    /// ROD status map
diff --git a/Trigger/TrigT1/TrigT1CaloCalibAthenaPool/cmt/requirements b/Trigger/TrigT1/TrigT1CaloCalibAthenaPool/cmt/requirements
deleted file mode 100755
index 34a780001f9e62846911b9c55c9e92083e5962f0..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloCalibAthenaPool/cmt/requirements
+++ /dev/null
@@ -1,13 +0,0 @@
-package TrigT1CaloCalibAthenaPool
-
-author Damien Prieur <damien.prieur@cern.ch>
-
-use AtlasPolicy     AtlasPolicy-*
-#use AtlasReflex            AtlasReflex-*             External
-
-private
-use AthenaPoolUtilities  AthenaPoolUtilities-*   Database/AthenaPOOL
-use TrigT1CaloCalibConditions       TrigT1CaloCalibConditions-*        Trigger/TrigT1
-
-apply_pattern poolcnv files="-s=${TrigT1CaloCalibConditions_root}/TrigT1CaloCalibConditions \
-                                 L1CaloPedestalContainer.h L1CaloRampDataContainer.h"
diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/cmt/requirements b/Trigger/TrigT1/TrigT1CaloCalibConditions/cmt/requirements
deleted file mode 100755
index 617d19e45e0029ab0d3989fe711a068b732ffd7c..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloCalibConditions/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package TrigT1CaloCalibConditions
-
-author Damien Prieur <damien.prieur@cern.ch>
-author Veit Scharf <veit.scharf@kip.uni-heidelberg.de>
-
-use AtlasPolicy     AtlasPolicy-*
-use GaudiInterface  GaudiInterface-*  External
-use CLIDSvc CLIDSvc-* Control
-use DataModel DataModel-* Control
-use AtlasCORAL AtlasCORAL-* External
-#use AthenaKernel AthenaKernel-* Control
-use AthenaPoolUtilities  AthenaPoolUtilities-*  Database/AthenaPOOL
-
-#use AtlasROOT AtlasROOT-* External
-#apply_tag ROOTGraphicsLibs
-
-library TrigT1CaloCalibConditions *.cxx
-apply_pattern installed_library
-apply_pattern declare_joboptions files="*.txt *.py"
-
-private
-
-use AtlasReflex  AtlasReflex-* External -no_auto_imports
-use CxxUtils     CxxUtils-*    Control
-apply_pattern lcgdict dict=TrigT1CaloCalibConditions selectionfile=selection.xml headerfiles="../TrigT1CaloCalibConditions/TrigT1CaloCalibConditionsDict.h"
-
-end_private
-
diff --git a/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/cmt/requirements b/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/cmt/requirements
deleted file mode 100644
index b4a20e2c8c9391fc60c805f5e5301755abdb2596..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloCalibToolInterfaces/cmt/requirements
+++ /dev/null
@@ -1,17 +0,0 @@
-package TrigT1CaloCalibToolInterfaces
-
-author John Morris <john.morris@cern.ch>
-
-public
-
-use AtlasPolicy                AtlasPolicy-*
-use AsgTools                   AsgTools-*               Control/AthToolSupport
-
-use TrigT1CaloEvent            TrigT1CaloEvent-*        Trigger/TrigT1
-use xAODTrigL1Calo             xAODTrigL1Calo-*         Event/xAOD
-
-
-# Declare that this package acts as a metalibrary for cmake. This ensures that libraries and
-# header files of packages that this one depends on are made available to its clients.
-# This is transparent to CMT.
-apply_pattern cmake_add_command command=metalibrary
diff --git a/Trigger/TrigT1/TrigT1CaloCalibTools/cmt/requirements b/Trigger/TrigT1/TrigT1CaloCalibTools/cmt/requirements
deleted file mode 100755
index 943049944d9d9eecceec7b6412a58bc24e429b4f..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloCalibTools/cmt/requirements
+++ /dev/null
@@ -1,68 +0,0 @@
-package TrigT1CaloCalibTools
-
-author Damien Prieur <damien.prieur@cern.ch> John Morris <john.morris@cern.ch>
-
-public
-use AtlasPolicy                 AtlasPolicy-*
-use GaudiInterface              GaudiInterface-*                External
-use AsgTools                    AsgTools-*                      Control/AthToolSupport
-
-use AtlasROOT                   AtlasROOT-*                     External
-use AtlasCORAL                  AtlasCORAL-*                    External
-use StoreGate                   StoreGate-*                     Control
-use AthenaKernel                AthenaKernel-*                  Control
-use AthenaBaseComps             AthenaBaseComps-*               Control
-use AthenaPoolUtilities         AthenaPoolUtilities-*           Database/AthenaPOOL
-use Identifier                  Identifier-*                    DetectorDescription
-use CaloEvent                   CaloEvent-*                     Calorimeter
-use CaloIdentifier              CaloIdentifier-*                Calorimeter
-use CaloDetDescr                CaloDetDescr-*                  Calorimeter
-use CaloTriggerTool             CaloTriggerTool-*               Calorimeter
-use LArRawEvent                 LArRawEvent-*                   LArCalorimeter
-use LArCabling                  LArCabling-*                    LArCalorimeter
-use LArIdentifier               LArIdentifier-*                 LArCalorimeter
-use LArRecConditions            LArRecConditions-*              LArCalorimeter
-use LArRecUtils                 LArRecUtils-*                   LArCalorimeter
-use TileConditions              TileConditions-*                TileCalorimeter
-use TileEvent                   TileEvent-*                     TileCalorimeter
-use TrigT1CaloCalibToolInterfaces TrigT1CaloCalibToolInterfaces-* Trigger/TrigT1
-use TrigT1CaloCalibConditions   TrigT1CaloCalibConditions-*     Trigger/TrigT1
-use TrigT1CaloMonitoringTools   TrigT1CaloMonitoringTools-*     Trigger/TrigT1
-use TrigT1CaloEvent             TrigT1CaloEvent-*               Trigger/TrigT1
-use TrigT1CaloToolInterfaces    TrigT1CaloToolInterfaces-*      Trigger/TrigT1
-use TrigT1CaloCondSvc           TrigT1CaloCondSvc-*             Trigger/TrigT1
-use TrigT1CaloUtils             TrigT1CaloUtils-*               Trigger/TrigT1
-use xAODTrigL1Calo		xAODTrigL1Calo-*		Event/xAOD
-use DerivationFrameworkInterfaces   DerivationFrameworkInterfaces-* PhysicsAnalysis/DerivationFramework       
-end_public
-
-private
-use AthenaMonitoring            AthenaMonitoring-*              Control
-use EventInfo                   EventInfo-*                     Event
-use LWHists                     LWHists-*                       Tools
-use CaloEvent                   CaloEvent-*                     Calorimeter
-use CaloIdentifier              CaloIdentifier-*                Calorimeter
-use CaloTriggerTool             CaloTriggerTool-*               Calorimeter
-use LArRawEvent                 LArRawEvent-*                   LArCalorimeter
-use LArTools                    LArTools-*                      LArCalorimeter
-use TrigT1CaloEvent             TrigT1CaloEvent-*               Trigger/TrigT1
-use TrigT1Interfaces            TrigT1Interfaces-*              Trigger/TrigT1
-end_private
-
-apply_tag ROOTGraphicsLibs
-
-# Specify the required ROOT components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS Graf Gpad)"
-
-# Declare the directories CMT should know about
-branches TrigT1CaloCalibTools src share
-
-# Create a dual-use library
-apply_pattern dual_use_library files= "../src/*.cxx"
-
-# Install  python modules
-apply_pattern declare_python_modules files="*.py"
-
-# Install job options files
-apply_pattern declare_joboptions files="*.py"
-
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/cmt/requirements b/Trigger/TrigT1/TrigT1CaloCalibUtils/cmt/requirements
deleted file mode 100755
index 71c54f704aef6381bce2f5870d68245d0c5c75a2..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/cmt/requirements
+++ /dev/null
@@ -1,51 +0,0 @@
-package TrigT1CaloCalibUtils
-
-author Damien Prieur <damien.prieur@cern.ch>
-
-use AtlasPolicy     AtlasPolicy-*
-use GaudiInterface  GaudiInterface-*  External
-use AthenaKernel    AthenaKernel-*    Control
-use EventInfo       EventInfo-*       Event
-
-use AtlasBoost      AtlasBoost-*      External
-use AtlasCLHEP      AtlasCLHEP-*      External
-use AtlasCORAL      AtlasCORAL-*      External
-
-use AthenaBaseComps AthenaBaseComps-* Control
-use AthenaPoolUtilities  AthenaPoolUtilities-*  Database/AthenaPOOL
-use RegistrationServices RegistrationServices-* Database
-
-use Identifier            Identifier-*            DetectorDescription
-
-use CaloTriggerTool       CaloTriggerTool-*       Calorimeter
-use CaloIdentifier        CaloIdentifier-*        Calorimeter
-
-use TrigConfHLTData       TrigConfHLTData-*       Trigger/TrigConfiguration
-use TrigConfL1Data        TrigConfL1Data-*        Trigger/TrigConfiguration
-use TrigSteeringEvent     TrigSteeringEvent-*     Trigger/TrigEvent
-
-use TrigT1CaloEvent           TrigT1CaloEvent-*           Trigger/TrigT1
-use TrigT1CaloUtils           TrigT1CaloUtils-*           Trigger/TrigT1
-use TrigT1CaloMonitoringTools TrigT1CaloMonitoringTools-* Trigger/TrigT1
-use TrigT1CaloCalibConditions TrigT1CaloCalibConditions-* Trigger/TrigT1
-use TrigT1CaloCondSvc         TrigT1CaloCondSvc-*         Trigger/TrigT1
-use TrigT1CaloCalibTools      TrigT1CaloCalibTools-*      Trigger/TrigT1
-use TrigT1CaloCalibToolInterfaces      TrigT1CaloCalibToolInterfaces-*      Trigger/TrigT1
-use xAODTrigL1Calo		xAODTrigL1Calo-*		Event/xAOD
-
-private
-use AtlasCLHEP_RandomGenerators AtlasCLHEP_RandomGenerators-* Simulation/Tools
-use AtlasROOT       AtlasROOT-*       External
-use CaloEvent             CaloEvent-*             Calorimeter
-use CaloDetDescr          CaloDetDescr*           Calorimeter
-use CxxUtils		  CxxUtils-*		  Control
-use LArRecUtils           LArRecUtils-*           LArCalorimeter
-use StoreGate       StoreGate-*       Control
-use TrigT1CaloToolInterfaces  TrigT1CaloToolInterfaces-*  Trigger/TrigT1
-use TrigT1Interfaces    	TrigT1Interfaces-*    	Trigger/TrigT1
-use xAODEventInfo	  xAODEventInfo-*	  Event/xAOD
-end_private
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files=*.py
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/python/checkHVCorrections.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/python/checkHVCorrections.py
new file mode 100644
index 0000000000000000000000000000000000000000..b0552ceb97f64e8952446ee81840d3caec0169b1
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/python/checkHVCorrections.py
@@ -0,0 +1,379 @@
+#!/bin/env python
+#
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
+import ROOT
+import sys
+import time
+import os
+
+import PlotCalibrationGains
+
+import PlotCalibrationHV
+
+from PyCool import cool
+from optparse import OptionParser
+
+from math import fabs
+
+import numpy as np
+import matplotlib.mlab as mlab
+import matplotlib.pyplot as plt
+
+plt.xkcd()
+
+if __name__ == "__main__":
+
+  print "Starting checkHVCorrections script"
+
+  parser = OptionParser()
+  
+  parser.add_option("-f","--InputFile",action="store",type="string",dest="input_file_name",help="Name of input file")
+  (options, args) = parser.parse_args()
+
+
+  geometry_convertor = PlotCalibrationGains.L1CaloGeometryConvertor()
+  receiver_gains     = PlotCalibrationGains.GainReader()
+  geometry_convertor.LoadReceiverPPMMap()
+
+  ROOT.gStyle.SetPalette(1)
+  ROOT.gStyle.SetOptStat(111111)
+  ROOT.gStyle.SetCanvasColor(10)
+  
+  c1 = ROOT.TCanvas('c1','Example',200,10,700,500)
+  c2 = ROOT.TCanvas('c2','Example Partitions',200,10,700,500)
+  c2.Divide(3,2)
+
+# now define histograms
+
+  h_gains_em  = PlotCalibrationGains.L1CaloMap("Eta-phi map of EM gains","#eta bin","#phi bin")
+  h_gains_had = PlotCalibrationGains.L1CaloMap("Eta-phi map of HAD gains","#eta bin","#phi bin")
+
+  h_gains_em_noHV  = PlotCalibrationGains.L1CaloMap("Eta-phi map of EM gains without HV corrections","#eta bin","#phi bin")
+  h_gains_had_noHV = PlotCalibrationGains.L1CaloMap("Eta-phi map of HAD gains without HV corrections","#eta bin","#phi bin")
+
+  h_gains_em_ratio  = PlotCalibrationGains.L1CaloMap("ratio of EM gains with and without HV corrections","#eta bin","#phi bin")
+  h_gains_had_ratio = PlotCalibrationGains.L1CaloMap("ratio of HAD gains with and without HV corrections","#eta bin","#phi bin")
+
+  h1D_gains_em_ratio  = PlotCalibrationGains.EmPartitionPlots("ratio of EM gains with and without HV corrections",40,0.,2.5,"gain/gain(no HV)","N")
+  h1D_gains_had_ratio = PlotCalibrationGains.HadPartitionPlots("ratio of HAD gains with and without HV corrections",40,0.,2.5,"gain/gain(no HV)","N")
+
+  h_corr_em  = PlotCalibrationGains.L1CaloMap("Eta-phi map of mean HV corrections in EM layer","#eta bin","#phi bin")
+  h_corr_had = PlotCalibrationGains.L1CaloMap("Eta-phi map of mean HV corrections in HAD layer","#eta bin","#phi bin")
+
+  h_corrGainPredictor_em  = PlotCalibrationGains.L1CaloMap("Eta-phi map of HV corrections from Gain Predictor in EM layer","#eta bin","#phi bin")
+  h_corrGainPredictor_had = PlotCalibrationGains.L1CaloMap("Eta-phi map of HV corrections from Gain Predictor in HAD layer","#eta bin","#phi bin")
+
+
+  h1D_corr_em  = PlotCalibrationGains.EmPartitionPlots("mean HV corrections in EM layer",40,0.,2.5,"mean HV correction","N")
+  h1D_corr_had = PlotCalibrationGains.HadPartitionPlots("mean HV corrections in HAD layer",40,0.,2.5,"mean HV correction","N")
+
+  h_corrHVdiff_em  = PlotCalibrationGains.L1CaloMap("(ratio-meanHV)/meanHV in EM layer","#eta bin","#phi bin")
+  h_corrHVdiff_had = PlotCalibrationGains.L1CaloMap("(ratio-meanHV)/meanHV in HAD layer","#eta bin","#phi bin")
+
+  h1D_corrHVdiff_em  = PlotCalibrationGains.EmPartitionPlots("(ratio-meanHV)/meanHV in EM layer",40,-0.1,0.1,"(ratio-meanHV)/meanHV","N")
+  h1D_corrHVdiff_had = PlotCalibrationGains.HadPartitionPlots("(ratio-meanHV)/meanHV in HAD layer",40,-0.1,0.1,"(ratio-meanHV)/meanHV","N")
+
+  h_corrHVdiffGainPredictor_em  = PlotCalibrationGains.L1CaloMap("(ratio-GainPredictor)/GainPredictor in EM layer","#eta bin","#phi bin")
+  h_corrHVdiffGainPredictor_had = PlotCalibrationGains.L1CaloMap("(ratio-GainPredictor)/GainPredictor in HAD layer","#eta bin","#phi bin")
+
+
+# input files are define here
+
+  fileDefault = '/afs/cern.ch/work/j/juraj/public/testarea/21.0.18/CalibrationProcessing/326189_HV/energyscanresults.sqlite'
+  fileNoHV    = '/afs/cern.ch/work/j/juraj/public/testarea/21.0.18/CalibrationProcessing/326189/energyscanresults.sqlite'
+
+  hvCorrFile = '/afs/cern.ch/work/j/juraj/public/testarea/20.7.8.3/HVDumps/hvcorrections_9jun17.sqlite'
+
+  hvGainPredictor = '/afs/cern.ch/work/j/juraj/public/testarea/20.7.8.3/HVDumps/hvUpdate_9jun17_0p.txt'
+
+  strategyString = 'GainOneOvEmecFcalLowEta'       # defines receiver to TT mapping for EMB/EMEC overlap and hadronic FCAL
+#  strategyString = 'GainOneOvEmbFcalHighEta'
+
+
+  receiver_gains.LoadGainsSqlite(fileDefault)
+  receiver_gains.LoadReferenceSqlite(fileNoHV)
+
+  hv_status = PlotCalibrationHV.L1CaloHVReader(hvCorrFile)
+
+  strange_channel_file = open('checkHVCorrections.txt','w')
+
+  gpReceiver,gpCool,gpEta,gpPhi,gpCorrection = np.genfromtxt(hvGainPredictor,unpack=True,dtype='str')
+
+  gainPredictorCorrections = {}
+
+  for iii in range(len(gpReceiver)):
+     gainPredictorCorrections[gpReceiver[iii]] = float(gpCorrection[iii])
+
+  for i_eta in range(-49,45):
+     for i_phi in range(0,64):
+     
+       coolEm  = geometry_convertor.getCoolEm(i_eta,i_phi)
+       coolHad = geometry_convertor.getCoolHad(i_eta,i_phi)
+       
+
+       if not coolEm == '':                           # there is a channel for this eta-phi
+       
+         gain   = receiver_gains.getGain(coolEm)
+         reference_gain = receiver_gains.getReferenceGain(coolEm)
+         receiverEm  = geometry_convertor.getReceiverfromPPM(coolEm,strategyString)
+
+         try:
+           meanEmHVCorrection = (hv_status.GetMeanCorections())[receiverEm]
+         except KeyError:
+           meanEmHVCorrection = 1.
+
+         try:
+           gainPredictorEmHVCorrection = gainPredictorCorrections[receiverEm]
+         except KeyError:
+           gainPredictorEmHVCorrection = 1.
+
+         if (not gain == '') and (not reference_gain == ''):        # both  gains should be available
+	 
+           h_gains_em.Fill(i_eta,i_phi,gain)
+           h_gains_em_noHV.Fill(i_eta,i_phi,reference_gain)
+           h_corr_em.Fill(i_eta,i_phi,meanEmHVCorrection)
+           h_corrGainPredictor_em.Fill(i_eta,i_phi,gainPredictorEmHVCorrection)
+
+           h1D_corr_em.Fill(i_eta,meanEmHVCorrection)
+           if reference_gain > 0.1 :
+             if gain/reference_gain > 0.01:                            # to make histo look nicer
+               h_gains_em_ratio.Fill(i_eta,i_phi,gain/reference_gain)
+             h1D_gains_em_ratio.Fill(i_eta,gain/reference_gain)
+
+             if gainPredictorEmHVCorrection > 0.00001:                    # just to avoid division by zero, usually >=1.
+               relDifference = (gain/reference_gain - gainPredictorEmHVCorrection)/gainPredictorEmHVCorrection
+
+               if relDifference > 0.001:                               # to make histo look nicer
+                 h_corrHVdiffGainPredictor_em.Fill(i_eta,i_phi,relDifference)
+               if relDifference > 0.05:                               #  print out interesting channels
+                 strange_channel_file.write('%s %s %i %i EM  corr(RampMaker)= %.4f  corr(GainPredictor)= %.4f  diff= %.4f  \n' % (coolEm , receiverEm, \
+                                             i_eta , i_phi, gain/reference_gain,gainPredictorEmHVCorrection,relDifference) )  
+
+             if meanEmHVCorrection > 0.00001:                              # just to avoid division by zero, usually >=1.
+               relDifference = (gain/reference_gain - meanEmHVCorrection)/meanEmHVCorrection
+               if relDifference > 0.01:                               # to make histo look nicer
+                 h_corrHVdiff_em.Fill(i_eta,i_phi,relDifference)
+
+               h1D_corrHVdiff_em.Fill(i_eta,relDifference)
+
+       if not coolHad == '':                         # there is a channel for this eta-phi
+
+         gain = receiver_gains.getGain(coolHad)
+         reference_gain = receiver_gains.getReferenceGain(coolHad)
+         receiverHad = geometry_convertor.getReceiverfromPPM(coolHad,strategyString)
+
+         try:
+           meanHadHVCorrection = (hv_status.GetMeanCorections())[receiverHad]
+         except KeyError:
+           meanHadHVCorrection = 1.
+
+         try:
+           gainPredictorHadHVCorrection = gainPredictorCorrections[receiverHad]
+         except KeyError:
+           gainPredictorHadHVCorrection = 1.
+
+
+         if (not gain == '') and (not reference_gain == ''):       # both gains should be available
+
+           h_gains_had.Fill(i_eta,i_phi,gain)
+           h_gains_had_noHV.Fill(i_eta,i_phi,reference_gain)
+           h_corr_had.Fill(i_eta,i_phi,meanHadHVCorrection) 
+           h_corrGainPredictor_had.Fill(i_eta,i_phi,gainPredictorHadHVCorrection) 
+
+           h1D_corr_had.Fill(i_eta,meanHadHVCorrection)
+
+           if reference_gain > 0.1 :
+             if gain/reference_gain > 0.01:                            # to make histo look nicer
+               h_gains_had_ratio.Fill(i_eta,i_phi,gain/reference_gain)
+             h1D_gains_had_ratio.Fill(i_eta,gain/reference_gain)
+
+             if gainPredictorHadHVCorrection > 0.00001:                      # to avoid accidental zeros
+               relDifference = (gain/reference_gain - gainPredictorHadHVCorrection)/gainPredictorHadHVCorrection
+               if relDifference > 0.001:                               # to make histo look nicer
+                 h_corrHVdiffGainPredictor_had.Fill(i_eta,i_phi,relDifference)
+               if relDifference > 0.05:                               # print interesting channels
+                 strange_channel_file.write('%s %s %i %i HAD  corr(RampMaker)= %.4f  corr(GainPredictor)= %.4f  diff= %.4f  \n' % (coolHad,receiverHad, \
+                                             i_eta , i_phi, gain/reference_gain,gainPredictorHadHVCorrection,relDifference) )  
+
+
+             if meanHadHVCorrection > 0.00001:
+               relDifference = (gain/reference_gain - meanHadHVCorrection)/meanHadHVCorrection
+               if relDifference > 0.01:                               # to make histo look nicer
+                 h_corrHVdiff_had.Fill(i_eta,i_phi,relDifference)
+               h1D_corrHVdiff_had.Fill(i_eta,relDifference)
+
+
+  c1.cd()
+  ROOT.gPad.SetLogy(0)
+
+  h_gains_em.SetMinimum(0.6)
+  h_gains_em.SetMaximum(1.4)
+  h_gains_em.Draw()
+  c1.Print("checkHVCorrections.ps(")
+
+  h_gains_had.SetMinimum(0.6)
+  h_gains_had.SetMaximum(1.4)
+  h_gains_had.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_gains_em_noHV.SetMinimum(0.6)
+  h_gains_em_noHV.SetMaximum(1.4)
+  h_gains_em_noHV.Draw()
+  c1.Print("checkHVCorrections.ps")
+  
+  h_gains_had_noHV.SetMinimum(0.6)
+  h_gains_had_noHV.SetMaximum(1.4)
+  h_gains_had_noHV.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_gains_em_ratio.SetMinimum(1.05)
+  h_gains_em_ratio.SetMaximum(2.2)
+  h_gains_em_ratio.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_gains_had_ratio.SetMinimum(1.05)
+  h_gains_had_ratio.SetMaximum(2.2)
+  h_gains_had_ratio.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corr_em.SetMinimum(1.05)
+  h_corr_em.SetMaximum(2.2)
+  h_corr_em.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corr_had.SetMinimum(1.05)
+  h_corr_had.SetMaximum(2.2)
+  h_corr_had.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corrGainPredictor_em.SetMinimum(1.0)
+  h_corrGainPredictor_em.SetMaximum(2.1)
+  h_corrGainPredictor_em.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corrGainPredictor_had.SetMinimum(1.0)
+  h_corrGainPredictor_had.SetMaximum(2.1)
+  h_corrGainPredictor_had.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+
+  h_corrHVdiff_em.SetMinimum(-.1)
+  h_corrHVdiff_em.SetMaximum( .1)
+  h_corrHVdiff_em.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corrHVdiff_had.SetMinimum(-.1)
+  h_corrHVdiff_had.SetMaximum( .1)
+  h_corrHVdiff_had.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corrHVdiffGainPredictor_em.SetMinimum(-.5)
+  h_corrHVdiffGainPredictor_em.SetMaximum( .5)
+  h_corrHVdiffGainPredictor_em.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corrHVdiffGainPredictor_had.SetMinimum(-.5)
+  h_corrHVdiffGainPredictor_had.SetMaximum( .5)
+  h_corrHVdiffGainPredictor_had.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corrHVdiffGainPredictor_em.SetMinimum(-.1)
+  h_corrHVdiffGainPredictor_em.SetMaximum( .1)
+  h_corrHVdiffGainPredictor_em.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corrHVdiffGainPredictor_had.SetMinimum(-.1)
+  h_corrHVdiffGainPredictor_had.SetMaximum( .1)
+  h_corrHVdiffGainPredictor_had.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corrHVdiffGainPredictor_em.SetMinimum(-.05)
+  h_corrHVdiffGainPredictor_em.SetMaximum( .05)
+  h_corrHVdiffGainPredictor_em.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  h_corrHVdiffGainPredictor_had.SetMinimum(-.05)
+  h_corrHVdiffGainPredictor_had.SetMaximum( .05)
+  h_corrHVdiffGainPredictor_had.Draw()
+  c1.Print("checkHVCorrections.ps")
+
+  c2.Clear()
+  c2.Divide(3,2)
+  for i_p in range(0,h1D_gains_em_ratio.nPartitions):
+    c2.cd(i_p+1)
+    if h1D_gains_em_ratio.his_partitions[i_p].GetEntries() > 0:
+      ROOT.gPad.SetLogy()
+    else:
+      ROOT.gPad.SetLogy(0)
+    h1D_gains_em_ratio.his_partitions[i_p].Draw()
+  
+  c2.Print("checkHVCorrections.ps")
+  
+  #c2.cd()
+  c2.Clear()
+  c2.Divide(3,2)
+  for i_p in range(0,h1D_gains_had_ratio.nPartitions):
+    c2.cd(i_p+1)
+    if h1D_gains_had_ratio.his_partitions[i_p].GetEntries() > 0:
+      ROOT.gPad.SetLogy()
+    else:
+      ROOT.gPad.SetLogy(0)
+    h1D_gains_had_ratio.his_partitions[i_p].Draw()
+  
+  c2.Print("checkHVCorrections.ps")
+
+  c2.Clear()
+  c2.Divide(3,2)
+  for i_p in range(0,h1D_corr_em.nPartitions):
+    c2.cd(i_p+1)
+    if h1D_corr_em.his_partitions[i_p].GetEntries() > 0:
+      ROOT.gPad.SetLogy()
+    else:
+      ROOT.gPad.SetLogy(0)
+    h1D_corr_em.his_partitions[i_p].Draw()
+  
+  c2.Print("checkHVCorrections.ps")
+  
+  #c2.cd()
+  c2.Clear()
+  c2.Divide(3,2)
+  for i_p in range(0,h1D_corr_had.nPartitions):
+    c2.cd(i_p+1)
+    if h1D_corr_had.his_partitions[i_p].GetEntries() > 0:
+      ROOT.gPad.SetLogy()
+    else:
+      ROOT.gPad.SetLogy(0)
+    h1D_corr_had.his_partitions[i_p].Draw()
+  
+  c2.Print("checkHVCorrections.ps")
+  c2.Clear()
+  c2.Divide(3,2)
+  for i_p in range(0,h1D_corrHVdiff_em.nPartitions):
+    c2.cd(i_p+1)
+    if h1D_corrHVdiff_em.his_partitions[i_p].GetEntries() > 0:
+      ROOT.gPad.SetLogy()
+    else:
+      ROOT.gPad.SetLogy(0)
+    h1D_corrHVdiff_em.his_partitions[i_p].Draw()
+  
+  c2.Print("checkHVCorrections.ps")
+  
+  #c2.cd()
+  c2.Clear()
+  c2.Divide(3,2)
+  for i_p in range(0,h1D_corrHVdiff_had.nPartitions):
+    c2.cd(i_p+1)
+    if h1D_corrHVdiff_had.his_partitions[i_p].GetEntries() > 0:
+      ROOT.gPad.SetLogy()
+    else:
+      ROOT.gPad.SetLogy(0)
+    h1D_corrHVdiff_had.his_partitions[i_p].Draw()
+  
+  c2.Print("checkHVCorrections.ps)")
+
+  os.system("ps2pdf checkHVCorrections.ps")
+
+  strange_channel_file.close()
+
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/python/doL1CaloHVCorrections.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/python/doL1CaloHVCorrections.py
new file mode 100644
index 0000000000000000000000000000000000000000..6d485980c0fe42f2684838a7257031a9ca9a38a4
--- /dev/null
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/python/doL1CaloHVCorrections.py
@@ -0,0 +1,411 @@
+#!/bin/env python
+
+#
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
+#from ROOT import gRandom,TCanvas,TH1F,TH2F
+import ROOT
+import sys
+import time
+import os
+#from ctypes import *
+import struct 
+from array import *
+
+from PyCool import cool
+from optparse import OptionParser
+
+import PlotCalibrationGains
+import PlotCalibrationHV
+
+import mergeEnergyRamps
+
+class HVCorrectionCalculator:
+
+  def __init__(self, mapping):
+    
+    self.geometry_convertor = mapping
+
+    self.layer_weights_em  = {} # per eta bin
+    self.layer_weights_had = {} # per eta bin
+
+    file_name = "HVcorrPhysicsWeights.txt"
+
+    ### retrieve layer weights from .txt file
+    
+    try:
+      
+      file = open(file_name)
+      
+    except IOError:
+
+      print "\ncould not find file: %s ....exiting\n" % file_name
+
+      sys.exit()
+
+    for line in file.readlines():
+
+      parts = line.split()
+
+      self.layer_weights_em [int(parts[0])] = [float(parts[1]),float(parts[2]),float(parts[3]),float(parts[4]),float(parts[5])]
+      self.layer_weights_had[int(parts[0])] = [float(parts[6]),float(parts[7]),float(parts[8]),float(parts[9])]
+
+    file.close()
+    
+
+  def GetCorrection(self, receiver, layer_corr, layer_names):
+
+    coolid = self.geometry_convertor.getPPMfromReceiver(receiver)
+    
+    eta_bin = self.geometry_convertor.getEtaBin(coolid)
+ 
+    hv_coef = 0. # new hv coefficient
+    normalisation = 0.
+
+    ### check if tower is  em
+
+    if self.geometry_convertor.isCoolEm (coolid):
+
+      is_overlap = self.geometry_convertor.isPPMOverlap(coolid)
+
+      ### loop over layers
+
+      for n in range(len(layer_names)):
+
+        layer = layer_names[n]
+        
+        if PlotCalibrationHV.isEmPresampler(layer):
+
+          hv_coef += layer_corr[n] * self.layer_weights_em [eta_bin][0]
+          normalisation += self.layer_weights_em [eta_bin][0]
+ 
+        if PlotCalibrationHV.isEmFront(layer,is_overlap):
+
+          hv_coef += layer_corr[n] * self.layer_weights_em [eta_bin][1]
+          normalisation += self.layer_weights_em [eta_bin][1]
+
+        if PlotCalibrationHV.isEmMiddle(layer,is_overlap):
+
+          hv_coef += layer_corr[n] * self.layer_weights_em [eta_bin][2]
+          normalisation += self.layer_weights_em [eta_bin][2]
+
+        if PlotCalibrationHV.isEmBack(layer,is_overlap):
+
+          hv_coef += layer_corr[n] * self.layer_weights_em [eta_bin][3]
+          normalisation += self.layer_weights_em [eta_bin][3]
+
+        if PlotCalibrationHV.isEmOverlapBack(layer,is_overlap):
+
+          hv_coef += layer_corr[n] * self.layer_weights_em [eta_bin][4]          
+          normalisation += self.layer_weights_em [eta_bin][4]   
+
+    ### check if tower is had
+   
+    if self.geometry_convertor.isCoolHad(coolid):
+
+      regions = "EmbFcalHighEta" # (?)
+
+      ### loop over layers
+
+      for n in range(len(layer_names)):
+
+        layer = layer_names[n]
+
+        if PlotCalibrationHV.isHadFirstLayer(layer,regions):
+        
+          hv_coef += layer_corr[n] * self.layer_weights_had[eta_bin][0]
+          normalisation +=  self.layer_weights_had[eta_bin][0]
+
+        if PlotCalibrationHV.isHadSecondLayer(layer,regions):
+            
+          hv_coef += layer_corr[n] * self.layer_weights_had[eta_bin][1]
+          normalisation += self.layer_weights_had[eta_bin][1]
+          
+        if PlotCalibrationHV.isHadThirdLayer(layer,regions):
+
+          hv_coef += layer_corr[n] * self.layer_weights_had[eta_bin][2]
+          normalisation += self.layer_weights_had[eta_bin][2]
+          
+        if PlotCalibrationHV.isHadFourthLayer(layer,regions):
+
+          hv_coef += layer_corr[n] * self.layer_weights_had[eta_bin][3]
+          normalisation += self.layer_weights_had[eta_bin][3]
+
+    totalCorrection = hv_coef / normalisation        # correction is a weighted sum of layer corrections
+
+    return totalCorrection
+
+def writeHVToSqlite(name,input_dict):
+  
+  UNIX2COOL = 1000000000
+  
+  dbSvc = cool.DatabaseSvcFactory.databaseService()
+  connectString = 'sqlite://;schema='+name+';dbname=L1CALO'
+
+  print '\nrecreating database file:',name
+  dbSvc.dropDatabase( connectString )
+  db = dbSvc.createDatabase( connectString )
+
+  spec = cool.RecordSpecification()
+  spec.extend("factor", cool.StorageType.Float)
+  spec.extend("status", cool.StorageType.UInt32 )
+  folderSpec = cool.FolderSpecification(cool.FolderVersioning.SINGLE_VERSION, spec)
+
+  now = int(time.time())
+
+  since = now*UNIX2COOL
+# since = 0
+#  until = sys.maxint
+  until = cool.ValidityKeyMax
+  db.createFolderSet('/TRIGGER')
+  db.createFolderSet('/TRIGGER/Receivers')
+  db.createFolderSet('/TRIGGER/Receivers/Factors')
+
+  folder_description = '<timeStamp>time</timeStamp><addrHeader><address_header service_type="71" clid="1238547719"/></addrHeader><typeName>CondAttrListCollection</typeName>'
+  f = db.createFolder( "/TRIGGER/Receivers/Factors/HVCorrections", folderSpec, folder_description)
+
+  print " Now creating sqlite file for ", len(input_dict.keys()), " channels"
+  for i in input_dict.keys():
+    data = cool.Record( spec )
+    data['factor'] = input_dict[i][0]
+    data['status'] = input_dict[i][1]
+    f.storeObject(since,until, data, int(i,16) )
+
+  db.closeDatabase()
+
+
+if __name__ == "__main__":
+   
+  print " Starting script for calculating L1Calo HV corrections"
+
+  ### configure options
+
+  parser = OptionParser(add_help_option=False)
+  
+  parser.add_option("-i", "--hv_input", action = "store", type = "string", dest = "hv_input", default =             "") 
+  parser.add_option("-t", "--hv_corr_diff", action = "store", type =  "float", dest = "hv_corr_diff", default =           0.01)
+  parser.add_option("-c", "--channel_list", action = "store", type = "string", dest = "channel_list", default =             "")
+  parser.add_option("-o", "--output_files", action = "store", type = "string", dest = "output_files", default = "doL1CaloHVCorrections")
+
+  parser.add_option("--noFCAL", action = "store_true", dest = "noFCAL", default = False)
+  parser.add_option("--noFCAL23",action = "store_true", dest = "noFCAL23", default = False)
+
+  parser.add_option("-h", "--help", action = "store_true")
+
+  (options, args) = parser.parse_args()
+
+  if options.help: # print helpful info 
+    
+    print "\nusage:    python doL1CaloHVCorrections.py [options]"
+    
+    print "\noptions:\n"                  
+
+    print "-i, --hv_input        hv input .sqlite file     (default:           '') *"
+    print "-t, --hv_corr_diff    minimum abs. change in hv corrections    (default:         0.01)"
+    print "-c, --channel_list    file containing an input channel list    (default:           '')"
+    print "-o, --output_files    name assigned to all the output files    (default: doL1CaloHVCorrections)"
+    print "--noFCAL              receiver channels in FCAL not considered"
+    print "--noFCAL23            receiver channels in hadronic FCAL (FCAL23) not considered"
+   
+
+    print "\n[*] minimal requirements"
+
+    print "\nexample:  python doL1CaloHVCorrections.py -i file_1 "
+
+    print "\nnote: if no input channel list is given all the channels will be considered by default"
+
+    print "\n(see https://twiki.cern.ch/twiki/bin/save/Atlas/LevelOneCaloGainPredictor for more info)\n"
+
+    sys.exit()
+
+  if options.hv_input == "" :
+    print "\ntoo few input arguments given ....exiting , need at least sqlite file with input HV corrections\n"
+        
+    sys.exit()
+
+# root-y stuff
+
+  ROOT.gStyle.SetPalette(1)
+  ROOT.gStyle.SetOptStat(111111)
+  ROOT.gStyle.SetCanvasColor(10)
+
+  c1 = ROOT.TCanvas('c1','Example',200,10,700,500)
+
+  h_corrEmb_em  = PlotCalibrationGains.L1CaloMap("Calculated HV corrections for EM  (EMB in overlap) ","#eta bin","#phi bin")
+  h_corrFcalLowEta_had = PlotCalibrationGains.L1CaloMap("Calculated HV corrections for HAD (FCAL low #eta)","#eta bin","#phi bin")
+
+  h_corrEmec_em  = PlotCalibrationGains.L1CaloMap("Calculated HV corrections for EM overlap (EMEC)","#eta bin","#phi bin")
+  h_corrFcalHighEta_had = PlotCalibrationGains.L1CaloMap("Calculated HV corrections for HAD FCAL (high #eta)","#eta bin","#phi bin")
+
+    
+  hv_input = PlotCalibrationHV.L1CaloHVReader(options.hv_input) 
+
+  geometry_convertor = PlotCalibrationGains.L1CaloGeometryConvertor()
+  geometry_convertor.LoadReceiverPPMMap()
+
+  correctionCalculator = HVCorrectionCalculator(geometry_convertor)
+
+  ### initialise output .txt file
+ 
+  print "Creating output file", options.output_files+".txt"
+  output_text = open(options.output_files+".txt","w") 
+
+
+  # now loop over receivers, either those in the list, or all of them
+
+  if options.channel_list != "": # from .txt file
+
+    try:
+
+      channel_list = open(options.channel_list)
+
+    except IOError:
+
+      print "\ncould not find file: %s ....exiting\n" % options.channel_list
+
+      sys.exit()
+
+    print "\nreading input channel list from:", options.channel_list
+   
+    receiver_list = []
+
+    for channel in channel_list.readlines():
+
+      parts = channel.split()
+      receiver_list.append(parts[0])
+
+    channel_list.close()
+    
+  else: # from oracle database
+
+    print "\nreading input channel list from oracle database"
+        
+    receiver_list = geometry_convertor.receiver_to_ppm_map.keys()
+
+  ### check if channel list is empty
+
+  if not receiver_list:
+
+    print "\ninput channel list is empty ....exiting\n"
+
+    sys.exit()
+    
+  print "\nsearching %s channels for hv correction changes, at least one layer > %s" % (len(receiver_list), options.hv_corr_diff)
+
+  ### loop over receivers
+
+  calculatedCorrections = {}
+
+  for receiver in receiver_list:
+    
+    if receiver not in hv_input.GetNLayers().keys():
+
+      continue # skip this receiver (it's non-LAr)
+
+
+    coolid = geometry_convertor.getPPMfromReceiver(receiver)
+        
+    eta_bin = geometry_convertor.getEtaBin(coolid)
+    phi_bin = geometry_convertor.getPhiBin(coolid)
+
+    if options.noFCAL and geometry_convertor.isPPMFCAL(coolid):
+      continue # skip this receiver (it's non-LAr)
+
+    if options.noFCAL23 and geometry_convertor.isPPMFCAL(coolid) and geometry_convertor.isCoolHad(coolid):
+      continue # skip this receiver (it's non-LAr)
+
+    ### retrieve num layers and layer names (from new or ref hv input)
+
+    num_layers = (hv_input.GetNLayers())[receiver]
+
+    layer_names = [-1,-1,-1,-1] # default layer names (see... Calorimeter/CaloIdentifier/CaloIdentifier/CaloCell_ID.h)
+    
+    if num_layers > 0:
+      layer_names[0] = (hv_input.GetName1()[receiver])
+    if num_layers > 1:
+      layer_names[1] = (hv_input.GetName2()[receiver])
+    if num_layers > 2:
+      layer_names[2] = (hv_input.GetName3()[receiver])
+    if num_layers > 3:
+      layer_names[3] = (hv_input.GetName4()[receiver])
+  
+    ### retrieve hv corrections from new hv input
+
+    layer_corr = [1.,1.,1.,1.] # default hv corrections
+
+    if receiver in hv_input.GetMeanCorections().keys(): # if mean hv correction > 1
+      
+      if num_layers > 0:
+        layer_corr[0] = (hv_input.GetCorLayer1()[receiver])
+      if num_layers > 1:
+        layer_corr[1] = (hv_input.GetCorLayer2()[receiver])
+      if num_layers > 2:
+        layer_corr[2] = (hv_input.GetCorLayer3()[receiver])
+      if num_layers > 3:
+        layer_corr[3] = (hv_input.GetCorLayer4()[receiver])
+        
+    ### check if the channel has overall HV correction larger than the threshold
+    
+    predictedCorrection = correctionCalculator.GetCorrection(receiver, layer_corr, layer_names)
+
+    if abs(predictedCorrection - 1) <= options.hv_corr_diff:
+      continue # skip this receiver, the correction is not high enough
+
+    calculatedCorrections[receiver] = [predictedCorrection,0]
+    print >> output_text, ("%5s %9s  %3i %2i  %.3f") % (receiver, coolid, eta_bin, phi_bin, predictedCorrection)
+
+
+    if geometry_convertor.isCoolEm(coolid):
+      if not geometry_convertor.isPPMOverlap(coolid):
+        h_corrEmb_em.Fill(eta_bin,phi_bin,predictedCorrection)
+      else:
+        if geometry_convertor.getOverlapLayer(receiver)=='EMB':
+          h_corrEmb_em.Fill(eta_bin,phi_bin,predictedCorrection)
+        else:
+          h_corrEmec_em.Fill(eta_bin,phi_bin,predictedCorrection)
+
+
+    if geometry_convertor.isCoolHad(coolid):
+      if not geometry_convertor.isPPMFCAL(coolid):
+        h_corrFcalLowEta_had.Fill(eta_bin,phi_bin,predictedCorrection)
+      else:
+        if geometry_convertor.getFCAL23RecEta(receiver)=='HighEta':
+          h_corrFcalHighEta_had.Fill(eta_bin,phi_bin,predictedCorrection)
+        else: 
+          h_corrFcalLowEta_had.Fill(eta_bin,phi_bin,predictedCorrection)
+
+
+  writeHVToSqlite(options.output_files+".sqlite",calculatedCorrections)
+  output_text.close()
+
+  # Draw mean corrections
+
+  h_corrEmb_em.SetMinimum(1.)
+  h_corrEmb_em.SetMaximum(2.1)
+  h_corrEmb_em.Draw()
+  c1.Print(options.output_files+".ps(")
+
+  h_corrFcalLowEta_had.SetMinimum(1.)
+  h_corrFcalLowEta_had.SetMaximum(2.1)
+  h_corrFcalLowEta_had.Draw()
+  c1.Print(options.output_files+".ps")
+
+
+  h_corrEmec_em.SetMinimum(1.)
+  h_corrEmec_em.SetMaximum(2.1)
+  h_corrEmec_em.Draw()
+  c1.Print(options.output_files+".ps")
+
+  h_corrFcalHighEta_had.SetMinimum(1.)
+  h_corrFcalHighEta_had.SetMaximum(2.1)
+  h_corrFcalHighEta_had.Draw()
+  c1.Print(options.output_files+".ps)")
+
+  os.system("ps2pdf " + options.output_files+".ps")
+ # os.system("cp HVStatus.pdf /home/jb/public_web/tmp ")
+
+ 
+  print "Done!"
+
+
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/python/mergeEnergyRamps.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/python/mergeEnergyRamps.py
index 48cb6a05e0198b68d5671bd07a607ca57a55e1c9..965d3c5f638830ecd16ab148d139e520123f981b 100644
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/python/mergeEnergyRamps.py
+++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/python/mergeEnergyRamps.py
@@ -1,4 +1,6 @@
+#
 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 
 import ROOT
 import sys
@@ -34,7 +36,7 @@ class L1CaloGeometryConvertor:
          # get database service and open database
          dbSvc = cool.DatabaseSvcFactory.databaseService()
 
-         dbString = 'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TRIGGER;dbname=COMP200'
+         dbString = 'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TRIGGER;dbname=CONDBR2'
          try:
            db = dbSvc.openDatabase(dbString, False)        
          except Exception, e:
@@ -253,8 +255,9 @@ def WriteSqlite(name,input_dict):
   db = dbSvc.createDatabase( connectString )
 
   spec = cool.RecordSpecification()
-  spec.extend('factor',cool.StorageType.Float)
-  spec.extend( 'status', cool.StorageType.UInt32 )
+  spec.extend("factor", cool.StorageType.Float)
+  spec.extend("status", cool.StorageType.UInt32 )
+  folderSpec = cool.FolderSpecification(cool.FolderVersioning.SINGLE_VERSION, spec)
 
   now = int(time.time())
 
@@ -266,10 +269,10 @@ def WriteSqlite(name,input_dict):
   db.createFolderSet('/TRIGGER/Receivers')
   db.createFolderSet('/TRIGGER/Receivers/Factors')
 
-  folder_description = "<timeStamp>time</timeStamp><addrHeader><address_header service_type=\"71\" clid=\"1238547719\"/></addrHeader><typeName>CondAttrListCollection</typeName>"
-  f = db.createFolder( "/TRIGGER/Receivers/Factors/CalibGains" , spec, folder_description )
-#  f = db.createFolder( folder_name , spec, True )
+  folder_description = '<timeStamp>time</timeStamp><addrHeader><address_header service_type="71" clid="1238547719"/></addrHeader><typeName>CondAttrListCollection</typeName>'
+  f = db.createFolder( "/TRIGGER/Receivers/Factors/CalibGains", folderSpec, folder_description)
 
+  print " Now creating sqlite file for ", len(input_dict.keys()), " channels"
   for i in input_dict.keys():
     data = cool.Record( spec )
     data['factor'] = input_dict[i][0]
@@ -280,7 +283,7 @@ def WriteSqlite(name,input_dict):
 
 class GainsFromSqlite:
 
-     def __init__(self,name):
+     def __init__(self,name,geometryMapper):
        
 #       self.cut_gain_low    = 0.5
 #       self.cut_gain_high   = 1.6
@@ -292,6 +295,7 @@ class GainsFromSqlite:
        self.cut_offset_low  = -100.
        self.cut_offset_high = 100.
 
+       self.geometry_convertor = geometryMapper
 
        self.run_nr = None         #will come later
        self.strategy = None     #later
@@ -362,11 +366,17 @@ class GainsFromSqlite:
        good_gains={}
 
        for i in self.measured_gains.keys():
+
          if ((self.measured_gains[i] > self.cut_gain_low and self.measured_gains[i] < self.cut_gain_high) and
-            (self.measured_offset[i] > self.cut_offset_low and self.measured_offset[i] < self.cut_offset_high)):
+            (self.measured_offset[i] > self.cut_offset_low and self.measured_offset[i] < self.cut_offset_high) and
+#            not (self.geometry_convertor.isCoolHad(i) and self.geometry_convertor.isPPMFCAL(i)) ):
+            not (self.geometry_convertor.isPPMFCAL(i)) ):
 
            good_gains[i]=[self.measured_gains[i],self.measured_error_code[i]]      
 
+         else:
+           print "GainsFromSqlite::getGoodGains have rejected channel ", i
+
        return good_gains      # these are gains as a function of PPM Cool
 
 
@@ -379,7 +389,7 @@ class GainsFromOracle:
        # get database service and open database
        dbSvc = cool.DatabaseSvcFactory.databaseService()
 
-       dbString = 'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TRIGGER;dbname=COMP200'
+       dbString = 'oracle://ATLAS_COOLPROD;schema=ATLAS_COOLONL_TRIGGER;dbname=CONDBR2'
        try:
          db = dbSvc.openDatabase(dbString, False)        
        except Exception, e:
@@ -545,17 +555,17 @@ if __name__ == "__main__":
   print "Processing inputs"
   
   if not options.input_file1 == None:
-    gains_1 = GainsFromSqlite(options.input_file1)
+    gains_1 = GainsFromSqlite(options.input_file1,geometry_convertor)
   else:
     gains_1 = None
 
   if not options.input_file2 == None:
-    gains_2 = GainsFromSqlite(options.input_file2)
+    gains_2 = GainsFromSqlite(options.input_file2,geometry_convertor)
   else:
     gains_2 = None
 
   if not options.input_file3 == None:
-    gains_3 = GainsFromSqlite(options.input_file3)
+    gains_3 = GainsFromSqlite(options.input_file3,geometry_convertor)
   else:
     gains_3 = None
 
diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/gridsub.py b/Trigger/TrigT1/TrigT1CaloCalibUtils/share/gridsub.py
deleted file mode 100644
index aed95cee865f0474496536682a273ab93588cc8a..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloCalibUtils/share/gridsub.py
+++ /dev/null
@@ -1,20 +0,0 @@
-myDatasets[] #list of AMI datasets. 
-
-j = Job()
-j.application = Athena()
-j.application.atlas_dbrelease = 'LATEST'
-j.application.option_file = ['L1CaloPprFineTimeMonitoring_jobOptions.py' ]
-j.name = 'FineTimingJob'
-j.application.prepare()
-j.inputdata = DQ2Dataset()
-j.inputdata.dataset = myDatasets
-j.outputdata = DQ2OutputDataset()
-j.splitter = DQ2JobSplitter()
-j.splitter.numsubjobs = 10
-j.merger = AthenaOutputMerger()
-
-j.application.athena_compile = False
-j.backend = Panda()
-j.backend.requirements = PandaRequirements()
-j.backend.requirements.enableMerge = True
-j.submit()
diff --git a/Trigger/TrigT1/TrigT1CaloCondSvc/cmt/requirements b/Trigger/TrigT1/TrigT1CaloCondSvc/cmt/requirements
deleted file mode 100755
index 564199db317b22d6aef78939fb67dc140c4b893e..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloCondSvc/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package TrigT1CaloCondSvc
-
-author Damien Prieur <damien.prieur@cern.ch>
-
-use AtlasPolicy     AtlasPolicy-*
-use GaudiInterface  GaudiInterface-*  External
-use StoreGate       StoreGate-*       Control
-use AthenaKernel AthenaKernel-* Control
-use SGTools SGTools-* Control
-use AthenaBaseComps AthenaBaseComps-* Control
-
-use AthenaPoolUtilities  AthenaPoolUtilities-*   Database/AthenaPOOL
-use RegistrationServices RegistrationServices-* Database
-
-use TrigT1CaloCalibConditions      TrigT1CaloCalibConditions-*      Trigger/TrigT1
-
-library TrigT1CaloCondSvc *.cxx -s=components *.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.txt *.py"
-
diff --git a/Trigger/TrigT1/TrigT1CaloEvent/cmt/requirements b/Trigger/TrigT1/TrigT1CaloEvent/cmt/requirements
deleted file mode 100755
index 26e5f2280e01c1a9b13f052a94c95166e83f6fed..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloEvent/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package TrigT1CaloEvent
-author Alan Watson <Alan.Watson@cern.ch>
-
-use     AtlasPolicy     AtlasPolicy-*
-use     CLIDSvc         CLIDSvc-*        Control
-use     DataModel       DataModel-*   Control
-use     GaudiInterface  GaudiInterface-* External
-
-#Interfaces between the different parts of level1
-use TrigT1Interfaces TrigT1Interfaces-* Trigger/TrigT1
-# Definition of L1CaloCoolChannelId class - need this in next update
-# use TrigT1CaloConditions TrigT1CaloConditions-* Trigger/TrigT1
-
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
-
-private
-use AtlasReflex  AtlasReflex-*  External -no_auto_imports
-
-apply_pattern lcgdict dict=TrigT1CaloEvent selectionfile=selection.xml headerfiles="../TrigT1CaloEvent/TrigT1CaloEventDict.h"
-end_private
-
diff --git a/Trigger/TrigT1/TrigT1CaloEvent/src/CPCMXTopoData.cxx b/Trigger/TrigT1/TrigT1CaloEvent/src/CPCMXTopoData.cxx
index b9a110fba23a33fec7de91326fa8b49b9531e8b8..49ecbbead42f6b11a6905b45ea5d926522e67a9b 100755
--- a/Trigger/TrigT1/TrigT1CaloEvent/src/CPCMXTopoData.cxx
+++ b/Trigger/TrigT1/TrigT1CaloEvent/src/CPCMXTopoData.cxx
@@ -149,14 +149,24 @@ namespace LVL1 {
 
 CPCMXTopoData& CPCMXTopoData::checkCpmOverflow()
 {
-    using std::cout;
-    using std::endl;
     const size_t max_cpm_index = 14; // as indicated in CPTopoTOB::cpm(), but we start from 0, not 1
     std::vector<uint32_t> counters_tob_per_cpm(max_cpm_index, 0);
     for(const uint32_t word : m_tobWords) {
         CPTopoTOB tob(m_crate, m_cmx, word);
         const size_t iCpm = tob.cpm()-1;
-        counters_tob_per_cpm[iCpm] += 1;
+        const bool icpmValid = iCpm < counters_tob_per_cpm.size();
+        if(icpmValid) {
+            counters_tob_per_cpm[iCpm] += 1;
+        } else {
+            /*
+              // cout discouraged in athena, but this occurrence is
+              // rare and not deemed to deserve Athena::MsgStreamMember
+            cout<<"CPCMXTopoData::checkCpmOverflow :"
+                <<" invalid iCpm "<<iCpm<<","
+                <<" vector size is "<<counters_tob_per_cpm.size()
+                <<endl;
+            */
+        }
     }
     m_cpm_overflow = (m_cpm_overflow ||
                       std::any_of(counters_tob_per_cpm.begin(),
diff --git a/Trigger/TrigT1/TrigT1CaloMappingToolInterfaces/cmt/requirements b/Trigger/TrigT1/TrigT1CaloMappingToolInterfaces/cmt/requirements
deleted file mode 100644
index 82d1429a5e9c2b4e7e245407f679fc23c0b16b4e..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloMappingToolInterfaces/cmt/requirements
+++ /dev/null
@@ -1,10 +0,0 @@
-package TrigT1CaloMappingToolInterfaces
-
-use AtlasPolicy          AtlasPolicy-*
-use GaudiInterface       GaudiInterface-*       External
-
-author Alan Watson <Alan.Watson@CERN.CH>
-
-# use this line to exclude test algorithms
-
-private
diff --git a/Trigger/TrigT1/TrigT1CaloMappingTools/cmt/requirements b/Trigger/TrigT1/TrigT1CaloMappingTools/cmt/requirements
deleted file mode 100644
index 84565d9a3d2fc6dc7f0c372d4333229499db9450..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloMappingTools/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package TrigT1CaloMappingTools
-
-use AtlasPolicy          AtlasPolicy-*
-
-author Alan Watson <Alan.Watson@CERN.CH>, from Peter Faulkner's TrigT1CaloByteStream
-
-library TrigT1CaloMappingTools *.cxx components/*.cxx
-apply_pattern component_library
-
-#apply_pattern declare_joboptions files="*.py"
-
-private
-use GaudiInterface       GaudiInterface-*       External
-use AthenaBaseComps      AthenaBaseComps-*      Control
-use StoreGate            StoreGate-*            Control
-
-use CaloIdentifier       CaloIdentifier-*       Calorimeter
-use CaloTriggerTool      CaloTriggerTool-*      Calorimeter
-use Identifier           Identifier-*           DetectorDescription
-use TrigT1CaloMappingToolInterfaces TrigT1CaloMappingToolInterfaces-* Trigger/TrigT1
-
diff --git a/Trigger/TrigT1/TrigT1CaloMonitoring/cmt/requirements b/Trigger/TrigT1/TrigT1CaloMonitoring/cmt/requirements
deleted file mode 100755
index a439af8fba7ef70203d68962a002999c9c82826a..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloMonitoring/cmt/requirements
+++ /dev/null
@@ -1,52 +0,0 @@
-package TrigT1CaloMonitoring
-
-author Johanna Fleckner
-
-private
-use AtlasPolicy                   AtlasPolicy-*
-use GaudiInterface                GaudiInterface-*                External
-use AthenaMonitoring              AthenaMonitoring-*              Control
-use AthContainers                 AthContainers-*                 Control
-use AnalysisTriggerEvent          AnalysisTriggerEvent-*          PhysicsAnalysis/AnalysisTrigger
-use Identifier                    Identifier-*                    DetectorDescription
-use xAODJet                       xAODJet-*                       Event/xAOD
-use xAODTrigL1Calo                xAODTrigL1Calo-*                Event/xAOD
-#use AthenaKernel                  AthenaKernel-*                  Control
-use xAODEgamma                    xAODEgamma-*                    Event/xAOD
-use TrigConfInterfaces            TrigConfInterfaces-*            Trigger/TrigConfiguration
-
-use StoreGate                     StoreGate-*                     Control
-use SGTools                       SGTools-*                       Control
-use AtlasCLHEP                    AtlasCLHEP-*                    External
-use AtlasROOT                     AtlasROOT-*                     External
-use LWHists                       LWHists-*                       Tools
-
-use EventInfo                     EventInfo-*                     Event
-use AthenaPoolUtilities           AthenaPoolUtilities-*           Database/AthenaPOOL
-use CaloEvent                     CaloEvent-*                     Calorimeter
-use CaloIdentifier                CaloIdentifier-*                Calorimeter
-use TileConditions                TileConditions-*                TileCalorimeter
-use TileEvent                     TileEvent-*                     TileCalorimeter
-use TrigDecisionTool              TrigDecisionTool-*              Trigger/TrigAnalysis
-use VxVertex                      VxVertex-*                      Tracking/TrkEvent
-use JetInterface                  JetInterface-*                  Reconstruction/Jet
-
-use TrigT1CaloUtils               TrigT1CaloUtils-*               Trigger/TrigT1
-use TrigT1CaloEvent               TrigT1CaloEvent-*               Trigger/TrigT1
-use TrigT1CaloMonitoringTools     TrigT1CaloMonitoringTools-*     Trigger/TrigT1
-use TrigT1Interfaces              TrigT1Interfaces-*              Trigger/TrigT1
-use TrigT1CaloToolInterfaces      TrigT1CaloToolInterfaces-*      Trigger/TrigT1
-use TrigAnalysisInterfaces        TrigAnalysisInterfaces-*        Trigger/TrigAnalysis
-#use TrigBunchCrossingTool         TrigBunchCrossingTool-*         Trigger/TrigAnalysis
-
-use TrigT1CaloCalibConditions     TrigT1CaloCalibConditions-*     Trigger/TrigT1
-use TrigT1CaloCalibToolInterfaces TrigT1CaloCalibToolInterfaces-* Trigger/TrigT1
-use TrigT1CaloCalibTools          TrigT1CaloCalibTools-*          Trigger/TrigT1
-use TrigConfL1Data                TrigConfL1Data-*                Trigger/TrigConfiguration
-end_private
-
-apply_pattern declare_joboptions files="*.py"
-
-library TrigT1CaloMonitoring *.cxx components/*.cxx
-apply_pattern component_library
-
diff --git a/Trigger/TrigT1/TrigT1CaloMonitoring/doc/packagedoc.h b/Trigger/TrigT1/TrigT1CaloMonitoring/doc/packagedoc.h
index 33889e9714b4d53308ec2b4f0f7f3cdbaa0e7891..e42a22795002b56bda9b54cc5da02b69fb848957 100644
--- a/Trigger/TrigT1/TrigT1CaloMonitoring/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1CaloMonitoring/doc/packagedoc.h
@@ -31,8 +31,6 @@
   - @ref CPMRoIAsymmetrysection
   - @ref JEMRoIAsymmetrysection
 - @subpage ErrorEventspage
-- @subpage UsedPackagespage
-- @subpage Requirementspage
 
 */
 
@@ -607,14 +605,12 @@ CERN Castor first if you have permission (the l1ccalib account can do it).
 
 /**
 
-@page UsedPackagespage Used Packages
 
 
 */
 
 /**
 
-@page Requirementspage Requirements
 
 
 */
diff --git a/Trigger/TrigT1/TrigT1CaloMonitoring/src/JEPSimMon.cxx b/Trigger/TrigT1/TrigT1CaloMonitoring/src/JEPSimMon.cxx
index 59d0c0cee73ee76183989c066e5d32cafeff5b2e..009858d58ff959f8df56ae11c2bbc6efd85cce0b 100644
--- a/Trigger/TrigT1/TrigT1CaloMonitoring/src/JEPSimMon.cxx
+++ b/Trigger/TrigT1/TrigT1CaloMonitoring/src/JEPSimMon.cxx
@@ -2825,362 +2825,315 @@ void JEPSimMon::compare(const CmxEtSumsMap &cmxSimMap,
 void JEPSimMon::compare(const CmxEtSumsMap &cmxMap, const xAOD::CMXRoI *cmxRoi,
                         ErrorVector &errors)
 {
-    if (m_debug)
-    {
-        msg(MSG::DEBUG) << "Compare Et Maps and Energy Totals with RoIs from data"
-                        << endmsg;
-    }
-
-    int sumEtMap = 0;
-    int missEtMap = 0;
-    int missEtSigMap = 0;
-    int et = 0;
-    int ex = 0;
-    int ey = 0;
-    int sumEtRoi = 0;
-    int missEtRoi = 0;
-    int missEtSigRoi = 0;
-    int etRoi = 0;
-    int exRoi = 0;
-    int eyRoi = 0;
-    int sumEtMapM = 0;
-    int missEtMapM = 0;
-    int etM = 0;
-    int exM = 0;
-    int eyM = 0;
-    int sumEtRoiM = 0;
-    int missEtRoiM = 0;
-    int etRoiM = 0;
-    int exRoiM = 0;
-    int eyRoiM = 0;
-    int key = 100 + xAOD::CMXEtSums::Sources::SUM_ET_STANDARD;
-    CmxEtSumsMap::const_iterator iter = cmxMap.find(key);
-    if (iter != cmxMap.end())
-    {
-        const xAOD::CMXEtSums *sums = iter->second;
-        sumEtMap = sums->et();
-    }
-    key = 100 + xAOD::CMXEtSums::Sources::MISSING_ET_STANDARD;
-    iter = cmxMap.find(key);
-    if (iter != cmxMap.end())
-    {
-        const xAOD::CMXEtSums *sums = iter->second;
-        missEtMap = sums->et();
-    }
-    key = 100 + xAOD::CMXEtSums::Sources::MISSING_ET_SIG_STANDARD;
-    iter = cmxMap.find(key);
-    if (iter != cmxMap.end())
-    {
-        const xAOD::CMXEtSums *sums = iter->second;
-        missEtSigMap = sums->et();
-    }
-    key = 100 + xAOD::CMXEtSums::Sources::TOTAL_STANDARD;
-    iter = cmxMap.find(key);
-    if (iter != cmxMap.end())
-    {
-        const xAOD::CMXEtSums *sums = iter->second;
-        et = (sums->et() | ((sums->etError() & 0x1) << 15));
-        ex = (sums->ex() | ((sums->exError() & 0x1) << 15));
-        ey = (sums->ey() | ((sums->eyError() & 0x1) << 15));
-    }
-    key = 100 + xAOD::CMXEtSums::Sources::SUM_ET_RESTRICTED;
-    iter = cmxMap.find(key);
-    if (iter != cmxMap.end())
-    {
-        const xAOD::CMXEtSums *sums = iter->second;
-        sumEtMapM = sums->et();
-    }
-    key = 100 + xAOD::CMXEtSums::Sources::MISSING_ET_RESTRICTED;
-    iter = cmxMap.find(key);
-    if (iter != cmxMap.end())
-    {
-        const xAOD::CMXEtSums *sums = iter->second;
-        missEtMapM = sums->et();
-    }
-    key = 100 + xAOD::CMXEtSums::Sources::TOTAL_RESTRICTED;
-    iter = cmxMap.find(key);
-    if (iter != cmxMap.end())
-    {
-        const xAOD::CMXEtSums *sums = iter->second;
-        etM = (sums->et() | ((sums->etError() & 0x1) << 15));
-        exM = (sums->ex() | ((sums->exError() & 0x1) << 15));
-        eyM = (sums->ey() | ((sums->eyError() & 0x1) << 15));
-    }
-    if (cmxRoi)
-    {
-        sumEtRoi = cmxRoi->sumEtHits();
-        missEtRoi = cmxRoi->missingEtHits();
-        missEtSigRoi = cmxRoi->missingEtSigHits();
-        etRoi = (cmxRoi->et() | ((cmxRoi->etError() & 0x1) << 15));
-        exRoi = (cmxRoi->ex() | ((cmxRoi->exError() & 0x1) << 15));
-        eyRoi = (cmxRoi->ey() | ((cmxRoi->eyError() & 0x1) << 15));
-        sumEtRoiM = cmxRoi->sumEtHits(xAOD::CMXRoI::MASKED);
-        missEtRoiM = cmxRoi->missingEtHits(xAOD::CMXRoI::MASKED);
-        etRoiM =
-            (cmxRoi->et(xAOD::CMXRoI::MASKED) | ((cmxRoi->etError() & 0x1) << 15));
-        exRoiM =
-            (cmxRoi->ex(xAOD::CMXRoI::MASKED) | ((cmxRoi->exError() & 0x1) << 15));
-        eyRoiM =
-            (cmxRoi->ey(xAOD::CMXRoI::MASKED) | ((cmxRoi->eyError() & 0x1) << 15));
-    }
-    if (sumEtMap || sumEtRoi || missEtMap || missEtRoi || missEtSigMap ||
-        missEtSigRoi || et || etRoi || ex || exRoi || ey || eyRoi || sumEtMapM ||
-        sumEtRoiM || missEtMapM || missEtRoiM || etM || etRoiM || exM || exRoiM ||
-        eyM || eyRoiM)
-    {
-        const int crate = 1;
-        const int cmx = 0;
-        const int loc = crate * s_cmxs + cmx;
-        const int cmxBins = s_crates * s_cmxs;
-        const int bit = (1 << EnergyRoIMismatch);
+  if (m_debug) {
+    msg(MSG::DEBUG) << "Compare Et Maps and Energy Totals with RoIs from data"
+                    << endmsg;
+  }
+
+  int sumEtMap = 0;
+  int missEtMap = 0;
+  int missEtSigMap = 0;
+  int et = 0;
+  int ex = 0;
+  int ey = 0;
+  int sumEtRoi = 0;
+  int missEtRoi = 0;
+  int missEtSigRoi = 0;
+  int etRoi = 0;
+  int exRoi = 0;
+  int eyRoi = 0;
+  int sumEtMapM = 0;
+  int missEtMapM = 0;
+  int etM = 0;
+  int exM = 0;
+  int eyM = 0;
+  int sumEtRoiM = 0;
+  int missEtRoiM = 0;
+  int etRoiM = 0;
+  int exRoiM = 0;
+  int eyRoiM = 0;
+  int key = 100 + xAOD::CMXEtSums::Sources::SUM_ET_STANDARD;
+  CmxEtSumsMap::const_iterator iter = cmxMap.find(key);
+  if (iter != cmxMap.end()) {
+    const xAOD::CMXEtSums *sums = iter->second;
+    sumEtMap = sums->et();
+  }
+  key = 100 + xAOD::CMXEtSums::Sources::MISSING_ET_STANDARD;
+  iter = cmxMap.find(key);
+  if (iter != cmxMap.end()) {
+    const xAOD::CMXEtSums *sums = iter->second;
+    missEtMap = sums->et();
+  }
+  key = 100 + xAOD::CMXEtSums::Sources::MISSING_ET_SIG_STANDARD;
+  iter = cmxMap.find(key);
+  if (iter != cmxMap.end()) {
+    const xAOD::CMXEtSums *sums = iter->second;
+    missEtSigMap = sums->et();
+  }
+  key = 100 + xAOD::CMXEtSums::Sources::TOTAL_STANDARD;
+  iter = cmxMap.find(key);
+  if (iter != cmxMap.end()) {
+    const xAOD::CMXEtSums *sums = iter->second;
+    et = (sums->et() | ((sums->etError() & 0x1) << 15));
+    ex = (sums->ex() | ((sums->exError() & 0x1) << 15));
+    ey = (sums->ey() | ((sums->eyError() & 0x1) << 15));
+  }
+  key = 100 + xAOD::CMXEtSums::Sources::SUM_ET_RESTRICTED;
+  iter = cmxMap.find(key);
+  if (iter != cmxMap.end()) {
+    const xAOD::CMXEtSums *sums = iter->second;
+    sumEtMapM = sums->et();
+  }
+  key = 100 + xAOD::CMXEtSums::Sources::MISSING_ET_RESTRICTED;
+  iter = cmxMap.find(key);
+  if (iter != cmxMap.end()) {
+    const xAOD::CMXEtSums *sums = iter->second;
+    missEtMapM = sums->et();
+  }
+  key = 100 + xAOD::CMXEtSums::Sources::TOTAL_RESTRICTED;
+  iter = cmxMap.find(key);
+  if (iter != cmxMap.end()) {
+    const xAOD::CMXEtSums *sums = iter->second;
+    etM = (sums->et() | ((sums->etError() & 0x1) << 15));
+    exM = (sums->ex() | ((sums->exError() & 0x1) << 15));
+    eyM = (sums->ey() | ((sums->eyError() & 0x1) << 15));
+
+  }
+  
+  
+  if (cmxRoi) {
+    sumEtRoi = cmxRoi->sumEtHits();
+    missEtRoi = cmxRoi->missingEtHits();
+    missEtSigRoi = cmxRoi->missingEtSigHits();
+    etRoi = (cmxRoi->et() | ((cmxRoi->etError() & 0x1) << 15));
+    exRoi = (cmxRoi->ex() | ((cmxRoi->exError() & 0x1) << 15));
+    eyRoi = (cmxRoi->ey() | ((cmxRoi->eyError() & 0x1) << 15));
+    sumEtRoiM = cmxRoi->sumEtHits(xAOD::CMXRoI::MASKED);
+    missEtRoiM = cmxRoi->missingEtHits(xAOD::CMXRoI::MASKED);
+    etRoiM =
+        (cmxRoi->et(xAOD::CMXRoI::MASKED) | ((cmxRoi->etError(xAOD::CMXRoI::MASKED) & 0x1) << 15));
+
+    exRoiM =
+        (cmxRoi->ex(xAOD::CMXRoI::MASKED) | ((cmxRoi->exError(xAOD::CMXRoI::MASKED) & 0x1) << 15));
+    eyRoiM =
+        (cmxRoi->ey(xAOD::CMXRoI::MASKED) | ((cmxRoi->eyError(xAOD::CMXRoI::MASKED) & 0x1) << 15));
+  
+    // If CMX RoI restricted et is zero and overflow bit is set, but total restriced et is
+    // zero then explicitly set overflow bit also in total restricted et since readout
+    // currently does not set this bit in total restricted. 
+    if (etM == 0 && (cmxRoi->et(xAOD::CMXRoI::MASKED) == 0)
+        && (cmxRoi->etError(xAOD::CMXRoI::MASKED) & 0x1)) {
+      etM = etRoiM; 
+    }
+
+    if (exM == 0 && (cmxRoi->ex(xAOD::CMXRoI::MASKED) == 0)
+        && (cmxRoi->exError(xAOD::CMXRoI::MASKED) & 0x1)) {
+      exM = exRoiM; 
+    }
+
+    if (eyM == 0 && (cmxRoi->ey(xAOD::CMXRoI::MASKED) == 0)
+        && (cmxRoi->eyError(xAOD::CMXRoI::MASKED) & 0x1)) {
+      eyM = eyRoiM; 
+    }
+  }
+
+  if (sumEtMap || sumEtRoi || missEtMap || missEtRoi || missEtSigMap ||
+      missEtSigRoi || et || etRoi || ex || exRoi || ey || eyRoi || sumEtMapM ||
+      sumEtRoiM || missEtMapM || missEtRoiM || etM || etRoiM || exM || exRoiM ||
+      eyM || eyRoiM) {
+    const int crate = 1;
+    const int cmx = 0;
+    const int loc = crate * s_cmxs + cmx;
+    const int cmxBins = s_crates * s_cmxs;
+    const int bit = (1 << EnergyRoIMismatch);
 
-        if (sumEtMap == sumEtRoi && missEtMap == missEtRoi &&
-            missEtSigMap == missEtSigRoi && et == etRoi && ex == exRoi &&
-            ey == eyRoi && sumEtMapM == sumEtRoiM && missEtMapM == missEtRoiM &&
-            etM == etRoiM && exM == exRoiM && eyM == eyRoiM)
-            errors[loc] |= bit;
-        else
-            errors[loc + cmxBins] |= bit;
-        TH2F_LW *hist = 0;
-        if (ex && ex == exRoi)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (ex != exRoi)
-        {
-            if (ex && exRoi)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!exRoi)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 0);
-        hist = 0;
-        if (ey && ey == eyRoi)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (ey != eyRoi)
-        {
-            if (ey && eyRoi)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!eyRoi)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 1);
-        hist = 0;
-        if (et && et == etRoi)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (et != etRoi)
-        {
-            if (et && etRoi)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!etRoi)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 2);
-        hist = 0;
-        if (sumEtMap && sumEtMap == sumEtRoi)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (sumEtMap != sumEtRoi)
-        {
-            if (sumEtMap && sumEtRoi)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!sumEtRoi)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 3);
-        hist = 0;
-        if (missEtMap && missEtMap == missEtRoi)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (missEtMap != missEtRoi)
-        {
-            if (missEtMap && missEtRoi)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!missEtRoi)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 4);
-        hist = 0;
-        if (missEtSigMap && missEtSigMap == missEtSigRoi)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (missEtSigMap != missEtSigRoi)
-        {
-            if (missEtSigMap && missEtSigRoi)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!missEtSigRoi)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 5);
-        hist = 0;
-        if (exM && exM == exRoiM)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (exM != exRoiM)
-        {
-            if (exM && exRoiM)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!exRoiM)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 6);
-        hist = 0;
-        if (eyM && eyM == eyRoiM)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (eyM != eyRoiM)
-        {
-            if (eyM && eyRoiM)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!eyRoiM)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 7);
-        hist = 0;
-        if (etM && etM == etRoiM)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (etM != etRoiM)
-        {
-            if (etM && etRoiM)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!etRoiM)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 8);
-        hist = 0;
-        if (sumEtMapM && sumEtMapM == sumEtRoiM)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (sumEtMapM != sumEtRoiM)
-        {
-            if (sumEtMapM && sumEtRoiM)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!sumEtRoiM)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 9);
-        hist = 0;
-        if (missEtMapM && missEtMapM == missEtRoiM)
-            hist = m_h_cmx_2d_energy_SumsSimEqData;
-        else if (missEtMapM != missEtRoiM)
-        {
-            if (missEtMapM && missEtRoiM)
-                hist = m_h_cmx_2d_energy_SumsSimNeData;
-            else if (!missEtRoiM)
-            {
-                if (!limitedRoiSet(crate))
-                    hist = m_h_cmx_2d_energy_SumsSimNoData;
-            }
-            else
-                hist = m_h_cmx_2d_energy_SumsDataNoSim;
-        }
-        if (hist)
-            hist->Fill(4, 10);
-
-        const int thrLen = 1;
-        const int nThresh = 8;
-        if ((sumEtMap || sumEtRoi) &&
-            !(sumEtMap && !sumEtRoi && limitedRoiSet(crate)))
-        {
-            m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimEqData, 1,
-                                          sumEtRoi & sumEtMap, nThresh, thrLen);
-            m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimNeData, 1,
-                                          sumEtRoi ^ sumEtMap, nThresh, thrLen);
-        }
-        if ((missEtMap || missEtRoi) &&
-            !(missEtMap && !missEtRoi && limitedRoiSet(crate)))
-        {
-            const int offset = 8;
-            m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimEqData, 3,
-                                          missEtRoi & missEtMap, nThresh, thrLen,
-                                          offset);
-            m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimNeData, 3,
-                                          missEtRoi ^ missEtMap, nThresh, thrLen,
-                                          offset);
-        }
-        if ((missEtSigMap || missEtSigRoi) &&
-            !(missEtSigMap && !missEtSigRoi && limitedRoiSet(crate)))
-        {
-            const int offset = 16;
-            m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimEqData, 5,
-                                          missEtSigRoi & missEtSigMap, nThresh,
-                                          thrLen, offset);
-            m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimNeData, 5,
-                                          missEtSigRoi ^ missEtSigMap, nThresh,
-                                          thrLen, offset);
-        }
-        if ((sumEtMapM || sumEtRoiM) &&
-            !(sumEtMapM && !sumEtRoiM && limitedRoiSet(crate)))
-        {
-            m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimEqData, 7,
-                                          sumEtRoiM & sumEtMapM, nThresh, thrLen);
-            m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimNeData, 7,
-                                          sumEtRoiM ^ sumEtMapM, nThresh, thrLen);
-        }
-        if ((missEtMapM || missEtRoiM) &&
-            !(missEtMapM && !missEtRoiM && limitedRoiSet(crate)))
-        {
-            const int offset = 8;
-            m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimEqData, 9,
-                                          missEtRoiM & missEtMapM, nThresh, thrLen,
-                                          offset);
-            m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimNeData, 9,
-                                          missEtRoiM ^ missEtMapM, nThresh, thrLen,
-                                          offset);
-        }
-    }
+    if (sumEtMap == sumEtRoi && missEtMap == missEtRoi &&
+        missEtSigMap == missEtSigRoi && et == etRoi && ex == exRoi &&
+        ey == eyRoi && sumEtMapM == sumEtRoiM && missEtMapM == missEtRoiM &&
+        etM == etRoiM && exM == exRoiM && eyM == eyRoiM)
+      errors[loc] |= bit;
+    else
+      errors[loc + cmxBins] |= bit;
+    TH2F_LW *hist = 0;
+    if (ex && ex == exRoi)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (ex != exRoi) {
+      if (ex && exRoi)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!exRoi) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 0);
+    hist = 0;
+    if (ey && ey == eyRoi)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (ey != eyRoi) {
+      if (ey && eyRoi)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!eyRoi) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 1);
+    hist = 0;
+    if (et && et == etRoi)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (et != etRoi) {
+      if (et && etRoi)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!etRoi) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 2);
+    hist = 0;
+    if (sumEtMap && sumEtMap == sumEtRoi)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (sumEtMap != sumEtRoi) {
+      if (sumEtMap && sumEtRoi)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!sumEtRoi) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 3);
+    hist = 0;
+    if (missEtMap && missEtMap == missEtRoi)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (missEtMap != missEtRoi) {
+      if (missEtMap && missEtRoi)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!missEtRoi) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 4);
+    hist = 0;
+    if (missEtSigMap && missEtSigMap == missEtSigRoi)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (missEtSigMap != missEtSigRoi) {
+      if (missEtSigMap && missEtSigRoi)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!missEtSigRoi) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 5);
+    hist = 0;
+    if (exM && exM == exRoiM)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (exM != exRoiM) {
+      if (exM && exRoiM)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!exRoiM) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 6);
+    hist = 0;
+    if (eyM && eyM == eyRoiM)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (eyM != eyRoiM) {
+      if (eyM && eyRoiM)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!eyRoiM) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 7);
+    hist = 0;
+    if (etM && etM == etRoiM)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (etM != etRoiM) {
+      if (etM && etRoiM)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!etRoiM) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 8);
+    hist = 0;
+    if (sumEtMapM && sumEtMapM == sumEtRoiM)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (sumEtMapM != sumEtRoiM) {
+      if (sumEtMapM && sumEtRoiM)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!sumEtRoiM) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 9);
+    hist = 0;
+    if (missEtMapM && missEtMapM == missEtRoiM)
+      hist = m_h_cmx_2d_energy_SumsSimEqData;
+    else if (missEtMapM != missEtRoiM) {
+      if (missEtMapM && missEtRoiM)
+        hist = m_h_cmx_2d_energy_SumsSimNeData;
+      else if (!missEtRoiM) {
+        if (!limitedRoiSet(crate)) hist = m_h_cmx_2d_energy_SumsSimNoData;
+      } else
+        hist = m_h_cmx_2d_energy_SumsDataNoSim;
+    }
+    if (hist) hist->Fill(4, 10);
+
+    const int thrLen = 1;
+    const int nThresh = 8;
+    if ((sumEtMap || sumEtRoi) &&
+        !(sumEtMap && !sumEtRoi && limitedRoiSet(crate))) {
+      m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimEqData, 1,
+                                    sumEtRoi & sumEtMap, nThresh, thrLen);
+      m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimNeData, 1,
+                                    sumEtRoi ^ sumEtMap, nThresh, thrLen);
+    }
+    if ((missEtMap || missEtRoi) &&
+        !(missEtMap && !missEtRoi && limitedRoiSet(crate))) {
+      const int offset = 8;
+      m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimEqData, 3,
+                                    missEtRoi & missEtMap, nThresh, thrLen,
+                                    offset);
+      m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimNeData, 3,
+                                    missEtRoi ^ missEtMap, nThresh, thrLen,
+                                    offset);
+    }
+    if ((missEtSigMap || missEtSigRoi) &&
+        !(missEtSigMap && !missEtSigRoi && limitedRoiSet(crate))) {
+      const int offset = 16;
+      m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimEqData, 5,
+                                    missEtSigRoi & missEtSigMap, nThresh,
+                                    thrLen, offset);
+      m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimNeData, 5,
+                                    missEtSigRoi ^ missEtSigMap, nThresh,
+                                    thrLen, offset);
+    }
+    if ((sumEtMapM || sumEtRoiM) &&
+        !(sumEtMapM && !sumEtRoiM && limitedRoiSet(crate))) {
+      m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimEqData, 7,
+                                    sumEtRoiM & sumEtMapM, nThresh, thrLen);
+      m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimNeData, 7,
+                                    sumEtRoiM ^ sumEtMapM, nThresh, thrLen);
+    }
+    if ((missEtMapM || missEtRoiM) &&
+        !(missEtMapM && !missEtRoiM && limitedRoiSet(crate))) {
+      const int offset = 8;
+      m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimEqData, 9,
+                                    missEtRoiM & missEtMapM, nThresh, thrLen,
+                                    offset);
+      m_histTool->fillXVsThresholds(m_h_cmx_2d_energy_EtMapsThreshSimNeData, 9,
+                                    missEtRoiM ^ missEtMapM, nThresh, thrLen,
+                                    offset);
+    }
+  }
 }
 
 void JEPSimMon::fillEventSample(int err, int loc, bool isJem)
diff --git a/Trigger/TrigT1/TrigT1CaloMonitoringTools/cmt/requirements b/Trigger/TrigT1/TrigT1CaloMonitoringTools/cmt/requirements
deleted file mode 100755
index 5be9b5eff897877f00d2158d61befe0960080dab..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloMonitoringTools/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package TrigT1CaloMonitoringTools
-
-author Peter Faulkner
-
-use AtlasPolicy         	AtlasPolicy-*
-use GaudiInterface      	GaudiInterface-*      	External
-use AsgTools             AsgTools-*             Control/AthToolSupport
-use AthenaMonitoring    	AthenaMonitoring-* 	Control
-
-private
-use AtlasROOT                   AtlasROOT-*             External
-use DataModel                   DataModel-*             Control
-use SGTools                     SGTools-*               Control
-use LWHists                     LWHists-*               Tools
-use EventInfo            	EventInfo-*	        Event
-use TrigT1CaloEvent             TrigT1CaloEvent-*       Trigger/TrigT1
-use TrigT1CaloUtils             TrigT1CaloUtils-*       Trigger/TrigT1
-use TrigT1Interfaces            TrigT1Interfaces-*      Trigger/TrigT1
-use TrigConfInterfaces          TrigConfInterfaces-*    Trigger/TrigConfiguration	
-use TrigConfL1Data              TrigConfL1Data-*        Trigger/TrigConfiguration
-use xAODTrigL1Calo       xAODTrigL1Calo-*       Event/xAOD
-end_private
-
-#apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern dual_use_library files=*.cxx
-
diff --git a/Trigger/TrigT1/TrigT1CaloSim/cmt/requirements b/Trigger/TrigT1/TrigT1CaloSim/cmt/requirements
deleted file mode 100644
index 986d75e84dda2dc8a3ba2118089f3750c2d6c781..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloSim/cmt/requirements
+++ /dev/null
@@ -1,62 +0,0 @@
-package TrigT1CaloSim
-author Alan Watson <Alan.Watson@cern.ch>
-
-use     AtlasPolicy     AtlasPolicy-*
-use     AtlasCLHEP      AtlasCLHEP-*     External
-use     AthenaBaseComps AthenaBaseComps-* Control
-use     AthContainers   AthContainers-*      Control
-use     CaloEvent       CaloEvent-*      Calorimeter
-use     CaloDetDescr    CaloDetDescr-*   Calorimeter
-use     CaloIdentifier  CaloIdentifier-* Calorimeter
-use     LArRawEvent     LArRawEvent-*    LArCalorimeter
-#use     LArIdentifier   LArIdentifier-*  LArCalorimeter
-use     LArCabling      LArCabling-*     LArCalorimeter
-use     TileConditions  TileConditions-* TileCalorimeter
-use     TileEvent       TileEvent-*      TileCalorimeter
-use     CaloTTDetDescr  CaloTTDetDescr-* Calorimeter
-use     StoreGate       StoreGate-*      Control
-use     PileUpTools     PileUpTools-*    Control
-use     GaudiInterface  GaudiInterface-* External
-use     AtlasROOT       AtlasROOT-*      External
-#use     AnalysisTriggerEvent AnalysisTriggerEvent-* PhysicsAnalysis/AnalysisTrigger
-#needed for config. of Trigger Menus
-use TrigConfInterfaces TrigConfInterfaces-* Trigger/TrigConfiguration
-#use TrigConfigSvc   TrigConfigSvc-* Trigger/TrigConfiguration
-use TrigConfL1Data  TrigConfL1Data-* Trigger/TrigConfiguration
-
-# The actual L1Calo packages used
-use TrigT1CaloEvent TrigT1CaloEvent-* Trigger/TrigT1
-use TrigT1CaloUtils TrigT1CaloUtils-* Trigger/TrigT1
-use TrigT1CaloToolInterfaces TrigT1CaloToolInterfaces-* Trigger/TrigT1
-use TrigT1CaloMappingToolInterfaces TrigT1CaloMappingToolInterfaces-* Trigger/TrigT1 
-#use TrigT1CaloCalibTools  TrigT1CaloCalibTools-* Trigger/TrigT1
-use TrigT1CaloCalibToolInterfaces  TrigT1CaloCalibToolInterfaces-* Trigger/TrigT1
-use TrigT1CaloCalibConditions TrigT1CaloCalibConditions-* Trigger/TrigT1
-
-#Interfaces between the different parts of level1
-use TrigT1Interfaces TrigT1Interfaces-* Trigger/TrigT1
-
-# xAOD EDM
-use     xAODTrigL1Calo  xAODTrigL1Calo-* Event/xAOD
-
-#this is needed to get access to PDGTABLE
-#use GeneratorModules    GeneratorModules-* Generators
-
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
-
-private
-use     AthenaKernel    AthenaKernel-*   Control
-use     AtlasReflex     AtlasReflex-* External -no_auto_imports
-#use     AtlasROOT       AtlasROOT-*      External
-use AtlasCLHEP_RandomGenerators AtlasCLHEP_RandomGenerators-* Simulation/Tools
-use     CxxUtils        CxxUtils-*       Control
-use     EventInfo       EventInfo-*      Event
-use     LumiBlockComps  LumiBlockComps-* LumiBlock
-use     PathResolver    PathResolver-*   Tools
-use     TrigT1CaloCondSvc TrigT1CaloCondSvc-* Trigger/TrigT1
-use     xAODEventInfo   xAODEventInfo-*  Event/xAOD
-use     TrigT1CaloByteStream   TrigT1CaloByteStream-*  Trigger/TrigT1
-end_private
-
diff --git a/Trigger/TrigT1/TrigT1CaloSim/doc/packagedoc.h b/Trigger/TrigT1/TrigT1CaloSim/doc/packagedoc.h
index c24722f1c13fdbd299cf69dfa585644d0a21d35e..509fc823d5b93ea57032f47337e6008b4dce7bf6 100644
--- a/Trigger/TrigT1/TrigT1CaloSim/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1CaloSim/doc/packagedoc.h
@@ -82,22 +82,7 @@ DumpTriggerObjects.h -  The DumpTriggerObjects algorithm shows how to access EmT
 
 <A href=""> TriggerMenu </A>
 
-@ref used_MyPackage
 
-@ref requirements_MyPackage
 
 
 */
-
-
-
-
-
-
-/**
-@page used_MyPackage Used Packages
-*/
-
-/**
-@page requirements_MyPackage Requirements
-*/
diff --git a/Trigger/TrigT1/TrigT1CaloSim/src/Run2TriggerTowerMaker.cxx b/Trigger/TrigT1/TrigT1CaloSim/src/Run2TriggerTowerMaker.cxx
index 8fdebab121456b4bbc2bfd20eaabe154528ce490..7344e0da2592565bd10e0cb73a36d0506155c69b 100755
--- a/Trigger/TrigT1/TrigT1CaloSim/src/Run2TriggerTowerMaker.cxx
+++ b/Trigger/TrigT1/TrigT1CaloSim/src/Run2TriggerTowerMaker.cxx
@@ -267,12 +267,25 @@ namespace LVL1 {
     if(!ei) {
       ATH_MSG_WARNING("Could not determine if input file is data or simulation. Will assume simulation.");
     } else {
-      bool isData = !(ei->eventInfo().event_type()->test(EventType::IS_SIMULATION));
-      m_isDataReprocessing = isData;
-      if(m_isDataReprocessing) {
-        ATH_MSG_INFO("Detected data reprocessing. Will take pedestal correction values from input trigger towers.");
+      const EventType *eventType = ei->eventInfo().event_type();
+      
+      if (eventType == nullptr){
+        const EventInfo* eventInfo = nullptr;
+        if (evtStore()->retrieve(eventInfo).isSuccess() ) {
+          eventType = eventInfo->event_type();
+        }
+      }
+      
+      if (eventType == nullptr) {
+        ATH_MSG_WARNING("Could not determine if input file is data or simulation. Will assume simulation.");
       } else {
-        ATH_MSG_VERBOSE("No data reprocessing - running normal simulation.");
+        bool isData = !eventType->test(EventType::IS_SIMULATION);
+        m_isDataReprocessing = isData;
+        if(m_isDataReprocessing) {
+          ATH_MSG_INFO("Detected data reprocessing. Will take pedestal correction values from input trigger towers.");
+        } else {
+          ATH_MSG_VERBOSE("No data reprocessing - running normal simulation.");
+        }
       }
     }
     
diff --git a/Trigger/TrigT1/TrigT1CaloSim/src/TriggerTowerMaker.cxx b/Trigger/TrigT1/TrigT1CaloSim/src/TriggerTowerMaker.cxx
index 30c33ecfd91a77683e8df69f96ddd1782a1ee1b5..ed1776006843bf32e059bcccf00706a117f914cb 100755
--- a/Trigger/TrigT1/TrigT1CaloSim/src/TriggerTowerMaker.cxx
+++ b/Trigger/TrigT1/TrigT1CaloSim/src/TriggerTowerMaker.cxx
@@ -1982,7 +1982,7 @@ void TriggerTowerMaker::initSatBCID(int cal, const std::vector<double>& Pulse)
   // If DecisionSource = FIR, need to convert ET ranges -> FIR values for tower type
   // Otherwise assume they have been set correctly in ADC counts
   
-  if (!m_DecisionSource&0x1) {    // Use ADC for decision 
+  if (!(m_DecisionSource&0x1)) {    // Use ADC for decision 
     m_EnergyLevelLow[cal] = int(m_EnergyLow*m_digitScale/m_adcStep + m_pedVal);
     m_EnergyLevelHigh[cal] = int(m_EnergyHigh*m_digitScale/m_adcStep + m_pedVal);
     ATH_MSG_DEBUG( "Decision ranges (ADC counts) = " << m_EnergyLevelLow[cal]
@@ -2940,7 +2940,7 @@ void LVL1::TriggerTowerMaker::preProcess()
     emBCID.push_back(BCIDOut[emPeak]);                    // BCID result
    
     int range;
-    if (!m_DecisionSource&0x1) {                         // select energy range
+    if (!(m_DecisionSource&0x1)) {                         // select energy range
       range = EtRange(emDigits[3], towerType);
     } 
     else {
@@ -3048,7 +3048,7 @@ void LVL1::TriggerTowerMaker::preProcess()
     hadEt.push_back(lutOut[hadPeak]);                       // calibration LUT
     hadBCID.push_back(BCIDOut[hadPeak]);
   
-    if (!m_DecisionSource&0x1) {                            // identify BCID range
+    if (!(m_DecisionSource&0x1)) {                            // identify BCID range
       range = EtRange(hadDigits[3],towerType);
     } 
     else {
diff --git a/Trigger/TrigT1/TrigT1CaloToolInterfaces/cmt/requirements b/Trigger/TrigT1/TrigT1CaloToolInterfaces/cmt/requirements
deleted file mode 100755
index 38eea318f07a69378ee28de52e8703cb7f96f727..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloToolInterfaces/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package TrigT1CaloToolInterfaces
-
-author Alan Watson <Alan.Watson@cern.ch>
-
-public
-
-use AtlasPolicy          AtlasPolicy-* 
-use GaudiInterface       GaudiInterface-*       External
-use AthContainers        AthContainers-*        Control
-use AnalysisTriggerEvent AnalysisTriggerEvent-* PhysicsAnalysis/AnalysisTrigger
-use Identifier           Identifier-*           DetectorDescription
-use TrigT1CaloCalibConditions TrigT1CaloCalibConditions-* Trigger/TrigT1
-use TrigT1CaloEvent      TrigT1CaloEvent-*      Trigger/TrigT1
-use xAODTrigL1Calo       xAODTrigL1Calo-*       Event/xAOD
-#use TrigT1CaloUtils      TrigT1CaloUtils-*      Trigger/TrigT1
-
-# Declare that this package acts as a metalibrary for cmake. This ensures that libraries and
-# header files of packages that this one depends on are made available to its clients.
-# This transparent to CMT, but should be disabled if the apply_pattern component_library is
-# uncommented.
-apply_pattern cmake_add_command command=metalibrary
-
-#apply_pattern declare_joboptions files="*.py"
-#apply_pattern component_library
-#library TrigT1CaloToolInterfaces *.cxx components/*.cxx
-
-private
-
diff --git a/Trigger/TrigT1/TrigT1CaloToolInterfaces/doc/packagedoc.h b/Trigger/TrigT1/TrigT1CaloToolInterfaces/doc/packagedoc.h
deleted file mode 100644
index 18f7fb9d7fc6cb5627af0c322d1099fd36b3ba53..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloToolInterfaces/doc/packagedoc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-/**
-@page TrigT1CaloToolInterfaces_page TrigT1CaloToolInterfaces Package
-
->> Please enter an overview of the created package here: What does it contain?
-
-@author Alan Watson <Alan.Watson@cern.ch>
-
-@section TrigT1CaloToolInterfaces_TrigT1CaloToolInterfacesIntro Introduction
-
->> Please enter a brief description of the package here.
-
-@section TrigT1CaloToolInterfaces_TrigT1CaloToolInterfacesReq Requirements
-
-
-*/
diff --git a/Trigger/TrigT1/TrigT1CaloTools/cmt/requirements b/Trigger/TrigT1/TrigT1CaloTools/cmt/requirements
deleted file mode 100755
index 14fdbabf7d2b9fccc622cbfa1136908afae1513c..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloTools/cmt/requirements
+++ /dev/null
@@ -1,41 +0,0 @@
-package TrigT1CaloTools
-
-author Alan Watson <Alan.Watson@cern.ch>
-
-public
-
-use AtlasPolicy AtlasPolicy-* 
-use     GaudiInterface  GaudiInterface-* External
-use AtlasBoost     AtlasBoost-*     External
-use     AtlasROOT       AtlasROOT-*      External
-use DataModel DataModel-* Control
-use AthenaBaseComps AthenaBaseComps-* Control
-use TrigT1CaloEvent TrigT1CaloEvent-* Trigger/TrigT1
-use xAODTrigL1Calo xAODTrigL1Calo-* Event/xAOD
-use TrigT1CaloUtils TrigT1CaloUtils-* Trigger/TrigT1
-use TrigT1CaloToolInterfaces TrigT1CaloToolInterfaces-* Trigger/TrigT1
-use TrigConfInterfaces   TrigConfInterfaces-* Trigger/TrigConfiguration
-use TrigT1Interfaces TrigT1Interfaces-* Trigger/TrigT1
-# use AnalysisTriggerEvent AnalysisTriggerEvent-* PhysicsAnalysis/AnalysisTrigger
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_runtime files="*.root *.txt"
-apply_pattern component_library
-library TrigT1CaloTools *.cxx components/*.cxx
-
-private
-use CaloIdentifier  CaloIdentifier-* Calorimeter
-use CaloTriggerTool CaloTriggerTool-* Calorimeter
-use CxxUtils CxxUtils-* Control
-use EventInfo EventInfo-* Event
-use PathResolver PathResolver-* Tools
-use TrigConfL1Data  TrigConfL1Data-* Trigger/TrigConfiguration
-use TrigAnalysisInterfaces TrigAnalysisInterfaces-* Trigger/TrigAnalysis
-use TrigBunchCrossingTool TrigBunchCrossingTool-* Trigger/TrigAnalysis
-use TrigT1CaloCalibConditions TrigT1CaloCalibConditions-* Trigger/TrigT1
-use TrigT1CaloCalibToolInterfaces TrigT1CaloCalibToolInterfaces-* Trigger/TrigT1
-use TrigT1CaloCondSvc TrigT1CaloCondSvc-* Trigger/TrigT1
-use TrigT1CaloMappingToolInterfaces TrigT1CaloMappingToolInterfaces-* Trigger/TrigT1
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
diff --git a/Trigger/TrigT1/TrigT1CaloTools/doc/packagedoc.h b/Trigger/TrigT1/TrigT1CaloTools/doc/packagedoc.h
deleted file mode 100644
index 612df27672e554787bd56cc541aefc1e12ab3f26..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloTools/doc/packagedoc.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
-@page TrigT1CaloTools_page TrigT1CaloTools Package
-
->> Please enter an overview of the created package here: What does it contain?
-
-@author Alan Watson <Alan.Watson@cern.ch>
-
-@section TrigT1CaloTools_TrigT1CaloToolsIntro Introduction
-
->> Please enter a brief description of the package here.
-
-@section TrigT1CaloTools_TrigT1CaloToolsReq Requirements
-
-
-*/
diff --git a/Trigger/TrigT1/TrigT1CaloTools/src/L1TriggerTowerTool.cxx b/Trigger/TrigT1/TrigT1CaloTools/src/L1TriggerTowerTool.cxx
index 6909e1811e4b6e90ef77df25672d0fcd6e20171c..a18188087f843355dc8c66ba849ca64e0eed9180 100644
--- a/Trigger/TrigT1/TrigT1CaloTools/src/L1TriggerTowerTool.cxx
+++ b/Trigger/TrigT1/TrigT1CaloTools/src/L1TriggerTowerTool.cxx
@@ -451,7 +451,7 @@ void L1TriggerTowerTool::bcid(const std::vector<int> &filter, const std::vector<
 
   /// evaluate BCID decisions
   std::vector<int> decisionRange;
-  if (!decisionSource&0x1) etRange(digits, energyLow, energyHigh, decisionRange);
+  if (!(decisionSource&0x1)) etRange(digits, energyLow, energyHigh, decisionRange);
   else                     etRange(lutInput, energyLow, energyHigh, decisionRange);
   bcidDecision(result, decisionRange, decisionConditions, decision);
   if (m_debug) {
@@ -682,7 +682,7 @@ void L1TriggerTowerTool::bcidDecisionRange(const std::vector<int>& lutInput, con
 
   } else ATH_MSG_WARNING( "::bcidDecisionRange: No Conditions Container retrieved" );
 
-  if (!decisionSource&0x1) etRange(digits, channelId, output);
+  if (!(decisionSource&0x1)) etRange(digits, channelId, output);
   else                     etRange(lutInput, channelId, output);
   if (m_debug) {
     ATH_MSG_VERBOSE( "::bcidDecisionRange: decisionSource: " << decisionSource);
diff --git a/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/L1TopoDataMaker.h b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/L1TopoDataMaker.h
index 1c390770d51b3f682b53a2d61316a2e2fa489cc6..7c6eed8a21cd70f2be833018ac341d8b4a4ea686 100644
--- a/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/L1TopoDataMaker.h
+++ b/Trigger/TrigT1/TrigT1CaloUtils/TrigT1CaloUtils/L1TopoDataMaker.h
@@ -45,19 +45,20 @@ namespace LVL1
       virtual ~L1TopoDataMaker ();
       
       /** Fill DataVector of CPCMXTopoData from RoIBResult */
-      virtual void makeCPCMXTopoData(const ROIB::RoIBResult* roibResult, DataVector<CPCMXTopoData>* topoData);
+      virtual void makeCPCMXTopoData(const ROIB::RoIBResult* roibResult, DataVector<CPCMXTopoData>* topoData) const;
       /** Fill DataVector of CPCMXTopoData from RoIBResult */
-      virtual void makeCPCMXTopoData(const std::vector<ROIB::EMTauResult> & roibData, DataVector<CPCMXTopoData>* topoData);
+      virtual void makeCPCMXTopoData(const std::vector<ROIB::EMTauResult> & roibData, DataVector<CPCMXTopoData>* topoData) const;
       
       /** Fill DataVector of JetCMXTopoData from RoIBResult */
-      virtual void makeJetCMXTopoData(const ROIB::RoIBResult* roibResult, DataVector<JetCMXTopoData>* topoData);
+      virtual void makeJetCMXTopoData(const ROIB::RoIBResult* roibResult, DataVector<JetCMXTopoData>* topoData) const;
       /** Fill DataVector of JetCMXTopoData from RoIBResult */
-      virtual void makeJetCMXTopoData(const std::vector<ROIB::JetEnergyResult> & roibData, DataVector<JetCMXTopoData>* topoData);
+      virtual void makeJetCMXTopoData(const std::vector<ROIB::JetEnergyResult> & roibData, DataVector<JetCMXTopoData>* topoData) const;
        
       /** Fill EnergyTopoData from RoIBResult */
-      virtual void makeEnergyTopoData(const ROIB::RoIBResult* roibResult, EnergyTopoData* topoData);
+      virtual void makeEnergyTopoData(const ROIB::RoIBResult* roibResult, EnergyTopoData* topoData) const;
+
       /** Fill EnergyTopoData from RoIBResult */
-      virtual void makeEnergyTopoData(const std::vector<ROIB::JetEnergyResult> & roibData, EnergyTopoData* topoData);
+      virtual void makeEnergyTopoData(const std::vector<ROIB::JetEnergyResult> & roibData, EnergyTopoData* topoData) const;
             
    private:
                    
diff --git a/Trigger/TrigT1/TrigT1CaloUtils/cmt/requirements b/Trigger/TrigT1/TrigT1CaloUtils/cmt/requirements
deleted file mode 100755
index 13405fdac05aa8fbd16ed227835c51e53d58e780..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1CaloUtils/cmt/requirements
+++ /dev/null
@@ -1,30 +0,0 @@
-package TrigT1CaloUtils
-author Alan Watson <Alan.Watson@cern.ch>
-
-use     AtlasPolicy     AtlasPolicy-*
-use     CLIDSvc         CLIDSvc-*        Control
-use     DataModel       DataModel-*   Control
-use     CaloEvent       CaloEvent-*      Calorimeter
-use     GaudiInterface  GaudiInterface-* External
-use     TrigT1CaloEvent TrigT1CaloEvent-* Trigger/TrigT1
-use     xAODTrigL1Calo  xAODTrigL1Calo-* Event/xAOD
-
-private
-use  TrigT1Result               TrigT1Result-*                  Trigger/TrigT1
-use TrigConfL1Data  TrigConfL1Data-* Trigger/TrigConfiguration
-end_private
-
-#needed for config. of Trigger Menus
-use TrigConfInterfaces  TrigConfInterfaces-* Trigger/TrigConfiguration
-
-#Interfaces between the different parts of level1
-use TrigT1Interfaces TrigT1Interfaces-* Trigger/TrigT1
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern dual_use_library files=*.cxx
-
-private 
-use AtlasReflex      AtlasReflex-*       External -no_auto_imports
-end_private
-
diff --git a/Trigger/TrigT1/TrigT1CaloUtils/src/L1TopoDataMaker.cxx b/Trigger/TrigT1/TrigT1CaloUtils/src/L1TopoDataMaker.cxx
index fd81e884bf6887f77c4cfc8b7350a1af99f06b9e..efb49752dd9f742c2db1d8c43119f396e2f98c8b 100644
--- a/Trigger/TrigT1/TrigT1CaloUtils/src/L1TopoDataMaker.cxx
+++ b/Trigger/TrigT1/TrigT1CaloUtils/src/L1TopoDataMaker.cxx
@@ -29,7 +29,7 @@ LVL1::L1TopoDataMaker::~L1TopoDataMaker()
 
 /** Fill DataVector of CPCMXTopoData from RoIBResult */
 void
-LVL1::L1TopoDataMaker::makeCPCMXTopoData(const ROIB::RoIBResult* roibResult, DataVector<CPCMXTopoData>* topoData) {
+LVL1::L1TopoDataMaker::makeCPCMXTopoData(const ROIB::RoIBResult* roibResult, DataVector<CPCMXTopoData>* topoData) const {
 
    /** retrieve EMTauResult from RoIBResult.         <br>
        Use other tool to fill CPCMXTopoData from it. <br> */
@@ -42,7 +42,7 @@ LVL1::L1TopoDataMaker::makeCPCMXTopoData(const ROIB::RoIBResult* roibResult, Dat
 
 /** Fill DataVector of CPCMXTopoData from vector of EMTauResult */
 void
-LVL1::L1TopoDataMaker::makeCPCMXTopoData(const std::vector<ROIB::EMTauResult> & roibData, DataVector<CPCMXTopoData>* topoData) {
+LVL1::L1TopoDataMaker::makeCPCMXTopoData(const std::vector<ROIB::EMTauResult> & roibData, DataVector<CPCMXTopoData>* topoData) const {
 
    // Clear collection before filling
    topoData->clear();
@@ -76,7 +76,7 @@ LVL1::L1TopoDataMaker::makeCPCMXTopoData(const std::vector<ROIB::EMTauResult> &
 
 /** Fill DataVector of JetCMXTopoData from RoIBResult */
 void
-LVL1::L1TopoDataMaker::makeJetCMXTopoData(const ROIB::RoIBResult* roibResult, DataVector<JetCMXTopoData>* topoData) {
+LVL1::L1TopoDataMaker::makeJetCMXTopoData(const ROIB::RoIBResult* roibResult, DataVector<JetCMXTopoData>* topoData) const {
 
    /** retrieve JetEnergyResult from RoIBResult.         <br>
        Use other tool to fill JetMXTopoData from it. <br> */
@@ -89,7 +89,7 @@ LVL1::L1TopoDataMaker::makeJetCMXTopoData(const ROIB::RoIBResult* roibResult, Da
 
 /** Fill DataVector of JetCMXTopoData from vector of JetEnergyResult */
 void
-LVL1::L1TopoDataMaker::makeJetCMXTopoData(const std::vector<ROIB::JetEnergyResult> & roibData, DataVector<JetCMXTopoData>* topoData) {
+LVL1::L1TopoDataMaker::makeJetCMXTopoData(const std::vector<ROIB::JetEnergyResult> & roibData, DataVector<JetCMXTopoData>* topoData) const {
 
    // Clear collection before filling
    topoData->clear();
@@ -122,7 +122,7 @@ LVL1::L1TopoDataMaker::makeJetCMXTopoData(const std::vector<ROIB::JetEnergyResul
 
 /** Fill EnergyTopoData from RoIBResult */
 void
-LVL1::L1TopoDataMaker::makeEnergyTopoData(const ROIB::RoIBResult* roibResult, EnergyTopoData* topoData) {
+LVL1::L1TopoDataMaker::makeEnergyTopoData(const ROIB::RoIBResult* roibResult, EnergyTopoData* topoData) const {
 
    /** retrieve JetEnergyResult from RoIBResult.         <br>
        Use other tool to fill EnergyTopoData from it. <br> */
@@ -135,7 +135,7 @@ LVL1::L1TopoDataMaker::makeEnergyTopoData(const ROIB::RoIBResult* roibResult, En
 
 /** Fill EnergyTopoData from vector of JetEnergyResult */
 void
-LVL1::L1TopoDataMaker::makeEnergyTopoData(const std::vector<ROIB::JetEnergyResult> & roibData, EnergyTopoData* topoData) {
+LVL1::L1TopoDataMaker::makeEnergyTopoData(const std::vector<ROIB::JetEnergyResult> & roibData, EnergyTopoData* topoData) const {
 
   
    /** retrieve Jet RoIs from JetEnergyResult.            <br>
diff --git a/Trigger/TrigT1/TrigT1EventAthenaPool/cmt/requirements b/Trigger/TrigT1/TrigT1EventAthenaPool/cmt/requirements
deleted file mode 100755
index 890dd1dff9fd033b952e9936dea487b5f1a27743..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1EventAthenaPool/cmt/requirements
+++ /dev/null
@@ -1,83 +0,0 @@
-package TrigT1EventAthenaPool
-
-author Tadashi Maeno            <Tadashi.Maeno@cern.ch>
-author Attila Krasznahorkay Jr. <Attila.Krasznahorkay@cern.ch>
-
-# Gaudi/Athena packages:
-use AtlasPolicy         AtlasPolicy-*
-use GaudiInterface      GaudiInterface-*      External
-use AthenaPoolUtilities AthenaPoolUtilities-* Database/AthenaPOOL
-
-# TrigT1 packages:
-
-private
-use AthenaPoolCnvSvc    AthenaPoolCnvSvc-*    Database/AthenaPOOL
-use TrigT1Result        TrigT1Result-*        Trigger/TrigT1
-use TrigT1CaloEvent     TrigT1CaloEvent-*     Trigger/TrigT1
-use TrigT1Interfaces    TrigT1Interfaces-*    Trigger/TrigT1
-use TrigT1EventTPCnv    TrigT1EventTPCnv-*    Trigger/TrigT1
-end_private
-
-# Create all the POOL converters:
-apply_pattern poolcnv typesWithNamespace="ROIB::RoIBResult LVL1::MuCTPICTP LVL1::EmTauCTP \
-	LVL1::JetCTP LVL1::EnergyCTP \
-	LVL1::RecMuonRoI LVL1::RecEmTauRoI LVL1::RecJetRoI \
-        LVL1::TriggerTowerCollection LVL1::JetElementCollection \
-        LVL1::CPMTowerCollection     LVL1::CPMTobRoICollection \
-	LVL1::CMXCPTobCollection     LVL1::CMXCPHitsCollection \
-	LVL1::CMXJetTobCollection    LVL1::CMXJetHitsCollection \
-	LVL1::CMXEtSumsCollection    LVL1::CMXRoI \
-	LVL1::JEMEtSumsCollection    LVL1::JEMTobRoICollection \
-	LVL1::CPMHitsCollection      LVL1::CPMRoICollection \
-        LVL1::CMMCPHitsCollection    LVL1::CMMJetHitsCollection \
-        LVL1::CMMEtSumsCollection    LVL1::CMMRoI \
-	LVL1::JEMHitsCollection      LVL1::JEMRoICollection \
-	LVL1::RODHeaderCollection" \
-	files="-s=${TrigT1Result_root}/TrigT1Result \
-                                 RoIBResult.h \
-                                 MuCTPI_RDO.h \
-                                 CTP_RDO.h \
-	       -s=${TrigT1CaloEvent_root}/TrigT1CaloEvent \
-	                         TriggerTowerCollection.h \
-                                 JetElementCollection.h \
-                                 CPMTowerCollection.h \
-                                 CPMTobRoICollection.h \
-                                 CMXCPTobCollection.h \
-                                 CMXCPHitsCollection.h \
-                                 CMXJetTobCollection.h \
-                                 CMXJetHitsCollection.h \
-                                 CMXEtSumsCollection.h \
-                                 CMXRoI.h \
-                                 JEMEtSumsCollection.h \
-                                 JEMTobRoICollection.h \
-                                 CPMHitsCollection.h \
-                                 CPMRoICollection.h \
-                                 CMMCPHitsCollection.h \
-                                 CMMJetHitsCollection.h \
-                                 CMMEtSumsCollection.h \
-                                 CMMRoI.h \
-                                 JEMHitsCollection.h \
-                                 JEMRoICollection.h \
-				 RODHeaderCollection.h \
-	       -s=${TrigT1Interfaces_root}/TrigT1Interfaces \
-                                 MuCTPICTP.h \
-                                 EmTauCTP.h \
-                                 JetCTP.h \
-                                 EnergyCTP.h \
-                                 RecMuonRoI.h \
-                                 RecEmTauRoI.h \
-                                 RecJetRoI.h"
-
-apply_pattern declare_joboptions files="*.py"
-
-
-private
-use TestTools            TestTools-*                AtlasTest -no_auto_imports
-
-
-apply_pattern athenarun_test \
-   name="TrigT1EventTPCnv_18.0.0" \
-   options="TrigT1EventAthenaPool/TrigT1EventTPCnv_18.0.0_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigT1EventTPCnv_18.0.0" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigT1EventTPCnv_18.0.0"
-
diff --git a/Trigger/TrigT1/TrigT1EventTPCnv/cmt/requirements b/Trigger/TrigT1/TrigT1EventTPCnv/cmt/requirements
deleted file mode 100644
index 7cedbd49e1ca6ab387094e9402e6a9b54d43f101..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1EventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,58 +0,0 @@
-package TrigT1EventTPCnv
-
-author Attila Krasznahorkay Jr. <Attila.Krasznahorkay@cern.ch>
-
-# Gaudi/Athena packages:
-use AtlasPolicy         AtlasPolicy-*
-use AthenaPoolCnvSvc    AthenaPoolCnvSvc-*     Database/AthenaPOOL
-use AthenaPoolUtilities AthenaPoolUtilities-*  Database/AthenaPOOL
-
-# TrigT1 packages:
-use TrigT1Result      TrigT1Result-*      Trigger/TrigT1
-use TrigT1CaloEvent   TrigT1CaloEvent-*   Trigger/TrigT1
-
-# Compile the converters:
-apply_pattern tpcnv_library
-library TrigT1EventTPCnv  *.cxx
-
-# Create dictionaries for the persistent classes:
-private
-
-use GaudiInterface      GaudiInterface-*       External
-use AthenaKernel        AthenaKernel-*         Control
-use AtlasReflex       AtlasReflex-*       External -no_auto_imports
-
-apply_pattern lcgdict dict=TrigT1EventTPCnv selectionfile="selection.xml" \
-   headerfiles="../TrigT1EventTPCnv/TrigT1EventTPCnvDict.h"
-
-end_private
-
-
-private
-use TestTools            TestTools-*            AtlasTest
-
-apply_pattern UnitTest_run unit_test=CMMCPHitsCnv_p1
-apply_pattern UnitTest_run unit_test=CMMEtSumsCnv_p1
-apply_pattern UnitTest_run unit_test=CMMJetHitsCnv_p1
-apply_pattern UnitTest_run unit_test=CMMRoICnv_p1
-apply_pattern UnitTest_run unit_test=CMXCPHitsCnv_p1
-apply_pattern UnitTest_run unit_test=CMXCPTobCnv_p1
-apply_pattern UnitTest_run unit_test=CMXEtSumsCnv_p1
-apply_pattern UnitTest_run unit_test=CMXJetHitsCnv_p1
-apply_pattern UnitTest_run unit_test=CMXJetTobCnv_p1
-apply_pattern UnitTest_run unit_test=CMXRoICnv_p1
-apply_pattern UnitTest_run unit_test=CPMHitsCnv_p1
-apply_pattern UnitTest_run unit_test=CPMRoICnv_p1
-apply_pattern UnitTest_run unit_test=CPMTobRoICnv_p1
-apply_pattern UnitTest_run unit_test=CPMTowerCnv_p1
-apply_pattern UnitTest_run unit_test=CTP_RDOCnv_p1
-apply_pattern UnitTest_run unit_test=CTP_RDOCnv_p2
-apply_pattern UnitTest_run unit_test=JEMEtSumsCnv_p1
-apply_pattern UnitTest_run unit_test=JEMHitsCnv_p1
-apply_pattern UnitTest_run unit_test=JEMRoICnv_p1
-apply_pattern UnitTest_run unit_test=JEMTobRoICnv_p1
-apply_pattern UnitTest_run unit_test=JetElementCnv_p1
-apply_pattern UnitTest_run unit_test=MuCTPI_RDOCnv_p1
-apply_pattern UnitTest_run unit_test=RODHeaderCnv_p1
-apply_pattern UnitTest_run unit_test=RoIBResultCnv_p1
-apply_pattern UnitTest_run unit_test=TriggerTowerCnv_p1
diff --git a/Trigger/TrigT1/TrigT1Interfaces/cmt/requirements b/Trigger/TrigT1/TrigT1Interfaces/cmt/requirements
deleted file mode 100644
index 92c3f67da7d869a4b9b12cecfb6cb6429a04d513..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1Interfaces/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package TrigT1Interfaces
-
-author Tadashi Maeno <Tadashi.Maeno@cern.ch>
-
-use AtlasPolicy     AtlasPolicy-*
-use GaudiInterface  GaudiInterface-*  External
-use AthenaBaseComps AthenaBaseComps-* Control
-use AtlasXercesC    AtlasXercesC-*    External
-use CLIDSvc         CLIDSvc-*         Control
-use DataModel       DataModel-*       Control
-#use L1CommonCore    L1CommonCore-*    Trigger/TrigT1
-use CTPfragment      v*
-use AtlasReflex     AtlasReflex-*     External -no_auto_imports
-
-library TrigT1Interfaces *.cxx
-apply_pattern installed_library
-
-private 
-use TrigConfL1Data  TrigConfL1Data-*  Trigger/TrigConfiguration
-end_private
-
-apply_pattern lcgdict dict=TrigT1Interfaces selectionfile=selection.xml \
-	headerfiles="../TrigT1Interfaces/TrigT1InterfacesDict.h"
diff --git a/Trigger/TrigT1/TrigT1Lucid/cmt/requirements b/Trigger/TrigT1/TrigT1Lucid/cmt/requirements
deleted file mode 100644
index b5c6bdb8a8dd952fa9c1d50cd4d83fef0f8b6d56..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1Lucid/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package TrigT1Lucid
-
-author  Jacob Groth-Jensen <jacob.groth-jensen@hep.lu.se>
-
-public
-
-use AtlasPolicy         AtlasPolicy-*
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use GaudiInterface      GaudiInterface-*        External
-
-# LUCID simulation
-use LUCID_RawEvent 	LUCID_RawEvent-*	ForwardDetectors/LUCID 
-
-# Trigger configuration packages
-use TrigConfInterfaces  TrigConfInterfaces-*    Trigger/TrigConfiguration
-
-private
-
-# LVL1 simulation
-use TrigT1Interfaces    TrigT1Interfaces-*      Trigger/TrigT1
-
-# Trigger configuration packages
-use TrigConfL1Data      TrigConfL1Data-*        Trigger/TrigConfiguration
-
-library TrigT1Lucid *.cxx components/*.cxx
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
diff --git a/Trigger/TrigT1/TrigT1MBTS/cmt/requirements b/Trigger/TrigT1/TrigT1MBTS/cmt/requirements
deleted file mode 100644
index 437c58a7646b2e5be484f5733391782b93c5b8f7..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1MBTS/cmt/requirements
+++ /dev/null
@@ -1,27 +0,0 @@
-package TrigT1MBTS
-author W. H. Bell <W.Bell@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use GaudiInterface      GaudiInterface-*        External
-
-# TileCal simulation
-use TileEvent           TileEvent-*          TileCalorimeter
-use TileIdentifier      TileIdentifier-*     TileCalorimeter
-
-# Trigger configuration packages
-use TrigConfInterfaces  TrigConfInterfaces-* Trigger/TrigConfiguration
-
-library TrigT1MBTS *.cxx components/*.cxx
-apply_pattern component_library
-
-private
-
-use AtlasBoost          AtlasBoost-*            External
-
-# Trigger configuration packages
-use TrigConfL1Data      TrigConfL1Data-*        Trigger/TrigConfiguration
-
-# LVL1 simulation
-use TrigT1Interfaces    TrigT1Interfaces-*      Trigger/TrigT1
-
diff --git a/Trigger/TrigT1/TrigT1MBTS/doc/packagedoc.h b/Trigger/TrigT1/TrigT1MBTS/doc/packagedoc.h
index 2d80aaecf698e4b2294a02dffe3737c5322a0c10..7d14c2b9c4292d0f5cdf27f80425683358b4c2df 100644
--- a/Trigger/TrigT1/TrigT1MBTS/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1MBTS/doc/packagedoc.h
@@ -22,4 +22,3 @@ correspond to the 32 MBTS channels.
 
 
 */
-
diff --git a/Trigger/TrigT1/TrigT1Monitoring/cmt/requirements b/Trigger/TrigT1/TrigT1Monitoring/cmt/requirements
deleted file mode 100644
index e8ecfb2ac91a532591e80de5ca0057bcfc9527b7..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1Monitoring/cmt/requirements
+++ /dev/null
@@ -1,45 +0,0 @@
-package TrigT1Monitoring
-
-author Johanna Fleckner
-
-private
-use AtlasPolicy         	AtlasPolicy-*
-use GaudiInterface      	GaudiInterface-*      	External
-use AthenaMonitoring    	AthenaMonitoring-* 	Control
-use DataModel 			DataModel-*		Control 
-
-use AtlasDoxygen		AtlasDoxygen-*  	Tools
-#use AtlasROOT			AtlasROOT-*		External
-
-use L1TopoRDO                   L1TopoRDO-*             Trigger/TrigT1/L1Topo
-
-
-use Identifier 			Identifier-*		DetectorDescription
-use LWHists                     LWHists-*               Tools
-use CaloEvent           	CaloEvent-*           	Calorimeter
-use CaloDetDescr		CaloDetDescr-*		Calorimeter
-use TrigConfInterfaces          TrigConfInterfaces-*    Trigger/TrigConfiguration
-use CaloIdentifier              CaloIdentifier-*        Calorimeter
-use CaloTriggerTool             CaloTriggerTool-*       Calorimeter
-use LArRecUtils                 LArRecUtils-*           LArCalorimeter
-use TileEvent                   TileEvent-*             TileCalorimeter
-use TileIdentifier              TileIdentifier-*        TileCalorimeter
-use TileConditions              TileConditions-*        TileCalorimeter
-use TileCalibBlobObjs           TileCalibBlobObjs-*     TileCalorimeter/TileCalib
-
-use TrigT1CaloCalibToolInterfaces  TrigT1CaloCalibToolInterfaces-*  Trigger/TrigT1
-use TrigT1CaloCalibConditions   TrigT1CaloCalibConditions-*  Trigger/TrigT1
-use TrigT1CaloCondSvc           TrigT1CaloCondSvc-*     Trigger/TrigT1
-use TrigT1CaloEvent             TrigT1CaloEvent-*       Trigger/TrigT1
-use xAODTrigL1Calo                xAODTrigL1Calo-*                Event/xAOD
-use TrigT1CaloToolInterfaces    TrigT1CaloToolInterfaces-*   Trigger/TrigT1
-use TrigT1Interfaces    	TrigT1Interfaces-*    	Trigger/TrigT1
-use TrigT1Result 		TrigT1Result-*		Trigger/TrigT1
-use TrigT1CaloMonitoringTools	TrigT1CaloMonitoringTools-*  Trigger/TrigT1
-use TrigConfL1Data              TrigConfL1Data-*        Trigger/TrigConfiguration
-end_private
-
-apply_pattern declare_joboptions files="*.py"
-
-library TrigT1Monitoring *.cxx components/*.cxx
-apply_pattern component_library
diff --git a/Trigger/TrigT1/TrigT1Monitoring/doc/packagedoc.h b/Trigger/TrigT1/TrigT1Monitoring/doc/packagedoc.h
index 290d22a4b6f2d12ee4df943817cbe4798143bf00..08269ef3d5412df123ac07fc2818d98a890a739b 100644
--- a/Trigger/TrigT1/TrigT1Monitoring/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1Monitoring/doc/packagedoc.h
@@ -16,8 +16,6 @@
   - @ref Rejectsection
   - @ref Streamsection
   - @ref MergesUsedsection
-- @subpage UsedPackagespage
-- @subpage Requirementspage
 
 */
 
@@ -120,17 +118,3 @@ See also the documentation for TrigT1CaloMonitoring.
   </table>
 
 */
-
-/**
-
-@page UsedPackagespage Used Packages
-
-
-*/
-
-/**
-
-@page Requirementspage Requirements
-
-
-*/
diff --git a/Trigger/TrigT1/TrigT1Muctpi/cmt/requirements b/Trigger/TrigT1/TrigT1Muctpi/cmt/requirements
deleted file mode 100644
index c69885c39fea28a1c3b59f631bfd1a8678c62796..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1Muctpi/cmt/requirements
+++ /dev/null
@@ -1,50 +0,0 @@
-package TrigT1Muctpi
-
-author Thorsten Wengler     <Thorsten.Wengler@cern.ch>
-author Tadashi Maeno        <Tadashi.Maeno@cern.ch>
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-
-public
-
-use AtlasPolicy           AtlasPolicy-*
-use AthenaBaseComps       AthenaBaseComps-*       Control
-
-
-private
-
-# General packages:
-use AthenaKernel          AthenaKernel-*          Control
-use GaudiInterface        GaudiInterface-*        External
-use PathResolver          PathResolver-*          Tools
-
-# XercesC for the new LUT handling:
-use AtlasXercesC          AtlasXercesC-*          External
-
-# Analysis type of package(s):
-use AnalysisTriggerEvent  AnalysisTriggerEvent-*  PhysicsAnalysis/AnalysisTrigger
-
-# Trigger configuration packages:
-use TrigConfInterfaces    TrigConfInterfaces-*    Trigger/TrigConfiguration
-use TrigConfL1Data        TrigConfL1Data-*        Trigger/TrigConfiguration
-use TrigConfMuctpi        TrigConfMuctpi-*        Trigger/TrigConfiguration
-
-# TrigT1 packages:
-use TrigT1Interfaces      TrigT1Interfaces-*      Trigger/TrigT1
-use TrigT1Result          TrigT1Result-*          Trigger/TrigT1
-
-# Definition of the library:
-library TrigT1Muctpi *.cxx Algorithms/*.cxx Common/*.cxx Logging/*.cxx Mibak/*.cxx \
-                     Mictp/*.cxx Mioct/*.cxx Mirod/*.cxx components/*.cxx
-apply_pattern component_library
-
-# Install the configurable(s):
-apply_pattern declare_python_modules files="*.py"
-
-# Some setup for the Doxygen documentation:
-macro_append DOXYGEN_INPUT " ../src/Algorithms \
-                             ../src/Common \
-                             ../src/Logging \
-                             ../src/Mibak \
-                             ../src/Mictp \
-                             ../src/Mioct \
-                             ../src/Mirod "
diff --git a/Trigger/TrigT1/TrigT1Muctpi/doc/packagedoc.h b/Trigger/TrigT1/TrigT1Muctpi/doc/packagedoc.h
index 4832a512636601e3efb591d7dc0a46ebe07fc4c9..07abe24b4f3b1c182b6f2073bc8f84d4b370278b 100644
--- a/Trigger/TrigT1/TrigT1Muctpi/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1Muctpi/doc/packagedoc.h
@@ -31,11 +31,3 @@
    The actual hardware simulation uses a lot of classes. Those can all be found in the "Classes" tab.
 
  */
-
-/**
-   @page used_TrigT1Muctpi Used Packages
-*/
-
-/**
-   @page requirements_TrigT1Muctpi Requirements
-*/
diff --git a/Trigger/TrigT1/TrigT1Muctpi/python/TrigT1MuctpiAlgorithmConfig.py b/Trigger/TrigT1/TrigT1Muctpi/python/TrigT1MuctpiAlgorithmConfig.py
deleted file mode 100644
index 5a83480cad98c82952c53c1011a4e3468887595d..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1Muctpi/python/TrigT1MuctpiAlgorithmConfig.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-## get a handle to the default top-level algorithm sequence
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-## get a handle to the ServiceManager
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-## get a handle to the ApplicationManager
-from AthenaCommon.AppMgr import theApp
-
-## to decode the MuCTPI bytestream
-from TrigT1ResultByteStream.TrigT1ResultByteStreamConf import MuCTPIByteStreamTool,RecMuCTPIByteStreamTool
-from TrigT1Muctpi.TrigT1MuctpiConf import CBNTAA_ReadMuCTPI_RDO
-from TrigT1Muctpi.TrigT1MuctpiConf import CBNTAA_ReadMuCTPI_RIO
-from TrigT1Muctpi.TrigT1MuctpiConf import CBNTAA_MuctpiRoI
-
-if not hasattr( svcMgr, "THistSvc" ):
-  from GaudiSvc.GaudiSvcConf import THistSvc
-  svcMgr += THistSvc()
-#svcMgr.THistSvc.Output = ["file1 DATAFILE='HistFile.root' OPT='RECREATE'"];
-
-if not hasattr( theApp.Dlls, "RootHistCnv" ):
-  theApp.Dlls += [ "RootHistCnv" ]
-  theApp.HistogramPersistency = "ROOT"
-
-if not hasattr( svcMgr, "NTupleSvc" ):
-  from GaudiSvc.GaudiSvcConf import NTupleSvc
-  svcMgr += NTupleSvc()
-#svcMgr.NTupleSvc.Output = [ "FILE1 DATAFILE='NtupleFile.root' OPT='NEW'" ]
-
-if not hasattr( topSequence, "CBNT_AthenaAware" ):
-  from CBNT_Athena.CBNT_AthenaConf import *
-  from CBNT_Utils.CBNT_UtilsConf import *
-  CBNT_AthenaAware = CBNT_AthenaAware()
-@  CBNT_AthenaAware.OutputLevel = 2
-  topSequence += CBNT_AthenaAware
-
-if not "CBNTAA_EventInfo" in topSequence.CBNT_AthenaAware.Members :
-  from CBNT_Athena.CBNT_AthenaConf import *
-  from CBNT_Utils.CBNT_UtilsConf import *
-  topSequence.CBNT_AthenaAware.Members += ["CBNTAA_EventInfo"]
-        
-if not "CBNTAA_ReadMuCTPI_RDO" in topSequence.CBNT_AthenaAware.Members :
-  CBNTAA_ReadMuCTPI_RDO = CBNTAA_ReadMuCTPI_RDO()
-  CBNTAA_ReadMuCTPI_RDO.StoreRawData = False
-  topSequence.CBNT_AthenaAware.Members += ["CBNTAA_ReadMuCTPI_RDO"]
-
-if not "CBNTAA_ReadMuCTPI_RIO" in topSequence.CBNT_AthenaAware.Members :
-  topSequence.CBNT_AthenaAware.Members += ["CBNTAA_ReadMuCTPI_RIO"]
-
-if not "CBNTAA_MuctpiRoI" in topSequence.CBNT_AthenaAware.Members :
-  CBNTAA_MuctpiRoI = CBNTAA_MuctpiRoI()
-  #      CBNT_MuctpiRoI.RoISource = "roi"
-  topSequence.CBNT_AthenaAware.Members += ["CBNTAA_MuctpiRoI"]
-
-# print topSequence
-
-# class CBNTAA_Algorithms():
-#   """
-#     Configurable module to setup ntuple-producing algorithms
-#   """
-#   def __init__( self, name = "CBNTAA_Algorithms" ):
-#     #
-#     # CBNT part
-#     #
diff --git a/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1Muctpi.cxx b/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1Muctpi.cxx
index 022fa0d20616f8a4b02dbf2733a79a767ad3d408..96ee162b1a9645b36019048fe2bb92ea0a81150a 100644
--- a/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1Muctpi.cxx
+++ b/Trigger/TrigT1/TrigT1Muctpi/src/Algorithms/L1Muctpi.cxx
@@ -567,17 +567,13 @@ namespace LVL1MUCTPI {
    */
   StatusCode L1Muctpi::saveOutput(int bcidOffset) {
      
-    ATH_MSG_DEBUG( "saveOutput called with bcidOffset = " << bcidOffset );
-    
     /// the standart processing is done for the central slice, with no Bcid offset
-    if (abs(bcidOffset) <= 1) {
+    if (bcidOffset == 0 ) {
       // store CTP result in interface object and put to StoreGate
       LVL1::MuCTPICTP* theCTPResult = new LVL1::MuCTPICTP( m_theMuctpi->getCTPData() );
-      std::string ctpOutputLocId = m_ctpOutputLocId;
-      if (bcidOffset) ctpOutputLocId = m_ctpOutputLocId+std::to_string(bcidOffset);
-      CHECK( evtStore()->record( theCTPResult, ctpOutputLocId ) );
+      CHECK( evtStore()->record( theCTPResult, m_ctpOutputLocId ) );
       ATH_MSG_DEBUG( "CTP word recorded to StoreGate with key: "
-                     << ctpOutputLocId );
+                     << m_ctpOutputLocId );
 
       // create MuCTPI RDO
       const std::list< unsigned int >& daqData = m_theMuctpi->getDAQData();
@@ -612,11 +608,9 @@ namespace LVL1MUCTPI {
 
       // create MuCTPI RDO
       MuCTPI_RDO * muCTPI_RDO = new MuCTPI_RDO( can, dataWord );
-      std::string rdoOutputLocId = m_rdoOutputLocId;
-      if (bcidOffset) rdoOutputLocId = m_rdoOutputLocId+std::to_string(bcidOffset);
-      CHECK( evtStore()->record( muCTPI_RDO, rdoOutputLocId ) );
+      CHECK( evtStore()->record( muCTPI_RDO, m_rdoOutputLocId ) );
       ATH_MSG_DEBUG( "MuCTPI_RDO object recorded to StoreGate with key: "
-                     << rdoOutputLocId );
+                     << m_rdoOutputLocId );
 
       // store RoIB result in interface object and put to StoreGate
       std::list< unsigned int > resultForRoIB = m_theMuctpi->getRoIBData();
@@ -631,15 +625,13 @@ namespace LVL1MUCTPI {
       L1MUINT::MuCTPIToRoIBSLink* theRoIBResult =
 	new L1MUINT::MuCTPIToRoIBSLink( roibResultVector );
 
-      std::string roiOutputLocId = m_roiOutputLocId;
-      if (bcidOffset) roiOutputLocId = m_roiOutputLocId+std::to_string(bcidOffset);
-      CHECK( evtStore()->record( theRoIBResult, roiOutputLocId ) );
+      CHECK( evtStore()->record( theRoIBResult, m_roiOutputLocId ) );
       ATH_MSG_DEBUG( "RoIB result recorded to StoreGate with key: "
-                     << roiOutputLocId );
+                     << m_roiOutputLocId );
 
       //construct muctpi nim words (for MUE and MUB items)
       unsigned int cw1=0;
-      if( m_doNimOutput && bcidOffset==0) {
+      if( m_doNimOutput ) {
 	if(m_theMuctpi->hasBarrelCandidate()){
 	  unsigned int nimBarrelBitMask = 1<<m_nimBarrelBit;
 	  cw1|=nimBarrelBitMask;
@@ -661,15 +653,13 @@ namespace LVL1MUCTPI {
       }
 
       // get outputs for L1Topo and store into Storegate
-      if(bcidOffset==0) {
-	ATH_MSG_DEBUG("Getting the output for L1Topo");
-	LVL1::MuCTPIL1Topo l1topoCandidates = m_theMuctpi->getL1TopoData();
-	LVL1::MuCTPIL1Topo* l1topo = new LVL1::MuCTPIL1Topo(l1topoCandidates.getCandidates());
-	CHECK( evtStore()->record( l1topo, m_l1topoOutputLocId ) );
-	//      std::cout << "TW: ALG central slice: offset: " <<  bcidOffset << "  location: " << m_l1topoOutputLocId << std::endl;
-	//      l1topo->print();
-      }
-    }
+      ATH_MSG_DEBUG("Getting the output for L1Topo");
+      LVL1::MuCTPIL1Topo l1topoCandidates = m_theMuctpi->getL1TopoData();
+      LVL1::MuCTPIL1Topo* l1topo = new LVL1::MuCTPIL1Topo(l1topoCandidates.getCandidates());
+      CHECK( evtStore()->record( l1topo, m_l1topoOutputLocId ) );
+      //      std::cout << "TW: ALG central slice: offset: " <<  bcidOffset << "  location: " << m_l1topoOutputLocId << std::endl;
+      //      l1topo->print();
+   }
 
     /// if we have a bcid offset, then just get the topo output and put it on storegate
     if (bcidOffset  != 0) {
diff --git a/Trigger/TrigT1/TrigT1RPCRecRoiSvc/cmt/requirements b/Trigger/TrigT1/TrigT1RPCRecRoiSvc/cmt/requirements
deleted file mode 100755
index dc2fd6b93871f2ede80efac59562e04caa7a2475..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1RPCRecRoiSvc/cmt/requirements
+++ /dev/null
@@ -1,24 +0,0 @@
-package TrigT1RPCRecRoiSvc
-
-author Tadashi Maeno <Tadashi.Maeno@cern.ch>
-author Alessandro Di Mattia <alessandro.dimattia@roma1.infn.it>
-
-public
-use AtlasPolicy         AtlasPolicy-*
-use TrigT1Interfaces    TrigT1Interfaces-*       Trigger/TrigT1
-use MuonReadoutGeometry MuonReadoutGeometry-*    MuonSpectrometer/MuonDetDescr
-
-private
-use GaudiInterface      GaudiInterface-*         External
-use StoreGate           StoreGate-*              Control
-use Identifier          Identifier-*             DetectorDescription
-use RPCcablingInterface RPCcablingInterface-*    MuonSpectrometer/MuonCablings
-end_private
-
-
-apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_runtime
-apply_pattern declare_joboptions files="*.txt *.py"
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigT1/TrigT1RPChardware/cmt/requirements b/Trigger/TrigT1/TrigT1RPChardware/cmt/requirements
deleted file mode 100755
index 5b3cc019d3f579a62dddc96a2d437951c741b349..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1RPChardware/cmt/requirements
+++ /dev/null
@@ -1,45 +0,0 @@
-package TrigT1RPChardware
-
-author Aleandro Nisati <nisati@cern.ch>
-
-use AtlasPolicy            AtlasPolicy-*
-
-use MuonCablingTools       MuonCablingTools-*   MuonSpectrometer/MuonCablings
-
-
-private
-use GaudiInterface         GaudiInterface-*          External
-
-
-
-public
-
-###################################################
-# Standalone library build                        #
-###################################################
-
-macro lib_RPChardware_pp_cppflags " -DLVL1_STANDALONE "
-library RPChardware -no_share -suffix=STN *.cxx
-macro_append RPChardware_dependencies " install_includes"
-
-
-#########################################################
-# ATHENA librariy build                                 #
-#########################################################
-
-apply_pattern dual_use_library files=*.cxx
-
-#library TrigT1RPChardware *.cxx -s=../src/components *.cxx
-
-#apply_pattern declare_runtime
-
-###############################################################################
-# Standalone application build                                                #
-###############################################################################
-
-ignore_pattern package_stamps
-
-
-macro_append  Lvl1RpcTrig_pp_cppflags  " -DLVL1_STANDALONE "
-macro_append  Lvl1RpcTriglinkopts  " -L$(MUONCABLINGTOOLSROOT)/${BINDIR}  -lRPChardware -lCablingTools "
-# application  Lvl1RpcTrig  -s=../share *.cxx
diff --git a/Trigger/TrigT1/TrigT1RPClogic/TrigT1RPClogic/PATTERNidentity.h b/Trigger/TrigT1/TrigT1RPClogic/TrigT1RPClogic/PATTERNidentity.h
index 6a54fba09f75fa6ddaf60a8f85efd5fa0b61ffd2..f13c190bc289b8976cf7f990009a5361b6c205c6 100755
--- a/Trigger/TrigT1/TrigT1RPClogic/TrigT1RPClogic/PATTERNidentity.h
+++ b/Trigger/TrigT1/TrigT1RPClogic/TrigT1RPClogic/PATTERNidentity.h
@@ -21,7 +21,7 @@
 class PATTERNidentity
 {
     private:
-    static const char inputTag[4][9];
+    static const char s_inputTag[4][9];
 
     CMAinput m_input_id;
     int      m_layer_id;
diff --git a/Trigger/TrigT1/TrigT1RPClogic/cmt/requirements b/Trigger/TrigT1/TrigT1RPClogic/cmt/requirements
deleted file mode 100755
index 6038ca8f90d6ee8b0b32688f59d8309abfd09ac1..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1RPClogic/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package TrigT1RPClogic
-
-author Alessandro Di Mattia <alessandro.dimattia@roma1.infn.it>
-
-use AtlasPolicy            AtlasPolicy-*
-use GaudiInterface         GaudiInterface-*          External
-
-use MuonCablingTools       MuonCablingTools-*    MuonSpectrometer/MuonCablings
-use RPCcablingInterface    RPCcablingInterface-* MuonSpectrometer/MuonCablings
-#use RPCgeometry            RPCgeometry-*         MuonSpectrometer/MuonCablings
-
-use TrigT1RPChardware      TrigT1RPChardware-*  Trigger/TrigT1
-
-
-
-###################################################
-# Standalone library build                        #
-###################################################
-
-#macro lib_RPClogic_pp_cppflags " -DLVL1_STANDALONE "
-#library RPClogic -no_share -suffix=STN *.cxx
-#macro_append RPClogic_dependencies " install_includes"
-
-
-#########################################################
-# ATHENA librariy build                                 #
-#########################################################
-
-apply_pattern dual_use_library files=*.cxx
-
-apply_pattern declare_runtime
-
-###############################################################################
-# Standalone application build                                                #
-###############################################################################
-
-
-#macro_append  datatest_pp_cppflags  " -DLVL1_STANDALONE "
-
-
-#macro_append  datatestlinkopts  " -L$(RPCGEOMETRYROOT)/${BINDIR} -L$(MUONCABLINGTOOLSROOT)/${BINDIR} -L$(RPCCABLINGROOT)/${BINDIR}  -L$(TRIGT1RPCHARDWAREROOT)/${BINDIR} -lRPClogic -lRPChardware -lRPCgeo -lRPCcab -lCablingTools "
-
-# application  datatest  ../share/DataTest.cxx
diff --git a/Trigger/TrigT1/TrigT1RPClogic/src/PATTERNidentity.cxx b/Trigger/TrigT1/TrigT1RPClogic/src/PATTERNidentity.cxx
index aacbf8a9928d611451c26dfae73f65643e2fdfdc..cbc8796179feb6ef991d60a36320b558e600d064 100755
--- a/Trigger/TrigT1/TrigT1RPClogic/src/PATTERNidentity.cxx
+++ b/Trigger/TrigT1/TrigT1RPClogic/src/PATTERNidentity.cxx
@@ -6,7 +6,7 @@
 
 using namespace std;
 
-const char PATTERNidentity::inputTag[4][9] = 
+const char PATTERNidentity::s_inputTag[4][9] = 
     { {"Low Pt"},{"Pivot"},{"High Pt"},{"No input"} };
 
 
@@ -52,6 +52,6 @@ void PATTERNidentity::Print(ostream& stream,bool detail) const
     detail = true;
     if(detail)
     {
-        stream << inputTag[input_id()] << ",  layer " << layer_id();
+        stream << s_inputTag[input_id()] << ",  layer " << layer_id();
     }
 }
diff --git a/Trigger/TrigT1/TrigT1RPCsteering/cmt/requirements b/Trigger/TrigT1/TrigT1RPCsteering/cmt/requirements
deleted file mode 100755
index 90c390ca5ca8c5632f8059a481d82c4fbc311ff5..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1RPCsteering/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-package TrigT1RPCsteering
-
-author Alessandro Di Mattia <alessandro.dimattia@roma1.infn.it>
-
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use AtlasPolicy          AtlasPolicy-*
-use GaudiInterface       GaudiInterface-*         External
-use StoreGate            StoreGate-*              Control
-use Identifier           Identifier-*             DetectorDescription
-
-use TrigT1RPClogic       TrigT1RPClogic-*         Trigger/TrigT1
-#use TrigT1RPCmonitoring  TrigT1RPCmonitoring-*    Trigger/TrigT1
-
-use RPCcablingInterface  RPCcablingInterface-*    MuonSpectrometer/MuonCablings
-use MuonReadoutGeometry  MuonReadoutGeometry-*    MuonSpectrometer/MuonDetDescr
-
-
-#########################################################
-# ATHENA librariy build                                 #
-#########################################################
-
-apply_pattern component_library
-
-library TrigT1RPCsteering *.cxx -s=../src/components *.cxx
-
-apply_pattern declare_joboptions files="*.txt *.py"
-
-apply_pattern declare_python_modules files="*.py"
-
-private
-
-use TrigT1RPChardware    TrigT1RPChardware-*      Trigger/TrigT1
-use AtlasHepMC           AtlasHepMC-*             External
-use GeneratorObjects     GeneratorObjects-*       Generators
-use MuonDigitContainer   MuonDigitContainer-*     MuonSpectrometer
-use MuonIdHelpers        MuonIdHelpers-*          MuonSpectrometer
-use TrigT1Interfaces     TrigT1Interfaces-*       Trigger/TrigT1
diff --git a/Trigger/TrigT1/TrigT1Result/cmt/requirements b/Trigger/TrigT1/TrigT1Result/cmt/requirements
deleted file mode 100755
index 8a770c4aada5accd8235ee55dca71a8c1b036e60..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1Result/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package TrigT1Result
-
-author Tadashi Maeno <Tadashi.Maeno@cern.ch>
-
-use GaudiInterface   GaudiInterface-*   External # DON'T MAKE THIS USE STATEMENT PRIVATE, NO MATTER WHAT checkreq.py SAYS! See https://savannah.cern.ch/bugs/index.php?85395
-use AtlasPolicy      AtlasPolicy-*
-use DataCollection   DataCollection-*   External
-use CLIDSvc          CLIDSvc-*          Control
-use TrigT1Interfaces TrigT1Interfaces-* Trigger/TrigT1
-use L1TopoRDO	     L1TopoRDO-*	Trigger/TrigT1/L1Topo
-#use L1CommonCore L1CommonCore-* Trigger/TrigT1
-use CTPfragment      v*
-
-library TrigT1Result *.cxx
-apply_pattern installed_library
-
-private
-use AtlasReflex      AtlasReflex-*      External -no_auto_imports
-use AthenaKernel     AthenaKernel-*     Control  
-
-apply_pattern lcgdict dict=TrigT1Result selectionfile=selection.xml \
-	headerfiles="../TrigT1Result/TrigT1ResultDict.h"
-
diff --git a/Trigger/TrigT1/TrigT1Result/doc/packagedoc.h b/Trigger/TrigT1/TrigT1Result/doc/packagedoc.h
index 69bf2ba6b024b0b674b461a55bf7bf14af8cc17a..87b17b9f3c0dd4a5f75f427affc6b3520277b29c 100644
--- a/Trigger/TrigT1/TrigT1Result/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1Result/doc/packagedoc.h
@@ -46,15 +46,4 @@ Usually they are written to RDO or BS files.
 
 @section TrigT1Result_TrigT1Result Extra Pages
 
-- @ref used_TrigT1Result
-- @ref requirements_TrigT1Result
 */
-
-/**
-   @page used_TrigT1Result Used Packages
-*/
-
-/**
-   @page requirements_TrigT1Result Requirements
-*/
-
diff --git a/Trigger/TrigT1/TrigT1ResultByteStream/cmt/requirements b/Trigger/TrigT1/TrigT1ResultByteStream/cmt/requirements
deleted file mode 100755
index 0889c0c909396a49ab1c763e388f9d8d18365907..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1ResultByteStream/cmt/requirements
+++ /dev/null
@@ -1,48 +0,0 @@
-package TrigT1ResultByteStream
-
-use AtlasPolicy      AtlasPolicy-*
-use GaudiInterface   GaudiInterface-*   External
-use AthenaBaseComps  AthenaBaseComps-*  Control
-use StoreGate        StoreGate-*        Control
-use SGTools          SGTools-*          Control
-use ByteStreamData   ByteStreamData-*   Event
-use ByteStreamCnvSvcBase ByteStreamCnvSvcBase-* Event 
-use ByteStreamCnvSvc ByteStreamCnvSvc-* Event 
-use DataCollection   DataCollection-*   External
-use TrigT1Result     TrigT1Result-*     Trigger/TrigT1
-use L1TopoRDO	     L1TopoRDO-*	Trigger/TrigT1/L1Topo
-#use TrigConfigSvc    TrigConfigSvc-*    Trigger/TrigConfiguration
-use TrigConfInterfaces    TrigConfInterfaces-*    Trigger/TrigConfiguration
-use TrigConfL1Data   TrigConfL1Data-*   Trigger/TrigConfiguration
-use TrigT1Interfaces TrigT1Interfaces-* Trigger/TrigT1
-
-# eformat CTP data specification
-use CTPfragment      v*
-
-private
-
-# use L1CommonCore     L1CommonCore-*     Trigger/TrigT1
-
-author Hong Ma <hma@bnl.gov> 
-author Tadashi Maeno <Tadashi.Maeno@cern.ch>
-author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-author David Berge <David.Berge@cern.ch>
-author Christian Ohm <Christian.Ohm@cern.ch>
-
-#
-# create the reguTrigT1Result dual_use_lib for the Container converters 
-#
-apply_pattern dual_use_library files="*.cxx"
-apply_pattern declare_joboptions files="*.py"
-
-# The following MacOSX-specific customization allows this package to build on MacOSX,
-# but it's not functional because of the missing eformat libCTPfragment.so library
-
-# eformat CTP data specification
-macro_append TrigT1ResultByteStreamLib_shlibflags " -lCTPfragment " Darwin ""
-
-private
-macro ttr_allow_undefined "_noAllowUndefined" Darwin "allowUndefined"
-apply_tag $(ttr_allow_undefined)
-end_private
-
diff --git a/Trigger/TrigT1/TrigT1RoIB/cmt/requirements b/Trigger/TrigT1/TrigT1RoIB/cmt/requirements
deleted file mode 100644
index dee711903b52a73de68721c2929697ba6ec49b66..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1RoIB/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigT1RoIB
-
-manager Attila Kraznahorkay Jr. <Attila.Krasznahorkay@cern.ch>
-author  Attila Kraznahorkay Jr. <Attila.Krasznahorkay@cern.ch>
-author  Wolfgang Ehrenfeld <Wolfgang.Ehrenfeld@desy.de>
-
-private
-
-use AtlasPolicy       AtlasPolicy-*
-
-use GaudiInterface    GaudiInterface-*    External
-use DataCollection    DataCollection-*    External
-
-use AthenaKernel      AthenaKernel-*      Control
-use AthenaBaseComps   AthenaBaseComps-*   Control
-use DataModel         DataModel-*         Control
-
-use EventInfo	       EventInfo-*         Event
-
-use TrigT1Interfaces  TrigT1Interfaces-*  Trigger/TrigT1
-use TrigT1Result      TrigT1Result-*      Trigger/TrigT1
-
-library TrigT1RoIB *.cxx components/*.cxx 
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigT1/TrigT1RoIB/doc/packagedoc.h b/Trigger/TrigT1/TrigT1RoIB/doc/packagedoc.h
index 99aee2a81901a7de9371e8b8f85c5feb001b2d5b..7a361a29acab55031277362cbed580c57a0f7b58 100644
--- a/Trigger/TrigT1/TrigT1RoIB/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1RoIB/doc/packagedoc.h
@@ -42,15 +42,4 @@ algorithms to access the ROIB::RoIBResult and ROIB::RecRoIBResult objects.
 
 @section TrigT1RoIB_TrigT1RoIB Extra Pages
 
-- @ref used_TrigT1RoIB
-- @ref requirements_TrigT1RoIB
 */
-
-/**
-   @page used_TrigT1RoIB Used Packages
-*/
-
-/**
-   @page requirements_TrigT1RoIB Requirements
-*/
-
diff --git a/Trigger/TrigT1/TrigT1TGC/cmt/requirements b/Trigger/TrigT1/TrigT1TGC/cmt/requirements
deleted file mode 100755
index 32109e2b9e51bcde31dd2cfa1e29a01978a57d04..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1TGC/cmt/requirements
+++ /dev/null
@@ -1,41 +0,0 @@
-package TrigT1TGC
-
-manager Chihiro Omachi <omati@phys.sci.kobe-u.ac.jp>
-manager Masaya Ishino <Masaya.Ishino@cern.ch>
-author  Chihiro Omachi <omati@phys.sci.kobe-u.ac.jp>
-author  Masaya Ishino <Masaya.Ishino@cern.ch>
-author  Naoko Kanaya <Naoko.Kanaya@cern.ch>
-
-public
-use AtlasPolicy            AtlasPolicy-*
-use StoreGate              StoreGate-*              Control
-use CLIDSvc                CLIDSvc-*                Control
-use AthenaBaseComps        AthenaBaseComps-*        Control
-use GaudiInterface         GaudiInterface-*         External
-
-use TrigT1Interfaces       TrigT1Interfaces-*       Trigger/TrigT1
-
-use Identifier 		   Identifier-* 	    DetectorDescription
-
-private
-use AtlasCLHEP             AtlasCLHEP-*             External
-use EventInfo              EventInfo-*              Event
-use GeneratorObjects       GeneratorObjects-*       Generators
-use MuonRDO                MuonRDO-*                MuonSpectrometer
-use PathResolver           PathResolver-*           Tools
-use MuonDigitContainer     MuonDigitContainer-*     MuonSpectrometer
-use MuonIdHelpers          MuonIdHelpers-*          MuonSpectrometer
-use TGCcablingInterface    TGCcablingInterface-*    MuonSpectrometer/MuonCablings
-use TrigConfL1Data	   TrigConfL1Data-*    	    Trigger/TrigConfiguration
-use TrigConfInterfaces     TrigConfInterfaces-*     Trigger/TrigConfiguration
-use MuonCondInterface      MuonCondInterface-*      MuonSpectrometer/MuonConditions/MuonCondGeneral
-use AthenaPoolUtilities  AthenaPoolUtilities-* Database/AthenaPOOL
-use TileEvent           TileEvent-*               TileCalorimeter
-
-public
-apply_pattern dual_use_library files="*.cxx"
-apply_pattern declare_joboptions files="TrigT1TGCJobOptions.txt TrigT1TGCJobOptions.py TrigT1TGC_jobOptions.py"
-apply_pattern declare_runtime files="BigWheelCW/RPhiCoincidenceMap*.db TrigT1TGCMaskedChannel*.db EiFiCW/Inner*.db TileCW/Tile*.db" 
-
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Trigger/TrigT1/TrigT1TGC/doc/packagedoc.h b/Trigger/TrigT1/TrigT1TGC/doc/packagedoc.h
index d675979bbd1f39a43ddf9cbf08a4930ae5a58ddb..b61ea3cdaf516e3fb7cbc19cb3b41b51a694f1bb 100644
--- a/Trigger/TrigT1/TrigT1TGC/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1TGC/doc/packagedoc.h
@@ -45,15 +45,5 @@
   User can use all hits(i.e. associated to next bunch) by LVL1TGCTrigger::CurrentBunchTag=0   
 
 @section TrigT1TGC_TrigT1TGC Extra Packages
-  - @ref used_TrigT1TGC
-  - @ref requirements_TrigT1TGC
 
 */
-
-/**
-   @page used_TrigT1TGC Used Packages
-*/
-
-/**
-   @page requirements_TrigT1TGC Requirements
-*/
diff --git a/Trigger/TrigT1/TrigT1TGCRecRoiSvc/cmt/requirements b/Trigger/TrigT1/TrigT1TGCRecRoiSvc/cmt/requirements
deleted file mode 100755
index dcf728cca2766944cbddcf2c8f1ce0b1bfd4d3c2..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1TGCRecRoiSvc/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-package TrigT1TGCRecRoiSvc
-
-author Yoji Hasegawa
-author Hisaya Kurashige 
-author Susumu Oda
-
-public
-use AtlasPolicy        AtlasPolicy-*
-use MuonReadoutGeometry MuonReadoutGeometry-*      MuonSpectrometer/MuonDetDescr
-use TGCcablingInterface TGCcablingInterface-*      MuonSpectrometer/MuonCablings
-use TrigT1Interfaces   TrigT1Interfaces-*  Trigger/TrigT1
-
-private
-use GaudiInterface     GaudiInterface-*    External
-use Identifier         Identifier-*        DetectorDescription
-use MuonIdHelpers      MuonIdHelpers-*     MuonSpectrometer
-use StoreGate          StoreGate-*      Control
-
-public
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigT1/TrigT1TGCRecRoiSvc/doc/packagedoc.h b/Trigger/TrigT1/TrigT1TGCRecRoiSvc/doc/packagedoc.h
index 37c27b62ab9a1e72e0aa3f92caa9a8c403d64c64..fc23249ba83d1a6f5b5aea37343e6c7434df20fe 100644
--- a/Trigger/TrigT1/TrigT1TGCRecRoiSvc/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1TGCRecRoiSvc/doc/packagedoc.h
@@ -31,17 +31,5 @@
   - @link LVL1TGC::TGCRecRoiSvc::RoIsize @endlink : return the maximum/minimum eta and phi values for a given RoI word.
    
 @section TrigT1TGCRecRoiSvc_TrigT1TGCRecRoiSvc Extra Packages
-  - @ref used_TrigT1TGCRecRoiSvc
-  - @ref requirements_TrigT1TGCRecRoiSvc
 
 */
-
-/**
-   @page used_TrigT1TGCRecRoiSvc Used Packages
-*/
-
-/**
-   @page requirements_TrigT1TGCRecRoiSvc Requirements
-*/
-
-
diff --git a/Trigger/TrigT1/TrigT1TRT/TrigT1TRT/TrigT1TRT.h b/Trigger/TrigT1/TrigT1TRT/TrigT1TRT/TrigT1TRT.h
index dcaf30362c564b9c59c74f0973904fe8ae1782eb..51770aca22542809995a1f69c4bbf0973971d73d 100644
--- a/Trigger/TrigT1/TrigT1TRT/TrigT1TRT/TrigT1TRT.h
+++ b/Trigger/TrigT1/TrigT1TRT/TrigT1TRT/TrigT1TRT.h
@@ -36,13 +36,12 @@ namespace LVL1 {
  
     const TRT_ID* m_pTRTHelper;
 
-    const InDetDD::TRT_DetectorManager *mgr;
+    const InDetDD::TRT_DetectorManager *m_mgr;
     
     ServiceHandle<ITRT_StrawNeighbourSvc> m_TRTStrawNeighbourSvc;
    
     int m_TTCMultiplicity;
     int m_BoardMultiplicity;
-    int m_ToTCut;
     int m_cablestarts[3]; // threshold cable starts
 
     int BarrelChipToBoard(int chip);
@@ -51,10 +50,10 @@ namespace LVL1 {
     int EndcapStrawNumber(int strawNumber,int strawLayerNumber,int LayerNumber,int phi_stack,int side);
     int BarrelStrawLayerNumber(int strawLayerNumber, int LayerNumber);
 
-    unsigned char mat_chip_barrel[64][1642];
-    unsigned char mat_chip_endcap[64][3840];
+    unsigned char m_mat_chip_barrel[64][1642];
+    unsigned char m_mat_chip_endcap[64][3840];
 
-    int numberOfStraws[75];
+    int m_numberOfStraws[75];
 
   };
 }
diff --git a/Trigger/TrigT1/TrigT1TRT/cmt/requirements b/Trigger/TrigT1/TrigT1TRT/cmt/requirements
deleted file mode 100644
index 34f4e46dca2eba378b4f73b3dbc8f3c27f53f586..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1TRT/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigT1TRT
-author Daniel Dobos <daniel.dobos@cern.ch>
-
-use AtlasPolicy         	AtlasPolicy-*
-use AthenaBaseComps     	AthenaBaseComps-*       	Control
-use GaudiInterface      	GaudiInterface-*        	External
-
-# TRT RDOs
-use InDetRawData		InDetRawData-*			InnerDetector/InDetRawEvent
-use InDetReadoutGeometry        InDetReadoutGeometry-*  	InnerDetector/InDetDetDescr
-
-private
-# TRT RDOs
-use TRT_ConditionsServices      TRT_ConditionsServices-*        InnerDetector/InDetConditions
-
-# Trigger configuration packages
-use TrigConfL1Data              TrigConfL1Data-*                Trigger/TrigConfiguration
-
-# LVL1 simulation
-use TrigConfInterfaces          TrigConfInterfaces-*            Trigger/TrigConfiguration
-use TrigT1Interfaces            TrigT1Interfaces-*              Trigger/TrigT1
-end_private
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="*.py"
-
diff --git a/Trigger/TrigT1/TrigT1TRT/src/TrigT1TRT.cxx b/Trigger/TrigT1/TrigT1TRT/src/TrigT1TRT.cxx
index 79fbf6c085cdccf27f3e17f8f584f73b48a8ff73..471174736aa4f4354b550c9e93e08b6c150da0af 100644
--- a/Trigger/TrigT1/TrigT1TRT/src/TrigT1TRT.cxx
+++ b/Trigger/TrigT1/TrigT1TRT/src/TrigT1TRT.cxx
@@ -30,49 +30,27 @@ namespace LVL1 {
   }
 
   StatusCode TrigT1TRT::initialize() {
-    if (msgLvl(MSG::INFO)) msg(MSG::INFO) << "Initialising" << endmsg;
+    ATH_MSG_INFO( "Initialising"  );
 
-    if (Algorithm::initialize().isFailure()) {
-      if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Couldn't initialize Algorithm base class." << endmsg;
-      return StatusCode::FAILURE;
-    }
 
-    StatusCode sc;
+    ATH_CHECK( Algorithm::initialize() );
 
-    // Connect to the LVL1ConfigSvc to retrieve threshold settings.
-    sc = m_configSvc.retrieve();
-    if (sc.isFailure()) {
-      if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Couldn't connect to " << m_configSvc.typeAndName() << endmsg;
-      return sc;
-    } else {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Connected to " << m_configSvc.typeAndName() << endmsg;
-    }
+    ATH_CHECK( m_configSvc.retrieve() );
+    ATH_MSG_DEBUG( "Connected to " << m_configSvc.typeAndName()  );
 
-    // retrieve TRT Detector Manager
-    sc = detStore()->retrieve(mgr, "TRT");
-    if (sc.isFailure()) {
-      if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Couldn't connect to TRT DetectorManager" << endmsg;
-      return sc;
-    } else {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Connected to TRT DetectorManager" << endmsg;
-    }
+    ATH_CHECK( detStore()->retrieve(m_mgr, "TRT") );
+    ATH_MSG_DEBUG( "Connected to TRT DetectorManager"  );
 
-    // retrieve TRT Helper
-    sc = detStore()->retrieve(m_pTRTHelper,"TRT_ID");
-    if (sc.isFailure()) {
-       if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Couldn't connect to TRT Helper" << endmsg;
-       return sc;
-    } else {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Connected to TRT Helper" << endmsg;
-    }
+    ATH_CHECK(  detStore()->retrieve(m_pTRTHelper,"TRT_ID") );
+    ATH_MSG_DEBUG( "Connected to TRT Helper"  );
 
     // retrieve TRT_StrawNeighbourService.
     if (m_TRTStrawNeighbourSvc.name() == "") {
-      if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "TRT_StrawNeighbourSvc not given." << endmsg;
-    } else { sc = m_TRTStrawNeighbourSvc.retrieve();
-      if(sc.isFailure()){
-        if (msgLvl(MSG::FATAL)) msg(MSG::FATAL) << "Could not get StrawNeighbourSvc!" << endmsg;
-      }
+      ATH_MSG_WARNING( "TRT_StrawNeighbourSvc not given."  );
+    }
+    else {
+      ATH_CHECK( m_TRTStrawNeighbourSvc.retrieve() );
+      ATH_MSG_FATAL( "Could not get StrawNeighbourSvc!"  );
     }
        
     // Get level 1 TRT threshold settings from the level 1
@@ -83,9 +61,9 @@ namespace LVL1 {
     std::vector<TrigConf::TriggerThreshold*>::iterator th_itr_end = thresholds.end();
     for(;th_itr!=th_itr_end;th_itr++) {
       if(*th_itr == 0) continue;
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "1-bit Threshold name=" << (*th_itr)->name() << endmsg;
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "1-bit Threshold value=" << (*th_itr)->triggerThresholdValue(0, 0)->ptcut() << endmsg;
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "1-bit Thershold cablestart=" << (*th_itr)->cableStart() << endmsg;
+      ATH_MSG_DEBUG( "1-bit Threshold name=" << (*th_itr)->name()  );
+      ATH_MSG_DEBUG( "1-bit Threshold value=" << (*th_itr)->triggerThresholdValue(0, 0)->ptcut()  );
+      ATH_MSG_DEBUG( "1-bit Thershold cablestart=" << (*th_itr)->cableStart()  );
       if        ((*th_itr)->name() == "TRTfast") {
         m_cablestarts[0]=(*th_itr)->cableStart();
       }
@@ -94,16 +72,16 @@ namespace LVL1 {
       
     if(thresholds.size()==0)
       {
-	msg(MSG::WARNING) << "No TRT thresholds found. Checking NIM thresholds for known TRT thresholds. THIS IS A HACK!"<<endmsg;
+	ATH_MSG_WARNING( "No TRT thresholds found. Checking NIM thresholds for known TRT thresholds. THIS IS A HACK!" );
 	thresholds = m_configSvc->thresholdConfig()->getThresholdVector(TrigConf::L1DataDef::NIM);
 	th_itr = thresholds.begin();
 	th_itr_end = thresholds.end();
 	for(;th_itr!=th_itr_end;th_itr++) {
       if(*th_itr == 0) continue;
 	  if        ((*th_itr)->name() == "NIMDIR25") {
-	    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "1-bit Threshold name=" << (*th_itr)->name() << endmsg;
-	    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "1-bit Threshold value=" << (*th_itr)->triggerThresholdValue(0, 0)->ptcut() << endmsg;
-	    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "1-bit Thershold cablestart=" << (*th_itr)->cableStart() << endmsg;
+	    ATH_MSG_DEBUG( "1-bit Threshold name=" << (*th_itr)->name()  );
+	    ATH_MSG_DEBUG( "1-bit Threshold value=" << (*th_itr)->triggerThresholdValue(0, 0)->ptcut()  );
+	    ATH_MSG_DEBUG( "1-bit Thershold cablestart=" << (*th_itr)->cableStart()  );
 	    m_cablestarts[0]=(*th_itr)->cableStart();
 	  }
 	}
@@ -112,31 +90,31 @@ namespace LVL1 {
 
     //Initialize numberOfStraws array for use in strawNumber function.
     for(int j=0; j<75; j++) {
-      numberOfStraws[j]=0;
+      m_numberOfStraws[j]=0;
     }
     
-    // numberofstraws in a phi module layer. numberOfStraws[<layer number>]
-    numberOfStraws[1]=15;
-    numberOfStraws[2]=numberOfStraws[3]=numberOfStraws[4]=numberOfStraws[5]=16;
-    numberOfStraws[6]=numberOfStraws[7]=numberOfStraws[8]=numberOfStraws[9]=numberOfStraws[10]=17;
-    numberOfStraws[11]=numberOfStraws[12]=numberOfStraws[13]=numberOfStraws[14]=numberOfStraws[15]=18;
-    numberOfStraws[16]=numberOfStraws[17]=numberOfStraws[18]=19;
-    numberOfStraws[19]=18;
-    numberOfStraws[20]=19;
-    numberOfStraws[21]=numberOfStraws[22]=numberOfStraws[23]=numberOfStraws[24]=numberOfStraws[25]=20;
-    numberOfStraws[26]=numberOfStraws[27]=numberOfStraws[28]=numberOfStraws[29]=numberOfStraws[30]=21;
-    numberOfStraws[31]=numberOfStraws[32]=numberOfStraws[33]=numberOfStraws[34]=numberOfStraws[35]=22;
-    numberOfStraws[36]=numberOfStraws[37]=numberOfStraws[38]=numberOfStraws[39]=numberOfStraws[40]=23;
-    numberOfStraws[41]=numberOfStraws[42]=24;
-    numberOfStraws[43]=23;
-    numberOfStraws[44]=23;
-    numberOfStraws[45]=numberOfStraws[46]=numberOfStraws[47]=numberOfStraws[48]=24;
-    numberOfStraws[49]=numberOfStraws[50]=numberOfStraws[51]=numberOfStraws[52]=numberOfStraws[53]=25;
-    numberOfStraws[54]=numberOfStraws[55]=numberOfStraws[56]=numberOfStraws[57]=numberOfStraws[58]=26;
-    numberOfStraws[59]=numberOfStraws[60]=numberOfStraws[61]=numberOfStraws[62]=numberOfStraws[63]=27;
-    numberOfStraws[64]=numberOfStraws[65]=numberOfStraws[66]=numberOfStraws[67]=numberOfStraws[68]=28;
-    numberOfStraws[69]=numberOfStraws[70]=numberOfStraws[71]=numberOfStraws[72]=29;
-    numberOfStraws[73]=28;
+    // numberofstraws in a phi module layer. m_numberOfStraws[<layer number>]
+    m_numberOfStraws[1]=15;
+    m_numberOfStraws[2]=m_numberOfStraws[3]=m_numberOfStraws[4]=m_numberOfStraws[5]=16;
+    m_numberOfStraws[6]=m_numberOfStraws[7]=m_numberOfStraws[8]=m_numberOfStraws[9]=m_numberOfStraws[10]=17;
+    m_numberOfStraws[11]=m_numberOfStraws[12]=m_numberOfStraws[13]=m_numberOfStraws[14]=m_numberOfStraws[15]=18;
+    m_numberOfStraws[16]=m_numberOfStraws[17]=m_numberOfStraws[18]=19;
+    m_numberOfStraws[19]=18;
+    m_numberOfStraws[20]=19;
+    m_numberOfStraws[21]=m_numberOfStraws[22]=m_numberOfStraws[23]=m_numberOfStraws[24]=m_numberOfStraws[25]=20;
+    m_numberOfStraws[26]=m_numberOfStraws[27]=m_numberOfStraws[28]=m_numberOfStraws[29]=m_numberOfStraws[30]=21;
+    m_numberOfStraws[31]=m_numberOfStraws[32]=m_numberOfStraws[33]=m_numberOfStraws[34]=m_numberOfStraws[35]=22;
+    m_numberOfStraws[36]=m_numberOfStraws[37]=m_numberOfStraws[38]=m_numberOfStraws[39]=m_numberOfStraws[40]=23;
+    m_numberOfStraws[41]=m_numberOfStraws[42]=24;
+    m_numberOfStraws[43]=23;
+    m_numberOfStraws[44]=23;
+    m_numberOfStraws[45]=m_numberOfStraws[46]=m_numberOfStraws[47]=m_numberOfStraws[48]=24;
+    m_numberOfStraws[49]=m_numberOfStraws[50]=m_numberOfStraws[51]=m_numberOfStraws[52]=m_numberOfStraws[53]=25;
+    m_numberOfStraws[54]=m_numberOfStraws[55]=m_numberOfStraws[56]=m_numberOfStraws[57]=m_numberOfStraws[58]=26;
+    m_numberOfStraws[59]=m_numberOfStraws[60]=m_numberOfStraws[61]=m_numberOfStraws[62]=m_numberOfStraws[63]=27;
+    m_numberOfStraws[64]=m_numberOfStraws[65]=m_numberOfStraws[66]=m_numberOfStraws[67]=m_numberOfStraws[68]=28;
+    m_numberOfStraws[69]=m_numberOfStraws[70]=m_numberOfStraws[71]=m_numberOfStraws[72]=29;
+    m_numberOfStraws[73]=28;
 
     //loop over straw hash index to create straw number mapping for TRTViewer
     unsigned int maxHash = m_pTRTHelper->straw_layer_hash_max();
@@ -156,7 +134,7 @@ namespace LVL1 {
 	// BARREL
         int idSide = idBarrelEndcap?1:-1;
 	if(m_pTRTHelper->barrel_ec(id)==-1) {
-          element = mgr->getBarrelElement(idSide, idLayerWheel, idPhiModule, idStrawLayer);
+          element = m_mgr->getBarrelElement(idSide, idLayerWheel, idPhiModule, idStrawLayer);
 	  if (element == NULL) {
 	    continue;
 	  }
@@ -179,8 +157,8 @@ namespace LVL1 {
             if (idLayerWheel == 1) i_chip+=21;
             if (idLayerWheel == 2) i_chip+=54;
 
-            mat_chip_barrel[idPhiModule][tempStrawNumber]=i_chip;
-            mat_chip_barrel[idPhiModule+32][tempStrawNumber]=i_chip;
+            m_mat_chip_barrel[idPhiModule][tempStrawNumber]=i_chip;
+            m_mat_chip_barrel[idPhiModule+32][tempStrawNumber]=i_chip;
           }
         }
       } else if (m_pTRTHelper->barrel_ec(id)!=1) {
@@ -192,7 +170,7 @@ namespace LVL1 {
 	  if (m_pTRTHelper->barrel_ec(id)==-2) idSide =0;
           else idSide=1;
 
-          element = mgr->getEndcapElement(idSide, idLayerWheel, idStrawLayer, idPhiModule);
+          element = m_mgr->getEndcapElement(idSide, idLayerWheel, idStrawLayer, idPhiModule);
 	  if (element == NULL) {
             continue;
 	  }
@@ -211,8 +189,8 @@ namespace LVL1 {
             m_TRTStrawNeighbourSvc->getChip(strawID,i_chip);
             ++i_chip -= 104;
 
-            mat_chip_endcap[idPhiModule][tempStrawNumber]=i_chip;
-            mat_chip_endcap[idPhiModule+32][tempStrawNumber]=i_chip;
+            m_mat_chip_endcap[idPhiModule][tempStrawNumber]=i_chip;
+            m_mat_chip_endcap[idPhiModule+32][tempStrawNumber]=i_chip;
           }
 	}
       }
@@ -221,36 +199,36 @@ namespace LVL1 {
   }
 
   StatusCode TrigT1TRT::execute() {
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "execute()" << endmsg;
+    ATH_MSG_DEBUG( "execute()"  );
     
     StatusCode sc;
     std::string containerName;
     
-    int m_barrel_trigger_board[2][32][9];
-    int m_endcap_trigger_board[2][32][20];
+    int barrel_trigger_board[2][32][9];
+    int endcap_trigger_board[2][32][20];
 
     // empty board score board 
     for (int i=0; i<2; i++) {
       for (int j=0; j<32; j++) {
         for (int k=0; k<9; k++) {
-	  m_barrel_trigger_board[i][j][k] = 0;
+	  barrel_trigger_board[i][j][k] = 0;
         }
         for (int k=0; k<20; k++) {
-	  m_endcap_trigger_board[i][j][k] = 0;	  
+	  endcap_trigger_board[i][j][k] = 0;	  
 	}
       }
     }
 
-    int m_barrel_trigger_ttc[2][8];
-    int m_endcap_trigger_ttc[2][16];
+    int barrel_trigger_ttc[2][8];
+    int endcap_trigger_ttc[2][16];
 
     // empty board score board 
     for (int i=0; i<2; i++) {
       for (int j=0; j<8; j++) {
-	m_barrel_trigger_ttc[i][j] = 0;
+	barrel_trigger_ttc[i][j] = 0;
       }
       for (int j=0; j<16; j++) {
-	m_endcap_trigger_ttc[i][j] = 0;
+	endcap_trigger_ttc[i][j] = 0;
       }
     }
       
@@ -259,13 +237,12 @@ namespace LVL1 {
     m_TRTRDO = 0;
     sc = evtStore()->retrieve( m_TRTRDO, containerName);
     if( sc.isFailure()  || !m_TRTRDO ) {
-      if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << containerName << " not found" << endmsg; 
-      if (msgLvl(MSG::WARNING)) msg(MSG::WARNING) << "This event will be skipped." << endmsg;
+      ATH_MSG_WARNING( containerName << " not found"  );
+      ATH_MSG_WARNING( "This event will be skipped."  );
       return StatusCode::SUCCESS;
     }
     else {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << containerName << " Container Successfully Retrieved" 
-    	    << endmsg;
+      ATH_MSG_DEBUG( containerName << " Container Successfully Retrieved" );
     }
     
     // Loop over all Lvl 1 TRT hits
@@ -285,46 +262,46 @@ namespace LVL1 {
         // Loop over TRT RDOs
         for(p_rdo=TRT_Collection->begin(); p_rdo!=TRT_Collection->end(); ++p_rdo) {
           TRT_Identifier = (*p_rdo)->identify();
-          int m_barrel_ec = m_pTRTHelper->barrel_ec(TRT_Identifier);
+          int barrel_ec = m_pTRTHelper->barrel_ec(TRT_Identifier);
 
           const TRT_LoLumRawData* p_lolum=dynamic_cast<const TRT_LoLumRawData*>(*p_rdo);
           if(!p_lolum) continue;
  
           //Get TRT Identifier (need to know phi module, module layer, straw layer, and straw # with in the layer, to get proper straw numbering.
           TRT_Identifier = (p_lolum)->identify();
-          int m_phi_module = m_pTRTHelper->phi_module(TRT_Identifier);
-          int m_layer_or_wheel = m_pTRTHelper->layer_or_wheel(TRT_Identifier);
-          int m_straw_layer = m_pTRTHelper->straw_layer(TRT_Identifier);
-          int m_straw = m_pTRTHelper->straw(TRT_Identifier);      
-          int m_strawNumber = 0;
-          int m_chip = 0;
-          int m_board = 0;
+          int phi_module = m_pTRTHelper->phi_module(TRT_Identifier);
+          int layer_or_wheel = m_pTRTHelper->layer_or_wheel(TRT_Identifier);
+          int straw_layer = m_pTRTHelper->straw_layer(TRT_Identifier);
+          int straw = m_pTRTHelper->straw(TRT_Identifier);      
+          int strawNumber = 0;
+          int chip = 0;
+          int board = 0;
           
-	  if (m_barrel_ec == 1 || m_barrel_ec == -1) {
+	  if (barrel_ec == 1 || barrel_ec == -1) {
 	  
-            int m_side = m_barrel_ec>0?1:0; 
-	    m_strawNumber = BarrelStrawNumber(m_straw, m_straw_layer, m_layer_or_wheel);
-            m_chip = mat_chip_barrel[m_phi_module][m_strawNumber];
-            m_board = BarrelChipToBoard(m_chip);
-            if (m_board < 0) { 
-              if (msgLvl(MSG::FATAL)) msg(MSG::FATAL) << "Failure in BarrelChipToBoard" << endmsg;
+            int side = barrel_ec>0?1:0; 
+	    strawNumber = BarrelStrawNumber(straw, straw_layer, layer_or_wheel);
+            chip = m_mat_chip_barrel[phi_module][strawNumber];
+            board = BarrelChipToBoard(chip);
+            if (board < 0) { 
+              ATH_MSG_FATAL( "Failure in BarrelChipToBoard"  );
               return StatusCode::FAILURE;
             }
 
 	    
 	    if ((p_lolum)->trailingEdge() - (p_lolum)->driftTimeBin() > 4 ) {
-              m_barrel_trigger_board[m_side][m_phi_module][m_board]++;
+              barrel_trigger_board[side][phi_module][board]++;
             }
 	    
-          } else if (m_barrel_ec == 2 || m_barrel_ec == -2) {
+          } else if (barrel_ec == 2 || barrel_ec == -2) {
 
-            int m_side = m_barrel_ec>0?1:0;
-            m_strawNumber = EndcapStrawNumber(m_straw, m_straw_layer, m_layer_or_wheel, m_phi_module, m_barrel_ec);
-            m_chip = mat_chip_endcap[m_phi_module][m_strawNumber];       
-            m_board = EndcapChipToBoard(m_chip);
+            int side = barrel_ec>0?1:0;
+            strawNumber = EndcapStrawNumber(straw, straw_layer, layer_or_wheel, phi_module, barrel_ec);
+            chip = m_mat_chip_endcap[phi_module][strawNumber];       
+            board = EndcapChipToBoard(chip);
 		    
 	    if ((p_lolum)->trailingEdge() - (p_lolum)->driftTimeBin() > 4 ) {
-              m_endcap_trigger_board[m_side][m_phi_module][m_board]++;
+              endcap_trigger_board[side][phi_module][board]++;
             }    
 	    
           }
@@ -336,13 +313,13 @@ namespace LVL1 {
     for (int i=0; i<2; i++) {
       for (int j=0; j<32; j++) {
         for (int k=0; k<9; k++) {
-	  if (m_barrel_trigger_board[i][j][k] >= m_BoardMultiplicity) {
-            m_barrel_trigger_ttc[i][j%4]++;
+	  if (barrel_trigger_board[i][j][k] >= m_BoardMultiplicity) {
+            barrel_trigger_ttc[i][j%4]++;
 	  }
         }
         for (int k=0; k<20; k++) {
-	  if (m_endcap_trigger_board[i][j][k] >= m_BoardMultiplicity) {
-            m_endcap_trigger_ttc[i][j%2]++;
+	  if (endcap_trigger_board[i][j][k] >= m_BoardMultiplicity) {
+            endcap_trigger_ttc[i][j%2]++;
 	  }	  
 	}
       }
@@ -353,35 +330,29 @@ namespace LVL1 {
     // analyse ttc score board - fill ttc score board
     for (int i=0; i<2; i++) {
       for (int j=0; j<8; j++) {
-        if (m_barrel_trigger_ttc[i][j] >= m_TTCMultiplicity) {
+        if (barrel_trigger_ttc[i][j] >= m_TTCMultiplicity) {
 	  cableWord0 = 1 << m_cablestarts[0];
 	}
       }
       for (int j=0; j<16; j++) {
-        if (m_endcap_trigger_ttc[i][j] >= m_TTCMultiplicity) {
+        if (endcap_trigger_ttc[i][j] >= m_TTCMultiplicity) {
 	  cableWord0 = 1 << m_cablestarts[0];
 	}
       }
     }
 
-    if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " cableWord: " << cableWord0 << endmsg;    
+    ATH_MSG_DEBUG( " cableWord: " << cableWord0  );
 
     // Record the CTP trigger word in StoreGate.
     TrtCTP *trtCTP = new TrtCTP(cableWord0);
     containerName = DEFAULT_TrtCTPLocation;
 
-    if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << "returning "<< trtCTP->dump() << endmsg;
-    if (msgLvl(MSG::VERBOSE)) msg(MSG::VERBOSE) << trtCTP->print() << endmsg;
+    ATH_MSG_VERBOSE( "returning "<< trtCTP->dump()  );
+    ATH_MSG_VERBOSE( trtCTP->print()  );
  
-    sc = evtStore()->record(trtCTP, containerName, false);
-    if(sc.isFailure()) {
-      if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Failed to register " << containerName << endmsg;
-      return StatusCode::FAILURE;
-    } 
-    else {
-      if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << containerName << " registered successfully " << endmsg;
-    }
-   
+    ATH_CHECK(  evtStore()->record(trtCTP, containerName, false) );
+    ATH_MSG_DEBUG( containerName << " registered successfully "  );
+
     return StatusCode::SUCCESS;
   }
 
@@ -500,8 +471,8 @@ namespace LVL1 {
 
     do {
       i++;
-      addToStrawNumber+=numberOfStraws[i-1];
-      addToStrawNumberNext = addToStrawNumber+numberOfStraws[i];
+      addToStrawNumber+=m_numberOfStraws[i-1];
+      addToStrawNumberNext = addToStrawNumber+m_numberOfStraws[i];
     }
     while(BarrelStrawLayerNumber(strawlayerNumber,LayerNumber)!=i-1);
     /*
diff --git a/Trigger/TrigT1/TrigT1ZDC/TrigT1ZDC/TrigT1ZDC.h b/Trigger/TrigT1/TrigT1ZDC/TrigT1ZDC/TrigT1ZDC.h
index 21e08b55c23fd620101dc02f1d07c5f8589b4250..0b3fed26fa349d10971302a81f142279027f005e 100644
--- a/Trigger/TrigT1/TrigT1ZDC/TrigT1ZDC/TrigT1ZDC.h
+++ b/Trigger/TrigT1/TrigT1ZDC/TrigT1ZDC/TrigT1ZDC.h
@@ -36,7 +36,6 @@ namespace LVL1 {
     
     /** flags **/
     bool m_zdcIncludeLHCf;
-    bool m_zdcMakeHisto;
     
     /** A data member to retain a connection to the level 1
 	configuration service */
@@ -67,7 +66,7 @@ namespace LVL1 {
     
     /** A flag to prevent the trigger simulation from running over bad
 	input data.  */
-    bool m_badDataFound;
+    //bool m_badDataFound;
     
     /** McEventCollection key.  Needed for truth based trigger
 	simulation. */
diff --git a/Trigger/TrigT1/TrigT1ZDC/cmt/requirements b/Trigger/TrigT1/TrigT1ZDC/cmt/requirements
deleted file mode 100644
index 1e2f595fcbca7713fd223b2e59d95b5a20a8264c..0000000000000000000000000000000000000000
--- a/Trigger/TrigT1/TrigT1ZDC/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigT1ZDC
-author W. H. Bell <W.Bell@cern.ch>
-
-use AtlasPolicy         AtlasPolicy-*
-use AthenaBaseComps     AthenaBaseComps-*       Control
-use GaudiInterface      GaudiInterface-*        External
-
-# Trigger configuration packages
-use TrigConfInterfaces  TrigConfInterfaces-*    Trigger/TrigConfiguration
-
-private
-
-# LVL1 simulation
-use TrigT1Interfaces    TrigT1Interfaces-*      Trigger/TrigT1
-
-# ZDC simulation packages would go here
-
-# Needed for truth based trigger simulation
-use GeneratorObjects	GeneratorObjects-*  	Generators
-use AtlasHepMC          AtlasHepMC-*            External
-
-# Trigger configuration packages
-use TrigConfL1Data      TrigConfL1Data-*        Trigger/TrigConfiguration
-
-library TrigT1ZDC *.cxx components/*.cxx
-apply_pattern component_library
diff --git a/Trigger/TrigT1/TrigT1ZDC/doc/packagedoc.h b/Trigger/TrigT1/TrigT1ZDC/doc/packagedoc.h
index e52b634c6aa60c2fd8e0ff4c8f9c821d4c91ac47..f40e1c811ca9e0e807eb79f19e59623f4da67c8f 100644
--- a/Trigger/TrigT1/TrigT1ZDC/doc/packagedoc.h
+++ b/Trigger/TrigT1/TrigT1ZDC/doc/packagedoc.h
@@ -15,4 +15,3 @@ input for the CTP simulation.  The ZdcCTP contains 3 bits.
 
 
 */
-
diff --git a/Trigger/TrigT1/TrigT1ZDC/src/TrigT1ZDC.cxx b/Trigger/TrigT1/TrigT1ZDC/src/TrigT1ZDC.cxx
index 1eb73cd49da27f7555da10cc7b994d1d9b14e9ae..d0556b271fff8ad8b3570ead846200fd8802144a 100644
--- a/Trigger/TrigT1/TrigT1ZDC/src/TrigT1ZDC.cxx
+++ b/Trigger/TrigT1/TrigT1ZDC/src/TrigT1ZDC.cxx
@@ -19,7 +19,6 @@ namespace LVL1 {
 
   TrigT1ZDC::TrigT1ZDC(const std::string& name,
 		       ISvcLocator* pSvcLocator): AthAlgorithm(name, pSvcLocator), 
-						  m_zdcMakeHisto(0),
 						  m_configSvc("TrigConf::LVL1ConfigSvc/LVL1ConfigSvc", name),
 						  m_zdcContainerName("ZDC"),
 						  m_threshold_c(-1),
@@ -29,8 +28,7 @@ namespace LVL1 {
 						  m_cablestart_ac(-1),	
 						  m_passedA(0),
 						  m_passedC(0),
-						  m_passedAC(0),
-						  m_badDataFound(false)
+						  m_passedAC(0)
   {
     declareProperty("LVL1ConfigSvc", m_configSvc, "LVL1 Config Service");
     declareProperty("ZdcContainerName", m_zdcContainerName = "ZDC");
diff --git a/Trigger/TrigTools/IDScanHitFilter/cmt/requirements b/Trigger/TrigTools/IDScanHitFilter/cmt/requirements
deleted file mode 100755
index a267195a8415660e042d9c795c74a0ced0c7b799..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/IDScanHitFilter/cmt/requirements
+++ /dev/null
@@ -1,28 +0,0 @@
-package IDScanHitFilter
-
-author Nikos Konstantinidis <n.konstantinidis@ucl.ac.uk>
-
-# =====================================================================
-
-public
-
-# General
-use AtlasPolicy			AtlasPolicy-*
-use AthenaBaseComps             AthenaBaseComps-*   Control
-use GaudiInterface		GaudiInterface-*     		External
-#use AtlasCLHEP			AtlasCLHEP-*			External
-
-use TrigInDetEvent		TrigInDetEvent*			Trigger/TrigEvent
-use TrigSteeringEvent           TrigSteeringEvent-*     	Trigger/TrigEvent
-use TrigInDetToolInterfaces	TrigInDetToolInterfaces-*	Trigger/TrigTools
-
-#use CxxUtils                    CxxUtils-*                      Control
-
-apply_pattern dual_use_library files="*.cxx components/*.cxx"
-#apply_pattern declare_joboptions files="*.py"
-
-private
-
-use IRegionSelector              IRegionSelector-*              DetectorDescription
-
-#macro_append cppflags  " -DIDSCAN_DEBUG "
diff --git a/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/IDScanZFinderInternal.h b/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/IDScanZFinderInternal.h
index 445f93f82e62587a3bb0a3b18f9146901422bded..75ec09de18a94019a3f9eefe80f11f180b9531e1 100755
--- a/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/IDScanZFinderInternal.h
+++ b/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/IDScanZFinderInternal.h
@@ -18,8 +18,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 
-#ifndef __IDSCANZFINDERINTERNAL_H__
-#define __IDSCANZFINDERINTERNAL_H__
+#ifndef IDSCANZFINDER_IDSCANZFINDERINTERNAL_H
+#define IDSCANZFINDER_IDSCANZFINDERINTERNAL_H
 
 #include <cmath>
 #include <vector>
@@ -74,8 +74,8 @@ protected:  // member functions
   		    std::vector<double>& phi, std::vector<double>& rho, std::vector<double>& zed, 
   		    std::vector<long>&   lyr, std::vector<long>&   filledLayers);
   
-  std::string getType() const { return mType; }
-  std::string getName() const { return mName; }
+  std::string getType() const { return m_Type; }
+  std::string getName() const { return m_Name; }
   std::string getVersion() const { return mZFIVER; }
   
   int GetInternalStatus() const { return m_Status; }
@@ -84,8 +84,8 @@ protected:  // member functions
   double computeZV(double r1, double z1, double r2, double z2) const;
   double computeZV(double r1, double p1, double z1, double r2, double p2, double z2) const;
   
-  void   SetReturnValue(double d) { mreturnval=d; }
-  double GetReturnValue() const   { return mreturnval; }
+  void   SetReturnValue(double d) { m_returnval=d; }
+  double GetReturnValue() const   { return m_returnval; }
   
   
 protected:  // data members
@@ -111,8 +111,8 @@ protected:  // data members
   
   bool   m_pixOnly;             // use only Pixel space points
   
-  std::string mType;  // type information for internal book keeping
-  std::string mName;  // name information for the same
+  std::string m_Type;  // type information for internal book keeping
+  std::string m_Name;  // name information for the same
   
   int    m_Status;   // return status of the algorithm: 0=ok, -1=error
     
@@ -121,8 +121,8 @@ protected:  // data members
   
   double m_dphideta; // how, as a function of eta, the number of phi neighbours decreases
   double m_neighborMultiplier; // extra factor to manually increase the number of phi neighbors
-  //  long extraPhi[IdScan_MaxNumLayers][IdScan_MaxNumLayers]; // number of phi neighbours to look at
-  std::vector< std::vector<long> > extraPhi; // ( IdScan_MaxNumLayers, std::vector<long>(IdScan_MaxNumLayers) ); // number of phi neighbours to look at
+  //  long m_extraPhi[IdScan_MaxNumLayers][IdScan_MaxNumLayers]; // number of phi neighbours to look at
+  std::vector< std::vector<long> > m_extraPhi; // ( IdScan_MaxNumLayers, std::vector<long>(IdScan_MaxNumLayers) ); // number of phi neighbours to look at
   
   // access the ZFinder histogram from outside the findZInternal method
   
@@ -140,7 +140,7 @@ protected:  // data members
   
   bool m_trustSPprovider; // Should we re-extract the RoI phi range from the phis of the SPs from the SPP
   
-  double mreturnval; // return value for algorithm
+  double m_returnval; // return value for algorithm
   
   bool   m_fullScanMode;
   
@@ -170,8 +170,8 @@ template<class SpacePoint>
 IDScanZFinderInternal<SpacePoint>::IDScanZFinderInternal( const std::string& type, 
   							  const std::string& name)  
 {
-  mType = type;
-  mName = name;
+  m_Type = type;
+  m_Name = name;
   
   m_phiBinSize       = 0.2   ;
   m_usedphiBinSize   = m_phiBinSize   ;
@@ -226,8 +226,8 @@ void IDScanZFinderInternal<SpacePoint>::initializeInternal(long maxLayers, long
   //	    << "\tm_IdScan_LastBrlLayer "  <<  m_IdScan_LastBrlLayer << std::endl;
   
   // number of phi neighbours to look at
-  //  if ( extraPhi.size()==0 ) 
-  extraPhi = std::vector< std::vector<long> >( m_IdScan_MaxNumLayers, std::vector<long>(m_IdScan_MaxNumLayers) ); 
+  //  if ( m_extraPhi.size()==0 ) 
+  m_extraPhi = std::vector< std::vector<long> >( m_IdScan_MaxNumLayers, std::vector<long>(m_IdScan_MaxNumLayers) ); 
   
   if ( m_fullScanMode ) m_usedROIphiWidth = 2*M_PI;
   else                  m_usedROIphiWidth = m_ROIphiWidth;
@@ -243,7 +243,7 @@ void IDScanZFinderInternal<SpacePoint>::initializeInternal(long maxLayers, long
   
   for (long l1=0; l1<m_IdScan_MaxNumLayers-1; ++l1) {
     for (long l2=l1+1; l2<m_IdScan_MaxNumLayers; ++l2) {
-      extraPhi[l1][l2]=1; // look at a single phi neighbour
+      m_extraPhi[l1][l2]=1; // look at a single phi neighbour
     }
   }
   
@@ -261,14 +261,14 @@ void IDScanZFinderInternal<SpacePoint>::initializeInternal(long maxLayers, long
     for (long l2=l1+1; l2<=m_IdScan_LastBrlLayer; ++l2) {
       double dphi = ZF_dphiBrl[lyrcnt + 7*first_layer];
       dphi *= m_neighborMultiplier;
-      extraPhi[l1][l2]=static_cast<long>( ceil(  sqrt(dphi*dphi+ZF_phiRes*ZF_phiRes*2) * m_invPhiSliceSize ) );
+      m_extraPhi[l1][l2]=static_cast<long>( ceil(  sqrt(dphi*dphi+ZF_phiRes*ZF_phiRes*2) * m_invPhiSliceSize ) );
   					      
       //      std::cout << "test 1 " << l1 << " " << l2 << "\tmax : " <<  m_IdScan_MaxNumLayers << std::endl;
   						   
-      if (extraPhi[l1][l2]<1) extraPhi[l1][l2]=1;
+      if (m_extraPhi[l1][l2]<1) m_extraPhi[l1][l2]=1;
       //      std::cout << "Delta Phi between layers " << l1 << " and " << l2
       //		<< " = "<< ZF_dphiBrl[lyrcnt] 
-      //		<< " rads ( " << extraPhi[l1][l2] << " bins including phi resln.)\n";
+      //		<< " rads ( " << m_extraPhi[l1][l2] << " bins including phi resln.)\n";
       lyrcnt++;
     }
   }
@@ -291,13 +291,13 @@ void IDScanZFinderInternal<SpacePoint>::initializeInternal(long maxLayers, long
     //	      << ". Extrapolate it to eta=0.9 to get ";
     dphi = dphi + m_dphideta * ( 0.9 - eta );
     dphi *= m_neighborMultiplier;
-    extraPhi[l1][l2]=static_cast<long>(ceil(sqrt(dphi*dphi+ZF_phiRes*ZF_phiRes*2)*m_invPhiSliceSize));
+    m_extraPhi[l1][l2]=static_cast<long>(ceil(sqrt(dphi*dphi+ZF_phiRes*ZF_phiRes*2)*m_invPhiSliceSize));
   						 
-    if (extraPhi[l1][l2]<1) extraPhi[l1][l2]=1;
+    if (m_extraPhi[l1][l2]<1) m_extraPhi[l1][l2]=1;
   
     //    std::cout << "test 2 " << l1 << " " << l2 << "\tmax : " <<  m_IdScan_MaxNumLayers << std::endl;
   
-    // std::cout << dphi << " rads ( " << extraPhi[l1][l2] << " bins including phi resln.)\n";
+    // std::cout << dphi << " rads ( " << m_extraPhi[l1][l2] << " bins including phi resln.)\n";
   }
   
 }
@@ -445,10 +445,10 @@ template<class SpacePoint> long IDScanZFinderInternal<SpacePoint>::fillVectors (
       /// DOES NOT span the phi=pi boundary
       for(long i=0; i<nSPs; ++i, ++SpItr) 
   	{
-  	  double _phi = (*SpItr)->phi() - roiPhiMin;
+  	  double phi2 = (*SpItr)->phi() - roiPhiMin;
   
-  	  if ( _phi>=0 && _phi<dphi ) { 
-  	    phi[i] = _phi;
+  	  if ( phi2>=0 && phi2<dphi ) { 
+  	    phi[i] = phi2;
   	    rho[i] = (*SpItr)->r();
   	    zed[i] = (*SpItr)->z();
   	    lyr[i] = (*SpItr)->layer();
@@ -462,11 +462,11 @@ template<class SpacePoint> long IDScanZFinderInternal<SpacePoint>::fillVectors (
       /// DOES span the phi=pi boundary
       for(long i=0; i<nSPs; ++i, ++SpItr) 
   	{
-  	  double _phi = (*SpItr)->phi() - roiPhiMin;
-  	  if( _phi<0.0) _phi+=2*M_PI;
+  	  double phi2 = (*SpItr)->phi() - roiPhiMin;
+  	  if( phi2<0.0) phi2+=2*M_PI;
   
-  	  if ( _phi>=0 && _phi<dphi ) { 
-  	    phi[i] = _phi;
+  	  if ( phi2>=0 && phi2<dphi ) { 
+  	    phi[i] = phi2;
   	    rho[i] = (*SpItr)->r();
   	    zed[i] = (*SpItr)->z();
   	    lyr[i] = (*SpItr)->layer();
@@ -627,7 +627,7 @@ std::vector<typename IDScanZFinderInternal<SpacePoint>::vertex>* IDScanZFinderIn
 	{
 	  allSlices[ sliceIndex ]->GetHistogram( &( nHisto[0][sliceIndex] ), &( zHisto[0][sliceIndex] ),
 						 &( nHisto[1][sliceIndex] ), &( zHisto[1][sliceIndex] ),
-						 extraPhi, extraPhiNeg, m_nFirstLayers, m_tripletMode, m_chargeAware, nHisto, zHisto );
+						 m_extraPhi, extraPhiNeg, m_nFirstLayers, m_tripletMode, m_chargeAware, nHisto, zHisto );
 	  //Note the extra arguments here - pointers to the whole histogram collection
 	  //This allows the filling of neighbouring slice histograms as required, but breaks thread safety
   
@@ -650,7 +650,7 @@ std::vector<typename IDScanZFinderInternal<SpacePoint>::vertex>* IDScanZFinderIn
 	{
 	  allSlices[ sliceIndex ]->GetHistogram( &( nHisto[0][0] ), &( zHisto[0][0] ),
 						 &( nHisto[1][0] ), &( zHisto[1][0] ),
-						 extraPhi, extraPhiNeg, m_nFirstLayers, m_tripletMode, m_chargeAware );
+						 m_extraPhi, extraPhiNeg, m_nFirstLayers, m_tripletMode, m_chargeAware );
 	  delete allSlices[ sliceIndex ];
 	}
     }
diff --git a/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/PhiSlice.h b/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/PhiSlice.h
index e2929ff946a24f59a0308d2274dcd7ecc3b54379..84e7056c92dbe25e3ee18e58d89effc0d1dfda23 100644
--- a/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/PhiSlice.h
+++ b/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/PhiSlice.h
@@ -90,7 +90,7 @@ private:
   int    m_zeroOffset;
   int    m_sliceIndex;
   int    m_filledLayerTotal;
-  int    m_layerMaximum;
+  //int    m_layerMaximum;
   int    m_barrelMaximum;
   bool   m_internalHistogramsAreValid;
 };
diff --git a/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/TrigZFinderInternal.h b/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/TrigZFinderInternal.h
index 98d091d7131c3d2d6462f19df4e52a0575cf4d5a..12701b0e809247026f3c78cc5e57b5798c699976 100755
--- a/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/TrigZFinderInternal.h
+++ b/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/TrigZFinderInternal.h
@@ -69,8 +69,8 @@ class TrigZFinderInternal
         std::vector<double>& phi, std::vector<double>& rho, std::vector<double>& zed, 
         std::vector<long>&   lyr, std::vector<long>&   filledLayers);
 
-    std::string getType() const { return mType; }
-    std::string getName() const { return mName; }
+    std::string getType() const { return m_type; }
+    std::string getName() const { return m_name; }
 
     int GetInternalStatus() const { return m_Status; }
     int SetInternalStatus(int s)  { m_Status = s; return m_Status; }
@@ -78,8 +78,8 @@ class TrigZFinderInternal
     double computeZV(double r1, double z1, double r2, double z2) const;
     double computeZV(double r1, double p1, double z1, double r2, double p2, double z2) const;
 
-    void   SetReturnValue(double d) { mreturnval=d; }
-    double GetReturnValue() const   { return mreturnval; }
+    void   SetReturnValue(double d) { m_returnval=d; }
+    double GetReturnValue() const   { return m_returnval; }
 
 
   protected:  // data members
@@ -105,8 +105,8 @@ class TrigZFinderInternal
 
     bool   m_pixOnly;             // use only Pixel space points
 
-    std::string mType;  // type information for internal book keeping
-    std::string mName;  // name information for the same
+    std::string m_type;  // type information for internal book keeping
+    std::string m_name;  // name information for the same
 
     int    m_Status;   // return status of the algorithm: 0=ok, -1=error
 
@@ -116,7 +116,7 @@ class TrigZFinderInternal
     double m_dphideta; // how, as a function of eta, the number of phi neighbours decreases
     double m_neighborMultiplier; // extra factor to manually increase the number of phi neighbors
     //  long extraPhi[IdScan_MaxNumLayers][IdScan_MaxNumLayers]; // number of phi neighbours to look at
-    std::vector< std::vector<long> > extraPhi; // ( IdScan_MaxNumLayers, std::vector<long>(IdScan_MaxNumLayers) ); // number of phi neighbours to look at
+    std::vector< std::vector<long> > m_extraPhi; // ( IdScan_MaxNumLayers, std::vector<long>(IdScan_MaxNumLayers) ); // number of phi neighbours to look at
 
     // access the ZFinder histogram from outside the findZInternal method
 
@@ -134,7 +134,7 @@ class TrigZFinderInternal
 
     bool m_trustSPprovider; // Should we re-extract the RoI phi range from the phis of the SPs from the SPP
 
-    double mreturnval; // return value for algorithm
+    double m_returnval; // return value for algorithm
 
     bool   m_fullScanMode;
 
diff --git a/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/ZFinderConstants.h b/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/ZFinderConstants.h
index 1261efc07f61c8090702cc3a9b9fa5fd05459bf7..3db71a5701b919b2baf7b042e30dcaef5fdd14e9 100755
--- a/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/ZFinderConstants.h
+++ b/Trigger/TrigTools/IDScanZFinder/IDScanZFinder/ZFinderConstants.h
@@ -27,8 +27,6 @@
 #include "CLHEP/Units/PhysicalConstants.h"
 
 
-using namespace CLHEP;
-
 // z histogram range is [ -ZFinder_MaxZ, +ZFinder_MaxZ ]
 //const double ZFinder_MaxZ             = 800.0*millimeter; // this is now a property - jamie boyd 26 jan 2007...
 
diff --git a/Trigger/TrigTools/IDScanZFinder/cmt/requirements b/Trigger/TrigTools/IDScanZFinder/cmt/requirements
deleted file mode 100755
index 8ba385b8ff62fd61c8a8e974baa2f41b63772a16..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/IDScanZFinder/cmt/requirements
+++ /dev/null
@@ -1,29 +0,0 @@
-
-package IDScanZFinder
-
-author Nikos Konstantinidis <n.konstantinidis@ucl.ac.uk>
-
-# =====================================================================
-
-public
-
-# General
-# use AtlasPolicy		AtlasPolicy-01-*
-# use GaudiInterface		GaudiInterface-01-*     	External
-# use AtlasCLHEP		AtlasCLHEP-00-*			External
-
-use AtlasPolicy			AtlasPolicy-*
-use GaudiInterface		GaudiInterface-*     	        External
-use AtlasCLHEP			AtlasCLHEP-*			External
-
-use AthenaBaseComps             AthenaBaseComps-*               Control
- 
-use TrigInDetEvent		TrigInDetEvent*			Trigger/TrigEvent
-use TrigInDetToolInterfaces	TrigInDetToolInterfaces-*	Trigger/TrigTools
-use	IRegionSelector			IRegionSelector-*		DetectorDescription
-
-#library IDScanZFinder "*.cxx components/*.cxx"
-     
-apply_pattern dual_use_library files="*.cxx components/*.cxx"
-#apply_pattern declare_joboptions files="*.py"
-
diff --git a/Trigger/TrigTools/IDScanZFinder/src/IDScanZFinder.cxx b/Trigger/TrigTools/IDScanZFinder/src/IDScanZFinder.cxx
index 065f0fcc79fca04838791b169772e12688b9cf57..de8e29322b573fa53633d9a2e8e669d3049424e8 100755
--- a/Trigger/TrigTools/IDScanZFinder/src/IDScanZFinder.cxx
+++ b/Trigger/TrigTools/IDScanZFinder/src/IDScanZFinder.cxx
@@ -22,6 +22,9 @@
 #include "IRegionSelector/IRoiDescriptor.h"
 
 
+using CLHEP::millimeter;
+
+
 ////////////////////////////////////////////////////////////////////////////////
 ////    IDScanZFinder
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/Trigger/TrigTools/IDScanZFinder/src/TrigZFinderInternal.cxx b/Trigger/TrigTools/IDScanZFinder/src/TrigZFinderInternal.cxx
index 28c6e96afc8b6331c7c6de1c78903d274093dca5..365aaeda74e8c325aebc28263c24820e81e52d35 100644
--- a/Trigger/TrigTools/IDScanZFinder/src/TrigZFinderInternal.cxx
+++ b/Trigger/TrigTools/IDScanZFinder/src/TrigZFinderInternal.cxx
@@ -13,8 +13,8 @@
 TrigZFinderInternal::TrigZFinderInternal( const std::string& type, 
     const std::string& name)  
 {
-  mType = type;
-  mName = name;
+  m_type = type;
+  m_name = name;
 
   m_phiBinSize       = 0.2   ;
   m_usedphiBinSize   = m_phiBinSize   ;
@@ -91,7 +91,7 @@ void TrigZFinderInternal::initializeInternal(long maxLayers, long lastBarrel )
   // number of phi neighbours to look at
   //  if ( extraPhi.size()==0 ) 
 
-  extraPhi = std::vector< std::vector<long> >( m_IdScan_MaxNumLayers, std::vector<long>(m_IdScan_MaxNumLayers) ); 
+  m_extraPhi = std::vector< std::vector<long> >( m_IdScan_MaxNumLayers, std::vector<long>(m_IdScan_MaxNumLayers) ); 
 
   if ( m_fullScanMode ) m_usedROIphiWidth = 2*M_PI;
   else                  m_usedROIphiWidth = m_ROIphiWidth;
@@ -107,7 +107,7 @@ void TrigZFinderInternal::initializeInternal(long maxLayers, long lastBarrel )
 
   for (long l1=0; l1<m_IdScan_MaxNumLayers-1; ++l1) {
     for (long l2=l1+1; l2<m_IdScan_MaxNumLayers; ++l2) {
-      extraPhi[l1][l2]=1; // look at a single phi neighbour
+      m_extraPhi[l1][l2]=1; // look at a single phi neighbour
     }
   }
 
@@ -125,14 +125,14 @@ void TrigZFinderInternal::initializeInternal(long maxLayers, long lastBarrel )
     for (long l2=l1+1; l2<=m_IdScan_LastBrlLayer; ++l2) {
       double dphi = ZF_dphiBrl[lyrcnt + 7*first_layer];
       dphi *= m_neighborMultiplier;
-      extraPhi[l1][l2]=static_cast<long>( ceil(  sqrt(dphi*dphi+ZF_phiRes*ZF_phiRes*2) * m_invPhiSliceSize ) );
+      m_extraPhi[l1][l2]=static_cast<long>( ceil(  sqrt(dphi*dphi+ZF_phiRes*ZF_phiRes*2) * m_invPhiSliceSize ) );
 
       //      std::cout << "test 1 " << l1 << " " << l2 << "\tmax : " <<  m_IdScan_MaxNumLayers << std::endl;
 
-      if (extraPhi[l1][l2]<1) extraPhi[l1][l2]=1;
+      if (m_extraPhi[l1][l2]<1) m_extraPhi[l1][l2]=1;
       //      std::cout << "Delta Phi between layers " << l1 << " and " << l2
       //		<< " = "<< ZF_dphiBrl[lyrcnt] 
-      //		<< " rads ( " << extraPhi[l1][l2] << " bins including phi resln.)\n";
+      //		<< " rads ( " << m_extraPhi[l1][l2] << " bins including phi resln.)\n";
       lyrcnt++;
     }
   }
@@ -155,13 +155,13 @@ void TrigZFinderInternal::initializeInternal(long maxLayers, long lastBarrel )
     //	      << ". Extrapolate it to eta=0.9 to get ";
     dphi = dphi + m_dphideta * ( 0.9 - eta );
     dphi *= m_neighborMultiplier;
-    extraPhi[l1][l2]=static_cast<long>(ceil(sqrt(dphi*dphi+ZF_phiRes*ZF_phiRes*2)*m_invPhiSliceSize));
+    m_extraPhi[l1][l2]=static_cast<long>(ceil(sqrt(dphi*dphi+ZF_phiRes*ZF_phiRes*2)*m_invPhiSliceSize));
 
-    if (extraPhi[l1][l2]<1) extraPhi[l1][l2]=1;
+    if (m_extraPhi[l1][l2]<1) m_extraPhi[l1][l2]=1;
 
     //    std::cout << "test 2 " << l1 << " " << l2 << "\tmax : " <<  m_IdScan_MaxNumLayers << std::endl;
 
-    // std::cout << dphi << " rads ( " << extraPhi[l1][l2] << " bins including phi resln.)\n";
+    // std::cout << dphi << " rads ( " << m_extraPhi[l1][l2] << " bins including phi resln.)\n";
   }
 
 }
@@ -309,10 +309,10 @@ long TrigZFinderInternal::fillVectors (const std::vector<TrigSiSpacePointBase>&
     /// DOES NOT span the phi=pi boundary
     for(long i=0; i<nSPs; ++i, ++SpItr) 
     {
-      double _phi = SpItr->phi() - roiPhiMin;
+      double phi2 = SpItr->phi() - roiPhiMin;
 
-      if ( _phi>=0 && _phi<dphi ) { 
-        phi[i] = _phi;
+      if ( phi2>=0 && phi2<dphi ) { 
+        phi[i] = phi2;
         rho[i] = SpItr->r();
         zed[i] = SpItr->z();
         lyr[i] = m_new2old[SpItr->layer()];
@@ -326,11 +326,11 @@ long TrigZFinderInternal::fillVectors (const std::vector<TrigSiSpacePointBase>&
     /// DOES span the phi=pi boundary
     for(long i=0; i<nSPs; ++i, ++SpItr) 
     {
-      double _phi = SpItr->phi() - roiPhiMin;
-      if( _phi<0.0) _phi+=2*M_PI;
+      double phi2 = SpItr->phi() - roiPhiMin;
+      if( phi2<0.0) phi2+=2*M_PI;
 
-      if ( _phi>=0 && _phi<dphi ) { 
-        phi[i] = _phi;
+      if ( phi2>=0 && phi2<dphi ) { 
+        phi[i] = phi2;
         rho[i] = SpItr->r();
         zed[i] = SpItr->z();
         lyr[i] = m_new2old[SpItr->layer()];
@@ -489,7 +489,7 @@ std::vector<typename TrigZFinderInternal::vertex>* TrigZFinderInternal::findZInt
     {
       allSlices[ sliceIndex ]->GetHistogram( &( nHisto[0][sliceIndex] ), &( zHisto[0][sliceIndex] ),
           &( nHisto[1][sliceIndex] ), &( zHisto[1][sliceIndex] ),
-          extraPhi, extraPhiNeg, m_nFirstLayers, m_tripletMode, m_chargeAware, nHisto, zHisto );
+          m_extraPhi, extraPhiNeg, m_nFirstLayers, m_tripletMode, m_chargeAware, nHisto, zHisto );
       //Note the extra arguments here - pointers to the whole histogram collection
       //This allows the filling of neighbouring slice histograms as required, but breaks thread safety
 
@@ -512,7 +512,7 @@ std::vector<typename TrigZFinderInternal::vertex>* TrigZFinderInternal::findZInt
     {
       allSlices[ sliceIndex ]->GetHistogram( &( nHisto[0][0] ), &( zHisto[0][0] ),
           &( nHisto[1][0] ), &( zHisto[1][0] ),
-          extraPhi, extraPhiNeg, m_nFirstLayers, m_tripletMode, m_chargeAware );
+          m_extraPhi, extraPhiNeg, m_nFirstLayers, m_tripletMode, m_chargeAware );
       delete allSlices[ sliceIndex ];
     }
   }
diff --git a/Trigger/TrigTools/TrigByteStreamTools/CMakeLists.txt b/Trigger/TrigTools/TrigByteStreamTools/CMakeLists.txt
index b2642bbffc0d9823cab104a81cc58df814851ac2..ee10edfac2d6b9a08621e93830334fbd5e01f68a 100644
--- a/Trigger/TrigTools/TrigByteStreamTools/CMakeLists.txt
+++ b/Trigger/TrigTools/TrigByteStreamTools/CMakeLists.txt
@@ -7,7 +7,7 @@ atlas_subdir( TrigByteStreamTools )
 
 # External dependencies:
 find_package( Boost COMPONENTS filesystem thread system )
-find_package( ROOT COMPONENTS Reflex Core Tree MathCore Hist RIO pthread )
+find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 find_package( tdaq-common COMPONENTS CTPfragment )
 
 # Component(s) in the package:
diff --git a/Trigger/TrigTools/TrigByteStreamTools/cmt/requirements b/Trigger/TrigTools/TrigByteStreamTools/cmt/requirements
deleted file mode 100644
index f6afa9bc488bc36dd94657106156978a3a856114..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigByteStreamTools/cmt/requirements
+++ /dev/null
@@ -1,31 +0,0 @@
-package TrigByteStreamTools
-
-author Brian Petersen <Brian.Petersen@cern.ch>
-author Anna Sfyrla <Anna.Sfyrla@cern.ch>
-
-use AtlasPolicy AtlasPolicy-*
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern declare_scripts files="../bin/*.py \
-                                     ../python/addL1.py \
-                                     ../python/replaceMUCTPI.py \
-                                     ../python/trigbs_replaceLB.py \
-                                     ../python/trigbs_prescaleL1.py \
-                                     ../python/slimHLTBSFile.py"
-
-#
-# Some additional dictionaries
-#
-private
-
-use  AtlasReflex     AtlasReflex-*       External -no_auto_import
-use  AtlasBoost      AtlasBoost-*        External      # needed to get correct pp_cppflags
-use  CTPfragment     *
-
-# Specify required ROOT components for cmake (transparent to CMT)
-apply_pattern cmake_add_command command="find_package(ROOT COMPONENTS Reflex)"
-
-apply_pattern lcgdict dict=TrigByteStreamTools selectionfile=selection.xml \
-	              headerfiles="../TrigByteStreamTools/TrigByteStreamToolsDict.h"
-		      
-macro_append TrigByteStreamTools_linkopts " $(tdaqc_linkopts) -lCTPfragment "
diff --git a/Trigger/TrigTools/TrigFTKToolInterfaces/cmt/requirements b/Trigger/TrigTools/TrigFTKToolInterfaces/cmt/requirements
deleted file mode 100644
index 6d06200268c72eafa23e193fb3c75fd590ed4501..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigFTKToolInterfaces/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package TrigFTKToolInterfaces
-
-manager Dmitry Emeliyanov <Dmitry.Emeliyanov at cern.ch>
-
-public
-	
-use AtlasPolicy           AtlasPolicy-*
-use GaudiInterface        GaudiInterface-*           External
-#use AtlasCLHEP            AtlasCLHEP-*               External
-#use DataModel             DataModel-*                Control
-use AthenaBaseComps              AthenaBaseComps-*        Control
-
-use TrkTrack              TrkTrack-*                 Tracking/TrkEvent
-use TrigInDetEvent        TrigInDetEvent-*           Trigger/TrigEvent
-
-use TrkTruthData                TrkTruthData-*               Tracking/TrkEvent
-
-use InDetPrepRawData      InDetPrepRawData-*         InnerDetector/InDetRecEvent
\ No newline at end of file
diff --git a/Trigger/TrigTools/TrigFTKTrackConverter/cmt/requirements b/Trigger/TrigTools/TrigFTKTrackConverter/cmt/requirements
deleted file mode 100755
index 42bed4d094dc650219d5507f449c9180edd5a1ab..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigFTKTrackConverter/cmt/requirements
+++ /dev/null
@@ -1,50 +0,0 @@
-package TrigFTKTrackConverter
-
-author Dmitry Emeliyanov <D.Emeliyanov@rl.ac.uk>
-
-public
-
-# General
-use GaudiInterface		GaudiInterface-*             External
-use AtlasPolicy			AtlasPolicy-*
-use TrigFTKToolInterfaces       TrigFTKToolInterfaces-*      Trigger/TrigTools
-use TrigFTKSim                  TrigFTKSim-*                 Trigger/TrigFTK
-use TrkFitterUtils              TrkFitterUtils-*             Tracking/TrkFitter 
-use TrkFitterInterfaces         TrkFitterInterfaces-*        Tracking/TrkFitter 
-use PixelConditionsServices     PixelConditionsServices-*    InnerDetector/InDetConditions
-use AthenaBaseComps              AthenaBaseComps-*	   Control
-
-
-library TrigFTKTrackConverter "*.cxx components/*.cxx"
-    
-apply_pattern component_library
-apply_pattern declare_python_modules files="*.py"
-#apply_pattern declare_non_standard_include name=doc
-
-private
-
-use StoreGate			StoreGate-*		     Control
-use InDetIdentifier             InDetIdentifier-*            InnerDetector/InDetDetDescr
-use InDetReadoutGeometry	InDetReadoutGeometry-*	     InnerDetector/InDetDetDescr
-use GeoPrimitives				GeoPrimitives-*							 DetectorDescription
-use TrkEventPrimitives          TrkEventPrimitives-*         Tracking/TrkEvent
-#use TrkMeasurementBase          TrkMeasurementBase-*         Tracking/TrkEvent
-use TrkRIO_OnTrack              TrkRIO_OnTrack-*             Tracking/TrkEvent 
-use TrkParameters	        TrkParameters-* 	     Tracking/TrkEvent
-use InDetRIO_OnTrack            InDetRIO_OnTrack-*           InnerDetector/InDetRecEvent
-use GeneratorObjects            GeneratorObjects-*           Generators 
-use AtlasHepMC                  AtlasHepMC-*                 External 
-use TrkTruthData                TrkTruthData-*               Tracking/TrkEvent
-
-use AtlasDetDescr               AtlasDetDescr-*         DetectorDescription
-
-
-
-#use InDetPrepRawData 		InDetPrepRawData-* 	InnerDetector/InDetRecEvent
-#use TrigTimeAlgs		TrigTimeAlgs-*		Trigger/TrigTools
-
-#use TrkSurfaces 		TrkSurfaces-* 	        Tracking/TrkDetDescr
-#use TrkPrepRawData              TrkPrepRawData-*        Tracking/TrkEvent
-#use TrkTrack                    TrkTrack-*              Tracking/TrkEvent
-
-
diff --git a/Trigger/TrigTools/TrigIDUtils/cmt/requirements b/Trigger/TrigTools/TrigIDUtils/cmt/requirements
deleted file mode 100644
index 53b3562e2beff6d0613242da40d49196c442b1d5..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigIDUtils/cmt/requirements
+++ /dev/null
@@ -1,32 +0,0 @@
-## automatically generated CMT requirements file
-package TrigIDUtils
-author  masik
-
-## for athena policies: this has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## for gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-
-## put here your package dependencies...
-
-##
-
-branches src src/components doc python share
-
-private
-use StoreGate                     StoreGate-*                     Control
-use AthenaBaseComps               AthenaBaseComps-*               Control
-use PixelConditionsServices PixelConditionsServices-* InnerDetector/InDetConditions
-use InDetIdentifier               InDetIdentifier-*               InnerDetector/InDetDetDescr
-
-## default is to make component library
-library TrigIDUtils *.cxx components/*.cxx
-
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-end_private
-
-
diff --git a/Trigger/TrigTools/TrigInDetConf/cmt/requirements b/Trigger/TrigTools/TrigInDetConf/cmt/requirements
deleted file mode 100644
index ffd0190a53aee5045bd93cc790c77d3fc2bc04ea..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetConf/cmt/requirements
+++ /dev/null
@@ -1,8 +0,0 @@
-package TrigInDetConf
-
-author Jiri Masik <Jiri.Masik@manchester.ac.uk>
-
-use AtlasPolicy    AtlasPolicy-*
-
-apply_pattern declare_python_modules files="*.py"
-
diff --git a/Trigger/TrigTools/TrigInDetConf/python/HypoAlgCfgble.py b/Trigger/TrigTools/TrigInDetConf/python/HypoAlgCfgble.py
index 6f93d113d5001f384df9480f4623381c1bd3ecbd..e19afc337da319c3a6f890866db562741257e6ab 100644
--- a/Trigger/TrigTools/TrigInDetConf/python/HypoAlgCfgble.py
+++ b/Trigger/TrigTools/TrigInDetConf/python/HypoAlgCfgble.py
@@ -1,16 +1,4 @@
 # Copyright (C) 1995-2017 CERN for the benefit of the ATLAS collaboration
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
 
 from TrigFTKHypo.TrigFTKHypoConf import TrigFTKAvailableHypo
 
diff --git a/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py b/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py
index 8e4f87b5bf2781c78a195574aa3af87743eb8952..1eda43bf16e889005fdef6543b657f57604c6fb4 100644
--- a/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py
+++ b/Trigger/TrigTools/TrigInDetConf/python/TrigInDetRecToolsFTK.py
@@ -37,18 +37,19 @@ if (InDetTrigFlags.doPrintConfigurables()):
 
 from TrkGlobalChi2Fitter.TrkGlobalChi2FitterConf import Trk__GlobalChi2Fitter
 from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator, InDetTrigNavigator, InDetTrigPropagator, \
-     InDetTrigRefitRotCreator,InDetTrigUpdator, InDetTrigMaterialUpdator
+     InDetTrigRefitRotCreator, InDetTrigUpdator, InDetTrigMaterialUpdator
 from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc
 
-from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup
-
 from FTK_RecTools.FTK_RecToolsConf import FTK_PixelClusterOnTrackTool, FTK_SCTClusterOnTrackTool
 
-
+from InDetTrigRecExample.InDetTrigConditionsAccess import PixelConditionsSetup
+ 
 InDetTrigBroadPixelClusterOnTrackToolFTK = \
                                          FTK_PixelClusterOnTrackTool("InDetTrigBroadPixelClusterOnTrackToolFTK",
                                                                      PixelOfflineCalibSvc=PixelConditionsSetup.instanceName('PixelOfflineCalibSvc'),
                                                                      ErrorStrategy = 0) # use broad errors
+ 
+  
 ToolSvc += InDetTrigBroadPixelClusterOnTrackToolFTK
 if (InDetTrigFlags.doPrintConfigurables()):
   print InDetTrigBroadPixelClusterOnTrackToolFTK
@@ -97,4 +98,66 @@ InDetTrigTrackFitterFTK = Trk__GlobalChi2Fitter(name = "InDetTrigTrackFitterFTK"
 ToolSvc += InDetTrigTrackFitterFTK
 if (InDetTrigFlags.doPrintConfigurables()):
   print InDetTrigTrackFitterFTK
-  
+
+
+from InDetTrigRecExample.InDetTrigConfigRecLoadTools import InDetTrigExtrapolator,InDetTrigHoleSearchTool,InDetTrigPrdAssociationTool 
+
+
+from InDetTrackSummaryHelperTool.InDetTrackSummaryHelperToolConf import InDet__InDetTrackSummaryHelperTool
+InDetTrigTrackSummaryHelperToolFTK = InDet__InDetTrackSummaryHelperTool(name = "InDetTrigTrackSummaryHelperToolFTK",
+                                                                        AssoTool     = InDetTrigPrdAssociationTool,
+                                                                        DoSharedHits = False,
+                                                                        HoleSearch   = InDetTrigHoleSearchTool,
+                                                                        TestBLayerTool = None,
+                                                                        PixelToTPIDTool = None,
+                                                                        usePixel=True,
+                                                                        useSCT=True,
+                                                                        useTRT=False
+                                                                        )
+
+ToolSvc += InDetTrigTrackSummaryHelperToolFTK
+if (InDetTrigFlags.doPrintConfigurables()):
+  print InDetTrigTrackSummaryHelperToolFTK
+        
+
+        
+from TrkTrackSummaryTool.TrkTrackSummaryToolConf import Trk__TrackSummaryTool
+InDetTrigTrackSummaryToolFTK = Trk__TrackSummaryTool(name = "InDetTrigTrackSummaryToolFTK",
+                                                 InDetSummaryHelperTool = InDetTrigTrackSummaryHelperToolFTK,
+                                                 InDetHoleSearchTool    = None,
+                                                 doSharedHits           = False,
+                                                 TRT_ElectronPidTool    = None
+                                                 )
+ToolSvc += InDetTrigTrackSummaryToolFTK
+if (InDetTrigFlags.doPrintConfigurables()):
+  print InDetTrigTrackSummaryToolFTK
+
+
+from TrkParticleCreator.TrkParticleCreatorConf import Trk__TrackParticleCreatorTool
+
+
+InDetTrigTrackParticleCreatorToolFTK = Trk__TrackParticleCreatorTool( name = "InDetTrigParticleCreatorToolFTK",
+                                                                      Extrapolator = InDetTrigExtrapolator,
+                                                                      TrackSummaryTool = InDetTrigTrackSummaryToolFTK,
+                                                                      KeepParameters = True,
+                                                                      ForceTrackSummaryUpdate = False,  #summary update moved (in the slimmer now)
+                                                                      )
+        
+ToolSvc += InDetTrigTrackParticleCreatorToolFTK
+if (InDetTrigFlags.doPrintConfigurables()):
+  print InDetTrigTrackParticleCreatorToolFTK
+
+
+from FTK_DataProviderSvc.FTK_DataProviderSvcConf import FTK_UncertaintyTool
+TrigFTK_UncertaintyTool= FTK_UncertaintyTool(name="FTK_UncertaintyTool")
+ToolSvc+=TrigFTK_UncertaintyTool
+if (InDetTrigFlags.doPrintConfigurables()):
+  print TrigFTK_UncertaintyTool
+
+from TrigInDetConf.TrigInDetRecVtxTools import InDetTrigVxEdmCnv  
+from FTK_RecTools.FTK_RecToolsConf import FTK_VertexFinderTool
+TrigFTK_RawVertexFinderTool=  FTK_VertexFinderTool(name="FTK_RawVertexFinderTool",
+                                                   VertexInternalEdmFactory=InDetTrigVxEdmCnv)
+ToolSvc+=TrigFTK_RawVertexFinderTool
+if (InDetTrigFlags.doPrintConfigurables()):
+  print TrigFTK_RawVertexFinderTool
diff --git a/Trigger/TrigTools/TrigInDetPattRecoTools/cmt/requirements b/Trigger/TrigTools/TrigInDetPattRecoTools/cmt/requirements
deleted file mode 100755
index 42e125f5b647f80c4c16b82e54c39d1fcaf84517..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetPattRecoTools/cmt/requirements
+++ /dev/null
@@ -1,62 +0,0 @@
-package TrigInDetPattRecoTools
-
-# ===========================================================================================
-
-public
-
-use	AtlasPolicy			AtlasPolicy-*
-#use	GaudiInterface			GaudiInterface-*     		External
-
-#use	EventInfo 			EventInfo-* 			Event
-
-#use	InDetPrepRawData     		InDetPrepRawData-*		InnerDetector/InDetRecEvent 
-
-#use	TrkTrack               		TrkTrack-*			Tracking/TrkEvent
-#use	VxVertex                	VxVertex-*                      Tracking/TrkEvent
-
-use	TrigInDetEvent			TrigInDetEvent-*		Trigger/TrigEvent
-use     TrigInDetPattRecoEvent		TrigInDetPattRecoEvent-*	Trigger/TrigEvent
-
-#use     TrigSiTrack			TrigSiTrack-*			Trigger/TrigAlgorithms
-#use	InDetRecToolInterfaces		InDetRecToolInterfaces-* 	InnerDetector/InDetRecTools 
-#use	TrigInDetToolInterfaces		TrigInDetToolInterfaces-* 	Trigger/TrigTools
-#use EventPrimitives	EventPrimitives-* Event
-
-#apply_pattern declare_python_modules files="*.py"
-#apply_pattern component_library files="NewIDScanHitFilter.cxx components/*.cxx"
-#apply_pattern dual_use_library files="NewIDScanHitFilter.cxx components/*.cxx"
-#apply_pattern dual_use_library files="*.cxx components/*.cxx"
-
-apply_pattern installed_library 
-library TrigInDetPattRecoTools  *.cxx
-
-private 
-
-#use GeoPrimitives                      GeoPrimitives-*                 DetectorDescription 
-use     IRegionSelector                 IRegionSelector-*               DetectorDescription
-# use	RegionSelector			RegionSelector-*		DetectorDescription
-# use	RoiDescriptor			RoiDescriptor-*		        DetectorDescription
-
-
-
-#use	DataModel			DataModel-*			Control
-#use 	StoreGate			StoreGate-*			Control
-
-
-#use	DataCollection			DataCollection-*		External
-
-#use	InDetBeamSpotService		InDetBeamSpotService-*		InnerDetector/InDetConditions
-#use	InDetIdentifier			InDetIdentifier-*		InnerDetector/InDetDetDescr
-#use	SiSpacePoint			SiSpacePoint-*			InnerDetector/InDetRecEvent
-
-#use	TrkSurfaces			TrkSurfaces-*			Tracking/TrkDetDescr 
-#use 	TrkRIO_OnTrack			TrkRIO_OnTrack-*		Tracking/TrkEvent 
-#use	TrkParameters			TrkParameters-*			Tracking/TrkEvent 
-#use	TrkEventPrimitives		TrkEventPrimitives-*		Tracking/TrkEvent 
-#use	TrkSpacePoint           	TrkSpacePoint-*			Tracking/TrkEvent 
-
-#use	TrigTimeAlgs			TrigTimeAlgs-*			Trigger/TrigTools
-#use     TrkSegment                      TrkSegment-*                    Tracking/TrkEvent
-#use     InDetRIO_OnTrack                InDetRIO_OnTrack-*              InnerDetector/InDetRecEvent
-
-#use ByteStreamCnvSvcBase                ByteStreamCnvSvcBase-*          Event
diff --git a/Trigger/TrigTools/TrigInDetRecoTools/cmt/requirements b/Trigger/TrigTools/TrigInDetRecoTools/cmt/requirements
deleted file mode 100644
index fb83c889fbe3bd8e71ff3c81adbfd4e06f95cc57..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetRecoTools/cmt/requirements
+++ /dev/null
@@ -1,54 +0,0 @@
-package TrigInDetRecoTools
-
-# ===========================================================================================
-
-public
-
-use	AtlasPolicy			AtlasPolicy-*
-use	GaudiInterface			GaudiInterface-*     		External
-use AthenaBaseComps             AthenaBaseComps-*   Control
-
-
-use	InDetPrepRawData     		InDetPrepRawData-*		InnerDetector/InDetRecEvent 
-
-use	TrkTrack               		TrkTrack-*			Tracking/TrkEvent
-#use	VxVertex                	VxVertex-*                      Tracking/TrkEvent
-
-use	TrigInDetEvent			TrigInDetEvent-*		Trigger/TrigEvent
-use	TrigSteeringEvent		TrigSteeringEvent-*     	Trigger/TrigEvent
-use	InDetRecToolInterfaces		InDetRecToolInterfaces-* 	InnerDetector/InDetRecTools 
-use	TrigInDetToolInterfaces		TrigInDetToolInterfaces-* 	Trigger/TrigTools
-use	TrkSpacePoint           	TrkSpacePoint-*			Tracking/TrkEvent 
-use	SiSpacePoint			SiSpacePoint-*			InnerDetector/InDetRecEvent
-
-use	TrigInDetPattRecoEvent		TrigInDetPattRecoEvent-*     	Trigger/TrigEvent
-
-apply_pattern declare_python_modules files="*.py"
-apply_pattern component_library
-library TrigInDetRecoTools  *.cxx components/*.cxx 
-
-private 
-
-use     AthenaKernel            	AthenaKernel-*                  Control
-#use	DataModel			DataModel-*			Control
-use	  EventInfo			EventInfo-* 			Event
-
-use 	IRegionSelector			IRegionSelector-*		DetectorDescription
-
-use	DataCollection			DataCollection-*		External
-
-use	InDetBeamSpotService		InDetBeamSpotService-*		InnerDetector/InDetConditions
-use	InDetIdentifier			InDetIdentifier-*		InnerDetector/InDetDetDescr
-use 	GeoPrimitives      		GeoPrimitives-*    		DetectorDescription
-
-use	TrkSurfaces			TrkSurfaces-*			Tracking/TrkDetDescr 
-use 	TrkRIO_OnTrack			TrkRIO_OnTrack-*		Tracking/TrkEvent 
-use	TrkParameters			TrkParameters-*			Tracking/TrkEvent 
-use	TrkEventPrimitives		TrkEventPrimitives-*		Tracking/TrkEvent 
-
-use	TrigTimeAlgs			TrigTimeAlgs-*			Trigger/TrigTools
-use     TrkSegment                      TrkSegment-*                    Tracking/TrkEvent
-use     InDetRIO_OnTrack                InDetRIO_OnTrack-*              InnerDetector/InDetRecEvent
-use     InDetReadoutGeometry            InDetReadoutGeometry-*          InnerDetector/InDetDetDescr
-
-use 	ByteStreamCnvSvcBase            ByteStreamCnvSvcBase-*          Event
diff --git a/Trigger/TrigTools/TrigInDetToolInterfaces/cmt/requirements b/Trigger/TrigTools/TrigInDetToolInterfaces/cmt/requirements
deleted file mode 100755
index a9dd8da1dfe1ecefe129bcdc4ff1037ab701b46d..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetToolInterfaces/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-package TrigInDetToolInterfaces
-
-use AtlasPolicy 		AtlasPolicy-*
-
-use GaudiInterface      GaudiInterface-* 	External
-use AtlasCLHEP          AtlasCLHEP-*         External
-
-use ByteStreamData	        ByteStreamData-* 	 Event
-use InDetPrepRawData          	InDetPrepRawData-*       InnerDetector/InDetRecEvent
-use TrigInDetEvent		TrigInDetEvent-*     	 Trigger/TrigEvent
-use Identifier                  Identifier-*             DetectorDescription
-use IRegionSelector             IRegionSelector-*             DetectorDescription
-use TrigSteeringEvent           TrigSteeringEvent-*      Trigger/TrigEvent
-use TrkTrack										TrkTrack-*      Tracking/TrkEvent
-use TrkEventPrimitives          TrkEventPrimitives-*      Tracking/TrkEvent
-
-use TrigInDetPattRecoEvent	TrigInDetPattRecoEvent-*	Trigger/TrigEvent
-
-#apply_pattern declare_non_standard_include name=doc
-
-
-
diff --git a/Trigger/TrigTools/TrigInDetTrackExtrapolator/cmt/requirements b/Trigger/TrigTools/TrigInDetTrackExtrapolator/cmt/requirements
deleted file mode 100755
index 3a0295be24d51f04473fcd3ff7ae4eb403fb420b..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetTrackExtrapolator/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package TrigInDetTrackExtrapolator
-
-author Dmitry Emeliyanov <D.Emeliyanov@rl.ac.uk>
-
-use AthenaBaseComps             AthenaBaseComps-*   Control
-use AtlasPolicy			AtlasPolicy-*
-use GaudiInterface		GaudiInterface-*     External
-use TrigSteeringEvent           TrigSteeringEvent-*     Trigger/TrigEvent
-use TrigInDetEvent		TrigInDetEvent-*	Trigger/TrigEvent
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-* Trigger/TrigTools
-
-library TrigInDetTrackExtrapolator *.cxx components/*.cxx
-
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-#apply_pattern declare_non_standard_include name=doc
-
-private
-
-use MagFieldInterfaces  MagFieldInterfaces-*         MagneticField 
-use TrigTimeAlgs		TrigTimeAlgs-*		Trigger/TrigTools
-use TrkDistributedKalmanFilter  TrkDistributedKalmanFilter-* Tracking/TrkFitter
diff --git a/Trigger/TrigTools/TrigInDetTrackExtrapolator/doc/packagedoc.h b/Trigger/TrigTools/TrigInDetTrackExtrapolator/doc/packagedoc.h
index 4a7d3a87133f92cd83f40e217937617ab817261f..61ab6fe8ff1f96d918ad2525bdf22ca424ad419e 100644
--- a/Trigger/TrigTools/TrigInDetTrackExtrapolator/doc/packagedoc.h
+++ b/Trigger/TrigTools/TrigInDetTrackExtrapolator/doc/packagedoc.h
@@ -31,4 +31,3 @@ radius Rcalo and half-length of Zcalo, returns phiC, etaC - coordinates of the t
 the calo surface.
 
 */  
-
diff --git a/Trigger/TrigTools/TrigInDetTrackFitter/cmt/requirements b/Trigger/TrigTools/TrigInDetTrackFitter/cmt/requirements
deleted file mode 100755
index a25faba25ab42750e366dbdfe30e58c66ba49c07..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetTrackFitter/cmt/requirements
+++ /dev/null
@@ -1,41 +0,0 @@
-package TrigInDetTrackFitter
-
-author Dmitry Emeliyanov <D.Emeliyanov@rl.ac.uk>
-
-public
-
-# General
-use AthenaBaseComps             AthenaBaseComps-*   Control
-use AtlasPolicy			AtlasPolicy-*
-use GaudiInterface		GaudiInterface-*             External
-use InDetIdentifier             InDetIdentifier-*            InnerDetector/InDetDetDescr
-use InDetReadoutGeometry	InDetReadoutGeometry-*	     InnerDetector/InDetDetDescr
-use MagFieldInterfaces  MagFieldInterfaces-*         MagneticField 
-use TrigInDetEvent		TrigInDetEvent-*	     Trigger/TrigEvent
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-*    Trigger/TrigTools
-use TrkDistributedKalmanFilter  TrkDistributedKalmanFilter-* Tracking/TrkFitter
-use TrkExInterfaces             TrkExInterfaces-*            Tracking/TrkExtrapolation
-use TrkFitterInterfaces         TrkFitterInterfaces-*        Tracking/TrkFitter
-use TrkFitterUtils      TrkFitterUtils-*        Tracking/TrkFitter
-use TrkToolInterfaces           TrkToolInterfaces-*          Tracking/TrkTools
-use TrkTrack            TrkTrack-*              Tracking/TrkEvent
-
-
-library TrigInDetTrackFitter "*.cxx components/*.cxx"
-    
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-#apply_pattern declare_non_standard_include name=doc
-
-private
-
-use AtlasDetDescr               AtlasDetDescr-*         DetectorDescription
-use InDetPrepRawData 		InDetPrepRawData-* 	InnerDetector/InDetRecEvent
-use InDetRIO_OnTrack    InDetRIO_OnTrack-*	InnerDetector/InDetRecEvent 
-use TrigTimeAlgs		TrigTimeAlgs-*		Trigger/TrigTools
-use TrkEventPrimitives          TrkEventPrimitives-*    Tracking/TrkEvent
-use TrkParameters	        TrkParameters-* 	Tracking/TrkEvent
-use TrkPrepRawData      TrkPrepRawData-*        Tracking/TrkEvent
-use TrkRIO_OnTrack      TrkRIO_OnTrack-*        Tracking/TrkEvent
-use TrkSurfaces 		TrkSurfaces-* 	        Tracking/TrkDetDescr
diff --git a/Trigger/TrigTools/TrigInDetTrackFitter/doc/packagedoc.h b/Trigger/TrigTools/TrigInDetTrackFitter/doc/packagedoc.h
index f7b2ff65cf9fe03030bfe0625ff31dd42a71cd7f..83e8503b171f737aa7135cec1a184a34541ec9d1 100644
--- a/Trigger/TrigTools/TrigInDetTrackFitter/doc/packagedoc.h
+++ b/Trigger/TrigTools/TrigInDetTrackFitter/doc/packagedoc.h
@@ -35,4 +35,3 @@ where recoTracks is a collection (vector) of TrigInDetTrack tracks. A track fitt
 of the input tracks so that no new tracks are created. 
 
 */  
-
diff --git a/Trigger/TrigTools/TrigInDetVxInJetTool/cmt/requirements b/Trigger/TrigTools/TrigInDetVxInJetTool/cmt/requirements
deleted file mode 100755
index 029e04458b03a8524a887498d6b65e915b093252..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigInDetVxInJetTool/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-package TrigInDetVxInJetTool
-
-author Vadim Kostyukhin <Vadim.Kostyukhin@cern.ch>
-
-private
-
-use AtlasROOT         	   AtlasROOT-*       	   External
-use AnalysisUtils          AnalysisUtils-*         PhysicsAnalysis/AnalysisCommon
-use VxVertex               VxVertex-*              Tracking/TrkEvent
-use TrigInterfaces	   TrigInterfaces-*        Trigger/TrigSteer
-use TrigInDetEvent         TrigInDetEvent-*        Trigger/TrigEvent
-
-public
-
-use AtlasPolicy            AtlasPolicy-*
-use AthenaBaseComps        AthenaBaseComps-*       Control
-use GeoPrimitives	   GeoPrimitives-*	   DetectorDescription
-use GaudiInterface         GaudiInterface-*        External
-use AtlasROOT              AtlasROOT-*             External
-use TrigVKalFitter         TrigVKalFitter-*        Trigger/TrigTools
-
-library TrigInDetVxInJetTool  *.cxx components/*.cxx
-apply_pattern component_library
-
-#apply_pattern declare_python_modules files="*.py"
-
-#private
-
-# debug - testing only
-# macro cppdebugflags '$(cppdebugflags_s)'
-# macro_remove componentshr_linkopts "-Wl,-s"
-
-# then do:
-# cmt config
-# make binclean
-# make
-
diff --git a/Trigger/TrigTools/TrigJPsiTools/TrigJPsiTools/MuonTrackSelector.h b/Trigger/TrigTools/TrigJPsiTools/TrigJPsiTools/MuonTrackSelector.h
index 670f179952a09d58f8bdb6ad02f2906109672ead..d2fbb74f2edc138999ea34a8bfc7fc67cbbf9c25 100644
--- a/Trigger/TrigTools/TrigJPsiTools/TrigJPsiTools/MuonTrackSelector.h
+++ b/Trigger/TrigTools/TrigJPsiTools/TrigJPsiTools/MuonTrackSelector.h
@@ -257,7 +257,7 @@ class MuonTrackSelector : public MuonTrackAdder {
 	// 2 "hits" and an offline SCT "hit" is really a 1D cluster, so two intersetcting
 	// stereo clusters making a spacepoint are two "hits"
 	const Trk::TrackSummary* summary = track->trackSummary();
-	int nBlayerHits = 2*summary->get(Trk::numberOfBLayerHits); 
+	int nBlayerHits = 2*summary->get(Trk::numberOfInnermostPixelLayerHits);
 	int nPixelHits  = 2*summary->get(Trk::numberOfPixelHits);  
 	int nSctHits    = summary->get(Trk::numberOfSCTHits); 
 	int nStrawHits  = summary->get(Trk::numberOfTRTHits);
diff --git a/Trigger/TrigTools/TrigJPsiTools/cmt/install.history b/Trigger/TrigTools/TrigJPsiTools/cmt/install.history
deleted file mode 100644
index 5bc7e1d7abeeabd0089768dc426ea876c1cdfc42..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigJPsiTools/cmt/install.history
+++ /dev/null
@@ -1,39 +0,0 @@
-(i__main__
-LogFile
-p0
-(dp1
-S'_installed_files'
-p2
-(dp3
-S'../../../../../../../afs/cern.ch/atlas/software/releases/15.6.9/GAUDI/v20r4p7a/GaudiPolicy/cmt/fragments/__init__.py'
-p4
-S'../../../../InstallArea/python/TrigJPsiTools/__init__.py'
-p5
-sS'../../../testarea/Trigger/TrigTools/TrigJPsiTools/i686-slc5-gcc43-opt/libTrigJPsiTools.so'
-p6
-S'../../../../../InstallArea/i686-slc5-gcc43-opt/lib/libTrigJPsiTools.so'
-p7
-sS'../../../Trigger/TrigTools/TrigJPsiTools/i686-slc4-gcc34-opt/libTrigJPsiTools.so'
-p8
-S'../../../../InstallArea/i686-slc4-gcc34-opt/lib/libTrigJPsiTools.so'
-p9
-sS'../../../Trigger/TrigTools/TrigJPsiTools/i686-slc5-gcc43-opt/libTrigJPsiTools.so'
-p10
-S'../../../../InstallArea/i686-slc5-gcc43-opt/lib/libTrigJPsiTools.so'
-p11
-sS'../../Trigger/TrigTools/TrigJPsiTools/genConf/TrigJPsiTools'
-p12
-(dp13
-S'../../../Trigger/TrigTools/TrigJPsiTools/genConf/TrigJPsiTools/TrigJPsiTools_confDb.py'
-p14
-S'../../../../InstallArea/python/TrigJPsiTools/TrigJPsiTools_confDb.py'
-p15
-sS'../../../Trigger/TrigTools/TrigJPsiTools/genConf/TrigJPsiTools/TrigJPsiToolsConf.py'
-p16
-S'../../../../InstallArea/python/TrigJPsiTools/TrigJPsiToolsConf.py'
-p17
-ssS'../../../16.6.X.Y-VAL/Trigger/TrigTools/TrigJPsiTools/i686-slc5-gcc43-opt/libTrigJPsiTools.so'
-p18
-S'../../../../../InstallArea/i686-slc5-gcc43-opt/lib/libTrigJPsiTools.so'
-p19
-ssb.
\ No newline at end of file
diff --git a/Trigger/TrigTools/TrigJPsiTools/cmt/requirements b/Trigger/TrigTools/TrigJPsiTools/cmt/requirements
deleted file mode 100644
index dec16f5c215244663b28aff5aaa536efa3fca98b..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigJPsiTools/cmt/requirements
+++ /dev/null
@@ -1,34 +0,0 @@
-package TrigJPsiTools
-
-# General
-use AtlasPolicy 	AtlasPolicy-*
-use GaudiInterface    	GaudiInterface-* External
-
-private
-apply_tag ROOTMathLibs
-use AtlasROOT		AtlasROOT-* External
-
-public
-# Muons 
-use muonEvent	muonEvent-*	Reconstruction/MuonIdentification
-use TrigInDetEvent           TrigInDetEvent-*           Trigger/TrigEvent
-
-#packages needed for offline monitoring
-use Particle	Particle-*	Reconstruction
-
-#packages needed for electrons
-use egammaEvent	egammaEvent-*	Reconstruction/egamma
-use CaloEvent   CaloEvent-*   Calorimeter
-
-# for tag-and-probe dimuons
-use TrigEffJpsiTools	TrigEffJpsiTools-*	Trigger/TrigAnalysis
-
-# for online muon monitoring
-
-use TrigMuonEvent	TrigMuonEvent-*		Trigger/TrigEvent
-use TrigInDetAnalysisUtils	TrigInDetAnalysisUtils-*		Trigger/TrigAnalysis
-#use TrigInDetAnalysisExample	TrigInDetAnalysisExample-*		Trigger/TrigAnalysis
-
-library TrigJPsiTools *.cxx components/*.cxx
-
-apply_pattern installed_library
diff --git a/Trigger/TrigTools/TrigJetUtils/cmt/requirements b/Trigger/TrigTools/TrigJetUtils/cmt/requirements
deleted file mode 100644
index 523b7f8de95c8e61e2a9f1cfb1bc59421c2a3c7a..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigJetUtils/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-## automatically generated CMT requirements file
-package TrigJetUtils
-author  chapleau
-
-## for athena policies: this has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## for gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-
-## put here your package dependencies...
-private
-
-use AthenaKernel        AthenaKernel-*               Control
-use AthenaBaseComps     AthenaBaseComps-*            Control
-use StoreGate           StoreGate-*                  Control
-use TrigNavigation      TrigNavigation-*             Trigger/TrigEvent
-
-use TrigParticle        TrigParticle-*               Trigger/TrigEvent
-use JetEvent            JetEvent-*                   Reconstruction/Jet
-
-end_private
-##
-
-library TrigJetUtils *.cxx components/*.cxx
-apply_pattern component_library
diff --git a/Trigger/TrigTools/TrigMuonBackExtrapolator/cmt/requirements b/Trigger/TrigTools/TrigMuonBackExtrapolator/cmt/requirements
deleted file mode 100644
index e576a673afeefcc67383c01e19a9be28addff4a5..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigMuonBackExtrapolator/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package TrigMuonBackExtrapolator
-
-author Alessandro Di Mattia <alessandro.dimattia@roma1.infn.it>
-author Stefano Giagu <stefano.giagu@cern.ch>
-
-public
-use  AtlasPolicy              AtlasPolicy-*                   
-use  GaudiInterface           GaudiInterface-*                External
-use  TrigInDetEvent           TrigInDetEvent-*                Trigger/TrigEvent
-use  TrigMuonEvent            TrigMuonEvent-*                 Trigger/TrigEvent
-use  xAODTrigMuon             xAODTrigMuon-*                  Event/xAOD
-use  AthenaBaseComps          AthenaBaseComps-*               Control
-
-library TrigMuonBackExtrapolator *.cxx components/*.cxx
-
-apply_pattern component_library
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigTools/TrigMuonRoITools/cmt/requirements b/Trigger/TrigTools/TrigMuonRoITools/cmt/requirements
deleted file mode 100644
index ab0cdf76a282571396e2115d82ca73698922b046..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigMuonRoITools/cmt/requirements
+++ /dev/null
@@ -1,15 +0,0 @@
-package TrigMuonRoITools
-
-author Werner Wiedenmann <Werner.Wiedenmann@cern.ch>
-
-use AtlasPolicy           AtlasPolicy-*
-use GaudiInterface        GaudiInterface-*         External
-
-private
-use EventInfo             EventInfo-*              Event
-use ByteStreamCnvSvcBase  ByteStreamCnvSvcBase-*   Event
-use TrigT1Result          TrigT1Result-*           Trigger/TrigT1
-use AthenaBaseComps       AthenaBaseComps-*        Control
-
-library TrigMuonRoITools *.cxx -s=components *.cxx
-apply_pattern component_library
diff --git a/Trigger/TrigTools/TrigMuonToolInterfaces/cmt/requirements b/Trigger/TrigTools/TrigMuonToolInterfaces/cmt/requirements
deleted file mode 100644
index bc2821b08976bf9df03f09569023544bf1f58903..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigMuonToolInterfaces/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigMuonToolInterfaces
-
-author Mark Owen <markowen@cern.ch>
-author Robert Harrington <R.Harrington@ed.ac.uk>
-author Martin Woudstra <Martin.Woudstra@cern.ch>
-
-public 
-# generalities 
-use AtlasPolicy	      AtlasPolicy-* 
-use GaudiInterface    GaudiInterface-*    External
-
-# specifics
-use MuonPattern       MuonPattern-*       MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use MuonSegment       MuonSegment-*       MuonSpectrometer/MuonReconstruction/MuonRecEvent
-use TrigMuonEvent     TrigMuonEvent-*     Trigger/TrigEvent
-use TrigSteeringEvent TrigSteeringEvent-* Trigger/TrigEvent
-use TrkSegment        TrkSegment-*        Tracking/TrkEvent
-use TrkTrack          TrkTrack-*          Tracking/TrkEvent
-use MuonCombinedEvent MuonCombinedEvent-* Reconstruction/MuonIdentification
-use Particle          Particle-*          Reconstruction
-use AthContainers     AthContainers-*     Control
-use AthLinks          AthLinks-*          Control
-use xAODMuon	      xAODMuon-*	  Event/xAOD
-use xAODTrigMuon      xAODTrigMuon-*      Event/xAOD
-use xAODTracking      xAODTracking-*	  Event/xAOD
-use xAODCaloEvent     xAODCaloEvent-*     Event/xAOD
diff --git a/Trigger/TrigTools/TrigOfflineDriftCircleTool/cmt/requirements b/Trigger/TrigTools/TrigOfflineDriftCircleTool/cmt/requirements
deleted file mode 100755
index 8ddf6ce32dc7ae77a9993f1aafd9c3bbd67ceb44..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigOfflineDriftCircleTool/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigOfflineDriftCircleTool 
-
-use AtlasPolicy 		AtlasPolicy-*
-use AthenaBaseComps             AthenaBaseComps-*               Control
-use GaudiInterface 		GaudiInterface-* 		External
-use InDetRawData                InDetRawData-*                  InnerDetector/InDetRawEvent
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-*       Trigger/TrigTools
-use TRT_ConditionsServices TRT_ConditionsServices-*		InnerDetector/InDetConditions
-use TrkPrepRawData 		TrkPrepRawData-* 		Tracking/TrkEvent
-use ByteStreamData	        ByteStreamData-* 	        Event
-use TrigTimeAlgs		TrigTimeAlgs-*		        Trigger/TrigTools
-use ByteStreamCnvSvcBase        ByteStreamCnvSvcBase-*          Event
-use Identifier			Identifier-*	    		DetectorDescription
-use InDetPrepRawData          	InDetPrepRawData-*              InnerDetector/InDetRecEvent
-
-private
-use TRT_RawDataByteStreamCnv    TRT_RawDataByteStreamCnv-*      InnerDetector/InDetEventCnv
-use TRT_DriftCircleTool         TRT_DriftCircleTool-*           InnerDetector/InDetRecTools
-use InDetIdentifier	 	InDetIdentifier-*	    	InnerDetector/InDetDetDescr
-use IRegionSelector          	IRegionSelector-*                DetectorDescription
-use TRT_Cabling                 TRT_Cabling-*                   InnerDetector/InDetDetDescr
-end_private
-
-library TrigOfflineDriftCircleTool "*.cxx components/*.cxx"
-apply_pattern declare_python_modules files="*.py"
-apply_pattern component_library
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/cmt/requirements b/Trigger/TrigTools/TrigOnlineSpacePointTool/cmt/requirements
deleted file mode 100755
index 369d057958da64131c5a4276d95dadc926d56d1b..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/cmt/requirements
+++ /dev/null
@@ -1,49 +0,0 @@
-package TrigOnlineSpacePointTool 
-
-use AtlasPolicy 		AtlasPolicy-*
-use Identifier			Identifier-*	    		DetectorDescription
-use GaudiInterface 		GaudiInterface-* 		External
-use IRegionSelector          	IRegionSelector-*                DetectorDescription
-# use RoiDescriptor               RoiDescriptor-*                 DetectorDescription
-
-use PixelRawDataByteStreamCnv   PixelRawDataByteStreamCnv-*     InnerDetector/InDetEventCnv
-use InDetReadoutGeometry 	InDetReadoutGeometry-*  	InnerDetector/InDetDetDescr
-use PixelCabling                PixelCabling-*                  InnerDetector/InDetDetDescr
-use SCT_Cabling                 SCT_Cabling-*                   InnerDetector/InDetDetDescr
-use InDetIdentifier	 	InDetIdentifier-*	    	InnerDetector/InDetDetDescr
-use InDetPrepRawData          	InDetPrepRawData-*              InnerDetector/InDetRecEvent
-use TrigInDetEvent		TrigInDetEvent-*     	        Trigger/TrigEvent
-use TrigSteeringEvent           TrigSteeringEvent-*             Trigger/TrigEvent
-
-use TrkPrepRawData 		TrkPrepRawData-* 		Tracking/TrkEvent
-use InDetRawData                InDetRawData-*                  InnerDetector/InDetRawEvent
-use ByteStreamData	        ByteStreamData-* 	        Event
-use DataCollection              DataCollection-*                External
-use SCT_ConditionsServices      SCT_ConditionsServices-*        InnerDetector/InDetConditions
-use PixelConditionsServices     PixelConditionsServices-*       InnerDetector/InDetConditions
-use AthenaBaseComps     AthenaBaseComps-*       Control
-
-
-use TrigSiSpacePointTool        TrigSiSpacePointTool-*          Trigger/TrigTools
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-*       Trigger/TrigTools
-use SiClusterizationTool        SiClusterizationTool-*          InnerDetector/InDetRecTools
-
-
-library TrigOnlineSpacePointTool "*.cxx components/*.cxx"
-    
-apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-#apply_pattern declare_non_standard_include name=doc
-
-private
-use StoreGate		    StoreGate-*               Control
-use AtlasDetDescr               AtlasDetDescr-*                 DetectorDescription
-use TrkSpacePoint               TrkSpacePoint-*                 Tracking/TrkEvent
-use ByteStreamCnvSvcBase        ByteStreamCnvSvcBase-*          Event
-use InDetBeamSpotService        InDetBeamSpotService-*          InnerDetector/InDetConditions
-use TrigTimeAlgs		TrigTimeAlgs-*		        Trigger/TrigTools
-use SCT_RawDataByteStreamCnv    SCT_RawDataByteStreamCnv-*      InnerDetector/InDetEventCnv
-use TrigTimeAlgs		TrigTimeAlgs-*		        Trigger/TrigTools
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-*       Trigger/TrigTools
diff --git a/Trigger/TrigTools/TrigSiSpacePointTool/cmt/requirements b/Trigger/TrigTools/TrigSiSpacePointTool/cmt/requirements
deleted file mode 100755
index 56f30f7d1e68ed918971e469e905feef821cd962..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigSiSpacePointTool/cmt/requirements
+++ /dev/null
@@ -1,6 +0,0 @@
-package TrigSiSpacePointTool 
-
-use AtlasPolicy 		AtlasPolicy-*
-use GaudiInterface 		GaudiInterface-* 		External
-use TrigInDetEvent		TrigInDetEvent-*     	Trigger/TrigEvent
-
diff --git a/Trigger/TrigTools/TrigSiSpacePointTool/doc/packagedoc.h b/Trigger/TrigTools/TrigSiSpacePointTool/doc/packagedoc.h
index 24c11a18592910a6ebe7ab3417a292f86453e56f..5a1f4f247729096dc7f4af68328afeb18ff6e5ef 100644
--- a/Trigger/TrigTools/TrigSiSpacePointTool/doc/packagedoc.h
+++ b/Trigger/TrigTools/TrigSiSpacePointTool/doc/packagedoc.h
@@ -40,7 +40,6 @@ The interface defines the following methods
 
 Note that getSpacePoints methods are obsolete and must not be used. 
     
-@section TrigSiSpacePointTool_TrigSiSpacePointToolReq Requirements
 
 
 */
diff --git a/Trigger/TrigTools/TrigT2CaloCalibration/cmt/requirements b/Trigger/TrigTools/TrigT2CaloCalibration/cmt/requirements
deleted file mode 100755
index bedeef02a0f025c331f612c9d841886d0f0931b6..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigT2CaloCalibration/cmt/requirements
+++ /dev/null
@@ -1,61 +0,0 @@
-package TrigT2CaloCalibration
-
-author Carlos Osuna <Carlos.Osuna@ifae.es>
-author Patricia Conde <Patricia.Conde.Muino@cern.ch>
-author Denis Oliveira Damazio <Denis.Oliveira.Damazio@cern.ch>
-author Malachi Schram <Malachi.Schram@cern.ch>
-author Nuno Anjos <Nuno.Anjos@cern.ch>
-
-use AtlasPolicy              AtlasPolicy-*
-use StoreGate		     StoreGate-*		Control
-use AthenaBaseComps	     AthenaBaseComps-*		Control
-
-use GaudiInterface           GaudiInterface-*           External
-
-use TrigCaloEvent	     TrigCaloEvent-*		Trigger/TrigEvent
-use xAODTrigCalo	     xAODTrigCalo-*		Event/xAOD
-
-use CaloGeoHelpers           CaloGeoHelpers-*           Calorimeter
-use CaloRec		     CaloRec-*			Calorimeter
-use CaloClusterCorrection    CaloClusterCorrection-*	Calorimeter
-use CaloConditions	     CaloConditions-*		Calorimeter
-
-private
-use EventInfo		     EventInfo-*		Event
-use AthenaKernel	     AthenaKernel-*		Control
-use CaloDetDescr	     CaloDetDescr-*		Calorimeter
-end_private
-
-apply_pattern dual_use_library files=*.cxx
-#apply_pattern declare_runtime
-apply_pattern declare_joboptions files="*.txt *.py"
-apply_pattern declare_python_modules files="*.py"
-
-#Packages needed for dB object
-#use DataModel DataModel-00-* Control 
-use CLIDSvc CLIDSvc-* Control
-use AthenaPoolUtilities  AthenaPoolUtilities-*   Database/AthenaPOOL
-
-apply_pattern poolcnv files="-s=${TrigT2CaloCalibration_root}/TrigT2CaloCalibration  T2CaloJetCalib_dBObj.h"
-
-# require the cnv to be linked after the installed lib of the dual_use pattern:
-macro_append TrigT2CaloCalibrationPoolCnv_dependencies  TrigT2CaloCalibrationLib
-
-private 
-use AtlasReflex	     AtlasReflex-*        External -no_auto_imports
-#use AtlasSEAL   AtlasSEAL-00-*   External -no_auto_imports
-#use AtlasPOOL        AtlasPOOL-*           External
-
-# Pattern to build the dict lib. User should create a single header
-# file: <package>Dict.h which includes all other .h files. See MissingETDict
-# A selection file must be created by hand. This file lists the
-# classes to be added to the dictionary, and which fields are
-# transient. It should be put in ../<package> dir and is conventionally called
-# selection.xml.
-apply_pattern lcgdict dict=TrigT2CaloCalibration selectionfile=selection.xml headerfiles="../TrigT2CaloCalibration/TrigT2CaloCalibrationDict.h"
-
-#Packages needed to read/write to dB
-#use AtlasConditionsRunTime AtlasConditionsRunTime-00-* 
-use RegistrationServices RegistrationServices-* Database
-
-end_private
diff --git a/Trigger/TrigTools/TrigT2CaloCalibration/doc/packagedoc.h b/Trigger/TrigTools/TrigT2CaloCalibration/doc/packagedoc.h
index 5dca1cb2adb5ae010c276395d130bc59ea033cbf..a08da906805b114df5301eb699f2cfc72dc88098 100644
--- a/Trigger/TrigTools/TrigT2CaloCalibration/doc/packagedoc.h
+++ b/Trigger/TrigTools/TrigT2CaloCalibration/doc/packagedoc.h
@@ -13,18 +13,6 @@ This package provides classes and methods to perform a Sampling Calibration
 for L2 trigger. With EM energy, HAD energy and eta as input, it provides
 a fast calibration suitable for hadronic objects.
 
-@ref used_TrigT2CaloCalibration
 
-@ref requirements_TrigT2CaloCalibration
 
 */
-
-/**
-@page used_TrigT2CaloCalibration Used Packages
-*/
-
-/**
-@page requirements_TrigT2CaloCalibration Requirements
-*/
-
-
diff --git a/Trigger/TrigTools/TrigTRT_TrackExtensionTool/cmt/requirements b/Trigger/TrigTools/TrigTRT_TrackExtensionTool/cmt/requirements
deleted file mode 100755
index 106d2e21b777c9a9eb8d2a29129f5d82f7743b98..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigTRT_TrackExtensionTool/cmt/requirements
+++ /dev/null
@@ -1,40 +0,0 @@
-package TrigTRT_TrackExtensionTool
-
-author Dmitry Emeliyanov <D.Emeliyanov@rl.ac.uk>
-
-use AtlasPolicy			AtlasPolicy-*
-use AthenaBaseComps             AthenaBaseComps-*   Control
-use GaudiInterface		GaudiInterface-*     External
-#use RegionSelector 		RegionSelector-* 	DetectorDescription
-use InDetIdentifier             InDetIdentifier-*       InnerDetector/InDetDetDescr
-use InDetReadoutGeometry	InDetReadoutGeometry-*	InnerDetector/InDetDetDescr
-use InDetPrepRawData 		InDetPrepRawData-* 	InnerDetector/InDetRecEvent
-use TrigInDetEvent		TrigInDetEvent-*	Trigger/TrigEvent
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-* Trigger/TrigTools
-use TrigInDetTrackFitter        TrigInDetTrackFitter-* Trigger/TrigTools
-use TrkExInterfaces             TrkExInterfaces-*         Tracking/TrkExtrapolation
-
-
-library TrigTRT_TrackExtensionTool *.cxx components/*.cxx
-
-apply_pattern component_library
-
-apply_pattern declare_joboptions files="*.py"
-#apply_pattern declare_non_standard_include name=doc
-apply_pattern declare_python_modules files="*.py"
-
-private
-
-use IRegionSelector 		IRegionSelector-* 	DetectorDescription
-use ByteStreamCnvSvcBase        ByteStreamCnvSvcBase-*  Event
-use Identifier                  Identifier-*            DetectorDescription
-use TrkSurfaces 		TrkSurfaces-* 	        Tracking/TrkDetDescr
-use TrkParameters	        TrkParameters-* 	Tracking/TrkEvent
-use TrigTimeAlgs		TrigTimeAlgs-*		Trigger/TrigTools
-use TrkDistributedKalmanFilter  TrkDistributedKalmanFilter-* Tracking/TrkFitter
-use MagFieldInterfaces  MagFieldInterfaces-*         MagneticField 
-use GeoPrimitives				GeoPrimitives-*							 DetectorDescription
-use TrigSteeringEvent		TrigSteeringEvent-*					 Trigger/TrigEvent
-
-use TrkRIO_OnTrack              TrkRIO_OnTrack-*        Tracking/TrkEvent 
-use TrkToolInterfaces   TrkToolInterfaces-*     Tracking/TrkTools
diff --git a/Trigger/TrigTools/TrigTimeAlgs/cmt/requirements b/Trigger/TrigTools/TrigTimeAlgs/cmt/requirements
deleted file mode 100755
index d419f81bda3379bc05f79b536b8725ee8835d672..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigTimeAlgs/cmt/requirements
+++ /dev/null
@@ -1,25 +0,0 @@
-package TrigTimeAlgs
-
-use 	AtlasPolicy         	AtlasPolicy-*
-use     AtlasROOT               AtlasROOT-*             External
-use     AtlasBoost		AtlasBoost-*		External
-use 	GaudiInterface 		GaudiInterface-* 	External
-use 	AthenaKernel            AthenaKernel-*          Control
-use 	AthenaBaseComps         AthenaBaseComps-*          Control
-use 	DataModel          	DataModel-*      	Control
-use 	SGTools          	SGTools-*      		Control
-
-apply_pattern dual_use_library files=*.cxx
-apply_pattern declare_joboptions files="jobOfragment_TrigTimerSvc.py"
-
-private
-use 	CxxUtils          	CxxUtils-*      		Control
-
-macro_append libraryshr_linkopts "" \
-   Linux                  " -Wl,-lrt "
-
-# UnitTest programs
-use 	TestTools      TestTools-*         AtlasTest
-apply_pattern UnitTest_run unit_test=TimerSvc extrapatterns=".*"
-
-end_private
diff --git a/Trigger/TrigTools/TrigTrackJetFinderTool/cmt/requirements b/Trigger/TrigTools/TrigTrackJetFinderTool/cmt/requirements
deleted file mode 100644
index ebdaad74cf31e2ff28eefec892059e68870310a5..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigTrackJetFinderTool/cmt/requirements
+++ /dev/null
@@ -1,37 +0,0 @@
-package TrigTrackJetFinderTool
-
-author Andrea Coccaro <Andrea.Coccaro@ge.infn.it>
-
-
-# ============================================================================================
-public
-
-use 	AtlasPolicy         	AtlasPolicy-*
-use 	AthenaBaseComps     	AthenaBaseComps-*       	Control
-use 	GaudiInterface 		GaudiInterface-* 		External
-use     Particle		Particle-*			Reconstruction	
-use 	TrigInDetEvent          TrigInDetEvent-*		Trigger/TrigEvent
-use 	TrkTrack           	TrkTrack-*       		Tracking/TrkEvent
-
-
-# ============================================================================================
-private
-
-use	AtlasROOT		AtlasROOT-*			External
-
-# ============================================================================================
-public
-
-library TrigTrackJetFinderTool *.cxx components/*.cxx
-
-apply_pattern component_library
-
-
-
-
-
-
-
-
-
-
diff --git a/Trigger/TrigTools/TrigUtils/cmt/requirements b/Trigger/TrigTools/TrigUtils/cmt/requirements
deleted file mode 100644
index b27770a61b9c5428d395fefb0ecfb39061a42ba4..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigUtils/cmt/requirements
+++ /dev/null
@@ -1,6 +0,0 @@
-package TrigUtils
-
-use AtlasPolicy AtlasPolicy-*
-
-apply_pattern declare_scripts files="../bin/*.py"
-#apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TrigTools/TrigVKalFitter/cmt/requirements b/Trigger/TrigTools/TrigVKalFitter/cmt/requirements
deleted file mode 100755
index 909a0f8618eb45a9ef032ec46fe6e36849f6fed2..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVKalFitter/cmt/requirements
+++ /dev/null
@@ -1,22 +0,0 @@
-package TrigVKalFitter
-
-author Vadim Kostyukhin <Vadim.Kostyukhin@cern.ch>
-
-private
-
-use TrigInDetEvent       TrigInDetEvent-*        Trigger/TrigEvent
-
-public
-
-use AtlasPolicy       AtlasPolicy-*
-use GaudiInterface    GaudiInterface-*     External
-use EventPrimitives   EventPrimitives-*    Event
-use GeoPrimitives     GeoPrimitives-*      DetectorDescription
-use AthenaBaseComps   AthenaBaseComps-*    Control
-use AtlasCLHEP        AtlasCLHEP-*         External
-#
-use MagFieldInterfaces   MagFieldInterfaces-*    MagneticField
-use TrkVKalVrtCore       TrkVKalVrtCore-*        Tracking/TrkVertexFitter
-
-apply_pattern dual_use_library files="*.cxx"
-
diff --git a/Trigger/TrigTools/TrigVKalFitter/doc/packagedoc.h b/Trigger/TrigTools/TrigVKalFitter/doc/packagedoc.h
index a61ae9bb3e75ba201e6a3753a79e9d4070f99cd8..dd4ae1c00198673939213e26b2d882fc2e6b6f79 100644
--- a/Trigger/TrigTools/TrigVKalFitter/doc/packagedoc.h
+++ b/Trigger/TrigTools/TrigVKalFitter/doc/packagedoc.h
@@ -22,17 +22,6 @@ This package contains  interfaces to VKalVrt.
  Software related issues may be viewed in
  https://twiki.cern.ch/twiki/bin/view/Atlas/VKalVrt .
   
-@ref used_TrigVKalFitter
 
-@ref requirements_TrigVKalFitter
 
 */
-
-/**
-@page used_TrigVKalFitter Used Packages
-*/
-
-/**
-@page requirements_TrigVKalFitter Requirements
-*/
-
diff --git a/Trigger/TrigTools/TrigVertexFitter/cmt/requirements b/Trigger/TrigTools/TrigVertexFitter/cmt/requirements
deleted file mode 100755
index 12a1fca8f16c7893c84ce1afd684fdc4510b12ff..0000000000000000000000000000000000000000
--- a/Trigger/TrigTools/TrigVertexFitter/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TrigVertexFitter
-
-author Dmitry Emeliyanov <D.Emeliyanov@rl.ac.uk>
-
-public
-
-# General
-use AtlasPolicy			AtlasPolicy-*
-use GaudiInterface		GaudiInterface-*          External
-use TrigInDetToolInterfaces     TrigInDetToolInterfaces-* Trigger/TrigTools
-use AthenaBaseComps							AthenaBaseComps-*				Control
-use TrkEventPrimitives          TrkEventPrimitives-*      Tracking/TrkEvent
-
-library TrigVertexFitter "*.cxx components/*.cxx"
-    
-apply_pattern component_library
-#apply_pattern dual_use_library
-apply_pattern declare_joboptions files="*.py"
-#apply_pattern declare_non_standard_include name=doc
-
-private
-
-use TrigTimeAlgs		TrigTimeAlgs-*		Trigger/TrigTools
-use TrkParameters	        TrkParameters-* 	Tracking/TrkEvent
-use TrkTrack                    TrkTrack-*                Tracking/TrkEvent
-use TrigInDetEvent		TrigInDetEvent-*	  Trigger/TrigEvent
diff --git a/Trigger/TrigTools/TrigVertexFitter/doc/packagedoc.h b/Trigger/TrigTools/TrigVertexFitter/doc/packagedoc.h
index adece53b2225d84de0f5aefe2318c063ef8716e5..f5f16f39bf9aef40a47bb6a2cec1a9994d8905db 100644
--- a/Trigger/TrigTools/TrigVertexFitter/doc/packagedoc.h
+++ b/Trigger/TrigTools/TrigVertexFitter/doc/packagedoc.h
@@ -127,4 +127,3 @@ StatusCode sc=m_L2vertFitter->fitWithConstraints(pL2V);
 
 
 */  
-
diff --git a/Trigger/TrigTruthEvent/TrigInDetTruthEvent/cmt/requirements b/Trigger/TrigTruthEvent/TrigInDetTruthEvent/cmt/requirements
deleted file mode 100644
index 7784f3f150060c3bcef2bce4a156875910f6f178..0000000000000000000000000000000000000000
--- a/Trigger/TrigTruthEvent/TrigInDetTruthEvent/cmt/requirements
+++ /dev/null
@@ -1,32 +0,0 @@
-package TrigInDetTruthEvent
-
-author Ricardo Goncalo <r.goncalo@rhul.ac.uk>
-
-
-public
-use  AtlasPolicy                AtlasPolicy-*                   
-use  AtlasHepMC                 AtlasHepMC-*                    External
-use  CLIDSvc                    CLIDSvc-*                       Control
-use  AthContainers              AthContainers-*                 Control
-use  AthLinks                   AthLinks-*                      Control
-use  GeneratorObjects           GeneratorObjects-*              Generators
-use  TrigInDetEvent             TrigInDetEvent-*                Trigger/TrigEvent
-use  TrigSteeringEvent          TrigSteeringEvent-*             Trigger/TrigEvent
-private
-use  AthenaKernel               AthenaKernel-*                  Control
-use  AtlasReflex                AtlasReflex-*                   External                        -no_auto_imports
-use  GaudiInterface             GaudiInterface-*                External
-end_private
-
-# library:
-library TrigInDetTruthEvent *.cxx
-apply_pattern installed_library
-
-# generate dictionary fillers (pool converters in TrigEventAthenaPool)
-private 
-
-apply_pattern lcgdict dict=TrigInDetTruthEvent selectionfile=selection.xml \
-    headerfiles="../TrigInDetTruthEvent/TrigInDetTruthEventDict.h" 
-
-end_private
-
diff --git a/Trigger/TrigTruthEvent/TrigTruthEventAthenaPool/cmt/requirements b/Trigger/TrigTruthEvent/TrigTruthEventAthenaPool/cmt/requirements
deleted file mode 100644
index f559a2aa06ed82046b880a7a6dcd29d498c11edc..0000000000000000000000000000000000000000
--- a/Trigger/TrigTruthEvent/TrigTruthEventAthenaPool/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package TrigTruthEventAthenaPool
-author Andrew Hamilton     <Andrew.Hamilton@cern.ch>
-
-use AtlasPolicy          AtlasPolicy-*
-use AthenaPoolUtilities  AthenaPoolUtilities-*   Database/AthenaPOOL
-
-# use statements for data packages
-use TrigInDetEvent	 TrigInDetEvent-*	 Trigger/TrigEvent
-
-# use statement for converters
-private
-use TrigInDetTruthEvent	 TrigInDetTruthEvent-*	 Trigger/TrigTruthEvent
-use TrigTruthEventTPCnv	 TrigTruthEventTPCnv-*	 Trigger/TrigTruthEvent
-
-use RootConversions      RootConversions-*       Database/AthenaPOOL
-use AtlasROOT		 AtlasROOT-*		 External
-end_private
-
-# data class libraries
-
-apply_pattern poolcnv files="-s=${TrigInDetTruthEvent_root}/TrigInDetTruthEvent TrigInDetTrackTruthMap.h"
-
-apply_pattern declare_joboptions files="*.py"
-
-
-private
-use TestTools            TestTools-*                AtlasTest -no_auto_imports
-
-
-apply_pattern athenarun_test \
-   name="TrigTruthEventTPCnv_15.8.0" \
-   options="TrigTruthEventAthenaPool/TrigTruthEventTPCnv_15.8.0_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigTruthEventTPCnv_15.8.0" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigTruthEventTPCnv_15.8.0"
-
-
-apply_pattern athenarun_test \
-   name="TrigTruthEventTPCnv_18.0.0" \
-   options="TrigTruthEventAthenaPool/TrigTruthEventTPCnv_18.0.0_test.py" \
-   pre_script="${ATHENAPOOLUTILITIESROOT}/share/pre_tpcnvtest.sh TrigTruthEventTPCnv_18.0.0" \
-   post_script="${ATHENAPOOLUTILITIESROOT}/share/post_tpcnvtest.sh TrigTruthEventTPCnv_18.0.0"
-
diff --git a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/cmt/requirements b/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/cmt/requirements
deleted file mode 100644
index cf0dfd8988e6d8a480ba08e41b0c87332babe246..0000000000000000000000000000000000000000
--- a/Trigger/TrigTruthEvent/TrigTruthEventTPCnv/cmt/requirements
+++ /dev/null
@@ -1,54 +0,0 @@
-package TrigTruthEventTPCnv
-
-author Andrew Hamilton     <Andrew.Hamilton@cern.ch>
-
-use AtlasPolicy            AtlasPolicy-*	    
-use RootConversions	   RootConversions-*        Database/AthenaPOOL
-			   
-use AthenaPoolCnvSvc       AthenaPoolCnvSvc-*       Database/AthenaPOOL
-use AthenaPoolUtilities    AthenaPoolUtilities-*    Database/AthenaPOOL
-use AthLinks               AthLinks-*               Control
-use DataModelAthenaPool    DataModelAthenaPool-*    Control
-			   
-use TrigInDetEvent	   TrigInDetEvent-*	    Trigger/TrigEvent
-use TrigInDetTruthEvent	   TrigInDetTruthEvent-*    Trigger/TrigTruthEvent
-
-use TrigInDetEventTPCnv    TrigInDetEventTPCnv-*    Trigger/TrigEvent 
-
-use GeneratorObjectsTPCnv  GeneratorObjectsTPCnv-*  Generators
-
-private
-use GaudiInterface         GaudiInterface-*         External
-use AtlasReflex            AtlasReflex-*            External
-use CxxUtils               CxxUtils-*               Control
-use AthenaKernel           AthenaKernel-*           Control
-use SGTools                SGTools-*                Control
-end_private
-
-branches TrigTruthEventTPCnv src
-
-library TrigTruthEventTPCnv *.cxx
-apply_pattern tpcnv_library
-
-
-# Create a dictionary for the persistent representation 
-#of transient classes
-private
-
-apply_pattern lcgdict dict=TrigTruthEventTPCnv  \
-  selectionfile=selection.xml \
-  headerfiles="../TrigTruthEventTPCnv/TrigTruthEventTPCnvDict.h"
-
-apply_pattern lcgdict dict=OLD_TrigTruthEventTPCnv  \
-  selectionfile=OLD_selection.xml \
-  headerfiles="../TrigTruthEventTPCnv/TrigTruthEventTPCnvDict.h"
-
-end_private
-
-
-
-private
-use TestTools      TestTools-*         AtlasTest 
-apply_pattern UnitTest_run unit_test=TrigIDHitStatsCnv_p1
-apply_pattern UnitTest_run unit_test=TrigInDetTrackTruthCnv_p1
-apply_pattern UnitTest_run unit_test=TrigInDetTrackTruthMapCnv_p1
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/cmt/Makefile.RootCore b/Trigger/TrigValidation/TrigAnalysisTest/cmt/Makefile.RootCore
deleted file mode 100644
index 6ff70536c134a6879da4058beb60acd6d9f31d17..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigAnalysisTest/cmt/Makefile.RootCore
+++ /dev/null
@@ -1,58 +0,0 @@
-# this makefile also gets parsed by shell scripts
-# therefore it does not support full make syntax and features
-# edit with care
-
-# for full documentation check:
-# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/RootCore#Package_Makefile
-
-
-# the name of the package:
-PACKAGE              = TrigAnalysisTest
-
-# the libraries to link with this one:
-PACKAGE_PRELOAD      = 
-
-# additional compilation flags to pass (not propagated to dependent packages):
-PACKAGE_CXXFLAGS     = 
-
-# additional compilation flags to pass (propagated to dependent packages):
-PACKAGE_OBJFLAGS     = 
-
-# additional linker flags to pass (for compiling the library):
-PACKAGE_LDFLAGS      = 
-
-# additional linker flags to pass (for compiling binaries):
-PACKAGE_BINFLAGS     = 
-
-# additional linker flags to pass (propagated to client libraries):
-PACKAGE_LIBFLAGS     = 
-
-# the list of packages we depend on:
-PACKAGE_DEP          = xAODRootAccess TrigConfxAOD TrigDecisionTool xAODTrigMissingET xAODJet xAODTrigBphys xAODMuon
-
-# the list of packages we use if present, but that we can work without :
-PACKAGE_TRYDEP       = 
-
-# list pattern of scripts to link directly into binary path:
-PACKAGE_SCRIPTS      = 
-
-# whether to use pedantic compilation:
-PACKAGE_PEDANTIC     = 1
-
-# whether to turn *off* optimization (set to dict to do it only for
-# dictionaries):
-PACKAGE_NOOPT        = 0
-
-# whether to build no library (needs to be set if no source files are
-# present):
-PACKAGE_NOCC         = 0
-
-# whether we build a reflex dictionary:
-PACKAGE_REFLEX       = 0
-
-# the list of all unit tests that should be called in recursive testing,
-# i.e. in unit tests that call other unit tests
-# for that unit tests need to pass on all machines, and run very fast
-PACKAGE_RECURSIVE_UT = 
-
-include $(ROOTCOREDIR)/Makefile-common
diff --git a/Trigger/TrigValidation/TrigAnalysisTest/cmt/requirements b/Trigger/TrigValidation/TrigAnalysisTest/cmt/requirements
deleted file mode 100644
index eb5b9b7b5b6e2f1206c2b4c053641ce1cae8812e..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigAnalysisTest/cmt/requirements
+++ /dev/null
@@ -1,60 +0,0 @@
-package TrigAnalysisTest
-
-# =====================================================================
-#
-# This is the TrigAnalysisTest
-#
-# =====================================================================
-
-author John Baines <j.baines@rl.ac.uk>
-author Simon george <S.George@rhul.ac.uk>
-author Ricardo Goncalo <r.goncalo@rhul.ac.uk>
-#current contact Patrick Czodrowski <czodrows@cern>
-
-public
-use AtlasPolicy 		    AtlasPolicy-*
-#try if we can use AtlasTriggerRunTime instead of AtlasAnalysisRunTime
-use AtlasTriggerRunTime             AtlasTriggerRunTime-*
-#use AtlasAnalysisRunTime 	     AtlasAnalysisRunTime-*
-#use RunTimeTester          	     RunTimeTester-*             Tools
-use TestPolicy              	    TestPolicy-*
-use AthenaBaseComps         	    AthenaBaseComps-*		 Control
-use GaudiInterface          	    GaudiInterface-*  		 External
-use TrigDecisionTool        	    TrigDecisionTool-* 		 Trigger/TrigAnalysis
-
-
-apply_pattern declare_python_modules files="../python/__init__.py ../python/PassedTriggerFilter.py"
-
-#declare test job options	 
-apply_pattern declare_joboptions files="*.py" 
-
-#RTT declarations
-apply_pattern declare_scripts files="../Testing/*.sh ../bin/*.py"
-
-apply_pattern declare_runtime extras="../test/*.xml \
-                                      ../share/*py \
-                                      ../Testing/*.conf \
-                                      ../bin/RttScriptRunner_TrigAnalysisTest.py \ 
-                                      ../bin/CheckLog_TrigAnalysisTest.py \
-				      ../bin/CheckForHLTChainAllZero_TrigAnalysisTest.py \
-				      ../bin/CheckForHLTTEAllZero_TrigAnalysisTest.py \
-				      ../bin/CheckForL1AllZero_TrigAnalysisTest.py \
-				      ../bin/CheckForExpertMonHistZero_TrigAnalysisTest.py \
-                                      ../bin/LogTail_TrigAnalysisTest.py \
-                                      ../bin/TruncateLog_TrigAnalysisTest.py \
-                                      ../python/ValgrindAnalysisScript_TrigAnalysisTest.py \
-                                      ../python/ValGrindPostScript_TrigAnalysisTest.py \
-                                      ../bin/checkFileTrigSize_RTT.py"
-
-#No wildcard, want to avoid RootCoreTestHarness.cxx in cmt
-apply_pattern dual_use_library files="../Root/BasicTriggerFired.cxx ../Root/Run1BStoxAODTrigger.cxx ../Root/TestFactory.cxx ../src/*.cxx"
-macro TrigAnalysisTest_TestConfiguration "../test/TrigAnalysisTest_TestConfiguration.xml"  AthAnalysisBase "../test/TrigAnalysisTest_AthAnalysisBaseTestConfiguration.xml"
-
-private
-apply_pattern validate_xml
-use AtlasROOT 			AtlasROOT-* 			External
-use TrigConfxAOD 		TrigConfxAOD-*                  Trigger/TrigConfiguration
-use xAODTrigMissingET           xAODTrigMissingET-*             Event/xAOD
-use xAODMuon                    xAODMuon-*                      Event/xAOD
-use xAODJet                     xAODJet-*                       Event/xAOD
-use xAODTrigBphys               xAODTrigBphys-*                 Event/xAOD
diff --git a/Trigger/TrigValidation/TrigBjetValidation/cmt/requirements b/Trigger/TrigValidation/TrigBjetValidation/cmt/requirements
deleted file mode 100644
index dba601f7ccb006f342ee04427d6440077eca4ca0..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigBjetValidation/cmt/requirements
+++ /dev/null
@@ -1,23 +0,0 @@
-package TrigBjetValidation
-
-author Andrea Coccaro <Andrea.Coccaro@ge.infn.it>
-
-
-# ============================================================================================
-public
-
-use     AtlasPolicy             AtlasPolicy-*
-use 	AtlasTriggerRunTime	AtlasTriggerRunTime-*
-
-# ============================================================================================
-private
-
-use	TestPolicy		TestPolicy-*
-apply_pattern validate_xml
-
-# ============================================================================================
-public
-
-apply_pattern declare_runtime extras="../test/TrigBjetValidation_TestConfiguration.xml ../share/TrigBjetValidation_RTT_topOptions.py ../share/TrigBjetValidation_Histos"
-macro TrigBjetValidation_TestConfiguration "../test/TrigBjetValidation_TestConfiguration.xml"
-apply_pattern declare_joboptions files="TrigBjetValidation_RTT_topOptions.py"
diff --git a/Trigger/TrigValidation/TrigBphysValidation/cmt/requirements b/Trigger/TrigValidation/TrigBphysValidation/cmt/requirements
deleted file mode 100644
index 9bb3a0c6bf7bbc6caa02d3fb5babb7f9e1431465..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigBphysValidation/cmt/requirements
+++ /dev/null
@@ -1,33 +0,0 @@
-package TrigBphysValidation
-
-author J.Kirk <hartj@cern.ch>
-
-use AtlasPolicy	     AtlasPolicy-*
-use GaudiInterface   GaudiInterface-*    External
-use AtlasROOT        AtlasROOT-*         External
-use AtlasCLHEP     AtlasCLHEP-* External
-
-use StoreGate        StoreGate-*         Control
-use AthenaBaseComps  AthenaBaseComps-*   Control
-
-
-
-private
-
-end_private
-
-## if you want to get debug symbols, uncomment the following 2 lines
-## (don't put this into production code !)
-#macro cppdebugflags '$(cppdebugflags_s)'
-#macro_remove componentshr_linkopts "-Wl,-s"
-
-public
-
-apply_tag ROOTMathLibs
-
-#
-apply_pattern dual_use_library files= " *.cxx "
-
-
-
-apply_pattern declare_joboptions files="*.txt *.py"
diff --git a/Trigger/TrigValidation/TrigEgammaValidation/cmt/requirements b/Trigger/TrigValidation/TrigEgammaValidation/cmt/requirements
deleted file mode 100755
index 5e54aad3730b82e3ff526a8b753ab52de21b37b7..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigEgammaValidation/cmt/requirements
+++ /dev/null
@@ -1,39 +0,0 @@
-package TrigEgammaValidation
-
-author Danilo Enoque Ferreira de Lima <Danilo.Enoque.Ferreira.De.Lima@cern.ch>
-author Denis Oliveira Damazio <Denis.Oliveira.Damazio@cern.ch>
-author Carlos Chavez Barajas <carlo.chavez.barajas@cern.ch>
-#private
-#apply_tag no_genconf
-#end_private
-
-# For RTT
-public
-
-use AtlasPolicy AtlasPolicy-*                                 
-#use GaudiInterface  GaudiInterface-*    External
-use AtlasTriggerRunTime            AtlasTriggerRunTime-*
-
-#library AthExHelloWorld *.cxx -s=components *.cxx
-#apply_pattern component_library
-#details about the component_library and dual_library patterns
-# at http://www.cern.ch/Atlas/GROUPS/SOFTWARE/OO/architecture/General/Documentation/PackageStructure.txt
-
-
-macro TrigEgammaValidation_TestConfiguration "../test/TrigEgammaValidation_TestConfiguration.xml"
-
-apply_pattern declare_runtime files="*.C *.py *.root *.xml" extras="-s=../test TrigEgammaValidation_TestConfiguration.xml"
-#apply_pattern declare_runtime extras="../test/TrigEgammaValidation_TestConfiguration.xml ../share/TrigEgammaValidation_RTT_*.py" 
-
-apply_pattern declare_joboptions files="TrigInDetValidation_RTT_*.py testAthenaTrigRDOtoAOD_RTT.py testNavZeeTPExample.py TrigEgammaValidation_RTT_Chains.py"
-
-apply_pattern declare_docs  files="-s=../doc/Summary-dev *.php *.html content.xml style.css *.gif"
-
-private
-#use AthenaBaseComps AthenaBaseComps-*   Control
-#add validation of RTT xml file
-use TestPolicy TestPolicy-*
-apply_pattern validate_xml
-apply_pattern declare_python_modules files="*.py"
-end_private
-
diff --git a/Trigger/TrigValidation/TrigInDetValidation/cmt/requirements b/Trigger/TrigValidation/TrigInDetValidation/cmt/requirements
deleted file mode 100755
index 6942c40f83c1867e75299ad4e9b0fa2c94c50df7..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigInDetValidation/cmt/requirements
+++ /dev/null
@@ -1,19 +0,0 @@
-package TrigInDetValidation
-
-private
-
-use TestPolicy TestPolicy-*
-apply_pattern validate_xml
-apply_pattern declare_python_modules files="*.py"
-
-public
-
-use AtlasPolicy AtlasPolicy-*
-                                   
-use AtlasTriggerRunTime            AtlasTriggerRunTime-*
-
-apply_pattern declare_runtime extras="../test/TrigInDetValidation_TestConfiguration.xml ../share/TrigInDetValidation_RTT_*.py ../TIDAbuild" 
-
-macro TrigInDetValidation_TestConfiguration "../test/TrigInDetValidation_TestConfiguration.xml"
-
-apply_pattern declare_joboptions files="TrigInDetValidation_RTT_*.py"
diff --git a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_Common.py b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_Common.py
index ff8abd3005668e668b60b2e52018a67e872e8946..cd20dceff058836ff54bfe04522618b5bede7702 100644
--- a/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_Common.py
+++ b/Trigger/TrigValidation/TrigInDetValidation/share/TrigInDetValidation_RTT_Common.py
@@ -131,6 +131,7 @@ InDetFlags.doSpacePointFormation=doIDNewTracking
 InDetFlags.doParticleCreation=doIDNewTracking
 InDetFlags.doSecVertexFinder=False
 InDetFlags.doV0Finder=False
+InDetFlags.doSlimming=False
 InDetFlags.preProcessing=doIDNewTracking
 InDetFlags.postProcessing=doIDNewTracking
 
diff --git a/Trigger/TrigValidation/TrigInDetValidationLight/cmt/requirements b/Trigger/TrigValidation/TrigInDetValidationLight/cmt/requirements
deleted file mode 100755
index 02fdec116306e77b652cda0a4cdff22144f1de99..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigInDetValidationLight/cmt/requirements
+++ /dev/null
@@ -1,21 +0,0 @@
-package TrigInDetValidationLight
-
-private
-
-use TestPolicy TestPolicy-*
-
-# use TrigInDetValidation TrigInDetValidation-* Trigger/TrigValidation
-
-apply_pattern validate_xml
-
-
-public
-
-use AtlasPolicy AtlasPolicy-*
-                                   
-use AtlasTriggerRunTime            AtlasTriggerRunTime-*
-
-apply_pattern declare_runtime extras="../test/TrigInDetValidationLight_TestConfiguration.xml"
-
-macro TrigInDetValidationLight_TestConfiguration "../test/TrigInDetValidationLight_TestConfiguration.xml"
-
diff --git a/Trigger/TrigValidation/TrigInDetValidationWeb/cmt/requirements b/Trigger/TrigValidation/TrigInDetValidationWeb/cmt/requirements
deleted file mode 100755
index 54f904ae5faa91c560d56fe76054d3e0364f6265..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigInDetValidationWeb/cmt/requirements
+++ /dev/null
@@ -1,13 +0,0 @@
-package TrigInDetValidationWeb
-
-private
-
-use TestPolicy TestPolicy-*
-
-public
-
-use AtlasPolicy AtlasPolicy-*
-                                   
-use AtlasTriggerRunTime            AtlasTriggerRunTime-*
-
-apply_pattern declare_runtime extras="../share/TIDAWeb"
diff --git a/Trigger/TrigValidation/TrigJetValidation/cmt/requirements b/Trigger/TrigValidation/TrigJetValidation/cmt/requirements
deleted file mode 100644
index 624664235622cdd9197275663eb09bfc1e1a449c..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigJetValidation/cmt/requirements
+++ /dev/null
@@ -1,41 +0,0 @@
-package TrigJetValidation
-
-author Valentinos Christodoulou <valentinos.christodoulou@cern.ch>
-
-public
-use AtlasPolicy    	AtlasPolicy-*
-use AtlasTriggerRunTime AtlasTriggerRunTime-*
-
-#apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_joboptions files="*.py"
-
-#library TrigJetValidation *.cxx -s=components *.cxx                              
-#apply_pattern component_library                                              
-
-#RTT declarations
-macro TrigJetValidation_TestConfiguration "../test/TrigJetValidation_TestConfiguration.xml"       
-apply_pattern declare_runtime extras= "../test/TrigJetValidation_TestConfiguration.xml \
-                                       ../python/FileComparatorRunnerJet.py \
-                                       ../python/fileComparatorJet.py \
-                                       ../python/Diagnostics.py \
-                                       ../python/helperFunctions.py \
-                                       ../python/AtlasStyle.py \
-                                       ../python/plottingMacro.py \
-                                       ../python/clustersAndCells.py \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/HLTChain_ref_devval.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/HLTChain_ref_dev.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/HLTChain_ref_20.2.X.Y.Z-VAL.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/HLTTE_ref_devval.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/HLTTE_ref_dev.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/HLTTE_ref_20.2.X.Y.Z-VAL.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/clusters_ref_devval.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/clusters_ref_dev.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/clusters_ref_20.2.X.Y.Z-VAL.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/cells_ref_devval.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/cells_ref_dev.txt \
- 				       /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/references/RTT/TrigJetValidation/cells_ref_20.2.X.Y.Z-VAL.txt"
-
-private
-use TestPolicy          TestPolicy-*
-apply_pattern validate_xml
diff --git a/Trigger/TrigValidation/TrigMuonValidation/cmt/requirements b/Trigger/TrigValidation/TrigMuonValidation/cmt/requirements
deleted file mode 100644
index e11f34157f98402f7429049fd9a8641422287142..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigMuonValidation/cmt/requirements
+++ /dev/null
@@ -1,18 +0,0 @@
-package TrigMuonValidation
-
-private
-
-use TestPolicy TestPolicy-*
-apply_pattern validate_xml
-
-public
-
-use AtlasPolicy AtlasPolicy-*
-
-use AtlasTriggerRunTime AtlasTriggerRunTime-*
-
-#macro TrigMuonValidation_TestConfiguration "../test/TrigMuonValidation_TestConfiguration.xml"
-
-#apply_pattern declare_runtime extras= "../test/TrigMuonValidation_TestConfiguration.xml ../share/TrigMuonValidation_RTT_options.py ../share/TrigMuonValidation_MonitorEff.py ../share/TrigMuonValidation_CreateEfficiencies.py ../share/TrigMuonValidation_drawEfficiencies.C"
-
-apply_pattern declare_joboptions files="TrigMuonValidation_RTT_*.py TrigMuonValidation_CreateEfficiencies.py"
diff --git a/Trigger/TrigValidation/TrigP1Test/cmt/requirements b/Trigger/TrigValidation/TrigP1Test/cmt/requirements
deleted file mode 100755
index 0cf6b7fd0c778526e3ad82b894f20d5dc42d7c70..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigP1Test/cmt/requirements
+++ /dev/null
@@ -1,42 +0,0 @@
-package TrigP1Test
-
-use AtlasPolicy 		AtlasPolicy-*
-use RunTimeTester		RunTimeTester-*		Tools			-no_auto_imports
-use TestPolicy          	TestPolicy-*
-use TrigValTools                TrigValTools-*          Trigger/TrigValidation	-no_auto_imports
-
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
-
-apply_pattern declare_scripts files="../share/*.sh \
-../share/testMonHistOH.py \
-../share/part_lhl2ef_fix.py \
-../share/setMagFieldCurrents.py \
-../share/part_get_runnumber.py \
-../share/trigp1test_athenaHLT.py \
-../Testing/*.sh \
-../Testing/splitlog.py"
-
-
-
-# RTT declarations
-apply_pattern declare_runtime extras="../test/TrigP1Test_TestConfiguration.xml \ 
-../Testing/*.trans \
-../Testing/*.conf \
-../python/RunMsgFinder.py \
-../python/RttScriptRunner.py \
-../python/RootComp.py \
-../python/RegTest.py \
-../python/CheckLog.py \
-../python/CheckStatusCode.py \
-../python/LogTail.py \
-../python/DeleteRaw.py \
-../python/TruncateLog.py"
-
-
-macro TrigP1Test_TestConfiguration "../test/TrigP1Test_TestConfiguration.xml"
-
-private
-apply_pattern validate_xml
-
-end_private
diff --git a/Trigger/TrigValidation/TrigP1Test/share/runHLT_standaloneRTT_data.py b/Trigger/TrigValidation/TrigP1Test/share/runHLT_standaloneRTT_data.py
index 838e2b9a64789551ece7d6f0a5b2c4aa3dbe0e06..05aa4c6116bb0f0090f02637a4edb145b7889159 100644
--- a/Trigger/TrigValidation/TrigP1Test/share/runHLT_standaloneRTT_data.py
+++ b/Trigger/TrigValidation/TrigP1Test/share/runHLT_standaloneRTT_data.py
@@ -8,7 +8,7 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags as acf
 import os,commands
 def getEosDirectoryList(path,lbRange,sfoRange):
 
-    cmd = '/afs/cern.ch/project/eos/installation/pro/bin/eos.select -b ls %s/ ' % (path)
+    cmd = 'eos -b ls %s/ ' % (path)
     file = []
     pool=os.getenv("WORKDIR")
     if pool == "NONE":
diff --git a/Trigger/TrigValidation/TrigP1Test/share/testAthenaP1RDO.py b/Trigger/TrigValidation/TrigP1Test/share/testAthenaP1RDO.py
index 3993a0040266f0f2593b7debfdc86ce66b449bea..375ef6f2fe6f9e825d60c56d6d1556d3befdd3d4 100644
--- a/Trigger/TrigValidation/TrigP1Test/share/testAthenaP1RDO.py
+++ b/Trigger/TrigValidation/TrigP1Test/share/testAthenaP1RDO.py
@@ -29,7 +29,7 @@ if not ('PoolRDOInput' in dir()):
 
 import os,commands
 def getEosDirectoryList(path,fileRange):
-    cmd = '/afs/cern.ch/project/eos/installation/0.1.0-22d/bin/eos.select -b ls %s/ ' % (path)
+    cmd = 'eos -b ls %s/ ' % (path)
     files = []
     for i in commands.getoutput(cmd).split('\n'):
         fileNumber = i[i.rfind(".pool.root")-5:i.rfind(".pool.root")]
diff --git a/Trigger/TrigValidation/TrigP1Test/share/trigp1test_athenaHLT.py b/Trigger/TrigValidation/TrigP1Test/share/trigp1test_athenaHLT.py
index 2b1745fcab46ba9605287d73120aeedd73843541..dbf94c9143344e17f8debbf80f62dafc7959e923 100755
--- a/Trigger/TrigValidation/TrigP1Test/share/trigp1test_athenaHLT.py
+++ b/Trigger/TrigValidation/TrigP1Test/share/trigp1test_athenaHLT.py
@@ -18,7 +18,7 @@ def get_file_list( DATAPATH ) :
         new_paths = []
         for path in paths :
           subdirectories = []
-          cmd = [ '/afs/cern.ch/project/eos/installation/atlas/bin/eos.select', 'ls', path ]
+          cmd = [ 'eos', 'ls', path ]
           eos_ls = Popen( args = cmd, bufsize = 1, shell = False, stdout = PIPE, stderr = STDOUT )
           while eos_ls.poll() is None :
             line = eos_ls.stdout.readline()
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
index afb053fcc79973dfc3e64a2b497a935dac436b2b..ac60037b85223f6333d04c3d9e22d25452dd65ee 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
+++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt
@@ -33,33 +33,42 @@ atlas_add_component( TrigUpgradeTest
 		     AthenaBaseComps TrigUpgradeTestLib )
 
 
-atlas_add_test( GraphView1 SCRIPT scripts/GraphView.sh
+atlas_add_test( GraphView1 SCRIPT test/test_graph_view.sh
                 ENVIRONMENT THREADS=1     )
-atlas_add_test( GraphView2 SCRIPT scripts/GraphView.sh
+atlas_add_test( GraphView2 SCRIPT test/test_graph_view.sh
                 ENVIRONMENT THREADS=2     )
-atlas_add_test( GraphView64 SCRIPT scripts/GraphView.sh
+atlas_add_test( GraphView64 SCRIPT test/test_graph_view.sh
                 ENVIRONMENT THREADS=64              )
 
 # out untill we find a way to properly invoke tests from other packages
-# atlas_add_test( creatingEVTest SCRIPT  forward.sh ViewAlgsTest/scripts/creatingEVTest.sh )
+# atlas_add_test( creatingEVTest SCRIPT  forward.sh ViewAlgsTest/test/creatingEVTest.sh )
 
-atlas_add_test( mergeTest SCRIPT scripts/mergeTest.sh)
+atlas_add_test( merge SCRIPT test/test_merge.sh)
 
-atlas_add_test( IDRunMC     SCRIPT scripts/IDRunMC.sh
+#not working at the moment
+#atlas_add_test( IDRunMC     SCRIPT test/test_id_run_mc.sh
+#                PROPERTIES TIMEOUT 500 
+#              )
+
+atlas_add_test( IDRunData     SCRIPT test/test_id_run_data.sh
                 PROPERTIES TIMEOUT 500 
               )
 
-#atlas_add_test( IDRunData     SCRIPT scripts/IDRunData.sh
+#atlas_add_test( caloRunData   SCRIPT test/test_calo_run_data.sh
 #                PROPERTIES TIMEOUT 500 
 #              )
+# replaced by complete egamma test
 
-atlas_add_test( caloRunData   SCRIPT scripts/caloRunData.sh
+atlas_add_test( egammaRunData   SCRIPT test/test_egamma_run_data.sh
                 PROPERTIES TIMEOUT 500 
               )
 
-atlas_add_test( EmuL1DecodingTest SCRIPT scripts/EmuL1DecodingTest.sh)
 
-atlas_add_test( DataL1DecodingTest SCRIPT scripts/DataL1DecodingTest.sh )
+atlas_add_test( idCaloRunData   SCRIPT test/test_id_calo_run_data.sh
+                PROPERTIES TIMEOUT 500 
+              )
+
+atlas_add_test( EmuL1Decoding SCRIPT test/test_emu_l1_decoding.sh)
 
 atlas_install_joboptions( share/*.py )
 atlas_install_python_modules( python/*.py )
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..f845264dd703fa0290b6447e6edddcdab5d95e5e
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/HLTCFConfig.py
@@ -0,0 +1,92 @@
+# Classes to configure the CF graph, via strings
+    
+class Sequence:
+    def __init__(self, name, Hypo, Algs=[], Inputs=[], Outputs=[]):
+        self.name = name
+        self.algs_name = Algs
+        self.hypo = Hypo
+        self.inputs = Inputs
+        self.outputs = Outputs
+        
+
+    def setInput(self, Inputs):
+        self.inputs=Inputs
+
+    def setOutput(self, Outputs):
+        self.outputs=Outputs
+
+class ChainStep:
+     def __init__(self, name,  Sequence, Threshold):
+        self.name = name        
+        self.sequence = Sequence
+        self.threshold = Threshold
+
+
+class Step:
+    def __init__(self, name, FilterAlg, RecoAlgs, Hypo):
+        self.name = name        
+        self.filter = FilterAlg
+        self.algs = RecoAlgs
+        self.hypo=Hypo
+    def __str__(self):
+        return "%s with filter %s and algs [%s], [%s]"%(self.name, self.filter, ', '.join(map(str, self.algs)), self.hypo)
+
+
+class Chain:
+     def __init__(self, name, Seed, ChainSteps=[]):
+         self.name = name
+         self.seed=Seed
+         self.steps=ChainSteps
+         #         self.group_seed=filter(lambda x: x.isalpha(), Seed)#saving only letters
+         self.group_seed = Seed[0:4]
+                
+class Alg:
+    def __init__(self, name, Inputs=[],  Outputs=[]):
+        self.name = name
+        self.inputs = Inputs
+        self.outputs = Outputs
+        #        print "Constructor%s with inputs [%s] and outputs [%s]"%(self.name,', '.join(map(str, self.inputs)),', '.join(map(str, self.outputs)))
+
+    def __str__(self):
+        return "%s with inputs [%s] and outputs [%s]"%(self.name,', '.join(map(str, self.inputs)),', '.join(map(str, self.outputs)))
+
+    def addInput(self, Input):
+        self.inputs.append(Input)
+
+    def addOutput(self, Output):
+        self.outputs.append(Output)
+ 
+
+class RecoAlg(Alg):
+    def __init__(self, name, Input, Output, FileName="noreco.dat"):
+        Alg.__init__(self,name, Inputs=Input, Outputs=Output)
+        self.filename=FileName
+
+class HypoAlg(Alg):
+    def __init__(self, name, Input, Output):
+        Alg.__init__(self, name, Inputs=Input, Outputs=Output)
+        self.tools = []
+
+    def addHypoTool(self, name):
+        self.tools.append(name)
+
+
+class SequenceFilter(Alg):
+    def __init__(self, name, Inputs=[], Outputs=[], Chains=[]):
+        Alg.__init__(self,name, Inputs=Inputs, Outputs=Outputs)
+        self.chains=Chains
+        
+       
+    def addChain(self, Chain):
+        self.chains.append(Chain)
+
+    def __str__(self):
+        return "%s with inputs [%s] and outputs [%s], chains = [%s]"%(self.name,', '.join(map(str, self.inputs)),', '.join(map(str, self.outputs)),', '.join(map(str, self.chains)))
+
+
+class InputMaker(Alg):
+    def __init__(self, name, Input, Output):
+        Alg.__init__(self, name, Inputs=Input, Outputs=Output)
+
+        
+        
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py b/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py
index 109dcea624d72535bba56f325d3149f3231dc7f7..6f038629000b6aed836ea6075067a53d4fd4fca2 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py
@@ -1,4 +1,6 @@
-
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
 
 def writeEmulationFiles(data):
     """ Writes emulation files. key in the dict is a file name (+.dat), list which is value of each dict el is enetered into the file, one el. per line"""
@@ -8,5 +10,112 @@ def writeEmulationFiles(data):
                 f.write(event)
                 f.write("\n")
 
+# Testing menu used in the L1 decoders
+class MenuTest:
+    CTPToChainMapping = ["0:HLT_e3_etcut",
+                         "0:HLT_g5_etcut",
+                         "1:HLT_e7_etcut",
+                         "23:HLT_2e3_etcut",
+                         "15:HLT_mu6",
+                         "33:HLT_2mu6",
+                         "15:HLT_mu6idperf",
+                         "42:HLT_e15mu4"]
+
+    EMThresholdToChainMapping = ["EM3 : HLT_e3_etcut",
+                                 "EM3 : HLT_g5_etcut",
+                                 "EM7 : HLT_e7_etcut",
+                                 "EM15 : HLT_e15mu4_etcut"]
+
+    MUThresholdToChainMapping = ["MU6 : HLT_mu6",
+                                 "MU6 : HLT_mu6idperf",
+                                 "MU4 : HLT_e15mu4"]
+
+
+# L1Decoder for bytestream
+from L1Decoder.L1DecoderConf import L1Decoder
+class L1DecoderTest(L1Decoder) :
+    def __init__(self, name='L1DecoderTest', *args, **kwargs):
+        super(L1DecoderTest, self).__init__(name, *args, **kwargs)
+
+        from TriggerJobOpts.TriggerFlags import TriggerFlags
+        from L1Decoder.L1DecoderMonitoring import CTPUnpackingMonitoring, RoIsUnpackingMonitoring
+        from L1Decoder.L1DecoderConf import CTPUnpackingTool, EMRoIsUnpackingTool, MURoIsUnpackingTool
+
+        # CTP unpacker
+
+        ctpUnpacker = CTPUnpackingTool(OutputLevel = self.OutputLevel,
+                                       ForceEnableAllChains = True)
+        ctpUnpacker.MonTool = CTPUnpackingMonitoring(512, 200)
+        # Hard-coded CTP IDs from v7 menu
+        ctpUnpacker.CTPToChainMapping = MenuTest.CTPToChainMapping
+        self.ctpUnpacker = ctpUnpacker
+
+        # EM unpacker
+        if TriggerFlags.doID() or TriggerFlags.doCalo():
+            emUnpacker = EMRoIsUnpackingTool(OutputLevel = self.OutputLevel)
+            emUnpacker.ThresholdToChainMapping = MenuTest.EMThresholdToChainMapping
+            emUnpacker.MonTool = RoIsUnpackingMonitoring( prefix="EM", maxCount=30 )
+            self.roiUnpackers += [emUnpacker]
+
+
+        # MU unpacker
+        if TriggerFlags.doMuon():
+            muUnpacker = MURoIsUnpackingTool(OutputLevel = self.OutputLevel)
+            muUnpacker.ThresholdToChainMapping = MenuTest.MUThresholdToChainMapping
+            muUnpacker.MonTool = RoIsUnpackingMonitoring( prefix="MU", maxCount=20 )
+            self.roiUnpackers += [muUnpacker]
+
+        self.Chains = "HLTChainsResult"
+
+
+# L1 emulation for RDO
+class L1EmulationTest(L1Decoder) :
+    def __init__(self, name='L1EmulationTest', *args, **kwargs):
+        super(L1EmulationTest, self).__init__(name, *args, **kwargs)
+
+        from TriggerJobOpts.TriggerFlags import TriggerFlags
+        from L1Decoder.L1DecoderConf import CTPUnpackingEmulationTool, RoIsUnpackingEmulationTool
+
+        self.RoIBResult = ""
+
+        data = {}
+        data['CTPEmulation'] = ['HLT_e3 HLT_g5 HLT_e7 HLT_2e3 HLT_mu6 HLT_2mu6 HLT_mu6idperf HLT_e15mu4',
+                                'HLT_e3 HLT_g5 HLT_mu6 HLT_2mu6 HLT_mu6idperf HLT_e15mu4',
+                                'HLT_e3 HLT_g5 HLT_e7 HLT_2e3 HLT_mu6 HLT_2mu6',
+                                'HLT_mu6 HLT_2mu6 HLT_mu6idperf HLT_e15mu4', ]   # just to see some change
+        data['RoIEmulation'] = ['1.3,2.9,2704088841,EM3,EM7; 1.2,3.1,2972524297,EM3,EM7,EM10,EM15; -3.2,-2.0,3103727387,MU0,MU4,MU6,MU8',
+                                '1.2,1.9,2733969453,MU0,MU4,MU6,MU8,MU10;2.2,1.0,2733969453,MU0,MU4,MU6',
+                                '-3.2,3.0,2704088841,MU0,MU4,MU6,MU8;3.0,1.6,2972524297,MU0,MU4',
+                                '1.3,1.9,3103727387,MU0,MU10;1.2,2.6,2733969453,MU6;-1.1,2.6,2972524297,MU6; -1.2,2.6,2704088842,MU20']
+
+        from TrigUpgradeTest.TestUtils import writeEmulationFiles
+        writeEmulationFiles(data)
+        ctpUnpacker = CTPUnpackingEmulationTool(OutputLevel = self.OutputLevel,
+                                                ForceEnableAllChains = True)
+        self.ctpUnpacker = ctpUnpacker
+        self += ctpUnpacker
+        # Hard-coded CTP IDs from v7 menu
+        self.ctpUnpacker.CTPToChainMapping = MenuTest.CTPToChainMapping
+
+        # EM unpacker
+        if TriggerFlags.doID() or TriggerFlags.doCalo():
+            emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool",
+                                                    Decisions = "EMRoIDecisions",
+                                                    OutputTrigRoIs = "EMRoIs",
+                                                    OutputLevel = self.OutputLevel,
+                                                    ThresholdToChainMapping = MenuTest.EMThresholdToChainMapping)
+            self.roiUnpackers += [emUnpacker]
+            print emUnpacker
+
+
+        # MU unpacker
+        if TriggerFlags.doMuon():
+            muUnpacker = RoIsUnpackingEmulationTool("MURoIsUnpackingTool",
+                                                    Decisions = "MURoIDecisions",
+                                                    OutputTrigRoIs = "MURoIs",
+                                                    OutputLevel=self.OutputLevel,
+                                                    ThresholdToChainMapping = MenuTest.MUThresholdToChainMapping)
+            self.roiUnpackers += [muUnpacker]
+
+        self.Chains="HLTChainsResult"
 
-                
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/scripts/DataL1DecodingTest.sh b/Trigger/TrigValidation/TrigUpgradeTest/scripts/DataL1DecodingTest.sh
deleted file mode 100755
index 56c20b088502c5324c1c81615fe0f5105c5926cc..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/scripts/DataL1DecodingTest.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env sh
-
-get_files -xmls LVL1config_Physics_pp_v5.xml
-ln -s /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/atn-test/data15_13TeV.00266904.physics_EnhancedBias.merge.RAW._lb0452._SFO-1._0001.1 input.data
-
-athena.py --threads=1 L1Decoder/decodeBS.py
-
-cat <<EOF > hasStat.C
-void hasStat( const char* hname) {
-
-  TH1* h = (TH1*)_file0->Get( hname );
-  if ( h == 0 ) {
-     cout << "Missing histogram " << hname << "\n";
-     exit (EXIT_FAILURE);
-  }
-  Long_t entries = h->GetEntries();
-  if ( entries == 0 ) {
-     cout << "Histogram " << hname << " has ) entries \n";
-     exit (EXIT_FAILURE);
-  }
-  cout << "Histogram " << hname << " has " << entries << " entries \n";
-}
-EOF
-
-
-root -b -q expert-monitoring.root 'hasStat.C("L1Decoder/TAVItems")'
-root -b -q expert-monitoring.root 'hasStat.C("L1Decoder/Chains")'
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/scripts/EmuL1DecodingTest.sh b/Trigger/TrigValidation/TrigUpgradeTest/scripts/EmuL1DecodingTest.sh
deleted file mode 100755
index 30f0f8b3de3db5f898e331b6c55ed8fbefb3fca4..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/scripts/EmuL1DecodingTest.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env sh
-#get_files -xmls LVL1config_Physics_pp_v5.xml
-#get_files -data CTPEmulation.dat
-#ln -s /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/atn-test/data15_13TeV.00266904.physics_EnhancedBias.merge.RAW._lb0452._SFO-1._0001.1 input.data
-
-athena.py --threads=1 TrigUpgradeTest/EmuL1DecodingTest.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/scripts/IDRunData.sh b/Trigger/TrigValidation/TrigUpgradeTest/scripts/IDRunData.sh
deleted file mode 100755
index 59d2c55b88c351d391f6dbcf1ccbbd82f9caf060..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/scripts/IDRunData.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env sh
-athena.py --threads=1 TrigUpgradeTest/ID_RawDataMT_Trigger.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/scripts/IDRunMC.sh b/Trigger/TrigValidation/TrigUpgradeTest/scripts/IDRunMC.sh
deleted file mode 100755
index ec869af5fc2965a0a7267332050e62b43f3a9b6c..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/scripts/IDRunMC.sh
+++ /dev/null
@@ -1 +0,0 @@
-athena.py --threads=1 TrigUpgradeTest/BasicMTTrackingTrigger.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/scripts/caloRunData.sh b/Trigger/TrigValidation/TrigUpgradeTest/scripts/caloRunData.sh
deleted file mode 100755
index 63891c2879f055204117581bd8b4e3a8e7037f8a..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/scripts/caloRunData.sh
+++ /dev/null
@@ -1 +0,0 @@
-athena.py --threads=1 TrigT2CaloEgamma/FFL2CaloEgamma.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/scripts/menuRun.sh b/Trigger/TrigValidation/TrigUpgradeTest/scripts/menuRun.sh
deleted file mode 100755
index 9a8e40320d7f4b89ad3c54ab034742d9b8f3d85e..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/scripts/menuRun.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-get_files -data menuData.dat
-get_files -data muonRoIData.dat
-get_files -xmls HLTTestMenu.xml
-athena.py --threads=1 ViewAlgsTest/menuRun.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/BasicMTTrackingTrigger.py b/Trigger/TrigValidation/TrigUpgradeTest/share/BasicMTTrackingTrigger.py
deleted file mode 100644
index 45573f59e419829d4a35651dc5667a4d586d2b56..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/BasicMTTrackingTrigger.py
+++ /dev/null
@@ -1,280 +0,0 @@
-#
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-
-# an example of minimal jO based on RecExCommon configuration running the FastTrackFinder 
-# to find tracks in predefined RoIs
-# 20/2/2017 Jiri.Masik@manchester.ac.uk
-#
-# athena.py -l DEBUG --threads=1 BasicMTTrackingTrigger.py 2>&1 | tee log
-# in the environment of
-# asetup 20.8.X-VAL,r2017-02-06,here
-# /afs/cern.ch/work/m/masik/public/id-data-ftf
-# The directory contains 
-# LVL1config_Physics_pp_v5.xml   <-the version recommended on the twiki
-# caloRoIData.dat     <-different version - the twiki recipe using sed
-# does not replace ; by a newline
-# source/Trigger/TrigAlgorithms/TrigFastTrackFinder
-# with the mods to the configuration of the TrigOnlineSpacePointTool
- 
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-from AthenaCommon.AlgScheduler import AlgScheduler
-AlgScheduler.CheckDependencies( True )
-AlgScheduler.OutputLevel( VERBOSE )
-AlgScheduler.ShowDataDependencies( True )
-AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
-
-
-## get a handle on the ServiceManager
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-from SGComps.SGCompsConf import SGInputLoader
-topSequence += SGInputLoader( )
-
-
-from TrigConfigSvc.TrigConfigSvcConf import TrigConf__LVL1ConfigSvc
-from TrigConfigSvc.TrigConfigSvcConfig import findFileInXMLPATH
-from TriggerJobOpts.TriggerFlags import TriggerFlags
-
-l1svc = TrigConf__LVL1ConfigSvc("LVL1ConfigSvc")
-l1svc.XMLMenuFile = findFileInXMLPATH(TriggerFlags.inputLVL1configFile())
-svcMgr += l1svc
-
-
-from AthenaCommon.Logging import logging 
-log = logging.getLogger("BasicMTTrackingTrigger.py")
-
-#--------------------------------------------------------------
-# Private Application Configuration options
-#--------------------------------------------------------------
-# Load "user algorithm" top algorithms to be run, and the libraries that house them
-
-def setOutput(obj, prop, name):
-    setattr(obj, prop, name)
-    setattr(obj, prop+"Aux", name+"Aux.")
-
-def getOutput(obj, prop):
-    try:
-        return getattr(obj, prop)
-    except:
-        return obj.getDefaultProperty(prop)
-    raise "Error in reading property " + prop + " from " + obj
- 
-# def genMenuAlg(name, inputHypos, inputChains):
-#     assert inputHypos != None, 'Alg to take hypo putput from is missing'
-#     assert inputChains != None, 'Alg to take chain decisions from is missing'
-#     log.info(inputChains, inputHypos)
-#     from ViewAlgs.ViewAlgsConf import MenuAlg
-#     menuAlg = MenuAlg(name)
-#     menuAlg.HypoDecisions = getOutput(inputHypos, "OutputDecisions")
-#     menuAlg.InputChainDecisions = getOutput(inputChains,"OutputChainDecisions")
-#     setOutput(menuAlg, "OutputDecisions", name+"RoIs")
-#     setOutput(menuAlg, "OutputChainDecisions", name+"Chains")
-#     return menuAlg
-
-
-
-#minimal RecExCommon setup
-
-from RecExConfig.RecFlags import rec
-rec.doESD=False
-rec.doAOD=False
-rec.doWriteESD=False
-rec.doWriteAOD=False
-rec.doWriteTAG=False
-
-rec.doForwardDet=False
-rec.doInDet=True
-rec.doMuon=False
-rec.doCalo=False
-rec.doCaloRinger=False     
-rec.doEgamma=False
-rec.doMuonCombined=False
-rec.doJetMissingETTag=False
-rec.doTau=False
-rec.doTruth=False
-
-rec.doForwardDet=False
-rec.doMuonCombined=False
-rec.doJetMissingETTag=False
-rec.doTau=False
-rec.doTrigger=False
-
-#disable perfmon  (avoids a crash in the finalization)
-rec.doPerfMon.set_Value_and_Lock( False )
-rec.doDetailedPerfMon.set_Value_and_Lock( False )
-rec.doSemiDetailedPerfMon.set_Value_and_Lock( False )
-from PerfMonComps.PerfMonFlags import jobproperties
-jobproperties.PerfMonFlags.doMonitoring.set_Value_and_Lock( False )
-jobproperties.AthenaCommonFlags.FilesInput=["root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"]
-
-
-from MuonRecExample.MuonRecFlags import muonRecFlags
-muonRecFlags.Enabled.set_Value_and_Lock(False)
-
-#disable all recAlgs
-from RecExConfig.RecAlgsFlags import recAlgs
-flags = {}
-flags.update(recAlgs.__dict__)
-for domethod in flags:
-  if domethod.startswith('do'):     # and domethod is not 'doTrigger':
-    runlockon = recAlgs.__dict__[domethod]
-    runlockon.set_Value_and_Lock(False)
-
-
-include("RecExCommon/RecExCommon_topOptions.py")
-
-#remove RecExCommon 
-topSequence = AlgSequence()
-for i in topSequence:
-  log.info('removing ', i.getName())
-  if i.getName()!="SGInputLoader":
-    topSequence.remove(i)
-
-
-#Run Fake RoI
-# from L1Decoder.L1DecoderConf import FakeRoI
-# fakeRoI = FakeRoI("fakeRoI")
-# fakeRoI.InputFilename="caloRoIData.dat"
-# setOutput(fakeRoI, "OutputDecisions", "OutputRoIs")
-# fakeRoI.OutputLevel=DEBUG
-
-# topSequence += fakeRoI
-
-# once L1 re-simulation works this has to change from emulation to real unpacking
-include("TrigUpgradeTest/L1CF.py")
-
-data = {}
-
-data['l1emroi'] = ['1.3,2.9,2704088841,EM3,EM7,EM10,EM20;',
-                   '1.2,3.1,2972524297,EM3,EM7,EM10,EM20;']
-
-data['l1muroi'] = [';',
-                   ';'] # required by L1CF
-
-data['ctp'] = ['HLT_e20',
-               'HLT_e20']
-from TrigUpgradeTest.TestUtils import writeEmulationFiles
-writeEmulationFiles(data)
-
-
-theApp.EvtMax = 10
-svcMgr.DetectorStore.Dump=True
-MessageSvc.debugLimit=1000000000
-
-
-
-from SiClusterizationTool.SiClusterizationToolConf import InDet__ClusterMakerTool
-InDetClusterMakerTool = InDet__ClusterMakerTool(name                 = "InDetClusterMakerTool",
-    PixelCalibSvc        = None,
-    PixelOfflineCalibSvc = None,
-    UsePixelCalibCondDB  = False)
-
-ToolSvc += InDetClusterMakerTool
-
-
-from SiClusterizationTool.SiClusterizationToolConf import InDet__MergedPixelsTool
-InDetMergedPixelsTool = InDet__MergedPixelsTool(name                    = "InDetMergedPixelsTool", 
-                                                globalPosAlg            = InDetClusterMakerTool,
-                                                MinimalSplitSize        = 0,
-                                                MaximalSplitSize        = 49,
-                                                MinimalSplitProbability = 0,
-                                                DoIBLSplitting = True,
-                                                SplitClusterAmbiguityMap= InDetKeys.SplitClusterAmbiguityMap())
-ToolSvc += InDetMergedPixelsTool
-
-from SiClusterizationTool.SiClusterizationToolConf import InDet__PixelGangedAmbiguitiesFinder
-InDetPixelGangedAmbiguitiesFinder = InDet__PixelGangedAmbiguitiesFinder(name = "InDetPixelGangedAmbiguitiesFinder")
-ToolSvc += InDetPixelGangedAmbiguitiesFinder
-
-from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__PixelClusterization
-InDetPixelClusterization = InDet__PixelClusterization(name                    = "InDetPixelClusterization",
-                                                      clusteringTool          = InDetMergedPixelsTool,
-                                                      gangedAmbiguitiesFinder = InDetPixelGangedAmbiguitiesFinder,
-                                                      DetectorManagerName     = InDetKeys.PixelManager(), 
-                                                      DataObjectName          = InDetKeys.PixelRDOs(),
-                                                      ClustersName            = "PixelTrigClusters",
-                                                      isRoI_Seeded = True,
-                                                      RoIs = "L1EMRoIs",
-                                                      )
-topSequence += InDetPixelClusterization
-
-#
-# --- SCT_ClusteringTool (public)
-#
-from SiClusterizationTool.SiClusterizationToolConf import InDet__SCT_ClusteringTool
-InDetSCT_ClusteringTool = InDet__SCT_ClusteringTool(name              = "InDetSCT_ClusteringTool",
-                                                    globalPosAlg      = InDetClusterMakerTool,
-                                                    conditionsService = InDetSCT_ConditionsSummarySvc)
-ToolSvc += InDetSCT_ClusteringTool
-      
-#
-# --- SCT_Clusterization algorithm
-#
-from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__SCT_Clusterization
-InDetSCT_Clusterization = InDet__SCT_Clusterization(name                    = "InDetSCT_Clusterization",
-                                                    clusteringTool          = InDetSCT_ClusteringTool,
-                                                    # ChannelStatus         = InDetSCT_ChannelStatusAlg,
-                                                    DetectorManagerName     = InDetKeys.SCT_Manager(), 
-                                                    DataObjectName          = InDetKeys.SCT_RDOs(),
-                                                    ClustersName            = "SCT_TrigClusters",
-                                                    conditionsService       = InDetSCT_ConditionsSummarySvc,
-                                                    FlaggedConditionService = InDetSCT_FlaggedConditionSvc,
-                                                    isRoI_Seeded = True,
-                                                    RoIs = "L1EMRoIs",
-                                                    )
-topSequence += InDetSCT_Clusterization
-
-from SiSpacePointTool.SiSpacePointToolConf import InDet__SiSpacePointMakerTool
-InDetSiSpacePointMakerTool = InDet__SiSpacePointMakerTool(name = "InDetSiSpacePointMakerTool")
-ToolSvc += InDetSiSpacePointMakerTool
-
-from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiTrackerSpacePointFinder
-InDetSiTrackerSpacePointFinder = InDet__SiTrackerSpacePointFinder(name                   = "InDetSiTrackerSpacePointFinder",
-                                                                  SiSpacePointMakerTool  = InDetSiSpacePointMakerTool,
-                                                                  PixelsClustersName     = "PixelTrigClusters",
-                                                                  SCT_ClustersName       = "SCT_TrigClusters",
-                                                                  SpacePointsPixelName   = "PixelTrigSpacePoints",
-                                                                  SpacePointsSCTName     = "SCT_TrigSpacePoints",
-                                                                  SpacePointsOverlapName = InDetKeys.OverlapSpacePoints(),
-                                                                  ProcessPixels          = DetFlags.haveRIO.pixel_on(),
-                                                                  ProcessSCTs            = DetFlags.haveRIO.SCT_on(),
-                                                                  ProcessOverlaps        = False)
-topSequence += InDetSiTrackerSpacePointFinder
-
-
-from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_eGamma
-theFTF = TrigFastTrackFinder_eGamma()
-theFTF.RoIs="L1EMRoIs"
-
-topSequence += theFTF
-log.info(theFTF)
-
-from xAODTrackingCnv.xAODTrackingCnvConf import xAODMaker__TrackParticleCnvAlg
-xAODTrackParticleCnvAlg = xAODMaker__TrackParticleCnvAlg(name = "InDetxAODParticleCreatorAlg"+InputTrackCollection,
-                                                         ConvertTracks = True,
-                                                         ConvertTrackParticles = False,
-                                                         TrackContainerName = "TrigFastTrackFinder_Tracks",
-                                                         xAODContainerName = "xAODTracks",
-                                                         xAODTrackParticlesFromTracksContainerName = "xAODTracks2",
-                                                         TrackParticleCreator = InDetxAODParticleCreatorTool,
-                                                         PrintIDSummaryInfo = True)
-
-topSequence += xAODTrackParticleCnvAlg
-
-#probably initialized only in trigger=True?
-from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
-RegSelSvc = RegSelSvcDefault()
-RegSelSvc.enablePixel = True
-RegSelSvc.enableSCT   = True
-
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-svcMgr += RegSelSvc
-
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.TRT_setOff()
-
-
-#to be followed up
-conddb.blockFolder('/TRT/Align')
-conddb.blockFolder('/Indet/PixelDist')
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/DictFromChainName.py b/Trigger/TrigValidation/TrigUpgradeTest/share/DictFromChainName.py
new file mode 100644
index 0000000000000000000000000000000000000000..e9280f7e0bc1e22e7510af74da467c4f7fe3e505
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/DictFromChainName.py
@@ -0,0 +1,261 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+"""
+
+Class to obtain the chain configuration dictionary from the short or long name
+
+Authors: Catrin Bernius, Joerg Stelzer, Moritz Backes
+Written in December 2013
+Re-written for AthenaMT starting in July 2017
+
+"""
+__author__  = 'Moritz Backes & Catrin Bernius & Joerg Stelzer'
+__version__=""
+__doc__="Obtaining Dictionaries from Chain Names"
+
+from AthenaCommon.Logging import logging
+logging.getLogger().info("Importing %s",__name__)
+log = logging.getLogger('TriggerMenu.menu.DictFromChainName')
+
+include("TrigUpgradeTest/SignatureDicts.py")
+
+
+class DictFromChainName(object):
+
+    def getChainDict(self,chainInfo):
+        log.debug("chainInfo %s", chainInfo)
+        
+        m_chainName = chainInfo[0]
+        m_L1item = chainInfo[1]
+        m_L1items_chainParts=[]
+
+        log.debug("Analysing chain with name: %s", m_chainName)
+        chainProp = self.analyseShortName(m_chainName,  m_L1items_chainParts, m_L1item)
+        log.debug('ChainProperties: %s', chainProp)
+               
+        if (chainProp['L1item']== ''): chainProp['L1item'] = m_L1item
+
+        import pprint
+        pp = pprint.PrettyPrinter(indent=4, depth=8)
+        log.info('FINAL dictionary: %s', pp.pformat(chainProp))
+
+        return chainProp
+
+    def analyseShortName(self, chainName, L1items_chainParts, L1item_main):
+        """
+        Function to obtain the chain configuration dictionay from the short name 
+        by parsing its components and finding the corrsponding properties which 
+        are defined in SliceDicts
+        """        
+        from copy import deepcopy
+
+        # ---- dictionary with all chain properties ----
+        finalChainDict = deepcopy(ChainDictTemplate)
+        finalChainDict['chainName'] = chainName
+        
+        # ---- specific chain part information ----
+        cparts = chainName.split("_") 
+        log.debug("cparts: %s", cparts)
+                   
+        # ---- Find the signature defining patterns as BasePattern ----
+        # ---- <Multiplicity(int)><TriggerType(str)><Threshold(int)><etra,...(str|str+int)> ----
+        pattern = getBasePattern()
+
+        # ---- define some dictionaries ----
+        chainPartDicts=[] # stores the list of dictionaries in case of multiple chain parts
+        mdicts=[] # generated when checking for the BasePattern
+        multichainindex=[]
+        signatureNames = []
+
+        # ---- Loop over all chain name parts ----
+        for cpart in cparts:
+            log.debug("Looping over cpart: %s", cpart)
+
+            m = pattern.match(cpart)
+            if m: 
+                log.debug("Pattern found in this string: %s", cpart)
+                m_groupdict = m.groupdict()
+                multiChainIndices = [i for i in range(len(chainName)) if ( chainName.startswith(cpart, i) ) ]
+                log.debug("MultiChainIndices: %s", multiChainIndices)
+                for theMultiChainIndex in multiChainIndices:
+                    # this check is necessary for the bjet chains, example: j45_bloose_3j45
+                    if (theMultiChainIndex != 0) & (chainName[theMultiChainIndex-1] != '_'): continue
+                    if not theMultiChainIndex in multichainindex:
+                        multichainindex.append(theMultiChainIndex)
+                log.debug("multichainindex: %s", multichainindex)
+                                        
+                m_groupdict['signature'] = getSignatureNameFromToken(cpart)
+                sigToken = getSignatureNameFromToken(cpart)
+                if sigToken not in signatureNames: signatureNames.append(sigToken)
+                mdicts.append(m_groupdict)
+                    
+            else: 
+                log.info('not a BasePattern, continue with analysis')
+           
+        # ---- If multiple parts exist, split the string and analyse each  ----
+        # ---- part depending on the signature it belongs to ----
+        multichainparts=[]
+        multichainindex = sorted(multichainindex, key=int)
+        cN = chainName
+        for i in reversed(multichainindex):
+            if i!=0:
+                log.debug('Appending to multichainparts (i!=0): %s', chainName[i:len(cN)])
+                multichainparts.append(chainName[i:len(cN)])
+                cN = cN[0:i-1]
+            else:
+                log.debug('Appending to multichainparts: %s', chainName[i:len(cN)])
+                multichainparts.append(cN)
+        log.debug("multichainparts: %s",multichainparts)
+
+        # ---- build the chainProperties dictionary for each part of the chain ----
+        # ---- add it to a chainPartDicts ----
+        multichainparts.reverse()
+        for chainindex, chainparts in enumerate(multichainparts):
+            chainProperties = {} #will contain properties for one part of chain if multiple parts
+            log.debug('chainparts %s', chainparts)
+
+            # ---- check if L1 item is specified in chain Name ----
+            L1itemfromChainName = ''; L1item = ''; 
+            chainpartsNoL1 = chainparts
+            
+            # Checking for L1 item for chain part and overall in the name and the L1 for the overall chain
+            if (chainparts.count("_L1") > 1):
+                # get position of all L1 items
+                import re
+                allL1indices = [match.start() for match in re.finditer(re.escape("_L1"), chainparts)]
+                allL1items = []
+                m_chainparts = deepcopy(chainparts)
+                for index in reversed(allL1indices):
+                    newindex = index+1
+                    m_newitem = m_chainparts[newindex:]  
+                    m_chainparts = m_chainparts[:newindex-1]
+                    newitem = m_newitem[:2]+'_'+m_newitem[2:]
+                    allL1items.append(newitem)
+                    
+                allL1items.reverse()            
+                if (allL1items[1] != L1item_main):
+                    log.error("Typo in chain name for overall L1 item? Please check again")
+                else:  # remove the L1 item from the chain name
+                    chainparts = chainparts[:allL1indices[1]]
+                    
+                if (allL1items[0] not in L1items_chainParts):
+                    log.error("L1 chain part " +L1items_chainParts+" does not match the one in the chain name "+allL1items[0])
+
+            #this only finds the FIRST instance on L1
+            L1index = chainparts.find('_L1')                                         
+            log.debug('chainparts: %s', chainparts)
+            log.debug('L1index: %s', L1index)
+            if L1index != -1:
+                L1index = L1index+1 # to compensate the _
+                L1itemfromChainName = chainparts[L1index:]
+                if (L1itemfromChainName[2]=='_'):
+                    raise RuntimeError('ERROR IN CHAIN NAME: L1 items are specified as e.g. *_L1EM4, not *_L1_EM4')
+                else:
+                    L1item = L1itemfromChainName[:2]+'_'+L1itemfromChainName[2:]
+                    if (L1item[-1] == '_'): L1item = L1item[:-1]
+                        
+                chainpartsNoL1 = chainparts[:L1index-1] # -1 to also remove _
+ 
+            else: 
+                log.debug('No L1 item specified in the name')
+                
+            # ---- assign L1 to chain parts from L1 item list in menu ----
+            # ---- check if enough L1 items given for chain parts ----
+            if (len(L1items_chainParts) > 0):
+                if (len(L1items_chainParts) != len(multichainparts)):
+                    log.info("Not enough L1 items for chain parts of chain %s defined", finalChainDict['chainName'])
+
+                chainProperties['L1item'] = L1items_chainParts[chainindex]                
+                if (L1item !=  chainProperties['L1item']) & (L1item !=''):
+                    log.info("L1 item in name (%s) of chain %s does not match with given L1item list (%s)!",
+                                 L1item, chainName, chainProperties['L1item'])
+            else:
+                log.debug('No L1 item specified in the name')
+
+            parts = chainpartsNoL1.split('_')
+            parts = filter(None,parts)
+
+            # ---- start writing first base pattern info into dict and remove it afterwards ----
+            chainProperties['trigType']=mdicts[chainindex]['trigType']
+            chainProperties['extra']=mdicts[chainindex]['extra']
+            multiplicity = mdicts[chainindex]['multiplicity'] if not mdicts[chainindex]['multiplicity'] == '' else '1'
+            chainProperties['multiplicity'] = multiplicity
+            chainProperties['threshold']=mdicts[chainindex]['threshold']
+            chainProperties['signature']=mdicts[chainindex]['signature']
+
+            # ---- if we have a L1 topo in a multi-chain then we want to remove it from the chain name
+            # but only if it's the same as the L1item_main; otherwise it belongs to chain part and we keep it ----
+            chainProperties['chainPartName'] = chainparts
+            if ('-' in L1item) and (len(multichainparts) > 1) and (L1item_main == L1item):
+                chainProperties['chainPartName'] = chainpartsNoL1                
+            ## if we have the overall L1 item in a multi-part chains, then we want to remove it from the chain part name
+            if( L1item==L1item_main and (len(multichainparts) > 1) and (L1item.count("_") > 1 )):                
+                chainProperties['chainPartName'] = chainpartsNoL1
+                                
+            log.debug('Chainparts: %s', chainparts)
+            parts.pop(0)
+
+            # ---- import the relevant dictionaries for each part of the chain ---- 
+            SignatureDefaultValues, allowedSignaturePropertiesAndValues = getSignatureInformation(chainProperties['signature'])
+            log.debug('SignatureDefaultValues: %s', SignatureDefaultValues)
+            
+            # ---- update chain properties with default properties ----
+            sigDefault = deepcopy(SignatureDefaultValues)
+            sigDefault.update(chainProperties)
+            chainProperties = sigDefault
+
+            # ---- check remaining parts for complete machtes in allowedPropertiesAndValues Dict ----
+            parts = filter(None, parts)     #removing empty strings from list
+
+            matchedparts = []
+            for pindex, part in enumerate(parts):
+                origpart = part
+                for prop, allowedValues in allowedSignaturePropertiesAndValues.items():
+                    if part in allowedValues:
+                        if type(chainProperties[prop]) == list:
+                            chainProperties[prop] += [part]
+                        else:
+                            chainProperties[prop] = part
+                        matchedparts.append(part)
+                        
+            log.debug("matched parts %s", matchedparts)
+            leftoverparts = set(parts)-set(matchedparts)
+            log.debug('leftoverparts %s', leftoverparts)
+            for pindex, part in enumerate(leftoverparts):
+                for prop, allowedValues in allowedSignaturePropertiesAndValues.items():
+                    if prop in chainProperties.keys():  continue
+                    for aV in allowedValues:
+                        if (aV in part):
+                            if (chainProperties['signature'] in ['Egamma', 'Muon'] )& (prop in ['trkInfo','hypoInfo']):
+                                chainProperties[prop] = part
+                                part = part.replace(part,'')
+                            elif (chainProperties['signature'] in ['Jet'] )& (prop in ['gscThreshold']):
+                                chainProperties[prop] = part
+                                part = part.replace(part,'')
+                            else:                                    
+                                chainProperties[prop] = aV
+                                part = part.replace(aV,'')
+                                break # done with allowed values for that property
+                            
+                if len(part.split())>0:
+                    raise RuntimeError("These parts of the chain name %s are not understood %r" % (origpart,part))
+
+            # ---- remove properties that aren't allowed in the chain properties for a given siganture ----
+            forbiddenProperties = set(chainProperties.keys()) - set(allowedSignaturePropertiesAndValues.keys())
+            log.debug('%s', set(chainProperties.keys()))
+            log.debug('%s', set(allowedSignaturePropertiesAndValues.keys()))
+            for fb in forbiddenProperties:
+                forbiddenValue = chainProperties.pop(fb)
+                if forbiddenValue != '':
+                    raise RuntimeError("Property %s not allowed for signature '%s', but specified '%s'" % (fb, chainProperties['signature'], forbiddenValue))
+                
+            # ---- the info of the general and the specific chain parts dict ----
+            chainPartDicts.append(chainProperties)
+
+        # ---- depending on if signatures are different in this chain, break up the chainProperties dictionary ----
+        # ---- finally also taking care of the signatrue key ----
+        finalChainDict['chainParts'] = chainPartDicts
+        finalChainDict['signature'] = chainPartDicts[0]['signature']
+        log.debug('finalChainDict that is passed as Final dict %s', finalChainDict)
+             
+        return finalChainDict
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py
new file mode 100644
index 0000000000000000000000000000000000000000..55c6cf04cb63ddec7f2787991e7bf89944449134
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py
@@ -0,0 +1,270 @@
+###############################################################
+#
+# Job options file
+#
+# Based on AthExStoreGateExamples
+#
+#==============================================================
+
+#--------------------------------------------------------------
+# ATLAS default Application Configuration options
+#--------------------------------------------------------------
+
+# Configure the scheduler
+from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
+svcMgr += ForwardSchedulerSvc()
+svcMgr.ForwardSchedulerSvc.ShowDataFlow=True
+svcMgr.ForwardSchedulerSvc.ShowControlFlow=True
+
+# include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
+# svcMgr.ByteStreamInputSvc.FullFileName = [ "./input.data" ]
+
+# # This is the list of proxies to set up so that retrieval attempt will trigger the BS conversion
+# if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ):
+#     from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc
+#     svcMgr += ByteStreamAddressProviderSvc()
+# svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ "ROIB::RoIBResult/RoIBResult" ]
+
+# Event-level algorithm sequence
+
+
+# from SGComps.SGCompsConf import SGInputLoader
+# topSequence += SGInputLoader( OutputLevel=INFO, ShowEventDump=False )
+# topSequence.SGInputLoader.Load = [ ('ROIB::RoIBResult','RoIBResult') ]
+
+from AthenaCommon.CFElements import stepSeq
+
+
+data = {'noreco': [';', ';', ';']}  # in the lists there are the events
+
+data['emclusters'] = ['eta:1,phi:1,et:180000; eta:1,phi:-1.2,et:35000;',
+                      'eta:0.5,phi:0,et:120000; eta:1,phi:-1.2,et:65000;',
+                      'eta:-0.6,phi:1.7,et:9000;']
+
+data['msmu']  = [';',
+                 'eta:-1.2,phi:0.7,pt:6500; eta:-1.1,phi:0.6,pt:8500;',
+                 'eta:-1.7,phi:-0.2,pt:9500;']
+
+data['ctp'] = [ 'HLT_g100',  'HLT_2g50 HLT_e20', 'HLT_mu20 HLT_mu8 HLT_2mu8 HLT_mu8_e8' ]
+
+data['l1emroi'] = ['1,1,0,EM3,EM7,EM15,EM20,EM50,EM100; 1,-1.2,0,EM3,EM7',
+                   '-0.6,0.2,0,EM3,EM7,EM15,EM20,EM50,EM100; 1,-1.1,0,EM3,EM7,EM15,EM20,EM50',
+                   '-0.6,1.5,0,EM3,EM7,EM7']
+
+data['l1muroi'] = ['0,0,0,MU0;',
+                   '-1,0.5,0,MU6,MU8; -1,0.5,0,MU6,MU8,MU10',
+                   '-1.5,-0.1,0,MU6,MU8']
+
+data['tracks'] = ['eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;',
+                  'eta:0.5,phi:0,pt:130000; eta:1,phi:-1.2,pt:60000;eta:-1.2,phi:0.7,pt:6700; eta:-1.1,phi:0.6,pt:8600;',
+                  'eta:-0.6,phi:1.7,et:9000;'] # no MU track for MS candidate 'eta:-1.7,phi:-0.2,pt:9500;'
+
+data['mucomb'] = [';',
+                  'eta:-1.2,phi:0.7,pt:6600; eta:-1.1,phi:0.6,pt:8600;',
+                  ';']
+
+data['electrons'] = ['eta:1,phi:1,pt:120000; eta:1,phi:-1.2,et:32000;',
+                     ';',
+                     ';']
+data['photons'] = ['eta:1,phi:1,pt:130000;',
+                   ';',
+                   ';']
+
+
+from TrigUpgradeTest.TestUtils import writeEmulationFiles
+writeEmulationFiles(data)
+
+include("TrigUpgradeTest/L1CF.py")
+include("TrigUpgradeTest/HLTCF.py")
+
+# Cati's menu code
+#print "=============== MEOW ================"
+#include("TrigUpgradeTest/TriggerMenuMT.py")
+#genMenu = GenerateMenu()
+#genMenu.generate()
+#print "=============== WOOF ================"
+
+
+# steps: sequential AND of 1=Filter 2=Processing
+# chainstep=single chain step
+# global step=joint for all chains
+# filters: one SeqFilter per step, per chain
+# inputMakers: one per each first RecoAlg in a step (so one per step), one input per chain that needs that step
+
+
+from TrigUpgradeTest.HLTCFConfig import *
+
+muStep1 = Sequence("Step1MuHypo", Algs=["muMSRecAlg:msmu.dat"], Hypo="Step1MuHypo")
+MuChains  = [ Chain(name='HLT_mu20', Seed="L1MU10",   ChainSteps=[ChainStep("Step1Mu20", Sequence=muStep1, Threshold="pt20")]),
+            Chain(name='HLT_mu8',  Seed="L1MU6",    ChainSteps=[ChainStep("Step1Mu8",  Sequence=muStep1, Threshold="pt8")]) ]
+                                                                                                                            
+
+elStep1 = Sequence("Step1ElGamHypo", Algs=["CaloClustering:emclusters.dat"], Hypo="Step1ElGamHypo")
+ElChains  = [ Chain(name='HLT_e20' , Seed="L1EM10", ChainSteps=[ChainStep("Step1E20",  Sequence=elStep1, Threshold="et20")])  ]
+
+
+#CombChains =[ Chain(name='HLT_mu8_e8' , Seed="L1EM6MU6", ChainSteps=[ChainStep("Step1E6Mu6",  Sequence=elStep1, Threshold="et20")]) ]
+
+
+
+group_of_chains = MuChains + ElChains  
+
+
+#decide the number of steps, starting from 1
+NSTEPS=1
+group_of_steps = { "Step%i"%(i+1) :  parOR("Step%i" %(i+1)) for i in range(NSTEPS)}
+
+
+#loop over chains to configure
+count_steps=0
+for stepCF_name, stepCF in group_of_steps.iteritems():
+    step_list = []
+
+    for chain in group_of_chains:
+        chain_step_name= "%s:%s"%(stepCF_name, chain.name)
+        print "\n*******Filling stepCF %s for chain  %s"%(stepCF_name, chain.name)
+      
+        chain_step=chain.steps[count_steps]
+        sequence=chain_step.sequence
+        step_name= sequence.name
+
+        #define sequence input
+        if count_steps == 0: # seeding
+            previous_sequence=chain.group_seed
+            sequence_input = chain.group_seed
+        else:
+            # from previous step
+            previous_sequence=chain.steps[count_steps-1].sequence
+            sequence_input=previous_sequence.outputs
+
+        # one filter per previous sequence at the start of the sequence: check if it exists or create a new one        
+        # if the hypo has more than one output, try to get all of them
+        filter_name="Filter%s%s"%(stepCF_name,previous_sequence)
+        filter_out="%s_out"%filter_name
+        filter_already_exists=False
+        findFilter= [step.filter for step in step_list if step.filter.name in filter_name]
+        
+        if len(findFilter):
+            print "Filter %s already exists"%(filter_name)
+            filter_already_exists=True
+            sfilter=findFilter[0]
+
+        else:
+            sfilter = SequenceFilter( filter_name, Inputs=[], Outputs=[], Chains=[] )
+            sfilter.addOutput(filter_out)            
+
+
+        sfilter.addChain(chain.name)
+        sfilter.addInput(sequence_input)
+        print "Filter Done: %s"%(sfilter)        
+
+        #was this sequence already used in other steps? Find if the step exists
+        step_already_exists=False        
+        findStep= [step for step in step_list if step.name in step_name]
+        #findStep= [step.name for seq in seq_list if seq.name in sequence.name]
+        if len(findStep):
+            step_already_exists=True
+        
+       
+        #make the step
+        if  step_already_exists:
+            print "  Step %s already exists"%(step_name)
+            step=findStep[0]
+            #get the hypo
+            hypoAlg= step.hypo
+            if not hypoAlg:
+                print "Error %s not found in existing sequence %s"%(sequence.hypo,sequence.name)
+            else:
+                print "Found HypoAlg %s"%(hypoAlg.name)
+        else:
+            print "  Making new step %s from sequence %s"%(step_name,sequence.name)
+            # first create the InputMaker
+            # imaker_out="IMaker%s_out"%chain_step_name
+            # last_output = imaker_out
+            #fill the step sequence with algorithms
+            algs=sequence.algs_name
+            last_output = sequence_input #filter_out #tmp, no InputMaker
+            list_of_algs = []
+            for alg in algs:
+                name_file=alg.split(":")
+                input=last_output
+                input_list = []
+                input_list.append(input)
+                output="R%s_out"%(name_file[0])
+                output_list = []
+                output_list.append(output)
+
+                reco_alg = RecoAlg(name_file[0], Output=output_list,  FileName=name_file[1], Input=input_list)  
+                print "   added %s for this sequence %s"%(reco_alg,sequence.name)
+                list_of_algs.append(reco_alg)
+                last_output= output
+
+            #make the hypo
+            hypo=sequence.hypo
+            input_list = []
+            input_list.append(last_output)            
+            sequence_out = "Sequence%s_out"%sequence
+            output_list = []
+            output_list.append(sequence_out)
+            hypoAlg = HypoAlg(hypo, Input=input_list, Output=output_list)
+            print "Create HypoAlg %s, and create the Decision Step -> %s"%(hypo,step_name)
+            
+            #make the decision step                        
+            step_seq = Step( step_name, FilterAlg=sfilter, RecoAlgs=list_of_algs, Hypo=hypoAlg)
+            step_list.append(step_seq)
+           
+
+        # fill hypoTools for each chain       
+        threshold=chain_step.threshold
+        hypotool_name=chain.name
+        print "Adding %s to %s"%(threshold,hypoAlg.name)
+        hypoAlg.addHypoTool(threshold)
+
+    #end of this step configuration, now implement CF:
+ 
+    print "\n******** instantiate algorithms in CF"
+    print "There are %d steps in this CFStep"%(len(step_list))
+    for step in step_list:
+        print "\n Create Step %s"%(step.name)
+        filt=step.filter
+        print "Create seqFilter %s"%filt
+        filterAlg=seqFilter(filt.name, Inputs=filt.inputs, Outputs=filt.outputs, Chains=filt.chains)
+        #make algos:
+        algos = []
+        for alg in step.algs:
+            print "Crate Algo %s"%alg
+            algAlg= TestRecoAlg(alg.name, FileName=alg.filename, Output=alg.outputs[0], Input=alg.inputs[0])
+            algos.append(algAlg)
+
+        hypo=step.hypo
+        print "Crate HypoAlgo %s"%hypo.name
+        hypoAlg=TestHypoAlg(hypo.name, Input=hypo.inputs[0], Output=hypo.outputs[0])
+        algos.append(hypoAlg)
+        tools=hypo.tools
+        htool_list = []
+        for tool in tools:
+            print "Crate HypoTool %s"%tool
+            prop = ''.join(filter(lambda x: x.isalpha(), tool))
+            hypotoolTool=TestHypoTool(tool, prop)
+            htool_list.append(hypotoolTool)
+            
+        hypoAlg.HypoTools =htool_list
+        print "Crate StepSeq %s"%step.name
+        step_seq = stepSeq( step.name, filterAlg=filterAlg, rest=algos)       
+        print "Add this step %s to %s"%(step.name,stepCF_name)
+        stepCF += step_seq
+
+    print "Add stepCF %s to the root"%stepCF_name
+    TopHLTSeq += addSteps(stepCF)
+    count_steps+=1
+    print "************* End of step %s"%stepCF_name
+    # end of steps
+
+
+theApp.EvtMax = 3
+
+
+
+
+#  is this needed??
+#step +=seqFilter
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/HLTCF.py b/Trigger/TrigValidation/TrigUpgradeTest/share/HLTCF.py
index 0094544c330554879e377d27ba5a7af900feabc6..e1dfa3dfa35f1dc10f2cbd3790105feaf3e15dbb 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/HLTCF.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/HLTCF.py
@@ -1,4 +1,4 @@
-from TrigUpgradeTest.CFElements import *
+from AthenaCommon.CFElements import parOR, seqAND
 
 allAlgs={}
 def useExisting(name):
@@ -11,22 +11,34 @@ def remember(name, instance):
     return instance
 
 from TrigUpgradeTest.TrigUpgradeTestConf import HLTTest__TestRecoAlg
-def reco(name, Output,  FileName="noreco.dat", Input=""):
+def TestRecoAlg(name, Output,  FileName="noreco.dat", Input=""):
     a = HLTTest__TestRecoAlg("R_"+name, OutputLevel = DEBUG, FileName=FileName, Output=Output, Input=Input)
     allAlgs[name] = a
     return a
 
 from TrigUpgradeTest.TrigUpgradeTestConf import HLTTest__TestHypoAlg
-def hypo(name, Input, Output):
+def TestHypoAlg(name, Input, Output):
     h = HLTTest__TestHypoAlg("H_"+name, OutputLevel = DEBUG, Input=Input, Output=Output)
     allAlgs[name] = h
     return h
 
+from TrigUpgradeTest.TrigUpgradeTestConf import HLTTest__TestHypoTool
+def TestHypoTool(name, prop):
+    threshold_value=''.join(filter(lambda x: x.isdigit(), name))
+    #    threshold = name.translate(None, string.letters).translate(None, '_') # remove letters
+    #propert= "pt"
+    value  =  int(threshold_value)*1000
+    h = HLTTest__TestHypoTool(name, OutputLevel=DEBUG, Threshold=value, Property=prop)
+    return h
+
 from TrigUpgradeTest.TrigUpgradeTestConf import HLTTest__TestRoRSeqFilter
 
 def seqFilter(name, Inputs=[], Outputs=[], Chains=[]):
     global allAlgs
-    f = HLTTest__TestRoRSeqFilter("F_"+name, OutputLevel = DEBUG, Inputs=Inputs, Outputs=Outputs, Chains=Chains)
+    input_list = list(set(Inputs))
+    output_list = list (set(Outputs))
+    chain_list = list (set(Chains))
+    f = HLTTest__TestRoRSeqFilter("F_"+name, OutputLevel = DEBUG, Inputs=input_list, Outputs=output_list, Chains=chain_list)
     if "Step1" in name: # so that we see events running through, will be gone once L1 emulation is included
         f.AlwaysPass = True        
     allAlgs[name] = f
@@ -38,3 +50,4 @@ def merger(name, Inputs, Output ):
 
 def addSteps(s):
     return seqAND("HLTChainsSeq", s)
+
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py b/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py
new file mode 100644
index 0000000000000000000000000000000000000000..7c1b84aadfd1cf42037e6f8ea06554e05c41dfe0
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py
@@ -0,0 +1,372 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
+include("TrigUpgradeTest/testHLT_MT.py")
+
+viewTest = opt.enableViews   # from testHLT_MT.py
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+allViewAlgorithms = topSequence.allViewAlgorithms
+
+if viewTest:
+  viewMaker = CfgMgr.AthViews__RoiCollectionToViews( "viewMaker" )
+  viewMaker.ViewBaseName = "testView"
+  viewMaker.AlgPoolName = svcMgr.ViewAlgPool.name()
+  viewMaker.InputRoICollection = "EMRoIs"
+  viewMaker.OutputRoICollection = "EMViewRoIs"
+  topSequence += viewMaker
+
+
+from InDetRecExample.InDetKeys import InDetKeys
+
+#Pixel
+
+from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRodDecoder
+InDetPixelRodDecoder = PixelRodDecoder(name = "InDetPixelRodDecoder")
+ToolSvc += InDetPixelRodDecoder
+
+from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRawDataProviderTool
+InDetPixelRawDataProviderTool = PixelRawDataProviderTool(name    = "InDetPixelRawDataProviderTool",
+                                                         Decoder = InDetPixelRodDecoder)
+ToolSvc += InDetPixelRawDataProviderTool
+if (InDetFlags.doPrintConfigurables()):
+  print      InDetPixelRawDataProviderTool
+
+# load the PixelRawDataProvider
+from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRawDataProvider
+InDetPixelRawDataProvider = PixelRawDataProvider(name         = "InDetPixelRawDataProvider",
+                                                 RDOKey       = InDetKeys.PixelRDOs(),
+                                                 ProviderTool = InDetPixelRawDataProviderTool)
+
+# if ( viewTest ):
+#   allViewAlgorithms += InDetPixelRawDataProvider
+#   allViewAlgorithms.InDetPixelRawDataProvider.isRoI_Seeded = True
+#   allViewAlgorithms.InDetPixelRawDataProvider.RoIs = "EMViewRoIs"
+#   svcMgr.ViewAlgPool.TopAlg += [ "InDetPixelRawDataProvider" ]
+#   topSequence.viewMaker.AlgorithmNameSequence += [ "InDetPixelRawDataProvider" ]
+# else:
+#   topSequence += InDetPixelRawDataProvider
+#   topSequence.InDetPixelRawDataProvider.isRoI_Seeded = True
+#   topSequence.InDetPixelRawDataProvider.RoIs = "EMRoIs"
+
+
+if (InDetFlags.doPrintConfigurables()):
+  print          InDetPixelRawDataProvider
+
+
+#SCT
+from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCT_RodDecoder
+InDetSCTRodDecoder = SCT_RodDecoder(name        = "InDetSCTRodDecoder",
+                                    TriggerMode = False)
+ToolSvc += InDetSCTRodDecoder
+
+from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProviderTool
+InDetSCTRawDataProviderTool = SCTRawDataProviderTool(name    = "InDetSCTRawDataProviderTool",
+                                                    Decoder = InDetSCTRodDecoder)
+ToolSvc += InDetSCTRawDataProviderTool
+if (InDetFlags.doPrintConfigurables()):
+  print      InDetSCTRawDataProviderTool
+
+# load the SCTRawDataProvider
+from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProvider
+InDetSCTRawDataProvider = SCTRawDataProvider(name         = "InDetSCTRawDataProvider",
+                                            RDOKey       = InDetKeys.SCT_RDOs(),
+                                            ProviderTool = InDetSCTRawDataProviderTool)
+
+if ( viewTest ):
+  allViewAlgorithms += InDetSCTRawDataProvider
+  allViewAlgorithms.InDetSCTRawDataProvider.isRoI_Seeded = True
+  allViewAlgorithms.InDetSCTRawDataProvider.RoIs = "EMViewRoIs"
+  svcMgr.ViewAlgPool.TopAlg += [ "InDetSCTRawDataProvider" ]
+  topSequence.viewMaker.AlgorithmNameSequence += [ "InDetSCTRawDataProvider" ]
+else:
+  topSequence += InDetSCTRawDataProvider
+  topSequence.InDetSCTRawDataProvider.isRoI_Seeded = True
+  topSequence.InDetSCTRawDataProvider.RoIs = "EMRoIs"
+
+
+#TRT
+from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc
+InDetTRTCalDbSvc = TRT_CalDbSvc()
+ServiceMgr += InDetTRTCalDbSvc
+
+from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_StrawStatusSummarySvc
+InDetTRTStrawStatusSummarySvc = TRT_StrawStatusSummarySvc(name = "InDetTRTStrawStatusSummarySvc")
+ServiceMgr += InDetTRTStrawStatusSummarySvc
+
+from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRT_RodDecoder
+InDetTRTRodDecoder = TRT_RodDecoder(name = "InDetTRTRodDecoder",
+                                    LoadCompressTableDB = True)#(globalflags.DataSource() != 'geant4'))  
+ToolSvc += InDetTRTRodDecoder
+  
+from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProviderTool
+InDetTRTRawDataProviderTool = TRTRawDataProviderTool(name    = "InDetTRTRawDataProviderTool",
+                                                      Decoder = InDetTRTRodDecoder)
+ToolSvc += InDetTRTRawDataProviderTool
+
+
+allViewAlgorithms = None
+if viewTest:
+  allViewAlgorithms = topSequence.allViewAlgorithms
+
+if TriggerFlags.doID:
+  #workaround to prevent online trigger folders to be enabled
+  from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
+  InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False)
+
+  
+  
+  from InDetRecExample.InDetJobProperties import InDetFlags
+  InDetFlags.doCaloSeededBrem = False
+  
+  
+  from InDetRecExample.InDetJobProperties import InDetFlags
+  InDetFlags.InDet25nsec = True 
+  InDetFlags.doPrimaryVertex3DFinding = False 
+  InDetFlags.doPrintConfigurables = False
+  InDetFlags.doResolveBackTracks = True 
+  InDetFlags.doSiSPSeededTrackFinder = True
+  InDetFlags.doTRTPhaseCalculation = True
+  InDetFlags.doTRTSeededTrackFinder = True
+  InDetFlags.doTruth = False
+  InDetFlags.init()
+  
+  # PixelLorentzAngleSvc and SCTLorentzAngleSvc
+  include("InDetRecExample/InDetRecConditionsAccess.py")
+  
+  from InDetRecExample.InDetKeys import InDetKeys
+  
+  #Pixel
+  
+  from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRodDecoder
+  InDetPixelRodDecoder = PixelRodDecoder(name = "InDetPixelRodDecoder")
+  ToolSvc += InDetPixelRodDecoder
+  
+  from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRawDataProviderTool
+  InDetPixelRawDataProviderTool = PixelRawDataProviderTool(name    = "InDetPixelRawDataProviderTool",
+                                                           Decoder = InDetPixelRodDecoder)
+  ToolSvc += InDetPixelRawDataProviderTool
+  if (InDetFlags.doPrintConfigurables()):
+    print      InDetPixelRawDataProviderTool
+  
+  # load the PixelRawDataProvider
+  from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRawDataProvider
+  InDetPixelRawDataProvider = PixelRawDataProvider(name         = "InDetPixelRawDataProvider",
+                                                   RDOKey       = InDetKeys.PixelRDOs(),
+                                                   ProviderTool = InDetPixelRawDataProviderTool)
+  
+  if ( viewTest ):
+    allViewAlgorithms += InDetPixelRawDataProvider
+    allViewAlgorithms.InDetPixelRawDataProvider.isRoI_Seeded = True
+    allViewAlgorithms.InDetPixelRawDataProvider.RoIs = "EMViewRoIs"
+    svcMgr.ViewAlgPool.TopAlg += [ "InDetPixelRawDataProvider" ]
+    topSequence.viewMaker.AlgorithmNameSequence += [ "InDetPixelRawDataProvider" ]
+  else:
+    topSequence += InDetPixelRawDataProvider
+    topSequence.InDetPixelRawDataProvider.isRoI_Seeded = True
+    topSequence.InDetPixelRawDataProvider.RoIs = "EMRoIs"
+  
+  
+  if (InDetFlags.doPrintConfigurables()):
+    print          InDetPixelRawDataProvider
+  
+  
+  #SCT
+  from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCT_RodDecoder
+  InDetSCTRodDecoder = SCT_RodDecoder(name        = "InDetSCTRodDecoder",
+                                      TriggerMode = False)
+  ToolSvc += InDetSCTRodDecoder
+  
+  from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProviderTool
+  InDetSCTRawDataProviderTool = SCTRawDataProviderTool(name    = "InDetSCTRawDataProviderTool",
+                                                      Decoder = InDetSCTRodDecoder)
+  ToolSvc += InDetSCTRawDataProviderTool
+  if (InDetFlags.doPrintConfigurables()):
+    print      InDetSCTRawDataProviderTool
+  
+  # load the SCTRawDataProvider
+  from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProvider
+  InDetSCTRawDataProvider = SCTRawDataProvider(name         = "InDetSCTRawDataProvider",
+                                              RDOKey       = InDetKeys.SCT_RDOs(),
+                                              ProviderTool = InDetSCTRawDataProviderTool)
+  
+  if ( viewTest ):
+    allViewAlgorithms += InDetSCTRawDataProvider
+    allViewAlgorithms.InDetSCTRawDataProvider.isRoI_Seeded = True
+    allViewAlgorithms.InDetSCTRawDataProvider.RoIs = "EMViewRoIs"
+    svcMgr.ViewAlgPool.TopAlg += [ "InDetSCTRawDataProvider" ]
+    topSequence.viewMaker.AlgorithmNameSequence += [ "InDetSCTRawDataProvider" ]
+  else:
+    topSequence += InDetSCTRawDataProvider
+    topSequence.InDetSCTRawDataProvider.isRoI_Seeded = True
+    topSequence.InDetSCTRawDataProvider.RoIs = "EMRoIs"
+  
+  
+  #TRT
+  from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc
+  InDetTRTCalDbSvc = TRT_CalDbSvc()
+  ServiceMgr += InDetTRTCalDbSvc
+  
+  from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_StrawStatusSummarySvc
+  InDetTRTStrawStatusSummarySvc = TRT_StrawStatusSummarySvc(name = "InDetTRTStrawStatusSummarySvc")
+  ServiceMgr += InDetTRTStrawStatusSummarySvc
+  
+  from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRT_RodDecoder
+  InDetTRTRodDecoder = TRT_RodDecoder(name = "InDetTRTRodDecoder",
+                                      LoadCompressTableDB = True)#(globalflags.DataSource() != 'geant4'))  
+  ToolSvc += InDetTRTRodDecoder
+    
+  from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProviderTool
+  InDetTRTRawDataProviderTool = TRTRawDataProviderTool(name    = "InDetTRTRawDataProviderTool",
+                                                        Decoder = InDetTRTRodDecoder)
+  ToolSvc += InDetTRTRawDataProviderTool
+  
+    
+  # load the TRTRawDataProvider
+  from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProvider
+  InDetTRTRawDataProvider = TRTRawDataProvider(name         = "InDetTRTRawDataProvider",
+                                               RDOKey       = "TRT_RDOs",
+                                                ProviderTool = InDetTRTRawDataProviderTool)
+  
+  if ( viewTest ):
+    allViewAlgorithms += InDetTRTRawDataProvider
+    allViewAlgorithms.InDetTRTRawDataProvider.isRoI_Seeded = True
+    allViewAlgorithms.InDetTRTRawDataProvider.RoIs = "EMViewRoIs"
+    svcMgr.ViewAlgPool.TopAlg += [ "InDetTRTRawDataProvider" ]
+    topSequence.viewMaker.AlgorithmNameSequence += [ "InDetTRTRawDataProvider" ]
+  else:
+    topSequence += InDetTRTRawDataProvider
+    topSequence.InDetTRTRawDataProvider.isRoI_Seeded = True
+    topSequence.InDetTRTRawDataProvider.RoIs = "EMRoIs"
+  
+  
+  #Pixel clusterisation
+  
+  from SiClusterizationTool.SiClusterizationToolConf import InDet__ClusterMakerTool
+  InDetClusterMakerTool = InDet__ClusterMakerTool(name                 = "InDetClusterMakerTool",
+      PixelCalibSvc        = None,
+      PixelOfflineCalibSvc = None,
+      UsePixelCalibCondDB  = False)
+  
+  ToolSvc += InDetClusterMakerTool
+  
+  
+  from SiClusterizationTool.SiClusterizationToolConf import InDet__MergedPixelsTool
+  InDetMergedPixelsTool = InDet__MergedPixelsTool(name                    = "InDetMergedPixelsTool",
+                                                  globalPosAlg            = InDetClusterMakerTool,
+                                                  MinimalSplitSize        = 0,
+                                                  MaximalSplitSize        = 49,
+                                                  MinimalSplitProbability = 0,
+                                                  DoIBLSplitting = True,
+                                                  SplitClusterAmbiguityMap= InDetKeys.SplitClusterAmbiguityMap())
+  ToolSvc += InDetMergedPixelsTool
+  
+  from SiClusterizationTool.SiClusterizationToolConf import InDet__PixelGangedAmbiguitiesFinder
+  InDetPixelGangedAmbiguitiesFinder = InDet__PixelGangedAmbiguitiesFinder(name = "InDetPixelGangedAmbiguitiesFinder")
+  ToolSvc += InDetPixelGangedAmbiguitiesFinder
+  
+  from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__PixelClusterization
+  InDetPixelClusterization = InDet__PixelClusterization(name                    = "InDetPixelClusterization",
+                                                        clusteringTool          = InDetMergedPixelsTool,
+                                                        gangedAmbiguitiesFinder = InDetPixelGangedAmbiguitiesFinder,
+                                                        DetectorManagerName     = InDetKeys.PixelManager(),
+                                                        DataObjectName          = InDetKeys.PixelRDOs(),
+                                                        ClustersName            = "PixelTrigClusters")
+  if ( viewTest ):
+    allViewAlgorithms += InDetPixelClusterization
+    allViewAlgorithms.InDetPixelClusterization.isRoI_Seeded = True
+    allViewAlgorithms.InDetPixelClusterization.RoIs = "EMViewRoIs"
+    svcMgr.ViewAlgPool.TopAlg += [ "InDetPixelClusterization" ]
+    topSequence.viewMaker.AlgorithmNameSequence += [ "InDetPixelClusterization" ]
+  else:
+    topSequence += InDetPixelClusterization
+    topSequence.InDetPixelClusterization.isRoI_Seeded = True
+    topSequence.InDetPixelClusterization.RoIs = "EMRoIs"
+  
+  
+  
+  #
+  # --- SCT_ClusteringTool (public)
+  #
+  from SiClusterizationTool.SiClusterizationToolConf import InDet__SCT_ClusteringTool
+  InDetSCT_ClusteringTool = InDet__SCT_ClusteringTool(name              = "InDetSCT_ClusteringTool",
+                                                      globalPosAlg      = InDetClusterMakerTool,
+                                                      conditionsService = InDetSCT_ConditionsSummarySvc)
+  #
+  # --- SCT_Clusterization algorithm
+  #
+  from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__SCT_Clusterization
+  InDetSCT_Clusterization = InDet__SCT_Clusterization(name                    = "InDetSCT_Clusterization",
+                                                      clusteringTool          = InDetSCT_ClusteringTool,
+                                                      # ChannelStatus         = InDetSCT_ChannelStatusAlg,
+                                                      DetectorManagerName     = InDetKeys.SCT_Manager(),
+                                                      DataObjectName          = InDetKeys.SCT_RDOs(),
+                                                      ClustersName            = "SCT_TrigClusters",
+                                                      conditionsService       = InDetSCT_ConditionsSummarySvc,
+                                                      FlaggedConditionService = InDetSCT_FlaggedConditionSvc)
+  
+  if ( viewTest ):
+    allViewAlgorithms += InDetSCT_Clusterization
+    allViewAlgorithms.InDetSCT_Clusterization.isRoI_Seeded = True
+    allViewAlgorithms.InDetSCT_Clusterization.RoIs = "EMViewRoIs"
+    svcMgr.ViewAlgPool.TopAlg += [ "InDetSCT_Clusterization" ]
+    topSequence.viewMaker.AlgorithmNameSequence += [ "InDetSCT_Clusterization" ]
+  else:
+    topSequence += InDetSCT_Clusterization
+    topSequence.InDetSCT_Clusterization.isRoI_Seeded = True
+    topSequence.InDetSCT_Clusterization.RoIs = "EMRoIs"
+  
+  
+  #Space points and FTF
+  
+  from SiSpacePointTool.SiSpacePointToolConf import InDet__SiSpacePointMakerTool
+  InDetSiSpacePointMakerTool = InDet__SiSpacePointMakerTool(name = "InDetSiSpacePointMakerTool")
+  ToolSvc += InDetSiSpacePointMakerTool
+  
+  from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiTrackerSpacePointFinder
+  InDetSiTrackerSpacePointFinder = InDet__SiTrackerSpacePointFinder(name                   = "InDetSiTrackerSpacePointFinder",
+                                                                    SiSpacePointMakerTool  = InDetSiSpacePointMakerTool,
+                                                                    PixelsClustersName     = "PixelTrigClusters",
+                                                                    SCT_ClustersName       = "SCT_TrigClusters",
+                                                                    SpacePointsPixelName   = "PixelTrigSpacePoints",
+                                                                    SpacePointsSCTName     = "SCT_TrigSpacePoints",
+                                                                    SpacePointsOverlapName = InDetKeys.OverlapSpacePoints(),
+                                                                    ProcessPixels          = DetFlags.haveRIO.pixel_on(),
+                                                                    ProcessSCTs            = DetFlags.haveRIO.SCT_on(),
+                                                                    ProcessOverlaps        = DetFlags.haveRIO.SCT_on())
+  
+  
+  from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_eGamma
+  theFTF = TrigFastTrackFinder_eGamma()
+  
+  if ( viewTest ):
+    allViewAlgorithms += InDetSiTrackerSpacePointFinder
+    allViewAlgorithms += theFTF
+    allViewAlgorithms.TrigFastTrackFinder_eGamma.isRoI_Seeded = True
+    allViewAlgorithms.TrigFastTrackFinder_eGamma.RoIs = "EMViewRoIs"
+    svcMgr.ViewAlgPool.TopAlg += [ "InDetSiTrackerSpacePointFinder", "TrigFastTrackFinder_eGamma" ]
+    topSequence.viewMaker.AlgorithmNameSequence += [ "InDetSiTrackerSpacePointFinder", "TrigFastTrackFinder_eGamma" ]
+  else:
+    topSequence += InDetSiTrackerSpacePointFinder
+    theFTF.RoIs = "EMRoIs"
+    topSequence += theFTF
+
+if TriggerFlags.doCalo:
+  svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False
+  
+  from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_FastAlgo
+  algo=T2CaloEgamma_FastAlgo("testFastAlgo")
+  algo.OutputLevel=VERBOSE
+  #TopHLTSeq += algo
+
+  if ( viewTest ):
+    algo.RoIs="EMViewRoIs"
+    allViewAlgorithms += algo
+    svcMgr.ViewAlgPool.TopAlg += [ "testFastAlgo" ]
+    topSequence.viewMaker.AlgorithmNameSequence += [ "testFastAlgo" ]
+  else:
+    algo.RoIs="EMRoIs"
+    topSequence += algo
+
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/L1CF.py b/Trigger/TrigValidation/TrigUpgradeTest/share/L1CF.py
index e0e800016bf1d26f7512a8f5f93492a685da220a..2a916e305958bf4672ee7ce54c6f62082a69af14 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/L1CF.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/L1CF.py
@@ -1,11 +1,14 @@
 from AthenaCommon.AlgSequence import AlgSequence, AthSequencer
 topSequence = AlgSequence()
 
-from TrigUpgradeTest.CFElements import *
+from AthenaCommon.CFElements import parOR, seqAND
 
 TopHLTSeq = seqAND("TopHLTSeq")
 topSequence += TopHLTSeq
 
+
+
+
 L1UnpackingSeq = parOR("L1UnpackingSeq")
 from L1Decoder.L1DecoderConf import CTPUnpackingEmulationTool, RoIsUnpackingEmulationTool, L1Decoder
 l1Decoder = L1Decoder( OutputLevel=DEBUG, RoIBResult="" )
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/SignatureDicts.py b/Trigger/TrigValidation/TrigUpgradeTest/share/SignatureDicts.py
new file mode 100644
index 0000000000000000000000000000000000000000..df085d3f91b1511874a90a87996632f2d5375266
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/SignatureDicts.py
@@ -0,0 +1,167 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+from AthenaCommon.Logging import logging
+logging.getLogger().info("Importing %s",__name__)
+logSignatureDict = logging.getLogger("TriggerMenu.menu.SignatureDicts")
+from copy import deepcopy
+
+#==========================================================
+##This is stored in chainDict['Signature']
+#==========================================================
+SliceIDDict = {
+    'Electron': 'e',
+    'Photon'  : 'g',
+    'Muon'    : 'mu',
+}
+
+#==========================================================
+# ---- Generic Template for all chains          ----
+# ---- chainParts specific information given in ----
+# ---- signature specific dictionaries below    ----
+#==========================================================
+ChainDictTemplate = {
+    'chainName'    : '',
+    'L1item'        : '',
+    'signatures'    : '',
+    'chainParts'   : [],
+}
+
+#==========================================================
+# Muon 
+#==========================================================
+# ---- Muon Dictinary of all allowed Values ----
+MuonChainParts = {
+    'signature'      : ['Muon'],
+    'L1item'         : '',
+    'chainPartName'  : '',
+    'multiplicity'   : '',    
+    'trigType'       : ['mu'],
+    'etaRange'       : ['0eta105', '0eta250','0eta010','0eta500'],
+    'threshold'      : '',
+    'extra'          : ['noL1'],
+    'hypo_iso'       : ['iloose', 'imedium', 'itight',],
+    'fex_reco'       : ['msonly', 'l2msonly', 'l2idonly',],
+    'overlapRemoval' : ['wOvlpRm', 'noOvlpRm', 'noMuCombOvlpRm'],
+    }
+# ---- MuonDictinary of default Values ----
+MuonChainParts_Default = {
+    'signature'      : ['Muon'],
+    'L1item'         : '',
+    'multiplicity'   : '',    
+    'trigType'       : ['mu'],
+    'etaRange'       : '0eta250',    
+    'threshold'      : '',
+    'extra'          : '',    
+    'hypo_iso'       : '',    
+    'fex_reco'       : '',    
+    'overlapRemoval' : ['wOvlpRm'],
+    }
+
+#==========================================================
+# Electron Chains
+#==========================================================
+# ---- Electron Dictinary of all allowed Values ----
+ElectronChainParts = {
+    'signature'      : ['Electron'],
+    'multiplicity'   : '',    
+    'chainPartName'  : '',
+    'L1item'         : '',
+    'extra'          : 'ion',
+    'trigType'       : ['e'],
+    'threshold'      : '',
+    'etaRange'       : ['0eta250', '250eta490'],
+    'IDinfo'         : ['loose', 'medium', 'tight', 'lhloose', 'lhmedium', 'lhtight',],
+    'isoInfo'        : ['iloose','ivarloose','ivarmedium','ivartight',],
+    'trkInfo'        : ['fasttr', 'hlttr', 'IDTrkNoCut','FwdBackTrk','idperf'],
+    'lhInfo'         : ['nod0','nodphires','nodeta','smooth'],
+    'addInfo'        : ['etcut','ringer','noringer',]                        
+    }
+# ---- Egamma Dictinary of default Values ----
+ElectronChainParts_Default = {
+    'signature'      : ['Electron'],
+    'multiplicity'   : '',    
+    'L1item'         : '',
+    'trigType'       : '',
+    'threshold'      : '',
+    'etaRange'       : '0eta250',
+    'extra'          : '',
+    'IDinfo'         : '',
+    'isoInfo'        : [],
+    'trkInfo'        : '',
+    'lhInfo'         : '',
+    'addInfo'        : [],
+    }
+
+
+#==========================================================
+# Photon chains
+#==========================================================
+# ---- Photon Dictinary of all allowed Values ----
+PhotonChainParts = {
+    'L1item'         : '',
+    'signature'      : ['Photon'],
+    'chainPartName'  : '',
+    'multiplicity'   : '',    
+    'trigType'       : ['g'],
+    'threshold'      : '',
+    'extra'          : '',
+    'IDinfo'         : ['loose', 'medium', 'tight', ],
+    'isoInfo'        : ['ivloose','iloose','imedium','itight', ],
+    'reccalibInfo'   : ['MSonly', 'MGonly'],
+    'trkInfo'        : ['fasttr', 'hlttr', 'ftk'],
+    'addInfo'        : ['etcut','ringer'],
+    }
+
+# ---- Photon Dictinary of default Values ----
+PhotonChainParts_Default = {
+    'signature'      : ['Photon'],
+    'L1item'         : '',
+    'multiplicity'   : '',    
+    'trigType'       : '',
+    'threshold'      : '',
+    'extra'          : '',
+    'IDinfo'         : '',
+    'isoInfo'        : [],
+    'reccalibInfo'   : '',
+    'trkInfo'        : '',
+    'addInfo'        : [],
+    }
+
+
+#==========================================================
+def getSignatureNameFromToken(chainpart):
+    theMatchingTokens = []
+    reverseSliceIDDict = dict([(value, key) for key, value in SliceIDDict.iteritems()]) #reversed SliceIDDict
+    for sig,token in SliceIDDict.items():
+            if (token in chainpart):
+                theMatchingTokens += [token]
+    theToken = max(theMatchingTokens, key=len) # gets the longest string in t
+    if len(theMatchingTokens)>0:
+        if len(theMatchingTokens)>1:
+            logSignatureDict.info('There are several signatures tokens, %s, matching this chain part %s. Picked %s.' % (theMatchingTokens,chainpart,theToken))            
+        return reverseSliceIDDict[theToken]
+    logSignatureDict.error('No signature matching chain part %s was found.' % (chainpart))
+    return False
+
+            
+#==========================================================
+def getSignatureInformation(signature):
+    if signature == 'Electron':
+        return [ElectronChainParts_Default, ElectronChainParts]
+    if signature == 'Photon':
+        return [PhotonChainParts_Default, PhotonChainParts]
+    if (signature == "Muon"):
+        return [MuonChainParts_Default, MuonChainParts]
+    else:
+        raise RuntimeError("ERROR Cannot find corresponding dictionary")
+
+
+#==========================================================
+def getBasePattern():
+    import re
+    allTrigTypes = SliceIDDict.values()
+    possibleTT = '|'.join(allTrigTypes)
+    pattern = re.compile("(?P<multiplicity>\d*)(?P<trigType>(%s))(?P<threshold>\d+)(?P<extra>\w*)" % (possibleTT))
+    return pattern
+
+
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/TriggerMenuMT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/TriggerMenuMT.py
new file mode 100644
index 0000000000000000000000000000000000000000..4339e1bb59db0935f3f30cb0a15ee0936e41901e
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/TriggerMenuMT.py
@@ -0,0 +1,78 @@
+#-------------------------
+# Imports
+#-------------------------
+# logging 
+from AthenaCommon.Logging import logging
+logging.getLogger().info("Importing %s",__name__)
+log = logging.getLogger('TriggerMenuMT')
+
+include("TrigUpgradeTest/DictFromChainName.py")
+
+#-------------------------
+# List of chains to run
+#-------------------------
+def triggerMenuList():
+    # --- Input formate for now:
+    # --- ['chainName',  'L1itemforchain']
+
+    electrons =[
+        ['HLT_e20', 'L1_EM15'],
+        ['HLT_e30', 'L1_EM24VHI'],
+        ['HLT_e30_ringer', 'L1_EM24VHI'],
+        ]
+
+    photons = [ 
+        ['HLT_g100', 'L1_EM24VHI'],
+        ['HLT_2g50', 'L1_2EM15VH' ],
+        ]
+
+    muons =[
+        ['HLT_mu20', 'L1_MU20' ],
+        ['HLT_mu8', 'L1_MU6'],
+        ['HLT_2mu8', 'L1_2MU4'],
+        ]
+    
+    allchains = electrons + photons + muons
+    log.info('List of all chains to run: %s', allchains)
+    return allchains
+
+
+#-------------------------
+# GenerateMenu class:
+# assembels it all
+#-------------------------
+class GenerateMenu:
+
+    def generate(self):
+        log.info('GenerateMenu.generate')
+        
+        # get names of chains to be generated
+        chainsInMenu = triggerMenuList()
+        log.info('chainsInMenu %s', chainsInMenu)
+        
+        # get chain dict for each chain
+        myChainDict = DictFromChainName()
+    
+        for chain in chainsInMenu:
+            log.info('Processing chain:  %s', chain)
+            chainDicts = myChainDict.getChainDict(chain)
+        
+        import pprint
+        pp = pprint.PrettyPrinter(indent=4, depth=8)
+        log.info('FINAL dictionary: %s', pp.pformat(chainDicts))
+                
+        # use info from dictionary to send it to the right signature
+                    
+        # in the relevant signature, use the info from dict to assemble the correct 
+
+
+
+
+    
+
+
+
+
+
+
+    
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/cfTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/cfTest.py
index 22bc8b7ee9869fb430ecaca16b3de4f10789542c..88339647c996133bd4dd0c6d6a29a08d785d7d7a 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/cfTest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/cfTest.py
@@ -32,7 +32,7 @@ svcMgr.ForwardSchedulerSvc.ShowControlFlow=True
 # topSequence += SGInputLoader( OutputLevel=INFO, ShowEventDump=False )
 # topSequence.SGInputLoader.Load = [ ('ROIB::RoIBResult','RoIBResult') ]
 
-
+from AthenaCommon.CFElements import stepSeq
 
 
 data = {'noreco': [';', ';', ';']}  # in the lists there are the events
@@ -74,8 +74,8 @@ data['photons'] = ['eta:1,phi:1,pt:130000;',
 from TrigUpgradeTest.TestUtils import writeEmulationFiles
 writeEmulationFiles(data)
 
-include("TrigUpgradetest/L1CF.py")
-include("TrigUpgradetest/HLTCF.py")
+include("TrigUpgradeTest/L1CF.py")
+include("TrigUpgradeTest/HLTCF.py")
 
 
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/ID_RawDataMT_Trigger.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
similarity index 55%
rename from Trigger/TrigValidation/TrigUpgradeTest/share/ID_RawDataMT_Trigger.py
rename to Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
index 108abe7715e6c2cade8936f414aaf6654d931ead..658ebdf6670f71ae12ec6188bf23ea1e969bff8b 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/ID_RawDataMT_Trigger.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
@@ -2,135 +2,88 @@
 #  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 #
 
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.DetGeo.set_Value_and_Lock('atlas')
-globalflags.Luminosity.set_Value_and_Lock('zero')
-globalflags.DataSource.set_Value_and_Lock('data')
-globalflags.InputFormat.set_Value_and_Lock('bytestream')
-globalflags.DatabaseInstance.set_Value_and_Lock('CONDBR2')
-
-
-from AthenaCommon.AlgScheduler import AlgScheduler
-AlgScheduler.OutputLevel( INFO )
-AlgScheduler.CheckDependencies( True )
-AlgScheduler.ShowControlFlow( True )
-AlgScheduler.ShowDataDependencies( True )
-AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
- 
-from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-03-01-00"
- 
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.Calo_setOff()  #Switched off to avoid geometry
-DetFlags.ID_setOn()
-DetFlags.Muon_setOff()
-DetFlags.Truth_setOff()
-DetFlags.LVL1_setOff()
-DetFlags.digitize.all_setOff()
+include("TrigUpgradeTest/testHLT_MT.py")
 
-from InDetRecExample.InDetJobProperties import InDetFlags
-InDetFlags.doCaloSeededBrem = False
+#workaround to prevent online trigger folders to be enabled
+from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
+InDetTrigFlags.useConditionsClasses.set_Value_and_Lock(False)
 
-#DetFlags.haveRIO.all_off()
-#DetFlags.haveRIO.TRT_on()
-#DetFlags.haveRIO.pixel_setOff()
-#DetFlags.haveRIO.SCT_setOff()
-#DetFlags.TRT_setOn()
-#include("InDetRecExample/InDetRecConditionsAccess.py")
 
-#DetFlags.Print()
- 
-theApp.EvtMax=1000
+from InDetRecExample.InDetJobProperties import InDetFlags
+InDetFlags.doCaloSeededBrem = False
 
-from IOVDbSvc.CondDB import conddb
-conddb.setGlobalTag("CONDBR2-BLKPA-2015-17")
-#conddb.addFolder("TRT_ONL","/TRT/Onl/ROD/Compress")
-#conddb.addFolder("TRT_OFL","/TRT/Calib/HTCalib")
-#conddb.addFolder("TRT_OFL","/TRT/Calib/ToTCalib")
-#conddb.addFolder("TRT_OFL","/TRT/Calib/RT")
-#conddb.addFolder("TRT_OFL","/TRT/Calib/T0")
 
+from InDetRecExample.InDetJobProperties import InDetFlags
+InDetFlags.InDet25nsec = True 
+InDetFlags.doPrimaryVertex3DFinding = False 
+InDetFlags.doPrintConfigurables = False
+InDetFlags.doResolveBackTracks = True 
+InDetFlags.doSiSPSeededTrackFinder = True
+InDetFlags.doTRTPhaseCalculation = True
+InDetFlags.doTRTSeededTrackFinder = True
+InDetFlags.doTruth = False
+InDetFlags.init()
 
- #Set up GeoModel (not really needed but crashes without)
-from AtlasGeoModel import SetGeometryVersion
-from AtlasGeoModel import GeoModelInit
+# PixelLorentzAngleSvc and SCTLorentzAngleSvc
+include("InDetRecExample/InDetRecConditionsAccess.py")
 
-from AthenaCommon.AlgSequence import AlgSequence 
+viewTest = opt.enableViews   # from testHLT_MT.py
+from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
-from SGComps.SGCompsConf import SGInputLoader
-topSequence += SGInputLoader( )
+if viewTest:
+  allViewAlgorithms = topSequence.allViewAlgorithms
 
-# -------------------- Condition Data Access --------------------------------
-# Conditions Service for reading conditions data in serial and MT Athena
+from InDetRecExample.InDetKeys import InDetKeys
 
-from IOVSvc.IOVSvcConf import CondSvc
-svcMgr += CondSvc()
 
-# Special Condition Sequence for CondInputLoader and client Condition Algorithms
-from AthenaCommon.AlgSequence import AthSequencer
-condSeq = AthSequencer("AthCondSeq")
+# provide a minimal menu information
+#topSequence.L1DecoderTest.ctpUnpacker.CTPToChainMapping = ['0:HLT_e3', '0:HLT_e5', '1:HLT_e7', '1:HLT_e10']
+topSequence.L1DecoderTest.ctpUnpacker.OutputLevel=DEBUG
 
-# CondInputLoader and Condition Store
-from IOVSvc.IOVSvcConf import CondInputLoader
-condSeq += CondInputLoader( "CondInputLoader")
+#topSequence.L1DecoderTest.roiUnpackers[0].ThresholdToChainMapping = ['EM3 : HLT_e3', 'EM3 : HLT_e5', 'EM7 : HLT_e7', 'EM7 : HLT_e10']
+topSequence.L1DecoderTest.roiUnpackers[0].OutputLevel=DEBUG
+#topSequence.L1DecoderTest.roi[].ThresholdToChainMapping = ['EM3 : HLT_e3', 'EM3 : HLT_e5', 'EM7 : HLT_e7', 'EM7 : HLT_e10']
 
-include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
-inputfile="root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data16_13TeV.00309640.physics_EnhancedBias.merge.RAW/data16_13TeV.00309640.physics_EnhancedBias.merge.RAW._lb0628._SFO-1._0001.1"
-svcMgr.ByteStreamInputSvc.FullFileName=[inputfile,]
-from AthenaCommon.AthenaCommonFlags  import athenaCommonFlags
-athenaCommonFlags.FilesInput=[inputfile,]
 
-from TrigConfigSvc.TrigConfigSvcConf import TrigConf__LVL1ConfigSvc
-from TrigConfigSvc.TrigConfigSvcConfig import findFileInXMLPATH
-from TriggerJobOpts.TriggerFlags import TriggerFlags
+from TrigT2CaloEgamma.TrigT2CaloEgammaConfig import T2CaloEgamma_FastAlgo
+theFastCaloAlgo=T2CaloEgamma_FastAlgo("FastCaloAlgo" )
+theFastCaloAlgo.OutputLevel=VERBOSE
+theFastCaloAlgo.ClustersName="L2CaloClusters"
+svcMgr.ToolSvc.TrigDataAccess.ApplyOffsetCorrection=False
 
-l1svc = TrigConf__LVL1ConfigSvc("LVL1ConfigSvc")
-l1svc.XMLMenuFile = findFileInXMLPATH(TriggerFlags.inputLVL1configFile())
-svcMgr += l1svc
+from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
+if viewTest:
+  allViewAlgorithms += theFastCaloAlgo
+  svcMgr.ViewAlgPool.TopAlg += [ theFastCaloAlgo.getName() ]
+  l2CaloViewsMaker = EventViewCreatorAlgorithm("l2CaloViewsMaker", OutputLevel=DEBUG)
+  topSequence += l2CaloViewsMaker
+  l2CaloViewsMaker.Decisions = "EMRoIDecisions" # from EMRoIsUnpackingTool
+  l2CaloViewsMaker.RoIsLink = "initialRoI" # -||-
+  l2CaloViewsMaker.InViewRoIs = "EMCaloRoIs" # contract with the fastCalo
+  l2CaloViewsMaker.Views = "EMCaloViews"
+  l2CaloViewsMaker.AlgorithmNameSequence = [ theFastCaloAlgo.getName() ]
+  theFastCaloAlgo.RoIs = l2CaloViewsMaker.InViewRoIs
 
-if not hasattr( svcMgr, "ByteStreamAddressProviderSvc" ):
-    from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ByteStreamAddressProviderSvc 
-    svcMgr += ByteStreamAddressProviderSvc()
 
-svcMgr.ByteStreamAddressProviderSvc.TypeNames += [
-    "ROIB::RoIBResult/RoIBResult" ]
+  from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2CaloHypoAlg
+  from TrigEgammaHypo.TrigL2CaloHypoTool import TrigL2CaloHypoToolFromName
+  theFastCaloHypo = TrigL2CaloHypoAlg("L2CaloHypo")
+  theFastCaloHypo.OutputLevel = DEBUG
+  theFastCaloHypo.Views = l2CaloViewsMaker.Views
+  theFastCaloHypo.CaloClusters = theFastCaloAlgo.ClustersName
+  theFastCaloHypo.RoIs = l2CaloViewsMaker.InViewRoIs
+  theFastCaloHypo.Decisions = "EgammaCaloDecisions"
+  theFastCaloHypo.HypoTools =  [ TrigL2CaloHypoToolFromName("HLT_e5_etcut"),   TrigL2CaloHypoToolFromName("HLT_e7_etcut") ]
+  for t in theFastCaloHypo.HypoTools:
+    t.OutputLevel = DEBUG
 
+  topSequence += theFastCaloHypo
 
-from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ROBDataProviderSvc
-ServiceMgr += ROBDataProviderSvc()
+else:
+  topSequence += theFastCaloAlgo
 
-#Run calo decoder
-from L1Decoder.L1DecoderConf import L1CaloDecoder
-caloDecoder = L1CaloDecoder() # by default it is steered towards the RoIBResult of the name above
-topSequence += caloDecoder
 
-from InDetRecExample.InDetJobProperties import InDetFlags
-InDetFlags.InDet25nsec = True 
-InDetFlags.doPrimaryVertex3DFinding = False 
-InDetFlags.doPrintConfigurables = False
-InDetFlags.doResolveBackTracks = True 
-InDetFlags.doSiSPSeededTrackFinder = True
-InDetFlags.doTRTPhaseCalculation = True
-InDetFlags.doTRTSeededTrackFinder = True
-InDetFlags.doTruth = False
-InDetFlags.init()
-#Determine whether we're running in threaded mode (threads= >=1)
-from AthenaCommon.ConcurrencyFlags import jobproperties as jp
-nThreads = jp.ConcurrencyFlags.NumThreads()
 
-if nThreads >= 1:
-  ## get a handle on the Scheduler
-  from AthenaCommon.AlgScheduler import AlgScheduler
-  AlgScheduler.CheckDependencies( True )
-
-import MagFieldServices.SetupField
-
-# PixelLorentzAngleSvc and SCTLorentzAngleSvc
-include("InDetRecExample/InDetRecConditionsAccess.py")
-
-from InDetRecExample.InDetKeys import InDetKeys
-
-include ("InDetRecExample/InDetRecCabling.py")
 
 #Pixel
 
@@ -149,13 +102,8 @@ if (InDetFlags.doPrintConfigurables()):
 from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConf import PixelRawDataProvider
 InDetPixelRawDataProvider = PixelRawDataProvider(name         = "InDetPixelRawDataProvider",
                                                  RDOKey       = InDetKeys.PixelRDOs(),
-                                                 ProviderTool = InDetPixelRawDataProviderTool)
-topSequence += InDetPixelRawDataProvider
-topSequence.InDetPixelRawDataProvider.isRoI_Seeded = True
-topSequence.InDetPixelRawDataProvider.RoIs = "OutputRoIs"
-if (InDetFlags.doPrintConfigurables()):
-  print          InDetPixelRawDataProvider
-
+                                                 ProviderTool = InDetPixelRawDataProviderTool,
+                                                 isRoI_Seeded = True )
 
 #SCT
 from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCT_RodDecoder
@@ -173,12 +121,11 @@ if (InDetFlags.doPrintConfigurables()):
 # load the SCTRawDataProvider
 from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConf import SCTRawDataProvider
 InDetSCTRawDataProvider = SCTRawDataProvider(name         = "InDetSCTRawDataProvider",
-                                            RDOKey       = InDetKeys.SCT_RDOs(),
-                                            ProviderTool = InDetSCTRawDataProviderTool)
+                                             RDOKey       = InDetKeys.SCT_RDOs(),
+                                             ProviderTool = InDetSCTRawDataProviderTool,
+                                             isRoI_Seeded = True )
+
 
-topSequence += InDetSCTRawDataProvider
-topSequence.InDetSCTRawDataProvider.isRoI_Seeded = True
-topSequence.InDetSCTRawDataProvider.RoIs = "OutputRoIs"
 
 #TRT
 from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_CalDbSvc
@@ -189,10 +136,6 @@ from TRT_ConditionsServices.TRT_ConditionsServicesConf import TRT_StrawStatusSum
 InDetTRTStrawStatusSummarySvc = TRT_StrawStatusSummarySvc(name = "InDetTRTStrawStatusSummarySvc")
 ServiceMgr += InDetTRTStrawStatusSummarySvc
 
-from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
-topSequence+=xAODMaker__EventInfoCnvAlg()
-
-
 from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRT_RodDecoder
 InDetTRTRodDecoder = TRT_RodDecoder(name = "InDetTRTRodDecoder",
                                     LoadCompressTableDB = True)#(globalflags.DataSource() != 'geant4'))  
@@ -208,18 +151,13 @@ ToolSvc += InDetTRTRawDataProviderTool
 from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConf import TRTRawDataProvider
 InDetTRTRawDataProvider = TRTRawDataProvider(name         = "InDetTRTRawDataProvider",
                                              RDOKey       = "TRT_RDOs",
-                                              ProviderTool = InDetTRTRawDataProviderTool)
-topSequence += InDetTRTRawDataProvider
-topSequence.InDetTRTRawDataProvider.isRoI_Seeded = True
-topSequence.InDetTRTRawDataProvider.RoIs = "OutputRoIs"
-  
+                                             ProviderTool = InDetTRTRawDataProviderTool,
+                                             isRoI_Seeded = True
+                                             )
 
 
-include ("InDetRecExample/ConfiguredInDetPreProcessingTRT.py")
-InDetPreProcessingTRT = ConfiguredInDetPreProcessingTRT(True,False)
 
-
-include("InDetBeamSpotService/BeamCondSvc.py")
+#Pixel clusterisation
 
 from SiClusterizationTool.SiClusterizationToolConf import InDet__ClusterMakerTool
 InDetClusterMakerTool = InDet__ClusterMakerTool(name                 = "InDetClusterMakerTool",
@@ -231,7 +169,7 @@ ToolSvc += InDetClusterMakerTool
 
 
 from SiClusterizationTool.SiClusterizationToolConf import InDet__MergedPixelsTool
-InDetMergedPixelsTool = InDet__MergedPixelsTool(name                    = "InDetMergedPixelsTool", 
+InDetMergedPixelsTool = InDet__MergedPixelsTool(name                    = "InDetMergedPixelsTool",
                                                 globalPosAlg            = InDetClusterMakerTool,
                                                 MinimalSplitSize        = 0,
                                                 MaximalSplitSize        = 49,
@@ -248,12 +186,10 @@ from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__Pixel
 InDetPixelClusterization = InDet__PixelClusterization(name                    = "InDetPixelClusterization",
                                                       clusteringTool          = InDetMergedPixelsTool,
                                                       gangedAmbiguitiesFinder = InDetPixelGangedAmbiguitiesFinder,
-                                                      DetectorManagerName     = InDetKeys.PixelManager(), 
+                                                      DetectorManagerName     = InDetKeys.PixelManager(),
                                                       DataObjectName          = InDetKeys.PixelRDOs(),
-                                                      ClustersName            = InDetKeys.PixelClusters())
-topSequence += InDetPixelClusterization
-topSequence.InDetPixelClusterization.isRoI_Seeded = True
-topSequence.InDetPixelClusterization.RoIs = "OutputRoIs"
+                                                      ClustersName            = "PixelTrigClusters",
+                                                      isRoI_Seeded            = True)
 
 #
 # --- SCT_ClusteringTool (public)
@@ -269,14 +205,16 @@ from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__SCT_C
 InDetSCT_Clusterization = InDet__SCT_Clusterization(name                    = "InDetSCT_Clusterization",
                                                     clusteringTool          = InDetSCT_ClusteringTool,
                                                     # ChannelStatus         = InDetSCT_ChannelStatusAlg,
-                                                    DetectorManagerName     = InDetKeys.SCT_Manager(), 
+                                                    DetectorManagerName     = InDetKeys.SCT_Manager(),
                                                     DataObjectName          = InDetKeys.SCT_RDOs(),
-                                                    ClustersName            = InDetKeys.SCT_Clusters(),
+                                                    ClustersName            = "SCT_TrigClusters",
                                                     conditionsService       = InDetSCT_ConditionsSummarySvc,
-                                                    FlaggedConditionService = InDetSCT_FlaggedConditionSvc)
-topSequence += InDetSCT_Clusterization
-topSequence.InDetSCT_Clusterization.isRoI_Seeded = True
-topSequence.InDetSCT_Clusterization.RoIs = "OutputRoIs"
+                                                    FlaggedConditionService = InDetSCT_FlaggedConditionSvc, 
+                                                    isRoI_Seeded            = True )
+
+
+
+#Space points and FTF
 
 from SiSpacePointTool.SiSpacePointToolConf import InDet__SiSpacePointMakerTool
 InDetSiSpacePointMakerTool = InDet__SiSpacePointMakerTool(name = "InDetSiSpacePointMakerTool")
@@ -285,19 +223,80 @@ ToolSvc += InDetSiSpacePointMakerTool
 from SiSpacePointFormation.SiSpacePointFormationConf import InDet__SiTrackerSpacePointFinder
 InDetSiTrackerSpacePointFinder = InDet__SiTrackerSpacePointFinder(name                   = "InDetSiTrackerSpacePointFinder",
                                                                   SiSpacePointMakerTool  = InDetSiSpacePointMakerTool,
-                                                                  PixelsClustersName     = InDetKeys.PixelClusters(),
-                                                                  SCT_ClustersName       = InDetKeys.SCT_Clusters(),
-                                                                  SpacePointsPixelName   = InDetKeys.PixelSpacePoints(),
-                                                                  SpacePointsSCTName     = InDetKeys.SCT_SpacePoints(),
+                                                                  PixelsClustersName     = "PixelTrigClusters",
+                                                                  SCT_ClustersName       = "SCT_TrigClusters",
+                                                                  SpacePointsPixelName   = "PixelTrigSpacePoints",
+                                                                  SpacePointsSCTName     = "SCT_TrigSpacePoints",
                                                                   SpacePointsOverlapName = InDetKeys.OverlapSpacePoints(),
                                                                   ProcessPixels          = DetFlags.haveRIO.pixel_on(),
                                                                   ProcessSCTs            = DetFlags.haveRIO.SCT_on(),
                                                                   ProcessOverlaps        = DetFlags.haveRIO.SCT_on())
-topSequence += InDetSiTrackerSpacePointFinder
+
 
 from TrigFastTrackFinder.TrigFastTrackFinder_Config import TrigFastTrackFinder_eGamma
 theFTF = TrigFastTrackFinder_eGamma()
-theFTF.outputLevel=VERBOSE
+theFTF.OutputLevel = DEBUG
+
+from TrigInDetConf.TrigInDetRecCommonTools import InDetTrigFastTrackSummaryTool
+from TrigInDetConf.TrigInDetPostTools import  InDetTrigParticleCreatorToolFTF
+
+from InDetTrigParticleCreation.InDetTrigParticleCreationConf import InDet__TrigTrackingxAODCnvMT
+theTrackParticleCreatorAlg = InDet__TrigTrackingxAODCnvMT(name = "InDetTrigTrackParticleCreatorAlg",
+                                                         doIBLresidual = False,
+                                                         TrackName = "TrigFastTrackFinder_Tracks",
+                                                         TrackParticlesName = "xAODTracks",
+                                                         ParticleCreatorTool = InDetTrigParticleCreatorToolFTF)
+
+IDSequence = [ InDetPixelRawDataProvider, InDetSCTRawDataProvider, InDetTRTRawDataProvider, InDetPixelClusterization, InDetSCT_Clusterization, InDetSiTrackerSpacePointFinder, theFTF, theTrackParticleCreatorAlg ]
+
+
+from TrigEgammaHypo.TrigL2ElectronFexMTConfig import L2ElectronFex_1
+theElectronFex= L2ElectronFex_1()
+theElectronFex.TrigEMClusterName = theFastCaloAlgo.ClustersName
+theElectronFex.TrackParticlesName = theTrackParticleCreatorAlg.TrackParticlesName
+theElectronFex.ElectronsName="Electrons"
+theElectronFex.OutputLevel=VERBOSE
+
+
+if viewTest:
+  l2ElectronViewsMaker = EventViewCreatorAlgorithm("l2ElectronViewsMaker", OutputLevel=DEBUG)
+  topSequence += l2ElectronViewsMaker
+  l2ElectronViewsMaker.Decisions = theFastCaloHypo.Decisions # output of L2CaloHypo
+  l2ElectronViewsMaker.RoIsLink = "roi" # -||-
+  l2ElectronViewsMaker.InViewRoIs = "EMIDRoIs" # contract with the fastCalo
+  l2ElectronViewsMaker.Views = "EMElectronViews"
+
+
+  theTrackParticleCreatorAlg.roiCollectionName = l2ElectronViewsMaker.InViewRoIs
+  for idAlg in IDSequence:
+    if idAlg.properties().has_key("RoIs"):
+      idAlg.RoIs = l2ElectronViewsMaker.InViewRoIs
+
+    allViewAlgorithms += idAlg
+    svcMgr.ViewAlgPool.TopAlg += [ idAlg.getName() ]
+    l2ElectronViewsMaker.AlgorithmNameSequence += [ idAlg.getName() ]    
+
+
+  theElectronFex.RoIs = l2ElectronViewsMaker.InViewRoIs
+  allViewAlgorithms += theElectronFex
+  svcMgr.ViewAlgPool.TopAlg += [ theElectronFex.getName() ]
+  l2ElectronViewsMaker.AlgorithmNameSequence += [ theElectronFex.getName() ]    
+
+
+  from TrigEgammaHypo.TrigEgammaHypoConf import TrigL2ElectronHypoAlg
+  from TrigEgammaHypo.TrigL2ElectronHypoTool import TrigL2ElectronHypoToolFromName
+  theElectronHypo = TrigL2ElectronHypoAlg()
+  theElectronHypo.Views = l2ElectronViewsMaker.Views
+  theElectronHypo.Electrons = theElectronFex.ElectronsName
+  theElectronHypo.ClusterDecisions = theFastCaloHypo.Decisions 
+  theElectronHypo.ElectronDecisions = "ElectronL2Decisions"
+  theElectronHypo.OutputLevel = VERBOSE
+  theElectronHypo.HypoTools = [ TrigL2ElectronHypoToolFromName("HLT_e5_etcut"), TrigL2ElectronHypoToolFromName("HLT_e7_etcut") ]
+  for t in theElectronHypo.HypoTools:
+    t.OutputLevel = VERBOSE
+  topSequence += theElectronHypo
 
-#topSequence += theFTFMT
 
+else:
+  # ID algs can't run w/o views yet
+  pass
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mergeTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mergeTest.py
index 2b678960070bf4719cbdf21dc67c022bba791120..9481498b8eb34b3b0d273cab654e20a1cf4a9907 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/mergeTest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mergeTest.py
@@ -83,11 +83,13 @@ steps[stepNo] += seqFilter( "Step0EM", Inputs=["L1EM"], Outputs=["step0EM"], Cha
 
 
 trkInputMerger = merger("trkInputMerger", Inputs=["step0MU", "step0MUE_MU", "step0MUE_EM", "step0EM"], Output="TrackingRoIs")
-allRoITrk = reco("allRoITrk", Output="TrigTracks", FileName="noreco.dat", Input="TrackingRoIs") # we do not care how many tracks are made, just want see if right RoIs arrive at the input of this reco
+allRoITrk = TestRecoAlg("allRoITrk", Output="TrigTracks", FileName="noreco.dat", Input="TrackingRoIs") # we do not care how many tracks are made, just want see if right RoIs arrive at the input of this reco
 
 # the seq of merger & tracking shoudl be enabled by any of the filter
 stepNo += 1
 
+from AthenaCommon.CFElements import stepSeq
+
 steps[stepNo] += stepSeq("emtrk",  useExisting( "Step0EM" ),   [ trkInputMerger, allRoITrk ] )
 steps[stepNo] += stepSeq("mutrk",  useExisting( "Step0MU" ),   [ trkInputMerger, allRoITrk ] )
 steps[stepNo] += stepSeq("muetrk", useExisting( "Step0MU_E" ), [ trkInputMerger, allRoITrk ] )
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
new file mode 100644
index 0000000000000000000000000000000000000000..2bdaf4c95058047cc439e7b6c3b78c6aafe2b57b
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
@@ -0,0 +1,410 @@
+################################################################################
+# TrigUpgradeTest/testHLT_MT.py
+#
+#   Job options for trigger MT tests to be used as first include
+#   in signature specific job options. Example:
+#
+#      include('TrigUpgradeTest/testHLT_MT.py')
+#      ... your job options ...
+#
+# Several flags are supported on the command line to steer these job options.
+# See below for a complete list of all flags and their default value. If used
+# in athena.py the auto-configuration is used to setup most flags correctly.
+#
+# Additional "modifiers" can be specified by using
+#   -c "myModifier=True/False"
+# Existing modifiers can be found in "TriggerRelease/python/Modifiers.py"
+#
+class opt :
+    FilesInput       = None           # Input files (string or list of strings)
+    setupForMC       = None           # force MC setup
+    setLVL1XML       = 'TriggerMenuXML/LVL1config_Physics_pp_v7.xml'
+    setDetDescr      = None           # force geometry tag
+    setGlobalTag     = None           # force global conditions tag
+    useCONDBR2       = True           # if False, use run-1 conditions DB
+    condOverride     = {}             # overwrite conditions folder tags e.g. '{"Folder1":"Tag1", "Folder2":"Tag2"}'
+    HLTOutputLevel   = INFO           # change OutputLevel of HLT relevant components
+    doHLT            = True           # run HLT?
+    doID             = True           # TriggerFlags.doID
+    doCalo           = True           # TriggerFlags.doCalo
+    doMuon           = True           # TriggerFlags.doMuon
+    enableViews      = True           # setup infrastructre for Views
+    doDBConfig       = None           # dump trigger configuration
+    trigBase         = None           # file name for trigger config dump
+    enableCostD3PD   = False          # enable cost monitoring
+    EvtMax           = -1             # events to process
+    SkipEvents       =  0             # events to skip
+#
+################################################################################
+
+import AthenaCommon.CfgMgr as CfgMgr
+from AthenaCommon.AppMgr import theApp, ServiceMgr as svcMgr
+from AthenaCommon.Logging import logging
+log = logging.getLogger('testHLT_MT.py')
+
+#-------------------------------------------------------------
+# Setup options
+#-------------------------------------------------------------
+log.info('Setup options:')
+defaultOptions = [a for a in dir(opt) if not a.startswith('__')]
+for option in defaultOptions:
+    if option in globals():
+        setattr(opt, option, globals()[option])
+        print ' %20s = %s' % (option, getattr(opt, option))
+    else:        
+        print ' %20s = (Default) %s' % (option, getattr(opt, option))
+
+#-------------------------------------------------------------
+# Setting Global Flags
+#-------------------------------------------------------------
+from AthenaCommon.GlobalFlags import globalflags
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+from AthenaCommon.BeamFlags import jobproperties
+from TriggerJobOpts.TriggerFlags import TriggerFlags
+import TriggerRelease.Modifiers
+
+# Input format and file for athena running
+if opt.FilesInput is not None:
+    athenaCommonFlags.FilesInput = [opt.FilesInput] if isinstance(opt.FilesInput,str) else opt.FilesInput
+    from RecExConfig.AutoConfiguration import ConfigureFromListOfKeys, GetRunNumber
+    ConfigureFromListOfKeys(['everything'])
+    TriggerRelease.Modifiers._run_number = GetRunNumber()
+else:
+    if '_run_number' in dir(): TriggerRelease.Modifiers._run_number = _run_number   # set by athenaHLT
+    globalflags.InputFormat = 'bytestream'  # default for athenaHLT
+    if opt.setupForMC:
+        globalflags.DetGeo = 'atlas'
+        globalflags.DataSource = 'geant4'
+    else:
+        globalflags.DetGeo = 'commis'
+        globalflags.DataSource = 'data'
+        jobproperties.Beam.beamType = 'collisions'
+        jobproperties.Beam.bunchSpacing = 25
+        globalflags.DetDescrVersion = TriggerFlags.OnlineGeoTag()
+        globalflags.ConditionsTag = TriggerFlags.OnlineCondTag()
+        
+
+# Overwrite tags if specified on command line
+if opt.setDetDescr is not None:
+    globalflags.DetDescrVersion = opt.setDetDescr
+if opt.setGlobalTag is not None:
+    globalflags.ConditionsTag = opt.setGlobalTag
+
+globalflags.DatabaseInstance='CONDBR2' if opt.useCONDBR2 else 'COMP200'
+
+athenaCommonFlags.isOnline = False # for the moment, run in offline mode
+
+#-------------------------------------------------------------
+# Transfer flags into TriggerFlags
+#-------------------------------------------------------------
+
+# To turn off HLT for athena running
+TriggerFlags.doHLT = bool(opt.doHLT)
+    
+# To extract the Trigger configuration
+TriggerFlags.Online.doDBConfig = bool(opt.doDBConfig)
+if opt.trigBase is not None:
+    TriggerFlags.Online.doDBConfigBaseName = opt.trigBase
+
+
+# Setup list of modifiers
+# Common modifiers for MC and data
+setModifiers = ['noLArCalibFolders',
+                'ForceMuonDataType',
+                'useNewRPCCabling',
+                #'enableCostMonitoring', 
+                #'enableCoherentPS',
+                'useOracle',
+                'enableHotIDMasking',
+                'softTRTsettings',
+                'openThresholdRPCCabling',
+]
+
+if globalflags.DataSource.is_geant4():  # MC modifiers
+    setModifiers += ['BFieldFromDCS']
+else:           # More data modifiers
+    setModifiers += ['allowCOOLUpdates',
+                     'useHLTMuonAlign',
+                     #Check for beamspot quality flag
+                     'UseBeamSpotFlagForBjet',
+                     'UseParamFromDataForBjet',
+                     #Use online luminosity
+                     'useOnlineLumi',
+                     #for running with real data
+                     'DisableMdtT0Fit',
+                     #Setup mufast tuning for data
+                     'UseLUTFromDataForMufast',
+                     'UseRPCTimeDelayFromDataForMufast',
+                     #Set muComb/muIso Backextrapolator tuned for real data
+                     'UseBackExtrapolatorDataForMuIso',
+                     #Monitoring for L1 muon group
+                     #'muCTPicheck',
+                     #Monitoring L1Topo at ROB level
+                     #'L1TopoCheck',
+                     'forceTileRODMap',
+    ]
+
+#make some more common trig cost operations easier to setup
+if opt.enableCostD3PD:
+    enableCostMonitoring = True # This goes without saying!
+    enableCostForCAF = True # This sets the cost mon to monitor every event and always export the data.
+
+
+TriggerFlags.doID = opt.doID
+TriggerFlags.doMuon = opt.doMuon
+TriggerFlags.doCalo = opt.doCalo
+
+#-------------------------------------------------------------
+# Modifiers
+#-------------------------------------------------------------
+modifierList=[]
+from TrigConfigSvc.TrigConfMetaData import TrigConfMetaData
+meta = TrigConfMetaData()
+    
+for mod in dir(TriggerRelease.Modifiers):
+    if not hasattr(getattr(TriggerRelease.Modifiers,mod),'preSetup'): continue
+    if mod in dir():  #allow turning on and off modifiers by variable of same name
+        if globals()[mod]:
+            if mod not in setModifiers:
+                setModifiers+=[mod]
+        else:
+            if mod in setModifiers: setModifiers.remove(mod)
+    if mod in setModifiers:
+        modifierList+=[getattr(TriggerRelease.Modifiers,mod)()]
+        meta.Modifiers += [mod]    # store in trig conf meta data
+        setModifiers.remove(mod)
+
+if setModifiers:
+    log.error('Unknown modifier(s): '+str(setModifiers))
+
+
+# never include this
+include.block("RecExCond/RecExCommon_flags.py")
+
+#-------------------------------------------------------------
+# Setting DetFlags
+#-------------------------------------------------------------
+if globalflags.InputFormat.is_bytestream():
+    TriggerFlags.doLVL1 = False
+
+from AthenaCommon.DetFlags import DetFlags
+if TriggerFlags.doLVL1():
+    DetFlags.detdescr.all_setOn()
+if TriggerFlags.doID():
+    DetFlags.detdescr.ID_setOn()
+    DetFlags.makeRIO.ID_setOn()
+else:
+    DetFlags.ID_setOff()
+if TriggerFlags.doMuon():
+    DetFlags.detdescr.Muon_setOn()
+    DetFlags.makeRIO.all_setOn()
+else:
+    DetFlags.Muon_setOff()
+if TriggerFlags.doCalo():
+    DetFlags.detdescr.Calo_setOn()
+    from LArConditionsCommon.LArCondFlags import larCondFlags
+    larCondFlags.LoadElecCalib.set_Value_and_Lock(False)
+else:
+    DetFlags.Calo_setOff()
+
+DetFlags.Print()
+
+# RecEx flags
+from RecExConfig.RecFlags import rec
+rec.doWriteESD = False
+rec.doWriteAOD = False
+rec.doWriteTAG = False
+rec.doESD = False
+rec.doAOD = False
+rec.doTruth = False
+
+TriggerFlags.writeBS = True
+
+#-------------------------------------------------------------
+# Apply modifiers
+#-------------------------------------------------------------
+for mod in modifierList:
+    mod.preSetup()
+
+#--------------------------------------------------------------
+# Conditions setup.
+#--------------------------------------------------------------
+from IOVSvc.IOVSvcConf import CondSvc 
+svcMgr += CondSvc()
+
+from AthenaCommon.AlgSequence import AthSequencer 
+condSeq = AthSequencer("AthCondSeq") 
+
+from IOVSvc.IOVSvcConf import CondInputLoader 
+condSeq += CondInputLoader("CondInputLoader") 
+
+from IOVDbSvc.CondDB import conddb
+conddb.setGlobalTag(globalflags.ConditionsTag())
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+#--------------------------------------------------------------
+# Thread-specific setup
+#--------------------------------------------------------------
+from AthenaCommon.ConcurrencyFlags import jobproperties
+if jobproperties.ConcurrencyFlags.NumThreads() > 0:
+    from SGComps.SGCompsConf import SGInputLoader
+    topSequence += SGInputLoader( OutputLevel = INFO, 
+                                  ShowEventDump = False,
+                                  FailIfNoProxy = False )
+    #topSequence.SGInputLoader.Load = [ ('ROIB::RoIBResult','StoreGateSvc+RoIBResult') ]
+
+    from AthenaCommon.AlgScheduler import AlgScheduler
+    AlgScheduler.CheckDependencies( True )
+    AlgScheduler.ShowControlFlow( True )
+    AlgScheduler.ShowDataDependencies( True )
+    AlgScheduler.setDataLoaderAlg( 'SGInputLoader' )
+
+# EventInfo creation if needed
+from RecExConfig.ObjKeyStore import objKeyStore
+if ( not objKeyStore.isInInput( "xAOD::EventInfo_v1") ) and ( not hasattr( topSequence, "xAODMaker::EventInfoCnvAlg" ) ):
+    from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
+    topSequence += xAODMaker__EventInfoCnvAlg()
+
+
+# ----------------------------------------------------------------
+# Detector geometry 
+# ----------------------------------------------------------------
+# Always enable AtlasFieldSvc
+from AthenaCommon.DetFlags import DetFlags
+DetFlags.BField_setOn()
+include ("RecExCond/AllDet_detDescr.py")
+
+from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
+svcMgr += RegSelSvcDefault()
+
+if TriggerFlags.doID():
+    include( "InDetRecExample/InDetRecCabling.py" )
+
+if TriggerFlags.doCalo():
+    from TrigT2CaloCommon.TrigT2CaloCommonConfig import TrigDataAccess
+    svcMgr.ToolSvc += TrigDataAccess()
+
+if TriggerFlags.doMuon():
+    import MuonCnvExample.MuonCablingConfig
+    import MuonRecExample.MuonReadCalib
+    if globalflags.InputFormat.is_pool():
+        include( "MuonByteStreamCnvTest/jobOptions_MuonRDOToDigit.py" )
+
+    include ("MuonRecExample/MuonRecLoadTools.py")
+
+# ----------------------------------------------------------------
+# Pool input
+# ----------------------------------------------------------------
+if globalflags.InputFormat.is_pool():
+    import AthenaPoolCnvSvc.ReadAthenaPool   # noqa
+    svcMgr.AthenaPoolCnvSvc.PoolAttributes = [ "DEFAULT_BUFFERSIZE = '2048'" ]
+    svcMgr.PoolSvc.AttemptCatalogPatch=True 
+     
+# ----------------------------------------------------------------
+# ByteStream input
+# ----------------------------------------------------------------
+elif globalflags.InputFormat.is_bytestream():
+
+    # This is only needed running athena (as opposed to athenaHLT)
+    if not hasattr(svcMgr,"ByteStreamCnvSvc"):
+        from ByteStreamCnvSvc import ReadByteStream   # noqa
+        # Define the input
+        svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.FilesInput()
+        theApp.ExtSvc += [ "ByteStreamCnvSvc"]
+
+    # Online specific setup of BS converters
+    include( "TriggerRelease/jobOfragment_ReadBS_standalone.py" )    
+
+
+# ---------------------------------------------------------------
+# Trigger config
+# ---------------------------------------------------------------
+TriggerFlags.inputLVL1configFile = opt.setLVL1XML
+TriggerFlags.readLVL1configFromXML = True
+TriggerFlags.outputLVL1configFile = None
+from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc, findFileInXMLPATH
+svcMgr += LVL1ConfigSvc()
+svcMgr.LVL1ConfigSvc.XMLMenuFile = findFileInXMLPATH(TriggerFlags.inputLVL1configFile())
+
+if globalflags.InputFormat.is_bytestream():
+    from TrigUpgradeTest.TestUtils import L1DecoderTest
+    #topSequence += L1DecoderTest(OutputLevel = opt.HLTOutputLevel)
+    topSequence += L1DecoderTest(OutputLevel = DEBUG)
+else:
+    from TrigUpgradeTest.TestUtils import L1EmulationTest
+    topSequence += L1EmulationTest(OutputLevel = opt.HLTOutputLevel)
+
+# ----------------------------------------------------------------
+# Setup Views
+# ----------------------------------------------------------------
+if opt.enableViews:
+    log.info('Setting up Views...')
+    # Make a separate alg pool for the view algs
+    from GaudiHive.GaudiHiveConf import AlgResourcePool
+    svcMgr += AlgResourcePool('ViewAlgPool')
+    
+    
+    # Set of view algs
+    allViewAlgs = AthSequencer( "allViewAlgorithms" )
+    allViewAlgs.ModeOR = False
+    allViewAlgs.Sequential = True
+    allViewAlgs.StopOverride = False
+    topSequence += allViewAlgs
+    
+    # Filter to stop view algs from running on whole event
+    allViewAlgs += CfgMgr.AthPrescaler( "alwaysFail" )
+    allViewAlgs.alwaysFail.PercentPass = 0.0
+
+    # dummy alg that just says you're running in a view
+    # allViewAlgs += CfgMgr.AthViews__ViewTestAlg( "viewTest" )
+    # svcMgr.ViewAlgPool.TopAlg += [ "viewTest" ]
+    # viewMaker.AlgorithmNameSequence = [ "viewTest" ] #Eventually scheduler will do this
+
+# ---------------------------------------------------------------
+# Monitoring
+# ---------------------------------------------------------------
+if not hasattr(svcMgr, 'THistSvc'):        
+    from GaudiSvc.GaudiSvcConf import THistSvc
+    svcMgr += THistSvc()
+if hasattr(svcMgr.THistSvc, "Output"):
+    from TriggerJobOpts.HLTTriggerGetter import setTHistSvcOutput
+    setTHistSvcOutput(svcMgr.THistSvc.Output)
+
+# -------------------------------------------------------------
+# Message formatting and OutputLevel
+# -------------------------------------------------------------
+if TriggerFlags.Online.doValidation():
+    TriggerFlags.enableMonitoring = TriggerFlags.enableMonitoring.get_Value()+['Log']
+else:
+    svcMgr.MessageSvc.Format = "%t  " + svcMgr.MessageSvc.Format   # add time stamp
+    if hasattr(svcMgr.MessageSvc,'useErsError'):   # ERS forwarding with TrigMessageSvc
+        svcMgr.MessageSvc.useErsError = ['*']
+        svcMgr.MessageSvc.alwaysUseMsgStream = True
+
+# ----------------------------------------------------------------
+# Number of events to be processed - for athena
+# ----------------------------------------------------------------
+theApp.EvtMax = opt.EvtMax
+if hasattr(svcMgr,"EventSelector"):
+    svcMgr.EventSelector.SkipEvents = opt.SkipEvents 
+    
+#-------------------------------------------------------------
+# Apply modifiers
+#-------------------------------------------------------------
+for mod in modifierList:
+    mod.postSetup()
+
+#-------------------------------------------------------------
+# Conditions overrides
+#-------------------------------------------------------------    
+if len(opt.condOverride)>0:
+    for folder,tag in opt.condOverride.iteritems():
+        log.warn('Overriding folder %s with tag %s' % (folder,tag))
+        conddb.addOverride(folder,tag)
+
+if svcMgr.MessageSvc.OutputLevel<INFO or opt.HLTOutputLevel<INFO:                
+    from AthenaCommon.JobProperties import jobproperties
+    jobproperties.print_JobProperties('tree&value')
+    print svcMgr
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.cxx b/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.cxx
index 8a3d17f9e113150bc62447b930564bbe0b402dd2..52768e697c9b04e77792483594d33bb6b34b83e2 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.cxx
+++ b/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.cxx
@@ -10,6 +10,8 @@
 
 #include "GaudiKernel/Property.h"
 
+using namespace TrigCompositeUtils;
+
 namespace HLTTest {
 
   TestRoRSeqFilter::TestRoRSeqFilter( const std::string& name, 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.h b/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.h
index 7216c19cbc1a0fe1500c279c275b044e7eca95e5..f669993417e78fc9aa8a4b3070ea101cd4214696 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.h
+++ b/Trigger/TrigValidation/TrigUpgradeTest/src/TestRoRSeqFilter.h
@@ -9,7 +9,6 @@
 #include "DecisionHandling/TrigCompositeUtils.h"
 #include "AthenaBaseComps/AthAlgorithm.h"
 
-using namespace TrigCompositeUtils;
 namespace HLTTest {
 
   /**
@@ -39,14 +38,15 @@ namespace HLTTest {
     std::vector<std::string> m_outputs;
     
     std::vector<std::string> m_chainsProperty;
-    DecisionIDContainer  m_chains; // this is the set of chains we care about in this filter
+    TrigCompositeUtils::DecisionIDContainer  m_chains; // this is the set of chains we care about in this filter
     bool m_alwaysPass = false; // override decision 
     
     /*
       @brief fills the output with decision objects lining back to the succesfully passing objs
       NB> The positive/negative decision can be red from the output.size()
     */
-    void copyPassing(const std::string& inputKey, DecisionContainer* output) const;
+    void copyPassing(const std::string& inputKey,
+                     TrigCompositeUtils::DecisionContainer* output) const;
   }; 
   
 } //> end namespace HLTTest
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/TrigUpgradeTest.xml b/Trigger/TrigValidation/TrigUpgradeTest/test/TrigUpgradeTest.xml
deleted file mode 100644
index 48bae6ee59c929ab2dd3783054b34cbaae564fee..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/TrigUpgradeTest.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<atn>
-    <TEST name="TrigUpgradeTest" type="makecheck" suite="Examples">
-       <package>Trigger/TrigValidation/TrigUpgradeTest</package>
-       <timelimit>100</timelimit>
-       <expectations>
-          <errorMessage>Athena exited abnormally</errorMessage>
-          <successMessage>check ok</successMessage>
-          <returnValue>0</returnValue>
-       </expectations>
-    </TEST>
-</atn>
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_run_data.sh
new file mode 100755
index 0000000000000000000000000000000000000000..30e7386365046bb9d748d14e6aa361592d3c35e4
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_calo_run_data.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# art-type: build
+# art-ci: master
+
+athena.py --threads=1 -c 'doID=False;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"' TrigUpgradeTest/IDCalo.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh
new file mode 100755
index 0000000000000000000000000000000000000000..766442b53c5a29bdb8b66bc9b2bfc54e3bd3f0da
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_egamma_run_data.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# art-type: build
+# art-ci: master
+
+athena --threads=1 -c 'EvtMax=10;enableViews=True;FilesInput="root://eosatlas//eos/atlas/atlascerngroupdisk/trig-daq/validation/test_data/data16_13TeV.00309640.physics_EnhancedBias.merge.RAW/data16_13TeV.00309640.physics_EnhancedBias.merge.RAW._lb0628._SFO-1._0001.1"' TrigUpgradeTest/egamma.withViews.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_l1_decoding.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_l1_decoding.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a705f0d27c93751036d5a4dfc4971fbf3076990f
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_emu_l1_decoding.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# art-type: build
+# art-ci: master
+
+athena.py --threads=1 TrigUpgradeTest/EmuL1DecodingTest.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/scripts/GraphView.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_graph_view.sh
similarity index 53%
rename from Trigger/TrigValidation/TrigUpgradeTest/scripts/GraphView.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_graph_view.sh
index 94c8696f7c8bd7e06681de1f25164d542416f7f9..a6bcb6bbd0b574f69da172ca74fb5e41c76a7b6d 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/scripts/GraphView.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_graph_view.sh
@@ -1,2 +1,5 @@
-get_files -data menuData.dat
+#!/bin/sh
+# art-type: build
+# art-ci: master
+
 athena.py --threads=$THREADS AthViews/GraphViews.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_calo_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_calo_run_data.sh
new file mode 100755
index 0000000000000000000000000000000000000000..a95afecd05bdda5631ad0d2eaa12dd9e9da353d9
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_calo_run_data.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# art-type: build
+# art-ci: master
+
+athena.py --threads=1 -c '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"' TrigUpgradeTest/IDCalo.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_data.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_data.sh
new file mode 100755
index 0000000000000000000000000000000000000000..aca4ea57aa6a35b6b76b2fde0ad5a1471d379fe1
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_data.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# art-type: build
+# art-ci: master
+
+athena.py --threads=1 -c 'doCalo=False;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"' TrigUpgradeTest/IDCalo.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_mc.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_mc.sh
new file mode 100755
index 0000000000000000000000000000000000000000..33fdd83e64a0834e1047f85414fde03f596c26cb
--- /dev/null
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_id_run_mc.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+# art-type: build
+# art-ci: master
+
+#athena.py --threads=1 -c 'doCalo=False;EvtMax=10;FilesInput="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1"' TrigUpgradeTest/IDCalo.py
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/scripts/mergeTest.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_merge.sh
similarity index 52%
rename from Trigger/TrigValidation/TrigUpgradeTest/scripts/mergeTest.sh
rename to Trigger/TrigValidation/TrigUpgradeTest/test/test_merge.sh
index 444627bb6d17ffd9232517d20088e74ac507deb9..1a5e788988044706767e58ab81f07f41485edc81 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/scripts/mergeTest.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_merge.sh
@@ -1 +1,5 @@
+#!/bin/sh
+# art-type: build
+# art-ci: master
+
 athena.py --threads=1 TrigUpgradeTest/mergeTest.py
diff --git a/Trigger/TrigValidation/TrigValAlgs/cmt/requirements b/Trigger/TrigValidation/TrigValAlgs/cmt/requirements
deleted file mode 100755
index d726014670a849c4fa743ff8779948e60029e259..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValAlgs/cmt/requirements
+++ /dev/null
@@ -1,90 +0,0 @@
-package TrigValAlgs
-
-author David Strom <David.Strom@cern>
-author John Baines <j.baines@rl.ac.uk>
-author Simon george <S.George@rhul.ac.uk>
-author Ricardo Goncalo <r.goncalo@rhul.ac.uk>
-
-use AtlasPolicy 		AtlasPolicy-*
-use AtlasCLHEP                  AtlasCLHEP-*            External
-#use RunTimeTester		RunTimeTester-*		Tools
-use TestPolicy          	TestPolicy-*
-#use AtlasHLTRunTime  AtlasHLTRunTime-*
-
-# for TrigDecisionTool test
-use GaudiInterface     		GaudiInterface-*   	External
-
-# for TrigCountDumper
-use  AtlasXercesC               AtlasXercesC-*                  External
-use  AthenaBaseComps            AthenaBaseComps-*               Control
-use  TrigConfInterfaces         TrigConfInterfaces-*            Trigger/TrigConfiguration
-
-# for EDM test
-use TrigCaloEvent		TrigCaloEvent-*		Trigger/TrigEvent
-use TrigInDetEvent	 	TrigInDetEvent-*	Trigger/TrigEvent
-use TrigParticle	 	TrigParticle-*	        Trigger/TrigEvent
-use TrigMuonEvent        	TrigMuonEvent-*         Trigger/TrigEvent
-use TrigCaloEvent        	TrigCaloEvent-*         Trigger/TrigEvent
-use TrigSteeringEvent           TrigSteeringEvent-*     Trigger/TrigEvent
-use xAODTrigger                 xAODTrigger-*           Event/xAOD
-
-#For Trig Slimming test
-use TrigNavigation      TrigNavigation-*    Trigger/TrigEvent
-use TrigNavTools        TrigNavTools-*      Trigger/TrigEvent
-use TrigDecisionTool    TrigDecisionTool-*  Trigger/TrigAnalysis
-use AtlasTriggerRunTime 	AtlasTriggerRunTime-*
-
-#For aux store test
-use xAODCore                    xAODCore-*              Event/xAOD
-private
-
-use TrigDecisionEvent           TrigDecisionEvent-*     Trigger/TrigEvent
-
-
-# for TrigDecisionTool test
-use Particle                    Particle-*              Reconstruction
-use EventInfo                   EventInfo-*             Event
-
-# for TrigCountDumper
-use AthenaKernel                AthenaKernel-*          Control
-use SGTools                     SGTools-*               Control
-
-# for L1 test
-use AnalysisTriggerEvent	AnalysisTriggerEvent-*	PhysicsAnalysis/AnalysisTrigger
-
-#For tau part of EDM/Navigation test
-use tauEvent   		        tauEvent-*              Reconstruction
-use TrigInDetTruthEvent 	TrigInDetTruthEvent-* 	Trigger/TrigTruthEvent
-use TrigMissingEtEvent          TrigMissingEtEvent-*    Trigger/TrigEvent
-
-use  TrigConfigSvc              TrigConfigSvc-*                 Trigger/TrigConfiguration
-
-use MuonCombinedToolInterfaces	MuonCombinedToolInterfaces-*	Reconstruction/MuonIdentification
-use xAODMuon			xAODMuon-*		Event/xAOD
-use xAODTrigMuon		xAODTrigMuon-*		Event/xAOD
-use xAODTrigBphys               xAODTrigBphys-*         Event/xAOD
-use xAODTracking			xAODTracking-*		Event/xAOD
-use xAODTrigEgamma              xAODTrigEgamma-*        Event/xAOD
-use xAODEgamma                  xAODEgamma-*            Event/xAOD
-use xAODTau                     xAODTau-*               Event/xAOD
-use xAODTrigMissingET           xAODTrigMissingET-*     Event/xAOD
-use xAODTrigCalo                xAODTrigCalo-*          Event/xAOD
-use xAODTrigMinBias		xAODTrigMinBias-*	Event/xAOD
-use xAODJet			xAODJet-*		Event/xAOD
-use xAODTrigMinBias		xAODTrigMinBias-*	Event/xAOD
-
-# for bjet part of the test
-use     VxSecVertex             VxSecVertex-*           Tracking/TrkEvent
-use     xAODBTagging            xAODBTagging-*              	Event/xAOD
-end_private
-
-# library
-library TrigValAlgs *.cxx components/*.cxx
-apply_pattern component_library
-
-# declare test job options
-apply_pattern declare_joboptions files="*.py"
-
-# declare python module (configurables)
-apply_pattern declare_python_modules files="__init__.py TrigValAlgsConfig.py"
-
diff --git a/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx b/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx
index 289e5da3bf26715dc810797843574946a50a9957..87d8be704d37ff6dd92a479d0e60fde76333c616 100644
--- a/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx
+++ b/Trigger/TrigValidation/TrigValAlgs/src/TrigEDMChecker.cxx
@@ -3490,8 +3490,27 @@ StatusCode TrigEDMChecker::dumpxAODTauJetContainer() {
     ATH_MSG_INFO( "REGTEST (*tauIt)->eta() returns  " << (*tauIt)->eta() );
     ATH_MSG_INFO( "REGTEST (*tauIt)->phi() returns  " << (*tauIt)->phi() );
     ATH_MSG_INFO( "REGTEST (*tauIt)->pt() returns   " << (*tauIt)->pt() );
-    ATH_MSG_INFO( "REGTEST (*tauIt)->nTracks() returns " << (*tauIt)->nTracks() );
-    ATH_MSG_INFO( "REGTEST (*tauIt)->nWideTracks() returns " << (*tauIt)->nTracksIsolation() );
+
+    // for numTracks()
+    int EFnTracks = -1;
+    #ifndef XAODTAU_VERSIONS_TAUJET_V3_H
+    EFnTracks = (*tauIt)->nTracks();
+    #else
+    (*tauIt)->detail(xAOD::TauJetParameters::nChargedTracks, EFnTracks);
+    #endif
+
+    ATH_MSG_INFO( "REGTEST (*tauIt)->nTracks() returns " << EFnTracks );
+
+    // for nTracksIsolation()
+    int EFWidenTrack = -1;
+    #ifndef XAODTAU_VERSIONS_TAUJET_V3_H
+    EFWidenTrack = (*tauIt)->nWideTracks();
+    #else
+    (*tauIt)->detail(xAOD::TauJetParameters::nIsolatedTracks, EFWidenTrack);
+    #endif
+
+    ATH_MSG_INFO( "REGTEST (*tauIt)->nWideTracks() returns " << EFWidenTrack );
+
     //bool test = false;
     float trkAvgDist=0;
     float etOvPtLead=0;
diff --git a/Trigger/TrigValidation/TrigValTools/bin/trigtc_submitValPkg.py b/Trigger/TrigValidation/TrigValTools/bin/trigtc_submitValPkg.py
deleted file mode 100755
index 2ae567b3a2b0eee0da97e5004189d37d44b0e1c1..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValTools/bin/trigtc_submitValPkg.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-# @file:    trig_tcSubmitValPkg.py
-# @purpose: Copies the validation packages from the current to a target release
-# @author:  Joerg Stelzer
-#
-# $Id:$
-
-import sys
-import os
-import argparse
-import subprocess
-import shlex
-from PyCmt import Cmt
-
-cmt = Cmt.CmtWrapper()
-
-def getValidationPkgs():
-    return [
-        "TrigP1Test",
-        "TriggerTest",
-        "TrigInDetValidation",
-        "TrigValTools",
-        "TriggerMenuXML",
-        "TrigTransformOld"
-        ]
-
-def findPkg(pkg):
-    """Find package version in release."""
-
-    cmtPkg = cmt.find_pkg(name=pkg)
-
-    if cmtPkg:
-        #print cmtPkg
-        return cmtPkg.version
-        #return os.path.join(cmtPkg.path,cmtPkg.name)
-    else:
-        raise RuntimeError, "Package '%s' does not exist" % pkg         
-
-
-
-def main():
-
-   parser = argparse.ArgumentParser(description="Copies the mandatory validation packages from the current release to an open release in TagCollector. Current list of validation packages: %r" % getValidationPkgs())
-
-   parser.add_argument('-a', '--add', action='append', metavar='PACKAGE', default=[],
-                       help='Additional package to be copied (can be used multiple times)')
-
-   parser.add_argument('-p', '--project', default='AtlasCAFHLT',
-                       help='Project to submit to (default: %(default)s)')   
-
-   args = parser.parse_args()
-   
-   packageVersions = map(findPkg, getValidationPkgs() + args.add)
-   cmd = 'acmd.py tc submit-tag -p %s -b TrigValPkgs -s " " -j "Default trigger validation packages" %s' % (args.project," ".join(packageVersions))
-   print cmd
-   subprocess.call(shlex.split(cmd))
-
-
-
-if __name__ == "__main__":
-   try:   
-      sys.exit(main())
-   except RuntimeError, e:
-      print e
-      sys.exit(1)
-   except KeyboardInterrupt:
-      sys.exit(1)
-
-        
diff --git a/Trigger/TrigValidation/TrigValTools/bin/trigtest.pl b/Trigger/TrigValidation/TrigValTools/bin/trigtest.pl
index f288a28fabe6b5604a8e6619ff2c6e436e15171a..aeadb4440fdef11fa0b7e3273c52ef3fbe973d74 100755
--- a/Trigger/TrigValidation/TrigValTools/bin/trigtest.pl
+++ b/Trigger/TrigValidation/TrigValTools/bin/trigtest.pl
@@ -964,6 +964,11 @@ sub run_test($){
       print "$prog debug: post_command #commands: ".@postrc."  return codes: @postrc \n" if ($debug);
     }
 
+    my %reldata = release_metadata();
+    my $nightly = (exists $reldata{'nightly name'} ? $reldata{'nightly name'} : "UNKNOWN");
+    $nightly = $nightly . "/latest";
+    print "$prog: looking for histograms and references for nightly $nightly \n";
+
     # run any post-tests    
     unlink "$posttestrc" if (-f "$posttestrc");
     if ( defined(@{$config{$id}->{'post_test'}}) ) {
@@ -977,6 +982,8 @@ sub run_test($){
         # Replace '$logfile' with the actual file name
         my $post_test_cmd = $post_test->{'cmd'};
         $post_test_cmd =~ s/\$logfile/$logfile/;
+	# If there is a comparison to a reference file, make sure that the correct path is used
+        $post_test_cmd =~ s/latest/$nightly/g;
         my $rc = systemcall("($post_test_cmd) > $post_test_log 2>&1");
         $total_rc += $rc;
         # Save return codes in separate text file
@@ -1061,10 +1068,6 @@ sub run_test($){
     #make short file with last 600 lines only
     systemcall("tail -600 $logfile > $logfiletail");
  
-    my %reldata = release_metadata();
-    my $nightly = (exists $reldata{'nightly name'} ? $reldata{'nightly name'} : "UNKNOWN");
-    $nightly = $nightly . "/latest";
-    print "$prog: looking for histograms and references for nightly $nightly \n";
 
     # rootcomp
     if ($config{$id}->{'rootcomp'}){
diff --git a/Trigger/TrigValidation/TrigValTools/bin/trigval_tagdiff.py b/Trigger/TrigValidation/TrigValTools/bin/trigval_tagdiff.py
deleted file mode 100755
index 9b135bcbc600a2cc02c4426d34eefcece3e868c8..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TrigValTools/bin/trigval_tagdiff.py
+++ /dev/null
@@ -1,156 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-"""Tag difference between two releases"""
-
-__author__ = "Frank Winklmeier"
-
-import sys
-import os
-import subprocess as sp
-import datetime
-from TrigValTools.HTML import *
-
-projects = ['DetCommon',
-            'Core',
-            'Conditions',
-            'Event',
-            'Reconstruction',
-            'Simulation',
-            'Trigger',
-            'Analysis',
-            'HLT',
-            'P1HLT',
-            'CAFHLT',
-            'Production']
-
-def getTagDiff(asetup_old, asetup_new, project=''):
-   """Return tag diff as dictionary {Package : (project,tag_old,tag_new)}"""
-   
-   import PyCmt.Cmt as Cmt
-
-   if len(project)>0:
-      asetup_old += ','+project
-      asetup_new += ','+project
-      
-   diff = Cmt.get_tag_diff(asetup_old, asetup_new, verbose=False)
-   diff = dict([(d['full_name'],(d['ref_proj'],d['chk_proj'],d['ref'],d['chk'])) for d in diff
-                if d['ref_proj']!='N/A' and d['chk_proj']!='N/A'])
-   
-   return diff
-   
-
-def tracDiff(pkg,tag1,tag2):
-   leaf = pkg.split('/')[-1]
-   return 'https://svnweb.cern.ch/trac/atlasoff/changeset?old_path=%s/tags/%s-%s&new_path=%s/tags/%s-%s' % (pkg,leaf,tag1,pkg,leaf,tag2)
-
-
-def websvnDiff(pkg,tag1,tag2):
-   leaf = pkg.split('/')[-1]   
-   return 'https://svnweb.cern.ch/cern/wsvn/atlasoff?op=comp&compare[]=/%s/tags/%s-%s/&compare[]=/%s/tags/%s-%s/' % (pkg,leaf,tag1,pkg,leaf,tag2)
-
-def tag2int(tag):
-   f = tag.split('-')
-   if len(f)==3: tag += '-00'
-   try:
-      n = int(tag.replace('-',''))
-   except:
-      n = 0
-   return n
-
-
-def makeHTML(diff):
-   """Return diff rows as HTML"""
-
-   rows = []
-   for pkg in sorted(diff):
-      proj1,proj2,tag1,tag2 = diff[pkg]
-      c = 'red' if tag2int(tag2)<tag2int(tag1) else 'black'
-      rows.append(TR(TD(pkg.split('/')[-1],title=pkg,width='500')
-                     + TD(htmlify(proj1)+'&nbsp&nbsp')
-                     + TD(htmlify(proj2)+'&nbsp&nbsp')                     
-                     + TD(htmlify(tag1)+'&nbsp&nbsp')
-                     + TD(FONT(htmlify(tag2),color=c))
-                     + TD(A('[trac]', href=tracDiff(pkg,tag1,tag2))
-                          #+TEXT('&nbsp')+A('[websvn]', href=websvnDiff(pkg,tag1,tag2))
-                          )
-                     ))
-      
-   return Sum(rows)
-   
- 
-def main():
-   global projects
-   
-   import optparse
-   parser = optparse.OptionParser(description=__doc__,
-                                  usage='%prog [Options] REL1 REL2')
-
-   parser.add_option('-t', '--today', action='store_true', default=False,
-                     help="use today's nightly instead of specyfing rel_x")
-
-   parser.add_option('-o', '--output', action='store',
-                     help='html output file [default: stdout]')
-
-   parser.add_option('-p', '--perProject', action='store',
-                     help='do the tag diff for each project separately')
-                     
-                     
-   (opts, args) = parser.parse_args()
-   
-   if len(args)!=2:
-      parser.print_help()
-      return 1
-
-   old = args[0]
-   new = args[1]
-   
-   if opts.today:
-      nightly = 'rel_%d' % ((datetime.date.today().weekday()+1)%7)
-      old += ','+nightly
-      new += ','+nightly
-      
-   title = 'Tag differences %s vs. %s' % (old,new)
-   html = HEAD(TITLE(title) +
-               STYLE('tr:hover {background-color:#E6E6E6;}', type='text/css') +
-               SCRIPT('',src='../js/sorttable.js'))
-   
-   html += H1(title)
-   html += TEXT(I('Last update: %s' % datetime.datetime.today().strftime('%c')))
-   html += BR() + BR()
-
-   rows = []
-   
-   #for p in projects: html += A(p, href='#'+p) + TEXT('&nbsp')
-   html += B('left: %s' % old)+BR()
-   html += B('right: %s' % new)+BR()
-   html += BR()
-
-   if opts.perProject:
-      diff = getTagDiff(old, new, 'AtlasHLT')
-      diff2 = getTagDiff(old, new, 'AtlasAnalysis')
-      diff3 = getTagDiff(old, new, 'AtlasSimulation')
-      diff.update(diff2)
-      diff.update(diff3)
-   else:
-      diff = getTagDiff(old, new)
-      
-   rows.append(TR(TD(B('Package')) + TD(B('left')) + TD(B('right')) + TD(B('left')) + TD(B('right'))))
-   htmldiff = makeHTML(dict([x for x in diff.iteritems()]))
-   if htmldiff!='': rows.append(htmldiff)
-
-   out = '%s' % HTML(html+TABLE(Sum(rows),Class='sortable'))      
-   if opts.output!=None:
-      open(opts.output,'w').write(out)
-   else:
-      print out 
-   
-if __name__ == '__main__':
-   try:
-      sys.exit(main())
-   except IOError, e:
-      (code, msg) = e
-      if (code==32): pass   # ignore broken pipe exception
-      else: raise e
-   except KeyboardInterrupt:
-      sys.exit(1)
diff --git a/Trigger/TrigValidation/TriggerTest/CMakeLists.txt b/Trigger/TrigValidation/TriggerTest/CMakeLists.txt
index 393225747bb15cdd2a065a47665c5b5526d77c36..1b13b88d77e3cce1051fef9db33ab1f29e494d36 100644
--- a/Trigger/TrigValidation/TriggerTest/CMakeLists.txt
+++ b/Trigger/TrigValidation/TriggerTest/CMakeLists.txt
@@ -13,5 +13,5 @@ atlas_depends_on_subdirs( PUBLIC
 atlas_install_python_modules( python/__init__.py )
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( test/TriggerTest_TestConfiguration.xml python/RttScriptRunner_TriggerTest.py share/*.cxx python/CheckLog_TriggerTest.py python/LogTail_TriggerTest.py python/CheckForTrigCostD3PD_TriggerTest.py python/CheckForHLTChainAllZero_TriggerTest.py python/CheckForHLTTEAllZero_TriggerTest.py python/CheckForL1AllZero_TriggerTest.py python/CreateIgprofReport_TriggerTest.py python/TruncateLog_TriggerTest.py python/ValGrindPostScript_TriggerTest.py python/ValgrindAnalysisScript_TriggerTest.py Testing/*.conf )
-atlas_install_scripts( Testing/*.sh Testing/*.pl )
+atlas_install_scripts( Testing/*.sh Testing/*.pl test/exec*.sh )
 
diff --git a/Trigger/TrigValidation/TriggerTest/cmt/requirements b/Trigger/TrigValidation/TriggerTest/cmt/requirements
deleted file mode 100755
index 7ba7cdc451a0d9f7bf84721b1f89d8f683ba0424..0000000000000000000000000000000000000000
--- a/Trigger/TrigValidation/TriggerTest/cmt/requirements
+++ /dev/null
@@ -1,46 +0,0 @@
-package TriggerTest
-
-# =====================================================================
-#
-# This is the TriggerTest
-#
-# =====================================================================
-
-author John Baines <j.baines@rl.ac.uk>
-author Simon george <S.George@rhul.ac.uk>
-#contact Patrick Czodrowski <czodrows@cern>
-
-use AtlasPolicy 	    AtlasPolicy-*
-use AtlasTriggerRunTime AtlasTriggerRunTime-*
-#use AthenaServices 	AthenaServices-* Control
-#use RunTimeTester 	    RunTimeTester-*	Tools
-use TestPolicy          TestPolicy-*
-
-
-apply_pattern declare_python_modules files="../python/__init__.py"
-
-#declare test job options	
-apply_pattern declare_joboptions files="*.py"
-
-#RTT declarations
-apply_pattern declare_scripts files="../Testing/*.sh  ../Testing/*.pl"
- 
-apply_pattern declare_runtime extras="../test/TriggerTest_TestConfiguration.xml \
-                                      ../python/RttScriptRunner_TriggerTest.py \
-                                      ../share/*.cxx \
-                                      ../python/CheckLog_TriggerTest.py \
-                                      ../python/LogTail_TriggerTest.py \
-                                      ../python/CheckForTrigCostD3PD_TriggerTest.py \
-                                      ../python/CheckForHLTChainAllZero_TriggerTest.py \
-                                      ../python/CheckForHLTTEAllZero_TriggerTest.py \
-                                      ../python/CheckForL1AllZero_TriggerTest.py \
-                                      ../python/CreateIgprofReport_TriggerTest.py \
-                                      ../python/TruncateLog_TriggerTest.py \
-                                      ../python/ValGrindPostScript_TriggerTest.py \
-                                      ../python/ValgrindAnalysisScript_TriggerTest.py \
-                                      ../Testing/*.conf" 
-private
-apply_pattern validate_xml
-public
-
-macro TriggerTest_TestConfiguration "../test/TriggerTest_TestConfiguration.xml"
diff --git a/Trigger/TrigValidation/TriggerTest/share/TrigScanFiles.py b/Trigger/TrigValidation/TriggerTest/share/TrigScanFiles.py
index 2ed4deb9b54b8560be302bbd7491fe42b67c1f08..01f250bad30127c3ab0db14bdaed25d527aa8731 100644
--- a/Trigger/TrigValidation/TriggerTest/share/TrigScanFiles.py
+++ b/Trigger/TrigValidation/TriggerTest/share/TrigScanFiles.py
@@ -3,7 +3,7 @@ from AthenaCommon.AthenaCommonFlags import athenaCommonFlags as acf
 
 import os,commands
 def getCastorDirectoryList(path,fileRange):
-    cmd  = '/afs/cern.ch/project/eos/installation/pro/bin/eos.select ls %s/ ' % (path)
+    cmd  = 'eos ls %s/ ' % (path)
     files = []
     for i in commands.getoutput(cmd).split('\n'):
         fileNumber = i[i.rfind(".pool.root")-5:i.rfind(".pool.root")]
@@ -15,7 +15,7 @@ def getCastorDirectoryList(path,fileRange):
     return files 
 
 def getCastorDirectoryListRepeat(path,fileRange,repeatN):
-    cmd  = '/afs/cern.ch/project/eos/installation/pro/bin/eos.select ls %s/ ' % (path)
+    cmd  = 'eos ls %s/ ' % (path)
     files = []
     for j in range(repeatN):
         for i in commands.getoutput(cmd).split('\n'):
@@ -28,7 +28,7 @@ def getCastorDirectoryListRepeat(path,fileRange,repeatN):
         return files 
 
 def getEOSDirectoryList(path,fileRange):
-    cmd  = '/afs/cern.ch/project/eos/installation/pro/bin/eos.select ls %s/ ' % (path)
+    cmd  = 'eos ls %s/ ' % (path)
     files = []
     print cmd
     for i in commands.getoutput(cmd).split('\n'):
@@ -45,7 +45,7 @@ def getEOSDirectoryList(path,fileRange):
     return files
 
 def getEOSDirectoryListRepeat(path,fileRange,repeatN):
-    cmd  = '/afs/cern.ch/project/eos/installation/pro/bin/eos.select ls %s/ ' % (path)
+    cmd  = 'eos ls %s/ ' % (path)
     files = []
     for j in range(repeatN):
         for i in commands.getoutput(cmd).split('\n'):
diff --git a/Trigger/TrigValidation/TriggerTest/share/TriggerTestCommon.py b/Trigger/TrigValidation/TriggerTest/share/TriggerTestCommon.py
index 4e5e3714b092643725f5667a5463ad0c9b5b149d..9da516b98b966833880d8b69a9b1741877f2afac 100644
--- a/Trigger/TrigValidation/TriggerTest/share/TriggerTestCommon.py
+++ b/Trigger/TrigValidation/TriggerTest/share/TriggerTestCommon.py
@@ -104,3 +104,9 @@ if hasattr(svcMgr,'THistSvc'):
 #from AthenaCommon.AlgSequence import AlgSequence
 print AlgSequence
 print ServiceMgr
+
+# Tempory - 24/05/17 # this can be later removed
+if not hasattr(svcMgr.ToolSvc,"TileROD_Decoder"):
+   from TileByteStream.TileByteStreamConf import TileROD_Decoder
+   svcMgr.ToolSvc+=TileROD_Decoder()
+svcMgr.ToolSvc.TileROD_Decoder.fullTileMode=0
diff --git a/Trigger/TrigValidation/TriggerTest/share/testIDAthenaTrigRDO.py b/Trigger/TrigValidation/TriggerTest/share/testIDAthenaTrigRDO.py
index 338eb7335cff295c3f02502c6dc671ad0c49b15f..80d123f9aedfed281b8c5a22771abb8139df6e8f 100644
--- a/Trigger/TrigValidation/TriggerTest/share/testIDAthenaTrigRDO.py
+++ b/Trigger/TrigValidation/TriggerTest/share/testIDAthenaTrigRDO.py
@@ -61,7 +61,7 @@ TriggerFlags.doHLT=True
 #TriggerFlags.doMuon=False
 
 #------------ This is for ATN/RTT tests only ---------
-TriggerFlags.triggerMenuSetup = 'Physics_pp_v6'
+TriggerFlags.triggerMenuSetup = 'Physics_pp_v7'
 #-------------end of flag for tests-------------------
 
 #------------ This is a temporary fix ---------------
@@ -80,21 +80,11 @@ def ElectronOnly():
   TriggerFlags.Lvl1.items = TriggerFlags.Lvl1.items() + [  ]
   
   TriggerFlags.EgammaSlice.signatures = [
-    ['e24_medium_idperf', 'L1_EM18VH', [], ['Egamma'], ['RATE:SingleElectron', 'BW:Egamma'],1],
+    ['e28_lhtight_idperf',        'L1_EM24VHI',    [], ['express'], ['RATE:IDMonitoring', 'BW:Egamma', 'BW:ID'],-1],
     ]
     
-try:
-  from TriggerMenu import useNewTriggerMenu
-  useNewTM = useNewTriggerMenu()
-  log.info("Using new TriggerMenu: %r" % useNewTM)
-except:
-  useNewTM = False
-  log.info("Using old TriggerMenuPython since TriggerMenu.useNewTriggerMenu can't be imported")
   
-if useNewTM:
-  from TriggerMenu.menu.GenerateMenu import GenerateMenu
-else:
-  from TriggerMenuPython.GenerateMenu import GenerateMenu
+from TriggerMenu.menu.GenerateMenu import GenerateMenu
 
 GenerateMenu.overwriteSignaturesWith(ElectronOnly)
 
@@ -108,4 +98,3 @@ include("TriggerTest/TriggerTestCommon.py")
 #-----------------------------------------------------------
 
 
-
diff --git a/Trigger/TrigValidation/TriggerTest/test/exec_art_triggertest_post.sh b/Trigger/TrigValidation/TriggerTest/test/exec_art_triggertest_post.sh
new file mode 100755
index 0000000000000000000000000000000000000000..be962331a22f3e769f3378c4ffd5ea1f77694629
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/exec_art_triggertest_post.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+echo  "Execute TriggerTest post processing"
+
+timeout 1m check_log.pl --config checklogTriggerTest.conf --showexcludestats ${JOB_LOG}
+
+# this is RTT and will need some moving
+#timeout 1m PerfMonRunner.py --fileName=ntuple.pmon.gz --options="-f 0.90"
+
+timeout 1m chainDump.py -S --rootFile=expert-monitoring.root
+
+export REF_FOLDER="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/ref/${AtlasBuildBranch}/${NAME}"
+
+if [ -f ${REF_FOLDER}/athena.regtest ]; then
+  echo "Running regtest"
+  grep REGTEST athena.log > athena.regtest
+  timeout 1m regtest.pl --inputfile athena.regtest --reffile ${REF_FOLDER}/athena.regtest
+else
+  echo "No reference athena.regtest found in ${REF_FOLDER}"
+fi
+
+if [ -f ${REF_FOLDER}/expert-monitoring.root ]; then
+  echo "Running rootcomp"
+  timeout 10m rootcomp.py ${REF_FOLDER}/expert-monitoring.root
+  echo "Running checkcounts"
+  timeout 10m trigtest_checkcounts.sh 0 expert-monitoring.root ${REF_FOLDER}/expert-monitoring.root HLT
+else
+  echo "No reference expert-monitoring.root found in ${REF_FOLDER}"
+fi
+
+if [ -f trig_cost.root ]; then 
+  echo "Running CostMon"
+  timeout 2h RunTrigCostD3PD -f trig_cost.root --outputTagFromAthena --costMode --linkOutputDir > costMon.log 2>&1 
+else 
+  echo "file trig_cost.root does not exist thus RunTrigCostD3PD will not be run"
+fi
+
+if [[ `sed 's|.*\(.* \)|\1|' L1AV.txt | sed 's/^[ \t]*//' |  sed '/^0/'d | wc -l` == 0 ]]; then 
+  echo "L1 counts   ERROR  : all entires are ZERO please consult L1AV.txt"
+fi
+
+if [[ `sed 's|.*\(.* \)|\1|' HLTChain.txt | sed 's/^[ \t]*//' |  sed '/^0/'d | wc -l` == 0 ]]; then 
+  echo "HLTChain counts   ERROR  : all entires are ZERO please consult HLTChain.txt"
+fi
+
+if [[ `sed 's|.*\(.* \)|\1|' HLTTE.txt | sed 's/^[ \t]*//' |  sed '/^0/'d | wc -l` == 0 ]]; then 
+  echo "HLTTE counts   ERROR  : all entires are ZERO please consult HLTTE.txt"
+fi
diff --git a/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh b/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh
new file mode 100755
index 0000000000000000000000000000000000000000..f71ddf9768c1014d32fdaa3fcf4ea9247d5fbf27
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+# Execute common slice code
+
+### DEFAULTS
+
+if [ -z ${MENU} ]; then
+  export MENU="MC_pp_v7_tightperf_mc_prescale"
+fi
+
+if [ -z ${EVENTS} ]; then
+  export EVENTS="1000"
+fi
+
+if [ -z ${JOBOPTION} ]; then
+  export JOBOPTION="testCommonSliceAthenaTrigRDO.py"
+fi
+
+if [ -z ${JOB_LOG} ]; then
+  export JOB_LOG="athena.log"
+fi
+
+if [ -z ${EXTRA} ]; then
+  export EXTRA="extraPython=False;"
+fi
+
+if [ -z ${COST_MONITORING} ]; then
+  export COST_MONITORING="True"
+fi
+
+###
+
+if [[ $INPUT == "pbpb" ]]; then
+  export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc15_5TeV.420000.Hijing_PbPb_5p02TeV_MinBias_Flow_JJFV6.recon.RDO.e3754_s2633_r7161/RDO.06677682._000001.pool.root.1","/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc15_5TeV.420000.Hijing_PbPb_5p02TeV_MinBias_Flow_JJFV6.recon.RDO.e3754_s2633_r7161/RDO.06677682._000002.pool.root.1","/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc15_5TeV.420000.Hijing_PbPb_5p02TeV_MinBias_Flow_JJFV6.recon.RDO.e3754_s2633_r7161/RDO.06677682._000003.pool.root.1"]'
+
+elif [[ $INPUT == "ftk" ]]; then
+  export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/RDO_FTK.10733709._000019.pool.root.1"]'
+
+elif [[ $INPUT == "bphysics" ]]; then
+  export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc15_RTT_1000_Bphysics_toAOD_r6889/Bphysics_RDO_r6889_mixed.pool.root"]'
+
+elif [[ $INPUT == "mubphysics" ]]; then
+  export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc15_13TeV.180593.Pythia8_AUMSTW2008LO_Wtaunu_3mu_noPhotos.recon.RDO.e3802_s2608_s2183_r6790/RDO.05594910._000008.pool.root.1"]'
+
+elif [[ $INPUT == "minbias" ]]; then
+  export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/mc15_13TeV.361203.Pythia8_A2_MSTW2008LO_ND_minbias.recon.RDO.e3639_s2606_s2174_r7661_tid07858100_00/RDO.07858100._000087.pool.root.1"]'
+
+else 
+  # Default - ttbar
+  export DS='["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000001.pool.root.1","/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TriggerTest/valid1.110401.PowhegPythia_P2012_ttbar_nonallhad.recon.RDO.e3099_s2578_r7572_tid07644622_00/RDO.07644622._000002.pool.root.1"]'
+fi
+
+athena.py -b -c \
+"enableCostMonitoring=${COST_MONITORING};\
+RunningRTT=True;\
+menu=\"${MENU}\";\
+sliceName=\"${SLICE}\";\
+jp.AthenaCommonFlags.FilesInput=${DS};\
+jp.AthenaCommonFlags.EvtMax.set_Value_and_Lock(${EVENTS});\
+jp.Rec.OutputLevel=WARNING;\
+${EXTRA}\
+LVL1OutputLevel=WARNING;\
+HLTOutputLevel=WARNING;" \
+TriggerTest/${JOBOPTION} | tee ${JOB_LOG}
+
+export ATH_EXIT=$?
\ No newline at end of file
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v3_tight_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v3_tight_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..fc61cb19506e6ae5115cd7eb101b574f50d5520b
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v3_tight_grid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Heavy ion MC v3 tight TriggerTest on MC
+# art-type: grid
+
+export NAME="mc_hi_v3_tight_grid"
+export MENU="MC_HI_v3_tight_mc_prescale"
+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_mc_hi_v4_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v4_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d6cfc06e22a895a56add89ea470da723d5ace274
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_mc_hi_v4_grid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Heavy ion MC v4 TriggerTest on MC
+# art-type: grid
+
+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_mc_pp_v7_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..3ee4ddd52359aadaa053b27b9291d4128e338a35
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: MC v7 TriggerTest on MC
+# art-type: build
+
+export NAME="mc_pp_v7_build"
+export MENU="MC_pp_v7"
+export EVENTS="5"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..aa0b2064194edf27e46ed6da3d6720dd29af7a94
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_grid.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# art-description: MC v7 TriggerTest on MC
+# art-type: grid
+
+export NAME="mc_pp_v7_grid"
+export MENU="MC_pp_v7"
+export EVENTS="500"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_loose_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_loose_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c083fe85043316fb36da20431868c6e94cdb03ed
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_loose_grid.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# art-description: MC v7 loose TriggerTest on MC
+# art-type: grid
+
+export NAME="mc_pp_v7_loose_grid"
+export MENU="MC_pp_v7_loose_mc_prescale"
+export EVENTS="500"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_nops_aod_ftk_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_nops_aod_ftk_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..91b80869318320d4663f56f137796f063e009b4e
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_nops_aod_ftk_build.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# art-description: MC v7 no prescales TriggerTest on FTK MC to AOD
+# art-type: build
+
+export NAME="mc_pp_v7_nops_aod_ftk_build"
+export MENU="MC_pp_v7_no_prescale"
+export INPUT="ftk"
+export JOBOPTIONS="testCommonSliceAthenaTrigRDOtoAOD.py"
+export EVENTS="5"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_nops_aod_ftk_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_nops_aod_ftk_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..48305d6963488d75933bfa10f8fa14f1019651e0
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_nops_aod_ftk_grid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: MC v7 no prescales TriggerTest on FTK MC to AOD
+# art-type: grid
+
+export NAME="mc_pp_v7_nops_aod_ftk_grid"
+export MENU="MC_pp_v7_no_prescale"
+export INPUT="ftk"
+export JOBOPTIONS="testCommonSliceAthenaTrigRDOtoAOD.py"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_tight_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_tight_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..1cf485398084724f091dae640ac917eecf032911
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_mc_pp_v7_tight_grid.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# art-description: MC v7 tight TriggerTest on MC
+# art-type: grid
+
+export NAME="mc_pp_v7_tight_grid"
+export MENU="MC_pp_v7_tight_mc_prescale"
+export EVENTS="500"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..2793b5fe93a106adb00a71d7551e15b0a9764658
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_build.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# art-description: Heavy ion physics v3 TriggerTest on MC
+# art-type: build
+
+export NAME="physics_hi_v3_build"
+export MENU="Physics_HI_v3"
+export EVENTS="5"
+export INPUT="pbpb"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..7dabd9c37ed2b080903c30a9feba1d70fbf2f014
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v3_grid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Heavy ion physics v3 TriggerTest on MC
+# art-type: grid
+
+export NAME="physics_hi_v3_grid"
+export MENU="Physics_HI_v3"
+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
new file mode 100755
index 0000000000000000000000000000000000000000..dafb25bcc9a395534350670e72f038d6d5bbb058
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_build.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# art-description: Heavy ion physics v4 TriggerTest on MC
+# art-type: build
+
+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
+source exec_art_triggertest_post.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
new file mode 100755
index 0000000000000000000000000000000000000000..b9cc858e02508c4e9f18504e0357ae6e52f35824
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_hi_v4_grid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Heavy ion physics v4 TriggerTest on MC
+# art-type: grid
+
+export NAME="physics_pp_v7_aod_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/TrigValidation/TriggerTest/test/test_physics_pp_v7_aod_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_aod_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c86cdf6b6e3aabcb087a24bbb6bbab6e23028dae
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_aod_grid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Physics v7 TriggerTest on MC to AOD
+# art-type: grid
+
+export NAME="physics_pp_v7_aod_grid"
+export MENU="Physics_pp_v7"
+export EVENTS="500"
+export JOBOPTION="testCommonSliceAthenaTrigRDOtoAOD.py"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..e7269e3a44fc8db2af36e66535be0869f0da2b42
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Physics v7 TriggerTest on MC
+# art-type: build
+
+export NAME="physics_pp_v7_build"
+export MENU="Physics_pp_v7"
+export EVENTS="5"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_chainorder_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_chainorder_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..fbbc21a438b9287474966ee877fe207f153c191f
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_chainorder_build.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# art-description: TriggerTest on changes coming through the order of execution
+# art-type: build
+
+export NAME="physics_pp_v7_chainorder_build"
+export MENU="Physics_pp_v7"
+export EVENTS="10"
+export EXTRA="chainOrderOption=-1;"
+export COST_MONITORING="False"
+
+# Run with ascending
+source exec_athena_art_trigger_validation.sh
+mv expert-monitoring.root expert-monitoring-ascend.root
+
+export EXTRA="chainOrderOption=1;"
+
+# Run with decending
+source exec_athena_art_trigger_validation.sh
+
+rootcomp.py expert-monitoring-ascend.root expert-monitoring.root
+
+trigtest_checkcounts.sh expert-monitoring-ascend.root 0 BOTH
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d55d70623edf1fc2ccdab10950638125f06b09e0
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_grid.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# art-description: Physics v7 TriggerTest on MC
+# art-type: grid
+
+export NAME="physics_pp_v7_grid"
+export MENU="Physics_pp_v7"
+export EVENTS="500"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_tight_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_tight_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..97f6fd4e7c287f8be52c84c377e8f744a875c0e4
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_physics_pp_v7_tight_grid.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# art-description: Physics v7 tight TriggerTest on MC
+# art-type: grid
+
+export MENU="Physics_pp_v7_tight_physics_prescale"
+export EVENTS="500"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_bjet_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_bjet_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..af813836e3f7419a49fa5603d1edc470af21bb81
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_bjet_build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Bjet slice TriggerTest on MC
+# art-type: build
+
+export NAME="slice_bjet_build"
+export SLICE="bjet"
+export EVENTS="10"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_bjet_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_bjet_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..208c61426af0021613b6646d99cd11a29b78d4b3
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_bjet_grid.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# art-description: Bjet slice TriggerTest on MC
+# art-type: grid
+
+export NAME="slice_bjet_grid"
+export SLICE="bjet"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysics_aod_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysics_aod_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..cbfb78c019fd5bc5172ac32c6bf28bdd214be81f
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysics_aod_grid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Bphysics slice TriggerTest on MC using Jpsimu6mu6 to AOD
+# art-type: grid
+
+export NAME="slice_bphysics_aod_grid"
+export SLICE="bphysics"
+export INPUT="bphysics"
+export JOBOPTIONS="testCommonSliceAthenaTrigRDOtoAOD.py"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysics_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysics_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..3088aac2f92595578ac414f2241f7bdbda60f01f
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysics_build.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# art-description: Bphysics slice TriggerTest on MC using Jpsimu6mu6 to AOD
+# art-type: build
+
+export NAME="slice_bphysics_build"
+export SLICE="bphysics"
+export INPUT="bphysics"
+export EVENTS="10"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysics_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysics_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..b20896c1891a15953adc1adb52c42eb0409d03d4
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysics_grid.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# art-description: Bphysics slice TriggerTest on MC using Jpsimu6mu6 to AOD
+# art-type: grid
+
+export NAME="slice_bphysics_grid"
+export SLICE="bphysics"
+export INPUT="bphysics"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysicsexo_aod_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysicsexo_aod_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..079c43c5c8a94c88ba052299a4da81418a13daa7
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_bphysicsexo_aod_grid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Bphysics and muon slice TriggerTest on MC using Wtaunu_3mu to AOD
+# art-type: grid
+
+export NAME="slice_bphysicsexo_aod_grid"
+export SLICE="mubphysics"
+export INPUT="mubphysics"
+export JOBOPTIONS="testCommonSliceAthenaTrigRDOtoAOD.py"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_electron_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_electron_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..04e1990a6bcc5b064518de40e3b3651b260cf2ae
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_electron_build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Electron slice TriggerTest on MC
+# art-type: build
+
+export NAME="slice_electron_build"
+export SLICE="egamma"
+export EVENTS="10"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_electron_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_electron_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..5edfb307b89cff573040e7470690c0b5755734a8
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_electron_grid.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# art-description: Electron slice TriggerTest on MC
+# art-type: grid
+
+export NAME="slice_electron_grid"
+export SLICE="egamma"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_id_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_id_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..ccbcfbc696a505e2ba07dc0bb18070b5f5a828ff
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_id_build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: ID TriggerTest over e28_lhtight_idperf on MC
+# art-type: build
+
+export NAME="slice_id_build"
+export EVENTS="10"
+export JOBOPTIONS="testIDAthenaTrigRDO.py"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_jet_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_jet_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..915b64c65ab461dc51d560475e637e0528bbeecc
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_jet_build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Jet slice TriggerTest on MC
+# art-type: build
+
+export NAME="slice_jet_build"
+export SLICE="jet"
+export EVENTS="10"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_jet_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_jet_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..b52c98f0ffe60f3be60401ae2fa3870b790263ba
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_jet_grid.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# art-description: Jet slice TriggerTest on MC
+# art-type: grid
+
+export NAME="slice_jet_grid"
+export SLICE="jet"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_l1_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_l1_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..327974d7528d957e5249d8bce564006ade1a9924
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_l1_build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: No menu (L1) TriggerTest on MC
+# art-type: build
+
+export NAME="slice_l1_build"
+export EVENTS="10"
+export JOBOPTIONS="testLVL1CTPAthenaTrigRDO.py"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_l1_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_l1_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..556d00a000e040a411a1c0487e081115c3f964e7
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_l1_grid.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# art-description: No menu (L1) TriggerTest on MC
+# art-type: grid
+
+export NAME="slice_l1_grid"
+export JOBOPTIONS="testLVL1CTPAthenaTrigRDO.py"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_met_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_met_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..36436c949db373c308995b70fcc638a07567bf5f
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_met_build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: MET slice TriggerTest on MC
+# art-type: build
+
+export NAME="slice_met_build"
+export SLICE="met"
+export EVENTS="10"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_met_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_met_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..d1d326c4b846f0e532ae3a2b9d03c23661e42957
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_met_grid.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# art-description: MET slice TriggerTest on MC
+# art-type: grid
+
+export NAME="slice_met_grid"
+export SLICE="met"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_minbias_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_minbias_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..777274e1ddd00d45d828768a4c380773f0a650c0
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_minbias_build.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# art-description: MinBias slice TriggerTest on MinBias MC
+# art-type: build
+
+export NAME="slice_minbias_build"
+export SLICE="minbias"
+export MENU="Physics_pp_v7"
+export EVENTS="10"
+export INPUT="minbias"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_minbias_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_minbias_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..eda46f1e045a121cc18f664acdd59b63a9285892
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_minbias_grid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: MinBias slice TriggerTest on MinBias MC
+# art-type: grid
+
+export NAME="slice_minbias_grid"
+export SLICE="minbias"
+export MENU="Physics_pp_v7"
+export INPUT="minbias"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_minbias_hmt_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_minbias_hmt_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..12f6a3db623911c30288391971700201bd3af183
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_minbias_hmt_grid.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# art-description: MinBias Enhanced (High Multiplicity Trigger) slice TriggerTest on MC
+# art-type: grid
+
+export NAME="slice_minbias_hmt_grid"
+export SLICE="minbiasEnhanced"
+export MENU="Physics_pp_v7"
+export EVENTS="50"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_muon_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_muon_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9ed56bca288cebda4b814efcce8f277803e67476
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_muon_build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Muon slice TriggerTest on MC
+# art-type: build
+
+export NAME="slice_muon_build"
+export SLICE="muon"
+export EVENTS="10"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_muon_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_muon_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..9b46efef2c00d70d14153d536ae1c01bc3aa00fa
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_muon_grid.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# art-description: Muon slice TriggerTest on MC
+# art-type: grid
+
+export NAME="slice_muon_grid"
+export SLICE="muon"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_tau_build.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_tau_build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..99c78cfeaba71b71ab5c8bdc818f9bb68e936f29
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_tau_build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# art-description: Tau slice TriggerTest on MC
+# art-type: build
+
+export NAME="slice_tau_build"
+export SLICE="tau"
+export EVENTS="10"
+export COST_MONITORING="False"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_slice_tau_grid.sh b/Trigger/TrigValidation/TriggerTest/test/test_slice_tau_grid.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c25af02c07d3752b014b4f8ce4351308f93c1b5d
--- /dev/null
+++ b/Trigger/TrigValidation/TriggerTest/test/test_slice_tau_grid.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# art-description: Tau slice TriggerTest on MC
+# art-type: grid
+
+export NAME="slice_tau_grid"
+export SLICE="tau"
+
+source exec_athena_art_trigger_validation.sh
+source exec_art_triggertest_post.sh
diff --git a/Trigger/TriggerCommon/TrigEDMConfig/cmt/requirements b/Trigger/TriggerCommon/TrigEDMConfig/cmt/requirements
deleted file mode 100644
index 97f11942e84909934decf1a6aa834cecbdce82ae..0000000000000000000000000000000000000000
--- a/Trigger/TriggerCommon/TrigEDMConfig/cmt/requirements
+++ /dev/null
@@ -1,12 +0,0 @@
-package TrigEDMConfig
- 
-author  Fabrizio Salvatore <p.salvatore@cern.ch>
-
-use AtlasPolicy AtlasPolicy-*
-
-apply_pattern declare_joboptions files="*.py "
-apply_pattern declare_python_modules files="*.py"
-
-
-
-
diff --git a/Trigger/TriggerCommon/TrigTier0/cmt/requirements b/Trigger/TriggerCommon/TrigTier0/cmt/requirements
deleted file mode 100644
index e2455bfd77e516a7a56cff0fa50b7fcef84f4495..0000000000000000000000000000000000000000
--- a/Trigger/TriggerCommon/TrigTier0/cmt/requirements
+++ /dev/null
@@ -1,13 +0,0 @@
-package TrigTier0
-author Moritz Backes <Moritz.Backes@cern.ch>
-
-## For Athena policies: it has to be the first use statement
-use AtlasPolicy 	AtlasPolicy-*
-
-## For Gaudi tools, services and objects
-use GaudiInterface 	GaudiInterface-* 	External
-
-
-## apply_pattern component_library
-apply_pattern declare_joboptions files="*.py"
-apply_pattern declare_python_modules files="*.py"
diff --git a/Trigger/TriggerCommon/TriggerMenu/cmt/requirements b/Trigger/TriggerCommon/TriggerMenu/cmt/requirements
deleted file mode 100755
index 417b49eb6f784ea730c039e71a27e4bbfc82cced..0000000000000000000000000000000000000000
--- a/Trigger/TriggerCommon/TriggerMenu/cmt/requirements
+++ /dev/null
@@ -1,26 +0,0 @@
-package TriggerMenu
-
-author  Moritz Backes <Moritz.Backes@cern.ch> Catrin Bernius <Catrin.Bernius@cern.ch>
-	
-use AtlasPolicy AtlasPolicy-*
-
-
-apply_pattern declare_joboptions files="*.py"
-
-apply_pattern declare_python_modules files="*.py menu l1 l1menu l1topo \
-                                            l1topomenu egamma muon jet \
-                                            bjet met tau minbias heavyion \
-                                            bphysics calibcosmicmon test \
-                                            combined commonUtils"
-
-apply_pattern declare_xmls
-
-apply_pattern declare_scripts files="-s=../scripts generate*Menu.py menuTestTMC.sh"
-
-## at the moment these scripts conflict with those in the old TMP and are not useful anyway with the new TM (JS)
-#apply_pattern declare_scripts \
-#        files="-s=../scripts dumpMenu.py createMenuXMLFiles.sh \
-#		generateChainDef.py \
-#		trigconf_dumphltchain.py trigconf_find_related.py \
-#		printL1CableMap.py \
-#		addPS.py"
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/jet/ChainConfigMaker.py b/Trigger/TriggerCommon/TriggerMenu/python/jet/ChainConfigMaker.py
index eb1a29fffc048f835f92eaf7881c2ca190103218..67bfc54451ab82129456b804f32ae227da37d41c 100644
--- a/Trigger/TriggerCommon/TriggerMenu/python/jet/ChainConfigMaker.py
+++ b/Trigger/TriggerCommon/TriggerMenu/python/jet/ChainConfigMaker.py
@@ -384,7 +384,7 @@ def _get_fex_params(parts):
 
     # the trimming fex needs some further parameters
     if fex_type == 'jetrec_trimming':
-        args['ptfrac'] = 0.05
+        args['ptfrac'] = 0.04
         args['rclus'] = 0.2
 
         
diff --git a/Trigger/TriggerCommon/TriggerMenu/python/l1/CoreLut.py b/Trigger/TriggerCommon/TriggerMenu/python/l1/CoreLut.py
deleted file mode 100644
index 822106472f39abc1adcf1c88269fb664b10eb964..0000000000000000000000000000000000000000
--- a/Trigger/TriggerCommon/TriggerMenu/python/l1/CoreLut.py
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-
-class CoreLut(object):
-
-    # LUT  0-19  of size 15 : tip   0 - 299
-    # LUT 20-36  of size 12 : tip 300 - 503
-    # LUT    37  of size  8 : tip 504 - 511
-
-    # maps LUT number to index of first TIP
-    lutDef = {
-        0 : 0,
-        1 : 15,
-        2 : 30,
-        3 : 45,
-        4 : 60,
-        5 : 75,
-        6 : 90,
-        7 : 105,
-        8 : 120,
-        9 : 135,
-        10 : 150,
-        11 : 165,
-        12 : 180,
-        13 : 195,
-        14 : 210,
-        15 : 225,
-        16 : 240,
-        17 : 255,
-        18 : 270,
-        19 : 285,
-        20 : 300,
-        21 : 312,
-        22 : 324,
-        23 : 336,
-        24 : 348,
-        25 : 360,
-        26 : 372,
-        27 : 384,
-        28 : 396,
-        29 : 408,
-        30 : 420,
-        31 : 432,
-        32 : 444,
-        33 : 456,
-        34 : 468,
-        35 : 480,
-        36 : 492,
-        37 : 504
-        }
-
-
-    def __init__(self):
-        pass
-
-    @staticmethod
-    def getLutSize(lutnumber):
-        if lutnumber>=0  and lutnumber<20 : return 15
-        if lutnumber>=20 and lutnumber<37 : return 12
-        if lutnumber==37:                   return 8
-        raise RuntimeError("CoreLut.py getLutSize(): LUT number %i does not exist" % lutnumber)
-
-
-    @staticmethod
-    def getLutRange(lutnumber):
-        if lutnumber>=0 and lutnumber<20 :
-            begin = 15 * lutnumber
-            end   = begin + 14
-        elif lutnumber>=20 and lutnumber<37 :
-            begin = 300 + 12 * (lutnumber-16)
-            end   = begin + 11
-        elif lutnumber==37:
-            begin = 504
-            end   = 511
-        else:
-            raise RuntimeError("CoreLut.py getLutRange(): LUT number %i does not exist" % lutnumber)
-        return (begin,end)
-
-
-
-    @staticmethod
-    def getLutAndBit(tip):
-        tip = int(tip)
-        if tip>=0 tip<300:
-            lut = tip/15
-            bit = tip % 15
-        elif tip>=300 tip<504:
-            lut = (tip-300)/12 + 20
-            bit = (tip-300) % 12
-        elif tip>=504 tip<512:
-            lut = 37
-            bit = tip-504
-        else:
-            raise RuntimeError("CoreLut.py getLutAndBit(tip): tip %i does not exist" % tip)
-        return lut
-
-
-
-    @staticmethod
-    def getLutAndBit(connector, signal):
-        firstTIPofConnector = [320, 384, 448] # last if 511
-
-        tip = firstTIPofConnector[ connector ] + signal
-            
-        return CoreLut.getLutAndBit(tip)
-
-
-    @staticmethod
-    def isOnOneLut(connector, phase, listOfCableBits):
-
-        occupiedLuts = set([ getLutAndBit(connector,2*b + phase)[0] for b in listOfCableBits])
-
-        if len(occupiedLuts)>1:
-            raise RuntimeError("logic stretches over more than one LUT")
-
-
-
-
-        
-
-coreLut = CoreLut()
diff --git a/Trigger/TriggerRelease/python/Modifiers.py b/Trigger/TriggerRelease/python/Modifiers.py
index 8fc2f252d2c2ad03a93a31699608b322d33bfaa2..279333edb42220f3b3894af275eb4ddf42f89a92 100644
--- a/Trigger/TriggerRelease/python/Modifiers.py
+++ b/Trigger/TriggerRelease/python/Modifiers.py
@@ -207,45 +207,13 @@ class shiftMBTSTiming(_modifier):
                 if child.getType()=='T2MbtsHypo':
                     child.GlobalTimeOffset=45
 
-class useL2MuonAlign(_modifier):
-    """
-    Apply muon alignment
-    """
-    def postSetup(self):
-        if TriggerFlags.doLVL2():
-            from MuonRecExample import MuonAlignConfig
-            #temporary hack to workaround DB problem - should not be needed any more
-            folders=svcMgr.IOVDbSvc.Folders
-            newFolders=[]
-            for f in folders:
-                if f.find('MDT/BARREL')!=-1:
-                    f+='<key>/MUONALIGN/MDT/BARREL</key>'
-                newFolders.append(f)
-            svcMgr.IOVDbSvc.Folders=newFolders
-            svcMgr.AmdcsimrecAthenaSvc.AlignmentSource=2
-
-class useEFMuonAlign(_modifier):
-    """
-    Apply muon alignment
-    """
-    def postSetup(self):
-        if TriggerFlags.doEF():
-            from MuonRecExample import MuonAlignConfig
-            #temporary hack to workaround DB problem
-            folders=svcMgr.IOVDbSvc.Folders
-            newFolders=[]
-            for f in folders:
-                if f.find('MDT/BARREL')!=-1:
-                    f+='<key>/MUONALIGN/MDT/BARREL</key>'
-                newFolders.append(f)
-            svcMgr.IOVDbSvc.Folders=newFolders
 
 class useHLTMuonAlign(_modifier):
     """
     Apply muon alignment
     """
     def postSetup(self):
-        if TriggerFlags.doHLT():
+        if TriggerFlags.doHLT() and TriggerFlags.doMuon():
             from MuonRecExample import MuonAlignConfig
             #temporary hack to workaround DB problem - should not be needed any more
             folders=svcMgr.IOVDbSvc.Folders
@@ -258,43 +226,12 @@ class useHLTMuonAlign(_modifier):
             svcMgr.AmdcsimrecAthenaSvc.AlignmentSource=2
 
 
-class useRecentL2MuonAlign(_modifier):
-    """
-    Apply muon alignment
-    """
-    def postSetup(self):
-        if TriggerFlags.doLVL2():
-            from MuonRecExample import MuonAlignConfig
-            folders=svcMgr.IOVDbSvc.Folders
-            newFolders=[]
-            for f in folders:
-                if f.find('MUONALIGN')!=-1 and f.find('TGC')==-1:
-                    f+='<forceTimestamp> 1384749388 </forceTimestamp>'
-                newFolders.append(f)
-            svcMgr.IOVDbSvc.Folders=newFolders
-
-class useRecentEFMuonAlign(_modifier):
-    """
-    Apply muon alignment
-    """
-    def postSetup(self):
-        if TriggerFlags.doEF():
-            from MuonRecExample import MuonAlignConfig
-            folders=svcMgr.IOVDbSvc.Folders
-            newFolders=[]
-            for f in folders:
-                if f.find('MUONALIGN')!=-1 and f.find('TGC')==-1:
-                    f+='<forceTimestamp> 1384749388 </forceTimestamp>'
-                newFolders.append(f)
-            svcMgr.IOVDbSvc.Folders=newFolders
-
 class useRecentHLTMuonAlign(_modifier):
     """
     Apply muon alignment
     """
     def postSetup(self):
-        if TriggerFlags.doHLT():
-            print "useHLTMuonAlign"
+        if TriggerFlags.doHLT() and TriggerFlags.doMuon():
             from MuonRecExample import MuonAlignConfig
             folders=svcMgr.IOVDbSvc.Folders
             newFolders=[]
@@ -365,6 +302,8 @@ class openThresholdRPCCabling(_modifier):
     and other entries at http://alxr.usatlas.bnl.gov/lxr/ident?i=cosmic
     """
     def postSetup(self):
+        if not TriggerFlags.doMuon(): return
+
         from MuonCnvExample.MuonCnvFlags import muonCnvFlags
         if muonCnvFlags.RpcCablingMode=='new':
             from MuonRPC_Cabling.MuonRPC_CablingConfig import MuonRPC_CablingSvc
@@ -495,11 +434,13 @@ class forceTileRODMap(_modifier):
     Configure Tile ROD map based on run-number (ATR-16290)
     """
     def postSetup(self):
-        from AthenaCommon.AppMgr import ToolSvc
+        if not hasattr(svcMgr.ToolSvc,"TileROD_Decoder"):
+           from TileByteStream.TileByteStreamConf import TileROD_Decoder
+           svcMgr.ToolSvc+=TileROD_Decoder()
         if _run_number<318000:  # use old readout scheme (default is new one)
             log.info('Reverting to pre-2017 Tile ROD map')
-            ToolSvc.TrigDataAccess.fullTileMode=False
-            ToolSvc.TileRegionSelectorTable.FullRODs=False
+            svcMgr.ToolSvc.TileROD_Decoder.fullTileMode=0
+
 
 
 class useOnlineLumi(_modifier):
@@ -558,15 +499,6 @@ class physicsPTmode(_modifier):
         TriggerFlags.physics_pass_through=True
 
 
-
-class enable7BitL1TTStreaming(_modifier):
-    """
-    select setup with 7 bit L1 TT streaming
-    """
-    def preSetup(self):
-        TriggerFlags.CosmicSlice.UseSingleBeam7BitL1Menu=True
-
-
 class enableHotIDMasking(_modifier):
     """
     Masking of hot pixel and SCT modules enabled in L2 spacepoint provider
@@ -618,8 +550,6 @@ class ignoreL1Vetos(_modifier):
     def postSetup(self):
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
-        if hasattr(topSequence,"TrigSteer_L2"):
-            topSequence.TrigSteer_L2.LvlConverterTool.ignorePrescales=True
         if hasattr(topSequence,"TrigSteer_HLT"):
             topSequence.TrigSteer_HLT.LvlConverterTool.ignorePrescales=True
             
@@ -721,11 +651,6 @@ class mufastDetMask(_modifier):
     def postSetup(self):
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
-        if hasattr(topSequence,'TrigSteer_L2'):
-            for instance in ['muFast_Muon','muFast_900GeV','muFast_HALO']:
-                muFast = topSequence.TrigSteer_L2.allConfigurables.get(instance)
-                if muFast:
-                    muFast.DetMaskCheck=True
         if hasattr(topSequence,'TrigSteer_HLT'):
             for instance in ['muFast_Muon','muFast_900GeV','muFast_HALO']:
                 muFast = topSequence.TrigSteer_HLT.allConfigurables.get(instance)
@@ -741,8 +666,6 @@ class muonCommissioningStep1(_modifier):
     def postSetup(self):
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
-        if hasattr(topSequence,"TrigSteer_L2"):
-            topSequence.TrigSteer_L2.LvlConverterTool.Lvl1ResultAccessTool.muonCommissioningStep=1
         if hasattr(topSequence,"TrigSteer_HLT"):
             topSequence.TrigSteer_HLT.LvlConverterTool.Lvl1ResultAccessTool.muonCommissioningStep=1
 
@@ -753,11 +676,6 @@ class muonEFTimeouts(_modifier):
     def postSetup(self):
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
-        if hasattr(topSequence,'TrigSteer_EF'):
-            for inst in topSequence.TrigSteer_EF.getAllChildren():
-                if inst.getType()=='TrigMuonEFSegmentFinder':
-                    inst.doTimeOutGuard=True
-                    inst.maxMdtHits=1000
         if hasattr(topSequence,'TrigSteer_HLT'):
             for inst in topSequence.TrigSteer_HLT.getAllChildren():
                 if inst.getType()=='TrigMuonEFSegmentFinder':
@@ -1041,14 +959,6 @@ class UseRPCTimeDelayFromDataForMufast(_modifier):
     def postSetup(self):
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
-        if hasattr(topSequence,"TrigSteer_L2"):
-            for inst in topSequence.TrigSteer_L2.getAllChildren():
-                if inst.getType()=='muFast':
-                    delay=-40
-                    if inst.name() == 'muFast_MuonEcut4Empty':
-                        delay=-15
-                    print 'UseRPCTimeDelayFromDataForMufast: modifying RpcTimeDelay to ',delay,' for ',inst.name()
-                    inst.RpcTimeDelay=delay
         if hasattr(topSequence,"TrigSteer_HLT"):
             for inst in topSequence.TrigSteer_HLT.getAllChildren():
                 if inst.getType()=='muFast':
@@ -1068,14 +978,6 @@ class UseLUTFromDataForMufast(_modifier):
         from TrigMuonBackExtrapolator.TrigMuonBackExtrapolatorConfig import MuonBackExtrapolatorForData
         ToolSvc += MuonBackExtrapolatorForData()
         topSequence = AlgSequence()
-        if hasattr(topSequence,"TrigSteer_L2"):
-            for inst in topSequence.TrigSteer_L2.getAllChildren():
-                if inst.getType()=='muFast':
-                    inst.UseLUTForMC=False
-                elif inst.getType()=='MuFastSteering':
-                    inst.UseLUTForMC=False
-                    print 'UseLUTFromDataForMufast: set backExtrapolator to MuonBackExtrapolatorForData()'
-                    inst.BackExtrapolator = MuonBackExtrapolatorForData()
 
         if hasattr(topSequence,"TrigSteer_HLT"):
             for inst in topSequence.TrigSteer_HLT.getAllChildren():
@@ -1091,8 +993,9 @@ class DisableMdtT0Fit(_modifier):
     Disable MDT T0 re-fit and use constants from COOL instead
     """
     def preSetup(self):
-        from MuonRecExample.MuonRecFlags import muonRecFlags
-        muonRecFlags.doSegmentT0Fit.set_Value_and_Lock(False)
+        if TriggerFlags.doMuon():
+            from MuonRecExample.MuonRecFlags import muonRecFlags
+            muonRecFlags.doSegmentT0Fit.set_Value_and_Lock(False)
 
 class UseBackExtrapolatorDataForMuIso(_modifier):
    """
@@ -1109,12 +1012,6 @@ class UseBackExtrapolatorDataForMuIso(_modifier):
                if inst.getType()=='muIso':
                    print 'UseBackExtrapolatorDataForMuComb: set backExtrapolatorLUT to MuonBackExtrapolatorForData()'
                    inst.BackExtrapolatorLUT = MuonBackExtrapolatorForData()
-       if hasattr(topSequence,"TrigSteer_L2"):
-           for inst in topSequence.TrigSteer_L2.getAllChildren():
-               if inst.getType()=='muIso':
-                   print 'UseBackExtrapolatorDataForMuComb: set backExtrapolatorLUT to MuonBackExtrapolatorForData()'
-                   inst.BackExtrapolatorLUT = MuonBackExtrapolatorForData()
-
 
 ###############################################################
 # Monitoring and misc.
@@ -1219,9 +1116,7 @@ class mufastDebug(_modifier):
     def postSetup(self):
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
-        if hasattr(topSequence,"TrigSteer_L2"):
-            TrigSteer=topSequence.TrigSteer_L2
-        elif hasattr(topSequence,"TrigSteer_HLT"):
+        if hasattr(topSequence,"TrigSteer_HLT"):
             TrigSteer=topSequence.TrigSteer_HLT
 
         muFast = TrigSteer.allConfigurables.get('muFast_Muon')
@@ -1328,11 +1223,6 @@ class detailedTiming(_modifier):
         svcMgr.TrigTimerSvc.IncludeName=".+"
         from AthenaCommon.AlgSequence import AlgSequence
         topSequence = AlgSequence()
-        if hasattr(topSequence,'TrigSteer_L2'):
-            for instance in ['muFast_Muon','muFast_900GeV']:
-                muFast = topSequence.TrigSteer_L2.allConfigurables.get(instance)
-                if muFast:
-                    muFast.Timing=True
         if hasattr(topSequence,'TrigSteer_HLT'):
             for instance in ['muFast_Muon','muFast_900GeV']:
                 muFast = topSequence.TrigSteer_HLT.allConfigurables.get(instance)
@@ -1458,11 +1348,6 @@ class TriggerRateTool(_modifier):
         svcMgr.THistSvc.Output += ["TriggerRateTools DATAFILE='TriggerRates.root' OPT='RECREATE'"]
         triggerRateTools.xSection = 0.070
         triggerRateTools.Luminosity = 10000000.0
-        if hasattr(topSequence,"TrigSteer_L2"):
-            topSequence.TrigSteer_L2.ignorePrescales=True
-            topSequence.TrigSteer_L2.LvlConverterTool.Lvl1ResultAccessTool.ignorePrescales=True
-        if hasattr(topSequence,"TrigSteer_EF"):
-            topSequence.TrigSteer_EF.ignorePrescales=True
         if hasattr(topSequence,"TrigSteer_HLT"):
             topSequence.TrigSteer_HLT.ignorePrescales=True
             topSequence.TrigSteer_HLT.LvlConverterTool.Lvl1ResultAccessTool.ignorePrescales=True
@@ -1477,8 +1362,6 @@ class doMufastNtuple(_modifier):
         from AthenaCommon.AppMgr import ServiceMgr as svcMgr
         topSequence = AlgSequence()
         for algo in ['muFast_900GeV','muFast_HALO','muFast_Muon']:
-            if hasattr(topSequence.TrigSteer_L2,algo):
-                getattr(topSequence.TrigSteer_L2,algo).MONntuple=True
             if hasattr(topSequence.TrigSteer_HLT,algo):
                 getattr(topSequence.TrigSteer_HLT,algo).MONntuple=True
         theApp.HistogramPersistency = "ROOT"
diff --git a/Trigger/TriggerSimulation/L1TopoCoreSimulation/cmt/requirements b/Trigger/TriggerSimulation/L1TopoCoreSimulation/cmt/requirements
deleted file mode 100644
index d158e4a6b062246caed2ea0061ad456e4600ae29..0000000000000000000000000000000000000000
--- a/Trigger/TriggerSimulation/L1TopoCoreSimulation/cmt/requirements
+++ /dev/null
@@ -1,14 +0,0 @@
-package L1TopoCoreSimulation
-
-# General
-use     DetCommonPolicy             DetCommonPolicy-*
-
-# Trigger
-
-apply_pattern detcommon_header_installer
-
-
-apply_pattern detcommon_shared_library
-
-
-apply_pattern trigconf_application name=TopoTest
diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/cmt/requirements b/Trigger/TriggerSimulation/TrigSimTransforms/cmt/requirements
deleted file mode 100644
index adc0607bc8d87d4fbbe602aac35b4ad77855e911..0000000000000000000000000000000000000000
--- a/Trigger/TriggerSimulation/TrigSimTransforms/cmt/requirements
+++ /dev/null
@@ -1,43 +0,0 @@
-package TrigSimTransforms
-
-author Gorm Galster <gorm.galster@cern.ch>
-
-private
-
-# Basic Gaudi/Athena package(s):
-use AtlasPolicy        AtlasPolicy-*
-use GaudiInterface     GaudiInterface-*     External
-use AtlasROOT          AtlasROOT-*          External
-use StoreGate          StoreGate-*          Control
-use EventInfo          EventInfo-*          Event
-use AthenaKernel       AthenaKernel-*       Control
-use SGTools            SGTools-*            Control
-
-# Trigger package(s):
-use TrigSteeringEvent  TrigSteeringEvent-*  Trigger/TrigEvent
-
-# Trigger event package(s):
-use TrigMuonEvent      TrigMuonEvent-*      Trigger/TrigEvent
-use TrigParticle       TrigParticle-*       Trigger/TrigEvent
-use TrigInDetEvent     TrigInDetEvent-*     Trigger/TrigEvent
-use TrigCaloEvent      TrigCaloEvent-*      Trigger/TrigEvent
-
-end_private
-
-# Declare the library:
-library TrigSimTransforms *.cxx components/*.cxx
-apply_pattern component_library
-
-# Declare the job option(s):
-apply_pattern declare_joboptions files="*.py"
-
-# install the python module
-apply_pattern declare_python_modules files="*.py"
-
-
-#apply_pattern declare_job_transforms tfs='*.py' jo='*.py'
-
-public 
-
-apply_pattern declare_scripts files="-s=../scripts *.sh *.py"
-
diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py b/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py
index 5e281966292f2fb6e08cb0d1d96da999f0b318a1..4a8a19d91c908cc8f23a96ae94eae5f1ef177489 100644
--- a/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py
+++ b/Trigger/TriggerSimulation/TrigSimTransforms/share/MergingEventLoopMgr_TriggerBSandRDOtoRDO.py
@@ -98,7 +98,8 @@ svcMgr.EventPersistencySvc.CnvServices += [ "ByteStreamCnvSvc" ]
 
 svcMgr += ByteStreamAddressProviderSvc()
 
-svcMgr.ByteStreamAddressProviderSvc.StoreID = 6
+from AthenaKernel import StoreID
+svcMgr.ByteStreamAddressProviderSvc.StoreID = StoreID.UNKNOWN
 
 """
 # LVL1
diff --git a/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx b/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx
index 4ba07598ac1e0c00dbfb1d5dbf804e197a2b62ed..d3a5483be0c170da6748400dcc50908a48e09c93 100644
--- a/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx
+++ b/Trigger/TriggerSimulation/TrigSimTransforms/src/MergingEventLoopMgr.cxx
@@ -29,6 +29,7 @@
 
 #include "AthenaKernel/IAthenaEvtLoopPreSelectTool.h"
 #include "AthenaKernel/ExtendedEventContext.h"
+#include "AthenaKernel/EventContextClid.h"
 
 #include "GaudiKernel/ThreadLocalContext.h"
 #include "GaudiKernel/Algorithm.h"
@@ -492,11 +493,19 @@ namespace TrigSim {
 
             m_eventContext.setEventID( *((EventIDBase*) pPrimEvt->event_ID()) );
             m_eventContext.set(m_nEvt,0);
-            m_eventContext.setExtension( Atlas::ExtendedEventContext( m_primEvtStore->hiveProxyDict() ) );
+            m_eventContext.setExtension( Atlas::ExtendedEventContext( m_primEvtStore->hiveProxyDict(),
+                                                                      pPrimEvt->event_ID()->run_number() ) );
 
             Gaudi::Hive::setCurrentContext( m_eventContext );
 
             m_aess->reset(m_eventContext);
+            if (m_primEvtStore->record(std::make_unique<EventContext> (m_eventContext),
+                                       "EventContext").isFailure())
+            {
+              m_log << MSG::ERROR 
+                    << "Error recording event context object" << endmsg;
+              return (StatusCode::FAILURE);
+            }
 
 
             /*
@@ -891,8 +900,7 @@ namespace TrigSim {
         return sc;
     }
 //------------------------------------------------------------------------------
-    StatusCode MergingEventLoopMgr::executeEvent(void *par) {
-        par = par;
+    StatusCode MergingEventLoopMgr::executeEvent(void */*par*/) {
         m_log << MSG::ERROR
               << "executeEvent(...) is not implemented for MergingEventLoopMgr"
               << endmsg;
@@ -917,8 +925,7 @@ namespace TrigSim {
         return sc;
     }
 //------------------------------------------------------------------------------
-    StatusCode MergingEventLoopMgr::seek(int evt) {
-        evt = evt;
+    StatusCode MergingEventLoopMgr::seek(int /*evt*/) {
         m_log << MSG::ERROR
               << "seek() is not implemented for MergingEventLoopMgr"
               << endmsg;
diff --git a/docs/doxyfile b/docs/doxyfile
index f4b7d20add93c6a446ac8337f53f9db582443990..d71c794e6939cd2ca7a1bc7f825360d21e9c9267 100644
--- a/docs/doxyfile
+++ b/docs/doxyfile
@@ -293,15 +293,6 @@ EXTENSION_MAPPING      =
 
 MARKDOWN_SUPPORT       = YES
 
-# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
-# to that level are automatically included in the table of contents, even if
-# they do not have an id attribute.
-# Note: This feature currently applies only to Markdown headings.
-# Minimum value: 0, maximum value: 99, default value: 0.
-# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
-
-TOC_INCLUDE_HEADINGS   = 0
-
 # When enabled doxygen tries to link words that correspond to documented
 # classes, or namespaces to their corresponding documentation. Such a link can
 # be prevented in individual cases by putting a % sign in front of the word or
@@ -431,7 +422,7 @@ EXTRACT_ALL            = YES
 # be included in the documentation.
 # The default value is: NO.
 
-EXTRACT_PRIVATE        = NO
+EXTRACT_PRIVATE        = YES
 
 # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
 # scope will be included in the documentation.
@@ -1024,25 +1015,6 @@ USE_HTAGS              = NO
 
 VERBATIM_HEADERS       = YES
 
-# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
-# cost of reduced performance. This can be particularly helpful with template
-# rich C++ code for which doxygen's built-in parser lacks the necessary type
-# information.
-# Note: The availability of this option depends on whether or not doxygen was
-# generated with the -Duse-libclang=ON option for CMake.
-# The default value is: NO.
-
-CLANG_ASSISTED_PARSING = NO
-
-# If clang assisted parsing is enabled you can provide the compiler with command
-# line options that you would normally use when invoking the compiler. Note that
-# the include paths will already be set by doxygen for the files and directories
-# specified with INPUT and INCLUDE_PATH.
-# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
-
-CLANG_OPTIONS          = 
-
 #---------------------------------------------------------------------------
 # Configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
@@ -2375,11 +2347,6 @@ DIAFILE_DIRS           =
 
 PLANTUML_JAR_PATH      = 
 
-# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
-# configuration file for plantuml.
-
-PLANTUML_CFG_FILE      = 
-
 # When using plantuml, the specified paths are searched for files specified by
 # the !include statement in a plantuml block.
 
diff --git a/graphics/AtlantisJava/share/configupdater.py b/graphics/AtlantisJava/share/configupdater.py
deleted file mode 100644
index b8876de2ce05733096631555e4414c07ba0d79cd..0000000000000000000000000000000000000000
--- a/graphics/AtlantisJava/share/configupdater.py
+++ /dev/null
@@ -1,270 +0,0 @@
-"""
-author Zdenek Maxa
-description:
-    Automatic configuration updater.
-    Script runs over all customised configuration files as found in the
-    directory DIRECTORY_WITH_CONFIGURATIONS_TO_UPDATE  (pattern config-*.xml)
-    and calls internal Atlantis XML configuration files updater from the class
-    AConfigUpdater. Then runs Atlantis with each of the updated configuration
-    files.
-"""
-
-
-# following two specified as command line arguments
-ATLANTIS_DISTRIBUTION_PATH = ""
-DIRECTORY_WITH_CONFIGURATIONS_TO_UPDATE = "" # will use mask CONFIG_FILES_MASK
-
-CONFIG_FILES_MASK = "config-*.xml"
-ATLANTIS_JAR_FILE = "atlantis.jar"
-ATLANTIS_LIB_DIR = "lib"
-
-
-print "Jython configupdater.py (Atlantis configurations) script running ..."
-
-
-try:
-    print "Importing Jython modules ..."
-    import os
-    import sys
-    import fnmatch
-    import traceback
-    import getopt
-    import popen2
-    import threading
-    import time
-    print "Importing Java libraries / classes (from Java installation) ..."
-    # must be imported in this form
-    from java.lang import Throwable
-    from java.lang import Exception
-    from java.lang import NoClassDefFoundError
-    from java.lang import Runtime
-    from java.lang import System
-    from java.lang import Runnable
-    from java.lang import Thread
-except (NameError, ImportError), ex:
-    print ("Error during import. Missing either Jython libraries or Java is "
-           "improperly installed or set up (JAVA_HOME var.), reason: %s"
-            % ex)
-    sys.exit(1)
-else:
-    print "Import successful."
-
-
-
-BASE_CONFIGURATION = os.path.join("configuration", "config.xml")
-
-
-class StreamReader(Runnable):
-    """Used for reading standard output and standard error output of the
-       process.
-    """
-    def __init__(self, stream, logger):
-        self.stream = stream
-        self.logger = logger
-        logger.debug("StreamReader init ...")
-
-    def run(self):
-        self.logger.debug("StreamReader thread started ...")
-        line = ""
-        while 1:
-            data = self.stream.read()
-            
-            if data == -1:
-                break
-
-            # data is a character by character from the stream
-            # data contains ASCII value
-            char = chr(data)
-            if char != '\n':
-                line = "".join([line, char]) # restore a line
-            else:
-                self.logger.info(line)
-                line = ""
-
-
-
-
-# get mandatory command line arguments --------------------------------------
-
-try:
-    print "Processing command line arguments ..."
-    options, arguments = getopt.getopt(sys.argv[1:], "ha:u:",
-            ["help", "atlantis=", "update="])
-except getopt.GetoptError, ex:
-    print "Error while processing command line arguments, reason: ", ex
-    print "-a, --atlantis <path> - path to the atlantis distribution"
-    print "-u, --update <path> - path to customised config files"
-    sys.exit(1)
-else:
-    for opt, arg in options:
-        if opt in ("-h", "--help"):
-            print "-a, --atlantis <path> - path to the atlantis distribution"
-            print "-u, --update <path> - path to customised config files"
-            sys.exit(1)
-        elif opt in ("-a", "--atlantis"):
-            ATLANTIS_DISTRIBUTION_PATH = arg
-        elif opt in ("-u", "--update"):
-            DIRECTORY_WITH_CONFIGURATIONS_TO_UPDATE = arg
-    if(not ATLANTIS_DISTRIBUTION_PATH or
-       not DIRECTORY_WITH_CONFIGURATIONS_TO_UPDATE):
-           print "Mandatory arguments not set, exit. See --help"
-           sys.exit(1)
-    else:
-        print ("Command line arguments correct.\n"
-               "\tAtlantis distribution path: \"%s\"\n"
-               "\tdirectory with config files to update: \"%s\"" %
-               (ATLANTIS_DISTRIBUTION_PATH,
-                DIRECTORY_WITH_CONFIGURATIONS_TO_UPDATE))
-
-
-# load classes from the Atlantis distributon --------------------------------
-
-# add libraries (jar files) into sys.path, so it's possible to import from
-# need to add all atlantis libraries into class path, otherwise calling some
-# method which interacts deep down with external library (only import is
-# enough) will result into NoClassDefFoundError
-# adding atlantis.jar into path
-print "Loading classes from Atlantis distribution ..."
-libs = []
-atlantisPath = os.path.join(ATLANTIS_DISTRIBUTION_PATH, ATLANTIS_JAR_FILE)
-if not os.path.exists(atlantisPath):
-    print "%s file does not exist, exit." % atlantisPath
-    sys.exit(1)
-libs.append(atlantisPath)
-libDir = os.path.join(ATLANTIS_DISTRIBUTION_PATH, ATLANTIS_LIB_DIR)
-allLibs = os.listdir(libDir)
-for i in allLibs:
-    libFile = os.path.join(libDir, i)
-    if os.path.isfile(libFile) and not os.path.islink(libFile) \
-            and fnmatch.fnmatch(i, "*.jar"):
-        libs.append(libFile)
-print "Adding %s and all libraries from %s into path" % (atlantisPath, libDir)
-# add all libraries from libs
-[sys.path.append(i) for i in libs]
-
-try:
-    print "Importing Atlantis classes ..."
-    from atlantis.config import AConfigUpdater
-    from atlantis.utils import AAtlantisException
-    from atlantis.utils import ALogger
-except (NameError, ImportError), ex:
-    print ("Can't import Atlantis classes, likely wrong path %s, reason: %s"
-            % (atlantisPath, ex))
-    sys.exit(1)
-except NoClassDefFoundError, ex:
-    print "NoClassDefFoundError while importing, reason: %s" % ex
-    sys.exit(1)
-else:
-    print "Import successful."
-
-
-
-# initialise logger from Atlantis -------------------------------------------
-
-try:
-    ALogger.initialize("DEBUG",None)
-    logger = ALogger.getLogger("configupdater.py")
-    logger.info("Logger for configupdater.py initialised.")
-except Exception, ex:
-    print "Exception while creating logger, exit.\nReason: %s " % ex
-    sys.exit(1)
-
-
-
-# get list of customised configurations to update / synchronise with the 
-# base configuration from the atlantis distribution -------------------------
-try:
-    logger.info("Getting list of customised configurations from %s" %
-            DIRECTORY_WITH_CONFIGURATIONS_TO_UPDATE)
-    everything = os.listdir(DIRECTORY_WITH_CONFIGURATIONS_TO_UPDATE)
-except OSError, ex:
-    logger.fatal("Can't access the directory, reason: %s" % ex)
-    sys.exit(1)
-configs = []
-for i in everything:
-    file = os.path.join(DIRECTORY_WITH_CONFIGURATIONS_TO_UPDATE, i)
-    if os.path.isfile(file) and not os.path.islink(file) \
-            and fnmatch.fnmatch(i, CONFIG_FILES_MASK):
-        configs.append(file)
-if len(configs) < 1:
-    logger.error("Configuration files list is empty, nothing to update.");
-    sys.exit(0)
-  
-
-
-# process - update customised configuration files ---------------------------
-logger.info("Updating %s customised configuration(s) ..." % len(configs))
-baseConfig = os.path.join(ATLANTIS_DISTRIBUTION_PATH, BASE_CONFIGURATION)
-logger.info("Base (master) configuration file: %s" % baseConfig)
-if not os.path.exists(baseConfig):
-    logger.fatal("Base configuration file %s does not exist." % baseConfig)
-    sys.exit(1)
-for userConfig in configs:
-    try:
-        logger.debug("Processing file %s ..." % userConfig)
-        AConfigUpdater.updateConfigurationFile(baseConfig, userConfig)
-        logger.debug("File sucessfully updated.");
-    except (Exception, AAtlantisException), ex:
-        logger.fatal("Error while updating file %s, exit now. Reason: %s" %
-                (userConfig, ex))
-        sys.exit(1)
-logger.info("All %s files seem to have been successfully updated." %
-        len(configs))
-
-
-
-# now run atlantis over all newly updated configuration files to make sure
-# atlantis at least starts with them ----------------------------------------
-logger.info("Starting Atlantis with all newly update config files ...")
-for userConfig in configs:
-    operSystem = System.getProperty("os.name")
-    if operSystem.lower().startswith("windows"):
-        logger.info("Running on Windows platform ...")
-        # windows accepts the command in this format
-        command = ("""java -jar "%s" --config "%s" --debug DEBUG""" %
-                  (atlantisPath, userConfig))
-    else:
-        # linux accepts the command in this format
-        logger.info("Running on non-Windows platform ...")
-        command = ("java -jar %s --config %s --debug DEBUG" %
-                  (atlantisPath, userConfig))
-    
-    logger.info("Running command: \"%s\"" % command)
-    # jython's os module doesn't define fork(), kill(), etc, then must
-    # use Java here
-    try:
-        rt = Runtime.getRuntime()
-        p = rt.exec(command)
-        logger.info("Waiting for the Atlantis process ...")
-        # (2008-12-10) on Windows: the above message is written out fine, 
-        # Atlantis shows its splash window but hangs during start up.
-        # Suggestion is that input/output is not handled properly and should
-        # be read ...
-
-        # standard output ; standard error output streams handling
-        Thread(StreamReader(p.getInputStream(), logger)).start() # stdout
-        Thread(StreamReader(p.getErrorStream(), logger)).start() # stderr
-        # p.getOutputStream() - returns Output to the stream - is piped into
-        # the standard input stream (reference to the standard input of the
-        # process)
-       
-        p.waitFor()
-    
-    except Throwable, t:
-        print "Error occured, reason: %s" % t
-        t.printStackTrace()
-
-    # different approach to creating the external processes (and likely the
-    # best) would be to run like this:
-    # args = ["--config", "userConfig"]
-    # Atlantis.main(args)
-    # and catching exceptions, however, static class references like in
-    # Atlantis.getHomeDirectory():
-    # Atlantis.class.getResource("Atlantis.class").getFile() fails when called
-    # from Jython
-
-logger.info("Backup files were created in \"%s\" directory erase them " 
-            "manually if all files were updated all right." %
-            DIRECTORY_WITH_CONFIGURATIONS_TO_UPDATE)
-
-
diff --git a/graphics/VP1/VP1Gui/src/VP1Authenticator.cxx b/graphics/VP1/VP1Gui/src/VP1Authenticator.cxx
index 57ada679d830e2dd6e07a4add6f19a9758a7a45b..a902757760149437193837e690b1cdb836ec051c 100644
--- a/graphics/VP1/VP1Gui/src/VP1Authenticator.cxx
+++ b/graphics/VP1/VP1Gui/src/VP1Authenticator.cxx
@@ -400,7 +400,7 @@ void VP1Authenticator::finished()
   //   2. Look for 'Logon failure' string in the response body
   // We implement the option #1
   //
-  // If the authentication considered successfull then arse contents of the 
+  // If the authentication considered successfull then parse contents of the 
   // response, look for input tags and collect their attributes
   // and compose a new POST request
   if(d->stage==3) {
diff --git a/graphics/VP1/VP1HEPVis/src/SbPolyhedron.cxx b/graphics/VP1/VP1HEPVis/src/SbPolyhedron.cxx
index 97aeb77fd2a0a06666f022cd4db0440c59d37b1e..716e8d7e644877538ac6531221fce89d913249e6 100644
--- a/graphics/VP1/VP1HEPVis/src/SbPolyhedron.cxx
+++ b/graphics/VP1/VP1HEPVis/src/SbPolyhedron.cxx
@@ -2090,7 +2090,7 @@ void SbPolyhedronPolygonXSect::Internals::addExtraVertices() {
 	break;
       }
     }
-    assert(iedge<3);//If we cannot add a vertex to a triangle with 3 internal edges, we are in deep shit...
+    assert(iedge<3);//If we cannot add a vertex to a triangle with 3 internal edges, then we have a problem...
   }
 
   /////////// And now, the rest of the triangles will get extra vertices added to their external edges /////////
diff --git a/graphics/VP1/VP1Systems/VP1SimHitSystems/src/VP1SimHitSystem.cxx b/graphics/VP1/VP1Systems/VP1SimHitSystems/src/VP1SimHitSystem.cxx
index a0f848928b395f8926d14b947c5dcb4b7a8042a1..de7e29299008335cf05ba3155c4a79578fe5ab06 100755
--- a/graphics/VP1/VP1Systems/VP1SimHitSystems/src/VP1SimHitSystem.cxx
+++ b/graphics/VP1/VP1Systems/VP1SimHitSystems/src/VP1SimHitSystem.cxx
@@ -10,6 +10,7 @@
 #include <QMap>
 #include <QSet>
 
+#include <Inventor/C/errors/debugerror.h>
 #include <Inventor/nodes/SoDrawStyle.h>
 #include <Inventor/nodes/SoMaterial.h>
 #include <Inventor/nodes/SoSeparator.h>
diff --git a/graphics/VP1/VP1Utils/src/VP1SGContentsHelper.cxx b/graphics/VP1/VP1Utils/src/VP1SGContentsHelper.cxx
index 4a7097cbb77e12c5d00c7648da8aa7e2303a04f6..53e8201fbf94441fccd70a69741ead898ff10229 100644
--- a/graphics/VP1/VP1Utils/src/VP1SGContentsHelper.cxx
+++ b/graphics/VP1/VP1Utils/src/VP1SGContentsHelper.cxx
@@ -14,16 +14,9 @@
 
 #include "VP1Utils/VP1SGContentsHelper.h"
 #include "VP1Base/IVP1System.h"
+#include "StoreGate/StoreGateSvc.h"                                    //
 #include <stdexcept>
 #include <QStringList>
-
-
-/////////////////////////////////////////////////////////////////////////
-// In order to be able to provide list of possible CLID's, we need to  //
-// use the following hack when including the StoreGateSvc header:      //
-#define private public
-#include "StoreGate/StoreGateSvc.h"                                    //
-#undef private
 //                                                                     //
 /////////////////////////////////////////////////////////////////////////
 
@@ -125,15 +118,7 @@ QList<CLID> VP1SGContentsHelper::getPossibleCLIDs() const
     return l;
   }
 
-  SG::DataStore *store = m_sg->store();//<-- This is where we use the private->public a hack.
-  if (!store) {
-    message("ERROR: Found null DataStore pointer - returning empty key list");
-    return l;
-  }
-
-  SG::DataStore::ConstStoreIterator s_iter, s_end;
-  if (!store->tRange(s_iter, s_end).isFailure())
-    for (; s_iter != s_end; s_iter++)
-      l << s_iter->first;
+  for (CLID id : m_sg->clids())
+    l << id;
   return l;
 }